diff --git a/.nx/version-plans/version-plan-1761693747160.md b/.nx/version-plans/version-plan-1761693747160.md new file mode 100644 index 000000000..251b13f31 --- /dev/null +++ b/.nx/version-plans/version-plan-1761693747160.md @@ -0,0 +1,11 @@ +--- +contracts-sdk: major +--- + +### Added `getVincentWrappedKeysAccs()` + +- Returns an array of access control conditions that are used to encrypt/decrypt Vincent delegated wrapped keys. + +### Removed `COMBINED_ABI` and `getPkpTokenId` exports + +- These were intended to be internal-only details of the vincent-contracts-sdk diff --git a/.nx/version-plans/version-plan-1763390580106.md b/.nx/version-plans/version-plan-1763390580106.md new file mode 100644 index 000000000..3c2039e25 --- /dev/null +++ b/.nx/version-plans/version-plan-1763390580106.md @@ -0,0 +1,7 @@ +--- +app-sdk: minor +--- + +#### Add support for Vincent Wrapped Keys + +- Updated internal sessionSig creation so that the `resourceAbilityRequests` includes the ability to decrypt access-control-condition restricted resources diff --git a/packages/apps/abilities-e2e/package.json b/packages/apps/abilities-e2e/package.json index 395d5299c..bb8ff7140 100644 --- a/packages/apps/abilities-e2e/package.json +++ b/packages/apps/abilities-e2e/package.json @@ -6,6 +6,7 @@ "@aa-sdk/core": "^4.53.1", "@account-kit/infra": "^4.53.1", "@account-kit/smart-contracts": "^4.53.1", + "@lit-protocol/encryption": "^7.3.1", "@lit-protocol/esbuild-plugin-polyfill-node": "^0.3.0", "@lit-protocol/vincent-ability-erc20-approval": "workspace:*", "@lit-protocol/vincent-ability-erc20-transfer": "workspace:*", @@ -30,10 +31,11 @@ }, "devDependencies": { "@dotenvx/dotenvx": "^1.44.2", - "@lit-protocol/auth-helpers": "^7.3.0", - "@lit-protocol/constants": "^7.2.3", + "@lit-protocol/auth-helpers": "^7.3.1", + "@lit-protocol/constants": "^7.3.1", "@lit-protocol/contracts-sdk": "^7.2.3", "@lit-protocol/lit-node-client": "^7.2.3", + "@lit-protocol/types": "^7.2.3", "viem": "2.29.2" } } diff --git a/packages/apps/abilities-e2e/test-e2e/solana-transaction-signer.spec.ts b/packages/apps/abilities-e2e/test-e2e/solana-transaction-signer.spec.ts deleted file mode 100644 index e9b54805d..000000000 --- a/packages/apps/abilities-e2e/test-e2e/solana-transaction-signer.spec.ts +++ /dev/null @@ -1,590 +0,0 @@ -import { formatEther } from 'viem'; -import { bundledVincentAbility as solTransactionSignerBundledAbility } from '@lit-protocol/vincent-ability-sol-transaction-signer'; -import { constants } from '@lit-protocol/vincent-wrapped-keys'; - -const { LIT_PREFIX } = constants; - -import { - disconnectVincentAbilityClients, - getVincentAbilityClient, -} from '@lit-protocol/vincent-app-sdk/abilityClient'; -import { ethers } from 'ethers'; -import type { PermissionData } from '@lit-protocol/vincent-contracts-sdk'; -import { getClient } from '@lit-protocol/vincent-contracts-sdk'; -import { LitNodeClient } from '@lit-protocol/lit-node-client'; -import { - Keypair, - Transaction, - VersionedTransaction, - TransactionMessage, - SystemProgram, - PublicKey, - LAMPORTS_PER_SOL, - Connection, - clusterApiUrl, -} from '@solana/web3.js'; - -import { - checkShouldMintAndFundPkp, - DATIL_PUBLIC_CLIENT, - getTestConfig, - TEST_APP_DELEGATEE_ACCOUNT, - TEST_APP_DELEGATEE_PRIVATE_KEY, - TEST_APP_MANAGER_PRIVATE_KEY, - TEST_CONFIG_PATH, - TestConfig, - YELLOWSTONE_RPC_URL, - TEST_SOLANA_FUNDER_PRIVATE_KEY, - SOL_RPC_URL, -} from './helpers'; -import { - fundAppDelegateeIfNeeded, - permitAppVersionForAgentWalletPkp, - permitAbilitiesForAgentWalletPkp, - registerNewApp, - removeAppDelegateeIfNeeded, -} from './helpers/setup-fixtures'; -import * as util from 'node:util'; -import { privateKeyToAccount } from 'viem/accounts'; - -import { checkShouldMintCapacityCredit } from './helpers/check-mint-capcity-credit'; -import { LIT_NETWORK } from '@lit-protocol/constants'; - -import { api } from '@lit-protocol/vincent-wrapped-keys'; -const { getVincentRegistryAccessControlCondition } = api; - -const SOLANA_CLUSTER = 'devnet'; - -// Extend Jest timeout to 4 minutes -jest.setTimeout(240000); - -const contractClient = getClient({ - signer: new ethers.Wallet( - TEST_APP_MANAGER_PRIVATE_KEY, - new ethers.providers.JsonRpcProvider(YELLOWSTONE_RPC_URL), - ), -}); - -// Create a delegatee wallet for ability execution -const getDelegateeWallet = () => { - return new ethers.Wallet( - TEST_APP_DELEGATEE_PRIVATE_KEY as string, - new ethers.providers.JsonRpcProvider(YELLOWSTONE_RPC_URL), - ); -}; - -const getSolanaTransactionSignerAbilityClient = () => { - return getVincentAbilityClient({ - bundledVincentAbility: solTransactionSignerBundledAbility, - ethersSigner: getDelegateeWallet(), - }); -}; - -const fundIfNeeded = async ({ - keypair, - txSendAmount, - faucetFundAmount, -}: { - keypair: Keypair; - txSendAmount: number; - faucetFundAmount: number; -}) => { - const connection = new Connection(clusterApiUrl(SOLANA_CLUSTER), 'confirmed'); - const balance = await connection.getBalance(keypair.publicKey); - console.log('[fundIfNeeded] Current keypair balance:', balance / LAMPORTS_PER_SOL, 'SOL'); - - // Calculate minimum required balance (TX_SEND_AMOUNT + estimated gas fees) - const ESTIMATED_GAS_FEE = 0.000005 * LAMPORTS_PER_SOL; // ~0.000005 SOL for gas - - if (balance < txSendAmount + ESTIMATED_GAS_FEE) { - console.log('[fundIfNeeded] Balance insufficient, funding from funder account...'); - const funderKeypair = Keypair.fromSecretKey(Buffer.from(TEST_SOLANA_FUNDER_PRIVATE_KEY, 'hex')); - - // Check funder balance - const funderBalance = await connection.getBalance(funderKeypair.publicKey); - console.log('[fundIfNeeded] Funder balance:', funderBalance / LAMPORTS_PER_SOL, 'SOL'); - if (funderBalance < faucetFundAmount) { - throw new Error( - `Funder account has insufficient balance: ${funderBalance / LAMPORTS_PER_SOL} SOL`, - ); - } - - // Create transfer transaction from funder to keypair - const transferTx = new Transaction().add( - SystemProgram.transfer({ - fromPubkey: funderKeypair.publicKey, - toPubkey: keypair.publicKey, - lamports: faucetFundAmount, - }), - ); - - // Set recent blockhash and sign - const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash(); - transferTx.recentBlockhash = blockhash; - transferTx.feePayer = funderKeypair.publicKey; - transferTx.sign(funderKeypair); - - // Send and confirm transaction - const signature = await connection.sendRawTransaction(transferTx.serialize(), { - skipPreflight: false, - }); - - await connection.confirmTransaction( - { - signature, - blockhash, - lastValidBlockHeight, - }, - 'confirmed', - ); - console.log( - '[fundIfNeeded] Funded keypair with', - faucetFundAmount / LAMPORTS_PER_SOL, - 'SOL. Tx:', - signature, - ); - - // Verify new balance - const newBalance = await connection.getBalance(keypair.publicKey); - console.log('[fundIfNeeded] New keypair balance:', newBalance / LAMPORTS_PER_SOL, 'SOL'); - } else { - console.log('[fundIfNeeded] Balance sufficient, no funding needed'); - } -}; - -const createSolanaTransferTransaction = async ( - from: PublicKey, - to: PublicKey, - lamports: number, -) => { - const transaction = new Transaction(); - transaction.add( - SystemProgram.transfer({ - fromPubkey: from, - toPubkey: to, - lamports, - }), - ); - - // Fetch recent blockhash from the network - const connection = new Connection(clusterApiUrl(SOLANA_CLUSTER), 'confirmed'); - const { blockhash } = await connection.getLatestBlockhash(); - transaction.recentBlockhash = blockhash; - transaction.feePayer = from; - - return transaction; -}; - -const createSolanaVersionedTransferTransaction = async ( - from: PublicKey, - to: PublicKey, - lamports: number, -) => { - const connection = new Connection(clusterApiUrl(SOLANA_CLUSTER), 'confirmed'); - const { blockhash } = await connection.getLatestBlockhash(); - - const instructions = [ - SystemProgram.transfer({ - fromPubkey: from, - toPubkey: to, - lamports, - }), - ]; - - const messageV0 = new TransactionMessage({ - payerKey: from, - recentBlockhash: blockhash, - instructions, - }).compileToV0Message(); - - return new VersionedTransaction(messageV0); -}; - -const submitAndVerifyTransaction = async (signedTransactionBase64: string, testName: string) => { - const connection = new Connection(clusterApiUrl(SOLANA_CLUSTER), 'confirmed'); - const signedTxBuffer = Buffer.from(signedTransactionBase64, 'base64'); - - console.log(`[${testName}] Submitting transaction to Solana network`); - const signature = await connection.sendRawTransaction(signedTxBuffer, { - skipPreflight: false, - preflightCommitment: 'confirmed', - }); - console.log(`[${testName}] Transaction signature:`, signature); - - const latestBlockhash = await connection.getLatestBlockhash('confirmed'); - const confirmation = await connection.confirmTransaction( - { - signature, - blockhash: latestBlockhash.blockhash, - lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - }, - 'confirmed', - ); - expect(confirmation.value.err).toBeNull(); - console.log(`[${testName}] Transaction confirmed in block`); - - const txDetails = await connection.getTransaction(signature, { - commitment: 'confirmed', - maxSupportedTransactionVersion: 0, - }); - expect(txDetails).toBeDefined(); - expect(txDetails?.slot).toBeGreaterThan(0); - expect(txDetails?.blockTime).toBeDefined(); - - console.log(`[${testName}] Transaction successfully included in block:`, { - slot: txDetails?.slot, - blockTime: txDetails?.blockTime, - signature, - }); -}; - -describe('Solana Transaction Signer Ability E2E Tests', () => { - // Define permission data for all abilities and policies - const PERMISSION_DATA: PermissionData = { - // Solana Transaction Signer Ability has no policies - [solTransactionSignerBundledAbility.ipfsCid]: {}, - }; - - // An array of the IPFS cid of each ability to be tested, computed from the keys of PERMISSION_DATA - const TOOL_IPFS_IDS: string[] = Object.keys(PERMISSION_DATA); - - // Define the policies for each ability, computed from TOOL_IPFS_IDS and PERMISSION_DATA - const TOOL_POLICIES = TOOL_IPFS_IDS.map((abilityIpfsCid) => { - // Get the policy IPFS CIDs for this ability from PERMISSION_DATA - return Object.keys(PERMISSION_DATA[abilityIpfsCid]); - }); - - const FAUCET_FUND_AMOUNT = 0.01 * LAMPORTS_PER_SOL; - const TX_SEND_AMOUNT = 0.001 * LAMPORTS_PER_SOL; - - let TEST_CONFIG: TestConfig; - let LIT_NODE_CLIENT: LitNodeClient; - let TEST_SOLANA_KEYPAIR: Keypair; - let CIPHERTEXT: string; - let DATA_TO_ENCRYPT_HASH: string; - let EVM_CONTRACT_CONDITION: any; - let SERIALIZED_TRANSACTION: string; - let VERSIONED_SERIALIZED_TRANSACTION: string; - - afterAll(async () => { - console.log('Disconnecting from Lit node client...'); - await disconnectVincentAbilityClients(); - await LIT_NODE_CLIENT.disconnect(); - }); - - beforeAll(async () => { - TEST_CONFIG = getTestConfig(TEST_CONFIG_PATH); - TEST_CONFIG = await checkShouldMintAndFundPkp(TEST_CONFIG); - TEST_CONFIG = await checkShouldMintCapacityCredit(TEST_CONFIG); - - // The App Manager needs to have Lit test tokens - // in order to interact with the Vincent contract - const appManagerLitTestTokenBalance = await DATIL_PUBLIC_CLIENT.getBalance({ - address: privateKeyToAccount(TEST_APP_MANAGER_PRIVATE_KEY as `0x${string}`).address, - }); - if (appManagerLitTestTokenBalance === 0n) { - throw new Error( - `❌ App Manager has no Lit test tokens. Please fund ${ - privateKeyToAccount(TEST_APP_MANAGER_PRIVATE_KEY as `0x${string}`).address - } with Lit test tokens`, - ); - } else { - console.log( - `ℹ️ App Manager has ${formatEther(appManagerLitTestTokenBalance)} Lit test tokens`, - ); - } - - await fundAppDelegateeIfNeeded(); - - LIT_NODE_CLIENT = new LitNodeClient({ - litNetwork: LIT_NETWORK.Datil, - debug: true, - }); - await LIT_NODE_CLIENT.connect(); - - EVM_CONTRACT_CONDITION = await getVincentRegistryAccessControlCondition({ - delegatorAddress: TEST_CONFIG.userPkp!.ethAddress!, - }); - - TEST_SOLANA_KEYPAIR = Keypair.generate(); - console.log('TEST_SOLANA_KEYPAIR.publicKey', TEST_SOLANA_KEYPAIR.publicKey.toString()); - console.log( - 'TEST_SOLANA_KEYPAIR.secretKey', - Buffer.from(TEST_SOLANA_KEYPAIR.secretKey).toString('hex'), - ); - - await fundIfNeeded({ - keypair: TEST_SOLANA_KEYPAIR, - txSendAmount: TX_SEND_AMOUNT, - faucetFundAmount: FAUCET_FUND_AMOUNT, - }); - - const transaction = await createSolanaTransferTransaction( - TEST_SOLANA_KEYPAIR.publicKey, - TEST_SOLANA_KEYPAIR.publicKey, - TX_SEND_AMOUNT, - ); - - SERIALIZED_TRANSACTION = transaction - .serialize({ requireAllSignatures: false }) - .toString('base64'); - - const versionedTransaction = await createSolanaVersionedTransferTransaction( - TEST_SOLANA_KEYPAIR.publicKey, - TEST_SOLANA_KEYPAIR.publicKey, - TX_SEND_AMOUNT, - ); - - VERSIONED_SERIALIZED_TRANSACTION = Buffer.from(versionedTransaction.serialize()).toString( - 'base64', - ); - - const { ciphertext, dataToEncryptHash } = await LIT_NODE_CLIENT.encrypt({ - evmContractConditions: [EVM_CONTRACT_CONDITION], - dataToEncrypt: new TextEncoder().encode( - `${LIT_PREFIX}${Buffer.from(TEST_SOLANA_KEYPAIR.secretKey).toString('hex')}`, - ), - }); - CIPHERTEXT = ciphertext; - DATA_TO_ENCRYPT_HASH = dataToEncryptHash; - }); - - it('should permit the Solana Transaction Signer Ability for the Agent Wallet PKP', async () => { - await permitAbilitiesForAgentWalletPkp( - [solTransactionSignerBundledAbility.ipfsCid], - TEST_CONFIG, - ); - }); - - it('should remove TEST_APP_DELEGATEE_ACCOUNT from an existing App if needed', async () => { - await removeAppDelegateeIfNeeded(); - }); - - it('should register a new App', async () => { - TEST_CONFIG = await registerNewApp(TOOL_IPFS_IDS, TOOL_POLICIES, TEST_CONFIG, TEST_CONFIG_PATH); - }); - - it('should permit the App version for the Agent Wallet PKP', async () => { - await permitAppVersionForAgentWalletPkp(PERMISSION_DATA, TEST_CONFIG); - }); - - it('should validate the Delegatee has permission to execute the Solana Transaction Signer Ability with the Agent Wallet PKP', async () => { - const validationResult = await contractClient.validateAbilityExecutionAndGetPolicies({ - delegateeAddress: TEST_APP_DELEGATEE_ACCOUNT.address, - pkpEthAddress: TEST_CONFIG.userPkp!.ethAddress!, - abilityIpfsCid: TOOL_IPFS_IDS[0], - }); - - expect(validationResult).toBeDefined(); - expect(validationResult.isPermitted).toBe(true); - expect(validationResult.appId).toBe(TEST_CONFIG.appId!); - expect(validationResult.appVersion).toBe(TEST_CONFIG.appVersion!); - expect(Object.keys(validationResult.decodedPolicies)).toHaveLength(0); - }); - - it('should run precheck and validate transaction deserialization', async () => { - const client = getSolanaTransactionSignerAbilityClient(); - const precheckResult = await client.precheck( - { - rpcUrl: SOL_RPC_URL, - cluster: SOLANA_CLUSTER, - serializedTransaction: SERIALIZED_TRANSACTION, - ciphertext: CIPHERTEXT, - dataToEncryptHash: DATA_TO_ENCRYPT_HASH, - }, - { delegatorPkpEthAddress: TEST_CONFIG.userPkp!.ethAddress! }, - ); - - console.log( - '[should run precheck and validate transaction deserialization]', - util.inspect(precheckResult, { depth: 10 }), - ); - - expect(precheckResult.success).toBe(true); - if (!precheckResult.success) { - throw new Error(precheckResult.runtimeError); - } - }); - - it('should run execute and return a signed transaction', async () => { - const client = getSolanaTransactionSignerAbilityClient(); - const executeResult = await client.execute( - { - cluster: SOLANA_CLUSTER, - serializedTransaction: SERIALIZED_TRANSACTION, - ciphertext: CIPHERTEXT, - dataToEncryptHash: DATA_TO_ENCRYPT_HASH, - }, - { delegatorPkpEthAddress: TEST_CONFIG.userPkp!.ethAddress! }, - ); - - console.log( - '[should run execute and return a signed transaction]', - util.inspect(executeResult, { depth: 10 }), - ); - - expect(executeResult.success).toBe(true); - expect(executeResult.result).toBeDefined(); - - const signedTransaction = (executeResult.result! as { signedTransaction: string }) - .signedTransaction; - - // Validate it's a base64 encoded string using regex - const base64Regex = /^[A-Za-z0-9+/]+=*$/; - expect(signedTransaction).toMatch(base64Regex); - - await submitAndVerifyTransaction( - signedTransaction, - 'should run execute and return a signed transaction', - ); - }); - - it('should run execute with requireAllSignatures set to false', async () => { - const transaction = await createSolanaTransferTransaction( - TEST_SOLANA_KEYPAIR.publicKey, - TEST_SOLANA_KEYPAIR.publicKey, - TX_SEND_AMOUNT, - ); - const serializedTransaction = transaction - .serialize({ requireAllSignatures: false }) - .toString('base64'); - - const client = getSolanaTransactionSignerAbilityClient(); - const executeResult = await client.execute( - { - cluster: SOLANA_CLUSTER, - serializedTransaction, - ciphertext: CIPHERTEXT, - dataToEncryptHash: DATA_TO_ENCRYPT_HASH, - legacyTransactionOptions: { - requireAllSignatures: false, - verifySignatures: false, - }, - }, - { delegatorPkpEthAddress: TEST_CONFIG.userPkp!.ethAddress! }, - ); - - console.log( - '[should run execute with requireAllSignatures set to false]', - util.inspect(executeResult, { depth: 10 }), - ); - - expect(executeResult.success).toBe(true); - expect(executeResult.result).toBeDefined(); - - const signedTransaction = (executeResult.result! as { signedTransaction: string }) - .signedTransaction; - - // Validate it's a base64 encoded string using regex - const base64Regex = /^[A-Za-z0-9+/]+=*$/; - expect(signedTransaction).toMatch(base64Regex); - - // Note: This transaction should still be valid since it's fully signed - await submitAndVerifyTransaction( - signedTransaction, - 'should run execute with requireAllSignatures set to false', - ); - }); - - it('should run execute with validateSignatures set to true', async () => { - const transaction = await createSolanaTransferTransaction( - TEST_SOLANA_KEYPAIR.publicKey, - TEST_SOLANA_KEYPAIR.publicKey, - TX_SEND_AMOUNT, - ); - const serializedTransaction = transaction - .serialize({ requireAllSignatures: false }) - .toString('base64'); - - const client = getSolanaTransactionSignerAbilityClient(); - const executeResult = await client.execute( - { - cluster: SOLANA_CLUSTER, - serializedTransaction, - ciphertext: CIPHERTEXT, - dataToEncryptHash: DATA_TO_ENCRYPT_HASH, - legacyTransactionOptions: { - requireAllSignatures: true, - verifySignatures: true, - }, - }, - { delegatorPkpEthAddress: TEST_CONFIG.userPkp!.ethAddress! }, - ); - - console.log( - '[should run execute with validateSignatures set to true]', - util.inspect(executeResult, { depth: 10 }), - ); - - expect(executeResult.success).toBe(true); - expect(executeResult.result).toBeDefined(); - - const signedTransaction = (executeResult.result! as { signedTransaction: string }) - .signedTransaction; - - // Validate it's a base64 encoded string using regex - const base64Regex = /^[A-Za-z0-9+/]+=*$/; - expect(signedTransaction).toMatch(base64Regex); - - await submitAndVerifyTransaction( - signedTransaction, - 'should run execute with validateSignatures set to true', - ); - }); - - it('should run precheck and validate versioned transaction deserialization', async () => { - const client = getSolanaTransactionSignerAbilityClient(); - const precheckResult = await client.precheck( - { - cluster: SOLANA_CLUSTER, - serializedTransaction: VERSIONED_SERIALIZED_TRANSACTION, - ciphertext: CIPHERTEXT, - dataToEncryptHash: DATA_TO_ENCRYPT_HASH, - }, - { delegatorPkpEthAddress: TEST_CONFIG.userPkp!.ethAddress! }, - ); - - console.log( - '[should run precheck and validate versioned transaction deserialization]', - util.inspect(precheckResult, { depth: 10 }), - ); - - expect(precheckResult.success).toBe(true); - if (!precheckResult.success) { - throw new Error(precheckResult.runtimeError); - } - }); - - it('should run execute and return a signed versioned transaction', async () => { - const client = getSolanaTransactionSignerAbilityClient(); - const executeResult = await client.execute( - { - cluster: SOLANA_CLUSTER, - serializedTransaction: VERSIONED_SERIALIZED_TRANSACTION, - ciphertext: CIPHERTEXT, - dataToEncryptHash: DATA_TO_ENCRYPT_HASH, - }, - { delegatorPkpEthAddress: TEST_CONFIG.userPkp!.ethAddress! }, - ); - - console.log( - '[should run execute and return a signed versioned transaction]', - util.inspect(executeResult, { depth: 10 }), - ); - - expect(executeResult.success).toBe(true); - expect(executeResult.result).toBeDefined(); - - const signedTransaction = (executeResult.result! as { signedTransaction: string }) - .signedTransaction; - - // Validate it's a base64 encoded string using regex - const base64Regex = /^[A-Za-z0-9+/]+=*$/; - expect(signedTransaction).toMatch(base64Regex); - - await submitAndVerifyTransaction( - signedTransaction, - 'should run execute and return a signed versioned transaction', - ); - }); -}); diff --git a/packages/apps/abilities-e2e/test-e2e/solana/helpers/createSolTransferTx.ts b/packages/apps/abilities-e2e/test-e2e/solana/helpers/createSolTransferTx.ts new file mode 100644 index 000000000..5ac477909 --- /dev/null +++ b/packages/apps/abilities-e2e/test-e2e/solana/helpers/createSolTransferTx.ts @@ -0,0 +1,37 @@ +import { + Cluster, + clusterApiUrl, + Connection, + PublicKey, + SystemProgram, + Transaction, +} from '@solana/web3.js'; + +export const createSolanaTransferTransaction = async ({ + solanaCluster, + from, + to, + lamports, +}: { + solanaCluster: Cluster; + from: PublicKey; + to: PublicKey; + lamports: number; +}) => { + const transaction = new Transaction(); + transaction.add( + SystemProgram.transfer({ + fromPubkey: from, + toPubkey: to, + lamports, + }), + ); + + // Fetch recent blockhash from the network + const connection = new Connection(clusterApiUrl(solanaCluster), 'confirmed'); + const { blockhash } = await connection.getLatestBlockhash(); + transaction.recentBlockhash = blockhash; + transaction.feePayer = from; + + return transaction; +}; diff --git a/packages/apps/abilities-e2e/test-e2e/solana/helpers/createVersionedSolTransferTx.ts b/packages/apps/abilities-e2e/test-e2e/solana/helpers/createVersionedSolTransferTx.ts new file mode 100644 index 000000000..6f6b6c425 --- /dev/null +++ b/packages/apps/abilities-e2e/test-e2e/solana/helpers/createVersionedSolTransferTx.ts @@ -0,0 +1,40 @@ +import { + Cluster, + clusterApiUrl, + Connection, + PublicKey, + SystemProgram, + TransactionMessage, + VersionedTransaction, +} from '@solana/web3.js'; + +export const createSolanaVersionedTransferTransaction = async ({ + solanaCluster, + from, + to, + lamports, +}: { + from: PublicKey; + to: PublicKey; + lamports: number; + solanaCluster: Cluster; +}) => { + const connection = new Connection(clusterApiUrl(solanaCluster), 'confirmed'); + const { blockhash } = await connection.getLatestBlockhash(); + + const instructions = [ + SystemProgram.transfer({ + fromPubkey: from, + toPubkey: to, + lamports, + }), + ]; + + const messageV0 = new TransactionMessage({ + payerKey: from, + recentBlockhash: blockhash, + instructions, + }).compileToV0Message(); + + return new VersionedTransaction(messageV0); +}; diff --git a/packages/apps/abilities-e2e/test-e2e/solana/helpers/fundIfNeeded.ts b/packages/apps/abilities-e2e/test-e2e/solana/helpers/fundIfNeeded.ts new file mode 100644 index 000000000..e9de0f500 --- /dev/null +++ b/packages/apps/abilities-e2e/test-e2e/solana/helpers/fundIfNeeded.ts @@ -0,0 +1,85 @@ +import { + Keypair, + Transaction, + SystemProgram, + LAMPORTS_PER_SOL, + Connection, + clusterApiUrl, + type Cluster, +} from '@solana/web3.js'; + +import { TEST_SOLANA_FUNDER_PRIVATE_KEY } from '../../helpers'; + +export const fundIfNeeded = async ({ + solanaCluster, + keypair, + txSendAmount, + faucetFundAmount, +}: { + solanaCluster: Cluster; + keypair: Keypair; + txSendAmount: number; + faucetFundAmount: number; +}) => { + const connection = new Connection(clusterApiUrl(solanaCluster), 'confirmed'); + const balance = await connection.getBalance(keypair.publicKey); + console.log('[fundIfNeeded] Current keypair balance:', balance / LAMPORTS_PER_SOL, 'SOL'); + + // Calculate minimum required balance (TX_SEND_AMOUNT + estimated gas fees) + const ESTIMATED_GAS_FEE = 0.000005 * LAMPORTS_PER_SOL; // ~0.000005 SOL for gas + + if (balance < txSendAmount + ESTIMATED_GAS_FEE) { + console.log('[fundIfNeeded] Balance insufficient, funding from funder account...'); + const funderKeypair = Keypair.fromSecretKey(Buffer.from(TEST_SOLANA_FUNDER_PRIVATE_KEY, 'hex')); + + // Check funder balance + const funderBalance = await connection.getBalance(funderKeypair.publicKey); + console.log('[fundIfNeeded] Funder balance:', funderBalance / LAMPORTS_PER_SOL, 'SOL'); + if (funderBalance < faucetFundAmount) { + throw new Error( + `Funder account has insufficient balance: ${funderBalance / LAMPORTS_PER_SOL} SOL`, + ); + } + + // Create transfer transaction from funder to keypair + const transferTx = new Transaction().add( + SystemProgram.transfer({ + fromPubkey: funderKeypair.publicKey, + toPubkey: keypair.publicKey, + lamports: faucetFundAmount, + }), + ); + + // Set recent blockhash and sign + const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash(); + transferTx.recentBlockhash = blockhash; + transferTx.feePayer = funderKeypair.publicKey; + transferTx.sign(funderKeypair); + + // Send and confirm transaction + const signature = await connection.sendRawTransaction(transferTx.serialize(), { + skipPreflight: false, + }); + + await connection.confirmTransaction( + { + signature, + blockhash, + lastValidBlockHeight, + }, + 'confirmed', + ); + console.log( + '[fundIfNeeded] Funded keypair with', + faucetFundAmount / LAMPORTS_PER_SOL, + 'SOL. Tx:', + signature, + ); + + // Verify new balance + const newBalance = await connection.getBalance(keypair.publicKey); + console.log('[fundIfNeeded] New keypair balance:', newBalance / LAMPORTS_PER_SOL, 'SOL'); + } else { + console.log('[fundIfNeeded] Balance sufficient, no funding needed'); + } +}; diff --git a/packages/apps/abilities-e2e/test-e2e/solana/helpers/submitAndVerifyTx.ts b/packages/apps/abilities-e2e/test-e2e/solana/helpers/submitAndVerifyTx.ts new file mode 100644 index 000000000..de711aaad --- /dev/null +++ b/packages/apps/abilities-e2e/test-e2e/solana/helpers/submitAndVerifyTx.ts @@ -0,0 +1,47 @@ +import { clusterApiUrl, Connection, type Cluster } from '@solana/web3.js'; + +export const submitAndVerifyTransaction = async ({ + solanaCluster, + signedTransactionBase64, + testName, +}: { + solanaCluster: Cluster; + signedTransactionBase64: string; + testName: string; +}) => { + const connection = new Connection(clusterApiUrl(solanaCluster), 'confirmed'); + const signedTxBuffer = Buffer.from(signedTransactionBase64, 'base64'); + + console.log(`[${testName}] Submitting transaction to Solana network`); + const signature = await connection.sendRawTransaction(signedTxBuffer, { + skipPreflight: false, + preflightCommitment: 'confirmed', + }); + console.log(`[${testName}] Transaction signature:`, signature); + + const latestBlockhash = await connection.getLatestBlockhash('confirmed'); + const confirmation = await connection.confirmTransaction( + { + signature, + blockhash: latestBlockhash.blockhash, + lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, + }, + 'confirmed', + ); + expect(confirmation.value.err).toBeNull(); + console.log(`[${testName}] Transaction confirmed in block`); + + const txDetails = await connection.getTransaction(signature, { + commitment: 'confirmed', + maxSupportedTransactionVersion: 0, + }); + expect(txDetails).toBeDefined(); + expect(txDetails?.slot).toBeGreaterThan(0); + expect(txDetails?.blockTime).toBeDefined(); + + console.log(`[${testName}] Transaction successfully included in block:`, { + slot: txDetails?.slot, + blockTime: txDetails?.blockTime, + signature, + }); +}; diff --git a/packages/apps/abilities-e2e/test-e2e/solana/solana-transaction-signer.spec.ts b/packages/apps/abilities-e2e/test-e2e/solana/solana-transaction-signer.spec.ts new file mode 100644 index 000000000..72ed93389 --- /dev/null +++ b/packages/apps/abilities-e2e/test-e2e/solana/solana-transaction-signer.spec.ts @@ -0,0 +1,549 @@ +import { formatEther } from 'viem'; +import { bundledVincentAbility as solTransactionSignerBundledAbility } from '@lit-protocol/vincent-ability-sol-transaction-signer'; +import { constants, api } from '@lit-protocol/vincent-wrapped-keys'; +const { exportPrivateKey, generatePrivateKey } = api; + +const { LIT_PREFIX } = constants; + +import { + disconnectVincentAbilityClients, + getVincentAbilityClient, +} from '@lit-protocol/vincent-app-sdk/abilityClient'; +import { ethers } from 'ethers'; +import type { PermissionData } from '@lit-protocol/vincent-contracts-sdk'; +import { getClient, getVincentWrappedKeysAccs } from '@lit-protocol/vincent-contracts-sdk'; +import { LitNodeClient } from '@lit-protocol/lit-node-client'; +import { Keypair, LAMPORTS_PER_SOL } from '@solana/web3.js'; + +import { + checkShouldMintAndFundPkp, + DATIL_PUBLIC_CLIENT, + getTestConfig, + TEST_APP_DELEGATEE_ACCOUNT, + TEST_APP_DELEGATEE_PRIVATE_KEY, + TEST_APP_MANAGER_PRIVATE_KEY, + TEST_CONFIG_PATH, + TestConfig, + YELLOWSTONE_RPC_URL, + SOL_RPC_URL, + TEST_AGENT_WALLET_PKP_OWNER_PRIVATE_KEY, +} from '../helpers'; +import { + fundAppDelegateeIfNeeded, + permitAppVersionForAgentWalletPkp, + permitAbilitiesForAgentWalletPkp, + registerNewApp, + removeAppDelegateeIfNeeded, +} from '../helpers/setup-fixtures'; +import * as util from 'node:util'; +import { privateKeyToAccount } from 'viem/accounts'; + +import { checkShouldMintCapacityCredit } from '../helpers/check-mint-capcity-credit'; +import { LIT_ABILITY, LIT_NETWORK } from '@lit-protocol/constants'; +import { fundIfNeeded } from './helpers/fundIfNeeded'; +import { submitAndVerifyTransaction } from './helpers/submitAndVerifyTx'; +import { createSolanaTransferTransaction } from './helpers/createSolTransferTx'; +import { createSolanaVersionedTransferTransaction } from './helpers/createVersionedSolTransferTx'; +import type { AuthSig, ILitResource } from '@lit-protocol/types'; +import { + createSiweMessage, + generateAuthSig, + LitAccessControlConditionResource, +} from '@lit-protocol/auth-helpers'; + +const SOLANA_CLUSTER = 'devnet'; + +// delegator sessionsigs must allow decryption of access control condition restricted resources +const getDelegatorSessionSigs = async ({ + litNodeClient, + ethersSigner, + capacityDelegationAuthSig, +}: { + litNodeClient: LitNodeClient; + ethersSigner: ethers.Signer; + capacityDelegationAuthSig?: AuthSig; +}) => { + return litNodeClient.getSessionSigs({ + chain: 'ethereum', + expiration: new Date(Date.now() + 1000 * 60 * 2).toISOString(), // 2 minutes + capabilityAuthSigs: capacityDelegationAuthSig ? [capacityDelegationAuthSig] : [], + resourceAbilityRequests: [ + { + resource: new LitAccessControlConditionResource('*') as ILitResource, + ability: LIT_ABILITY.AccessControlConditionDecryption, + }, + ], + authNeededCallback: async ({ uri, expiration, resourceAbilityRequests }) => { + const toSign = await createSiweMessage({ + uri, + expiration, + resources: resourceAbilityRequests, + walletAddress: await ethersSigner.getAddress(), + nonce: await litNodeClient.getLatestBlockhash(), + litNodeClient: litNodeClient, + }); + + return await generateAuthSig({ + signer: ethersSigner, + toSign, + }); + }, + }); +}; + +// Extend Jest timeout to 4 minutes +jest.setTimeout(240000); + +const contractClient = getClient({ + signer: new ethers.Wallet( + TEST_APP_MANAGER_PRIVATE_KEY, + new ethers.providers.JsonRpcProvider(YELLOWSTONE_RPC_URL), + ), +}); + +// Create a delegatee wallet for ability execution +const getDelegateeWallet = () => { + return new ethers.Wallet( + TEST_APP_DELEGATEE_PRIVATE_KEY as string, + new ethers.providers.JsonRpcProvider(YELLOWSTONE_RPC_URL), + ); +}; + +const getSolanaTransactionSignerAbilityClient = () => { + return getVincentAbilityClient({ + bundledVincentAbility: solTransactionSignerBundledAbility, + ethersSigner: getDelegateeWallet(), + debug: true, + }); +}; + +describe('Solana Transaction Signer Ability E2E Tests', () => { + // Define permission data for all abilities and policies + const PERMISSION_DATA: PermissionData = { + // Solana Transaction Signer Ability has no policies + [solTransactionSignerBundledAbility.ipfsCid]: {}, + }; + + // An array of the IPFS cid of each ability to be tested, computed from the keys of PERMISSION_DATA + const TOOL_IPFS_IDS: string[] = Object.keys(PERMISSION_DATA); + + // Define the policies for each ability, computed from TOOL_IPFS_IDS and PERMISSION_DATA + const TOOL_POLICIES = TOOL_IPFS_IDS.map((abilityIpfsCid) => { + // Get the policy IPFS CIDs for this ability from PERMISSION_DATA + return Object.keys(PERMISSION_DATA[abilityIpfsCid]); + }); + + const FAUCET_FUND_AMOUNT = 0.01 * LAMPORTS_PER_SOL; + const TX_SEND_AMOUNT = 0.001 * LAMPORTS_PER_SOL; + + let TEST_CONFIG: TestConfig; + let LIT_NODE_CLIENT: LitNodeClient; + let TEST_SOLANA_KEYPAIR: Keypair; + let CIPHERTEXT: string; + let DATA_TO_ENCRYPT_HASH: string; + let VINCENT_WRAPPED_KEYS_ACC_CONDITIONS: any; + let SERIALIZED_TRANSACTION: string; + let VERSIONED_SERIALIZED_TRANSACTION: string; + + afterAll(async () => { + console.log('Disconnecting from Lit node client...'); + await disconnectVincentAbilityClients(); + await LIT_NODE_CLIENT.disconnect(); + }); + + beforeAll(async () => { + TEST_CONFIG = getTestConfig(TEST_CONFIG_PATH); + TEST_CONFIG = await checkShouldMintAndFundPkp(TEST_CONFIG); + TEST_CONFIG = await checkShouldMintCapacityCredit(TEST_CONFIG); + + // The App Manager needs to have Lit test tokens + // in order to interact with the Vincent contract + const appManagerLitTestTokenBalance = await DATIL_PUBLIC_CLIENT.getBalance({ + address: privateKeyToAccount(TEST_APP_MANAGER_PRIVATE_KEY as `0x${string}`).address, + }); + if (appManagerLitTestTokenBalance === 0n) { + throw new Error( + `❌ App Manager has no Lit test tokens. Please fund ${ + privateKeyToAccount(TEST_APP_MANAGER_PRIVATE_KEY as `0x${string}`).address + } with Lit test tokens`, + ); + } else { + console.log( + `ℹ️ App Manager has ${formatEther(appManagerLitTestTokenBalance)} Lit test tokens`, + ); + } + + await fundAppDelegateeIfNeeded(); + + LIT_NODE_CLIENT = new LitNodeClient({ + litNetwork: LIT_NETWORK.Datil, + debug: true, + }); + await LIT_NODE_CLIENT.connect(); + + // TODO: TEST_SOLANA_KEYPAIR should be generated by the user PKP (the owner of the agent PKP) + // const { id, generatedPublicKey } = await generatePrivateKey({ + // litNodeClient: LIT_NODE_CLIENT, + // delegatorAddress: TEST_CONFIG.userPkp!.ethAddress!, + // TODO: Use actual PKPEthers session sigs; requires minting a PKP for the 'owner wallet' instead of using a raw ethers wallet + // since Vincent Wrapped Keys are managed (generated) by the user PKP (the owner of the agent PKP) + // delegatorSessionSigs: await getDelegatorPKPSessionSigs({ + // litNodeClient: LIT_NODE_CLIENT, + // ethersSigner: getDelegatorAg(), + // }), + // }); + + // TODO: This data should be returned by fetching the key from the wrapped-keys backend only (not static) + VINCENT_WRAPPED_KEYS_ACC_CONDITIONS = await getVincentWrappedKeysAccs({ + delegatorAddress: TEST_CONFIG.userPkp!.ethAddress!, + }); + + console.log('VINCENT_WRAPPED_KEYS_ACC_CONDITIONS', VINCENT_WRAPPED_KEYS_ACC_CONDITIONS); + + TEST_SOLANA_KEYPAIR = Keypair.generate(); + console.log('TEST_SOLANA_KEYPAIR.publicKey', TEST_SOLANA_KEYPAIR.publicKey.toString()); + // TODO: We won't have the secret key unless we export it using `exportPrivateKey()` (which should be its own test case) + console.log( + 'TEST_SOLANA_KEYPAIR.secretKey', + Buffer.from(TEST_SOLANA_KEYPAIR.secretKey).toString('hex'), + ); + + await fundIfNeeded({ + solanaCluster: SOLANA_CLUSTER, + keypair: TEST_SOLANA_KEYPAIR, + txSendAmount: TX_SEND_AMOUNT, + faucetFundAmount: FAUCET_FUND_AMOUNT, + }); + + const transaction = await createSolanaTransferTransaction({ + solanaCluster: SOLANA_CLUSTER, + from: TEST_SOLANA_KEYPAIR.publicKey, + to: TEST_SOLANA_KEYPAIR.publicKey, + lamports: TX_SEND_AMOUNT, + }); + + SERIALIZED_TRANSACTION = transaction + .serialize({ requireAllSignatures: false }) + .toString('base64'); + + const versionedTransaction = await createSolanaVersionedTransferTransaction({ + solanaCluster: SOLANA_CLUSTER, + from: TEST_SOLANA_KEYPAIR.publicKey, + to: TEST_SOLANA_KEYPAIR.publicKey, + lamports: TX_SEND_AMOUNT, + }); + + VERSIONED_SERIALIZED_TRANSACTION = Buffer.from(versionedTransaction.serialize()).toString( + 'base64', + ); + + // TODO: :hocho: This should not be encrypting locally; encryption, access control condition composition and persistence of the key to the backend is now handled inside of api.generatePrivateKey() + const { ciphertext, dataToEncryptHash } = await LIT_NODE_CLIENT.encrypt({ + evmContractConditions: VINCENT_WRAPPED_KEYS_ACC_CONDITIONS, + dataToEncrypt: new TextEncoder().encode( + `${LIT_PREFIX}${Buffer.from(TEST_SOLANA_KEYPAIR.secretKey).toString('hex')}`, + ), + }); + CIPHERTEXT = ciphertext; + DATA_TO_ENCRYPT_HASH = dataToEncryptHash; + }); + + describe('Setup', () => { + it('should permit the Solana Transaction Signer Ability for the Agent Wallet PKP', async () => { + await permitAbilitiesForAgentWalletPkp( + [solTransactionSignerBundledAbility.ipfsCid], + TEST_CONFIG, + ); + }); + + it('should remove TEST_APP_DELEGATEE_ACCOUNT from an existing App if needed', async () => { + await removeAppDelegateeIfNeeded(); + }); + + it('should register a new App', async () => { + TEST_CONFIG = await registerNewApp( + TOOL_IPFS_IDS, + TOOL_POLICIES, + TEST_CONFIG, + TEST_CONFIG_PATH, + ); + }); + + it('should permit the App version for the Agent Wallet PKP', async () => { + await permitAppVersionForAgentWalletPkp(PERMISSION_DATA, TEST_CONFIG); + }); + + it('should validate the Delegatee has permission to execute the Solana Transaction Signer Ability with the Agent Wallet PKP', async () => { + const validationResult = await contractClient.validateAbilityExecutionAndGetPolicies({ + delegateeAddress: TEST_APP_DELEGATEE_ACCOUNT.address, + pkpEthAddress: TEST_CONFIG.userPkp!.ethAddress!, + abilityIpfsCid: TOOL_IPFS_IDS[0], + }); + + expect(validationResult).toBeDefined(); + expect(validationResult.isPermitted).toBe(true); + expect(validationResult.appId).toBe(TEST_CONFIG.appId!); + expect(validationResult.appVersion).toBe(TEST_CONFIG.appVersion!); + expect(Object.keys(validationResult.decodedPolicies)).toHaveLength(0); + }); + }); + + // TODO: Should only track `id` of a newly generated wrapped key in scope, and fetch the wrapped key from the backend using `fetchPrivateKey()` + describe.skip('Precheck and Execute testing using Delegatee', () => { + it('should run precheck and validate transaction deserialization', async () => { + const client = getSolanaTransactionSignerAbilityClient(); + const precheckResult = await client.precheck( + { + rpcUrl: SOL_RPC_URL, + cluster: SOLANA_CLUSTER, + serializedTransaction: SERIALIZED_TRANSACTION, + evmContractConditions: VINCENT_WRAPPED_KEYS_ACC_CONDITIONS, + ciphertext: CIPHERTEXT, + dataToEncryptHash: DATA_TO_ENCRYPT_HASH, + }, + { delegatorPkpEthAddress: TEST_CONFIG.userPkp!.ethAddress! }, + ); + + console.log( + '[should run precheck and validate transaction deserialization]', + util.inspect(precheckResult, { depth: 10 }), + ); + + expect(precheckResult.success).toBe(true); + if (!precheckResult.success) { + throw new Error(precheckResult.runtimeError); + } + }); + + it('should run execute and return a signed transaction', async () => { + const client = getSolanaTransactionSignerAbilityClient(); + const executeResult = await client.execute( + { + cluster: SOLANA_CLUSTER, + serializedTransaction: SERIALIZED_TRANSACTION, + evmContractConditions: VINCENT_WRAPPED_KEYS_ACC_CONDITIONS, + ciphertext: CIPHERTEXT, + dataToEncryptHash: DATA_TO_ENCRYPT_HASH, + }, + { delegatorPkpEthAddress: TEST_CONFIG.userPkp!.ethAddress! }, + ); + + console.log( + '[should run execute and return a signed transaction]', + util.inspect(executeResult, { depth: 10 }), + ); + + expect(executeResult.success).toBe(true); + expect(executeResult.result).toBeDefined(); + + const signedTransaction = (executeResult.result! as { signedTransaction: string }) + .signedTransaction; + + // Validate it's a base64 encoded string using regex + const base64Regex = /^[A-Za-z0-9+/]+=*$/; + expect(signedTransaction).toMatch(base64Regex); + + await submitAndVerifyTransaction({ + solanaCluster: SOLANA_CLUSTER, + signedTransactionBase64: signedTransaction, + testName: 'should run execute and return a signed transaction', + }); + }); + + it('should run execute with requireAllSignatures set to false', async () => { + const transaction = await createSolanaTransferTransaction({ + solanaCluster: SOLANA_CLUSTER, + from: TEST_SOLANA_KEYPAIR.publicKey, + to: TEST_SOLANA_KEYPAIR.publicKey, + lamports: TX_SEND_AMOUNT, + }); + const serializedTransaction = transaction + .serialize({ requireAllSignatures: false }) + .toString('base64'); + + const client = getSolanaTransactionSignerAbilityClient(); + const executeResult = await client.execute( + { + cluster: SOLANA_CLUSTER, + serializedTransaction, + evmContractConditions: VINCENT_WRAPPED_KEYS_ACC_CONDITIONS, + ciphertext: CIPHERTEXT, + dataToEncryptHash: DATA_TO_ENCRYPT_HASH, + legacyTransactionOptions: { + requireAllSignatures: false, + verifySignatures: false, + }, + }, + { delegatorPkpEthAddress: TEST_CONFIG.userPkp!.ethAddress! }, + ); + + console.log( + '[should run execute with requireAllSignatures set to false]', + util.inspect(executeResult, { depth: 10 }), + ); + + expect(executeResult.success).toBe(true); + expect(executeResult.result).toBeDefined(); + + const signedTransaction = (executeResult.result! as { signedTransaction: string }) + .signedTransaction; + + // Validate it's a base64 encoded string using regex + const base64Regex = /^[A-Za-z0-9+/]+=*$/; + expect(signedTransaction).toMatch(base64Regex); + + // Note: This transaction should still be valid since it's fully signed + await submitAndVerifyTransaction({ + solanaCluster: SOLANA_CLUSTER, + signedTransactionBase64: signedTransaction, + testName: 'should run execute with requireAllSignatures set to false', + }); + }); + + it('should run execute with validateSignatures set to true', async () => { + const transaction = await createSolanaTransferTransaction({ + solanaCluster: SOLANA_CLUSTER, + from: TEST_SOLANA_KEYPAIR.publicKey, + to: TEST_SOLANA_KEYPAIR.publicKey, + lamports: TX_SEND_AMOUNT, + }); + const serializedTransaction = transaction + .serialize({ requireAllSignatures: false }) + .toString('base64'); + + const client = getSolanaTransactionSignerAbilityClient(); + const executeResult = await client.execute( + { + cluster: SOLANA_CLUSTER, + serializedTransaction, + evmContractConditions: VINCENT_WRAPPED_KEYS_ACC_CONDITIONS, + ciphertext: CIPHERTEXT, + dataToEncryptHash: DATA_TO_ENCRYPT_HASH, + legacyTransactionOptions: { + requireAllSignatures: true, + verifySignatures: true, + }, + }, + { delegatorPkpEthAddress: TEST_CONFIG.userPkp!.ethAddress! }, + ); + + console.log( + '[should run execute with validateSignatures set to true]', + util.inspect(executeResult, { depth: 10 }), + ); + + expect(executeResult.success).toBe(true); + expect(executeResult.result).toBeDefined(); + + const signedTransaction = (executeResult.result! as { signedTransaction: string }) + .signedTransaction; + + // Validate it's a base64 encoded string using regex + const base64Regex = /^[A-Za-z0-9+/]+=*$/; + expect(signedTransaction).toMatch(base64Regex); + + await submitAndVerifyTransaction({ + solanaCluster: SOLANA_CLUSTER, + signedTransactionBase64: signedTransaction, + testName: 'should run execute with validateSignatures set to true', + }); + }); + + it('should run precheck and validate versioned transaction deserialization', async () => { + const client = getSolanaTransactionSignerAbilityClient(); + const precheckResult = await client.precheck( + { + cluster: SOLANA_CLUSTER, + serializedTransaction: VERSIONED_SERIALIZED_TRANSACTION, + evmContractConditions: VINCENT_WRAPPED_KEYS_ACC_CONDITIONS, + ciphertext: CIPHERTEXT, + dataToEncryptHash: DATA_TO_ENCRYPT_HASH, + }, + { delegatorPkpEthAddress: TEST_CONFIG.userPkp!.ethAddress! }, + ); + + console.log( + '[should run precheck and validate versioned transaction deserialization]', + util.inspect(precheckResult, { depth: 10 }), + ); + + expect(precheckResult.success).toBe(true); + if (!precheckResult.success) { + throw new Error(precheckResult.runtimeError); + } + }); + + it('should run execute and return a signed versioned transaction', async () => { + const client = getSolanaTransactionSignerAbilityClient(); + const executeResult = await client.execute( + { + cluster: SOLANA_CLUSTER, + serializedTransaction: VERSIONED_SERIALIZED_TRANSACTION, + evmContractConditions: VINCENT_WRAPPED_KEYS_ACC_CONDITIONS, + ciphertext: CIPHERTEXT, + dataToEncryptHash: DATA_TO_ENCRYPT_HASH, + }, + { delegatorPkpEthAddress: TEST_CONFIG.userPkp!.ethAddress! }, + ); + + console.log( + '[should run execute and return a signed versioned transaction]', + util.inspect(executeResult, { depth: 10 }), + ); + + expect(executeResult.success).toBe(true); + expect(executeResult.result).toBeDefined(); + + const signedTransaction = (executeResult.result! as { signedTransaction: string }) + .signedTransaction; + + // Validate it's a base64 encoded string using regex + const base64Regex = /^[A-Za-z0-9+/]+=*$/; + expect(signedTransaction).toMatch(base64Regex); + + await submitAndVerifyTransaction({ + solanaCluster: SOLANA_CLUSTER, + signedTransactionBase64: signedTransaction, + testName: 'should run execute and return a signed versioned transaction', + }); + }); + }); + + describe('Platform User Decryption Testing', () => { + it('should allow the Platform User to decrypt the Wrapped Key', async () => { + const platformUserEthersWallet = new ethers.Wallet( + TEST_AGENT_WALLET_PKP_OWNER_PRIVATE_KEY, + new ethers.providers.JsonRpcProvider(YELLOWSTONE_RPC_URL), + ); + + const { capacityDelegationAuthSig } = await LIT_NODE_CLIENT.createCapacityDelegationAuthSig({ + dAppOwnerWallet: getDelegateeWallet(), + delegateeAddresses: [platformUserEthersWallet.address], + }); + + const delegatorSessionSigs = await getDelegatorSessionSigs({ + litNodeClient: LIT_NODE_CLIENT, + capacityDelegationAuthSig, + ethersSigner: getDelegateeWallet(), + }); + + const { decryptedPrivateKey } = await exportPrivateKey({ + delegatorSessionSigs, + id: 'placeholder', // TODO: Use `id` that was assigned when generating a wrapped key + litNodeClient: LIT_NODE_CLIENT, + jwtToken: 'placeholder', // TODO: create a JWT using the owner PKP's PKPEthers wallet + delegatorAddress: TEST_CONFIG.userPkp!.ethAddress!, + }); + + console.log('decryptedPrivateKey', decryptedPrivateKey); + + expect(decryptedPrivateKey).toBeDefined(); + + // Convert both to Base58 and compare + const expectedBase58 = ethers.utils.base58.encode(TEST_SOLANA_KEYPAIR.secretKey); + const actualBase58 = ethers.utils.base58.encode(decryptedPrivateKey); + + expect(actualBase58).toBe(expectedBase58); + }); + }); +}); diff --git a/packages/apps/abilities-e2e/tsconfig.app.json b/packages/apps/abilities-e2e/tsconfig.app.json index 5fc9736f3..3924d7297 100644 --- a/packages/apps/abilities-e2e/tsconfig.app.json +++ b/packages/apps/abilities-e2e/tsconfig.app.json @@ -27,28 +27,40 @@ ], "references": [ { - "path": "../../libs/contracts-sdk/tsconfig.lib.json" + "path": "../../libs/wrapped-keys/tsconfig.lib.json" }, { - "path": "../ability-uniswap-swap/tsconfig.lib.json" + "path": "../policy-spending-limit/tsconfig.lib.json" }, { - "path": "../../libs/ability-sdk/tsconfig.lib.json" + "path": "../policy-send-counter/tsconfig.lib.json" }, { - "path": "../ability-erc20-approval/tsconfig.lib.json" + "path": "../policy-contract-whitelist/tsconfig.lib.json" }, { - "path": "../policy-spending-limit/tsconfig.lib.json" + "path": "../../libs/contracts-sdk/tsconfig.lib.json" }, { "path": "../../libs/app-sdk/tsconfig.lib.json" }, + { + "path": "../ability-uniswap-swap/tsconfig.lib.json" + }, + { + "path": "../ability-sol-transaction-signer/tsconfig.lib.json" + }, + { + "path": "../../libs/ability-sdk/tsconfig.lib.json" + }, { "path": "../ability-evm-transaction-signer/tsconfig.lib.json" }, { - "path": "../policy-contract-whitelist/tsconfig.lib.json" + "path": "../ability-erc20-transfer/tsconfig.lib.json" + }, + { + "path": "../ability-erc20-approval/tsconfig.lib.json" } ] } diff --git a/packages/apps/abilities-e2e/tsconfig.json b/packages/apps/abilities-e2e/tsconfig.json index 80283646a..8a9f4c2e1 100644 --- a/packages/apps/abilities-e2e/tsconfig.json +++ b/packages/apps/abilities-e2e/tsconfig.json @@ -4,34 +4,40 @@ "include": [], "references": [ { - "path": "../../libs/contracts-sdk" + "path": "../../libs/wrapped-keys" }, { - "path": "../ability-uniswap-swap" + "path": "../policy-spending-limit" }, { - "path": "../../libs/ability-sdk" + "path": "../policy-send-counter" }, { - "path": "../ability-erc20-approval" + "path": "../policy-contract-whitelist" }, { - "path": "../ability-erc20-transfer" + "path": "../../libs/contracts-sdk" }, { - "path": "../ability-evm-transaction-signer" + "path": "../../libs/app-sdk" }, { - "path": "../policy-contract-whitelist" + "path": "../ability-uniswap-swap" }, { - "path": "../policy-spending-limit" + "path": "../ability-sol-transaction-signer" }, { - "path": "../policy-send-counter" + "path": "../../libs/ability-sdk" }, { - "path": "../../libs/app-sdk" + "path": "../ability-evm-transaction-signer" + }, + { + "path": "../ability-erc20-transfer" + }, + { + "path": "../ability-erc20-approval" }, { "path": "./tsconfig.app.json" diff --git a/packages/apps/ability-sol-transaction-signer/src/generated/lit-action.js b/packages/apps/ability-sol-transaction-signer/src/generated/lit-action.js index 03b901886..bf109405f 100644 --- a/packages/apps/ability-sol-transaction-signer/src/generated/lit-action.js +++ b/packages/apps/ability-sol-transaction-signer/src/generated/lit-action.js @@ -2,8 +2,8 @@ * DO NOT EDIT THIS FILE. IT IS GENERATED ON BUILD. * @type {string} */ -const code = ";(()=>{try{const g=globalThis;const D=(g.Deno=g.Deno||{});const B=(D.build=D.build||{});if(B.os==null){B.os=\"linux\";}}catch{}})();\n\"use strict\";\n(() => {\n var __create = Object.create;\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __getProtoOf = Object.getPrototypeOf;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n };\n var __commonJS = (cb, mod3) => function __require() {\n return mod3 || (0, cb[__getOwnPropNames(cb)[0]])((mod3 = { exports: {} }).exports, mod3), mod3.exports;\n };\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from14, except, desc) => {\n if (from14 && typeof from14 === \"object\" || typeof from14 === \"function\") {\n for (let key of __getOwnPropNames(from14))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from14[key], enumerable: !(desc = __getOwnPropDesc(from14, key)) || desc.enumerable });\n }\n return to;\n };\n var __toESM = (mod3, isNodeMode, target) => (target = mod3 != null ? __create(__getProtoOf(mod3)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod3 || !mod3.__esModule ? __defProp(target, \"default\", { value: mod3, enumerable: true }) : target,\n mod3\n ));\n var __toCommonJS = (mod3) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod3);\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/__dirname.js\n var init_dirname = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/__dirname.js\"() {\n \"use strict\";\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js\n var process_exports = {};\n __export(process_exports, {\n _debugEnd: () => _debugEnd,\n _debugProcess: () => _debugProcess,\n _events: () => _events,\n _eventsCount: () => _eventsCount,\n _exiting: () => _exiting,\n _fatalExceptions: () => _fatalExceptions,\n _getActiveHandles: () => _getActiveHandles,\n _getActiveRequests: () => _getActiveRequests,\n _kill: () => _kill,\n _linkedBinding: () => _linkedBinding,\n _maxListeners: () => _maxListeners,\n _preload_modules: () => _preload_modules,\n _rawDebug: () => _rawDebug,\n _startProfilerIdleNotifier: () => _startProfilerIdleNotifier,\n _stopProfilerIdleNotifier: () => _stopProfilerIdleNotifier,\n _tickCallback: () => _tickCallback,\n abort: () => abort,\n addListener: () => addListener,\n allowedNodeEnvironmentFlags: () => allowedNodeEnvironmentFlags,\n arch: () => arch,\n argv: () => argv,\n argv0: () => argv0,\n assert: () => assert,\n binding: () => binding,\n browser: () => browser,\n chdir: () => chdir,\n config: () => config,\n cpuUsage: () => cpuUsage,\n cwd: () => cwd,\n debugPort: () => debugPort,\n default: () => process,\n dlopen: () => dlopen,\n domain: () => domain,\n emit: () => emit,\n emitWarning: () => emitWarning,\n env: () => env,\n execArgv: () => execArgv,\n execPath: () => execPath,\n exit: () => exit,\n features: () => features,\n hasUncaughtExceptionCaptureCallback: () => hasUncaughtExceptionCaptureCallback,\n hrtime: () => hrtime,\n kill: () => kill,\n listeners: () => listeners,\n memoryUsage: () => memoryUsage,\n moduleLoadList: () => moduleLoadList,\n nextTick: () => nextTick,\n off: () => off,\n on: () => on,\n once: () => once,\n openStdin: () => openStdin,\n pid: () => pid,\n platform: () => platform,\n ppid: () => ppid,\n prependListener: () => prependListener,\n prependOnceListener: () => prependOnceListener,\n reallyExit: () => reallyExit,\n release: () => release,\n removeAllListeners: () => removeAllListeners,\n removeListener: () => removeListener,\n resourceUsage: () => resourceUsage,\n setSourceMapsEnabled: () => setSourceMapsEnabled,\n setUncaughtExceptionCaptureCallback: () => setUncaughtExceptionCaptureCallback,\n stderr: () => stderr,\n stdin: () => stdin,\n stdout: () => stdout,\n title: () => title,\n umask: () => umask,\n uptime: () => uptime,\n version: () => version,\n versions: () => versions\n });\n function unimplemented(name) {\n throw new Error(\"Node.js process \" + name + \" is not supported by JSPM core outside of Node.js\");\n }\n function cleanUpNextTick() {\n if (!draining || !currentQueue)\n return;\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length)\n drainQueue();\n }\n function drainQueue() {\n if (draining)\n return;\n var timeout = setTimeout(cleanUpNextTick, 0);\n draining = true;\n var len = queue.length;\n while (len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue)\n currentQueue[queueIndex].run();\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n clearTimeout(timeout);\n }\n function nextTick(fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i3 = 1; i3 < arguments.length; i3++)\n args[i3 - 1] = arguments[i3];\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining)\n setTimeout(drainQueue, 0);\n }\n function Item(fun, array) {\n this.fun = fun;\n this.array = array;\n }\n function noop() {\n }\n function _linkedBinding(name) {\n unimplemented(\"_linkedBinding\");\n }\n function dlopen(name) {\n unimplemented(\"dlopen\");\n }\n function _getActiveRequests() {\n return [];\n }\n function _getActiveHandles() {\n return [];\n }\n function assert(condition, message) {\n if (!condition)\n throw new Error(message || \"assertion error\");\n }\n function hasUncaughtExceptionCaptureCallback() {\n return false;\n }\n function uptime() {\n return _performance.now() / 1e3;\n }\n function hrtime(previousTimestamp) {\n var baseNow = Math.floor((Date.now() - _performance.now()) * 1e-3);\n var clocktime = _performance.now() * 1e-3;\n var seconds = Math.floor(clocktime) + baseNow;\n var nanoseconds = Math.floor(clocktime % 1 * 1e9);\n if (previousTimestamp) {\n seconds = seconds - previousTimestamp[0];\n nanoseconds = nanoseconds - previousTimestamp[1];\n if (nanoseconds < 0) {\n seconds--;\n nanoseconds += nanoPerSec;\n }\n }\n return [seconds, nanoseconds];\n }\n function on() {\n return process;\n }\n function listeners(name) {\n return [];\n }\n var queue, draining, currentQueue, queueIndex, title, arch, platform, env, argv, execArgv, version, versions, emitWarning, binding, umask, cwd, chdir, release, browser, _rawDebug, moduleLoadList, domain, _exiting, config, reallyExit, _kill, cpuUsage, resourceUsage, memoryUsage, kill, exit, openStdin, allowedNodeEnvironmentFlags, features, _fatalExceptions, setUncaughtExceptionCaptureCallback, _tickCallback, _debugProcess, _debugEnd, _startProfilerIdleNotifier, _stopProfilerIdleNotifier, stdout, stderr, stdin, abort, pid, ppid, execPath, debugPort, argv0, _preload_modules, setSourceMapsEnabled, _performance, nowOffset, nanoPerSec, _maxListeners, _events, _eventsCount, addListener, once, off, removeListener, removeAllListeners, emit, prependListener, prependOnceListener, process;\n var init_process = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n queue = [];\n draining = false;\n queueIndex = -1;\n Item.prototype.run = function() {\n this.fun.apply(null, this.array);\n };\n title = \"browser\";\n arch = \"x64\";\n platform = \"browser\";\n env = {\n PATH: \"/usr/bin\",\n LANG: typeof navigator !== \"undefined\" ? navigator.language + \".UTF-8\" : void 0,\n PWD: \"/\",\n HOME: \"/home\",\n TMP: \"/tmp\"\n };\n argv = [\"/usr/bin/node\"];\n execArgv = [];\n version = \"v16.8.0\";\n versions = {};\n emitWarning = function(message, type) {\n console.warn((type ? type + \": \" : \"\") + message);\n };\n binding = function(name) {\n unimplemented(\"binding\");\n };\n umask = function(mask) {\n return 0;\n };\n cwd = function() {\n return \"/\";\n };\n chdir = function(dir) {\n };\n release = {\n name: \"node\",\n sourceUrl: \"\",\n headersUrl: \"\",\n libUrl: \"\"\n };\n browser = true;\n _rawDebug = noop;\n moduleLoadList = [];\n domain = {};\n _exiting = false;\n config = {};\n reallyExit = noop;\n _kill = noop;\n cpuUsage = function() {\n return {};\n };\n resourceUsage = cpuUsage;\n memoryUsage = cpuUsage;\n kill = noop;\n exit = noop;\n openStdin = noop;\n allowedNodeEnvironmentFlags = {};\n features = {\n inspector: false,\n debug: false,\n uv: false,\n ipv6: false,\n tls_alpn: false,\n tls_sni: false,\n tls_ocsp: false,\n tls: false,\n cached_builtins: true\n };\n _fatalExceptions = noop;\n setUncaughtExceptionCaptureCallback = noop;\n _tickCallback = noop;\n _debugProcess = noop;\n _debugEnd = noop;\n _startProfilerIdleNotifier = noop;\n _stopProfilerIdleNotifier = noop;\n stdout = void 0;\n stderr = void 0;\n stdin = void 0;\n abort = noop;\n pid = 2;\n ppid = 1;\n execPath = \"/bin/usr/node\";\n debugPort = 9229;\n argv0 = \"node\";\n _preload_modules = [];\n setSourceMapsEnabled = noop;\n _performance = {\n now: typeof performance !== \"undefined\" ? performance.now.bind(performance) : void 0,\n timing: typeof performance !== \"undefined\" ? performance.timing : void 0\n };\n if (_performance.now === void 0) {\n nowOffset = Date.now();\n if (_performance.timing && _performance.timing.navigationStart) {\n nowOffset = _performance.timing.navigationStart;\n }\n _performance.now = () => Date.now() - nowOffset;\n }\n nanoPerSec = 1e9;\n hrtime.bigint = function(time) {\n var diff = hrtime(time);\n if (typeof BigInt === \"undefined\") {\n return diff[0] * nanoPerSec + diff[1];\n }\n return BigInt(diff[0] * nanoPerSec) + BigInt(diff[1]);\n };\n _maxListeners = 10;\n _events = {};\n _eventsCount = 0;\n addListener = on;\n once = on;\n off = on;\n removeListener = on;\n removeAllListeners = on;\n emit = noop;\n prependListener = on;\n prependOnceListener = on;\n process = {\n version,\n versions,\n arch,\n platform,\n browser,\n release,\n _rawDebug,\n moduleLoadList,\n binding,\n _linkedBinding,\n _events,\n _eventsCount,\n _maxListeners,\n on,\n addListener,\n once,\n off,\n removeListener,\n removeAllListeners,\n emit,\n prependListener,\n prependOnceListener,\n listeners,\n domain,\n _exiting,\n config,\n dlopen,\n uptime,\n _getActiveRequests,\n _getActiveHandles,\n reallyExit,\n _kill,\n cpuUsage,\n resourceUsage,\n memoryUsage,\n kill,\n exit,\n openStdin,\n allowedNodeEnvironmentFlags,\n assert,\n features,\n _fatalExceptions,\n setUncaughtExceptionCaptureCallback,\n hasUncaughtExceptionCaptureCallback,\n emitWarning,\n nextTick,\n _tickCallback,\n _debugProcess,\n _debugEnd,\n _startProfilerIdleNotifier,\n _stopProfilerIdleNotifier,\n stdout,\n stdin,\n stderr,\n abort,\n umask,\n chdir,\n cwd,\n env,\n title,\n argv,\n execArgv,\n pid,\n ppid,\n execPath,\n debugPort,\n hrtime,\n argv0,\n _preload_modules,\n setSourceMapsEnabled\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/process.js\n var init_process2 = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/process.js\"() {\n \"use strict\";\n init_process();\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js\n function dew$2() {\n if (_dewExec$2)\n return exports$2;\n _dewExec$2 = true;\n exports$2.byteLength = byteLength;\n exports$2.toByteArray = toByteArray;\n exports$2.fromByteArray = fromByteArray;\n var lookup = [];\n var revLookup = [];\n var Arr = typeof Uint8Array !== \"undefined\" ? Uint8Array : Array;\n var code = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n for (var i3 = 0, len = code.length; i3 < len; ++i3) {\n lookup[i3] = code[i3];\n revLookup[code.charCodeAt(i3)] = i3;\n }\n revLookup[\"-\".charCodeAt(0)] = 62;\n revLookup[\"_\".charCodeAt(0)] = 63;\n function getLens(b64) {\n var len2 = b64.length;\n if (len2 % 4 > 0) {\n throw new Error(\"Invalid string. Length must be a multiple of 4\");\n }\n var validLen = b64.indexOf(\"=\");\n if (validLen === -1)\n validLen = len2;\n var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;\n return [validLen, placeHoldersLen];\n }\n function byteLength(b64) {\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n }\n function _byteLength(b64, validLen, placeHoldersLen) {\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n }\n function toByteArray(b64) {\n var tmp;\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n var curByte = 0;\n var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;\n var i4;\n for (i4 = 0; i4 < len2; i4 += 4) {\n tmp = revLookup[b64.charCodeAt(i4)] << 18 | revLookup[b64.charCodeAt(i4 + 1)] << 12 | revLookup[b64.charCodeAt(i4 + 2)] << 6 | revLookup[b64.charCodeAt(i4 + 3)];\n arr[curByte++] = tmp >> 16 & 255;\n arr[curByte++] = tmp >> 8 & 255;\n arr[curByte++] = tmp & 255;\n }\n if (placeHoldersLen === 2) {\n tmp = revLookup[b64.charCodeAt(i4)] << 2 | revLookup[b64.charCodeAt(i4 + 1)] >> 4;\n arr[curByte++] = tmp & 255;\n }\n if (placeHoldersLen === 1) {\n tmp = revLookup[b64.charCodeAt(i4)] << 10 | revLookup[b64.charCodeAt(i4 + 1)] << 4 | revLookup[b64.charCodeAt(i4 + 2)] >> 2;\n arr[curByte++] = tmp >> 8 & 255;\n arr[curByte++] = tmp & 255;\n }\n return arr;\n }\n function tripletToBase64(num2) {\n return lookup[num2 >> 18 & 63] + lookup[num2 >> 12 & 63] + lookup[num2 >> 6 & 63] + lookup[num2 & 63];\n }\n function encodeChunk(uint8, start, end) {\n var tmp;\n var output = [];\n for (var i4 = start; i4 < end; i4 += 3) {\n tmp = (uint8[i4] << 16 & 16711680) + (uint8[i4 + 1] << 8 & 65280) + (uint8[i4 + 2] & 255);\n output.push(tripletToBase64(tmp));\n }\n return output.join(\"\");\n }\n function fromByteArray(uint8) {\n var tmp;\n var len2 = uint8.length;\n var extraBytes = len2 % 3;\n var parts = [];\n var maxChunkLength = 16383;\n for (var i4 = 0, len22 = len2 - extraBytes; i4 < len22; i4 += maxChunkLength) {\n parts.push(encodeChunk(uint8, i4, i4 + maxChunkLength > len22 ? len22 : i4 + maxChunkLength));\n }\n if (extraBytes === 1) {\n tmp = uint8[len2 - 1];\n parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 63] + \"==\");\n } else if (extraBytes === 2) {\n tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];\n parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + \"=\");\n }\n return parts.join(\"\");\n }\n return exports$2;\n }\n function dew$1() {\n if (_dewExec$1)\n return exports$1;\n _dewExec$1 = true;\n exports$1.read = function(buffer2, offset, isLE2, mLen, nBytes) {\n var e2, m2;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i3 = isLE2 ? nBytes - 1 : 0;\n var d5 = isLE2 ? -1 : 1;\n var s4 = buffer2[offset + i3];\n i3 += d5;\n e2 = s4 & (1 << -nBits) - 1;\n s4 >>= -nBits;\n nBits += eLen;\n for (; nBits > 0; e2 = e2 * 256 + buffer2[offset + i3], i3 += d5, nBits -= 8) {\n }\n m2 = e2 & (1 << -nBits) - 1;\n e2 >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m2 = m2 * 256 + buffer2[offset + i3], i3 += d5, nBits -= 8) {\n }\n if (e2 === 0) {\n e2 = 1 - eBias;\n } else if (e2 === eMax) {\n return m2 ? NaN : (s4 ? -1 : 1) * Infinity;\n } else {\n m2 = m2 + Math.pow(2, mLen);\n e2 = e2 - eBias;\n }\n return (s4 ? -1 : 1) * m2 * Math.pow(2, e2 - mLen);\n };\n exports$1.write = function(buffer2, value, offset, isLE2, mLen, nBytes) {\n var e2, m2, c4;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;\n var i3 = isLE2 ? 0 : nBytes - 1;\n var d5 = isLE2 ? 1 : -1;\n var s4 = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n value = Math.abs(value);\n if (isNaN(value) || value === Infinity) {\n m2 = isNaN(value) ? 1 : 0;\n e2 = eMax;\n } else {\n e2 = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c4 = Math.pow(2, -e2)) < 1) {\n e2--;\n c4 *= 2;\n }\n if (e2 + eBias >= 1) {\n value += rt / c4;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c4 >= 2) {\n e2++;\n c4 /= 2;\n }\n if (e2 + eBias >= eMax) {\n m2 = 0;\n e2 = eMax;\n } else if (e2 + eBias >= 1) {\n m2 = (value * c4 - 1) * Math.pow(2, mLen);\n e2 = e2 + eBias;\n } else {\n m2 = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e2 = 0;\n }\n }\n for (; mLen >= 8; buffer2[offset + i3] = m2 & 255, i3 += d5, m2 /= 256, mLen -= 8) {\n }\n e2 = e2 << mLen | m2;\n eLen += mLen;\n for (; eLen > 0; buffer2[offset + i3] = e2 & 255, i3 += d5, e2 /= 256, eLen -= 8) {\n }\n buffer2[offset + i3 - d5] |= s4 * 128;\n };\n return exports$1;\n }\n function dew() {\n if (_dewExec)\n return exports;\n _dewExec = true;\n const base64 = dew$2();\n const ieee754 = dew$1();\n const customInspectSymbol = typeof Symbol === \"function\" && typeof Symbol[\"for\"] === \"function\" ? Symbol[\"for\"](\"nodejs.util.inspect.custom\") : null;\n exports.Buffer = Buffer3;\n exports.SlowBuffer = SlowBuffer;\n exports.INSPECT_MAX_BYTES = 50;\n const K_MAX_LENGTH = 2147483647;\n exports.kMaxLength = K_MAX_LENGTH;\n Buffer3.TYPED_ARRAY_SUPPORT = typedArraySupport();\n if (!Buffer3.TYPED_ARRAY_SUPPORT && typeof console !== \"undefined\" && typeof console.error === \"function\") {\n console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");\n }\n function typedArraySupport() {\n try {\n const arr = new Uint8Array(1);\n const proto = {\n foo: function() {\n return 42;\n }\n };\n Object.setPrototypeOf(proto, Uint8Array.prototype);\n Object.setPrototypeOf(arr, proto);\n return arr.foo() === 42;\n } catch (e2) {\n return false;\n }\n }\n Object.defineProperty(Buffer3.prototype, \"parent\", {\n enumerable: true,\n get: function() {\n if (!Buffer3.isBuffer(this))\n return void 0;\n return this.buffer;\n }\n });\n Object.defineProperty(Buffer3.prototype, \"offset\", {\n enumerable: true,\n get: function() {\n if (!Buffer3.isBuffer(this))\n return void 0;\n return this.byteOffset;\n }\n });\n function createBuffer(length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"');\n }\n const buf = new Uint8Array(length);\n Object.setPrototypeOf(buf, Buffer3.prototype);\n return buf;\n }\n function Buffer3(arg, encodingOrOffset, length) {\n if (typeof arg === \"number\") {\n if (typeof encodingOrOffset === \"string\") {\n throw new TypeError('The \"string\" argument must be of type string. Received type number');\n }\n return allocUnsafe(arg);\n }\n return from14(arg, encodingOrOffset, length);\n }\n Buffer3.poolSize = 8192;\n function from14(value, encodingOrOffset, length) {\n if (typeof value === \"string\") {\n return fromString5(value, encodingOrOffset);\n }\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value);\n }\n if (value == null) {\n throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n }\n if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {\n return fromArrayBuffer(value, encodingOrOffset, length);\n }\n if (typeof SharedArrayBuffer !== \"undefined\" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length);\n }\n if (typeof value === \"number\") {\n throw new TypeError('The \"value\" argument must not be of type number. Received type number');\n }\n const valueOf = value.valueOf && value.valueOf();\n if (valueOf != null && valueOf !== value) {\n return Buffer3.from(valueOf, encodingOrOffset, length);\n }\n const b4 = fromObject(value);\n if (b4)\n return b4;\n if (typeof Symbol !== \"undefined\" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === \"function\") {\n return Buffer3.from(value[Symbol.toPrimitive](\"string\"), encodingOrOffset, length);\n }\n throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n }\n Buffer3.from = function(value, encodingOrOffset, length) {\n return from14(value, encodingOrOffset, length);\n };\n Object.setPrototypeOf(Buffer3.prototype, Uint8Array.prototype);\n Object.setPrototypeOf(Buffer3, Uint8Array);\n function assertSize6(size6) {\n if (typeof size6 !== \"number\") {\n throw new TypeError('\"size\" argument must be of type number');\n } else if (size6 < 0) {\n throw new RangeError('The value \"' + size6 + '\" is invalid for option \"size\"');\n }\n }\n function alloc(size6, fill, encoding) {\n assertSize6(size6);\n if (size6 <= 0) {\n return createBuffer(size6);\n }\n if (fill !== void 0) {\n return typeof encoding === \"string\" ? createBuffer(size6).fill(fill, encoding) : createBuffer(size6).fill(fill);\n }\n return createBuffer(size6);\n }\n Buffer3.alloc = function(size6, fill, encoding) {\n return alloc(size6, fill, encoding);\n };\n function allocUnsafe(size6) {\n assertSize6(size6);\n return createBuffer(size6 < 0 ? 0 : checked(size6) | 0);\n }\n Buffer3.allocUnsafe = function(size6) {\n return allocUnsafe(size6);\n };\n Buffer3.allocUnsafeSlow = function(size6) {\n return allocUnsafe(size6);\n };\n function fromString5(string, encoding) {\n if (typeof encoding !== \"string\" || encoding === \"\") {\n encoding = \"utf8\";\n }\n if (!Buffer3.isEncoding(encoding)) {\n throw new TypeError(\"Unknown encoding: \" + encoding);\n }\n const length = byteLength(string, encoding) | 0;\n let buf = createBuffer(length);\n const actual = buf.write(string, encoding);\n if (actual !== length) {\n buf = buf.slice(0, actual);\n }\n return buf;\n }\n function fromArrayLike(array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0;\n const buf = createBuffer(length);\n for (let i3 = 0; i3 < length; i3 += 1) {\n buf[i3] = array[i3] & 255;\n }\n return buf;\n }\n function fromArrayView(arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView);\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);\n }\n return fromArrayLike(arrayView);\n }\n function fromArrayBuffer(array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds');\n }\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds');\n }\n let buf;\n if (byteOffset === void 0 && length === void 0) {\n buf = new Uint8Array(array);\n } else if (length === void 0) {\n buf = new Uint8Array(array, byteOffset);\n } else {\n buf = new Uint8Array(array, byteOffset, length);\n }\n Object.setPrototypeOf(buf, Buffer3.prototype);\n return buf;\n }\n function fromObject(obj) {\n if (Buffer3.isBuffer(obj)) {\n const len = checked(obj.length) | 0;\n const buf = createBuffer(len);\n if (buf.length === 0) {\n return buf;\n }\n obj.copy(buf, 0, 0, len);\n return buf;\n }\n if (obj.length !== void 0) {\n if (typeof obj.length !== \"number\" || numberIsNaN(obj.length)) {\n return createBuffer(0);\n }\n return fromArrayLike(obj);\n }\n if (obj.type === \"Buffer\" && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data);\n }\n }\n function checked(length) {\n if (length >= K_MAX_LENGTH) {\n throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\" + K_MAX_LENGTH.toString(16) + \" bytes\");\n }\n return length | 0;\n }\n function SlowBuffer(length) {\n if (+length != length) {\n length = 0;\n }\n return Buffer3.alloc(+length);\n }\n Buffer3.isBuffer = function isBuffer(b4) {\n return b4 != null && b4._isBuffer === true && b4 !== Buffer3.prototype;\n };\n Buffer3.compare = function compare(a3, b4) {\n if (isInstance(a3, Uint8Array))\n a3 = Buffer3.from(a3, a3.offset, a3.byteLength);\n if (isInstance(b4, Uint8Array))\n b4 = Buffer3.from(b4, b4.offset, b4.byteLength);\n if (!Buffer3.isBuffer(a3) || !Buffer3.isBuffer(b4)) {\n throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');\n }\n if (a3 === b4)\n return 0;\n let x4 = a3.length;\n let y6 = b4.length;\n for (let i3 = 0, len = Math.min(x4, y6); i3 < len; ++i3) {\n if (a3[i3] !== b4[i3]) {\n x4 = a3[i3];\n y6 = b4[i3];\n break;\n }\n }\n if (x4 < y6)\n return -1;\n if (y6 < x4)\n return 1;\n return 0;\n };\n Buffer3.isEncoding = function isEncoding(encoding) {\n switch (String(encoding).toLowerCase()) {\n case \"hex\":\n case \"utf8\":\n case \"utf-8\":\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n case \"base64\":\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return true;\n default:\n return false;\n }\n };\n Buffer3.concat = function concat5(list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n if (list.length === 0) {\n return Buffer3.alloc(0);\n }\n let i3;\n if (length === void 0) {\n length = 0;\n for (i3 = 0; i3 < list.length; ++i3) {\n length += list[i3].length;\n }\n }\n const buffer2 = Buffer3.allocUnsafe(length);\n let pos = 0;\n for (i3 = 0; i3 < list.length; ++i3) {\n let buf = list[i3];\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer2.length) {\n if (!Buffer3.isBuffer(buf))\n buf = Buffer3.from(buf);\n buf.copy(buffer2, pos);\n } else {\n Uint8Array.prototype.set.call(buffer2, buf, pos);\n }\n } else if (!Buffer3.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n } else {\n buf.copy(buffer2, pos);\n }\n pos += buf.length;\n }\n return buffer2;\n };\n function byteLength(string, encoding) {\n if (Buffer3.isBuffer(string)) {\n return string.length;\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength;\n }\n if (typeof string !== \"string\") {\n throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string);\n }\n const len = string.length;\n const mustMatch = arguments.length > 2 && arguments[2] === true;\n if (!mustMatch && len === 0)\n return 0;\n let loweredCase = false;\n for (; ; ) {\n switch (encoding) {\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return len;\n case \"utf8\":\n case \"utf-8\":\n return utf8ToBytes5(string).length;\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return len * 2;\n case \"hex\":\n return len >>> 1;\n case \"base64\":\n return base64ToBytes(string).length;\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes5(string).length;\n }\n encoding = (\"\" + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer3.byteLength = byteLength;\n function slowToString(encoding, start, end) {\n let loweredCase = false;\n if (start === void 0 || start < 0) {\n start = 0;\n }\n if (start > this.length) {\n return \"\";\n }\n if (end === void 0 || end > this.length) {\n end = this.length;\n }\n if (end <= 0) {\n return \"\";\n }\n end >>>= 0;\n start >>>= 0;\n if (end <= start) {\n return \"\";\n }\n if (!encoding)\n encoding = \"utf8\";\n while (true) {\n switch (encoding) {\n case \"hex\":\n return hexSlice(this, start, end);\n case \"utf8\":\n case \"utf-8\":\n return utf8Slice(this, start, end);\n case \"ascii\":\n return asciiSlice(this, start, end);\n case \"latin1\":\n case \"binary\":\n return latin1Slice(this, start, end);\n case \"base64\":\n return base64Slice(this, start, end);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return utf16leSlice(this, start, end);\n default:\n if (loweredCase)\n throw new TypeError(\"Unknown encoding: \" + encoding);\n encoding = (encoding + \"\").toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer3.prototype._isBuffer = true;\n function swap(b4, n2, m2) {\n const i3 = b4[n2];\n b4[n2] = b4[m2];\n b4[m2] = i3;\n }\n Buffer3.prototype.swap16 = function swap16() {\n const len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 16-bits\");\n }\n for (let i3 = 0; i3 < len; i3 += 2) {\n swap(this, i3, i3 + 1);\n }\n return this;\n };\n Buffer3.prototype.swap32 = function swap32() {\n const len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 32-bits\");\n }\n for (let i3 = 0; i3 < len; i3 += 4) {\n swap(this, i3, i3 + 3);\n swap(this, i3 + 1, i3 + 2);\n }\n return this;\n };\n Buffer3.prototype.swap64 = function swap64() {\n const len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 64-bits\");\n }\n for (let i3 = 0; i3 < len; i3 += 8) {\n swap(this, i3, i3 + 7);\n swap(this, i3 + 1, i3 + 6);\n swap(this, i3 + 2, i3 + 5);\n swap(this, i3 + 3, i3 + 4);\n }\n return this;\n };\n Buffer3.prototype.toString = function toString2() {\n const length = this.length;\n if (length === 0)\n return \"\";\n if (arguments.length === 0)\n return utf8Slice(this, 0, length);\n return slowToString.apply(this, arguments);\n };\n Buffer3.prototype.toLocaleString = Buffer3.prototype.toString;\n Buffer3.prototype.equals = function equals(b4) {\n if (!Buffer3.isBuffer(b4))\n throw new TypeError(\"Argument must be a Buffer\");\n if (this === b4)\n return true;\n return Buffer3.compare(this, b4) === 0;\n };\n Buffer3.prototype.inspect = function inspect() {\n let str = \"\";\n const max = exports.INSPECT_MAX_BYTES;\n str = this.toString(\"hex\", 0, max).replace(/(.{2})/g, \"$1 \").trim();\n if (this.length > max)\n str += \" ... \";\n return \"\";\n };\n if (customInspectSymbol) {\n Buffer3.prototype[customInspectSymbol] = Buffer3.prototype.inspect;\n }\n Buffer3.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer3.from(target, target.offset, target.byteLength);\n }\n if (!Buffer3.isBuffer(target)) {\n throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target);\n }\n if (start === void 0) {\n start = 0;\n }\n if (end === void 0) {\n end = target ? target.length : 0;\n }\n if (thisStart === void 0) {\n thisStart = 0;\n }\n if (thisEnd === void 0) {\n thisEnd = this.length;\n }\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError(\"out of range index\");\n }\n if (thisStart >= thisEnd && start >= end) {\n return 0;\n }\n if (thisStart >= thisEnd) {\n return -1;\n }\n if (start >= end) {\n return 1;\n }\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n if (this === target)\n return 0;\n let x4 = thisEnd - thisStart;\n let y6 = end - start;\n const len = Math.min(x4, y6);\n const thisCopy = this.slice(thisStart, thisEnd);\n const targetCopy = target.slice(start, end);\n for (let i3 = 0; i3 < len; ++i3) {\n if (thisCopy[i3] !== targetCopy[i3]) {\n x4 = thisCopy[i3];\n y6 = targetCopy[i3];\n break;\n }\n }\n if (x4 < y6)\n return -1;\n if (y6 < x4)\n return 1;\n return 0;\n };\n function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {\n if (buffer2.length === 0)\n return -1;\n if (typeof byteOffset === \"string\") {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 2147483647) {\n byteOffset = 2147483647;\n } else if (byteOffset < -2147483648) {\n byteOffset = -2147483648;\n }\n byteOffset = +byteOffset;\n if (numberIsNaN(byteOffset)) {\n byteOffset = dir ? 0 : buffer2.length - 1;\n }\n if (byteOffset < 0)\n byteOffset = buffer2.length + byteOffset;\n if (byteOffset >= buffer2.length) {\n if (dir)\n return -1;\n else\n byteOffset = buffer2.length - 1;\n } else if (byteOffset < 0) {\n if (dir)\n byteOffset = 0;\n else\n return -1;\n }\n if (typeof val === \"string\") {\n val = Buffer3.from(val, encoding);\n }\n if (Buffer3.isBuffer(val)) {\n if (val.length === 0) {\n return -1;\n }\n return arrayIndexOf(buffer2, val, byteOffset, encoding, dir);\n } else if (typeof val === \"number\") {\n val = val & 255;\n if (typeof Uint8Array.prototype.indexOf === \"function\") {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer2, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer2, val, byteOffset);\n }\n }\n return arrayIndexOf(buffer2, [val], byteOffset, encoding, dir);\n }\n throw new TypeError(\"val must be string, number or Buffer\");\n }\n function arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n let indexSize = 1;\n let arrLength = arr.length;\n let valLength = val.length;\n if (encoding !== void 0) {\n encoding = String(encoding).toLowerCase();\n if (encoding === \"ucs2\" || encoding === \"ucs-2\" || encoding === \"utf16le\" || encoding === \"utf-16le\") {\n if (arr.length < 2 || val.length < 2) {\n return -1;\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n function read(buf, i4) {\n if (indexSize === 1) {\n return buf[i4];\n } else {\n return buf.readUInt16BE(i4 * indexSize);\n }\n }\n let i3;\n if (dir) {\n let foundIndex = -1;\n for (i3 = byteOffset; i3 < arrLength; i3++) {\n if (read(arr, i3) === read(val, foundIndex === -1 ? 0 : i3 - foundIndex)) {\n if (foundIndex === -1)\n foundIndex = i3;\n if (i3 - foundIndex + 1 === valLength)\n return foundIndex * indexSize;\n } else {\n if (foundIndex !== -1)\n i3 -= i3 - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength)\n byteOffset = arrLength - valLength;\n for (i3 = byteOffset; i3 >= 0; i3--) {\n let found = true;\n for (let j2 = 0; j2 < valLength; j2++) {\n if (read(arr, i3 + j2) !== read(val, j2)) {\n found = false;\n break;\n }\n }\n if (found)\n return i3;\n }\n }\n return -1;\n }\n Buffer3.prototype.includes = function includes(val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1;\n };\n Buffer3.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n };\n Buffer3.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n };\n function hexWrite(buf, string, offset, length) {\n offset = Number(offset) || 0;\n const remaining = buf.length - offset;\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n if (length > remaining) {\n length = remaining;\n }\n }\n const strLen = string.length;\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n let i3;\n for (i3 = 0; i3 < length; ++i3) {\n const parsed = parseInt(string.substr(i3 * 2, 2), 16);\n if (numberIsNaN(parsed))\n return i3;\n buf[offset + i3] = parsed;\n }\n return i3;\n }\n function utf8Write(buf, string, offset, length) {\n return blitBuffer(utf8ToBytes5(string, buf.length - offset), buf, offset, length);\n }\n function asciiWrite(buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length);\n }\n function base64Write(buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length);\n }\n function ucs2Write(buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);\n }\n Buffer3.prototype.write = function write(string, offset, length, encoding) {\n if (offset === void 0) {\n encoding = \"utf8\";\n length = this.length;\n offset = 0;\n } else if (length === void 0 && typeof offset === \"string\") {\n encoding = offset;\n length = this.length;\n offset = 0;\n } else if (isFinite(offset)) {\n offset = offset >>> 0;\n if (isFinite(length)) {\n length = length >>> 0;\n if (encoding === void 0)\n encoding = \"utf8\";\n } else {\n encoding = length;\n length = void 0;\n }\n } else {\n throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");\n }\n const remaining = this.length - offset;\n if (length === void 0 || length > remaining)\n length = remaining;\n if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {\n throw new RangeError(\"Attempt to write outside buffer bounds\");\n }\n if (!encoding)\n encoding = \"utf8\";\n let loweredCase = false;\n for (; ; ) {\n switch (encoding) {\n case \"hex\":\n return hexWrite(this, string, offset, length);\n case \"utf8\":\n case \"utf-8\":\n return utf8Write(this, string, offset, length);\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return asciiWrite(this, string, offset, length);\n case \"base64\":\n return base64Write(this, string, offset, length);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return ucs2Write(this, string, offset, length);\n default:\n if (loweredCase)\n throw new TypeError(\"Unknown encoding: \" + encoding);\n encoding = (\"\" + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n };\n Buffer3.prototype.toJSON = function toJSON() {\n return {\n type: \"Buffer\",\n data: Array.prototype.slice.call(this._arr || this, 0)\n };\n };\n function base64Slice(buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf);\n } else {\n return base64.fromByteArray(buf.slice(start, end));\n }\n }\n function utf8Slice(buf, start, end) {\n end = Math.min(buf.length, end);\n const res = [];\n let i3 = start;\n while (i3 < end) {\n const firstByte = buf[i3];\n let codePoint = null;\n let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;\n if (i3 + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint;\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 128) {\n codePoint = firstByte;\n }\n break;\n case 2:\n secondByte = buf[i3 + 1];\n if ((secondByte & 192) === 128) {\n tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;\n if (tempCodePoint > 127) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 3:\n secondByte = buf[i3 + 1];\n thirdByte = buf[i3 + 2];\n if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {\n tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;\n if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 4:\n secondByte = buf[i3 + 1];\n thirdByte = buf[i3 + 2];\n fourthByte = buf[i3 + 3];\n if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {\n tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;\n if (tempCodePoint > 65535 && tempCodePoint < 1114112) {\n codePoint = tempCodePoint;\n }\n }\n }\n }\n if (codePoint === null) {\n codePoint = 65533;\n bytesPerSequence = 1;\n } else if (codePoint > 65535) {\n codePoint -= 65536;\n res.push(codePoint >>> 10 & 1023 | 55296);\n codePoint = 56320 | codePoint & 1023;\n }\n res.push(codePoint);\n i3 += bytesPerSequence;\n }\n return decodeCodePointsArray(res);\n }\n const MAX_ARGUMENTS_LENGTH = 4096;\n function decodeCodePointsArray(codePoints) {\n const len = codePoints.length;\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints);\n }\n let res = \"\";\n let i3 = 0;\n while (i3 < len) {\n res += String.fromCharCode.apply(String, codePoints.slice(i3, i3 += MAX_ARGUMENTS_LENGTH));\n }\n return res;\n }\n function asciiSlice(buf, start, end) {\n let ret = \"\";\n end = Math.min(buf.length, end);\n for (let i3 = start; i3 < end; ++i3) {\n ret += String.fromCharCode(buf[i3] & 127);\n }\n return ret;\n }\n function latin1Slice(buf, start, end) {\n let ret = \"\";\n end = Math.min(buf.length, end);\n for (let i3 = start; i3 < end; ++i3) {\n ret += String.fromCharCode(buf[i3]);\n }\n return ret;\n }\n function hexSlice(buf, start, end) {\n const len = buf.length;\n if (!start || start < 0)\n start = 0;\n if (!end || end < 0 || end > len)\n end = len;\n let out = \"\";\n for (let i3 = start; i3 < end; ++i3) {\n out += hexSliceLookupTable[buf[i3]];\n }\n return out;\n }\n function utf16leSlice(buf, start, end) {\n const bytes = buf.slice(start, end);\n let res = \"\";\n for (let i3 = 0; i3 < bytes.length - 1; i3 += 2) {\n res += String.fromCharCode(bytes[i3] + bytes[i3 + 1] * 256);\n }\n return res;\n }\n Buffer3.prototype.slice = function slice4(start, end) {\n const len = this.length;\n start = ~~start;\n end = end === void 0 ? len : ~~end;\n if (start < 0) {\n start += len;\n if (start < 0)\n start = 0;\n } else if (start > len) {\n start = len;\n }\n if (end < 0) {\n end += len;\n if (end < 0)\n end = 0;\n } else if (end > len) {\n end = len;\n }\n if (end < start)\n end = start;\n const newBuf = this.subarray(start, end);\n Object.setPrototypeOf(newBuf, Buffer3.prototype);\n return newBuf;\n };\n function checkOffset(offset, ext, length) {\n if (offset % 1 !== 0 || offset < 0)\n throw new RangeError(\"offset is not uint\");\n if (offset + ext > length)\n throw new RangeError(\"Trying to access beyond buffer length\");\n }\n Buffer3.prototype.readUintLE = Buffer3.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset, byteLength2, this.length);\n let val = this[offset];\n let mul = 1;\n let i3 = 0;\n while (++i3 < byteLength2 && (mul *= 256)) {\n val += this[offset + i3] * mul;\n }\n return val;\n };\n Buffer3.prototype.readUintBE = Buffer3.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n checkOffset(offset, byteLength2, this.length);\n }\n let val = this[offset + --byteLength2];\n let mul = 1;\n while (byteLength2 > 0 && (mul *= 256)) {\n val += this[offset + --byteLength2] * mul;\n }\n return val;\n };\n Buffer3.prototype.readUint8 = Buffer3.prototype.readUInt8 = function readUInt8(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 1, this.length);\n return this[offset];\n };\n Buffer3.prototype.readUint16LE = Buffer3.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n return this[offset] | this[offset + 1] << 8;\n };\n Buffer3.prototype.readUint16BE = Buffer3.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n return this[offset] << 8 | this[offset + 1];\n };\n Buffer3.prototype.readUint32LE = Buffer3.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;\n };\n Buffer3.prototype.readUint32BE = Buffer3.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);\n };\n Buffer3.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) {\n offset = offset >>> 0;\n validateNumber(offset, \"offset\");\n const first = this[offset];\n const last = this[offset + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset, this.length - 8);\n }\n const lo = first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24;\n const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24;\n return BigInt(lo) + (BigInt(hi) << BigInt(32));\n });\n Buffer3.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) {\n offset = offset >>> 0;\n validateNumber(offset, \"offset\");\n const first = this[offset];\n const last = this[offset + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset, this.length - 8);\n }\n const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];\n const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last;\n return (BigInt(hi) << BigInt(32)) + BigInt(lo);\n });\n Buffer3.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset, byteLength2, this.length);\n let val = this[offset];\n let mul = 1;\n let i3 = 0;\n while (++i3 < byteLength2 && (mul *= 256)) {\n val += this[offset + i3] * mul;\n }\n mul *= 128;\n if (val >= mul)\n val -= Math.pow(2, 8 * byteLength2);\n return val;\n };\n Buffer3.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset, byteLength2, this.length);\n let i3 = byteLength2;\n let mul = 1;\n let val = this[offset + --i3];\n while (i3 > 0 && (mul *= 256)) {\n val += this[offset + --i3] * mul;\n }\n mul *= 128;\n if (val >= mul)\n val -= Math.pow(2, 8 * byteLength2);\n return val;\n };\n Buffer3.prototype.readInt8 = function readInt8(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 1, this.length);\n if (!(this[offset] & 128))\n return this[offset];\n return (255 - this[offset] + 1) * -1;\n };\n Buffer3.prototype.readInt16LE = function readInt16LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n const val = this[offset] | this[offset + 1] << 8;\n return val & 32768 ? val | 4294901760 : val;\n };\n Buffer3.prototype.readInt16BE = function readInt16BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n const val = this[offset + 1] | this[offset] << 8;\n return val & 32768 ? val | 4294901760 : val;\n };\n Buffer3.prototype.readInt32LE = function readInt32LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;\n };\n Buffer3.prototype.readInt32BE = function readInt32BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];\n };\n Buffer3.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) {\n offset = offset >>> 0;\n validateNumber(offset, \"offset\");\n const first = this[offset];\n const last = this[offset + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset, this.length - 8);\n }\n const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24);\n return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24);\n });\n Buffer3.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) {\n offset = offset >>> 0;\n validateNumber(offset, \"offset\");\n const first = this[offset];\n const last = this[offset + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset, this.length - 8);\n }\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];\n return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last);\n });\n Buffer3.prototype.readFloatLE = function readFloatLE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, true, 23, 4);\n };\n Buffer3.prototype.readFloatBE = function readFloatBE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, false, 23, 4);\n };\n Buffer3.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, true, 52, 8);\n };\n Buffer3.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, false, 52, 8);\n };\n function checkInt(buf, value, offset, ext, max, min) {\n if (!Buffer3.isBuffer(buf))\n throw new TypeError('\"buffer\" argument must be a Buffer instance');\n if (value > max || value < min)\n throw new RangeError('\"value\" argument is out of bounds');\n if (offset + ext > buf.length)\n throw new RangeError(\"Index out of range\");\n }\n Buffer3.prototype.writeUintLE = Buffer3.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength2) - 1;\n checkInt(this, value, offset, byteLength2, maxBytes, 0);\n }\n let mul = 1;\n let i3 = 0;\n this[offset] = value & 255;\n while (++i3 < byteLength2 && (mul *= 256)) {\n this[offset + i3] = value / mul & 255;\n }\n return offset + byteLength2;\n };\n Buffer3.prototype.writeUintBE = Buffer3.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength2) - 1;\n checkInt(this, value, offset, byteLength2, maxBytes, 0);\n }\n let i3 = byteLength2 - 1;\n let mul = 1;\n this[offset + i3] = value & 255;\n while (--i3 >= 0 && (mul *= 256)) {\n this[offset + i3] = value / mul & 255;\n }\n return offset + byteLength2;\n };\n Buffer3.prototype.writeUint8 = Buffer3.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 1, 255, 0);\n this[offset] = value & 255;\n return offset + 1;\n };\n Buffer3.prototype.writeUint16LE = Buffer3.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 65535, 0);\n this[offset] = value & 255;\n this[offset + 1] = value >>> 8;\n return offset + 2;\n };\n Buffer3.prototype.writeUint16BE = Buffer3.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 65535, 0);\n this[offset] = value >>> 8;\n this[offset + 1] = value & 255;\n return offset + 2;\n };\n Buffer3.prototype.writeUint32LE = Buffer3.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 4294967295, 0);\n this[offset + 3] = value >>> 24;\n this[offset + 2] = value >>> 16;\n this[offset + 1] = value >>> 8;\n this[offset] = value & 255;\n return offset + 4;\n };\n Buffer3.prototype.writeUint32BE = Buffer3.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 4294967295, 0);\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 255;\n return offset + 4;\n };\n function wrtBigUInt64LE(buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7);\n let lo = Number(value & BigInt(4294967295));\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(4294967295));\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n return offset;\n }\n function wrtBigUInt64BE(buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7);\n let lo = Number(value & BigInt(4294967295));\n buf[offset + 7] = lo;\n lo = lo >> 8;\n buf[offset + 6] = lo;\n lo = lo >> 8;\n buf[offset + 5] = lo;\n lo = lo >> 8;\n buf[offset + 4] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(4294967295));\n buf[offset + 3] = hi;\n hi = hi >> 8;\n buf[offset + 2] = hi;\n hi = hi >> 8;\n buf[offset + 1] = hi;\n hi = hi >> 8;\n buf[offset] = hi;\n return offset + 8;\n }\n Buffer3.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt(\"0xffffffffffffffff\"));\n });\n Buffer3.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt(\"0xffffffffffffffff\"));\n });\n Buffer3.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, 8 * byteLength2 - 1);\n checkInt(this, value, offset, byteLength2, limit - 1, -limit);\n }\n let i3 = 0;\n let mul = 1;\n let sub = 0;\n this[offset] = value & 255;\n while (++i3 < byteLength2 && (mul *= 256)) {\n if (value < 0 && sub === 0 && this[offset + i3 - 1] !== 0) {\n sub = 1;\n }\n this[offset + i3] = (value / mul >> 0) - sub & 255;\n }\n return offset + byteLength2;\n };\n Buffer3.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, 8 * byteLength2 - 1);\n checkInt(this, value, offset, byteLength2, limit - 1, -limit);\n }\n let i3 = byteLength2 - 1;\n let mul = 1;\n let sub = 0;\n this[offset + i3] = value & 255;\n while (--i3 >= 0 && (mul *= 256)) {\n if (value < 0 && sub === 0 && this[offset + i3 + 1] !== 0) {\n sub = 1;\n }\n this[offset + i3] = (value / mul >> 0) - sub & 255;\n }\n return offset + byteLength2;\n };\n Buffer3.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 1, 127, -128);\n if (value < 0)\n value = 255 + value + 1;\n this[offset] = value & 255;\n return offset + 1;\n };\n Buffer3.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 32767, -32768);\n this[offset] = value & 255;\n this[offset + 1] = value >>> 8;\n return offset + 2;\n };\n Buffer3.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 32767, -32768);\n this[offset] = value >>> 8;\n this[offset + 1] = value & 255;\n return offset + 2;\n };\n Buffer3.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 2147483647, -2147483648);\n this[offset] = value & 255;\n this[offset + 1] = value >>> 8;\n this[offset + 2] = value >>> 16;\n this[offset + 3] = value >>> 24;\n return offset + 4;\n };\n Buffer3.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 2147483647, -2147483648);\n if (value < 0)\n value = 4294967295 + value + 1;\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 255;\n return offset + 4;\n };\n Buffer3.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt(\"0x8000000000000000\"), BigInt(\"0x7fffffffffffffff\"));\n });\n Buffer3.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt(\"0x8000000000000000\"), BigInt(\"0x7fffffffffffffff\"));\n });\n function checkIEEE754(buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length)\n throw new RangeError(\"Index out of range\");\n if (offset < 0)\n throw new RangeError(\"Index out of range\");\n }\n function writeFloat(buf, value, offset, littleEndian, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4);\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4);\n return offset + 4;\n }\n Buffer3.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert);\n };\n Buffer3.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert);\n };\n function writeDouble(buf, value, offset, littleEndian, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8);\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8);\n return offset + 8;\n }\n Buffer3.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert);\n };\n Buffer3.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert);\n };\n Buffer3.prototype.copy = function copy(target, targetStart, start, end) {\n if (!Buffer3.isBuffer(target))\n throw new TypeError(\"argument should be a Buffer\");\n if (!start)\n start = 0;\n if (!end && end !== 0)\n end = this.length;\n if (targetStart >= target.length)\n targetStart = target.length;\n if (!targetStart)\n targetStart = 0;\n if (end > 0 && end < start)\n end = start;\n if (end === start)\n return 0;\n if (target.length === 0 || this.length === 0)\n return 0;\n if (targetStart < 0) {\n throw new RangeError(\"targetStart out of bounds\");\n }\n if (start < 0 || start >= this.length)\n throw new RangeError(\"Index out of range\");\n if (end < 0)\n throw new RangeError(\"sourceEnd out of bounds\");\n if (end > this.length)\n end = this.length;\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n const len = end - start;\n if (this === target && typeof Uint8Array.prototype.copyWithin === \"function\") {\n this.copyWithin(targetStart, start, end);\n } else {\n Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);\n }\n return len;\n };\n Buffer3.prototype.fill = function fill(val, start, end, encoding) {\n if (typeof val === \"string\") {\n if (typeof start === \"string\") {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === \"string\") {\n encoding = end;\n end = this.length;\n }\n if (encoding !== void 0 && typeof encoding !== \"string\") {\n throw new TypeError(\"encoding must be a string\");\n }\n if (typeof encoding === \"string\" && !Buffer3.isEncoding(encoding)) {\n throw new TypeError(\"Unknown encoding: \" + encoding);\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0);\n if (encoding === \"utf8\" && code < 128 || encoding === \"latin1\") {\n val = code;\n }\n }\n } else if (typeof val === \"number\") {\n val = val & 255;\n } else if (typeof val === \"boolean\") {\n val = Number(val);\n }\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError(\"Out of range index\");\n }\n if (end <= start) {\n return this;\n }\n start = start >>> 0;\n end = end === void 0 ? this.length : end >>> 0;\n if (!val)\n val = 0;\n let i3;\n if (typeof val === \"number\") {\n for (i3 = start; i3 < end; ++i3) {\n this[i3] = val;\n }\n } else {\n const bytes = Buffer3.isBuffer(val) ? val : Buffer3.from(val, encoding);\n const len = bytes.length;\n if (len === 0) {\n throw new TypeError('The value \"' + val + '\" is invalid for argument \"value\"');\n }\n for (i3 = 0; i3 < end - start; ++i3) {\n this[i3 + start] = bytes[i3 % len];\n }\n }\n return this;\n };\n const errors = {};\n function E2(sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor() {\n super();\n Object.defineProperty(this, \"message\", {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n });\n this.name = `${this.name} [${sym}]`;\n this.stack;\n delete this.name;\n }\n get code() {\n return sym;\n }\n set code(value) {\n Object.defineProperty(this, \"code\", {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n });\n }\n toString() {\n return `${this.name} [${sym}]: ${this.message}`;\n }\n };\n }\n E2(\"ERR_BUFFER_OUT_OF_BOUNDS\", function(name) {\n if (name) {\n return `${name} is outside of buffer bounds`;\n }\n return \"Attempt to access memory outside buffer bounds\";\n }, RangeError);\n E2(\"ERR_INVALID_ARG_TYPE\", function(name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`;\n }, TypeError);\n E2(\"ERR_OUT_OF_RANGE\", function(str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`;\n let received = input;\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input));\n } else if (typeof input === \"bigint\") {\n received = String(input);\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received);\n }\n received += \"n\";\n }\n msg += ` It must be ${range}. Received ${received}`;\n return msg;\n }, RangeError);\n function addNumericalSeparator(val) {\n let res = \"\";\n let i3 = val.length;\n const start = val[0] === \"-\" ? 1 : 0;\n for (; i3 >= start + 4; i3 -= 3) {\n res = `_${val.slice(i3 - 3, i3)}${res}`;\n }\n return `${val.slice(0, i3)}${res}`;\n }\n function checkBounds(buf, offset, byteLength2) {\n validateNumber(offset, \"offset\");\n if (buf[offset] === void 0 || buf[offset + byteLength2] === void 0) {\n boundsError(offset, buf.length - (byteLength2 + 1));\n }\n }\n function checkIntBI(value, min, max, buf, offset, byteLength2) {\n if (value > max || value < min) {\n const n2 = typeof min === \"bigint\" ? \"n\" : \"\";\n let range;\n {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n2} and < 2${n2} ** ${(byteLength2 + 1) * 8}${n2}`;\n } else {\n range = `>= -(2${n2} ** ${(byteLength2 + 1) * 8 - 1}${n2}) and < 2 ** ${(byteLength2 + 1) * 8 - 1}${n2}`;\n }\n }\n throw new errors.ERR_OUT_OF_RANGE(\"value\", range, value);\n }\n checkBounds(buf, offset, byteLength2);\n }\n function validateNumber(value, name) {\n if (typeof value !== \"number\") {\n throw new errors.ERR_INVALID_ARG_TYPE(name, \"number\", value);\n }\n }\n function boundsError(value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type);\n throw new errors.ERR_OUT_OF_RANGE(\"offset\", \"an integer\", value);\n }\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();\n }\n throw new errors.ERR_OUT_OF_RANGE(\"offset\", `>= ${0} and <= ${length}`, value);\n }\n const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\n function base64clean(str) {\n str = str.split(\"=\")[0];\n str = str.trim().replace(INVALID_BASE64_RE, \"\");\n if (str.length < 2)\n return \"\";\n while (str.length % 4 !== 0) {\n str = str + \"=\";\n }\n return str;\n }\n function utf8ToBytes5(string, units) {\n units = units || Infinity;\n let codePoint;\n const length = string.length;\n let leadSurrogate = null;\n const bytes = [];\n for (let i3 = 0; i3 < length; ++i3) {\n codePoint = string.charCodeAt(i3);\n if (codePoint > 55295 && codePoint < 57344) {\n if (!leadSurrogate) {\n if (codePoint > 56319) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n continue;\n } else if (i3 + 1 === length) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n continue;\n }\n leadSurrogate = codePoint;\n continue;\n }\n if (codePoint < 56320) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n leadSurrogate = codePoint;\n continue;\n }\n codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;\n } else if (leadSurrogate) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n }\n leadSurrogate = null;\n if (codePoint < 128) {\n if ((units -= 1) < 0)\n break;\n bytes.push(codePoint);\n } else if (codePoint < 2048) {\n if ((units -= 2) < 0)\n break;\n bytes.push(codePoint >> 6 | 192, codePoint & 63 | 128);\n } else if (codePoint < 65536) {\n if ((units -= 3) < 0)\n break;\n bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);\n } else if (codePoint < 1114112) {\n if ((units -= 4) < 0)\n break;\n bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);\n } else {\n throw new Error(\"Invalid code point\");\n }\n }\n return bytes;\n }\n function asciiToBytes(str) {\n const byteArray = [];\n for (let i3 = 0; i3 < str.length; ++i3) {\n byteArray.push(str.charCodeAt(i3) & 255);\n }\n return byteArray;\n }\n function utf16leToBytes(str, units) {\n let c4, hi, lo;\n const byteArray = [];\n for (let i3 = 0; i3 < str.length; ++i3) {\n if ((units -= 2) < 0)\n break;\n c4 = str.charCodeAt(i3);\n hi = c4 >> 8;\n lo = c4 % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n return byteArray;\n }\n function base64ToBytes(str) {\n return base64.toByteArray(base64clean(str));\n }\n function blitBuffer(src, dst, offset, length) {\n let i3;\n for (i3 = 0; i3 < length; ++i3) {\n if (i3 + offset >= dst.length || i3 >= src.length)\n break;\n dst[i3 + offset] = src[i3];\n }\n return i3;\n }\n function isInstance(obj, type) {\n return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;\n }\n function numberIsNaN(obj) {\n return obj !== obj;\n }\n const hexSliceLookupTable = function() {\n const alphabet2 = \"0123456789abcdef\";\n const table = new Array(256);\n for (let i3 = 0; i3 < 16; ++i3) {\n const i16 = i3 * 16;\n for (let j2 = 0; j2 < 16; ++j2) {\n table[i16 + j2] = alphabet2[i3] + alphabet2[j2];\n }\n }\n return table;\n }();\n function defineBigIntMethod(fn) {\n return typeof BigInt === \"undefined\" ? BufferBigIntNotDefined : fn;\n }\n function BufferBigIntNotDefined() {\n throw new Error(\"BigInt not supported\");\n }\n return exports;\n }\n var exports$2, _dewExec$2, exports$1, _dewExec$1, exports, _dewExec;\n var init_chunk_DtuTasat = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n exports$2 = {};\n _dewExec$2 = false;\n exports$1 = {};\n _dewExec$1 = false;\n exports = {};\n _dewExec = false;\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/buffer.js\n var buffer_exports = {};\n __export(buffer_exports, {\n Buffer: () => Buffer2,\n INSPECT_MAX_BYTES: () => INSPECT_MAX_BYTES,\n default: () => exports2,\n kMaxLength: () => kMaxLength\n });\n var exports2, Buffer2, INSPECT_MAX_BYTES, kMaxLength;\n var init_buffer = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/buffer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chunk_DtuTasat();\n exports2 = dew();\n exports2[\"Buffer\"];\n exports2[\"SlowBuffer\"];\n exports2[\"INSPECT_MAX_BYTES\"];\n exports2[\"kMaxLength\"];\n Buffer2 = exports2.Buffer;\n INSPECT_MAX_BYTES = exports2.INSPECT_MAX_BYTES;\n kMaxLength = exports2.kMaxLength;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/buffer.js\n var init_buffer2 = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/buffer.js\"() {\n \"use strict\";\n init_buffer();\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/util.js\n var require_util = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/util.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getParsedType = exports3.ZodParsedType = exports3.objectUtil = exports3.util = void 0;\n var util2;\n (function(util3) {\n util3.assertEqual = (_2) => {\n };\n function assertIs(_arg) {\n }\n util3.assertIs = assertIs;\n function assertNever2(_x) {\n throw new Error();\n }\n util3.assertNever = assertNever2;\n util3.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util3.getValidEnumValues = (obj) => {\n const validKeys = util3.objectKeys(obj).filter((k4) => typeof obj[obj[k4]] !== \"number\");\n const filtered = {};\n for (const k4 of validKeys) {\n filtered[k4] = obj[k4];\n }\n return util3.objectValues(filtered);\n };\n util3.objectValues = (obj) => {\n return util3.objectKeys(obj).map(function(e2) {\n return obj[e2];\n });\n };\n util3.objectKeys = typeof Object.keys === \"function\" ? (obj) => Object.keys(obj) : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util3.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return void 0;\n };\n util3.isInteger = typeof Number.isInteger === \"function\" ? (val) => Number.isInteger(val) : (val) => typeof val === \"number\" && Number.isFinite(val) && Math.floor(val) === val;\n function joinValues(array, separator = \" | \") {\n return array.map((val) => typeof val === \"string\" ? `'${val}'` : val).join(separator);\n }\n util3.joinValues = joinValues;\n util3.jsonStringifyReplacer = (_2, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n })(util2 || (exports3.util = util2 = {}));\n var objectUtil2;\n (function(objectUtil3) {\n objectUtil3.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second\n // second overwrites first\n };\n };\n })(objectUtil2 || (exports3.objectUtil = objectUtil2 = {}));\n exports3.ZodParsedType = util2.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\"\n ]);\n var getParsedType2 = (data) => {\n const t3 = typeof data;\n switch (t3) {\n case \"undefined\":\n return exports3.ZodParsedType.undefined;\n case \"string\":\n return exports3.ZodParsedType.string;\n case \"number\":\n return Number.isNaN(data) ? exports3.ZodParsedType.nan : exports3.ZodParsedType.number;\n case \"boolean\":\n return exports3.ZodParsedType.boolean;\n case \"function\":\n return exports3.ZodParsedType.function;\n case \"bigint\":\n return exports3.ZodParsedType.bigint;\n case \"symbol\":\n return exports3.ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return exports3.ZodParsedType.array;\n }\n if (data === null) {\n return exports3.ZodParsedType.null;\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return exports3.ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return exports3.ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return exports3.ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return exports3.ZodParsedType.date;\n }\n return exports3.ZodParsedType.object;\n default:\n return exports3.ZodParsedType.unknown;\n }\n };\n exports3.getParsedType = getParsedType2;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/ZodError.js\n var require_ZodError = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/ZodError.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ZodError = exports3.quotelessJson = exports3.ZodIssueCode = void 0;\n var util_js_1 = require_util();\n exports3.ZodIssueCode = util_js_1.util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\"\n ]);\n var quotelessJson2 = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n };\n exports3.quotelessJson = quotelessJson2;\n var ZodError2 = class _ZodError extends Error {\n get errors() {\n return this.issues;\n }\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(this, actualProto);\n } else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n format(_mapper) {\n const mapper = _mapper || function(issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n } else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n } else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n } else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n } else {\n let curr = fieldErrors;\n let i3 = 0;\n while (i3 < issue.path.length) {\n const el = issue.path[i3];\n const terminal = i3 === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n } else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i3++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n static assert(value) {\n if (!(value instanceof _ZodError)) {\n throw new Error(`Not a ZodError: ${value}`);\n }\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util_js_1.util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n } else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n };\n exports3.ZodError = ZodError2;\n ZodError2.create = (issues) => {\n const error = new ZodError2(issues);\n return error;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/locales/en.js\n var require_en = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/locales/en.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var ZodError_js_1 = require_ZodError();\n var util_js_1 = require_util();\n var errorMap2 = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodError_js_1.ZodIssueCode.invalid_type:\n if (issue.received === util_js_1.ZodParsedType.undefined) {\n message = \"Required\";\n } else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodError_js_1.ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util_js_1.util.jsonStringifyReplacer)}`;\n break;\n case ZodError_js_1.ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util_js_1.util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util_js_1.util.joinValues(issue.options)}`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util_js_1.util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n } else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n } else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n } else {\n util_js_1.util.assertNever(issue.validation);\n }\n } else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n } else {\n message = \"Invalid\";\n }\n break;\n case ZodError_js_1.ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodError_js_1.ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodError_js_1.ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodError_js_1.ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodError_js_1.ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util_js_1.util.assertNever(issue);\n }\n return { message };\n };\n exports3.default = errorMap2;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/errors.js\n var require_errors = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/errors.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.defaultErrorMap = void 0;\n exports3.setErrorMap = setErrorMap2;\n exports3.getErrorMap = getErrorMap2;\n var en_js_1 = __importDefault4(require_en());\n exports3.defaultErrorMap = en_js_1.default;\n var overrideErrorMap2 = en_js_1.default;\n function setErrorMap2(map) {\n overrideErrorMap2 = map;\n }\n function getErrorMap2() {\n return overrideErrorMap2;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/parseUtil.js\n var require_parseUtil = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/parseUtil.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.isAsync = exports3.isValid = exports3.isDirty = exports3.isAborted = exports3.OK = exports3.DIRTY = exports3.INVALID = exports3.ParseStatus = exports3.EMPTY_PATH = exports3.makeIssue = void 0;\n exports3.addIssueToContext = addIssueToContext2;\n var errors_js_1 = require_errors();\n var en_js_1 = __importDefault4(require_en());\n var makeIssue2 = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...issueData.path || []];\n const fullIssue = {\n ...issueData,\n path: fullPath\n };\n if (issueData.message !== void 0) {\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message\n };\n }\n let errorMessage = \"\";\n const maps = errorMaps.filter((m2) => !!m2).slice().reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: errorMessage\n };\n };\n exports3.makeIssue = makeIssue2;\n exports3.EMPTY_PATH = [];\n function addIssueToContext2(ctx, issueData) {\n const overrideMap = (0, errors_js_1.getErrorMap)();\n const issue = (0, exports3.makeIssue)({\n issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n // contextual error map is first priority\n ctx.schemaErrorMap,\n // then schema-bound map if available\n overrideMap,\n // then global override map\n overrideMap === en_js_1.default ? void 0 : en_js_1.default\n // then global default map\n ].filter((x4) => !!x4)\n });\n ctx.common.issues.push(issue);\n }\n var ParseStatus2 = class _ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s4 of results) {\n if (s4.status === \"aborted\")\n return exports3.INVALID;\n if (s4.status === \"dirty\")\n status.dirty();\n arrayValue.push(s4.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value\n });\n }\n return _ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return exports3.INVALID;\n if (value.status === \"aborted\")\n return exports3.INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" && (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n };\n exports3.ParseStatus = ParseStatus2;\n exports3.INVALID = Object.freeze({\n status: \"aborted\"\n });\n var DIRTY2 = (value) => ({ status: \"dirty\", value });\n exports3.DIRTY = DIRTY2;\n var OK2 = (value) => ({ status: \"valid\", value });\n exports3.OK = OK2;\n var isAborted2 = (x4) => x4.status === \"aborted\";\n exports3.isAborted = isAborted2;\n var isDirty2 = (x4) => x4.status === \"dirty\";\n exports3.isDirty = isDirty2;\n var isValid2 = (x4) => x4.status === \"valid\";\n exports3.isValid = isValid2;\n var isAsync2 = (x4) => typeof Promise !== \"undefined\" && x4 instanceof Promise;\n exports3.isAsync = isAsync2;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/typeAliases.js\n var require_typeAliases = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/typeAliases.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/errorUtil.js\n var require_errorUtil = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/errorUtil.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.errorUtil = void 0;\n var errorUtil2;\n (function(errorUtil3) {\n errorUtil3.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n errorUtil3.toString = (message) => typeof message === \"string\" ? message : message?.message;\n })(errorUtil2 || (exports3.errorUtil = errorUtil2 = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/types.js\n var require_types = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/types.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.discriminatedUnion = exports3.date = exports3.boolean = exports3.bigint = exports3.array = exports3.any = exports3.coerce = exports3.ZodFirstPartyTypeKind = exports3.late = exports3.ZodSchema = exports3.Schema = exports3.ZodReadonly = exports3.ZodPipeline = exports3.ZodBranded = exports3.BRAND = exports3.ZodNaN = exports3.ZodCatch = exports3.ZodDefault = exports3.ZodNullable = exports3.ZodOptional = exports3.ZodTransformer = exports3.ZodEffects = exports3.ZodPromise = exports3.ZodNativeEnum = exports3.ZodEnum = exports3.ZodLiteral = exports3.ZodLazy = exports3.ZodFunction = exports3.ZodSet = exports3.ZodMap = exports3.ZodRecord = exports3.ZodTuple = exports3.ZodIntersection = exports3.ZodDiscriminatedUnion = exports3.ZodUnion = exports3.ZodObject = exports3.ZodArray = exports3.ZodVoid = exports3.ZodNever = exports3.ZodUnknown = exports3.ZodAny = exports3.ZodNull = exports3.ZodUndefined = exports3.ZodSymbol = exports3.ZodDate = exports3.ZodBoolean = exports3.ZodBigInt = exports3.ZodNumber = exports3.ZodString = exports3.ZodType = void 0;\n exports3.NEVER = exports3.void = exports3.unknown = exports3.union = exports3.undefined = exports3.tuple = exports3.transformer = exports3.symbol = exports3.string = exports3.strictObject = exports3.set = exports3.record = exports3.promise = exports3.preprocess = exports3.pipeline = exports3.ostring = exports3.optional = exports3.onumber = exports3.oboolean = exports3.object = exports3.number = exports3.nullable = exports3.null = exports3.never = exports3.nativeEnum = exports3.nan = exports3.map = exports3.literal = exports3.lazy = exports3.intersection = exports3.instanceof = exports3.function = exports3.enum = exports3.effect = void 0;\n exports3.datetimeRegex = datetimeRegex2;\n exports3.custom = custom3;\n var ZodError_js_1 = require_ZodError();\n var errors_js_1 = require_errors();\n var errorUtil_js_1 = require_errorUtil();\n var parseUtil_js_1 = require_parseUtil();\n var util_js_1 = require_util();\n var ParseInputLazyPath2 = class {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (Array.isArray(this._key)) {\n this._cachedPath.push(...this._path, ...this._key);\n } else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n };\n var handleResult2 = (ctx, result) => {\n if ((0, parseUtil_js_1.isValid)(result)) {\n return { success: true, data: result.value };\n } else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError_js_1.ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n }\n };\n }\n };\n function processCreateParams2(params) {\n if (!params)\n return {};\n const { errorMap: errorMap2, invalid_type_error, required_error, description } = params;\n if (errorMap2 && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap2)\n return { errorMap: errorMap2, description };\n const customMap = (iss, ctx) => {\n const { message } = params;\n if (iss.code === \"invalid_enum_value\") {\n return { message: message ?? ctx.defaultError };\n }\n if (typeof ctx.data === \"undefined\") {\n return { message: message ?? required_error ?? ctx.defaultError };\n }\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n return { message: message ?? invalid_type_error ?? ctx.defaultError };\n };\n return { errorMap: customMap, description };\n }\n var ZodType2 = class {\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return (0, util_js_1.getParsedType)(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: (0, util_js_1.getParsedType)(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent\n };\n }\n _processInputParams(input) {\n return {\n status: new parseUtil_js_1.ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: (0, util_js_1.getParsedType)(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent\n }\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if ((0, parseUtil_js_1.isAsync)(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n const ctx = {\n common: {\n issues: [],\n async: params?.async ?? false,\n contextualErrorMap: params?.errorMap\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_js_1.getParsedType)(data)\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult2(ctx, result);\n }\n \"~validate\"(data) {\n const ctx = {\n common: {\n issues: [],\n async: !!this[\"~standard\"].async\n },\n path: [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_js_1.getParsedType)(data)\n };\n if (!this[\"~standard\"].async) {\n try {\n const result = this._parseSync({ data, path: [], parent: ctx });\n return (0, parseUtil_js_1.isValid)(result) ? {\n value: result.value\n } : {\n issues: ctx.common.issues\n };\n } catch (err) {\n if (err?.message?.toLowerCase()?.includes(\"encountered\")) {\n this[\"~standard\"].async = true;\n }\n ctx.common = {\n issues: [],\n async: true\n };\n }\n }\n return this._parseAsync({ data, path: [], parent: ctx }).then((result) => (0, parseUtil_js_1.isValid)(result) ? {\n value: result.value\n } : {\n issues: ctx.common.issues\n });\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params?.errorMap,\n async: true\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_js_1.getParsedType)(data)\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await ((0, parseUtil_js_1.isAsync)(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));\n return handleResult2(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n } else if (typeof message === \"function\") {\n return message(val);\n } else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodError_js_1.ZodIssueCode.custom,\n ...getIssueProperties(val)\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n } else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n } else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\" ? refinementData(val, ctx) : refinementData);\n return false;\n } else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects2({\n schema: this,\n typeName: ZodFirstPartyTypeKind2.ZodEffects,\n effect: { type: \"refinement\", refinement }\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n constructor(def) {\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n this[\"~standard\"] = {\n version: 1,\n vendor: \"zod\",\n validate: (data) => this[\"~validate\"](data)\n };\n }\n optional() {\n return ZodOptional2.create(this, this._def);\n }\n nullable() {\n return ZodNullable2.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray2.create(this);\n }\n promise() {\n return ZodPromise2.create(this, this._def);\n }\n or(option) {\n return ZodUnion2.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection2.create(this, incoming, this._def);\n }\n transform(transform) {\n return new ZodEffects2({\n ...processCreateParams2(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind2.ZodEffects,\n effect: { type: \"transform\", transform }\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault2({\n ...processCreateParams2(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind2.ZodDefault\n });\n }\n brand() {\n return new ZodBranded2({\n typeName: ZodFirstPartyTypeKind2.ZodBranded,\n type: this,\n ...processCreateParams2(this._def)\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch2({\n ...processCreateParams2(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind2.ZodCatch\n });\n }\n describe(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description\n });\n }\n pipe(target) {\n return ZodPipeline2.create(this, target);\n }\n readonly() {\n return ZodReadonly2.create(this);\n }\n isOptional() {\n return this.safeParse(void 0).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n };\n exports3.ZodType = ZodType2;\n exports3.Schema = ZodType2;\n exports3.ZodSchema = ZodType2;\n var cuidRegex2 = /^c[^\\s-]{8,}$/i;\n var cuid2Regex2 = /^[0-9a-z]+$/;\n var ulidRegex2 = /^[0-9A-HJKMNP-TV-Z]{26}$/i;\n var uuidRegex2 = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\n var nanoidRegex2 = /^[a-z0-9_-]{21}$/i;\n var jwtRegex2 = /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/;\n var durationRegex2 = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n var emailRegex2 = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n var _emojiRegex2 = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\n var emojiRegex2;\n var ipv4Regex2 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\n var ipv4CidrRegex2 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/(3[0-2]|[12]?[0-9])$/;\n var ipv6Regex2 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;\n var ipv6CidrRegex2 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n var base64Regex3 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;\n var base64urlRegex2 = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;\n var dateRegexSource2 = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\n var dateRegex2 = new RegExp(`^${dateRegexSource2}$`);\n function timeRegexSource2(args) {\n let secondsRegexSource = `[0-5]\\\\d`;\n if (args.precision) {\n secondsRegexSource = `${secondsRegexSource}\\\\.\\\\d{${args.precision}}`;\n } else if (args.precision == null) {\n secondsRegexSource = `${secondsRegexSource}(\\\\.\\\\d+)?`;\n }\n const secondsQuantifier = args.precision ? \"+\" : \"?\";\n return `([01]\\\\d|2[0-3]):[0-5]\\\\d(:${secondsRegexSource})${secondsQuantifier}`;\n }\n function timeRegex2(args) {\n return new RegExp(`^${timeRegexSource2(args)}$`);\n }\n function datetimeRegex2(args) {\n let regex = `${dateRegexSource2}T${timeRegexSource2(args)}`;\n const opts = [];\n opts.push(args.local ? `Z?` : `Z`);\n if (args.offset)\n opts.push(`([+-]\\\\d{2}:?\\\\d{2})`);\n regex = `${regex}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex}$`);\n }\n function isValidIP2(ip, version7) {\n if ((version7 === \"v4\" || !version7) && ipv4Regex2.test(ip)) {\n return true;\n }\n if ((version7 === \"v6\" || !version7) && ipv6Regex2.test(ip)) {\n return true;\n }\n return false;\n }\n function isValidJWT2(jwt, alg) {\n if (!jwtRegex2.test(jwt))\n return false;\n try {\n const [header] = jwt.split(\".\");\n const base64 = header.replace(/-/g, \"+\").replace(/_/g, \"/\").padEnd(header.length + (4 - header.length % 4) % 4, \"=\");\n const decoded = JSON.parse(atob(base64));\n if (typeof decoded !== \"object\" || decoded === null)\n return false;\n if (\"typ\" in decoded && decoded?.typ !== \"JWT\")\n return false;\n if (!decoded.alg)\n return false;\n if (alg && decoded.alg !== alg)\n return false;\n return true;\n } catch {\n return false;\n }\n }\n function isValidCidr2(ip, version7) {\n if ((version7 === \"v4\" || !version7) && ipv4CidrRegex2.test(ip)) {\n return true;\n }\n if ((version7 === \"v6\" || !version7) && ipv6CidrRegex2.test(ip)) {\n return true;\n }\n return false;\n }\n var ZodString2 = class _ZodString extends ZodType2 {\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.string) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.string,\n received: ctx2.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const status = new parseUtil_js_1.ParseStatus();\n let ctx = void 0;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message\n });\n } else if (tooSmall) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message\n });\n }\n status.dirty();\n }\n } else if (check.kind === \"email\") {\n if (!emailRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"email\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"emoji\") {\n if (!emojiRegex2) {\n emojiRegex2 = new RegExp(_emojiRegex2, \"u\");\n }\n if (!emojiRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"emoji\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"uuid\") {\n if (!uuidRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"uuid\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"nanoid\") {\n if (!nanoidRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"nanoid\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"cuid\") {\n if (!cuidRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"cuid\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"cuid2\") {\n if (!cuid2Regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"cuid2\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"ulid\") {\n if (!ulidRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"ulid\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n } catch {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"url\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"regex\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n } else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n } else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n } else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"datetime\") {\n const regex = datetimeRegex2(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"date\") {\n const regex = dateRegex2;\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: \"date\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"time\") {\n const regex = timeRegex2(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: \"time\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"duration\") {\n if (!durationRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"duration\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"ip\") {\n if (!isValidIP2(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"ip\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"jwt\") {\n if (!isValidJWT2(input.data, check.alg)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"jwt\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"cidr\") {\n if (!isValidCidr2(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"cidr\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"base64\") {\n if (!base64Regex3.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"base64\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"base64url\") {\n if (!base64urlRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"base64url\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else {\n util_js_1.util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _regex(regex, validation, message) {\n return this.refinement((data) => regex.test(data), {\n validation,\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n _addCheck(check) {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n nanoid(message) {\n return this._addCheck({ kind: \"nanoid\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n base64(message) {\n return this._addCheck({ kind: \"base64\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n base64url(message) {\n return this._addCheck({\n kind: \"base64url\",\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n jwt(options) {\n return this._addCheck({ kind: \"jwt\", ...errorUtil_js_1.errorUtil.errToObj(options) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil_js_1.errorUtil.errToObj(options) });\n }\n cidr(options) {\n return this._addCheck({ kind: \"cidr\", ...errorUtil_js_1.errorUtil.errToObj(options) });\n }\n datetime(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n local: false,\n message: options\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n offset: options?.offset ?? false,\n local: options?.local ?? false,\n ...errorUtil_js_1.errorUtil.errToObj(options?.message)\n });\n }\n date(message) {\n return this._addCheck({ kind: \"date\", message });\n }\n time(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"time\",\n precision: null,\n message: options\n });\n }\n return this._addCheck({\n kind: \"time\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n ...errorUtil_js_1.errorUtil.errToObj(options?.message)\n });\n }\n duration(message) {\n return this._addCheck({ kind: \"duration\", ...errorUtil_js_1.errorUtil.errToObj(message) });\n }\n regex(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value,\n position: options?.position,\n ...errorUtil_js_1.errorUtil.errToObj(options?.message)\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n min(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil_js_1.errorUtil.errToObj(message)\n });\n }\n /**\n * Equivalent to `.min(1)`\n */\n nonempty(message) {\n return this.min(1, errorUtil_js_1.errorUtil.errToObj(message));\n }\n trim() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }]\n });\n }\n toLowerCase() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }]\n });\n }\n toUpperCase() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }]\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isDate() {\n return !!this._def.checks.find((ch) => ch.kind === \"date\");\n }\n get isTime() {\n return !!this._def.checks.find((ch) => ch.kind === \"time\");\n }\n get isDuration() {\n return !!this._def.checks.find((ch) => ch.kind === \"duration\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isNANOID() {\n return !!this._def.checks.find((ch) => ch.kind === \"nanoid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get isCIDR() {\n return !!this._def.checks.find((ch) => ch.kind === \"cidr\");\n }\n get isBase64() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64\");\n }\n get isBase64url() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64url\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n };\n exports3.ZodString = ZodString2;\n ZodString2.create = (params) => {\n return new ZodString2({\n checks: [],\n typeName: ZodFirstPartyTypeKind2.ZodString,\n coerce: params?.coerce ?? false,\n ...processCreateParams2(params)\n });\n };\n function floatSafeRemainder2(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return valInt % stepInt / 10 ** decCount;\n }\n var ZodNumber2 = class _ZodNumber extends ZodType2 {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.number) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.number,\n received: ctx2.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n let ctx = void 0;\n const status = new parseUtil_js_1.ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util_js_1.util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"min\") {\n const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder2(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.not_finite,\n message: check.message\n });\n status.dirty();\n }\n } else {\n util_js_1.util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil_js_1.errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil_js_1.errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil_js_1.errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil_js_1.errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new _ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil_js_1.errorUtil.toString(message)\n }\n ]\n });\n }\n _addCheck(check) {\n return new _ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil_js_1.errorUtil.toString(message)\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" || ch.kind === \"multipleOf\" && util_js_1.util.isInteger(ch.value));\n }\n get isFinite() {\n let max = null;\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" || ch.kind === \"int\" || ch.kind === \"multipleOf\") {\n return true;\n } else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n } else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n };\n exports3.ZodNumber = ZodNumber2;\n ZodNumber2.create = (params) => {\n return new ZodNumber2({\n checks: [],\n typeName: ZodFirstPartyTypeKind2.ZodNumber,\n coerce: params?.coerce || false,\n ...processCreateParams2(params)\n });\n };\n var ZodBigInt2 = class _ZodBigInt extends ZodType2 {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n try {\n input.data = BigInt(input.data);\n } catch {\n return this._getInvalidInput(input);\n }\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.bigint) {\n return this._getInvalidInput(input);\n }\n let ctx = void 0;\n const status = new parseUtil_js_1.ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message\n });\n status.dirty();\n }\n } else {\n util_js_1.util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _getInvalidInput(input) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.bigint,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil_js_1.errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil_js_1.errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil_js_1.errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil_js_1.errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new _ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil_js_1.errorUtil.toString(message)\n }\n ]\n });\n }\n _addCheck(check) {\n return new _ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n };\n exports3.ZodBigInt = ZodBigInt2;\n ZodBigInt2.create = (params) => {\n return new ZodBigInt2({\n checks: [],\n typeName: ZodFirstPartyTypeKind2.ZodBigInt,\n coerce: params?.coerce ?? false,\n ...processCreateParams2(params)\n });\n };\n var ZodBoolean2 = class extends ZodType2 {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.boolean,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodBoolean = ZodBoolean2;\n ZodBoolean2.create = (params) => {\n return new ZodBoolean2({\n typeName: ZodFirstPartyTypeKind2.ZodBoolean,\n coerce: params?.coerce || false,\n ...processCreateParams2(params)\n });\n };\n var ZodDate2 = class _ZodDate extends ZodType2 {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.date) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.date,\n received: ctx2.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n if (Number.isNaN(input.data.getTime())) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_date\n });\n return parseUtil_js_1.INVALID;\n }\n const status = new parseUtil_js_1.ParseStatus();\n let ctx = void 0;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\"\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\"\n });\n status.dirty();\n }\n } else {\n util_js_1.util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime())\n };\n }\n _addCheck(check) {\n return new _ZodDate({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil_js_1.errorUtil.toString(message)\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n };\n exports3.ZodDate = ZodDate2;\n ZodDate2.create = (params) => {\n return new ZodDate2({\n checks: [],\n coerce: params?.coerce || false,\n typeName: ZodFirstPartyTypeKind2.ZodDate,\n ...processCreateParams2(params)\n });\n };\n var ZodSymbol2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.symbol,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodSymbol = ZodSymbol2;\n ZodSymbol2.create = (params) => {\n return new ZodSymbol2({\n typeName: ZodFirstPartyTypeKind2.ZodSymbol,\n ...processCreateParams2(params)\n });\n };\n var ZodUndefined2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.undefined,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodUndefined = ZodUndefined2;\n ZodUndefined2.create = (params) => {\n return new ZodUndefined2({\n typeName: ZodFirstPartyTypeKind2.ZodUndefined,\n ...processCreateParams2(params)\n });\n };\n var ZodNull2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.null,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodNull = ZodNull2;\n ZodNull2.create = (params) => {\n return new ZodNull2({\n typeName: ZodFirstPartyTypeKind2.ZodNull,\n ...processCreateParams2(params)\n });\n };\n var ZodAny2 = class extends ZodType2 {\n constructor() {\n super(...arguments);\n this._any = true;\n }\n _parse(input) {\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodAny = ZodAny2;\n ZodAny2.create = (params) => {\n return new ZodAny2({\n typeName: ZodFirstPartyTypeKind2.ZodAny,\n ...processCreateParams2(params)\n });\n };\n var ZodUnknown2 = class extends ZodType2 {\n constructor() {\n super(...arguments);\n this._unknown = true;\n }\n _parse(input) {\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodUnknown = ZodUnknown2;\n ZodUnknown2.create = (params) => {\n return new ZodUnknown2({\n typeName: ZodFirstPartyTypeKind2.ZodUnknown,\n ...processCreateParams2(params)\n });\n };\n var ZodNever2 = class extends ZodType2 {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.never,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n };\n exports3.ZodNever = ZodNever2;\n ZodNever2.create = (params) => {\n return new ZodNever2({\n typeName: ZodFirstPartyTypeKind2.ZodNever,\n ...processCreateParams2(params)\n });\n };\n var ZodVoid2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.void,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodVoid = ZodVoid2;\n ZodVoid2.create = (params) => {\n return new ZodVoid2({\n typeName: ZodFirstPartyTypeKind2.ZodVoid,\n ...processCreateParams2(params)\n });\n };\n var ZodArray2 = class _ZodArray extends ZodType2 {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== util_js_1.ZodParsedType.array) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.array,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: tooBig ? ZodError_js_1.ZodIssueCode.too_big : ZodError_js_1.ZodIssueCode.too_small,\n minimum: tooSmall ? def.exactLength.value : void 0,\n maximum: tooBig ? def.exactLength.value : void 0,\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i3) => {\n return def.type._parseAsync(new ParseInputLazyPath2(ctx, item, ctx.path, i3));\n })).then((result2) => {\n return parseUtil_js_1.ParseStatus.mergeArray(status, result2);\n });\n }\n const result = [...ctx.data].map((item, i3) => {\n return def.type._parseSync(new ParseInputLazyPath2(ctx, item, ctx.path, i3));\n });\n return parseUtil_js_1.ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength, message) {\n return new _ZodArray({\n ...this._def,\n minLength: { value: minLength, message: errorUtil_js_1.errorUtil.toString(message) }\n });\n }\n max(maxLength, message) {\n return new _ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil_js_1.errorUtil.toString(message) }\n });\n }\n length(len, message) {\n return new _ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil_js_1.errorUtil.toString(message) }\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n };\n exports3.ZodArray = ZodArray2;\n ZodArray2.create = (schema, params) => {\n return new ZodArray2({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind2.ZodArray,\n ...processCreateParams2(params)\n });\n };\n function deepPartialify2(schema) {\n if (schema instanceof ZodObject2) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional2.create(deepPartialify2(fieldSchema));\n }\n return new ZodObject2({\n ...schema._def,\n shape: () => newShape\n });\n } else if (schema instanceof ZodArray2) {\n return new ZodArray2({\n ...schema._def,\n type: deepPartialify2(schema.element)\n });\n } else if (schema instanceof ZodOptional2) {\n return ZodOptional2.create(deepPartialify2(schema.unwrap()));\n } else if (schema instanceof ZodNullable2) {\n return ZodNullable2.create(deepPartialify2(schema.unwrap()));\n } else if (schema instanceof ZodTuple2) {\n return ZodTuple2.create(schema.items.map((item) => deepPartialify2(item)));\n } else {\n return schema;\n }\n }\n var ZodObject2 = class _ZodObject extends ZodType2 {\n constructor() {\n super(...arguments);\n this._cached = null;\n this.nonstrict = this.passthrough;\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape3 = this._def.shape();\n const keys = util_js_1.util.objectKeys(shape3);\n this._cached = { shape: shape3, keys };\n return this._cached;\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.object) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.object,\n received: ctx2.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape: shape3, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever2 && this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape3[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath2(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data\n });\n }\n if (this._def.catchall instanceof ZodNever2) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] }\n });\n }\n } else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.unrecognized_keys,\n keys: extraKeys\n });\n status.dirty();\n }\n } else if (unknownKeys === \"strip\") {\n } else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n } else {\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(\n new ParseInputLazyPath2(ctx, value, ctx.path, key)\n //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve().then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n alwaysSet: pair.alwaysSet\n });\n }\n return syncPairs;\n }).then((syncPairs) => {\n return parseUtil_js_1.ParseStatus.mergeObjectSync(status, syncPairs);\n });\n } else {\n return parseUtil_js_1.ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil_js_1.errorUtil.errToObj;\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...message !== void 0 ? {\n errorMap: (issue, ctx) => {\n const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: errorUtil_js_1.errorUtil.errToObj(message).message ?? defaultError\n };\n return {\n message: defaultError\n };\n }\n } : {}\n });\n }\n strip() {\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"strip\"\n });\n }\n passthrough() {\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\"\n });\n }\n // const AugmentFactory =\n // (def: Def) =>\n // (\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new _ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation\n })\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new _ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape()\n }),\n typeName: ZodFirstPartyTypeKind2.ZodObject\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge(\n // merging: Incoming\n // ): //ZodObject = (merging) => {\n // ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index2) {\n return new _ZodObject({\n ...this._def,\n catchall: index2\n });\n }\n pick(mask) {\n const shape3 = {};\n for (const key of util_js_1.util.objectKeys(mask)) {\n if (mask[key] && this.shape[key]) {\n shape3[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape3\n });\n }\n omit(mask) {\n const shape3 = {};\n for (const key of util_js_1.util.objectKeys(this.shape)) {\n if (!mask[key]) {\n shape3[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape3\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify2(this);\n }\n partial(mask) {\n const newShape = {};\n for (const key of util_js_1.util.objectKeys(this.shape)) {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n } else {\n newShape[key] = fieldSchema.optional();\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => newShape\n });\n }\n required(mask) {\n const newShape = {};\n for (const key of util_js_1.util.objectKeys(this.shape)) {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n } else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional2) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => newShape\n });\n }\n keyof() {\n return createZodEnum2(util_js_1.util.objectKeys(this.shape));\n }\n };\n exports3.ZodObject = ZodObject2;\n ZodObject2.create = (shape3, params) => {\n return new ZodObject2({\n shape: () => shape3,\n unknownKeys: \"strip\",\n catchall: ZodNever2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodObject,\n ...processCreateParams2(params)\n });\n };\n ZodObject2.strictCreate = (shape3, params) => {\n return new ZodObject2({\n shape: () => shape3,\n unknownKeys: \"strict\",\n catchall: ZodNever2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodObject,\n ...processCreateParams2(params)\n });\n };\n ZodObject2.lazycreate = (shape3, params) => {\n return new ZodObject2({\n shape: shape3,\n unknownKeys: \"strip\",\n catchall: ZodNever2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodObject,\n ...processCreateParams2(params)\n });\n };\n var ZodUnion2 = class extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n const unionErrors = results.map((result) => new ZodError_js_1.ZodError(result.ctx.common.issues));\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_union,\n unionErrors\n });\n return parseUtil_js_1.INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n },\n parent: null\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx\n }),\n ctx: childCtx\n };\n })).then(handleResults);\n } else {\n let dirty = void 0;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n },\n parent: null\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx\n });\n if (result.status === \"valid\") {\n return result;\n } else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues2) => new ZodError_js_1.ZodError(issues2));\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_union,\n unionErrors\n });\n return parseUtil_js_1.INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n };\n exports3.ZodUnion = ZodUnion2;\n ZodUnion2.create = (types, params) => {\n return new ZodUnion2({\n options: types,\n typeName: ZodFirstPartyTypeKind2.ZodUnion,\n ...processCreateParams2(params)\n });\n };\n var getDiscriminator2 = (type) => {\n if (type instanceof ZodLazy2) {\n return getDiscriminator2(type.schema);\n } else if (type instanceof ZodEffects2) {\n return getDiscriminator2(type.innerType());\n } else if (type instanceof ZodLiteral2) {\n return [type.value];\n } else if (type instanceof ZodEnum2) {\n return type.options;\n } else if (type instanceof ZodNativeEnum2) {\n return util_js_1.util.objectValues(type.enum);\n } else if (type instanceof ZodDefault2) {\n return getDiscriminator2(type._def.innerType);\n } else if (type instanceof ZodUndefined2) {\n return [void 0];\n } else if (type instanceof ZodNull2) {\n return [null];\n } else if (type instanceof ZodOptional2) {\n return [void 0, ...getDiscriminator2(type.unwrap())];\n } else if (type instanceof ZodNullable2) {\n return [null, ...getDiscriminator2(type.unwrap())];\n } else if (type instanceof ZodBranded2) {\n return getDiscriminator2(type.unwrap());\n } else if (type instanceof ZodReadonly2) {\n return getDiscriminator2(type.unwrap());\n } else if (type instanceof ZodCatch2) {\n return getDiscriminator2(type._def.innerType);\n } else {\n return [];\n }\n };\n var ZodDiscriminatedUnion2 = class _ZodDiscriminatedUnion extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.object) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.object,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator]\n });\n return parseUtil_js_1.INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n } else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n const optionsMap = /* @__PURE__ */ new Map();\n for (const type of options) {\n const discriminatorValues = getDiscriminator2(type.shape[discriminator]);\n if (!discriminatorValues.length) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new _ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind2.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams2(params)\n });\n }\n };\n exports3.ZodDiscriminatedUnion = ZodDiscriminatedUnion2;\n function mergeValues2(a3, b4) {\n const aType = (0, util_js_1.getParsedType)(a3);\n const bType = (0, util_js_1.getParsedType)(b4);\n if (a3 === b4) {\n return { valid: true, data: a3 };\n } else if (aType === util_js_1.ZodParsedType.object && bType === util_js_1.ZodParsedType.object) {\n const bKeys = util_js_1.util.objectKeys(b4);\n const sharedKeys = util_js_1.util.objectKeys(a3).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a3, ...b4 };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues2(a3[key], b4[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n } else if (aType === util_js_1.ZodParsedType.array && bType === util_js_1.ZodParsedType.array) {\n if (a3.length !== b4.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index2 = 0; index2 < a3.length; index2++) {\n const itemA = a3[index2];\n const itemB = b4[index2];\n const sharedValue = mergeValues2(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n } else if (aType === util_js_1.ZodParsedType.date && bType === util_js_1.ZodParsedType.date && +a3 === +b4) {\n return { valid: true, data: a3 };\n } else {\n return { valid: false };\n }\n }\n var ZodIntersection2 = class extends ZodType2 {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if ((0, parseUtil_js_1.isAborted)(parsedLeft) || (0, parseUtil_js_1.isAborted)(parsedRight)) {\n return parseUtil_js_1.INVALID;\n }\n const merged = mergeValues2(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_intersection_types\n });\n return parseUtil_js_1.INVALID;\n }\n if ((0, parseUtil_js_1.isDirty)(parsedLeft) || (0, parseUtil_js_1.isDirty)(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n })\n ]).then(([left, right]) => handleParsed(left, right));\n } else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }));\n }\n }\n };\n exports3.ZodIntersection = ZodIntersection2;\n ZodIntersection2.create = (left, right, params) => {\n return new ZodIntersection2({\n left,\n right,\n typeName: ZodFirstPartyTypeKind2.ZodIntersection,\n ...processCreateParams2(params)\n });\n };\n var ZodTuple2 = class _ZodTuple extends ZodType2 {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.array) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.array,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\"\n });\n return parseUtil_js_1.INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\"\n });\n status.dirty();\n }\n const items = [...ctx.data].map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath2(ctx, item, ctx.path, itemIndex));\n }).filter((x4) => !!x4);\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return parseUtil_js_1.ParseStatus.mergeArray(status, results);\n });\n } else {\n return parseUtil_js_1.ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new _ZodTuple({\n ...this._def,\n rest\n });\n }\n };\n exports3.ZodTuple = ZodTuple2;\n ZodTuple2.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple2({\n items: schemas,\n typeName: ZodFirstPartyTypeKind2.ZodTuple,\n rest: null,\n ...processCreateParams2(params)\n });\n };\n var ZodRecord2 = class _ZodRecord extends ZodType2 {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.object) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.object,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath2(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath2(ctx, ctx.data[key], ctx.path, key)),\n alwaysSet: key in ctx.data\n });\n }\n if (ctx.common.async) {\n return parseUtil_js_1.ParseStatus.mergeObjectAsync(status, pairs);\n } else {\n return parseUtil_js_1.ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType2) {\n return new _ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind2.ZodRecord,\n ...processCreateParams2(third)\n });\n }\n return new _ZodRecord({\n keyType: ZodString2.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind2.ZodRecord,\n ...processCreateParams2(second)\n });\n }\n };\n exports3.ZodRecord = ZodRecord2;\n var ZodMap2 = class extends ZodType2 {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.map) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.map,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index2) => {\n return {\n key: keyType._parse(new ParseInputLazyPath2(ctx, key, ctx.path, [index2, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath2(ctx, value, ctx.path, [index2, \"value\"]))\n };\n });\n if (ctx.common.async) {\n const finalMap = /* @__PURE__ */ new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return parseUtil_js_1.INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n } else {\n const finalMap = /* @__PURE__ */ new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return parseUtil_js_1.INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n };\n exports3.ZodMap = ZodMap2;\n ZodMap2.create = (keyType, valueType, params) => {\n return new ZodMap2({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind2.ZodMap,\n ...processCreateParams2(params)\n });\n };\n var ZodSet2 = class _ZodSet extends ZodType2 {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.set) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.set,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements2) {\n const parsedSet = /* @__PURE__ */ new Set();\n for (const element of elements2) {\n if (element.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i3) => valueType._parse(new ParseInputLazyPath2(ctx, item, ctx.path, i3)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements2) => finalizeSet(elements2));\n } else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new _ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil_js_1.errorUtil.toString(message) }\n });\n }\n max(maxSize, message) {\n return new _ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil_js_1.errorUtil.toString(message) }\n });\n }\n size(size6, message) {\n return this.min(size6, message).max(size6, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n };\n exports3.ZodSet = ZodSet2;\n ZodSet2.create = (valueType, params) => {\n return new ZodSet2({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind2.ZodSet,\n ...processCreateParams2(params)\n });\n };\n var ZodFunction2 = class _ZodFunction extends ZodType2 {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.function) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.function,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n function makeArgsIssue(args, error) {\n return (0, parseUtil_js_1.makeIssue)({\n data: args,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, (0, errors_js_1.getErrorMap)(), errors_js_1.defaultErrorMap].filter((x4) => !!x4),\n issueData: {\n code: ZodError_js_1.ZodIssueCode.invalid_arguments,\n argumentsError: error\n }\n });\n }\n function makeReturnsIssue(returns, error) {\n return (0, parseUtil_js_1.makeIssue)({\n data: returns,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, (0, errors_js_1.getErrorMap)(), errors_js_1.defaultErrorMap].filter((x4) => !!x4),\n issueData: {\n code: ZodError_js_1.ZodIssueCode.invalid_return_type,\n returnTypeError: error\n }\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise2) {\n const me = this;\n return (0, parseUtil_js_1.OK)(async function(...args) {\n const error = new ZodError_js_1.ZodError([]);\n const parsedArgs = await me._def.args.parseAsync(args, params).catch((e2) => {\n error.addIssue(makeArgsIssue(args, e2));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e2) => {\n error.addIssue(makeReturnsIssue(result, e2));\n throw error;\n });\n return parsedReturns;\n });\n } else {\n const me = this;\n return (0, parseUtil_js_1.OK)(function(...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError_js_1.ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError_js_1.ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new _ZodFunction({\n ...this._def,\n args: ZodTuple2.create(items).rest(ZodUnknown2.create())\n });\n }\n returns(returnType) {\n return new _ZodFunction({\n ...this._def,\n returns: returnType\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new _ZodFunction({\n args: args ? args : ZodTuple2.create([]).rest(ZodUnknown2.create()),\n returns: returns || ZodUnknown2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodFunction,\n ...processCreateParams2(params)\n });\n }\n };\n exports3.ZodFunction = ZodFunction2;\n var ZodLazy2 = class extends ZodType2 {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n };\n exports3.ZodLazy = ZodLazy2;\n ZodLazy2.create = (getter, params) => {\n return new ZodLazy2({\n getter,\n typeName: ZodFirstPartyTypeKind2.ZodLazy,\n ...processCreateParams2(params)\n });\n };\n var ZodLiteral2 = class extends ZodType2 {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_js_1.ZodIssueCode.invalid_literal,\n expected: this._def.value\n });\n return parseUtil_js_1.INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n };\n exports3.ZodLiteral = ZodLiteral2;\n ZodLiteral2.create = (value, params) => {\n return new ZodLiteral2({\n value,\n typeName: ZodFirstPartyTypeKind2.ZodLiteral,\n ...processCreateParams2(params)\n });\n };\n function createZodEnum2(values, params) {\n return new ZodEnum2({\n values,\n typeName: ZodFirstPartyTypeKind2.ZodEnum,\n ...processCreateParams2(params)\n });\n }\n var ZodEnum2 = class _ZodEnum extends ZodType2 {\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n expected: util_js_1.util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodError_js_1.ZodIssueCode.invalid_type\n });\n return parseUtil_js_1.INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(this._def.values);\n }\n if (!this._cache.has(input.data)) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_js_1.ZodIssueCode.invalid_enum_value,\n options: expectedValues\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values, newDef = this._def) {\n return _ZodEnum.create(values, {\n ...this._def,\n ...newDef\n });\n }\n exclude(values, newDef = this._def) {\n return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {\n ...this._def,\n ...newDef\n });\n }\n };\n exports3.ZodEnum = ZodEnum2;\n ZodEnum2.create = createZodEnum2;\n var ZodNativeEnum2 = class extends ZodType2 {\n _parse(input) {\n const nativeEnumValues = util_js_1.util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.string && ctx.parsedType !== util_js_1.ZodParsedType.number) {\n const expectedValues = util_js_1.util.objectValues(nativeEnumValues);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n expected: util_js_1.util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodError_js_1.ZodIssueCode.invalid_type\n });\n return parseUtil_js_1.INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(util_js_1.util.getValidEnumValues(this._def.values));\n }\n if (!this._cache.has(input.data)) {\n const expectedValues = util_js_1.util.objectValues(nativeEnumValues);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_js_1.ZodIssueCode.invalid_enum_value,\n options: expectedValues\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n get enum() {\n return this._def.values;\n }\n };\n exports3.ZodNativeEnum = ZodNativeEnum2;\n ZodNativeEnum2.create = (values, params) => {\n return new ZodNativeEnum2({\n values,\n typeName: ZodFirstPartyTypeKind2.ZodNativeEnum,\n ...processCreateParams2(params)\n });\n };\n var ZodPromise2 = class extends ZodType2 {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.promise && ctx.common.async === false) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.promise,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const promisified = ctx.parsedType === util_js_1.ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);\n return (0, parseUtil_js_1.OK)(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap\n });\n }));\n }\n };\n exports3.ZodPromise = ZodPromise2;\n ZodPromise2.create = (schema, params) => {\n return new ZodPromise2({\n type: schema,\n typeName: ZodFirstPartyTypeKind2.ZodPromise,\n ...processCreateParams2(params)\n });\n };\n var ZodEffects2 = class extends ZodType2 {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind2.ZodEffects ? this._def.schema.sourceType() : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n (0, parseUtil_js_1.addIssueToContext)(ctx, arg);\n if (arg.fatal) {\n status.abort();\n } else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n }\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(processed).then(async (processed2) => {\n if (status.value === \"aborted\")\n return parseUtil_js_1.INVALID;\n const result = await this._def.schema._parseAsync({\n data: processed2,\n path: ctx.path,\n parent: ctx\n });\n if (result.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (result.status === \"dirty\")\n return (0, parseUtil_js_1.DIRTY)(result.value);\n if (status.value === \"dirty\")\n return (0, parseUtil_js_1.DIRTY)(result.value);\n return result;\n });\n } else {\n if (status.value === \"aborted\")\n return parseUtil_js_1.INVALID;\n const result = this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx\n });\n if (result.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (result.status === \"dirty\")\n return (0, parseUtil_js_1.DIRTY)(result.value);\n if (status.value === \"dirty\")\n return (0, parseUtil_js_1.DIRTY)(result.value);\n return result;\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inner.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n } else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => {\n if (inner.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base4 = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (!(0, parseUtil_js_1.isValid)(base4))\n return parseUtil_js_1.INVALID;\n const result = effect.transform(base4.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n } else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base4) => {\n if (!(0, parseUtil_js_1.isValid)(base4))\n return parseUtil_js_1.INVALID;\n return Promise.resolve(effect.transform(base4.value, checkCtx)).then((result) => ({\n status: status.value,\n value: result\n }));\n });\n }\n }\n util_js_1.util.assertNever(effect);\n }\n };\n exports3.ZodEffects = ZodEffects2;\n exports3.ZodTransformer = ZodEffects2;\n ZodEffects2.create = (schema, effect, params) => {\n return new ZodEffects2({\n schema,\n typeName: ZodFirstPartyTypeKind2.ZodEffects,\n effect,\n ...processCreateParams2(params)\n });\n };\n ZodEffects2.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects2({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind2.ZodEffects,\n ...processCreateParams2(params)\n });\n };\n var ZodOptional2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === util_js_1.ZodParsedType.undefined) {\n return (0, parseUtil_js_1.OK)(void 0);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n exports3.ZodOptional = ZodOptional2;\n ZodOptional2.create = (type, params) => {\n return new ZodOptional2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodOptional,\n ...processCreateParams2(params)\n });\n };\n var ZodNullable2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === util_js_1.ZodParsedType.null) {\n return (0, parseUtil_js_1.OK)(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n exports3.ZodNullable = ZodNullable2;\n ZodNullable2.create = (type, params) => {\n return new ZodNullable2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodNullable,\n ...processCreateParams2(params)\n });\n };\n var ZodDefault2 = class extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === util_js_1.ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n };\n exports3.ZodDefault = ZodDefault2;\n ZodDefault2.create = (type, params) => {\n return new ZodDefault2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodDefault,\n defaultValue: typeof params.default === \"function\" ? params.default : () => params.default,\n ...processCreateParams2(params)\n });\n };\n var ZodCatch2 = class extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n }\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx\n }\n });\n if ((0, parseUtil_js_1.isAsync)(result)) {\n return result.then((result2) => {\n return {\n status: \"valid\",\n value: result2.status === \"valid\" ? result2.value : this._def.catchValue({\n get error() {\n return new ZodError_js_1.ZodError(newCtx.common.issues);\n },\n input: newCtx.data\n })\n };\n });\n } else {\n return {\n status: \"valid\",\n value: result.status === \"valid\" ? result.value : this._def.catchValue({\n get error() {\n return new ZodError_js_1.ZodError(newCtx.common.issues);\n },\n input: newCtx.data\n })\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n };\n exports3.ZodCatch = ZodCatch2;\n ZodCatch2.create = (type, params) => {\n return new ZodCatch2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams2(params)\n });\n };\n var ZodNaN2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.nan,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n };\n exports3.ZodNaN = ZodNaN2;\n ZodNaN2.create = (params) => {\n return new ZodNaN2({\n typeName: ZodFirstPartyTypeKind2.ZodNaN,\n ...processCreateParams2(params)\n });\n };\n exports3.BRAND = Symbol(\"zod_brand\");\n var ZodBranded2 = class extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx\n });\n }\n unwrap() {\n return this._def.type;\n }\n };\n exports3.ZodBranded = ZodBranded2;\n var ZodPipeline2 = class _ZodPipeline extends ZodType2 {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inResult.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return (0, parseUtil_js_1.DIRTY)(inResult.value);\n } else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx\n });\n }\n };\n return handleAsync();\n } else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inResult.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value\n };\n } else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx\n });\n }\n }\n }\n static create(a3, b4) {\n return new _ZodPipeline({\n in: a3,\n out: b4,\n typeName: ZodFirstPartyTypeKind2.ZodPipeline\n });\n }\n };\n exports3.ZodPipeline = ZodPipeline2;\n var ZodReadonly2 = class extends ZodType2 {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n const freeze = (data) => {\n if ((0, parseUtil_js_1.isValid)(data)) {\n data.value = Object.freeze(data.value);\n }\n return data;\n };\n return (0, parseUtil_js_1.isAsync)(result) ? result.then((data) => freeze(data)) : freeze(result);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n exports3.ZodReadonly = ZodReadonly2;\n ZodReadonly2.create = (type, params) => {\n return new ZodReadonly2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodReadonly,\n ...processCreateParams2(params)\n });\n };\n function cleanParams2(params, data) {\n const p4 = typeof params === \"function\" ? params(data) : typeof params === \"string\" ? { message: params } : params;\n const p22 = typeof p4 === \"string\" ? { message: p4 } : p4;\n return p22;\n }\n function custom3(check, _params = {}, fatal) {\n if (check)\n return ZodAny2.create().superRefine((data, ctx) => {\n const r2 = check(data);\n if (r2 instanceof Promise) {\n return r2.then((r3) => {\n if (!r3) {\n const params = cleanParams2(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n });\n }\n if (!r2) {\n const params = cleanParams2(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n return;\n });\n return ZodAny2.create();\n }\n exports3.late = {\n object: ZodObject2.lazycreate\n };\n var ZodFirstPartyTypeKind2;\n (function(ZodFirstPartyTypeKind3) {\n ZodFirstPartyTypeKind3[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind3[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind3[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind3[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind3[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind3[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind3[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind3[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind3[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind3[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind3[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind3[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind3[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind3[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind3[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind3[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind3[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind3[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind3[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind3[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind3[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind3[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind3[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind3[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind3[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind3[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind3[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind3[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind3[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind3[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind3[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind3[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind3[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind3[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind3[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind3[\"ZodReadonly\"] = \"ZodReadonly\";\n })(ZodFirstPartyTypeKind2 || (exports3.ZodFirstPartyTypeKind = ZodFirstPartyTypeKind2 = {}));\n var instanceOfType2 = (cls, params = {\n message: `Input not instance of ${cls.name}`\n }) => custom3((data) => data instanceof cls, params);\n exports3.instanceof = instanceOfType2;\n var stringType2 = ZodString2.create;\n exports3.string = stringType2;\n var numberType2 = ZodNumber2.create;\n exports3.number = numberType2;\n var nanType2 = ZodNaN2.create;\n exports3.nan = nanType2;\n var bigIntType2 = ZodBigInt2.create;\n exports3.bigint = bigIntType2;\n var booleanType2 = ZodBoolean2.create;\n exports3.boolean = booleanType2;\n var dateType2 = ZodDate2.create;\n exports3.date = dateType2;\n var symbolType2 = ZodSymbol2.create;\n exports3.symbol = symbolType2;\n var undefinedType2 = ZodUndefined2.create;\n exports3.undefined = undefinedType2;\n var nullType2 = ZodNull2.create;\n exports3.null = nullType2;\n var anyType2 = ZodAny2.create;\n exports3.any = anyType2;\n var unknownType2 = ZodUnknown2.create;\n exports3.unknown = unknownType2;\n var neverType2 = ZodNever2.create;\n exports3.never = neverType2;\n var voidType2 = ZodVoid2.create;\n exports3.void = voidType2;\n var arrayType2 = ZodArray2.create;\n exports3.array = arrayType2;\n var objectType2 = ZodObject2.create;\n exports3.object = objectType2;\n var strictObjectType2 = ZodObject2.strictCreate;\n exports3.strictObject = strictObjectType2;\n var unionType2 = ZodUnion2.create;\n exports3.union = unionType2;\n var discriminatedUnionType2 = ZodDiscriminatedUnion2.create;\n exports3.discriminatedUnion = discriminatedUnionType2;\n var intersectionType2 = ZodIntersection2.create;\n exports3.intersection = intersectionType2;\n var tupleType2 = ZodTuple2.create;\n exports3.tuple = tupleType2;\n var recordType2 = ZodRecord2.create;\n exports3.record = recordType2;\n var mapType2 = ZodMap2.create;\n exports3.map = mapType2;\n var setType2 = ZodSet2.create;\n exports3.set = setType2;\n var functionType2 = ZodFunction2.create;\n exports3.function = functionType2;\n var lazyType2 = ZodLazy2.create;\n exports3.lazy = lazyType2;\n var literalType2 = ZodLiteral2.create;\n exports3.literal = literalType2;\n var enumType2 = ZodEnum2.create;\n exports3.enum = enumType2;\n var nativeEnumType2 = ZodNativeEnum2.create;\n exports3.nativeEnum = nativeEnumType2;\n var promiseType2 = ZodPromise2.create;\n exports3.promise = promiseType2;\n var effectsType2 = ZodEffects2.create;\n exports3.effect = effectsType2;\n exports3.transformer = effectsType2;\n var optionalType2 = ZodOptional2.create;\n exports3.optional = optionalType2;\n var nullableType2 = ZodNullable2.create;\n exports3.nullable = nullableType2;\n var preprocessType2 = ZodEffects2.createWithPreprocess;\n exports3.preprocess = preprocessType2;\n var pipelineType2 = ZodPipeline2.create;\n exports3.pipeline = pipelineType2;\n var ostring2 = () => stringType2().optional();\n exports3.ostring = ostring2;\n var onumber2 = () => numberType2().optional();\n exports3.onumber = onumber2;\n var oboolean2 = () => booleanType2().optional();\n exports3.oboolean = oboolean2;\n exports3.coerce = {\n string: (arg) => ZodString2.create({ ...arg, coerce: true }),\n number: (arg) => ZodNumber2.create({ ...arg, coerce: true }),\n boolean: (arg) => ZodBoolean2.create({\n ...arg,\n coerce: true\n }),\n bigint: (arg) => ZodBigInt2.create({ ...arg, coerce: true }),\n date: (arg) => ZodDate2.create({ ...arg, coerce: true })\n };\n exports3.NEVER = parseUtil_js_1.INVALID;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/external.js\n var require_external = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/external.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding4 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __exportStar4 = exports3 && exports3.__exportStar || function(m2, exports4) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(exports4, p4))\n __createBinding4(exports4, m2, p4);\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n __exportStar4(require_errors(), exports3);\n __exportStar4(require_parseUtil(), exports3);\n __exportStar4(require_typeAliases(), exports3);\n __exportStar4(require_util(), exports3);\n __exportStar4(require_types(), exports3);\n __exportStar4(require_ZodError(), exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/index.js\n var require_v3 = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding4 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar4 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding4(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n var __exportStar4 = exports3 && exports3.__exportStar || function(m2, exports4) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(exports4, p4))\n __createBinding4(exports4, m2, p4);\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.z = void 0;\n var z2 = __importStar4(require_external());\n exports3.z = z2;\n __exportStar4(require_external(), exports3);\n exports3.default = z2;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/index.js\n var require_cjs = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding4 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __exportStar4 = exports3 && exports3.__exportStar || function(m2, exports4) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(exports4, p4))\n __createBinding4(exports4, m2, p4);\n };\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var index_js_1 = __importDefault4(require_v3());\n __exportStar4(require_v3(), exports3);\n exports3.default = index_js_1.default;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js\n var require_constants = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SEMVER_SPEC_VERSION = \"2.0.0\";\n var MAX_LENGTH = 256;\n var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */\n 9007199254740991;\n var MAX_SAFE_COMPONENT_LENGTH = 16;\n var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;\n var RELEASE_TYPES = [\n \"major\",\n \"premajor\",\n \"minor\",\n \"preminor\",\n \"patch\",\n \"prepatch\",\n \"prerelease\"\n ];\n module.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 1,\n FLAG_LOOSE: 2\n };\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js\n var require_debug = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var debug = typeof process_exports === \"object\" && process_exports.env && process_exports.env.NODE_DEBUG && /\\bsemver\\b/i.test(process_exports.env.NODE_DEBUG) ? (...args) => console.error(\"SEMVER\", ...args) : () => {\n };\n module.exports = debug;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js\n var require_re = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH\n } = require_constants();\n var debug = require_debug();\n exports3 = module.exports = {};\n var re = exports3.re = [];\n var safeRe = exports3.safeRe = [];\n var src = exports3.src = [];\n var safeSrc = exports3.safeSrc = [];\n var t3 = exports3.t = {};\n var R3 = 0;\n var LETTERDASHNUMBER = \"[a-zA-Z0-9-]\";\n var safeRegexReplacements = [\n [\"\\\\s\", 1],\n [\"\\\\d\", MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]\n ];\n var makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);\n }\n return value;\n };\n var createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value);\n const index2 = R3++;\n debug(name, index2, value);\n t3[name] = index2;\n src[index2] = value;\n safeSrc[index2] = safe;\n re[index2] = new RegExp(value, isGlobal ? \"g\" : void 0);\n safeRe[index2] = new RegExp(safe, isGlobal ? \"g\" : void 0);\n };\n createToken(\"NUMERICIDENTIFIER\", \"0|[1-9]\\\\d*\");\n createToken(\"NUMERICIDENTIFIERLOOSE\", \"\\\\d+\");\n createToken(\"NONNUMERICIDENTIFIER\", `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);\n createToken(\"MAINVERSION\", `(${src[t3.NUMERICIDENTIFIER]})\\\\.(${src[t3.NUMERICIDENTIFIER]})\\\\.(${src[t3.NUMERICIDENTIFIER]})`);\n createToken(\"MAINVERSIONLOOSE\", `(${src[t3.NUMERICIDENTIFIERLOOSE]})\\\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})\\\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})`);\n createToken(\"PRERELEASEIDENTIFIER\", `(?:${src[t3.NONNUMERICIDENTIFIER]}|${src[t3.NUMERICIDENTIFIER]})`);\n createToken(\"PRERELEASEIDENTIFIERLOOSE\", `(?:${src[t3.NONNUMERICIDENTIFIER]}|${src[t3.NUMERICIDENTIFIERLOOSE]})`);\n createToken(\"PRERELEASE\", `(?:-(${src[t3.PRERELEASEIDENTIFIER]}(?:\\\\.${src[t3.PRERELEASEIDENTIFIER]})*))`);\n createToken(\"PRERELEASELOOSE\", `(?:-?(${src[t3.PRERELEASEIDENTIFIERLOOSE]}(?:\\\\.${src[t3.PRERELEASEIDENTIFIERLOOSE]})*))`);\n createToken(\"BUILDIDENTIFIER\", `${LETTERDASHNUMBER}+`);\n createToken(\"BUILD\", `(?:\\\\+(${src[t3.BUILDIDENTIFIER]}(?:\\\\.${src[t3.BUILDIDENTIFIER]})*))`);\n createToken(\"FULLPLAIN\", `v?${src[t3.MAINVERSION]}${src[t3.PRERELEASE]}?${src[t3.BUILD]}?`);\n createToken(\"FULL\", `^${src[t3.FULLPLAIN]}$`);\n createToken(\"LOOSEPLAIN\", `[v=\\\\s]*${src[t3.MAINVERSIONLOOSE]}${src[t3.PRERELEASELOOSE]}?${src[t3.BUILD]}?`);\n createToken(\"LOOSE\", `^${src[t3.LOOSEPLAIN]}$`);\n createToken(\"GTLT\", \"((?:<|>)?=?)\");\n createToken(\"XRANGEIDENTIFIERLOOSE\", `${src[t3.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`);\n createToken(\"XRANGEIDENTIFIER\", `${src[t3.NUMERICIDENTIFIER]}|x|X|\\\\*`);\n createToken(\"XRANGEPLAIN\", `[v=\\\\s]*(${src[t3.XRANGEIDENTIFIER]})(?:\\\\.(${src[t3.XRANGEIDENTIFIER]})(?:\\\\.(${src[t3.XRANGEIDENTIFIER]})(?:${src[t3.PRERELEASE]})?${src[t3.BUILD]}?)?)?`);\n createToken(\"XRANGEPLAINLOOSE\", `[v=\\\\s]*(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:${src[t3.PRERELEASELOOSE]})?${src[t3.BUILD]}?)?)?`);\n createToken(\"XRANGE\", `^${src[t3.GTLT]}\\\\s*${src[t3.XRANGEPLAIN]}$`);\n createToken(\"XRANGELOOSE\", `^${src[t3.GTLT]}\\\\s*${src[t3.XRANGEPLAINLOOSE]}$`);\n createToken(\"COERCEPLAIN\", `${\"(^|[^\\\\d])(\\\\d{1,\"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);\n createToken(\"COERCE\", `${src[t3.COERCEPLAIN]}(?:$|[^\\\\d])`);\n createToken(\"COERCEFULL\", src[t3.COERCEPLAIN] + `(?:${src[t3.PRERELEASE]})?(?:${src[t3.BUILD]})?(?:$|[^\\\\d])`);\n createToken(\"COERCERTL\", src[t3.COERCE], true);\n createToken(\"COERCERTLFULL\", src[t3.COERCEFULL], true);\n createToken(\"LONETILDE\", \"(?:~>?)\");\n createToken(\"TILDETRIM\", `(\\\\s*)${src[t3.LONETILDE]}\\\\s+`, true);\n exports3.tildeTrimReplace = \"$1~\";\n createToken(\"TILDE\", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAIN]}$`);\n createToken(\"TILDELOOSE\", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAINLOOSE]}$`);\n createToken(\"LONECARET\", \"(?:\\\\^)\");\n createToken(\"CARETTRIM\", `(\\\\s*)${src[t3.LONECARET]}\\\\s+`, true);\n exports3.caretTrimReplace = \"$1^\";\n createToken(\"CARET\", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAIN]}$`);\n createToken(\"CARETLOOSE\", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAINLOOSE]}$`);\n createToken(\"COMPARATORLOOSE\", `^${src[t3.GTLT]}\\\\s*(${src[t3.LOOSEPLAIN]})$|^$`);\n createToken(\"COMPARATOR\", `^${src[t3.GTLT]}\\\\s*(${src[t3.FULLPLAIN]})$|^$`);\n createToken(\"COMPARATORTRIM\", `(\\\\s*)${src[t3.GTLT]}\\\\s*(${src[t3.LOOSEPLAIN]}|${src[t3.XRANGEPLAIN]})`, true);\n exports3.comparatorTrimReplace = \"$1$2$3\";\n createToken(\"HYPHENRANGE\", `^\\\\s*(${src[t3.XRANGEPLAIN]})\\\\s+-\\\\s+(${src[t3.XRANGEPLAIN]})\\\\s*$`);\n createToken(\"HYPHENRANGELOOSE\", `^\\\\s*(${src[t3.XRANGEPLAINLOOSE]})\\\\s+-\\\\s+(${src[t3.XRANGEPLAINLOOSE]})\\\\s*$`);\n createToken(\"STAR\", \"(<|>)?=?\\\\s*\\\\*\");\n createToken(\"GTE0\", \"^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$\");\n createToken(\"GTE0PRE\", \"^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$\");\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js\n var require_parse_options = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var looseOption = Object.freeze({ loose: true });\n var emptyOpts = Object.freeze({});\n var parseOptions = (options) => {\n if (!options) {\n return emptyOpts;\n }\n if (typeof options !== \"object\") {\n return looseOption;\n }\n return options;\n };\n module.exports = parseOptions;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js\n var require_identifiers = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var numeric = /^[0-9]+$/;\n var compareIdentifiers = (a3, b4) => {\n const anum2 = numeric.test(a3);\n const bnum = numeric.test(b4);\n if (anum2 && bnum) {\n a3 = +a3;\n b4 = +b4;\n }\n return a3 === b4 ? 0 : anum2 && !bnum ? -1 : bnum && !anum2 ? 1 : a3 < b4 ? -1 : 1;\n };\n var rcompareIdentifiers = (a3, b4) => compareIdentifiers(b4, a3);\n module.exports = {\n compareIdentifiers,\n rcompareIdentifiers\n };\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js\n var require_semver = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var debug = require_debug();\n var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();\n var { safeRe: re, t: t3 } = require_re();\n var parseOptions = require_parse_options();\n var { compareIdentifiers } = require_identifiers();\n var SemVer = class _SemVer {\n constructor(version7, options) {\n options = parseOptions(options);\n if (version7 instanceof _SemVer) {\n if (version7.loose === !!options.loose && version7.includePrerelease === !!options.includePrerelease) {\n return version7;\n } else {\n version7 = version7.version;\n }\n } else if (typeof version7 !== \"string\") {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version7}\".`);\n }\n if (version7.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n );\n }\n debug(\"SemVer\", version7, options);\n this.options = options;\n this.loose = !!options.loose;\n this.includePrerelease = !!options.includePrerelease;\n const m2 = version7.trim().match(options.loose ? re[t3.LOOSE] : re[t3.FULL]);\n if (!m2) {\n throw new TypeError(`Invalid Version: ${version7}`);\n }\n this.raw = version7;\n this.major = +m2[1];\n this.minor = +m2[2];\n this.patch = +m2[3];\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError(\"Invalid major version\");\n }\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError(\"Invalid minor version\");\n }\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError(\"Invalid patch version\");\n }\n if (!m2[4]) {\n this.prerelease = [];\n } else {\n this.prerelease = m2[4].split(\".\").map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num2 = +id;\n if (num2 >= 0 && num2 < MAX_SAFE_INTEGER) {\n return num2;\n }\n }\n return id;\n });\n }\n this.build = m2[5] ? m2[5].split(\".\") : [];\n this.format();\n }\n format() {\n this.version = `${this.major}.${this.minor}.${this.patch}`;\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join(\".\")}`;\n }\n return this.version;\n }\n toString() {\n return this.version;\n }\n compare(other) {\n debug(\"SemVer.compare\", this.version, this.options, other);\n if (!(other instanceof _SemVer)) {\n if (typeof other === \"string\" && other === this.version) {\n return 0;\n }\n other = new _SemVer(other, this.options);\n }\n if (other.version === this.version) {\n return 0;\n }\n return this.compareMain(other) || this.comparePre(other);\n }\n compareMain(other) {\n if (!(other instanceof _SemVer)) {\n other = new _SemVer(other, this.options);\n }\n return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);\n }\n comparePre(other) {\n if (!(other instanceof _SemVer)) {\n other = new _SemVer(other, this.options);\n }\n if (this.prerelease.length && !other.prerelease.length) {\n return -1;\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1;\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0;\n }\n let i3 = 0;\n do {\n const a3 = this.prerelease[i3];\n const b4 = other.prerelease[i3];\n debug(\"prerelease compare\", i3, a3, b4);\n if (a3 === void 0 && b4 === void 0) {\n return 0;\n } else if (b4 === void 0) {\n return 1;\n } else if (a3 === void 0) {\n return -1;\n } else if (a3 === b4) {\n continue;\n } else {\n return compareIdentifiers(a3, b4);\n }\n } while (++i3);\n }\n compareBuild(other) {\n if (!(other instanceof _SemVer)) {\n other = new _SemVer(other, this.options);\n }\n let i3 = 0;\n do {\n const a3 = this.build[i3];\n const b4 = other.build[i3];\n debug(\"build compare\", i3, a3, b4);\n if (a3 === void 0 && b4 === void 0) {\n return 0;\n } else if (b4 === void 0) {\n return 1;\n } else if (a3 === void 0) {\n return -1;\n } else if (a3 === b4) {\n continue;\n } else {\n return compareIdentifiers(a3, b4);\n }\n } while (++i3);\n }\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc(release2, identifier, identifierBase) {\n if (release2.startsWith(\"pre\")) {\n if (!identifier && identifierBase === false) {\n throw new Error(\"invalid increment argument: identifier is empty\");\n }\n if (identifier) {\n const match = `-${identifier}`.match(this.options.loose ? re[t3.PRERELEASELOOSE] : re[t3.PRERELEASE]);\n if (!match || match[1] !== identifier) {\n throw new Error(`invalid identifier: ${identifier}`);\n }\n }\n }\n switch (release2) {\n case \"premajor\":\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor = 0;\n this.major++;\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"preminor\":\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor++;\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"prepatch\":\n this.prerelease.length = 0;\n this.inc(\"patch\", identifier, identifierBase);\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"prerelease\":\n if (this.prerelease.length === 0) {\n this.inc(\"patch\", identifier, identifierBase);\n }\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"release\":\n if (this.prerelease.length === 0) {\n throw new Error(`version ${this.raw} is not a prerelease`);\n }\n this.prerelease.length = 0;\n break;\n case \"major\":\n if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {\n this.major++;\n }\n this.minor = 0;\n this.patch = 0;\n this.prerelease = [];\n break;\n case \"minor\":\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++;\n }\n this.patch = 0;\n this.prerelease = [];\n break;\n case \"patch\":\n if (this.prerelease.length === 0) {\n this.patch++;\n }\n this.prerelease = [];\n break;\n case \"pre\": {\n const base4 = Number(identifierBase) ? 1 : 0;\n if (this.prerelease.length === 0) {\n this.prerelease = [base4];\n } else {\n let i3 = this.prerelease.length;\n while (--i3 >= 0) {\n if (typeof this.prerelease[i3] === \"number\") {\n this.prerelease[i3]++;\n i3 = -2;\n }\n }\n if (i3 === -1) {\n if (identifier === this.prerelease.join(\".\") && identifierBase === false) {\n throw new Error(\"invalid increment argument: identifier already exists\");\n }\n this.prerelease.push(base4);\n }\n }\n if (identifier) {\n let prerelease = [identifier, base4];\n if (identifierBase === false) {\n prerelease = [identifier];\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease;\n }\n } else {\n this.prerelease = prerelease;\n }\n }\n break;\n }\n default:\n throw new Error(`invalid increment argument: ${release2}`);\n }\n this.raw = this.format();\n if (this.build.length) {\n this.raw += `+${this.build.join(\".\")}`;\n }\n return this;\n }\n };\n module.exports = SemVer;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js\n var require_parse = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var parse2 = (version7, options, throwErrors = false) => {\n if (version7 instanceof SemVer) {\n return version7;\n }\n try {\n return new SemVer(version7, options);\n } catch (er) {\n if (!throwErrors) {\n return null;\n }\n throw er;\n }\n };\n module.exports = parse2;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js\n var require_valid = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var parse2 = require_parse();\n var valid = (version7, options) => {\n const v2 = parse2(version7, options);\n return v2 ? v2.version : null;\n };\n module.exports = valid;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js\n var require_clean = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var parse2 = require_parse();\n var clean2 = (version7, options) => {\n const s4 = parse2(version7.trim().replace(/^[=v]+/, \"\"), options);\n return s4 ? s4.version : null;\n };\n module.exports = clean2;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js\n var require_inc = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var inc = (version7, release2, options, identifier, identifierBase) => {\n if (typeof options === \"string\") {\n identifierBase = identifier;\n identifier = options;\n options = void 0;\n }\n try {\n return new SemVer(\n version7 instanceof SemVer ? version7.version : version7,\n options\n ).inc(release2, identifier, identifierBase).version;\n } catch (er) {\n return null;\n }\n };\n module.exports = inc;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js\n var require_diff = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var parse2 = require_parse();\n var diff = (version1, version22) => {\n const v12 = parse2(version1, null, true);\n const v2 = parse2(version22, null, true);\n const comparison = v12.compare(v2);\n if (comparison === 0) {\n return null;\n }\n const v1Higher = comparison > 0;\n const highVersion = v1Higher ? v12 : v2;\n const lowVersion = v1Higher ? v2 : v12;\n const highHasPre = !!highVersion.prerelease.length;\n const lowHasPre = !!lowVersion.prerelease.length;\n if (lowHasPre && !highHasPre) {\n if (!lowVersion.patch && !lowVersion.minor) {\n return \"major\";\n }\n if (lowVersion.compareMain(highVersion) === 0) {\n if (lowVersion.minor && !lowVersion.patch) {\n return \"minor\";\n }\n return \"patch\";\n }\n }\n const prefix = highHasPre ? \"pre\" : \"\";\n if (v12.major !== v2.major) {\n return prefix + \"major\";\n }\n if (v12.minor !== v2.minor) {\n return prefix + \"minor\";\n }\n if (v12.patch !== v2.patch) {\n return prefix + \"patch\";\n }\n return \"prerelease\";\n };\n module.exports = diff;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js\n var require_major = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var major = (a3, loose) => new SemVer(a3, loose).major;\n module.exports = major;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js\n var require_minor = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var minor = (a3, loose) => new SemVer(a3, loose).minor;\n module.exports = minor;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js\n var require_patch = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var patch = (a3, loose) => new SemVer(a3, loose).patch;\n module.exports = patch;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js\n var require_prerelease = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var parse2 = require_parse();\n var prerelease = (version7, options) => {\n const parsed = parse2(version7, options);\n return parsed && parsed.prerelease.length ? parsed.prerelease : null;\n };\n module.exports = prerelease;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js\n var require_compare = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var compare = (a3, b4, loose) => new SemVer(a3, loose).compare(new SemVer(b4, loose));\n module.exports = compare;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js\n var require_rcompare = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var rcompare = (a3, b4, loose) => compare(b4, a3, loose);\n module.exports = rcompare;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js\n var require_compare_loose = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var compareLoose = (a3, b4) => compare(a3, b4, true);\n module.exports = compareLoose;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js\n var require_compare_build = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var compareBuild = (a3, b4, loose) => {\n const versionA = new SemVer(a3, loose);\n const versionB = new SemVer(b4, loose);\n return versionA.compare(versionB) || versionA.compareBuild(versionB);\n };\n module.exports = compareBuild;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js\n var require_sort = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compareBuild = require_compare_build();\n var sort = (list, loose) => list.sort((a3, b4) => compareBuild(a3, b4, loose));\n module.exports = sort;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js\n var require_rsort = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compareBuild = require_compare_build();\n var rsort = (list, loose) => list.sort((a3, b4) => compareBuild(b4, a3, loose));\n module.exports = rsort;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js\n var require_gt = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var gt = (a3, b4, loose) => compare(a3, b4, loose) > 0;\n module.exports = gt;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js\n var require_lt = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var lt = (a3, b4, loose) => compare(a3, b4, loose) < 0;\n module.exports = lt;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js\n var require_eq = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var eq = (a3, b4, loose) => compare(a3, b4, loose) === 0;\n module.exports = eq;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js\n var require_neq = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var neq = (a3, b4, loose) => compare(a3, b4, loose) !== 0;\n module.exports = neq;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js\n var require_gte = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var gte = (a3, b4, loose) => compare(a3, b4, loose) >= 0;\n module.exports = gte;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js\n var require_lte = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var lte = (a3, b4, loose) => compare(a3, b4, loose) <= 0;\n module.exports = lte;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js\n var require_cmp = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var eq = require_eq();\n var neq = require_neq();\n var gt = require_gt();\n var gte = require_gte();\n var lt = require_lt();\n var lte = require_lte();\n var cmp = (a3, op, b4, loose) => {\n switch (op) {\n case \"===\":\n if (typeof a3 === \"object\") {\n a3 = a3.version;\n }\n if (typeof b4 === \"object\") {\n b4 = b4.version;\n }\n return a3 === b4;\n case \"!==\":\n if (typeof a3 === \"object\") {\n a3 = a3.version;\n }\n if (typeof b4 === \"object\") {\n b4 = b4.version;\n }\n return a3 !== b4;\n case \"\":\n case \"=\":\n case \"==\":\n return eq(a3, b4, loose);\n case \"!=\":\n return neq(a3, b4, loose);\n case \">\":\n return gt(a3, b4, loose);\n case \">=\":\n return gte(a3, b4, loose);\n case \"<\":\n return lt(a3, b4, loose);\n case \"<=\":\n return lte(a3, b4, loose);\n default:\n throw new TypeError(`Invalid operator: ${op}`);\n }\n };\n module.exports = cmp;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js\n var require_coerce = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var parse2 = require_parse();\n var { safeRe: re, t: t3 } = require_re();\n var coerce2 = (version7, options) => {\n if (version7 instanceof SemVer) {\n return version7;\n }\n if (typeof version7 === \"number\") {\n version7 = String(version7);\n }\n if (typeof version7 !== \"string\") {\n return null;\n }\n options = options || {};\n let match = null;\n if (!options.rtl) {\n match = version7.match(options.includePrerelease ? re[t3.COERCEFULL] : re[t3.COERCE]);\n } else {\n const coerceRtlRegex = options.includePrerelease ? re[t3.COERCERTLFULL] : re[t3.COERCERTL];\n let next;\n while ((next = coerceRtlRegex.exec(version7)) && (!match || match.index + match[0].length !== version7.length)) {\n if (!match || next.index + next[0].length !== match.index + match[0].length) {\n match = next;\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;\n }\n coerceRtlRegex.lastIndex = -1;\n }\n if (match === null) {\n return null;\n }\n const major = match[2];\n const minor = match[3] || \"0\";\n const patch = match[4] || \"0\";\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : \"\";\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : \"\";\n return parse2(`${major}.${minor}.${patch}${prerelease}${build}`, options);\n };\n module.exports = coerce2;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js\n var require_lrucache = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var LRUCache = class {\n constructor() {\n this.max = 1e3;\n this.map = /* @__PURE__ */ new Map();\n }\n get(key) {\n const value = this.map.get(key);\n if (value === void 0) {\n return void 0;\n } else {\n this.map.delete(key);\n this.map.set(key, value);\n return value;\n }\n }\n delete(key) {\n return this.map.delete(key);\n }\n set(key, value) {\n const deleted = this.delete(key);\n if (!deleted && value !== void 0) {\n if (this.map.size >= this.max) {\n const firstKey = this.map.keys().next().value;\n this.delete(firstKey);\n }\n this.map.set(key, value);\n }\n return this;\n }\n };\n module.exports = LRUCache;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js\n var require_range = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SPACE_CHARACTERS = /\\s+/g;\n var Range = class _Range {\n constructor(range, options) {\n options = parseOptions(options);\n if (range instanceof _Range) {\n if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {\n return range;\n } else {\n return new _Range(range.raw, options);\n }\n }\n if (range instanceof Comparator) {\n this.raw = range.value;\n this.set = [[range]];\n this.formatted = void 0;\n return this;\n }\n this.options = options;\n this.loose = !!options.loose;\n this.includePrerelease = !!options.includePrerelease;\n this.raw = range.trim().replace(SPACE_CHARACTERS, \" \");\n this.set = this.raw.split(\"||\").map((r2) => this.parseRange(r2.trim())).filter((c4) => c4.length);\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`);\n }\n if (this.set.length > 1) {\n const first = this.set[0];\n this.set = this.set.filter((c4) => !isNullSet(c4[0]));\n if (this.set.length === 0) {\n this.set = [first];\n } else if (this.set.length > 1) {\n for (const c4 of this.set) {\n if (c4.length === 1 && isAny(c4[0])) {\n this.set = [c4];\n break;\n }\n }\n }\n }\n this.formatted = void 0;\n }\n get range() {\n if (this.formatted === void 0) {\n this.formatted = \"\";\n for (let i3 = 0; i3 < this.set.length; i3++) {\n if (i3 > 0) {\n this.formatted += \"||\";\n }\n const comps = this.set[i3];\n for (let k4 = 0; k4 < comps.length; k4++) {\n if (k4 > 0) {\n this.formatted += \" \";\n }\n this.formatted += comps[k4].toString().trim();\n }\n }\n }\n return this.formatted;\n }\n format() {\n return this.range;\n }\n toString() {\n return this.range;\n }\n parseRange(range) {\n const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);\n const memoKey = memoOpts + \":\" + range;\n const cached = cache.get(memoKey);\n if (cached) {\n return cached;\n }\n const loose = this.options.loose;\n const hr = loose ? re[t3.HYPHENRANGELOOSE] : re[t3.HYPHENRANGE];\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease));\n debug(\"hyphen replace\", range);\n range = range.replace(re[t3.COMPARATORTRIM], comparatorTrimReplace);\n debug(\"comparator trim\", range);\n range = range.replace(re[t3.TILDETRIM], tildeTrimReplace);\n debug(\"tilde trim\", range);\n range = range.replace(re[t3.CARETTRIM], caretTrimReplace);\n debug(\"caret trim\", range);\n let rangeList = range.split(\" \").map((comp) => parseComparator(comp, this.options)).join(\" \").split(/\\s+/).map((comp) => replaceGTE0(comp, this.options));\n if (loose) {\n rangeList = rangeList.filter((comp) => {\n debug(\"loose invalid filter\", comp, this.options);\n return !!comp.match(re[t3.COMPARATORLOOSE]);\n });\n }\n debug(\"range list\", rangeList);\n const rangeMap = /* @__PURE__ */ new Map();\n const comparators = rangeList.map((comp) => new Comparator(comp, this.options));\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp];\n }\n rangeMap.set(comp.value, comp);\n }\n if (rangeMap.size > 1 && rangeMap.has(\"\")) {\n rangeMap.delete(\"\");\n }\n const result = [...rangeMap.values()];\n cache.set(memoKey, result);\n return result;\n }\n intersects(range, options) {\n if (!(range instanceof _Range)) {\n throw new TypeError(\"a Range is required\");\n }\n return this.set.some((thisComparators) => {\n return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {\n return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options);\n });\n });\n });\n });\n }\n // if ANY of the sets match ALL of its comparators, then pass\n test(version7) {\n if (!version7) {\n return false;\n }\n if (typeof version7 === \"string\") {\n try {\n version7 = new SemVer(version7, this.options);\n } catch (er) {\n return false;\n }\n }\n for (let i3 = 0; i3 < this.set.length; i3++) {\n if (testSet(this.set[i3], version7, this.options)) {\n return true;\n }\n }\n return false;\n }\n };\n module.exports = Range;\n var LRU = require_lrucache();\n var cache = new LRU();\n var parseOptions = require_parse_options();\n var Comparator = require_comparator();\n var debug = require_debug();\n var SemVer = require_semver();\n var {\n safeRe: re,\n t: t3,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace\n } = require_re();\n var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();\n var isNullSet = (c4) => c4.value === \"<0.0.0-0\";\n var isAny = (c4) => c4.value === \"\";\n var isSatisfiable = (comparators, options) => {\n let result = true;\n const remainingComparators = comparators.slice();\n let testComparator = remainingComparators.pop();\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options);\n });\n testComparator = remainingComparators.pop();\n }\n return result;\n };\n var parseComparator = (comp, options) => {\n debug(\"comp\", comp, options);\n comp = replaceCarets(comp, options);\n debug(\"caret\", comp);\n comp = replaceTildes(comp, options);\n debug(\"tildes\", comp);\n comp = replaceXRanges(comp, options);\n debug(\"xrange\", comp);\n comp = replaceStars(comp, options);\n debug(\"stars\", comp);\n return comp;\n };\n var isX = (id) => !id || id.toLowerCase() === \"x\" || id === \"*\";\n var replaceTildes = (comp, options) => {\n return comp.trim().split(/\\s+/).map((c4) => replaceTilde(c4, options)).join(\" \");\n };\n var replaceTilde = (comp, options) => {\n const r2 = options.loose ? re[t3.TILDELOOSE] : re[t3.TILDE];\n return comp.replace(r2, (_2, M2, m2, p4, pr) => {\n debug(\"tilde\", comp, _2, M2, m2, p4, pr);\n let ret;\n if (isX(M2)) {\n ret = \"\";\n } else if (isX(m2)) {\n ret = `>=${M2}.0.0 <${+M2 + 1}.0.0-0`;\n } else if (isX(p4)) {\n ret = `>=${M2}.${m2}.0 <${M2}.${+m2 + 1}.0-0`;\n } else if (pr) {\n debug(\"replaceTilde pr\", pr);\n ret = `>=${M2}.${m2}.${p4}-${pr} <${M2}.${+m2 + 1}.0-0`;\n } else {\n ret = `>=${M2}.${m2}.${p4} <${M2}.${+m2 + 1}.0-0`;\n }\n debug(\"tilde return\", ret);\n return ret;\n });\n };\n var replaceCarets = (comp, options) => {\n return comp.trim().split(/\\s+/).map((c4) => replaceCaret(c4, options)).join(\" \");\n };\n var replaceCaret = (comp, options) => {\n debug(\"caret\", comp, options);\n const r2 = options.loose ? re[t3.CARETLOOSE] : re[t3.CARET];\n const z2 = options.includePrerelease ? \"-0\" : \"\";\n return comp.replace(r2, (_2, M2, m2, p4, pr) => {\n debug(\"caret\", comp, _2, M2, m2, p4, pr);\n let ret;\n if (isX(M2)) {\n ret = \"\";\n } else if (isX(m2)) {\n ret = `>=${M2}.0.0${z2} <${+M2 + 1}.0.0-0`;\n } else if (isX(p4)) {\n if (M2 === \"0\") {\n ret = `>=${M2}.${m2}.0${z2} <${M2}.${+m2 + 1}.0-0`;\n } else {\n ret = `>=${M2}.${m2}.0${z2} <${+M2 + 1}.0.0-0`;\n }\n } else if (pr) {\n debug(\"replaceCaret pr\", pr);\n if (M2 === \"0\") {\n if (m2 === \"0\") {\n ret = `>=${M2}.${m2}.${p4}-${pr} <${M2}.${m2}.${+p4 + 1}-0`;\n } else {\n ret = `>=${M2}.${m2}.${p4}-${pr} <${M2}.${+m2 + 1}.0-0`;\n }\n } else {\n ret = `>=${M2}.${m2}.${p4}-${pr} <${+M2 + 1}.0.0-0`;\n }\n } else {\n debug(\"no pr\");\n if (M2 === \"0\") {\n if (m2 === \"0\") {\n ret = `>=${M2}.${m2}.${p4}${z2} <${M2}.${m2}.${+p4 + 1}-0`;\n } else {\n ret = `>=${M2}.${m2}.${p4}${z2} <${M2}.${+m2 + 1}.0-0`;\n }\n } else {\n ret = `>=${M2}.${m2}.${p4} <${+M2 + 1}.0.0-0`;\n }\n }\n debug(\"caret return\", ret);\n return ret;\n });\n };\n var replaceXRanges = (comp, options) => {\n debug(\"replaceXRanges\", comp, options);\n return comp.split(/\\s+/).map((c4) => replaceXRange(c4, options)).join(\" \");\n };\n var replaceXRange = (comp, options) => {\n comp = comp.trim();\n const r2 = options.loose ? re[t3.XRANGELOOSE] : re[t3.XRANGE];\n return comp.replace(r2, (ret, gtlt, M2, m2, p4, pr) => {\n debug(\"xRange\", comp, ret, gtlt, M2, m2, p4, pr);\n const xM = isX(M2);\n const xm = xM || isX(m2);\n const xp = xm || isX(p4);\n const anyX = xp;\n if (gtlt === \"=\" && anyX) {\n gtlt = \"\";\n }\n pr = options.includePrerelease ? \"-0\" : \"\";\n if (xM) {\n if (gtlt === \">\" || gtlt === \"<\") {\n ret = \"<0.0.0-0\";\n } else {\n ret = \"*\";\n }\n } else if (gtlt && anyX) {\n if (xm) {\n m2 = 0;\n }\n p4 = 0;\n if (gtlt === \">\") {\n gtlt = \">=\";\n if (xm) {\n M2 = +M2 + 1;\n m2 = 0;\n p4 = 0;\n } else {\n m2 = +m2 + 1;\n p4 = 0;\n }\n } else if (gtlt === \"<=\") {\n gtlt = \"<\";\n if (xm) {\n M2 = +M2 + 1;\n } else {\n m2 = +m2 + 1;\n }\n }\n if (gtlt === \"<\") {\n pr = \"-0\";\n }\n ret = `${gtlt + M2}.${m2}.${p4}${pr}`;\n } else if (xm) {\n ret = `>=${M2}.0.0${pr} <${+M2 + 1}.0.0-0`;\n } else if (xp) {\n ret = `>=${M2}.${m2}.0${pr} <${M2}.${+m2 + 1}.0-0`;\n }\n debug(\"xRange return\", ret);\n return ret;\n });\n };\n var replaceStars = (comp, options) => {\n debug(\"replaceStars\", comp, options);\n return comp.trim().replace(re[t3.STAR], \"\");\n };\n var replaceGTE0 = (comp, options) => {\n debug(\"replaceGTE0\", comp, options);\n return comp.trim().replace(re[options.includePrerelease ? t3.GTE0PRE : t3.GTE0], \"\");\n };\n var hyphenReplace = (incPr) => ($0, from14, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from14 = \"\";\n } else if (isX(fm)) {\n from14 = `>=${fM}.0.0${incPr ? \"-0\" : \"\"}`;\n } else if (isX(fp)) {\n from14 = `>=${fM}.${fm}.0${incPr ? \"-0\" : \"\"}`;\n } else if (fpr) {\n from14 = `>=${from14}`;\n } else {\n from14 = `>=${from14}${incPr ? \"-0\" : \"\"}`;\n }\n if (isX(tM)) {\n to = \"\";\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`;\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`;\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`;\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`;\n } else {\n to = `<=${to}`;\n }\n return `${from14} ${to}`.trim();\n };\n var testSet = (set, version7, options) => {\n for (let i3 = 0; i3 < set.length; i3++) {\n if (!set[i3].test(version7)) {\n return false;\n }\n }\n if (version7.prerelease.length && !options.includePrerelease) {\n for (let i3 = 0; i3 < set.length; i3++) {\n debug(set[i3].semver);\n if (set[i3].semver === Comparator.ANY) {\n continue;\n }\n if (set[i3].semver.prerelease.length > 0) {\n const allowed = set[i3].semver;\n if (allowed.major === version7.major && allowed.minor === version7.minor && allowed.patch === version7.patch) {\n return true;\n }\n }\n }\n return false;\n }\n return true;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js\n var require_comparator = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var ANY = Symbol(\"SemVer ANY\");\n var Comparator = class _Comparator {\n static get ANY() {\n return ANY;\n }\n constructor(comp, options) {\n options = parseOptions(options);\n if (comp instanceof _Comparator) {\n if (comp.loose === !!options.loose) {\n return comp;\n } else {\n comp = comp.value;\n }\n }\n comp = comp.trim().split(/\\s+/).join(\" \");\n debug(\"comparator\", comp, options);\n this.options = options;\n this.loose = !!options.loose;\n this.parse(comp);\n if (this.semver === ANY) {\n this.value = \"\";\n } else {\n this.value = this.operator + this.semver.version;\n }\n debug(\"comp\", this);\n }\n parse(comp) {\n const r2 = this.options.loose ? re[t3.COMPARATORLOOSE] : re[t3.COMPARATOR];\n const m2 = comp.match(r2);\n if (!m2) {\n throw new TypeError(`Invalid comparator: ${comp}`);\n }\n this.operator = m2[1] !== void 0 ? m2[1] : \"\";\n if (this.operator === \"=\") {\n this.operator = \"\";\n }\n if (!m2[2]) {\n this.semver = ANY;\n } else {\n this.semver = new SemVer(m2[2], this.options.loose);\n }\n }\n toString() {\n return this.value;\n }\n test(version7) {\n debug(\"Comparator.test\", version7, this.options.loose);\n if (this.semver === ANY || version7 === ANY) {\n return true;\n }\n if (typeof version7 === \"string\") {\n try {\n version7 = new SemVer(version7, this.options);\n } catch (er) {\n return false;\n }\n }\n return cmp(version7, this.operator, this.semver, this.options);\n }\n intersects(comp, options) {\n if (!(comp instanceof _Comparator)) {\n throw new TypeError(\"a Comparator is required\");\n }\n if (this.operator === \"\") {\n if (this.value === \"\") {\n return true;\n }\n return new Range(comp.value, options).test(this.value);\n } else if (comp.operator === \"\") {\n if (comp.value === \"\") {\n return true;\n }\n return new Range(this.value, options).test(comp.semver);\n }\n options = parseOptions(options);\n if (options.includePrerelease && (this.value === \"<0.0.0-0\" || comp.value === \"<0.0.0-0\")) {\n return false;\n }\n if (!options.includePrerelease && (this.value.startsWith(\"<0.0.0\") || comp.value.startsWith(\"<0.0.0\"))) {\n return false;\n }\n if (this.operator.startsWith(\">\") && comp.operator.startsWith(\">\")) {\n return true;\n }\n if (this.operator.startsWith(\"<\") && comp.operator.startsWith(\"<\")) {\n return true;\n }\n if (this.semver.version === comp.semver.version && this.operator.includes(\"=\") && comp.operator.includes(\"=\")) {\n return true;\n }\n if (cmp(this.semver, \"<\", comp.semver, options) && this.operator.startsWith(\">\") && comp.operator.startsWith(\"<\")) {\n return true;\n }\n if (cmp(this.semver, \">\", comp.semver, options) && this.operator.startsWith(\"<\") && comp.operator.startsWith(\">\")) {\n return true;\n }\n return false;\n }\n };\n module.exports = Comparator;\n var parseOptions = require_parse_options();\n var { safeRe: re, t: t3 } = require_re();\n var cmp = require_cmp();\n var debug = require_debug();\n var SemVer = require_semver();\n var Range = require_range();\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js\n var require_satisfies = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var satisfies = (version7, range, options) => {\n try {\n range = new Range(range, options);\n } catch (er) {\n return false;\n }\n return range.test(version7);\n };\n module.exports = satisfies;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js\n var require_to_comparators = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c4) => c4.value).join(\" \").trim().split(\" \"));\n module.exports = toComparators;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js\n var require_max_satisfying = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var Range = require_range();\n var maxSatisfying = (versions2, range, options) => {\n let max = null;\n let maxSV = null;\n let rangeObj = null;\n try {\n rangeObj = new Range(range, options);\n } catch (er) {\n return null;\n }\n versions2.forEach((v2) => {\n if (rangeObj.test(v2)) {\n if (!max || maxSV.compare(v2) === -1) {\n max = v2;\n maxSV = new SemVer(max, options);\n }\n }\n });\n return max;\n };\n module.exports = maxSatisfying;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js\n var require_min_satisfying = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var Range = require_range();\n var minSatisfying = (versions2, range, options) => {\n let min = null;\n let minSV = null;\n let rangeObj = null;\n try {\n rangeObj = new Range(range, options);\n } catch (er) {\n return null;\n }\n versions2.forEach((v2) => {\n if (rangeObj.test(v2)) {\n if (!min || minSV.compare(v2) === 1) {\n min = v2;\n minSV = new SemVer(min, options);\n }\n }\n });\n return min;\n };\n module.exports = minSatisfying;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js\n var require_min_version = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var Range = require_range();\n var gt = require_gt();\n var minVersion = (range, loose) => {\n range = new Range(range, loose);\n let minver = new SemVer(\"0.0.0\");\n if (range.test(minver)) {\n return minver;\n }\n minver = new SemVer(\"0.0.0-0\");\n if (range.test(minver)) {\n return minver;\n }\n minver = null;\n for (let i3 = 0; i3 < range.set.length; ++i3) {\n const comparators = range.set[i3];\n let setMin = null;\n comparators.forEach((comparator) => {\n const compver = new SemVer(comparator.semver.version);\n switch (comparator.operator) {\n case \">\":\n if (compver.prerelease.length === 0) {\n compver.patch++;\n } else {\n compver.prerelease.push(0);\n }\n compver.raw = compver.format();\n case \"\":\n case \">=\":\n if (!setMin || gt(compver, setMin)) {\n setMin = compver;\n }\n break;\n case \"<\":\n case \"<=\":\n break;\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`);\n }\n });\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin;\n }\n }\n if (minver && range.test(minver)) {\n return minver;\n }\n return null;\n };\n module.exports = minVersion;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js\n var require_valid2 = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var validRange = (range, options) => {\n try {\n return new Range(range, options).range || \"*\";\n } catch (er) {\n return null;\n }\n };\n module.exports = validRange;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js\n var require_outside = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var Comparator = require_comparator();\n var { ANY } = Comparator;\n var Range = require_range();\n var satisfies = require_satisfies();\n var gt = require_gt();\n var lt = require_lt();\n var lte = require_lte();\n var gte = require_gte();\n var outside = (version7, range, hilo, options) => {\n version7 = new SemVer(version7, options);\n range = new Range(range, options);\n let gtfn, ltefn, ltfn, comp, ecomp;\n switch (hilo) {\n case \">\":\n gtfn = gt;\n ltefn = lte;\n ltfn = lt;\n comp = \">\";\n ecomp = \">=\";\n break;\n case \"<\":\n gtfn = lt;\n ltefn = gte;\n ltfn = gt;\n comp = \"<\";\n ecomp = \"<=\";\n break;\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"');\n }\n if (satisfies(version7, range, options)) {\n return false;\n }\n for (let i3 = 0; i3 < range.set.length; ++i3) {\n const comparators = range.set[i3];\n let high = null;\n let low = null;\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator(\">=0.0.0\");\n }\n high = high || comparator;\n low = low || comparator;\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator;\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator;\n }\n });\n if (high.operator === comp || high.operator === ecomp) {\n return false;\n }\n if ((!low.operator || low.operator === comp) && ltefn(version7, low.semver)) {\n return false;\n } else if (low.operator === ecomp && ltfn(version7, low.semver)) {\n return false;\n }\n }\n return true;\n };\n module.exports = outside;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js\n var require_gtr = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var outside = require_outside();\n var gtr = (version7, range, options) => outside(version7, range, \">\", options);\n module.exports = gtr;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js\n var require_ltr = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var outside = require_outside();\n var ltr = (version7, range, options) => outside(version7, range, \"<\", options);\n module.exports = ltr;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js\n var require_intersects = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var intersects = (r1, r2, options) => {\n r1 = new Range(r1, options);\n r2 = new Range(r2, options);\n return r1.intersects(r2, options);\n };\n module.exports = intersects;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js\n var require_simplify = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var satisfies = require_satisfies();\n var compare = require_compare();\n module.exports = (versions2, range, options) => {\n const set = [];\n let first = null;\n let prev = null;\n const v2 = versions2.sort((a3, b4) => compare(a3, b4, options));\n for (const version7 of v2) {\n const included = satisfies(version7, range, options);\n if (included) {\n prev = version7;\n if (!first) {\n first = version7;\n }\n } else {\n if (prev) {\n set.push([first, prev]);\n }\n prev = null;\n first = null;\n }\n }\n if (first) {\n set.push([first, null]);\n }\n const ranges = [];\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min);\n } else if (!max && min === v2[0]) {\n ranges.push(\"*\");\n } else if (!max) {\n ranges.push(`>=${min}`);\n } else if (min === v2[0]) {\n ranges.push(`<=${max}`);\n } else {\n ranges.push(`${min} - ${max}`);\n }\n }\n const simplified = ranges.join(\" || \");\n const original = typeof range.raw === \"string\" ? range.raw : String(range);\n return simplified.length < original.length ? simplified : range;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js\n var require_subset = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var Comparator = require_comparator();\n var { ANY } = Comparator;\n var satisfies = require_satisfies();\n var compare = require_compare();\n var subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true;\n }\n sub = new Range(sub, options);\n dom = new Range(dom, options);\n let sawNonNull = false;\n OUTER:\n for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options);\n sawNonNull = sawNonNull || isSub !== null;\n if (isSub) {\n continue OUTER;\n }\n }\n if (sawNonNull) {\n return false;\n }\n }\n return true;\n };\n var minimumVersionWithPreRelease = [new Comparator(\">=0.0.0-0\")];\n var minimumVersion = [new Comparator(\">=0.0.0\")];\n var simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true;\n }\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true;\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease;\n } else {\n sub = minimumVersion;\n }\n }\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true;\n } else {\n dom = minimumVersion;\n }\n }\n const eqSet = /* @__PURE__ */ new Set();\n let gt, lt;\n for (const c4 of sub) {\n if (c4.operator === \">\" || c4.operator === \">=\") {\n gt = higherGT(gt, c4, options);\n } else if (c4.operator === \"<\" || c4.operator === \"<=\") {\n lt = lowerLT(lt, c4, options);\n } else {\n eqSet.add(c4.semver);\n }\n }\n if (eqSet.size > 1) {\n return null;\n }\n let gtltComp;\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options);\n if (gtltComp > 0) {\n return null;\n } else if (gtltComp === 0 && (gt.operator !== \">=\" || lt.operator !== \"<=\")) {\n return null;\n }\n }\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null;\n }\n if (lt && !satisfies(eq, String(lt), options)) {\n return null;\n }\n for (const c4 of dom) {\n if (!satisfies(eq, String(c4), options)) {\n return false;\n }\n }\n return true;\n }\n let higher, lower;\n let hasDomLT, hasDomGT;\n let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;\n let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === \"<\" && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false;\n }\n for (const c4 of dom) {\n hasDomGT = hasDomGT || c4.operator === \">\" || c4.operator === \">=\";\n hasDomLT = hasDomLT || c4.operator === \"<\" || c4.operator === \"<=\";\n if (gt) {\n if (needDomGTPre) {\n if (c4.semver.prerelease && c4.semver.prerelease.length && c4.semver.major === needDomGTPre.major && c4.semver.minor === needDomGTPre.minor && c4.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false;\n }\n }\n if (c4.operator === \">\" || c4.operator === \">=\") {\n higher = higherGT(gt, c4, options);\n if (higher === c4 && higher !== gt) {\n return false;\n }\n } else if (gt.operator === \">=\" && !satisfies(gt.semver, String(c4), options)) {\n return false;\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c4.semver.prerelease && c4.semver.prerelease.length && c4.semver.major === needDomLTPre.major && c4.semver.minor === needDomLTPre.minor && c4.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false;\n }\n }\n if (c4.operator === \"<\" || c4.operator === \"<=\") {\n lower = lowerLT(lt, c4, options);\n if (lower === c4 && lower !== lt) {\n return false;\n }\n } else if (lt.operator === \"<=\" && !satisfies(lt.semver, String(c4), options)) {\n return false;\n }\n }\n if (!c4.operator && (lt || gt) && gtltComp !== 0) {\n return false;\n }\n }\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false;\n }\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false;\n }\n if (needDomGTPre || needDomLTPre) {\n return false;\n }\n return true;\n };\n var higherGT = (a3, b4, options) => {\n if (!a3) {\n return b4;\n }\n const comp = compare(a3.semver, b4.semver, options);\n return comp > 0 ? a3 : comp < 0 ? b4 : b4.operator === \">\" && a3.operator === \">=\" ? b4 : a3;\n };\n var lowerLT = (a3, b4, options) => {\n if (!a3) {\n return b4;\n }\n const comp = compare(a3.semver, b4.semver, options);\n return comp < 0 ? a3 : comp > 0 ? b4 : b4.operator === \"<\" && a3.operator === \"<=\" ? b4 : a3;\n };\n module.exports = subset;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js\n var require_semver2 = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var internalRe = require_re();\n var constants = require_constants();\n var SemVer = require_semver();\n var identifiers = require_identifiers();\n var parse2 = require_parse();\n var valid = require_valid();\n var clean2 = require_clean();\n var inc = require_inc();\n var diff = require_diff();\n var major = require_major();\n var minor = require_minor();\n var patch = require_patch();\n var prerelease = require_prerelease();\n var compare = require_compare();\n var rcompare = require_rcompare();\n var compareLoose = require_compare_loose();\n var compareBuild = require_compare_build();\n var sort = require_sort();\n var rsort = require_rsort();\n var gt = require_gt();\n var lt = require_lt();\n var eq = require_eq();\n var neq = require_neq();\n var gte = require_gte();\n var lte = require_lte();\n var cmp = require_cmp();\n var coerce2 = require_coerce();\n var Comparator = require_comparator();\n var Range = require_range();\n var satisfies = require_satisfies();\n var toComparators = require_to_comparators();\n var maxSatisfying = require_max_satisfying();\n var minSatisfying = require_min_satisfying();\n var minVersion = require_min_version();\n var validRange = require_valid2();\n var outside = require_outside();\n var gtr = require_gtr();\n var ltr = require_ltr();\n var intersects = require_intersects();\n var simplifyRange = require_simplify();\n var subset = require_subset();\n module.exports = {\n parse: parse2,\n valid,\n clean: clean2,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce: coerce2,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers\n };\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/constants.js\n var require_constants2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.VINCENT_TOOL_API_VERSION = void 0;\n exports3.VINCENT_TOOL_API_VERSION = \"2.0.0\";\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/assertSupportedAbilityVersion.js\n var require_assertSupportedAbilityVersion = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/assertSupportedAbilityVersion.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.assertSupportedAbilityVersion = assertSupportedAbilityVersion;\n var semver_1 = require_semver2();\n var constants_1 = require_constants2();\n function assertSupportedAbilityVersion(abilityVersionSemver) {\n if (!abilityVersionSemver) {\n throw new Error(\"Ability version is required\");\n }\n if ((0, semver_1.major)(abilityVersionSemver) !== (0, semver_1.major)(constants_1.VINCENT_TOOL_API_VERSION)) {\n throw new Error(`Ability version ${abilityVersionSemver} is not supported. Current version: ${constants_1.VINCENT_TOOL_API_VERSION}. Major versions must match.`);\n }\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/utils.js\n var require_utils = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.bigintReplacer = void 0;\n var bigintReplacer = (key, value) => {\n return typeof value === \"bigint\" ? value.toString() : value;\n };\n exports3.bigintReplacer = bigintReplacer;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/helpers/resultCreators.js\n var require_resultCreators = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/helpers/resultCreators.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createDenyResult = createDenyResult;\n exports3.createDenyNoResult = createDenyNoResult;\n exports3.createAllowResult = createAllowResult;\n exports3.createAllowEvaluationResult = createAllowEvaluationResult;\n exports3.createDenyEvaluationResult = createDenyEvaluationResult;\n exports3.wrapAllow = wrapAllow;\n exports3.wrapDeny = wrapDeny;\n exports3.returnNoResultDeny = returnNoResultDeny;\n exports3.isTypedAllowResponse = isTypedAllowResponse;\n function createDenyResult(params) {\n if (params.result === void 0) {\n return {\n allow: false,\n runtimeError: params.runtimeError,\n result: void 0,\n ...params.schemaValidationError ? { schemaValidationError: params.schemaValidationError } : {}\n };\n }\n return {\n allow: false,\n runtimeError: params.runtimeError,\n result: params.result,\n ...params.schemaValidationError ? { schemaValidationError: params.schemaValidationError } : {}\n };\n }\n function createDenyNoResult(runtimeError, schemaValidationError) {\n return createDenyResult({ runtimeError, schemaValidationError });\n }\n function createAllowResult(params) {\n if (params.result === void 0) {\n return {\n allow: true,\n result: void 0\n };\n }\n return {\n allow: true,\n result: params.result\n };\n }\n function createAllowEvaluationResult(params) {\n return {\n allow: true,\n evaluatedPolicies: params.evaluatedPolicies,\n allowedPolicies: params.allowedPolicies,\n deniedPolicy: void 0\n // important for union discrimination\n };\n }\n function createDenyEvaluationResult(params) {\n return {\n allow: false,\n evaluatedPolicies: params.evaluatedPolicies,\n allowedPolicies: params.allowedPolicies,\n deniedPolicy: params.deniedPolicy\n };\n }\n function wrapAllow(value) {\n return createAllowResult({ result: value });\n }\n function wrapDeny(runtimeError, result, schemaValidationError) {\n return createDenyResult({ runtimeError, result, schemaValidationError });\n }\n function returnNoResultDeny(runtimeError, schemaValidationError) {\n return createDenyNoResult(runtimeError, schemaValidationError);\n }\n function isTypedAllowResponse(val) {\n return typeof val === \"object\" && val !== null && val.allow === true;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/helpers/typeGuards.js\n var require_typeGuards = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/helpers/typeGuards.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.isZodValidationDenyResult = isZodValidationDenyResult;\n exports3.isPolicyDenyResponse = isPolicyDenyResponse;\n exports3.isPolicyAllowResponse = isPolicyAllowResponse;\n exports3.isPolicyResponse = isPolicyResponse;\n function isZodValidationDenyResult(result) {\n return typeof result === \"object\" && result !== null && \"zodError\" in result;\n }\n function isPolicyDenyResponse(val) {\n return typeof val === \"object\" && val !== null && val.allow === false;\n }\n function isPolicyAllowResponse(val) {\n return typeof val === \"object\" && val !== null && val.allow === true;\n }\n function isPolicyResponse(value) {\n return typeof value === \"object\" && value !== null && \"allow\" in value && typeof value.allow === \"boolean\";\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/helpers/zod.js\n var require_zod = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/helpers/zod.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PolicyResponseShape = void 0;\n exports3.validateOrDeny = validateOrDeny;\n exports3.getValidatedParamsOrDeny = getValidatedParamsOrDeny;\n exports3.getSchemaForPolicyResponseResult = getSchemaForPolicyResponseResult;\n var zod_1 = require_cjs();\n var utils_1 = require_utils();\n var resultCreators_1 = require_resultCreators();\n var typeGuards_1 = require_typeGuards();\n exports3.PolicyResponseShape = zod_1.z.object({\n allow: zod_1.z.boolean(),\n result: zod_1.z.unknown()\n });\n function validateOrDeny(value, schema, phase, stage) {\n const parsed = schema.safeParse(value);\n if (!parsed.success) {\n const descriptor = stage === \"input\" ? \"parameters\" : \"result\";\n const message = `Invalid ${phase} ${descriptor}.`;\n return (0, resultCreators_1.createDenyResult)({\n runtimeError: message,\n schemaValidationError: {\n zodError: parsed.error,\n phase,\n stage\n }\n });\n }\n return parsed.data;\n }\n function getValidatedParamsOrDeny({ rawAbilityParams, rawUserParams, abilityParamsSchema: abilityParamsSchema2, userParamsSchema, phase }) {\n const abilityParams2 = validateOrDeny(rawAbilityParams, abilityParamsSchema2, phase, \"input\");\n if ((0, typeGuards_1.isPolicyDenyResponse)(abilityParams2)) {\n return abilityParams2;\n }\n const userParams = validateOrDeny(rawUserParams, userParamsSchema, phase, \"input\");\n if ((0, typeGuards_1.isPolicyDenyResponse)(userParams)) {\n return userParams;\n }\n return {\n abilityParams: abilityParams2,\n userParams\n };\n }\n function getSchemaForPolicyResponseResult({ value, allowResultSchema, denyResultSchema }) {\n if (!(0, typeGuards_1.isPolicyResponse)(value)) {\n console.log(\"getSchemaForPolicyResponseResult !isPolicyResponse\", JSON.stringify(value, utils_1.bigintReplacer));\n return {\n schemaToUse: exports3.PolicyResponseShape,\n parsedType: \"unknown\"\n };\n }\n console.log(\"getSchemaForPolicyResponseResult value is\", JSON.stringify(value, utils_1.bigintReplacer));\n return {\n schemaToUse: value.allow ? allowResultSchema : denyResultSchema,\n parsedType: value.allow ? \"allow\" : \"deny\"\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/helpers/index.js\n var require_helpers = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/helpers/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getSchemaForPolicyResponseResult = exports3.getValidatedParamsOrDeny = exports3.validateOrDeny = exports3.isPolicyDenyResponse = exports3.isPolicyAllowResponse = exports3.isPolicyResponse = exports3.createDenyResult = void 0;\n var resultCreators_1 = require_resultCreators();\n Object.defineProperty(exports3, \"createDenyResult\", { enumerable: true, get: function() {\n return resultCreators_1.createDenyResult;\n } });\n var typeGuards_1 = require_typeGuards();\n Object.defineProperty(exports3, \"isPolicyResponse\", { enumerable: true, get: function() {\n return typeGuards_1.isPolicyResponse;\n } });\n Object.defineProperty(exports3, \"isPolicyAllowResponse\", { enumerable: true, get: function() {\n return typeGuards_1.isPolicyAllowResponse;\n } });\n Object.defineProperty(exports3, \"isPolicyDenyResponse\", { enumerable: true, get: function() {\n return typeGuards_1.isPolicyDenyResponse;\n } });\n var zod_1 = require_zod();\n Object.defineProperty(exports3, \"validateOrDeny\", { enumerable: true, get: function() {\n return zod_1.validateOrDeny;\n } });\n Object.defineProperty(exports3, \"getValidatedParamsOrDeny\", { enumerable: true, get: function() {\n return zod_1.getValidatedParamsOrDeny;\n } });\n var zod_2 = require_zod();\n Object.defineProperty(exports3, \"getSchemaForPolicyResponseResult\", { enumerable: true, get: function() {\n return zod_2.getSchemaForPolicyResponseResult;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/policyConfig/context/resultCreators.js\n var require_resultCreators2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/policyConfig/context/resultCreators.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createAllow = createAllow;\n exports3.createAllowNoResult = createAllowNoResult;\n exports3.createDeny = createDeny;\n exports3.createDenyNoResult = createDenyNoResult;\n function createAllow(result) {\n return {\n allow: true,\n result\n };\n }\n function createAllowNoResult() {\n return {\n allow: true\n };\n }\n function createDeny(result) {\n return {\n allow: false,\n result\n };\n }\n function createDenyNoResult() {\n return {\n allow: false,\n result: void 0\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/policyConfig/context/policyConfigContext.js\n var require_policyConfigContext = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/policyConfig/context/policyConfigContext.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createPolicyContext = createPolicyContext;\n var resultCreators_1 = require_resultCreators2();\n function createPolicyContext({ baseContext }) {\n return {\n ...baseContext,\n allow: resultCreators_1.createAllow,\n deny: resultCreators_1.createDeny\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/vincentPolicy.js\n var require_vincentPolicy = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/vincentPolicy.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createVincentPolicy = createVincentPolicy;\n exports3.createVincentAbilityPolicy = createVincentAbilityPolicy;\n var zod_1 = require_cjs();\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n var utils_1 = require_utils();\n var helpers_1 = require_helpers();\n var resultCreators_1 = require_resultCreators();\n var policyConfigContext_1 = require_policyConfigContext();\n function createVincentPolicy(PolicyConfig) {\n if (PolicyConfig.commitParamsSchema && !PolicyConfig.commit) {\n throw new Error(\"Policy defines commitParamsSchema but is missing commit function\");\n }\n const userParamsSchema = PolicyConfig.userParamsSchema ?? zod_1.z.undefined();\n const evalAllowSchema = PolicyConfig.evalAllowResultSchema ?? zod_1.z.undefined();\n const evalDenySchema = PolicyConfig.evalDenyResultSchema ?? zod_1.z.undefined();\n const evaluate = async (args, baseContext) => {\n try {\n const context2 = (0, policyConfigContext_1.createPolicyContext)({\n baseContext\n });\n const paramsOrDeny = (0, helpers_1.getValidatedParamsOrDeny)({\n rawAbilityParams: args.abilityParams,\n rawUserParams: args.userParams,\n abilityParamsSchema: PolicyConfig.abilityParamsSchema,\n userParamsSchema,\n phase: \"evaluate\"\n });\n if ((0, helpers_1.isPolicyDenyResponse)(paramsOrDeny)) {\n return paramsOrDeny;\n }\n const { abilityParams: abilityParams2, userParams } = paramsOrDeny;\n const result = await PolicyConfig.evaluate({ abilityParams: abilityParams2, userParams }, context2);\n const { schemaToUse } = (0, helpers_1.getSchemaForPolicyResponseResult)({\n value: result,\n allowResultSchema: evalAllowSchema,\n denyResultSchema: evalDenySchema\n });\n const resultOrDeny = (0, helpers_1.validateOrDeny)(result.result, schemaToUse, \"evaluate\", \"output\");\n if ((0, helpers_1.isPolicyDenyResponse)(resultOrDeny)) {\n return resultOrDeny;\n }\n if ((0, helpers_1.isPolicyDenyResponse)(result)) {\n return (0, helpers_1.createDenyResult)({\n result: resultOrDeny\n });\n }\n return (0, resultCreators_1.wrapAllow)(resultOrDeny);\n } catch (err) {\n return (0, resultCreators_1.returnNoResultDeny)(err instanceof Error ? err.message : \"Unknown error\");\n }\n };\n const precheckAllowSchema = PolicyConfig.precheckAllowResultSchema ?? zod_1.z.undefined();\n const precheckDenySchema = PolicyConfig.precheckDenyResultSchema ?? zod_1.z.undefined();\n const precheck = PolicyConfig.precheck ? async (args, baseContext) => {\n try {\n const context2 = (0, policyConfigContext_1.createPolicyContext)({\n baseContext\n });\n const { precheck: precheckFn } = PolicyConfig;\n if (!precheckFn) {\n throw new Error(\"precheck function unexpectedly missing\");\n }\n const paramsOrDeny = (0, helpers_1.getValidatedParamsOrDeny)({\n rawAbilityParams: args.abilityParams,\n rawUserParams: args.userParams,\n abilityParamsSchema: PolicyConfig.abilityParamsSchema,\n userParamsSchema,\n phase: \"precheck\"\n });\n if ((0, helpers_1.isPolicyDenyResponse)(paramsOrDeny)) {\n return paramsOrDeny;\n }\n const result = await precheckFn(args, context2);\n const { schemaToUse } = (0, helpers_1.getSchemaForPolicyResponseResult)({\n value: result,\n allowResultSchema: precheckAllowSchema,\n denyResultSchema: precheckDenySchema\n });\n const resultOrDeny = (0, helpers_1.validateOrDeny)(result.result, schemaToUse, \"precheck\", \"output\");\n if ((0, helpers_1.isPolicyDenyResponse)(resultOrDeny)) {\n return resultOrDeny;\n }\n if ((0, helpers_1.isPolicyDenyResponse)(result)) {\n return (0, helpers_1.createDenyResult)({\n result: resultOrDeny\n });\n }\n return (0, resultCreators_1.createAllowResult)({ result: resultOrDeny });\n } catch (err) {\n return (0, resultCreators_1.createDenyNoResult)(err instanceof Error ? err.message : \"Unknown error\");\n }\n } : void 0;\n const commitAllowSchema = PolicyConfig.commitAllowResultSchema ?? zod_1.z.undefined();\n const commitDenySchema = PolicyConfig.commitDenyResultSchema ?? zod_1.z.undefined();\n const commitParamsSchema = PolicyConfig.commitParamsSchema ?? zod_1.z.undefined();\n const commit = PolicyConfig.commit ? async (args, baseContext) => {\n try {\n const context2 = (0, policyConfigContext_1.createPolicyContext)({\n baseContext\n });\n const { commit: commitFn } = PolicyConfig;\n if (!commitFn) {\n throw new Error(\"commit function unexpectedly missing\");\n }\n console.log(\"commit\", JSON.stringify({ args, context: context2 }, utils_1.bigintReplacer, 2));\n const paramsOrDeny = (0, helpers_1.validateOrDeny)(args, commitParamsSchema, \"commit\", \"input\");\n if ((0, helpers_1.isPolicyDenyResponse)(paramsOrDeny)) {\n return paramsOrDeny;\n }\n const result = await commitFn(args, context2);\n const { schemaToUse } = (0, helpers_1.getSchemaForPolicyResponseResult)({\n value: result,\n allowResultSchema: commitAllowSchema,\n denyResultSchema: commitDenySchema\n });\n const resultOrDeny = (0, helpers_1.validateOrDeny)(result.result, schemaToUse, \"commit\", \"output\");\n if ((0, helpers_1.isPolicyDenyResponse)(resultOrDeny)) {\n return resultOrDeny;\n }\n if ((0, helpers_1.isPolicyDenyResponse)(result)) {\n return (0, helpers_1.createDenyResult)({\n result: resultOrDeny\n });\n }\n return (0, resultCreators_1.createAllowResult)({ result: resultOrDeny });\n } catch (err) {\n return (0, resultCreators_1.createDenyNoResult)(err instanceof Error ? err.message : \"Unknown error\");\n }\n } : void 0;\n const vincentPolicy = {\n ...PolicyConfig,\n evaluate,\n precheck,\n commit\n };\n return vincentPolicy;\n }\n function createVincentAbilityPolicy(config2) {\n const { bundledVincentPolicy: { vincentPolicy, ipfsCid, vincentAbilityApiVersion: vincentAbilityApiVersion2 } } = config2;\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion2);\n const result = {\n vincentPolicy,\n ipfsCid,\n vincentAbilityApiVersion: vincentAbilityApiVersion2,\n abilityParameterMappings: config2.abilityParameterMappings,\n // Explicitly include schema types in the returned object for type inference\n /** @hidden */\n __schemaTypes: {\n policyAbilityParamsSchema: vincentPolicy.abilityParamsSchema,\n userParamsSchema: vincentPolicy.userParamsSchema,\n evalAllowResultSchema: vincentPolicy.evalAllowResultSchema,\n evalDenyResultSchema: vincentPolicy.evalDenyResultSchema,\n commitParamsSchema: vincentPolicy.commitParamsSchema,\n precheckAllowResultSchema: vincentPolicy.precheckAllowResultSchema,\n precheckDenyResultSchema: vincentPolicy.precheckDenyResultSchema,\n commitAllowResultSchema: vincentPolicy.commitAllowResultSchema,\n commitDenyResultSchema: vincentPolicy.commitDenyResultSchema,\n // Explicit function types\n evaluate: vincentPolicy.evaluate,\n precheck: vincentPolicy.precheck,\n commit: vincentPolicy.commit\n }\n };\n return result;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/types.js\n var require_types2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/types.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.YouMustCallContextSucceedOrFail = void 0;\n exports3.YouMustCallContextSucceedOrFail = Symbol(\"ExecuteAbilityResult must come from context.succeed() or context.fail()\");\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/resultCreators.js\n var require_resultCreators3 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/resultCreators.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createSuccess = createSuccess;\n exports3.createSuccessNoResult = createSuccessNoResult;\n exports3.createFailure = createFailure;\n exports3.createFailureNoResult = createFailureNoResult;\n var types_1 = require_types2();\n function createSuccess(result) {\n return {\n success: true,\n result,\n [types_1.YouMustCallContextSucceedOrFail]: \"AbilityResult\"\n };\n }\n function createSuccessNoResult() {\n return {\n success: true,\n [types_1.YouMustCallContextSucceedOrFail]: \"AbilityResult\"\n };\n }\n function createFailure(result) {\n return {\n success: false,\n result,\n [types_1.YouMustCallContextSucceedOrFail]: \"AbilityResult\"\n };\n }\n function createFailureNoResult() {\n return {\n success: false,\n result: void 0,\n [types_1.YouMustCallContextSucceedOrFail]: \"AbilityResult\"\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/abilityContext.js\n var require_abilityContext = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/abilityContext.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createExecutionAbilityContext = createExecutionAbilityContext;\n exports3.createPrecheckAbilityContext = createPrecheckAbilityContext;\n var resultCreators_1 = require_resultCreators3();\n function createExecutionAbilityContext(params) {\n const { baseContext, policiesByPackageName } = params;\n const allowedPolicies = {};\n for (const key of Object.keys(policiesByPackageName)) {\n const k4 = key;\n const entry = baseContext.policiesContext.allowedPolicies[k4];\n if (!entry)\n continue;\n allowedPolicies[k4] = {\n ...entry\n };\n }\n const upgradedPoliciesContext = {\n evaluatedPolicies: baseContext.policiesContext.evaluatedPolicies,\n allow: true,\n deniedPolicy: void 0,\n allowedPolicies\n };\n return {\n ...baseContext,\n policiesContext: upgradedPoliciesContext,\n succeed: resultCreators_1.createSuccess,\n fail: resultCreators_1.createFailure\n };\n }\n function createPrecheckAbilityContext(params) {\n const { baseContext } = params;\n return {\n ...baseContext,\n succeed: resultCreators_1.createSuccess,\n fail: resultCreators_1.createFailure\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/resultCreators.js\n var require_resultCreators4 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/resultCreators.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createAbilitySuccessResult = createAbilitySuccessResult;\n exports3.createAbilityFailureResult = createAbilityFailureResult;\n exports3.createAbilityFailureNoResult = createAbilityFailureNoResult;\n exports3.wrapFailure = wrapFailure;\n exports3.wrapNoResultFailure = wrapNoResultFailure;\n exports3.wrapSuccess = wrapSuccess;\n exports3.wrapNoResultSuccess = wrapNoResultSuccess;\n function createAbilitySuccessResult(args) {\n if (!args || args.result === void 0) {\n return { success: true };\n }\n return { success: true, result: args.result };\n }\n function createAbilityFailureResult({ runtimeError, result, schemaValidationError }) {\n if (result === void 0) {\n return {\n success: false,\n runtimeError,\n result: void 0,\n ...schemaValidationError ? { schemaValidationError } : {}\n };\n }\n return {\n success: false,\n runtimeError,\n result,\n ...schemaValidationError ? { schemaValidationError } : {}\n };\n }\n function createAbilityFailureNoResult(runtimeError, schemaValidationError) {\n return createAbilityFailureResult({ runtimeError, schemaValidationError });\n }\n function wrapFailure(value, runtimeError, schemaValidationError) {\n return createAbilityFailureResult({ result: value, runtimeError, schemaValidationError });\n }\n function wrapNoResultFailure(runtimeError, schemaValidationError) {\n return createAbilityFailureNoResult(runtimeError, schemaValidationError);\n }\n function wrapSuccess(value) {\n return createAbilitySuccessResult({ result: value });\n }\n function wrapNoResultSuccess() {\n return createAbilitySuccessResult();\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/typeGuards.js\n var require_typeGuards2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/typeGuards.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.isAbilitySuccessResult = isAbilitySuccessResult;\n exports3.isAbilityFailureResult = isAbilityFailureResult;\n exports3.isAbilityResult = isAbilityResult;\n function isAbilitySuccessResult(value) {\n return typeof value === \"object\" && value !== null && \"success\" in value && value.success === true;\n }\n function isAbilityFailureResult(value) {\n return typeof value === \"object\" && value !== null && \"success\" in value && value.success === false;\n }\n function isAbilityResult(value) {\n return typeof value === \"object\" && value !== null && \"success\" in value && typeof value.success === \"boolean\";\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/zod.js\n var require_zod2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/zod.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AbilityResultShape = void 0;\n exports3.validateOrFail = validateOrFail;\n exports3.getSchemaForAbilityResult = getSchemaForAbilityResult;\n var zod_1 = require_cjs();\n var resultCreators_1 = require_resultCreators4();\n var typeGuards_1 = require_typeGuards2();\n exports3.AbilityResultShape = zod_1.z.object({\n success: zod_1.z.boolean(),\n result: zod_1.z.unknown()\n });\n var mustBeUndefinedSchema = zod_1.z.undefined();\n function validateOrFail(value, schema, phase, stage) {\n const effectiveSchema = schema ?? mustBeUndefinedSchema;\n const parsed = effectiveSchema.safeParse(value);\n if (!parsed.success) {\n const descriptor = stage === \"input\" ? \"parameters\" : \"result\";\n const message = `Invalid ${phase} ${descriptor}.`;\n return (0, resultCreators_1.createAbilityFailureResult)({\n runtimeError: message,\n schemaValidationError: {\n zodError: parsed.error,\n phase,\n stage\n }\n });\n }\n return parsed.data;\n }\n function getSchemaForAbilityResult({ value, successResultSchema, failureResultSchema }) {\n if (!(0, typeGuards_1.isAbilityResult)(value)) {\n return {\n schemaToUse: exports3.AbilityResultShape,\n parsedType: \"unknown\"\n };\n }\n const schemaToUse = value.success ? successResultSchema ?? zod_1.z.undefined() : failureResultSchema ?? zod_1.z.undefined();\n return {\n schemaToUse,\n parsedType: value.success ? \"success\" : \"failure\"\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/vincentAbility.js\n var require_vincentAbility = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/vincentAbility.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createVincentAbility = createVincentAbility2;\n var zod_1 = require_cjs();\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n var constants_1 = require_constants2();\n var utils_1 = require_utils();\n var abilityContext_1 = require_abilityContext();\n var resultCreators_1 = require_resultCreators4();\n var typeGuards_1 = require_typeGuards2();\n var zod_2 = require_zod2();\n function createVincentAbility2(AbilityConfig) {\n const { policyByPackageName, policyByIpfsCid } = AbilityConfig.supportedPolicies;\n for (const policyId in policyByIpfsCid) {\n const policy = policyByIpfsCid[policyId];\n const { vincentAbilityApiVersion: vincentAbilityApiVersion2 } = policy;\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion2);\n }\n const executeSuccessSchema2 = AbilityConfig.executeSuccessSchema ?? zod_1.z.undefined();\n const executeFailSchema2 = AbilityConfig.executeFailSchema ?? zod_1.z.undefined();\n const execute = async ({ abilityParams: abilityParams2 }, baseAbilityContext) => {\n try {\n const context2 = (0, abilityContext_1.createExecutionAbilityContext)({\n baseContext: baseAbilityContext,\n policiesByPackageName: policyByPackageName\n });\n const parsedAbilityParams = (0, zod_2.validateOrFail)(abilityParams2, AbilityConfig.abilityParamsSchema, \"execute\", \"input\");\n if ((0, typeGuards_1.isAbilityFailureResult)(parsedAbilityParams)) {\n return parsedAbilityParams;\n }\n const result = await AbilityConfig.execute({ abilityParams: parsedAbilityParams }, {\n ...context2,\n policiesContext: { ...context2.policiesContext, allow: true }\n });\n console.log(\"AbilityConfig execute result\", JSON.stringify(result, utils_1.bigintReplacer));\n const { schemaToUse } = (0, zod_2.getSchemaForAbilityResult)({\n value: result,\n successResultSchema: executeSuccessSchema2,\n failureResultSchema: executeFailSchema2\n });\n const resultOrFailure = (0, zod_2.validateOrFail)(result.result, schemaToUse, \"execute\", \"output\");\n if ((0, typeGuards_1.isAbilityFailureResult)(resultOrFailure)) {\n return resultOrFailure;\n }\n if ((0, typeGuards_1.isAbilityFailureResult)(result)) {\n return (0, resultCreators_1.wrapFailure)(resultOrFailure);\n }\n return (0, resultCreators_1.wrapSuccess)(resultOrFailure);\n } catch (err) {\n return (0, resultCreators_1.wrapNoResultFailure)(err instanceof Error ? err.message : \"Unknown error\");\n }\n };\n const precheckSuccessSchema = AbilityConfig.precheckSuccessSchema ?? zod_1.z.undefined();\n const precheckFailSchema2 = AbilityConfig.precheckFailSchema ?? zod_1.z.undefined();\n const { precheck: precheckFn } = AbilityConfig;\n const precheck = precheckFn ? async ({ abilityParams: abilityParams2 }, baseAbilityContext) => {\n try {\n const context2 = (0, abilityContext_1.createPrecheckAbilityContext)({\n baseContext: baseAbilityContext\n });\n const parsedAbilityParams = (0, zod_2.validateOrFail)(abilityParams2, AbilityConfig.abilityParamsSchema, \"precheck\", \"input\");\n if ((0, typeGuards_1.isAbilityFailureResult)(parsedAbilityParams)) {\n return parsedAbilityParams;\n }\n const result = await precheckFn({ abilityParams: abilityParams2 }, context2);\n console.log(\"AbilityConfig precheck result\", JSON.stringify(result, utils_1.bigintReplacer));\n const { schemaToUse } = (0, zod_2.getSchemaForAbilityResult)({\n value: result,\n successResultSchema: precheckSuccessSchema,\n failureResultSchema: precheckFailSchema2\n });\n const resultOrFailure = (0, zod_2.validateOrFail)(result.result, schemaToUse, \"precheck\", \"output\");\n if ((0, typeGuards_1.isAbilityFailureResult)(resultOrFailure)) {\n return resultOrFailure;\n }\n if ((0, typeGuards_1.isAbilityFailureResult)(result)) {\n return (0, resultCreators_1.wrapFailure)(resultOrFailure, result.runtimeError);\n }\n return (0, resultCreators_1.wrapSuccess)(resultOrFailure);\n } catch (err) {\n return (0, resultCreators_1.wrapNoResultFailure)(err instanceof Error ? err.message : \"Unknown error\");\n }\n } : void 0;\n return {\n packageName: AbilityConfig.packageName,\n vincentAbilityApiVersion: constants_1.VINCENT_TOOL_API_VERSION,\n abilityDescription: AbilityConfig.abilityDescription,\n execute,\n precheck,\n supportedPolicies: AbilityConfig.supportedPolicies,\n policyByPackageName,\n abilityParamsSchema: AbilityConfig.abilityParamsSchema,\n /** @hidden */\n __schemaTypes: {\n precheckSuccessSchema: AbilityConfig.precheckSuccessSchema,\n precheckFailSchema: AbilityConfig.precheckFailSchema,\n executeSuccessSchema: AbilityConfig.executeSuccessSchema,\n executeFailSchema: AbilityConfig.executeFailSchema\n }\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/bn.js@5.2.2/node_modules/bn.js/lib/bn.js\n var require_bn = __commonJS({\n \"../../../node_modules/.pnpm/bn.js@5.2.2/node_modules/bn.js/lib/bn.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(module2, exports4) {\n \"use strict\";\n function assert9(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {\n };\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n function BN(number, base4, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n this.negative = 0;\n this.words = null;\n this.length = 0;\n this.red = null;\n if (number !== null) {\n if (base4 === \"le\" || base4 === \"be\") {\n endian = base4;\n base4 = 10;\n }\n this._init(number || 0, base4 || 10, endian || \"be\");\n }\n }\n if (typeof module2 === \"object\") {\n module2.exports = BN;\n } else {\n exports4.BN = BN;\n }\n BN.BN = BN;\n BN.wordSize = 26;\n var Buffer3;\n try {\n if (typeof window !== \"undefined\" && typeof window.Buffer !== \"undefined\") {\n Buffer3 = window.Buffer;\n } else {\n Buffer3 = (init_buffer(), __toCommonJS(buffer_exports)).Buffer;\n }\n } catch (e2) {\n }\n BN.isBN = function isBN(num2) {\n if (num2 instanceof BN) {\n return true;\n }\n return num2 !== null && typeof num2 === \"object\" && num2.constructor.wordSize === BN.wordSize && Array.isArray(num2.words);\n };\n BN.max = function max(left, right) {\n if (left.cmp(right) > 0)\n return left;\n return right;\n };\n BN.min = function min(left, right) {\n if (left.cmp(right) < 0)\n return left;\n return right;\n };\n BN.prototype._init = function init(number, base4, endian) {\n if (typeof number === \"number\") {\n return this._initNumber(number, base4, endian);\n }\n if (typeof number === \"object\") {\n return this._initArray(number, base4, endian);\n }\n if (base4 === \"hex\") {\n base4 = 16;\n }\n assert9(base4 === (base4 | 0) && base4 >= 2 && base4 <= 36);\n number = number.toString().replace(/\\s+/g, \"\");\n var start = 0;\n if (number[0] === \"-\") {\n start++;\n this.negative = 1;\n }\n if (start < number.length) {\n if (base4 === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base4, start);\n if (endian === \"le\") {\n this._initArray(this.toArray(), base4, endian);\n }\n }\n }\n };\n BN.prototype._initNumber = function _initNumber(number, base4, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 67108864) {\n this.words = [number & 67108863];\n this.length = 1;\n } else if (number < 4503599627370496) {\n this.words = [\n number & 67108863,\n number / 67108864 & 67108863\n ];\n this.length = 2;\n } else {\n assert9(number < 9007199254740992);\n this.words = [\n number & 67108863,\n number / 67108864 & 67108863,\n 1\n ];\n this.length = 3;\n }\n if (endian !== \"le\")\n return;\n this._initArray(this.toArray(), base4, endian);\n };\n BN.prototype._initArray = function _initArray(number, base4, endian) {\n assert9(typeof number.length === \"number\");\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = 0;\n }\n var j2, w3;\n var off2 = 0;\n if (endian === \"be\") {\n for (i3 = number.length - 1, j2 = 0; i3 >= 0; i3 -= 3) {\n w3 = number[i3] | number[i3 - 1] << 8 | number[i3 - 2] << 16;\n this.words[j2] |= w3 << off2 & 67108863;\n this.words[j2 + 1] = w3 >>> 26 - off2 & 67108863;\n off2 += 24;\n if (off2 >= 26) {\n off2 -= 26;\n j2++;\n }\n }\n } else if (endian === \"le\") {\n for (i3 = 0, j2 = 0; i3 < number.length; i3 += 3) {\n w3 = number[i3] | number[i3 + 1] << 8 | number[i3 + 2] << 16;\n this.words[j2] |= w3 << off2 & 67108863;\n this.words[j2 + 1] = w3 >>> 26 - off2 & 67108863;\n off2 += 24;\n if (off2 >= 26) {\n off2 -= 26;\n j2++;\n }\n }\n }\n return this._strip();\n };\n function parseHex4Bits(string, index2) {\n var c4 = string.charCodeAt(index2);\n if (c4 >= 48 && c4 <= 57) {\n return c4 - 48;\n } else if (c4 >= 65 && c4 <= 70) {\n return c4 - 55;\n } else if (c4 >= 97 && c4 <= 102) {\n return c4 - 87;\n } else {\n assert9(false, \"Invalid character in \" + string);\n }\n }\n function parseHexByte(string, lowerBound, index2) {\n var r2 = parseHex4Bits(string, index2);\n if (index2 - 1 >= lowerBound) {\n r2 |= parseHex4Bits(string, index2 - 1) << 4;\n }\n return r2;\n }\n BN.prototype._parseHex = function _parseHex(number, start, endian) {\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = 0;\n }\n var off2 = 0;\n var j2 = 0;\n var w3;\n if (endian === \"be\") {\n for (i3 = number.length - 1; i3 >= start; i3 -= 2) {\n w3 = parseHexByte(number, start, i3) << off2;\n this.words[j2] |= w3 & 67108863;\n if (off2 >= 18) {\n off2 -= 18;\n j2 += 1;\n this.words[j2] |= w3 >>> 26;\n } else {\n off2 += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i3 = parseLength % 2 === 0 ? start + 1 : start; i3 < number.length; i3 += 2) {\n w3 = parseHexByte(number, start, i3) << off2;\n this.words[j2] |= w3 & 67108863;\n if (off2 >= 18) {\n off2 -= 18;\n j2 += 1;\n this.words[j2] |= w3 >>> 26;\n } else {\n off2 += 8;\n }\n }\n }\n this._strip();\n };\n function parseBase(str, start, end, mul) {\n var r2 = 0;\n var b4 = 0;\n var len = Math.min(str.length, end);\n for (var i3 = start; i3 < len; i3++) {\n var c4 = str.charCodeAt(i3) - 48;\n r2 *= mul;\n if (c4 >= 49) {\n b4 = c4 - 49 + 10;\n } else if (c4 >= 17) {\n b4 = c4 - 17 + 10;\n } else {\n b4 = c4;\n }\n assert9(c4 >= 0 && b4 < mul, \"Invalid character\");\n r2 += b4;\n }\n return r2;\n }\n BN.prototype._parseBase = function _parseBase(number, base4, start) {\n this.words = [0];\n this.length = 1;\n for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base4) {\n limbLen++;\n }\n limbLen--;\n limbPow = limbPow / base4 | 0;\n var total = number.length - start;\n var mod3 = total % limbLen;\n var end = Math.min(total, total - mod3) + start;\n var word = 0;\n for (var i3 = start; i3 < end; i3 += limbLen) {\n word = parseBase(number, i3, i3 + limbLen, base4);\n this.imuln(limbPow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n if (mod3 !== 0) {\n var pow3 = 1;\n word = parseBase(number, i3, number.length, base4);\n for (i3 = 0; i3 < mod3; i3++) {\n pow3 *= base4;\n }\n this.imuln(pow3);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n this._strip();\n };\n BN.prototype.copy = function copy(dest) {\n dest.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n dest.words[i3] = this.words[i3];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n function move(dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n BN.prototype._move = function _move(dest) {\n move(dest, this);\n };\n BN.prototype.clone = function clone() {\n var r2 = new BN(null);\n this.copy(r2);\n return r2;\n };\n BN.prototype._expand = function _expand(size6) {\n while (this.length < size6) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n BN.prototype._strip = function strip() {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n BN.prototype._normSign = function _normSign() {\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n if (typeof Symbol !== \"undefined\" && typeof Symbol.for === \"function\") {\n try {\n BN.prototype[Symbol.for(\"nodejs.util.inspect.custom\")] = inspect;\n } catch (e2) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n function inspect() {\n return (this.red ? \"\";\n }\n var zeros = [\n \"\",\n \"0\",\n \"00\",\n \"000\",\n \"0000\",\n \"00000\",\n \"000000\",\n \"0000000\",\n \"00000000\",\n \"000000000\",\n \"0000000000\",\n \"00000000000\",\n \"000000000000\",\n \"0000000000000\",\n \"00000000000000\",\n \"000000000000000\",\n \"0000000000000000\",\n \"00000000000000000\",\n \"000000000000000000\",\n \"0000000000000000000\",\n \"00000000000000000000\",\n \"000000000000000000000\",\n \"0000000000000000000000\",\n \"00000000000000000000000\",\n \"000000000000000000000000\",\n \"0000000000000000000000000\"\n ];\n var groupSizes = [\n 0,\n 0,\n 25,\n 16,\n 12,\n 11,\n 10,\n 9,\n 8,\n 8,\n 7,\n 7,\n 7,\n 7,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5\n ];\n var groupBases = [\n 0,\n 0,\n 33554432,\n 43046721,\n 16777216,\n 48828125,\n 60466176,\n 40353607,\n 16777216,\n 43046721,\n 1e7,\n 19487171,\n 35831808,\n 62748517,\n 7529536,\n 11390625,\n 16777216,\n 24137569,\n 34012224,\n 47045881,\n 64e6,\n 4084101,\n 5153632,\n 6436343,\n 7962624,\n 9765625,\n 11881376,\n 14348907,\n 17210368,\n 20511149,\n 243e5,\n 28629151,\n 33554432,\n 39135393,\n 45435424,\n 52521875,\n 60466176\n ];\n BN.prototype.toString = function toString2(base4, padding) {\n base4 = base4 || 10;\n padding = padding | 0 || 1;\n var out;\n if (base4 === 16 || base4 === \"hex\") {\n out = \"\";\n var off2 = 0;\n var carry = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var w3 = this.words[i3];\n var word = ((w3 << off2 | carry) & 16777215).toString(16);\n carry = w3 >>> 24 - off2 & 16777215;\n off2 += 2;\n if (off2 >= 26) {\n off2 -= 26;\n i3--;\n }\n if (carry !== 0 || i3 !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n if (base4 === (base4 | 0) && base4 >= 2 && base4 <= 36) {\n var groupSize = groupSizes[base4];\n var groupBase = groupBases[base4];\n out = \"\";\n var c4 = this.clone();\n c4.negative = 0;\n while (!c4.isZero()) {\n var r2 = c4.modrn(groupBase).toString(base4);\n c4 = c4.idivn(groupBase);\n if (!c4.isZero()) {\n out = zeros[groupSize - r2.length] + r2 + out;\n } else {\n out = r2 + out;\n }\n }\n if (this.isZero()) {\n out = \"0\" + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n assert9(false, \"Base should be between 2 and 36\");\n };\n BN.prototype.toNumber = function toNumber4() {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 67108864;\n } else if (this.length === 3 && this.words[2] === 1) {\n ret += 4503599627370496 + this.words[1] * 67108864;\n } else if (this.length > 2) {\n assert9(false, \"Number can only safely store up to 53 bits\");\n }\n return this.negative !== 0 ? -ret : ret;\n };\n BN.prototype.toJSON = function toJSON() {\n return this.toString(16, 2);\n };\n if (Buffer3) {\n BN.prototype.toBuffer = function toBuffer(endian, length) {\n return this.toArrayLike(Buffer3, endian, length);\n };\n }\n BN.prototype.toArray = function toArray(endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n var allocate = function allocate2(ArrayType, size6) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size6);\n }\n return new ArrayType(size6);\n };\n BN.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length) {\n this._strip();\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert9(byteLength <= reqLength, \"byte array longer than desired length\");\n assert9(reqLength > 0, \"Requested array length <= 0\");\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === \"le\" ? \"LE\" : \"BE\";\n this[\"_toArrayLike\" + postfix](res, byteLength);\n return res;\n };\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE(res, byteLength) {\n var position = 0;\n var carry = 0;\n for (var i3 = 0, shift = 0; i3 < this.length; i3++) {\n var word = this.words[i3] << shift | carry;\n res[position++] = word & 255;\n if (position < res.length) {\n res[position++] = word >> 8 & 255;\n }\n if (position < res.length) {\n res[position++] = word >> 16 & 255;\n }\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = word >> 24 & 255;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n if (position < res.length) {\n res[position++] = carry;\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE(res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n for (var i3 = 0, shift = 0; i3 < this.length; i3++) {\n var word = this.words[i3] << shift | carry;\n res[position--] = word & 255;\n if (position >= 0) {\n res[position--] = word >> 8 & 255;\n }\n if (position >= 0) {\n res[position--] = word >> 16 & 255;\n }\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = word >> 24 & 255;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n if (position >= 0) {\n res[position--] = carry;\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits(w3) {\n return 32 - Math.clz32(w3);\n };\n } else {\n BN.prototype._countBits = function _countBits(w3) {\n var t3 = w3;\n var r2 = 0;\n if (t3 >= 4096) {\n r2 += 13;\n t3 >>>= 13;\n }\n if (t3 >= 64) {\n r2 += 7;\n t3 >>>= 7;\n }\n if (t3 >= 8) {\n r2 += 4;\n t3 >>>= 4;\n }\n if (t3 >= 2) {\n r2 += 2;\n t3 >>>= 2;\n }\n return r2 + t3;\n };\n }\n BN.prototype._zeroBits = function _zeroBits(w3) {\n if (w3 === 0)\n return 26;\n var t3 = w3;\n var r2 = 0;\n if ((t3 & 8191) === 0) {\n r2 += 13;\n t3 >>>= 13;\n }\n if ((t3 & 127) === 0) {\n r2 += 7;\n t3 >>>= 7;\n }\n if ((t3 & 15) === 0) {\n r2 += 4;\n t3 >>>= 4;\n }\n if ((t3 & 3) === 0) {\n r2 += 2;\n t3 >>>= 2;\n }\n if ((t3 & 1) === 0) {\n r2++;\n }\n return r2;\n };\n BN.prototype.bitLength = function bitLength() {\n var w3 = this.words[this.length - 1];\n var hi = this._countBits(w3);\n return (this.length - 1) * 26 + hi;\n };\n function toBitArray(num2) {\n var w3 = new Array(num2.bitLength());\n for (var bit = 0; bit < w3.length; bit++) {\n var off2 = bit / 26 | 0;\n var wbit = bit % 26;\n w3[bit] = num2.words[off2] >>> wbit & 1;\n }\n return w3;\n }\n BN.prototype.zeroBits = function zeroBits() {\n if (this.isZero())\n return 0;\n var r2 = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var b4 = this._zeroBits(this.words[i3]);\n r2 += b4;\n if (b4 !== 26)\n break;\n }\n return r2;\n };\n BN.prototype.byteLength = function byteLength() {\n return Math.ceil(this.bitLength() / 8);\n };\n BN.prototype.toTwos = function toTwos(width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n BN.prototype.fromTwos = function fromTwos(width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n BN.prototype.isNeg = function isNeg() {\n return this.negative !== 0;\n };\n BN.prototype.neg = function neg() {\n return this.clone().ineg();\n };\n BN.prototype.ineg = function ineg() {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n return this;\n };\n BN.prototype.iuor = function iuor(num2) {\n while (this.length < num2.length) {\n this.words[this.length++] = 0;\n }\n for (var i3 = 0; i3 < num2.length; i3++) {\n this.words[i3] = this.words[i3] | num2.words[i3];\n }\n return this._strip();\n };\n BN.prototype.ior = function ior(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuor(num2);\n };\n BN.prototype.or = function or(num2) {\n if (this.length > num2.length)\n return this.clone().ior(num2);\n return num2.clone().ior(this);\n };\n BN.prototype.uor = function uor(num2) {\n if (this.length > num2.length)\n return this.clone().iuor(num2);\n return num2.clone().iuor(this);\n };\n BN.prototype.iuand = function iuand(num2) {\n var b4;\n if (this.length > num2.length) {\n b4 = num2;\n } else {\n b4 = this;\n }\n for (var i3 = 0; i3 < b4.length; i3++) {\n this.words[i3] = this.words[i3] & num2.words[i3];\n }\n this.length = b4.length;\n return this._strip();\n };\n BN.prototype.iand = function iand(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuand(num2);\n };\n BN.prototype.and = function and(num2) {\n if (this.length > num2.length)\n return this.clone().iand(num2);\n return num2.clone().iand(this);\n };\n BN.prototype.uand = function uand(num2) {\n if (this.length > num2.length)\n return this.clone().iuand(num2);\n return num2.clone().iuand(this);\n };\n BN.prototype.iuxor = function iuxor(num2) {\n var a3;\n var b4;\n if (this.length > num2.length) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n for (var i3 = 0; i3 < b4.length; i3++) {\n this.words[i3] = a3.words[i3] ^ b4.words[i3];\n }\n if (this !== a3) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n this.length = a3.length;\n return this._strip();\n };\n BN.prototype.ixor = function ixor(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuxor(num2);\n };\n BN.prototype.xor = function xor(num2) {\n if (this.length > num2.length)\n return this.clone().ixor(num2);\n return num2.clone().ixor(this);\n };\n BN.prototype.uxor = function uxor(num2) {\n if (this.length > num2.length)\n return this.clone().iuxor(num2);\n return num2.clone().iuxor(this);\n };\n BN.prototype.inotn = function inotn(width) {\n assert9(typeof width === \"number\" && width >= 0);\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n this._expand(bytesNeeded);\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n for (var i3 = 0; i3 < bytesNeeded; i3++) {\n this.words[i3] = ~this.words[i3] & 67108863;\n }\n if (bitsLeft > 0) {\n this.words[i3] = ~this.words[i3] & 67108863 >> 26 - bitsLeft;\n }\n return this._strip();\n };\n BN.prototype.notn = function notn(width) {\n return this.clone().inotn(width);\n };\n BN.prototype.setn = function setn(bit, val) {\n assert9(typeof bit === \"number\" && bit >= 0);\n var off2 = bit / 26 | 0;\n var wbit = bit % 26;\n this._expand(off2 + 1);\n if (val) {\n this.words[off2] = this.words[off2] | 1 << wbit;\n } else {\n this.words[off2] = this.words[off2] & ~(1 << wbit);\n }\n return this._strip();\n };\n BN.prototype.iadd = function iadd(num2) {\n var r2;\n if (this.negative !== 0 && num2.negative === 0) {\n this.negative = 0;\n r2 = this.isub(num2);\n this.negative ^= 1;\n return this._normSign();\n } else if (this.negative === 0 && num2.negative !== 0) {\n num2.negative = 0;\n r2 = this.isub(num2);\n num2.negative = 1;\n return r2._normSign();\n }\n var a3, b4;\n if (this.length > num2.length) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n var carry = 0;\n for (var i3 = 0; i3 < b4.length; i3++) {\n r2 = (a3.words[i3] | 0) + (b4.words[i3] | 0) + carry;\n this.words[i3] = r2 & 67108863;\n carry = r2 >>> 26;\n }\n for (; carry !== 0 && i3 < a3.length; i3++) {\n r2 = (a3.words[i3] | 0) + carry;\n this.words[i3] = r2 & 67108863;\n carry = r2 >>> 26;\n }\n this.length = a3.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n } else if (a3 !== this) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n return this;\n };\n BN.prototype.add = function add2(num2) {\n var res;\n if (num2.negative !== 0 && this.negative === 0) {\n num2.negative = 0;\n res = this.sub(num2);\n num2.negative ^= 1;\n return res;\n } else if (num2.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num2.sub(this);\n this.negative = 1;\n return res;\n }\n if (this.length > num2.length)\n return this.clone().iadd(num2);\n return num2.clone().iadd(this);\n };\n BN.prototype.isub = function isub(num2) {\n if (num2.negative !== 0) {\n num2.negative = 0;\n var r2 = this.iadd(num2);\n num2.negative = 1;\n return r2._normSign();\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num2);\n this.negative = 1;\n return this._normSign();\n }\n var cmp = this.cmp(num2);\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n var a3, b4;\n if (cmp > 0) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n var carry = 0;\n for (var i3 = 0; i3 < b4.length; i3++) {\n r2 = (a3.words[i3] | 0) - (b4.words[i3] | 0) + carry;\n carry = r2 >> 26;\n this.words[i3] = r2 & 67108863;\n }\n for (; carry !== 0 && i3 < a3.length; i3++) {\n r2 = (a3.words[i3] | 0) + carry;\n carry = r2 >> 26;\n this.words[i3] = r2 & 67108863;\n }\n if (carry === 0 && i3 < a3.length && a3 !== this) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n this.length = Math.max(this.length, i3);\n if (a3 !== this) {\n this.negative = 1;\n }\n return this._strip();\n };\n BN.prototype.sub = function sub(num2) {\n return this.clone().isub(num2);\n };\n function smallMulTo(self2, num2, out) {\n out.negative = num2.negative ^ self2.negative;\n var len = self2.length + num2.length | 0;\n out.length = len;\n len = len - 1 | 0;\n var a3 = self2.words[0] | 0;\n var b4 = num2.words[0] | 0;\n var r2 = a3 * b4;\n var lo = r2 & 67108863;\n var carry = r2 / 67108864 | 0;\n out.words[0] = lo;\n for (var k4 = 1; k4 < len; k4++) {\n var ncarry = carry >>> 26;\n var rword = carry & 67108863;\n var maxJ = Math.min(k4, num2.length - 1);\n for (var j2 = Math.max(0, k4 - self2.length + 1); j2 <= maxJ; j2++) {\n var i3 = k4 - j2 | 0;\n a3 = self2.words[i3] | 0;\n b4 = num2.words[j2] | 0;\n r2 = a3 * b4 + rword;\n ncarry += r2 / 67108864 | 0;\n rword = r2 & 67108863;\n }\n out.words[k4] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k4] = carry | 0;\n } else {\n out.length--;\n }\n return out._strip();\n }\n var comb10MulTo = function comb10MulTo2(self2, num2, out) {\n var a3 = self2.words;\n var b4 = num2.words;\n var o5 = out.words;\n var c4 = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a3[0] | 0;\n var al0 = a0 & 8191;\n var ah0 = a0 >>> 13;\n var a1 = a3[1] | 0;\n var al1 = a1 & 8191;\n var ah1 = a1 >>> 13;\n var a22 = a3[2] | 0;\n var al2 = a22 & 8191;\n var ah2 = a22 >>> 13;\n var a32 = a3[3] | 0;\n var al3 = a32 & 8191;\n var ah3 = a32 >>> 13;\n var a4 = a3[4] | 0;\n var al4 = a4 & 8191;\n var ah4 = a4 >>> 13;\n var a5 = a3[5] | 0;\n var al5 = a5 & 8191;\n var ah5 = a5 >>> 13;\n var a6 = a3[6] | 0;\n var al6 = a6 & 8191;\n var ah6 = a6 >>> 13;\n var a7 = a3[7] | 0;\n var al7 = a7 & 8191;\n var ah7 = a7 >>> 13;\n var a8 = a3[8] | 0;\n var al8 = a8 & 8191;\n var ah8 = a8 >>> 13;\n var a9 = a3[9] | 0;\n var al9 = a9 & 8191;\n var ah9 = a9 >>> 13;\n var b0 = b4[0] | 0;\n var bl0 = b0 & 8191;\n var bh0 = b0 >>> 13;\n var b1 = b4[1] | 0;\n var bl1 = b1 & 8191;\n var bh1 = b1 >>> 13;\n var b22 = b4[2] | 0;\n var bl2 = b22 & 8191;\n var bh2 = b22 >>> 13;\n var b32 = b4[3] | 0;\n var bl3 = b32 & 8191;\n var bh3 = b32 >>> 13;\n var b42 = b4[4] | 0;\n var bl4 = b42 & 8191;\n var bh4 = b42 >>> 13;\n var b5 = b4[5] | 0;\n var bl5 = b5 & 8191;\n var bh5 = b5 >>> 13;\n var b6 = b4[6] | 0;\n var bl6 = b6 & 8191;\n var bh6 = b6 >>> 13;\n var b7 = b4[7] | 0;\n var bl7 = b7 & 8191;\n var bh7 = b7 >>> 13;\n var b8 = b4[8] | 0;\n var bl8 = b8 & 8191;\n var bh8 = b8 >>> 13;\n var b9 = b4[9] | 0;\n var bl9 = b9 & 8191;\n var bh9 = b9 >>> 13;\n out.negative = self2.negative ^ num2.negative;\n out.length = 19;\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = mid + Math.imul(ah0, bl0) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w0 >>> 26) | 0;\n w0 &= 67108863;\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = mid + Math.imul(ah1, bl0) | 0;\n hi = Math.imul(ah1, bh0);\n lo = lo + Math.imul(al0, bl1) | 0;\n mid = mid + Math.imul(al0, bh1) | 0;\n mid = mid + Math.imul(ah0, bl1) | 0;\n hi = hi + Math.imul(ah0, bh1) | 0;\n var w1 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w1 >>> 26) | 0;\n w1 &= 67108863;\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = mid + Math.imul(ah2, bl0) | 0;\n hi = Math.imul(ah2, bh0);\n lo = lo + Math.imul(al1, bl1) | 0;\n mid = mid + Math.imul(al1, bh1) | 0;\n mid = mid + Math.imul(ah1, bl1) | 0;\n hi = hi + Math.imul(ah1, bh1) | 0;\n lo = lo + Math.imul(al0, bl2) | 0;\n mid = mid + Math.imul(al0, bh2) | 0;\n mid = mid + Math.imul(ah0, bl2) | 0;\n hi = hi + Math.imul(ah0, bh2) | 0;\n var w22 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w22 >>> 26) | 0;\n w22 &= 67108863;\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = mid + Math.imul(ah3, bl0) | 0;\n hi = Math.imul(ah3, bh0);\n lo = lo + Math.imul(al2, bl1) | 0;\n mid = mid + Math.imul(al2, bh1) | 0;\n mid = mid + Math.imul(ah2, bl1) | 0;\n hi = hi + Math.imul(ah2, bh1) | 0;\n lo = lo + Math.imul(al1, bl2) | 0;\n mid = mid + Math.imul(al1, bh2) | 0;\n mid = mid + Math.imul(ah1, bl2) | 0;\n hi = hi + Math.imul(ah1, bh2) | 0;\n lo = lo + Math.imul(al0, bl3) | 0;\n mid = mid + Math.imul(al0, bh3) | 0;\n mid = mid + Math.imul(ah0, bl3) | 0;\n hi = hi + Math.imul(ah0, bh3) | 0;\n var w3 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w3 >>> 26) | 0;\n w3 &= 67108863;\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = mid + Math.imul(ah4, bl0) | 0;\n hi = Math.imul(ah4, bh0);\n lo = lo + Math.imul(al3, bl1) | 0;\n mid = mid + Math.imul(al3, bh1) | 0;\n mid = mid + Math.imul(ah3, bl1) | 0;\n hi = hi + Math.imul(ah3, bh1) | 0;\n lo = lo + Math.imul(al2, bl2) | 0;\n mid = mid + Math.imul(al2, bh2) | 0;\n mid = mid + Math.imul(ah2, bl2) | 0;\n hi = hi + Math.imul(ah2, bh2) | 0;\n lo = lo + Math.imul(al1, bl3) | 0;\n mid = mid + Math.imul(al1, bh3) | 0;\n mid = mid + Math.imul(ah1, bl3) | 0;\n hi = hi + Math.imul(ah1, bh3) | 0;\n lo = lo + Math.imul(al0, bl4) | 0;\n mid = mid + Math.imul(al0, bh4) | 0;\n mid = mid + Math.imul(ah0, bl4) | 0;\n hi = hi + Math.imul(ah0, bh4) | 0;\n var w4 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w4 >>> 26) | 0;\n w4 &= 67108863;\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = mid + Math.imul(ah5, bl0) | 0;\n hi = Math.imul(ah5, bh0);\n lo = lo + Math.imul(al4, bl1) | 0;\n mid = mid + Math.imul(al4, bh1) | 0;\n mid = mid + Math.imul(ah4, bl1) | 0;\n hi = hi + Math.imul(ah4, bh1) | 0;\n lo = lo + Math.imul(al3, bl2) | 0;\n mid = mid + Math.imul(al3, bh2) | 0;\n mid = mid + Math.imul(ah3, bl2) | 0;\n hi = hi + Math.imul(ah3, bh2) | 0;\n lo = lo + Math.imul(al2, bl3) | 0;\n mid = mid + Math.imul(al2, bh3) | 0;\n mid = mid + Math.imul(ah2, bl3) | 0;\n hi = hi + Math.imul(ah2, bh3) | 0;\n lo = lo + Math.imul(al1, bl4) | 0;\n mid = mid + Math.imul(al1, bh4) | 0;\n mid = mid + Math.imul(ah1, bl4) | 0;\n hi = hi + Math.imul(ah1, bh4) | 0;\n lo = lo + Math.imul(al0, bl5) | 0;\n mid = mid + Math.imul(al0, bh5) | 0;\n mid = mid + Math.imul(ah0, bl5) | 0;\n hi = hi + Math.imul(ah0, bh5) | 0;\n var w5 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w5 >>> 26) | 0;\n w5 &= 67108863;\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = mid + Math.imul(ah6, bl0) | 0;\n hi = Math.imul(ah6, bh0);\n lo = lo + Math.imul(al5, bl1) | 0;\n mid = mid + Math.imul(al5, bh1) | 0;\n mid = mid + Math.imul(ah5, bl1) | 0;\n hi = hi + Math.imul(ah5, bh1) | 0;\n lo = lo + Math.imul(al4, bl2) | 0;\n mid = mid + Math.imul(al4, bh2) | 0;\n mid = mid + Math.imul(ah4, bl2) | 0;\n hi = hi + Math.imul(ah4, bh2) | 0;\n lo = lo + Math.imul(al3, bl3) | 0;\n mid = mid + Math.imul(al3, bh3) | 0;\n mid = mid + Math.imul(ah3, bl3) | 0;\n hi = hi + Math.imul(ah3, bh3) | 0;\n lo = lo + Math.imul(al2, bl4) | 0;\n mid = mid + Math.imul(al2, bh4) | 0;\n mid = mid + Math.imul(ah2, bl4) | 0;\n hi = hi + Math.imul(ah2, bh4) | 0;\n lo = lo + Math.imul(al1, bl5) | 0;\n mid = mid + Math.imul(al1, bh5) | 0;\n mid = mid + Math.imul(ah1, bl5) | 0;\n hi = hi + Math.imul(ah1, bh5) | 0;\n lo = lo + Math.imul(al0, bl6) | 0;\n mid = mid + Math.imul(al0, bh6) | 0;\n mid = mid + Math.imul(ah0, bl6) | 0;\n hi = hi + Math.imul(ah0, bh6) | 0;\n var w6 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w6 >>> 26) | 0;\n w6 &= 67108863;\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = mid + Math.imul(ah7, bl0) | 0;\n hi = Math.imul(ah7, bh0);\n lo = lo + Math.imul(al6, bl1) | 0;\n mid = mid + Math.imul(al6, bh1) | 0;\n mid = mid + Math.imul(ah6, bl1) | 0;\n hi = hi + Math.imul(ah6, bh1) | 0;\n lo = lo + Math.imul(al5, bl2) | 0;\n mid = mid + Math.imul(al5, bh2) | 0;\n mid = mid + Math.imul(ah5, bl2) | 0;\n hi = hi + Math.imul(ah5, bh2) | 0;\n lo = lo + Math.imul(al4, bl3) | 0;\n mid = mid + Math.imul(al4, bh3) | 0;\n mid = mid + Math.imul(ah4, bl3) | 0;\n hi = hi + Math.imul(ah4, bh3) | 0;\n lo = lo + Math.imul(al3, bl4) | 0;\n mid = mid + Math.imul(al3, bh4) | 0;\n mid = mid + Math.imul(ah3, bl4) | 0;\n hi = hi + Math.imul(ah3, bh4) | 0;\n lo = lo + Math.imul(al2, bl5) | 0;\n mid = mid + Math.imul(al2, bh5) | 0;\n mid = mid + Math.imul(ah2, bl5) | 0;\n hi = hi + Math.imul(ah2, bh5) | 0;\n lo = lo + Math.imul(al1, bl6) | 0;\n mid = mid + Math.imul(al1, bh6) | 0;\n mid = mid + Math.imul(ah1, bl6) | 0;\n hi = hi + Math.imul(ah1, bh6) | 0;\n lo = lo + Math.imul(al0, bl7) | 0;\n mid = mid + Math.imul(al0, bh7) | 0;\n mid = mid + Math.imul(ah0, bl7) | 0;\n hi = hi + Math.imul(ah0, bh7) | 0;\n var w7 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w7 >>> 26) | 0;\n w7 &= 67108863;\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = mid + Math.imul(ah8, bl0) | 0;\n hi = Math.imul(ah8, bh0);\n lo = lo + Math.imul(al7, bl1) | 0;\n mid = mid + Math.imul(al7, bh1) | 0;\n mid = mid + Math.imul(ah7, bl1) | 0;\n hi = hi + Math.imul(ah7, bh1) | 0;\n lo = lo + Math.imul(al6, bl2) | 0;\n mid = mid + Math.imul(al6, bh2) | 0;\n mid = mid + Math.imul(ah6, bl2) | 0;\n hi = hi + Math.imul(ah6, bh2) | 0;\n lo = lo + Math.imul(al5, bl3) | 0;\n mid = mid + Math.imul(al5, bh3) | 0;\n mid = mid + Math.imul(ah5, bl3) | 0;\n hi = hi + Math.imul(ah5, bh3) | 0;\n lo = lo + Math.imul(al4, bl4) | 0;\n mid = mid + Math.imul(al4, bh4) | 0;\n mid = mid + Math.imul(ah4, bl4) | 0;\n hi = hi + Math.imul(ah4, bh4) | 0;\n lo = lo + Math.imul(al3, bl5) | 0;\n mid = mid + Math.imul(al3, bh5) | 0;\n mid = mid + Math.imul(ah3, bl5) | 0;\n hi = hi + Math.imul(ah3, bh5) | 0;\n lo = lo + Math.imul(al2, bl6) | 0;\n mid = mid + Math.imul(al2, bh6) | 0;\n mid = mid + Math.imul(ah2, bl6) | 0;\n hi = hi + Math.imul(ah2, bh6) | 0;\n lo = lo + Math.imul(al1, bl7) | 0;\n mid = mid + Math.imul(al1, bh7) | 0;\n mid = mid + Math.imul(ah1, bl7) | 0;\n hi = hi + Math.imul(ah1, bh7) | 0;\n lo = lo + Math.imul(al0, bl8) | 0;\n mid = mid + Math.imul(al0, bh8) | 0;\n mid = mid + Math.imul(ah0, bl8) | 0;\n hi = hi + Math.imul(ah0, bh8) | 0;\n var w8 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w8 >>> 26) | 0;\n w8 &= 67108863;\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = mid + Math.imul(ah9, bl0) | 0;\n hi = Math.imul(ah9, bh0);\n lo = lo + Math.imul(al8, bl1) | 0;\n mid = mid + Math.imul(al8, bh1) | 0;\n mid = mid + Math.imul(ah8, bl1) | 0;\n hi = hi + Math.imul(ah8, bh1) | 0;\n lo = lo + Math.imul(al7, bl2) | 0;\n mid = mid + Math.imul(al7, bh2) | 0;\n mid = mid + Math.imul(ah7, bl2) | 0;\n hi = hi + Math.imul(ah7, bh2) | 0;\n lo = lo + Math.imul(al6, bl3) | 0;\n mid = mid + Math.imul(al6, bh3) | 0;\n mid = mid + Math.imul(ah6, bl3) | 0;\n hi = hi + Math.imul(ah6, bh3) | 0;\n lo = lo + Math.imul(al5, bl4) | 0;\n mid = mid + Math.imul(al5, bh4) | 0;\n mid = mid + Math.imul(ah5, bl4) | 0;\n hi = hi + Math.imul(ah5, bh4) | 0;\n lo = lo + Math.imul(al4, bl5) | 0;\n mid = mid + Math.imul(al4, bh5) | 0;\n mid = mid + Math.imul(ah4, bl5) | 0;\n hi = hi + Math.imul(ah4, bh5) | 0;\n lo = lo + Math.imul(al3, bl6) | 0;\n mid = mid + Math.imul(al3, bh6) | 0;\n mid = mid + Math.imul(ah3, bl6) | 0;\n hi = hi + Math.imul(ah3, bh6) | 0;\n lo = lo + Math.imul(al2, bl7) | 0;\n mid = mid + Math.imul(al2, bh7) | 0;\n mid = mid + Math.imul(ah2, bl7) | 0;\n hi = hi + Math.imul(ah2, bh7) | 0;\n lo = lo + Math.imul(al1, bl8) | 0;\n mid = mid + Math.imul(al1, bh8) | 0;\n mid = mid + Math.imul(ah1, bl8) | 0;\n hi = hi + Math.imul(ah1, bh8) | 0;\n lo = lo + Math.imul(al0, bl9) | 0;\n mid = mid + Math.imul(al0, bh9) | 0;\n mid = mid + Math.imul(ah0, bl9) | 0;\n hi = hi + Math.imul(ah0, bh9) | 0;\n var w9 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w9 >>> 26) | 0;\n w9 &= 67108863;\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = mid + Math.imul(ah9, bl1) | 0;\n hi = Math.imul(ah9, bh1);\n lo = lo + Math.imul(al8, bl2) | 0;\n mid = mid + Math.imul(al8, bh2) | 0;\n mid = mid + Math.imul(ah8, bl2) | 0;\n hi = hi + Math.imul(ah8, bh2) | 0;\n lo = lo + Math.imul(al7, bl3) | 0;\n mid = mid + Math.imul(al7, bh3) | 0;\n mid = mid + Math.imul(ah7, bl3) | 0;\n hi = hi + Math.imul(ah7, bh3) | 0;\n lo = lo + Math.imul(al6, bl4) | 0;\n mid = mid + Math.imul(al6, bh4) | 0;\n mid = mid + Math.imul(ah6, bl4) | 0;\n hi = hi + Math.imul(ah6, bh4) | 0;\n lo = lo + Math.imul(al5, bl5) | 0;\n mid = mid + Math.imul(al5, bh5) | 0;\n mid = mid + Math.imul(ah5, bl5) | 0;\n hi = hi + Math.imul(ah5, bh5) | 0;\n lo = lo + Math.imul(al4, bl6) | 0;\n mid = mid + Math.imul(al4, bh6) | 0;\n mid = mid + Math.imul(ah4, bl6) | 0;\n hi = hi + Math.imul(ah4, bh6) | 0;\n lo = lo + Math.imul(al3, bl7) | 0;\n mid = mid + Math.imul(al3, bh7) | 0;\n mid = mid + Math.imul(ah3, bl7) | 0;\n hi = hi + Math.imul(ah3, bh7) | 0;\n lo = lo + Math.imul(al2, bl8) | 0;\n mid = mid + Math.imul(al2, bh8) | 0;\n mid = mid + Math.imul(ah2, bl8) | 0;\n hi = hi + Math.imul(ah2, bh8) | 0;\n lo = lo + Math.imul(al1, bl9) | 0;\n mid = mid + Math.imul(al1, bh9) | 0;\n mid = mid + Math.imul(ah1, bl9) | 0;\n hi = hi + Math.imul(ah1, bh9) | 0;\n var w10 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w10 >>> 26) | 0;\n w10 &= 67108863;\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = mid + Math.imul(ah9, bl2) | 0;\n hi = Math.imul(ah9, bh2);\n lo = lo + Math.imul(al8, bl3) | 0;\n mid = mid + Math.imul(al8, bh3) | 0;\n mid = mid + Math.imul(ah8, bl3) | 0;\n hi = hi + Math.imul(ah8, bh3) | 0;\n lo = lo + Math.imul(al7, bl4) | 0;\n mid = mid + Math.imul(al7, bh4) | 0;\n mid = mid + Math.imul(ah7, bl4) | 0;\n hi = hi + Math.imul(ah7, bh4) | 0;\n lo = lo + Math.imul(al6, bl5) | 0;\n mid = mid + Math.imul(al6, bh5) | 0;\n mid = mid + Math.imul(ah6, bl5) | 0;\n hi = hi + Math.imul(ah6, bh5) | 0;\n lo = lo + Math.imul(al5, bl6) | 0;\n mid = mid + Math.imul(al5, bh6) | 0;\n mid = mid + Math.imul(ah5, bl6) | 0;\n hi = hi + Math.imul(ah5, bh6) | 0;\n lo = lo + Math.imul(al4, bl7) | 0;\n mid = mid + Math.imul(al4, bh7) | 0;\n mid = mid + Math.imul(ah4, bl7) | 0;\n hi = hi + Math.imul(ah4, bh7) | 0;\n lo = lo + Math.imul(al3, bl8) | 0;\n mid = mid + Math.imul(al3, bh8) | 0;\n mid = mid + Math.imul(ah3, bl8) | 0;\n hi = hi + Math.imul(ah3, bh8) | 0;\n lo = lo + Math.imul(al2, bl9) | 0;\n mid = mid + Math.imul(al2, bh9) | 0;\n mid = mid + Math.imul(ah2, bl9) | 0;\n hi = hi + Math.imul(ah2, bh9) | 0;\n var w11 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w11 >>> 26) | 0;\n w11 &= 67108863;\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = mid + Math.imul(ah9, bl3) | 0;\n hi = Math.imul(ah9, bh3);\n lo = lo + Math.imul(al8, bl4) | 0;\n mid = mid + Math.imul(al8, bh4) | 0;\n mid = mid + Math.imul(ah8, bl4) | 0;\n hi = hi + Math.imul(ah8, bh4) | 0;\n lo = lo + Math.imul(al7, bl5) | 0;\n mid = mid + Math.imul(al7, bh5) | 0;\n mid = mid + Math.imul(ah7, bl5) | 0;\n hi = hi + Math.imul(ah7, bh5) | 0;\n lo = lo + Math.imul(al6, bl6) | 0;\n mid = mid + Math.imul(al6, bh6) | 0;\n mid = mid + Math.imul(ah6, bl6) | 0;\n hi = hi + Math.imul(ah6, bh6) | 0;\n lo = lo + Math.imul(al5, bl7) | 0;\n mid = mid + Math.imul(al5, bh7) | 0;\n mid = mid + Math.imul(ah5, bl7) | 0;\n hi = hi + Math.imul(ah5, bh7) | 0;\n lo = lo + Math.imul(al4, bl8) | 0;\n mid = mid + Math.imul(al4, bh8) | 0;\n mid = mid + Math.imul(ah4, bl8) | 0;\n hi = hi + Math.imul(ah4, bh8) | 0;\n lo = lo + Math.imul(al3, bl9) | 0;\n mid = mid + Math.imul(al3, bh9) | 0;\n mid = mid + Math.imul(ah3, bl9) | 0;\n hi = hi + Math.imul(ah3, bh9) | 0;\n var w12 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w12 >>> 26) | 0;\n w12 &= 67108863;\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = mid + Math.imul(ah9, bl4) | 0;\n hi = Math.imul(ah9, bh4);\n lo = lo + Math.imul(al8, bl5) | 0;\n mid = mid + Math.imul(al8, bh5) | 0;\n mid = mid + Math.imul(ah8, bl5) | 0;\n hi = hi + Math.imul(ah8, bh5) | 0;\n lo = lo + Math.imul(al7, bl6) | 0;\n mid = mid + Math.imul(al7, bh6) | 0;\n mid = mid + Math.imul(ah7, bl6) | 0;\n hi = hi + Math.imul(ah7, bh6) | 0;\n lo = lo + Math.imul(al6, bl7) | 0;\n mid = mid + Math.imul(al6, bh7) | 0;\n mid = mid + Math.imul(ah6, bl7) | 0;\n hi = hi + Math.imul(ah6, bh7) | 0;\n lo = lo + Math.imul(al5, bl8) | 0;\n mid = mid + Math.imul(al5, bh8) | 0;\n mid = mid + Math.imul(ah5, bl8) | 0;\n hi = hi + Math.imul(ah5, bh8) | 0;\n lo = lo + Math.imul(al4, bl9) | 0;\n mid = mid + Math.imul(al4, bh9) | 0;\n mid = mid + Math.imul(ah4, bl9) | 0;\n hi = hi + Math.imul(ah4, bh9) | 0;\n var w13 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w13 >>> 26) | 0;\n w13 &= 67108863;\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = mid + Math.imul(ah9, bl5) | 0;\n hi = Math.imul(ah9, bh5);\n lo = lo + Math.imul(al8, bl6) | 0;\n mid = mid + Math.imul(al8, bh6) | 0;\n mid = mid + Math.imul(ah8, bl6) | 0;\n hi = hi + Math.imul(ah8, bh6) | 0;\n lo = lo + Math.imul(al7, bl7) | 0;\n mid = mid + Math.imul(al7, bh7) | 0;\n mid = mid + Math.imul(ah7, bl7) | 0;\n hi = hi + Math.imul(ah7, bh7) | 0;\n lo = lo + Math.imul(al6, bl8) | 0;\n mid = mid + Math.imul(al6, bh8) | 0;\n mid = mid + Math.imul(ah6, bl8) | 0;\n hi = hi + Math.imul(ah6, bh8) | 0;\n lo = lo + Math.imul(al5, bl9) | 0;\n mid = mid + Math.imul(al5, bh9) | 0;\n mid = mid + Math.imul(ah5, bl9) | 0;\n hi = hi + Math.imul(ah5, bh9) | 0;\n var w14 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w14 >>> 26) | 0;\n w14 &= 67108863;\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = mid + Math.imul(ah9, bl6) | 0;\n hi = Math.imul(ah9, bh6);\n lo = lo + Math.imul(al8, bl7) | 0;\n mid = mid + Math.imul(al8, bh7) | 0;\n mid = mid + Math.imul(ah8, bl7) | 0;\n hi = hi + Math.imul(ah8, bh7) | 0;\n lo = lo + Math.imul(al7, bl8) | 0;\n mid = mid + Math.imul(al7, bh8) | 0;\n mid = mid + Math.imul(ah7, bl8) | 0;\n hi = hi + Math.imul(ah7, bh8) | 0;\n lo = lo + Math.imul(al6, bl9) | 0;\n mid = mid + Math.imul(al6, bh9) | 0;\n mid = mid + Math.imul(ah6, bl9) | 0;\n hi = hi + Math.imul(ah6, bh9) | 0;\n var w15 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w15 >>> 26) | 0;\n w15 &= 67108863;\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = mid + Math.imul(ah9, bl7) | 0;\n hi = Math.imul(ah9, bh7);\n lo = lo + Math.imul(al8, bl8) | 0;\n mid = mid + Math.imul(al8, bh8) | 0;\n mid = mid + Math.imul(ah8, bl8) | 0;\n hi = hi + Math.imul(ah8, bh8) | 0;\n lo = lo + Math.imul(al7, bl9) | 0;\n mid = mid + Math.imul(al7, bh9) | 0;\n mid = mid + Math.imul(ah7, bl9) | 0;\n hi = hi + Math.imul(ah7, bh9) | 0;\n var w16 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w16 >>> 26) | 0;\n w16 &= 67108863;\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = mid + Math.imul(ah9, bl8) | 0;\n hi = Math.imul(ah9, bh8);\n lo = lo + Math.imul(al8, bl9) | 0;\n mid = mid + Math.imul(al8, bh9) | 0;\n mid = mid + Math.imul(ah8, bl9) | 0;\n hi = hi + Math.imul(ah8, bh9) | 0;\n var w17 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w17 >>> 26) | 0;\n w17 &= 67108863;\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = mid + Math.imul(ah9, bl9) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w18 >>> 26) | 0;\n w18 &= 67108863;\n o5[0] = w0;\n o5[1] = w1;\n o5[2] = w22;\n o5[3] = w3;\n o5[4] = w4;\n o5[5] = w5;\n o5[6] = w6;\n o5[7] = w7;\n o5[8] = w8;\n o5[9] = w9;\n o5[10] = w10;\n o5[11] = w11;\n o5[12] = w12;\n o5[13] = w13;\n o5[14] = w14;\n o5[15] = w15;\n o5[16] = w16;\n o5[17] = w17;\n o5[18] = w18;\n if (c4 !== 0) {\n o5[19] = c4;\n out.length++;\n }\n return out;\n };\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n function bigMulTo(self2, num2, out) {\n out.negative = num2.negative ^ self2.negative;\n out.length = self2.length + num2.length;\n var carry = 0;\n var hncarry = 0;\n for (var k4 = 0; k4 < out.length - 1; k4++) {\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 67108863;\n var maxJ = Math.min(k4, num2.length - 1);\n for (var j2 = Math.max(0, k4 - self2.length + 1); j2 <= maxJ; j2++) {\n var i3 = k4 - j2;\n var a3 = self2.words[i3] | 0;\n var b4 = num2.words[j2] | 0;\n var r2 = a3 * b4;\n var lo = r2 & 67108863;\n ncarry = ncarry + (r2 / 67108864 | 0) | 0;\n lo = lo + rword | 0;\n rword = lo & 67108863;\n ncarry = ncarry + (lo >>> 26) | 0;\n hncarry += ncarry >>> 26;\n ncarry &= 67108863;\n }\n out.words[k4] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k4] = carry;\n } else {\n out.length--;\n }\n return out._strip();\n }\n function jumboMulTo(self2, num2, out) {\n return bigMulTo(self2, num2, out);\n }\n BN.prototype.mulTo = function mulTo(num2, out) {\n var res;\n var len = this.length + num2.length;\n if (this.length === 10 && num2.length === 10) {\n res = comb10MulTo(this, num2, out);\n } else if (len < 63) {\n res = smallMulTo(this, num2, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num2, out);\n } else {\n res = jumboMulTo(this, num2, out);\n }\n return res;\n };\n function FFTM(x4, y6) {\n this.x = x4;\n this.y = y6;\n }\n FFTM.prototype.makeRBT = function makeRBT(N4) {\n var t3 = new Array(N4);\n var l6 = BN.prototype._countBits(N4) - 1;\n for (var i3 = 0; i3 < N4; i3++) {\n t3[i3] = this.revBin(i3, l6, N4);\n }\n return t3;\n };\n FFTM.prototype.revBin = function revBin(x4, l6, N4) {\n if (x4 === 0 || x4 === N4 - 1)\n return x4;\n var rb = 0;\n for (var i3 = 0; i3 < l6; i3++) {\n rb |= (x4 & 1) << l6 - i3 - 1;\n x4 >>= 1;\n }\n return rb;\n };\n FFTM.prototype.permute = function permute(rbt, rws, iws, rtws, itws, N4) {\n for (var i3 = 0; i3 < N4; i3++) {\n rtws[i3] = rws[rbt[i3]];\n itws[i3] = iws[rbt[i3]];\n }\n };\n FFTM.prototype.transform = function transform(rws, iws, rtws, itws, N4, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N4);\n for (var s4 = 1; s4 < N4; s4 <<= 1) {\n var l6 = s4 << 1;\n var rtwdf = Math.cos(2 * Math.PI / l6);\n var itwdf = Math.sin(2 * Math.PI / l6);\n for (var p4 = 0; p4 < N4; p4 += l6) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n for (var j2 = 0; j2 < s4; j2++) {\n var re = rtws[p4 + j2];\n var ie = itws[p4 + j2];\n var ro = rtws[p4 + j2 + s4];\n var io = itws[p4 + j2 + s4];\n var rx = rtwdf_ * ro - itwdf_ * io;\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n rtws[p4 + j2] = re + ro;\n itws[p4 + j2] = ie + io;\n rtws[p4 + j2 + s4] = re - ro;\n itws[p4 + j2 + s4] = ie - io;\n if (j2 !== l6) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n FFTM.prototype.guessLen13b = function guessLen13b(n2, m2) {\n var N4 = Math.max(m2, n2) | 1;\n var odd = N4 & 1;\n var i3 = 0;\n for (N4 = N4 / 2 | 0; N4; N4 = N4 >>> 1) {\n i3++;\n }\n return 1 << i3 + 1 + odd;\n };\n FFTM.prototype.conjugate = function conjugate(rws, iws, N4) {\n if (N4 <= 1)\n return;\n for (var i3 = 0; i3 < N4 / 2; i3++) {\n var t3 = rws[i3];\n rws[i3] = rws[N4 - i3 - 1];\n rws[N4 - i3 - 1] = t3;\n t3 = iws[i3];\n iws[i3] = -iws[N4 - i3 - 1];\n iws[N4 - i3 - 1] = -t3;\n }\n };\n FFTM.prototype.normalize13b = function normalize13b(ws, N4) {\n var carry = 0;\n for (var i3 = 0; i3 < N4 / 2; i3++) {\n var w3 = Math.round(ws[2 * i3 + 1] / N4) * 8192 + Math.round(ws[2 * i3] / N4) + carry;\n ws[i3] = w3 & 67108863;\n if (w3 < 67108864) {\n carry = 0;\n } else {\n carry = w3 / 67108864 | 0;\n }\n }\n return ws;\n };\n FFTM.prototype.convert13b = function convert13b(ws, len, rws, N4) {\n var carry = 0;\n for (var i3 = 0; i3 < len; i3++) {\n carry = carry + (ws[i3] | 0);\n rws[2 * i3] = carry & 8191;\n carry = carry >>> 13;\n rws[2 * i3 + 1] = carry & 8191;\n carry = carry >>> 13;\n }\n for (i3 = 2 * len; i3 < N4; ++i3) {\n rws[i3] = 0;\n }\n assert9(carry === 0);\n assert9((carry & ~8191) === 0);\n };\n FFTM.prototype.stub = function stub(N4) {\n var ph = new Array(N4);\n for (var i3 = 0; i3 < N4; i3++) {\n ph[i3] = 0;\n }\n return ph;\n };\n FFTM.prototype.mulp = function mulp(x4, y6, out) {\n var N4 = 2 * this.guessLen13b(x4.length, y6.length);\n var rbt = this.makeRBT(N4);\n var _2 = this.stub(N4);\n var rws = new Array(N4);\n var rwst = new Array(N4);\n var iwst = new Array(N4);\n var nrws = new Array(N4);\n var nrwst = new Array(N4);\n var niwst = new Array(N4);\n var rmws = out.words;\n rmws.length = N4;\n this.convert13b(x4.words, x4.length, rws, N4);\n this.convert13b(y6.words, y6.length, nrws, N4);\n this.transform(rws, _2, rwst, iwst, N4, rbt);\n this.transform(nrws, _2, nrwst, niwst, N4, rbt);\n for (var i3 = 0; i3 < N4; i3++) {\n var rx = rwst[i3] * nrwst[i3] - iwst[i3] * niwst[i3];\n iwst[i3] = rwst[i3] * niwst[i3] + iwst[i3] * nrwst[i3];\n rwst[i3] = rx;\n }\n this.conjugate(rwst, iwst, N4);\n this.transform(rwst, iwst, rmws, _2, N4, rbt);\n this.conjugate(rmws, _2, N4);\n this.normalize13b(rmws, N4);\n out.negative = x4.negative ^ y6.negative;\n out.length = x4.length + y6.length;\n return out._strip();\n };\n BN.prototype.mul = function mul(num2) {\n var out = new BN(null);\n out.words = new Array(this.length + num2.length);\n return this.mulTo(num2, out);\n };\n BN.prototype.mulf = function mulf(num2) {\n var out = new BN(null);\n out.words = new Array(this.length + num2.length);\n return jumboMulTo(this, num2, out);\n };\n BN.prototype.imul = function imul(num2) {\n return this.clone().mulTo(num2, this);\n };\n BN.prototype.imuln = function imuln(num2) {\n var isNegNum = num2 < 0;\n if (isNegNum)\n num2 = -num2;\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n var carry = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var w3 = (this.words[i3] | 0) * num2;\n var lo = (w3 & 67108863) + (carry & 67108863);\n carry >>= 26;\n carry += w3 / 67108864 | 0;\n carry += lo >>> 26;\n this.words[i3] = lo & 67108863;\n }\n if (carry !== 0) {\n this.words[i3] = carry;\n this.length++;\n }\n this.length = num2 === 0 ? 1 : this.length;\n return isNegNum ? this.ineg() : this;\n };\n BN.prototype.muln = function muln(num2) {\n return this.clone().imuln(num2);\n };\n BN.prototype.sqr = function sqr() {\n return this.mul(this);\n };\n BN.prototype.isqr = function isqr() {\n return this.imul(this.clone());\n };\n BN.prototype.pow = function pow3(num2) {\n var w3 = toBitArray(num2);\n if (w3.length === 0)\n return new BN(1);\n var res = this;\n for (var i3 = 0; i3 < w3.length; i3++, res = res.sqr()) {\n if (w3[i3] !== 0)\n break;\n }\n if (++i3 < w3.length) {\n for (var q3 = res.sqr(); i3 < w3.length; i3++, q3 = q3.sqr()) {\n if (w3[i3] === 0)\n continue;\n res = res.mul(q3);\n }\n }\n return res;\n };\n BN.prototype.iushln = function iushln(bits) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n var carryMask = 67108863 >>> 26 - r2 << 26 - r2;\n var i3;\n if (r2 !== 0) {\n var carry = 0;\n for (i3 = 0; i3 < this.length; i3++) {\n var newCarry = this.words[i3] & carryMask;\n var c4 = (this.words[i3] | 0) - newCarry << r2;\n this.words[i3] = c4 | carry;\n carry = newCarry >>> 26 - r2;\n }\n if (carry) {\n this.words[i3] = carry;\n this.length++;\n }\n }\n if (s4 !== 0) {\n for (i3 = this.length - 1; i3 >= 0; i3--) {\n this.words[i3 + s4] = this.words[i3];\n }\n for (i3 = 0; i3 < s4; i3++) {\n this.words[i3] = 0;\n }\n this.length += s4;\n }\n return this._strip();\n };\n BN.prototype.ishln = function ishln(bits) {\n assert9(this.negative === 0);\n return this.iushln(bits);\n };\n BN.prototype.iushrn = function iushrn(bits, hint, extended) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var h4;\n if (hint) {\n h4 = (hint - hint % 26) / 26;\n } else {\n h4 = 0;\n }\n var r2 = bits % 26;\n var s4 = Math.min((bits - r2) / 26, this.length);\n var mask = 67108863 ^ 67108863 >>> r2 << r2;\n var maskedWords = extended;\n h4 -= s4;\n h4 = Math.max(0, h4);\n if (maskedWords) {\n for (var i3 = 0; i3 < s4; i3++) {\n maskedWords.words[i3] = this.words[i3];\n }\n maskedWords.length = s4;\n }\n if (s4 === 0) {\n } else if (this.length > s4) {\n this.length -= s4;\n for (i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = this.words[i3 + s4];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n var carry = 0;\n for (i3 = this.length - 1; i3 >= 0 && (carry !== 0 || i3 >= h4); i3--) {\n var word = this.words[i3] | 0;\n this.words[i3] = carry << 26 - r2 | word >>> r2;\n carry = word & mask;\n }\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n return this._strip();\n };\n BN.prototype.ishrn = function ishrn(bits, hint, extended) {\n assert9(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n BN.prototype.shln = function shln(bits) {\n return this.clone().ishln(bits);\n };\n BN.prototype.ushln = function ushln(bits) {\n return this.clone().iushln(bits);\n };\n BN.prototype.shrn = function shrn(bits) {\n return this.clone().ishrn(bits);\n };\n BN.prototype.ushrn = function ushrn(bits) {\n return this.clone().iushrn(bits);\n };\n BN.prototype.testn = function testn(bit) {\n assert9(typeof bit === \"number\" && bit >= 0);\n var r2 = bit % 26;\n var s4 = (bit - r2) / 26;\n var q3 = 1 << r2;\n if (this.length <= s4)\n return false;\n var w3 = this.words[s4];\n return !!(w3 & q3);\n };\n BN.prototype.imaskn = function imaskn(bits) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n assert9(this.negative === 0, \"imaskn works only with positive numbers\");\n if (this.length <= s4) {\n return this;\n }\n if (r2 !== 0) {\n s4++;\n }\n this.length = Math.min(s4, this.length);\n if (r2 !== 0) {\n var mask = 67108863 ^ 67108863 >>> r2 << r2;\n this.words[this.length - 1] &= mask;\n }\n return this._strip();\n };\n BN.prototype.maskn = function maskn(bits) {\n return this.clone().imaskn(bits);\n };\n BN.prototype.iaddn = function iaddn(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n if (num2 < 0)\n return this.isubn(-num2);\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num2) {\n this.words[0] = num2 - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n this.negative = 0;\n this.isubn(num2);\n this.negative = 1;\n return this;\n }\n return this._iaddn(num2);\n };\n BN.prototype._iaddn = function _iaddn(num2) {\n this.words[0] += num2;\n for (var i3 = 0; i3 < this.length && this.words[i3] >= 67108864; i3++) {\n this.words[i3] -= 67108864;\n if (i3 === this.length - 1) {\n this.words[i3 + 1] = 1;\n } else {\n this.words[i3 + 1]++;\n }\n }\n this.length = Math.max(this.length, i3 + 1);\n return this;\n };\n BN.prototype.isubn = function isubn(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n if (num2 < 0)\n return this.iaddn(-num2);\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num2);\n this.negative = 1;\n return this;\n }\n this.words[0] -= num2;\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n for (var i3 = 0; i3 < this.length && this.words[i3] < 0; i3++) {\n this.words[i3] += 67108864;\n this.words[i3 + 1] -= 1;\n }\n }\n return this._strip();\n };\n BN.prototype.addn = function addn(num2) {\n return this.clone().iaddn(num2);\n };\n BN.prototype.subn = function subn(num2) {\n return this.clone().isubn(num2);\n };\n BN.prototype.iabs = function iabs() {\n this.negative = 0;\n return this;\n };\n BN.prototype.abs = function abs() {\n return this.clone().iabs();\n };\n BN.prototype._ishlnsubmul = function _ishlnsubmul(num2, mul, shift) {\n var len = num2.length + shift;\n var i3;\n this._expand(len);\n var w3;\n var carry = 0;\n for (i3 = 0; i3 < num2.length; i3++) {\n w3 = (this.words[i3 + shift] | 0) + carry;\n var right = (num2.words[i3] | 0) * mul;\n w3 -= right & 67108863;\n carry = (w3 >> 26) - (right / 67108864 | 0);\n this.words[i3 + shift] = w3 & 67108863;\n }\n for (; i3 < this.length - shift; i3++) {\n w3 = (this.words[i3 + shift] | 0) + carry;\n carry = w3 >> 26;\n this.words[i3 + shift] = w3 & 67108863;\n }\n if (carry === 0)\n return this._strip();\n assert9(carry === -1);\n carry = 0;\n for (i3 = 0; i3 < this.length; i3++) {\n w3 = -(this.words[i3] | 0) + carry;\n carry = w3 >> 26;\n this.words[i3] = w3 & 67108863;\n }\n this.negative = 1;\n return this._strip();\n };\n BN.prototype._wordDiv = function _wordDiv(num2, mode) {\n var shift = this.length - num2.length;\n var a3 = this.clone();\n var b4 = num2;\n var bhi = b4.words[b4.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b4 = b4.ushln(shift);\n a3.iushln(shift);\n bhi = b4.words[b4.length - 1] | 0;\n }\n var m2 = a3.length - b4.length;\n var q3;\n if (mode !== \"mod\") {\n q3 = new BN(null);\n q3.length = m2 + 1;\n q3.words = new Array(q3.length);\n for (var i3 = 0; i3 < q3.length; i3++) {\n q3.words[i3] = 0;\n }\n }\n var diff = a3.clone()._ishlnsubmul(b4, 1, m2);\n if (diff.negative === 0) {\n a3 = diff;\n if (q3) {\n q3.words[m2] = 1;\n }\n }\n for (var j2 = m2 - 1; j2 >= 0; j2--) {\n var qj = (a3.words[b4.length + j2] | 0) * 67108864 + (a3.words[b4.length + j2 - 1] | 0);\n qj = Math.min(qj / bhi | 0, 67108863);\n a3._ishlnsubmul(b4, qj, j2);\n while (a3.negative !== 0) {\n qj--;\n a3.negative = 0;\n a3._ishlnsubmul(b4, 1, j2);\n if (!a3.isZero()) {\n a3.negative ^= 1;\n }\n }\n if (q3) {\n q3.words[j2] = qj;\n }\n }\n if (q3) {\n q3._strip();\n }\n a3._strip();\n if (mode !== \"div\" && shift !== 0) {\n a3.iushrn(shift);\n }\n return {\n div: q3 || null,\n mod: a3\n };\n };\n BN.prototype.divmod = function divmod(num2, mode, positive) {\n assert9(!num2.isZero());\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n var div, mod3, res;\n if (this.negative !== 0 && num2.negative === 0) {\n res = this.neg().divmod(num2, mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n if (mode !== \"div\") {\n mod3 = res.mod.neg();\n if (positive && mod3.negative !== 0) {\n mod3.iadd(num2);\n }\n }\n return {\n div,\n mod: mod3\n };\n }\n if (this.negative === 0 && num2.negative !== 0) {\n res = this.divmod(num2.neg(), mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n return {\n div,\n mod: res.mod\n };\n }\n if ((this.negative & num2.negative) !== 0) {\n res = this.neg().divmod(num2.neg(), mode);\n if (mode !== \"div\") {\n mod3 = res.mod.neg();\n if (positive && mod3.negative !== 0) {\n mod3.isub(num2);\n }\n }\n return {\n div: res.div,\n mod: mod3\n };\n }\n if (num2.length > this.length || this.cmp(num2) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n if (num2.length === 1) {\n if (mode === \"div\") {\n return {\n div: this.divn(num2.words[0]),\n mod: null\n };\n }\n if (mode === \"mod\") {\n return {\n div: null,\n mod: new BN(this.modrn(num2.words[0]))\n };\n }\n return {\n div: this.divn(num2.words[0]),\n mod: new BN(this.modrn(num2.words[0]))\n };\n }\n return this._wordDiv(num2, mode);\n };\n BN.prototype.div = function div(num2) {\n return this.divmod(num2, \"div\", false).div;\n };\n BN.prototype.mod = function mod3(num2) {\n return this.divmod(num2, \"mod\", false).mod;\n };\n BN.prototype.umod = function umod(num2) {\n return this.divmod(num2, \"mod\", true).mod;\n };\n BN.prototype.divRound = function divRound(num2) {\n var dm = this.divmod(num2);\n if (dm.mod.isZero())\n return dm.div;\n var mod3 = dm.div.negative !== 0 ? dm.mod.isub(num2) : dm.mod;\n var half = num2.ushrn(1);\n var r2 = num2.andln(1);\n var cmp = mod3.cmp(half);\n if (cmp < 0 || r2 === 1 && cmp === 0)\n return dm.div;\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n BN.prototype.modrn = function modrn(num2) {\n var isNegNum = num2 < 0;\n if (isNegNum)\n num2 = -num2;\n assert9(num2 <= 67108863);\n var p4 = (1 << 26) % num2;\n var acc = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n acc = (p4 * acc + (this.words[i3] | 0)) % num2;\n }\n return isNegNum ? -acc : acc;\n };\n BN.prototype.modn = function modn(num2) {\n return this.modrn(num2);\n };\n BN.prototype.idivn = function idivn(num2) {\n var isNegNum = num2 < 0;\n if (isNegNum)\n num2 = -num2;\n assert9(num2 <= 67108863);\n var carry = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n var w3 = (this.words[i3] | 0) + carry * 67108864;\n this.words[i3] = w3 / num2 | 0;\n carry = w3 % num2;\n }\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n BN.prototype.divn = function divn(num2) {\n return this.clone().idivn(num2);\n };\n BN.prototype.egcd = function egcd(p4) {\n assert9(p4.negative === 0);\n assert9(!p4.isZero());\n var x4 = this;\n var y6 = p4.clone();\n if (x4.negative !== 0) {\n x4 = x4.umod(p4);\n } else {\n x4 = x4.clone();\n }\n var A4 = new BN(1);\n var B2 = new BN(0);\n var C = new BN(0);\n var D2 = new BN(1);\n var g4 = 0;\n while (x4.isEven() && y6.isEven()) {\n x4.iushrn(1);\n y6.iushrn(1);\n ++g4;\n }\n var yp = y6.clone();\n var xp = x4.clone();\n while (!x4.isZero()) {\n for (var i3 = 0, im = 1; (x4.words[0] & im) === 0 && i3 < 26; ++i3, im <<= 1)\n ;\n if (i3 > 0) {\n x4.iushrn(i3);\n while (i3-- > 0) {\n if (A4.isOdd() || B2.isOdd()) {\n A4.iadd(yp);\n B2.isub(xp);\n }\n A4.iushrn(1);\n B2.iushrn(1);\n }\n }\n for (var j2 = 0, jm = 1; (y6.words[0] & jm) === 0 && j2 < 26; ++j2, jm <<= 1)\n ;\n if (j2 > 0) {\n y6.iushrn(j2);\n while (j2-- > 0) {\n if (C.isOdd() || D2.isOdd()) {\n C.iadd(yp);\n D2.isub(xp);\n }\n C.iushrn(1);\n D2.iushrn(1);\n }\n }\n if (x4.cmp(y6) >= 0) {\n x4.isub(y6);\n A4.isub(C);\n B2.isub(D2);\n } else {\n y6.isub(x4);\n C.isub(A4);\n D2.isub(B2);\n }\n }\n return {\n a: C,\n b: D2,\n gcd: y6.iushln(g4)\n };\n };\n BN.prototype._invmp = function _invmp(p4) {\n assert9(p4.negative === 0);\n assert9(!p4.isZero());\n var a3 = this;\n var b4 = p4.clone();\n if (a3.negative !== 0) {\n a3 = a3.umod(p4);\n } else {\n a3 = a3.clone();\n }\n var x1 = new BN(1);\n var x22 = new BN(0);\n var delta = b4.clone();\n while (a3.cmpn(1) > 0 && b4.cmpn(1) > 0) {\n for (var i3 = 0, im = 1; (a3.words[0] & im) === 0 && i3 < 26; ++i3, im <<= 1)\n ;\n if (i3 > 0) {\n a3.iushrn(i3);\n while (i3-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n x1.iushrn(1);\n }\n }\n for (var j2 = 0, jm = 1; (b4.words[0] & jm) === 0 && j2 < 26; ++j2, jm <<= 1)\n ;\n if (j2 > 0) {\n b4.iushrn(j2);\n while (j2-- > 0) {\n if (x22.isOdd()) {\n x22.iadd(delta);\n }\n x22.iushrn(1);\n }\n }\n if (a3.cmp(b4) >= 0) {\n a3.isub(b4);\n x1.isub(x22);\n } else {\n b4.isub(a3);\n x22.isub(x1);\n }\n }\n var res;\n if (a3.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x22;\n }\n if (res.cmpn(0) < 0) {\n res.iadd(p4);\n }\n return res;\n };\n BN.prototype.gcd = function gcd(num2) {\n if (this.isZero())\n return num2.abs();\n if (num2.isZero())\n return this.abs();\n var a3 = this.clone();\n var b4 = num2.clone();\n a3.negative = 0;\n b4.negative = 0;\n for (var shift = 0; a3.isEven() && b4.isEven(); shift++) {\n a3.iushrn(1);\n b4.iushrn(1);\n }\n do {\n while (a3.isEven()) {\n a3.iushrn(1);\n }\n while (b4.isEven()) {\n b4.iushrn(1);\n }\n var r2 = a3.cmp(b4);\n if (r2 < 0) {\n var t3 = a3;\n a3 = b4;\n b4 = t3;\n } else if (r2 === 0 || b4.cmpn(1) === 0) {\n break;\n }\n a3.isub(b4);\n } while (true);\n return b4.iushln(shift);\n };\n BN.prototype.invm = function invm(num2) {\n return this.egcd(num2).a.umod(num2);\n };\n BN.prototype.isEven = function isEven() {\n return (this.words[0] & 1) === 0;\n };\n BN.prototype.isOdd = function isOdd() {\n return (this.words[0] & 1) === 1;\n };\n BN.prototype.andln = function andln(num2) {\n return this.words[0] & num2;\n };\n BN.prototype.bincn = function bincn(bit) {\n assert9(typeof bit === \"number\");\n var r2 = bit % 26;\n var s4 = (bit - r2) / 26;\n var q3 = 1 << r2;\n if (this.length <= s4) {\n this._expand(s4 + 1);\n this.words[s4] |= q3;\n return this;\n }\n var carry = q3;\n for (var i3 = s4; carry !== 0 && i3 < this.length; i3++) {\n var w3 = this.words[i3] | 0;\n w3 += carry;\n carry = w3 >>> 26;\n w3 &= 67108863;\n this.words[i3] = w3;\n }\n if (carry !== 0) {\n this.words[i3] = carry;\n this.length++;\n }\n return this;\n };\n BN.prototype.isZero = function isZero() {\n return this.length === 1 && this.words[0] === 0;\n };\n BN.prototype.cmpn = function cmpn(num2) {\n var negative = num2 < 0;\n if (this.negative !== 0 && !negative)\n return -1;\n if (this.negative === 0 && negative)\n return 1;\n this._strip();\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num2 = -num2;\n }\n assert9(num2 <= 67108863, \"Number is too big\");\n var w3 = this.words[0] | 0;\n res = w3 === num2 ? 0 : w3 < num2 ? -1 : 1;\n }\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN.prototype.cmp = function cmp(num2) {\n if (this.negative !== 0 && num2.negative === 0)\n return -1;\n if (this.negative === 0 && num2.negative !== 0)\n return 1;\n var res = this.ucmp(num2);\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN.prototype.ucmp = function ucmp(num2) {\n if (this.length > num2.length)\n return 1;\n if (this.length < num2.length)\n return -1;\n var res = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n var a3 = this.words[i3] | 0;\n var b4 = num2.words[i3] | 0;\n if (a3 === b4)\n continue;\n if (a3 < b4) {\n res = -1;\n } else if (a3 > b4) {\n res = 1;\n }\n break;\n }\n return res;\n };\n BN.prototype.gtn = function gtn(num2) {\n return this.cmpn(num2) === 1;\n };\n BN.prototype.gt = function gt(num2) {\n return this.cmp(num2) === 1;\n };\n BN.prototype.gten = function gten(num2) {\n return this.cmpn(num2) >= 0;\n };\n BN.prototype.gte = function gte(num2) {\n return this.cmp(num2) >= 0;\n };\n BN.prototype.ltn = function ltn(num2) {\n return this.cmpn(num2) === -1;\n };\n BN.prototype.lt = function lt(num2) {\n return this.cmp(num2) === -1;\n };\n BN.prototype.lten = function lten(num2) {\n return this.cmpn(num2) <= 0;\n };\n BN.prototype.lte = function lte(num2) {\n return this.cmp(num2) <= 0;\n };\n BN.prototype.eqn = function eqn(num2) {\n return this.cmpn(num2) === 0;\n };\n BN.prototype.eq = function eq(num2) {\n return this.cmp(num2) === 0;\n };\n BN.red = function red(num2) {\n return new Red(num2);\n };\n BN.prototype.toRed = function toRed(ctx) {\n assert9(!this.red, \"Already a number in reduction context\");\n assert9(this.negative === 0, \"red works only with positives\");\n return ctx.convertTo(this)._forceRed(ctx);\n };\n BN.prototype.fromRed = function fromRed() {\n assert9(this.red, \"fromRed works only with numbers in reduction context\");\n return this.red.convertFrom(this);\n };\n BN.prototype._forceRed = function _forceRed(ctx) {\n this.red = ctx;\n return this;\n };\n BN.prototype.forceRed = function forceRed(ctx) {\n assert9(!this.red, \"Already a number in reduction context\");\n return this._forceRed(ctx);\n };\n BN.prototype.redAdd = function redAdd(num2) {\n assert9(this.red, \"redAdd works only with red numbers\");\n return this.red.add(this, num2);\n };\n BN.prototype.redIAdd = function redIAdd(num2) {\n assert9(this.red, \"redIAdd works only with red numbers\");\n return this.red.iadd(this, num2);\n };\n BN.prototype.redSub = function redSub(num2) {\n assert9(this.red, \"redSub works only with red numbers\");\n return this.red.sub(this, num2);\n };\n BN.prototype.redISub = function redISub(num2) {\n assert9(this.red, \"redISub works only with red numbers\");\n return this.red.isub(this, num2);\n };\n BN.prototype.redShl = function redShl(num2) {\n assert9(this.red, \"redShl works only with red numbers\");\n return this.red.shl(this, num2);\n };\n BN.prototype.redMul = function redMul(num2) {\n assert9(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num2);\n return this.red.mul(this, num2);\n };\n BN.prototype.redIMul = function redIMul(num2) {\n assert9(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num2);\n return this.red.imul(this, num2);\n };\n BN.prototype.redSqr = function redSqr() {\n assert9(this.red, \"redSqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n BN.prototype.redISqr = function redISqr() {\n assert9(this.red, \"redISqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n BN.prototype.redSqrt = function redSqrt() {\n assert9(this.red, \"redSqrt works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n BN.prototype.redInvm = function redInvm() {\n assert9(this.red, \"redInvm works only with red numbers\");\n this.red._verify1(this);\n return this.red.invm(this);\n };\n BN.prototype.redNeg = function redNeg() {\n assert9(this.red, \"redNeg works only with red numbers\");\n this.red._verify1(this);\n return this.red.neg(this);\n };\n BN.prototype.redPow = function redPow(num2) {\n assert9(this.red && !num2.red, \"redPow(normalNum)\");\n this.red._verify1(this);\n return this.red.pow(this, num2);\n };\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n function MPrime(name, p4) {\n this.name = name;\n this.p = new BN(p4, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n this.tmp = this._tmp();\n }\n MPrime.prototype._tmp = function _tmp() {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n MPrime.prototype.ireduce = function ireduce(num2) {\n var r2 = num2;\n var rlen;\n do {\n this.split(r2, this.tmp);\n r2 = this.imulK(r2);\n r2 = r2.iadd(this.tmp);\n rlen = r2.bitLength();\n } while (rlen > this.n);\n var cmp = rlen < this.n ? -1 : r2.ucmp(this.p);\n if (cmp === 0) {\n r2.words[0] = 0;\n r2.length = 1;\n } else if (cmp > 0) {\n r2.isub(this.p);\n } else {\n if (r2.strip !== void 0) {\n r2.strip();\n } else {\n r2._strip();\n }\n }\n return r2;\n };\n MPrime.prototype.split = function split3(input, out) {\n input.iushrn(this.n, 0, out);\n };\n MPrime.prototype.imulK = function imulK(num2) {\n return num2.imul(this.k);\n };\n function K256() {\n MPrime.call(\n this,\n \"k256\",\n \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\"\n );\n }\n inherits(K256, MPrime);\n K256.prototype.split = function split3(input, output) {\n var mask = 4194303;\n var outLen = Math.min(input.length, 9);\n for (var i3 = 0; i3 < outLen; i3++) {\n output.words[i3] = input.words[i3];\n }\n output.length = outLen;\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n for (i3 = 10; i3 < input.length; i3++) {\n var next = input.words[i3] | 0;\n input.words[i3 - 10] = (next & mask) << 4 | prev >>> 22;\n prev = next;\n }\n prev >>>= 22;\n input.words[i3 - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n K256.prototype.imulK = function imulK(num2) {\n num2.words[num2.length] = 0;\n num2.words[num2.length + 1] = 0;\n num2.length += 2;\n var lo = 0;\n for (var i3 = 0; i3 < num2.length; i3++) {\n var w3 = num2.words[i3] | 0;\n lo += w3 * 977;\n num2.words[i3] = lo & 67108863;\n lo = w3 * 64 + (lo / 67108864 | 0);\n }\n if (num2.words[num2.length - 1] === 0) {\n num2.length--;\n if (num2.words[num2.length - 1] === 0) {\n num2.length--;\n }\n }\n return num2;\n };\n function P224() {\n MPrime.call(\n this,\n \"p224\",\n \"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\"\n );\n }\n inherits(P224, MPrime);\n function P192() {\n MPrime.call(\n this,\n \"p192\",\n \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\"\n );\n }\n inherits(P192, MPrime);\n function P25519() {\n MPrime.call(\n this,\n \"25519\",\n \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\"\n );\n }\n inherits(P25519, MPrime);\n P25519.prototype.imulK = function imulK(num2) {\n var carry = 0;\n for (var i3 = 0; i3 < num2.length; i3++) {\n var hi = (num2.words[i3] | 0) * 19 + carry;\n var lo = hi & 67108863;\n hi >>>= 26;\n num2.words[i3] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num2.words[num2.length++] = carry;\n }\n return num2;\n };\n BN._prime = function prime(name) {\n if (primes[name])\n return primes[name];\n var prime2;\n if (name === \"k256\") {\n prime2 = new K256();\n } else if (name === \"p224\") {\n prime2 = new P224();\n } else if (name === \"p192\") {\n prime2 = new P192();\n } else if (name === \"p25519\") {\n prime2 = new P25519();\n } else {\n throw new Error(\"Unknown prime \" + name);\n }\n primes[name] = prime2;\n return prime2;\n };\n function Red(m2) {\n if (typeof m2 === \"string\") {\n var prime = BN._prime(m2);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert9(m2.gtn(1), \"modulus must be greater than 1\");\n this.m = m2;\n this.prime = null;\n }\n }\n Red.prototype._verify1 = function _verify1(a3) {\n assert9(a3.negative === 0, \"red works only with positives\");\n assert9(a3.red, \"red works only with red numbers\");\n };\n Red.prototype._verify2 = function _verify2(a3, b4) {\n assert9((a3.negative | b4.negative) === 0, \"red works only with positives\");\n assert9(\n a3.red && a3.red === b4.red,\n \"red works only with red numbers\"\n );\n };\n Red.prototype.imod = function imod(a3) {\n if (this.prime)\n return this.prime.ireduce(a3)._forceRed(this);\n move(a3, a3.umod(this.m)._forceRed(this));\n return a3;\n };\n Red.prototype.neg = function neg(a3) {\n if (a3.isZero()) {\n return a3.clone();\n }\n return this.m.sub(a3)._forceRed(this);\n };\n Red.prototype.add = function add2(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.add(b4);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.iadd = function iadd(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.iadd(b4);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n Red.prototype.sub = function sub(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.sub(b4);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.isub = function isub(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.isub(b4);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n Red.prototype.shl = function shl(a3, num2) {\n this._verify1(a3);\n return this.imod(a3.ushln(num2));\n };\n Red.prototype.imul = function imul(a3, b4) {\n this._verify2(a3, b4);\n return this.imod(a3.imul(b4));\n };\n Red.prototype.mul = function mul(a3, b4) {\n this._verify2(a3, b4);\n return this.imod(a3.mul(b4));\n };\n Red.prototype.isqr = function isqr(a3) {\n return this.imul(a3, a3.clone());\n };\n Red.prototype.sqr = function sqr(a3) {\n return this.mul(a3, a3);\n };\n Red.prototype.sqrt = function sqrt(a3) {\n if (a3.isZero())\n return a3.clone();\n var mod3 = this.m.andln(3);\n assert9(mod3 % 2 === 1);\n if (mod3 === 3) {\n var pow3 = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a3, pow3);\n }\n var q3 = this.m.subn(1);\n var s4 = 0;\n while (!q3.isZero() && q3.andln(1) === 0) {\n s4++;\n q3.iushrn(1);\n }\n assert9(!q3.isZero());\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n var lpow = this.m.subn(1).iushrn(1);\n var z2 = this.m.bitLength();\n z2 = new BN(2 * z2 * z2).toRed(this);\n while (this.pow(z2, lpow).cmp(nOne) !== 0) {\n z2.redIAdd(nOne);\n }\n var c4 = this.pow(z2, q3);\n var r2 = this.pow(a3, q3.addn(1).iushrn(1));\n var t3 = this.pow(a3, q3);\n var m2 = s4;\n while (t3.cmp(one) !== 0) {\n var tmp = t3;\n for (var i3 = 0; tmp.cmp(one) !== 0; i3++) {\n tmp = tmp.redSqr();\n }\n assert9(i3 < m2);\n var b4 = this.pow(c4, new BN(1).iushln(m2 - i3 - 1));\n r2 = r2.redMul(b4);\n c4 = b4.redSqr();\n t3 = t3.redMul(c4);\n m2 = i3;\n }\n return r2;\n };\n Red.prototype.invm = function invm(a3) {\n var inv = a3._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n Red.prototype.pow = function pow3(a3, num2) {\n if (num2.isZero())\n return new BN(1).toRed(this);\n if (num2.cmpn(1) === 0)\n return a3.clone();\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a3;\n for (var i3 = 2; i3 < wnd.length; i3++) {\n wnd[i3] = this.mul(wnd[i3 - 1], a3);\n }\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num2.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n for (i3 = num2.length - 1; i3 >= 0; i3--) {\n var word = num2.words[i3];\n for (var j2 = start - 1; j2 >= 0; j2--) {\n var bit = word >> j2 & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i3 !== 0 || j2 !== 0))\n continue;\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n return res;\n };\n Red.prototype.convertTo = function convertTo(num2) {\n var r2 = num2.umod(this.m);\n return r2 === num2 ? r2.clone() : r2;\n };\n Red.prototype.convertFrom = function convertFrom(num2) {\n var res = num2.clone();\n res.red = null;\n return res;\n };\n BN.mont = function mont(num2) {\n return new Mont(num2);\n };\n function Mont(m2) {\n Red.call(this, m2);\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - this.shift % 26;\n }\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n Mont.prototype.convertTo = function convertTo(num2) {\n return this.imod(num2.ushln(this.shift));\n };\n Mont.prototype.convertFrom = function convertFrom(num2) {\n var r2 = this.imod(num2.mul(this.rinv));\n r2.red = null;\n return r2;\n };\n Mont.prototype.imul = function imul(a3, b4) {\n if (a3.isZero() || b4.isZero()) {\n a3.words[0] = 0;\n a3.length = 1;\n return a3;\n }\n var t3 = a3.imul(b4);\n var c4 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u2 = t3.isub(c4).iushrn(this.shift);\n var res = u2;\n if (u2.cmp(this.m) >= 0) {\n res = u2.isub(this.m);\n } else if (u2.cmpn(0) < 0) {\n res = u2.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.mul = function mul(a3, b4) {\n if (a3.isZero() || b4.isZero())\n return new BN(0)._forceRed(this);\n var t3 = a3.mul(b4);\n var c4 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u2 = t3.isub(c4).iushrn(this.shift);\n var res = u2;\n if (u2.cmp(this.m) >= 0) {\n res = u2.isub(this.m);\n } else if (u2.cmpn(0) < 0) {\n res = u2.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.invm = function invm(a3) {\n var res = this.imod(a3._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n })(typeof module === \"undefined\" || module, exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib/_version.js\n var require_version = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"logger/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib/index.js\n var require_lib = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Logger = exports3.ErrorCode = exports3.LogLevel = void 0;\n var _permanentCensorErrors = false;\n var _censorErrors = false;\n var LogLevels = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\n var _logLevel = LogLevels[\"default\"];\n var _version_1 = require_version();\n var _globalLogger = null;\n function _checkNormalize() {\n try {\n var missing_1 = [];\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach(function(form) {\n try {\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad normalize\");\n }\n ;\n } catch (error) {\n missing_1.push(form);\n }\n });\n if (missing_1.length) {\n throw new Error(\"missing \" + missing_1.join(\", \"));\n }\n if (String.fromCharCode(233).normalize(\"NFD\") !== String.fromCharCode(101, 769)) {\n throw new Error(\"broken implementation\");\n }\n } catch (error) {\n return error.message;\n }\n return null;\n }\n var _normalizeError = _checkNormalize();\n var LogLevel2;\n (function(LogLevel3) {\n LogLevel3[\"DEBUG\"] = \"DEBUG\";\n LogLevel3[\"INFO\"] = \"INFO\";\n LogLevel3[\"WARNING\"] = \"WARNING\";\n LogLevel3[\"ERROR\"] = \"ERROR\";\n LogLevel3[\"OFF\"] = \"OFF\";\n })(LogLevel2 = exports3.LogLevel || (exports3.LogLevel = {}));\n var ErrorCode;\n (function(ErrorCode2) {\n ErrorCode2[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n ErrorCode2[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n ErrorCode2[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\n ErrorCode2[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n ErrorCode2[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n ErrorCode2[\"TIMEOUT\"] = \"TIMEOUT\";\n ErrorCode2[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n ErrorCode2[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ErrorCode2[\"MISSING_NEW\"] = \"MISSING_NEW\";\n ErrorCode2[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n ErrorCode2[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n ErrorCode2[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ErrorCode2[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n ErrorCode2[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n ErrorCode2[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n ErrorCode2[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n ErrorCode2[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\n ErrorCode2[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ErrorCode2[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n })(ErrorCode = exports3.ErrorCode || (exports3.ErrorCode = {}));\n var HEX = \"0123456789abcdef\";\n var Logger2 = (\n /** @class */\n function() {\n function Logger3(version7) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version7,\n writable: false\n });\n }\n Logger3.prototype._log = function(logLevel, args) {\n var level = logLevel.toLowerCase();\n if (LogLevels[level] == null) {\n this.throwArgumentError(\"invalid log level name\", \"logLevel\", logLevel);\n }\n if (_logLevel > LogLevels[level]) {\n return;\n }\n console.log.apply(console, args);\n };\n Logger3.prototype.debug = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this._log(Logger3.levels.DEBUG, args);\n };\n Logger3.prototype.info = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this._log(Logger3.levels.INFO, args);\n };\n Logger3.prototype.warn = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this._log(Logger3.levels.WARNING, args);\n };\n Logger3.prototype.makeError = function(message, code, params) {\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = Logger3.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n var messageDetails = [];\n Object.keys(params).forEach(function(key) {\n var value = params[key];\n try {\n if (value instanceof Uint8Array) {\n var hex = \"\";\n for (var i3 = 0; i3 < value.length; i3++) {\n hex += HEX[value[i3] >> 4];\n hex += HEX[value[i3] & 15];\n }\n messageDetails.push(key + \"=Uint8Array(0x\" + hex + \")\");\n } else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\n } catch (error2) {\n messageDetails.push(key + \"=\" + JSON.stringify(params[key].toString()));\n }\n });\n messageDetails.push(\"code=\" + code);\n messageDetails.push(\"version=\" + this.version);\n var reason = message;\n var url = \"\";\n switch (code) {\n case ErrorCode.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n var fault = message;\n switch (fault) {\n case \"overflow\":\n case \"underflow\":\n case \"division-by-zero\":\n url += \"-\" + fault;\n break;\n case \"negative-power\":\n case \"negative-width\":\n url += \"-unsupported\";\n break;\n case \"unbound-bitwise-result\":\n url += \"-unbound-result\";\n break;\n }\n break;\n }\n case ErrorCode.CALL_EXCEPTION:\n case ErrorCode.INSUFFICIENT_FUNDS:\n case ErrorCode.MISSING_NEW:\n case ErrorCode.NONCE_EXPIRED:\n case ErrorCode.REPLACEMENT_UNDERPRICED:\n case ErrorCode.TRANSACTION_REPLACED:\n case ErrorCode.UNPREDICTABLE_GAS_LIMIT:\n url = code;\n break;\n }\n if (url) {\n message += \" [ See: https://links.ethers.org/v5-errors-\" + url + \" ]\";\n }\n if (messageDetails.length) {\n message += \" (\" + messageDetails.join(\", \") + \")\";\n }\n var error = new Error(message);\n error.reason = reason;\n error.code = code;\n Object.keys(params).forEach(function(key) {\n error[key] = params[key];\n });\n return error;\n };\n Logger3.prototype.throwError = function(message, code, params) {\n throw this.makeError(message, code, params);\n };\n Logger3.prototype.throwArgumentError = function(message, name, value) {\n return this.throwError(message, Logger3.errors.INVALID_ARGUMENT, {\n argument: name,\n value\n });\n };\n Logger3.prototype.assert = function(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n };\n Logger3.prototype.assertArgument = function(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n };\n Logger3.prototype.checkNormalize = function(message) {\n if (message == null) {\n message = \"platform missing String.prototype.normalize\";\n }\n if (_normalizeError) {\n this.throwError(\"platform missing String.prototype.normalize\", Logger3.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\",\n form: _normalizeError\n });\n }\n };\n Logger3.prototype.checkSafeUint53 = function(value, message) {\n if (typeof value !== \"number\") {\n return;\n }\n if (message == null) {\n message = \"value not safe\";\n }\n if (value < 0 || value >= 9007199254740991) {\n this.throwError(message, Logger3.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value\n });\n }\n if (value % 1) {\n this.throwError(message, Logger3.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value\n });\n }\n };\n Logger3.prototype.checkArgumentCount = function(count, expectedCount, message) {\n if (message) {\n message = \": \" + message;\n } else {\n message = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, Logger3.errors.MISSING_ARGUMENT, {\n count,\n expectedCount\n });\n }\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message, Logger3.errors.UNEXPECTED_ARGUMENT, {\n count,\n expectedCount\n });\n }\n };\n Logger3.prototype.checkNew = function(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger3.errors.MISSING_NEW, { name: kind.name });\n }\n };\n Logger3.prototype.checkAbstract = function(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", Logger3.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: \"new\" });\n } else if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger3.errors.MISSING_NEW, { name: kind.name });\n }\n };\n Logger3.globalLogger = function() {\n if (!_globalLogger) {\n _globalLogger = new Logger3(_version_1.version);\n }\n return _globalLogger;\n };\n Logger3.setCensorship = function(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger3.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", Logger3.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n };\n Logger3.setLogLevel = function(logLevel) {\n var level = LogLevels[logLevel.toLowerCase()];\n if (level == null) {\n Logger3.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel = level;\n };\n Logger3.from = function(version7) {\n return new Logger3(version7);\n };\n Logger3.errors = ErrorCode;\n Logger3.levels = LogLevel2;\n return Logger3;\n }()\n );\n exports3.Logger = Logger2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib/_version.js\n var require_version2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"bytes/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib/index.js\n var require_lib2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.joinSignature = exports3.splitSignature = exports3.hexZeroPad = exports3.hexStripZeros = exports3.hexValue = exports3.hexConcat = exports3.hexDataSlice = exports3.hexDataLength = exports3.hexlify = exports3.isHexString = exports3.zeroPad = exports3.stripZeros = exports3.concat = exports3.arrayify = exports3.isBytes = exports3.isBytesLike = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version2();\n var logger = new logger_1.Logger(_version_1.version);\n function isHexable(value) {\n return !!value.toHexString;\n }\n function addSlice(array) {\n if (array.slice) {\n return array;\n }\n array.slice = function() {\n var args = Array.prototype.slice.call(arguments);\n return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args)));\n };\n return array;\n }\n function isBytesLike(value) {\n return isHexString(value) && !(value.length % 2) || isBytes7(value);\n }\n exports3.isBytesLike = isBytesLike;\n function isInteger(value) {\n return typeof value === \"number\" && value == value && value % 1 === 0;\n }\n function isBytes7(value) {\n if (value == null) {\n return false;\n }\n if (value.constructor === Uint8Array) {\n return true;\n }\n if (typeof value === \"string\") {\n return false;\n }\n if (!isInteger(value.length) || value.length < 0) {\n return false;\n }\n for (var i3 = 0; i3 < value.length; i3++) {\n var v2 = value[i3];\n if (!isInteger(v2) || v2 < 0 || v2 >= 256) {\n return false;\n }\n }\n return true;\n }\n exports3.isBytes = isBytes7;\n function arrayify(value, options) {\n if (!options) {\n options = {};\n }\n if (typeof value === \"number\") {\n logger.checkSafeUint53(value, \"invalid arrayify value\");\n var result = [];\n while (value) {\n result.unshift(value & 255);\n value = parseInt(String(value / 256));\n }\n if (result.length === 0) {\n result.push(0);\n }\n return addSlice(new Uint8Array(result));\n }\n if (options.allowMissingPrefix && typeof value === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if (isHexable(value)) {\n value = value.toHexString();\n }\n if (isHexString(value)) {\n var hex = value.substring(2);\n if (hex.length % 2) {\n if (options.hexPad === \"left\") {\n hex = \"0\" + hex;\n } else if (options.hexPad === \"right\") {\n hex += \"0\";\n } else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n var result = [];\n for (var i3 = 0; i3 < hex.length; i3 += 2) {\n result.push(parseInt(hex.substring(i3, i3 + 2), 16));\n }\n return addSlice(new Uint8Array(result));\n }\n if (isBytes7(value)) {\n return addSlice(new Uint8Array(value));\n }\n return logger.throwArgumentError(\"invalid arrayify value\", \"value\", value);\n }\n exports3.arrayify = arrayify;\n function concat5(items) {\n var objects = items.map(function(item) {\n return arrayify(item);\n });\n var length = objects.reduce(function(accum, item) {\n return accum + item.length;\n }, 0);\n var result = new Uint8Array(length);\n objects.reduce(function(offset, object) {\n result.set(object, offset);\n return offset + object.length;\n }, 0);\n return addSlice(result);\n }\n exports3.concat = concat5;\n function stripZeros(value) {\n var result = arrayify(value);\n if (result.length === 0) {\n return result;\n }\n var start = 0;\n while (start < result.length && result[start] === 0) {\n start++;\n }\n if (start) {\n result = result.slice(start);\n }\n return result;\n }\n exports3.stripZeros = stripZeros;\n function zeroPad(value, length) {\n value = arrayify(value);\n if (value.length > length) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[0]);\n }\n var result = new Uint8Array(length);\n result.set(value, length - value.length);\n return addSlice(result);\n }\n exports3.zeroPad = zeroPad;\n function isHexString(value, length) {\n if (typeof value !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false;\n }\n if (length && value.length !== 2 + 2 * length) {\n return false;\n }\n return true;\n }\n exports3.isHexString = isHexString;\n var HexCharacters = \"0123456789abcdef\";\n function hexlify(value, options) {\n if (!options) {\n options = {};\n }\n if (typeof value === \"number\") {\n logger.checkSafeUint53(value, \"invalid hexlify value\");\n var hex = \"\";\n while (value) {\n hex = HexCharacters[value & 15] + hex;\n value = Math.floor(value / 16);\n }\n if (hex.length) {\n if (hex.length % 2) {\n hex = \"0\" + hex;\n }\n return \"0x\" + hex;\n }\n return \"0x00\";\n }\n if (typeof value === \"bigint\") {\n value = value.toString(16);\n if (value.length % 2) {\n return \"0x0\" + value;\n }\n return \"0x\" + value;\n }\n if (options.allowMissingPrefix && typeof value === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if (isHexable(value)) {\n return value.toHexString();\n }\n if (isHexString(value)) {\n if (value.length % 2) {\n if (options.hexPad === \"left\") {\n value = \"0x0\" + value.substring(2);\n } else if (options.hexPad === \"right\") {\n value += \"0\";\n } else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n return value.toLowerCase();\n }\n if (isBytes7(value)) {\n var result = \"0x\";\n for (var i3 = 0; i3 < value.length; i3++) {\n var v2 = value[i3];\n result += HexCharacters[(v2 & 240) >> 4] + HexCharacters[v2 & 15];\n }\n return result;\n }\n return logger.throwArgumentError(\"invalid hexlify value\", \"value\", value);\n }\n exports3.hexlify = hexlify;\n function hexDataLength(data) {\n if (typeof data !== \"string\") {\n data = hexlify(data);\n } else if (!isHexString(data) || data.length % 2) {\n return null;\n }\n return (data.length - 2) / 2;\n }\n exports3.hexDataLength = hexDataLength;\n function hexDataSlice(data, offset, endOffset) {\n if (typeof data !== \"string\") {\n data = hexlify(data);\n } else if (!isHexString(data) || data.length % 2) {\n logger.throwArgumentError(\"invalid hexData\", \"value\", data);\n }\n offset = 2 + 2 * offset;\n if (endOffset != null) {\n return \"0x\" + data.substring(offset, 2 + 2 * endOffset);\n }\n return \"0x\" + data.substring(offset);\n }\n exports3.hexDataSlice = hexDataSlice;\n function hexConcat(items) {\n var result = \"0x\";\n items.forEach(function(item) {\n result += hexlify(item).substring(2);\n });\n return result;\n }\n exports3.hexConcat = hexConcat;\n function hexValue(value) {\n var trimmed = hexStripZeros(hexlify(value, { hexPad: \"left\" }));\n if (trimmed === \"0x\") {\n return \"0x0\";\n }\n return trimmed;\n }\n exports3.hexValue = hexValue;\n function hexStripZeros(value) {\n if (typeof value !== \"string\") {\n value = hexlify(value);\n }\n if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n value = value.substring(2);\n var offset = 0;\n while (offset < value.length && value[offset] === \"0\") {\n offset++;\n }\n return \"0x\" + value.substring(offset);\n }\n exports3.hexStripZeros = hexStripZeros;\n function hexZeroPad(value, length) {\n if (typeof value !== \"string\") {\n value = hexlify(value);\n } else if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n if (value.length > 2 * length + 2) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[1]);\n }\n while (value.length < 2 * length + 2) {\n value = \"0x0\" + value.substring(2);\n }\n return value;\n }\n exports3.hexZeroPad = hexZeroPad;\n function splitSignature(signature) {\n var result = {\n r: \"0x\",\n s: \"0x\",\n _vs: \"0x\",\n recoveryParam: 0,\n v: 0,\n yParityAndS: \"0x\",\n compact: \"0x\"\n };\n if (isBytesLike(signature)) {\n var bytes = arrayify(signature);\n if (bytes.length === 64) {\n result.v = 27 + (bytes[32] >> 7);\n bytes[32] &= 127;\n result.r = hexlify(bytes.slice(0, 32));\n result.s = hexlify(bytes.slice(32, 64));\n } else if (bytes.length === 65) {\n result.r = hexlify(bytes.slice(0, 32));\n result.s = hexlify(bytes.slice(32, 64));\n result.v = bytes[64];\n } else {\n logger.throwArgumentError(\"invalid signature string\", \"signature\", signature);\n }\n if (result.v < 27) {\n if (result.v === 0 || result.v === 1) {\n result.v += 27;\n } else {\n logger.throwArgumentError(\"signature invalid v byte\", \"signature\", signature);\n }\n }\n result.recoveryParam = 1 - result.v % 2;\n if (result.recoveryParam) {\n bytes[32] |= 128;\n }\n result._vs = hexlify(bytes.slice(32, 64));\n } else {\n result.r = signature.r;\n result.s = signature.s;\n result.v = signature.v;\n result.recoveryParam = signature.recoveryParam;\n result._vs = signature._vs;\n if (result._vs != null) {\n var vs_1 = zeroPad(arrayify(result._vs), 32);\n result._vs = hexlify(vs_1);\n var recoveryParam = vs_1[0] >= 128 ? 1 : 0;\n if (result.recoveryParam == null) {\n result.recoveryParam = recoveryParam;\n } else if (result.recoveryParam !== recoveryParam) {\n logger.throwArgumentError(\"signature recoveryParam mismatch _vs\", \"signature\", signature);\n }\n vs_1[0] &= 127;\n var s4 = hexlify(vs_1);\n if (result.s == null) {\n result.s = s4;\n } else if (result.s !== s4) {\n logger.throwArgumentError(\"signature v mismatch _vs\", \"signature\", signature);\n }\n }\n if (result.recoveryParam == null) {\n if (result.v == null) {\n logger.throwArgumentError(\"signature missing v and recoveryParam\", \"signature\", signature);\n } else if (result.v === 0 || result.v === 1) {\n result.recoveryParam = result.v;\n } else {\n result.recoveryParam = 1 - result.v % 2;\n }\n } else {\n if (result.v == null) {\n result.v = 27 + result.recoveryParam;\n } else {\n var recId = result.v === 0 || result.v === 1 ? result.v : 1 - result.v % 2;\n if (result.recoveryParam !== recId) {\n logger.throwArgumentError(\"signature recoveryParam mismatch v\", \"signature\", signature);\n }\n }\n }\n if (result.r == null || !isHexString(result.r)) {\n logger.throwArgumentError(\"signature missing or invalid r\", \"signature\", signature);\n } else {\n result.r = hexZeroPad(result.r, 32);\n }\n if (result.s == null || !isHexString(result.s)) {\n logger.throwArgumentError(\"signature missing or invalid s\", \"signature\", signature);\n } else {\n result.s = hexZeroPad(result.s, 32);\n }\n var vs = arrayify(result.s);\n if (vs[0] >= 128) {\n logger.throwArgumentError(\"signature s out of range\", \"signature\", signature);\n }\n if (result.recoveryParam) {\n vs[0] |= 128;\n }\n var _vs = hexlify(vs);\n if (result._vs) {\n if (!isHexString(result._vs)) {\n logger.throwArgumentError(\"signature invalid _vs\", \"signature\", signature);\n }\n result._vs = hexZeroPad(result._vs, 32);\n }\n if (result._vs == null) {\n result._vs = _vs;\n } else if (result._vs !== _vs) {\n logger.throwArgumentError(\"signature _vs mismatch v and s\", \"signature\", signature);\n }\n }\n result.yParityAndS = result._vs;\n result.compact = result.r + result.yParityAndS.substring(2);\n return result;\n }\n exports3.splitSignature = splitSignature;\n function joinSignature(signature) {\n signature = splitSignature(signature);\n return hexlify(concat5([\n signature.r,\n signature.s,\n signature.recoveryParam ? \"0x1c\" : \"0x1b\"\n ]));\n }\n exports3.joinSignature = joinSignature;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/_version.js\n var require_version3 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"bignumber/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/bignumber.js\n var require_bignumber = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/bignumber.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3._base16To36 = exports3._base36To16 = exports3.BigNumber = exports3.isBigNumberish = void 0;\n var bn_js_1 = __importDefault4(require_bn());\n var BN = bn_js_1.default.BN;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version3();\n var logger = new logger_1.Logger(_version_1.version);\n var _constructorGuard = {};\n var MAX_SAFE = 9007199254740991;\n function isBigNumberish2(value) {\n return value != null && (BigNumber.isBigNumber(value) || typeof value === \"number\" && value % 1 === 0 || typeof value === \"string\" && !!value.match(/^-?[0-9]+$/) || (0, bytes_1.isHexString)(value) || typeof value === \"bigint\" || (0, bytes_1.isBytes)(value));\n }\n exports3.isBigNumberish = isBigNumberish2;\n var _warnedToStringRadix = false;\n var BigNumber = (\n /** @class */\n function() {\n function BigNumber2(constructorGuard, hex) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot call constructor directly; use BigNumber.from\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new (BigNumber)\"\n });\n }\n this._hex = hex;\n this._isBigNumber = true;\n Object.freeze(this);\n }\n BigNumber2.prototype.fromTwos = function(value) {\n return toBigNumber(toBN(this).fromTwos(value));\n };\n BigNumber2.prototype.toTwos = function(value) {\n return toBigNumber(toBN(this).toTwos(value));\n };\n BigNumber2.prototype.abs = function() {\n if (this._hex[0] === \"-\") {\n return BigNumber2.from(this._hex.substring(1));\n }\n return this;\n };\n BigNumber2.prototype.add = function(other) {\n return toBigNumber(toBN(this).add(toBN(other)));\n };\n BigNumber2.prototype.sub = function(other) {\n return toBigNumber(toBN(this).sub(toBN(other)));\n };\n BigNumber2.prototype.div = function(other) {\n var o5 = BigNumber2.from(other);\n if (o5.isZero()) {\n throwFault(\"division-by-zero\", \"div\");\n }\n return toBigNumber(toBN(this).div(toBN(other)));\n };\n BigNumber2.prototype.mul = function(other) {\n return toBigNumber(toBN(this).mul(toBN(other)));\n };\n BigNumber2.prototype.mod = function(other) {\n var value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"division-by-zero\", \"mod\");\n }\n return toBigNumber(toBN(this).umod(value));\n };\n BigNumber2.prototype.pow = function(other) {\n var value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"negative-power\", \"pow\");\n }\n return toBigNumber(toBN(this).pow(value));\n };\n BigNumber2.prototype.and = function(other) {\n var value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"unbound-bitwise-result\", \"and\");\n }\n return toBigNumber(toBN(this).and(value));\n };\n BigNumber2.prototype.or = function(other) {\n var value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"unbound-bitwise-result\", \"or\");\n }\n return toBigNumber(toBN(this).or(value));\n };\n BigNumber2.prototype.xor = function(other) {\n var value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"unbound-bitwise-result\", \"xor\");\n }\n return toBigNumber(toBN(this).xor(value));\n };\n BigNumber2.prototype.mask = function(value) {\n if (this.isNegative() || value < 0) {\n throwFault(\"negative-width\", \"mask\");\n }\n return toBigNumber(toBN(this).maskn(value));\n };\n BigNumber2.prototype.shl = function(value) {\n if (this.isNegative() || value < 0) {\n throwFault(\"negative-width\", \"shl\");\n }\n return toBigNumber(toBN(this).shln(value));\n };\n BigNumber2.prototype.shr = function(value) {\n if (this.isNegative() || value < 0) {\n throwFault(\"negative-width\", \"shr\");\n }\n return toBigNumber(toBN(this).shrn(value));\n };\n BigNumber2.prototype.eq = function(other) {\n return toBN(this).eq(toBN(other));\n };\n BigNumber2.prototype.lt = function(other) {\n return toBN(this).lt(toBN(other));\n };\n BigNumber2.prototype.lte = function(other) {\n return toBN(this).lte(toBN(other));\n };\n BigNumber2.prototype.gt = function(other) {\n return toBN(this).gt(toBN(other));\n };\n BigNumber2.prototype.gte = function(other) {\n return toBN(this).gte(toBN(other));\n };\n BigNumber2.prototype.isNegative = function() {\n return this._hex[0] === \"-\";\n };\n BigNumber2.prototype.isZero = function() {\n return toBN(this).isZero();\n };\n BigNumber2.prototype.toNumber = function() {\n try {\n return toBN(this).toNumber();\n } catch (error) {\n throwFault(\"overflow\", \"toNumber\", this.toString());\n }\n return null;\n };\n BigNumber2.prototype.toBigInt = function() {\n try {\n return BigInt(this.toString());\n } catch (e2) {\n }\n return logger.throwError(\"this platform does not support BigInt\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n value: this.toString()\n });\n };\n BigNumber2.prototype.toString = function() {\n if (arguments.length > 0) {\n if (arguments[0] === 10) {\n if (!_warnedToStringRadix) {\n _warnedToStringRadix = true;\n logger.warn(\"BigNumber.toString does not accept any parameters; base-10 is assumed\");\n }\n } else if (arguments[0] === 16) {\n logger.throwError(\"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()\", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {});\n } else {\n logger.throwError(\"BigNumber.toString does not accept parameters\", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {});\n }\n }\n return toBN(this).toString(10);\n };\n BigNumber2.prototype.toHexString = function() {\n return this._hex;\n };\n BigNumber2.prototype.toJSON = function(key) {\n return { type: \"BigNumber\", hex: this.toHexString() };\n };\n BigNumber2.from = function(value) {\n if (value instanceof BigNumber2) {\n return value;\n }\n if (typeof value === \"string\") {\n if (value.match(/^-?0x[0-9a-f]+$/i)) {\n return new BigNumber2(_constructorGuard, toHex3(value));\n }\n if (value.match(/^-?[0-9]+$/)) {\n return new BigNumber2(_constructorGuard, toHex3(new BN(value)));\n }\n return logger.throwArgumentError(\"invalid BigNumber string\", \"value\", value);\n }\n if (typeof value === \"number\") {\n if (value % 1) {\n throwFault(\"underflow\", \"BigNumber.from\", value);\n }\n if (value >= MAX_SAFE || value <= -MAX_SAFE) {\n throwFault(\"overflow\", \"BigNumber.from\", value);\n }\n return BigNumber2.from(String(value));\n }\n var anyValue = value;\n if (typeof anyValue === \"bigint\") {\n return BigNumber2.from(anyValue.toString());\n }\n if ((0, bytes_1.isBytes)(anyValue)) {\n return BigNumber2.from((0, bytes_1.hexlify)(anyValue));\n }\n if (anyValue) {\n if (anyValue.toHexString) {\n var hex = anyValue.toHexString();\n if (typeof hex === \"string\") {\n return BigNumber2.from(hex);\n }\n } else {\n var hex = anyValue._hex;\n if (hex == null && anyValue.type === \"BigNumber\") {\n hex = anyValue.hex;\n }\n if (typeof hex === \"string\") {\n if ((0, bytes_1.isHexString)(hex) || hex[0] === \"-\" && (0, bytes_1.isHexString)(hex.substring(1))) {\n return BigNumber2.from(hex);\n }\n }\n }\n }\n return logger.throwArgumentError(\"invalid BigNumber value\", \"value\", value);\n };\n BigNumber2.isBigNumber = function(value) {\n return !!(value && value._isBigNumber);\n };\n return BigNumber2;\n }()\n );\n exports3.BigNumber = BigNumber;\n function toHex3(value) {\n if (typeof value !== \"string\") {\n return toHex3(value.toString(16));\n }\n if (value[0] === \"-\") {\n value = value.substring(1);\n if (value[0] === \"-\") {\n logger.throwArgumentError(\"invalid hex\", \"value\", value);\n }\n value = toHex3(value);\n if (value === \"0x00\") {\n return value;\n }\n return \"-\" + value;\n }\n if (value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if (value === \"0x\") {\n return \"0x00\";\n }\n if (value.length % 2) {\n value = \"0x0\" + value.substring(2);\n }\n while (value.length > 4 && value.substring(0, 4) === \"0x00\") {\n value = \"0x\" + value.substring(4);\n }\n return value;\n }\n function toBigNumber(value) {\n return BigNumber.from(toHex3(value));\n }\n function toBN(value) {\n var hex = BigNumber.from(value).toHexString();\n if (hex[0] === \"-\") {\n return new BN(\"-\" + hex.substring(3), 16);\n }\n return new BN(hex.substring(2), 16);\n }\n function throwFault(fault, operation, value) {\n var params = { fault, operation };\n if (value != null) {\n params.value = value;\n }\n return logger.throwError(fault, logger_1.Logger.errors.NUMERIC_FAULT, params);\n }\n function _base36To16(value) {\n return new BN(value, 36).toString(16);\n }\n exports3._base36To16 = _base36To16;\n function _base16To36(value) {\n return new BN(value, 16).toString(36);\n }\n exports3._base16To36 = _base16To36;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/fixednumber.js\n var require_fixednumber = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/fixednumber.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FixedNumber = exports3.FixedFormat = exports3.parseFixed = exports3.formatFixed = void 0;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version3();\n var logger = new logger_1.Logger(_version_1.version);\n var bignumber_1 = require_bignumber();\n var _constructorGuard = {};\n var Zero = bignumber_1.BigNumber.from(0);\n var NegativeOne = bignumber_1.BigNumber.from(-1);\n function throwFault(message, fault, operation, value) {\n var params = { fault, operation };\n if (value !== void 0) {\n params.value = value;\n }\n return logger.throwError(message, logger_1.Logger.errors.NUMERIC_FAULT, params);\n }\n var zeros = \"0\";\n while (zeros.length < 256) {\n zeros += zeros;\n }\n function getMultiplier(decimals) {\n if (typeof decimals !== \"number\") {\n try {\n decimals = bignumber_1.BigNumber.from(decimals).toNumber();\n } catch (e2) {\n }\n }\n if (typeof decimals === \"number\" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {\n return \"1\" + zeros.substring(0, decimals);\n }\n return logger.throwArgumentError(\"invalid decimal size\", \"decimals\", decimals);\n }\n function formatFixed(value, decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n var multiplier = getMultiplier(decimals);\n value = bignumber_1.BigNumber.from(value);\n var negative = value.lt(Zero);\n if (negative) {\n value = value.mul(NegativeOne);\n }\n var fraction = value.mod(multiplier).toString();\n while (fraction.length < multiplier.length - 1) {\n fraction = \"0\" + fraction;\n }\n fraction = fraction.match(/^([0-9]*[1-9]|0)(0*)/)[1];\n var whole = value.div(multiplier).toString();\n if (multiplier.length === 1) {\n value = whole;\n } else {\n value = whole + \".\" + fraction;\n }\n if (negative) {\n value = \"-\" + value;\n }\n return value;\n }\n exports3.formatFixed = formatFixed;\n function parseFixed(value, decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n var multiplier = getMultiplier(decimals);\n if (typeof value !== \"string\" || !value.match(/^-?[0-9.]+$/)) {\n logger.throwArgumentError(\"invalid decimal value\", \"value\", value);\n }\n var negative = value.substring(0, 1) === \"-\";\n if (negative) {\n value = value.substring(1);\n }\n if (value === \".\") {\n logger.throwArgumentError(\"missing value\", \"value\", value);\n }\n var comps = value.split(\".\");\n if (comps.length > 2) {\n logger.throwArgumentError(\"too many decimal points\", \"value\", value);\n }\n var whole = comps[0], fraction = comps[1];\n if (!whole) {\n whole = \"0\";\n }\n if (!fraction) {\n fraction = \"0\";\n }\n while (fraction[fraction.length - 1] === \"0\") {\n fraction = fraction.substring(0, fraction.length - 1);\n }\n if (fraction.length > multiplier.length - 1) {\n throwFault(\"fractional component exceeds decimals\", \"underflow\", \"parseFixed\");\n }\n if (fraction === \"\") {\n fraction = \"0\";\n }\n while (fraction.length < multiplier.length - 1) {\n fraction += \"0\";\n }\n var wholeValue = bignumber_1.BigNumber.from(whole);\n var fractionValue = bignumber_1.BigNumber.from(fraction);\n var wei = wholeValue.mul(multiplier).add(fractionValue);\n if (negative) {\n wei = wei.mul(NegativeOne);\n }\n return wei;\n }\n exports3.parseFixed = parseFixed;\n var FixedFormat = (\n /** @class */\n function() {\n function FixedFormat2(constructorGuard, signed, width, decimals) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot use FixedFormat constructor; use FixedFormat.from\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new FixedFormat\"\n });\n }\n this.signed = signed;\n this.width = width;\n this.decimals = decimals;\n this.name = (signed ? \"\" : \"u\") + \"fixed\" + String(width) + \"x\" + String(decimals);\n this._multiplier = getMultiplier(decimals);\n Object.freeze(this);\n }\n FixedFormat2.from = function(value) {\n if (value instanceof FixedFormat2) {\n return value;\n }\n if (typeof value === \"number\") {\n value = \"fixed128x\" + value;\n }\n var signed = true;\n var width = 128;\n var decimals = 18;\n if (typeof value === \"string\") {\n if (value === \"fixed\") {\n } else if (value === \"ufixed\") {\n signed = false;\n } else {\n var match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);\n if (!match) {\n logger.throwArgumentError(\"invalid fixed format\", \"format\", value);\n }\n signed = match[1] !== \"u\";\n width = parseInt(match[2]);\n decimals = parseInt(match[3]);\n }\n } else if (value) {\n var check = function(key, type, defaultValue) {\n if (value[key] == null) {\n return defaultValue;\n }\n if (typeof value[key] !== type) {\n logger.throwArgumentError(\"invalid fixed format (\" + key + \" not \" + type + \")\", \"format.\" + key, value[key]);\n }\n return value[key];\n };\n signed = check(\"signed\", \"boolean\", signed);\n width = check(\"width\", \"number\", width);\n decimals = check(\"decimals\", \"number\", decimals);\n }\n if (width % 8) {\n logger.throwArgumentError(\"invalid fixed format width (not byte aligned)\", \"format.width\", width);\n }\n if (decimals > 80) {\n logger.throwArgumentError(\"invalid fixed format (decimals too large)\", \"format.decimals\", decimals);\n }\n return new FixedFormat2(_constructorGuard, signed, width, decimals);\n };\n return FixedFormat2;\n }()\n );\n exports3.FixedFormat = FixedFormat;\n var FixedNumber = (\n /** @class */\n function() {\n function FixedNumber2(constructorGuard, hex, value, format) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot use FixedNumber constructor; use FixedNumber.from\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new FixedFormat\"\n });\n }\n this.format = format;\n this._hex = hex;\n this._value = value;\n this._isFixedNumber = true;\n Object.freeze(this);\n }\n FixedNumber2.prototype._checkFormat = function(other) {\n if (this.format.name !== other.format.name) {\n logger.throwArgumentError(\"incompatible format; use fixedNumber.toFormat\", \"other\", other);\n }\n };\n FixedNumber2.prototype.addUnsafe = function(other) {\n this._checkFormat(other);\n var a3 = parseFixed(this._value, this.format.decimals);\n var b4 = parseFixed(other._value, other.format.decimals);\n return FixedNumber2.fromValue(a3.add(b4), this.format.decimals, this.format);\n };\n FixedNumber2.prototype.subUnsafe = function(other) {\n this._checkFormat(other);\n var a3 = parseFixed(this._value, this.format.decimals);\n var b4 = parseFixed(other._value, other.format.decimals);\n return FixedNumber2.fromValue(a3.sub(b4), this.format.decimals, this.format);\n };\n FixedNumber2.prototype.mulUnsafe = function(other) {\n this._checkFormat(other);\n var a3 = parseFixed(this._value, this.format.decimals);\n var b4 = parseFixed(other._value, other.format.decimals);\n return FixedNumber2.fromValue(a3.mul(b4).div(this.format._multiplier), this.format.decimals, this.format);\n };\n FixedNumber2.prototype.divUnsafe = function(other) {\n this._checkFormat(other);\n var a3 = parseFixed(this._value, this.format.decimals);\n var b4 = parseFixed(other._value, other.format.decimals);\n return FixedNumber2.fromValue(a3.mul(this.format._multiplier).div(b4), this.format.decimals, this.format);\n };\n FixedNumber2.prototype.floor = function() {\n var comps = this.toString().split(\".\");\n if (comps.length === 1) {\n comps.push(\"0\");\n }\n var result = FixedNumber2.from(comps[0], this.format);\n var hasFraction = !comps[1].match(/^(0*)$/);\n if (this.isNegative() && hasFraction) {\n result = result.subUnsafe(ONE.toFormat(result.format));\n }\n return result;\n };\n FixedNumber2.prototype.ceiling = function() {\n var comps = this.toString().split(\".\");\n if (comps.length === 1) {\n comps.push(\"0\");\n }\n var result = FixedNumber2.from(comps[0], this.format);\n var hasFraction = !comps[1].match(/^(0*)$/);\n if (!this.isNegative() && hasFraction) {\n result = result.addUnsafe(ONE.toFormat(result.format));\n }\n return result;\n };\n FixedNumber2.prototype.round = function(decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n var comps = this.toString().split(\".\");\n if (comps.length === 1) {\n comps.push(\"0\");\n }\n if (decimals < 0 || decimals > 80 || decimals % 1) {\n logger.throwArgumentError(\"invalid decimal count\", \"decimals\", decimals);\n }\n if (comps[1].length <= decimals) {\n return this;\n }\n var factor = FixedNumber2.from(\"1\" + zeros.substring(0, decimals), this.format);\n var bump = BUMP.toFormat(this.format);\n return this.mulUnsafe(factor).addUnsafe(bump).floor().divUnsafe(factor);\n };\n FixedNumber2.prototype.isZero = function() {\n return this._value === \"0.0\" || this._value === \"0\";\n };\n FixedNumber2.prototype.isNegative = function() {\n return this._value[0] === \"-\";\n };\n FixedNumber2.prototype.toString = function() {\n return this._value;\n };\n FixedNumber2.prototype.toHexString = function(width) {\n if (width == null) {\n return this._hex;\n }\n if (width % 8) {\n logger.throwArgumentError(\"invalid byte width\", \"width\", width);\n }\n var hex = bignumber_1.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString();\n return (0, bytes_1.hexZeroPad)(hex, width / 8);\n };\n FixedNumber2.prototype.toUnsafeFloat = function() {\n return parseFloat(this.toString());\n };\n FixedNumber2.prototype.toFormat = function(format) {\n return FixedNumber2.fromString(this._value, format);\n };\n FixedNumber2.fromValue = function(value, decimals, format) {\n if (format == null && decimals != null && !(0, bignumber_1.isBigNumberish)(decimals)) {\n format = decimals;\n decimals = null;\n }\n if (decimals == null) {\n decimals = 0;\n }\n if (format == null) {\n format = \"fixed\";\n }\n return FixedNumber2.fromString(formatFixed(value, decimals), FixedFormat.from(format));\n };\n FixedNumber2.fromString = function(value, format) {\n if (format == null) {\n format = \"fixed\";\n }\n var fixedFormat = FixedFormat.from(format);\n var numeric = parseFixed(value, fixedFormat.decimals);\n if (!fixedFormat.signed && numeric.lt(Zero)) {\n throwFault(\"unsigned value cannot be negative\", \"overflow\", \"value\", value);\n }\n var hex = null;\n if (fixedFormat.signed) {\n hex = numeric.toTwos(fixedFormat.width).toHexString();\n } else {\n hex = numeric.toHexString();\n hex = (0, bytes_1.hexZeroPad)(hex, fixedFormat.width / 8);\n }\n var decimal = formatFixed(numeric, fixedFormat.decimals);\n return new FixedNumber2(_constructorGuard, hex, decimal, fixedFormat);\n };\n FixedNumber2.fromBytes = function(value, format) {\n if (format == null) {\n format = \"fixed\";\n }\n var fixedFormat = FixedFormat.from(format);\n if ((0, bytes_1.arrayify)(value).length > fixedFormat.width / 8) {\n throw new Error(\"overflow\");\n }\n var numeric = bignumber_1.BigNumber.from(value);\n if (fixedFormat.signed) {\n numeric = numeric.fromTwos(fixedFormat.width);\n }\n var hex = numeric.toTwos((fixedFormat.signed ? 0 : 1) + fixedFormat.width).toHexString();\n var decimal = formatFixed(numeric, fixedFormat.decimals);\n return new FixedNumber2(_constructorGuard, hex, decimal, fixedFormat);\n };\n FixedNumber2.from = function(value, format) {\n if (typeof value === \"string\") {\n return FixedNumber2.fromString(value, format);\n }\n if ((0, bytes_1.isBytes)(value)) {\n return FixedNumber2.fromBytes(value, format);\n }\n try {\n return FixedNumber2.fromValue(value, 0, format);\n } catch (error) {\n if (error.code !== logger_1.Logger.errors.INVALID_ARGUMENT) {\n throw error;\n }\n }\n return logger.throwArgumentError(\"invalid FixedNumber value\", \"value\", value);\n };\n FixedNumber2.isFixedNumber = function(value) {\n return !!(value && value._isFixedNumber);\n };\n return FixedNumber2;\n }()\n );\n exports3.FixedNumber = FixedNumber;\n var ONE = FixedNumber.from(1);\n var BUMP = FixedNumber.from(\"0.5\");\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/index.js\n var require_lib3 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3._base36To16 = exports3._base16To36 = exports3.parseFixed = exports3.FixedNumber = exports3.FixedFormat = exports3.formatFixed = exports3.BigNumber = void 0;\n var bignumber_1 = require_bignumber();\n Object.defineProperty(exports3, \"BigNumber\", { enumerable: true, get: function() {\n return bignumber_1.BigNumber;\n } });\n var fixednumber_1 = require_fixednumber();\n Object.defineProperty(exports3, \"formatFixed\", { enumerable: true, get: function() {\n return fixednumber_1.formatFixed;\n } });\n Object.defineProperty(exports3, \"FixedFormat\", { enumerable: true, get: function() {\n return fixednumber_1.FixedFormat;\n } });\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return fixednumber_1.FixedNumber;\n } });\n Object.defineProperty(exports3, \"parseFixed\", { enumerable: true, get: function() {\n return fixednumber_1.parseFixed;\n } });\n var bignumber_2 = require_bignumber();\n Object.defineProperty(exports3, \"_base16To36\", { enumerable: true, get: function() {\n return bignumber_2._base16To36;\n } });\n Object.defineProperty(exports3, \"_base36To16\", { enumerable: true, get: function() {\n return bignumber_2._base36To16;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib/_version.js\n var require_version4 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"properties/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib/index.js\n var require_lib4 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Description = exports3.deepCopy = exports3.shallowCopy = exports3.checkProperties = exports3.resolveProperties = exports3.getStatic = exports3.defineReadOnly = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version4();\n var logger = new logger_1.Logger(_version_1.version);\n function defineReadOnly(object, name, value) {\n Object.defineProperty(object, name, {\n enumerable: true,\n value,\n writable: false\n });\n }\n exports3.defineReadOnly = defineReadOnly;\n function getStatic(ctor, key) {\n for (var i3 = 0; i3 < 32; i3++) {\n if (ctor[key]) {\n return ctor[key];\n }\n if (!ctor.prototype || typeof ctor.prototype !== \"object\") {\n break;\n }\n ctor = Object.getPrototypeOf(ctor.prototype).constructor;\n }\n return null;\n }\n exports3.getStatic = getStatic;\n function resolveProperties2(object) {\n return __awaiter4(this, void 0, void 0, function() {\n var promises, results;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n promises = Object.keys(object).map(function(key) {\n var value = object[key];\n return Promise.resolve(value).then(function(v2) {\n return { key, value: v2 };\n });\n });\n return [4, Promise.all(promises)];\n case 1:\n results = _a.sent();\n return [2, results.reduce(function(accum, result) {\n accum[result.key] = result.value;\n return accum;\n }, {})];\n }\n });\n });\n }\n exports3.resolveProperties = resolveProperties2;\n function checkProperties(object, properties) {\n if (!object || typeof object !== \"object\") {\n logger.throwArgumentError(\"invalid object\", \"object\", object);\n }\n Object.keys(object).forEach(function(key) {\n if (!properties[key]) {\n logger.throwArgumentError(\"invalid object key - \" + key, \"transaction:\" + key, object);\n }\n });\n }\n exports3.checkProperties = checkProperties;\n function shallowCopy(object) {\n var result = {};\n for (var key in object) {\n result[key] = object[key];\n }\n return result;\n }\n exports3.shallowCopy = shallowCopy;\n var opaque = { bigint: true, boolean: true, \"function\": true, number: true, string: true };\n function _isFrozen(object) {\n if (object === void 0 || object === null || opaque[typeof object]) {\n return true;\n }\n if (Array.isArray(object) || typeof object === \"object\") {\n if (!Object.isFrozen(object)) {\n return false;\n }\n var keys = Object.keys(object);\n for (var i3 = 0; i3 < keys.length; i3++) {\n var value = null;\n try {\n value = object[keys[i3]];\n } catch (error) {\n continue;\n }\n if (!_isFrozen(value)) {\n return false;\n }\n }\n return true;\n }\n return logger.throwArgumentError(\"Cannot deepCopy \" + typeof object, \"object\", object);\n }\n function _deepCopy(object) {\n if (_isFrozen(object)) {\n return object;\n }\n if (Array.isArray(object)) {\n return Object.freeze(object.map(function(item) {\n return deepCopy(item);\n }));\n }\n if (typeof object === \"object\") {\n var result = {};\n for (var key in object) {\n var value = object[key];\n if (value === void 0) {\n continue;\n }\n defineReadOnly(result, key, deepCopy(value));\n }\n return result;\n }\n return logger.throwArgumentError(\"Cannot deepCopy \" + typeof object, \"object\", object);\n }\n function deepCopy(object) {\n return _deepCopy(object);\n }\n exports3.deepCopy = deepCopy;\n var Description = (\n /** @class */\n /* @__PURE__ */ function() {\n function Description2(info) {\n for (var key in info) {\n this[key] = deepCopy(info[key]);\n }\n }\n return Description2;\n }()\n );\n exports3.Description = Description;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/_version.js\n var require_version5 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"abi/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/fragments.js\n var require_fragments = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/fragments.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ErrorFragment = exports3.FunctionFragment = exports3.ConstructorFragment = exports3.EventFragment = exports3.Fragment = exports3.ParamType = exports3.FormatTypes = void 0;\n var bignumber_1 = require_lib3();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n var _constructorGuard = {};\n var ModifiersBytes = { calldata: true, memory: true, storage: true };\n var ModifiersNest = { calldata: true, memory: true };\n function checkModifier(type, name) {\n if (type === \"bytes\" || type === \"string\") {\n if (ModifiersBytes[name]) {\n return true;\n }\n } else if (type === \"address\") {\n if (name === \"payable\") {\n return true;\n }\n } else if (type.indexOf(\"[\") >= 0 || type === \"tuple\") {\n if (ModifiersNest[name]) {\n return true;\n }\n }\n if (ModifiersBytes[name] || name === \"payable\") {\n logger.throwArgumentError(\"invalid modifier\", \"name\", name);\n }\n return false;\n }\n function parseParamType(param, allowIndexed) {\n var originalParam = param;\n function throwError(i4) {\n logger.throwArgumentError(\"unexpected character at position \" + i4, \"param\", param);\n }\n param = param.replace(/\\s/g, \" \");\n function newNode(parent2) {\n var node2 = { type: \"\", name: \"\", parent: parent2, state: { allowType: true } };\n if (allowIndexed) {\n node2.indexed = false;\n }\n return node2;\n }\n var parent = { type: \"\", name: \"\", state: { allowType: true } };\n var node = parent;\n for (var i3 = 0; i3 < param.length; i3++) {\n var c4 = param[i3];\n switch (c4) {\n case \"(\":\n if (node.state.allowType && node.type === \"\") {\n node.type = \"tuple\";\n } else if (!node.state.allowParams) {\n throwError(i3);\n }\n node.state.allowType = false;\n node.type = verifyType(node.type);\n node.components = [newNode(node)];\n node = node.components[0];\n break;\n case \")\":\n delete node.state;\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(i3);\n }\n node.indexed = true;\n node.name = \"\";\n }\n if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n node.type = verifyType(node.type);\n var child = node;\n node = node.parent;\n if (!node) {\n throwError(i3);\n }\n delete child.parent;\n node.state.allowParams = false;\n node.state.allowName = true;\n node.state.allowArray = true;\n break;\n case \",\":\n delete node.state;\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(i3);\n }\n node.indexed = true;\n node.name = \"\";\n }\n if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n node.type = verifyType(node.type);\n var sibling = newNode(node.parent);\n node.parent.components.push(sibling);\n delete node.parent;\n node = sibling;\n break;\n case \" \":\n if (node.state.allowType) {\n if (node.type !== \"\") {\n node.type = verifyType(node.type);\n delete node.state.allowType;\n node.state.allowName = true;\n node.state.allowParams = true;\n }\n }\n if (node.state.allowName) {\n if (node.name !== \"\") {\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(i3);\n }\n if (node.indexed) {\n throwError(i3);\n }\n node.indexed = true;\n node.name = \"\";\n } else if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n } else {\n node.state.allowName = false;\n }\n }\n }\n break;\n case \"[\":\n if (!node.state.allowArray) {\n throwError(i3);\n }\n node.type += c4;\n node.state.allowArray = false;\n node.state.allowName = false;\n node.state.readArray = true;\n break;\n case \"]\":\n if (!node.state.readArray) {\n throwError(i3);\n }\n node.type += c4;\n node.state.readArray = false;\n node.state.allowArray = true;\n node.state.allowName = true;\n break;\n default:\n if (node.state.allowType) {\n node.type += c4;\n node.state.allowParams = true;\n node.state.allowArray = true;\n } else if (node.state.allowName) {\n node.name += c4;\n delete node.state.allowArray;\n } else if (node.state.readArray) {\n node.type += c4;\n } else {\n throwError(i3);\n }\n }\n }\n if (node.parent) {\n logger.throwArgumentError(\"unexpected eof\", \"param\", param);\n }\n delete parent.state;\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(originalParam.length - 7);\n }\n if (node.indexed) {\n throwError(originalParam.length - 7);\n }\n node.indexed = true;\n node.name = \"\";\n } else if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n parent.type = verifyType(parent.type);\n return parent;\n }\n function populate(object, params) {\n for (var key in params) {\n (0, properties_1.defineReadOnly)(object, key, params[key]);\n }\n }\n exports3.FormatTypes = Object.freeze({\n // Bare formatting, as is needed for computing a sighash of an event or function\n sighash: \"sighash\",\n // Human-Readable with Minimal spacing and without names (compact human-readable)\n minimal: \"minimal\",\n // Human-Readable with nice spacing, including all names\n full: \"full\",\n // JSON-format a la Solidity\n json: \"json\"\n });\n var paramTypeArray = new RegExp(/^(.*)\\[([0-9]*)\\]$/);\n var ParamType = (\n /** @class */\n function() {\n function ParamType2(constructorGuard, params) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"use fromString\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new ParamType()\"\n });\n }\n populate(this, params);\n var match = this.type.match(paramTypeArray);\n if (match) {\n populate(this, {\n arrayLength: parseInt(match[2] || \"-1\"),\n arrayChildren: ParamType2.fromObject({\n type: match[1],\n components: this.components\n }),\n baseType: \"array\"\n });\n } else {\n populate(this, {\n arrayLength: null,\n arrayChildren: null,\n baseType: this.components != null ? \"tuple\" : this.type\n });\n }\n this._isParamType = true;\n Object.freeze(this);\n }\n ParamType2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n var result_1 = {\n type: this.baseType === \"tuple\" ? \"tuple\" : this.type,\n name: this.name || void 0\n };\n if (typeof this.indexed === \"boolean\") {\n result_1.indexed = this.indexed;\n }\n if (this.components) {\n result_1.components = this.components.map(function(comp) {\n return JSON.parse(comp.format(format));\n });\n }\n return JSON.stringify(result_1);\n }\n var result = \"\";\n if (this.baseType === \"array\") {\n result += this.arrayChildren.format(format);\n result += \"[\" + (this.arrayLength < 0 ? \"\" : String(this.arrayLength)) + \"]\";\n } else {\n if (this.baseType === \"tuple\") {\n if (format !== exports3.FormatTypes.sighash) {\n result += this.type;\n }\n result += \"(\" + this.components.map(function(comp) {\n return comp.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \")\";\n } else {\n result += this.type;\n }\n }\n if (format !== exports3.FormatTypes.sighash) {\n if (this.indexed === true) {\n result += \" indexed\";\n }\n if (format === exports3.FormatTypes.full && this.name) {\n result += \" \" + this.name;\n }\n }\n return result;\n };\n ParamType2.from = function(value, allowIndexed) {\n if (typeof value === \"string\") {\n return ParamType2.fromString(value, allowIndexed);\n }\n return ParamType2.fromObject(value);\n };\n ParamType2.fromObject = function(value) {\n if (ParamType2.isParamType(value)) {\n return value;\n }\n return new ParamType2(_constructorGuard, {\n name: value.name || null,\n type: verifyType(value.type),\n indexed: value.indexed == null ? null : !!value.indexed,\n components: value.components ? value.components.map(ParamType2.fromObject) : null\n });\n };\n ParamType2.fromString = function(value, allowIndexed) {\n function ParamTypify(node) {\n return ParamType2.fromObject({\n name: node.name,\n type: node.type,\n indexed: node.indexed,\n components: node.components\n });\n }\n return ParamTypify(parseParamType(value, !!allowIndexed));\n };\n ParamType2.isParamType = function(value) {\n return !!(value != null && value._isParamType);\n };\n return ParamType2;\n }()\n );\n exports3.ParamType = ParamType;\n function parseParams(value, allowIndex) {\n return splitNesting(value).map(function(param) {\n return ParamType.fromString(param, allowIndex);\n });\n }\n var Fragment = (\n /** @class */\n function() {\n function Fragment2(constructorGuard, params) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"use a static from method\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Fragment()\"\n });\n }\n populate(this, params);\n this._isFragment = true;\n Object.freeze(this);\n }\n Fragment2.from = function(value) {\n if (Fragment2.isFragment(value)) {\n return value;\n }\n if (typeof value === \"string\") {\n return Fragment2.fromString(value);\n }\n return Fragment2.fromObject(value);\n };\n Fragment2.fromObject = function(value) {\n if (Fragment2.isFragment(value)) {\n return value;\n }\n switch (value.type) {\n case \"function\":\n return FunctionFragment.fromObject(value);\n case \"event\":\n return EventFragment.fromObject(value);\n case \"constructor\":\n return ConstructorFragment.fromObject(value);\n case \"error\":\n return ErrorFragment.fromObject(value);\n case \"fallback\":\n case \"receive\":\n return null;\n }\n return logger.throwArgumentError(\"invalid fragment object\", \"value\", value);\n };\n Fragment2.fromString = function(value) {\n value = value.replace(/\\s/g, \" \");\n value = value.replace(/\\(/g, \" (\").replace(/\\)/g, \") \").replace(/\\s+/g, \" \");\n value = value.trim();\n if (value.split(\" \")[0] === \"event\") {\n return EventFragment.fromString(value.substring(5).trim());\n } else if (value.split(\" \")[0] === \"function\") {\n return FunctionFragment.fromString(value.substring(8).trim());\n } else if (value.split(\"(\")[0].trim() === \"constructor\") {\n return ConstructorFragment.fromString(value.trim());\n } else if (value.split(\" \")[0] === \"error\") {\n return ErrorFragment.fromString(value.substring(5).trim());\n }\n return logger.throwArgumentError(\"unsupported fragment\", \"value\", value);\n };\n Fragment2.isFragment = function(value) {\n return !!(value && value._isFragment);\n };\n return Fragment2;\n }()\n );\n exports3.Fragment = Fragment;\n var EventFragment = (\n /** @class */\n function(_super) {\n __extends4(EventFragment2, _super);\n function EventFragment2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n EventFragment2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n return JSON.stringify({\n type: \"event\",\n anonymous: this.anonymous,\n name: this.name,\n inputs: this.inputs.map(function(input) {\n return JSON.parse(input.format(format));\n })\n });\n }\n var result = \"\";\n if (format !== exports3.FormatTypes.sighash) {\n result += \"event \";\n }\n result += this.name + \"(\" + this.inputs.map(function(input) {\n return input.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \") \";\n if (format !== exports3.FormatTypes.sighash) {\n if (this.anonymous) {\n result += \"anonymous \";\n }\n }\n return result.trim();\n };\n EventFragment2.from = function(value) {\n if (typeof value === \"string\") {\n return EventFragment2.fromString(value);\n }\n return EventFragment2.fromObject(value);\n };\n EventFragment2.fromObject = function(value) {\n if (EventFragment2.isEventFragment(value)) {\n return value;\n }\n if (value.type !== \"event\") {\n logger.throwArgumentError(\"invalid event object\", \"value\", value);\n }\n var params = {\n name: verifyIdentifier(value.name),\n anonymous: value.anonymous,\n inputs: value.inputs ? value.inputs.map(ParamType.fromObject) : [],\n type: \"event\"\n };\n return new EventFragment2(_constructorGuard, params);\n };\n EventFragment2.fromString = function(value) {\n var match = value.match(regexParen);\n if (!match) {\n logger.throwArgumentError(\"invalid event string\", \"value\", value);\n }\n var anonymous = false;\n match[3].split(\" \").forEach(function(modifier) {\n switch (modifier.trim()) {\n case \"anonymous\":\n anonymous = true;\n break;\n case \"\":\n break;\n default:\n logger.warn(\"unknown modifier: \" + modifier);\n }\n });\n return EventFragment2.fromObject({\n name: match[1].trim(),\n anonymous,\n inputs: parseParams(match[2], true),\n type: \"event\"\n });\n };\n EventFragment2.isEventFragment = function(value) {\n return value && value._isFragment && value.type === \"event\";\n };\n return EventFragment2;\n }(Fragment)\n );\n exports3.EventFragment = EventFragment;\n function parseGas(value, params) {\n params.gas = null;\n var comps = value.split(\"@\");\n if (comps.length !== 1) {\n if (comps.length > 2) {\n logger.throwArgumentError(\"invalid human-readable ABI signature\", \"value\", value);\n }\n if (!comps[1].match(/^[0-9]+$/)) {\n logger.throwArgumentError(\"invalid human-readable ABI signature gas\", \"value\", value);\n }\n params.gas = bignumber_1.BigNumber.from(comps[1]);\n return comps[0];\n }\n return value;\n }\n function parseModifiers(value, params) {\n params.constant = false;\n params.payable = false;\n params.stateMutability = \"nonpayable\";\n value.split(\" \").forEach(function(modifier) {\n switch (modifier.trim()) {\n case \"constant\":\n params.constant = true;\n break;\n case \"payable\":\n params.payable = true;\n params.stateMutability = \"payable\";\n break;\n case \"nonpayable\":\n params.payable = false;\n params.stateMutability = \"nonpayable\";\n break;\n case \"pure\":\n params.constant = true;\n params.stateMutability = \"pure\";\n break;\n case \"view\":\n params.constant = true;\n params.stateMutability = \"view\";\n break;\n case \"external\":\n case \"public\":\n case \"\":\n break;\n default:\n console.log(\"unknown modifier: \" + modifier);\n }\n });\n }\n function verifyState(value) {\n var result = {\n constant: false,\n payable: true,\n stateMutability: \"payable\"\n };\n if (value.stateMutability != null) {\n result.stateMutability = value.stateMutability;\n result.constant = result.stateMutability === \"view\" || result.stateMutability === \"pure\";\n if (value.constant != null) {\n if (!!value.constant !== result.constant) {\n logger.throwArgumentError(\"cannot have constant function with mutability \" + result.stateMutability, \"value\", value);\n }\n }\n result.payable = result.stateMutability === \"payable\";\n if (value.payable != null) {\n if (!!value.payable !== result.payable) {\n logger.throwArgumentError(\"cannot have payable function with mutability \" + result.stateMutability, \"value\", value);\n }\n }\n } else if (value.payable != null) {\n result.payable = !!value.payable;\n if (value.constant == null && !result.payable && value.type !== \"constructor\") {\n logger.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n result.constant = !!value.constant;\n if (result.constant) {\n result.stateMutability = \"view\";\n } else {\n result.stateMutability = result.payable ? \"payable\" : \"nonpayable\";\n }\n if (result.payable && result.constant) {\n logger.throwArgumentError(\"cannot have constant payable function\", \"value\", value);\n }\n } else if (value.constant != null) {\n result.constant = !!value.constant;\n result.payable = !result.constant;\n result.stateMutability = result.constant ? \"view\" : \"payable\";\n } else if (value.type !== \"constructor\") {\n logger.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n return result;\n }\n var ConstructorFragment = (\n /** @class */\n function(_super) {\n __extends4(ConstructorFragment2, _super);\n function ConstructorFragment2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ConstructorFragment2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n return JSON.stringify({\n type: \"constructor\",\n stateMutability: this.stateMutability !== \"nonpayable\" ? this.stateMutability : void 0,\n payable: this.payable,\n gas: this.gas ? this.gas.toNumber() : void 0,\n inputs: this.inputs.map(function(input) {\n return JSON.parse(input.format(format));\n })\n });\n }\n if (format === exports3.FormatTypes.sighash) {\n logger.throwError(\"cannot format a constructor for sighash\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"format(sighash)\"\n });\n }\n var result = \"constructor(\" + this.inputs.map(function(input) {\n return input.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \") \";\n if (this.stateMutability && this.stateMutability !== \"nonpayable\") {\n result += this.stateMutability + \" \";\n }\n return result.trim();\n };\n ConstructorFragment2.from = function(value) {\n if (typeof value === \"string\") {\n return ConstructorFragment2.fromString(value);\n }\n return ConstructorFragment2.fromObject(value);\n };\n ConstructorFragment2.fromObject = function(value) {\n if (ConstructorFragment2.isConstructorFragment(value)) {\n return value;\n }\n if (value.type !== \"constructor\") {\n logger.throwArgumentError(\"invalid constructor object\", \"value\", value);\n }\n var state = verifyState(value);\n if (state.constant) {\n logger.throwArgumentError(\"constructor cannot be constant\", \"value\", value);\n }\n var params = {\n name: null,\n type: value.type,\n inputs: value.inputs ? value.inputs.map(ParamType.fromObject) : [],\n payable: state.payable,\n stateMutability: state.stateMutability,\n gas: value.gas ? bignumber_1.BigNumber.from(value.gas) : null\n };\n return new ConstructorFragment2(_constructorGuard, params);\n };\n ConstructorFragment2.fromString = function(value) {\n var params = { type: \"constructor\" };\n value = parseGas(value, params);\n var parens = value.match(regexParen);\n if (!parens || parens[1].trim() !== \"constructor\") {\n logger.throwArgumentError(\"invalid constructor string\", \"value\", value);\n }\n params.inputs = parseParams(parens[2].trim(), false);\n parseModifiers(parens[3].trim(), params);\n return ConstructorFragment2.fromObject(params);\n };\n ConstructorFragment2.isConstructorFragment = function(value) {\n return value && value._isFragment && value.type === \"constructor\";\n };\n return ConstructorFragment2;\n }(Fragment)\n );\n exports3.ConstructorFragment = ConstructorFragment;\n var FunctionFragment = (\n /** @class */\n function(_super) {\n __extends4(FunctionFragment2, _super);\n function FunctionFragment2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FunctionFragment2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n return JSON.stringify({\n type: \"function\",\n name: this.name,\n constant: this.constant,\n stateMutability: this.stateMutability !== \"nonpayable\" ? this.stateMutability : void 0,\n payable: this.payable,\n gas: this.gas ? this.gas.toNumber() : void 0,\n inputs: this.inputs.map(function(input) {\n return JSON.parse(input.format(format));\n }),\n outputs: this.outputs.map(function(output) {\n return JSON.parse(output.format(format));\n })\n });\n }\n var result = \"\";\n if (format !== exports3.FormatTypes.sighash) {\n result += \"function \";\n }\n result += this.name + \"(\" + this.inputs.map(function(input) {\n return input.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \") \";\n if (format !== exports3.FormatTypes.sighash) {\n if (this.stateMutability) {\n if (this.stateMutability !== \"nonpayable\") {\n result += this.stateMutability + \" \";\n }\n } else if (this.constant) {\n result += \"view \";\n }\n if (this.outputs && this.outputs.length) {\n result += \"returns (\" + this.outputs.map(function(output) {\n return output.format(format);\n }).join(\", \") + \") \";\n }\n if (this.gas != null) {\n result += \"@\" + this.gas.toString() + \" \";\n }\n }\n return result.trim();\n };\n FunctionFragment2.from = function(value) {\n if (typeof value === \"string\") {\n return FunctionFragment2.fromString(value);\n }\n return FunctionFragment2.fromObject(value);\n };\n FunctionFragment2.fromObject = function(value) {\n if (FunctionFragment2.isFunctionFragment(value)) {\n return value;\n }\n if (value.type !== \"function\") {\n logger.throwArgumentError(\"invalid function object\", \"value\", value);\n }\n var state = verifyState(value);\n var params = {\n type: value.type,\n name: verifyIdentifier(value.name),\n constant: state.constant,\n inputs: value.inputs ? value.inputs.map(ParamType.fromObject) : [],\n outputs: value.outputs ? value.outputs.map(ParamType.fromObject) : [],\n payable: state.payable,\n stateMutability: state.stateMutability,\n gas: value.gas ? bignumber_1.BigNumber.from(value.gas) : null\n };\n return new FunctionFragment2(_constructorGuard, params);\n };\n FunctionFragment2.fromString = function(value) {\n var params = { type: \"function\" };\n value = parseGas(value, params);\n var comps = value.split(\" returns \");\n if (comps.length > 2) {\n logger.throwArgumentError(\"invalid function string\", \"value\", value);\n }\n var parens = comps[0].match(regexParen);\n if (!parens) {\n logger.throwArgumentError(\"invalid function signature\", \"value\", value);\n }\n params.name = parens[1].trim();\n if (params.name) {\n verifyIdentifier(params.name);\n }\n params.inputs = parseParams(parens[2], false);\n parseModifiers(parens[3].trim(), params);\n if (comps.length > 1) {\n var returns = comps[1].match(regexParen);\n if (returns[1].trim() != \"\" || returns[3].trim() != \"\") {\n logger.throwArgumentError(\"unexpected tokens\", \"value\", value);\n }\n params.outputs = parseParams(returns[2], false);\n } else {\n params.outputs = [];\n }\n return FunctionFragment2.fromObject(params);\n };\n FunctionFragment2.isFunctionFragment = function(value) {\n return value && value._isFragment && value.type === \"function\";\n };\n return FunctionFragment2;\n }(ConstructorFragment)\n );\n exports3.FunctionFragment = FunctionFragment;\n function checkForbidden(fragment) {\n var sig = fragment.format();\n if (sig === \"Error(string)\" || sig === \"Panic(uint256)\") {\n logger.throwArgumentError(\"cannot specify user defined \" + sig + \" error\", \"fragment\", fragment);\n }\n return fragment;\n }\n var ErrorFragment = (\n /** @class */\n function(_super) {\n __extends4(ErrorFragment2, _super);\n function ErrorFragment2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ErrorFragment2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n return JSON.stringify({\n type: \"error\",\n name: this.name,\n inputs: this.inputs.map(function(input) {\n return JSON.parse(input.format(format));\n })\n });\n }\n var result = \"\";\n if (format !== exports3.FormatTypes.sighash) {\n result += \"error \";\n }\n result += this.name + \"(\" + this.inputs.map(function(input) {\n return input.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \") \";\n return result.trim();\n };\n ErrorFragment2.from = function(value) {\n if (typeof value === \"string\") {\n return ErrorFragment2.fromString(value);\n }\n return ErrorFragment2.fromObject(value);\n };\n ErrorFragment2.fromObject = function(value) {\n if (ErrorFragment2.isErrorFragment(value)) {\n return value;\n }\n if (value.type !== \"error\") {\n logger.throwArgumentError(\"invalid error object\", \"value\", value);\n }\n var params = {\n type: value.type,\n name: verifyIdentifier(value.name),\n inputs: value.inputs ? value.inputs.map(ParamType.fromObject) : []\n };\n return checkForbidden(new ErrorFragment2(_constructorGuard, params));\n };\n ErrorFragment2.fromString = function(value) {\n var params = { type: \"error\" };\n var parens = value.match(regexParen);\n if (!parens) {\n logger.throwArgumentError(\"invalid error signature\", \"value\", value);\n }\n params.name = parens[1].trim();\n if (params.name) {\n verifyIdentifier(params.name);\n }\n params.inputs = parseParams(parens[2], false);\n return checkForbidden(ErrorFragment2.fromObject(params));\n };\n ErrorFragment2.isErrorFragment = function(value) {\n return value && value._isFragment && value.type === \"error\";\n };\n return ErrorFragment2;\n }(Fragment)\n );\n exports3.ErrorFragment = ErrorFragment;\n function verifyType(type) {\n if (type.match(/^uint($|[^1-9])/)) {\n type = \"uint256\" + type.substring(4);\n } else if (type.match(/^int($|[^1-9])/)) {\n type = \"int256\" + type.substring(3);\n }\n return type;\n }\n var regexIdentifier = new RegExp(\"^[a-zA-Z$_][a-zA-Z0-9$_]*$\");\n function verifyIdentifier(value) {\n if (!value || !value.match(regexIdentifier)) {\n logger.throwArgumentError('invalid identifier \"' + value + '\"', \"value\", value);\n }\n return value;\n }\n var regexParen = new RegExp(\"^([^)(]*)\\\\((.*)\\\\)([^)(]*)$\");\n function splitNesting(value) {\n value = value.trim();\n var result = [];\n var accum = \"\";\n var depth = 0;\n for (var offset = 0; offset < value.length; offset++) {\n var c4 = value[offset];\n if (c4 === \",\" && depth === 0) {\n result.push(accum);\n accum = \"\";\n } else {\n accum += c4;\n if (c4 === \"(\") {\n depth++;\n } else if (c4 === \")\") {\n depth--;\n if (depth === -1) {\n logger.throwArgumentError(\"unbalanced parenthesis\", \"value\", value);\n }\n }\n }\n }\n if (accum) {\n result.push(accum);\n }\n return result;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js\n var require_abstract_coder = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Reader = exports3.Writer = exports3.Coder = exports3.checkResultErrors = void 0;\n var bytes_1 = require_lib2();\n var bignumber_1 = require_lib3();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n function checkResultErrors(result) {\n var errors = [];\n var checkErrors = function(path, object) {\n if (!Array.isArray(object)) {\n return;\n }\n for (var key in object) {\n var childPath = path.slice();\n childPath.push(key);\n try {\n checkErrors(childPath, object[key]);\n } catch (error) {\n errors.push({ path: childPath, error });\n }\n }\n };\n checkErrors([], result);\n return errors;\n }\n exports3.checkResultErrors = checkResultErrors;\n var Coder = (\n /** @class */\n function() {\n function Coder2(name, type, localName, dynamic) {\n this.name = name;\n this.type = type;\n this.localName = localName;\n this.dynamic = dynamic;\n }\n Coder2.prototype._throwError = function(message, value) {\n logger.throwArgumentError(message, this.localName, value);\n };\n return Coder2;\n }()\n );\n exports3.Coder = Coder;\n var Writer = (\n /** @class */\n function() {\n function Writer2(wordSize) {\n (0, properties_1.defineReadOnly)(this, \"wordSize\", wordSize || 32);\n this._data = [];\n this._dataLength = 0;\n this._padding = new Uint8Array(wordSize);\n }\n Object.defineProperty(Writer2.prototype, \"data\", {\n get: function() {\n return (0, bytes_1.hexConcat)(this._data);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Writer2.prototype, \"length\", {\n get: function() {\n return this._dataLength;\n },\n enumerable: false,\n configurable: true\n });\n Writer2.prototype._writeData = function(data) {\n this._data.push(data);\n this._dataLength += data.length;\n return data.length;\n };\n Writer2.prototype.appendWriter = function(writer) {\n return this._writeData((0, bytes_1.concat)(writer._data));\n };\n Writer2.prototype.writeBytes = function(value) {\n var bytes = (0, bytes_1.arrayify)(value);\n var paddingOffset = bytes.length % this.wordSize;\n if (paddingOffset) {\n bytes = (0, bytes_1.concat)([bytes, this._padding.slice(paddingOffset)]);\n }\n return this._writeData(bytes);\n };\n Writer2.prototype._getValue = function(value) {\n var bytes = (0, bytes_1.arrayify)(bignumber_1.BigNumber.from(value));\n if (bytes.length > this.wordSize) {\n logger.throwError(\"value out-of-bounds\", logger_1.Logger.errors.BUFFER_OVERRUN, {\n length: this.wordSize,\n offset: bytes.length\n });\n }\n if (bytes.length % this.wordSize) {\n bytes = (0, bytes_1.concat)([this._padding.slice(bytes.length % this.wordSize), bytes]);\n }\n return bytes;\n };\n Writer2.prototype.writeValue = function(value) {\n return this._writeData(this._getValue(value));\n };\n Writer2.prototype.writeUpdatableValue = function() {\n var _this = this;\n var offset = this._data.length;\n this._data.push(this._padding);\n this._dataLength += this.wordSize;\n return function(value) {\n _this._data[offset] = _this._getValue(value);\n };\n };\n return Writer2;\n }()\n );\n exports3.Writer = Writer;\n var Reader = (\n /** @class */\n function() {\n function Reader2(data, wordSize, coerceFunc, allowLoose) {\n (0, properties_1.defineReadOnly)(this, \"_data\", (0, bytes_1.arrayify)(data));\n (0, properties_1.defineReadOnly)(this, \"wordSize\", wordSize || 32);\n (0, properties_1.defineReadOnly)(this, \"_coerceFunc\", coerceFunc);\n (0, properties_1.defineReadOnly)(this, \"allowLoose\", allowLoose);\n this._offset = 0;\n }\n Object.defineProperty(Reader2.prototype, \"data\", {\n get: function() {\n return (0, bytes_1.hexlify)(this._data);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Reader2.prototype, \"consumed\", {\n get: function() {\n return this._offset;\n },\n enumerable: false,\n configurable: true\n });\n Reader2.coerce = function(name, value) {\n var match = name.match(\"^u?int([0-9]+)$\");\n if (match && parseInt(match[1]) <= 48) {\n value = value.toNumber();\n }\n return value;\n };\n Reader2.prototype.coerce = function(name, value) {\n if (this._coerceFunc) {\n return this._coerceFunc(name, value);\n }\n return Reader2.coerce(name, value);\n };\n Reader2.prototype._peekBytes = function(offset, length, loose) {\n var alignedLength = Math.ceil(length / this.wordSize) * this.wordSize;\n if (this._offset + alignedLength > this._data.length) {\n if (this.allowLoose && loose && this._offset + length <= this._data.length) {\n alignedLength = length;\n } else {\n logger.throwError(\"data out-of-bounds\", logger_1.Logger.errors.BUFFER_OVERRUN, {\n length: this._data.length,\n offset: this._offset + alignedLength\n });\n }\n }\n return this._data.slice(this._offset, this._offset + alignedLength);\n };\n Reader2.prototype.subReader = function(offset) {\n return new Reader2(this._data.slice(this._offset + offset), this.wordSize, this._coerceFunc, this.allowLoose);\n };\n Reader2.prototype.readBytes = function(length, loose) {\n var bytes = this._peekBytes(0, length, !!loose);\n this._offset += bytes.length;\n return bytes.slice(0, length);\n };\n Reader2.prototype.readValue = function() {\n return bignumber_1.BigNumber.from(this.readBytes(this.wordSize));\n };\n return Reader2;\n }()\n );\n exports3.Reader = Reader;\n }\n });\n\n // ../../../node_modules/.pnpm/js-sha3@0.8.0/node_modules/js-sha3/src/sha3.js\n var require_sha3 = __commonJS({\n \"../../../node_modules/.pnpm/js-sha3@0.8.0/node_modules/js-sha3/src/sha3.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function() {\n \"use strict\";\n var INPUT_ERROR = \"input is invalid type\";\n var FINALIZE_ERROR = \"finalize already called\";\n var WINDOW = typeof window === \"object\";\n var root = WINDOW ? window : {};\n if (root.JS_SHA3_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === \"object\";\n var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process_exports === \"object\" && process_exports.versions && process_exports.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && typeof module === \"object\" && module.exports;\n var AMD = typeof define === \"function\" && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== \"undefined\";\n var HEX_CHARS = \"0123456789abcdef\".split(\"\");\n var SHAKE_PADDING = [31, 7936, 2031616, 520093696];\n var CSHAKE_PADDING = [4, 1024, 262144, 67108864];\n var KECCAK_PADDING = [1, 256, 65536, 16777216];\n var PADDING = [6, 1536, 393216, 100663296];\n var SHIFT = [0, 8, 16, 24];\n var RC = [\n 1,\n 0,\n 32898,\n 0,\n 32906,\n 2147483648,\n 2147516416,\n 2147483648,\n 32907,\n 0,\n 2147483649,\n 0,\n 2147516545,\n 2147483648,\n 32777,\n 2147483648,\n 138,\n 0,\n 136,\n 0,\n 2147516425,\n 0,\n 2147483658,\n 0,\n 2147516555,\n 0,\n 139,\n 2147483648,\n 32905,\n 2147483648,\n 32771,\n 2147483648,\n 32770,\n 2147483648,\n 128,\n 2147483648,\n 32778,\n 0,\n 2147483658,\n 2147483648,\n 2147516545,\n 2147483648,\n 32896,\n 2147483648,\n 2147483649,\n 0,\n 2147516424,\n 2147483648\n ];\n var BITS = [224, 256, 384, 512];\n var SHAKE_BITS = [128, 256];\n var OUTPUT_TYPES = [\"hex\", \"buffer\", \"arrayBuffer\", \"array\", \"digest\"];\n var CSHAKE_BYTEPAD = {\n \"128\": 168,\n \"256\": 136\n };\n if (root.JS_SHA3_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function(obj) {\n return Object.prototype.toString.call(obj) === \"[object Array]\";\n };\n }\n if (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function(obj) {\n return typeof obj === \"object\" && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n var createOutputMethod = function(bits2, padding, outputType) {\n return function(message) {\n return new Keccak2(bits2, padding, bits2).update(message)[outputType]();\n };\n };\n var createShakeOutputMethod = function(bits2, padding, outputType) {\n return function(message, outputBits) {\n return new Keccak2(bits2, padding, outputBits).update(message)[outputType]();\n };\n };\n var createCshakeOutputMethod = function(bits2, padding, outputType) {\n return function(message, outputBits, n2, s4) {\n return methods[\"cshake\" + bits2].update(message, outputBits, n2, s4)[outputType]();\n };\n };\n var createKmacOutputMethod = function(bits2, padding, outputType) {\n return function(key, message, outputBits, s4) {\n return methods[\"kmac\" + bits2].update(key, message, outputBits, s4)[outputType]();\n };\n };\n var createOutputMethods = function(method, createMethod2, bits2, padding) {\n for (var i4 = 0; i4 < OUTPUT_TYPES.length; ++i4) {\n var type = OUTPUT_TYPES[i4];\n method[type] = createMethod2(bits2, padding, type);\n }\n return method;\n };\n var createMethod = function(bits2, padding) {\n var method = createOutputMethod(bits2, padding, \"hex\");\n method.create = function() {\n return new Keccak2(bits2, padding, bits2);\n };\n method.update = function(message) {\n return method.create().update(message);\n };\n return createOutputMethods(method, createOutputMethod, bits2, padding);\n };\n var createShakeMethod = function(bits2, padding) {\n var method = createShakeOutputMethod(bits2, padding, \"hex\");\n method.create = function(outputBits) {\n return new Keccak2(bits2, padding, outputBits);\n };\n method.update = function(message, outputBits) {\n return method.create(outputBits).update(message);\n };\n return createOutputMethods(method, createShakeOutputMethod, bits2, padding);\n };\n var createCshakeMethod = function(bits2, padding) {\n var w3 = CSHAKE_BYTEPAD[bits2];\n var method = createCshakeOutputMethod(bits2, padding, \"hex\");\n method.create = function(outputBits, n2, s4) {\n if (!n2 && !s4) {\n return methods[\"shake\" + bits2].create(outputBits);\n } else {\n return new Keccak2(bits2, padding, outputBits).bytepad([n2, s4], w3);\n }\n };\n method.update = function(message, outputBits, n2, s4) {\n return method.create(outputBits, n2, s4).update(message);\n };\n return createOutputMethods(method, createCshakeOutputMethod, bits2, padding);\n };\n var createKmacMethod = function(bits2, padding) {\n var w3 = CSHAKE_BYTEPAD[bits2];\n var method = createKmacOutputMethod(bits2, padding, \"hex\");\n method.create = function(key, outputBits, s4) {\n return new Kmac(bits2, padding, outputBits).bytepad([\"KMAC\", s4], w3).bytepad([key], w3);\n };\n method.update = function(key, message, outputBits, s4) {\n return method.create(key, outputBits, s4).update(message);\n };\n return createOutputMethods(method, createKmacOutputMethod, bits2, padding);\n };\n var algorithms = [\n { name: \"keccak\", padding: KECCAK_PADDING, bits: BITS, createMethod },\n { name: \"sha3\", padding: PADDING, bits: BITS, createMethod },\n { name: \"shake\", padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod },\n { name: \"cshake\", padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod },\n { name: \"kmac\", padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod }\n ];\n var methods = {}, methodNames = [];\n for (var i3 = 0; i3 < algorithms.length; ++i3) {\n var algorithm = algorithms[i3];\n var bits = algorithm.bits;\n for (var j2 = 0; j2 < bits.length; ++j2) {\n var methodName = algorithm.name + \"_\" + bits[j2];\n methodNames.push(methodName);\n methods[methodName] = algorithm.createMethod(bits[j2], algorithm.padding);\n if (algorithm.name !== \"sha3\") {\n var newMethodName = algorithm.name + bits[j2];\n methodNames.push(newMethodName);\n methods[newMethodName] = methods[methodName];\n }\n }\n }\n function Keccak2(bits2, padding, outputBits) {\n this.blocks = [];\n this.s = [];\n this.padding = padding;\n this.outputBits = outputBits;\n this.reset = true;\n this.finalized = false;\n this.block = 0;\n this.start = 0;\n this.blockCount = 1600 - (bits2 << 1) >> 5;\n this.byteCount = this.blockCount << 2;\n this.outputBlocks = outputBits >> 5;\n this.extraBytes = (outputBits & 31) >> 3;\n for (var i4 = 0; i4 < 50; ++i4) {\n this.s[i4] = 0;\n }\n }\n Keccak2.prototype.update = function(message) {\n if (this.finalized) {\n throw new Error(FINALIZE_ERROR);\n }\n var notString, type = typeof message;\n if (type !== \"string\") {\n if (type === \"object\") {\n if (message === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var blocks = this.blocks, byteCount = this.byteCount, length = message.length, blockCount = this.blockCount, index2 = 0, s4 = this.s, i4, code;\n while (index2 < length) {\n if (this.reset) {\n this.reset = false;\n blocks[0] = this.block;\n for (i4 = 1; i4 < blockCount + 1; ++i4) {\n blocks[i4] = 0;\n }\n }\n if (notString) {\n for (i4 = this.start; index2 < length && i4 < byteCount; ++index2) {\n blocks[i4 >> 2] |= message[index2] << SHIFT[i4++ & 3];\n }\n } else {\n for (i4 = this.start; index2 < length && i4 < byteCount; ++index2) {\n code = message.charCodeAt(index2);\n if (code < 128) {\n blocks[i4 >> 2] |= code << SHIFT[i4++ & 3];\n } else if (code < 2048) {\n blocks[i4 >> 2] |= (192 | code >> 6) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code & 63) << SHIFT[i4++ & 3];\n } else if (code < 55296 || code >= 57344) {\n blocks[i4 >> 2] |= (224 | code >> 12) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code >> 6 & 63) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code & 63) << SHIFT[i4++ & 3];\n } else {\n code = 65536 + ((code & 1023) << 10 | message.charCodeAt(++index2) & 1023);\n blocks[i4 >> 2] |= (240 | code >> 18) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code >> 12 & 63) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code >> 6 & 63) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code & 63) << SHIFT[i4++ & 3];\n }\n }\n }\n this.lastByteIndex = i4;\n if (i4 >= byteCount) {\n this.start = i4 - byteCount;\n this.block = blocks[blockCount];\n for (i4 = 0; i4 < blockCount; ++i4) {\n s4[i4] ^= blocks[i4];\n }\n f7(s4);\n this.reset = true;\n } else {\n this.start = i4;\n }\n }\n return this;\n };\n Keccak2.prototype.encode = function(x4, right) {\n var o5 = x4 & 255, n2 = 1;\n var bytes = [o5];\n x4 = x4 >> 8;\n o5 = x4 & 255;\n while (o5 > 0) {\n bytes.unshift(o5);\n x4 = x4 >> 8;\n o5 = x4 & 255;\n ++n2;\n }\n if (right) {\n bytes.push(n2);\n } else {\n bytes.unshift(n2);\n }\n this.update(bytes);\n return bytes.length;\n };\n Keccak2.prototype.encodeString = function(str) {\n var notString, type = typeof str;\n if (type !== \"string\") {\n if (type === \"object\") {\n if (str === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && str.constructor === ArrayBuffer) {\n str = new Uint8Array(str);\n } else if (!Array.isArray(str)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(str)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var bytes = 0, length = str.length;\n if (notString) {\n bytes = length;\n } else {\n for (var i4 = 0; i4 < str.length; ++i4) {\n var code = str.charCodeAt(i4);\n if (code < 128) {\n bytes += 1;\n } else if (code < 2048) {\n bytes += 2;\n } else if (code < 55296 || code >= 57344) {\n bytes += 3;\n } else {\n code = 65536 + ((code & 1023) << 10 | str.charCodeAt(++i4) & 1023);\n bytes += 4;\n }\n }\n }\n bytes += this.encode(bytes * 8);\n this.update(str);\n return bytes;\n };\n Keccak2.prototype.bytepad = function(strs, w3) {\n var bytes = this.encode(w3);\n for (var i4 = 0; i4 < strs.length; ++i4) {\n bytes += this.encodeString(strs[i4]);\n }\n var paddingBytes = w3 - bytes % w3;\n var zeros = [];\n zeros.length = paddingBytes;\n this.update(zeros);\n return this;\n };\n Keccak2.prototype.finalize = function() {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i4 = this.lastByteIndex, blockCount = this.blockCount, s4 = this.s;\n blocks[i4 >> 2] |= this.padding[i4 & 3];\n if (this.lastByteIndex === this.byteCount) {\n blocks[0] = blocks[blockCount];\n for (i4 = 1; i4 < blockCount + 1; ++i4) {\n blocks[i4] = 0;\n }\n }\n blocks[blockCount - 1] |= 2147483648;\n for (i4 = 0; i4 < blockCount; ++i4) {\n s4[i4] ^= blocks[i4];\n }\n f7(s4);\n };\n Keccak2.prototype.toString = Keccak2.prototype.hex = function() {\n this.finalize();\n var blockCount = this.blockCount, s4 = this.s, outputBlocks = this.outputBlocks, extraBytes = this.extraBytes, i4 = 0, j3 = 0;\n var hex = \"\", block;\n while (j3 < outputBlocks) {\n for (i4 = 0; i4 < blockCount && j3 < outputBlocks; ++i4, ++j3) {\n block = s4[i4];\n hex += HEX_CHARS[block >> 4 & 15] + HEX_CHARS[block & 15] + HEX_CHARS[block >> 12 & 15] + HEX_CHARS[block >> 8 & 15] + HEX_CHARS[block >> 20 & 15] + HEX_CHARS[block >> 16 & 15] + HEX_CHARS[block >> 28 & 15] + HEX_CHARS[block >> 24 & 15];\n }\n if (j3 % blockCount === 0) {\n f7(s4);\n i4 = 0;\n }\n }\n if (extraBytes) {\n block = s4[i4];\n hex += HEX_CHARS[block >> 4 & 15] + HEX_CHARS[block & 15];\n if (extraBytes > 1) {\n hex += HEX_CHARS[block >> 12 & 15] + HEX_CHARS[block >> 8 & 15];\n }\n if (extraBytes > 2) {\n hex += HEX_CHARS[block >> 20 & 15] + HEX_CHARS[block >> 16 & 15];\n }\n }\n return hex;\n };\n Keccak2.prototype.arrayBuffer = function() {\n this.finalize();\n var blockCount = this.blockCount, s4 = this.s, outputBlocks = this.outputBlocks, extraBytes = this.extraBytes, i4 = 0, j3 = 0;\n var bytes = this.outputBits >> 3;\n var buffer2;\n if (extraBytes) {\n buffer2 = new ArrayBuffer(outputBlocks + 1 << 2);\n } else {\n buffer2 = new ArrayBuffer(bytes);\n }\n var array = new Uint32Array(buffer2);\n while (j3 < outputBlocks) {\n for (i4 = 0; i4 < blockCount && j3 < outputBlocks; ++i4, ++j3) {\n array[j3] = s4[i4];\n }\n if (j3 % blockCount === 0) {\n f7(s4);\n }\n }\n if (extraBytes) {\n array[i4] = s4[i4];\n buffer2 = buffer2.slice(0, bytes);\n }\n return buffer2;\n };\n Keccak2.prototype.buffer = Keccak2.prototype.arrayBuffer;\n Keccak2.prototype.digest = Keccak2.prototype.array = function() {\n this.finalize();\n var blockCount = this.blockCount, s4 = this.s, outputBlocks = this.outputBlocks, extraBytes = this.extraBytes, i4 = 0, j3 = 0;\n var array = [], offset, block;\n while (j3 < outputBlocks) {\n for (i4 = 0; i4 < blockCount && j3 < outputBlocks; ++i4, ++j3) {\n offset = j3 << 2;\n block = s4[i4];\n array[offset] = block & 255;\n array[offset + 1] = block >> 8 & 255;\n array[offset + 2] = block >> 16 & 255;\n array[offset + 3] = block >> 24 & 255;\n }\n if (j3 % blockCount === 0) {\n f7(s4);\n }\n }\n if (extraBytes) {\n offset = j3 << 2;\n block = s4[i4];\n array[offset] = block & 255;\n if (extraBytes > 1) {\n array[offset + 1] = block >> 8 & 255;\n }\n if (extraBytes > 2) {\n array[offset + 2] = block >> 16 & 255;\n }\n }\n return array;\n };\n function Kmac(bits2, padding, outputBits) {\n Keccak2.call(this, bits2, padding, outputBits);\n }\n Kmac.prototype = new Keccak2();\n Kmac.prototype.finalize = function() {\n this.encode(this.outputBits, true);\n return Keccak2.prototype.finalize.call(this);\n };\n var f7 = function(s4) {\n var h4, l6, n2, c0, c1, c22, c32, c4, c5, c6, c7, c8, c9, b0, b1, b22, b32, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b222, b23, b24, b25, b26, b27, b28, b29, b30, b31, b322, b33, b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49;\n for (n2 = 0; n2 < 48; n2 += 2) {\n c0 = s4[0] ^ s4[10] ^ s4[20] ^ s4[30] ^ s4[40];\n c1 = s4[1] ^ s4[11] ^ s4[21] ^ s4[31] ^ s4[41];\n c22 = s4[2] ^ s4[12] ^ s4[22] ^ s4[32] ^ s4[42];\n c32 = s4[3] ^ s4[13] ^ s4[23] ^ s4[33] ^ s4[43];\n c4 = s4[4] ^ s4[14] ^ s4[24] ^ s4[34] ^ s4[44];\n c5 = s4[5] ^ s4[15] ^ s4[25] ^ s4[35] ^ s4[45];\n c6 = s4[6] ^ s4[16] ^ s4[26] ^ s4[36] ^ s4[46];\n c7 = s4[7] ^ s4[17] ^ s4[27] ^ s4[37] ^ s4[47];\n c8 = s4[8] ^ s4[18] ^ s4[28] ^ s4[38] ^ s4[48];\n c9 = s4[9] ^ s4[19] ^ s4[29] ^ s4[39] ^ s4[49];\n h4 = c8 ^ (c22 << 1 | c32 >>> 31);\n l6 = c9 ^ (c32 << 1 | c22 >>> 31);\n s4[0] ^= h4;\n s4[1] ^= l6;\n s4[10] ^= h4;\n s4[11] ^= l6;\n s4[20] ^= h4;\n s4[21] ^= l6;\n s4[30] ^= h4;\n s4[31] ^= l6;\n s4[40] ^= h4;\n s4[41] ^= l6;\n h4 = c0 ^ (c4 << 1 | c5 >>> 31);\n l6 = c1 ^ (c5 << 1 | c4 >>> 31);\n s4[2] ^= h4;\n s4[3] ^= l6;\n s4[12] ^= h4;\n s4[13] ^= l6;\n s4[22] ^= h4;\n s4[23] ^= l6;\n s4[32] ^= h4;\n s4[33] ^= l6;\n s4[42] ^= h4;\n s4[43] ^= l6;\n h4 = c22 ^ (c6 << 1 | c7 >>> 31);\n l6 = c32 ^ (c7 << 1 | c6 >>> 31);\n s4[4] ^= h4;\n s4[5] ^= l6;\n s4[14] ^= h4;\n s4[15] ^= l6;\n s4[24] ^= h4;\n s4[25] ^= l6;\n s4[34] ^= h4;\n s4[35] ^= l6;\n s4[44] ^= h4;\n s4[45] ^= l6;\n h4 = c4 ^ (c8 << 1 | c9 >>> 31);\n l6 = c5 ^ (c9 << 1 | c8 >>> 31);\n s4[6] ^= h4;\n s4[7] ^= l6;\n s4[16] ^= h4;\n s4[17] ^= l6;\n s4[26] ^= h4;\n s4[27] ^= l6;\n s4[36] ^= h4;\n s4[37] ^= l6;\n s4[46] ^= h4;\n s4[47] ^= l6;\n h4 = c6 ^ (c0 << 1 | c1 >>> 31);\n l6 = c7 ^ (c1 << 1 | c0 >>> 31);\n s4[8] ^= h4;\n s4[9] ^= l6;\n s4[18] ^= h4;\n s4[19] ^= l6;\n s4[28] ^= h4;\n s4[29] ^= l6;\n s4[38] ^= h4;\n s4[39] ^= l6;\n s4[48] ^= h4;\n s4[49] ^= l6;\n b0 = s4[0];\n b1 = s4[1];\n b322 = s4[11] << 4 | s4[10] >>> 28;\n b33 = s4[10] << 4 | s4[11] >>> 28;\n b14 = s4[20] << 3 | s4[21] >>> 29;\n b15 = s4[21] << 3 | s4[20] >>> 29;\n b46 = s4[31] << 9 | s4[30] >>> 23;\n b47 = s4[30] << 9 | s4[31] >>> 23;\n b28 = s4[40] << 18 | s4[41] >>> 14;\n b29 = s4[41] << 18 | s4[40] >>> 14;\n b20 = s4[2] << 1 | s4[3] >>> 31;\n b21 = s4[3] << 1 | s4[2] >>> 31;\n b22 = s4[13] << 12 | s4[12] >>> 20;\n b32 = s4[12] << 12 | s4[13] >>> 20;\n b34 = s4[22] << 10 | s4[23] >>> 22;\n b35 = s4[23] << 10 | s4[22] >>> 22;\n b16 = s4[33] << 13 | s4[32] >>> 19;\n b17 = s4[32] << 13 | s4[33] >>> 19;\n b48 = s4[42] << 2 | s4[43] >>> 30;\n b49 = s4[43] << 2 | s4[42] >>> 30;\n b40 = s4[5] << 30 | s4[4] >>> 2;\n b41 = s4[4] << 30 | s4[5] >>> 2;\n b222 = s4[14] << 6 | s4[15] >>> 26;\n b23 = s4[15] << 6 | s4[14] >>> 26;\n b4 = s4[25] << 11 | s4[24] >>> 21;\n b5 = s4[24] << 11 | s4[25] >>> 21;\n b36 = s4[34] << 15 | s4[35] >>> 17;\n b37 = s4[35] << 15 | s4[34] >>> 17;\n b18 = s4[45] << 29 | s4[44] >>> 3;\n b19 = s4[44] << 29 | s4[45] >>> 3;\n b10 = s4[6] << 28 | s4[7] >>> 4;\n b11 = s4[7] << 28 | s4[6] >>> 4;\n b42 = s4[17] << 23 | s4[16] >>> 9;\n b43 = s4[16] << 23 | s4[17] >>> 9;\n b24 = s4[26] << 25 | s4[27] >>> 7;\n b25 = s4[27] << 25 | s4[26] >>> 7;\n b6 = s4[36] << 21 | s4[37] >>> 11;\n b7 = s4[37] << 21 | s4[36] >>> 11;\n b38 = s4[47] << 24 | s4[46] >>> 8;\n b39 = s4[46] << 24 | s4[47] >>> 8;\n b30 = s4[8] << 27 | s4[9] >>> 5;\n b31 = s4[9] << 27 | s4[8] >>> 5;\n b12 = s4[18] << 20 | s4[19] >>> 12;\n b13 = s4[19] << 20 | s4[18] >>> 12;\n b44 = s4[29] << 7 | s4[28] >>> 25;\n b45 = s4[28] << 7 | s4[29] >>> 25;\n b26 = s4[38] << 8 | s4[39] >>> 24;\n b27 = s4[39] << 8 | s4[38] >>> 24;\n b8 = s4[48] << 14 | s4[49] >>> 18;\n b9 = s4[49] << 14 | s4[48] >>> 18;\n s4[0] = b0 ^ ~b22 & b4;\n s4[1] = b1 ^ ~b32 & b5;\n s4[10] = b10 ^ ~b12 & b14;\n s4[11] = b11 ^ ~b13 & b15;\n s4[20] = b20 ^ ~b222 & b24;\n s4[21] = b21 ^ ~b23 & b25;\n s4[30] = b30 ^ ~b322 & b34;\n s4[31] = b31 ^ ~b33 & b35;\n s4[40] = b40 ^ ~b42 & b44;\n s4[41] = b41 ^ ~b43 & b45;\n s4[2] = b22 ^ ~b4 & b6;\n s4[3] = b32 ^ ~b5 & b7;\n s4[12] = b12 ^ ~b14 & b16;\n s4[13] = b13 ^ ~b15 & b17;\n s4[22] = b222 ^ ~b24 & b26;\n s4[23] = b23 ^ ~b25 & b27;\n s4[32] = b322 ^ ~b34 & b36;\n s4[33] = b33 ^ ~b35 & b37;\n s4[42] = b42 ^ ~b44 & b46;\n s4[43] = b43 ^ ~b45 & b47;\n s4[4] = b4 ^ ~b6 & b8;\n s4[5] = b5 ^ ~b7 & b9;\n s4[14] = b14 ^ ~b16 & b18;\n s4[15] = b15 ^ ~b17 & b19;\n s4[24] = b24 ^ ~b26 & b28;\n s4[25] = b25 ^ ~b27 & b29;\n s4[34] = b34 ^ ~b36 & b38;\n s4[35] = b35 ^ ~b37 & b39;\n s4[44] = b44 ^ ~b46 & b48;\n s4[45] = b45 ^ ~b47 & b49;\n s4[6] = b6 ^ ~b8 & b0;\n s4[7] = b7 ^ ~b9 & b1;\n s4[16] = b16 ^ ~b18 & b10;\n s4[17] = b17 ^ ~b19 & b11;\n s4[26] = b26 ^ ~b28 & b20;\n s4[27] = b27 ^ ~b29 & b21;\n s4[36] = b36 ^ ~b38 & b30;\n s4[37] = b37 ^ ~b39 & b31;\n s4[46] = b46 ^ ~b48 & b40;\n s4[47] = b47 ^ ~b49 & b41;\n s4[8] = b8 ^ ~b0 & b22;\n s4[9] = b9 ^ ~b1 & b32;\n s4[18] = b18 ^ ~b10 & b12;\n s4[19] = b19 ^ ~b11 & b13;\n s4[28] = b28 ^ ~b20 & b222;\n s4[29] = b29 ^ ~b21 & b23;\n s4[38] = b38 ^ ~b30 & b322;\n s4[39] = b39 ^ ~b31 & b33;\n s4[48] = b48 ^ ~b40 & b42;\n s4[49] = b49 ^ ~b41 & b43;\n s4[0] ^= RC[n2];\n s4[1] ^= RC[n2 + 1];\n }\n };\n if (COMMON_JS) {\n module.exports = methods;\n } else {\n for (i3 = 0; i3 < methodNames.length; ++i3) {\n root[methodNames[i3]] = methods[methodNames[i3]];\n }\n if (AMD) {\n define(function() {\n return methods;\n });\n }\n }\n })();\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+keccak256@5.8.0/node_modules/@ethersproject/keccak256/lib/index.js\n var require_lib5 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+keccak256@5.8.0/node_modules/@ethersproject/keccak256/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.keccak256 = void 0;\n var js_sha3_1 = __importDefault4(require_sha3());\n var bytes_1 = require_lib2();\n function keccak2563(data) {\n return \"0x\" + js_sha3_1.default.keccak_256((0, bytes_1.arrayify)(data));\n }\n exports3.keccak256 = keccak2563;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+rlp@5.8.0/node_modules/@ethersproject/rlp/lib/_version.js\n var require_version6 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+rlp@5.8.0/node_modules/@ethersproject/rlp/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"rlp/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+rlp@5.8.0/node_modules/@ethersproject/rlp/lib/index.js\n var require_lib6 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+rlp@5.8.0/node_modules/@ethersproject/rlp/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decode = exports3.encode = void 0;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version6();\n var logger = new logger_1.Logger(_version_1.version);\n function arrayifyInteger(value) {\n var result = [];\n while (value) {\n result.unshift(value & 255);\n value >>= 8;\n }\n return result;\n }\n function unarrayifyInteger(data, offset, length) {\n var result = 0;\n for (var i3 = 0; i3 < length; i3++) {\n result = result * 256 + data[offset + i3];\n }\n return result;\n }\n function _encode(object) {\n if (Array.isArray(object)) {\n var payload_1 = [];\n object.forEach(function(child) {\n payload_1 = payload_1.concat(_encode(child));\n });\n if (payload_1.length <= 55) {\n payload_1.unshift(192 + payload_1.length);\n return payload_1;\n }\n var length_1 = arrayifyInteger(payload_1.length);\n length_1.unshift(247 + length_1.length);\n return length_1.concat(payload_1);\n }\n if (!(0, bytes_1.isBytesLike)(object)) {\n logger.throwArgumentError(\"RLP object must be BytesLike\", \"object\", object);\n }\n var data = Array.prototype.slice.call((0, bytes_1.arrayify)(object));\n if (data.length === 1 && data[0] <= 127) {\n return data;\n } else if (data.length <= 55) {\n data.unshift(128 + data.length);\n return data;\n }\n var length = arrayifyInteger(data.length);\n length.unshift(183 + length.length);\n return length.concat(data);\n }\n function encode5(object) {\n return (0, bytes_1.hexlify)(_encode(object));\n }\n exports3.encode = encode5;\n function _decodeChildren(data, offset, childOffset, length) {\n var result = [];\n while (childOffset < offset + 1 + length) {\n var decoded = _decode(data, childOffset);\n result.push(decoded.result);\n childOffset += decoded.consumed;\n if (childOffset > offset + 1 + length) {\n logger.throwError(\"child data too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n }\n return { consumed: 1 + length, result };\n }\n function _decode(data, offset) {\n if (data.length === 0) {\n logger.throwError(\"data too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n if (data[offset] >= 248) {\n var lengthLength = data[offset] - 247;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data short segment too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n var length_2 = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length_2 > data.length) {\n logger.throwError(\"data long segment too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length_2);\n } else if (data[offset] >= 192) {\n var length_3 = data[offset] - 192;\n if (offset + 1 + length_3 > data.length) {\n logger.throwError(\"data array too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n return _decodeChildren(data, offset, offset + 1, length_3);\n } else if (data[offset] >= 184) {\n var lengthLength = data[offset] - 183;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data array too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n var length_4 = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length_4 > data.length) {\n logger.throwError(\"data array too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n var result = (0, bytes_1.hexlify)(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length_4));\n return { consumed: 1 + lengthLength + length_4, result };\n } else if (data[offset] >= 128) {\n var length_5 = data[offset] - 128;\n if (offset + 1 + length_5 > data.length) {\n logger.throwError(\"data too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n var result = (0, bytes_1.hexlify)(data.slice(offset + 1, offset + 1 + length_5));\n return { consumed: 1 + length_5, result };\n }\n return { consumed: 1, result: (0, bytes_1.hexlify)(data[offset]) };\n }\n function decode2(data) {\n var bytes = (0, bytes_1.arrayify)(data);\n var decoded = _decode(bytes, 0);\n if (decoded.consumed !== bytes.length) {\n logger.throwArgumentError(\"invalid rlp data\", \"data\", data);\n }\n return decoded.result;\n }\n exports3.decode = decode2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib/_version.js\n var require_version7 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"address/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib/index.js\n var require_lib7 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getCreate2Address = exports3.getContractAddress = exports3.getIcapAddress = exports3.isAddress = exports3.getAddress = void 0;\n var bytes_1 = require_lib2();\n var bignumber_1 = require_lib3();\n var keccak256_1 = require_lib5();\n var rlp_1 = require_lib6();\n var logger_1 = require_lib();\n var _version_1 = require_version7();\n var logger = new logger_1.Logger(_version_1.version);\n function getChecksumAddress(address) {\n if (!(0, bytes_1.isHexString)(address, 20)) {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n address = address.toLowerCase();\n var chars = address.substring(2).split(\"\");\n var expanded = new Uint8Array(40);\n for (var i4 = 0; i4 < 40; i4++) {\n expanded[i4] = chars[i4].charCodeAt(0);\n }\n var hashed = (0, bytes_1.arrayify)((0, keccak256_1.keccak256)(expanded));\n for (var i4 = 0; i4 < 40; i4 += 2) {\n if (hashed[i4 >> 1] >> 4 >= 8) {\n chars[i4] = chars[i4].toUpperCase();\n }\n if ((hashed[i4 >> 1] & 15) >= 8) {\n chars[i4 + 1] = chars[i4 + 1].toUpperCase();\n }\n }\n return \"0x\" + chars.join(\"\");\n }\n var MAX_SAFE_INTEGER = 9007199254740991;\n function log10(x4) {\n if (Math.log10) {\n return Math.log10(x4);\n }\n return Math.log(x4) / Math.LN10;\n }\n var ibanLookup = {};\n for (i3 = 0; i3 < 10; i3++) {\n ibanLookup[String(i3)] = String(i3);\n }\n var i3;\n for (i3 = 0; i3 < 26; i3++) {\n ibanLookup[String.fromCharCode(65 + i3)] = String(10 + i3);\n }\n var i3;\n var safeDigits = Math.floor(log10(MAX_SAFE_INTEGER));\n function ibanChecksum(address) {\n address = address.toUpperCase();\n address = address.substring(4) + address.substring(0, 2) + \"00\";\n var expanded = address.split(\"\").map(function(c4) {\n return ibanLookup[c4];\n }).join(\"\");\n while (expanded.length >= safeDigits) {\n var block = expanded.substring(0, safeDigits);\n expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);\n }\n var checksum4 = String(98 - parseInt(expanded, 10) % 97);\n while (checksum4.length < 2) {\n checksum4 = \"0\" + checksum4;\n }\n return checksum4;\n }\n function getAddress3(address) {\n var result = null;\n if (typeof address !== \"string\") {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {\n if (address.substring(0, 2) !== \"0x\") {\n address = \"0x\" + address;\n }\n result = getChecksumAddress(address);\n if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {\n logger.throwArgumentError(\"bad address checksum\", \"address\", address);\n }\n } else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {\n if (address.substring(2, 4) !== ibanChecksum(address)) {\n logger.throwArgumentError(\"bad icap checksum\", \"address\", address);\n }\n result = (0, bignumber_1._base36To16)(address.substring(4));\n while (result.length < 40) {\n result = \"0\" + result;\n }\n result = getChecksumAddress(\"0x\" + result);\n } else {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n return result;\n }\n exports3.getAddress = getAddress3;\n function isAddress2(address) {\n try {\n getAddress3(address);\n return true;\n } catch (error) {\n }\n return false;\n }\n exports3.isAddress = isAddress2;\n function getIcapAddress(address) {\n var base36 = (0, bignumber_1._base16To36)(getAddress3(address).substring(2)).toUpperCase();\n while (base36.length < 30) {\n base36 = \"0\" + base36;\n }\n return \"XE\" + ibanChecksum(\"XE00\" + base36) + base36;\n }\n exports3.getIcapAddress = getIcapAddress;\n function getContractAddress3(transaction) {\n var from14 = null;\n try {\n from14 = getAddress3(transaction.from);\n } catch (error) {\n logger.throwArgumentError(\"missing from address\", \"transaction\", transaction);\n }\n var nonce = (0, bytes_1.stripZeros)((0, bytes_1.arrayify)(bignumber_1.BigNumber.from(transaction.nonce).toHexString()));\n return getAddress3((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, rlp_1.encode)([from14, nonce])), 12));\n }\n exports3.getContractAddress = getContractAddress3;\n function getCreate2Address2(from14, salt, initCodeHash) {\n if ((0, bytes_1.hexDataLength)(salt) !== 32) {\n logger.throwArgumentError(\"salt must be 32 bytes\", \"salt\", salt);\n }\n if ((0, bytes_1.hexDataLength)(initCodeHash) !== 32) {\n logger.throwArgumentError(\"initCodeHash must be 32 bytes\", \"initCodeHash\", initCodeHash);\n }\n return getAddress3((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, bytes_1.concat)([\"0xff\", getAddress3(from14), salt, initCodeHash])), 12));\n }\n exports3.getCreate2Address = getCreate2Address2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/address.js\n var require_address = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AddressCoder = void 0;\n var address_1 = require_lib7();\n var bytes_1 = require_lib2();\n var abstract_coder_1 = require_abstract_coder();\n var AddressCoder = (\n /** @class */\n function(_super) {\n __extends4(AddressCoder2, _super);\n function AddressCoder2(localName) {\n return _super.call(this, \"address\", \"address\", localName, false) || this;\n }\n AddressCoder2.prototype.defaultValue = function() {\n return \"0x0000000000000000000000000000000000000000\";\n };\n AddressCoder2.prototype.encode = function(writer, value) {\n try {\n value = (0, address_1.getAddress)(value);\n } catch (error) {\n this._throwError(error.message, value);\n }\n return writer.writeValue(value);\n };\n AddressCoder2.prototype.decode = function(reader) {\n return (0, address_1.getAddress)((0, bytes_1.hexZeroPad)(reader.readValue().toHexString(), 20));\n };\n return AddressCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.AddressCoder = AddressCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/anonymous.js\n var require_anonymous = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/anonymous.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AnonymousCoder = void 0;\n var abstract_coder_1 = require_abstract_coder();\n var AnonymousCoder = (\n /** @class */\n function(_super) {\n __extends4(AnonymousCoder2, _super);\n function AnonymousCoder2(coder) {\n var _this = _super.call(this, coder.name, coder.type, void 0, coder.dynamic) || this;\n _this.coder = coder;\n return _this;\n }\n AnonymousCoder2.prototype.defaultValue = function() {\n return this.coder.defaultValue();\n };\n AnonymousCoder2.prototype.encode = function(writer, value) {\n return this.coder.encode(writer, value);\n };\n AnonymousCoder2.prototype.decode = function(reader) {\n return this.coder.decode(reader);\n };\n return AnonymousCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.AnonymousCoder = AnonymousCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/array.js\n var require_array = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/array.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ArrayCoder = exports3.unpack = exports3.pack = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n var abstract_coder_1 = require_abstract_coder();\n var anonymous_1 = require_anonymous();\n function pack(writer, coders, values) {\n var arrayValues = null;\n if (Array.isArray(values)) {\n arrayValues = values;\n } else if (values && typeof values === \"object\") {\n var unique_1 = {};\n arrayValues = coders.map(function(coder) {\n var name = coder.localName;\n if (!name) {\n logger.throwError(\"cannot encode object for signature with missing names\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"values\",\n coder,\n value: values\n });\n }\n if (unique_1[name]) {\n logger.throwError(\"cannot encode object for signature with duplicate names\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"values\",\n coder,\n value: values\n });\n }\n unique_1[name] = true;\n return values[name];\n });\n } else {\n logger.throwArgumentError(\"invalid tuple value\", \"tuple\", values);\n }\n if (coders.length !== arrayValues.length) {\n logger.throwArgumentError(\"types/value length mismatch\", \"tuple\", values);\n }\n var staticWriter = new abstract_coder_1.Writer(writer.wordSize);\n var dynamicWriter = new abstract_coder_1.Writer(writer.wordSize);\n var updateFuncs = [];\n coders.forEach(function(coder, index2) {\n var value = arrayValues[index2];\n if (coder.dynamic) {\n var dynamicOffset_1 = dynamicWriter.length;\n coder.encode(dynamicWriter, value);\n var updateFunc_1 = staticWriter.writeUpdatableValue();\n updateFuncs.push(function(baseOffset) {\n updateFunc_1(baseOffset + dynamicOffset_1);\n });\n } else {\n coder.encode(staticWriter, value);\n }\n });\n updateFuncs.forEach(function(func) {\n func(staticWriter.length);\n });\n var length = writer.appendWriter(staticWriter);\n length += writer.appendWriter(dynamicWriter);\n return length;\n }\n exports3.pack = pack;\n function unpack(reader, coders) {\n var values = [];\n var baseReader = reader.subReader(0);\n coders.forEach(function(coder) {\n var value = null;\n if (coder.dynamic) {\n var offset = reader.readValue();\n var offsetReader = baseReader.subReader(offset.toNumber());\n try {\n value = coder.decode(offsetReader);\n } catch (error) {\n if (error.code === logger_1.Logger.errors.BUFFER_OVERRUN) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n } else {\n try {\n value = coder.decode(reader);\n } catch (error) {\n if (error.code === logger_1.Logger.errors.BUFFER_OVERRUN) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n }\n if (value != void 0) {\n values.push(value);\n }\n });\n var uniqueNames = coders.reduce(function(accum, coder) {\n var name = coder.localName;\n if (name) {\n if (!accum[name]) {\n accum[name] = 0;\n }\n accum[name]++;\n }\n return accum;\n }, {});\n coders.forEach(function(coder, index2) {\n var name = coder.localName;\n if (!name || uniqueNames[name] !== 1) {\n return;\n }\n if (name === \"length\") {\n name = \"_length\";\n }\n if (values[name] != null) {\n return;\n }\n var value = values[index2];\n if (value instanceof Error) {\n Object.defineProperty(values, name, {\n enumerable: true,\n get: function() {\n throw value;\n }\n });\n } else {\n values[name] = value;\n }\n });\n var _loop_1 = function(i4) {\n var value = values[i4];\n if (value instanceof Error) {\n Object.defineProperty(values, i4, {\n enumerable: true,\n get: function() {\n throw value;\n }\n });\n }\n };\n for (var i3 = 0; i3 < values.length; i3++) {\n _loop_1(i3);\n }\n return Object.freeze(values);\n }\n exports3.unpack = unpack;\n var ArrayCoder = (\n /** @class */\n function(_super) {\n __extends4(ArrayCoder2, _super);\n function ArrayCoder2(coder, length, localName) {\n var _this = this;\n var type = coder.type + \"[\" + (length >= 0 ? length : \"\") + \"]\";\n var dynamic = length === -1 || coder.dynamic;\n _this = _super.call(this, \"array\", type, localName, dynamic) || this;\n _this.coder = coder;\n _this.length = length;\n return _this;\n }\n ArrayCoder2.prototype.defaultValue = function() {\n var defaultChild = this.coder.defaultValue();\n var result = [];\n for (var i3 = 0; i3 < this.length; i3++) {\n result.push(defaultChild);\n }\n return result;\n };\n ArrayCoder2.prototype.encode = function(writer, value) {\n if (!Array.isArray(value)) {\n this._throwError(\"expected array value\", value);\n }\n var count = this.length;\n if (count === -1) {\n count = value.length;\n writer.writeValue(value.length);\n }\n logger.checkArgumentCount(value.length, count, \"coder array\" + (this.localName ? \" \" + this.localName : \"\"));\n var coders = [];\n for (var i3 = 0; i3 < value.length; i3++) {\n coders.push(this.coder);\n }\n return pack(writer, coders, value);\n };\n ArrayCoder2.prototype.decode = function(reader) {\n var count = this.length;\n if (count === -1) {\n count = reader.readValue().toNumber();\n if (count * 32 > reader._data.length) {\n logger.throwError(\"insufficient data length\", logger_1.Logger.errors.BUFFER_OVERRUN, {\n length: reader._data.length,\n count\n });\n }\n }\n var coders = [];\n for (var i3 = 0; i3 < count; i3++) {\n coders.push(new anonymous_1.AnonymousCoder(this.coder));\n }\n return reader.coerce(this.name, unpack(reader, coders));\n };\n return ArrayCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.ArrayCoder = ArrayCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/boolean.js\n var require_boolean = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/boolean.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BooleanCoder = void 0;\n var abstract_coder_1 = require_abstract_coder();\n var BooleanCoder = (\n /** @class */\n function(_super) {\n __extends4(BooleanCoder2, _super);\n function BooleanCoder2(localName) {\n return _super.call(this, \"bool\", \"bool\", localName, false) || this;\n }\n BooleanCoder2.prototype.defaultValue = function() {\n return false;\n };\n BooleanCoder2.prototype.encode = function(writer, value) {\n return writer.writeValue(value ? 1 : 0);\n };\n BooleanCoder2.prototype.decode = function(reader) {\n return reader.coerce(this.type, !reader.readValue().isZero());\n };\n return BooleanCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.BooleanCoder = BooleanCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/bytes.js\n var require_bytes = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/bytes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BytesCoder = exports3.DynamicBytesCoder = void 0;\n var bytes_1 = require_lib2();\n var abstract_coder_1 = require_abstract_coder();\n var DynamicBytesCoder = (\n /** @class */\n function(_super) {\n __extends4(DynamicBytesCoder2, _super);\n function DynamicBytesCoder2(type, localName) {\n return _super.call(this, type, type, localName, true) || this;\n }\n DynamicBytesCoder2.prototype.defaultValue = function() {\n return \"0x\";\n };\n DynamicBytesCoder2.prototype.encode = function(writer, value) {\n value = (0, bytes_1.arrayify)(value);\n var length = writer.writeValue(value.length);\n length += writer.writeBytes(value);\n return length;\n };\n DynamicBytesCoder2.prototype.decode = function(reader) {\n return reader.readBytes(reader.readValue().toNumber(), true);\n };\n return DynamicBytesCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.DynamicBytesCoder = DynamicBytesCoder;\n var BytesCoder = (\n /** @class */\n function(_super) {\n __extends4(BytesCoder2, _super);\n function BytesCoder2(localName) {\n return _super.call(this, \"bytes\", localName) || this;\n }\n BytesCoder2.prototype.decode = function(reader) {\n return reader.coerce(this.name, (0, bytes_1.hexlify)(_super.prototype.decode.call(this, reader)));\n };\n return BytesCoder2;\n }(DynamicBytesCoder)\n );\n exports3.BytesCoder = BytesCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js\n var require_fixed_bytes = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FixedBytesCoder = void 0;\n var bytes_1 = require_lib2();\n var abstract_coder_1 = require_abstract_coder();\n var FixedBytesCoder = (\n /** @class */\n function(_super) {\n __extends4(FixedBytesCoder2, _super);\n function FixedBytesCoder2(size6, localName) {\n var _this = this;\n var name = \"bytes\" + String(size6);\n _this = _super.call(this, name, name, localName, false) || this;\n _this.size = size6;\n return _this;\n }\n FixedBytesCoder2.prototype.defaultValue = function() {\n return \"0x0000000000000000000000000000000000000000000000000000000000000000\".substring(0, 2 + this.size * 2);\n };\n FixedBytesCoder2.prototype.encode = function(writer, value) {\n var data = (0, bytes_1.arrayify)(value);\n if (data.length !== this.size) {\n this._throwError(\"incorrect data length\", value);\n }\n return writer.writeBytes(data);\n };\n FixedBytesCoder2.prototype.decode = function(reader) {\n return reader.coerce(this.name, (0, bytes_1.hexlify)(reader.readBytes(this.size)));\n };\n return FixedBytesCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.FixedBytesCoder = FixedBytesCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/null.js\n var require_null = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/null.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NullCoder = void 0;\n var abstract_coder_1 = require_abstract_coder();\n var NullCoder = (\n /** @class */\n function(_super) {\n __extends4(NullCoder2, _super);\n function NullCoder2(localName) {\n return _super.call(this, \"null\", \"\", localName, false) || this;\n }\n NullCoder2.prototype.defaultValue = function() {\n return null;\n };\n NullCoder2.prototype.encode = function(writer, value) {\n if (value != null) {\n this._throwError(\"not null\", value);\n }\n return writer.writeBytes([]);\n };\n NullCoder2.prototype.decode = function(reader) {\n reader.readBytes(0);\n return reader.coerce(this.name, null);\n };\n return NullCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.NullCoder = NullCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/addresses.js\n var require_addresses = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/addresses.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AddressZero = void 0;\n exports3.AddressZero = \"0x0000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/bignumbers.js\n var require_bignumbers = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/bignumbers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.Two = exports3.One = exports3.Zero = exports3.NegativeOne = void 0;\n var bignumber_1 = require_lib3();\n var NegativeOne = /* @__PURE__ */ bignumber_1.BigNumber.from(-1);\n exports3.NegativeOne = NegativeOne;\n var Zero = /* @__PURE__ */ bignumber_1.BigNumber.from(0);\n exports3.Zero = Zero;\n var One = /* @__PURE__ */ bignumber_1.BigNumber.from(1);\n exports3.One = One;\n var Two = /* @__PURE__ */ bignumber_1.BigNumber.from(2);\n exports3.Two = Two;\n var WeiPerEther = /* @__PURE__ */ bignumber_1.BigNumber.from(\"1000000000000000000\");\n exports3.WeiPerEther = WeiPerEther;\n var MaxUint256 = /* @__PURE__ */ bignumber_1.BigNumber.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n exports3.MaxUint256 = MaxUint256;\n var MinInt256 = /* @__PURE__ */ bignumber_1.BigNumber.from(\"-0x8000000000000000000000000000000000000000000000000000000000000000\");\n exports3.MinInt256 = MinInt256;\n var MaxInt256 = /* @__PURE__ */ bignumber_1.BigNumber.from(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n exports3.MaxInt256 = MaxInt256;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/hashes.js\n var require_hashes = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/hashes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.HashZero = void 0;\n exports3.HashZero = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/strings.js\n var require_strings = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/strings.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EtherSymbol = void 0;\n exports3.EtherSymbol = \"\\u039E\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/index.js\n var require_lib8 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EtherSymbol = exports3.HashZero = exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.Two = exports3.One = exports3.Zero = exports3.NegativeOne = exports3.AddressZero = void 0;\n var addresses_1 = require_addresses();\n Object.defineProperty(exports3, \"AddressZero\", { enumerable: true, get: function() {\n return addresses_1.AddressZero;\n } });\n var bignumbers_1 = require_bignumbers();\n Object.defineProperty(exports3, \"NegativeOne\", { enumerable: true, get: function() {\n return bignumbers_1.NegativeOne;\n } });\n Object.defineProperty(exports3, \"Zero\", { enumerable: true, get: function() {\n return bignumbers_1.Zero;\n } });\n Object.defineProperty(exports3, \"One\", { enumerable: true, get: function() {\n return bignumbers_1.One;\n } });\n Object.defineProperty(exports3, \"Two\", { enumerable: true, get: function() {\n return bignumbers_1.Two;\n } });\n Object.defineProperty(exports3, \"WeiPerEther\", { enumerable: true, get: function() {\n return bignumbers_1.WeiPerEther;\n } });\n Object.defineProperty(exports3, \"MaxUint256\", { enumerable: true, get: function() {\n return bignumbers_1.MaxUint256;\n } });\n Object.defineProperty(exports3, \"MinInt256\", { enumerable: true, get: function() {\n return bignumbers_1.MinInt256;\n } });\n Object.defineProperty(exports3, \"MaxInt256\", { enumerable: true, get: function() {\n return bignumbers_1.MaxInt256;\n } });\n var hashes_1 = require_hashes();\n Object.defineProperty(exports3, \"HashZero\", { enumerable: true, get: function() {\n return hashes_1.HashZero;\n } });\n var strings_1 = require_strings();\n Object.defineProperty(exports3, \"EtherSymbol\", { enumerable: true, get: function() {\n return strings_1.EtherSymbol;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/number.js\n var require_number = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/number.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NumberCoder = void 0;\n var bignumber_1 = require_lib3();\n var constants_1 = require_lib8();\n var abstract_coder_1 = require_abstract_coder();\n var NumberCoder = (\n /** @class */\n function(_super) {\n __extends4(NumberCoder2, _super);\n function NumberCoder2(size6, signed, localName) {\n var _this = this;\n var name = (signed ? \"int\" : \"uint\") + size6 * 8;\n _this = _super.call(this, name, name, localName, false) || this;\n _this.size = size6;\n _this.signed = signed;\n return _this;\n }\n NumberCoder2.prototype.defaultValue = function() {\n return 0;\n };\n NumberCoder2.prototype.encode = function(writer, value) {\n var v2 = bignumber_1.BigNumber.from(value);\n var maxUintValue = constants_1.MaxUint256.mask(writer.wordSize * 8);\n if (this.signed) {\n var bounds = maxUintValue.mask(this.size * 8 - 1);\n if (v2.gt(bounds) || v2.lt(bounds.add(constants_1.One).mul(constants_1.NegativeOne))) {\n this._throwError(\"value out-of-bounds\", value);\n }\n } else if (v2.lt(constants_1.Zero) || v2.gt(maxUintValue.mask(this.size * 8))) {\n this._throwError(\"value out-of-bounds\", value);\n }\n v2 = v2.toTwos(this.size * 8).mask(this.size * 8);\n if (this.signed) {\n v2 = v2.fromTwos(this.size * 8).toTwos(8 * writer.wordSize);\n }\n return writer.writeValue(v2);\n };\n NumberCoder2.prototype.decode = function(reader) {\n var value = reader.readValue().mask(this.size * 8);\n if (this.signed) {\n value = value.fromTwos(this.size * 8);\n }\n return reader.coerce(this.name, value);\n };\n return NumberCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.NumberCoder = NumberCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/_version.js\n var require_version8 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"strings/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/utf8.js\n var require_utf8 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/utf8.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toUtf8CodePoints = exports3.toUtf8String = exports3._toUtf8String = exports3._toEscapedUtf8String = exports3.toUtf8Bytes = exports3.Utf8ErrorFuncs = exports3.Utf8ErrorReason = exports3.UnicodeNormalizationForm = void 0;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version8();\n var logger = new logger_1.Logger(_version_1.version);\n var UnicodeNormalizationForm;\n (function(UnicodeNormalizationForm2) {\n UnicodeNormalizationForm2[\"current\"] = \"\";\n UnicodeNormalizationForm2[\"NFC\"] = \"NFC\";\n UnicodeNormalizationForm2[\"NFD\"] = \"NFD\";\n UnicodeNormalizationForm2[\"NFKC\"] = \"NFKC\";\n UnicodeNormalizationForm2[\"NFKD\"] = \"NFKD\";\n })(UnicodeNormalizationForm = exports3.UnicodeNormalizationForm || (exports3.UnicodeNormalizationForm = {}));\n var Utf8ErrorReason;\n (function(Utf8ErrorReason2) {\n Utf8ErrorReason2[\"UNEXPECTED_CONTINUE\"] = \"unexpected continuation byte\";\n Utf8ErrorReason2[\"BAD_PREFIX\"] = \"bad codepoint prefix\";\n Utf8ErrorReason2[\"OVERRUN\"] = \"string overrun\";\n Utf8ErrorReason2[\"MISSING_CONTINUE\"] = \"missing continuation byte\";\n Utf8ErrorReason2[\"OUT_OF_RANGE\"] = \"out of UTF-8 range\";\n Utf8ErrorReason2[\"UTF16_SURROGATE\"] = \"UTF-16 surrogate\";\n Utf8ErrorReason2[\"OVERLONG\"] = \"overlong representation\";\n })(Utf8ErrorReason = exports3.Utf8ErrorReason || (exports3.Utf8ErrorReason = {}));\n function errorFunc(reason, offset, bytes, output, badCodepoint) {\n return logger.throwArgumentError(\"invalid codepoint at offset \" + offset + \"; \" + reason, \"bytes\", bytes);\n }\n function ignoreFunc(reason, offset, bytes, output, badCodepoint) {\n if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) {\n var i3 = 0;\n for (var o5 = offset + 1; o5 < bytes.length; o5++) {\n if (bytes[o5] >> 6 !== 2) {\n break;\n }\n i3++;\n }\n return i3;\n }\n if (reason === Utf8ErrorReason.OVERRUN) {\n return bytes.length - offset - 1;\n }\n return 0;\n }\n function replaceFunc(reason, offset, bytes, output, badCodepoint) {\n if (reason === Utf8ErrorReason.OVERLONG) {\n output.push(badCodepoint);\n return 0;\n }\n output.push(65533);\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n }\n exports3.Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n });\n function getUtf8CodePoints(bytes, onError) {\n if (onError == null) {\n onError = exports3.Utf8ErrorFuncs.error;\n }\n bytes = (0, bytes_1.arrayify)(bytes);\n var result = [];\n var i3 = 0;\n while (i3 < bytes.length) {\n var c4 = bytes[i3++];\n if (c4 >> 7 === 0) {\n result.push(c4);\n continue;\n }\n var extraLength = null;\n var overlongMask = null;\n if ((c4 & 224) === 192) {\n extraLength = 1;\n overlongMask = 127;\n } else if ((c4 & 240) === 224) {\n extraLength = 2;\n overlongMask = 2047;\n } else if ((c4 & 248) === 240) {\n extraLength = 3;\n overlongMask = 65535;\n } else {\n if ((c4 & 192) === 128) {\n i3 += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i3 - 1, bytes, result);\n } else {\n i3 += onError(Utf8ErrorReason.BAD_PREFIX, i3 - 1, bytes, result);\n }\n continue;\n }\n if (i3 - 1 + extraLength >= bytes.length) {\n i3 += onError(Utf8ErrorReason.OVERRUN, i3 - 1, bytes, result);\n continue;\n }\n var res = c4 & (1 << 8 - extraLength - 1) - 1;\n for (var j2 = 0; j2 < extraLength; j2++) {\n var nextChar = bytes[i3];\n if ((nextChar & 192) != 128) {\n i3 += onError(Utf8ErrorReason.MISSING_CONTINUE, i3, bytes, result);\n res = null;\n break;\n }\n ;\n res = res << 6 | nextChar & 63;\n i3++;\n }\n if (res === null) {\n continue;\n }\n if (res > 1114111) {\n i3 += onError(Utf8ErrorReason.OUT_OF_RANGE, i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res >= 55296 && res <= 57343) {\n i3 += onError(Utf8ErrorReason.UTF16_SURROGATE, i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res <= overlongMask) {\n i3 += onError(Utf8ErrorReason.OVERLONG, i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n result.push(res);\n }\n return result;\n }\n function toUtf8Bytes(str, form) {\n if (form === void 0) {\n form = UnicodeNormalizationForm.current;\n }\n if (form != UnicodeNormalizationForm.current) {\n logger.checkNormalize();\n str = str.normalize(form);\n }\n var result = [];\n for (var i3 = 0; i3 < str.length; i3++) {\n var c4 = str.charCodeAt(i3);\n if (c4 < 128) {\n result.push(c4);\n } else if (c4 < 2048) {\n result.push(c4 >> 6 | 192);\n result.push(c4 & 63 | 128);\n } else if ((c4 & 64512) == 55296) {\n i3++;\n var c22 = str.charCodeAt(i3);\n if (i3 >= str.length || (c22 & 64512) !== 56320) {\n throw new Error(\"invalid utf-8 string\");\n }\n var pair = 65536 + ((c4 & 1023) << 10) + (c22 & 1023);\n result.push(pair >> 18 | 240);\n result.push(pair >> 12 & 63 | 128);\n result.push(pair >> 6 & 63 | 128);\n result.push(pair & 63 | 128);\n } else {\n result.push(c4 >> 12 | 224);\n result.push(c4 >> 6 & 63 | 128);\n result.push(c4 & 63 | 128);\n }\n }\n return (0, bytes_1.arrayify)(result);\n }\n exports3.toUtf8Bytes = toUtf8Bytes;\n function escapeChar(value) {\n var hex = \"0000\" + value.toString(16);\n return \"\\\\u\" + hex.substring(hex.length - 4);\n }\n function _toEscapedUtf8String(bytes, onError) {\n return '\"' + getUtf8CodePoints(bytes, onError).map(function(codePoint) {\n if (codePoint < 256) {\n switch (codePoint) {\n case 8:\n return \"\\\\b\";\n case 9:\n return \"\\\\t\";\n case 10:\n return \"\\\\n\";\n case 13:\n return \"\\\\r\";\n case 34:\n return '\\\\\"';\n case 92:\n return \"\\\\\\\\\";\n }\n if (codePoint >= 32 && codePoint < 127) {\n return String.fromCharCode(codePoint);\n }\n }\n if (codePoint <= 65535) {\n return escapeChar(codePoint);\n }\n codePoint -= 65536;\n return escapeChar((codePoint >> 10 & 1023) + 55296) + escapeChar((codePoint & 1023) + 56320);\n }).join(\"\") + '\"';\n }\n exports3._toEscapedUtf8String = _toEscapedUtf8String;\n function _toUtf8String(codePoints) {\n return codePoints.map(function(codePoint) {\n if (codePoint <= 65535) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 65536;\n return String.fromCharCode((codePoint >> 10 & 1023) + 55296, (codePoint & 1023) + 56320);\n }).join(\"\");\n }\n exports3._toUtf8String = _toUtf8String;\n function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n }\n exports3.toUtf8String = toUtf8String;\n function toUtf8CodePoints(str, form) {\n if (form === void 0) {\n form = UnicodeNormalizationForm.current;\n }\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n }\n exports3.toUtf8CodePoints = toUtf8CodePoints;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/bytes32.js\n var require_bytes32 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/bytes32.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.parseBytes32String = exports3.formatBytes32String = void 0;\n var constants_1 = require_lib8();\n var bytes_1 = require_lib2();\n var utf8_1 = require_utf8();\n function formatBytes32String(text) {\n var bytes = (0, utf8_1.toUtf8Bytes)(text);\n if (bytes.length > 31) {\n throw new Error(\"bytes32 string must be less than 32 bytes\");\n }\n return (0, bytes_1.hexlify)((0, bytes_1.concat)([bytes, constants_1.HashZero]).slice(0, 32));\n }\n exports3.formatBytes32String = formatBytes32String;\n function parseBytes32String(bytes) {\n var data = (0, bytes_1.arrayify)(bytes);\n if (data.length !== 32) {\n throw new Error(\"invalid bytes32 - not 32 bytes long\");\n }\n if (data[31] !== 0) {\n throw new Error(\"invalid bytes32 string - no null terminator\");\n }\n var length = 31;\n while (data[length - 1] === 0) {\n length--;\n }\n return (0, utf8_1.toUtf8String)(data.slice(0, length));\n }\n exports3.parseBytes32String = parseBytes32String;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/idna.js\n var require_idna = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/idna.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.nameprep = exports3._nameprepTableC = exports3._nameprepTableB2 = exports3._nameprepTableA1 = void 0;\n var utf8_1 = require_utf8();\n function bytes2(data) {\n if (data.length % 4 !== 0) {\n throw new Error(\"bad data\");\n }\n var result = [];\n for (var i3 = 0; i3 < data.length; i3 += 4) {\n result.push(parseInt(data.substring(i3, i3 + 4), 16));\n }\n return result;\n }\n function createTable(data, func) {\n if (!func) {\n func = function(value) {\n return [parseInt(value, 16)];\n };\n }\n var lo = 0;\n var result = {};\n data.split(\",\").forEach(function(pair) {\n var comps = pair.split(\":\");\n lo += parseInt(comps[0], 16);\n result[lo] = func(comps[1]);\n });\n return result;\n }\n function createRangeTable(data) {\n var hi = 0;\n return data.split(\",\").map(function(v2) {\n var comps = v2.split(\"-\");\n if (comps.length === 1) {\n comps[1] = \"0\";\n } else if (comps[1] === \"\") {\n comps[1] = \"1\";\n }\n var lo = hi + parseInt(comps[0], 16);\n hi = parseInt(comps[1], 16);\n return { l: lo, h: hi };\n });\n }\n function matchMap(value, ranges) {\n var lo = 0;\n for (var i3 = 0; i3 < ranges.length; i3++) {\n var range = ranges[i3];\n lo += range.l;\n if (value >= lo && value <= lo + range.h && (value - lo) % (range.d || 1) === 0) {\n if (range.e && range.e.indexOf(value - lo) !== -1) {\n continue;\n }\n return range;\n }\n }\n return null;\n }\n var Table_A_1_ranges = createRangeTable(\"221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d\");\n var Table_B_1_flags = \"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff\".split(\",\").map(function(v2) {\n return parseInt(v2, 16);\n });\n var Table_B_2_ranges = [\n { h: 25, s: 32, l: 65 },\n { h: 30, s: 32, e: [23], l: 127 },\n { h: 54, s: 1, e: [48], l: 64, d: 2 },\n { h: 14, s: 1, l: 57, d: 2 },\n { h: 44, s: 1, l: 17, d: 2 },\n { h: 10, s: 1, e: [2, 6, 8], l: 61, d: 2 },\n { h: 16, s: 1, l: 68, d: 2 },\n { h: 84, s: 1, e: [18, 24, 66], l: 19, d: 2 },\n { h: 26, s: 32, e: [17], l: 435 },\n { h: 22, s: 1, l: 71, d: 2 },\n { h: 15, s: 80, l: 40 },\n { h: 31, s: 32, l: 16 },\n { h: 32, s: 1, l: 80, d: 2 },\n { h: 52, s: 1, l: 42, d: 2 },\n { h: 12, s: 1, l: 55, d: 2 },\n { h: 40, s: 1, e: [38], l: 15, d: 2 },\n { h: 14, s: 1, l: 48, d: 2 },\n { h: 37, s: 48, l: 49 },\n { h: 148, s: 1, l: 6351, d: 2 },\n { h: 88, s: 1, l: 160, d: 2 },\n { h: 15, s: 16, l: 704 },\n { h: 25, s: 26, l: 854 },\n { h: 25, s: 32, l: 55915 },\n { h: 37, s: 40, l: 1247 },\n { h: 25, s: -119711, l: 53248 },\n { h: 25, s: -119763, l: 52 },\n { h: 25, s: -119815, l: 52 },\n { h: 25, s: -119867, e: [1, 4, 5, 7, 8, 11, 12, 17], l: 52 },\n { h: 25, s: -119919, l: 52 },\n { h: 24, s: -119971, e: [2, 7, 8, 17], l: 52 },\n { h: 24, s: -120023, e: [2, 7, 13, 15, 16, 17], l: 52 },\n { h: 25, s: -120075, l: 52 },\n { h: 25, s: -120127, l: 52 },\n { h: 25, s: -120179, l: 52 },\n { h: 25, s: -120231, l: 52 },\n { h: 25, s: -120283, l: 52 },\n { h: 25, s: -120335, l: 52 },\n { h: 24, s: -119543, e: [17], l: 56 },\n { h: 24, s: -119601, e: [17], l: 58 },\n { h: 24, s: -119659, e: [17], l: 58 },\n { h: 24, s: -119717, e: [17], l: 58 },\n { h: 24, s: -119775, e: [17], l: 58 }\n ];\n var Table_B_2_lut_abs = createTable(\"b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3\");\n var Table_B_2_lut_rel = createTable(\"179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7\");\n var Table_B_2_complex = createTable(\"df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D\", bytes2);\n var Table_C_ranges = createRangeTable(\"80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001\");\n function flatten(values) {\n return values.reduce(function(accum, value) {\n value.forEach(function(value2) {\n accum.push(value2);\n });\n return accum;\n }, []);\n }\n function _nameprepTableA1(codepoint) {\n return !!matchMap(codepoint, Table_A_1_ranges);\n }\n exports3._nameprepTableA1 = _nameprepTableA1;\n function _nameprepTableB2(codepoint) {\n var range = matchMap(codepoint, Table_B_2_ranges);\n if (range) {\n return [codepoint + range.s];\n }\n var codes = Table_B_2_lut_abs[codepoint];\n if (codes) {\n return codes;\n }\n var shift = Table_B_2_lut_rel[codepoint];\n if (shift) {\n return [codepoint + shift[0]];\n }\n var complex = Table_B_2_complex[codepoint];\n if (complex) {\n return complex;\n }\n return null;\n }\n exports3._nameprepTableB2 = _nameprepTableB2;\n function _nameprepTableC(codepoint) {\n return !!matchMap(codepoint, Table_C_ranges);\n }\n exports3._nameprepTableC = _nameprepTableC;\n function nameprep(value) {\n if (value.match(/^[a-z0-9-]*$/i) && value.length <= 59) {\n return value.toLowerCase();\n }\n var codes = (0, utf8_1.toUtf8CodePoints)(value);\n codes = flatten(codes.map(function(code) {\n if (Table_B_1_flags.indexOf(code) >= 0) {\n return [];\n }\n if (code >= 65024 && code <= 65039) {\n return [];\n }\n var codesTableB2 = _nameprepTableB2(code);\n if (codesTableB2) {\n return codesTableB2;\n }\n return [code];\n }));\n codes = (0, utf8_1.toUtf8CodePoints)((0, utf8_1._toUtf8String)(codes), utf8_1.UnicodeNormalizationForm.NFKC);\n codes.forEach(function(code) {\n if (_nameprepTableC(code)) {\n throw new Error(\"STRINGPREP_CONTAINS_PROHIBITED\");\n }\n });\n codes.forEach(function(code) {\n if (_nameprepTableA1(code)) {\n throw new Error(\"STRINGPREP_CONTAINS_UNASSIGNED\");\n }\n });\n var name = (0, utf8_1._toUtf8String)(codes);\n if (name.substring(0, 1) === \"-\" || name.substring(2, 4) === \"--\" || name.substring(name.length - 1) === \"-\") {\n throw new Error(\"invalid hyphen\");\n }\n return name;\n }\n exports3.nameprep = nameprep;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/index.js\n var require_lib9 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.nameprep = exports3.parseBytes32String = exports3.formatBytes32String = exports3.UnicodeNormalizationForm = exports3.Utf8ErrorReason = exports3.Utf8ErrorFuncs = exports3.toUtf8String = exports3.toUtf8CodePoints = exports3.toUtf8Bytes = exports3._toEscapedUtf8String = void 0;\n var bytes32_1 = require_bytes32();\n Object.defineProperty(exports3, \"formatBytes32String\", { enumerable: true, get: function() {\n return bytes32_1.formatBytes32String;\n } });\n Object.defineProperty(exports3, \"parseBytes32String\", { enumerable: true, get: function() {\n return bytes32_1.parseBytes32String;\n } });\n var idna_1 = require_idna();\n Object.defineProperty(exports3, \"nameprep\", { enumerable: true, get: function() {\n return idna_1.nameprep;\n } });\n var utf8_1 = require_utf8();\n Object.defineProperty(exports3, \"_toEscapedUtf8String\", { enumerable: true, get: function() {\n return utf8_1._toEscapedUtf8String;\n } });\n Object.defineProperty(exports3, \"toUtf8Bytes\", { enumerable: true, get: function() {\n return utf8_1.toUtf8Bytes;\n } });\n Object.defineProperty(exports3, \"toUtf8CodePoints\", { enumerable: true, get: function() {\n return utf8_1.toUtf8CodePoints;\n } });\n Object.defineProperty(exports3, \"toUtf8String\", { enumerable: true, get: function() {\n return utf8_1.toUtf8String;\n } });\n Object.defineProperty(exports3, \"UnicodeNormalizationForm\", { enumerable: true, get: function() {\n return utf8_1.UnicodeNormalizationForm;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorFuncs\", { enumerable: true, get: function() {\n return utf8_1.Utf8ErrorFuncs;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorReason\", { enumerable: true, get: function() {\n return utf8_1.Utf8ErrorReason;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/string.js\n var require_string = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/string.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.StringCoder = void 0;\n var strings_1 = require_lib9();\n var bytes_1 = require_bytes();\n var StringCoder = (\n /** @class */\n function(_super) {\n __extends4(StringCoder2, _super);\n function StringCoder2(localName) {\n return _super.call(this, \"string\", localName) || this;\n }\n StringCoder2.prototype.defaultValue = function() {\n return \"\";\n };\n StringCoder2.prototype.encode = function(writer, value) {\n return _super.prototype.encode.call(this, writer, (0, strings_1.toUtf8Bytes)(value));\n };\n StringCoder2.prototype.decode = function(reader) {\n return (0, strings_1.toUtf8String)(_super.prototype.decode.call(this, reader));\n };\n return StringCoder2;\n }(bytes_1.DynamicBytesCoder)\n );\n exports3.StringCoder = StringCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/tuple.js\n var require_tuple = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/tuple.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TupleCoder = void 0;\n var abstract_coder_1 = require_abstract_coder();\n var array_1 = require_array();\n var TupleCoder = (\n /** @class */\n function(_super) {\n __extends4(TupleCoder2, _super);\n function TupleCoder2(coders, localName) {\n var _this = this;\n var dynamic = false;\n var types = [];\n coders.forEach(function(coder) {\n if (coder.dynamic) {\n dynamic = true;\n }\n types.push(coder.type);\n });\n var type = \"tuple(\" + types.join(\",\") + \")\";\n _this = _super.call(this, \"tuple\", type, localName, dynamic) || this;\n _this.coders = coders;\n return _this;\n }\n TupleCoder2.prototype.defaultValue = function() {\n var values = [];\n this.coders.forEach(function(coder) {\n values.push(coder.defaultValue());\n });\n var uniqueNames = this.coders.reduce(function(accum, coder) {\n var name = coder.localName;\n if (name) {\n if (!accum[name]) {\n accum[name] = 0;\n }\n accum[name]++;\n }\n return accum;\n }, {});\n this.coders.forEach(function(coder, index2) {\n var name = coder.localName;\n if (!name || uniqueNames[name] !== 1) {\n return;\n }\n if (name === \"length\") {\n name = \"_length\";\n }\n if (values[name] != null) {\n return;\n }\n values[name] = values[index2];\n });\n return Object.freeze(values);\n };\n TupleCoder2.prototype.encode = function(writer, value) {\n return (0, array_1.pack)(writer, this.coders, value);\n };\n TupleCoder2.prototype.decode = function(reader) {\n return reader.coerce(this.name, (0, array_1.unpack)(reader, this.coders));\n };\n return TupleCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.TupleCoder = TupleCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/abi-coder.js\n var require_abi_coder = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/abi-coder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.defaultAbiCoder = exports3.AbiCoder = void 0;\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n var abstract_coder_1 = require_abstract_coder();\n var address_1 = require_address();\n var array_1 = require_array();\n var boolean_1 = require_boolean();\n var bytes_2 = require_bytes();\n var fixed_bytes_1 = require_fixed_bytes();\n var null_1 = require_null();\n var number_1 = require_number();\n var string_1 = require_string();\n var tuple_1 = require_tuple();\n var fragments_1 = require_fragments();\n var paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);\n var paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);\n var AbiCoder = (\n /** @class */\n function() {\n function AbiCoder2(coerceFunc) {\n (0, properties_1.defineReadOnly)(this, \"coerceFunc\", coerceFunc || null);\n }\n AbiCoder2.prototype._getCoder = function(param) {\n var _this = this;\n switch (param.baseType) {\n case \"address\":\n return new address_1.AddressCoder(param.name);\n case \"bool\":\n return new boolean_1.BooleanCoder(param.name);\n case \"string\":\n return new string_1.StringCoder(param.name);\n case \"bytes\":\n return new bytes_2.BytesCoder(param.name);\n case \"array\":\n return new array_1.ArrayCoder(this._getCoder(param.arrayChildren), param.arrayLength, param.name);\n case \"tuple\":\n return new tuple_1.TupleCoder((param.components || []).map(function(component) {\n return _this._getCoder(component);\n }), param.name);\n case \"\":\n return new null_1.NullCoder(param.name);\n }\n var match = param.type.match(paramTypeNumber);\n if (match) {\n var size6 = parseInt(match[2] || \"256\");\n if (size6 === 0 || size6 > 256 || size6 % 8 !== 0) {\n logger.throwArgumentError(\"invalid \" + match[1] + \" bit length\", \"param\", param);\n }\n return new number_1.NumberCoder(size6 / 8, match[1] === \"int\", param.name);\n }\n match = param.type.match(paramTypeBytes);\n if (match) {\n var size6 = parseInt(match[1]);\n if (size6 === 0 || size6 > 32) {\n logger.throwArgumentError(\"invalid bytes length\", \"param\", param);\n }\n return new fixed_bytes_1.FixedBytesCoder(size6, param.name);\n }\n return logger.throwArgumentError(\"invalid type\", \"type\", param.type);\n };\n AbiCoder2.prototype._getWordSize = function() {\n return 32;\n };\n AbiCoder2.prototype._getReader = function(data, allowLoose) {\n return new abstract_coder_1.Reader(data, this._getWordSize(), this.coerceFunc, allowLoose);\n };\n AbiCoder2.prototype._getWriter = function() {\n return new abstract_coder_1.Writer(this._getWordSize());\n };\n AbiCoder2.prototype.getDefaultValue = function(types) {\n var _this = this;\n var coders = types.map(function(type) {\n return _this._getCoder(fragments_1.ParamType.from(type));\n });\n var coder = new tuple_1.TupleCoder(coders, \"_\");\n return coder.defaultValue();\n };\n AbiCoder2.prototype.encode = function(types, values) {\n var _this = this;\n if (types.length !== values.length) {\n logger.throwError(\"types/values length mismatch\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n count: { types: types.length, values: values.length },\n value: { types, values }\n });\n }\n var coders = types.map(function(type) {\n return _this._getCoder(fragments_1.ParamType.from(type));\n });\n var coder = new tuple_1.TupleCoder(coders, \"_\");\n var writer = this._getWriter();\n coder.encode(writer, values);\n return writer.data;\n };\n AbiCoder2.prototype.decode = function(types, data, loose) {\n var _this = this;\n var coders = types.map(function(type) {\n return _this._getCoder(fragments_1.ParamType.from(type));\n });\n var coder = new tuple_1.TupleCoder(coders, \"_\");\n return coder.decode(this._getReader((0, bytes_1.arrayify)(data), loose));\n };\n return AbiCoder2;\n }()\n );\n exports3.AbiCoder = AbiCoder;\n exports3.defaultAbiCoder = new AbiCoder();\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/id.js\n var require_id = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/id.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.id = void 0;\n var keccak256_1 = require_lib5();\n var strings_1 = require_lib9();\n function id(text) {\n return (0, keccak256_1.keccak256)((0, strings_1.toUtf8Bytes)(text));\n }\n exports3.id = id;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/_version.js\n var require_version9 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"hash/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+base64@5.8.0/node_modules/@ethersproject/base64/lib/browser-base64.js\n var require_browser_base64 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+base64@5.8.0/node_modules/@ethersproject/base64/lib/browser-base64.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encode = exports3.decode = void 0;\n var bytes_1 = require_lib2();\n function decode2(textData) {\n textData = atob(textData);\n var data = [];\n for (var i3 = 0; i3 < textData.length; i3++) {\n data.push(textData.charCodeAt(i3));\n }\n return (0, bytes_1.arrayify)(data);\n }\n exports3.decode = decode2;\n function encode5(data) {\n data = (0, bytes_1.arrayify)(data);\n var textData = \"\";\n for (var i3 = 0; i3 < data.length; i3++) {\n textData += String.fromCharCode(data[i3]);\n }\n return btoa(textData);\n }\n exports3.encode = encode5;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+base64@5.8.0/node_modules/@ethersproject/base64/lib/index.js\n var require_lib10 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+base64@5.8.0/node_modules/@ethersproject/base64/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encode = exports3.decode = void 0;\n var base64_1 = require_browser_base64();\n Object.defineProperty(exports3, \"decode\", { enumerable: true, get: function() {\n return base64_1.decode;\n } });\n Object.defineProperty(exports3, \"encode\", { enumerable: true, get: function() {\n return base64_1.encode;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.js\n var require_decoder = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.read_emoji_trie = exports3.read_zero_terminated_array = exports3.read_mapped_map = exports3.read_member_array = exports3.signed = exports3.read_compressed_payload = exports3.read_payload = exports3.decode_arithmetic = void 0;\n function flat(array, depth) {\n if (depth == null) {\n depth = 1;\n }\n var result = [];\n var forEach = result.forEach;\n var flatDeep = function(arr, depth2) {\n forEach.call(arr, function(val) {\n if (depth2 > 0 && Array.isArray(val)) {\n flatDeep(val, depth2 - 1);\n } else {\n result.push(val);\n }\n });\n };\n flatDeep(array, depth);\n return result;\n }\n function fromEntries(array) {\n var result = {};\n for (var i3 = 0; i3 < array.length; i3++) {\n var value = array[i3];\n result[value[0]] = value[1];\n }\n return result;\n }\n function decode_arithmetic(bytes) {\n var pos = 0;\n function u16() {\n return bytes[pos++] << 8 | bytes[pos++];\n }\n var symbol_count = u16();\n var total = 1;\n var acc = [0, 1];\n for (var i3 = 1; i3 < symbol_count; i3++) {\n acc.push(total += u16());\n }\n var skip = u16();\n var pos_payload = pos;\n pos += skip;\n var read_width = 0;\n var read_buffer = 0;\n function read_bit() {\n if (read_width == 0) {\n read_buffer = read_buffer << 8 | bytes[pos++];\n read_width = 8;\n }\n return read_buffer >> --read_width & 1;\n }\n var N4 = 31;\n var FULL = Math.pow(2, N4);\n var HALF = FULL >>> 1;\n var QRTR = HALF >> 1;\n var MASK = FULL - 1;\n var register = 0;\n for (var i3 = 0; i3 < N4; i3++)\n register = register << 1 | read_bit();\n var symbols = [];\n var low = 0;\n var range = FULL;\n while (true) {\n var value = Math.floor(((register - low + 1) * total - 1) / range);\n var start = 0;\n var end = symbol_count;\n while (end - start > 1) {\n var mid = start + end >>> 1;\n if (value < acc[mid]) {\n end = mid;\n } else {\n start = mid;\n }\n }\n if (start == 0)\n break;\n symbols.push(start);\n var a3 = low + Math.floor(range * acc[start] / total);\n var b4 = low + Math.floor(range * acc[start + 1] / total) - 1;\n while (((a3 ^ b4) & HALF) == 0) {\n register = register << 1 & MASK | read_bit();\n a3 = a3 << 1 & MASK;\n b4 = b4 << 1 & MASK | 1;\n }\n while (a3 & ~b4 & QRTR) {\n register = register & HALF | register << 1 & MASK >>> 1 | read_bit();\n a3 = a3 << 1 ^ HALF;\n b4 = (b4 ^ HALF) << 1 | HALF | 1;\n }\n low = a3;\n range = 1 + b4 - a3;\n }\n var offset = symbol_count - 4;\n return symbols.map(function(x4) {\n switch (x4 - offset) {\n case 3:\n return offset + 65792 + (bytes[pos_payload++] << 16 | bytes[pos_payload++] << 8 | bytes[pos_payload++]);\n case 2:\n return offset + 256 + (bytes[pos_payload++] << 8 | bytes[pos_payload++]);\n case 1:\n return offset + bytes[pos_payload++];\n default:\n return x4 - 1;\n }\n });\n }\n exports3.decode_arithmetic = decode_arithmetic;\n function read_payload(v2) {\n var pos = 0;\n return function() {\n return v2[pos++];\n };\n }\n exports3.read_payload = read_payload;\n function read_compressed_payload(bytes) {\n return read_payload(decode_arithmetic(bytes));\n }\n exports3.read_compressed_payload = read_compressed_payload;\n function signed(i3) {\n return i3 & 1 ? ~i3 >> 1 : i3 >> 1;\n }\n exports3.signed = signed;\n function read_counts(n2, next) {\n var v2 = Array(n2);\n for (var i3 = 0; i3 < n2; i3++)\n v2[i3] = 1 + next();\n return v2;\n }\n function read_ascending(n2, next) {\n var v2 = Array(n2);\n for (var i3 = 0, x4 = -1; i3 < n2; i3++)\n v2[i3] = x4 += 1 + next();\n return v2;\n }\n function read_deltas(n2, next) {\n var v2 = Array(n2);\n for (var i3 = 0, x4 = 0; i3 < n2; i3++)\n v2[i3] = x4 += signed(next());\n return v2;\n }\n function read_member_array(next, lookup) {\n var v2 = read_ascending(next(), next);\n var n2 = next();\n var vX = read_ascending(n2, next);\n var vN = read_counts(n2, next);\n for (var i3 = 0; i3 < n2; i3++) {\n for (var j2 = 0; j2 < vN[i3]; j2++) {\n v2.push(vX[i3] + j2);\n }\n }\n return lookup ? v2.map(function(x4) {\n return lookup[x4];\n }) : v2;\n }\n exports3.read_member_array = read_member_array;\n function read_mapped_map(next) {\n var ret = [];\n while (true) {\n var w3 = next();\n if (w3 == 0)\n break;\n ret.push(read_linear_table(w3, next));\n }\n while (true) {\n var w3 = next() - 1;\n if (w3 < 0)\n break;\n ret.push(read_replacement_table(w3, next));\n }\n return fromEntries(flat(ret));\n }\n exports3.read_mapped_map = read_mapped_map;\n function read_zero_terminated_array(next) {\n var v2 = [];\n while (true) {\n var i3 = next();\n if (i3 == 0)\n break;\n v2.push(i3);\n }\n return v2;\n }\n exports3.read_zero_terminated_array = read_zero_terminated_array;\n function read_transposed(n2, w3, next) {\n var m2 = Array(n2).fill(void 0).map(function() {\n return [];\n });\n for (var i3 = 0; i3 < w3; i3++) {\n read_deltas(n2, next).forEach(function(x4, j2) {\n return m2[j2].push(x4);\n });\n }\n return m2;\n }\n function read_linear_table(w3, next) {\n var dx = 1 + next();\n var dy = next();\n var vN = read_zero_terminated_array(next);\n var m2 = read_transposed(vN.length, 1 + w3, next);\n return flat(m2.map(function(v2, i3) {\n var x4 = v2[0], ys = v2.slice(1);\n return Array(vN[i3]).fill(void 0).map(function(_2, j2) {\n var j_dy = j2 * dy;\n return [x4 + j2 * dx, ys.map(function(y6) {\n return y6 + j_dy;\n })];\n });\n }));\n }\n function read_replacement_table(w3, next) {\n var n2 = 1 + next();\n var m2 = read_transposed(n2, 1 + w3, next);\n return m2.map(function(v2) {\n return [v2[0], v2.slice(1)];\n });\n }\n function read_emoji_trie(next) {\n var sorted = read_member_array(next).sort(function(a3, b4) {\n return a3 - b4;\n });\n return read();\n function read() {\n var branches = [];\n while (true) {\n var keys = read_member_array(next, sorted);\n if (keys.length == 0)\n break;\n branches.push({ set: new Set(keys), node: read() });\n }\n branches.sort(function(a3, b4) {\n return b4.set.size - a3.set.size;\n });\n var temp = next();\n var valid = temp % 3;\n temp = temp / 3 | 0;\n var fe0f = !!(temp & 1);\n temp >>= 1;\n var save = temp == 1;\n var check = temp == 2;\n return { branches, valid, fe0f, save, check };\n }\n }\n exports3.read_emoji_trie = read_emoji_trie;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/include.js\n var require_include = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/include.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getData = void 0;\n var base64_1 = require_lib10();\n var decoder_js_1 = require_decoder();\n function getData() {\n return (0, decoder_js_1.read_compressed_payload)((0, base64_1.decode)(\"AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==\"));\n }\n exports3.getData = getData;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/lib.js\n var require_lib11 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/lib.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ens_normalize = exports3.ens_normalize_post_check = void 0;\n var strings_1 = require_lib9();\n var include_js_1 = require_include();\n var r2 = (0, include_js_1.getData)();\n var decoder_js_1 = require_decoder();\n var VALID = new Set((0, decoder_js_1.read_member_array)(r2));\n var IGNORED = new Set((0, decoder_js_1.read_member_array)(r2));\n var MAPPED = (0, decoder_js_1.read_mapped_map)(r2);\n var EMOJI_ROOT = (0, decoder_js_1.read_emoji_trie)(r2);\n var HYPHEN = 45;\n var UNDERSCORE = 95;\n function explode_cp(name) {\n return (0, strings_1.toUtf8CodePoints)(name);\n }\n function filter_fe0f(cps) {\n return cps.filter(function(cp) {\n return cp != 65039;\n });\n }\n function ens_normalize_post_check(name) {\n for (var _i = 0, _a = name.split(\".\"); _i < _a.length; _i++) {\n var label = _a[_i];\n var cps = explode_cp(label);\n try {\n for (var i3 = cps.lastIndexOf(UNDERSCORE) - 1; i3 >= 0; i3--) {\n if (cps[i3] !== UNDERSCORE) {\n throw new Error(\"underscore only allowed at start\");\n }\n }\n if (cps.length >= 4 && cps.every(function(cp) {\n return cp < 128;\n }) && cps[2] === HYPHEN && cps[3] === HYPHEN) {\n throw new Error(\"invalid label extension\");\n }\n } catch (err) {\n throw new Error('Invalid label \"' + label + '\": ' + err.message);\n }\n }\n return name;\n }\n exports3.ens_normalize_post_check = ens_normalize_post_check;\n function ens_normalize(name) {\n return ens_normalize_post_check(normalize2(name, filter_fe0f));\n }\n exports3.ens_normalize = ens_normalize;\n function normalize2(name, emoji_filter) {\n var input = explode_cp(name).reverse();\n var output = [];\n while (input.length) {\n var emoji = consume_emoji_reversed(input);\n if (emoji) {\n output.push.apply(output, emoji_filter(emoji));\n continue;\n }\n var cp = input.pop();\n if (VALID.has(cp)) {\n output.push(cp);\n continue;\n }\n if (IGNORED.has(cp)) {\n continue;\n }\n var cps = MAPPED[cp];\n if (cps) {\n output.push.apply(output, cps);\n continue;\n }\n throw new Error(\"Disallowed codepoint: 0x\" + cp.toString(16).toUpperCase());\n }\n return ens_normalize_post_check(nfc(String.fromCodePoint.apply(String, output)));\n }\n function nfc(s4) {\n return s4.normalize(\"NFC\");\n }\n function consume_emoji_reversed(cps, eaten) {\n var _a;\n var node = EMOJI_ROOT;\n var emoji;\n var saved;\n var stack = [];\n var pos = cps.length;\n if (eaten)\n eaten.length = 0;\n var _loop_1 = function() {\n var cp = cps[--pos];\n node = (_a = node.branches.find(function(x4) {\n return x4.set.has(cp);\n })) === null || _a === void 0 ? void 0 : _a.node;\n if (!node)\n return \"break\";\n if (node.save) {\n saved = cp;\n } else if (node.check) {\n if (cp === saved)\n return \"break\";\n }\n stack.push(cp);\n if (node.fe0f) {\n stack.push(65039);\n if (pos > 0 && cps[pos - 1] == 65039)\n pos--;\n }\n if (node.valid) {\n emoji = stack.slice();\n if (node.valid == 2)\n emoji.splice(1, 1);\n if (eaten)\n eaten.push.apply(eaten, cps.slice(pos).reverse());\n cps.length = pos;\n }\n };\n while (pos) {\n var state_1 = _loop_1();\n if (state_1 === \"break\")\n break;\n }\n return emoji;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/namehash.js\n var require_namehash = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/namehash.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.dnsEncode = exports3.namehash = exports3.isValidName = exports3.ensNormalize = void 0;\n var bytes_1 = require_lib2();\n var strings_1 = require_lib9();\n var keccak256_1 = require_lib5();\n var logger_1 = require_lib();\n var _version_1 = require_version9();\n var logger = new logger_1.Logger(_version_1.version);\n var lib_1 = require_lib11();\n var Zeros = new Uint8Array(32);\n Zeros.fill(0);\n function checkComponent(comp) {\n if (comp.length === 0) {\n throw new Error(\"invalid ENS name; empty component\");\n }\n return comp;\n }\n function ensNameSplit(name) {\n var bytes = (0, strings_1.toUtf8Bytes)((0, lib_1.ens_normalize)(name));\n var comps = [];\n if (name.length === 0) {\n return comps;\n }\n var last = 0;\n for (var i3 = 0; i3 < bytes.length; i3++) {\n var d5 = bytes[i3];\n if (d5 === 46) {\n comps.push(checkComponent(bytes.slice(last, i3)));\n last = i3 + 1;\n }\n }\n if (last >= bytes.length) {\n throw new Error(\"invalid ENS name; empty component\");\n }\n comps.push(checkComponent(bytes.slice(last)));\n return comps;\n }\n function ensNormalize(name) {\n return ensNameSplit(name).map(function(comp) {\n return (0, strings_1.toUtf8String)(comp);\n }).join(\".\");\n }\n exports3.ensNormalize = ensNormalize;\n function isValidName(name) {\n try {\n return ensNameSplit(name).length !== 0;\n } catch (error) {\n }\n return false;\n }\n exports3.isValidName = isValidName;\n function namehash2(name) {\n if (typeof name !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name; not a string\", \"name\", name);\n }\n var result = Zeros;\n var comps = ensNameSplit(name);\n while (comps.length) {\n result = (0, keccak256_1.keccak256)((0, bytes_1.concat)([result, (0, keccak256_1.keccak256)(comps.pop())]));\n }\n return (0, bytes_1.hexlify)(result);\n }\n exports3.namehash = namehash2;\n function dnsEncode(name) {\n return (0, bytes_1.hexlify)((0, bytes_1.concat)(ensNameSplit(name).map(function(comp) {\n if (comp.length > 63) {\n throw new Error(\"invalid DNS encoded entry; length exceeds 63 bytes\");\n }\n var bytes = new Uint8Array(comp.length + 1);\n bytes.set(comp, 1);\n bytes[0] = bytes.length - 1;\n return bytes;\n }))) + \"00\";\n }\n exports3.dnsEncode = dnsEncode;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/message.js\n var require_message = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/message.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.hashMessage = exports3.messagePrefix = void 0;\n var bytes_1 = require_lib2();\n var keccak256_1 = require_lib5();\n var strings_1 = require_lib9();\n exports3.messagePrefix = \"\u0019Ethereum Signed Message:\\n\";\n function hashMessage2(message) {\n if (typeof message === \"string\") {\n message = (0, strings_1.toUtf8Bytes)(message);\n }\n return (0, keccak256_1.keccak256)((0, bytes_1.concat)([\n (0, strings_1.toUtf8Bytes)(exports3.messagePrefix),\n (0, strings_1.toUtf8Bytes)(String(message.length)),\n message\n ]));\n }\n exports3.hashMessage = hashMessage2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/typed-data.js\n var require_typed_data = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/typed-data.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TypedDataEncoder = void 0;\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var keccak256_1 = require_lib5();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version9();\n var logger = new logger_1.Logger(_version_1.version);\n var id_1 = require_id();\n var padding = new Uint8Array(32);\n padding.fill(0);\n var NegativeOne = bignumber_1.BigNumber.from(-1);\n var Zero = bignumber_1.BigNumber.from(0);\n var One = bignumber_1.BigNumber.from(1);\n var MaxUint256 = bignumber_1.BigNumber.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n function hexPadRight(value) {\n var bytes = (0, bytes_1.arrayify)(value);\n var padOffset = bytes.length % 32;\n if (padOffset) {\n return (0, bytes_1.hexConcat)([bytes, padding.slice(padOffset)]);\n }\n return (0, bytes_1.hexlify)(bytes);\n }\n var hexTrue = (0, bytes_1.hexZeroPad)(One.toHexString(), 32);\n var hexFalse = (0, bytes_1.hexZeroPad)(Zero.toHexString(), 32);\n var domainFieldTypes = {\n name: \"string\",\n version: \"string\",\n chainId: \"uint256\",\n verifyingContract: \"address\",\n salt: \"bytes32\"\n };\n var domainFieldNames = [\n \"name\",\n \"version\",\n \"chainId\",\n \"verifyingContract\",\n \"salt\"\n ];\n function checkString(key) {\n return function(value) {\n if (typeof value !== \"string\") {\n logger.throwArgumentError(\"invalid domain value for \" + JSON.stringify(key), \"domain.\" + key, value);\n }\n return value;\n };\n }\n var domainChecks = {\n name: checkString(\"name\"),\n version: checkString(\"version\"),\n chainId: function(value) {\n try {\n return bignumber_1.BigNumber.from(value).toString();\n } catch (error) {\n }\n return logger.throwArgumentError('invalid domain value for \"chainId\"', \"domain.chainId\", value);\n },\n verifyingContract: function(value) {\n try {\n return (0, address_1.getAddress)(value).toLowerCase();\n } catch (error) {\n }\n return logger.throwArgumentError('invalid domain value \"verifyingContract\"', \"domain.verifyingContract\", value);\n },\n salt: function(value) {\n try {\n var bytes = (0, bytes_1.arrayify)(value);\n if (bytes.length !== 32) {\n throw new Error(\"bad length\");\n }\n return (0, bytes_1.hexlify)(bytes);\n } catch (error) {\n }\n return logger.throwArgumentError('invalid domain value \"salt\"', \"domain.salt\", value);\n }\n };\n function getBaseEncoder(type) {\n {\n var match = type.match(/^(u?)int(\\d*)$/);\n if (match) {\n var signed = match[1] === \"\";\n var width = parseInt(match[2] || \"256\");\n if (width % 8 !== 0 || width > 256 || match[2] && match[2] !== String(width)) {\n logger.throwArgumentError(\"invalid numeric width\", \"type\", type);\n }\n var boundsUpper_1 = MaxUint256.mask(signed ? width - 1 : width);\n var boundsLower_1 = signed ? boundsUpper_1.add(One).mul(NegativeOne) : Zero;\n return function(value) {\n var v2 = bignumber_1.BigNumber.from(value);\n if (v2.lt(boundsLower_1) || v2.gt(boundsUpper_1)) {\n logger.throwArgumentError(\"value out-of-bounds for \" + type, \"value\", value);\n }\n return (0, bytes_1.hexZeroPad)(v2.toTwos(256).toHexString(), 32);\n };\n }\n }\n {\n var match = type.match(/^bytes(\\d+)$/);\n if (match) {\n var width_1 = parseInt(match[1]);\n if (width_1 === 0 || width_1 > 32 || match[1] !== String(width_1)) {\n logger.throwArgumentError(\"invalid bytes width\", \"type\", type);\n }\n return function(value) {\n var bytes = (0, bytes_1.arrayify)(value);\n if (bytes.length !== width_1) {\n logger.throwArgumentError(\"invalid length for \" + type, \"value\", value);\n }\n return hexPadRight(value);\n };\n }\n }\n switch (type) {\n case \"address\":\n return function(value) {\n return (0, bytes_1.hexZeroPad)((0, address_1.getAddress)(value), 32);\n };\n case \"bool\":\n return function(value) {\n return !value ? hexFalse : hexTrue;\n };\n case \"bytes\":\n return function(value) {\n return (0, keccak256_1.keccak256)(value);\n };\n case \"string\":\n return function(value) {\n return (0, id_1.id)(value);\n };\n }\n return null;\n }\n function encodeType2(name, fields) {\n return name + \"(\" + fields.map(function(_a) {\n var name2 = _a.name, type = _a.type;\n return type + \" \" + name2;\n }).join(\",\") + \")\";\n }\n var TypedDataEncoder = (\n /** @class */\n function() {\n function TypedDataEncoder2(types) {\n (0, properties_1.defineReadOnly)(this, \"types\", Object.freeze((0, properties_1.deepCopy)(types)));\n (0, properties_1.defineReadOnly)(this, \"_encoderCache\", {});\n (0, properties_1.defineReadOnly)(this, \"_types\", {});\n var links = {};\n var parents = {};\n var subtypes = {};\n Object.keys(types).forEach(function(type) {\n links[type] = {};\n parents[type] = [];\n subtypes[type] = {};\n });\n var _loop_1 = function(name_12) {\n var uniqueNames = {};\n types[name_12].forEach(function(field) {\n if (uniqueNames[field.name]) {\n logger.throwArgumentError(\"duplicate variable name \" + JSON.stringify(field.name) + \" in \" + JSON.stringify(name_12), \"types\", types);\n }\n uniqueNames[field.name] = true;\n var baseType = field.type.match(/^([^\\x5b]*)(\\x5b|$)/)[1];\n if (baseType === name_12) {\n logger.throwArgumentError(\"circular type reference to \" + JSON.stringify(baseType), \"types\", types);\n }\n var encoder6 = getBaseEncoder(baseType);\n if (encoder6) {\n return;\n }\n if (!parents[baseType]) {\n logger.throwArgumentError(\"unknown type \" + JSON.stringify(baseType), \"types\", types);\n }\n parents[baseType].push(name_12);\n links[name_12][baseType] = true;\n });\n };\n for (var name_1 in types) {\n _loop_1(name_1);\n }\n var primaryTypes = Object.keys(parents).filter(function(n2) {\n return parents[n2].length === 0;\n });\n if (primaryTypes.length === 0) {\n logger.throwArgumentError(\"missing primary type\", \"types\", types);\n } else if (primaryTypes.length > 1) {\n logger.throwArgumentError(\"ambiguous primary types or unused types: \" + primaryTypes.map(function(t3) {\n return JSON.stringify(t3);\n }).join(\", \"), \"types\", types);\n }\n (0, properties_1.defineReadOnly)(this, \"primaryType\", primaryTypes[0]);\n function checkCircular(type, found) {\n if (found[type]) {\n logger.throwArgumentError(\"circular type reference to \" + JSON.stringify(type), \"types\", types);\n }\n found[type] = true;\n Object.keys(links[type]).forEach(function(child) {\n if (!parents[child]) {\n return;\n }\n checkCircular(child, found);\n Object.keys(found).forEach(function(subtype) {\n subtypes[subtype][child] = true;\n });\n });\n delete found[type];\n }\n checkCircular(this.primaryType, {});\n for (var name_2 in subtypes) {\n var st = Object.keys(subtypes[name_2]);\n st.sort();\n this._types[name_2] = encodeType2(name_2, types[name_2]) + st.map(function(t3) {\n return encodeType2(t3, types[t3]);\n }).join(\"\");\n }\n }\n TypedDataEncoder2.prototype.getEncoder = function(type) {\n var encoder6 = this._encoderCache[type];\n if (!encoder6) {\n encoder6 = this._encoderCache[type] = this._getEncoder(type);\n }\n return encoder6;\n };\n TypedDataEncoder2.prototype._getEncoder = function(type) {\n var _this = this;\n {\n var encoder6 = getBaseEncoder(type);\n if (encoder6) {\n return encoder6;\n }\n }\n var match = type.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n var subtype_1 = match[1];\n var subEncoder_1 = this.getEncoder(subtype_1);\n var length_1 = parseInt(match[3]);\n return function(value) {\n if (length_1 >= 0 && value.length !== length_1) {\n logger.throwArgumentError(\"array length mismatch; expected length ${ arrayLength }\", \"value\", value);\n }\n var result = value.map(subEncoder_1);\n if (_this._types[subtype_1]) {\n result = result.map(keccak256_1.keccak256);\n }\n return (0, keccak256_1.keccak256)((0, bytes_1.hexConcat)(result));\n };\n }\n var fields = this.types[type];\n if (fields) {\n var encodedType_1 = (0, id_1.id)(this._types[type]);\n return function(value) {\n var values = fields.map(function(_a) {\n var name = _a.name, type2 = _a.type;\n var result = _this.getEncoder(type2)(value[name]);\n if (_this._types[type2]) {\n return (0, keccak256_1.keccak256)(result);\n }\n return result;\n });\n values.unshift(encodedType_1);\n return (0, bytes_1.hexConcat)(values);\n };\n }\n return logger.throwArgumentError(\"unknown type: \" + type, \"type\", type);\n };\n TypedDataEncoder2.prototype.encodeType = function(name) {\n var result = this._types[name];\n if (!result) {\n logger.throwArgumentError(\"unknown type: \" + JSON.stringify(name), \"name\", name);\n }\n return result;\n };\n TypedDataEncoder2.prototype.encodeData = function(type, value) {\n return this.getEncoder(type)(value);\n };\n TypedDataEncoder2.prototype.hashStruct = function(name, value) {\n return (0, keccak256_1.keccak256)(this.encodeData(name, value));\n };\n TypedDataEncoder2.prototype.encode = function(value) {\n return this.encodeData(this.primaryType, value);\n };\n TypedDataEncoder2.prototype.hash = function(value) {\n return this.hashStruct(this.primaryType, value);\n };\n TypedDataEncoder2.prototype._visit = function(type, value, callback) {\n var _this = this;\n {\n var encoder6 = getBaseEncoder(type);\n if (encoder6) {\n return callback(type, value);\n }\n }\n var match = type.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n var subtype_2 = match[1];\n var length_2 = parseInt(match[3]);\n if (length_2 >= 0 && value.length !== length_2) {\n logger.throwArgumentError(\"array length mismatch; expected length ${ arrayLength }\", \"value\", value);\n }\n return value.map(function(v2) {\n return _this._visit(subtype_2, v2, callback);\n });\n }\n var fields = this.types[type];\n if (fields) {\n return fields.reduce(function(accum, _a) {\n var name = _a.name, type2 = _a.type;\n accum[name] = _this._visit(type2, value[name], callback);\n return accum;\n }, {});\n }\n return logger.throwArgumentError(\"unknown type: \" + type, \"type\", type);\n };\n TypedDataEncoder2.prototype.visit = function(value, callback) {\n return this._visit(this.primaryType, value, callback);\n };\n TypedDataEncoder2.from = function(types) {\n return new TypedDataEncoder2(types);\n };\n TypedDataEncoder2.getPrimaryType = function(types) {\n return TypedDataEncoder2.from(types).primaryType;\n };\n TypedDataEncoder2.hashStruct = function(name, types, value) {\n return TypedDataEncoder2.from(types).hashStruct(name, value);\n };\n TypedDataEncoder2.hashDomain = function(domain2) {\n var domainFields = [];\n for (var name_3 in domain2) {\n var type = domainFieldTypes[name_3];\n if (!type) {\n logger.throwArgumentError(\"invalid typed-data domain key: \" + JSON.stringify(name_3), \"domain\", domain2);\n }\n domainFields.push({ name: name_3, type });\n }\n domainFields.sort(function(a3, b4) {\n return domainFieldNames.indexOf(a3.name) - domainFieldNames.indexOf(b4.name);\n });\n return TypedDataEncoder2.hashStruct(\"EIP712Domain\", { EIP712Domain: domainFields }, domain2);\n };\n TypedDataEncoder2.encode = function(domain2, types, value) {\n return (0, bytes_1.hexConcat)([\n \"0x1901\",\n TypedDataEncoder2.hashDomain(domain2),\n TypedDataEncoder2.from(types).hash(value)\n ]);\n };\n TypedDataEncoder2.hash = function(domain2, types, value) {\n return (0, keccak256_1.keccak256)(TypedDataEncoder2.encode(domain2, types, value));\n };\n TypedDataEncoder2.resolveNames = function(domain2, types, value, resolveName) {\n return __awaiter4(this, void 0, void 0, function() {\n var ensCache, encoder6, _a, _b, _i, name_4, _c, _d;\n return __generator4(this, function(_e) {\n switch (_e.label) {\n case 0:\n domain2 = (0, properties_1.shallowCopy)(domain2);\n ensCache = {};\n if (domain2.verifyingContract && !(0, bytes_1.isHexString)(domain2.verifyingContract, 20)) {\n ensCache[domain2.verifyingContract] = \"0x\";\n }\n encoder6 = TypedDataEncoder2.from(types);\n encoder6.visit(value, function(type, value2) {\n if (type === \"address\" && !(0, bytes_1.isHexString)(value2, 20)) {\n ensCache[value2] = \"0x\";\n }\n return value2;\n });\n _a = [];\n for (_b in ensCache)\n _a.push(_b);\n _i = 0;\n _e.label = 1;\n case 1:\n if (!(_i < _a.length))\n return [3, 4];\n name_4 = _a[_i];\n _c = ensCache;\n _d = name_4;\n return [4, resolveName(name_4)];\n case 2:\n _c[_d] = _e.sent();\n _e.label = 3;\n case 3:\n _i++;\n return [3, 1];\n case 4:\n if (domain2.verifyingContract && ensCache[domain2.verifyingContract]) {\n domain2.verifyingContract = ensCache[domain2.verifyingContract];\n }\n value = encoder6.visit(value, function(type, value2) {\n if (type === \"address\" && ensCache[value2]) {\n return ensCache[value2];\n }\n return value2;\n });\n return [2, { domain: domain2, value }];\n }\n });\n });\n };\n TypedDataEncoder2.getPayload = function(domain2, types, value) {\n TypedDataEncoder2.hashDomain(domain2);\n var domainValues = {};\n var domainTypes = [];\n domainFieldNames.forEach(function(name) {\n var value2 = domain2[name];\n if (value2 == null) {\n return;\n }\n domainValues[name] = domainChecks[name](value2);\n domainTypes.push({ name, type: domainFieldTypes[name] });\n });\n var encoder6 = TypedDataEncoder2.from(types);\n var typesWithDomain = (0, properties_1.shallowCopy)(types);\n if (typesWithDomain.EIP712Domain) {\n logger.throwArgumentError(\"types must not contain EIP712Domain type\", \"types.EIP712Domain\", types);\n } else {\n typesWithDomain.EIP712Domain = domainTypes;\n }\n encoder6.encode(value);\n return {\n types: typesWithDomain,\n domain: domainValues,\n primaryType: encoder6.primaryType,\n message: encoder6.visit(value, function(type, value2) {\n if (type.match(/^bytes(\\d*)/)) {\n return (0, bytes_1.hexlify)((0, bytes_1.arrayify)(value2));\n }\n if (type.match(/^u?int/)) {\n return bignumber_1.BigNumber.from(value2).toString();\n }\n switch (type) {\n case \"address\":\n return value2.toLowerCase();\n case \"bool\":\n return !!value2;\n case \"string\":\n if (typeof value2 !== \"string\") {\n logger.throwArgumentError(\"invalid string\", \"value\", value2);\n }\n return value2;\n }\n return logger.throwArgumentError(\"unsupported type\", \"type\", type);\n })\n };\n };\n return TypedDataEncoder2;\n }()\n );\n exports3.TypedDataEncoder = TypedDataEncoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/index.js\n var require_lib12 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3._TypedDataEncoder = exports3.hashMessage = exports3.messagePrefix = exports3.ensNormalize = exports3.isValidName = exports3.namehash = exports3.dnsEncode = exports3.id = void 0;\n var id_1 = require_id();\n Object.defineProperty(exports3, \"id\", { enumerable: true, get: function() {\n return id_1.id;\n } });\n var namehash_1 = require_namehash();\n Object.defineProperty(exports3, \"dnsEncode\", { enumerable: true, get: function() {\n return namehash_1.dnsEncode;\n } });\n Object.defineProperty(exports3, \"isValidName\", { enumerable: true, get: function() {\n return namehash_1.isValidName;\n } });\n Object.defineProperty(exports3, \"namehash\", { enumerable: true, get: function() {\n return namehash_1.namehash;\n } });\n var message_1 = require_message();\n Object.defineProperty(exports3, \"hashMessage\", { enumerable: true, get: function() {\n return message_1.hashMessage;\n } });\n Object.defineProperty(exports3, \"messagePrefix\", { enumerable: true, get: function() {\n return message_1.messagePrefix;\n } });\n var namehash_2 = require_namehash();\n Object.defineProperty(exports3, \"ensNormalize\", { enumerable: true, get: function() {\n return namehash_2.ensNormalize;\n } });\n var typed_data_1 = require_typed_data();\n Object.defineProperty(exports3, \"_TypedDataEncoder\", { enumerable: true, get: function() {\n return typed_data_1.TypedDataEncoder;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/interface.js\n var require_interface = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/interface.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Interface = exports3.Indexed = exports3.ErrorDescription = exports3.TransactionDescription = exports3.LogDescription = exports3.checkResultErrors = void 0;\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var hash_1 = require_lib12();\n var keccak256_1 = require_lib5();\n var properties_1 = require_lib4();\n var abi_coder_1 = require_abi_coder();\n var abstract_coder_1 = require_abstract_coder();\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return abstract_coder_1.checkResultErrors;\n } });\n var fragments_1 = require_fragments();\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n var LogDescription = (\n /** @class */\n function(_super) {\n __extends4(LogDescription2, _super);\n function LogDescription2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return LogDescription2;\n }(properties_1.Description)\n );\n exports3.LogDescription = LogDescription;\n var TransactionDescription = (\n /** @class */\n function(_super) {\n __extends4(TransactionDescription2, _super);\n function TransactionDescription2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return TransactionDescription2;\n }(properties_1.Description)\n );\n exports3.TransactionDescription = TransactionDescription;\n var ErrorDescription = (\n /** @class */\n function(_super) {\n __extends4(ErrorDescription2, _super);\n function ErrorDescription2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ErrorDescription2;\n }(properties_1.Description)\n );\n exports3.ErrorDescription = ErrorDescription;\n var Indexed = (\n /** @class */\n function(_super) {\n __extends4(Indexed2, _super);\n function Indexed2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Indexed2.isIndexed = function(value) {\n return !!(value && value._isIndexed);\n };\n return Indexed2;\n }(properties_1.Description)\n );\n exports3.Indexed = Indexed;\n var BuiltinErrors = {\n \"0x08c379a0\": { signature: \"Error(string)\", name: \"Error\", inputs: [\"string\"], reason: true },\n \"0x4e487b71\": { signature: \"Panic(uint256)\", name: \"Panic\", inputs: [\"uint256\"] }\n };\n function wrapAccessError(property, error) {\n var wrap3 = new Error(\"deferred error during ABI decoding triggered accessing \" + property);\n wrap3.error = error;\n return wrap3;\n }\n var Interface = (\n /** @class */\n function() {\n function Interface2(fragments) {\n var _newTarget = this.constructor;\n var _this = this;\n var abi2 = [];\n if (typeof fragments === \"string\") {\n abi2 = JSON.parse(fragments);\n } else {\n abi2 = fragments;\n }\n (0, properties_1.defineReadOnly)(this, \"fragments\", abi2.map(function(fragment) {\n return fragments_1.Fragment.from(fragment);\n }).filter(function(fragment) {\n return fragment != null;\n }));\n (0, properties_1.defineReadOnly)(this, \"_abiCoder\", (0, properties_1.getStatic)(_newTarget, \"getAbiCoder\")());\n (0, properties_1.defineReadOnly)(this, \"functions\", {});\n (0, properties_1.defineReadOnly)(this, \"errors\", {});\n (0, properties_1.defineReadOnly)(this, \"events\", {});\n (0, properties_1.defineReadOnly)(this, \"structs\", {});\n this.fragments.forEach(function(fragment) {\n var bucket = null;\n switch (fragment.type) {\n case \"constructor\":\n if (_this.deploy) {\n logger.warn(\"duplicate definition - constructor\");\n return;\n }\n (0, properties_1.defineReadOnly)(_this, \"deploy\", fragment);\n return;\n case \"function\":\n bucket = _this.functions;\n break;\n case \"event\":\n bucket = _this.events;\n break;\n case \"error\":\n bucket = _this.errors;\n break;\n default:\n return;\n }\n var signature = fragment.format();\n if (bucket[signature]) {\n logger.warn(\"duplicate definition - \" + signature);\n return;\n }\n bucket[signature] = fragment;\n });\n if (!this.deploy) {\n (0, properties_1.defineReadOnly)(this, \"deploy\", fragments_1.ConstructorFragment.from({\n payable: false,\n type: \"constructor\"\n }));\n }\n (0, properties_1.defineReadOnly)(this, \"_isInterface\", true);\n }\n Interface2.prototype.format = function(format) {\n if (!format) {\n format = fragments_1.FormatTypes.full;\n }\n if (format === fragments_1.FormatTypes.sighash) {\n logger.throwArgumentError(\"interface does not support formatting sighash\", \"format\", format);\n }\n var abi2 = this.fragments.map(function(fragment) {\n return fragment.format(format);\n });\n if (format === fragments_1.FormatTypes.json) {\n return JSON.stringify(abi2.map(function(j2) {\n return JSON.parse(j2);\n }));\n }\n return abi2;\n };\n Interface2.getAbiCoder = function() {\n return abi_coder_1.defaultAbiCoder;\n };\n Interface2.getAddress = function(address) {\n return (0, address_1.getAddress)(address);\n };\n Interface2.getSighash = function(fragment) {\n return (0, bytes_1.hexDataSlice)((0, hash_1.id)(fragment.format()), 0, 4);\n };\n Interface2.getEventTopic = function(eventFragment) {\n return (0, hash_1.id)(eventFragment.format());\n };\n Interface2.prototype.getFunction = function(nameOrSignatureOrSighash) {\n if ((0, bytes_1.isHexString)(nameOrSignatureOrSighash)) {\n for (var name_1 in this.functions) {\n if (nameOrSignatureOrSighash === this.getSighash(name_1)) {\n return this.functions[name_1];\n }\n }\n logger.throwArgumentError(\"no matching function\", \"sighash\", nameOrSignatureOrSighash);\n }\n if (nameOrSignatureOrSighash.indexOf(\"(\") === -1) {\n var name_2 = nameOrSignatureOrSighash.trim();\n var matching = Object.keys(this.functions).filter(function(f7) {\n return f7.split(\n \"(\"\n /* fix:) */\n )[0] === name_2;\n });\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching function\", \"name\", name_2);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching functions\", \"name\", name_2);\n }\n return this.functions[matching[0]];\n }\n var result = this.functions[fragments_1.FunctionFragment.fromString(nameOrSignatureOrSighash).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching function\", \"signature\", nameOrSignatureOrSighash);\n }\n return result;\n };\n Interface2.prototype.getEvent = function(nameOrSignatureOrTopic) {\n if ((0, bytes_1.isHexString)(nameOrSignatureOrTopic)) {\n var topichash = nameOrSignatureOrTopic.toLowerCase();\n for (var name_3 in this.events) {\n if (topichash === this.getEventTopic(name_3)) {\n return this.events[name_3];\n }\n }\n logger.throwArgumentError(\"no matching event\", \"topichash\", topichash);\n }\n if (nameOrSignatureOrTopic.indexOf(\"(\") === -1) {\n var name_4 = nameOrSignatureOrTopic.trim();\n var matching = Object.keys(this.events).filter(function(f7) {\n return f7.split(\n \"(\"\n /* fix:) */\n )[0] === name_4;\n });\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching event\", \"name\", name_4);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching events\", \"name\", name_4);\n }\n return this.events[matching[0]];\n }\n var result = this.events[fragments_1.EventFragment.fromString(nameOrSignatureOrTopic).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching event\", \"signature\", nameOrSignatureOrTopic);\n }\n return result;\n };\n Interface2.prototype.getError = function(nameOrSignatureOrSighash) {\n if ((0, bytes_1.isHexString)(nameOrSignatureOrSighash)) {\n var getSighash = (0, properties_1.getStatic)(this.constructor, \"getSighash\");\n for (var name_5 in this.errors) {\n var error = this.errors[name_5];\n if (nameOrSignatureOrSighash === getSighash(error)) {\n return this.errors[name_5];\n }\n }\n logger.throwArgumentError(\"no matching error\", \"sighash\", nameOrSignatureOrSighash);\n }\n if (nameOrSignatureOrSighash.indexOf(\"(\") === -1) {\n var name_6 = nameOrSignatureOrSighash.trim();\n var matching = Object.keys(this.errors).filter(function(f7) {\n return f7.split(\n \"(\"\n /* fix:) */\n )[0] === name_6;\n });\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching error\", \"name\", name_6);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching errors\", \"name\", name_6);\n }\n return this.errors[matching[0]];\n }\n var result = this.errors[fragments_1.FunctionFragment.fromString(nameOrSignatureOrSighash).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching error\", \"signature\", nameOrSignatureOrSighash);\n }\n return result;\n };\n Interface2.prototype.getSighash = function(fragment) {\n if (typeof fragment === \"string\") {\n try {\n fragment = this.getFunction(fragment);\n } catch (error) {\n try {\n fragment = this.getError(fragment);\n } catch (_2) {\n throw error;\n }\n }\n }\n return (0, properties_1.getStatic)(this.constructor, \"getSighash\")(fragment);\n };\n Interface2.prototype.getEventTopic = function(eventFragment) {\n if (typeof eventFragment === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n return (0, properties_1.getStatic)(this.constructor, \"getEventTopic\")(eventFragment);\n };\n Interface2.prototype._decodeParams = function(params, data) {\n return this._abiCoder.decode(params, data);\n };\n Interface2.prototype._encodeParams = function(params, values) {\n return this._abiCoder.encode(params, values);\n };\n Interface2.prototype.encodeDeploy = function(values) {\n return this._encodeParams(this.deploy.inputs, values || []);\n };\n Interface2.prototype.decodeErrorResult = function(fragment, data) {\n if (typeof fragment === \"string\") {\n fragment = this.getError(fragment);\n }\n var bytes = (0, bytes_1.arrayify)(data);\n if ((0, bytes_1.hexlify)(bytes.slice(0, 4)) !== this.getSighash(fragment)) {\n logger.throwArgumentError(\"data signature does not match error \" + fragment.name + \".\", \"data\", (0, bytes_1.hexlify)(bytes));\n }\n return this._decodeParams(fragment.inputs, bytes.slice(4));\n };\n Interface2.prototype.encodeErrorResult = function(fragment, values) {\n if (typeof fragment === \"string\") {\n fragment = this.getError(fragment);\n }\n return (0, bytes_1.hexlify)((0, bytes_1.concat)([\n this.getSighash(fragment),\n this._encodeParams(fragment.inputs, values || [])\n ]));\n };\n Interface2.prototype.decodeFunctionData = function(functionFragment, data) {\n if (typeof functionFragment === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n var bytes = (0, bytes_1.arrayify)(data);\n if ((0, bytes_1.hexlify)(bytes.slice(0, 4)) !== this.getSighash(functionFragment)) {\n logger.throwArgumentError(\"data signature does not match function \" + functionFragment.name + \".\", \"data\", (0, bytes_1.hexlify)(bytes));\n }\n return this._decodeParams(functionFragment.inputs, bytes.slice(4));\n };\n Interface2.prototype.encodeFunctionData = function(functionFragment, values) {\n if (typeof functionFragment === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n return (0, bytes_1.hexlify)((0, bytes_1.concat)([\n this.getSighash(functionFragment),\n this._encodeParams(functionFragment.inputs, values || [])\n ]));\n };\n Interface2.prototype.decodeFunctionResult = function(functionFragment, data) {\n if (typeof functionFragment === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n var bytes = (0, bytes_1.arrayify)(data);\n var reason = null;\n var message = \"\";\n var errorArgs = null;\n var errorName = null;\n var errorSignature = null;\n switch (bytes.length % this._abiCoder._getWordSize()) {\n case 0:\n try {\n return this._abiCoder.decode(functionFragment.outputs, bytes);\n } catch (error2) {\n }\n break;\n case 4: {\n var selector = (0, bytes_1.hexlify)(bytes.slice(0, 4));\n var builtin = BuiltinErrors[selector];\n if (builtin) {\n errorArgs = this._abiCoder.decode(builtin.inputs, bytes.slice(4));\n errorName = builtin.name;\n errorSignature = builtin.signature;\n if (builtin.reason) {\n reason = errorArgs[0];\n }\n if (errorName === \"Error\") {\n message = \"; VM Exception while processing transaction: reverted with reason string \" + JSON.stringify(errorArgs[0]);\n } else if (errorName === \"Panic\") {\n message = \"; VM Exception while processing transaction: reverted with panic code \" + errorArgs[0];\n }\n } else {\n try {\n var error = this.getError(selector);\n errorArgs = this._abiCoder.decode(error.inputs, bytes.slice(4));\n errorName = error.name;\n errorSignature = error.format();\n } catch (error2) {\n }\n }\n break;\n }\n }\n return logger.throwError(\"call revert exception\" + message, logger_1.Logger.errors.CALL_EXCEPTION, {\n method: functionFragment.format(),\n data: (0, bytes_1.hexlify)(data),\n errorArgs,\n errorName,\n errorSignature,\n reason\n });\n };\n Interface2.prototype.encodeFunctionResult = function(functionFragment, values) {\n if (typeof functionFragment === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n return (0, bytes_1.hexlify)(this._abiCoder.encode(functionFragment.outputs, values || []));\n };\n Interface2.prototype.encodeFilterTopics = function(eventFragment, values) {\n var _this = this;\n if (typeof eventFragment === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n if (values.length > eventFragment.inputs.length) {\n logger.throwError(\"too many arguments for \" + eventFragment.format(), logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {\n argument: \"values\",\n value: values\n });\n }\n var topics = [];\n if (!eventFragment.anonymous) {\n topics.push(this.getEventTopic(eventFragment));\n }\n var encodeTopic = function(param, value) {\n if (param.type === \"string\") {\n return (0, hash_1.id)(value);\n } else if (param.type === \"bytes\") {\n return (0, keccak256_1.keccak256)((0, bytes_1.hexlify)(value));\n }\n if (param.type === \"bool\" && typeof value === \"boolean\") {\n value = value ? \"0x01\" : \"0x00\";\n }\n if (param.type.match(/^u?int/)) {\n value = bignumber_1.BigNumber.from(value).toHexString();\n }\n if (param.type === \"address\") {\n _this._abiCoder.encode([\"address\"], [value]);\n }\n return (0, bytes_1.hexZeroPad)((0, bytes_1.hexlify)(value), 32);\n };\n values.forEach(function(value, index2) {\n var param = eventFragment.inputs[index2];\n if (!param.indexed) {\n if (value != null) {\n logger.throwArgumentError(\"cannot filter non-indexed parameters; must be null\", \"contract.\" + param.name, value);\n }\n return;\n }\n if (value == null) {\n topics.push(null);\n } else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n logger.throwArgumentError(\"filtering with tuples or arrays not supported\", \"contract.\" + param.name, value);\n } else if (Array.isArray(value)) {\n topics.push(value.map(function(value2) {\n return encodeTopic(param, value2);\n }));\n } else {\n topics.push(encodeTopic(param, value));\n }\n });\n while (topics.length && topics[topics.length - 1] === null) {\n topics.pop();\n }\n return topics;\n };\n Interface2.prototype.encodeEventLog = function(eventFragment, values) {\n var _this = this;\n if (typeof eventFragment === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n var topics = [];\n var dataTypes = [];\n var dataValues = [];\n if (!eventFragment.anonymous) {\n topics.push(this.getEventTopic(eventFragment));\n }\n if (values.length !== eventFragment.inputs.length) {\n logger.throwArgumentError(\"event arguments/values mismatch\", \"values\", values);\n }\n eventFragment.inputs.forEach(function(param, index2) {\n var value = values[index2];\n if (param.indexed) {\n if (param.type === \"string\") {\n topics.push((0, hash_1.id)(value));\n } else if (param.type === \"bytes\") {\n topics.push((0, keccak256_1.keccak256)(value));\n } else if (param.baseType === \"tuple\" || param.baseType === \"array\") {\n throw new Error(\"not implemented\");\n } else {\n topics.push(_this._abiCoder.encode([param.type], [value]));\n }\n } else {\n dataTypes.push(param);\n dataValues.push(value);\n }\n });\n return {\n data: this._abiCoder.encode(dataTypes, dataValues),\n topics\n };\n };\n Interface2.prototype.decodeEventLog = function(eventFragment, data, topics) {\n if (typeof eventFragment === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n if (topics != null && !eventFragment.anonymous) {\n var topicHash = this.getEventTopic(eventFragment);\n if (!(0, bytes_1.isHexString)(topics[0], 32) || topics[0].toLowerCase() !== topicHash) {\n logger.throwError(\"fragment/topic mismatch\", logger_1.Logger.errors.INVALID_ARGUMENT, { argument: \"topics[0]\", expected: topicHash, value: topics[0] });\n }\n topics = topics.slice(1);\n }\n var indexed = [];\n var nonIndexed = [];\n var dynamic = [];\n eventFragment.inputs.forEach(function(param, index2) {\n if (param.indexed) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.baseType === \"tuple\" || param.baseType === \"array\") {\n indexed.push(fragments_1.ParamType.fromObject({ type: \"bytes32\", name: param.name }));\n dynamic.push(true);\n } else {\n indexed.push(param);\n dynamic.push(false);\n }\n } else {\n nonIndexed.push(param);\n dynamic.push(false);\n }\n });\n var resultIndexed = topics != null ? this._abiCoder.decode(indexed, (0, bytes_1.concat)(topics)) : null;\n var resultNonIndexed = this._abiCoder.decode(nonIndexed, data, true);\n var result = [];\n var nonIndexedIndex = 0, indexedIndex = 0;\n eventFragment.inputs.forEach(function(param, index2) {\n if (param.indexed) {\n if (resultIndexed == null) {\n result[index2] = new Indexed({ _isIndexed: true, hash: null });\n } else if (dynamic[index2]) {\n result[index2] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] });\n } else {\n try {\n result[index2] = resultIndexed[indexedIndex++];\n } catch (error) {\n result[index2] = error;\n }\n }\n } else {\n try {\n result[index2] = resultNonIndexed[nonIndexedIndex++];\n } catch (error) {\n result[index2] = error;\n }\n }\n if (param.name && result[param.name] == null) {\n var value_1 = result[index2];\n if (value_1 instanceof Error) {\n Object.defineProperty(result, param.name, {\n enumerable: true,\n get: function() {\n throw wrapAccessError(\"property \" + JSON.stringify(param.name), value_1);\n }\n });\n } else {\n result[param.name] = value_1;\n }\n }\n });\n var _loop_1 = function(i4) {\n var value = result[i4];\n if (value instanceof Error) {\n Object.defineProperty(result, i4, {\n enumerable: true,\n get: function() {\n throw wrapAccessError(\"index \" + i4, value);\n }\n });\n }\n };\n for (var i3 = 0; i3 < result.length; i3++) {\n _loop_1(i3);\n }\n return Object.freeze(result);\n };\n Interface2.prototype.parseTransaction = function(tx) {\n var fragment = this.getFunction(tx.data.substring(0, 10).toLowerCase());\n if (!fragment) {\n return null;\n }\n return new TransactionDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + tx.data.substring(10)),\n functionFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n sighash: this.getSighash(fragment),\n value: bignumber_1.BigNumber.from(tx.value || \"0\")\n });\n };\n Interface2.prototype.parseLog = function(log) {\n var fragment = this.getEvent(log.topics[0]);\n if (!fragment || fragment.anonymous) {\n return null;\n }\n return new LogDescription({\n eventFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n topic: this.getEventTopic(fragment),\n args: this.decodeEventLog(fragment, log.data, log.topics)\n });\n };\n Interface2.prototype.parseError = function(data) {\n var hexData = (0, bytes_1.hexlify)(data);\n var fragment = this.getError(hexData.substring(0, 10).toLowerCase());\n if (!fragment) {\n return null;\n }\n return new ErrorDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + hexData.substring(10)),\n errorFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n sighash: this.getSighash(fragment)\n });\n };\n Interface2.isInterface = function(value) {\n return !!(value && value._isInterface);\n };\n return Interface2;\n }()\n );\n exports3.Interface = Interface;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/index.js\n var require_lib13 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TransactionDescription = exports3.LogDescription = exports3.checkResultErrors = exports3.Indexed = exports3.Interface = exports3.defaultAbiCoder = exports3.AbiCoder = exports3.FormatTypes = exports3.ParamType = exports3.FunctionFragment = exports3.Fragment = exports3.EventFragment = exports3.ErrorFragment = exports3.ConstructorFragment = void 0;\n var fragments_1 = require_fragments();\n Object.defineProperty(exports3, \"ConstructorFragment\", { enumerable: true, get: function() {\n return fragments_1.ConstructorFragment;\n } });\n Object.defineProperty(exports3, \"ErrorFragment\", { enumerable: true, get: function() {\n return fragments_1.ErrorFragment;\n } });\n Object.defineProperty(exports3, \"EventFragment\", { enumerable: true, get: function() {\n return fragments_1.EventFragment;\n } });\n Object.defineProperty(exports3, \"FormatTypes\", { enumerable: true, get: function() {\n return fragments_1.FormatTypes;\n } });\n Object.defineProperty(exports3, \"Fragment\", { enumerable: true, get: function() {\n return fragments_1.Fragment;\n } });\n Object.defineProperty(exports3, \"FunctionFragment\", { enumerable: true, get: function() {\n return fragments_1.FunctionFragment;\n } });\n Object.defineProperty(exports3, \"ParamType\", { enumerable: true, get: function() {\n return fragments_1.ParamType;\n } });\n var abi_coder_1 = require_abi_coder();\n Object.defineProperty(exports3, \"AbiCoder\", { enumerable: true, get: function() {\n return abi_coder_1.AbiCoder;\n } });\n Object.defineProperty(exports3, \"defaultAbiCoder\", { enumerable: true, get: function() {\n return abi_coder_1.defaultAbiCoder;\n } });\n var interface_1 = require_interface();\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return interface_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"Indexed\", { enumerable: true, get: function() {\n return interface_1.Indexed;\n } });\n Object.defineProperty(exports3, \"Interface\", { enumerable: true, get: function() {\n return interface_1.Interface;\n } });\n Object.defineProperty(exports3, \"LogDescription\", { enumerable: true, get: function() {\n return interface_1.LogDescription;\n } });\n Object.defineProperty(exports3, \"TransactionDescription\", { enumerable: true, get: function() {\n return interface_1.TransactionDescription;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.8.0/node_modules/@ethersproject/abstract-provider/lib/_version.js\n var require_version10 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.8.0/node_modules/@ethersproject/abstract-provider/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"abstract-provider/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.8.0/node_modules/@ethersproject/abstract-provider/lib/index.js\n var require_lib14 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.8.0/node_modules/@ethersproject/abstract-provider/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Provider = exports3.TransactionOrderForkEvent = exports3.TransactionForkEvent = exports3.BlockForkEvent = exports3.ForkEvent = void 0;\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version10();\n var logger = new logger_1.Logger(_version_1.version);\n var ForkEvent = (\n /** @class */\n function(_super) {\n __extends4(ForkEvent2, _super);\n function ForkEvent2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ForkEvent2.isForkEvent = function(value) {\n return !!(value && value._isForkEvent);\n };\n return ForkEvent2;\n }(properties_1.Description)\n );\n exports3.ForkEvent = ForkEvent;\n var BlockForkEvent = (\n /** @class */\n function(_super) {\n __extends4(BlockForkEvent2, _super);\n function BlockForkEvent2(blockHash, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(blockHash, 32)) {\n logger.throwArgumentError(\"invalid blockHash\", \"blockHash\", blockHash);\n }\n _this = _super.call(this, {\n _isForkEvent: true,\n _isBlockForkEvent: true,\n expiry: expiry || 0,\n blockHash\n }) || this;\n return _this;\n }\n return BlockForkEvent2;\n }(ForkEvent)\n );\n exports3.BlockForkEvent = BlockForkEvent;\n var TransactionForkEvent = (\n /** @class */\n function(_super) {\n __extends4(TransactionForkEvent2, _super);\n function TransactionForkEvent2(hash3, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(hash3, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"hash\", hash3);\n }\n _this = _super.call(this, {\n _isForkEvent: true,\n _isTransactionForkEvent: true,\n expiry: expiry || 0,\n hash: hash3\n }) || this;\n return _this;\n }\n return TransactionForkEvent2;\n }(ForkEvent)\n );\n exports3.TransactionForkEvent = TransactionForkEvent;\n var TransactionOrderForkEvent = (\n /** @class */\n function(_super) {\n __extends4(TransactionOrderForkEvent2, _super);\n function TransactionOrderForkEvent2(beforeHash, afterHash, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(beforeHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"beforeHash\", beforeHash);\n }\n if (!(0, bytes_1.isHexString)(afterHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"afterHash\", afterHash);\n }\n _this = _super.call(this, {\n _isForkEvent: true,\n _isTransactionOrderForkEvent: true,\n expiry: expiry || 0,\n beforeHash,\n afterHash\n }) || this;\n return _this;\n }\n return TransactionOrderForkEvent2;\n }(ForkEvent)\n );\n exports3.TransactionOrderForkEvent = TransactionOrderForkEvent;\n var Provider = (\n /** @class */\n function() {\n function Provider2() {\n var _newTarget = this.constructor;\n logger.checkAbstract(_newTarget, Provider2);\n (0, properties_1.defineReadOnly)(this, \"_isProvider\", true);\n }\n Provider2.prototype.getFeeData = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var _a, block, gasPrice, lastBaseFeePerGas, maxFeePerGas, maxPriorityFeePerGas;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n return [4, (0, properties_1.resolveProperties)({\n block: this.getBlock(\"latest\"),\n gasPrice: this.getGasPrice().catch(function(error) {\n return null;\n })\n })];\n case 1:\n _a = _b.sent(), block = _a.block, gasPrice = _a.gasPrice;\n lastBaseFeePerGas = null, maxFeePerGas = null, maxPriorityFeePerGas = null;\n if (block && block.baseFeePerGas) {\n lastBaseFeePerGas = block.baseFeePerGas;\n maxPriorityFeePerGas = bignumber_1.BigNumber.from(\"1500000000\");\n maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas);\n }\n return [2, { lastBaseFeePerGas, maxFeePerGas, maxPriorityFeePerGas, gasPrice }];\n }\n });\n });\n };\n Provider2.prototype.addListener = function(eventName, listener) {\n return this.on(eventName, listener);\n };\n Provider2.prototype.removeListener = function(eventName, listener) {\n return this.off(eventName, listener);\n };\n Provider2.isProvider = function(value) {\n return !!(value && value._isProvider);\n };\n return Provider2;\n }()\n );\n exports3.Provider = Provider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abstract-signer@5.8.0/node_modules/@ethersproject/abstract-signer/lib/_version.js\n var require_version11 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abstract-signer@5.8.0/node_modules/@ethersproject/abstract-signer/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"abstract-signer/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abstract-signer@5.8.0/node_modules/@ethersproject/abstract-signer/lib/index.js\n var require_lib15 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abstract-signer@5.8.0/node_modules/@ethersproject/abstract-signer/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.VoidSigner = exports3.Signer = void 0;\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version11();\n var logger = new logger_1.Logger(_version_1.version);\n var allowedTransactionKeys = [\n \"accessList\",\n \"ccipReadEnabled\",\n \"chainId\",\n \"customData\",\n \"data\",\n \"from\",\n \"gasLimit\",\n \"gasPrice\",\n \"maxFeePerGas\",\n \"maxPriorityFeePerGas\",\n \"nonce\",\n \"to\",\n \"type\",\n \"value\"\n ];\n var forwardErrors = [\n logger_1.Logger.errors.INSUFFICIENT_FUNDS,\n logger_1.Logger.errors.NONCE_EXPIRED,\n logger_1.Logger.errors.REPLACEMENT_UNDERPRICED\n ];\n var Signer = (\n /** @class */\n function() {\n function Signer2() {\n var _newTarget = this.constructor;\n logger.checkAbstract(_newTarget, Signer2);\n (0, properties_1.defineReadOnly)(this, \"_isSigner\", true);\n }\n Signer2.prototype.getBalance = function(blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getBalance\");\n return [4, this.provider.getBalance(this.getAddress(), blockTag)];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.getTransactionCount = function(blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getTransactionCount\");\n return [4, this.provider.getTransactionCount(this.getAddress(), blockTag)];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.estimateGas = function(transaction) {\n return __awaiter4(this, void 0, void 0, function() {\n var tx;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"estimateGas\");\n return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))];\n case 1:\n tx = _a.sent();\n return [4, this.provider.estimateGas(tx)];\n case 2:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.call = function(transaction, blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var tx;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"call\");\n return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))];\n case 1:\n tx = _a.sent();\n return [4, this.provider.call(tx, blockTag)];\n case 2:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.sendTransaction = function(transaction) {\n return __awaiter4(this, void 0, void 0, function() {\n var tx, signedTx;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"sendTransaction\");\n return [4, this.populateTransaction(transaction)];\n case 1:\n tx = _a.sent();\n return [4, this.signTransaction(tx)];\n case 2:\n signedTx = _a.sent();\n return [4, this.provider.sendTransaction(signedTx)];\n case 3:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.getChainId = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var network;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getChainId\");\n return [4, this.provider.getNetwork()];\n case 1:\n network = _a.sent();\n return [2, network.chainId];\n }\n });\n });\n };\n Signer2.prototype.getGasPrice = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getGasPrice\");\n return [4, this.provider.getGasPrice()];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.getFeeData = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getFeeData\");\n return [4, this.provider.getFeeData()];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.resolveName = function(name) {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"resolveName\");\n return [4, this.provider.resolveName(name)];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.checkTransaction = function(transaction) {\n for (var key in transaction) {\n if (allowedTransactionKeys.indexOf(key) === -1) {\n logger.throwArgumentError(\"invalid transaction key: \" + key, \"transaction\", transaction);\n }\n }\n var tx = (0, properties_1.shallowCopy)(transaction);\n if (tx.from == null) {\n tx.from = this.getAddress();\n } else {\n tx.from = Promise.all([\n Promise.resolve(tx.from),\n this.getAddress()\n ]).then(function(result) {\n if (result[0].toLowerCase() !== result[1].toLowerCase()) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n return result[0];\n });\n }\n return tx;\n };\n Signer2.prototype.populateTransaction = function(transaction) {\n return __awaiter4(this, void 0, void 0, function() {\n var tx, hasEip1559, feeData, gasPrice;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))];\n case 1:\n tx = _a.sent();\n if (tx.to != null) {\n tx.to = Promise.resolve(tx.to).then(function(to) {\n return __awaiter4(_this, void 0, void 0, function() {\n var address;\n return __generator4(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (to == null) {\n return [2, null];\n }\n return [4, this.resolveName(to)];\n case 1:\n address = _a2.sent();\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return [2, address];\n }\n });\n });\n });\n tx.to.catch(function(error) {\n });\n }\n hasEip1559 = tx.maxFeePerGas != null || tx.maxPriorityFeePerGas != null;\n if (tx.gasPrice != null && (tx.type === 2 || hasEip1559)) {\n logger.throwArgumentError(\"eip-1559 transaction do not support gasPrice\", \"transaction\", transaction);\n } else if ((tx.type === 0 || tx.type === 1) && hasEip1559) {\n logger.throwArgumentError(\"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas\", \"transaction\", transaction);\n }\n if (!((tx.type === 2 || tx.type == null) && (tx.maxFeePerGas != null && tx.maxPriorityFeePerGas != null)))\n return [3, 2];\n tx.type = 2;\n return [3, 5];\n case 2:\n if (!(tx.type === 0 || tx.type === 1))\n return [3, 3];\n if (tx.gasPrice == null) {\n tx.gasPrice = this.getGasPrice();\n }\n return [3, 5];\n case 3:\n return [4, this.getFeeData()];\n case 4:\n feeData = _a.sent();\n if (tx.type == null) {\n if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) {\n tx.type = 2;\n if (tx.gasPrice != null) {\n gasPrice = tx.gasPrice;\n delete tx.gasPrice;\n tx.maxFeePerGas = gasPrice;\n tx.maxPriorityFeePerGas = gasPrice;\n } else {\n if (tx.maxFeePerGas == null) {\n tx.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (tx.maxPriorityFeePerGas == null) {\n tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n } else if (feeData.gasPrice != null) {\n if (hasEip1559) {\n logger.throwError(\"network does not support EIP-1559\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"populateTransaction\"\n });\n }\n if (tx.gasPrice == null) {\n tx.gasPrice = feeData.gasPrice;\n }\n tx.type = 0;\n } else {\n logger.throwError(\"failed to get consistent fee data\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signer.getFeeData\"\n });\n }\n } else if (tx.type === 2) {\n if (tx.maxFeePerGas == null) {\n tx.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (tx.maxPriorityFeePerGas == null) {\n tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n _a.label = 5;\n case 5:\n if (tx.nonce == null) {\n tx.nonce = this.getTransactionCount(\"pending\");\n }\n if (tx.gasLimit == null) {\n tx.gasLimit = this.estimateGas(tx).catch(function(error) {\n if (forwardErrors.indexOf(error.code) >= 0) {\n throw error;\n }\n return logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error,\n tx\n });\n });\n }\n if (tx.chainId == null) {\n tx.chainId = this.getChainId();\n } else {\n tx.chainId = Promise.all([\n Promise.resolve(tx.chainId),\n this.getChainId()\n ]).then(function(results) {\n if (results[1] !== 0 && results[0] !== results[1]) {\n logger.throwArgumentError(\"chainId address mismatch\", \"transaction\", transaction);\n }\n return results[0];\n });\n }\n return [4, (0, properties_1.resolveProperties)(tx)];\n case 6:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype._checkProvider = function(operation) {\n if (!this.provider) {\n logger.throwError(\"missing provider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: operation || \"_checkProvider\"\n });\n }\n };\n Signer2.isSigner = function(value) {\n return !!(value && value._isSigner);\n };\n return Signer2;\n }()\n );\n exports3.Signer = Signer;\n var VoidSigner = (\n /** @class */\n function(_super) {\n __extends4(VoidSigner2, _super);\n function VoidSigner2(address, provider) {\n var _this = _super.call(this) || this;\n (0, properties_1.defineReadOnly)(_this, \"address\", address);\n (0, properties_1.defineReadOnly)(_this, \"provider\", provider || null);\n return _this;\n }\n VoidSigner2.prototype.getAddress = function() {\n return Promise.resolve(this.address);\n };\n VoidSigner2.prototype._fail = function(message, operation) {\n return Promise.resolve().then(function() {\n logger.throwError(message, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation });\n });\n };\n VoidSigner2.prototype.signMessage = function(message) {\n return this._fail(\"VoidSigner cannot sign messages\", \"signMessage\");\n };\n VoidSigner2.prototype.signTransaction = function(transaction) {\n return this._fail(\"VoidSigner cannot sign transactions\", \"signTransaction\");\n };\n VoidSigner2.prototype._signTypedData = function(domain2, types, value) {\n return this._fail(\"VoidSigner cannot sign typed data\", \"signTypedData\");\n };\n VoidSigner2.prototype.connect = function(provider) {\n return new VoidSigner2(this.address, provider);\n };\n return VoidSigner2;\n }(Signer)\n );\n exports3.VoidSigner = VoidSigner;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/package.json\n var require_package = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/package.json\"(exports3, module) {\n module.exports = {\n name: \"elliptic\",\n version: \"6.6.1\",\n description: \"EC cryptography\",\n main: \"lib/elliptic.js\",\n files: [\n \"lib\"\n ],\n scripts: {\n lint: \"eslint lib test\",\n \"lint:fix\": \"npm run lint -- --fix\",\n unit: \"istanbul test _mocha --reporter=spec test/index.js\",\n test: \"npm run lint && npm run unit\",\n version: \"grunt dist && git add dist/\"\n },\n repository: {\n type: \"git\",\n url: \"git@github.com:indutny/elliptic\"\n },\n keywords: [\n \"EC\",\n \"Elliptic\",\n \"curve\",\n \"Cryptography\"\n ],\n author: \"Fedor Indutny \",\n license: \"MIT\",\n bugs: {\n url: \"https://github.com/indutny/elliptic/issues\"\n },\n homepage: \"https://github.com/indutny/elliptic\",\n devDependencies: {\n brfs: \"^2.0.2\",\n coveralls: \"^3.1.0\",\n eslint: \"^7.6.0\",\n grunt: \"^1.2.1\",\n \"grunt-browserify\": \"^5.3.0\",\n \"grunt-cli\": \"^1.3.2\",\n \"grunt-contrib-connect\": \"^3.0.0\",\n \"grunt-contrib-copy\": \"^1.0.0\",\n \"grunt-contrib-uglify\": \"^5.0.0\",\n \"grunt-mocha-istanbul\": \"^5.0.2\",\n \"grunt-saucelabs\": \"^9.0.1\",\n istanbul: \"^0.4.5\",\n mocha: \"^8.0.1\"\n },\n dependencies: {\n \"bn.js\": \"^4.11.9\",\n brorand: \"^1.1.0\",\n \"hash.js\": \"^1.0.0\",\n \"hmac-drbg\": \"^1.0.1\",\n inherits: \"^2.0.4\",\n \"minimalistic-assert\": \"^1.0.1\",\n \"minimalistic-crypto-utils\": \"^1.0.1\"\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/bn.js@4.12.2/node_modules/bn.js/lib/bn.js\n var require_bn2 = __commonJS({\n \"../../../node_modules/.pnpm/bn.js@4.12.2/node_modules/bn.js/lib/bn.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(module2, exports4) {\n \"use strict\";\n function assert9(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {\n };\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n function BN(number, base4, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n this.negative = 0;\n this.words = null;\n this.length = 0;\n this.red = null;\n if (number !== null) {\n if (base4 === \"le\" || base4 === \"be\") {\n endian = base4;\n base4 = 10;\n }\n this._init(number || 0, base4 || 10, endian || \"be\");\n }\n }\n if (typeof module2 === \"object\") {\n module2.exports = BN;\n } else {\n exports4.BN = BN;\n }\n BN.BN = BN;\n BN.wordSize = 26;\n var Buffer3;\n try {\n if (typeof window !== \"undefined\" && typeof window.Buffer !== \"undefined\") {\n Buffer3 = window.Buffer;\n } else {\n Buffer3 = (init_buffer(), __toCommonJS(buffer_exports)).Buffer;\n }\n } catch (e2) {\n }\n BN.isBN = function isBN(num2) {\n if (num2 instanceof BN) {\n return true;\n }\n return num2 !== null && typeof num2 === \"object\" && num2.constructor.wordSize === BN.wordSize && Array.isArray(num2.words);\n };\n BN.max = function max(left, right) {\n if (left.cmp(right) > 0)\n return left;\n return right;\n };\n BN.min = function min(left, right) {\n if (left.cmp(right) < 0)\n return left;\n return right;\n };\n BN.prototype._init = function init(number, base4, endian) {\n if (typeof number === \"number\") {\n return this._initNumber(number, base4, endian);\n }\n if (typeof number === \"object\") {\n return this._initArray(number, base4, endian);\n }\n if (base4 === \"hex\") {\n base4 = 16;\n }\n assert9(base4 === (base4 | 0) && base4 >= 2 && base4 <= 36);\n number = number.toString().replace(/\\s+/g, \"\");\n var start = 0;\n if (number[0] === \"-\") {\n start++;\n this.negative = 1;\n }\n if (start < number.length) {\n if (base4 === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base4, start);\n if (endian === \"le\") {\n this._initArray(this.toArray(), base4, endian);\n }\n }\n }\n };\n BN.prototype._initNumber = function _initNumber(number, base4, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 67108864) {\n this.words = [number & 67108863];\n this.length = 1;\n } else if (number < 4503599627370496) {\n this.words = [\n number & 67108863,\n number / 67108864 & 67108863\n ];\n this.length = 2;\n } else {\n assert9(number < 9007199254740992);\n this.words = [\n number & 67108863,\n number / 67108864 & 67108863,\n 1\n ];\n this.length = 3;\n }\n if (endian !== \"le\")\n return;\n this._initArray(this.toArray(), base4, endian);\n };\n BN.prototype._initArray = function _initArray(number, base4, endian) {\n assert9(typeof number.length === \"number\");\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = 0;\n }\n var j2, w3;\n var off2 = 0;\n if (endian === \"be\") {\n for (i3 = number.length - 1, j2 = 0; i3 >= 0; i3 -= 3) {\n w3 = number[i3] | number[i3 - 1] << 8 | number[i3 - 2] << 16;\n this.words[j2] |= w3 << off2 & 67108863;\n this.words[j2 + 1] = w3 >>> 26 - off2 & 67108863;\n off2 += 24;\n if (off2 >= 26) {\n off2 -= 26;\n j2++;\n }\n }\n } else if (endian === \"le\") {\n for (i3 = 0, j2 = 0; i3 < number.length; i3 += 3) {\n w3 = number[i3] | number[i3 + 1] << 8 | number[i3 + 2] << 16;\n this.words[j2] |= w3 << off2 & 67108863;\n this.words[j2 + 1] = w3 >>> 26 - off2 & 67108863;\n off2 += 24;\n if (off2 >= 26) {\n off2 -= 26;\n j2++;\n }\n }\n }\n return this.strip();\n };\n function parseHex4Bits(string, index2) {\n var c4 = string.charCodeAt(index2);\n if (c4 >= 65 && c4 <= 70) {\n return c4 - 55;\n } else if (c4 >= 97 && c4 <= 102) {\n return c4 - 87;\n } else {\n return c4 - 48 & 15;\n }\n }\n function parseHexByte(string, lowerBound, index2) {\n var r2 = parseHex4Bits(string, index2);\n if (index2 - 1 >= lowerBound) {\n r2 |= parseHex4Bits(string, index2 - 1) << 4;\n }\n return r2;\n }\n BN.prototype._parseHex = function _parseHex(number, start, endian) {\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = 0;\n }\n var off2 = 0;\n var j2 = 0;\n var w3;\n if (endian === \"be\") {\n for (i3 = number.length - 1; i3 >= start; i3 -= 2) {\n w3 = parseHexByte(number, start, i3) << off2;\n this.words[j2] |= w3 & 67108863;\n if (off2 >= 18) {\n off2 -= 18;\n j2 += 1;\n this.words[j2] |= w3 >>> 26;\n } else {\n off2 += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i3 = parseLength % 2 === 0 ? start + 1 : start; i3 < number.length; i3 += 2) {\n w3 = parseHexByte(number, start, i3) << off2;\n this.words[j2] |= w3 & 67108863;\n if (off2 >= 18) {\n off2 -= 18;\n j2 += 1;\n this.words[j2] |= w3 >>> 26;\n } else {\n off2 += 8;\n }\n }\n }\n this.strip();\n };\n function parseBase(str, start, end, mul) {\n var r2 = 0;\n var len = Math.min(str.length, end);\n for (var i3 = start; i3 < len; i3++) {\n var c4 = str.charCodeAt(i3) - 48;\n r2 *= mul;\n if (c4 >= 49) {\n r2 += c4 - 49 + 10;\n } else if (c4 >= 17) {\n r2 += c4 - 17 + 10;\n } else {\n r2 += c4;\n }\n }\n return r2;\n }\n BN.prototype._parseBase = function _parseBase(number, base4, start) {\n this.words = [0];\n this.length = 1;\n for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base4) {\n limbLen++;\n }\n limbLen--;\n limbPow = limbPow / base4 | 0;\n var total = number.length - start;\n var mod3 = total % limbLen;\n var end = Math.min(total, total - mod3) + start;\n var word = 0;\n for (var i3 = start; i3 < end; i3 += limbLen) {\n word = parseBase(number, i3, i3 + limbLen, base4);\n this.imuln(limbPow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n if (mod3 !== 0) {\n var pow3 = 1;\n word = parseBase(number, i3, number.length, base4);\n for (i3 = 0; i3 < mod3; i3++) {\n pow3 *= base4;\n }\n this.imuln(pow3);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n this.strip();\n };\n BN.prototype.copy = function copy(dest) {\n dest.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n dest.words[i3] = this.words[i3];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n BN.prototype.clone = function clone() {\n var r2 = new BN(null);\n this.copy(r2);\n return r2;\n };\n BN.prototype._expand = function _expand(size6) {\n while (this.length < size6) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n BN.prototype.strip = function strip() {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n BN.prototype._normSign = function _normSign() {\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n BN.prototype.inspect = function inspect() {\n return (this.red ? \"\";\n };\n var zeros = [\n \"\",\n \"0\",\n \"00\",\n \"000\",\n \"0000\",\n \"00000\",\n \"000000\",\n \"0000000\",\n \"00000000\",\n \"000000000\",\n \"0000000000\",\n \"00000000000\",\n \"000000000000\",\n \"0000000000000\",\n \"00000000000000\",\n \"000000000000000\",\n \"0000000000000000\",\n \"00000000000000000\",\n \"000000000000000000\",\n \"0000000000000000000\",\n \"00000000000000000000\",\n \"000000000000000000000\",\n \"0000000000000000000000\",\n \"00000000000000000000000\",\n \"000000000000000000000000\",\n \"0000000000000000000000000\"\n ];\n var groupSizes = [\n 0,\n 0,\n 25,\n 16,\n 12,\n 11,\n 10,\n 9,\n 8,\n 8,\n 7,\n 7,\n 7,\n 7,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5\n ];\n var groupBases = [\n 0,\n 0,\n 33554432,\n 43046721,\n 16777216,\n 48828125,\n 60466176,\n 40353607,\n 16777216,\n 43046721,\n 1e7,\n 19487171,\n 35831808,\n 62748517,\n 7529536,\n 11390625,\n 16777216,\n 24137569,\n 34012224,\n 47045881,\n 64e6,\n 4084101,\n 5153632,\n 6436343,\n 7962624,\n 9765625,\n 11881376,\n 14348907,\n 17210368,\n 20511149,\n 243e5,\n 28629151,\n 33554432,\n 39135393,\n 45435424,\n 52521875,\n 60466176\n ];\n BN.prototype.toString = function toString2(base4, padding) {\n base4 = base4 || 10;\n padding = padding | 0 || 1;\n var out;\n if (base4 === 16 || base4 === \"hex\") {\n out = \"\";\n var off2 = 0;\n var carry = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var w3 = this.words[i3];\n var word = ((w3 << off2 | carry) & 16777215).toString(16);\n carry = w3 >>> 24 - off2 & 16777215;\n off2 += 2;\n if (off2 >= 26) {\n off2 -= 26;\n i3--;\n }\n if (carry !== 0 || i3 !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n if (base4 === (base4 | 0) && base4 >= 2 && base4 <= 36) {\n var groupSize = groupSizes[base4];\n var groupBase = groupBases[base4];\n out = \"\";\n var c4 = this.clone();\n c4.negative = 0;\n while (!c4.isZero()) {\n var r2 = c4.modn(groupBase).toString(base4);\n c4 = c4.idivn(groupBase);\n if (!c4.isZero()) {\n out = zeros[groupSize - r2.length] + r2 + out;\n } else {\n out = r2 + out;\n }\n }\n if (this.isZero()) {\n out = \"0\" + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n assert9(false, \"Base should be between 2 and 36\");\n };\n BN.prototype.toNumber = function toNumber4() {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 67108864;\n } else if (this.length === 3 && this.words[2] === 1) {\n ret += 4503599627370496 + this.words[1] * 67108864;\n } else if (this.length > 2) {\n assert9(false, \"Number can only safely store up to 53 bits\");\n }\n return this.negative !== 0 ? -ret : ret;\n };\n BN.prototype.toJSON = function toJSON() {\n return this.toString(16);\n };\n BN.prototype.toBuffer = function toBuffer(endian, length) {\n assert9(typeof Buffer3 !== \"undefined\");\n return this.toArrayLike(Buffer3, endian, length);\n };\n BN.prototype.toArray = function toArray(endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n BN.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert9(byteLength <= reqLength, \"byte array longer than desired length\");\n assert9(reqLength > 0, \"Requested array length <= 0\");\n this.strip();\n var littleEndian = endian === \"le\";\n var res = new ArrayType(reqLength);\n var b4, i3;\n var q3 = this.clone();\n if (!littleEndian) {\n for (i3 = 0; i3 < reqLength - byteLength; i3++) {\n res[i3] = 0;\n }\n for (i3 = 0; !q3.isZero(); i3++) {\n b4 = q3.andln(255);\n q3.iushrn(8);\n res[reqLength - i3 - 1] = b4;\n }\n } else {\n for (i3 = 0; !q3.isZero(); i3++) {\n b4 = q3.andln(255);\n q3.iushrn(8);\n res[i3] = b4;\n }\n for (; i3 < reqLength; i3++) {\n res[i3] = 0;\n }\n }\n return res;\n };\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits(w3) {\n return 32 - Math.clz32(w3);\n };\n } else {\n BN.prototype._countBits = function _countBits(w3) {\n var t3 = w3;\n var r2 = 0;\n if (t3 >= 4096) {\n r2 += 13;\n t3 >>>= 13;\n }\n if (t3 >= 64) {\n r2 += 7;\n t3 >>>= 7;\n }\n if (t3 >= 8) {\n r2 += 4;\n t3 >>>= 4;\n }\n if (t3 >= 2) {\n r2 += 2;\n t3 >>>= 2;\n }\n return r2 + t3;\n };\n }\n BN.prototype._zeroBits = function _zeroBits(w3) {\n if (w3 === 0)\n return 26;\n var t3 = w3;\n var r2 = 0;\n if ((t3 & 8191) === 0) {\n r2 += 13;\n t3 >>>= 13;\n }\n if ((t3 & 127) === 0) {\n r2 += 7;\n t3 >>>= 7;\n }\n if ((t3 & 15) === 0) {\n r2 += 4;\n t3 >>>= 4;\n }\n if ((t3 & 3) === 0) {\n r2 += 2;\n t3 >>>= 2;\n }\n if ((t3 & 1) === 0) {\n r2++;\n }\n return r2;\n };\n BN.prototype.bitLength = function bitLength() {\n var w3 = this.words[this.length - 1];\n var hi = this._countBits(w3);\n return (this.length - 1) * 26 + hi;\n };\n function toBitArray(num2) {\n var w3 = new Array(num2.bitLength());\n for (var bit = 0; bit < w3.length; bit++) {\n var off2 = bit / 26 | 0;\n var wbit = bit % 26;\n w3[bit] = (num2.words[off2] & 1 << wbit) >>> wbit;\n }\n return w3;\n }\n BN.prototype.zeroBits = function zeroBits() {\n if (this.isZero())\n return 0;\n var r2 = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var b4 = this._zeroBits(this.words[i3]);\n r2 += b4;\n if (b4 !== 26)\n break;\n }\n return r2;\n };\n BN.prototype.byteLength = function byteLength() {\n return Math.ceil(this.bitLength() / 8);\n };\n BN.prototype.toTwos = function toTwos(width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n BN.prototype.fromTwos = function fromTwos(width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n BN.prototype.isNeg = function isNeg() {\n return this.negative !== 0;\n };\n BN.prototype.neg = function neg() {\n return this.clone().ineg();\n };\n BN.prototype.ineg = function ineg() {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n return this;\n };\n BN.prototype.iuor = function iuor(num2) {\n while (this.length < num2.length) {\n this.words[this.length++] = 0;\n }\n for (var i3 = 0; i3 < num2.length; i3++) {\n this.words[i3] = this.words[i3] | num2.words[i3];\n }\n return this.strip();\n };\n BN.prototype.ior = function ior(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuor(num2);\n };\n BN.prototype.or = function or(num2) {\n if (this.length > num2.length)\n return this.clone().ior(num2);\n return num2.clone().ior(this);\n };\n BN.prototype.uor = function uor(num2) {\n if (this.length > num2.length)\n return this.clone().iuor(num2);\n return num2.clone().iuor(this);\n };\n BN.prototype.iuand = function iuand(num2) {\n var b4;\n if (this.length > num2.length) {\n b4 = num2;\n } else {\n b4 = this;\n }\n for (var i3 = 0; i3 < b4.length; i3++) {\n this.words[i3] = this.words[i3] & num2.words[i3];\n }\n this.length = b4.length;\n return this.strip();\n };\n BN.prototype.iand = function iand(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuand(num2);\n };\n BN.prototype.and = function and(num2) {\n if (this.length > num2.length)\n return this.clone().iand(num2);\n return num2.clone().iand(this);\n };\n BN.prototype.uand = function uand(num2) {\n if (this.length > num2.length)\n return this.clone().iuand(num2);\n return num2.clone().iuand(this);\n };\n BN.prototype.iuxor = function iuxor(num2) {\n var a3;\n var b4;\n if (this.length > num2.length) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n for (var i3 = 0; i3 < b4.length; i3++) {\n this.words[i3] = a3.words[i3] ^ b4.words[i3];\n }\n if (this !== a3) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n this.length = a3.length;\n return this.strip();\n };\n BN.prototype.ixor = function ixor(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuxor(num2);\n };\n BN.prototype.xor = function xor(num2) {\n if (this.length > num2.length)\n return this.clone().ixor(num2);\n return num2.clone().ixor(this);\n };\n BN.prototype.uxor = function uxor(num2) {\n if (this.length > num2.length)\n return this.clone().iuxor(num2);\n return num2.clone().iuxor(this);\n };\n BN.prototype.inotn = function inotn(width) {\n assert9(typeof width === \"number\" && width >= 0);\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n this._expand(bytesNeeded);\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n for (var i3 = 0; i3 < bytesNeeded; i3++) {\n this.words[i3] = ~this.words[i3] & 67108863;\n }\n if (bitsLeft > 0) {\n this.words[i3] = ~this.words[i3] & 67108863 >> 26 - bitsLeft;\n }\n return this.strip();\n };\n BN.prototype.notn = function notn(width) {\n return this.clone().inotn(width);\n };\n BN.prototype.setn = function setn(bit, val) {\n assert9(typeof bit === \"number\" && bit >= 0);\n var off2 = bit / 26 | 0;\n var wbit = bit % 26;\n this._expand(off2 + 1);\n if (val) {\n this.words[off2] = this.words[off2] | 1 << wbit;\n } else {\n this.words[off2] = this.words[off2] & ~(1 << wbit);\n }\n return this.strip();\n };\n BN.prototype.iadd = function iadd(num2) {\n var r2;\n if (this.negative !== 0 && num2.negative === 0) {\n this.negative = 0;\n r2 = this.isub(num2);\n this.negative ^= 1;\n return this._normSign();\n } else if (this.negative === 0 && num2.negative !== 0) {\n num2.negative = 0;\n r2 = this.isub(num2);\n num2.negative = 1;\n return r2._normSign();\n }\n var a3, b4;\n if (this.length > num2.length) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n var carry = 0;\n for (var i3 = 0; i3 < b4.length; i3++) {\n r2 = (a3.words[i3] | 0) + (b4.words[i3] | 0) + carry;\n this.words[i3] = r2 & 67108863;\n carry = r2 >>> 26;\n }\n for (; carry !== 0 && i3 < a3.length; i3++) {\n r2 = (a3.words[i3] | 0) + carry;\n this.words[i3] = r2 & 67108863;\n carry = r2 >>> 26;\n }\n this.length = a3.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n } else if (a3 !== this) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n return this;\n };\n BN.prototype.add = function add2(num2) {\n var res;\n if (num2.negative !== 0 && this.negative === 0) {\n num2.negative = 0;\n res = this.sub(num2);\n num2.negative ^= 1;\n return res;\n } else if (num2.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num2.sub(this);\n this.negative = 1;\n return res;\n }\n if (this.length > num2.length)\n return this.clone().iadd(num2);\n return num2.clone().iadd(this);\n };\n BN.prototype.isub = function isub(num2) {\n if (num2.negative !== 0) {\n num2.negative = 0;\n var r2 = this.iadd(num2);\n num2.negative = 1;\n return r2._normSign();\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num2);\n this.negative = 1;\n return this._normSign();\n }\n var cmp = this.cmp(num2);\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n var a3, b4;\n if (cmp > 0) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n var carry = 0;\n for (var i3 = 0; i3 < b4.length; i3++) {\n r2 = (a3.words[i3] | 0) - (b4.words[i3] | 0) + carry;\n carry = r2 >> 26;\n this.words[i3] = r2 & 67108863;\n }\n for (; carry !== 0 && i3 < a3.length; i3++) {\n r2 = (a3.words[i3] | 0) + carry;\n carry = r2 >> 26;\n this.words[i3] = r2 & 67108863;\n }\n if (carry === 0 && i3 < a3.length && a3 !== this) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n this.length = Math.max(this.length, i3);\n if (a3 !== this) {\n this.negative = 1;\n }\n return this.strip();\n };\n BN.prototype.sub = function sub(num2) {\n return this.clone().isub(num2);\n };\n function smallMulTo(self2, num2, out) {\n out.negative = num2.negative ^ self2.negative;\n var len = self2.length + num2.length | 0;\n out.length = len;\n len = len - 1 | 0;\n var a3 = self2.words[0] | 0;\n var b4 = num2.words[0] | 0;\n var r2 = a3 * b4;\n var lo = r2 & 67108863;\n var carry = r2 / 67108864 | 0;\n out.words[0] = lo;\n for (var k4 = 1; k4 < len; k4++) {\n var ncarry = carry >>> 26;\n var rword = carry & 67108863;\n var maxJ = Math.min(k4, num2.length - 1);\n for (var j2 = Math.max(0, k4 - self2.length + 1); j2 <= maxJ; j2++) {\n var i3 = k4 - j2 | 0;\n a3 = self2.words[i3] | 0;\n b4 = num2.words[j2] | 0;\n r2 = a3 * b4 + rword;\n ncarry += r2 / 67108864 | 0;\n rword = r2 & 67108863;\n }\n out.words[k4] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k4] = carry | 0;\n } else {\n out.length--;\n }\n return out.strip();\n }\n var comb10MulTo = function comb10MulTo2(self2, num2, out) {\n var a3 = self2.words;\n var b4 = num2.words;\n var o5 = out.words;\n var c4 = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a3[0] | 0;\n var al0 = a0 & 8191;\n var ah0 = a0 >>> 13;\n var a1 = a3[1] | 0;\n var al1 = a1 & 8191;\n var ah1 = a1 >>> 13;\n var a22 = a3[2] | 0;\n var al2 = a22 & 8191;\n var ah2 = a22 >>> 13;\n var a32 = a3[3] | 0;\n var al3 = a32 & 8191;\n var ah3 = a32 >>> 13;\n var a4 = a3[4] | 0;\n var al4 = a4 & 8191;\n var ah4 = a4 >>> 13;\n var a5 = a3[5] | 0;\n var al5 = a5 & 8191;\n var ah5 = a5 >>> 13;\n var a6 = a3[6] | 0;\n var al6 = a6 & 8191;\n var ah6 = a6 >>> 13;\n var a7 = a3[7] | 0;\n var al7 = a7 & 8191;\n var ah7 = a7 >>> 13;\n var a8 = a3[8] | 0;\n var al8 = a8 & 8191;\n var ah8 = a8 >>> 13;\n var a9 = a3[9] | 0;\n var al9 = a9 & 8191;\n var ah9 = a9 >>> 13;\n var b0 = b4[0] | 0;\n var bl0 = b0 & 8191;\n var bh0 = b0 >>> 13;\n var b1 = b4[1] | 0;\n var bl1 = b1 & 8191;\n var bh1 = b1 >>> 13;\n var b22 = b4[2] | 0;\n var bl2 = b22 & 8191;\n var bh2 = b22 >>> 13;\n var b32 = b4[3] | 0;\n var bl3 = b32 & 8191;\n var bh3 = b32 >>> 13;\n var b42 = b4[4] | 0;\n var bl4 = b42 & 8191;\n var bh4 = b42 >>> 13;\n var b5 = b4[5] | 0;\n var bl5 = b5 & 8191;\n var bh5 = b5 >>> 13;\n var b6 = b4[6] | 0;\n var bl6 = b6 & 8191;\n var bh6 = b6 >>> 13;\n var b7 = b4[7] | 0;\n var bl7 = b7 & 8191;\n var bh7 = b7 >>> 13;\n var b8 = b4[8] | 0;\n var bl8 = b8 & 8191;\n var bh8 = b8 >>> 13;\n var b9 = b4[9] | 0;\n var bl9 = b9 & 8191;\n var bh9 = b9 >>> 13;\n out.negative = self2.negative ^ num2.negative;\n out.length = 19;\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = mid + Math.imul(ah0, bl0) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w0 >>> 26) | 0;\n w0 &= 67108863;\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = mid + Math.imul(ah1, bl0) | 0;\n hi = Math.imul(ah1, bh0);\n lo = lo + Math.imul(al0, bl1) | 0;\n mid = mid + Math.imul(al0, bh1) | 0;\n mid = mid + Math.imul(ah0, bl1) | 0;\n hi = hi + Math.imul(ah0, bh1) | 0;\n var w1 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w1 >>> 26) | 0;\n w1 &= 67108863;\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = mid + Math.imul(ah2, bl0) | 0;\n hi = Math.imul(ah2, bh0);\n lo = lo + Math.imul(al1, bl1) | 0;\n mid = mid + Math.imul(al1, bh1) | 0;\n mid = mid + Math.imul(ah1, bl1) | 0;\n hi = hi + Math.imul(ah1, bh1) | 0;\n lo = lo + Math.imul(al0, bl2) | 0;\n mid = mid + Math.imul(al0, bh2) | 0;\n mid = mid + Math.imul(ah0, bl2) | 0;\n hi = hi + Math.imul(ah0, bh2) | 0;\n var w22 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w22 >>> 26) | 0;\n w22 &= 67108863;\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = mid + Math.imul(ah3, bl0) | 0;\n hi = Math.imul(ah3, bh0);\n lo = lo + Math.imul(al2, bl1) | 0;\n mid = mid + Math.imul(al2, bh1) | 0;\n mid = mid + Math.imul(ah2, bl1) | 0;\n hi = hi + Math.imul(ah2, bh1) | 0;\n lo = lo + Math.imul(al1, bl2) | 0;\n mid = mid + Math.imul(al1, bh2) | 0;\n mid = mid + Math.imul(ah1, bl2) | 0;\n hi = hi + Math.imul(ah1, bh2) | 0;\n lo = lo + Math.imul(al0, bl3) | 0;\n mid = mid + Math.imul(al0, bh3) | 0;\n mid = mid + Math.imul(ah0, bl3) | 0;\n hi = hi + Math.imul(ah0, bh3) | 0;\n var w3 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w3 >>> 26) | 0;\n w3 &= 67108863;\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = mid + Math.imul(ah4, bl0) | 0;\n hi = Math.imul(ah4, bh0);\n lo = lo + Math.imul(al3, bl1) | 0;\n mid = mid + Math.imul(al3, bh1) | 0;\n mid = mid + Math.imul(ah3, bl1) | 0;\n hi = hi + Math.imul(ah3, bh1) | 0;\n lo = lo + Math.imul(al2, bl2) | 0;\n mid = mid + Math.imul(al2, bh2) | 0;\n mid = mid + Math.imul(ah2, bl2) | 0;\n hi = hi + Math.imul(ah2, bh2) | 0;\n lo = lo + Math.imul(al1, bl3) | 0;\n mid = mid + Math.imul(al1, bh3) | 0;\n mid = mid + Math.imul(ah1, bl3) | 0;\n hi = hi + Math.imul(ah1, bh3) | 0;\n lo = lo + Math.imul(al0, bl4) | 0;\n mid = mid + Math.imul(al0, bh4) | 0;\n mid = mid + Math.imul(ah0, bl4) | 0;\n hi = hi + Math.imul(ah0, bh4) | 0;\n var w4 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w4 >>> 26) | 0;\n w4 &= 67108863;\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = mid + Math.imul(ah5, bl0) | 0;\n hi = Math.imul(ah5, bh0);\n lo = lo + Math.imul(al4, bl1) | 0;\n mid = mid + Math.imul(al4, bh1) | 0;\n mid = mid + Math.imul(ah4, bl1) | 0;\n hi = hi + Math.imul(ah4, bh1) | 0;\n lo = lo + Math.imul(al3, bl2) | 0;\n mid = mid + Math.imul(al3, bh2) | 0;\n mid = mid + Math.imul(ah3, bl2) | 0;\n hi = hi + Math.imul(ah3, bh2) | 0;\n lo = lo + Math.imul(al2, bl3) | 0;\n mid = mid + Math.imul(al2, bh3) | 0;\n mid = mid + Math.imul(ah2, bl3) | 0;\n hi = hi + Math.imul(ah2, bh3) | 0;\n lo = lo + Math.imul(al1, bl4) | 0;\n mid = mid + Math.imul(al1, bh4) | 0;\n mid = mid + Math.imul(ah1, bl4) | 0;\n hi = hi + Math.imul(ah1, bh4) | 0;\n lo = lo + Math.imul(al0, bl5) | 0;\n mid = mid + Math.imul(al0, bh5) | 0;\n mid = mid + Math.imul(ah0, bl5) | 0;\n hi = hi + Math.imul(ah0, bh5) | 0;\n var w5 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w5 >>> 26) | 0;\n w5 &= 67108863;\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = mid + Math.imul(ah6, bl0) | 0;\n hi = Math.imul(ah6, bh0);\n lo = lo + Math.imul(al5, bl1) | 0;\n mid = mid + Math.imul(al5, bh1) | 0;\n mid = mid + Math.imul(ah5, bl1) | 0;\n hi = hi + Math.imul(ah5, bh1) | 0;\n lo = lo + Math.imul(al4, bl2) | 0;\n mid = mid + Math.imul(al4, bh2) | 0;\n mid = mid + Math.imul(ah4, bl2) | 0;\n hi = hi + Math.imul(ah4, bh2) | 0;\n lo = lo + Math.imul(al3, bl3) | 0;\n mid = mid + Math.imul(al3, bh3) | 0;\n mid = mid + Math.imul(ah3, bl3) | 0;\n hi = hi + Math.imul(ah3, bh3) | 0;\n lo = lo + Math.imul(al2, bl4) | 0;\n mid = mid + Math.imul(al2, bh4) | 0;\n mid = mid + Math.imul(ah2, bl4) | 0;\n hi = hi + Math.imul(ah2, bh4) | 0;\n lo = lo + Math.imul(al1, bl5) | 0;\n mid = mid + Math.imul(al1, bh5) | 0;\n mid = mid + Math.imul(ah1, bl5) | 0;\n hi = hi + Math.imul(ah1, bh5) | 0;\n lo = lo + Math.imul(al0, bl6) | 0;\n mid = mid + Math.imul(al0, bh6) | 0;\n mid = mid + Math.imul(ah0, bl6) | 0;\n hi = hi + Math.imul(ah0, bh6) | 0;\n var w6 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w6 >>> 26) | 0;\n w6 &= 67108863;\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = mid + Math.imul(ah7, bl0) | 0;\n hi = Math.imul(ah7, bh0);\n lo = lo + Math.imul(al6, bl1) | 0;\n mid = mid + Math.imul(al6, bh1) | 0;\n mid = mid + Math.imul(ah6, bl1) | 0;\n hi = hi + Math.imul(ah6, bh1) | 0;\n lo = lo + Math.imul(al5, bl2) | 0;\n mid = mid + Math.imul(al5, bh2) | 0;\n mid = mid + Math.imul(ah5, bl2) | 0;\n hi = hi + Math.imul(ah5, bh2) | 0;\n lo = lo + Math.imul(al4, bl3) | 0;\n mid = mid + Math.imul(al4, bh3) | 0;\n mid = mid + Math.imul(ah4, bl3) | 0;\n hi = hi + Math.imul(ah4, bh3) | 0;\n lo = lo + Math.imul(al3, bl4) | 0;\n mid = mid + Math.imul(al3, bh4) | 0;\n mid = mid + Math.imul(ah3, bl4) | 0;\n hi = hi + Math.imul(ah3, bh4) | 0;\n lo = lo + Math.imul(al2, bl5) | 0;\n mid = mid + Math.imul(al2, bh5) | 0;\n mid = mid + Math.imul(ah2, bl5) | 0;\n hi = hi + Math.imul(ah2, bh5) | 0;\n lo = lo + Math.imul(al1, bl6) | 0;\n mid = mid + Math.imul(al1, bh6) | 0;\n mid = mid + Math.imul(ah1, bl6) | 0;\n hi = hi + Math.imul(ah1, bh6) | 0;\n lo = lo + Math.imul(al0, bl7) | 0;\n mid = mid + Math.imul(al0, bh7) | 0;\n mid = mid + Math.imul(ah0, bl7) | 0;\n hi = hi + Math.imul(ah0, bh7) | 0;\n var w7 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w7 >>> 26) | 0;\n w7 &= 67108863;\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = mid + Math.imul(ah8, bl0) | 0;\n hi = Math.imul(ah8, bh0);\n lo = lo + Math.imul(al7, bl1) | 0;\n mid = mid + Math.imul(al7, bh1) | 0;\n mid = mid + Math.imul(ah7, bl1) | 0;\n hi = hi + Math.imul(ah7, bh1) | 0;\n lo = lo + Math.imul(al6, bl2) | 0;\n mid = mid + Math.imul(al6, bh2) | 0;\n mid = mid + Math.imul(ah6, bl2) | 0;\n hi = hi + Math.imul(ah6, bh2) | 0;\n lo = lo + Math.imul(al5, bl3) | 0;\n mid = mid + Math.imul(al5, bh3) | 0;\n mid = mid + Math.imul(ah5, bl3) | 0;\n hi = hi + Math.imul(ah5, bh3) | 0;\n lo = lo + Math.imul(al4, bl4) | 0;\n mid = mid + Math.imul(al4, bh4) | 0;\n mid = mid + Math.imul(ah4, bl4) | 0;\n hi = hi + Math.imul(ah4, bh4) | 0;\n lo = lo + Math.imul(al3, bl5) | 0;\n mid = mid + Math.imul(al3, bh5) | 0;\n mid = mid + Math.imul(ah3, bl5) | 0;\n hi = hi + Math.imul(ah3, bh5) | 0;\n lo = lo + Math.imul(al2, bl6) | 0;\n mid = mid + Math.imul(al2, bh6) | 0;\n mid = mid + Math.imul(ah2, bl6) | 0;\n hi = hi + Math.imul(ah2, bh6) | 0;\n lo = lo + Math.imul(al1, bl7) | 0;\n mid = mid + Math.imul(al1, bh7) | 0;\n mid = mid + Math.imul(ah1, bl7) | 0;\n hi = hi + Math.imul(ah1, bh7) | 0;\n lo = lo + Math.imul(al0, bl8) | 0;\n mid = mid + Math.imul(al0, bh8) | 0;\n mid = mid + Math.imul(ah0, bl8) | 0;\n hi = hi + Math.imul(ah0, bh8) | 0;\n var w8 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w8 >>> 26) | 0;\n w8 &= 67108863;\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = mid + Math.imul(ah9, bl0) | 0;\n hi = Math.imul(ah9, bh0);\n lo = lo + Math.imul(al8, bl1) | 0;\n mid = mid + Math.imul(al8, bh1) | 0;\n mid = mid + Math.imul(ah8, bl1) | 0;\n hi = hi + Math.imul(ah8, bh1) | 0;\n lo = lo + Math.imul(al7, bl2) | 0;\n mid = mid + Math.imul(al7, bh2) | 0;\n mid = mid + Math.imul(ah7, bl2) | 0;\n hi = hi + Math.imul(ah7, bh2) | 0;\n lo = lo + Math.imul(al6, bl3) | 0;\n mid = mid + Math.imul(al6, bh3) | 0;\n mid = mid + Math.imul(ah6, bl3) | 0;\n hi = hi + Math.imul(ah6, bh3) | 0;\n lo = lo + Math.imul(al5, bl4) | 0;\n mid = mid + Math.imul(al5, bh4) | 0;\n mid = mid + Math.imul(ah5, bl4) | 0;\n hi = hi + Math.imul(ah5, bh4) | 0;\n lo = lo + Math.imul(al4, bl5) | 0;\n mid = mid + Math.imul(al4, bh5) | 0;\n mid = mid + Math.imul(ah4, bl5) | 0;\n hi = hi + Math.imul(ah4, bh5) | 0;\n lo = lo + Math.imul(al3, bl6) | 0;\n mid = mid + Math.imul(al3, bh6) | 0;\n mid = mid + Math.imul(ah3, bl6) | 0;\n hi = hi + Math.imul(ah3, bh6) | 0;\n lo = lo + Math.imul(al2, bl7) | 0;\n mid = mid + Math.imul(al2, bh7) | 0;\n mid = mid + Math.imul(ah2, bl7) | 0;\n hi = hi + Math.imul(ah2, bh7) | 0;\n lo = lo + Math.imul(al1, bl8) | 0;\n mid = mid + Math.imul(al1, bh8) | 0;\n mid = mid + Math.imul(ah1, bl8) | 0;\n hi = hi + Math.imul(ah1, bh8) | 0;\n lo = lo + Math.imul(al0, bl9) | 0;\n mid = mid + Math.imul(al0, bh9) | 0;\n mid = mid + Math.imul(ah0, bl9) | 0;\n hi = hi + Math.imul(ah0, bh9) | 0;\n var w9 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w9 >>> 26) | 0;\n w9 &= 67108863;\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = mid + Math.imul(ah9, bl1) | 0;\n hi = Math.imul(ah9, bh1);\n lo = lo + Math.imul(al8, bl2) | 0;\n mid = mid + Math.imul(al8, bh2) | 0;\n mid = mid + Math.imul(ah8, bl2) | 0;\n hi = hi + Math.imul(ah8, bh2) | 0;\n lo = lo + Math.imul(al7, bl3) | 0;\n mid = mid + Math.imul(al7, bh3) | 0;\n mid = mid + Math.imul(ah7, bl3) | 0;\n hi = hi + Math.imul(ah7, bh3) | 0;\n lo = lo + Math.imul(al6, bl4) | 0;\n mid = mid + Math.imul(al6, bh4) | 0;\n mid = mid + Math.imul(ah6, bl4) | 0;\n hi = hi + Math.imul(ah6, bh4) | 0;\n lo = lo + Math.imul(al5, bl5) | 0;\n mid = mid + Math.imul(al5, bh5) | 0;\n mid = mid + Math.imul(ah5, bl5) | 0;\n hi = hi + Math.imul(ah5, bh5) | 0;\n lo = lo + Math.imul(al4, bl6) | 0;\n mid = mid + Math.imul(al4, bh6) | 0;\n mid = mid + Math.imul(ah4, bl6) | 0;\n hi = hi + Math.imul(ah4, bh6) | 0;\n lo = lo + Math.imul(al3, bl7) | 0;\n mid = mid + Math.imul(al3, bh7) | 0;\n mid = mid + Math.imul(ah3, bl7) | 0;\n hi = hi + Math.imul(ah3, bh7) | 0;\n lo = lo + Math.imul(al2, bl8) | 0;\n mid = mid + Math.imul(al2, bh8) | 0;\n mid = mid + Math.imul(ah2, bl8) | 0;\n hi = hi + Math.imul(ah2, bh8) | 0;\n lo = lo + Math.imul(al1, bl9) | 0;\n mid = mid + Math.imul(al1, bh9) | 0;\n mid = mid + Math.imul(ah1, bl9) | 0;\n hi = hi + Math.imul(ah1, bh9) | 0;\n var w10 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w10 >>> 26) | 0;\n w10 &= 67108863;\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = mid + Math.imul(ah9, bl2) | 0;\n hi = Math.imul(ah9, bh2);\n lo = lo + Math.imul(al8, bl3) | 0;\n mid = mid + Math.imul(al8, bh3) | 0;\n mid = mid + Math.imul(ah8, bl3) | 0;\n hi = hi + Math.imul(ah8, bh3) | 0;\n lo = lo + Math.imul(al7, bl4) | 0;\n mid = mid + Math.imul(al7, bh4) | 0;\n mid = mid + Math.imul(ah7, bl4) | 0;\n hi = hi + Math.imul(ah7, bh4) | 0;\n lo = lo + Math.imul(al6, bl5) | 0;\n mid = mid + Math.imul(al6, bh5) | 0;\n mid = mid + Math.imul(ah6, bl5) | 0;\n hi = hi + Math.imul(ah6, bh5) | 0;\n lo = lo + Math.imul(al5, bl6) | 0;\n mid = mid + Math.imul(al5, bh6) | 0;\n mid = mid + Math.imul(ah5, bl6) | 0;\n hi = hi + Math.imul(ah5, bh6) | 0;\n lo = lo + Math.imul(al4, bl7) | 0;\n mid = mid + Math.imul(al4, bh7) | 0;\n mid = mid + Math.imul(ah4, bl7) | 0;\n hi = hi + Math.imul(ah4, bh7) | 0;\n lo = lo + Math.imul(al3, bl8) | 0;\n mid = mid + Math.imul(al3, bh8) | 0;\n mid = mid + Math.imul(ah3, bl8) | 0;\n hi = hi + Math.imul(ah3, bh8) | 0;\n lo = lo + Math.imul(al2, bl9) | 0;\n mid = mid + Math.imul(al2, bh9) | 0;\n mid = mid + Math.imul(ah2, bl9) | 0;\n hi = hi + Math.imul(ah2, bh9) | 0;\n var w11 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w11 >>> 26) | 0;\n w11 &= 67108863;\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = mid + Math.imul(ah9, bl3) | 0;\n hi = Math.imul(ah9, bh3);\n lo = lo + Math.imul(al8, bl4) | 0;\n mid = mid + Math.imul(al8, bh4) | 0;\n mid = mid + Math.imul(ah8, bl4) | 0;\n hi = hi + Math.imul(ah8, bh4) | 0;\n lo = lo + Math.imul(al7, bl5) | 0;\n mid = mid + Math.imul(al7, bh5) | 0;\n mid = mid + Math.imul(ah7, bl5) | 0;\n hi = hi + Math.imul(ah7, bh5) | 0;\n lo = lo + Math.imul(al6, bl6) | 0;\n mid = mid + Math.imul(al6, bh6) | 0;\n mid = mid + Math.imul(ah6, bl6) | 0;\n hi = hi + Math.imul(ah6, bh6) | 0;\n lo = lo + Math.imul(al5, bl7) | 0;\n mid = mid + Math.imul(al5, bh7) | 0;\n mid = mid + Math.imul(ah5, bl7) | 0;\n hi = hi + Math.imul(ah5, bh7) | 0;\n lo = lo + Math.imul(al4, bl8) | 0;\n mid = mid + Math.imul(al4, bh8) | 0;\n mid = mid + Math.imul(ah4, bl8) | 0;\n hi = hi + Math.imul(ah4, bh8) | 0;\n lo = lo + Math.imul(al3, bl9) | 0;\n mid = mid + Math.imul(al3, bh9) | 0;\n mid = mid + Math.imul(ah3, bl9) | 0;\n hi = hi + Math.imul(ah3, bh9) | 0;\n var w12 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w12 >>> 26) | 0;\n w12 &= 67108863;\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = mid + Math.imul(ah9, bl4) | 0;\n hi = Math.imul(ah9, bh4);\n lo = lo + Math.imul(al8, bl5) | 0;\n mid = mid + Math.imul(al8, bh5) | 0;\n mid = mid + Math.imul(ah8, bl5) | 0;\n hi = hi + Math.imul(ah8, bh5) | 0;\n lo = lo + Math.imul(al7, bl6) | 0;\n mid = mid + Math.imul(al7, bh6) | 0;\n mid = mid + Math.imul(ah7, bl6) | 0;\n hi = hi + Math.imul(ah7, bh6) | 0;\n lo = lo + Math.imul(al6, bl7) | 0;\n mid = mid + Math.imul(al6, bh7) | 0;\n mid = mid + Math.imul(ah6, bl7) | 0;\n hi = hi + Math.imul(ah6, bh7) | 0;\n lo = lo + Math.imul(al5, bl8) | 0;\n mid = mid + Math.imul(al5, bh8) | 0;\n mid = mid + Math.imul(ah5, bl8) | 0;\n hi = hi + Math.imul(ah5, bh8) | 0;\n lo = lo + Math.imul(al4, bl9) | 0;\n mid = mid + Math.imul(al4, bh9) | 0;\n mid = mid + Math.imul(ah4, bl9) | 0;\n hi = hi + Math.imul(ah4, bh9) | 0;\n var w13 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w13 >>> 26) | 0;\n w13 &= 67108863;\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = mid + Math.imul(ah9, bl5) | 0;\n hi = Math.imul(ah9, bh5);\n lo = lo + Math.imul(al8, bl6) | 0;\n mid = mid + Math.imul(al8, bh6) | 0;\n mid = mid + Math.imul(ah8, bl6) | 0;\n hi = hi + Math.imul(ah8, bh6) | 0;\n lo = lo + Math.imul(al7, bl7) | 0;\n mid = mid + Math.imul(al7, bh7) | 0;\n mid = mid + Math.imul(ah7, bl7) | 0;\n hi = hi + Math.imul(ah7, bh7) | 0;\n lo = lo + Math.imul(al6, bl8) | 0;\n mid = mid + Math.imul(al6, bh8) | 0;\n mid = mid + Math.imul(ah6, bl8) | 0;\n hi = hi + Math.imul(ah6, bh8) | 0;\n lo = lo + Math.imul(al5, bl9) | 0;\n mid = mid + Math.imul(al5, bh9) | 0;\n mid = mid + Math.imul(ah5, bl9) | 0;\n hi = hi + Math.imul(ah5, bh9) | 0;\n var w14 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w14 >>> 26) | 0;\n w14 &= 67108863;\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = mid + Math.imul(ah9, bl6) | 0;\n hi = Math.imul(ah9, bh6);\n lo = lo + Math.imul(al8, bl7) | 0;\n mid = mid + Math.imul(al8, bh7) | 0;\n mid = mid + Math.imul(ah8, bl7) | 0;\n hi = hi + Math.imul(ah8, bh7) | 0;\n lo = lo + Math.imul(al7, bl8) | 0;\n mid = mid + Math.imul(al7, bh8) | 0;\n mid = mid + Math.imul(ah7, bl8) | 0;\n hi = hi + Math.imul(ah7, bh8) | 0;\n lo = lo + Math.imul(al6, bl9) | 0;\n mid = mid + Math.imul(al6, bh9) | 0;\n mid = mid + Math.imul(ah6, bl9) | 0;\n hi = hi + Math.imul(ah6, bh9) | 0;\n var w15 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w15 >>> 26) | 0;\n w15 &= 67108863;\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = mid + Math.imul(ah9, bl7) | 0;\n hi = Math.imul(ah9, bh7);\n lo = lo + Math.imul(al8, bl8) | 0;\n mid = mid + Math.imul(al8, bh8) | 0;\n mid = mid + Math.imul(ah8, bl8) | 0;\n hi = hi + Math.imul(ah8, bh8) | 0;\n lo = lo + Math.imul(al7, bl9) | 0;\n mid = mid + Math.imul(al7, bh9) | 0;\n mid = mid + Math.imul(ah7, bl9) | 0;\n hi = hi + Math.imul(ah7, bh9) | 0;\n var w16 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w16 >>> 26) | 0;\n w16 &= 67108863;\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = mid + Math.imul(ah9, bl8) | 0;\n hi = Math.imul(ah9, bh8);\n lo = lo + Math.imul(al8, bl9) | 0;\n mid = mid + Math.imul(al8, bh9) | 0;\n mid = mid + Math.imul(ah8, bl9) | 0;\n hi = hi + Math.imul(ah8, bh9) | 0;\n var w17 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w17 >>> 26) | 0;\n w17 &= 67108863;\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = mid + Math.imul(ah9, bl9) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w18 >>> 26) | 0;\n w18 &= 67108863;\n o5[0] = w0;\n o5[1] = w1;\n o5[2] = w22;\n o5[3] = w3;\n o5[4] = w4;\n o5[5] = w5;\n o5[6] = w6;\n o5[7] = w7;\n o5[8] = w8;\n o5[9] = w9;\n o5[10] = w10;\n o5[11] = w11;\n o5[12] = w12;\n o5[13] = w13;\n o5[14] = w14;\n o5[15] = w15;\n o5[16] = w16;\n o5[17] = w17;\n o5[18] = w18;\n if (c4 !== 0) {\n o5[19] = c4;\n out.length++;\n }\n return out;\n };\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n function bigMulTo(self2, num2, out) {\n out.negative = num2.negative ^ self2.negative;\n out.length = self2.length + num2.length;\n var carry = 0;\n var hncarry = 0;\n for (var k4 = 0; k4 < out.length - 1; k4++) {\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 67108863;\n var maxJ = Math.min(k4, num2.length - 1);\n for (var j2 = Math.max(0, k4 - self2.length + 1); j2 <= maxJ; j2++) {\n var i3 = k4 - j2;\n var a3 = self2.words[i3] | 0;\n var b4 = num2.words[j2] | 0;\n var r2 = a3 * b4;\n var lo = r2 & 67108863;\n ncarry = ncarry + (r2 / 67108864 | 0) | 0;\n lo = lo + rword | 0;\n rword = lo & 67108863;\n ncarry = ncarry + (lo >>> 26) | 0;\n hncarry += ncarry >>> 26;\n ncarry &= 67108863;\n }\n out.words[k4] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k4] = carry;\n } else {\n out.length--;\n }\n return out.strip();\n }\n function jumboMulTo(self2, num2, out) {\n var fftm = new FFTM();\n return fftm.mulp(self2, num2, out);\n }\n BN.prototype.mulTo = function mulTo(num2, out) {\n var res;\n var len = this.length + num2.length;\n if (this.length === 10 && num2.length === 10) {\n res = comb10MulTo(this, num2, out);\n } else if (len < 63) {\n res = smallMulTo(this, num2, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num2, out);\n } else {\n res = jumboMulTo(this, num2, out);\n }\n return res;\n };\n function FFTM(x4, y6) {\n this.x = x4;\n this.y = y6;\n }\n FFTM.prototype.makeRBT = function makeRBT(N4) {\n var t3 = new Array(N4);\n var l6 = BN.prototype._countBits(N4) - 1;\n for (var i3 = 0; i3 < N4; i3++) {\n t3[i3] = this.revBin(i3, l6, N4);\n }\n return t3;\n };\n FFTM.prototype.revBin = function revBin(x4, l6, N4) {\n if (x4 === 0 || x4 === N4 - 1)\n return x4;\n var rb = 0;\n for (var i3 = 0; i3 < l6; i3++) {\n rb |= (x4 & 1) << l6 - i3 - 1;\n x4 >>= 1;\n }\n return rb;\n };\n FFTM.prototype.permute = function permute(rbt, rws, iws, rtws, itws, N4) {\n for (var i3 = 0; i3 < N4; i3++) {\n rtws[i3] = rws[rbt[i3]];\n itws[i3] = iws[rbt[i3]];\n }\n };\n FFTM.prototype.transform = function transform(rws, iws, rtws, itws, N4, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N4);\n for (var s4 = 1; s4 < N4; s4 <<= 1) {\n var l6 = s4 << 1;\n var rtwdf = Math.cos(2 * Math.PI / l6);\n var itwdf = Math.sin(2 * Math.PI / l6);\n for (var p4 = 0; p4 < N4; p4 += l6) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n for (var j2 = 0; j2 < s4; j2++) {\n var re = rtws[p4 + j2];\n var ie = itws[p4 + j2];\n var ro = rtws[p4 + j2 + s4];\n var io = itws[p4 + j2 + s4];\n var rx = rtwdf_ * ro - itwdf_ * io;\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n rtws[p4 + j2] = re + ro;\n itws[p4 + j2] = ie + io;\n rtws[p4 + j2 + s4] = re - ro;\n itws[p4 + j2 + s4] = ie - io;\n if (j2 !== l6) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n FFTM.prototype.guessLen13b = function guessLen13b(n2, m2) {\n var N4 = Math.max(m2, n2) | 1;\n var odd = N4 & 1;\n var i3 = 0;\n for (N4 = N4 / 2 | 0; N4; N4 = N4 >>> 1) {\n i3++;\n }\n return 1 << i3 + 1 + odd;\n };\n FFTM.prototype.conjugate = function conjugate(rws, iws, N4) {\n if (N4 <= 1)\n return;\n for (var i3 = 0; i3 < N4 / 2; i3++) {\n var t3 = rws[i3];\n rws[i3] = rws[N4 - i3 - 1];\n rws[N4 - i3 - 1] = t3;\n t3 = iws[i3];\n iws[i3] = -iws[N4 - i3 - 1];\n iws[N4 - i3 - 1] = -t3;\n }\n };\n FFTM.prototype.normalize13b = function normalize13b(ws, N4) {\n var carry = 0;\n for (var i3 = 0; i3 < N4 / 2; i3++) {\n var w3 = Math.round(ws[2 * i3 + 1] / N4) * 8192 + Math.round(ws[2 * i3] / N4) + carry;\n ws[i3] = w3 & 67108863;\n if (w3 < 67108864) {\n carry = 0;\n } else {\n carry = w3 / 67108864 | 0;\n }\n }\n return ws;\n };\n FFTM.prototype.convert13b = function convert13b(ws, len, rws, N4) {\n var carry = 0;\n for (var i3 = 0; i3 < len; i3++) {\n carry = carry + (ws[i3] | 0);\n rws[2 * i3] = carry & 8191;\n carry = carry >>> 13;\n rws[2 * i3 + 1] = carry & 8191;\n carry = carry >>> 13;\n }\n for (i3 = 2 * len; i3 < N4; ++i3) {\n rws[i3] = 0;\n }\n assert9(carry === 0);\n assert9((carry & ~8191) === 0);\n };\n FFTM.prototype.stub = function stub(N4) {\n var ph = new Array(N4);\n for (var i3 = 0; i3 < N4; i3++) {\n ph[i3] = 0;\n }\n return ph;\n };\n FFTM.prototype.mulp = function mulp(x4, y6, out) {\n var N4 = 2 * this.guessLen13b(x4.length, y6.length);\n var rbt = this.makeRBT(N4);\n var _2 = this.stub(N4);\n var rws = new Array(N4);\n var rwst = new Array(N4);\n var iwst = new Array(N4);\n var nrws = new Array(N4);\n var nrwst = new Array(N4);\n var niwst = new Array(N4);\n var rmws = out.words;\n rmws.length = N4;\n this.convert13b(x4.words, x4.length, rws, N4);\n this.convert13b(y6.words, y6.length, nrws, N4);\n this.transform(rws, _2, rwst, iwst, N4, rbt);\n this.transform(nrws, _2, nrwst, niwst, N4, rbt);\n for (var i3 = 0; i3 < N4; i3++) {\n var rx = rwst[i3] * nrwst[i3] - iwst[i3] * niwst[i3];\n iwst[i3] = rwst[i3] * niwst[i3] + iwst[i3] * nrwst[i3];\n rwst[i3] = rx;\n }\n this.conjugate(rwst, iwst, N4);\n this.transform(rwst, iwst, rmws, _2, N4, rbt);\n this.conjugate(rmws, _2, N4);\n this.normalize13b(rmws, N4);\n out.negative = x4.negative ^ y6.negative;\n out.length = x4.length + y6.length;\n return out.strip();\n };\n BN.prototype.mul = function mul(num2) {\n var out = new BN(null);\n out.words = new Array(this.length + num2.length);\n return this.mulTo(num2, out);\n };\n BN.prototype.mulf = function mulf(num2) {\n var out = new BN(null);\n out.words = new Array(this.length + num2.length);\n return jumboMulTo(this, num2, out);\n };\n BN.prototype.imul = function imul(num2) {\n return this.clone().mulTo(num2, this);\n };\n BN.prototype.imuln = function imuln(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n var carry = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var w3 = (this.words[i3] | 0) * num2;\n var lo = (w3 & 67108863) + (carry & 67108863);\n carry >>= 26;\n carry += w3 / 67108864 | 0;\n carry += lo >>> 26;\n this.words[i3] = lo & 67108863;\n }\n if (carry !== 0) {\n this.words[i3] = carry;\n this.length++;\n }\n this.length = num2 === 0 ? 1 : this.length;\n return this;\n };\n BN.prototype.muln = function muln(num2) {\n return this.clone().imuln(num2);\n };\n BN.prototype.sqr = function sqr() {\n return this.mul(this);\n };\n BN.prototype.isqr = function isqr() {\n return this.imul(this.clone());\n };\n BN.prototype.pow = function pow3(num2) {\n var w3 = toBitArray(num2);\n if (w3.length === 0)\n return new BN(1);\n var res = this;\n for (var i3 = 0; i3 < w3.length; i3++, res = res.sqr()) {\n if (w3[i3] !== 0)\n break;\n }\n if (++i3 < w3.length) {\n for (var q3 = res.sqr(); i3 < w3.length; i3++, q3 = q3.sqr()) {\n if (w3[i3] === 0)\n continue;\n res = res.mul(q3);\n }\n }\n return res;\n };\n BN.prototype.iushln = function iushln(bits) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n var carryMask = 67108863 >>> 26 - r2 << 26 - r2;\n var i3;\n if (r2 !== 0) {\n var carry = 0;\n for (i3 = 0; i3 < this.length; i3++) {\n var newCarry = this.words[i3] & carryMask;\n var c4 = (this.words[i3] | 0) - newCarry << r2;\n this.words[i3] = c4 | carry;\n carry = newCarry >>> 26 - r2;\n }\n if (carry) {\n this.words[i3] = carry;\n this.length++;\n }\n }\n if (s4 !== 0) {\n for (i3 = this.length - 1; i3 >= 0; i3--) {\n this.words[i3 + s4] = this.words[i3];\n }\n for (i3 = 0; i3 < s4; i3++) {\n this.words[i3] = 0;\n }\n this.length += s4;\n }\n return this.strip();\n };\n BN.prototype.ishln = function ishln(bits) {\n assert9(this.negative === 0);\n return this.iushln(bits);\n };\n BN.prototype.iushrn = function iushrn(bits, hint, extended) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var h4;\n if (hint) {\n h4 = (hint - hint % 26) / 26;\n } else {\n h4 = 0;\n }\n var r2 = bits % 26;\n var s4 = Math.min((bits - r2) / 26, this.length);\n var mask = 67108863 ^ 67108863 >>> r2 << r2;\n var maskedWords = extended;\n h4 -= s4;\n h4 = Math.max(0, h4);\n if (maskedWords) {\n for (var i3 = 0; i3 < s4; i3++) {\n maskedWords.words[i3] = this.words[i3];\n }\n maskedWords.length = s4;\n }\n if (s4 === 0) {\n } else if (this.length > s4) {\n this.length -= s4;\n for (i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = this.words[i3 + s4];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n var carry = 0;\n for (i3 = this.length - 1; i3 >= 0 && (carry !== 0 || i3 >= h4); i3--) {\n var word = this.words[i3] | 0;\n this.words[i3] = carry << 26 - r2 | word >>> r2;\n carry = word & mask;\n }\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n return this.strip();\n };\n BN.prototype.ishrn = function ishrn(bits, hint, extended) {\n assert9(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n BN.prototype.shln = function shln(bits) {\n return this.clone().ishln(bits);\n };\n BN.prototype.ushln = function ushln(bits) {\n return this.clone().iushln(bits);\n };\n BN.prototype.shrn = function shrn(bits) {\n return this.clone().ishrn(bits);\n };\n BN.prototype.ushrn = function ushrn(bits) {\n return this.clone().iushrn(bits);\n };\n BN.prototype.testn = function testn(bit) {\n assert9(typeof bit === \"number\" && bit >= 0);\n var r2 = bit % 26;\n var s4 = (bit - r2) / 26;\n var q3 = 1 << r2;\n if (this.length <= s4)\n return false;\n var w3 = this.words[s4];\n return !!(w3 & q3);\n };\n BN.prototype.imaskn = function imaskn(bits) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n assert9(this.negative === 0, \"imaskn works only with positive numbers\");\n if (this.length <= s4) {\n return this;\n }\n if (r2 !== 0) {\n s4++;\n }\n this.length = Math.min(s4, this.length);\n if (r2 !== 0) {\n var mask = 67108863 ^ 67108863 >>> r2 << r2;\n this.words[this.length - 1] &= mask;\n }\n return this.strip();\n };\n BN.prototype.maskn = function maskn(bits) {\n return this.clone().imaskn(bits);\n };\n BN.prototype.iaddn = function iaddn(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n if (num2 < 0)\n return this.isubn(-num2);\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num2) {\n this.words[0] = num2 - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n this.negative = 0;\n this.isubn(num2);\n this.negative = 1;\n return this;\n }\n return this._iaddn(num2);\n };\n BN.prototype._iaddn = function _iaddn(num2) {\n this.words[0] += num2;\n for (var i3 = 0; i3 < this.length && this.words[i3] >= 67108864; i3++) {\n this.words[i3] -= 67108864;\n if (i3 === this.length - 1) {\n this.words[i3 + 1] = 1;\n } else {\n this.words[i3 + 1]++;\n }\n }\n this.length = Math.max(this.length, i3 + 1);\n return this;\n };\n BN.prototype.isubn = function isubn(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n if (num2 < 0)\n return this.iaddn(-num2);\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num2);\n this.negative = 1;\n return this;\n }\n this.words[0] -= num2;\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n for (var i3 = 0; i3 < this.length && this.words[i3] < 0; i3++) {\n this.words[i3] += 67108864;\n this.words[i3 + 1] -= 1;\n }\n }\n return this.strip();\n };\n BN.prototype.addn = function addn(num2) {\n return this.clone().iaddn(num2);\n };\n BN.prototype.subn = function subn(num2) {\n return this.clone().isubn(num2);\n };\n BN.prototype.iabs = function iabs() {\n this.negative = 0;\n return this;\n };\n BN.prototype.abs = function abs() {\n return this.clone().iabs();\n };\n BN.prototype._ishlnsubmul = function _ishlnsubmul(num2, mul, shift) {\n var len = num2.length + shift;\n var i3;\n this._expand(len);\n var w3;\n var carry = 0;\n for (i3 = 0; i3 < num2.length; i3++) {\n w3 = (this.words[i3 + shift] | 0) + carry;\n var right = (num2.words[i3] | 0) * mul;\n w3 -= right & 67108863;\n carry = (w3 >> 26) - (right / 67108864 | 0);\n this.words[i3 + shift] = w3 & 67108863;\n }\n for (; i3 < this.length - shift; i3++) {\n w3 = (this.words[i3 + shift] | 0) + carry;\n carry = w3 >> 26;\n this.words[i3 + shift] = w3 & 67108863;\n }\n if (carry === 0)\n return this.strip();\n assert9(carry === -1);\n carry = 0;\n for (i3 = 0; i3 < this.length; i3++) {\n w3 = -(this.words[i3] | 0) + carry;\n carry = w3 >> 26;\n this.words[i3] = w3 & 67108863;\n }\n this.negative = 1;\n return this.strip();\n };\n BN.prototype._wordDiv = function _wordDiv(num2, mode) {\n var shift = this.length - num2.length;\n var a3 = this.clone();\n var b4 = num2;\n var bhi = b4.words[b4.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b4 = b4.ushln(shift);\n a3.iushln(shift);\n bhi = b4.words[b4.length - 1] | 0;\n }\n var m2 = a3.length - b4.length;\n var q3;\n if (mode !== \"mod\") {\n q3 = new BN(null);\n q3.length = m2 + 1;\n q3.words = new Array(q3.length);\n for (var i3 = 0; i3 < q3.length; i3++) {\n q3.words[i3] = 0;\n }\n }\n var diff = a3.clone()._ishlnsubmul(b4, 1, m2);\n if (diff.negative === 0) {\n a3 = diff;\n if (q3) {\n q3.words[m2] = 1;\n }\n }\n for (var j2 = m2 - 1; j2 >= 0; j2--) {\n var qj = (a3.words[b4.length + j2] | 0) * 67108864 + (a3.words[b4.length + j2 - 1] | 0);\n qj = Math.min(qj / bhi | 0, 67108863);\n a3._ishlnsubmul(b4, qj, j2);\n while (a3.negative !== 0) {\n qj--;\n a3.negative = 0;\n a3._ishlnsubmul(b4, 1, j2);\n if (!a3.isZero()) {\n a3.negative ^= 1;\n }\n }\n if (q3) {\n q3.words[j2] = qj;\n }\n }\n if (q3) {\n q3.strip();\n }\n a3.strip();\n if (mode !== \"div\" && shift !== 0) {\n a3.iushrn(shift);\n }\n return {\n div: q3 || null,\n mod: a3\n };\n };\n BN.prototype.divmod = function divmod(num2, mode, positive) {\n assert9(!num2.isZero());\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n var div, mod3, res;\n if (this.negative !== 0 && num2.negative === 0) {\n res = this.neg().divmod(num2, mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n if (mode !== \"div\") {\n mod3 = res.mod.neg();\n if (positive && mod3.negative !== 0) {\n mod3.iadd(num2);\n }\n }\n return {\n div,\n mod: mod3\n };\n }\n if (this.negative === 0 && num2.negative !== 0) {\n res = this.divmod(num2.neg(), mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n return {\n div,\n mod: res.mod\n };\n }\n if ((this.negative & num2.negative) !== 0) {\n res = this.neg().divmod(num2.neg(), mode);\n if (mode !== \"div\") {\n mod3 = res.mod.neg();\n if (positive && mod3.negative !== 0) {\n mod3.isub(num2);\n }\n }\n return {\n div: res.div,\n mod: mod3\n };\n }\n if (num2.length > this.length || this.cmp(num2) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n if (num2.length === 1) {\n if (mode === \"div\") {\n return {\n div: this.divn(num2.words[0]),\n mod: null\n };\n }\n if (mode === \"mod\") {\n return {\n div: null,\n mod: new BN(this.modn(num2.words[0]))\n };\n }\n return {\n div: this.divn(num2.words[0]),\n mod: new BN(this.modn(num2.words[0]))\n };\n }\n return this._wordDiv(num2, mode);\n };\n BN.prototype.div = function div(num2) {\n return this.divmod(num2, \"div\", false).div;\n };\n BN.prototype.mod = function mod3(num2) {\n return this.divmod(num2, \"mod\", false).mod;\n };\n BN.prototype.umod = function umod(num2) {\n return this.divmod(num2, \"mod\", true).mod;\n };\n BN.prototype.divRound = function divRound(num2) {\n var dm = this.divmod(num2);\n if (dm.mod.isZero())\n return dm.div;\n var mod3 = dm.div.negative !== 0 ? dm.mod.isub(num2) : dm.mod;\n var half = num2.ushrn(1);\n var r2 = num2.andln(1);\n var cmp = mod3.cmp(half);\n if (cmp < 0 || r2 === 1 && cmp === 0)\n return dm.div;\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n BN.prototype.modn = function modn(num2) {\n assert9(num2 <= 67108863);\n var p4 = (1 << 26) % num2;\n var acc = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n acc = (p4 * acc + (this.words[i3] | 0)) % num2;\n }\n return acc;\n };\n BN.prototype.idivn = function idivn(num2) {\n assert9(num2 <= 67108863);\n var carry = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n var w3 = (this.words[i3] | 0) + carry * 67108864;\n this.words[i3] = w3 / num2 | 0;\n carry = w3 % num2;\n }\n return this.strip();\n };\n BN.prototype.divn = function divn(num2) {\n return this.clone().idivn(num2);\n };\n BN.prototype.egcd = function egcd(p4) {\n assert9(p4.negative === 0);\n assert9(!p4.isZero());\n var x4 = this;\n var y6 = p4.clone();\n if (x4.negative !== 0) {\n x4 = x4.umod(p4);\n } else {\n x4 = x4.clone();\n }\n var A4 = new BN(1);\n var B2 = new BN(0);\n var C = new BN(0);\n var D2 = new BN(1);\n var g4 = 0;\n while (x4.isEven() && y6.isEven()) {\n x4.iushrn(1);\n y6.iushrn(1);\n ++g4;\n }\n var yp = y6.clone();\n var xp = x4.clone();\n while (!x4.isZero()) {\n for (var i3 = 0, im = 1; (x4.words[0] & im) === 0 && i3 < 26; ++i3, im <<= 1)\n ;\n if (i3 > 0) {\n x4.iushrn(i3);\n while (i3-- > 0) {\n if (A4.isOdd() || B2.isOdd()) {\n A4.iadd(yp);\n B2.isub(xp);\n }\n A4.iushrn(1);\n B2.iushrn(1);\n }\n }\n for (var j2 = 0, jm = 1; (y6.words[0] & jm) === 0 && j2 < 26; ++j2, jm <<= 1)\n ;\n if (j2 > 0) {\n y6.iushrn(j2);\n while (j2-- > 0) {\n if (C.isOdd() || D2.isOdd()) {\n C.iadd(yp);\n D2.isub(xp);\n }\n C.iushrn(1);\n D2.iushrn(1);\n }\n }\n if (x4.cmp(y6) >= 0) {\n x4.isub(y6);\n A4.isub(C);\n B2.isub(D2);\n } else {\n y6.isub(x4);\n C.isub(A4);\n D2.isub(B2);\n }\n }\n return {\n a: C,\n b: D2,\n gcd: y6.iushln(g4)\n };\n };\n BN.prototype._invmp = function _invmp(p4) {\n assert9(p4.negative === 0);\n assert9(!p4.isZero());\n var a3 = this;\n var b4 = p4.clone();\n if (a3.negative !== 0) {\n a3 = a3.umod(p4);\n } else {\n a3 = a3.clone();\n }\n var x1 = new BN(1);\n var x22 = new BN(0);\n var delta = b4.clone();\n while (a3.cmpn(1) > 0 && b4.cmpn(1) > 0) {\n for (var i3 = 0, im = 1; (a3.words[0] & im) === 0 && i3 < 26; ++i3, im <<= 1)\n ;\n if (i3 > 0) {\n a3.iushrn(i3);\n while (i3-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n x1.iushrn(1);\n }\n }\n for (var j2 = 0, jm = 1; (b4.words[0] & jm) === 0 && j2 < 26; ++j2, jm <<= 1)\n ;\n if (j2 > 0) {\n b4.iushrn(j2);\n while (j2-- > 0) {\n if (x22.isOdd()) {\n x22.iadd(delta);\n }\n x22.iushrn(1);\n }\n }\n if (a3.cmp(b4) >= 0) {\n a3.isub(b4);\n x1.isub(x22);\n } else {\n b4.isub(a3);\n x22.isub(x1);\n }\n }\n var res;\n if (a3.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x22;\n }\n if (res.cmpn(0) < 0) {\n res.iadd(p4);\n }\n return res;\n };\n BN.prototype.gcd = function gcd(num2) {\n if (this.isZero())\n return num2.abs();\n if (num2.isZero())\n return this.abs();\n var a3 = this.clone();\n var b4 = num2.clone();\n a3.negative = 0;\n b4.negative = 0;\n for (var shift = 0; a3.isEven() && b4.isEven(); shift++) {\n a3.iushrn(1);\n b4.iushrn(1);\n }\n do {\n while (a3.isEven()) {\n a3.iushrn(1);\n }\n while (b4.isEven()) {\n b4.iushrn(1);\n }\n var r2 = a3.cmp(b4);\n if (r2 < 0) {\n var t3 = a3;\n a3 = b4;\n b4 = t3;\n } else if (r2 === 0 || b4.cmpn(1) === 0) {\n break;\n }\n a3.isub(b4);\n } while (true);\n return b4.iushln(shift);\n };\n BN.prototype.invm = function invm(num2) {\n return this.egcd(num2).a.umod(num2);\n };\n BN.prototype.isEven = function isEven() {\n return (this.words[0] & 1) === 0;\n };\n BN.prototype.isOdd = function isOdd() {\n return (this.words[0] & 1) === 1;\n };\n BN.prototype.andln = function andln(num2) {\n return this.words[0] & num2;\n };\n BN.prototype.bincn = function bincn(bit) {\n assert9(typeof bit === \"number\");\n var r2 = bit % 26;\n var s4 = (bit - r2) / 26;\n var q3 = 1 << r2;\n if (this.length <= s4) {\n this._expand(s4 + 1);\n this.words[s4] |= q3;\n return this;\n }\n var carry = q3;\n for (var i3 = s4; carry !== 0 && i3 < this.length; i3++) {\n var w3 = this.words[i3] | 0;\n w3 += carry;\n carry = w3 >>> 26;\n w3 &= 67108863;\n this.words[i3] = w3;\n }\n if (carry !== 0) {\n this.words[i3] = carry;\n this.length++;\n }\n return this;\n };\n BN.prototype.isZero = function isZero() {\n return this.length === 1 && this.words[0] === 0;\n };\n BN.prototype.cmpn = function cmpn(num2) {\n var negative = num2 < 0;\n if (this.negative !== 0 && !negative)\n return -1;\n if (this.negative === 0 && negative)\n return 1;\n this.strip();\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num2 = -num2;\n }\n assert9(num2 <= 67108863, \"Number is too big\");\n var w3 = this.words[0] | 0;\n res = w3 === num2 ? 0 : w3 < num2 ? -1 : 1;\n }\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN.prototype.cmp = function cmp(num2) {\n if (this.negative !== 0 && num2.negative === 0)\n return -1;\n if (this.negative === 0 && num2.negative !== 0)\n return 1;\n var res = this.ucmp(num2);\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN.prototype.ucmp = function ucmp(num2) {\n if (this.length > num2.length)\n return 1;\n if (this.length < num2.length)\n return -1;\n var res = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n var a3 = this.words[i3] | 0;\n var b4 = num2.words[i3] | 0;\n if (a3 === b4)\n continue;\n if (a3 < b4) {\n res = -1;\n } else if (a3 > b4) {\n res = 1;\n }\n break;\n }\n return res;\n };\n BN.prototype.gtn = function gtn(num2) {\n return this.cmpn(num2) === 1;\n };\n BN.prototype.gt = function gt(num2) {\n return this.cmp(num2) === 1;\n };\n BN.prototype.gten = function gten(num2) {\n return this.cmpn(num2) >= 0;\n };\n BN.prototype.gte = function gte(num2) {\n return this.cmp(num2) >= 0;\n };\n BN.prototype.ltn = function ltn(num2) {\n return this.cmpn(num2) === -1;\n };\n BN.prototype.lt = function lt(num2) {\n return this.cmp(num2) === -1;\n };\n BN.prototype.lten = function lten(num2) {\n return this.cmpn(num2) <= 0;\n };\n BN.prototype.lte = function lte(num2) {\n return this.cmp(num2) <= 0;\n };\n BN.prototype.eqn = function eqn(num2) {\n return this.cmpn(num2) === 0;\n };\n BN.prototype.eq = function eq(num2) {\n return this.cmp(num2) === 0;\n };\n BN.red = function red(num2) {\n return new Red(num2);\n };\n BN.prototype.toRed = function toRed(ctx) {\n assert9(!this.red, \"Already a number in reduction context\");\n assert9(this.negative === 0, \"red works only with positives\");\n return ctx.convertTo(this)._forceRed(ctx);\n };\n BN.prototype.fromRed = function fromRed() {\n assert9(this.red, \"fromRed works only with numbers in reduction context\");\n return this.red.convertFrom(this);\n };\n BN.prototype._forceRed = function _forceRed(ctx) {\n this.red = ctx;\n return this;\n };\n BN.prototype.forceRed = function forceRed(ctx) {\n assert9(!this.red, \"Already a number in reduction context\");\n return this._forceRed(ctx);\n };\n BN.prototype.redAdd = function redAdd(num2) {\n assert9(this.red, \"redAdd works only with red numbers\");\n return this.red.add(this, num2);\n };\n BN.prototype.redIAdd = function redIAdd(num2) {\n assert9(this.red, \"redIAdd works only with red numbers\");\n return this.red.iadd(this, num2);\n };\n BN.prototype.redSub = function redSub(num2) {\n assert9(this.red, \"redSub works only with red numbers\");\n return this.red.sub(this, num2);\n };\n BN.prototype.redISub = function redISub(num2) {\n assert9(this.red, \"redISub works only with red numbers\");\n return this.red.isub(this, num2);\n };\n BN.prototype.redShl = function redShl(num2) {\n assert9(this.red, \"redShl works only with red numbers\");\n return this.red.shl(this, num2);\n };\n BN.prototype.redMul = function redMul(num2) {\n assert9(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num2);\n return this.red.mul(this, num2);\n };\n BN.prototype.redIMul = function redIMul(num2) {\n assert9(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num2);\n return this.red.imul(this, num2);\n };\n BN.prototype.redSqr = function redSqr() {\n assert9(this.red, \"redSqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n BN.prototype.redISqr = function redISqr() {\n assert9(this.red, \"redISqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n BN.prototype.redSqrt = function redSqrt() {\n assert9(this.red, \"redSqrt works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n BN.prototype.redInvm = function redInvm() {\n assert9(this.red, \"redInvm works only with red numbers\");\n this.red._verify1(this);\n return this.red.invm(this);\n };\n BN.prototype.redNeg = function redNeg() {\n assert9(this.red, \"redNeg works only with red numbers\");\n this.red._verify1(this);\n return this.red.neg(this);\n };\n BN.prototype.redPow = function redPow(num2) {\n assert9(this.red && !num2.red, \"redPow(normalNum)\");\n this.red._verify1(this);\n return this.red.pow(this, num2);\n };\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n function MPrime(name, p4) {\n this.name = name;\n this.p = new BN(p4, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n this.tmp = this._tmp();\n }\n MPrime.prototype._tmp = function _tmp() {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n MPrime.prototype.ireduce = function ireduce(num2) {\n var r2 = num2;\n var rlen;\n do {\n this.split(r2, this.tmp);\n r2 = this.imulK(r2);\n r2 = r2.iadd(this.tmp);\n rlen = r2.bitLength();\n } while (rlen > this.n);\n var cmp = rlen < this.n ? -1 : r2.ucmp(this.p);\n if (cmp === 0) {\n r2.words[0] = 0;\n r2.length = 1;\n } else if (cmp > 0) {\n r2.isub(this.p);\n } else {\n if (r2.strip !== void 0) {\n r2.strip();\n } else {\n r2._strip();\n }\n }\n return r2;\n };\n MPrime.prototype.split = function split3(input, out) {\n input.iushrn(this.n, 0, out);\n };\n MPrime.prototype.imulK = function imulK(num2) {\n return num2.imul(this.k);\n };\n function K256() {\n MPrime.call(\n this,\n \"k256\",\n \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\"\n );\n }\n inherits(K256, MPrime);\n K256.prototype.split = function split3(input, output) {\n var mask = 4194303;\n var outLen = Math.min(input.length, 9);\n for (var i3 = 0; i3 < outLen; i3++) {\n output.words[i3] = input.words[i3];\n }\n output.length = outLen;\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n for (i3 = 10; i3 < input.length; i3++) {\n var next = input.words[i3] | 0;\n input.words[i3 - 10] = (next & mask) << 4 | prev >>> 22;\n prev = next;\n }\n prev >>>= 22;\n input.words[i3 - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n K256.prototype.imulK = function imulK(num2) {\n num2.words[num2.length] = 0;\n num2.words[num2.length + 1] = 0;\n num2.length += 2;\n var lo = 0;\n for (var i3 = 0; i3 < num2.length; i3++) {\n var w3 = num2.words[i3] | 0;\n lo += w3 * 977;\n num2.words[i3] = lo & 67108863;\n lo = w3 * 64 + (lo / 67108864 | 0);\n }\n if (num2.words[num2.length - 1] === 0) {\n num2.length--;\n if (num2.words[num2.length - 1] === 0) {\n num2.length--;\n }\n }\n return num2;\n };\n function P224() {\n MPrime.call(\n this,\n \"p224\",\n \"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\"\n );\n }\n inherits(P224, MPrime);\n function P192() {\n MPrime.call(\n this,\n \"p192\",\n \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\"\n );\n }\n inherits(P192, MPrime);\n function P25519() {\n MPrime.call(\n this,\n \"25519\",\n \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\"\n );\n }\n inherits(P25519, MPrime);\n P25519.prototype.imulK = function imulK(num2) {\n var carry = 0;\n for (var i3 = 0; i3 < num2.length; i3++) {\n var hi = (num2.words[i3] | 0) * 19 + carry;\n var lo = hi & 67108863;\n hi >>>= 26;\n num2.words[i3] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num2.words[num2.length++] = carry;\n }\n return num2;\n };\n BN._prime = function prime(name) {\n if (primes[name])\n return primes[name];\n var prime2;\n if (name === \"k256\") {\n prime2 = new K256();\n } else if (name === \"p224\") {\n prime2 = new P224();\n } else if (name === \"p192\") {\n prime2 = new P192();\n } else if (name === \"p25519\") {\n prime2 = new P25519();\n } else {\n throw new Error(\"Unknown prime \" + name);\n }\n primes[name] = prime2;\n return prime2;\n };\n function Red(m2) {\n if (typeof m2 === \"string\") {\n var prime = BN._prime(m2);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert9(m2.gtn(1), \"modulus must be greater than 1\");\n this.m = m2;\n this.prime = null;\n }\n }\n Red.prototype._verify1 = function _verify1(a3) {\n assert9(a3.negative === 0, \"red works only with positives\");\n assert9(a3.red, \"red works only with red numbers\");\n };\n Red.prototype._verify2 = function _verify2(a3, b4) {\n assert9((a3.negative | b4.negative) === 0, \"red works only with positives\");\n assert9(\n a3.red && a3.red === b4.red,\n \"red works only with red numbers\"\n );\n };\n Red.prototype.imod = function imod(a3) {\n if (this.prime)\n return this.prime.ireduce(a3)._forceRed(this);\n return a3.umod(this.m)._forceRed(this);\n };\n Red.prototype.neg = function neg(a3) {\n if (a3.isZero()) {\n return a3.clone();\n }\n return this.m.sub(a3)._forceRed(this);\n };\n Red.prototype.add = function add2(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.add(b4);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.iadd = function iadd(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.iadd(b4);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n Red.prototype.sub = function sub(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.sub(b4);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.isub = function isub(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.isub(b4);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n Red.prototype.shl = function shl(a3, num2) {\n this._verify1(a3);\n return this.imod(a3.ushln(num2));\n };\n Red.prototype.imul = function imul(a3, b4) {\n this._verify2(a3, b4);\n return this.imod(a3.imul(b4));\n };\n Red.prototype.mul = function mul(a3, b4) {\n this._verify2(a3, b4);\n return this.imod(a3.mul(b4));\n };\n Red.prototype.isqr = function isqr(a3) {\n return this.imul(a3, a3.clone());\n };\n Red.prototype.sqr = function sqr(a3) {\n return this.mul(a3, a3);\n };\n Red.prototype.sqrt = function sqrt(a3) {\n if (a3.isZero())\n return a3.clone();\n var mod3 = this.m.andln(3);\n assert9(mod3 % 2 === 1);\n if (mod3 === 3) {\n var pow3 = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a3, pow3);\n }\n var q3 = this.m.subn(1);\n var s4 = 0;\n while (!q3.isZero() && q3.andln(1) === 0) {\n s4++;\n q3.iushrn(1);\n }\n assert9(!q3.isZero());\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n var lpow = this.m.subn(1).iushrn(1);\n var z2 = this.m.bitLength();\n z2 = new BN(2 * z2 * z2).toRed(this);\n while (this.pow(z2, lpow).cmp(nOne) !== 0) {\n z2.redIAdd(nOne);\n }\n var c4 = this.pow(z2, q3);\n var r2 = this.pow(a3, q3.addn(1).iushrn(1));\n var t3 = this.pow(a3, q3);\n var m2 = s4;\n while (t3.cmp(one) !== 0) {\n var tmp = t3;\n for (var i3 = 0; tmp.cmp(one) !== 0; i3++) {\n tmp = tmp.redSqr();\n }\n assert9(i3 < m2);\n var b4 = this.pow(c4, new BN(1).iushln(m2 - i3 - 1));\n r2 = r2.redMul(b4);\n c4 = b4.redSqr();\n t3 = t3.redMul(c4);\n m2 = i3;\n }\n return r2;\n };\n Red.prototype.invm = function invm(a3) {\n var inv = a3._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n Red.prototype.pow = function pow3(a3, num2) {\n if (num2.isZero())\n return new BN(1).toRed(this);\n if (num2.cmpn(1) === 0)\n return a3.clone();\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a3;\n for (var i3 = 2; i3 < wnd.length; i3++) {\n wnd[i3] = this.mul(wnd[i3 - 1], a3);\n }\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num2.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n for (i3 = num2.length - 1; i3 >= 0; i3--) {\n var word = num2.words[i3];\n for (var j2 = start - 1; j2 >= 0; j2--) {\n var bit = word >> j2 & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i3 !== 0 || j2 !== 0))\n continue;\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n return res;\n };\n Red.prototype.convertTo = function convertTo(num2) {\n var r2 = num2.umod(this.m);\n return r2 === num2 ? r2.clone() : r2;\n };\n Red.prototype.convertFrom = function convertFrom(num2) {\n var res = num2.clone();\n res.red = null;\n return res;\n };\n BN.mont = function mont(num2) {\n return new Mont(num2);\n };\n function Mont(m2) {\n Red.call(this, m2);\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - this.shift % 26;\n }\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n Mont.prototype.convertTo = function convertTo(num2) {\n return this.imod(num2.ushln(this.shift));\n };\n Mont.prototype.convertFrom = function convertFrom(num2) {\n var r2 = this.imod(num2.mul(this.rinv));\n r2.red = null;\n return r2;\n };\n Mont.prototype.imul = function imul(a3, b4) {\n if (a3.isZero() || b4.isZero()) {\n a3.words[0] = 0;\n a3.length = 1;\n return a3;\n }\n var t3 = a3.imul(b4);\n var c4 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u2 = t3.isub(c4).iushrn(this.shift);\n var res = u2;\n if (u2.cmp(this.m) >= 0) {\n res = u2.isub(this.m);\n } else if (u2.cmpn(0) < 0) {\n res = u2.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.mul = function mul(a3, b4) {\n if (a3.isZero() || b4.isZero())\n return new BN(0)._forceRed(this);\n var t3 = a3.mul(b4);\n var c4 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u2 = t3.isub(c4).iushrn(this.shift);\n var res = u2;\n if (u2.cmp(this.m) >= 0) {\n res = u2.isub(this.m);\n } else if (u2.cmpn(0) < 0) {\n res = u2.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.invm = function invm(a3) {\n var res = this.imod(a3._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n })(typeof module === \"undefined\" || module, exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/minimalistic-assert@1.0.1/node_modules/minimalistic-assert/index.js\n var require_minimalistic_assert = __commonJS({\n \"../../../node_modules/.pnpm/minimalistic-assert@1.0.1/node_modules/minimalistic-assert/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = assert9;\n function assert9(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n assert9.equal = function assertEqual(l6, r2, msg) {\n if (l6 != r2)\n throw new Error(msg || \"Assertion failed: \" + l6 + \" != \" + r2);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/minimalistic-crypto-utils@1.0.1/node_modules/minimalistic-crypto-utils/lib/utils.js\n var require_utils2 = __commonJS({\n \"../../../node_modules/.pnpm/minimalistic-crypto-utils@1.0.1/node_modules/minimalistic-crypto-utils/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = exports3;\n function toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg !== \"string\") {\n for (var i3 = 0; i3 < msg.length; i3++)\n res[i3] = msg[i3] | 0;\n return res;\n }\n if (enc === \"hex\") {\n msg = msg.replace(/[^a-z0-9]+/ig, \"\");\n if (msg.length % 2 !== 0)\n msg = \"0\" + msg;\n for (var i3 = 0; i3 < msg.length; i3 += 2)\n res.push(parseInt(msg[i3] + msg[i3 + 1], 16));\n } else {\n for (var i3 = 0; i3 < msg.length; i3++) {\n var c4 = msg.charCodeAt(i3);\n var hi = c4 >> 8;\n var lo = c4 & 255;\n if (hi)\n res.push(hi, lo);\n else\n res.push(lo);\n }\n }\n return res;\n }\n utils.toArray = toArray;\n function zero2(word) {\n if (word.length === 1)\n return \"0\" + word;\n else\n return word;\n }\n utils.zero2 = zero2;\n function toHex3(msg) {\n var res = \"\";\n for (var i3 = 0; i3 < msg.length; i3++)\n res += zero2(msg[i3].toString(16));\n return res;\n }\n utils.toHex = toHex3;\n utils.encode = function encode5(arr, enc) {\n if (enc === \"hex\")\n return toHex3(arr);\n else\n return arr;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/utils.js\n var require_utils3 = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = exports3;\n var BN = require_bn2();\n var minAssert = require_minimalistic_assert();\n var minUtils = require_utils2();\n utils.assert = minAssert;\n utils.toArray = minUtils.toArray;\n utils.zero2 = minUtils.zero2;\n utils.toHex = minUtils.toHex;\n utils.encode = minUtils.encode;\n function getNAF(num2, w3, bits) {\n var naf = new Array(Math.max(num2.bitLength(), bits) + 1);\n var i3;\n for (i3 = 0; i3 < naf.length; i3 += 1) {\n naf[i3] = 0;\n }\n var ws = 1 << w3 + 1;\n var k4 = num2.clone();\n for (i3 = 0; i3 < naf.length; i3++) {\n var z2;\n var mod3 = k4.andln(ws - 1);\n if (k4.isOdd()) {\n if (mod3 > (ws >> 1) - 1)\n z2 = (ws >> 1) - mod3;\n else\n z2 = mod3;\n k4.isubn(z2);\n } else {\n z2 = 0;\n }\n naf[i3] = z2;\n k4.iushrn(1);\n }\n return naf;\n }\n utils.getNAF = getNAF;\n function getJSF(k1, k22) {\n var jsf = [\n [],\n []\n ];\n k1 = k1.clone();\n k22 = k22.clone();\n var d1 = 0;\n var d22 = 0;\n var m8;\n while (k1.cmpn(-d1) > 0 || k22.cmpn(-d22) > 0) {\n var m14 = k1.andln(3) + d1 & 3;\n var m24 = k22.andln(3) + d22 & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n m8 = k1.andln(7) + d1 & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n m8 = k22.andln(7) + d22 & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d22 === u2 + 1)\n d22 = 1 - d22;\n k1.iushrn(1);\n k22.iushrn(1);\n }\n return jsf;\n }\n utils.getJSF = getJSF;\n function cachedProperty(obj, name, computer) {\n var key = \"_\" + name;\n obj.prototype[name] = function cachedProperty2() {\n return this[key] !== void 0 ? this[key] : this[key] = computer.call(this);\n };\n }\n utils.cachedProperty = cachedProperty;\n function parseBytes(bytes) {\n return typeof bytes === \"string\" ? utils.toArray(bytes, \"hex\") : bytes;\n }\n utils.parseBytes = parseBytes;\n function intFromLE(bytes) {\n return new BN(bytes, \"hex\", \"le\");\n }\n utils.intFromLE = intFromLE;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/empty.js\n var empty_exports = {};\n __export(empty_exports, {\n default: () => empty_default\n });\n var empty_default;\n var init_empty = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/empty.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n empty_default = {};\n }\n });\n\n // ../../../node_modules/.pnpm/brorand@1.1.0/node_modules/brorand/index.js\n var require_brorand = __commonJS({\n \"../../../node_modules/.pnpm/brorand@1.1.0/node_modules/brorand/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var r2;\n module.exports = function rand(len) {\n if (!r2)\n r2 = new Rand(null);\n return r2.generate(len);\n };\n function Rand(rand) {\n this.rand = rand;\n }\n module.exports.Rand = Rand;\n Rand.prototype.generate = function generate(len) {\n return this._rand(len);\n };\n Rand.prototype._rand = function _rand(n2) {\n if (this.rand.getBytes)\n return this.rand.getBytes(n2);\n var res = new Uint8Array(n2);\n for (var i3 = 0; i3 < res.length; i3++)\n res[i3] = this.rand.getByte();\n return res;\n };\n if (typeof self === \"object\") {\n if (self.crypto && self.crypto.getRandomValues) {\n Rand.prototype._rand = function _rand(n2) {\n var arr = new Uint8Array(n2);\n self.crypto.getRandomValues(arr);\n return arr;\n };\n } else if (self.msCrypto && self.msCrypto.getRandomValues) {\n Rand.prototype._rand = function _rand(n2) {\n var arr = new Uint8Array(n2);\n self.msCrypto.getRandomValues(arr);\n return arr;\n };\n } else if (typeof window === \"object\") {\n Rand.prototype._rand = function() {\n throw new Error(\"Not implemented yet\");\n };\n }\n } else {\n try {\n crypto4 = (init_empty(), __toCommonJS(empty_exports));\n if (typeof crypto4.randomBytes !== \"function\")\n throw new Error(\"Not supported\");\n Rand.prototype._rand = function _rand(n2) {\n return crypto4.randomBytes(n2);\n };\n } catch (e2) {\n }\n }\n var crypto4;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/base.js\n var require_base = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/base.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var utils = require_utils3();\n var getNAF = utils.getNAF;\n var getJSF = utils.getJSF;\n var assert9 = utils.assert;\n function BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n this._bitLength = this.n ? this.n.bitLength() : 0;\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n }\n module.exports = BaseCurve;\n BaseCurve.prototype.point = function point() {\n throw new Error(\"Not implemented\");\n };\n BaseCurve.prototype.validate = function validate7() {\n throw new Error(\"Not implemented\");\n };\n BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p4, k4) {\n assert9(p4.precomputed);\n var doubles = p4._getDoubles();\n var naf = getNAF(k4, 1, this._bitLength);\n var I2 = (1 << doubles.step + 1) - (doubles.step % 2 === 0 ? 2 : 1);\n I2 /= 3;\n var repr = [];\n var j2;\n var nafW;\n for (j2 = 0; j2 < naf.length; j2 += doubles.step) {\n nafW = 0;\n for (var l6 = j2 + doubles.step - 1; l6 >= j2; l6--)\n nafW = (nafW << 1) + naf[l6];\n repr.push(nafW);\n }\n var a3 = this.jpoint(null, null, null);\n var b4 = this.jpoint(null, null, null);\n for (var i3 = I2; i3 > 0; i3--) {\n for (j2 = 0; j2 < repr.length; j2++) {\n nafW = repr[j2];\n if (nafW === i3)\n b4 = b4.mixedAdd(doubles.points[j2]);\n else if (nafW === -i3)\n b4 = b4.mixedAdd(doubles.points[j2].neg());\n }\n a3 = a3.add(b4);\n }\n return a3.toP();\n };\n BaseCurve.prototype._wnafMul = function _wnafMul(p4, k4) {\n var w3 = 4;\n var nafPoints = p4._getNAFPoints(w3);\n w3 = nafPoints.wnd;\n var wnd = nafPoints.points;\n var naf = getNAF(k4, w3, this._bitLength);\n var acc = this.jpoint(null, null, null);\n for (var i3 = naf.length - 1; i3 >= 0; i3--) {\n for (var l6 = 0; i3 >= 0 && naf[i3] === 0; i3--)\n l6++;\n if (i3 >= 0)\n l6++;\n acc = acc.dblp(l6);\n if (i3 < 0)\n break;\n var z2 = naf[i3];\n assert9(z2 !== 0);\n if (p4.type === \"affine\") {\n if (z2 > 0)\n acc = acc.mixedAdd(wnd[z2 - 1 >> 1]);\n else\n acc = acc.mixedAdd(wnd[-z2 - 1 >> 1].neg());\n } else {\n if (z2 > 0)\n acc = acc.add(wnd[z2 - 1 >> 1]);\n else\n acc = acc.add(wnd[-z2 - 1 >> 1].neg());\n }\n }\n return p4.type === \"affine\" ? acc.toP() : acc;\n };\n BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, points, coeffs, len, jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n var max = 0;\n var i3;\n var j2;\n var p4;\n for (i3 = 0; i3 < len; i3++) {\n p4 = points[i3];\n var nafPoints = p4._getNAFPoints(defW);\n wndWidth[i3] = nafPoints.wnd;\n wnd[i3] = nafPoints.points;\n }\n for (i3 = len - 1; i3 >= 1; i3 -= 2) {\n var a3 = i3 - 1;\n var b4 = i3;\n if (wndWidth[a3] !== 1 || wndWidth[b4] !== 1) {\n naf[a3] = getNAF(coeffs[a3], wndWidth[a3], this._bitLength);\n naf[b4] = getNAF(coeffs[b4], wndWidth[b4], this._bitLength);\n max = Math.max(naf[a3].length, max);\n max = Math.max(naf[b4].length, max);\n continue;\n }\n var comb = [\n points[a3],\n /* 1 */\n null,\n /* 3 */\n null,\n /* 5 */\n points[b4]\n /* 7 */\n ];\n if (points[a3].y.cmp(points[b4].y) === 0) {\n comb[1] = points[a3].add(points[b4]);\n comb[2] = points[a3].toJ().mixedAdd(points[b4].neg());\n } else if (points[a3].y.cmp(points[b4].y.redNeg()) === 0) {\n comb[1] = points[a3].toJ().mixedAdd(points[b4]);\n comb[2] = points[a3].add(points[b4].neg());\n } else {\n comb[1] = points[a3].toJ().mixedAdd(points[b4]);\n comb[2] = points[a3].toJ().mixedAdd(points[b4].neg());\n }\n var index2 = [\n -3,\n /* -1 -1 */\n -1,\n /* -1 0 */\n -5,\n /* -1 1 */\n -7,\n /* 0 -1 */\n 0,\n /* 0 0 */\n 7,\n /* 0 1 */\n 5,\n /* 1 -1 */\n 1,\n /* 1 0 */\n 3\n /* 1 1 */\n ];\n var jsf = getJSF(coeffs[a3], coeffs[b4]);\n max = Math.max(jsf[0].length, max);\n naf[a3] = new Array(max);\n naf[b4] = new Array(max);\n for (j2 = 0; j2 < max; j2++) {\n var ja = jsf[0][j2] | 0;\n var jb = jsf[1][j2] | 0;\n naf[a3][j2] = index2[(ja + 1) * 3 + (jb + 1)];\n naf[b4][j2] = 0;\n wnd[a3] = comb;\n }\n }\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (i3 = max; i3 >= 0; i3--) {\n var k4 = 0;\n while (i3 >= 0) {\n var zero = true;\n for (j2 = 0; j2 < len; j2++) {\n tmp[j2] = naf[j2][i3] | 0;\n if (tmp[j2] !== 0)\n zero = false;\n }\n if (!zero)\n break;\n k4++;\n i3--;\n }\n if (i3 >= 0)\n k4++;\n acc = acc.dblp(k4);\n if (i3 < 0)\n break;\n for (j2 = 0; j2 < len; j2++) {\n var z2 = tmp[j2];\n p4;\n if (z2 === 0)\n continue;\n else if (z2 > 0)\n p4 = wnd[j2][z2 - 1 >> 1];\n else if (z2 < 0)\n p4 = wnd[j2][-z2 - 1 >> 1].neg();\n if (p4.type === \"affine\")\n acc = acc.mixedAdd(p4);\n else\n acc = acc.add(p4);\n }\n }\n for (i3 = 0; i3 < len; i3++)\n wnd[i3] = null;\n if (jacobianResult)\n return acc;\n else\n return acc.toP();\n };\n function BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n }\n BaseCurve.BasePoint = BasePoint;\n BasePoint.prototype.eq = function eq() {\n throw new Error(\"Not implemented\");\n };\n BasePoint.prototype.validate = function validate7() {\n return this.curve.validate(this);\n };\n BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils.toArray(bytes, enc);\n var len = this.p.byteLength();\n if ((bytes[0] === 4 || bytes[0] === 6 || bytes[0] === 7) && bytes.length - 1 === 2 * len) {\n if (bytes[0] === 6)\n assert9(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 7)\n assert9(bytes[bytes.length - 1] % 2 === 1);\n var res = this.point(\n bytes.slice(1, 1 + len),\n bytes.slice(1 + len, 1 + 2 * len)\n );\n return res;\n } else if ((bytes[0] === 2 || bytes[0] === 3) && bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 3);\n }\n throw new Error(\"Unknown point format\");\n };\n BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n };\n BasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x4 = this.getX().toArray(\"be\", len);\n if (compact)\n return [this.getY().isEven() ? 2 : 3].concat(x4);\n return [4].concat(x4, this.getY().toArray(\"be\", len));\n };\n BasePoint.prototype.encode = function encode5(enc, compact) {\n return utils.encode(this._encode(compact), enc);\n };\n BasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed)\n return this;\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n return this;\n };\n BasePoint.prototype._hasDoubles = function _hasDoubles(k4) {\n if (!this.precomputed)\n return false;\n var doubles = this.precomputed.doubles;\n if (!doubles)\n return false;\n return doubles.points.length >= Math.ceil((k4.bitLength() + 1) / doubles.step);\n };\n BasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles)\n return this.precomputed.doubles;\n var doubles = [this];\n var acc = this;\n for (var i3 = 0; i3 < power; i3 += step) {\n for (var j2 = 0; j2 < step; j2++)\n acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step,\n points: doubles\n };\n };\n BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf)\n return this.precomputed.naf;\n var res = [this];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i3 = 1; i3 < max; i3++)\n res[i3] = res[i3 - 1].add(dbl);\n return {\n wnd,\n points: res\n };\n };\n BasePoint.prototype._getBeta = function _getBeta() {\n return null;\n };\n BasePoint.prototype.dblp = function dblp(k4) {\n var r2 = this;\n for (var i3 = 0; i3 < k4; i3++)\n r2 = r2.dbl();\n return r2;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js\n var require_inherits_browser = __commonJS({\n \"../../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n if (typeof Object.create === \"function\") {\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n }\n };\n } else {\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {\n };\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/short.js\n var require_short = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/short.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils3();\n var BN = require_bn2();\n var inherits = require_inherits_browser();\n var Base = require_base();\n var assert9 = utils.assert;\n function ShortCurve(conf) {\n Base.call(this, \"short\", conf);\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.tinv = this.two.redInvm();\n this.zeroA = this.a.fromRed().cmpn(0) === 0;\n this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;\n this.endo = this._getEndomorphism(conf);\n this._endoWnafT1 = new Array(4);\n this._endoWnafT2 = new Array(4);\n }\n inherits(ShortCurve, Base);\n module.exports = ShortCurve;\n ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {\n if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)\n return;\n var beta;\n var lambda;\n if (conf.beta) {\n beta = new BN(conf.beta, 16).toRed(this.red);\n } else {\n var betas = this._getEndoRoots(this.p);\n beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];\n beta = beta.toRed(this.red);\n }\n if (conf.lambda) {\n lambda = new BN(conf.lambda, 16);\n } else {\n var lambdas = this._getEndoRoots(this.n);\n if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {\n lambda = lambdas[0];\n } else {\n lambda = lambdas[1];\n assert9(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);\n }\n }\n var basis;\n if (conf.basis) {\n basis = conf.basis.map(function(vec) {\n return {\n a: new BN(vec.a, 16),\n b: new BN(vec.b, 16)\n };\n });\n } else {\n basis = this._getEndoBasis(lambda);\n }\n return {\n beta,\n lambda,\n basis\n };\n };\n ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num2) {\n var red = num2 === this.p ? this.red : BN.mont(num2);\n var tinv = new BN(2).toRed(red).redInvm();\n var ntinv = tinv.redNeg();\n var s4 = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);\n var l1 = ntinv.redAdd(s4).fromRed();\n var l22 = ntinv.redSub(s4).fromRed();\n return [l1, l22];\n };\n ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {\n var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));\n var u2 = lambda;\n var v2 = this.n.clone();\n var x1 = new BN(1);\n var y1 = new BN(0);\n var x22 = new BN(0);\n var y22 = new BN(1);\n var a0;\n var b0;\n var a1;\n var b1;\n var a22;\n var b22;\n var prevR;\n var i3 = 0;\n var r2;\n var x4;\n while (u2.cmpn(0) !== 0) {\n var q3 = v2.div(u2);\n r2 = v2.sub(q3.mul(u2));\n x4 = x22.sub(q3.mul(x1));\n var y6 = y22.sub(q3.mul(y1));\n if (!a1 && r2.cmp(aprxSqrt) < 0) {\n a0 = prevR.neg();\n b0 = x1;\n a1 = r2.neg();\n b1 = x4;\n } else if (a1 && ++i3 === 2) {\n break;\n }\n prevR = r2;\n v2 = u2;\n u2 = r2;\n x22 = x1;\n x1 = x4;\n y22 = y1;\n y1 = y6;\n }\n a22 = r2.neg();\n b22 = x4;\n var len1 = a1.sqr().add(b1.sqr());\n var len2 = a22.sqr().add(b22.sqr());\n if (len2.cmp(len1) >= 0) {\n a22 = a0;\n b22 = b0;\n }\n if (a1.negative) {\n a1 = a1.neg();\n b1 = b1.neg();\n }\n if (a22.negative) {\n a22 = a22.neg();\n b22 = b22.neg();\n }\n return [\n { a: a1, b: b1 },\n { a: a22, b: b22 }\n ];\n };\n ShortCurve.prototype._endoSplit = function _endoSplit(k4) {\n var basis = this.endo.basis;\n var v12 = basis[0];\n var v2 = basis[1];\n var c1 = v2.b.mul(k4).divRound(this.n);\n var c22 = v12.b.neg().mul(k4).divRound(this.n);\n var p1 = c1.mul(v12.a);\n var p22 = c22.mul(v2.a);\n var q1 = c1.mul(v12.b);\n var q22 = c22.mul(v2.b);\n var k1 = k4.sub(p1).sub(p22);\n var k22 = q1.add(q22).neg();\n return { k1, k2: k22 };\n };\n ShortCurve.prototype.pointFromX = function pointFromX(x4, odd) {\n x4 = new BN(x4, 16);\n if (!x4.red)\n x4 = x4.toRed(this.red);\n var y22 = x4.redSqr().redMul(x4).redIAdd(x4.redMul(this.a)).redIAdd(this.b);\n var y6 = y22.redSqrt();\n if (y6.redSqr().redSub(y22).cmp(this.zero) !== 0)\n throw new Error(\"invalid point\");\n var isOdd = y6.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y6 = y6.redNeg();\n return this.point(x4, y6);\n };\n ShortCurve.prototype.validate = function validate7(point) {\n if (point.inf)\n return true;\n var x4 = point.x;\n var y6 = point.y;\n var ax = this.a.redMul(x4);\n var rhs = x4.redSqr().redMul(x4).redIAdd(ax).redIAdd(this.b);\n return y6.redSqr().redISub(rhs).cmpn(0) === 0;\n };\n ShortCurve.prototype._endoWnafMulAdd = function _endoWnafMulAdd(points, coeffs, jacobianResult) {\n var npoints = this._endoWnafT1;\n var ncoeffs = this._endoWnafT2;\n for (var i3 = 0; i3 < points.length; i3++) {\n var split3 = this._endoSplit(coeffs[i3]);\n var p4 = points[i3];\n var beta = p4._getBeta();\n if (split3.k1.negative) {\n split3.k1.ineg();\n p4 = p4.neg(true);\n }\n if (split3.k2.negative) {\n split3.k2.ineg();\n beta = beta.neg(true);\n }\n npoints[i3 * 2] = p4;\n npoints[i3 * 2 + 1] = beta;\n ncoeffs[i3 * 2] = split3.k1;\n ncoeffs[i3 * 2 + 1] = split3.k2;\n }\n var res = this._wnafMulAdd(1, npoints, ncoeffs, i3 * 2, jacobianResult);\n for (var j2 = 0; j2 < i3 * 2; j2++) {\n npoints[j2] = null;\n ncoeffs[j2] = null;\n }\n return res;\n };\n function Point3(curve, x4, y6, isRed) {\n Base.BasePoint.call(this, curve, \"affine\");\n if (x4 === null && y6 === null) {\n this.x = null;\n this.y = null;\n this.inf = true;\n } else {\n this.x = new BN(x4, 16);\n this.y = new BN(y6, 16);\n if (isRed) {\n this.x.forceRed(this.curve.red);\n this.y.forceRed(this.curve.red);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n this.inf = false;\n }\n }\n inherits(Point3, Base.BasePoint);\n ShortCurve.prototype.point = function point(x4, y6, isRed) {\n return new Point3(this, x4, y6, isRed);\n };\n ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {\n return Point3.fromJSON(this, obj, red);\n };\n Point3.prototype._getBeta = function _getBeta() {\n if (!this.curve.endo)\n return;\n var pre = this.precomputed;\n if (pre && pre.beta)\n return pre.beta;\n var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);\n if (pre) {\n var curve = this.curve;\n var endoMul = function(p4) {\n return curve.point(p4.x.redMul(curve.endo.beta), p4.y);\n };\n pre.beta = beta;\n beta.precomputed = {\n beta: null,\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(endoMul)\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(endoMul)\n }\n };\n }\n return beta;\n };\n Point3.prototype.toJSON = function toJSON() {\n if (!this.precomputed)\n return [this.x, this.y];\n return [this.x, this.y, this.precomputed && {\n doubles: this.precomputed.doubles && {\n step: this.precomputed.doubles.step,\n points: this.precomputed.doubles.points.slice(1)\n },\n naf: this.precomputed.naf && {\n wnd: this.precomputed.naf.wnd,\n points: this.precomputed.naf.points.slice(1)\n }\n }];\n };\n Point3.fromJSON = function fromJSON(curve, obj, red) {\n if (typeof obj === \"string\")\n obj = JSON.parse(obj);\n var res = curve.point(obj[0], obj[1], red);\n if (!obj[2])\n return res;\n function obj2point(obj2) {\n return curve.point(obj2[0], obj2[1], red);\n }\n var pre = obj[2];\n res.precomputed = {\n beta: null,\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: [res].concat(pre.doubles.points.map(obj2point))\n },\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: [res].concat(pre.naf.points.map(obj2point))\n }\n };\n return res;\n };\n Point3.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return \"\";\n return \"\";\n };\n Point3.prototype.isInfinity = function isInfinity() {\n return this.inf;\n };\n Point3.prototype.add = function add2(p4) {\n if (this.inf)\n return p4;\n if (p4.inf)\n return this;\n if (this.eq(p4))\n return this.dbl();\n if (this.neg().eq(p4))\n return this.curve.point(null, null);\n if (this.x.cmp(p4.x) === 0)\n return this.curve.point(null, null);\n var c4 = this.y.redSub(p4.y);\n if (c4.cmpn(0) !== 0)\n c4 = c4.redMul(this.x.redSub(p4.x).redInvm());\n var nx = c4.redSqr().redISub(this.x).redISub(p4.x);\n var ny = c4.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n };\n Point3.prototype.dbl = function dbl() {\n if (this.inf)\n return this;\n var ys1 = this.y.redAdd(this.y);\n if (ys1.cmpn(0) === 0)\n return this.curve.point(null, null);\n var a3 = this.curve.a;\n var x22 = this.x.redSqr();\n var dyinv = ys1.redInvm();\n var c4 = x22.redAdd(x22).redIAdd(x22).redIAdd(a3).redMul(dyinv);\n var nx = c4.redSqr().redISub(this.x.redAdd(this.x));\n var ny = c4.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n };\n Point3.prototype.getX = function getX() {\n return this.x.fromRed();\n };\n Point3.prototype.getY = function getY() {\n return this.y.fromRed();\n };\n Point3.prototype.mul = function mul(k4) {\n k4 = new BN(k4, 16);\n if (this.isInfinity())\n return this;\n else if (this._hasDoubles(k4))\n return this.curve._fixedNafMul(this, k4);\n else if (this.curve.endo)\n return this.curve._endoWnafMulAdd([this], [k4]);\n else\n return this.curve._wnafMul(this, k4);\n };\n Point3.prototype.mulAdd = function mulAdd(k1, p22, k22) {\n var points = [this, p22];\n var coeffs = [k1, k22];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2);\n };\n Point3.prototype.jmulAdd = function jmulAdd(k1, p22, k22) {\n var points = [this, p22];\n var coeffs = [k1, k22];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs, true);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2, true);\n };\n Point3.prototype.eq = function eq(p4) {\n return this === p4 || this.inf === p4.inf && (this.inf || this.x.cmp(p4.x) === 0 && this.y.cmp(p4.y) === 0);\n };\n Point3.prototype.neg = function neg(_precompute) {\n if (this.inf)\n return this;\n var res = this.curve.point(this.x, this.y.redNeg());\n if (_precompute && this.precomputed) {\n var pre = this.precomputed;\n var negate = function(p4) {\n return p4.neg();\n };\n res.precomputed = {\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(negate)\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(negate)\n }\n };\n }\n return res;\n };\n Point3.prototype.toJ = function toJ() {\n if (this.inf)\n return this.curve.jpoint(null, null, null);\n var res = this.curve.jpoint(this.x, this.y, this.curve.one);\n return res;\n };\n function JPoint(curve, x4, y6, z2) {\n Base.BasePoint.call(this, curve, \"jacobian\");\n if (x4 === null && y6 === null && z2 === null) {\n this.x = this.curve.one;\n this.y = this.curve.one;\n this.z = new BN(0);\n } else {\n this.x = new BN(x4, 16);\n this.y = new BN(y6, 16);\n this.z = new BN(z2, 16);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n this.zOne = this.z === this.curve.one;\n }\n inherits(JPoint, Base.BasePoint);\n ShortCurve.prototype.jpoint = function jpoint(x4, y6, z2) {\n return new JPoint(this, x4, y6, z2);\n };\n JPoint.prototype.toP = function toP() {\n if (this.isInfinity())\n return this.curve.point(null, null);\n var zinv = this.z.redInvm();\n var zinv2 = zinv.redSqr();\n var ax = this.x.redMul(zinv2);\n var ay = this.y.redMul(zinv2).redMul(zinv);\n return this.curve.point(ax, ay);\n };\n JPoint.prototype.neg = function neg() {\n return this.curve.jpoint(this.x, this.y.redNeg(), this.z);\n };\n JPoint.prototype.add = function add2(p4) {\n if (this.isInfinity())\n return p4;\n if (p4.isInfinity())\n return this;\n var pz2 = p4.z.redSqr();\n var z2 = this.z.redSqr();\n var u1 = this.x.redMul(pz2);\n var u2 = p4.x.redMul(z2);\n var s1 = this.y.redMul(pz2.redMul(p4.z));\n var s22 = p4.y.redMul(z2.redMul(this.z));\n var h4 = u1.redSub(u2);\n var r2 = s1.redSub(s22);\n if (h4.cmpn(0) === 0) {\n if (r2.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n var h22 = h4.redSqr();\n var h32 = h22.redMul(h4);\n var v2 = u1.redMul(h22);\n var nx = r2.redSqr().redIAdd(h32).redISub(v2).redISub(v2);\n var ny = r2.redMul(v2.redISub(nx)).redISub(s1.redMul(h32));\n var nz = this.z.redMul(p4.z).redMul(h4);\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype.mixedAdd = function mixedAdd(p4) {\n if (this.isInfinity())\n return p4.toJ();\n if (p4.isInfinity())\n return this;\n var z2 = this.z.redSqr();\n var u1 = this.x;\n var u2 = p4.x.redMul(z2);\n var s1 = this.y;\n var s22 = p4.y.redMul(z2).redMul(this.z);\n var h4 = u1.redSub(u2);\n var r2 = s1.redSub(s22);\n if (h4.cmpn(0) === 0) {\n if (r2.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n var h22 = h4.redSqr();\n var h32 = h22.redMul(h4);\n var v2 = u1.redMul(h22);\n var nx = r2.redSqr().redIAdd(h32).redISub(v2).redISub(v2);\n var ny = r2.redMul(v2.redISub(nx)).redISub(s1.redMul(h32));\n var nz = this.z.redMul(h4);\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype.dblp = function dblp(pow3) {\n if (pow3 === 0)\n return this;\n if (this.isInfinity())\n return this;\n if (!pow3)\n return this.dbl();\n var i3;\n if (this.curve.zeroA || this.curve.threeA) {\n var r2 = this;\n for (i3 = 0; i3 < pow3; i3++)\n r2 = r2.dbl();\n return r2;\n }\n var a3 = this.curve.a;\n var tinv = this.curve.tinv;\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n var jyd = jy.redAdd(jy);\n for (i3 = 0; i3 < pow3; i3++) {\n var jx2 = jx.redSqr();\n var jyd2 = jyd.redSqr();\n var jyd4 = jyd2.redSqr();\n var c4 = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a3.redMul(jz4));\n var t1 = jx.redMul(jyd2);\n var nx = c4.redSqr().redISub(t1.redAdd(t1));\n var t22 = t1.redISub(nx);\n var dny = c4.redMul(t22);\n dny = dny.redIAdd(dny).redISub(jyd4);\n var nz = jyd.redMul(jz);\n if (i3 + 1 < pow3)\n jz4 = jz4.redMul(jyd4);\n jx = nx;\n jz = nz;\n jyd = dny;\n }\n return this.curve.jpoint(jx, jyd.redMul(tinv), jz);\n };\n JPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n if (this.curve.zeroA)\n return this._zeroDbl();\n else if (this.curve.threeA)\n return this._threeDbl();\n else\n return this._dbl();\n };\n JPoint.prototype._zeroDbl = function _zeroDbl() {\n var nx;\n var ny;\n var nz;\n if (this.zOne) {\n var xx = this.x.redSqr();\n var yy = this.y.redSqr();\n var yyyy = yy.redSqr();\n var s4 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s4 = s4.redIAdd(s4);\n var m2 = xx.redAdd(xx).redIAdd(xx);\n var t3 = m2.redSqr().redISub(s4).redISub(s4);\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n nx = t3;\n ny = m2.redMul(s4.redISub(t3)).redISub(yyyy8);\n nz = this.y.redAdd(this.y);\n } else {\n var a3 = this.x.redSqr();\n var b4 = this.y.redSqr();\n var c4 = b4.redSqr();\n var d5 = this.x.redAdd(b4).redSqr().redISub(a3).redISub(c4);\n d5 = d5.redIAdd(d5);\n var e2 = a3.redAdd(a3).redIAdd(a3);\n var f7 = e2.redSqr();\n var c8 = c4.redIAdd(c4);\n c8 = c8.redIAdd(c8);\n c8 = c8.redIAdd(c8);\n nx = f7.redISub(d5).redISub(d5);\n ny = e2.redMul(d5.redISub(nx)).redISub(c8);\n nz = this.y.redMul(this.z);\n nz = nz.redIAdd(nz);\n }\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype._threeDbl = function _threeDbl() {\n var nx;\n var ny;\n var nz;\n if (this.zOne) {\n var xx = this.x.redSqr();\n var yy = this.y.redSqr();\n var yyyy = yy.redSqr();\n var s4 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s4 = s4.redIAdd(s4);\n var m2 = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);\n var t3 = m2.redSqr().redISub(s4).redISub(s4);\n nx = t3;\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n ny = m2.redMul(s4.redISub(t3)).redISub(yyyy8);\n nz = this.y.redAdd(this.y);\n } else {\n var delta = this.z.redSqr();\n var gamma = this.y.redSqr();\n var beta = this.x.redMul(gamma);\n var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));\n alpha = alpha.redAdd(alpha).redIAdd(alpha);\n var beta4 = beta.redIAdd(beta);\n beta4 = beta4.redIAdd(beta4);\n var beta8 = beta4.redAdd(beta4);\n nx = alpha.redSqr().redISub(beta8);\n nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);\n var ggamma8 = gamma.redSqr();\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);\n }\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype._dbl = function _dbl() {\n var a3 = this.curve.a;\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n var jx2 = jx.redSqr();\n var jy2 = jy.redSqr();\n var c4 = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a3.redMul(jz4));\n var jxd4 = jx.redAdd(jx);\n jxd4 = jxd4.redIAdd(jxd4);\n var t1 = jxd4.redMul(jy2);\n var nx = c4.redSqr().redISub(t1.redAdd(t1));\n var t22 = t1.redISub(nx);\n var jyd8 = jy2.redSqr();\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n var ny = c4.redMul(t22).redISub(jyd8);\n var nz = jy.redAdd(jy).redMul(jz);\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype.trpl = function trpl() {\n if (!this.curve.zeroA)\n return this.dbl().add(this);\n var xx = this.x.redSqr();\n var yy = this.y.redSqr();\n var zz = this.z.redSqr();\n var yyyy = yy.redSqr();\n var m2 = xx.redAdd(xx).redIAdd(xx);\n var mm = m2.redSqr();\n var e2 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e2 = e2.redIAdd(e2);\n e2 = e2.redAdd(e2).redIAdd(e2);\n e2 = e2.redISub(mm);\n var ee = e2.redSqr();\n var t3 = yyyy.redIAdd(yyyy);\n t3 = t3.redIAdd(t3);\n t3 = t3.redIAdd(t3);\n t3 = t3.redIAdd(t3);\n var u2 = m2.redIAdd(e2).redSqr().redISub(mm).redISub(ee).redISub(t3);\n var yyu4 = yy.redMul(u2);\n yyu4 = yyu4.redIAdd(yyu4);\n yyu4 = yyu4.redIAdd(yyu4);\n var nx = this.x.redMul(ee).redISub(yyu4);\n nx = nx.redIAdd(nx);\n nx = nx.redIAdd(nx);\n var ny = this.y.redMul(u2.redMul(t3.redISub(u2)).redISub(e2.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n var nz = this.z.redAdd(e2).redSqr().redISub(zz).redISub(ee);\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype.mul = function mul(k4, kbase) {\n k4 = new BN(k4, kbase);\n return this.curve._wnafMul(this, k4);\n };\n JPoint.prototype.eq = function eq(p4) {\n if (p4.type === \"affine\")\n return this.eq(p4.toJ());\n if (this === p4)\n return true;\n var z2 = this.z.redSqr();\n var pz2 = p4.z.redSqr();\n if (this.x.redMul(pz2).redISub(p4.x.redMul(z2)).cmpn(0) !== 0)\n return false;\n var z3 = z2.redMul(this.z);\n var pz3 = pz2.redMul(p4.z);\n return this.y.redMul(pz3).redISub(p4.y.redMul(z3)).cmpn(0) === 0;\n };\n JPoint.prototype.eqXToP = function eqXToP(x4) {\n var zs = this.z.redSqr();\n var rx = x4.toRed(this.curve.red).redMul(zs);\n if (this.x.cmp(rx) === 0)\n return true;\n var xc = x4.clone();\n var t3 = this.curve.redN.redMul(zs);\n for (; ; ) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n rx.redIAdd(t3);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n };\n JPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return \"\";\n return \"\";\n };\n JPoint.prototype.isInfinity = function isInfinity() {\n return this.z.cmpn(0) === 0;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/mont.js\n var require_mont = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/mont.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var inherits = require_inherits_browser();\n var Base = require_base();\n var utils = require_utils3();\n function MontCurve(conf) {\n Base.call(this, \"mont\", conf);\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.i4 = new BN(4).toRed(this.red).redInvm();\n this.two = new BN(2).toRed(this.red);\n this.a24 = this.i4.redMul(this.a.redAdd(this.two));\n }\n inherits(MontCurve, Base);\n module.exports = MontCurve;\n MontCurve.prototype.validate = function validate7(point) {\n var x4 = point.normalize().x;\n var x22 = x4.redSqr();\n var rhs = x22.redMul(x4).redAdd(x22.redMul(this.a)).redAdd(x4);\n var y6 = rhs.redSqrt();\n return y6.redSqr().cmp(rhs) === 0;\n };\n function Point3(curve, x4, z2) {\n Base.BasePoint.call(this, curve, \"projective\");\n if (x4 === null && z2 === null) {\n this.x = this.curve.one;\n this.z = this.curve.zero;\n } else {\n this.x = new BN(x4, 16);\n this.z = new BN(z2, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n }\n }\n inherits(Point3, Base.BasePoint);\n MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n return this.point(utils.toArray(bytes, enc), 1);\n };\n MontCurve.prototype.point = function point(x4, z2) {\n return new Point3(this, x4, z2);\n };\n MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point3.fromJSON(this, obj);\n };\n Point3.prototype.precompute = function precompute() {\n };\n Point3.prototype._encode = function _encode() {\n return this.getX().toArray(\"be\", this.curve.p.byteLength());\n };\n Point3.fromJSON = function fromJSON(curve, obj) {\n return new Point3(curve, obj[0], obj[1] || curve.one);\n };\n Point3.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return \"\";\n return \"\";\n };\n Point3.prototype.isInfinity = function isInfinity() {\n return this.z.cmpn(0) === 0;\n };\n Point3.prototype.dbl = function dbl() {\n var a3 = this.x.redAdd(this.z);\n var aa = a3.redSqr();\n var b4 = this.x.redSub(this.z);\n var bb = b4.redSqr();\n var c4 = aa.redSub(bb);\n var nx = aa.redMul(bb);\n var nz = c4.redMul(bb.redAdd(this.curve.a24.redMul(c4)));\n return this.curve.point(nx, nz);\n };\n Point3.prototype.add = function add2() {\n throw new Error(\"Not supported on Montgomery curve\");\n };\n Point3.prototype.diffAdd = function diffAdd(p4, diff) {\n var a3 = this.x.redAdd(this.z);\n var b4 = this.x.redSub(this.z);\n var c4 = p4.x.redAdd(p4.z);\n var d5 = p4.x.redSub(p4.z);\n var da = d5.redMul(a3);\n var cb = c4.redMul(b4);\n var nx = diff.z.redMul(da.redAdd(cb).redSqr());\n var nz = diff.x.redMul(da.redISub(cb).redSqr());\n return this.curve.point(nx, nz);\n };\n Point3.prototype.mul = function mul(k4) {\n var t3 = k4.clone();\n var a3 = this;\n var b4 = this.curve.point(null, null);\n var c4 = this;\n for (var bits = []; t3.cmpn(0) !== 0; t3.iushrn(1))\n bits.push(t3.andln(1));\n for (var i3 = bits.length - 1; i3 >= 0; i3--) {\n if (bits[i3] === 0) {\n a3 = a3.diffAdd(b4, c4);\n b4 = b4.dbl();\n } else {\n b4 = a3.diffAdd(b4, c4);\n a3 = a3.dbl();\n }\n }\n return b4;\n };\n Point3.prototype.mulAdd = function mulAdd() {\n throw new Error(\"Not supported on Montgomery curve\");\n };\n Point3.prototype.jumlAdd = function jumlAdd() {\n throw new Error(\"Not supported on Montgomery curve\");\n };\n Point3.prototype.eq = function eq(other) {\n return this.getX().cmp(other.getX()) === 0;\n };\n Point3.prototype.normalize = function normalize2() {\n this.x = this.x.redMul(this.z.redInvm());\n this.z = this.curve.one;\n return this;\n };\n Point3.prototype.getX = function getX() {\n this.normalize();\n return this.x.fromRed();\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/edwards.js\n var require_edwards = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/edwards.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils3();\n var BN = require_bn2();\n var inherits = require_inherits_browser();\n var Base = require_base();\n var assert9 = utils.assert;\n function EdwardsCurve(conf) {\n this.twisted = (conf.a | 0) !== 1;\n this.mOneA = this.twisted && (conf.a | 0) === -1;\n this.extended = this.mOneA;\n Base.call(this, \"edwards\", conf);\n this.a = new BN(conf.a, 16).umod(this.red.m);\n this.a = this.a.toRed(this.red);\n this.c = new BN(conf.c, 16).toRed(this.red);\n this.c2 = this.c.redSqr();\n this.d = new BN(conf.d, 16).toRed(this.red);\n this.dd = this.d.redAdd(this.d);\n assert9(!this.twisted || this.c.fromRed().cmpn(1) === 0);\n this.oneC = (conf.c | 0) === 1;\n }\n inherits(EdwardsCurve, Base);\n module.exports = EdwardsCurve;\n EdwardsCurve.prototype._mulA = function _mulA(num2) {\n if (this.mOneA)\n return num2.redNeg();\n else\n return this.a.redMul(num2);\n };\n EdwardsCurve.prototype._mulC = function _mulC(num2) {\n if (this.oneC)\n return num2;\n else\n return this.c.redMul(num2);\n };\n EdwardsCurve.prototype.jpoint = function jpoint(x4, y6, z2, t3) {\n return this.point(x4, y6, z2, t3);\n };\n EdwardsCurve.prototype.pointFromX = function pointFromX(x4, odd) {\n x4 = new BN(x4, 16);\n if (!x4.red)\n x4 = x4.toRed(this.red);\n var x22 = x4.redSqr();\n var rhs = this.c2.redSub(this.a.redMul(x22));\n var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x22));\n var y22 = rhs.redMul(lhs.redInvm());\n var y6 = y22.redSqrt();\n if (y6.redSqr().redSub(y22).cmp(this.zero) !== 0)\n throw new Error(\"invalid point\");\n var isOdd = y6.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y6 = y6.redNeg();\n return this.point(x4, y6);\n };\n EdwardsCurve.prototype.pointFromY = function pointFromY(y6, odd) {\n y6 = new BN(y6, 16);\n if (!y6.red)\n y6 = y6.toRed(this.red);\n var y22 = y6.redSqr();\n var lhs = y22.redSub(this.c2);\n var rhs = y22.redMul(this.d).redMul(this.c2).redSub(this.a);\n var x22 = lhs.redMul(rhs.redInvm());\n if (x22.cmp(this.zero) === 0) {\n if (odd)\n throw new Error(\"invalid point\");\n else\n return this.point(this.zero, y6);\n }\n var x4 = x22.redSqrt();\n if (x4.redSqr().redSub(x22).cmp(this.zero) !== 0)\n throw new Error(\"invalid point\");\n if (x4.fromRed().isOdd() !== odd)\n x4 = x4.redNeg();\n return this.point(x4, y6);\n };\n EdwardsCurve.prototype.validate = function validate7(point) {\n if (point.isInfinity())\n return true;\n point.normalize();\n var x22 = point.x.redSqr();\n var y22 = point.y.redSqr();\n var lhs = x22.redMul(this.a).redAdd(y22);\n var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x22).redMul(y22)));\n return lhs.cmp(rhs) === 0;\n };\n function Point3(curve, x4, y6, z2, t3) {\n Base.BasePoint.call(this, curve, \"projective\");\n if (x4 === null && y6 === null && z2 === null) {\n this.x = this.curve.zero;\n this.y = this.curve.one;\n this.z = this.curve.one;\n this.t = this.curve.zero;\n this.zOne = true;\n } else {\n this.x = new BN(x4, 16);\n this.y = new BN(y6, 16);\n this.z = z2 ? new BN(z2, 16) : this.curve.one;\n this.t = t3 && new BN(t3, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n if (this.t && !this.t.red)\n this.t = this.t.toRed(this.curve.red);\n this.zOne = this.z === this.curve.one;\n if (this.curve.extended && !this.t) {\n this.t = this.x.redMul(this.y);\n if (!this.zOne)\n this.t = this.t.redMul(this.z.redInvm());\n }\n }\n }\n inherits(Point3, Base.BasePoint);\n EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point3.fromJSON(this, obj);\n };\n EdwardsCurve.prototype.point = function point(x4, y6, z2, t3) {\n return new Point3(this, x4, y6, z2, t3);\n };\n Point3.fromJSON = function fromJSON(curve, obj) {\n return new Point3(curve, obj[0], obj[1], obj[2]);\n };\n Point3.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return \"\";\n return \"\";\n };\n Point3.prototype.isInfinity = function isInfinity() {\n return this.x.cmpn(0) === 0 && (this.y.cmp(this.z) === 0 || this.zOne && this.y.cmp(this.curve.c) === 0);\n };\n Point3.prototype._extDbl = function _extDbl() {\n var a3 = this.x.redSqr();\n var b4 = this.y.redSqr();\n var c4 = this.z.redSqr();\n c4 = c4.redIAdd(c4);\n var d5 = this.curve._mulA(a3);\n var e2 = this.x.redAdd(this.y).redSqr().redISub(a3).redISub(b4);\n var g4 = d5.redAdd(b4);\n var f7 = g4.redSub(c4);\n var h4 = d5.redSub(b4);\n var nx = e2.redMul(f7);\n var ny = g4.redMul(h4);\n var nt = e2.redMul(h4);\n var nz = f7.redMul(g4);\n return this.curve.point(nx, ny, nz, nt);\n };\n Point3.prototype._projDbl = function _projDbl() {\n var b4 = this.x.redAdd(this.y).redSqr();\n var c4 = this.x.redSqr();\n var d5 = this.y.redSqr();\n var nx;\n var ny;\n var nz;\n var e2;\n var h4;\n var j2;\n if (this.curve.twisted) {\n e2 = this.curve._mulA(c4);\n var f7 = e2.redAdd(d5);\n if (this.zOne) {\n nx = b4.redSub(c4).redSub(d5).redMul(f7.redSub(this.curve.two));\n ny = f7.redMul(e2.redSub(d5));\n nz = f7.redSqr().redSub(f7).redSub(f7);\n } else {\n h4 = this.z.redSqr();\n j2 = f7.redSub(h4).redISub(h4);\n nx = b4.redSub(c4).redISub(d5).redMul(j2);\n ny = f7.redMul(e2.redSub(d5));\n nz = f7.redMul(j2);\n }\n } else {\n e2 = c4.redAdd(d5);\n h4 = this.curve._mulC(this.z).redSqr();\n j2 = e2.redSub(h4).redSub(h4);\n nx = this.curve._mulC(b4.redISub(e2)).redMul(j2);\n ny = this.curve._mulC(e2).redMul(c4.redISub(d5));\n nz = e2.redMul(j2);\n }\n return this.curve.point(nx, ny, nz);\n };\n Point3.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n if (this.curve.extended)\n return this._extDbl();\n else\n return this._projDbl();\n };\n Point3.prototype._extAdd = function _extAdd(p4) {\n var a3 = this.y.redSub(this.x).redMul(p4.y.redSub(p4.x));\n var b4 = this.y.redAdd(this.x).redMul(p4.y.redAdd(p4.x));\n var c4 = this.t.redMul(this.curve.dd).redMul(p4.t);\n var d5 = this.z.redMul(p4.z.redAdd(p4.z));\n var e2 = b4.redSub(a3);\n var f7 = d5.redSub(c4);\n var g4 = d5.redAdd(c4);\n var h4 = b4.redAdd(a3);\n var nx = e2.redMul(f7);\n var ny = g4.redMul(h4);\n var nt = e2.redMul(h4);\n var nz = f7.redMul(g4);\n return this.curve.point(nx, ny, nz, nt);\n };\n Point3.prototype._projAdd = function _projAdd(p4) {\n var a3 = this.z.redMul(p4.z);\n var b4 = a3.redSqr();\n var c4 = this.x.redMul(p4.x);\n var d5 = this.y.redMul(p4.y);\n var e2 = this.curve.d.redMul(c4).redMul(d5);\n var f7 = b4.redSub(e2);\n var g4 = b4.redAdd(e2);\n var tmp = this.x.redAdd(this.y).redMul(p4.x.redAdd(p4.y)).redISub(c4).redISub(d5);\n var nx = a3.redMul(f7).redMul(tmp);\n var ny;\n var nz;\n if (this.curve.twisted) {\n ny = a3.redMul(g4).redMul(d5.redSub(this.curve._mulA(c4)));\n nz = f7.redMul(g4);\n } else {\n ny = a3.redMul(g4).redMul(d5.redSub(c4));\n nz = this.curve._mulC(f7).redMul(g4);\n }\n return this.curve.point(nx, ny, nz);\n };\n Point3.prototype.add = function add2(p4) {\n if (this.isInfinity())\n return p4;\n if (p4.isInfinity())\n return this;\n if (this.curve.extended)\n return this._extAdd(p4);\n else\n return this._projAdd(p4);\n };\n Point3.prototype.mul = function mul(k4) {\n if (this._hasDoubles(k4))\n return this.curve._fixedNafMul(this, k4);\n else\n return this.curve._wnafMul(this, k4);\n };\n Point3.prototype.mulAdd = function mulAdd(k1, p4, k22) {\n return this.curve._wnafMulAdd(1, [this, p4], [k1, k22], 2, false);\n };\n Point3.prototype.jmulAdd = function jmulAdd(k1, p4, k22) {\n return this.curve._wnafMulAdd(1, [this, p4], [k1, k22], 2, true);\n };\n Point3.prototype.normalize = function normalize2() {\n if (this.zOne)\n return this;\n var zi = this.z.redInvm();\n this.x = this.x.redMul(zi);\n this.y = this.y.redMul(zi);\n if (this.t)\n this.t = this.t.redMul(zi);\n this.z = this.curve.one;\n this.zOne = true;\n return this;\n };\n Point3.prototype.neg = function neg() {\n return this.curve.point(\n this.x.redNeg(),\n this.y,\n this.z,\n this.t && this.t.redNeg()\n );\n };\n Point3.prototype.getX = function getX() {\n this.normalize();\n return this.x.fromRed();\n };\n Point3.prototype.getY = function getY() {\n this.normalize();\n return this.y.fromRed();\n };\n Point3.prototype.eq = function eq(other) {\n return this === other || this.getX().cmp(other.getX()) === 0 && this.getY().cmp(other.getY()) === 0;\n };\n Point3.prototype.eqXToP = function eqXToP(x4) {\n var rx = x4.toRed(this.curve.red).redMul(this.z);\n if (this.x.cmp(rx) === 0)\n return true;\n var xc = x4.clone();\n var t3 = this.curve.redN.redMul(this.z);\n for (; ; ) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n rx.redIAdd(t3);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n };\n Point3.prototype.toP = Point3.prototype.normalize;\n Point3.prototype.mixedAdd = Point3.prototype.add;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/index.js\n var require_curve = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var curve = exports3;\n curve.base = require_base();\n curve.short = require_short();\n curve.mont = require_mont();\n curve.edwards = require_edwards();\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/utils.js\n var require_utils4 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var assert9 = require_minimalistic_assert();\n var inherits = require_inherits_browser();\n exports3.inherits = inherits;\n function isSurrogatePair(msg, i3) {\n if ((msg.charCodeAt(i3) & 64512) !== 55296) {\n return false;\n }\n if (i3 < 0 || i3 + 1 >= msg.length) {\n return false;\n }\n return (msg.charCodeAt(i3 + 1) & 64512) === 56320;\n }\n function toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg === \"string\") {\n if (!enc) {\n var p4 = 0;\n for (var i3 = 0; i3 < msg.length; i3++) {\n var c4 = msg.charCodeAt(i3);\n if (c4 < 128) {\n res[p4++] = c4;\n } else if (c4 < 2048) {\n res[p4++] = c4 >> 6 | 192;\n res[p4++] = c4 & 63 | 128;\n } else if (isSurrogatePair(msg, i3)) {\n c4 = 65536 + ((c4 & 1023) << 10) + (msg.charCodeAt(++i3) & 1023);\n res[p4++] = c4 >> 18 | 240;\n res[p4++] = c4 >> 12 & 63 | 128;\n res[p4++] = c4 >> 6 & 63 | 128;\n res[p4++] = c4 & 63 | 128;\n } else {\n res[p4++] = c4 >> 12 | 224;\n res[p4++] = c4 >> 6 & 63 | 128;\n res[p4++] = c4 & 63 | 128;\n }\n }\n } else if (enc === \"hex\") {\n msg = msg.replace(/[^a-z0-9]+/ig, \"\");\n if (msg.length % 2 !== 0)\n msg = \"0\" + msg;\n for (i3 = 0; i3 < msg.length; i3 += 2)\n res.push(parseInt(msg[i3] + msg[i3 + 1], 16));\n }\n } else {\n for (i3 = 0; i3 < msg.length; i3++)\n res[i3] = msg[i3] | 0;\n }\n return res;\n }\n exports3.toArray = toArray;\n function toHex3(msg) {\n var res = \"\";\n for (var i3 = 0; i3 < msg.length; i3++)\n res += zero2(msg[i3].toString(16));\n return res;\n }\n exports3.toHex = toHex3;\n function htonl(w3) {\n var res = w3 >>> 24 | w3 >>> 8 & 65280 | w3 << 8 & 16711680 | (w3 & 255) << 24;\n return res >>> 0;\n }\n exports3.htonl = htonl;\n function toHex32(msg, endian) {\n var res = \"\";\n for (var i3 = 0; i3 < msg.length; i3++) {\n var w3 = msg[i3];\n if (endian === \"little\")\n w3 = htonl(w3);\n res += zero8(w3.toString(16));\n }\n return res;\n }\n exports3.toHex32 = toHex32;\n function zero2(word) {\n if (word.length === 1)\n return \"0\" + word;\n else\n return word;\n }\n exports3.zero2 = zero2;\n function zero8(word) {\n if (word.length === 7)\n return \"0\" + word;\n else if (word.length === 6)\n return \"00\" + word;\n else if (word.length === 5)\n return \"000\" + word;\n else if (word.length === 4)\n return \"0000\" + word;\n else if (word.length === 3)\n return \"00000\" + word;\n else if (word.length === 2)\n return \"000000\" + word;\n else if (word.length === 1)\n return \"0000000\" + word;\n else\n return word;\n }\n exports3.zero8 = zero8;\n function join32(msg, start, end, endian) {\n var len = end - start;\n assert9(len % 4 === 0);\n var res = new Array(len / 4);\n for (var i3 = 0, k4 = start; i3 < res.length; i3++, k4 += 4) {\n var w3;\n if (endian === \"big\")\n w3 = msg[k4] << 24 | msg[k4 + 1] << 16 | msg[k4 + 2] << 8 | msg[k4 + 3];\n else\n w3 = msg[k4 + 3] << 24 | msg[k4 + 2] << 16 | msg[k4 + 1] << 8 | msg[k4];\n res[i3] = w3 >>> 0;\n }\n return res;\n }\n exports3.join32 = join32;\n function split32(msg, endian) {\n var res = new Array(msg.length * 4);\n for (var i3 = 0, k4 = 0; i3 < msg.length; i3++, k4 += 4) {\n var m2 = msg[i3];\n if (endian === \"big\") {\n res[k4] = m2 >>> 24;\n res[k4 + 1] = m2 >>> 16 & 255;\n res[k4 + 2] = m2 >>> 8 & 255;\n res[k4 + 3] = m2 & 255;\n } else {\n res[k4 + 3] = m2 >>> 24;\n res[k4 + 2] = m2 >>> 16 & 255;\n res[k4 + 1] = m2 >>> 8 & 255;\n res[k4] = m2 & 255;\n }\n }\n return res;\n }\n exports3.split32 = split32;\n function rotr32(w3, b4) {\n return w3 >>> b4 | w3 << 32 - b4;\n }\n exports3.rotr32 = rotr32;\n function rotl32(w3, b4) {\n return w3 << b4 | w3 >>> 32 - b4;\n }\n exports3.rotl32 = rotl32;\n function sum32(a3, b4) {\n return a3 + b4 >>> 0;\n }\n exports3.sum32 = sum32;\n function sum32_3(a3, b4, c4) {\n return a3 + b4 + c4 >>> 0;\n }\n exports3.sum32_3 = sum32_3;\n function sum32_4(a3, b4, c4, d5) {\n return a3 + b4 + c4 + d5 >>> 0;\n }\n exports3.sum32_4 = sum32_4;\n function sum32_5(a3, b4, c4, d5, e2) {\n return a3 + b4 + c4 + d5 + e2 >>> 0;\n }\n exports3.sum32_5 = sum32_5;\n function sum64(buf, pos, ah, al) {\n var bh = buf[pos];\n var bl = buf[pos + 1];\n var lo = al + bl >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n buf[pos] = hi >>> 0;\n buf[pos + 1] = lo;\n }\n exports3.sum64 = sum64;\n function sum64_hi(ah, al, bh, bl) {\n var lo = al + bl >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n return hi >>> 0;\n }\n exports3.sum64_hi = sum64_hi;\n function sum64_lo(ah, al, bh, bl) {\n var lo = al + bl;\n return lo >>> 0;\n }\n exports3.sum64_lo = sum64_lo;\n function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {\n var carry = 0;\n var lo = al;\n lo = lo + bl >>> 0;\n carry += lo < al ? 1 : 0;\n lo = lo + cl >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = lo + dl >>> 0;\n carry += lo < dl ? 1 : 0;\n var hi = ah + bh + ch + dh + carry;\n return hi >>> 0;\n }\n exports3.sum64_4_hi = sum64_4_hi;\n function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {\n var lo = al + bl + cl + dl;\n return lo >>> 0;\n }\n exports3.sum64_4_lo = sum64_4_lo;\n function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var carry = 0;\n var lo = al;\n lo = lo + bl >>> 0;\n carry += lo < al ? 1 : 0;\n lo = lo + cl >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = lo + dl >>> 0;\n carry += lo < dl ? 1 : 0;\n lo = lo + el >>> 0;\n carry += lo < el ? 1 : 0;\n var hi = ah + bh + ch + dh + eh + carry;\n return hi >>> 0;\n }\n exports3.sum64_5_hi = sum64_5_hi;\n function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var lo = al + bl + cl + dl + el;\n return lo >>> 0;\n }\n exports3.sum64_5_lo = sum64_5_lo;\n function rotr64_hi(ah, al, num2) {\n var r2 = al << 32 - num2 | ah >>> num2;\n return r2 >>> 0;\n }\n exports3.rotr64_hi = rotr64_hi;\n function rotr64_lo(ah, al, num2) {\n var r2 = ah << 32 - num2 | al >>> num2;\n return r2 >>> 0;\n }\n exports3.rotr64_lo = rotr64_lo;\n function shr64_hi(ah, al, num2) {\n return ah >>> num2;\n }\n exports3.shr64_hi = shr64_hi;\n function shr64_lo(ah, al, num2) {\n var r2 = ah << 32 - num2 | al >>> num2;\n return r2 >>> 0;\n }\n exports3.shr64_lo = shr64_lo;\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/common.js\n var require_common = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/common.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var assert9 = require_minimalistic_assert();\n function BlockHash() {\n this.pending = null;\n this.pendingTotal = 0;\n this.blockSize = this.constructor.blockSize;\n this.outSize = this.constructor.outSize;\n this.hmacStrength = this.constructor.hmacStrength;\n this.padLength = this.constructor.padLength / 8;\n this.endian = \"big\";\n this._delta8 = this.blockSize / 8;\n this._delta32 = this.blockSize / 32;\n }\n exports3.BlockHash = BlockHash;\n BlockHash.prototype.update = function update(msg, enc) {\n msg = utils.toArray(msg, enc);\n if (!this.pending)\n this.pending = msg;\n else\n this.pending = this.pending.concat(msg);\n this.pendingTotal += msg.length;\n if (this.pending.length >= this._delta8) {\n msg = this.pending;\n var r2 = msg.length % this._delta8;\n this.pending = msg.slice(msg.length - r2, msg.length);\n if (this.pending.length === 0)\n this.pending = null;\n msg = utils.join32(msg, 0, msg.length - r2, this.endian);\n for (var i3 = 0; i3 < msg.length; i3 += this._delta32)\n this._update(msg, i3, i3 + this._delta32);\n }\n return this;\n };\n BlockHash.prototype.digest = function digest(enc) {\n this.update(this._pad());\n assert9(this.pending === null);\n return this._digest(enc);\n };\n BlockHash.prototype._pad = function pad6() {\n var len = this.pendingTotal;\n var bytes = this._delta8;\n var k4 = bytes - (len + this.padLength) % bytes;\n var res = new Array(k4 + this.padLength);\n res[0] = 128;\n for (var i3 = 1; i3 < k4; i3++)\n res[i3] = 0;\n len <<= 3;\n if (this.endian === \"big\") {\n for (var t3 = 8; t3 < this.padLength; t3++)\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = len >>> 24 & 255;\n res[i3++] = len >>> 16 & 255;\n res[i3++] = len >>> 8 & 255;\n res[i3++] = len & 255;\n } else {\n res[i3++] = len & 255;\n res[i3++] = len >>> 8 & 255;\n res[i3++] = len >>> 16 & 255;\n res[i3++] = len >>> 24 & 255;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n for (t3 = 8; t3 < this.padLength; t3++)\n res[i3++] = 0;\n }\n return res;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/common.js\n var require_common2 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/common.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var rotr32 = utils.rotr32;\n function ft_1(s4, x4, y6, z2) {\n if (s4 === 0)\n return ch32(x4, y6, z2);\n if (s4 === 1 || s4 === 3)\n return p32(x4, y6, z2);\n if (s4 === 2)\n return maj32(x4, y6, z2);\n }\n exports3.ft_1 = ft_1;\n function ch32(x4, y6, z2) {\n return x4 & y6 ^ ~x4 & z2;\n }\n exports3.ch32 = ch32;\n function maj32(x4, y6, z2) {\n return x4 & y6 ^ x4 & z2 ^ y6 & z2;\n }\n exports3.maj32 = maj32;\n function p32(x4, y6, z2) {\n return x4 ^ y6 ^ z2;\n }\n exports3.p32 = p32;\n function s0_256(x4) {\n return rotr32(x4, 2) ^ rotr32(x4, 13) ^ rotr32(x4, 22);\n }\n exports3.s0_256 = s0_256;\n function s1_256(x4) {\n return rotr32(x4, 6) ^ rotr32(x4, 11) ^ rotr32(x4, 25);\n }\n exports3.s1_256 = s1_256;\n function g0_256(x4) {\n return rotr32(x4, 7) ^ rotr32(x4, 18) ^ x4 >>> 3;\n }\n exports3.g0_256 = g0_256;\n function g1_256(x4) {\n return rotr32(x4, 17) ^ rotr32(x4, 19) ^ x4 >>> 10;\n }\n exports3.g1_256 = g1_256;\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/1.js\n var require__ = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/1.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var common = require_common();\n var shaCommon = require_common2();\n var rotl32 = utils.rotl32;\n var sum32 = utils.sum32;\n var sum32_5 = utils.sum32_5;\n var ft_1 = shaCommon.ft_1;\n var BlockHash = common.BlockHash;\n var sha1_K = [\n 1518500249,\n 1859775393,\n 2400959708,\n 3395469782\n ];\n function SHA1() {\n if (!(this instanceof SHA1))\n return new SHA1();\n BlockHash.call(this);\n this.h = [\n 1732584193,\n 4023233417,\n 2562383102,\n 271733878,\n 3285377520\n ];\n this.W = new Array(80);\n }\n utils.inherits(SHA1, BlockHash);\n module.exports = SHA1;\n SHA1.blockSize = 512;\n SHA1.outSize = 160;\n SHA1.hmacStrength = 80;\n SHA1.padLength = 64;\n SHA1.prototype._update = function _update(msg, start) {\n var W = this.W;\n for (var i3 = 0; i3 < 16; i3++)\n W[i3] = msg[start + i3];\n for (; i3 < W.length; i3++)\n W[i3] = rotl32(W[i3 - 3] ^ W[i3 - 8] ^ W[i3 - 14] ^ W[i3 - 16], 1);\n var a3 = this.h[0];\n var b4 = this.h[1];\n var c4 = this.h[2];\n var d5 = this.h[3];\n var e2 = this.h[4];\n for (i3 = 0; i3 < W.length; i3++) {\n var s4 = ~~(i3 / 20);\n var t3 = sum32_5(rotl32(a3, 5), ft_1(s4, b4, c4, d5), e2, W[i3], sha1_K[s4]);\n e2 = d5;\n d5 = c4;\n c4 = rotl32(b4, 30);\n b4 = a3;\n a3 = t3;\n }\n this.h[0] = sum32(this.h[0], a3);\n this.h[1] = sum32(this.h[1], b4);\n this.h[2] = sum32(this.h[2], c4);\n this.h[3] = sum32(this.h[3], d5);\n this.h[4] = sum32(this.h[4], e2);\n };\n SHA1.prototype._digest = function digest(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h, \"big\");\n else\n return utils.split32(this.h, \"big\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/256.js\n var require__2 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/256.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var common = require_common();\n var shaCommon = require_common2();\n var assert9 = require_minimalistic_assert();\n var sum32 = utils.sum32;\n var sum32_4 = utils.sum32_4;\n var sum32_5 = utils.sum32_5;\n var ch32 = shaCommon.ch32;\n var maj32 = shaCommon.maj32;\n var s0_256 = shaCommon.s0_256;\n var s1_256 = shaCommon.s1_256;\n var g0_256 = shaCommon.g0_256;\n var g1_256 = shaCommon.g1_256;\n var BlockHash = common.BlockHash;\n var sha256_K = [\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ];\n function SHA2563() {\n if (!(this instanceof SHA2563))\n return new SHA2563();\n BlockHash.call(this);\n this.h = [\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ];\n this.k = sha256_K;\n this.W = new Array(64);\n }\n utils.inherits(SHA2563, BlockHash);\n module.exports = SHA2563;\n SHA2563.blockSize = 512;\n SHA2563.outSize = 256;\n SHA2563.hmacStrength = 192;\n SHA2563.padLength = 64;\n SHA2563.prototype._update = function _update(msg, start) {\n var W = this.W;\n for (var i3 = 0; i3 < 16; i3++)\n W[i3] = msg[start + i3];\n for (; i3 < W.length; i3++)\n W[i3] = sum32_4(g1_256(W[i3 - 2]), W[i3 - 7], g0_256(W[i3 - 15]), W[i3 - 16]);\n var a3 = this.h[0];\n var b4 = this.h[1];\n var c4 = this.h[2];\n var d5 = this.h[3];\n var e2 = this.h[4];\n var f7 = this.h[5];\n var g4 = this.h[6];\n var h4 = this.h[7];\n assert9(this.k.length === W.length);\n for (i3 = 0; i3 < W.length; i3++) {\n var T1 = sum32_5(h4, s1_256(e2), ch32(e2, f7, g4), this.k[i3], W[i3]);\n var T22 = sum32(s0_256(a3), maj32(a3, b4, c4));\n h4 = g4;\n g4 = f7;\n f7 = e2;\n e2 = sum32(d5, T1);\n d5 = c4;\n c4 = b4;\n b4 = a3;\n a3 = sum32(T1, T22);\n }\n this.h[0] = sum32(this.h[0], a3);\n this.h[1] = sum32(this.h[1], b4);\n this.h[2] = sum32(this.h[2], c4);\n this.h[3] = sum32(this.h[3], d5);\n this.h[4] = sum32(this.h[4], e2);\n this.h[5] = sum32(this.h[5], f7);\n this.h[6] = sum32(this.h[6], g4);\n this.h[7] = sum32(this.h[7], h4);\n };\n SHA2563.prototype._digest = function digest(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h, \"big\");\n else\n return utils.split32(this.h, \"big\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/224.js\n var require__3 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/224.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var SHA2563 = require__2();\n function SHA2242() {\n if (!(this instanceof SHA2242))\n return new SHA2242();\n SHA2563.call(this);\n this.h = [\n 3238371032,\n 914150663,\n 812702999,\n 4144912697,\n 4290775857,\n 1750603025,\n 1694076839,\n 3204075428\n ];\n }\n utils.inherits(SHA2242, SHA2563);\n module.exports = SHA2242;\n SHA2242.blockSize = 512;\n SHA2242.outSize = 224;\n SHA2242.hmacStrength = 192;\n SHA2242.padLength = 64;\n SHA2242.prototype._digest = function digest(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h.slice(0, 7), \"big\");\n else\n return utils.split32(this.h.slice(0, 7), \"big\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/512.js\n var require__4 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/512.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var common = require_common();\n var assert9 = require_minimalistic_assert();\n var rotr64_hi = utils.rotr64_hi;\n var rotr64_lo = utils.rotr64_lo;\n var shr64_hi = utils.shr64_hi;\n var shr64_lo = utils.shr64_lo;\n var sum64 = utils.sum64;\n var sum64_hi = utils.sum64_hi;\n var sum64_lo = utils.sum64_lo;\n var sum64_4_hi = utils.sum64_4_hi;\n var sum64_4_lo = utils.sum64_4_lo;\n var sum64_5_hi = utils.sum64_5_hi;\n var sum64_5_lo = utils.sum64_5_lo;\n var BlockHash = common.BlockHash;\n var sha512_K = [\n 1116352408,\n 3609767458,\n 1899447441,\n 602891725,\n 3049323471,\n 3964484399,\n 3921009573,\n 2173295548,\n 961987163,\n 4081628472,\n 1508970993,\n 3053834265,\n 2453635748,\n 2937671579,\n 2870763221,\n 3664609560,\n 3624381080,\n 2734883394,\n 310598401,\n 1164996542,\n 607225278,\n 1323610764,\n 1426881987,\n 3590304994,\n 1925078388,\n 4068182383,\n 2162078206,\n 991336113,\n 2614888103,\n 633803317,\n 3248222580,\n 3479774868,\n 3835390401,\n 2666613458,\n 4022224774,\n 944711139,\n 264347078,\n 2341262773,\n 604807628,\n 2007800933,\n 770255983,\n 1495990901,\n 1249150122,\n 1856431235,\n 1555081692,\n 3175218132,\n 1996064986,\n 2198950837,\n 2554220882,\n 3999719339,\n 2821834349,\n 766784016,\n 2952996808,\n 2566594879,\n 3210313671,\n 3203337956,\n 3336571891,\n 1034457026,\n 3584528711,\n 2466948901,\n 113926993,\n 3758326383,\n 338241895,\n 168717936,\n 666307205,\n 1188179964,\n 773529912,\n 1546045734,\n 1294757372,\n 1522805485,\n 1396182291,\n 2643833823,\n 1695183700,\n 2343527390,\n 1986661051,\n 1014477480,\n 2177026350,\n 1206759142,\n 2456956037,\n 344077627,\n 2730485921,\n 1290863460,\n 2820302411,\n 3158454273,\n 3259730800,\n 3505952657,\n 3345764771,\n 106217008,\n 3516065817,\n 3606008344,\n 3600352804,\n 1432725776,\n 4094571909,\n 1467031594,\n 275423344,\n 851169720,\n 430227734,\n 3100823752,\n 506948616,\n 1363258195,\n 659060556,\n 3750685593,\n 883997877,\n 3785050280,\n 958139571,\n 3318307427,\n 1322822218,\n 3812723403,\n 1537002063,\n 2003034995,\n 1747873779,\n 3602036899,\n 1955562222,\n 1575990012,\n 2024104815,\n 1125592928,\n 2227730452,\n 2716904306,\n 2361852424,\n 442776044,\n 2428436474,\n 593698344,\n 2756734187,\n 3733110249,\n 3204031479,\n 2999351573,\n 3329325298,\n 3815920427,\n 3391569614,\n 3928383900,\n 3515267271,\n 566280711,\n 3940187606,\n 3454069534,\n 4118630271,\n 4000239992,\n 116418474,\n 1914138554,\n 174292421,\n 2731055270,\n 289380356,\n 3203993006,\n 460393269,\n 320620315,\n 685471733,\n 587496836,\n 852142971,\n 1086792851,\n 1017036298,\n 365543100,\n 1126000580,\n 2618297676,\n 1288033470,\n 3409855158,\n 1501505948,\n 4234509866,\n 1607167915,\n 987167468,\n 1816402316,\n 1246189591\n ];\n function SHA5122() {\n if (!(this instanceof SHA5122))\n return new SHA5122();\n BlockHash.call(this);\n this.h = [\n 1779033703,\n 4089235720,\n 3144134277,\n 2227873595,\n 1013904242,\n 4271175723,\n 2773480762,\n 1595750129,\n 1359893119,\n 2917565137,\n 2600822924,\n 725511199,\n 528734635,\n 4215389547,\n 1541459225,\n 327033209\n ];\n this.k = sha512_K;\n this.W = new Array(160);\n }\n utils.inherits(SHA5122, BlockHash);\n module.exports = SHA5122;\n SHA5122.blockSize = 1024;\n SHA5122.outSize = 512;\n SHA5122.hmacStrength = 192;\n SHA5122.padLength = 128;\n SHA5122.prototype._prepareBlock = function _prepareBlock(msg, start) {\n var W = this.W;\n for (var i3 = 0; i3 < 32; i3++)\n W[i3] = msg[start + i3];\n for (; i3 < W.length; i3 += 2) {\n var c0_hi = g1_512_hi(W[i3 - 4], W[i3 - 3]);\n var c0_lo = g1_512_lo(W[i3 - 4], W[i3 - 3]);\n var c1_hi = W[i3 - 14];\n var c1_lo = W[i3 - 13];\n var c2_hi = g0_512_hi(W[i3 - 30], W[i3 - 29]);\n var c2_lo = g0_512_lo(W[i3 - 30], W[i3 - 29]);\n var c3_hi = W[i3 - 32];\n var c3_lo = W[i3 - 31];\n W[i3] = sum64_4_hi(\n c0_hi,\n c0_lo,\n c1_hi,\n c1_lo,\n c2_hi,\n c2_lo,\n c3_hi,\n c3_lo\n );\n W[i3 + 1] = sum64_4_lo(\n c0_hi,\n c0_lo,\n c1_hi,\n c1_lo,\n c2_hi,\n c2_lo,\n c3_hi,\n c3_lo\n );\n }\n };\n SHA5122.prototype._update = function _update(msg, start) {\n this._prepareBlock(msg, start);\n var W = this.W;\n var ah = this.h[0];\n var al = this.h[1];\n var bh = this.h[2];\n var bl = this.h[3];\n var ch = this.h[4];\n var cl = this.h[5];\n var dh = this.h[6];\n var dl = this.h[7];\n var eh = this.h[8];\n var el = this.h[9];\n var fh = this.h[10];\n var fl = this.h[11];\n var gh = this.h[12];\n var gl = this.h[13];\n var hh = this.h[14];\n var hl = this.h[15];\n assert9(this.k.length === W.length);\n for (var i3 = 0; i3 < W.length; i3 += 2) {\n var c0_hi = hh;\n var c0_lo = hl;\n var c1_hi = s1_512_hi(eh, el);\n var c1_lo = s1_512_lo(eh, el);\n var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);\n var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);\n var c3_hi = this.k[i3];\n var c3_lo = this.k[i3 + 1];\n var c4_hi = W[i3];\n var c4_lo = W[i3 + 1];\n var T1_hi = sum64_5_hi(\n c0_hi,\n c0_lo,\n c1_hi,\n c1_lo,\n c2_hi,\n c2_lo,\n c3_hi,\n c3_lo,\n c4_hi,\n c4_lo\n );\n var T1_lo = sum64_5_lo(\n c0_hi,\n c0_lo,\n c1_hi,\n c1_lo,\n c2_hi,\n c2_lo,\n c3_hi,\n c3_lo,\n c4_hi,\n c4_lo\n );\n c0_hi = s0_512_hi(ah, al);\n c0_lo = s0_512_lo(ah, al);\n c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);\n c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);\n var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);\n var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);\n hh = gh;\n hl = gl;\n gh = fh;\n gl = fl;\n fh = eh;\n fl = el;\n eh = sum64_hi(dh, dl, T1_hi, T1_lo);\n el = sum64_lo(dl, dl, T1_hi, T1_lo);\n dh = ch;\n dl = cl;\n ch = bh;\n cl = bl;\n bh = ah;\n bl = al;\n ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);\n al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);\n }\n sum64(this.h, 0, ah, al);\n sum64(this.h, 2, bh, bl);\n sum64(this.h, 4, ch, cl);\n sum64(this.h, 6, dh, dl);\n sum64(this.h, 8, eh, el);\n sum64(this.h, 10, fh, fl);\n sum64(this.h, 12, gh, gl);\n sum64(this.h, 14, hh, hl);\n };\n SHA5122.prototype._digest = function digest(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h, \"big\");\n else\n return utils.split32(this.h, \"big\");\n };\n function ch64_hi(xh, xl, yh, yl, zh) {\n var r2 = xh & yh ^ ~xh & zh;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function ch64_lo(xh, xl, yh, yl, zh, zl) {\n var r2 = xl & yl ^ ~xl & zl;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function maj64_hi(xh, xl, yh, yl, zh) {\n var r2 = xh & yh ^ xh & zh ^ yh & zh;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function maj64_lo(xh, xl, yh, yl, zh, zl) {\n var r2 = xl & yl ^ xl & zl ^ yl & zl;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function s0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 28);\n var c1_hi = rotr64_hi(xl, xh, 2);\n var c2_hi = rotr64_hi(xl, xh, 7);\n var r2 = c0_hi ^ c1_hi ^ c2_hi;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function s0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 28);\n var c1_lo = rotr64_lo(xl, xh, 2);\n var c2_lo = rotr64_lo(xl, xh, 7);\n var r2 = c0_lo ^ c1_lo ^ c2_lo;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function s1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 14);\n var c1_hi = rotr64_hi(xh, xl, 18);\n var c2_hi = rotr64_hi(xl, xh, 9);\n var r2 = c0_hi ^ c1_hi ^ c2_hi;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function s1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 14);\n var c1_lo = rotr64_lo(xh, xl, 18);\n var c2_lo = rotr64_lo(xl, xh, 9);\n var r2 = c0_lo ^ c1_lo ^ c2_lo;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function g0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 1);\n var c1_hi = rotr64_hi(xh, xl, 8);\n var c2_hi = shr64_hi(xh, xl, 7);\n var r2 = c0_hi ^ c1_hi ^ c2_hi;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function g0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 1);\n var c1_lo = rotr64_lo(xh, xl, 8);\n var c2_lo = shr64_lo(xh, xl, 7);\n var r2 = c0_lo ^ c1_lo ^ c2_lo;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function g1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 19);\n var c1_hi = rotr64_hi(xl, xh, 29);\n var c2_hi = shr64_hi(xh, xl, 6);\n var r2 = c0_hi ^ c1_hi ^ c2_hi;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function g1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 19);\n var c1_lo = rotr64_lo(xl, xh, 29);\n var c2_lo = shr64_lo(xh, xl, 6);\n var r2 = c0_lo ^ c1_lo ^ c2_lo;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/384.js\n var require__5 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/384.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var SHA5122 = require__4();\n function SHA384() {\n if (!(this instanceof SHA384))\n return new SHA384();\n SHA5122.call(this);\n this.h = [\n 3418070365,\n 3238371032,\n 1654270250,\n 914150663,\n 2438529370,\n 812702999,\n 355462360,\n 4144912697,\n 1731405415,\n 4290775857,\n 2394180231,\n 1750603025,\n 3675008525,\n 1694076839,\n 1203062813,\n 3204075428\n ];\n }\n utils.inherits(SHA384, SHA5122);\n module.exports = SHA384;\n SHA384.blockSize = 1024;\n SHA384.outSize = 384;\n SHA384.hmacStrength = 192;\n SHA384.padLength = 128;\n SHA384.prototype._digest = function digest(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h.slice(0, 12), \"big\");\n else\n return utils.split32(this.h.slice(0, 12), \"big\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha.js\n var require_sha = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n exports3.sha1 = require__();\n exports3.sha224 = require__3();\n exports3.sha256 = require__2();\n exports3.sha384 = require__5();\n exports3.sha512 = require__4();\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/ripemd.js\n var require_ripemd = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/ripemd.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var common = require_common();\n var rotl32 = utils.rotl32;\n var sum32 = utils.sum32;\n var sum32_3 = utils.sum32_3;\n var sum32_4 = utils.sum32_4;\n var BlockHash = common.BlockHash;\n function RIPEMD1602() {\n if (!(this instanceof RIPEMD1602))\n return new RIPEMD1602();\n BlockHash.call(this);\n this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];\n this.endian = \"little\";\n }\n utils.inherits(RIPEMD1602, BlockHash);\n exports3.ripemd160 = RIPEMD1602;\n RIPEMD1602.blockSize = 512;\n RIPEMD1602.outSize = 160;\n RIPEMD1602.hmacStrength = 192;\n RIPEMD1602.padLength = 64;\n RIPEMD1602.prototype._update = function update(msg, start) {\n var A4 = this.h[0];\n var B2 = this.h[1];\n var C = this.h[2];\n var D2 = this.h[3];\n var E2 = this.h[4];\n var Ah = A4;\n var Bh = B2;\n var Ch = C;\n var Dh = D2;\n var Eh = E2;\n for (var j2 = 0; j2 < 80; j2++) {\n var T4 = sum32(\n rotl32(\n sum32_4(A4, f7(j2, B2, C, D2), msg[r2[j2] + start], K2(j2)),\n s4[j2]\n ),\n E2\n );\n A4 = E2;\n E2 = D2;\n D2 = rotl32(C, 10);\n C = B2;\n B2 = T4;\n T4 = sum32(\n rotl32(\n sum32_4(Ah, f7(79 - j2, Bh, Ch, Dh), msg[rh[j2] + start], Kh(j2)),\n sh[j2]\n ),\n Eh\n );\n Ah = Eh;\n Eh = Dh;\n Dh = rotl32(Ch, 10);\n Ch = Bh;\n Bh = T4;\n }\n T4 = sum32_3(this.h[1], C, Dh);\n this.h[1] = sum32_3(this.h[2], D2, Eh);\n this.h[2] = sum32_3(this.h[3], E2, Ah);\n this.h[3] = sum32_3(this.h[4], A4, Bh);\n this.h[4] = sum32_3(this.h[0], B2, Ch);\n this.h[0] = T4;\n };\n RIPEMD1602.prototype._digest = function digest(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h, \"little\");\n else\n return utils.split32(this.h, \"little\");\n };\n function f7(j2, x4, y6, z2) {\n if (j2 <= 15)\n return x4 ^ y6 ^ z2;\n else if (j2 <= 31)\n return x4 & y6 | ~x4 & z2;\n else if (j2 <= 47)\n return (x4 | ~y6) ^ z2;\n else if (j2 <= 63)\n return x4 & z2 | y6 & ~z2;\n else\n return x4 ^ (y6 | ~z2);\n }\n function K2(j2) {\n if (j2 <= 15)\n return 0;\n else if (j2 <= 31)\n return 1518500249;\n else if (j2 <= 47)\n return 1859775393;\n else if (j2 <= 63)\n return 2400959708;\n else\n return 2840853838;\n }\n function Kh(j2) {\n if (j2 <= 15)\n return 1352829926;\n else if (j2 <= 31)\n return 1548603684;\n else if (j2 <= 47)\n return 1836072691;\n else if (j2 <= 63)\n return 2053994217;\n else\n return 0;\n }\n var r2 = [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 7,\n 4,\n 13,\n 1,\n 10,\n 6,\n 15,\n 3,\n 12,\n 0,\n 9,\n 5,\n 2,\n 14,\n 11,\n 8,\n 3,\n 10,\n 14,\n 4,\n 9,\n 15,\n 8,\n 1,\n 2,\n 7,\n 0,\n 6,\n 13,\n 11,\n 5,\n 12,\n 1,\n 9,\n 11,\n 10,\n 0,\n 8,\n 12,\n 4,\n 13,\n 3,\n 7,\n 15,\n 14,\n 5,\n 6,\n 2,\n 4,\n 0,\n 5,\n 9,\n 7,\n 12,\n 2,\n 10,\n 14,\n 1,\n 3,\n 8,\n 11,\n 6,\n 15,\n 13\n ];\n var rh = [\n 5,\n 14,\n 7,\n 0,\n 9,\n 2,\n 11,\n 4,\n 13,\n 6,\n 15,\n 8,\n 1,\n 10,\n 3,\n 12,\n 6,\n 11,\n 3,\n 7,\n 0,\n 13,\n 5,\n 10,\n 14,\n 15,\n 8,\n 12,\n 4,\n 9,\n 1,\n 2,\n 15,\n 5,\n 1,\n 3,\n 7,\n 14,\n 6,\n 9,\n 11,\n 8,\n 12,\n 2,\n 10,\n 0,\n 4,\n 13,\n 8,\n 6,\n 4,\n 1,\n 3,\n 11,\n 15,\n 0,\n 5,\n 12,\n 2,\n 13,\n 9,\n 7,\n 10,\n 14,\n 12,\n 15,\n 10,\n 4,\n 1,\n 5,\n 8,\n 7,\n 6,\n 2,\n 13,\n 14,\n 0,\n 3,\n 9,\n 11\n ];\n var s4 = [\n 11,\n 14,\n 15,\n 12,\n 5,\n 8,\n 7,\n 9,\n 11,\n 13,\n 14,\n 15,\n 6,\n 7,\n 9,\n 8,\n 7,\n 6,\n 8,\n 13,\n 11,\n 9,\n 7,\n 15,\n 7,\n 12,\n 15,\n 9,\n 11,\n 7,\n 13,\n 12,\n 11,\n 13,\n 6,\n 7,\n 14,\n 9,\n 13,\n 15,\n 14,\n 8,\n 13,\n 6,\n 5,\n 12,\n 7,\n 5,\n 11,\n 12,\n 14,\n 15,\n 14,\n 15,\n 9,\n 8,\n 9,\n 14,\n 5,\n 6,\n 8,\n 6,\n 5,\n 12,\n 9,\n 15,\n 5,\n 11,\n 6,\n 8,\n 13,\n 12,\n 5,\n 12,\n 13,\n 14,\n 11,\n 8,\n 5,\n 6\n ];\n var sh = [\n 8,\n 9,\n 9,\n 11,\n 13,\n 15,\n 15,\n 5,\n 7,\n 7,\n 8,\n 11,\n 14,\n 14,\n 12,\n 6,\n 9,\n 13,\n 15,\n 7,\n 12,\n 8,\n 9,\n 11,\n 7,\n 7,\n 12,\n 7,\n 6,\n 15,\n 13,\n 11,\n 9,\n 7,\n 15,\n 11,\n 8,\n 6,\n 6,\n 14,\n 12,\n 13,\n 5,\n 14,\n 13,\n 13,\n 7,\n 5,\n 15,\n 5,\n 8,\n 11,\n 14,\n 14,\n 6,\n 14,\n 6,\n 9,\n 12,\n 9,\n 12,\n 5,\n 15,\n 8,\n 8,\n 5,\n 12,\n 9,\n 12,\n 5,\n 14,\n 6,\n 8,\n 13,\n 6,\n 5,\n 15,\n 13,\n 11,\n 11\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/hmac.js\n var require_hmac = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/hmac.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var assert9 = require_minimalistic_assert();\n function Hmac(hash3, key, enc) {\n if (!(this instanceof Hmac))\n return new Hmac(hash3, key, enc);\n this.Hash = hash3;\n this.blockSize = hash3.blockSize / 8;\n this.outSize = hash3.outSize / 8;\n this.inner = null;\n this.outer = null;\n this._init(utils.toArray(key, enc));\n }\n module.exports = Hmac;\n Hmac.prototype._init = function init(key) {\n if (key.length > this.blockSize)\n key = new this.Hash().update(key).digest();\n assert9(key.length <= this.blockSize);\n for (var i3 = key.length; i3 < this.blockSize; i3++)\n key.push(0);\n for (i3 = 0; i3 < key.length; i3++)\n key[i3] ^= 54;\n this.inner = new this.Hash().update(key);\n for (i3 = 0; i3 < key.length; i3++)\n key[i3] ^= 106;\n this.outer = new this.Hash().update(key);\n };\n Hmac.prototype.update = function update(msg, enc) {\n this.inner.update(msg, enc);\n return this;\n };\n Hmac.prototype.digest = function digest(enc) {\n this.outer.update(this.inner.digest());\n return this.outer.digest(enc);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash.js\n var require_hash = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var hash3 = exports3;\n hash3.utils = require_utils4();\n hash3.common = require_common();\n hash3.sha = require_sha();\n hash3.ripemd = require_ripemd();\n hash3.hmac = require_hmac();\n hash3.sha1 = hash3.sha.sha1;\n hash3.sha256 = hash3.sha.sha256;\n hash3.sha224 = hash3.sha.sha224;\n hash3.sha384 = hash3.sha.sha384;\n hash3.sha512 = hash3.sha.sha512;\n hash3.ripemd160 = hash3.ripemd.ripemd160;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js\n var require_secp256k1 = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n doubles: {\n step: 4,\n points: [\n [\n \"e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a\",\n \"f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821\"\n ],\n [\n \"8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508\",\n \"11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf\"\n ],\n [\n \"175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739\",\n \"d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695\"\n ],\n [\n \"363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640\",\n \"4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9\"\n ],\n [\n \"8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c\",\n \"4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36\"\n ],\n [\n \"723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda\",\n \"96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f\"\n ],\n [\n \"eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa\",\n \"5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999\"\n ],\n [\n \"100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0\",\n \"cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09\"\n ],\n [\n \"e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d\",\n \"9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d\"\n ],\n [\n \"feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d\",\n \"e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088\"\n ],\n [\n \"da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1\",\n \"9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d\"\n ],\n [\n \"53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0\",\n \"5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8\"\n ],\n [\n \"8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047\",\n \"10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a\"\n ],\n [\n \"385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862\",\n \"283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453\"\n ],\n [\n \"6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7\",\n \"7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160\"\n ],\n [\n \"3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd\",\n \"56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0\"\n ],\n [\n \"85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83\",\n \"7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6\"\n ],\n [\n \"948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a\",\n \"53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589\"\n ],\n [\n \"6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8\",\n \"bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17\"\n ],\n [\n \"e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d\",\n \"4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda\"\n ],\n [\n \"e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725\",\n \"7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd\"\n ],\n [\n \"213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754\",\n \"4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2\"\n ],\n [\n \"4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c\",\n \"17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6\"\n ],\n [\n \"fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6\",\n \"6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f\"\n ],\n [\n \"76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39\",\n \"c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01\"\n ],\n [\n \"c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891\",\n \"893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3\"\n ],\n [\n \"d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b\",\n \"febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f\"\n ],\n [\n \"b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03\",\n \"2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7\"\n ],\n [\n \"e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d\",\n \"eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78\"\n ],\n [\n \"a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070\",\n \"7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1\"\n ],\n [\n \"90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4\",\n \"e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150\"\n ],\n [\n \"8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da\",\n \"662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82\"\n ],\n [\n \"e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11\",\n \"1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc\"\n ],\n [\n \"8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e\",\n \"efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b\"\n ],\n [\n \"e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41\",\n \"2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51\"\n ],\n [\n \"b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef\",\n \"67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45\"\n ],\n [\n \"d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8\",\n \"db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120\"\n ],\n [\n \"324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d\",\n \"648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84\"\n ],\n [\n \"4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96\",\n \"35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d\"\n ],\n [\n \"9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd\",\n \"ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d\"\n ],\n [\n \"6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5\",\n \"9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8\"\n ],\n [\n \"a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266\",\n \"40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8\"\n ],\n [\n \"7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71\",\n \"34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac\"\n ],\n [\n \"928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac\",\n \"c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f\"\n ],\n [\n \"85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751\",\n \"1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962\"\n ],\n [\n \"ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e\",\n \"493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907\"\n ],\n [\n \"827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241\",\n \"c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec\"\n ],\n [\n \"eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3\",\n \"be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d\"\n ],\n [\n \"e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f\",\n \"4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414\"\n ],\n [\n \"1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19\",\n \"aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd\"\n ],\n [\n \"146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be\",\n \"b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0\"\n ],\n [\n \"fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9\",\n \"6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811\"\n ],\n [\n \"da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2\",\n \"8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1\"\n ],\n [\n \"a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13\",\n \"7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c\"\n ],\n [\n \"174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c\",\n \"ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73\"\n ],\n [\n \"959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba\",\n \"2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd\"\n ],\n [\n \"d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151\",\n \"e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405\"\n ],\n [\n \"64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073\",\n \"d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589\"\n ],\n [\n \"8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458\",\n \"38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e\"\n ],\n [\n \"13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b\",\n \"69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27\"\n ],\n [\n \"bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366\",\n \"d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1\"\n ],\n [\n \"8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa\",\n \"40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482\"\n ],\n [\n \"8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0\",\n \"620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945\"\n ],\n [\n \"dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787\",\n \"7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573\"\n ],\n [\n \"f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e\",\n \"ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82\"\n ]\n ]\n },\n naf: {\n wnd: 7,\n points: [\n [\n \"f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9\",\n \"388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672\"\n ],\n [\n \"2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4\",\n \"d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6\"\n ],\n [\n \"5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc\",\n \"6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da\"\n ],\n [\n \"acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe\",\n \"cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37\"\n ],\n [\n \"774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb\",\n \"d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b\"\n ],\n [\n \"f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8\",\n \"ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81\"\n ],\n [\n \"d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e\",\n \"581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58\"\n ],\n [\n \"defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34\",\n \"4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77\"\n ],\n [\n \"2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c\",\n \"85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a\"\n ],\n [\n \"352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5\",\n \"321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c\"\n ],\n [\n \"2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f\",\n \"2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67\"\n ],\n [\n \"9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714\",\n \"73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402\"\n ],\n [\n \"daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729\",\n \"a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55\"\n ],\n [\n \"c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db\",\n \"2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482\"\n ],\n [\n \"6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4\",\n \"e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82\"\n ],\n [\n \"1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5\",\n \"b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396\"\n ],\n [\n \"605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479\",\n \"2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49\"\n ],\n [\n \"62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d\",\n \"80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf\"\n ],\n [\n \"80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f\",\n \"1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a\"\n ],\n [\n \"7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb\",\n \"d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7\"\n ],\n [\n \"d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9\",\n \"eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933\"\n ],\n [\n \"49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963\",\n \"758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a\"\n ],\n [\n \"77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74\",\n \"958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6\"\n ],\n [\n \"f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530\",\n \"e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37\"\n ],\n [\n \"463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b\",\n \"5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e\"\n ],\n [\n \"f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247\",\n \"cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6\"\n ],\n [\n \"caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1\",\n \"cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476\"\n ],\n [\n \"2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120\",\n \"4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40\"\n ],\n [\n \"7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435\",\n \"91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61\"\n ],\n [\n \"754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18\",\n \"673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683\"\n ],\n [\n \"e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8\",\n \"59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5\"\n ],\n [\n \"186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb\",\n \"3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b\"\n ],\n [\n \"df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f\",\n \"55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417\"\n ],\n [\n \"5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143\",\n \"efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868\"\n ],\n [\n \"290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba\",\n \"e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a\"\n ],\n [\n \"af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45\",\n \"f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6\"\n ],\n [\n \"766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a\",\n \"744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996\"\n ],\n [\n \"59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e\",\n \"c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e\"\n ],\n [\n \"f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8\",\n \"e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d\"\n ],\n [\n \"7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c\",\n \"30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2\"\n ],\n [\n \"948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519\",\n \"e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e\"\n ],\n [\n \"7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab\",\n \"100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437\"\n ],\n [\n \"3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca\",\n \"ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311\"\n ],\n [\n \"d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf\",\n \"8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4\"\n ],\n [\n \"1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610\",\n \"68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575\"\n ],\n [\n \"733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4\",\n \"f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d\"\n ],\n [\n \"15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c\",\n \"d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d\"\n ],\n [\n \"a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940\",\n \"edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629\"\n ],\n [\n \"e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980\",\n \"a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06\"\n ],\n [\n \"311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3\",\n \"66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374\"\n ],\n [\n \"34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf\",\n \"9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee\"\n ],\n [\n \"f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63\",\n \"4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1\"\n ],\n [\n \"d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448\",\n \"fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b\"\n ],\n [\n \"32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf\",\n \"5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661\"\n ],\n [\n \"7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5\",\n \"8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6\"\n ],\n [\n \"ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6\",\n \"8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e\"\n ],\n [\n \"16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5\",\n \"5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d\"\n ],\n [\n \"eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99\",\n \"f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc\"\n ],\n [\n \"78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51\",\n \"f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4\"\n ],\n [\n \"494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5\",\n \"42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c\"\n ],\n [\n \"a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5\",\n \"204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b\"\n ],\n [\n \"c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997\",\n \"4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913\"\n ],\n [\n \"841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881\",\n \"73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154\"\n ],\n [\n \"5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5\",\n \"39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865\"\n ],\n [\n \"36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66\",\n \"d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc\"\n ],\n [\n \"336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726\",\n \"ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224\"\n ],\n [\n \"8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede\",\n \"6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e\"\n ],\n [\n \"1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94\",\n \"60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6\"\n ],\n [\n \"85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31\",\n \"3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511\"\n ],\n [\n \"29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51\",\n \"b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b\"\n ],\n [\n \"a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252\",\n \"ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2\"\n ],\n [\n \"4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5\",\n \"cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c\"\n ],\n [\n \"d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b\",\n \"6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3\"\n ],\n [\n \"ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4\",\n \"322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d\"\n ],\n [\n \"af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f\",\n \"6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700\"\n ],\n [\n \"e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889\",\n \"2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4\"\n ],\n [\n \"591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246\",\n \"b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196\"\n ],\n [\n \"11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984\",\n \"998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4\"\n ],\n [\n \"3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a\",\n \"b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257\"\n ],\n [\n \"cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030\",\n \"bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13\"\n ],\n [\n \"c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197\",\n \"6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096\"\n ],\n [\n \"c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593\",\n \"c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38\"\n ],\n [\n \"a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef\",\n \"21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f\"\n ],\n [\n \"347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38\",\n \"60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448\"\n ],\n [\n \"da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a\",\n \"49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a\"\n ],\n [\n \"c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111\",\n \"5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4\"\n ],\n [\n \"4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502\",\n \"7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437\"\n ],\n [\n \"3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea\",\n \"be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7\"\n ],\n [\n \"cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26\",\n \"8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d\"\n ],\n [\n \"b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986\",\n \"39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a\"\n ],\n [\n \"d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e\",\n \"62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54\"\n ],\n [\n \"48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4\",\n \"25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77\"\n ],\n [\n \"dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda\",\n \"ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517\"\n ],\n [\n \"6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859\",\n \"cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10\"\n ],\n [\n \"e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f\",\n \"f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125\"\n ],\n [\n \"eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c\",\n \"6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e\"\n ],\n [\n \"13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942\",\n \"fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1\"\n ],\n [\n \"ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a\",\n \"1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2\"\n ],\n [\n \"b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80\",\n \"5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423\"\n ],\n [\n \"ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d\",\n \"438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8\"\n ],\n [\n \"8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1\",\n \"cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758\"\n ],\n [\n \"52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63\",\n \"c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375\"\n ],\n [\n \"e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352\",\n \"6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d\"\n ],\n [\n \"7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193\",\n \"ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec\"\n ],\n [\n \"5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00\",\n \"9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0\"\n ],\n [\n \"32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58\",\n \"ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c\"\n ],\n [\n \"e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7\",\n \"d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4\"\n ],\n [\n \"8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8\",\n \"c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f\"\n ],\n [\n \"4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e\",\n \"67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649\"\n ],\n [\n \"3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d\",\n \"cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826\"\n ],\n [\n \"674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b\",\n \"299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5\"\n ],\n [\n \"d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f\",\n \"f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87\"\n ],\n [\n \"30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6\",\n \"462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b\"\n ],\n [\n \"be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297\",\n \"62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc\"\n ],\n [\n \"93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a\",\n \"7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c\"\n ],\n [\n \"b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c\",\n \"ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f\"\n ],\n [\n \"d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52\",\n \"4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a\"\n ],\n [\n \"d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb\",\n \"bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46\"\n ],\n [\n \"463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065\",\n \"bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f\"\n ],\n [\n \"7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917\",\n \"603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03\"\n ],\n [\n \"74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9\",\n \"cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08\"\n ],\n [\n \"30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3\",\n \"553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8\"\n ],\n [\n \"9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57\",\n \"712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373\"\n ],\n [\n \"176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66\",\n \"ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3\"\n ],\n [\n \"75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8\",\n \"9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8\"\n ],\n [\n \"809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721\",\n \"9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1\"\n ],\n [\n \"1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180\",\n \"4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9\"\n ]\n ]\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curves.js\n var require_curves = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curves.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var curves = exports3;\n var hash3 = require_hash();\n var curve = require_curve();\n var utils = require_utils3();\n var assert9 = utils.assert;\n function PresetCurve(options) {\n if (options.type === \"short\")\n this.curve = new curve.short(options);\n else if (options.type === \"edwards\")\n this.curve = new curve.edwards(options);\n else\n this.curve = new curve.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n assert9(this.g.validate(), \"Invalid curve\");\n assert9(this.g.mul(this.n).isInfinity(), \"Invalid curve, G*N != O\");\n }\n curves.PresetCurve = PresetCurve;\n function defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function() {\n var curve2 = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve2\n });\n return curve2;\n }\n });\n }\n defineCurve(\"p192\", {\n type: \"short\",\n prime: \"p192\",\n p: \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\",\n a: \"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc\",\n b: \"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1\",\n n: \"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012\",\n \"07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811\"\n ]\n });\n defineCurve(\"p224\", {\n type: \"short\",\n prime: \"p224\",\n p: \"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\",\n a: \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe\",\n b: \"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4\",\n n: \"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21\",\n \"bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34\"\n ]\n });\n defineCurve(\"p256\", {\n type: \"short\",\n prime: null,\n p: \"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff\",\n a: \"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc\",\n b: \"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b\",\n n: \"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296\",\n \"4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5\"\n ]\n });\n defineCurve(\"p384\", {\n type: \"short\",\n prime: null,\n p: \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff\",\n a: \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc\",\n b: \"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef\",\n n: \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973\",\n hash: hash3.sha384,\n gRed: false,\n g: [\n \"aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7\",\n \"3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f\"\n ]\n });\n defineCurve(\"p521\", {\n type: \"short\",\n prime: null,\n p: \"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff\",\n a: \"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc\",\n b: \"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00\",\n n: \"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409\",\n hash: hash3.sha512,\n gRed: false,\n g: [\n \"000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66\",\n \"00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650\"\n ]\n });\n defineCurve(\"curve25519\", {\n type: \"mont\",\n prime: \"p25519\",\n p: \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\",\n a: \"76d06\",\n b: \"1\",\n n: \"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"9\"\n ]\n });\n defineCurve(\"ed25519\", {\n type: \"edwards\",\n prime: \"p25519\",\n p: \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\",\n a: \"-1\",\n c: \"1\",\n // -121665 * (121666^(-1)) (mod P)\n d: \"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3\",\n n: \"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a\",\n // 4/5\n \"6666666666666666666666666666666666666666666666666666666666666658\"\n ]\n });\n var pre;\n try {\n pre = require_secp256k1();\n } catch (e2) {\n pre = void 0;\n }\n defineCurve(\"secp256k1\", {\n type: \"short\",\n prime: \"k256\",\n p: \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\",\n a: \"0\",\n b: \"7\",\n n: \"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141\",\n h: \"1\",\n hash: hash3.sha256,\n // Precomputed endomorphism\n beta: \"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\",\n lambda: \"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72\",\n basis: [\n {\n a: \"3086d221a7d46bcde86c90e49284eb15\",\n b: \"-e4437ed6010e88286f547fa90abfe4c3\"\n },\n {\n a: \"114ca50f7a8e2f3f657c1108d9d44cfd8\",\n b: \"3086d221a7d46bcde86c90e49284eb15\"\n }\n ],\n gRed: false,\n g: [\n \"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\",\n \"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\",\n pre\n ]\n });\n }\n });\n\n // ../../../node_modules/.pnpm/hmac-drbg@1.0.1/node_modules/hmac-drbg/lib/hmac-drbg.js\n var require_hmac_drbg = __commonJS({\n \"../../../node_modules/.pnpm/hmac-drbg@1.0.1/node_modules/hmac-drbg/lib/hmac-drbg.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var hash3 = require_hash();\n var utils = require_utils2();\n var assert9 = require_minimalistic_assert();\n function HmacDRBG(options) {\n if (!(this instanceof HmacDRBG))\n return new HmacDRBG(options);\n this.hash = options.hash;\n this.predResist = !!options.predResist;\n this.outLen = this.hash.outSize;\n this.minEntropy = options.minEntropy || this.hash.hmacStrength;\n this._reseed = null;\n this.reseedInterval = null;\n this.K = null;\n this.V = null;\n var entropy = utils.toArray(options.entropy, options.entropyEnc || \"hex\");\n var nonce = utils.toArray(options.nonce, options.nonceEnc || \"hex\");\n var pers = utils.toArray(options.pers, options.persEnc || \"hex\");\n assert9(\n entropy.length >= this.minEntropy / 8,\n \"Not enough entropy. Minimum is: \" + this.minEntropy + \" bits\"\n );\n this._init(entropy, nonce, pers);\n }\n module.exports = HmacDRBG;\n HmacDRBG.prototype._init = function init(entropy, nonce, pers) {\n var seed = entropy.concat(nonce).concat(pers);\n this.K = new Array(this.outLen / 8);\n this.V = new Array(this.outLen / 8);\n for (var i3 = 0; i3 < this.V.length; i3++) {\n this.K[i3] = 0;\n this.V[i3] = 1;\n }\n this._update(seed);\n this._reseed = 1;\n this.reseedInterval = 281474976710656;\n };\n HmacDRBG.prototype._hmac = function hmac3() {\n return new hash3.hmac(this.hash, this.K);\n };\n HmacDRBG.prototype._update = function update(seed) {\n var kmac = this._hmac().update(this.V).update([0]);\n if (seed)\n kmac = kmac.update(seed);\n this.K = kmac.digest();\n this.V = this._hmac().update(this.V).digest();\n if (!seed)\n return;\n this.K = this._hmac().update(this.V).update([1]).update(seed).digest();\n this.V = this._hmac().update(this.V).digest();\n };\n HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add2, addEnc) {\n if (typeof entropyEnc !== \"string\") {\n addEnc = add2;\n add2 = entropyEnc;\n entropyEnc = null;\n }\n entropy = utils.toArray(entropy, entropyEnc);\n add2 = utils.toArray(add2, addEnc);\n assert9(\n entropy.length >= this.minEntropy / 8,\n \"Not enough entropy. Minimum is: \" + this.minEntropy + \" bits\"\n );\n this._update(entropy.concat(add2 || []));\n this._reseed = 1;\n };\n HmacDRBG.prototype.generate = function generate(len, enc, add2, addEnc) {\n if (this._reseed > this.reseedInterval)\n throw new Error(\"Reseed is required\");\n if (typeof enc !== \"string\") {\n addEnc = add2;\n add2 = enc;\n enc = null;\n }\n if (add2) {\n add2 = utils.toArray(add2, addEnc || \"hex\");\n this._update(add2);\n }\n var temp = [];\n while (temp.length < len) {\n this.V = this._hmac().update(this.V).digest();\n temp = temp.concat(this.V);\n }\n var res = temp.slice(0, len);\n this._update(add2);\n this._reseed++;\n return utils.encode(res, enc);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/key.js\n var require_key = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/key.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var utils = require_utils3();\n var assert9 = utils.assert;\n function KeyPair(ec, options) {\n this.ec = ec;\n this.priv = null;\n this.pub = null;\n if (options.priv)\n this._importPrivate(options.priv, options.privEnc);\n if (options.pub)\n this._importPublic(options.pub, options.pubEnc);\n }\n module.exports = KeyPair;\n KeyPair.fromPublic = function fromPublic(ec, pub, enc) {\n if (pub instanceof KeyPair)\n return pub;\n return new KeyPair(ec, {\n pub,\n pubEnc: enc\n });\n };\n KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {\n if (priv instanceof KeyPair)\n return priv;\n return new KeyPair(ec, {\n priv,\n privEnc: enc\n });\n };\n KeyPair.prototype.validate = function validate7() {\n var pub = this.getPublic();\n if (pub.isInfinity())\n return { result: false, reason: \"Invalid public key\" };\n if (!pub.validate())\n return { result: false, reason: \"Public key is not a point\" };\n if (!pub.mul(this.ec.curve.n).isInfinity())\n return { result: false, reason: \"Public key * N != O\" };\n return { result: true, reason: null };\n };\n KeyPair.prototype.getPublic = function getPublic(compact, enc) {\n if (typeof compact === \"string\") {\n enc = compact;\n compact = null;\n }\n if (!this.pub)\n this.pub = this.ec.g.mul(this.priv);\n if (!enc)\n return this.pub;\n return this.pub.encode(enc, compact);\n };\n KeyPair.prototype.getPrivate = function getPrivate(enc) {\n if (enc === \"hex\")\n return this.priv.toString(16, 2);\n else\n return this.priv;\n };\n KeyPair.prototype._importPrivate = function _importPrivate(key, enc) {\n this.priv = new BN(key, enc || 16);\n this.priv = this.priv.umod(this.ec.curve.n);\n };\n KeyPair.prototype._importPublic = function _importPublic(key, enc) {\n if (key.x || key.y) {\n if (this.ec.curve.type === \"mont\") {\n assert9(key.x, \"Need x coordinate\");\n } else if (this.ec.curve.type === \"short\" || this.ec.curve.type === \"edwards\") {\n assert9(key.x && key.y, \"Need both x and y coordinate\");\n }\n this.pub = this.ec.curve.point(key.x, key.y);\n return;\n }\n this.pub = this.ec.curve.decodePoint(key, enc);\n };\n KeyPair.prototype.derive = function derive(pub) {\n if (!pub.validate()) {\n assert9(pub.validate(), \"public point not validated\");\n }\n return pub.mul(this.priv).getX();\n };\n KeyPair.prototype.sign = function sign3(msg, enc, options) {\n return this.ec.sign(msg, this, enc, options);\n };\n KeyPair.prototype.verify = function verify(msg, signature, options) {\n return this.ec.verify(msg, signature, this, void 0, options);\n };\n KeyPair.prototype.inspect = function inspect() {\n return \"\";\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/signature.js\n var require_signature = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/signature.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var utils = require_utils3();\n var assert9 = utils.assert;\n function Signature(options, enc) {\n if (options instanceof Signature)\n return options;\n if (this._importDER(options, enc))\n return;\n assert9(options.r && options.s, \"Signature without r or s\");\n this.r = new BN(options.r, 16);\n this.s = new BN(options.s, 16);\n if (options.recoveryParam === void 0)\n this.recoveryParam = null;\n else\n this.recoveryParam = options.recoveryParam;\n }\n module.exports = Signature;\n function Position() {\n this.place = 0;\n }\n function getLength(buf, p4) {\n var initial = buf[p4.place++];\n if (!(initial & 128)) {\n return initial;\n }\n var octetLen = initial & 15;\n if (octetLen === 0 || octetLen > 4) {\n return false;\n }\n if (buf[p4.place] === 0) {\n return false;\n }\n var val = 0;\n for (var i3 = 0, off2 = p4.place; i3 < octetLen; i3++, off2++) {\n val <<= 8;\n val |= buf[off2];\n val >>>= 0;\n }\n if (val <= 127) {\n return false;\n }\n p4.place = off2;\n return val;\n }\n function rmPadding(buf) {\n var i3 = 0;\n var len = buf.length - 1;\n while (!buf[i3] && !(buf[i3 + 1] & 128) && i3 < len) {\n i3++;\n }\n if (i3 === 0) {\n return buf;\n }\n return buf.slice(i3);\n }\n Signature.prototype._importDER = function _importDER(data, enc) {\n data = utils.toArray(data, enc);\n var p4 = new Position();\n if (data[p4.place++] !== 48) {\n return false;\n }\n var len = getLength(data, p4);\n if (len === false) {\n return false;\n }\n if (len + p4.place !== data.length) {\n return false;\n }\n if (data[p4.place++] !== 2) {\n return false;\n }\n var rlen = getLength(data, p4);\n if (rlen === false) {\n return false;\n }\n if ((data[p4.place] & 128) !== 0) {\n return false;\n }\n var r2 = data.slice(p4.place, rlen + p4.place);\n p4.place += rlen;\n if (data[p4.place++] !== 2) {\n return false;\n }\n var slen = getLength(data, p4);\n if (slen === false) {\n return false;\n }\n if (data.length !== slen + p4.place) {\n return false;\n }\n if ((data[p4.place] & 128) !== 0) {\n return false;\n }\n var s4 = data.slice(p4.place, slen + p4.place);\n if (r2[0] === 0) {\n if (r2[1] & 128) {\n r2 = r2.slice(1);\n } else {\n return false;\n }\n }\n if (s4[0] === 0) {\n if (s4[1] & 128) {\n s4 = s4.slice(1);\n } else {\n return false;\n }\n }\n this.r = new BN(r2);\n this.s = new BN(s4);\n this.recoveryParam = null;\n return true;\n };\n function constructLength(arr, len) {\n if (len < 128) {\n arr.push(len);\n return;\n }\n var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);\n arr.push(octets | 128);\n while (--octets) {\n arr.push(len >>> (octets << 3) & 255);\n }\n arr.push(len);\n }\n Signature.prototype.toDER = function toDER(enc) {\n var r2 = this.r.toArray();\n var s4 = this.s.toArray();\n if (r2[0] & 128)\n r2 = [0].concat(r2);\n if (s4[0] & 128)\n s4 = [0].concat(s4);\n r2 = rmPadding(r2);\n s4 = rmPadding(s4);\n while (!s4[0] && !(s4[1] & 128)) {\n s4 = s4.slice(1);\n }\n var arr = [2];\n constructLength(arr, r2.length);\n arr = arr.concat(r2);\n arr.push(2);\n constructLength(arr, s4.length);\n var backHalf = arr.concat(s4);\n var res = [48];\n constructLength(res, backHalf.length);\n res = res.concat(backHalf);\n return utils.encode(res, enc);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/index.js\n var require_ec = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var HmacDRBG = require_hmac_drbg();\n var utils = require_utils3();\n var curves = require_curves();\n var rand = require_brorand();\n var assert9 = utils.assert;\n var KeyPair = require_key();\n var Signature = require_signature();\n function EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n if (typeof options === \"string\") {\n assert9(\n Object.prototype.hasOwnProperty.call(curves, options),\n \"Unknown curve \" + options\n );\n options = curves[options];\n }\n if (options instanceof curves.PresetCurve)\n options = { curve: options };\n this.curve = options.curve.curve;\n this.n = this.curve.n;\n this.nh = this.n.ushrn(1);\n this.g = this.curve.g;\n this.g = options.curve.g;\n this.g.precompute(options.curve.n.bitLength() + 1);\n this.hash = options.hash || options.curve.hash;\n }\n module.exports = EC;\n EC.prototype.keyPair = function keyPair(options) {\n return new KeyPair(this, options);\n };\n EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {\n return KeyPair.fromPrivate(this, priv, enc);\n };\n EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {\n return KeyPair.fromPublic(this, pub, enc);\n };\n EC.prototype.genKeyPair = function genKeyPair(options) {\n if (!options)\n options = {};\n var drbg = new HmacDRBG({\n hash: this.hash,\n pers: options.pers,\n persEnc: options.persEnc || \"utf8\",\n entropy: options.entropy || rand(this.hash.hmacStrength),\n entropyEnc: options.entropy && options.entropyEnc || \"utf8\",\n nonce: this.n.toArray()\n });\n var bytes = this.n.byteLength();\n var ns2 = this.n.sub(new BN(2));\n for (; ; ) {\n var priv = new BN(drbg.generate(bytes));\n if (priv.cmp(ns2) > 0)\n continue;\n priv.iaddn(1);\n return this.keyFromPrivate(priv);\n }\n };\n EC.prototype._truncateToN = function _truncateToN(msg, truncOnly, bitLength) {\n var byteLength;\n if (BN.isBN(msg) || typeof msg === \"number\") {\n msg = new BN(msg, 16);\n byteLength = msg.byteLength();\n } else if (typeof msg === \"object\") {\n byteLength = msg.length;\n msg = new BN(msg, 16);\n } else {\n var str = msg.toString();\n byteLength = str.length + 1 >>> 1;\n msg = new BN(str, 16);\n }\n if (typeof bitLength !== \"number\") {\n bitLength = byteLength * 8;\n }\n var delta = bitLength - this.n.bitLength();\n if (delta > 0)\n msg = msg.ushrn(delta);\n if (!truncOnly && msg.cmp(this.n) >= 0)\n return msg.sub(this.n);\n else\n return msg;\n };\n EC.prototype.sign = function sign3(msg, key, enc, options) {\n if (typeof enc === \"object\") {\n options = enc;\n enc = null;\n }\n if (!options)\n options = {};\n if (typeof msg !== \"string\" && typeof msg !== \"number\" && !BN.isBN(msg)) {\n assert9(\n typeof msg === \"object\" && msg && typeof msg.length === \"number\",\n \"Expected message to be an array-like, a hex string, or a BN instance\"\n );\n assert9(msg.length >>> 0 === msg.length);\n for (var i3 = 0; i3 < msg.length; i3++)\n assert9((msg[i3] & 255) === msg[i3]);\n }\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(msg, false, options.msgBitLength);\n assert9(!msg.isNeg(), \"Can not sign a negative message\");\n var bytes = this.n.byteLength();\n var bkey = key.getPrivate().toArray(\"be\", bytes);\n var nonce = msg.toArray(\"be\", bytes);\n assert9(new BN(nonce).eq(msg), \"Can not sign message\");\n var drbg = new HmacDRBG({\n hash: this.hash,\n entropy: bkey,\n nonce,\n pers: options.pers,\n persEnc: options.persEnc || \"utf8\"\n });\n var ns1 = this.n.sub(new BN(1));\n for (var iter = 0; ; iter++) {\n var k4 = options.k ? options.k(iter) : new BN(drbg.generate(this.n.byteLength()));\n k4 = this._truncateToN(k4, true);\n if (k4.cmpn(1) <= 0 || k4.cmp(ns1) >= 0)\n continue;\n var kp = this.g.mul(k4);\n if (kp.isInfinity())\n continue;\n var kpX = kp.getX();\n var r2 = kpX.umod(this.n);\n if (r2.cmpn(0) === 0)\n continue;\n var s4 = k4.invm(this.n).mul(r2.mul(key.getPrivate()).iadd(msg));\n s4 = s4.umod(this.n);\n if (s4.cmpn(0) === 0)\n continue;\n var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | (kpX.cmp(r2) !== 0 ? 2 : 0);\n if (options.canonical && s4.cmp(this.nh) > 0) {\n s4 = this.n.sub(s4);\n recoveryParam ^= 1;\n }\n return new Signature({ r: r2, s: s4, recoveryParam });\n }\n };\n EC.prototype.verify = function verify(msg, signature, key, enc, options) {\n if (!options)\n options = {};\n msg = this._truncateToN(msg, false, options.msgBitLength);\n key = this.keyFromPublic(key, enc);\n signature = new Signature(signature, \"hex\");\n var r2 = signature.r;\n var s4 = signature.s;\n if (r2.cmpn(1) < 0 || r2.cmp(this.n) >= 0)\n return false;\n if (s4.cmpn(1) < 0 || s4.cmp(this.n) >= 0)\n return false;\n var sinv = s4.invm(this.n);\n var u1 = sinv.mul(msg).umod(this.n);\n var u2 = sinv.mul(r2).umod(this.n);\n var p4;\n if (!this.curve._maxwellTrick) {\n p4 = this.g.mulAdd(u1, key.getPublic(), u2);\n if (p4.isInfinity())\n return false;\n return p4.getX().umod(this.n).cmp(r2) === 0;\n }\n p4 = this.g.jmulAdd(u1, key.getPublic(), u2);\n if (p4.isInfinity())\n return false;\n return p4.eqXToP(r2);\n };\n EC.prototype.recoverPubKey = function(msg, signature, j2, enc) {\n assert9((3 & j2) === j2, \"The recovery param is more than two bits\");\n signature = new Signature(signature, enc);\n var n2 = this.n;\n var e2 = new BN(msg);\n var r2 = signature.r;\n var s4 = signature.s;\n var isYOdd = j2 & 1;\n var isSecondKey = j2 >> 1;\n if (r2.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)\n throw new Error(\"Unable to find sencond key candinate\");\n if (isSecondKey)\n r2 = this.curve.pointFromX(r2.add(this.curve.n), isYOdd);\n else\n r2 = this.curve.pointFromX(r2, isYOdd);\n var rInv = signature.r.invm(n2);\n var s1 = n2.sub(e2).mul(rInv).umod(n2);\n var s22 = s4.mul(rInv).umod(n2);\n return this.g.mulAdd(s1, r2, s22);\n };\n EC.prototype.getKeyRecoveryParam = function(e2, signature, Q2, enc) {\n signature = new Signature(signature, enc);\n if (signature.recoveryParam !== null)\n return signature.recoveryParam;\n for (var i3 = 0; i3 < 4; i3++) {\n var Qprime;\n try {\n Qprime = this.recoverPubKey(e2, signature, i3);\n } catch (e3) {\n continue;\n }\n if (Qprime.eq(Q2))\n return i3;\n }\n throw new Error(\"Unable to find valid recovery factor\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/key.js\n var require_key2 = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/key.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils3();\n var assert9 = utils.assert;\n var parseBytes = utils.parseBytes;\n var cachedProperty = utils.cachedProperty;\n function KeyPair(eddsa, params) {\n this.eddsa = eddsa;\n this._secret = parseBytes(params.secret);\n if (eddsa.isPoint(params.pub))\n this._pub = params.pub;\n else\n this._pubBytes = parseBytes(params.pub);\n }\n KeyPair.fromPublic = function fromPublic(eddsa, pub) {\n if (pub instanceof KeyPair)\n return pub;\n return new KeyPair(eddsa, { pub });\n };\n KeyPair.fromSecret = function fromSecret(eddsa, secret) {\n if (secret instanceof KeyPair)\n return secret;\n return new KeyPair(eddsa, { secret });\n };\n KeyPair.prototype.secret = function secret() {\n return this._secret;\n };\n cachedProperty(KeyPair, \"pubBytes\", function pubBytes() {\n return this.eddsa.encodePoint(this.pub());\n });\n cachedProperty(KeyPair, \"pub\", function pub() {\n if (this._pubBytes)\n return this.eddsa.decodePoint(this._pubBytes);\n return this.eddsa.g.mul(this.priv());\n });\n cachedProperty(KeyPair, \"privBytes\", function privBytes() {\n var eddsa = this.eddsa;\n var hash3 = this.hash();\n var lastIx = eddsa.encodingLength - 1;\n var a3 = hash3.slice(0, eddsa.encodingLength);\n a3[0] &= 248;\n a3[lastIx] &= 127;\n a3[lastIx] |= 64;\n return a3;\n });\n cachedProperty(KeyPair, \"priv\", function priv() {\n return this.eddsa.decodeInt(this.privBytes());\n });\n cachedProperty(KeyPair, \"hash\", function hash3() {\n return this.eddsa.hash().update(this.secret()).digest();\n });\n cachedProperty(KeyPair, \"messagePrefix\", function messagePrefix() {\n return this.hash().slice(this.eddsa.encodingLength);\n });\n KeyPair.prototype.sign = function sign3(message) {\n assert9(this._secret, \"KeyPair can only verify\");\n return this.eddsa.sign(message, this);\n };\n KeyPair.prototype.verify = function verify(message, sig) {\n return this.eddsa.verify(message, sig, this);\n };\n KeyPair.prototype.getSecret = function getSecret(enc) {\n assert9(this._secret, \"KeyPair is public only\");\n return utils.encode(this.secret(), enc);\n };\n KeyPair.prototype.getPublic = function getPublic(enc) {\n return utils.encode(this.pubBytes(), enc);\n };\n module.exports = KeyPair;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/signature.js\n var require_signature2 = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/signature.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var utils = require_utils3();\n var assert9 = utils.assert;\n var cachedProperty = utils.cachedProperty;\n var parseBytes = utils.parseBytes;\n function Signature(eddsa, sig) {\n this.eddsa = eddsa;\n if (typeof sig !== \"object\")\n sig = parseBytes(sig);\n if (Array.isArray(sig)) {\n assert9(sig.length === eddsa.encodingLength * 2, \"Signature has invalid size\");\n sig = {\n R: sig.slice(0, eddsa.encodingLength),\n S: sig.slice(eddsa.encodingLength)\n };\n }\n assert9(sig.R && sig.S, \"Signature without R or S\");\n if (eddsa.isPoint(sig.R))\n this._R = sig.R;\n if (sig.S instanceof BN)\n this._S = sig.S;\n this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded;\n this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded;\n }\n cachedProperty(Signature, \"S\", function S3() {\n return this.eddsa.decodeInt(this.Sencoded());\n });\n cachedProperty(Signature, \"R\", function R3() {\n return this.eddsa.decodePoint(this.Rencoded());\n });\n cachedProperty(Signature, \"Rencoded\", function Rencoded() {\n return this.eddsa.encodePoint(this.R());\n });\n cachedProperty(Signature, \"Sencoded\", function Sencoded() {\n return this.eddsa.encodeInt(this.S());\n });\n Signature.prototype.toBytes = function toBytes6() {\n return this.Rencoded().concat(this.Sencoded());\n };\n Signature.prototype.toHex = function toHex3() {\n return utils.encode(this.toBytes(), \"hex\").toUpperCase();\n };\n module.exports = Signature;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/index.js\n var require_eddsa = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var hash3 = require_hash();\n var curves = require_curves();\n var utils = require_utils3();\n var assert9 = utils.assert;\n var parseBytes = utils.parseBytes;\n var KeyPair = require_key2();\n var Signature = require_signature2();\n function EDDSA(curve) {\n assert9(curve === \"ed25519\", \"only tested with ed25519 so far\");\n if (!(this instanceof EDDSA))\n return new EDDSA(curve);\n curve = curves[curve].curve;\n this.curve = curve;\n this.g = curve.g;\n this.g.precompute(curve.n.bitLength() + 1);\n this.pointClass = curve.point().constructor;\n this.encodingLength = Math.ceil(curve.n.bitLength() / 8);\n this.hash = hash3.sha512;\n }\n module.exports = EDDSA;\n EDDSA.prototype.sign = function sign3(message, secret) {\n message = parseBytes(message);\n var key = this.keyFromSecret(secret);\n var r2 = this.hashInt(key.messagePrefix(), message);\n var R3 = this.g.mul(r2);\n var Rencoded = this.encodePoint(R3);\n var s_ = this.hashInt(Rencoded, key.pubBytes(), message).mul(key.priv());\n var S3 = r2.add(s_).umod(this.curve.n);\n return this.makeSignature({ R: R3, S: S3, Rencoded });\n };\n EDDSA.prototype.verify = function verify(message, sig, pub) {\n message = parseBytes(message);\n sig = this.makeSignature(sig);\n if (sig.S().gte(sig.eddsa.curve.n) || sig.S().isNeg()) {\n return false;\n }\n var key = this.keyFromPublic(pub);\n var h4 = this.hashInt(sig.Rencoded(), key.pubBytes(), message);\n var SG = this.g.mul(sig.S());\n var RplusAh = sig.R().add(key.pub().mul(h4));\n return RplusAh.eq(SG);\n };\n EDDSA.prototype.hashInt = function hashInt() {\n var hash4 = this.hash();\n for (var i3 = 0; i3 < arguments.length; i3++)\n hash4.update(arguments[i3]);\n return utils.intFromLE(hash4.digest()).umod(this.curve.n);\n };\n EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {\n return KeyPair.fromPublic(this, pub);\n };\n EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) {\n return KeyPair.fromSecret(this, secret);\n };\n EDDSA.prototype.makeSignature = function makeSignature(sig) {\n if (sig instanceof Signature)\n return sig;\n return new Signature(this, sig);\n };\n EDDSA.prototype.encodePoint = function encodePoint(point) {\n var enc = point.getY().toArray(\"le\", this.encodingLength);\n enc[this.encodingLength - 1] |= point.getX().isOdd() ? 128 : 0;\n return enc;\n };\n EDDSA.prototype.decodePoint = function decodePoint(bytes) {\n bytes = utils.parseBytes(bytes);\n var lastIx = bytes.length - 1;\n var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~128);\n var xIsOdd = (bytes[lastIx] & 128) !== 0;\n var y6 = utils.intFromLE(normed);\n return this.curve.pointFromY(y6, xIsOdd);\n };\n EDDSA.prototype.encodeInt = function encodeInt(num2) {\n return num2.toArray(\"le\", this.encodingLength);\n };\n EDDSA.prototype.decodeInt = function decodeInt(bytes) {\n return utils.intFromLE(bytes);\n };\n EDDSA.prototype.isPoint = function isPoint(val) {\n return val instanceof this.pointClass;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic.js\n var require_elliptic = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var elliptic = exports3;\n elliptic.version = require_package().version;\n elliptic.utils = require_utils3();\n elliptic.rand = require_brorand();\n elliptic.curve = require_curve();\n elliptic.curves = require_curves();\n elliptic.ec = require_ec();\n elliptic.eddsa = require_eddsa();\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/elliptic.js\n var require_elliptic2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/elliptic.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EC = void 0;\n var elliptic_1 = __importDefault4(require_elliptic());\n var EC = elliptic_1.default.ec;\n exports3.EC = EC;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/_version.js\n var require_version12 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"signing-key/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/index.js\n var require_lib16 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.computePublicKey = exports3.recoverPublicKey = exports3.SigningKey = void 0;\n var elliptic_1 = require_elliptic2();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version12();\n var logger = new logger_1.Logger(_version_1.version);\n var _curve = null;\n function getCurve() {\n if (!_curve) {\n _curve = new elliptic_1.EC(\"secp256k1\");\n }\n return _curve;\n }\n var SigningKey = (\n /** @class */\n function() {\n function SigningKey2(privateKey) {\n (0, properties_1.defineReadOnly)(this, \"curve\", \"secp256k1\");\n (0, properties_1.defineReadOnly)(this, \"privateKey\", (0, bytes_1.hexlify)(privateKey));\n if ((0, bytes_1.hexDataLength)(this.privateKey) !== 32) {\n logger.throwArgumentError(\"invalid private key\", \"privateKey\", \"[[ REDACTED ]]\");\n }\n var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey));\n (0, properties_1.defineReadOnly)(this, \"publicKey\", \"0x\" + keyPair.getPublic(false, \"hex\"));\n (0, properties_1.defineReadOnly)(this, \"compressedPublicKey\", \"0x\" + keyPair.getPublic(true, \"hex\"));\n (0, properties_1.defineReadOnly)(this, \"_isSigningKey\", true);\n }\n SigningKey2.prototype._addPoint = function(other) {\n var p0 = getCurve().keyFromPublic((0, bytes_1.arrayify)(this.publicKey));\n var p1 = getCurve().keyFromPublic((0, bytes_1.arrayify)(other));\n return \"0x\" + p0.pub.add(p1.pub).encodeCompressed(\"hex\");\n };\n SigningKey2.prototype.signDigest = function(digest) {\n var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey));\n var digestBytes = (0, bytes_1.arrayify)(digest);\n if (digestBytes.length !== 32) {\n logger.throwArgumentError(\"bad digest length\", \"digest\", digest);\n }\n var signature = keyPair.sign(digestBytes, { canonical: true });\n return (0, bytes_1.splitSignature)({\n recoveryParam: signature.recoveryParam,\n r: (0, bytes_1.hexZeroPad)(\"0x\" + signature.r.toString(16), 32),\n s: (0, bytes_1.hexZeroPad)(\"0x\" + signature.s.toString(16), 32)\n });\n };\n SigningKey2.prototype.computeSharedSecret = function(otherKey) {\n var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey));\n var otherKeyPair = getCurve().keyFromPublic((0, bytes_1.arrayify)(computePublicKey(otherKey)));\n return (0, bytes_1.hexZeroPad)(\"0x\" + keyPair.derive(otherKeyPair.getPublic()).toString(16), 32);\n };\n SigningKey2.isSigningKey = function(value) {\n return !!(value && value._isSigningKey);\n };\n return SigningKey2;\n }()\n );\n exports3.SigningKey = SigningKey;\n function recoverPublicKey3(digest, signature) {\n var sig = (0, bytes_1.splitSignature)(signature);\n var rs = { r: (0, bytes_1.arrayify)(sig.r), s: (0, bytes_1.arrayify)(sig.s) };\n return \"0x\" + getCurve().recoverPubKey((0, bytes_1.arrayify)(digest), rs, sig.recoveryParam).encode(\"hex\", false);\n }\n exports3.recoverPublicKey = recoverPublicKey3;\n function computePublicKey(key, compressed) {\n var bytes = (0, bytes_1.arrayify)(key);\n if (bytes.length === 32) {\n var signingKey = new SigningKey(bytes);\n if (compressed) {\n return \"0x\" + getCurve().keyFromPrivate(bytes).getPublic(true, \"hex\");\n }\n return signingKey.publicKey;\n } else if (bytes.length === 33) {\n if (compressed) {\n return (0, bytes_1.hexlify)(bytes);\n }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(false, \"hex\");\n } else if (bytes.length === 65) {\n if (!compressed) {\n return (0, bytes_1.hexlify)(bytes);\n }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(true, \"hex\");\n }\n return logger.throwArgumentError(\"invalid public or private key\", \"key\", \"[REDACTED]\");\n }\n exports3.computePublicKey = computePublicKey;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib/_version.js\n var require_version13 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"transactions/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib/index.js\n var require_lib17 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding4 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n Object.defineProperty(o5, k22, { enumerable: true, get: function() {\n return m2[k4];\n } });\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar4 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding4(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.parse = exports3.serialize = exports3.accessListify = exports3.recoverAddress = exports3.computeAddress = exports3.TransactionTypes = void 0;\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var constants_1 = require_lib8();\n var keccak256_1 = require_lib5();\n var properties_1 = require_lib4();\n var RLP = __importStar4(require_lib6());\n var signing_key_1 = require_lib16();\n var logger_1 = require_lib();\n var _version_1 = require_version13();\n var logger = new logger_1.Logger(_version_1.version);\n var TransactionTypes;\n (function(TransactionTypes2) {\n TransactionTypes2[TransactionTypes2[\"legacy\"] = 0] = \"legacy\";\n TransactionTypes2[TransactionTypes2[\"eip2930\"] = 1] = \"eip2930\";\n TransactionTypes2[TransactionTypes2[\"eip1559\"] = 2] = \"eip1559\";\n })(TransactionTypes = exports3.TransactionTypes || (exports3.TransactionTypes = {}));\n function handleAddress(value) {\n if (value === \"0x\") {\n return null;\n }\n return (0, address_1.getAddress)(value);\n }\n function handleNumber(value) {\n if (value === \"0x\") {\n return constants_1.Zero;\n }\n return bignumber_1.BigNumber.from(value);\n }\n var transactionFields = [\n { name: \"nonce\", maxLength: 32, numeric: true },\n { name: \"gasPrice\", maxLength: 32, numeric: true },\n { name: \"gasLimit\", maxLength: 32, numeric: true },\n { name: \"to\", length: 20 },\n { name: \"value\", maxLength: 32, numeric: true },\n { name: \"data\" }\n ];\n var allowedTransactionKeys = {\n chainId: true,\n data: true,\n gasLimit: true,\n gasPrice: true,\n nonce: true,\n to: true,\n type: true,\n value: true\n };\n function computeAddress(key) {\n var publicKey = (0, signing_key_1.computePublicKey)(key);\n return (0, address_1.getAddress)((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, bytes_1.hexDataSlice)(publicKey, 1)), 12));\n }\n exports3.computeAddress = computeAddress;\n function recoverAddress3(digest, signature) {\n return computeAddress((0, signing_key_1.recoverPublicKey)((0, bytes_1.arrayify)(digest), signature));\n }\n exports3.recoverAddress = recoverAddress3;\n function formatNumber(value, name) {\n var result = (0, bytes_1.stripZeros)(bignumber_1.BigNumber.from(value).toHexString());\n if (result.length > 32) {\n logger.throwArgumentError(\"invalid length for \" + name, \"transaction:\" + name, value);\n }\n return result;\n }\n function accessSetify(addr, storageKeys) {\n return {\n address: (0, address_1.getAddress)(addr),\n storageKeys: (storageKeys || []).map(function(storageKey, index2) {\n if ((0, bytes_1.hexDataLength)(storageKey) !== 32) {\n logger.throwArgumentError(\"invalid access list storageKey\", \"accessList[\" + addr + \":\" + index2 + \"]\", storageKey);\n }\n return storageKey.toLowerCase();\n })\n };\n }\n function accessListify(value) {\n if (Array.isArray(value)) {\n return value.map(function(set, index2) {\n if (Array.isArray(set)) {\n if (set.length > 2) {\n logger.throwArgumentError(\"access list expected to be [ address, storageKeys[] ]\", \"value[\" + index2 + \"]\", set);\n }\n return accessSetify(set[0], set[1]);\n }\n return accessSetify(set.address, set.storageKeys);\n });\n }\n var result = Object.keys(value).map(function(addr) {\n var storageKeys = value[addr].reduce(function(accum, storageKey) {\n accum[storageKey] = true;\n return accum;\n }, {});\n return accessSetify(addr, Object.keys(storageKeys).sort());\n });\n result.sort(function(a3, b4) {\n return a3.address.localeCompare(b4.address);\n });\n return result;\n }\n exports3.accessListify = accessListify;\n function formatAccessList(value) {\n return accessListify(value).map(function(set) {\n return [set.address, set.storageKeys];\n });\n }\n function _serializeEip1559(transaction, signature) {\n if (transaction.gasPrice != null) {\n var gasPrice = bignumber_1.BigNumber.from(transaction.gasPrice);\n var maxFeePerGas = bignumber_1.BigNumber.from(transaction.maxFeePerGas || 0);\n if (!gasPrice.eq(maxFeePerGas)) {\n logger.throwArgumentError(\"mismatch EIP-1559 gasPrice != maxFeePerGas\", \"tx\", {\n gasPrice,\n maxFeePerGas\n });\n }\n }\n var fields = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(transaction.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n transaction.to != null ? (0, address_1.getAddress)(transaction.to) : \"0x\",\n formatNumber(transaction.value || 0, \"value\"),\n transaction.data || \"0x\",\n formatAccessList(transaction.accessList || [])\n ];\n if (signature) {\n var sig = (0, bytes_1.splitSignature)(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push((0, bytes_1.stripZeros)(sig.r));\n fields.push((0, bytes_1.stripZeros)(sig.s));\n }\n return (0, bytes_1.hexConcat)([\"0x02\", RLP.encode(fields)]);\n }\n function _serializeEip2930(transaction, signature) {\n var fields = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.gasPrice || 0, \"gasPrice\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n transaction.to != null ? (0, address_1.getAddress)(transaction.to) : \"0x\",\n formatNumber(transaction.value || 0, \"value\"),\n transaction.data || \"0x\",\n formatAccessList(transaction.accessList || [])\n ];\n if (signature) {\n var sig = (0, bytes_1.splitSignature)(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push((0, bytes_1.stripZeros)(sig.r));\n fields.push((0, bytes_1.stripZeros)(sig.s));\n }\n return (0, bytes_1.hexConcat)([\"0x01\", RLP.encode(fields)]);\n }\n function _serialize(transaction, signature) {\n (0, properties_1.checkProperties)(transaction, allowedTransactionKeys);\n var raw = [];\n transactionFields.forEach(function(fieldInfo) {\n var value = transaction[fieldInfo.name] || [];\n var options = {};\n if (fieldInfo.numeric) {\n options.hexPad = \"left\";\n }\n value = (0, bytes_1.arrayify)((0, bytes_1.hexlify)(value, options));\n if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, \"transaction:\" + fieldInfo.name, value);\n }\n if (fieldInfo.maxLength) {\n value = (0, bytes_1.stripZeros)(value);\n if (value.length > fieldInfo.maxLength) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, \"transaction:\" + fieldInfo.name, value);\n }\n }\n raw.push((0, bytes_1.hexlify)(value));\n });\n var chainId = 0;\n if (transaction.chainId != null) {\n chainId = transaction.chainId;\n if (typeof chainId !== \"number\") {\n logger.throwArgumentError(\"invalid transaction.chainId\", \"transaction\", transaction);\n }\n } else if (signature && !(0, bytes_1.isBytesLike)(signature) && signature.v > 28) {\n chainId = Math.floor((signature.v - 35) / 2);\n }\n if (chainId !== 0) {\n raw.push((0, bytes_1.hexlify)(chainId));\n raw.push(\"0x\");\n raw.push(\"0x\");\n }\n if (!signature) {\n return RLP.encode(raw);\n }\n var sig = (0, bytes_1.splitSignature)(signature);\n var v2 = 27 + sig.recoveryParam;\n if (chainId !== 0) {\n raw.pop();\n raw.pop();\n raw.pop();\n v2 += chainId * 2 + 8;\n if (sig.v > 28 && sig.v !== v2) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n } else if (sig.v !== v2) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n raw.push((0, bytes_1.hexlify)(v2));\n raw.push((0, bytes_1.stripZeros)((0, bytes_1.arrayify)(sig.r)));\n raw.push((0, bytes_1.stripZeros)((0, bytes_1.arrayify)(sig.s)));\n return RLP.encode(raw);\n }\n function serialize(transaction, signature) {\n if (transaction.type == null || transaction.type === 0) {\n if (transaction.accessList != null) {\n logger.throwArgumentError(\"untyped transactions do not support accessList; include type: 1\", \"transaction\", transaction);\n }\n return _serialize(transaction, signature);\n }\n switch (transaction.type) {\n case 1:\n return _serializeEip2930(transaction, signature);\n case 2:\n return _serializeEip1559(transaction, signature);\n default:\n break;\n }\n return logger.throwError(\"unsupported transaction type: \" + transaction.type, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"serializeTransaction\",\n transactionType: transaction.type\n });\n }\n exports3.serialize = serialize;\n function _parseEipSignature(tx, fields, serialize2) {\n try {\n var recid = handleNumber(fields[0]).toNumber();\n if (recid !== 0 && recid !== 1) {\n throw new Error(\"bad recid\");\n }\n tx.v = recid;\n } catch (error) {\n logger.throwArgumentError(\"invalid v for transaction type: 1\", \"v\", fields[0]);\n }\n tx.r = (0, bytes_1.hexZeroPad)(fields[1], 32);\n tx.s = (0, bytes_1.hexZeroPad)(fields[2], 32);\n try {\n var digest = (0, keccak256_1.keccak256)(serialize2(tx));\n tx.from = recoverAddress3(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v });\n } catch (error) {\n }\n }\n function _parseEip1559(payload) {\n var transaction = RLP.decode(payload.slice(1));\n if (transaction.length !== 9 && transaction.length !== 12) {\n logger.throwArgumentError(\"invalid component count for transaction type: 2\", \"payload\", (0, bytes_1.hexlify)(payload));\n }\n var maxPriorityFeePerGas = handleNumber(transaction[2]);\n var maxFeePerGas = handleNumber(transaction[3]);\n var tx = {\n type: 2,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n maxPriorityFeePerGas,\n maxFeePerGas,\n gasPrice: null,\n gasLimit: handleNumber(transaction[4]),\n to: handleAddress(transaction[5]),\n value: handleNumber(transaction[6]),\n data: transaction[7],\n accessList: accessListify(transaction[8])\n };\n if (transaction.length === 9) {\n return tx;\n }\n tx.hash = (0, keccak256_1.keccak256)(payload);\n _parseEipSignature(tx, transaction.slice(9), _serializeEip1559);\n return tx;\n }\n function _parseEip2930(payload) {\n var transaction = RLP.decode(payload.slice(1));\n if (transaction.length !== 8 && transaction.length !== 11) {\n logger.throwArgumentError(\"invalid component count for transaction type: 1\", \"payload\", (0, bytes_1.hexlify)(payload));\n }\n var tx = {\n type: 1,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n gasPrice: handleNumber(transaction[2]),\n gasLimit: handleNumber(transaction[3]),\n to: handleAddress(transaction[4]),\n value: handleNumber(transaction[5]),\n data: transaction[6],\n accessList: accessListify(transaction[7])\n };\n if (transaction.length === 8) {\n return tx;\n }\n tx.hash = (0, keccak256_1.keccak256)(payload);\n _parseEipSignature(tx, transaction.slice(8), _serializeEip2930);\n return tx;\n }\n function _parse(rawTransaction) {\n var transaction = RLP.decode(rawTransaction);\n if (transaction.length !== 9 && transaction.length !== 6) {\n logger.throwArgumentError(\"invalid raw transaction\", \"rawTransaction\", rawTransaction);\n }\n var tx = {\n nonce: handleNumber(transaction[0]).toNumber(),\n gasPrice: handleNumber(transaction[1]),\n gasLimit: handleNumber(transaction[2]),\n to: handleAddress(transaction[3]),\n value: handleNumber(transaction[4]),\n data: transaction[5],\n chainId: 0\n };\n if (transaction.length === 6) {\n return tx;\n }\n try {\n tx.v = bignumber_1.BigNumber.from(transaction[6]).toNumber();\n } catch (error) {\n return tx;\n }\n tx.r = (0, bytes_1.hexZeroPad)(transaction[7], 32);\n tx.s = (0, bytes_1.hexZeroPad)(transaction[8], 32);\n if (bignumber_1.BigNumber.from(tx.r).isZero() && bignumber_1.BigNumber.from(tx.s).isZero()) {\n tx.chainId = tx.v;\n tx.v = 0;\n } else {\n tx.chainId = Math.floor((tx.v - 35) / 2);\n if (tx.chainId < 0) {\n tx.chainId = 0;\n }\n var recoveryParam = tx.v - 27;\n var raw = transaction.slice(0, 6);\n if (tx.chainId !== 0) {\n raw.push((0, bytes_1.hexlify)(tx.chainId));\n raw.push(\"0x\");\n raw.push(\"0x\");\n recoveryParam -= tx.chainId * 2 + 8;\n }\n var digest = (0, keccak256_1.keccak256)(RLP.encode(raw));\n try {\n tx.from = recoverAddress3(digest, { r: (0, bytes_1.hexlify)(tx.r), s: (0, bytes_1.hexlify)(tx.s), recoveryParam });\n } catch (error) {\n }\n tx.hash = (0, keccak256_1.keccak256)(rawTransaction);\n }\n tx.type = null;\n return tx;\n }\n function parse2(rawTransaction) {\n var payload = (0, bytes_1.arrayify)(rawTransaction);\n if (payload[0] > 127) {\n return _parse(payload);\n }\n switch (payload[0]) {\n case 1:\n return _parseEip2930(payload);\n case 2:\n return _parseEip1559(payload);\n default:\n break;\n }\n return logger.throwError(\"unsupported transaction type: \" + payload[0], logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"parseTransaction\",\n transactionType: payload[0]\n });\n }\n exports3.parse = parse2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+contracts@5.8.0/node_modules/@ethersproject/contracts/lib/_version.js\n var require_version14 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+contracts@5.8.0/node_modules/@ethersproject/contracts/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"contracts/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+contracts@5.8.0/node_modules/@ethersproject/contracts/lib/index.js\n var require_lib18 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+contracts@5.8.0/node_modules/@ethersproject/contracts/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n var __spreadArray3 = exports3 && exports3.__spreadArray || function(to, from14, pack) {\n if (pack || arguments.length === 2)\n for (var i3 = 0, l6 = from14.length, ar; i3 < l6; i3++) {\n if (ar || !(i3 in from14)) {\n if (!ar)\n ar = Array.prototype.slice.call(from14, 0, i3);\n ar[i3] = from14[i3];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from14));\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ContractFactory = exports3.Contract = exports3.BaseContract = void 0;\n var abi_1 = require_lib13();\n var abstract_provider_1 = require_lib14();\n var abstract_signer_1 = require_lib15();\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var logger_1 = require_lib();\n var _version_1 = require_version14();\n var logger = new logger_1.Logger(_version_1.version);\n var allowedTransactionKeys = {\n chainId: true,\n data: true,\n from: true,\n gasLimit: true,\n gasPrice: true,\n nonce: true,\n to: true,\n value: true,\n type: true,\n accessList: true,\n maxFeePerGas: true,\n maxPriorityFeePerGas: true,\n customData: true,\n ccipReadEnabled: true\n };\n function resolveName(resolver, nameOrPromise) {\n return __awaiter4(this, void 0, void 0, function() {\n var name, address;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, nameOrPromise];\n case 1:\n name = _a.sent();\n if (typeof name !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", name);\n }\n try {\n return [2, (0, address_1.getAddress)(name)];\n } catch (error) {\n }\n if (!resolver) {\n logger.throwError(\"a provider or signer is needed to resolve ENS names\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\"\n });\n }\n return [4, resolver.resolveName(name)];\n case 2:\n address = _a.sent();\n if (address == null) {\n logger.throwArgumentError(\"resolver or addr is not configured for ENS name\", \"name\", name);\n }\n return [2, address];\n }\n });\n });\n }\n function resolveAddresses(resolver, value, paramType) {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!Array.isArray(paramType))\n return [3, 2];\n return [4, Promise.all(paramType.map(function(paramType2, index2) {\n return resolveAddresses(resolver, Array.isArray(value) ? value[index2] : value[paramType2.name], paramType2);\n }))];\n case 1:\n return [2, _a.sent()];\n case 2:\n if (!(paramType.type === \"address\"))\n return [3, 4];\n return [4, resolveName(resolver, value)];\n case 3:\n return [2, _a.sent()];\n case 4:\n if (!(paramType.type === \"tuple\"))\n return [3, 6];\n return [4, resolveAddresses(resolver, value, paramType.components)];\n case 5:\n return [2, _a.sent()];\n case 6:\n if (!(paramType.baseType === \"array\"))\n return [3, 8];\n if (!Array.isArray(value)) {\n return [2, Promise.reject(logger.makeError(\"invalid value for array\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"value\",\n value\n }))];\n }\n return [4, Promise.all(value.map(function(v2) {\n return resolveAddresses(resolver, v2, paramType.arrayChildren);\n }))];\n case 7:\n return [2, _a.sent()];\n case 8:\n return [2, value];\n }\n });\n });\n }\n function populateTransaction(contract, fragment, args) {\n return __awaiter4(this, void 0, void 0, function() {\n var overrides, resolved, data, tx, ro, intrinsic, bytes, i3, roValue, leftovers;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n overrides = {};\n if (args.length === fragment.inputs.length + 1 && typeof args[args.length - 1] === \"object\") {\n overrides = (0, properties_1.shallowCopy)(args.pop());\n }\n logger.checkArgumentCount(args.length, fragment.inputs.length, \"passed to contract\");\n if (contract.signer) {\n if (overrides.from) {\n overrides.from = (0, properties_1.resolveProperties)({\n override: resolveName(contract.signer, overrides.from),\n signer: contract.signer.getAddress()\n }).then(function(check) {\n return __awaiter4(_this, void 0, void 0, function() {\n return __generator4(this, function(_a2) {\n if ((0, address_1.getAddress)(check.signer) !== check.override) {\n logger.throwError(\"Contract with a Signer cannot override from\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.from\"\n });\n }\n return [2, check.override];\n });\n });\n });\n } else {\n overrides.from = contract.signer.getAddress();\n }\n } else if (overrides.from) {\n overrides.from = resolveName(contract.provider, overrides.from);\n }\n return [4, (0, properties_1.resolveProperties)({\n args: resolveAddresses(contract.signer || contract.provider, args, fragment.inputs),\n address: contract.resolvedAddress,\n overrides: (0, properties_1.resolveProperties)(overrides) || {}\n })];\n case 1:\n resolved = _a.sent();\n data = contract.interface.encodeFunctionData(fragment, resolved.args);\n tx = {\n data,\n to: resolved.address\n };\n ro = resolved.overrides;\n if (ro.nonce != null) {\n tx.nonce = bignumber_1.BigNumber.from(ro.nonce).toNumber();\n }\n if (ro.gasLimit != null) {\n tx.gasLimit = bignumber_1.BigNumber.from(ro.gasLimit);\n }\n if (ro.gasPrice != null) {\n tx.gasPrice = bignumber_1.BigNumber.from(ro.gasPrice);\n }\n if (ro.maxFeePerGas != null) {\n tx.maxFeePerGas = bignumber_1.BigNumber.from(ro.maxFeePerGas);\n }\n if (ro.maxPriorityFeePerGas != null) {\n tx.maxPriorityFeePerGas = bignumber_1.BigNumber.from(ro.maxPriorityFeePerGas);\n }\n if (ro.from != null) {\n tx.from = ro.from;\n }\n if (ro.type != null) {\n tx.type = ro.type;\n }\n if (ro.accessList != null) {\n tx.accessList = (0, transactions_1.accessListify)(ro.accessList);\n }\n if (tx.gasLimit == null && fragment.gas != null) {\n intrinsic = 21e3;\n bytes = (0, bytes_1.arrayify)(data);\n for (i3 = 0; i3 < bytes.length; i3++) {\n intrinsic += 4;\n if (bytes[i3]) {\n intrinsic += 64;\n }\n }\n tx.gasLimit = bignumber_1.BigNumber.from(fragment.gas).add(intrinsic);\n }\n if (ro.value) {\n roValue = bignumber_1.BigNumber.from(ro.value);\n if (!roValue.isZero() && !fragment.payable) {\n logger.throwError(\"non-payable method cannot override value\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: overrides.value\n });\n }\n tx.value = roValue;\n }\n if (ro.customData) {\n tx.customData = (0, properties_1.shallowCopy)(ro.customData);\n }\n if (ro.ccipReadEnabled) {\n tx.ccipReadEnabled = !!ro.ccipReadEnabled;\n }\n delete overrides.nonce;\n delete overrides.gasLimit;\n delete overrides.gasPrice;\n delete overrides.from;\n delete overrides.value;\n delete overrides.type;\n delete overrides.accessList;\n delete overrides.maxFeePerGas;\n delete overrides.maxPriorityFeePerGas;\n delete overrides.customData;\n delete overrides.ccipReadEnabled;\n leftovers = Object.keys(overrides).filter(function(key) {\n return overrides[key] != null;\n });\n if (leftovers.length) {\n logger.throwError(\"cannot override \" + leftovers.map(function(l6) {\n return JSON.stringify(l6);\n }).join(\",\"), logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides\",\n overrides: leftovers\n });\n }\n return [2, tx];\n }\n });\n });\n }\n function buildPopulate(contract, fragment) {\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return populateTransaction(contract, fragment, args);\n };\n }\n function buildEstimate(contract, fragment) {\n var signerOrProvider = contract.signer || contract.provider;\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter4(this, void 0, void 0, function() {\n var tx;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!signerOrProvider) {\n logger.throwError(\"estimate require a provider or signer\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"estimateGas\"\n });\n }\n return [4, populateTransaction(contract, fragment, args)];\n case 1:\n tx = _a.sent();\n return [4, signerOrProvider.estimateGas(tx)];\n case 2:\n return [2, _a.sent()];\n }\n });\n });\n };\n }\n function addContractWait(contract, tx) {\n var wait2 = tx.wait.bind(tx);\n tx.wait = function(confirmations) {\n return wait2(confirmations).then(function(receipt) {\n receipt.events = receipt.logs.map(function(log) {\n var event = (0, properties_1.deepCopy)(log);\n var parsed = null;\n try {\n parsed = contract.interface.parseLog(log);\n } catch (e2) {\n }\n if (parsed) {\n event.args = parsed.args;\n event.decode = function(data, topics) {\n return contract.interface.decodeEventLog(parsed.eventFragment, data, topics);\n };\n event.event = parsed.name;\n event.eventSignature = parsed.signature;\n }\n event.removeListener = function() {\n return contract.provider;\n };\n event.getBlock = function() {\n return contract.provider.getBlock(receipt.blockHash);\n };\n event.getTransaction = function() {\n return contract.provider.getTransaction(receipt.transactionHash);\n };\n event.getTransactionReceipt = function() {\n return Promise.resolve(receipt);\n };\n return event;\n });\n return receipt;\n });\n };\n }\n function buildCall(contract, fragment, collapseSimple) {\n var signerOrProvider = contract.signer || contract.provider;\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter4(this, void 0, void 0, function() {\n var blockTag, overrides, tx, result, value;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n blockTag = void 0;\n if (!(args.length === fragment.inputs.length + 1 && typeof args[args.length - 1] === \"object\"))\n return [3, 3];\n overrides = (0, properties_1.shallowCopy)(args.pop());\n if (!(overrides.blockTag != null))\n return [3, 2];\n return [4, overrides.blockTag];\n case 1:\n blockTag = _a.sent();\n _a.label = 2;\n case 2:\n delete overrides.blockTag;\n args.push(overrides);\n _a.label = 3;\n case 3:\n if (!(contract.deployTransaction != null))\n return [3, 5];\n return [4, contract._deployed(blockTag)];\n case 4:\n _a.sent();\n _a.label = 5;\n case 5:\n return [4, populateTransaction(contract, fragment, args)];\n case 6:\n tx = _a.sent();\n return [4, signerOrProvider.call(tx, blockTag)];\n case 7:\n result = _a.sent();\n try {\n value = contract.interface.decodeFunctionResult(fragment, result);\n if (collapseSimple && fragment.outputs.length === 1) {\n value = value[0];\n }\n return [2, value];\n } catch (error) {\n if (error.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n error.address = contract.address;\n error.args = args;\n error.transaction = tx;\n }\n throw error;\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n }\n function buildSend(contract, fragment) {\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter4(this, void 0, void 0, function() {\n var txRequest, tx;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!contract.signer) {\n logger.throwError(\"sending a transaction requires a signer\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"sendTransaction\"\n });\n }\n if (!(contract.deployTransaction != null))\n return [3, 2];\n return [4, contract._deployed()];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n return [4, populateTransaction(contract, fragment, args)];\n case 3:\n txRequest = _a.sent();\n return [4, contract.signer.sendTransaction(txRequest)];\n case 4:\n tx = _a.sent();\n addContractWait(contract, tx);\n return [2, tx];\n }\n });\n });\n };\n }\n function buildDefault(contract, fragment, collapseSimple) {\n if (fragment.constant) {\n return buildCall(contract, fragment, collapseSimple);\n }\n return buildSend(contract, fragment);\n }\n function getEventTag(filter) {\n if (filter.address && (filter.topics == null || filter.topics.length === 0)) {\n return \"*\";\n }\n return (filter.address || \"*\") + \"@\" + (filter.topics ? filter.topics.map(function(topic) {\n if (Array.isArray(topic)) {\n return topic.join(\"|\");\n }\n return topic;\n }).join(\":\") : \"\");\n }\n var RunningEvent = (\n /** @class */\n function() {\n function RunningEvent2(tag, filter) {\n (0, properties_1.defineReadOnly)(this, \"tag\", tag);\n (0, properties_1.defineReadOnly)(this, \"filter\", filter);\n this._listeners = [];\n }\n RunningEvent2.prototype.addListener = function(listener, once2) {\n this._listeners.push({ listener, once: once2 });\n };\n RunningEvent2.prototype.removeListener = function(listener) {\n var done = false;\n this._listeners = this._listeners.filter(function(item) {\n if (done || item.listener !== listener) {\n return true;\n }\n done = true;\n return false;\n });\n };\n RunningEvent2.prototype.removeAllListeners = function() {\n this._listeners = [];\n };\n RunningEvent2.prototype.listeners = function() {\n return this._listeners.map(function(i3) {\n return i3.listener;\n });\n };\n RunningEvent2.prototype.listenerCount = function() {\n return this._listeners.length;\n };\n RunningEvent2.prototype.run = function(args) {\n var _this = this;\n var listenerCount = this.listenerCount();\n this._listeners = this._listeners.filter(function(item) {\n var argsCopy = args.slice();\n setTimeout(function() {\n item.listener.apply(_this, argsCopy);\n }, 0);\n return !item.once;\n });\n return listenerCount;\n };\n RunningEvent2.prototype.prepareEvent = function(event) {\n };\n RunningEvent2.prototype.getEmit = function(event) {\n return [event];\n };\n return RunningEvent2;\n }()\n );\n var ErrorRunningEvent = (\n /** @class */\n function(_super) {\n __extends4(ErrorRunningEvent2, _super);\n function ErrorRunningEvent2() {\n return _super.call(this, \"error\", null) || this;\n }\n return ErrorRunningEvent2;\n }(RunningEvent)\n );\n var FragmentRunningEvent = (\n /** @class */\n function(_super) {\n __extends4(FragmentRunningEvent2, _super);\n function FragmentRunningEvent2(address, contractInterface, fragment, topics) {\n var _this = this;\n var filter = {\n address\n };\n var topic = contractInterface.getEventTopic(fragment);\n if (topics) {\n if (topic !== topics[0]) {\n logger.throwArgumentError(\"topic mismatch\", \"topics\", topics);\n }\n filter.topics = topics.slice();\n } else {\n filter.topics = [topic];\n }\n _this = _super.call(this, getEventTag(filter), filter) || this;\n (0, properties_1.defineReadOnly)(_this, \"address\", address);\n (0, properties_1.defineReadOnly)(_this, \"interface\", contractInterface);\n (0, properties_1.defineReadOnly)(_this, \"fragment\", fragment);\n return _this;\n }\n FragmentRunningEvent2.prototype.prepareEvent = function(event) {\n var _this = this;\n _super.prototype.prepareEvent.call(this, event);\n event.event = this.fragment.name;\n event.eventSignature = this.fragment.format();\n event.decode = function(data, topics) {\n return _this.interface.decodeEventLog(_this.fragment, data, topics);\n };\n try {\n event.args = this.interface.decodeEventLog(this.fragment, event.data, event.topics);\n } catch (error) {\n event.args = null;\n event.decodeError = error;\n }\n };\n FragmentRunningEvent2.prototype.getEmit = function(event) {\n var errors = (0, abi_1.checkResultErrors)(event.args);\n if (errors.length) {\n throw errors[0].error;\n }\n var args = (event.args || []).slice();\n args.push(event);\n return args;\n };\n return FragmentRunningEvent2;\n }(RunningEvent)\n );\n var WildcardRunningEvent = (\n /** @class */\n function(_super) {\n __extends4(WildcardRunningEvent2, _super);\n function WildcardRunningEvent2(address, contractInterface) {\n var _this = _super.call(this, \"*\", { address }) || this;\n (0, properties_1.defineReadOnly)(_this, \"address\", address);\n (0, properties_1.defineReadOnly)(_this, \"interface\", contractInterface);\n return _this;\n }\n WildcardRunningEvent2.prototype.prepareEvent = function(event) {\n var _this = this;\n _super.prototype.prepareEvent.call(this, event);\n try {\n var parsed_1 = this.interface.parseLog(event);\n event.event = parsed_1.name;\n event.eventSignature = parsed_1.signature;\n event.decode = function(data, topics) {\n return _this.interface.decodeEventLog(parsed_1.eventFragment, data, topics);\n };\n event.args = parsed_1.args;\n } catch (error) {\n }\n };\n return WildcardRunningEvent2;\n }(RunningEvent)\n );\n var BaseContract = (\n /** @class */\n function() {\n function BaseContract2(addressOrName, contractInterface, signerOrProvider) {\n var _newTarget = this.constructor;\n var _this = this;\n (0, properties_1.defineReadOnly)(this, \"interface\", (0, properties_1.getStatic)(_newTarget, \"getInterface\")(contractInterface));\n if (signerOrProvider == null) {\n (0, properties_1.defineReadOnly)(this, \"provider\", null);\n (0, properties_1.defineReadOnly)(this, \"signer\", null);\n } else if (abstract_signer_1.Signer.isSigner(signerOrProvider)) {\n (0, properties_1.defineReadOnly)(this, \"provider\", signerOrProvider.provider || null);\n (0, properties_1.defineReadOnly)(this, \"signer\", signerOrProvider);\n } else if (abstract_provider_1.Provider.isProvider(signerOrProvider)) {\n (0, properties_1.defineReadOnly)(this, \"provider\", signerOrProvider);\n (0, properties_1.defineReadOnly)(this, \"signer\", null);\n } else {\n logger.throwArgumentError(\"invalid signer or provider\", \"signerOrProvider\", signerOrProvider);\n }\n (0, properties_1.defineReadOnly)(this, \"callStatic\", {});\n (0, properties_1.defineReadOnly)(this, \"estimateGas\", {});\n (0, properties_1.defineReadOnly)(this, \"functions\", {});\n (0, properties_1.defineReadOnly)(this, \"populateTransaction\", {});\n (0, properties_1.defineReadOnly)(this, \"filters\", {});\n {\n var uniqueFilters_1 = {};\n Object.keys(this.interface.events).forEach(function(eventSignature) {\n var event = _this.interface.events[eventSignature];\n (0, properties_1.defineReadOnly)(_this.filters, eventSignature, function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return {\n address: _this.address,\n topics: _this.interface.encodeFilterTopics(event, args)\n };\n });\n if (!uniqueFilters_1[event.name]) {\n uniqueFilters_1[event.name] = [];\n }\n uniqueFilters_1[event.name].push(eventSignature);\n });\n Object.keys(uniqueFilters_1).forEach(function(name) {\n var filters = uniqueFilters_1[name];\n if (filters.length === 1) {\n (0, properties_1.defineReadOnly)(_this.filters, name, _this.filters[filters[0]]);\n } else {\n logger.warn(\"Duplicate definition of \" + name + \" (\" + filters.join(\", \") + \")\");\n }\n });\n }\n (0, properties_1.defineReadOnly)(this, \"_runningEvents\", {});\n (0, properties_1.defineReadOnly)(this, \"_wrappedEmits\", {});\n if (addressOrName == null) {\n logger.throwArgumentError(\"invalid contract address or ENS name\", \"addressOrName\", addressOrName);\n }\n (0, properties_1.defineReadOnly)(this, \"address\", addressOrName);\n if (this.provider) {\n (0, properties_1.defineReadOnly)(this, \"resolvedAddress\", resolveName(this.provider, addressOrName));\n } else {\n try {\n (0, properties_1.defineReadOnly)(this, \"resolvedAddress\", Promise.resolve((0, address_1.getAddress)(addressOrName)));\n } catch (error) {\n logger.throwError(\"provider is required to use ENS name as contract address\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Contract\"\n });\n }\n }\n this.resolvedAddress.catch(function(e2) {\n });\n var uniqueNames = {};\n var uniqueSignatures = {};\n Object.keys(this.interface.functions).forEach(function(signature) {\n var fragment = _this.interface.functions[signature];\n if (uniqueSignatures[signature]) {\n logger.warn(\"Duplicate ABI entry for \" + JSON.stringify(signature));\n return;\n }\n uniqueSignatures[signature] = true;\n {\n var name_1 = fragment.name;\n if (!uniqueNames[\"%\" + name_1]) {\n uniqueNames[\"%\" + name_1] = [];\n }\n uniqueNames[\"%\" + name_1].push(signature);\n }\n if (_this[signature] == null) {\n (0, properties_1.defineReadOnly)(_this, signature, buildDefault(_this, fragment, true));\n }\n if (_this.functions[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.functions, signature, buildDefault(_this, fragment, false));\n }\n if (_this.callStatic[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.callStatic, signature, buildCall(_this, fragment, true));\n }\n if (_this.populateTransaction[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.populateTransaction, signature, buildPopulate(_this, fragment));\n }\n if (_this.estimateGas[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.estimateGas, signature, buildEstimate(_this, fragment));\n }\n });\n Object.keys(uniqueNames).forEach(function(name) {\n var signatures = uniqueNames[name];\n if (signatures.length > 1) {\n return;\n }\n name = name.substring(1);\n var signature = signatures[0];\n try {\n if (_this[name] == null) {\n (0, properties_1.defineReadOnly)(_this, name, _this[signature]);\n }\n } catch (e2) {\n }\n if (_this.functions[name] == null) {\n (0, properties_1.defineReadOnly)(_this.functions, name, _this.functions[signature]);\n }\n if (_this.callStatic[name] == null) {\n (0, properties_1.defineReadOnly)(_this.callStatic, name, _this.callStatic[signature]);\n }\n if (_this.populateTransaction[name] == null) {\n (0, properties_1.defineReadOnly)(_this.populateTransaction, name, _this.populateTransaction[signature]);\n }\n if (_this.estimateGas[name] == null) {\n (0, properties_1.defineReadOnly)(_this.estimateGas, name, _this.estimateGas[signature]);\n }\n });\n }\n BaseContract2.getContractAddress = function(transaction) {\n return (0, address_1.getContractAddress)(transaction);\n };\n BaseContract2.getInterface = function(contractInterface) {\n if (abi_1.Interface.isInterface(contractInterface)) {\n return contractInterface;\n }\n return new abi_1.Interface(contractInterface);\n };\n BaseContract2.prototype.deployed = function() {\n return this._deployed();\n };\n BaseContract2.prototype._deployed = function(blockTag) {\n var _this = this;\n if (!this._deployedPromise) {\n if (this.deployTransaction) {\n this._deployedPromise = this.deployTransaction.wait().then(function() {\n return _this;\n });\n } else {\n this._deployedPromise = this.provider.getCode(this.address, blockTag).then(function(code) {\n if (code === \"0x\") {\n logger.throwError(\"contract not deployed\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n contractAddress: _this.address,\n operation: \"getDeployed\"\n });\n }\n return _this;\n });\n }\n }\n return this._deployedPromise;\n };\n BaseContract2.prototype.fallback = function(overrides) {\n var _this = this;\n if (!this.signer) {\n logger.throwError(\"sending a transactions require a signer\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: \"sendTransaction(fallback)\" });\n }\n var tx = (0, properties_1.shallowCopy)(overrides || {});\n [\"from\", \"to\"].forEach(function(key) {\n if (tx[key] == null) {\n return;\n }\n logger.throwError(\"cannot override \" + key, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: key });\n });\n tx.to = this.resolvedAddress;\n return this.deployed().then(function() {\n return _this.signer.sendTransaction(tx);\n });\n };\n BaseContract2.prototype.connect = function(signerOrProvider) {\n if (typeof signerOrProvider === \"string\") {\n signerOrProvider = new abstract_signer_1.VoidSigner(signerOrProvider, this.provider);\n }\n var contract = new this.constructor(this.address, this.interface, signerOrProvider);\n if (this.deployTransaction) {\n (0, properties_1.defineReadOnly)(contract, \"deployTransaction\", this.deployTransaction);\n }\n return contract;\n };\n BaseContract2.prototype.attach = function(addressOrName) {\n return new this.constructor(addressOrName, this.interface, this.signer || this.provider);\n };\n BaseContract2.isIndexed = function(value) {\n return abi_1.Indexed.isIndexed(value);\n };\n BaseContract2.prototype._normalizeRunningEvent = function(runningEvent) {\n if (this._runningEvents[runningEvent.tag]) {\n return this._runningEvents[runningEvent.tag];\n }\n return runningEvent;\n };\n BaseContract2.prototype._getRunningEvent = function(eventName) {\n if (typeof eventName === \"string\") {\n if (eventName === \"error\") {\n return this._normalizeRunningEvent(new ErrorRunningEvent());\n }\n if (eventName === \"event\") {\n return this._normalizeRunningEvent(new RunningEvent(\"event\", null));\n }\n if (eventName === \"*\") {\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n }\n var fragment = this.interface.getEvent(eventName);\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment));\n }\n if (eventName.topics && eventName.topics.length > 0) {\n try {\n var topic = eventName.topics[0];\n if (typeof topic !== \"string\") {\n throw new Error(\"invalid topic\");\n }\n var fragment = this.interface.getEvent(topic);\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment, eventName.topics));\n } catch (error) {\n }\n var filter = {\n address: this.address,\n topics: eventName.topics\n };\n return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter), filter));\n }\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n };\n BaseContract2.prototype._checkRunningEvents = function(runningEvent) {\n if (runningEvent.listenerCount() === 0) {\n delete this._runningEvents[runningEvent.tag];\n var emit2 = this._wrappedEmits[runningEvent.tag];\n if (emit2 && runningEvent.filter) {\n this.provider.off(runningEvent.filter, emit2);\n delete this._wrappedEmits[runningEvent.tag];\n }\n }\n };\n BaseContract2.prototype._wrapEvent = function(runningEvent, log, listener) {\n var _this = this;\n var event = (0, properties_1.deepCopy)(log);\n event.removeListener = function() {\n if (!listener) {\n return;\n }\n runningEvent.removeListener(listener);\n _this._checkRunningEvents(runningEvent);\n };\n event.getBlock = function() {\n return _this.provider.getBlock(log.blockHash);\n };\n event.getTransaction = function() {\n return _this.provider.getTransaction(log.transactionHash);\n };\n event.getTransactionReceipt = function() {\n return _this.provider.getTransactionReceipt(log.transactionHash);\n };\n runningEvent.prepareEvent(event);\n return event;\n };\n BaseContract2.prototype._addEventListener = function(runningEvent, listener, once2) {\n var _this = this;\n if (!this.provider) {\n logger.throwError(\"events require a provider or a signer with a provider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: \"once\" });\n }\n runningEvent.addListener(listener, once2);\n this._runningEvents[runningEvent.tag] = runningEvent;\n if (!this._wrappedEmits[runningEvent.tag]) {\n var wrappedEmit = function(log) {\n var event = _this._wrapEvent(runningEvent, log, listener);\n if (event.decodeError == null) {\n try {\n var args = runningEvent.getEmit(event);\n _this.emit.apply(_this, __spreadArray3([runningEvent.filter], args, false));\n } catch (error) {\n event.decodeError = error.error;\n }\n }\n if (runningEvent.filter != null) {\n _this.emit(\"event\", event);\n }\n if (event.decodeError != null) {\n _this.emit(\"error\", event.decodeError, event);\n }\n };\n this._wrappedEmits[runningEvent.tag] = wrappedEmit;\n if (runningEvent.filter != null) {\n this.provider.on(runningEvent.filter, wrappedEmit);\n }\n }\n };\n BaseContract2.prototype.queryFilter = function(event, fromBlockOrBlockhash, toBlock) {\n var _this = this;\n var runningEvent = this._getRunningEvent(event);\n var filter = (0, properties_1.shallowCopy)(runningEvent.filter);\n if (typeof fromBlockOrBlockhash === \"string\" && (0, bytes_1.isHexString)(fromBlockOrBlockhash, 32)) {\n if (toBlock != null) {\n logger.throwArgumentError(\"cannot specify toBlock with blockhash\", \"toBlock\", toBlock);\n }\n filter.blockHash = fromBlockOrBlockhash;\n } else {\n filter.fromBlock = fromBlockOrBlockhash != null ? fromBlockOrBlockhash : 0;\n filter.toBlock = toBlock != null ? toBlock : \"latest\";\n }\n return this.provider.getLogs(filter).then(function(logs) {\n return logs.map(function(log) {\n return _this._wrapEvent(runningEvent, log, null);\n });\n });\n };\n BaseContract2.prototype.on = function(event, listener) {\n this._addEventListener(this._getRunningEvent(event), listener, false);\n return this;\n };\n BaseContract2.prototype.once = function(event, listener) {\n this._addEventListener(this._getRunningEvent(event), listener, true);\n return this;\n };\n BaseContract2.prototype.emit = function(eventName) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!this.provider) {\n return false;\n }\n var runningEvent = this._getRunningEvent(eventName);\n var result = runningEvent.run(args) > 0;\n this._checkRunningEvents(runningEvent);\n return result;\n };\n BaseContract2.prototype.listenerCount = function(eventName) {\n var _this = this;\n if (!this.provider) {\n return 0;\n }\n if (eventName == null) {\n return Object.keys(this._runningEvents).reduce(function(accum, key) {\n return accum + _this._runningEvents[key].listenerCount();\n }, 0);\n }\n return this._getRunningEvent(eventName).listenerCount();\n };\n BaseContract2.prototype.listeners = function(eventName) {\n if (!this.provider) {\n return [];\n }\n if (eventName == null) {\n var result_1 = [];\n for (var tag in this._runningEvents) {\n this._runningEvents[tag].listeners().forEach(function(listener) {\n result_1.push(listener);\n });\n }\n return result_1;\n }\n return this._getRunningEvent(eventName).listeners();\n };\n BaseContract2.prototype.removeAllListeners = function(eventName) {\n if (!this.provider) {\n return this;\n }\n if (eventName == null) {\n for (var tag in this._runningEvents) {\n var runningEvent_1 = this._runningEvents[tag];\n runningEvent_1.removeAllListeners();\n this._checkRunningEvents(runningEvent_1);\n }\n return this;\n }\n var runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeAllListeners();\n this._checkRunningEvents(runningEvent);\n return this;\n };\n BaseContract2.prototype.off = function(eventName, listener) {\n if (!this.provider) {\n return this;\n }\n var runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeListener(listener);\n this._checkRunningEvents(runningEvent);\n return this;\n };\n BaseContract2.prototype.removeListener = function(eventName, listener) {\n return this.off(eventName, listener);\n };\n return BaseContract2;\n }()\n );\n exports3.BaseContract = BaseContract;\n var Contract = (\n /** @class */\n function(_super) {\n __extends4(Contract2, _super);\n function Contract2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Contract2;\n }(BaseContract)\n );\n exports3.Contract = Contract;\n var ContractFactory = (\n /** @class */\n function() {\n function ContractFactory2(contractInterface, bytecode, signer) {\n var _newTarget = this.constructor;\n var bytecodeHex = null;\n if (typeof bytecode === \"string\") {\n bytecodeHex = bytecode;\n } else if ((0, bytes_1.isBytes)(bytecode)) {\n bytecodeHex = (0, bytes_1.hexlify)(bytecode);\n } else if (bytecode && typeof bytecode.object === \"string\") {\n bytecodeHex = bytecode.object;\n } else {\n bytecodeHex = \"!\";\n }\n if (bytecodeHex.substring(0, 2) !== \"0x\") {\n bytecodeHex = \"0x\" + bytecodeHex;\n }\n if (!(0, bytes_1.isHexString)(bytecodeHex) || bytecodeHex.length % 2) {\n logger.throwArgumentError(\"invalid bytecode\", \"bytecode\", bytecode);\n }\n if (signer && !abstract_signer_1.Signer.isSigner(signer)) {\n logger.throwArgumentError(\"invalid signer\", \"signer\", signer);\n }\n (0, properties_1.defineReadOnly)(this, \"bytecode\", bytecodeHex);\n (0, properties_1.defineReadOnly)(this, \"interface\", (0, properties_1.getStatic)(_newTarget, \"getInterface\")(contractInterface));\n (0, properties_1.defineReadOnly)(this, \"signer\", signer || null);\n }\n ContractFactory2.prototype.getDeployTransaction = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var tx = {};\n if (args.length === this.interface.deploy.inputs.length + 1 && typeof args[args.length - 1] === \"object\") {\n tx = (0, properties_1.shallowCopy)(args.pop());\n for (var key in tx) {\n if (!allowedTransactionKeys[key]) {\n throw new Error(\"unknown transaction override \" + key);\n }\n }\n }\n [\"data\", \"from\", \"to\"].forEach(function(key2) {\n if (tx[key2] == null) {\n return;\n }\n logger.throwError(\"cannot override \" + key2, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: key2 });\n });\n if (tx.value) {\n var value = bignumber_1.BigNumber.from(tx.value);\n if (!value.isZero() && !this.interface.deploy.payable) {\n logger.throwError(\"non-payable constructor cannot override value\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: tx.value\n });\n }\n }\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n tx.data = (0, bytes_1.hexlify)((0, bytes_1.concat)([\n this.bytecode,\n this.interface.encodeDeploy(args)\n ]));\n return tx;\n };\n ContractFactory2.prototype.deploy = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter4(this, void 0, void 0, function() {\n var overrides, params, unsignedTx, tx, address, contract;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n overrides = {};\n if (args.length === this.interface.deploy.inputs.length + 1) {\n overrides = args.pop();\n }\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n return [4, resolveAddresses(this.signer, args, this.interface.deploy.inputs)];\n case 1:\n params = _a.sent();\n params.push(overrides);\n unsignedTx = this.getDeployTransaction.apply(this, params);\n return [4, this.signer.sendTransaction(unsignedTx)];\n case 2:\n tx = _a.sent();\n address = (0, properties_1.getStatic)(this.constructor, \"getContractAddress\")(tx);\n contract = (0, properties_1.getStatic)(this.constructor, \"getContract\")(address, this.interface, this.signer);\n addContractWait(contract, tx);\n (0, properties_1.defineReadOnly)(contract, \"deployTransaction\", tx);\n return [2, contract];\n }\n });\n });\n };\n ContractFactory2.prototype.attach = function(address) {\n return this.constructor.getContract(address, this.interface, this.signer);\n };\n ContractFactory2.prototype.connect = function(signer) {\n return new this.constructor(this.interface, this.bytecode, signer);\n };\n ContractFactory2.fromSolidity = function(compilerOutput, signer) {\n if (compilerOutput == null) {\n logger.throwError(\"missing compiler output\", logger_1.Logger.errors.MISSING_ARGUMENT, { argument: \"compilerOutput\" });\n }\n if (typeof compilerOutput === \"string\") {\n compilerOutput = JSON.parse(compilerOutput);\n }\n var abi2 = compilerOutput.abi;\n var bytecode = null;\n if (compilerOutput.bytecode) {\n bytecode = compilerOutput.bytecode;\n } else if (compilerOutput.evm && compilerOutput.evm.bytecode) {\n bytecode = compilerOutput.evm.bytecode;\n }\n return new this(abi2, bytecode, signer);\n };\n ContractFactory2.getInterface = function(contractInterface) {\n return Contract.getInterface(contractInterface);\n };\n ContractFactory2.getContractAddress = function(tx) {\n return (0, address_1.getContractAddress)(tx);\n };\n ContractFactory2.getContract = function(address, contractInterface, signer) {\n return new Contract(address, contractInterface, signer);\n };\n return ContractFactory2;\n }()\n );\n exports3.ContractFactory = ContractFactory;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+basex@5.8.0/node_modules/@ethersproject/basex/lib/index.js\n var require_lib19 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+basex@5.8.0/node_modules/@ethersproject/basex/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Base58 = exports3.Base32 = exports3.BaseX = void 0;\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var BaseX = (\n /** @class */\n function() {\n function BaseX2(alphabet2) {\n (0, properties_1.defineReadOnly)(this, \"alphabet\", alphabet2);\n (0, properties_1.defineReadOnly)(this, \"base\", alphabet2.length);\n (0, properties_1.defineReadOnly)(this, \"_alphabetMap\", {});\n (0, properties_1.defineReadOnly)(this, \"_leader\", alphabet2.charAt(0));\n for (var i3 = 0; i3 < alphabet2.length; i3++) {\n this._alphabetMap[alphabet2.charAt(i3)] = i3;\n }\n }\n BaseX2.prototype.encode = function(value) {\n var source = (0, bytes_1.arrayify)(value);\n if (source.length === 0) {\n return \"\";\n }\n var digits = [0];\n for (var i3 = 0; i3 < source.length; ++i3) {\n var carry = source[i3];\n for (var j2 = 0; j2 < digits.length; ++j2) {\n carry += digits[j2] << 8;\n digits[j2] = carry % this.base;\n carry = carry / this.base | 0;\n }\n while (carry > 0) {\n digits.push(carry % this.base);\n carry = carry / this.base | 0;\n }\n }\n var string = \"\";\n for (var k4 = 0; source[k4] === 0 && k4 < source.length - 1; ++k4) {\n string += this._leader;\n }\n for (var q3 = digits.length - 1; q3 >= 0; --q3) {\n string += this.alphabet[digits[q3]];\n }\n return string;\n };\n BaseX2.prototype.decode = function(value) {\n if (typeof value !== \"string\") {\n throw new TypeError(\"Expected String\");\n }\n var bytes = [];\n if (value.length === 0) {\n return new Uint8Array(bytes);\n }\n bytes.push(0);\n for (var i3 = 0; i3 < value.length; i3++) {\n var byte = this._alphabetMap[value[i3]];\n if (byte === void 0) {\n throw new Error(\"Non-base\" + this.base + \" character\");\n }\n var carry = byte;\n for (var j2 = 0; j2 < bytes.length; ++j2) {\n carry += bytes[j2] * this.base;\n bytes[j2] = carry & 255;\n carry >>= 8;\n }\n while (carry > 0) {\n bytes.push(carry & 255);\n carry >>= 8;\n }\n }\n for (var k4 = 0; value[k4] === this._leader && k4 < value.length - 1; ++k4) {\n bytes.push(0);\n }\n return (0, bytes_1.arrayify)(new Uint8Array(bytes.reverse()));\n };\n return BaseX2;\n }()\n );\n exports3.BaseX = BaseX;\n var Base32 = new BaseX(\"abcdefghijklmnopqrstuvwxyz234567\");\n exports3.Base32 = Base32;\n var Base58 = new BaseX(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\");\n exports3.Base58 = Base58;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/types.js\n var require_types3 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/types.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SupportedAlgorithm = void 0;\n var SupportedAlgorithm;\n (function(SupportedAlgorithm2) {\n SupportedAlgorithm2[\"sha256\"] = \"sha256\";\n SupportedAlgorithm2[\"sha512\"] = \"sha512\";\n })(SupportedAlgorithm = exports3.SupportedAlgorithm || (exports3.SupportedAlgorithm = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/_version.js\n var require_version15 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"sha2/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/browser-sha2.js\n var require_browser_sha2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/browser-sha2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.computeHmac = exports3.sha512 = exports3.sha256 = exports3.ripemd160 = void 0;\n var hash_js_1 = __importDefault4(require_hash());\n var bytes_1 = require_lib2();\n var types_1 = require_types3();\n var logger_1 = require_lib();\n var _version_1 = require_version15();\n var logger = new logger_1.Logger(_version_1.version);\n function ripemd1602(data) {\n return \"0x\" + hash_js_1.default.ripemd160().update((0, bytes_1.arrayify)(data)).digest(\"hex\");\n }\n exports3.ripemd160 = ripemd1602;\n function sha2565(data) {\n return \"0x\" + hash_js_1.default.sha256().update((0, bytes_1.arrayify)(data)).digest(\"hex\");\n }\n exports3.sha256 = sha2565;\n function sha5122(data) {\n return \"0x\" + hash_js_1.default.sha512().update((0, bytes_1.arrayify)(data)).digest(\"hex\");\n }\n exports3.sha512 = sha5122;\n function computeHmac(algorithm, key, data) {\n if (!types_1.SupportedAlgorithm[algorithm]) {\n logger.throwError(\"unsupported algorithm \" + algorithm, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"hmac\",\n algorithm\n });\n }\n return \"0x\" + hash_js_1.default.hmac(hash_js_1.default[algorithm], (0, bytes_1.arrayify)(key)).update((0, bytes_1.arrayify)(data)).digest(\"hex\");\n }\n exports3.computeHmac = computeHmac;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/index.js\n var require_lib20 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SupportedAlgorithm = exports3.sha512 = exports3.sha256 = exports3.ripemd160 = exports3.computeHmac = void 0;\n var sha2_1 = require_browser_sha2();\n Object.defineProperty(exports3, \"computeHmac\", { enumerable: true, get: function() {\n return sha2_1.computeHmac;\n } });\n Object.defineProperty(exports3, \"ripemd160\", { enumerable: true, get: function() {\n return sha2_1.ripemd160;\n } });\n Object.defineProperty(exports3, \"sha256\", { enumerable: true, get: function() {\n return sha2_1.sha256;\n } });\n Object.defineProperty(exports3, \"sha512\", { enumerable: true, get: function() {\n return sha2_1.sha512;\n } });\n var types_1 = require_types3();\n Object.defineProperty(exports3, \"SupportedAlgorithm\", { enumerable: true, get: function() {\n return types_1.SupportedAlgorithm;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+pbkdf2@5.8.0/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.js\n var require_browser_pbkdf2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+pbkdf2@5.8.0/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pbkdf2 = void 0;\n var bytes_1 = require_lib2();\n var sha2_1 = require_lib20();\n function pbkdf22(password, salt, iterations, keylen, hashAlgorithm) {\n password = (0, bytes_1.arrayify)(password);\n salt = (0, bytes_1.arrayify)(salt);\n var hLen;\n var l6 = 1;\n var DK = new Uint8Array(keylen);\n var block1 = new Uint8Array(salt.length + 4);\n block1.set(salt);\n var r2;\n var T4;\n for (var i3 = 1; i3 <= l6; i3++) {\n block1[salt.length] = i3 >> 24 & 255;\n block1[salt.length + 1] = i3 >> 16 & 255;\n block1[salt.length + 2] = i3 >> 8 & 255;\n block1[salt.length + 3] = i3 & 255;\n var U4 = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(hashAlgorithm, password, block1));\n if (!hLen) {\n hLen = U4.length;\n T4 = new Uint8Array(hLen);\n l6 = Math.ceil(keylen / hLen);\n r2 = keylen - (l6 - 1) * hLen;\n }\n T4.set(U4);\n for (var j2 = 1; j2 < iterations; j2++) {\n U4 = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(hashAlgorithm, password, U4));\n for (var k4 = 0; k4 < hLen; k4++)\n T4[k4] ^= U4[k4];\n }\n var destPos = (i3 - 1) * hLen;\n var len = i3 === l6 ? r2 : hLen;\n DK.set((0, bytes_1.arrayify)(T4).slice(0, len), destPos);\n }\n return (0, bytes_1.hexlify)(DK);\n }\n exports3.pbkdf2 = pbkdf22;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+pbkdf2@5.8.0/node_modules/@ethersproject/pbkdf2/lib/index.js\n var require_lib21 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+pbkdf2@5.8.0/node_modules/@ethersproject/pbkdf2/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pbkdf2 = void 0;\n var pbkdf2_1 = require_browser_pbkdf2();\n Object.defineProperty(exports3, \"pbkdf2\", { enumerable: true, get: function() {\n return pbkdf2_1.pbkdf2;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/_version.js\n var require_version16 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"wordlists/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/wordlist.js\n var require_wordlist = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/wordlist.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wordlist = exports3.logger = void 0;\n var exportWordlist = false;\n var hash_1 = require_lib12();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version16();\n exports3.logger = new logger_1.Logger(_version_1.version);\n var Wordlist = (\n /** @class */\n function() {\n function Wordlist2(locale) {\n var _newTarget = this.constructor;\n exports3.logger.checkAbstract(_newTarget, Wordlist2);\n (0, properties_1.defineReadOnly)(this, \"locale\", locale);\n }\n Wordlist2.prototype.split = function(mnemonic) {\n return mnemonic.toLowerCase().split(/ +/g);\n };\n Wordlist2.prototype.join = function(words) {\n return words.join(\" \");\n };\n Wordlist2.check = function(wordlist) {\n var words = [];\n for (var i3 = 0; i3 < 2048; i3++) {\n var word = wordlist.getWord(i3);\n if (i3 !== wordlist.getWordIndex(word)) {\n return \"0x\";\n }\n words.push(word);\n }\n return (0, hash_1.id)(words.join(\"\\n\") + \"\\n\");\n };\n Wordlist2.register = function(lang, name) {\n if (!name) {\n name = lang.locale;\n }\n if (exportWordlist) {\n try {\n var anyGlobal = window;\n if (anyGlobal._ethers && anyGlobal._ethers.wordlists) {\n if (!anyGlobal._ethers.wordlists[name]) {\n (0, properties_1.defineReadOnly)(anyGlobal._ethers.wordlists, name, lang);\n }\n }\n } catch (error) {\n }\n }\n };\n return Wordlist2;\n }()\n );\n exports3.Wordlist = Wordlist;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-cz.js\n var require_lang_cz = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-cz.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langCz = void 0;\n var wordlist_1 = require_wordlist();\n var words = \"AbdikaceAbecedaAdresaAgreseAkceAktovkaAlejAlkoholAmputaceAnanasAndulkaAnekdotaAnketaAntikaAnulovatArchaAroganceAsfaltAsistentAspiraceAstmaAstronomAtlasAtletikaAtolAutobusAzylBabkaBachorBacilBaculkaBadatelBagetaBagrBahnoBakterieBaladaBaletkaBalkonBalonekBalvanBalzaBambusBankomatBarbarBaretBarmanBarokoBarvaBaterkaBatohBavlnaBazalkaBazilikaBazukaBednaBeranBesedaBestieBetonBezinkaBezmocBeztakBicyklBidloBiftekBikinyBilanceBiografBiologBitvaBizonBlahobytBlatouchBlechaBleduleBleskBlikatBliznaBlokovatBlouditBludBobekBobrBodlinaBodnoutBohatostBojkotBojovatBokorysBolestBorecBoroviceBotaBoubelBouchatBoudaBouleBouratBoxerBradavkaBramboraBrankaBratrBreptaBriketaBrkoBrlohBronzBroskevBrunetkaBrusinkaBrzdaBrzyBublinaBubnovatBuchtaBuditelBudkaBudovaBufetBujarostBukviceBuldokBulvaBundaBunkrBurzaButikBuvolBuzolaBydletBylinaBytovkaBzukotCapartCarevnaCedrCeduleCejchCejnCelaCelerCelkemCelniceCeninaCennostCenovkaCentrumCenzorCestopisCetkaChalupaChapadloCharitaChataChechtatChemieChichotChirurgChladChlebaChlubitChmelChmuraChobotChocholChodbaCholeraChomoutChopitChorobaChovChrapotChrlitChrtChrupChtivostChudinaChutnatChvatChvilkaChvostChybaChystatChytitCibuleCigaretaCihelnaCihlaCinkotCirkusCisternaCitaceCitrusCizinecCizostClonaCokolivCouvatCtitelCtnostCudnostCuketaCukrCupotCvaknoutCvalCvikCvrkotCyklistaDalekoDarebaDatelDatumDceraDebataDechovkaDecibelDeficitDeflaceDeklDekretDemokratDepreseDerbyDeskaDetektivDikobrazDiktovatDiodaDiplomDiskDisplejDivadloDivochDlahaDlouhoDluhopisDnesDobroDobytekDocentDochutitDodnesDohledDohodaDohraDojemDojniceDokladDokolaDoktorDokumentDolarDolevaDolinaDomaDominantDomluvitDomovDonutitDopadDopisDoplnitDoposudDoprovodDopustitDorazitDorostDortDosahDoslovDostatekDosudDosytaDotazDotekDotknoutDoufatDoutnatDovozceDozaduDoznatDozorceDrahotaDrakDramatikDravecDrazeDrdolDrobnostDrogerieDrozdDrsnostDrtitDrzostDubenDuchovnoDudekDuhaDuhovkaDusitDusnoDutostDvojiceDvorecDynamitEkologEkonomieElektronElipsaEmailEmiseEmoceEmpatieEpizodaEpochaEpopejEposEsejEsenceEskortaEskymoEtiketaEuforieEvoluceExekuceExkurzeExpediceExplozeExportExtraktFackaFajfkaFakultaFanatikFantazieFarmacieFavoritFazoleFederaceFejetonFenkaFialkaFigurantFilozofFiltrFinanceFintaFixaceFjordFlanelFlirtFlotilaFondFosforFotbalFotkaFotonFrakceFreskaFrontaFukarFunkceFyzikaGalejeGarantGenetikaGeologGilotinaGlazuraGlejtGolemGolfistaGotikaGrafGramofonGranuleGrepGrilGrogGroteskaGumaHadiceHadrHalaHalenkaHanbaHanopisHarfaHarpunaHavranHebkostHejkalHejnoHejtmanHektarHelmaHematomHerecHernaHesloHezkyHistorikHladovkaHlasivkyHlavaHledatHlenHlodavecHlohHloupostHltatHlubinaHluchotaHmatHmotaHmyzHnisHnojivoHnoutHoblinaHobojHochHodinyHodlatHodnotaHodovatHojnostHokejHolinkaHolkaHolubHomoleHonitbaHonoraceHoralHordaHorizontHorkoHorlivecHormonHorninaHoroskopHorstvoHospodaHostinaHotovostHoubaHoufHoupatHouskaHovorHradbaHraniceHravostHrazdaHrbolekHrdinaHrdloHrdostHrnekHrobkaHromadaHrotHroudaHrozenHrstkaHrubostHryzatHubenostHubnoutHudbaHukotHumrHusitaHustotaHvozdHybnostHydrantHygienaHymnaHysterikIdylkaIhnedIkonaIluzeImunitaInfekceInflaceInkasoInovaceInspekceInternetInvalidaInvestorInzerceIronieJablkoJachtaJahodaJakmileJakostJalovecJantarJarmarkJaroJasanJasnoJatkaJavorJazykJedinecJedleJednatelJehlanJekotJelenJelitoJemnostJenomJepiceJeseterJevitJezdecJezeroJinakJindyJinochJiskraJistotaJitrniceJizvaJmenovatJogurtJurtaKabaretKabelKabinetKachnaKadetKadidloKahanKajakKajutaKakaoKaktusKalamitaKalhotyKalibrKalnostKameraKamkolivKamnaKanibalKanoeKantorKapalinaKapelaKapitolaKapkaKapleKapotaKaprKapustaKapybaraKaramelKarotkaKartonKasaKatalogKatedraKauceKauzaKavalecKazajkaKazetaKazivostKdekolivKdesiKedlubenKempKeramikaKinoKlacekKladivoKlamKlapotKlasikaKlaunKlecKlenbaKlepatKlesnoutKlidKlimaKlisnaKloboukKlokanKlopaKloubKlubovnaKlusatKluzkostKmenKmitatKmotrKnihaKnotKoaliceKoberecKobkaKoblihaKobylaKocourKohoutKojenecKokosKoktejlKolapsKoledaKolizeKoloKomandoKometaKomikKomnataKomoraKompasKomunitaKonatKonceptKondiceKonecKonfeseKongresKoninaKonkursKontaktKonzervaKopanecKopieKopnoutKoprovkaKorbelKorektorKormidloKoroptevKorpusKorunaKorytoKorzetKosatecKostkaKotelKotletaKotoulKoukatKoupelnaKousekKouzloKovbojKozaKozorohKrabiceKrachKrajinaKralovatKrasopisKravataKreditKrejcarKresbaKrevetaKriketKritikKrizeKrkavecKrmelecKrmivoKrocanKrokKronikaKropitKroupaKrovkaKrtekKruhadloKrupiceKrutostKrvinkaKrychleKryptaKrystalKrytKudlankaKufrKujnostKuklaKulajdaKulichKulkaKulometKulturaKunaKupodivuKurtKurzorKutilKvalitaKvasinkaKvestorKynologKyselinaKytaraKyticeKytkaKytovecKyvadloLabradorLachtanLadnostLaikLakomecLamelaLampaLanovkaLasiceLasoLasturaLatinkaLavinaLebkaLeckdyLedenLedniceLedovkaLedvinaLegendaLegieLegraceLehceLehkostLehnoutLektvarLenochodLentilkaLepenkaLepidloLetadloLetecLetmoLetokruhLevhartLevitaceLevobokLibraLichotkaLidojedLidskostLihovinaLijavecLilekLimetkaLinieLinkaLinoleumListopadLitinaLitovatLobistaLodivodLogikaLogopedLokalitaLoketLomcovatLopataLopuchLordLososLotrLoudalLouhLoukaLouskatLovecLstivostLucernaLuciferLumpLuskLustraceLviceLyraLyrikaLysinaMadamMadloMagistrMahagonMajetekMajitelMajoritaMakakMakoviceMakrelaMalbaMalinaMalovatMalviceMaminkaMandleMankoMarnostMasakrMaskotMasopustMaticeMatrikaMaturitaMazanecMazivoMazlitMazurkaMdlobaMechanikMeditaceMedovinaMelasaMelounMentolkaMetlaMetodaMetrMezeraMigraceMihnoutMihuleMikinaMikrofonMilenecMilimetrMilostMimikaMincovnaMinibarMinometMinulostMiskaMistrMixovatMladostMlhaMlhovinaMlokMlsatMluvitMnichMnohemMobilMocnostModelkaModlitbaMohylaMokroMolekulaMomentkaMonarchaMonoklMonstrumMontovatMonzunMosazMoskytMostMotivaceMotorkaMotykaMouchaMoudrostMozaikaMozekMozolMramorMravenecMrkevMrtvolaMrzetMrzutostMstitelMudrcMuflonMulatMumieMuniceMusetMutaceMuzeumMuzikantMyslivecMzdaNabouratNachytatNadaceNadbytekNadhozNadobroNadpisNahlasNahnatNahodileNahraditNaivitaNajednouNajistoNajmoutNaklonitNakonecNakrmitNalevoNamazatNamluvitNanometrNaokoNaopakNaostroNapadatNapevnoNaplnitNapnoutNaposledNaprostoNaroditNarubyNarychloNasaditNasekatNaslepoNastatNatolikNavenekNavrchNavzdoryNazvatNebeNechatNeckyNedalekoNedbatNeduhNegaceNehetNehodaNejenNejprveNeklidNelibostNemilostNemocNeochotaNeonkaNepokojNerostNervNesmyslNesouladNetvorNeuronNevinaNezvykleNicotaNijakNikamNikdyNiklNikterakNitroNoclehNohaviceNominaceNoraNorekNositelNosnostNouzeNovinyNovotaNozdraNudaNudleNugetNutitNutnostNutrieNymfaObalObarvitObavaObdivObecObehnatObejmoutObezitaObhajobaObilniceObjasnitObjektObklopitOblastOblekOblibaOblohaObludaObnosObohatitObojekOboutObrazecObrnaObrubaObrysObsahObsluhaObstaratObuvObvazObvinitObvodObvykleObyvatelObzorOcasOcelOcenitOchladitOchotaOchranaOcitnoutOdbojOdbytOdchodOdcizitOdebratOdeslatOdevzdatOdezvaOdhadceOdhoditOdjetOdjinudOdkazOdkoupitOdlivOdlukaOdmlkaOdolnostOdpadOdpisOdploutOdporOdpustitOdpykatOdrazkaOdsouditOdstupOdsunOdtokOdtudOdvahaOdvetaOdvolatOdvracetOdznakOfinaOfsajdOhlasOhniskoOhradaOhrozitOhryzekOkapOkeniceOklikaOknoOkouzlitOkovyOkrasaOkresOkrsekOkruhOkupantOkurkaOkusitOlejninaOlizovatOmakOmeletaOmezitOmladinaOmlouvatOmluvaOmylOnehdyOpakovatOpasekOperaceOpiceOpilostOpisovatOporaOpoziceOpravduOprotiOrbitalOrchestrOrgieOrliceOrlojOrtelOsadaOschnoutOsikaOsivoOslavaOslepitOslnitOslovitOsnovaOsobaOsolitOspalecOstenOstrahaOstudaOstychOsvojitOteplitOtiskOtopOtrhatOtrlostOtrokOtrubyOtvorOvanoutOvarOvesOvlivnitOvoceOxidOzdobaPachatelPacientPadouchPahorekPaktPalandaPalecPalivoPalubaPamfletPamlsekPanenkaPanikaPannaPanovatPanstvoPantoflePaprikaParketaParodiePartaParukaParybaPasekaPasivitaPastelkaPatentPatronaPavoukPaznehtPazourekPeckaPedagogPejsekPekloPelotonPenaltaPendrekPenzePeriskopPeroPestrostPetardaPeticePetrolejPevninaPexesoPianistaPihaPijavicePiklePiknikPilinaPilnostPilulkaPinzetaPipetaPisatelPistolePitevnaPivnicePivovarPlacentaPlakatPlamenPlanetaPlastikaPlatitPlavidloPlazPlechPlemenoPlentaPlesPletivoPlevelPlivatPlnitPlnoPlochaPlodinaPlombaPloutPlukPlynPobavitPobytPochodPocitPoctivecPodatPodcenitPodepsatPodhledPodivitPodkladPodmanitPodnikPodobaPodporaPodrazPodstataPodvodPodzimPoeziePohankaPohnutkaPohovorPohromaPohybPointaPojistkaPojmoutPokazitPoklesPokojPokrokPokutaPokynPolednePolibekPolknoutPolohaPolynomPomaluPominoutPomlkaPomocPomstaPomysletPonechatPonorkaPonurostPopadatPopelPopisekPoplachPoprositPopsatPopudPoradcePorcePorodPoruchaPoryvPosaditPosedPosilaPoskokPoslanecPosouditPospoluPostavaPosudekPosypPotahPotkanPotleskPotomekPotravaPotupaPotvoraPoukazPoutoPouzdroPovahaPovidlaPovlakPovozPovrchPovstatPovykPovzdechPozdravPozemekPoznatekPozorPozvatPracovatPrahoryPraktikaPralesPraotecPraporekPrasePravdaPrincipPrknoProbuditProcentoProdejProfeseProhraProjektProlomitPromilePronikatPropadProrokProsbaProtonProutekProvazPrskavkaPrstenPrudkostPrutPrvekPrvohoryPsanecPsovodPstruhPtactvoPubertaPuchPudlPukavecPuklinaPukrlePultPumpaPuncPupenPusaPusinkaPustinaPutovatPutykaPyramidaPyskPytelRacekRachotRadiaceRadniceRadonRaftRagbyRaketaRakovinaRamenoRampouchRandeRarachRaritaRasovnaRastrRatolestRazanceRazidloReagovatReakceReceptRedaktorReferentReflexRejnokReklamaRekordRekrutRektorReputaceRevizeRevmaRevolverRezervaRiskovatRizikoRobotikaRodokmenRohovkaRokleRokokoRomanetoRopovodRopuchaRorejsRosolRostlinaRotmistrRotopedRotundaRoubenkaRouchoRoupRouraRovinaRovniceRozborRozchodRozdatRozeznatRozhodceRozinkaRozjezdRozkazRozlohaRozmarRozpadRozruchRozsahRoztokRozumRozvodRubrikaRuchadloRukaviceRukopisRybaRybolovRychlostRydloRypadloRytinaRyzostSadistaSahatSakoSamecSamizdatSamotaSanitkaSardinkaSasankaSatelitSazbaSazeniceSborSchovatSebrankaSeceseSedadloSedimentSedloSehnatSejmoutSekeraSektaSekundaSekvojeSemenoSenoServisSesaditSeshoraSeskokSeslatSestraSesuvSesypatSetbaSetinaSetkatSetnoutSetrvatSeverSeznamShodaShrnoutSifonSilniceSirkaSirotekSirupSituaceSkafandrSkaliskoSkanzenSkautSkeptikSkicaSkladbaSkleniceSkloSkluzSkobaSkokanSkoroSkriptaSkrzSkupinaSkvostSkvrnaSlabikaSladidloSlaninaSlastSlavnostSledovatSlepecSlevaSlezinaSlibSlinaSlizniceSlonSloupekSlovoSluchSluhaSlunceSlupkaSlzaSmaragdSmetanaSmilstvoSmlouvaSmogSmradSmrkSmrtkaSmutekSmyslSnadSnahaSnobSobotaSochaSodovkaSokolSopkaSotvaSoubojSoucitSoudceSouhlasSouladSoumrakSoupravaSousedSoutokSouvisetSpalovnaSpasitelSpisSplavSpodekSpojenecSpoluSponzorSpornostSpoustaSprchaSpustitSrandaSrazSrdceSrnaSrnecSrovnatSrpenSrstSrubStaniceStarostaStatikaStavbaStehnoStezkaStodolaStolekStopaStornoStoupatStrachStresStrhnoutStromStrunaStudnaStupniceStvolStykSubjektSubtropySucharSudostSuknoSundatSunoutSurikataSurovinaSvahSvalstvoSvetrSvatbaSvazekSvisleSvitekSvobodaSvodidloSvorkaSvrabSykavkaSykotSynekSynovecSypatSypkostSyrovostSyselSytostTabletkaTabuleTahounTajemnoTajfunTajgaTajitTajnostTaktikaTamhleTamponTancovatTanecTankerTapetaTaveninaTazatelTechnikaTehdyTekutinaTelefonTemnotaTendenceTenistaTenorTeplotaTepnaTeprveTerapieTermoskaTextilTichoTiskopisTitulekTkadlecTkaninaTlapkaTleskatTlukotTlupaTmelToaletaTopinkaTopolTorzoTouhaToulecTradiceTraktorTrampTrasaTraverzaTrefitTrestTrezorTrhavinaTrhlinaTrochuTrojiceTroskaTroubaTrpceTrpitelTrpkostTrubecTruchlitTruhliceTrusTrvatTudyTuhnoutTuhostTundraTuristaTurnajTuzemskoTvarohTvorbaTvrdostTvrzTygrTykevUbohostUbozeUbratUbrousekUbrusUbytovnaUchoUctivostUdivitUhraditUjednatUjistitUjmoutUkazatelUklidnitUklonitUkotvitUkrojitUliceUlitaUlovitUmyvadloUnavitUniformaUniknoutUpadnoutUplatnitUplynoutUpoutatUpravitUranUrazitUsednoutUsilovatUsmrtitUsnadnitUsnoutUsouditUstlatUstrnoutUtahovatUtkatUtlumitUtonoutUtopenecUtrousitUvalitUvolnitUvozovkaUzdravitUzelUzeninaUzlinaUznatVagonValchaValounVanaVandalVanilkaVaranVarhanyVarovatVcelkuVchodVdovaVedroVegetaceVejceVelbloudVeletrhVelitelVelmocVelrybaVenkovVerandaVerzeVeselkaVeskrzeVesniceVespoduVestaVeterinaVeverkaVibraceVichrVideohraVidinaVidleVilaViniceVisetVitalitaVizeVizitkaVjezdVkladVkusVlajkaVlakVlasecVlevoVlhkostVlivVlnovkaVloupatVnucovatVnukVodaVodivostVodoznakVodstvoVojenskyVojnaVojskoVolantVolbaVolitVolnoVoskovkaVozidloVozovnaVpravoVrabecVracetVrahVrataVrbaVrcholekVrhatVrstvaVrtuleVsaditVstoupitVstupVtipVybavitVybratVychovatVydatVydraVyfotitVyhledatVyhnoutVyhoditVyhraditVyhubitVyjasnitVyjetVyjmoutVyklopitVykonatVylekatVymazatVymezitVymizetVymysletVynechatVynikatVynutitVypadatVyplatitVypravitVypustitVyrazitVyrovnatVyrvatVyslovitVysokoVystavitVysunoutVysypatVytasitVytesatVytratitVyvinoutVyvolatVyvrhelVyzdobitVyznatVzaduVzbuditVzchopitVzdorVzduchVzdychatVzestupVzhledemVzkazVzlykatVznikVzorekVzpouraVztahVztekXylofonZabratZabydletZachovatZadarmoZadusitZafoukatZahltitZahoditZahradaZahynoutZajatecZajetZajistitZaklepatZakoupitZalepitZamezitZamotatZamysletZanechatZanikatZaplatitZapojitZapsatZarazitZastavitZasunoutZatajitZatemnitZatknoutZaujmoutZavalitZaveletZavinitZavolatZavrtatZazvonitZbavitZbrusuZbudovatZbytekZdalekaZdarmaZdatnostZdivoZdobitZdrojZdvihZdymadloZeleninaZemanZeminaZeptatZezaduZezdolaZhatitZhltnoutZhlubokaZhotovitZhrubaZimaZimniceZjemnitZklamatZkoumatZkratkaZkumavkaZlatoZlehkaZlobaZlomZlostZlozvykZmapovatZmarZmatekZmijeZmizetZmocnitZmodratZmrzlinaZmutovatZnakZnalostZnamenatZnovuZobrazitZotavitZoubekZoufaleZploditZpomalitZpravaZprostitZprudkaZprvuZradaZranitZrcadloZrnitostZrnoZrovnaZrychlitZrzavostZtichaZtratitZubovinaZubrZvednoutZvenkuZveselaZvonZvratZvukovodZvyk\";\n var wordlist = null;\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \");\n if (wordlist_1.Wordlist.check(lang) !== \"0x25f44555f4af25b51a711136e1c7d6e50ce9f8917d39d6b1f076b2bb4d2fac1a\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for en (English) FAILED\");\n }\n }\n var LangCz = (\n /** @class */\n function(_super) {\n __extends4(LangCz2, _super);\n function LangCz2() {\n return _super.call(this, \"cz\") || this;\n }\n LangCz2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangCz2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n return LangCz2;\n }(wordlist_1.Wordlist)\n );\n var langCz = new LangCz();\n exports3.langCz = langCz;\n wordlist_1.Wordlist.register(langCz);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-en.js\n var require_lang_en = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-en.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langEn = void 0;\n var wordlist_1 = require_wordlist();\n var words = \"AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo\";\n var wordlist = null;\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \");\n if (wordlist_1.Wordlist.check(lang) !== \"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for en (English) FAILED\");\n }\n }\n var LangEn = (\n /** @class */\n function(_super) {\n __extends4(LangEn2, _super);\n function LangEn2() {\n return _super.call(this, \"en\") || this;\n }\n LangEn2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangEn2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n return LangEn2;\n }(wordlist_1.Wordlist)\n );\n var langEn = new LangEn();\n exports3.langEn = langEn;\n wordlist_1.Wordlist.register(langEn);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-es.js\n var require_lang_es = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-es.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langEs = void 0;\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var words = \"A/bacoAbdomenAbejaAbiertoAbogadoAbonoAbortoAbrazoAbrirAbueloAbusoAcabarAcademiaAccesoAccio/nAceiteAcelgaAcentoAceptarA/cidoAclararAcne/AcogerAcosoActivoActoActrizActuarAcudirAcuerdoAcusarAdictoAdmitirAdoptarAdornoAduanaAdultoAe/reoAfectarAficio/nAfinarAfirmarA/gilAgitarAgoni/aAgostoAgotarAgregarAgrioAguaAgudoA/guilaAgujaAhogoAhorroAireAislarAjedrezAjenoAjusteAlacra/nAlambreAlarmaAlbaA/lbumAlcaldeAldeaAlegreAlejarAlertaAletaAlfilerAlgaAlgodo/nAliadoAlientoAlivioAlmaAlmejaAlmi/barAltarAltezaAltivoAltoAlturaAlumnoAlzarAmableAmanteAmapolaAmargoAmasarA/mbarA/mbitoAmenoAmigoAmistadAmorAmparoAmplioAnchoAncianoAnclaAndarAnde/nAnemiaA/nguloAnilloA/nimoAni/sAnotarAntenaAntiguoAntojoAnualAnularAnuncioA~adirA~ejoA~oApagarAparatoApetitoApioAplicarApodoAporteApoyoAprenderAprobarApuestaApuroAradoAra~aArarA/rbitroA/rbolArbustoArchivoArcoArderArdillaArduoA/reaA/ridoAriesArmoni/aArne/sAromaArpaArpo/nArregloArrozArrugaArteArtistaAsaAsadoAsaltoAscensoAsegurarAseoAsesorAsientoAsiloAsistirAsnoAsombroA/speroAstillaAstroAstutoAsumirAsuntoAtajoAtaqueAtarAtentoAteoA/ticoAtletaA/tomoAtraerAtrozAtu/nAudazAudioAugeAulaAumentoAusenteAutorAvalAvanceAvaroAveAvellanaAvenaAvestruzAvio/nAvisoAyerAyudaAyunoAzafra/nAzarAzoteAzu/carAzufreAzulBabaBaborBacheBahi/aBaileBajarBalanzaBalco/nBaldeBambu/BancoBandaBa~oBarbaBarcoBarnizBarroBa/sculaBasto/nBasuraBatallaBateri/aBatirBatutaBau/lBazarBebe/BebidaBelloBesarBesoBestiaBichoBienBingoBlancoBloqueBlusaBoaBobinaBoboBocaBocinaBodaBodegaBoinaBolaBoleroBolsaBombaBondadBonitoBonoBonsa/iBordeBorrarBosqueBoteBoti/nBo/vedaBozalBravoBrazoBrechaBreveBrilloBrincoBrisaBrocaBromaBronceBroteBrujaBruscoBrutoBuceoBucleBuenoBueyBufandaBufo/nBu/hoBuitreBultoBurbujaBurlaBurroBuscarButacaBuzo/nCaballoCabezaCabinaCabraCacaoCada/verCadenaCaerCafe/Cai/daCaima/nCajaCajo/nCalCalamarCalcioCaldoCalidadCalleCalmaCalorCalvoCamaCambioCamelloCaminoCampoCa/ncerCandilCanelaCanguroCanicaCantoCa~aCa~o/nCaobaCaosCapazCapita/nCapoteCaptarCapuchaCaraCarbo/nCa/rcelCaretaCargaCari~oCarneCarpetaCarroCartaCasaCascoCaseroCaspaCastorCatorceCatreCaudalCausaCazoCebollaCederCedroCeldaCe/lebreCelosoCe/lulaCementoCenizaCentroCercaCerdoCerezaCeroCerrarCertezaCe/spedCetroChacalChalecoChampu/ChanclaChapaCharlaChicoChisteChivoChoqueChozaChuletaChuparCiclo/nCiegoCieloCienCiertoCifraCigarroCimaCincoCineCintaCipre/sCircoCiruelaCisneCitaCiudadClamorClanClaroClaseClaveClienteClimaCli/nicaCobreCoccio/nCochinoCocinaCocoCo/digoCodoCofreCogerCoheteCoji/nCojoColaColchaColegioColgarColinaCollarColmoColumnaCombateComerComidaCo/modoCompraCondeConejoCongaConocerConsejoContarCopaCopiaCorazo/nCorbataCorchoCordo/nCoronaCorrerCoserCosmosCostaCra/neoCra/terCrearCrecerCrei/doCremaCri/aCrimenCriptaCrisisCromoCro/nicaCroquetaCrudoCruzCuadroCuartoCuatroCuboCubrirCucharaCuelloCuentoCuerdaCuestaCuevaCuidarCulebraCulpaCultoCumbreCumplirCunaCunetaCuotaCupo/nCu/pulaCurarCuriosoCursoCurvaCutisDamaDanzaDarDardoDa/tilDeberDe/bilDe/cadaDecirDedoDefensaDefinirDejarDelfi/nDelgadoDelitoDemoraDensoDentalDeporteDerechoDerrotaDesayunoDeseoDesfileDesnudoDestinoDesvi/oDetalleDetenerDeudaDi/aDiabloDiademaDiamanteDianaDiarioDibujoDictarDienteDietaDiezDifi/cilDignoDilemaDiluirDineroDirectoDirigirDiscoDise~oDisfrazDivaDivinoDobleDoceDolorDomingoDonDonarDoradoDormirDorsoDosDosisDrago/nDrogaDuchaDudaDueloDue~oDulceDu/oDuqueDurarDurezaDuroE/banoEbrioEcharEcoEcuadorEdadEdicio/nEdificioEditorEducarEfectoEficazEjeEjemploElefanteElegirElementoElevarElipseE/liteElixirElogioEludirEmbudoEmitirEmocio/nEmpateEmpe~oEmpleoEmpresaEnanoEncargoEnchufeEnci/aEnemigoEneroEnfadoEnfermoEnga~oEnigmaEnlaceEnormeEnredoEnsayoEnse~arEnteroEntrarEnvaseEnvi/oE/pocaEquipoErizoEscalaEscenaEscolarEscribirEscudoEsenciaEsferaEsfuerzoEspadaEspejoEspi/aEsposaEspumaEsqui/EstarEsteEstiloEstufaEtapaEternoE/ticaEtniaEvadirEvaluarEventoEvitarExactoExamenExcesoExcusaExentoExigirExilioExistirE/xitoExpertoExplicarExponerExtremoFa/bricaFa/bulaFachadaFa/cilFactorFaenaFajaFaldaFalloFalsoFaltarFamaFamiliaFamosoFarao/nFarmaciaFarolFarsaFaseFatigaFaunaFavorFaxFebreroFechaFelizFeoFeriaFerozFe/rtilFervorFesti/nFiableFianzaFiarFibraFiccio/nFichaFideoFiebreFielFieraFiestaFiguraFijarFijoFilaFileteFilialFiltroFinFincaFingirFinitoFirmaFlacoFlautaFlechaFlorFlotaFluirFlujoFlu/orFobiaFocaFogataFogo/nFolioFolletoFondoFormaForroFortunaForzarFosaFotoFracasoFra/gilFranjaFraseFraudeFrei/rFrenoFresaFri/oFritoFrutaFuegoFuenteFuerzaFugaFumarFuncio/nFundaFurgo/nFuriaFusilFu/tbolFuturoGacelaGafasGaitaGajoGalaGaleri/aGalloGambaGanarGanchoGangaGansoGarajeGarzaGasolinaGastarGatoGavila/nGemeloGemirGenGe/neroGenioGenteGeranioGerenteGermenGestoGiganteGimnasioGirarGiroGlaciarGloboGloriaGolGolfoGolosoGolpeGomaGordoGorilaGorraGotaGoteoGozarGradaGra/ficoGranoGrasaGratisGraveGrietaGrilloGripeGrisGritoGrosorGru/aGruesoGrumoGrupoGuanteGuapoGuardiaGuerraGui/aGui~oGuionGuisoGuitarraGusanoGustarHaberHa/bilHablarHacerHachaHadaHallarHamacaHarinaHazHaza~aHebillaHebraHechoHeladoHelioHembraHerirHermanoHe/roeHervirHieloHierroHi/gadoHigieneHijoHimnoHistoriaHocicoHogarHogueraHojaHombreHongoHonorHonraHoraHormigaHornoHostilHoyoHuecoHuelgaHuertaHuesoHuevoHuidaHuirHumanoHu/medoHumildeHumoHundirHuraca/nHurtoIconoIdealIdiomaI/doloIglesiaIglu/IgualIlegalIlusio/nImagenIma/nImitarImparImperioImponerImpulsoIncapazI/ndiceInerteInfielInformeIngenioInicioInmensoInmuneInnatoInsectoInstanteIntere/sI/ntimoIntuirInu/tilInviernoIraIrisIroni/aIslaIsloteJabali/Jabo/nJamo/nJarabeJardi/nJarraJaulaJazmi/nJefeJeringaJineteJornadaJorobaJovenJoyaJuergaJuevesJuezJugadorJugoJugueteJuicioJuncoJunglaJunioJuntarJu/piterJurarJustoJuvenilJuzgarKiloKoalaLabioLacioLacraLadoLadro/nLagartoLa/grimaLagunaLaicoLamerLa/minaLa/mparaLanaLanchaLangostaLanzaLa/pizLargoLarvaLa/stimaLataLa/texLatirLaurelLavarLazoLealLeccio/nLecheLectorLeerLegio/nLegumbreLejanoLenguaLentoLe~aLeo/nLeopardoLesio/nLetalLetraLeveLeyendaLibertadLibroLicorLi/derLidiarLienzoLigaLigeroLimaLi/miteLimo/nLimpioLinceLindoLi/neaLingoteLinoLinternaLi/quidoLisoListaLiteraLitioLitroLlagaLlamaLlantoLlaveLlegarLlenarLlevarLlorarLloverLluviaLoboLocio/nLocoLocuraLo/gicaLogroLombrizLomoLonjaLoteLuchaLucirLugarLujoLunaLunesLupaLustroLutoLuzMacetaMachoMaderaMadreMaduroMaestroMafiaMagiaMagoMai/zMaldadMaletaMallaMaloMama/MamboMamutMancoMandoManejarMangaManiqui/ManjarManoMansoMantaMa~anaMapaMa/quinaMarMarcoMareaMarfilMargenMaridoMa/rmolMarro/nMartesMarzoMasaMa/scaraMasivoMatarMateriaMatizMatrizMa/ximoMayorMazorcaMechaMedallaMedioMe/dulaMejillaMejorMelenaMelo/nMemoriaMenorMensajeMenteMenu/MercadoMerengueMe/ritoMesMeso/nMetaMeterMe/todoMetroMezclaMiedoMielMiembroMigaMilMilagroMilitarMillo/nMimoMinaMineroMi/nimoMinutoMiopeMirarMisaMiseriaMisilMismoMitadMitoMochilaMocio/nModaModeloMohoMojarMoldeMolerMolinoMomentoMomiaMonarcaMonedaMonjaMontoMo~oMoradaMorderMorenoMorirMorroMorsaMortalMoscaMostrarMotivoMoverMo/vilMozoMuchoMudarMuebleMuelaMuerteMuestraMugreMujerMulaMuletaMultaMundoMu~ecaMuralMuroMu/sculoMuseoMusgoMu/sicaMusloNa/carNacio/nNadarNaipeNaranjaNarizNarrarNasalNatalNativoNaturalNa/useaNavalNaveNavidadNecioNe/ctarNegarNegocioNegroNeo/nNervioNetoNeutroNevarNeveraNichoNidoNieblaNietoNi~ezNi~oNi/tidoNivelNoblezaNocheNo/minaNoriaNormaNorteNotaNoticiaNovatoNovelaNovioNubeNucaNu/cleoNudilloNudoNueraNueveNuezNuloNu/meroNutriaOasisObesoObispoObjetoObraObreroObservarObtenerObvioOcaOcasoOce/anoOchentaOchoOcioOcreOctavoOctubreOcultoOcuparOcurrirOdiarOdioOdiseaOesteOfensaOfertaOficioOfrecerOgroOi/doOi/rOjoOlaOleadaOlfatoOlivoOllaOlmoOlorOlvidoOmbligoOndaOnzaOpacoOpcio/nO/peraOpinarOponerOptarO/pticaOpuestoOracio/nOradorOralO/rbitaOrcaOrdenOrejaO/rganoOrgi/aOrgulloOrienteOrigenOrillaOroOrquestaOrugaOsadi/aOscuroOseznoOsoOstraOto~oOtroOvejaO/vuloO/xidoOxi/genoOyenteOzonoPactoPadrePaellaPa/ginaPagoPai/sPa/jaroPalabraPalcoPaletaPa/lidoPalmaPalomaPalparPanPanalPa/nicoPanteraPa~ueloPapa/PapelPapillaPaquetePararParcelaParedParirParoPa/rpadoParquePa/rrafoPartePasarPaseoPasio/nPasoPastaPataPatioPatriaPausaPautaPavoPayasoPeato/nPecadoPeceraPechoPedalPedirPegarPeinePelarPelda~oPeleaPeligroPellejoPeloPelucaPenaPensarPe~o/nPeo/nPeorPepinoPeque~oPeraPerchaPerderPerezaPerfilPericoPerlaPermisoPerroPersonaPesaPescaPe/simoPesta~aPe/taloPetro/leoPezPezu~aPicarPicho/nPiePiedraPiernaPiezaPijamaPilarPilotoPimientaPinoPintorPinzaPi~aPiojoPipaPirataPisarPiscinaPisoPistaPito/nPizcaPlacaPlanPlataPlayaPlazaPleitoPlenoPlomoPlumaPluralPobrePocoPoderPodioPoemaPoesi/aPoetaPolenPolici/aPolloPolvoPomadaPomeloPomoPompaPonerPorcio/nPortalPosadaPoseerPosiblePostePotenciaPotroPozoPradoPrecozPreguntaPremioPrensaPresoPrevioPrimoPri/ncipePrisio/nPrivarProaProbarProcesoProductoProezaProfesorProgramaProlePromesaProntoPropioPro/ximoPruebaPu/blicoPucheroPudorPuebloPuertaPuestoPulgaPulirPulmo/nPulpoPulsoPumaPuntoPu~alPu~oPupaPupilaPure/QuedarQuejaQuemarQuererQuesoQuietoQui/micaQuinceQuitarRa/banoRabiaRaboRacio/nRadicalRai/zRamaRampaRanchoRangoRapazRa/pidoRaptoRasgoRaspaRatoRayoRazaRazo/nReaccio/nRealidadReba~oReboteRecaerRecetaRechazoRecogerRecreoRectoRecursoRedRedondoReducirReflejoReformaRefra/nRefugioRegaloRegirReglaRegresoRehe/nReinoRei/rRejaRelatoRelevoRelieveRellenoRelojRemarRemedioRemoRencorRendirRentaRepartoRepetirReposoReptilResRescateResinaRespetoRestoResumenRetiroRetornoRetratoReunirReve/sRevistaReyRezarRicoRiegoRiendaRiesgoRifaRi/gidoRigorRinco/nRi~o/nRi/oRiquezaRisaRitmoRitoRizoRobleRoceRociarRodarRodeoRodillaRoerRojizoRojoRomeroRomperRonRoncoRondaRopaRoperoRosaRoscaRostroRotarRubi/RuborRudoRuedaRugirRuidoRuinaRuletaRuloRumboRumorRupturaRutaRutinaSa/badoSaberSabioSableSacarSagazSagradoSalaSaldoSaleroSalirSalmo/nSalo/nSalsaSaltoSaludSalvarSambaSancio/nSandi/aSanearSangreSanidadSanoSantoSapoSaqueSardinaSarte/nSastreSata/nSaunaSaxofo/nSeccio/nSecoSecretoSectaSedSeguirSeisSelloSelvaSemanaSemillaSendaSensorSe~alSe~orSepararSepiaSequi/aSerSerieSermo/nServirSesentaSesio/nSetaSetentaSeveroSexoSextoSidraSiestaSieteSigloSignoSi/labaSilbarSilencioSillaSi/mboloSimioSirenaSistemaSitioSituarSobreSocioSodioSolSolapaSoldadoSoledadSo/lidoSoltarSolucio/nSombraSondeoSonidoSonoroSonrisaSopaSoplarSoporteSordoSorpresaSorteoSoste/nSo/tanoSuaveSubirSucesoSudorSuegraSueloSue~oSuerteSufrirSujetoSulta/nSumarSuperarSuplirSuponerSupremoSurSurcoSure~oSurgirSustoSutilTabacoTabiqueTablaTabu/TacoTactoTajoTalarTalcoTalentoTallaTalo/nTama~oTamborTangoTanqueTapaTapeteTapiaTapo/nTaquillaTardeTareaTarifaTarjetaTarotTarroTartaTatuajeTauroTazaTazo/nTeatroTechoTeclaTe/cnicaTejadoTejerTejidoTelaTele/fonoTemaTemorTemploTenazTenderTenerTenisTensoTeori/aTerapiaTercoTe/rminoTernuraTerrorTesisTesoroTestigoTeteraTextoTezTibioTiburo/nTiempoTiendaTierraTiesoTigreTijeraTildeTimbreTi/midoTimoTintaTi/oTi/picoTipoTiraTiro/nTita/nTi/tereTi/tuloTizaToallaTobilloTocarTocinoTodoTogaToldoTomarTonoTontoToparTopeToqueTo/raxToreroTormentaTorneoToroTorpedoTorreTorsoTortugaTosToscoToserTo/xicoTrabajoTractorTraerTra/ficoTragoTrajeTramoTranceTratoTraumaTrazarTre/bolTreguaTreintaTrenTreparTresTribuTrigoTripaTristeTriunfoTrofeoTrompaTroncoTropaTroteTrozoTrucoTruenoTrufaTuberi/aTuboTuertoTumbaTumorTu/nelTu/nicaTurbinaTurismoTurnoTutorUbicarU/lceraUmbralUnidadUnirUniversoUnoUntarU~aUrbanoUrbeUrgenteUrnaUsarUsuarioU/tilUtopi/aUvaVacaVaci/oVacunaVagarVagoVainaVajillaValeVa/lidoValleValorVa/lvulaVampiroVaraVariarVaro/nVasoVecinoVectorVehi/culoVeinteVejezVelaVeleroVelozVenaVencerVendaVenenoVengarVenirVentaVenusVerVeranoVerboVerdeVeredaVerjaVersoVerterVi/aViajeVibrarVicioVi/ctimaVidaVi/deoVidrioViejoViernesVigorVilVillaVinagreVinoVi~edoVioli/nViralVirgoVirtudVisorVi/speraVistaVitaminaViudoVivazViveroVivirVivoVolca/nVolumenVolverVorazVotarVotoVozVueloVulgarYacerYateYeguaYemaYernoYesoYodoYogaYogurZafiroZanjaZapatoZarzaZonaZorroZumoZurdo\";\n var lookup = {};\n var wordlist = null;\n function dropDiacritic(word) {\n wordlist_1.logger.checkNormalize();\n return (0, strings_1.toUtf8String)(Array.prototype.filter.call((0, strings_1.toUtf8Bytes)(word.normalize(\"NFD\").toLowerCase()), function(c4) {\n return c4 >= 65 && c4 <= 90 || c4 >= 97 && c4 <= 123;\n }));\n }\n function expand(word) {\n var output = [];\n Array.prototype.forEach.call((0, strings_1.toUtf8Bytes)(word), function(c4) {\n if (c4 === 47) {\n output.push(204);\n output.push(129);\n } else if (c4 === 126) {\n output.push(110);\n output.push(204);\n output.push(131);\n } else {\n output.push(c4);\n }\n });\n return (0, strings_1.toUtf8String)(output);\n }\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \").map(function(w3) {\n return expand(w3);\n });\n wordlist.forEach(function(word, index2) {\n lookup[dropDiacritic(word)] = index2;\n });\n if (wordlist_1.Wordlist.check(lang) !== \"0xf74fb7092aeacdfbf8959557de22098da512207fb9f109cb526994938cf40300\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for es (Spanish) FAILED\");\n }\n }\n var LangEs = (\n /** @class */\n function(_super) {\n __extends4(LangEs2, _super);\n function LangEs2() {\n return _super.call(this, \"es\") || this;\n }\n LangEs2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangEs2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return lookup[dropDiacritic(word)];\n };\n return LangEs2;\n }(wordlist_1.Wordlist)\n );\n var langEs = new LangEs();\n exports3.langEs = langEs;\n wordlist_1.Wordlist.register(langEs);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-fr.js\n var require_lang_fr = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-fr.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langFr = void 0;\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var words = \"AbaisserAbandonAbdiquerAbeilleAbolirAborderAboutirAboyerAbrasifAbreuverAbriterAbrogerAbruptAbsenceAbsoluAbsurdeAbusifAbyssalAcade/mieAcajouAcarienAccablerAccepterAcclamerAccoladeAccrocheAccuserAcerbeAchatAcheterAcidulerAcierAcompteAcque/rirAcronymeActeurActifActuelAdepteAde/quatAdhe/sifAdjectifAdjugerAdmettreAdmirerAdopterAdorerAdoucirAdresseAdroitAdulteAdverbeAe/rerAe/ronefAffaireAffecterAfficheAffreuxAffublerAgacerAgencerAgileAgiterAgraferAgre/ableAgrumeAiderAiguilleAilierAimableAisanceAjouterAjusterAlarmerAlchimieAlerteAlge-breAlgueAlie/nerAlimentAlle/gerAlliageAllouerAllumerAlourdirAlpagaAltesseAlve/oleAmateurAmbiguAmbreAme/nagerAmertumeAmidonAmiralAmorcerAmourAmovibleAmphibieAmpleurAmusantAnalyseAnaphoreAnarchieAnatomieAncienAne/antirAngleAngoisseAnguleuxAnimalAnnexerAnnonceAnnuelAnodinAnomalieAnonymeAnormalAntenneAntidoteAnxieuxApaiserApe/ritifAplanirApologieAppareilAppelerApporterAppuyerAquariumAqueducArbitreArbusteArdeurArdoiseArgentArlequinArmatureArmementArmoireArmureArpenterArracherArriverArroserArsenicArte/rielArticleAspectAsphalteAspirerAssautAsservirAssietteAssocierAssurerAsticotAstreAstuceAtelierAtomeAtriumAtroceAttaqueAttentifAttirerAttraperAubaineAubergeAudaceAudibleAugurerAuroreAutomneAutrucheAvalerAvancerAvariceAvenirAverseAveugleAviateurAvideAvionAviserAvoineAvouerAvrilAxialAxiomeBadgeBafouerBagageBaguetteBaignadeBalancerBalconBaleineBalisageBambinBancaireBandageBanlieueBannie-reBanquierBarbierBarilBaronBarqueBarrageBassinBastionBatailleBateauBatterieBaudrierBavarderBeletteBe/lierBeloteBe/ne/ficeBerceauBergerBerlineBermudaBesaceBesogneBe/tailBeurreBiberonBicycleBiduleBijouBilanBilingueBillardBinaireBiologieBiopsieBiotypeBiscuitBisonBistouriBitumeBizarreBlafardBlagueBlanchirBlessantBlinderBlondBloquerBlousonBobardBobineBoireBoiserBolideBonbonBondirBonheurBonifierBonusBordureBorneBotteBoucleBoueuxBougieBoulonBouquinBourseBoussoleBoutiqueBoxeurBrancheBrasierBraveBrebisBre-cheBreuvageBricolerBrigadeBrillantBriocheBriqueBrochureBroderBronzerBrousseBroyeurBrumeBrusqueBrutalBruyantBuffleBuissonBulletinBureauBurinBustierButinerButoirBuvableBuvetteCabanonCabineCachetteCadeauCadreCafe/ineCaillouCaissonCalculerCalepinCalibreCalmerCalomnieCalvaireCamaradeCame/raCamionCampagneCanalCanetonCanonCantineCanularCapableCaporalCapriceCapsuleCapterCapucheCarabineCarboneCaresserCaribouCarnageCarotteCarreauCartonCascadeCasierCasqueCassureCauserCautionCavalierCaverneCaviarCe/dilleCeintureCe/lesteCelluleCendrierCensurerCentralCercleCe/re/bralCeriseCernerCerveauCesserChagrinChaiseChaleurChambreChanceChapitreCharbonChasseurChatonChaussonChavirerChemiseChenilleChe/quierChercherChevalChienChiffreChignonChime-reChiotChlorureChocolatChoisirChoseChouetteChromeChuteCigareCigogneCimenterCine/maCintrerCirculerCirerCirqueCiterneCitoyenCitronCivilClaironClameurClaquerClasseClavierClientClignerClimatClivageClocheClonageCloporteCobaltCobraCocasseCocotierCoderCodifierCoffreCognerCohe/sionCoifferCoincerCole-reColibriCollineColmaterColonelCombatCome/dieCommandeCompactConcertConduireConfierCongelerConnoterConsonneContactConvexeCopainCopieCorailCorbeauCordageCornicheCorpusCorrectCorte-geCosmiqueCostumeCotonCoudeCoupureCourageCouteauCouvrirCoyoteCrabeCrainteCravateCrayonCre/atureCre/diterCre/meuxCreuserCrevetteCriblerCrierCristalCrite-reCroireCroquerCrotaleCrucialCruelCrypterCubiqueCueillirCuille-reCuisineCuivreCulminerCultiverCumulerCupideCuratifCurseurCyanureCycleCylindreCyniqueDaignerDamierDangerDanseurDauphinDe/battreDe/biterDe/borderDe/briderDe/butantDe/calerDe/cembreDe/chirerDe/ciderDe/clarerDe/corerDe/crireDe/cuplerDe/daleDe/ductifDe/esseDe/fensifDe/filerDe/frayerDe/gagerDe/givrerDe/glutirDe/graferDe/jeunerDe/liceDe/logerDemanderDemeurerDe/molirDe/nicherDe/nouerDentelleDe/nuderDe/partDe/penserDe/phaserDe/placerDe/poserDe/rangerDe/roberDe/sastreDescenteDe/sertDe/signerDe/sobe/irDessinerDestrierDe/tacherDe/testerDe/tourerDe/tresseDevancerDevenirDevinerDevoirDiableDialogueDiamantDicterDiffe/rerDige/rerDigitalDigneDiluerDimancheDiminuerDioxydeDirectifDirigerDiscuterDisposerDissiperDistanceDivertirDiviserDocileDocteurDogmeDoigtDomaineDomicileDompterDonateurDonjonDonnerDopamineDortoirDorureDosageDoseurDossierDotationDouanierDoubleDouceurDouterDoyenDragonDraperDresserDribblerDroitureDuperieDuplexeDurableDurcirDynastieE/blouirE/carterE/charpeE/chelleE/clairerE/clipseE/cloreE/cluseE/coleE/conomieE/corceE/couterE/craserE/cre/merE/crivainE/crouE/cumeE/cureuilE/difierE/duquerEffacerEffectifEffigieEffortEffrayerEffusionE/galiserE/garerE/jecterE/laborerE/largirE/lectronE/le/gantE/le/phantE/le-veE/ligibleE/litismeE/logeE/luciderE/luderEmballerEmbellirEmbryonE/meraudeE/missionEmmenerE/motionE/mouvoirEmpereurEmployerEmporterEmpriseE/mulsionEncadrerEnche-reEnclaveEncocheEndiguerEndosserEndroitEnduireE/nergieEnfanceEnfermerEnfouirEngagerEnginEngloberE/nigmeEnjamberEnjeuEnleverEnnemiEnnuyeuxEnrichirEnrobageEnseigneEntasserEntendreEntierEntourerEntraverE/nume/rerEnvahirEnviableEnvoyerEnzymeE/olienE/paissirE/pargneE/patantE/pauleE/picerieE/pide/mieE/pierE/pilogueE/pineE/pisodeE/pitapheE/poqueE/preuveE/prouverE/puisantE/querreE/quipeE/rigerE/rosionErreurE/ruptionEscalierEspadonEspe-ceEspie-gleEspoirEspritEsquiverEssayerEssenceEssieuEssorerEstimeEstomacEstradeE/tage-reE/talerE/tancheE/tatiqueE/teindreE/tendoirE/ternelE/thanolE/thiqueEthnieE/tirerE/tofferE/toileE/tonnantE/tourdirE/trangeE/troitE/tudeEuphorieE/valuerE/vasionE/ventailE/videnceE/viterE/volutifE/voquerExactExage/rerExaucerExcellerExcitantExclusifExcuseExe/cuterExempleExercerExhalerExhorterExigenceExilerExisterExotiqueExpe/dierExplorerExposerExprimerExquisExtensifExtraireExulterFableFabuleuxFacetteFacileFactureFaiblirFalaiseFameuxFamilleFarceurFarfeluFarineFaroucheFascinerFatalFatigueFauconFautifFaveurFavoriFe/brileFe/conderFe/de/rerFe/linFemmeFe/murFendoirFe/odalFermerFe/roceFerveurFestivalFeuilleFeutreFe/vrierFiascoFicelerFictifFide-leFigureFilatureFiletageFilie-reFilleulFilmerFilouFiltrerFinancerFinirFioleFirmeFissureFixerFlairerFlammeFlasqueFlatteurFle/auFle-cheFleurFlexionFloconFloreFluctuerFluideFluvialFolieFonderieFongibleFontaineForcerForgeronFormulerFortuneFossileFoudreFouge-reFouillerFoulureFourmiFragileFraiseFranchirFrapperFrayeurFre/gateFreinerFrelonFre/mirFre/ne/sieFre-reFriableFrictionFrissonFrivoleFroidFromageFrontalFrotterFruitFugitifFuiteFureurFurieuxFurtifFusionFuturGagnerGalaxieGalerieGambaderGarantirGardienGarnirGarrigueGazelleGazonGe/antGe/latineGe/luleGendarmeGe/ne/ralGe/nieGenouGentilGe/ologieGe/ome-treGe/raniumGermeGestuelGeyserGibierGiclerGirafeGivreGlaceGlaiveGlisserGlobeGloireGlorieuxGolfeurGommeGonflerGorgeGorilleGoudronGouffreGoulotGoupilleGourmandGoutteGraduelGraffitiGraineGrandGrappinGratuitGravirGrenatGriffureGrillerGrimperGrognerGronderGrotteGroupeGrugerGrutierGruye-reGue/pardGuerrierGuideGuimauveGuitareGustatifGymnasteGyrostatHabitudeHachoirHalteHameauHangarHannetonHaricotHarmonieHarponHasardHe/liumHe/matomeHerbeHe/rissonHermineHe/ronHe/siterHeureuxHibernerHibouHilarantHistoireHiverHomardHommageHomoge-neHonneurHonorerHonteuxHordeHorizonHorlogeHormoneHorribleHouleuxHousseHublotHuileuxHumainHumbleHumideHumourHurlerHydromelHygie-neHymneHypnoseIdylleIgnorerIguaneIlliciteIllusionImageImbiberImiterImmenseImmobileImmuableImpactImpe/rialImplorerImposerImprimerImputerIncarnerIncendieIncidentInclinerIncoloreIndexerIndiceInductifIne/ditIneptieInexactInfiniInfligerInformerInfusionInge/rerInhalerInhiberInjecterInjureInnocentInoculerInonderInscrireInsecteInsigneInsoliteInspirerInstinctInsulterIntactIntenseIntimeIntrigueIntuitifInutileInvasionInventerInviterInvoquerIroniqueIrradierIrre/elIrriterIsolerIvoireIvresseJaguarJaillirJambeJanvierJardinJaugerJauneJavelotJetableJetonJeudiJeunesseJoindreJoncherJonglerJoueurJouissifJournalJovialJoyauJoyeuxJubilerJugementJuniorJuponJuristeJusticeJuteuxJuve/nileKayakKimonoKiosqueLabelLabialLabourerLace/rerLactoseLaguneLaineLaisserLaitierLambeauLamelleLampeLanceurLangageLanterneLapinLargeurLarmeLaurierLavaboLavoirLectureLe/galLe/gerLe/gumeLessiveLettreLevierLexiqueLe/zardLiasseLibe/rerLibreLicenceLicorneLie-geLie-vreLigatureLigoterLigueLimerLimiteLimonadeLimpideLine/aireLingotLionceauLiquideLisie-reListerLithiumLitigeLittoralLivreurLogiqueLointainLoisirLombricLoterieLouerLourdLoutreLouveLoyalLubieLucideLucratifLueurLugubreLuisantLumie-reLunaireLundiLuronLutterLuxueuxMachineMagasinMagentaMagiqueMaigreMaillonMaintienMairieMaisonMajorerMalaxerMale/ficeMalheurMaliceMalletteMammouthMandaterManiableManquantManteauManuelMarathonMarbreMarchandMardiMaritimeMarqueurMarronMartelerMascotteMassifMate/rielMatie-reMatraqueMaudireMaussadeMauveMaximalMe/chantMe/connuMe/dailleMe/decinMe/diterMe/duseMeilleurMe/langeMe/lodieMembreMe/moireMenacerMenerMenhirMensongeMentorMercrediMe/riteMerleMessagerMesureMe/talMe/te/oreMe/thodeMe/tierMeubleMiaulerMicrobeMietteMignonMigrerMilieuMillionMimiqueMinceMine/ralMinimalMinorerMinuteMiracleMiroiterMissileMixteMobileModerneMoelleuxMondialMoniteurMonnaieMonotoneMonstreMontagneMonumentMoqueurMorceauMorsureMortierMoteurMotifMoucheMoufleMoulinMoussonMoutonMouvantMultipleMunitionMurailleMure-neMurmureMuscleMuse/umMusicienMutationMuterMutuelMyriadeMyrtilleMyste-reMythiqueNageurNappeNarquoisNarrerNatationNationNatureNaufrageNautiqueNavireNe/buleuxNectarNe/fasteNe/gationNe/gligerNe/gocierNeigeNerveuxNettoyerNeuroneNeutronNeveuNicheNickelNitrateNiveauNobleNocifNocturneNoirceurNoisetteNomadeNombreuxNommerNormatifNotableNotifierNotoireNourrirNouveauNovateurNovembreNoviceNuageNuancerNuireNuisibleNume/roNuptialNuqueNutritifObe/irObjectifObligerObscurObserverObstacleObtenirObturerOccasionOccuperOce/anOctobreOctroyerOctuplerOculaireOdeurOdorantOffenserOfficierOffrirOgiveOiseauOisillonOlfactifOlivierOmbrageOmettreOnctueuxOndulerOne/reuxOniriqueOpaleOpaqueOpe/rerOpinionOpportunOpprimerOpterOptiqueOrageuxOrangeOrbiteOrdonnerOreilleOrganeOrgueilOrificeOrnementOrqueOrtieOscillerOsmoseOssatureOtarieOuraganOursonOutilOutragerOuvrageOvationOxydeOxyge-neOzonePaisiblePalacePalmare-sPalourdePalperPanachePandaPangolinPaniquerPanneauPanoramaPantalonPapayePapierPapoterPapyrusParadoxeParcelleParesseParfumerParlerParoleParrainParsemerPartagerParureParvenirPassionPaste-quePaternelPatiencePatronPavillonPavoiserPayerPaysagePeignePeintrePelagePe/licanPellePelousePeluchePendulePe/ne/trerPe/niblePensifPe/nuriePe/pitePe/plumPerdrixPerforerPe/riodePermuterPerplexePersilPertePeserPe/talePetitPe/trirPeuplePharaonPhobiePhoquePhotonPhrasePhysiquePianoPicturalPie-cePierrePieuvrePilotePinceauPipettePiquerPiroguePiscinePistonPivoterPixelPizzaPlacardPlafondPlaisirPlanerPlaquePlastronPlateauPleurerPlexusPliagePlombPlongerPluiePlumagePochettePoe/siePoe-tePointePoirierPoissonPoivrePolairePolicierPollenPolygonePommadePompierPonctuelPonde/rerPoneyPortiquePositionPosse/derPosturePotagerPoteauPotionPoucePoulainPoumonPourprePoussinPouvoirPrairiePratiquePre/cieuxPre/direPre/fixePre/ludePre/nomPre/sencePre/textePre/voirPrimitifPrincePrisonPriverProble-meProce/derProdigeProfondProgre-sProieProjeterProloguePromenerPropreProspe-reProte/gerProuesseProverbePrudencePruneauPsychosePublicPuceronPuiserPulpePulsarPunaisePunitifPupitrePurifierPuzzlePyramideQuasarQuerelleQuestionQuie/tudeQuitterQuotientRacineRaconterRadieuxRagondinRaideurRaisinRalentirRallongeRamasserRapideRasageRatisserRavagerRavinRayonnerRe/actifRe/agirRe/aliserRe/animerRecevoirRe/citerRe/clamerRe/colterRecruterReculerRecyclerRe/digerRedouterRefaireRe/flexeRe/formerRefrainRefugeRe/galienRe/gionRe/glageRe/gulierRe/ite/rerRejeterRejouerRelatifReleverReliefRemarqueReme-deRemiseRemonterRemplirRemuerRenardRenfortReniflerRenoncerRentrerRenvoiReplierReporterRepriseReptileRequinRe/serveRe/sineuxRe/soudreRespectResterRe/sultatRe/tablirRetenirRe/ticuleRetomberRetracerRe/unionRe/ussirRevancheRevivreRe/volteRe/vulsifRichesseRideauRieurRigideRigolerRincerRiposterRisibleRisqueRituelRivalRivie-reRocheuxRomanceRompreRonceRondinRoseauRosierRotatifRotorRotuleRougeRouilleRouleauRoutineRoyaumeRubanRubisRucheRuelleRugueuxRuinerRuisseauRuserRustiqueRythmeSablerSaboterSabreSacocheSafariSagesseSaisirSaladeSaliveSalonSaluerSamediSanctionSanglierSarcasmeSardineSaturerSaugrenuSaumonSauterSauvageSavantSavonnerScalpelScandaleSce/le/ratSce/narioSceptreSche/maScienceScinderScoreScrutinSculpterSe/anceSe/cableSe/cherSecouerSe/cre/terSe/datifSe/duireSeigneurSe/jourSe/lectifSemaineSemblerSemenceSe/minalSe/nateurSensibleSentenceSe/parerSe/quenceSereinSergentSe/rieuxSerrureSe/rumServiceSe/sameSe/virSevrageSextupleSide/ralSie-cleSie/gerSifflerSigleSignalSilenceSiliciumSimpleSince-reSinistreSiphonSiropSismiqueSituerSkierSocialSocleSodiumSoigneuxSoldatSoleilSolitudeSolubleSombreSommeilSomnolerSondeSongeurSonnetteSonoreSorcierSortirSosieSottiseSoucieuxSoudureSouffleSouleverSoupapeSourceSoutirerSouvenirSpacieuxSpatialSpe/cialSphe-reSpiralStableStationSternumStimulusStipulerStrictStudieuxStupeurStylisteSublimeSubstratSubtilSubvenirSucce-sSucreSuffixeSugge/rerSuiveurSulfateSuperbeSupplierSurfaceSuricateSurmenerSurpriseSursautSurvieSuspectSyllabeSymboleSyme/trieSynapseSyntaxeSyste-meTabacTablierTactileTaillerTalentTalismanTalonnerTambourTamiserTangibleTapisTaquinerTarderTarifTartineTasseTatamiTatouageTaupeTaureauTaxerTe/moinTemporelTenailleTendreTeneurTenirTensionTerminerTerneTerribleTe/tineTexteThe-meThe/orieThe/rapieThoraxTibiaTie-deTimideTirelireTiroirTissuTitaneTitreTituberTobogganTole/rantTomateToniqueTonneauToponymeTorcheTordreTornadeTorpilleTorrentTorseTortueTotemToucherTournageTousserToxineTractionTraficTragiqueTrahirTrainTrancherTravailTre-fleTremperTre/sorTreuilTriageTribunalTricoterTrilogieTriompheTriplerTriturerTrivialTromboneTroncTropicalTroupeauTuileTulipeTumulteTunnelTurbineTuteurTutoyerTuyauTympanTyphonTypiqueTyranUbuesqueUltimeUltrasonUnanimeUnifierUnionUniqueUnitaireUniversUraniumUrbainUrticantUsageUsineUsuelUsureUtileUtopieVacarmeVaccinVagabondVagueVaillantVaincreVaisseauValableValiseVallonValveVampireVanilleVapeurVarierVaseuxVassalVasteVecteurVedetteVe/ge/talVe/hiculeVeinardVe/loceVendrediVe/ne/rerVengerVenimeuxVentouseVerdureVe/rinVernirVerrouVerserVertuVestonVe/te/ranVe/tusteVexantVexerViaducViandeVictoireVidangeVide/oVignetteVigueurVilainVillageVinaigreViolonVipe-reVirementVirtuoseVirusVisageViseurVisionVisqueuxVisuelVitalVitesseViticoleVitrineVivaceVivipareVocationVoguerVoileVoisinVoitureVolailleVolcanVoltigerVolumeVoraceVortexVoterVouloirVoyageVoyelleWagonXe/nonYachtZe-breZe/nithZesteZoologie\";\n var wordlist = null;\n var lookup = {};\n function dropDiacritic(word) {\n wordlist_1.logger.checkNormalize();\n return (0, strings_1.toUtf8String)(Array.prototype.filter.call((0, strings_1.toUtf8Bytes)(word.normalize(\"NFD\").toLowerCase()), function(c4) {\n return c4 >= 65 && c4 <= 90 || c4 >= 97 && c4 <= 123;\n }));\n }\n function expand(word) {\n var output = [];\n Array.prototype.forEach.call((0, strings_1.toUtf8Bytes)(word), function(c4) {\n if (c4 === 47) {\n output.push(204);\n output.push(129);\n } else if (c4 === 45) {\n output.push(204);\n output.push(128);\n } else {\n output.push(c4);\n }\n });\n return (0, strings_1.toUtf8String)(output);\n }\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \").map(function(w3) {\n return expand(w3);\n });\n wordlist.forEach(function(word, index2) {\n lookup[dropDiacritic(word)] = index2;\n });\n if (wordlist_1.Wordlist.check(lang) !== \"0x51deb7ae009149dc61a6bd18a918eb7ac78d2775726c68e598b92d002519b045\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for fr (French) FAILED\");\n }\n }\n var LangFr = (\n /** @class */\n function(_super) {\n __extends4(LangFr2, _super);\n function LangFr2() {\n return _super.call(this, \"fr\") || this;\n }\n LangFr2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangFr2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return lookup[dropDiacritic(word)];\n };\n return LangFr2;\n }(wordlist_1.Wordlist)\n );\n var langFr = new LangFr();\n exports3.langFr = langFr;\n wordlist_1.Wordlist.register(langFr);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-ja.js\n var require_lang_ja = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-ja.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langJa = void 0;\n var bytes_1 = require_lib2();\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var data = [\n // 4-kana words\n \"AQRASRAGBAGUAIRAHBAghAURAdBAdcAnoAMEAFBAFCBKFBQRBSFBCXBCDBCHBGFBEQBpBBpQBIkBHNBeOBgFBVCBhBBhNBmOBmRBiHBiFBUFBZDBvFBsXBkFBlcBjYBwDBMBBTBBTRBWBBWXXaQXaRXQWXSRXCFXYBXpHXOQXHRXhRXuRXmXXbRXlXXwDXTRXrCXWQXWGaBWaKcaYgasFadQalmaMBacAKaRKKBKKXKKjKQRKDRKCYKCRKIDKeVKHcKlXKjHKrYNAHNBWNaRNKcNIBNIONmXNsXNdXNnBNMBNRBNrXNWDNWMNFOQABQAHQBrQXBQXFQaRQKXQKDQKOQKFQNBQNDQQgQCXQCDQGBQGDQGdQYXQpBQpQQpHQLXQHuQgBQhBQhCQuFQmXQiDQUFQZDQsFQdRQkHQbRQlOQlmQPDQjDQwXQMBQMDQcFQTBQTHQrDDXQDNFDGBDGQDGRDpFDhFDmXDZXDbRDMYDRdDTRDrXSAhSBCSBrSGQSEQSHBSVRShYShkSyQSuFSiBSdcSoESocSlmSMBSFBSFKSFNSFdSFcCByCaRCKcCSBCSRCCrCGbCEHCYXCpBCpQCIBCIHCeNCgBCgFCVECVcCmkCmwCZXCZFCdRClOClmClFCjDCjdCnXCwBCwXCcRCFQCFjGXhGNhGDEGDMGCDGCHGIFGgBGVXGVEGVRGmXGsXGdYGoSGbRGnXGwXGwDGWRGFNGFLGFOGFdGFkEABEBDEBFEXOEaBEKSENBENDEYXEIgEIkEgBEgQEgHEhFEudEuFEiBEiHEiFEZDEvBEsXEsFEdXEdREkFEbBEbRElFEPCEfkEFNYAEYAhYBNYQdYDXYSRYCEYYoYgQYgRYuRYmCYZTYdBYbEYlXYjQYRbYWRpKXpQopQnpSFpCXpIBpISphNpdBpdRpbRpcZpFBpFNpFDpFopFrLADLBuLXQLXcLaFLCXLEhLpBLpFLHXLeVLhILdHLdRLoDLbRLrXIABIBQIBCIBsIBoIBMIBRIXaIaRIKYIKRINBINuICDIGBIIDIIkIgRIxFIyQIiHIdRIbYIbRIlHIwRIMYIcRIRVITRIFBIFNIFQOABOAFOBQOaFONBONMOQFOSFOCDOGBOEQOpBOLXOIBOIFOgQOgFOyQOycOmXOsXOdIOkHOMEOMkOWWHBNHXNHXWHNXHDuHDRHSuHSRHHoHhkHmRHdRHkQHlcHlRHwBHWcgAEgAggAkgBNgBQgBEgXOgYcgLXgHjgyQgiBgsFgdagMYgWSgFQgFEVBTVXEVKBVKNVKDVKYVKRVNBVNYVDBVDxVSBVSRVCjVGNVLXVIFVhBVhcVsXVdRVbRVlRhBYhKYhDYhGShxWhmNhdahdkhbRhjohMXhTRxAXxXSxKBxNBxEQxeNxeQxhXxsFxdbxlHxjcxFBxFNxFQxFOxFoyNYyYoybcyMYuBQuBRuBruDMuCouHBudQukkuoBulVuMXuFEmCYmCRmpRmeDmiMmjdmTFmFQiADiBOiaRiKRiNBiNRiSFiGkiGFiERipRiLFiIFihYibHijBijEiMXiWBiFBiFCUBQUXFUaRUNDUNcUNRUNFUDBUSHUCDUGBUGFUEqULNULoUIRUeEUeYUgBUhFUuRUiFUsXUdFUkHUbBUjSUjYUwXUMDUcHURdUTBUrBUrXUrQZAFZXZZaRZKFZNBZQFZCXZGBZYdZpBZLDZIFZHXZHNZeQZVRZVFZmXZiBZvFZdFZkFZbHZbFZwXZcCZcRZRBvBQvBGvBLvBWvCovMYsAFsBDsaRsKFsNFsDrsSHsSFsCXsCRsEBsEHsEfspBsLBsLDsIgsIRseGsbRsFBsFQsFSdNBdSRdCVdGHdYDdHcdVbdySduDdsXdlRdwXdWYdWcdWRkBMkXOkaRkNIkNFkSFkCFkYBkpRkeNkgBkhVkmXksFklVkMBkWDkFNoBNoaQoaFoNBoNXoNaoNEoSRoEroYXoYCoYbopRopFomXojkowXorFbBEbEIbdBbjYlaRlDElMXlFDjKjjSRjGBjYBjYkjpRjLXjIBjOFjeVjbRjwBnXQnSHnpFnLXnINnMBnTRwXBwXNwXYwNFwQFwSBwGFwLXwLDweNwgBwuHwjDwnXMBXMpFMIBMeNMTHcaQcNBcDHcSFcCXcpBcLXcLDcgFcuFcnXcwXccDcTQcrFTQErXNrCHrpFrgFrbFrTHrFcWNYWNbWEHWMXWTR\",\n // 5-kana words\n \"ABGHABIJAEAVAYJQALZJAIaRAHNXAHdcAHbRAZJMAZJRAZTRAdVJAklmAbcNAjdRAMnRAMWYAWpRAWgRAFgBAFhBAFdcBNJBBNJDBQKBBQhcBQlmBDEJBYJkBYJTBpNBBpJFBIJBBIJDBIcABOKXBOEJBOVJBOiJBOZJBepBBeLXBeIFBegBBgGJBVJXBuocBiJRBUJQBlXVBlITBwNFBMYVBcqXBTlmBWNFBWiJBWnRBFGHBFwXXKGJXNJBXNZJXDTTXSHSXSVRXSlHXCJDXGQJXEhXXYQJXYbRXOfXXeNcXVJFXhQJXhEJXdTRXjdXXMhBXcQTXRGBXTEBXTnQXFCXXFOFXFgFaBaFaBNJaBCJaBpBaBwXaNJKaNJDaQIBaDpRaEPDaHMFamDJalEJaMZJaFaFaFNBaFQJaFLDaFVHKBCYKBEBKBHDKXaFKXGdKXEJKXpHKXIBKXZDKXwXKKwLKNacKNYJKNJoKNWcKDGdKDTRKChXKGaRKGhBKGbRKEBTKEaRKEPTKLMDKLWRKOHDKVJcKdBcKlIBKlOPKFSBKFEPKFpFNBNJNJBQNBGHNBEPNBHXNBgFNBVXNBZDNBsXNBwXNNaRNNJDNNJENNJkNDCJNDVDNGJRNJiDNZJNNsCJNJFNNFSBNFCXNFEPNFLXNFIFQJBFQCaRQJEQQLJDQLJFQIaRQOqXQHaFQHHQQVJXQVJDQhNJQmEIQZJFQsJXQJrFQWbRDJABDBYJDXNFDXCXDXLXDXZDDXsJDQqXDSJFDJCXDEPkDEqXDYmQDpSJDOCkDOGQDHEIDVJDDuDuDWEBDJFgSBNDSBSFSBGHSBIBSBTQSKVYSJQNSJQiSJCXSEqXSJYVSIiJSOMYSHAHSHaQSeCFSepQSegBSHdHSHrFShSJSJuHSJUFSkNRSrSrSWEBSFaHSJFQSFCXSFGDSFYXSFODSFgBSFVXSFhBSFxFSFkFSFbBSFMFCADdCJXBCXaFCXKFCXNFCXCXCXGBCXEJCXYBCXLDCXIBCXOPCXHXCXgBCXhBCXiBCXlDCXcHCJNBCJNFCDCJCDGBCDVXCDhBCDiDCDJdCCmNCpJFCIaRCOqXCHCHCHZJCViJCuCuCmddCJiFCdNBCdHhClEJCnUJCreSCWlgCWTRCFBFCFNBCFYBCFVFCFhFCFdSCFTBCFWDGBNBGBQFGJBCGBEqGBpBGBgQGNBEGNJYGNkOGNJRGDUFGJpQGHaBGJeNGJeEGVBlGVKjGiJDGvJHGsVJGkEBGMIJGWjNGFBFGFCXGFGBGFYXGFpBGFMFEASJEAWpEJNFECJVEIXSEIQJEOqXEOcFEeNcEHEJEHlFEJgFEhlmEmDJEmZJEiMBEUqXEoSREPBFEPXFEPKFEPSFEPEFEPpFEPLXEPIBEJPdEPcFEPTBEJnXEqlHEMpREFCXEFODEFcFYASJYJAFYBaBYBVXYXpFYDhBYCJBYJGFYYbRYeNcYJeVYiIJYZJcYvJgYvJRYJsXYsJFYMYMYreVpBNHpBEJpBwXpQxFpYEJpeNDpJeDpeSFpeCHpHUJpHbBpHcHpmUJpiiJpUJrpsJuplITpFaBpFQqpFGBpFEfpFYBpFpBpFLJpFIDpFgBpFVXpFyQpFuFpFlFpFjDpFnXpFwXpJFMpFTBLXCJLXEFLXhFLXUJLXbFLalmLNJBLSJQLCLCLGJBLLDJLHaFLeNFLeSHLeCXLepFLhaRLZsJLsJDLsJrLocaLlLlLMdbLFNBLFSBLFEHLFkFIBBFIBXFIBaQIBKXIBSFIBpHIBLXIBgBIBhBIBuHIBmXIBiFIBZXIBvFIBbFIBjQIBwXIBWFIKTRIQUJIDGFICjQIYSRIINXIJeCIVaRImEkIZJFIvJRIsJXIdCJIJoRIbBQIjYBIcqXITFVIreVIFKFIFSFIFCJIFGFIFLDIFIBIJFOIFgBIFVXIJFhIFxFIFmXIFdHIFbBIJFrIJFWOBGBOQfXOOKjOUqXOfXBOqXEOcqXORVJOFIBOFlDHBIOHXiFHNTRHCJXHIaRHHJDHHEJHVbRHZJYHbIBHRsJHRkDHWlmgBKFgBSBgBCDgBGHgBpBgBIBgBVJgBuBgBvFgKDTgQVXgDUJgGSJgOqXgmUMgZIJgTUJgWIEgFBFgFNBgFDJgFSFgFGBgFYXgJFOgFgQgFVXgFhBgFbHgJFWVJABVQKcVDgFVOfXVeDFVhaRVmGdViJYVMaRVFNHhBNDhBCXhBEqhBpFhBLXhNJBhSJRheVXhhKEhxlmhZIJhdBQhkIJhbMNhMUJhMZJxNJgxQUJxDEkxDdFxSJRxplmxeSBxeCXxeGFxeYXxepQxegBxWVcxFEQxFLXxFIBxFgBxFxDxFZtxFdcxFbBxFwXyDJXyDlcuASJuDJpuDIBuCpJuGSJuIJFueEFuZIJusJXudWEuoIBuWGJuFBcuFKEuFNFuFQFuFDJuFGJuFVJuFUtuFdHuFTBmBYJmNJYmQhkmLJDmLJomIdXmiJYmvJRmsJRmklmmMBymMuCmclmmcnQiJABiJBNiJBDiBSFiBCJiBEFiBYBiBpFiBLXiBTHiJNciDEfiCZJiECJiJEqiOkHiHKFieNDiHJQieQcieDHieSFieCXieGFieEFieIHiegFihUJixNoioNXiFaBiFKFiFNDiFEPiFYXitFOitFHiFgBiFVEiFmXiFitiFbBiFMFiFrFUCXQUIoQUIJcUHQJUeCEUHwXUUJDUUqXUdWcUcqXUrnQUFNDUFSHUFCFUFEfUFLXUtFOZBXOZXSBZXpFZXVXZEQJZEJkZpDJZOqXZeNHZeCDZUqXZFBQZFEHZFLXvBAFvBKFvBCXvBEPvBpHvBIDvBgFvBuHvQNJvFNFvFGBvFIBvJFcsXCDsXLXsXsXsXlFsXcHsQqXsJQFsEqXseIFsFEHsFjDdBxOdNpRdNJRdEJbdpJRdhZJdnSJdrjNdFNJdFQHdFhNkNJDkYaRkHNRkHSRkVbRkuMRkjSJkcqDoSJFoEiJoYZJoOfXohEBoMGQocqXbBAFbBXFbBaFbBNDbBGBbBLXbBTBbBWDbGJYbIJHbFQqbFpQlDgQlOrFlVJRjGEBjZJRnXvJnXbBnEfHnOPDngJRnxfXnUJWwXEJwNpJwDpBwEfXwrEBMDCJMDGHMDIJMLJDcQGDcQpHcqXccqNFcqCXcFCJRBSBRBGBRBEJRBpQTBNFTBQJTBpBTBVXTFABTFSBTFCFTFGBTFMDrXCJrXLDrDNJrEfHrFQJrFitWNjdWNTR\",\n // 6-kana words\n \"AKLJMANOPFASNJIAEJWXAYJNRAIIbRAIcdaAeEfDAgidRAdjNYAMYEJAMIbRAFNJBAFpJFBBIJYBDZJFBSiJhBGdEBBEJfXBEJqXBEJWRBpaUJBLXrXBIYJMBOcfXBeEfFBestXBjNJRBcDJOBFEqXXNvJRXDMBhXCJNYXOAWpXONJWXHDEBXeIaRXhYJDXZJSJXMDJOXcASJXFVJXaBQqXaBZJFasXdQaFSJQaFEfXaFpJHaFOqXKBNSRKXvJBKQJhXKEJQJKEJGFKINJBKIJjNKgJNSKVElmKVhEBKiJGFKlBgJKjnUJKwsJYKMFIJKFNJDKFIJFKFOfXNJBSFNJBCXNBpJFNJBvQNJBMBNJLJXNJOqXNJeCXNJeGFNdsJCNbTKFNwXUJQNFEPQDiJcQDMSJQSFpBQGMQJQJeOcQyCJEQUJEBQJFBrQFEJqDXDJFDJXpBDJXIMDGiJhDIJGRDJeYcDHrDJDVXgFDkAWpDkIgRDjDEqDMvJRDJFNFDJFIBSKclmSJQOFSJQVHSJQjDSJGJBSJGJFSECJoSHEJqSJHTBSJVJDSViJYSZJNBSJsJDSFSJFSFEfXSJFLXCBUJVCJXSBCJXpBCXVJXCJXsXCJXdFCJNJHCLIJgCHiJFCVNJMChCJhCUHEJCsJTRCJdYcCoQJCCFEfXCFIJgCFUJxCFstFGJBaQGJBIDGQJqXGYJNRGJHKFGeQqDGHEJFGJeLXGHIiJGHdBlGUJEBGkIJTGFQPDGJFEqEAGegEJIJBEJVJXEhQJTEiJNcEJZJFEJoEqEjDEqEPDsXEPGJBEPOqXEPeQFEfDiDEJfEFEfepQEfMiJEqXNBEqDIDEqeSFEqVJXEMvJRYXNJDYXEJHYKVJcYYJEBYJeEcYJUqXYFpJFYFstXpAZJMpBSJFpNBNFpeQPDpHLJDpHIJFpHgJFpeitFpHZJFpJFADpFSJFpJFCJpFOqXpFitBpJFZJLXIJFLIJgRLVNJWLVHJMLwNpJLFGJBLFLJDLFOqXLJFUJIBDJXIBGJBIJBYQIJBIBIBOqXIBcqDIEGJFILNJTIIJEBIOiJhIJeNBIJeIBIhiJIIWoTRIJFAHIJFpBIJFuHIFUtFIJFTHOSBYJOEcqXOHEJqOvBpFOkVJrObBVJOncqDOcNJkHhNJRHuHJuHdMhBgBUqXgBsJXgONJBgHNJDgHHJQgJeitgHsJXgJyNagyDJBgZJDrgsVJQgkEJNgkjSJgJFAHgFCJDgFZtMVJXNFVXQfXVJXDJVXoQJVQVJQVDEfXVDvJHVEqNFVeQfXVHpJFVHxfXVVJSRVVmaRVlIJOhCXVJhHjYkhxCJVhWVUJhWiJcxBNJIxeEqDxfXBFxcFEPxFSJFxFYJXyBDQJydaUJyFOPDuYCJYuLvJRuHLJXuZJLDuFOPDuFZJHuFcqXmKHJdmCQJcmOsVJiJAGFitLCFieOfXiestXiZJMEikNJQirXzFiFQqXiFIJFiFZJFiFvtFUHpJFUteIcUteOcUVCJkUhdHcUbEJEUJqXQUMNJhURjYkUFitFZDGJHZJIxDZJVJXZJFDJZJFpQvBNJBvBSJFvJxBrseQqDsVFVJdFLJDkEJNBkmNJYkFLJDoQJOPoGsJRoEAHBoEJfFbBQqDbBZJHbFVJXlFIJBjYIrXjeitcjjCEBjWMNBwXQfXwXOaFwDsJXwCJTRwrCZJMDNJQcDDJFcqDOPRYiJFTBsJXTQIJBTFEfXTFLJDrXEJFrEJXMrFZJFWEJdEWYTlm\",\n // 7-kana words\n \"ABCDEFACNJTRAMBDJdAcNJVXBLNJEBXSIdWRXErNJkXYDJMBXZJCJaXMNJaYKKVJKcKDEJqXKDcNJhKVJrNYKbgJVXKFVJSBNBYBwDNJeQfXNJeEqXNhGJWENJFiJRQlIJbEQJfXxDQqXcfXQFNDEJQFwXUJDYcnUJDJIBgQDIUJTRDJFEqDSJQSJFSJQIJFSOPeZtSJFZJHCJXQfXCTDEqFGJBSJFGJBOfXGJBcqXGJHNJDGJRLiJEJfXEqEJFEJPEFpBEJYJBZJFYBwXUJYiJMEBYJZJyTYTONJXpQMFXFpeGIDdpJFstXpJFcPDLBVSJRLHQJqXLJFZJFIJBNJDIJBUqXIBkFDJIJEJPTIYJGWRIJeQPDIJeEfHIJFsJXOqGDSFHXEJqXgJCsJCgGQJqXgdQYJEgFMFNBgJFcqDVJwXUJVJFZJchIgJCCxOEJqXxOwXUJyDJBVRuscisciJBiJBieUtqXiJFDJkiFsJXQUGEZJcUJFsJXZtXIrXZDZJDrZJFNJDZJFstXvJFQqXvJFCJEsJXQJqkhkNGBbDJdTRbYJMEBlDwXUJMEFiJFcfXNJDRcNJWMTBLJXC\",\n // 8-kana words\n \"BraFUtHBFSJFdbNBLJXVJQoYJNEBSJBEJfHSJHwXUJCJdAZJMGjaFVJXEJPNJBlEJfFiJFpFbFEJqIJBVJCrIBdHiJhOPFChvJVJZJNJWxGFNIFLueIBQJqUHEJfUFstOZJDrlXEASJRlXVJXSFwVJNJWD\",\n // 9-kana words\n \"QJEJNNJDQJEJIBSFQJEJxegBQJEJfHEPSJBmXEJFSJCDEJqXLXNJFQqXIcQsFNJFIFEJqXUJgFsJXIJBUJEJfHNFvJxEqXNJnXUJFQqD\",\n // 10-kana words\n \"IJBEJqXZJ\"\n ];\n var mapping = \"~~AzB~X~a~KN~Q~D~S~C~G~E~Y~p~L~I~O~eH~g~V~hxyumi~~U~~Z~~v~~s~~dkoblPjfnqwMcRTr~W~~~F~~~~~Jt\";\n var wordlist = null;\n function hex(word) {\n return (0, bytes_1.hexlify)((0, strings_1.toUtf8Bytes)(word));\n }\n var KiYoKu = \"0xe3818de38284e3818f\";\n var KyoKu = \"0xe3818de38283e3818f\";\n function loadWords(lang) {\n if (wordlist !== null) {\n return;\n }\n wordlist = [];\n var transform = {};\n transform[(0, strings_1.toUtf8String)([227, 130, 154])] = false;\n transform[(0, strings_1.toUtf8String)([227, 130, 153])] = false;\n transform[(0, strings_1.toUtf8String)([227, 130, 133])] = (0, strings_1.toUtf8String)([227, 130, 134]);\n transform[(0, strings_1.toUtf8String)([227, 129, 163])] = (0, strings_1.toUtf8String)([227, 129, 164]);\n transform[(0, strings_1.toUtf8String)([227, 130, 131])] = (0, strings_1.toUtf8String)([227, 130, 132]);\n transform[(0, strings_1.toUtf8String)([227, 130, 135])] = (0, strings_1.toUtf8String)([227, 130, 136]);\n function normalize2(word2) {\n var result = \"\";\n for (var i4 = 0; i4 < word2.length; i4++) {\n var kana = word2[i4];\n var target = transform[kana];\n if (target === false) {\n continue;\n }\n if (target) {\n kana = target;\n }\n result += kana;\n }\n return result;\n }\n function sortJapanese(a3, b4) {\n a3 = normalize2(a3);\n b4 = normalize2(b4);\n if (a3 < b4) {\n return -1;\n }\n if (a3 > b4) {\n return 1;\n }\n return 0;\n }\n for (var length_1 = 3; length_1 <= 9; length_1++) {\n var d5 = data[length_1 - 3];\n for (var offset = 0; offset < d5.length; offset += length_1) {\n var word = [];\n for (var i3 = 0; i3 < length_1; i3++) {\n var k4 = mapping.indexOf(d5[offset + i3]);\n word.push(227);\n word.push(k4 & 64 ? 130 : 129);\n word.push((k4 & 63) + 128);\n }\n wordlist.push((0, strings_1.toUtf8String)(word));\n }\n }\n wordlist.sort(sortJapanese);\n if (hex(wordlist[442]) === KiYoKu && hex(wordlist[443]) === KyoKu) {\n var tmp = wordlist[442];\n wordlist[442] = wordlist[443];\n wordlist[443] = tmp;\n }\n if (wordlist_1.Wordlist.check(lang) !== \"0xcb36b09e6baa935787fd762ce65e80b0c6a8dabdfbc3a7f86ac0e2c4fd111600\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for ja (Japanese) FAILED\");\n }\n }\n var LangJa = (\n /** @class */\n function(_super) {\n __extends4(LangJa2, _super);\n function LangJa2() {\n return _super.call(this, \"ja\") || this;\n }\n LangJa2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangJa2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n LangJa2.prototype.split = function(mnemonic) {\n wordlist_1.logger.checkNormalize();\n return mnemonic.split(/(?:\\u3000| )+/g);\n };\n LangJa2.prototype.join = function(words) {\n return words.join(\"\\u3000\");\n };\n return LangJa2;\n }(wordlist_1.Wordlist)\n );\n var langJa = new LangJa();\n exports3.langJa = langJa;\n wordlist_1.Wordlist.register(langJa);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-ko.js\n var require_lang_ko = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-ko.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langKo = void 0;\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var data = [\n \"OYAa\",\n \"ATAZoATBl3ATCTrATCl8ATDloATGg3ATHT8ATJT8ATJl3ATLlvATLn4ATMT8ATMX8ATMboATMgoAToLbAToMTATrHgATvHnAT3AnAT3JbAT3MTAT8DbAT8JTAT8LmAT8MYAT8MbAT#LnAUHT8AUHZvAUJXrAUJX8AULnrAXJnvAXLUoAXLgvAXMn6AXRg3AXrMbAX3JTAX3QbAYLn3AZLgvAZrSUAZvAcAZ8AaAZ8AbAZ8AnAZ8HnAZ8LgAZ8MYAZ8MgAZ8OnAaAboAaDTrAaFTrAaJTrAaJboAaLVoAaMXvAaOl8AaSeoAbAUoAbAg8AbAl4AbGnrAbMT8AbMXrAbMn4AbQb8AbSV8AbvRlAb8AUAb8AnAb8HgAb8JTAb8NTAb8RbAcGboAcLnvAcMT8AcMX8AcSToAcrAaAcrFnAc8AbAc8MgAfGgrAfHboAfJnvAfLV8AfLkoAfMT8AfMnoAfQb8AfScrAfSgrAgAZ8AgFl3AgGX8AgHZvAgHgrAgJXoAgJX8AgJboAgLZoAgLn4AgOX8AgoATAgoAnAgoCUAgoJgAgoLXAgoMYAgoSeAgrDUAgrJTAhrFnAhrLjAhrQgAjAgoAjJnrAkMX8AkOnoAlCTvAlCV8AlClvAlFg4AlFl6AlFn3AloSnAlrAXAlrAfAlrFUAlrFbAlrGgAlrOXAlvKnAlvMTAl3AbAl3MnAnATrAnAcrAnCZ3AnCl8AnDg8AnFboAnFl3AnHX4AnHbrAnHgrAnIl3AnJgvAnLXoAnLX4AnLbrAnLgrAnLhrAnMXoAnMgrAnOn3AnSbrAnSeoAnvLnAn3OnCTGgvCTSlvCTvAUCTvKnCTvNTCT3CZCT3GUCT3MTCT8HnCUCZrCULf8CULnvCU3HnCU3JUCY6NUCbDb8CbFZoCbLnrCboOTCboScCbrFnCbvLnCb8AgCb8HgCb$LnCkLfoClBn3CloDUDTHT8DTLl3DTSU8DTrAaDTrLXDTrLjDTrOYDTrOgDTvFXDTvFnDT3HUDT3LfDUCT9DUDT4DUFVoDUFV8DUFkoDUGgrDUJnrDULl8DUMT8DUMXrDUMX4DUMg8DUOUoDUOgvDUOg8DUSToDUSZ8DbDXoDbDgoDbGT8DbJn3DbLg3DbLn4DbMXrDbMg8DbOToDboJXGTClvGTDT8GTFZrGTLVoGTLlvGTLl3GTMg8GTOTvGTSlrGToCUGTrDgGTrJYGTrScGTtLnGTvAnGTvQgGUCZrGUDTvGUFZoGUHXrGULnvGUMT8GUoMgGXoLnGXrMXGXrMnGXvFnGYLnvGZOnvGZvOnGZ8LaGZ8LmGbAl3GbDYvGbDlrGbHX3GbJl4GbLV8GbLn3GbMn4GboJTGboRfGbvFUGb3GUGb4JnGgDX3GgFl$GgJlrGgLX6GgLZoGgLf8GgOXoGgrAgGgrJXGgrMYGgrScGgvATGgvOYGnAgoGnJgvGnLZoGnLg3GnLnrGnQn8GnSbrGnrMgHTClvHTDToHTFT3HTQT8HToJTHToJgHTrDUHTrMnHTvFYHTvRfHT8MnHT8SUHUAZ8HUBb4HUDTvHUoMYHXFl6HXJX6HXQlrHXrAUHXrMnHXrSbHXvFYHXvKXHX3LjHX3MeHYvQlHZrScHZvDbHbAcrHbFT3HbFl3HbJT8HbLTrHbMT8HbMXrHbMbrHbQb8HbSX3HboDbHboJTHbrFUHbrHgHbrJTHb8JTHb8MnHb8QgHgAlrHgDT3HgGgrHgHgrHgJTrHgJT8HgLX@HgLnrHgMT8HgMX8HgMboHgOnrHgQToHgRg3HgoHgHgrCbHgrFnHgrLVHgvAcHgvAfHnAloHnCTrHnCnvHnGTrHnGZ8HnGnvHnJT8HnLf8HnLkvHnMg8HnRTrITvFUITvFnJTAXrJTCV8JTFT3JTFT8JTFn4JTGgvJTHT8JTJT8JTJXvJTJl3JTJnvJTLX4JTLf8JTLhvJTMT8JTMXrJTMnrJTObrJTQT8JTSlvJT8DUJT8FkJT8MTJT8OXJT8OgJT8QUJT8RfJUHZoJXFT4JXFlrJXGZ8JXGnrJXLV8JXLgvJXMXoJXMX3JXNboJXPlvJXoJTJXoLkJXrAXJXrHUJXrJgJXvJTJXvOnJX4KnJYAl3JYJT8JYLhvJYQToJYrQXJY6NUJbAl3JbCZrJbDloJbGT8JbGgrJbJXvJbJboJbLf8JbLhrJbLl3JbMnvJbRg8JbSZ8JboDbJbrCZJbrSUJb3KnJb8LnJfRn8JgAXrJgCZrJgDTrJgGZrJgGZ8JgHToJgJT8JgJXoJgJgvJgLX4JgLZ3JgLZ8JgLn4JgMgrJgMn4JgOgvJgPX6JgRnvJgSToJgoCZJgoJbJgoMYJgrJXJgrJgJgrLjJg6MTJlCn3JlGgvJlJl8Jl4AnJl8FnJl8HgJnAToJnATrJnAbvJnDUoJnGnrJnJXrJnJXvJnLhvJnLnrJnLnvJnMToJnMT8JnMXvJnMX3JnMg8JnMlrJnMn4JnOX8JnST4JnSX3JnoAgJnoAnJnoJTJnoObJnrAbJnrAkJnrHnJnrJTJnrJYJnrOYJnrScJnvCUJnvFaJnvJgJnvJnJnvOYJnvQUJnvRUJn3FnJn3JTKnFl3KnLT6LTDlvLTMnoLTOn3LTRl3LTSb4LTSlrLToAnLToJgLTrAULTrAcLTrCULTrHgLTrMgLT3JnLULnrLUMX8LUoJgLVATrLVDTrLVLb8LVoJgLV8MgLV8RTLXDg3LXFlrLXrCnLXrLXLX3GTLX4GgLX4OYLZAXrLZAcrLZAgrLZAhrLZDXyLZDlrLZFbrLZFl3LZJX6LZJX8LZLc8LZLnrLZSU8LZoJTLZoJnLZrAgLZrAnLZrJYLZrLULZrMgLZrSkLZvAnLZvGULZvJeLZvOTLZ3FZLZ4JXLZ8STLZ8ScLaAT3LaAl3LaHT8LaJTrLaJT8LaJXrLaJgvLaJl4LaLVoLaMXrLaMXvLaMX8LbClvLbFToLbHlrLbJn4LbLZ3LbLhvLbMXrLbMnoLbvSULcLnrLc8HnLc8MTLdrMnLeAgoLeOgvLeOn3LfAl3LfLnvLfMl3LfOX8Lf8AnLf8JXLf8LXLgJTrLgJXrLgJl8LgMX8LgRZrLhCToLhrAbLhrFULhrJXLhvJYLjHTrLjHX4LjJX8LjLhrLjSX3LjSZ4LkFX4LkGZ8LkGgvLkJTrLkMXoLkSToLkSU8LkSZ8LkoOYLl3FfLl3MgLmAZrLmCbrLmGgrLmHboLmJnoLmJn3LmLfoLmLhrLmSToLnAX6LnAb6LnCZ3LnCb3LnDTvLnDb8LnFl3LnGnrLnHZvLnHgvLnITvLnJT8LnJX8LnJlvLnLf8LnLg6LnLhvLnLnoLnMXrLnMg8LnQlvLnSbrLnrAgLnrAnLnrDbLnrFkLnrJdLnrMULnrOYLnrSTLnvAnLnvDULnvHgLnvOYLnvOnLn3GgLn4DULn4JTLn4JnMTAZoMTAloMTDb8MTFT8MTJnoMTJnrMTLZrMTLhrMTLkvMTMX8MTRTrMToATMTrDnMTrOnMT3JnMT4MnMT8FUMT8FaMT8FlMT8GTMT8GbMT8GnMT8HnMT8JTMT8JbMT8OTMUCl8MUJTrMUJU8MUMX8MURTrMUSToMXAX6MXAb6MXCZoMXFXrMXHXrMXLgvMXOgoMXrAUMXrAnMXrHgMXrJYMXrJnMXrMTMXrMgMXrOYMXrSZMXrSgMXvDUMXvOTMX3JgMX3OTMX4JnMX8DbMX8FnMX8HbMX8HgMX8HnMX8LbMX8MnMX8OnMYAb8MYGboMYHTvMYHX4MYLTrMYLnvMYMToMYOgvMYRg3MYSTrMbAToMbAXrMbAl3MbAn8MbGZ8MbJT8MbJXrMbMXvMbMX8MbMnoMbrMUMb8AfMb8FbMb8FkMcJXoMeLnrMgFl3MgGTvMgGXoMgGgrMgGnrMgHT8MgHZrMgJnoMgLnrMgLnvMgMT8MgQUoMgrHnMgvAnMg8HgMg8JYMg8LfMloJnMl8ATMl8AXMl8JYMnAToMnAT4MnAZ8MnAl3MnAl4MnCl8MnHT8MnHg8MnJnoMnLZoMnLhrMnMXoMnMX3MnMnrMnOgvMnrFbMnrFfMnrFnMnrNTMnvJXNTMl8OTCT3OTFV8OTFn3OTHZvOTJXrOTOl3OT3ATOT3JUOT3LZOT3LeOT3MbOT8ATOT8AbOT8AgOT8MbOUCXvOUMX3OXHXvOXLl3OXrMUOXvDbOX6NUOX8JbOYFZoOYLbrOYLkoOYMg8OYSX3ObHTrObHT4ObJgrObLhrObMX3ObOX8Ob8FnOeAlrOeJT8OeJXrOeJnrOeLToOeMb8OgJXoOgLXoOgMnrOgOXrOgOloOgoAgOgoJbOgoMYOgoSTOg8AbOjLX4OjMnoOjSV8OnLVoOnrAgOn3DUPXQlrPXvFXPbvFTPdAT3PlFn3PnvFbQTLn4QToAgQToMTQULV8QURg8QUoJnQXCXvQbFbrQb8AaQb8AcQb8FbQb8MYQb8ScQeAlrQeLhrQjAn3QlFXoQloJgQloSnRTLnvRTrGURTrJTRUJZrRUoJlRUrQnRZrLmRZrMnRZrSnRZ8ATRZ8JbRZ8ScRbMT8RbST3RfGZrRfMX8RfMgrRfSZrRnAbrRnGT8RnvJgRnvLfRnvMTRn8AaSTClvSTJgrSTOXrSTRg3STRnvSToAcSToAfSToAnSToHnSToLjSToMTSTrAaSTrEUST3BYST8AgST8LmSUAZvSUAgrSUDT4SUDT8SUGgvSUJXoSUJXvSULTrSU8JTSU8LjSV8AnSV8JgSXFToSXLf8SYvAnSZrDUSZrMUSZrMnSZ8HgSZ8JTSZ8JgSZ8MYSZ8QUSaQUoSbCT3SbHToSbQYvSbSl4SboJnSbvFbSb8HbSb8JgSb8OTScGZrScHgrScJTvScMT8ScSToScoHbScrMTScvAnSeAZrSeAcrSeHboSeJUoSeLhrSeMT8SeMXrSe6JgSgHTrSkJnoSkLnvSk8CUSlFl3SlrSnSl8GnSmAboSmGT8SmJU8\",\n \"ATLnDlATrAZoATrJX4ATrMT8ATrMX4ATrRTrATvDl8ATvJUoATvMl8AT3AToAT3MX8AT8CT3AT8DT8AT8HZrAT8HgoAUAgFnAUCTFnAXoMX8AXrAT8AXrGgvAXrJXvAXrOgoAXvLl3AZvAgoAZvFbrAZvJXoAZvJl8AZvJn3AZvMX8AZvSbrAZ8FZoAZ8LZ8AZ8MU8AZ8OTvAZ8SV8AZ8SX3AbAgFZAboJnoAbvGboAb8ATrAb8AZoAb8AgrAb8Al4Ab8Db8Ab8JnoAb8LX4Ab8LZrAb8LhrAb8MT8Ab8OUoAb8Qb8Ab8ST8AcrAUoAcrAc8AcrCZ3AcrFT3AcrFZrAcrJl4AcrJn3AcrMX3AcrOTvAc8AZ8Ac8MT8AfAcJXAgoFn4AgoGgvAgoGnrAgoLc8AgoMXoAgrLnrAkrSZ8AlFXCTAloHboAlrHbrAlrLhrAlrLkoAl3CZrAl3LUoAl3LZrAnrAl4AnrMT8An3HT4BT3IToBX4MnvBb!Ln$CTGXMnCToLZ4CTrHT8CT3JTrCT3RZrCT#GTvCU6GgvCU8Db8CU8GZrCU8HT8CboLl3CbrGgrCbrMU8Cb8DT3Cb8GnrCb8LX4Cb8MT8Cb8ObrCgrGgvCgrKX4Cl8FZoDTrAbvDTrDboDTrGT6DTrJgrDTrMX3DTrRZrDTrRg8DTvAVvDTvFZoDT3DT8DT3Ln3DT4HZrDT4MT8DT8AlrDT8MT8DUAkGbDUDbJnDYLnQlDbDUOYDbMTAnDbMXSnDboAT3DboFn4DboLnvDj6JTrGTCgFTGTGgFnGTJTMnGTLnPlGToJT8GTrCT3GTrLVoGTrLnvGTrMX3GTrMboGTvKl3GZClFnGZrDT3GZ8DTrGZ8FZ8GZ8MXvGZ8On8GZ8ST3GbCnQXGbMbFnGboFboGboJg3GboMXoGb3JTvGb3JboGb3Mn6Gb3Qb8GgDXLjGgMnAUGgrDloGgrHX4GgrSToGgvAXrGgvAZvGgvFbrGgvLl3GgvMnvGnDnLXGnrATrGnrMboGnuLl3HTATMnHTAgCnHTCTCTHTrGTvHTrHTvHTrJX8HTrLl8HTrMT8HTrMgoHTrOTrHTuOn3HTvAZrHTvDTvHTvGboHTvJU8HTvLl3HTvMXrHTvQb4HT4GT6HT4JT8HT4Jb#HT8Al3HT8GZrHT8GgrHT8HX4HT8Jb8HT8JnoHT8LTrHT8LgvHT8SToHT8SV8HUoJUoHUoJX8HUoLnrHXrLZoHXvAl3HX3LnrHX4FkvHX4LhrHX4MXoHX4OnoHZrAZ8HZrDb8HZrGZ8HZrJnrHZvGZ8HZvLnvHZ8JnvHZ8LhrHbCXJlHbMTAnHboJl4HbpLl3HbrJX8HbrLnrHbrMnvHbvRYrHgoSTrHgrFV8HgrGZ8HgrJXoHgrRnvHgvBb!HgvGTrHgvHX4HgvHn!HgvLTrHgvSU8HnDnLbHnFbJbHnvDn8Hn6GgvHn!BTvJTCTLnJTQgFnJTrAnvJTrLX4JTrOUoJTvFn3JTvLnrJTvNToJT3AgoJT3Jn4JT3LhvJT3ObrJT8AcrJT8Al3JT8JT8JT8JnoJT8LX4JT8LnrJT8MX3JT8Rg3JT8Sc8JUoBTvJU8AToJU8GZ8JU8GgvJU8JTrJU8JXrJU8JnrJU8LnvJU8ScvJXHnJlJXrGgvJXrJU8JXrLhrJXrMT8JXrMXrJXrQUoJXvCTvJXvGZ8JXvGgrJXvQT8JX8Ab8JX8DT8JX8GZ8JX8HZvJX8LnrJX8MT8JX8MXoJX8MnvJX8ST3JYGnCTJbAkGbJbCTAnJbLTAcJboDT3JboLb6JbrAnvJbrCn3JbrDl8JbrGboJbrIZoJbrJnvJbrMnvJbrQb4Jb8RZrJeAbAnJgJnFbJgScAnJgrATrJgvHZ8JgvMn4JlJlFbJlLiQXJlLjOnJlRbOlJlvNXoJlvRl3Jl4AcrJl8AUoJl8MnrJnFnMlJnHgGbJnoDT8JnoFV8JnoGgvJnoIT8JnoQToJnoRg3JnrCZ3JnrGgrJnrHTvJnrLf8JnrOX8JnvAT3JnvFZoJnvGT8JnvJl4JnvMT8JnvMX8JnvOXrJnvPX6JnvSX3JnvSZrJn3MT8Jn3MX8Jn3RTrLTATKnLTJnLTLTMXKnLTRTQlLToGb8LTrAZ8LTrCZ8LTrDb8LTrHT8LT3PX6LT4FZoLT$CTvLT$GgrLUvHX3LVoATrLVoAgoLVoJboLVoMX3LVoRg3LV8CZ3LV8FZoLV8GTvLXrDXoLXrFbrLXvAgvLXvFlrLXvLl3LXvRn6LX4Mb8LX8GT8LYCXMnLYrMnrLZoSTvLZrAZvLZrAloLZrFToLZrJXvLZrJboLZrJl4LZrLnrLZrMT8LZrOgvLZrRnvLZrST4LZvMX8LZvSlvLZ8AgoLZ8CT3LZ8JT8LZ8LV8LZ8LZoLZ8Lg8LZ8SV8LZ8SbrLZ$HT8LZ$Mn4La6CTvLbFbMnLbRYFTLbSnFZLboJT8LbrAT9LbrGb3LbrQb8LcrJX8LcrMXrLerHTvLerJbrLerNboLgrDb8LgrGZ8LgrHTrLgrMXrLgrSU8LgvJTrLgvLl3Lg6Ll3LhrLnrLhrMT8LhvAl4LiLnQXLkoAgrLkoJT8LkoJn4LlrSU8Ll3FZoLl3HTrLl3JX8Ll3JnoLl3LToLmLeFbLnDUFbLnLVAnLnrATrLnrAZoLnrAb8LnrAlrLnrGgvLnrJU8LnrLZrLnrLhrLnrMb8LnrOXrLnrSZ8LnvAb4LnvDTrLnvDl8LnvHTrLnvHbrLnvJT8LnvJU8LnvJbrLnvLhvLnvMX8LnvMb8LnvNnoLnvSU8Ln3Al3Ln4FZoLn4GT6Ln4JgvLn4LhrLn4MT8Ln4SToMToCZrMToJX8MToLX4MToLf8MToRg3MTrEloMTvGb6MT3BTrMT3Lb6MT8AcrMT8AgrMT8GZrMT8JnoMT8LnrMT8MX3MUOUAnMXAbFnMXoAloMXoJX8MXoLf8MXoLl8MXrAb8MXrDTvMXrGT8MXrGgrMXrHTrMXrLf8MXrMU8MXrOXvMXrQb8MXvGT8MXvHTrMXvLVoMX3AX3MX3Jn3MX3LhrMX3MX3MX4AlrMX4OboMX8GTvMX8GZrMX8GgrMX8JT8MX8JX8MX8LhrMX8MT8MYDUFbMYMgDbMbGnFfMbvLX4MbvLl3Mb8Mb8Mb8ST4MgGXCnMg8ATrMg8AgoMg8CZrMg8DTrMg8DboMg8HTrMg8JgrMg8LT8MloJXoMl8AhrMl8JT8MnLgAUMnoJXrMnoLX4MnoLhrMnoMT8MnrAl4MnrDb8MnrOTvMnrOgvMnrQb8MnrSU8MnvGgrMnvHZ8Mn3MToMn4DTrMn4LTrMn4Mg8NnBXAnOTFTFnOToAToOTrGgvOTrJX8OT3JXoOT6MTrOT8GgrOT8HTpOT8MToOUoHT8OUoJT8OUoLn3OXrAgoOXrDg8OXrMT8OXvSToOX6CTvOX8CZrOX8OgrOb6HgvOb8AToOb8MT8OcvLZ8OgvAlrOgvHTvOgvJTrOgvJnrOgvLZrOgvLn4OgvMT8OgvRTrOg8AZoOg8DbvOnrOXoOnvJn4OnvLhvOnvRTrOn3GgoOn3JnvOn6JbvOn8OTrPTGYFTPbBnFnPbGnDnPgDYQTPlrAnvPlrETvPlrLnvPlrMXvPlvFX4QTMTAnQTrJU8QYCnJlQYJlQlQbGTQbQb8JnrQb8LZoQb8LnvQb8MT8Qb8Ml8Qb8ST4QloAl4QloHZvQloJX8QloMn8QnJZOlRTrAZvRTrDTrRTvJn4RTvLhvRT4Jb8RZrAZrRZ8AkrRZ8JU8RZ8LV8RZ8LnvRbJlQXRg3GboRg3MnvRg8AZ8Rg8JboRg8Jl4RnLTCbRnvFl3RnvQb8SToAl4SToCZrSToFZoSToHXrSToJU8SToJgvSToJl4SToLhrSToMX3STrAlvSTrCT9STrCgrSTrGgrSTrHXrSTrHboSTrJnoSTrNboSTvLnrST4AZoST8Ab8ST8JT8SUoJn3SU6HZ#SU6JTvSU8Db8SU8HboSU8LgrSV8JT8SZrAcrSZrAl3SZrJT8SZrJnvSZrMT8SZvLUoSZ4FZoSZ8JnoSZ8RZrScoLnrScoMT8ScoMX8ScrAT4ScrAZ8ScrLZ8ScrLkvScvDb8ScvLf8ScvNToSgrFZrShvKnrSloHUoSloLnrSlrMXoSl8HgrSmrJUoSn3BX6\",\n \"ATFlOn3ATLgrDYAT4MTAnAT8LTMnAYJnRTrAbGgJnrAbLV8LnAbvNTAnAeFbLg3AgOYMXoAlQbFboAnDboAfAnJgoJTBToDgAnBUJbAl3BboDUAnCTDlvLnCTFTrSnCYoQTLnDTwAbAnDUDTrSnDUHgHgrDX8LXFnDbJXAcrETvLTLnGTFTQbrGTMnGToGT3DUFbGUJlPX3GbQg8LnGboJbFnGb3GgAYGgAg8ScGgMbAXrGgvAbAnGnJTLnvGnvATFgHTDT6ATHTrDlJnHYLnMn8HZrSbJTHZ8LTFnHbFTJUoHgSeMT8HgrLjAnHgvAbAnHlFUrDlHnDgvAnHnHTFT3HnQTGnrJTAaMXvJTGbCn3JTOgrAnJXvAXMnJbMg8SnJbMnRg3Jb8LTMnJnAl3OnJnGYrQlJnJlQY3LTDlCn3LTJjLg3LTLgvFXLTMg3GTLV8HUOgLXFZLg3LXNXrMnLX8QXFnLX9AlMYLYLXPXrLZAbJU8LZDUJU8LZMXrSnLZ$AgFnLaPXrDULbFYrMnLbMn8LXLboJgJgLeFbLg3LgLZrSnLgOYAgoLhrRnJlLkCTrSnLkOnLhrLnFX%AYLnFZoJXLnHTvJbLnLloAbMTATLf8MTHgJn3MTMXrAXMT3MTFnMUITvFnMXFX%AYMXMXvFbMXrFTDbMYAcMX3MbLf8SnMb8JbFnMgMXrMTMgvAXFnMgvGgCmMnAloSnMnFnJTrOXvMXSnOX8HTMnObJT8ScObLZFl3ObMXCZoPTLgrQXPUFnoQXPU3RXJlPX3RkQXPbrJXQlPlrJbFnQUAhrDbQXGnCXvQYLnHlvQbLfLnvRTOgvJbRXJYrQlRYLnrQlRbLnrQlRlFT8JlRlFnrQXSTClCn3STHTrAnSTLZQlrSTMnGTrSToHgGbSTrGTDnSTvGXCnST3HgFbSU3HXAXSbAnJn3SbFT8LnScLfLnv\",\n \"AT3JgJX8AT8FZoSnAT8JgFV8AT8LhrDbAZ8JT8DbAb8GgLhrAb8SkLnvAe8MT8SnAlMYJXLVAl3GYDTvAl3LfLnvBUDTvLl3CTOn3HTrCT3DUGgrCU8MT8AbCbFTrJUoCgrDb8MTDTLV8JX8DTLnLXQlDT8LZrSnDUQb8FZ8DUST4JnvDb8ScOUoDj6GbJl4GTLfCYMlGToAXvFnGboAXvLnGgAcrJn3GgvFnSToGnLf8JnvGn#HTDToHTLnFXJlHTvATFToHTvHTDToHTvMTAgoHT3STClvHT4AlFl6HT8HTDToHUoDgJTrHUoScMX3HbRZrMXoHboJg8LTHgDb8JTrHgMToLf8HgvLnLnoHnHn3HT4Hn6MgvAnJTJU8ScvJT3AaQT8JT8HTrAnJXrRg8AnJbAloMXoJbrATFToJbvMnoSnJgDb6GgvJgDb8MXoJgSX3JU8JguATFToJlPYLnQlJlQkDnLbJlQlFYJlJl8Lf8OTJnCTFnLbJnLTHXMnJnLXGXCnJnoFfRg3JnrMYRg3Jn3HgFl3KT8Dg8LnLTRlFnPTLTvPbLbvLVoSbrCZLXMY6HT3LXNU7DlrLXNXDTATLX8DX8LnLZDb8JU8LZMnoLhrLZSToJU8LZrLaLnrLZvJn3SnLZ8LhrSnLaJnoMT8LbFlrHTvLbrFTLnrLbvATLlvLb6OTFn3LcLnJZOlLeAT6Mn4LeJT3ObrLg6LXFlrLhrJg8LnLhvDlPX4LhvLfLnvLj6JTFT3LnFbrMXoLnQluCTvLnrQXCY6LnvLfLnvLnvMgLnvLnvSeLf8MTMbrJn3MT3JgST3MT8AnATrMT8LULnrMUMToCZrMUScvLf8MXoDT8SnMX6ATFToMX8AXMT8MX8FkMT8MX8HTrDUMX8ScoSnMYJT6CTvMgAcrMXoMg8SToAfMlvAXLg3MnFl3AnvOT3AnFl3OUoATHT8OU3RnLXrOXrOXrSnObPbvFn6Og8HgrSnOg8OX8DbPTvAgoJgPU3RYLnrPXrDnJZrPb8CTGgvPlrLTDlvPlvFUJnoQUvFXrQlQeMnoAl3QlrQlrSnRTFTrJUoSTDlLiLXSTFg6HT3STJgoMn4STrFTJTrSTrLZFl3ST4FnMXoSUrDlHUoScvHTvSnSfLkvMXo\",\n \"AUoAcrMXoAZ8HboAg8AbOg6ATFgAg8AloMXoAl3AT8JTrAl8MX8MXoCT3SToJU8Cl8Db8MXoDT8HgrATrDboOT8MXoGTOTrATMnGT8LhrAZ8GnvFnGnQXHToGgvAcrHTvAXvLl3HbrAZoMXoHgBlFXLg3HgMnFXrSnHgrSb8JUoHn6HT8LgvITvATrJUoJUoLZrRnvJU8HT8Jb8JXvFX8QT8JXvLToJTrJYrQnGnQXJgrJnoATrJnoJU8ScvJnvMnvMXoLTCTLgrJXLTJlRTvQlLbRnJlQYvLbrMb8LnvLbvFn3RnoLdCVSTGZrLeSTvGXCnLg3MnoLn3MToLlrETvMT8SToAl3MbrDU6GTvMb8LX4LhrPlrLXGXCnSToLf8Rg3STrDb8LTrSTvLTHXMnSb3RYLnMnSgOg6ATFg\",\n \"HUDlGnrQXrJTrHgLnrAcJYMb8DULc8LTvFgGnCk3Mg8JbAnLX4QYvFYHnMXrRUoJnGnvFnRlvFTJlQnoSTrBXHXrLYSUJgLfoMT8Se8DTrHbDb\",\n \"AbDl8SToJU8An3RbAb8ST8DUSTrGnrAgoLbFU6Db8LTrMg8AaHT8Jb8ObDl8SToJU8Pb3RlvFYoJl\"\n ];\n var codes = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*\";\n function getHangul(code) {\n if (code >= 40) {\n code = code + 168 - 40;\n } else if (code >= 19) {\n code = code + 97 - 19;\n }\n return (0, strings_1.toUtf8String)([225, (code >> 6) + 132, (code & 63) + 128]);\n }\n var wordlist = null;\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = [];\n data.forEach(function(data2, length) {\n length += 4;\n for (var i3 = 0; i3 < data2.length; i3 += length) {\n var word = \"\";\n for (var j2 = 0; j2 < length; j2++) {\n word += getHangul(codes.indexOf(data2[i3 + j2]));\n }\n wordlist.push(word);\n }\n });\n wordlist.sort();\n if (wordlist_1.Wordlist.check(lang) !== \"0xf9eddeace9c5d3da9c93cf7d3cd38f6a13ed3affb933259ae865714e8a3ae71a\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for ko (Korean) FAILED\");\n }\n }\n var LangKo = (\n /** @class */\n function(_super) {\n __extends4(LangKo2, _super);\n function LangKo2() {\n return _super.call(this, \"ko\") || this;\n }\n LangKo2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangKo2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n return LangKo2;\n }(wordlist_1.Wordlist)\n );\n var langKo = new LangKo();\n exports3.langKo = langKo;\n wordlist_1.Wordlist.register(langKo);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-it.js\n var require_lang_it = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-it.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langIt = void 0;\n var wordlist_1 = require_wordlist();\n var words = \"AbacoAbbaglioAbbinatoAbeteAbissoAbolireAbrasivoAbrogatoAccadereAccennoAccusatoAcetoneAchilleAcidoAcquaAcreAcrilicoAcrobataAcutoAdagioAddebitoAddomeAdeguatoAderireAdipeAdottareAdulareAffabileAffettoAffissoAffrantoAforismaAfosoAfricanoAgaveAgenteAgevoleAggancioAgireAgitareAgonismoAgricoloAgrumetoAguzzoAlabardaAlatoAlbatroAlberatoAlboAlbumeAlceAlcolicoAlettoneAlfaAlgebraAlianteAlibiAlimentoAllagatoAllegroAllievoAllodolaAllusivoAlmenoAlogenoAlpacaAlpestreAltalenaAlternoAlticcioAltroveAlunnoAlveoloAlzareAmalgamaAmanitaAmarenaAmbitoAmbratoAmebaAmericaAmetistaAmicoAmmassoAmmendaAmmirareAmmonitoAmoreAmpioAmpliareAmuletoAnacardoAnagrafeAnalistaAnarchiaAnatraAncaAncellaAncoraAndareAndreaAnelloAngeloAngolareAngustoAnimaAnnegareAnnidatoAnnoAnnuncioAnonimoAnticipoAnziApaticoAperturaApodeApparireAppetitoAppoggioApprodoAppuntoAprileArabicaArachideAragostaAraldicaArancioAraturaArazzoArbitroArchivioArditoArenileArgentoArgineArgutoAriaArmoniaArneseArredatoArringaArrostoArsenicoArsoArteficeArzilloAsciuttoAscoltoAsepsiAsetticoAsfaltoAsinoAsolaAspiratoAsproAssaggioAsseAssolutoAssurdoAstaAstenutoAsticeAstrattoAtavicoAteismoAtomicoAtonoAttesaAttivareAttornoAttritoAttualeAusilioAustriaAutistaAutonomoAutunnoAvanzatoAvereAvvenireAvvisoAvvolgereAzioneAzotoAzzimoAzzurroBabeleBaccanoBacinoBacoBadessaBadilataBagnatoBaitaBalconeBaldoBalenaBallataBalzanoBambinoBandireBaraondaBarbaroBarcaBaritonoBarlumeBaroccoBasilicoBassoBatostaBattutoBauleBavaBavosaBeccoBeffaBelgioBelvaBendaBenevoleBenignoBenzinaBereBerlinaBetaBibitaBiciBidoneBifidoBigaBilanciaBimboBinocoloBiologoBipedeBipolareBirbanteBirraBiscottoBisestoBisnonnoBisonteBisturiBizzarroBlandoBlattaBollitoBonificoBordoBoscoBotanicoBottinoBozzoloBraccioBradipoBramaBrancaBravuraBretellaBrevettoBrezzaBrigliaBrillanteBrindareBroccoloBrodoBronzinaBrulloBrunoBubboneBucaBudinoBuffoneBuioBulboBuonoBurloneBurrascaBussolaBustaCadettoCaducoCalamaroCalcoloCalesseCalibroCalmoCaloriaCambusaCamerataCamiciaCamminoCamolaCampaleCanapaCandelaCaneCaninoCanottoCantinaCapaceCapelloCapitoloCapogiroCapperoCapraCapsulaCarapaceCarcassaCardoCarismaCarovanaCarrettoCartolinaCasaccioCascataCasermaCasoCassoneCastelloCasualeCatastaCatenaCatrameCautoCavilloCedibileCedrataCefaloCelebreCellulareCenaCenoneCentesimoCeramicaCercareCertoCerumeCervelloCesoiaCespoCetoChelaChiaroChiccaChiedereChimeraChinaChirurgoChitarraCiaoCiclismoCifrareCignoCilindroCiottoloCircaCirrosiCitricoCittadinoCiuffoCivettaCivileClassicoClinicaCloroCoccoCodardoCodiceCoerenteCognomeCollareColmatoColoreColposoColtivatoColzaComaCometaCommandoComodoComputerComuneConcisoCondurreConfermaCongelareConiugeConnessoConoscereConsumoContinuoConvegnoCopertoCopioneCoppiaCopricapoCorazzaCordataCoricatoCorniceCorollaCorpoCorredoCorsiaCorteseCosmicoCostanteCotturaCovatoCratereCravattaCreatoCredereCremosoCrescitaCretaCricetoCrinaleCrisiCriticoCroceCronacaCrostataCrucialeCruscaCucireCuculoCuginoCullatoCupolaCuratoreCursoreCurvoCuscinoCustodeDadoDainoDalmataDamerinoDanielaDannosoDanzareDatatoDavantiDavveroDebuttoDecennioDecisoDeclinoDecolloDecretoDedicatoDefinitoDeformeDegnoDelegareDelfinoDelirioDeltaDemenzaDenotatoDentroDepositoDerapataDerivareDerogaDescrittoDesertoDesiderioDesumereDetersivoDevotoDiametroDicembreDiedroDifesoDiffusoDigerireDigitaleDiluvioDinamicoDinnanziDipintoDiplomaDipoloDiradareDireDirottoDirupoDisagioDiscretoDisfareDisgeloDispostoDistanzaDisumanoDitoDivanoDiveltoDividereDivoratoDobloneDocenteDoganaleDogmaDolceDomatoDomenicaDominareDondoloDonoDormireDoteDottoreDovutoDozzinaDragoDruidoDubbioDubitareDucaleDunaDuomoDupliceDuraturoEbanoEccessoEccoEclissiEconomiaEderaEdicolaEdileEditoriaEducareEgemoniaEgliEgoismoEgregioElaboratoElargireEleganteElencatoElettoElevareElficoElicaElmoElsaElusoEmanatoEmblemaEmessoEmiroEmotivoEmozioneEmpiricoEmuloEndemicoEnduroEnergiaEnfasiEnotecaEntrareEnzimaEpatiteEpilogoEpisodioEpocaleEppureEquatoreErarioErbaErbosoEredeEremitaErigereErmeticoEroeErosivoErranteEsagonoEsameEsanimeEsaudireEscaEsempioEsercitoEsibitoEsigenteEsistereEsitoEsofagoEsortatoEsosoEspansoEspressoEssenzaEssoEstesoEstimareEstoniaEstrosoEsultareEtilicoEtnicoEtruscoEttoEuclideoEuropaEvasoEvidenzaEvitatoEvolutoEvvivaFabbricaFaccendaFachiroFalcoFamigliaFanaleFanfaraFangoFantasmaFareFarfallaFarinosoFarmacoFasciaFastosoFasulloFaticareFatoFavolosoFebbreFecolaFedeFegatoFelpaFeltroFemminaFendereFenomenoFermentoFerroFertileFessuraFestivoFettaFeudoFiabaFiduciaFifaFiguratoFiloFinanzaFinestraFinireFioreFiscaleFisicoFiumeFlaconeFlamencoFleboFlemmaFloridoFluenteFluoroFobicoFocacciaFocosoFoderatoFoglioFolataFolcloreFolgoreFondenteFoneticoFoniaFontanaForbitoForchettaForestaFormicaFornaioForoFortezzaForzareFosfatoFossoFracassoFranaFrassinoFratelloFreccettaFrenataFrescoFrigoFrollinoFrondeFrugaleFruttaFucilataFucsiaFuggenteFulmineFulvoFumanteFumettoFumosoFuneFunzioneFuocoFurboFurgoneFuroreFusoFutileGabbianoGaffeGalateoGallinaGaloppoGamberoGammaGaranziaGarboGarofanoGarzoneGasdottoGasolioGastricoGattoGaudioGazeboGazzellaGecoGelatinaGelsoGemelloGemmatoGeneGenitoreGennaioGenotipoGergoGhepardoGhiaccioGhisaGialloGildaGineproGiocareGioielloGiornoGioveGiratoGironeGittataGiudizioGiuratoGiustoGlobuloGlutineGnomoGobbaGolfGomitoGommoneGonfioGonnaGovernoGracileGradoGraficoGrammoGrandeGrattareGravosoGraziaGrecaGreggeGrifoneGrigioGrinzaGrottaGruppoGuadagnoGuaioGuantoGuardareGufoGuidareIbernatoIconaIdenticoIdillioIdoloIdraIdricoIdrogenoIgieneIgnaroIgnoratoIlareIllesoIllogicoIlludereImballoImbevutoImboccoImbutoImmaneImmersoImmolatoImpaccoImpetoImpiegoImportoImprontaInalareInarcareInattivoIncantoIncendioInchinoIncisivoInclusoIncontroIncrocioIncuboIndagineIndiaIndoleIneditoInfattiInfilareInflittoIngaggioIngegnoIngleseIngordoIngrossoInnescoInodoreInoltrareInondatoInsanoInsettoInsiemeInsonniaInsulinaIntasatoInteroIntonacoIntuitoInumidireInvalidoInveceInvitoIperboleIpnoticoIpotesiIppicaIrideIrlandaIronicoIrrigatoIrrorareIsolatoIsotopoIstericoIstitutoIstriceItaliaIterareLabbroLabirintoLaccaLaceratoLacrimaLacunaLaddoveLagoLampoLancettaLanternaLardosoLargaLaringeLastraLatenzaLatinoLattugaLavagnaLavoroLegaleLeggeroLemboLentezzaLenzaLeoneLepreLesivoLessatoLestoLetteraleLevaLevigatoLiberoLidoLievitoLillaLimaturaLimitareLimpidoLineareLinguaLiquidoLiraLiricaLiscaLiteLitigioLivreaLocandaLodeLogicaLombareLondraLongevoLoquaceLorenzoLotoLotteriaLuceLucidatoLumacaLuminosoLungoLupoLuppoloLusingaLussoLuttoMacabroMacchinaMaceroMacinatoMadamaMagicoMagliaMagneteMagroMaiolicaMalafedeMalgradoMalintesoMalsanoMaltoMalumoreManaManciaMandorlaMangiareManifestoMannaroManovraMansardaMantideManubrioMappaMaratonaMarcireMarettaMarmoMarsupioMascheraMassaiaMastinoMaterassoMatricolaMattoneMaturoMazurcaMeandroMeccanicoMecenateMedesimoMeditareMegaMelassaMelisMelodiaMeningeMenoMensolaMercurioMerendaMerloMeschinoMeseMessereMestoloMetalloMetodoMettereMiagolareMicaMicelioMicheleMicroboMidolloMieleMiglioreMilanoMiliteMimosaMineraleMiniMinoreMirinoMirtilloMiscelaMissivaMistoMisurareMitezzaMitigareMitraMittenteMnemonicoModelloModificaModuloMoganoMogioMoleMolossoMonasteroMoncoMondinaMonetarioMonileMonotonoMonsoneMontatoMonvisoMoraMordereMorsicatoMostroMotivatoMotosegaMottoMovenzaMovimentoMozzoMuccaMucosaMuffaMughettoMugnaioMulattoMulinelloMultiploMummiaMuntoMuovereMuraleMusaMuscoloMusicaMutevoleMutoNababboNaftaNanometroNarcisoNariceNarratoNascereNastrareNaturaleNauticaNaviglioNebulosaNecrosiNegativoNegozioNemmenoNeofitaNerettoNervoNessunoNettunoNeutraleNeveNevroticoNicchiaNinfaNitidoNobileNocivoNodoNomeNominaNordicoNormaleNorvegeseNostranoNotareNotiziaNotturnoNovellaNucleoNullaNumeroNuovoNutrireNuvolaNuzialeOasiObbedireObbligoObeliscoOblioOboloObsoletoOccasioneOcchioOccidenteOccorrereOccultareOcraOculatoOdiernoOdorareOffertaOffrireOffuscatoOggettoOggiOgnunoOlandeseOlfattoOliatoOlivaOlogrammaOltreOmaggioOmbelicoOmbraOmegaOmissioneOndosoOnereOniceOnnivoroOnorevoleOntaOperatoOpinioneOppostoOracoloOrafoOrdineOrecchinoOreficeOrfanoOrganicoOrigineOrizzonteOrmaOrmeggioOrnativoOrologioOrrendoOrribileOrtensiaOrticaOrzataOrzoOsareOscurareOsmosiOspedaleOspiteOssaOssidareOstacoloOsteOtiteOtreOttagonoOttimoOttobreOvaleOvestOvinoOviparoOvocitoOvunqueOvviareOzioPacchettoPacePacificoPadellaPadronePaesePagaPaginaPalazzinaPalesarePallidoPaloPaludePandoroPannelloPaoloPaonazzoPapricaParabolaParcellaParerePargoloPariParlatoParolaPartireParvenzaParzialePassivoPasticcaPataccaPatologiaPattumePavonePeccatoPedalarePedonalePeggioPelosoPenarePendicePenisolaPennutoPenombraPensarePentolaPepePepitaPerbenePercorsoPerdonatoPerforarePergamenaPeriodoPermessoPernoPerplessoPersuasoPertugioPervasoPesatorePesistaPesoPestiferoPetaloPettinePetulantePezzoPiacerePiantaPiattinoPiccinoPicozzaPiegaPietraPifferoPigiamaPigolioPigroPilaPiliferoPillolaPilotaPimpantePinetaPinnaPinoloPioggiaPiomboPiramidePireticoPiritePirolisiPitonePizzicoPlaceboPlanarePlasmaPlatanoPlenarioPochezzaPoderosoPodismoPoesiaPoggiarePolentaPoligonoPollicePolmonitePolpettaPolsoPoltronaPolverePomicePomodoroPontePopolosoPorfidoPorosoPorporaPorrePortataPosaPositivoPossessoPostulatoPotassioPoterePranzoPrassiPraticaPreclusoPredicaPrefissoPregiatoPrelievoPremerePrenotarePreparatoPresenzaPretestoPrevalsoPrimaPrincipePrivatoProblemaProcuraProdurreProfumoProgettoProlungaPromessaPronomePropostaProrogaProtesoProvaPrudentePrugnaPruritoPsichePubblicoPudicaPugilatoPugnoPulcePulitoPulsantePuntarePupazzoPupillaPuroQuadroQualcosaQuasiQuerelaQuotaRaccoltoRaddoppioRadicaleRadunatoRafficaRagazzoRagioneRagnoRamarroRamingoRamoRandagioRantolareRapatoRapinaRappresoRasaturaRaschiatoRasenteRassegnaRastrelloRataRavvedutoRealeRecepireRecintoReclutaReconditoRecuperoRedditoRedimereRegalatoRegistroRegolaRegressoRelazioneRemareRemotoRennaReplicaReprimereReputareResaResidenteResponsoRestauroReteRetinaRetoricaRettificaRevocatoRiassuntoRibadireRibelleRibrezzoRicaricaRiccoRicevereRiciclatoRicordoRicredutoRidicoloRidurreRifasareRiflessoRiformaRifugioRigareRigettatoRighelloRilassatoRilevatoRimanereRimbalzoRimedioRimorchioRinascitaRincaroRinforzoRinnovoRinomatoRinsavitoRintoccoRinunciaRinvenireRiparatoRipetutoRipienoRiportareRipresaRipulireRisataRischioRiservaRisibileRisoRispettoRistoroRisultatoRisvoltoRitardoRitegnoRitmicoRitrovoRiunioneRivaRiversoRivincitaRivoltoRizomaRobaRoboticoRobustoRocciaRocoRodaggioRodereRoditoreRogitoRollioRomanticoRompereRonzioRosolareRospoRotanteRotondoRotulaRovescioRubizzoRubricaRugaRullinoRumineRumorosoRuoloRupeRussareRusticoSabatoSabbiareSabotatoSagomaSalassoSaldaturaSalgemmaSalivareSalmoneSaloneSaltareSalutoSalvoSapereSapidoSaporitoSaracenoSarcasmoSartoSassosoSatelliteSatiraSatolloSaturnoSavanaSavioSaziatoSbadiglioSbalzoSbancatoSbarraSbattereSbavareSbendareSbirciareSbloccatoSbocciatoSbrinareSbruffoneSbuffareScabrosoScadenzaScalaScambiareScandaloScapolaScarsoScatenareScavatoSceltoScenicoScettroSchedaSchienaSciarpaScienzaScindereScippoSciroppoScivoloSclerareScodellaScolpitoScompartoSconfortoScoprireScortaScossoneScozzeseScribaScrollareScrutinioScuderiaScultoreScuolaScuroScusareSdebitareSdoganareSeccaturaSecondoSedanoSeggiolaSegnalatoSegregatoSeguitoSelciatoSelettivoSellaSelvaggioSemaforoSembrareSemeSeminatoSempreSensoSentireSepoltoSequenzaSerataSerbatoSerenoSerioSerpenteSerraglioServireSestinaSetolaSettimanaSfaceloSfaldareSfamatoSfarzosoSfaticatoSferaSfidaSfilatoSfingeSfocatoSfoderareSfogoSfoltireSforzatoSfrattoSfruttatoSfuggitoSfumareSfusoSgabelloSgarbatoSgonfiareSgorbioSgrassatoSguardoSibiloSiccomeSierraSiglaSignoreSilenzioSillabaSimboloSimpaticoSimulatoSinfoniaSingoloSinistroSinoSintesiSinusoideSiparioSismaSistoleSituatoSlittaSlogaturaSlovenoSmarritoSmemoratoSmentitoSmeraldoSmilzoSmontareSmottatoSmussatoSnellireSnervatoSnodoSobbalzoSobrioSoccorsoSocialeSodaleSoffittoSognoSoldatoSolenneSolidoSollazzoSoloSolubileSolventeSomaticoSommaSondaSonettoSonniferoSopireSoppesoSopraSorgereSorpassoSorrisoSorsoSorteggioSorvolatoSospiroSostaSottileSpadaSpallaSpargereSpatolaSpaventoSpazzolaSpecieSpedireSpegnereSpelaturaSperanzaSpessoreSpettraleSpezzatoSpiaSpigolosoSpillatoSpinosoSpiraleSplendidoSportivoSposoSprangaSprecareSpronatoSpruzzoSpuntinoSquilloSradicareSrotolatoStabileStaccoStaffaStagnareStampatoStantioStarnutoStaseraStatutoSteloSteppaSterzoStilettoStimaStirpeStivaleStizzosoStonatoStoricoStrappoStregatoStriduloStrozzareStruttoStuccareStufoStupendoSubentroSuccosoSudoreSuggeritoSugoSultanoSuonareSuperboSupportoSurgelatoSurrogatoSussurroSuturaSvagareSvedeseSveglioSvelareSvenutoSveziaSviluppoSvistaSvizzeraSvoltaSvuotareTabaccoTabulatoTacciareTaciturnoTaleTalismanoTamponeTanninoTaraTardivoTargatoTariffaTarpareTartarugaTastoTatticoTavernaTavolataTazzaTecaTecnicoTelefonoTemerarioTempoTemutoTendoneTeneroTensioneTentacoloTeoremaTermeTerrazzoTerzettoTesiTesseratoTestatoTetroTettoiaTifareTigellaTimbroTintoTipicoTipografoTiraggioTiroTitanioTitoloTitubanteTizioTizzoneToccareTollerareToltoTombolaTomoTonfoTonsillaTopazioTopologiaToppaTorbaTornareTorroneTortoraToscanoTossireTostaturaTotanoTraboccoTracheaTrafilaTragediaTralcioTramontoTransitoTrapanoTrarreTraslocoTrattatoTraveTrecciaTremolioTrespoloTributoTrichecoTrifoglioTrilloTrinceaTrioTristezzaTrituratoTrivellaTrombaTronoTroppoTrottolaTrovareTruccatoTubaturaTuffatoTulipanoTumultoTunisiaTurbareTurchinoTutaTutelaUbicatoUccelloUccisoreUdireUditivoUffaUfficioUgualeUlisseUltimatoUmanoUmileUmorismoUncinettoUngereUnghereseUnicornoUnificatoUnisonoUnitarioUnteUovoUpupaUraganoUrgenzaUrloUsanzaUsatoUscitoUsignoloUsuraioUtensileUtilizzoUtopiaVacanteVaccinatoVagabondoVagliatoValangaValgoValicoVallettaValorosoValutareValvolaVampataVangareVanitosoVanoVantaggioVanveraVaporeVaranoVarcatoVarianteVascaVedettaVedovaVedutoVegetaleVeicoloVelcroVelinaVellutoVeloceVenatoVendemmiaVentoVeraceVerbaleVergognaVerificaVeroVerrucaVerticaleVescicaVessilloVestaleVeteranoVetrinaVetustoViandanteVibranteVicendaVichingoVicinanzaVidimareVigiliaVignetoVigoreVileVillanoViminiVincitoreViolaViperaVirgolaVirologoVirulentoViscosoVisioneVispoVissutoVisuraVitaVitelloVittimaVivandaVividoViziareVoceVogaVolatileVolereVolpeVoragineVulcanoZampognaZannaZappatoZatteraZavorraZefiroZelanteZeloZenzeroZerbinoZibettoZincoZirconeZittoZollaZoticoZuccheroZufoloZuluZuppa\";\n var wordlist = null;\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \");\n if (wordlist_1.Wordlist.check(lang) !== \"0x5c1362d88fd4cf614a96f3234941d29f7d37c08c5292fde03bf62c2db6ff7620\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for it (Italian) FAILED\");\n }\n }\n var LangIt = (\n /** @class */\n function(_super) {\n __extends4(LangIt2, _super);\n function LangIt2() {\n return _super.call(this, \"it\") || this;\n }\n LangIt2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangIt2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n return LangIt2;\n }(wordlist_1.Wordlist)\n );\n var langIt = new LangIt();\n exports3.langIt = langIt;\n wordlist_1.Wordlist.register(langIt);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-zh.js\n var require_lang_zh = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-zh.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langZhTw = exports3.langZhCn = void 0;\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var data = \"}aE#4A=Yv&co#4N#6G=cJ&SM#66|/Z#4t&kn~46#4K~4q%b9=IR#7l,mB#7W_X2*dl}Uo~7s}Uf&Iw#9c&cw~6O&H6&wx&IG%v5=IQ~8a&Pv#47$PR&50%Ko&QM&3l#5f,D9#4L|/H&tQ;v0~6n]nN?\";\n function loadWords(lang) {\n if (wordlist[lang.locale] !== null) {\n return;\n }\n wordlist[lang.locale] = [];\n var deltaOffset = 0;\n for (var i3 = 0; i3 < 2048; i3++) {\n var s4 = style.indexOf(data[i3 * 3]);\n var bytes = [\n 228 + (s4 >> 2),\n 128 + codes.indexOf(data[i3 * 3 + 1]),\n 128 + codes.indexOf(data[i3 * 3 + 2])\n ];\n if (lang.locale === \"zh_tw\") {\n var common = s4 % 4;\n for (var i_1 = common; i_1 < 3; i_1++) {\n bytes[i_1] = codes.indexOf(deltaData[deltaOffset++]) + (i_1 == 0 ? 228 : 128);\n }\n }\n wordlist[lang.locale].push((0, strings_1.toUtf8String)(bytes));\n }\n if (wordlist_1.Wordlist.check(lang) !== Checks[lang.locale]) {\n wordlist[lang.locale] = null;\n throw new Error(\"BIP39 Wordlist for \" + lang.locale + \" (Chinese) FAILED\");\n }\n }\n var LangZh = (\n /** @class */\n function(_super) {\n __extends4(LangZh2, _super);\n function LangZh2(country) {\n return _super.call(this, \"zh_\" + country) || this;\n }\n LangZh2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[this.locale][index2];\n };\n LangZh2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist[this.locale].indexOf(word);\n };\n LangZh2.prototype.split = function(mnemonic) {\n mnemonic = mnemonic.replace(/(?:\\u3000| )+/g, \"\");\n return mnemonic.split(\"\");\n };\n return LangZh2;\n }(wordlist_1.Wordlist)\n );\n var langZhCn = new LangZh(\"cn\");\n exports3.langZhCn = langZhCn;\n wordlist_1.Wordlist.register(langZhCn);\n wordlist_1.Wordlist.register(langZhCn, \"zh\");\n var langZhTw = new LangZh(\"tw\");\n exports3.langZhTw = langZhTw;\n wordlist_1.Wordlist.register(langZhTw);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/wordlists.js\n var require_wordlists = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/wordlists.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wordlists = void 0;\n var lang_cz_1 = require_lang_cz();\n var lang_en_1 = require_lang_en();\n var lang_es_1 = require_lang_es();\n var lang_fr_1 = require_lang_fr();\n var lang_ja_1 = require_lang_ja();\n var lang_ko_1 = require_lang_ko();\n var lang_it_1 = require_lang_it();\n var lang_zh_1 = require_lang_zh();\n exports3.wordlists = {\n cz: lang_cz_1.langCz,\n en: lang_en_1.langEn,\n es: lang_es_1.langEs,\n fr: lang_fr_1.langFr,\n it: lang_it_1.langIt,\n ja: lang_ja_1.langJa,\n ko: lang_ko_1.langKo,\n zh: lang_zh_1.langZhCn,\n zh_cn: lang_zh_1.langZhCn,\n zh_tw: lang_zh_1.langZhTw\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/index.js\n var require_lib22 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wordlists = exports3.Wordlist = exports3.logger = void 0;\n var wordlist_1 = require_wordlist();\n Object.defineProperty(exports3, \"logger\", { enumerable: true, get: function() {\n return wordlist_1.logger;\n } });\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return wordlist_1.Wordlist;\n } });\n var wordlists_1 = require_wordlists();\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return wordlists_1.wordlists;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hdnode@5.8.0/node_modules/@ethersproject/hdnode/lib/_version.js\n var require_version17 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hdnode@5.8.0/node_modules/@ethersproject/hdnode/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"hdnode/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hdnode@5.8.0/node_modules/@ethersproject/hdnode/lib/index.js\n var require_lib23 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hdnode@5.8.0/node_modules/@ethersproject/hdnode/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getAccountPath = exports3.isValidMnemonic = exports3.entropyToMnemonic = exports3.mnemonicToEntropy = exports3.mnemonicToSeed = exports3.HDNode = exports3.defaultPath = void 0;\n var basex_1 = require_lib19();\n var bytes_1 = require_lib2();\n var bignumber_1 = require_lib3();\n var strings_1 = require_lib9();\n var pbkdf2_1 = require_lib21();\n var properties_1 = require_lib4();\n var signing_key_1 = require_lib16();\n var sha2_1 = require_lib20();\n var transactions_1 = require_lib17();\n var wordlists_1 = require_lib22();\n var logger_1 = require_lib();\n var _version_1 = require_version17();\n var logger = new logger_1.Logger(_version_1.version);\n var N4 = bignumber_1.BigNumber.from(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n var MasterSecret = (0, strings_1.toUtf8Bytes)(\"Bitcoin seed\");\n var HardenedBit = 2147483648;\n function getUpperMask(bits) {\n return (1 << bits) - 1 << 8 - bits;\n }\n function getLowerMask(bits) {\n return (1 << bits) - 1;\n }\n function bytes32(value) {\n return (0, bytes_1.hexZeroPad)((0, bytes_1.hexlify)(value), 32);\n }\n function base58check2(data) {\n return basex_1.Base58.encode((0, bytes_1.concat)([data, (0, bytes_1.hexDataSlice)((0, sha2_1.sha256)((0, sha2_1.sha256)(data)), 0, 4)]));\n }\n function getWordlist(wordlist) {\n if (wordlist == null) {\n return wordlists_1.wordlists[\"en\"];\n }\n if (typeof wordlist === \"string\") {\n var words = wordlists_1.wordlists[wordlist];\n if (words == null) {\n logger.throwArgumentError(\"unknown locale\", \"wordlist\", wordlist);\n }\n return words;\n }\n return wordlist;\n }\n var _constructorGuard = {};\n exports3.defaultPath = \"m/44'/60'/0'/0/0\";\n var HDNode = (\n /** @class */\n function() {\n function HDNode2(constructorGuard, privateKey, publicKey, parentFingerprint, chainCode, index2, depth, mnemonicOrPath) {\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"HDNode constructor cannot be called directly\");\n }\n if (privateKey) {\n var signingKey = new signing_key_1.SigningKey(privateKey);\n (0, properties_1.defineReadOnly)(this, \"privateKey\", signingKey.privateKey);\n (0, properties_1.defineReadOnly)(this, \"publicKey\", signingKey.compressedPublicKey);\n } else {\n (0, properties_1.defineReadOnly)(this, \"privateKey\", null);\n (0, properties_1.defineReadOnly)(this, \"publicKey\", (0, bytes_1.hexlify)(publicKey));\n }\n (0, properties_1.defineReadOnly)(this, \"parentFingerprint\", parentFingerprint);\n (0, properties_1.defineReadOnly)(this, \"fingerprint\", (0, bytes_1.hexDataSlice)((0, sha2_1.ripemd160)((0, sha2_1.sha256)(this.publicKey)), 0, 4));\n (0, properties_1.defineReadOnly)(this, \"address\", (0, transactions_1.computeAddress)(this.publicKey));\n (0, properties_1.defineReadOnly)(this, \"chainCode\", chainCode);\n (0, properties_1.defineReadOnly)(this, \"index\", index2);\n (0, properties_1.defineReadOnly)(this, \"depth\", depth);\n if (mnemonicOrPath == null) {\n (0, properties_1.defineReadOnly)(this, \"mnemonic\", null);\n (0, properties_1.defineReadOnly)(this, \"path\", null);\n } else if (typeof mnemonicOrPath === \"string\") {\n (0, properties_1.defineReadOnly)(this, \"mnemonic\", null);\n (0, properties_1.defineReadOnly)(this, \"path\", mnemonicOrPath);\n } else {\n (0, properties_1.defineReadOnly)(this, \"mnemonic\", mnemonicOrPath);\n (0, properties_1.defineReadOnly)(this, \"path\", mnemonicOrPath.path);\n }\n }\n Object.defineProperty(HDNode2.prototype, \"extendedKey\", {\n get: function() {\n if (this.depth >= 256) {\n throw new Error(\"Depth too large!\");\n }\n return base58check2((0, bytes_1.concat)([\n this.privateKey != null ? \"0x0488ADE4\" : \"0x0488B21E\",\n (0, bytes_1.hexlify)(this.depth),\n this.parentFingerprint,\n (0, bytes_1.hexZeroPad)((0, bytes_1.hexlify)(this.index), 4),\n this.chainCode,\n this.privateKey != null ? (0, bytes_1.concat)([\"0x00\", this.privateKey]) : this.publicKey\n ]));\n },\n enumerable: false,\n configurable: true\n });\n HDNode2.prototype.neuter = function() {\n return new HDNode2(_constructorGuard, null, this.publicKey, this.parentFingerprint, this.chainCode, this.index, this.depth, this.path);\n };\n HDNode2.prototype._derive = function(index2) {\n if (index2 > 4294967295) {\n throw new Error(\"invalid index - \" + String(index2));\n }\n var path = this.path;\n if (path) {\n path += \"/\" + (index2 & ~HardenedBit);\n }\n var data = new Uint8Array(37);\n if (index2 & HardenedBit) {\n if (!this.privateKey) {\n throw new Error(\"cannot derive child of neutered node\");\n }\n data.set((0, bytes_1.arrayify)(this.privateKey), 1);\n if (path) {\n path += \"'\";\n }\n } else {\n data.set((0, bytes_1.arrayify)(this.publicKey));\n }\n for (var i3 = 24; i3 >= 0; i3 -= 8) {\n data[33 + (i3 >> 3)] = index2 >> 24 - i3 & 255;\n }\n var I2 = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(sha2_1.SupportedAlgorithm.sha512, this.chainCode, data));\n var IL = I2.slice(0, 32);\n var IR = I2.slice(32);\n var ki = null;\n var Ki = null;\n if (this.privateKey) {\n ki = bytes32(bignumber_1.BigNumber.from(IL).add(this.privateKey).mod(N4));\n } else {\n var ek = new signing_key_1.SigningKey((0, bytes_1.hexlify)(IL));\n Ki = ek._addPoint(this.publicKey);\n }\n var mnemonicOrPath = path;\n var srcMnemonic = this.mnemonic;\n if (srcMnemonic) {\n mnemonicOrPath = Object.freeze({\n phrase: srcMnemonic.phrase,\n path,\n locale: srcMnemonic.locale || \"en\"\n });\n }\n return new HDNode2(_constructorGuard, ki, Ki, this.fingerprint, bytes32(IR), index2, this.depth + 1, mnemonicOrPath);\n };\n HDNode2.prototype.derivePath = function(path) {\n var components = path.split(\"/\");\n if (components.length === 0 || components[0] === \"m\" && this.depth !== 0) {\n throw new Error(\"invalid path - \" + path);\n }\n if (components[0] === \"m\") {\n components.shift();\n }\n var result = this;\n for (var i3 = 0; i3 < components.length; i3++) {\n var component = components[i3];\n if (component.match(/^[0-9]+'$/)) {\n var index2 = parseInt(component.substring(0, component.length - 1));\n if (index2 >= HardenedBit) {\n throw new Error(\"invalid path index - \" + component);\n }\n result = result._derive(HardenedBit + index2);\n } else if (component.match(/^[0-9]+$/)) {\n var index2 = parseInt(component);\n if (index2 >= HardenedBit) {\n throw new Error(\"invalid path index - \" + component);\n }\n result = result._derive(index2);\n } else {\n throw new Error(\"invalid path component - \" + component);\n }\n }\n return result;\n };\n HDNode2._fromSeed = function(seed, mnemonic) {\n var seedArray = (0, bytes_1.arrayify)(seed);\n if (seedArray.length < 16 || seedArray.length > 64) {\n throw new Error(\"invalid seed\");\n }\n var I2 = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(sha2_1.SupportedAlgorithm.sha512, MasterSecret, seedArray));\n return new HDNode2(_constructorGuard, bytes32(I2.slice(0, 32)), null, \"0x00000000\", bytes32(I2.slice(32)), 0, 0, mnemonic);\n };\n HDNode2.fromMnemonic = function(mnemonic, password, wordlist) {\n wordlist = getWordlist(wordlist);\n mnemonic = entropyToMnemonic(mnemonicToEntropy(mnemonic, wordlist), wordlist);\n return HDNode2._fromSeed(mnemonicToSeed(mnemonic, password), {\n phrase: mnemonic,\n path: \"m\",\n locale: wordlist.locale\n });\n };\n HDNode2.fromSeed = function(seed) {\n return HDNode2._fromSeed(seed, null);\n };\n HDNode2.fromExtendedKey = function(extendedKey) {\n var bytes = basex_1.Base58.decode(extendedKey);\n if (bytes.length !== 82 || base58check2(bytes.slice(0, 78)) !== extendedKey) {\n logger.throwArgumentError(\"invalid extended key\", \"extendedKey\", \"[REDACTED]\");\n }\n var depth = bytes[4];\n var parentFingerprint = (0, bytes_1.hexlify)(bytes.slice(5, 9));\n var index2 = parseInt((0, bytes_1.hexlify)(bytes.slice(9, 13)).substring(2), 16);\n var chainCode = (0, bytes_1.hexlify)(bytes.slice(13, 45));\n var key = bytes.slice(45, 78);\n switch ((0, bytes_1.hexlify)(bytes.slice(0, 4))) {\n case \"0x0488b21e\":\n case \"0x043587cf\":\n return new HDNode2(_constructorGuard, null, (0, bytes_1.hexlify)(key), parentFingerprint, chainCode, index2, depth, null);\n case \"0x0488ade4\":\n case \"0x04358394 \":\n if (key[0] !== 0) {\n break;\n }\n return new HDNode2(_constructorGuard, (0, bytes_1.hexlify)(key.slice(1)), null, parentFingerprint, chainCode, index2, depth, null);\n }\n return logger.throwArgumentError(\"invalid extended key\", \"extendedKey\", \"[REDACTED]\");\n };\n return HDNode2;\n }()\n );\n exports3.HDNode = HDNode;\n function mnemonicToSeed(mnemonic, password) {\n if (!password) {\n password = \"\";\n }\n var salt = (0, strings_1.toUtf8Bytes)(\"mnemonic\" + password, strings_1.UnicodeNormalizationForm.NFKD);\n return (0, pbkdf2_1.pbkdf2)((0, strings_1.toUtf8Bytes)(mnemonic, strings_1.UnicodeNormalizationForm.NFKD), salt, 2048, 64, \"sha512\");\n }\n exports3.mnemonicToSeed = mnemonicToSeed;\n function mnemonicToEntropy(mnemonic, wordlist) {\n wordlist = getWordlist(wordlist);\n logger.checkNormalize();\n var words = wordlist.split(mnemonic);\n if (words.length % 3 !== 0) {\n throw new Error(\"invalid mnemonic\");\n }\n var entropy = (0, bytes_1.arrayify)(new Uint8Array(Math.ceil(11 * words.length / 8)));\n var offset = 0;\n for (var i3 = 0; i3 < words.length; i3++) {\n var index2 = wordlist.getWordIndex(words[i3].normalize(\"NFKD\"));\n if (index2 === -1) {\n throw new Error(\"invalid mnemonic\");\n }\n for (var bit = 0; bit < 11; bit++) {\n if (index2 & 1 << 10 - bit) {\n entropy[offset >> 3] |= 1 << 7 - offset % 8;\n }\n offset++;\n }\n }\n var entropyBits = 32 * words.length / 3;\n var checksumBits = words.length / 3;\n var checksumMask = getUpperMask(checksumBits);\n var checksum4 = (0, bytes_1.arrayify)((0, sha2_1.sha256)(entropy.slice(0, entropyBits / 8)))[0] & checksumMask;\n if (checksum4 !== (entropy[entropy.length - 1] & checksumMask)) {\n throw new Error(\"invalid checksum\");\n }\n return (0, bytes_1.hexlify)(entropy.slice(0, entropyBits / 8));\n }\n exports3.mnemonicToEntropy = mnemonicToEntropy;\n function entropyToMnemonic(entropy, wordlist) {\n wordlist = getWordlist(wordlist);\n entropy = (0, bytes_1.arrayify)(entropy);\n if (entropy.length % 4 !== 0 || entropy.length < 16 || entropy.length > 32) {\n throw new Error(\"invalid entropy\");\n }\n var indices = [0];\n var remainingBits = 11;\n for (var i3 = 0; i3 < entropy.length; i3++) {\n if (remainingBits > 8) {\n indices[indices.length - 1] <<= 8;\n indices[indices.length - 1] |= entropy[i3];\n remainingBits -= 8;\n } else {\n indices[indices.length - 1] <<= remainingBits;\n indices[indices.length - 1] |= entropy[i3] >> 8 - remainingBits;\n indices.push(entropy[i3] & getLowerMask(8 - remainingBits));\n remainingBits += 3;\n }\n }\n var checksumBits = entropy.length / 4;\n var checksum4 = (0, bytes_1.arrayify)((0, sha2_1.sha256)(entropy))[0] & getUpperMask(checksumBits);\n indices[indices.length - 1] <<= checksumBits;\n indices[indices.length - 1] |= checksum4 >> 8 - checksumBits;\n return wordlist.join(indices.map(function(index2) {\n return wordlist.getWord(index2);\n }));\n }\n exports3.entropyToMnemonic = entropyToMnemonic;\n function isValidMnemonic(mnemonic, wordlist) {\n try {\n mnemonicToEntropy(mnemonic, wordlist);\n return true;\n } catch (error) {\n }\n return false;\n }\n exports3.isValidMnemonic = isValidMnemonic;\n function getAccountPath(index2) {\n if (typeof index2 !== \"number\" || index2 < 0 || index2 >= HardenedBit || index2 % 1) {\n logger.throwArgumentError(\"invalid account index\", \"index\", index2);\n }\n return \"m/44'/60'/\" + index2 + \"'/0/0\";\n }\n exports3.getAccountPath = getAccountPath;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/_version.js\n var require_version18 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"random/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/browser-random.js\n var require_browser_random = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/browser-random.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.randomBytes = void 0;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version18();\n var logger = new logger_1.Logger(_version_1.version);\n function getGlobal() {\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw new Error(\"unable to locate global object\");\n }\n var anyGlobal = getGlobal();\n var crypto4 = anyGlobal.crypto || anyGlobal.msCrypto;\n if (!crypto4 || !crypto4.getRandomValues) {\n logger.warn(\"WARNING: Missing strong random number source\");\n crypto4 = {\n getRandomValues: function(buffer2) {\n return logger.throwError(\"no secure random source avaialble\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"crypto.getRandomValues\"\n });\n }\n };\n }\n function randomBytes3(length) {\n if (length <= 0 || length > 1024 || length % 1 || length != length) {\n logger.throwArgumentError(\"invalid length\", \"length\", length);\n }\n var result = new Uint8Array(length);\n crypto4.getRandomValues(result);\n return (0, bytes_1.arrayify)(result);\n }\n exports3.randomBytes = randomBytes3;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/shuffle.js\n var require_shuffle = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/shuffle.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.shuffled = void 0;\n function shuffled(array) {\n array = array.slice();\n for (var i3 = array.length - 1; i3 > 0; i3--) {\n var j2 = Math.floor(Math.random() * (i3 + 1));\n var tmp = array[i3];\n array[i3] = array[j2];\n array[j2] = tmp;\n }\n return array;\n }\n exports3.shuffled = shuffled;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/index.js\n var require_lib24 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.shuffled = exports3.randomBytes = void 0;\n var random_1 = require_browser_random();\n Object.defineProperty(exports3, \"randomBytes\", { enumerable: true, get: function() {\n return random_1.randomBytes;\n } });\n var shuffle_1 = require_shuffle();\n Object.defineProperty(exports3, \"shuffled\", { enumerable: true, get: function() {\n return shuffle_1.shuffled;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@3.0.0/node_modules/aes-js/index.js\n var require_aes_js = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@3.0.0/node_modules/aes-js/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(root) {\n function checkInt(value) {\n return parseInt(value) === value;\n }\n function checkInts(arrayish) {\n if (!checkInt(arrayish.length)) {\n return false;\n }\n for (var i3 = 0; i3 < arrayish.length; i3++) {\n if (!checkInt(arrayish[i3]) || arrayish[i3] < 0 || arrayish[i3] > 255) {\n return false;\n }\n }\n return true;\n }\n function coerceArray(arg, copy) {\n if (arg.buffer && ArrayBuffer.isView(arg) && arg.name === \"Uint8Array\") {\n if (copy) {\n if (arg.slice) {\n arg = arg.slice();\n } else {\n arg = Array.prototype.slice.call(arg);\n }\n }\n return arg;\n }\n if (Array.isArray(arg)) {\n if (!checkInts(arg)) {\n throw new Error(\"Array contains invalid value: \" + arg);\n }\n return new Uint8Array(arg);\n }\n if (checkInt(arg.length) && checkInts(arg)) {\n return new Uint8Array(arg);\n }\n throw new Error(\"unsupported array-like object\");\n }\n function createArray(length) {\n return new Uint8Array(length);\n }\n function copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) {\n if (sourceStart != null || sourceEnd != null) {\n if (sourceArray.slice) {\n sourceArray = sourceArray.slice(sourceStart, sourceEnd);\n } else {\n sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd);\n }\n }\n targetArray.set(sourceArray, targetStart);\n }\n var convertUtf8 = /* @__PURE__ */ function() {\n function toBytes6(text) {\n var result = [], i3 = 0;\n text = encodeURI(text);\n while (i3 < text.length) {\n var c4 = text.charCodeAt(i3++);\n if (c4 === 37) {\n result.push(parseInt(text.substr(i3, 2), 16));\n i3 += 2;\n } else {\n result.push(c4);\n }\n }\n return coerceArray(result);\n }\n function fromBytes5(bytes) {\n var result = [], i3 = 0;\n while (i3 < bytes.length) {\n var c4 = bytes[i3];\n if (c4 < 128) {\n result.push(String.fromCharCode(c4));\n i3++;\n } else if (c4 > 191 && c4 < 224) {\n result.push(String.fromCharCode((c4 & 31) << 6 | bytes[i3 + 1] & 63));\n i3 += 2;\n } else {\n result.push(String.fromCharCode((c4 & 15) << 12 | (bytes[i3 + 1] & 63) << 6 | bytes[i3 + 2] & 63));\n i3 += 3;\n }\n }\n return result.join(\"\");\n }\n return {\n toBytes: toBytes6,\n fromBytes: fromBytes5\n };\n }();\n var convertHex = /* @__PURE__ */ function() {\n function toBytes6(text) {\n var result = [];\n for (var i3 = 0; i3 < text.length; i3 += 2) {\n result.push(parseInt(text.substr(i3, 2), 16));\n }\n return result;\n }\n var Hex = \"0123456789abcdef\";\n function fromBytes5(bytes) {\n var result = [];\n for (var i3 = 0; i3 < bytes.length; i3++) {\n var v2 = bytes[i3];\n result.push(Hex[(v2 & 240) >> 4] + Hex[v2 & 15]);\n }\n return result.join(\"\");\n }\n return {\n toBytes: toBytes6,\n fromBytes: fromBytes5\n };\n }();\n var numberOfRounds = { 16: 10, 24: 12, 32: 14 };\n var rcon = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145];\n var S3 = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22];\n var Si = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125];\n var T1 = [3328402341, 4168907908, 4000806809, 4135287693, 4294111757, 3597364157, 3731845041, 2445657428, 1613770832, 33620227, 3462883241, 1445669757, 3892248089, 3050821474, 1303096294, 3967186586, 2412431941, 528646813, 2311702848, 4202528135, 4026202645, 2992200171, 2387036105, 4226871307, 1101901292, 3017069671, 1604494077, 1169141738, 597466303, 1403299063, 3832705686, 2613100635, 1974974402, 3791519004, 1033081774, 1277568618, 1815492186, 2118074177, 4126668546, 2211236943, 1748251740, 1369810420, 3521504564, 4193382664, 3799085459, 2883115123, 1647391059, 706024767, 134480908, 2512897874, 1176707941, 2646852446, 806885416, 932615841, 168101135, 798661301, 235341577, 605164086, 461406363, 3756188221, 3454790438, 1311188841, 2142417613, 3933566367, 302582043, 495158174, 1479289972, 874125870, 907746093, 3698224818, 3025820398, 1537253627, 2756858614, 1983593293, 3084310113, 2108928974, 1378429307, 3722699582, 1580150641, 327451799, 2790478837, 3117535592, 0, 3253595436, 1075847264, 3825007647, 2041688520, 3059440621, 3563743934, 2378943302, 1740553945, 1916352843, 2487896798, 2555137236, 2958579944, 2244988746, 3151024235, 3320835882, 1336584933, 3992714006, 2252555205, 2588757463, 1714631509, 293963156, 2319795663, 3925473552, 67240454, 4269768577, 2689618160, 2017213508, 631218106, 1269344483, 2723238387, 1571005438, 2151694528, 93294474, 1066570413, 563977660, 1882732616, 4059428100, 1673313503, 2008463041, 2950355573, 1109467491, 537923632, 3858759450, 4260623118, 3218264685, 2177748300, 403442708, 638784309, 3287084079, 3193921505, 899127202, 2286175436, 773265209, 2479146071, 1437050866, 4236148354, 2050833735, 3362022572, 3126681063, 840505643, 3866325909, 3227541664, 427917720, 2655997905, 2749160575, 1143087718, 1412049534, 999329963, 193497219, 2353415882, 3354324521, 1807268051, 672404540, 2816401017, 3160301282, 369822493, 2916866934, 3688947771, 1681011286, 1949973070, 336202270, 2454276571, 201721354, 1210328172, 3093060836, 2680341085, 3184776046, 1135389935, 3294782118, 965841320, 831886756, 3554993207, 4068047243, 3588745010, 2345191491, 1849112409, 3664604599, 26054028, 2983581028, 2622377682, 1235855840, 3630984372, 2891339514, 4092916743, 3488279077, 3395642799, 4101667470, 1202630377, 268961816, 1874508501, 4034427016, 1243948399, 1546530418, 941366308, 1470539505, 1941222599, 2546386513, 3421038627, 2715671932, 3899946140, 1042226977, 2521517021, 1639824860, 227249030, 260737669, 3765465232, 2084453954, 1907733956, 3429263018, 2420656344, 100860677, 4160157185, 470683154, 3261161891, 1781871967, 2924959737, 1773779408, 394692241, 2579611992, 974986535, 664706745, 3655459128, 3958962195, 731420851, 571543859, 3530123707, 2849626480, 126783113, 865375399, 765172662, 1008606754, 361203602, 3387549984, 2278477385, 2857719295, 1344809080, 2782912378, 59542671, 1503764984, 160008576, 437062935, 1707065306, 3622233649, 2218934982, 3496503480, 2185314755, 697932208, 1512910199, 504303377, 2075177163, 2824099068, 1841019862, 739644986];\n var T22 = [2781242211, 2230877308, 2582542199, 2381740923, 234877682, 3184946027, 2984144751, 1418839493, 1348481072, 50462977, 2848876391, 2102799147, 434634494, 1656084439, 3863849899, 2599188086, 1167051466, 2636087938, 1082771913, 2281340285, 368048890, 3954334041, 3381544775, 201060592, 3963727277, 1739838676, 4250903202, 3930435503, 3206782108, 4149453988, 2531553906, 1536934080, 3262494647, 484572669, 2923271059, 1783375398, 1517041206, 1098792767, 49674231, 1334037708, 1550332980, 4098991525, 886171109, 150598129, 2481090929, 1940642008, 1398944049, 1059722517, 201851908, 1385547719, 1699095331, 1587397571, 674240536, 2704774806, 252314885, 3039795866, 151914247, 908333586, 2602270848, 1038082786, 651029483, 1766729511, 3447698098, 2682942837, 454166793, 2652734339, 1951935532, 775166490, 758520603, 3000790638, 4004797018, 4217086112, 4137964114, 1299594043, 1639438038, 3464344499, 2068982057, 1054729187, 1901997871, 2534638724, 4121318227, 1757008337, 0, 750906861, 1614815264, 535035132, 3363418545, 3988151131, 3201591914, 1183697867, 3647454910, 1265776953, 3734260298, 3566750796, 3903871064, 1250283471, 1807470800, 717615087, 3847203498, 384695291, 3313910595, 3617213773, 1432761139, 2484176261, 3481945413, 283769337, 100925954, 2180939647, 4037038160, 1148730428, 3123027871, 3813386408, 4087501137, 4267549603, 3229630528, 2315620239, 2906624658, 3156319645, 1215313976, 82966005, 3747855548, 3245848246, 1974459098, 1665278241, 807407632, 451280895, 251524083, 1841287890, 1283575245, 337120268, 891687699, 801369324, 3787349855, 2721421207, 3431482436, 959321879, 1469301956, 4065699751, 2197585534, 1199193405, 2898814052, 3887750493, 724703513, 2514908019, 2696962144, 2551808385, 3516813135, 2141445340, 1715741218, 2119445034, 2872807568, 2198571144, 3398190662, 700968686, 3547052216, 1009259540, 2041044702, 3803995742, 487983883, 1991105499, 1004265696, 1449407026, 1316239930, 504629770, 3683797321, 168560134, 1816667172, 3837287516, 1570751170, 1857934291, 4014189740, 2797888098, 2822345105, 2754712981, 936633572, 2347923833, 852879335, 1133234376, 1500395319, 3084545389, 2348912013, 1689376213, 3533459022, 3762923945, 3034082412, 4205598294, 133428468, 634383082, 2949277029, 2398386810, 3913789102, 403703816, 3580869306, 2297460856, 1867130149, 1918643758, 607656988, 4049053350, 3346248884, 1368901318, 600565992, 2090982877, 2632479860, 557719327, 3717614411, 3697393085, 2249034635, 2232388234, 2430627952, 1115438654, 3295786421, 2865522278, 3633334344, 84280067, 33027830, 303828494, 2747425121, 1600795957, 4188952407, 3496589753, 2434238086, 1486471617, 658119965, 3106381470, 953803233, 334231800, 3005978776, 857870609, 3151128937, 1890179545, 2298973838, 2805175444, 3056442267, 574365214, 2450884487, 550103529, 1233637070, 4289353045, 2018519080, 2057691103, 2399374476, 4166623649, 2148108681, 387583245, 3664101311, 836232934, 3330556482, 3100665960, 3280093505, 2955516313, 2002398509, 287182607, 3413881008, 4238890068, 3597515707, 975967766];\n var T32 = [1671808611, 2089089148, 2006576759, 2072901243, 4061003762, 1807603307, 1873927791, 3310653893, 810573872, 16974337, 1739181671, 729634347, 4263110654, 3613570519, 2883997099, 1989864566, 3393556426, 2191335298, 3376449993, 2106063485, 4195741690, 1508618841, 1204391495, 4027317232, 2917941677, 3563566036, 2734514082, 2951366063, 2629772188, 2767672228, 1922491506, 3227229120, 3082974647, 4246528509, 2477669779, 644500518, 911895606, 1061256767, 4144166391, 3427763148, 878471220, 2784252325, 3845444069, 4043897329, 1905517169, 3631459288, 827548209, 356461077, 67897348, 3344078279, 593839651, 3277757891, 405286936, 2527147926, 84871685, 2595565466, 118033927, 305538066, 2157648768, 3795705826, 3945188843, 661212711, 2999812018, 1973414517, 152769033, 2208177539, 745822252, 439235610, 455947803, 1857215598, 1525593178, 2700827552, 1391895634, 994932283, 3596728278, 3016654259, 695947817, 3812548067, 795958831, 2224493444, 1408607827, 3513301457, 0, 3979133421, 543178784, 4229948412, 2982705585, 1542305371, 1790891114, 3410398667, 3201918910, 961245753, 1256100938, 1289001036, 1491644504, 3477767631, 3496721360, 4012557807, 2867154858, 4212583931, 1137018435, 1305975373, 861234739, 2241073541, 1171229253, 4178635257, 33948674, 2139225727, 1357946960, 1011120188, 2679776671, 2833468328, 1374921297, 2751356323, 1086357568, 2408187279, 2460827538, 2646352285, 944271416, 4110742005, 3168756668, 3066132406, 3665145818, 560153121, 271589392, 4279952895, 4077846003, 3530407890, 3444343245, 202643468, 322250259, 3962553324, 1608629855, 2543990167, 1154254916, 389623319, 3294073796, 2817676711, 2122513534, 1028094525, 1689045092, 1575467613, 422261273, 1939203699, 1621147744, 2174228865, 1339137615, 3699352540, 577127458, 712922154, 2427141008, 2290289544, 1187679302, 3995715566, 3100863416, 339486740, 3732514782, 1591917662, 186455563, 3681988059, 3762019296, 844522546, 978220090, 169743370, 1239126601, 101321734, 611076132, 1558493276, 3260915650, 3547250131, 2901361580, 1655096418, 2443721105, 2510565781, 3828863972, 2039214713, 3878868455, 3359869896, 928607799, 1840765549, 2374762893, 3580146133, 1322425422, 2850048425, 1823791212, 1459268694, 4094161908, 3928346602, 1706019429, 2056189050, 2934523822, 135794696, 3134549946, 2022240376, 628050469, 779246638, 472135708, 2800834470, 3032970164, 3327236038, 3894660072, 3715932637, 1956440180, 522272287, 1272813131, 3185336765, 2340818315, 2323976074, 1888542832, 1044544574, 3049550261, 1722469478, 1222152264, 50660867, 4127324150, 236067854, 1638122081, 895445557, 1475980887, 3117443513, 2257655686, 3243809217, 489110045, 2662934430, 3778599393, 4162055160, 2561878936, 288563729, 1773916777, 3648039385, 2391345038, 2493985684, 2612407707, 505560094, 2274497927, 3911240169, 3460925390, 1442818645, 678973480, 3749357023, 2358182796, 2717407649, 2306869641, 219617805, 3218761151, 3862026214, 1120306242, 1756942440, 1103331905, 2578459033, 762796589, 252780047, 2966125488, 1425844308, 3151392187, 372911126];\n var T4 = [1667474886, 2088535288, 2004326894, 2071694838, 4075949567, 1802223062, 1869591006, 3318043793, 808472672, 16843522, 1734846926, 724270422, 4278065639, 3621216949, 2880169549, 1987484396, 3402253711, 2189597983, 3385409673, 2105378810, 4210693615, 1499065266, 1195886990, 4042263547, 2913856577, 3570689971, 2728590687, 2947541573, 2627518243, 2762274643, 1920112356, 3233831835, 3082273397, 4261223649, 2475929149, 640051788, 909531756, 1061110142, 4160160501, 3435941763, 875846760, 2779116625, 3857003729, 4059105529, 1903268834, 3638064043, 825316194, 353713962, 67374088, 3351728789, 589522246, 3284360861, 404236336, 2526454071, 84217610, 2593830191, 117901582, 303183396, 2155911963, 3806477791, 3958056653, 656894286, 2998062463, 1970642922, 151591698, 2206440989, 741110872, 437923380, 454765878, 1852748508, 1515908788, 2694904667, 1381168804, 993742198, 3604373943, 3014905469, 690584402, 3823320797, 791638366, 2223281939, 1398011302, 3520161977, 0, 3991743681, 538992704, 4244381667, 2981218425, 1532751286, 1785380564, 3419096717, 3200178535, 960056178, 1246420628, 1280103576, 1482221744, 3486468741, 3503319995, 4025428677, 2863326543, 4227536621, 1128514950, 1296947098, 859002214, 2240123921, 1162203018, 4193849577, 33687044, 2139062782, 1347481760, 1010582648, 2678045221, 2829640523, 1364325282, 2745433693, 1077985408, 2408548869, 2459086143, 2644360225, 943212656, 4126475505, 3166494563, 3065430391, 3671750063, 555836226, 269496352, 4294908645, 4092792573, 3537006015, 3452783745, 202118168, 320025894, 3974901699, 1600119230, 2543297077, 1145359496, 387397934, 3301201811, 2812801621, 2122220284, 1027426170, 1684319432, 1566435258, 421079858, 1936954854, 1616945344, 2172753945, 1330631070, 3705438115, 572679748, 707427924, 2425400123, 2290647819, 1179044492, 4008585671, 3099120491, 336870440, 3739122087, 1583276732, 185277718, 3688593069, 3772791771, 842159716, 976899700, 168435220, 1229577106, 101059084, 606366792, 1549591736, 3267517855, 3553849021, 2897014595, 1650632388, 2442242105, 2509612081, 3840161747, 2038008818, 3890688725, 3368567691, 926374254, 1835907034, 2374863873, 3587531953, 1313788572, 2846482505, 1819063512, 1448540844, 4109633523, 3941213647, 1701162954, 2054852340, 2930698567, 134748176, 3132806511, 2021165296, 623210314, 774795868, 471606328, 2795958615, 3031746419, 3334885783, 3907527627, 3722280097, 1953799400, 522133822, 1263263126, 3183336545, 2341176845, 2324333839, 1886425312, 1044267644, 3048588401, 1718004428, 1212733584, 50529542, 4143317495, 235803164, 1633788866, 892690282, 1465383342, 3115962473, 2256965911, 3250673817, 488449850, 2661202215, 3789633753, 4177007595, 2560144171, 286339874, 1768537042, 3654906025, 2391705863, 2492770099, 2610673197, 505291324, 2273808917, 3924369609, 3469625735, 1431699370, 673740880, 3755965093, 2358021891, 2711746649, 2307489801, 218961690, 3217021541, 3873845719, 1111672452, 1751693520, 1094828930, 2576986153, 757954394, 252645662, 2964376443, 1414855848, 3149649517, 370555436];\n var T5 = [1374988112, 2118214995, 437757123, 975658646, 1001089995, 530400753, 2902087851, 1273168787, 540080725, 2910219766, 2295101073, 4110568485, 1340463100, 3307916247, 641025152, 3043140495, 3736164937, 632953703, 1172967064, 1576976609, 3274667266, 2169303058, 2370213795, 1809054150, 59727847, 361929877, 3211623147, 2505202138, 3569255213, 1484005843, 1239443753, 2395588676, 1975683434, 4102977912, 2572697195, 666464733, 3202437046, 4035489047, 3374361702, 2110667444, 1675577880, 3843699074, 2538681184, 1649639237, 2976151520, 3144396420, 4269907996, 4178062228, 1883793496, 2403728665, 2497604743, 1383856311, 2876494627, 1917518562, 3810496343, 1716890410, 3001755655, 800440835, 2261089178, 3543599269, 807962610, 599762354, 33778362, 3977675356, 2328828971, 2809771154, 4077384432, 1315562145, 1708848333, 101039829, 3509871135, 3299278474, 875451293, 2733856160, 92987698, 2767645557, 193195065, 1080094634, 1584504582, 3178106961, 1042385657, 2531067453, 3711829422, 1306967366, 2438237621, 1908694277, 67556463, 1615861247, 429456164, 3602770327, 2302690252, 1742315127, 2968011453, 126454664, 3877198648, 2043211483, 2709260871, 2084704233, 4169408201, 0, 159417987, 841739592, 504459436, 1817866830, 4245618683, 260388950, 1034867998, 908933415, 168810852, 1750902305, 2606453969, 607530554, 202008497, 2472011535, 3035535058, 463180190, 2160117071, 1641816226, 1517767529, 470948374, 3801332234, 3231722213, 1008918595, 303765277, 235474187, 4069246893, 766945465, 337553864, 1475418501, 2943682380, 4003061179, 2743034109, 4144047775, 1551037884, 1147550661, 1543208500, 2336434550, 3408119516, 3069049960, 3102011747, 3610369226, 1113818384, 328671808, 2227573024, 2236228733, 3535486456, 2935566865, 3341394285, 496906059, 3702665459, 226906860, 2009195472, 733156972, 2842737049, 294930682, 1206477858, 2835123396, 2700099354, 1451044056, 573804783, 2269728455, 3644379585, 2362090238, 2564033334, 2801107407, 2776292904, 3669462566, 1068351396, 742039012, 1350078989, 1784663195, 1417561698, 4136440770, 2430122216, 775550814, 2193862645, 2673705150, 1775276924, 1876241833, 3475313331, 3366754619, 270040487, 3902563182, 3678124923, 3441850377, 1851332852, 3969562369, 2203032232, 3868552805, 2868897406, 566021896, 4011190502, 3135740889, 1248802510, 3936291284, 699432150, 832877231, 708780849, 3332740144, 899835584, 1951317047, 4236429990, 3767586992, 866637845, 4043610186, 1106041591, 2144161806, 395441711, 1984812685, 1139781709, 3433712980, 3835036895, 2664543715, 1282050075, 3240894392, 1181045119, 2640243204, 25965917, 4203181171, 4211818798, 3009879386, 2463879762, 3910161971, 1842759443, 2597806476, 933301370, 1509430414, 3943906441, 3467192302, 3076639029, 3776767469, 2051518780, 2631065433, 1441952575, 404016761, 1942435775, 1408749034, 1610459739, 3745345300, 2017778566, 3400528769, 3110650942, 941896748, 3265478751, 371049330, 3168937228, 675039627, 4279080257, 967311729, 135050206, 3635733660, 1683407248, 2076935265, 3576870512, 1215061108, 3501741890];\n var T6 = [1347548327, 1400783205, 3273267108, 2520393566, 3409685355, 4045380933, 2880240216, 2471224067, 1428173050, 4138563181, 2441661558, 636813900, 4233094615, 3620022987, 2149987652, 2411029155, 1239331162, 1730525723, 2554718734, 3781033664, 46346101, 310463728, 2743944855, 3328955385, 3875770207, 2501218972, 3955191162, 3667219033, 768917123, 3545789473, 692707433, 1150208456, 1786102409, 2029293177, 1805211710, 3710368113, 3065962831, 401639597, 1724457132, 3028143674, 409198410, 2196052529, 1620529459, 1164071807, 3769721975, 2226875310, 486441376, 2499348523, 1483753576, 428819965, 2274680428, 3075636216, 598438867, 3799141122, 1474502543, 711349675, 129166120, 53458370, 2592523643, 2782082824, 4063242375, 2988687269, 3120694122, 1559041666, 730517276, 2460449204, 4042459122, 2706270690, 3446004468, 3573941694, 533804130, 2328143614, 2637442643, 2695033685, 839224033, 1973745387, 957055980, 2856345839, 106852767, 1371368976, 4181598602, 1033297158, 2933734917, 1179510461, 3046200461, 91341917, 1862534868, 4284502037, 605657339, 2547432937, 3431546947, 2003294622, 3182487618, 2282195339, 954669403, 3682191598, 1201765386, 3917234703, 3388507166, 0, 2198438022, 1211247597, 2887651696, 1315723890, 4227665663, 1443857720, 507358933, 657861945, 1678381017, 560487590, 3516619604, 975451694, 2970356327, 261314535, 3535072918, 2652609425, 1333838021, 2724322336, 1767536459, 370938394, 182621114, 3854606378, 1128014560, 487725847, 185469197, 2918353863, 3106780840, 3356761769, 2237133081, 1286567175, 3152976349, 4255350624, 2683765030, 3160175349, 3309594171, 878443390, 1988838185, 3704300486, 1756818940, 1673061617, 3403100636, 272786309, 1075025698, 545572369, 2105887268, 4174560061, 296679730, 1841768865, 1260232239, 4091327024, 3960309330, 3497509347, 1814803222, 2578018489, 4195456072, 575138148, 3299409036, 446754879, 3629546796, 4011996048, 3347532110, 3252238545, 4270639778, 915985419, 3483825537, 681933534, 651868046, 2755636671, 3828103837, 223377554, 2607439820, 1649704518, 3270937875, 3901806776, 1580087799, 4118987695, 3198115200, 2087309459, 2842678573, 3016697106, 1003007129, 2802849917, 1860738147, 2077965243, 164439672, 4100872472, 32283319, 2827177882, 1709610350, 2125135846, 136428751, 3874428392, 3652904859, 3460984630, 3572145929, 3593056380, 2939266226, 824852259, 818324884, 3224740454, 930369212, 2801566410, 2967507152, 355706840, 1257309336, 4148292826, 243256656, 790073846, 2373340630, 1296297904, 1422699085, 3756299780, 3818836405, 457992840, 3099667487, 2135319889, 77422314, 1560382517, 1945798516, 788204353, 1521706781, 1385356242, 870912086, 325965383, 2358957921, 2050466060, 2388260884, 2313884476, 4006521127, 901210569, 3990953189, 1014646705, 1503449823, 1062597235, 2031621326, 3212035895, 3931371469, 1533017514, 350174575, 2256028891, 2177544179, 1052338372, 741876788, 1606591296, 1914052035, 213705253, 2334669897, 1107234197, 1899603969, 3725069491, 2631447780, 2422494913, 1635502980, 1893020342, 1950903388, 1120974935];\n var T7 = [2807058932, 1699970625, 2764249623, 1586903591, 1808481195, 1173430173, 1487645946, 59984867, 4199882800, 1844882806, 1989249228, 1277555970, 3623636965, 3419915562, 1149249077, 2744104290, 1514790577, 459744698, 244860394, 3235995134, 1963115311, 4027744588, 2544078150, 4190530515, 1608975247, 2627016082, 2062270317, 1507497298, 2200818878, 567498868, 1764313568, 3359936201, 2305455554, 2037970062, 1047239e3, 1910319033, 1337376481, 2904027272, 2892417312, 984907214, 1243112415, 830661914, 861968209, 2135253587, 2011214180, 2927934315, 2686254721, 731183368, 1750626376, 4246310725, 1820824798, 4172763771, 3542330227, 48394827, 2404901663, 2871682645, 671593195, 3254988725, 2073724613, 145085239, 2280796200, 2779915199, 1790575107, 2187128086, 472615631, 3029510009, 4075877127, 3802222185, 4107101658, 3201631749, 1646252340, 4270507174, 1402811438, 1436590835, 3778151818, 3950355702, 3963161475, 4020912224, 2667994737, 273792366, 2331590177, 104699613, 95345982, 3175501286, 2377486676, 1560637892, 3564045318, 369057872, 4213447064, 3919042237, 1137477952, 2658625497, 1119727848, 2340947849, 1530455833, 4007360968, 172466556, 266959938, 516552836, 0, 2256734592, 3980931627, 1890328081, 1917742170, 4294704398, 945164165, 3575528878, 958871085, 3647212047, 2787207260, 1423022939, 775562294, 1739656202, 3876557655, 2530391278, 2443058075, 3310321856, 547512796, 1265195639, 437656594, 3121275539, 719700128, 3762502690, 387781147, 218828297, 3350065803, 2830708150, 2848461854, 428169201, 122466165, 3720081049, 1627235199, 648017665, 4122762354, 1002783846, 2117360635, 695634755, 3336358691, 4234721005, 4049844452, 3704280881, 2232435299, 574624663, 287343814, 612205898, 1039717051, 840019705, 2708326185, 793451934, 821288114, 1391201670, 3822090177, 376187827, 3113855344, 1224348052, 1679968233, 2361698556, 1058709744, 752375421, 2431590963, 1321699145, 3519142200, 2734591178, 188127444, 2177869557, 3727205754, 2384911031, 3215212461, 2648976442, 2450346104, 3432737375, 1180849278, 331544205, 3102249176, 4150144569, 2952102595, 2159976285, 2474404304, 766078933, 313773861, 2570832044, 2108100632, 1668212892, 3145456443, 2013908262, 418672217, 3070356634, 2594734927, 1852171925, 3867060991, 3473416636, 3907448597, 2614737639, 919489135, 164948639, 2094410160, 2997825956, 590424639, 2486224549, 1723872674, 3157750862, 3399941250, 3501252752, 3625268135, 2555048196, 3673637356, 1343127501, 4130281361, 3599595085, 2957853679, 1297403050, 81781910, 3051593425, 2283490410, 532201772, 1367295589, 3926170974, 895287692, 1953757831, 1093597963, 492483431, 3528626907, 1446242576, 1192455638, 1636604631, 209336225, 344873464, 1015671571, 669961897, 3375740769, 3857572124, 2973530695, 3747192018, 1933530610, 3464042516, 935293895, 3454686199, 2858115069, 1863638845, 3683022916, 4085369519, 3292445032, 875313188, 1080017571, 3279033885, 621591778, 1233856572, 2504130317, 24197544, 3017672716, 3835484340, 3247465558, 2220981195, 3060847922, 1551124588, 1463996600];\n var T8 = [4104605777, 1097159550, 396673818, 660510266, 2875968315, 2638606623, 4200115116, 3808662347, 821712160, 1986918061, 3430322568, 38544885, 3856137295, 718002117, 893681702, 1654886325, 2975484382, 3122358053, 3926825029, 4274053469, 796197571, 1290801793, 1184342925, 3556361835, 2405426947, 2459735317, 1836772287, 1381620373, 3196267988, 1948373848, 3764988233, 3385345166, 3263785589, 2390325492, 1480485785, 3111247143, 3780097726, 2293045232, 548169417, 3459953789, 3746175075, 439452389, 1362321559, 1400849762, 1685577905, 1806599355, 2174754046, 137073913, 1214797936, 1174215055, 3731654548, 2079897426, 1943217067, 1258480242, 529487843, 1437280870, 3945269170, 3049390895, 3313212038, 923313619, 679998e3, 3215307299, 57326082, 377642221, 3474729866, 2041877159, 133361907, 1776460110, 3673476453, 96392454, 878845905, 2801699524, 777231668, 4082475170, 2330014213, 4142626212, 2213296395, 1626319424, 1906247262, 1846563261, 562755902, 3708173718, 1040559837, 3871163981, 1418573201, 3294430577, 114585348, 1343618912, 2566595609, 3186202582, 1078185097, 3651041127, 3896688048, 2307622919, 425408743, 3371096953, 2081048481, 1108339068, 2216610296, 0, 2156299017, 736970802, 292596766, 1517440620, 251657213, 2235061775, 2933202493, 758720310, 265905162, 1554391400, 1532285339, 908999204, 174567692, 1474760595, 4002861748, 2610011675, 3234156416, 3693126241, 2001430874, 303699484, 2478443234, 2687165888, 585122620, 454499602, 151849742, 2345119218, 3064510765, 514443284, 4044981591, 1963412655, 2581445614, 2137062819, 19308535, 1928707164, 1715193156, 4219352155, 1126790795, 600235211, 3992742070, 3841024952, 836553431, 1669664834, 2535604243, 3323011204, 1243905413, 3141400786, 4180808110, 698445255, 2653899549, 2989552604, 2253581325, 3252932727, 3004591147, 1891211689, 2487810577, 3915653703, 4237083816, 4030667424, 2100090966, 865136418, 1229899655, 953270745, 3399679628, 3557504664, 4118925222, 2061379749, 3079546586, 2915017791, 983426092, 2022837584, 1607244650, 2118541908, 2366882550, 3635996816, 972512814, 3283088770, 1568718495, 3499326569, 3576539503, 621982671, 2895723464, 410887952, 2623762152, 1002142683, 645401037, 1494807662, 2595684844, 1335535747, 2507040230, 4293295786, 3167684641, 367585007, 3885750714, 1865862730, 2668221674, 2960971305, 2763173681, 1059270954, 2777952454, 2724642869, 1320957812, 2194319100, 2429595872, 2815956275, 77089521, 3973773121, 3444575871, 2448830231, 1305906550, 4021308739, 2857194700, 2516901860, 3518358430, 1787304780, 740276417, 1699839814, 1592394909, 2352307457, 2272556026, 188821243, 1729977011, 3687994002, 274084841, 3594982253, 3613494426, 2701949495, 4162096729, 322734571, 2837966542, 1640576439, 484830689, 1202797690, 3537852828, 4067639125, 349075736, 3342319475, 4157467219, 4255800159, 1030690015, 1155237496, 2951971274, 1757691577, 607398968, 2738905026, 499347990, 3794078908, 1011452712, 227885567, 2818666809, 213114376, 3034881240, 1455525988, 3414450555, 850817237, 1817998408, 3092726480];\n var U1 = [0, 235474187, 470948374, 303765277, 941896748, 908933415, 607530554, 708780849, 1883793496, 2118214995, 1817866830, 1649639237, 1215061108, 1181045119, 1417561698, 1517767529, 3767586992, 4003061179, 4236429990, 4069246893, 3635733660, 3602770327, 3299278474, 3400528769, 2430122216, 2664543715, 2362090238, 2193862645, 2835123396, 2801107407, 3035535058, 3135740889, 3678124923, 3576870512, 3341394285, 3374361702, 3810496343, 3977675356, 4279080257, 4043610186, 2876494627, 2776292904, 3076639029, 3110650942, 2472011535, 2640243204, 2403728665, 2169303058, 1001089995, 899835584, 666464733, 699432150, 59727847, 226906860, 530400753, 294930682, 1273168787, 1172967064, 1475418501, 1509430414, 1942435775, 2110667444, 1876241833, 1641816226, 2910219766, 2743034109, 2976151520, 3211623147, 2505202138, 2606453969, 2302690252, 2269728455, 3711829422, 3543599269, 3240894392, 3475313331, 3843699074, 3943906441, 4178062228, 4144047775, 1306967366, 1139781709, 1374988112, 1610459739, 1975683434, 2076935265, 1775276924, 1742315127, 1034867998, 866637845, 566021896, 800440835, 92987698, 193195065, 429456164, 395441711, 1984812685, 2017778566, 1784663195, 1683407248, 1315562145, 1080094634, 1383856311, 1551037884, 101039829, 135050206, 437757123, 337553864, 1042385657, 807962610, 573804783, 742039012, 2531067453, 2564033334, 2328828971, 2227573024, 2935566865, 2700099354, 3001755655, 3168937228, 3868552805, 3902563182, 4203181171, 4102977912, 3736164937, 3501741890, 3265478751, 3433712980, 1106041591, 1340463100, 1576976609, 1408749034, 2043211483, 2009195472, 1708848333, 1809054150, 832877231, 1068351396, 766945465, 599762354, 159417987, 126454664, 361929877, 463180190, 2709260871, 2943682380, 3178106961, 3009879386, 2572697195, 2538681184, 2236228733, 2336434550, 3509871135, 3745345300, 3441850377, 3274667266, 3910161971, 3877198648, 4110568485, 4211818798, 2597806476, 2497604743, 2261089178, 2295101073, 2733856160, 2902087851, 3202437046, 2968011453, 3936291284, 3835036895, 4136440770, 4169408201, 3535486456, 3702665459, 3467192302, 3231722213, 2051518780, 1951317047, 1716890410, 1750902305, 1113818384, 1282050075, 1584504582, 1350078989, 168810852, 67556463, 371049330, 404016761, 841739592, 1008918595, 775550814, 540080725, 3969562369, 3801332234, 4035489047, 4269907996, 3569255213, 3669462566, 3366754619, 3332740144, 2631065433, 2463879762, 2160117071, 2395588676, 2767645557, 2868897406, 3102011747, 3069049960, 202008497, 33778362, 270040487, 504459436, 875451293, 975658646, 675039627, 641025152, 2084704233, 1917518562, 1615861247, 1851332852, 1147550661, 1248802510, 1484005843, 1451044056, 933301370, 967311729, 733156972, 632953703, 260388950, 25965917, 328671808, 496906059, 1206477858, 1239443753, 1543208500, 1441952575, 2144161806, 1908694277, 1675577880, 1842759443, 3610369226, 3644379585, 3408119516, 3307916247, 4011190502, 3776767469, 4077384432, 4245618683, 2809771154, 2842737049, 3144396420, 3043140495, 2673705150, 2438237621, 2203032232, 2370213795];\n var U22 = [0, 185469197, 370938394, 487725847, 741876788, 657861945, 975451694, 824852259, 1483753576, 1400783205, 1315723890, 1164071807, 1950903388, 2135319889, 1649704518, 1767536459, 2967507152, 3152976349, 2801566410, 2918353863, 2631447780, 2547432937, 2328143614, 2177544179, 3901806776, 3818836405, 4270639778, 4118987695, 3299409036, 3483825537, 3535072918, 3652904859, 2077965243, 1893020342, 1841768865, 1724457132, 1474502543, 1559041666, 1107234197, 1257309336, 598438867, 681933534, 901210569, 1052338372, 261314535, 77422314, 428819965, 310463728, 3409685355, 3224740454, 3710368113, 3593056380, 3875770207, 3960309330, 4045380933, 4195456072, 2471224067, 2554718734, 2237133081, 2388260884, 3212035895, 3028143674, 2842678573, 2724322336, 4138563181, 4255350624, 3769721975, 3955191162, 3667219033, 3516619604, 3431546947, 3347532110, 2933734917, 2782082824, 3099667487, 3016697106, 2196052529, 2313884476, 2499348523, 2683765030, 1179510461, 1296297904, 1347548327, 1533017514, 1786102409, 1635502980, 2087309459, 2003294622, 507358933, 355706840, 136428751, 53458370, 839224033, 957055980, 605657339, 790073846, 2373340630, 2256028891, 2607439820, 2422494913, 2706270690, 2856345839, 3075636216, 3160175349, 3573941694, 3725069491, 3273267108, 3356761769, 4181598602, 4063242375, 4011996048, 3828103837, 1033297158, 915985419, 730517276, 545572369, 296679730, 446754879, 129166120, 213705253, 1709610350, 1860738147, 1945798516, 2029293177, 1239331162, 1120974935, 1606591296, 1422699085, 4148292826, 4233094615, 3781033664, 3931371469, 3682191598, 3497509347, 3446004468, 3328955385, 2939266226, 2755636671, 3106780840, 2988687269, 2198438022, 2282195339, 2501218972, 2652609425, 1201765386, 1286567175, 1371368976, 1521706781, 1805211710, 1620529459, 2105887268, 1988838185, 533804130, 350174575, 164439672, 46346101, 870912086, 954669403, 636813900, 788204353, 2358957921, 2274680428, 2592523643, 2441661558, 2695033685, 2880240216, 3065962831, 3182487618, 3572145929, 3756299780, 3270937875, 3388507166, 4174560061, 4091327024, 4006521127, 3854606378, 1014646705, 930369212, 711349675, 560487590, 272786309, 457992840, 106852767, 223377554, 1678381017, 1862534868, 1914052035, 2031621326, 1211247597, 1128014560, 1580087799, 1428173050, 32283319, 182621114, 401639597, 486441376, 768917123, 651868046, 1003007129, 818324884, 1503449823, 1385356242, 1333838021, 1150208456, 1973745387, 2125135846, 1673061617, 1756818940, 2970356327, 3120694122, 2802849917, 2887651696, 2637442643, 2520393566, 2334669897, 2149987652, 3917234703, 3799141122, 4284502037, 4100872472, 3309594171, 3460984630, 3545789473, 3629546796, 2050466060, 1899603969, 1814803222, 1730525723, 1443857720, 1560382517, 1075025698, 1260232239, 575138148, 692707433, 878443390, 1062597235, 243256656, 91341917, 409198410, 325965383, 3403100636, 3252238545, 3704300486, 3620022987, 3874428392, 3990953189, 4042459122, 4227665663, 2460449204, 2578018489, 2226875310, 2411029155, 3198115200, 3046200461, 2827177882, 2743944855];\n var U32 = [0, 218828297, 437656594, 387781147, 875313188, 958871085, 775562294, 590424639, 1750626376, 1699970625, 1917742170, 2135253587, 1551124588, 1367295589, 1180849278, 1265195639, 3501252752, 3720081049, 3399941250, 3350065803, 3835484340, 3919042237, 4270507174, 4085369519, 3102249176, 3051593425, 2734591178, 2952102595, 2361698556, 2177869557, 2530391278, 2614737639, 3145456443, 3060847922, 2708326185, 2892417312, 2404901663, 2187128086, 2504130317, 2555048196, 3542330227, 3727205754, 3375740769, 3292445032, 3876557655, 3926170974, 4246310725, 4027744588, 1808481195, 1723872674, 1910319033, 2094410160, 1608975247, 1391201670, 1173430173, 1224348052, 59984867, 244860394, 428169201, 344873464, 935293895, 984907214, 766078933, 547512796, 1844882806, 1627235199, 2011214180, 2062270317, 1507497298, 1423022939, 1137477952, 1321699145, 95345982, 145085239, 532201772, 313773861, 830661914, 1015671571, 731183368, 648017665, 3175501286, 2957853679, 2807058932, 2858115069, 2305455554, 2220981195, 2474404304, 2658625497, 3575528878, 3625268135, 3473416636, 3254988725, 3778151818, 3963161475, 4213447064, 4130281361, 3599595085, 3683022916, 3432737375, 3247465558, 3802222185, 4020912224, 4172763771, 4122762354, 3201631749, 3017672716, 2764249623, 2848461854, 2331590177, 2280796200, 2431590963, 2648976442, 104699613, 188127444, 472615631, 287343814, 840019705, 1058709744, 671593195, 621591778, 1852171925, 1668212892, 1953757831, 2037970062, 1514790577, 1463996600, 1080017571, 1297403050, 3673637356, 3623636965, 3235995134, 3454686199, 4007360968, 3822090177, 4107101658, 4190530515, 2997825956, 3215212461, 2830708150, 2779915199, 2256734592, 2340947849, 2627016082, 2443058075, 172466556, 122466165, 273792366, 492483431, 1047239e3, 861968209, 612205898, 695634755, 1646252340, 1863638845, 2013908262, 1963115311, 1446242576, 1530455833, 1277555970, 1093597963, 1636604631, 1820824798, 2073724613, 1989249228, 1436590835, 1487645946, 1337376481, 1119727848, 164948639, 81781910, 331544205, 516552836, 1039717051, 821288114, 669961897, 719700128, 2973530695, 3157750862, 2871682645, 2787207260, 2232435299, 2283490410, 2667994737, 2450346104, 3647212047, 3564045318, 3279033885, 3464042516, 3980931627, 3762502690, 4150144569, 4199882800, 3070356634, 3121275539, 2904027272, 2686254721, 2200818878, 2384911031, 2570832044, 2486224549, 3747192018, 3528626907, 3310321856, 3359936201, 3950355702, 3867060991, 4049844452, 4234721005, 1739656202, 1790575107, 2108100632, 1890328081, 1402811438, 1586903591, 1233856572, 1149249077, 266959938, 48394827, 369057872, 418672217, 1002783846, 919489135, 567498868, 752375421, 209336225, 24197544, 376187827, 459744698, 945164165, 895287692, 574624663, 793451934, 1679968233, 1764313568, 2117360635, 1933530610, 1343127501, 1560637892, 1243112415, 1192455638, 3704280881, 3519142200, 3336358691, 3419915562, 3907448597, 3857572124, 4075877127, 4294704398, 3029510009, 3113855344, 2927934315, 2744104290, 2159976285, 2377486676, 2594734927, 2544078150];\n var U4 = [0, 151849742, 303699484, 454499602, 607398968, 758720310, 908999204, 1059270954, 1214797936, 1097159550, 1517440620, 1400849762, 1817998408, 1699839814, 2118541908, 2001430874, 2429595872, 2581445614, 2194319100, 2345119218, 3034881240, 3186202582, 2801699524, 2951971274, 3635996816, 3518358430, 3399679628, 3283088770, 4237083816, 4118925222, 4002861748, 3885750714, 1002142683, 850817237, 698445255, 548169417, 529487843, 377642221, 227885567, 77089521, 1943217067, 2061379749, 1640576439, 1757691577, 1474760595, 1592394909, 1174215055, 1290801793, 2875968315, 2724642869, 3111247143, 2960971305, 2405426947, 2253581325, 2638606623, 2487810577, 3808662347, 3926825029, 4044981591, 4162096729, 3342319475, 3459953789, 3576539503, 3693126241, 1986918061, 2137062819, 1685577905, 1836772287, 1381620373, 1532285339, 1078185097, 1229899655, 1040559837, 923313619, 740276417, 621982671, 439452389, 322734571, 137073913, 19308535, 3871163981, 4021308739, 4104605777, 4255800159, 3263785589, 3414450555, 3499326569, 3651041127, 2933202493, 2815956275, 3167684641, 3049390895, 2330014213, 2213296395, 2566595609, 2448830231, 1305906550, 1155237496, 1607244650, 1455525988, 1776460110, 1626319424, 2079897426, 1928707164, 96392454, 213114376, 396673818, 514443284, 562755902, 679998e3, 865136418, 983426092, 3708173718, 3557504664, 3474729866, 3323011204, 4180808110, 4030667424, 3945269170, 3794078908, 2507040230, 2623762152, 2272556026, 2390325492, 2975484382, 3092726480, 2738905026, 2857194700, 3973773121, 3856137295, 4274053469, 4157467219, 3371096953, 3252932727, 3673476453, 3556361835, 2763173681, 2915017791, 3064510765, 3215307299, 2156299017, 2307622919, 2459735317, 2610011675, 2081048481, 1963412655, 1846563261, 1729977011, 1480485785, 1362321559, 1243905413, 1126790795, 878845905, 1030690015, 645401037, 796197571, 274084841, 425408743, 38544885, 188821243, 3613494426, 3731654548, 3313212038, 3430322568, 4082475170, 4200115116, 3780097726, 3896688048, 2668221674, 2516901860, 2366882550, 2216610296, 3141400786, 2989552604, 2837966542, 2687165888, 1202797690, 1320957812, 1437280870, 1554391400, 1669664834, 1787304780, 1906247262, 2022837584, 265905162, 114585348, 499347990, 349075736, 736970802, 585122620, 972512814, 821712160, 2595684844, 2478443234, 2293045232, 2174754046, 3196267988, 3079546586, 2895723464, 2777952454, 3537852828, 3687994002, 3234156416, 3385345166, 4142626212, 4293295786, 3841024952, 3992742070, 174567692, 57326082, 410887952, 292596766, 777231668, 660510266, 1011452712, 893681702, 1108339068, 1258480242, 1343618912, 1494807662, 1715193156, 1865862730, 1948373848, 2100090966, 2701949495, 2818666809, 3004591147, 3122358053, 2235061775, 2352307457, 2535604243, 2653899549, 3915653703, 3764988233, 4219352155, 4067639125, 3444575871, 3294430577, 3746175075, 3594982253, 836553431, 953270745, 600235211, 718002117, 367585007, 484830689, 133361907, 251657213, 2041877159, 1891211689, 1806599355, 1654886325, 1568718495, 1418573201, 1335535747, 1184342925];\n function convertToInt32(bytes) {\n var result = [];\n for (var i3 = 0; i3 < bytes.length; i3 += 4) {\n result.push(\n bytes[i3] << 24 | bytes[i3 + 1] << 16 | bytes[i3 + 2] << 8 | bytes[i3 + 3]\n );\n }\n return result;\n }\n var AES = function(key) {\n if (!(this instanceof AES)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n Object.defineProperty(this, \"key\", {\n value: coerceArray(key, true)\n });\n this._prepare();\n };\n AES.prototype._prepare = function() {\n var rounds = numberOfRounds[this.key.length];\n if (rounds == null) {\n throw new Error(\"invalid key size (must be 16, 24 or 32 bytes)\");\n }\n this._Ke = [];\n this._Kd = [];\n for (var i3 = 0; i3 <= rounds; i3++) {\n this._Ke.push([0, 0, 0, 0]);\n this._Kd.push([0, 0, 0, 0]);\n }\n var roundKeyCount = (rounds + 1) * 4;\n var KC = this.key.length / 4;\n var tk = convertToInt32(this.key);\n var index2;\n for (var i3 = 0; i3 < KC; i3++) {\n index2 = i3 >> 2;\n this._Ke[index2][i3 % 4] = tk[i3];\n this._Kd[rounds - index2][i3 % 4] = tk[i3];\n }\n var rconpointer = 0;\n var t3 = KC, tt;\n while (t3 < roundKeyCount) {\n tt = tk[KC - 1];\n tk[0] ^= S3[tt >> 16 & 255] << 24 ^ S3[tt >> 8 & 255] << 16 ^ S3[tt & 255] << 8 ^ S3[tt >> 24 & 255] ^ rcon[rconpointer] << 24;\n rconpointer += 1;\n if (KC != 8) {\n for (var i3 = 1; i3 < KC; i3++) {\n tk[i3] ^= tk[i3 - 1];\n }\n } else {\n for (var i3 = 1; i3 < KC / 2; i3++) {\n tk[i3] ^= tk[i3 - 1];\n }\n tt = tk[KC / 2 - 1];\n tk[KC / 2] ^= S3[tt & 255] ^ S3[tt >> 8 & 255] << 8 ^ S3[tt >> 16 & 255] << 16 ^ S3[tt >> 24 & 255] << 24;\n for (var i3 = KC / 2 + 1; i3 < KC; i3++) {\n tk[i3] ^= tk[i3 - 1];\n }\n }\n var i3 = 0, r2, c4;\n while (i3 < KC && t3 < roundKeyCount) {\n r2 = t3 >> 2;\n c4 = t3 % 4;\n this._Ke[r2][c4] = tk[i3];\n this._Kd[rounds - r2][c4] = tk[i3++];\n t3++;\n }\n }\n for (var r2 = 1; r2 < rounds; r2++) {\n for (var c4 = 0; c4 < 4; c4++) {\n tt = this._Kd[r2][c4];\n this._Kd[r2][c4] = U1[tt >> 24 & 255] ^ U22[tt >> 16 & 255] ^ U32[tt >> 8 & 255] ^ U4[tt & 255];\n }\n }\n };\n AES.prototype.encrypt = function(plaintext) {\n if (plaintext.length != 16) {\n throw new Error(\"invalid plaintext size (must be 16 bytes)\");\n }\n var rounds = this._Ke.length - 1;\n var a3 = [0, 0, 0, 0];\n var t3 = convertToInt32(plaintext);\n for (var i3 = 0; i3 < 4; i3++) {\n t3[i3] ^= this._Ke[0][i3];\n }\n for (var r2 = 1; r2 < rounds; r2++) {\n for (var i3 = 0; i3 < 4; i3++) {\n a3[i3] = T1[t3[i3] >> 24 & 255] ^ T22[t3[(i3 + 1) % 4] >> 16 & 255] ^ T32[t3[(i3 + 2) % 4] >> 8 & 255] ^ T4[t3[(i3 + 3) % 4] & 255] ^ this._Ke[r2][i3];\n }\n t3 = a3.slice();\n }\n var result = createArray(16), tt;\n for (var i3 = 0; i3 < 4; i3++) {\n tt = this._Ke[rounds][i3];\n result[4 * i3] = (S3[t3[i3] >> 24 & 255] ^ tt >> 24) & 255;\n result[4 * i3 + 1] = (S3[t3[(i3 + 1) % 4] >> 16 & 255] ^ tt >> 16) & 255;\n result[4 * i3 + 2] = (S3[t3[(i3 + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255;\n result[4 * i3 + 3] = (S3[t3[(i3 + 3) % 4] & 255] ^ tt) & 255;\n }\n return result;\n };\n AES.prototype.decrypt = function(ciphertext) {\n if (ciphertext.length != 16) {\n throw new Error(\"invalid ciphertext size (must be 16 bytes)\");\n }\n var rounds = this._Kd.length - 1;\n var a3 = [0, 0, 0, 0];\n var t3 = convertToInt32(ciphertext);\n for (var i3 = 0; i3 < 4; i3++) {\n t3[i3] ^= this._Kd[0][i3];\n }\n for (var r2 = 1; r2 < rounds; r2++) {\n for (var i3 = 0; i3 < 4; i3++) {\n a3[i3] = T5[t3[i3] >> 24 & 255] ^ T6[t3[(i3 + 3) % 4] >> 16 & 255] ^ T7[t3[(i3 + 2) % 4] >> 8 & 255] ^ T8[t3[(i3 + 1) % 4] & 255] ^ this._Kd[r2][i3];\n }\n t3 = a3.slice();\n }\n var result = createArray(16), tt;\n for (var i3 = 0; i3 < 4; i3++) {\n tt = this._Kd[rounds][i3];\n result[4 * i3] = (Si[t3[i3] >> 24 & 255] ^ tt >> 24) & 255;\n result[4 * i3 + 1] = (Si[t3[(i3 + 3) % 4] >> 16 & 255] ^ tt >> 16) & 255;\n result[4 * i3 + 2] = (Si[t3[(i3 + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255;\n result[4 * i3 + 3] = (Si[t3[(i3 + 1) % 4] & 255] ^ tt) & 255;\n }\n return result;\n };\n var ModeOfOperationECB = function(key) {\n if (!(this instanceof ModeOfOperationECB)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Electronic Code Block\";\n this.name = \"ecb\";\n this._aes = new AES(key);\n };\n ModeOfOperationECB.prototype.encrypt = function(plaintext) {\n plaintext = coerceArray(plaintext);\n if (plaintext.length % 16 !== 0) {\n throw new Error(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n for (var i3 = 0; i3 < plaintext.length; i3 += 16) {\n copyArray(plaintext, block, 0, i3, i3 + 16);\n block = this._aes.encrypt(block);\n copyArray(block, ciphertext, i3);\n }\n return ciphertext;\n };\n ModeOfOperationECB.prototype.decrypt = function(ciphertext) {\n ciphertext = coerceArray(ciphertext);\n if (ciphertext.length % 16 !== 0) {\n throw new Error(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n for (var i3 = 0; i3 < ciphertext.length; i3 += 16) {\n copyArray(ciphertext, block, 0, i3, i3 + 16);\n block = this._aes.decrypt(block);\n copyArray(block, plaintext, i3);\n }\n return plaintext;\n };\n var ModeOfOperationCBC = function(key, iv) {\n if (!(this instanceof ModeOfOperationCBC)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Cipher Block Chaining\";\n this.name = \"cbc\";\n if (!iv) {\n iv = createArray(16);\n } else if (iv.length != 16) {\n throw new Error(\"invalid initialation vector size (must be 16 bytes)\");\n }\n this._lastCipherblock = coerceArray(iv, true);\n this._aes = new AES(key);\n };\n ModeOfOperationCBC.prototype.encrypt = function(plaintext) {\n plaintext = coerceArray(plaintext);\n if (plaintext.length % 16 !== 0) {\n throw new Error(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n for (var i3 = 0; i3 < plaintext.length; i3 += 16) {\n copyArray(plaintext, block, 0, i3, i3 + 16);\n for (var j2 = 0; j2 < 16; j2++) {\n block[j2] ^= this._lastCipherblock[j2];\n }\n this._lastCipherblock = this._aes.encrypt(block);\n copyArray(this._lastCipherblock, ciphertext, i3);\n }\n return ciphertext;\n };\n ModeOfOperationCBC.prototype.decrypt = function(ciphertext) {\n ciphertext = coerceArray(ciphertext);\n if (ciphertext.length % 16 !== 0) {\n throw new Error(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n for (var i3 = 0; i3 < ciphertext.length; i3 += 16) {\n copyArray(ciphertext, block, 0, i3, i3 + 16);\n block = this._aes.decrypt(block);\n for (var j2 = 0; j2 < 16; j2++) {\n plaintext[i3 + j2] = block[j2] ^ this._lastCipherblock[j2];\n }\n copyArray(ciphertext, this._lastCipherblock, 0, i3, i3 + 16);\n }\n return plaintext;\n };\n var ModeOfOperationCFB = function(key, iv, segmentSize) {\n if (!(this instanceof ModeOfOperationCFB)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Cipher Feedback\";\n this.name = \"cfb\";\n if (!iv) {\n iv = createArray(16);\n } else if (iv.length != 16) {\n throw new Error(\"invalid initialation vector size (must be 16 size)\");\n }\n if (!segmentSize) {\n segmentSize = 1;\n }\n this.segmentSize = segmentSize;\n this._shiftRegister = coerceArray(iv, true);\n this._aes = new AES(key);\n };\n ModeOfOperationCFB.prototype.encrypt = function(plaintext) {\n if (plaintext.length % this.segmentSize != 0) {\n throw new Error(\"invalid plaintext size (must be segmentSize bytes)\");\n }\n var encrypted = coerceArray(plaintext, true);\n var xorSegment;\n for (var i3 = 0; i3 < encrypted.length; i3 += this.segmentSize) {\n xorSegment = this._aes.encrypt(this._shiftRegister);\n for (var j2 = 0; j2 < this.segmentSize; j2++) {\n encrypted[i3 + j2] ^= xorSegment[j2];\n }\n copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);\n copyArray(encrypted, this._shiftRegister, 16 - this.segmentSize, i3, i3 + this.segmentSize);\n }\n return encrypted;\n };\n ModeOfOperationCFB.prototype.decrypt = function(ciphertext) {\n if (ciphertext.length % this.segmentSize != 0) {\n throw new Error(\"invalid ciphertext size (must be segmentSize bytes)\");\n }\n var plaintext = coerceArray(ciphertext, true);\n var xorSegment;\n for (var i3 = 0; i3 < plaintext.length; i3 += this.segmentSize) {\n xorSegment = this._aes.encrypt(this._shiftRegister);\n for (var j2 = 0; j2 < this.segmentSize; j2++) {\n plaintext[i3 + j2] ^= xorSegment[j2];\n }\n copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);\n copyArray(ciphertext, this._shiftRegister, 16 - this.segmentSize, i3, i3 + this.segmentSize);\n }\n return plaintext;\n };\n var ModeOfOperationOFB = function(key, iv) {\n if (!(this instanceof ModeOfOperationOFB)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Output Feedback\";\n this.name = \"ofb\";\n if (!iv) {\n iv = createArray(16);\n } else if (iv.length != 16) {\n throw new Error(\"invalid initialation vector size (must be 16 bytes)\");\n }\n this._lastPrecipher = coerceArray(iv, true);\n this._lastPrecipherIndex = 16;\n this._aes = new AES(key);\n };\n ModeOfOperationOFB.prototype.encrypt = function(plaintext) {\n var encrypted = coerceArray(plaintext, true);\n for (var i3 = 0; i3 < encrypted.length; i3++) {\n if (this._lastPrecipherIndex === 16) {\n this._lastPrecipher = this._aes.encrypt(this._lastPrecipher);\n this._lastPrecipherIndex = 0;\n }\n encrypted[i3] ^= this._lastPrecipher[this._lastPrecipherIndex++];\n }\n return encrypted;\n };\n ModeOfOperationOFB.prototype.decrypt = ModeOfOperationOFB.prototype.encrypt;\n var Counter = function(initialValue) {\n if (!(this instanceof Counter)) {\n throw Error(\"Counter must be instanitated with `new`\");\n }\n if (initialValue !== 0 && !initialValue) {\n initialValue = 1;\n }\n if (typeof initialValue === \"number\") {\n this._counter = createArray(16);\n this.setValue(initialValue);\n } else {\n this.setBytes(initialValue);\n }\n };\n Counter.prototype.setValue = function(value) {\n if (typeof value !== \"number\" || parseInt(value) != value) {\n throw new Error(\"invalid counter value (must be an integer)\");\n }\n for (var index2 = 15; index2 >= 0; --index2) {\n this._counter[index2] = value % 256;\n value = value >> 8;\n }\n };\n Counter.prototype.setBytes = function(bytes) {\n bytes = coerceArray(bytes, true);\n if (bytes.length != 16) {\n throw new Error(\"invalid counter bytes size (must be 16 bytes)\");\n }\n this._counter = bytes;\n };\n Counter.prototype.increment = function() {\n for (var i3 = 15; i3 >= 0; i3--) {\n if (this._counter[i3] === 255) {\n this._counter[i3] = 0;\n } else {\n this._counter[i3]++;\n break;\n }\n }\n };\n var ModeOfOperationCTR = function(key, counter) {\n if (!(this instanceof ModeOfOperationCTR)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Counter\";\n this.name = \"ctr\";\n if (!(counter instanceof Counter)) {\n counter = new Counter(counter);\n }\n this._counter = counter;\n this._remainingCounter = null;\n this._remainingCounterIndex = 16;\n this._aes = new AES(key);\n };\n ModeOfOperationCTR.prototype.encrypt = function(plaintext) {\n var encrypted = coerceArray(plaintext, true);\n for (var i3 = 0; i3 < encrypted.length; i3++) {\n if (this._remainingCounterIndex === 16) {\n this._remainingCounter = this._aes.encrypt(this._counter._counter);\n this._remainingCounterIndex = 0;\n this._counter.increment();\n }\n encrypted[i3] ^= this._remainingCounter[this._remainingCounterIndex++];\n }\n return encrypted;\n };\n ModeOfOperationCTR.prototype.decrypt = ModeOfOperationCTR.prototype.encrypt;\n function pkcs7pad(data) {\n data = coerceArray(data, true);\n var padder = 16 - data.length % 16;\n var result = createArray(data.length + padder);\n copyArray(data, result);\n for (var i3 = data.length; i3 < result.length; i3++) {\n result[i3] = padder;\n }\n return result;\n }\n function pkcs7strip(data) {\n data = coerceArray(data, true);\n if (data.length < 16) {\n throw new Error(\"PKCS#7 invalid length\");\n }\n var padder = data[data.length - 1];\n if (padder > 16) {\n throw new Error(\"PKCS#7 padding byte out of range\");\n }\n var length = data.length - padder;\n for (var i3 = 0; i3 < padder; i3++) {\n if (data[length + i3] !== padder) {\n throw new Error(\"PKCS#7 invalid padding byte\");\n }\n }\n var result = createArray(length);\n copyArray(data, result, 0, 0, length);\n return result;\n }\n var aesjs = {\n AES,\n Counter,\n ModeOfOperation: {\n ecb: ModeOfOperationECB,\n cbc: ModeOfOperationCBC,\n cfb: ModeOfOperationCFB,\n ofb: ModeOfOperationOFB,\n ctr: ModeOfOperationCTR\n },\n utils: {\n hex: convertHex,\n utf8: convertUtf8\n },\n padding: {\n pkcs7: {\n pad: pkcs7pad,\n strip: pkcs7strip\n }\n },\n _arrayTest: {\n coerceArray,\n createArray,\n copyArray\n }\n };\n if (typeof exports3 !== \"undefined\") {\n module.exports = aesjs;\n } else if (typeof define === \"function\" && define.amd) {\n define(aesjs);\n } else {\n if (root.aesjs) {\n aesjs._aesjs = root.aesjs;\n }\n root.aesjs = aesjs;\n }\n })(exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/_version.js\n var require_version19 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"json-wallets/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/utils.js\n var require_utils5 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.uuidV4 = exports3.searchPath = exports3.getPassword = exports3.zpad = exports3.looseArrayify = void 0;\n var bytes_1 = require_lib2();\n var strings_1 = require_lib9();\n function looseArrayify(hexString) {\n if (typeof hexString === \"string\" && hexString.substring(0, 2) !== \"0x\") {\n hexString = \"0x\" + hexString;\n }\n return (0, bytes_1.arrayify)(hexString);\n }\n exports3.looseArrayify = looseArrayify;\n function zpad(value, length) {\n value = String(value);\n while (value.length < length) {\n value = \"0\" + value;\n }\n return value;\n }\n exports3.zpad = zpad;\n function getPassword(password) {\n if (typeof password === \"string\") {\n return (0, strings_1.toUtf8Bytes)(password, strings_1.UnicodeNormalizationForm.NFKC);\n }\n return (0, bytes_1.arrayify)(password);\n }\n exports3.getPassword = getPassword;\n function searchPath(object, path) {\n var currentChild = object;\n var comps = path.toLowerCase().split(\"/\");\n for (var i3 = 0; i3 < comps.length; i3++) {\n var matchingChild = null;\n for (var key in currentChild) {\n if (key.toLowerCase() === comps[i3]) {\n matchingChild = currentChild[key];\n break;\n }\n }\n if (matchingChild === null) {\n return null;\n }\n currentChild = matchingChild;\n }\n return currentChild;\n }\n exports3.searchPath = searchPath;\n function uuidV4(randomBytes3) {\n var bytes = (0, bytes_1.arrayify)(randomBytes3);\n bytes[6] = bytes[6] & 15 | 64;\n bytes[8] = bytes[8] & 63 | 128;\n var value = (0, bytes_1.hexlify)(bytes);\n return [\n value.substring(2, 10),\n value.substring(10, 14),\n value.substring(14, 18),\n value.substring(18, 22),\n value.substring(22, 34)\n ].join(\"-\");\n }\n exports3.uuidV4 = uuidV4;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/crowdsale.js\n var require_crowdsale = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/crowdsale.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decrypt = exports3.CrowdsaleAccount = void 0;\n var aes_js_1 = __importDefault4(require_aes_js());\n var address_1 = require_lib7();\n var bytes_1 = require_lib2();\n var keccak256_1 = require_lib5();\n var pbkdf2_1 = require_lib21();\n var strings_1 = require_lib9();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version19();\n var logger = new logger_1.Logger(_version_1.version);\n var utils_1 = require_utils5();\n var CrowdsaleAccount = (\n /** @class */\n function(_super) {\n __extends4(CrowdsaleAccount2, _super);\n function CrowdsaleAccount2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CrowdsaleAccount2.prototype.isCrowdsaleAccount = function(value) {\n return !!(value && value._isCrowdsaleAccount);\n };\n return CrowdsaleAccount2;\n }(properties_1.Description)\n );\n exports3.CrowdsaleAccount = CrowdsaleAccount;\n function decrypt(json, password) {\n var data = JSON.parse(json);\n password = (0, utils_1.getPassword)(password);\n var ethaddr = (0, address_1.getAddress)((0, utils_1.searchPath)(data, \"ethaddr\"));\n var encseed = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"encseed\"));\n if (!encseed || encseed.length % 16 !== 0) {\n logger.throwArgumentError(\"invalid encseed\", \"json\", json);\n }\n var key = (0, bytes_1.arrayify)((0, pbkdf2_1.pbkdf2)(password, password, 2e3, 32, \"sha256\")).slice(0, 16);\n var iv = encseed.slice(0, 16);\n var encryptedSeed = encseed.slice(16);\n var aesCbc = new aes_js_1.default.ModeOfOperation.cbc(key, iv);\n var seed = aes_js_1.default.padding.pkcs7.strip((0, bytes_1.arrayify)(aesCbc.decrypt(encryptedSeed)));\n var seedHex = \"\";\n for (var i3 = 0; i3 < seed.length; i3++) {\n seedHex += String.fromCharCode(seed[i3]);\n }\n var seedHexBytes = (0, strings_1.toUtf8Bytes)(seedHex);\n var privateKey = (0, keccak256_1.keccak256)(seedHexBytes);\n return new CrowdsaleAccount({\n _isCrowdsaleAccount: true,\n address: ethaddr,\n privateKey\n });\n }\n exports3.decrypt = decrypt;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/inspect.js\n var require_inspect = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/inspect.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getJsonWalletAddress = exports3.isKeystoreWallet = exports3.isCrowdsaleWallet = void 0;\n var address_1 = require_lib7();\n function isCrowdsaleWallet(json) {\n var data = null;\n try {\n data = JSON.parse(json);\n } catch (error) {\n return false;\n }\n return data.encseed && data.ethaddr;\n }\n exports3.isCrowdsaleWallet = isCrowdsaleWallet;\n function isKeystoreWallet(json) {\n var data = null;\n try {\n data = JSON.parse(json);\n } catch (error) {\n return false;\n }\n if (!data.version || parseInt(data.version) !== data.version || parseInt(data.version) !== 3) {\n return false;\n }\n return true;\n }\n exports3.isKeystoreWallet = isKeystoreWallet;\n function getJsonWalletAddress(json) {\n if (isCrowdsaleWallet(json)) {\n try {\n return (0, address_1.getAddress)(JSON.parse(json).ethaddr);\n } catch (error) {\n return null;\n }\n }\n if (isKeystoreWallet(json)) {\n try {\n return (0, address_1.getAddress)(JSON.parse(json).address);\n } catch (error) {\n return null;\n }\n }\n return null;\n }\n exports3.getJsonWalletAddress = getJsonWalletAddress;\n }\n });\n\n // ../../../node_modules/.pnpm/scrypt-js@3.0.1/node_modules/scrypt-js/scrypt.js\n var require_scrypt = __commonJS({\n \"../../../node_modules/.pnpm/scrypt-js@3.0.1/node_modules/scrypt-js/scrypt.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(root) {\n const MAX_VALUE = 2147483647;\n function SHA2563(m2) {\n const K2 = new Uint32Array([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n let h0 = 1779033703, h1 = 3144134277, h22 = 1013904242, h32 = 2773480762;\n let h4 = 1359893119, h5 = 2600822924, h6 = 528734635, h7 = 1541459225;\n const w3 = new Uint32Array(64);\n function blocks(p5) {\n let off2 = 0, len = p5.length;\n while (len >= 64) {\n let a3 = h0, b4 = h1, c4 = h22, d5 = h32, e2 = h4, f7 = h5, g4 = h6, h8 = h7, u2, i4, j2, t1, t22;\n for (i4 = 0; i4 < 16; i4++) {\n j2 = off2 + i4 * 4;\n w3[i4] = (p5[j2] & 255) << 24 | (p5[j2 + 1] & 255) << 16 | (p5[j2 + 2] & 255) << 8 | p5[j2 + 3] & 255;\n }\n for (i4 = 16; i4 < 64; i4++) {\n u2 = w3[i4 - 2];\n t1 = (u2 >>> 17 | u2 << 32 - 17) ^ (u2 >>> 19 | u2 << 32 - 19) ^ u2 >>> 10;\n u2 = w3[i4 - 15];\n t22 = (u2 >>> 7 | u2 << 32 - 7) ^ (u2 >>> 18 | u2 << 32 - 18) ^ u2 >>> 3;\n w3[i4] = (t1 + w3[i4 - 7] | 0) + (t22 + w3[i4 - 16] | 0) | 0;\n }\n for (i4 = 0; i4 < 64; i4++) {\n t1 = (((e2 >>> 6 | e2 << 32 - 6) ^ (e2 >>> 11 | e2 << 32 - 11) ^ (e2 >>> 25 | e2 << 32 - 25)) + (e2 & f7 ^ ~e2 & g4) | 0) + (h8 + (K2[i4] + w3[i4] | 0) | 0) | 0;\n t22 = ((a3 >>> 2 | a3 << 32 - 2) ^ (a3 >>> 13 | a3 << 32 - 13) ^ (a3 >>> 22 | a3 << 32 - 22)) + (a3 & b4 ^ a3 & c4 ^ b4 & c4) | 0;\n h8 = g4;\n g4 = f7;\n f7 = e2;\n e2 = d5 + t1 | 0;\n d5 = c4;\n c4 = b4;\n b4 = a3;\n a3 = t1 + t22 | 0;\n }\n h0 = h0 + a3 | 0;\n h1 = h1 + b4 | 0;\n h22 = h22 + c4 | 0;\n h32 = h32 + d5 | 0;\n h4 = h4 + e2 | 0;\n h5 = h5 + f7 | 0;\n h6 = h6 + g4 | 0;\n h7 = h7 + h8 | 0;\n off2 += 64;\n len -= 64;\n }\n }\n blocks(m2);\n let i3, bytesLeft = m2.length % 64, bitLenHi = m2.length / 536870912 | 0, bitLenLo = m2.length << 3, numZeros = bytesLeft < 56 ? 56 : 120, p4 = m2.slice(m2.length - bytesLeft, m2.length);\n p4.push(128);\n for (i3 = bytesLeft + 1; i3 < numZeros; i3++) {\n p4.push(0);\n }\n p4.push(bitLenHi >>> 24 & 255);\n p4.push(bitLenHi >>> 16 & 255);\n p4.push(bitLenHi >>> 8 & 255);\n p4.push(bitLenHi >>> 0 & 255);\n p4.push(bitLenLo >>> 24 & 255);\n p4.push(bitLenLo >>> 16 & 255);\n p4.push(bitLenLo >>> 8 & 255);\n p4.push(bitLenLo >>> 0 & 255);\n blocks(p4);\n return [\n h0 >>> 24 & 255,\n h0 >>> 16 & 255,\n h0 >>> 8 & 255,\n h0 >>> 0 & 255,\n h1 >>> 24 & 255,\n h1 >>> 16 & 255,\n h1 >>> 8 & 255,\n h1 >>> 0 & 255,\n h22 >>> 24 & 255,\n h22 >>> 16 & 255,\n h22 >>> 8 & 255,\n h22 >>> 0 & 255,\n h32 >>> 24 & 255,\n h32 >>> 16 & 255,\n h32 >>> 8 & 255,\n h32 >>> 0 & 255,\n h4 >>> 24 & 255,\n h4 >>> 16 & 255,\n h4 >>> 8 & 255,\n h4 >>> 0 & 255,\n h5 >>> 24 & 255,\n h5 >>> 16 & 255,\n h5 >>> 8 & 255,\n h5 >>> 0 & 255,\n h6 >>> 24 & 255,\n h6 >>> 16 & 255,\n h6 >>> 8 & 255,\n h6 >>> 0 & 255,\n h7 >>> 24 & 255,\n h7 >>> 16 & 255,\n h7 >>> 8 & 255,\n h7 >>> 0 & 255\n ];\n }\n function PBKDF2_HMAC_SHA256_OneIter(password, salt, dkLen) {\n password = password.length <= 64 ? password : SHA2563(password);\n const innerLen = 64 + salt.length + 4;\n const inner = new Array(innerLen);\n const outerKey = new Array(64);\n let i3;\n let dk = [];\n for (i3 = 0; i3 < 64; i3++) {\n inner[i3] = 54;\n }\n for (i3 = 0; i3 < password.length; i3++) {\n inner[i3] ^= password[i3];\n }\n for (i3 = 0; i3 < salt.length; i3++) {\n inner[64 + i3] = salt[i3];\n }\n for (i3 = innerLen - 4; i3 < innerLen; i3++) {\n inner[i3] = 0;\n }\n for (i3 = 0; i3 < 64; i3++)\n outerKey[i3] = 92;\n for (i3 = 0; i3 < password.length; i3++)\n outerKey[i3] ^= password[i3];\n function incrementCounter() {\n for (let i4 = innerLen - 1; i4 >= innerLen - 4; i4--) {\n inner[i4]++;\n if (inner[i4] <= 255)\n return;\n inner[i4] = 0;\n }\n }\n while (dkLen >= 32) {\n incrementCounter();\n dk = dk.concat(SHA2563(outerKey.concat(SHA2563(inner))));\n dkLen -= 32;\n }\n if (dkLen > 0) {\n incrementCounter();\n dk = dk.concat(SHA2563(outerKey.concat(SHA2563(inner))).slice(0, dkLen));\n }\n return dk;\n }\n function blockmix_salsa8(BY, Yi, r2, x4, _X) {\n let i3;\n arraycopy(BY, (2 * r2 - 1) * 16, _X, 0, 16);\n for (i3 = 0; i3 < 2 * r2; i3++) {\n blockxor(BY, i3 * 16, _X, 16);\n salsa20_8(_X, x4);\n arraycopy(_X, 0, BY, Yi + i3 * 16, 16);\n }\n for (i3 = 0; i3 < r2; i3++) {\n arraycopy(BY, Yi + i3 * 2 * 16, BY, i3 * 16, 16);\n }\n for (i3 = 0; i3 < r2; i3++) {\n arraycopy(BY, Yi + (i3 * 2 + 1) * 16, BY, (i3 + r2) * 16, 16);\n }\n }\n function R3(a3, b4) {\n return a3 << b4 | a3 >>> 32 - b4;\n }\n function salsa20_8(B2, x4) {\n arraycopy(B2, 0, x4, 0, 16);\n for (let i3 = 8; i3 > 0; i3 -= 2) {\n x4[4] ^= R3(x4[0] + x4[12], 7);\n x4[8] ^= R3(x4[4] + x4[0], 9);\n x4[12] ^= R3(x4[8] + x4[4], 13);\n x4[0] ^= R3(x4[12] + x4[8], 18);\n x4[9] ^= R3(x4[5] + x4[1], 7);\n x4[13] ^= R3(x4[9] + x4[5], 9);\n x4[1] ^= R3(x4[13] + x4[9], 13);\n x4[5] ^= R3(x4[1] + x4[13], 18);\n x4[14] ^= R3(x4[10] + x4[6], 7);\n x4[2] ^= R3(x4[14] + x4[10], 9);\n x4[6] ^= R3(x4[2] + x4[14], 13);\n x4[10] ^= R3(x4[6] + x4[2], 18);\n x4[3] ^= R3(x4[15] + x4[11], 7);\n x4[7] ^= R3(x4[3] + x4[15], 9);\n x4[11] ^= R3(x4[7] + x4[3], 13);\n x4[15] ^= R3(x4[11] + x4[7], 18);\n x4[1] ^= R3(x4[0] + x4[3], 7);\n x4[2] ^= R3(x4[1] + x4[0], 9);\n x4[3] ^= R3(x4[2] + x4[1], 13);\n x4[0] ^= R3(x4[3] + x4[2], 18);\n x4[6] ^= R3(x4[5] + x4[4], 7);\n x4[7] ^= R3(x4[6] + x4[5], 9);\n x4[4] ^= R3(x4[7] + x4[6], 13);\n x4[5] ^= R3(x4[4] + x4[7], 18);\n x4[11] ^= R3(x4[10] + x4[9], 7);\n x4[8] ^= R3(x4[11] + x4[10], 9);\n x4[9] ^= R3(x4[8] + x4[11], 13);\n x4[10] ^= R3(x4[9] + x4[8], 18);\n x4[12] ^= R3(x4[15] + x4[14], 7);\n x4[13] ^= R3(x4[12] + x4[15], 9);\n x4[14] ^= R3(x4[13] + x4[12], 13);\n x4[15] ^= R3(x4[14] + x4[13], 18);\n }\n for (let i3 = 0; i3 < 16; ++i3) {\n B2[i3] += x4[i3];\n }\n }\n function blockxor(S3, Si, D2, len) {\n for (let i3 = 0; i3 < len; i3++) {\n D2[i3] ^= S3[Si + i3];\n }\n }\n function arraycopy(src, srcPos, dest, destPos, length) {\n while (length--) {\n dest[destPos++] = src[srcPos++];\n }\n }\n function checkBufferish(o5) {\n if (!o5 || typeof o5.length !== \"number\") {\n return false;\n }\n for (let i3 = 0; i3 < o5.length; i3++) {\n const v2 = o5[i3];\n if (typeof v2 !== \"number\" || v2 % 1 || v2 < 0 || v2 >= 256) {\n return false;\n }\n }\n return true;\n }\n function ensureInteger(value, name) {\n if (typeof value !== \"number\" || value % 1) {\n throw new Error(\"invalid \" + name);\n }\n return value;\n }\n function _scrypt(password, salt, N4, r2, p4, dkLen, callback) {\n N4 = ensureInteger(N4, \"N\");\n r2 = ensureInteger(r2, \"r\");\n p4 = ensureInteger(p4, \"p\");\n dkLen = ensureInteger(dkLen, \"dkLen\");\n if (N4 === 0 || (N4 & N4 - 1) !== 0) {\n throw new Error(\"N must be power of 2\");\n }\n if (N4 > MAX_VALUE / 128 / r2) {\n throw new Error(\"N too large\");\n }\n if (r2 > MAX_VALUE / 128 / p4) {\n throw new Error(\"r too large\");\n }\n if (!checkBufferish(password)) {\n throw new Error(\"password must be an array or buffer\");\n }\n password = Array.prototype.slice.call(password);\n if (!checkBufferish(salt)) {\n throw new Error(\"salt must be an array or buffer\");\n }\n salt = Array.prototype.slice.call(salt);\n let b4 = PBKDF2_HMAC_SHA256_OneIter(password, salt, p4 * 128 * r2);\n const B2 = new Uint32Array(p4 * 32 * r2);\n for (let i3 = 0; i3 < B2.length; i3++) {\n const j2 = i3 * 4;\n B2[i3] = (b4[j2 + 3] & 255) << 24 | (b4[j2 + 2] & 255) << 16 | (b4[j2 + 1] & 255) << 8 | (b4[j2 + 0] & 255) << 0;\n }\n const XY = new Uint32Array(64 * r2);\n const V2 = new Uint32Array(32 * r2 * N4);\n const Yi = 32 * r2;\n const x4 = new Uint32Array(16);\n const _X = new Uint32Array(16);\n const totalOps = p4 * N4 * 2;\n let currentOp = 0;\n let lastPercent10 = null;\n let stop = false;\n let state = 0;\n let i0 = 0, i1;\n let Bi;\n const limit = callback ? parseInt(1e3 / r2) : 4294967295;\n const nextTick2 = typeof setImmediate !== \"undefined\" ? setImmediate : setTimeout;\n const incrementalSMix = function() {\n if (stop) {\n return callback(new Error(\"cancelled\"), currentOp / totalOps);\n }\n let steps;\n switch (state) {\n case 0:\n Bi = i0 * 32 * r2;\n arraycopy(B2, Bi, XY, 0, Yi);\n state = 1;\n i1 = 0;\n case 1:\n steps = N4 - i1;\n if (steps > limit) {\n steps = limit;\n }\n for (let i3 = 0; i3 < steps; i3++) {\n arraycopy(XY, 0, V2, (i1 + i3) * Yi, Yi);\n blockmix_salsa8(XY, Yi, r2, x4, _X);\n }\n i1 += steps;\n currentOp += steps;\n if (callback) {\n const percent10 = parseInt(1e3 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) {\n break;\n }\n lastPercent10 = percent10;\n }\n }\n if (i1 < N4) {\n break;\n }\n i1 = 0;\n state = 2;\n case 2:\n steps = N4 - i1;\n if (steps > limit) {\n steps = limit;\n }\n for (let i3 = 0; i3 < steps; i3++) {\n const offset = (2 * r2 - 1) * 16;\n const j2 = XY[offset] & N4 - 1;\n blockxor(V2, j2 * Yi, XY, Yi);\n blockmix_salsa8(XY, Yi, r2, x4, _X);\n }\n i1 += steps;\n currentOp += steps;\n if (callback) {\n const percent10 = parseInt(1e3 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) {\n break;\n }\n lastPercent10 = percent10;\n }\n }\n if (i1 < N4) {\n break;\n }\n arraycopy(XY, 0, B2, Bi, Yi);\n i0++;\n if (i0 < p4) {\n state = 0;\n break;\n }\n b4 = [];\n for (let i3 = 0; i3 < B2.length; i3++) {\n b4.push(B2[i3] >> 0 & 255);\n b4.push(B2[i3] >> 8 & 255);\n b4.push(B2[i3] >> 16 & 255);\n b4.push(B2[i3] >> 24 & 255);\n }\n const derivedKey = PBKDF2_HMAC_SHA256_OneIter(password, b4, dkLen);\n if (callback) {\n callback(null, 1, derivedKey);\n }\n return derivedKey;\n }\n if (callback) {\n nextTick2(incrementalSMix);\n }\n };\n if (!callback) {\n while (true) {\n const derivedKey = incrementalSMix();\n if (derivedKey != void 0) {\n return derivedKey;\n }\n }\n }\n incrementalSMix();\n }\n const lib = {\n scrypt: function(password, salt, N4, r2, p4, dkLen, progressCallback) {\n return new Promise(function(resolve, reject) {\n let lastProgress = 0;\n if (progressCallback) {\n progressCallback(0);\n }\n _scrypt(password, salt, N4, r2, p4, dkLen, function(error, progress, key) {\n if (error) {\n reject(error);\n } else if (key) {\n if (progressCallback && lastProgress !== 1) {\n progressCallback(1);\n }\n resolve(new Uint8Array(key));\n } else if (progressCallback && progress !== lastProgress) {\n lastProgress = progress;\n return progressCallback(progress);\n }\n });\n });\n },\n syncScrypt: function(password, salt, N4, r2, p4, dkLen) {\n return new Uint8Array(_scrypt(password, salt, N4, r2, p4, dkLen));\n }\n };\n if (typeof exports3 !== \"undefined\") {\n module.exports = lib;\n } else if (typeof define === \"function\" && define.amd) {\n define(lib);\n } else if (root) {\n if (root.scrypt) {\n root._scrypt = root.scrypt;\n }\n root.scrypt = lib;\n }\n })(exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/keystore.js\n var require_keystore = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/keystore.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encrypt = exports3.decrypt = exports3.decryptSync = exports3.KeystoreAccount = void 0;\n var aes_js_1 = __importDefault4(require_aes_js());\n var scrypt_js_1 = __importDefault4(require_scrypt());\n var address_1 = require_lib7();\n var bytes_1 = require_lib2();\n var hdnode_1 = require_lib23();\n var keccak256_1 = require_lib5();\n var pbkdf2_1 = require_lib21();\n var random_1 = require_lib24();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var utils_1 = require_utils5();\n var logger_1 = require_lib();\n var _version_1 = require_version19();\n var logger = new logger_1.Logger(_version_1.version);\n function hasMnemonic(value) {\n return value != null && value.mnemonic && value.mnemonic.phrase;\n }\n var KeystoreAccount = (\n /** @class */\n function(_super) {\n __extends4(KeystoreAccount2, _super);\n function KeystoreAccount2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n KeystoreAccount2.prototype.isKeystoreAccount = function(value) {\n return !!(value && value._isKeystoreAccount);\n };\n return KeystoreAccount2;\n }(properties_1.Description)\n );\n exports3.KeystoreAccount = KeystoreAccount;\n function _decrypt(data, key, ciphertext) {\n var cipher = (0, utils_1.searchPath)(data, \"crypto/cipher\");\n if (cipher === \"aes-128-ctr\") {\n var iv = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"crypto/cipherparams/iv\"));\n var counter = new aes_js_1.default.Counter(iv);\n var aesCtr = new aes_js_1.default.ModeOfOperation.ctr(key, counter);\n return (0, bytes_1.arrayify)(aesCtr.decrypt(ciphertext));\n }\n return null;\n }\n function _getAccount(data, key) {\n var ciphertext = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"crypto/ciphertext\"));\n var computedMAC = (0, bytes_1.hexlify)((0, keccak256_1.keccak256)((0, bytes_1.concat)([key.slice(16, 32), ciphertext]))).substring(2);\n if (computedMAC !== (0, utils_1.searchPath)(data, \"crypto/mac\").toLowerCase()) {\n throw new Error(\"invalid password\");\n }\n var privateKey = _decrypt(data, key.slice(0, 16), ciphertext);\n if (!privateKey) {\n logger.throwError(\"unsupported cipher\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"decrypt\"\n });\n }\n var mnemonicKey = key.slice(32, 64);\n var address = (0, transactions_1.computeAddress)(privateKey);\n if (data.address) {\n var check = data.address.toLowerCase();\n if (check.substring(0, 2) !== \"0x\") {\n check = \"0x\" + check;\n }\n if ((0, address_1.getAddress)(check) !== address) {\n throw new Error(\"address mismatch\");\n }\n }\n var account = {\n _isKeystoreAccount: true,\n address,\n privateKey: (0, bytes_1.hexlify)(privateKey)\n };\n if ((0, utils_1.searchPath)(data, \"x-ethers/version\") === \"0.1\") {\n var mnemonicCiphertext = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"x-ethers/mnemonicCiphertext\"));\n var mnemonicIv = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"x-ethers/mnemonicCounter\"));\n var mnemonicCounter = new aes_js_1.default.Counter(mnemonicIv);\n var mnemonicAesCtr = new aes_js_1.default.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);\n var path = (0, utils_1.searchPath)(data, \"x-ethers/path\") || hdnode_1.defaultPath;\n var locale = (0, utils_1.searchPath)(data, \"x-ethers/locale\") || \"en\";\n var entropy = (0, bytes_1.arrayify)(mnemonicAesCtr.decrypt(mnemonicCiphertext));\n try {\n var mnemonic = (0, hdnode_1.entropyToMnemonic)(entropy, locale);\n var node = hdnode_1.HDNode.fromMnemonic(mnemonic, null, locale).derivePath(path);\n if (node.privateKey != account.privateKey) {\n throw new Error(\"mnemonic mismatch\");\n }\n account.mnemonic = node.mnemonic;\n } catch (error) {\n if (error.code !== logger_1.Logger.errors.INVALID_ARGUMENT || error.argument !== \"wordlist\") {\n throw error;\n }\n }\n }\n return new KeystoreAccount(account);\n }\n function pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc) {\n return (0, bytes_1.arrayify)((0, pbkdf2_1.pbkdf2)(passwordBytes, salt, count, dkLen, prfFunc));\n }\n function pbkdf22(passwordBytes, salt, count, dkLen, prfFunc) {\n return Promise.resolve(pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc));\n }\n function _computeKdfKey(data, password, pbkdf2Func, scryptFunc, progressCallback) {\n var passwordBytes = (0, utils_1.getPassword)(password);\n var kdf = (0, utils_1.searchPath)(data, \"crypto/kdf\");\n if (kdf && typeof kdf === \"string\") {\n var throwError = function(name, value) {\n return logger.throwArgumentError(\"invalid key-derivation function parameters\", name, value);\n };\n if (kdf.toLowerCase() === \"scrypt\") {\n var salt = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"crypto/kdfparams/salt\"));\n var N4 = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/n\"));\n var r2 = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/r\"));\n var p4 = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/p\"));\n if (!N4 || !r2 || !p4) {\n throwError(\"kdf\", kdf);\n }\n if ((N4 & N4 - 1) !== 0) {\n throwError(\"N\", N4);\n }\n var dkLen = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/dklen\"));\n if (dkLen !== 32) {\n throwError(\"dklen\", dkLen);\n }\n return scryptFunc(passwordBytes, salt, N4, r2, p4, 64, progressCallback);\n } else if (kdf.toLowerCase() === \"pbkdf2\") {\n var salt = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"crypto/kdfparams/salt\"));\n var prfFunc = null;\n var prf = (0, utils_1.searchPath)(data, \"crypto/kdfparams/prf\");\n if (prf === \"hmac-sha256\") {\n prfFunc = \"sha256\";\n } else if (prf === \"hmac-sha512\") {\n prfFunc = \"sha512\";\n } else {\n throwError(\"prf\", prf);\n }\n var count = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/c\"));\n var dkLen = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/dklen\"));\n if (dkLen !== 32) {\n throwError(\"dklen\", dkLen);\n }\n return pbkdf2Func(passwordBytes, salt, count, dkLen, prfFunc);\n }\n }\n return logger.throwArgumentError(\"unsupported key-derivation function\", \"kdf\", kdf);\n }\n function decryptSync(json, password) {\n var data = JSON.parse(json);\n var key = _computeKdfKey(data, password, pbkdf2Sync, scrypt_js_1.default.syncScrypt);\n return _getAccount(data, key);\n }\n exports3.decryptSync = decryptSync;\n function decrypt(json, password, progressCallback) {\n return __awaiter4(this, void 0, void 0, function() {\n var data, key;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n data = JSON.parse(json);\n return [4, _computeKdfKey(data, password, pbkdf22, scrypt_js_1.default.scrypt, progressCallback)];\n case 1:\n key = _a.sent();\n return [2, _getAccount(data, key)];\n }\n });\n });\n }\n exports3.decrypt = decrypt;\n function encrypt(account, password, options, progressCallback) {\n try {\n if ((0, address_1.getAddress)(account.address) !== (0, transactions_1.computeAddress)(account.privateKey)) {\n throw new Error(\"address/privateKey mismatch\");\n }\n if (hasMnemonic(account)) {\n var mnemonic = account.mnemonic;\n var node = hdnode_1.HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path || hdnode_1.defaultPath);\n if (node.privateKey != account.privateKey) {\n throw new Error(\"mnemonic mismatch\");\n }\n }\n } catch (e2) {\n return Promise.reject(e2);\n }\n if (typeof options === \"function\" && !progressCallback) {\n progressCallback = options;\n options = {};\n }\n if (!options) {\n options = {};\n }\n var privateKey = (0, bytes_1.arrayify)(account.privateKey);\n var passwordBytes = (0, utils_1.getPassword)(password);\n var entropy = null;\n var path = null;\n var locale = null;\n if (hasMnemonic(account)) {\n var srcMnemonic = account.mnemonic;\n entropy = (0, bytes_1.arrayify)((0, hdnode_1.mnemonicToEntropy)(srcMnemonic.phrase, srcMnemonic.locale || \"en\"));\n path = srcMnemonic.path || hdnode_1.defaultPath;\n locale = srcMnemonic.locale || \"en\";\n }\n var client = options.client;\n if (!client) {\n client = \"ethers.js\";\n }\n var salt = null;\n if (options.salt) {\n salt = (0, bytes_1.arrayify)(options.salt);\n } else {\n salt = (0, random_1.randomBytes)(32);\n ;\n }\n var iv = null;\n if (options.iv) {\n iv = (0, bytes_1.arrayify)(options.iv);\n if (iv.length !== 16) {\n throw new Error(\"invalid iv\");\n }\n } else {\n iv = (0, random_1.randomBytes)(16);\n }\n var uuidRandom = null;\n if (options.uuid) {\n uuidRandom = (0, bytes_1.arrayify)(options.uuid);\n if (uuidRandom.length !== 16) {\n throw new Error(\"invalid uuid\");\n }\n } else {\n uuidRandom = (0, random_1.randomBytes)(16);\n }\n var N4 = 1 << 17, r2 = 8, p4 = 1;\n if (options.scrypt) {\n if (options.scrypt.N) {\n N4 = options.scrypt.N;\n }\n if (options.scrypt.r) {\n r2 = options.scrypt.r;\n }\n if (options.scrypt.p) {\n p4 = options.scrypt.p;\n }\n }\n return scrypt_js_1.default.scrypt(passwordBytes, salt, N4, r2, p4, 64, progressCallback).then(function(key) {\n key = (0, bytes_1.arrayify)(key);\n var derivedKey = key.slice(0, 16);\n var macPrefix = key.slice(16, 32);\n var mnemonicKey = key.slice(32, 64);\n var counter = new aes_js_1.default.Counter(iv);\n var aesCtr = new aes_js_1.default.ModeOfOperation.ctr(derivedKey, counter);\n var ciphertext = (0, bytes_1.arrayify)(aesCtr.encrypt(privateKey));\n var mac = (0, keccak256_1.keccak256)((0, bytes_1.concat)([macPrefix, ciphertext]));\n var data = {\n address: account.address.substring(2).toLowerCase(),\n id: (0, utils_1.uuidV4)(uuidRandom),\n version: 3,\n crypto: {\n cipher: \"aes-128-ctr\",\n cipherparams: {\n iv: (0, bytes_1.hexlify)(iv).substring(2)\n },\n ciphertext: (0, bytes_1.hexlify)(ciphertext).substring(2),\n kdf: \"scrypt\",\n kdfparams: {\n salt: (0, bytes_1.hexlify)(salt).substring(2),\n n: N4,\n dklen: 32,\n p: p4,\n r: r2\n },\n mac: mac.substring(2)\n }\n };\n if (entropy) {\n var mnemonicIv = (0, random_1.randomBytes)(16);\n var mnemonicCounter = new aes_js_1.default.Counter(mnemonicIv);\n var mnemonicAesCtr = new aes_js_1.default.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);\n var mnemonicCiphertext = (0, bytes_1.arrayify)(mnemonicAesCtr.encrypt(entropy));\n var now = /* @__PURE__ */ new Date();\n var timestamp = now.getUTCFullYear() + \"-\" + (0, utils_1.zpad)(now.getUTCMonth() + 1, 2) + \"-\" + (0, utils_1.zpad)(now.getUTCDate(), 2) + \"T\" + (0, utils_1.zpad)(now.getUTCHours(), 2) + \"-\" + (0, utils_1.zpad)(now.getUTCMinutes(), 2) + \"-\" + (0, utils_1.zpad)(now.getUTCSeconds(), 2) + \".0Z\";\n data[\"x-ethers\"] = {\n client,\n gethFilename: \"UTC--\" + timestamp + \"--\" + data.address,\n mnemonicCounter: (0, bytes_1.hexlify)(mnemonicIv).substring(2),\n mnemonicCiphertext: (0, bytes_1.hexlify)(mnemonicCiphertext).substring(2),\n path,\n locale,\n version: \"0.1\"\n };\n }\n return JSON.stringify(data);\n });\n }\n exports3.encrypt = encrypt;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/index.js\n var require_lib25 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decryptJsonWalletSync = exports3.decryptJsonWallet = exports3.getJsonWalletAddress = exports3.isKeystoreWallet = exports3.isCrowdsaleWallet = exports3.encryptKeystore = exports3.decryptKeystoreSync = exports3.decryptKeystore = exports3.decryptCrowdsale = void 0;\n var crowdsale_1 = require_crowdsale();\n Object.defineProperty(exports3, \"decryptCrowdsale\", { enumerable: true, get: function() {\n return crowdsale_1.decrypt;\n } });\n var inspect_1 = require_inspect();\n Object.defineProperty(exports3, \"getJsonWalletAddress\", { enumerable: true, get: function() {\n return inspect_1.getJsonWalletAddress;\n } });\n Object.defineProperty(exports3, \"isCrowdsaleWallet\", { enumerable: true, get: function() {\n return inspect_1.isCrowdsaleWallet;\n } });\n Object.defineProperty(exports3, \"isKeystoreWallet\", { enumerable: true, get: function() {\n return inspect_1.isKeystoreWallet;\n } });\n var keystore_1 = require_keystore();\n Object.defineProperty(exports3, \"decryptKeystore\", { enumerable: true, get: function() {\n return keystore_1.decrypt;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreSync\", { enumerable: true, get: function() {\n return keystore_1.decryptSync;\n } });\n Object.defineProperty(exports3, \"encryptKeystore\", { enumerable: true, get: function() {\n return keystore_1.encrypt;\n } });\n function decryptJsonWallet(json, password, progressCallback) {\n if ((0, inspect_1.isCrowdsaleWallet)(json)) {\n if (progressCallback) {\n progressCallback(0);\n }\n var account = (0, crowdsale_1.decrypt)(json, password);\n if (progressCallback) {\n progressCallback(1);\n }\n return Promise.resolve(account);\n }\n if ((0, inspect_1.isKeystoreWallet)(json)) {\n return (0, keystore_1.decrypt)(json, password, progressCallback);\n }\n return Promise.reject(new Error(\"invalid JSON wallet\"));\n }\n exports3.decryptJsonWallet = decryptJsonWallet;\n function decryptJsonWalletSync(json, password) {\n if ((0, inspect_1.isCrowdsaleWallet)(json)) {\n return (0, crowdsale_1.decrypt)(json, password);\n }\n if ((0, inspect_1.isKeystoreWallet)(json)) {\n return (0, keystore_1.decryptSync)(json, password);\n }\n throw new Error(\"invalid JSON wallet\");\n }\n exports3.decryptJsonWalletSync = decryptJsonWalletSync;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wallet@5.8.0/node_modules/@ethersproject/wallet/lib/_version.js\n var require_version20 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wallet@5.8.0/node_modules/@ethersproject/wallet/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"wallet/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wallet@5.8.0/node_modules/@ethersproject/wallet/lib/index.js\n var require_lib26 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wallet@5.8.0/node_modules/@ethersproject/wallet/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyTypedData = exports3.verifyMessage = exports3.Wallet = void 0;\n var address_1 = require_lib7();\n var abstract_provider_1 = require_lib14();\n var abstract_signer_1 = require_lib15();\n var bytes_1 = require_lib2();\n var hash_1 = require_lib12();\n var hdnode_1 = require_lib23();\n var keccak256_1 = require_lib5();\n var properties_1 = require_lib4();\n var random_1 = require_lib24();\n var signing_key_1 = require_lib16();\n var json_wallets_1 = require_lib25();\n var transactions_1 = require_lib17();\n var logger_1 = require_lib();\n var _version_1 = require_version20();\n var logger = new logger_1.Logger(_version_1.version);\n function isAccount(value) {\n return value != null && (0, bytes_1.isHexString)(value.privateKey, 32) && value.address != null;\n }\n function hasMnemonic(value) {\n var mnemonic = value.mnemonic;\n return mnemonic && mnemonic.phrase;\n }\n var Wallet = (\n /** @class */\n function(_super) {\n __extends4(Wallet2, _super);\n function Wallet2(privateKey, provider) {\n var _this = _super.call(this) || this;\n if (isAccount(privateKey)) {\n var signingKey_1 = new signing_key_1.SigningKey(privateKey.privateKey);\n (0, properties_1.defineReadOnly)(_this, \"_signingKey\", function() {\n return signingKey_1;\n });\n (0, properties_1.defineReadOnly)(_this, \"address\", (0, transactions_1.computeAddress)(_this.publicKey));\n if (_this.address !== (0, address_1.getAddress)(privateKey.address)) {\n logger.throwArgumentError(\"privateKey/address mismatch\", \"privateKey\", \"[REDACTED]\");\n }\n if (hasMnemonic(privateKey)) {\n var srcMnemonic_1 = privateKey.mnemonic;\n (0, properties_1.defineReadOnly)(_this, \"_mnemonic\", function() {\n return {\n phrase: srcMnemonic_1.phrase,\n path: srcMnemonic_1.path || hdnode_1.defaultPath,\n locale: srcMnemonic_1.locale || \"en\"\n };\n });\n var mnemonic = _this.mnemonic;\n var node = hdnode_1.HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path);\n if ((0, transactions_1.computeAddress)(node.privateKey) !== _this.address) {\n logger.throwArgumentError(\"mnemonic/address mismatch\", \"privateKey\", \"[REDACTED]\");\n }\n } else {\n (0, properties_1.defineReadOnly)(_this, \"_mnemonic\", function() {\n return null;\n });\n }\n } else {\n if (signing_key_1.SigningKey.isSigningKey(privateKey)) {\n if (privateKey.curve !== \"secp256k1\") {\n logger.throwArgumentError(\"unsupported curve; must be secp256k1\", \"privateKey\", \"[REDACTED]\");\n }\n (0, properties_1.defineReadOnly)(_this, \"_signingKey\", function() {\n return privateKey;\n });\n } else {\n if (typeof privateKey === \"string\") {\n if (privateKey.match(/^[0-9a-f]*$/i) && privateKey.length === 64) {\n privateKey = \"0x\" + privateKey;\n }\n }\n var signingKey_2 = new signing_key_1.SigningKey(privateKey);\n (0, properties_1.defineReadOnly)(_this, \"_signingKey\", function() {\n return signingKey_2;\n });\n }\n (0, properties_1.defineReadOnly)(_this, \"_mnemonic\", function() {\n return null;\n });\n (0, properties_1.defineReadOnly)(_this, \"address\", (0, transactions_1.computeAddress)(_this.publicKey));\n }\n if (provider && !abstract_provider_1.Provider.isProvider(provider)) {\n logger.throwArgumentError(\"invalid provider\", \"provider\", provider);\n }\n (0, properties_1.defineReadOnly)(_this, \"provider\", provider || null);\n return _this;\n }\n Object.defineProperty(Wallet2.prototype, \"mnemonic\", {\n get: function() {\n return this._mnemonic();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Wallet2.prototype, \"privateKey\", {\n get: function() {\n return this._signingKey().privateKey;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Wallet2.prototype, \"publicKey\", {\n get: function() {\n return this._signingKey().publicKey;\n },\n enumerable: false,\n configurable: true\n });\n Wallet2.prototype.getAddress = function() {\n return Promise.resolve(this.address);\n };\n Wallet2.prototype.connect = function(provider) {\n return new Wallet2(this, provider);\n };\n Wallet2.prototype.signTransaction = function(transaction) {\n var _this = this;\n return (0, properties_1.resolveProperties)(transaction).then(function(tx) {\n if (tx.from != null) {\n if ((0, address_1.getAddress)(tx.from) !== _this.address) {\n logger.throwArgumentError(\"transaction from address mismatch\", \"transaction.from\", transaction.from);\n }\n delete tx.from;\n }\n var signature = _this._signingKey().signDigest((0, keccak256_1.keccak256)((0, transactions_1.serialize)(tx)));\n return (0, transactions_1.serialize)(tx, signature);\n });\n };\n Wallet2.prototype.signMessage = function(message) {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n return [2, (0, bytes_1.joinSignature)(this._signingKey().signDigest((0, hash_1.hashMessage)(message)))];\n });\n });\n };\n Wallet2.prototype._signTypedData = function(domain2, types, value) {\n return __awaiter4(this, void 0, void 0, function() {\n var populated;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, hash_1._TypedDataEncoder.resolveNames(domain2, types, value, function(name) {\n if (_this.provider == null) {\n logger.throwError(\"cannot resolve ENS names without a provider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\",\n value: name\n });\n }\n return _this.provider.resolveName(name);\n })];\n case 1:\n populated = _a.sent();\n return [2, (0, bytes_1.joinSignature)(this._signingKey().signDigest(hash_1._TypedDataEncoder.hash(populated.domain, types, populated.value)))];\n }\n });\n });\n };\n Wallet2.prototype.encrypt = function(password, options, progressCallback) {\n if (typeof options === \"function\" && !progressCallback) {\n progressCallback = options;\n options = {};\n }\n if (progressCallback && typeof progressCallback !== \"function\") {\n throw new Error(\"invalid callback\");\n }\n if (!options) {\n options = {};\n }\n return (0, json_wallets_1.encryptKeystore)(this, password, options, progressCallback);\n };\n Wallet2.createRandom = function(options) {\n var entropy = (0, random_1.randomBytes)(16);\n if (!options) {\n options = {};\n }\n if (options.extraEntropy) {\n entropy = (0, bytes_1.arrayify)((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, bytes_1.concat)([entropy, options.extraEntropy])), 0, 16));\n }\n var mnemonic = (0, hdnode_1.entropyToMnemonic)(entropy, options.locale);\n return Wallet2.fromMnemonic(mnemonic, options.path, options.locale);\n };\n Wallet2.fromEncryptedJson = function(json, password, progressCallback) {\n return (0, json_wallets_1.decryptJsonWallet)(json, password, progressCallback).then(function(account) {\n return new Wallet2(account);\n });\n };\n Wallet2.fromEncryptedJsonSync = function(json, password) {\n return new Wallet2((0, json_wallets_1.decryptJsonWalletSync)(json, password));\n };\n Wallet2.fromMnemonic = function(mnemonic, path, wordlist) {\n if (!path) {\n path = hdnode_1.defaultPath;\n }\n return new Wallet2(hdnode_1.HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(path));\n };\n return Wallet2;\n }(abstract_signer_1.Signer)\n );\n exports3.Wallet = Wallet;\n function verifyMessage2(message, signature) {\n return (0, transactions_1.recoverAddress)((0, hash_1.hashMessage)(message), signature);\n }\n exports3.verifyMessage = verifyMessage2;\n function verifyTypedData2(domain2, types, value, signature) {\n return (0, transactions_1.recoverAddress)(hash_1._TypedDataEncoder.hash(domain2, types, value), signature);\n }\n exports3.verifyTypedData = verifyTypedData2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+networks@5.8.0/node_modules/@ethersproject/networks/lib/_version.js\n var require_version21 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+networks@5.8.0/node_modules/@ethersproject/networks/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"networks/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+networks@5.8.0/node_modules/@ethersproject/networks/lib/index.js\n var require_lib27 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+networks@5.8.0/node_modules/@ethersproject/networks/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getNetwork = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version21();\n var logger = new logger_1.Logger(_version_1.version);\n function isRenetworkable(value) {\n return value && typeof value.renetwork === \"function\";\n }\n function ethDefaultProvider(network) {\n var func = function(providers, options) {\n if (options == null) {\n options = {};\n }\n var providerList = [];\n if (providers.InfuraProvider && options.infura !== \"-\") {\n try {\n providerList.push(new providers.InfuraProvider(network, options.infura));\n } catch (error) {\n }\n }\n if (providers.EtherscanProvider && options.etherscan !== \"-\") {\n try {\n providerList.push(new providers.EtherscanProvider(network, options.etherscan));\n } catch (error) {\n }\n }\n if (providers.AlchemyProvider && options.alchemy !== \"-\") {\n try {\n providerList.push(new providers.AlchemyProvider(network, options.alchemy));\n } catch (error) {\n }\n }\n if (providers.PocketProvider && options.pocket !== \"-\") {\n var skip = [\"goerli\", \"ropsten\", \"rinkeby\", \"sepolia\"];\n try {\n var provider = new providers.PocketProvider(network, options.pocket);\n if (provider.network && skip.indexOf(provider.network.name) === -1) {\n providerList.push(provider);\n }\n } catch (error) {\n }\n }\n if (providers.CloudflareProvider && options.cloudflare !== \"-\") {\n try {\n providerList.push(new providers.CloudflareProvider(network));\n } catch (error) {\n }\n }\n if (providers.AnkrProvider && options.ankr !== \"-\") {\n try {\n var skip = [\"ropsten\"];\n var provider = new providers.AnkrProvider(network, options.ankr);\n if (provider.network && skip.indexOf(provider.network.name) === -1) {\n providerList.push(provider);\n }\n } catch (error) {\n }\n }\n if (providers.QuickNodeProvider && options.quicknode !== \"-\") {\n try {\n providerList.push(new providers.QuickNodeProvider(network, options.quicknode));\n } catch (error) {\n }\n }\n if (providerList.length === 0) {\n return null;\n }\n if (providers.FallbackProvider) {\n var quorum = 1;\n if (options.quorum != null) {\n quorum = options.quorum;\n } else if (network === \"homestead\") {\n quorum = 2;\n }\n return new providers.FallbackProvider(providerList, quorum);\n }\n return providerList[0];\n };\n func.renetwork = function(network2) {\n return ethDefaultProvider(network2);\n };\n return func;\n }\n function etcDefaultProvider(url, network) {\n var func = function(providers, options) {\n if (providers.JsonRpcProvider) {\n return new providers.JsonRpcProvider(url, network);\n }\n return null;\n };\n func.renetwork = function(network2) {\n return etcDefaultProvider(url, network2);\n };\n return func;\n }\n var homestead = {\n chainId: 1,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"homestead\",\n _defaultProvider: ethDefaultProvider(\"homestead\")\n };\n var ropsten = {\n chainId: 3,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"ropsten\",\n _defaultProvider: ethDefaultProvider(\"ropsten\")\n };\n var classicMordor = {\n chainId: 63,\n name: \"classicMordor\",\n _defaultProvider: etcDefaultProvider(\"https://www.ethercluster.com/mordor\", \"classicMordor\")\n };\n var networks = {\n unspecified: { chainId: 0, name: \"unspecified\" },\n homestead,\n mainnet: homestead,\n morden: { chainId: 2, name: \"morden\" },\n ropsten,\n testnet: ropsten,\n rinkeby: {\n chainId: 4,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"rinkeby\",\n _defaultProvider: ethDefaultProvider(\"rinkeby\")\n },\n kovan: {\n chainId: 42,\n name: \"kovan\",\n _defaultProvider: ethDefaultProvider(\"kovan\")\n },\n goerli: {\n chainId: 5,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"goerli\",\n _defaultProvider: ethDefaultProvider(\"goerli\")\n },\n kintsugi: { chainId: 1337702, name: \"kintsugi\" },\n sepolia: {\n chainId: 11155111,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"sepolia\",\n _defaultProvider: ethDefaultProvider(\"sepolia\")\n },\n holesky: {\n chainId: 17e3,\n name: \"holesky\",\n _defaultProvider: ethDefaultProvider(\"holesky\")\n },\n // ETC (See: #351)\n classic: {\n chainId: 61,\n name: \"classic\",\n _defaultProvider: etcDefaultProvider(\"https://www.ethercluster.com/etc\", \"classic\")\n },\n classicMorden: { chainId: 62, name: \"classicMorden\" },\n classicMordor,\n classicTestnet: classicMordor,\n classicKotti: {\n chainId: 6,\n name: \"classicKotti\",\n _defaultProvider: etcDefaultProvider(\"https://www.ethercluster.com/kotti\", \"classicKotti\")\n },\n xdai: { chainId: 100, name: \"xdai\" },\n matic: {\n chainId: 137,\n name: \"matic\",\n _defaultProvider: ethDefaultProvider(\"matic\")\n },\n maticmum: {\n chainId: 80001,\n name: \"maticmum\",\n _defaultProvider: ethDefaultProvider(\"maticmum\")\n },\n optimism: {\n chainId: 10,\n name: \"optimism\",\n _defaultProvider: ethDefaultProvider(\"optimism\")\n },\n \"optimism-kovan\": { chainId: 69, name: \"optimism-kovan\" },\n \"optimism-goerli\": { chainId: 420, name: \"optimism-goerli\" },\n \"optimism-sepolia\": { chainId: 11155420, name: \"optimism-sepolia\" },\n arbitrum: { chainId: 42161, name: \"arbitrum\" },\n \"arbitrum-rinkeby\": { chainId: 421611, name: \"arbitrum-rinkeby\" },\n \"arbitrum-goerli\": { chainId: 421613, name: \"arbitrum-goerli\" },\n \"arbitrum-sepolia\": { chainId: 421614, name: \"arbitrum-sepolia\" },\n bnb: { chainId: 56, name: \"bnb\" },\n bnbt: { chainId: 97, name: \"bnbt\" }\n };\n function getNetwork(network) {\n if (network == null) {\n return null;\n }\n if (typeof network === \"number\") {\n for (var name_1 in networks) {\n var standard_1 = networks[name_1];\n if (standard_1.chainId === network) {\n return {\n name: standard_1.name,\n chainId: standard_1.chainId,\n ensAddress: standard_1.ensAddress || null,\n _defaultProvider: standard_1._defaultProvider || null\n };\n }\n }\n return {\n chainId: network,\n name: \"unknown\"\n };\n }\n if (typeof network === \"string\") {\n var standard_2 = networks[network];\n if (standard_2 == null) {\n return null;\n }\n return {\n name: standard_2.name,\n chainId: standard_2.chainId,\n ensAddress: standard_2.ensAddress,\n _defaultProvider: standard_2._defaultProvider || null\n };\n }\n var standard = networks[network.name];\n if (!standard) {\n if (typeof network.chainId !== \"number\") {\n logger.throwArgumentError(\"invalid network chainId\", \"network\", network);\n }\n return network;\n }\n if (network.chainId !== 0 && network.chainId !== standard.chainId) {\n logger.throwArgumentError(\"network chainId mismatch\", \"network\", network);\n }\n var defaultProvider = network._defaultProvider || null;\n if (defaultProvider == null && standard._defaultProvider) {\n if (isRenetworkable(standard._defaultProvider)) {\n defaultProvider = standard._defaultProvider.renetwork(network);\n } else {\n defaultProvider = standard._defaultProvider;\n }\n }\n return {\n name: network.name,\n chainId: standard.chainId,\n ensAddress: network.ensAddress || standard.ensAddress || null,\n _defaultProvider: defaultProvider\n };\n }\n exports3.getNetwork = getNetwork;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/_version.js\n var require_version22 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"web/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/browser-geturl.js\n var require_browser_geturl = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/browser-geturl.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getUrl = void 0;\n var bytes_1 = require_lib2();\n function getUrl2(href, options) {\n return __awaiter4(this, void 0, void 0, function() {\n var request, opts, response, body, headers;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (options == null) {\n options = {};\n }\n request = {\n method: options.method || \"GET\",\n headers: options.headers || {},\n body: options.body || void 0\n };\n if (options.skipFetchSetup !== true) {\n request.mode = \"cors\";\n request.cache = \"no-cache\";\n request.credentials = \"same-origin\";\n request.redirect = \"follow\";\n request.referrer = \"client\";\n }\n ;\n if (options.fetchOptions != null) {\n opts = options.fetchOptions;\n if (opts.mode) {\n request.mode = opts.mode;\n }\n if (opts.cache) {\n request.cache = opts.cache;\n }\n if (opts.credentials) {\n request.credentials = opts.credentials;\n }\n if (opts.redirect) {\n request.redirect = opts.redirect;\n }\n if (opts.referrer) {\n request.referrer = opts.referrer;\n }\n }\n return [4, fetch(href, request)];\n case 1:\n response = _a.sent();\n return [4, response.arrayBuffer()];\n case 2:\n body = _a.sent();\n headers = {};\n if (response.headers.forEach) {\n response.headers.forEach(function(value, key) {\n headers[key.toLowerCase()] = value;\n });\n } else {\n response.headers.keys().forEach(function(key) {\n headers[key.toLowerCase()] = response.headers.get(key);\n });\n }\n return [2, {\n headers,\n statusCode: response.status,\n statusMessage: response.statusText,\n body: (0, bytes_1.arrayify)(new Uint8Array(body))\n }];\n }\n });\n });\n }\n exports3.getUrl = getUrl2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/index.js\n var require_lib28 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.poll = exports3.fetchJson = exports3._fetchData = void 0;\n var base64_1 = require_lib10();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var strings_1 = require_lib9();\n var logger_1 = require_lib();\n var _version_1 = require_version22();\n var logger = new logger_1.Logger(_version_1.version);\n var geturl_1 = require_browser_geturl();\n function staller(duration) {\n return new Promise(function(resolve) {\n setTimeout(resolve, duration);\n });\n }\n function bodyify(value, type) {\n if (value == null) {\n return null;\n }\n if (typeof value === \"string\") {\n return value;\n }\n if ((0, bytes_1.isBytesLike)(value)) {\n if (type && (type.split(\"/\")[0] === \"text\" || type.split(\";\")[0].trim() === \"application/json\")) {\n try {\n return (0, strings_1.toUtf8String)(value);\n } catch (error) {\n }\n ;\n }\n return (0, bytes_1.hexlify)(value);\n }\n return value;\n }\n function unpercent(value) {\n return (0, strings_1.toUtf8Bytes)(value.replace(/%([0-9a-f][0-9a-f])/gi, function(all, code) {\n return String.fromCharCode(parseInt(code, 16));\n }));\n }\n function _fetchData(connection, body, processFunc) {\n var attemptLimit = typeof connection === \"object\" && connection.throttleLimit != null ? connection.throttleLimit : 12;\n logger.assertArgument(attemptLimit > 0 && attemptLimit % 1 === 0, \"invalid connection throttle limit\", \"connection.throttleLimit\", attemptLimit);\n var throttleCallback = typeof connection === \"object\" ? connection.throttleCallback : null;\n var throttleSlotInterval = typeof connection === \"object\" && typeof connection.throttleSlotInterval === \"number\" ? connection.throttleSlotInterval : 100;\n logger.assertArgument(throttleSlotInterval > 0 && throttleSlotInterval % 1 === 0, \"invalid connection throttle slot interval\", \"connection.throttleSlotInterval\", throttleSlotInterval);\n var errorPassThrough = typeof connection === \"object\" ? !!connection.errorPassThrough : false;\n var headers = {};\n var url = null;\n var options = {\n method: \"GET\"\n };\n var allow304 = false;\n var timeout = 2 * 60 * 1e3;\n if (typeof connection === \"string\") {\n url = connection;\n } else if (typeof connection === \"object\") {\n if (connection == null || connection.url == null) {\n logger.throwArgumentError(\"missing URL\", \"connection.url\", connection);\n }\n url = connection.url;\n if (typeof connection.timeout === \"number\" && connection.timeout > 0) {\n timeout = connection.timeout;\n }\n if (connection.headers) {\n for (var key in connection.headers) {\n headers[key.toLowerCase()] = { key, value: String(connection.headers[key]) };\n if ([\"if-none-match\", \"if-modified-since\"].indexOf(key.toLowerCase()) >= 0) {\n allow304 = true;\n }\n }\n }\n options.allowGzip = !!connection.allowGzip;\n if (connection.user != null && connection.password != null) {\n if (url.substring(0, 6) !== \"https:\" && connection.allowInsecureAuthentication !== true) {\n logger.throwError(\"basic authentication requires a secure https url\", logger_1.Logger.errors.INVALID_ARGUMENT, { argument: \"url\", url, user: connection.user, password: \"[REDACTED]\" });\n }\n var authorization = connection.user + \":\" + connection.password;\n headers[\"authorization\"] = {\n key: \"Authorization\",\n value: \"Basic \" + (0, base64_1.encode)((0, strings_1.toUtf8Bytes)(authorization))\n };\n }\n if (connection.skipFetchSetup != null) {\n options.skipFetchSetup = !!connection.skipFetchSetup;\n }\n if (connection.fetchOptions != null) {\n options.fetchOptions = (0, properties_1.shallowCopy)(connection.fetchOptions);\n }\n }\n var reData = new RegExp(\"^data:([^;:]*)?(;base64)?,(.*)$\", \"i\");\n var dataMatch = url ? url.match(reData) : null;\n if (dataMatch) {\n try {\n var response = {\n statusCode: 200,\n statusMessage: \"OK\",\n headers: { \"content-type\": dataMatch[1] || \"text/plain\" },\n body: dataMatch[2] ? (0, base64_1.decode)(dataMatch[3]) : unpercent(dataMatch[3])\n };\n var result = response.body;\n if (processFunc) {\n result = processFunc(response.body, response);\n }\n return Promise.resolve(result);\n } catch (error) {\n logger.throwError(\"processing response error\", logger_1.Logger.errors.SERVER_ERROR, {\n body: bodyify(dataMatch[1], dataMatch[2]),\n error,\n requestBody: null,\n requestMethod: \"GET\",\n url\n });\n }\n }\n if (body) {\n options.method = \"POST\";\n options.body = body;\n if (headers[\"content-type\"] == null) {\n headers[\"content-type\"] = { key: \"Content-Type\", value: \"application/octet-stream\" };\n }\n if (headers[\"content-length\"] == null) {\n headers[\"content-length\"] = { key: \"Content-Length\", value: String(body.length) };\n }\n }\n var flatHeaders = {};\n Object.keys(headers).forEach(function(key2) {\n var header = headers[key2];\n flatHeaders[header.key] = header.value;\n });\n options.headers = flatHeaders;\n var runningTimeout = function() {\n var timer = null;\n var promise = new Promise(function(resolve, reject) {\n if (timeout) {\n timer = setTimeout(function() {\n if (timer == null) {\n return;\n }\n timer = null;\n reject(logger.makeError(\"timeout\", logger_1.Logger.errors.TIMEOUT, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n timeout,\n url\n }));\n }, timeout);\n }\n });\n var cancel = function() {\n if (timer == null) {\n return;\n }\n clearTimeout(timer);\n timer = null;\n };\n return { promise, cancel };\n }();\n var runningFetch = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var attempt, response2, location_1, tryAgain, stall, retryAfter, error_1, body_1, result2, error_2, tryAgain, timeout_1;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n attempt = 0;\n _a.label = 1;\n case 1:\n if (!(attempt < attemptLimit))\n return [3, 20];\n response2 = null;\n _a.label = 2;\n case 2:\n _a.trys.push([2, 9, , 10]);\n return [4, (0, geturl_1.getUrl)(url, options)];\n case 3:\n response2 = _a.sent();\n if (!(attempt < attemptLimit))\n return [3, 8];\n if (!(response2.statusCode === 301 || response2.statusCode === 302))\n return [3, 4];\n location_1 = response2.headers.location || \"\";\n if (options.method === \"GET\" && location_1.match(/^https:/)) {\n url = response2.headers.location;\n return [3, 19];\n }\n return [3, 8];\n case 4:\n if (!(response2.statusCode === 429))\n return [3, 8];\n tryAgain = true;\n if (!throttleCallback)\n return [3, 6];\n return [4, throttleCallback(attempt, url)];\n case 5:\n tryAgain = _a.sent();\n _a.label = 6;\n case 6:\n if (!tryAgain)\n return [3, 8];\n stall = 0;\n retryAfter = response2.headers[\"retry-after\"];\n if (typeof retryAfter === \"string\" && retryAfter.match(/^[1-9][0-9]*$/)) {\n stall = parseInt(retryAfter) * 1e3;\n } else {\n stall = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n }\n return [4, staller(stall)];\n case 7:\n _a.sent();\n return [3, 19];\n case 8:\n return [3, 10];\n case 9:\n error_1 = _a.sent();\n response2 = error_1.response;\n if (response2 == null) {\n runningTimeout.cancel();\n logger.throwError(\"missing response\", logger_1.Logger.errors.SERVER_ERROR, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n serverError: error_1,\n url\n });\n }\n return [3, 10];\n case 10:\n body_1 = response2.body;\n if (allow304 && response2.statusCode === 304) {\n body_1 = null;\n } else if (!errorPassThrough && (response2.statusCode < 200 || response2.statusCode >= 300)) {\n runningTimeout.cancel();\n logger.throwError(\"bad response\", logger_1.Logger.errors.SERVER_ERROR, {\n status: response2.statusCode,\n headers: response2.headers,\n body: bodyify(body_1, response2.headers ? response2.headers[\"content-type\"] : null),\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url\n });\n }\n if (!processFunc)\n return [3, 18];\n _a.label = 11;\n case 11:\n _a.trys.push([11, 13, , 18]);\n return [4, processFunc(body_1, response2)];\n case 12:\n result2 = _a.sent();\n runningTimeout.cancel();\n return [2, result2];\n case 13:\n error_2 = _a.sent();\n if (!(error_2.throttleRetry && attempt < attemptLimit))\n return [3, 17];\n tryAgain = true;\n if (!throttleCallback)\n return [3, 15];\n return [4, throttleCallback(attempt, url)];\n case 14:\n tryAgain = _a.sent();\n _a.label = 15;\n case 15:\n if (!tryAgain)\n return [3, 17];\n timeout_1 = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n return [4, staller(timeout_1)];\n case 16:\n _a.sent();\n return [3, 19];\n case 17:\n runningTimeout.cancel();\n logger.throwError(\"processing response error\", logger_1.Logger.errors.SERVER_ERROR, {\n body: bodyify(body_1, response2.headers ? response2.headers[\"content-type\"] : null),\n error: error_2,\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url\n });\n return [3, 18];\n case 18:\n runningTimeout.cancel();\n return [2, body_1];\n case 19:\n attempt++;\n return [3, 1];\n case 20:\n return [2, logger.throwError(\"failed response\", logger_1.Logger.errors.SERVER_ERROR, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url\n })];\n }\n });\n });\n }();\n return Promise.race([runningTimeout.promise, runningFetch]);\n }\n exports3._fetchData = _fetchData;\n function fetchJson(connection, json, processFunc) {\n var processJsonFunc = function(value, response) {\n var result = null;\n if (value != null) {\n try {\n result = JSON.parse((0, strings_1.toUtf8String)(value));\n } catch (error) {\n logger.throwError(\"invalid JSON\", logger_1.Logger.errors.SERVER_ERROR, {\n body: value,\n error\n });\n }\n }\n if (processFunc) {\n result = processFunc(result, response);\n }\n return result;\n };\n var body = null;\n if (json != null) {\n body = (0, strings_1.toUtf8Bytes)(json);\n var updated = typeof connection === \"string\" ? { url: connection } : (0, properties_1.shallowCopy)(connection);\n if (updated.headers) {\n var hasContentType = Object.keys(updated.headers).filter(function(k4) {\n return k4.toLowerCase() === \"content-type\";\n }).length !== 0;\n if (!hasContentType) {\n updated.headers = (0, properties_1.shallowCopy)(updated.headers);\n updated.headers[\"content-type\"] = \"application/json\";\n }\n } else {\n updated.headers = { \"content-type\": \"application/json\" };\n }\n connection = updated;\n }\n return _fetchData(connection, body, processJsonFunc);\n }\n exports3.fetchJson = fetchJson;\n function poll2(func, options) {\n if (!options) {\n options = {};\n }\n options = (0, properties_1.shallowCopy)(options);\n if (options.floor == null) {\n options.floor = 0;\n }\n if (options.ceiling == null) {\n options.ceiling = 1e4;\n }\n if (options.interval == null) {\n options.interval = 250;\n }\n return new Promise(function(resolve, reject) {\n var timer = null;\n var done = false;\n var cancel = function() {\n if (done) {\n return false;\n }\n done = true;\n if (timer) {\n clearTimeout(timer);\n }\n return true;\n };\n if (options.timeout) {\n timer = setTimeout(function() {\n if (cancel()) {\n reject(new Error(\"timeout\"));\n }\n }, options.timeout);\n }\n var retryLimit = options.retryLimit;\n var attempt = 0;\n function check() {\n return func().then(function(result) {\n if (result !== void 0) {\n if (cancel()) {\n resolve(result);\n }\n } else if (options.oncePoll) {\n options.oncePoll.once(\"poll\", check);\n } else if (options.onceBlock) {\n options.onceBlock.once(\"block\", check);\n } else if (!done) {\n attempt++;\n if (attempt > retryLimit) {\n if (cancel()) {\n reject(new Error(\"retry limit reached\"));\n }\n return;\n }\n var timeout = options.interval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n if (timeout < options.floor) {\n timeout = options.floor;\n }\n if (timeout > options.ceiling) {\n timeout = options.ceiling;\n }\n setTimeout(check, timeout);\n }\n return null;\n }, function(error) {\n if (cancel()) {\n reject(error);\n }\n });\n }\n check();\n });\n }\n exports3.poll = poll2;\n }\n });\n\n // ../../../node_modules/.pnpm/bech32@1.1.4/node_modules/bech32/index.js\n var require_bech32 = __commonJS({\n \"../../../node_modules/.pnpm/bech32@1.1.4/node_modules/bech32/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var ALPHABET = \"qpzry9x8gf2tvdw0s3jn54khce6mua7l\";\n var ALPHABET_MAP = {};\n for (z2 = 0; z2 < ALPHABET.length; z2++) {\n x4 = ALPHABET.charAt(z2);\n if (ALPHABET_MAP[x4] !== void 0)\n throw new TypeError(x4 + \" is ambiguous\");\n ALPHABET_MAP[x4] = z2;\n }\n var x4;\n var z2;\n function polymodStep(pre) {\n var b4 = pre >> 25;\n return (pre & 33554431) << 5 ^ -(b4 >> 0 & 1) & 996825010 ^ -(b4 >> 1 & 1) & 642813549 ^ -(b4 >> 2 & 1) & 513874426 ^ -(b4 >> 3 & 1) & 1027748829 ^ -(b4 >> 4 & 1) & 705979059;\n }\n function prefixChk(prefix) {\n var chk = 1;\n for (var i3 = 0; i3 < prefix.length; ++i3) {\n var c4 = prefix.charCodeAt(i3);\n if (c4 < 33 || c4 > 126)\n return \"Invalid prefix (\" + prefix + \")\";\n chk = polymodStep(chk) ^ c4 >> 5;\n }\n chk = polymodStep(chk);\n for (i3 = 0; i3 < prefix.length; ++i3) {\n var v2 = prefix.charCodeAt(i3);\n chk = polymodStep(chk) ^ v2 & 31;\n }\n return chk;\n }\n function encode5(prefix, words, LIMIT) {\n LIMIT = LIMIT || 90;\n if (prefix.length + 7 + words.length > LIMIT)\n throw new TypeError(\"Exceeds length limit\");\n prefix = prefix.toLowerCase();\n var chk = prefixChk(prefix);\n if (typeof chk === \"string\")\n throw new Error(chk);\n var result = prefix + \"1\";\n for (var i3 = 0; i3 < words.length; ++i3) {\n var x5 = words[i3];\n if (x5 >> 5 !== 0)\n throw new Error(\"Non 5-bit word\");\n chk = polymodStep(chk) ^ x5;\n result += ALPHABET.charAt(x5);\n }\n for (i3 = 0; i3 < 6; ++i3) {\n chk = polymodStep(chk);\n }\n chk ^= 1;\n for (i3 = 0; i3 < 6; ++i3) {\n var v2 = chk >> (5 - i3) * 5 & 31;\n result += ALPHABET.charAt(v2);\n }\n return result;\n }\n function __decode(str, LIMIT) {\n LIMIT = LIMIT || 90;\n if (str.length < 8)\n return str + \" too short\";\n if (str.length > LIMIT)\n return \"Exceeds length limit\";\n var lowered = str.toLowerCase();\n var uppered = str.toUpperCase();\n if (str !== lowered && str !== uppered)\n return \"Mixed-case string \" + str;\n str = lowered;\n var split3 = str.lastIndexOf(\"1\");\n if (split3 === -1)\n return \"No separator character for \" + str;\n if (split3 === 0)\n return \"Missing prefix for \" + str;\n var prefix = str.slice(0, split3);\n var wordChars = str.slice(split3 + 1);\n if (wordChars.length < 6)\n return \"Data too short\";\n var chk = prefixChk(prefix);\n if (typeof chk === \"string\")\n return chk;\n var words = [];\n for (var i3 = 0; i3 < wordChars.length; ++i3) {\n var c4 = wordChars.charAt(i3);\n var v2 = ALPHABET_MAP[c4];\n if (v2 === void 0)\n return \"Unknown character \" + c4;\n chk = polymodStep(chk) ^ v2;\n if (i3 + 6 >= wordChars.length)\n continue;\n words.push(v2);\n }\n if (chk !== 1)\n return \"Invalid checksum for \" + str;\n return { prefix, words };\n }\n function decodeUnsafe() {\n var res = __decode.apply(null, arguments);\n if (typeof res === \"object\")\n return res;\n }\n function decode2(str) {\n var res = __decode.apply(null, arguments);\n if (typeof res === \"object\")\n return res;\n throw new Error(res);\n }\n function convert(data, inBits, outBits, pad6) {\n var value = 0;\n var bits = 0;\n var maxV = (1 << outBits) - 1;\n var result = [];\n for (var i3 = 0; i3 < data.length; ++i3) {\n value = value << inBits | data[i3];\n bits += inBits;\n while (bits >= outBits) {\n bits -= outBits;\n result.push(value >> bits & maxV);\n }\n }\n if (pad6) {\n if (bits > 0) {\n result.push(value << outBits - bits & maxV);\n }\n } else {\n if (bits >= inBits)\n return \"Excess padding\";\n if (value << outBits - bits & maxV)\n return \"Non-zero padding\";\n }\n return result;\n }\n function toWordsUnsafe(bytes) {\n var res = convert(bytes, 8, 5, true);\n if (Array.isArray(res))\n return res;\n }\n function toWords(bytes) {\n var res = convert(bytes, 8, 5, true);\n if (Array.isArray(res))\n return res;\n throw new Error(res);\n }\n function fromWordsUnsafe(words) {\n var res = convert(words, 5, 8, false);\n if (Array.isArray(res))\n return res;\n }\n function fromWords(words) {\n var res = convert(words, 5, 8, false);\n if (Array.isArray(res))\n return res;\n throw new Error(res);\n }\n module.exports = {\n decodeUnsafe,\n decode: decode2,\n encode: encode5,\n toWordsUnsafe,\n toWords,\n fromWordsUnsafe,\n fromWords\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/_version.js\n var require_version23 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"providers/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/formatter.js\n var require_formatter = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/formatter.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.showThrottleMessage = exports3.isCommunityResource = exports3.isCommunityResourcable = exports3.Formatter = void 0;\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var constants_1 = require_lib8();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var Formatter = (\n /** @class */\n function() {\n function Formatter2() {\n this.formats = this.getDefaultFormats();\n }\n Formatter2.prototype.getDefaultFormats = function() {\n var _this = this;\n var formats = {};\n var address = this.address.bind(this);\n var bigNumber = this.bigNumber.bind(this);\n var blockTag = this.blockTag.bind(this);\n var data = this.data.bind(this);\n var hash3 = this.hash.bind(this);\n var hex = this.hex.bind(this);\n var number = this.number.bind(this);\n var type = this.type.bind(this);\n var strictData = function(v2) {\n return _this.data(v2, true);\n };\n formats.transaction = {\n hash: hash3,\n type,\n accessList: Formatter2.allowNull(this.accessList.bind(this), null),\n blockHash: Formatter2.allowNull(hash3, null),\n blockNumber: Formatter2.allowNull(number, null),\n transactionIndex: Formatter2.allowNull(number, null),\n confirmations: Formatter2.allowNull(number, null),\n from: address,\n // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas)\n // must be set\n gasPrice: Formatter2.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter2.allowNull(bigNumber),\n maxFeePerGas: Formatter2.allowNull(bigNumber),\n gasLimit: bigNumber,\n to: Formatter2.allowNull(address, null),\n value: bigNumber,\n nonce: number,\n data,\n r: Formatter2.allowNull(this.uint256),\n s: Formatter2.allowNull(this.uint256),\n v: Formatter2.allowNull(number),\n creates: Formatter2.allowNull(address, null),\n raw: Formatter2.allowNull(data)\n };\n formats.transactionRequest = {\n from: Formatter2.allowNull(address),\n nonce: Formatter2.allowNull(number),\n gasLimit: Formatter2.allowNull(bigNumber),\n gasPrice: Formatter2.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter2.allowNull(bigNumber),\n maxFeePerGas: Formatter2.allowNull(bigNumber),\n to: Formatter2.allowNull(address),\n value: Formatter2.allowNull(bigNumber),\n data: Formatter2.allowNull(strictData),\n type: Formatter2.allowNull(number),\n accessList: Formatter2.allowNull(this.accessList.bind(this), null)\n };\n formats.receiptLog = {\n transactionIndex: number,\n blockNumber: number,\n transactionHash: hash3,\n address,\n topics: Formatter2.arrayOf(hash3),\n data,\n logIndex: number,\n blockHash: hash3\n };\n formats.receipt = {\n to: Formatter2.allowNull(this.address, null),\n from: Formatter2.allowNull(this.address, null),\n contractAddress: Formatter2.allowNull(address, null),\n transactionIndex: number,\n // should be allowNull(hash), but broken-EIP-658 support is handled in receipt\n root: Formatter2.allowNull(hex),\n gasUsed: bigNumber,\n logsBloom: Formatter2.allowNull(data),\n blockHash: hash3,\n transactionHash: hash3,\n logs: Formatter2.arrayOf(this.receiptLog.bind(this)),\n blockNumber: number,\n confirmations: Formatter2.allowNull(number, null),\n cumulativeGasUsed: bigNumber,\n effectiveGasPrice: Formatter2.allowNull(bigNumber),\n status: Formatter2.allowNull(number),\n type\n };\n formats.block = {\n hash: Formatter2.allowNull(hash3),\n parentHash: hash3,\n number,\n timestamp: number,\n nonce: Formatter2.allowNull(hex),\n difficulty: this.difficulty.bind(this),\n gasLimit: bigNumber,\n gasUsed: bigNumber,\n miner: Formatter2.allowNull(address),\n extraData: data,\n transactions: Formatter2.allowNull(Formatter2.arrayOf(hash3)),\n baseFeePerGas: Formatter2.allowNull(bigNumber)\n };\n formats.blockWithTransactions = (0, properties_1.shallowCopy)(formats.block);\n formats.blockWithTransactions.transactions = Formatter2.allowNull(Formatter2.arrayOf(this.transactionResponse.bind(this)));\n formats.filter = {\n fromBlock: Formatter2.allowNull(blockTag, void 0),\n toBlock: Formatter2.allowNull(blockTag, void 0),\n blockHash: Formatter2.allowNull(hash3, void 0),\n address: Formatter2.allowNull(address, void 0),\n topics: Formatter2.allowNull(this.topics.bind(this), void 0)\n };\n formats.filterLog = {\n blockNumber: Formatter2.allowNull(number),\n blockHash: Formatter2.allowNull(hash3),\n transactionIndex: number,\n removed: Formatter2.allowNull(this.boolean.bind(this)),\n address,\n data: Formatter2.allowFalsish(data, \"0x\"),\n topics: Formatter2.arrayOf(hash3),\n transactionHash: hash3,\n logIndex: number\n };\n return formats;\n };\n Formatter2.prototype.accessList = function(accessList) {\n return (0, transactions_1.accessListify)(accessList || []);\n };\n Formatter2.prototype.number = function(number) {\n if (number === \"0x\") {\n return 0;\n }\n return bignumber_1.BigNumber.from(number).toNumber();\n };\n Formatter2.prototype.type = function(number) {\n if (number === \"0x\" || number == null) {\n return 0;\n }\n return bignumber_1.BigNumber.from(number).toNumber();\n };\n Formatter2.prototype.bigNumber = function(value) {\n return bignumber_1.BigNumber.from(value);\n };\n Formatter2.prototype.boolean = function(value) {\n if (typeof value === \"boolean\") {\n return value;\n }\n if (typeof value === \"string\") {\n value = value.toLowerCase();\n if (value === \"true\") {\n return true;\n }\n if (value === \"false\") {\n return false;\n }\n }\n throw new Error(\"invalid boolean - \" + value);\n };\n Formatter2.prototype.hex = function(value, strict) {\n if (typeof value === \"string\") {\n if (!strict && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if ((0, bytes_1.isHexString)(value)) {\n return value.toLowerCase();\n }\n }\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n };\n Formatter2.prototype.data = function(value, strict) {\n var result = this.hex(value, strict);\n if (result.length % 2 !== 0) {\n throw new Error(\"invalid data; odd-length - \" + value);\n }\n return result;\n };\n Formatter2.prototype.address = function(value) {\n return (0, address_1.getAddress)(value);\n };\n Formatter2.prototype.callAddress = function(value) {\n if (!(0, bytes_1.isHexString)(value, 32)) {\n return null;\n }\n var address = (0, address_1.getAddress)((0, bytes_1.hexDataSlice)(value, 12));\n return address === constants_1.AddressZero ? null : address;\n };\n Formatter2.prototype.contractAddress = function(value) {\n return (0, address_1.getContractAddress)(value);\n };\n Formatter2.prototype.blockTag = function(blockTag) {\n if (blockTag == null) {\n return \"latest\";\n }\n if (blockTag === \"earliest\") {\n return \"0x0\";\n }\n switch (blockTag) {\n case \"earliest\":\n return \"0x0\";\n case \"latest\":\n case \"pending\":\n case \"safe\":\n case \"finalized\":\n return blockTag;\n }\n if (typeof blockTag === \"number\" || (0, bytes_1.isHexString)(blockTag)) {\n return (0, bytes_1.hexValue)(blockTag);\n }\n throw new Error(\"invalid blockTag\");\n };\n Formatter2.prototype.hash = function(value, strict) {\n var result = this.hex(value, strict);\n if ((0, bytes_1.hexDataLength)(result) !== 32) {\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n }\n return result;\n };\n Formatter2.prototype.difficulty = function(value) {\n if (value == null) {\n return null;\n }\n var v2 = bignumber_1.BigNumber.from(value);\n try {\n return v2.toNumber();\n } catch (error) {\n }\n return null;\n };\n Formatter2.prototype.uint256 = function(value) {\n if (!(0, bytes_1.isHexString)(value)) {\n throw new Error(\"invalid uint256\");\n }\n return (0, bytes_1.hexZeroPad)(value, 32);\n };\n Formatter2.prototype._block = function(value, format) {\n if (value.author != null && value.miner == null) {\n value.miner = value.author;\n }\n var difficulty = value._difficulty != null ? value._difficulty : value.difficulty;\n var result = Formatter2.check(format, value);\n result._difficulty = difficulty == null ? null : bignumber_1.BigNumber.from(difficulty);\n return result;\n };\n Formatter2.prototype.block = function(value) {\n return this._block(value, this.formats.block);\n };\n Formatter2.prototype.blockWithTransactions = function(value) {\n return this._block(value, this.formats.blockWithTransactions);\n };\n Formatter2.prototype.transactionRequest = function(value) {\n return Formatter2.check(this.formats.transactionRequest, value);\n };\n Formatter2.prototype.transactionResponse = function(transaction) {\n if (transaction.gas != null && transaction.gasLimit == null) {\n transaction.gasLimit = transaction.gas;\n }\n if (transaction.to && bignumber_1.BigNumber.from(transaction.to).isZero()) {\n transaction.to = \"0x0000000000000000000000000000000000000000\";\n }\n if (transaction.input != null && transaction.data == null) {\n transaction.data = transaction.input;\n }\n if (transaction.to == null && transaction.creates == null) {\n transaction.creates = this.contractAddress(transaction);\n }\n if ((transaction.type === 1 || transaction.type === 2) && transaction.accessList == null) {\n transaction.accessList = [];\n }\n var result = Formatter2.check(this.formats.transaction, transaction);\n if (transaction.chainId != null) {\n var chainId = transaction.chainId;\n if ((0, bytes_1.isHexString)(chainId)) {\n chainId = bignumber_1.BigNumber.from(chainId).toNumber();\n }\n result.chainId = chainId;\n } else {\n var chainId = transaction.networkId;\n if (chainId == null && result.v == null) {\n chainId = transaction.chainId;\n }\n if ((0, bytes_1.isHexString)(chainId)) {\n chainId = bignumber_1.BigNumber.from(chainId).toNumber();\n }\n if (typeof chainId !== \"number\" && result.v != null) {\n chainId = (result.v - 35) / 2;\n if (chainId < 0) {\n chainId = 0;\n }\n chainId = parseInt(chainId);\n }\n if (typeof chainId !== \"number\") {\n chainId = 0;\n }\n result.chainId = chainId;\n }\n if (result.blockHash && result.blockHash.replace(/0/g, \"\") === \"x\") {\n result.blockHash = null;\n }\n return result;\n };\n Formatter2.prototype.transaction = function(value) {\n return (0, transactions_1.parse)(value);\n };\n Formatter2.prototype.receiptLog = function(value) {\n return Formatter2.check(this.formats.receiptLog, value);\n };\n Formatter2.prototype.receipt = function(value) {\n var result = Formatter2.check(this.formats.receipt, value);\n if (result.root != null) {\n if (result.root.length <= 4) {\n var value_1 = bignumber_1.BigNumber.from(result.root).toNumber();\n if (value_1 === 0 || value_1 === 1) {\n if (result.status != null && result.status !== value_1) {\n logger.throwArgumentError(\"alt-root-status/status mismatch\", \"value\", { root: result.root, status: result.status });\n }\n result.status = value_1;\n delete result.root;\n } else {\n logger.throwArgumentError(\"invalid alt-root-status\", \"value.root\", result.root);\n }\n } else if (result.root.length !== 66) {\n logger.throwArgumentError(\"invalid root hash\", \"value.root\", result.root);\n }\n }\n if (result.status != null) {\n result.byzantium = true;\n }\n return result;\n };\n Formatter2.prototype.topics = function(value) {\n var _this = this;\n if (Array.isArray(value)) {\n return value.map(function(v2) {\n return _this.topics(v2);\n });\n } else if (value != null) {\n return this.hash(value, true);\n }\n return null;\n };\n Formatter2.prototype.filter = function(value) {\n return Formatter2.check(this.formats.filter, value);\n };\n Formatter2.prototype.filterLog = function(value) {\n return Formatter2.check(this.formats.filterLog, value);\n };\n Formatter2.check = function(format, object) {\n var result = {};\n for (var key in format) {\n try {\n var value = format[key](object[key]);\n if (value !== void 0) {\n result[key] = value;\n }\n } catch (error) {\n error.checkKey = key;\n error.checkValue = object[key];\n throw error;\n }\n }\n return result;\n };\n Formatter2.allowNull = function(format, nullValue) {\n return function(value) {\n if (value == null) {\n return nullValue;\n }\n return format(value);\n };\n };\n Formatter2.allowFalsish = function(format, replaceValue) {\n return function(value) {\n if (!value) {\n return replaceValue;\n }\n return format(value);\n };\n };\n Formatter2.arrayOf = function(format) {\n return function(array) {\n if (!Array.isArray(array)) {\n throw new Error(\"not an array\");\n }\n var result = [];\n array.forEach(function(value) {\n result.push(format(value));\n });\n return result;\n };\n };\n return Formatter2;\n }()\n );\n exports3.Formatter = Formatter;\n function isCommunityResourcable(value) {\n return value && typeof value.isCommunityResource === \"function\";\n }\n exports3.isCommunityResourcable = isCommunityResourcable;\n function isCommunityResource(value) {\n return isCommunityResourcable(value) && value.isCommunityResource();\n }\n exports3.isCommunityResource = isCommunityResource;\n var throttleMessage = false;\n function showThrottleMessage() {\n if (throttleMessage) {\n return;\n }\n throttleMessage = true;\n console.log(\"========= NOTICE =========\");\n console.log(\"Request-Rate Exceeded (this message will not be repeated)\");\n console.log(\"\");\n console.log(\"The default API keys for each service are provided as a highly-throttled,\");\n console.log(\"community resource for low-traffic projects and early prototyping.\");\n console.log(\"\");\n console.log(\"While your application will continue to function, we highly recommended\");\n console.log(\"signing up for your own API keys to improve performance, increase your\");\n console.log(\"request rate/limit and enable other perks, such as metrics and advanced APIs.\");\n console.log(\"\");\n console.log(\"For more details: https://docs.ethers.io/api-keys/\");\n console.log(\"==========================\");\n }\n exports3.showThrottleMessage = showThrottleMessage;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/base-provider.js\n var require_base_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/base-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BaseProvider = exports3.Resolver = exports3.Event = void 0;\n var abstract_provider_1 = require_lib14();\n var base64_1 = require_lib10();\n var basex_1 = require_lib19();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var constants_1 = require_lib8();\n var hash_1 = require_lib12();\n var networks_1 = require_lib27();\n var properties_1 = require_lib4();\n var sha2_1 = require_lib20();\n var strings_1 = require_lib9();\n var web_1 = require_lib28();\n var bech32_1 = __importDefault4(require_bech32());\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var formatter_1 = require_formatter();\n var MAX_CCIP_REDIRECTS = 10;\n function checkTopic(topic) {\n if (topic == null) {\n return \"null\";\n }\n if ((0, bytes_1.hexDataLength)(topic) !== 32) {\n logger.throwArgumentError(\"invalid topic\", \"topic\", topic);\n }\n return topic.toLowerCase();\n }\n function serializeTopics(topics) {\n topics = topics.slice();\n while (topics.length > 0 && topics[topics.length - 1] == null) {\n topics.pop();\n }\n return topics.map(function(topic) {\n if (Array.isArray(topic)) {\n var unique_1 = {};\n topic.forEach(function(topic2) {\n unique_1[checkTopic(topic2)] = true;\n });\n var sorted = Object.keys(unique_1);\n sorted.sort();\n return sorted.join(\"|\");\n } else {\n return checkTopic(topic);\n }\n }).join(\"&\");\n }\n function deserializeTopics(data) {\n if (data === \"\") {\n return [];\n }\n return data.split(/&/g).map(function(topic) {\n if (topic === \"\") {\n return [];\n }\n var comps = topic.split(\"|\").map(function(topic2) {\n return topic2 === \"null\" ? null : topic2;\n });\n return comps.length === 1 ? comps[0] : comps;\n });\n }\n function getEventTag(eventName) {\n if (typeof eventName === \"string\") {\n eventName = eventName.toLowerCase();\n if ((0, bytes_1.hexDataLength)(eventName) === 32) {\n return \"tx:\" + eventName;\n }\n if (eventName.indexOf(\":\") === -1) {\n return eventName;\n }\n } else if (Array.isArray(eventName)) {\n return \"filter:*:\" + serializeTopics(eventName);\n } else if (abstract_provider_1.ForkEvent.isForkEvent(eventName)) {\n logger.warn(\"not implemented\");\n throw new Error(\"not implemented\");\n } else if (eventName && typeof eventName === \"object\") {\n return \"filter:\" + (eventName.address || \"*\") + \":\" + serializeTopics(eventName.topics || []);\n }\n throw new Error(\"invalid event - \" + eventName);\n }\n function getTime() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n function stall(duration) {\n return new Promise(function(resolve) {\n setTimeout(resolve, duration);\n });\n }\n var PollableEvents = [\"block\", \"network\", \"pending\", \"poll\"];\n var Event2 = (\n /** @class */\n function() {\n function Event3(tag, listener, once2) {\n (0, properties_1.defineReadOnly)(this, \"tag\", tag);\n (0, properties_1.defineReadOnly)(this, \"listener\", listener);\n (0, properties_1.defineReadOnly)(this, \"once\", once2);\n this._lastBlockNumber = -2;\n this._inflight = false;\n }\n Object.defineProperty(Event3.prototype, \"event\", {\n get: function() {\n switch (this.type) {\n case \"tx\":\n return this.hash;\n case \"filter\":\n return this.filter;\n }\n return this.tag;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Event3.prototype, \"type\", {\n get: function() {\n return this.tag.split(\":\")[0];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Event3.prototype, \"hash\", {\n get: function() {\n var comps = this.tag.split(\":\");\n if (comps[0] !== \"tx\") {\n return null;\n }\n return comps[1];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Event3.prototype, \"filter\", {\n get: function() {\n var comps = this.tag.split(\":\");\n if (comps[0] !== \"filter\") {\n return null;\n }\n var address = comps[1];\n var topics = deserializeTopics(comps[2]);\n var filter = {};\n if (topics.length > 0) {\n filter.topics = topics;\n }\n if (address && address !== \"*\") {\n filter.address = address;\n }\n return filter;\n },\n enumerable: false,\n configurable: true\n });\n Event3.prototype.pollable = function() {\n return this.tag.indexOf(\":\") >= 0 || PollableEvents.indexOf(this.tag) >= 0;\n };\n return Event3;\n }()\n );\n exports3.Event = Event2;\n var coinInfos = {\n \"0\": { symbol: \"btc\", p2pkh: 0, p2sh: 5, prefix: \"bc\" },\n \"2\": { symbol: \"ltc\", p2pkh: 48, p2sh: 50, prefix: \"ltc\" },\n \"3\": { symbol: \"doge\", p2pkh: 30, p2sh: 22 },\n \"60\": { symbol: \"eth\", ilk: \"eth\" },\n \"61\": { symbol: \"etc\", ilk: \"eth\" },\n \"700\": { symbol: \"xdai\", ilk: \"eth\" }\n };\n function bytes32ify(value) {\n return (0, bytes_1.hexZeroPad)(bignumber_1.BigNumber.from(value).toHexString(), 32);\n }\n function base58Encode(data) {\n return basex_1.Base58.encode((0, bytes_1.concat)([data, (0, bytes_1.hexDataSlice)((0, sha2_1.sha256)((0, sha2_1.sha256)(data)), 0, 4)]));\n }\n var matcherIpfs = new RegExp(\"^(ipfs)://(.*)$\", \"i\");\n var matchers = [\n new RegExp(\"^(https)://(.*)$\", \"i\"),\n new RegExp(\"^(data):(.*)$\", \"i\"),\n matcherIpfs,\n new RegExp(\"^eip155:[0-9]+/(erc[0-9]+):(.*)$\", \"i\")\n ];\n function _parseString(result, start) {\n try {\n return (0, strings_1.toUtf8String)(_parseBytes(result, start));\n } catch (error) {\n }\n return null;\n }\n function _parseBytes(result, start) {\n if (result === \"0x\") {\n return null;\n }\n var offset = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(result, start, start + 32)).toNumber();\n var length = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(result, offset, offset + 32)).toNumber();\n return (0, bytes_1.hexDataSlice)(result, offset + 32, offset + 32 + length);\n }\n function getIpfsLink(link) {\n if (link.match(/^ipfs:\\/\\/ipfs\\//i)) {\n link = link.substring(12);\n } else if (link.match(/^ipfs:\\/\\//i)) {\n link = link.substring(7);\n } else {\n logger.throwArgumentError(\"unsupported IPFS format\", \"link\", link);\n }\n return \"https://gateway.ipfs.io/ipfs/\" + link;\n }\n function numPad(value) {\n var result = (0, bytes_1.arrayify)(value);\n if (result.length > 32) {\n throw new Error(\"internal; should not happen\");\n }\n var padded = new Uint8Array(32);\n padded.set(result, 32 - result.length);\n return padded;\n }\n function bytesPad(value) {\n if (value.length % 32 === 0) {\n return value;\n }\n var result = new Uint8Array(Math.ceil(value.length / 32) * 32);\n result.set(value);\n return result;\n }\n function encodeBytes3(datas) {\n var result = [];\n var byteCount = 0;\n for (var i3 = 0; i3 < datas.length; i3++) {\n result.push(null);\n byteCount += 32;\n }\n for (var i3 = 0; i3 < datas.length; i3++) {\n var data = (0, bytes_1.arrayify)(datas[i3]);\n result[i3] = numPad(byteCount);\n result.push(numPad(data.length));\n result.push(bytesPad(data));\n byteCount += 32 + Math.ceil(data.length / 32) * 32;\n }\n return (0, bytes_1.hexConcat)(result);\n }\n var Resolver = (\n /** @class */\n function() {\n function Resolver2(provider, address, name, resolvedAddress) {\n (0, properties_1.defineReadOnly)(this, \"provider\", provider);\n (0, properties_1.defineReadOnly)(this, \"name\", name);\n (0, properties_1.defineReadOnly)(this, \"address\", provider.formatter.address(address));\n (0, properties_1.defineReadOnly)(this, \"_resolvedAddress\", resolvedAddress);\n }\n Resolver2.prototype.supportsWildcard = function() {\n var _this = this;\n if (!this._supportsEip2544) {\n this._supportsEip2544 = this.provider.call({\n to: this.address,\n data: \"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000\"\n }).then(function(result) {\n return bignumber_1.BigNumber.from(result).eq(1);\n }).catch(function(error) {\n if (error.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n return false;\n }\n _this._supportsEip2544 = null;\n throw error;\n });\n }\n return this._supportsEip2544;\n };\n Resolver2.prototype._fetch = function(selector, parameters) {\n return __awaiter4(this, void 0, void 0, function() {\n var tx, parseBytes, result, error_1;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n tx = {\n to: this.address,\n ccipReadEnabled: true,\n data: (0, bytes_1.hexConcat)([selector, (0, hash_1.namehash)(this.name), parameters || \"0x\"])\n };\n parseBytes = false;\n return [4, this.supportsWildcard()];\n case 1:\n if (_a.sent()) {\n parseBytes = true;\n tx.data = (0, bytes_1.hexConcat)([\"0x9061b923\", encodeBytes3([(0, hash_1.dnsEncode)(this.name), tx.data])]);\n }\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.provider.call(tx)];\n case 3:\n result = _a.sent();\n if ((0, bytes_1.arrayify)(result).length % 32 === 4) {\n logger.throwError(\"resolver threw error\", logger_1.Logger.errors.CALL_EXCEPTION, {\n transaction: tx,\n data: result\n });\n }\n if (parseBytes) {\n result = _parseBytes(result, 0);\n }\n return [2, result];\n case 4:\n error_1 = _a.sent();\n if (error_1.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n return [2, null];\n }\n throw error_1;\n case 5:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n Resolver2.prototype._fetchBytes = function(selector, parameters) {\n return __awaiter4(this, void 0, void 0, function() {\n var result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._fetch(selector, parameters)];\n case 1:\n result = _a.sent();\n if (result != null) {\n return [2, _parseBytes(result, 0)];\n }\n return [2, null];\n }\n });\n });\n };\n Resolver2.prototype._getAddress = function(coinType, hexBytes) {\n var coinInfo = coinInfos[String(coinType)];\n if (coinInfo == null) {\n logger.throwError(\"unsupported coin type: \" + coinType, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress(\" + coinType + \")\"\n });\n }\n if (coinInfo.ilk === \"eth\") {\n return this.provider.formatter.address(hexBytes);\n }\n var bytes = (0, bytes_1.arrayify)(hexBytes);\n if (coinInfo.p2pkh != null) {\n var p2pkh = hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);\n if (p2pkh) {\n var length_1 = parseInt(p2pkh[1], 16);\n if (p2pkh[2].length === length_1 * 2 && length_1 >= 1 && length_1 <= 75) {\n return base58Encode((0, bytes_1.concat)([[coinInfo.p2pkh], \"0x\" + p2pkh[2]]));\n }\n }\n }\n if (coinInfo.p2sh != null) {\n var p2sh = hexBytes.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);\n if (p2sh) {\n var length_2 = parseInt(p2sh[1], 16);\n if (p2sh[2].length === length_2 * 2 && length_2 >= 1 && length_2 <= 75) {\n return base58Encode((0, bytes_1.concat)([[coinInfo.p2sh], \"0x\" + p2sh[2]]));\n }\n }\n }\n if (coinInfo.prefix != null) {\n var length_3 = bytes[1];\n var version_1 = bytes[0];\n if (version_1 === 0) {\n if (length_3 !== 20 && length_3 !== 32) {\n version_1 = -1;\n }\n } else {\n version_1 = -1;\n }\n if (version_1 >= 0 && bytes.length === 2 + length_3 && length_3 >= 1 && length_3 <= 75) {\n var words = bech32_1.default.toWords(bytes.slice(2));\n words.unshift(version_1);\n return bech32_1.default.encode(coinInfo.prefix, words);\n }\n }\n return null;\n };\n Resolver2.prototype.getAddress = function(coinType) {\n return __awaiter4(this, void 0, void 0, function() {\n var result, error_2, hexBytes, address;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (coinType == null) {\n coinType = 60;\n }\n if (!(coinType === 60))\n return [3, 4];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4, this._fetch(\"0x3b3b57de\")];\n case 2:\n result = _a.sent();\n if (result === \"0x\" || result === constants_1.HashZero) {\n return [2, null];\n }\n return [2, this.provider.formatter.callAddress(result)];\n case 3:\n error_2 = _a.sent();\n if (error_2.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n return [2, null];\n }\n throw error_2;\n case 4:\n return [4, this._fetchBytes(\"0xf1cb7e06\", bytes32ify(coinType))];\n case 5:\n hexBytes = _a.sent();\n if (hexBytes == null || hexBytes === \"0x\") {\n return [2, null];\n }\n address = this._getAddress(coinType, hexBytes);\n if (address == null) {\n logger.throwError(\"invalid or unsupported coin data\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress(\" + coinType + \")\",\n coinType,\n data: hexBytes\n });\n }\n return [2, address];\n }\n });\n });\n };\n Resolver2.prototype.getAvatar = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var linkage, avatar, i3, match, scheme, _a, selector, owner, _b, comps, addr, tokenId, tokenOwner, _c, _d, balance, _e, _f, tx, metadataUrl, _g, metadata, imageUrl, ipfs, error_3;\n return __generator4(this, function(_h) {\n switch (_h.label) {\n case 0:\n linkage = [{ type: \"name\", content: this.name }];\n _h.label = 1;\n case 1:\n _h.trys.push([1, 19, , 20]);\n return [4, this.getText(\"avatar\")];\n case 2:\n avatar = _h.sent();\n if (avatar == null) {\n return [2, null];\n }\n i3 = 0;\n _h.label = 3;\n case 3:\n if (!(i3 < matchers.length))\n return [3, 18];\n match = avatar.match(matchers[i3]);\n if (match == null) {\n return [3, 17];\n }\n scheme = match[1].toLowerCase();\n _a = scheme;\n switch (_a) {\n case \"https\":\n return [3, 4];\n case \"data\":\n return [3, 5];\n case \"ipfs\":\n return [3, 6];\n case \"erc721\":\n return [3, 7];\n case \"erc1155\":\n return [3, 7];\n }\n return [3, 17];\n case 4:\n linkage.push({ type: \"url\", content: avatar });\n return [2, { linkage, url: avatar }];\n case 5:\n linkage.push({ type: \"data\", content: avatar });\n return [2, { linkage, url: avatar }];\n case 6:\n linkage.push({ type: \"ipfs\", content: avatar });\n return [2, { linkage, url: getIpfsLink(avatar) }];\n case 7:\n selector = scheme === \"erc721\" ? \"0xc87b56dd\" : \"0x0e89341c\";\n linkage.push({ type: scheme, content: avatar });\n _b = this._resolvedAddress;\n if (_b)\n return [3, 9];\n return [4, this.getAddress()];\n case 8:\n _b = _h.sent();\n _h.label = 9;\n case 9:\n owner = _b;\n comps = (match[2] || \"\").split(\"/\");\n if (comps.length !== 2) {\n return [2, null];\n }\n return [4, this.provider.formatter.address(comps[0])];\n case 10:\n addr = _h.sent();\n tokenId = (0, bytes_1.hexZeroPad)(bignumber_1.BigNumber.from(comps[1]).toHexString(), 32);\n if (!(scheme === \"erc721\"))\n return [3, 12];\n _d = (_c = this.provider.formatter).callAddress;\n return [4, this.provider.call({\n to: addr,\n data: (0, bytes_1.hexConcat)([\"0x6352211e\", tokenId])\n })];\n case 11:\n tokenOwner = _d.apply(_c, [_h.sent()]);\n if (owner !== tokenOwner) {\n return [2, null];\n }\n linkage.push({ type: \"owner\", content: tokenOwner });\n return [3, 14];\n case 12:\n if (!(scheme === \"erc1155\"))\n return [3, 14];\n _f = (_e = bignumber_1.BigNumber).from;\n return [4, this.provider.call({\n to: addr,\n data: (0, bytes_1.hexConcat)([\"0x00fdd58e\", (0, bytes_1.hexZeroPad)(owner, 32), tokenId])\n })];\n case 13:\n balance = _f.apply(_e, [_h.sent()]);\n if (balance.isZero()) {\n return [2, null];\n }\n linkage.push({ type: \"balance\", content: balance.toString() });\n _h.label = 14;\n case 14:\n tx = {\n to: this.provider.formatter.address(comps[0]),\n data: (0, bytes_1.hexConcat)([selector, tokenId])\n };\n _g = _parseString;\n return [4, this.provider.call(tx)];\n case 15:\n metadataUrl = _g.apply(void 0, [_h.sent(), 0]);\n if (metadataUrl == null) {\n return [2, null];\n }\n linkage.push({ type: \"metadata-url-base\", content: metadataUrl });\n if (scheme === \"erc1155\") {\n metadataUrl = metadataUrl.replace(\"{id}\", tokenId.substring(2));\n linkage.push({ type: \"metadata-url-expanded\", content: metadataUrl });\n }\n if (metadataUrl.match(/^ipfs:/i)) {\n metadataUrl = getIpfsLink(metadataUrl);\n }\n linkage.push({ type: \"metadata-url\", content: metadataUrl });\n return [4, (0, web_1.fetchJson)(metadataUrl)];\n case 16:\n metadata = _h.sent();\n if (!metadata) {\n return [2, null];\n }\n linkage.push({ type: \"metadata\", content: JSON.stringify(metadata) });\n imageUrl = metadata.image;\n if (typeof imageUrl !== \"string\") {\n return [2, null];\n }\n if (imageUrl.match(/^(https:\\/\\/|data:)/i)) {\n } else {\n ipfs = imageUrl.match(matcherIpfs);\n if (ipfs == null) {\n return [2, null];\n }\n linkage.push({ type: \"url-ipfs\", content: imageUrl });\n imageUrl = getIpfsLink(imageUrl);\n }\n linkage.push({ type: \"url\", content: imageUrl });\n return [2, { linkage, url: imageUrl }];\n case 17:\n i3++;\n return [3, 3];\n case 18:\n return [3, 20];\n case 19:\n error_3 = _h.sent();\n return [3, 20];\n case 20:\n return [2, null];\n }\n });\n });\n };\n Resolver2.prototype.getContentHash = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var hexBytes, ipfs, length_4, ipns, length_5, swarm, skynet, urlSafe_1, hash3;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._fetchBytes(\"0xbc1c58d1\")];\n case 1:\n hexBytes = _a.sent();\n if (hexBytes == null || hexBytes === \"0x\") {\n return [2, null];\n }\n ipfs = hexBytes.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipfs) {\n length_4 = parseInt(ipfs[3], 16);\n if (ipfs[4].length === length_4 * 2) {\n return [2, \"ipfs://\" + basex_1.Base58.encode(\"0x\" + ipfs[1])];\n }\n }\n ipns = hexBytes.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipns) {\n length_5 = parseInt(ipns[3], 16);\n if (ipns[4].length === length_5 * 2) {\n return [2, \"ipns://\" + basex_1.Base58.encode(\"0x\" + ipns[1])];\n }\n }\n swarm = hexBytes.match(/^0xe40101fa011b20([0-9a-f]*)$/);\n if (swarm) {\n if (swarm[1].length === 32 * 2) {\n return [2, \"bzz://\" + swarm[1]];\n }\n }\n skynet = hexBytes.match(/^0x90b2c605([0-9a-f]*)$/);\n if (skynet) {\n if (skynet[1].length === 34 * 2) {\n urlSafe_1 = { \"=\": \"\", \"+\": \"-\", \"/\": \"_\" };\n hash3 = (0, base64_1.encode)(\"0x\" + skynet[1]).replace(/[=+\\/]/g, function(a3) {\n return urlSafe_1[a3];\n });\n return [2, \"sia://\" + hash3];\n }\n }\n return [2, logger.throwError(\"invalid or unsupported content hash data\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getContentHash()\",\n data: hexBytes\n })];\n }\n });\n });\n };\n Resolver2.prototype.getText = function(key) {\n return __awaiter4(this, void 0, void 0, function() {\n var keyBytes, hexBytes;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n keyBytes = (0, strings_1.toUtf8Bytes)(key);\n keyBytes = (0, bytes_1.concat)([bytes32ify(64), bytes32ify(keyBytes.length), keyBytes]);\n if (keyBytes.length % 32 !== 0) {\n keyBytes = (0, bytes_1.concat)([keyBytes, (0, bytes_1.hexZeroPad)(\"0x\", 32 - key.length % 32)]);\n }\n return [4, this._fetchBytes(\"0x59d1d43c\", (0, bytes_1.hexlify)(keyBytes))];\n case 1:\n hexBytes = _a.sent();\n if (hexBytes == null || hexBytes === \"0x\") {\n return [2, null];\n }\n return [2, (0, strings_1.toUtf8String)(hexBytes)];\n }\n });\n });\n };\n return Resolver2;\n }()\n );\n exports3.Resolver = Resolver;\n var defaultFormatter = null;\n var nextPollId = 1;\n var BaseProvider = (\n /** @class */\n function(_super) {\n __extends4(BaseProvider2, _super);\n function BaseProvider2(network) {\n var _newTarget = this.constructor;\n var _this = _super.call(this) || this;\n _this._events = [];\n _this._emitted = { block: -2 };\n _this.disableCcipRead = false;\n _this.formatter = _newTarget.getFormatter();\n (0, properties_1.defineReadOnly)(_this, \"anyNetwork\", network === \"any\");\n if (_this.anyNetwork) {\n network = _this.detectNetwork();\n }\n if (network instanceof Promise) {\n _this._networkPromise = network;\n network.catch(function(error) {\n });\n _this._ready().catch(function(error) {\n });\n } else {\n var knownNetwork = (0, properties_1.getStatic)(_newTarget, \"getNetwork\")(network);\n if (knownNetwork) {\n (0, properties_1.defineReadOnly)(_this, \"_network\", knownNetwork);\n _this.emit(\"network\", knownNetwork, null);\n } else {\n logger.throwArgumentError(\"invalid network\", \"network\", network);\n }\n }\n _this._maxInternalBlockNumber = -1024;\n _this._lastBlockNumber = -2;\n _this._maxFilterBlockRange = 10;\n _this._pollingInterval = 4e3;\n _this._fastQueryDate = 0;\n return _this;\n }\n BaseProvider2.prototype._ready = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var network, error_4;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(this._network == null))\n return [3, 7];\n network = null;\n if (!this._networkPromise)\n return [3, 4];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4, this._networkPromise];\n case 2:\n network = _a.sent();\n return [3, 4];\n case 3:\n error_4 = _a.sent();\n return [3, 4];\n case 4:\n if (!(network == null))\n return [3, 6];\n return [4, this.detectNetwork()];\n case 5:\n network = _a.sent();\n _a.label = 6;\n case 6:\n if (!network) {\n logger.throwError(\"no network detected\", logger_1.Logger.errors.UNKNOWN_ERROR, {});\n }\n if (this._network == null) {\n if (this.anyNetwork) {\n this._network = network;\n } else {\n (0, properties_1.defineReadOnly)(this, \"_network\", network);\n }\n this.emit(\"network\", network, null);\n }\n _a.label = 7;\n case 7:\n return [2, this._network];\n }\n });\n });\n };\n Object.defineProperty(BaseProvider2.prototype, \"ready\", {\n // This will always return the most recently established network.\n // For \"any\", this can change (a \"network\" event is emitted before\n // any change is reflected); otherwise this cannot change\n get: function() {\n var _this = this;\n return (0, web_1.poll)(function() {\n return _this._ready().then(function(network) {\n return network;\n }, function(error) {\n if (error.code === logger_1.Logger.errors.NETWORK_ERROR && error.event === \"noNetwork\") {\n return void 0;\n }\n throw error;\n });\n });\n },\n enumerable: false,\n configurable: true\n });\n BaseProvider2.getFormatter = function() {\n if (defaultFormatter == null) {\n defaultFormatter = new formatter_1.Formatter();\n }\n return defaultFormatter;\n };\n BaseProvider2.getNetwork = function(network) {\n return (0, networks_1.getNetwork)(network == null ? \"homestead\" : network);\n };\n BaseProvider2.prototype.ccipReadFetch = function(tx, calldata, urls) {\n return __awaiter4(this, void 0, void 0, function() {\n var sender, data, errorMessages, i3, url, href, json, result, errorMessage;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (this.disableCcipRead || urls.length === 0) {\n return [2, null];\n }\n sender = tx.to.toLowerCase();\n data = calldata.toLowerCase();\n errorMessages = [];\n i3 = 0;\n _a.label = 1;\n case 1:\n if (!(i3 < urls.length))\n return [3, 4];\n url = urls[i3];\n href = url.replace(\"{sender}\", sender).replace(\"{data}\", data);\n json = url.indexOf(\"{data}\") >= 0 ? null : JSON.stringify({ data, sender });\n return [4, (0, web_1.fetchJson)({ url: href, errorPassThrough: true }, json, function(value, response) {\n value.status = response.statusCode;\n return value;\n })];\n case 2:\n result = _a.sent();\n if (result.data) {\n return [2, result.data];\n }\n errorMessage = result.message || \"unknown error\";\n if (result.status >= 400 && result.status < 500) {\n return [2, logger.throwError(\"response not found during CCIP fetch: \" + errorMessage, logger_1.Logger.errors.SERVER_ERROR, { url, errorMessage })];\n }\n errorMessages.push(errorMessage);\n _a.label = 3;\n case 3:\n i3++;\n return [3, 1];\n case 4:\n return [2, logger.throwError(\"error encountered during CCIP fetch: \" + errorMessages.map(function(m2) {\n return JSON.stringify(m2);\n }).join(\", \"), logger_1.Logger.errors.SERVER_ERROR, {\n urls,\n errorMessages\n })];\n }\n });\n });\n };\n BaseProvider2.prototype._getInternalBlockNumber = function(maxAge) {\n return __awaiter4(this, void 0, void 0, function() {\n var internalBlockNumber, result, error_5, reqTime, checkInternalBlockNumber;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._ready()];\n case 1:\n _a.sent();\n if (!(maxAge > 0))\n return [3, 7];\n _a.label = 2;\n case 2:\n if (!this._internalBlockNumber)\n return [3, 7];\n internalBlockNumber = this._internalBlockNumber;\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, internalBlockNumber];\n case 4:\n result = _a.sent();\n if (getTime() - result.respTime <= maxAge) {\n return [2, result.blockNumber];\n }\n return [3, 7];\n case 5:\n error_5 = _a.sent();\n if (this._internalBlockNumber === internalBlockNumber) {\n return [3, 7];\n }\n return [3, 6];\n case 6:\n return [3, 2];\n case 7:\n reqTime = getTime();\n checkInternalBlockNumber = (0, properties_1.resolveProperties)({\n blockNumber: this.perform(\"getBlockNumber\", {}),\n networkError: this.getNetwork().then(function(network) {\n return null;\n }, function(error) {\n return error;\n })\n }).then(function(_a2) {\n var blockNumber = _a2.blockNumber, networkError = _a2.networkError;\n if (networkError) {\n if (_this._internalBlockNumber === checkInternalBlockNumber) {\n _this._internalBlockNumber = null;\n }\n throw networkError;\n }\n var respTime = getTime();\n blockNumber = bignumber_1.BigNumber.from(blockNumber).toNumber();\n if (blockNumber < _this._maxInternalBlockNumber) {\n blockNumber = _this._maxInternalBlockNumber;\n }\n _this._maxInternalBlockNumber = blockNumber;\n _this._setFastBlockNumber(blockNumber);\n return { blockNumber, reqTime, respTime };\n });\n this._internalBlockNumber = checkInternalBlockNumber;\n checkInternalBlockNumber.catch(function(error) {\n if (_this._internalBlockNumber === checkInternalBlockNumber) {\n _this._internalBlockNumber = null;\n }\n });\n return [4, checkInternalBlockNumber];\n case 8:\n return [2, _a.sent().blockNumber];\n }\n });\n });\n };\n BaseProvider2.prototype.poll = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var pollId, runners, blockNumber, error_6, i3;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n pollId = nextPollId++;\n runners = [];\n blockNumber = null;\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4, this._getInternalBlockNumber(100 + this.pollingInterval / 2)];\n case 2:\n blockNumber = _a.sent();\n return [3, 4];\n case 3:\n error_6 = _a.sent();\n this.emit(\"error\", error_6);\n return [\n 2\n /*return*/\n ];\n case 4:\n this._setFastBlockNumber(blockNumber);\n this.emit(\"poll\", pollId, blockNumber);\n if (blockNumber === this._lastBlockNumber) {\n this.emit(\"didPoll\", pollId);\n return [\n 2\n /*return*/\n ];\n }\n if (this._emitted.block === -2) {\n this._emitted.block = blockNumber - 1;\n }\n if (Math.abs(this._emitted.block - blockNumber) > 1e3) {\n logger.warn(\"network block skew detected; skipping block events (emitted=\" + this._emitted.block + \" blockNumber\" + blockNumber + \")\");\n this.emit(\"error\", logger.makeError(\"network block skew detected\", logger_1.Logger.errors.NETWORK_ERROR, {\n blockNumber,\n event: \"blockSkew\",\n previousBlockNumber: this._emitted.block\n }));\n this.emit(\"block\", blockNumber);\n } else {\n for (i3 = this._emitted.block + 1; i3 <= blockNumber; i3++) {\n this.emit(\"block\", i3);\n }\n }\n if (this._emitted.block !== blockNumber) {\n this._emitted.block = blockNumber;\n Object.keys(this._emitted).forEach(function(key) {\n if (key === \"block\") {\n return;\n }\n var eventBlockNumber = _this._emitted[key];\n if (eventBlockNumber === \"pending\") {\n return;\n }\n if (blockNumber - eventBlockNumber > 12) {\n delete _this._emitted[key];\n }\n });\n }\n if (this._lastBlockNumber === -2) {\n this._lastBlockNumber = blockNumber - 1;\n }\n this._events.forEach(function(event) {\n switch (event.type) {\n case \"tx\": {\n var hash_2 = event.hash;\n var runner = _this.getTransactionReceipt(hash_2).then(function(receipt) {\n if (!receipt || receipt.blockNumber == null) {\n return null;\n }\n _this._emitted[\"t:\" + hash_2] = receipt.blockNumber;\n _this.emit(hash_2, receipt);\n return null;\n }).catch(function(error) {\n _this.emit(\"error\", error);\n });\n runners.push(runner);\n break;\n }\n case \"filter\": {\n if (!event._inflight) {\n event._inflight = true;\n if (event._lastBlockNumber === -2) {\n event._lastBlockNumber = blockNumber - 1;\n }\n var filter_1 = event.filter;\n filter_1.fromBlock = event._lastBlockNumber + 1;\n filter_1.toBlock = blockNumber;\n var minFromBlock = filter_1.toBlock - _this._maxFilterBlockRange;\n if (minFromBlock > filter_1.fromBlock) {\n filter_1.fromBlock = minFromBlock;\n }\n if (filter_1.fromBlock < 0) {\n filter_1.fromBlock = 0;\n }\n var runner = _this.getLogs(filter_1).then(function(logs) {\n event._inflight = false;\n if (logs.length === 0) {\n return;\n }\n logs.forEach(function(log) {\n if (log.blockNumber > event._lastBlockNumber) {\n event._lastBlockNumber = log.blockNumber;\n }\n _this._emitted[\"b:\" + log.blockHash] = log.blockNumber;\n _this._emitted[\"t:\" + log.transactionHash] = log.blockNumber;\n _this.emit(filter_1, log);\n });\n }).catch(function(error) {\n _this.emit(\"error\", error);\n event._inflight = false;\n });\n runners.push(runner);\n }\n break;\n }\n }\n });\n this._lastBlockNumber = blockNumber;\n Promise.all(runners).then(function() {\n _this.emit(\"didPoll\", pollId);\n }).catch(function(error) {\n _this.emit(\"error\", error);\n });\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.resetEventsBlock = function(blockNumber) {\n this._lastBlockNumber = blockNumber - 1;\n if (this.polling) {\n this.poll();\n }\n };\n Object.defineProperty(BaseProvider2.prototype, \"network\", {\n get: function() {\n return this._network;\n },\n enumerable: false,\n configurable: true\n });\n BaseProvider2.prototype.detectNetwork = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n return [2, logger.throwError(\"provider does not support network detection\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"provider.detectNetwork\"\n })];\n });\n });\n };\n BaseProvider2.prototype.getNetwork = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var network, currentNetwork, error;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._ready()];\n case 1:\n network = _a.sent();\n return [4, this.detectNetwork()];\n case 2:\n currentNetwork = _a.sent();\n if (!(network.chainId !== currentNetwork.chainId))\n return [3, 5];\n if (!this.anyNetwork)\n return [3, 4];\n this._network = currentNetwork;\n this._lastBlockNumber = -2;\n this._fastBlockNumber = null;\n this._fastBlockNumberPromise = null;\n this._fastQueryDate = 0;\n this._emitted.block = -2;\n this._maxInternalBlockNumber = -1024;\n this._internalBlockNumber = null;\n this.emit(\"network\", currentNetwork, network);\n return [4, stall(0)];\n case 3:\n _a.sent();\n return [2, this._network];\n case 4:\n error = logger.makeError(\"underlying network changed\", logger_1.Logger.errors.NETWORK_ERROR, {\n event: \"changed\",\n network,\n detectedNetwork: currentNetwork\n });\n this.emit(\"error\", error);\n throw error;\n case 5:\n return [2, network];\n }\n });\n });\n };\n Object.defineProperty(BaseProvider2.prototype, \"blockNumber\", {\n get: function() {\n var _this = this;\n this._getInternalBlockNumber(100 + this.pollingInterval / 2).then(function(blockNumber) {\n _this._setFastBlockNumber(blockNumber);\n }, function(error) {\n });\n return this._fastBlockNumber != null ? this._fastBlockNumber : -1;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseProvider2.prototype, \"polling\", {\n get: function() {\n return this._poller != null;\n },\n set: function(value) {\n var _this = this;\n if (value && !this._poller) {\n this._poller = setInterval(function() {\n _this.poll();\n }, this.pollingInterval);\n if (!this._bootstrapPoll) {\n this._bootstrapPoll = setTimeout(function() {\n _this.poll();\n _this._bootstrapPoll = setTimeout(function() {\n if (!_this._poller) {\n _this.poll();\n }\n _this._bootstrapPoll = null;\n }, _this.pollingInterval);\n }, 0);\n }\n } else if (!value && this._poller) {\n clearInterval(this._poller);\n this._poller = null;\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseProvider2.prototype, \"pollingInterval\", {\n get: function() {\n return this._pollingInterval;\n },\n set: function(value) {\n var _this = this;\n if (typeof value !== \"number\" || value <= 0 || parseInt(String(value)) != value) {\n throw new Error(\"invalid polling interval\");\n }\n this._pollingInterval = value;\n if (this._poller) {\n clearInterval(this._poller);\n this._poller = setInterval(function() {\n _this.poll();\n }, this._pollingInterval);\n }\n },\n enumerable: false,\n configurable: true\n });\n BaseProvider2.prototype._getFastBlockNumber = function() {\n var _this = this;\n var now = getTime();\n if (now - this._fastQueryDate > 2 * this._pollingInterval) {\n this._fastQueryDate = now;\n this._fastBlockNumberPromise = this.getBlockNumber().then(function(blockNumber) {\n if (_this._fastBlockNumber == null || blockNumber > _this._fastBlockNumber) {\n _this._fastBlockNumber = blockNumber;\n }\n return _this._fastBlockNumber;\n });\n }\n return this._fastBlockNumberPromise;\n };\n BaseProvider2.prototype._setFastBlockNumber = function(blockNumber) {\n if (this._fastBlockNumber != null && blockNumber < this._fastBlockNumber) {\n return;\n }\n this._fastQueryDate = getTime();\n if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) {\n this._fastBlockNumber = blockNumber;\n this._fastBlockNumberPromise = Promise.resolve(blockNumber);\n }\n };\n BaseProvider2.prototype.waitForTransaction = function(transactionHash, confirmations, timeout) {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n return [2, this._waitForTransaction(transactionHash, confirmations == null ? 1 : confirmations, timeout || 0, null)];\n });\n });\n };\n BaseProvider2.prototype._waitForTransaction = function(transactionHash, confirmations, timeout, replaceable) {\n return __awaiter4(this, void 0, void 0, function() {\n var receipt;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getTransactionReceipt(transactionHash)];\n case 1:\n receipt = _a.sent();\n if ((receipt ? receipt.confirmations : 0) >= confirmations) {\n return [2, receipt];\n }\n return [2, new Promise(function(resolve, reject) {\n var cancelFuncs = [];\n var done = false;\n var alreadyDone = function() {\n if (done) {\n return true;\n }\n done = true;\n cancelFuncs.forEach(function(func) {\n func();\n });\n return false;\n };\n var minedHandler = function(receipt2) {\n if (receipt2.confirmations < confirmations) {\n return;\n }\n if (alreadyDone()) {\n return;\n }\n resolve(receipt2);\n };\n _this.on(transactionHash, minedHandler);\n cancelFuncs.push(function() {\n _this.removeListener(transactionHash, minedHandler);\n });\n if (replaceable) {\n var lastBlockNumber_1 = replaceable.startBlock;\n var scannedBlock_1 = null;\n var replaceHandler_1 = function(blockNumber) {\n return __awaiter4(_this, void 0, void 0, function() {\n var _this2 = this;\n return __generator4(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, stall(1e3)];\n case 1:\n _a2.sent();\n this.getTransactionCount(replaceable.from).then(function(nonce) {\n return __awaiter4(_this2, void 0, void 0, function() {\n var mined, block, ti, tx, receipt_1, reason;\n return __generator4(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n if (!(nonce <= replaceable.nonce))\n return [3, 1];\n lastBlockNumber_1 = blockNumber;\n return [3, 9];\n case 1:\n return [4, this.getTransaction(transactionHash)];\n case 2:\n mined = _a3.sent();\n if (mined && mined.blockNumber != null) {\n return [\n 2\n /*return*/\n ];\n }\n if (scannedBlock_1 == null) {\n scannedBlock_1 = lastBlockNumber_1 - 3;\n if (scannedBlock_1 < replaceable.startBlock) {\n scannedBlock_1 = replaceable.startBlock;\n }\n }\n _a3.label = 3;\n case 3:\n if (!(scannedBlock_1 <= blockNumber))\n return [3, 9];\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, this.getBlockWithTransactions(scannedBlock_1)];\n case 4:\n block = _a3.sent();\n ti = 0;\n _a3.label = 5;\n case 5:\n if (!(ti < block.transactions.length))\n return [3, 8];\n tx = block.transactions[ti];\n if (tx.hash === transactionHash) {\n return [\n 2\n /*return*/\n ];\n }\n if (!(tx.from === replaceable.from && tx.nonce === replaceable.nonce))\n return [3, 7];\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, this.waitForTransaction(tx.hash, confirmations)];\n case 6:\n receipt_1 = _a3.sent();\n if (alreadyDone()) {\n return [\n 2\n /*return*/\n ];\n }\n reason = \"replaced\";\n if (tx.data === replaceable.data && tx.to === replaceable.to && tx.value.eq(replaceable.value)) {\n reason = \"repriced\";\n } else if (tx.data === \"0x\" && tx.from === tx.to && tx.value.isZero()) {\n reason = \"cancelled\";\n }\n reject(logger.makeError(\"transaction was replaced\", logger_1.Logger.errors.TRANSACTION_REPLACED, {\n cancelled: reason === \"replaced\" || reason === \"cancelled\",\n reason,\n replacement: this._wrapTransaction(tx),\n hash: transactionHash,\n receipt: receipt_1\n }));\n return [\n 2\n /*return*/\n ];\n case 7:\n ti++;\n return [3, 5];\n case 8:\n scannedBlock_1++;\n return [3, 3];\n case 9:\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n this.once(\"block\", replaceHandler_1);\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }, function(error) {\n if (done) {\n return;\n }\n _this2.once(\"block\", replaceHandler_1);\n });\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n if (done) {\n return;\n }\n _this.once(\"block\", replaceHandler_1);\n cancelFuncs.push(function() {\n _this.removeListener(\"block\", replaceHandler_1);\n });\n }\n if (typeof timeout === \"number\" && timeout > 0) {\n var timer_1 = setTimeout(function() {\n if (alreadyDone()) {\n return;\n }\n reject(logger.makeError(\"timeout exceeded\", logger_1.Logger.errors.TIMEOUT, { timeout }));\n }, timeout);\n if (timer_1.unref) {\n timer_1.unref();\n }\n cancelFuncs.push(function() {\n clearTimeout(timer_1);\n });\n }\n })];\n }\n });\n });\n };\n BaseProvider2.prototype.getBlockNumber = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n return [2, this._getInternalBlockNumber(0)];\n });\n });\n };\n BaseProvider2.prototype.getGasPrice = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, this.perform(\"getGasPrice\", {})];\n case 2:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getGasPrice\",\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getBalance = function(addressOrName, blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getBalance\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getBalance\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getTransactionCount = function(addressOrName, blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getTransactionCount\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result).toNumber()];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getTransactionCount\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getCode = function(addressOrName, blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getCode\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getCode\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getStorageAt = function(addressOrName, position, blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag),\n position: Promise.resolve(position).then(function(p4) {\n return (0, bytes_1.hexValue)(p4);\n })\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getStorageAt\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getStorageAt\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._wrapTransaction = function(tx, hash3, startBlock) {\n var _this = this;\n if (hash3 != null && (0, bytes_1.hexDataLength)(hash3) !== 32) {\n throw new Error(\"invalid response - sendTransaction\");\n }\n var result = tx;\n if (hash3 != null && tx.hash !== hash3) {\n logger.throwError(\"Transaction hash mismatch from Provider.sendTransaction.\", logger_1.Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash3 });\n }\n result.wait = function(confirms, timeout) {\n return __awaiter4(_this, void 0, void 0, function() {\n var replacement, receipt;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (confirms == null) {\n confirms = 1;\n }\n if (timeout == null) {\n timeout = 0;\n }\n replacement = void 0;\n if (confirms !== 0 && startBlock != null) {\n replacement = {\n data: tx.data,\n from: tx.from,\n nonce: tx.nonce,\n to: tx.to,\n value: tx.value,\n startBlock\n };\n }\n return [4, this._waitForTransaction(tx.hash, confirms, timeout, replacement)];\n case 1:\n receipt = _a.sent();\n if (receipt == null && confirms === 0) {\n return [2, null];\n }\n this._emitted[\"t:\" + tx.hash] = receipt.blockNumber;\n if (receipt.status === 0) {\n logger.throwError(\"transaction failed\", logger_1.Logger.errors.CALL_EXCEPTION, {\n transactionHash: tx.hash,\n transaction: tx,\n receipt\n });\n }\n return [2, receipt];\n }\n });\n });\n };\n return result;\n };\n BaseProvider2.prototype.sendTransaction = function(signedTransaction) {\n return __awaiter4(this, void 0, void 0, function() {\n var hexTx, tx, blockNumber, hash3, error_7;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, Promise.resolve(signedTransaction).then(function(t3) {\n return (0, bytes_1.hexlify)(t3);\n })];\n case 2:\n hexTx = _a.sent();\n tx = this.formatter.transaction(signedTransaction);\n if (tx.confirmations == null) {\n tx.confirmations = 0;\n }\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 3:\n blockNumber = _a.sent();\n _a.label = 4;\n case 4:\n _a.trys.push([4, 6, , 7]);\n return [4, this.perform(\"sendTransaction\", { signedTransaction: hexTx })];\n case 5:\n hash3 = _a.sent();\n return [2, this._wrapTransaction(tx, hash3, blockNumber)];\n case 6:\n error_7 = _a.sent();\n error_7.transaction = tx;\n error_7.transactionHash = tx.hash;\n throw error_7;\n case 7:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._getTransactionRequest = function(transaction) {\n return __awaiter4(this, void 0, void 0, function() {\n var values, tx, _a, _b;\n var _this = this;\n return __generator4(this, function(_c) {\n switch (_c.label) {\n case 0:\n return [4, transaction];\n case 1:\n values = _c.sent();\n tx = {};\n [\"from\", \"to\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 ? _this._getAddress(v2) : null;\n });\n });\n [\"gasLimit\", \"gasPrice\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"value\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 ? bignumber_1.BigNumber.from(v2) : null;\n });\n });\n [\"type\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 != null ? v2 : null;\n });\n });\n if (values.accessList) {\n tx.accessList = this.formatter.accessList(values.accessList);\n }\n [\"data\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 ? (0, bytes_1.hexlify)(v2) : null;\n });\n });\n _b = (_a = this.formatter).transactionRequest;\n return [4, (0, properties_1.resolveProperties)(tx)];\n case 2:\n return [2, _b.apply(_a, [_c.sent()])];\n }\n });\n });\n };\n BaseProvider2.prototype._getFilter = function(filter) {\n return __awaiter4(this, void 0, void 0, function() {\n var result, _a, _b;\n var _this = this;\n return __generator4(this, function(_c) {\n switch (_c.label) {\n case 0:\n return [4, filter];\n case 1:\n filter = _c.sent();\n result = {};\n if (filter.address != null) {\n result.address = this._getAddress(filter.address);\n }\n [\"blockHash\", \"topics\"].forEach(function(key) {\n if (filter[key] == null) {\n return;\n }\n result[key] = filter[key];\n });\n [\"fromBlock\", \"toBlock\"].forEach(function(key) {\n if (filter[key] == null) {\n return;\n }\n result[key] = _this._getBlockTag(filter[key]);\n });\n _b = (_a = this.formatter).filter;\n return [4, (0, properties_1.resolveProperties)(result)];\n case 2:\n return [2, _b.apply(_a, [_c.sent()])];\n }\n });\n });\n };\n BaseProvider2.prototype._call = function(transaction, blockTag, attempt) {\n return __awaiter4(this, void 0, void 0, function() {\n var txSender, result, data, sender, urls, urlsOffset, urlsLength, urlsData, u2, url, calldata, callbackSelector, extraData, ccipResult, tx, error_8;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (attempt >= MAX_CCIP_REDIRECTS) {\n logger.throwError(\"CCIP read exceeded maximum redirections\", logger_1.Logger.errors.SERVER_ERROR, {\n redirects: attempt,\n transaction\n });\n }\n txSender = transaction.to;\n return [4, this.perform(\"call\", { transaction, blockTag })];\n case 1:\n result = _a.sent();\n if (!(attempt >= 0 && blockTag === \"latest\" && txSender != null && result.substring(0, 10) === \"0x556f1830\" && (0, bytes_1.hexDataLength)(result) % 32 === 4))\n return [3, 5];\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n data = (0, bytes_1.hexDataSlice)(result, 4);\n sender = (0, bytes_1.hexDataSlice)(data, 0, 32);\n if (!bignumber_1.BigNumber.from(sender).eq(txSender)) {\n logger.throwError(\"CCIP Read sender did not match\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n urls = [];\n urlsOffset = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(data, 32, 64)).toNumber();\n urlsLength = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(data, urlsOffset, urlsOffset + 32)).toNumber();\n urlsData = (0, bytes_1.hexDataSlice)(data, urlsOffset + 32);\n for (u2 = 0; u2 < urlsLength; u2++) {\n url = _parseString(urlsData, u2 * 32);\n if (url == null) {\n logger.throwError(\"CCIP Read contained corrupt URL string\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n urls.push(url);\n }\n calldata = _parseBytes(data, 64);\n if (!bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(data, 100, 128)).isZero()) {\n logger.throwError(\"CCIP Read callback selector included junk\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n callbackSelector = (0, bytes_1.hexDataSlice)(data, 96, 100);\n extraData = _parseBytes(data, 128);\n return [4, this.ccipReadFetch(transaction, calldata, urls)];\n case 3:\n ccipResult = _a.sent();\n if (ccipResult == null) {\n logger.throwError(\"CCIP Read disabled or provided no URLs\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n tx = {\n to: txSender,\n data: (0, bytes_1.hexConcat)([callbackSelector, encodeBytes3([ccipResult, extraData])])\n };\n return [2, this._call(tx, blockTag, attempt + 1)];\n case 4:\n error_8 = _a.sent();\n if (error_8.code === logger_1.Logger.errors.SERVER_ERROR) {\n throw error_8;\n }\n return [3, 5];\n case 5:\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"call\",\n params: { transaction, blockTag },\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.call = function(transaction, blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var resolved;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n transaction: this._getTransactionRequest(transaction),\n blockTag: this._getBlockTag(blockTag),\n ccipReadEnabled: Promise.resolve(transaction.ccipReadEnabled)\n })];\n case 2:\n resolved = _a.sent();\n return [2, this._call(resolved.transaction, resolved.blockTag, resolved.ccipReadEnabled ? 0 : -1)];\n }\n });\n });\n };\n BaseProvider2.prototype.estimateGas = function(transaction) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n transaction: this._getTransactionRequest(transaction)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"estimateGas\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"estimateGas\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._getAddress = function(addressOrName) {\n return __awaiter4(this, void 0, void 0, function() {\n var address;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, addressOrName];\n case 1:\n addressOrName = _a.sent();\n if (typeof addressOrName !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", addressOrName);\n }\n return [4, this.resolveName(addressOrName)];\n case 2:\n address = _a.sent();\n if (address == null) {\n logger.throwError(\"ENS name not configured\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName(\" + JSON.stringify(addressOrName) + \")\"\n });\n }\n return [2, address];\n }\n });\n });\n };\n BaseProvider2.prototype._getBlock = function(blockHashOrBlockTag, includeTransactions) {\n return __awaiter4(this, void 0, void 0, function() {\n var blockNumber, params, _a, error_9;\n var _this = this;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _b.sent();\n return [4, blockHashOrBlockTag];\n case 2:\n blockHashOrBlockTag = _b.sent();\n blockNumber = -128;\n params = {\n includeTransactions: !!includeTransactions\n };\n if (!(0, bytes_1.isHexString)(blockHashOrBlockTag, 32))\n return [3, 3];\n params.blockHash = blockHashOrBlockTag;\n return [3, 6];\n case 3:\n _b.trys.push([3, 5, , 6]);\n _a = params;\n return [4, this._getBlockTag(blockHashOrBlockTag)];\n case 4:\n _a.blockTag = _b.sent();\n if ((0, bytes_1.isHexString)(params.blockTag)) {\n blockNumber = parseInt(params.blockTag.substring(2), 16);\n }\n return [3, 6];\n case 5:\n error_9 = _b.sent();\n logger.throwArgumentError(\"invalid block hash or block tag\", \"blockHashOrBlockTag\", blockHashOrBlockTag);\n return [3, 6];\n case 6:\n return [2, (0, web_1.poll)(function() {\n return __awaiter4(_this, void 0, void 0, function() {\n var block, blockNumber_1, i3, tx, confirmations, blockWithTxs;\n var _this2 = this;\n return __generator4(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.perform(\"getBlock\", params)];\n case 1:\n block = _a2.sent();\n if (block == null) {\n if (params.blockHash != null) {\n if (this._emitted[\"b:\" + params.blockHash] == null) {\n return [2, null];\n }\n }\n if (params.blockTag != null) {\n if (blockNumber > this._emitted.block) {\n return [2, null];\n }\n }\n return [2, void 0];\n }\n if (!includeTransactions)\n return [3, 8];\n blockNumber_1 = null;\n i3 = 0;\n _a2.label = 2;\n case 2:\n if (!(i3 < block.transactions.length))\n return [3, 7];\n tx = block.transactions[i3];\n if (!(tx.blockNumber == null))\n return [3, 3];\n tx.confirmations = 0;\n return [3, 6];\n case 3:\n if (!(tx.confirmations == null))\n return [3, 6];\n if (!(blockNumber_1 == null))\n return [3, 5];\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 4:\n blockNumber_1 = _a2.sent();\n _a2.label = 5;\n case 5:\n confirmations = blockNumber_1 - tx.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n tx.confirmations = confirmations;\n _a2.label = 6;\n case 6:\n i3++;\n return [3, 2];\n case 7:\n blockWithTxs = this.formatter.blockWithTransactions(block);\n blockWithTxs.transactions = blockWithTxs.transactions.map(function(tx2) {\n return _this2._wrapTransaction(tx2);\n });\n return [2, blockWithTxs];\n case 8:\n return [2, this.formatter.block(block)];\n }\n });\n });\n }, { oncePoll: this })];\n }\n });\n });\n };\n BaseProvider2.prototype.getBlock = function(blockHashOrBlockTag) {\n return this._getBlock(blockHashOrBlockTag, false);\n };\n BaseProvider2.prototype.getBlockWithTransactions = function(blockHashOrBlockTag) {\n return this._getBlock(blockHashOrBlockTag, true);\n };\n BaseProvider2.prototype.getTransaction = function(transactionHash) {\n return __awaiter4(this, void 0, void 0, function() {\n var params;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, transactionHash];\n case 2:\n transactionHash = _a.sent();\n params = { transactionHash: this.formatter.hash(transactionHash, true) };\n return [2, (0, web_1.poll)(function() {\n return __awaiter4(_this, void 0, void 0, function() {\n var result, tx, blockNumber, confirmations;\n return __generator4(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.perform(\"getTransaction\", params)];\n case 1:\n result = _a2.sent();\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return [2, null];\n }\n return [2, void 0];\n }\n tx = this.formatter.transactionResponse(result);\n if (!(tx.blockNumber == null))\n return [3, 2];\n tx.confirmations = 0;\n return [3, 4];\n case 2:\n if (!(tx.confirmations == null))\n return [3, 4];\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 3:\n blockNumber = _a2.sent();\n confirmations = blockNumber - tx.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n tx.confirmations = confirmations;\n _a2.label = 4;\n case 4:\n return [2, this._wrapTransaction(tx)];\n }\n });\n });\n }, { oncePoll: this })];\n }\n });\n });\n };\n BaseProvider2.prototype.getTransactionReceipt = function(transactionHash) {\n return __awaiter4(this, void 0, void 0, function() {\n var params;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, transactionHash];\n case 2:\n transactionHash = _a.sent();\n params = { transactionHash: this.formatter.hash(transactionHash, true) };\n return [2, (0, web_1.poll)(function() {\n return __awaiter4(_this, void 0, void 0, function() {\n var result, receipt, blockNumber, confirmations;\n return __generator4(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.perform(\"getTransactionReceipt\", params)];\n case 1:\n result = _a2.sent();\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return [2, null];\n }\n return [2, void 0];\n }\n if (result.blockHash == null) {\n return [2, void 0];\n }\n receipt = this.formatter.receipt(result);\n if (!(receipt.blockNumber == null))\n return [3, 2];\n receipt.confirmations = 0;\n return [3, 4];\n case 2:\n if (!(receipt.confirmations == null))\n return [3, 4];\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 3:\n blockNumber = _a2.sent();\n confirmations = blockNumber - receipt.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n receipt.confirmations = confirmations;\n _a2.label = 4;\n case 4:\n return [2, receipt];\n }\n });\n });\n }, { oncePoll: this })];\n }\n });\n });\n };\n BaseProvider2.prototype.getLogs = function(filter) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, logs;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({ filter: this._getFilter(filter) })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getLogs\", params)];\n case 3:\n logs = _a.sent();\n logs.forEach(function(log) {\n if (log.removed == null) {\n log.removed = false;\n }\n });\n return [2, formatter_1.Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(logs)];\n }\n });\n });\n };\n BaseProvider2.prototype.getEtherPrice = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [2, this.perform(\"getEtherPrice\", {})];\n }\n });\n });\n };\n BaseProvider2.prototype._getBlockTag = function(blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var blockNumber;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, blockTag];\n case 1:\n blockTag = _a.sent();\n if (!(typeof blockTag === \"number\" && blockTag < 0))\n return [3, 3];\n if (blockTag % 1) {\n logger.throwArgumentError(\"invalid BlockTag\", \"blockTag\", blockTag);\n }\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 2:\n blockNumber = _a.sent();\n blockNumber += blockTag;\n if (blockNumber < 0) {\n blockNumber = 0;\n }\n return [2, this.formatter.blockTag(blockNumber)];\n case 3:\n return [2, this.formatter.blockTag(blockTag)];\n }\n });\n });\n };\n BaseProvider2.prototype.getResolver = function(name) {\n return __awaiter4(this, void 0, void 0, function() {\n var currentName, addr, resolver, _a;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n currentName = name;\n _b.label = 1;\n case 1:\n if (false)\n return [3, 6];\n if (currentName === \"\" || currentName === \".\") {\n return [2, null];\n }\n if (name !== \"eth\" && currentName === \"eth\") {\n return [2, null];\n }\n return [4, this._getResolver(currentName, \"getResolver\")];\n case 2:\n addr = _b.sent();\n if (!(addr != null))\n return [3, 5];\n resolver = new Resolver(this, addr, name);\n _a = currentName !== name;\n if (!_a)\n return [3, 4];\n return [4, resolver.supportsWildcard()];\n case 3:\n _a = !_b.sent();\n _b.label = 4;\n case 4:\n if (_a) {\n return [2, null];\n }\n return [2, resolver];\n case 5:\n currentName = currentName.split(\".\").slice(1).join(\".\");\n return [3, 1];\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._getResolver = function(name, operation) {\n return __awaiter4(this, void 0, void 0, function() {\n var network, addrData, error_10;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (operation == null) {\n operation = \"ENS\";\n }\n return [4, this.getNetwork()];\n case 1:\n network = _a.sent();\n if (!network.ensAddress) {\n logger.throwError(\"network does not support ENS\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation, network: network.name });\n }\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.call({\n to: network.ensAddress,\n data: \"0x0178b8bf\" + (0, hash_1.namehash)(name).substring(2)\n })];\n case 3:\n addrData = _a.sent();\n return [2, this.formatter.callAddress(addrData)];\n case 4:\n error_10 = _a.sent();\n return [3, 5];\n case 5:\n return [2, null];\n }\n });\n });\n };\n BaseProvider2.prototype.resolveName = function(name) {\n return __awaiter4(this, void 0, void 0, function() {\n var resolver;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, name];\n case 1:\n name = _a.sent();\n try {\n return [2, Promise.resolve(this.formatter.address(name))];\n } catch (error) {\n if ((0, bytes_1.isHexString)(name)) {\n throw error;\n }\n }\n if (typeof name !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name\", \"name\", name);\n }\n return [4, this.getResolver(name)];\n case 2:\n resolver = _a.sent();\n if (!resolver) {\n return [2, null];\n }\n return [4, resolver.getAddress()];\n case 3:\n return [2, _a.sent()];\n }\n });\n });\n };\n BaseProvider2.prototype.lookupAddress = function(address) {\n return __awaiter4(this, void 0, void 0, function() {\n var node, resolverAddr, name, _a, addr;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n return [4, address];\n case 1:\n address = _b.sent();\n address = this.formatter.address(address);\n node = address.substring(2).toLowerCase() + \".addr.reverse\";\n return [4, this._getResolver(node, \"lookupAddress\")];\n case 2:\n resolverAddr = _b.sent();\n if (resolverAddr == null) {\n return [2, null];\n }\n _a = _parseString;\n return [4, this.call({\n to: resolverAddr,\n data: \"0x691f3431\" + (0, hash_1.namehash)(node).substring(2)\n })];\n case 3:\n name = _a.apply(void 0, [_b.sent(), 0]);\n return [4, this.resolveName(name)];\n case 4:\n addr = _b.sent();\n if (addr != address) {\n return [2, null];\n }\n return [2, name];\n }\n });\n });\n };\n BaseProvider2.prototype.getAvatar = function(nameOrAddress) {\n return __awaiter4(this, void 0, void 0, function() {\n var resolver, address, node, resolverAddress, avatar_1, error_11, name_1, _a, error_12, avatar;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n resolver = null;\n if (!(0, bytes_1.isHexString)(nameOrAddress))\n return [3, 10];\n address = this.formatter.address(nameOrAddress);\n node = address.substring(2).toLowerCase() + \".addr.reverse\";\n return [4, this._getResolver(node, \"getAvatar\")];\n case 1:\n resolverAddress = _b.sent();\n if (!resolverAddress) {\n return [2, null];\n }\n resolver = new Resolver(this, resolverAddress, node);\n _b.label = 2;\n case 2:\n _b.trys.push([2, 4, , 5]);\n return [4, resolver.getAvatar()];\n case 3:\n avatar_1 = _b.sent();\n if (avatar_1) {\n return [2, avatar_1.url];\n }\n return [3, 5];\n case 4:\n error_11 = _b.sent();\n if (error_11.code !== logger_1.Logger.errors.CALL_EXCEPTION) {\n throw error_11;\n }\n return [3, 5];\n case 5:\n _b.trys.push([5, 8, , 9]);\n _a = _parseString;\n return [4, this.call({\n to: resolverAddress,\n data: \"0x691f3431\" + (0, hash_1.namehash)(node).substring(2)\n })];\n case 6:\n name_1 = _a.apply(void 0, [_b.sent(), 0]);\n return [4, this.getResolver(name_1)];\n case 7:\n resolver = _b.sent();\n return [3, 9];\n case 8:\n error_12 = _b.sent();\n if (error_12.code !== logger_1.Logger.errors.CALL_EXCEPTION) {\n throw error_12;\n }\n return [2, null];\n case 9:\n return [3, 12];\n case 10:\n return [4, this.getResolver(nameOrAddress)];\n case 11:\n resolver = _b.sent();\n if (!resolver) {\n return [2, null];\n }\n _b.label = 12;\n case 12:\n return [4, resolver.getAvatar()];\n case 13:\n avatar = _b.sent();\n if (avatar == null) {\n return [2, null];\n }\n return [2, avatar.url];\n }\n });\n });\n };\n BaseProvider2.prototype.perform = function(method, params) {\n return logger.throwError(method + \" not implemented\", logger_1.Logger.errors.NOT_IMPLEMENTED, { operation: method });\n };\n BaseProvider2.prototype._startEvent = function(event) {\n this.polling = this._events.filter(function(e2) {\n return e2.pollable();\n }).length > 0;\n };\n BaseProvider2.prototype._stopEvent = function(event) {\n this.polling = this._events.filter(function(e2) {\n return e2.pollable();\n }).length > 0;\n };\n BaseProvider2.prototype._addEventListener = function(eventName, listener, once2) {\n var event = new Event2(getEventTag(eventName), listener, once2);\n this._events.push(event);\n this._startEvent(event);\n return this;\n };\n BaseProvider2.prototype.on = function(eventName, listener) {\n return this._addEventListener(eventName, listener, false);\n };\n BaseProvider2.prototype.once = function(eventName, listener) {\n return this._addEventListener(eventName, listener, true);\n };\n BaseProvider2.prototype.emit = function(eventName) {\n var _this = this;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var result = false;\n var stopped = [];\n var eventTag = getEventTag(eventName);\n this._events = this._events.filter(function(event) {\n if (event.tag !== eventTag) {\n return true;\n }\n setTimeout(function() {\n event.listener.apply(_this, args);\n }, 0);\n result = true;\n if (event.once) {\n stopped.push(event);\n return false;\n }\n return true;\n });\n stopped.forEach(function(event) {\n _this._stopEvent(event);\n });\n return result;\n };\n BaseProvider2.prototype.listenerCount = function(eventName) {\n if (!eventName) {\n return this._events.length;\n }\n var eventTag = getEventTag(eventName);\n return this._events.filter(function(event) {\n return event.tag === eventTag;\n }).length;\n };\n BaseProvider2.prototype.listeners = function(eventName) {\n if (eventName == null) {\n return this._events.map(function(event) {\n return event.listener;\n });\n }\n var eventTag = getEventTag(eventName);\n return this._events.filter(function(event) {\n return event.tag === eventTag;\n }).map(function(event) {\n return event.listener;\n });\n };\n BaseProvider2.prototype.off = function(eventName, listener) {\n var _this = this;\n if (listener == null) {\n return this.removeAllListeners(eventName);\n }\n var stopped = [];\n var found = false;\n var eventTag = getEventTag(eventName);\n this._events = this._events.filter(function(event) {\n if (event.tag !== eventTag || event.listener != listener) {\n return true;\n }\n if (found) {\n return true;\n }\n found = true;\n stopped.push(event);\n return false;\n });\n stopped.forEach(function(event) {\n _this._stopEvent(event);\n });\n return this;\n };\n BaseProvider2.prototype.removeAllListeners = function(eventName) {\n var _this = this;\n var stopped = [];\n if (eventName == null) {\n stopped = this._events;\n this._events = [];\n } else {\n var eventTag_1 = getEventTag(eventName);\n this._events = this._events.filter(function(event) {\n if (event.tag !== eventTag_1) {\n return true;\n }\n stopped.push(event);\n return false;\n });\n }\n stopped.forEach(function(event) {\n _this._stopEvent(event);\n });\n return this;\n };\n return BaseProvider2;\n }(abstract_provider_1.Provider)\n );\n exports3.BaseProvider = BaseProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-provider.js\n var require_json_rpc_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.JsonRpcProvider = exports3.JsonRpcSigner = void 0;\n var abstract_signer_1 = require_lib15();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var hash_1 = require_lib12();\n var properties_1 = require_lib4();\n var strings_1 = require_lib9();\n var transactions_1 = require_lib17();\n var web_1 = require_lib28();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var base_provider_1 = require_base_provider();\n var errorGas = [\"call\", \"estimateGas\"];\n function spelunk(value, requireData) {\n if (value == null) {\n return null;\n }\n if (typeof value.message === \"string\" && value.message.match(\"reverted\")) {\n var data = (0, bytes_1.isHexString)(value.data) ? value.data : null;\n if (!requireData || data) {\n return { message: value.message, data };\n }\n }\n if (typeof value === \"object\") {\n for (var key in value) {\n var result = spelunk(value[key], requireData);\n if (result) {\n return result;\n }\n }\n return null;\n }\n if (typeof value === \"string\") {\n try {\n return spelunk(JSON.parse(value), requireData);\n } catch (error) {\n }\n }\n return null;\n }\n function checkError(method, error, params) {\n var transaction = params.transaction || params.signedTransaction;\n if (method === \"call\") {\n var result = spelunk(error, true);\n if (result) {\n return result.data;\n }\n logger.throwError(\"missing revert data in call exception; Transaction reverted without a reason string\", logger_1.Logger.errors.CALL_EXCEPTION, {\n data: \"0x\",\n transaction,\n error\n });\n }\n if (method === \"estimateGas\") {\n var result = spelunk(error.body, false);\n if (result == null) {\n result = spelunk(error, false);\n }\n if (result) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n reason: result.message,\n method,\n transaction,\n error\n });\n }\n }\n var message = error.message;\n if (error.code === logger_1.Logger.errors.SERVER_ERROR && error.error && typeof error.error.message === \"string\") {\n message = error.error.message;\n } else if (typeof error.body === \"string\") {\n message = error.body;\n } else if (typeof error.responseText === \"string\") {\n message = error.responseText;\n }\n message = (message || \"\").toLowerCase();\n if (message.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", logger_1.Logger.errors.INSUFFICIENT_FUNDS, {\n error,\n method,\n transaction\n });\n }\n if (message.match(/nonce (is )?too low/i)) {\n logger.throwError(\"nonce has already been used\", logger_1.Logger.errors.NONCE_EXPIRED, {\n error,\n method,\n transaction\n });\n }\n if (message.match(/replacement transaction underpriced|transaction gas price.*too low/i)) {\n logger.throwError(\"replacement fee too low\", logger_1.Logger.errors.REPLACEMENT_UNDERPRICED, {\n error,\n method,\n transaction\n });\n }\n if (message.match(/only replay-protected/i)) {\n logger.throwError(\"legacy pre-eip-155 transactions not supported\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n error,\n method,\n transaction\n });\n }\n if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error,\n method,\n transaction\n });\n }\n throw error;\n }\n function timer(timeout) {\n return new Promise(function(resolve) {\n setTimeout(resolve, timeout);\n });\n }\n function getResult(payload) {\n if (payload.error) {\n var error = new Error(payload.error.message);\n error.code = payload.error.code;\n error.data = payload.error.data;\n throw error;\n }\n return payload.result;\n }\n function getLowerCase(value) {\n if (value) {\n return value.toLowerCase();\n }\n return value;\n }\n var _constructorGuard = {};\n var JsonRpcSigner = (\n /** @class */\n function(_super) {\n __extends4(JsonRpcSigner2, _super);\n function JsonRpcSigner2(constructorGuard, provider, addressOrIndex) {\n var _this = _super.call(this) || this;\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"do not call the JsonRpcSigner constructor directly; use provider.getSigner\");\n }\n (0, properties_1.defineReadOnly)(_this, \"provider\", provider);\n if (addressOrIndex == null) {\n addressOrIndex = 0;\n }\n if (typeof addressOrIndex === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"_address\", _this.provider.formatter.address(addressOrIndex));\n (0, properties_1.defineReadOnly)(_this, \"_index\", null);\n } else if (typeof addressOrIndex === \"number\") {\n (0, properties_1.defineReadOnly)(_this, \"_index\", addressOrIndex);\n (0, properties_1.defineReadOnly)(_this, \"_address\", null);\n } else {\n logger.throwArgumentError(\"invalid address or index\", \"addressOrIndex\", addressOrIndex);\n }\n return _this;\n }\n JsonRpcSigner2.prototype.connect = function(provider) {\n return logger.throwError(\"cannot alter JSON-RPC Signer connection\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"connect\"\n });\n };\n JsonRpcSigner2.prototype.connectUnchecked = function() {\n return new UncheckedJsonRpcSigner(_constructorGuard, this.provider, this._address || this._index);\n };\n JsonRpcSigner2.prototype.getAddress = function() {\n var _this = this;\n if (this._address) {\n return Promise.resolve(this._address);\n }\n return this.provider.send(\"eth_accounts\", []).then(function(accounts) {\n if (accounts.length <= _this._index) {\n logger.throwError(\"unknown account #\" + _this._index, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress\"\n });\n }\n return _this.provider.formatter.address(accounts[_this._index]);\n });\n };\n JsonRpcSigner2.prototype.sendUncheckedTransaction = function(transaction) {\n var _this = this;\n transaction = (0, properties_1.shallowCopy)(transaction);\n var fromAddress = this.getAddress().then(function(address) {\n if (address) {\n address = address.toLowerCase();\n }\n return address;\n });\n if (transaction.gasLimit == null) {\n var estimate = (0, properties_1.shallowCopy)(transaction);\n estimate.from = fromAddress;\n transaction.gasLimit = this.provider.estimateGas(estimate);\n }\n if (transaction.to != null) {\n transaction.to = Promise.resolve(transaction.to).then(function(to) {\n return __awaiter4(_this, void 0, void 0, function() {\n var address;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (to == null) {\n return [2, null];\n }\n return [4, this.provider.resolveName(to)];\n case 1:\n address = _a.sent();\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return [2, address];\n }\n });\n });\n });\n }\n return (0, properties_1.resolveProperties)({\n tx: (0, properties_1.resolveProperties)(transaction),\n sender: fromAddress\n }).then(function(_a) {\n var tx = _a.tx, sender = _a.sender;\n if (tx.from != null) {\n if (tx.from.toLowerCase() !== sender) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n } else {\n tx.from = sender;\n }\n var hexTx = _this.provider.constructor.hexlifyTransaction(tx, { from: true });\n return _this.provider.send(\"eth_sendTransaction\", [hexTx]).then(function(hash3) {\n return hash3;\n }, function(error) {\n if (typeof error.message === \"string\" && error.message.match(/user denied/i)) {\n logger.throwError(\"user rejected transaction\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"sendTransaction\",\n transaction: tx\n });\n }\n return checkError(\"sendTransaction\", error, hexTx);\n });\n });\n };\n JsonRpcSigner2.prototype.signTransaction = function(transaction) {\n return logger.throwError(\"signing transactions is unsupported\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signTransaction\"\n });\n };\n JsonRpcSigner2.prototype.sendTransaction = function(transaction) {\n return __awaiter4(this, void 0, void 0, function() {\n var blockNumber, hash3, error_1;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval)];\n case 1:\n blockNumber = _a.sent();\n return [4, this.sendUncheckedTransaction(transaction)];\n case 2:\n hash3 = _a.sent();\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, (0, web_1.poll)(function() {\n return __awaiter4(_this, void 0, void 0, function() {\n var tx;\n return __generator4(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.provider.getTransaction(hash3)];\n case 1:\n tx = _a2.sent();\n if (tx === null) {\n return [2, void 0];\n }\n return [2, this.provider._wrapTransaction(tx, hash3, blockNumber)];\n }\n });\n });\n }, { oncePoll: this.provider })];\n case 4:\n return [2, _a.sent()];\n case 5:\n error_1 = _a.sent();\n error_1.transactionHash = hash3;\n throw error_1;\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype.signMessage = function(message) {\n return __awaiter4(this, void 0, void 0, function() {\n var data, address, error_2;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n data = typeof message === \"string\" ? (0, strings_1.toUtf8Bytes)(message) : message;\n return [4, this.getAddress()];\n case 1:\n address = _a.sent();\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.provider.send(\"personal_sign\", [(0, bytes_1.hexlify)(data), address.toLowerCase()])];\n case 3:\n return [2, _a.sent()];\n case 4:\n error_2 = _a.sent();\n if (typeof error_2.message === \"string\" && error_2.message.match(/user denied/i)) {\n logger.throwError(\"user rejected signing\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"signMessage\",\n from: address,\n messageData: message\n });\n }\n throw error_2;\n case 5:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype._legacySignMessage = function(message) {\n return __awaiter4(this, void 0, void 0, function() {\n var data, address, error_3;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n data = typeof message === \"string\" ? (0, strings_1.toUtf8Bytes)(message) : message;\n return [4, this.getAddress()];\n case 1:\n address = _a.sent();\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.provider.send(\"eth_sign\", [address.toLowerCase(), (0, bytes_1.hexlify)(data)])];\n case 3:\n return [2, _a.sent()];\n case 4:\n error_3 = _a.sent();\n if (typeof error_3.message === \"string\" && error_3.message.match(/user denied/i)) {\n logger.throwError(\"user rejected signing\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"_legacySignMessage\",\n from: address,\n messageData: message\n });\n }\n throw error_3;\n case 5:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype._signTypedData = function(domain2, types, value) {\n return __awaiter4(this, void 0, void 0, function() {\n var populated, address, error_4;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, hash_1._TypedDataEncoder.resolveNames(domain2, types, value, function(name) {\n return _this.provider.resolveName(name);\n })];\n case 1:\n populated = _a.sent();\n return [4, this.getAddress()];\n case 2:\n address = _a.sent();\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, this.provider.send(\"eth_signTypedData_v4\", [\n address.toLowerCase(),\n JSON.stringify(hash_1._TypedDataEncoder.getPayload(populated.domain, types, populated.value))\n ])];\n case 4:\n return [2, _a.sent()];\n case 5:\n error_4 = _a.sent();\n if (typeof error_4.message === \"string\" && error_4.message.match(/user denied/i)) {\n logger.throwError(\"user rejected signing\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"_signTypedData\",\n from: address,\n messageData: { domain: populated.domain, types, value: populated.value }\n });\n }\n throw error_4;\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype.unlock = function(password) {\n return __awaiter4(this, void 0, void 0, function() {\n var provider, address;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n provider = this.provider;\n return [4, this.getAddress()];\n case 1:\n address = _a.sent();\n return [2, provider.send(\"personal_unlockAccount\", [address.toLowerCase(), password, null])];\n }\n });\n });\n };\n return JsonRpcSigner2;\n }(abstract_signer_1.Signer)\n );\n exports3.JsonRpcSigner = JsonRpcSigner;\n var UncheckedJsonRpcSigner = (\n /** @class */\n function(_super) {\n __extends4(UncheckedJsonRpcSigner2, _super);\n function UncheckedJsonRpcSigner2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n UncheckedJsonRpcSigner2.prototype.sendTransaction = function(transaction) {\n var _this = this;\n return this.sendUncheckedTransaction(transaction).then(function(hash3) {\n return {\n hash: hash3,\n nonce: null,\n gasLimit: null,\n gasPrice: null,\n data: null,\n value: null,\n chainId: null,\n confirmations: 0,\n from: null,\n wait: function(confirmations) {\n return _this.provider.waitForTransaction(hash3, confirmations);\n }\n };\n });\n };\n return UncheckedJsonRpcSigner2;\n }(JsonRpcSigner)\n );\n var allowedTransactionKeys = {\n chainId: true,\n data: true,\n gasLimit: true,\n gasPrice: true,\n nonce: true,\n to: true,\n value: true,\n type: true,\n accessList: true,\n maxFeePerGas: true,\n maxPriorityFeePerGas: true\n };\n var JsonRpcProvider = (\n /** @class */\n function(_super) {\n __extends4(JsonRpcProvider2, _super);\n function JsonRpcProvider2(url, network) {\n var _this = this;\n var networkOrReady = network;\n if (networkOrReady == null) {\n networkOrReady = new Promise(function(resolve, reject) {\n setTimeout(function() {\n _this.detectNetwork().then(function(network2) {\n resolve(network2);\n }, function(error) {\n reject(error);\n });\n }, 0);\n });\n }\n _this = _super.call(this, networkOrReady) || this;\n if (!url) {\n url = (0, properties_1.getStatic)(_this.constructor, \"defaultUrl\")();\n }\n if (typeof url === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"connection\", Object.freeze({\n url\n }));\n } else {\n (0, properties_1.defineReadOnly)(_this, \"connection\", Object.freeze((0, properties_1.shallowCopy)(url)));\n }\n _this._nextId = 42;\n return _this;\n }\n Object.defineProperty(JsonRpcProvider2.prototype, \"_cache\", {\n get: function() {\n if (this._eventLoopCache == null) {\n this._eventLoopCache = {};\n }\n return this._eventLoopCache;\n },\n enumerable: false,\n configurable: true\n });\n JsonRpcProvider2.defaultUrl = function() {\n return \"http://localhost:8545\";\n };\n JsonRpcProvider2.prototype.detectNetwork = function() {\n var _this = this;\n if (!this._cache[\"detectNetwork\"]) {\n this._cache[\"detectNetwork\"] = this._uncachedDetectNetwork();\n setTimeout(function() {\n _this._cache[\"detectNetwork\"] = null;\n }, 0);\n }\n return this._cache[\"detectNetwork\"];\n };\n JsonRpcProvider2.prototype._uncachedDetectNetwork = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var chainId, error_5, error_6, getNetwork;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, timer(0)];\n case 1:\n _a.sent();\n chainId = null;\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 9]);\n return [4, this.send(\"eth_chainId\", [])];\n case 3:\n chainId = _a.sent();\n return [3, 9];\n case 4:\n error_5 = _a.sent();\n _a.label = 5;\n case 5:\n _a.trys.push([5, 7, , 8]);\n return [4, this.send(\"net_version\", [])];\n case 6:\n chainId = _a.sent();\n return [3, 8];\n case 7:\n error_6 = _a.sent();\n return [3, 8];\n case 8:\n return [3, 9];\n case 9:\n if (chainId != null) {\n getNetwork = (0, properties_1.getStatic)(this.constructor, \"getNetwork\");\n try {\n return [2, getNetwork(bignumber_1.BigNumber.from(chainId).toNumber())];\n } catch (error) {\n return [2, logger.throwError(\"could not detect network\", logger_1.Logger.errors.NETWORK_ERROR, {\n chainId,\n event: \"invalidNetwork\",\n serverError: error\n })];\n }\n }\n return [2, logger.throwError(\"could not detect network\", logger_1.Logger.errors.NETWORK_ERROR, {\n event: \"noNetwork\"\n })];\n }\n });\n });\n };\n JsonRpcProvider2.prototype.getSigner = function(addressOrIndex) {\n return new JsonRpcSigner(_constructorGuard, this, addressOrIndex);\n };\n JsonRpcProvider2.prototype.getUncheckedSigner = function(addressOrIndex) {\n return this.getSigner(addressOrIndex).connectUnchecked();\n };\n JsonRpcProvider2.prototype.listAccounts = function() {\n var _this = this;\n return this.send(\"eth_accounts\", []).then(function(accounts) {\n return accounts.map(function(a3) {\n return _this.formatter.address(a3);\n });\n });\n };\n JsonRpcProvider2.prototype.send = function(method, params) {\n var _this = this;\n var request = {\n method,\n params,\n id: this._nextId++,\n jsonrpc: \"2.0\"\n };\n this.emit(\"debug\", {\n action: \"request\",\n request: (0, properties_1.deepCopy)(request),\n provider: this\n });\n var cache = [\"eth_chainId\", \"eth_blockNumber\"].indexOf(method) >= 0;\n if (cache && this._cache[method]) {\n return this._cache[method];\n }\n var result = (0, web_1.fetchJson)(this.connection, JSON.stringify(request), getResult).then(function(result2) {\n _this.emit(\"debug\", {\n action: \"response\",\n request,\n response: result2,\n provider: _this\n });\n return result2;\n }, function(error) {\n _this.emit(\"debug\", {\n action: \"response\",\n error,\n request,\n provider: _this\n });\n throw error;\n });\n if (cache) {\n this._cache[method] = result;\n setTimeout(function() {\n _this._cache[method] = null;\n }, 0);\n }\n return result;\n };\n JsonRpcProvider2.prototype.prepareRequest = function(method, params) {\n switch (method) {\n case \"getBlockNumber\":\n return [\"eth_blockNumber\", []];\n case \"getGasPrice\":\n return [\"eth_gasPrice\", []];\n case \"getBalance\":\n return [\"eth_getBalance\", [getLowerCase(params.address), params.blockTag]];\n case \"getTransactionCount\":\n return [\"eth_getTransactionCount\", [getLowerCase(params.address), params.blockTag]];\n case \"getCode\":\n return [\"eth_getCode\", [getLowerCase(params.address), params.blockTag]];\n case \"getStorageAt\":\n return [\"eth_getStorageAt\", [getLowerCase(params.address), (0, bytes_1.hexZeroPad)(params.position, 32), params.blockTag]];\n case \"sendTransaction\":\n return [\"eth_sendRawTransaction\", [params.signedTransaction]];\n case \"getBlock\":\n if (params.blockTag) {\n return [\"eth_getBlockByNumber\", [params.blockTag, !!params.includeTransactions]];\n } else if (params.blockHash) {\n return [\"eth_getBlockByHash\", [params.blockHash, !!params.includeTransactions]];\n }\n return null;\n case \"getTransaction\":\n return [\"eth_getTransactionByHash\", [params.transactionHash]];\n case \"getTransactionReceipt\":\n return [\"eth_getTransactionReceipt\", [params.transactionHash]];\n case \"call\": {\n var hexlifyTransaction = (0, properties_1.getStatic)(this.constructor, \"hexlifyTransaction\");\n return [\"eth_call\", [hexlifyTransaction(params.transaction, { from: true }), params.blockTag]];\n }\n case \"estimateGas\": {\n var hexlifyTransaction = (0, properties_1.getStatic)(this.constructor, \"hexlifyTransaction\");\n return [\"eth_estimateGas\", [hexlifyTransaction(params.transaction, { from: true })]];\n }\n case \"getLogs\":\n if (params.filter && params.filter.address != null) {\n params.filter.address = getLowerCase(params.filter.address);\n }\n return [\"eth_getLogs\", [params.filter]];\n default:\n break;\n }\n return null;\n };\n JsonRpcProvider2.prototype.perform = function(method, params) {\n return __awaiter4(this, void 0, void 0, function() {\n var tx, feeData, args, error_7;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(method === \"call\" || method === \"estimateGas\"))\n return [3, 2];\n tx = params.transaction;\n if (!(tx && tx.type != null && bignumber_1.BigNumber.from(tx.type).isZero()))\n return [3, 2];\n if (!(tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null))\n return [3, 2];\n return [4, this.getFeeData()];\n case 1:\n feeData = _a.sent();\n if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {\n params = (0, properties_1.shallowCopy)(params);\n params.transaction = (0, properties_1.shallowCopy)(tx);\n delete params.transaction.type;\n }\n _a.label = 2;\n case 2:\n args = this.prepareRequest(method, params);\n if (args == null) {\n logger.throwError(method + \" not implemented\", logger_1.Logger.errors.NOT_IMPLEMENTED, { operation: method });\n }\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, this.send(args[0], args[1])];\n case 4:\n return [2, _a.sent()];\n case 5:\n error_7 = _a.sent();\n return [2, checkError(method, error_7, params)];\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcProvider2.prototype._startEvent = function(event) {\n if (event.tag === \"pending\") {\n this._startPending();\n }\n _super.prototype._startEvent.call(this, event);\n };\n JsonRpcProvider2.prototype._startPending = function() {\n if (this._pendingFilter != null) {\n return;\n }\n var self2 = this;\n var pendingFilter = this.send(\"eth_newPendingTransactionFilter\", []);\n this._pendingFilter = pendingFilter;\n pendingFilter.then(function(filterId) {\n function poll2() {\n self2.send(\"eth_getFilterChanges\", [filterId]).then(function(hashes) {\n if (self2._pendingFilter != pendingFilter) {\n return null;\n }\n var seq = Promise.resolve();\n hashes.forEach(function(hash3) {\n self2._emitted[\"t:\" + hash3.toLowerCase()] = \"pending\";\n seq = seq.then(function() {\n return self2.getTransaction(hash3).then(function(tx) {\n self2.emit(\"pending\", tx);\n return null;\n });\n });\n });\n return seq.then(function() {\n return timer(1e3);\n });\n }).then(function() {\n if (self2._pendingFilter != pendingFilter) {\n self2.send(\"eth_uninstallFilter\", [filterId]);\n return;\n }\n setTimeout(function() {\n poll2();\n }, 0);\n return null;\n }).catch(function(error) {\n });\n }\n poll2();\n return filterId;\n }).catch(function(error) {\n });\n };\n JsonRpcProvider2.prototype._stopEvent = function(event) {\n if (event.tag === \"pending\" && this.listenerCount(\"pending\") === 0) {\n this._pendingFilter = null;\n }\n _super.prototype._stopEvent.call(this, event);\n };\n JsonRpcProvider2.hexlifyTransaction = function(transaction, allowExtra) {\n var allowed = (0, properties_1.shallowCopy)(allowedTransactionKeys);\n if (allowExtra) {\n for (var key in allowExtra) {\n if (allowExtra[key]) {\n allowed[key] = true;\n }\n }\n }\n (0, properties_1.checkProperties)(transaction, allowed);\n var result = {};\n [\"chainId\", \"gasLimit\", \"gasPrice\", \"type\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"value\"].forEach(function(key2) {\n if (transaction[key2] == null) {\n return;\n }\n var value = (0, bytes_1.hexValue)(bignumber_1.BigNumber.from(transaction[key2]));\n if (key2 === \"gasLimit\") {\n key2 = \"gas\";\n }\n result[key2] = value;\n });\n [\"from\", \"to\", \"data\"].forEach(function(key2) {\n if (transaction[key2] == null) {\n return;\n }\n result[key2] = (0, bytes_1.hexlify)(transaction[key2]);\n });\n if (transaction.accessList) {\n result[\"accessList\"] = (0, transactions_1.accessListify)(transaction.accessList);\n }\n return result;\n };\n return JsonRpcProvider2;\n }(base_provider_1.BaseProvider)\n );\n exports3.JsonRpcProvider = JsonRpcProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ws.js\n var require_browser_ws = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ws.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WebSocket = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var WS = null;\n exports3.WebSocket = WS;\n try {\n exports3.WebSocket = WS = WebSocket;\n if (WS == null) {\n throw new Error(\"inject please\");\n }\n } catch (error) {\n logger_2 = new logger_1.Logger(_version_1.version);\n exports3.WebSocket = WS = function() {\n logger_2.throwError(\"WebSockets not supported in this environment\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new WebSocket()\"\n });\n };\n }\n var logger_2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/websocket-provider.js\n var require_websocket_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/websocket-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WebSocketProvider = void 0;\n var bignumber_1 = require_lib3();\n var properties_1 = require_lib4();\n var json_rpc_provider_1 = require_json_rpc_provider();\n var ws_1 = require_browser_ws();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var NextId = 1;\n var WebSocketProvider = (\n /** @class */\n function(_super) {\n __extends4(WebSocketProvider2, _super);\n function WebSocketProvider2(url, network) {\n var _this = this;\n if (network === \"any\") {\n logger.throwError(\"WebSocketProvider does not support 'any' network yet\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"network:any\"\n });\n }\n if (typeof url === \"string\") {\n _this = _super.call(this, url, network) || this;\n } else {\n _this = _super.call(this, \"_websocket\", network) || this;\n }\n _this._pollingInterval = -1;\n _this._wsReady = false;\n if (typeof url === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"_websocket\", new ws_1.WebSocket(_this.connection.url));\n } else {\n (0, properties_1.defineReadOnly)(_this, \"_websocket\", url);\n }\n (0, properties_1.defineReadOnly)(_this, \"_requests\", {});\n (0, properties_1.defineReadOnly)(_this, \"_subs\", {});\n (0, properties_1.defineReadOnly)(_this, \"_subIds\", {});\n (0, properties_1.defineReadOnly)(_this, \"_detectNetwork\", _super.prototype.detectNetwork.call(_this));\n _this.websocket.onopen = function() {\n _this._wsReady = true;\n Object.keys(_this._requests).forEach(function(id) {\n _this.websocket.send(_this._requests[id].payload);\n });\n };\n _this.websocket.onmessage = function(messageEvent) {\n var data = messageEvent.data;\n var result = JSON.parse(data);\n if (result.id != null) {\n var id = String(result.id);\n var request = _this._requests[id];\n delete _this._requests[id];\n if (result.result !== void 0) {\n request.callback(null, result.result);\n _this.emit(\"debug\", {\n action: \"response\",\n request: JSON.parse(request.payload),\n response: result.result,\n provider: _this\n });\n } else {\n var error = null;\n if (result.error) {\n error = new Error(result.error.message || \"unknown error\");\n (0, properties_1.defineReadOnly)(error, \"code\", result.error.code || null);\n (0, properties_1.defineReadOnly)(error, \"response\", data);\n } else {\n error = new Error(\"unknown error\");\n }\n request.callback(error, void 0);\n _this.emit(\"debug\", {\n action: \"response\",\n error,\n request: JSON.parse(request.payload),\n provider: _this\n });\n }\n } else if (result.method === \"eth_subscription\") {\n var sub = _this._subs[result.params.subscription];\n if (sub) {\n sub.processFunc(result.params.result);\n }\n } else {\n console.warn(\"this should not happen\");\n }\n };\n var fauxPoll = setInterval(function() {\n _this.emit(\"poll\");\n }, 1e3);\n if (fauxPoll.unref) {\n fauxPoll.unref();\n }\n return _this;\n }\n Object.defineProperty(WebSocketProvider2.prototype, \"websocket\", {\n // Cannot narrow the type of _websocket, as that is not backwards compatible\n // so we add a getter and let the WebSocket be a public API.\n get: function() {\n return this._websocket;\n },\n enumerable: false,\n configurable: true\n });\n WebSocketProvider2.prototype.detectNetwork = function() {\n return this._detectNetwork;\n };\n Object.defineProperty(WebSocketProvider2.prototype, \"pollingInterval\", {\n get: function() {\n return 0;\n },\n set: function(value) {\n logger.throwError(\"cannot set polling interval on WebSocketProvider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setPollingInterval\"\n });\n },\n enumerable: false,\n configurable: true\n });\n WebSocketProvider2.prototype.resetEventsBlock = function(blockNumber) {\n logger.throwError(\"cannot reset events block on WebSocketProvider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resetEventBlock\"\n });\n };\n WebSocketProvider2.prototype.poll = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n return [2, null];\n });\n });\n };\n Object.defineProperty(WebSocketProvider2.prototype, \"polling\", {\n set: function(value) {\n if (!value) {\n return;\n }\n logger.throwError(\"cannot set polling on WebSocketProvider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setPolling\"\n });\n },\n enumerable: false,\n configurable: true\n });\n WebSocketProvider2.prototype.send = function(method, params) {\n var _this = this;\n var rid = NextId++;\n return new Promise(function(resolve, reject) {\n function callback(error, result) {\n if (error) {\n return reject(error);\n }\n return resolve(result);\n }\n var payload = JSON.stringify({\n method,\n params,\n id: rid,\n jsonrpc: \"2.0\"\n });\n _this.emit(\"debug\", {\n action: \"request\",\n request: JSON.parse(payload),\n provider: _this\n });\n _this._requests[String(rid)] = { callback, payload };\n if (_this._wsReady) {\n _this.websocket.send(payload);\n }\n });\n };\n WebSocketProvider2.defaultUrl = function() {\n return \"ws://localhost:8546\";\n };\n WebSocketProvider2.prototype._subscribe = function(tag, param, processFunc) {\n return __awaiter4(this, void 0, void 0, function() {\n var subIdPromise, subId;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n subIdPromise = this._subIds[tag];\n if (subIdPromise == null) {\n subIdPromise = Promise.all(param).then(function(param2) {\n return _this.send(\"eth_subscribe\", param2);\n });\n this._subIds[tag] = subIdPromise;\n }\n return [4, subIdPromise];\n case 1:\n subId = _a.sent();\n this._subs[subId] = { tag, processFunc };\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n WebSocketProvider2.prototype._startEvent = function(event) {\n var _this = this;\n switch (event.type) {\n case \"block\":\n this._subscribe(\"block\", [\"newHeads\"], function(result) {\n var blockNumber = bignumber_1.BigNumber.from(result.number).toNumber();\n _this._emitted.block = blockNumber;\n _this.emit(\"block\", blockNumber);\n });\n break;\n case \"pending\":\n this._subscribe(\"pending\", [\"newPendingTransactions\"], function(result) {\n _this.emit(\"pending\", result);\n });\n break;\n case \"filter\":\n this._subscribe(event.tag, [\"logs\", this._getFilter(event.filter)], function(result) {\n if (result.removed == null) {\n result.removed = false;\n }\n _this.emit(event.filter, _this.formatter.filterLog(result));\n });\n break;\n case \"tx\": {\n var emitReceipt_1 = function(event2) {\n var hash3 = event2.hash;\n _this.getTransactionReceipt(hash3).then(function(receipt) {\n if (!receipt) {\n return;\n }\n _this.emit(hash3, receipt);\n });\n };\n emitReceipt_1(event);\n this._subscribe(\"tx\", [\"newHeads\"], function(result) {\n _this._events.filter(function(e2) {\n return e2.type === \"tx\";\n }).forEach(emitReceipt_1);\n });\n break;\n }\n case \"debug\":\n case \"poll\":\n case \"willPoll\":\n case \"didPoll\":\n case \"error\":\n break;\n default:\n console.log(\"unhandled:\", event);\n break;\n }\n };\n WebSocketProvider2.prototype._stopEvent = function(event) {\n var _this = this;\n var tag = event.tag;\n if (event.type === \"tx\") {\n if (this._events.filter(function(e2) {\n return e2.type === \"tx\";\n }).length) {\n return;\n }\n tag = \"tx\";\n } else if (this.listenerCount(event.event)) {\n return;\n }\n var subId = this._subIds[tag];\n if (!subId) {\n return;\n }\n delete this._subIds[tag];\n subId.then(function(subId2) {\n if (!_this._subs[subId2]) {\n return;\n }\n delete _this._subs[subId2];\n _this.send(\"eth_unsubscribe\", [subId2]);\n });\n };\n WebSocketProvider2.prototype.destroy = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(this.websocket.readyState === ws_1.WebSocket.CONNECTING))\n return [3, 2];\n return [4, new Promise(function(resolve) {\n _this.websocket.onopen = function() {\n resolve(true);\n };\n _this.websocket.onerror = function() {\n resolve(false);\n };\n })];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n this.websocket.close(1e3);\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n return WebSocketProvider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.WebSocketProvider = WebSocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js\n var require_url_json_rpc_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.UrlJsonRpcProvider = exports3.StaticJsonRpcProvider = void 0;\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var json_rpc_provider_1 = require_json_rpc_provider();\n var StaticJsonRpcProvider = (\n /** @class */\n function(_super) {\n __extends4(StaticJsonRpcProvider2, _super);\n function StaticJsonRpcProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n StaticJsonRpcProvider2.prototype.detectNetwork = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var network;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n network = this.network;\n if (!(network == null))\n return [3, 2];\n return [4, _super.prototype.detectNetwork.call(this)];\n case 1:\n network = _a.sent();\n if (!network) {\n logger.throwError(\"no network detected\", logger_1.Logger.errors.UNKNOWN_ERROR, {});\n }\n if (this._network == null) {\n (0, properties_1.defineReadOnly)(this, \"_network\", network);\n this.emit(\"network\", network, null);\n }\n _a.label = 2;\n case 2:\n return [2, network];\n }\n });\n });\n };\n return StaticJsonRpcProvider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.StaticJsonRpcProvider = StaticJsonRpcProvider;\n var UrlJsonRpcProvider = (\n /** @class */\n function(_super) {\n __extends4(UrlJsonRpcProvider2, _super);\n function UrlJsonRpcProvider2(network, apiKey) {\n var _newTarget = this.constructor;\n var _this = this;\n logger.checkAbstract(_newTarget, UrlJsonRpcProvider2);\n network = (0, properties_1.getStatic)(_newTarget, \"getNetwork\")(network);\n apiKey = (0, properties_1.getStatic)(_newTarget, \"getApiKey\")(apiKey);\n var connection = (0, properties_1.getStatic)(_newTarget, \"getUrl\")(network, apiKey);\n _this = _super.call(this, connection, network) || this;\n if (typeof apiKey === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", apiKey);\n } else if (apiKey != null) {\n Object.keys(apiKey).forEach(function(key) {\n (0, properties_1.defineReadOnly)(_this, key, apiKey[key]);\n });\n }\n return _this;\n }\n UrlJsonRpcProvider2.prototype._startPending = function() {\n logger.warn(\"WARNING: API provider does not support pending filters\");\n };\n UrlJsonRpcProvider2.prototype.isCommunityResource = function() {\n return false;\n };\n UrlJsonRpcProvider2.prototype.getSigner = function(address) {\n return logger.throwError(\"API provider does not support signing\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: \"getSigner\" });\n };\n UrlJsonRpcProvider2.prototype.listAccounts = function() {\n return Promise.resolve([]);\n };\n UrlJsonRpcProvider2.getApiKey = function(apiKey) {\n return apiKey;\n };\n UrlJsonRpcProvider2.getUrl = function(network, apiKey) {\n return logger.throwError(\"not implemented; sub-classes must override getUrl\", logger_1.Logger.errors.NOT_IMPLEMENTED, {\n operation: \"getUrl\"\n });\n };\n return UrlJsonRpcProvider2;\n }(StaticJsonRpcProvider)\n );\n exports3.UrlJsonRpcProvider = UrlJsonRpcProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/alchemy-provider.js\n var require_alchemy_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/alchemy-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AlchemyProvider = exports3.AlchemyWebSocketProvider = void 0;\n var properties_1 = require_lib4();\n var formatter_1 = require_formatter();\n var websocket_provider_1 = require_websocket_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var defaultApiKey = \"_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC\";\n var AlchemyWebSocketProvider = (\n /** @class */\n function(_super) {\n __extends4(AlchemyWebSocketProvider2, _super);\n function AlchemyWebSocketProvider2(network, apiKey) {\n var _this = this;\n var provider = new AlchemyProvider(network, apiKey);\n var url = provider.connection.url.replace(/^http/i, \"ws\").replace(\".alchemyapi.\", \".ws.alchemyapi.\");\n _this = _super.call(this, url, provider.network) || this;\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", provider.apiKey);\n return _this;\n }\n AlchemyWebSocketProvider2.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n return AlchemyWebSocketProvider2;\n }(websocket_provider_1.WebSocketProvider)\n );\n exports3.AlchemyWebSocketProvider = AlchemyWebSocketProvider;\n var AlchemyProvider = (\n /** @class */\n function(_super) {\n __extends4(AlchemyProvider2, _super);\n function AlchemyProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AlchemyProvider2.getWebSocketProvider = function(network, apiKey) {\n return new AlchemyWebSocketProvider(network, apiKey);\n };\n AlchemyProvider2.getApiKey = function(apiKey) {\n if (apiKey == null) {\n return defaultApiKey;\n }\n if (apiKey && typeof apiKey !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey;\n };\n AlchemyProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"eth-mainnet.alchemyapi.io/v2/\";\n break;\n case \"goerli\":\n host = \"eth-goerli.g.alchemy.com/v2/\";\n break;\n case \"sepolia\":\n host = \"eth-sepolia.g.alchemy.com/v2/\";\n break;\n case \"matic\":\n host = \"polygon-mainnet.g.alchemy.com/v2/\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai.g.alchemy.com/v2/\";\n break;\n case \"arbitrum\":\n host = \"arb-mainnet.g.alchemy.com/v2/\";\n break;\n case \"arbitrum-goerli\":\n host = \"arb-goerli.g.alchemy.com/v2/\";\n break;\n case \"arbitrum-sepolia\":\n host = \"arb-sepolia.g.alchemy.com/v2/\";\n break;\n case \"optimism\":\n host = \"opt-mainnet.g.alchemy.com/v2/\";\n break;\n case \"optimism-goerli\":\n host = \"opt-goerli.g.alchemy.com/v2/\";\n break;\n case \"optimism-sepolia\":\n host = \"opt-sepolia.g.alchemy.com/v2/\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return {\n allowGzip: true,\n url: \"https://\" + host + apiKey,\n throttleCallback: function(attempt, url) {\n if (apiKey === defaultApiKey) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n };\n AlchemyProvider2.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n return AlchemyProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.AlchemyProvider = AlchemyProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/ankr-provider.js\n var require_ankr_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/ankr-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AnkrProvider = void 0;\n var formatter_1 = require_formatter();\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var defaultApiKey = \"9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972\";\n function getHost(name) {\n switch (name) {\n case \"homestead\":\n return \"rpc.ankr.com/eth/\";\n case \"ropsten\":\n return \"rpc.ankr.com/eth_ropsten/\";\n case \"rinkeby\":\n return \"rpc.ankr.com/eth_rinkeby/\";\n case \"goerli\":\n return \"rpc.ankr.com/eth_goerli/\";\n case \"sepolia\":\n return \"rpc.ankr.com/eth_sepolia/\";\n case \"matic\":\n return \"rpc.ankr.com/polygon/\";\n case \"maticmum\":\n return \"rpc.ankr.com/polygon_mumbai/\";\n case \"optimism\":\n return \"rpc.ankr.com/optimism/\";\n case \"optimism-goerli\":\n return \"rpc.ankr.com/optimism_testnet/\";\n case \"optimism-sepolia\":\n return \"rpc.ankr.com/optimism_sepolia/\";\n case \"arbitrum\":\n return \"rpc.ankr.com/arbitrum/\";\n }\n return logger.throwArgumentError(\"unsupported network\", \"name\", name);\n }\n var AnkrProvider = (\n /** @class */\n function(_super) {\n __extends4(AnkrProvider2, _super);\n function AnkrProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AnkrProvider2.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n AnkrProvider2.getApiKey = function(apiKey) {\n if (apiKey == null) {\n return defaultApiKey;\n }\n return apiKey;\n };\n AnkrProvider2.getUrl = function(network, apiKey) {\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n var connection = {\n allowGzip: true,\n url: \"https://\" + getHost(network.name) + apiKey,\n throttleCallback: function(attempt, url) {\n if (apiKey.apiKey === defaultApiKey) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n if (apiKey.projectSecret != null) {\n connection.user = \"\";\n connection.password = apiKey.projectSecret;\n }\n return connection;\n };\n return AnkrProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.AnkrProvider = AnkrProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/cloudflare-provider.js\n var require_cloudflare_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/cloudflare-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CloudflareProvider = void 0;\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var CloudflareProvider = (\n /** @class */\n function(_super) {\n __extends4(CloudflareProvider2, _super);\n function CloudflareProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CloudflareProvider2.getApiKey = function(apiKey) {\n if (apiKey != null) {\n logger.throwArgumentError(\"apiKey not supported for cloudflare\", \"apiKey\", apiKey);\n }\n return null;\n };\n CloudflareProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"https://cloudflare-eth.com/\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return host;\n };\n CloudflareProvider2.prototype.perform = function(method, params) {\n return __awaiter4(this, void 0, void 0, function() {\n var block;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(method === \"getBlockNumber\"))\n return [3, 2];\n return [4, _super.prototype.perform.call(this, \"getBlock\", { blockTag: \"latest\" })];\n case 1:\n block = _a.sent();\n return [2, block.number];\n case 2:\n return [2, _super.prototype.perform.call(this, method, params)];\n }\n });\n });\n };\n return CloudflareProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.CloudflareProvider = CloudflareProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/etherscan-provider.js\n var require_etherscan_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/etherscan-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EtherscanProvider = void 0;\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var web_1 = require_lib28();\n var formatter_1 = require_formatter();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var base_provider_1 = require_base_provider();\n function getTransactionPostData(transaction) {\n var result = {};\n for (var key in transaction) {\n if (transaction[key] == null) {\n continue;\n }\n var value = transaction[key];\n if (key === \"type\" && value === 0) {\n continue;\n }\n if ({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true }[key]) {\n value = (0, bytes_1.hexValue)((0, bytes_1.hexlify)(value));\n } else if (key === \"accessList\") {\n value = \"[\" + (0, transactions_1.accessListify)(value).map(function(set) {\n return '{address:\"' + set.address + '\",storageKeys:[\"' + set.storageKeys.join('\",\"') + '\"]}';\n }).join(\",\") + \"]\";\n } else {\n value = (0, bytes_1.hexlify)(value);\n }\n result[key] = value;\n }\n return result;\n }\n function getResult(result) {\n if (result.status == 0 && (result.message === \"No records found\" || result.message === \"No transactions found\")) {\n return result.result;\n }\n if (result.status != 1 || typeof result.message !== \"string\" || !result.message.match(/^OK/)) {\n var error = new Error(\"invalid response\");\n error.result = JSON.stringify(result);\n if ((result.result || \"\").toLowerCase().indexOf(\"rate limit\") >= 0) {\n error.throttleRetry = true;\n }\n throw error;\n }\n return result.result;\n }\n function getJsonResult(result) {\n if (result && result.status == 0 && result.message == \"NOTOK\" && (result.result || \"\").toLowerCase().indexOf(\"rate limit\") >= 0) {\n var error = new Error(\"throttled response\");\n error.result = JSON.stringify(result);\n error.throttleRetry = true;\n throw error;\n }\n if (result.jsonrpc != \"2.0\") {\n var error = new Error(\"invalid response\");\n error.result = JSON.stringify(result);\n throw error;\n }\n if (result.error) {\n var error = new Error(result.error.message || \"unknown error\");\n if (result.error.code) {\n error.code = result.error.code;\n }\n if (result.error.data) {\n error.data = result.error.data;\n }\n throw error;\n }\n return result.result;\n }\n function checkLogTag(blockTag) {\n if (blockTag === \"pending\") {\n throw new Error(\"pending not supported\");\n }\n if (blockTag === \"latest\") {\n return blockTag;\n }\n return parseInt(blockTag.substring(2), 16);\n }\n function checkError(method, error, transaction) {\n if (method === \"call\" && error.code === logger_1.Logger.errors.SERVER_ERROR) {\n var e2 = error.error;\n if (e2 && (e2.message.match(/reverted/i) || e2.message.match(/VM execution error/i))) {\n var data = e2.data;\n if (data) {\n data = \"0x\" + data.replace(/^.*0x/i, \"\");\n }\n if ((0, bytes_1.isHexString)(data)) {\n return data;\n }\n logger.throwError(\"missing revert data in call exception\", logger_1.Logger.errors.CALL_EXCEPTION, {\n error,\n data: \"0x\"\n });\n }\n }\n var message = error.message;\n if (error.code === logger_1.Logger.errors.SERVER_ERROR) {\n if (error.error && typeof error.error.message === \"string\") {\n message = error.error.message;\n } else if (typeof error.body === \"string\") {\n message = error.body;\n } else if (typeof error.responseText === \"string\") {\n message = error.responseText;\n }\n }\n message = (message || \"\").toLowerCase();\n if (message.match(/insufficient funds/)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", logger_1.Logger.errors.INSUFFICIENT_FUNDS, {\n error,\n method,\n transaction\n });\n }\n if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) {\n logger.throwError(\"nonce has already been used\", logger_1.Logger.errors.NONCE_EXPIRED, {\n error,\n method,\n transaction\n });\n }\n if (message.match(/another transaction with same nonce/)) {\n logger.throwError(\"replacement fee too low\", logger_1.Logger.errors.REPLACEMENT_UNDERPRICED, {\n error,\n method,\n transaction\n });\n }\n if (message.match(/execution failed due to an exception|execution reverted/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error,\n method,\n transaction\n });\n }\n throw error;\n }\n var EtherscanProvider = (\n /** @class */\n function(_super) {\n __extends4(EtherscanProvider2, _super);\n function EtherscanProvider2(network, apiKey) {\n var _this = _super.call(this, network) || this;\n (0, properties_1.defineReadOnly)(_this, \"baseUrl\", _this.getBaseUrl());\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", apiKey || null);\n return _this;\n }\n EtherscanProvider2.prototype.getBaseUrl = function() {\n switch (this.network ? this.network.name : \"invalid\") {\n case \"homestead\":\n return \"https://api.etherscan.io\";\n case \"goerli\":\n return \"https://api-goerli.etherscan.io\";\n case \"sepolia\":\n return \"https://api-sepolia.etherscan.io\";\n case \"matic\":\n return \"https://api.polygonscan.com\";\n case \"maticmum\":\n return \"https://api-testnet.polygonscan.com\";\n case \"arbitrum\":\n return \"https://api.arbiscan.io\";\n case \"arbitrum-goerli\":\n return \"https://api-goerli.arbiscan.io\";\n case \"optimism\":\n return \"https://api-optimistic.etherscan.io\";\n case \"optimism-goerli\":\n return \"https://api-goerli-optimistic.etherscan.io\";\n default:\n }\n return logger.throwArgumentError(\"unsupported network\", \"network\", this.network.name);\n };\n EtherscanProvider2.prototype.getUrl = function(module2, params) {\n var query = Object.keys(params).reduce(function(accum, key) {\n var value = params[key];\n if (value != null) {\n accum += \"&\" + key + \"=\" + value;\n }\n return accum;\n }, \"\");\n var apiKey = this.apiKey ? \"&apikey=\" + this.apiKey : \"\";\n return this.baseUrl + \"/api?module=\" + module2 + query + apiKey;\n };\n EtherscanProvider2.prototype.getPostUrl = function() {\n return this.baseUrl + \"/api\";\n };\n EtherscanProvider2.prototype.getPostData = function(module2, params) {\n params.module = module2;\n params.apikey = this.apiKey;\n return params;\n };\n EtherscanProvider2.prototype.fetch = function(module2, params, post) {\n return __awaiter4(this, void 0, void 0, function() {\n var url, payload, procFunc, connection, payloadStr, result;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n url = post ? this.getPostUrl() : this.getUrl(module2, params);\n payload = post ? this.getPostData(module2, params) : null;\n procFunc = module2 === \"proxy\" ? getJsonResult : getResult;\n this.emit(\"debug\", {\n action: \"request\",\n request: url,\n provider: this\n });\n connection = {\n url,\n throttleSlotInterval: 1e3,\n throttleCallback: function(attempt, url2) {\n if (_this.isCommunityResource()) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n payloadStr = null;\n if (payload) {\n connection.headers = { \"content-type\": \"application/x-www-form-urlencoded; charset=UTF-8\" };\n payloadStr = Object.keys(payload).map(function(key) {\n return key + \"=\" + payload[key];\n }).join(\"&\");\n }\n return [4, (0, web_1.fetchJson)(connection, payloadStr, procFunc || getJsonResult)];\n case 1:\n result = _a.sent();\n this.emit(\"debug\", {\n action: \"response\",\n request: url,\n response: (0, properties_1.deepCopy)(result),\n provider: this\n });\n return [2, result];\n }\n });\n });\n };\n EtherscanProvider2.prototype.detectNetwork = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n return [2, this.network];\n });\n });\n };\n EtherscanProvider2.prototype.perform = function(method, params) {\n return __awaiter4(this, void 0, void 0, function() {\n var _a, postData, error_1, postData, error_2, args, topic0, logs, blocks, i3, log, block, _b;\n return __generator4(this, function(_c) {\n switch (_c.label) {\n case 0:\n _a = method;\n switch (_a) {\n case \"getBlockNumber\":\n return [3, 1];\n case \"getGasPrice\":\n return [3, 2];\n case \"getBalance\":\n return [3, 3];\n case \"getTransactionCount\":\n return [3, 4];\n case \"getCode\":\n return [3, 5];\n case \"getStorageAt\":\n return [3, 6];\n case \"sendTransaction\":\n return [3, 7];\n case \"getBlock\":\n return [3, 8];\n case \"getTransaction\":\n return [3, 9];\n case \"getTransactionReceipt\":\n return [3, 10];\n case \"call\":\n return [3, 11];\n case \"estimateGas\":\n return [3, 15];\n case \"getLogs\":\n return [3, 19];\n case \"getEtherPrice\":\n return [3, 26];\n }\n return [3, 28];\n case 1:\n return [2, this.fetch(\"proxy\", { action: \"eth_blockNumber\" })];\n case 2:\n return [2, this.fetch(\"proxy\", { action: \"eth_gasPrice\" })];\n case 3:\n return [2, this.fetch(\"account\", {\n action: \"balance\",\n address: params.address,\n tag: params.blockTag\n })];\n case 4:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getTransactionCount\",\n address: params.address,\n tag: params.blockTag\n })];\n case 5:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getCode\",\n address: params.address,\n tag: params.blockTag\n })];\n case 6:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getStorageAt\",\n address: params.address,\n position: params.position,\n tag: params.blockTag\n })];\n case 7:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_sendRawTransaction\",\n hex: params.signedTransaction\n }, true).catch(function(error) {\n return checkError(\"sendTransaction\", error, params.signedTransaction);\n })];\n case 8:\n if (params.blockTag) {\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getBlockByNumber\",\n tag: params.blockTag,\n boolean: params.includeTransactions ? \"true\" : \"false\"\n })];\n }\n throw new Error(\"getBlock by blockHash not implemented\");\n case 9:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getTransactionByHash\",\n txhash: params.transactionHash\n })];\n case 10:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getTransactionReceipt\",\n txhash: params.transactionHash\n })];\n case 11:\n if (params.blockTag !== \"latest\") {\n throw new Error(\"EtherscanProvider does not support blockTag for call\");\n }\n postData = getTransactionPostData(params.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_call\";\n _c.label = 12;\n case 12:\n _c.trys.push([12, 14, , 15]);\n return [4, this.fetch(\"proxy\", postData, true)];\n case 13:\n return [2, _c.sent()];\n case 14:\n error_1 = _c.sent();\n return [2, checkError(\"call\", error_1, params.transaction)];\n case 15:\n postData = getTransactionPostData(params.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_estimateGas\";\n _c.label = 16;\n case 16:\n _c.trys.push([16, 18, , 19]);\n return [4, this.fetch(\"proxy\", postData, true)];\n case 17:\n return [2, _c.sent()];\n case 18:\n error_2 = _c.sent();\n return [2, checkError(\"estimateGas\", error_2, params.transaction)];\n case 19:\n args = { action: \"getLogs\" };\n if (params.filter.fromBlock) {\n args.fromBlock = checkLogTag(params.filter.fromBlock);\n }\n if (params.filter.toBlock) {\n args.toBlock = checkLogTag(params.filter.toBlock);\n }\n if (params.filter.address) {\n args.address = params.filter.address;\n }\n if (params.filter.topics && params.filter.topics.length > 0) {\n if (params.filter.topics.length > 1) {\n logger.throwError(\"unsupported topic count\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics });\n }\n if (params.filter.topics.length === 1) {\n topic0 = params.filter.topics[0];\n if (typeof topic0 !== \"string\" || topic0.length !== 66) {\n logger.throwError(\"unsupported topic format\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { topic0 });\n }\n args.topic0 = topic0;\n }\n }\n return [4, this.fetch(\"logs\", args)];\n case 20:\n logs = _c.sent();\n blocks = {};\n i3 = 0;\n _c.label = 21;\n case 21:\n if (!(i3 < logs.length))\n return [3, 25];\n log = logs[i3];\n if (log.blockHash != null) {\n return [3, 24];\n }\n if (!(blocks[log.blockNumber] == null))\n return [3, 23];\n return [4, this.getBlock(log.blockNumber)];\n case 22:\n block = _c.sent();\n if (block) {\n blocks[log.blockNumber] = block.hash;\n }\n _c.label = 23;\n case 23:\n log.blockHash = blocks[log.blockNumber];\n _c.label = 24;\n case 24:\n i3++;\n return [3, 21];\n case 25:\n return [2, logs];\n case 26:\n if (this.network.name !== \"homestead\") {\n return [2, 0];\n }\n _b = parseFloat;\n return [4, this.fetch(\"stats\", { action: \"ethprice\" })];\n case 27:\n return [2, _b.apply(void 0, [_c.sent().ethusd])];\n case 28:\n return [3, 29];\n case 29:\n return [2, _super.prototype.perform.call(this, method, params)];\n }\n });\n });\n };\n EtherscanProvider2.prototype.getHistory = function(addressOrName, startBlock, endBlock) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, result;\n var _a;\n var _this = this;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n _a = {\n action: \"txlist\"\n };\n return [4, this.resolveName(addressOrName)];\n case 1:\n params = (_a.address = _b.sent(), _a.startblock = startBlock == null ? 0 : startBlock, _a.endblock = endBlock == null ? 99999999 : endBlock, _a.sort = \"asc\", _a);\n return [4, this.fetch(\"account\", params)];\n case 2:\n result = _b.sent();\n return [2, result.map(function(tx) {\n [\"contractAddress\", \"to\"].forEach(function(key) {\n if (tx[key] == \"\") {\n delete tx[key];\n }\n });\n if (tx.creates == null && tx.contractAddress != null) {\n tx.creates = tx.contractAddress;\n }\n var item = _this.formatter.transactionResponse(tx);\n if (tx.timeStamp) {\n item.timestamp = parseInt(tx.timeStamp);\n }\n return item;\n })];\n }\n });\n });\n };\n EtherscanProvider2.prototype.isCommunityResource = function() {\n return this.apiKey == null;\n };\n return EtherscanProvider2;\n }(base_provider_1.BaseProvider)\n );\n exports3.EtherscanProvider = EtherscanProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/fallback-provider.js\n var require_fallback_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/fallback-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FallbackProvider = void 0;\n var abstract_provider_1 = require_lib14();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var random_1 = require_lib24();\n var web_1 = require_lib28();\n var base_provider_1 = require_base_provider();\n var formatter_1 = require_formatter();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n function now() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n function checkNetworks(networks) {\n var result = null;\n for (var i3 = 0; i3 < networks.length; i3++) {\n var network = networks[i3];\n if (network == null) {\n return null;\n }\n if (result) {\n if (!(result.name === network.name && result.chainId === network.chainId && (result.ensAddress === network.ensAddress || result.ensAddress == null && network.ensAddress == null))) {\n logger.throwArgumentError(\"provider mismatch\", \"networks\", networks);\n }\n } else {\n result = network;\n }\n }\n return result;\n }\n function median(values, maxDelta) {\n values = values.slice().sort();\n var middle = Math.floor(values.length / 2);\n if (values.length % 2) {\n return values[middle];\n }\n var a3 = values[middle - 1], b4 = values[middle];\n if (maxDelta != null && Math.abs(a3 - b4) > maxDelta) {\n return null;\n }\n return (a3 + b4) / 2;\n }\n function serialize(value) {\n if (value === null) {\n return \"null\";\n } else if (typeof value === \"number\" || typeof value === \"boolean\") {\n return JSON.stringify(value);\n } else if (typeof value === \"string\") {\n return value;\n } else if (bignumber_1.BigNumber.isBigNumber(value)) {\n return value.toString();\n } else if (Array.isArray(value)) {\n return JSON.stringify(value.map(function(i3) {\n return serialize(i3);\n }));\n } else if (typeof value === \"object\") {\n var keys = Object.keys(value);\n keys.sort();\n return \"{\" + keys.map(function(key) {\n var v2 = value[key];\n if (typeof v2 === \"function\") {\n v2 = \"[function]\";\n } else {\n v2 = serialize(v2);\n }\n return JSON.stringify(key) + \":\" + v2;\n }).join(\",\") + \"}\";\n }\n throw new Error(\"unknown value type: \" + typeof value);\n }\n var nextRid = 1;\n function stall(duration) {\n var cancel = null;\n var timer = null;\n var promise = new Promise(function(resolve) {\n cancel = function() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n resolve();\n };\n timer = setTimeout(cancel, duration);\n });\n var wait2 = function(func) {\n promise = promise.then(func);\n return promise;\n };\n function getPromise() {\n return promise;\n }\n return { cancel, getPromise, wait: wait2 };\n }\n var ForwardErrors = [\n logger_1.Logger.errors.CALL_EXCEPTION,\n logger_1.Logger.errors.INSUFFICIENT_FUNDS,\n logger_1.Logger.errors.NONCE_EXPIRED,\n logger_1.Logger.errors.REPLACEMENT_UNDERPRICED,\n logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT\n ];\n var ForwardProperties = [\n \"address\",\n \"args\",\n \"errorArgs\",\n \"errorSignature\",\n \"method\",\n \"transaction\"\n ];\n function exposeDebugConfig(config2, now2) {\n var result = {\n weight: config2.weight\n };\n Object.defineProperty(result, \"provider\", { get: function() {\n return config2.provider;\n } });\n if (config2.start) {\n result.start = config2.start;\n }\n if (now2) {\n result.duration = now2 - config2.start;\n }\n if (config2.done) {\n if (config2.error) {\n result.error = config2.error;\n } else {\n result.result = config2.result || null;\n }\n }\n return result;\n }\n function normalizedTally(normalize2, quorum) {\n return function(configs) {\n var tally = {};\n configs.forEach(function(c4) {\n var value = normalize2(c4.result);\n if (!tally[value]) {\n tally[value] = { count: 0, result: c4.result };\n }\n tally[value].count++;\n });\n var keys = Object.keys(tally);\n for (var i3 = 0; i3 < keys.length; i3++) {\n var check = tally[keys[i3]];\n if (check.count >= quorum) {\n return check.result;\n }\n }\n return void 0;\n };\n }\n function getProcessFunc(provider, method, params) {\n var normalize2 = serialize;\n switch (method) {\n case \"getBlockNumber\":\n return function(configs) {\n var values = configs.map(function(c4) {\n return c4.result;\n });\n var blockNumber = median(configs.map(function(c4) {\n return c4.result;\n }), 2);\n if (blockNumber == null) {\n return void 0;\n }\n blockNumber = Math.ceil(blockNumber);\n if (values.indexOf(blockNumber + 1) >= 0) {\n blockNumber++;\n }\n if (blockNumber >= provider._highestBlockNumber) {\n provider._highestBlockNumber = blockNumber;\n }\n return provider._highestBlockNumber;\n };\n case \"getGasPrice\":\n return function(configs) {\n var values = configs.map(function(c4) {\n return c4.result;\n });\n values.sort();\n return values[Math.floor(values.length / 2)];\n };\n case \"getEtherPrice\":\n return function(configs) {\n return median(configs.map(function(c4) {\n return c4.result;\n }));\n };\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n case \"getStorageAt\":\n case \"call\":\n case \"estimateGas\":\n case \"getLogs\":\n break;\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n normalize2 = function(tx) {\n if (tx == null) {\n return null;\n }\n tx = (0, properties_1.shallowCopy)(tx);\n tx.confirmations = -1;\n return serialize(tx);\n };\n break;\n case \"getBlock\":\n if (params.includeTransactions) {\n normalize2 = function(block) {\n if (block == null) {\n return null;\n }\n block = (0, properties_1.shallowCopy)(block);\n block.transactions = block.transactions.map(function(tx) {\n tx = (0, properties_1.shallowCopy)(tx);\n tx.confirmations = -1;\n return tx;\n });\n return serialize(block);\n };\n } else {\n normalize2 = function(block) {\n if (block == null) {\n return null;\n }\n return serialize(block);\n };\n }\n break;\n default:\n throw new Error(\"unknown method: \" + method);\n }\n return normalizedTally(normalize2, provider.quorum);\n }\n function waitForSync(config2, blockNumber) {\n return __awaiter4(this, void 0, void 0, function() {\n var provider;\n return __generator4(this, function(_a) {\n provider = config2.provider;\n if (provider.blockNumber != null && provider.blockNumber >= blockNumber || blockNumber === -1) {\n return [2, provider];\n }\n return [2, (0, web_1.poll)(function() {\n return new Promise(function(resolve, reject) {\n setTimeout(function() {\n if (provider.blockNumber >= blockNumber) {\n return resolve(provider);\n }\n if (config2.cancelled) {\n return resolve(null);\n }\n return resolve(void 0);\n }, 0);\n });\n }, { oncePoll: provider })];\n });\n });\n }\n function getRunner(config2, currentBlockNumber, method, params) {\n return __awaiter4(this, void 0, void 0, function() {\n var provider, _a, filter;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n provider = config2.provider;\n _a = method;\n switch (_a) {\n case \"getBlockNumber\":\n return [3, 1];\n case \"getGasPrice\":\n return [3, 1];\n case \"getEtherPrice\":\n return [3, 2];\n case \"getBalance\":\n return [3, 3];\n case \"getTransactionCount\":\n return [3, 3];\n case \"getCode\":\n return [3, 3];\n case \"getStorageAt\":\n return [3, 6];\n case \"getBlock\":\n return [3, 9];\n case \"call\":\n return [3, 12];\n case \"estimateGas\":\n return [3, 12];\n case \"getTransaction\":\n return [3, 15];\n case \"getTransactionReceipt\":\n return [3, 15];\n case \"getLogs\":\n return [3, 16];\n }\n return [3, 19];\n case 1:\n return [2, provider[method]()];\n case 2:\n if (provider.getEtherPrice) {\n return [2, provider.getEtherPrice()];\n }\n return [3, 19];\n case 3:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 5];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 4:\n provider = _b.sent();\n _b.label = 5;\n case 5:\n return [2, provider[method](params.address, params.blockTag || \"latest\")];\n case 6:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 8];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 7:\n provider = _b.sent();\n _b.label = 8;\n case 8:\n return [2, provider.getStorageAt(params.address, params.position, params.blockTag || \"latest\")];\n case 9:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 11];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 10:\n provider = _b.sent();\n _b.label = 11;\n case 11:\n return [2, provider[params.includeTransactions ? \"getBlockWithTransactions\" : \"getBlock\"](params.blockTag || params.blockHash)];\n case 12:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 14];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 13:\n provider = _b.sent();\n _b.label = 14;\n case 14:\n if (method === \"call\" && params.blockTag) {\n return [2, provider[method](params.transaction, params.blockTag)];\n }\n return [2, provider[method](params.transaction)];\n case 15:\n return [2, provider[method](params.transactionHash)];\n case 16:\n filter = params.filter;\n if (!(filter.fromBlock && (0, bytes_1.isHexString)(filter.fromBlock) || filter.toBlock && (0, bytes_1.isHexString)(filter.toBlock)))\n return [3, 18];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 17:\n provider = _b.sent();\n _b.label = 18;\n case 18:\n return [2, provider.getLogs(filter)];\n case 19:\n return [2, logger.throwError(\"unknown method error\", logger_1.Logger.errors.UNKNOWN_ERROR, {\n method,\n params\n })];\n }\n });\n });\n }\n var FallbackProvider = (\n /** @class */\n function(_super) {\n __extends4(FallbackProvider2, _super);\n function FallbackProvider2(providers, quorum) {\n var _this = this;\n if (providers.length === 0) {\n logger.throwArgumentError(\"missing providers\", \"providers\", providers);\n }\n var providerConfigs = providers.map(function(configOrProvider, index2) {\n if (abstract_provider_1.Provider.isProvider(configOrProvider)) {\n var stallTimeout = (0, formatter_1.isCommunityResource)(configOrProvider) ? 2e3 : 750;\n var priority = 1;\n return Object.freeze({ provider: configOrProvider, weight: 1, stallTimeout, priority });\n }\n var config2 = (0, properties_1.shallowCopy)(configOrProvider);\n if (config2.priority == null) {\n config2.priority = 1;\n }\n if (config2.stallTimeout == null) {\n config2.stallTimeout = (0, formatter_1.isCommunityResource)(configOrProvider) ? 2e3 : 750;\n }\n if (config2.weight == null) {\n config2.weight = 1;\n }\n var weight = config2.weight;\n if (weight % 1 || weight > 512 || weight < 1) {\n logger.throwArgumentError(\"invalid weight; must be integer in [1, 512]\", \"providers[\" + index2 + \"].weight\", weight);\n }\n return Object.freeze(config2);\n });\n var total = providerConfigs.reduce(function(accum, c4) {\n return accum + c4.weight;\n }, 0);\n if (quorum == null) {\n quorum = total / 2;\n } else if (quorum > total) {\n logger.throwArgumentError(\"quorum will always fail; larger than total weight\", \"quorum\", quorum);\n }\n var networkOrReady = checkNetworks(providerConfigs.map(function(c4) {\n return c4.provider.network;\n }));\n if (networkOrReady == null) {\n networkOrReady = new Promise(function(resolve, reject) {\n setTimeout(function() {\n _this.detectNetwork().then(resolve, reject);\n }, 0);\n });\n }\n _this = _super.call(this, networkOrReady) || this;\n (0, properties_1.defineReadOnly)(_this, \"providerConfigs\", Object.freeze(providerConfigs));\n (0, properties_1.defineReadOnly)(_this, \"quorum\", quorum);\n _this._highestBlockNumber = -1;\n return _this;\n }\n FallbackProvider2.prototype.detectNetwork = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var networks;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, Promise.all(this.providerConfigs.map(function(c4) {\n return c4.provider.getNetwork();\n }))];\n case 1:\n networks = _a.sent();\n return [2, checkNetworks(networks)];\n }\n });\n });\n };\n FallbackProvider2.prototype.perform = function(method, params) {\n return __awaiter4(this, void 0, void 0, function() {\n var results, i_1, result, processFunc, configs, currentBlockNumber, i3, first, _loop_1, this_1, state_1;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(method === \"sendTransaction\"))\n return [3, 2];\n return [4, Promise.all(this.providerConfigs.map(function(c4) {\n return c4.provider.sendTransaction(params.signedTransaction).then(function(result2) {\n return result2.hash;\n }, function(error) {\n return error;\n });\n }))];\n case 1:\n results = _a.sent();\n for (i_1 = 0; i_1 < results.length; i_1++) {\n result = results[i_1];\n if (typeof result === \"string\") {\n return [2, result];\n }\n }\n throw results[0];\n case 2:\n if (!(this._highestBlockNumber === -1 && method !== \"getBlockNumber\"))\n return [3, 4];\n return [4, this.getBlockNumber()];\n case 3:\n _a.sent();\n _a.label = 4;\n case 4:\n processFunc = getProcessFunc(this, method, params);\n configs = (0, random_1.shuffled)(this.providerConfigs.map(properties_1.shallowCopy));\n configs.sort(function(a3, b4) {\n return a3.priority - b4.priority;\n });\n currentBlockNumber = this._highestBlockNumber;\n i3 = 0;\n first = true;\n _loop_1 = function() {\n var t0, inflightWeight, _loop_2, waiting, results2, result2, errors;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n t0 = now();\n inflightWeight = configs.filter(function(c4) {\n return c4.runner && t0 - c4.start < c4.stallTimeout;\n }).reduce(function(accum, c4) {\n return accum + c4.weight;\n }, 0);\n _loop_2 = function() {\n var config2 = configs[i3++];\n var rid = nextRid++;\n config2.start = now();\n config2.staller = stall(config2.stallTimeout);\n config2.staller.wait(function() {\n config2.staller = null;\n });\n config2.runner = getRunner(config2, currentBlockNumber, method, params).then(function(result3) {\n config2.done = true;\n config2.result = result3;\n if (_this.listenerCount(\"debug\")) {\n _this.emit(\"debug\", {\n action: \"request\",\n rid,\n backend: exposeDebugConfig(config2, now()),\n request: { method, params: (0, properties_1.deepCopy)(params) },\n provider: _this\n });\n }\n }, function(error) {\n config2.done = true;\n config2.error = error;\n if (_this.listenerCount(\"debug\")) {\n _this.emit(\"debug\", {\n action: \"request\",\n rid,\n backend: exposeDebugConfig(config2, now()),\n request: { method, params: (0, properties_1.deepCopy)(params) },\n provider: _this\n });\n }\n });\n if (this_1.listenerCount(\"debug\")) {\n this_1.emit(\"debug\", {\n action: \"request\",\n rid,\n backend: exposeDebugConfig(config2, null),\n request: { method, params: (0, properties_1.deepCopy)(params) },\n provider: this_1\n });\n }\n inflightWeight += config2.weight;\n };\n while (inflightWeight < this_1.quorum && i3 < configs.length) {\n _loop_2();\n }\n waiting = [];\n configs.forEach(function(c4) {\n if (c4.done || !c4.runner) {\n return;\n }\n waiting.push(c4.runner);\n if (c4.staller) {\n waiting.push(c4.staller.getPromise());\n }\n });\n if (!waiting.length)\n return [3, 2];\n return [4, Promise.race(waiting)];\n case 1:\n _b.sent();\n _b.label = 2;\n case 2:\n results2 = configs.filter(function(c4) {\n return c4.done && c4.error == null;\n });\n if (!(results2.length >= this_1.quorum))\n return [3, 5];\n result2 = processFunc(results2);\n if (result2 !== void 0) {\n configs.forEach(function(c4) {\n if (c4.staller) {\n c4.staller.cancel();\n }\n c4.cancelled = true;\n });\n return [2, { value: result2 }];\n }\n if (!!first)\n return [3, 4];\n return [4, stall(100).getPromise()];\n case 3:\n _b.sent();\n _b.label = 4;\n case 4:\n first = false;\n _b.label = 5;\n case 5:\n errors = configs.reduce(function(accum, c4) {\n if (!c4.done || c4.error == null) {\n return accum;\n }\n var code = c4.error.code;\n if (ForwardErrors.indexOf(code) >= 0) {\n if (!accum[code]) {\n accum[code] = { error: c4.error, weight: 0 };\n }\n accum[code].weight += c4.weight;\n }\n return accum;\n }, {});\n Object.keys(errors).forEach(function(errorCode) {\n var tally = errors[errorCode];\n if (tally.weight < _this.quorum) {\n return;\n }\n configs.forEach(function(c4) {\n if (c4.staller) {\n c4.staller.cancel();\n }\n c4.cancelled = true;\n });\n var e2 = tally.error;\n var props = {};\n ForwardProperties.forEach(function(name) {\n if (e2[name] == null) {\n return;\n }\n props[name] = e2[name];\n });\n logger.throwError(e2.reason || e2.message, errorCode, props);\n });\n if (configs.filter(function(c4) {\n return !c4.done;\n }).length === 0) {\n return [2, \"break\"];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n };\n this_1 = this;\n _a.label = 5;\n case 5:\n if (false)\n return [3, 7];\n return [5, _loop_1()];\n case 6:\n state_1 = _a.sent();\n if (typeof state_1 === \"object\")\n return [2, state_1.value];\n if (state_1 === \"break\")\n return [3, 7];\n return [3, 5];\n case 7:\n configs.forEach(function(c4) {\n if (c4.staller) {\n c4.staller.cancel();\n }\n c4.cancelled = true;\n });\n return [2, logger.throwError(\"failed to meet quorum\", logger_1.Logger.errors.SERVER_ERROR, {\n method,\n params,\n //results: configs.map((c) => c.result),\n //errors: configs.map((c) => c.error),\n results: configs.map(function(c4) {\n return exposeDebugConfig(c4);\n }),\n provider: this\n })];\n }\n });\n });\n };\n return FallbackProvider2;\n }(base_provider_1.BaseProvider)\n );\n exports3.FallbackProvider = FallbackProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js\n var require_browser_ipc_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.IpcProvider = void 0;\n var IpcProvider = null;\n exports3.IpcProvider = IpcProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/infura-provider.js\n var require_infura_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/infura-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.InfuraProvider = exports3.InfuraWebSocketProvider = void 0;\n var properties_1 = require_lib4();\n var websocket_provider_1 = require_websocket_provider();\n var formatter_1 = require_formatter();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var defaultProjectId = \"84842078b09946638c03157f83405213\";\n var InfuraWebSocketProvider = (\n /** @class */\n function(_super) {\n __extends4(InfuraWebSocketProvider2, _super);\n function InfuraWebSocketProvider2(network, apiKey) {\n var _this = this;\n var provider = new InfuraProvider(network, apiKey);\n var connection = provider.connection;\n if (connection.password) {\n logger.throwError(\"INFURA WebSocket project secrets unsupported\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"InfuraProvider.getWebSocketProvider()\"\n });\n }\n var url = connection.url.replace(/^http/i, \"ws\").replace(\"/v3/\", \"/ws/v3/\");\n _this = _super.call(this, url, network) || this;\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", provider.projectId);\n (0, properties_1.defineReadOnly)(_this, \"projectId\", provider.projectId);\n (0, properties_1.defineReadOnly)(_this, \"projectSecret\", provider.projectSecret);\n return _this;\n }\n InfuraWebSocketProvider2.prototype.isCommunityResource = function() {\n return this.projectId === defaultProjectId;\n };\n return InfuraWebSocketProvider2;\n }(websocket_provider_1.WebSocketProvider)\n );\n exports3.InfuraWebSocketProvider = InfuraWebSocketProvider;\n var InfuraProvider = (\n /** @class */\n function(_super) {\n __extends4(InfuraProvider2, _super);\n function InfuraProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n InfuraProvider2.getWebSocketProvider = function(network, apiKey) {\n return new InfuraWebSocketProvider(network, apiKey);\n };\n InfuraProvider2.getApiKey = function(apiKey) {\n var apiKeyObj = {\n apiKey: defaultProjectId,\n projectId: defaultProjectId,\n projectSecret: null\n };\n if (apiKey == null) {\n return apiKeyObj;\n }\n if (typeof apiKey === \"string\") {\n apiKeyObj.projectId = apiKey;\n } else if (apiKey.projectSecret != null) {\n logger.assertArgument(typeof apiKey.projectId === \"string\", \"projectSecret requires a projectId\", \"projectId\", apiKey.projectId);\n logger.assertArgument(typeof apiKey.projectSecret === \"string\", \"invalid projectSecret\", \"projectSecret\", \"[REDACTED]\");\n apiKeyObj.projectId = apiKey.projectId;\n apiKeyObj.projectSecret = apiKey.projectSecret;\n } else if (apiKey.projectId) {\n apiKeyObj.projectId = apiKey.projectId;\n }\n apiKeyObj.apiKey = apiKeyObj.projectId;\n return apiKeyObj;\n };\n InfuraProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network ? network.name : \"unknown\") {\n case \"homestead\":\n host = \"mainnet.infura.io\";\n break;\n case \"goerli\":\n host = \"goerli.infura.io\";\n break;\n case \"sepolia\":\n host = \"sepolia.infura.io\";\n break;\n case \"matic\":\n host = \"polygon-mainnet.infura.io\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai.infura.io\";\n break;\n case \"optimism\":\n host = \"optimism-mainnet.infura.io\";\n break;\n case \"optimism-goerli\":\n host = \"optimism-goerli.infura.io\";\n break;\n case \"optimism-sepolia\":\n host = \"optimism-sepolia.infura.io\";\n break;\n case \"arbitrum\":\n host = \"arbitrum-mainnet.infura.io\";\n break;\n case \"arbitrum-goerli\":\n host = \"arbitrum-goerli.infura.io\";\n break;\n case \"arbitrum-sepolia\":\n host = \"arbitrum-sepolia.infura.io\";\n break;\n default:\n logger.throwError(\"unsupported network\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n var connection = {\n allowGzip: true,\n url: \"https://\" + host + \"/v3/\" + apiKey.projectId,\n throttleCallback: function(attempt, url) {\n if (apiKey.projectId === defaultProjectId) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n if (apiKey.projectSecret != null) {\n connection.user = \"\";\n connection.password = apiKey.projectSecret;\n }\n return connection;\n };\n InfuraProvider2.prototype.isCommunityResource = function() {\n return this.projectId === defaultProjectId;\n };\n return InfuraProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.InfuraProvider = InfuraProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js\n var require_json_rpc_batch_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.JsonRpcBatchProvider = void 0;\n var properties_1 = require_lib4();\n var web_1 = require_lib28();\n var json_rpc_provider_1 = require_json_rpc_provider();\n var JsonRpcBatchProvider = (\n /** @class */\n function(_super) {\n __extends4(JsonRpcBatchProvider2, _super);\n function JsonRpcBatchProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n JsonRpcBatchProvider2.prototype.send = function(method, params) {\n var _this = this;\n var request = {\n method,\n params,\n id: this._nextId++,\n jsonrpc: \"2.0\"\n };\n if (this._pendingBatch == null) {\n this._pendingBatch = [];\n }\n var inflightRequest = { request, resolve: null, reject: null };\n var promise = new Promise(function(resolve, reject) {\n inflightRequest.resolve = resolve;\n inflightRequest.reject = reject;\n });\n this._pendingBatch.push(inflightRequest);\n if (!this._pendingBatchAggregator) {\n this._pendingBatchAggregator = setTimeout(function() {\n var batch = _this._pendingBatch;\n _this._pendingBatch = null;\n _this._pendingBatchAggregator = null;\n var request2 = batch.map(function(inflight) {\n return inflight.request;\n });\n _this.emit(\"debug\", {\n action: \"requestBatch\",\n request: (0, properties_1.deepCopy)(request2),\n provider: _this\n });\n return (0, web_1.fetchJson)(_this.connection, JSON.stringify(request2)).then(function(result) {\n _this.emit(\"debug\", {\n action: \"response\",\n request: request2,\n response: result,\n provider: _this\n });\n batch.forEach(function(inflightRequest2, index2) {\n var payload = result[index2];\n if (payload.error) {\n var error = new Error(payload.error.message);\n error.code = payload.error.code;\n error.data = payload.error.data;\n inflightRequest2.reject(error);\n } else {\n inflightRequest2.resolve(payload.result);\n }\n });\n }, function(error) {\n _this.emit(\"debug\", {\n action: \"response\",\n error,\n request: request2,\n provider: _this\n });\n batch.forEach(function(inflightRequest2) {\n inflightRequest2.reject(error);\n });\n });\n }, 10);\n }\n return promise;\n };\n return JsonRpcBatchProvider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.JsonRpcBatchProvider = JsonRpcBatchProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/nodesmith-provider.js\n var require_nodesmith_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/nodesmith-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NodesmithProvider = void 0;\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var defaultApiKey = \"ETHERS_JS_SHARED\";\n var NodesmithProvider = (\n /** @class */\n function(_super) {\n __extends4(NodesmithProvider2, _super);\n function NodesmithProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NodesmithProvider2.getApiKey = function(apiKey) {\n if (apiKey && typeof apiKey !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey || defaultApiKey;\n };\n NodesmithProvider2.getUrl = function(network, apiKey) {\n logger.warn(\"NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.\");\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc\";\n break;\n case \"ropsten\":\n host = \"https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc\";\n break;\n case \"rinkeby\":\n host = \"https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc\";\n break;\n case \"goerli\":\n host = \"https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc\";\n break;\n case \"kovan\":\n host = \"https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return host + \"?apiKey=\" + apiKey;\n };\n return NodesmithProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.NodesmithProvider = NodesmithProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/pocket-provider.js\n var require_pocket_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/pocket-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PocketProvider = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var defaultApplicationId = \"62e1ad51b37b8e00394bda3b\";\n var PocketProvider = (\n /** @class */\n function(_super) {\n __extends4(PocketProvider2, _super);\n function PocketProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PocketProvider2.getApiKey = function(apiKey) {\n var apiKeyObj = {\n applicationId: null,\n loadBalancer: true,\n applicationSecretKey: null\n };\n if (apiKey == null) {\n apiKeyObj.applicationId = defaultApplicationId;\n } else if (typeof apiKey === \"string\") {\n apiKeyObj.applicationId = apiKey;\n } else if (apiKey.applicationSecretKey != null) {\n apiKeyObj.applicationId = apiKey.applicationId;\n apiKeyObj.applicationSecretKey = apiKey.applicationSecretKey;\n } else if (apiKey.applicationId) {\n apiKeyObj.applicationId = apiKey.applicationId;\n } else {\n logger.throwArgumentError(\"unsupported PocketProvider apiKey\", \"apiKey\", apiKey);\n }\n return apiKeyObj;\n };\n PocketProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network ? network.name : \"unknown\") {\n case \"goerli\":\n host = \"eth-goerli.gateway.pokt.network\";\n break;\n case \"homestead\":\n host = \"eth-mainnet.gateway.pokt.network\";\n break;\n case \"kovan\":\n host = \"poa-kovan.gateway.pokt.network\";\n break;\n case \"matic\":\n host = \"poly-mainnet.gateway.pokt.network\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai-rpc.gateway.pokt.network\";\n break;\n case \"rinkeby\":\n host = \"eth-rinkeby.gateway.pokt.network\";\n break;\n case \"ropsten\":\n host = \"eth-ropsten.gateway.pokt.network\";\n break;\n default:\n logger.throwError(\"unsupported network\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n var url = \"https://\" + host + \"/v1/lb/\" + apiKey.applicationId;\n var connection = { headers: {}, url };\n if (apiKey.applicationSecretKey != null) {\n connection.user = \"\";\n connection.password = apiKey.applicationSecretKey;\n }\n return connection;\n };\n PocketProvider2.prototype.isCommunityResource = function() {\n return this.applicationId === defaultApplicationId;\n };\n return PocketProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.PocketProvider = PocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/quicknode-provider.js\n var require_quicknode_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/quicknode-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.QuickNodeProvider = void 0;\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var defaultApiKey = \"919b412a057b5e9c9b6dce193c5a60242d6efadb\";\n var QuickNodeProvider = (\n /** @class */\n function(_super) {\n __extends4(QuickNodeProvider2, _super);\n function QuickNodeProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n QuickNodeProvider2.getApiKey = function(apiKey) {\n if (apiKey && typeof apiKey !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey || defaultApiKey;\n };\n QuickNodeProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"ethers.quiknode.pro\";\n break;\n case \"goerli\":\n host = \"ethers.ethereum-goerli.quiknode.pro\";\n break;\n case \"sepolia\":\n host = \"ethers.ethereum-sepolia.quiknode.pro\";\n break;\n case \"holesky\":\n host = \"ethers.ethereum-holesky.quiknode.pro\";\n break;\n case \"arbitrum\":\n host = \"ethers.arbitrum-mainnet.quiknode.pro\";\n break;\n case \"arbitrum-goerli\":\n host = \"ethers.arbitrum-goerli.quiknode.pro\";\n break;\n case \"arbitrum-sepolia\":\n host = \"ethers.arbitrum-sepolia.quiknode.pro\";\n break;\n case \"base\":\n host = \"ethers.base-mainnet.quiknode.pro\";\n break;\n case \"base-goerli\":\n host = \"ethers.base-goerli.quiknode.pro\";\n break;\n case \"base-spolia\":\n host = \"ethers.base-sepolia.quiknode.pro\";\n break;\n case \"bnb\":\n host = \"ethers.bsc.quiknode.pro\";\n break;\n case \"bnbt\":\n host = \"ethers.bsc-testnet.quiknode.pro\";\n break;\n case \"matic\":\n host = \"ethers.matic.quiknode.pro\";\n break;\n case \"maticmum\":\n host = \"ethers.matic-testnet.quiknode.pro\";\n break;\n case \"optimism\":\n host = \"ethers.optimism.quiknode.pro\";\n break;\n case \"optimism-goerli\":\n host = \"ethers.optimism-goerli.quiknode.pro\";\n break;\n case \"optimism-sepolia\":\n host = \"ethers.optimism-sepolia.quiknode.pro\";\n break;\n case \"xdai\":\n host = \"ethers.xdai.quiknode.pro\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return \"https://\" + host + \"/\" + apiKey;\n };\n return QuickNodeProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.QuickNodeProvider = QuickNodeProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/web3-provider.js\n var require_web3_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/web3-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Web3Provider = void 0;\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var json_rpc_provider_1 = require_json_rpc_provider();\n var _nextId = 1;\n function buildWeb3LegacyFetcher(provider, sendFunc) {\n var fetcher = \"Web3LegacyFetcher\";\n return function(method, params) {\n var _this = this;\n var request = {\n method,\n params,\n id: _nextId++,\n jsonrpc: \"2.0\"\n };\n return new Promise(function(resolve, reject) {\n _this.emit(\"debug\", {\n action: \"request\",\n fetcher,\n request: (0, properties_1.deepCopy)(request),\n provider: _this\n });\n sendFunc(request, function(error, response) {\n if (error) {\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher,\n error,\n request,\n provider: _this\n });\n return reject(error);\n }\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher,\n request,\n response,\n provider: _this\n });\n if (response.error) {\n var error_1 = new Error(response.error.message);\n error_1.code = response.error.code;\n error_1.data = response.error.data;\n return reject(error_1);\n }\n resolve(response.result);\n });\n });\n };\n }\n function buildEip1193Fetcher(provider) {\n return function(method, params) {\n var _this = this;\n if (params == null) {\n params = [];\n }\n var request = { method, params };\n this.emit(\"debug\", {\n action: \"request\",\n fetcher: \"Eip1193Fetcher\",\n request: (0, properties_1.deepCopy)(request),\n provider: this\n });\n return provider.request(request).then(function(response) {\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher: \"Eip1193Fetcher\",\n request,\n response,\n provider: _this\n });\n return response;\n }, function(error) {\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher: \"Eip1193Fetcher\",\n request,\n error,\n provider: _this\n });\n throw error;\n });\n };\n }\n var Web3Provider = (\n /** @class */\n function(_super) {\n __extends4(Web3Provider2, _super);\n function Web3Provider2(provider, network) {\n var _this = this;\n if (provider == null) {\n logger.throwArgumentError(\"missing provider\", \"provider\", provider);\n }\n var path = null;\n var jsonRpcFetchFunc = null;\n var subprovider = null;\n if (typeof provider === \"function\") {\n path = \"unknown:\";\n jsonRpcFetchFunc = provider;\n } else {\n path = provider.host || provider.path || \"\";\n if (!path && provider.isMetaMask) {\n path = \"metamask\";\n }\n subprovider = provider;\n if (provider.request) {\n if (path === \"\") {\n path = \"eip-1193:\";\n }\n jsonRpcFetchFunc = buildEip1193Fetcher(provider);\n } else if (provider.sendAsync) {\n jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.sendAsync.bind(provider));\n } else if (provider.send) {\n jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider));\n } else {\n logger.throwArgumentError(\"unsupported provider\", \"provider\", provider);\n }\n if (!path) {\n path = \"unknown:\";\n }\n }\n _this = _super.call(this, path, network) || this;\n (0, properties_1.defineReadOnly)(_this, \"jsonRpcFetchFunc\", jsonRpcFetchFunc);\n (0, properties_1.defineReadOnly)(_this, \"provider\", subprovider);\n return _this;\n }\n Web3Provider2.prototype.send = function(method, params) {\n return this.jsonRpcFetchFunc(method, params);\n };\n return Web3Provider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.Web3Provider = Web3Provider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/index.js\n var require_lib29 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Formatter = exports3.showThrottleMessage = exports3.isCommunityResourcable = exports3.isCommunityResource = exports3.getNetwork = exports3.getDefaultProvider = exports3.JsonRpcSigner = exports3.IpcProvider = exports3.WebSocketProvider = exports3.Web3Provider = exports3.StaticJsonRpcProvider = exports3.QuickNodeProvider = exports3.PocketProvider = exports3.NodesmithProvider = exports3.JsonRpcBatchProvider = exports3.JsonRpcProvider = exports3.InfuraWebSocketProvider = exports3.InfuraProvider = exports3.EtherscanProvider = exports3.CloudflareProvider = exports3.AnkrProvider = exports3.AlchemyWebSocketProvider = exports3.AlchemyProvider = exports3.FallbackProvider = exports3.UrlJsonRpcProvider = exports3.Resolver = exports3.BaseProvider = exports3.Provider = void 0;\n var abstract_provider_1 = require_lib14();\n Object.defineProperty(exports3, \"Provider\", { enumerable: true, get: function() {\n return abstract_provider_1.Provider;\n } });\n var networks_1 = require_lib27();\n Object.defineProperty(exports3, \"getNetwork\", { enumerable: true, get: function() {\n return networks_1.getNetwork;\n } });\n var base_provider_1 = require_base_provider();\n Object.defineProperty(exports3, \"BaseProvider\", { enumerable: true, get: function() {\n return base_provider_1.BaseProvider;\n } });\n Object.defineProperty(exports3, \"Resolver\", { enumerable: true, get: function() {\n return base_provider_1.Resolver;\n } });\n var alchemy_provider_1 = require_alchemy_provider();\n Object.defineProperty(exports3, \"AlchemyProvider\", { enumerable: true, get: function() {\n return alchemy_provider_1.AlchemyProvider;\n } });\n Object.defineProperty(exports3, \"AlchemyWebSocketProvider\", { enumerable: true, get: function() {\n return alchemy_provider_1.AlchemyWebSocketProvider;\n } });\n var ankr_provider_1 = require_ankr_provider();\n Object.defineProperty(exports3, \"AnkrProvider\", { enumerable: true, get: function() {\n return ankr_provider_1.AnkrProvider;\n } });\n var cloudflare_provider_1 = require_cloudflare_provider();\n Object.defineProperty(exports3, \"CloudflareProvider\", { enumerable: true, get: function() {\n return cloudflare_provider_1.CloudflareProvider;\n } });\n var etherscan_provider_1 = require_etherscan_provider();\n Object.defineProperty(exports3, \"EtherscanProvider\", { enumerable: true, get: function() {\n return etherscan_provider_1.EtherscanProvider;\n } });\n var fallback_provider_1 = require_fallback_provider();\n Object.defineProperty(exports3, \"FallbackProvider\", { enumerable: true, get: function() {\n return fallback_provider_1.FallbackProvider;\n } });\n var ipc_provider_1 = require_browser_ipc_provider();\n Object.defineProperty(exports3, \"IpcProvider\", { enumerable: true, get: function() {\n return ipc_provider_1.IpcProvider;\n } });\n var infura_provider_1 = require_infura_provider();\n Object.defineProperty(exports3, \"InfuraProvider\", { enumerable: true, get: function() {\n return infura_provider_1.InfuraProvider;\n } });\n Object.defineProperty(exports3, \"InfuraWebSocketProvider\", { enumerable: true, get: function() {\n return infura_provider_1.InfuraWebSocketProvider;\n } });\n var json_rpc_provider_1 = require_json_rpc_provider();\n Object.defineProperty(exports3, \"JsonRpcProvider\", { enumerable: true, get: function() {\n return json_rpc_provider_1.JsonRpcProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcSigner\", { enumerable: true, get: function() {\n return json_rpc_provider_1.JsonRpcSigner;\n } });\n var json_rpc_batch_provider_1 = require_json_rpc_batch_provider();\n Object.defineProperty(exports3, \"JsonRpcBatchProvider\", { enumerable: true, get: function() {\n return json_rpc_batch_provider_1.JsonRpcBatchProvider;\n } });\n var nodesmith_provider_1 = require_nodesmith_provider();\n Object.defineProperty(exports3, \"NodesmithProvider\", { enumerable: true, get: function() {\n return nodesmith_provider_1.NodesmithProvider;\n } });\n var pocket_provider_1 = require_pocket_provider();\n Object.defineProperty(exports3, \"PocketProvider\", { enumerable: true, get: function() {\n return pocket_provider_1.PocketProvider;\n } });\n var quicknode_provider_1 = require_quicknode_provider();\n Object.defineProperty(exports3, \"QuickNodeProvider\", { enumerable: true, get: function() {\n return quicknode_provider_1.QuickNodeProvider;\n } });\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n Object.defineProperty(exports3, \"StaticJsonRpcProvider\", { enumerable: true, get: function() {\n return url_json_rpc_provider_1.StaticJsonRpcProvider;\n } });\n Object.defineProperty(exports3, \"UrlJsonRpcProvider\", { enumerable: true, get: function() {\n return url_json_rpc_provider_1.UrlJsonRpcProvider;\n } });\n var web3_provider_1 = require_web3_provider();\n Object.defineProperty(exports3, \"Web3Provider\", { enumerable: true, get: function() {\n return web3_provider_1.Web3Provider;\n } });\n var websocket_provider_1 = require_websocket_provider();\n Object.defineProperty(exports3, \"WebSocketProvider\", { enumerable: true, get: function() {\n return websocket_provider_1.WebSocketProvider;\n } });\n var formatter_1 = require_formatter();\n Object.defineProperty(exports3, \"Formatter\", { enumerable: true, get: function() {\n return formatter_1.Formatter;\n } });\n Object.defineProperty(exports3, \"isCommunityResourcable\", { enumerable: true, get: function() {\n return formatter_1.isCommunityResourcable;\n } });\n Object.defineProperty(exports3, \"isCommunityResource\", { enumerable: true, get: function() {\n return formatter_1.isCommunityResource;\n } });\n Object.defineProperty(exports3, \"showThrottleMessage\", { enumerable: true, get: function() {\n return formatter_1.showThrottleMessage;\n } });\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n function getDefaultProvider(network, options) {\n if (network == null) {\n network = \"homestead\";\n }\n if (typeof network === \"string\") {\n var match = network.match(/^(ws|http)s?:/i);\n if (match) {\n switch (match[1].toLowerCase()) {\n case \"http\":\n case \"https\":\n return new json_rpc_provider_1.JsonRpcProvider(network);\n case \"ws\":\n case \"wss\":\n return new websocket_provider_1.WebSocketProvider(network);\n default:\n logger.throwArgumentError(\"unsupported URL scheme\", \"network\", network);\n }\n }\n }\n var n2 = (0, networks_1.getNetwork)(network);\n if (!n2 || !n2._defaultProvider) {\n logger.throwError(\"unsupported getDefaultProvider network\", logger_1.Logger.errors.NETWORK_ERROR, {\n operation: \"getDefaultProvider\",\n network\n });\n }\n return n2._defaultProvider({\n FallbackProvider: fallback_provider_1.FallbackProvider,\n AlchemyProvider: alchemy_provider_1.AlchemyProvider,\n AnkrProvider: ankr_provider_1.AnkrProvider,\n CloudflareProvider: cloudflare_provider_1.CloudflareProvider,\n EtherscanProvider: etherscan_provider_1.EtherscanProvider,\n InfuraProvider: infura_provider_1.InfuraProvider,\n JsonRpcProvider: json_rpc_provider_1.JsonRpcProvider,\n NodesmithProvider: nodesmith_provider_1.NodesmithProvider,\n PocketProvider: pocket_provider_1.PocketProvider,\n QuickNodeProvider: quicknode_provider_1.QuickNodeProvider,\n Web3Provider: web3_provider_1.Web3Provider,\n IpcProvider: ipc_provider_1.IpcProvider\n }, options);\n }\n exports3.getDefaultProvider = getDefaultProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+solidity@5.8.0/node_modules/@ethersproject/solidity/lib/_version.js\n var require_version24 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+solidity@5.8.0/node_modules/@ethersproject/solidity/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"solidity/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+solidity@5.8.0/node_modules/@ethersproject/solidity/lib/index.js\n var require_lib30 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+solidity@5.8.0/node_modules/@ethersproject/solidity/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha256 = exports3.keccak256 = exports3.pack = void 0;\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var keccak256_1 = require_lib5();\n var sha2_1 = require_lib20();\n var strings_1 = require_lib9();\n var regexBytes = new RegExp(\"^bytes([0-9]+)$\");\n var regexNumber = new RegExp(\"^(u?int)([0-9]*)$\");\n var regexArray = new RegExp(\"^(.*)\\\\[([0-9]*)\\\\]$\");\n var Zeros = \"0000000000000000000000000000000000000000000000000000000000000000\";\n var logger_1 = require_lib();\n var _version_1 = require_version24();\n var logger = new logger_1.Logger(_version_1.version);\n function _pack(type, value, isArray) {\n switch (type) {\n case \"address\":\n if (isArray) {\n return (0, bytes_1.zeroPad)(value, 32);\n }\n return (0, bytes_1.arrayify)(value);\n case \"string\":\n return (0, strings_1.toUtf8Bytes)(value);\n case \"bytes\":\n return (0, bytes_1.arrayify)(value);\n case \"bool\":\n value = value ? \"0x01\" : \"0x00\";\n if (isArray) {\n return (0, bytes_1.zeroPad)(value, 32);\n }\n return (0, bytes_1.arrayify)(value);\n }\n var match = type.match(regexNumber);\n if (match) {\n var size6 = parseInt(match[2] || \"256\");\n if (match[2] && String(size6) !== match[2] || size6 % 8 !== 0 || size6 === 0 || size6 > 256) {\n logger.throwArgumentError(\"invalid number type\", \"type\", type);\n }\n if (isArray) {\n size6 = 256;\n }\n value = bignumber_1.BigNumber.from(value).toTwos(size6);\n return (0, bytes_1.zeroPad)(value, size6 / 8);\n }\n match = type.match(regexBytes);\n if (match) {\n var size6 = parseInt(match[1]);\n if (String(size6) !== match[1] || size6 === 0 || size6 > 32) {\n logger.throwArgumentError(\"invalid bytes type\", \"type\", type);\n }\n if ((0, bytes_1.arrayify)(value).byteLength !== size6) {\n logger.throwArgumentError(\"invalid value for \" + type, \"value\", value);\n }\n if (isArray) {\n return (0, bytes_1.arrayify)((value + Zeros).substring(0, 66));\n }\n return value;\n }\n match = type.match(regexArray);\n if (match && Array.isArray(value)) {\n var baseType_1 = match[1];\n var count = parseInt(match[2] || String(value.length));\n if (count != value.length) {\n logger.throwArgumentError(\"invalid array length for \" + type, \"value\", value);\n }\n var result_1 = [];\n value.forEach(function(value2) {\n result_1.push(_pack(baseType_1, value2, true));\n });\n return (0, bytes_1.concat)(result_1);\n }\n return logger.throwArgumentError(\"invalid type\", \"type\", type);\n }\n function pack(types, values) {\n if (types.length != values.length) {\n logger.throwArgumentError(\"wrong number of values; expected ${ types.length }\", \"values\", values);\n }\n var tight = [];\n types.forEach(function(type, index2) {\n tight.push(_pack(type, values[index2]));\n });\n return (0, bytes_1.hexlify)((0, bytes_1.concat)(tight));\n }\n exports3.pack = pack;\n function keccak2563(types, values) {\n return (0, keccak256_1.keccak256)(pack(types, values));\n }\n exports3.keccak256 = keccak2563;\n function sha2565(types, values) {\n return (0, sha2_1.sha256)(pack(types, values));\n }\n exports3.sha256 = sha2565;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+units@5.8.0/node_modules/@ethersproject/units/lib/_version.js\n var require_version25 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+units@5.8.0/node_modules/@ethersproject/units/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"units/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+units@5.8.0/node_modules/@ethersproject/units/lib/index.js\n var require_lib31 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+units@5.8.0/node_modules/@ethersproject/units/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.parseEther = exports3.formatEther = exports3.parseUnits = exports3.formatUnits = exports3.commify = void 0;\n var bignumber_1 = require_lib3();\n var logger_1 = require_lib();\n var _version_1 = require_version25();\n var logger = new logger_1.Logger(_version_1.version);\n var names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\"\n ];\n function commify(value) {\n var comps = String(value).split(\".\");\n if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || comps[1] && !comps[1].match(/^[0-9]*$/) || value === \".\" || value === \"-.\") {\n logger.throwArgumentError(\"invalid value\", \"value\", value);\n }\n var whole = comps[0];\n var negative = \"\";\n if (whole.substring(0, 1) === \"-\") {\n negative = \"-\";\n whole = whole.substring(1);\n }\n while (whole.substring(0, 1) === \"0\") {\n whole = whole.substring(1);\n }\n if (whole === \"\") {\n whole = \"0\";\n }\n var suffix = \"\";\n if (comps.length === 2) {\n suffix = \".\" + (comps[1] || \"0\");\n }\n while (suffix.length > 2 && suffix[suffix.length - 1] === \"0\") {\n suffix = suffix.substring(0, suffix.length - 1);\n }\n var formatted = [];\n while (whole.length) {\n if (whole.length <= 3) {\n formatted.unshift(whole);\n break;\n } else {\n var index2 = whole.length - 3;\n formatted.unshift(whole.substring(index2));\n whole = whole.substring(0, index2);\n }\n }\n return negative + formatted.join(\",\") + suffix;\n }\n exports3.commify = commify;\n function formatUnits2(value, unitName) {\n if (typeof unitName === \"string\") {\n var index2 = names.indexOf(unitName);\n if (index2 !== -1) {\n unitName = 3 * index2;\n }\n }\n return (0, bignumber_1.formatFixed)(value, unitName != null ? unitName : 18);\n }\n exports3.formatUnits = formatUnits2;\n function parseUnits(value, unitName) {\n if (typeof value !== \"string\") {\n logger.throwArgumentError(\"value must be a string\", \"value\", value);\n }\n if (typeof unitName === \"string\") {\n var index2 = names.indexOf(unitName);\n if (index2 !== -1) {\n unitName = 3 * index2;\n }\n }\n return (0, bignumber_1.parseFixed)(value, unitName != null ? unitName : 18);\n }\n exports3.parseUnits = parseUnits;\n function formatEther2(wei) {\n return formatUnits2(wei, 18);\n }\n exports3.formatEther = formatEther2;\n function parseEther(ether) {\n return parseUnits(ether, 18);\n }\n exports3.parseEther = parseEther;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/utils.js\n var require_utils6 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding4 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n Object.defineProperty(o5, k22, { enumerable: true, get: function() {\n return m2[k4];\n } });\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar4 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding4(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.formatBytes32String = exports3.Utf8ErrorFuncs = exports3.toUtf8String = exports3.toUtf8CodePoints = exports3.toUtf8Bytes = exports3._toEscapedUtf8String = exports3.nameprep = exports3.hexDataSlice = exports3.hexDataLength = exports3.hexZeroPad = exports3.hexValue = exports3.hexStripZeros = exports3.hexConcat = exports3.isHexString = exports3.hexlify = exports3.base64 = exports3.base58 = exports3.TransactionDescription = exports3.LogDescription = exports3.Interface = exports3.SigningKey = exports3.HDNode = exports3.defaultPath = exports3.isBytesLike = exports3.isBytes = exports3.zeroPad = exports3.stripZeros = exports3.concat = exports3.arrayify = exports3.shallowCopy = exports3.resolveProperties = exports3.getStatic = exports3.defineReadOnly = exports3.deepCopy = exports3.checkProperties = exports3.poll = exports3.fetchJson = exports3._fetchData = exports3.RLP = exports3.Logger = exports3.checkResultErrors = exports3.FormatTypes = exports3.ParamType = exports3.FunctionFragment = exports3.EventFragment = exports3.ErrorFragment = exports3.ConstructorFragment = exports3.Fragment = exports3.defaultAbiCoder = exports3.AbiCoder = void 0;\n exports3.Indexed = exports3.Utf8ErrorReason = exports3.UnicodeNormalizationForm = exports3.SupportedAlgorithm = exports3.mnemonicToSeed = exports3.isValidMnemonic = exports3.entropyToMnemonic = exports3.mnemonicToEntropy = exports3.getAccountPath = exports3.verifyTypedData = exports3.verifyMessage = exports3.recoverPublicKey = exports3.computePublicKey = exports3.recoverAddress = exports3.computeAddress = exports3.getJsonWalletAddress = exports3.TransactionTypes = exports3.serializeTransaction = exports3.parseTransaction = exports3.accessListify = exports3.joinSignature = exports3.splitSignature = exports3.soliditySha256 = exports3.solidityKeccak256 = exports3.solidityPack = exports3.shuffled = exports3.randomBytes = exports3.sha512 = exports3.sha256 = exports3.ripemd160 = exports3.keccak256 = exports3.computeHmac = exports3.commify = exports3.parseUnits = exports3.formatUnits = exports3.parseEther = exports3.formatEther = exports3.isAddress = exports3.getCreate2Address = exports3.getContractAddress = exports3.getIcapAddress = exports3.getAddress = exports3._TypedDataEncoder = exports3.id = exports3.isValidName = exports3.namehash = exports3.hashMessage = exports3.dnsEncode = exports3.parseBytes32String = void 0;\n var abi_1 = require_lib13();\n Object.defineProperty(exports3, \"AbiCoder\", { enumerable: true, get: function() {\n return abi_1.AbiCoder;\n } });\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return abi_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"ConstructorFragment\", { enumerable: true, get: function() {\n return abi_1.ConstructorFragment;\n } });\n Object.defineProperty(exports3, \"defaultAbiCoder\", { enumerable: true, get: function() {\n return abi_1.defaultAbiCoder;\n } });\n Object.defineProperty(exports3, \"ErrorFragment\", { enumerable: true, get: function() {\n return abi_1.ErrorFragment;\n } });\n Object.defineProperty(exports3, \"EventFragment\", { enumerable: true, get: function() {\n return abi_1.EventFragment;\n } });\n Object.defineProperty(exports3, \"FormatTypes\", { enumerable: true, get: function() {\n return abi_1.FormatTypes;\n } });\n Object.defineProperty(exports3, \"Fragment\", { enumerable: true, get: function() {\n return abi_1.Fragment;\n } });\n Object.defineProperty(exports3, \"FunctionFragment\", { enumerable: true, get: function() {\n return abi_1.FunctionFragment;\n } });\n Object.defineProperty(exports3, \"Indexed\", { enumerable: true, get: function() {\n return abi_1.Indexed;\n } });\n Object.defineProperty(exports3, \"Interface\", { enumerable: true, get: function() {\n return abi_1.Interface;\n } });\n Object.defineProperty(exports3, \"LogDescription\", { enumerable: true, get: function() {\n return abi_1.LogDescription;\n } });\n Object.defineProperty(exports3, \"ParamType\", { enumerable: true, get: function() {\n return abi_1.ParamType;\n } });\n Object.defineProperty(exports3, \"TransactionDescription\", { enumerable: true, get: function() {\n return abi_1.TransactionDescription;\n } });\n var address_1 = require_lib7();\n Object.defineProperty(exports3, \"getAddress\", { enumerable: true, get: function() {\n return address_1.getAddress;\n } });\n Object.defineProperty(exports3, \"getCreate2Address\", { enumerable: true, get: function() {\n return address_1.getCreate2Address;\n } });\n Object.defineProperty(exports3, \"getContractAddress\", { enumerable: true, get: function() {\n return address_1.getContractAddress;\n } });\n Object.defineProperty(exports3, \"getIcapAddress\", { enumerable: true, get: function() {\n return address_1.getIcapAddress;\n } });\n Object.defineProperty(exports3, \"isAddress\", { enumerable: true, get: function() {\n return address_1.isAddress;\n } });\n var base64 = __importStar4(require_lib10());\n exports3.base64 = base64;\n var basex_1 = require_lib19();\n Object.defineProperty(exports3, \"base58\", { enumerable: true, get: function() {\n return basex_1.Base58;\n } });\n var bytes_1 = require_lib2();\n Object.defineProperty(exports3, \"arrayify\", { enumerable: true, get: function() {\n return bytes_1.arrayify;\n } });\n Object.defineProperty(exports3, \"concat\", { enumerable: true, get: function() {\n return bytes_1.concat;\n } });\n Object.defineProperty(exports3, \"hexConcat\", { enumerable: true, get: function() {\n return bytes_1.hexConcat;\n } });\n Object.defineProperty(exports3, \"hexDataSlice\", { enumerable: true, get: function() {\n return bytes_1.hexDataSlice;\n } });\n Object.defineProperty(exports3, \"hexDataLength\", { enumerable: true, get: function() {\n return bytes_1.hexDataLength;\n } });\n Object.defineProperty(exports3, \"hexlify\", { enumerable: true, get: function() {\n return bytes_1.hexlify;\n } });\n Object.defineProperty(exports3, \"hexStripZeros\", { enumerable: true, get: function() {\n return bytes_1.hexStripZeros;\n } });\n Object.defineProperty(exports3, \"hexValue\", { enumerable: true, get: function() {\n return bytes_1.hexValue;\n } });\n Object.defineProperty(exports3, \"hexZeroPad\", { enumerable: true, get: function() {\n return bytes_1.hexZeroPad;\n } });\n Object.defineProperty(exports3, \"isBytes\", { enumerable: true, get: function() {\n return bytes_1.isBytes;\n } });\n Object.defineProperty(exports3, \"isBytesLike\", { enumerable: true, get: function() {\n return bytes_1.isBytesLike;\n } });\n Object.defineProperty(exports3, \"isHexString\", { enumerable: true, get: function() {\n return bytes_1.isHexString;\n } });\n Object.defineProperty(exports3, \"joinSignature\", { enumerable: true, get: function() {\n return bytes_1.joinSignature;\n } });\n Object.defineProperty(exports3, \"zeroPad\", { enumerable: true, get: function() {\n return bytes_1.zeroPad;\n } });\n Object.defineProperty(exports3, \"splitSignature\", { enumerable: true, get: function() {\n return bytes_1.splitSignature;\n } });\n Object.defineProperty(exports3, \"stripZeros\", { enumerable: true, get: function() {\n return bytes_1.stripZeros;\n } });\n var hash_1 = require_lib12();\n Object.defineProperty(exports3, \"_TypedDataEncoder\", { enumerable: true, get: function() {\n return hash_1._TypedDataEncoder;\n } });\n Object.defineProperty(exports3, \"dnsEncode\", { enumerable: true, get: function() {\n return hash_1.dnsEncode;\n } });\n Object.defineProperty(exports3, \"hashMessage\", { enumerable: true, get: function() {\n return hash_1.hashMessage;\n } });\n Object.defineProperty(exports3, \"id\", { enumerable: true, get: function() {\n return hash_1.id;\n } });\n Object.defineProperty(exports3, \"isValidName\", { enumerable: true, get: function() {\n return hash_1.isValidName;\n } });\n Object.defineProperty(exports3, \"namehash\", { enumerable: true, get: function() {\n return hash_1.namehash;\n } });\n var hdnode_1 = require_lib23();\n Object.defineProperty(exports3, \"defaultPath\", { enumerable: true, get: function() {\n return hdnode_1.defaultPath;\n } });\n Object.defineProperty(exports3, \"entropyToMnemonic\", { enumerable: true, get: function() {\n return hdnode_1.entropyToMnemonic;\n } });\n Object.defineProperty(exports3, \"getAccountPath\", { enumerable: true, get: function() {\n return hdnode_1.getAccountPath;\n } });\n Object.defineProperty(exports3, \"HDNode\", { enumerable: true, get: function() {\n return hdnode_1.HDNode;\n } });\n Object.defineProperty(exports3, \"isValidMnemonic\", { enumerable: true, get: function() {\n return hdnode_1.isValidMnemonic;\n } });\n Object.defineProperty(exports3, \"mnemonicToEntropy\", { enumerable: true, get: function() {\n return hdnode_1.mnemonicToEntropy;\n } });\n Object.defineProperty(exports3, \"mnemonicToSeed\", { enumerable: true, get: function() {\n return hdnode_1.mnemonicToSeed;\n } });\n var json_wallets_1 = require_lib25();\n Object.defineProperty(exports3, \"getJsonWalletAddress\", { enumerable: true, get: function() {\n return json_wallets_1.getJsonWalletAddress;\n } });\n var keccak256_1 = require_lib5();\n Object.defineProperty(exports3, \"keccak256\", { enumerable: true, get: function() {\n return keccak256_1.keccak256;\n } });\n var logger_1 = require_lib();\n Object.defineProperty(exports3, \"Logger\", { enumerable: true, get: function() {\n return logger_1.Logger;\n } });\n var sha2_1 = require_lib20();\n Object.defineProperty(exports3, \"computeHmac\", { enumerable: true, get: function() {\n return sha2_1.computeHmac;\n } });\n Object.defineProperty(exports3, \"ripemd160\", { enumerable: true, get: function() {\n return sha2_1.ripemd160;\n } });\n Object.defineProperty(exports3, \"sha256\", { enumerable: true, get: function() {\n return sha2_1.sha256;\n } });\n Object.defineProperty(exports3, \"sha512\", { enumerable: true, get: function() {\n return sha2_1.sha512;\n } });\n var solidity_1 = require_lib30();\n Object.defineProperty(exports3, \"solidityKeccak256\", { enumerable: true, get: function() {\n return solidity_1.keccak256;\n } });\n Object.defineProperty(exports3, \"solidityPack\", { enumerable: true, get: function() {\n return solidity_1.pack;\n } });\n Object.defineProperty(exports3, \"soliditySha256\", { enumerable: true, get: function() {\n return solidity_1.sha256;\n } });\n var random_1 = require_lib24();\n Object.defineProperty(exports3, \"randomBytes\", { enumerable: true, get: function() {\n return random_1.randomBytes;\n } });\n Object.defineProperty(exports3, \"shuffled\", { enumerable: true, get: function() {\n return random_1.shuffled;\n } });\n var properties_1 = require_lib4();\n Object.defineProperty(exports3, \"checkProperties\", { enumerable: true, get: function() {\n return properties_1.checkProperties;\n } });\n Object.defineProperty(exports3, \"deepCopy\", { enumerable: true, get: function() {\n return properties_1.deepCopy;\n } });\n Object.defineProperty(exports3, \"defineReadOnly\", { enumerable: true, get: function() {\n return properties_1.defineReadOnly;\n } });\n Object.defineProperty(exports3, \"getStatic\", { enumerable: true, get: function() {\n return properties_1.getStatic;\n } });\n Object.defineProperty(exports3, \"resolveProperties\", { enumerable: true, get: function() {\n return properties_1.resolveProperties;\n } });\n Object.defineProperty(exports3, \"shallowCopy\", { enumerable: true, get: function() {\n return properties_1.shallowCopy;\n } });\n var RLP = __importStar4(require_lib6());\n exports3.RLP = RLP;\n var signing_key_1 = require_lib16();\n Object.defineProperty(exports3, \"computePublicKey\", { enumerable: true, get: function() {\n return signing_key_1.computePublicKey;\n } });\n Object.defineProperty(exports3, \"recoverPublicKey\", { enumerable: true, get: function() {\n return signing_key_1.recoverPublicKey;\n } });\n Object.defineProperty(exports3, \"SigningKey\", { enumerable: true, get: function() {\n return signing_key_1.SigningKey;\n } });\n var strings_1 = require_lib9();\n Object.defineProperty(exports3, \"formatBytes32String\", { enumerable: true, get: function() {\n return strings_1.formatBytes32String;\n } });\n Object.defineProperty(exports3, \"nameprep\", { enumerable: true, get: function() {\n return strings_1.nameprep;\n } });\n Object.defineProperty(exports3, \"parseBytes32String\", { enumerable: true, get: function() {\n return strings_1.parseBytes32String;\n } });\n Object.defineProperty(exports3, \"_toEscapedUtf8String\", { enumerable: true, get: function() {\n return strings_1._toEscapedUtf8String;\n } });\n Object.defineProperty(exports3, \"toUtf8Bytes\", { enumerable: true, get: function() {\n return strings_1.toUtf8Bytes;\n } });\n Object.defineProperty(exports3, \"toUtf8CodePoints\", { enumerable: true, get: function() {\n return strings_1.toUtf8CodePoints;\n } });\n Object.defineProperty(exports3, \"toUtf8String\", { enumerable: true, get: function() {\n return strings_1.toUtf8String;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorFuncs\", { enumerable: true, get: function() {\n return strings_1.Utf8ErrorFuncs;\n } });\n var transactions_1 = require_lib17();\n Object.defineProperty(exports3, \"accessListify\", { enumerable: true, get: function() {\n return transactions_1.accessListify;\n } });\n Object.defineProperty(exports3, \"computeAddress\", { enumerable: true, get: function() {\n return transactions_1.computeAddress;\n } });\n Object.defineProperty(exports3, \"parseTransaction\", { enumerable: true, get: function() {\n return transactions_1.parse;\n } });\n Object.defineProperty(exports3, \"recoverAddress\", { enumerable: true, get: function() {\n return transactions_1.recoverAddress;\n } });\n Object.defineProperty(exports3, \"serializeTransaction\", { enumerable: true, get: function() {\n return transactions_1.serialize;\n } });\n Object.defineProperty(exports3, \"TransactionTypes\", { enumerable: true, get: function() {\n return transactions_1.TransactionTypes;\n } });\n var units_1 = require_lib31();\n Object.defineProperty(exports3, \"commify\", { enumerable: true, get: function() {\n return units_1.commify;\n } });\n Object.defineProperty(exports3, \"formatEther\", { enumerable: true, get: function() {\n return units_1.formatEther;\n } });\n Object.defineProperty(exports3, \"parseEther\", { enumerable: true, get: function() {\n return units_1.parseEther;\n } });\n Object.defineProperty(exports3, \"formatUnits\", { enumerable: true, get: function() {\n return units_1.formatUnits;\n } });\n Object.defineProperty(exports3, \"parseUnits\", { enumerable: true, get: function() {\n return units_1.parseUnits;\n } });\n var wallet_1 = require_lib26();\n Object.defineProperty(exports3, \"verifyMessage\", { enumerable: true, get: function() {\n return wallet_1.verifyMessage;\n } });\n Object.defineProperty(exports3, \"verifyTypedData\", { enumerable: true, get: function() {\n return wallet_1.verifyTypedData;\n } });\n var web_1 = require_lib28();\n Object.defineProperty(exports3, \"_fetchData\", { enumerable: true, get: function() {\n return web_1._fetchData;\n } });\n Object.defineProperty(exports3, \"fetchJson\", { enumerable: true, get: function() {\n return web_1.fetchJson;\n } });\n Object.defineProperty(exports3, \"poll\", { enumerable: true, get: function() {\n return web_1.poll;\n } });\n var sha2_2 = require_lib20();\n Object.defineProperty(exports3, \"SupportedAlgorithm\", { enumerable: true, get: function() {\n return sha2_2.SupportedAlgorithm;\n } });\n var strings_2 = require_lib9();\n Object.defineProperty(exports3, \"UnicodeNormalizationForm\", { enumerable: true, get: function() {\n return strings_2.UnicodeNormalizationForm;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorReason\", { enumerable: true, get: function() {\n return strings_2.Utf8ErrorReason;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/_version.js\n var require_version26 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"ethers/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/ethers.js\n var require_ethers = __commonJS({\n \"../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/ethers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding4 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n Object.defineProperty(o5, k22, { enumerable: true, get: function() {\n return m2[k4];\n } });\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar4 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding4(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wordlist = exports3.version = exports3.wordlists = exports3.utils = exports3.logger = exports3.errors = exports3.constants = exports3.FixedNumber = exports3.BigNumber = exports3.ContractFactory = exports3.Contract = exports3.BaseContract = exports3.providers = exports3.getDefaultProvider = exports3.VoidSigner = exports3.Wallet = exports3.Signer = void 0;\n var contracts_1 = require_lib18();\n Object.defineProperty(exports3, \"BaseContract\", { enumerable: true, get: function() {\n return contracts_1.BaseContract;\n } });\n Object.defineProperty(exports3, \"Contract\", { enumerable: true, get: function() {\n return contracts_1.Contract;\n } });\n Object.defineProperty(exports3, \"ContractFactory\", { enumerable: true, get: function() {\n return contracts_1.ContractFactory;\n } });\n var bignumber_1 = require_lib3();\n Object.defineProperty(exports3, \"BigNumber\", { enumerable: true, get: function() {\n return bignumber_1.BigNumber;\n } });\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return bignumber_1.FixedNumber;\n } });\n var abstract_signer_1 = require_lib15();\n Object.defineProperty(exports3, \"Signer\", { enumerable: true, get: function() {\n return abstract_signer_1.Signer;\n } });\n Object.defineProperty(exports3, \"VoidSigner\", { enumerable: true, get: function() {\n return abstract_signer_1.VoidSigner;\n } });\n var wallet_1 = require_lib26();\n Object.defineProperty(exports3, \"Wallet\", { enumerable: true, get: function() {\n return wallet_1.Wallet;\n } });\n var constants = __importStar4(require_lib8());\n exports3.constants = constants;\n var providers = __importStar4(require_lib29());\n exports3.providers = providers;\n var providers_1 = require_lib29();\n Object.defineProperty(exports3, \"getDefaultProvider\", { enumerable: true, get: function() {\n return providers_1.getDefaultProvider;\n } });\n var wordlists_1 = require_lib22();\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return wordlists_1.Wordlist;\n } });\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return wordlists_1.wordlists;\n } });\n var utils = __importStar4(require_utils6());\n exports3.utils = utils;\n var logger_1 = require_lib();\n Object.defineProperty(exports3, \"errors\", { enumerable: true, get: function() {\n return logger_1.ErrorCode;\n } });\n var _version_1 = require_version26();\n Object.defineProperty(exports3, \"version\", { enumerable: true, get: function() {\n return _version_1.version;\n } });\n var logger = new logger_1.Logger(_version_1.version);\n exports3.logger = logger;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/index.js\n var require_lib32 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding4 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n Object.defineProperty(o5, k22, { enumerable: true, get: function() {\n return m2[k4];\n } });\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar4 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding4(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wordlist = exports3.version = exports3.wordlists = exports3.utils = exports3.logger = exports3.errors = exports3.constants = exports3.FixedNumber = exports3.BigNumber = exports3.ContractFactory = exports3.Contract = exports3.BaseContract = exports3.providers = exports3.getDefaultProvider = exports3.VoidSigner = exports3.Wallet = exports3.Signer = exports3.ethers = void 0;\n var ethers3 = __importStar4(require_ethers());\n exports3.ethers = ethers3;\n try {\n anyGlobal = window;\n if (anyGlobal._ethers == null) {\n anyGlobal._ethers = ethers3;\n }\n } catch (error) {\n }\n var anyGlobal;\n var ethers_1 = require_ethers();\n Object.defineProperty(exports3, \"Signer\", { enumerable: true, get: function() {\n return ethers_1.Signer;\n } });\n Object.defineProperty(exports3, \"Wallet\", { enumerable: true, get: function() {\n return ethers_1.Wallet;\n } });\n Object.defineProperty(exports3, \"VoidSigner\", { enumerable: true, get: function() {\n return ethers_1.VoidSigner;\n } });\n Object.defineProperty(exports3, \"getDefaultProvider\", { enumerable: true, get: function() {\n return ethers_1.getDefaultProvider;\n } });\n Object.defineProperty(exports3, \"providers\", { enumerable: true, get: function() {\n return ethers_1.providers;\n } });\n Object.defineProperty(exports3, \"BaseContract\", { enumerable: true, get: function() {\n return ethers_1.BaseContract;\n } });\n Object.defineProperty(exports3, \"Contract\", { enumerable: true, get: function() {\n return ethers_1.Contract;\n } });\n Object.defineProperty(exports3, \"ContractFactory\", { enumerable: true, get: function() {\n return ethers_1.ContractFactory;\n } });\n Object.defineProperty(exports3, \"BigNumber\", { enumerable: true, get: function() {\n return ethers_1.BigNumber;\n } });\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return ethers_1.FixedNumber;\n } });\n Object.defineProperty(exports3, \"constants\", { enumerable: true, get: function() {\n return ethers_1.constants;\n } });\n Object.defineProperty(exports3, \"errors\", { enumerable: true, get: function() {\n return ethers_1.errors;\n } });\n Object.defineProperty(exports3, \"logger\", { enumerable: true, get: function() {\n return ethers_1.logger;\n } });\n Object.defineProperty(exports3, \"utils\", { enumerable: true, get: function() {\n return ethers_1.utils;\n } });\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return ethers_1.wordlists;\n } });\n Object.defineProperty(exports3, \"version\", { enumerable: true, get: function() {\n return ethers_1.version;\n } });\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return ethers_1.Wordlist;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/getMappedAbilityPolicyParams.js\n var require_getMappedAbilityPolicyParams = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/getMappedAbilityPolicyParams.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getMappedAbilityPolicyParams = getMappedAbilityPolicyParams;\n function getMappedAbilityPolicyParams({ abilityParameterMappings, parsedAbilityParams }) {\n const mappedAbilityParams = {};\n for (const [abilityParamKey, policyParamKey] of Object.entries(abilityParameterMappings)) {\n if (!policyParamKey) {\n throw new Error(`Missing policy param key for ability param \"${abilityParamKey}\" (evaluateSupportedPolicies)`);\n }\n if (!(abilityParamKey in parsedAbilityParams)) {\n throw new Error(`Ability param \"${abilityParamKey}\" expected in abilityParams but was not provided`);\n }\n mappedAbilityParams[policyParamKey] = parsedAbilityParams[abilityParamKey];\n }\n return mappedAbilityParams;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/getPkpInfo.js\n var require_getPkpInfo = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/getPkpInfo.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getPkpInfo = void 0;\n var ethers_1 = require_lib32();\n var getPkpInfo = async ({ litPubkeyRouterAddress, yellowstoneRpcUrl, pkpEthAddress }) => {\n try {\n const PUBKEY_ROUTER_ABI = [\n \"function ethAddressToPkpId(address ethAddress) public view returns (uint256)\",\n \"function getPubkey(uint256 tokenId) public view returns (bytes memory)\"\n ];\n const pubkeyRouter = new ethers_1.ethers.Contract(litPubkeyRouterAddress, PUBKEY_ROUTER_ABI, new ethers_1.ethers.providers.StaticJsonRpcProvider(yellowstoneRpcUrl));\n const pkpTokenId = await pubkeyRouter.ethAddressToPkpId(pkpEthAddress);\n const publicKey = await pubkeyRouter.getPubkey(pkpTokenId);\n return {\n tokenId: pkpTokenId.toString(),\n ethAddress: pkpEthAddress,\n publicKey: publicKey.toString(\"hex\")\n };\n } catch (error) {\n throw new Error(`Error getting PKP info for PKP Eth Address: ${pkpEthAddress} using Lit Pubkey Router: ${litPubkeyRouterAddress} and Yellowstone RPC URL: ${yellowstoneRpcUrl}: ${error instanceof Error ? error.message : String(error)}`);\n }\n };\n exports3.getPkpInfo = getPkpInfo;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/supportedPoliciesForAbility.js\n var require_supportedPoliciesForAbility = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/supportedPoliciesForAbility.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.supportedPoliciesForAbility = supportedPoliciesForAbility2;\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n function supportedPoliciesForAbility2(policies) {\n const policyByPackageName = {};\n const policyByIpfsCid = {};\n const cidToPackageName = /* @__PURE__ */ new Map();\n const packageNameToCid = /* @__PURE__ */ new Map();\n for (const policy of policies) {\n const { vincentAbilityApiVersion: vincentAbilityApiVersion2 } = policy;\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion2);\n const pkg = policy.vincentPolicy.packageName;\n const cid = policy.ipfsCid;\n if (!pkg)\n throw new Error(\"Missing policy packageName\");\n if (pkg in policyByPackageName) {\n throw new Error(`Duplicate policy packageName: ${pkg}`);\n }\n policyByPackageName[pkg] = policy;\n policyByIpfsCid[cid] = policy;\n cidToPackageName.set(cid, pkg);\n packageNameToCid.set(pkg, cid);\n }\n return {\n policyByPackageName,\n policyByIpfsCid,\n cidToPackageName,\n packageNameToCid\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/index.js\n var require_helpers2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.supportedPoliciesForAbility = exports3.getPkpInfo = exports3.getMappedAbilityPolicyParams = void 0;\n var getMappedAbilityPolicyParams_1 = require_getMappedAbilityPolicyParams();\n Object.defineProperty(exports3, \"getMappedAbilityPolicyParams\", { enumerable: true, get: function() {\n return getMappedAbilityPolicyParams_1.getMappedAbilityPolicyParams;\n } });\n var getPkpInfo_1 = require_getPkpInfo();\n Object.defineProperty(exports3, \"getPkpInfo\", { enumerable: true, get: function() {\n return getPkpInfo_1.getPkpInfo;\n } });\n var supportedPoliciesForAbility_1 = require_supportedPoliciesForAbility();\n Object.defineProperty(exports3, \"supportedPoliciesForAbility\", { enumerable: true, get: function() {\n return supportedPoliciesForAbility_1.supportedPoliciesForAbility;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs\n var tslib_es6_exports = {};\n __export(tslib_es6_exports, {\n __addDisposableResource: () => __addDisposableResource,\n __assign: () => __assign,\n __asyncDelegator: () => __asyncDelegator,\n __asyncGenerator: () => __asyncGenerator,\n __asyncValues: () => __asyncValues,\n __await: () => __await,\n __awaiter: () => __awaiter,\n __classPrivateFieldGet: () => __classPrivateFieldGet,\n __classPrivateFieldIn: () => __classPrivateFieldIn,\n __classPrivateFieldSet: () => __classPrivateFieldSet,\n __createBinding: () => __createBinding,\n __decorate: () => __decorate,\n __disposeResources: () => __disposeResources,\n __esDecorate: () => __esDecorate,\n __exportStar: () => __exportStar,\n __extends: () => __extends,\n __generator: () => __generator,\n __importDefault: () => __importDefault,\n __importStar: () => __importStar,\n __makeTemplateObject: () => __makeTemplateObject,\n __metadata: () => __metadata,\n __param: () => __param,\n __propKey: () => __propKey,\n __read: () => __read,\n __rest: () => __rest,\n __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension,\n __runInitializers: () => __runInitializers,\n __setFunctionName: () => __setFunctionName,\n __spread: () => __spread,\n __spreadArray: () => __spreadArray,\n __spreadArrays: () => __spreadArrays,\n __values: () => __values,\n default: () => tslib_es6_default\n });\n function __extends(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n }\n function __rest(s4, e2) {\n var t3 = {};\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4) && e2.indexOf(p4) < 0)\n t3[p4] = s4[p4];\n if (s4 != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i3 = 0, p4 = Object.getOwnPropertySymbols(s4); i3 < p4.length; i3++) {\n if (e2.indexOf(p4[i3]) < 0 && Object.prototype.propertyIsEnumerable.call(s4, p4[i3]))\n t3[p4[i3]] = s4[p4[i3]];\n }\n return t3;\n }\n function __decorate(decorators, target, key, desc) {\n var c4 = arguments.length, r2 = c4 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d5;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r2 = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i3 = decorators.length - 1; i3 >= 0; i3--)\n if (d5 = decorators[i3])\n r2 = (c4 < 3 ? d5(r2) : c4 > 3 ? d5(target, key, r2) : d5(target, key)) || r2;\n return c4 > 3 && r2 && Object.defineProperty(target, key, r2), r2;\n }\n function __param(paramIndex, decorator) {\n return function(target, key) {\n decorator(target, key, paramIndex);\n };\n }\n function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f7) {\n if (f7 !== void 0 && typeof f7 !== \"function\")\n throw new TypeError(\"Function expected\");\n return f7;\n }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _2, done = false;\n for (var i3 = decorators.length - 1; i3 >= 0; i3--) {\n var context2 = {};\n for (var p4 in contextIn)\n context2[p4] = p4 === \"access\" ? {} : contextIn[p4];\n for (var p4 in contextIn.access)\n context2.access[p4] = contextIn.access[p4];\n context2.addInitializer = function(f7) {\n if (done)\n throw new TypeError(\"Cannot add initializers after decoration has completed\");\n extraInitializers.push(accept(f7 || null));\n };\n var result = (0, decorators[i3])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);\n if (kind === \"accessor\") {\n if (result === void 0)\n continue;\n if (result === null || typeof result !== \"object\")\n throw new TypeError(\"Object expected\");\n if (_2 = accept(result.get))\n descriptor.get = _2;\n if (_2 = accept(result.set))\n descriptor.set = _2;\n if (_2 = accept(result.init))\n initializers.unshift(_2);\n } else if (_2 = accept(result)) {\n if (kind === \"field\")\n initializers.unshift(_2);\n else\n descriptor[key] = _2;\n }\n }\n if (target)\n Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n }\n function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i3 = 0; i3 < initializers.length; i3++) {\n value = useValue ? initializers[i3].call(thisArg, value) : initializers[i3].call(thisArg);\n }\n return useValue ? value : void 0;\n }\n function __propKey(x4) {\n return typeof x4 === \"symbol\" ? x4 : \"\".concat(x4);\n }\n function __setFunctionName(f7, name, prefix) {\n if (typeof name === \"symbol\")\n name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f7, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n }\n function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\")\n return Reflect.metadata(metadataKey, metadataValue);\n }\n function __awaiter(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n }\n function __generator(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4 = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g4.next = verb(0), g4[\"throw\"] = verb(1), g4[\"return\"] = verb(2), typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (g4 && (g4 = 0, op[0] && (_2 = 0)), _2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n }\n function __exportStar(m2, o5) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(o5, p4))\n __createBinding(o5, m2, p4);\n }\n function __values(o5) {\n var s4 = typeof Symbol === \"function\" && Symbol.iterator, m2 = s4 && o5[s4], i3 = 0;\n if (m2)\n return m2.call(o5);\n if (o5 && typeof o5.length === \"number\")\n return {\n next: function() {\n if (o5 && i3 >= o5.length)\n o5 = void 0;\n return { value: o5 && o5[i3++], done: !o5 };\n }\n };\n throw new TypeError(s4 ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n }\n function __read(o5, n2) {\n var m2 = typeof Symbol === \"function\" && o5[Symbol.iterator];\n if (!m2)\n return o5;\n var i3 = m2.call(o5), r2, ar = [], e2;\n try {\n while ((n2 === void 0 || n2-- > 0) && !(r2 = i3.next()).done)\n ar.push(r2.value);\n } catch (error) {\n e2 = { error };\n } finally {\n try {\n if (r2 && !r2.done && (m2 = i3[\"return\"]))\n m2.call(i3);\n } finally {\n if (e2)\n throw e2.error;\n }\n }\n return ar;\n }\n function __spread() {\n for (var ar = [], i3 = 0; i3 < arguments.length; i3++)\n ar = ar.concat(__read(arguments[i3]));\n return ar;\n }\n function __spreadArrays() {\n for (var s4 = 0, i3 = 0, il = arguments.length; i3 < il; i3++)\n s4 += arguments[i3].length;\n for (var r2 = Array(s4), k4 = 0, i3 = 0; i3 < il; i3++)\n for (var a3 = arguments[i3], j2 = 0, jl = a3.length; j2 < jl; j2++, k4++)\n r2[k4] = a3[j2];\n return r2;\n }\n function __spreadArray(to, from14, pack) {\n if (pack || arguments.length === 2)\n for (var i3 = 0, l6 = from14.length, ar; i3 < l6; i3++) {\n if (ar || !(i3 in from14)) {\n if (!ar)\n ar = Array.prototype.slice.call(from14, 0, i3);\n ar[i3] = from14[i3];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from14));\n }\n function __await(v2) {\n return this instanceof __await ? (this.v = v2, this) : new __await(v2);\n }\n function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g4 = generator.apply(thisArg, _arguments || []), i3, q3 = [];\n return i3 = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3;\n function awaitReturn(f7) {\n return function(v2) {\n return Promise.resolve(v2).then(f7, reject);\n };\n }\n function verb(n2, f7) {\n if (g4[n2]) {\n i3[n2] = function(v2) {\n return new Promise(function(a3, b4) {\n q3.push([n2, v2, a3, b4]) > 1 || resume(n2, v2);\n });\n };\n if (f7)\n i3[n2] = f7(i3[n2]);\n }\n }\n function resume(n2, v2) {\n try {\n step(g4[n2](v2));\n } catch (e2) {\n settle(q3[0][3], e2);\n }\n }\n function step(r2) {\n r2.value instanceof __await ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle(q3[0][2], r2);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f7, v2) {\n if (f7(v2), q3.shift(), q3.length)\n resume(q3[0][0], q3[0][1]);\n }\n }\n function __asyncDelegator(o5) {\n var i3, p4;\n return i3 = {}, verb(\"next\"), verb(\"throw\", function(e2) {\n throw e2;\n }), verb(\"return\"), i3[Symbol.iterator] = function() {\n return this;\n }, i3;\n function verb(n2, f7) {\n i3[n2] = o5[n2] ? function(v2) {\n return (p4 = !p4) ? { value: __await(o5[n2](v2)), done: false } : f7 ? f7(v2) : v2;\n } : f7;\n }\n }\n function __asyncValues(o5) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m2 = o5[Symbol.asyncIterator], i3;\n return m2 ? m2.call(o5) : (o5 = typeof __values === \"function\" ? __values(o5) : o5[Symbol.iterator](), i3 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3);\n function verb(n2) {\n i3[n2] = o5[n2] && function(v2) {\n return new Promise(function(resolve, reject) {\n v2 = o5[n2](v2), settle(resolve, reject, v2.done, v2.value);\n });\n };\n }\n function settle(resolve, reject, d5, v2) {\n Promise.resolve(v2).then(function(v6) {\n resolve({ value: v6, done: d5 });\n }, reject);\n }\n }\n function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", { value: raw });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n }\n function __importStar(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 = ownKeys(mod3), i3 = 0; i3 < k4.length; i3++)\n if (k4[i3] !== \"default\")\n __createBinding(result, mod3, k4[i3]);\n }\n __setModuleDefault(result, mod3);\n return result;\n }\n function __importDefault(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { default: mod3 };\n }\n function __classPrivateFieldGet(receiver, state, kind, f7) {\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f7 : kind === \"a\" ? f7.call(receiver) : f7 ? f7.value : state.get(receiver);\n }\n function __classPrivateFieldSet(receiver, state, value, kind, f7) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f7.call(receiver, value) : f7 ? f7.value = value : state.set(receiver, value), value;\n }\n function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || typeof receiver !== \"object\" && typeof receiver !== \"function\")\n throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n }\n function __addDisposableResource(env2, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\")\n throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose)\n throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose)\n throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async)\n inner = dispose;\n }\n if (typeof dispose !== \"function\")\n throw new TypeError(\"Object not disposable.\");\n if (inner)\n dispose = function() {\n try {\n inner.call(this);\n } catch (e2) {\n return Promise.reject(e2);\n }\n };\n env2.stack.push({ value, dispose, async });\n } else if (async) {\n env2.stack.push({ async: true });\n }\n return value;\n }\n function __disposeResources(env2) {\n function fail(e2) {\n env2.error = env2.hasError ? new _SuppressedError(e2, env2.error, \"An error was suppressed during disposal.\") : e2;\n env2.hasError = true;\n }\n var r2, s4 = 0;\n function next() {\n while (r2 = env2.stack.pop()) {\n try {\n if (!r2.async && s4 === 1)\n return s4 = 0, env2.stack.push(r2), Promise.resolve().then(next);\n if (r2.dispose) {\n var result = r2.dispose.call(r2.value);\n if (r2.async)\n return s4 |= 2, Promise.resolve(result).then(next, function(e2) {\n fail(e2);\n return next();\n });\n } else\n s4 |= 1;\n } catch (e2) {\n fail(e2);\n }\n }\n if (s4 === 1)\n return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();\n if (env2.hasError)\n throw env2.error;\n }\n return next();\n }\n function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function(m2, tsx, d5, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d5 && (!ext || !cm) ? m2 : d5 + ext + \".\" + cm.toLowerCase() + \"js\";\n });\n }\n return path;\n }\n var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;\n var init_tslib_es6 = __esm({\n \"../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n extendStatics = function(d5, b4) {\n extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics(d5, b4);\n };\n __assign = function() {\n __assign = Object.assign || function __assign4(t3) {\n for (var s4, i3 = 1, n2 = arguments.length; i3 < n2; i3++) {\n s4 = arguments[i3];\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4))\n t3[p4] = s4[p4];\n }\n return t3;\n };\n return __assign.apply(this, arguments);\n };\n __createBinding = Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n };\n __setModuleDefault = Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n };\n ownKeys = function(o5) {\n ownKeys = Object.getOwnPropertyNames || function(o6) {\n var ar = [];\n for (var k4 in o6)\n if (Object.prototype.hasOwnProperty.call(o6, k4))\n ar[ar.length] = k4;\n return ar;\n };\n return ownKeys(o5);\n };\n _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function(error, suppressed, message) {\n var e2 = new Error(message);\n return e2.name = \"SuppressedError\", e2.error = error, e2.suppressed = suppressed, e2;\n };\n tslib_es6_default = {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension\n };\n }\n });\n\n // ../../libs/contracts-sdk/dist/abis/VincentAppFacet.abi.json\n var require_VincentAppFacet_abi = __commonJS({\n \"../../libs/contracts-sdk/dist/abis/VincentAppFacet.abi.json\"(exports3, module) {\n module.exports = [\n {\n type: \"function\",\n name: \"addDelegatee\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"deleteApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"enableAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"enabled\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"registerApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n },\n {\n name: \"versionAbilities\",\n type: \"tuple\",\n internalType: \"struct VincentAppFacet.AppVersionAbilities\",\n components: [\n {\n name: \"abilityIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n },\n {\n name: \"abilityPolicies\",\n type: \"string[][]\",\n internalType: \"string[][]\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"newAppVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"registerNextAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"versionAbilities\",\n type: \"tuple\",\n internalType: \"struct VincentAppFacet.AppVersionAbilities\",\n components: [\n {\n name: \"abilityIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n },\n {\n name: \"abilityPolicies\",\n type: \"string[][]\",\n internalType: \"string[][]\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"newAppVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"removeDelegatee\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setDelegatee\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"undeleteApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"AppDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n },\n {\n name: \"enabled\",\n type: \"bool\",\n indexed: true,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppUndeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"DelegateeAdded\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"DelegateeRemoved\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"NewAppRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"manager\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"NewAppVersionRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n },\n {\n name: \"manager\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"NewLitActionRegistered\",\n inputs: [\n {\n name: \"litActionIpfsCidHash\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AbilityArrayDimensionMismatch\",\n inputs: [\n {\n name: \"abilitiesLength\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"policiesLength\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppAlreadyDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppAlreadyRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppAlreadyUndeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionAlreadyInRequestedState\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"enabled\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DelegateeAlreadyRegisteredToApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DelegateeNotRegisteredToApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicateAbilityIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicateAbilityPolicyIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"policyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"EmptyAbilityIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"EmptyPolicyIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidOffset\",\n inputs: [\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"totalCount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NoAbilitiesProvided\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NotAppManager\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"msgSender\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ZeroAddressDelegateeNotAllowed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ZeroAppIdNotAllowed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../libs/contracts-sdk/dist/abis/VincentAppViewFacet.abi.json\n var require_VincentAppViewFacet_abi = __commonJS({\n \"../../libs/contracts-sdk/dist/abis/VincentAppViewFacet.abi.json\"(exports3, module) {\n module.exports = [\n {\n type: \"function\",\n name: \"APP_PAGE_SIZE\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAppByDelegatee\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [\n {\n name: \"app\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.App\",\n components: [\n {\n name: \"id\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"isDeleted\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"manager\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"latestVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAppById\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [\n {\n name: \"app\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.App\",\n components: [\n {\n name: \"id\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"isDeleted\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"manager\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"latestVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n outputs: [\n {\n name: \"appVersion\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.AppVersion\",\n components: [\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"enabled\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"delegatedAgentPkpTokenIds\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"abilities\",\n type: \"tuple[]\",\n internalType: \"struct VincentAppViewFacet.Ability[]\",\n components: [\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"policyIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAppsByManager\",\n inputs: [\n {\n name: \"manager\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"appIds\",\n type: \"uint40[]\",\n internalType: \"uint40[]\"\n },\n {\n name: \"appVersionCounts\",\n type: \"uint24[]\",\n internalType: \"uint24[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getDelegatedAgentPkpTokenIds\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"delegatedAgentPkpTokenIds\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DelegateeNotRegistered\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidOffset\",\n inputs: [\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"totalCount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NoAppsFoundForManager\",\n inputs: [\n {\n name: \"manager\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NoDelegatedAgentPkpsFound\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ZeroAddressNotAllowed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../libs/contracts-sdk/dist/abis/VincentUserFacet.abi.json\n var require_VincentUserFacet_abi = __commonJS({\n \"../../libs/contracts-sdk/dist/abis/VincentUserFacet.abi.json\"(exports3, module) {\n module.exports = [\n {\n type: \"function\",\n name: \"permitAppVersion\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n },\n {\n name: \"policyIpfsCids\",\n type: \"string[][]\",\n internalType: \"string[][]\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes[][]\",\n internalType: \"bytes[][]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"rePermitApp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setAbilityPolicyParameters\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n },\n {\n name: \"policyIpfsCids\",\n type: \"string[][]\",\n internalType: \"string[][]\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes[][]\",\n internalType: \"bytes[][]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unPermitAppVersion\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"AbilityPolicyParametersSet\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n },\n {\n name: \"hashedAbilityIpfsCid\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\"\n },\n {\n name: \"hashedAbilityPolicyIpfsCid\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppVersionPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppVersionRePermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppVersionUnPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"NewUserAgentPkpRegistered\",\n inputs: [\n {\n name: \"userAddress\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AbilitiesAndPoliciesLengthMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"AbilityNotRegisteredForAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AbilityPolicyNotRegisteredForAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"abilityPolicyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNeverPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionAlreadyPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicateAbilityIpfsCid\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicateAbilityPolicyIpfsCid\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"abilityPolicyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"EmptyAbilityIpfsCid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"EmptyPolicyIpfsCid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidInput\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidOffset\",\n inputs: [\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"totalCount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NotAllRegisteredAbilitiesProvided\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NotPkpOwner\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"msgSender\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"PkpTokenDoesNotExist\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"PolicyArrayLengthMismatch\",\n inputs: [\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"policiesLength\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"paramValuesLength\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ZeroPkpTokenId\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../libs/contracts-sdk/dist/abis/VincentUserViewFacet.abi.json\n var require_VincentUserViewFacet_abi = __commonJS({\n \"../../libs/contracts-sdk/dist/abis/VincentUserViewFacet.abi.json\"(exports3, module) {\n module.exports = [\n {\n type: \"function\",\n name: \"AGENT_PAGE_SIZE\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAllAbilitiesAndPoliciesForApp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [\n {\n name: \"abilities\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.AbilityWithPolicies[]\",\n components: [\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"policies\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PolicyWithParameters[]\",\n components: [\n {\n name: \"policyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAllPermittedAppIdsForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint40[]\",\n internalType: \"uint40[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAllRegisteredAgentPkps\",\n inputs: [\n {\n name: \"userAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getLastPermittedAppVersionForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getPermittedAppVersionForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getPermittedAppsForPkps\",\n inputs: [\n {\n name: \"pkpTokenIds\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"pageSize\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PkpPermittedApps[]\",\n components: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"permittedApps\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PermittedApp[]\",\n components: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"versionEnabled\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isDeleted\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getUnpermittedAppsForPkps\",\n inputs: [\n {\n name: \"pkpTokenIds\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PkpUnpermittedApps[]\",\n components: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"unpermittedApps\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.UnpermittedApp[]\",\n components: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"previousPermittedVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"versionEnabled\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isDeleted\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isDelegateePermitted\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n outputs: [\n {\n name: \"isPermitted\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"validateAbilityExecutionAndGetPolicies\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n outputs: [\n {\n name: \"validation\",\n type: \"tuple\",\n internalType: \"struct VincentUserViewFacet.AbilityExecutionValidation\",\n components: [\n {\n name: \"isPermitted\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"policies\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PolicyWithParameters[]\",\n components: [\n {\n name: \"policyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DelegateeNotAssociatedWithApp\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"EmptyAbilityIpfsCid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidAppId\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidOffset\",\n inputs: [\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"totalCount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidPkpTokenId\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"NoRegisteredPkpsFound\",\n inputs: [\n {\n name: \"userAddress\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"PkpNotPermittedForAppVersion\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"PolicyParameterNotSetForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"policyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"parameterName\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ZeroAddressNotAllowed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/buildDiamondInterface.js\n var require_buildDiamondInterface = __commonJS({\n \"../../libs/contracts-sdk/dist/src/buildDiamondInterface.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.buildDiamondInterface = buildDiamondInterface;\n var utils_1 = require_utils6();\n function dedupeAbiFragments(abis) {\n const seen = /* @__PURE__ */ new Set();\n const deduped = [];\n for (const entry of abis) {\n try {\n const fragment = utils_1.Fragment.from(entry);\n const signature = fragment.format();\n if (!seen.has(signature)) {\n seen.add(signature);\n const jsonFragment = typeof entry === \"string\" ? JSON.parse(fragment.format(\"json\")) : entry;\n deduped.push(jsonFragment);\n }\n } catch {\n const fallbackKey = typeof entry === \"string\" ? entry : JSON.stringify(entry);\n if (!seen.has(fallbackKey)) {\n seen.add(fallbackKey);\n deduped.push(entry);\n }\n }\n }\n return deduped;\n }\n function buildDiamondInterface(facets) {\n const flattened = facets.flat();\n const deduped = dedupeAbiFragments(flattened);\n return new utils_1.Interface(deduped);\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/constants.js\n var require_constants3 = __commonJS({\n \"../../libs/contracts-sdk/dist/src/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.DEFAULT_PAGE_SIZE = exports3.GAS_ADJUSTMENT_PERCENT = exports3.COMBINED_ABI = exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD = exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_DEV = void 0;\n var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));\n var VincentAppFacet_abi_json_1 = tslib_1.__importDefault(require_VincentAppFacet_abi());\n var VincentAppViewFacet_abi_json_1 = tslib_1.__importDefault(require_VincentAppViewFacet_abi());\n var VincentUserFacet_abi_json_1 = tslib_1.__importDefault(require_VincentUserFacet_abi());\n var VincentUserViewFacet_abi_json_1 = tslib_1.__importDefault(require_VincentUserViewFacet_abi());\n var buildDiamondInterface_1 = require_buildDiamondInterface();\n exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_DEV = \"0x57f75581e0c9e51594C8080EcC833A3592A50df8\";\n exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD = \"0xa3a602F399E9663279cdF63a290101cB6560A87e\";\n exports3.COMBINED_ABI = (0, buildDiamondInterface_1.buildDiamondInterface)([\n VincentAppFacet_abi_json_1.default,\n VincentAppViewFacet_abi_json_1.default,\n VincentUserFacet_abi_json_1.default,\n VincentUserViewFacet_abi_json_1.default\n ]);\n exports3.GAS_ADJUSTMENT_PERCENT = 120;\n exports3.DEFAULT_PAGE_SIZE = \"50\";\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/utils.js\n var require_utils7 = __commonJS({\n \"../../libs/contracts-sdk/dist/src/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createContract = createContract;\n exports3.findEventByName = findEventByName;\n exports3.gasAdjustedOverrides = gasAdjustedOverrides;\n exports3.decodeContractError = decodeContractError;\n var ethers_1 = require_lib32();\n var constants_1 = require_constants3();\n function createContract({ signer, contractAddress }) {\n return new ethers_1.Contract(contractAddress, constants_1.COMBINED_ABI, signer);\n }\n function findEventByName(contract, logs, eventName) {\n return logs.find((log) => {\n try {\n const parsed = contract.interface.parseLog(log);\n return parsed?.name === eventName;\n } catch {\n return false;\n }\n });\n }\n async function gasAdjustedOverrides(contract, methodName, args, overrides = {}) {\n if (!overrides?.gasLimit) {\n const estimatedGas = await contract.estimateGas[methodName](...args, overrides);\n console.log(\"Auto estimatedGas: \", estimatedGas);\n return {\n ...overrides,\n gasLimit: estimatedGas.mul(constants_1.GAS_ADJUSTMENT_PERCENT).div(100)\n };\n }\n return overrides;\n }\n function isBigNumberOrBigInt(arg) {\n return typeof arg === \"bigint\" || ethers_1.BigNumber.isBigNumber(arg);\n }\n function decodeContractError(error, contract) {\n try {\n if (error.code === \"CALL_EXCEPTION\" || error.code === \"UNPREDICTABLE_GAS_LIMIT\") {\n let errorData = error.data;\n if (!errorData && error.error && error.error.data) {\n errorData = error.error.data;\n }\n if (!errorData && error.error && error.error.body) {\n try {\n const body = JSON.parse(error.error.body);\n if (body.error && body.error.data) {\n errorData = body.error.data;\n }\n } catch {\n }\n }\n if (errorData) {\n try {\n const decodedError = contract.interface.parseError(errorData);\n if (decodedError) {\n const formattedArgs = decodedError.args.map((arg) => {\n if (isBigNumberOrBigInt(arg)) {\n return arg.toString();\n }\n return arg;\n });\n return `Contract Error: ${decodedError.name} - ${JSON.stringify(formattedArgs)}`;\n }\n } catch {\n if (error.reason) {\n return `Contract Error: ${error.reason}`;\n }\n }\n }\n if (error.reason) {\n return `Contract Error: ${error.reason}`;\n }\n }\n if (error.transaction) {\n try {\n const decodedError = contract.interface.parseError(error.data);\n if (decodedError) {\n const formattedArgs = decodedError.args.map((arg) => {\n if (isBigNumberOrBigInt(arg)) {\n return arg.toString();\n }\n return arg;\n });\n return `Transaction Error: ${decodedError.name} - ${JSON.stringify(formattedArgs)}`;\n }\n } catch {\n }\n }\n if (error.code === \"UNPREDICTABLE_GAS_LIMIT\") {\n let errorData = error.data;\n if (!errorData && error.error && error.error.data) {\n errorData = error.error.data;\n }\n if (!errorData && error.error && error.error.body) {\n try {\n const body = JSON.parse(error.error.body);\n if (body.error && body.error.data) {\n errorData = body.error.data;\n }\n } catch {\n }\n }\n if (errorData) {\n try {\n const decodedError = contract.interface.parseError(errorData);\n if (decodedError) {\n const formattedArgs = decodedError.args.map((arg) => {\n if (isBigNumberOrBigInt(arg)) {\n return arg.toString();\n }\n return arg;\n });\n return `Gas Estimation Error: ${decodedError.name} - ${JSON.stringify(formattedArgs)}`;\n }\n } catch {\n return `Gas Estimation Error: ${error.error?.message || error.message}`;\n }\n }\n return `Gas Estimation Error: ${error.error?.message || error.message}`;\n }\n if (error.errorArgs && Array.isArray(error.errorArgs)) {\n return `Contract Error: ${error.errorSignature || \"Unknown\"} - ${JSON.stringify(error.errorArgs)}`;\n }\n return error.message || \"Unknown contract error\";\n } catch {\n return error.message || \"Unknown error\";\n }\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/internal/app/App.js\n var require_App = __commonJS({\n \"../../libs/contracts-sdk/dist/src/internal/app/App.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.registerApp = registerApp;\n exports3.registerNextVersion = registerNextVersion;\n exports3.enableAppVersion = enableAppVersion;\n exports3.addDelegatee = addDelegatee;\n exports3.removeDelegatee = removeDelegatee;\n exports3.setDelegatee = setDelegatee;\n exports3.deleteApp = deleteApp;\n exports3.undeleteApp = undeleteApp;\n var utils_1 = require_utils7();\n async function registerApp(params) {\n const { contract, args: { appId, delegateeAddresses, versionAbilities }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"registerApp\", [appId, delegateeAddresses, versionAbilities], overrides);\n const tx = await contract.registerApp(appId, delegateeAddresses, versionAbilities, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Register App: ${decodedError}`);\n }\n }\n async function registerNextVersion(params) {\n const { contract, args: { appId, versionAbilities }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"registerNextAppVersion\", [appId, versionAbilities], overrides);\n const tx = await contract.registerNextAppVersion(appId, versionAbilities, {\n ...adjustedOverrides\n });\n const receipt = await tx.wait();\n const event = (0, utils_1.findEventByName)(contract, receipt.logs, \"NewAppVersionRegistered\");\n if (!event) {\n throw new Error(\"NewAppVersionRegistered event not found\");\n }\n const newAppVersion = contract.interface.parseLog(event)?.args?.appVersion;\n if (!newAppVersion) {\n throw new Error(\"NewAppVersionRegistered event does not contain appVersion argument\");\n }\n return {\n txHash: tx.hash,\n newAppVersion\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Register Next Version: ${decodedError}`);\n }\n }\n async function enableAppVersion(params) {\n const { contract, args: { appId, appVersion, enabled }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"enableAppVersion\", [appId, appVersion, enabled], overrides);\n const tx = await contract.enableAppVersion(appId, appVersion, enabled, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Enable App Version: ${decodedError}`);\n }\n }\n async function addDelegatee(params) {\n const { contract, args: { appId, delegateeAddress }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"addDelegatee\", [appId, delegateeAddress], overrides);\n const tx = await contract.addDelegatee(appId, delegateeAddress, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Add Delegatee: ${decodedError}`);\n }\n }\n async function removeDelegatee(params) {\n const { contract, args: { appId, delegateeAddress }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"removeDelegatee\", [appId, delegateeAddress], overrides);\n const tx = await contract.removeDelegatee(appId, delegateeAddress, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Remove Delegatee: ${decodedError}`);\n }\n }\n async function setDelegatee(params) {\n const { contract, args: { appId, delegateeAddresses }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"setDelegatee\", [appId, delegateeAddresses], overrides);\n const tx = await contract.setDelegatee(appId, delegateeAddresses, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Set Delegatee: ${decodedError}`);\n }\n }\n async function deleteApp(params) {\n const { contract, args: { appId }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"deleteApp\", [appId], overrides);\n const tx = await contract.deleteApp(appId, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Delete App: ${decodedError}`);\n }\n }\n async function undeleteApp(params) {\n const { contract, args: { appId }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"undeleteApp\", [appId], overrides);\n const tx = await contract.undeleteApp(appId, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Undelete App: ${decodedError}`);\n }\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/utils/pkpInfo.js\n var require_pkpInfo = __commonJS({\n \"../../libs/contracts-sdk/dist/src/utils/pkpInfo.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getPkpTokenId = getPkpTokenId;\n exports3.getPkpEthAddress = getPkpEthAddress;\n var ethers_1 = require_lib32();\n var DATIL_PUBKEY_ROUTER_ADDRESS = \"0xF182d6bEf16Ba77e69372dD096D8B70Bc3d5B475\";\n var PUBKEY_ROUTER_ABI = [\n \"function ethAddressToPkpId(address ethAddress) public view returns (uint256)\",\n \"function getEthAddress(uint256 tokenId) public view returns (address)\"\n ];\n async function getPkpTokenId({ pkpEthAddress, signer }) {\n if (!ethers_1.ethers.utils.isAddress(pkpEthAddress)) {\n throw new Error(`Invalid Ethereum address: ${pkpEthAddress}`);\n }\n const pubkeyRouter = new ethers_1.ethers.Contract(DATIL_PUBKEY_ROUTER_ADDRESS, PUBKEY_ROUTER_ABI, signer.provider);\n return await pubkeyRouter.ethAddressToPkpId(pkpEthAddress);\n }\n async function getPkpEthAddress({ tokenId, signer }) {\n const tokenIdBN = ethers_1.ethers.BigNumber.from(tokenId);\n if (tokenIdBN.isZero()) {\n throw new Error(\"Invalid token ID: Token ID cannot be zero\");\n }\n const pubkeyRouter = new ethers_1.ethers.Contract(DATIL_PUBKEY_ROUTER_ADDRESS, PUBKEY_ROUTER_ABI, signer.provider);\n return await pubkeyRouter.getEthAddress(tokenIdBN);\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/internal/app/AppView.js\n var require_AppView = __commonJS({\n \"../../libs/contracts-sdk/dist/src/internal/app/AppView.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getAppById = getAppById;\n exports3.getAppIdByDelegatee = getAppIdByDelegatee;\n exports3.getAppVersion = getAppVersion;\n exports3.getAppsByManagerAddress = getAppsByManagerAddress;\n exports3.getAppByDelegateeAddress = getAppByDelegateeAddress;\n exports3.getDelegatedPkpEthAddresses = getDelegatedPkpEthAddresses;\n var utils_1 = require_utils7();\n var pkpInfo_1 = require_pkpInfo();\n async function getAppById(params) {\n const { args: { appId }, contract } = params;\n try {\n const chainApp = await contract.getAppById(appId);\n const { delegatees, ...app } = chainApp;\n return {\n ...app,\n id: app.id,\n latestVersion: app.latestVersion,\n delegateeAddresses: delegatees\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"AppNotRegistered\")) {\n return null;\n }\n throw new Error(`Failed to Get App By ID: ${decodedError}`);\n }\n }\n async function getAppIdByDelegatee(params) {\n const { args: { delegateeAddress }, contract } = params;\n try {\n const app = await contract.getAppByDelegatee(delegateeAddress);\n return app.id;\n } catch (error) {\n const decodedError = error instanceof Error ? error.message : String(error);\n if (decodedError.includes(\"DelegateeNotRegistered\")) {\n return null;\n }\n throw new Error(`Failed to Get App ID By Delegatee: ${decodedError}`);\n }\n }\n async function getAppVersion(params) {\n const { args: { appId, version: version7 }, contract } = params;\n try {\n const appVersion = await contract.getAppVersion(appId, version7);\n const convertedAppVersion = {\n version: appVersion.version,\n enabled: appVersion.enabled,\n abilities: appVersion.abilities.map((ability) => ({\n abilityIpfsCid: ability.abilityIpfsCid,\n policyIpfsCids: ability.policyIpfsCids\n }))\n };\n return {\n appVersion: convertedAppVersion\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"AppVersionNotRegistered\") || decodedError.includes(\"AppNotRegistered\")) {\n return null;\n }\n throw new Error(`Failed to Get App Version: ${decodedError}`);\n }\n }\n async function getAppsByManagerAddress(params) {\n const { args: { managerAddress, offset }, contract } = params;\n try {\n const [appIds, appVersionCounts] = await contract.getAppsByManager(managerAddress, offset);\n return appIds.map((id, idx) => ({\n id,\n versionCount: appVersionCounts[idx]\n }));\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"NoAppsFoundForManager\")) {\n return [];\n }\n throw new Error(`Failed to Get Apps By Manager: ${decodedError}`);\n }\n }\n async function getAppByDelegateeAddress(params) {\n const { args: { delegateeAddress }, contract } = params;\n try {\n const chainApp = await contract.getAppByDelegatee(delegateeAddress);\n const { delegatees, ...app } = chainApp;\n return {\n ...app,\n delegateeAddresses: delegatees,\n id: app.id,\n latestVersion: app.latestVersion\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"DelegateeNotRegistered\")) {\n return null;\n }\n throw new Error(`Failed to Get App By Delegatee: ${decodedError}`);\n }\n }\n async function getDelegatedPkpEthAddresses(params) {\n const { args: { appId, offset, version: version7 }, contract } = params;\n try {\n const delegatedAgentPkpTokenIds = await contract.getDelegatedAgentPkpTokenIds(appId, version7, offset);\n const delegatedAgentPkpEthAddresses = [];\n for (const tokenId of delegatedAgentPkpTokenIds) {\n const ethAddress2 = await (0, pkpInfo_1.getPkpEthAddress)({ tokenId, signer: contract.signer });\n delegatedAgentPkpEthAddresses.push(ethAddress2);\n }\n return delegatedAgentPkpEthAddresses;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Delegated Agent PKP Token IDs: ${decodedError}`);\n }\n }\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/constants.js\n var f, I, o, T, N, S;\n var init_constants = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/constants.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n f = { POS_INT: 0, NEG_INT: 1, BYTE_STRING: 2, UTF8_STRING: 3, ARRAY: 4, MAP: 5, TAG: 6, SIMPLE_FLOAT: 7 };\n I = { DATE_STRING: 0, DATE_EPOCH: 1, POS_BIGINT: 2, NEG_BIGINT: 3, DECIMAL_FRAC: 4, BIGFLOAT: 5, BASE64URL_EXPECTED: 21, BASE64_EXPECTED: 22, BASE16_EXPECTED: 23, CBOR: 24, URI: 32, BASE64URL: 33, BASE64: 34, MIME: 36, SET: 258, JSON: 262, WTF8: 273, REGEXP: 21066, SELF_DESCRIBED: 55799, INVALID_16: 65535, INVALID_32: 4294967295, INVALID_64: 0xffffffffffffffffn };\n o = { ZERO: 0, ONE: 24, TWO: 25, FOUR: 26, EIGHT: 27, INDEFINITE: 31 };\n T = { FALSE: 20, TRUE: 21, NULL: 22, UNDEFINED: 23 };\n N = class {\n static BREAK = Symbol.for(\"github.com/hildjj/cbor2/break\");\n static ENCODED = Symbol.for(\"github.com/hildjj/cbor2/cbor-encoded\");\n static LENGTH = Symbol.for(\"github.com/hildjj/cbor2/length\");\n };\n S = { MIN: -(2n ** 63n), MAX: 2n ** 64n - 1n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/tag.js\n var i;\n var init_tag = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/tag.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n i = class _i {\n static #e = /* @__PURE__ */ new Map();\n tag;\n contents;\n constructor(e2, t3 = void 0) {\n this.tag = e2, this.contents = t3;\n }\n get noChildren() {\n return !!_i.#e.get(this.tag)?.noChildren;\n }\n static registerDecoder(e2, t3, n2) {\n const o5 = this.#e.get(e2);\n return this.#e.set(e2, t3), o5 && (\"comment\" in t3 || (t3.comment = o5.comment), \"noChildren\" in t3 || (t3.noChildren = o5.noChildren)), n2 && !t3.comment && (t3.comment = () => `(${n2})`), o5;\n }\n static clearDecoder(e2) {\n const t3 = this.#e.get(e2);\n return this.#e.delete(e2), t3;\n }\n static getDecoder(e2) {\n return this.#e.get(e2);\n }\n static getAllDecoders() {\n return new Map(this.#e);\n }\n *[Symbol.iterator]() {\n yield this.contents;\n }\n push(e2) {\n return this.contents = e2, 1;\n }\n decode(e2) {\n const t3 = e2?.tags?.get(this.tag) ?? _i.#e.get(this.tag);\n return t3 ? t3(this, e2) : this;\n }\n comment(e2, t3) {\n const n2 = e2?.tags?.get(this.tag) ?? _i.#e.get(this.tag);\n if (n2?.comment)\n return n2.comment(this, e2, t3);\n }\n toCBOR() {\n return [this.tag, this.contents];\n }\n [Symbol.for(\"nodejs.util.inspect.custom\")](e2, t3, n2) {\n return `${this.tag}(${n2(this.contents, t3)})`;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/box.js\n function f2(n2) {\n if (n2 != null && typeof n2 == \"object\")\n return n2[N.ENCODED];\n }\n function s(n2) {\n if (n2 != null && typeof n2 == \"object\")\n return n2[N.LENGTH];\n }\n function u(n2, e2) {\n Object.defineProperty(n2, N.ENCODED, { configurable: true, enumerable: false, value: e2 });\n }\n function l(n2, e2) {\n Object.defineProperty(n2, N.LENGTH, { configurable: true, enumerable: false, value: e2 });\n }\n function d(n2, e2) {\n const r2 = Object(n2);\n return u(r2, e2), r2;\n }\n function t(n2) {\n if (!n2 || typeof n2 != \"object\")\n return n2;\n switch (n2.constructor) {\n case BigInt:\n case Boolean:\n case Number:\n case String:\n case Symbol:\n return n2.valueOf();\n case Array:\n return n2.map((e2) => t(e2));\n case Map: {\n const e2 = t([...n2.entries()]);\n return e2.every(([r2]) => typeof r2 == \"string\") ? Object.fromEntries(e2) : new Map(e2);\n }\n case i:\n return new i(t(n2.tag), t(n2.contents));\n case Object: {\n const e2 = {};\n for (const [r2, a3] of Object.entries(n2))\n e2[r2] = t(a3);\n return e2;\n }\n }\n return n2;\n }\n var init_box = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/box.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_tag();\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/utils.js\n function c(r2, n2) {\n Object.defineProperty(r2, g, { configurable: false, enumerable: false, writable: false, value: n2 });\n }\n function f3(r2) {\n return r2[g];\n }\n function l2(r2) {\n return f3(r2) !== void 0;\n }\n function R(r2, n2 = 0, t3 = r2.length - 1) {\n const o5 = r2.subarray(n2, t3), a3 = f3(r2);\n if (a3) {\n const s4 = [];\n for (const e2 of a3)\n if (e2[0] >= n2 && e2[0] + e2[1] <= t3) {\n const i3 = [...e2];\n i3[0] -= n2, s4.push(i3);\n }\n s4.length && c(o5, s4);\n }\n return o5;\n }\n function b(r2) {\n let n2 = Math.ceil(r2.length / 2);\n const t3 = new Uint8Array(n2);\n n2--;\n for (let o5 = r2.length, a3 = o5 - 2; o5 >= 0; o5 = a3, a3 -= 2, n2--)\n t3[n2] = parseInt(r2.substring(a3, o5), 16);\n return t3;\n }\n function A(r2) {\n return r2.reduce((n2, t3) => n2 + t3.toString(16).padStart(2, \"0\"), \"\");\n }\n function d2(r2) {\n const n2 = r2.reduce((e2, i3) => e2 + i3.length, 0), t3 = r2.some((e2) => l2(e2)), o5 = [], a3 = new Uint8Array(n2);\n let s4 = 0;\n for (const e2 of r2) {\n if (!(e2 instanceof Uint8Array))\n throw new TypeError(`Invalid array: ${e2}`);\n if (a3.set(e2, s4), t3) {\n const i3 = e2[g] ?? [[0, e2.length]];\n for (const u2 of i3)\n u2[0] += s4;\n o5.push(...i3);\n }\n s4 += e2.length;\n }\n return t3 && c(a3, o5), a3;\n }\n function y(r2) {\n const n2 = atob(r2);\n return Uint8Array.from(n2, (t3) => t3.codePointAt(0));\n }\n function x(r2) {\n const n2 = r2.replace(/[_-]/g, (t3) => p[t3]);\n return y(n2.padEnd(Math.ceil(n2.length / 4) * 4, \"=\"));\n }\n function h() {\n const r2 = new Uint8Array(4), n2 = new Uint32Array(r2.buffer);\n return !((n2[0] = 1) & r2[0]);\n }\n function U(r2) {\n let n2 = \"\";\n for (const t3 of r2) {\n const o5 = t3.codePointAt(0)?.toString(16).padStart(4, \"0\");\n n2 && (n2 += \", \"), n2 += `U+${o5}`;\n }\n return n2;\n }\n var g, p;\n var init_utils = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n g = Symbol(\"CBOR_RANGES\");\n p = { \"-\": \"+\", _: \"/\" };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/typeEncoderMap.js\n var s2;\n var init_typeEncoderMap = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/typeEncoderMap.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n s2 = class {\n #e = /* @__PURE__ */ new Map();\n registerEncoder(e2, t3) {\n const n2 = this.#e.get(e2);\n return this.#e.set(e2, t3), n2;\n }\n get(e2) {\n return this.#e.get(e2);\n }\n delete(e2) {\n return this.#e.delete(e2);\n }\n clear() {\n this.#e.clear();\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/sorts.js\n function f4(c4, d5) {\n const [u2, a3, n2] = c4, [l6, s4, t3] = d5, r2 = Math.min(n2.length, t3.length);\n for (let o5 = 0; o5 < r2; o5++) {\n const e2 = n2[o5] - t3[o5];\n if (e2 !== 0)\n return e2;\n }\n return 0;\n }\n var init_sorts = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/sorts.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/writer.js\n var e;\n var init_writer = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/writer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n e = class _e {\n static defaultOptions = { chunkSize: 4096 };\n #r;\n #i = [];\n #s = null;\n #t = 0;\n #a = 0;\n constructor(t3 = {}) {\n if (this.#r = { ..._e.defaultOptions, ...t3 }, this.#r.chunkSize < 8)\n throw new RangeError(`Expected size >= 8, got ${this.#r.chunkSize}`);\n this.#n();\n }\n get length() {\n return this.#a;\n }\n read() {\n this.#o();\n const t3 = new Uint8Array(this.#a);\n let i3 = 0;\n for (const s4 of this.#i)\n t3.set(s4, i3), i3 += s4.length;\n return this.#n(), t3;\n }\n write(t3) {\n const i3 = t3.length;\n i3 > this.#l() ? (this.#o(), i3 > this.#r.chunkSize ? (this.#i.push(t3), this.#n()) : (this.#n(), this.#i[this.#i.length - 1].set(t3), this.#t = i3)) : (this.#i[this.#i.length - 1].set(t3, this.#t), this.#t += i3), this.#a += i3;\n }\n writeUint8(t3) {\n this.#e(1), this.#s.setUint8(this.#t, t3), this.#h(1);\n }\n writeUint16(t3, i3 = false) {\n this.#e(2), this.#s.setUint16(this.#t, t3, i3), this.#h(2);\n }\n writeUint32(t3, i3 = false) {\n this.#e(4), this.#s.setUint32(this.#t, t3, i3), this.#h(4);\n }\n writeBigUint64(t3, i3 = false) {\n this.#e(8), this.#s.setBigUint64(this.#t, t3, i3), this.#h(8);\n }\n writeInt16(t3, i3 = false) {\n this.#e(2), this.#s.setInt16(this.#t, t3, i3), this.#h(2);\n }\n writeInt32(t3, i3 = false) {\n this.#e(4), this.#s.setInt32(this.#t, t3, i3), this.#h(4);\n }\n writeBigInt64(t3, i3 = false) {\n this.#e(8), this.#s.setBigInt64(this.#t, t3, i3), this.#h(8);\n }\n writeFloat32(t3, i3 = false) {\n this.#e(4), this.#s.setFloat32(this.#t, t3, i3), this.#h(4);\n }\n writeFloat64(t3, i3 = false) {\n this.#e(8), this.#s.setFloat64(this.#t, t3, i3), this.#h(8);\n }\n clear() {\n this.#a = 0, this.#i = [], this.#n();\n }\n #n() {\n const t3 = new Uint8Array(this.#r.chunkSize);\n this.#i.push(t3), this.#t = 0, this.#s = new DataView(t3.buffer, t3.byteOffset, t3.byteLength);\n }\n #o() {\n if (this.#t === 0) {\n this.#i.pop();\n return;\n }\n const t3 = this.#i.length - 1;\n this.#i[t3] = this.#i[t3].subarray(0, this.#t), this.#t = 0, this.#s = null;\n }\n #l() {\n const t3 = this.#i.length - 1;\n return this.#i[t3].length - this.#t;\n }\n #e(t3) {\n this.#l() < t3 && (this.#o(), this.#n());\n }\n #h(t3) {\n this.#t += t3, this.#a += t3;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/float.js\n function o2(e2, n2 = 0, t3 = false) {\n const r2 = e2[n2] & 128 ? -1 : 1, f7 = (e2[n2] & 124) >> 2, a3 = (e2[n2] & 3) << 8 | e2[n2 + 1];\n if (f7 === 0) {\n if (t3 && a3 !== 0)\n throw new Error(`Unwanted subnormal: ${r2 * 5960464477539063e-23 * a3}`);\n return r2 * 5960464477539063e-23 * a3;\n } else if (f7 === 31)\n return a3 ? NaN : r2 * (1 / 0);\n return r2 * 2 ** (f7 - 25) * (1024 + a3);\n }\n function s3(e2) {\n const n2 = new DataView(new ArrayBuffer(4));\n n2.setFloat32(0, e2, false);\n const t3 = n2.getUint32(0, false);\n if ((t3 & 8191) !== 0)\n return null;\n let r2 = t3 >> 16 & 32768;\n const f7 = t3 >> 23 & 255, a3 = t3 & 8388607;\n if (!(f7 === 0 && a3 === 0))\n if (f7 >= 113 && f7 <= 142)\n r2 += (f7 - 112 << 10) + (a3 >> 13);\n else if (f7 >= 103 && f7 < 113) {\n if (a3 & (1 << 126 - f7) - 1)\n return null;\n r2 += a3 + 8388608 >> 126 - f7;\n } else if (f7 === 255)\n r2 |= 31744, r2 |= a3 >> 13;\n else\n return null;\n return r2;\n }\n function i2(e2) {\n if (e2 !== 0) {\n const n2 = new ArrayBuffer(8), t3 = new DataView(n2);\n t3.setFloat64(0, e2, false);\n const r2 = t3.getBigUint64(0, false);\n if ((r2 & 0x7ff0000000000000n) === 0n)\n return r2 & 0x8000000000000000n ? -0 : 0;\n }\n return e2;\n }\n function l3(e2) {\n switch (e2.length) {\n case 2:\n o2(e2, 0, true);\n break;\n case 4: {\n const n2 = new DataView(e2.buffer, e2.byteOffset, e2.byteLength), t3 = n2.getUint32(0, false);\n if ((t3 & 2139095040) === 0 && t3 & 8388607)\n throw new Error(`Unwanted subnormal: ${n2.getFloat32(0, false)}`);\n break;\n }\n case 8: {\n const n2 = new DataView(e2.buffer, e2.byteOffset, e2.byteLength), t3 = n2.getBigUint64(0, false);\n if ((t3 & 0x7ff0000000000000n) === 0n && t3 & 0x000fffffffffffn)\n throw new Error(`Unwanted subnormal: ${n2.getFloat64(0, false)}`);\n break;\n }\n default:\n throw new TypeError(`Bad input to isSubnormal: ${e2}`);\n }\n }\n var init_float = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/float.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/errors.js\n var DecodeError, InvalidEncodingError;\n var init_errors = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n DecodeError = class extends TypeError {\n code = \"ERR_ENCODING_INVALID_ENCODED_DATA\";\n constructor() {\n super(\"The encoded data was not valid for encoding wtf-8\");\n }\n };\n InvalidEncodingError = class extends RangeError {\n code = \"ERR_ENCODING_NOT_SUPPORTED\";\n constructor(label) {\n super(`Invalid encoding: \"${label}\"`);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/const.js\n var BOM, EMPTY, MIN_HIGH_SURROGATE, MIN_LOW_SURROGATE, REPLACEMENT, WTF8;\n var init_const = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/const.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n BOM = 65279;\n EMPTY = new Uint8Array(0);\n MIN_HIGH_SURROGATE = 55296;\n MIN_LOW_SURROGATE = 56320;\n REPLACEMENT = 65533;\n WTF8 = \"wtf-8\";\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/decode.js\n function isArrayBufferView(input) {\n return input && !(input instanceof ArrayBuffer) && input.buffer instanceof ArrayBuffer;\n }\n function getUint8(input) {\n if (!input) {\n return EMPTY;\n }\n if (input instanceof Uint8Array) {\n return input;\n }\n if (isArrayBufferView(input)) {\n return new Uint8Array(input.buffer, input.byteOffset, input.byteLength);\n }\n return new Uint8Array(input);\n }\n var REMAINDER, Wtf8Decoder;\n var init_decode = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/decode.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_const();\n init_errors();\n REMAINDER = [\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n -1,\n -1,\n -1,\n -1,\n 1,\n 1,\n 2,\n 3\n ];\n Wtf8Decoder = class _Wtf8Decoder {\n static DEFAULT_BUFFERSIZE = 4096;\n encoding = WTF8;\n fatal;\n ignoreBOM;\n bufferSize;\n #left = 0;\n #cur = 0;\n #pending = 0;\n #first = true;\n #buf;\n constructor(label = \"wtf8\", options = void 0) {\n if (label.toLowerCase().replace(\"-\", \"\") !== \"wtf8\") {\n throw new InvalidEncodingError(label);\n }\n this.fatal = Boolean(options?.fatal);\n this.ignoreBOM = Boolean(options?.ignoreBOM);\n this.bufferSize = Math.floor(options?.bufferSize ?? _Wtf8Decoder.DEFAULT_BUFFERSIZE);\n if (isNaN(this.bufferSize) || this.bufferSize < 1) {\n throw new RangeError(`Invalid buffer size: ${options?.bufferSize}`);\n }\n this.#buf = new Uint16Array(this.bufferSize);\n }\n decode(input, options) {\n const streaming = Boolean(options?.stream);\n const bytes = getUint8(input);\n const res = [];\n const out = this.#buf;\n const maxSize = this.bufferSize - 3;\n let pos = 0;\n const fatal = () => {\n this.#cur = 0;\n this.#left = 0;\n this.#pending = 0;\n if (this.fatal) {\n throw new DecodeError();\n }\n out[pos++] = REPLACEMENT;\n };\n const fatals = () => {\n const p4 = this.#pending;\n for (let i3 = 0; i3 < p4; i3++) {\n fatal();\n }\n };\n const oneByte = (b4) => {\n if (this.#left === 0) {\n const n2 = REMAINDER[b4 >> 4];\n switch (n2) {\n case -1:\n fatal();\n break;\n case 0:\n out[pos++] = b4;\n break;\n case 1:\n this.#cur = b4 & 31;\n if ((this.#cur & 30) === 0) {\n fatal();\n } else {\n this.#left = 1;\n this.#pending = 1;\n }\n break;\n case 2:\n this.#cur = b4 & 15;\n this.#left = 2;\n this.#pending = 1;\n break;\n case 3:\n if (b4 & 8) {\n fatal();\n } else {\n this.#cur = b4 & 7;\n this.#left = 3;\n this.#pending = 1;\n }\n break;\n }\n } else {\n if ((b4 & 192) !== 128) {\n fatals();\n return oneByte(b4);\n }\n if (this.#pending === 1 && this.#left === 2 && this.#cur === 0 && (b4 & 32) === 0) {\n fatals();\n return oneByte(b4);\n }\n if (this.#left === 3 && this.#cur === 0 && (b4 & 48) === 0) {\n fatals();\n return oneByte(b4);\n }\n this.#cur = this.#cur << 6 | b4 & 63;\n this.#pending++;\n if (--this.#left === 0) {\n if (this.ignoreBOM || !this.#first || this.#cur !== BOM) {\n if (this.#cur < 65536) {\n out[pos++] = this.#cur;\n } else {\n const cp = this.#cur - 65536;\n out[pos++] = cp >>> 10 & 1023 | MIN_HIGH_SURROGATE;\n out[pos++] = cp & 1023 | MIN_LOW_SURROGATE;\n }\n }\n this.#cur = 0;\n this.#pending = 0;\n this.#first = false;\n }\n }\n };\n for (const b4 of bytes) {\n if (pos >= maxSize) {\n res.push(String.fromCharCode.apply(null, out.subarray(0, pos)));\n pos = 0;\n }\n oneByte(b4);\n }\n if (!streaming) {\n this.#first = true;\n if (this.#cur || this.#left) {\n fatals();\n }\n }\n if (pos > 0) {\n res.push(String.fromCharCode.apply(null, out.subarray(0, pos)));\n }\n return res.join(\"\");\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/encode.js\n function utf8length(str) {\n let len = 0;\n for (const s4 of str) {\n const cp = s4.codePointAt(0);\n if (cp < 128) {\n len++;\n } else if (cp < 2048) {\n len += 2;\n } else if (cp < 65536) {\n len += 3;\n } else {\n len += 4;\n }\n }\n return len;\n }\n var Wtf8Encoder;\n var init_encode = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/encode.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_const();\n Wtf8Encoder = class {\n encoding = WTF8;\n encode(input) {\n if (!input) {\n return EMPTY;\n }\n const buf = new Uint8Array(utf8length(String(input)));\n this.encodeInto(input, buf);\n return buf;\n }\n encodeInto(source, destination) {\n const str = String(source);\n const len = str.length;\n const outLen = destination.length;\n let written = 0;\n let read = 0;\n for (read = 0; read < len; read++) {\n const c4 = str.codePointAt(read);\n if (c4 < 128) {\n if (written >= outLen) {\n break;\n }\n destination[written++] = c4;\n } else if (c4 < 2048) {\n if (written >= outLen - 1) {\n break;\n }\n destination[written++] = 192 | c4 >> 6;\n destination[written++] = 128 | c4 & 63;\n } else if (c4 < 65536) {\n if (written >= outLen - 2) {\n break;\n }\n destination[written++] = 224 | c4 >> 12;\n destination[written++] = 128 | c4 >> 6 & 63;\n destination[written++] = 128 | c4 & 63;\n } else {\n if (written >= outLen - 3) {\n break;\n }\n destination[written++] = 240 | c4 >> 18;\n destination[written++] = 128 | c4 >> 12 & 63;\n destination[written++] = 128 | c4 >> 6 & 63;\n destination[written++] = 128 | c4 & 63;\n read++;\n }\n }\n return {\n read,\n written\n };\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/decodeStream.js\n var init_decodeStream = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/decodeStream.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_decode();\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/encodeStream.js\n var init_encodeStream = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/encodeStream.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_const();\n init_encode();\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/index.js\n var init_lib = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors();\n init_decode();\n init_encode();\n init_decodeStream();\n init_encodeStream();\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/encoder.js\n function y2(e2) {\n const n2 = e2 < 0;\n return typeof e2 == \"bigint\" ? [n2 ? -e2 - 1n : e2, n2] : [n2 ? -e2 - 1 : e2, n2];\n }\n function T2(e2, n2, t3) {\n if (t3.rejectFloats)\n throw new Error(`Attempt to encode an unwanted floating point number: ${e2}`);\n if (isNaN(e2))\n n2.writeUint8(U2), n2.writeUint16(32256);\n else if (!t3.float64 && Math.fround(e2) === e2) {\n const r2 = s3(e2);\n r2 === null ? (n2.writeUint8(h2), n2.writeFloat32(e2)) : (n2.writeUint8(U2), n2.writeUint16(r2));\n } else\n n2.writeUint8(B), n2.writeFloat64(e2);\n }\n function a(e2, n2, t3) {\n const [r2, i3] = y2(e2);\n if (i3 && t3)\n throw new TypeError(`Negative size: ${e2}`);\n t3 ??= i3 ? f.NEG_INT : f.POS_INT, t3 <<= 5, r2 < 24 ? n2.writeUint8(t3 | r2) : r2 <= 255 ? (n2.writeUint8(t3 | o.ONE), n2.writeUint8(r2)) : r2 <= 65535 ? (n2.writeUint8(t3 | o.TWO), n2.writeUint16(r2)) : r2 <= 4294967295 ? (n2.writeUint8(t3 | o.FOUR), n2.writeUint32(r2)) : (n2.writeUint8(t3 | o.EIGHT), n2.writeBigUint64(BigInt(r2)));\n }\n function p2(e2, n2, t3) {\n typeof e2 == \"number\" ? a(e2, n2, f.TAG) : typeof e2 == \"object\" && !t3.ignoreOriginalEncoding && N.ENCODED in e2 ? n2.write(e2[N.ENCODED]) : e2 <= Number.MAX_SAFE_INTEGER ? a(Number(e2), n2, f.TAG) : (n2.writeUint8(f.TAG << 5 | o.EIGHT), n2.writeBigUint64(BigInt(e2)));\n }\n function N2(e2, n2, t3) {\n const [r2, i3] = y2(e2);\n if (t3.collapseBigInts && (!t3.largeNegativeAsBigInt || e2 >= -0x8000000000000000n)) {\n if (r2 <= 0xffffffffn) {\n a(Number(e2), n2);\n return;\n }\n if (r2 <= 0xffffffffffffffffn) {\n const E2 = (i3 ? f.NEG_INT : f.POS_INT) << 5;\n n2.writeUint8(E2 | o.EIGHT), n2.writeBigUint64(r2);\n return;\n }\n }\n if (t3.rejectBigInts)\n throw new Error(`Attempt to encode unwanted bigint: ${e2}`);\n const o5 = i3 ? I.NEG_BIGINT : I.POS_BIGINT, c4 = r2.toString(16), s4 = c4.length % 2 ? \"0\" : \"\";\n p2(o5, n2, t3);\n const u2 = b(s4 + c4);\n a(u2.length, n2, f.BYTE_STRING), n2.write(u2);\n }\n function Y(e2, n2, t3) {\n t3.flushToZero && (e2 = i2(e2)), Object.is(e2, -0) ? t3.simplifyNegativeZero ? t3.avoidInts ? T2(0, n2, t3) : a(0, n2) : T2(e2, n2, t3) : !t3.avoidInts && Number.isSafeInteger(e2) ? a(e2, n2) : t3.reduceUnsafeNumbers && Math.floor(e2) === e2 && e2 >= S.MIN && e2 <= S.MAX ? N2(BigInt(e2), n2, t3) : T2(e2, n2, t3);\n }\n function Z(e2, n2, t3) {\n const r2 = t3.stringNormalization ? e2.normalize(t3.stringNormalization) : e2;\n if (t3.wtf8 && !e2.isWellFormed()) {\n const i3 = K.encode(r2);\n p2(I.WTF8, n2, t3), a(i3.length, n2, f.BYTE_STRING), n2.write(i3);\n } else {\n const i3 = z.encode(r2);\n a(i3.length, n2, f.UTF8_STRING), n2.write(i3);\n }\n }\n function J(e2, n2, t3) {\n const r2 = e2;\n R2(r2, r2.length, f.ARRAY, n2, t3);\n for (const i3 of r2)\n g2(i3, n2, t3);\n }\n function V(e2, n2) {\n a(e2.length, n2, f.BYTE_STRING), n2.write(e2);\n }\n function ce(e2, n2) {\n return b2.registerEncoder(e2, n2);\n }\n function R2(e2, n2, t3, r2, i3) {\n const o5 = s(e2);\n o5 && !i3.ignoreOriginalEncoding ? r2.write(o5) : a(n2, r2, t3);\n }\n function X(e2, n2, t3) {\n if (e2 === null) {\n n2.writeUint8(q);\n return;\n }\n if (!t3.ignoreOriginalEncoding && N.ENCODED in e2) {\n n2.write(e2[N.ENCODED]);\n return;\n }\n const r2 = e2.constructor;\n if (r2) {\n const o5 = t3.types?.get(r2) ?? b2.get(r2);\n if (o5) {\n const c4 = o5(e2, n2, t3);\n if (c4 !== void 0) {\n if (!Array.isArray(c4) || c4.length !== 2)\n throw new Error(\"Invalid encoder return value\");\n (typeof c4[0] == \"bigint\" || isFinite(Number(c4[0]))) && p2(c4[0], n2, t3), g2(c4[1], n2, t3);\n }\n return;\n }\n }\n if (typeof e2.toCBOR == \"function\") {\n const o5 = e2.toCBOR(n2, t3);\n o5 && ((typeof o5[0] == \"bigint\" || isFinite(Number(o5[0]))) && p2(o5[0], n2, t3), g2(o5[1], n2, t3));\n return;\n }\n if (typeof e2.toJSON == \"function\") {\n g2(e2.toJSON(), n2, t3);\n return;\n }\n const i3 = Object.entries(e2).map((o5) => [o5[0], o5[1], Q(o5[0], t3)]);\n t3.sortKeys && i3.sort(t3.sortKeys), R2(e2, i3.length, f.MAP, n2, t3);\n for (const [o5, c4, s4] of i3)\n n2.write(s4), g2(c4, n2, t3);\n }\n function g2(e2, n2, t3) {\n switch (typeof e2) {\n case \"number\":\n Y(e2, n2, t3);\n break;\n case \"bigint\":\n N2(e2, n2, t3);\n break;\n case \"string\":\n Z(e2, n2, t3);\n break;\n case \"boolean\":\n n2.writeUint8(e2 ? j : P);\n break;\n case \"undefined\":\n if (t3.rejectUndefined)\n throw new Error(\"Attempt to encode unwanted undefined.\");\n n2.writeUint8($);\n break;\n case \"object\":\n X(e2, n2, t3);\n break;\n case \"symbol\":\n throw new TypeError(`Unknown symbol: ${e2.toString()}`);\n default:\n throw new TypeError(`Unknown type: ${typeof e2}, ${String(e2)}`);\n }\n }\n function Q(e2, n2 = {}) {\n const t3 = { ...k };\n n2.dcbor ? Object.assign(t3, H) : n2.cde && Object.assign(t3, F), Object.assign(t3, n2);\n const r2 = new e(t3);\n return g2(e2, r2, t3), r2.read();\n }\n function de(e2, n2, t3 = f.POS_INT) {\n n2 || (n2 = \"f\");\n const r2 = { ...k, collapseBigInts: false, chunkSize: 10, simplifyNegativeZero: false }, i3 = new e(r2), o5 = Number(e2);\n function c4(s4) {\n if (Object.is(e2, -0))\n throw new Error(\"Invalid integer: -0\");\n const [u2, E2] = y2(e2);\n if (E2 && t3 !== f.POS_INT)\n throw new Error(\"Invalid major type combination\");\n const w3 = typeof s4 == \"number\" && isFinite(s4);\n if (w3 && !Number.isSafeInteger(o5))\n throw new TypeError(`Unsafe number for ${n2}: ${e2}`);\n if (u2 > s4)\n throw new TypeError(`Undersized encoding ${n2} for: ${e2}`);\n const A4 = (E2 ? f.NEG_INT : t3) << 5;\n return w3 ? [A4, Number(u2)] : [A4, u2];\n }\n switch (n2) {\n case \"bigint\":\n if (Object.is(e2, -0))\n throw new TypeError(\"Invalid bigint: -0\");\n e2 = BigInt(e2), N2(e2, i3, r2);\n break;\n case \"f\":\n T2(o5, i3, r2);\n break;\n case \"f16\": {\n const s4 = s3(o5);\n if (s4 === null)\n throw new TypeError(`Invalid f16: ${e2}`);\n i3.writeUint8(U2), i3.writeUint16(s4);\n break;\n }\n case \"f32\":\n if (!isNaN(o5) && Math.fround(o5) !== o5)\n throw new TypeError(`Invalid f32: ${e2}`);\n i3.writeUint8(h2), i3.writeFloat32(o5);\n break;\n case \"f64\":\n i3.writeUint8(B), i3.writeFloat64(o5);\n break;\n case \"i\":\n if (Object.is(e2, -0))\n throw new Error(\"Invalid integer: -0\");\n if (Number.isSafeInteger(o5))\n a(o5, i3, e2 < 0 ? void 0 : t3);\n else {\n const [s4, u2] = c4(1 / 0);\n u2 > 0xffffffffffffffffn ? (e2 = BigInt(e2), N2(e2, i3, r2)) : (i3.writeUint8(s4 | o.EIGHT), i3.writeBigUint64(BigInt(u2)));\n }\n break;\n case \"i0\": {\n const [s4, u2] = c4(23);\n i3.writeUint8(s4 | u2);\n break;\n }\n case \"i8\": {\n const [s4, u2] = c4(255);\n i3.writeUint8(s4 | o.ONE), i3.writeUint8(u2);\n break;\n }\n case \"i16\": {\n const [s4, u2] = c4(65535);\n i3.writeUint8(s4 | o.TWO), i3.writeUint16(u2);\n break;\n }\n case \"i32\": {\n const [s4, u2] = c4(4294967295);\n i3.writeUint8(s4 | o.FOUR), i3.writeUint32(u2);\n break;\n }\n case \"i64\": {\n const [s4, u2] = c4(0xffffffffffffffffn);\n i3.writeUint8(s4 | o.EIGHT), i3.writeBigUint64(BigInt(u2));\n break;\n }\n default:\n throw new TypeError(`Invalid number encoding: \"${n2}\"`);\n }\n return d(e2, i3.read());\n }\n var se, U2, h2, B, j, P, $, q, z, K, k, F, H, b2;\n var init_encoder = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/encoder.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_typeEncoderMap();\n init_constants();\n init_sorts();\n init_writer();\n init_box();\n init_float();\n init_lib();\n init_utils();\n ({ ENCODED: se } = N);\n U2 = f.SIMPLE_FLOAT << 5 | o.TWO;\n h2 = f.SIMPLE_FLOAT << 5 | o.FOUR;\n B = f.SIMPLE_FLOAT << 5 | o.EIGHT;\n j = f.SIMPLE_FLOAT << 5 | T.TRUE;\n P = f.SIMPLE_FLOAT << 5 | T.FALSE;\n $ = f.SIMPLE_FLOAT << 5 | T.UNDEFINED;\n q = f.SIMPLE_FLOAT << 5 | T.NULL;\n z = new TextEncoder();\n K = new Wtf8Encoder();\n k = { ...e.defaultOptions, avoidInts: false, cde: false, collapseBigInts: true, dcbor: false, float64: false, flushToZero: false, forceEndian: null, ignoreOriginalEncoding: false, largeNegativeAsBigInt: false, reduceUnsafeNumbers: false, rejectBigInts: false, rejectCustomSimples: false, rejectDuplicateKeys: false, rejectFloats: false, rejectUndefined: false, simplifyNegativeZero: false, sortKeys: null, stringNormalization: null, types: null, wtf8: false };\n F = { cde: true, ignoreOriginalEncoding: true, sortKeys: f4 };\n H = { ...F, dcbor: true, largeNegativeAsBigInt: true, reduceUnsafeNumbers: true, rejectCustomSimples: true, rejectDuplicateKeys: true, rejectUndefined: true, simplifyNegativeZero: true, stringNormalization: \"NFC\" };\n b2 = new s2();\n b2.registerEncoder(Array, J), b2.registerEncoder(Uint8Array, V);\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/options.js\n var o3;\n var init_options = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/options.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n o3 = ((e2) => (e2[e2.NEVER = -1] = \"NEVER\", e2[e2.PREFERRED = 0] = \"PREFERRED\", e2[e2.ALWAYS = 1] = \"ALWAYS\", e2))(o3 || {});\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/simple.js\n var t2;\n var init_simple = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/simple.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_encoder();\n t2 = class _t {\n static KnownSimple = /* @__PURE__ */ new Map([[T.FALSE, false], [T.TRUE, true], [T.NULL, null], [T.UNDEFINED, void 0]]);\n value;\n constructor(e2) {\n this.value = e2;\n }\n static create(e2) {\n return _t.KnownSimple.has(e2) ? _t.KnownSimple.get(e2) : new _t(e2);\n }\n toCBOR(e2, i3) {\n if (i3.rejectCustomSimples)\n throw new Error(`Cannot encode non-standard Simple value: ${this.value}`);\n a(this.value, e2, f.SIMPLE_FLOAT);\n }\n toString() {\n return `simple(${this.value})`;\n }\n decode() {\n return _t.KnownSimple.has(this.value) ? _t.KnownSimple.get(this.value) : this;\n }\n [Symbol.for(\"nodejs.util.inspect.custom\")](e2, i3, r2) {\n return `simple(${r2(this.value, i3)})`;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/decodeStream.js\n var p3, y3;\n var init_decodeStream2 = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/decodeStream.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_utils();\n init_simple();\n init_float();\n p3 = new TextDecoder(\"utf8\", { fatal: true, ignoreBOM: true });\n y3 = class _y {\n static defaultOptions = { maxDepth: 1024, encoding: \"hex\", requirePreferred: false };\n #t;\n #r;\n #e = 0;\n #i;\n constructor(t3, r2) {\n if (this.#i = { ..._y.defaultOptions, ...r2 }, typeof t3 == \"string\")\n switch (this.#i.encoding) {\n case \"hex\":\n this.#t = b(t3);\n break;\n case \"base64\":\n this.#t = y(t3);\n break;\n default:\n throw new TypeError(`Encoding not implemented: \"${this.#i.encoding}\"`);\n }\n else\n this.#t = t3;\n this.#r = new DataView(this.#t.buffer, this.#t.byteOffset, this.#t.byteLength);\n }\n toHere(t3) {\n return R(this.#t, t3, this.#e);\n }\n *[Symbol.iterator]() {\n if (yield* this.#n(0), this.#e !== this.#t.length)\n throw new Error(\"Extra data in input\");\n }\n *seq() {\n for (; this.#e < this.#t.length; )\n yield* this.#n(0);\n }\n *#n(t3) {\n if (t3++ > this.#i.maxDepth)\n throw new Error(`Maximum depth ${this.#i.maxDepth} exceeded`);\n const r2 = this.#e, c4 = this.#r.getUint8(this.#e++), i3 = c4 >> 5, n2 = c4 & 31;\n let e2 = n2, f7 = false, a3 = 0;\n switch (n2) {\n case o.ONE:\n if (a3 = 1, e2 = this.#r.getUint8(this.#e), i3 === f.SIMPLE_FLOAT) {\n if (e2 < 32)\n throw new Error(`Invalid simple encoding in extra byte: ${e2}`);\n f7 = true;\n } else if (this.#i.requirePreferred && e2 < 24)\n throw new Error(`Unexpectedly long integer encoding (1) for ${e2}`);\n break;\n case o.TWO:\n if (a3 = 2, i3 === f.SIMPLE_FLOAT)\n e2 = o2(this.#t, this.#e);\n else if (e2 = this.#r.getUint16(this.#e, false), this.#i.requirePreferred && e2 <= 255)\n throw new Error(`Unexpectedly long integer encoding (2) for ${e2}`);\n break;\n case o.FOUR:\n if (a3 = 4, i3 === f.SIMPLE_FLOAT)\n e2 = this.#r.getFloat32(this.#e, false);\n else if (e2 = this.#r.getUint32(this.#e, false), this.#i.requirePreferred && e2 <= 65535)\n throw new Error(`Unexpectedly long integer encoding (4) for ${e2}`);\n break;\n case o.EIGHT: {\n if (a3 = 8, i3 === f.SIMPLE_FLOAT)\n e2 = this.#r.getFloat64(this.#e, false);\n else if (e2 = this.#r.getBigUint64(this.#e, false), e2 <= Number.MAX_SAFE_INTEGER && (e2 = Number(e2)), this.#i.requirePreferred && e2 <= 4294967295)\n throw new Error(`Unexpectedly long integer encoding (8) for ${e2}`);\n break;\n }\n case 28:\n case 29:\n case 30:\n throw new Error(`Additional info not implemented: ${n2}`);\n case o.INDEFINITE:\n switch (i3) {\n case f.POS_INT:\n case f.NEG_INT:\n case f.TAG:\n throw new Error(`Invalid indefinite encoding for MT ${i3}`);\n case f.SIMPLE_FLOAT:\n yield [i3, n2, N.BREAK, r2, 0];\n return;\n }\n e2 = 1 / 0;\n break;\n default:\n f7 = true;\n }\n switch (this.#e += a3, i3) {\n case f.POS_INT:\n yield [i3, n2, e2, r2, a3];\n break;\n case f.NEG_INT:\n yield [i3, n2, typeof e2 == \"bigint\" ? -1n - e2 : -1 - Number(e2), r2, a3];\n break;\n case f.BYTE_STRING:\n e2 === 1 / 0 ? yield* this.#s(i3, t3, r2) : yield [i3, n2, this.#a(e2), r2, e2];\n break;\n case f.UTF8_STRING:\n e2 === 1 / 0 ? yield* this.#s(i3, t3, r2) : yield [i3, n2, p3.decode(this.#a(e2)), r2, e2];\n break;\n case f.ARRAY:\n if (e2 === 1 / 0)\n yield* this.#s(i3, t3, r2, false);\n else {\n const o5 = Number(e2);\n yield [i3, n2, o5, r2, a3];\n for (let h4 = 0; h4 < o5; h4++)\n yield* this.#n(t3 + 1);\n }\n break;\n case f.MAP:\n if (e2 === 1 / 0)\n yield* this.#s(i3, t3, r2, false);\n else {\n const o5 = Number(e2);\n yield [i3, n2, o5, r2, a3];\n for (let h4 = 0; h4 < o5; h4++)\n yield* this.#n(t3), yield* this.#n(t3);\n }\n break;\n case f.TAG:\n yield [i3, n2, e2, r2, a3], yield* this.#n(t3);\n break;\n case f.SIMPLE_FLOAT: {\n const o5 = e2;\n f7 && (e2 = t2.create(Number(e2))), yield [i3, n2, e2, r2, o5];\n break;\n }\n }\n }\n #a(t3) {\n const r2 = R(this.#t, this.#e, this.#e += t3);\n if (r2.length !== t3)\n throw new Error(`Unexpected end of stream reading ${t3} bytes, got ${r2.length}`);\n return r2;\n }\n *#s(t3, r2, c4, i3 = true) {\n for (yield [t3, o.INDEFINITE, 1 / 0, c4, 1 / 0]; ; ) {\n const n2 = this.#n(r2), e2 = n2.next(), [f7, a3, o5] = e2.value;\n if (o5 === N.BREAK) {\n yield e2.value, n2.next();\n return;\n }\n if (i3) {\n if (f7 !== t3)\n throw new Error(`Unmatched major type. Expected ${t3}, got ${f7}.`);\n if (a3 === o.INDEFINITE)\n throw new Error(\"New stream started in typed stream\");\n }\n yield e2.value, yield* n2;\n }\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/container.js\n function k2(d5, r2) {\n return !r2.boxed && !r2.preferMap && d5.every(([i3]) => typeof i3 == \"string\") ? Object.fromEntries(d5) : new Map(d5);\n }\n var v, A2, w;\n var init_container = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/container.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_options();\n init_sorts();\n init_box();\n init_encoder();\n init_utils();\n init_decodeStream2();\n init_simple();\n init_tag();\n init_float();\n v = /* @__PURE__ */ new Map([[o.ZERO, 1], [o.ONE, 2], [o.TWO, 3], [o.FOUR, 5], [o.EIGHT, 9]]);\n A2 = new Uint8Array(0);\n w = class _w {\n static defaultDecodeOptions = { ...y3.defaultOptions, ParentType: _w, boxed: false, cde: false, dcbor: false, diagnosticSizes: o3.PREFERRED, convertUnsafeIntsToFloat: false, createObject: k2, pretty: false, preferMap: false, rejectLargeNegatives: false, rejectBigInts: false, rejectDuplicateKeys: false, rejectFloats: false, rejectInts: false, rejectLongLoundNaN: false, rejectLongFloats: false, rejectNegativeZero: false, rejectSimple: false, rejectStreaming: false, rejectStringsNotNormalizedAs: null, rejectSubnormals: false, rejectUndefined: false, rejectUnsafeFloatInts: false, saveOriginal: false, sortKeys: null, tags: null };\n static cdeDecodeOptions = { cde: true, rejectStreaming: true, requirePreferred: true, sortKeys: f4 };\n static dcborDecodeOptions = { ...this.cdeDecodeOptions, dcbor: true, convertUnsafeIntsToFloat: true, rejectDuplicateKeys: true, rejectLargeNegatives: true, rejectLongLoundNaN: true, rejectLongFloats: true, rejectNegativeZero: true, rejectSimple: true, rejectUndefined: true, rejectUnsafeFloatInts: true, rejectStringsNotNormalizedAs: \"NFC\" };\n parent;\n mt;\n ai;\n left;\n offset;\n count = 0;\n children = [];\n depth = 0;\n #e;\n #t = null;\n constructor(r2, i3, e2, t3) {\n if ([this.mt, this.ai, , this.offset] = r2, this.left = i3, this.parent = e2, this.#e = t3, e2 && (this.depth = e2.depth + 1), this.mt === f.MAP && (this.#e.sortKeys || this.#e.rejectDuplicateKeys) && (this.#t = []), this.#e.rejectStreaming && this.ai === o.INDEFINITE)\n throw new Error(\"Streaming not supported\");\n }\n get isStreaming() {\n return this.left === 1 / 0;\n }\n get done() {\n return this.left === 0;\n }\n static create(r2, i3, e2, t3) {\n const [s4, l6, n2, c4] = r2;\n switch (s4) {\n case f.POS_INT:\n case f.NEG_INT: {\n if (e2.rejectInts)\n throw new Error(`Unexpected integer: ${n2}`);\n if (e2.rejectLargeNegatives && n2 < -0x8000000000000000n)\n throw new Error(`Invalid 65bit negative number: ${n2}`);\n let o5 = n2;\n return e2.convertUnsafeIntsToFloat && o5 >= S.MIN && o5 <= S.MAX && (o5 = Number(n2)), e2.boxed ? d(o5, t3.toHere(c4)) : o5;\n }\n case f.SIMPLE_FLOAT:\n if (l6 > o.ONE) {\n if (e2.rejectFloats)\n throw new Error(`Decoding unwanted floating point number: ${n2}`);\n if (e2.rejectNegativeZero && Object.is(n2, -0))\n throw new Error(\"Decoding negative zero\");\n if (e2.rejectLongLoundNaN && isNaN(n2)) {\n const o5 = t3.toHere(c4);\n if (o5.length !== 3 || o5[1] !== 126 || o5[2] !== 0)\n throw new Error(`Invalid NaN encoding: \"${A(o5)}\"`);\n }\n if (e2.rejectSubnormals && l3(t3.toHere(c4 + 1)), e2.rejectLongFloats) {\n const o5 = Q(n2, { chunkSize: 9, reduceUnsafeNumbers: e2.rejectUnsafeFloatInts });\n if (o5[0] >> 5 !== s4)\n throw new Error(`Should have been encoded as int, not float: ${n2}`);\n if (o5.length < v.get(l6))\n throw new Error(`Number should have been encoded shorter: ${n2}`);\n }\n if (typeof n2 == \"number\" && e2.boxed)\n return d(n2, t3.toHere(c4));\n } else {\n if (e2.rejectSimple && n2 instanceof t2)\n throw new Error(`Invalid simple value: ${n2}`);\n if (e2.rejectUndefined && n2 === void 0)\n throw new Error(\"Unexpected undefined\");\n }\n return n2;\n case f.BYTE_STRING:\n case f.UTF8_STRING:\n if (n2 === 1 / 0)\n return new e2.ParentType(r2, 1 / 0, i3, e2);\n if (e2.rejectStringsNotNormalizedAs && typeof n2 == \"string\") {\n const o5 = n2.normalize(e2.rejectStringsNotNormalizedAs);\n if (n2 !== o5)\n throw new Error(`String not normalized as \"${e2.rejectStringsNotNormalizedAs}\", got [${U(n2)}] instead of [${U(o5)}]`);\n }\n return e2.boxed ? d(n2, t3.toHere(c4)) : n2;\n case f.ARRAY:\n return new e2.ParentType(r2, n2, i3, e2);\n case f.MAP:\n return new e2.ParentType(r2, n2 * 2, i3, e2);\n case f.TAG: {\n const o5 = new e2.ParentType(r2, 1, i3, e2);\n return o5.children = new i(n2), o5;\n }\n }\n throw new TypeError(`Invalid major type: ${s4}`);\n }\n static decodeToEncodeOpts(r2) {\n return { ...k, avoidInts: r2.rejectInts, float64: !r2.rejectLongFloats, flushToZero: r2.rejectSubnormals, largeNegativeAsBigInt: r2.rejectLargeNegatives, sortKeys: r2.sortKeys };\n }\n push(r2, i3, e2) {\n if (this.children.push(r2), this.#t) {\n const t3 = f2(r2) || i3.toHere(e2);\n this.#t.push(t3);\n }\n return --this.left;\n }\n replaceLast(r2, i3, e2) {\n let t3, s4 = -1 / 0;\n if (this.children instanceof i ? (s4 = 0, t3 = this.children.contents, this.children.contents = r2) : (s4 = this.children.length - 1, t3 = this.children[s4], this.children[s4] = r2), this.#t) {\n const l6 = f2(r2) || e2.toHere(i3.offset);\n this.#t[s4] = l6;\n }\n return t3;\n }\n convert(r2) {\n let i3;\n switch (this.mt) {\n case f.ARRAY:\n i3 = this.children;\n break;\n case f.MAP: {\n const e2 = this.#r();\n if (this.#e.sortKeys) {\n let t3;\n for (const s4 of e2) {\n if (t3 && this.#e.sortKeys(t3, s4) >= 0)\n throw new Error(`Duplicate or out of order key: \"0x${s4[2]}\"`);\n t3 = s4;\n }\n } else if (this.#e.rejectDuplicateKeys) {\n const t3 = /* @__PURE__ */ new Set();\n for (const [s4, l6, n2] of e2) {\n const c4 = A(n2);\n if (t3.has(c4))\n throw new Error(`Duplicate key: \"0x${c4}\"`);\n t3.add(c4);\n }\n }\n i3 = this.#e.createObject(e2, this.#e);\n break;\n }\n case f.BYTE_STRING:\n return d2(this.children);\n case f.UTF8_STRING: {\n const e2 = this.children.join(\"\");\n i3 = this.#e.boxed ? d(e2, r2.toHere(this.offset)) : e2;\n break;\n }\n case f.TAG:\n i3 = this.children.decode(this.#e);\n break;\n default:\n throw new TypeError(`Invalid mt on convert: ${this.mt}`);\n }\n return this.#e.saveOriginal && i3 && typeof i3 == \"object\" && u(i3, r2.toHere(this.offset)), i3;\n }\n #r() {\n const r2 = this.children, i3 = r2.length;\n if (i3 % 2)\n throw new Error(\"Missing map value\");\n const e2 = new Array(i3 / 2);\n if (this.#t)\n for (let t3 = 0; t3 < i3; t3 += 2)\n e2[t3 >> 1] = [r2[t3], r2[t3 + 1], this.#t[t3]];\n else\n for (let t3 = 0; t3 < i3; t3 += 2)\n e2[t3 >> 1] = [r2[t3], r2[t3 + 1], A2];\n return e2;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/diagnostic.js\n function a2(m2, l6, n2, p4) {\n let t3 = \"\";\n if (l6 === o.INDEFINITE)\n t3 += \"_\";\n else {\n if (p4.diagnosticSizes === o3.NEVER)\n return \"\";\n {\n let r2 = p4.diagnosticSizes === o3.ALWAYS;\n if (!r2) {\n let e2 = o.ZERO;\n if (Object.is(n2, -0))\n e2 = o.TWO;\n else if (m2 === f.POS_INT || m2 === f.NEG_INT) {\n const T4 = n2 < 0, u2 = typeof n2 == \"bigint\" ? 1n : 1, o5 = T4 ? -n2 - u2 : n2;\n o5 <= 23 ? e2 = Number(o5) : o5 <= 255 ? e2 = o.ONE : o5 <= 65535 ? e2 = o.TWO : o5 <= 4294967295 ? e2 = o.FOUR : e2 = o.EIGHT;\n } else\n isFinite(n2) ? Math.fround(n2) === n2 ? s3(n2) == null ? e2 = o.FOUR : e2 = o.TWO : e2 = o.EIGHT : e2 = o.TWO;\n r2 = e2 !== l6;\n }\n r2 && (t3 += \"_\", l6 < o.ONE ? t3 += \"i\" : t3 += String(l6 - 24));\n }\n }\n return t3;\n }\n function M(m2, l6) {\n const n2 = { ...w.defaultDecodeOptions, ...l6, ParentType: g3 }, p4 = new y3(m2, n2);\n let t3, r2, e2 = \"\";\n for (const T4 of p4) {\n const [u2, o5, i3] = T4;\n switch (t3 && (t3.count > 0 && i3 !== N.BREAK && (t3.mt === f.MAP && t3.count % 2 ? e2 += \": \" : (e2 += \",\", n2.pretty || (e2 += \" \"))), n2.pretty && (t3.mt !== f.MAP || t3.count % 2 === 0) && (e2 += `\n${O.repeat(t3.depth + 1)}`)), r2 = w.create(T4, t3, n2, p4), u2) {\n case f.POS_INT:\n case f.NEG_INT:\n e2 += String(i3), e2 += a2(u2, o5, i3, n2);\n break;\n case f.SIMPLE_FLOAT:\n if (i3 !== N.BREAK)\n if (typeof i3 == \"number\") {\n const c4 = Object.is(i3, -0) ? \"-0.0\" : String(i3);\n e2 += c4, isFinite(i3) && !/[.e]/.test(c4) && (e2 += \".0\"), e2 += a2(u2, o5, i3, n2);\n } else\n i3 instanceof t2 ? (e2 += \"simple(\", e2 += String(i3.value), e2 += a2(f.POS_INT, o5, i3.value, n2), e2 += \")\") : e2 += String(i3);\n break;\n case f.BYTE_STRING:\n i3 === 1 / 0 ? (e2 += \"(_ \", r2.close = \")\", r2.quote = \"'\") : (e2 += \"h'\", e2 += A(i3), e2 += \"'\", e2 += a2(f.POS_INT, o5, i3.length, n2));\n break;\n case f.UTF8_STRING:\n i3 === 1 / 0 ? (e2 += \"(_ \", r2.close = \")\") : (e2 += JSON.stringify(i3), e2 += a2(f.POS_INT, o5, y4.encode(i3).length, n2));\n break;\n case f.ARRAY: {\n e2 += \"[\";\n const c4 = a2(f.POS_INT, o5, i3, n2);\n e2 += c4, c4 && (e2 += \" \"), n2.pretty && i3 ? r2.close = `\n${O.repeat(r2.depth)}]` : r2.close = \"]\";\n break;\n }\n case f.MAP: {\n e2 += \"{\";\n const c4 = a2(f.POS_INT, o5, i3, n2);\n e2 += c4, c4 && (e2 += \" \"), n2.pretty && i3 ? r2.close = `\n${O.repeat(r2.depth)}}` : r2.close = \"}\";\n break;\n }\n case f.TAG:\n e2 += String(i3), e2 += a2(f.POS_INT, o5, i3, n2), e2 += \"(\", r2.close = \")\";\n break;\n }\n if (r2 === N.BREAK)\n if (t3?.isStreaming)\n t3.left = 0;\n else\n throw new Error(\"Unexpected BREAK\");\n else\n t3 && (t3.count++, t3.left--);\n for (r2 instanceof g3 && (t3 = r2); t3?.done; ) {\n if (t3.isEmptyStream)\n e2 = e2.slice(0, -3), e2 += `${t3.quote}${t3.quote}_`;\n else {\n if (t3.mt === f.MAP && t3.count % 2 !== 0)\n throw new Error(`Odd streaming map size: ${t3.count}`);\n e2 += t3.close;\n }\n t3 = t3.parent;\n }\n }\n return e2;\n }\n var O, y4, g3;\n var init_diagnostic = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/diagnostic.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_options();\n init_constants();\n init_container();\n init_decodeStream2();\n init_simple();\n init_float();\n init_utils();\n O = \" \";\n y4 = new TextEncoder();\n g3 = class extends w {\n close = \"\";\n quote = '\"';\n get isEmptyStream() {\n return (this.mt === f.UTF8_STRING || this.mt === f.BYTE_STRING) && this.count === 0;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/comment.js\n function k3(t3) {\n return t3 instanceof A3;\n }\n function O2(t3, a3) {\n return t3 === 1 / 0 ? \"Indefinite\" : a3 ? `${t3} ${a3}${t3 !== 1 && t3 !== 1n ? \"s\" : \"\"}` : String(t3);\n }\n function y5(t3) {\n return \"\".padStart(t3, \" \");\n }\n function x2(t3, a3, f7) {\n let e2 = \"\";\n e2 += y5(t3.depth * 2);\n const n2 = f2(t3);\n e2 += A(n2.subarray(0, 1));\n const r2 = t3.numBytes();\n r2 && (e2 += \" \", e2 += A(n2.subarray(1, r2 + 1))), e2 = e2.padEnd(a3.minCol + 1, \" \"), e2 += \"-- \", f7 !== void 0 && (e2 += y5(t3.depth * 2), f7 !== \"\" && (e2 += `[${f7}] `));\n let p4 = false;\n const [s4] = t3.children;\n switch (t3.mt) {\n case f.POS_INT:\n e2 += `Unsigned: ${s4}`, typeof s4 == \"bigint\" && (e2 += \"n\");\n break;\n case f.NEG_INT:\n e2 += `Negative: ${s4}`, typeof s4 == \"bigint\" && (e2 += \"n\");\n break;\n case f.BYTE_STRING:\n e2 += `Bytes (Length: ${O2(t3.length)})`;\n break;\n case f.UTF8_STRING:\n e2 += `UTF8 (Length: ${O2(t3.length)})`, t3.length !== 1 / 0 && (e2 += `: ${JSON.stringify(s4)}`);\n break;\n case f.ARRAY:\n e2 += `Array (Length: ${O2(t3.value, \"item\")})`;\n break;\n case f.MAP:\n e2 += `Map (Length: ${O2(t3.value, \"pair\")})`;\n break;\n case f.TAG: {\n e2 += `Tag #${t3.value}`;\n const o5 = t3.children, [m2] = o5.contents.children, i3 = new i(o5.tag, m2);\n u(i3, n2);\n const l6 = i3.comment(a3, t3.depth);\n l6 && (e2 += \": \", e2 += l6), p4 ||= i3.noChildren;\n break;\n }\n case f.SIMPLE_FLOAT:\n s4 === N.BREAK ? e2 += \"BREAK\" : t3.ai > o.ONE ? Object.is(s4, -0) ? e2 += \"Float: -0\" : e2 += `Float: ${s4}` : (e2 += \"Simple: \", s4 instanceof t2 ? e2 += s4.value : e2 += s4);\n break;\n }\n if (!p4)\n if (t3.leaf) {\n if (e2 += `\n`, n2.length > r2 + 1) {\n const o5 = y5((t3.depth + 1) * 2), m2 = f3(n2);\n if (m2?.length) {\n m2.sort((l6, c4) => {\n const g4 = l6[0] - c4[0];\n return g4 || c4[1] - l6[1];\n });\n let i3 = 0;\n for (const [l6, c4, g4] of m2)\n if (!(l6 < i3)) {\n if (i3 = l6 + c4, g4 === \"<<\") {\n e2 += y5(a3.minCol + 1), e2 += \"--\", e2 += o5, e2 += \"<< \";\n const d5 = R(n2, l6, l6 + c4), h4 = f3(d5);\n if (h4) {\n const $3 = h4.findIndex(([w3, D2, v2]) => w3 === 0 && D2 === c4 && v2 === \"<<\");\n $3 >= 0 && h4.splice($3, 1);\n }\n e2 += M(d5), e2 += ` >>\n`, e2 += L(d5, { initialDepth: t3.depth + 1, minCol: a3.minCol, noPrefixHex: true });\n continue;\n } else\n g4 === \"'\" && (e2 += y5(a3.minCol + 1), e2 += \"--\", e2 += o5, e2 += \"'\", e2 += H2.decode(n2.subarray(l6, l6 + c4)), e2 += `'\n`);\n if (l6 > r2)\n for (let d5 = l6; d5 < l6 + c4; d5 += 8) {\n const h4 = Math.min(d5 + 8, l6 + c4);\n e2 += o5, e2 += A(n2.subarray(d5, h4)), e2 += `\n`;\n }\n }\n } else\n for (let i3 = r2 + 1; i3 < n2.length; i3 += 8)\n e2 += o5, e2 += A(n2.subarray(i3, i3 + 8)), e2 += `\n`;\n }\n } else {\n e2 += `\n`;\n let o5 = 0;\n for (const m2 of t3.children) {\n if (k3(m2)) {\n let i3 = String(o5);\n t3.mt === f.MAP ? i3 = o5 % 2 ? `val ${(o5 - 1) / 2}` : `key ${o5 / 2}` : t3.mt === f.TAG && (i3 = \"\"), e2 += x2(m2, a3, i3);\n }\n o5++;\n }\n }\n return e2;\n }\n function L(t3, a3) {\n const f7 = { ...q2, ...a3, ParentType: A3, saveOriginal: true }, e2 = new y3(t3, f7);\n let n2, r2;\n for (const s4 of e2) {\n if (r2 = w.create(s4, n2, f7, e2), s4[2] === N.BREAK)\n if (n2?.isStreaming)\n n2.left = 1;\n else\n throw new Error(\"Unexpected BREAK\");\n if (!k3(r2)) {\n const i3 = new A3(s4, 0, n2, f7);\n i3.leaf = true, i3.children.push(r2), u(i3, e2.toHere(s4[3])), r2 = i3;\n }\n let o5 = (r2.depth + 1) * 2;\n const m2 = r2.numBytes();\n for (m2 && (o5 += 1, o5 += m2 * 2), f7.minCol = Math.max(f7.minCol, o5), n2 && n2.push(r2, e2, s4[3]), n2 = r2; n2?.done; )\n r2 = n2, r2.leaf || u(r2, e2.toHere(r2.offset)), { parent: n2 } = n2;\n }\n a3 && (a3.minCol = f7.minCol);\n let p4 = f7.noPrefixHex ? \"\" : `0x${A(e2.toHere(0))}\n`;\n return p4 += x2(r2, f7), p4;\n }\n var H2, A3, q2;\n var init_comment = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/comment.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_box();\n init_utils();\n init_container();\n init_decodeStream2();\n init_simple();\n init_tag();\n init_diagnostic();\n H2 = new TextDecoder();\n A3 = class extends w {\n depth = 0;\n leaf = false;\n value;\n length;\n [N.ENCODED];\n constructor(a3, f7, e2, n2) {\n super(a3, f7, e2, n2), this.parent ? this.depth = this.parent.depth + 1 : this.depth = n2.initialDepth, [, , this.value, , this.length] = a3;\n }\n numBytes() {\n switch (this.ai) {\n case o.ONE:\n return 1;\n case o.TWO:\n return 2;\n case o.FOUR:\n return 4;\n case o.EIGHT:\n return 8;\n }\n return 0;\n }\n };\n q2 = { ...w.defaultDecodeOptions, initialDepth: 0, noPrefixHex: false, minCol: 0 };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/types.js\n function O3(e2) {\n if (typeof e2 == \"object\" && e2) {\n if (e2.constructor !== Number)\n throw new Error(`Expected number: ${e2}`);\n } else if (typeof e2 != \"number\")\n throw new Error(`Expected number: ${e2}`);\n }\n function E(e2) {\n if (typeof e2 == \"object\" && e2) {\n if (e2.constructor !== String)\n throw new Error(`Expected string: ${e2}`);\n } else if (typeof e2 != \"string\")\n throw new Error(`Expected string: ${e2}`);\n }\n function f5(e2) {\n if (!(e2 instanceof Uint8Array))\n throw new Error(`Expected Uint8Array: ${e2}`);\n }\n function U3(e2) {\n if (!Array.isArray(e2))\n throw new Error(`Expected Array: ${e2}`);\n }\n function h3(e2) {\n return E(e2.contents), new Date(e2.contents);\n }\n function N3(e2) {\n return O3(e2.contents), new Date(e2.contents * 1e3);\n }\n function T3(e2, r2, n2) {\n if (f5(r2.contents), n2.rejectBigInts)\n throw new Error(`Decoding unwanted big integer: ${r2}(h'${A(r2.contents)}')`);\n if (n2.requirePreferred && r2.contents[0] === 0)\n throw new Error(`Decoding overly-large bigint: ${r2.tag}(h'${A(r2.contents)})`);\n let t3 = r2.contents.reduce((o5, d5) => o5 << 8n | BigInt(d5), 0n);\n if (e2 && (t3 = -1n - t3), n2.requirePreferred && t3 >= Number.MIN_SAFE_INTEGER && t3 <= Number.MAX_SAFE_INTEGER)\n throw new Error(`Decoding bigint that could have been int: ${t3}n`);\n return n2.boxed ? d(t3, r2.contents) : t3;\n }\n function D(e2, r2) {\n return f5(e2.contents), e2;\n }\n function c2(e2, r2, n2) {\n f5(e2.contents);\n let t3 = e2.contents.length;\n if (t3 % r2.BYTES_PER_ELEMENT !== 0)\n throw new Error(`Number of bytes must be divisible by ${r2.BYTES_PER_ELEMENT}, got: ${t3}`);\n t3 /= r2.BYTES_PER_ELEMENT;\n const o5 = new r2(t3), d5 = new DataView(e2.contents.buffer, e2.contents.byteOffset, e2.contents.byteLength), u2 = d5[`get${r2.name.replace(/Array/, \"\")}`].bind(d5);\n for (let y6 = 0; y6 < t3; y6++)\n o5[y6] = u2(y6 * r2.BYTES_PER_ELEMENT, n2);\n return o5;\n }\n function l4(e2, r2, n2, t3, o5) {\n const d5 = o5.forceEndian ?? S2;\n if (p2(d5 ? r2 : n2, e2, o5), a(t3.byteLength, e2, f.BYTE_STRING), S2 === d5)\n e2.write(new Uint8Array(t3.buffer, t3.byteOffset, t3.byteLength));\n else {\n const y6 = `write${t3.constructor.name.replace(/Array/, \"\")}`, g4 = e2[y6].bind(e2);\n for (const p4 of t3)\n g4(p4, d5);\n }\n }\n function x3(e2) {\n return f5(e2.contents), new Wtf8Decoder().decode(e2.contents);\n }\n function w2(e2) {\n throw new Error(`Encoding ${e2.constructor.name} intentionally unimplmented. It is not concrete enough to interoperate. Convert to Uint8Array first.`);\n }\n function m(e2) {\n return [NaN, e2.valueOf()];\n }\n var S2, _, $2;\n var init_types = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/types.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_box();\n init_utils();\n init_encoder();\n init_container();\n init_tag();\n init_lib();\n init_comment();\n S2 = !h();\n ce(Map, (e2, r2, n2) => {\n const t3 = [...e2.entries()].map((o5) => [o5[0], o5[1], Q(o5[0], n2)]);\n if (n2.rejectDuplicateKeys) {\n const o5 = /* @__PURE__ */ new Set();\n for (const [d5, u2, y6] of t3) {\n const g4 = A(y6);\n if (o5.has(g4))\n throw new Error(`Duplicate map key: 0x${g4}`);\n o5.add(g4);\n }\n }\n n2.sortKeys && t3.sort(n2.sortKeys), R2(e2, e2.size, f.MAP, r2, n2);\n for (const [o5, d5, u2] of t3)\n r2.write(u2), g2(d5, r2, n2);\n });\n h3.comment = (e2) => (E(e2.contents), `(String Date) ${new Date(e2.contents).toISOString()}`), i.registerDecoder(I.DATE_STRING, h3);\n N3.comment = (e2) => (O3(e2.contents), `(Epoch Date) ${new Date(e2.contents * 1e3).toISOString()}`), i.registerDecoder(I.DATE_EPOCH, N3), ce(Date, (e2) => [I.DATE_EPOCH, e2.valueOf() / 1e3]);\n _ = T3.bind(null, false);\n $2 = T3.bind(null, true);\n _.comment = (e2, r2) => `(Positive BigInt) ${T3(false, e2, r2)}n`, $2.comment = (e2, r2) => `(Negative BigInt) ${T3(true, e2, r2)}n`, i.registerDecoder(I.POS_BIGINT, _), i.registerDecoder(I.NEG_BIGINT, $2);\n D.comment = (e2, r2, n2) => {\n f5(e2.contents);\n const t3 = { ...r2, initialDepth: n2 + 2, noPrefixHex: true }, o5 = f2(e2);\n let u2 = 2 ** ((o5[0] & 31) - 24) + 1;\n const y6 = o5[u2] & 31;\n let g4 = A(o5.subarray(u2, ++u2));\n y6 >= 24 && (g4 += \" \", g4 += A(o5.subarray(u2, u2 + 2 ** (y6 - 24)))), t3.minCol = Math.max(t3.minCol, (n2 + 1) * 2 + g4.length);\n const p4 = L(e2.contents, t3);\n let I2 = `Embedded CBOR\n`;\n return I2 += `${\"\".padStart((n2 + 1) * 2, \" \")}${g4}`.padEnd(t3.minCol + 1, \" \"), I2 += `-- Bytes (Length: ${e2.contents.length})\n`, I2 += p4, I2;\n }, D.noChildren = true, i.registerDecoder(I.CBOR, D), i.registerDecoder(I.URI, (e2) => (E(e2.contents), new URL(e2.contents)), \"URI\"), ce(URL, (e2) => [I.URI, e2.toString()]), i.registerDecoder(I.BASE64URL, (e2) => (E(e2.contents), x(e2.contents)), \"Base64url-encoded\"), i.registerDecoder(I.BASE64, (e2) => (E(e2.contents), y(e2.contents)), \"Base64-encoded\"), i.registerDecoder(35, (e2) => (E(e2.contents), new RegExp(e2.contents)), \"RegExp\"), i.registerDecoder(21065, (e2) => {\n E(e2.contents);\n const r2 = `^(?:${e2.contents})$`;\n return new RegExp(r2, \"u\");\n }, \"I-RegExp\"), i.registerDecoder(I.REGEXP, (e2) => {\n if (U3(e2.contents), e2.contents.length < 1 || e2.contents.length > 2)\n throw new Error(`Invalid RegExp Array: ${e2.contents}`);\n return new RegExp(e2.contents[0], e2.contents[1]);\n }, \"RegExp\"), ce(RegExp, (e2) => [I.REGEXP, [e2.source, e2.flags]]), i.registerDecoder(64, (e2) => (f5(e2.contents), e2.contents), \"uint8 Typed Array\");\n i.registerDecoder(65, (e2) => c2(e2, Uint16Array, false), \"uint16, big endian, Typed Array\"), i.registerDecoder(66, (e2) => c2(e2, Uint32Array, false), \"uint32, big endian, Typed Array\"), i.registerDecoder(67, (e2) => c2(e2, BigUint64Array, false), \"uint64, big endian, Typed Array\"), i.registerDecoder(68, (e2) => (f5(e2.contents), new Uint8ClampedArray(e2.contents)), \"uint8 Typed Array, clamped arithmetic\"), ce(Uint8ClampedArray, (e2) => [68, new Uint8Array(e2.buffer, e2.byteOffset, e2.byteLength)]), i.registerDecoder(69, (e2) => c2(e2, Uint16Array, true), \"uint16, little endian, Typed Array\"), ce(Uint16Array, (e2, r2, n2) => l4(r2, 69, 65, e2, n2)), i.registerDecoder(70, (e2) => c2(e2, Uint32Array, true), \"uint32, little endian, Typed Array\"), ce(Uint32Array, (e2, r2, n2) => l4(r2, 70, 66, e2, n2)), i.registerDecoder(71, (e2) => c2(e2, BigUint64Array, true), \"uint64, little endian, Typed Array\"), ce(BigUint64Array, (e2, r2, n2) => l4(r2, 71, 67, e2, n2)), i.registerDecoder(72, (e2) => (f5(e2.contents), new Int8Array(e2.contents)), \"sint8 Typed Array\"), ce(Int8Array, (e2) => [72, new Uint8Array(e2.buffer, e2.byteOffset, e2.byteLength)]), i.registerDecoder(73, (e2) => c2(e2, Int16Array, false), \"sint16, big endian, Typed Array\"), i.registerDecoder(74, (e2) => c2(e2, Int32Array, false), \"sint32, big endian, Typed Array\"), i.registerDecoder(75, (e2) => c2(e2, BigInt64Array, false), \"sint64, big endian, Typed Array\"), i.registerDecoder(77, (e2) => c2(e2, Int16Array, true), \"sint16, little endian, Typed Array\"), ce(Int16Array, (e2, r2, n2) => l4(r2, 77, 73, e2, n2)), i.registerDecoder(78, (e2) => c2(e2, Int32Array, true), \"sint32, little endian, Typed Array\"), ce(Int32Array, (e2, r2, n2) => l4(r2, 78, 74, e2, n2)), i.registerDecoder(79, (e2) => c2(e2, BigInt64Array, true), \"sint64, little endian, Typed Array\"), ce(BigInt64Array, (e2, r2, n2) => l4(r2, 79, 75, e2, n2)), i.registerDecoder(81, (e2) => c2(e2, Float32Array, false), \"IEEE 754 binary32, big endian, Typed Array\"), i.registerDecoder(82, (e2) => c2(e2, Float64Array, false), \"IEEE 754 binary64, big endian, Typed Array\"), i.registerDecoder(85, (e2) => c2(e2, Float32Array, true), \"IEEE 754 binary32, little endian, Typed Array\"), ce(Float32Array, (e2, r2, n2) => l4(r2, 85, 81, e2, n2)), i.registerDecoder(86, (e2) => c2(e2, Float64Array, true), \"IEEE 754 binary64, big endian, Typed Array\"), ce(Float64Array, (e2, r2, n2) => l4(r2, 86, 82, e2, n2)), i.registerDecoder(I.SET, (e2, r2) => {\n if (U3(e2.contents), r2.sortKeys) {\n const n2 = w.decodeToEncodeOpts(r2);\n let t3 = null;\n for (const o5 of e2.contents) {\n const d5 = [o5, void 0, Q(o5, n2)];\n if (t3 && r2.sortKeys(t3, d5) >= 0)\n throw new Error(`Set items out of order in tag #${I.SET}`);\n t3 = d5;\n }\n }\n return new Set(e2.contents);\n }, \"Set\"), ce(Set, (e2, r2, n2) => {\n let t3 = [...e2];\n if (n2.sortKeys) {\n const o5 = t3.map((d5) => [d5, void 0, Q(d5, n2)]);\n o5.sort(n2.sortKeys), t3 = o5.map(([d5]) => d5);\n }\n return [I.SET, t3];\n }), i.registerDecoder(I.JSON, (e2) => (E(e2.contents), JSON.parse(e2.contents)), \"JSON-encoded\");\n x3.comment = (e2) => {\n f5(e2.contents);\n const r2 = new Wtf8Decoder();\n return `(WTF8 string): ${JSON.stringify(r2.decode(e2.contents))}`;\n }, i.registerDecoder(I.WTF8, x3), i.registerDecoder(I.SELF_DESCRIBED, (e2) => e2.contents, \"Self-Described\"), i.registerDecoder(I.INVALID_16, () => {\n throw new Error(`Tag always invalid: ${I.INVALID_16}`);\n }, \"Invalid\"), i.registerDecoder(I.INVALID_32, () => {\n throw new Error(`Tag always invalid: ${I.INVALID_32}`);\n }, \"Invalid\"), i.registerDecoder(I.INVALID_64, () => {\n throw new Error(`Tag always invalid: ${I.INVALID_64}`);\n }, \"Invalid\");\n ce(ArrayBuffer, w2), ce(DataView, w2), typeof SharedArrayBuffer < \"u\" && ce(SharedArrayBuffer, w2);\n ce(Boolean, m), ce(Number, m), ce(String, m), ce(BigInt, m);\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/version.js\n var o4;\n var init_version = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n o4 = \"2.0.1\";\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/decoder.js\n function c3(i3) {\n const e2 = { ...w.defaultDecodeOptions };\n if (i3.dcbor ? Object.assign(e2, w.dcborDecodeOptions) : i3.cde && Object.assign(e2, w.cdeDecodeOptions), Object.assign(e2, i3), Object.hasOwn(e2, \"rejectLongNumbers\"))\n throw new TypeError(\"rejectLongNumbers has changed to requirePreferred\");\n return e2.boxed && (e2.saveOriginal = true), e2;\n }\n function l5(i3, e2 = {}) {\n const n2 = c3(e2), t3 = new y3(i3, n2), r2 = new d3();\n for (const o5 of t3)\n r2.step(o5, n2, t3);\n return r2.ret;\n }\n function* b3(i3, e2 = {}) {\n const n2 = c3(e2), t3 = new y3(i3, n2), r2 = new d3();\n for (const o5 of t3.seq())\n r2.step(o5, n2, t3), r2.parent || (yield r2.ret);\n }\n var d3, O4;\n var init_decoder = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/decoder.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_decodeStream2();\n init_container();\n init_constants();\n d3 = class {\n parent = void 0;\n ret = void 0;\n step(e2, n2, t3) {\n if (this.ret = w.create(e2, this.parent, n2, t3), e2[2] === N.BREAK)\n if (this.parent?.isStreaming)\n this.parent.left = 0;\n else\n throw new Error(\"Unexpected BREAK\");\n else\n this.parent && this.parent.push(this.ret, t3, e2[3]);\n for (this.ret instanceof w && (this.parent = this.ret); this.parent?.done; ) {\n this.ret = this.parent.convert(t3);\n const r2 = this.parent.parent;\n r2?.replaceLast(this.ret, this.parent, t3), this.parent = r2;\n }\n }\n };\n O4 = class {\n #t;\n #e;\n constructor(e2, n2 = {}) {\n const t3 = new y3(e2, c3(n2));\n this.#t = t3.seq();\n }\n peek() {\n return this.#e || (this.#e = this.#n()), this.#e;\n }\n read() {\n const e2 = this.#e ?? this.#n();\n return this.#e = void 0, e2;\n }\n *[Symbol.iterator]() {\n for (; ; ) {\n const e2 = this.read();\n if (!e2)\n return;\n yield e2;\n }\n }\n #n() {\n const { value: e2, done: n2 } = this.#t.next();\n if (!n2)\n return e2;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/index.js\n var lib_exports = {};\n __export(lib_exports, {\n DiagnosticSizes: () => o3,\n SequenceEvents: () => O4,\n Simple: () => t2,\n Tag: () => i,\n TypeEncoderMap: () => s2,\n Writer: () => e,\n cdeDecodeOptions: () => r,\n cdeEncodeOptions: () => F,\n comment: () => L,\n dcborDecodeOptions: () => n,\n dcborEncodeOptions: () => H,\n decode: () => l5,\n decodeSequence: () => b3,\n defaultDecodeOptions: () => d4,\n defaultEncodeOptions: () => k,\n diagnose: () => M,\n encode: () => Q,\n encodedNumber: () => de,\n getEncoded: () => f2,\n saveEncoded: () => u,\n saveEncodedLength: () => l,\n unbox: () => t,\n version: () => o4\n });\n var r, n, d4;\n var init_lib2 = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_types();\n init_version();\n init_container();\n init_options();\n init_decoder();\n init_diagnostic();\n init_comment();\n init_encoder();\n init_simple();\n init_tag();\n init_writer();\n init_box();\n init_typeEncoderMap();\n ({ cdeDecodeOptions: r, dcborDecodeOptions: n, defaultDecodeOptions: d4 } = w);\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/utils/policyParams.js\n var require_policyParams = __commonJS({\n \"../../libs/contracts-sdk/dist/src/utils/policyParams.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encodePermissionDataForChain = encodePermissionDataForChain;\n exports3.decodePolicyParametersFromChain = decodePolicyParametersFromChain;\n exports3.decodePermissionDataFromChain = decodePermissionDataFromChain;\n exports3.decodePolicyParametersForOneAbility = decodePolicyParametersForOneAbility;\n var cbor2_1 = (init_lib2(), __toCommonJS(lib_exports));\n var utils_1 = require_utils6();\n function encodePermissionDataForChain(permissionData, deletePermissionData) {\n const abilityIpfsCids = [];\n const policyIpfsCids = [];\n const policyParameterValues = [];\n const safePermissionData = permissionData ?? {};\n if (deletePermissionData) {\n for (const abilityIpfsCid of Object.keys(deletePermissionData)) {\n if (safePermissionData[abilityIpfsCid]) {\n throw new Error(`deletePermissionData contains ability ${abilityIpfsCid} which also exists in permissionData. Please separate updates and deletes by ability.`);\n }\n }\n }\n const abilityKeys = [\n ...Object.keys(safePermissionData),\n ...deletePermissionData ? Object.keys(deletePermissionData) : []\n ];\n abilityKeys.forEach((abilityIpfsCid) => {\n abilityIpfsCids.push(abilityIpfsCid);\n const abilityPolicies = safePermissionData[abilityIpfsCid];\n const policiesToDelete = deletePermissionData?.[abilityIpfsCid];\n const abilityPolicyIpfsCids = [];\n const abilityPolicyParameterValues = [];\n if (abilityPolicies) {\n Object.keys(abilityPolicies).forEach((policyIpfsCid) => {\n abilityPolicyIpfsCids.push(policyIpfsCid);\n const policyParams = abilityPolicies[policyIpfsCid];\n const encodedParams = (0, cbor2_1.encode)(policyParams, { collapseBigInts: false });\n abilityPolicyParameterValues.push((0, utils_1.hexlify)(encodedParams));\n });\n } else if (policiesToDelete && policiesToDelete.length > 0) {\n for (const policyIpfsCid of policiesToDelete) {\n abilityPolicyIpfsCids.push(policyIpfsCid);\n abilityPolicyParameterValues.push(\"0x\");\n }\n }\n policyIpfsCids.push(abilityPolicyIpfsCids);\n policyParameterValues.push(abilityPolicyParameterValues);\n });\n return {\n abilityIpfsCids,\n policyIpfsCids,\n policyParameterValues\n };\n }\n function decodePolicyParametersFromChain(policy) {\n const encodedParams = policy.policyParameterValues;\n try {\n const byteArray = (0, utils_1.arrayify)(encodedParams);\n return (0, cbor2_1.decode)(byteArray);\n } catch (error) {\n console.error(\"Error decoding policy parameters:\", error);\n throw error;\n }\n }\n function decodePermissionDataFromChain(abilitiesWithPolicies) {\n const permissionData = {};\n for (const ability of abilitiesWithPolicies) {\n const { abilityIpfsCid, policies } = ability;\n permissionData[abilityIpfsCid] = decodePolicyParametersForOneAbility({ policies });\n }\n return permissionData;\n }\n function decodePolicyParametersForOneAbility({ policies }) {\n const policyParamsDict = {};\n for (const policy of policies) {\n const { policyIpfsCid, policyParameterValues } = policy;\n if (!policyParameterValues || policyParameterValues === \"0x\") {\n continue;\n }\n policyParamsDict[policyIpfsCid] = decodePolicyParametersFromChain(policy);\n }\n return policyParamsDict;\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/internal/user/User.js\n var require_User = __commonJS({\n \"../../libs/contracts-sdk/dist/src/internal/user/User.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.permitApp = permitApp;\n exports3.unPermitApp = unPermitApp;\n exports3.rePermitApp = rePermitApp;\n exports3.setAbilityPolicyParameters = setAbilityPolicyParameters;\n var utils_1 = require_utils7();\n var pkpInfo_1 = require_pkpInfo();\n var policyParams_1 = require_policyParams();\n async function permitApp(params) {\n const { contract, args: { pkpEthAddress, appId, appVersion, permissionData }, overrides } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const flattenedParams = (0, policyParams_1.encodePermissionDataForChain)(permissionData);\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"permitAppVersion\", [\n pkpTokenId,\n appId,\n appVersion,\n flattenedParams.abilityIpfsCids,\n flattenedParams.policyIpfsCids,\n flattenedParams.policyParameterValues\n ], overrides);\n const tx = await contract.permitAppVersion(pkpTokenId, appId, appVersion, flattenedParams.abilityIpfsCids, flattenedParams.policyIpfsCids, flattenedParams.policyParameterValues, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Permit App: ${decodedError}`);\n }\n }\n async function unPermitApp({ contract, args: { pkpEthAddress, appId, appVersion }, overrides }) {\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"unPermitAppVersion\", [pkpTokenId, appId, appVersion], overrides);\n const tx = await contract.unPermitAppVersion(pkpTokenId, appId, appVersion, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to UnPermit App: ${decodedError}`);\n }\n }\n async function rePermitApp(params) {\n const { contract, args: { pkpEthAddress, appId }, overrides } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"rePermitApp\", [pkpTokenId, appId], overrides);\n const tx = await contract.rePermitApp(pkpTokenId, appId, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Re-Permit App: ${decodedError}`);\n }\n }\n async function setAbilityPolicyParameters(params) {\n const { contract, args: { appId, appVersion, pkpEthAddress, policyParams, deletePermissionData }, overrides } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const flattenedParams = (0, policyParams_1.encodePermissionDataForChain)(policyParams, deletePermissionData);\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"setAbilityPolicyParameters\", [\n pkpTokenId,\n appId,\n appVersion,\n flattenedParams.abilityIpfsCids,\n flattenedParams.policyIpfsCids,\n flattenedParams.policyParameterValues\n ], overrides);\n const tx = await contract.setAbilityPolicyParameters(pkpTokenId, appId, appVersion, flattenedParams.abilityIpfsCids, flattenedParams.policyIpfsCids, flattenedParams.policyParameterValues, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Set Ability Policy Parameters: ${decodedError}`);\n }\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/internal/user/UserView.js\n var require_UserView = __commonJS({\n \"../../libs/contracts-sdk/dist/src/internal/user/UserView.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getAllRegisteredAgentPkpEthAddresses = getAllRegisteredAgentPkpEthAddresses;\n exports3.getPermittedAppVersionForPkp = getPermittedAppVersionForPkp;\n exports3.getAllPermittedAppIdsForPkp = getAllPermittedAppIdsForPkp;\n exports3.getPermittedAppsForPkps = getPermittedAppsForPkps;\n exports3.getAllAbilitiesAndPoliciesForApp = getAllAbilitiesAndPoliciesForApp;\n exports3.validateAbilityExecutionAndGetPolicies = validateAbilityExecutionAndGetPolicies;\n exports3.getLastPermittedAppVersionForPkp = getLastPermittedAppVersionForPkp;\n exports3.getUnpermittedAppsForPkps = getUnpermittedAppsForPkps;\n exports3.isDelegateePermitted = isDelegateePermitted;\n var constants_1 = require_constants3();\n var utils_1 = require_utils7();\n var pkpInfo_1 = require_pkpInfo();\n var policyParams_1 = require_policyParams();\n async function getAllRegisteredAgentPkpEthAddresses(params) {\n const { contract, args: { userPkpAddress, offset } } = params;\n try {\n const pkpTokenIds = await contract.getAllRegisteredAgentPkps(userPkpAddress, offset);\n const pkpEthAdddresses = [];\n for (const tokenId of pkpTokenIds) {\n const pkpEthAddress = await (0, pkpInfo_1.getPkpEthAddress)({ signer: contract.signer, tokenId });\n pkpEthAdddresses.push(pkpEthAddress);\n }\n return pkpEthAdddresses;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"NoRegisteredPkpsFound\")) {\n return [];\n }\n throw new Error(`Failed to Get All Registered Agent PKPs: ${decodedError}`);\n }\n }\n async function getPermittedAppVersionForPkp(params) {\n const { contract, args: { pkpEthAddress, appId } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const appVersion = await contract.getPermittedAppVersionForPkp(pkpTokenId, appId);\n if (!appVersion)\n return null;\n return appVersion;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Permitted App Version For PKP: ${decodedError}`);\n }\n }\n async function getAllPermittedAppIdsForPkp(params) {\n const { contract, args: { pkpEthAddress, offset } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const appIds = await contract.getAllPermittedAppIdsForPkp(pkpTokenId, offset);\n return appIds.map((id) => id);\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get All Permitted App IDs For PKP: ${decodedError}`);\n }\n }\n async function getPermittedAppsForPkps(params) {\n const { contract, args: { pkpEthAddresses, offset, pageSize = constants_1.DEFAULT_PAGE_SIZE } } = params;\n try {\n const pkpTokenIds = [];\n for (const pkpEthAddress of pkpEthAddresses) {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n pkpTokenIds.push(pkpTokenId);\n }\n const results = await contract.getPermittedAppsForPkps(pkpTokenIds, offset, pageSize);\n return results.map((result) => ({\n pkpTokenId: result.pkpTokenId.toString(),\n permittedApps: result.permittedApps.map((app) => ({\n appId: app.appId,\n version: app.version,\n versionEnabled: app.versionEnabled,\n isDeleted: app.isDeleted\n }))\n }));\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Permitted Apps For PKPs: ${decodedError}`);\n }\n }\n async function getAllAbilitiesAndPoliciesForApp(params) {\n const { contract, args: { pkpEthAddress, appId } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const abilities = await contract.getAllAbilitiesAndPoliciesForApp(pkpTokenId, appId);\n return (0, policyParams_1.decodePermissionDataFromChain)(abilities);\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get All Abilities And Policies For App: ${decodedError}`);\n }\n }\n async function validateAbilityExecutionAndGetPolicies(params) {\n const { contract, args: { delegateeAddress, pkpEthAddress, abilityIpfsCid } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const validationResult = await contract.validateAbilityExecutionAndGetPolicies(delegateeAddress, pkpTokenId, abilityIpfsCid);\n const { policies } = validationResult;\n const decodedPolicies = (0, policyParams_1.decodePolicyParametersForOneAbility)({ policies });\n return {\n ...validationResult,\n appId: validationResult.appId,\n appVersion: validationResult.appVersion,\n decodedPolicies\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Validate Ability Execution And Get Policies: ${decodedError}`);\n }\n }\n async function getLastPermittedAppVersionForPkp(params) {\n const { contract, args: { pkpEthAddress, appId } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const lastPermittedVersion = await contract.getLastPermittedAppVersionForPkp(pkpTokenId, appId);\n if (!lastPermittedVersion)\n return null;\n return lastPermittedVersion;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Last Permitted App Version: ${decodedError}`);\n }\n }\n async function getUnpermittedAppsForPkps(params) {\n const { contract, args: { pkpEthAddresses, offset } } = params;\n try {\n const pkpTokenIds = [];\n for (const pkpEthAddress of pkpEthAddresses) {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n pkpTokenIds.push(pkpTokenId);\n }\n const results = await contract.getUnpermittedAppsForPkps(pkpTokenIds, offset);\n return results.map((result) => ({\n pkpTokenId: result.pkpTokenId.toString(),\n unpermittedApps: result.unpermittedApps.map((app) => ({\n appId: app.appId,\n previousPermittedVersion: app.previousPermittedVersion,\n versionEnabled: app.versionEnabled,\n isDeleted: app.isDeleted\n }))\n }));\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Unpermitted Apps For PKPs: ${decodedError}`);\n }\n }\n async function isDelegateePermitted(params) {\n const { contract, args: { delegateeAddress, pkpEthAddress, abilityIpfsCid } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const isPermitted = await contract.isDelegateePermitted(delegateeAddress, pkpTokenId, abilityIpfsCid);\n return isPermitted;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Check If Delegatee Is Permitted: ${decodedError}`);\n }\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/contractClient.js\n var require_contractClient = __commonJS({\n \"../../libs/contracts-sdk/dist/src/contractClient.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.clientFromContract = clientFromContract;\n exports3.getTestClient = getTestClient;\n exports3.getClient = getClient;\n var constants_1 = require_constants3();\n var App_1 = require_App();\n var AppView_1 = require_AppView();\n var User_1 = require_User();\n var UserView_1 = require_UserView();\n var utils_1 = require_utils7();\n function clientFromContract({ contract }) {\n return {\n // App write methods\n registerApp: (params, overrides) => (0, App_1.registerApp)({ contract, args: params, overrides }),\n registerNextVersion: (params, overrides) => (0, App_1.registerNextVersion)({ contract, args: params, overrides }),\n enableAppVersion: (params, overrides) => (0, App_1.enableAppVersion)({ contract, args: params, overrides }),\n addDelegatee: (params, overrides) => (0, App_1.addDelegatee)({ contract, args: params, overrides }),\n removeDelegatee: (params, overrides) => (0, App_1.removeDelegatee)({ contract, args: params, overrides }),\n setDelegatee: (params, overrides) => (0, App_1.setDelegatee)({ contract, args: params, overrides }),\n deleteApp: (params, overrides) => (0, App_1.deleteApp)({ contract, args: params, overrides }),\n undeleteApp: (params, overrides) => (0, App_1.undeleteApp)({ contract, args: params, overrides }),\n // App view methods\n getAppById: (params) => (0, AppView_1.getAppById)({ contract, args: params }),\n getAppIdByDelegatee: (params) => (0, AppView_1.getAppIdByDelegatee)({ contract, args: params }),\n getAppVersion: (params) => (0, AppView_1.getAppVersion)({ contract, args: params }),\n getAppsByManagerAddress: (params) => (0, AppView_1.getAppsByManagerAddress)({ contract, args: params }),\n getAppByDelegateeAddress: (params) => (0, AppView_1.getAppByDelegateeAddress)({ contract, args: params }),\n getDelegatedPkpEthAddresses: (params) => (0, AppView_1.getDelegatedPkpEthAddresses)({ contract, args: params }),\n // User write methods\n permitApp: (params, overrides) => (0, User_1.permitApp)({ contract, args: params, overrides }),\n unPermitApp: (params, overrides) => (0, User_1.unPermitApp)({ contract, args: params, overrides }),\n rePermitApp: (params, overrides) => (0, User_1.rePermitApp)({ contract, args: params, overrides }),\n setAbilityPolicyParameters: (params, overrides) => (0, User_1.setAbilityPolicyParameters)({ contract, args: params, overrides }),\n // User view methods\n getAllRegisteredAgentPkpEthAddresses: (params) => (0, UserView_1.getAllRegisteredAgentPkpEthAddresses)({ contract, args: params }),\n getPermittedAppVersionForPkp: (params) => (0, UserView_1.getPermittedAppVersionForPkp)({ contract, args: params }),\n getAllPermittedAppIdsForPkp: (params) => (0, UserView_1.getAllPermittedAppIdsForPkp)({ contract, args: params }),\n getPermittedAppsForPkps: (params) => (0, UserView_1.getPermittedAppsForPkps)({ contract, args: params }),\n getAllAbilitiesAndPoliciesForApp: (params) => (0, UserView_1.getAllAbilitiesAndPoliciesForApp)({ contract, args: params }),\n validateAbilityExecutionAndGetPolicies: (params) => (0, UserView_1.validateAbilityExecutionAndGetPolicies)({ contract, args: params }),\n isDelegateePermitted: (params) => (0, UserView_1.isDelegateePermitted)({ contract, args: params }),\n getLastPermittedAppVersionForPkp: (params) => (0, UserView_1.getLastPermittedAppVersionForPkp)({ contract, args: params }),\n getUnpermittedAppsForPkps: (params) => (0, UserView_1.getUnpermittedAppsForPkps)({ contract, args: params })\n };\n }\n function getTestClient({ signer }) {\n const contract = (0, utils_1.createContract)({\n signer,\n contractAddress: constants_1.VINCENT_DIAMOND_CONTRACT_ADDRESS_DEV\n });\n return clientFromContract({ contract });\n }\n function getClient({ signer }) {\n const contract = (0, utils_1.createContract)({\n signer,\n contractAddress: constants_1.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD\n });\n return clientFromContract({ contract });\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/index.js\n var require_src = __commonJS({\n \"../../libs/contracts-sdk/dist/src/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.COMBINED_ABI = exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD = exports3.getPkpTokenId = exports3.createContract = exports3.getClient = exports3.clientFromContract = exports3.getTestClient = void 0;\n var contractClient_1 = require_contractClient();\n Object.defineProperty(exports3, \"getTestClient\", { enumerable: true, get: function() {\n return contractClient_1.getTestClient;\n } });\n Object.defineProperty(exports3, \"clientFromContract\", { enumerable: true, get: function() {\n return contractClient_1.clientFromContract;\n } });\n Object.defineProperty(exports3, \"getClient\", { enumerable: true, get: function() {\n return contractClient_1.getClient;\n } });\n var utils_1 = require_utils7();\n Object.defineProperty(exports3, \"createContract\", { enumerable: true, get: function() {\n return utils_1.createContract;\n } });\n var pkpInfo_1 = require_pkpInfo();\n Object.defineProperty(exports3, \"getPkpTokenId\", { enumerable: true, get: function() {\n return pkpInfo_1.getPkpTokenId;\n } });\n var constants_1 = require_constants3();\n Object.defineProperty(exports3, \"VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD\", { enumerable: true, get: function() {\n return constants_1.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD;\n } });\n Object.defineProperty(exports3, \"COMBINED_ABI\", { enumerable: true, get: function() {\n return constants_1.COMBINED_ABI;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/policyParameters/getOnchainPolicyParams.js\n var require_getOnchainPolicyParams = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/policyParameters/getOnchainPolicyParams.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getPoliciesAndAppVersion = exports3.getDecodedPolicyParams = void 0;\n var ethers_1 = require_lib32();\n var vincent_contracts_sdk_1 = require_src();\n var utils_1 = require_utils();\n var getDecodedPolicyParams = async ({ decodedPolicies, policyIpfsCid }) => {\n console.log(\"All on-chain policy params:\", JSON.stringify(decodedPolicies, utils_1.bigintReplacer));\n const policyParams = decodedPolicies[policyIpfsCid];\n if (policyParams) {\n return policyParams;\n }\n console.log(\"Found no on-chain parameters for policy IPFS CID:\", policyIpfsCid);\n return void 0;\n };\n exports3.getDecodedPolicyParams = getDecodedPolicyParams;\n var getPoliciesAndAppVersion = async ({ delegationRpcUrl, appDelegateeAddress, agentWalletPkpEthAddress, abilityIpfsCid }) => {\n console.log(\"getPoliciesAndAppVersion\", {\n delegationRpcUrl,\n appDelegateeAddress,\n agentWalletPkpEthAddress,\n abilityIpfsCid\n });\n try {\n const signer = ethers_1.ethers.Wallet.createRandom().connect(new ethers_1.ethers.providers.StaticJsonRpcProvider(delegationRpcUrl));\n const contractClient = (0, vincent_contracts_sdk_1.getClient)({\n signer\n });\n const validationResult = await contractClient.validateAbilityExecutionAndGetPolicies({\n delegateeAddress: appDelegateeAddress,\n pkpEthAddress: agentWalletPkpEthAddress,\n abilityIpfsCid\n });\n if (!validationResult.isPermitted) {\n throw new Error(`App Delegatee: ${appDelegateeAddress} is not permitted to execute Vincent Ability: ${abilityIpfsCid} for App ID: ${validationResult.appId} App Version: ${validationResult.appVersion} using Agent Wallet PKP Address: ${agentWalletPkpEthAddress}`);\n }\n return {\n appId: ethers_1.ethers.BigNumber.from(validationResult.appId),\n appVersion: ethers_1.ethers.BigNumber.from(validationResult.appVersion),\n decodedPolicies: validationResult.decodedPolicies\n };\n } catch (error) {\n throw new Error(`Error getting on-chain policy parameters from Vincent contract using App Delegatee: ${appDelegateeAddress} and Agent Wallet PKP Address: ${agentWalletPkpEthAddress} and Vincent Ability: ${abilityIpfsCid}: ${error instanceof Error ? error.message : String(error)}`);\n }\n };\n exports3.getPoliciesAndAppVersion = getPoliciesAndAppVersion;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/handlers/constants.js\n var require_constants4 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/handlers/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LIT_DATIL_PUBKEY_ROUTER_ADDRESS = void 0;\n exports3.LIT_DATIL_PUBKEY_ROUTER_ADDRESS = \"0xF182d6bEf16Ba77e69372dD096D8B70Bc3d5B475\";\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/handlers/vincentPolicyHandler.js\n var require_vincentPolicyHandler = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/handlers/vincentPolicyHandler.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.vincentPolicyHandler = vincentPolicyHandler;\n var ethers_1 = require_lib32();\n var helpers_1 = require_helpers2();\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n var helpers_2 = require_helpers();\n var getOnchainPolicyParams_1 = require_getOnchainPolicyParams();\n var utils_1 = require_utils();\n var constants_1 = require_constants4();\n async function vincentPolicyHandler({ vincentPolicy, context: context2, abilityParams: abilityParams2 }) {\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion);\n const { delegatorPkpEthAddress, abilityIpfsCid } = context2;\n console.log(\"actionIpfsIds:\", LitAuth.actionIpfsIds.join(\",\"));\n const policyIpfsCid = LitAuth.actionIpfsIds[0];\n console.log(\"context:\", JSON.stringify(context2, utils_1.bigintReplacer));\n try {\n const delegationRpcUrl = await Lit.Actions.getRpcUrl({\n chain: \"yellowstone\"\n });\n const userPkpInfo = await (0, helpers_1.getPkpInfo)({\n litPubkeyRouterAddress: constants_1.LIT_DATIL_PUBKEY_ROUTER_ADDRESS,\n yellowstoneRpcUrl: delegationRpcUrl,\n pkpEthAddress: delegatorPkpEthAddress\n });\n const appDelegateeAddress = ethers_1.ethers.utils.getAddress(LitAuth.authSigAddress);\n console.log(\"appDelegateeAddress\", appDelegateeAddress);\n const { decodedPolicies, appId, appVersion } = await (0, getOnchainPolicyParams_1.getPoliciesAndAppVersion)({\n delegationRpcUrl,\n appDelegateeAddress,\n agentWalletPkpEthAddress: delegatorPkpEthAddress,\n abilityIpfsCid\n });\n const baseContext = {\n delegation: {\n delegateeAddress: appDelegateeAddress,\n delegatorPkpInfo: userPkpInfo\n },\n abilityIpfsCid,\n appId: appId.toNumber(),\n appVersion: appVersion.toNumber()\n };\n const onChainPolicyParams = await (0, getOnchainPolicyParams_1.getDecodedPolicyParams)({\n decodedPolicies,\n policyIpfsCid\n });\n console.log(\"onChainPolicyParams:\", JSON.stringify(onChainPolicyParams, utils_1.bigintReplacer));\n const evaluateResult = await vincentPolicy.evaluate({\n abilityParams: abilityParams2,\n userParams: onChainPolicyParams\n }, baseContext);\n console.log(\"evaluateResult:\", JSON.stringify(evaluateResult, utils_1.bigintReplacer));\n Lit.Actions.setResponse({\n response: JSON.stringify({\n ...evaluateResult\n })\n });\n } catch (error) {\n console.log(\"Policy evaluation failed:\", error.message, error.stack);\n Lit.Actions.setResponse({\n response: JSON.stringify((0, helpers_2.createDenyResult)({\n runtimeError: error instanceof Error ? error.message : String(error)\n }))\n });\n }\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/validatePolicies.js\n var require_validatePolicies = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/validatePolicies.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.validatePolicies = validatePolicies;\n var getMappedAbilityPolicyParams_1 = require_getMappedAbilityPolicyParams();\n async function validatePolicies({ decodedPolicies, vincentAbility: vincentAbility2, abilityIpfsCid, parsedAbilityParams }) {\n const validatedPolicies = [];\n for (const policyIpfsCid of Object.keys(decodedPolicies)) {\n const abilityPolicy = vincentAbility2.supportedPolicies.policyByIpfsCid[policyIpfsCid];\n console.log(\"vincentAbility.supportedPolicies\", Object.keys(vincentAbility2.supportedPolicies.policyByIpfsCid));\n if (!abilityPolicy) {\n throw new Error(`Policy with IPFS CID ${policyIpfsCid} is registered on-chain but not supported by this ability. Vincent Ability: ${abilityIpfsCid}`);\n }\n const policyPackageName = abilityPolicy.vincentPolicy.packageName;\n if (!abilityPolicy.abilityParameterMappings) {\n throw new Error(\"abilityParameterMappings missing on policy\");\n }\n console.log(\"abilityPolicy.abilityParameterMappings\", JSON.stringify(abilityPolicy.abilityParameterMappings));\n const abilityPolicyParams = (0, getMappedAbilityPolicyParams_1.getMappedAbilityPolicyParams)({\n abilityParameterMappings: abilityPolicy.abilityParameterMappings,\n parsedAbilityParams\n });\n validatedPolicies.push({\n parameters: decodedPolicies[policyIpfsCid] || {},\n policyPackageName,\n abilityPolicyParams\n });\n }\n return validatedPolicies;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/handlers/evaluatePolicies.js\n var require_evaluatePolicies = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/handlers/evaluatePolicies.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.evaluatePolicies = evaluatePolicies;\n var zod_1 = require_cjs();\n var helpers_1 = require_helpers();\n var resultCreators_1 = require_resultCreators();\n async function evaluatePolicies({ vincentAbility: vincentAbility2, context: context2, validatedPolicies, vincentAbilityApiVersion: vincentAbilityApiVersion2 }) {\n const evaluatedPolicies = [];\n let policyDeniedResult = void 0;\n const rawAllowedPolicies = {};\n for (const { policyPackageName, abilityPolicyParams } of validatedPolicies) {\n evaluatedPolicies.push(policyPackageName);\n const policy = vincentAbility2.supportedPolicies.policyByPackageName[policyPackageName];\n try {\n const litActionResponse = await Lit.Actions.call({\n ipfsId: policy.ipfsCid,\n params: {\n abilityParams: abilityPolicyParams,\n context: {\n abilityIpfsCid: context2.abilityIpfsCid,\n delegatorPkpEthAddress: context2.delegation.delegatorPkpInfo.ethAddress\n },\n vincentAbilityApiVersion: vincentAbilityApiVersion2\n }\n });\n console.log(`evaluated ${String(policyPackageName)} policy, result is:`, JSON.stringify(litActionResponse));\n const result = parseAndValidateEvaluateResult({\n litActionResponse,\n vincentPolicy: policy.vincentPolicy\n });\n if ((0, helpers_1.isPolicyDenyResponse)(result)) {\n policyDeniedResult = {\n ...result,\n packageName: policyPackageName\n };\n } else {\n rawAllowedPolicies[policyPackageName] = {\n result: result.result\n };\n }\n } catch (err) {\n const denyResult = (0, helpers_1.createDenyResult)({\n runtimeError: err instanceof Error ? err.message : \"Unknown error\"\n });\n policyDeniedResult = { ...denyResult, packageName: policyPackageName };\n }\n }\n if (policyDeniedResult) {\n return (0, resultCreators_1.createDenyEvaluationResult)({\n allowedPolicies: rawAllowedPolicies,\n evaluatedPolicies,\n deniedPolicy: policyDeniedResult\n });\n }\n return (0, resultCreators_1.createAllowEvaluationResult)({\n evaluatedPolicies,\n allowedPolicies: rawAllowedPolicies\n });\n }\n function parseAndValidateEvaluateResult({ litActionResponse, vincentPolicy }) {\n let parsedLitActionResponse;\n try {\n parsedLitActionResponse = JSON.parse(litActionResponse);\n } catch (error) {\n console.log(\"rawLitActionResponse (parsePolicyExecutionResult)\", litActionResponse);\n throw new Error(`Failed to JSON parse Lit Action Response: ${error instanceof Error ? error.message : String(error)}. rawLitActionResponse in request logs (parsePolicyExecutionResult)`);\n }\n try {\n console.log(\"parseAndValidateEvaluateResult\", JSON.stringify(parsedLitActionResponse));\n if ((0, helpers_1.isPolicyDenyResponse)(parsedLitActionResponse) && (parsedLitActionResponse.schemaValidationError || parsedLitActionResponse.runtimeError)) {\n console.log(\"parsedLitActionResponse is a deny response with a runtime error or schema validation error; skipping schema validation\");\n return parsedLitActionResponse;\n }\n if (!(0, helpers_1.isPolicyResponse)(parsedLitActionResponse)) {\n throw new Error(`Invalid response from policy: ${JSON.stringify(parsedLitActionResponse)}`);\n }\n const { schemaToUse, parsedType } = (0, helpers_1.getSchemaForPolicyResponseResult)({\n value: parsedLitActionResponse,\n denyResultSchema: vincentPolicy.evalDenyResultSchema || zod_1.z.undefined(),\n allowResultSchema: vincentPolicy.evalAllowResultSchema || zod_1.z.undefined()\n });\n console.log(\"parsedType\", parsedType);\n const parsedResult = (0, helpers_1.validateOrDeny)(parsedLitActionResponse.result, schemaToUse, \"evaluate\", \"output\");\n if ((0, helpers_1.isPolicyDenyResponse)(parsedResult)) {\n return parsedResult;\n }\n if ((0, helpers_1.isPolicyDenyResponse)(parsedLitActionResponse)) {\n return (0, helpers_1.createDenyResult)({\n runtimeError: parsedLitActionResponse.runtimeError,\n schemaValidationError: parsedLitActionResponse.schemaValidationError,\n result: parsedResult\n });\n }\n return (0, resultCreators_1.createAllowResult)({\n result: parsedResult\n });\n } catch (err) {\n console.log(\"parseAndValidateEvaluateResult error; returning noResultDeny\", err.message, err.stack);\n return (0, resultCreators_1.returnNoResultDeny)(err instanceof Error ? err.message : \"Unknown error\");\n }\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/handlers/vincentAbilityHandler.js\n var require_vincentAbilityHandler = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/handlers/vincentAbilityHandler.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.vincentAbilityHandler = void 0;\n exports3.createAbilityExecutionContext = createAbilityExecutionContext;\n var ethers_1 = require_lib32();\n var helpers_1 = require_helpers2();\n var typeGuards_1 = require_typeGuards2();\n var validatePolicies_1 = require_validatePolicies();\n var zod_1 = require_zod2();\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n var getOnchainPolicyParams_1 = require_getOnchainPolicyParams();\n var utils_1 = require_utils();\n var constants_1 = require_constants4();\n var evaluatePolicies_1 = require_evaluatePolicies();\n function createAbilityExecutionContext({ vincentAbility: vincentAbility2, policyEvaluationResults, baseContext }) {\n if (!policyEvaluationResults.allow) {\n throw new Error(\"Received denied policies to createAbilityExecutionContext()\");\n }\n const newContext = {\n allow: true,\n evaluatedPolicies: policyEvaluationResults.evaluatedPolicies,\n allowedPolicies: {}\n };\n const policyByPackageName = vincentAbility2.supportedPolicies.policyByPackageName;\n const allowedKeys = Object.keys(policyEvaluationResults.allowedPolicies);\n for (const packageName of allowedKeys) {\n const entry = policyEvaluationResults.allowedPolicies[packageName];\n const policy = policyByPackageName[packageName];\n const vincentPolicy = policy.vincentPolicy;\n if (!entry) {\n throw new Error(`Missing entry on allowedPolicies for policy: ${packageName}`);\n }\n const resultWrapper = {\n result: entry.result\n };\n if (vincentPolicy.commit) {\n const commitFn = vincentPolicy.commit;\n resultWrapper.commit = (commitParams) => {\n return commitFn(commitParams, baseContext);\n };\n }\n newContext.allowedPolicies[packageName] = resultWrapper;\n }\n return newContext;\n }\n var vincentAbilityHandler2 = ({ vincentAbility: vincentAbility2, abilityParams: abilityParams2, context: context2 }) => {\n return async () => {\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion);\n let policyEvalResults = void 0;\n const abilityIpfsCid = LitAuth.actionIpfsIds[0];\n const appDelegateeAddress = ethers_1.ethers.utils.getAddress(LitAuth.authSigAddress);\n const baseContext = {\n delegation: {\n delegateeAddress: appDelegateeAddress\n // delegatorPkpInfo: null,\n },\n abilityIpfsCid\n // appId: undefined,\n // appVersion: undefined,\n };\n try {\n const delegationRpcUrl = await Lit.Actions.getRpcUrl({ chain: \"yellowstone\" });\n const parsedOrFail = (0, zod_1.validateOrFail)(abilityParams2, vincentAbility2.abilityParamsSchema, \"execute\", \"input\");\n if ((0, typeGuards_1.isAbilityFailureResult)(parsedOrFail)) {\n Lit.Actions.setResponse({\n response: JSON.stringify({\n abilityExecutionResult: parsedOrFail\n })\n });\n return;\n }\n const userPkpInfo = await (0, helpers_1.getPkpInfo)({\n litPubkeyRouterAddress: constants_1.LIT_DATIL_PUBKEY_ROUTER_ADDRESS,\n yellowstoneRpcUrl: delegationRpcUrl,\n pkpEthAddress: context2.delegatorPkpEthAddress\n });\n baseContext.delegation.delegatorPkpInfo = userPkpInfo;\n const { decodedPolicies, appId, appVersion } = await (0, getOnchainPolicyParams_1.getPoliciesAndAppVersion)({\n delegationRpcUrl,\n appDelegateeAddress,\n agentWalletPkpEthAddress: context2.delegatorPkpEthAddress,\n abilityIpfsCid\n });\n baseContext.appId = appId.toNumber();\n baseContext.appVersion = appVersion.toNumber();\n const validatedPolicies = await (0, validatePolicies_1.validatePolicies)({\n decodedPolicies,\n vincentAbility: vincentAbility2,\n parsedAbilityParams: parsedOrFail,\n abilityIpfsCid\n });\n console.log(\"validatedPolicies\", JSON.stringify(validatedPolicies, utils_1.bigintReplacer));\n const policyEvaluationResults = await (0, evaluatePolicies_1.evaluatePolicies)({\n validatedPolicies,\n vincentAbility: vincentAbility2,\n context: baseContext,\n vincentAbilityApiVersion\n });\n console.log(\"policyEvaluationResults\", JSON.stringify(policyEvaluationResults, utils_1.bigintReplacer));\n policyEvalResults = policyEvaluationResults;\n if (!policyEvalResults.allow) {\n Lit.Actions.setResponse({\n response: JSON.stringify({\n abilityContext: {\n ...baseContext,\n policiesContext: policyEvaluationResults\n },\n abilityExecutionResult: {\n success: false\n }\n })\n });\n return;\n }\n const executeContext = createAbilityExecutionContext({\n vincentAbility: vincentAbility2,\n policyEvaluationResults,\n baseContext\n });\n const abilityExecutionResult = await vincentAbility2.execute({\n abilityParams: parsedOrFail\n }, {\n ...baseContext,\n policiesContext: executeContext\n });\n console.log(\"abilityExecutionResult\", JSON.stringify(abilityExecutionResult, utils_1.bigintReplacer));\n Lit.Actions.setResponse({\n response: JSON.stringify({\n abilityExecutionResult,\n abilityContext: {\n ...baseContext,\n policiesContext: policyEvaluationResults\n }\n })\n });\n } catch (err) {\n Lit.Actions.setResponse({\n response: JSON.stringify({\n abilityContext: {\n ...baseContext,\n policiesContext: policyEvalResults\n },\n abilityExecutionResult: {\n success: false,\n runtimeError: err instanceof Error ? err.message : String(err)\n }\n })\n });\n }\n };\n };\n exports3.vincentAbilityHandler = vincentAbilityHandler2;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/bundledAbility/bundledAbility.js\n var require_bundledAbility = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/bundledAbility/bundledAbility.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.asBundledVincentAbility = asBundledVincentAbility;\n var constants_1 = require_constants2();\n function asBundledVincentAbility(vincentAbility2, ipfsCid) {\n const bundledAbility = {\n ipfsCid,\n vincentAbility: vincentAbility2\n };\n Object.defineProperty(bundledAbility, \"vincentAbilityApiVersion\", {\n value: constants_1.VINCENT_TOOL_API_VERSION,\n writable: false,\n enumerable: true,\n configurable: false\n });\n return bundledAbility;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/bundledPolicy/bundledPolicy.js\n var require_bundledPolicy = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/bundledPolicy/bundledPolicy.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.asBundledVincentPolicy = asBundledVincentPolicy;\n var constants_1 = require_constants2();\n function asBundledVincentPolicy(vincentPolicy, ipfsCid) {\n const bundledPolicy = {\n ipfsCid,\n vincentPolicy\n };\n Object.defineProperty(bundledPolicy, \"vincentAbilityApiVersion\", {\n value: constants_1.VINCENT_TOOL_API_VERSION,\n writable: false,\n enumerable: true,\n configurable: false\n });\n return bundledPolicy;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/tslib@2.7.0/node_modules/tslib/tslib.es6.mjs\n var tslib_es6_exports2 = {};\n __export(tslib_es6_exports2, {\n __addDisposableResource: () => __addDisposableResource2,\n __assign: () => __assign2,\n __asyncDelegator: () => __asyncDelegator2,\n __asyncGenerator: () => __asyncGenerator2,\n __asyncValues: () => __asyncValues2,\n __await: () => __await2,\n __awaiter: () => __awaiter2,\n __classPrivateFieldGet: () => __classPrivateFieldGet2,\n __classPrivateFieldIn: () => __classPrivateFieldIn2,\n __classPrivateFieldSet: () => __classPrivateFieldSet2,\n __createBinding: () => __createBinding2,\n __decorate: () => __decorate2,\n __disposeResources: () => __disposeResources2,\n __esDecorate: () => __esDecorate2,\n __exportStar: () => __exportStar2,\n __extends: () => __extends2,\n __generator: () => __generator2,\n __importDefault: () => __importDefault2,\n __importStar: () => __importStar2,\n __makeTemplateObject: () => __makeTemplateObject2,\n __metadata: () => __metadata2,\n __param: () => __param2,\n __propKey: () => __propKey2,\n __read: () => __read2,\n __rest: () => __rest2,\n __runInitializers: () => __runInitializers2,\n __setFunctionName: () => __setFunctionName2,\n __spread: () => __spread2,\n __spreadArray: () => __spreadArray2,\n __spreadArrays: () => __spreadArrays2,\n __values: () => __values2,\n default: () => tslib_es6_default2\n });\n function __extends2(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics2(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n }\n function __rest2(s4, e2) {\n var t3 = {};\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4) && e2.indexOf(p4) < 0)\n t3[p4] = s4[p4];\n if (s4 != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i3 = 0, p4 = Object.getOwnPropertySymbols(s4); i3 < p4.length; i3++) {\n if (e2.indexOf(p4[i3]) < 0 && Object.prototype.propertyIsEnumerable.call(s4, p4[i3]))\n t3[p4[i3]] = s4[p4[i3]];\n }\n return t3;\n }\n function __decorate2(decorators, target, key, desc) {\n var c4 = arguments.length, r2 = c4 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d5;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r2 = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i3 = decorators.length - 1; i3 >= 0; i3--)\n if (d5 = decorators[i3])\n r2 = (c4 < 3 ? d5(r2) : c4 > 3 ? d5(target, key, r2) : d5(target, key)) || r2;\n return c4 > 3 && r2 && Object.defineProperty(target, key, r2), r2;\n }\n function __param2(paramIndex, decorator) {\n return function(target, key) {\n decorator(target, key, paramIndex);\n };\n }\n function __esDecorate2(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f7) {\n if (f7 !== void 0 && typeof f7 !== \"function\")\n throw new TypeError(\"Function expected\");\n return f7;\n }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _2, done = false;\n for (var i3 = decorators.length - 1; i3 >= 0; i3--) {\n var context2 = {};\n for (var p4 in contextIn)\n context2[p4] = p4 === \"access\" ? {} : contextIn[p4];\n for (var p4 in contextIn.access)\n context2.access[p4] = contextIn.access[p4];\n context2.addInitializer = function(f7) {\n if (done)\n throw new TypeError(\"Cannot add initializers after decoration has completed\");\n extraInitializers.push(accept(f7 || null));\n };\n var result = (0, decorators[i3])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);\n if (kind === \"accessor\") {\n if (result === void 0)\n continue;\n if (result === null || typeof result !== \"object\")\n throw new TypeError(\"Object expected\");\n if (_2 = accept(result.get))\n descriptor.get = _2;\n if (_2 = accept(result.set))\n descriptor.set = _2;\n if (_2 = accept(result.init))\n initializers.unshift(_2);\n } else if (_2 = accept(result)) {\n if (kind === \"field\")\n initializers.unshift(_2);\n else\n descriptor[key] = _2;\n }\n }\n if (target)\n Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n }\n function __runInitializers2(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i3 = 0; i3 < initializers.length; i3++) {\n value = useValue ? initializers[i3].call(thisArg, value) : initializers[i3].call(thisArg);\n }\n return useValue ? value : void 0;\n }\n function __propKey2(x4) {\n return typeof x4 === \"symbol\" ? x4 : \"\".concat(x4);\n }\n function __setFunctionName2(f7, name, prefix) {\n if (typeof name === \"symbol\")\n name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f7, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n }\n function __metadata2(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\")\n return Reflect.metadata(metadataKey, metadataValue);\n }\n function __awaiter2(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n }\n function __generator2(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4 = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g4.next = verb(0), g4[\"throw\"] = verb(1), g4[\"return\"] = verb(2), typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (g4 && (g4 = 0, op[0] && (_2 = 0)), _2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n }\n function __exportStar2(m2, o5) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(o5, p4))\n __createBinding2(o5, m2, p4);\n }\n function __values2(o5) {\n var s4 = typeof Symbol === \"function\" && Symbol.iterator, m2 = s4 && o5[s4], i3 = 0;\n if (m2)\n return m2.call(o5);\n if (o5 && typeof o5.length === \"number\")\n return {\n next: function() {\n if (o5 && i3 >= o5.length)\n o5 = void 0;\n return { value: o5 && o5[i3++], done: !o5 };\n }\n };\n throw new TypeError(s4 ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n }\n function __read2(o5, n2) {\n var m2 = typeof Symbol === \"function\" && o5[Symbol.iterator];\n if (!m2)\n return o5;\n var i3 = m2.call(o5), r2, ar = [], e2;\n try {\n while ((n2 === void 0 || n2-- > 0) && !(r2 = i3.next()).done)\n ar.push(r2.value);\n } catch (error) {\n e2 = { error };\n } finally {\n try {\n if (r2 && !r2.done && (m2 = i3[\"return\"]))\n m2.call(i3);\n } finally {\n if (e2)\n throw e2.error;\n }\n }\n return ar;\n }\n function __spread2() {\n for (var ar = [], i3 = 0; i3 < arguments.length; i3++)\n ar = ar.concat(__read2(arguments[i3]));\n return ar;\n }\n function __spreadArrays2() {\n for (var s4 = 0, i3 = 0, il = arguments.length; i3 < il; i3++)\n s4 += arguments[i3].length;\n for (var r2 = Array(s4), k4 = 0, i3 = 0; i3 < il; i3++)\n for (var a3 = arguments[i3], j2 = 0, jl = a3.length; j2 < jl; j2++, k4++)\n r2[k4] = a3[j2];\n return r2;\n }\n function __spreadArray2(to, from14, pack) {\n if (pack || arguments.length === 2)\n for (var i3 = 0, l6 = from14.length, ar; i3 < l6; i3++) {\n if (ar || !(i3 in from14)) {\n if (!ar)\n ar = Array.prototype.slice.call(from14, 0, i3);\n ar[i3] = from14[i3];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from14));\n }\n function __await2(v2) {\n return this instanceof __await2 ? (this.v = v2, this) : new __await2(v2);\n }\n function __asyncGenerator2(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g4 = generator.apply(thisArg, _arguments || []), i3, q3 = [];\n return i3 = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3;\n function awaitReturn(f7) {\n return function(v2) {\n return Promise.resolve(v2).then(f7, reject);\n };\n }\n function verb(n2, f7) {\n if (g4[n2]) {\n i3[n2] = function(v2) {\n return new Promise(function(a3, b4) {\n q3.push([n2, v2, a3, b4]) > 1 || resume(n2, v2);\n });\n };\n if (f7)\n i3[n2] = f7(i3[n2]);\n }\n }\n function resume(n2, v2) {\n try {\n step(g4[n2](v2));\n } catch (e2) {\n settle(q3[0][3], e2);\n }\n }\n function step(r2) {\n r2.value instanceof __await2 ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle(q3[0][2], r2);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f7, v2) {\n if (f7(v2), q3.shift(), q3.length)\n resume(q3[0][0], q3[0][1]);\n }\n }\n function __asyncDelegator2(o5) {\n var i3, p4;\n return i3 = {}, verb(\"next\"), verb(\"throw\", function(e2) {\n throw e2;\n }), verb(\"return\"), i3[Symbol.iterator] = function() {\n return this;\n }, i3;\n function verb(n2, f7) {\n i3[n2] = o5[n2] ? function(v2) {\n return (p4 = !p4) ? { value: __await2(o5[n2](v2)), done: false } : f7 ? f7(v2) : v2;\n } : f7;\n }\n }\n function __asyncValues2(o5) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m2 = o5[Symbol.asyncIterator], i3;\n return m2 ? m2.call(o5) : (o5 = typeof __values2 === \"function\" ? __values2(o5) : o5[Symbol.iterator](), i3 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3);\n function verb(n2) {\n i3[n2] = o5[n2] && function(v2) {\n return new Promise(function(resolve, reject) {\n v2 = o5[n2](v2), settle(resolve, reject, v2.done, v2.value);\n });\n };\n }\n function settle(resolve, reject, d5, v2) {\n Promise.resolve(v2).then(function(v6) {\n resolve({ value: v6, done: d5 });\n }, reject);\n }\n }\n function __makeTemplateObject2(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", { value: raw });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n }\n function __importStar2(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding2(result, mod3, k4);\n }\n __setModuleDefault2(result, mod3);\n return result;\n }\n function __importDefault2(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { default: mod3 };\n }\n function __classPrivateFieldGet2(receiver, state, kind, f7) {\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f7 : kind === \"a\" ? f7.call(receiver) : f7 ? f7.value : state.get(receiver);\n }\n function __classPrivateFieldSet2(receiver, state, value, kind, f7) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f7.call(receiver, value) : f7 ? f7.value = value : state.set(receiver, value), value;\n }\n function __classPrivateFieldIn2(state, receiver) {\n if (receiver === null || typeof receiver !== \"object\" && typeof receiver !== \"function\")\n throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n }\n function __addDisposableResource2(env2, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\")\n throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose)\n throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose)\n throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async)\n inner = dispose;\n }\n if (typeof dispose !== \"function\")\n throw new TypeError(\"Object not disposable.\");\n if (inner)\n dispose = function() {\n try {\n inner.call(this);\n } catch (e2) {\n return Promise.reject(e2);\n }\n };\n env2.stack.push({ value, dispose, async });\n } else if (async) {\n env2.stack.push({ async: true });\n }\n return value;\n }\n function __disposeResources2(env2) {\n function fail(e2) {\n env2.error = env2.hasError ? new _SuppressedError2(e2, env2.error, \"An error was suppressed during disposal.\") : e2;\n env2.hasError = true;\n }\n var r2, s4 = 0;\n function next() {\n while (r2 = env2.stack.pop()) {\n try {\n if (!r2.async && s4 === 1)\n return s4 = 0, env2.stack.push(r2), Promise.resolve().then(next);\n if (r2.dispose) {\n var result = r2.dispose.call(r2.value);\n if (r2.async)\n return s4 |= 2, Promise.resolve(result).then(next, function(e2) {\n fail(e2);\n return next();\n });\n } else\n s4 |= 1;\n } catch (e2) {\n fail(e2);\n }\n }\n if (s4 === 1)\n return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();\n if (env2.hasError)\n throw env2.error;\n }\n return next();\n }\n var extendStatics2, __assign2, __createBinding2, __setModuleDefault2, _SuppressedError2, tslib_es6_default2;\n var init_tslib_es62 = __esm({\n \"../../../node_modules/.pnpm/tslib@2.7.0/node_modules/tslib/tslib.es6.mjs\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n extendStatics2 = function(d5, b4) {\n extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics2(d5, b4);\n };\n __assign2 = function() {\n __assign2 = Object.assign || function __assign4(t3) {\n for (var s4, i3 = 1, n2 = arguments.length; i3 < n2; i3++) {\n s4 = arguments[i3];\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4))\n t3[p4] = s4[p4];\n }\n return t3;\n };\n return __assign2.apply(this, arguments);\n };\n __createBinding2 = Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n };\n __setModuleDefault2 = Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n };\n _SuppressedError2 = typeof SuppressedError === \"function\" ? SuppressedError : function(error, suppressed, message) {\n var e2 = new Error(message);\n return e2.name = \"SuppressedError\", e2.error = error, e2.suppressed = suppressed, e2;\n };\n tslib_es6_default2 = {\n __extends: __extends2,\n __assign: __assign2,\n __rest: __rest2,\n __decorate: __decorate2,\n __param: __param2,\n __metadata: __metadata2,\n __awaiter: __awaiter2,\n __generator: __generator2,\n __createBinding: __createBinding2,\n __exportStar: __exportStar2,\n __values: __values2,\n __read: __read2,\n __spread: __spread2,\n __spreadArrays: __spreadArrays2,\n __spreadArray: __spreadArray2,\n __await: __await2,\n __asyncGenerator: __asyncGenerator2,\n __asyncDelegator: __asyncDelegator2,\n __asyncValues: __asyncValues2,\n __makeTemplateObject: __makeTemplateObject2,\n __importStar: __importStar2,\n __importDefault: __importDefault2,\n __classPrivateFieldGet: __classPrivateFieldGet2,\n __classPrivateFieldSet: __classPrivateFieldSet2,\n __classPrivateFieldIn: __classPrivateFieldIn2,\n __addDisposableResource: __addDisposableResource2,\n __disposeResources: __disposeResources2\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/_version.js\n var require_version27 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"6.15.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/properties.js\n var require_properties = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/properties.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.defineProperties = exports3.resolveProperties = void 0;\n function checkType(value, type, name) {\n const types = type.split(\"|\").map((t3) => t3.trim());\n for (let i3 = 0; i3 < types.length; i3++) {\n switch (type) {\n case \"any\":\n return;\n case \"bigint\":\n case \"boolean\":\n case \"number\":\n case \"string\":\n if (typeof value === type) {\n return;\n }\n }\n }\n const error = new Error(`invalid value for type ${type}`);\n error.code = \"INVALID_ARGUMENT\";\n error.argument = `value.${name}`;\n error.value = value;\n throw error;\n }\n async function resolveProperties2(value) {\n const keys = Object.keys(value);\n const results = await Promise.all(keys.map((k4) => Promise.resolve(value[k4])));\n return results.reduce((accum, v2, index2) => {\n accum[keys[index2]] = v2;\n return accum;\n }, {});\n }\n exports3.resolveProperties = resolveProperties2;\n function defineProperties(target, values, types) {\n for (let key in values) {\n let value = values[key];\n const type = types ? types[key] : null;\n if (type) {\n checkType(value, type, key);\n }\n Object.defineProperty(target, key, { enumerable: true, value, writable: false });\n }\n }\n exports3.defineProperties = defineProperties;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/errors.js\n var require_errors2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/errors.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.assertPrivate = exports3.assertNormalize = exports3.assertArgumentCount = exports3.assertArgument = exports3.assert = exports3.makeError = exports3.isCallException = exports3.isError = void 0;\n var _version_js_1 = require_version27();\n var properties_js_1 = require_properties();\n function stringify4(value, seen) {\n if (value == null) {\n return \"null\";\n }\n if (seen == null) {\n seen = /* @__PURE__ */ new Set();\n }\n if (typeof value === \"object\") {\n if (seen.has(value)) {\n return \"[Circular]\";\n }\n seen.add(value);\n }\n if (Array.isArray(value)) {\n return \"[ \" + value.map((v2) => stringify4(v2, seen)).join(\", \") + \" ]\";\n }\n if (value instanceof Uint8Array) {\n const HEX = \"0123456789abcdef\";\n let result = \"0x\";\n for (let i3 = 0; i3 < value.length; i3++) {\n result += HEX[value[i3] >> 4];\n result += HEX[value[i3] & 15];\n }\n return result;\n }\n if (typeof value === \"object\" && typeof value.toJSON === \"function\") {\n return stringify4(value.toJSON(), seen);\n }\n switch (typeof value) {\n case \"boolean\":\n case \"number\":\n case \"symbol\":\n return value.toString();\n case \"bigint\":\n return BigInt(value).toString();\n case \"string\":\n return JSON.stringify(value);\n case \"object\": {\n const keys = Object.keys(value);\n keys.sort();\n return \"{ \" + keys.map((k4) => `${stringify4(k4, seen)}: ${stringify4(value[k4], seen)}`).join(\", \") + \" }\";\n }\n }\n return `[ COULD NOT SERIALIZE ]`;\n }\n function isError(error, code) {\n return error && error.code === code;\n }\n exports3.isError = isError;\n function isCallException(error) {\n return isError(error, \"CALL_EXCEPTION\");\n }\n exports3.isCallException = isCallException;\n function makeError(message, code, info) {\n let shortMessage = message;\n {\n const details = [];\n if (info) {\n if (\"message\" in info || \"code\" in info || \"name\" in info) {\n throw new Error(`value will overwrite populated values: ${stringify4(info)}`);\n }\n for (const key in info) {\n if (key === \"shortMessage\") {\n continue;\n }\n const value = info[key];\n details.push(key + \"=\" + stringify4(value));\n }\n }\n details.push(`code=${code}`);\n details.push(`version=${_version_js_1.version}`);\n if (details.length) {\n message += \" (\" + details.join(\", \") + \")\";\n }\n }\n let error;\n switch (code) {\n case \"INVALID_ARGUMENT\":\n error = new TypeError(message);\n break;\n case \"NUMERIC_FAULT\":\n case \"BUFFER_OVERRUN\":\n error = new RangeError(message);\n break;\n default:\n error = new Error(message);\n }\n (0, properties_js_1.defineProperties)(error, { code });\n if (info) {\n Object.assign(error, info);\n }\n if (error.shortMessage == null) {\n (0, properties_js_1.defineProperties)(error, { shortMessage });\n }\n return error;\n }\n exports3.makeError = makeError;\n function assert9(check, message, code, info) {\n if (!check) {\n throw makeError(message, code, info);\n }\n }\n exports3.assert = assert9;\n function assertArgument(check, message, name, value) {\n assert9(check, message, \"INVALID_ARGUMENT\", { argument: name, value });\n }\n exports3.assertArgument = assertArgument;\n function assertArgumentCount(count, expectedCount, message) {\n if (message == null) {\n message = \"\";\n }\n if (message) {\n message = \": \" + message;\n }\n assert9(count >= expectedCount, \"missing argument\" + message, \"MISSING_ARGUMENT\", {\n count,\n expectedCount\n });\n assert9(count <= expectedCount, \"too many arguments\" + message, \"UNEXPECTED_ARGUMENT\", {\n count,\n expectedCount\n });\n }\n exports3.assertArgumentCount = assertArgumentCount;\n var _normalizeForms = [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].reduce((accum, form) => {\n try {\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad\");\n }\n ;\n if (form === \"NFD\") {\n const check = String.fromCharCode(233).normalize(\"NFD\");\n const expected = String.fromCharCode(101, 769);\n if (check !== expected) {\n throw new Error(\"broken\");\n }\n }\n accum.push(form);\n } catch (error) {\n }\n return accum;\n }, []);\n function assertNormalize(form) {\n assert9(_normalizeForms.indexOf(form) >= 0, \"platform missing String.prototype.normalize\", \"UNSUPPORTED_OPERATION\", {\n operation: \"String.prototype.normalize\",\n info: { form }\n });\n }\n exports3.assertNormalize = assertNormalize;\n function assertPrivate(givenGuard, guard, className) {\n if (className == null) {\n className = \"\";\n }\n if (givenGuard !== guard) {\n let method = className, operation = \"new\";\n if (className) {\n method += \".\";\n operation += \" \" + className;\n }\n assert9(false, `private constructor; use ${method}from* methods`, \"UNSUPPORTED_OPERATION\", {\n operation\n });\n }\n }\n exports3.assertPrivate = assertPrivate;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/data.js\n var require_data = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/data.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.zeroPadBytes = exports3.zeroPadValue = exports3.stripZerosLeft = exports3.dataSlice = exports3.dataLength = exports3.concat = exports3.hexlify = exports3.isBytesLike = exports3.isHexString = exports3.getBytesCopy = exports3.getBytes = void 0;\n var errors_js_1 = require_errors2();\n function _getBytes(value, name, copy) {\n if (value instanceof Uint8Array) {\n if (copy) {\n return new Uint8Array(value);\n }\n return value;\n }\n if (typeof value === \"string\" && value.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)) {\n const result = new Uint8Array((value.length - 2) / 2);\n let offset = 2;\n for (let i3 = 0; i3 < result.length; i3++) {\n result[i3] = parseInt(value.substring(offset, offset + 2), 16);\n offset += 2;\n }\n return result;\n }\n (0, errors_js_1.assertArgument)(false, \"invalid BytesLike value\", name || \"value\", value);\n }\n function getBytes(value, name) {\n return _getBytes(value, name, false);\n }\n exports3.getBytes = getBytes;\n function getBytesCopy(value, name) {\n return _getBytes(value, name, true);\n }\n exports3.getBytesCopy = getBytesCopy;\n function isHexString(value, length) {\n if (typeof value !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false;\n }\n if (typeof length === \"number\" && value.length !== 2 + 2 * length) {\n return false;\n }\n if (length === true && value.length % 2 !== 0) {\n return false;\n }\n return true;\n }\n exports3.isHexString = isHexString;\n function isBytesLike(value) {\n return isHexString(value, true) || value instanceof Uint8Array;\n }\n exports3.isBytesLike = isBytesLike;\n var HexCharacters = \"0123456789abcdef\";\n function hexlify(data) {\n const bytes = getBytes(data);\n let result = \"0x\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n const v2 = bytes[i3];\n result += HexCharacters[(v2 & 240) >> 4] + HexCharacters[v2 & 15];\n }\n return result;\n }\n exports3.hexlify = hexlify;\n function concat5(datas) {\n return \"0x\" + datas.map((d5) => hexlify(d5).substring(2)).join(\"\");\n }\n exports3.concat = concat5;\n function dataLength(data) {\n if (isHexString(data, true)) {\n return (data.length - 2) / 2;\n }\n return getBytes(data).length;\n }\n exports3.dataLength = dataLength;\n function dataSlice(data, start, end) {\n const bytes = getBytes(data);\n if (end != null && end > bytes.length) {\n (0, errors_js_1.assert)(false, \"cannot slice beyond data bounds\", \"BUFFER_OVERRUN\", {\n buffer: bytes,\n length: bytes.length,\n offset: end\n });\n }\n return hexlify(bytes.slice(start == null ? 0 : start, end == null ? bytes.length : end));\n }\n exports3.dataSlice = dataSlice;\n function stripZerosLeft(data) {\n let bytes = hexlify(data).substring(2);\n while (bytes.startsWith(\"00\")) {\n bytes = bytes.substring(2);\n }\n return \"0x\" + bytes;\n }\n exports3.stripZerosLeft = stripZerosLeft;\n function zeroPad(data, length, left) {\n const bytes = getBytes(data);\n (0, errors_js_1.assert)(length >= bytes.length, \"padding exceeds data length\", \"BUFFER_OVERRUN\", {\n buffer: new Uint8Array(bytes),\n length,\n offset: length + 1\n });\n const result = new Uint8Array(length);\n result.fill(0);\n if (left) {\n result.set(bytes, length - bytes.length);\n } else {\n result.set(bytes, 0);\n }\n return hexlify(result);\n }\n function zeroPadValue(data, length) {\n return zeroPad(data, length, true);\n }\n exports3.zeroPadValue = zeroPadValue;\n function zeroPadBytes(data, length) {\n return zeroPad(data, length, false);\n }\n exports3.zeroPadBytes = zeroPadBytes;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/maths.js\n var require_maths = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/maths.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toQuantity = exports3.toBeArray = exports3.toBeHex = exports3.toNumber = exports3.getNumber = exports3.toBigInt = exports3.getUint = exports3.getBigInt = exports3.mask = exports3.toTwos = exports3.fromTwos = void 0;\n var data_js_1 = require_data();\n var errors_js_1 = require_errors2();\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var maxValue = 9007199254740991;\n function fromTwos(_value, _width) {\n const value = getUint(_value, \"value\");\n const width = BigInt(getNumber(_width, \"width\"));\n (0, errors_js_1.assert)(value >> width === BN_0, \"overflow\", \"NUMERIC_FAULT\", {\n operation: \"fromTwos\",\n fault: \"overflow\",\n value: _value\n });\n if (value >> width - BN_1) {\n const mask2 = (BN_1 << width) - BN_1;\n return -((~value & mask2) + BN_1);\n }\n return value;\n }\n exports3.fromTwos = fromTwos;\n function toTwos(_value, _width) {\n let value = getBigInt(_value, \"value\");\n const width = BigInt(getNumber(_width, \"width\"));\n const limit = BN_1 << width - BN_1;\n if (value < BN_0) {\n value = -value;\n (0, errors_js_1.assert)(value <= limit, \"too low\", \"NUMERIC_FAULT\", {\n operation: \"toTwos\",\n fault: \"overflow\",\n value: _value\n });\n const mask2 = (BN_1 << width) - BN_1;\n return (~value & mask2) + BN_1;\n } else {\n (0, errors_js_1.assert)(value < limit, \"too high\", \"NUMERIC_FAULT\", {\n operation: \"toTwos\",\n fault: \"overflow\",\n value: _value\n });\n }\n return value;\n }\n exports3.toTwos = toTwos;\n function mask(_value, _bits) {\n const value = getUint(_value, \"value\");\n const bits = BigInt(getNumber(_bits, \"bits\"));\n return value & (BN_1 << bits) - BN_1;\n }\n exports3.mask = mask;\n function getBigInt(value, name) {\n switch (typeof value) {\n case \"bigint\":\n return value;\n case \"number\":\n (0, errors_js_1.assertArgument)(Number.isInteger(value), \"underflow\", name || \"value\", value);\n (0, errors_js_1.assertArgument)(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return BigInt(value);\n case \"string\":\n try {\n if (value === \"\") {\n throw new Error(\"empty string\");\n }\n if (value[0] === \"-\" && value[1] !== \"-\") {\n return -BigInt(value.substring(1));\n }\n return BigInt(value);\n } catch (e2) {\n (0, errors_js_1.assertArgument)(false, `invalid BigNumberish string: ${e2.message}`, name || \"value\", value);\n }\n }\n (0, errors_js_1.assertArgument)(false, \"invalid BigNumberish value\", name || \"value\", value);\n }\n exports3.getBigInt = getBigInt;\n function getUint(value, name) {\n const result = getBigInt(value, name);\n (0, errors_js_1.assert)(result >= BN_0, \"unsigned value cannot be negative\", \"NUMERIC_FAULT\", {\n fault: \"overflow\",\n operation: \"getUint\",\n value\n });\n return result;\n }\n exports3.getUint = getUint;\n var Nibbles = \"0123456789abcdef\";\n function toBigInt4(value) {\n if (value instanceof Uint8Array) {\n let result = \"0x0\";\n for (const v2 of value) {\n result += Nibbles[v2 >> 4];\n result += Nibbles[v2 & 15];\n }\n return BigInt(result);\n }\n return getBigInt(value);\n }\n exports3.toBigInt = toBigInt4;\n function getNumber(value, name) {\n switch (typeof value) {\n case \"bigint\":\n (0, errors_js_1.assertArgument)(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return Number(value);\n case \"number\":\n (0, errors_js_1.assertArgument)(Number.isInteger(value), \"underflow\", name || \"value\", value);\n (0, errors_js_1.assertArgument)(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return value;\n case \"string\":\n try {\n if (value === \"\") {\n throw new Error(\"empty string\");\n }\n return getNumber(BigInt(value), name);\n } catch (e2) {\n (0, errors_js_1.assertArgument)(false, `invalid numeric string: ${e2.message}`, name || \"value\", value);\n }\n }\n (0, errors_js_1.assertArgument)(false, \"invalid numeric value\", name || \"value\", value);\n }\n exports3.getNumber = getNumber;\n function toNumber4(value) {\n return getNumber(toBigInt4(value));\n }\n exports3.toNumber = toNumber4;\n function toBeHex(_value, _width) {\n const value = getUint(_value, \"value\");\n let result = value.toString(16);\n if (_width == null) {\n if (result.length % 2) {\n result = \"0\" + result;\n }\n } else {\n const width = getNumber(_width, \"width\");\n (0, errors_js_1.assert)(width * 2 >= result.length, `value exceeds width (${width} bytes)`, \"NUMERIC_FAULT\", {\n operation: \"toBeHex\",\n fault: \"overflow\",\n value: _value\n });\n while (result.length < width * 2) {\n result = \"0\" + result;\n }\n }\n return \"0x\" + result;\n }\n exports3.toBeHex = toBeHex;\n function toBeArray(_value) {\n const value = getUint(_value, \"value\");\n if (value === BN_0) {\n return new Uint8Array([]);\n }\n let hex = value.toString(16);\n if (hex.length % 2) {\n hex = \"0\" + hex;\n }\n const result = new Uint8Array(hex.length / 2);\n for (let i3 = 0; i3 < result.length; i3++) {\n const offset = i3 * 2;\n result[i3] = parseInt(hex.substring(offset, offset + 2), 16);\n }\n return result;\n }\n exports3.toBeArray = toBeArray;\n function toQuantity(value) {\n let result = (0, data_js_1.hexlify)((0, data_js_1.isBytesLike)(value) ? value : toBeArray(value)).substring(2);\n while (result.startsWith(\"0\")) {\n result = result.substring(1);\n }\n if (result === \"\") {\n result = \"0\";\n }\n return \"0x\" + result;\n }\n exports3.toQuantity = toQuantity;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/base58.js\n var require_base58 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/base58.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeBase58 = exports3.encodeBase58 = void 0;\n var data_js_1 = require_data();\n var errors_js_1 = require_errors2();\n var maths_js_1 = require_maths();\n var Alphabet = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n var Lookup = null;\n function getAlpha(letter) {\n if (Lookup == null) {\n Lookup = {};\n for (let i3 = 0; i3 < Alphabet.length; i3++) {\n Lookup[Alphabet[i3]] = BigInt(i3);\n }\n }\n const result = Lookup[letter];\n (0, errors_js_1.assertArgument)(result != null, `invalid base58 value`, \"letter\", letter);\n return result;\n }\n var BN_0 = BigInt(0);\n var BN_58 = BigInt(58);\n function encodeBase58(_value) {\n const bytes = (0, data_js_1.getBytes)(_value);\n let value = (0, maths_js_1.toBigInt)(bytes);\n let result = \"\";\n while (value) {\n result = Alphabet[Number(value % BN_58)] + result;\n value /= BN_58;\n }\n for (let i3 = 0; i3 < bytes.length; i3++) {\n if (bytes[i3]) {\n break;\n }\n result = Alphabet[0] + result;\n }\n return result;\n }\n exports3.encodeBase58 = encodeBase58;\n function decodeBase58(value) {\n let result = BN_0;\n for (let i3 = 0; i3 < value.length; i3++) {\n result *= BN_58;\n result += getAlpha(value[i3]);\n }\n return result;\n }\n exports3.decodeBase58 = decodeBase58;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/base64-browser.js\n var require_base64_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/base64-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encodeBase64 = exports3.decodeBase64 = void 0;\n var data_js_1 = require_data();\n function decodeBase64(textData) {\n textData = atob(textData);\n const data = new Uint8Array(textData.length);\n for (let i3 = 0; i3 < textData.length; i3++) {\n data[i3] = textData.charCodeAt(i3);\n }\n return (0, data_js_1.getBytes)(data);\n }\n exports3.decodeBase64 = decodeBase64;\n function encodeBase64(_data) {\n const data = (0, data_js_1.getBytes)(_data);\n let textData = \"\";\n for (let i3 = 0; i3 < data.length; i3++) {\n textData += String.fromCharCode(data[i3]);\n }\n return btoa(textData);\n }\n exports3.encodeBase64 = encodeBase64;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/events.js\n var require_events = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/events.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EventPayload = void 0;\n var properties_js_1 = require_properties();\n var EventPayload = class {\n /**\n * The event filter.\n */\n filter;\n /**\n * The **EventEmitterable**.\n */\n emitter;\n #listener;\n /**\n * Create a new **EventPayload** for %%emitter%% with\n * the %%listener%% and for %%filter%%.\n */\n constructor(emitter, listener, filter) {\n this.#listener = listener;\n (0, properties_js_1.defineProperties)(this, { emitter, filter });\n }\n /**\n * Unregister the triggered listener for future events.\n */\n async removeListener() {\n if (this.#listener == null) {\n return;\n }\n await this.emitter.off(this.filter, this.#listener);\n }\n };\n exports3.EventPayload = EventPayload;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/utf8.js\n var require_utf82 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/utf8.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toUtf8CodePoints = exports3.toUtf8String = exports3.toUtf8Bytes = exports3.Utf8ErrorFuncs = void 0;\n var data_js_1 = require_data();\n var errors_js_1 = require_errors2();\n function errorFunc(reason, offset, bytes, output, badCodepoint) {\n (0, errors_js_1.assertArgument)(false, `invalid codepoint at offset ${offset}; ${reason}`, \"bytes\", bytes);\n }\n function ignoreFunc(reason, offset, bytes, output, badCodepoint) {\n if (reason === \"BAD_PREFIX\" || reason === \"UNEXPECTED_CONTINUE\") {\n let i3 = 0;\n for (let o5 = offset + 1; o5 < bytes.length; o5++) {\n if (bytes[o5] >> 6 !== 2) {\n break;\n }\n i3++;\n }\n return i3;\n }\n if (reason === \"OVERRUN\") {\n return bytes.length - offset - 1;\n }\n return 0;\n }\n function replaceFunc(reason, offset, bytes, output, badCodepoint) {\n if (reason === \"OVERLONG\") {\n (0, errors_js_1.assertArgument)(typeof badCodepoint === \"number\", \"invalid bad code point for replacement\", \"badCodepoint\", badCodepoint);\n output.push(badCodepoint);\n return 0;\n }\n output.push(65533);\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n }\n exports3.Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n });\n function getUtf8CodePoints(_bytes, onError) {\n if (onError == null) {\n onError = exports3.Utf8ErrorFuncs.error;\n }\n const bytes = (0, data_js_1.getBytes)(_bytes, \"bytes\");\n const result = [];\n let i3 = 0;\n while (i3 < bytes.length) {\n const c4 = bytes[i3++];\n if (c4 >> 7 === 0) {\n result.push(c4);\n continue;\n }\n let extraLength = null;\n let overlongMask = null;\n if ((c4 & 224) === 192) {\n extraLength = 1;\n overlongMask = 127;\n } else if ((c4 & 240) === 224) {\n extraLength = 2;\n overlongMask = 2047;\n } else if ((c4 & 248) === 240) {\n extraLength = 3;\n overlongMask = 65535;\n } else {\n if ((c4 & 192) === 128) {\n i3 += onError(\"UNEXPECTED_CONTINUE\", i3 - 1, bytes, result);\n } else {\n i3 += onError(\"BAD_PREFIX\", i3 - 1, bytes, result);\n }\n continue;\n }\n if (i3 - 1 + extraLength >= bytes.length) {\n i3 += onError(\"OVERRUN\", i3 - 1, bytes, result);\n continue;\n }\n let res = c4 & (1 << 8 - extraLength - 1) - 1;\n for (let j2 = 0; j2 < extraLength; j2++) {\n let nextChar = bytes[i3];\n if ((nextChar & 192) != 128) {\n i3 += onError(\"MISSING_CONTINUE\", i3, bytes, result);\n res = null;\n break;\n }\n ;\n res = res << 6 | nextChar & 63;\n i3++;\n }\n if (res === null) {\n continue;\n }\n if (res > 1114111) {\n i3 += onError(\"OUT_OF_RANGE\", i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res >= 55296 && res <= 57343) {\n i3 += onError(\"UTF16_SURROGATE\", i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res <= overlongMask) {\n i3 += onError(\"OVERLONG\", i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n result.push(res);\n }\n return result;\n }\n function toUtf8Bytes(str, form) {\n (0, errors_js_1.assertArgument)(typeof str === \"string\", \"invalid string value\", \"str\", str);\n if (form != null) {\n (0, errors_js_1.assertNormalize)(form);\n str = str.normalize(form);\n }\n let result = [];\n for (let i3 = 0; i3 < str.length; i3++) {\n const c4 = str.charCodeAt(i3);\n if (c4 < 128) {\n result.push(c4);\n } else if (c4 < 2048) {\n result.push(c4 >> 6 | 192);\n result.push(c4 & 63 | 128);\n } else if ((c4 & 64512) == 55296) {\n i3++;\n const c22 = str.charCodeAt(i3);\n (0, errors_js_1.assertArgument)(i3 < str.length && (c22 & 64512) === 56320, \"invalid surrogate pair\", \"str\", str);\n const pair = 65536 + ((c4 & 1023) << 10) + (c22 & 1023);\n result.push(pair >> 18 | 240);\n result.push(pair >> 12 & 63 | 128);\n result.push(pair >> 6 & 63 | 128);\n result.push(pair & 63 | 128);\n } else {\n result.push(c4 >> 12 | 224);\n result.push(c4 >> 6 & 63 | 128);\n result.push(c4 & 63 | 128);\n }\n }\n return new Uint8Array(result);\n }\n exports3.toUtf8Bytes = toUtf8Bytes;\n function _toUtf8String(codePoints) {\n return codePoints.map((codePoint) => {\n if (codePoint <= 65535) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 65536;\n return String.fromCharCode((codePoint >> 10 & 1023) + 55296, (codePoint & 1023) + 56320);\n }).join(\"\");\n }\n function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n }\n exports3.toUtf8String = toUtf8String;\n function toUtf8CodePoints(str, form) {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n }\n exports3.toUtf8CodePoints = toUtf8CodePoints;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/geturl-browser.js\n var require_geturl_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/geturl-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getUrl = exports3.createGetUrl = void 0;\n var errors_js_1 = require_errors2();\n function createGetUrl(options) {\n async function getUrl3(req, _signal) {\n (0, errors_js_1.assert)(_signal == null || !_signal.cancelled, \"request cancelled before sending\", \"CANCELLED\");\n const protocol = req.url.split(\":\")[0].toLowerCase();\n (0, errors_js_1.assert)(protocol === \"http\" || protocol === \"https\", `unsupported protocol ${protocol}`, \"UNSUPPORTED_OPERATION\", {\n info: { protocol },\n operation: \"request\"\n });\n (0, errors_js_1.assert)(protocol === \"https\" || !req.credentials || req.allowInsecureAuthentication, \"insecure authorized connections unsupported\", \"UNSUPPORTED_OPERATION\", {\n operation: \"request\"\n });\n let error = null;\n const controller = new AbortController();\n const timer = setTimeout(() => {\n error = (0, errors_js_1.makeError)(\"request timeout\", \"TIMEOUT\");\n controller.abort();\n }, req.timeout);\n if (_signal) {\n _signal.addListener(() => {\n error = (0, errors_js_1.makeError)(\"request cancelled\", \"CANCELLED\");\n controller.abort();\n });\n }\n const init = Object.assign({}, options, {\n method: req.method,\n headers: new Headers(Array.from(req)),\n body: req.body || void 0,\n signal: controller.signal\n });\n let resp;\n try {\n resp = await fetch(req.url, init);\n } catch (_error) {\n clearTimeout(timer);\n if (error) {\n throw error;\n }\n throw _error;\n }\n clearTimeout(timer);\n const headers = {};\n resp.headers.forEach((value, key) => {\n headers[key.toLowerCase()] = value;\n });\n const respBody = await resp.arrayBuffer();\n const body = respBody == null ? null : new Uint8Array(respBody);\n return {\n statusCode: resp.status,\n statusMessage: resp.statusText,\n headers,\n body\n };\n }\n return getUrl3;\n }\n exports3.createGetUrl = createGetUrl;\n var defaultGetUrl = createGetUrl({});\n async function getUrl2(req, _signal) {\n return defaultGetUrl(req, _signal);\n }\n exports3.getUrl = getUrl2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/fetch.js\n var require_fetch = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/fetch.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FetchResponse = exports3.FetchRequest = exports3.FetchCancelSignal = void 0;\n var base64_js_1 = require_base64_browser();\n var data_js_1 = require_data();\n var errors_js_1 = require_errors2();\n var properties_js_1 = require_properties();\n var utf8_js_1 = require_utf82();\n var geturl_js_1 = require_geturl_browser();\n var MAX_ATTEMPTS = 12;\n var SLOT_INTERVAL = 250;\n var defaultGetUrlFunc = (0, geturl_js_1.createGetUrl)();\n var reData = new RegExp(\"^data:([^;:]*)?(;base64)?,(.*)$\", \"i\");\n var reIpfs = new RegExp(\"^ipfs://(ipfs/)?(.*)$\", \"i\");\n var locked = false;\n async function dataGatewayFunc(url, signal) {\n try {\n const match = url.match(reData);\n if (!match) {\n throw new Error(\"invalid data\");\n }\n return new FetchResponse(200, \"OK\", {\n \"content-type\": match[1] || \"text/plain\"\n }, match[2] ? (0, base64_js_1.decodeBase64)(match[3]) : unpercent(match[3]));\n } catch (error) {\n return new FetchResponse(599, \"BAD REQUEST (invalid data: URI)\", {}, null, new FetchRequest(url));\n }\n }\n function getIpfsGatewayFunc(baseUrl) {\n async function gatewayIpfs(url, signal) {\n try {\n const match = url.match(reIpfs);\n if (!match) {\n throw new Error(\"invalid link\");\n }\n return new FetchRequest(`${baseUrl}${match[2]}`);\n } catch (error) {\n return new FetchResponse(599, \"BAD REQUEST (invalid IPFS URI)\", {}, null, new FetchRequest(url));\n }\n }\n return gatewayIpfs;\n }\n var Gateways = {\n \"data\": dataGatewayFunc,\n \"ipfs\": getIpfsGatewayFunc(\"https://gateway.ipfs.io/ipfs/\")\n };\n var fetchSignals = /* @__PURE__ */ new WeakMap();\n var FetchCancelSignal = class {\n #listeners;\n #cancelled;\n constructor(request) {\n this.#listeners = [];\n this.#cancelled = false;\n fetchSignals.set(request, () => {\n if (this.#cancelled) {\n return;\n }\n this.#cancelled = true;\n for (const listener of this.#listeners) {\n setTimeout(() => {\n listener();\n }, 0);\n }\n this.#listeners = [];\n });\n }\n addListener(listener) {\n (0, errors_js_1.assert)(!this.#cancelled, \"singal already cancelled\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fetchCancelSignal.addCancelListener\"\n });\n this.#listeners.push(listener);\n }\n get cancelled() {\n return this.#cancelled;\n }\n checkSignal() {\n (0, errors_js_1.assert)(!this.cancelled, \"cancelled\", \"CANCELLED\", {});\n }\n };\n exports3.FetchCancelSignal = FetchCancelSignal;\n function checkSignal(signal) {\n if (signal == null) {\n throw new Error(\"missing signal; should not happen\");\n }\n signal.checkSignal();\n return signal;\n }\n var FetchRequest = class _FetchRequest {\n #allowInsecure;\n #gzip;\n #headers;\n #method;\n #timeout;\n #url;\n #body;\n #bodyType;\n #creds;\n // Hooks\n #preflight;\n #process;\n #retry;\n #signal;\n #throttle;\n #getUrlFunc;\n /**\n * The fetch URL to request.\n */\n get url() {\n return this.#url;\n }\n set url(url) {\n this.#url = String(url);\n }\n /**\n * The fetch body, if any, to send as the request body. //(default: null)//\n *\n * When setting a body, the intrinsic ``Content-Type`` is automatically\n * set and will be used if **not overridden** by setting a custom\n * header.\n *\n * If %%body%% is null, the body is cleared (along with the\n * intrinsic ``Content-Type``).\n *\n * If %%body%% is a string, the intrinsic ``Content-Type`` is set to\n * ``text/plain``.\n *\n * If %%body%% is a Uint8Array, the intrinsic ``Content-Type`` is set to\n * ``application/octet-stream``.\n *\n * If %%body%% is any other object, the intrinsic ``Content-Type`` is\n * set to ``application/json``.\n */\n get body() {\n if (this.#body == null) {\n return null;\n }\n return new Uint8Array(this.#body);\n }\n set body(body) {\n if (body == null) {\n this.#body = void 0;\n this.#bodyType = void 0;\n } else if (typeof body === \"string\") {\n this.#body = (0, utf8_js_1.toUtf8Bytes)(body);\n this.#bodyType = \"text/plain\";\n } else if (body instanceof Uint8Array) {\n this.#body = body;\n this.#bodyType = \"application/octet-stream\";\n } else if (typeof body === \"object\") {\n this.#body = (0, utf8_js_1.toUtf8Bytes)(JSON.stringify(body));\n this.#bodyType = \"application/json\";\n } else {\n throw new Error(\"invalid body\");\n }\n }\n /**\n * Returns true if the request has a body.\n */\n hasBody() {\n return this.#body != null;\n }\n /**\n * The HTTP method to use when requesting the URI. If no method\n * has been explicitly set, then ``GET`` is used if the body is\n * null and ``POST`` otherwise.\n */\n get method() {\n if (this.#method) {\n return this.#method;\n }\n if (this.hasBody()) {\n return \"POST\";\n }\n return \"GET\";\n }\n set method(method) {\n if (method == null) {\n method = \"\";\n }\n this.#method = String(method).toUpperCase();\n }\n /**\n * The headers that will be used when requesting the URI. All\n * keys are lower-case.\n *\n * This object is a copy, so any changes will **NOT** be reflected\n * in the ``FetchRequest``.\n *\n * To set a header entry, use the ``setHeader`` method.\n */\n get headers() {\n const headers = Object.assign({}, this.#headers);\n if (this.#creds) {\n headers[\"authorization\"] = `Basic ${(0, base64_js_1.encodeBase64)((0, utf8_js_1.toUtf8Bytes)(this.#creds))}`;\n }\n ;\n if (this.allowGzip) {\n headers[\"accept-encoding\"] = \"gzip\";\n }\n if (headers[\"content-type\"] == null && this.#bodyType) {\n headers[\"content-type\"] = this.#bodyType;\n }\n if (this.body) {\n headers[\"content-length\"] = String(this.body.length);\n }\n return headers;\n }\n /**\n * Get the header for %%key%%, ignoring case.\n */\n getHeader(key) {\n return this.headers[key.toLowerCase()];\n }\n /**\n * Set the header for %%key%% to %%value%%. All values are coerced\n * to a string.\n */\n setHeader(key, value) {\n this.#headers[String(key).toLowerCase()] = String(value);\n }\n /**\n * Clear all headers, resetting all intrinsic headers.\n */\n clearHeaders() {\n this.#headers = {};\n }\n [Symbol.iterator]() {\n const headers = this.headers;\n const keys = Object.keys(headers);\n let index2 = 0;\n return {\n next: () => {\n if (index2 < keys.length) {\n const key = keys[index2++];\n return {\n value: [key, headers[key]],\n done: false\n };\n }\n return { value: void 0, done: true };\n }\n };\n }\n /**\n * The value that will be sent for the ``Authorization`` header.\n *\n * To set the credentials, use the ``setCredentials`` method.\n */\n get credentials() {\n return this.#creds || null;\n }\n /**\n * Sets an ``Authorization`` for %%username%% with %%password%%.\n */\n setCredentials(username, password) {\n (0, errors_js_1.assertArgument)(!username.match(/:/), \"invalid basic authentication username\", \"username\", \"[REDACTED]\");\n this.#creds = `${username}:${password}`;\n }\n /**\n * Enable and request gzip-encoded responses. The response will\n * automatically be decompressed. //(default: true)//\n */\n get allowGzip() {\n return this.#gzip;\n }\n set allowGzip(value) {\n this.#gzip = !!value;\n }\n /**\n * Allow ``Authentication`` credentials to be sent over insecure\n * channels. //(default: false)//\n */\n get allowInsecureAuthentication() {\n return !!this.#allowInsecure;\n }\n set allowInsecureAuthentication(value) {\n this.#allowInsecure = !!value;\n }\n /**\n * The timeout (in milliseconds) to wait for a complete response.\n * //(default: 5 minutes)//\n */\n get timeout() {\n return this.#timeout;\n }\n set timeout(timeout) {\n (0, errors_js_1.assertArgument)(timeout >= 0, \"timeout must be non-zero\", \"timeout\", timeout);\n this.#timeout = timeout;\n }\n /**\n * This function is called prior to each request, for example\n * during a redirection or retry in case of server throttling.\n *\n * This offers an opportunity to populate headers or update\n * content before sending a request.\n */\n get preflightFunc() {\n return this.#preflight || null;\n }\n set preflightFunc(preflight) {\n this.#preflight = preflight;\n }\n /**\n * This function is called after each response, offering an\n * opportunity to provide client-level throttling or updating\n * response data.\n *\n * Any error thrown in this causes the ``send()`` to throw.\n *\n * To schedule a retry attempt (assuming the maximum retry limit\n * has not been reached), use [[response.throwThrottleError]].\n */\n get processFunc() {\n return this.#process || null;\n }\n set processFunc(process2) {\n this.#process = process2;\n }\n /**\n * This function is called on each retry attempt.\n */\n get retryFunc() {\n return this.#retry || null;\n }\n set retryFunc(retry) {\n this.#retry = retry;\n }\n /**\n * This function is called to fetch content from HTTP and\n * HTTPS URLs and is platform specific (e.g. nodejs vs\n * browsers).\n *\n * This is by default the currently registered global getUrl\n * function, which can be changed using [[registerGetUrl]].\n * If this has been set, setting is to ``null`` will cause\n * this FetchRequest (and any future clones) to revert back to\n * using the currently registered global getUrl function.\n *\n * Setting this is generally not necessary, but may be useful\n * for developers that wish to intercept requests or to\n * configurege a proxy or other agent.\n */\n get getUrlFunc() {\n return this.#getUrlFunc || defaultGetUrlFunc;\n }\n set getUrlFunc(value) {\n this.#getUrlFunc = value;\n }\n /**\n * Create a new FetchRequest instance with default values.\n *\n * Once created, each property may be set before issuing a\n * ``.send()`` to make the request.\n */\n constructor(url) {\n this.#url = String(url);\n this.#allowInsecure = false;\n this.#gzip = true;\n this.#headers = {};\n this.#method = \"\";\n this.#timeout = 3e5;\n this.#throttle = {\n slotInterval: SLOT_INTERVAL,\n maxAttempts: MAX_ATTEMPTS\n };\n this.#getUrlFunc = null;\n }\n toString() {\n return ``;\n }\n /**\n * Update the throttle parameters used to determine maximum\n * attempts and exponential-backoff properties.\n */\n setThrottleParams(params) {\n if (params.slotInterval != null) {\n this.#throttle.slotInterval = params.slotInterval;\n }\n if (params.maxAttempts != null) {\n this.#throttle.maxAttempts = params.maxAttempts;\n }\n }\n async #send(attempt, expires, delay, _request, _response) {\n if (attempt >= this.#throttle.maxAttempts) {\n return _response.makeServerError(\"exceeded maximum retry limit\");\n }\n (0, errors_js_1.assert)(getTime() <= expires, \"timeout\", \"TIMEOUT\", {\n operation: \"request.send\",\n reason: \"timeout\",\n request: _request\n });\n if (delay > 0) {\n await wait2(delay);\n }\n let req = this.clone();\n const scheme = (req.url.split(\":\")[0] || \"\").toLowerCase();\n if (scheme in Gateways) {\n const result = await Gateways[scheme](req.url, checkSignal(_request.#signal));\n if (result instanceof FetchResponse) {\n let response2 = result;\n if (this.processFunc) {\n checkSignal(_request.#signal);\n try {\n response2 = await this.processFunc(req, response2);\n } catch (error) {\n if (error.throttle == null || typeof error.stall !== \"number\") {\n response2.makeServerError(\"error in post-processing function\", error).assertOk();\n }\n }\n }\n return response2;\n }\n req = result;\n }\n if (this.preflightFunc) {\n req = await this.preflightFunc(req);\n }\n const resp = await this.getUrlFunc(req, checkSignal(_request.#signal));\n let response = new FetchResponse(resp.statusCode, resp.statusMessage, resp.headers, resp.body, _request);\n if (response.statusCode === 301 || response.statusCode === 302) {\n try {\n const location = response.headers.location || \"\";\n return req.redirect(location).#send(attempt + 1, expires, 0, _request, response);\n } catch (error) {\n }\n return response;\n } else if (response.statusCode === 429) {\n if (this.retryFunc == null || await this.retryFunc(req, response, attempt)) {\n const retryAfter = response.headers[\"retry-after\"];\n let delay2 = this.#throttle.slotInterval * Math.trunc(Math.random() * Math.pow(2, attempt));\n if (typeof retryAfter === \"string\" && retryAfter.match(/^[1-9][0-9]*$/)) {\n delay2 = parseInt(retryAfter);\n }\n return req.clone().#send(attempt + 1, expires, delay2, _request, response);\n }\n }\n if (this.processFunc) {\n checkSignal(_request.#signal);\n try {\n response = await this.processFunc(req, response);\n } catch (error) {\n if (error.throttle == null || typeof error.stall !== \"number\") {\n response.makeServerError(\"error in post-processing function\", error).assertOk();\n }\n let delay2 = this.#throttle.slotInterval * Math.trunc(Math.random() * Math.pow(2, attempt));\n ;\n if (error.stall >= 0) {\n delay2 = error.stall;\n }\n return req.clone().#send(attempt + 1, expires, delay2, _request, response);\n }\n }\n return response;\n }\n /**\n * Resolves to the response by sending the request.\n */\n send() {\n (0, errors_js_1.assert)(this.#signal == null, \"request already sent\", \"UNSUPPORTED_OPERATION\", { operation: \"fetchRequest.send\" });\n this.#signal = new FetchCancelSignal(this);\n return this.#send(0, getTime() + this.timeout, 0, this, new FetchResponse(0, \"\", {}, null, this));\n }\n /**\n * Cancels the inflight response, causing a ``CANCELLED``\n * error to be rejected from the [[send]].\n */\n cancel() {\n (0, errors_js_1.assert)(this.#signal != null, \"request has not been sent\", \"UNSUPPORTED_OPERATION\", { operation: \"fetchRequest.cancel\" });\n const signal = fetchSignals.get(this);\n if (!signal) {\n throw new Error(\"missing signal; should not happen\");\n }\n signal();\n }\n /**\n * Returns a new [[FetchRequest]] that represents the redirection\n * to %%location%%.\n */\n redirect(location) {\n const current = this.url.split(\":\")[0].toLowerCase();\n const target = location.split(\":\")[0].toLowerCase();\n (0, errors_js_1.assert)(this.method === \"GET\" && (current !== \"https\" || target !== \"http\") && location.match(/^https?:/), `unsupported redirect`, \"UNSUPPORTED_OPERATION\", {\n operation: `redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(location)})`\n });\n const req = new _FetchRequest(location);\n req.method = \"GET\";\n req.allowGzip = this.allowGzip;\n req.timeout = this.timeout;\n req.#headers = Object.assign({}, this.#headers);\n if (this.#body) {\n req.#body = new Uint8Array(this.#body);\n }\n req.#bodyType = this.#bodyType;\n return req;\n }\n /**\n * Create a new copy of this request.\n */\n clone() {\n const clone = new _FetchRequest(this.url);\n clone.#method = this.#method;\n if (this.#body) {\n clone.#body = this.#body;\n }\n clone.#bodyType = this.#bodyType;\n clone.#headers = Object.assign({}, this.#headers);\n clone.#creds = this.#creds;\n if (this.allowGzip) {\n clone.allowGzip = true;\n }\n clone.timeout = this.timeout;\n if (this.allowInsecureAuthentication) {\n clone.allowInsecureAuthentication = true;\n }\n clone.#preflight = this.#preflight;\n clone.#process = this.#process;\n clone.#retry = this.#retry;\n clone.#throttle = Object.assign({}, this.#throttle);\n clone.#getUrlFunc = this.#getUrlFunc;\n return clone;\n }\n /**\n * Locks all static configuration for gateways and FetchGetUrlFunc\n * registration.\n */\n static lockConfig() {\n locked = true;\n }\n /**\n * Get the current Gateway function for %%scheme%%.\n */\n static getGateway(scheme) {\n return Gateways[scheme.toLowerCase()] || null;\n }\n /**\n * Use the %%func%% when fetching URIs using %%scheme%%.\n *\n * This method affects all requests globally.\n *\n * If [[lockConfig]] has been called, no change is made and this\n * throws.\n */\n static registerGateway(scheme, func) {\n scheme = scheme.toLowerCase();\n if (scheme === \"http\" || scheme === \"https\") {\n throw new Error(`cannot intercept ${scheme}; use registerGetUrl`);\n }\n if (locked) {\n throw new Error(\"gateways locked\");\n }\n Gateways[scheme] = func;\n }\n /**\n * Use %%getUrl%% when fetching URIs over HTTP and HTTPS requests.\n *\n * This method affects all requests globally.\n *\n * If [[lockConfig]] has been called, no change is made and this\n * throws.\n */\n static registerGetUrl(getUrl2) {\n if (locked) {\n throw new Error(\"gateways locked\");\n }\n defaultGetUrlFunc = getUrl2;\n }\n /**\n * Creates a getUrl function that fetches content from HTTP and\n * HTTPS URLs.\n *\n * The available %%options%% are dependent on the platform\n * implementation of the default getUrl function.\n *\n * This is not generally something that is needed, but is useful\n * when trying to customize simple behaviour when fetching HTTP\n * content.\n */\n static createGetUrlFunc(options) {\n return (0, geturl_js_1.createGetUrl)(options);\n }\n /**\n * Creates a function that can \"fetch\" data URIs.\n *\n * Note that this is automatically done internally to support\n * data URIs, so it is not necessary to register it.\n *\n * This is not generally something that is needed, but may\n * be useful in a wrapper to perfom custom data URI functionality.\n */\n static createDataGateway() {\n return dataGatewayFunc;\n }\n /**\n * Creates a function that will fetch IPFS (unvalidated) from\n * a custom gateway baseUrl.\n *\n * The default IPFS gateway used internally is\n * ``\"https:/\\/gateway.ipfs.io/ipfs/\"``.\n */\n static createIpfsGatewayFunc(baseUrl) {\n return getIpfsGatewayFunc(baseUrl);\n }\n };\n exports3.FetchRequest = FetchRequest;\n var FetchResponse = class _FetchResponse {\n #statusCode;\n #statusMessage;\n #headers;\n #body;\n #request;\n #error;\n toString() {\n return ``;\n }\n /**\n * The response status code.\n */\n get statusCode() {\n return this.#statusCode;\n }\n /**\n * The response status message.\n */\n get statusMessage() {\n return this.#statusMessage;\n }\n /**\n * The response headers. All keys are lower-case.\n */\n get headers() {\n return Object.assign({}, this.#headers);\n }\n /**\n * The response body, or ``null`` if there was no body.\n */\n get body() {\n return this.#body == null ? null : new Uint8Array(this.#body);\n }\n /**\n * The response body as a UTF-8 encoded string, or the empty\n * string (i.e. ``\"\"``) if there was no body.\n *\n * An error is thrown if the body is invalid UTF-8 data.\n */\n get bodyText() {\n try {\n return this.#body == null ? \"\" : (0, utf8_js_1.toUtf8String)(this.#body);\n } catch (error) {\n (0, errors_js_1.assert)(false, \"response body is not valid UTF-8 data\", \"UNSUPPORTED_OPERATION\", {\n operation: \"bodyText\",\n info: { response: this }\n });\n }\n }\n /**\n * The response body, decoded as JSON.\n *\n * An error is thrown if the body is invalid JSON-encoded data\n * or if there was no body.\n */\n get bodyJson() {\n try {\n return JSON.parse(this.bodyText);\n } catch (error) {\n (0, errors_js_1.assert)(false, \"response body is not valid JSON\", \"UNSUPPORTED_OPERATION\", {\n operation: \"bodyJson\",\n info: { response: this }\n });\n }\n }\n [Symbol.iterator]() {\n const headers = this.headers;\n const keys = Object.keys(headers);\n let index2 = 0;\n return {\n next: () => {\n if (index2 < keys.length) {\n const key = keys[index2++];\n return {\n value: [key, headers[key]],\n done: false\n };\n }\n return { value: void 0, done: true };\n }\n };\n }\n constructor(statusCode, statusMessage, headers, body, request) {\n this.#statusCode = statusCode;\n this.#statusMessage = statusMessage;\n this.#headers = Object.keys(headers).reduce((accum, k4) => {\n accum[k4.toLowerCase()] = String(headers[k4]);\n return accum;\n }, {});\n this.#body = body == null ? null : new Uint8Array(body);\n this.#request = request || null;\n this.#error = { message: \"\" };\n }\n /**\n * Return a Response with matching headers and body, but with\n * an error status code (i.e. 599) and %%message%% with an\n * optional %%error%%.\n */\n makeServerError(message, error) {\n let statusMessage;\n if (!message) {\n message = `${this.statusCode} ${this.statusMessage}`;\n statusMessage = `CLIENT ESCALATED SERVER ERROR (${message})`;\n } else {\n statusMessage = `CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${message})`;\n }\n const response = new _FetchResponse(599, statusMessage, this.headers, this.body, this.#request || void 0);\n response.#error = { message, error };\n return response;\n }\n /**\n * If called within a [request.processFunc](FetchRequest-processFunc)\n * call, causes the request to retry as if throttled for %%stall%%\n * milliseconds.\n */\n throwThrottleError(message, stall) {\n if (stall == null) {\n stall = -1;\n } else {\n (0, errors_js_1.assertArgument)(Number.isInteger(stall) && stall >= 0, \"invalid stall timeout\", \"stall\", stall);\n }\n const error = new Error(message || \"throttling requests\");\n (0, properties_js_1.defineProperties)(error, { stall, throttle: true });\n throw error;\n }\n /**\n * Get the header value for %%key%%, ignoring case.\n */\n getHeader(key) {\n return this.headers[key.toLowerCase()];\n }\n /**\n * Returns true if the response has a body.\n */\n hasBody() {\n return this.#body != null;\n }\n /**\n * The request made for this response.\n */\n get request() {\n return this.#request;\n }\n /**\n * Returns true if this response was a success statusCode.\n */\n ok() {\n return this.#error.message === \"\" && this.statusCode >= 200 && this.statusCode < 300;\n }\n /**\n * Throws a ``SERVER_ERROR`` if this response is not ok.\n */\n assertOk() {\n if (this.ok()) {\n return;\n }\n let { message, error } = this.#error;\n if (message === \"\") {\n message = `server response ${this.statusCode} ${this.statusMessage}`;\n }\n let requestUrl = null;\n if (this.request) {\n requestUrl = this.request.url;\n }\n let responseBody = null;\n try {\n if (this.#body) {\n responseBody = (0, utf8_js_1.toUtf8String)(this.#body);\n }\n } catch (e2) {\n }\n (0, errors_js_1.assert)(false, message, \"SERVER_ERROR\", {\n request: this.request || \"unknown request\",\n response: this,\n error,\n info: {\n requestUrl,\n responseBody,\n responseStatus: `${this.statusCode} ${this.statusMessage}`\n }\n });\n }\n };\n exports3.FetchResponse = FetchResponse;\n function getTime() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n function unpercent(value) {\n return (0, utf8_js_1.toUtf8Bytes)(value.replace(/%([0-9a-f][0-9a-f])/gi, (all, code) => {\n return String.fromCharCode(parseInt(code, 16));\n }));\n }\n function wait2(delay) {\n return new Promise((resolve) => setTimeout(resolve, delay));\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/fixednumber.js\n var require_fixednumber2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/fixednumber.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FixedNumber = void 0;\n var data_js_1 = require_data();\n var errors_js_1 = require_errors2();\n var maths_js_1 = require_maths();\n var properties_js_1 = require_properties();\n var BN_N1 = BigInt(-1);\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var BN_5 = BigInt(5);\n var _guard = {};\n var Zeros = \"0000\";\n while (Zeros.length < 80) {\n Zeros += Zeros;\n }\n function getTens(decimals) {\n let result = Zeros;\n while (result.length < decimals) {\n result += result;\n }\n return BigInt(\"1\" + result.substring(0, decimals));\n }\n function checkValue(val, format, safeOp) {\n const width = BigInt(format.width);\n if (format.signed) {\n const limit = BN_1 << width - BN_1;\n (0, errors_js_1.assert)(safeOp == null || val >= -limit && val < limit, \"overflow\", \"NUMERIC_FAULT\", {\n operation: safeOp,\n fault: \"overflow\",\n value: val\n });\n if (val > BN_0) {\n val = (0, maths_js_1.fromTwos)((0, maths_js_1.mask)(val, width), width);\n } else {\n val = -(0, maths_js_1.fromTwos)((0, maths_js_1.mask)(-val, width), width);\n }\n } else {\n const limit = BN_1 << width;\n (0, errors_js_1.assert)(safeOp == null || val >= 0 && val < limit, \"overflow\", \"NUMERIC_FAULT\", {\n operation: safeOp,\n fault: \"overflow\",\n value: val\n });\n val = (val % limit + limit) % limit & limit - BN_1;\n }\n return val;\n }\n function getFormat(value) {\n if (typeof value === \"number\") {\n value = `fixed128x${value}`;\n }\n let signed = true;\n let width = 128;\n let decimals = 18;\n if (typeof value === \"string\") {\n if (value === \"fixed\") {\n } else if (value === \"ufixed\") {\n signed = false;\n } else {\n const match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);\n (0, errors_js_1.assertArgument)(match, \"invalid fixed format\", \"format\", value);\n signed = match[1] !== \"u\";\n width = parseInt(match[2]);\n decimals = parseInt(match[3]);\n }\n } else if (value) {\n const v2 = value;\n const check = (key, type, defaultValue) => {\n if (v2[key] == null) {\n return defaultValue;\n }\n (0, errors_js_1.assertArgument)(typeof v2[key] === type, \"invalid fixed format (\" + key + \" not \" + type + \")\", \"format.\" + key, v2[key]);\n return v2[key];\n };\n signed = check(\"signed\", \"boolean\", signed);\n width = check(\"width\", \"number\", width);\n decimals = check(\"decimals\", \"number\", decimals);\n }\n (0, errors_js_1.assertArgument)(width % 8 === 0, \"invalid FixedNumber width (not byte aligned)\", \"format.width\", width);\n (0, errors_js_1.assertArgument)(decimals <= 80, \"invalid FixedNumber decimals (too large)\", \"format.decimals\", decimals);\n const name = (signed ? \"\" : \"u\") + \"fixed\" + String(width) + \"x\" + String(decimals);\n return { signed, width, decimals, name };\n }\n function toString2(val, decimals) {\n let negative = \"\";\n if (val < BN_0) {\n negative = \"-\";\n val *= BN_N1;\n }\n let str = val.toString();\n if (decimals === 0) {\n return negative + str;\n }\n while (str.length <= decimals) {\n str = Zeros + str;\n }\n const index2 = str.length - decimals;\n str = str.substring(0, index2) + \".\" + str.substring(index2);\n while (str[0] === \"0\" && str[1] !== \".\") {\n str = str.substring(1);\n }\n while (str[str.length - 1] === \"0\" && str[str.length - 2] !== \".\") {\n str = str.substring(0, str.length - 1);\n }\n return negative + str;\n }\n var FixedNumber = class _FixedNumber {\n /**\n * The specific fixed-point arithmetic field for this value.\n */\n format;\n #format;\n // The actual value (accounting for decimals)\n #val;\n // A base-10 value to multiple values by to maintain the magnitude\n #tens;\n /**\n * This is a property so console.log shows a human-meaningful value.\n *\n * @private\n */\n _value;\n // Use this when changing this file to get some typing info,\n // but then switch to any to mask the internal type\n //constructor(guard: any, value: bigint, format: _FixedFormat) {\n /**\n * @private\n */\n constructor(guard, value, format) {\n (0, errors_js_1.assertPrivate)(guard, _guard, \"FixedNumber\");\n this.#val = value;\n this.#format = format;\n const _value = toString2(value, format.decimals);\n (0, properties_js_1.defineProperties)(this, { format: format.name, _value });\n this.#tens = getTens(format.decimals);\n }\n /**\n * If true, negative values are permitted, otherwise only\n * positive values and zero are allowed.\n */\n get signed() {\n return this.#format.signed;\n }\n /**\n * The number of bits available to store the value.\n */\n get width() {\n return this.#format.width;\n }\n /**\n * The number of decimal places in the fixed-point arithment field.\n */\n get decimals() {\n return this.#format.decimals;\n }\n /**\n * The value as an integer, based on the smallest unit the\n * [[decimals]] allow.\n */\n get value() {\n return this.#val;\n }\n #checkFormat(other) {\n (0, errors_js_1.assertArgument)(this.format === other.format, \"incompatible format; use fixedNumber.toFormat\", \"other\", other);\n }\n #checkValue(val, safeOp) {\n val = checkValue(val, this.#format, safeOp);\n return new _FixedNumber(_guard, val, this.#format);\n }\n #add(o5, safeOp) {\n this.#checkFormat(o5);\n return this.#checkValue(this.#val + o5.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% added\n * to %%other%%, ignoring overflow.\n */\n addUnsafe(other) {\n return this.#add(other);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% added\n * to %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n add(other) {\n return this.#add(other, \"add\");\n }\n #sub(o5, safeOp) {\n this.#checkFormat(o5);\n return this.#checkValue(this.#val - o5.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%other%% subtracted\n * from %%this%%, ignoring overflow.\n */\n subUnsafe(other) {\n return this.#sub(other);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%other%% subtracted\n * from %%this%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n sub(other) {\n return this.#sub(other, \"sub\");\n }\n #mul(o5, safeOp) {\n this.#checkFormat(o5);\n return this.#checkValue(this.#val * o5.#val / this.#tens, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%, ignoring overflow and underflow (precision loss).\n */\n mulUnsafe(other) {\n return this.#mul(other);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n mul(other) {\n return this.#mul(other, \"mul\");\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs or if underflow (precision loss) occurs.\n */\n mulSignal(other) {\n this.#checkFormat(other);\n const value = this.#val * other.#val;\n (0, errors_js_1.assert)(value % this.#tens === BN_0, \"precision lost during signalling mul\", \"NUMERIC_FAULT\", {\n operation: \"mulSignal\",\n fault: \"underflow\",\n value: this\n });\n return this.#checkValue(value / this.#tens, \"mulSignal\");\n }\n #div(o5, safeOp) {\n (0, errors_js_1.assert)(o5.#val !== BN_0, \"division by zero\", \"NUMERIC_FAULT\", {\n operation: \"div\",\n fault: \"divide-by-zero\",\n value: this\n });\n this.#checkFormat(o5);\n return this.#checkValue(this.#val * this.#tens / o5.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%, ignoring underflow (precision loss). A\n * [[NumericFaultError]] is thrown if overflow occurs.\n */\n divUnsafe(other) {\n return this.#div(other);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%, ignoring underflow (precision loss). A\n * [[NumericFaultError]] is thrown if overflow occurs.\n */\n div(other) {\n return this.#div(other, \"div\");\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%. A [[NumericFaultError]] is thrown if underflow\n * (precision loss) occurs.\n */\n divSignal(other) {\n (0, errors_js_1.assert)(other.#val !== BN_0, \"division by zero\", \"NUMERIC_FAULT\", {\n operation: \"div\",\n fault: \"divide-by-zero\",\n value: this\n });\n this.#checkFormat(other);\n const value = this.#val * this.#tens;\n (0, errors_js_1.assert)(value % other.#val === BN_0, \"precision lost during signalling div\", \"NUMERIC_FAULT\", {\n operation: \"divSignal\",\n fault: \"underflow\",\n value: this\n });\n return this.#checkValue(value / other.#val, \"divSignal\");\n }\n /**\n * Returns a comparison result between %%this%% and %%other%%.\n *\n * This is suitable for use in sorting, where ``-1`` implies %%this%%\n * is smaller, ``1`` implies %%this%% is larger and ``0`` implies\n * both are equal.\n */\n cmp(other) {\n let a3 = this.value, b4 = other.value;\n const delta = this.decimals - other.decimals;\n if (delta > 0) {\n b4 *= getTens(delta);\n } else if (delta < 0) {\n a3 *= getTens(-delta);\n }\n if (a3 < b4) {\n return -1;\n }\n if (a3 > b4) {\n return 1;\n }\n return 0;\n }\n /**\n * Returns true if %%other%% is equal to %%this%%.\n */\n eq(other) {\n return this.cmp(other) === 0;\n }\n /**\n * Returns true if %%other%% is less than to %%this%%.\n */\n lt(other) {\n return this.cmp(other) < 0;\n }\n /**\n * Returns true if %%other%% is less than or equal to %%this%%.\n */\n lte(other) {\n return this.cmp(other) <= 0;\n }\n /**\n * Returns true if %%other%% is greater than to %%this%%.\n */\n gt(other) {\n return this.cmp(other) > 0;\n }\n /**\n * Returns true if %%other%% is greater than or equal to %%this%%.\n */\n gte(other) {\n return this.cmp(other) >= 0;\n }\n /**\n * Returns a new [[FixedNumber]] which is the largest **integer**\n * that is less than or equal to %%this%%.\n *\n * The decimal component of the result will always be ``0``.\n */\n floor() {\n let val = this.#val;\n if (this.#val < BN_0) {\n val -= this.#tens - BN_1;\n }\n val = this.#val / this.#tens * this.#tens;\n return this.#checkValue(val, \"floor\");\n }\n /**\n * Returns a new [[FixedNumber]] which is the smallest **integer**\n * that is greater than or equal to %%this%%.\n *\n * The decimal component of the result will always be ``0``.\n */\n ceiling() {\n let val = this.#val;\n if (this.#val > BN_0) {\n val += this.#tens - BN_1;\n }\n val = this.#val / this.#tens * this.#tens;\n return this.#checkValue(val, \"ceiling\");\n }\n /**\n * Returns a new [[FixedNumber]] with the decimal component\n * rounded up on ties at %%decimals%% places.\n */\n round(decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n if (decimals >= this.decimals) {\n return this;\n }\n const delta = this.decimals - decimals;\n const bump = BN_5 * getTens(delta - 1);\n let value = this.value + bump;\n const tens = getTens(delta);\n value = value / tens * tens;\n checkValue(value, this.#format, \"round\");\n return new _FixedNumber(_guard, value, this.#format);\n }\n /**\n * Returns true if %%this%% is equal to ``0``.\n */\n isZero() {\n return this.#val === BN_0;\n }\n /**\n * Returns true if %%this%% is less than ``0``.\n */\n isNegative() {\n return this.#val < BN_0;\n }\n /**\n * Returns the string representation of %%this%%.\n */\n toString() {\n return this._value;\n }\n /**\n * Returns a float approximation.\n *\n * Due to IEEE 754 precission (or lack thereof), this function\n * can only return an approximation and most values will contain\n * rounding errors.\n */\n toUnsafeFloat() {\n return parseFloat(this.toString());\n }\n /**\n * Return a new [[FixedNumber]] with the same value but has had\n * its field set to %%format%%.\n *\n * This will throw if the value cannot fit into %%format%%.\n */\n toFormat(format) {\n return _FixedNumber.fromString(this.toString(), format);\n }\n /**\n * Creates a new [[FixedNumber]] for %%value%% divided by\n * %%decimal%% places with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% (once adjusted\n * for %%decimals%%) cannot fit in %%format%%, either due to overflow\n * or underflow (precision loss).\n */\n static fromValue(_value, _decimals, _format) {\n const decimals = _decimals == null ? 0 : (0, maths_js_1.getNumber)(_decimals);\n const format = getFormat(_format);\n let value = (0, maths_js_1.getBigInt)(_value, \"value\");\n const delta = decimals - format.decimals;\n if (delta > 0) {\n const tens = getTens(delta);\n (0, errors_js_1.assert)(value % tens === BN_0, \"value loses precision for format\", \"NUMERIC_FAULT\", {\n operation: \"fromValue\",\n fault: \"underflow\",\n value: _value\n });\n value /= tens;\n } else if (delta < 0) {\n value *= getTens(-delta);\n }\n checkValue(value, format, \"fromValue\");\n return new _FixedNumber(_guard, value, format);\n }\n /**\n * Creates a new [[FixedNumber]] for %%value%% with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% cannot fit\n * in %%format%%, either due to overflow or underflow (precision loss).\n */\n static fromString(_value, _format) {\n const match = _value.match(/^(-?)([0-9]*)\\.?([0-9]*)$/);\n (0, errors_js_1.assertArgument)(match && match[2].length + match[3].length > 0, \"invalid FixedNumber string value\", \"value\", _value);\n const format = getFormat(_format);\n let whole = match[2] || \"0\", decimal = match[3] || \"\";\n while (decimal.length < format.decimals) {\n decimal += Zeros;\n }\n (0, errors_js_1.assert)(decimal.substring(format.decimals).match(/^0*$/), \"too many decimals for format\", \"NUMERIC_FAULT\", {\n operation: \"fromString\",\n fault: \"underflow\",\n value: _value\n });\n decimal = decimal.substring(0, format.decimals);\n const value = BigInt(match[1] + whole + decimal);\n checkValue(value, format, \"fromString\");\n return new _FixedNumber(_guard, value, format);\n }\n /**\n * Creates a new [[FixedNumber]] with the big-endian representation\n * %%value%% with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% cannot fit\n * in %%format%% due to overflow.\n */\n static fromBytes(_value, _format) {\n let value = (0, maths_js_1.toBigInt)((0, data_js_1.getBytes)(_value, \"value\"));\n const format = getFormat(_format);\n if (format.signed) {\n value = (0, maths_js_1.fromTwos)(value, format.width);\n }\n checkValue(value, format, \"fromBytes\");\n return new _FixedNumber(_guard, value, format);\n }\n };\n exports3.FixedNumber = FixedNumber;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/rlp-decode.js\n var require_rlp_decode = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/rlp-decode.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeRlp = void 0;\n var data_js_1 = require_data();\n var errors_js_1 = require_errors2();\n var data_js_2 = require_data();\n function hexlifyByte(value) {\n let result = value.toString(16);\n while (result.length < 2) {\n result = \"0\" + result;\n }\n return \"0x\" + result;\n }\n function unarrayifyInteger(data, offset, length) {\n let result = 0;\n for (let i3 = 0; i3 < length; i3++) {\n result = result * 256 + data[offset + i3];\n }\n return result;\n }\n function _decodeChildren(data, offset, childOffset, length) {\n const result = [];\n while (childOffset < offset + 1 + length) {\n const decoded = _decode(data, childOffset);\n result.push(decoded.result);\n childOffset += decoded.consumed;\n (0, errors_js_1.assert)(childOffset <= offset + 1 + length, \"child data too short\", \"BUFFER_OVERRUN\", {\n buffer: data,\n length,\n offset\n });\n }\n return { consumed: 1 + length, result };\n }\n function _decode(data, offset) {\n (0, errors_js_1.assert)(data.length !== 0, \"data too short\", \"BUFFER_OVERRUN\", {\n buffer: data,\n length: 0,\n offset: 1\n });\n const checkOffset = (offset2) => {\n (0, errors_js_1.assert)(offset2 <= data.length, \"data short segment too short\", \"BUFFER_OVERRUN\", {\n buffer: data,\n length: data.length,\n offset: offset2\n });\n };\n if (data[offset] >= 248) {\n const lengthLength = data[offset] - 247;\n checkOffset(offset + 1 + lengthLength);\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n checkOffset(offset + 1 + lengthLength + length);\n return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length);\n } else if (data[offset] >= 192) {\n const length = data[offset] - 192;\n checkOffset(offset + 1 + length);\n return _decodeChildren(data, offset, offset + 1, length);\n } else if (data[offset] >= 184) {\n const lengthLength = data[offset] - 183;\n checkOffset(offset + 1 + lengthLength);\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n checkOffset(offset + 1 + lengthLength + length);\n const result = (0, data_js_1.hexlify)(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length));\n return { consumed: 1 + lengthLength + length, result };\n } else if (data[offset] >= 128) {\n const length = data[offset] - 128;\n checkOffset(offset + 1 + length);\n const result = (0, data_js_1.hexlify)(data.slice(offset + 1, offset + 1 + length));\n return { consumed: 1 + length, result };\n }\n return { consumed: 1, result: hexlifyByte(data[offset]) };\n }\n function decodeRlp(_data) {\n const data = (0, data_js_2.getBytes)(_data, \"data\");\n const decoded = _decode(data, 0);\n (0, errors_js_1.assertArgument)(decoded.consumed === data.length, \"unexpected junk after rlp payload\", \"data\", _data);\n return decoded.result;\n }\n exports3.decodeRlp = decodeRlp;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/rlp-encode.js\n var require_rlp_encode = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/rlp-encode.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encodeRlp = void 0;\n var data_js_1 = require_data();\n function arrayifyInteger(value) {\n const result = [];\n while (value) {\n result.unshift(value & 255);\n value >>= 8;\n }\n return result;\n }\n function _encode(object) {\n if (Array.isArray(object)) {\n let payload = [];\n object.forEach(function(child) {\n payload = payload.concat(_encode(child));\n });\n if (payload.length <= 55) {\n payload.unshift(192 + payload.length);\n return payload;\n }\n const length2 = arrayifyInteger(payload.length);\n length2.unshift(247 + length2.length);\n return length2.concat(payload);\n }\n const data = Array.prototype.slice.call((0, data_js_1.getBytes)(object, \"object\"));\n if (data.length === 1 && data[0] <= 127) {\n return data;\n } else if (data.length <= 55) {\n data.unshift(128 + data.length);\n return data;\n }\n const length = arrayifyInteger(data.length);\n length.unshift(183 + length.length);\n return length.concat(data);\n }\n var nibbles = \"0123456789abcdef\";\n function encodeRlp(object) {\n let result = \"0x\";\n for (const v2 of _encode(object)) {\n result += nibbles[v2 >> 4];\n result += nibbles[v2 & 15];\n }\n return result;\n }\n exports3.encodeRlp = encodeRlp;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/units.js\n var require_units = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/units.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.parseEther = exports3.formatEther = exports3.parseUnits = exports3.formatUnits = void 0;\n var errors_js_1 = require_errors2();\n var fixednumber_js_1 = require_fixednumber2();\n var maths_js_1 = require_maths();\n var names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\"\n ];\n function formatUnits2(value, unit) {\n let decimals = 18;\n if (typeof unit === \"string\") {\n const index2 = names.indexOf(unit);\n (0, errors_js_1.assertArgument)(index2 >= 0, \"invalid unit\", \"unit\", unit);\n decimals = 3 * index2;\n } else if (unit != null) {\n decimals = (0, maths_js_1.getNumber)(unit, \"unit\");\n }\n return fixednumber_js_1.FixedNumber.fromValue(value, decimals, { decimals, width: 512 }).toString();\n }\n exports3.formatUnits = formatUnits2;\n function parseUnits(value, unit) {\n (0, errors_js_1.assertArgument)(typeof value === \"string\", \"value must be a string\", \"value\", value);\n let decimals = 18;\n if (typeof unit === \"string\") {\n const index2 = names.indexOf(unit);\n (0, errors_js_1.assertArgument)(index2 >= 0, \"invalid unit\", \"unit\", unit);\n decimals = 3 * index2;\n } else if (unit != null) {\n decimals = (0, maths_js_1.getNumber)(unit, \"unit\");\n }\n return fixednumber_js_1.FixedNumber.fromString(value, { decimals, width: 512 }).value;\n }\n exports3.parseUnits = parseUnits;\n function formatEther2(wei) {\n return formatUnits2(wei, 18);\n }\n exports3.formatEther = formatEther2;\n function parseEther(ether) {\n return parseUnits(ether, 18);\n }\n exports3.parseEther = parseEther;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/uuid.js\n var require_uuid = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/uuid.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.uuidV4 = void 0;\n var data_js_1 = require_data();\n function uuidV4(randomBytes3) {\n const bytes = (0, data_js_1.getBytes)(randomBytes3, \"randomBytes\");\n bytes[6] = bytes[6] & 15 | 64;\n bytes[8] = bytes[8] & 63 | 128;\n const value = (0, data_js_1.hexlify)(bytes);\n return [\n value.substring(2, 10),\n value.substring(10, 14),\n value.substring(14, 18),\n value.substring(18, 22),\n value.substring(22, 34)\n ].join(\"-\");\n }\n exports3.uuidV4 = uuidV4;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/index.js\n var require_utils8 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toUtf8String = exports3.toUtf8CodePoints = exports3.toUtf8Bytes = exports3.parseUnits = exports3.formatUnits = exports3.parseEther = exports3.formatEther = exports3.encodeRlp = exports3.decodeRlp = exports3.defineProperties = exports3.resolveProperties = exports3.toQuantity = exports3.toBeArray = exports3.toBeHex = exports3.toNumber = exports3.toBigInt = exports3.getUint = exports3.getNumber = exports3.getBigInt = exports3.mask = exports3.toTwos = exports3.fromTwos = exports3.FixedNumber = exports3.FetchCancelSignal = exports3.FetchResponse = exports3.FetchRequest = exports3.EventPayload = exports3.makeError = exports3.assertNormalize = exports3.assertPrivate = exports3.assertArgumentCount = exports3.assertArgument = exports3.assert = exports3.isError = exports3.isCallException = exports3.zeroPadBytes = exports3.zeroPadValue = exports3.stripZerosLeft = exports3.dataSlice = exports3.dataLength = exports3.concat = exports3.hexlify = exports3.isBytesLike = exports3.isHexString = exports3.getBytesCopy = exports3.getBytes = exports3.encodeBase64 = exports3.decodeBase64 = exports3.encodeBase58 = exports3.decodeBase58 = void 0;\n exports3.uuidV4 = exports3.Utf8ErrorFuncs = void 0;\n var base58_js_1 = require_base58();\n Object.defineProperty(exports3, \"decodeBase58\", { enumerable: true, get: function() {\n return base58_js_1.decodeBase58;\n } });\n Object.defineProperty(exports3, \"encodeBase58\", { enumerable: true, get: function() {\n return base58_js_1.encodeBase58;\n } });\n var base64_js_1 = require_base64_browser();\n Object.defineProperty(exports3, \"decodeBase64\", { enumerable: true, get: function() {\n return base64_js_1.decodeBase64;\n } });\n Object.defineProperty(exports3, \"encodeBase64\", { enumerable: true, get: function() {\n return base64_js_1.encodeBase64;\n } });\n var data_js_1 = require_data();\n Object.defineProperty(exports3, \"getBytes\", { enumerable: true, get: function() {\n return data_js_1.getBytes;\n } });\n Object.defineProperty(exports3, \"getBytesCopy\", { enumerable: true, get: function() {\n return data_js_1.getBytesCopy;\n } });\n Object.defineProperty(exports3, \"isHexString\", { enumerable: true, get: function() {\n return data_js_1.isHexString;\n } });\n Object.defineProperty(exports3, \"isBytesLike\", { enumerable: true, get: function() {\n return data_js_1.isBytesLike;\n } });\n Object.defineProperty(exports3, \"hexlify\", { enumerable: true, get: function() {\n return data_js_1.hexlify;\n } });\n Object.defineProperty(exports3, \"concat\", { enumerable: true, get: function() {\n return data_js_1.concat;\n } });\n Object.defineProperty(exports3, \"dataLength\", { enumerable: true, get: function() {\n return data_js_1.dataLength;\n } });\n Object.defineProperty(exports3, \"dataSlice\", { enumerable: true, get: function() {\n return data_js_1.dataSlice;\n } });\n Object.defineProperty(exports3, \"stripZerosLeft\", { enumerable: true, get: function() {\n return data_js_1.stripZerosLeft;\n } });\n Object.defineProperty(exports3, \"zeroPadValue\", { enumerable: true, get: function() {\n return data_js_1.zeroPadValue;\n } });\n Object.defineProperty(exports3, \"zeroPadBytes\", { enumerable: true, get: function() {\n return data_js_1.zeroPadBytes;\n } });\n var errors_js_1 = require_errors2();\n Object.defineProperty(exports3, \"isCallException\", { enumerable: true, get: function() {\n return errors_js_1.isCallException;\n } });\n Object.defineProperty(exports3, \"isError\", { enumerable: true, get: function() {\n return errors_js_1.isError;\n } });\n Object.defineProperty(exports3, \"assert\", { enumerable: true, get: function() {\n return errors_js_1.assert;\n } });\n Object.defineProperty(exports3, \"assertArgument\", { enumerable: true, get: function() {\n return errors_js_1.assertArgument;\n } });\n Object.defineProperty(exports3, \"assertArgumentCount\", { enumerable: true, get: function() {\n return errors_js_1.assertArgumentCount;\n } });\n Object.defineProperty(exports3, \"assertPrivate\", { enumerable: true, get: function() {\n return errors_js_1.assertPrivate;\n } });\n Object.defineProperty(exports3, \"assertNormalize\", { enumerable: true, get: function() {\n return errors_js_1.assertNormalize;\n } });\n Object.defineProperty(exports3, \"makeError\", { enumerable: true, get: function() {\n return errors_js_1.makeError;\n } });\n var events_js_1 = require_events();\n Object.defineProperty(exports3, \"EventPayload\", { enumerable: true, get: function() {\n return events_js_1.EventPayload;\n } });\n var fetch_js_1 = require_fetch();\n Object.defineProperty(exports3, \"FetchRequest\", { enumerable: true, get: function() {\n return fetch_js_1.FetchRequest;\n } });\n Object.defineProperty(exports3, \"FetchResponse\", { enumerable: true, get: function() {\n return fetch_js_1.FetchResponse;\n } });\n Object.defineProperty(exports3, \"FetchCancelSignal\", { enumerable: true, get: function() {\n return fetch_js_1.FetchCancelSignal;\n } });\n var fixednumber_js_1 = require_fixednumber2();\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return fixednumber_js_1.FixedNumber;\n } });\n var maths_js_1 = require_maths();\n Object.defineProperty(exports3, \"fromTwos\", { enumerable: true, get: function() {\n return maths_js_1.fromTwos;\n } });\n Object.defineProperty(exports3, \"toTwos\", { enumerable: true, get: function() {\n return maths_js_1.toTwos;\n } });\n Object.defineProperty(exports3, \"mask\", { enumerable: true, get: function() {\n return maths_js_1.mask;\n } });\n Object.defineProperty(exports3, \"getBigInt\", { enumerable: true, get: function() {\n return maths_js_1.getBigInt;\n } });\n Object.defineProperty(exports3, \"getNumber\", { enumerable: true, get: function() {\n return maths_js_1.getNumber;\n } });\n Object.defineProperty(exports3, \"getUint\", { enumerable: true, get: function() {\n return maths_js_1.getUint;\n } });\n Object.defineProperty(exports3, \"toBigInt\", { enumerable: true, get: function() {\n return maths_js_1.toBigInt;\n } });\n Object.defineProperty(exports3, \"toNumber\", { enumerable: true, get: function() {\n return maths_js_1.toNumber;\n } });\n Object.defineProperty(exports3, \"toBeHex\", { enumerable: true, get: function() {\n return maths_js_1.toBeHex;\n } });\n Object.defineProperty(exports3, \"toBeArray\", { enumerable: true, get: function() {\n return maths_js_1.toBeArray;\n } });\n Object.defineProperty(exports3, \"toQuantity\", { enumerable: true, get: function() {\n return maths_js_1.toQuantity;\n } });\n var properties_js_1 = require_properties();\n Object.defineProperty(exports3, \"resolveProperties\", { enumerable: true, get: function() {\n return properties_js_1.resolveProperties;\n } });\n Object.defineProperty(exports3, \"defineProperties\", { enumerable: true, get: function() {\n return properties_js_1.defineProperties;\n } });\n var rlp_decode_js_1 = require_rlp_decode();\n Object.defineProperty(exports3, \"decodeRlp\", { enumerable: true, get: function() {\n return rlp_decode_js_1.decodeRlp;\n } });\n var rlp_encode_js_1 = require_rlp_encode();\n Object.defineProperty(exports3, \"encodeRlp\", { enumerable: true, get: function() {\n return rlp_encode_js_1.encodeRlp;\n } });\n var units_js_1 = require_units();\n Object.defineProperty(exports3, \"formatEther\", { enumerable: true, get: function() {\n return units_js_1.formatEther;\n } });\n Object.defineProperty(exports3, \"parseEther\", { enumerable: true, get: function() {\n return units_js_1.parseEther;\n } });\n Object.defineProperty(exports3, \"formatUnits\", { enumerable: true, get: function() {\n return units_js_1.formatUnits;\n } });\n Object.defineProperty(exports3, \"parseUnits\", { enumerable: true, get: function() {\n return units_js_1.parseUnits;\n } });\n var utf8_js_1 = require_utf82();\n Object.defineProperty(exports3, \"toUtf8Bytes\", { enumerable: true, get: function() {\n return utf8_js_1.toUtf8Bytes;\n } });\n Object.defineProperty(exports3, \"toUtf8CodePoints\", { enumerable: true, get: function() {\n return utf8_js_1.toUtf8CodePoints;\n } });\n Object.defineProperty(exports3, \"toUtf8String\", { enumerable: true, get: function() {\n return utf8_js_1.toUtf8String;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorFuncs\", { enumerable: true, get: function() {\n return utf8_js_1.Utf8ErrorFuncs;\n } });\n var uuid_js_1 = require_uuid();\n Object.defineProperty(exports3, \"uuidV4\", { enumerable: true, get: function() {\n return uuid_js_1.uuidV4;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/abstract-coder.js\n var require_abstract_coder2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/abstract-coder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Reader = exports3.Writer = exports3.Coder = exports3.checkResultErrors = exports3.Result = exports3.WordSize = void 0;\n var index_js_1 = require_utils8();\n exports3.WordSize = 32;\n var Padding = new Uint8Array(exports3.WordSize);\n var passProperties = [\"then\"];\n var _guard = {};\n var resultNames = /* @__PURE__ */ new WeakMap();\n function getNames(result) {\n return resultNames.get(result);\n }\n function setNames(result, names) {\n resultNames.set(result, names);\n }\n function throwError(name, error) {\n const wrapped = new Error(`deferred error during ABI decoding triggered accessing ${name}`);\n wrapped.error = error;\n throw wrapped;\n }\n function toObject(names, items, deep) {\n if (names.indexOf(null) >= 0) {\n return items.map((item, index2) => {\n if (item instanceof Result) {\n return toObject(getNames(item), item, deep);\n }\n return item;\n });\n }\n return names.reduce((accum, name, index2) => {\n let item = items.getValue(name);\n if (!(name in accum)) {\n if (deep && item instanceof Result) {\n item = toObject(getNames(item), item, deep);\n }\n accum[name] = item;\n }\n return accum;\n }, {});\n }\n var Result = class _Result extends Array {\n // No longer used; but cannot be removed as it will remove the\n // #private field from the .d.ts which may break backwards\n // compatibility\n #names;\n /**\n * @private\n */\n constructor(...args) {\n const guard = args[0];\n let items = args[1];\n let names = (args[2] || []).slice();\n let wrap3 = true;\n if (guard !== _guard) {\n items = args;\n names = [];\n wrap3 = false;\n }\n super(items.length);\n items.forEach((item, index2) => {\n this[index2] = item;\n });\n const nameCounts = names.reduce((accum, name) => {\n if (typeof name === \"string\") {\n accum.set(name, (accum.get(name) || 0) + 1);\n }\n return accum;\n }, /* @__PURE__ */ new Map());\n setNames(this, Object.freeze(items.map((item, index2) => {\n const name = names[index2];\n if (name != null && nameCounts.get(name) === 1) {\n return name;\n }\n return null;\n })));\n this.#names = [];\n if (this.#names == null) {\n void this.#names;\n }\n if (!wrap3) {\n return;\n }\n Object.freeze(this);\n const proxy = new Proxy(this, {\n get: (target, prop, receiver) => {\n if (typeof prop === \"string\") {\n if (prop.match(/^[0-9]+$/)) {\n const index2 = (0, index_js_1.getNumber)(prop, \"%index\");\n if (index2 < 0 || index2 >= this.length) {\n throw new RangeError(\"out of result range\");\n }\n const item = target[index2];\n if (item instanceof Error) {\n throwError(`index ${index2}`, item);\n }\n return item;\n }\n if (passProperties.indexOf(prop) >= 0) {\n return Reflect.get(target, prop, receiver);\n }\n const value = target[prop];\n if (value instanceof Function) {\n return function(...args2) {\n return value.apply(this === receiver ? target : this, args2);\n };\n } else if (!(prop in target)) {\n return target.getValue.apply(this === receiver ? target : this, [prop]);\n }\n }\n return Reflect.get(target, prop, receiver);\n }\n });\n setNames(proxy, getNames(this));\n return proxy;\n }\n /**\n * Returns the Result as a normal Array. If %%deep%%, any children\n * which are Result objects are also converted to a normal Array.\n *\n * This will throw if there are any outstanding deferred\n * errors.\n */\n toArray(deep) {\n const result = [];\n this.forEach((item, index2) => {\n if (item instanceof Error) {\n throwError(`index ${index2}`, item);\n }\n if (deep && item instanceof _Result) {\n item = item.toArray(deep);\n }\n result.push(item);\n });\n return result;\n }\n /**\n * Returns the Result as an Object with each name-value pair. If\n * %%deep%%, any children which are Result objects are also\n * converted to an Object.\n *\n * This will throw if any value is unnamed, or if there are\n * any outstanding deferred errors.\n */\n toObject(deep) {\n const names = getNames(this);\n return names.reduce((accum, name, index2) => {\n (0, index_js_1.assert)(name != null, `value at index ${index2} unnamed`, \"UNSUPPORTED_OPERATION\", {\n operation: \"toObject()\"\n });\n return toObject(names, this, deep);\n }, {});\n }\n /**\n * @_ignore\n */\n slice(start, end) {\n if (start == null) {\n start = 0;\n }\n if (start < 0) {\n start += this.length;\n if (start < 0) {\n start = 0;\n }\n }\n if (end == null) {\n end = this.length;\n }\n if (end < 0) {\n end += this.length;\n if (end < 0) {\n end = 0;\n }\n }\n if (end > this.length) {\n end = this.length;\n }\n const _names = getNames(this);\n const result = [], names = [];\n for (let i3 = start; i3 < end; i3++) {\n result.push(this[i3]);\n names.push(_names[i3]);\n }\n return new _Result(_guard, result, names);\n }\n /**\n * @_ignore\n */\n filter(callback, thisArg) {\n const _names = getNames(this);\n const result = [], names = [];\n for (let i3 = 0; i3 < this.length; i3++) {\n const item = this[i3];\n if (item instanceof Error) {\n throwError(`index ${i3}`, item);\n }\n if (callback.call(thisArg, item, i3, this)) {\n result.push(item);\n names.push(_names[i3]);\n }\n }\n return new _Result(_guard, result, names);\n }\n /**\n * @_ignore\n */\n map(callback, thisArg) {\n const result = [];\n for (let i3 = 0; i3 < this.length; i3++) {\n const item = this[i3];\n if (item instanceof Error) {\n throwError(`index ${i3}`, item);\n }\n result.push(callback.call(thisArg, item, i3, this));\n }\n return result;\n }\n /**\n * Returns the value for %%name%%.\n *\n * Since it is possible to have a key whose name conflicts with\n * a method on a [[Result]] or its superclass Array, or any\n * JavaScript keyword, this ensures all named values are still\n * accessible by name.\n */\n getValue(name) {\n const index2 = getNames(this).indexOf(name);\n if (index2 === -1) {\n return void 0;\n }\n const value = this[index2];\n if (value instanceof Error) {\n throwError(`property ${JSON.stringify(name)}`, value.error);\n }\n return value;\n }\n /**\n * Creates a new [[Result]] for %%items%% with each entry\n * also accessible by its corresponding name in %%keys%%.\n */\n static fromItems(items, keys) {\n return new _Result(_guard, items, keys);\n }\n };\n exports3.Result = Result;\n function checkResultErrors(result) {\n const errors = [];\n const checkErrors = function(path, object) {\n if (!Array.isArray(object)) {\n return;\n }\n for (let key in object) {\n const childPath = path.slice();\n childPath.push(key);\n try {\n checkErrors(childPath, object[key]);\n } catch (error) {\n errors.push({ path: childPath, error });\n }\n }\n };\n checkErrors([], result);\n return errors;\n }\n exports3.checkResultErrors = checkResultErrors;\n function getValue(value) {\n let bytes = (0, index_js_1.toBeArray)(value);\n (0, index_js_1.assert)(bytes.length <= exports3.WordSize, \"value out-of-bounds\", \"BUFFER_OVERRUN\", { buffer: bytes, length: exports3.WordSize, offset: bytes.length });\n if (bytes.length !== exports3.WordSize) {\n bytes = (0, index_js_1.getBytesCopy)((0, index_js_1.concat)([Padding.slice(bytes.length % exports3.WordSize), bytes]));\n }\n return bytes;\n }\n var Coder = class {\n // The coder name:\n // - address, uint256, tuple, array, etc.\n name;\n // The fully expanded type, including composite types:\n // - address, uint256, tuple(address,bytes), uint256[3][4][], etc.\n type;\n // The localName bound in the signature, in this example it is \"baz\":\n // - tuple(address foo, uint bar) baz\n localName;\n // Whether this type is dynamic:\n // - Dynamic: bytes, string, address[], tuple(boolean[]), etc.\n // - Not Dynamic: address, uint256, boolean[3], tuple(address, uint8)\n dynamic;\n constructor(name, type, localName, dynamic) {\n (0, index_js_1.defineProperties)(this, { name, type, localName, dynamic }, {\n name: \"string\",\n type: \"string\",\n localName: \"string\",\n dynamic: \"boolean\"\n });\n }\n _throwError(message, value) {\n (0, index_js_1.assertArgument)(false, message, this.localName, value);\n }\n };\n exports3.Coder = Coder;\n var Writer = class {\n // An array of WordSize lengthed objects to concatenation\n #data;\n #dataLength;\n constructor() {\n this.#data = [];\n this.#dataLength = 0;\n }\n get data() {\n return (0, index_js_1.concat)(this.#data);\n }\n get length() {\n return this.#dataLength;\n }\n #writeData(data) {\n this.#data.push(data);\n this.#dataLength += data.length;\n return data.length;\n }\n appendWriter(writer) {\n return this.#writeData((0, index_js_1.getBytesCopy)(writer.data));\n }\n // Arrayish item; pad on the right to *nearest* WordSize\n writeBytes(value) {\n let bytes = (0, index_js_1.getBytesCopy)(value);\n const paddingOffset = bytes.length % exports3.WordSize;\n if (paddingOffset) {\n bytes = (0, index_js_1.getBytesCopy)((0, index_js_1.concat)([bytes, Padding.slice(paddingOffset)]));\n }\n return this.#writeData(bytes);\n }\n // Numeric item; pad on the left *to* WordSize\n writeValue(value) {\n return this.#writeData(getValue(value));\n }\n // Inserts a numeric place-holder, returning a callback that can\n // be used to asjust the value later\n writeUpdatableValue() {\n const offset = this.#data.length;\n this.#data.push(Padding);\n this.#dataLength += exports3.WordSize;\n return (value) => {\n this.#data[offset] = getValue(value);\n };\n }\n };\n exports3.Writer = Writer;\n var Reader = class _Reader {\n // Allows incomplete unpadded data to be read; otherwise an error\n // is raised if attempting to overrun the buffer. This is required\n // to deal with an old Solidity bug, in which event data for\n // external (not public thoguh) was tightly packed.\n allowLoose;\n #data;\n #offset;\n #bytesRead;\n #parent;\n #maxInflation;\n constructor(data, allowLoose, maxInflation) {\n (0, index_js_1.defineProperties)(this, { allowLoose: !!allowLoose });\n this.#data = (0, index_js_1.getBytesCopy)(data);\n this.#bytesRead = 0;\n this.#parent = null;\n this.#maxInflation = maxInflation != null ? maxInflation : 1024;\n this.#offset = 0;\n }\n get data() {\n return (0, index_js_1.hexlify)(this.#data);\n }\n get dataLength() {\n return this.#data.length;\n }\n get consumed() {\n return this.#offset;\n }\n get bytes() {\n return new Uint8Array(this.#data);\n }\n #incrementBytesRead(count) {\n if (this.#parent) {\n return this.#parent.#incrementBytesRead(count);\n }\n this.#bytesRead += count;\n (0, index_js_1.assert)(this.#maxInflation < 1 || this.#bytesRead <= this.#maxInflation * this.dataLength, `compressed ABI data exceeds inflation ratio of ${this.#maxInflation} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`, \"BUFFER_OVERRUN\", {\n buffer: (0, index_js_1.getBytesCopy)(this.#data),\n offset: this.#offset,\n length: count,\n info: {\n bytesRead: this.#bytesRead,\n dataLength: this.dataLength\n }\n });\n }\n #peekBytes(offset, length, loose) {\n let alignedLength = Math.ceil(length / exports3.WordSize) * exports3.WordSize;\n if (this.#offset + alignedLength > this.#data.length) {\n if (this.allowLoose && loose && this.#offset + length <= this.#data.length) {\n alignedLength = length;\n } else {\n (0, index_js_1.assert)(false, \"data out-of-bounds\", \"BUFFER_OVERRUN\", {\n buffer: (0, index_js_1.getBytesCopy)(this.#data),\n length: this.#data.length,\n offset: this.#offset + alignedLength\n });\n }\n }\n return this.#data.slice(this.#offset, this.#offset + alignedLength);\n }\n // Create a sub-reader with the same underlying data, but offset\n subReader(offset) {\n const reader = new _Reader(this.#data.slice(this.#offset + offset), this.allowLoose, this.#maxInflation);\n reader.#parent = this;\n return reader;\n }\n // Read bytes\n readBytes(length, loose) {\n let bytes = this.#peekBytes(0, length, !!loose);\n this.#incrementBytesRead(length);\n this.#offset += bytes.length;\n return bytes.slice(0, length);\n }\n // Read a numeric values\n readValue() {\n return (0, index_js_1.toBigInt)(this.readBytes(exports3.WordSize));\n }\n readIndex() {\n return (0, index_js_1.toNumber)(this.readBytes(exports3.WordSize));\n }\n };\n exports3.Reader = Reader;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_assert.js\n var require_assert = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_assert.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.output = exports3.exists = exports3.hash = exports3.bytes = exports3.bool = exports3.number = void 0;\n function number(n2) {\n if (!Number.isSafeInteger(n2) || n2 < 0)\n throw new Error(`Wrong positive integer: ${n2}`);\n }\n exports3.number = number;\n function bool(b4) {\n if (typeof b4 !== \"boolean\")\n throw new Error(`Expected boolean, not ${b4}`);\n }\n exports3.bool = bool;\n function bytes(b4, ...lengths) {\n if (!(b4 instanceof Uint8Array))\n throw new Error(\"Expected Uint8Array\");\n if (lengths.length > 0 && !lengths.includes(b4.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b4.length}`);\n }\n exports3.bytes = bytes;\n function hash3(hash4) {\n if (typeof hash4 !== \"function\" || typeof hash4.create !== \"function\")\n throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");\n number(hash4.outputLen);\n number(hash4.blockLen);\n }\n exports3.hash = hash3;\n function exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error(\"Hash instance has been destroyed\");\n if (checkFinished && instance.finished)\n throw new Error(\"Hash#digest() has already been called\");\n }\n exports3.exists = exists;\n function output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n }\n exports3.output = output;\n var assert9 = { number, bool, bytes, hash: hash3, exists, output };\n exports3.default = assert9;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/crypto.js\n var require_crypto = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/crypto.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.crypto = void 0;\n exports3.crypto = typeof globalThis === \"object\" && \"crypto\" in globalThis ? globalThis.crypto : void 0;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/utils.js\n var require_utils9 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.randomBytes = exports3.wrapXOFConstructorWithOpts = exports3.wrapConstructorWithOpts = exports3.wrapConstructor = exports3.checkOpts = exports3.Hash = exports3.concatBytes = exports3.toBytes = exports3.utf8ToBytes = exports3.asyncLoop = exports3.nextTick = exports3.hexToBytes = exports3.bytesToHex = exports3.isLE = exports3.rotr = exports3.createView = exports3.u32 = exports3.u8 = void 0;\n var crypto_1 = require_crypto();\n var u8a = (a3) => a3 instanceof Uint8Array;\n var u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\n exports3.u8 = u8;\n var u322 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n exports3.u32 = u322;\n var createView3 = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n exports3.createView = createView3;\n var rotr3 = (word, shift) => word << 32 - shift | word >>> shift;\n exports3.rotr = rotr3;\n exports3.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;\n if (!exports3.isLE)\n throw new Error(\"Non little-endian hardware is not supported\");\n var hexes7 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n function bytesToHex6(bytes) {\n if (!u8a(bytes))\n throw new Error(\"Uint8Array expected\");\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes7[bytes[i3]];\n }\n return hex;\n }\n exports3.bytesToHex = bytesToHex6;\n function hexToBytes6(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error(\"padded hex string expected, got unpadded hex of length \" + len);\n const array = new Uint8Array(len / 2);\n for (let i3 = 0; i3 < array.length; i3++) {\n const j2 = i3 * 2;\n const hexByte = hex.slice(j2, j2 + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error(\"Invalid byte sequence\");\n array[i3] = byte;\n }\n return array;\n }\n exports3.hexToBytes = hexToBytes6;\n var nextTick2 = async () => {\n };\n exports3.nextTick = nextTick2;\n async function asyncLoop2(iters, tick, cb) {\n let ts = Date.now();\n for (let i3 = 0; i3 < iters; i3++) {\n cb(i3);\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await (0, exports3.nextTick)();\n ts += diff;\n }\n }\n exports3.asyncLoop = asyncLoop2;\n function utf8ToBytes5(str) {\n if (typeof str !== \"string\")\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str));\n }\n exports3.utf8ToBytes = utf8ToBytes5;\n function toBytes6(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes5(data);\n if (!u8a(data))\n throw new Error(`expected Uint8Array, got ${typeof data}`);\n return data;\n }\n exports3.toBytes = toBytes6;\n function concatBytes6(...arrays) {\n const r2 = new Uint8Array(arrays.reduce((sum, a3) => sum + a3.length, 0));\n let pad6 = 0;\n arrays.forEach((a3) => {\n if (!u8a(a3))\n throw new Error(\"Uint8Array expected\");\n r2.set(a3, pad6);\n pad6 += a3.length;\n });\n return r2;\n }\n exports3.concatBytes = concatBytes6;\n var Hash3 = class {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n };\n exports3.Hash = Hash3;\n var toStr = {}.toString;\n function checkOpts2(defaults, opts) {\n if (opts !== void 0 && toStr.call(opts) !== \"[object Object]\")\n throw new Error(\"Options should be object or undefined\");\n const merged = Object.assign(defaults, opts);\n return merged;\n }\n exports3.checkOpts = checkOpts2;\n function wrapConstructor2(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes6(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n }\n exports3.wrapConstructor = wrapConstructor2;\n function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes6(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n }\n exports3.wrapConstructorWithOpts = wrapConstructorWithOpts;\n function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes6(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n }\n exports3.wrapXOFConstructorWithOpts = wrapXOFConstructorWithOpts;\n function randomBytes3(bytesLength = 32) {\n if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === \"function\") {\n return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error(\"crypto.getRandomValues must be defined\");\n }\n exports3.randomBytes = randomBytes3;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/hmac.js\n var require_hmac2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/hmac.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.hmac = exports3.HMAC = void 0;\n var _assert_js_1 = require_assert();\n var utils_js_1 = require_utils9();\n var HMAC3 = class extends utils_js_1.Hash {\n constructor(hash3, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n (0, _assert_js_1.hash)(hash3);\n const key = (0, utils_js_1.toBytes)(_key);\n this.iHash = hash3.create();\n if (typeof this.iHash.update !== \"function\")\n throw new Error(\"Expected instance of class which extends utils.Hash\");\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad6 = new Uint8Array(blockLen);\n pad6.set(key.length > blockLen ? hash3.create().update(key).digest() : key);\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54;\n this.iHash.update(pad6);\n this.oHash = hash3.create();\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54 ^ 92;\n this.oHash.update(pad6);\n pad6.fill(0);\n }\n update(buf) {\n (0, _assert_js_1.exists)(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n (0, _assert_js_1.exists)(this);\n (0, _assert_js_1.bytes)(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n };\n exports3.HMAC = HMAC3;\n var hmac3 = (hash3, key, message) => new HMAC3(hash3, key).update(message).digest();\n exports3.hmac = hmac3;\n exports3.hmac.create = (hash3, key) => new HMAC3(hash3, key);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/pbkdf2.js\n var require_pbkdf2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/pbkdf2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pbkdf2Async = exports3.pbkdf2 = void 0;\n var _assert_js_1 = require_assert();\n var hmac_js_1 = require_hmac2();\n var utils_js_1 = require_utils9();\n function pbkdf2Init2(hash3, _password, _salt, _opts) {\n (0, _assert_js_1.hash)(hash3);\n const opts = (0, utils_js_1.checkOpts)({ dkLen: 32, asyncTick: 10 }, _opts);\n const { c: c4, dkLen, asyncTick } = opts;\n (0, _assert_js_1.number)(c4);\n (0, _assert_js_1.number)(dkLen);\n (0, _assert_js_1.number)(asyncTick);\n if (c4 < 1)\n throw new Error(\"PBKDF2: iterations (c) should be >= 1\");\n const password = (0, utils_js_1.toBytes)(_password);\n const salt = (0, utils_js_1.toBytes)(_salt);\n const DK = new Uint8Array(dkLen);\n const PRF = hmac_js_1.hmac.create(hash3, password);\n const PRFSalt = PRF._cloneInto().update(salt);\n return { c: c4, dkLen, asyncTick, DK, PRF, PRFSalt };\n }\n function pbkdf2Output2(PRF, PRFSalt, DK, prfW, u2) {\n PRF.destroy();\n PRFSalt.destroy();\n if (prfW)\n prfW.destroy();\n u2.fill(0);\n return DK;\n }\n function pbkdf22(hash3, password, salt, opts) {\n const { c: c4, dkLen, DK, PRF, PRFSalt } = pbkdf2Init2(hash3, password, salt, opts);\n let prfW;\n const arr = new Uint8Array(4);\n const view = (0, utils_js_1.createView)(arr);\n const u2 = new Uint8Array(PRF.outputLen);\n for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n const Ti = DK.subarray(pos, pos + PRF.outputLen);\n view.setInt32(0, ti, false);\n (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u2);\n Ti.set(u2.subarray(0, Ti.length));\n for (let ui = 1; ui < c4; ui++) {\n PRF._cloneInto(prfW).update(u2).digestInto(u2);\n for (let i3 = 0; i3 < Ti.length; i3++)\n Ti[i3] ^= u2[i3];\n }\n }\n return pbkdf2Output2(PRF, PRFSalt, DK, prfW, u2);\n }\n exports3.pbkdf2 = pbkdf22;\n async function pbkdf2Async2(hash3, password, salt, opts) {\n const { c: c4, dkLen, asyncTick, DK, PRF, PRFSalt } = pbkdf2Init2(hash3, password, salt, opts);\n let prfW;\n const arr = new Uint8Array(4);\n const view = (0, utils_js_1.createView)(arr);\n const u2 = new Uint8Array(PRF.outputLen);\n for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n const Ti = DK.subarray(pos, pos + PRF.outputLen);\n view.setInt32(0, ti, false);\n (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u2);\n Ti.set(u2.subarray(0, Ti.length));\n await (0, utils_js_1.asyncLoop)(c4 - 1, asyncTick, () => {\n PRF._cloneInto(prfW).update(u2).digestInto(u2);\n for (let i3 = 0; i3 < Ti.length; i3++)\n Ti[i3] ^= u2[i3];\n });\n }\n return pbkdf2Output2(PRF, PRFSalt, DK, prfW, u2);\n }\n exports3.pbkdf2Async = pbkdf2Async2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_sha2.js\n var require_sha2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_sha2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SHA2 = void 0;\n var _assert_js_1 = require_assert();\n var utils_js_1 = require_utils9();\n function setBigUint643(view, byteOffset, value, isLE2) {\n if (typeof view.setBigUint64 === \"function\")\n return view.setBigUint64(byteOffset, value, isLE2);\n const _32n2 = BigInt(32);\n const _u32_max = BigInt(4294967295);\n const wh = Number(value >> _32n2 & _u32_max);\n const wl = Number(value & _u32_max);\n const h4 = isLE2 ? 4 : 0;\n const l6 = isLE2 ? 0 : 4;\n view.setUint32(byteOffset + h4, wh, isLE2);\n view.setUint32(byteOffset + l6, wl, isLE2);\n }\n var SHA2 = class extends utils_js_1.Hash {\n constructor(blockLen, outputLen, padOffset, isLE2) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE2;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = (0, utils_js_1.createView)(this.buffer);\n }\n update(data) {\n (0, _assert_js_1.exists)(this);\n const { view, buffer: buffer2, blockLen } = this;\n data = (0, utils_js_1.toBytes)(data);\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n if (take === blockLen) {\n const dataView = (0, utils_js_1.createView)(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer2.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n (0, _assert_js_1.exists)(this);\n (0, _assert_js_1.output)(out, this);\n this.finished = true;\n const { buffer: buffer2, view, blockLen, isLE: isLE2 } = this;\n let { pos } = this;\n buffer2[pos++] = 128;\n this.buffer.subarray(pos).fill(0);\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n for (let i3 = pos; i3 < blockLen; i3++)\n buffer2[i3] = 0;\n setBigUint643(view, blockLen - 8, BigInt(this.length * 8), isLE2);\n this.process(view, 0);\n const oview = (0, utils_js_1.createView)(out);\n const len = this.outputLen;\n if (len % 4)\n throw new Error(\"_sha2: outputLen should be aligned to 32bit\");\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error(\"_sha2: outputLen bigger than state\");\n for (let i3 = 0; i3 < outLen; i3++)\n oview.setUint32(4 * i3, state[i3], isLE2);\n }\n digest() {\n const { buffer: buffer2, outputLen } = this;\n this.digestInto(buffer2);\n const res = buffer2.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer: buffer2, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer2);\n return to;\n }\n };\n exports3.SHA2 = SHA2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha256.js\n var require_sha256 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha256.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha224 = exports3.sha256 = void 0;\n var _sha2_js_1 = require_sha2();\n var utils_js_1 = require_utils9();\n var Chi3 = (a3, b4, c4) => a3 & b4 ^ ~a3 & c4;\n var Maj3 = (a3, b4, c4) => a3 & b4 ^ a3 & c4 ^ b4 & c4;\n var SHA256_K3 = /* @__PURE__ */ new Uint32Array([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n var IV = /* @__PURE__ */ new Uint32Array([\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ]);\n var SHA256_W3 = /* @__PURE__ */ new Uint32Array(64);\n var SHA2563 = class extends _sha2_js_1.SHA2 {\n constructor() {\n super(64, 32, 8, false);\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n return [A4, B2, C, D2, E2, F2, G, H3];\n }\n // prettier-ignore\n set(A4, B2, C, D2, E2, F2, G, H3) {\n this.A = A4 | 0;\n this.B = B2 | 0;\n this.C = C | 0;\n this.D = D2 | 0;\n this.E = E2 | 0;\n this.F = F2 | 0;\n this.G = G | 0;\n this.H = H3 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n SHA256_W3[i3] = view.getUint32(offset, false);\n for (let i3 = 16; i3 < 64; i3++) {\n const W15 = SHA256_W3[i3 - 15];\n const W2 = SHA256_W3[i3 - 2];\n const s0 = (0, utils_js_1.rotr)(W15, 7) ^ (0, utils_js_1.rotr)(W15, 18) ^ W15 >>> 3;\n const s1 = (0, utils_js_1.rotr)(W2, 17) ^ (0, utils_js_1.rotr)(W2, 19) ^ W2 >>> 10;\n SHA256_W3[i3] = s1 + SHA256_W3[i3 - 7] + s0 + SHA256_W3[i3 - 16] | 0;\n }\n let { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n for (let i3 = 0; i3 < 64; i3++) {\n const sigma1 = (0, utils_js_1.rotr)(E2, 6) ^ (0, utils_js_1.rotr)(E2, 11) ^ (0, utils_js_1.rotr)(E2, 25);\n const T1 = H3 + sigma1 + Chi3(E2, F2, G) + SHA256_K3[i3] + SHA256_W3[i3] | 0;\n const sigma0 = (0, utils_js_1.rotr)(A4, 2) ^ (0, utils_js_1.rotr)(A4, 13) ^ (0, utils_js_1.rotr)(A4, 22);\n const T22 = sigma0 + Maj3(A4, B2, C) | 0;\n H3 = G;\n G = F2;\n F2 = E2;\n E2 = D2 + T1 | 0;\n D2 = C;\n C = B2;\n B2 = A4;\n A4 = T1 + T22 | 0;\n }\n A4 = A4 + this.A | 0;\n B2 = B2 + this.B | 0;\n C = C + this.C | 0;\n D2 = D2 + this.D | 0;\n E2 = E2 + this.E | 0;\n F2 = F2 + this.F | 0;\n G = G + this.G | 0;\n H3 = H3 + this.H | 0;\n this.set(A4, B2, C, D2, E2, F2, G, H3);\n }\n roundClean() {\n SHA256_W3.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n };\n var SHA2242 = class extends SHA2563 {\n constructor() {\n super();\n this.A = 3238371032 | 0;\n this.B = 914150663 | 0;\n this.C = 812702999 | 0;\n this.D = 4144912697 | 0;\n this.E = 4290775857 | 0;\n this.F = 1750603025 | 0;\n this.G = 1694076839 | 0;\n this.H = 3204075428 | 0;\n this.outputLen = 28;\n }\n };\n exports3.sha256 = (0, utils_js_1.wrapConstructor)(() => new SHA2563());\n exports3.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA2242());\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_u64.js\n var require_u64 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_u64.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.add5L = exports3.add5H = exports3.add4H = exports3.add4L = exports3.add3H = exports3.add3L = exports3.add = exports3.rotlBL = exports3.rotlBH = exports3.rotlSL = exports3.rotlSH = exports3.rotr32L = exports3.rotr32H = exports3.rotrBL = exports3.rotrBH = exports3.rotrSL = exports3.rotrSH = exports3.shrSL = exports3.shrSH = exports3.toBig = exports3.split = exports3.fromBig = void 0;\n var U32_MASK642 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\n var _32n2 = /* @__PURE__ */ BigInt(32);\n function fromBig2(n2, le = false) {\n if (le)\n return { h: Number(n2 & U32_MASK642), l: Number(n2 >> _32n2 & U32_MASK642) };\n return { h: Number(n2 >> _32n2 & U32_MASK642) | 0, l: Number(n2 & U32_MASK642) | 0 };\n }\n exports3.fromBig = fromBig2;\n function split3(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i3 = 0; i3 < lst.length; i3++) {\n const { h: h4, l: l6 } = fromBig2(lst[i3], le);\n [Ah[i3], Al[i3]] = [h4, l6];\n }\n return [Ah, Al];\n }\n exports3.split = split3;\n var toBig = (h4, l6) => BigInt(h4 >>> 0) << _32n2 | BigInt(l6 >>> 0);\n exports3.toBig = toBig;\n var shrSH2 = (h4, _l, s4) => h4 >>> s4;\n exports3.shrSH = shrSH2;\n var shrSL2 = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n exports3.shrSL = shrSL2;\n var rotrSH2 = (h4, l6, s4) => h4 >>> s4 | l6 << 32 - s4;\n exports3.rotrSH = rotrSH2;\n var rotrSL2 = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n exports3.rotrSL = rotrSL2;\n var rotrBH2 = (h4, l6, s4) => h4 << 64 - s4 | l6 >>> s4 - 32;\n exports3.rotrBH = rotrBH2;\n var rotrBL2 = (h4, l6, s4) => h4 >>> s4 - 32 | l6 << 64 - s4;\n exports3.rotrBL = rotrBL2;\n var rotr32H = (_h, l6) => l6;\n exports3.rotr32H = rotr32H;\n var rotr32L = (h4, _l) => h4;\n exports3.rotr32L = rotr32L;\n var rotlSH2 = (h4, l6, s4) => h4 << s4 | l6 >>> 32 - s4;\n exports3.rotlSH = rotlSH2;\n var rotlSL2 = (h4, l6, s4) => l6 << s4 | h4 >>> 32 - s4;\n exports3.rotlSL = rotlSL2;\n var rotlBH2 = (h4, l6, s4) => l6 << s4 - 32 | h4 >>> 64 - s4;\n exports3.rotlBH = rotlBH2;\n var rotlBL2 = (h4, l6, s4) => h4 << s4 - 32 | l6 >>> 64 - s4;\n exports3.rotlBL = rotlBL2;\n function add2(Ah, Al, Bh, Bl) {\n const l6 = (Al >>> 0) + (Bl >>> 0);\n return { h: Ah + Bh + (l6 / 2 ** 32 | 0) | 0, l: l6 | 0 };\n }\n exports3.add = add2;\n var add3L2 = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\n exports3.add3L = add3L2;\n var add3H2 = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;\n exports3.add3H = add3H2;\n var add4L2 = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\n exports3.add4L = add4L2;\n var add4H2 = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;\n exports3.add4H = add4H2;\n var add5L2 = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\n exports3.add5L = add5L2;\n var add5H2 = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;\n exports3.add5H = add5H2;\n var u64 = {\n fromBig: fromBig2,\n split: split3,\n toBig,\n shrSH: shrSH2,\n shrSL: shrSL2,\n rotrSH: rotrSH2,\n rotrSL: rotrSL2,\n rotrBH: rotrBH2,\n rotrBL: rotrBL2,\n rotr32H,\n rotr32L,\n rotlSH: rotlSH2,\n rotlSL: rotlSL2,\n rotlBH: rotlBH2,\n rotlBL: rotlBL2,\n add: add2,\n add3L: add3L2,\n add3H: add3H2,\n add4L: add4L2,\n add4H: add4H2,\n add5H: add5H2,\n add5L: add5L2\n };\n exports3.default = u64;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha512.js\n var require_sha512 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha512.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha384 = exports3.sha512_256 = exports3.sha512_224 = exports3.sha512 = exports3.SHA512 = void 0;\n var _sha2_js_1 = require_sha2();\n var _u64_js_1 = require_u64();\n var utils_js_1 = require_utils9();\n var [SHA512_Kh2, SHA512_Kl2] = /* @__PURE__ */ (() => _u64_js_1.default.split([\n \"0x428a2f98d728ae22\",\n \"0x7137449123ef65cd\",\n \"0xb5c0fbcfec4d3b2f\",\n \"0xe9b5dba58189dbbc\",\n \"0x3956c25bf348b538\",\n \"0x59f111f1b605d019\",\n \"0x923f82a4af194f9b\",\n \"0xab1c5ed5da6d8118\",\n \"0xd807aa98a3030242\",\n \"0x12835b0145706fbe\",\n \"0x243185be4ee4b28c\",\n \"0x550c7dc3d5ffb4e2\",\n \"0x72be5d74f27b896f\",\n \"0x80deb1fe3b1696b1\",\n \"0x9bdc06a725c71235\",\n \"0xc19bf174cf692694\",\n \"0xe49b69c19ef14ad2\",\n \"0xefbe4786384f25e3\",\n \"0x0fc19dc68b8cd5b5\",\n \"0x240ca1cc77ac9c65\",\n \"0x2de92c6f592b0275\",\n \"0x4a7484aa6ea6e483\",\n \"0x5cb0a9dcbd41fbd4\",\n \"0x76f988da831153b5\",\n \"0x983e5152ee66dfab\",\n \"0xa831c66d2db43210\",\n \"0xb00327c898fb213f\",\n \"0xbf597fc7beef0ee4\",\n \"0xc6e00bf33da88fc2\",\n \"0xd5a79147930aa725\",\n \"0x06ca6351e003826f\",\n \"0x142929670a0e6e70\",\n \"0x27b70a8546d22ffc\",\n \"0x2e1b21385c26c926\",\n \"0x4d2c6dfc5ac42aed\",\n \"0x53380d139d95b3df\",\n \"0x650a73548baf63de\",\n \"0x766a0abb3c77b2a8\",\n \"0x81c2c92e47edaee6\",\n \"0x92722c851482353b\",\n \"0xa2bfe8a14cf10364\",\n \"0xa81a664bbc423001\",\n \"0xc24b8b70d0f89791\",\n \"0xc76c51a30654be30\",\n \"0xd192e819d6ef5218\",\n \"0xd69906245565a910\",\n \"0xf40e35855771202a\",\n \"0x106aa07032bbd1b8\",\n \"0x19a4c116b8d2d0c8\",\n \"0x1e376c085141ab53\",\n \"0x2748774cdf8eeb99\",\n \"0x34b0bcb5e19b48a8\",\n \"0x391c0cb3c5c95a63\",\n \"0x4ed8aa4ae3418acb\",\n \"0x5b9cca4f7763e373\",\n \"0x682e6ff3d6b2b8a3\",\n \"0x748f82ee5defb2fc\",\n \"0x78a5636f43172f60\",\n \"0x84c87814a1f0ab72\",\n \"0x8cc702081a6439ec\",\n \"0x90befffa23631e28\",\n \"0xa4506cebde82bde9\",\n \"0xbef9a3f7b2c67915\",\n \"0xc67178f2e372532b\",\n \"0xca273eceea26619c\",\n \"0xd186b8c721c0c207\",\n \"0xeada7dd6cde0eb1e\",\n \"0xf57d4f7fee6ed178\",\n \"0x06f067aa72176fba\",\n \"0x0a637dc5a2c898a6\",\n \"0x113f9804bef90dae\",\n \"0x1b710b35131c471b\",\n \"0x28db77f523047d84\",\n \"0x32caab7b40c72493\",\n \"0x3c9ebe0a15c9bebc\",\n \"0x431d67c49c100d4c\",\n \"0x4cc5d4becb3e42b6\",\n \"0x597f299cfc657e2a\",\n \"0x5fcb6fab3ad6faec\",\n \"0x6c44198c4a475817\"\n ].map((n2) => BigInt(n2))))();\n var SHA512_W_H2 = /* @__PURE__ */ new Uint32Array(80);\n var SHA512_W_L2 = /* @__PURE__ */ new Uint32Array(80);\n var SHA5122 = class extends _sha2_js_1.SHA2 {\n constructor() {\n super(128, 64, 16, false);\n this.Ah = 1779033703 | 0;\n this.Al = 4089235720 | 0;\n this.Bh = 3144134277 | 0;\n this.Bl = 2227873595 | 0;\n this.Ch = 1013904242 | 0;\n this.Cl = 4271175723 | 0;\n this.Dh = 2773480762 | 0;\n this.Dl = 1595750129 | 0;\n this.Eh = 1359893119 | 0;\n this.El = 2917565137 | 0;\n this.Fh = 2600822924 | 0;\n this.Fl = 725511199 | 0;\n this.Gh = 528734635 | 0;\n this.Gl = 4215389547 | 0;\n this.Hh = 1541459225 | 0;\n this.Hl = 327033209 | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4) {\n SHA512_W_H2[i3] = view.getUint32(offset);\n SHA512_W_L2[i3] = view.getUint32(offset += 4);\n }\n for (let i3 = 16; i3 < 80; i3++) {\n const W15h = SHA512_W_H2[i3 - 15] | 0;\n const W15l = SHA512_W_L2[i3 - 15] | 0;\n const s0h = _u64_js_1.default.rotrSH(W15h, W15l, 1) ^ _u64_js_1.default.rotrSH(W15h, W15l, 8) ^ _u64_js_1.default.shrSH(W15h, W15l, 7);\n const s0l = _u64_js_1.default.rotrSL(W15h, W15l, 1) ^ _u64_js_1.default.rotrSL(W15h, W15l, 8) ^ _u64_js_1.default.shrSL(W15h, W15l, 7);\n const W2h = SHA512_W_H2[i3 - 2] | 0;\n const W2l = SHA512_W_L2[i3 - 2] | 0;\n const s1h = _u64_js_1.default.rotrSH(W2h, W2l, 19) ^ _u64_js_1.default.rotrBH(W2h, W2l, 61) ^ _u64_js_1.default.shrSH(W2h, W2l, 6);\n const s1l = _u64_js_1.default.rotrSL(W2h, W2l, 19) ^ _u64_js_1.default.rotrBL(W2h, W2l, 61) ^ _u64_js_1.default.shrSL(W2h, W2l, 6);\n const SUMl = _u64_js_1.default.add4L(s0l, s1l, SHA512_W_L2[i3 - 7], SHA512_W_L2[i3 - 16]);\n const SUMh = _u64_js_1.default.add4H(SUMl, s0h, s1h, SHA512_W_H2[i3 - 7], SHA512_W_H2[i3 - 16]);\n SHA512_W_H2[i3] = SUMh | 0;\n SHA512_W_L2[i3] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n for (let i3 = 0; i3 < 80; i3++) {\n const sigma1h = _u64_js_1.default.rotrSH(Eh, El, 14) ^ _u64_js_1.default.rotrSH(Eh, El, 18) ^ _u64_js_1.default.rotrBH(Eh, El, 41);\n const sigma1l = _u64_js_1.default.rotrSL(Eh, El, 14) ^ _u64_js_1.default.rotrSL(Eh, El, 18) ^ _u64_js_1.default.rotrBL(Eh, El, 41);\n const CHIh = Eh & Fh ^ ~Eh & Gh;\n const CHIl = El & Fl ^ ~El & Gl;\n const T1ll = _u64_js_1.default.add5L(Hl, sigma1l, CHIl, SHA512_Kl2[i3], SHA512_W_L2[i3]);\n const T1h = _u64_js_1.default.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh2[i3], SHA512_W_H2[i3]);\n const T1l = T1ll | 0;\n const sigma0h = _u64_js_1.default.rotrSH(Ah, Al, 28) ^ _u64_js_1.default.rotrBH(Ah, Al, 34) ^ _u64_js_1.default.rotrBH(Ah, Al, 39);\n const sigma0l = _u64_js_1.default.rotrSL(Ah, Al, 28) ^ _u64_js_1.default.rotrBL(Ah, Al, 34) ^ _u64_js_1.default.rotrBL(Ah, Al, 39);\n const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;\n const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = _u64_js_1.default.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = _u64_js_1.default.add3L(T1l, sigma0l, MAJl);\n Ah = _u64_js_1.default.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n ({ h: Ah, l: Al } = _u64_js_1.default.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = _u64_js_1.default.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = _u64_js_1.default.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = _u64_js_1.default.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = _u64_js_1.default.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = _u64_js_1.default.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = _u64_js_1.default.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = _u64_js_1.default.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n SHA512_W_H2.fill(0);\n SHA512_W_L2.fill(0);\n }\n destroy() {\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n };\n exports3.SHA512 = SHA5122;\n var SHA512_224 = class extends SHA5122 {\n constructor() {\n super();\n this.Ah = 2352822216 | 0;\n this.Al = 424955298 | 0;\n this.Bh = 1944164710 | 0;\n this.Bl = 2312950998 | 0;\n this.Ch = 502970286 | 0;\n this.Cl = 855612546 | 0;\n this.Dh = 1738396948 | 0;\n this.Dl = 1479516111 | 0;\n this.Eh = 258812777 | 0;\n this.El = 2077511080 | 0;\n this.Fh = 2011393907 | 0;\n this.Fl = 79989058 | 0;\n this.Gh = 1067287976 | 0;\n this.Gl = 1780299464 | 0;\n this.Hh = 286451373 | 0;\n this.Hl = 2446758561 | 0;\n this.outputLen = 28;\n }\n };\n var SHA512_256 = class extends SHA5122 {\n constructor() {\n super();\n this.Ah = 573645204 | 0;\n this.Al = 4230739756 | 0;\n this.Bh = 2673172387 | 0;\n this.Bl = 3360449730 | 0;\n this.Ch = 596883563 | 0;\n this.Cl = 1867755857 | 0;\n this.Dh = 2520282905 | 0;\n this.Dl = 1497426621 | 0;\n this.Eh = 2519219938 | 0;\n this.El = 2827943907 | 0;\n this.Fh = 3193839141 | 0;\n this.Fl = 1401305490 | 0;\n this.Gh = 721525244 | 0;\n this.Gl = 746961066 | 0;\n this.Hh = 246885852 | 0;\n this.Hl = 2177182882 | 0;\n this.outputLen = 32;\n }\n };\n var SHA384 = class extends SHA5122 {\n constructor() {\n super();\n this.Ah = 3418070365 | 0;\n this.Al = 3238371032 | 0;\n this.Bh = 1654270250 | 0;\n this.Bl = 914150663 | 0;\n this.Ch = 2438529370 | 0;\n this.Cl = 812702999 | 0;\n this.Dh = 355462360 | 0;\n this.Dl = 4144912697 | 0;\n this.Eh = 1731405415 | 0;\n this.El = 4290775857 | 0;\n this.Fh = 2394180231 | 0;\n this.Fl = 1750603025 | 0;\n this.Gh = 3675008525 | 0;\n this.Gl = 1694076839 | 0;\n this.Hh = 1203062813 | 0;\n this.Hl = 3204075428 | 0;\n this.outputLen = 48;\n }\n };\n exports3.sha512 = (0, utils_js_1.wrapConstructor)(() => new SHA5122());\n exports3.sha512_224 = (0, utils_js_1.wrapConstructor)(() => new SHA512_224());\n exports3.sha512_256 = (0, utils_js_1.wrapConstructor)(() => new SHA512_256());\n exports3.sha384 = (0, utils_js_1.wrapConstructor)(() => new SHA384());\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/crypto-browser.js\n var require_crypto_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/crypto-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.randomBytes = exports3.pbkdf2Sync = exports3.createHmac = exports3.createHash = void 0;\n var hmac_1 = require_hmac2();\n var pbkdf2_1 = require_pbkdf2();\n var sha256_1 = require_sha256();\n var sha512_1 = require_sha512();\n var index_js_1 = require_utils8();\n function getGlobal() {\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw new Error(\"unable to locate global object\");\n }\n var anyGlobal = getGlobal();\n var crypto4 = anyGlobal.crypto || anyGlobal.msCrypto;\n function createHash(algo) {\n switch (algo) {\n case \"sha256\":\n return sha256_1.sha256.create();\n case \"sha512\":\n return sha512_1.sha512.create();\n }\n (0, index_js_1.assertArgument)(false, \"invalid hashing algorithm name\", \"algorithm\", algo);\n }\n exports3.createHash = createHash;\n function createHmac(_algo, key) {\n const algo = { sha256: sha256_1.sha256, sha512: sha512_1.sha512 }[_algo];\n (0, index_js_1.assertArgument)(algo != null, \"invalid hmac algorithm\", \"algorithm\", _algo);\n return hmac_1.hmac.create(algo, key);\n }\n exports3.createHmac = createHmac;\n function pbkdf2Sync(password, salt, iterations, keylen, _algo) {\n const algo = { sha256: sha256_1.sha256, sha512: sha512_1.sha512 }[_algo];\n (0, index_js_1.assertArgument)(algo != null, \"invalid pbkdf2 algorithm\", \"algorithm\", _algo);\n return (0, pbkdf2_1.pbkdf2)(algo, password, salt, { c: iterations, dkLen: keylen });\n }\n exports3.pbkdf2Sync = pbkdf2Sync;\n function randomBytes3(length) {\n (0, index_js_1.assert)(crypto4 != null, \"platform does not support secure random numbers\", \"UNSUPPORTED_OPERATION\", {\n operation: \"randomBytes\"\n });\n (0, index_js_1.assertArgument)(Number.isInteger(length) && length > 0 && length <= 1024, \"invalid length\", \"length\", length);\n const result = new Uint8Array(length);\n crypto4.getRandomValues(result);\n return result;\n }\n exports3.randomBytes = randomBytes3;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/hmac.js\n var require_hmac3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/hmac.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.computeHmac = void 0;\n var crypto_js_1 = require_crypto_browser();\n var index_js_1 = require_utils8();\n var locked = false;\n var _computeHmac = function(algorithm, key, data) {\n return (0, crypto_js_1.createHmac)(algorithm, key).update(data).digest();\n };\n var __computeHmac = _computeHmac;\n function computeHmac(algorithm, _key, _data) {\n const key = (0, index_js_1.getBytes)(_key, \"key\");\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__computeHmac(algorithm, key, data));\n }\n exports3.computeHmac = computeHmac;\n computeHmac._ = _computeHmac;\n computeHmac.lock = function() {\n locked = true;\n };\n computeHmac.register = function(func) {\n if (locked) {\n throw new Error(\"computeHmac is locked\");\n }\n __computeHmac = func;\n };\n Object.freeze(computeHmac);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha3.js\n var require_sha32 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha3.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.shake256 = exports3.shake128 = exports3.keccak_512 = exports3.keccak_384 = exports3.keccak_256 = exports3.keccak_224 = exports3.sha3_512 = exports3.sha3_384 = exports3.sha3_256 = exports3.sha3_224 = exports3.Keccak = exports3.keccakP = void 0;\n var _assert_js_1 = require_assert();\n var _u64_js_1 = require_u64();\n var utils_js_1 = require_utils9();\n var [SHA3_PI2, SHA3_ROTL2, _SHA3_IOTA2] = [[], [], []];\n var _0n11 = /* @__PURE__ */ BigInt(0);\n var _1n11 = /* @__PURE__ */ BigInt(1);\n var _2n8 = /* @__PURE__ */ BigInt(2);\n var _7n2 = /* @__PURE__ */ BigInt(7);\n var _256n2 = /* @__PURE__ */ BigInt(256);\n var _0x71n2 = /* @__PURE__ */ BigInt(113);\n for (let round = 0, R3 = _1n11, x4 = 1, y6 = 0; round < 24; round++) {\n [x4, y6] = [y6, (2 * x4 + 3 * y6) % 5];\n SHA3_PI2.push(2 * (5 * y6 + x4));\n SHA3_ROTL2.push((round + 1) * (round + 2) / 2 % 64);\n let t3 = _0n11;\n for (let j2 = 0; j2 < 7; j2++) {\n R3 = (R3 << _1n11 ^ (R3 >> _7n2) * _0x71n2) % _256n2;\n if (R3 & _2n8)\n t3 ^= _1n11 << (_1n11 << /* @__PURE__ */ BigInt(j2)) - _1n11;\n }\n _SHA3_IOTA2.push(t3);\n }\n var [SHA3_IOTA_H2, SHA3_IOTA_L2] = /* @__PURE__ */ (0, _u64_js_1.split)(_SHA3_IOTA2, true);\n var rotlH2 = (h4, l6, s4) => s4 > 32 ? (0, _u64_js_1.rotlBH)(h4, l6, s4) : (0, _u64_js_1.rotlSH)(h4, l6, s4);\n var rotlL2 = (h4, l6, s4) => s4 > 32 ? (0, _u64_js_1.rotlBL)(h4, l6, s4) : (0, _u64_js_1.rotlSL)(h4, l6, s4);\n function keccakP2(s4, rounds = 24) {\n const B2 = new Uint32Array(5 * 2);\n for (let round = 24 - rounds; round < 24; round++) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[x4] ^ s4[x4 + 10] ^ s4[x4 + 20] ^ s4[x4 + 30] ^ s4[x4 + 40];\n for (let x4 = 0; x4 < 10; x4 += 2) {\n const idx1 = (x4 + 8) % 10;\n const idx0 = (x4 + 2) % 10;\n const B0 = B2[idx0];\n const B1 = B2[idx0 + 1];\n const Th = rotlH2(B0, B1, 1) ^ B2[idx1];\n const Tl = rotlL2(B0, B1, 1) ^ B2[idx1 + 1];\n for (let y6 = 0; y6 < 50; y6 += 10) {\n s4[x4 + y6] ^= Th;\n s4[x4 + y6 + 1] ^= Tl;\n }\n }\n let curH = s4[2];\n let curL = s4[3];\n for (let t3 = 0; t3 < 24; t3++) {\n const shift = SHA3_ROTL2[t3];\n const Th = rotlH2(curH, curL, shift);\n const Tl = rotlL2(curH, curL, shift);\n const PI = SHA3_PI2[t3];\n curH = s4[PI];\n curL = s4[PI + 1];\n s4[PI] = Th;\n s4[PI + 1] = Tl;\n }\n for (let y6 = 0; y6 < 50; y6 += 10) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[y6 + x4];\n for (let x4 = 0; x4 < 10; x4++)\n s4[y6 + x4] ^= ~B2[(x4 + 2) % 10] & B2[(x4 + 4) % 10];\n }\n s4[0] ^= SHA3_IOTA_H2[round];\n s4[1] ^= SHA3_IOTA_L2[round];\n }\n B2.fill(0);\n }\n exports3.keccakP = keccakP2;\n var Keccak2 = class _Keccak extends utils_js_1.Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n (0, _assert_js_1.number)(outputLen);\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error(\"Sha3 supports only keccak-f1600 function\");\n this.state = new Uint8Array(200);\n this.state32 = (0, utils_js_1.u32)(this.state);\n }\n keccak() {\n keccakP2(this.state32, this.rounds);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n (0, _assert_js_1.exists)(this);\n const { blockLen, state } = this;\n data = (0, utils_js_1.toBytes)(data);\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i3 = 0; i3 < take; i3++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n state[pos] ^= suffix;\n if ((suffix & 128) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 128;\n this.keccak();\n }\n writeInto(out) {\n (0, _assert_js_1.exists)(this, false);\n (0, _assert_js_1.bytes)(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len; ) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n if (!this.enableXOF)\n throw new Error(\"XOF is not possible for this instance\");\n return this.writeInto(out);\n }\n xof(bytes) {\n (0, _assert_js_1.number)(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n (0, _assert_js_1.output)(out, this);\n if (this.finished)\n throw new Error(\"digest() was already called\");\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n };\n exports3.Keccak = Keccak2;\n var gen2 = (suffix, blockLen, outputLen) => (0, utils_js_1.wrapConstructor)(() => new Keccak2(blockLen, suffix, outputLen));\n exports3.sha3_224 = gen2(6, 144, 224 / 8);\n exports3.sha3_256 = gen2(6, 136, 256 / 8);\n exports3.sha3_384 = gen2(6, 104, 384 / 8);\n exports3.sha3_512 = gen2(6, 72, 512 / 8);\n exports3.keccak_224 = gen2(1, 144, 224 / 8);\n exports3.keccak_256 = gen2(1, 136, 256 / 8);\n exports3.keccak_384 = gen2(1, 104, 384 / 8);\n exports3.keccak_512 = gen2(1, 72, 512 / 8);\n var genShake = (suffix, blockLen, outputLen) => (0, utils_js_1.wrapXOFConstructorWithOpts)((opts = {}) => new Keccak2(blockLen, suffix, opts.dkLen === void 0 ? outputLen : opts.dkLen, true));\n exports3.shake128 = genShake(31, 168, 128 / 8);\n exports3.shake256 = genShake(31, 136, 256 / 8);\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/keccak.js\n var require_keccak = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/keccak.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.keccak256 = void 0;\n var sha3_1 = require_sha32();\n var index_js_1 = require_utils8();\n var locked = false;\n var _keccak256 = function(data) {\n return (0, sha3_1.keccak_256)(data);\n };\n var __keccak256 = _keccak256;\n function keccak2563(_data) {\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__keccak256(data));\n }\n exports3.keccak256 = keccak2563;\n keccak2563._ = _keccak256;\n keccak2563.lock = function() {\n locked = true;\n };\n keccak2563.register = function(func) {\n if (locked) {\n throw new TypeError(\"keccak256 is locked\");\n }\n __keccak256 = func;\n };\n Object.freeze(keccak2563);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/ripemd160.js\n var require_ripemd160 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/ripemd160.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ripemd160 = exports3.RIPEMD160 = void 0;\n var _sha2_js_1 = require_sha2();\n var utils_js_1 = require_utils9();\n var Rho = /* @__PURE__ */ new Uint8Array([7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8]);\n var Id = /* @__PURE__ */ Uint8Array.from({ length: 16 }, (_2, i3) => i3);\n var Pi = /* @__PURE__ */ Id.map((i3) => (9 * i3 + 5) % 16);\n var idxL2 = [Id];\n var idxR2 = [Pi];\n for (let i3 = 0; i3 < 4; i3++)\n for (let j2 of [idxL2, idxR2])\n j2.push(j2[i3].map((k4) => Rho[k4]));\n var shifts = /* @__PURE__ */ [\n [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],\n [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],\n [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],\n [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],\n [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]\n ].map((i3) => new Uint8Array(i3));\n var shiftsL = /* @__PURE__ */ idxL2.map((idx, i3) => idx.map((j2) => shifts[i3][j2]));\n var shiftsR = /* @__PURE__ */ idxR2.map((idx, i3) => idx.map((j2) => shifts[i3][j2]));\n var Kl = /* @__PURE__ */ new Uint32Array([\n 0,\n 1518500249,\n 1859775393,\n 2400959708,\n 2840853838\n ]);\n var Kr = /* @__PURE__ */ new Uint32Array([\n 1352829926,\n 1548603684,\n 1836072691,\n 2053994217,\n 0\n ]);\n var rotl2 = (word, shift) => word << shift | word >>> 32 - shift;\n function f7(group, x4, y6, z2) {\n if (group === 0)\n return x4 ^ y6 ^ z2;\n else if (group === 1)\n return x4 & y6 | ~x4 & z2;\n else if (group === 2)\n return (x4 | ~y6) ^ z2;\n else if (group === 3)\n return x4 & z2 | y6 & ~z2;\n else\n return x4 ^ (y6 | ~z2);\n }\n var BUF = /* @__PURE__ */ new Uint32Array(16);\n var RIPEMD1602 = class extends _sha2_js_1.SHA2 {\n constructor() {\n super(64, 20, 8, true);\n this.h0 = 1732584193 | 0;\n this.h1 = 4023233417 | 0;\n this.h2 = 2562383102 | 0;\n this.h3 = 271733878 | 0;\n this.h4 = 3285377520 | 0;\n }\n get() {\n const { h0, h1, h2: h22, h3: h32, h4 } = this;\n return [h0, h1, h22, h32, h4];\n }\n set(h0, h1, h22, h32, h4) {\n this.h0 = h0 | 0;\n this.h1 = h1 | 0;\n this.h2 = h22 | 0;\n this.h3 = h32 | 0;\n this.h4 = h4 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n BUF[i3] = view.getUint32(offset, true);\n let al = this.h0 | 0, ar = al, bl = this.h1 | 0, br = bl, cl = this.h2 | 0, cr = cl, dl = this.h3 | 0, dr = dl, el = this.h4 | 0, er = el;\n for (let group = 0; group < 5; group++) {\n const rGroup = 4 - group;\n const hbl = Kl[group], hbr = Kr[group];\n const rl = idxL2[group], rr = idxR2[group];\n const sl = shiftsL[group], sr = shiftsR[group];\n for (let i3 = 0; i3 < 16; i3++) {\n const tl = rotl2(al + f7(group, bl, cl, dl) + BUF[rl[i3]] + hbl, sl[i3]) + el | 0;\n al = el, el = dl, dl = rotl2(cl, 10) | 0, cl = bl, bl = tl;\n }\n for (let i3 = 0; i3 < 16; i3++) {\n const tr = rotl2(ar + f7(rGroup, br, cr, dr) + BUF[rr[i3]] + hbr, sr[i3]) + er | 0;\n ar = er, er = dr, dr = rotl2(cr, 10) | 0, cr = br, br = tr;\n }\n }\n this.set(this.h1 + cl + dr | 0, this.h2 + dl + er | 0, this.h3 + el + ar | 0, this.h4 + al + br | 0, this.h0 + bl + cr | 0);\n }\n roundClean() {\n BUF.fill(0);\n }\n destroy() {\n this.destroyed = true;\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0);\n }\n };\n exports3.RIPEMD160 = RIPEMD1602;\n exports3.ripemd160 = (0, utils_js_1.wrapConstructor)(() => new RIPEMD1602());\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/ripemd160.js\n var require_ripemd1602 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/ripemd160.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ripemd160 = void 0;\n var ripemd160_1 = require_ripemd160();\n var index_js_1 = require_utils8();\n var locked = false;\n var _ripemd160 = function(data) {\n return (0, ripemd160_1.ripemd160)(data);\n };\n var __ripemd160 = _ripemd160;\n function ripemd1602(_data) {\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__ripemd160(data));\n }\n exports3.ripemd160 = ripemd1602;\n ripemd1602._ = _ripemd160;\n ripemd1602.lock = function() {\n locked = true;\n };\n ripemd1602.register = function(func) {\n if (locked) {\n throw new TypeError(\"ripemd160 is locked\");\n }\n __ripemd160 = func;\n };\n Object.freeze(ripemd1602);\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/pbkdf2.js\n var require_pbkdf22 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/pbkdf2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pbkdf2 = void 0;\n var crypto_js_1 = require_crypto_browser();\n var index_js_1 = require_utils8();\n var locked = false;\n var _pbkdf2 = function(password, salt, iterations, keylen, algo) {\n return (0, crypto_js_1.pbkdf2Sync)(password, salt, iterations, keylen, algo);\n };\n var __pbkdf2 = _pbkdf2;\n function pbkdf22(_password, _salt, iterations, keylen, algo) {\n const password = (0, index_js_1.getBytes)(_password, \"password\");\n const salt = (0, index_js_1.getBytes)(_salt, \"salt\");\n return (0, index_js_1.hexlify)(__pbkdf2(password, salt, iterations, keylen, algo));\n }\n exports3.pbkdf2 = pbkdf22;\n pbkdf22._ = _pbkdf2;\n pbkdf22.lock = function() {\n locked = true;\n };\n pbkdf22.register = function(func) {\n if (locked) {\n throw new Error(\"pbkdf2 is locked\");\n }\n __pbkdf2 = func;\n };\n Object.freeze(pbkdf22);\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/random.js\n var require_random = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/random.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.randomBytes = void 0;\n var crypto_js_1 = require_crypto_browser();\n var locked = false;\n var _randomBytes = function(length) {\n return new Uint8Array((0, crypto_js_1.randomBytes)(length));\n };\n var __randomBytes = _randomBytes;\n function randomBytes3(length) {\n return __randomBytes(length);\n }\n exports3.randomBytes = randomBytes3;\n randomBytes3._ = _randomBytes;\n randomBytes3.lock = function() {\n locked = true;\n };\n randomBytes3.register = function(func) {\n if (locked) {\n throw new Error(\"randomBytes is locked\");\n }\n __randomBytes = func;\n };\n Object.freeze(randomBytes3);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/scrypt.js\n var require_scrypt2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/scrypt.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.scryptAsync = exports3.scrypt = void 0;\n var _assert_js_1 = require_assert();\n var sha256_js_1 = require_sha256();\n var pbkdf2_js_1 = require_pbkdf2();\n var utils_js_1 = require_utils9();\n var rotl2 = (a3, b4) => a3 << b4 | a3 >>> 32 - b4;\n function XorAndSalsa(prev, pi, input, ii, out, oi) {\n let y00 = prev[pi++] ^ input[ii++], y01 = prev[pi++] ^ input[ii++];\n let y02 = prev[pi++] ^ input[ii++], y03 = prev[pi++] ^ input[ii++];\n let y04 = prev[pi++] ^ input[ii++], y05 = prev[pi++] ^ input[ii++];\n let y06 = prev[pi++] ^ input[ii++], y07 = prev[pi++] ^ input[ii++];\n let y08 = prev[pi++] ^ input[ii++], y09 = prev[pi++] ^ input[ii++];\n let y10 = prev[pi++] ^ input[ii++], y11 = prev[pi++] ^ input[ii++];\n let y12 = prev[pi++] ^ input[ii++], y13 = prev[pi++] ^ input[ii++];\n let y14 = prev[pi++] ^ input[ii++], y15 = prev[pi++] ^ input[ii++];\n let x00 = y00, x01 = y01, x02 = y02, x03 = y03, x04 = y04, x05 = y05, x06 = y06, x07 = y07, x08 = y08, x09 = y09, x10 = y10, x11 = y11, x12 = y12, x13 = y13, x14 = y14, x15 = y15;\n for (let i3 = 0; i3 < 8; i3 += 2) {\n x04 ^= rotl2(x00 + x12 | 0, 7);\n x08 ^= rotl2(x04 + x00 | 0, 9);\n x12 ^= rotl2(x08 + x04 | 0, 13);\n x00 ^= rotl2(x12 + x08 | 0, 18);\n x09 ^= rotl2(x05 + x01 | 0, 7);\n x13 ^= rotl2(x09 + x05 | 0, 9);\n x01 ^= rotl2(x13 + x09 | 0, 13);\n x05 ^= rotl2(x01 + x13 | 0, 18);\n x14 ^= rotl2(x10 + x06 | 0, 7);\n x02 ^= rotl2(x14 + x10 | 0, 9);\n x06 ^= rotl2(x02 + x14 | 0, 13);\n x10 ^= rotl2(x06 + x02 | 0, 18);\n x03 ^= rotl2(x15 + x11 | 0, 7);\n x07 ^= rotl2(x03 + x15 | 0, 9);\n x11 ^= rotl2(x07 + x03 | 0, 13);\n x15 ^= rotl2(x11 + x07 | 0, 18);\n x01 ^= rotl2(x00 + x03 | 0, 7);\n x02 ^= rotl2(x01 + x00 | 0, 9);\n x03 ^= rotl2(x02 + x01 | 0, 13);\n x00 ^= rotl2(x03 + x02 | 0, 18);\n x06 ^= rotl2(x05 + x04 | 0, 7);\n x07 ^= rotl2(x06 + x05 | 0, 9);\n x04 ^= rotl2(x07 + x06 | 0, 13);\n x05 ^= rotl2(x04 + x07 | 0, 18);\n x11 ^= rotl2(x10 + x09 | 0, 7);\n x08 ^= rotl2(x11 + x10 | 0, 9);\n x09 ^= rotl2(x08 + x11 | 0, 13);\n x10 ^= rotl2(x09 + x08 | 0, 18);\n x12 ^= rotl2(x15 + x14 | 0, 7);\n x13 ^= rotl2(x12 + x15 | 0, 9);\n x14 ^= rotl2(x13 + x12 | 0, 13);\n x15 ^= rotl2(x14 + x13 | 0, 18);\n }\n out[oi++] = y00 + x00 | 0;\n out[oi++] = y01 + x01 | 0;\n out[oi++] = y02 + x02 | 0;\n out[oi++] = y03 + x03 | 0;\n out[oi++] = y04 + x04 | 0;\n out[oi++] = y05 + x05 | 0;\n out[oi++] = y06 + x06 | 0;\n out[oi++] = y07 + x07 | 0;\n out[oi++] = y08 + x08 | 0;\n out[oi++] = y09 + x09 | 0;\n out[oi++] = y10 + x10 | 0;\n out[oi++] = y11 + x11 | 0;\n out[oi++] = y12 + x12 | 0;\n out[oi++] = y13 + x13 | 0;\n out[oi++] = y14 + x14 | 0;\n out[oi++] = y15 + x15 | 0;\n }\n function BlockMix(input, ii, out, oi, r2) {\n let head = oi + 0;\n let tail = oi + 16 * r2;\n for (let i3 = 0; i3 < 16; i3++)\n out[tail + i3] = input[ii + (2 * r2 - 1) * 16 + i3];\n for (let i3 = 0; i3 < r2; i3++, head += 16, ii += 16) {\n XorAndSalsa(out, tail, input, ii, out, head);\n if (i3 > 0)\n tail += 16;\n XorAndSalsa(out, head, input, ii += 16, out, tail);\n }\n }\n function scryptInit(password, salt, _opts) {\n const opts = (0, utils_js_1.checkOpts)({\n dkLen: 32,\n asyncTick: 10,\n maxmem: 1024 ** 3 + 1024\n }, _opts);\n const { N: N4, r: r2, p: p4, dkLen, asyncTick, maxmem, onProgress } = opts;\n (0, _assert_js_1.number)(N4);\n (0, _assert_js_1.number)(r2);\n (0, _assert_js_1.number)(p4);\n (0, _assert_js_1.number)(dkLen);\n (0, _assert_js_1.number)(asyncTick);\n (0, _assert_js_1.number)(maxmem);\n if (onProgress !== void 0 && typeof onProgress !== \"function\")\n throw new Error(\"progressCb should be function\");\n const blockSize = 128 * r2;\n const blockSize32 = blockSize / 4;\n if (N4 <= 1 || (N4 & N4 - 1) !== 0 || N4 >= 2 ** (blockSize / 8) || N4 > 2 ** 32) {\n throw new Error(\"Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32\");\n }\n if (p4 < 0 || p4 > (2 ** 32 - 1) * 32 / blockSize) {\n throw new Error(\"Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)\");\n }\n if (dkLen < 0 || dkLen > (2 ** 32 - 1) * 32) {\n throw new Error(\"Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32\");\n }\n const memUsed = blockSize * (N4 + p4);\n if (memUsed > maxmem) {\n throw new Error(`Scrypt: parameters too large, ${memUsed} (128 * r * (N + p)) > ${maxmem} (maxmem)`);\n }\n const B2 = (0, pbkdf2_js_1.pbkdf2)(sha256_js_1.sha256, password, salt, { c: 1, dkLen: blockSize * p4 });\n const B32 = (0, utils_js_1.u32)(B2);\n const V2 = (0, utils_js_1.u32)(new Uint8Array(blockSize * N4));\n const tmp = (0, utils_js_1.u32)(new Uint8Array(blockSize));\n let blockMixCb = () => {\n };\n if (onProgress) {\n const totalBlockMix = 2 * N4 * p4;\n const callbackPer = Math.max(Math.floor(totalBlockMix / 1e4), 1);\n let blockMixCnt = 0;\n blockMixCb = () => {\n blockMixCnt++;\n if (onProgress && (!(blockMixCnt % callbackPer) || blockMixCnt === totalBlockMix))\n onProgress(blockMixCnt / totalBlockMix);\n };\n }\n return { N: N4, r: r2, p: p4, dkLen, blockSize32, V: V2, B32, B: B2, tmp, blockMixCb, asyncTick };\n }\n function scryptOutput(password, dkLen, B2, V2, tmp) {\n const res = (0, pbkdf2_js_1.pbkdf2)(sha256_js_1.sha256, password, B2, { c: 1, dkLen });\n B2.fill(0);\n V2.fill(0);\n tmp.fill(0);\n return res;\n }\n function scrypt(password, salt, opts) {\n const { N: N4, r: r2, p: p4, dkLen, blockSize32, V: V2, B32, B: B2, tmp, blockMixCb } = scryptInit(password, salt, opts);\n for (let pi = 0; pi < p4; pi++) {\n const Pi = blockSize32 * pi;\n for (let i3 = 0; i3 < blockSize32; i3++)\n V2[i3] = B32[Pi + i3];\n for (let i3 = 0, pos = 0; i3 < N4 - 1; i3++) {\n BlockMix(V2, pos, V2, pos += blockSize32, r2);\n blockMixCb();\n }\n BlockMix(V2, (N4 - 1) * blockSize32, B32, Pi, r2);\n blockMixCb();\n for (let i3 = 0; i3 < N4; i3++) {\n const j2 = B32[Pi + blockSize32 - 16] % N4;\n for (let k4 = 0; k4 < blockSize32; k4++)\n tmp[k4] = B32[Pi + k4] ^ V2[j2 * blockSize32 + k4];\n BlockMix(tmp, 0, B32, Pi, r2);\n blockMixCb();\n }\n }\n return scryptOutput(password, dkLen, B2, V2, tmp);\n }\n exports3.scrypt = scrypt;\n async function scryptAsync(password, salt, opts) {\n const { N: N4, r: r2, p: p4, dkLen, blockSize32, V: V2, B32, B: B2, tmp, blockMixCb, asyncTick } = scryptInit(password, salt, opts);\n for (let pi = 0; pi < p4; pi++) {\n const Pi = blockSize32 * pi;\n for (let i3 = 0; i3 < blockSize32; i3++)\n V2[i3] = B32[Pi + i3];\n let pos = 0;\n await (0, utils_js_1.asyncLoop)(N4 - 1, asyncTick, () => {\n BlockMix(V2, pos, V2, pos += blockSize32, r2);\n blockMixCb();\n });\n BlockMix(V2, (N4 - 1) * blockSize32, B32, Pi, r2);\n blockMixCb();\n await (0, utils_js_1.asyncLoop)(N4, asyncTick, () => {\n const j2 = B32[Pi + blockSize32 - 16] % N4;\n for (let k4 = 0; k4 < blockSize32; k4++)\n tmp[k4] = B32[Pi + k4] ^ V2[j2 * blockSize32 + k4];\n BlockMix(tmp, 0, B32, Pi, r2);\n blockMixCb();\n });\n }\n return scryptOutput(password, dkLen, B2, V2, tmp);\n }\n exports3.scryptAsync = scryptAsync;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/scrypt.js\n var require_scrypt3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/scrypt.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.scryptSync = exports3.scrypt = void 0;\n var scrypt_1 = require_scrypt2();\n var index_js_1 = require_utils8();\n var lockedSync = false;\n var lockedAsync = false;\n var _scryptAsync = async function(passwd, salt, N4, r2, p4, dkLen, onProgress) {\n return await (0, scrypt_1.scryptAsync)(passwd, salt, { N: N4, r: r2, p: p4, dkLen, onProgress });\n };\n var _scryptSync = function(passwd, salt, N4, r2, p4, dkLen) {\n return (0, scrypt_1.scrypt)(passwd, salt, { N: N4, r: r2, p: p4, dkLen });\n };\n var __scryptAsync = _scryptAsync;\n var __scryptSync = _scryptSync;\n async function scrypt(_passwd, _salt, N4, r2, p4, dkLen, progress) {\n const passwd = (0, index_js_1.getBytes)(_passwd, \"passwd\");\n const salt = (0, index_js_1.getBytes)(_salt, \"salt\");\n return (0, index_js_1.hexlify)(await __scryptAsync(passwd, salt, N4, r2, p4, dkLen, progress));\n }\n exports3.scrypt = scrypt;\n scrypt._ = _scryptAsync;\n scrypt.lock = function() {\n lockedAsync = true;\n };\n scrypt.register = function(func) {\n if (lockedAsync) {\n throw new Error(\"scrypt is locked\");\n }\n __scryptAsync = func;\n };\n Object.freeze(scrypt);\n function scryptSync(_passwd, _salt, N4, r2, p4, dkLen) {\n const passwd = (0, index_js_1.getBytes)(_passwd, \"passwd\");\n const salt = (0, index_js_1.getBytes)(_salt, \"salt\");\n return (0, index_js_1.hexlify)(__scryptSync(passwd, salt, N4, r2, p4, dkLen));\n }\n exports3.scryptSync = scryptSync;\n scryptSync._ = _scryptSync;\n scryptSync.lock = function() {\n lockedSync = true;\n };\n scryptSync.register = function(func) {\n if (lockedSync) {\n throw new Error(\"scryptSync is locked\");\n }\n __scryptSync = func;\n };\n Object.freeze(scryptSync);\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/sha2.js\n var require_sha22 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/sha2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha512 = exports3.sha256 = void 0;\n var crypto_js_1 = require_crypto_browser();\n var index_js_1 = require_utils8();\n var _sha256 = function(data) {\n return (0, crypto_js_1.createHash)(\"sha256\").update(data).digest();\n };\n var _sha512 = function(data) {\n return (0, crypto_js_1.createHash)(\"sha512\").update(data).digest();\n };\n var __sha256 = _sha256;\n var __sha512 = _sha512;\n var locked256 = false;\n var locked512 = false;\n function sha2565(_data) {\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__sha256(data));\n }\n exports3.sha256 = sha2565;\n sha2565._ = _sha256;\n sha2565.lock = function() {\n locked256 = true;\n };\n sha2565.register = function(func) {\n if (locked256) {\n throw new Error(\"sha256 is locked\");\n }\n __sha256 = func;\n };\n Object.freeze(sha2565);\n function sha5122(_data) {\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__sha512(data));\n }\n exports3.sha512 = sha5122;\n sha5122._ = _sha512;\n sha5122.lock = function() {\n locked512 = true;\n };\n sha5122.register = function(func) {\n if (locked512) {\n throw new Error(\"sha512 is locked\");\n }\n __sha512 = func;\n };\n Object.freeze(sha2565);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/utils.js\n var require_utils10 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.validateObject = exports3.createHmacDrbg = exports3.bitMask = exports3.bitSet = exports3.bitGet = exports3.bitLen = exports3.utf8ToBytes = exports3.equalBytes = exports3.concatBytes = exports3.ensureBytes = exports3.numberToVarBytesBE = exports3.numberToBytesLE = exports3.numberToBytesBE = exports3.bytesToNumberLE = exports3.bytesToNumberBE = exports3.hexToBytes = exports3.hexToNumber = exports3.numberToHexUnpadded = exports3.bytesToHex = void 0;\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n var u8a = (a3) => a3 instanceof Uint8Array;\n var hexes7 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n function bytesToHex6(bytes) {\n if (!u8a(bytes))\n throw new Error(\"Uint8Array expected\");\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes7[bytes[i3]];\n }\n return hex;\n }\n exports3.bytesToHex = bytesToHex6;\n function numberToHexUnpadded3(num2) {\n const hex = num2.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n }\n exports3.numberToHexUnpadded = numberToHexUnpadded3;\n function hexToNumber4(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n return BigInt(hex === \"\" ? \"0\" : `0x${hex}`);\n }\n exports3.hexToNumber = hexToNumber4;\n function hexToBytes6(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error(\"padded hex string expected, got unpadded hex of length \" + len);\n const array = new Uint8Array(len / 2);\n for (let i3 = 0; i3 < array.length; i3++) {\n const j2 = i3 * 2;\n const hexByte = hex.slice(j2, j2 + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error(\"Invalid byte sequence\");\n array[i3] = byte;\n }\n return array;\n }\n exports3.hexToBytes = hexToBytes6;\n function bytesToNumberBE3(bytes) {\n return hexToNumber4(bytesToHex6(bytes));\n }\n exports3.bytesToNumberBE = bytesToNumberBE3;\n function bytesToNumberLE3(bytes) {\n if (!u8a(bytes))\n throw new Error(\"Uint8Array expected\");\n return hexToNumber4(bytesToHex6(Uint8Array.from(bytes).reverse()));\n }\n exports3.bytesToNumberLE = bytesToNumberLE3;\n function numberToBytesBE3(n2, len) {\n return hexToBytes6(n2.toString(16).padStart(len * 2, \"0\"));\n }\n exports3.numberToBytesBE = numberToBytesBE3;\n function numberToBytesLE3(n2, len) {\n return numberToBytesBE3(n2, len).reverse();\n }\n exports3.numberToBytesLE = numberToBytesLE3;\n function numberToVarBytesBE2(n2) {\n return hexToBytes6(numberToHexUnpadded3(n2));\n }\n exports3.numberToVarBytesBE = numberToVarBytesBE2;\n function ensureBytes3(title2, hex, expectedLength) {\n let res;\n if (typeof hex === \"string\") {\n try {\n res = hexToBytes6(hex);\n } catch (e2) {\n throw new Error(`${title2} must be valid hex string, got \"${hex}\". Cause: ${e2}`);\n }\n } else if (u8a(hex)) {\n res = Uint8Array.from(hex);\n } else {\n throw new Error(`${title2} must be hex string or Uint8Array`);\n }\n const len = res.length;\n if (typeof expectedLength === \"number\" && len !== expectedLength)\n throw new Error(`${title2} expected ${expectedLength} bytes, got ${len}`);\n return res;\n }\n exports3.ensureBytes = ensureBytes3;\n function concatBytes6(...arrays) {\n const r2 = new Uint8Array(arrays.reduce((sum, a3) => sum + a3.length, 0));\n let pad6 = 0;\n arrays.forEach((a3) => {\n if (!u8a(a3))\n throw new Error(\"Uint8Array expected\");\n r2.set(a3, pad6);\n pad6 += a3.length;\n });\n return r2;\n }\n exports3.concatBytes = concatBytes6;\n function equalBytes2(b1, b22) {\n if (b1.length !== b22.length)\n return false;\n for (let i3 = 0; i3 < b1.length; i3++)\n if (b1[i3] !== b22[i3])\n return false;\n return true;\n }\n exports3.equalBytes = equalBytes2;\n function utf8ToBytes5(str) {\n if (typeof str !== \"string\")\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str));\n }\n exports3.utf8ToBytes = utf8ToBytes5;\n function bitLen3(n2) {\n let len;\n for (len = 0; n2 > _0n11; n2 >>= _1n11, len += 1)\n ;\n return len;\n }\n exports3.bitLen = bitLen3;\n function bitGet2(n2, pos) {\n return n2 >> BigInt(pos) & _1n11;\n }\n exports3.bitGet = bitGet2;\n var bitSet2 = (n2, pos, value) => {\n return n2 | (value ? _1n11 : _0n11) << BigInt(pos);\n };\n exports3.bitSet = bitSet2;\n var bitMask3 = (n2) => (_2n8 << BigInt(n2 - 1)) - _1n11;\n exports3.bitMask = bitMask3;\n var u8n3 = (data) => new Uint8Array(data);\n var u8fr3 = (arr) => Uint8Array.from(arr);\n function createHmacDrbg3(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== \"number\" || hashLen < 2)\n throw new Error(\"hashLen must be a number\");\n if (typeof qByteLen !== \"number\" || qByteLen < 2)\n throw new Error(\"qByteLen must be a number\");\n if (typeof hmacFn !== \"function\")\n throw new Error(\"hmacFn must be a function\");\n let v2 = u8n3(hashLen);\n let k4 = u8n3(hashLen);\n let i3 = 0;\n const reset = () => {\n v2.fill(1);\n k4.fill(0);\n i3 = 0;\n };\n const h4 = (...b4) => hmacFn(k4, v2, ...b4);\n const reseed = (seed = u8n3()) => {\n k4 = h4(u8fr3([0]), seed);\n v2 = h4();\n if (seed.length === 0)\n return;\n k4 = h4(u8fr3([1]), seed);\n v2 = h4();\n };\n const gen2 = () => {\n if (i3++ >= 1e3)\n throw new Error(\"drbg: tried 1000 values\");\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v2 = h4();\n const sl = v2.slice();\n out.push(sl);\n len += v2.length;\n }\n return concatBytes6(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed);\n let res = void 0;\n while (!(res = pred(gen2())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n }\n exports3.createHmacDrbg = createHmacDrbg3;\n var validatorFns3 = {\n bigint: (val) => typeof val === \"bigint\",\n function: (val) => typeof val === \"function\",\n boolean: (val) => typeof val === \"boolean\",\n string: (val) => typeof val === \"string\",\n stringOrUint8Array: (val) => typeof val === \"string\" || val instanceof Uint8Array,\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === \"function\" && Number.isSafeInteger(val.outputLen)\n };\n function validateObject3(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns3[type];\n if (typeof checkVal !== \"function\")\n throw new Error(`Invalid validator \"${type}\", expected function`);\n const val = object[fieldName];\n if (isOptional && val === void 0)\n return;\n if (!checkVal(val, object)) {\n throw new Error(`Invalid param ${String(fieldName)}=${val} (${typeof val}), expected ${type}`);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n }\n exports3.validateObject = validateObject3;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/modular.js\n var require_modular = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/modular.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.mapHashToField = exports3.getMinHashLength = exports3.getFieldBytesLength = exports3.hashToPrivateScalar = exports3.FpSqrtEven = exports3.FpSqrtOdd = exports3.Field = exports3.nLength = exports3.FpIsSquare = exports3.FpDiv = exports3.FpInvertBatch = exports3.FpPow = exports3.validateField = exports3.isNegativeLE = exports3.FpSqrt = exports3.tonelliShanks = exports3.invert = exports3.pow2 = exports3.pow = exports3.mod = void 0;\n var utils_js_1 = require_utils10();\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n var _3n5 = BigInt(3);\n var _4n5 = BigInt(4);\n var _5n3 = BigInt(5);\n var _8n3 = BigInt(8);\n var _9n2 = BigInt(9);\n var _16n2 = BigInt(16);\n function mod3(a3, b4) {\n const result = a3 % b4;\n return result >= _0n11 ? result : b4 + result;\n }\n exports3.mod = mod3;\n function pow3(num2, power, modulo) {\n if (modulo <= _0n11 || power < _0n11)\n throw new Error(\"Expected power/modulo > 0\");\n if (modulo === _1n11)\n return _0n11;\n let res = _1n11;\n while (power > _0n11) {\n if (power & _1n11)\n res = res * num2 % modulo;\n num2 = num2 * num2 % modulo;\n power >>= _1n11;\n }\n return res;\n }\n exports3.pow = pow3;\n function pow22(x4, power, modulo) {\n let res = x4;\n while (power-- > _0n11) {\n res *= res;\n res %= modulo;\n }\n return res;\n }\n exports3.pow2 = pow22;\n function invert3(number, modulo) {\n if (number === _0n11 || modulo <= _0n11) {\n throw new Error(`invert: expected positive integers, got n=${number} mod=${modulo}`);\n }\n let a3 = mod3(number, modulo);\n let b4 = modulo;\n let x4 = _0n11, y6 = _1n11, u2 = _1n11, v2 = _0n11;\n while (a3 !== _0n11) {\n const q3 = b4 / a3;\n const r2 = b4 % a3;\n const m2 = x4 - u2 * q3;\n const n2 = y6 - v2 * q3;\n b4 = a3, a3 = r2, x4 = u2, y6 = v2, u2 = m2, v2 = n2;\n }\n const gcd = b4;\n if (gcd !== _1n11)\n throw new Error(\"invert: does not exist\");\n return mod3(x4, modulo);\n }\n exports3.invert = invert3;\n function tonelliShanks3(P2) {\n const legendreC = (P2 - _1n11) / _2n8;\n let Q2, S3, Z2;\n for (Q2 = P2 - _1n11, S3 = 0; Q2 % _2n8 === _0n11; Q2 /= _2n8, S3++)\n ;\n for (Z2 = _2n8; Z2 < P2 && pow3(Z2, legendreC, P2) !== P2 - _1n11; Z2++)\n ;\n if (S3 === 1) {\n const p1div4 = (P2 + _1n11) / _4n5;\n return function tonelliFast(Fp, n2) {\n const root = Fp.pow(n2, p1div4);\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n };\n }\n const Q1div2 = (Q2 + _1n11) / _2n8;\n return function tonelliSlow(Fp, n2) {\n if (Fp.pow(n2, legendreC) === Fp.neg(Fp.ONE))\n throw new Error(\"Cannot find square root\");\n let r2 = S3;\n let g4 = Fp.pow(Fp.mul(Fp.ONE, Z2), Q2);\n let x4 = Fp.pow(n2, Q1div2);\n let b4 = Fp.pow(n2, Q2);\n while (!Fp.eql(b4, Fp.ONE)) {\n if (Fp.eql(b4, Fp.ZERO))\n return Fp.ZERO;\n let m2 = 1;\n for (let t22 = Fp.sqr(b4); m2 < r2; m2++) {\n if (Fp.eql(t22, Fp.ONE))\n break;\n t22 = Fp.sqr(t22);\n }\n const ge = Fp.pow(g4, _1n11 << BigInt(r2 - m2 - 1));\n g4 = Fp.sqr(ge);\n x4 = Fp.mul(x4, ge);\n b4 = Fp.mul(b4, g4);\n r2 = m2;\n }\n return x4;\n };\n }\n exports3.tonelliShanks = tonelliShanks3;\n function FpSqrt3(P2) {\n if (P2 % _4n5 === _3n5) {\n const p1div4 = (P2 + _1n11) / _4n5;\n return function sqrt3mod42(Fp, n2) {\n const root = Fp.pow(n2, p1div4);\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n };\n }\n if (P2 % _8n3 === _5n3) {\n const c1 = (P2 - _5n3) / _8n3;\n return function sqrt5mod82(Fp, n2) {\n const n22 = Fp.mul(n2, _2n8);\n const v2 = Fp.pow(n22, c1);\n const nv = Fp.mul(n2, v2);\n const i3 = Fp.mul(Fp.mul(nv, _2n8), v2);\n const root = Fp.mul(nv, Fp.sub(i3, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n };\n }\n if (P2 % _16n2 === _9n2) {\n }\n return tonelliShanks3(P2);\n }\n exports3.FpSqrt = FpSqrt3;\n var isNegativeLE = (num2, modulo) => (mod3(num2, modulo) & _1n11) === _1n11;\n exports3.isNegativeLE = isNegativeLE;\n var FIELD_FIELDS3 = [\n \"create\",\n \"isValid\",\n \"is0\",\n \"neg\",\n \"inv\",\n \"sqrt\",\n \"sqr\",\n \"eql\",\n \"add\",\n \"sub\",\n \"mul\",\n \"pow\",\n \"div\",\n \"addN\",\n \"subN\",\n \"mulN\",\n \"sqrN\"\n ];\n function validateField3(field) {\n const initial = {\n ORDER: \"bigint\",\n MASK: \"bigint\",\n BYTES: \"isSafeInteger\",\n BITS: \"isSafeInteger\"\n };\n const opts = FIELD_FIELDS3.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n return (0, utils_js_1.validateObject)(field, opts);\n }\n exports3.validateField = validateField3;\n function FpPow3(f7, num2, power) {\n if (power < _0n11)\n throw new Error(\"Expected power > 0\");\n if (power === _0n11)\n return f7.ONE;\n if (power === _1n11)\n return num2;\n let p4 = f7.ONE;\n let d5 = num2;\n while (power > _0n11) {\n if (power & _1n11)\n p4 = f7.mul(p4, d5);\n d5 = f7.sqr(d5);\n power >>= _1n11;\n }\n return p4;\n }\n exports3.FpPow = FpPow3;\n function FpInvertBatch3(f7, nums) {\n const tmp = new Array(nums.length);\n const lastMultiplied = nums.reduce((acc, num2, i3) => {\n if (f7.is0(num2))\n return acc;\n tmp[i3] = acc;\n return f7.mul(acc, num2);\n }, f7.ONE);\n const inverted = f7.inv(lastMultiplied);\n nums.reduceRight((acc, num2, i3) => {\n if (f7.is0(num2))\n return acc;\n tmp[i3] = f7.mul(acc, tmp[i3]);\n return f7.mul(acc, num2);\n }, inverted);\n return tmp;\n }\n exports3.FpInvertBatch = FpInvertBatch3;\n function FpDiv(f7, lhs, rhs) {\n return f7.mul(lhs, typeof rhs === \"bigint\" ? invert3(rhs, f7.ORDER) : f7.inv(rhs));\n }\n exports3.FpDiv = FpDiv;\n function FpIsSquare(f7) {\n const legendreConst = (f7.ORDER - _1n11) / _2n8;\n return (x4) => {\n const p4 = f7.pow(x4, legendreConst);\n return f7.eql(p4, f7.ZERO) || f7.eql(p4, f7.ONE);\n };\n }\n exports3.FpIsSquare = FpIsSquare;\n function nLength3(n2, nBitLength) {\n const _nBitLength = nBitLength !== void 0 ? nBitLength : n2.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n }\n exports3.nLength = nLength3;\n function Field3(ORDER, bitLen3, isLE2 = false, redef = {}) {\n if (ORDER <= _0n11)\n throw new Error(`Expected Field ORDER > 0, got ${ORDER}`);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength3(ORDER, bitLen3);\n if (BYTES > 2048)\n throw new Error(\"Field lengths over 2048 bytes are not supported\");\n const sqrtP = FpSqrt3(ORDER);\n const f7 = Object.freeze({\n ORDER,\n BITS,\n BYTES,\n MASK: (0, utils_js_1.bitMask)(BITS),\n ZERO: _0n11,\n ONE: _1n11,\n create: (num2) => mod3(num2, ORDER),\n isValid: (num2) => {\n if (typeof num2 !== \"bigint\")\n throw new Error(`Invalid field element: expected bigint, got ${typeof num2}`);\n return _0n11 <= num2 && num2 < ORDER;\n },\n is0: (num2) => num2 === _0n11,\n isOdd: (num2) => (num2 & _1n11) === _1n11,\n neg: (num2) => mod3(-num2, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num2) => mod3(num2 * num2, ORDER),\n add: (lhs, rhs) => mod3(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod3(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod3(lhs * rhs, ORDER),\n pow: (num2, power) => FpPow3(f7, num2, power),\n div: (lhs, rhs) => mod3(lhs * invert3(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num2) => num2 * num2,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num2) => invert3(num2, ORDER),\n sqrt: redef.sqrt || ((n2) => sqrtP(f7, n2)),\n invertBatch: (lst) => FpInvertBatch3(f7, lst),\n // TODO: do we really need constant cmov?\n // We don't have const-time bigints anyway, so probably will be not very useful\n cmov: (a3, b4, c4) => c4 ? b4 : a3,\n toBytes: (num2) => isLE2 ? (0, utils_js_1.numberToBytesLE)(num2, BYTES) : (0, utils_js_1.numberToBytesBE)(num2, BYTES),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes.length}`);\n return isLE2 ? (0, utils_js_1.bytesToNumberLE)(bytes) : (0, utils_js_1.bytesToNumberBE)(bytes);\n }\n });\n return Object.freeze(f7);\n }\n exports3.Field = Field3;\n function FpSqrtOdd(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? root : Fp.neg(root);\n }\n exports3.FpSqrtOdd = FpSqrtOdd;\n function FpSqrtEven(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? Fp.neg(root) : root;\n }\n exports3.FpSqrtEven = FpSqrtEven;\n function hashToPrivateScalar(hash3, groupOrder, isLE2 = false) {\n hash3 = (0, utils_js_1.ensureBytes)(\"privateHash\", hash3);\n const hashLen = hash3.length;\n const minLen = nLength3(groupOrder).nByteLength + 8;\n if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n throw new Error(`hashToPrivateScalar: expected ${minLen}-1024 bytes of input, got ${hashLen}`);\n const num2 = isLE2 ? (0, utils_js_1.bytesToNumberLE)(hash3) : (0, utils_js_1.bytesToNumberBE)(hash3);\n return mod3(num2, groupOrder - _1n11) + _1n11;\n }\n exports3.hashToPrivateScalar = hashToPrivateScalar;\n function getFieldBytesLength3(fieldOrder) {\n if (typeof fieldOrder !== \"bigint\")\n throw new Error(\"field order must be bigint\");\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n }\n exports3.getFieldBytesLength = getFieldBytesLength3;\n function getMinHashLength3(fieldOrder) {\n const length = getFieldBytesLength3(fieldOrder);\n return length + Math.ceil(length / 2);\n }\n exports3.getMinHashLength = getMinHashLength3;\n function mapHashToField3(key, fieldOrder, isLE2 = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength3(fieldOrder);\n const minLen = getMinHashLength3(fieldOrder);\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(`expected ${minLen}-1024 bytes of input, got ${len}`);\n const num2 = isLE2 ? (0, utils_js_1.bytesToNumberBE)(key) : (0, utils_js_1.bytesToNumberLE)(key);\n const reduced = mod3(num2, fieldOrder - _1n11) + _1n11;\n return isLE2 ? (0, utils_js_1.numberToBytesLE)(reduced, fieldLen) : (0, utils_js_1.numberToBytesBE)(reduced, fieldLen);\n }\n exports3.mapHashToField = mapHashToField3;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/curve.js\n var require_curve2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/curve.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.validateBasic = exports3.wNAF = void 0;\n var modular_js_1 = require_modular();\n var utils_js_1 = require_utils10();\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n function wNAF3(c4, bits) {\n const constTimeNegate3 = (condition, item) => {\n const neg = item.negate();\n return condition ? neg : item;\n };\n const opts = (W) => {\n const windows = Math.ceil(bits / W) + 1;\n const windowSize = 2 ** (W - 1);\n return { windows, windowSize };\n };\n return {\n constTimeNegate: constTimeNegate3,\n // non-const time multiplication ladder\n unsafeLadder(elm, n2) {\n let p4 = c4.ZERO;\n let d5 = elm;\n while (n2 > _0n11) {\n if (n2 & _1n11)\n p4 = p4.add(d5);\n d5 = d5.double();\n n2 >>= _1n11;\n }\n return p4;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = opts(W);\n const points = [];\n let p4 = elm;\n let base4 = p4;\n for (let window2 = 0; window2 < windows; window2++) {\n base4 = p4;\n points.push(base4);\n for (let i3 = 1; i3 < windowSize; i3++) {\n base4 = base4.add(p4);\n points.push(base4);\n }\n p4 = base4.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n2) {\n const { windows, windowSize } = opts(W);\n let p4 = c4.ZERO;\n let f7 = c4.BASE;\n const mask = BigInt(2 ** W - 1);\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window2 = 0; window2 < windows; window2++) {\n const offset = window2 * windowSize;\n let wbits = Number(n2 & mask);\n n2 >>= shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n2 += _1n11;\n }\n const offset1 = offset;\n const offset2 = offset + Math.abs(wbits) - 1;\n const cond1 = window2 % 2 !== 0;\n const cond2 = wbits < 0;\n if (wbits === 0) {\n f7 = f7.add(constTimeNegate3(cond1, precomputes[offset1]));\n } else {\n p4 = p4.add(constTimeNegate3(cond2, precomputes[offset2]));\n }\n }\n return { p: p4, f: f7 };\n },\n wNAFCached(P2, precomputesMap, n2, transform) {\n const W = P2._WINDOW_SIZE || 1;\n let comp = precomputesMap.get(P2);\n if (!comp) {\n comp = this.precomputeWindow(P2, W);\n if (W !== 1) {\n precomputesMap.set(P2, transform(comp));\n }\n }\n return this.wNAF(W, comp, n2);\n }\n };\n }\n exports3.wNAF = wNAF3;\n function validateBasic3(curve) {\n (0, modular_js_1.validateField)(curve.Fp);\n (0, utils_js_1.validateObject)(curve, {\n n: \"bigint\",\n h: \"bigint\",\n Gx: \"field\",\n Gy: \"field\"\n }, {\n nBitLength: \"isSafeInteger\",\n nByteLength: \"isSafeInteger\"\n });\n return Object.freeze({\n ...(0, modular_js_1.nLength)(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER }\n });\n }\n exports3.validateBasic = validateBasic3;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/weierstrass.js\n var require_weierstrass = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/weierstrass.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.mapToCurveSimpleSWU = exports3.SWUFpSqrtRatio = exports3.weierstrass = exports3.weierstrassPoints = exports3.DER = void 0;\n var mod3 = require_modular();\n var ut = require_utils10();\n var utils_js_1 = require_utils10();\n var curve_js_1 = require_curve2();\n function validatePointOpts3(curve) {\n const opts = (0, curve_js_1.validateBasic)(curve);\n ut.validateObject(opts, {\n a: \"field\",\n b: \"field\"\n }, {\n allowedPrivateKeyLengths: \"array\",\n wrapPrivateKey: \"boolean\",\n isTorsionFree: \"function\",\n clearCofactor: \"function\",\n allowInfinityPoint: \"boolean\",\n fromBytes: \"function\",\n toBytes: \"function\"\n });\n const { endo, Fp, a: a3 } = opts;\n if (endo) {\n if (!Fp.eql(a3, Fp.ZERO)) {\n throw new Error(\"Endomorphism can only be defined for Koblitz curves that have a=0\");\n }\n if (typeof endo !== \"object\" || typeof endo.beta !== \"bigint\" || typeof endo.splitScalar !== \"function\") {\n throw new Error(\"Expected endomorphism with beta: bigint and splitScalar: function\");\n }\n }\n return Object.freeze({ ...opts });\n }\n var { bytesToNumberBE: b2n2, hexToBytes: h2b2 } = ut;\n exports3.DER = {\n // asn.1 DER encoding utils\n Err: class DERErr extends Error {\n constructor(m2 = \"\") {\n super(m2);\n }\n },\n _parseInt(data) {\n const { Err: E2 } = exports3.DER;\n if (data.length < 2 || data[0] !== 2)\n throw new E2(\"Invalid signature integer tag\");\n const len = data[1];\n const res = data.subarray(2, len + 2);\n if (!len || res.length !== len)\n throw new E2(\"Invalid signature integer: wrong length\");\n if (res[0] & 128)\n throw new E2(\"Invalid signature integer: negative\");\n if (res[0] === 0 && !(res[1] & 128))\n throw new E2(\"Invalid signature integer: unnecessary leading zero\");\n return { d: b2n2(res), l: data.subarray(len + 2) };\n },\n toSig(hex) {\n const { Err: E2 } = exports3.DER;\n const data = typeof hex === \"string\" ? h2b2(hex) : hex;\n if (!(data instanceof Uint8Array))\n throw new Error(\"ui8a expected\");\n let l6 = data.length;\n if (l6 < 2 || data[0] != 48)\n throw new E2(\"Invalid signature tag\");\n if (data[1] !== l6 - 2)\n throw new E2(\"Invalid signature: incorrect length\");\n const { d: r2, l: sBytes } = exports3.DER._parseInt(data.subarray(2));\n const { d: s4, l: rBytesLeft } = exports3.DER._parseInt(sBytes);\n if (rBytesLeft.length)\n throw new E2(\"Invalid signature: left bytes after parsing\");\n return { r: r2, s: s4 };\n },\n hexFromSig(sig) {\n const slice4 = (s5) => Number.parseInt(s5[0], 16) & 8 ? \"00\" + s5 : s5;\n const h4 = (num2) => {\n const hex = num2.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n };\n const s4 = slice4(h4(sig.s));\n const r2 = slice4(h4(sig.r));\n const shl = s4.length / 2;\n const rhl = r2.length / 2;\n const sl = h4(shl);\n const rl = h4(rhl);\n return `30${h4(rhl + shl + 4)}02${rl}${r2}02${sl}${s4}`;\n }\n };\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n var _3n5 = BigInt(3);\n var _4n5 = BigInt(4);\n function weierstrassPoints3(opts) {\n const CURVE = validatePointOpts3(opts);\n const { Fp } = CURVE;\n const toBytes6 = CURVE.toBytes || ((_c, point, _isCompressed) => {\n const a3 = point.toAffine();\n return ut.concatBytes(Uint8Array.from([4]), Fp.toBytes(a3.x), Fp.toBytes(a3.y));\n });\n const fromBytes5 = CURVE.fromBytes || ((bytes) => {\n const tail = bytes.subarray(1);\n const x4 = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y6 = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x: x4, y: y6 };\n });\n function weierstrassEquation(x4) {\n const { a: a3, b: b4 } = CURVE;\n const x22 = Fp.sqr(x4);\n const x32 = Fp.mul(x22, x4);\n return Fp.add(Fp.add(x32, Fp.mul(x4, a3)), b4);\n }\n if (!Fp.eql(Fp.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))\n throw new Error(\"bad generator point: equation left != right\");\n function isWithinCurveOrder(num2) {\n return typeof num2 === \"bigint\" && _0n11 < num2 && num2 < CURVE.n;\n }\n function assertGE(num2) {\n if (!isWithinCurveOrder(num2))\n throw new Error(\"Expected valid bigint: 0 < bigint < curve.n\");\n }\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n: n2 } = CURVE;\n if (lengths && typeof key !== \"bigint\") {\n if (key instanceof Uint8Array)\n key = ut.bytesToHex(key);\n if (typeof key !== \"string\" || !lengths.includes(key.length))\n throw new Error(\"Invalid key\");\n key = key.padStart(nByteLength * 2, \"0\");\n }\n let num2;\n try {\n num2 = typeof key === \"bigint\" ? key : ut.bytesToNumberBE((0, utils_js_1.ensureBytes)(\"private key\", key, nByteLength));\n } catch (error) {\n throw new Error(`private key must be ${nByteLength} bytes, hex or bigint, not ${typeof key}`);\n }\n if (wrapPrivateKey)\n num2 = mod3.mod(num2, n2);\n assertGE(num2);\n return num2;\n }\n const pointPrecomputes3 = /* @__PURE__ */ new Map();\n function assertPrjPoint(other) {\n if (!(other instanceof Point3))\n throw new Error(\"ProjectivePoint expected\");\n }\n class Point3 {\n constructor(px, py, pz) {\n this.px = px;\n this.py = py;\n this.pz = pz;\n if (px == null || !Fp.isValid(px))\n throw new Error(\"x required\");\n if (py == null || !Fp.isValid(py))\n throw new Error(\"y required\");\n if (pz == null || !Fp.isValid(pz))\n throw new Error(\"z required\");\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p4) {\n const { x: x4, y: y6 } = p4 || {};\n if (!p4 || !Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"invalid affine point\");\n if (p4 instanceof Point3)\n throw new Error(\"projective point not allowed\");\n const is0 = (i3) => Fp.eql(i3, Fp.ZERO);\n if (is0(x4) && is0(y6))\n return Point3.ZERO;\n return new Point3(x4, y6, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p4) => p4.pz));\n return points.map((p4, i3) => p4.toAffine(toInv[i3])).map(Point3.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P2 = Point3.fromAffine(fromBytes5((0, utils_js_1.ensureBytes)(\"pointHex\", hex)));\n P2.assertValidity();\n return P2;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point3.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes3.delete(this);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n if (this.is0()) {\n if (CURVE.allowInfinityPoint && !Fp.is0(this.py))\n return;\n throw new Error(\"bad point: ZERO\");\n }\n const { x: x4, y: y6 } = this.toAffine();\n if (!Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"bad point: x or y not FE\");\n const left = Fp.sqr(y6);\n const right = weierstrassEquation(x4);\n if (!Fp.eql(left, right))\n throw new Error(\"bad point: equation left != right\");\n if (!this.isTorsionFree())\n throw new Error(\"bad point: not in prime-order subgroup\");\n }\n hasEvenY() {\n const { y: y6 } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y6);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U22 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U22;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point3(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a: a3, b: b4 } = CURVE;\n const b32 = Fp.mul(b4, _3n5);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n let t0 = Fp.mul(X1, X1);\n let t1 = Fp.mul(Y1, Y1);\n let t22 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3);\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a3, Z3);\n Y3 = Fp.mul(b32, t22);\n Y3 = Fp.add(X3, Y3);\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b32, Z3);\n t22 = Fp.mul(a3, t22);\n t3 = Fp.sub(t0, t22);\n t3 = Fp.mul(a3, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0);\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t22);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t22 = Fp.mul(Y1, Z1);\n t22 = Fp.add(t22, t22);\n t0 = Fp.mul(t22, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t22, t1);\n Z3 = Fp.add(Z3, Z3);\n Z3 = Fp.add(Z3, Z3);\n return new Point3(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n const a3 = CURVE.a;\n const b32 = Fp.mul(CURVE.b, _3n5);\n let t0 = Fp.mul(X1, X2);\n let t1 = Fp.mul(Y1, Y2);\n let t22 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2);\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2);\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t22);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2);\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t22);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a3, t4);\n X3 = Fp.mul(b32, t22);\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0);\n t1 = Fp.add(t1, t0);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.mul(b32, t4);\n t1 = Fp.add(t1, t22);\n t22 = Fp.sub(t0, t22);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.add(t4, t22);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4);\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0);\n return new Point3(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point3.ZERO);\n }\n wNAF(n2) {\n return wnaf.wNAFCached(this, pointPrecomputes3, n2, (comp) => {\n const toInv = Fp.invertBatch(comp.map((p4) => p4.pz));\n return comp.map((p4, i3) => p4.toAffine(toInv[i3])).map(Point3.fromAffine);\n });\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(n2) {\n const I2 = Point3.ZERO;\n if (n2 === _0n11)\n return I2;\n assertGE(n2);\n if (n2 === _1n11)\n return this;\n const { endo } = CURVE;\n if (!endo)\n return wnaf.unsafeLadder(this, n2);\n let { k1neg, k1, k2neg, k2: k22 } = endo.splitScalar(n2);\n let k1p = I2;\n let k2p = I2;\n let d5 = this;\n while (k1 > _0n11 || k22 > _0n11) {\n if (k1 & _1n11)\n k1p = k1p.add(d5);\n if (k22 & _1n11)\n k2p = k2p.add(d5);\n d5 = d5.double();\n k1 >>= _1n11;\n k22 >>= _1n11;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point3(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n assertGE(scalar);\n let n2 = scalar;\n let point, fake;\n const { endo } = CURVE;\n if (endo) {\n const { k1neg, k1, k2neg, k2: k22 } = endo.splitScalar(n2);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k22);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point3(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n } else {\n const { p: p4, f: f7 } = this.wNAF(n2);\n point = p4;\n fake = f7;\n }\n return Point3.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q2, a3, b4) {\n const G = Point3.BASE;\n const mul = (P2, a4) => a4 === _0n11 || a4 === _1n11 || !P2.equals(G) ? P2.multiplyUnsafe(a4) : P2.multiply(a4);\n const sum = mul(this, a3).add(mul(Q2, b4));\n return sum.is0() ? void 0 : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n const { px: x4, py: y6, pz: z2 } = this;\n const is0 = this.is0();\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z2);\n const ax = Fp.mul(x4, iz);\n const ay = Fp.mul(y6, iz);\n const zz = Fp.mul(z2, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error(\"invZ was invalid\");\n return { x: ax, y: ay };\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n11)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point3, this);\n throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\");\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n11)\n return this;\n if (clearCofactor)\n return clearCofactor(Point3, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n this.assertValidity();\n return toBytes6(Point3, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return ut.bytesToHex(this.toRawBytes(isCompressed));\n }\n }\n Point3.BASE = new Point3(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point3.ZERO = new Point3(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const _bits = CURVE.nBitLength;\n const wnaf = (0, curve_js_1.wNAF)(Point3, CURVE.endo ? Math.ceil(_bits / 2) : _bits);\n return {\n CURVE,\n ProjectivePoint: Point3,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder\n };\n }\n exports3.weierstrassPoints = weierstrassPoints3;\n function validateOpts3(curve) {\n const opts = (0, curve_js_1.validateBasic)(curve);\n ut.validateObject(opts, {\n hash: \"hash\",\n hmac: \"function\",\n randomBytes: \"function\"\n }, {\n bits2int: \"function\",\n bits2int_modN: \"function\",\n lowS: \"boolean\"\n });\n return Object.freeze({ lowS: true, ...opts });\n }\n function weierstrass3(curveDef) {\n const CURVE = validateOpts3(curveDef);\n const { Fp, n: CURVE_ORDER } = CURVE;\n const compressedLen = Fp.BYTES + 1;\n const uncompressedLen = 2 * Fp.BYTES + 1;\n function isValidFieldElement(num2) {\n return _0n11 < num2 && num2 < Fp.ORDER;\n }\n function modN2(a3) {\n return mod3.mod(a3, CURVE_ORDER);\n }\n function invN(a3) {\n return mod3.invert(a3, CURVE_ORDER);\n }\n const { ProjectivePoint: Point3, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder } = weierstrassPoints3({\n ...CURVE,\n toBytes(_c, point, isCompressed) {\n const a3 = point.toAffine();\n const x4 = Fp.toBytes(a3.x);\n const cat = ut.concatBytes;\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 2 : 3]), x4);\n } else {\n return cat(Uint8Array.from([4]), x4, Fp.toBytes(a3.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (len === compressedLen && (head === 2 || head === 3)) {\n const x4 = ut.bytesToNumberBE(tail);\n if (!isValidFieldElement(x4))\n throw new Error(\"Point is not on curve\");\n const y22 = weierstrassEquation(x4);\n let y6 = Fp.sqrt(y22);\n const isYOdd = (y6 & _1n11) === _1n11;\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y6 = Fp.neg(y6);\n return { x: x4, y: y6 };\n } else if (len === uncompressedLen && head === 4) {\n const x4 = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y6 = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x: x4, y: y6 };\n } else {\n throw new Error(`Point of length ${len} was invalid. Expected ${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes`);\n }\n }\n });\n const numToNByteStr = (num2) => ut.bytesToHex(ut.numberToBytesBE(num2, CURVE.nByteLength));\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n11;\n return number > HALF;\n }\n function normalizeS(s4) {\n return isBiggerThanHalfOrder(s4) ? modN2(-s4) : s4;\n }\n const slcNum = (b4, from14, to) => ut.bytesToNumberBE(b4.slice(from14, to));\n class Signature {\n constructor(r2, s4, recovery) {\n this.r = r2;\n this.s = s4;\n this.recovery = recovery;\n this.assertValidity();\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l6 = CURVE.nByteLength;\n hex = (0, utils_js_1.ensureBytes)(\"compactSignature\", hex, l6 * 2);\n return new Signature(slcNum(hex, 0, l6), slcNum(hex, l6, 2 * l6));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r: r2, s: s4 } = exports3.DER.toSig((0, utils_js_1.ensureBytes)(\"DER\", hex));\n return new Signature(r2, s4);\n }\n assertValidity() {\n if (!isWithinCurveOrder(this.r))\n throw new Error(\"r must be 0 < r < CURVE.n\");\n if (!isWithinCurveOrder(this.s))\n throw new Error(\"s must be 0 < s < CURVE.n\");\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r: r2, s: s4, recovery: rec } = this;\n const h4 = bits2int_modN((0, utils_js_1.ensureBytes)(\"msgHash\", msgHash));\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error(\"recovery id invalid\");\n const radj = rec === 2 || rec === 3 ? r2 + CURVE.n : r2;\n if (radj >= Fp.ORDER)\n throw new Error(\"recovery id 2 or 3 invalid\");\n const prefix = (rec & 1) === 0 ? \"02\" : \"03\";\n const R3 = Point3.fromHex(prefix + numToNByteStr(radj));\n const ir = invN(radj);\n const u1 = modN2(-h4 * ir);\n const u2 = modN2(s4 * ir);\n const Q2 = Point3.BASE.multiplyAndAddUnsafe(R3, u1, u2);\n if (!Q2)\n throw new Error(\"point at infinify\");\n Q2.assertValidity();\n return Q2;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, modN2(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return ut.hexToBytes(this.toDERHex());\n }\n toDERHex() {\n return exports3.DER.hexFromSig({ r: this.r, s: this.s });\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return ut.hexToBytes(this.toCompactHex());\n }\n toCompactHex() {\n return numToNByteStr(this.r) + numToNByteStr(this.s);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n } catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size\n * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.\n */\n randomPrivateKey: () => {\n const length = mod3.getMinHashLength(CURVE.n);\n return mod3.mapHashToField(CURVE.randomBytes(length), CURVE.n);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point3.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3));\n return point;\n }\n };\n function getPublicKey(privateKey, isCompressed = true) {\n return Point3.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n function isProbPub(item) {\n const arr = item instanceof Uint8Array;\n const str = typeof item === \"string\";\n const len = (arr || str) && item.length;\n if (arr)\n return len === compressedLen || len === uncompressedLen;\n if (str)\n return len === 2 * compressedLen || len === 2 * uncompressedLen;\n if (item instanceof Point3)\n return true;\n return false;\n }\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA))\n throw new Error(\"first arg must be private key\");\n if (!isProbPub(publicB))\n throw new Error(\"second arg must be public key\");\n const b4 = Point3.fromHex(publicB);\n return b4.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n const bits2int = CURVE.bits2int || function(bytes) {\n const num2 = ut.bytesToNumberBE(bytes);\n const delta = bytes.length * 8 - CURVE.nBitLength;\n return delta > 0 ? num2 >> BigInt(delta) : num2;\n };\n const bits2int_modN = CURVE.bits2int_modN || function(bytes) {\n return modN2(bits2int(bytes));\n };\n const ORDER_MASK = ut.bitMask(CURVE.nBitLength);\n function int2octets(num2) {\n if (typeof num2 !== \"bigint\")\n throw new Error(\"bigint expected\");\n if (!(_0n11 <= num2 && num2 < ORDER_MASK))\n throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);\n return ut.numberToBytesBE(num2, CURVE.nByteLength);\n }\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if ([\"recovered\", \"canonical\"].some((k4) => k4 in opts))\n throw new Error(\"sign() legacy options not supported\");\n const { hash: hash3, randomBytes: randomBytes3 } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts;\n if (lowS == null)\n lowS = true;\n msgHash = (0, utils_js_1.ensureBytes)(\"msgHash\", msgHash);\n if (prehash)\n msgHash = (0, utils_js_1.ensureBytes)(\"prehashed msgHash\", hash3(msgHash));\n const h1int = bits2int_modN(msgHash);\n const d5 = normPrivateKeyToScalar(privateKey);\n const seedArgs = [int2octets(d5), int2octets(h1int)];\n if (ent != null) {\n const e2 = ent === true ? randomBytes3(Fp.BYTES) : ent;\n seedArgs.push((0, utils_js_1.ensureBytes)(\"extraEntropy\", e2));\n }\n const seed = ut.concatBytes(...seedArgs);\n const m2 = h1int;\n function k2sig(kBytes) {\n const k4 = bits2int(kBytes);\n if (!isWithinCurveOrder(k4))\n return;\n const ik = invN(k4);\n const q3 = Point3.BASE.multiply(k4).toAffine();\n const r2 = modN2(q3.x);\n if (r2 === _0n11)\n return;\n const s4 = modN2(ik * modN2(m2 + r2 * d5));\n if (s4 === _0n11)\n return;\n let recovery = (q3.x === r2 ? 0 : 2) | Number(q3.y & _1n11);\n let normS = s4;\n if (lowS && isBiggerThanHalfOrder(s4)) {\n normS = normalizeS(s4);\n recovery ^= 1;\n }\n return new Signature(r2, normS, recovery);\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n function sign3(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts);\n const C = CURVE;\n const drbg = ut.createHmacDrbg(C.hash.outputLen, C.nByteLength, C.hmac);\n return drbg(seed, k2sig);\n }\n Point3.BASE._setWindowSize(8);\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = (0, utils_js_1.ensureBytes)(\"msgHash\", msgHash);\n publicKey = (0, utils_js_1.ensureBytes)(\"publicKey\", publicKey);\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n const { lowS, prehash } = opts;\n let _sig = void 0;\n let P2;\n try {\n if (typeof sg === \"string\" || sg instanceof Uint8Array) {\n try {\n _sig = Signature.fromDER(sg);\n } catch (derError) {\n if (!(derError instanceof exports3.DER.Err))\n throw derError;\n _sig = Signature.fromCompact(sg);\n }\n } else if (typeof sg === \"object\" && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\") {\n const { r: r3, s: s5 } = sg;\n _sig = new Signature(r3, s5);\n } else {\n throw new Error(\"PARSE\");\n }\n P2 = Point3.fromHex(publicKey);\n } catch (error) {\n if (error.message === \"PARSE\")\n throw new Error(`signature must be Signature instance, Uint8Array or hex string`);\n return false;\n }\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r: r2, s: s4 } = _sig;\n const h4 = bits2int_modN(msgHash);\n const is = invN(s4);\n const u1 = modN2(h4 * is);\n const u2 = modN2(r2 * is);\n const R3 = Point3.BASE.multiplyAndAddUnsafe(P2, u1, u2)?.toAffine();\n if (!R3)\n return false;\n const v2 = modN2(R3.x);\n return v2 === r2;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign: sign3,\n verify,\n ProjectivePoint: Point3,\n Signature,\n utils\n };\n }\n exports3.weierstrass = weierstrass3;\n function SWUFpSqrtRatio2(Fp, Z2) {\n const q3 = Fp.ORDER;\n let l6 = _0n11;\n for (let o5 = q3 - _1n11; o5 % _2n8 === _0n11; o5 /= _2n8)\n l6 += _1n11;\n const c1 = l6;\n const _2n_pow_c1_1 = _2n8 << c1 - _1n11 - _1n11;\n const _2n_pow_c1 = _2n_pow_c1_1 * _2n8;\n const c22 = (q3 - _1n11) / _2n_pow_c1;\n const c32 = (c22 - _1n11) / _2n8;\n const c4 = _2n_pow_c1 - _1n11;\n const c5 = _2n_pow_c1_1;\n const c6 = Fp.pow(Z2, c22);\n const c7 = Fp.pow(Z2, (c22 + _1n11) / _2n8);\n let sqrtRatio = (u2, v2) => {\n let tv1 = c6;\n let tv2 = Fp.pow(v2, c4);\n let tv3 = Fp.sqr(tv2);\n tv3 = Fp.mul(tv3, v2);\n let tv5 = Fp.mul(u2, tv3);\n tv5 = Fp.pow(tv5, c32);\n tv5 = Fp.mul(tv5, tv2);\n tv2 = Fp.mul(tv5, v2);\n tv3 = Fp.mul(tv5, u2);\n let tv4 = Fp.mul(tv3, tv2);\n tv5 = Fp.pow(tv4, c5);\n let isQR = Fp.eql(tv5, Fp.ONE);\n tv2 = Fp.mul(tv3, c7);\n tv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, isQR);\n tv4 = Fp.cmov(tv5, tv4, isQR);\n for (let i3 = c1; i3 > _1n11; i3--) {\n let tv52 = i3 - _2n8;\n tv52 = _2n8 << tv52 - _1n11;\n let tvv5 = Fp.pow(tv4, tv52);\n const e1 = Fp.eql(tvv5, Fp.ONE);\n tv2 = Fp.mul(tv3, tv1);\n tv1 = Fp.mul(tv1, tv1);\n tvv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, e1);\n tv4 = Fp.cmov(tvv5, tv4, e1);\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n5 === _3n5) {\n const c12 = (Fp.ORDER - _3n5) / _4n5;\n const c23 = Fp.sqrt(Fp.neg(Z2));\n sqrtRatio = (u2, v2) => {\n let tv1 = Fp.sqr(v2);\n const tv2 = Fp.mul(u2, v2);\n tv1 = Fp.mul(tv1, tv2);\n let y1 = Fp.pow(tv1, c12);\n y1 = Fp.mul(y1, tv2);\n const y22 = Fp.mul(y1, c23);\n const tv3 = Fp.mul(Fp.sqr(y1), v2);\n const isQR = Fp.eql(tv3, u2);\n let y6 = Fp.cmov(y22, y1, isQR);\n return { isValid: isQR, value: y6 };\n };\n }\n return sqrtRatio;\n }\n exports3.SWUFpSqrtRatio = SWUFpSqrtRatio2;\n function mapToCurveSimpleSWU2(Fp, opts) {\n mod3.validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error(\"mapToCurveSimpleSWU: invalid opts\");\n const sqrtRatio = SWUFpSqrtRatio2(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error(\"Fp.isOdd is not implemented!\");\n return (u2) => {\n let tv1, tv2, tv3, tv4, tv5, tv6, x4, y6;\n tv1 = Fp.sqr(u2);\n tv1 = Fp.mul(tv1, opts.Z);\n tv2 = Fp.sqr(tv1);\n tv2 = Fp.add(tv2, tv1);\n tv3 = Fp.add(tv2, Fp.ONE);\n tv3 = Fp.mul(tv3, opts.B);\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO));\n tv4 = Fp.mul(tv4, opts.A);\n tv2 = Fp.sqr(tv3);\n tv6 = Fp.sqr(tv4);\n tv5 = Fp.mul(tv6, opts.A);\n tv2 = Fp.add(tv2, tv5);\n tv2 = Fp.mul(tv2, tv3);\n tv6 = Fp.mul(tv6, tv4);\n tv5 = Fp.mul(tv6, opts.B);\n tv2 = Fp.add(tv2, tv5);\n x4 = Fp.mul(tv1, tv3);\n const { isValid: isValid2, value } = sqrtRatio(tv2, tv6);\n y6 = Fp.mul(tv1, u2);\n y6 = Fp.mul(y6, value);\n x4 = Fp.cmov(x4, tv3, isValid2);\n y6 = Fp.cmov(y6, value, isValid2);\n const e1 = Fp.isOdd(u2) === Fp.isOdd(y6);\n y6 = Fp.cmov(Fp.neg(y6), y6, e1);\n x4 = Fp.div(x4, tv4);\n return { x: x4, y: y6 };\n };\n }\n exports3.mapToCurveSimpleSWU = mapToCurveSimpleSWU2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/hash-to-curve.js\n var require_hash_to_curve = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/hash-to-curve.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createHasher = exports3.isogenyMap = exports3.hash_to_field = exports3.expand_message_xof = exports3.expand_message_xmd = void 0;\n var modular_js_1 = require_modular();\n var utils_js_1 = require_utils10();\n function validateDST(dst) {\n if (dst instanceof Uint8Array)\n return dst;\n if (typeof dst === \"string\")\n return (0, utils_js_1.utf8ToBytes)(dst);\n throw new Error(\"DST must be Uint8Array or string\");\n }\n var os2ip2 = utils_js_1.bytesToNumberBE;\n function i2osp2(value, length) {\n if (value < 0 || value >= 1 << 8 * length) {\n throw new Error(`bad I2OSP call: value=${value} length=${length}`);\n }\n const res = Array.from({ length }).fill(0);\n for (let i3 = length - 1; i3 >= 0; i3--) {\n res[i3] = value & 255;\n value >>>= 8;\n }\n return new Uint8Array(res);\n }\n function strxor2(a3, b4) {\n const arr = new Uint8Array(a3.length);\n for (let i3 = 0; i3 < a3.length; i3++) {\n arr[i3] = a3[i3] ^ b4[i3];\n }\n return arr;\n }\n function isBytes7(item) {\n if (!(item instanceof Uint8Array))\n throw new Error(\"Uint8Array expected\");\n }\n function isNum(item) {\n if (!Number.isSafeInteger(item))\n throw new Error(\"number expected\");\n }\n function expand_message_xmd2(msg, DST, lenInBytes, H3) {\n isBytes7(msg);\n isBytes7(DST);\n isNum(lenInBytes);\n if (DST.length > 255)\n DST = H3((0, utils_js_1.concatBytes)((0, utils_js_1.utf8ToBytes)(\"H2C-OVERSIZE-DST-\"), DST));\n const { outputLen: b_in_bytes, blockLen: r_in_bytes } = H3;\n const ell = Math.ceil(lenInBytes / b_in_bytes);\n if (ell > 255)\n throw new Error(\"Invalid xmd length\");\n const DST_prime = (0, utils_js_1.concatBytes)(DST, i2osp2(DST.length, 1));\n const Z_pad = i2osp2(0, r_in_bytes);\n const l_i_b_str = i2osp2(lenInBytes, 2);\n const b4 = new Array(ell);\n const b_0 = H3((0, utils_js_1.concatBytes)(Z_pad, msg, l_i_b_str, i2osp2(0, 1), DST_prime));\n b4[0] = H3((0, utils_js_1.concatBytes)(b_0, i2osp2(1, 1), DST_prime));\n for (let i3 = 1; i3 <= ell; i3++) {\n const args = [strxor2(b_0, b4[i3 - 1]), i2osp2(i3 + 1, 1), DST_prime];\n b4[i3] = H3((0, utils_js_1.concatBytes)(...args));\n }\n const pseudo_random_bytes = (0, utils_js_1.concatBytes)(...b4);\n return pseudo_random_bytes.slice(0, lenInBytes);\n }\n exports3.expand_message_xmd = expand_message_xmd2;\n function expand_message_xof2(msg, DST, lenInBytes, k4, H3) {\n isBytes7(msg);\n isBytes7(DST);\n isNum(lenInBytes);\n if (DST.length > 255) {\n const dkLen = Math.ceil(2 * k4 / 8);\n DST = H3.create({ dkLen }).update((0, utils_js_1.utf8ToBytes)(\"H2C-OVERSIZE-DST-\")).update(DST).digest();\n }\n if (lenInBytes > 65535 || DST.length > 255)\n throw new Error(\"expand_message_xof: invalid lenInBytes\");\n return H3.create({ dkLen: lenInBytes }).update(msg).update(i2osp2(lenInBytes, 2)).update(DST).update(i2osp2(DST.length, 1)).digest();\n }\n exports3.expand_message_xof = expand_message_xof2;\n function hash_to_field2(msg, count, options) {\n (0, utils_js_1.validateObject)(options, {\n DST: \"stringOrUint8Array\",\n p: \"bigint\",\n m: \"isSafeInteger\",\n k: \"isSafeInteger\",\n hash: \"hash\"\n });\n const { p: p4, k: k4, m: m2, hash: hash3, expand, DST: _DST } = options;\n isBytes7(msg);\n isNum(count);\n const DST = validateDST(_DST);\n const log2p = p4.toString(2).length;\n const L2 = Math.ceil((log2p + k4) / 8);\n const len_in_bytes = count * m2 * L2;\n let prb;\n if (expand === \"xmd\") {\n prb = expand_message_xmd2(msg, DST, len_in_bytes, hash3);\n } else if (expand === \"xof\") {\n prb = expand_message_xof2(msg, DST, len_in_bytes, k4, hash3);\n } else if (expand === \"_internal_pass\") {\n prb = msg;\n } else {\n throw new Error('expand must be \"xmd\" or \"xof\"');\n }\n const u2 = new Array(count);\n for (let i3 = 0; i3 < count; i3++) {\n const e2 = new Array(m2);\n for (let j2 = 0; j2 < m2; j2++) {\n const elm_offset = L2 * (j2 + i3 * m2);\n const tv = prb.subarray(elm_offset, elm_offset + L2);\n e2[j2] = (0, modular_js_1.mod)(os2ip2(tv), p4);\n }\n u2[i3] = e2;\n }\n return u2;\n }\n exports3.hash_to_field = hash_to_field2;\n function isogenyMap2(field, map) {\n const COEFF = map.map((i3) => Array.from(i3).reverse());\n return (x4, y6) => {\n const [xNum, xDen, yNum, yDen] = COEFF.map((val) => val.reduce((acc, i3) => field.add(field.mul(acc, x4), i3)));\n x4 = field.div(xNum, xDen);\n y6 = field.mul(y6, field.div(yNum, yDen));\n return { x: x4, y: y6 };\n };\n }\n exports3.isogenyMap = isogenyMap2;\n function createHasher3(Point3, mapToCurve, def) {\n if (typeof mapToCurve !== \"function\")\n throw new Error(\"mapToCurve() must be defined\");\n return {\n // Encodes byte string to elliptic curve.\n // hash_to_curve from https://www.rfc-editor.org/rfc/rfc9380#section-3\n hashToCurve(msg, options) {\n const u2 = hash_to_field2(msg, 2, { ...def, DST: def.DST, ...options });\n const u0 = Point3.fromAffine(mapToCurve(u2[0]));\n const u1 = Point3.fromAffine(mapToCurve(u2[1]));\n const P2 = u0.add(u1).clearCofactor();\n P2.assertValidity();\n return P2;\n },\n // Encodes byte string to elliptic curve.\n // encode_to_curve from https://www.rfc-editor.org/rfc/rfc9380#section-3\n encodeToCurve(msg, options) {\n const u2 = hash_to_field2(msg, 1, { ...def, DST: def.encodeDST, ...options });\n const P2 = Point3.fromAffine(mapToCurve(u2[0])).clearCofactor();\n P2.assertValidity();\n return P2;\n }\n };\n }\n exports3.createHasher = createHasher3;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/_shortw_utils.js\n var require_shortw_utils = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/_shortw_utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createCurve = exports3.getHash = void 0;\n var hmac_1 = require_hmac2();\n var utils_1 = require_utils9();\n var weierstrass_js_1 = require_weierstrass();\n function getHash3(hash3) {\n return {\n hash: hash3,\n hmac: (key, ...msgs) => (0, hmac_1.hmac)(hash3, key, (0, utils_1.concatBytes)(...msgs)),\n randomBytes: utils_1.randomBytes\n };\n }\n exports3.getHash = getHash3;\n function createCurve3(curveDef, defHash) {\n const create2 = (hash3) => (0, weierstrass_js_1.weierstrass)({ ...curveDef, ...getHash3(hash3) });\n return Object.freeze({ ...create2(defHash), create: create2 });\n }\n exports3.createCurve = createCurve3;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/secp256k1.js\n var require_secp256k12 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/secp256k1.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encodeToCurve = exports3.hashToCurve = exports3.schnorr = exports3.secp256k1 = void 0;\n var sha256_1 = require_sha256();\n var utils_1 = require_utils9();\n var modular_js_1 = require_modular();\n var weierstrass_js_1 = require_weierstrass();\n var utils_js_1 = require_utils10();\n var hash_to_curve_js_1 = require_hash_to_curve();\n var _shortw_utils_js_1 = require_shortw_utils();\n var secp256k1P2 = BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\");\n var secp256k1N2 = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n var divNearest2 = (a3, b4) => (a3 + b4 / _2n8) / b4;\n function sqrtMod2(y6) {\n const P2 = secp256k1P2;\n const _3n5 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b22 = y6 * y6 * y6 % P2;\n const b32 = b22 * b22 * y6 % P2;\n const b6 = (0, modular_js_1.pow2)(b32, _3n5, P2) * b32 % P2;\n const b9 = (0, modular_js_1.pow2)(b6, _3n5, P2) * b32 % P2;\n const b11 = (0, modular_js_1.pow2)(b9, _2n8, P2) * b22 % P2;\n const b222 = (0, modular_js_1.pow2)(b11, _11n, P2) * b11 % P2;\n const b44 = (0, modular_js_1.pow2)(b222, _22n, P2) * b222 % P2;\n const b88 = (0, modular_js_1.pow2)(b44, _44n, P2) * b44 % P2;\n const b176 = (0, modular_js_1.pow2)(b88, _88n, P2) * b88 % P2;\n const b220 = (0, modular_js_1.pow2)(b176, _44n, P2) * b44 % P2;\n const b223 = (0, modular_js_1.pow2)(b220, _3n5, P2) * b32 % P2;\n const t1 = (0, modular_js_1.pow2)(b223, _23n, P2) * b222 % P2;\n const t22 = (0, modular_js_1.pow2)(t1, _6n, P2) * b22 % P2;\n const root = (0, modular_js_1.pow2)(t22, _2n8, P2);\n if (!Fp.eql(Fp.sqr(root), y6))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n var Fp = (0, modular_js_1.Field)(secp256k1P2, void 0, void 0, { sqrt: sqrtMod2 });\n exports3.secp256k1 = (0, _shortw_utils_js_1.createCurve)({\n a: BigInt(0),\n b: BigInt(7),\n Fp,\n n: secp256k1N2,\n // Base point (x, y) aka generator point\n Gx: BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),\n Gy: BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),\n h: BigInt(1),\n lowS: true,\n /**\n * secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.\n * Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.\n * For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.\n * Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066\n */\n endo: {\n beta: BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),\n splitScalar: (k4) => {\n const n2 = secp256k1N2;\n const a1 = BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\");\n const b1 = -_1n11 * BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\");\n const a22 = BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\");\n const b22 = a1;\n const POW_2_128 = BigInt(\"0x100000000000000000000000000000000\");\n const c1 = divNearest2(b22 * k4, n2);\n const c22 = divNearest2(-b1 * k4, n2);\n let k1 = (0, modular_js_1.mod)(k4 - c1 * a1 - c22 * a22, n2);\n let k22 = (0, modular_js_1.mod)(-c1 * b1 - c22 * b22, n2);\n const k1neg = k1 > POW_2_128;\n const k2neg = k22 > POW_2_128;\n if (k1neg)\n k1 = n2 - k1;\n if (k2neg)\n k22 = n2 - k22;\n if (k1 > POW_2_128 || k22 > POW_2_128) {\n throw new Error(\"splitScalar: Endomorphism failed, k=\" + k4);\n }\n return { k1neg, k1, k2neg, k2: k22 };\n }\n }\n }, sha256_1.sha256);\n var _0n11 = BigInt(0);\n var fe = (x4) => typeof x4 === \"bigint\" && _0n11 < x4 && x4 < secp256k1P2;\n var ge = (x4) => typeof x4 === \"bigint\" && _0n11 < x4 && x4 < secp256k1N2;\n var TAGGED_HASH_PREFIXES2 = {};\n function taggedHash2(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES2[tag];\n if (tagP === void 0) {\n const tagH = (0, sha256_1.sha256)(Uint8Array.from(tag, (c4) => c4.charCodeAt(0)));\n tagP = (0, utils_js_1.concatBytes)(tagH, tagH);\n TAGGED_HASH_PREFIXES2[tag] = tagP;\n }\n return (0, sha256_1.sha256)((0, utils_js_1.concatBytes)(tagP, ...messages));\n }\n var pointToBytes2 = (point) => point.toRawBytes(true).slice(1);\n var numTo32b2 = (n2) => (0, utils_js_1.numberToBytesBE)(n2, 32);\n var modP2 = (x4) => (0, modular_js_1.mod)(x4, secp256k1P2);\n var modN2 = (x4) => (0, modular_js_1.mod)(x4, secp256k1N2);\n var Point3 = exports3.secp256k1.ProjectivePoint;\n var GmulAdd2 = (Q2, a3, b4) => Point3.BASE.multiplyAndAddUnsafe(Q2, a3, b4);\n function schnorrGetExtPubKey2(priv) {\n let d_ = exports3.secp256k1.utils.normPrivateKeyToScalar(priv);\n let p4 = Point3.fromPrivateKey(d_);\n const scalar = p4.hasEvenY() ? d_ : modN2(-d_);\n return { scalar, bytes: pointToBytes2(p4) };\n }\n function lift_x2(x4) {\n if (!fe(x4))\n throw new Error(\"bad x: need 0 < x < p\");\n const xx = modP2(x4 * x4);\n const c4 = modP2(xx * x4 + BigInt(7));\n let y6 = sqrtMod2(c4);\n if (y6 % _2n8 !== _0n11)\n y6 = modP2(-y6);\n const p4 = new Point3(x4, y6, _1n11);\n p4.assertValidity();\n return p4;\n }\n function challenge2(...args) {\n return modN2((0, utils_js_1.bytesToNumberBE)(taggedHash2(\"BIP0340/challenge\", ...args)));\n }\n function schnorrGetPublicKey2(privateKey) {\n return schnorrGetExtPubKey2(privateKey).bytes;\n }\n function schnorrSign2(message, privateKey, auxRand = (0, utils_1.randomBytes)(32)) {\n const m2 = (0, utils_js_1.ensureBytes)(\"message\", message);\n const { bytes: px, scalar: d5 } = schnorrGetExtPubKey2(privateKey);\n const a3 = (0, utils_js_1.ensureBytes)(\"auxRand\", auxRand, 32);\n const t3 = numTo32b2(d5 ^ (0, utils_js_1.bytesToNumberBE)(taggedHash2(\"BIP0340/aux\", a3)));\n const rand = taggedHash2(\"BIP0340/nonce\", t3, px, m2);\n const k_ = modN2((0, utils_js_1.bytesToNumberBE)(rand));\n if (k_ === _0n11)\n throw new Error(\"sign failed: k is zero\");\n const { bytes: rx, scalar: k4 } = schnorrGetExtPubKey2(k_);\n const e2 = challenge2(rx, px, m2);\n const sig = new Uint8Array(64);\n sig.set(rx, 0);\n sig.set(numTo32b2(modN2(k4 + e2 * d5)), 32);\n if (!schnorrVerify2(sig, m2, px))\n throw new Error(\"sign: Invalid signature produced\");\n return sig;\n }\n function schnorrVerify2(signature, message, publicKey) {\n const sig = (0, utils_js_1.ensureBytes)(\"signature\", signature, 64);\n const m2 = (0, utils_js_1.ensureBytes)(\"message\", message);\n const pub = (0, utils_js_1.ensureBytes)(\"publicKey\", publicKey, 32);\n try {\n const P2 = lift_x2((0, utils_js_1.bytesToNumberBE)(pub));\n const r2 = (0, utils_js_1.bytesToNumberBE)(sig.subarray(0, 32));\n if (!fe(r2))\n return false;\n const s4 = (0, utils_js_1.bytesToNumberBE)(sig.subarray(32, 64));\n if (!ge(s4))\n return false;\n const e2 = challenge2(numTo32b2(r2), pointToBytes2(P2), m2);\n const R3 = GmulAdd2(P2, s4, modN2(-e2));\n if (!R3 || !R3.hasEvenY() || R3.toAffine().x !== r2)\n return false;\n return true;\n } catch (error) {\n return false;\n }\n }\n exports3.schnorr = (() => ({\n getPublicKey: schnorrGetPublicKey2,\n sign: schnorrSign2,\n verify: schnorrVerify2,\n utils: {\n randomPrivateKey: exports3.secp256k1.utils.randomPrivateKey,\n lift_x: lift_x2,\n pointToBytes: pointToBytes2,\n numberToBytesBE: utils_js_1.numberToBytesBE,\n bytesToNumberBE: utils_js_1.bytesToNumberBE,\n taggedHash: taggedHash2,\n mod: modular_js_1.mod\n }\n }))();\n var isoMap2 = /* @__PURE__ */ (() => (0, hash_to_curve_js_1.isogenyMap)(Fp, [\n // xNum\n [\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7\",\n \"0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581\",\n \"0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262\",\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c\"\n ],\n // xDen\n [\n \"0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b\",\n \"0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ],\n // yNum\n [\n \"0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c\",\n \"0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3\",\n \"0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931\",\n \"0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84\"\n ],\n // yDen\n [\n \"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b\",\n \"0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573\",\n \"0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ]\n ].map((i3) => i3.map((j2) => BigInt(j2)))))();\n var mapSWU2 = /* @__PURE__ */ (() => (0, weierstrass_js_1.mapToCurveSimpleSWU)(Fp, {\n A: BigInt(\"0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533\"),\n B: BigInt(\"1771\"),\n Z: Fp.create(BigInt(\"-11\"))\n }))();\n var htf = /* @__PURE__ */ (() => (0, hash_to_curve_js_1.createHasher)(exports3.secp256k1.ProjectivePoint, (scalars) => {\n const { x: x4, y: y6 } = mapSWU2(Fp.create(scalars[0]));\n return isoMap2(x4, y6);\n }, {\n DST: \"secp256k1_XMD:SHA-256_SSWU_RO_\",\n encodeDST: \"secp256k1_XMD:SHA-256_SSWU_NU_\",\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: \"xmd\",\n hash: sha256_1.sha256\n }))();\n exports3.hashToCurve = (() => htf.hashToCurve)();\n exports3.encodeToCurve = (() => htf.encodeToCurve)();\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/addresses.js\n var require_addresses2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/addresses.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ZeroAddress = void 0;\n exports3.ZeroAddress = \"0x0000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/hashes.js\n var require_hashes2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/hashes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ZeroHash = void 0;\n exports3.ZeroHash = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/numbers.js\n var require_numbers = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/numbers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.N = void 0;\n exports3.N = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n exports3.WeiPerEther = BigInt(\"1000000000000000000\");\n exports3.MaxUint256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n exports3.MinInt256 = BigInt(\"0x8000000000000000000000000000000000000000000000000000000000000000\") * BigInt(-1);\n exports3.MaxInt256 = BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/strings.js\n var require_strings2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/strings.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.MessagePrefix = exports3.EtherSymbol = void 0;\n exports3.EtherSymbol = \"\\u039E\";\n exports3.MessagePrefix = \"\u0019Ethereum Signed Message:\\n\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/index.js\n var require_constants5 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.MessagePrefix = exports3.EtherSymbol = exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.N = exports3.ZeroHash = exports3.ZeroAddress = void 0;\n var addresses_js_1 = require_addresses2();\n Object.defineProperty(exports3, \"ZeroAddress\", { enumerable: true, get: function() {\n return addresses_js_1.ZeroAddress;\n } });\n var hashes_js_1 = require_hashes2();\n Object.defineProperty(exports3, \"ZeroHash\", { enumerable: true, get: function() {\n return hashes_js_1.ZeroHash;\n } });\n var numbers_js_1 = require_numbers();\n Object.defineProperty(exports3, \"N\", { enumerable: true, get: function() {\n return numbers_js_1.N;\n } });\n Object.defineProperty(exports3, \"WeiPerEther\", { enumerable: true, get: function() {\n return numbers_js_1.WeiPerEther;\n } });\n Object.defineProperty(exports3, \"MaxUint256\", { enumerable: true, get: function() {\n return numbers_js_1.MaxUint256;\n } });\n Object.defineProperty(exports3, \"MinInt256\", { enumerable: true, get: function() {\n return numbers_js_1.MinInt256;\n } });\n Object.defineProperty(exports3, \"MaxInt256\", { enumerable: true, get: function() {\n return numbers_js_1.MaxInt256;\n } });\n var strings_js_1 = require_strings2();\n Object.defineProperty(exports3, \"EtherSymbol\", { enumerable: true, get: function() {\n return strings_js_1.EtherSymbol;\n } });\n Object.defineProperty(exports3, \"MessagePrefix\", { enumerable: true, get: function() {\n return strings_js_1.MessagePrefix;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/signature.js\n var require_signature3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/signature.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Signature = void 0;\n var index_js_1 = require_constants5();\n var index_js_2 = require_utils8();\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var BN_2 = BigInt(2);\n var BN_27 = BigInt(27);\n var BN_28 = BigInt(28);\n var BN_35 = BigInt(35);\n var _guard = {};\n function toUint256(value) {\n return (0, index_js_2.zeroPadValue)((0, index_js_2.toBeArray)(value), 32);\n }\n var Signature = class _Signature {\n #r;\n #s;\n #v;\n #networkV;\n /**\n * The ``r`` value for a signature.\n *\n * This represents the ``x`` coordinate of a \"reference\" or\n * challenge point, from which the ``y`` can be computed.\n */\n get r() {\n return this.#r;\n }\n set r(value) {\n (0, index_js_2.assertArgument)((0, index_js_2.dataLength)(value) === 32, \"invalid r\", \"value\", value);\n this.#r = (0, index_js_2.hexlify)(value);\n }\n /**\n * The ``s`` value for a signature.\n */\n get s() {\n (0, index_js_2.assertArgument)(parseInt(this.#s.substring(0, 3)) < 8, \"non-canonical s; use ._s\", \"s\", this.#s);\n return this.#s;\n }\n set s(_value) {\n (0, index_js_2.assertArgument)((0, index_js_2.dataLength)(_value) === 32, \"invalid s\", \"value\", _value);\n this.#s = (0, index_js_2.hexlify)(_value);\n }\n /**\n * Return the s value, unchecked for EIP-2 compliance.\n *\n * This should generally not be used and is for situations where\n * a non-canonical S value might be relevant, such as Frontier blocks\n * that were mined prior to EIP-2 or invalid Authorization List\n * signatures.\n */\n get _s() {\n return this.#s;\n }\n /**\n * Returns true if the Signature is valid for [[link-eip-2]] signatures.\n */\n isValid() {\n return parseInt(this.#s.substring(0, 3)) < 8;\n }\n /**\n * The ``v`` value for a signature.\n *\n * Since a given ``x`` value for ``r`` has two possible values for\n * its correspondin ``y``, the ``v`` indicates which of the two ``y``\n * values to use.\n *\n * It is normalized to the values ``27`` or ``28`` for legacy\n * purposes.\n */\n get v() {\n return this.#v;\n }\n set v(value) {\n const v2 = (0, index_js_2.getNumber)(value, \"value\");\n (0, index_js_2.assertArgument)(v2 === 27 || v2 === 28, \"invalid v\", \"v\", value);\n this.#v = v2;\n }\n /**\n * The EIP-155 ``v`` for legacy transactions. For non-legacy\n * transactions, this value is ``null``.\n */\n get networkV() {\n return this.#networkV;\n }\n /**\n * The chain ID for EIP-155 legacy transactions. For non-legacy\n * transactions, this value is ``null``.\n */\n get legacyChainId() {\n const v2 = this.networkV;\n if (v2 == null) {\n return null;\n }\n return _Signature.getChainId(v2);\n }\n /**\n * The ``yParity`` for the signature.\n *\n * See ``v`` for more details on how this value is used.\n */\n get yParity() {\n return this.v === 27 ? 0 : 1;\n }\n /**\n * The [[link-eip-2098]] compact representation of the ``yParity``\n * and ``s`` compacted into a single ``bytes32``.\n */\n get yParityAndS() {\n const yParityAndS = (0, index_js_2.getBytes)(this.s);\n if (this.yParity) {\n yParityAndS[0] |= 128;\n }\n return (0, index_js_2.hexlify)(yParityAndS);\n }\n /**\n * The [[link-eip-2098]] compact representation.\n */\n get compactSerialized() {\n return (0, index_js_2.concat)([this.r, this.yParityAndS]);\n }\n /**\n * The serialized representation.\n */\n get serialized() {\n return (0, index_js_2.concat)([this.r, this.s, this.yParity ? \"0x1c\" : \"0x1b\"]);\n }\n /**\n * @private\n */\n constructor(guard, r2, s4, v2) {\n (0, index_js_2.assertPrivate)(guard, _guard, \"Signature\");\n this.#r = r2;\n this.#s = s4;\n this.#v = v2;\n this.#networkV = null;\n }\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n return `Signature { r: \"${this.r}\", s: \"${this._s}\"${this.isValid() ? \"\" : ', valid: \"false\"'}, yParity: ${this.yParity}, networkV: ${this.networkV} }`;\n }\n /**\n * Returns a new identical [[Signature]].\n */\n clone() {\n const clone = new _Signature(_guard, this.r, this._s, this.v);\n if (this.networkV) {\n clone.#networkV = this.networkV;\n }\n return clone;\n }\n /**\n * Returns a representation that is compatible with ``JSON.stringify``.\n */\n toJSON() {\n const networkV = this.networkV;\n return {\n _type: \"signature\",\n networkV: networkV != null ? networkV.toString() : null,\n r: this.r,\n s: this._s,\n v: this.v\n };\n }\n /**\n * Compute the chain ID from the ``v`` in a legacy EIP-155 transactions.\n *\n * @example:\n * Signature.getChainId(45)\n * //_result:\n *\n * Signature.getChainId(46)\n * //_result:\n */\n static getChainId(v2) {\n const bv = (0, index_js_2.getBigInt)(v2, \"v\");\n if (bv == BN_27 || bv == BN_28) {\n return BN_0;\n }\n (0, index_js_2.assertArgument)(bv >= BN_35, \"invalid EIP-155 v\", \"v\", v2);\n return (bv - BN_35) / BN_2;\n }\n /**\n * Compute the ``v`` for a chain ID for a legacy EIP-155 transactions.\n *\n * Legacy transactions which use [[link-eip-155]] hijack the ``v``\n * property to include the chain ID.\n *\n * @example:\n * Signature.getChainIdV(5, 27)\n * //_result:\n *\n * Signature.getChainIdV(5, 28)\n * //_result:\n *\n */\n static getChainIdV(chainId, v2) {\n return (0, index_js_2.getBigInt)(chainId) * BN_2 + BigInt(35 + v2 - 27);\n }\n /**\n * Compute the normalized legacy transaction ``v`` from a ``yParirty``,\n * a legacy transaction ``v`` or a legacy [[link-eip-155]] transaction.\n *\n * @example:\n * // The values 0 and 1 imply v is actually yParity\n * Signature.getNormalizedV(0)\n * //_result:\n *\n * // Legacy non-EIP-1559 transaction (i.e. 27 or 28)\n * Signature.getNormalizedV(27)\n * //_result:\n *\n * // Legacy EIP-155 transaction (i.e. >= 35)\n * Signature.getNormalizedV(46)\n * //_result:\n *\n * // Invalid values throw\n * Signature.getNormalizedV(5)\n * //_error:\n */\n static getNormalizedV(v2) {\n const bv = (0, index_js_2.getBigInt)(v2);\n if (bv === BN_0 || bv === BN_27) {\n return 27;\n }\n if (bv === BN_1 || bv === BN_28) {\n return 28;\n }\n (0, index_js_2.assertArgument)(bv >= BN_35, \"invalid v\", \"v\", v2);\n return bv & BN_1 ? 27 : 28;\n }\n /**\n * Creates a new [[Signature]].\n *\n * If no %%sig%% is provided, a new [[Signature]] is created\n * with default values.\n *\n * If %%sig%% is a string, it is parsed.\n */\n static from(sig) {\n function assertError(check, message) {\n (0, index_js_2.assertArgument)(check, message, \"signature\", sig);\n }\n ;\n if (sig == null) {\n return new _Signature(_guard, index_js_1.ZeroHash, index_js_1.ZeroHash, 27);\n }\n if (typeof sig === \"string\") {\n const bytes = (0, index_js_2.getBytes)(sig, \"signature\");\n if (bytes.length === 64) {\n const r3 = (0, index_js_2.hexlify)(bytes.slice(0, 32));\n const s5 = bytes.slice(32, 64);\n const v6 = s5[0] & 128 ? 28 : 27;\n s5[0] &= 127;\n return new _Signature(_guard, r3, (0, index_js_2.hexlify)(s5), v6);\n }\n if (bytes.length === 65) {\n const r3 = (0, index_js_2.hexlify)(bytes.slice(0, 32));\n const s5 = (0, index_js_2.hexlify)(bytes.slice(32, 64));\n const v6 = _Signature.getNormalizedV(bytes[64]);\n return new _Signature(_guard, r3, s5, v6);\n }\n assertError(false, \"invalid raw signature length\");\n }\n if (sig instanceof _Signature) {\n return sig.clone();\n }\n const _r = sig.r;\n assertError(_r != null, \"missing r\");\n const r2 = toUint256(_r);\n const s4 = function(s5, yParityAndS) {\n if (s5 != null) {\n return toUint256(s5);\n }\n if (yParityAndS != null) {\n assertError((0, index_js_2.isHexString)(yParityAndS, 32), \"invalid yParityAndS\");\n const bytes = (0, index_js_2.getBytes)(yParityAndS);\n bytes[0] &= 127;\n return (0, index_js_2.hexlify)(bytes);\n }\n assertError(false, \"missing s\");\n }(sig.s, sig.yParityAndS);\n const { networkV, v: v2 } = function(_v, yParityAndS, yParity) {\n if (_v != null) {\n const v6 = (0, index_js_2.getBigInt)(_v);\n return {\n networkV: v6 >= BN_35 ? v6 : void 0,\n v: _Signature.getNormalizedV(v6)\n };\n }\n if (yParityAndS != null) {\n assertError((0, index_js_2.isHexString)(yParityAndS, 32), \"invalid yParityAndS\");\n return { v: (0, index_js_2.getBytes)(yParityAndS)[0] & 128 ? 28 : 27 };\n }\n if (yParity != null) {\n switch ((0, index_js_2.getNumber)(yParity, \"sig.yParity\")) {\n case 0:\n return { v: 27 };\n case 1:\n return { v: 28 };\n }\n assertError(false, \"invalid yParity\");\n }\n assertError(false, \"missing v\");\n }(sig.v, sig.yParityAndS, sig.yParity);\n const result = new _Signature(_guard, r2, s4, v2);\n if (networkV) {\n result.#networkV = networkV;\n }\n assertError(sig.yParity == null || (0, index_js_2.getNumber)(sig.yParity, \"sig.yParity\") === result.yParity, \"yParity mismatch\");\n assertError(sig.yParityAndS == null || sig.yParityAndS === result.yParityAndS, \"yParityAndS mismatch\");\n return result;\n }\n };\n exports3.Signature = Signature;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/signing-key.js\n var require_signing_key = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/signing-key.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SigningKey = void 0;\n var secp256k1_1 = require_secp256k12();\n var index_js_1 = require_utils8();\n var signature_js_1 = require_signature3();\n var SigningKey = class _SigningKey {\n #privateKey;\n /**\n * Creates a new **SigningKey** for %%privateKey%%.\n */\n constructor(privateKey) {\n (0, index_js_1.assertArgument)((0, index_js_1.dataLength)(privateKey) === 32, \"invalid private key\", \"privateKey\", \"[REDACTED]\");\n this.#privateKey = (0, index_js_1.hexlify)(privateKey);\n }\n /**\n * The private key.\n */\n get privateKey() {\n return this.#privateKey;\n }\n /**\n * The uncompressed public key.\n *\n * This will always begin with the prefix ``0x04`` and be 132\n * characters long (the ``0x`` prefix and 130 hexadecimal nibbles).\n */\n get publicKey() {\n return _SigningKey.computePublicKey(this.#privateKey);\n }\n /**\n * The compressed public key.\n *\n * This will always begin with either the prefix ``0x02`` or ``0x03``\n * and be 68 characters long (the ``0x`` prefix and 33 hexadecimal\n * nibbles)\n */\n get compressedPublicKey() {\n return _SigningKey.computePublicKey(this.#privateKey, true);\n }\n /**\n * Return the signature of the signed %%digest%%.\n */\n sign(digest) {\n (0, index_js_1.assertArgument)((0, index_js_1.dataLength)(digest) === 32, \"invalid digest length\", \"digest\", digest);\n const sig = secp256k1_1.secp256k1.sign((0, index_js_1.getBytesCopy)(digest), (0, index_js_1.getBytesCopy)(this.#privateKey), {\n lowS: true\n });\n return signature_js_1.Signature.from({\n r: (0, index_js_1.toBeHex)(sig.r, 32),\n s: (0, index_js_1.toBeHex)(sig.s, 32),\n v: sig.recovery ? 28 : 27\n });\n }\n /**\n * Returns the [[link-wiki-ecdh]] shared secret between this\n * private key and the %%other%% key.\n *\n * The %%other%% key may be any type of key, a raw public key,\n * a compressed/uncompressed pubic key or aprivate key.\n *\n * Best practice is usually to use a cryptographic hash on the\n * returned value before using it as a symetric secret.\n *\n * @example:\n * sign1 = new SigningKey(id(\"some-secret-1\"))\n * sign2 = new SigningKey(id(\"some-secret-2\"))\n *\n * // Notice that privA.computeSharedSecret(pubB)...\n * sign1.computeSharedSecret(sign2.publicKey)\n * //_result:\n *\n * // ...is equal to privB.computeSharedSecret(pubA).\n * sign2.computeSharedSecret(sign1.publicKey)\n * //_result:\n */\n computeSharedSecret(other) {\n const pubKey = _SigningKey.computePublicKey(other);\n return (0, index_js_1.hexlify)(secp256k1_1.secp256k1.getSharedSecret((0, index_js_1.getBytesCopy)(this.#privateKey), (0, index_js_1.getBytes)(pubKey), false));\n }\n /**\n * Compute the public key for %%key%%, optionally %%compressed%%.\n *\n * The %%key%% may be any type of key, a raw public key, a\n * compressed/uncompressed public key or private key.\n *\n * @example:\n * sign = new SigningKey(id(\"some-secret\"));\n *\n * // Compute the uncompressed public key for a private key\n * SigningKey.computePublicKey(sign.privateKey)\n * //_result:\n *\n * // Compute the compressed public key for a private key\n * SigningKey.computePublicKey(sign.privateKey, true)\n * //_result:\n *\n * // Compute the uncompressed public key\n * SigningKey.computePublicKey(sign.publicKey, false);\n * //_result:\n *\n * // Compute the Compressed a public key\n * SigningKey.computePublicKey(sign.publicKey, true);\n * //_result:\n */\n static computePublicKey(key, compressed) {\n let bytes = (0, index_js_1.getBytes)(key, \"key\");\n if (bytes.length === 32) {\n const pubKey = secp256k1_1.secp256k1.getPublicKey(bytes, !!compressed);\n return (0, index_js_1.hexlify)(pubKey);\n }\n if (bytes.length === 64) {\n const pub = new Uint8Array(65);\n pub[0] = 4;\n pub.set(bytes, 1);\n bytes = pub;\n }\n const point = secp256k1_1.secp256k1.ProjectivePoint.fromHex(bytes);\n return (0, index_js_1.hexlify)(point.toRawBytes(compressed));\n }\n /**\n * Returns the public key for the private key which produced the\n * %%signature%% for the given %%digest%%.\n *\n * @example:\n * key = new SigningKey(id(\"some-secret\"))\n * digest = id(\"hello world\")\n * sig = key.sign(digest)\n *\n * // Notice the signer public key...\n * key.publicKey\n * //_result:\n *\n * // ...is equal to the recovered public key\n * SigningKey.recoverPublicKey(digest, sig)\n * //_result:\n *\n */\n static recoverPublicKey(digest, signature) {\n (0, index_js_1.assertArgument)((0, index_js_1.dataLength)(digest) === 32, \"invalid digest length\", \"digest\", digest);\n const sig = signature_js_1.Signature.from(signature);\n let secpSig = secp256k1_1.secp256k1.Signature.fromCompact((0, index_js_1.getBytesCopy)((0, index_js_1.concat)([sig.r, sig.s])));\n secpSig = secpSig.addRecoveryBit(sig.yParity);\n const pubKey = secpSig.recoverPublicKey((0, index_js_1.getBytesCopy)(digest));\n (0, index_js_1.assertArgument)(pubKey != null, \"invalid signature for digest\", \"signature\", signature);\n return \"0x\" + pubKey.toHex(false);\n }\n /**\n * Returns the point resulting from adding the ellipic curve points\n * %%p0%% and %%p1%%.\n *\n * This is not a common function most developers should require, but\n * can be useful for certain privacy-specific techniques.\n *\n * For example, it is used by [[HDNodeWallet]] to compute child\n * addresses from parent public keys and chain codes.\n */\n static addPoints(p0, p1, compressed) {\n const pub0 = secp256k1_1.secp256k1.ProjectivePoint.fromHex(_SigningKey.computePublicKey(p0).substring(2));\n const pub1 = secp256k1_1.secp256k1.ProjectivePoint.fromHex(_SigningKey.computePublicKey(p1).substring(2));\n return \"0x\" + pub0.add(pub1).toHex(!!compressed);\n }\n };\n exports3.SigningKey = SigningKey;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/index.js\n var require_crypto2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.lock = exports3.Signature = exports3.SigningKey = exports3.scryptSync = exports3.scrypt = exports3.pbkdf2 = exports3.sha512 = exports3.sha256 = exports3.ripemd160 = exports3.keccak256 = exports3.randomBytes = exports3.computeHmac = void 0;\n var hmac_js_1 = require_hmac3();\n Object.defineProperty(exports3, \"computeHmac\", { enumerable: true, get: function() {\n return hmac_js_1.computeHmac;\n } });\n var keccak_js_1 = require_keccak();\n Object.defineProperty(exports3, \"keccak256\", { enumerable: true, get: function() {\n return keccak_js_1.keccak256;\n } });\n var ripemd160_js_1 = require_ripemd1602();\n Object.defineProperty(exports3, \"ripemd160\", { enumerable: true, get: function() {\n return ripemd160_js_1.ripemd160;\n } });\n var pbkdf2_js_1 = require_pbkdf22();\n Object.defineProperty(exports3, \"pbkdf2\", { enumerable: true, get: function() {\n return pbkdf2_js_1.pbkdf2;\n } });\n var random_js_1 = require_random();\n Object.defineProperty(exports3, \"randomBytes\", { enumerable: true, get: function() {\n return random_js_1.randomBytes;\n } });\n var scrypt_js_1 = require_scrypt3();\n Object.defineProperty(exports3, \"scrypt\", { enumerable: true, get: function() {\n return scrypt_js_1.scrypt;\n } });\n Object.defineProperty(exports3, \"scryptSync\", { enumerable: true, get: function() {\n return scrypt_js_1.scryptSync;\n } });\n var sha2_js_1 = require_sha22();\n Object.defineProperty(exports3, \"sha256\", { enumerable: true, get: function() {\n return sha2_js_1.sha256;\n } });\n Object.defineProperty(exports3, \"sha512\", { enumerable: true, get: function() {\n return sha2_js_1.sha512;\n } });\n var signing_key_js_1 = require_signing_key();\n Object.defineProperty(exports3, \"SigningKey\", { enumerable: true, get: function() {\n return signing_key_js_1.SigningKey;\n } });\n var signature_js_1 = require_signature3();\n Object.defineProperty(exports3, \"Signature\", { enumerable: true, get: function() {\n return signature_js_1.Signature;\n } });\n function lock() {\n hmac_js_1.computeHmac.lock();\n keccak_js_1.keccak256.lock();\n pbkdf2_js_1.pbkdf2.lock();\n random_js_1.randomBytes.lock();\n ripemd160_js_1.ripemd160.lock();\n scrypt_js_1.scrypt.lock();\n scrypt_js_1.scryptSync.lock();\n sha2_js_1.sha256.lock();\n sha2_js_1.sha512.lock();\n random_js_1.randomBytes.lock();\n }\n exports3.lock = lock;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/address.js\n var require_address2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getIcapAddress = exports3.getAddress = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils8();\n var BN_0 = BigInt(0);\n var BN_36 = BigInt(36);\n function getChecksumAddress(address) {\n address = address.toLowerCase();\n const chars = address.substring(2).split(\"\");\n const expanded = new Uint8Array(40);\n for (let i3 = 0; i3 < 40; i3++) {\n expanded[i3] = chars[i3].charCodeAt(0);\n }\n const hashed = (0, index_js_2.getBytes)((0, index_js_1.keccak256)(expanded));\n for (let i3 = 0; i3 < 40; i3 += 2) {\n if (hashed[i3 >> 1] >> 4 >= 8) {\n chars[i3] = chars[i3].toUpperCase();\n }\n if ((hashed[i3 >> 1] & 15) >= 8) {\n chars[i3 + 1] = chars[i3 + 1].toUpperCase();\n }\n }\n return \"0x\" + chars.join(\"\");\n }\n var ibanLookup = {};\n for (let i3 = 0; i3 < 10; i3++) {\n ibanLookup[String(i3)] = String(i3);\n }\n for (let i3 = 0; i3 < 26; i3++) {\n ibanLookup[String.fromCharCode(65 + i3)] = String(10 + i3);\n }\n var safeDigits = 15;\n function ibanChecksum(address) {\n address = address.toUpperCase();\n address = address.substring(4) + address.substring(0, 2) + \"00\";\n let expanded = address.split(\"\").map((c4) => {\n return ibanLookup[c4];\n }).join(\"\");\n while (expanded.length >= safeDigits) {\n let block = expanded.substring(0, safeDigits);\n expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);\n }\n let checksum4 = String(98 - parseInt(expanded, 10) % 97);\n while (checksum4.length < 2) {\n checksum4 = \"0\" + checksum4;\n }\n return checksum4;\n }\n var Base36 = function() {\n ;\n const result = {};\n for (let i3 = 0; i3 < 36; i3++) {\n const key = \"0123456789abcdefghijklmnopqrstuvwxyz\"[i3];\n result[key] = BigInt(i3);\n }\n return result;\n }();\n function fromBase36(value) {\n value = value.toLowerCase();\n let result = BN_0;\n for (let i3 = 0; i3 < value.length; i3++) {\n result = result * BN_36 + Base36[value[i3]];\n }\n return result;\n }\n function getAddress3(address) {\n (0, index_js_2.assertArgument)(typeof address === \"string\", \"invalid address\", \"address\", address);\n if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {\n if (!address.startsWith(\"0x\")) {\n address = \"0x\" + address;\n }\n const result = getChecksumAddress(address);\n (0, index_js_2.assertArgument)(!address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) || result === address, \"bad address checksum\", \"address\", address);\n return result;\n }\n if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {\n (0, index_js_2.assertArgument)(address.substring(2, 4) === ibanChecksum(address), \"bad icap checksum\", \"address\", address);\n let result = fromBase36(address.substring(4)).toString(16);\n while (result.length < 40) {\n result = \"0\" + result;\n }\n return getChecksumAddress(\"0x\" + result);\n }\n (0, index_js_2.assertArgument)(false, \"invalid address\", \"address\", address);\n }\n exports3.getAddress = getAddress3;\n function getIcapAddress(address) {\n let base36 = BigInt(getAddress3(address)).toString(36).toUpperCase();\n while (base36.length < 30) {\n base36 = \"0\" + base36;\n }\n return \"XE\" + ibanChecksum(\"XE00\" + base36) + base36;\n }\n exports3.getIcapAddress = getIcapAddress;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/contract-address.js\n var require_contract_address = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/contract-address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getCreate2Address = exports3.getCreateAddress = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils8();\n var address_js_1 = require_address2();\n function getCreateAddress2(tx) {\n const from14 = (0, address_js_1.getAddress)(tx.from);\n const nonce = (0, index_js_2.getBigInt)(tx.nonce, \"tx.nonce\");\n let nonceHex = nonce.toString(16);\n if (nonceHex === \"0\") {\n nonceHex = \"0x\";\n } else if (nonceHex.length % 2) {\n nonceHex = \"0x0\" + nonceHex;\n } else {\n nonceHex = \"0x\" + nonceHex;\n }\n return (0, address_js_1.getAddress)((0, index_js_2.dataSlice)((0, index_js_1.keccak256)((0, index_js_2.encodeRlp)([from14, nonceHex])), 12));\n }\n exports3.getCreateAddress = getCreateAddress2;\n function getCreate2Address2(_from, _salt, _initCodeHash) {\n const from14 = (0, address_js_1.getAddress)(_from);\n const salt = (0, index_js_2.getBytes)(_salt, \"salt\");\n const initCodeHash = (0, index_js_2.getBytes)(_initCodeHash, \"initCodeHash\");\n (0, index_js_2.assertArgument)(salt.length === 32, \"salt must be 32 bytes\", \"salt\", _salt);\n (0, index_js_2.assertArgument)(initCodeHash.length === 32, \"initCodeHash must be 32 bytes\", \"initCodeHash\", _initCodeHash);\n return (0, address_js_1.getAddress)((0, index_js_2.dataSlice)((0, index_js_1.keccak256)((0, index_js_2.concat)([\"0xff\", from14, salt, initCodeHash])), 12));\n }\n exports3.getCreate2Address = getCreate2Address2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/checks.js\n var require_checks = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/checks.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.resolveAddress = exports3.isAddress = exports3.isAddressable = void 0;\n var index_js_1 = require_utils8();\n var address_js_1 = require_address2();\n function isAddressable(value) {\n return value && typeof value.getAddress === \"function\";\n }\n exports3.isAddressable = isAddressable;\n function isAddress2(value) {\n try {\n (0, address_js_1.getAddress)(value);\n return true;\n } catch (error) {\n }\n return false;\n }\n exports3.isAddress = isAddress2;\n async function checkAddress(target, promise) {\n const result = await promise;\n if (result == null || result === \"0x0000000000000000000000000000000000000000\") {\n (0, index_js_1.assert)(typeof target !== \"string\", \"unconfigured name\", \"UNCONFIGURED_NAME\", { value: target });\n (0, index_js_1.assertArgument)(false, \"invalid AddressLike value; did not resolve to a value address\", \"target\", target);\n }\n return (0, address_js_1.getAddress)(result);\n }\n function resolveAddress(target, resolver) {\n if (typeof target === \"string\") {\n if (target.match(/^0x[0-9a-f]{40}$/i)) {\n return (0, address_js_1.getAddress)(target);\n }\n (0, index_js_1.assert)(resolver != null, \"ENS resolution requires a provider\", \"UNSUPPORTED_OPERATION\", { operation: \"resolveName\" });\n return checkAddress(target, resolver.resolveName(target));\n } else if (isAddressable(target)) {\n return checkAddress(target, target.getAddress());\n } else if (target && typeof target.then === \"function\") {\n return checkAddress(target, target);\n }\n (0, index_js_1.assertArgument)(false, \"unsupported addressable value\", \"target\", target);\n }\n exports3.resolveAddress = resolveAddress;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/index.js\n var require_address3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.resolveAddress = exports3.isAddress = exports3.isAddressable = exports3.getCreate2Address = exports3.getCreateAddress = exports3.getIcapAddress = exports3.getAddress = void 0;\n var address_js_1 = require_address2();\n Object.defineProperty(exports3, \"getAddress\", { enumerable: true, get: function() {\n return address_js_1.getAddress;\n } });\n Object.defineProperty(exports3, \"getIcapAddress\", { enumerable: true, get: function() {\n return address_js_1.getIcapAddress;\n } });\n var contract_address_js_1 = require_contract_address();\n Object.defineProperty(exports3, \"getCreateAddress\", { enumerable: true, get: function() {\n return contract_address_js_1.getCreateAddress;\n } });\n Object.defineProperty(exports3, \"getCreate2Address\", { enumerable: true, get: function() {\n return contract_address_js_1.getCreate2Address;\n } });\n var checks_js_1 = require_checks();\n Object.defineProperty(exports3, \"isAddressable\", { enumerable: true, get: function() {\n return checks_js_1.isAddressable;\n } });\n Object.defineProperty(exports3, \"isAddress\", { enumerable: true, get: function() {\n return checks_js_1.isAddress;\n } });\n Object.defineProperty(exports3, \"resolveAddress\", { enumerable: true, get: function() {\n return checks_js_1.resolveAddress;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/typed.js\n var require_typed = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/typed.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Typed = void 0;\n var index_js_1 = require_utils8();\n var _gaurd = {};\n function n2(value, width) {\n let signed = false;\n if (width < 0) {\n signed = true;\n width *= -1;\n }\n return new Typed(_gaurd, `${signed ? \"\" : \"u\"}int${width}`, value, { signed, width });\n }\n function b4(value, size6) {\n return new Typed(_gaurd, `bytes${size6 ? size6 : \"\"}`, value, { size: size6 });\n }\n var _typedSymbol = Symbol.for(\"_ethers_typed\");\n var Typed = class _Typed {\n /**\n * The type, as a Solidity-compatible type.\n */\n type;\n /**\n * The actual value.\n */\n value;\n #options;\n /**\n * @_ignore:\n */\n _typedSymbol;\n /**\n * @_ignore:\n */\n constructor(gaurd, type, value, options) {\n if (options == null) {\n options = null;\n }\n (0, index_js_1.assertPrivate)(_gaurd, gaurd, \"Typed\");\n (0, index_js_1.defineProperties)(this, { _typedSymbol, type, value });\n this.#options = options;\n this.format();\n }\n /**\n * Format the type as a Human-Readable type.\n */\n format() {\n if (this.type === \"array\") {\n throw new Error(\"\");\n } else if (this.type === \"dynamicArray\") {\n throw new Error(\"\");\n } else if (this.type === \"tuple\") {\n return `tuple(${this.value.map((v2) => v2.format()).join(\",\")})`;\n }\n return this.type;\n }\n /**\n * The default value returned by this type.\n */\n defaultValue() {\n return 0;\n }\n /**\n * The minimum value for numeric types.\n */\n minValue() {\n return 0;\n }\n /**\n * The maximum value for numeric types.\n */\n maxValue() {\n return 0;\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedBigInt]].\n */\n isBigInt() {\n return !!this.type.match(/^u?int[0-9]+$/);\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedData]].\n */\n isData() {\n return this.type.startsWith(\"bytes\");\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedString]].\n */\n isString() {\n return this.type === \"string\";\n }\n /**\n * Returns the tuple name, if this is a tuple. Throws otherwise.\n */\n get tupleName() {\n if (this.type !== \"tuple\") {\n throw TypeError(\"not a tuple\");\n }\n return this.#options;\n }\n // Returns the length of this type as an array\n // - `null` indicates the length is unforced, it could be dynamic\n // - `-1` indicates the length is dynamic\n // - any other value indicates it is a static array and is its length\n /**\n * Returns the length of the array type or ``-1`` if it is dynamic.\n *\n * Throws if the type is not an array.\n */\n get arrayLength() {\n if (this.type !== \"array\") {\n throw TypeError(\"not an array\");\n }\n if (this.#options === true) {\n return -1;\n }\n if (this.#options === false) {\n return this.value.length;\n }\n return null;\n }\n /**\n * Returns a new **Typed** of %%type%% with the %%value%%.\n */\n static from(type, value) {\n return new _Typed(_gaurd, type, value);\n }\n /**\n * Return a new ``uint8`` type for %%v%%.\n */\n static uint8(v2) {\n return n2(v2, 8);\n }\n /**\n * Return a new ``uint16`` type for %%v%%.\n */\n static uint16(v2) {\n return n2(v2, 16);\n }\n /**\n * Return a new ``uint24`` type for %%v%%.\n */\n static uint24(v2) {\n return n2(v2, 24);\n }\n /**\n * Return a new ``uint32`` type for %%v%%.\n */\n static uint32(v2) {\n return n2(v2, 32);\n }\n /**\n * Return a new ``uint40`` type for %%v%%.\n */\n static uint40(v2) {\n return n2(v2, 40);\n }\n /**\n * Return a new ``uint48`` type for %%v%%.\n */\n static uint48(v2) {\n return n2(v2, 48);\n }\n /**\n * Return a new ``uint56`` type for %%v%%.\n */\n static uint56(v2) {\n return n2(v2, 56);\n }\n /**\n * Return a new ``uint64`` type for %%v%%.\n */\n static uint64(v2) {\n return n2(v2, 64);\n }\n /**\n * Return a new ``uint72`` type for %%v%%.\n */\n static uint72(v2) {\n return n2(v2, 72);\n }\n /**\n * Return a new ``uint80`` type for %%v%%.\n */\n static uint80(v2) {\n return n2(v2, 80);\n }\n /**\n * Return a new ``uint88`` type for %%v%%.\n */\n static uint88(v2) {\n return n2(v2, 88);\n }\n /**\n * Return a new ``uint96`` type for %%v%%.\n */\n static uint96(v2) {\n return n2(v2, 96);\n }\n /**\n * Return a new ``uint104`` type for %%v%%.\n */\n static uint104(v2) {\n return n2(v2, 104);\n }\n /**\n * Return a new ``uint112`` type for %%v%%.\n */\n static uint112(v2) {\n return n2(v2, 112);\n }\n /**\n * Return a new ``uint120`` type for %%v%%.\n */\n static uint120(v2) {\n return n2(v2, 120);\n }\n /**\n * Return a new ``uint128`` type for %%v%%.\n */\n static uint128(v2) {\n return n2(v2, 128);\n }\n /**\n * Return a new ``uint136`` type for %%v%%.\n */\n static uint136(v2) {\n return n2(v2, 136);\n }\n /**\n * Return a new ``uint144`` type for %%v%%.\n */\n static uint144(v2) {\n return n2(v2, 144);\n }\n /**\n * Return a new ``uint152`` type for %%v%%.\n */\n static uint152(v2) {\n return n2(v2, 152);\n }\n /**\n * Return a new ``uint160`` type for %%v%%.\n */\n static uint160(v2) {\n return n2(v2, 160);\n }\n /**\n * Return a new ``uint168`` type for %%v%%.\n */\n static uint168(v2) {\n return n2(v2, 168);\n }\n /**\n * Return a new ``uint176`` type for %%v%%.\n */\n static uint176(v2) {\n return n2(v2, 176);\n }\n /**\n * Return a new ``uint184`` type for %%v%%.\n */\n static uint184(v2) {\n return n2(v2, 184);\n }\n /**\n * Return a new ``uint192`` type for %%v%%.\n */\n static uint192(v2) {\n return n2(v2, 192);\n }\n /**\n * Return a new ``uint200`` type for %%v%%.\n */\n static uint200(v2) {\n return n2(v2, 200);\n }\n /**\n * Return a new ``uint208`` type for %%v%%.\n */\n static uint208(v2) {\n return n2(v2, 208);\n }\n /**\n * Return a new ``uint216`` type for %%v%%.\n */\n static uint216(v2) {\n return n2(v2, 216);\n }\n /**\n * Return a new ``uint224`` type for %%v%%.\n */\n static uint224(v2) {\n return n2(v2, 224);\n }\n /**\n * Return a new ``uint232`` type for %%v%%.\n */\n static uint232(v2) {\n return n2(v2, 232);\n }\n /**\n * Return a new ``uint240`` type for %%v%%.\n */\n static uint240(v2) {\n return n2(v2, 240);\n }\n /**\n * Return a new ``uint248`` type for %%v%%.\n */\n static uint248(v2) {\n return n2(v2, 248);\n }\n /**\n * Return a new ``uint256`` type for %%v%%.\n */\n static uint256(v2) {\n return n2(v2, 256);\n }\n /**\n * Return a new ``uint256`` type for %%v%%.\n */\n static uint(v2) {\n return n2(v2, 256);\n }\n /**\n * Return a new ``int8`` type for %%v%%.\n */\n static int8(v2) {\n return n2(v2, -8);\n }\n /**\n * Return a new ``int16`` type for %%v%%.\n */\n static int16(v2) {\n return n2(v2, -16);\n }\n /**\n * Return a new ``int24`` type for %%v%%.\n */\n static int24(v2) {\n return n2(v2, -24);\n }\n /**\n * Return a new ``int32`` type for %%v%%.\n */\n static int32(v2) {\n return n2(v2, -32);\n }\n /**\n * Return a new ``int40`` type for %%v%%.\n */\n static int40(v2) {\n return n2(v2, -40);\n }\n /**\n * Return a new ``int48`` type for %%v%%.\n */\n static int48(v2) {\n return n2(v2, -48);\n }\n /**\n * Return a new ``int56`` type for %%v%%.\n */\n static int56(v2) {\n return n2(v2, -56);\n }\n /**\n * Return a new ``int64`` type for %%v%%.\n */\n static int64(v2) {\n return n2(v2, -64);\n }\n /**\n * Return a new ``int72`` type for %%v%%.\n */\n static int72(v2) {\n return n2(v2, -72);\n }\n /**\n * Return a new ``int80`` type for %%v%%.\n */\n static int80(v2) {\n return n2(v2, -80);\n }\n /**\n * Return a new ``int88`` type for %%v%%.\n */\n static int88(v2) {\n return n2(v2, -88);\n }\n /**\n * Return a new ``int96`` type for %%v%%.\n */\n static int96(v2) {\n return n2(v2, -96);\n }\n /**\n * Return a new ``int104`` type for %%v%%.\n */\n static int104(v2) {\n return n2(v2, -104);\n }\n /**\n * Return a new ``int112`` type for %%v%%.\n */\n static int112(v2) {\n return n2(v2, -112);\n }\n /**\n * Return a new ``int120`` type for %%v%%.\n */\n static int120(v2) {\n return n2(v2, -120);\n }\n /**\n * Return a new ``int128`` type for %%v%%.\n */\n static int128(v2) {\n return n2(v2, -128);\n }\n /**\n * Return a new ``int136`` type for %%v%%.\n */\n static int136(v2) {\n return n2(v2, -136);\n }\n /**\n * Return a new ``int144`` type for %%v%%.\n */\n static int144(v2) {\n return n2(v2, -144);\n }\n /**\n * Return a new ``int52`` type for %%v%%.\n */\n static int152(v2) {\n return n2(v2, -152);\n }\n /**\n * Return a new ``int160`` type for %%v%%.\n */\n static int160(v2) {\n return n2(v2, -160);\n }\n /**\n * Return a new ``int168`` type for %%v%%.\n */\n static int168(v2) {\n return n2(v2, -168);\n }\n /**\n * Return a new ``int176`` type for %%v%%.\n */\n static int176(v2) {\n return n2(v2, -176);\n }\n /**\n * Return a new ``int184`` type for %%v%%.\n */\n static int184(v2) {\n return n2(v2, -184);\n }\n /**\n * Return a new ``int92`` type for %%v%%.\n */\n static int192(v2) {\n return n2(v2, -192);\n }\n /**\n * Return a new ``int200`` type for %%v%%.\n */\n static int200(v2) {\n return n2(v2, -200);\n }\n /**\n * Return a new ``int208`` type for %%v%%.\n */\n static int208(v2) {\n return n2(v2, -208);\n }\n /**\n * Return a new ``int216`` type for %%v%%.\n */\n static int216(v2) {\n return n2(v2, -216);\n }\n /**\n * Return a new ``int224`` type for %%v%%.\n */\n static int224(v2) {\n return n2(v2, -224);\n }\n /**\n * Return a new ``int232`` type for %%v%%.\n */\n static int232(v2) {\n return n2(v2, -232);\n }\n /**\n * Return a new ``int240`` type for %%v%%.\n */\n static int240(v2) {\n return n2(v2, -240);\n }\n /**\n * Return a new ``int248`` type for %%v%%.\n */\n static int248(v2) {\n return n2(v2, -248);\n }\n /**\n * Return a new ``int256`` type for %%v%%.\n */\n static int256(v2) {\n return n2(v2, -256);\n }\n /**\n * Return a new ``int256`` type for %%v%%.\n */\n static int(v2) {\n return n2(v2, -256);\n }\n /**\n * Return a new ``bytes1`` type for %%v%%.\n */\n static bytes1(v2) {\n return b4(v2, 1);\n }\n /**\n * Return a new ``bytes2`` type for %%v%%.\n */\n static bytes2(v2) {\n return b4(v2, 2);\n }\n /**\n * Return a new ``bytes3`` type for %%v%%.\n */\n static bytes3(v2) {\n return b4(v2, 3);\n }\n /**\n * Return a new ``bytes4`` type for %%v%%.\n */\n static bytes4(v2) {\n return b4(v2, 4);\n }\n /**\n * Return a new ``bytes5`` type for %%v%%.\n */\n static bytes5(v2) {\n return b4(v2, 5);\n }\n /**\n * Return a new ``bytes6`` type for %%v%%.\n */\n static bytes6(v2) {\n return b4(v2, 6);\n }\n /**\n * Return a new ``bytes7`` type for %%v%%.\n */\n static bytes7(v2) {\n return b4(v2, 7);\n }\n /**\n * Return a new ``bytes8`` type for %%v%%.\n */\n static bytes8(v2) {\n return b4(v2, 8);\n }\n /**\n * Return a new ``bytes9`` type for %%v%%.\n */\n static bytes9(v2) {\n return b4(v2, 9);\n }\n /**\n * Return a new ``bytes10`` type for %%v%%.\n */\n static bytes10(v2) {\n return b4(v2, 10);\n }\n /**\n * Return a new ``bytes11`` type for %%v%%.\n */\n static bytes11(v2) {\n return b4(v2, 11);\n }\n /**\n * Return a new ``bytes12`` type for %%v%%.\n */\n static bytes12(v2) {\n return b4(v2, 12);\n }\n /**\n * Return a new ``bytes13`` type for %%v%%.\n */\n static bytes13(v2) {\n return b4(v2, 13);\n }\n /**\n * Return a new ``bytes14`` type for %%v%%.\n */\n static bytes14(v2) {\n return b4(v2, 14);\n }\n /**\n * Return a new ``bytes15`` type for %%v%%.\n */\n static bytes15(v2) {\n return b4(v2, 15);\n }\n /**\n * Return a new ``bytes16`` type for %%v%%.\n */\n static bytes16(v2) {\n return b4(v2, 16);\n }\n /**\n * Return a new ``bytes17`` type for %%v%%.\n */\n static bytes17(v2) {\n return b4(v2, 17);\n }\n /**\n * Return a new ``bytes18`` type for %%v%%.\n */\n static bytes18(v2) {\n return b4(v2, 18);\n }\n /**\n * Return a new ``bytes19`` type for %%v%%.\n */\n static bytes19(v2) {\n return b4(v2, 19);\n }\n /**\n * Return a new ``bytes20`` type for %%v%%.\n */\n static bytes20(v2) {\n return b4(v2, 20);\n }\n /**\n * Return a new ``bytes21`` type for %%v%%.\n */\n static bytes21(v2) {\n return b4(v2, 21);\n }\n /**\n * Return a new ``bytes22`` type for %%v%%.\n */\n static bytes22(v2) {\n return b4(v2, 22);\n }\n /**\n * Return a new ``bytes23`` type for %%v%%.\n */\n static bytes23(v2) {\n return b4(v2, 23);\n }\n /**\n * Return a new ``bytes24`` type for %%v%%.\n */\n static bytes24(v2) {\n return b4(v2, 24);\n }\n /**\n * Return a new ``bytes25`` type for %%v%%.\n */\n static bytes25(v2) {\n return b4(v2, 25);\n }\n /**\n * Return a new ``bytes26`` type for %%v%%.\n */\n static bytes26(v2) {\n return b4(v2, 26);\n }\n /**\n * Return a new ``bytes27`` type for %%v%%.\n */\n static bytes27(v2) {\n return b4(v2, 27);\n }\n /**\n * Return a new ``bytes28`` type for %%v%%.\n */\n static bytes28(v2) {\n return b4(v2, 28);\n }\n /**\n * Return a new ``bytes29`` type for %%v%%.\n */\n static bytes29(v2) {\n return b4(v2, 29);\n }\n /**\n * Return a new ``bytes30`` type for %%v%%.\n */\n static bytes30(v2) {\n return b4(v2, 30);\n }\n /**\n * Return a new ``bytes31`` type for %%v%%.\n */\n static bytes31(v2) {\n return b4(v2, 31);\n }\n /**\n * Return a new ``bytes32`` type for %%v%%.\n */\n static bytes32(v2) {\n return b4(v2, 32);\n }\n /**\n * Return a new ``address`` type for %%v%%.\n */\n static address(v2) {\n return new _Typed(_gaurd, \"address\", v2);\n }\n /**\n * Return a new ``bool`` type for %%v%%.\n */\n static bool(v2) {\n return new _Typed(_gaurd, \"bool\", !!v2);\n }\n /**\n * Return a new ``bytes`` type for %%v%%.\n */\n static bytes(v2) {\n return new _Typed(_gaurd, \"bytes\", v2);\n }\n /**\n * Return a new ``string`` type for %%v%%.\n */\n static string(v2) {\n return new _Typed(_gaurd, \"string\", v2);\n }\n /**\n * Return a new ``array`` type for %%v%%, allowing %%dynamic%% length.\n */\n static array(v2, dynamic) {\n throw new Error(\"not implemented yet\");\n return new _Typed(_gaurd, \"array\", v2, dynamic);\n }\n /**\n * Return a new ``tuple`` type for %%v%%, with the optional %%name%%.\n */\n static tuple(v2, name) {\n throw new Error(\"not implemented yet\");\n return new _Typed(_gaurd, \"tuple\", v2, name);\n }\n /**\n * Return a new ``uint8`` type for %%v%%.\n */\n static overrides(v2) {\n return new _Typed(_gaurd, \"overrides\", Object.assign({}, v2));\n }\n /**\n * Returns true only if %%value%% is a [[Typed]] instance.\n */\n static isTyped(value) {\n return value && typeof value === \"object\" && \"_typedSymbol\" in value && value._typedSymbol === _typedSymbol;\n }\n /**\n * If the value is a [[Typed]] instance, validates the underlying value\n * and returns it, otherwise returns value directly.\n *\n * This is useful for functions that with to accept either a [[Typed]]\n * object or values.\n */\n static dereference(value, type) {\n if (_Typed.isTyped(value)) {\n if (value.type !== type) {\n throw new Error(`invalid type: expecetd ${type}, got ${value.type}`);\n }\n return value.value;\n }\n return value;\n }\n };\n exports3.Typed = Typed;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/address.js\n var require_address4 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AddressCoder = void 0;\n var index_js_1 = require_address3();\n var maths_js_1 = require_maths();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var AddressCoder = class extends abstract_coder_js_1.Coder {\n constructor(localName) {\n super(\"address\", \"address\", localName, false);\n }\n defaultValue() {\n return \"0x0000000000000000000000000000000000000000\";\n }\n encode(writer, _value) {\n let value = typed_js_1.Typed.dereference(_value, \"string\");\n try {\n value = (0, index_js_1.getAddress)(value);\n } catch (error) {\n return this._throwError(error.message, _value);\n }\n return writer.writeValue(value);\n }\n decode(reader) {\n return (0, index_js_1.getAddress)((0, maths_js_1.toBeHex)(reader.readValue(), 20));\n }\n };\n exports3.AddressCoder = AddressCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/anonymous.js\n var require_anonymous2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/anonymous.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AnonymousCoder = void 0;\n var abstract_coder_js_1 = require_abstract_coder2();\n var AnonymousCoder = class extends abstract_coder_js_1.Coder {\n coder;\n constructor(coder) {\n super(coder.name, coder.type, \"_\", coder.dynamic);\n this.coder = coder;\n }\n defaultValue() {\n return this.coder.defaultValue();\n }\n encode(writer, value) {\n return this.coder.encode(writer, value);\n }\n decode(reader) {\n return this.coder.decode(reader);\n }\n };\n exports3.AnonymousCoder = AnonymousCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/array.js\n var require_array2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/array.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ArrayCoder = exports3.unpack = exports3.pack = void 0;\n var index_js_1 = require_utils8();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var anonymous_js_1 = require_anonymous2();\n function pack(writer, coders, values) {\n let arrayValues = [];\n if (Array.isArray(values)) {\n arrayValues = values;\n } else if (values && typeof values === \"object\") {\n let unique = {};\n arrayValues = coders.map((coder) => {\n const name = coder.localName;\n (0, index_js_1.assert)(name, \"cannot encode object for signature with missing names\", \"INVALID_ARGUMENT\", { argument: \"values\", info: { coder }, value: values });\n (0, index_js_1.assert)(!unique[name], \"cannot encode object for signature with duplicate names\", \"INVALID_ARGUMENT\", { argument: \"values\", info: { coder }, value: values });\n unique[name] = true;\n return values[name];\n });\n } else {\n (0, index_js_1.assertArgument)(false, \"invalid tuple value\", \"tuple\", values);\n }\n (0, index_js_1.assertArgument)(coders.length === arrayValues.length, \"types/value length mismatch\", \"tuple\", values);\n let staticWriter = new abstract_coder_js_1.Writer();\n let dynamicWriter = new abstract_coder_js_1.Writer();\n let updateFuncs = [];\n coders.forEach((coder, index2) => {\n let value = arrayValues[index2];\n if (coder.dynamic) {\n let dynamicOffset = dynamicWriter.length;\n coder.encode(dynamicWriter, value);\n let updateFunc = staticWriter.writeUpdatableValue();\n updateFuncs.push((baseOffset) => {\n updateFunc(baseOffset + dynamicOffset);\n });\n } else {\n coder.encode(staticWriter, value);\n }\n });\n updateFuncs.forEach((func) => {\n func(staticWriter.length);\n });\n let length = writer.appendWriter(staticWriter);\n length += writer.appendWriter(dynamicWriter);\n return length;\n }\n exports3.pack = pack;\n function unpack(reader, coders) {\n let values = [];\n let keys = [];\n let baseReader = reader.subReader(0);\n coders.forEach((coder) => {\n let value = null;\n if (coder.dynamic) {\n let offset = reader.readIndex();\n let offsetReader = baseReader.subReader(offset);\n try {\n value = coder.decode(offsetReader);\n } catch (error) {\n if ((0, index_js_1.isError)(error, \"BUFFER_OVERRUN\")) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n } else {\n try {\n value = coder.decode(reader);\n } catch (error) {\n if ((0, index_js_1.isError)(error, \"BUFFER_OVERRUN\")) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n }\n if (value == void 0) {\n throw new Error(\"investigate\");\n }\n values.push(value);\n keys.push(coder.localName || null);\n });\n return abstract_coder_js_1.Result.fromItems(values, keys);\n }\n exports3.unpack = unpack;\n var ArrayCoder = class extends abstract_coder_js_1.Coder {\n coder;\n length;\n constructor(coder, length, localName) {\n const type = coder.type + \"[\" + (length >= 0 ? length : \"\") + \"]\";\n const dynamic = length === -1 || coder.dynamic;\n super(\"array\", type, localName, dynamic);\n (0, index_js_1.defineProperties)(this, { coder, length });\n }\n defaultValue() {\n const defaultChild = this.coder.defaultValue();\n const result = [];\n for (let i3 = 0; i3 < this.length; i3++) {\n result.push(defaultChild);\n }\n return result;\n }\n encode(writer, _value) {\n const value = typed_js_1.Typed.dereference(_value, \"array\");\n if (!Array.isArray(value)) {\n this._throwError(\"expected array value\", value);\n }\n let count = this.length;\n if (count === -1) {\n count = value.length;\n writer.writeValue(value.length);\n }\n (0, index_js_1.assertArgumentCount)(value.length, count, \"coder array\" + (this.localName ? \" \" + this.localName : \"\"));\n let coders = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n coders.push(this.coder);\n }\n return pack(writer, coders, value);\n }\n decode(reader) {\n let count = this.length;\n if (count === -1) {\n count = reader.readIndex();\n (0, index_js_1.assert)(count * abstract_coder_js_1.WordSize <= reader.dataLength, \"insufficient data length\", \"BUFFER_OVERRUN\", { buffer: reader.bytes, offset: count * abstract_coder_js_1.WordSize, length: reader.dataLength });\n }\n let coders = [];\n for (let i3 = 0; i3 < count; i3++) {\n coders.push(new anonymous_js_1.AnonymousCoder(this.coder));\n }\n return unpack(reader, coders);\n }\n };\n exports3.ArrayCoder = ArrayCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/boolean.js\n var require_boolean2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/boolean.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BooleanCoder = void 0;\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var BooleanCoder = class extends abstract_coder_js_1.Coder {\n constructor(localName) {\n super(\"bool\", \"bool\", localName, false);\n }\n defaultValue() {\n return false;\n }\n encode(writer, _value) {\n const value = typed_js_1.Typed.dereference(_value, \"bool\");\n return writer.writeValue(value ? 1 : 0);\n }\n decode(reader) {\n return !!reader.readValue();\n }\n };\n exports3.BooleanCoder = BooleanCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/bytes.js\n var require_bytes2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/bytes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BytesCoder = exports3.DynamicBytesCoder = void 0;\n var index_js_1 = require_utils8();\n var abstract_coder_js_1 = require_abstract_coder2();\n var DynamicBytesCoder = class extends abstract_coder_js_1.Coder {\n constructor(type, localName) {\n super(type, type, localName, true);\n }\n defaultValue() {\n return \"0x\";\n }\n encode(writer, value) {\n value = (0, index_js_1.getBytesCopy)(value);\n let length = writer.writeValue(value.length);\n length += writer.writeBytes(value);\n return length;\n }\n decode(reader) {\n return reader.readBytes(reader.readIndex(), true);\n }\n };\n exports3.DynamicBytesCoder = DynamicBytesCoder;\n var BytesCoder = class extends DynamicBytesCoder {\n constructor(localName) {\n super(\"bytes\", localName);\n }\n decode(reader) {\n return (0, index_js_1.hexlify)(super.decode(reader));\n }\n };\n exports3.BytesCoder = BytesCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/fixed-bytes.js\n var require_fixed_bytes2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/fixed-bytes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FixedBytesCoder = void 0;\n var index_js_1 = require_utils8();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var FixedBytesCoder = class extends abstract_coder_js_1.Coder {\n size;\n constructor(size6, localName) {\n let name = \"bytes\" + String(size6);\n super(name, name, localName, false);\n (0, index_js_1.defineProperties)(this, { size: size6 }, { size: \"number\" });\n }\n defaultValue() {\n return \"0x0000000000000000000000000000000000000000000000000000000000000000\".substring(0, 2 + this.size * 2);\n }\n encode(writer, _value) {\n let data = (0, index_js_1.getBytesCopy)(typed_js_1.Typed.dereference(_value, this.type));\n if (data.length !== this.size) {\n this._throwError(\"incorrect data length\", _value);\n }\n return writer.writeBytes(data);\n }\n decode(reader) {\n return (0, index_js_1.hexlify)(reader.readBytes(this.size));\n }\n };\n exports3.FixedBytesCoder = FixedBytesCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/null.js\n var require_null2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/null.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NullCoder = void 0;\n var abstract_coder_js_1 = require_abstract_coder2();\n var Empty = new Uint8Array([]);\n var NullCoder = class extends abstract_coder_js_1.Coder {\n constructor(localName) {\n super(\"null\", \"\", localName, false);\n }\n defaultValue() {\n return null;\n }\n encode(writer, value) {\n if (value != null) {\n this._throwError(\"not null\", value);\n }\n return writer.writeBytes(Empty);\n }\n decode(reader) {\n reader.readBytes(0);\n return null;\n }\n };\n exports3.NullCoder = NullCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/number.js\n var require_number2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/number.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NumberCoder = void 0;\n var index_js_1 = require_utils8();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var BN_MAX_UINT256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n var NumberCoder = class extends abstract_coder_js_1.Coder {\n size;\n signed;\n constructor(size6, signed, localName) {\n const name = (signed ? \"int\" : \"uint\") + size6 * 8;\n super(name, name, localName, false);\n (0, index_js_1.defineProperties)(this, { size: size6, signed }, { size: \"number\", signed: \"boolean\" });\n }\n defaultValue() {\n return 0;\n }\n encode(writer, _value) {\n let value = (0, index_js_1.getBigInt)(typed_js_1.Typed.dereference(_value, this.type));\n let maxUintValue = (0, index_js_1.mask)(BN_MAX_UINT256, abstract_coder_js_1.WordSize * 8);\n if (this.signed) {\n let bounds = (0, index_js_1.mask)(maxUintValue, this.size * 8 - 1);\n if (value > bounds || value < -(bounds + BN_1)) {\n this._throwError(\"value out-of-bounds\", _value);\n }\n value = (0, index_js_1.toTwos)(value, 8 * abstract_coder_js_1.WordSize);\n } else if (value < BN_0 || value > (0, index_js_1.mask)(maxUintValue, this.size * 8)) {\n this._throwError(\"value out-of-bounds\", _value);\n }\n return writer.writeValue(value);\n }\n decode(reader) {\n let value = (0, index_js_1.mask)(reader.readValue(), this.size * 8);\n if (this.signed) {\n value = (0, index_js_1.fromTwos)(value, this.size * 8);\n }\n return value;\n }\n };\n exports3.NumberCoder = NumberCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/string.js\n var require_string2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/string.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.StringCoder = void 0;\n var utf8_js_1 = require_utf82();\n var typed_js_1 = require_typed();\n var bytes_js_1 = require_bytes2();\n var StringCoder = class extends bytes_js_1.DynamicBytesCoder {\n constructor(localName) {\n super(\"string\", localName);\n }\n defaultValue() {\n return \"\";\n }\n encode(writer, _value) {\n return super.encode(writer, (0, utf8_js_1.toUtf8Bytes)(typed_js_1.Typed.dereference(_value, \"string\")));\n }\n decode(reader) {\n return (0, utf8_js_1.toUtf8String)(super.decode(reader));\n }\n };\n exports3.StringCoder = StringCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/tuple.js\n var require_tuple2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/tuple.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TupleCoder = void 0;\n var properties_js_1 = require_properties();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var array_js_1 = require_array2();\n var TupleCoder = class extends abstract_coder_js_1.Coder {\n coders;\n constructor(coders, localName) {\n let dynamic = false;\n const types = [];\n coders.forEach((coder) => {\n if (coder.dynamic) {\n dynamic = true;\n }\n types.push(coder.type);\n });\n const type = \"tuple(\" + types.join(\",\") + \")\";\n super(\"tuple\", type, localName, dynamic);\n (0, properties_js_1.defineProperties)(this, { coders: Object.freeze(coders.slice()) });\n }\n defaultValue() {\n const values = [];\n this.coders.forEach((coder) => {\n values.push(coder.defaultValue());\n });\n const uniqueNames = this.coders.reduce((accum, coder) => {\n const name = coder.localName;\n if (name) {\n if (!accum[name]) {\n accum[name] = 0;\n }\n accum[name]++;\n }\n return accum;\n }, {});\n this.coders.forEach((coder, index2) => {\n let name = coder.localName;\n if (!name || uniqueNames[name] !== 1) {\n return;\n }\n if (name === \"length\") {\n name = \"_length\";\n }\n if (values[name] != null) {\n return;\n }\n values[name] = values[index2];\n });\n return Object.freeze(values);\n }\n encode(writer, _value) {\n const value = typed_js_1.Typed.dereference(_value, \"tuple\");\n return (0, array_js_1.pack)(writer, this.coders, value);\n }\n decode(reader) {\n return (0, array_js_1.unpack)(reader, this.coders);\n }\n };\n exports3.TupleCoder = TupleCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/accesslist.js\n var require_accesslist = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/accesslist.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.accessListify = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_utils8();\n function accessSetify(addr, storageKeys) {\n return {\n address: (0, index_js_1.getAddress)(addr),\n storageKeys: storageKeys.map((storageKey, index2) => {\n (0, index_js_2.assertArgument)((0, index_js_2.isHexString)(storageKey, 32), \"invalid slot\", `storageKeys[${index2}]`, storageKey);\n return storageKey.toLowerCase();\n })\n };\n }\n function accessListify(value) {\n if (Array.isArray(value)) {\n return value.map((set, index2) => {\n if (Array.isArray(set)) {\n (0, index_js_2.assertArgument)(set.length === 2, \"invalid slot set\", `value[${index2}]`, set);\n return accessSetify(set[0], set[1]);\n }\n (0, index_js_2.assertArgument)(set != null && typeof set === \"object\", \"invalid address-slot set\", \"value\", value);\n return accessSetify(set.address, set.storageKeys);\n });\n }\n (0, index_js_2.assertArgument)(value != null && typeof value === \"object\", \"invalid access list\", \"value\", value);\n const result = Object.keys(value).map((addr) => {\n const storageKeys = value[addr].reduce((accum, storageKey) => {\n accum[storageKey] = true;\n return accum;\n }, {});\n return accessSetify(addr, Object.keys(storageKeys).sort());\n });\n result.sort((a3, b4) => a3.address.localeCompare(b4.address));\n return result;\n }\n exports3.accessListify = accessListify;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/authorization.js\n var require_authorization = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/authorization.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.authorizationify = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_utils8();\n function authorizationify(auth) {\n return {\n address: (0, index_js_1.getAddress)(auth.address),\n nonce: (0, index_js_3.getBigInt)(auth.nonce != null ? auth.nonce : 0),\n chainId: (0, index_js_3.getBigInt)(auth.chainId != null ? auth.chainId : 0),\n signature: index_js_2.Signature.from(auth.signature)\n };\n }\n exports3.authorizationify = authorizationify;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/address.js\n var require_address5 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.recoverAddress = exports3.computeAddress = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n function computeAddress(key) {\n let pubkey;\n if (typeof key === \"string\") {\n pubkey = index_js_2.SigningKey.computePublicKey(key, false);\n } else {\n pubkey = key.publicKey;\n }\n return (0, index_js_1.getAddress)((0, index_js_2.keccak256)(\"0x\" + pubkey.substring(4)).substring(26));\n }\n exports3.computeAddress = computeAddress;\n function recoverAddress3(digest, signature) {\n return computeAddress(index_js_2.SigningKey.recoverPublicKey(digest, signature));\n }\n exports3.recoverAddress = recoverAddress3;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/transaction.js\n var require_transaction = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/transaction.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Transaction = void 0;\n var index_js_1 = require_address3();\n var addresses_js_1 = require_addresses2();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_utils8();\n var accesslist_js_1 = require_accesslist();\n var authorization_js_1 = require_authorization();\n var address_js_1 = require_address5();\n var BN_0 = BigInt(0);\n var BN_2 = BigInt(2);\n var BN_27 = BigInt(27);\n var BN_28 = BigInt(28);\n var BN_35 = BigInt(35);\n var BN_MAX_UINT = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n var BLOB_SIZE = 4096 * 32;\n function getKzgLibrary(kzg) {\n const blobToKzgCommitment = (blob) => {\n if (\"computeBlobProof\" in kzg) {\n if (\"blobToKzgCommitment\" in kzg && typeof kzg.blobToKzgCommitment === \"function\") {\n return (0, index_js_3.getBytes)(kzg.blobToKzgCommitment((0, index_js_3.hexlify)(blob)));\n }\n } else if (\"blobToKzgCommitment\" in kzg && typeof kzg.blobToKzgCommitment === \"function\") {\n return (0, index_js_3.getBytes)(kzg.blobToKzgCommitment(blob));\n }\n if (\"blobToKZGCommitment\" in kzg && typeof kzg.blobToKZGCommitment === \"function\") {\n return (0, index_js_3.getBytes)(kzg.blobToKZGCommitment((0, index_js_3.hexlify)(blob)));\n }\n (0, index_js_3.assertArgument)(false, \"unsupported KZG library\", \"kzg\", kzg);\n };\n const computeBlobKzgProof = (blob, commitment) => {\n if (\"computeBlobProof\" in kzg && typeof kzg.computeBlobProof === \"function\") {\n return (0, index_js_3.getBytes)(kzg.computeBlobProof((0, index_js_3.hexlify)(blob), (0, index_js_3.hexlify)(commitment)));\n }\n if (\"computeBlobKzgProof\" in kzg && typeof kzg.computeBlobKzgProof === \"function\") {\n return kzg.computeBlobKzgProof(blob, commitment);\n }\n if (\"computeBlobKZGProof\" in kzg && typeof kzg.computeBlobKZGProof === \"function\") {\n return (0, index_js_3.getBytes)(kzg.computeBlobKZGProof((0, index_js_3.hexlify)(blob), (0, index_js_3.hexlify)(commitment)));\n }\n (0, index_js_3.assertArgument)(false, \"unsupported KZG library\", \"kzg\", kzg);\n };\n return { blobToKzgCommitment, computeBlobKzgProof };\n }\n function getVersionedHash(version7, hash3) {\n let versioned = version7.toString(16);\n while (versioned.length < 2) {\n versioned = \"0\" + versioned;\n }\n versioned += (0, index_js_2.sha256)(hash3).substring(4);\n return \"0x\" + versioned;\n }\n function handleAddress(value) {\n if (value === \"0x\") {\n return null;\n }\n return (0, index_js_1.getAddress)(value);\n }\n function handleAccessList(value, param) {\n try {\n return (0, accesslist_js_1.accessListify)(value);\n } catch (error) {\n (0, index_js_3.assertArgument)(false, error.message, param, value);\n }\n }\n function handleAuthorizationList(value, param) {\n try {\n if (!Array.isArray(value)) {\n throw new Error(\"authorizationList: invalid array\");\n }\n const result = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n const auth = value[i3];\n if (!Array.isArray(auth)) {\n throw new Error(`authorization[${i3}]: invalid array`);\n }\n if (auth.length !== 6) {\n throw new Error(`authorization[${i3}]: wrong length`);\n }\n if (!auth[1]) {\n throw new Error(`authorization[${i3}]: null address`);\n }\n result.push({\n address: handleAddress(auth[1]),\n nonce: handleUint(auth[2], \"nonce\"),\n chainId: handleUint(auth[0], \"chainId\"),\n signature: index_js_2.Signature.from({\n yParity: handleNumber(auth[3], \"yParity\"),\n r: (0, index_js_3.zeroPadValue)(auth[4], 32),\n s: (0, index_js_3.zeroPadValue)(auth[5], 32)\n })\n });\n }\n return result;\n } catch (error) {\n (0, index_js_3.assertArgument)(false, error.message, param, value);\n }\n }\n function handleNumber(_value, param) {\n if (_value === \"0x\") {\n return 0;\n }\n return (0, index_js_3.getNumber)(_value, param);\n }\n function handleUint(_value, param) {\n if (_value === \"0x\") {\n return BN_0;\n }\n const value = (0, index_js_3.getBigInt)(_value, param);\n (0, index_js_3.assertArgument)(value <= BN_MAX_UINT, \"value exceeds uint size\", param, value);\n return value;\n }\n function formatNumber(_value, name) {\n const value = (0, index_js_3.getBigInt)(_value, \"value\");\n const result = (0, index_js_3.toBeArray)(value);\n (0, index_js_3.assertArgument)(result.length <= 32, `value too large`, `tx.${name}`, value);\n return result;\n }\n function formatAccessList(value) {\n return (0, accesslist_js_1.accessListify)(value).map((set) => [set.address, set.storageKeys]);\n }\n function formatAuthorizationList3(value) {\n return value.map((a3) => {\n return [\n formatNumber(a3.chainId, \"chainId\"),\n a3.address,\n formatNumber(a3.nonce, \"nonce\"),\n formatNumber(a3.signature.yParity, \"yParity\"),\n (0, index_js_3.toBeArray)(a3.signature.r),\n (0, index_js_3.toBeArray)(a3.signature.s)\n ];\n });\n }\n function formatHashes(value, param) {\n (0, index_js_3.assertArgument)(Array.isArray(value), `invalid ${param}`, \"value\", value);\n for (let i3 = 0; i3 < value.length; i3++) {\n (0, index_js_3.assertArgument)((0, index_js_3.isHexString)(value[i3], 32), \"invalid ${ param } hash\", `value[${i3}]`, value[i3]);\n }\n return value;\n }\n function _parseLegacy(data) {\n const fields = (0, index_js_3.decodeRlp)(data);\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 9 || fields.length === 6), \"invalid field count for legacy transaction\", \"data\", data);\n const tx = {\n type: 0,\n nonce: handleNumber(fields[0], \"nonce\"),\n gasPrice: handleUint(fields[1], \"gasPrice\"),\n gasLimit: handleUint(fields[2], \"gasLimit\"),\n to: handleAddress(fields[3]),\n value: handleUint(fields[4], \"value\"),\n data: (0, index_js_3.hexlify)(fields[5]),\n chainId: BN_0\n };\n if (fields.length === 6) {\n return tx;\n }\n const v2 = handleUint(fields[6], \"v\");\n const r2 = handleUint(fields[7], \"r\");\n const s4 = handleUint(fields[8], \"s\");\n if (r2 === BN_0 && s4 === BN_0) {\n tx.chainId = v2;\n } else {\n let chainId = (v2 - BN_35) / BN_2;\n if (chainId < BN_0) {\n chainId = BN_0;\n }\n tx.chainId = chainId;\n (0, index_js_3.assertArgument)(chainId !== BN_0 || (v2 === BN_27 || v2 === BN_28), \"non-canonical legacy v\", \"v\", fields[6]);\n tx.signature = index_js_2.Signature.from({\n r: (0, index_js_3.zeroPadValue)(fields[7], 32),\n s: (0, index_js_3.zeroPadValue)(fields[8], 32),\n v: v2\n });\n }\n return tx;\n }\n function _serializeLegacy(tx, sig) {\n const fields = [\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.gasPrice || 0, \"gasPrice\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || \"0x\",\n formatNumber(tx.value, \"value\"),\n tx.data\n ];\n let chainId = BN_0;\n if (tx.chainId != BN_0) {\n chainId = (0, index_js_3.getBigInt)(tx.chainId, \"tx.chainId\");\n (0, index_js_3.assertArgument)(!sig || sig.networkV == null || sig.legacyChainId === chainId, \"tx.chainId/sig.v mismatch\", \"sig\", sig);\n } else if (tx.signature) {\n const legacy = tx.signature.legacyChainId;\n if (legacy != null) {\n chainId = legacy;\n }\n }\n if (!sig) {\n if (chainId !== BN_0) {\n fields.push((0, index_js_3.toBeArray)(chainId));\n fields.push(\"0x\");\n fields.push(\"0x\");\n }\n return (0, index_js_3.encodeRlp)(fields);\n }\n let v2 = BigInt(27 + sig.yParity);\n if (chainId !== BN_0) {\n v2 = index_js_2.Signature.getChainIdV(chainId, sig.v);\n } else if (BigInt(sig.v) !== v2) {\n (0, index_js_3.assertArgument)(false, \"tx.chainId/sig.v mismatch\", \"sig\", sig);\n }\n fields.push((0, index_js_3.toBeArray)(v2));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n return (0, index_js_3.encodeRlp)(fields);\n }\n function _parseEipSignature(tx, fields) {\n let yParity;\n try {\n yParity = handleNumber(fields[0], \"yParity\");\n if (yParity !== 0 && yParity !== 1) {\n throw new Error(\"bad yParity\");\n }\n } catch (error) {\n (0, index_js_3.assertArgument)(false, \"invalid yParity\", \"yParity\", fields[0]);\n }\n const r2 = (0, index_js_3.zeroPadValue)(fields[1], 32);\n const s4 = (0, index_js_3.zeroPadValue)(fields[2], 32);\n const signature = index_js_2.Signature.from({ r: r2, s: s4, yParity });\n tx.signature = signature;\n }\n function _parseEip1559(data) {\n const fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 9 || fields.length === 12), \"invalid field count for transaction type: 2\", \"data\", (0, index_js_3.hexlify)(data));\n const tx = {\n type: 2,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n maxPriorityFeePerGas: handleUint(fields[2], \"maxPriorityFeePerGas\"),\n maxFeePerGas: handleUint(fields[3], \"maxFeePerGas\"),\n gasPrice: null,\n gasLimit: handleUint(fields[4], \"gasLimit\"),\n to: handleAddress(fields[5]),\n value: handleUint(fields[6], \"value\"),\n data: (0, index_js_3.hexlify)(fields[7]),\n accessList: handleAccessList(fields[8], \"accessList\")\n };\n if (fields.length === 9) {\n return tx;\n }\n _parseEipSignature(tx, fields.slice(9));\n return tx;\n }\n function _serializeEip1559(tx, sig) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(tx.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || \"0x\",\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || [])\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"yParity\"));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n }\n return (0, index_js_3.concat)([\"0x02\", (0, index_js_3.encodeRlp)(fields)]);\n }\n function _parseEip2930(data) {\n const fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 8 || fields.length === 11), \"invalid field count for transaction type: 1\", \"data\", (0, index_js_3.hexlify)(data));\n const tx = {\n type: 1,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n gasPrice: handleUint(fields[2], \"gasPrice\"),\n gasLimit: handleUint(fields[3], \"gasLimit\"),\n to: handleAddress(fields[4]),\n value: handleUint(fields[5], \"value\"),\n data: (0, index_js_3.hexlify)(fields[6]),\n accessList: handleAccessList(fields[7], \"accessList\")\n };\n if (fields.length === 8) {\n return tx;\n }\n _parseEipSignature(tx, fields.slice(8));\n return tx;\n }\n function _serializeEip2930(tx, sig) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.gasPrice || 0, \"gasPrice\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || \"0x\",\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || [])\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"recoveryParam\"));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n }\n return (0, index_js_3.concat)([\"0x01\", (0, index_js_3.encodeRlp)(fields)]);\n }\n function _parseEip4844(data) {\n let fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));\n let typeName = \"3\";\n let blobs = null;\n if (fields.length === 4 && Array.isArray(fields[0])) {\n typeName = \"3 (network format)\";\n const fBlobs = fields[1], fCommits = fields[2], fProofs = fields[3];\n (0, index_js_3.assertArgument)(Array.isArray(fBlobs), \"invalid network format: blobs not an array\", \"fields[1]\", fBlobs);\n (0, index_js_3.assertArgument)(Array.isArray(fCommits), \"invalid network format: commitments not an array\", \"fields[2]\", fCommits);\n (0, index_js_3.assertArgument)(Array.isArray(fProofs), \"invalid network format: proofs not an array\", \"fields[3]\", fProofs);\n (0, index_js_3.assertArgument)(fBlobs.length === fCommits.length, \"invalid network format: blobs/commitments length mismatch\", \"fields\", fields);\n (0, index_js_3.assertArgument)(fBlobs.length === fProofs.length, \"invalid network format: blobs/proofs length mismatch\", \"fields\", fields);\n blobs = [];\n for (let i3 = 0; i3 < fields[1].length; i3++) {\n blobs.push({\n data: fBlobs[i3],\n commitment: fCommits[i3],\n proof: fProofs[i3]\n });\n }\n fields = fields[0];\n }\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 11 || fields.length === 14), `invalid field count for transaction type: ${typeName}`, \"data\", (0, index_js_3.hexlify)(data));\n const tx = {\n type: 3,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n maxPriorityFeePerGas: handleUint(fields[2], \"maxPriorityFeePerGas\"),\n maxFeePerGas: handleUint(fields[3], \"maxFeePerGas\"),\n gasPrice: null,\n gasLimit: handleUint(fields[4], \"gasLimit\"),\n to: handleAddress(fields[5]),\n value: handleUint(fields[6], \"value\"),\n data: (0, index_js_3.hexlify)(fields[7]),\n accessList: handleAccessList(fields[8], \"accessList\"),\n maxFeePerBlobGas: handleUint(fields[9], \"maxFeePerBlobGas\"),\n blobVersionedHashes: fields[10]\n };\n if (blobs) {\n tx.blobs = blobs;\n }\n (0, index_js_3.assertArgument)(tx.to != null, `invalid address for transaction type: ${typeName}`, \"data\", data);\n (0, index_js_3.assertArgument)(Array.isArray(tx.blobVersionedHashes), \"invalid blobVersionedHashes: must be an array\", \"data\", data);\n for (let i3 = 0; i3 < tx.blobVersionedHashes.length; i3++) {\n (0, index_js_3.assertArgument)((0, index_js_3.isHexString)(tx.blobVersionedHashes[i3], 32), `invalid blobVersionedHash at index ${i3}: must be length 32`, \"data\", data);\n }\n if (fields.length === 11) {\n return tx;\n }\n _parseEipSignature(tx, fields.slice(11));\n return tx;\n }\n function _serializeEip4844(tx, sig, blobs) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(tx.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || addresses_js_1.ZeroAddress,\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || []),\n formatNumber(tx.maxFeePerBlobGas || 0, \"maxFeePerBlobGas\"),\n formatHashes(tx.blobVersionedHashes || [], \"blobVersionedHashes\")\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"yParity\"));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n if (blobs) {\n return (0, index_js_3.concat)([\n \"0x03\",\n (0, index_js_3.encodeRlp)([\n fields,\n blobs.map((b4) => b4.data),\n blobs.map((b4) => b4.commitment),\n blobs.map((b4) => b4.proof)\n ])\n ]);\n }\n }\n return (0, index_js_3.concat)([\"0x03\", (0, index_js_3.encodeRlp)(fields)]);\n }\n function _parseEip7702(data) {\n const fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 10 || fields.length === 13), \"invalid field count for transaction type: 4\", \"data\", (0, index_js_3.hexlify)(data));\n const tx = {\n type: 4,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n maxPriorityFeePerGas: handleUint(fields[2], \"maxPriorityFeePerGas\"),\n maxFeePerGas: handleUint(fields[3], \"maxFeePerGas\"),\n gasPrice: null,\n gasLimit: handleUint(fields[4], \"gasLimit\"),\n to: handleAddress(fields[5]),\n value: handleUint(fields[6], \"value\"),\n data: (0, index_js_3.hexlify)(fields[7]),\n accessList: handleAccessList(fields[8], \"accessList\"),\n authorizationList: handleAuthorizationList(fields[9], \"authorizationList\")\n };\n if (fields.length === 10) {\n return tx;\n }\n _parseEipSignature(tx, fields.slice(10));\n return tx;\n }\n function _serializeEip7702(tx, sig) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(tx.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || \"0x\",\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || []),\n formatAuthorizationList3(tx.authorizationList || [])\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"yParity\"));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n }\n return (0, index_js_3.concat)([\"0x04\", (0, index_js_3.encodeRlp)(fields)]);\n }\n var Transaction5 = class _Transaction {\n #type;\n #to;\n #data;\n #nonce;\n #gasLimit;\n #gasPrice;\n #maxPriorityFeePerGas;\n #maxFeePerGas;\n #value;\n #chainId;\n #sig;\n #accessList;\n #maxFeePerBlobGas;\n #blobVersionedHashes;\n #kzg;\n #blobs;\n #auths;\n /**\n * The transaction type.\n *\n * If null, the type will be automatically inferred based on\n * explicit properties.\n */\n get type() {\n return this.#type;\n }\n set type(value) {\n switch (value) {\n case null:\n this.#type = null;\n break;\n case 0:\n case \"legacy\":\n this.#type = 0;\n break;\n case 1:\n case \"berlin\":\n case \"eip-2930\":\n this.#type = 1;\n break;\n case 2:\n case \"london\":\n case \"eip-1559\":\n this.#type = 2;\n break;\n case 3:\n case \"cancun\":\n case \"eip-4844\":\n this.#type = 3;\n break;\n case 4:\n case \"pectra\":\n case \"eip-7702\":\n this.#type = 4;\n break;\n default:\n (0, index_js_3.assertArgument)(false, \"unsupported transaction type\", \"type\", value);\n }\n }\n /**\n * The name of the transaction type.\n */\n get typeName() {\n switch (this.type) {\n case 0:\n return \"legacy\";\n case 1:\n return \"eip-2930\";\n case 2:\n return \"eip-1559\";\n case 3:\n return \"eip-4844\";\n case 4:\n return \"eip-7702\";\n }\n return null;\n }\n /**\n * The ``to`` address for the transaction or ``null`` if the\n * transaction is an ``init`` transaction.\n */\n get to() {\n const value = this.#to;\n if (value == null && this.type === 3) {\n return addresses_js_1.ZeroAddress;\n }\n return value;\n }\n set to(value) {\n this.#to = value == null ? null : (0, index_js_1.getAddress)(value);\n }\n /**\n * The transaction nonce.\n */\n get nonce() {\n return this.#nonce;\n }\n set nonce(value) {\n this.#nonce = (0, index_js_3.getNumber)(value, \"value\");\n }\n /**\n * The gas limit.\n */\n get gasLimit() {\n return this.#gasLimit;\n }\n set gasLimit(value) {\n this.#gasLimit = (0, index_js_3.getBigInt)(value);\n }\n /**\n * The gas price.\n *\n * On legacy networks this defines the fee that will be paid. On\n * EIP-1559 networks, this should be ``null``.\n */\n get gasPrice() {\n const value = this.#gasPrice;\n if (value == null && (this.type === 0 || this.type === 1)) {\n return BN_0;\n }\n return value;\n }\n set gasPrice(value) {\n this.#gasPrice = value == null ? null : (0, index_js_3.getBigInt)(value, \"gasPrice\");\n }\n /**\n * The maximum priority fee per unit of gas to pay. On legacy\n * networks this should be ``null``.\n */\n get maxPriorityFeePerGas() {\n const value = this.#maxPriorityFeePerGas;\n if (value == null) {\n if (this.type === 2 || this.type === 3) {\n return BN_0;\n }\n return null;\n }\n return value;\n }\n set maxPriorityFeePerGas(value) {\n this.#maxPriorityFeePerGas = value == null ? null : (0, index_js_3.getBigInt)(value, \"maxPriorityFeePerGas\");\n }\n /**\n * The maximum total fee per unit of gas to pay. On legacy\n * networks this should be ``null``.\n */\n get maxFeePerGas() {\n const value = this.#maxFeePerGas;\n if (value == null) {\n if (this.type === 2 || this.type === 3) {\n return BN_0;\n }\n return null;\n }\n return value;\n }\n set maxFeePerGas(value) {\n this.#maxFeePerGas = value == null ? null : (0, index_js_3.getBigInt)(value, \"maxFeePerGas\");\n }\n /**\n * The transaction data. For ``init`` transactions this is the\n * deployment code.\n */\n get data() {\n return this.#data;\n }\n set data(value) {\n this.#data = (0, index_js_3.hexlify)(value);\n }\n /**\n * The amount of ether (in wei) to send in this transactions.\n */\n get value() {\n return this.#value;\n }\n set value(value) {\n this.#value = (0, index_js_3.getBigInt)(value, \"value\");\n }\n /**\n * The chain ID this transaction is valid on.\n */\n get chainId() {\n return this.#chainId;\n }\n set chainId(value) {\n this.#chainId = (0, index_js_3.getBigInt)(value);\n }\n /**\n * If signed, the signature for this transaction.\n */\n get signature() {\n return this.#sig || null;\n }\n set signature(value) {\n this.#sig = value == null ? null : index_js_2.Signature.from(value);\n }\n /**\n * The access list.\n *\n * An access list permits discounted (but pre-paid) access to\n * bytecode and state variable access within contract execution.\n */\n get accessList() {\n const value = this.#accessList || null;\n if (value == null) {\n if (this.type === 1 || this.type === 2 || this.type === 3) {\n return [];\n }\n return null;\n }\n return value;\n }\n set accessList(value) {\n this.#accessList = value == null ? null : (0, accesslist_js_1.accessListify)(value);\n }\n get authorizationList() {\n const value = this.#auths || null;\n if (value == null) {\n if (this.type === 4) {\n return [];\n }\n }\n return value;\n }\n set authorizationList(auths) {\n this.#auths = auths == null ? null : auths.map((a3) => (0, authorization_js_1.authorizationify)(a3));\n }\n /**\n * The max fee per blob gas for Cancun transactions.\n */\n get maxFeePerBlobGas() {\n const value = this.#maxFeePerBlobGas;\n if (value == null && this.type === 3) {\n return BN_0;\n }\n return value;\n }\n set maxFeePerBlobGas(value) {\n this.#maxFeePerBlobGas = value == null ? null : (0, index_js_3.getBigInt)(value, \"maxFeePerBlobGas\");\n }\n /**\n * The BLOb versioned hashes for Cancun transactions.\n */\n get blobVersionedHashes() {\n let value = this.#blobVersionedHashes;\n if (value == null && this.type === 3) {\n return [];\n }\n return value;\n }\n set blobVersionedHashes(value) {\n if (value != null) {\n (0, index_js_3.assertArgument)(Array.isArray(value), \"blobVersionedHashes must be an Array\", \"value\", value);\n value = value.slice();\n for (let i3 = 0; i3 < value.length; i3++) {\n (0, index_js_3.assertArgument)((0, index_js_3.isHexString)(value[i3], 32), \"invalid blobVersionedHash\", `value[${i3}]`, value[i3]);\n }\n }\n this.#blobVersionedHashes = value;\n }\n /**\n * The BLObs for the Transaction, if any.\n *\n * If ``blobs`` is non-``null``, then the [[seriailized]]\n * will return the network formatted sidecar, otherwise it\n * will return the standard [[link-eip-2718]] payload. The\n * [[unsignedSerialized]] is unaffected regardless.\n *\n * When setting ``blobs``, either fully valid [[Blob]] objects\n * may be specified (i.e. correctly padded, with correct\n * committments and proofs) or a raw [[BytesLike]] may\n * be provided.\n *\n * If raw [[BytesLike]] are provided, the [[kzg]] property **must**\n * be already set. The blob will be correctly padded and the\n * [[KzgLibrary]] will be used to compute the committment and\n * proof for the blob.\n *\n * A BLOb is a sequence of field elements, each of which must\n * be within the BLS field modulo, so some additional processing\n * may be required to encode arbitrary data to ensure each 32 byte\n * field is within the valid range.\n *\n * Setting this automatically populates [[blobVersionedHashes]],\n * overwriting any existing values. Setting this to ``null``\n * does **not** remove the [[blobVersionedHashes]], leaving them\n * present.\n */\n get blobs() {\n if (this.#blobs == null) {\n return null;\n }\n return this.#blobs.map((b4) => Object.assign({}, b4));\n }\n set blobs(_blobs) {\n if (_blobs == null) {\n this.#blobs = null;\n return;\n }\n const blobs = [];\n const versionedHashes = [];\n for (let i3 = 0; i3 < _blobs.length; i3++) {\n const blob = _blobs[i3];\n if ((0, index_js_3.isBytesLike)(blob)) {\n (0, index_js_3.assert)(this.#kzg, \"adding a raw blob requires a KZG library\", \"UNSUPPORTED_OPERATION\", {\n operation: \"set blobs()\"\n });\n let data = (0, index_js_3.getBytes)(blob);\n (0, index_js_3.assertArgument)(data.length <= BLOB_SIZE, \"blob is too large\", `blobs[${i3}]`, blob);\n if (data.length !== BLOB_SIZE) {\n const padded = new Uint8Array(BLOB_SIZE);\n padded.set(data);\n data = padded;\n }\n const commit = this.#kzg.blobToKzgCommitment(data);\n const proof = (0, index_js_3.hexlify)(this.#kzg.computeBlobKzgProof(data, commit));\n blobs.push({\n data: (0, index_js_3.hexlify)(data),\n commitment: (0, index_js_3.hexlify)(commit),\n proof\n });\n versionedHashes.push(getVersionedHash(1, commit));\n } else {\n const commit = (0, index_js_3.hexlify)(blob.commitment);\n blobs.push({\n data: (0, index_js_3.hexlify)(blob.data),\n commitment: commit,\n proof: (0, index_js_3.hexlify)(blob.proof)\n });\n versionedHashes.push(getVersionedHash(1, commit));\n }\n }\n this.#blobs = blobs;\n this.#blobVersionedHashes = versionedHashes;\n }\n get kzg() {\n return this.#kzg;\n }\n set kzg(kzg) {\n if (kzg == null) {\n this.#kzg = null;\n } else {\n this.#kzg = getKzgLibrary(kzg);\n }\n }\n /**\n * Creates a new Transaction with default values.\n */\n constructor() {\n this.#type = null;\n this.#to = null;\n this.#nonce = 0;\n this.#gasLimit = BN_0;\n this.#gasPrice = null;\n this.#maxPriorityFeePerGas = null;\n this.#maxFeePerGas = null;\n this.#data = \"0x\";\n this.#value = BN_0;\n this.#chainId = BN_0;\n this.#sig = null;\n this.#accessList = null;\n this.#maxFeePerBlobGas = null;\n this.#blobVersionedHashes = null;\n this.#kzg = null;\n this.#blobs = null;\n this.#auths = null;\n }\n /**\n * The transaction hash, if signed. Otherwise, ``null``.\n */\n get hash() {\n if (this.signature == null) {\n return null;\n }\n return (0, index_js_2.keccak256)(this.#getSerialized(true, false));\n }\n /**\n * The pre-image hash of this transaction.\n *\n * This is the digest that a [[Signer]] must sign to authorize\n * this transaction.\n */\n get unsignedHash() {\n return (0, index_js_2.keccak256)(this.unsignedSerialized);\n }\n /**\n * The sending address, if signed. Otherwise, ``null``.\n */\n get from() {\n if (this.signature == null) {\n return null;\n }\n return (0, address_js_1.recoverAddress)(this.unsignedHash, this.signature);\n }\n /**\n * The public key of the sender, if signed. Otherwise, ``null``.\n */\n get fromPublicKey() {\n if (this.signature == null) {\n return null;\n }\n return index_js_2.SigningKey.recoverPublicKey(this.unsignedHash, this.signature);\n }\n /**\n * Returns true if signed.\n *\n * This provides a Type Guard that properties requiring a signed\n * transaction are non-null.\n */\n isSigned() {\n return this.signature != null;\n }\n #getSerialized(signed, sidecar) {\n (0, index_js_3.assert)(!signed || this.signature != null, \"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized\", \"UNSUPPORTED_OPERATION\", { operation: \".serialized\" });\n const sig = signed ? this.signature : null;\n switch (this.inferType()) {\n case 0:\n return _serializeLegacy(this, sig);\n case 1:\n return _serializeEip2930(this, sig);\n case 2:\n return _serializeEip1559(this, sig);\n case 3:\n return _serializeEip4844(this, sig, sidecar ? this.blobs : null);\n case 4:\n return _serializeEip7702(this, sig);\n }\n (0, index_js_3.assert)(false, \"unsupported transaction type\", \"UNSUPPORTED_OPERATION\", { operation: \".serialized\" });\n }\n /**\n * The serialized transaction.\n *\n * This throws if the transaction is unsigned. For the pre-image,\n * use [[unsignedSerialized]].\n */\n get serialized() {\n return this.#getSerialized(true, true);\n }\n /**\n * The transaction pre-image.\n *\n * The hash of this is the digest which needs to be signed to\n * authorize this transaction.\n */\n get unsignedSerialized() {\n return this.#getSerialized(false, false);\n }\n /**\n * Return the most \"likely\" type; currently the highest\n * supported transaction type.\n */\n inferType() {\n const types = this.inferTypes();\n if (types.indexOf(2) >= 0) {\n return 2;\n }\n return types.pop();\n }\n /**\n * Validates the explicit properties and returns a list of compatible\n * transaction types.\n */\n inferTypes() {\n const hasGasPrice = this.gasPrice != null;\n const hasFee = this.maxFeePerGas != null || this.maxPriorityFeePerGas != null;\n const hasAccessList = this.accessList != null;\n const hasBlob = this.#maxFeePerBlobGas != null || this.#blobVersionedHashes;\n if (this.maxFeePerGas != null && this.maxPriorityFeePerGas != null) {\n (0, index_js_3.assert)(this.maxFeePerGas >= this.maxPriorityFeePerGas, \"priorityFee cannot be more than maxFee\", \"BAD_DATA\", { value: this });\n }\n (0, index_js_3.assert)(!hasFee || this.type !== 0 && this.type !== 1, \"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas\", \"BAD_DATA\", { value: this });\n (0, index_js_3.assert)(this.type !== 0 || !hasAccessList, \"legacy transaction cannot have accessList\", \"BAD_DATA\", { value: this });\n const types = [];\n if (this.type != null) {\n types.push(this.type);\n } else {\n if (this.authorizationList && this.authorizationList.length) {\n types.push(4);\n } else if (hasFee) {\n types.push(2);\n } else if (hasGasPrice) {\n types.push(1);\n if (!hasAccessList) {\n types.push(0);\n }\n } else if (hasAccessList) {\n types.push(1);\n types.push(2);\n } else if (hasBlob && this.to) {\n types.push(3);\n } else {\n types.push(0);\n types.push(1);\n types.push(2);\n types.push(3);\n }\n }\n types.sort();\n return types;\n }\n /**\n * Returns true if this transaction is a legacy transaction (i.e.\n * ``type === 0``).\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isLegacy() {\n return this.type === 0;\n }\n /**\n * Returns true if this transaction is berlin hardform transaction (i.e.\n * ``type === 1``).\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isBerlin() {\n return this.type === 1;\n }\n /**\n * Returns true if this transaction is london hardform transaction (i.e.\n * ``type === 2``).\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isLondon() {\n return this.type === 2;\n }\n /**\n * Returns true if this transaction is an [[link-eip-4844]] BLOB\n * transaction.\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isCancun() {\n return this.type === 3;\n }\n /**\n * Create a copy of this transaciton.\n */\n clone() {\n return _Transaction.from(this);\n }\n /**\n * Return a JSON-friendly object.\n */\n toJSON() {\n const s4 = (v2) => {\n if (v2 == null) {\n return null;\n }\n return v2.toString();\n };\n return {\n type: this.type,\n to: this.to,\n // from: this.from,\n data: this.data,\n nonce: this.nonce,\n gasLimit: s4(this.gasLimit),\n gasPrice: s4(this.gasPrice),\n maxPriorityFeePerGas: s4(this.maxPriorityFeePerGas),\n maxFeePerGas: s4(this.maxFeePerGas),\n value: s4(this.value),\n chainId: s4(this.chainId),\n sig: this.signature ? this.signature.toJSON() : null,\n accessList: this.accessList\n };\n }\n /**\n * Create a **Transaction** from a serialized transaction or a\n * Transaction-like object.\n */\n static from(tx) {\n if (tx == null) {\n return new _Transaction();\n }\n if (typeof tx === \"string\") {\n const payload = (0, index_js_3.getBytes)(tx);\n if (payload[0] >= 127) {\n return _Transaction.from(_parseLegacy(payload));\n }\n switch (payload[0]) {\n case 1:\n return _Transaction.from(_parseEip2930(payload));\n case 2:\n return _Transaction.from(_parseEip1559(payload));\n case 3:\n return _Transaction.from(_parseEip4844(payload));\n case 4:\n return _Transaction.from(_parseEip7702(payload));\n }\n (0, index_js_3.assert)(false, \"unsupported transaction type\", \"UNSUPPORTED_OPERATION\", { operation: \"from\" });\n }\n const result = new _Transaction();\n if (tx.type != null) {\n result.type = tx.type;\n }\n if (tx.to != null) {\n result.to = tx.to;\n }\n if (tx.nonce != null) {\n result.nonce = tx.nonce;\n }\n if (tx.gasLimit != null) {\n result.gasLimit = tx.gasLimit;\n }\n if (tx.gasPrice != null) {\n result.gasPrice = tx.gasPrice;\n }\n if (tx.maxPriorityFeePerGas != null) {\n result.maxPriorityFeePerGas = tx.maxPriorityFeePerGas;\n }\n if (tx.maxFeePerGas != null) {\n result.maxFeePerGas = tx.maxFeePerGas;\n }\n if (tx.maxFeePerBlobGas != null) {\n result.maxFeePerBlobGas = tx.maxFeePerBlobGas;\n }\n if (tx.data != null) {\n result.data = tx.data;\n }\n if (tx.value != null) {\n result.value = tx.value;\n }\n if (tx.chainId != null) {\n result.chainId = tx.chainId;\n }\n if (tx.signature != null) {\n result.signature = index_js_2.Signature.from(tx.signature);\n }\n if (tx.accessList != null) {\n result.accessList = tx.accessList;\n }\n if (tx.authorizationList != null) {\n result.authorizationList = tx.authorizationList;\n }\n if (tx.blobVersionedHashes != null) {\n result.blobVersionedHashes = tx.blobVersionedHashes;\n }\n if (tx.kzg != null) {\n result.kzg = tx.kzg;\n }\n if (tx.blobs != null) {\n result.blobs = tx.blobs;\n }\n if (tx.hash != null) {\n (0, index_js_3.assertArgument)(result.isSigned(), \"unsigned transaction cannot define '.hash'\", \"tx\", tx);\n (0, index_js_3.assertArgument)(result.hash === tx.hash, \"hash mismatch\", \"tx\", tx);\n }\n if (tx.from != null) {\n (0, index_js_3.assertArgument)(result.isSigned(), \"unsigned transaction cannot define '.from'\", \"tx\", tx);\n (0, index_js_3.assertArgument)(result.from.toLowerCase() === (tx.from || \"\").toLowerCase(), \"from mismatch\", \"tx\", tx);\n }\n return result;\n }\n };\n exports3.Transaction = Transaction5;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/index.js\n var require_transaction2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Transaction = exports3.recoverAddress = exports3.computeAddress = exports3.authorizationify = exports3.accessListify = void 0;\n var accesslist_js_1 = require_accesslist();\n Object.defineProperty(exports3, \"accessListify\", { enumerable: true, get: function() {\n return accesslist_js_1.accessListify;\n } });\n var authorization_js_1 = require_authorization();\n Object.defineProperty(exports3, \"authorizationify\", { enumerable: true, get: function() {\n return authorization_js_1.authorizationify;\n } });\n var address_js_1 = require_address5();\n Object.defineProperty(exports3, \"computeAddress\", { enumerable: true, get: function() {\n return address_js_1.computeAddress;\n } });\n Object.defineProperty(exports3, \"recoverAddress\", { enumerable: true, get: function() {\n return address_js_1.recoverAddress;\n } });\n var transaction_js_1 = require_transaction();\n Object.defineProperty(exports3, \"Transaction\", { enumerable: true, get: function() {\n return transaction_js_1.Transaction;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/authorization.js\n var require_authorization2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/authorization.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyAuthorization = exports3.hashAuthorization = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n function hashAuthorization2(auth) {\n (0, index_js_4.assertArgument)(typeof auth.address === \"string\", \"invalid address for hashAuthorization\", \"auth.address\", auth);\n return (0, index_js_2.keccak256)((0, index_js_4.concat)([\n \"0x05\",\n (0, index_js_4.encodeRlp)([\n auth.chainId != null ? (0, index_js_4.toBeArray)(auth.chainId) : \"0x\",\n (0, index_js_1.getAddress)(auth.address),\n auth.nonce != null ? (0, index_js_4.toBeArray)(auth.nonce) : \"0x\"\n ])\n ]));\n }\n exports3.hashAuthorization = hashAuthorization2;\n function verifyAuthorization2(auth, sig) {\n return (0, index_js_3.recoverAddress)(hashAuthorization2(auth), sig);\n }\n exports3.verifyAuthorization = verifyAuthorization2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/id.js\n var require_id2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/id.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.id = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils8();\n function id(value) {\n return (0, index_js_1.keccak256)((0, index_js_2.toUtf8Bytes)(value));\n }\n exports3.id = id;\n }\n });\n\n // ../../../node_modules/.pnpm/@adraffy+ens-normalize@1.10.1/node_modules/@adraffy/ens-normalize/dist/index.cjs\n var require_dist = __commonJS({\n \"../../../node_modules/.pnpm/@adraffy+ens-normalize@1.10.1/node_modules/@adraffy/ens-normalize/dist/index.cjs\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var COMPRESSED$1 = \"AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI\";\n var FENCED = /* @__PURE__ */ new Map([[8217, \"apostrophe\"], [8260, \"fraction slash\"], [12539, \"middle dot\"]]);\n var NSM_MAX = 4;\n function decode_arithmetic(bytes) {\n let pos = 0;\n function u16() {\n return bytes[pos++] << 8 | bytes[pos++];\n }\n let symbol_count = u16();\n let total = 1;\n let acc = [0, 1];\n for (let i3 = 1; i3 < symbol_count; i3++) {\n acc.push(total += u16());\n }\n let skip = u16();\n let pos_payload = pos;\n pos += skip;\n let read_width = 0;\n let read_buffer = 0;\n function read_bit() {\n if (read_width == 0) {\n read_buffer = read_buffer << 8 | bytes[pos++];\n read_width = 8;\n }\n return read_buffer >> --read_width & 1;\n }\n const N4 = 31;\n const FULL = 2 ** N4;\n const HALF = FULL >>> 1;\n const QRTR = HALF >> 1;\n const MASK = FULL - 1;\n let register = 0;\n for (let i3 = 0; i3 < N4; i3++)\n register = register << 1 | read_bit();\n let symbols = [];\n let low = 0;\n let range = FULL;\n while (true) {\n let value = Math.floor(((register - low + 1) * total - 1) / range);\n let start = 0;\n let end = symbol_count;\n while (end - start > 1) {\n let mid = start + end >>> 1;\n if (value < acc[mid]) {\n end = mid;\n } else {\n start = mid;\n }\n }\n if (start == 0)\n break;\n symbols.push(start);\n let a3 = low + Math.floor(range * acc[start] / total);\n let b4 = low + Math.floor(range * acc[start + 1] / total) - 1;\n while (((a3 ^ b4) & HALF) == 0) {\n register = register << 1 & MASK | read_bit();\n a3 = a3 << 1 & MASK;\n b4 = b4 << 1 & MASK | 1;\n }\n while (a3 & ~b4 & QRTR) {\n register = register & HALF | register << 1 & MASK >>> 1 | read_bit();\n a3 = a3 << 1 ^ HALF;\n b4 = (b4 ^ HALF) << 1 | HALF | 1;\n }\n low = a3;\n range = 1 + b4 - a3;\n }\n let offset = symbol_count - 4;\n return symbols.map((x4) => {\n switch (x4 - offset) {\n case 3:\n return offset + 65792 + (bytes[pos_payload++] << 16 | bytes[pos_payload++] << 8 | bytes[pos_payload++]);\n case 2:\n return offset + 256 + (bytes[pos_payload++] << 8 | bytes[pos_payload++]);\n case 1:\n return offset + bytes[pos_payload++];\n default:\n return x4 - 1;\n }\n });\n }\n function read_payload(v2) {\n let pos = 0;\n return () => v2[pos++];\n }\n function read_compressed_payload(s4) {\n return read_payload(decode_arithmetic(unsafe_atob(s4)));\n }\n function unsafe_atob(s4) {\n let lookup = [];\n [...\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"].forEach((c4, i3) => lookup[c4.charCodeAt(0)] = i3);\n let n2 = s4.length;\n let ret = new Uint8Array(6 * n2 >> 3);\n for (let i3 = 0, pos = 0, width = 0, carry = 0; i3 < n2; i3++) {\n carry = carry << 6 | lookup[s4.charCodeAt(i3)];\n width += 6;\n if (width >= 8) {\n ret[pos++] = carry >> (width -= 8);\n }\n }\n return ret;\n }\n function signed(i3) {\n return i3 & 1 ? ~i3 >> 1 : i3 >> 1;\n }\n function read_deltas(n2, next) {\n let v2 = Array(n2);\n for (let i3 = 0, x4 = 0; i3 < n2; i3++)\n v2[i3] = x4 += signed(next());\n return v2;\n }\n function read_sorted(next, prev = 0) {\n let ret = [];\n while (true) {\n let x4 = next();\n let n2 = next();\n if (!n2)\n break;\n prev += x4;\n for (let i3 = 0; i3 < n2; i3++) {\n ret.push(prev + i3);\n }\n prev += n2 + 1;\n }\n return ret;\n }\n function read_sorted_arrays(next) {\n return read_array_while(() => {\n let v2 = read_sorted(next);\n if (v2.length)\n return v2;\n });\n }\n function read_mapped(next) {\n let ret = [];\n while (true) {\n let w3 = next();\n if (w3 == 0)\n break;\n ret.push(read_linear_table(w3, next));\n }\n while (true) {\n let w3 = next() - 1;\n if (w3 < 0)\n break;\n ret.push(read_replacement_table(w3, next));\n }\n return ret.flat();\n }\n function read_array_while(next) {\n let v2 = [];\n while (true) {\n let x4 = next(v2.length);\n if (!x4)\n break;\n v2.push(x4);\n }\n return v2;\n }\n function read_transposed(n2, w3, next) {\n let m2 = Array(n2).fill().map(() => []);\n for (let i3 = 0; i3 < w3; i3++) {\n read_deltas(n2, next).forEach((x4, j2) => m2[j2].push(x4));\n }\n return m2;\n }\n function read_linear_table(w3, next) {\n let dx = 1 + next();\n let dy = next();\n let vN = read_array_while(next);\n let m2 = read_transposed(vN.length, 1 + w3, next);\n return m2.flatMap((v2, i3) => {\n let [x4, ...ys] = v2;\n return Array(vN[i3]).fill().map((_2, j2) => {\n let j_dy = j2 * dy;\n return [x4 + j2 * dx, ys.map((y6) => y6 + j_dy)];\n });\n });\n }\n function read_replacement_table(w3, next) {\n let n2 = 1 + next();\n let m2 = read_transposed(n2, 1 + w3, next);\n return m2.map((v2) => [v2[0], v2.slice(1)]);\n }\n function read_trie(next) {\n let ret = [];\n let sorted = read_sorted(next);\n expand(decode2([]), []);\n return ret;\n function decode2(Q2) {\n let S3 = next();\n let B2 = read_array_while(() => {\n let cps = read_sorted(next).map((i3) => sorted[i3]);\n if (cps.length)\n return decode2(cps);\n });\n return { S: S3, B: B2, Q: Q2 };\n }\n function expand({ S: S3, B: B2 }, cps, saved) {\n if (S3 & 4 && saved === cps[cps.length - 1])\n return;\n if (S3 & 2)\n saved = cps[cps.length - 1];\n if (S3 & 1)\n ret.push(cps);\n for (let br of B2) {\n for (let cp of br.Q) {\n expand(br, [...cps, cp], saved);\n }\n }\n }\n }\n function hex_cp(cp) {\n return cp.toString(16).toUpperCase().padStart(2, \"0\");\n }\n function quote_cp(cp) {\n return `{${hex_cp(cp)}}`;\n }\n function explode_cp(s4) {\n let cps = [];\n for (let pos = 0, len = s4.length; pos < len; ) {\n let cp = s4.codePointAt(pos);\n pos += cp < 65536 ? 1 : 2;\n cps.push(cp);\n }\n return cps;\n }\n function str_from_cps(cps) {\n const chunk = 4096;\n let len = cps.length;\n if (len < chunk)\n return String.fromCodePoint(...cps);\n let buf = [];\n for (let i3 = 0; i3 < len; ) {\n buf.push(String.fromCodePoint(...cps.slice(i3, i3 += chunk)));\n }\n return buf.join(\"\");\n }\n function compare_arrays(a3, b4) {\n let n2 = a3.length;\n let c4 = n2 - b4.length;\n for (let i3 = 0; c4 == 0 && i3 < n2; i3++)\n c4 = a3[i3] - b4[i3];\n return c4;\n }\n var COMPRESSED = \"AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g\";\n var S0 = 44032;\n var L0 = 4352;\n var V0 = 4449;\n var T0 = 4519;\n var L_COUNT = 19;\n var V_COUNT = 21;\n var T_COUNT = 28;\n var N_COUNT = V_COUNT * T_COUNT;\n var S_COUNT = L_COUNT * N_COUNT;\n var S1 = S0 + S_COUNT;\n var L1 = L0 + L_COUNT;\n var V1 = V0 + V_COUNT;\n var T1 = T0 + T_COUNT;\n function unpack_cc(packed) {\n return packed >> 24 & 255;\n }\n function unpack_cp(packed) {\n return packed & 16777215;\n }\n var SHIFTED_RANK;\n var EXCLUSIONS;\n var DECOMP;\n var RECOMP;\n function init$1() {\n let r2 = read_compressed_payload(COMPRESSED);\n SHIFTED_RANK = new Map(read_sorted_arrays(r2).flatMap((v2, i3) => v2.map((x4) => [x4, i3 + 1 << 24])));\n EXCLUSIONS = new Set(read_sorted(r2));\n DECOMP = /* @__PURE__ */ new Map();\n RECOMP = /* @__PURE__ */ new Map();\n for (let [cp, cps] of read_mapped(r2)) {\n if (!EXCLUSIONS.has(cp) && cps.length == 2) {\n let [a3, b4] = cps;\n let bucket = RECOMP.get(a3);\n if (!bucket) {\n bucket = /* @__PURE__ */ new Map();\n RECOMP.set(a3, bucket);\n }\n bucket.set(b4, cp);\n }\n DECOMP.set(cp, cps.reverse());\n }\n }\n function is_hangul(cp) {\n return cp >= S0 && cp < S1;\n }\n function compose_pair(a3, b4) {\n if (a3 >= L0 && a3 < L1 && b4 >= V0 && b4 < V1) {\n return S0 + (a3 - L0) * N_COUNT + (b4 - V0) * T_COUNT;\n } else if (is_hangul(a3) && b4 > T0 && b4 < T1 && (a3 - S0) % T_COUNT == 0) {\n return a3 + (b4 - T0);\n } else {\n let recomp = RECOMP.get(a3);\n if (recomp) {\n recomp = recomp.get(b4);\n if (recomp) {\n return recomp;\n }\n }\n return -1;\n }\n }\n function decomposed(cps) {\n if (!SHIFTED_RANK)\n init$1();\n let ret = [];\n let buf = [];\n let check_order = false;\n function add2(cp) {\n let cc = SHIFTED_RANK.get(cp);\n if (cc) {\n check_order = true;\n cp |= cc;\n }\n ret.push(cp);\n }\n for (let cp of cps) {\n while (true) {\n if (cp < 128) {\n ret.push(cp);\n } else if (is_hangul(cp)) {\n let s_index = cp - S0;\n let l_index = s_index / N_COUNT | 0;\n let v_index = s_index % N_COUNT / T_COUNT | 0;\n let t_index = s_index % T_COUNT;\n add2(L0 + l_index);\n add2(V0 + v_index);\n if (t_index > 0)\n add2(T0 + t_index);\n } else {\n let mapped = DECOMP.get(cp);\n if (mapped) {\n buf.push(...mapped);\n } else {\n add2(cp);\n }\n }\n if (!buf.length)\n break;\n cp = buf.pop();\n }\n }\n if (check_order && ret.length > 1) {\n let prev_cc = unpack_cc(ret[0]);\n for (let i3 = 1; i3 < ret.length; i3++) {\n let cc = unpack_cc(ret[i3]);\n if (cc == 0 || prev_cc <= cc) {\n prev_cc = cc;\n continue;\n }\n let j2 = i3 - 1;\n while (true) {\n let tmp = ret[j2 + 1];\n ret[j2 + 1] = ret[j2];\n ret[j2] = tmp;\n if (!j2)\n break;\n prev_cc = unpack_cc(ret[--j2]);\n if (prev_cc <= cc)\n break;\n }\n prev_cc = unpack_cc(ret[i3]);\n }\n }\n return ret;\n }\n function composed_from_decomposed(v2) {\n let ret = [];\n let stack = [];\n let prev_cp = -1;\n let prev_cc = 0;\n for (let packed of v2) {\n let cc = unpack_cc(packed);\n let cp = unpack_cp(packed);\n if (prev_cp == -1) {\n if (cc == 0) {\n prev_cp = cp;\n } else {\n ret.push(cp);\n }\n } else if (prev_cc > 0 && prev_cc >= cc) {\n if (cc == 0) {\n ret.push(prev_cp, ...stack);\n stack.length = 0;\n prev_cp = cp;\n } else {\n stack.push(cp);\n }\n prev_cc = cc;\n } else {\n let composed = compose_pair(prev_cp, cp);\n if (composed >= 0) {\n prev_cp = composed;\n } else if (prev_cc == 0 && cc == 0) {\n ret.push(prev_cp);\n prev_cp = cp;\n } else {\n stack.push(cp);\n prev_cc = cc;\n }\n }\n }\n if (prev_cp >= 0) {\n ret.push(prev_cp, ...stack);\n }\n return ret;\n }\n function nfd(cps) {\n return decomposed(cps).map(unpack_cp);\n }\n function nfc(cps) {\n return composed_from_decomposed(decomposed(cps));\n }\n var HYPHEN = 45;\n var STOP = 46;\n var STOP_CH = \".\";\n var FE0F = 65039;\n var UNIQUE_PH = 1;\n var Array_from = (x4) => Array.from(x4);\n function group_has_cp(g4, cp) {\n return g4.P.has(cp) || g4.Q.has(cp);\n }\n var Emoji = class extends Array {\n get is_emoji() {\n return true;\n }\n // free tagging system\n };\n var MAPPED;\n var IGNORED;\n var CM;\n var NSM;\n var ESCAPE;\n var NFC_CHECK;\n var GROUPS;\n var WHOLE_VALID;\n var WHOLE_MAP;\n var VALID;\n var EMOJI_LIST;\n var EMOJI_ROOT;\n function init() {\n if (MAPPED)\n return;\n let r2 = read_compressed_payload(COMPRESSED$1);\n const read_sorted_array = () => read_sorted(r2);\n const read_sorted_set = () => new Set(read_sorted_array());\n const set_add_many = (set, v2) => v2.forEach((x4) => set.add(x4));\n MAPPED = new Map(read_mapped(r2));\n IGNORED = read_sorted_set();\n CM = read_sorted_array();\n NSM = new Set(read_sorted_array().map((i3) => CM[i3]));\n CM = new Set(CM);\n ESCAPE = read_sorted_set();\n NFC_CHECK = read_sorted_set();\n let chunks = read_sorted_arrays(r2);\n let unrestricted = r2();\n const read_chunked = () => {\n let set = /* @__PURE__ */ new Set();\n read_sorted_array().forEach((i3) => set_add_many(set, chunks[i3]));\n set_add_many(set, read_sorted_array());\n return set;\n };\n GROUPS = read_array_while((i3) => {\n let N4 = read_array_while(r2).map((x4) => x4 + 96);\n if (N4.length) {\n let R3 = i3 >= unrestricted;\n N4[0] -= 32;\n N4 = str_from_cps(N4);\n if (R3)\n N4 = `Restricted[${N4}]`;\n let P2 = read_chunked();\n let Q2 = read_chunked();\n let M2 = !r2();\n return { N: N4, P: P2, Q: Q2, M: M2, R: R3 };\n }\n });\n WHOLE_VALID = read_sorted_set();\n WHOLE_MAP = /* @__PURE__ */ new Map();\n let wholes = read_sorted_array().concat(Array_from(WHOLE_VALID)).sort((a3, b4) => a3 - b4);\n wholes.forEach((cp, i3) => {\n let d5 = r2();\n let w3 = wholes[i3] = d5 ? wholes[i3 - d5] : { V: [], M: /* @__PURE__ */ new Map() };\n w3.V.push(cp);\n if (!WHOLE_VALID.has(cp)) {\n WHOLE_MAP.set(cp, w3);\n }\n });\n for (let { V: V2, M: M2 } of new Set(WHOLE_MAP.values())) {\n let recs = [];\n for (let cp of V2) {\n let gs = GROUPS.filter((g4) => group_has_cp(g4, cp));\n let rec = recs.find(({ G }) => gs.some((g4) => G.has(g4)));\n if (!rec) {\n rec = { G: /* @__PURE__ */ new Set(), V: [] };\n recs.push(rec);\n }\n rec.V.push(cp);\n set_add_many(rec.G, gs);\n }\n let union = recs.flatMap((x4) => Array_from(x4.G));\n for (let { G, V: V3 } of recs) {\n let complement = new Set(union.filter((g4) => !G.has(g4)));\n for (let cp of V3) {\n M2.set(cp, complement);\n }\n }\n }\n VALID = /* @__PURE__ */ new Set();\n let multi = /* @__PURE__ */ new Set();\n const add_to_union = (cp) => VALID.has(cp) ? multi.add(cp) : VALID.add(cp);\n for (let g4 of GROUPS) {\n for (let cp of g4.P)\n add_to_union(cp);\n for (let cp of g4.Q)\n add_to_union(cp);\n }\n for (let cp of VALID) {\n if (!WHOLE_MAP.has(cp) && !multi.has(cp)) {\n WHOLE_MAP.set(cp, UNIQUE_PH);\n }\n }\n set_add_many(VALID, nfd(VALID));\n EMOJI_LIST = read_trie(r2).map((v2) => Emoji.from(v2)).sort(compare_arrays);\n EMOJI_ROOT = /* @__PURE__ */ new Map();\n for (let cps of EMOJI_LIST) {\n let prev = [EMOJI_ROOT];\n for (let cp of cps) {\n let next = prev.map((node) => {\n let child = node.get(cp);\n if (!child) {\n child = /* @__PURE__ */ new Map();\n node.set(cp, child);\n }\n return child;\n });\n if (cp === FE0F) {\n prev.push(...next);\n } else {\n prev = next;\n }\n }\n for (let x4 of prev) {\n x4.V = cps;\n }\n }\n }\n function quoted_cp(cp) {\n return (should_escape(cp) ? \"\" : `${bidi_qq(safe_str_from_cps([cp]))} `) + quote_cp(cp);\n }\n function bidi_qq(s4) {\n return `\"${s4}\"\\u200E`;\n }\n function check_label_extension(cps) {\n if (cps.length >= 4 && cps[2] == HYPHEN && cps[3] == HYPHEN) {\n throw new Error(`invalid label extension: \"${str_from_cps(cps.slice(0, 4))}\"`);\n }\n }\n function check_leading_underscore(cps) {\n const UNDERSCORE = 95;\n for (let i3 = cps.lastIndexOf(UNDERSCORE); i3 > 0; ) {\n if (cps[--i3] !== UNDERSCORE) {\n throw new Error(\"underscore allowed only at start\");\n }\n }\n }\n function check_fenced(cps) {\n let cp = cps[0];\n let prev = FENCED.get(cp);\n if (prev)\n throw error_placement(`leading ${prev}`);\n let n2 = cps.length;\n let last = -1;\n for (let i3 = 1; i3 < n2; i3++) {\n cp = cps[i3];\n let match = FENCED.get(cp);\n if (match) {\n if (last == i3)\n throw error_placement(`${prev} + ${match}`);\n last = i3 + 1;\n prev = match;\n }\n }\n if (last == n2)\n throw error_placement(`trailing ${prev}`);\n }\n function safe_str_from_cps(cps, max = Infinity, quoter = quote_cp) {\n let buf = [];\n if (is_combining_mark(cps[0]))\n buf.push(\"\\u25CC\");\n if (cps.length > max) {\n max >>= 1;\n cps = [...cps.slice(0, max), 8230, ...cps.slice(-max)];\n }\n let prev = 0;\n let n2 = cps.length;\n for (let i3 = 0; i3 < n2; i3++) {\n let cp = cps[i3];\n if (should_escape(cp)) {\n buf.push(str_from_cps(cps.slice(prev, i3)));\n buf.push(quoter(cp));\n prev = i3 + 1;\n }\n }\n buf.push(str_from_cps(cps.slice(prev, n2)));\n return buf.join(\"\");\n }\n function is_combining_mark(cp) {\n init();\n return CM.has(cp);\n }\n function should_escape(cp) {\n init();\n return ESCAPE.has(cp);\n }\n function ens_emoji() {\n init();\n return EMOJI_LIST.map((x4) => x4.slice());\n }\n function ens_normalize_fragment(frag, decompose) {\n init();\n let nf = decompose ? nfd : nfc;\n return frag.split(STOP_CH).map((label) => str_from_cps(tokens_from_str(explode_cp(label), nf, filter_fe0f).flat())).join(STOP_CH);\n }\n function ens_normalize(name) {\n return flatten(split3(name, nfc, filter_fe0f));\n }\n function ens_beautify(name) {\n let labels = split3(name, nfc, (x4) => x4);\n for (let { type, output, error } of labels) {\n if (error)\n break;\n if (type !== \"Greek\")\n array_replace(output, 958, 926);\n }\n return flatten(labels);\n }\n function array_replace(v2, a3, b4) {\n let prev = 0;\n while (true) {\n let next = v2.indexOf(a3, prev);\n if (next < 0)\n break;\n v2[next] = b4;\n prev = next + 1;\n }\n }\n function ens_split(name, preserve_emoji) {\n return split3(name, nfc, preserve_emoji ? (x4) => x4.slice() : filter_fe0f);\n }\n function split3(name, nf, ef) {\n if (!name)\n return [];\n init();\n let offset = 0;\n return name.split(STOP_CH).map((label) => {\n let input = explode_cp(label);\n let info = {\n input,\n offset\n // codepoint, not substring!\n };\n offset += input.length + 1;\n try {\n let tokens = info.tokens = tokens_from_str(input, nf, ef);\n let token_count = tokens.length;\n let type;\n if (!token_count) {\n throw new Error(`empty label`);\n }\n let norm = info.output = tokens.flat();\n check_leading_underscore(norm);\n let emoji = info.emoji = token_count > 1 || tokens[0].is_emoji;\n if (!emoji && norm.every((cp) => cp < 128)) {\n check_label_extension(norm);\n type = \"ASCII\";\n } else {\n let chars = tokens.flatMap((x4) => x4.is_emoji ? [] : x4);\n if (!chars.length) {\n type = \"Emoji\";\n } else {\n if (CM.has(norm[0]))\n throw error_placement(\"leading combining mark\");\n for (let i3 = 1; i3 < token_count; i3++) {\n let cps = tokens[i3];\n if (!cps.is_emoji && CM.has(cps[0])) {\n throw error_placement(`emoji + combining mark: \"${str_from_cps(tokens[i3 - 1])} + ${safe_str_from_cps([cps[0]])}\"`);\n }\n }\n check_fenced(norm);\n let unique = Array_from(new Set(chars));\n let [g4] = determine_group(unique);\n check_group(g4, chars);\n check_whole(g4, unique);\n type = g4.N;\n }\n }\n info.type = type;\n } catch (err) {\n info.error = err;\n }\n return info;\n });\n }\n function check_whole(group, unique) {\n let maker;\n let shared = [];\n for (let cp of unique) {\n let whole = WHOLE_MAP.get(cp);\n if (whole === UNIQUE_PH)\n return;\n if (whole) {\n let set = whole.M.get(cp);\n maker = maker ? maker.filter((g4) => set.has(g4)) : Array_from(set);\n if (!maker.length)\n return;\n } else {\n shared.push(cp);\n }\n }\n if (maker) {\n for (let g4 of maker) {\n if (shared.every((cp) => group_has_cp(g4, cp))) {\n throw new Error(`whole-script confusable: ${group.N}/${g4.N}`);\n }\n }\n }\n }\n function determine_group(unique) {\n let groups = GROUPS;\n for (let cp of unique) {\n let gs = groups.filter((g4) => group_has_cp(g4, cp));\n if (!gs.length) {\n if (!GROUPS.some((g4) => group_has_cp(g4, cp))) {\n throw error_disallowed(cp);\n } else {\n throw error_group_member(groups[0], cp);\n }\n }\n groups = gs;\n if (gs.length == 1)\n break;\n }\n return groups;\n }\n function flatten(split4) {\n return split4.map(({ input, error, output }) => {\n if (error) {\n let msg = error.message;\n throw new Error(split4.length == 1 ? msg : `Invalid label ${bidi_qq(safe_str_from_cps(input, 63))}: ${msg}`);\n }\n return str_from_cps(output);\n }).join(STOP_CH);\n }\n function error_disallowed(cp) {\n return new Error(`disallowed character: ${quoted_cp(cp)}`);\n }\n function error_group_member(g4, cp) {\n let quoted = quoted_cp(cp);\n let gg = GROUPS.find((g5) => g5.P.has(cp));\n if (gg) {\n quoted = `${gg.N} ${quoted}`;\n }\n return new Error(`illegal mixture: ${g4.N} + ${quoted}`);\n }\n function error_placement(where) {\n return new Error(`illegal placement: ${where}`);\n }\n function check_group(g4, cps) {\n for (let cp of cps) {\n if (!group_has_cp(g4, cp)) {\n throw error_group_member(g4, cp);\n }\n }\n if (g4.M) {\n let decomposed2 = nfd(cps);\n for (let i3 = 1, e2 = decomposed2.length; i3 < e2; i3++) {\n if (NSM.has(decomposed2[i3])) {\n let j2 = i3 + 1;\n for (let cp; j2 < e2 && NSM.has(cp = decomposed2[j2]); j2++) {\n for (let k4 = i3; k4 < j2; k4++) {\n if (decomposed2[k4] == cp) {\n throw new Error(`duplicate non-spacing marks: ${quoted_cp(cp)}`);\n }\n }\n }\n if (j2 - i3 > NSM_MAX) {\n throw new Error(`excessive non-spacing marks: ${bidi_qq(safe_str_from_cps(decomposed2.slice(i3 - 1, j2)))} (${j2 - i3}/${NSM_MAX})`);\n }\n i3 = j2;\n }\n }\n }\n }\n function tokens_from_str(input, nf, ef) {\n let ret = [];\n let chars = [];\n input = input.slice().reverse();\n while (input.length) {\n let emoji = consume_emoji_reversed(input);\n if (emoji) {\n if (chars.length) {\n ret.push(nf(chars));\n chars = [];\n }\n ret.push(ef(emoji));\n } else {\n let cp = input.pop();\n if (VALID.has(cp)) {\n chars.push(cp);\n } else {\n let cps = MAPPED.get(cp);\n if (cps) {\n chars.push(...cps);\n } else if (!IGNORED.has(cp)) {\n throw error_disallowed(cp);\n }\n }\n }\n }\n if (chars.length) {\n ret.push(nf(chars));\n }\n return ret;\n }\n function filter_fe0f(cps) {\n return cps.filter((cp) => cp != FE0F);\n }\n function consume_emoji_reversed(cps, eaten) {\n let node = EMOJI_ROOT;\n let emoji;\n let pos = cps.length;\n while (pos) {\n node = node.get(cps[--pos]);\n if (!node)\n break;\n let { V: V2 } = node;\n if (V2) {\n emoji = V2;\n if (eaten)\n eaten.push(...cps.slice(pos).reverse());\n cps.length = pos;\n }\n }\n return emoji;\n }\n var TY_VALID = \"valid\";\n var TY_MAPPED = \"mapped\";\n var TY_IGNORED = \"ignored\";\n var TY_DISALLOWED = \"disallowed\";\n var TY_EMOJI = \"emoji\";\n var TY_NFC = \"nfc\";\n var TY_STOP = \"stop\";\n function ens_tokenize(name, {\n nf = true\n // collapse unnormalized runs into a single token\n } = {}) {\n init();\n let input = explode_cp(name).reverse();\n let eaten = [];\n let tokens = [];\n while (input.length) {\n let emoji = consume_emoji_reversed(input, eaten);\n if (emoji) {\n tokens.push({\n type: TY_EMOJI,\n emoji: emoji.slice(),\n // copy emoji\n input: eaten,\n cps: filter_fe0f(emoji)\n });\n eaten = [];\n } else {\n let cp = input.pop();\n if (cp == STOP) {\n tokens.push({ type: TY_STOP, cp });\n } else if (VALID.has(cp)) {\n tokens.push({ type: TY_VALID, cps: [cp] });\n } else if (IGNORED.has(cp)) {\n tokens.push({ type: TY_IGNORED, cp });\n } else {\n let cps = MAPPED.get(cp);\n if (cps) {\n tokens.push({ type: TY_MAPPED, cp, cps: cps.slice() });\n } else {\n tokens.push({ type: TY_DISALLOWED, cp });\n }\n }\n }\n }\n if (nf) {\n for (let i3 = 0, start = -1; i3 < tokens.length; i3++) {\n let token = tokens[i3];\n if (is_valid_or_mapped(token.type)) {\n if (requires_check(token.cps)) {\n let end = i3 + 1;\n for (let pos = end; pos < tokens.length; pos++) {\n let { type, cps: cps2 } = tokens[pos];\n if (is_valid_or_mapped(type)) {\n if (!requires_check(cps2))\n break;\n end = pos + 1;\n } else if (type !== TY_IGNORED) {\n break;\n }\n }\n if (start < 0)\n start = i3;\n let slice4 = tokens.slice(start, end);\n let cps0 = slice4.flatMap((x4) => is_valid_or_mapped(x4.type) ? x4.cps : []);\n let cps = nfc(cps0);\n if (compare_arrays(cps, cps0)) {\n tokens.splice(start, end - start, {\n type: TY_NFC,\n input: cps0,\n // there are 3 states: tokens0 ==(process)=> input ==(nfc)=> tokens/cps\n cps,\n tokens0: collapse_valid_tokens(slice4),\n tokens: ens_tokenize(str_from_cps(cps), { nf: false })\n });\n i3 = start;\n } else {\n i3 = end - 1;\n }\n start = -1;\n } else {\n start = i3;\n }\n } else if (token.type !== TY_IGNORED) {\n start = -1;\n }\n }\n }\n return collapse_valid_tokens(tokens);\n }\n function is_valid_or_mapped(type) {\n return type == TY_VALID || type == TY_MAPPED;\n }\n function requires_check(cps) {\n return cps.some((cp) => NFC_CHECK.has(cp));\n }\n function collapse_valid_tokens(tokens) {\n for (let i3 = 0; i3 < tokens.length; i3++) {\n if (tokens[i3].type == TY_VALID) {\n let j2 = i3 + 1;\n while (j2 < tokens.length && tokens[j2].type == TY_VALID)\n j2++;\n tokens.splice(i3, j2 - i3, { type: TY_VALID, cps: tokens.slice(i3, j2).flatMap((x4) => x4.cps) });\n }\n }\n return tokens;\n }\n exports3.ens_beautify = ens_beautify;\n exports3.ens_emoji = ens_emoji;\n exports3.ens_normalize = ens_normalize;\n exports3.ens_normalize_fragment = ens_normalize_fragment;\n exports3.ens_split = ens_split;\n exports3.ens_tokenize = ens_tokenize;\n exports3.is_combining_mark = is_combining_mark;\n exports3.nfc = nfc;\n exports3.nfd = nfd;\n exports3.safe_str_from_cps = safe_str_from_cps;\n exports3.should_escape = should_escape;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/namehash.js\n var require_namehash2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/namehash.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.dnsEncode = exports3.namehash = exports3.isValidName = exports3.ensNormalize = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils8();\n var ens_normalize_1 = require_dist();\n var Zeros = new Uint8Array(32);\n Zeros.fill(0);\n function checkComponent(comp) {\n (0, index_js_2.assertArgument)(comp.length !== 0, \"invalid ENS name; empty component\", \"comp\", comp);\n return comp;\n }\n function ensNameSplit(name) {\n const bytes = (0, index_js_2.toUtf8Bytes)(ensNormalize(name));\n const comps = [];\n if (name.length === 0) {\n return comps;\n }\n let last = 0;\n for (let i3 = 0; i3 < bytes.length; i3++) {\n const d5 = bytes[i3];\n if (d5 === 46) {\n comps.push(checkComponent(bytes.slice(last, i3)));\n last = i3 + 1;\n }\n }\n (0, index_js_2.assertArgument)(last < bytes.length, \"invalid ENS name; empty component\", \"name\", name);\n comps.push(checkComponent(bytes.slice(last)));\n return comps;\n }\n function ensNormalize(name) {\n try {\n if (name.length === 0) {\n throw new Error(\"empty label\");\n }\n return (0, ens_normalize_1.ens_normalize)(name);\n } catch (error) {\n (0, index_js_2.assertArgument)(false, `invalid ENS name (${error.message})`, \"name\", name);\n }\n }\n exports3.ensNormalize = ensNormalize;\n function isValidName(name) {\n try {\n return ensNameSplit(name).length !== 0;\n } catch (error) {\n }\n return false;\n }\n exports3.isValidName = isValidName;\n function namehash2(name) {\n (0, index_js_2.assertArgument)(typeof name === \"string\", \"invalid ENS name; not a string\", \"name\", name);\n (0, index_js_2.assertArgument)(name.length, `invalid ENS name (empty label)`, \"name\", name);\n let result = Zeros;\n const comps = ensNameSplit(name);\n while (comps.length) {\n result = (0, index_js_1.keccak256)((0, index_js_2.concat)([result, (0, index_js_1.keccak256)(comps.pop())]));\n }\n return (0, index_js_2.hexlify)(result);\n }\n exports3.namehash = namehash2;\n function dnsEncode(name, _maxLength) {\n const length = _maxLength != null ? _maxLength : 63;\n (0, index_js_2.assertArgument)(length <= 255, \"DNS encoded label cannot exceed 255\", \"length\", length);\n return (0, index_js_2.hexlify)((0, index_js_2.concat)(ensNameSplit(name).map((comp) => {\n (0, index_js_2.assertArgument)(comp.length <= length, `label ${JSON.stringify(name)} exceeds ${length} bytes`, \"name\", name);\n const bytes = new Uint8Array(comp.length + 1);\n bytes.set(comp, 1);\n bytes[0] = bytes.length - 1;\n return bytes;\n }))) + \"00\";\n }\n exports3.dnsEncode = dnsEncode;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/message.js\n var require_message2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/message.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyMessage = exports3.hashMessage = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_constants5();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n function hashMessage2(message) {\n if (typeof message === \"string\") {\n message = (0, index_js_4.toUtf8Bytes)(message);\n }\n return (0, index_js_1.keccak256)((0, index_js_4.concat)([\n (0, index_js_4.toUtf8Bytes)(index_js_2.MessagePrefix),\n (0, index_js_4.toUtf8Bytes)(String(message.length)),\n message\n ]));\n }\n exports3.hashMessage = hashMessage2;\n function verifyMessage2(message, sig) {\n const digest = hashMessage2(message);\n return (0, index_js_3.recoverAddress)(digest, sig);\n }\n exports3.verifyMessage = verifyMessage2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/solidity.js\n var require_solidity = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/solidity.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.solidityPackedSha256 = exports3.solidityPackedKeccak256 = exports3.solidityPacked = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_utils8();\n var regexBytes = new RegExp(\"^bytes([0-9]+)$\");\n var regexNumber = new RegExp(\"^(u?int)([0-9]*)$\");\n var regexArray = new RegExp(\"^(.*)\\\\[([0-9]*)\\\\]$\");\n function _pack(type, value, isArray) {\n switch (type) {\n case \"address\":\n if (isArray) {\n return (0, index_js_3.getBytes)((0, index_js_3.zeroPadValue)(value, 32));\n }\n return (0, index_js_3.getBytes)((0, index_js_1.getAddress)(value));\n case \"string\":\n return (0, index_js_3.toUtf8Bytes)(value);\n case \"bytes\":\n return (0, index_js_3.getBytes)(value);\n case \"bool\":\n value = !!value ? \"0x01\" : \"0x00\";\n if (isArray) {\n return (0, index_js_3.getBytes)((0, index_js_3.zeroPadValue)(value, 32));\n }\n return (0, index_js_3.getBytes)(value);\n }\n let match = type.match(regexNumber);\n if (match) {\n let signed = match[1] === \"int\";\n let size6 = parseInt(match[2] || \"256\");\n (0, index_js_3.assertArgument)((!match[2] || match[2] === String(size6)) && size6 % 8 === 0 && size6 !== 0 && size6 <= 256, \"invalid number type\", \"type\", type);\n if (isArray) {\n size6 = 256;\n }\n if (signed) {\n value = (0, index_js_3.toTwos)(value, size6);\n }\n return (0, index_js_3.getBytes)((0, index_js_3.zeroPadValue)((0, index_js_3.toBeArray)(value), size6 / 8));\n }\n match = type.match(regexBytes);\n if (match) {\n const size6 = parseInt(match[1]);\n (0, index_js_3.assertArgument)(String(size6) === match[1] && size6 !== 0 && size6 <= 32, \"invalid bytes type\", \"type\", type);\n (0, index_js_3.assertArgument)((0, index_js_3.dataLength)(value) === size6, `invalid value for ${type}`, \"value\", value);\n if (isArray) {\n return (0, index_js_3.getBytes)((0, index_js_3.zeroPadBytes)(value, 32));\n }\n return value;\n }\n match = type.match(regexArray);\n if (match && Array.isArray(value)) {\n const baseType = match[1];\n const count = parseInt(match[2] || String(value.length));\n (0, index_js_3.assertArgument)(count === value.length, `invalid array length for ${type}`, \"value\", value);\n const result = [];\n value.forEach(function(value2) {\n result.push(_pack(baseType, value2, true));\n });\n return (0, index_js_3.getBytes)((0, index_js_3.concat)(result));\n }\n (0, index_js_3.assertArgument)(false, \"invalid type\", \"type\", type);\n }\n function solidityPacked(types, values) {\n (0, index_js_3.assertArgument)(types.length === values.length, \"wrong number of values; expected ${ types.length }\", \"values\", values);\n const tight = [];\n types.forEach(function(type, index2) {\n tight.push(_pack(type, values[index2]));\n });\n return (0, index_js_3.hexlify)((0, index_js_3.concat)(tight));\n }\n exports3.solidityPacked = solidityPacked;\n function solidityPackedKeccak256(types, values) {\n return (0, index_js_2.keccak256)(solidityPacked(types, values));\n }\n exports3.solidityPackedKeccak256 = solidityPackedKeccak256;\n function solidityPackedSha256(types, values) {\n return (0, index_js_2.sha256)(solidityPacked(types, values));\n }\n exports3.solidityPackedSha256 = solidityPackedSha256;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/typed-data.js\n var require_typed_data2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/typed-data.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyTypedData = exports3.TypedDataEncoder = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n var id_js_1 = require_id2();\n var padding = new Uint8Array(32);\n padding.fill(0);\n var BN__1 = BigInt(-1);\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var BN_MAX_UINT256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n function hexPadRight(value) {\n const bytes = (0, index_js_4.getBytes)(value);\n const padOffset = bytes.length % 32;\n if (padOffset) {\n return (0, index_js_4.concat)([bytes, padding.slice(padOffset)]);\n }\n return (0, index_js_4.hexlify)(bytes);\n }\n var hexTrue = (0, index_js_4.toBeHex)(BN_1, 32);\n var hexFalse = (0, index_js_4.toBeHex)(BN_0, 32);\n var domainFieldTypes = {\n name: \"string\",\n version: \"string\",\n chainId: \"uint256\",\n verifyingContract: \"address\",\n salt: \"bytes32\"\n };\n var domainFieldNames = [\n \"name\",\n \"version\",\n \"chainId\",\n \"verifyingContract\",\n \"salt\"\n ];\n function checkString(key) {\n return function(value) {\n (0, index_js_4.assertArgument)(typeof value === \"string\", `invalid domain value for ${JSON.stringify(key)}`, `domain.${key}`, value);\n return value;\n };\n }\n var domainChecks = {\n name: checkString(\"name\"),\n version: checkString(\"version\"),\n chainId: function(_value) {\n const value = (0, index_js_4.getBigInt)(_value, \"domain.chainId\");\n (0, index_js_4.assertArgument)(value >= 0, \"invalid chain ID\", \"domain.chainId\", _value);\n if (Number.isSafeInteger(value)) {\n return Number(value);\n }\n return (0, index_js_4.toQuantity)(value);\n },\n verifyingContract: function(value) {\n try {\n return (0, index_js_1.getAddress)(value).toLowerCase();\n } catch (error) {\n }\n (0, index_js_4.assertArgument)(false, `invalid domain value \"verifyingContract\"`, \"domain.verifyingContract\", value);\n },\n salt: function(value) {\n const bytes = (0, index_js_4.getBytes)(value, \"domain.salt\");\n (0, index_js_4.assertArgument)(bytes.length === 32, `invalid domain value \"salt\"`, \"domain.salt\", value);\n return (0, index_js_4.hexlify)(bytes);\n }\n };\n function getBaseEncoder(type) {\n {\n const match = type.match(/^(u?)int(\\d+)$/);\n if (match) {\n const signed = match[1] === \"\";\n const width = parseInt(match[2]);\n (0, index_js_4.assertArgument)(width % 8 === 0 && width !== 0 && width <= 256 && match[2] === String(width), \"invalid numeric width\", \"type\", type);\n const boundsUpper = (0, index_js_4.mask)(BN_MAX_UINT256, signed ? width - 1 : width);\n const boundsLower = signed ? (boundsUpper + BN_1) * BN__1 : BN_0;\n return function(_value) {\n const value = (0, index_js_4.getBigInt)(_value, \"value\");\n (0, index_js_4.assertArgument)(value >= boundsLower && value <= boundsUpper, `value out-of-bounds for ${type}`, \"value\", value);\n return (0, index_js_4.toBeHex)(signed ? (0, index_js_4.toTwos)(value, 256) : value, 32);\n };\n }\n }\n {\n const match = type.match(/^bytes(\\d+)$/);\n if (match) {\n const width = parseInt(match[1]);\n (0, index_js_4.assertArgument)(width !== 0 && width <= 32 && match[1] === String(width), \"invalid bytes width\", \"type\", type);\n return function(value) {\n const bytes = (0, index_js_4.getBytes)(value);\n (0, index_js_4.assertArgument)(bytes.length === width, `invalid length for ${type}`, \"value\", value);\n return hexPadRight(value);\n };\n }\n }\n switch (type) {\n case \"address\":\n return function(value) {\n return (0, index_js_4.zeroPadValue)((0, index_js_1.getAddress)(value), 32);\n };\n case \"bool\":\n return function(value) {\n return !value ? hexFalse : hexTrue;\n };\n case \"bytes\":\n return function(value) {\n return (0, index_js_2.keccak256)(value);\n };\n case \"string\":\n return function(value) {\n return (0, id_js_1.id)(value);\n };\n }\n return null;\n }\n function encodeType2(name, fields) {\n return `${name}(${fields.map(({ name: name2, type }) => type + \" \" + name2).join(\",\")})`;\n }\n function splitArray(type) {\n const match = type.match(/^([^\\x5b]*)((\\x5b\\d*\\x5d)*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n return {\n base: match[1],\n index: match[2] + match[4],\n array: {\n base: match[1],\n prefix: match[1] + match[2],\n count: match[5] ? parseInt(match[5]) : -1\n }\n };\n }\n return { base: type };\n }\n var TypedDataEncoder = class _TypedDataEncoder {\n /**\n * The primary type for the structured [[types]].\n *\n * This is derived automatically from the [[types]], since no\n * recursion is possible, once the DAG for the types is consturcted\n * internally, the primary type must be the only remaining type with\n * no parent nodes.\n */\n primaryType;\n #types;\n /**\n * The types.\n */\n get types() {\n return JSON.parse(this.#types);\n }\n #fullTypes;\n #encoderCache;\n /**\n * Create a new **TypedDataEncoder** for %%types%%.\n *\n * This performs all necessary checking that types are valid and\n * do not violate the [[link-eip-712]] structural constraints as\n * well as computes the [[primaryType]].\n */\n constructor(_types) {\n this.#fullTypes = /* @__PURE__ */ new Map();\n this.#encoderCache = /* @__PURE__ */ new Map();\n const links = /* @__PURE__ */ new Map();\n const parents = /* @__PURE__ */ new Map();\n const subtypes = /* @__PURE__ */ new Map();\n const types = {};\n Object.keys(_types).forEach((type) => {\n types[type] = _types[type].map(({ name, type: type2 }) => {\n let { base: base4, index: index2 } = splitArray(type2);\n if (base4 === \"int\" && !_types[\"int\"]) {\n base4 = \"int256\";\n }\n if (base4 === \"uint\" && !_types[\"uint\"]) {\n base4 = \"uint256\";\n }\n return { name, type: base4 + (index2 || \"\") };\n });\n links.set(type, /* @__PURE__ */ new Set());\n parents.set(type, []);\n subtypes.set(type, /* @__PURE__ */ new Set());\n });\n this.#types = JSON.stringify(types);\n for (const name in types) {\n const uniqueNames = /* @__PURE__ */ new Set();\n for (const field of types[name]) {\n (0, index_js_4.assertArgument)(!uniqueNames.has(field.name), `duplicate variable name ${JSON.stringify(field.name)} in ${JSON.stringify(name)}`, \"types\", _types);\n uniqueNames.add(field.name);\n const baseType = splitArray(field.type).base;\n (0, index_js_4.assertArgument)(baseType !== name, `circular type reference to ${JSON.stringify(baseType)}`, \"types\", _types);\n const encoder6 = getBaseEncoder(baseType);\n if (encoder6) {\n continue;\n }\n (0, index_js_4.assertArgument)(parents.has(baseType), `unknown type ${JSON.stringify(baseType)}`, \"types\", _types);\n parents.get(baseType).push(name);\n links.get(name).add(baseType);\n }\n }\n const primaryTypes = Array.from(parents.keys()).filter((n2) => parents.get(n2).length === 0);\n (0, index_js_4.assertArgument)(primaryTypes.length !== 0, \"missing primary type\", \"types\", _types);\n (0, index_js_4.assertArgument)(primaryTypes.length === 1, `ambiguous primary types or unused types: ${primaryTypes.map((t3) => JSON.stringify(t3)).join(\", \")}`, \"types\", _types);\n (0, index_js_4.defineProperties)(this, { primaryType: primaryTypes[0] });\n function checkCircular(type, found) {\n (0, index_js_4.assertArgument)(!found.has(type), `circular type reference to ${JSON.stringify(type)}`, \"types\", _types);\n found.add(type);\n for (const child of links.get(type)) {\n if (!parents.has(child)) {\n continue;\n }\n checkCircular(child, found);\n for (const subtype of found) {\n subtypes.get(subtype).add(child);\n }\n }\n found.delete(type);\n }\n checkCircular(this.primaryType, /* @__PURE__ */ new Set());\n for (const [name, set] of subtypes) {\n const st = Array.from(set);\n st.sort();\n this.#fullTypes.set(name, encodeType2(name, types[name]) + st.map((t3) => encodeType2(t3, types[t3])).join(\"\"));\n }\n }\n /**\n * Returnthe encoder for the specific %%type%%.\n */\n getEncoder(type) {\n let encoder6 = this.#encoderCache.get(type);\n if (!encoder6) {\n encoder6 = this.#getEncoder(type);\n this.#encoderCache.set(type, encoder6);\n }\n return encoder6;\n }\n #getEncoder(type) {\n {\n const encoder6 = getBaseEncoder(type);\n if (encoder6) {\n return encoder6;\n }\n }\n const array = splitArray(type).array;\n if (array) {\n const subtype = array.prefix;\n const subEncoder = this.getEncoder(subtype);\n return (value) => {\n (0, index_js_4.assertArgument)(array.count === -1 || array.count === value.length, `array length mismatch; expected length ${array.count}`, \"value\", value);\n let result = value.map(subEncoder);\n if (this.#fullTypes.has(subtype)) {\n result = result.map(index_js_2.keccak256);\n }\n return (0, index_js_2.keccak256)((0, index_js_4.concat)(result));\n };\n }\n const fields = this.types[type];\n if (fields) {\n const encodedType = (0, id_js_1.id)(this.#fullTypes.get(type));\n return (value) => {\n const values = fields.map(({ name, type: type2 }) => {\n const result = this.getEncoder(type2)(value[name]);\n if (this.#fullTypes.has(type2)) {\n return (0, index_js_2.keccak256)(result);\n }\n return result;\n });\n values.unshift(encodedType);\n return (0, index_js_4.concat)(values);\n };\n }\n (0, index_js_4.assertArgument)(false, `unknown type: ${type}`, \"type\", type);\n }\n /**\n * Return the full type for %%name%%.\n */\n encodeType(name) {\n const result = this.#fullTypes.get(name);\n (0, index_js_4.assertArgument)(result, `unknown type: ${JSON.stringify(name)}`, \"name\", name);\n return result;\n }\n /**\n * Return the encoded %%value%% for the %%type%%.\n */\n encodeData(type, value) {\n return this.getEncoder(type)(value);\n }\n /**\n * Returns the hash of %%value%% for the type of %%name%%.\n */\n hashStruct(name, value) {\n return (0, index_js_2.keccak256)(this.encodeData(name, value));\n }\n /**\n * Return the fulled encoded %%value%% for the [[types]].\n */\n encode(value) {\n return this.encodeData(this.primaryType, value);\n }\n /**\n * Return the hash of the fully encoded %%value%% for the [[types]].\n */\n hash(value) {\n return this.hashStruct(this.primaryType, value);\n }\n /**\n * @_ignore:\n */\n _visit(type, value, callback) {\n {\n const encoder6 = getBaseEncoder(type);\n if (encoder6) {\n return callback(type, value);\n }\n }\n const array = splitArray(type).array;\n if (array) {\n (0, index_js_4.assertArgument)(array.count === -1 || array.count === value.length, `array length mismatch; expected length ${array.count}`, \"value\", value);\n return value.map((v2) => this._visit(array.prefix, v2, callback));\n }\n const fields = this.types[type];\n if (fields) {\n return fields.reduce((accum, { name, type: type2 }) => {\n accum[name] = this._visit(type2, value[name], callback);\n return accum;\n }, {});\n }\n (0, index_js_4.assertArgument)(false, `unknown type: ${type}`, \"type\", type);\n }\n /**\n * Call %%calback%% for each value in %%value%%, passing the type and\n * component within %%value%%.\n *\n * This is useful for replacing addresses or other transformation that\n * may be desired on each component, based on its type.\n */\n visit(value, callback) {\n return this._visit(this.primaryType, value, callback);\n }\n /**\n * Create a new **TypedDataEncoder** for %%types%%.\n */\n static from(types) {\n return new _TypedDataEncoder(types);\n }\n /**\n * Return the primary type for %%types%%.\n */\n static getPrimaryType(types) {\n return _TypedDataEncoder.from(types).primaryType;\n }\n /**\n * Return the hashed struct for %%value%% using %%types%% and %%name%%.\n */\n static hashStruct(name, types, value) {\n return _TypedDataEncoder.from(types).hashStruct(name, value);\n }\n /**\n * Return the domain hash for %%domain%%.\n */\n static hashDomain(domain2) {\n const domainFields = [];\n for (const name in domain2) {\n if (domain2[name] == null) {\n continue;\n }\n const type = domainFieldTypes[name];\n (0, index_js_4.assertArgument)(type, `invalid typed-data domain key: ${JSON.stringify(name)}`, \"domain\", domain2);\n domainFields.push({ name, type });\n }\n domainFields.sort((a3, b4) => {\n return domainFieldNames.indexOf(a3.name) - domainFieldNames.indexOf(b4.name);\n });\n return _TypedDataEncoder.hashStruct(\"EIP712Domain\", { EIP712Domain: domainFields }, domain2);\n }\n /**\n * Return the fully encoded [[link-eip-712]] %%value%% for %%types%% with %%domain%%.\n */\n static encode(domain2, types, value) {\n return (0, index_js_4.concat)([\n \"0x1901\",\n _TypedDataEncoder.hashDomain(domain2),\n _TypedDataEncoder.from(types).hash(value)\n ]);\n }\n /**\n * Return the hash of the fully encoded [[link-eip-712]] %%value%% for %%types%% with %%domain%%.\n */\n static hash(domain2, types, value) {\n return (0, index_js_2.keccak256)(_TypedDataEncoder.encode(domain2, types, value));\n }\n // Replaces all address types with ENS names with their looked up address\n /**\n * Resolves to the value from resolving all addresses in %%value%% for\n * %%types%% and the %%domain%%.\n */\n static async resolveNames(domain2, types, value, resolveName) {\n domain2 = Object.assign({}, domain2);\n for (const key in domain2) {\n if (domain2[key] == null) {\n delete domain2[key];\n }\n }\n const ensCache = {};\n if (domain2.verifyingContract && !(0, index_js_4.isHexString)(domain2.verifyingContract, 20)) {\n ensCache[domain2.verifyingContract] = \"0x\";\n }\n const encoder6 = _TypedDataEncoder.from(types);\n encoder6.visit(value, (type, value2) => {\n if (type === \"address\" && !(0, index_js_4.isHexString)(value2, 20)) {\n ensCache[value2] = \"0x\";\n }\n return value2;\n });\n for (const name in ensCache) {\n ensCache[name] = await resolveName(name);\n }\n if (domain2.verifyingContract && ensCache[domain2.verifyingContract]) {\n domain2.verifyingContract = ensCache[domain2.verifyingContract];\n }\n value = encoder6.visit(value, (type, value2) => {\n if (type === \"address\" && ensCache[value2]) {\n return ensCache[value2];\n }\n return value2;\n });\n return { domain: domain2, value };\n }\n /**\n * Returns the JSON-encoded payload expected by nodes which implement\n * the JSON-RPC [[link-eip-712]] method.\n */\n static getPayload(domain2, types, value) {\n _TypedDataEncoder.hashDomain(domain2);\n const domainValues = {};\n const domainTypes = [];\n domainFieldNames.forEach((name) => {\n const value2 = domain2[name];\n if (value2 == null) {\n return;\n }\n domainValues[name] = domainChecks[name](value2);\n domainTypes.push({ name, type: domainFieldTypes[name] });\n });\n const encoder6 = _TypedDataEncoder.from(types);\n types = encoder6.types;\n const typesWithDomain = Object.assign({}, types);\n (0, index_js_4.assertArgument)(typesWithDomain.EIP712Domain == null, \"types must not contain EIP712Domain type\", \"types.EIP712Domain\", types);\n typesWithDomain.EIP712Domain = domainTypes;\n encoder6.encode(value);\n return {\n types: typesWithDomain,\n domain: domainValues,\n primaryType: encoder6.primaryType,\n message: encoder6.visit(value, (type, value2) => {\n if (type.match(/^bytes(\\d*)/)) {\n return (0, index_js_4.hexlify)((0, index_js_4.getBytes)(value2));\n }\n if (type.match(/^u?int/)) {\n return (0, index_js_4.getBigInt)(value2).toString();\n }\n switch (type) {\n case \"address\":\n return value2.toLowerCase();\n case \"bool\":\n return !!value2;\n case \"string\":\n (0, index_js_4.assertArgument)(typeof value2 === \"string\", \"invalid string\", \"value\", value2);\n return value2;\n }\n (0, index_js_4.assertArgument)(false, \"unsupported type\", \"type\", type);\n })\n };\n }\n };\n exports3.TypedDataEncoder = TypedDataEncoder;\n function verifyTypedData2(domain2, types, value, signature) {\n return (0, index_js_3.recoverAddress)(TypedDataEncoder.hash(domain2, types, value), signature);\n }\n exports3.verifyTypedData = verifyTypedData2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/index.js\n var require_hash2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyTypedData = exports3.TypedDataEncoder = exports3.solidityPackedSha256 = exports3.solidityPackedKeccak256 = exports3.solidityPacked = exports3.verifyMessage = exports3.hashMessage = exports3.dnsEncode = exports3.namehash = exports3.isValidName = exports3.ensNormalize = exports3.id = exports3.verifyAuthorization = exports3.hashAuthorization = void 0;\n var authorization_js_1 = require_authorization2();\n Object.defineProperty(exports3, \"hashAuthorization\", { enumerable: true, get: function() {\n return authorization_js_1.hashAuthorization;\n } });\n Object.defineProperty(exports3, \"verifyAuthorization\", { enumerable: true, get: function() {\n return authorization_js_1.verifyAuthorization;\n } });\n var id_js_1 = require_id2();\n Object.defineProperty(exports3, \"id\", { enumerable: true, get: function() {\n return id_js_1.id;\n } });\n var namehash_js_1 = require_namehash2();\n Object.defineProperty(exports3, \"ensNormalize\", { enumerable: true, get: function() {\n return namehash_js_1.ensNormalize;\n } });\n Object.defineProperty(exports3, \"isValidName\", { enumerable: true, get: function() {\n return namehash_js_1.isValidName;\n } });\n Object.defineProperty(exports3, \"namehash\", { enumerable: true, get: function() {\n return namehash_js_1.namehash;\n } });\n Object.defineProperty(exports3, \"dnsEncode\", { enumerable: true, get: function() {\n return namehash_js_1.dnsEncode;\n } });\n var message_js_1 = require_message2();\n Object.defineProperty(exports3, \"hashMessage\", { enumerable: true, get: function() {\n return message_js_1.hashMessage;\n } });\n Object.defineProperty(exports3, \"verifyMessage\", { enumerable: true, get: function() {\n return message_js_1.verifyMessage;\n } });\n var solidity_js_1 = require_solidity();\n Object.defineProperty(exports3, \"solidityPacked\", { enumerable: true, get: function() {\n return solidity_js_1.solidityPacked;\n } });\n Object.defineProperty(exports3, \"solidityPackedKeccak256\", { enumerable: true, get: function() {\n return solidity_js_1.solidityPackedKeccak256;\n } });\n Object.defineProperty(exports3, \"solidityPackedSha256\", { enumerable: true, get: function() {\n return solidity_js_1.solidityPackedSha256;\n } });\n var typed_data_js_1 = require_typed_data2();\n Object.defineProperty(exports3, \"TypedDataEncoder\", { enumerable: true, get: function() {\n return typed_data_js_1.TypedDataEncoder;\n } });\n Object.defineProperty(exports3, \"verifyTypedData\", { enumerable: true, get: function() {\n return typed_data_js_1.verifyTypedData;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/fragments.js\n var require_fragments2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/fragments.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.StructFragment = exports3.FunctionFragment = exports3.FallbackFragment = exports3.ConstructorFragment = exports3.EventFragment = exports3.ErrorFragment = exports3.NamedFragment = exports3.Fragment = exports3.ParamType = void 0;\n var index_js_1 = require_utils8();\n var index_js_2 = require_hash2();\n function setify(items) {\n const result = /* @__PURE__ */ new Set();\n items.forEach((k4) => result.add(k4));\n return Object.freeze(result);\n }\n var _kwVisibDeploy = \"external public payable override\";\n var KwVisibDeploy = setify(_kwVisibDeploy.split(\" \"));\n var _kwVisib = \"constant external internal payable private public pure view override\";\n var KwVisib = setify(_kwVisib.split(\" \"));\n var _kwTypes = \"constructor error event fallback function receive struct\";\n var KwTypes = setify(_kwTypes.split(\" \"));\n var _kwModifiers = \"calldata memory storage payable indexed\";\n var KwModifiers = setify(_kwModifiers.split(\" \"));\n var _kwOther = \"tuple returns\";\n var _keywords = [_kwTypes, _kwModifiers, _kwOther, _kwVisib].join(\" \");\n var Keywords = setify(_keywords.split(\" \"));\n var SimpleTokens = {\n \"(\": \"OPEN_PAREN\",\n \")\": \"CLOSE_PAREN\",\n \"[\": \"OPEN_BRACKET\",\n \"]\": \"CLOSE_BRACKET\",\n \",\": \"COMMA\",\n \"@\": \"AT\"\n };\n var regexWhitespacePrefix = new RegExp(\"^(\\\\s*)\");\n var regexNumberPrefix = new RegExp(\"^([0-9]+)\");\n var regexIdPrefix = new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)\");\n var regexId = new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)$\");\n var regexType = new RegExp(\"^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$\");\n var TokenString = class _TokenString {\n #offset;\n #tokens;\n get offset() {\n return this.#offset;\n }\n get length() {\n return this.#tokens.length - this.#offset;\n }\n constructor(tokens) {\n this.#offset = 0;\n this.#tokens = tokens.slice();\n }\n clone() {\n return new _TokenString(this.#tokens);\n }\n reset() {\n this.#offset = 0;\n }\n #subTokenString(from14 = 0, to = 0) {\n return new _TokenString(this.#tokens.slice(from14, to).map((t3) => {\n return Object.freeze(Object.assign({}, t3, {\n match: t3.match - from14,\n linkBack: t3.linkBack - from14,\n linkNext: t3.linkNext - from14\n }));\n }));\n }\n // Pops and returns the value of the next token, if it is a keyword in allowed; throws if out of tokens\n popKeyword(allowed) {\n const top = this.peek();\n if (top.type !== \"KEYWORD\" || !allowed.has(top.text)) {\n throw new Error(`expected keyword ${top.text}`);\n }\n return this.pop().text;\n }\n // Pops and returns the value of the next token if it is `type`; throws if out of tokens\n popType(type) {\n if (this.peek().type !== type) {\n const top = this.peek();\n throw new Error(`expected ${type}; got ${top.type} ${JSON.stringify(top.text)}`);\n }\n return this.pop().text;\n }\n // Pops and returns a \"(\" TOKENS \")\"\n popParen() {\n const top = this.peek();\n if (top.type !== \"OPEN_PAREN\") {\n throw new Error(\"bad start\");\n }\n const result = this.#subTokenString(this.#offset + 1, top.match + 1);\n this.#offset = top.match + 1;\n return result;\n }\n // Pops and returns the items within \"(\" ITEM1 \",\" ITEM2 \",\" ... \")\"\n popParams() {\n const top = this.peek();\n if (top.type !== \"OPEN_PAREN\") {\n throw new Error(\"bad start\");\n }\n const result = [];\n while (this.#offset < top.match - 1) {\n const link = this.peek().linkNext;\n result.push(this.#subTokenString(this.#offset + 1, link));\n this.#offset = link;\n }\n this.#offset = top.match + 1;\n return result;\n }\n // Returns the top Token, throwing if out of tokens\n peek() {\n if (this.#offset >= this.#tokens.length) {\n throw new Error(\"out-of-bounds\");\n }\n return this.#tokens[this.#offset];\n }\n // Returns the next value, if it is a keyword in `allowed`\n peekKeyword(allowed) {\n const top = this.peekType(\"KEYWORD\");\n return top != null && allowed.has(top) ? top : null;\n }\n // Returns the value of the next token if it is `type`\n peekType(type) {\n if (this.length === 0) {\n return null;\n }\n const top = this.peek();\n return top.type === type ? top.text : null;\n }\n // Returns the next token; throws if out of tokens\n pop() {\n const result = this.peek();\n this.#offset++;\n return result;\n }\n toString() {\n const tokens = [];\n for (let i3 = this.#offset; i3 < this.#tokens.length; i3++) {\n const token = this.#tokens[i3];\n tokens.push(`${token.type}:${token.text}`);\n }\n return ``;\n }\n };\n function lex(text) {\n const tokens = [];\n const throwError = (message) => {\n const token = offset < text.length ? JSON.stringify(text[offset]) : \"$EOI\";\n throw new Error(`invalid token ${token} at ${offset}: ${message}`);\n };\n let brackets = [];\n let commas = [];\n let offset = 0;\n while (offset < text.length) {\n let cur = text.substring(offset);\n let match = cur.match(regexWhitespacePrefix);\n if (match) {\n offset += match[1].length;\n cur = text.substring(offset);\n }\n const token = { depth: brackets.length, linkBack: -1, linkNext: -1, match: -1, type: \"\", text: \"\", offset, value: -1 };\n tokens.push(token);\n let type = SimpleTokens[cur[0]] || \"\";\n if (type) {\n token.type = type;\n token.text = cur[0];\n offset++;\n if (type === \"OPEN_PAREN\") {\n brackets.push(tokens.length - 1);\n commas.push(tokens.length - 1);\n } else if (type == \"CLOSE_PAREN\") {\n if (brackets.length === 0) {\n throwError(\"no matching open bracket\");\n }\n token.match = brackets.pop();\n tokens[token.match].match = tokens.length - 1;\n token.depth--;\n token.linkBack = commas.pop();\n tokens[token.linkBack].linkNext = tokens.length - 1;\n } else if (type === \"COMMA\") {\n token.linkBack = commas.pop();\n tokens[token.linkBack].linkNext = tokens.length - 1;\n commas.push(tokens.length - 1);\n } else if (type === \"OPEN_BRACKET\") {\n token.type = \"BRACKET\";\n } else if (type === \"CLOSE_BRACKET\") {\n let suffix = tokens.pop().text;\n if (tokens.length > 0 && tokens[tokens.length - 1].type === \"NUMBER\") {\n const value = tokens.pop().text;\n suffix = value + suffix;\n tokens[tokens.length - 1].value = (0, index_js_1.getNumber)(value);\n }\n if (tokens.length === 0 || tokens[tokens.length - 1].type !== \"BRACKET\") {\n throw new Error(\"missing opening bracket\");\n }\n tokens[tokens.length - 1].text += suffix;\n }\n continue;\n }\n match = cur.match(regexIdPrefix);\n if (match) {\n token.text = match[1];\n offset += token.text.length;\n if (Keywords.has(token.text)) {\n token.type = \"KEYWORD\";\n continue;\n }\n if (token.text.match(regexType)) {\n token.type = \"TYPE\";\n continue;\n }\n token.type = \"ID\";\n continue;\n }\n match = cur.match(regexNumberPrefix);\n if (match) {\n token.text = match[1];\n token.type = \"NUMBER\";\n offset += token.text.length;\n continue;\n }\n throw new Error(`unexpected token ${JSON.stringify(cur[0])} at position ${offset}`);\n }\n return new TokenString(tokens.map((t3) => Object.freeze(t3)));\n }\n function allowSingle(set, allowed) {\n let included = [];\n for (const key in allowed.keys()) {\n if (set.has(key)) {\n included.push(key);\n }\n }\n if (included.length > 1) {\n throw new Error(`conflicting types: ${included.join(\", \")}`);\n }\n }\n function consumeName(type, tokens) {\n if (tokens.peekKeyword(KwTypes)) {\n const keyword = tokens.pop().text;\n if (keyword !== type) {\n throw new Error(`expected ${type}, got ${keyword}`);\n }\n }\n return tokens.popType(\"ID\");\n }\n function consumeKeywords(tokens, allowed) {\n const keywords = /* @__PURE__ */ new Set();\n while (true) {\n const keyword = tokens.peekType(\"KEYWORD\");\n if (keyword == null || allowed && !allowed.has(keyword)) {\n break;\n }\n tokens.pop();\n if (keywords.has(keyword)) {\n throw new Error(`duplicate keywords: ${JSON.stringify(keyword)}`);\n }\n keywords.add(keyword);\n }\n return Object.freeze(keywords);\n }\n function consumeMutability(tokens) {\n let modifiers2 = consumeKeywords(tokens, KwVisib);\n allowSingle(modifiers2, setify(\"constant payable nonpayable\".split(\" \")));\n allowSingle(modifiers2, setify(\"pure view payable nonpayable\".split(\" \")));\n if (modifiers2.has(\"view\")) {\n return \"view\";\n }\n if (modifiers2.has(\"pure\")) {\n return \"pure\";\n }\n if (modifiers2.has(\"payable\")) {\n return \"payable\";\n }\n if (modifiers2.has(\"nonpayable\")) {\n return \"nonpayable\";\n }\n if (modifiers2.has(\"constant\")) {\n return \"view\";\n }\n return \"nonpayable\";\n }\n function consumeParams(tokens, allowIndexed) {\n return tokens.popParams().map((t3) => ParamType.from(t3, allowIndexed));\n }\n function consumeGas(tokens) {\n if (tokens.peekType(\"AT\")) {\n tokens.pop();\n if (tokens.peekType(\"NUMBER\")) {\n return (0, index_js_1.getBigInt)(tokens.pop().text);\n }\n throw new Error(\"invalid gas\");\n }\n return null;\n }\n function consumeEoi(tokens) {\n if (tokens.length) {\n throw new Error(`unexpected tokens at offset ${tokens.offset}: ${tokens.toString()}`);\n }\n }\n var regexArrayType = new RegExp(/^(.*)\\[([0-9]*)\\]$/);\n function verifyBasicType(type) {\n const match = type.match(regexType);\n (0, index_js_1.assertArgument)(match, \"invalid type\", \"type\", type);\n if (type === \"uint\") {\n return \"uint256\";\n }\n if (type === \"int\") {\n return \"int256\";\n }\n if (match[2]) {\n const length = parseInt(match[2]);\n (0, index_js_1.assertArgument)(length !== 0 && length <= 32, \"invalid bytes length\", \"type\", type);\n } else if (match[3]) {\n const size6 = parseInt(match[3]);\n (0, index_js_1.assertArgument)(size6 !== 0 && size6 <= 256 && size6 % 8 === 0, \"invalid numeric width\", \"type\", type);\n }\n return type;\n }\n var _guard = {};\n var internal = Symbol.for(\"_ethers_internal\");\n var ParamTypeInternal = \"_ParamTypeInternal\";\n var ErrorFragmentInternal = \"_ErrorInternal\";\n var EventFragmentInternal = \"_EventInternal\";\n var ConstructorFragmentInternal = \"_ConstructorInternal\";\n var FallbackFragmentInternal = \"_FallbackInternal\";\n var FunctionFragmentInternal = \"_FunctionInternal\";\n var StructFragmentInternal = \"_StructInternal\";\n var ParamType = class _ParamType {\n /**\n * The local name of the parameter (or ``\"\"`` if unbound)\n */\n name;\n /**\n * The fully qualified type (e.g. ``\"address\"``, ``\"tuple(address)\"``,\n * ``\"uint256[3][]\"``)\n */\n type;\n /**\n * The base type (e.g. ``\"address\"``, ``\"tuple\"``, ``\"array\"``)\n */\n baseType;\n /**\n * True if the parameters is indexed.\n *\n * For non-indexable types this is ``null``.\n */\n indexed;\n /**\n * The components for the tuple.\n *\n * For non-tuple types this is ``null``.\n */\n components;\n /**\n * The array length, or ``-1`` for dynamic-lengthed arrays.\n *\n * For non-array types this is ``null``.\n */\n arrayLength;\n /**\n * The type of each child in the array.\n *\n * For non-array types this is ``null``.\n */\n arrayChildren;\n /**\n * @private\n */\n constructor(guard, name, type, baseType, indexed, components, arrayLength, arrayChildren) {\n (0, index_js_1.assertPrivate)(guard, _guard, \"ParamType\");\n Object.defineProperty(this, internal, { value: ParamTypeInternal });\n if (components) {\n components = Object.freeze(components.slice());\n }\n if (baseType === \"array\") {\n if (arrayLength == null || arrayChildren == null) {\n throw new Error(\"\");\n }\n } else if (arrayLength != null || arrayChildren != null) {\n throw new Error(\"\");\n }\n if (baseType === \"tuple\") {\n if (components == null) {\n throw new Error(\"\");\n }\n } else if (components != null) {\n throw new Error(\"\");\n }\n (0, index_js_1.defineProperties)(this, {\n name,\n type,\n baseType,\n indexed,\n components,\n arrayLength,\n arrayChildren\n });\n }\n /**\n * Return a string representation of this type.\n *\n * For example,\n *\n * ``sighash\" => \"(uint256,address)\"``\n *\n * ``\"minimal\" => \"tuple(uint256,address) indexed\"``\n *\n * ``\"full\" => \"tuple(uint256 foo, address bar) indexed baz\"``\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n const name = this.name || \"\";\n if (this.isArray()) {\n const result3 = JSON.parse(this.arrayChildren.format(\"json\"));\n result3.name = name;\n result3.type += `[${this.arrayLength < 0 ? \"\" : String(this.arrayLength)}]`;\n return JSON.stringify(result3);\n }\n const result2 = {\n type: this.baseType === \"tuple\" ? \"tuple\" : this.type,\n name\n };\n if (typeof this.indexed === \"boolean\") {\n result2.indexed = this.indexed;\n }\n if (this.isTuple()) {\n result2.components = this.components.map((c4) => JSON.parse(c4.format(format)));\n }\n return JSON.stringify(result2);\n }\n let result = \"\";\n if (this.isArray()) {\n result += this.arrayChildren.format(format);\n result += `[${this.arrayLength < 0 ? \"\" : String(this.arrayLength)}]`;\n } else {\n if (this.isTuple()) {\n result += \"(\" + this.components.map((comp) => comp.format(format)).join(format === \"full\" ? \", \" : \",\") + \")\";\n } else {\n result += this.type;\n }\n }\n if (format !== \"sighash\") {\n if (this.indexed === true) {\n result += \" indexed\";\n }\n if (format === \"full\" && this.name) {\n result += \" \" + this.name;\n }\n }\n return result;\n }\n /**\n * Returns true if %%this%% is an Array type.\n *\n * This provides a type gaurd ensuring that [[arrayChildren]]\n * and [[arrayLength]] are non-null.\n */\n isArray() {\n return this.baseType === \"array\";\n }\n /**\n * Returns true if %%this%% is a Tuple type.\n *\n * This provides a type gaurd ensuring that [[components]]\n * is non-null.\n */\n isTuple() {\n return this.baseType === \"tuple\";\n }\n /**\n * Returns true if %%this%% is an Indexable type.\n *\n * This provides a type gaurd ensuring that [[indexed]]\n * is non-null.\n */\n isIndexable() {\n return this.indexed != null;\n }\n /**\n * Walks the **ParamType** with %%value%%, calling %%process%%\n * on each type, destructing the %%value%% recursively.\n */\n walk(value, process2) {\n if (this.isArray()) {\n if (!Array.isArray(value)) {\n throw new Error(\"invalid array value\");\n }\n if (this.arrayLength !== -1 && value.length !== this.arrayLength) {\n throw new Error(\"array is wrong length\");\n }\n const _this = this;\n return value.map((v2) => _this.arrayChildren.walk(v2, process2));\n }\n if (this.isTuple()) {\n if (!Array.isArray(value)) {\n throw new Error(\"invalid tuple value\");\n }\n if (value.length !== this.components.length) {\n throw new Error(\"array is wrong length\");\n }\n const _this = this;\n return value.map((v2, i3) => _this.components[i3].walk(v2, process2));\n }\n return process2(this.type, value);\n }\n #walkAsync(promises, value, process2, setValue) {\n if (this.isArray()) {\n if (!Array.isArray(value)) {\n throw new Error(\"invalid array value\");\n }\n if (this.arrayLength !== -1 && value.length !== this.arrayLength) {\n throw new Error(\"array is wrong length\");\n }\n const childType = this.arrayChildren;\n const result2 = value.slice();\n result2.forEach((value2, index2) => {\n childType.#walkAsync(promises, value2, process2, (value3) => {\n result2[index2] = value3;\n });\n });\n setValue(result2);\n return;\n }\n if (this.isTuple()) {\n const components = this.components;\n let result2;\n if (Array.isArray(value)) {\n result2 = value.slice();\n } else {\n if (value == null || typeof value !== \"object\") {\n throw new Error(\"invalid tuple value\");\n }\n result2 = components.map((param) => {\n if (!param.name) {\n throw new Error(\"cannot use object value with unnamed components\");\n }\n if (!(param.name in value)) {\n throw new Error(`missing value for component ${param.name}`);\n }\n return value[param.name];\n });\n }\n if (result2.length !== this.components.length) {\n throw new Error(\"array is wrong length\");\n }\n result2.forEach((value2, index2) => {\n components[index2].#walkAsync(promises, value2, process2, (value3) => {\n result2[index2] = value3;\n });\n });\n setValue(result2);\n return;\n }\n const result = process2(this.type, value);\n if (result.then) {\n promises.push(async function() {\n setValue(await result);\n }());\n } else {\n setValue(result);\n }\n }\n /**\n * Walks the **ParamType** with %%value%%, asynchronously calling\n * %%process%% on each type, destructing the %%value%% recursively.\n *\n * This can be used to resolve ENS names by walking and resolving each\n * ``\"address\"`` type.\n */\n async walkAsync(value, process2) {\n const promises = [];\n const result = [value];\n this.#walkAsync(promises, value, process2, (value2) => {\n result[0] = value2;\n });\n if (promises.length) {\n await Promise.all(promises);\n }\n return result[0];\n }\n /**\n * Creates a new **ParamType** for %%obj%%.\n *\n * If %%allowIndexed%% then the ``indexed`` keyword is permitted,\n * otherwise the ``indexed`` keyword will throw an error.\n */\n static from(obj, allowIndexed) {\n if (_ParamType.isParamType(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _ParamType.from(lex(obj), allowIndexed);\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid param type\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n let type2 = \"\", baseType = \"\";\n let comps = null;\n if (consumeKeywords(obj, setify([\"tuple\"])).has(\"tuple\") || obj.peekType(\"OPEN_PAREN\")) {\n baseType = \"tuple\";\n comps = obj.popParams().map((t3) => _ParamType.from(t3));\n type2 = `tuple(${comps.map((c4) => c4.format()).join(\",\")})`;\n } else {\n type2 = verifyBasicType(obj.popType(\"TYPE\"));\n baseType = type2;\n }\n let arrayChildren = null;\n let arrayLength = null;\n while (obj.length && obj.peekType(\"BRACKET\")) {\n const bracket = obj.pop();\n arrayChildren = new _ParamType(_guard, \"\", type2, baseType, null, comps, arrayLength, arrayChildren);\n arrayLength = bracket.value;\n type2 += bracket.text;\n baseType = \"array\";\n comps = null;\n }\n let indexed2 = null;\n const keywords = consumeKeywords(obj, KwModifiers);\n if (keywords.has(\"indexed\")) {\n if (!allowIndexed) {\n throw new Error(\"\");\n }\n indexed2 = true;\n }\n const name2 = obj.peekType(\"ID\") ? obj.pop().text : \"\";\n if (obj.length) {\n throw new Error(\"leftover tokens\");\n }\n return new _ParamType(_guard, name2, type2, baseType, indexed2, comps, arrayLength, arrayChildren);\n }\n const name = obj.name;\n (0, index_js_1.assertArgument)(!name || typeof name === \"string\" && name.match(regexId), \"invalid name\", \"obj.name\", name);\n let indexed = obj.indexed;\n if (indexed != null) {\n (0, index_js_1.assertArgument)(allowIndexed, \"parameter cannot be indexed\", \"obj.indexed\", obj.indexed);\n indexed = !!indexed;\n }\n let type = obj.type;\n let arrayMatch = type.match(regexArrayType);\n if (arrayMatch) {\n const arrayLength = parseInt(arrayMatch[2] || \"-1\");\n const arrayChildren = _ParamType.from({\n type: arrayMatch[1],\n components: obj.components\n });\n return new _ParamType(_guard, name || \"\", type, \"array\", indexed, null, arrayLength, arrayChildren);\n }\n if (type === \"tuple\" || type.startsWith(\n \"tuple(\"\n /* fix: ) */\n ) || type.startsWith(\n \"(\"\n /* fix: ) */\n )) {\n const comps = obj.components != null ? obj.components.map((c4) => _ParamType.from(c4)) : null;\n const tuple = new _ParamType(_guard, name || \"\", type, \"tuple\", indexed, comps, null, null);\n return tuple;\n }\n type = verifyBasicType(obj.type);\n return new _ParamType(_guard, name || \"\", type, type, indexed, null, null, null);\n }\n /**\n * Returns true if %%value%% is a **ParamType**.\n */\n static isParamType(value) {\n return value && value[internal] === ParamTypeInternal;\n }\n };\n exports3.ParamType = ParamType;\n var Fragment = class _Fragment {\n /**\n * The type of the fragment.\n */\n type;\n /**\n * The inputs for the fragment.\n */\n inputs;\n /**\n * @private\n */\n constructor(guard, type, inputs) {\n (0, index_js_1.assertPrivate)(guard, _guard, \"Fragment\");\n inputs = Object.freeze(inputs.slice());\n (0, index_js_1.defineProperties)(this, { type, inputs });\n }\n /**\n * Creates a new **Fragment** for %%obj%%, wich can be any supported\n * ABI frgament type.\n */\n static from(obj) {\n if (typeof obj === \"string\") {\n try {\n _Fragment.from(JSON.parse(obj));\n } catch (e2) {\n }\n return _Fragment.from(lex(obj));\n }\n if (obj instanceof TokenString) {\n const type = obj.peekKeyword(KwTypes);\n switch (type) {\n case \"constructor\":\n return ConstructorFragment.from(obj);\n case \"error\":\n return ErrorFragment.from(obj);\n case \"event\":\n return EventFragment.from(obj);\n case \"fallback\":\n case \"receive\":\n return FallbackFragment.from(obj);\n case \"function\":\n return FunctionFragment.from(obj);\n case \"struct\":\n return StructFragment.from(obj);\n }\n } else if (typeof obj === \"object\") {\n switch (obj.type) {\n case \"constructor\":\n return ConstructorFragment.from(obj);\n case \"error\":\n return ErrorFragment.from(obj);\n case \"event\":\n return EventFragment.from(obj);\n case \"fallback\":\n case \"receive\":\n return FallbackFragment.from(obj);\n case \"function\":\n return FunctionFragment.from(obj);\n case \"struct\":\n return StructFragment.from(obj);\n }\n (0, index_js_1.assert)(false, `unsupported type: ${obj.type}`, \"UNSUPPORTED_OPERATION\", {\n operation: \"Fragment.from\"\n });\n }\n (0, index_js_1.assertArgument)(false, \"unsupported frgament object\", \"obj\", obj);\n }\n /**\n * Returns true if %%value%% is a [[ConstructorFragment]].\n */\n static isConstructor(value) {\n return ConstructorFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is an [[ErrorFragment]].\n */\n static isError(value) {\n return ErrorFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is an [[EventFragment]].\n */\n static isEvent(value) {\n return EventFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is a [[FunctionFragment]].\n */\n static isFunction(value) {\n return FunctionFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is a [[StructFragment]].\n */\n static isStruct(value) {\n return StructFragment.isFragment(value);\n }\n };\n exports3.Fragment = Fragment;\n var NamedFragment = class extends Fragment {\n /**\n * The name of the fragment.\n */\n name;\n /**\n * @private\n */\n constructor(guard, type, name, inputs) {\n super(guard, type, inputs);\n (0, index_js_1.assertArgument)(typeof name === \"string\" && name.match(regexId), \"invalid identifier\", \"name\", name);\n inputs = Object.freeze(inputs.slice());\n (0, index_js_1.defineProperties)(this, { name });\n }\n };\n exports3.NamedFragment = NamedFragment;\n function joinParams(format, params) {\n return \"(\" + params.map((p4) => p4.format(format)).join(format === \"full\" ? \", \" : \",\") + \")\";\n }\n var ErrorFragment = class _ErrorFragment extends NamedFragment {\n /**\n * @private\n */\n constructor(guard, name, inputs) {\n super(guard, \"error\", name, inputs);\n Object.defineProperty(this, internal, { value: ErrorFragmentInternal });\n }\n /**\n * The Custom Error selector.\n */\n get selector() {\n return (0, index_js_2.id)(this.format(\"sighash\")).substring(0, 10);\n }\n /**\n * Returns a string representation of this fragment as %%format%%.\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n return JSON.stringify({\n type: \"error\",\n name: this.name,\n inputs: this.inputs.map((input) => JSON.parse(input.format(format)))\n });\n }\n const result = [];\n if (format !== \"sighash\") {\n result.push(\"error\");\n }\n result.push(this.name + joinParams(format, this.inputs));\n return result.join(\" \");\n }\n /**\n * Returns a new **ErrorFragment** for %%obj%%.\n */\n static from(obj) {\n if (_ErrorFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n return _ErrorFragment.from(lex(obj));\n } else if (obj instanceof TokenString) {\n const name = consumeName(\"error\", obj);\n const inputs = consumeParams(obj);\n consumeEoi(obj);\n return new _ErrorFragment(_guard, name, inputs);\n }\n return new _ErrorFragment(_guard, obj.name, obj.inputs ? obj.inputs.map(ParamType.from) : []);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is an\n * **ErrorFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === ErrorFragmentInternal;\n }\n };\n exports3.ErrorFragment = ErrorFragment;\n var EventFragment = class _EventFragment extends NamedFragment {\n /**\n * Whether this event is anonymous.\n */\n anonymous;\n /**\n * @private\n */\n constructor(guard, name, inputs, anonymous) {\n super(guard, \"event\", name, inputs);\n Object.defineProperty(this, internal, { value: EventFragmentInternal });\n (0, index_js_1.defineProperties)(this, { anonymous });\n }\n /**\n * The Event topic hash.\n */\n get topicHash() {\n return (0, index_js_2.id)(this.format(\"sighash\"));\n }\n /**\n * Returns a string representation of this event as %%format%%.\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n return JSON.stringify({\n type: \"event\",\n anonymous: this.anonymous,\n name: this.name,\n inputs: this.inputs.map((i3) => JSON.parse(i3.format(format)))\n });\n }\n const result = [];\n if (format !== \"sighash\") {\n result.push(\"event\");\n }\n result.push(this.name + joinParams(format, this.inputs));\n if (format !== \"sighash\" && this.anonymous) {\n result.push(\"anonymous\");\n }\n return result.join(\" \");\n }\n /**\n * Return the topic hash for an event with %%name%% and %%params%%.\n */\n static getTopicHash(name, params) {\n params = (params || []).map((p4) => ParamType.from(p4));\n const fragment = new _EventFragment(_guard, name, params, false);\n return fragment.topicHash;\n }\n /**\n * Returns a new **EventFragment** for %%obj%%.\n */\n static from(obj) {\n if (_EventFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _EventFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid event fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n const name = consumeName(\"event\", obj);\n const inputs = consumeParams(obj, true);\n const anonymous = !!consumeKeywords(obj, setify([\"anonymous\"])).has(\"anonymous\");\n consumeEoi(obj);\n return new _EventFragment(_guard, name, inputs, anonymous);\n }\n return new _EventFragment(_guard, obj.name, obj.inputs ? obj.inputs.map((p4) => ParamType.from(p4, true)) : [], !!obj.anonymous);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is an\n * **EventFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === EventFragmentInternal;\n }\n };\n exports3.EventFragment = EventFragment;\n var ConstructorFragment = class _ConstructorFragment extends Fragment {\n /**\n * Whether the constructor can receive an endowment.\n */\n payable;\n /**\n * The recommended gas limit for deployment or ``null``.\n */\n gas;\n /**\n * @private\n */\n constructor(guard, type, inputs, payable, gas) {\n super(guard, type, inputs);\n Object.defineProperty(this, internal, { value: ConstructorFragmentInternal });\n (0, index_js_1.defineProperties)(this, { payable, gas });\n }\n /**\n * Returns a string representation of this constructor as %%format%%.\n */\n format(format) {\n (0, index_js_1.assert)(format != null && format !== \"sighash\", \"cannot format a constructor for sighash\", \"UNSUPPORTED_OPERATION\", { operation: \"format(sighash)\" });\n if (format === \"json\") {\n return JSON.stringify({\n type: \"constructor\",\n stateMutability: this.payable ? \"payable\" : \"undefined\",\n payable: this.payable,\n gas: this.gas != null ? this.gas : void 0,\n inputs: this.inputs.map((i3) => JSON.parse(i3.format(format)))\n });\n }\n const result = [`constructor${joinParams(format, this.inputs)}`];\n if (this.payable) {\n result.push(\"payable\");\n }\n if (this.gas != null) {\n result.push(`@${this.gas.toString()}`);\n }\n return result.join(\" \");\n }\n /**\n * Returns a new **ConstructorFragment** for %%obj%%.\n */\n static from(obj) {\n if (_ConstructorFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _ConstructorFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid constuctor fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n consumeKeywords(obj, setify([\"constructor\"]));\n const inputs = consumeParams(obj);\n const payable = !!consumeKeywords(obj, KwVisibDeploy).has(\"payable\");\n const gas = consumeGas(obj);\n consumeEoi(obj);\n return new _ConstructorFragment(_guard, \"constructor\", inputs, payable, gas);\n }\n return new _ConstructorFragment(_guard, \"constructor\", obj.inputs ? obj.inputs.map(ParamType.from) : [], !!obj.payable, obj.gas != null ? obj.gas : null);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **ConstructorFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === ConstructorFragmentInternal;\n }\n };\n exports3.ConstructorFragment = ConstructorFragment;\n var FallbackFragment = class _FallbackFragment extends Fragment {\n /**\n * If the function can be sent value during invocation.\n */\n payable;\n constructor(guard, inputs, payable) {\n super(guard, \"fallback\", inputs);\n Object.defineProperty(this, internal, { value: FallbackFragmentInternal });\n (0, index_js_1.defineProperties)(this, { payable });\n }\n /**\n * Returns a string representation of this fallback as %%format%%.\n */\n format(format) {\n const type = this.inputs.length === 0 ? \"receive\" : \"fallback\";\n if (format === \"json\") {\n const stateMutability = this.payable ? \"payable\" : \"nonpayable\";\n return JSON.stringify({ type, stateMutability });\n }\n return `${type}()${this.payable ? \" payable\" : \"\"}`;\n }\n /**\n * Returns a new **FallbackFragment** for %%obj%%.\n */\n static from(obj) {\n if (_FallbackFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _FallbackFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid fallback fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n const errorObj = obj.toString();\n const topIsValid = obj.peekKeyword(setify([\"fallback\", \"receive\"]));\n (0, index_js_1.assertArgument)(topIsValid, \"type must be fallback or receive\", \"obj\", errorObj);\n const type = obj.popKeyword(setify([\"fallback\", \"receive\"]));\n if (type === \"receive\") {\n const inputs2 = consumeParams(obj);\n (0, index_js_1.assertArgument)(inputs2.length === 0, `receive cannot have arguments`, \"obj.inputs\", inputs2);\n consumeKeywords(obj, setify([\"payable\"]));\n consumeEoi(obj);\n return new _FallbackFragment(_guard, [], true);\n }\n let inputs = consumeParams(obj);\n if (inputs.length) {\n (0, index_js_1.assertArgument)(inputs.length === 1 && inputs[0].type === \"bytes\", \"invalid fallback inputs\", \"obj.inputs\", inputs.map((i3) => i3.format(\"minimal\")).join(\", \"));\n } else {\n inputs = [ParamType.from(\"bytes\")];\n }\n const mutability = consumeMutability(obj);\n (0, index_js_1.assertArgument)(mutability === \"nonpayable\" || mutability === \"payable\", \"fallback cannot be constants\", \"obj.stateMutability\", mutability);\n if (consumeKeywords(obj, setify([\"returns\"])).has(\"returns\")) {\n const outputs = consumeParams(obj);\n (0, index_js_1.assertArgument)(outputs.length === 1 && outputs[0].type === \"bytes\", \"invalid fallback outputs\", \"obj.outputs\", outputs.map((i3) => i3.format(\"minimal\")).join(\", \"));\n }\n consumeEoi(obj);\n return new _FallbackFragment(_guard, inputs, mutability === \"payable\");\n }\n if (obj.type === \"receive\") {\n return new _FallbackFragment(_guard, [], true);\n }\n if (obj.type === \"fallback\") {\n const inputs = [ParamType.from(\"bytes\")];\n const payable = obj.stateMutability === \"payable\";\n return new _FallbackFragment(_guard, inputs, payable);\n }\n (0, index_js_1.assertArgument)(false, \"invalid fallback description\", \"obj\", obj);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **FallbackFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === FallbackFragmentInternal;\n }\n };\n exports3.FallbackFragment = FallbackFragment;\n var FunctionFragment = class _FunctionFragment extends NamedFragment {\n /**\n * If the function is constant (e.g. ``pure`` or ``view`` functions).\n */\n constant;\n /**\n * The returned types for the result of calling this function.\n */\n outputs;\n /**\n * The state mutability (e.g. ``payable``, ``nonpayable``, ``view``\n * or ``pure``)\n */\n stateMutability;\n /**\n * If the function can be sent value during invocation.\n */\n payable;\n /**\n * The recommended gas limit to send when calling this function.\n */\n gas;\n /**\n * @private\n */\n constructor(guard, name, stateMutability, inputs, outputs, gas) {\n super(guard, \"function\", name, inputs);\n Object.defineProperty(this, internal, { value: FunctionFragmentInternal });\n outputs = Object.freeze(outputs.slice());\n const constant = stateMutability === \"view\" || stateMutability === \"pure\";\n const payable = stateMutability === \"payable\";\n (0, index_js_1.defineProperties)(this, { constant, gas, outputs, payable, stateMutability });\n }\n /**\n * The Function selector.\n */\n get selector() {\n return (0, index_js_2.id)(this.format(\"sighash\")).substring(0, 10);\n }\n /**\n * Returns a string representation of this function as %%format%%.\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n return JSON.stringify({\n type: \"function\",\n name: this.name,\n constant: this.constant,\n stateMutability: this.stateMutability !== \"nonpayable\" ? this.stateMutability : void 0,\n payable: this.payable,\n gas: this.gas != null ? this.gas : void 0,\n inputs: this.inputs.map((i3) => JSON.parse(i3.format(format))),\n outputs: this.outputs.map((o5) => JSON.parse(o5.format(format)))\n });\n }\n const result = [];\n if (format !== \"sighash\") {\n result.push(\"function\");\n }\n result.push(this.name + joinParams(format, this.inputs));\n if (format !== \"sighash\") {\n if (this.stateMutability !== \"nonpayable\") {\n result.push(this.stateMutability);\n }\n if (this.outputs && this.outputs.length) {\n result.push(\"returns\");\n result.push(joinParams(format, this.outputs));\n }\n if (this.gas != null) {\n result.push(`@${this.gas.toString()}`);\n }\n }\n return result.join(\" \");\n }\n /**\n * Return the selector for a function with %%name%% and %%params%%.\n */\n static getSelector(name, params) {\n params = (params || []).map((p4) => ParamType.from(p4));\n const fragment = new _FunctionFragment(_guard, name, \"view\", params, [], null);\n return fragment.selector;\n }\n /**\n * Returns a new **FunctionFragment** for %%obj%%.\n */\n static from(obj) {\n if (_FunctionFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _FunctionFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid function fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n const name = consumeName(\"function\", obj);\n const inputs = consumeParams(obj);\n const mutability = consumeMutability(obj);\n let outputs = [];\n if (consumeKeywords(obj, setify([\"returns\"])).has(\"returns\")) {\n outputs = consumeParams(obj);\n }\n const gas = consumeGas(obj);\n consumeEoi(obj);\n return new _FunctionFragment(_guard, name, mutability, inputs, outputs, gas);\n }\n let stateMutability = obj.stateMutability;\n if (stateMutability == null) {\n stateMutability = \"payable\";\n if (typeof obj.constant === \"boolean\") {\n stateMutability = \"view\";\n if (!obj.constant) {\n stateMutability = \"payable\";\n if (typeof obj.payable === \"boolean\" && !obj.payable) {\n stateMutability = \"nonpayable\";\n }\n }\n } else if (typeof obj.payable === \"boolean\" && !obj.payable) {\n stateMutability = \"nonpayable\";\n }\n }\n return new _FunctionFragment(_guard, obj.name, stateMutability, obj.inputs ? obj.inputs.map(ParamType.from) : [], obj.outputs ? obj.outputs.map(ParamType.from) : [], obj.gas != null ? obj.gas : null);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **FunctionFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === FunctionFragmentInternal;\n }\n };\n exports3.FunctionFragment = FunctionFragment;\n var StructFragment = class _StructFragment extends NamedFragment {\n /**\n * @private\n */\n constructor(guard, name, inputs) {\n super(guard, \"struct\", name, inputs);\n Object.defineProperty(this, internal, { value: StructFragmentInternal });\n }\n /**\n * Returns a string representation of this struct as %%format%%.\n */\n format() {\n throw new Error(\"@TODO\");\n }\n /**\n * Returns a new **StructFragment** for %%obj%%.\n */\n static from(obj) {\n if (typeof obj === \"string\") {\n try {\n return _StructFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid struct fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n const name = consumeName(\"struct\", obj);\n const inputs = consumeParams(obj);\n consumeEoi(obj);\n return new _StructFragment(_guard, name, inputs);\n }\n return new _StructFragment(_guard, obj.name, obj.inputs ? obj.inputs.map(ParamType.from) : []);\n }\n // @TODO: fix this return type\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **StructFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === StructFragmentInternal;\n }\n };\n exports3.StructFragment = StructFragment;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/abi-coder.js\n var require_abi_coder2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/abi-coder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AbiCoder = void 0;\n var index_js_1 = require_utils8();\n var abstract_coder_js_1 = require_abstract_coder2();\n var address_js_1 = require_address4();\n var array_js_1 = require_array2();\n var boolean_js_1 = require_boolean2();\n var bytes_js_1 = require_bytes2();\n var fixed_bytes_js_1 = require_fixed_bytes2();\n var null_js_1 = require_null2();\n var number_js_1 = require_number2();\n var string_js_1 = require_string2();\n var tuple_js_1 = require_tuple2();\n var fragments_js_1 = require_fragments2();\n var index_js_2 = require_address3();\n var index_js_3 = require_utils8();\n var PanicReasons = /* @__PURE__ */ new Map();\n PanicReasons.set(0, \"GENERIC_PANIC\");\n PanicReasons.set(1, \"ASSERT_FALSE\");\n PanicReasons.set(17, \"OVERFLOW\");\n PanicReasons.set(18, \"DIVIDE_BY_ZERO\");\n PanicReasons.set(33, \"ENUM_RANGE_ERROR\");\n PanicReasons.set(34, \"BAD_STORAGE_DATA\");\n PanicReasons.set(49, \"STACK_UNDERFLOW\");\n PanicReasons.set(50, \"ARRAY_RANGE_ERROR\");\n PanicReasons.set(65, \"OUT_OF_MEMORY\");\n PanicReasons.set(81, \"UNINITIALIZED_FUNCTION_CALL\");\n var paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);\n var paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);\n var defaultCoder = null;\n var defaultMaxInflation = 1024;\n function getBuiltinCallException(action, tx, data, abiCoder) {\n let message = \"missing revert data\";\n let reason = null;\n const invocation = null;\n let revert = null;\n if (data) {\n message = \"execution reverted\";\n const bytes = (0, index_js_3.getBytes)(data);\n data = (0, index_js_3.hexlify)(data);\n if (bytes.length === 0) {\n message += \" (no data present; likely require(false) occurred\";\n reason = \"require(false)\";\n } else if (bytes.length % 32 !== 4) {\n message += \" (could not decode reason; invalid data length)\";\n } else if ((0, index_js_3.hexlify)(bytes.slice(0, 4)) === \"0x08c379a0\") {\n try {\n reason = abiCoder.decode([\"string\"], bytes.slice(4))[0];\n revert = {\n signature: \"Error(string)\",\n name: \"Error\",\n args: [reason]\n };\n message += `: ${JSON.stringify(reason)}`;\n } catch (error) {\n message += \" (could not decode reason; invalid string data)\";\n }\n } else if ((0, index_js_3.hexlify)(bytes.slice(0, 4)) === \"0x4e487b71\") {\n try {\n const code = Number(abiCoder.decode([\"uint256\"], bytes.slice(4))[0]);\n revert = {\n signature: \"Panic(uint256)\",\n name: \"Panic\",\n args: [code]\n };\n reason = `Panic due to ${PanicReasons.get(code) || \"UNKNOWN\"}(${code})`;\n message += `: ${reason}`;\n } catch (error) {\n message += \" (could not decode panic code)\";\n }\n } else {\n message += \" (unknown custom error)\";\n }\n }\n const transaction = {\n to: tx.to ? (0, index_js_2.getAddress)(tx.to) : null,\n data: tx.data || \"0x\"\n };\n if (tx.from) {\n transaction.from = (0, index_js_2.getAddress)(tx.from);\n }\n return (0, index_js_3.makeError)(message, \"CALL_EXCEPTION\", {\n action,\n data,\n reason,\n transaction,\n invocation,\n revert\n });\n }\n var AbiCoder = class _AbiCoder {\n #getCoder(param) {\n if (param.isArray()) {\n return new array_js_1.ArrayCoder(this.#getCoder(param.arrayChildren), param.arrayLength, param.name);\n }\n if (param.isTuple()) {\n return new tuple_js_1.TupleCoder(param.components.map((c4) => this.#getCoder(c4)), param.name);\n }\n switch (param.baseType) {\n case \"address\":\n return new address_js_1.AddressCoder(param.name);\n case \"bool\":\n return new boolean_js_1.BooleanCoder(param.name);\n case \"string\":\n return new string_js_1.StringCoder(param.name);\n case \"bytes\":\n return new bytes_js_1.BytesCoder(param.name);\n case \"\":\n return new null_js_1.NullCoder(param.name);\n }\n let match = param.type.match(paramTypeNumber);\n if (match) {\n let size6 = parseInt(match[2] || \"256\");\n (0, index_js_1.assertArgument)(size6 !== 0 && size6 <= 256 && size6 % 8 === 0, \"invalid \" + match[1] + \" bit length\", \"param\", param);\n return new number_js_1.NumberCoder(size6 / 8, match[1] === \"int\", param.name);\n }\n match = param.type.match(paramTypeBytes);\n if (match) {\n let size6 = parseInt(match[1]);\n (0, index_js_1.assertArgument)(size6 !== 0 && size6 <= 32, \"invalid bytes length\", \"param\", param);\n return new fixed_bytes_js_1.FixedBytesCoder(size6, param.name);\n }\n (0, index_js_1.assertArgument)(false, \"invalid type\", \"type\", param.type);\n }\n /**\n * Get the default values for the given %%types%%.\n *\n * For example, a ``uint`` is by default ``0`` and ``bool``\n * is by default ``false``.\n */\n getDefaultValue(types) {\n const coders = types.map((type) => this.#getCoder(fragments_js_1.ParamType.from(type)));\n const coder = new tuple_js_1.TupleCoder(coders, \"_\");\n return coder.defaultValue();\n }\n /**\n * Encode the %%values%% as the %%types%% into ABI data.\n *\n * @returns DataHexstring\n */\n encode(types, values) {\n (0, index_js_1.assertArgumentCount)(values.length, types.length, \"types/values length mismatch\");\n const coders = types.map((type) => this.#getCoder(fragments_js_1.ParamType.from(type)));\n const coder = new tuple_js_1.TupleCoder(coders, \"_\");\n const writer = new abstract_coder_js_1.Writer();\n coder.encode(writer, values);\n return writer.data;\n }\n /**\n * Decode the ABI %%data%% as the %%types%% into values.\n *\n * If %%loose%% decoding is enabled, then strict padding is\n * not enforced. Some older versions of Solidity incorrectly\n * padded event data emitted from ``external`` functions.\n */\n decode(types, data, loose) {\n const coders = types.map((type) => this.#getCoder(fragments_js_1.ParamType.from(type)));\n const coder = new tuple_js_1.TupleCoder(coders, \"_\");\n return coder.decode(new abstract_coder_js_1.Reader(data, loose, defaultMaxInflation));\n }\n static _setDefaultMaxInflation(value) {\n (0, index_js_1.assertArgument)(typeof value === \"number\" && Number.isInteger(value), \"invalid defaultMaxInflation factor\", \"value\", value);\n defaultMaxInflation = value;\n }\n /**\n * Returns the shared singleton instance of a default [[AbiCoder]].\n *\n * On the first call, the instance is created internally.\n */\n static defaultAbiCoder() {\n if (defaultCoder == null) {\n defaultCoder = new _AbiCoder();\n }\n return defaultCoder;\n }\n /**\n * Returns an ethers-compatible [[CallExceptionError]] Error for the given\n * result %%data%% for the [[CallExceptionAction]] %%action%% against\n * the Transaction %%tx%%.\n */\n static getBuiltinCallException(action, tx, data) {\n return getBuiltinCallException(action, tx, data, _AbiCoder.defaultAbiCoder());\n }\n };\n exports3.AbiCoder = AbiCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/bytes32.js\n var require_bytes322 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/bytes32.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeBytes32String = exports3.encodeBytes32String = void 0;\n var index_js_1 = require_utils8();\n function encodeBytes32String(text) {\n const bytes = (0, index_js_1.toUtf8Bytes)(text);\n if (bytes.length > 31) {\n throw new Error(\"bytes32 string must be less than 32 bytes\");\n }\n return (0, index_js_1.zeroPadBytes)(bytes, 32);\n }\n exports3.encodeBytes32String = encodeBytes32String;\n function decodeBytes32String(_bytes) {\n const data = (0, index_js_1.getBytes)(_bytes, \"bytes\");\n if (data.length !== 32) {\n throw new Error(\"invalid bytes32 - not 32 bytes long\");\n }\n if (data[31] !== 0) {\n throw new Error(\"invalid bytes32 string - no null terminator\");\n }\n let length = 31;\n while (data[length - 1] === 0) {\n length--;\n }\n return (0, index_js_1.toUtf8String)(data.slice(0, length));\n }\n exports3.decodeBytes32String = decodeBytes32String;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/interface.js\n var require_interface2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/interface.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Interface = exports3.Indexed = exports3.ErrorDescription = exports3.TransactionDescription = exports3.LogDescription = exports3.Result = exports3.checkResultErrors = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_hash2();\n var index_js_3 = require_utils8();\n var abi_coder_js_1 = require_abi_coder2();\n var abstract_coder_js_1 = require_abstract_coder2();\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return abstract_coder_js_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"Result\", { enumerable: true, get: function() {\n return abstract_coder_js_1.Result;\n } });\n var fragments_js_1 = require_fragments2();\n var typed_js_1 = require_typed();\n var LogDescription = class {\n /**\n * The matching fragment for the ``topic0``.\n */\n fragment;\n /**\n * The name of the Event.\n */\n name;\n /**\n * The full Event signature.\n */\n signature;\n /**\n * The topic hash for the Event.\n */\n topic;\n /**\n * The arguments passed into the Event with ``emit``.\n */\n args;\n /**\n * @_ignore:\n */\n constructor(fragment, topic, args) {\n const name = fragment.name, signature = fragment.format();\n (0, index_js_3.defineProperties)(this, {\n fragment,\n name,\n signature,\n topic,\n args\n });\n }\n };\n exports3.LogDescription = LogDescription;\n var TransactionDescription = class {\n /**\n * The matching fragment from the transaction ``data``.\n */\n fragment;\n /**\n * The name of the Function from the transaction ``data``.\n */\n name;\n /**\n * The arguments passed to the Function from the transaction ``data``.\n */\n args;\n /**\n * The full Function signature from the transaction ``data``.\n */\n signature;\n /**\n * The selector for the Function from the transaction ``data``.\n */\n selector;\n /**\n * The ``value`` (in wei) from the transaction.\n */\n value;\n /**\n * @_ignore:\n */\n constructor(fragment, selector, args, value) {\n const name = fragment.name, signature = fragment.format();\n (0, index_js_3.defineProperties)(this, {\n fragment,\n name,\n args,\n signature,\n selector,\n value\n });\n }\n };\n exports3.TransactionDescription = TransactionDescription;\n var ErrorDescription = class {\n /**\n * The matching fragment.\n */\n fragment;\n /**\n * The name of the Error.\n */\n name;\n /**\n * The arguments passed to the Error with ``revert``.\n */\n args;\n /**\n * The full Error signature.\n */\n signature;\n /**\n * The selector for the Error.\n */\n selector;\n /**\n * @_ignore:\n */\n constructor(fragment, selector, args) {\n const name = fragment.name, signature = fragment.format();\n (0, index_js_3.defineProperties)(this, {\n fragment,\n name,\n args,\n signature,\n selector\n });\n }\n };\n exports3.ErrorDescription = ErrorDescription;\n var Indexed = class {\n /**\n * The ``keccak256`` of the value logged.\n */\n hash;\n /**\n * @_ignore:\n */\n _isIndexed;\n /**\n * Returns ``true`` if %%value%% is an **Indexed**.\n *\n * This provides a Type Guard for property access.\n */\n static isIndexed(value) {\n return !!(value && value._isIndexed);\n }\n /**\n * @_ignore:\n */\n constructor(hash3) {\n (0, index_js_3.defineProperties)(this, { hash: hash3, _isIndexed: true });\n }\n };\n exports3.Indexed = Indexed;\n var PanicReasons = {\n \"0\": \"generic panic\",\n \"1\": \"assert(false)\",\n \"17\": \"arithmetic overflow\",\n \"18\": \"division or modulo by zero\",\n \"33\": \"enum overflow\",\n \"34\": \"invalid encoded storage byte array accessed\",\n \"49\": \"out-of-bounds array access; popping on an empty array\",\n \"50\": \"out-of-bounds access of an array or bytesN\",\n \"65\": \"out of memory\",\n \"81\": \"uninitialized function\"\n };\n var BuiltinErrors = {\n \"0x08c379a0\": {\n signature: \"Error(string)\",\n name: \"Error\",\n inputs: [\"string\"],\n reason: (message) => {\n return `reverted with reason string ${JSON.stringify(message)}`;\n }\n },\n \"0x4e487b71\": {\n signature: \"Panic(uint256)\",\n name: \"Panic\",\n inputs: [\"uint256\"],\n reason: (code) => {\n let reason = \"unknown panic code\";\n if (code >= 0 && code <= 255 && PanicReasons[code.toString()]) {\n reason = PanicReasons[code.toString()];\n }\n return `reverted with panic code 0x${code.toString(16)} (${reason})`;\n }\n }\n };\n var Interface = class _Interface {\n /**\n * All the Contract ABI members (i.e. methods, events, errors, etc).\n */\n fragments;\n /**\n * The Contract constructor.\n */\n deploy;\n /**\n * The Fallback method, if any.\n */\n fallback;\n /**\n * If receiving ether is supported.\n */\n receive;\n #errors;\n #events;\n #functions;\n // #structs: Map;\n #abiCoder;\n /**\n * Create a new Interface for the %%fragments%%.\n */\n constructor(fragments) {\n let abi2 = [];\n if (typeof fragments === \"string\") {\n abi2 = JSON.parse(fragments);\n } else {\n abi2 = fragments;\n }\n this.#functions = /* @__PURE__ */ new Map();\n this.#errors = /* @__PURE__ */ new Map();\n this.#events = /* @__PURE__ */ new Map();\n const frags = [];\n for (const a3 of abi2) {\n try {\n frags.push(fragments_js_1.Fragment.from(a3));\n } catch (error) {\n console.log(`[Warning] Invalid Fragment ${JSON.stringify(a3)}:`, error.message);\n }\n }\n (0, index_js_3.defineProperties)(this, {\n fragments: Object.freeze(frags)\n });\n let fallback = null;\n let receive = false;\n this.#abiCoder = this.getAbiCoder();\n this.fragments.forEach((fragment, index2) => {\n let bucket;\n switch (fragment.type) {\n case \"constructor\":\n if (this.deploy) {\n console.log(\"duplicate definition - constructor\");\n return;\n }\n (0, index_js_3.defineProperties)(this, { deploy: fragment });\n return;\n case \"fallback\":\n if (fragment.inputs.length === 0) {\n receive = true;\n } else {\n (0, index_js_3.assertArgument)(!fallback || fragment.payable !== fallback.payable, \"conflicting fallback fragments\", `fragments[${index2}]`, fragment);\n fallback = fragment;\n receive = fallback.payable;\n }\n return;\n case \"function\":\n bucket = this.#functions;\n break;\n case \"event\":\n bucket = this.#events;\n break;\n case \"error\":\n bucket = this.#errors;\n break;\n default:\n return;\n }\n const signature = fragment.format();\n if (bucket.has(signature)) {\n return;\n }\n bucket.set(signature, fragment);\n });\n if (!this.deploy) {\n (0, index_js_3.defineProperties)(this, {\n deploy: fragments_js_1.ConstructorFragment.from(\"constructor()\")\n });\n }\n (0, index_js_3.defineProperties)(this, { fallback, receive });\n }\n /**\n * Returns the entire Human-Readable ABI, as an array of\n * signatures, optionally as %%minimal%% strings, which\n * removes parameter names and unneceesary spaces.\n */\n format(minimal) {\n const format = minimal ? \"minimal\" : \"full\";\n const abi2 = this.fragments.map((f7) => f7.format(format));\n return abi2;\n }\n /**\n * Return the JSON-encoded ABI. This is the format Solidiy\n * returns.\n */\n formatJson() {\n const abi2 = this.fragments.map((f7) => f7.format(\"json\"));\n return JSON.stringify(abi2.map((j2) => JSON.parse(j2)));\n }\n /**\n * The ABI coder that will be used to encode and decode binary\n * data.\n */\n getAbiCoder() {\n return abi_coder_js_1.AbiCoder.defaultAbiCoder();\n }\n // Find a function definition by any means necessary (unless it is ambiguous)\n #getFunction(key, values, forceUnique) {\n if ((0, index_js_3.isHexString)(key)) {\n const selector = key.toLowerCase();\n for (const fragment of this.#functions.values()) {\n if (selector === fragment.selector) {\n return fragment;\n }\n }\n return null;\n }\n if (key.indexOf(\"(\") === -1) {\n const matching = [];\n for (const [name, fragment] of this.#functions) {\n if (name.split(\n \"(\"\n /* fix:) */\n )[0] === key) {\n matching.push(fragment);\n }\n }\n if (values) {\n const lastValue = values.length > 0 ? values[values.length - 1] : null;\n let valueLength = values.length;\n let allowOptions = true;\n if (typed_js_1.Typed.isTyped(lastValue) && lastValue.type === \"overrides\") {\n allowOptions = false;\n valueLength--;\n }\n for (let i3 = matching.length - 1; i3 >= 0; i3--) {\n const inputs = matching[i3].inputs.length;\n if (inputs !== valueLength && (!allowOptions || inputs !== valueLength - 1)) {\n matching.splice(i3, 1);\n }\n }\n for (let i3 = matching.length - 1; i3 >= 0; i3--) {\n const inputs = matching[i3].inputs;\n for (let j2 = 0; j2 < values.length; j2++) {\n if (!typed_js_1.Typed.isTyped(values[j2])) {\n continue;\n }\n if (j2 >= inputs.length) {\n if (values[j2].type === \"overrides\") {\n continue;\n }\n matching.splice(i3, 1);\n break;\n }\n if (values[j2].type !== inputs[j2].baseType) {\n matching.splice(i3, 1);\n break;\n }\n }\n }\n }\n if (matching.length === 1 && values && values.length !== matching[0].inputs.length) {\n const lastArg = values[values.length - 1];\n if (lastArg == null || Array.isArray(lastArg) || typeof lastArg !== \"object\") {\n matching.splice(0, 1);\n }\n }\n if (matching.length === 0) {\n return null;\n }\n if (matching.length > 1 && forceUnique) {\n const matchStr = matching.map((m2) => JSON.stringify(m2.format())).join(\", \");\n (0, index_js_3.assertArgument)(false, `ambiguous function description (i.e. matches ${matchStr})`, \"key\", key);\n }\n return matching[0];\n }\n const result = this.#functions.get(fragments_js_1.FunctionFragment.from(key).format());\n if (result) {\n return result;\n }\n return null;\n }\n /**\n * Get the function name for %%key%%, which may be a function selector,\n * function name or function signature that belongs to the ABI.\n */\n getFunctionName(key) {\n const fragment = this.#getFunction(key, null, false);\n (0, index_js_3.assertArgument)(fragment, \"no matching function\", \"key\", key);\n return fragment.name;\n }\n /**\n * Returns true if %%key%% (a function selector, function name or\n * function signature) is present in the ABI.\n *\n * In the case of a function name, the name may be ambiguous, so\n * accessing the [[FunctionFragment]] may require refinement.\n */\n hasFunction(key) {\n return !!this.#getFunction(key, null, false);\n }\n /**\n * Get the [[FunctionFragment]] for %%key%%, which may be a function\n * selector, function name or function signature that belongs to the ABI.\n *\n * If %%values%% is provided, it will use the Typed API to handle\n * ambiguous cases where multiple functions match by name.\n *\n * If the %%key%% and %%values%% do not refine to a single function in\n * the ABI, this will throw.\n */\n getFunction(key, values) {\n return this.#getFunction(key, values || null, true);\n }\n /**\n * Iterate over all functions, calling %%callback%%, sorted by their name.\n */\n forEachFunction(callback) {\n const names = Array.from(this.#functions.keys());\n names.sort((a3, b4) => a3.localeCompare(b4));\n for (let i3 = 0; i3 < names.length; i3++) {\n const name = names[i3];\n callback(this.#functions.get(name), i3);\n }\n }\n // Find an event definition by any means necessary (unless it is ambiguous)\n #getEvent(key, values, forceUnique) {\n if ((0, index_js_3.isHexString)(key)) {\n const eventTopic = key.toLowerCase();\n for (const fragment of this.#events.values()) {\n if (eventTopic === fragment.topicHash) {\n return fragment;\n }\n }\n return null;\n }\n if (key.indexOf(\"(\") === -1) {\n const matching = [];\n for (const [name, fragment] of this.#events) {\n if (name.split(\n \"(\"\n /* fix:) */\n )[0] === key) {\n matching.push(fragment);\n }\n }\n if (values) {\n for (let i3 = matching.length - 1; i3 >= 0; i3--) {\n if (matching[i3].inputs.length < values.length) {\n matching.splice(i3, 1);\n }\n }\n for (let i3 = matching.length - 1; i3 >= 0; i3--) {\n const inputs = matching[i3].inputs;\n for (let j2 = 0; j2 < values.length; j2++) {\n if (!typed_js_1.Typed.isTyped(values[j2])) {\n continue;\n }\n if (values[j2].type !== inputs[j2].baseType) {\n matching.splice(i3, 1);\n break;\n }\n }\n }\n }\n if (matching.length === 0) {\n return null;\n }\n if (matching.length > 1 && forceUnique) {\n const matchStr = matching.map((m2) => JSON.stringify(m2.format())).join(\", \");\n (0, index_js_3.assertArgument)(false, `ambiguous event description (i.e. matches ${matchStr})`, \"key\", key);\n }\n return matching[0];\n }\n const result = this.#events.get(fragments_js_1.EventFragment.from(key).format());\n if (result) {\n return result;\n }\n return null;\n }\n /**\n * Get the event name for %%key%%, which may be a topic hash,\n * event name or event signature that belongs to the ABI.\n */\n getEventName(key) {\n const fragment = this.#getEvent(key, null, false);\n (0, index_js_3.assertArgument)(fragment, \"no matching event\", \"key\", key);\n return fragment.name;\n }\n /**\n * Returns true if %%key%% (an event topic hash, event name or\n * event signature) is present in the ABI.\n *\n * In the case of an event name, the name may be ambiguous, so\n * accessing the [[EventFragment]] may require refinement.\n */\n hasEvent(key) {\n return !!this.#getEvent(key, null, false);\n }\n /**\n * Get the [[EventFragment]] for %%key%%, which may be a topic hash,\n * event name or event signature that belongs to the ABI.\n *\n * If %%values%% is provided, it will use the Typed API to handle\n * ambiguous cases where multiple events match by name.\n *\n * If the %%key%% and %%values%% do not refine to a single event in\n * the ABI, this will throw.\n */\n getEvent(key, values) {\n return this.#getEvent(key, values || null, true);\n }\n /**\n * Iterate over all events, calling %%callback%%, sorted by their name.\n */\n forEachEvent(callback) {\n const names = Array.from(this.#events.keys());\n names.sort((a3, b4) => a3.localeCompare(b4));\n for (let i3 = 0; i3 < names.length; i3++) {\n const name = names[i3];\n callback(this.#events.get(name), i3);\n }\n }\n /**\n * Get the [[ErrorFragment]] for %%key%%, which may be an error\n * selector, error name or error signature that belongs to the ABI.\n *\n * If %%values%% is provided, it will use the Typed API to handle\n * ambiguous cases where multiple errors match by name.\n *\n * If the %%key%% and %%values%% do not refine to a single error in\n * the ABI, this will throw.\n */\n getError(key, values) {\n if ((0, index_js_3.isHexString)(key)) {\n const selector = key.toLowerCase();\n if (BuiltinErrors[selector]) {\n return fragments_js_1.ErrorFragment.from(BuiltinErrors[selector].signature);\n }\n for (const fragment of this.#errors.values()) {\n if (selector === fragment.selector) {\n return fragment;\n }\n }\n return null;\n }\n if (key.indexOf(\"(\") === -1) {\n const matching = [];\n for (const [name, fragment] of this.#errors) {\n if (name.split(\n \"(\"\n /* fix:) */\n )[0] === key) {\n matching.push(fragment);\n }\n }\n if (matching.length === 0) {\n if (key === \"Error\") {\n return fragments_js_1.ErrorFragment.from(\"error Error(string)\");\n }\n if (key === \"Panic\") {\n return fragments_js_1.ErrorFragment.from(\"error Panic(uint256)\");\n }\n return null;\n } else if (matching.length > 1) {\n const matchStr = matching.map((m2) => JSON.stringify(m2.format())).join(\", \");\n (0, index_js_3.assertArgument)(false, `ambiguous error description (i.e. ${matchStr})`, \"name\", key);\n }\n return matching[0];\n }\n key = fragments_js_1.ErrorFragment.from(key).format();\n if (key === \"Error(string)\") {\n return fragments_js_1.ErrorFragment.from(\"error Error(string)\");\n }\n if (key === \"Panic(uint256)\") {\n return fragments_js_1.ErrorFragment.from(\"error Panic(uint256)\");\n }\n const result = this.#errors.get(key);\n if (result) {\n return result;\n }\n return null;\n }\n /**\n * Iterate over all errors, calling %%callback%%, sorted by their name.\n */\n forEachError(callback) {\n const names = Array.from(this.#errors.keys());\n names.sort((a3, b4) => a3.localeCompare(b4));\n for (let i3 = 0; i3 < names.length; i3++) {\n const name = names[i3];\n callback(this.#errors.get(name), i3);\n }\n }\n // Get the 4-byte selector used by Solidity to identify a function\n /*\n getSelector(fragment: ErrorFragment | FunctionFragment): string {\n if (typeof(fragment) === \"string\") {\n const matches: Array = [ ];\n \n try { matches.push(this.getFunction(fragment)); } catch (error) { }\n try { matches.push(this.getError(fragment)); } catch (_) { }\n \n if (matches.length === 0) {\n logger.throwArgumentError(\"unknown fragment\", \"key\", fragment);\n } else if (matches.length > 1) {\n logger.throwArgumentError(\"ambiguous fragment matches function and error\", \"key\", fragment);\n }\n \n fragment = matches[0];\n }\n \n return dataSlice(id(fragment.format()), 0, 4);\n }\n */\n // Get the 32-byte topic hash used by Solidity to identify an event\n /*\n getEventTopic(fragment: EventFragment): string {\n //if (typeof(fragment) === \"string\") { fragment = this.getEvent(eventFragment); }\n return id(fragment.format());\n }\n */\n _decodeParams(params, data) {\n return this.#abiCoder.decode(params, data);\n }\n _encodeParams(params, values) {\n return this.#abiCoder.encode(params, values);\n }\n /**\n * Encodes a ``tx.data`` object for deploying the Contract with\n * the %%values%% as the constructor arguments.\n */\n encodeDeploy(values) {\n return this._encodeParams(this.deploy.inputs, values || []);\n }\n /**\n * Decodes the result %%data%% (e.g. from an ``eth_call``) for the\n * specified error (see [[getError]] for valid values for\n * %%key%%).\n *\n * Most developers should prefer the [[parseCallResult]] method instead,\n * which will automatically detect a ``CALL_EXCEPTION`` and throw the\n * corresponding error.\n */\n decodeErrorResult(fragment, data) {\n if (typeof fragment === \"string\") {\n const f7 = this.getError(fragment);\n (0, index_js_3.assertArgument)(f7, \"unknown error\", \"fragment\", fragment);\n fragment = f7;\n }\n (0, index_js_3.assertArgument)((0, index_js_3.dataSlice)(data, 0, 4) === fragment.selector, `data signature does not match error ${fragment.name}.`, \"data\", data);\n return this._decodeParams(fragment.inputs, (0, index_js_3.dataSlice)(data, 4));\n }\n /**\n * Encodes the transaction revert data for a call result that\n * reverted from the the Contract with the sepcified %%error%%\n * (see [[getError]] for valid values for %%fragment%%) with the %%values%%.\n *\n * This is generally not used by most developers, unless trying to mock\n * a result from a Contract.\n */\n encodeErrorResult(fragment, values) {\n if (typeof fragment === \"string\") {\n const f7 = this.getError(fragment);\n (0, index_js_3.assertArgument)(f7, \"unknown error\", \"fragment\", fragment);\n fragment = f7;\n }\n return (0, index_js_3.concat)([\n fragment.selector,\n this._encodeParams(fragment.inputs, values || [])\n ]);\n }\n /**\n * Decodes the %%data%% from a transaction ``tx.data`` for\n * the function specified (see [[getFunction]] for valid values\n * for %%fragment%%).\n *\n * Most developers should prefer the [[parseTransaction]] method\n * instead, which will automatically detect the fragment.\n */\n decodeFunctionData(fragment, data) {\n if (typeof fragment === \"string\") {\n const f7 = this.getFunction(fragment);\n (0, index_js_3.assertArgument)(f7, \"unknown function\", \"fragment\", fragment);\n fragment = f7;\n }\n (0, index_js_3.assertArgument)((0, index_js_3.dataSlice)(data, 0, 4) === fragment.selector, `data signature does not match function ${fragment.name}.`, \"data\", data);\n return this._decodeParams(fragment.inputs, (0, index_js_3.dataSlice)(data, 4));\n }\n /**\n * Encodes the ``tx.data`` for a transaction that calls the function\n * specified (see [[getFunction]] for valid values for %%fragment%%) with\n * the %%values%%.\n */\n encodeFunctionData(fragment, values) {\n if (typeof fragment === \"string\") {\n const f7 = this.getFunction(fragment);\n (0, index_js_3.assertArgument)(f7, \"unknown function\", \"fragment\", fragment);\n fragment = f7;\n }\n return (0, index_js_3.concat)([\n fragment.selector,\n this._encodeParams(fragment.inputs, values || [])\n ]);\n }\n /**\n * Decodes the result %%data%% (e.g. from an ``eth_call``) for the\n * specified function (see [[getFunction]] for valid values for\n * %%key%%).\n *\n * Most developers should prefer the [[parseCallResult]] method instead,\n * which will automatically detect a ``CALL_EXCEPTION`` and throw the\n * corresponding error.\n */\n decodeFunctionResult(fragment, data) {\n if (typeof fragment === \"string\") {\n const f7 = this.getFunction(fragment);\n (0, index_js_3.assertArgument)(f7, \"unknown function\", \"fragment\", fragment);\n fragment = f7;\n }\n let message = \"invalid length for result data\";\n const bytes = (0, index_js_3.getBytesCopy)(data);\n if (bytes.length % 32 === 0) {\n try {\n return this.#abiCoder.decode(fragment.outputs, bytes);\n } catch (error) {\n message = \"could not decode result data\";\n }\n }\n (0, index_js_3.assert)(false, message, \"BAD_DATA\", {\n value: (0, index_js_3.hexlify)(bytes),\n info: { method: fragment.name, signature: fragment.format() }\n });\n }\n makeError(_data, tx) {\n const data = (0, index_js_3.getBytes)(_data, \"data\");\n const error = abi_coder_js_1.AbiCoder.getBuiltinCallException(\"call\", tx, data);\n const customPrefix = \"execution reverted (unknown custom error)\";\n if (error.message.startsWith(customPrefix)) {\n const selector = (0, index_js_3.hexlify)(data.slice(0, 4));\n const ef = this.getError(selector);\n if (ef) {\n try {\n const args = this.#abiCoder.decode(ef.inputs, data.slice(4));\n error.revert = {\n name: ef.name,\n signature: ef.format(),\n args\n };\n error.reason = error.revert.signature;\n error.message = `execution reverted: ${error.reason}`;\n } catch (e2) {\n error.message = `execution reverted (coult not decode custom error)`;\n }\n }\n }\n const parsed = this.parseTransaction(tx);\n if (parsed) {\n error.invocation = {\n method: parsed.name,\n signature: parsed.signature,\n args: parsed.args\n };\n }\n return error;\n }\n /**\n * Encodes the result data (e.g. from an ``eth_call``) for the\n * specified function (see [[getFunction]] for valid values\n * for %%fragment%%) with %%values%%.\n *\n * This is generally not used by most developers, unless trying to mock\n * a result from a Contract.\n */\n encodeFunctionResult(fragment, values) {\n if (typeof fragment === \"string\") {\n const f7 = this.getFunction(fragment);\n (0, index_js_3.assertArgument)(f7, \"unknown function\", \"fragment\", fragment);\n fragment = f7;\n }\n return (0, index_js_3.hexlify)(this.#abiCoder.encode(fragment.outputs, values || []));\n }\n /*\n spelunk(inputs: Array, values: ReadonlyArray, processfunc: (type: string, value: any) => Promise): Promise> {\n const promises: Array> = [ ];\n const process = function(type: ParamType, value: any): any {\n if (type.baseType === \"array\") {\n return descend(type.child\n }\n if (type. === \"address\") {\n }\n };\n \n const descend = function (inputs: Array, values: ReadonlyArray) {\n if (inputs.length !== values.length) { throw new Error(\"length mismatch\"); }\n \n };\n \n const result: Array = [ ];\n values.forEach((value, index) => {\n if (value == null) {\n topics.push(null);\n } else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n logger.throwArgumentError(\"filtering with tuples or arrays not supported\", (\"contract.\" + param.name), value);\n } else if (Array.isArray(value)) {\n topics.push(value.map((value) => encodeTopic(param, value)));\n } else {\n topics.push(encodeTopic(param, value));\n }\n });\n }\n */\n // Create the filter for the event with search criteria (e.g. for eth_filterLog)\n encodeFilterTopics(fragment, values) {\n if (typeof fragment === \"string\") {\n const f7 = this.getEvent(fragment);\n (0, index_js_3.assertArgument)(f7, \"unknown event\", \"eventFragment\", fragment);\n fragment = f7;\n }\n (0, index_js_3.assert)(values.length <= fragment.inputs.length, `too many arguments for ${fragment.format()}`, \"UNEXPECTED_ARGUMENT\", { count: values.length, expectedCount: fragment.inputs.length });\n const topics = [];\n if (!fragment.anonymous) {\n topics.push(fragment.topicHash);\n }\n const encodeTopic = (param, value) => {\n if (param.type === \"string\") {\n return (0, index_js_2.id)(value);\n } else if (param.type === \"bytes\") {\n return (0, index_js_1.keccak256)((0, index_js_3.hexlify)(value));\n }\n if (param.type === \"bool\" && typeof value === \"boolean\") {\n value = value ? \"0x01\" : \"0x00\";\n } else if (param.type.match(/^u?int/)) {\n value = (0, index_js_3.toBeHex)(value);\n } else if (param.type.match(/^bytes/)) {\n value = (0, index_js_3.zeroPadBytes)(value, 32);\n } else if (param.type === \"address\") {\n this.#abiCoder.encode([\"address\"], [value]);\n }\n return (0, index_js_3.zeroPadValue)((0, index_js_3.hexlify)(value), 32);\n };\n values.forEach((value, index2) => {\n const param = fragment.inputs[index2];\n if (!param.indexed) {\n (0, index_js_3.assertArgument)(value == null, \"cannot filter non-indexed parameters; must be null\", \"contract.\" + param.name, value);\n return;\n }\n if (value == null) {\n topics.push(null);\n } else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n (0, index_js_3.assertArgument)(false, \"filtering with tuples or arrays not supported\", \"contract.\" + param.name, value);\n } else if (Array.isArray(value)) {\n topics.push(value.map((value2) => encodeTopic(param, value2)));\n } else {\n topics.push(encodeTopic(param, value));\n }\n });\n while (topics.length && topics[topics.length - 1] === null) {\n topics.pop();\n }\n return topics;\n }\n encodeEventLog(fragment, values) {\n if (typeof fragment === \"string\") {\n const f7 = this.getEvent(fragment);\n (0, index_js_3.assertArgument)(f7, \"unknown event\", \"eventFragment\", fragment);\n fragment = f7;\n }\n const topics = [];\n const dataTypes = [];\n const dataValues = [];\n if (!fragment.anonymous) {\n topics.push(fragment.topicHash);\n }\n (0, index_js_3.assertArgument)(values.length === fragment.inputs.length, \"event arguments/values mismatch\", \"values\", values);\n fragment.inputs.forEach((param, index2) => {\n const value = values[index2];\n if (param.indexed) {\n if (param.type === \"string\") {\n topics.push((0, index_js_2.id)(value));\n } else if (param.type === \"bytes\") {\n topics.push((0, index_js_1.keccak256)(value));\n } else if (param.baseType === \"tuple\" || param.baseType === \"array\") {\n throw new Error(\"not implemented\");\n } else {\n topics.push(this.#abiCoder.encode([param.type], [value]));\n }\n } else {\n dataTypes.push(param);\n dataValues.push(value);\n }\n });\n return {\n data: this.#abiCoder.encode(dataTypes, dataValues),\n topics\n };\n }\n // Decode a filter for the event and the search criteria\n decodeEventLog(fragment, data, topics) {\n if (typeof fragment === \"string\") {\n const f7 = this.getEvent(fragment);\n (0, index_js_3.assertArgument)(f7, \"unknown event\", \"eventFragment\", fragment);\n fragment = f7;\n }\n if (topics != null && !fragment.anonymous) {\n const eventTopic = fragment.topicHash;\n (0, index_js_3.assertArgument)((0, index_js_3.isHexString)(topics[0], 32) && topics[0].toLowerCase() === eventTopic, \"fragment/topic mismatch\", \"topics[0]\", topics[0]);\n topics = topics.slice(1);\n }\n const indexed = [];\n const nonIndexed = [];\n const dynamic = [];\n fragment.inputs.forEach((param, index2) => {\n if (param.indexed) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.baseType === \"tuple\" || param.baseType === \"array\") {\n indexed.push(fragments_js_1.ParamType.from({ type: \"bytes32\", name: param.name }));\n dynamic.push(true);\n } else {\n indexed.push(param);\n dynamic.push(false);\n }\n } else {\n nonIndexed.push(param);\n dynamic.push(false);\n }\n });\n const resultIndexed = topics != null ? this.#abiCoder.decode(indexed, (0, index_js_3.concat)(topics)) : null;\n const resultNonIndexed = this.#abiCoder.decode(nonIndexed, data, true);\n const values = [];\n const keys = [];\n let nonIndexedIndex = 0, indexedIndex = 0;\n fragment.inputs.forEach((param, index2) => {\n let value = null;\n if (param.indexed) {\n if (resultIndexed == null) {\n value = new Indexed(null);\n } else if (dynamic[index2]) {\n value = new Indexed(resultIndexed[indexedIndex++]);\n } else {\n try {\n value = resultIndexed[indexedIndex++];\n } catch (error) {\n value = error;\n }\n }\n } else {\n try {\n value = resultNonIndexed[nonIndexedIndex++];\n } catch (error) {\n value = error;\n }\n }\n values.push(value);\n keys.push(param.name || null);\n });\n return abstract_coder_js_1.Result.fromItems(values, keys);\n }\n /**\n * Parses a transaction, finding the matching function and extracts\n * the parameter values along with other useful function details.\n *\n * If the matching function cannot be found, return null.\n */\n parseTransaction(tx) {\n const data = (0, index_js_3.getBytes)(tx.data, \"tx.data\");\n const value = (0, index_js_3.getBigInt)(tx.value != null ? tx.value : 0, \"tx.value\");\n const fragment = this.getFunction((0, index_js_3.hexlify)(data.slice(0, 4)));\n if (!fragment) {\n return null;\n }\n const args = this.#abiCoder.decode(fragment.inputs, data.slice(4));\n return new TransactionDescription(fragment, fragment.selector, args, value);\n }\n parseCallResult(data) {\n throw new Error(\"@TODO\");\n }\n /**\n * Parses a receipt log, finding the matching event and extracts\n * the parameter values along with other useful event details.\n *\n * If the matching event cannot be found, returns null.\n */\n parseLog(log) {\n const fragment = this.getEvent(log.topics[0]);\n if (!fragment || fragment.anonymous) {\n return null;\n }\n return new LogDescription(fragment, fragment.topicHash, this.decodeEventLog(fragment, log.data, log.topics));\n }\n /**\n * Parses a revert data, finding the matching error and extracts\n * the parameter values along with other useful error details.\n *\n * If the matching error cannot be found, returns null.\n */\n parseError(data) {\n const hexData = (0, index_js_3.hexlify)(data);\n const fragment = this.getError((0, index_js_3.dataSlice)(hexData, 0, 4));\n if (!fragment) {\n return null;\n }\n const args = this.#abiCoder.decode(fragment.inputs, (0, index_js_3.dataSlice)(hexData, 4));\n return new ErrorDescription(fragment, fragment.selector, args);\n }\n /**\n * Creates a new [[Interface]] from the ABI %%value%%.\n *\n * The %%value%% may be provided as an existing [[Interface]] object,\n * a JSON-encoded ABI or any Human-Readable ABI format.\n */\n static from(value) {\n if (value instanceof _Interface) {\n return value;\n }\n if (typeof value === \"string\") {\n return new _Interface(JSON.parse(value));\n }\n if (typeof value.formatJson === \"function\") {\n return new _Interface(value.formatJson());\n }\n if (typeof value.format === \"function\") {\n return new _Interface(value.format(\"json\"));\n }\n return new _Interface(value);\n }\n };\n exports3.Interface = Interface;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/index.js\n var require_abi = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Typed = exports3.Result = exports3.TransactionDescription = exports3.LogDescription = exports3.ErrorDescription = exports3.Interface = exports3.Indexed = exports3.checkResultErrors = exports3.StructFragment = exports3.ParamType = exports3.NamedFragment = exports3.FunctionFragment = exports3.Fragment = exports3.FallbackFragment = exports3.EventFragment = exports3.ErrorFragment = exports3.ConstructorFragment = exports3.encodeBytes32String = exports3.decodeBytes32String = exports3.AbiCoder = void 0;\n var abi_coder_js_1 = require_abi_coder2();\n Object.defineProperty(exports3, \"AbiCoder\", { enumerable: true, get: function() {\n return abi_coder_js_1.AbiCoder;\n } });\n var bytes32_js_1 = require_bytes322();\n Object.defineProperty(exports3, \"decodeBytes32String\", { enumerable: true, get: function() {\n return bytes32_js_1.decodeBytes32String;\n } });\n Object.defineProperty(exports3, \"encodeBytes32String\", { enumerable: true, get: function() {\n return bytes32_js_1.encodeBytes32String;\n } });\n var fragments_js_1 = require_fragments2();\n Object.defineProperty(exports3, \"ConstructorFragment\", { enumerable: true, get: function() {\n return fragments_js_1.ConstructorFragment;\n } });\n Object.defineProperty(exports3, \"ErrorFragment\", { enumerable: true, get: function() {\n return fragments_js_1.ErrorFragment;\n } });\n Object.defineProperty(exports3, \"EventFragment\", { enumerable: true, get: function() {\n return fragments_js_1.EventFragment;\n } });\n Object.defineProperty(exports3, \"FallbackFragment\", { enumerable: true, get: function() {\n return fragments_js_1.FallbackFragment;\n } });\n Object.defineProperty(exports3, \"Fragment\", { enumerable: true, get: function() {\n return fragments_js_1.Fragment;\n } });\n Object.defineProperty(exports3, \"FunctionFragment\", { enumerable: true, get: function() {\n return fragments_js_1.FunctionFragment;\n } });\n Object.defineProperty(exports3, \"NamedFragment\", { enumerable: true, get: function() {\n return fragments_js_1.NamedFragment;\n } });\n Object.defineProperty(exports3, \"ParamType\", { enumerable: true, get: function() {\n return fragments_js_1.ParamType;\n } });\n Object.defineProperty(exports3, \"StructFragment\", { enumerable: true, get: function() {\n return fragments_js_1.StructFragment;\n } });\n var interface_js_1 = require_interface2();\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return interface_js_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"Indexed\", { enumerable: true, get: function() {\n return interface_js_1.Indexed;\n } });\n Object.defineProperty(exports3, \"Interface\", { enumerable: true, get: function() {\n return interface_js_1.Interface;\n } });\n Object.defineProperty(exports3, \"ErrorDescription\", { enumerable: true, get: function() {\n return interface_js_1.ErrorDescription;\n } });\n Object.defineProperty(exports3, \"LogDescription\", { enumerable: true, get: function() {\n return interface_js_1.LogDescription;\n } });\n Object.defineProperty(exports3, \"TransactionDescription\", { enumerable: true, get: function() {\n return interface_js_1.TransactionDescription;\n } });\n Object.defineProperty(exports3, \"Result\", { enumerable: true, get: function() {\n return interface_js_1.Result;\n } });\n var typed_js_1 = require_typed();\n Object.defineProperty(exports3, \"Typed\", { enumerable: true, get: function() {\n return typed_js_1.Typed;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider.js\n var require_provider = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TransactionResponse = exports3.TransactionReceipt = exports3.Log = exports3.Block = exports3.copyRequest = exports3.FeeData = void 0;\n var index_js_1 = require_utils8();\n var index_js_2 = require_transaction2();\n var BN_0 = BigInt(0);\n function getValue(value) {\n if (value == null) {\n return null;\n }\n return value;\n }\n function toJson(value) {\n if (value == null) {\n return null;\n }\n return value.toString();\n }\n var FeeData = class {\n /**\n * The gas price for legacy networks.\n */\n gasPrice;\n /**\n * The maximum fee to pay per gas.\n *\n * The base fee per gas is defined by the network and based on\n * congestion, increasing the cost during times of heavy load\n * and lowering when less busy.\n *\n * The actual fee per gas will be the base fee for the block\n * and the priority fee, up to the max fee per gas.\n *\n * This will be ``null`` on legacy networks (i.e. [pre-EIP-1559](link-eip-1559))\n */\n maxFeePerGas;\n /**\n * The additional amout to pay per gas to encourage a validator\n * to include the transaction.\n *\n * The purpose of this is to compensate the validator for the\n * adjusted risk for including a given transaction.\n *\n * This will be ``null`` on legacy networks (i.e. [pre-EIP-1559](link-eip-1559))\n */\n maxPriorityFeePerGas;\n /**\n * Creates a new FeeData for %%gasPrice%%, %%maxFeePerGas%% and\n * %%maxPriorityFeePerGas%%.\n */\n constructor(gasPrice, maxFeePerGas, maxPriorityFeePerGas) {\n (0, index_js_1.defineProperties)(this, {\n gasPrice: getValue(gasPrice),\n maxFeePerGas: getValue(maxFeePerGas),\n maxPriorityFeePerGas: getValue(maxPriorityFeePerGas)\n });\n }\n /**\n * Returns a JSON-friendly value.\n */\n toJSON() {\n const { gasPrice, maxFeePerGas, maxPriorityFeePerGas } = this;\n return {\n _type: \"FeeData\",\n gasPrice: toJson(gasPrice),\n maxFeePerGas: toJson(maxFeePerGas),\n maxPriorityFeePerGas: toJson(maxPriorityFeePerGas)\n };\n }\n };\n exports3.FeeData = FeeData;\n function copyRequest(req) {\n const result = {};\n if (req.to) {\n result.to = req.to;\n }\n if (req.from) {\n result.from = req.from;\n }\n if (req.data) {\n result.data = (0, index_js_1.hexlify)(req.data);\n }\n const bigIntKeys = \"chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value\".split(/,/);\n for (const key of bigIntKeys) {\n if (!(key in req) || req[key] == null) {\n continue;\n }\n result[key] = (0, index_js_1.getBigInt)(req[key], `request.${key}`);\n }\n const numberKeys = \"type,nonce\".split(/,/);\n for (const key of numberKeys) {\n if (!(key in req) || req[key] == null) {\n continue;\n }\n result[key] = (0, index_js_1.getNumber)(req[key], `request.${key}`);\n }\n if (req.accessList) {\n result.accessList = (0, index_js_2.accessListify)(req.accessList);\n }\n if (req.authorizationList) {\n result.authorizationList = req.authorizationList.slice();\n }\n if (\"blockTag\" in req) {\n result.blockTag = req.blockTag;\n }\n if (\"enableCcipRead\" in req) {\n result.enableCcipRead = !!req.enableCcipRead;\n }\n if (\"customData\" in req) {\n result.customData = req.customData;\n }\n if (\"blobVersionedHashes\" in req && req.blobVersionedHashes) {\n result.blobVersionedHashes = req.blobVersionedHashes.slice();\n }\n if (\"kzg\" in req) {\n result.kzg = req.kzg;\n }\n if (\"blobs\" in req && req.blobs) {\n result.blobs = req.blobs.map((b4) => {\n if ((0, index_js_1.isBytesLike)(b4)) {\n return (0, index_js_1.hexlify)(b4);\n }\n return Object.assign({}, b4);\n });\n }\n return result;\n }\n exports3.copyRequest = copyRequest;\n var Block = class {\n /**\n * The provider connected to the block used to fetch additional details\n * if necessary.\n */\n provider;\n /**\n * The block number, sometimes called the block height. This is a\n * sequential number that is one higher than the parent block.\n */\n number;\n /**\n * The block hash.\n *\n * This hash includes all properties, so can be safely used to identify\n * an exact set of block properties.\n */\n hash;\n /**\n * The timestamp for this block, which is the number of seconds since\n * epoch that this block was included.\n */\n timestamp;\n /**\n * The block hash of the parent block.\n */\n parentHash;\n /**\n * The hash tree root of the parent beacon block for the given\n * execution block. See [[link-eip-4788]].\n */\n parentBeaconBlockRoot;\n /**\n * The nonce.\n *\n * On legacy networks, this is the random number inserted which\n * permitted the difficulty target to be reached.\n */\n nonce;\n /**\n * The difficulty target.\n *\n * On legacy networks, this is the proof-of-work target required\n * for a block to meet the protocol rules to be included.\n *\n * On modern networks, this is a random number arrived at using\n * randao. @TODO: Find links?\n */\n difficulty;\n /**\n * The total gas limit for this block.\n */\n gasLimit;\n /**\n * The total gas used in this block.\n */\n gasUsed;\n /**\n * The root hash for the global state after applying changes\n * in this block.\n */\n stateRoot;\n /**\n * The hash of the transaction receipts trie.\n */\n receiptsRoot;\n /**\n * The total amount of blob gas consumed by the transactions\n * within the block. See [[link-eip-4844]].\n */\n blobGasUsed;\n /**\n * The running total of blob gas consumed in excess of the\n * target, prior to the block. See [[link-eip-4844]].\n */\n excessBlobGas;\n /**\n * The miner coinbase address, wihch receives any subsidies for\n * including this block.\n */\n miner;\n /**\n * The latest RANDAO mix of the post beacon state of\n * the previous block.\n */\n prevRandao;\n /**\n * Any extra data the validator wished to include.\n */\n extraData;\n /**\n * The base fee per gas that all transactions in this block were\n * charged.\n *\n * This adjusts after each block, depending on how congested the network\n * is.\n */\n baseFeePerGas;\n #transactions;\n /**\n * Create a new **Block** object.\n *\n * This should generally not be necessary as the unless implementing a\n * low-level library.\n */\n constructor(block, provider) {\n this.#transactions = block.transactions.map((tx) => {\n if (typeof tx !== \"string\") {\n return new TransactionResponse(tx, provider);\n }\n return tx;\n });\n (0, index_js_1.defineProperties)(this, {\n provider,\n hash: getValue(block.hash),\n number: block.number,\n timestamp: block.timestamp,\n parentHash: block.parentHash,\n parentBeaconBlockRoot: block.parentBeaconBlockRoot,\n nonce: block.nonce,\n difficulty: block.difficulty,\n gasLimit: block.gasLimit,\n gasUsed: block.gasUsed,\n blobGasUsed: block.blobGasUsed,\n excessBlobGas: block.excessBlobGas,\n miner: block.miner,\n prevRandao: getValue(block.prevRandao),\n extraData: block.extraData,\n baseFeePerGas: getValue(block.baseFeePerGas),\n stateRoot: block.stateRoot,\n receiptsRoot: block.receiptsRoot\n });\n }\n /**\n * Returns the list of transaction hashes, in the order\n * they were executed within the block.\n */\n get transactions() {\n return this.#transactions.map((tx) => {\n if (typeof tx === \"string\") {\n return tx;\n }\n return tx.hash;\n });\n }\n /**\n * Returns the complete transactions, in the order they\n * were executed within the block.\n *\n * This is only available for blocks which prefetched\n * transactions, by passing ``true`` to %%prefetchTxs%%\n * into [[Provider-getBlock]].\n */\n get prefetchedTransactions() {\n const txs = this.#transactions.slice();\n if (txs.length === 0) {\n return [];\n }\n (0, index_js_1.assert)(typeof txs[0] === \"object\", \"transactions were not prefetched with block request\", \"UNSUPPORTED_OPERATION\", {\n operation: \"transactionResponses()\"\n });\n return txs;\n }\n /**\n * Returns a JSON-friendly value.\n */\n toJSON() {\n const { baseFeePerGas, difficulty, extraData, gasLimit, gasUsed, hash: hash3, miner, prevRandao, nonce, number, parentHash, parentBeaconBlockRoot, stateRoot, receiptsRoot, timestamp, transactions } = this;\n return {\n _type: \"Block\",\n baseFeePerGas: toJson(baseFeePerGas),\n difficulty: toJson(difficulty),\n extraData,\n gasLimit: toJson(gasLimit),\n gasUsed: toJson(gasUsed),\n blobGasUsed: toJson(this.blobGasUsed),\n excessBlobGas: toJson(this.excessBlobGas),\n hash: hash3,\n miner,\n prevRandao,\n nonce,\n number,\n parentHash,\n timestamp,\n parentBeaconBlockRoot,\n stateRoot,\n receiptsRoot,\n transactions\n };\n }\n [Symbol.iterator]() {\n let index2 = 0;\n const txs = this.transactions;\n return {\n next: () => {\n if (index2 < this.length) {\n return {\n value: txs[index2++],\n done: false\n };\n }\n return { value: void 0, done: true };\n }\n };\n }\n /**\n * The number of transactions in this block.\n */\n get length() {\n return this.#transactions.length;\n }\n /**\n * The [[link-js-date]] this block was included at.\n */\n get date() {\n if (this.timestamp == null) {\n return null;\n }\n return new Date(this.timestamp * 1e3);\n }\n /**\n * Get the transaction at %%indexe%% within this block.\n */\n async getTransaction(indexOrHash) {\n let tx = void 0;\n if (typeof indexOrHash === \"number\") {\n tx = this.#transactions[indexOrHash];\n } else {\n const hash3 = indexOrHash.toLowerCase();\n for (const v2 of this.#transactions) {\n if (typeof v2 === \"string\") {\n if (v2 !== hash3) {\n continue;\n }\n tx = v2;\n break;\n } else {\n if (v2.hash !== hash3) {\n continue;\n }\n tx = v2;\n break;\n }\n }\n }\n if (tx == null) {\n throw new Error(\"no such tx\");\n }\n if (typeof tx === \"string\") {\n return await this.provider.getTransaction(tx);\n } else {\n return tx;\n }\n }\n /**\n * If a **Block** was fetched with a request to include the transactions\n * this will allow synchronous access to those transactions.\n *\n * If the transactions were not prefetched, this will throw.\n */\n getPrefetchedTransaction(indexOrHash) {\n const txs = this.prefetchedTransactions;\n if (typeof indexOrHash === \"number\") {\n return txs[indexOrHash];\n }\n indexOrHash = indexOrHash.toLowerCase();\n for (const tx of txs) {\n if (tx.hash === indexOrHash) {\n return tx;\n }\n }\n (0, index_js_1.assertArgument)(false, \"no matching transaction\", \"indexOrHash\", indexOrHash);\n }\n /**\n * Returns true if this block been mined. This provides a type guard\n * for all properties on a [[MinedBlock]].\n */\n isMined() {\n return !!this.hash;\n }\n /**\n * Returns true if this block is an [[link-eip-2930]] block.\n */\n isLondon() {\n return !!this.baseFeePerGas;\n }\n /**\n * @_ignore:\n */\n orphanedEvent() {\n if (!this.isMined()) {\n throw new Error(\"\");\n }\n return createOrphanedBlockFilter(this);\n }\n };\n exports3.Block = Block;\n var Log = class {\n /**\n * The provider connected to the log used to fetch additional details\n * if necessary.\n */\n provider;\n /**\n * The transaction hash of the transaction this log occurred in. Use the\n * [[Log-getTransaction]] to get the [[TransactionResponse]].\n */\n transactionHash;\n /**\n * The block hash of the block this log occurred in. Use the\n * [[Log-getBlock]] to get the [[Block]].\n */\n blockHash;\n /**\n * The block number of the block this log occurred in. It is preferred\n * to use the [[Block-hash]] when fetching the related [[Block]],\n * since in the case of an orphaned block, the block at that height may\n * have changed.\n */\n blockNumber;\n /**\n * If the **Log** represents a block that was removed due to an orphaned\n * block, this will be true.\n *\n * This can only happen within an orphan event listener.\n */\n removed;\n /**\n * The address of the contract that emitted this log.\n */\n address;\n /**\n * The data included in this log when it was emitted.\n */\n data;\n /**\n * The indexed topics included in this log when it was emitted.\n *\n * All topics are included in the bloom filters, so they can be\n * efficiently filtered using the [[Provider-getLogs]] method.\n */\n topics;\n /**\n * The index within the block this log occurred at. This is generally\n * not useful to developers, but can be used with the various roots\n * to proof inclusion within a block.\n */\n index;\n /**\n * The index within the transaction of this log.\n */\n transactionIndex;\n /**\n * @_ignore:\n */\n constructor(log, provider) {\n this.provider = provider;\n const topics = Object.freeze(log.topics.slice());\n (0, index_js_1.defineProperties)(this, {\n transactionHash: log.transactionHash,\n blockHash: log.blockHash,\n blockNumber: log.blockNumber,\n removed: log.removed,\n address: log.address,\n data: log.data,\n topics,\n index: log.index,\n transactionIndex: log.transactionIndex\n });\n }\n /**\n * Returns a JSON-compatible object.\n */\n toJSON() {\n const { address, blockHash, blockNumber, data, index: index2, removed, topics, transactionHash, transactionIndex } = this;\n return {\n _type: \"log\",\n address,\n blockHash,\n blockNumber,\n data,\n index: index2,\n removed,\n topics,\n transactionHash,\n transactionIndex\n };\n }\n /**\n * Returns the block that this log occurred in.\n */\n async getBlock() {\n const block = await this.provider.getBlock(this.blockHash);\n (0, index_js_1.assert)(!!block, \"failed to find transaction\", \"UNKNOWN_ERROR\", {});\n return block;\n }\n /**\n * Returns the transaction that this log occurred in.\n */\n async getTransaction() {\n const tx = await this.provider.getTransaction(this.transactionHash);\n (0, index_js_1.assert)(!!tx, \"failed to find transaction\", \"UNKNOWN_ERROR\", {});\n return tx;\n }\n /**\n * Returns the transaction receipt fot the transaction that this\n * log occurred in.\n */\n async getTransactionReceipt() {\n const receipt = await this.provider.getTransactionReceipt(this.transactionHash);\n (0, index_js_1.assert)(!!receipt, \"failed to find transaction receipt\", \"UNKNOWN_ERROR\", {});\n return receipt;\n }\n /**\n * @_ignore:\n */\n removedEvent() {\n return createRemovedLogFilter(this);\n }\n };\n exports3.Log = Log;\n var TransactionReceipt = class {\n /**\n * The provider connected to the log used to fetch additional details\n * if necessary.\n */\n provider;\n /**\n * The address the transaction was sent to.\n */\n to;\n /**\n * The sender of the transaction.\n */\n from;\n /**\n * The address of the contract if the transaction was directly\n * responsible for deploying one.\n *\n * This is non-null **only** if the ``to`` is empty and the ``data``\n * was successfully executed as initcode.\n */\n contractAddress;\n /**\n * The transaction hash.\n */\n hash;\n /**\n * The index of this transaction within the block transactions.\n */\n index;\n /**\n * The block hash of the [[Block]] this transaction was included in.\n */\n blockHash;\n /**\n * The block number of the [[Block]] this transaction was included in.\n */\n blockNumber;\n /**\n * The bloom filter bytes that represent all logs that occurred within\n * this transaction. This is generally not useful for most developers,\n * but can be used to validate the included logs.\n */\n logsBloom;\n /**\n * The actual amount of gas used by this transaction.\n *\n * When creating a transaction, the amount of gas that will be used can\n * only be approximated, but the sender must pay the gas fee for the\n * entire gas limit. After the transaction, the difference is refunded.\n */\n gasUsed;\n /**\n * The gas used for BLObs. See [[link-eip-4844]].\n */\n blobGasUsed;\n /**\n * The amount of gas used by all transactions within the block for this\n * and all transactions with a lower ``index``.\n *\n * This is generally not useful for developers but can be used to\n * validate certain aspects of execution.\n */\n cumulativeGasUsed;\n /**\n * The actual gas price used during execution.\n *\n * Due to the complexity of [[link-eip-1559]] this value can only\n * be caluclated after the transaction has been mined, snce the base\n * fee is protocol-enforced.\n */\n gasPrice;\n /**\n * The price paid per BLOB in gas. See [[link-eip-4844]].\n */\n blobGasPrice;\n /**\n * The [[link-eip-2718]] transaction type.\n */\n type;\n //readonly byzantium!: boolean;\n /**\n * The status of this transaction, indicating success (i.e. ``1``) or\n * a revert (i.e. ``0``).\n *\n * This is available in post-byzantium blocks, but some backends may\n * backfill this value.\n */\n status;\n /**\n * The root hash of this transaction.\n *\n * This is no present and was only included in pre-byzantium blocks, but\n * could be used to validate certain parts of the receipt.\n */\n root;\n #logs;\n /**\n * @_ignore:\n */\n constructor(tx, provider) {\n this.#logs = Object.freeze(tx.logs.map((log) => {\n return new Log(log, provider);\n }));\n let gasPrice = BN_0;\n if (tx.effectiveGasPrice != null) {\n gasPrice = tx.effectiveGasPrice;\n } else if (tx.gasPrice != null) {\n gasPrice = tx.gasPrice;\n }\n (0, index_js_1.defineProperties)(this, {\n provider,\n to: tx.to,\n from: tx.from,\n contractAddress: tx.contractAddress,\n hash: tx.hash,\n index: tx.index,\n blockHash: tx.blockHash,\n blockNumber: tx.blockNumber,\n logsBloom: tx.logsBloom,\n gasUsed: tx.gasUsed,\n cumulativeGasUsed: tx.cumulativeGasUsed,\n blobGasUsed: tx.blobGasUsed,\n gasPrice,\n blobGasPrice: tx.blobGasPrice,\n type: tx.type,\n //byzantium: tx.byzantium,\n status: tx.status,\n root: tx.root\n });\n }\n /**\n * The logs for this transaction.\n */\n get logs() {\n return this.#logs;\n }\n /**\n * Returns a JSON-compatible representation.\n */\n toJSON() {\n const {\n to,\n from: from14,\n contractAddress,\n hash: hash3,\n index: index2,\n blockHash,\n blockNumber,\n logsBloom,\n logs,\n //byzantium, \n status,\n root\n } = this;\n return {\n _type: \"TransactionReceipt\",\n blockHash,\n blockNumber,\n //byzantium, \n contractAddress,\n cumulativeGasUsed: toJson(this.cumulativeGasUsed),\n from: from14,\n gasPrice: toJson(this.gasPrice),\n blobGasUsed: toJson(this.blobGasUsed),\n blobGasPrice: toJson(this.blobGasPrice),\n gasUsed: toJson(this.gasUsed),\n hash: hash3,\n index: index2,\n logs,\n logsBloom,\n root,\n status,\n to\n };\n }\n /**\n * @_ignore:\n */\n get length() {\n return this.logs.length;\n }\n [Symbol.iterator]() {\n let index2 = 0;\n return {\n next: () => {\n if (index2 < this.length) {\n return { value: this.logs[index2++], done: false };\n }\n return { value: void 0, done: true };\n }\n };\n }\n /**\n * The total fee for this transaction, in wei.\n */\n get fee() {\n return this.gasUsed * this.gasPrice;\n }\n /**\n * Resolves to the block this transaction occurred in.\n */\n async getBlock() {\n const block = await this.provider.getBlock(this.blockHash);\n if (block == null) {\n throw new Error(\"TODO\");\n }\n return block;\n }\n /**\n * Resolves to the transaction this transaction occurred in.\n */\n async getTransaction() {\n const tx = await this.provider.getTransaction(this.hash);\n if (tx == null) {\n throw new Error(\"TODO\");\n }\n return tx;\n }\n /**\n * Resolves to the return value of the execution of this transaction.\n *\n * Support for this feature is limited, as it requires an archive node\n * with the ``debug_`` or ``trace_`` API enabled.\n */\n async getResult() {\n return await this.provider.getTransactionResult(this.hash);\n }\n /**\n * Resolves to the number of confirmations this transaction has.\n */\n async confirmations() {\n return await this.provider.getBlockNumber() - this.blockNumber + 1;\n }\n /**\n * @_ignore:\n */\n removedEvent() {\n return createRemovedTransactionFilter(this);\n }\n /**\n * @_ignore:\n */\n reorderedEvent(other) {\n (0, index_js_1.assert)(!other || other.isMined(), \"unmined 'other' transction cannot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"reorderedEvent(other)\" });\n return createReorderedTransactionFilter(this, other);\n }\n };\n exports3.TransactionReceipt = TransactionReceipt;\n var TransactionResponse = class _TransactionResponse {\n /**\n * The provider this is connected to, which will influence how its\n * methods will resolve its async inspection methods.\n */\n provider;\n /**\n * The block number of the block that this transaction was included in.\n *\n * This is ``null`` for pending transactions.\n */\n blockNumber;\n /**\n * The blockHash of the block that this transaction was included in.\n *\n * This is ``null`` for pending transactions.\n */\n blockHash;\n /**\n * The index within the block that this transaction resides at.\n */\n index;\n /**\n * The transaction hash.\n */\n hash;\n /**\n * The [[link-eip-2718]] transaction envelope type. This is\n * ``0`` for legacy transactions types.\n */\n type;\n /**\n * The receiver of this transaction.\n *\n * If ``null``, then the transaction is an initcode transaction.\n * This means the result of executing the [[data]] will be deployed\n * as a new contract on chain (assuming it does not revert) and the\n * address may be computed using [[getCreateAddress]].\n */\n to;\n /**\n * The sender of this transaction. It is implicitly computed\n * from the transaction pre-image hash (as the digest) and the\n * [[signature]] using ecrecover.\n */\n from;\n /**\n * The nonce, which is used to prevent replay attacks and offer\n * a method to ensure transactions from a given sender are explicitly\n * ordered.\n *\n * When sending a transaction, this must be equal to the number of\n * transactions ever sent by [[from]].\n */\n nonce;\n /**\n * The maximum units of gas this transaction can consume. If execution\n * exceeds this, the entries transaction is reverted and the sender\n * is charged for the full amount, despite not state changes being made.\n */\n gasLimit;\n /**\n * The gas price can have various values, depending on the network.\n *\n * In modern networks, for transactions that are included this is\n * the //effective gas price// (the fee per gas that was actually\n * charged), while for transactions that have not been included yet\n * is the [[maxFeePerGas]].\n *\n * For legacy transactions, or transactions on legacy networks, this\n * is the fee that will be charged per unit of gas the transaction\n * consumes.\n */\n gasPrice;\n /**\n * The maximum priority fee (per unit of gas) to allow a\n * validator to charge the sender. This is inclusive of the\n * [[maxFeeFeePerGas]].\n */\n maxPriorityFeePerGas;\n /**\n * The maximum fee (per unit of gas) to allow this transaction\n * to charge the sender.\n */\n maxFeePerGas;\n /**\n * The [[link-eip-4844]] max fee per BLOb gas.\n */\n maxFeePerBlobGas;\n /**\n * The data.\n */\n data;\n /**\n * The value, in wei. Use [[formatEther]] to format this value\n * as ether.\n */\n value;\n /**\n * The chain ID.\n */\n chainId;\n /**\n * The signature.\n */\n signature;\n /**\n * The [[link-eip-2930]] access list for transaction types that\n * support it, otherwise ``null``.\n */\n accessList;\n /**\n * The [[link-eip-4844]] BLOb versioned hashes.\n */\n blobVersionedHashes;\n /**\n * The [[link-eip-7702]] authorizations (if any).\n */\n authorizationList;\n #startBlock;\n /**\n * @_ignore:\n */\n constructor(tx, provider) {\n this.provider = provider;\n this.blockNumber = tx.blockNumber != null ? tx.blockNumber : null;\n this.blockHash = tx.blockHash != null ? tx.blockHash : null;\n this.hash = tx.hash;\n this.index = tx.index;\n this.type = tx.type;\n this.from = tx.from;\n this.to = tx.to || null;\n this.gasLimit = tx.gasLimit;\n this.nonce = tx.nonce;\n this.data = tx.data;\n this.value = tx.value;\n this.gasPrice = tx.gasPrice;\n this.maxPriorityFeePerGas = tx.maxPriorityFeePerGas != null ? tx.maxPriorityFeePerGas : null;\n this.maxFeePerGas = tx.maxFeePerGas != null ? tx.maxFeePerGas : null;\n this.maxFeePerBlobGas = tx.maxFeePerBlobGas != null ? tx.maxFeePerBlobGas : null;\n this.chainId = tx.chainId;\n this.signature = tx.signature;\n this.accessList = tx.accessList != null ? tx.accessList : null;\n this.blobVersionedHashes = tx.blobVersionedHashes != null ? tx.blobVersionedHashes : null;\n this.authorizationList = tx.authorizationList != null ? tx.authorizationList : null;\n this.#startBlock = -1;\n }\n /**\n * Returns a JSON-compatible representation of this transaction.\n */\n toJSON() {\n const { blockNumber, blockHash, index: index2, hash: hash3, type, to, from: from14, nonce, data, signature, accessList, blobVersionedHashes } = this;\n return {\n _type: \"TransactionResponse\",\n accessList,\n blockNumber,\n blockHash,\n blobVersionedHashes,\n chainId: toJson(this.chainId),\n data,\n from: from14,\n gasLimit: toJson(this.gasLimit),\n gasPrice: toJson(this.gasPrice),\n hash: hash3,\n maxFeePerGas: toJson(this.maxFeePerGas),\n maxPriorityFeePerGas: toJson(this.maxPriorityFeePerGas),\n maxFeePerBlobGas: toJson(this.maxFeePerBlobGas),\n nonce,\n signature,\n to,\n index: index2,\n type,\n value: toJson(this.value)\n };\n }\n /**\n * Resolves to the Block that this transaction was included in.\n *\n * This will return null if the transaction has not been included yet.\n */\n async getBlock() {\n let blockNumber = this.blockNumber;\n if (blockNumber == null) {\n const tx = await this.getTransaction();\n if (tx) {\n blockNumber = tx.blockNumber;\n }\n }\n if (blockNumber == null) {\n return null;\n }\n const block = this.provider.getBlock(blockNumber);\n if (block == null) {\n throw new Error(\"TODO\");\n }\n return block;\n }\n /**\n * Resolves to this transaction being re-requested from the\n * provider. This can be used if you have an unmined transaction\n * and wish to get an up-to-date populated instance.\n */\n async getTransaction() {\n return this.provider.getTransaction(this.hash);\n }\n /**\n * Resolve to the number of confirmations this transaction has.\n */\n async confirmations() {\n if (this.blockNumber == null) {\n const { tx, blockNumber: blockNumber2 } = await (0, index_js_1.resolveProperties)({\n tx: this.getTransaction(),\n blockNumber: this.provider.getBlockNumber()\n });\n if (tx == null || tx.blockNumber == null) {\n return 0;\n }\n return blockNumber2 - tx.blockNumber + 1;\n }\n const blockNumber = await this.provider.getBlockNumber();\n return blockNumber - this.blockNumber + 1;\n }\n /**\n * Resolves once this transaction has been mined and has\n * %%confirms%% blocks including it (default: ``1``) with an\n * optional %%timeout%%.\n *\n * This can resolve to ``null`` only if %%confirms%% is ``0``\n * and the transaction has not been mined, otherwise this will\n * wait until enough confirmations have completed.\n */\n async wait(_confirms, _timeout) {\n const confirms = _confirms == null ? 1 : _confirms;\n const timeout = _timeout == null ? 0 : _timeout;\n let startBlock = this.#startBlock;\n let nextScan = -1;\n let stopScanning = startBlock === -1 ? true : false;\n const checkReplacement = async () => {\n if (stopScanning) {\n return null;\n }\n const { blockNumber, nonce } = await (0, index_js_1.resolveProperties)({\n blockNumber: this.provider.getBlockNumber(),\n nonce: this.provider.getTransactionCount(this.from)\n });\n if (nonce < this.nonce) {\n startBlock = blockNumber;\n return;\n }\n if (stopScanning) {\n return null;\n }\n const mined = await this.getTransaction();\n if (mined && mined.blockNumber != null) {\n return;\n }\n if (nextScan === -1) {\n nextScan = startBlock - 3;\n if (nextScan < this.#startBlock) {\n nextScan = this.#startBlock;\n }\n }\n while (nextScan <= blockNumber) {\n if (stopScanning) {\n return null;\n }\n const block = await this.provider.getBlock(nextScan, true);\n if (block == null) {\n return;\n }\n for (const hash3 of block) {\n if (hash3 === this.hash) {\n return;\n }\n }\n for (let i3 = 0; i3 < block.length; i3++) {\n const tx = await block.getTransaction(i3);\n if (tx.from === this.from && tx.nonce === this.nonce) {\n if (stopScanning) {\n return null;\n }\n const receipt2 = await this.provider.getTransactionReceipt(tx.hash);\n if (receipt2 == null) {\n return;\n }\n if (blockNumber - receipt2.blockNumber + 1 < confirms) {\n return;\n }\n let reason = \"replaced\";\n if (tx.data === this.data && tx.to === this.to && tx.value === this.value) {\n reason = \"repriced\";\n } else if (tx.data === \"0x\" && tx.from === tx.to && tx.value === BN_0) {\n reason = \"cancelled\";\n }\n (0, index_js_1.assert)(false, \"transaction was replaced\", \"TRANSACTION_REPLACED\", {\n cancelled: reason === \"replaced\" || reason === \"cancelled\",\n reason,\n replacement: tx.replaceableTransaction(startBlock),\n hash: tx.hash,\n receipt: receipt2\n });\n }\n }\n nextScan++;\n }\n return;\n };\n const checkReceipt = (receipt2) => {\n if (receipt2 == null || receipt2.status !== 0) {\n return receipt2;\n }\n (0, index_js_1.assert)(false, \"transaction execution reverted\", \"CALL_EXCEPTION\", {\n action: \"sendTransaction\",\n data: null,\n reason: null,\n invocation: null,\n revert: null,\n transaction: {\n to: receipt2.to,\n from: receipt2.from,\n data: \"\"\n // @TODO: in v7, split out sendTransaction properties\n },\n receipt: receipt2\n });\n };\n const receipt = await this.provider.getTransactionReceipt(this.hash);\n if (confirms === 0) {\n return checkReceipt(receipt);\n }\n if (receipt) {\n if (confirms === 1 || await receipt.confirmations() >= confirms) {\n return checkReceipt(receipt);\n }\n } else {\n await checkReplacement();\n if (confirms === 0) {\n return null;\n }\n }\n const waiter = new Promise((resolve, reject) => {\n const cancellers = [];\n const cancel = () => {\n cancellers.forEach((c4) => c4());\n };\n cancellers.push(() => {\n stopScanning = true;\n });\n if (timeout > 0) {\n const timer = setTimeout(() => {\n cancel();\n reject((0, index_js_1.makeError)(\"wait for transaction timeout\", \"TIMEOUT\"));\n }, timeout);\n cancellers.push(() => {\n clearTimeout(timer);\n });\n }\n const txListener = async (receipt2) => {\n if (await receipt2.confirmations() >= confirms) {\n cancel();\n try {\n resolve(checkReceipt(receipt2));\n } catch (error) {\n reject(error);\n }\n }\n };\n cancellers.push(() => {\n this.provider.off(this.hash, txListener);\n });\n this.provider.on(this.hash, txListener);\n if (startBlock >= 0) {\n const replaceListener = async () => {\n try {\n await checkReplacement();\n } catch (error) {\n if ((0, index_js_1.isError)(error, \"TRANSACTION_REPLACED\")) {\n cancel();\n reject(error);\n return;\n }\n }\n if (!stopScanning) {\n this.provider.once(\"block\", replaceListener);\n }\n };\n cancellers.push(() => {\n this.provider.off(\"block\", replaceListener);\n });\n this.provider.once(\"block\", replaceListener);\n }\n });\n return await waiter;\n }\n /**\n * Returns ``true`` if this transaction has been included.\n *\n * This is effective only as of the time the TransactionResponse\n * was instantiated. To get up-to-date information, use\n * [[getTransaction]].\n *\n * This provides a Type Guard that this transaction will have\n * non-null property values for properties that are null for\n * unmined transactions.\n */\n isMined() {\n return this.blockHash != null;\n }\n /**\n * Returns true if the transaction is a legacy (i.e. ``type == 0``)\n * transaction.\n *\n * This provides a Type Guard that this transaction will have\n * the ``null``-ness for hardfork-specific properties set correctly.\n */\n isLegacy() {\n return this.type === 0;\n }\n /**\n * Returns true if the transaction is a Berlin (i.e. ``type == 1``)\n * transaction. See [[link-eip-2070]].\n *\n * This provides a Type Guard that this transaction will have\n * the ``null``-ness for hardfork-specific properties set correctly.\n */\n isBerlin() {\n return this.type === 1;\n }\n /**\n * Returns true if the transaction is a London (i.e. ``type == 2``)\n * transaction. See [[link-eip-1559]].\n *\n * This provides a Type Guard that this transaction will have\n * the ``null``-ness for hardfork-specific properties set correctly.\n */\n isLondon() {\n return this.type === 2;\n }\n /**\n * Returns true if hte transaction is a Cancun (i.e. ``type == 3``)\n * transaction. See [[link-eip-4844]].\n */\n isCancun() {\n return this.type === 3;\n }\n /**\n * Returns a filter which can be used to listen for orphan events\n * that evict this transaction.\n */\n removedEvent() {\n (0, index_js_1.assert)(this.isMined(), \"unmined transaction canot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"removeEvent()\" });\n return createRemovedTransactionFilter(this);\n }\n /**\n * Returns a filter which can be used to listen for orphan events\n * that re-order this event against %%other%%.\n */\n reorderedEvent(other) {\n (0, index_js_1.assert)(this.isMined(), \"unmined transaction canot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"removeEvent()\" });\n (0, index_js_1.assert)(!other || other.isMined(), \"unmined 'other' transaction canot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"removeEvent()\" });\n return createReorderedTransactionFilter(this, other);\n }\n /**\n * Returns a new TransactionResponse instance which has the ability to\n * detect (and throw an error) if the transaction is replaced, which\n * will begin scanning at %%startBlock%%.\n *\n * This should generally not be used by developers and is intended\n * primarily for internal use. Setting an incorrect %%startBlock%% can\n * have devastating performance consequences if used incorrectly.\n */\n replaceableTransaction(startBlock) {\n (0, index_js_1.assertArgument)(Number.isInteger(startBlock) && startBlock >= 0, \"invalid startBlock\", \"startBlock\", startBlock);\n const tx = new _TransactionResponse(this, this.provider);\n tx.#startBlock = startBlock;\n return tx;\n }\n };\n exports3.TransactionResponse = TransactionResponse;\n function createOrphanedBlockFilter(block) {\n return { orphan: \"drop-block\", hash: block.hash, number: block.number };\n }\n function createReorderedTransactionFilter(tx, other) {\n return { orphan: \"reorder-transaction\", tx, other };\n }\n function createRemovedTransactionFilter(tx) {\n return { orphan: \"drop-transaction\", tx };\n }\n function createRemovedLogFilter(log) {\n return { orphan: \"drop-log\", log: {\n transactionHash: log.transactionHash,\n blockHash: log.blockHash,\n blockNumber: log.blockNumber,\n address: log.address,\n data: log.data,\n topics: Object.freeze(log.topics.slice()),\n index: log.index\n } };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/wrappers.js\n var require_wrappers = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/wrappers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ContractEventPayload = exports3.ContractUnknownEventPayload = exports3.ContractTransactionResponse = exports3.ContractTransactionReceipt = exports3.UndecodedEventLog = exports3.EventLog = void 0;\n var provider_js_1 = require_provider();\n var index_js_1 = require_utils8();\n var EventLog = class extends provider_js_1.Log {\n /**\n * The Contract Interface.\n */\n interface;\n /**\n * The matching event.\n */\n fragment;\n /**\n * The parsed arguments passed to the event by ``emit``.\n */\n args;\n /**\n * @_ignore:\n */\n constructor(log, iface, fragment) {\n super(log, log.provider);\n const args = iface.decodeEventLog(fragment, log.data, log.topics);\n (0, index_js_1.defineProperties)(this, { args, fragment, interface: iface });\n }\n /**\n * The name of the event.\n */\n get eventName() {\n return this.fragment.name;\n }\n /**\n * The signature of the event.\n */\n get eventSignature() {\n return this.fragment.format();\n }\n };\n exports3.EventLog = EventLog;\n var UndecodedEventLog = class extends provider_js_1.Log {\n /**\n * The error encounted when trying to decode the log.\n */\n error;\n /**\n * @_ignore:\n */\n constructor(log, error) {\n super(log, log.provider);\n (0, index_js_1.defineProperties)(this, { error });\n }\n };\n exports3.UndecodedEventLog = UndecodedEventLog;\n var ContractTransactionReceipt = class extends provider_js_1.TransactionReceipt {\n #iface;\n /**\n * @_ignore:\n */\n constructor(iface, provider, tx) {\n super(tx, provider);\n this.#iface = iface;\n }\n /**\n * The parsed logs for any [[Log]] which has a matching event in the\n * Contract ABI.\n */\n get logs() {\n return super.logs.map((log) => {\n const fragment = log.topics.length ? this.#iface.getEvent(log.topics[0]) : null;\n if (fragment) {\n try {\n return new EventLog(log, this.#iface, fragment);\n } catch (error) {\n return new UndecodedEventLog(log, error);\n }\n }\n return log;\n });\n }\n };\n exports3.ContractTransactionReceipt = ContractTransactionReceipt;\n var ContractTransactionResponse = class extends provider_js_1.TransactionResponse {\n #iface;\n /**\n * @_ignore:\n */\n constructor(iface, provider, tx) {\n super(tx, provider);\n this.#iface = iface;\n }\n /**\n * Resolves once this transaction has been mined and has\n * %%confirms%% blocks including it (default: ``1``) with an\n * optional %%timeout%%.\n *\n * This can resolve to ``null`` only if %%confirms%% is ``0``\n * and the transaction has not been mined, otherwise this will\n * wait until enough confirmations have completed.\n */\n async wait(confirms, timeout) {\n const receipt = await super.wait(confirms, timeout);\n if (receipt == null) {\n return null;\n }\n return new ContractTransactionReceipt(this.#iface, this.provider, receipt);\n }\n };\n exports3.ContractTransactionResponse = ContractTransactionResponse;\n var ContractUnknownEventPayload = class extends index_js_1.EventPayload {\n /**\n * The log with no matching events.\n */\n log;\n /**\n * @_event:\n */\n constructor(contract, listener, filter, log) {\n super(contract, listener, filter);\n (0, index_js_1.defineProperties)(this, { log });\n }\n /**\n * Resolves to the block the event occured in.\n */\n async getBlock() {\n return await this.log.getBlock();\n }\n /**\n * Resolves to the transaction the event occured in.\n */\n async getTransaction() {\n return await this.log.getTransaction();\n }\n /**\n * Resolves to the transaction receipt the event occured in.\n */\n async getTransactionReceipt() {\n return await this.log.getTransactionReceipt();\n }\n };\n exports3.ContractUnknownEventPayload = ContractUnknownEventPayload;\n var ContractEventPayload = class extends ContractUnknownEventPayload {\n /**\n * @_ignore:\n */\n constructor(contract, listener, filter, fragment, _log) {\n super(contract, listener, filter, new EventLog(_log, contract.interface, fragment));\n const args = contract.interface.decodeEventLog(fragment, this.log.data, this.log.topics);\n (0, index_js_1.defineProperties)(this, { args, fragment });\n }\n /**\n * The event name.\n */\n get eventName() {\n return this.fragment.name;\n }\n /**\n * The event signature.\n */\n get eventSignature() {\n return this.fragment.format();\n }\n };\n exports3.ContractEventPayload = ContractEventPayload;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/contract.js\n var require_contract = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/contract.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Contract = exports3.BaseContract = exports3.resolveArgs = exports3.copyOverrides = void 0;\n var index_js_1 = require_abi();\n var index_js_2 = require_address3();\n var provider_js_1 = require_provider();\n var index_js_3 = require_utils8();\n var wrappers_js_1 = require_wrappers();\n var BN_0 = BigInt(0);\n function canCall(value) {\n return value && typeof value.call === \"function\";\n }\n function canEstimate(value) {\n return value && typeof value.estimateGas === \"function\";\n }\n function canResolve(value) {\n return value && typeof value.resolveName === \"function\";\n }\n function canSend(value) {\n return value && typeof value.sendTransaction === \"function\";\n }\n function getResolver(value) {\n if (value != null) {\n if (canResolve(value)) {\n return value;\n }\n if (value.provider) {\n return value.provider;\n }\n }\n return void 0;\n }\n var PreparedTopicFilter = class {\n #filter;\n fragment;\n constructor(contract, fragment, args) {\n (0, index_js_3.defineProperties)(this, { fragment });\n if (fragment.inputs.length < args.length) {\n throw new Error(\"too many arguments\");\n }\n const runner = getRunner(contract.runner, \"resolveName\");\n const resolver = canResolve(runner) ? runner : null;\n this.#filter = async function() {\n const resolvedArgs = await Promise.all(fragment.inputs.map((param, index2) => {\n const arg = args[index2];\n if (arg == null) {\n return null;\n }\n return param.walkAsync(args[index2], (type, value) => {\n if (type === \"address\") {\n if (Array.isArray(value)) {\n return Promise.all(value.map((v2) => (0, index_js_2.resolveAddress)(v2, resolver)));\n }\n return (0, index_js_2.resolveAddress)(value, resolver);\n }\n return value;\n });\n }));\n return contract.interface.encodeFilterTopics(fragment, resolvedArgs);\n }();\n }\n getTopicFilter() {\n return this.#filter;\n }\n };\n function getRunner(value, feature) {\n if (value == null) {\n return null;\n }\n if (typeof value[feature] === \"function\") {\n return value;\n }\n if (value.provider && typeof value.provider[feature] === \"function\") {\n return value.provider;\n }\n return null;\n }\n function getProvider(value) {\n if (value == null) {\n return null;\n }\n return value.provider || null;\n }\n async function copyOverrides(arg, allowed) {\n const _overrides = index_js_1.Typed.dereference(arg, \"overrides\");\n (0, index_js_3.assertArgument)(typeof _overrides === \"object\", \"invalid overrides parameter\", \"overrides\", arg);\n const overrides = (0, provider_js_1.copyRequest)(_overrides);\n (0, index_js_3.assertArgument)(overrides.to == null || (allowed || []).indexOf(\"to\") >= 0, \"cannot override to\", \"overrides.to\", overrides.to);\n (0, index_js_3.assertArgument)(overrides.data == null || (allowed || []).indexOf(\"data\") >= 0, \"cannot override data\", \"overrides.data\", overrides.data);\n if (overrides.from) {\n overrides.from = overrides.from;\n }\n return overrides;\n }\n exports3.copyOverrides = copyOverrides;\n async function resolveArgs(_runner, inputs, args) {\n const runner = getRunner(_runner, \"resolveName\");\n const resolver = canResolve(runner) ? runner : null;\n return await Promise.all(inputs.map((param, index2) => {\n return param.walkAsync(args[index2], (type, value) => {\n value = index_js_1.Typed.dereference(value, type);\n if (type === \"address\") {\n return (0, index_js_2.resolveAddress)(value, resolver);\n }\n return value;\n });\n }));\n }\n exports3.resolveArgs = resolveArgs;\n function buildWrappedFallback(contract) {\n const populateTransaction = async function(overrides) {\n const tx = await copyOverrides(overrides, [\"data\"]);\n tx.to = await contract.getAddress();\n if (tx.from) {\n tx.from = await (0, index_js_2.resolveAddress)(tx.from, getResolver(contract.runner));\n }\n const iface = contract.interface;\n const noValue = (0, index_js_3.getBigInt)(tx.value || BN_0, \"overrides.value\") === BN_0;\n const noData = (tx.data || \"0x\") === \"0x\";\n if (iface.fallback && !iface.fallback.payable && iface.receive && !noData && !noValue) {\n (0, index_js_3.assertArgument)(false, \"cannot send data to receive or send value to non-payable fallback\", \"overrides\", overrides);\n }\n (0, index_js_3.assertArgument)(iface.fallback || noData, \"cannot send data to receive-only contract\", \"overrides.data\", tx.data);\n const payable = iface.receive || iface.fallback && iface.fallback.payable;\n (0, index_js_3.assertArgument)(payable || noValue, \"cannot send value to non-payable fallback\", \"overrides.value\", tx.value);\n (0, index_js_3.assertArgument)(iface.fallback || noData, \"cannot send data to receive-only contract\", \"overrides.data\", tx.data);\n return tx;\n };\n const staticCall = async function(overrides) {\n const runner = getRunner(contract.runner, \"call\");\n (0, index_js_3.assert)(canCall(runner), \"contract runner does not support calling\", \"UNSUPPORTED_OPERATION\", { operation: \"call\" });\n const tx = await populateTransaction(overrides);\n try {\n return await runner.call(tx);\n } catch (error) {\n if ((0, index_js_3.isCallException)(error) && error.data) {\n throw contract.interface.makeError(error.data, tx);\n }\n throw error;\n }\n };\n const send = async function(overrides) {\n const runner = contract.runner;\n (0, index_js_3.assert)(canSend(runner), \"contract runner does not support sending transactions\", \"UNSUPPORTED_OPERATION\", { operation: \"sendTransaction\" });\n const tx = await runner.sendTransaction(await populateTransaction(overrides));\n const provider = getProvider(contract.runner);\n return new wrappers_js_1.ContractTransactionResponse(contract.interface, provider, tx);\n };\n const estimateGas2 = async function(overrides) {\n const runner = getRunner(contract.runner, \"estimateGas\");\n (0, index_js_3.assert)(canEstimate(runner), \"contract runner does not support gas estimation\", \"UNSUPPORTED_OPERATION\", { operation: \"estimateGas\" });\n return await runner.estimateGas(await populateTransaction(overrides));\n };\n const method = async (overrides) => {\n return await send(overrides);\n };\n (0, index_js_3.defineProperties)(method, {\n _contract: contract,\n estimateGas: estimateGas2,\n populateTransaction,\n send,\n staticCall\n });\n return method;\n }\n function buildWrappedMethod(contract, key) {\n const getFragment = function(...args) {\n const fragment = contract.interface.getFunction(key, args);\n (0, index_js_3.assert)(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key, args }\n });\n return fragment;\n };\n const populateTransaction = async function(...args) {\n const fragment = getFragment(...args);\n let overrides = {};\n if (fragment.inputs.length + 1 === args.length) {\n overrides = await copyOverrides(args.pop());\n if (overrides.from) {\n overrides.from = await (0, index_js_2.resolveAddress)(overrides.from, getResolver(contract.runner));\n }\n }\n if (fragment.inputs.length !== args.length) {\n throw new Error(\"internal error: fragment inputs doesn't match arguments; should not happen\");\n }\n const resolvedArgs = await resolveArgs(contract.runner, fragment.inputs, args);\n return Object.assign({}, overrides, await (0, index_js_3.resolveProperties)({\n to: contract.getAddress(),\n data: contract.interface.encodeFunctionData(fragment, resolvedArgs)\n }));\n };\n const staticCall = async function(...args) {\n const result = await staticCallResult(...args);\n if (result.length === 1) {\n return result[0];\n }\n return result;\n };\n const send = async function(...args) {\n const runner = contract.runner;\n (0, index_js_3.assert)(canSend(runner), \"contract runner does not support sending transactions\", \"UNSUPPORTED_OPERATION\", { operation: \"sendTransaction\" });\n const tx = await runner.sendTransaction(await populateTransaction(...args));\n const provider = getProvider(contract.runner);\n return new wrappers_js_1.ContractTransactionResponse(contract.interface, provider, tx);\n };\n const estimateGas2 = async function(...args) {\n const runner = getRunner(contract.runner, \"estimateGas\");\n (0, index_js_3.assert)(canEstimate(runner), \"contract runner does not support gas estimation\", \"UNSUPPORTED_OPERATION\", { operation: \"estimateGas\" });\n return await runner.estimateGas(await populateTransaction(...args));\n };\n const staticCallResult = async function(...args) {\n const runner = getRunner(contract.runner, \"call\");\n (0, index_js_3.assert)(canCall(runner), \"contract runner does not support calling\", \"UNSUPPORTED_OPERATION\", { operation: \"call\" });\n const tx = await populateTransaction(...args);\n let result = \"0x\";\n try {\n result = await runner.call(tx);\n } catch (error) {\n if ((0, index_js_3.isCallException)(error) && error.data) {\n throw contract.interface.makeError(error.data, tx);\n }\n throw error;\n }\n const fragment = getFragment(...args);\n return contract.interface.decodeFunctionResult(fragment, result);\n };\n const method = async (...args) => {\n const fragment = getFragment(...args);\n if (fragment.constant) {\n return await staticCall(...args);\n }\n return await send(...args);\n };\n (0, index_js_3.defineProperties)(method, {\n name: contract.interface.getFunctionName(key),\n _contract: contract,\n _key: key,\n getFragment,\n estimateGas: estimateGas2,\n populateTransaction,\n send,\n staticCall,\n staticCallResult\n });\n Object.defineProperty(method, \"fragment\", {\n configurable: false,\n enumerable: true,\n get: () => {\n const fragment = contract.interface.getFunction(key);\n (0, index_js_3.assert)(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key }\n });\n return fragment;\n }\n });\n return method;\n }\n function buildWrappedEvent(contract, key) {\n const getFragment = function(...args) {\n const fragment = contract.interface.getEvent(key, args);\n (0, index_js_3.assert)(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key, args }\n });\n return fragment;\n };\n const method = function(...args) {\n return new PreparedTopicFilter(contract, getFragment(...args), args);\n };\n (0, index_js_3.defineProperties)(method, {\n name: contract.interface.getEventName(key),\n _contract: contract,\n _key: key,\n getFragment\n });\n Object.defineProperty(method, \"fragment\", {\n configurable: false,\n enumerable: true,\n get: () => {\n const fragment = contract.interface.getEvent(key);\n (0, index_js_3.assert)(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key }\n });\n return fragment;\n }\n });\n return method;\n }\n var internal = Symbol.for(\"_ethersInternal_contract\");\n var internalValues = /* @__PURE__ */ new WeakMap();\n function setInternal(contract, values) {\n internalValues.set(contract[internal], values);\n }\n function getInternal(contract) {\n return internalValues.get(contract[internal]);\n }\n function isDeferred(value) {\n return value && typeof value === \"object\" && \"getTopicFilter\" in value && typeof value.getTopicFilter === \"function\" && value.fragment;\n }\n async function getSubInfo(contract, event) {\n let topics;\n let fragment = null;\n if (Array.isArray(event)) {\n const topicHashify = function(name) {\n if ((0, index_js_3.isHexString)(name, 32)) {\n return name;\n }\n const fragment2 = contract.interface.getEvent(name);\n (0, index_js_3.assertArgument)(fragment2, \"unknown fragment\", \"name\", name);\n return fragment2.topicHash;\n };\n topics = event.map((e2) => {\n if (e2 == null) {\n return null;\n }\n if (Array.isArray(e2)) {\n return e2.map(topicHashify);\n }\n return topicHashify(e2);\n });\n } else if (event === \"*\") {\n topics = [null];\n } else if (typeof event === \"string\") {\n if ((0, index_js_3.isHexString)(event, 32)) {\n topics = [event];\n } else {\n fragment = contract.interface.getEvent(event);\n (0, index_js_3.assertArgument)(fragment, \"unknown fragment\", \"event\", event);\n topics = [fragment.topicHash];\n }\n } else if (isDeferred(event)) {\n topics = await event.getTopicFilter();\n } else if (\"fragment\" in event) {\n fragment = event.fragment;\n topics = [fragment.topicHash];\n } else {\n (0, index_js_3.assertArgument)(false, \"unknown event name\", \"event\", event);\n }\n topics = topics.map((t3) => {\n if (t3 == null) {\n return null;\n }\n if (Array.isArray(t3)) {\n const items = Array.from(new Set(t3.map((t4) => t4.toLowerCase())).values());\n if (items.length === 1) {\n return items[0];\n }\n items.sort();\n return items;\n }\n return t3.toLowerCase();\n });\n const tag = topics.map((t3) => {\n if (t3 == null) {\n return \"null\";\n }\n if (Array.isArray(t3)) {\n return t3.join(\"|\");\n }\n return t3;\n }).join(\"&\");\n return { fragment, tag, topics };\n }\n async function hasSub(contract, event) {\n const { subs } = getInternal(contract);\n return subs.get((await getSubInfo(contract, event)).tag) || null;\n }\n async function getSub(contract, operation, event) {\n const provider = getProvider(contract.runner);\n (0, index_js_3.assert)(provider, \"contract runner does not support subscribing\", \"UNSUPPORTED_OPERATION\", { operation });\n const { fragment, tag, topics } = await getSubInfo(contract, event);\n const { addr, subs } = getInternal(contract);\n let sub = subs.get(tag);\n if (!sub) {\n const address = addr ? addr : contract;\n const filter = { address, topics };\n const listener = (log) => {\n let foundFragment = fragment;\n if (foundFragment == null) {\n try {\n foundFragment = contract.interface.getEvent(log.topics[0]);\n } catch (error) {\n }\n }\n if (foundFragment) {\n const _foundFragment = foundFragment;\n const args = fragment ? contract.interface.decodeEventLog(fragment, log.data, log.topics) : [];\n emit2(contract, event, args, (listener2) => {\n return new wrappers_js_1.ContractEventPayload(contract, listener2, event, _foundFragment, log);\n });\n } else {\n emit2(contract, event, [], (listener2) => {\n return new wrappers_js_1.ContractUnknownEventPayload(contract, listener2, event, log);\n });\n }\n };\n let starting = [];\n const start = () => {\n if (starting.length) {\n return;\n }\n starting.push(provider.on(filter, listener));\n };\n const stop = async () => {\n if (starting.length == 0) {\n return;\n }\n let started = starting;\n starting = [];\n await Promise.all(started);\n provider.off(filter, listener);\n };\n sub = { tag, listeners: [], start, stop };\n subs.set(tag, sub);\n }\n return sub;\n }\n var lastEmit = Promise.resolve();\n async function _emit(contract, event, args, payloadFunc) {\n await lastEmit;\n const sub = await hasSub(contract, event);\n if (!sub) {\n return false;\n }\n const count = sub.listeners.length;\n sub.listeners = sub.listeners.filter(({ listener, once: once2 }) => {\n const passArgs = Array.from(args);\n if (payloadFunc) {\n passArgs.push(payloadFunc(once2 ? null : listener));\n }\n try {\n listener.call(contract, ...passArgs);\n } catch (error) {\n }\n return !once2;\n });\n if (sub.listeners.length === 0) {\n sub.stop();\n getInternal(contract).subs.delete(sub.tag);\n }\n return count > 0;\n }\n async function emit2(contract, event, args, payloadFunc) {\n try {\n await lastEmit;\n } catch (error) {\n }\n const resultPromise = _emit(contract, event, args, payloadFunc);\n lastEmit = resultPromise;\n return await resultPromise;\n }\n var passProperties = [\"then\"];\n var BaseContract = class _BaseContract {\n /**\n * The target to connect to.\n *\n * This can be an address, ENS name or any [[Addressable]], such as\n * another contract. To get the resovled address, use the ``getAddress``\n * method.\n */\n target;\n /**\n * The contract Interface.\n */\n interface;\n /**\n * The connected runner. This is generally a [[Provider]] or a\n * [[Signer]], which dictates what operations are supported.\n *\n * For example, a **Contract** connected to a [[Provider]] may\n * only execute read-only operations.\n */\n runner;\n /**\n * All the Events available on this contract.\n */\n filters;\n /**\n * @_ignore:\n */\n [internal];\n /**\n * The fallback or receive function if any.\n */\n fallback;\n /**\n * Creates a new contract connected to %%target%% with the %%abi%% and\n * optionally connected to a %%runner%% to perform operations on behalf\n * of.\n */\n constructor(target, abi2, runner, _deployTx) {\n (0, index_js_3.assertArgument)(typeof target === \"string\" || (0, index_js_2.isAddressable)(target), \"invalid value for Contract target\", \"target\", target);\n if (runner == null) {\n runner = null;\n }\n const iface = index_js_1.Interface.from(abi2);\n (0, index_js_3.defineProperties)(this, { target, runner, interface: iface });\n Object.defineProperty(this, internal, { value: {} });\n let addrPromise;\n let addr = null;\n let deployTx = null;\n if (_deployTx) {\n const provider = getProvider(runner);\n deployTx = new wrappers_js_1.ContractTransactionResponse(this.interface, provider, _deployTx);\n }\n let subs = /* @__PURE__ */ new Map();\n if (typeof target === \"string\") {\n if ((0, index_js_3.isHexString)(target)) {\n addr = target;\n addrPromise = Promise.resolve(target);\n } else {\n const resolver = getRunner(runner, \"resolveName\");\n if (!canResolve(resolver)) {\n throw (0, index_js_3.makeError)(\"contract runner does not support name resolution\", \"UNSUPPORTED_OPERATION\", {\n operation: \"resolveName\"\n });\n }\n addrPromise = resolver.resolveName(target).then((addr2) => {\n if (addr2 == null) {\n throw (0, index_js_3.makeError)(\"an ENS name used for a contract target must be correctly configured\", \"UNCONFIGURED_NAME\", {\n value: target\n });\n }\n getInternal(this).addr = addr2;\n return addr2;\n });\n }\n } else {\n addrPromise = target.getAddress().then((addr2) => {\n if (addr2 == null) {\n throw new Error(\"TODO\");\n }\n getInternal(this).addr = addr2;\n return addr2;\n });\n }\n setInternal(this, { addrPromise, addr, deployTx, subs });\n const filters = new Proxy({}, {\n get: (target2, prop, receiver) => {\n if (typeof prop === \"symbol\" || passProperties.indexOf(prop) >= 0) {\n return Reflect.get(target2, prop, receiver);\n }\n try {\n return this.getEvent(prop);\n } catch (error) {\n if (!(0, index_js_3.isError)(error, \"INVALID_ARGUMENT\") || error.argument !== \"key\") {\n throw error;\n }\n }\n return void 0;\n },\n has: (target2, prop) => {\n if (passProperties.indexOf(prop) >= 0) {\n return Reflect.has(target2, prop);\n }\n return Reflect.has(target2, prop) || this.interface.hasEvent(String(prop));\n }\n });\n (0, index_js_3.defineProperties)(this, { filters });\n (0, index_js_3.defineProperties)(this, {\n fallback: iface.receive || iface.fallback ? buildWrappedFallback(this) : null\n });\n return new Proxy(this, {\n get: (target2, prop, receiver) => {\n if (typeof prop === \"symbol\" || prop in target2 || passProperties.indexOf(prop) >= 0) {\n return Reflect.get(target2, prop, receiver);\n }\n try {\n return target2.getFunction(prop);\n } catch (error) {\n if (!(0, index_js_3.isError)(error, \"INVALID_ARGUMENT\") || error.argument !== \"key\") {\n throw error;\n }\n }\n return void 0;\n },\n has: (target2, prop) => {\n if (typeof prop === \"symbol\" || prop in target2 || passProperties.indexOf(prop) >= 0) {\n return Reflect.has(target2, prop);\n }\n return target2.interface.hasFunction(prop);\n }\n });\n }\n /**\n * Return a new Contract instance with the same target and ABI, but\n * a different %%runner%%.\n */\n connect(runner) {\n return new _BaseContract(this.target, this.interface, runner);\n }\n /**\n * Return a new Contract instance with the same ABI and runner, but\n * a different %%target%%.\n */\n attach(target) {\n return new _BaseContract(target, this.interface, this.runner);\n }\n /**\n * Return the resolved address of this Contract.\n */\n async getAddress() {\n return await getInternal(this).addrPromise;\n }\n /**\n * Return the deployed bytecode or null if no bytecode is found.\n */\n async getDeployedCode() {\n const provider = getProvider(this.runner);\n (0, index_js_3.assert)(provider, \"runner does not support .provider\", \"UNSUPPORTED_OPERATION\", { operation: \"getDeployedCode\" });\n const code = await provider.getCode(await this.getAddress());\n if (code === \"0x\") {\n return null;\n }\n return code;\n }\n /**\n * Resolve to this Contract once the bytecode has been deployed, or\n * resolve immediately if already deployed.\n */\n async waitForDeployment() {\n const deployTx = this.deploymentTransaction();\n if (deployTx) {\n await deployTx.wait();\n return this;\n }\n const code = await this.getDeployedCode();\n if (code != null) {\n return this;\n }\n const provider = getProvider(this.runner);\n (0, index_js_3.assert)(provider != null, \"contract runner does not support .provider\", \"UNSUPPORTED_OPERATION\", { operation: \"waitForDeployment\" });\n return new Promise((resolve, reject) => {\n const checkCode = async () => {\n try {\n const code2 = await this.getDeployedCode();\n if (code2 != null) {\n return resolve(this);\n }\n provider.once(\"block\", checkCode);\n } catch (error) {\n reject(error);\n }\n };\n checkCode();\n });\n }\n /**\n * Return the transaction used to deploy this contract.\n *\n * This is only available if this instance was returned from a\n * [[ContractFactory]].\n */\n deploymentTransaction() {\n return getInternal(this).deployTx;\n }\n /**\n * Return the function for a given name. This is useful when a contract\n * method name conflicts with a JavaScript name such as ``prototype`` or\n * when using a Contract programatically.\n */\n getFunction(key) {\n if (typeof key !== \"string\") {\n key = key.format();\n }\n const func = buildWrappedMethod(this, key);\n return func;\n }\n /**\n * Return the event for a given name. This is useful when a contract\n * event name conflicts with a JavaScript name such as ``prototype`` or\n * when using a Contract programatically.\n */\n getEvent(key) {\n if (typeof key !== \"string\") {\n key = key.format();\n }\n return buildWrappedEvent(this, key);\n }\n /**\n * @_ignore:\n */\n async queryTransaction(hash3) {\n throw new Error(\"@TODO\");\n }\n /*\n // @TODO: this is a non-backwards compatible change, but will be added\n // in v7 and in a potential SmartContract class in an upcoming\n // v6 release\n async getTransactionReceipt(hash: string): Promise {\n const provider = getProvider(this.runner);\n assert(provider, \"contract runner does not have a provider\",\n \"UNSUPPORTED_OPERATION\", { operation: \"queryTransaction\" });\n \n const receipt = await provider.getTransactionReceipt(hash);\n if (receipt == null) { return null; }\n \n return new ContractTransactionReceipt(this.interface, provider, receipt);\n }\n */\n /**\n * Provide historic access to event data for %%event%% in the range\n * %%fromBlock%% (default: ``0``) to %%toBlock%% (default: ``\"latest\"``)\n * inclusive.\n */\n async queryFilter(event, fromBlock, toBlock) {\n if (fromBlock == null) {\n fromBlock = 0;\n }\n if (toBlock == null) {\n toBlock = \"latest\";\n }\n const { addr, addrPromise } = getInternal(this);\n const address = addr ? addr : await addrPromise;\n const { fragment, topics } = await getSubInfo(this, event);\n const filter = { address, topics, fromBlock, toBlock };\n const provider = getProvider(this.runner);\n (0, index_js_3.assert)(provider, \"contract runner does not have a provider\", \"UNSUPPORTED_OPERATION\", { operation: \"queryFilter\" });\n return (await provider.getLogs(filter)).map((log) => {\n let foundFragment = fragment;\n if (foundFragment == null) {\n try {\n foundFragment = this.interface.getEvent(log.topics[0]);\n } catch (error) {\n }\n }\n if (foundFragment) {\n try {\n return new wrappers_js_1.EventLog(log, this.interface, foundFragment);\n } catch (error) {\n return new wrappers_js_1.UndecodedEventLog(log, error);\n }\n }\n return new provider_js_1.Log(log, provider);\n });\n }\n /**\n * Add an event %%listener%% for the %%event%%.\n */\n async on(event, listener) {\n const sub = await getSub(this, \"on\", event);\n sub.listeners.push({ listener, once: false });\n sub.start();\n return this;\n }\n /**\n * Add an event %%listener%% for the %%event%%, but remove the listener\n * after it is fired once.\n */\n async once(event, listener) {\n const sub = await getSub(this, \"once\", event);\n sub.listeners.push({ listener, once: true });\n sub.start();\n return this;\n }\n /**\n * Emit an %%event%% calling all listeners with %%args%%.\n *\n * Resolves to ``true`` if any listeners were called.\n */\n async emit(event, ...args) {\n return await emit2(this, event, args, null);\n }\n /**\n * Resolves to the number of listeners of %%event%% or the total number\n * of listeners if unspecified.\n */\n async listenerCount(event) {\n if (event) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return 0;\n }\n return sub.listeners.length;\n }\n const { subs } = getInternal(this);\n let total = 0;\n for (const { listeners: listeners2 } of subs.values()) {\n total += listeners2.length;\n }\n return total;\n }\n /**\n * Resolves to the listeners subscribed to %%event%% or all listeners\n * if unspecified.\n */\n async listeners(event) {\n if (event) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return [];\n }\n return sub.listeners.map(({ listener }) => listener);\n }\n const { subs } = getInternal(this);\n let result = [];\n for (const { listeners: listeners2 } of subs.values()) {\n result = result.concat(listeners2.map(({ listener }) => listener));\n }\n return result;\n }\n /**\n * Remove the %%listener%% from the listeners for %%event%% or remove\n * all listeners if unspecified.\n */\n async off(event, listener) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return this;\n }\n if (listener) {\n const index2 = sub.listeners.map(({ listener: listener2 }) => listener2).indexOf(listener);\n if (index2 >= 0) {\n sub.listeners.splice(index2, 1);\n }\n }\n if (listener == null || sub.listeners.length === 0) {\n sub.stop();\n getInternal(this).subs.delete(sub.tag);\n }\n return this;\n }\n /**\n * Remove all the listeners for %%event%% or remove all listeners if\n * unspecified.\n */\n async removeAllListeners(event) {\n if (event) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return this;\n }\n sub.stop();\n getInternal(this).subs.delete(sub.tag);\n } else {\n const { subs } = getInternal(this);\n for (const { tag, stop } of subs.values()) {\n stop();\n subs.delete(tag);\n }\n }\n return this;\n }\n /**\n * Alias for [on].\n */\n async addListener(event, listener) {\n return await this.on(event, listener);\n }\n /**\n * Alias for [off].\n */\n async removeListener(event, listener) {\n return await this.off(event, listener);\n }\n /**\n * Create a new Class for the %%abi%%.\n */\n static buildClass(abi2) {\n class CustomContract extends _BaseContract {\n constructor(address, runner = null) {\n super(address, abi2, runner);\n }\n }\n return CustomContract;\n }\n /**\n * Create a new BaseContract with a specified Interface.\n */\n static from(target, abi2, runner) {\n if (runner == null) {\n runner = null;\n }\n const contract = new this(target, abi2, runner);\n return contract;\n }\n };\n exports3.BaseContract = BaseContract;\n function _ContractBase() {\n return BaseContract;\n }\n var Contract = class extends _ContractBase() {\n };\n exports3.Contract = Contract;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/factory.js\n var require_factory = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/factory.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ContractFactory = void 0;\n var index_js_1 = require_abi();\n var index_js_2 = require_address3();\n var index_js_3 = require_utils8();\n var contract_js_1 = require_contract();\n var ContractFactory = class _ContractFactory {\n /**\n * The Contract Interface.\n */\n interface;\n /**\n * The Contract deployment bytecode. Often called the initcode.\n */\n bytecode;\n /**\n * The ContractRunner to deploy the Contract as.\n */\n runner;\n /**\n * Create a new **ContractFactory** with %%abi%% and %%bytecode%%,\n * optionally connected to %%runner%%.\n *\n * The %%bytecode%% may be the ``bytecode`` property within the\n * standard Solidity JSON output.\n */\n constructor(abi2, bytecode, runner) {\n const iface = index_js_1.Interface.from(abi2);\n if (bytecode instanceof Uint8Array) {\n bytecode = (0, index_js_3.hexlify)((0, index_js_3.getBytes)(bytecode));\n } else {\n if (typeof bytecode === \"object\") {\n bytecode = bytecode.object;\n }\n if (!bytecode.startsWith(\"0x\")) {\n bytecode = \"0x\" + bytecode;\n }\n bytecode = (0, index_js_3.hexlify)((0, index_js_3.getBytes)(bytecode));\n }\n (0, index_js_3.defineProperties)(this, {\n bytecode,\n interface: iface,\n runner: runner || null\n });\n }\n attach(target) {\n return new contract_js_1.BaseContract(target, this.interface, this.runner);\n }\n /**\n * Resolves to the transaction to deploy the contract, passing %%args%%\n * into the constructor.\n */\n async getDeployTransaction(...args) {\n let overrides = {};\n const fragment = this.interface.deploy;\n if (fragment.inputs.length + 1 === args.length) {\n overrides = await (0, contract_js_1.copyOverrides)(args.pop());\n }\n if (fragment.inputs.length !== args.length) {\n throw new Error(\"incorrect number of arguments to constructor\");\n }\n const resolvedArgs = await (0, contract_js_1.resolveArgs)(this.runner, fragment.inputs, args);\n const data = (0, index_js_3.concat)([this.bytecode, this.interface.encodeDeploy(resolvedArgs)]);\n return Object.assign({}, overrides, { data });\n }\n /**\n * Resolves to the Contract deployed by passing %%args%% into the\n * constructor.\n *\n * This will resolve to the Contract before it has been deployed to the\n * network, so the [[BaseContract-waitForDeployment]] should be used before\n * sending any transactions to it.\n */\n async deploy(...args) {\n const tx = await this.getDeployTransaction(...args);\n (0, index_js_3.assert)(this.runner && typeof this.runner.sendTransaction === \"function\", \"factory runner does not support sending transactions\", \"UNSUPPORTED_OPERATION\", {\n operation: \"sendTransaction\"\n });\n const sentTx = await this.runner.sendTransaction(tx);\n const address = (0, index_js_2.getCreateAddress)(sentTx);\n return new contract_js_1.BaseContract(address, this.interface, this.runner, sentTx);\n }\n /**\n * Return a new **ContractFactory** with the same ABI and bytecode,\n * but connected to %%runner%%.\n */\n connect(runner) {\n return new _ContractFactory(this.interface, this.bytecode, runner);\n }\n /**\n * Create a new **ContractFactory** from the standard Solidity JSON output.\n */\n static fromSolidity(output, runner) {\n (0, index_js_3.assertArgument)(output != null, \"bad compiler output\", \"output\", output);\n if (typeof output === \"string\") {\n output = JSON.parse(output);\n }\n const abi2 = output.abi;\n let bytecode = \"\";\n if (output.bytecode) {\n bytecode = output.bytecode;\n } else if (output.evm && output.evm.bytecode) {\n bytecode = output.evm.bytecode;\n }\n return new this(abi2, bytecode, runner);\n }\n };\n exports3.ContractFactory = ContractFactory;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/index.js\n var require_contract2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.UndecodedEventLog = exports3.EventLog = exports3.ContractTransactionResponse = exports3.ContractTransactionReceipt = exports3.ContractUnknownEventPayload = exports3.ContractEventPayload = exports3.ContractFactory = exports3.Contract = exports3.BaseContract = void 0;\n var contract_js_1 = require_contract();\n Object.defineProperty(exports3, \"BaseContract\", { enumerable: true, get: function() {\n return contract_js_1.BaseContract;\n } });\n Object.defineProperty(exports3, \"Contract\", { enumerable: true, get: function() {\n return contract_js_1.Contract;\n } });\n var factory_js_1 = require_factory();\n Object.defineProperty(exports3, \"ContractFactory\", { enumerable: true, get: function() {\n return factory_js_1.ContractFactory;\n } });\n var wrappers_js_1 = require_wrappers();\n Object.defineProperty(exports3, \"ContractEventPayload\", { enumerable: true, get: function() {\n return wrappers_js_1.ContractEventPayload;\n } });\n Object.defineProperty(exports3, \"ContractUnknownEventPayload\", { enumerable: true, get: function() {\n return wrappers_js_1.ContractUnknownEventPayload;\n } });\n Object.defineProperty(exports3, \"ContractTransactionReceipt\", { enumerable: true, get: function() {\n return wrappers_js_1.ContractTransactionReceipt;\n } });\n Object.defineProperty(exports3, \"ContractTransactionResponse\", { enumerable: true, get: function() {\n return wrappers_js_1.ContractTransactionResponse;\n } });\n Object.defineProperty(exports3, \"EventLog\", { enumerable: true, get: function() {\n return wrappers_js_1.EventLog;\n } });\n Object.defineProperty(exports3, \"UndecodedEventLog\", { enumerable: true, get: function() {\n return wrappers_js_1.UndecodedEventLog;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/ens-resolver.js\n var require_ens_resolver = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/ens-resolver.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EnsResolver = exports3.BasicMulticoinProviderPlugin = exports3.MulticoinProviderPlugin = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_constants5();\n var index_js_3 = require_contract2();\n var index_js_4 = require_hash2();\n var index_js_5 = require_utils8();\n function getIpfsLink(link) {\n if (link.match(/^ipfs:\\/\\/ipfs\\//i)) {\n link = link.substring(12);\n } else if (link.match(/^ipfs:\\/\\//i)) {\n link = link.substring(7);\n } else {\n (0, index_js_5.assertArgument)(false, \"unsupported IPFS format\", \"link\", link);\n }\n return `https://gateway.ipfs.io/ipfs/${link}`;\n }\n var MulticoinProviderPlugin = class {\n /**\n * The name.\n */\n name;\n /**\n * Creates a new **MulticoinProviderPluing** for %%name%%.\n */\n constructor(name) {\n (0, index_js_5.defineProperties)(this, { name });\n }\n connect(proivder) {\n return this;\n }\n /**\n * Returns ``true`` if %%coinType%% is supported by this plugin.\n */\n supportsCoinType(coinType) {\n return false;\n }\n /**\n * Resolves to the encoded %%address%% for %%coinType%%.\n */\n async encodeAddress(coinType, address) {\n throw new Error(\"unsupported coin\");\n }\n /**\n * Resolves to the decoded %%data%% for %%coinType%%.\n */\n async decodeAddress(coinType, data) {\n throw new Error(\"unsupported coin\");\n }\n };\n exports3.MulticoinProviderPlugin = MulticoinProviderPlugin;\n var BasicMulticoinPluginId = \"org.ethers.plugins.provider.BasicMulticoin\";\n var BasicMulticoinProviderPlugin = class extends MulticoinProviderPlugin {\n /**\n * Creates a new **BasicMulticoinProviderPlugin**.\n */\n constructor() {\n super(BasicMulticoinPluginId);\n }\n };\n exports3.BasicMulticoinProviderPlugin = BasicMulticoinProviderPlugin;\n var matcherIpfs = new RegExp(\"^(ipfs)://(.*)$\", \"i\");\n var matchers = [\n new RegExp(\"^(https)://(.*)$\", \"i\"),\n new RegExp(\"^(data):(.*)$\", \"i\"),\n matcherIpfs,\n new RegExp(\"^eip155:[0-9]+/(erc[0-9]+):(.*)$\", \"i\")\n ];\n var EnsResolver = class _EnsResolver {\n /**\n * The connected provider.\n */\n provider;\n /**\n * The address of the resolver.\n */\n address;\n /**\n * The name this resolver was resolved against.\n */\n name;\n // For EIP-2544 names, the ancestor that provided the resolver\n #supports2544;\n #resolver;\n constructor(provider, address, name) {\n (0, index_js_5.defineProperties)(this, { provider, address, name });\n this.#supports2544 = null;\n this.#resolver = new index_js_3.Contract(address, [\n \"function supportsInterface(bytes4) view returns (bool)\",\n \"function resolve(bytes, bytes) view returns (bytes)\",\n \"function addr(bytes32) view returns (address)\",\n \"function addr(bytes32, uint) view returns (bytes)\",\n \"function text(bytes32, string) view returns (string)\",\n \"function contenthash(bytes32) view returns (bytes)\"\n ], provider);\n }\n /**\n * Resolves to true if the resolver supports wildcard resolution.\n */\n async supportsWildcard() {\n if (this.#supports2544 == null) {\n this.#supports2544 = (async () => {\n try {\n return await this.#resolver.supportsInterface(\"0x9061b923\");\n } catch (error) {\n if ((0, index_js_5.isError)(error, \"CALL_EXCEPTION\")) {\n return false;\n }\n this.#supports2544 = null;\n throw error;\n }\n })();\n }\n return await this.#supports2544;\n }\n async #fetch(funcName, params) {\n params = (params || []).slice();\n const iface = this.#resolver.interface;\n params.unshift((0, index_js_4.namehash)(this.name));\n let fragment = null;\n if (await this.supportsWildcard()) {\n fragment = iface.getFunction(funcName);\n (0, index_js_5.assert)(fragment, \"missing fragment\", \"UNKNOWN_ERROR\", {\n info: { funcName }\n });\n params = [\n (0, index_js_4.dnsEncode)(this.name, 255),\n iface.encodeFunctionData(fragment, params)\n ];\n funcName = \"resolve(bytes,bytes)\";\n }\n params.push({\n enableCcipRead: true\n });\n try {\n const result = await this.#resolver[funcName](...params);\n if (fragment) {\n return iface.decodeFunctionResult(fragment, result)[0];\n }\n return result;\n } catch (error) {\n if (!(0, index_js_5.isError)(error, \"CALL_EXCEPTION\")) {\n throw error;\n }\n }\n return null;\n }\n /**\n * Resolves to the address for %%coinType%% or null if the\n * provided %%coinType%% has not been configured.\n */\n async getAddress(coinType) {\n if (coinType == null) {\n coinType = 60;\n }\n if (coinType === 60) {\n try {\n const result = await this.#fetch(\"addr(bytes32)\");\n if (result == null || result === index_js_2.ZeroAddress) {\n return null;\n }\n return result;\n } catch (error) {\n if ((0, index_js_5.isError)(error, \"CALL_EXCEPTION\")) {\n return null;\n }\n throw error;\n }\n }\n if (coinType >= 0 && coinType < 2147483648) {\n let ethCoinType = coinType + 2147483648;\n const data2 = await this.#fetch(\"addr(bytes32,uint)\", [ethCoinType]);\n if ((0, index_js_5.isHexString)(data2, 20)) {\n return (0, index_js_1.getAddress)(data2);\n }\n }\n let coinPlugin = null;\n for (const plugin of this.provider.plugins) {\n if (!(plugin instanceof MulticoinProviderPlugin)) {\n continue;\n }\n if (plugin.supportsCoinType(coinType)) {\n coinPlugin = plugin;\n break;\n }\n }\n if (coinPlugin == null) {\n return null;\n }\n const data = await this.#fetch(\"addr(bytes32,uint)\", [coinType]);\n if (data == null || data === \"0x\") {\n return null;\n }\n const address = await coinPlugin.decodeAddress(coinType, data);\n if (address != null) {\n return address;\n }\n (0, index_js_5.assert)(false, `invalid coin data`, \"UNSUPPORTED_OPERATION\", {\n operation: `getAddress(${coinType})`,\n info: { coinType, data }\n });\n }\n /**\n * Resolves to the EIP-634 text record for %%key%%, or ``null``\n * if unconfigured.\n */\n async getText(key) {\n const data = await this.#fetch(\"text(bytes32,string)\", [key]);\n if (data == null || data === \"0x\") {\n return null;\n }\n return data;\n }\n /**\n * Rsolves to the content-hash or ``null`` if unconfigured.\n */\n async getContentHash() {\n const data = await this.#fetch(\"contenthash(bytes32)\");\n if (data == null || data === \"0x\") {\n return null;\n }\n const ipfs = data.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipfs) {\n const scheme = ipfs[1] === \"e3010170\" ? \"ipfs\" : \"ipns\";\n const length = parseInt(ipfs[4], 16);\n if (ipfs[5].length === length * 2) {\n return `${scheme}://${(0, index_js_5.encodeBase58)(\"0x\" + ipfs[2])}`;\n }\n }\n const swarm = data.match(/^0xe40101fa011b20([0-9a-f]*)$/);\n if (swarm && swarm[1].length === 64) {\n return `bzz://${swarm[1]}`;\n }\n (0, index_js_5.assert)(false, `invalid or unsupported content hash data`, \"UNSUPPORTED_OPERATION\", {\n operation: \"getContentHash()\",\n info: { data }\n });\n }\n /**\n * Resolves to the avatar url or ``null`` if the avatar is either\n * unconfigured or incorrectly configured (e.g. references an NFT\n * not owned by the address).\n *\n * If diagnosing issues with configurations, the [[_getAvatar]]\n * method may be useful.\n */\n async getAvatar() {\n const avatar = await this._getAvatar();\n return avatar.url;\n }\n /**\n * When resolving an avatar, there are many steps involved, such\n * fetching metadata and possibly validating ownership of an\n * NFT.\n *\n * This method can be used to examine each step and the value it\n * was working from.\n */\n async _getAvatar() {\n const linkage = [{ type: \"name\", value: this.name }];\n try {\n const avatar = await this.getText(\"avatar\");\n if (avatar == null) {\n linkage.push({ type: \"!avatar\", value: \"\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"avatar\", value: avatar });\n for (let i3 = 0; i3 < matchers.length; i3++) {\n const match = avatar.match(matchers[i3]);\n if (match == null) {\n continue;\n }\n const scheme = match[1].toLowerCase();\n switch (scheme) {\n case \"https\":\n case \"data\":\n linkage.push({ type: \"url\", value: avatar });\n return { linkage, url: avatar };\n case \"ipfs\": {\n const url = getIpfsLink(avatar);\n linkage.push({ type: \"ipfs\", value: avatar });\n linkage.push({ type: \"url\", value: url });\n return { linkage, url };\n }\n case \"erc721\":\n case \"erc1155\": {\n const selector = scheme === \"erc721\" ? \"tokenURI(uint256)\" : \"uri(uint256)\";\n linkage.push({ type: scheme, value: avatar });\n const owner = await this.getAddress();\n if (owner == null) {\n linkage.push({ type: \"!owner\", value: \"\" });\n return { url: null, linkage };\n }\n const comps = (match[2] || \"\").split(\"/\");\n if (comps.length !== 2) {\n linkage.push({ type: `!${scheme}caip`, value: match[2] || \"\" });\n return { url: null, linkage };\n }\n const tokenId = comps[1];\n const contract = new index_js_3.Contract(comps[0], [\n // ERC-721\n \"function tokenURI(uint) view returns (string)\",\n \"function ownerOf(uint) view returns (address)\",\n // ERC-1155\n \"function uri(uint) view returns (string)\",\n \"function balanceOf(address, uint256) view returns (uint)\"\n ], this.provider);\n if (scheme === \"erc721\") {\n const tokenOwner = await contract.ownerOf(tokenId);\n if (owner !== tokenOwner) {\n linkage.push({ type: \"!owner\", value: tokenOwner });\n return { url: null, linkage };\n }\n linkage.push({ type: \"owner\", value: tokenOwner });\n } else if (scheme === \"erc1155\") {\n const balance = await contract.balanceOf(owner, tokenId);\n if (!balance) {\n linkage.push({ type: \"!balance\", value: \"0\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"balance\", value: balance.toString() });\n }\n let metadataUrl = await contract[selector](tokenId);\n if (metadataUrl == null || metadataUrl === \"0x\") {\n linkage.push({ type: \"!metadata-url\", value: \"\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"metadata-url-base\", value: metadataUrl });\n if (scheme === \"erc1155\") {\n metadataUrl = metadataUrl.replace(\"{id}\", (0, index_js_5.toBeHex)(tokenId, 32).substring(2));\n linkage.push({ type: \"metadata-url-expanded\", value: metadataUrl });\n }\n if (metadataUrl.match(/^ipfs:/i)) {\n metadataUrl = getIpfsLink(metadataUrl);\n }\n linkage.push({ type: \"metadata-url\", value: metadataUrl });\n let metadata = {};\n const response = await new index_js_5.FetchRequest(metadataUrl).send();\n response.assertOk();\n try {\n metadata = response.bodyJson;\n } catch (error) {\n try {\n linkage.push({ type: \"!metadata\", value: response.bodyText });\n } catch (error2) {\n const bytes = response.body;\n if (bytes) {\n linkage.push({ type: \"!metadata\", value: (0, index_js_5.hexlify)(bytes) });\n }\n return { url: null, linkage };\n }\n return { url: null, linkage };\n }\n if (!metadata) {\n linkage.push({ type: \"!metadata\", value: \"\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"metadata\", value: JSON.stringify(metadata) });\n let imageUrl = metadata.image;\n if (typeof imageUrl !== \"string\") {\n linkage.push({ type: \"!imageUrl\", value: \"\" });\n return { url: null, linkage };\n }\n if (imageUrl.match(/^(https:\\/\\/|data:)/i)) {\n } else {\n const ipfs = imageUrl.match(matcherIpfs);\n if (ipfs == null) {\n linkage.push({ type: \"!imageUrl-ipfs\", value: imageUrl });\n return { url: null, linkage };\n }\n linkage.push({ type: \"imageUrl-ipfs\", value: imageUrl });\n imageUrl = getIpfsLink(imageUrl);\n }\n linkage.push({ type: \"url\", value: imageUrl });\n return { linkage, url: imageUrl };\n }\n }\n }\n } catch (error) {\n }\n return { linkage, url: null };\n }\n static async getEnsAddress(provider) {\n const network = await provider.getNetwork();\n const ensPlugin = network.getPlugin(\"org.ethers.plugins.network.Ens\");\n (0, index_js_5.assert)(ensPlugin, \"network does not support ENS\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getEnsAddress\",\n info: { network }\n });\n return ensPlugin.address;\n }\n static async #getResolver(provider, name) {\n const ensAddr = await _EnsResolver.getEnsAddress(provider);\n try {\n const contract = new index_js_3.Contract(ensAddr, [\n \"function resolver(bytes32) view returns (address)\"\n ], provider);\n const addr = await contract.resolver((0, index_js_4.namehash)(name), {\n enableCcipRead: true\n });\n if (addr === index_js_2.ZeroAddress) {\n return null;\n }\n return addr;\n } catch (error) {\n throw error;\n }\n return null;\n }\n /**\n * Resolve to the ENS resolver for %%name%% using %%provider%% or\n * ``null`` if unconfigured.\n */\n static async fromName(provider, name) {\n let currentName = name;\n while (true) {\n if (currentName === \"\" || currentName === \".\") {\n return null;\n }\n if (name !== \"eth\" && currentName === \"eth\") {\n return null;\n }\n const addr = await _EnsResolver.#getResolver(provider, currentName);\n if (addr != null) {\n const resolver = new _EnsResolver(provider, addr, name);\n if (currentName !== name && !await resolver.supportsWildcard()) {\n return null;\n }\n return resolver;\n }\n currentName = currentName.split(\".\").slice(1).join(\".\");\n }\n }\n };\n exports3.EnsResolver = EnsResolver;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/format.js\n var require_format = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/format.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.formatTransactionResponse = exports3.formatTransactionReceipt = exports3.formatReceiptLog = exports3.formatBlock = exports3.formatLog = exports3.formatUint256 = exports3.formatHash = exports3.formatData = exports3.formatBoolean = exports3.object = exports3.arrayOf = exports3.allowNull = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n var BN_0 = BigInt(0);\n function allowNull(format, nullValue) {\n return function(value) {\n if (value == null) {\n return nullValue;\n }\n return format(value);\n };\n }\n exports3.allowNull = allowNull;\n function arrayOf(format, allowNull2) {\n return (array) => {\n if (allowNull2 && array == null) {\n return null;\n }\n if (!Array.isArray(array)) {\n throw new Error(\"not an array\");\n }\n return array.map((i3) => format(i3));\n };\n }\n exports3.arrayOf = arrayOf;\n function object(format, altNames) {\n return (value) => {\n const result = {};\n for (const key in format) {\n let srcKey = key;\n if (altNames && key in altNames && !(srcKey in value)) {\n for (const altKey of altNames[key]) {\n if (altKey in value) {\n srcKey = altKey;\n break;\n }\n }\n }\n try {\n const nv = format[key](value[srcKey]);\n if (nv !== void 0) {\n result[key] = nv;\n }\n } catch (error) {\n const message = error instanceof Error ? error.message : \"not-an-error\";\n (0, index_js_4.assert)(false, `invalid value for value.${key} (${message})`, \"BAD_DATA\", { value });\n }\n }\n return result;\n };\n }\n exports3.object = object;\n function formatBoolean(value) {\n switch (value) {\n case true:\n case \"true\":\n return true;\n case false:\n case \"false\":\n return false;\n }\n (0, index_js_4.assertArgument)(false, `invalid boolean; ${JSON.stringify(value)}`, \"value\", value);\n }\n exports3.formatBoolean = formatBoolean;\n function formatData(value) {\n (0, index_js_4.assertArgument)((0, index_js_4.isHexString)(value, true), \"invalid data\", \"value\", value);\n return value;\n }\n exports3.formatData = formatData;\n function formatHash(value) {\n (0, index_js_4.assertArgument)((0, index_js_4.isHexString)(value, 32), \"invalid hash\", \"value\", value);\n return value;\n }\n exports3.formatHash = formatHash;\n function formatUint256(value) {\n if (!(0, index_js_4.isHexString)(value)) {\n throw new Error(\"invalid uint256\");\n }\n return (0, index_js_4.zeroPadValue)(value, 32);\n }\n exports3.formatUint256 = formatUint256;\n var _formatLog = object({\n address: index_js_1.getAddress,\n blockHash: formatHash,\n blockNumber: index_js_4.getNumber,\n data: formatData,\n index: index_js_4.getNumber,\n removed: allowNull(formatBoolean, false),\n topics: arrayOf(formatHash),\n transactionHash: formatHash,\n transactionIndex: index_js_4.getNumber\n }, {\n index: [\"logIndex\"]\n });\n function formatLog2(value) {\n return _formatLog(value);\n }\n exports3.formatLog = formatLog2;\n var _formatBlock = object({\n hash: allowNull(formatHash),\n parentHash: formatHash,\n parentBeaconBlockRoot: allowNull(formatHash, null),\n number: index_js_4.getNumber,\n timestamp: index_js_4.getNumber,\n nonce: allowNull(formatData),\n difficulty: index_js_4.getBigInt,\n gasLimit: index_js_4.getBigInt,\n gasUsed: index_js_4.getBigInt,\n stateRoot: allowNull(formatHash, null),\n receiptsRoot: allowNull(formatHash, null),\n blobGasUsed: allowNull(index_js_4.getBigInt, null),\n excessBlobGas: allowNull(index_js_4.getBigInt, null),\n miner: allowNull(index_js_1.getAddress),\n prevRandao: allowNull(formatHash, null),\n extraData: formatData,\n baseFeePerGas: allowNull(index_js_4.getBigInt)\n }, {\n prevRandao: [\"mixHash\"]\n });\n function formatBlock2(value) {\n const result = _formatBlock(value);\n result.transactions = value.transactions.map((tx) => {\n if (typeof tx === \"string\") {\n return tx;\n }\n return formatTransactionResponse(tx);\n });\n return result;\n }\n exports3.formatBlock = formatBlock2;\n var _formatReceiptLog = object({\n transactionIndex: index_js_4.getNumber,\n blockNumber: index_js_4.getNumber,\n transactionHash: formatHash,\n address: index_js_1.getAddress,\n topics: arrayOf(formatHash),\n data: formatData,\n index: index_js_4.getNumber,\n blockHash: formatHash\n }, {\n index: [\"logIndex\"]\n });\n function formatReceiptLog(value) {\n return _formatReceiptLog(value);\n }\n exports3.formatReceiptLog = formatReceiptLog;\n var _formatTransactionReceipt = object({\n to: allowNull(index_js_1.getAddress, null),\n from: allowNull(index_js_1.getAddress, null),\n contractAddress: allowNull(index_js_1.getAddress, null),\n // should be allowNull(hash), but broken-EIP-658 support is handled in receipt\n index: index_js_4.getNumber,\n root: allowNull(index_js_4.hexlify),\n gasUsed: index_js_4.getBigInt,\n blobGasUsed: allowNull(index_js_4.getBigInt, null),\n logsBloom: allowNull(formatData),\n blockHash: formatHash,\n hash: formatHash,\n logs: arrayOf(formatReceiptLog),\n blockNumber: index_js_4.getNumber,\n //confirmations: allowNull(getNumber, null),\n cumulativeGasUsed: index_js_4.getBigInt,\n effectiveGasPrice: allowNull(index_js_4.getBigInt),\n blobGasPrice: allowNull(index_js_4.getBigInt, null),\n status: allowNull(index_js_4.getNumber),\n type: allowNull(index_js_4.getNumber, 0)\n }, {\n effectiveGasPrice: [\"gasPrice\"],\n hash: [\"transactionHash\"],\n index: [\"transactionIndex\"]\n });\n function formatTransactionReceipt2(value) {\n return _formatTransactionReceipt(value);\n }\n exports3.formatTransactionReceipt = formatTransactionReceipt2;\n function formatTransactionResponse(value) {\n if (value.to && (0, index_js_4.getBigInt)(value.to) === BN_0) {\n value.to = \"0x0000000000000000000000000000000000000000\";\n }\n const result = object({\n hash: formatHash,\n // Some nodes do not return this, usually test nodes (like Ganache)\n index: allowNull(index_js_4.getNumber, void 0),\n type: (value2) => {\n if (value2 === \"0x\" || value2 == null) {\n return 0;\n }\n return (0, index_js_4.getNumber)(value2);\n },\n accessList: allowNull(index_js_3.accessListify, null),\n blobVersionedHashes: allowNull(arrayOf(formatHash, true), null),\n authorizationList: allowNull(arrayOf((v2) => {\n let sig;\n if (v2.signature) {\n sig = v2.signature;\n } else {\n let yParity = v2.yParity;\n if (yParity === \"0x1b\") {\n yParity = 0;\n } else if (yParity === \"0x1c\") {\n yParity = 1;\n }\n sig = Object.assign({}, v2, { yParity });\n }\n return {\n address: (0, index_js_1.getAddress)(v2.address),\n chainId: (0, index_js_4.getBigInt)(v2.chainId),\n nonce: (0, index_js_4.getBigInt)(v2.nonce),\n signature: index_js_2.Signature.from(sig)\n };\n }, false), null),\n blockHash: allowNull(formatHash, null),\n blockNumber: allowNull(index_js_4.getNumber, null),\n transactionIndex: allowNull(index_js_4.getNumber, null),\n from: index_js_1.getAddress,\n // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas) must be set\n gasPrice: allowNull(index_js_4.getBigInt),\n maxPriorityFeePerGas: allowNull(index_js_4.getBigInt),\n maxFeePerGas: allowNull(index_js_4.getBigInt),\n maxFeePerBlobGas: allowNull(index_js_4.getBigInt, null),\n gasLimit: index_js_4.getBigInt,\n to: allowNull(index_js_1.getAddress, null),\n value: index_js_4.getBigInt,\n nonce: index_js_4.getNumber,\n data: formatData,\n creates: allowNull(index_js_1.getAddress, null),\n chainId: allowNull(index_js_4.getBigInt, null)\n }, {\n data: [\"input\"],\n gasLimit: [\"gas\"],\n index: [\"transactionIndex\"]\n })(value);\n if (result.to == null && result.creates == null) {\n result.creates = (0, index_js_1.getCreateAddress)(result);\n }\n if ((value.type === 1 || value.type === 2) && value.accessList == null) {\n result.accessList = [];\n }\n if (value.signature) {\n result.signature = index_js_2.Signature.from(value.signature);\n } else {\n result.signature = index_js_2.Signature.from(value);\n }\n if (result.chainId == null) {\n const chainId = result.signature.legacyChainId;\n if (chainId != null) {\n result.chainId = chainId;\n }\n }\n if (result.blockHash && (0, index_js_4.getBigInt)(result.blockHash) === BN_0) {\n result.blockHash = null;\n }\n return result;\n }\n exports3.formatTransactionResponse = formatTransactionResponse;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/plugins-network.js\n var require_plugins_network = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/plugins-network.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FetchUrlFeeDataNetworkPlugin = exports3.FeeDataNetworkPlugin = exports3.EnsPlugin = exports3.GasCostPlugin = exports3.NetworkPlugin = void 0;\n var properties_js_1 = require_properties();\n var index_js_1 = require_utils8();\n var EnsAddress = \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\";\n var NetworkPlugin = class _NetworkPlugin {\n /**\n * The name of the plugin.\n *\n * It is recommended to use reverse-domain-notation, which permits\n * unique names with a known authority as well as hierarchal entries.\n */\n name;\n /**\n * Creates a new **NetworkPlugin**.\n */\n constructor(name) {\n (0, properties_js_1.defineProperties)(this, { name });\n }\n /**\n * Creates a copy of this plugin.\n */\n clone() {\n return new _NetworkPlugin(this.name);\n }\n };\n exports3.NetworkPlugin = NetworkPlugin;\n var GasCostPlugin = class _GasCostPlugin extends NetworkPlugin {\n /**\n * The block number to treat these values as valid from.\n *\n * This allows a hardfork to have updated values included as well as\n * mulutiple hardforks to be supported.\n */\n effectiveBlock;\n /**\n * The transactions base fee.\n */\n txBase;\n /**\n * The fee for creating a new account.\n */\n txCreate;\n /**\n * The fee per zero-byte in the data.\n */\n txDataZero;\n /**\n * The fee per non-zero-byte in the data.\n */\n txDataNonzero;\n /**\n * The fee per storage key in the [[link-eip-2930]] access list.\n */\n txAccessListStorageKey;\n /**\n * The fee per address in the [[link-eip-2930]] access list.\n */\n txAccessListAddress;\n /**\n * Creates a new GasCostPlugin from %%effectiveBlock%% until the\n * latest block or another GasCostPlugin supercedes that block number,\n * with the associated %%costs%%.\n */\n constructor(effectiveBlock, costs) {\n if (effectiveBlock == null) {\n effectiveBlock = 0;\n }\n super(`org.ethers.network.plugins.GasCost#${effectiveBlock || 0}`);\n const props = { effectiveBlock };\n function set(name, nullish) {\n let value = (costs || {})[name];\n if (value == null) {\n value = nullish;\n }\n (0, index_js_1.assertArgument)(typeof value === \"number\", `invalud value for ${name}`, \"costs\", costs);\n props[name] = value;\n }\n set(\"txBase\", 21e3);\n set(\"txCreate\", 32e3);\n set(\"txDataZero\", 4);\n set(\"txDataNonzero\", 16);\n set(\"txAccessListStorageKey\", 1900);\n set(\"txAccessListAddress\", 2400);\n (0, properties_js_1.defineProperties)(this, props);\n }\n clone() {\n return new _GasCostPlugin(this.effectiveBlock, this);\n }\n };\n exports3.GasCostPlugin = GasCostPlugin;\n var EnsPlugin = class _EnsPlugin extends NetworkPlugin {\n /**\n * The ENS Registrty Contract address.\n */\n address;\n /**\n * The chain ID that the ENS contract lives on.\n */\n targetNetwork;\n /**\n * Creates a new **EnsPlugin** connected to %%address%% on the\n * %%targetNetwork%%. The default ENS address and mainnet is used\n * if unspecified.\n */\n constructor(address, targetNetwork) {\n super(\"org.ethers.plugins.network.Ens\");\n (0, properties_js_1.defineProperties)(this, {\n address: address || EnsAddress,\n targetNetwork: targetNetwork == null ? 1 : targetNetwork\n });\n }\n clone() {\n return new _EnsPlugin(this.address, this.targetNetwork);\n }\n };\n exports3.EnsPlugin = EnsPlugin;\n var FeeDataNetworkPlugin = class _FeeDataNetworkPlugin extends NetworkPlugin {\n #feeDataFunc;\n /**\n * The fee data function provided to the constructor.\n */\n get feeDataFunc() {\n return this.#feeDataFunc;\n }\n /**\n * Creates a new **FeeDataNetworkPlugin**.\n */\n constructor(feeDataFunc) {\n super(\"org.ethers.plugins.network.FeeData\");\n this.#feeDataFunc = feeDataFunc;\n }\n /**\n * Resolves to the fee data.\n */\n async getFeeData(provider) {\n return await this.#feeDataFunc(provider);\n }\n clone() {\n return new _FeeDataNetworkPlugin(this.#feeDataFunc);\n }\n };\n exports3.FeeDataNetworkPlugin = FeeDataNetworkPlugin;\n var FetchUrlFeeDataNetworkPlugin = class extends NetworkPlugin {\n #url;\n #processFunc;\n /**\n * The URL to initialize the FetchRequest with in %%processFunc%%.\n */\n get url() {\n return this.#url;\n }\n /**\n * The callback to use when computing the FeeData.\n */\n get processFunc() {\n return this.#processFunc;\n }\n /**\n * Creates a new **FetchUrlFeeDataNetworkPlugin** which will\n * be used when computing the fee data for the network.\n */\n constructor(url, processFunc) {\n super(\"org.ethers.plugins.network.FetchUrlFeeDataPlugin\");\n this.#url = url;\n this.#processFunc = processFunc;\n }\n // We are immutable, so we can serve as our own clone\n clone() {\n return this;\n }\n };\n exports3.FetchUrlFeeDataNetworkPlugin = FetchUrlFeeDataNetworkPlugin;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/network.js\n var require_network = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/network.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Network = void 0;\n var index_js_1 = require_transaction2();\n var index_js_2 = require_utils8();\n var plugins_network_js_1 = require_plugins_network();\n var Networks = /* @__PURE__ */ new Map();\n var Network = class _Network {\n #name;\n #chainId;\n #plugins;\n /**\n * Creates a new **Network** for %%name%% and %%chainId%%.\n */\n constructor(name, chainId) {\n this.#name = name;\n this.#chainId = (0, index_js_2.getBigInt)(chainId);\n this.#plugins = /* @__PURE__ */ new Map();\n }\n /**\n * Returns a JSON-compatible representation of a Network.\n */\n toJSON() {\n return { name: this.name, chainId: String(this.chainId) };\n }\n /**\n * The network common name.\n *\n * This is the canonical name, as networks migh have multiple\n * names.\n */\n get name() {\n return this.#name;\n }\n set name(value) {\n this.#name = value;\n }\n /**\n * The network chain ID.\n */\n get chainId() {\n return this.#chainId;\n }\n set chainId(value) {\n this.#chainId = (0, index_js_2.getBigInt)(value, \"chainId\");\n }\n /**\n * Returns true if %%other%% matches this network. Any chain ID\n * must match, and if no chain ID is present, the name must match.\n *\n * This method does not currently check for additional properties,\n * such as ENS address or plug-in compatibility.\n */\n matches(other) {\n if (other == null) {\n return false;\n }\n if (typeof other === \"string\") {\n try {\n return this.chainId === (0, index_js_2.getBigInt)(other);\n } catch (error) {\n }\n return this.name === other;\n }\n if (typeof other === \"number\" || typeof other === \"bigint\") {\n try {\n return this.chainId === (0, index_js_2.getBigInt)(other);\n } catch (error) {\n }\n return false;\n }\n if (typeof other === \"object\") {\n if (other.chainId != null) {\n try {\n return this.chainId === (0, index_js_2.getBigInt)(other.chainId);\n } catch (error) {\n }\n return false;\n }\n if (other.name != null) {\n return this.name === other.name;\n }\n return false;\n }\n return false;\n }\n /**\n * Returns the list of plugins currently attached to this Network.\n */\n get plugins() {\n return Array.from(this.#plugins.values());\n }\n /**\n * Attach a new %%plugin%% to this Network. The network name\n * must be unique, excluding any fragment.\n */\n attachPlugin(plugin) {\n if (this.#plugins.get(plugin.name)) {\n throw new Error(`cannot replace existing plugin: ${plugin.name} `);\n }\n this.#plugins.set(plugin.name, plugin.clone());\n return this;\n }\n /**\n * Return the plugin, if any, matching %%name%% exactly. Plugins\n * with fragments will not be returned unless %%name%% includes\n * a fragment.\n */\n getPlugin(name) {\n return this.#plugins.get(name) || null;\n }\n /**\n * Gets a list of all plugins that match %%name%%, with otr without\n * a fragment.\n */\n getPlugins(basename) {\n return this.plugins.filter((p4) => p4.name.split(\"#\")[0] === basename);\n }\n /**\n * Create a copy of this Network.\n */\n clone() {\n const clone = new _Network(this.name, this.chainId);\n this.plugins.forEach((plugin) => {\n clone.attachPlugin(plugin.clone());\n });\n return clone;\n }\n /**\n * Compute the intrinsic gas required for a transaction.\n *\n * A GasCostPlugin can be attached to override the default\n * values.\n */\n computeIntrinsicGas(tx) {\n const costs = this.getPlugin(\"org.ethers.plugins.network.GasCost\") || new plugins_network_js_1.GasCostPlugin();\n let gas = costs.txBase;\n if (tx.to == null) {\n gas += costs.txCreate;\n }\n if (tx.data) {\n for (let i3 = 2; i3 < tx.data.length; i3 += 2) {\n if (tx.data.substring(i3, i3 + 2) === \"00\") {\n gas += costs.txDataZero;\n } else {\n gas += costs.txDataNonzero;\n }\n }\n }\n if (tx.accessList) {\n const accessList = (0, index_js_1.accessListify)(tx.accessList);\n for (const addr in accessList) {\n gas += costs.txAccessListAddress + costs.txAccessListStorageKey * accessList[addr].storageKeys.length;\n }\n }\n return gas;\n }\n /**\n * Returns a new Network for the %%network%% name or chainId.\n */\n static from(network) {\n injectCommonNetworks();\n if (network == null) {\n return _Network.from(\"mainnet\");\n }\n if (typeof network === \"number\") {\n network = BigInt(network);\n }\n if (typeof network === \"string\" || typeof network === \"bigint\") {\n const networkFunc = Networks.get(network);\n if (networkFunc) {\n return networkFunc();\n }\n if (typeof network === \"bigint\") {\n return new _Network(\"unknown\", network);\n }\n (0, index_js_2.assertArgument)(false, \"unknown network\", \"network\", network);\n }\n if (typeof network.clone === \"function\") {\n const clone = network.clone();\n return clone;\n }\n if (typeof network === \"object\") {\n (0, index_js_2.assertArgument)(typeof network.name === \"string\" && typeof network.chainId === \"number\", \"invalid network object name or chainId\", \"network\", network);\n const custom3 = new _Network(network.name, network.chainId);\n if (network.ensAddress || network.ensNetwork != null) {\n custom3.attachPlugin(new plugins_network_js_1.EnsPlugin(network.ensAddress, network.ensNetwork));\n }\n return custom3;\n }\n (0, index_js_2.assertArgument)(false, \"invalid network\", \"network\", network);\n }\n /**\n * Register %%nameOrChainId%% with a function which returns\n * an instance of a Network representing that chain.\n */\n static register(nameOrChainId, networkFunc) {\n if (typeof nameOrChainId === \"number\") {\n nameOrChainId = BigInt(nameOrChainId);\n }\n const existing = Networks.get(nameOrChainId);\n if (existing) {\n (0, index_js_2.assertArgument)(false, `conflicting network for ${JSON.stringify(existing.name)}`, \"nameOrChainId\", nameOrChainId);\n }\n Networks.set(nameOrChainId, networkFunc);\n }\n };\n exports3.Network = Network;\n function parseUnits(_value, decimals) {\n const value = String(_value);\n if (!value.match(/^[0-9.]+$/)) {\n throw new Error(`invalid gwei value: ${_value}`);\n }\n const comps = value.split(\".\");\n if (comps.length === 1) {\n comps.push(\"\");\n }\n if (comps.length !== 2) {\n throw new Error(`invalid gwei value: ${_value}`);\n }\n while (comps[1].length < decimals) {\n comps[1] += \"0\";\n }\n if (comps[1].length > 9) {\n let frac = BigInt(comps[1].substring(0, 9));\n if (!comps[1].substring(9).match(/^0+$/)) {\n frac++;\n }\n comps[1] = frac.toString();\n }\n return BigInt(comps[0] + comps[1]);\n }\n function getGasStationPlugin(url) {\n return new plugins_network_js_1.FetchUrlFeeDataNetworkPlugin(url, async (fetchFeeData, provider, request) => {\n request.setHeader(\"User-Agent\", \"ethers\");\n let response;\n try {\n const [_response, _feeData] = await Promise.all([\n request.send(),\n fetchFeeData()\n ]);\n response = _response;\n const payload = response.bodyJson.standard;\n const feeData = {\n gasPrice: _feeData.gasPrice,\n maxFeePerGas: parseUnits(payload.maxFee, 9),\n maxPriorityFeePerGas: parseUnits(payload.maxPriorityFee, 9)\n };\n return feeData;\n } catch (error) {\n (0, index_js_2.assert)(false, `error encountered with polygon gas station (${JSON.stringify(request.url)})`, \"SERVER_ERROR\", { request, response, error });\n }\n });\n }\n var injected = false;\n function injectCommonNetworks() {\n if (injected) {\n return;\n }\n injected = true;\n function registerEth(name, chainId, options) {\n const func = function() {\n const network = new Network(name, chainId);\n if (options.ensNetwork != null) {\n network.attachPlugin(new plugins_network_js_1.EnsPlugin(null, options.ensNetwork));\n }\n network.attachPlugin(new plugins_network_js_1.GasCostPlugin());\n (options.plugins || []).forEach((plugin) => {\n network.attachPlugin(plugin);\n });\n return network;\n };\n Network.register(name, func);\n Network.register(chainId, func);\n if (options.altNames) {\n options.altNames.forEach((name2) => {\n Network.register(name2, func);\n });\n }\n }\n registerEth(\"mainnet\", 1, { ensNetwork: 1, altNames: [\"homestead\"] });\n registerEth(\"ropsten\", 3, { ensNetwork: 3 });\n registerEth(\"rinkeby\", 4, { ensNetwork: 4 });\n registerEth(\"goerli\", 5, { ensNetwork: 5 });\n registerEth(\"kovan\", 42, { ensNetwork: 42 });\n registerEth(\"sepolia\", 11155111, { ensNetwork: 11155111 });\n registerEth(\"holesky\", 17e3, { ensNetwork: 17e3 });\n registerEth(\"classic\", 61, {});\n registerEth(\"classicKotti\", 6, {});\n registerEth(\"arbitrum\", 42161, {\n ensNetwork: 1\n });\n registerEth(\"arbitrum-goerli\", 421613, {});\n registerEth(\"arbitrum-sepolia\", 421614, {});\n registerEth(\"base\", 8453, { ensNetwork: 1 });\n registerEth(\"base-goerli\", 84531, {});\n registerEth(\"base-sepolia\", 84532, {});\n registerEth(\"bnb\", 56, { ensNetwork: 1 });\n registerEth(\"bnbt\", 97, {});\n registerEth(\"linea\", 59144, { ensNetwork: 1 });\n registerEth(\"linea-goerli\", 59140, {});\n registerEth(\"linea-sepolia\", 59141, {});\n registerEth(\"matic\", 137, {\n ensNetwork: 1,\n plugins: [\n getGasStationPlugin(\"https://gasstation.polygon.technology/v2\")\n ]\n });\n registerEth(\"matic-amoy\", 80002, {});\n registerEth(\"matic-mumbai\", 80001, {\n altNames: [\"maticMumbai\", \"maticmum\"],\n plugins: [\n getGasStationPlugin(\"https://gasstation-testnet.polygon.technology/v2\")\n ]\n });\n registerEth(\"optimism\", 10, {\n ensNetwork: 1,\n plugins: []\n });\n registerEth(\"optimism-goerli\", 420, {});\n registerEth(\"optimism-sepolia\", 11155420, {});\n registerEth(\"xdai\", 100, { ensNetwork: 1 });\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/subscriber-polling.js\n var require_subscriber_polling = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/subscriber-polling.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PollingEventSubscriber = exports3.PollingTransactionSubscriber = exports3.PollingOrphanSubscriber = exports3.PollingBlockTagSubscriber = exports3.OnBlockSubscriber = exports3.PollingBlockSubscriber = exports3.getPollingSubscriber = void 0;\n var index_js_1 = require_utils8();\n function copy(obj) {\n return JSON.parse(JSON.stringify(obj));\n }\n function getPollingSubscriber(provider, event) {\n if (event === \"block\") {\n return new PollingBlockSubscriber(provider);\n }\n if ((0, index_js_1.isHexString)(event, 32)) {\n return new PollingTransactionSubscriber(provider, event);\n }\n (0, index_js_1.assert)(false, \"unsupported polling event\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getPollingSubscriber\",\n info: { event }\n });\n }\n exports3.getPollingSubscriber = getPollingSubscriber;\n var PollingBlockSubscriber = class {\n #provider;\n #poller;\n #interval;\n // The most recent block we have scanned for events. The value -2\n // indicates we still need to fetch an initial block number\n #blockNumber;\n /**\n * Create a new **PollingBlockSubscriber** attached to %%provider%%.\n */\n constructor(provider) {\n this.#provider = provider;\n this.#poller = null;\n this.#interval = 4e3;\n this.#blockNumber = -2;\n }\n /**\n * The polling interval.\n */\n get pollingInterval() {\n return this.#interval;\n }\n set pollingInterval(value) {\n this.#interval = value;\n }\n async #poll() {\n try {\n const blockNumber = await this.#provider.getBlockNumber();\n if (this.#blockNumber === -2) {\n this.#blockNumber = blockNumber;\n return;\n }\n if (blockNumber !== this.#blockNumber) {\n for (let b4 = this.#blockNumber + 1; b4 <= blockNumber; b4++) {\n if (this.#poller == null) {\n return;\n }\n await this.#provider.emit(\"block\", b4);\n }\n this.#blockNumber = blockNumber;\n }\n } catch (error) {\n }\n if (this.#poller == null) {\n return;\n }\n this.#poller = this.#provider._setTimeout(this.#poll.bind(this), this.#interval);\n }\n start() {\n if (this.#poller) {\n return;\n }\n this.#poller = this.#provider._setTimeout(this.#poll.bind(this), this.#interval);\n this.#poll();\n }\n stop() {\n if (!this.#poller) {\n return;\n }\n this.#provider._clearTimeout(this.#poller);\n this.#poller = null;\n }\n pause(dropWhilePaused) {\n this.stop();\n if (dropWhilePaused) {\n this.#blockNumber = -2;\n }\n }\n resume() {\n this.start();\n }\n };\n exports3.PollingBlockSubscriber = PollingBlockSubscriber;\n var OnBlockSubscriber = class {\n #provider;\n #poll;\n #running;\n /**\n * Create a new **OnBlockSubscriber** attached to %%provider%%.\n */\n constructor(provider) {\n this.#provider = provider;\n this.#running = false;\n this.#poll = (blockNumber) => {\n this._poll(blockNumber, this.#provider);\n };\n }\n /**\n * Called on every new block.\n */\n async _poll(blockNumber, provider) {\n throw new Error(\"sub-classes must override this\");\n }\n start() {\n if (this.#running) {\n return;\n }\n this.#running = true;\n this.#poll(-2);\n this.#provider.on(\"block\", this.#poll);\n }\n stop() {\n if (!this.#running) {\n return;\n }\n this.#running = false;\n this.#provider.off(\"block\", this.#poll);\n }\n pause(dropWhilePaused) {\n this.stop();\n }\n resume() {\n this.start();\n }\n };\n exports3.OnBlockSubscriber = OnBlockSubscriber;\n var PollingBlockTagSubscriber = class extends OnBlockSubscriber {\n #tag;\n #lastBlock;\n constructor(provider, tag) {\n super(provider);\n this.#tag = tag;\n this.#lastBlock = -2;\n }\n pause(dropWhilePaused) {\n if (dropWhilePaused) {\n this.#lastBlock = -2;\n }\n super.pause(dropWhilePaused);\n }\n async _poll(blockNumber, provider) {\n const block = await provider.getBlock(this.#tag);\n if (block == null) {\n return;\n }\n if (this.#lastBlock === -2) {\n this.#lastBlock = block.number;\n } else if (block.number > this.#lastBlock) {\n provider.emit(this.#tag, block.number);\n this.#lastBlock = block.number;\n }\n }\n };\n exports3.PollingBlockTagSubscriber = PollingBlockTagSubscriber;\n var PollingOrphanSubscriber = class extends OnBlockSubscriber {\n #filter;\n constructor(provider, filter) {\n super(provider);\n this.#filter = copy(filter);\n }\n async _poll(blockNumber, provider) {\n throw new Error(\"@TODO\");\n console.log(this.#filter);\n }\n };\n exports3.PollingOrphanSubscriber = PollingOrphanSubscriber;\n var PollingTransactionSubscriber = class extends OnBlockSubscriber {\n #hash;\n /**\n * Create a new **PollingTransactionSubscriber** attached to\n * %%provider%%, listening for %%hash%%.\n */\n constructor(provider, hash3) {\n super(provider);\n this.#hash = hash3;\n }\n async _poll(blockNumber, provider) {\n const tx = await provider.getTransactionReceipt(this.#hash);\n if (tx) {\n provider.emit(this.#hash, tx);\n }\n }\n };\n exports3.PollingTransactionSubscriber = PollingTransactionSubscriber;\n var PollingEventSubscriber = class {\n #provider;\n #filter;\n #poller;\n #running;\n // The most recent block we have scanned for events. The value -2\n // indicates we still need to fetch an initial block number\n #blockNumber;\n /**\n * Create a new **PollingTransactionSubscriber** attached to\n * %%provider%%, listening for %%filter%%.\n */\n constructor(provider, filter) {\n this.#provider = provider;\n this.#filter = copy(filter);\n this.#poller = this.#poll.bind(this);\n this.#running = false;\n this.#blockNumber = -2;\n }\n async #poll(blockNumber) {\n if (this.#blockNumber === -2) {\n return;\n }\n const filter = copy(this.#filter);\n filter.fromBlock = this.#blockNumber + 1;\n filter.toBlock = blockNumber;\n const logs = await this.#provider.getLogs(filter);\n if (logs.length === 0) {\n if (this.#blockNumber < blockNumber - 60) {\n this.#blockNumber = blockNumber - 60;\n }\n return;\n }\n for (const log of logs) {\n this.#provider.emit(this.#filter, log);\n this.#blockNumber = log.blockNumber;\n }\n }\n start() {\n if (this.#running) {\n return;\n }\n this.#running = true;\n if (this.#blockNumber === -2) {\n this.#provider.getBlockNumber().then((blockNumber) => {\n this.#blockNumber = blockNumber;\n });\n }\n this.#provider.on(\"block\", this.#poller);\n }\n stop() {\n if (!this.#running) {\n return;\n }\n this.#running = false;\n this.#provider.off(\"block\", this.#poller);\n }\n pause(dropWhilePaused) {\n this.stop();\n if (dropWhilePaused) {\n this.#blockNumber = -2;\n }\n }\n resume() {\n this.start();\n }\n };\n exports3.PollingEventSubscriber = PollingEventSubscriber;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/abstract-provider.js\n var require_abstract_provider = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/abstract-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AbstractProvider = exports3.UnmanagedSubscriber = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_constants5();\n var index_js_3 = require_contract2();\n var index_js_4 = require_hash2();\n var index_js_5 = require_transaction2();\n var index_js_6 = require_utils8();\n var ens_resolver_js_1 = require_ens_resolver();\n var format_js_1 = require_format();\n var network_js_1 = require_network();\n var provider_js_1 = require_provider();\n var subscriber_polling_js_1 = require_subscriber_polling();\n var BN_2 = BigInt(2);\n var MAX_CCIP_REDIRECTS = 10;\n function isPromise(value) {\n return value && typeof value.then === \"function\";\n }\n function getTag(prefix, value) {\n return prefix + \":\" + JSON.stringify(value, (k4, v2) => {\n if (v2 == null) {\n return \"null\";\n }\n if (typeof v2 === \"bigint\") {\n return `bigint:${v2.toString()}`;\n }\n if (typeof v2 === \"string\") {\n return v2.toLowerCase();\n }\n if (typeof v2 === \"object\" && !Array.isArray(v2)) {\n const keys = Object.keys(v2);\n keys.sort();\n return keys.reduce((accum, key) => {\n accum[key] = v2[key];\n return accum;\n }, {});\n }\n return v2;\n });\n }\n var UnmanagedSubscriber = class {\n /**\n * The name fof the event.\n */\n name;\n /**\n * Create a new UnmanagedSubscriber with %%name%%.\n */\n constructor(name) {\n (0, index_js_6.defineProperties)(this, { name });\n }\n start() {\n }\n stop() {\n }\n pause(dropWhilePaused) {\n }\n resume() {\n }\n };\n exports3.UnmanagedSubscriber = UnmanagedSubscriber;\n function copy(value) {\n return JSON.parse(JSON.stringify(value));\n }\n function concisify(items) {\n items = Array.from(new Set(items).values());\n items.sort();\n return items;\n }\n async function getSubscription(_event, provider) {\n if (_event == null) {\n throw new Error(\"invalid event\");\n }\n if (Array.isArray(_event)) {\n _event = { topics: _event };\n }\n if (typeof _event === \"string\") {\n switch (_event) {\n case \"block\":\n case \"debug\":\n case \"error\":\n case \"finalized\":\n case \"network\":\n case \"pending\":\n case \"safe\": {\n return { type: _event, tag: _event };\n }\n }\n }\n if ((0, index_js_6.isHexString)(_event, 32)) {\n const hash3 = _event.toLowerCase();\n return { type: \"transaction\", tag: getTag(\"tx\", { hash: hash3 }), hash: hash3 };\n }\n if (_event.orphan) {\n const event = _event;\n return { type: \"orphan\", tag: getTag(\"orphan\", event), filter: copy(event) };\n }\n if (_event.address || _event.topics) {\n const event = _event;\n const filter = {\n topics: (event.topics || []).map((t3) => {\n if (t3 == null) {\n return null;\n }\n if (Array.isArray(t3)) {\n return concisify(t3.map((t4) => t4.toLowerCase()));\n }\n return t3.toLowerCase();\n })\n };\n if (event.address) {\n const addresses4 = [];\n const promises = [];\n const addAddress = (addr) => {\n if ((0, index_js_6.isHexString)(addr)) {\n addresses4.push(addr);\n } else {\n promises.push((async () => {\n addresses4.push(await (0, index_js_1.resolveAddress)(addr, provider));\n })());\n }\n };\n if (Array.isArray(event.address)) {\n event.address.forEach(addAddress);\n } else {\n addAddress(event.address);\n }\n if (promises.length) {\n await Promise.all(promises);\n }\n filter.address = concisify(addresses4.map((a3) => a3.toLowerCase()));\n }\n return { filter, tag: getTag(\"event\", filter), type: \"event\" };\n }\n (0, index_js_6.assertArgument)(false, \"unknown ProviderEvent\", \"event\", _event);\n }\n function getTime() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n var defaultOptions = {\n cacheTimeout: 250,\n pollingInterval: 4e3\n };\n var AbstractProvider = class {\n #subs;\n #plugins;\n // null=unpaused, true=paused+dropWhilePaused, false=paused\n #pausedState;\n #destroyed;\n #networkPromise;\n #anyNetwork;\n #performCache;\n // The most recent block number if running an event or -1 if no \"block\" event\n #lastBlockNumber;\n #nextTimer;\n #timers;\n #disableCcipRead;\n #options;\n /**\n * Create a new **AbstractProvider** connected to %%network%%, or\n * use the various network detection capabilities to discover the\n * [[Network]] if necessary.\n */\n constructor(_network, options) {\n this.#options = Object.assign({}, defaultOptions, options || {});\n if (_network === \"any\") {\n this.#anyNetwork = true;\n this.#networkPromise = null;\n } else if (_network) {\n const network = network_js_1.Network.from(_network);\n this.#anyNetwork = false;\n this.#networkPromise = Promise.resolve(network);\n setTimeout(() => {\n this.emit(\"network\", network, null);\n }, 0);\n } else {\n this.#anyNetwork = false;\n this.#networkPromise = null;\n }\n this.#lastBlockNumber = -1;\n this.#performCache = /* @__PURE__ */ new Map();\n this.#subs = /* @__PURE__ */ new Map();\n this.#plugins = /* @__PURE__ */ new Map();\n this.#pausedState = null;\n this.#destroyed = false;\n this.#nextTimer = 1;\n this.#timers = /* @__PURE__ */ new Map();\n this.#disableCcipRead = false;\n }\n get pollingInterval() {\n return this.#options.pollingInterval;\n }\n /**\n * Returns ``this``, to allow an **AbstractProvider** to implement\n * the [[ContractRunner]] interface.\n */\n get provider() {\n return this;\n }\n /**\n * Returns all the registered plug-ins.\n */\n get plugins() {\n return Array.from(this.#plugins.values());\n }\n /**\n * Attach a new plug-in.\n */\n attachPlugin(plugin) {\n if (this.#plugins.get(plugin.name)) {\n throw new Error(`cannot replace existing plugin: ${plugin.name} `);\n }\n this.#plugins.set(plugin.name, plugin.connect(this));\n return this;\n }\n /**\n * Get a plugin by name.\n */\n getPlugin(name) {\n return this.#plugins.get(name) || null;\n }\n /**\n * Prevent any CCIP-read operation, regardless of whether requested\n * in a [[call]] using ``enableCcipRead``.\n */\n get disableCcipRead() {\n return this.#disableCcipRead;\n }\n set disableCcipRead(value) {\n this.#disableCcipRead = !!value;\n }\n // Shares multiple identical requests made during the same 250ms\n async #perform(req) {\n const timeout = this.#options.cacheTimeout;\n if (timeout < 0) {\n return await this._perform(req);\n }\n const tag = getTag(req.method, req);\n let perform = this.#performCache.get(tag);\n if (!perform) {\n perform = this._perform(req);\n this.#performCache.set(tag, perform);\n setTimeout(() => {\n if (this.#performCache.get(tag) === perform) {\n this.#performCache.delete(tag);\n }\n }, timeout);\n }\n return await perform;\n }\n /**\n * Resolves to the data for executing the CCIP-read operations.\n */\n async ccipReadFetch(tx, calldata, urls) {\n if (this.disableCcipRead || urls.length === 0 || tx.to == null) {\n return null;\n }\n const sender = tx.to.toLowerCase();\n const data = calldata.toLowerCase();\n const errorMessages = [];\n for (let i3 = 0; i3 < urls.length; i3++) {\n const url = urls[i3];\n const href = url.replace(\"{sender}\", sender).replace(\"{data}\", data);\n const request = new index_js_6.FetchRequest(href);\n if (url.indexOf(\"{data}\") === -1) {\n request.body = { data, sender };\n }\n this.emit(\"debug\", { action: \"sendCcipReadFetchRequest\", request, index: i3, urls });\n let errorMessage = \"unknown error\";\n let resp;\n try {\n resp = await request.send();\n } catch (error) {\n errorMessages.push(error.message);\n this.emit(\"debug\", { action: \"receiveCcipReadFetchError\", request, result: { error } });\n continue;\n }\n try {\n const result = resp.bodyJson;\n if (result.data) {\n this.emit(\"debug\", { action: \"receiveCcipReadFetchResult\", request, result });\n return result.data;\n }\n if (result.message) {\n errorMessage = result.message;\n }\n this.emit(\"debug\", { action: \"receiveCcipReadFetchError\", request, result });\n } catch (error) {\n }\n (0, index_js_6.assert)(resp.statusCode < 400 || resp.statusCode >= 500, `response not found during CCIP fetch: ${errorMessage}`, \"OFFCHAIN_FAULT\", { reason: \"404_MISSING_RESOURCE\", transaction: tx, info: { url, errorMessage } });\n errorMessages.push(errorMessage);\n }\n (0, index_js_6.assert)(false, `error encountered during CCIP fetch: ${errorMessages.map((m2) => JSON.stringify(m2)).join(\", \")}`, \"OFFCHAIN_FAULT\", {\n reason: \"500_SERVER_ERROR\",\n transaction: tx,\n info: { urls, errorMessages }\n });\n }\n /**\n * Provides the opportunity for a sub-class to wrap a block before\n * returning it, to add additional properties or an alternate\n * sub-class of [[Block]].\n */\n _wrapBlock(value, network) {\n return new provider_js_1.Block((0, format_js_1.formatBlock)(value), this);\n }\n /**\n * Provides the opportunity for a sub-class to wrap a log before\n * returning it, to add additional properties or an alternate\n * sub-class of [[Log]].\n */\n _wrapLog(value, network) {\n return new provider_js_1.Log((0, format_js_1.formatLog)(value), this);\n }\n /**\n * Provides the opportunity for a sub-class to wrap a transaction\n * receipt before returning it, to add additional properties or an\n * alternate sub-class of [[TransactionReceipt]].\n */\n _wrapTransactionReceipt(value, network) {\n return new provider_js_1.TransactionReceipt((0, format_js_1.formatTransactionReceipt)(value), this);\n }\n /**\n * Provides the opportunity for a sub-class to wrap a transaction\n * response before returning it, to add additional properties or an\n * alternate sub-class of [[TransactionResponse]].\n */\n _wrapTransactionResponse(tx, network) {\n return new provider_js_1.TransactionResponse((0, format_js_1.formatTransactionResponse)(tx), this);\n }\n /**\n * Resolves to the Network, forcing a network detection using whatever\n * technique the sub-class requires.\n *\n * Sub-classes **must** override this.\n */\n _detectNetwork() {\n (0, index_js_6.assert)(false, \"sub-classes must implement this\", \"UNSUPPORTED_OPERATION\", {\n operation: \"_detectNetwork\"\n });\n }\n /**\n * Sub-classes should use this to perform all built-in operations. All\n * methods sanitizes and normalizes the values passed into this.\n *\n * Sub-classes **must** override this.\n */\n async _perform(req) {\n (0, index_js_6.assert)(false, `unsupported method: ${req.method}`, \"UNSUPPORTED_OPERATION\", {\n operation: req.method,\n info: req\n });\n }\n // State\n async getBlockNumber() {\n const blockNumber = (0, index_js_6.getNumber)(await this.#perform({ method: \"getBlockNumber\" }), \"%response\");\n if (this.#lastBlockNumber >= 0) {\n this.#lastBlockNumber = blockNumber;\n }\n return blockNumber;\n }\n /**\n * Returns or resolves to the address for %%address%%, resolving ENS\n * names and [[Addressable]] objects and returning if already an\n * address.\n */\n _getAddress(address) {\n return (0, index_js_1.resolveAddress)(address, this);\n }\n /**\n * Returns or resolves to a valid block tag for %%blockTag%%, resolving\n * negative values and returning if already a valid block tag.\n */\n _getBlockTag(blockTag) {\n if (blockTag == null) {\n return \"latest\";\n }\n switch (blockTag) {\n case \"earliest\":\n return \"0x0\";\n case \"finalized\":\n case \"latest\":\n case \"pending\":\n case \"safe\":\n return blockTag;\n }\n if ((0, index_js_6.isHexString)(blockTag)) {\n if ((0, index_js_6.isHexString)(blockTag, 32)) {\n return blockTag;\n }\n return (0, index_js_6.toQuantity)(blockTag);\n }\n if (typeof blockTag === \"bigint\") {\n blockTag = (0, index_js_6.getNumber)(blockTag, \"blockTag\");\n }\n if (typeof blockTag === \"number\") {\n if (blockTag >= 0) {\n return (0, index_js_6.toQuantity)(blockTag);\n }\n if (this.#lastBlockNumber >= 0) {\n return (0, index_js_6.toQuantity)(this.#lastBlockNumber + blockTag);\n }\n return this.getBlockNumber().then((b4) => (0, index_js_6.toQuantity)(b4 + blockTag));\n }\n (0, index_js_6.assertArgument)(false, \"invalid blockTag\", \"blockTag\", blockTag);\n }\n /**\n * Returns or resolves to a filter for %%filter%%, resolving any ENS\n * names or [[Addressable]] object and returning if already a valid\n * filter.\n */\n _getFilter(filter) {\n const topics = (filter.topics || []).map((t3) => {\n if (t3 == null) {\n return null;\n }\n if (Array.isArray(t3)) {\n return concisify(t3.map((t4) => t4.toLowerCase()));\n }\n return t3.toLowerCase();\n });\n const blockHash = \"blockHash\" in filter ? filter.blockHash : void 0;\n const resolve = (_address, fromBlock2, toBlock2) => {\n let address2 = void 0;\n switch (_address.length) {\n case 0:\n break;\n case 1:\n address2 = _address[0];\n break;\n default:\n _address.sort();\n address2 = _address;\n }\n if (blockHash) {\n if (fromBlock2 != null || toBlock2 != null) {\n throw new Error(\"invalid filter\");\n }\n }\n const filter2 = {};\n if (address2) {\n filter2.address = address2;\n }\n if (topics.length) {\n filter2.topics = topics;\n }\n if (fromBlock2) {\n filter2.fromBlock = fromBlock2;\n }\n if (toBlock2) {\n filter2.toBlock = toBlock2;\n }\n if (blockHash) {\n filter2.blockHash = blockHash;\n }\n return filter2;\n };\n let address = [];\n if (filter.address) {\n if (Array.isArray(filter.address)) {\n for (const addr of filter.address) {\n address.push(this._getAddress(addr));\n }\n } else {\n address.push(this._getAddress(filter.address));\n }\n }\n let fromBlock = void 0;\n if (\"fromBlock\" in filter) {\n fromBlock = this._getBlockTag(filter.fromBlock);\n }\n let toBlock = void 0;\n if (\"toBlock\" in filter) {\n toBlock = this._getBlockTag(filter.toBlock);\n }\n if (address.filter((a3) => typeof a3 !== \"string\").length || fromBlock != null && typeof fromBlock !== \"string\" || toBlock != null && typeof toBlock !== \"string\") {\n return Promise.all([Promise.all(address), fromBlock, toBlock]).then((result) => {\n return resolve(result[0], result[1], result[2]);\n });\n }\n return resolve(address, fromBlock, toBlock);\n }\n /**\n * Returns or resolves to a transaction for %%request%%, resolving\n * any ENS names or [[Addressable]] and returning if already a valid\n * transaction.\n */\n _getTransactionRequest(_request) {\n const request = (0, provider_js_1.copyRequest)(_request);\n const promises = [];\n [\"to\", \"from\"].forEach((key) => {\n if (request[key] == null) {\n return;\n }\n const addr = (0, index_js_1.resolveAddress)(request[key], this);\n if (isPromise(addr)) {\n promises.push(async function() {\n request[key] = await addr;\n }());\n } else {\n request[key] = addr;\n }\n });\n if (request.blockTag != null) {\n const blockTag = this._getBlockTag(request.blockTag);\n if (isPromise(blockTag)) {\n promises.push(async function() {\n request.blockTag = await blockTag;\n }());\n } else {\n request.blockTag = blockTag;\n }\n }\n if (promises.length) {\n return async function() {\n await Promise.all(promises);\n return request;\n }();\n }\n return request;\n }\n async getNetwork() {\n if (this.#networkPromise == null) {\n const detectNetwork = (async () => {\n try {\n const network = await this._detectNetwork();\n this.emit(\"network\", network, null);\n return network;\n } catch (error) {\n if (this.#networkPromise === detectNetwork) {\n this.#networkPromise = null;\n }\n throw error;\n }\n })();\n this.#networkPromise = detectNetwork;\n return (await detectNetwork).clone();\n }\n const networkPromise = this.#networkPromise;\n const [expected, actual] = await Promise.all([\n networkPromise,\n this._detectNetwork()\n // The actual connected network\n ]);\n if (expected.chainId !== actual.chainId) {\n if (this.#anyNetwork) {\n this.emit(\"network\", actual, expected);\n if (this.#networkPromise === networkPromise) {\n this.#networkPromise = Promise.resolve(actual);\n }\n } else {\n (0, index_js_6.assert)(false, `network changed: ${expected.chainId} => ${actual.chainId} `, \"NETWORK_ERROR\", {\n event: \"changed\"\n });\n }\n }\n return expected.clone();\n }\n async getFeeData() {\n const network = await this.getNetwork();\n const getFeeDataFunc = async () => {\n const { _block, gasPrice, priorityFee } = await (0, index_js_6.resolveProperties)({\n _block: this.#getBlock(\"latest\", false),\n gasPrice: (async () => {\n try {\n const value = await this.#perform({ method: \"getGasPrice\" });\n return (0, index_js_6.getBigInt)(value, \"%response\");\n } catch (error) {\n }\n return null;\n })(),\n priorityFee: (async () => {\n try {\n const value = await this.#perform({ method: \"getPriorityFee\" });\n return (0, index_js_6.getBigInt)(value, \"%response\");\n } catch (error) {\n }\n return null;\n })()\n });\n let maxFeePerGas = null;\n let maxPriorityFeePerGas = null;\n const block = this._wrapBlock(_block, network);\n if (block && block.baseFeePerGas) {\n maxPriorityFeePerGas = priorityFee != null ? priorityFee : BigInt(\"1000000000\");\n maxFeePerGas = block.baseFeePerGas * BN_2 + maxPriorityFeePerGas;\n }\n return new provider_js_1.FeeData(gasPrice, maxFeePerGas, maxPriorityFeePerGas);\n };\n const plugin = network.getPlugin(\"org.ethers.plugins.network.FetchUrlFeeDataPlugin\");\n if (plugin) {\n const req = new index_js_6.FetchRequest(plugin.url);\n const feeData = await plugin.processFunc(getFeeDataFunc, this, req);\n return new provider_js_1.FeeData(feeData.gasPrice, feeData.maxFeePerGas, feeData.maxPriorityFeePerGas);\n }\n return await getFeeDataFunc();\n }\n async estimateGas(_tx) {\n let tx = this._getTransactionRequest(_tx);\n if (isPromise(tx)) {\n tx = await tx;\n }\n return (0, index_js_6.getBigInt)(await this.#perform({\n method: \"estimateGas\",\n transaction: tx\n }), \"%response\");\n }\n async #call(tx, blockTag, attempt) {\n (0, index_js_6.assert)(attempt < MAX_CCIP_REDIRECTS, \"CCIP read exceeded maximum redirections\", \"OFFCHAIN_FAULT\", {\n reason: \"TOO_MANY_REDIRECTS\",\n transaction: Object.assign({}, tx, { blockTag, enableCcipRead: true })\n });\n const transaction = (0, provider_js_1.copyRequest)(tx);\n try {\n return (0, index_js_6.hexlify)(await this._perform({ method: \"call\", transaction, blockTag }));\n } catch (error) {\n if (!this.disableCcipRead && (0, index_js_6.isCallException)(error) && error.data && attempt >= 0 && blockTag === \"latest\" && transaction.to != null && (0, index_js_6.dataSlice)(error.data, 0, 4) === \"0x556f1830\") {\n const data = error.data;\n const txSender = await (0, index_js_1.resolveAddress)(transaction.to, this);\n let ccipArgs;\n try {\n ccipArgs = parseOffchainLookup((0, index_js_6.dataSlice)(error.data, 4));\n } catch (error2) {\n (0, index_js_6.assert)(false, error2.message, \"OFFCHAIN_FAULT\", {\n reason: \"BAD_DATA\",\n transaction,\n info: { data }\n });\n }\n (0, index_js_6.assert)(ccipArgs.sender.toLowerCase() === txSender.toLowerCase(), \"CCIP Read sender mismatch\", \"CALL_EXCEPTION\", {\n action: \"call\",\n data,\n reason: \"OffchainLookup\",\n transaction,\n invocation: null,\n revert: {\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n name: \"OffchainLookup\",\n args: ccipArgs.errorArgs\n }\n });\n const ccipResult = await this.ccipReadFetch(transaction, ccipArgs.calldata, ccipArgs.urls);\n (0, index_js_6.assert)(ccipResult != null, \"CCIP Read failed to fetch data\", \"OFFCHAIN_FAULT\", {\n reason: \"FETCH_FAILED\",\n transaction,\n info: { data: error.data, errorArgs: ccipArgs.errorArgs }\n });\n const tx2 = {\n to: txSender,\n data: (0, index_js_6.concat)([ccipArgs.selector, encodeBytes3([ccipResult, ccipArgs.extraData])])\n };\n this.emit(\"debug\", { action: \"sendCcipReadCall\", transaction: tx2 });\n try {\n const result = await this.#call(tx2, blockTag, attempt + 1);\n this.emit(\"debug\", { action: \"receiveCcipReadCallResult\", transaction: Object.assign({}, tx2), result });\n return result;\n } catch (error2) {\n this.emit(\"debug\", { action: \"receiveCcipReadCallError\", transaction: Object.assign({}, tx2), error: error2 });\n throw error2;\n }\n }\n throw error;\n }\n }\n async #checkNetwork(promise) {\n const { value } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n value: promise\n });\n return value;\n }\n async call(_tx) {\n const { tx, blockTag } = await (0, index_js_6.resolveProperties)({\n tx: this._getTransactionRequest(_tx),\n blockTag: this._getBlockTag(_tx.blockTag)\n });\n return await this.#checkNetwork(this.#call(tx, blockTag, _tx.enableCcipRead ? 0 : -1));\n }\n // Account\n async #getAccountValue(request, _address, _blockTag) {\n let address = this._getAddress(_address);\n let blockTag = this._getBlockTag(_blockTag);\n if (typeof address !== \"string\" || typeof blockTag !== \"string\") {\n [address, blockTag] = await Promise.all([address, blockTag]);\n }\n return await this.#checkNetwork(this.#perform(Object.assign(request, { address, blockTag })));\n }\n async getBalance(address, blockTag) {\n return (0, index_js_6.getBigInt)(await this.#getAccountValue({ method: \"getBalance\" }, address, blockTag), \"%response\");\n }\n async getTransactionCount(address, blockTag) {\n return (0, index_js_6.getNumber)(await this.#getAccountValue({ method: \"getTransactionCount\" }, address, blockTag), \"%response\");\n }\n async getCode(address, blockTag) {\n return (0, index_js_6.hexlify)(await this.#getAccountValue({ method: \"getCode\" }, address, blockTag));\n }\n async getStorage(address, _position, blockTag) {\n const position = (0, index_js_6.getBigInt)(_position, \"position\");\n return (0, index_js_6.hexlify)(await this.#getAccountValue({ method: \"getStorage\", position }, address, blockTag));\n }\n // Write\n async broadcastTransaction(signedTx) {\n const { blockNumber, hash: hash3, network } = await (0, index_js_6.resolveProperties)({\n blockNumber: this.getBlockNumber(),\n hash: this._perform({\n method: \"broadcastTransaction\",\n signedTransaction: signedTx\n }),\n network: this.getNetwork()\n });\n const tx = index_js_5.Transaction.from(signedTx);\n if (tx.hash !== hash3) {\n throw new Error(\"@TODO: the returned hash did not match\");\n }\n return this._wrapTransactionResponse(tx, network).replaceableTransaction(blockNumber);\n }\n async #getBlock(block, includeTransactions) {\n if ((0, index_js_6.isHexString)(block, 32)) {\n return await this.#perform({\n method: \"getBlock\",\n blockHash: block,\n includeTransactions\n });\n }\n let blockTag = this._getBlockTag(block);\n if (typeof blockTag !== \"string\") {\n blockTag = await blockTag;\n }\n return await this.#perform({\n method: \"getBlock\",\n blockTag,\n includeTransactions\n });\n }\n // Queries\n async getBlock(block, prefetchTxs) {\n const { network, params } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n params: this.#getBlock(block, !!prefetchTxs)\n });\n if (params == null) {\n return null;\n }\n return this._wrapBlock(params, network);\n }\n async getTransaction(hash3) {\n const { network, params } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n params: this.#perform({ method: \"getTransaction\", hash: hash3 })\n });\n if (params == null) {\n return null;\n }\n return this._wrapTransactionResponse(params, network);\n }\n async getTransactionReceipt(hash3) {\n const { network, params } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n params: this.#perform({ method: \"getTransactionReceipt\", hash: hash3 })\n });\n if (params == null) {\n return null;\n }\n if (params.gasPrice == null && params.effectiveGasPrice == null) {\n const tx = await this.#perform({ method: \"getTransaction\", hash: hash3 });\n if (tx == null) {\n throw new Error(\"report this; could not find tx or effectiveGasPrice\");\n }\n params.effectiveGasPrice = tx.gasPrice;\n }\n return this._wrapTransactionReceipt(params, network);\n }\n async getTransactionResult(hash3) {\n const { result } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n result: this.#perform({ method: \"getTransactionResult\", hash: hash3 })\n });\n if (result == null) {\n return null;\n }\n return (0, index_js_6.hexlify)(result);\n }\n // Bloom-filter Queries\n async getLogs(_filter) {\n let filter = this._getFilter(_filter);\n if (isPromise(filter)) {\n filter = await filter;\n }\n const { network, params } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n params: this.#perform({ method: \"getLogs\", filter })\n });\n return params.map((p4) => this._wrapLog(p4, network));\n }\n // ENS\n _getProvider(chainId) {\n (0, index_js_6.assert)(false, \"provider cannot connect to target network\", \"UNSUPPORTED_OPERATION\", {\n operation: \"_getProvider()\"\n });\n }\n async getResolver(name) {\n return await ens_resolver_js_1.EnsResolver.fromName(this, name);\n }\n async getAvatar(name) {\n const resolver = await this.getResolver(name);\n if (resolver) {\n return await resolver.getAvatar();\n }\n return null;\n }\n async resolveName(name) {\n const resolver = await this.getResolver(name);\n if (resolver) {\n return await resolver.getAddress();\n }\n return null;\n }\n async lookupAddress(address) {\n address = (0, index_js_1.getAddress)(address);\n const node = (0, index_js_4.namehash)(address.substring(2).toLowerCase() + \".addr.reverse\");\n try {\n const ensAddr = await ens_resolver_js_1.EnsResolver.getEnsAddress(this);\n const ensContract = new index_js_3.Contract(ensAddr, [\n \"function resolver(bytes32) view returns (address)\"\n ], this);\n const resolver = await ensContract.resolver(node);\n if (resolver == null || resolver === index_js_2.ZeroAddress) {\n return null;\n }\n const resolverContract = new index_js_3.Contract(resolver, [\n \"function name(bytes32) view returns (string)\"\n ], this);\n const name = await resolverContract.name(node);\n const check = await this.resolveName(name);\n if (check !== address) {\n return null;\n }\n return name;\n } catch (error) {\n if ((0, index_js_6.isError)(error, \"BAD_DATA\") && error.value === \"0x\") {\n return null;\n }\n if ((0, index_js_6.isError)(error, \"CALL_EXCEPTION\")) {\n return null;\n }\n throw error;\n }\n return null;\n }\n async waitForTransaction(hash3, _confirms, timeout) {\n const confirms = _confirms != null ? _confirms : 1;\n if (confirms === 0) {\n return this.getTransactionReceipt(hash3);\n }\n return new Promise(async (resolve, reject) => {\n let timer = null;\n const listener = async (blockNumber) => {\n try {\n const receipt = await this.getTransactionReceipt(hash3);\n if (receipt != null) {\n if (blockNumber - receipt.blockNumber + 1 >= confirms) {\n resolve(receipt);\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n return;\n }\n }\n } catch (error) {\n console.log(\"EEE\", error);\n }\n this.once(\"block\", listener);\n };\n if (timeout != null) {\n timer = setTimeout(() => {\n if (timer == null) {\n return;\n }\n timer = null;\n this.off(\"block\", listener);\n reject((0, index_js_6.makeError)(\"timeout\", \"TIMEOUT\", { reason: \"timeout\" }));\n }, timeout);\n }\n listener(await this.getBlockNumber());\n });\n }\n async waitForBlock(blockTag) {\n (0, index_js_6.assert)(false, \"not implemented yet\", \"NOT_IMPLEMENTED\", {\n operation: \"waitForBlock\"\n });\n }\n /**\n * Clear a timer created using the [[_setTimeout]] method.\n */\n _clearTimeout(timerId) {\n const timer = this.#timers.get(timerId);\n if (!timer) {\n return;\n }\n if (timer.timer) {\n clearTimeout(timer.timer);\n }\n this.#timers.delete(timerId);\n }\n /**\n * Create a timer that will execute %%func%% after at least %%timeout%%\n * (in ms). If %%timeout%% is unspecified, then %%func%% will execute\n * in the next event loop.\n *\n * [Pausing](AbstractProvider-paused) the provider will pause any\n * associated timers.\n */\n _setTimeout(_func, timeout) {\n if (timeout == null) {\n timeout = 0;\n }\n const timerId = this.#nextTimer++;\n const func = () => {\n this.#timers.delete(timerId);\n _func();\n };\n if (this.paused) {\n this.#timers.set(timerId, { timer: null, func, time: timeout });\n } else {\n const timer = setTimeout(func, timeout);\n this.#timers.set(timerId, { timer, func, time: getTime() });\n }\n return timerId;\n }\n /**\n * Perform %%func%% on each subscriber.\n */\n _forEachSubscriber(func) {\n for (const sub of this.#subs.values()) {\n func(sub.subscriber);\n }\n }\n /**\n * Sub-classes may override this to customize subscription\n * implementations.\n */\n _getSubscriber(sub) {\n switch (sub.type) {\n case \"debug\":\n case \"error\":\n case \"network\":\n return new UnmanagedSubscriber(sub.type);\n case \"block\": {\n const subscriber = new subscriber_polling_js_1.PollingBlockSubscriber(this);\n subscriber.pollingInterval = this.pollingInterval;\n return subscriber;\n }\n case \"safe\":\n case \"finalized\":\n return new subscriber_polling_js_1.PollingBlockTagSubscriber(this, sub.type);\n case \"event\":\n return new subscriber_polling_js_1.PollingEventSubscriber(this, sub.filter);\n case \"transaction\":\n return new subscriber_polling_js_1.PollingTransactionSubscriber(this, sub.hash);\n case \"orphan\":\n return new subscriber_polling_js_1.PollingOrphanSubscriber(this, sub.filter);\n }\n throw new Error(`unsupported event: ${sub.type}`);\n }\n /**\n * If a [[Subscriber]] fails and needs to replace itself, this\n * method may be used.\n *\n * For example, this is used for providers when using the\n * ``eth_getFilterChanges`` method, which can return null if state\n * filters are not supported by the backend, allowing the Subscriber\n * to swap in a [[PollingEventSubscriber]].\n */\n _recoverSubscriber(oldSub, newSub) {\n for (const sub of this.#subs.values()) {\n if (sub.subscriber === oldSub) {\n if (sub.started) {\n sub.subscriber.stop();\n }\n sub.subscriber = newSub;\n if (sub.started) {\n newSub.start();\n }\n if (this.#pausedState != null) {\n newSub.pause(this.#pausedState);\n }\n break;\n }\n }\n }\n async #hasSub(event, emitArgs) {\n let sub = await getSubscription(event, this);\n if (sub.type === \"event\" && emitArgs && emitArgs.length > 0 && emitArgs[0].removed === true) {\n sub = await getSubscription({ orphan: \"drop-log\", log: emitArgs[0] }, this);\n }\n return this.#subs.get(sub.tag) || null;\n }\n async #getSub(event) {\n const subscription = await getSubscription(event, this);\n const tag = subscription.tag;\n let sub = this.#subs.get(tag);\n if (!sub) {\n const subscriber = this._getSubscriber(subscription);\n const addressableMap = /* @__PURE__ */ new WeakMap();\n const nameMap = /* @__PURE__ */ new Map();\n sub = { subscriber, tag, addressableMap, nameMap, started: false, listeners: [] };\n this.#subs.set(tag, sub);\n }\n return sub;\n }\n async on(event, listener) {\n const sub = await this.#getSub(event);\n sub.listeners.push({ listener, once: false });\n if (!sub.started) {\n sub.subscriber.start();\n sub.started = true;\n if (this.#pausedState != null) {\n sub.subscriber.pause(this.#pausedState);\n }\n }\n return this;\n }\n async once(event, listener) {\n const sub = await this.#getSub(event);\n sub.listeners.push({ listener, once: true });\n if (!sub.started) {\n sub.subscriber.start();\n sub.started = true;\n if (this.#pausedState != null) {\n sub.subscriber.pause(this.#pausedState);\n }\n }\n return this;\n }\n async emit(event, ...args) {\n const sub = await this.#hasSub(event, args);\n if (!sub || sub.listeners.length === 0) {\n return false;\n }\n ;\n const count = sub.listeners.length;\n sub.listeners = sub.listeners.filter(({ listener, once: once2 }) => {\n const payload = new index_js_6.EventPayload(this, once2 ? null : listener, event);\n try {\n listener.call(this, ...args, payload);\n } catch (error) {\n }\n return !once2;\n });\n if (sub.listeners.length === 0) {\n if (sub.started) {\n sub.subscriber.stop();\n }\n this.#subs.delete(sub.tag);\n }\n return count > 0;\n }\n async listenerCount(event) {\n if (event) {\n const sub = await this.#hasSub(event);\n if (!sub) {\n return 0;\n }\n return sub.listeners.length;\n }\n let total = 0;\n for (const { listeners: listeners2 } of this.#subs.values()) {\n total += listeners2.length;\n }\n return total;\n }\n async listeners(event) {\n if (event) {\n const sub = await this.#hasSub(event);\n if (!sub) {\n return [];\n }\n return sub.listeners.map(({ listener }) => listener);\n }\n let result = [];\n for (const { listeners: listeners2 } of this.#subs.values()) {\n result = result.concat(listeners2.map(({ listener }) => listener));\n }\n return result;\n }\n async off(event, listener) {\n const sub = await this.#hasSub(event);\n if (!sub) {\n return this;\n }\n if (listener) {\n const index2 = sub.listeners.map(({ listener: listener2 }) => listener2).indexOf(listener);\n if (index2 >= 0) {\n sub.listeners.splice(index2, 1);\n }\n }\n if (!listener || sub.listeners.length === 0) {\n if (sub.started) {\n sub.subscriber.stop();\n }\n this.#subs.delete(sub.tag);\n }\n return this;\n }\n async removeAllListeners(event) {\n if (event) {\n const { tag, started, subscriber } = await this.#getSub(event);\n if (started) {\n subscriber.stop();\n }\n this.#subs.delete(tag);\n } else {\n for (const [tag, { started, subscriber }] of this.#subs) {\n if (started) {\n subscriber.stop();\n }\n this.#subs.delete(tag);\n }\n }\n return this;\n }\n // Alias for \"on\"\n async addListener(event, listener) {\n return await this.on(event, listener);\n }\n // Alias for \"off\"\n async removeListener(event, listener) {\n return this.off(event, listener);\n }\n /**\n * If this provider has been destroyed using the [[destroy]] method.\n *\n * Once destroyed, all resources are reclaimed, internal event loops\n * and timers are cleaned up and no further requests may be sent to\n * the provider.\n */\n get destroyed() {\n return this.#destroyed;\n }\n /**\n * Sub-classes may use this to shutdown any sockets or release their\n * resources and reject any pending requests.\n *\n * Sub-classes **must** call ``super.destroy()``.\n */\n destroy() {\n this.removeAllListeners();\n for (const timerId of this.#timers.keys()) {\n this._clearTimeout(timerId);\n }\n this.#destroyed = true;\n }\n /**\n * Whether the provider is currently paused.\n *\n * A paused provider will not emit any events, and generally should\n * not make any requests to the network, but that is up to sub-classes\n * to manage.\n *\n * Setting ``paused = true`` is identical to calling ``.pause(false)``,\n * which will buffer any events that occur while paused until the\n * provider is unpaused.\n */\n get paused() {\n return this.#pausedState != null;\n }\n set paused(pause) {\n if (!!pause === this.paused) {\n return;\n }\n if (this.paused) {\n this.resume();\n } else {\n this.pause(false);\n }\n }\n /**\n * Pause the provider. If %%dropWhilePaused%%, any events that occur\n * while paused are dropped, otherwise all events will be emitted once\n * the provider is unpaused.\n */\n pause(dropWhilePaused) {\n this.#lastBlockNumber = -1;\n if (this.#pausedState != null) {\n if (this.#pausedState == !!dropWhilePaused) {\n return;\n }\n (0, index_js_6.assert)(false, \"cannot change pause type; resume first\", \"UNSUPPORTED_OPERATION\", {\n operation: \"pause\"\n });\n }\n this._forEachSubscriber((s4) => s4.pause(dropWhilePaused));\n this.#pausedState = !!dropWhilePaused;\n for (const timer of this.#timers.values()) {\n if (timer.timer) {\n clearTimeout(timer.timer);\n }\n timer.time = getTime() - timer.time;\n }\n }\n /**\n * Resume the provider.\n */\n resume() {\n if (this.#pausedState == null) {\n return;\n }\n this._forEachSubscriber((s4) => s4.resume());\n this.#pausedState = null;\n for (const timer of this.#timers.values()) {\n let timeout = timer.time;\n if (timeout < 0) {\n timeout = 0;\n }\n timer.time = getTime();\n setTimeout(timer.func, timeout);\n }\n }\n };\n exports3.AbstractProvider = AbstractProvider;\n function _parseString(result, start) {\n try {\n const bytes = _parseBytes(result, start);\n if (bytes) {\n return (0, index_js_6.toUtf8String)(bytes);\n }\n } catch (error) {\n }\n return null;\n }\n function _parseBytes(result, start) {\n if (result === \"0x\") {\n return null;\n }\n try {\n const offset = (0, index_js_6.getNumber)((0, index_js_6.dataSlice)(result, start, start + 32));\n const length = (0, index_js_6.getNumber)((0, index_js_6.dataSlice)(result, offset, offset + 32));\n return (0, index_js_6.dataSlice)(result, offset + 32, offset + 32 + length);\n } catch (error) {\n }\n return null;\n }\n function numPad(value) {\n const result = (0, index_js_6.toBeArray)(value);\n if (result.length > 32) {\n throw new Error(\"internal; should not happen\");\n }\n const padded = new Uint8Array(32);\n padded.set(result, 32 - result.length);\n return padded;\n }\n function bytesPad(value) {\n if (value.length % 32 === 0) {\n return value;\n }\n const result = new Uint8Array(Math.ceil(value.length / 32) * 32);\n result.set(value);\n return result;\n }\n var empty = new Uint8Array([]);\n function encodeBytes3(datas) {\n const result = [];\n let byteCount = 0;\n for (let i3 = 0; i3 < datas.length; i3++) {\n result.push(empty);\n byteCount += 32;\n }\n for (let i3 = 0; i3 < datas.length; i3++) {\n const data = (0, index_js_6.getBytes)(datas[i3]);\n result[i3] = numPad(byteCount);\n result.push(numPad(data.length));\n result.push(bytesPad(data));\n byteCount += 32 + Math.ceil(data.length / 32) * 32;\n }\n return (0, index_js_6.concat)(result);\n }\n var zeros = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n function parseOffchainLookup(data) {\n const result = {\n sender: \"\",\n urls: [],\n calldata: \"\",\n selector: \"\",\n extraData: \"\",\n errorArgs: []\n };\n (0, index_js_6.assert)((0, index_js_6.dataLength)(data) >= 5 * 32, \"insufficient OffchainLookup data\", \"OFFCHAIN_FAULT\", {\n reason: \"insufficient OffchainLookup data\"\n });\n const sender = (0, index_js_6.dataSlice)(data, 0, 32);\n (0, index_js_6.assert)((0, index_js_6.dataSlice)(sender, 0, 12) === (0, index_js_6.dataSlice)(zeros, 0, 12), \"corrupt OffchainLookup sender\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup sender\"\n });\n result.sender = (0, index_js_6.dataSlice)(sender, 12);\n try {\n const urls = [];\n const urlsOffset = (0, index_js_6.getNumber)((0, index_js_6.dataSlice)(data, 32, 64));\n const urlsLength = (0, index_js_6.getNumber)((0, index_js_6.dataSlice)(data, urlsOffset, urlsOffset + 32));\n const urlsData = (0, index_js_6.dataSlice)(data, urlsOffset + 32);\n for (let u2 = 0; u2 < urlsLength; u2++) {\n const url = _parseString(urlsData, u2 * 32);\n if (url == null) {\n throw new Error(\"abort\");\n }\n urls.push(url);\n }\n result.urls = urls;\n } catch (error) {\n (0, index_js_6.assert)(false, \"corrupt OffchainLookup urls\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup urls\"\n });\n }\n try {\n const calldata = _parseBytes(data, 64);\n if (calldata == null) {\n throw new Error(\"abort\");\n }\n result.calldata = calldata;\n } catch (error) {\n (0, index_js_6.assert)(false, \"corrupt OffchainLookup calldata\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup calldata\"\n });\n }\n (0, index_js_6.assert)((0, index_js_6.dataSlice)(data, 100, 128) === (0, index_js_6.dataSlice)(zeros, 0, 28), \"corrupt OffchainLookup callbaackSelector\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup callbaackSelector\"\n });\n result.selector = (0, index_js_6.dataSlice)(data, 96, 100);\n try {\n const extraData = _parseBytes(data, 128);\n if (extraData == null) {\n throw new Error(\"abort\");\n }\n result.extraData = extraData;\n } catch (error) {\n (0, index_js_6.assert)(false, \"corrupt OffchainLookup extraData\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup extraData\"\n });\n }\n result.errorArgs = \"sender,urls,calldata,selector,extraData\".split(/,/).map((k4) => result[k4]);\n return result;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/abstract-signer.js\n var require_abstract_signer = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/abstract-signer.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.VoidSigner = exports3.AbstractSigner = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_transaction2();\n var index_js_3 = require_utils8();\n var provider_js_1 = require_provider();\n function checkProvider(signer, operation) {\n if (signer.provider) {\n return signer.provider;\n }\n (0, index_js_3.assert)(false, \"missing provider\", \"UNSUPPORTED_OPERATION\", { operation });\n }\n async function populate(signer, tx) {\n let pop = (0, provider_js_1.copyRequest)(tx);\n if (pop.to != null) {\n pop.to = (0, index_js_1.resolveAddress)(pop.to, signer);\n }\n if (pop.from != null) {\n const from14 = pop.from;\n pop.from = Promise.all([\n signer.getAddress(),\n (0, index_js_1.resolveAddress)(from14, signer)\n ]).then(([address, from15]) => {\n (0, index_js_3.assertArgument)(address.toLowerCase() === from15.toLowerCase(), \"transaction from mismatch\", \"tx.from\", from15);\n return address;\n });\n } else {\n pop.from = signer.getAddress();\n }\n return await (0, index_js_3.resolveProperties)(pop);\n }\n var AbstractSigner = class {\n /**\n * The provider this signer is connected to.\n */\n provider;\n /**\n * Creates a new Signer connected to %%provider%%.\n */\n constructor(provider) {\n (0, index_js_3.defineProperties)(this, { provider: provider || null });\n }\n async getNonce(blockTag) {\n return checkProvider(this, \"getTransactionCount\").getTransactionCount(await this.getAddress(), blockTag);\n }\n async populateCall(tx) {\n const pop = await populate(this, tx);\n return pop;\n }\n async populateTransaction(tx) {\n const provider = checkProvider(this, \"populateTransaction\");\n const pop = await populate(this, tx);\n if (pop.nonce == null) {\n pop.nonce = await this.getNonce(\"pending\");\n }\n if (pop.gasLimit == null) {\n pop.gasLimit = await this.estimateGas(pop);\n }\n const network = await this.provider.getNetwork();\n if (pop.chainId != null) {\n const chainId = (0, index_js_3.getBigInt)(pop.chainId);\n (0, index_js_3.assertArgument)(chainId === network.chainId, \"transaction chainId mismatch\", \"tx.chainId\", tx.chainId);\n } else {\n pop.chainId = network.chainId;\n }\n const hasEip1559 = pop.maxFeePerGas != null || pop.maxPriorityFeePerGas != null;\n if (pop.gasPrice != null && (pop.type === 2 || hasEip1559)) {\n (0, index_js_3.assertArgument)(false, \"eip-1559 transaction do not support gasPrice\", \"tx\", tx);\n } else if ((pop.type === 0 || pop.type === 1) && hasEip1559) {\n (0, index_js_3.assertArgument)(false, \"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas\", \"tx\", tx);\n }\n if ((pop.type === 2 || pop.type == null) && (pop.maxFeePerGas != null && pop.maxPriorityFeePerGas != null)) {\n pop.type = 2;\n } else if (pop.type === 0 || pop.type === 1) {\n const feeData = await provider.getFeeData();\n (0, index_js_3.assert)(feeData.gasPrice != null, \"network does not support gasPrice\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getGasPrice\"\n });\n if (pop.gasPrice == null) {\n pop.gasPrice = feeData.gasPrice;\n }\n } else {\n const feeData = await provider.getFeeData();\n if (pop.type == null) {\n if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) {\n if (pop.authorizationList && pop.authorizationList.length) {\n pop.type = 4;\n } else {\n pop.type = 2;\n }\n if (pop.gasPrice != null) {\n const gasPrice = pop.gasPrice;\n delete pop.gasPrice;\n pop.maxFeePerGas = gasPrice;\n pop.maxPriorityFeePerGas = gasPrice;\n } else {\n if (pop.maxFeePerGas == null) {\n pop.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (pop.maxPriorityFeePerGas == null) {\n pop.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n } else if (feeData.gasPrice != null) {\n (0, index_js_3.assert)(!hasEip1559, \"network does not support EIP-1559\", \"UNSUPPORTED_OPERATION\", {\n operation: \"populateTransaction\"\n });\n if (pop.gasPrice == null) {\n pop.gasPrice = feeData.gasPrice;\n }\n pop.type = 0;\n } else {\n (0, index_js_3.assert)(false, \"failed to get consistent fee data\", \"UNSUPPORTED_OPERATION\", {\n operation: \"signer.getFeeData\"\n });\n }\n } else if (pop.type === 2 || pop.type === 3 || pop.type === 4) {\n if (pop.maxFeePerGas == null) {\n pop.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (pop.maxPriorityFeePerGas == null) {\n pop.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n }\n return await (0, index_js_3.resolveProperties)(pop);\n }\n async populateAuthorization(_auth) {\n const auth = Object.assign({}, _auth);\n if (auth.chainId == null) {\n auth.chainId = (await checkProvider(this, \"getNetwork\").getNetwork()).chainId;\n }\n if (auth.nonce == null) {\n auth.nonce = await this.getNonce();\n }\n return auth;\n }\n async estimateGas(tx) {\n return checkProvider(this, \"estimateGas\").estimateGas(await this.populateCall(tx));\n }\n async call(tx) {\n return checkProvider(this, \"call\").call(await this.populateCall(tx));\n }\n async resolveName(name) {\n const provider = checkProvider(this, \"resolveName\");\n return await provider.resolveName(name);\n }\n async sendTransaction(tx) {\n const provider = checkProvider(this, \"sendTransaction\");\n const pop = await this.populateTransaction(tx);\n delete pop.from;\n const txObj = index_js_2.Transaction.from(pop);\n return await provider.broadcastTransaction(await this.signTransaction(txObj));\n }\n // @TODO: in v7 move this to be abstract\n authorize(authorization) {\n (0, index_js_3.assert)(false, \"authorization not implemented for this signer\", \"UNSUPPORTED_OPERATION\", { operation: \"authorize\" });\n }\n };\n exports3.AbstractSigner = AbstractSigner;\n var VoidSigner = class _VoidSigner extends AbstractSigner {\n /**\n * The signer address.\n */\n address;\n /**\n * Creates a new **VoidSigner** with %%address%% attached to\n * %%provider%%.\n */\n constructor(address, provider) {\n super(provider);\n (0, index_js_3.defineProperties)(this, { address });\n }\n async getAddress() {\n return this.address;\n }\n connect(provider) {\n return new _VoidSigner(this.address, provider);\n }\n #throwUnsupported(suffix, operation) {\n (0, index_js_3.assert)(false, `VoidSigner cannot sign ${suffix}`, \"UNSUPPORTED_OPERATION\", { operation });\n }\n async signTransaction(tx) {\n this.#throwUnsupported(\"transactions\", \"signTransaction\");\n }\n async signMessage(message) {\n this.#throwUnsupported(\"messages\", \"signMessage\");\n }\n async signTypedData(domain2, types, value) {\n this.#throwUnsupported(\"typed-data\", \"signTypedData\");\n }\n };\n exports3.VoidSigner = VoidSigner;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/community.js\n var require_community = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/community.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.showThrottleMessage = void 0;\n var shown = /* @__PURE__ */ new Set();\n function showThrottleMessage(service) {\n if (shown.has(service)) {\n return;\n }\n shown.add(service);\n console.log(\"========= NOTICE =========\");\n console.log(`Request-Rate Exceeded for ${service} (this message will not be repeated)`);\n console.log(\"\");\n console.log(\"The default API keys for each service are provided as a highly-throttled,\");\n console.log(\"community resource for low-traffic projects and early prototyping.\");\n console.log(\"\");\n console.log(\"While your application will continue to function, we highly recommended\");\n console.log(\"signing up for your own API keys to improve performance, increase your\");\n console.log(\"request rate/limit and enable other perks, such as metrics and advanced APIs.\");\n console.log(\"\");\n console.log(\"For more details: https://docs.ethers.org/api-keys/\");\n console.log(\"==========================\");\n }\n exports3.showThrottleMessage = showThrottleMessage;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/subscriber-filterid.js\n var require_subscriber_filterid = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/subscriber-filterid.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FilterIdPendingSubscriber = exports3.FilterIdEventSubscriber = exports3.FilterIdSubscriber = void 0;\n var index_js_1 = require_utils8();\n var subscriber_polling_js_1 = require_subscriber_polling();\n function copy(obj) {\n return JSON.parse(JSON.stringify(obj));\n }\n var FilterIdSubscriber = class {\n #provider;\n #filterIdPromise;\n #poller;\n #running;\n #network;\n #hault;\n /**\n * Creates a new **FilterIdSubscriber** which will used [[_subscribe]]\n * and [[_emitResults]] to setup the subscription and provide the event\n * to the %%provider%%.\n */\n constructor(provider) {\n this.#provider = provider;\n this.#filterIdPromise = null;\n this.#poller = this.#poll.bind(this);\n this.#running = false;\n this.#network = null;\n this.#hault = false;\n }\n /**\n * Sub-classes **must** override this to begin the subscription.\n */\n _subscribe(provider) {\n throw new Error(\"subclasses must override this\");\n }\n /**\n * Sub-classes **must** override this handle the events.\n */\n _emitResults(provider, result) {\n throw new Error(\"subclasses must override this\");\n }\n /**\n * Sub-classes **must** override this handle recovery on errors.\n */\n _recover(provider) {\n throw new Error(\"subclasses must override this\");\n }\n async #poll(blockNumber) {\n try {\n if (this.#filterIdPromise == null) {\n this.#filterIdPromise = this._subscribe(this.#provider);\n }\n let filterId = null;\n try {\n filterId = await this.#filterIdPromise;\n } catch (error) {\n if (!(0, index_js_1.isError)(error, \"UNSUPPORTED_OPERATION\") || error.operation !== \"eth_newFilter\") {\n throw error;\n }\n }\n if (filterId == null) {\n this.#filterIdPromise = null;\n this.#provider._recoverSubscriber(this, this._recover(this.#provider));\n return;\n }\n const network = await this.#provider.getNetwork();\n if (!this.#network) {\n this.#network = network;\n }\n if (this.#network.chainId !== network.chainId) {\n throw new Error(\"chaid changed\");\n }\n if (this.#hault) {\n return;\n }\n const result = await this.#provider.send(\"eth_getFilterChanges\", [filterId]);\n await this._emitResults(this.#provider, result);\n } catch (error) {\n console.log(\"@TODO\", error);\n }\n this.#provider.once(\"block\", this.#poller);\n }\n #teardown() {\n const filterIdPromise = this.#filterIdPromise;\n if (filterIdPromise) {\n this.#filterIdPromise = null;\n filterIdPromise.then((filterId) => {\n if (this.#provider.destroyed) {\n return;\n }\n this.#provider.send(\"eth_uninstallFilter\", [filterId]);\n });\n }\n }\n start() {\n if (this.#running) {\n return;\n }\n this.#running = true;\n this.#poll(-2);\n }\n stop() {\n if (!this.#running) {\n return;\n }\n this.#running = false;\n this.#hault = true;\n this.#teardown();\n this.#provider.off(\"block\", this.#poller);\n }\n pause(dropWhilePaused) {\n if (dropWhilePaused) {\n this.#teardown();\n }\n this.#provider.off(\"block\", this.#poller);\n }\n resume() {\n this.start();\n }\n };\n exports3.FilterIdSubscriber = FilterIdSubscriber;\n var FilterIdEventSubscriber = class extends FilterIdSubscriber {\n #event;\n /**\n * Creates a new **FilterIdEventSubscriber** attached to %%provider%%\n * listening for %%filter%%.\n */\n constructor(provider, filter) {\n super(provider);\n this.#event = copy(filter);\n }\n _recover(provider) {\n return new subscriber_polling_js_1.PollingEventSubscriber(provider, this.#event);\n }\n async _subscribe(provider) {\n const filterId = await provider.send(\"eth_newFilter\", [this.#event]);\n return filterId;\n }\n async _emitResults(provider, results) {\n for (const result of results) {\n provider.emit(this.#event, provider._wrapLog(result, provider._network));\n }\n }\n };\n exports3.FilterIdEventSubscriber = FilterIdEventSubscriber;\n var FilterIdPendingSubscriber = class extends FilterIdSubscriber {\n async _subscribe(provider) {\n return await provider.send(\"eth_newPendingTransactionFilter\", []);\n }\n async _emitResults(provider, results) {\n for (const result of results) {\n provider.emit(\"pending\", result);\n }\n }\n };\n exports3.FilterIdPendingSubscriber = FilterIdPendingSubscriber;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js\n var require_provider_jsonrpc = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.JsonRpcProvider = exports3.JsonRpcApiPollingProvider = exports3.JsonRpcApiProvider = exports3.JsonRpcSigner = void 0;\n var index_js_1 = require_abi();\n var index_js_2 = require_address3();\n var index_js_3 = require_hash2();\n var index_js_4 = require_transaction2();\n var index_js_5 = require_utils8();\n var abstract_provider_js_1 = require_abstract_provider();\n var abstract_signer_js_1 = require_abstract_signer();\n var network_js_1 = require_network();\n var subscriber_filterid_js_1 = require_subscriber_filterid();\n var subscriber_polling_js_1 = require_subscriber_polling();\n var Primitive = \"bigint,boolean,function,number,string,symbol\".split(/,/g);\n function deepCopy(value) {\n if (value == null || Primitive.indexOf(typeof value) >= 0) {\n return value;\n }\n if (typeof value.getAddress === \"function\") {\n return value;\n }\n if (Array.isArray(value)) {\n return value.map(deepCopy);\n }\n if (typeof value === \"object\") {\n return Object.keys(value).reduce((accum, key) => {\n accum[key] = value[key];\n return accum;\n }, {});\n }\n throw new Error(`should not happen: ${value} (${typeof value})`);\n }\n function stall(duration) {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n }\n function getLowerCase(value) {\n if (value) {\n return value.toLowerCase();\n }\n return value;\n }\n function isPollable(value) {\n return value && typeof value.pollingInterval === \"number\";\n }\n var defaultOptions = {\n polling: false,\n staticNetwork: null,\n batchStallTime: 10,\n batchMaxSize: 1 << 20,\n batchMaxCount: 100,\n cacheTimeout: 250,\n pollingInterval: 4e3\n };\n var JsonRpcSigner = class extends abstract_signer_js_1.AbstractSigner {\n address;\n constructor(provider, address) {\n super(provider);\n address = (0, index_js_2.getAddress)(address);\n (0, index_js_5.defineProperties)(this, { address });\n }\n connect(provider) {\n (0, index_js_5.assert)(false, \"cannot reconnect JsonRpcSigner\", \"UNSUPPORTED_OPERATION\", {\n operation: \"signer.connect\"\n });\n }\n async getAddress() {\n return this.address;\n }\n // JSON-RPC will automatially fill in nonce, etc. so we just check from\n async populateTransaction(tx) {\n return await this.populateCall(tx);\n }\n // Returns just the hash of the transaction after sent, which is what\n // the bare JSON-RPC API does;\n async sendUncheckedTransaction(_tx) {\n const tx = deepCopy(_tx);\n const promises = [];\n if (tx.from) {\n const _from = tx.from;\n promises.push((async () => {\n const from14 = await (0, index_js_2.resolveAddress)(_from, this.provider);\n (0, index_js_5.assertArgument)(from14 != null && from14.toLowerCase() === this.address.toLowerCase(), \"from address mismatch\", \"transaction\", _tx);\n tx.from = from14;\n })());\n } else {\n tx.from = this.address;\n }\n if (tx.gasLimit == null) {\n promises.push((async () => {\n tx.gasLimit = await this.provider.estimateGas({ ...tx, from: this.address });\n })());\n }\n if (tx.to != null) {\n const _to = tx.to;\n promises.push((async () => {\n tx.to = await (0, index_js_2.resolveAddress)(_to, this.provider);\n })());\n }\n if (promises.length) {\n await Promise.all(promises);\n }\n const hexTx = this.provider.getRpcTransaction(tx);\n return this.provider.send(\"eth_sendTransaction\", [hexTx]);\n }\n async sendTransaction(tx) {\n const blockNumber = await this.provider.getBlockNumber();\n const hash3 = await this.sendUncheckedTransaction(tx);\n return await new Promise((resolve, reject) => {\n const timeouts = [1e3, 100];\n let invalids = 0;\n const checkTx = async () => {\n try {\n const tx2 = await this.provider.getTransaction(hash3);\n if (tx2 != null) {\n resolve(tx2.replaceableTransaction(blockNumber));\n return;\n }\n } catch (error) {\n if ((0, index_js_5.isError)(error, \"CANCELLED\") || (0, index_js_5.isError)(error, \"BAD_DATA\") || (0, index_js_5.isError)(error, \"NETWORK_ERROR\") || (0, index_js_5.isError)(error, \"UNSUPPORTED_OPERATION\")) {\n if (error.info == null) {\n error.info = {};\n }\n error.info.sendTransactionHash = hash3;\n reject(error);\n return;\n }\n if ((0, index_js_5.isError)(error, \"INVALID_ARGUMENT\")) {\n invalids++;\n if (error.info == null) {\n error.info = {};\n }\n error.info.sendTransactionHash = hash3;\n if (invalids > 10) {\n reject(error);\n return;\n }\n }\n this.provider.emit(\"error\", (0, index_js_5.makeError)(\"failed to fetch transation after sending (will try again)\", \"UNKNOWN_ERROR\", { error }));\n }\n this.provider._setTimeout(() => {\n checkTx();\n }, timeouts.pop() || 4e3);\n };\n checkTx();\n });\n }\n async signTransaction(_tx) {\n const tx = deepCopy(_tx);\n if (tx.from) {\n const from14 = await (0, index_js_2.resolveAddress)(tx.from, this.provider);\n (0, index_js_5.assertArgument)(from14 != null && from14.toLowerCase() === this.address.toLowerCase(), \"from address mismatch\", \"transaction\", _tx);\n tx.from = from14;\n } else {\n tx.from = this.address;\n }\n const hexTx = this.provider.getRpcTransaction(tx);\n return await this.provider.send(\"eth_signTransaction\", [hexTx]);\n }\n async signMessage(_message) {\n const message = typeof _message === \"string\" ? (0, index_js_5.toUtf8Bytes)(_message) : _message;\n return await this.provider.send(\"personal_sign\", [\n (0, index_js_5.hexlify)(message),\n this.address.toLowerCase()\n ]);\n }\n async signTypedData(domain2, types, _value) {\n const value = deepCopy(_value);\n const populated = await index_js_3.TypedDataEncoder.resolveNames(domain2, types, value, async (value2) => {\n const address = await (0, index_js_2.resolveAddress)(value2);\n (0, index_js_5.assertArgument)(address != null, \"TypedData does not support null address\", \"value\", value2);\n return address;\n });\n return await this.provider.send(\"eth_signTypedData_v4\", [\n this.address.toLowerCase(),\n JSON.stringify(index_js_3.TypedDataEncoder.getPayload(populated.domain, types, populated.value))\n ]);\n }\n async unlock(password) {\n return this.provider.send(\"personal_unlockAccount\", [\n this.address.toLowerCase(),\n password,\n null\n ]);\n }\n // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign\n async _legacySignMessage(_message) {\n const message = typeof _message === \"string\" ? (0, index_js_5.toUtf8Bytes)(_message) : _message;\n return await this.provider.send(\"eth_sign\", [\n this.address.toLowerCase(),\n (0, index_js_5.hexlify)(message)\n ]);\n }\n };\n exports3.JsonRpcSigner = JsonRpcSigner;\n var JsonRpcApiProvider = class extends abstract_provider_js_1.AbstractProvider {\n #options;\n // The next ID to use for the JSON-RPC ID field\n #nextId;\n // Payloads are queued and triggered in batches using the drainTimer\n #payloads;\n #drainTimer;\n #notReady;\n #network;\n #pendingDetectNetwork;\n #scheduleDrain() {\n if (this.#drainTimer) {\n return;\n }\n const stallTime = this._getOption(\"batchMaxCount\") === 1 ? 0 : this._getOption(\"batchStallTime\");\n this.#drainTimer = setTimeout(() => {\n this.#drainTimer = null;\n const payloads = this.#payloads;\n this.#payloads = [];\n while (payloads.length) {\n const batch = [payloads.shift()];\n while (payloads.length) {\n if (batch.length === this.#options.batchMaxCount) {\n break;\n }\n batch.push(payloads.shift());\n const bytes = JSON.stringify(batch.map((p4) => p4.payload));\n if (bytes.length > this.#options.batchMaxSize) {\n payloads.unshift(batch.pop());\n break;\n }\n }\n (async () => {\n const payload = batch.length === 1 ? batch[0].payload : batch.map((p4) => p4.payload);\n this.emit(\"debug\", { action: \"sendRpcPayload\", payload });\n try {\n const result = await this._send(payload);\n this.emit(\"debug\", { action: \"receiveRpcResult\", result });\n for (const { resolve, reject, payload: payload2 } of batch) {\n if (this.destroyed) {\n reject((0, index_js_5.makeError)(\"provider destroyed; cancelled request\", \"UNSUPPORTED_OPERATION\", { operation: payload2.method }));\n continue;\n }\n const resp = result.filter((r2) => r2.id === payload2.id)[0];\n if (resp == null) {\n const error = (0, index_js_5.makeError)(\"missing response for request\", \"BAD_DATA\", {\n value: result,\n info: { payload: payload2 }\n });\n this.emit(\"error\", error);\n reject(error);\n continue;\n }\n if (\"error\" in resp) {\n reject(this.getRpcError(payload2, resp));\n continue;\n }\n resolve(resp.result);\n }\n } catch (error) {\n this.emit(\"debug\", { action: \"receiveRpcError\", error });\n for (const { reject } of batch) {\n reject(error);\n }\n }\n })();\n }\n }, stallTime);\n }\n constructor(network, options) {\n super(network, options);\n this.#nextId = 1;\n this.#options = Object.assign({}, defaultOptions, options || {});\n this.#payloads = [];\n this.#drainTimer = null;\n this.#network = null;\n this.#pendingDetectNetwork = null;\n {\n let resolve = null;\n const promise = new Promise((_resolve) => {\n resolve = _resolve;\n });\n this.#notReady = { promise, resolve };\n }\n const staticNetwork = this._getOption(\"staticNetwork\");\n if (typeof staticNetwork === \"boolean\") {\n (0, index_js_5.assertArgument)(!staticNetwork || network !== \"any\", \"staticNetwork cannot be used on special network 'any'\", \"options\", options);\n if (staticNetwork && network != null) {\n this.#network = network_js_1.Network.from(network);\n }\n } else if (staticNetwork) {\n (0, index_js_5.assertArgument)(network == null || staticNetwork.matches(network), \"staticNetwork MUST match network object\", \"options\", options);\n this.#network = staticNetwork;\n }\n }\n /**\n * Returns the value associated with the option %%key%%.\n *\n * Sub-classes can use this to inquire about configuration options.\n */\n _getOption(key) {\n return this.#options[key];\n }\n /**\n * Gets the [[Network]] this provider has committed to. On each call, the network\n * is detected, and if it has changed, the call will reject.\n */\n get _network() {\n (0, index_js_5.assert)(this.#network, \"network is not available yet\", \"NETWORK_ERROR\");\n return this.#network;\n }\n /**\n * Resolves to the non-normalized value by performing %%req%%.\n *\n * Sub-classes may override this to modify behavior of actions,\n * and should generally call ``super._perform`` as a fallback.\n */\n async _perform(req) {\n if (req.method === \"call\" || req.method === \"estimateGas\") {\n let tx = req.transaction;\n if (tx && tx.type != null && (0, index_js_5.getBigInt)(tx.type)) {\n if (tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null) {\n const feeData = await this.getFeeData();\n if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {\n req = Object.assign({}, req, {\n transaction: Object.assign({}, tx, { type: void 0 })\n });\n }\n }\n }\n }\n const request = this.getRpcRequest(req);\n if (request != null) {\n return await this.send(request.method, request.args);\n }\n return super._perform(req);\n }\n /**\n * Sub-classes may override this; it detects the *actual* network that\n * we are **currently** connected to.\n *\n * Keep in mind that [[send]] may only be used once [[ready]], otherwise the\n * _send primitive must be used instead.\n */\n async _detectNetwork() {\n const network = this._getOption(\"staticNetwork\");\n if (network) {\n if (network === true) {\n if (this.#network) {\n return this.#network;\n }\n } else {\n return network;\n }\n }\n if (this.#pendingDetectNetwork) {\n return await this.#pendingDetectNetwork;\n }\n if (this.ready) {\n this.#pendingDetectNetwork = (async () => {\n try {\n const result = network_js_1.Network.from((0, index_js_5.getBigInt)(await this.send(\"eth_chainId\", [])));\n this.#pendingDetectNetwork = null;\n return result;\n } catch (error) {\n this.#pendingDetectNetwork = null;\n throw error;\n }\n })();\n return await this.#pendingDetectNetwork;\n }\n this.#pendingDetectNetwork = (async () => {\n const payload = {\n id: this.#nextId++,\n method: \"eth_chainId\",\n params: [],\n jsonrpc: \"2.0\"\n };\n this.emit(\"debug\", { action: \"sendRpcPayload\", payload });\n let result;\n try {\n result = (await this._send(payload))[0];\n this.#pendingDetectNetwork = null;\n } catch (error) {\n this.#pendingDetectNetwork = null;\n this.emit(\"debug\", { action: \"receiveRpcError\", error });\n throw error;\n }\n this.emit(\"debug\", { action: \"receiveRpcResult\", result });\n if (\"result\" in result) {\n return network_js_1.Network.from((0, index_js_5.getBigInt)(result.result));\n }\n throw this.getRpcError(payload, result);\n })();\n return await this.#pendingDetectNetwork;\n }\n /**\n * Sub-classes **MUST** call this. Until [[_start]] has been called, no calls\n * will be passed to [[_send]] from [[send]]. If it is overridden, then\n * ``super._start()`` **MUST** be called.\n *\n * Calling it multiple times is safe and has no effect.\n */\n _start() {\n if (this.#notReady == null || this.#notReady.resolve == null) {\n return;\n }\n this.#notReady.resolve();\n this.#notReady = null;\n (async () => {\n while (this.#network == null && !this.destroyed) {\n try {\n this.#network = await this._detectNetwork();\n } catch (error) {\n if (this.destroyed) {\n break;\n }\n console.log(\"JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)\");\n this.emit(\"error\", (0, index_js_5.makeError)(\"failed to bootstrap network detection\", \"NETWORK_ERROR\", { event: \"initial-network-discovery\", info: { error } }));\n await stall(1e3);\n }\n }\n this.#scheduleDrain();\n })();\n }\n /**\n * Resolves once the [[_start]] has been called. This can be used in\n * sub-classes to defer sending data until the connection has been\n * established.\n */\n async _waitUntilReady() {\n if (this.#notReady == null) {\n return;\n }\n return await this.#notReady.promise;\n }\n /**\n * Return a Subscriber that will manage the %%sub%%.\n *\n * Sub-classes may override this to modify the behavior of\n * subscription management.\n */\n _getSubscriber(sub) {\n if (sub.type === \"pending\") {\n return new subscriber_filterid_js_1.FilterIdPendingSubscriber(this);\n }\n if (sub.type === \"event\") {\n if (this._getOption(\"polling\")) {\n return new subscriber_polling_js_1.PollingEventSubscriber(this, sub.filter);\n }\n return new subscriber_filterid_js_1.FilterIdEventSubscriber(this, sub.filter);\n }\n if (sub.type === \"orphan\" && sub.filter.orphan === \"drop-log\") {\n return new abstract_provider_js_1.UnmanagedSubscriber(\"orphan\");\n }\n return super._getSubscriber(sub);\n }\n /**\n * Returns true only if the [[_start]] has been called.\n */\n get ready() {\n return this.#notReady == null;\n }\n /**\n * Returns %%tx%% as a normalized JSON-RPC transaction request,\n * which has all values hexlified and any numeric values converted\n * to Quantity values.\n */\n getRpcTransaction(tx) {\n const result = {};\n [\"chainId\", \"gasLimit\", \"gasPrice\", \"type\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"value\"].forEach((key) => {\n if (tx[key] == null) {\n return;\n }\n let dstKey = key;\n if (key === \"gasLimit\") {\n dstKey = \"gas\";\n }\n result[dstKey] = (0, index_js_5.toQuantity)((0, index_js_5.getBigInt)(tx[key], `tx.${key}`));\n });\n [\"from\", \"to\", \"data\"].forEach((key) => {\n if (tx[key] == null) {\n return;\n }\n result[key] = (0, index_js_5.hexlify)(tx[key]);\n });\n if (tx.accessList) {\n result[\"accessList\"] = (0, index_js_4.accessListify)(tx.accessList);\n }\n if (tx.blobVersionedHashes) {\n result[\"blobVersionedHashes\"] = tx.blobVersionedHashes.map((h4) => h4.toLowerCase());\n }\n if (tx.authorizationList) {\n result[\"authorizationList\"] = tx.authorizationList.map((_a) => {\n const a3 = (0, index_js_4.authorizationify)(_a);\n return {\n address: a3.address,\n nonce: (0, index_js_5.toQuantity)(a3.nonce),\n chainId: (0, index_js_5.toQuantity)(a3.chainId),\n yParity: (0, index_js_5.toQuantity)(a3.signature.yParity),\n r: (0, index_js_5.toQuantity)(a3.signature.r),\n s: (0, index_js_5.toQuantity)(a3.signature.s)\n };\n });\n }\n return result;\n }\n /**\n * Returns the request method and arguments required to perform\n * %%req%%.\n */\n getRpcRequest(req) {\n switch (req.method) {\n case \"chainId\":\n return { method: \"eth_chainId\", args: [] };\n case \"getBlockNumber\":\n return { method: \"eth_blockNumber\", args: [] };\n case \"getGasPrice\":\n return { method: \"eth_gasPrice\", args: [] };\n case \"getPriorityFee\":\n return { method: \"eth_maxPriorityFeePerGas\", args: [] };\n case \"getBalance\":\n return {\n method: \"eth_getBalance\",\n args: [getLowerCase(req.address), req.blockTag]\n };\n case \"getTransactionCount\":\n return {\n method: \"eth_getTransactionCount\",\n args: [getLowerCase(req.address), req.blockTag]\n };\n case \"getCode\":\n return {\n method: \"eth_getCode\",\n args: [getLowerCase(req.address), req.blockTag]\n };\n case \"getStorage\":\n return {\n method: \"eth_getStorageAt\",\n args: [\n getLowerCase(req.address),\n \"0x\" + req.position.toString(16),\n req.blockTag\n ]\n };\n case \"broadcastTransaction\":\n return {\n method: \"eth_sendRawTransaction\",\n args: [req.signedTransaction]\n };\n case \"getBlock\":\n if (\"blockTag\" in req) {\n return {\n method: \"eth_getBlockByNumber\",\n args: [req.blockTag, !!req.includeTransactions]\n };\n } else if (\"blockHash\" in req) {\n return {\n method: \"eth_getBlockByHash\",\n args: [req.blockHash, !!req.includeTransactions]\n };\n }\n break;\n case \"getTransaction\":\n return {\n method: \"eth_getTransactionByHash\",\n args: [req.hash]\n };\n case \"getTransactionReceipt\":\n return {\n method: \"eth_getTransactionReceipt\",\n args: [req.hash]\n };\n case \"call\":\n return {\n method: \"eth_call\",\n args: [this.getRpcTransaction(req.transaction), req.blockTag]\n };\n case \"estimateGas\": {\n return {\n method: \"eth_estimateGas\",\n args: [this.getRpcTransaction(req.transaction)]\n };\n }\n case \"getLogs\":\n if (req.filter && req.filter.address != null) {\n if (Array.isArray(req.filter.address)) {\n req.filter.address = req.filter.address.map(getLowerCase);\n } else {\n req.filter.address = getLowerCase(req.filter.address);\n }\n }\n return { method: \"eth_getLogs\", args: [req.filter] };\n }\n return null;\n }\n /**\n * Returns an ethers-style Error for the given JSON-RPC error\n * %%payload%%, coalescing the various strings and error shapes\n * that different nodes return, coercing them into a machine-readable\n * standardized error.\n */\n getRpcError(payload, _error) {\n const { method } = payload;\n const { error } = _error;\n if (method === \"eth_estimateGas\" && error.message) {\n const msg = error.message;\n if (!msg.match(/revert/i) && msg.match(/insufficient funds/i)) {\n return (0, index_js_5.makeError)(\"insufficient funds\", \"INSUFFICIENT_FUNDS\", {\n transaction: payload.params[0],\n info: { payload, error }\n });\n } else if (msg.match(/nonce/i) && msg.match(/too low/i)) {\n return (0, index_js_5.makeError)(\"nonce has already been used\", \"NONCE_EXPIRED\", {\n transaction: payload.params[0],\n info: { payload, error }\n });\n }\n }\n if (method === \"eth_call\" || method === \"eth_estimateGas\") {\n const result = spelunkData(error);\n const e2 = index_js_1.AbiCoder.getBuiltinCallException(method === \"eth_call\" ? \"call\" : \"estimateGas\", payload.params[0], result ? result.data : null);\n e2.info = { error, payload };\n return e2;\n }\n const message = JSON.stringify(spelunkMessage(error));\n if (typeof error.message === \"string\" && error.message.match(/user denied|ethers-user-denied/i)) {\n const actionMap = {\n eth_sign: \"signMessage\",\n personal_sign: \"signMessage\",\n eth_signTypedData_v4: \"signTypedData\",\n eth_signTransaction: \"signTransaction\",\n eth_sendTransaction: \"sendTransaction\",\n eth_requestAccounts: \"requestAccess\",\n wallet_requestAccounts: \"requestAccess\"\n };\n return (0, index_js_5.makeError)(`user rejected action`, \"ACTION_REJECTED\", {\n action: actionMap[method] || \"unknown\",\n reason: \"rejected\",\n info: { payload, error }\n });\n }\n if (method === \"eth_sendRawTransaction\" || method === \"eth_sendTransaction\") {\n const transaction = payload.params[0];\n if (message.match(/insufficient funds|base fee exceeds gas limit/i)) {\n return (0, index_js_5.makeError)(\"insufficient funds for intrinsic transaction cost\", \"INSUFFICIENT_FUNDS\", {\n transaction,\n info: { error }\n });\n }\n if (message.match(/nonce/i) && message.match(/too low/i)) {\n return (0, index_js_5.makeError)(\"nonce has already been used\", \"NONCE_EXPIRED\", { transaction, info: { error } });\n }\n if (message.match(/replacement transaction/i) && message.match(/underpriced/i)) {\n return (0, index_js_5.makeError)(\"replacement fee too low\", \"REPLACEMENT_UNDERPRICED\", { transaction, info: { error } });\n }\n if (message.match(/only replay-protected/i)) {\n return (0, index_js_5.makeError)(\"legacy pre-eip-155 transactions not supported\", \"UNSUPPORTED_OPERATION\", {\n operation: method,\n info: { transaction, info: { error } }\n });\n }\n }\n let unsupported = !!message.match(/the method .* does not exist/i);\n if (!unsupported) {\n if (error && error.details && error.details.startsWith(\"Unauthorized method:\")) {\n unsupported = true;\n }\n }\n if (unsupported) {\n return (0, index_js_5.makeError)(\"unsupported operation\", \"UNSUPPORTED_OPERATION\", {\n operation: payload.method,\n info: { error, payload }\n });\n }\n return (0, index_js_5.makeError)(\"could not coalesce error\", \"UNKNOWN_ERROR\", { error, payload });\n }\n /**\n * Requests the %%method%% with %%params%% via the JSON-RPC protocol\n * over the underlying channel. This can be used to call methods\n * on the backend that do not have a high-level API within the Provider\n * API.\n *\n * This method queues requests according to the batch constraints\n * in the options, assigns the request a unique ID.\n *\n * **Do NOT override** this method in sub-classes; instead\n * override [[_send]] or force the options values in the\n * call to the constructor to modify this method's behavior.\n */\n send(method, params) {\n if (this.destroyed) {\n return Promise.reject((0, index_js_5.makeError)(\"provider destroyed; cancelled request\", \"UNSUPPORTED_OPERATION\", { operation: method }));\n }\n const id = this.#nextId++;\n const promise = new Promise((resolve, reject) => {\n this.#payloads.push({\n resolve,\n reject,\n payload: { method, params, id, jsonrpc: \"2.0\" }\n });\n });\n this.#scheduleDrain();\n return promise;\n }\n /**\n * Resolves to the [[Signer]] account for %%address%% managed by\n * the client.\n *\n * If the %%address%% is a number, it is used as an index in the\n * the accounts from [[listAccounts]].\n *\n * This can only be used on clients which manage accounts (such as\n * Geth with imported account or MetaMask).\n *\n * Throws if the account doesn't exist.\n */\n async getSigner(address) {\n if (address == null) {\n address = 0;\n }\n const accountsPromise = this.send(\"eth_accounts\", []);\n if (typeof address === \"number\") {\n const accounts2 = await accountsPromise;\n if (address >= accounts2.length) {\n throw new Error(\"no such account\");\n }\n return new JsonRpcSigner(this, accounts2[address]);\n }\n const { accounts } = await (0, index_js_5.resolveProperties)({\n network: this.getNetwork(),\n accounts: accountsPromise\n });\n address = (0, index_js_2.getAddress)(address);\n for (const account of accounts) {\n if ((0, index_js_2.getAddress)(account) === address) {\n return new JsonRpcSigner(this, address);\n }\n }\n throw new Error(\"invalid account\");\n }\n async listAccounts() {\n const accounts = await this.send(\"eth_accounts\", []);\n return accounts.map((a3) => new JsonRpcSigner(this, a3));\n }\n destroy() {\n if (this.#drainTimer) {\n clearTimeout(this.#drainTimer);\n this.#drainTimer = null;\n }\n for (const { payload, reject } of this.#payloads) {\n reject((0, index_js_5.makeError)(\"provider destroyed; cancelled request\", \"UNSUPPORTED_OPERATION\", { operation: payload.method }));\n }\n this.#payloads = [];\n super.destroy();\n }\n };\n exports3.JsonRpcApiProvider = JsonRpcApiProvider;\n var JsonRpcApiPollingProvider = class extends JsonRpcApiProvider {\n #pollingInterval;\n constructor(network, options) {\n super(network, options);\n let pollingInterval = this._getOption(\"pollingInterval\");\n if (pollingInterval == null) {\n pollingInterval = defaultOptions.pollingInterval;\n }\n this.#pollingInterval = pollingInterval;\n }\n _getSubscriber(sub) {\n const subscriber = super._getSubscriber(sub);\n if (isPollable(subscriber)) {\n subscriber.pollingInterval = this.#pollingInterval;\n }\n return subscriber;\n }\n /**\n * The polling interval (default: 4000 ms)\n */\n get pollingInterval() {\n return this.#pollingInterval;\n }\n set pollingInterval(value) {\n if (!Number.isInteger(value) || value < 0) {\n throw new Error(\"invalid interval\");\n }\n this.#pollingInterval = value;\n this._forEachSubscriber((sub) => {\n if (isPollable(sub)) {\n sub.pollingInterval = this.#pollingInterval;\n }\n });\n }\n };\n exports3.JsonRpcApiPollingProvider = JsonRpcApiPollingProvider;\n var JsonRpcProvider = class extends JsonRpcApiPollingProvider {\n #connect;\n constructor(url, network, options) {\n if (url == null) {\n url = \"http://localhost:8545\";\n }\n super(network, options);\n if (typeof url === \"string\") {\n this.#connect = new index_js_5.FetchRequest(url);\n } else {\n this.#connect = url.clone();\n }\n }\n _getConnection() {\n return this.#connect.clone();\n }\n async send(method, params) {\n await this._start();\n return await super.send(method, params);\n }\n async _send(payload) {\n const request = this._getConnection();\n request.body = JSON.stringify(payload);\n request.setHeader(\"content-type\", \"application/json\");\n const response = await request.send();\n response.assertOk();\n let resp = response.bodyJson;\n if (!Array.isArray(resp)) {\n resp = [resp];\n }\n return resp;\n }\n };\n exports3.JsonRpcProvider = JsonRpcProvider;\n function spelunkData(value) {\n if (value == null) {\n return null;\n }\n if (typeof value.message === \"string\" && value.message.match(/revert/i) && (0, index_js_5.isHexString)(value.data)) {\n return { message: value.message, data: value.data };\n }\n if (typeof value === \"object\") {\n for (const key in value) {\n const result = spelunkData(value[key]);\n if (result) {\n return result;\n }\n }\n return null;\n }\n if (typeof value === \"string\") {\n try {\n return spelunkData(JSON.parse(value));\n } catch (error) {\n }\n }\n return null;\n }\n function _spelunkMessage(value, result) {\n if (value == null) {\n return;\n }\n if (typeof value.message === \"string\") {\n result.push(value.message);\n }\n if (typeof value === \"object\") {\n for (const key in value) {\n _spelunkMessage(value[key], result);\n }\n }\n if (typeof value === \"string\") {\n try {\n return _spelunkMessage(JSON.parse(value), result);\n } catch (error) {\n }\n }\n }\n function spelunkMessage(value) {\n const result = [];\n _spelunkMessage(value, result);\n return result;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-ankr.js\n var require_provider_ankr = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-ankr.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AnkrProvider = void 0;\n var index_js_1 = require_utils8();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var defaultApiKey = \"9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"rpc.ankr.com/eth\";\n case \"goerli\":\n return \"rpc.ankr.com/eth_goerli\";\n case \"sepolia\":\n return \"rpc.ankr.com/eth_sepolia\";\n case \"arbitrum\":\n return \"rpc.ankr.com/arbitrum\";\n case \"base\":\n return \"rpc.ankr.com/base\";\n case \"base-goerli\":\n return \"rpc.ankr.com/base_goerli\";\n case \"base-sepolia\":\n return \"rpc.ankr.com/base_sepolia\";\n case \"bnb\":\n return \"rpc.ankr.com/bsc\";\n case \"bnbt\":\n return \"rpc.ankr.com/bsc_testnet_chapel\";\n case \"matic\":\n return \"rpc.ankr.com/polygon\";\n case \"matic-mumbai\":\n return \"rpc.ankr.com/polygon_mumbai\";\n case \"optimism\":\n return \"rpc.ankr.com/optimism\";\n case \"optimism-goerli\":\n return \"rpc.ankr.com/optimism_testnet\";\n case \"optimism-sepolia\":\n return \"rpc.ankr.com/optimism_sepolia\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var AnkrProvider = class _AnkrProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The API key for the Ankr connection.\n */\n apiKey;\n /**\n * Create a new **AnkrProvider**.\n *\n * By default connecting to ``mainnet`` with a highly throttled\n * API key.\n */\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const options = { polling: true, staticNetwork: network };\n const request = _AnkrProvider.getRequest(network, apiKey);\n super(request, network, options);\n (0, index_js_1.defineProperties)(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new _AnkrProvider(chainId, this.apiKey);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n /**\n * Returns a prepared request for connecting to %%network%% with\n * %%apiKey%%.\n */\n static getRequest(network, apiKey) {\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/${apiKey}`);\n request.allowGzip = true;\n if (apiKey === defaultApiKey) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"AnkrProvider\");\n return true;\n };\n }\n return request;\n }\n getRpcError(payload, error) {\n if (payload.method === \"eth_sendRawTransaction\") {\n if (error && error.error && error.error.message === \"INTERNAL_ERROR: could not replace existing tx\") {\n error.error.message = \"replacement transaction underpriced\";\n }\n }\n return super.getRpcError(payload, error);\n }\n isCommunityResource() {\n return this.apiKey === defaultApiKey;\n }\n };\n exports3.AnkrProvider = AnkrProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-alchemy.js\n var require_provider_alchemy = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-alchemy.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AlchemyProvider = void 0;\n var index_js_1 = require_utils8();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var defaultApiKey = \"_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"eth-mainnet.alchemyapi.io\";\n case \"goerli\":\n return \"eth-goerli.g.alchemy.com\";\n case \"sepolia\":\n return \"eth-sepolia.g.alchemy.com\";\n case \"arbitrum\":\n return \"arb-mainnet.g.alchemy.com\";\n case \"arbitrum-goerli\":\n return \"arb-goerli.g.alchemy.com\";\n case \"arbitrum-sepolia\":\n return \"arb-sepolia.g.alchemy.com\";\n case \"base\":\n return \"base-mainnet.g.alchemy.com\";\n case \"base-goerli\":\n return \"base-goerli.g.alchemy.com\";\n case \"base-sepolia\":\n return \"base-sepolia.g.alchemy.com\";\n case \"matic\":\n return \"polygon-mainnet.g.alchemy.com\";\n case \"matic-amoy\":\n return \"polygon-amoy.g.alchemy.com\";\n case \"matic-mumbai\":\n return \"polygon-mumbai.g.alchemy.com\";\n case \"optimism\":\n return \"opt-mainnet.g.alchemy.com\";\n case \"optimism-goerli\":\n return \"opt-goerli.g.alchemy.com\";\n case \"optimism-sepolia\":\n return \"opt-sepolia.g.alchemy.com\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var AlchemyProvider = class _AlchemyProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n apiKey;\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const request = _AlchemyProvider.getRequest(network, apiKey);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new _AlchemyProvider(chainId, this.apiKey);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n async _perform(req) {\n if (req.method === \"getTransactionResult\") {\n const { trace, tx } = await (0, index_js_1.resolveProperties)({\n trace: this.send(\"trace_transaction\", [req.hash]),\n tx: this.getTransaction(req.hash)\n });\n if (trace == null || tx == null) {\n return null;\n }\n let data;\n let error = false;\n try {\n data = trace[0].result.output;\n error = trace[0].error === \"Reverted\";\n } catch (error2) {\n }\n if (data) {\n (0, index_js_1.assert)(!error, \"an error occurred during transaction executions\", \"CALL_EXCEPTION\", {\n action: \"getTransactionResult\",\n data,\n reason: null,\n transaction: tx,\n invocation: null,\n revert: null\n // @TODO\n });\n return data;\n }\n (0, index_js_1.assert)(false, \"could not parse trace result\", \"BAD_DATA\", { value: trace });\n }\n return await super._perform(req);\n }\n isCommunityResource() {\n return this.apiKey === defaultApiKey;\n }\n static getRequest(network, apiKey) {\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/v2/${apiKey}`);\n request.allowGzip = true;\n if (apiKey === defaultApiKey) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"alchemy\");\n return true;\n };\n }\n return request;\n }\n };\n exports3.AlchemyProvider = AlchemyProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-chainstack.js\n var require_provider_chainstack = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-chainstack.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ChainstackProvider = void 0;\n var index_js_1 = require_utils8();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n function getApiKey(name) {\n switch (name) {\n case \"mainnet\":\n return \"39f1d67cedf8b7831010a665328c9197\";\n case \"arbitrum\":\n return \"0550c209db33c3abf4cc927e1e18cea1\";\n case \"bnb\":\n return \"98b5a77e531614387366f6fc5da097f8\";\n case \"matic\":\n return \"cd9d4d70377471aa7c142ec4a4205249\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"ethereum-mainnet.core.chainstack.com\";\n case \"arbitrum\":\n return \"arbitrum-mainnet.core.chainstack.com\";\n case \"bnb\":\n return \"bsc-mainnet.core.chainstack.com\";\n case \"matic\":\n return \"polygon-mainnet.core.chainstack.com\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var ChainstackProvider = class _ChainstackProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The API key for the Chainstack connection.\n */\n apiKey;\n /**\n * Creates a new **ChainstackProvider**.\n */\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (apiKey == null) {\n apiKey = getApiKey(network.name);\n }\n const request = _ChainstackProvider.getRequest(network, apiKey);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new _ChainstackProvider(chainId, this.apiKey);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return this.apiKey === getApiKey(this._network.name);\n }\n /**\n * Returns a prepared request for connecting to %%network%%\n * with %%apiKey%% and %%projectSecret%%.\n */\n static getRequest(network, apiKey) {\n if (apiKey == null) {\n apiKey = getApiKey(network.name);\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/${apiKey}`);\n request.allowGzip = true;\n if (apiKey === getApiKey(network.name)) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"ChainstackProvider\");\n return true;\n };\n }\n return request;\n }\n };\n exports3.ChainstackProvider = ChainstackProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-cloudflare.js\n var require_provider_cloudflare = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-cloudflare.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CloudflareProvider = void 0;\n var index_js_1 = require_utils8();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var CloudflareProvider = class extends provider_jsonrpc_js_1.JsonRpcProvider {\n constructor(_network) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n (0, index_js_1.assertArgument)(network.name === \"mainnet\", \"unsupported network\", \"network\", _network);\n super(\"https://cloudflare-eth.com/\", network, { staticNetwork: network });\n }\n };\n exports3.CloudflareProvider = CloudflareProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-etherscan.js\n var require_provider_etherscan = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-etherscan.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EtherscanProvider = exports3.EtherscanPlugin = void 0;\n var index_js_1 = require_abi();\n var index_js_2 = require_contract2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n var abstract_provider_js_1 = require_abstract_provider();\n var network_js_1 = require_network();\n var plugins_network_js_1 = require_plugins_network();\n var community_js_1 = require_community();\n var THROTTLE = 2e3;\n function isPromise(value) {\n return value && typeof value.then === \"function\";\n }\n var EtherscanPluginId = \"org.ethers.plugins.provider.Etherscan\";\n var EtherscanPlugin = class _EtherscanPlugin extends plugins_network_js_1.NetworkPlugin {\n /**\n * The Etherscan API base URL.\n */\n baseUrl;\n /**\n * Creates a new **EtherscanProvider** which will use\n * %%baseUrl%%.\n */\n constructor(baseUrl) {\n super(EtherscanPluginId);\n (0, index_js_4.defineProperties)(this, { baseUrl });\n }\n clone() {\n return new _EtherscanPlugin(this.baseUrl);\n }\n };\n exports3.EtherscanPlugin = EtherscanPlugin;\n var skipKeys = [\"enableCcipRead\"];\n var nextId = 1;\n var EtherscanProvider = class extends abstract_provider_js_1.AbstractProvider {\n /**\n * The connected network.\n */\n network;\n /**\n * The API key or null if using the community provided bandwidth.\n */\n apiKey;\n #plugin;\n /**\n * Creates a new **EtherscanBaseProvider**.\n */\n constructor(_network, _apiKey) {\n const apiKey = _apiKey != null ? _apiKey : null;\n super();\n const network = network_js_1.Network.from(_network);\n this.#plugin = network.getPlugin(EtherscanPluginId);\n (0, index_js_4.defineProperties)(this, { apiKey, network });\n }\n /**\n * Returns the base URL.\n *\n * If an [[EtherscanPlugin]] is configured on the\n * [[EtherscanBaseProvider_network]], returns the plugin's\n * baseUrl.\n *\n * Deprecated; for Etherscan v2 the base is no longer a simply\n * host, but instead a URL including a chainId parameter. Changing\n * this to return a URL prefix could break some libraries, so it\n * is left intact but will be removed in the future as it is unused.\n */\n getBaseUrl() {\n if (this.#plugin) {\n return this.#plugin.baseUrl;\n }\n switch (this.network.name) {\n case \"mainnet\":\n return \"https://api.etherscan.io\";\n case \"goerli\":\n return \"https://api-goerli.etherscan.io\";\n case \"sepolia\":\n return \"https://api-sepolia.etherscan.io\";\n case \"holesky\":\n return \"https://api-holesky.etherscan.io\";\n case \"arbitrum\":\n return \"https://api.arbiscan.io\";\n case \"arbitrum-goerli\":\n return \"https://api-goerli.arbiscan.io\";\n case \"base\":\n return \"https://api.basescan.org\";\n case \"base-sepolia\":\n return \"https://api-sepolia.basescan.org\";\n case \"bnb\":\n return \"https://api.bscscan.com\";\n case \"bnbt\":\n return \"https://api-testnet.bscscan.com\";\n case \"matic\":\n return \"https://api.polygonscan.com\";\n case \"matic-amoy\":\n return \"https://api-amoy.polygonscan.com\";\n case \"matic-mumbai\":\n return \"https://api-testnet.polygonscan.com\";\n case \"optimism\":\n return \"https://api-optimistic.etherscan.io\";\n case \"optimism-goerli\":\n return \"https://api-goerli-optimistic.etherscan.io\";\n default:\n }\n (0, index_js_4.assertArgument)(false, \"unsupported network\", \"network\", this.network);\n }\n /**\n * Returns the URL for the %%module%% and %%params%%.\n */\n getUrl(module2, params) {\n let query = Object.keys(params).reduce((accum, key) => {\n const value = params[key];\n if (value != null) {\n accum += `&${key}=${value}`;\n }\n return accum;\n }, \"\");\n if (this.apiKey) {\n query += `&apikey=${this.apiKey}`;\n }\n return `https://api.etherscan.io/v2/api?chainid=${this.network.chainId}&module=${module2}${query}`;\n }\n /**\n * Returns the URL for using POST requests.\n */\n getPostUrl() {\n return `https://api.etherscan.io/v2/api?chainid=${this.network.chainId}`;\n }\n /**\n * Returns the parameters for using POST requests.\n */\n getPostData(module2, params) {\n params.module = module2;\n params.apikey = this.apiKey;\n params.chainid = this.network.chainId;\n return params;\n }\n async detectNetwork() {\n return this.network;\n }\n /**\n * Resolves to the result of calling %%module%% with %%params%%.\n *\n * If %%post%%, the request is made as a POST request.\n */\n async fetch(module2, params, post) {\n const id = nextId++;\n const url = post ? this.getPostUrl() : this.getUrl(module2, params);\n const payload = post ? this.getPostData(module2, params) : null;\n this.emit(\"debug\", { action: \"sendRequest\", id, url, payload });\n const request = new index_js_4.FetchRequest(url);\n request.setThrottleParams({ slotInterval: 1e3 });\n request.retryFunc = (req, resp, attempt) => {\n if (this.isCommunityResource()) {\n (0, community_js_1.showThrottleMessage)(\"Etherscan\");\n }\n return Promise.resolve(true);\n };\n request.processFunc = async (request2, response2) => {\n const result2 = response2.hasBody() ? JSON.parse((0, index_js_4.toUtf8String)(response2.body)) : {};\n const throttle = (typeof result2.result === \"string\" ? result2.result : \"\").toLowerCase().indexOf(\"rate limit\") >= 0;\n if (module2 === \"proxy\") {\n if (result2 && result2.status == 0 && result2.message == \"NOTOK\" && throttle) {\n this.emit(\"debug\", { action: \"receiveError\", id, reason: \"proxy-NOTOK\", error: result2 });\n response2.throwThrottleError(result2.result, THROTTLE);\n }\n } else {\n if (throttle) {\n this.emit(\"debug\", { action: \"receiveError\", id, reason: \"null result\", error: result2.result });\n response2.throwThrottleError(result2.result, THROTTLE);\n }\n }\n return response2;\n };\n if (payload) {\n request.setHeader(\"content-type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n request.body = Object.keys(payload).map((k4) => `${k4}=${payload[k4]}`).join(\"&\");\n }\n const response = await request.send();\n try {\n response.assertOk();\n } catch (error) {\n this.emit(\"debug\", { action: \"receiveError\", id, error, reason: \"assertOk\" });\n (0, index_js_4.assert)(false, \"response error\", \"SERVER_ERROR\", { request, response });\n }\n if (!response.hasBody()) {\n this.emit(\"debug\", { action: \"receiveError\", id, error: \"missing body\", reason: \"null body\" });\n (0, index_js_4.assert)(false, \"missing response\", \"SERVER_ERROR\", { request, response });\n }\n const result = JSON.parse((0, index_js_4.toUtf8String)(response.body));\n if (module2 === \"proxy\") {\n if (result.jsonrpc != \"2.0\") {\n this.emit(\"debug\", { action: \"receiveError\", id, result, reason: \"invalid JSON-RPC\" });\n (0, index_js_4.assert)(false, \"invalid JSON-RPC response (missing jsonrpc='2.0')\", \"SERVER_ERROR\", { request, response, info: { result } });\n }\n if (result.error) {\n this.emit(\"debug\", { action: \"receiveError\", id, result, reason: \"JSON-RPC error\" });\n (0, index_js_4.assert)(false, \"error response\", \"SERVER_ERROR\", { request, response, info: { result } });\n }\n this.emit(\"debug\", { action: \"receiveRequest\", id, result });\n return result.result;\n } else {\n if (result.status == 0 && (result.message === \"No records found\" || result.message === \"No transactions found\")) {\n this.emit(\"debug\", { action: \"receiveRequest\", id, result });\n return result.result;\n }\n if (result.status != 1 || typeof result.message === \"string\" && !result.message.match(/^OK/)) {\n this.emit(\"debug\", { action: \"receiveError\", id, result });\n (0, index_js_4.assert)(false, \"error response\", \"SERVER_ERROR\", { request, response, info: { result } });\n }\n this.emit(\"debug\", { action: \"receiveRequest\", id, result });\n return result.result;\n }\n }\n /**\n * Returns %%transaction%% normalized for the Etherscan API.\n */\n _getTransactionPostData(transaction) {\n const result = {};\n for (let key in transaction) {\n if (skipKeys.indexOf(key) >= 0) {\n continue;\n }\n if (transaction[key] == null) {\n continue;\n }\n let value = transaction[key];\n if (key === \"type\" && value === 0) {\n continue;\n }\n if (key === \"blockTag\" && value === \"latest\") {\n continue;\n }\n if ({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true }[key]) {\n value = (0, index_js_4.toQuantity)(value);\n } else if (key === \"accessList\") {\n value = \"[\" + (0, index_js_3.accessListify)(value).map((set) => {\n return `{address:\"${set.address}\",storageKeys:[\"${set.storageKeys.join('\",\"')}\"]}`;\n }).join(\",\") + \"]\";\n } else if (key === \"blobVersionedHashes\") {\n if (value.length === 0) {\n continue;\n }\n (0, index_js_4.assert)(false, \"Etherscan API does not support blobVersionedHashes\", \"UNSUPPORTED_OPERATION\", {\n operation: \"_getTransactionPostData\",\n info: { transaction }\n });\n } else {\n value = (0, index_js_4.hexlify)(value);\n }\n result[key] = value;\n }\n return result;\n }\n /**\n * Throws the normalized Etherscan error.\n */\n _checkError(req, error, transaction) {\n let message = \"\";\n if ((0, index_js_4.isError)(error, \"SERVER_ERROR\")) {\n try {\n message = error.info.result.error.message;\n } catch (e2) {\n }\n if (!message) {\n try {\n message = error.info.message;\n } catch (e2) {\n }\n }\n }\n if (req.method === \"estimateGas\") {\n if (!message.match(/revert/i) && message.match(/insufficient funds/i)) {\n (0, index_js_4.assert)(false, \"insufficient funds\", \"INSUFFICIENT_FUNDS\", {\n transaction: req.transaction\n });\n }\n }\n if (req.method === \"call\" || req.method === \"estimateGas\") {\n if (message.match(/execution reverted/i)) {\n let data = \"\";\n try {\n data = error.info.result.error.data;\n } catch (error2) {\n }\n const e2 = index_js_1.AbiCoder.getBuiltinCallException(req.method, req.transaction, data);\n e2.info = { request: req, error };\n throw e2;\n }\n }\n if (message) {\n if (req.method === \"broadcastTransaction\") {\n const transaction2 = index_js_3.Transaction.from(req.signedTransaction);\n if (message.match(/replacement/i) && message.match(/underpriced/i)) {\n (0, index_js_4.assert)(false, \"replacement fee too low\", \"REPLACEMENT_UNDERPRICED\", {\n transaction: transaction2\n });\n }\n if (message.match(/insufficient funds/)) {\n (0, index_js_4.assert)(false, \"insufficient funds for intrinsic transaction cost\", \"INSUFFICIENT_FUNDS\", {\n transaction: transaction2\n });\n }\n if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) {\n (0, index_js_4.assert)(false, \"nonce has already been used\", \"NONCE_EXPIRED\", {\n transaction: transaction2\n });\n }\n }\n }\n throw error;\n }\n async _detectNetwork() {\n return this.network;\n }\n async _perform(req) {\n switch (req.method) {\n case \"chainId\":\n return this.network.chainId;\n case \"getBlockNumber\":\n return this.fetch(\"proxy\", { action: \"eth_blockNumber\" });\n case \"getGasPrice\":\n return this.fetch(\"proxy\", { action: \"eth_gasPrice\" });\n case \"getPriorityFee\":\n if (this.network.name === \"mainnet\") {\n return \"1000000000\";\n } else if (this.network.name === \"optimism\") {\n return \"1000000\";\n } else {\n throw new Error(\"fallback onto the AbstractProvider default\");\n }\n case \"getBalance\":\n return this.fetch(\"account\", {\n action: \"balance\",\n address: req.address,\n tag: req.blockTag\n });\n case \"getTransactionCount\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionCount\",\n address: req.address,\n tag: req.blockTag\n });\n case \"getCode\":\n return this.fetch(\"proxy\", {\n action: \"eth_getCode\",\n address: req.address,\n tag: req.blockTag\n });\n case \"getStorage\":\n return this.fetch(\"proxy\", {\n action: \"eth_getStorageAt\",\n address: req.address,\n position: req.position,\n tag: req.blockTag\n });\n case \"broadcastTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_sendRawTransaction\",\n hex: req.signedTransaction\n }, true).catch((error) => {\n return this._checkError(req, error, req.signedTransaction);\n });\n case \"getBlock\":\n if (\"blockTag\" in req) {\n return this.fetch(\"proxy\", {\n action: \"eth_getBlockByNumber\",\n tag: req.blockTag,\n boolean: req.includeTransactions ? \"true\" : \"false\"\n });\n }\n (0, index_js_4.assert)(false, \"getBlock by blockHash not supported by Etherscan\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getBlock(blockHash)\"\n });\n case \"getTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionByHash\",\n txhash: req.hash\n });\n case \"getTransactionReceipt\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionReceipt\",\n txhash: req.hash\n });\n case \"call\": {\n if (req.blockTag !== \"latest\") {\n throw new Error(\"EtherscanProvider does not support blockTag for call\");\n }\n const postData = this._getTransactionPostData(req.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_call\";\n try {\n return await this.fetch(\"proxy\", postData, true);\n } catch (error) {\n return this._checkError(req, error, req.transaction);\n }\n }\n case \"estimateGas\": {\n const postData = this._getTransactionPostData(req.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_estimateGas\";\n try {\n return await this.fetch(\"proxy\", postData, true);\n } catch (error) {\n return this._checkError(req, error, req.transaction);\n }\n }\n default:\n break;\n }\n return super._perform(req);\n }\n async getNetwork() {\n return this.network;\n }\n /**\n * Resolves to the current price of ether.\n *\n * This returns ``0`` on any network other than ``mainnet``.\n */\n async getEtherPrice() {\n if (this.network.name !== \"mainnet\") {\n return 0;\n }\n return parseFloat((await this.fetch(\"stats\", { action: \"ethprice\" })).ethusd);\n }\n /**\n * Resolves to a [Contract]] for %%address%%, using the\n * Etherscan API to retreive the Contract ABI.\n */\n async getContract(_address) {\n let address = this._getAddress(_address);\n if (isPromise(address)) {\n address = await address;\n }\n try {\n const resp = await this.fetch(\"contract\", {\n action: \"getabi\",\n address\n });\n const abi2 = JSON.parse(resp);\n return new index_js_2.Contract(address, abi2, this);\n } catch (error) {\n return null;\n }\n }\n isCommunityResource() {\n return this.apiKey == null;\n }\n };\n exports3.EtherscanProvider = EtherscanProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/ws-browser.js\n var require_ws_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/ws-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WebSocket = void 0;\n function getGlobal() {\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw new Error(\"unable to locate global object\");\n }\n var _WebSocket = getGlobal().WebSocket;\n exports3.WebSocket = _WebSocket;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-socket.js\n var require_provider_socket = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-socket.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SocketProvider = exports3.SocketEventSubscriber = exports3.SocketPendingSubscriber = exports3.SocketBlockSubscriber = exports3.SocketSubscriber = void 0;\n var abstract_provider_js_1 = require_abstract_provider();\n var index_js_1 = require_utils8();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var SocketSubscriber = class {\n #provider;\n #filter;\n /**\n * The filter.\n */\n get filter() {\n return JSON.parse(this.#filter);\n }\n #filterId;\n #paused;\n #emitPromise;\n /**\n * Creates a new **SocketSubscriber** attached to %%provider%% listening\n * to %%filter%%.\n */\n constructor(provider, filter) {\n this.#provider = provider;\n this.#filter = JSON.stringify(filter);\n this.#filterId = null;\n this.#paused = null;\n this.#emitPromise = null;\n }\n start() {\n this.#filterId = this.#provider.send(\"eth_subscribe\", this.filter).then((filterId) => {\n ;\n this.#provider._register(filterId, this);\n return filterId;\n });\n }\n stop() {\n this.#filterId.then((filterId) => {\n if (this.#provider.destroyed) {\n return;\n }\n this.#provider.send(\"eth_unsubscribe\", [filterId]);\n });\n this.#filterId = null;\n }\n // @TODO: pause should trap the current blockNumber, unsub, and on resume use getLogs\n // and resume\n pause(dropWhilePaused) {\n (0, index_js_1.assert)(dropWhilePaused, \"preserve logs while paused not supported by SocketSubscriber yet\", \"UNSUPPORTED_OPERATION\", { operation: \"pause(false)\" });\n this.#paused = !!dropWhilePaused;\n }\n resume() {\n this.#paused = null;\n }\n /**\n * @_ignore:\n */\n _handleMessage(message) {\n if (this.#filterId == null) {\n return;\n }\n if (this.#paused === null) {\n let emitPromise = this.#emitPromise;\n if (emitPromise == null) {\n emitPromise = this._emit(this.#provider, message);\n } else {\n emitPromise = emitPromise.then(async () => {\n await this._emit(this.#provider, message);\n });\n }\n this.#emitPromise = emitPromise.then(() => {\n if (this.#emitPromise === emitPromise) {\n this.#emitPromise = null;\n }\n });\n }\n }\n /**\n * Sub-classes **must** override this to emit the events on the\n * provider.\n */\n async _emit(provider, message) {\n throw new Error(\"sub-classes must implemente this; _emit\");\n }\n };\n exports3.SocketSubscriber = SocketSubscriber;\n var SocketBlockSubscriber = class extends SocketSubscriber {\n /**\n * @_ignore:\n */\n constructor(provider) {\n super(provider, [\"newHeads\"]);\n }\n async _emit(provider, message) {\n provider.emit(\"block\", parseInt(message.number));\n }\n };\n exports3.SocketBlockSubscriber = SocketBlockSubscriber;\n var SocketPendingSubscriber = class extends SocketSubscriber {\n /**\n * @_ignore:\n */\n constructor(provider) {\n super(provider, [\"newPendingTransactions\"]);\n }\n async _emit(provider, message) {\n provider.emit(\"pending\", message);\n }\n };\n exports3.SocketPendingSubscriber = SocketPendingSubscriber;\n var SocketEventSubscriber = class extends SocketSubscriber {\n #logFilter;\n /**\n * The filter.\n */\n get logFilter() {\n return JSON.parse(this.#logFilter);\n }\n /**\n * @_ignore:\n */\n constructor(provider, filter) {\n super(provider, [\"logs\", filter]);\n this.#logFilter = JSON.stringify(filter);\n }\n async _emit(provider, message) {\n provider.emit(this.logFilter, provider._wrapLog(message, provider._network));\n }\n };\n exports3.SocketEventSubscriber = SocketEventSubscriber;\n var SocketProvider = class extends provider_jsonrpc_js_1.JsonRpcApiProvider {\n #callbacks;\n // Maps each filterId to its subscriber\n #subs;\n // If any events come in before a subscriber has finished\n // registering, queue them\n #pending;\n /**\n * Creates a new **SocketProvider** connected to %%network%%.\n *\n * If unspecified, the network will be discovered.\n */\n constructor(network, _options) {\n const options = Object.assign({}, _options != null ? _options : {});\n (0, index_js_1.assertArgument)(options.batchMaxCount == null || options.batchMaxCount === 1, \"sockets-based providers do not support batches\", \"options.batchMaxCount\", _options);\n options.batchMaxCount = 1;\n if (options.staticNetwork == null) {\n options.staticNetwork = true;\n }\n super(network, options);\n this.#callbacks = /* @__PURE__ */ new Map();\n this.#subs = /* @__PURE__ */ new Map();\n this.#pending = /* @__PURE__ */ new Map();\n }\n // This value is only valid after _start has been called\n /*\n get _network(): Network {\n if (this.#network == null) {\n throw new Error(\"this shouldn't happen\");\n }\n return this.#network.clone();\n }\n */\n _getSubscriber(sub) {\n switch (sub.type) {\n case \"close\":\n return new abstract_provider_js_1.UnmanagedSubscriber(\"close\");\n case \"block\":\n return new SocketBlockSubscriber(this);\n case \"pending\":\n return new SocketPendingSubscriber(this);\n case \"event\":\n return new SocketEventSubscriber(this, sub.filter);\n case \"orphan\":\n if (sub.filter.orphan === \"drop-log\") {\n return new abstract_provider_js_1.UnmanagedSubscriber(\"drop-log\");\n }\n }\n return super._getSubscriber(sub);\n }\n /**\n * Register a new subscriber. This is used internalled by Subscribers\n * and generally is unecessary unless extending capabilities.\n */\n _register(filterId, subscriber) {\n this.#subs.set(filterId, subscriber);\n const pending = this.#pending.get(filterId);\n if (pending) {\n for (const message of pending) {\n subscriber._handleMessage(message);\n }\n this.#pending.delete(filterId);\n }\n }\n async _send(payload) {\n (0, index_js_1.assertArgument)(!Array.isArray(payload), \"WebSocket does not support batch send\", \"payload\", payload);\n const promise = new Promise((resolve, reject) => {\n this.#callbacks.set(payload.id, { payload, resolve, reject });\n });\n await this._waitUntilReady();\n await this._write(JSON.stringify(payload));\n return [await promise];\n }\n // Sub-classes must call this once they are connected\n /*\n async _start(): Promise {\n if (this.#ready) { return; }\n \n for (const { payload } of this.#callbacks.values()) {\n await this._write(JSON.stringify(payload));\n }\n \n this.#ready = (async function() {\n await super._start();\n })();\n }\n */\n /**\n * Sub-classes **must** call this with messages received over their\n * transport to be processed and dispatched.\n */\n async _processMessage(message) {\n const result = JSON.parse(message);\n if (result && typeof result === \"object\" && \"id\" in result) {\n const callback = this.#callbacks.get(result.id);\n if (callback == null) {\n this.emit(\"error\", (0, index_js_1.makeError)(\"received result for unknown id\", \"UNKNOWN_ERROR\", {\n reasonCode: \"UNKNOWN_ID\",\n result\n }));\n return;\n }\n this.#callbacks.delete(result.id);\n callback.resolve(result);\n } else if (result && result.method === \"eth_subscription\") {\n const filterId = result.params.subscription;\n const subscriber = this.#subs.get(filterId);\n if (subscriber) {\n subscriber._handleMessage(result.params.result);\n } else {\n let pending = this.#pending.get(filterId);\n if (pending == null) {\n pending = [];\n this.#pending.set(filterId, pending);\n }\n pending.push(result.params.result);\n }\n } else {\n this.emit(\"error\", (0, index_js_1.makeError)(\"received unexpected message\", \"UNKNOWN_ERROR\", {\n reasonCode: \"UNEXPECTED_MESSAGE\",\n result\n }));\n return;\n }\n }\n /**\n * Sub-classes **must** override this to send %%message%% over their\n * transport.\n */\n async _write(message) {\n throw new Error(\"sub-classes must override this\");\n }\n };\n exports3.SocketProvider = SocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-websocket.js\n var require_provider_websocket = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-websocket.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WebSocketProvider = void 0;\n var ws_js_1 = require_ws_browser();\n var provider_socket_js_1 = require_provider_socket();\n var WebSocketProvider = class extends provider_socket_js_1.SocketProvider {\n #connect;\n #websocket;\n get websocket() {\n if (this.#websocket == null) {\n throw new Error(\"websocket closed\");\n }\n return this.#websocket;\n }\n constructor(url, network, options) {\n super(network, options);\n if (typeof url === \"string\") {\n this.#connect = () => {\n return new ws_js_1.WebSocket(url);\n };\n this.#websocket = this.#connect();\n } else if (typeof url === \"function\") {\n this.#connect = url;\n this.#websocket = url();\n } else {\n this.#connect = null;\n this.#websocket = url;\n }\n this.websocket.onopen = async () => {\n try {\n await this._start();\n this.resume();\n } catch (error) {\n console.log(\"failed to start WebsocketProvider\", error);\n }\n };\n this.websocket.onmessage = (message) => {\n this._processMessage(message.data);\n };\n }\n async _write(message) {\n this.websocket.send(message);\n }\n async destroy() {\n if (this.#websocket != null) {\n this.#websocket.close();\n this.#websocket = null;\n }\n super.destroy();\n }\n };\n exports3.WebSocketProvider = WebSocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-infura.js\n var require_provider_infura = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-infura.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.InfuraProvider = exports3.InfuraWebSocketProvider = void 0;\n var index_js_1 = require_utils8();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var provider_websocket_js_1 = require_provider_websocket();\n var defaultProjectId = \"84842078b09946638c03157f83405213\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"mainnet.infura.io\";\n case \"goerli\":\n return \"goerli.infura.io\";\n case \"sepolia\":\n return \"sepolia.infura.io\";\n case \"arbitrum\":\n return \"arbitrum-mainnet.infura.io\";\n case \"arbitrum-goerli\":\n return \"arbitrum-goerli.infura.io\";\n case \"arbitrum-sepolia\":\n return \"arbitrum-sepolia.infura.io\";\n case \"base\":\n return \"base-mainnet.infura.io\";\n case \"base-goerlia\":\n case \"base-goerli\":\n return \"base-goerli.infura.io\";\n case \"base-sepolia\":\n return \"base-sepolia.infura.io\";\n case \"bnb\":\n return \"bsc-mainnet.infura.io\";\n case \"bnbt\":\n return \"bsc-testnet.infura.io\";\n case \"linea\":\n return \"linea-mainnet.infura.io\";\n case \"linea-goerli\":\n return \"linea-goerli.infura.io\";\n case \"linea-sepolia\":\n return \"linea-sepolia.infura.io\";\n case \"matic\":\n return \"polygon-mainnet.infura.io\";\n case \"matic-amoy\":\n return \"polygon-amoy.infura.io\";\n case \"matic-mumbai\":\n return \"polygon-mumbai.infura.io\";\n case \"optimism\":\n return \"optimism-mainnet.infura.io\";\n case \"optimism-goerli\":\n return \"optimism-goerli.infura.io\";\n case \"optimism-sepolia\":\n return \"optimism-sepolia.infura.io\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var InfuraWebSocketProvider = class extends provider_websocket_js_1.WebSocketProvider {\n /**\n * The Project ID for the INFURA connection.\n */\n projectId;\n /**\n * The Project Secret.\n *\n * If null, no authenticated requests are made. This should not\n * be used outside of private contexts.\n */\n projectSecret;\n /**\n * Creates a new **InfuraWebSocketProvider**.\n */\n constructor(network, projectId) {\n const provider = new InfuraProvider(network, projectId);\n const req = provider._getConnection();\n (0, index_js_1.assert)(!req.credentials, \"INFURA WebSocket project secrets unsupported\", \"UNSUPPORTED_OPERATION\", { operation: \"InfuraProvider.getWebSocketProvider()\" });\n const url = req.url.replace(/^http/i, \"ws\").replace(\"/v3/\", \"/ws/v3/\");\n super(url, provider._network);\n (0, index_js_1.defineProperties)(this, {\n projectId: provider.projectId,\n projectSecret: provider.projectSecret\n });\n }\n isCommunityResource() {\n return this.projectId === defaultProjectId;\n }\n };\n exports3.InfuraWebSocketProvider = InfuraWebSocketProvider;\n var InfuraProvider = class _InfuraProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The Project ID for the INFURA connection.\n */\n projectId;\n /**\n * The Project Secret.\n *\n * If null, no authenticated requests are made. This should not\n * be used outside of private contexts.\n */\n projectSecret;\n /**\n * Creates a new **InfuraProvider**.\n */\n constructor(_network, projectId, projectSecret) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (projectId == null) {\n projectId = defaultProjectId;\n }\n if (projectSecret == null) {\n projectSecret = null;\n }\n const request = _InfuraProvider.getRequest(network, projectId, projectSecret);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { projectId, projectSecret });\n }\n _getProvider(chainId) {\n try {\n return new _InfuraProvider(chainId, this.projectId, this.projectSecret);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return this.projectId === defaultProjectId;\n }\n /**\n * Creates a new **InfuraWebSocketProvider**.\n */\n static getWebSocketProvider(network, projectId) {\n return new InfuraWebSocketProvider(network, projectId);\n }\n /**\n * Returns a prepared request for connecting to %%network%%\n * with %%projectId%% and %%projectSecret%%.\n */\n static getRequest(network, projectId, projectSecret) {\n if (projectId == null) {\n projectId = defaultProjectId;\n }\n if (projectSecret == null) {\n projectSecret = null;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/v3/${projectId}`);\n request.allowGzip = true;\n if (projectSecret) {\n request.setCredentials(\"\", projectSecret);\n }\n if (projectId === defaultProjectId) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"InfuraProvider\");\n return true;\n };\n }\n return request;\n }\n };\n exports3.InfuraProvider = InfuraProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-quicknode.js\n var require_provider_quicknode = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-quicknode.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.QuickNodeProvider = void 0;\n var index_js_1 = require_utils8();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var defaultToken = \"919b412a057b5e9c9b6dce193c5a60242d6efadb\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"ethers.quiknode.pro\";\n case \"goerli\":\n return \"ethers.ethereum-goerli.quiknode.pro\";\n case \"sepolia\":\n return \"ethers.ethereum-sepolia.quiknode.pro\";\n case \"holesky\":\n return \"ethers.ethereum-holesky.quiknode.pro\";\n case \"arbitrum\":\n return \"ethers.arbitrum-mainnet.quiknode.pro\";\n case \"arbitrum-goerli\":\n return \"ethers.arbitrum-goerli.quiknode.pro\";\n case \"arbitrum-sepolia\":\n return \"ethers.arbitrum-sepolia.quiknode.pro\";\n case \"base\":\n return \"ethers.base-mainnet.quiknode.pro\";\n case \"base-goerli\":\n return \"ethers.base-goerli.quiknode.pro\";\n case \"base-spolia\":\n return \"ethers.base-sepolia.quiknode.pro\";\n case \"bnb\":\n return \"ethers.bsc.quiknode.pro\";\n case \"bnbt\":\n return \"ethers.bsc-testnet.quiknode.pro\";\n case \"matic\":\n return \"ethers.matic.quiknode.pro\";\n case \"matic-mumbai\":\n return \"ethers.matic-testnet.quiknode.pro\";\n case \"optimism\":\n return \"ethers.optimism.quiknode.pro\";\n case \"optimism-goerli\":\n return \"ethers.optimism-goerli.quiknode.pro\";\n case \"optimism-sepolia\":\n return \"ethers.optimism-sepolia.quiknode.pro\";\n case \"xdai\":\n return \"ethers.xdai.quiknode.pro\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var QuickNodeProvider = class _QuickNodeProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The API token.\n */\n token;\n /**\n * Creates a new **QuickNodeProvider**.\n */\n constructor(_network, token) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (token == null) {\n token = defaultToken;\n }\n const request = _QuickNodeProvider.getRequest(network, token);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { token });\n }\n _getProvider(chainId) {\n try {\n return new _QuickNodeProvider(chainId, this.token);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return this.token === defaultToken;\n }\n /**\n * Returns a new request prepared for %%network%% and the\n * %%token%%.\n */\n static getRequest(network, token) {\n if (token == null) {\n token = defaultToken;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/${token}`);\n request.allowGzip = true;\n if (token === defaultToken) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"QuickNodeProvider\");\n return true;\n };\n }\n return request;\n }\n };\n exports3.QuickNodeProvider = QuickNodeProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-fallback.js\n var require_provider_fallback = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-fallback.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FallbackProvider = void 0;\n var index_js_1 = require_utils8();\n var abstract_provider_js_1 = require_abstract_provider();\n var network_js_1 = require_network();\n var BN_1 = BigInt(\"1\");\n var BN_2 = BigInt(\"2\");\n function shuffle(array) {\n for (let i3 = array.length - 1; i3 > 0; i3--) {\n const j2 = Math.floor(Math.random() * (i3 + 1));\n const tmp = array[i3];\n array[i3] = array[j2];\n array[j2] = tmp;\n }\n }\n function stall(duration) {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n }\n function getTime() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n function stringify4(value) {\n return JSON.stringify(value, (key, value2) => {\n if (typeof value2 === \"bigint\") {\n return { type: \"bigint\", value: value2.toString() };\n }\n return value2;\n });\n }\n var defaultConfig = { stallTimeout: 400, priority: 1, weight: 1 };\n var defaultState = {\n blockNumber: -2,\n requests: 0,\n lateResponses: 0,\n errorResponses: 0,\n outOfSync: -1,\n unsupportedEvents: 0,\n rollingDuration: 0,\n score: 0,\n _network: null,\n _updateNumber: null,\n _totalTime: 0,\n _lastFatalError: null,\n _lastFatalErrorTimestamp: 0\n };\n async function waitForSync(config2, blockNumber) {\n while (config2.blockNumber < 0 || config2.blockNumber < blockNumber) {\n if (!config2._updateNumber) {\n config2._updateNumber = (async () => {\n try {\n const blockNumber2 = await config2.provider.getBlockNumber();\n if (blockNumber2 > config2.blockNumber) {\n config2.blockNumber = blockNumber2;\n }\n } catch (error) {\n config2.blockNumber = -2;\n config2._lastFatalError = error;\n config2._lastFatalErrorTimestamp = getTime();\n }\n config2._updateNumber = null;\n })();\n }\n await config2._updateNumber;\n config2.outOfSync++;\n if (config2._lastFatalError) {\n break;\n }\n }\n }\n function _normalize(value) {\n if (value == null) {\n return \"null\";\n }\n if (Array.isArray(value)) {\n return \"[\" + value.map(_normalize).join(\",\") + \"]\";\n }\n if (typeof value === \"object\" && typeof value.toJSON === \"function\") {\n return _normalize(value.toJSON());\n }\n switch (typeof value) {\n case \"boolean\":\n case \"symbol\":\n return value.toString();\n case \"bigint\":\n case \"number\":\n return BigInt(value).toString();\n case \"string\":\n return JSON.stringify(value);\n case \"object\": {\n const keys = Object.keys(value);\n keys.sort();\n return \"{\" + keys.map((k4) => `${JSON.stringify(k4)}:${_normalize(value[k4])}`).join(\",\") + \"}\";\n }\n }\n console.log(\"Could not serialize\", value);\n throw new Error(\"Hmm...\");\n }\n function normalizeResult(method, value) {\n if (\"error\" in value) {\n const error = value.error;\n let tag;\n if ((0, index_js_1.isError)(error, \"CALL_EXCEPTION\")) {\n tag = _normalize(Object.assign({}, error, {\n shortMessage: void 0,\n reason: void 0,\n info: void 0\n }));\n } else {\n tag = _normalize(error);\n }\n return { tag, value: error };\n }\n const result = value.result;\n return { tag: _normalize(result), value: result };\n }\n function checkQuorum(quorum, results) {\n const tally = /* @__PURE__ */ new Map();\n for (const { value, tag, weight } of results) {\n const t3 = tally.get(tag) || { value, weight: 0 };\n t3.weight += weight;\n tally.set(tag, t3);\n }\n let best = null;\n for (const r2 of tally.values()) {\n if (r2.weight >= quorum && (!best || r2.weight > best.weight)) {\n best = r2;\n }\n }\n if (best) {\n return best.value;\n }\n return void 0;\n }\n function getMedian(quorum, results) {\n let resultWeight = 0;\n const errorMap2 = /* @__PURE__ */ new Map();\n let bestError = null;\n const values = [];\n for (const { value, tag, weight } of results) {\n if (value instanceof Error) {\n const e2 = errorMap2.get(tag) || { value, weight: 0 };\n e2.weight += weight;\n errorMap2.set(tag, e2);\n if (bestError == null || e2.weight > bestError.weight) {\n bestError = e2;\n }\n } else {\n values.push(BigInt(value));\n resultWeight += weight;\n }\n }\n if (resultWeight < quorum) {\n if (bestError && bestError.weight >= quorum) {\n return bestError.value;\n }\n return void 0;\n }\n values.sort((a3, b4) => a3 < b4 ? -1 : b4 > a3 ? 1 : 0);\n const mid = Math.floor(values.length / 2);\n if (values.length % 2) {\n return values[mid];\n }\n return (values[mid - 1] + values[mid] + BN_1) / BN_2;\n }\n function getAnyResult(quorum, results) {\n const result = checkQuorum(quorum, results);\n if (result !== void 0) {\n return result;\n }\n for (const r2 of results) {\n if (r2.value) {\n return r2.value;\n }\n }\n return void 0;\n }\n function getFuzzyMode(quorum, results) {\n if (quorum === 1) {\n return (0, index_js_1.getNumber)(getMedian(quorum, results), \"%internal\");\n }\n const tally = /* @__PURE__ */ new Map();\n const add2 = (result, weight) => {\n const t3 = tally.get(result) || { result, weight: 0 };\n t3.weight += weight;\n tally.set(result, t3);\n };\n for (const { weight, value } of results) {\n const r2 = (0, index_js_1.getNumber)(value);\n add2(r2 - 1, weight);\n add2(r2, weight);\n add2(r2 + 1, weight);\n }\n let bestWeight = 0;\n let bestResult = void 0;\n for (const { weight, result } of tally.values()) {\n if (weight >= quorum && (weight > bestWeight || bestResult != null && weight === bestWeight && result > bestResult)) {\n bestWeight = weight;\n bestResult = result;\n }\n }\n return bestResult;\n }\n var FallbackProvider = class extends abstract_provider_js_1.AbstractProvider {\n /**\n * The number of backends that must agree on a value before it is\n * accpeted.\n */\n quorum;\n /**\n * @_ignore:\n */\n eventQuorum;\n /**\n * @_ignore:\n */\n eventWorkers;\n #configs;\n #height;\n #initialSyncPromise;\n /**\n * Creates a new **FallbackProvider** with %%providers%% connected to\n * %%network%%.\n *\n * If a [[Provider]] is included in %%providers%%, defaults are used\n * for the configuration.\n */\n constructor(providers, network, options) {\n super(network, options);\n this.#configs = providers.map((p4) => {\n if (p4 instanceof abstract_provider_js_1.AbstractProvider) {\n return Object.assign({ provider: p4 }, defaultConfig, defaultState);\n } else {\n return Object.assign({}, defaultConfig, p4, defaultState);\n }\n });\n this.#height = -2;\n this.#initialSyncPromise = null;\n if (options && options.quorum != null) {\n this.quorum = options.quorum;\n } else {\n this.quorum = Math.ceil(this.#configs.reduce((accum, config2) => {\n accum += config2.weight;\n return accum;\n }, 0) / 2);\n }\n this.eventQuorum = 1;\n this.eventWorkers = 1;\n (0, index_js_1.assertArgument)(this.quorum <= this.#configs.reduce((a3, c4) => a3 + c4.weight, 0), \"quorum exceed provider weight\", \"quorum\", this.quorum);\n }\n get providerConfigs() {\n return this.#configs.map((c4) => {\n const result = Object.assign({}, c4);\n for (const key in result) {\n if (key[0] === \"_\") {\n delete result[key];\n }\n }\n return result;\n });\n }\n async _detectNetwork() {\n return network_js_1.Network.from((0, index_js_1.getBigInt)(await this._perform({ method: \"chainId\" })));\n }\n // @TODO: Add support to select providers to be the event subscriber\n //_getSubscriber(sub: Subscription): Subscriber {\n // throw new Error(\"@TODO\");\n //}\n /**\n * Transforms a %%req%% into the correct method call on %%provider%%.\n */\n async _translatePerform(provider, req) {\n switch (req.method) {\n case \"broadcastTransaction\":\n return await provider.broadcastTransaction(req.signedTransaction);\n case \"call\":\n return await provider.call(Object.assign({}, req.transaction, { blockTag: req.blockTag }));\n case \"chainId\":\n return (await provider.getNetwork()).chainId;\n case \"estimateGas\":\n return await provider.estimateGas(req.transaction);\n case \"getBalance\":\n return await provider.getBalance(req.address, req.blockTag);\n case \"getBlock\": {\n const block = \"blockHash\" in req ? req.blockHash : req.blockTag;\n return await provider.getBlock(block, req.includeTransactions);\n }\n case \"getBlockNumber\":\n return await provider.getBlockNumber();\n case \"getCode\":\n return await provider.getCode(req.address, req.blockTag);\n case \"getGasPrice\":\n return (await provider.getFeeData()).gasPrice;\n case \"getPriorityFee\":\n return (await provider.getFeeData()).maxPriorityFeePerGas;\n case \"getLogs\":\n return await provider.getLogs(req.filter);\n case \"getStorage\":\n return await provider.getStorage(req.address, req.position, req.blockTag);\n case \"getTransaction\":\n return await provider.getTransaction(req.hash);\n case \"getTransactionCount\":\n return await provider.getTransactionCount(req.address, req.blockTag);\n case \"getTransactionReceipt\":\n return await provider.getTransactionReceipt(req.hash);\n case \"getTransactionResult\":\n return await provider.getTransactionResult(req.hash);\n }\n }\n // Grab the next (random) config that is not already part of\n // the running set\n #getNextConfig(running) {\n const configs = Array.from(running).map((r2) => r2.config);\n const allConfigs = this.#configs.slice();\n shuffle(allConfigs);\n allConfigs.sort((a3, b4) => a3.priority - b4.priority);\n for (const config2 of allConfigs) {\n if (config2._lastFatalError) {\n continue;\n }\n if (configs.indexOf(config2) === -1) {\n return config2;\n }\n }\n return null;\n }\n // Adds a new runner (if available) to running.\n #addRunner(running, req) {\n const config2 = this.#getNextConfig(running);\n if (config2 == null) {\n return null;\n }\n const runner = {\n config: config2,\n result: null,\n didBump: false,\n perform: null,\n staller: null\n };\n const now = getTime();\n runner.perform = (async () => {\n try {\n config2.requests++;\n const result = await this._translatePerform(config2.provider, req);\n runner.result = { result };\n } catch (error) {\n config2.errorResponses++;\n runner.result = { error };\n }\n const dt = getTime() - now;\n config2._totalTime += dt;\n config2.rollingDuration = 0.95 * config2.rollingDuration + 0.05 * dt;\n runner.perform = null;\n })();\n runner.staller = (async () => {\n await stall(config2.stallTimeout);\n runner.staller = null;\n })();\n running.add(runner);\n return runner;\n }\n // Initializes the blockNumber and network for each runner and\n // blocks until initialized\n async #initialSync() {\n let initialSync = this.#initialSyncPromise;\n if (!initialSync) {\n const promises = [];\n this.#configs.forEach((config2) => {\n promises.push((async () => {\n await waitForSync(config2, 0);\n if (!config2._lastFatalError) {\n config2._network = await config2.provider.getNetwork();\n }\n })());\n });\n this.#initialSyncPromise = initialSync = (async () => {\n await Promise.all(promises);\n let chainId = null;\n for (const config2 of this.#configs) {\n if (config2._lastFatalError) {\n continue;\n }\n const network = config2._network;\n if (chainId == null) {\n chainId = network.chainId;\n } else if (network.chainId !== chainId) {\n (0, index_js_1.assert)(false, \"cannot mix providers on different networks\", \"UNSUPPORTED_OPERATION\", {\n operation: \"new FallbackProvider\"\n });\n }\n }\n })();\n }\n await initialSync;\n }\n async #checkQuorum(running, req) {\n const results = [];\n for (const runner of running) {\n if (runner.result != null) {\n const { tag, value } = normalizeResult(req.method, runner.result);\n results.push({ tag, value, weight: runner.config.weight });\n }\n }\n if (results.reduce((a3, r2) => a3 + r2.weight, 0) < this.quorum) {\n return void 0;\n }\n switch (req.method) {\n case \"getBlockNumber\": {\n if (this.#height === -2) {\n this.#height = Math.ceil((0, index_js_1.getNumber)(getMedian(this.quorum, this.#configs.filter((c4) => !c4._lastFatalError).map((c4) => ({\n value: c4.blockNumber,\n tag: (0, index_js_1.getNumber)(c4.blockNumber).toString(),\n weight: c4.weight\n })))));\n }\n const mode = getFuzzyMode(this.quorum, results);\n if (mode === void 0) {\n return void 0;\n }\n if (mode > this.#height) {\n this.#height = mode;\n }\n return this.#height;\n }\n case \"getGasPrice\":\n case \"getPriorityFee\":\n case \"estimateGas\":\n return getMedian(this.quorum, results);\n case \"getBlock\":\n if (\"blockTag\" in req && req.blockTag === \"pending\") {\n return getAnyResult(this.quorum, results);\n }\n return checkQuorum(this.quorum, results);\n case \"call\":\n case \"chainId\":\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n case \"getStorage\":\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n case \"getLogs\":\n return checkQuorum(this.quorum, results);\n case \"broadcastTransaction\":\n return getAnyResult(this.quorum, results);\n }\n (0, index_js_1.assert)(false, \"unsupported method\", \"UNSUPPORTED_OPERATION\", {\n operation: `_perform(${stringify4(req.method)})`\n });\n }\n async #waitForQuorum(running, req) {\n if (running.size === 0) {\n throw new Error(\"no runners?!\");\n }\n const interesting = [];\n let newRunners = 0;\n for (const runner of running) {\n if (runner.perform) {\n interesting.push(runner.perform);\n }\n if (runner.staller) {\n interesting.push(runner.staller);\n continue;\n }\n if (runner.didBump) {\n continue;\n }\n runner.didBump = true;\n newRunners++;\n }\n const value = await this.#checkQuorum(running, req);\n if (value !== void 0) {\n if (value instanceof Error) {\n throw value;\n }\n return value;\n }\n for (let i3 = 0; i3 < newRunners; i3++) {\n this.#addRunner(running, req);\n }\n (0, index_js_1.assert)(interesting.length > 0, \"quorum not met\", \"SERVER_ERROR\", {\n request: \"%sub-requests\",\n info: { request: req, results: Array.from(running).map((r2) => stringify4(r2.result)) }\n });\n await Promise.race(interesting);\n return await this.#waitForQuorum(running, req);\n }\n async _perform(req) {\n if (req.method === \"broadcastTransaction\") {\n const results = this.#configs.map((c4) => null);\n const broadcasts = this.#configs.map(async ({ provider, weight }, index2) => {\n try {\n const result3 = await provider._perform(req);\n results[index2] = Object.assign(normalizeResult(req.method, { result: result3 }), { weight });\n } catch (error) {\n results[index2] = Object.assign(normalizeResult(req.method, { error }), { weight });\n }\n });\n while (true) {\n const done = results.filter((r2) => r2 != null);\n for (const { value } of done) {\n if (!(value instanceof Error)) {\n return value;\n }\n }\n const result3 = checkQuorum(this.quorum, results.filter((r2) => r2 != null));\n if ((0, index_js_1.isError)(result3, \"INSUFFICIENT_FUNDS\")) {\n throw result3;\n }\n const waiting = broadcasts.filter((b4, i3) => results[i3] == null);\n if (waiting.length === 0) {\n break;\n }\n await Promise.race(waiting);\n }\n const result2 = getAnyResult(this.quorum, results);\n (0, index_js_1.assert)(result2 !== void 0, \"problem multi-broadcasting\", \"SERVER_ERROR\", {\n request: \"%sub-requests\",\n info: { request: req, results: results.map(stringify4) }\n });\n if (result2 instanceof Error) {\n throw result2;\n }\n return result2;\n }\n await this.#initialSync();\n const running = /* @__PURE__ */ new Set();\n let inflightQuorum = 0;\n while (true) {\n const runner = this.#addRunner(running, req);\n if (runner == null) {\n break;\n }\n inflightQuorum += runner.config.weight;\n if (inflightQuorum >= this.quorum) {\n break;\n }\n }\n const result = await this.#waitForQuorum(running, req);\n for (const runner of running) {\n if (runner.perform && runner.result == null) {\n runner.config.lateResponses++;\n }\n }\n return result;\n }\n async destroy() {\n for (const { provider } of this.#configs) {\n provider.destroy();\n }\n super.destroy();\n }\n };\n exports3.FallbackProvider = FallbackProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/default-provider.js\n var require_default_provider = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/default-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getDefaultProvider = void 0;\n var index_js_1 = require_utils8();\n var provider_ankr_js_1 = require_provider_ankr();\n var provider_alchemy_js_1 = require_provider_alchemy();\n var provider_chainstack_js_1 = require_provider_chainstack();\n var provider_cloudflare_js_1 = require_provider_cloudflare();\n var provider_etherscan_js_1 = require_provider_etherscan();\n var provider_infura_js_1 = require_provider_infura();\n var provider_quicknode_js_1 = require_provider_quicknode();\n var provider_fallback_js_1 = require_provider_fallback();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var network_js_1 = require_network();\n var provider_websocket_js_1 = require_provider_websocket();\n function isWebSocketLike(value) {\n return value && typeof value.send === \"function\" && typeof value.close === \"function\";\n }\n var Testnets = \"goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt\".split(\" \");\n function getDefaultProvider(network, options) {\n if (options == null) {\n options = {};\n }\n const allowService = (name) => {\n if (options[name] === \"-\") {\n return false;\n }\n if (typeof options.exclusive === \"string\") {\n return name === options.exclusive;\n }\n if (Array.isArray(options.exclusive)) {\n return options.exclusive.indexOf(name) !== -1;\n }\n return true;\n };\n if (typeof network === \"string\" && network.match(/^https?:/)) {\n return new provider_jsonrpc_js_1.JsonRpcProvider(network);\n }\n if (typeof network === \"string\" && network.match(/^wss?:/) || isWebSocketLike(network)) {\n return new provider_websocket_js_1.WebSocketProvider(network);\n }\n let staticNetwork = null;\n try {\n staticNetwork = network_js_1.Network.from(network);\n } catch (error) {\n }\n const providers = [];\n if (allowService(\"publicPolygon\") && staticNetwork) {\n if (staticNetwork.name === \"matic\") {\n providers.push(new provider_jsonrpc_js_1.JsonRpcProvider(\"https://polygon-rpc.com/\", staticNetwork, { staticNetwork }));\n } else if (staticNetwork.name === \"matic-amoy\") {\n providers.push(new provider_jsonrpc_js_1.JsonRpcProvider(\"https://rpc-amoy.polygon.technology/\", staticNetwork, { staticNetwork }));\n }\n }\n if (allowService(\"alchemy\")) {\n try {\n providers.push(new provider_alchemy_js_1.AlchemyProvider(network, options.alchemy));\n } catch (error) {\n }\n }\n if (allowService(\"ankr\") && options.ankr != null) {\n try {\n providers.push(new provider_ankr_js_1.AnkrProvider(network, options.ankr));\n } catch (error) {\n }\n }\n if (allowService(\"chainstack\")) {\n try {\n providers.push(new provider_chainstack_js_1.ChainstackProvider(network, options.chainstack));\n } catch (error) {\n }\n }\n if (allowService(\"cloudflare\")) {\n try {\n providers.push(new provider_cloudflare_js_1.CloudflareProvider(network));\n } catch (error) {\n }\n }\n if (allowService(\"etherscan\")) {\n try {\n providers.push(new provider_etherscan_js_1.EtherscanProvider(network, options.etherscan));\n } catch (error) {\n }\n }\n if (allowService(\"infura\")) {\n try {\n let projectId = options.infura;\n let projectSecret = void 0;\n if (typeof projectId === \"object\") {\n projectSecret = projectId.projectSecret;\n projectId = projectId.projectId;\n }\n providers.push(new provider_infura_js_1.InfuraProvider(network, projectId, projectSecret));\n } catch (error) {\n }\n }\n if (allowService(\"quicknode\")) {\n try {\n let token = options.quicknode;\n providers.push(new provider_quicknode_js_1.QuickNodeProvider(network, token));\n } catch (error) {\n }\n }\n (0, index_js_1.assert)(providers.length, \"unsupported default network\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getDefaultProvider\"\n });\n if (providers.length === 1) {\n return providers[0];\n }\n let quorum = Math.floor(providers.length / 2);\n if (quorum > 2) {\n quorum = 2;\n }\n if (staticNetwork && Testnets.indexOf(staticNetwork.name) !== -1) {\n quorum = 1;\n }\n if (options && options.quorum) {\n quorum = options.quorum;\n }\n return new provider_fallback_js_1.FallbackProvider(providers, void 0, { quorum });\n }\n exports3.getDefaultProvider = getDefaultProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/signer-noncemanager.js\n var require_signer_noncemanager = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/signer-noncemanager.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NonceManager = void 0;\n var index_js_1 = require_utils8();\n var abstract_signer_js_1 = require_abstract_signer();\n var NonceManager = class _NonceManager extends abstract_signer_js_1.AbstractSigner {\n /**\n * The Signer being managed.\n */\n signer;\n #noncePromise;\n #delta;\n /**\n * Creates a new **NonceManager** to manage %%signer%%.\n */\n constructor(signer) {\n super(signer.provider);\n (0, index_js_1.defineProperties)(this, { signer });\n this.#noncePromise = null;\n this.#delta = 0;\n }\n async getAddress() {\n return this.signer.getAddress();\n }\n connect(provider) {\n return new _NonceManager(this.signer.connect(provider));\n }\n async getNonce(blockTag) {\n if (blockTag === \"pending\") {\n if (this.#noncePromise == null) {\n this.#noncePromise = super.getNonce(\"pending\");\n }\n const delta = this.#delta;\n return await this.#noncePromise + delta;\n }\n return super.getNonce(blockTag);\n }\n /**\n * Manually increment the nonce. This may be useful when managng\n * offline transactions.\n */\n increment() {\n this.#delta++;\n }\n /**\n * Resets the nonce, causing the **NonceManager** to reload the current\n * nonce from the blockchain on the next transaction.\n */\n reset() {\n this.#delta = 0;\n this.#noncePromise = null;\n }\n async sendTransaction(tx) {\n const noncePromise = this.getNonce(\"pending\");\n this.increment();\n tx = await this.signer.populateTransaction(tx);\n tx.nonce = await noncePromise;\n return await this.signer.sendTransaction(tx);\n }\n signTransaction(tx) {\n return this.signer.signTransaction(tx);\n }\n signMessage(message) {\n return this.signer.signMessage(message);\n }\n signTypedData(domain2, types, value) {\n return this.signer.signTypedData(domain2, types, value);\n }\n };\n exports3.NonceManager = NonceManager;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-browser.js\n var require_provider_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BrowserProvider = void 0;\n var index_js_1 = require_utils8();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var BrowserProvider = class _BrowserProvider extends provider_jsonrpc_js_1.JsonRpcApiPollingProvider {\n #request;\n #providerInfo;\n /**\n * Connect to the %%ethereum%% provider, optionally forcing the\n * %%network%%.\n */\n constructor(ethereum, network, _options) {\n const options = Object.assign({}, _options != null ? _options : {}, { batchMaxCount: 1 });\n (0, index_js_1.assertArgument)(ethereum && ethereum.request, \"invalid EIP-1193 provider\", \"ethereum\", ethereum);\n super(network, options);\n this.#providerInfo = null;\n if (_options && _options.providerInfo) {\n this.#providerInfo = _options.providerInfo;\n }\n this.#request = async (method, params) => {\n const payload = { method, params };\n this.emit(\"debug\", { action: \"sendEip1193Request\", payload });\n try {\n const result = await ethereum.request(payload);\n this.emit(\"debug\", { action: \"receiveEip1193Result\", result });\n return result;\n } catch (e2) {\n const error = new Error(e2.message);\n error.code = e2.code;\n error.data = e2.data;\n error.payload = payload;\n this.emit(\"debug\", { action: \"receiveEip1193Error\", error });\n throw error;\n }\n };\n }\n get providerInfo() {\n return this.#providerInfo;\n }\n async send(method, params) {\n await this._start();\n return await super.send(method, params);\n }\n async _send(payload) {\n (0, index_js_1.assertArgument)(!Array.isArray(payload), \"EIP-1193 does not support batch request\", \"payload\", payload);\n try {\n const result = await this.#request(payload.method, payload.params || []);\n return [{ id: payload.id, result }];\n } catch (e2) {\n return [{\n id: payload.id,\n error: { code: e2.code, data: e2.data, message: e2.message }\n }];\n }\n }\n getRpcError(payload, error) {\n error = JSON.parse(JSON.stringify(error));\n switch (error.error.code || -1) {\n case 4001:\n error.error.message = `ethers-user-denied: ${error.error.message}`;\n break;\n case 4200:\n error.error.message = `ethers-unsupported: ${error.error.message}`;\n break;\n }\n return super.getRpcError(payload, error);\n }\n /**\n * Resolves to ``true`` if the provider manages the %%address%%.\n */\n async hasSigner(address) {\n if (address == null) {\n address = 0;\n }\n const accounts = await this.send(\"eth_accounts\", []);\n if (typeof address === \"number\") {\n return accounts.length > address;\n }\n address = address.toLowerCase();\n return accounts.filter((a3) => a3.toLowerCase() === address).length !== 0;\n }\n async getSigner(address) {\n if (address == null) {\n address = 0;\n }\n if (!await this.hasSigner(address)) {\n try {\n await this.#request(\"eth_requestAccounts\", []);\n } catch (error) {\n const payload = error.payload;\n throw this.getRpcError(payload, { id: payload.id, error });\n }\n }\n return await super.getSigner(address);\n }\n /**\n * Discover and connect to a Provider in the Browser using the\n * [[link-eip-6963]] discovery mechanism. If no providers are\n * present, ``null`` is resolved.\n */\n static async discover(options) {\n if (options == null) {\n options = {};\n }\n if (options.provider) {\n return new _BrowserProvider(options.provider);\n }\n const context2 = options.window ? options.window : typeof window !== \"undefined\" ? window : null;\n if (context2 == null) {\n return null;\n }\n const anyProvider = options.anyProvider;\n if (anyProvider && context2.ethereum) {\n return new _BrowserProvider(context2.ethereum);\n }\n if (!(\"addEventListener\" in context2 && \"dispatchEvent\" in context2 && \"removeEventListener\" in context2)) {\n return null;\n }\n const timeout = options.timeout ? options.timeout : 300;\n if (timeout === 0) {\n return null;\n }\n return await new Promise((resolve, reject) => {\n let found = [];\n const addProvider = (event) => {\n found.push(event.detail);\n if (anyProvider) {\n finalize();\n }\n };\n const finalize = () => {\n clearTimeout(timer);\n if (found.length) {\n if (options && options.filter) {\n const filtered = options.filter(found.map((i3) => Object.assign({}, i3.info)));\n if (filtered == null) {\n resolve(null);\n } else if (filtered instanceof _BrowserProvider) {\n resolve(filtered);\n } else {\n let match = null;\n if (filtered.uuid) {\n const matches = found.filter((f7) => filtered.uuid === f7.info.uuid);\n match = matches[0];\n }\n if (match) {\n const { provider, info } = match;\n resolve(new _BrowserProvider(provider, void 0, {\n providerInfo: info\n }));\n } else {\n reject((0, index_js_1.makeError)(\"filter returned unknown info\", \"UNSUPPORTED_OPERATION\", {\n value: filtered\n }));\n }\n }\n } else {\n const { provider, info } = found[0];\n resolve(new _BrowserProvider(provider, void 0, {\n providerInfo: info\n }));\n }\n } else {\n resolve(null);\n }\n context2.removeEventListener(\"eip6963:announceProvider\", addProvider);\n };\n const timer = setTimeout(() => {\n finalize();\n }, timeout);\n context2.addEventListener(\"eip6963:announceProvider\", addProvider);\n context2.dispatchEvent(new Event(\"eip6963:requestProvider\"));\n });\n }\n };\n exports3.BrowserProvider = BrowserProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-blockscout.js\n var require_provider_blockscout = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-blockscout.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BlockscoutProvider = void 0;\n var index_js_1 = require_utils8();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n function getUrl2(name) {\n switch (name) {\n case \"mainnet\":\n return \"https://eth.blockscout.com/api/eth-rpc\";\n case \"sepolia\":\n return \"https://eth-sepolia.blockscout.com/api/eth-rpc\";\n case \"holesky\":\n return \"https://eth-holesky.blockscout.com/api/eth-rpc\";\n case \"classic\":\n return \"https://etc.blockscout.com/api/eth-rpc\";\n case \"arbitrum\":\n return \"https://arbitrum.blockscout.com/api/eth-rpc\";\n case \"base\":\n return \"https://base.blockscout.com/api/eth-rpc\";\n case \"base-sepolia\":\n return \"https://base-sepolia.blockscout.com/api/eth-rpc\";\n case \"matic\":\n return \"https://polygon.blockscout.com/api/eth-rpc\";\n case \"optimism\":\n return \"https://optimism.blockscout.com/api/eth-rpc\";\n case \"optimism-sepolia\":\n return \"https://optimism-sepolia.blockscout.com/api/eth-rpc\";\n case \"xdai\":\n return \"https://gnosis.blockscout.com/api/eth-rpc\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var BlockscoutProvider = class _BlockscoutProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The API key.\n */\n apiKey;\n /**\n * Creates a new **BlockscoutProvider**.\n */\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (apiKey == null) {\n apiKey = null;\n }\n const request = _BlockscoutProvider.getRequest(network);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new _BlockscoutProvider(chainId, this.apiKey);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return this.apiKey === null;\n }\n getRpcRequest(req) {\n const resp = super.getRpcRequest(req);\n if (resp && resp.method === \"eth_estimateGas\" && resp.args.length == 1) {\n resp.args = resp.args.slice();\n resp.args.push(\"latest\");\n }\n return resp;\n }\n getRpcError(payload, _error) {\n const error = _error ? _error.error : null;\n if (error && error.code === -32015 && !(0, index_js_1.isHexString)(error.data || \"\", true)) {\n const panicCodes = {\n \"assert(false)\": \"01\",\n \"arithmetic underflow or overflow\": \"11\",\n \"division or modulo by zero\": \"12\",\n \"out-of-bounds array access; popping on an empty array\": \"31\",\n \"out-of-bounds access of an array or bytesN\": \"32\"\n };\n let panicCode = \"\";\n if (error.message === \"VM execution error.\") {\n panicCode = panicCodes[error.data] || \"\";\n } else if (panicCodes[error.message || \"\"]) {\n panicCode = panicCodes[error.message || \"\"];\n }\n if (panicCode) {\n error.message += ` (reverted: ${error.data})`;\n error.data = \"0x4e487b7100000000000000000000000000000000000000000000000000000000000000\" + panicCode;\n }\n } else if (error && error.code === -32e3) {\n if (error.message === \"wrong transaction nonce\") {\n error.message += \" (nonce too low)\";\n }\n }\n return super.getRpcError(payload, _error);\n }\n /**\n * Returns a prepared request for connecting to %%network%%\n * with %%apiKey%%.\n */\n static getRequest(network) {\n const request = new index_js_1.FetchRequest(getUrl2(network.name));\n request.allowGzip = true;\n return request;\n }\n };\n exports3.BlockscoutProvider = BlockscoutProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-pocket.js\n var require_provider_pocket = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-pocket.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PocketProvider = void 0;\n var index_js_1 = require_utils8();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var defaultApplicationId = \"62e1ad51b37b8e00394bda3b\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"eth-mainnet.gateway.pokt.network\";\n case \"goerli\":\n return \"eth-goerli.gateway.pokt.network\";\n case \"matic\":\n return \"poly-mainnet.gateway.pokt.network\";\n case \"matic-mumbai\":\n return \"polygon-mumbai-rpc.gateway.pokt.network\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var PocketProvider = class _PocketProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The Application ID for the Pocket connection.\n */\n applicationId;\n /**\n * The Application Secret for making authenticated requests\n * to the Pocket connection.\n */\n applicationSecret;\n /**\n * Create a new **PocketProvider**.\n *\n * By default connecting to ``mainnet`` with a highly throttled\n * API key.\n */\n constructor(_network, applicationId, applicationSecret) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (applicationId == null) {\n applicationId = defaultApplicationId;\n }\n if (applicationSecret == null) {\n applicationSecret = null;\n }\n const options = { staticNetwork: network };\n const request = _PocketProvider.getRequest(network, applicationId, applicationSecret);\n super(request, network, options);\n (0, index_js_1.defineProperties)(this, { applicationId, applicationSecret });\n }\n _getProvider(chainId) {\n try {\n return new _PocketProvider(chainId, this.applicationId, this.applicationSecret);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n /**\n * Returns a prepared request for connecting to %%network%% with\n * %%applicationId%%.\n */\n static getRequest(network, applicationId, applicationSecret) {\n if (applicationId == null) {\n applicationId = defaultApplicationId;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/v1/lb/${applicationId}`);\n request.allowGzip = true;\n if (applicationSecret) {\n request.setCredentials(\"\", applicationSecret);\n }\n if (applicationId === defaultApplicationId) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"PocketProvider\");\n return true;\n };\n }\n return request;\n }\n isCommunityResource() {\n return this.applicationId === defaultApplicationId;\n }\n };\n exports3.PocketProvider = PocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-ipcsocket-browser.js\n var require_provider_ipcsocket_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-ipcsocket-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.IpcSocketProvider = void 0;\n var IpcSocketProvider = void 0;\n exports3.IpcSocketProvider = IpcSocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/index.js\n var require_providers = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SocketEventSubscriber = exports3.SocketPendingSubscriber = exports3.SocketBlockSubscriber = exports3.SocketSubscriber = exports3.WebSocketProvider = exports3.SocketProvider = exports3.IpcSocketProvider = exports3.QuickNodeProvider = exports3.PocketProvider = exports3.InfuraWebSocketProvider = exports3.InfuraProvider = exports3.EtherscanPlugin = exports3.EtherscanProvider = exports3.ChainstackProvider = exports3.CloudflareProvider = exports3.AnkrProvider = exports3.BlockscoutProvider = exports3.AlchemyProvider = exports3.BrowserProvider = exports3.JsonRpcSigner = exports3.JsonRpcProvider = exports3.JsonRpcApiProvider = exports3.FallbackProvider = exports3.copyRequest = exports3.TransactionResponse = exports3.TransactionReceipt = exports3.Log = exports3.FeeData = exports3.Block = exports3.FetchUrlFeeDataNetworkPlugin = exports3.FeeDataNetworkPlugin = exports3.EnsPlugin = exports3.GasCostPlugin = exports3.NetworkPlugin = exports3.NonceManager = exports3.Network = exports3.MulticoinProviderPlugin = exports3.EnsResolver = exports3.getDefaultProvider = exports3.showThrottleMessage = exports3.VoidSigner = exports3.AbstractSigner = exports3.UnmanagedSubscriber = exports3.AbstractProvider = void 0;\n var abstract_provider_js_1 = require_abstract_provider();\n Object.defineProperty(exports3, \"AbstractProvider\", { enumerable: true, get: function() {\n return abstract_provider_js_1.AbstractProvider;\n } });\n Object.defineProperty(exports3, \"UnmanagedSubscriber\", { enumerable: true, get: function() {\n return abstract_provider_js_1.UnmanagedSubscriber;\n } });\n var abstract_signer_js_1 = require_abstract_signer();\n Object.defineProperty(exports3, \"AbstractSigner\", { enumerable: true, get: function() {\n return abstract_signer_js_1.AbstractSigner;\n } });\n Object.defineProperty(exports3, \"VoidSigner\", { enumerable: true, get: function() {\n return abstract_signer_js_1.VoidSigner;\n } });\n var community_js_1 = require_community();\n Object.defineProperty(exports3, \"showThrottleMessage\", { enumerable: true, get: function() {\n return community_js_1.showThrottleMessage;\n } });\n var default_provider_js_1 = require_default_provider();\n Object.defineProperty(exports3, \"getDefaultProvider\", { enumerable: true, get: function() {\n return default_provider_js_1.getDefaultProvider;\n } });\n var ens_resolver_js_1 = require_ens_resolver();\n Object.defineProperty(exports3, \"EnsResolver\", { enumerable: true, get: function() {\n return ens_resolver_js_1.EnsResolver;\n } });\n Object.defineProperty(exports3, \"MulticoinProviderPlugin\", { enumerable: true, get: function() {\n return ens_resolver_js_1.MulticoinProviderPlugin;\n } });\n var network_js_1 = require_network();\n Object.defineProperty(exports3, \"Network\", { enumerable: true, get: function() {\n return network_js_1.Network;\n } });\n var signer_noncemanager_js_1 = require_signer_noncemanager();\n Object.defineProperty(exports3, \"NonceManager\", { enumerable: true, get: function() {\n return signer_noncemanager_js_1.NonceManager;\n } });\n var plugins_network_js_1 = require_plugins_network();\n Object.defineProperty(exports3, \"NetworkPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.NetworkPlugin;\n } });\n Object.defineProperty(exports3, \"GasCostPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.GasCostPlugin;\n } });\n Object.defineProperty(exports3, \"EnsPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.EnsPlugin;\n } });\n Object.defineProperty(exports3, \"FeeDataNetworkPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.FeeDataNetworkPlugin;\n } });\n Object.defineProperty(exports3, \"FetchUrlFeeDataNetworkPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.FetchUrlFeeDataNetworkPlugin;\n } });\n var provider_js_1 = require_provider();\n Object.defineProperty(exports3, \"Block\", { enumerable: true, get: function() {\n return provider_js_1.Block;\n } });\n Object.defineProperty(exports3, \"FeeData\", { enumerable: true, get: function() {\n return provider_js_1.FeeData;\n } });\n Object.defineProperty(exports3, \"Log\", { enumerable: true, get: function() {\n return provider_js_1.Log;\n } });\n Object.defineProperty(exports3, \"TransactionReceipt\", { enumerable: true, get: function() {\n return provider_js_1.TransactionReceipt;\n } });\n Object.defineProperty(exports3, \"TransactionResponse\", { enumerable: true, get: function() {\n return provider_js_1.TransactionResponse;\n } });\n Object.defineProperty(exports3, \"copyRequest\", { enumerable: true, get: function() {\n return provider_js_1.copyRequest;\n } });\n var provider_fallback_js_1 = require_provider_fallback();\n Object.defineProperty(exports3, \"FallbackProvider\", { enumerable: true, get: function() {\n return provider_fallback_js_1.FallbackProvider;\n } });\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n Object.defineProperty(exports3, \"JsonRpcApiProvider\", { enumerable: true, get: function() {\n return provider_jsonrpc_js_1.JsonRpcApiProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcProvider\", { enumerable: true, get: function() {\n return provider_jsonrpc_js_1.JsonRpcProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcSigner\", { enumerable: true, get: function() {\n return provider_jsonrpc_js_1.JsonRpcSigner;\n } });\n var provider_browser_js_1 = require_provider_browser();\n Object.defineProperty(exports3, \"BrowserProvider\", { enumerable: true, get: function() {\n return provider_browser_js_1.BrowserProvider;\n } });\n var provider_alchemy_js_1 = require_provider_alchemy();\n Object.defineProperty(exports3, \"AlchemyProvider\", { enumerable: true, get: function() {\n return provider_alchemy_js_1.AlchemyProvider;\n } });\n var provider_blockscout_js_1 = require_provider_blockscout();\n Object.defineProperty(exports3, \"BlockscoutProvider\", { enumerable: true, get: function() {\n return provider_blockscout_js_1.BlockscoutProvider;\n } });\n var provider_ankr_js_1 = require_provider_ankr();\n Object.defineProperty(exports3, \"AnkrProvider\", { enumerable: true, get: function() {\n return provider_ankr_js_1.AnkrProvider;\n } });\n var provider_cloudflare_js_1 = require_provider_cloudflare();\n Object.defineProperty(exports3, \"CloudflareProvider\", { enumerable: true, get: function() {\n return provider_cloudflare_js_1.CloudflareProvider;\n } });\n var provider_chainstack_js_1 = require_provider_chainstack();\n Object.defineProperty(exports3, \"ChainstackProvider\", { enumerable: true, get: function() {\n return provider_chainstack_js_1.ChainstackProvider;\n } });\n var provider_etherscan_js_1 = require_provider_etherscan();\n Object.defineProperty(exports3, \"EtherscanProvider\", { enumerable: true, get: function() {\n return provider_etherscan_js_1.EtherscanProvider;\n } });\n Object.defineProperty(exports3, \"EtherscanPlugin\", { enumerable: true, get: function() {\n return provider_etherscan_js_1.EtherscanPlugin;\n } });\n var provider_infura_js_1 = require_provider_infura();\n Object.defineProperty(exports3, \"InfuraProvider\", { enumerable: true, get: function() {\n return provider_infura_js_1.InfuraProvider;\n } });\n Object.defineProperty(exports3, \"InfuraWebSocketProvider\", { enumerable: true, get: function() {\n return provider_infura_js_1.InfuraWebSocketProvider;\n } });\n var provider_pocket_js_1 = require_provider_pocket();\n Object.defineProperty(exports3, \"PocketProvider\", { enumerable: true, get: function() {\n return provider_pocket_js_1.PocketProvider;\n } });\n var provider_quicknode_js_1 = require_provider_quicknode();\n Object.defineProperty(exports3, \"QuickNodeProvider\", { enumerable: true, get: function() {\n return provider_quicknode_js_1.QuickNodeProvider;\n } });\n var provider_ipcsocket_js_1 = require_provider_ipcsocket_browser();\n Object.defineProperty(exports3, \"IpcSocketProvider\", { enumerable: true, get: function() {\n return provider_ipcsocket_js_1.IpcSocketProvider;\n } });\n var provider_socket_js_1 = require_provider_socket();\n Object.defineProperty(exports3, \"SocketProvider\", { enumerable: true, get: function() {\n return provider_socket_js_1.SocketProvider;\n } });\n var provider_websocket_js_1 = require_provider_websocket();\n Object.defineProperty(exports3, \"WebSocketProvider\", { enumerable: true, get: function() {\n return provider_websocket_js_1.WebSocketProvider;\n } });\n var provider_socket_js_2 = require_provider_socket();\n Object.defineProperty(exports3, \"SocketSubscriber\", { enumerable: true, get: function() {\n return provider_socket_js_2.SocketSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketBlockSubscriber\", { enumerable: true, get: function() {\n return provider_socket_js_2.SocketBlockSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketPendingSubscriber\", { enumerable: true, get: function() {\n return provider_socket_js_2.SocketPendingSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketEventSubscriber\", { enumerable: true, get: function() {\n return provider_socket_js_2.SocketEventSubscriber;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/base-wallet.js\n var require_base_wallet = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/base-wallet.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BaseWallet = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_hash2();\n var index_js_3 = require_providers();\n var index_js_4 = require_transaction2();\n var index_js_5 = require_utils8();\n var BaseWallet = class _BaseWallet extends index_js_3.AbstractSigner {\n /**\n * The wallet address.\n */\n address;\n #signingKey;\n /**\n * Creates a new BaseWallet for %%privateKey%%, optionally\n * connected to %%provider%%.\n *\n * If %%provider%% is not specified, only offline methods can\n * be used.\n */\n constructor(privateKey, provider) {\n super(provider);\n (0, index_js_5.assertArgument)(privateKey && typeof privateKey.sign === \"function\", \"invalid private key\", \"privateKey\", \"[ REDACTED ]\");\n this.#signingKey = privateKey;\n const address = (0, index_js_4.computeAddress)(this.signingKey.publicKey);\n (0, index_js_5.defineProperties)(this, { address });\n }\n // Store private values behind getters to reduce visibility\n // in console.log\n /**\n * The [[SigningKey]] used for signing payloads.\n */\n get signingKey() {\n return this.#signingKey;\n }\n /**\n * The private key for this wallet.\n */\n get privateKey() {\n return this.signingKey.privateKey;\n }\n async getAddress() {\n return this.address;\n }\n connect(provider) {\n return new _BaseWallet(this.#signingKey, provider);\n }\n async signTransaction(tx) {\n tx = (0, index_js_3.copyRequest)(tx);\n const { to, from: from14 } = await (0, index_js_5.resolveProperties)({\n to: tx.to ? (0, index_js_1.resolveAddress)(tx.to, this) : void 0,\n from: tx.from ? (0, index_js_1.resolveAddress)(tx.from, this) : void 0\n });\n if (to != null) {\n tx.to = to;\n }\n if (from14 != null) {\n tx.from = from14;\n }\n if (tx.from != null) {\n (0, index_js_5.assertArgument)((0, index_js_1.getAddress)(tx.from) === this.address, \"transaction from address mismatch\", \"tx.from\", tx.from);\n delete tx.from;\n }\n const btx = index_js_4.Transaction.from(tx);\n btx.signature = this.signingKey.sign(btx.unsignedHash);\n return btx.serialized;\n }\n async signMessage(message) {\n return this.signMessageSync(message);\n }\n // @TODO: Add a secialized signTx and signTyped sync that enforces\n // all parameters are known?\n /**\n * Returns the signature for %%message%% signed with this wallet.\n */\n signMessageSync(message) {\n return this.signingKey.sign((0, index_js_2.hashMessage)(message)).serialized;\n }\n /**\n * Returns the Authorization for %%auth%%.\n */\n authorizeSync(auth) {\n (0, index_js_5.assertArgument)(typeof auth.address === \"string\", \"invalid address for authorizeSync\", \"auth.address\", auth);\n const signature = this.signingKey.sign((0, index_js_2.hashAuthorization)(auth));\n return Object.assign({}, {\n address: (0, index_js_1.getAddress)(auth.address),\n nonce: (0, index_js_5.getBigInt)(auth.nonce || 0),\n chainId: (0, index_js_5.getBigInt)(auth.chainId || 0)\n }, { signature });\n }\n /**\n * Resolves to the Authorization for %%auth%%.\n */\n async authorize(auth) {\n auth = Object.assign({}, auth, {\n address: await (0, index_js_1.resolveAddress)(auth.address, this)\n });\n return this.authorizeSync(await this.populateAuthorization(auth));\n }\n async signTypedData(domain2, types, value) {\n const populated = await index_js_2.TypedDataEncoder.resolveNames(domain2, types, value, async (name) => {\n (0, index_js_5.assert)(this.provider != null, \"cannot resolve ENS names without a provider\", \"UNSUPPORTED_OPERATION\", {\n operation: \"resolveName\",\n info: { name }\n });\n const address = await this.provider.resolveName(name);\n (0, index_js_5.assert)(address != null, \"unconfigured ENS name\", \"UNCONFIGURED_NAME\", {\n value: name\n });\n return address;\n });\n return this.signingKey.sign(index_js_2.TypedDataEncoder.hash(populated.domain, types, populated.value)).serialized;\n }\n };\n exports3.BaseWallet = BaseWallet;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/decode-owl.js\n var require_decode_owl = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/decode-owl.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeOwl = exports3.decode = void 0;\n var index_js_1 = require_utils8();\n var subsChrs = \" !#$%&'()*+,-./<=>?@[]^_`{|}~\";\n var Word = /^[a-z]*$/i;\n function unfold(words, sep) {\n let initial = 97;\n return words.reduce((accum, word) => {\n if (word === sep) {\n initial++;\n } else if (word.match(Word)) {\n accum.push(String.fromCharCode(initial) + word);\n } else {\n initial = 97;\n accum.push(word);\n }\n return accum;\n }, []);\n }\n function decode2(data, subs) {\n for (let i3 = subsChrs.length - 1; i3 >= 0; i3--) {\n data = data.split(subsChrs[i3]).join(subs.substring(2 * i3, 2 * i3 + 2));\n }\n const clumps = [];\n const leftover = data.replace(/(:|([0-9])|([A-Z][a-z]*))/g, (all, item, semi, word) => {\n if (semi) {\n for (let i3 = parseInt(semi); i3 >= 0; i3--) {\n clumps.push(\";\");\n }\n } else {\n clumps.push(item.toLowerCase());\n }\n return \"\";\n });\n if (leftover) {\n throw new Error(`leftovers: ${JSON.stringify(leftover)}`);\n }\n return unfold(unfold(clumps, \";\"), \":\");\n }\n exports3.decode = decode2;\n function decodeOwl(data) {\n (0, index_js_1.assertArgument)(data[0] === \"0\", \"unsupported auwl data\", \"data\", data);\n return decode2(data.substring(1 + 2 * subsChrs.length), data.substring(1, 1 + 2 * subsChrs.length));\n }\n exports3.decodeOwl = decodeOwl;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist.js\n var require_wordlist2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wordlist = void 0;\n var index_js_1 = require_utils8();\n var Wordlist = class {\n locale;\n /**\n * Creates a new Wordlist instance.\n *\n * Sub-classes MUST call this if they provide their own constructor,\n * passing in the locale string of the language.\n *\n * Generally there is no need to create instances of a Wordlist,\n * since each language-specific Wordlist creates an instance and\n * there is no state kept internally, so they are safe to share.\n */\n constructor(locale) {\n (0, index_js_1.defineProperties)(this, { locale });\n }\n /**\n * Sub-classes may override this to provide a language-specific\n * method for spliting %%phrase%% into individual words.\n *\n * By default, %%phrase%% is split using any sequences of\n * white-space as defined by regular expressions (i.e. ``/\\s+/``).\n */\n split(phrase) {\n return phrase.toLowerCase().split(/\\s+/g);\n }\n /**\n * Sub-classes may override this to provider a language-specific\n * method for joining %%words%% into a phrase.\n *\n * By default, %%words%% are joined by a single space.\n */\n join(words) {\n return words.join(\" \");\n }\n };\n exports3.Wordlist = Wordlist;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist-owl.js\n var require_wordlist_owl = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist-owl.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WordlistOwl = void 0;\n var index_js_1 = require_hash2();\n var index_js_2 = require_utils8();\n var decode_owl_js_1 = require_decode_owl();\n var wordlist_js_1 = require_wordlist2();\n var WordlistOwl = class extends wordlist_js_1.Wordlist {\n #data;\n #checksum;\n /**\n * Creates a new Wordlist for %%locale%% using the OWL %%data%%\n * and validated against the %%checksum%%.\n */\n constructor(locale, data, checksum4) {\n super(locale);\n this.#data = data;\n this.#checksum = checksum4;\n this.#words = null;\n }\n /**\n * The OWL-encoded data.\n */\n get _data() {\n return this.#data;\n }\n /**\n * Decode all the words for the wordlist.\n */\n _decodeWords() {\n return (0, decode_owl_js_1.decodeOwl)(this.#data);\n }\n #words;\n #loadWords() {\n if (this.#words == null) {\n const words = this._decodeWords();\n const checksum4 = (0, index_js_1.id)(words.join(\"\\n\") + \"\\n\");\n if (checksum4 !== this.#checksum) {\n throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);\n }\n this.#words = words;\n }\n return this.#words;\n }\n getWord(index2) {\n const words = this.#loadWords();\n (0, index_js_2.assertArgument)(index2 >= 0 && index2 < words.length, `invalid word index: ${index2}`, \"index\", index2);\n return words[index2];\n }\n getWordIndex(word) {\n return this.#loadWords().indexOf(word);\n }\n };\n exports3.WordlistOwl = WordlistOwl;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/lang-en.js\n var require_lang_en2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/lang-en.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LangEn = void 0;\n var wordlist_owl_js_1 = require_wordlist_owl();\n var words = \"0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-EgSe0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-PM&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryFN Noc|PutQuirySSue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurEAyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOgAyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NNGradeHoldOnP Set1BOng::Rd3Ar~ow9UUngU`:3BraRo9NeO\";\n var checksum4 = \"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60\";\n var wordlist = null;\n var LangEn = class _LangEn extends wordlist_owl_js_1.WordlistOwl {\n /**\n * Creates a new instance of the English language Wordlist.\n *\n * This should be unnecessary most of the time as the exported\n * [[langEn]] should suffice.\n *\n * @_ignore:\n */\n constructor() {\n super(\"en\", words, checksum4);\n }\n /**\n * Returns a singleton instance of a ``LangEn``, creating it\n * if this is the first time being called.\n */\n static wordlist() {\n if (wordlist == null) {\n wordlist = new _LangEn();\n }\n return wordlist;\n }\n };\n exports3.LangEn = LangEn;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/mnemonic.js\n var require_mnemonic = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/mnemonic.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Mnemonic = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils8();\n var lang_en_js_1 = require_lang_en2();\n function getUpperMask(bits) {\n return (1 << bits) - 1 << 8 - bits & 255;\n }\n function getLowerMask(bits) {\n return (1 << bits) - 1 & 255;\n }\n function mnemonicToEntropy(mnemonic, wordlist) {\n (0, index_js_2.assertNormalize)(\"NFKD\");\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n const words = wordlist.split(mnemonic);\n (0, index_js_2.assertArgument)(words.length % 3 === 0 && words.length >= 12 && words.length <= 24, \"invalid mnemonic length\", \"mnemonic\", \"[ REDACTED ]\");\n const entropy = new Uint8Array(Math.ceil(11 * words.length / 8));\n let offset = 0;\n for (let i3 = 0; i3 < words.length; i3++) {\n let index2 = wordlist.getWordIndex(words[i3].normalize(\"NFKD\"));\n (0, index_js_2.assertArgument)(index2 >= 0, `invalid mnemonic word at index ${i3}`, \"mnemonic\", \"[ REDACTED ]\");\n for (let bit = 0; bit < 11; bit++) {\n if (index2 & 1 << 10 - bit) {\n entropy[offset >> 3] |= 1 << 7 - offset % 8;\n }\n offset++;\n }\n }\n const entropyBits = 32 * words.length / 3;\n const checksumBits = words.length / 3;\n const checksumMask = getUpperMask(checksumBits);\n const checksum4 = (0, index_js_2.getBytes)((0, index_js_1.sha256)(entropy.slice(0, entropyBits / 8)))[0] & checksumMask;\n (0, index_js_2.assertArgument)(checksum4 === (entropy[entropy.length - 1] & checksumMask), \"invalid mnemonic checksum\", \"mnemonic\", \"[ REDACTED ]\");\n return (0, index_js_2.hexlify)(entropy.slice(0, entropyBits / 8));\n }\n function entropyToMnemonic(entropy, wordlist) {\n (0, index_js_2.assertArgument)(entropy.length % 4 === 0 && entropy.length >= 16 && entropy.length <= 32, \"invalid entropy size\", \"entropy\", \"[ REDACTED ]\");\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n const indices = [0];\n let remainingBits = 11;\n for (let i3 = 0; i3 < entropy.length; i3++) {\n if (remainingBits > 8) {\n indices[indices.length - 1] <<= 8;\n indices[indices.length - 1] |= entropy[i3];\n remainingBits -= 8;\n } else {\n indices[indices.length - 1] <<= remainingBits;\n indices[indices.length - 1] |= entropy[i3] >> 8 - remainingBits;\n indices.push(entropy[i3] & getLowerMask(8 - remainingBits));\n remainingBits += 3;\n }\n }\n const checksumBits = entropy.length / 4;\n const checksum4 = parseInt((0, index_js_1.sha256)(entropy).substring(2, 4), 16) & getUpperMask(checksumBits);\n indices[indices.length - 1] <<= checksumBits;\n indices[indices.length - 1] |= checksum4 >> 8 - checksumBits;\n return wordlist.join(indices.map((index2) => wordlist.getWord(index2)));\n }\n var _guard = {};\n var Mnemonic = class _Mnemonic {\n /**\n * The mnemonic phrase of 12, 15, 18, 21 or 24 words.\n *\n * Use the [[wordlist]] ``split`` method to get the individual words.\n */\n phrase;\n /**\n * The password used for this mnemonic. If no password is used this\n * is the empty string (i.e. ``\"\"``) as per the specification.\n */\n password;\n /**\n * The wordlist for this mnemonic.\n */\n wordlist;\n /**\n * The underlying entropy which the mnemonic encodes.\n */\n entropy;\n /**\n * @private\n */\n constructor(guard, entropy, phrase, password, wordlist) {\n if (password == null) {\n password = \"\";\n }\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n (0, index_js_2.assertPrivate)(guard, _guard, \"Mnemonic\");\n (0, index_js_2.defineProperties)(this, { phrase, password, wordlist, entropy });\n }\n /**\n * Returns the seed for the mnemonic.\n */\n computeSeed() {\n const salt = (0, index_js_2.toUtf8Bytes)(\"mnemonic\" + this.password, \"NFKD\");\n return (0, index_js_1.pbkdf2)((0, index_js_2.toUtf8Bytes)(this.phrase, \"NFKD\"), salt, 2048, 64, \"sha512\");\n }\n /**\n * Creates a new Mnemonic for the %%phrase%%.\n *\n * The default %%password%% is the empty string and the default\n * wordlist is the [English wordlists](LangEn).\n */\n static fromPhrase(phrase, password, wordlist) {\n const entropy = mnemonicToEntropy(phrase, wordlist);\n phrase = entropyToMnemonic((0, index_js_2.getBytes)(entropy), wordlist);\n return new _Mnemonic(_guard, entropy, phrase, password, wordlist);\n }\n /**\n * Create a new **Mnemonic** from the %%entropy%%.\n *\n * The default %%password%% is the empty string and the default\n * wordlist is the [English wordlists](LangEn).\n */\n static fromEntropy(_entropy, password, wordlist) {\n const entropy = (0, index_js_2.getBytes)(_entropy, \"entropy\");\n const phrase = entropyToMnemonic(entropy, wordlist);\n return new _Mnemonic(_guard, (0, index_js_2.hexlify)(entropy), phrase, password, wordlist);\n }\n /**\n * Returns the phrase for %%mnemonic%%.\n */\n static entropyToPhrase(_entropy, wordlist) {\n const entropy = (0, index_js_2.getBytes)(_entropy, \"entropy\");\n return entropyToMnemonic(entropy, wordlist);\n }\n /**\n * Returns the entropy for %%phrase%%.\n */\n static phraseToEntropy(phrase, wordlist) {\n return mnemonicToEntropy(phrase, wordlist);\n }\n /**\n * Returns true if %%phrase%% is a valid [[link-bip-39]] phrase.\n *\n * This checks all the provided words belong to the %%wordlist%%,\n * that the length is valid and the checksum is correct.\n */\n static isValidMnemonic(phrase, wordlist) {\n try {\n mnemonicToEntropy(phrase, wordlist);\n return true;\n } catch (error) {\n }\n return false;\n }\n };\n exports3.Mnemonic = Mnemonic;\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/aes.js\n var require_aes = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/aes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldGet4 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f7) {\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f7 : kind === \"a\" ? f7.call(receiver) : f7 ? f7.value : state.get(receiver);\n };\n var __classPrivateFieldSet4 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f7) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f7.call(receiver, value) : f7 ? f7.value = value : state.set(receiver, value), value;\n };\n var _AES_key;\n var _AES_Kd;\n var _AES_Ke;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AES = void 0;\n var numberOfRounds = { 16: 10, 24: 12, 32: 14 };\n var rcon = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145];\n var S3 = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22];\n var Si = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125];\n var T1 = [3328402341, 4168907908, 4000806809, 4135287693, 4294111757, 3597364157, 3731845041, 2445657428, 1613770832, 33620227, 3462883241, 1445669757, 3892248089, 3050821474, 1303096294, 3967186586, 2412431941, 528646813, 2311702848, 4202528135, 4026202645, 2992200171, 2387036105, 4226871307, 1101901292, 3017069671, 1604494077, 1169141738, 597466303, 1403299063, 3832705686, 2613100635, 1974974402, 3791519004, 1033081774, 1277568618, 1815492186, 2118074177, 4126668546, 2211236943, 1748251740, 1369810420, 3521504564, 4193382664, 3799085459, 2883115123, 1647391059, 706024767, 134480908, 2512897874, 1176707941, 2646852446, 806885416, 932615841, 168101135, 798661301, 235341577, 605164086, 461406363, 3756188221, 3454790438, 1311188841, 2142417613, 3933566367, 302582043, 495158174, 1479289972, 874125870, 907746093, 3698224818, 3025820398, 1537253627, 2756858614, 1983593293, 3084310113, 2108928974, 1378429307, 3722699582, 1580150641, 327451799, 2790478837, 3117535592, 0, 3253595436, 1075847264, 3825007647, 2041688520, 3059440621, 3563743934, 2378943302, 1740553945, 1916352843, 2487896798, 2555137236, 2958579944, 2244988746, 3151024235, 3320835882, 1336584933, 3992714006, 2252555205, 2588757463, 1714631509, 293963156, 2319795663, 3925473552, 67240454, 4269768577, 2689618160, 2017213508, 631218106, 1269344483, 2723238387, 1571005438, 2151694528, 93294474, 1066570413, 563977660, 1882732616, 4059428100, 1673313503, 2008463041, 2950355573, 1109467491, 537923632, 3858759450, 4260623118, 3218264685, 2177748300, 403442708, 638784309, 3287084079, 3193921505, 899127202, 2286175436, 773265209, 2479146071, 1437050866, 4236148354, 2050833735, 3362022572, 3126681063, 840505643, 3866325909, 3227541664, 427917720, 2655997905, 2749160575, 1143087718, 1412049534, 999329963, 193497219, 2353415882, 3354324521, 1807268051, 672404540, 2816401017, 3160301282, 369822493, 2916866934, 3688947771, 1681011286, 1949973070, 336202270, 2454276571, 201721354, 1210328172, 3093060836, 2680341085, 3184776046, 1135389935, 3294782118, 965841320, 831886756, 3554993207, 4068047243, 3588745010, 2345191491, 1849112409, 3664604599, 26054028, 2983581028, 2622377682, 1235855840, 3630984372, 2891339514, 4092916743, 3488279077, 3395642799, 4101667470, 1202630377, 268961816, 1874508501, 4034427016, 1243948399, 1546530418, 941366308, 1470539505, 1941222599, 2546386513, 3421038627, 2715671932, 3899946140, 1042226977, 2521517021, 1639824860, 227249030, 260737669, 3765465232, 2084453954, 1907733956, 3429263018, 2420656344, 100860677, 4160157185, 470683154, 3261161891, 1781871967, 2924959737, 1773779408, 394692241, 2579611992, 974986535, 664706745, 3655459128, 3958962195, 731420851, 571543859, 3530123707, 2849626480, 126783113, 865375399, 765172662, 1008606754, 361203602, 3387549984, 2278477385, 2857719295, 1344809080, 2782912378, 59542671, 1503764984, 160008576, 437062935, 1707065306, 3622233649, 2218934982, 3496503480, 2185314755, 697932208, 1512910199, 504303377, 2075177163, 2824099068, 1841019862, 739644986];\n var T22 = [2781242211, 2230877308, 2582542199, 2381740923, 234877682, 3184946027, 2984144751, 1418839493, 1348481072, 50462977, 2848876391, 2102799147, 434634494, 1656084439, 3863849899, 2599188086, 1167051466, 2636087938, 1082771913, 2281340285, 368048890, 3954334041, 3381544775, 201060592, 3963727277, 1739838676, 4250903202, 3930435503, 3206782108, 4149453988, 2531553906, 1536934080, 3262494647, 484572669, 2923271059, 1783375398, 1517041206, 1098792767, 49674231, 1334037708, 1550332980, 4098991525, 886171109, 150598129, 2481090929, 1940642008, 1398944049, 1059722517, 201851908, 1385547719, 1699095331, 1587397571, 674240536, 2704774806, 252314885, 3039795866, 151914247, 908333586, 2602270848, 1038082786, 651029483, 1766729511, 3447698098, 2682942837, 454166793, 2652734339, 1951935532, 775166490, 758520603, 3000790638, 4004797018, 4217086112, 4137964114, 1299594043, 1639438038, 3464344499, 2068982057, 1054729187, 1901997871, 2534638724, 4121318227, 1757008337, 0, 750906861, 1614815264, 535035132, 3363418545, 3988151131, 3201591914, 1183697867, 3647454910, 1265776953, 3734260298, 3566750796, 3903871064, 1250283471, 1807470800, 717615087, 3847203498, 384695291, 3313910595, 3617213773, 1432761139, 2484176261, 3481945413, 283769337, 100925954, 2180939647, 4037038160, 1148730428, 3123027871, 3813386408, 4087501137, 4267549603, 3229630528, 2315620239, 2906624658, 3156319645, 1215313976, 82966005, 3747855548, 3245848246, 1974459098, 1665278241, 807407632, 451280895, 251524083, 1841287890, 1283575245, 337120268, 891687699, 801369324, 3787349855, 2721421207, 3431482436, 959321879, 1469301956, 4065699751, 2197585534, 1199193405, 2898814052, 3887750493, 724703513, 2514908019, 2696962144, 2551808385, 3516813135, 2141445340, 1715741218, 2119445034, 2872807568, 2198571144, 3398190662, 700968686, 3547052216, 1009259540, 2041044702, 3803995742, 487983883, 1991105499, 1004265696, 1449407026, 1316239930, 504629770, 3683797321, 168560134, 1816667172, 3837287516, 1570751170, 1857934291, 4014189740, 2797888098, 2822345105, 2754712981, 936633572, 2347923833, 852879335, 1133234376, 1500395319, 3084545389, 2348912013, 1689376213, 3533459022, 3762923945, 3034082412, 4205598294, 133428468, 634383082, 2949277029, 2398386810, 3913789102, 403703816, 3580869306, 2297460856, 1867130149, 1918643758, 607656988, 4049053350, 3346248884, 1368901318, 600565992, 2090982877, 2632479860, 557719327, 3717614411, 3697393085, 2249034635, 2232388234, 2430627952, 1115438654, 3295786421, 2865522278, 3633334344, 84280067, 33027830, 303828494, 2747425121, 1600795957, 4188952407, 3496589753, 2434238086, 1486471617, 658119965, 3106381470, 953803233, 334231800, 3005978776, 857870609, 3151128937, 1890179545, 2298973838, 2805175444, 3056442267, 574365214, 2450884487, 550103529, 1233637070, 4289353045, 2018519080, 2057691103, 2399374476, 4166623649, 2148108681, 387583245, 3664101311, 836232934, 3330556482, 3100665960, 3280093505, 2955516313, 2002398509, 287182607, 3413881008, 4238890068, 3597515707, 975967766];\n var T32 = [1671808611, 2089089148, 2006576759, 2072901243, 4061003762, 1807603307, 1873927791, 3310653893, 810573872, 16974337, 1739181671, 729634347, 4263110654, 3613570519, 2883997099, 1989864566, 3393556426, 2191335298, 3376449993, 2106063485, 4195741690, 1508618841, 1204391495, 4027317232, 2917941677, 3563566036, 2734514082, 2951366063, 2629772188, 2767672228, 1922491506, 3227229120, 3082974647, 4246528509, 2477669779, 644500518, 911895606, 1061256767, 4144166391, 3427763148, 878471220, 2784252325, 3845444069, 4043897329, 1905517169, 3631459288, 827548209, 356461077, 67897348, 3344078279, 593839651, 3277757891, 405286936, 2527147926, 84871685, 2595565466, 118033927, 305538066, 2157648768, 3795705826, 3945188843, 661212711, 2999812018, 1973414517, 152769033, 2208177539, 745822252, 439235610, 455947803, 1857215598, 1525593178, 2700827552, 1391895634, 994932283, 3596728278, 3016654259, 695947817, 3812548067, 795958831, 2224493444, 1408607827, 3513301457, 0, 3979133421, 543178784, 4229948412, 2982705585, 1542305371, 1790891114, 3410398667, 3201918910, 961245753, 1256100938, 1289001036, 1491644504, 3477767631, 3496721360, 4012557807, 2867154858, 4212583931, 1137018435, 1305975373, 861234739, 2241073541, 1171229253, 4178635257, 33948674, 2139225727, 1357946960, 1011120188, 2679776671, 2833468328, 1374921297, 2751356323, 1086357568, 2408187279, 2460827538, 2646352285, 944271416, 4110742005, 3168756668, 3066132406, 3665145818, 560153121, 271589392, 4279952895, 4077846003, 3530407890, 3444343245, 202643468, 322250259, 3962553324, 1608629855, 2543990167, 1154254916, 389623319, 3294073796, 2817676711, 2122513534, 1028094525, 1689045092, 1575467613, 422261273, 1939203699, 1621147744, 2174228865, 1339137615, 3699352540, 577127458, 712922154, 2427141008, 2290289544, 1187679302, 3995715566, 3100863416, 339486740, 3732514782, 1591917662, 186455563, 3681988059, 3762019296, 844522546, 978220090, 169743370, 1239126601, 101321734, 611076132, 1558493276, 3260915650, 3547250131, 2901361580, 1655096418, 2443721105, 2510565781, 3828863972, 2039214713, 3878868455, 3359869896, 928607799, 1840765549, 2374762893, 3580146133, 1322425422, 2850048425, 1823791212, 1459268694, 4094161908, 3928346602, 1706019429, 2056189050, 2934523822, 135794696, 3134549946, 2022240376, 628050469, 779246638, 472135708, 2800834470, 3032970164, 3327236038, 3894660072, 3715932637, 1956440180, 522272287, 1272813131, 3185336765, 2340818315, 2323976074, 1888542832, 1044544574, 3049550261, 1722469478, 1222152264, 50660867, 4127324150, 236067854, 1638122081, 895445557, 1475980887, 3117443513, 2257655686, 3243809217, 489110045, 2662934430, 3778599393, 4162055160, 2561878936, 288563729, 1773916777, 3648039385, 2391345038, 2493985684, 2612407707, 505560094, 2274497927, 3911240169, 3460925390, 1442818645, 678973480, 3749357023, 2358182796, 2717407649, 2306869641, 219617805, 3218761151, 3862026214, 1120306242, 1756942440, 1103331905, 2578459033, 762796589, 252780047, 2966125488, 1425844308, 3151392187, 372911126];\n var T4 = [1667474886, 2088535288, 2004326894, 2071694838, 4075949567, 1802223062, 1869591006, 3318043793, 808472672, 16843522, 1734846926, 724270422, 4278065639, 3621216949, 2880169549, 1987484396, 3402253711, 2189597983, 3385409673, 2105378810, 4210693615, 1499065266, 1195886990, 4042263547, 2913856577, 3570689971, 2728590687, 2947541573, 2627518243, 2762274643, 1920112356, 3233831835, 3082273397, 4261223649, 2475929149, 640051788, 909531756, 1061110142, 4160160501, 3435941763, 875846760, 2779116625, 3857003729, 4059105529, 1903268834, 3638064043, 825316194, 353713962, 67374088, 3351728789, 589522246, 3284360861, 404236336, 2526454071, 84217610, 2593830191, 117901582, 303183396, 2155911963, 3806477791, 3958056653, 656894286, 2998062463, 1970642922, 151591698, 2206440989, 741110872, 437923380, 454765878, 1852748508, 1515908788, 2694904667, 1381168804, 993742198, 3604373943, 3014905469, 690584402, 3823320797, 791638366, 2223281939, 1398011302, 3520161977, 0, 3991743681, 538992704, 4244381667, 2981218425, 1532751286, 1785380564, 3419096717, 3200178535, 960056178, 1246420628, 1280103576, 1482221744, 3486468741, 3503319995, 4025428677, 2863326543, 4227536621, 1128514950, 1296947098, 859002214, 2240123921, 1162203018, 4193849577, 33687044, 2139062782, 1347481760, 1010582648, 2678045221, 2829640523, 1364325282, 2745433693, 1077985408, 2408548869, 2459086143, 2644360225, 943212656, 4126475505, 3166494563, 3065430391, 3671750063, 555836226, 269496352, 4294908645, 4092792573, 3537006015, 3452783745, 202118168, 320025894, 3974901699, 1600119230, 2543297077, 1145359496, 387397934, 3301201811, 2812801621, 2122220284, 1027426170, 1684319432, 1566435258, 421079858, 1936954854, 1616945344, 2172753945, 1330631070, 3705438115, 572679748, 707427924, 2425400123, 2290647819, 1179044492, 4008585671, 3099120491, 336870440, 3739122087, 1583276732, 185277718, 3688593069, 3772791771, 842159716, 976899700, 168435220, 1229577106, 101059084, 606366792, 1549591736, 3267517855, 3553849021, 2897014595, 1650632388, 2442242105, 2509612081, 3840161747, 2038008818, 3890688725, 3368567691, 926374254, 1835907034, 2374863873, 3587531953, 1313788572, 2846482505, 1819063512, 1448540844, 4109633523, 3941213647, 1701162954, 2054852340, 2930698567, 134748176, 3132806511, 2021165296, 623210314, 774795868, 471606328, 2795958615, 3031746419, 3334885783, 3907527627, 3722280097, 1953799400, 522133822, 1263263126, 3183336545, 2341176845, 2324333839, 1886425312, 1044267644, 3048588401, 1718004428, 1212733584, 50529542, 4143317495, 235803164, 1633788866, 892690282, 1465383342, 3115962473, 2256965911, 3250673817, 488449850, 2661202215, 3789633753, 4177007595, 2560144171, 286339874, 1768537042, 3654906025, 2391705863, 2492770099, 2610673197, 505291324, 2273808917, 3924369609, 3469625735, 1431699370, 673740880, 3755965093, 2358021891, 2711746649, 2307489801, 218961690, 3217021541, 3873845719, 1111672452, 1751693520, 1094828930, 2576986153, 757954394, 252645662, 2964376443, 1414855848, 3149649517, 370555436];\n var T5 = [1374988112, 2118214995, 437757123, 975658646, 1001089995, 530400753, 2902087851, 1273168787, 540080725, 2910219766, 2295101073, 4110568485, 1340463100, 3307916247, 641025152, 3043140495, 3736164937, 632953703, 1172967064, 1576976609, 3274667266, 2169303058, 2370213795, 1809054150, 59727847, 361929877, 3211623147, 2505202138, 3569255213, 1484005843, 1239443753, 2395588676, 1975683434, 4102977912, 2572697195, 666464733, 3202437046, 4035489047, 3374361702, 2110667444, 1675577880, 3843699074, 2538681184, 1649639237, 2976151520, 3144396420, 4269907996, 4178062228, 1883793496, 2403728665, 2497604743, 1383856311, 2876494627, 1917518562, 3810496343, 1716890410, 3001755655, 800440835, 2261089178, 3543599269, 807962610, 599762354, 33778362, 3977675356, 2328828971, 2809771154, 4077384432, 1315562145, 1708848333, 101039829, 3509871135, 3299278474, 875451293, 2733856160, 92987698, 2767645557, 193195065, 1080094634, 1584504582, 3178106961, 1042385657, 2531067453, 3711829422, 1306967366, 2438237621, 1908694277, 67556463, 1615861247, 429456164, 3602770327, 2302690252, 1742315127, 2968011453, 126454664, 3877198648, 2043211483, 2709260871, 2084704233, 4169408201, 0, 159417987, 841739592, 504459436, 1817866830, 4245618683, 260388950, 1034867998, 908933415, 168810852, 1750902305, 2606453969, 607530554, 202008497, 2472011535, 3035535058, 463180190, 2160117071, 1641816226, 1517767529, 470948374, 3801332234, 3231722213, 1008918595, 303765277, 235474187, 4069246893, 766945465, 337553864, 1475418501, 2943682380, 4003061179, 2743034109, 4144047775, 1551037884, 1147550661, 1543208500, 2336434550, 3408119516, 3069049960, 3102011747, 3610369226, 1113818384, 328671808, 2227573024, 2236228733, 3535486456, 2935566865, 3341394285, 496906059, 3702665459, 226906860, 2009195472, 733156972, 2842737049, 294930682, 1206477858, 2835123396, 2700099354, 1451044056, 573804783, 2269728455, 3644379585, 2362090238, 2564033334, 2801107407, 2776292904, 3669462566, 1068351396, 742039012, 1350078989, 1784663195, 1417561698, 4136440770, 2430122216, 775550814, 2193862645, 2673705150, 1775276924, 1876241833, 3475313331, 3366754619, 270040487, 3902563182, 3678124923, 3441850377, 1851332852, 3969562369, 2203032232, 3868552805, 2868897406, 566021896, 4011190502, 3135740889, 1248802510, 3936291284, 699432150, 832877231, 708780849, 3332740144, 899835584, 1951317047, 4236429990, 3767586992, 866637845, 4043610186, 1106041591, 2144161806, 395441711, 1984812685, 1139781709, 3433712980, 3835036895, 2664543715, 1282050075, 3240894392, 1181045119, 2640243204, 25965917, 4203181171, 4211818798, 3009879386, 2463879762, 3910161971, 1842759443, 2597806476, 933301370, 1509430414, 3943906441, 3467192302, 3076639029, 3776767469, 2051518780, 2631065433, 1441952575, 404016761, 1942435775, 1408749034, 1610459739, 3745345300, 2017778566, 3400528769, 3110650942, 941896748, 3265478751, 371049330, 3168937228, 675039627, 4279080257, 967311729, 135050206, 3635733660, 1683407248, 2076935265, 3576870512, 1215061108, 3501741890];\n var T6 = [1347548327, 1400783205, 3273267108, 2520393566, 3409685355, 4045380933, 2880240216, 2471224067, 1428173050, 4138563181, 2441661558, 636813900, 4233094615, 3620022987, 2149987652, 2411029155, 1239331162, 1730525723, 2554718734, 3781033664, 46346101, 310463728, 2743944855, 3328955385, 3875770207, 2501218972, 3955191162, 3667219033, 768917123, 3545789473, 692707433, 1150208456, 1786102409, 2029293177, 1805211710, 3710368113, 3065962831, 401639597, 1724457132, 3028143674, 409198410, 2196052529, 1620529459, 1164071807, 3769721975, 2226875310, 486441376, 2499348523, 1483753576, 428819965, 2274680428, 3075636216, 598438867, 3799141122, 1474502543, 711349675, 129166120, 53458370, 2592523643, 2782082824, 4063242375, 2988687269, 3120694122, 1559041666, 730517276, 2460449204, 4042459122, 2706270690, 3446004468, 3573941694, 533804130, 2328143614, 2637442643, 2695033685, 839224033, 1973745387, 957055980, 2856345839, 106852767, 1371368976, 4181598602, 1033297158, 2933734917, 1179510461, 3046200461, 91341917, 1862534868, 4284502037, 605657339, 2547432937, 3431546947, 2003294622, 3182487618, 2282195339, 954669403, 3682191598, 1201765386, 3917234703, 3388507166, 0, 2198438022, 1211247597, 2887651696, 1315723890, 4227665663, 1443857720, 507358933, 657861945, 1678381017, 560487590, 3516619604, 975451694, 2970356327, 261314535, 3535072918, 2652609425, 1333838021, 2724322336, 1767536459, 370938394, 182621114, 3854606378, 1128014560, 487725847, 185469197, 2918353863, 3106780840, 3356761769, 2237133081, 1286567175, 3152976349, 4255350624, 2683765030, 3160175349, 3309594171, 878443390, 1988838185, 3704300486, 1756818940, 1673061617, 3403100636, 272786309, 1075025698, 545572369, 2105887268, 4174560061, 296679730, 1841768865, 1260232239, 4091327024, 3960309330, 3497509347, 1814803222, 2578018489, 4195456072, 575138148, 3299409036, 446754879, 3629546796, 4011996048, 3347532110, 3252238545, 4270639778, 915985419, 3483825537, 681933534, 651868046, 2755636671, 3828103837, 223377554, 2607439820, 1649704518, 3270937875, 3901806776, 1580087799, 4118987695, 3198115200, 2087309459, 2842678573, 3016697106, 1003007129, 2802849917, 1860738147, 2077965243, 164439672, 4100872472, 32283319, 2827177882, 1709610350, 2125135846, 136428751, 3874428392, 3652904859, 3460984630, 3572145929, 3593056380, 2939266226, 824852259, 818324884, 3224740454, 930369212, 2801566410, 2967507152, 355706840, 1257309336, 4148292826, 243256656, 790073846, 2373340630, 1296297904, 1422699085, 3756299780, 3818836405, 457992840, 3099667487, 2135319889, 77422314, 1560382517, 1945798516, 788204353, 1521706781, 1385356242, 870912086, 325965383, 2358957921, 2050466060, 2388260884, 2313884476, 4006521127, 901210569, 3990953189, 1014646705, 1503449823, 1062597235, 2031621326, 3212035895, 3931371469, 1533017514, 350174575, 2256028891, 2177544179, 1052338372, 741876788, 1606591296, 1914052035, 213705253, 2334669897, 1107234197, 1899603969, 3725069491, 2631447780, 2422494913, 1635502980, 1893020342, 1950903388, 1120974935];\n var T7 = [2807058932, 1699970625, 2764249623, 1586903591, 1808481195, 1173430173, 1487645946, 59984867, 4199882800, 1844882806, 1989249228, 1277555970, 3623636965, 3419915562, 1149249077, 2744104290, 1514790577, 459744698, 244860394, 3235995134, 1963115311, 4027744588, 2544078150, 4190530515, 1608975247, 2627016082, 2062270317, 1507497298, 2200818878, 567498868, 1764313568, 3359936201, 2305455554, 2037970062, 1047239e3, 1910319033, 1337376481, 2904027272, 2892417312, 984907214, 1243112415, 830661914, 861968209, 2135253587, 2011214180, 2927934315, 2686254721, 731183368, 1750626376, 4246310725, 1820824798, 4172763771, 3542330227, 48394827, 2404901663, 2871682645, 671593195, 3254988725, 2073724613, 145085239, 2280796200, 2779915199, 1790575107, 2187128086, 472615631, 3029510009, 4075877127, 3802222185, 4107101658, 3201631749, 1646252340, 4270507174, 1402811438, 1436590835, 3778151818, 3950355702, 3963161475, 4020912224, 2667994737, 273792366, 2331590177, 104699613, 95345982, 3175501286, 2377486676, 1560637892, 3564045318, 369057872, 4213447064, 3919042237, 1137477952, 2658625497, 1119727848, 2340947849, 1530455833, 4007360968, 172466556, 266959938, 516552836, 0, 2256734592, 3980931627, 1890328081, 1917742170, 4294704398, 945164165, 3575528878, 958871085, 3647212047, 2787207260, 1423022939, 775562294, 1739656202, 3876557655, 2530391278, 2443058075, 3310321856, 547512796, 1265195639, 437656594, 3121275539, 719700128, 3762502690, 387781147, 218828297, 3350065803, 2830708150, 2848461854, 428169201, 122466165, 3720081049, 1627235199, 648017665, 4122762354, 1002783846, 2117360635, 695634755, 3336358691, 4234721005, 4049844452, 3704280881, 2232435299, 574624663, 287343814, 612205898, 1039717051, 840019705, 2708326185, 793451934, 821288114, 1391201670, 3822090177, 376187827, 3113855344, 1224348052, 1679968233, 2361698556, 1058709744, 752375421, 2431590963, 1321699145, 3519142200, 2734591178, 188127444, 2177869557, 3727205754, 2384911031, 3215212461, 2648976442, 2450346104, 3432737375, 1180849278, 331544205, 3102249176, 4150144569, 2952102595, 2159976285, 2474404304, 766078933, 313773861, 2570832044, 2108100632, 1668212892, 3145456443, 2013908262, 418672217, 3070356634, 2594734927, 1852171925, 3867060991, 3473416636, 3907448597, 2614737639, 919489135, 164948639, 2094410160, 2997825956, 590424639, 2486224549, 1723872674, 3157750862, 3399941250, 3501252752, 3625268135, 2555048196, 3673637356, 1343127501, 4130281361, 3599595085, 2957853679, 1297403050, 81781910, 3051593425, 2283490410, 532201772, 1367295589, 3926170974, 895287692, 1953757831, 1093597963, 492483431, 3528626907, 1446242576, 1192455638, 1636604631, 209336225, 344873464, 1015671571, 669961897, 3375740769, 3857572124, 2973530695, 3747192018, 1933530610, 3464042516, 935293895, 3454686199, 2858115069, 1863638845, 3683022916, 4085369519, 3292445032, 875313188, 1080017571, 3279033885, 621591778, 1233856572, 2504130317, 24197544, 3017672716, 3835484340, 3247465558, 2220981195, 3060847922, 1551124588, 1463996600];\n var T8 = [4104605777, 1097159550, 396673818, 660510266, 2875968315, 2638606623, 4200115116, 3808662347, 821712160, 1986918061, 3430322568, 38544885, 3856137295, 718002117, 893681702, 1654886325, 2975484382, 3122358053, 3926825029, 4274053469, 796197571, 1290801793, 1184342925, 3556361835, 2405426947, 2459735317, 1836772287, 1381620373, 3196267988, 1948373848, 3764988233, 3385345166, 3263785589, 2390325492, 1480485785, 3111247143, 3780097726, 2293045232, 548169417, 3459953789, 3746175075, 439452389, 1362321559, 1400849762, 1685577905, 1806599355, 2174754046, 137073913, 1214797936, 1174215055, 3731654548, 2079897426, 1943217067, 1258480242, 529487843, 1437280870, 3945269170, 3049390895, 3313212038, 923313619, 679998e3, 3215307299, 57326082, 377642221, 3474729866, 2041877159, 133361907, 1776460110, 3673476453, 96392454, 878845905, 2801699524, 777231668, 4082475170, 2330014213, 4142626212, 2213296395, 1626319424, 1906247262, 1846563261, 562755902, 3708173718, 1040559837, 3871163981, 1418573201, 3294430577, 114585348, 1343618912, 2566595609, 3186202582, 1078185097, 3651041127, 3896688048, 2307622919, 425408743, 3371096953, 2081048481, 1108339068, 2216610296, 0, 2156299017, 736970802, 292596766, 1517440620, 251657213, 2235061775, 2933202493, 758720310, 265905162, 1554391400, 1532285339, 908999204, 174567692, 1474760595, 4002861748, 2610011675, 3234156416, 3693126241, 2001430874, 303699484, 2478443234, 2687165888, 585122620, 454499602, 151849742, 2345119218, 3064510765, 514443284, 4044981591, 1963412655, 2581445614, 2137062819, 19308535, 1928707164, 1715193156, 4219352155, 1126790795, 600235211, 3992742070, 3841024952, 836553431, 1669664834, 2535604243, 3323011204, 1243905413, 3141400786, 4180808110, 698445255, 2653899549, 2989552604, 2253581325, 3252932727, 3004591147, 1891211689, 2487810577, 3915653703, 4237083816, 4030667424, 2100090966, 865136418, 1229899655, 953270745, 3399679628, 3557504664, 4118925222, 2061379749, 3079546586, 2915017791, 983426092, 2022837584, 1607244650, 2118541908, 2366882550, 3635996816, 972512814, 3283088770, 1568718495, 3499326569, 3576539503, 621982671, 2895723464, 410887952, 2623762152, 1002142683, 645401037, 1494807662, 2595684844, 1335535747, 2507040230, 4293295786, 3167684641, 367585007, 3885750714, 1865862730, 2668221674, 2960971305, 2763173681, 1059270954, 2777952454, 2724642869, 1320957812, 2194319100, 2429595872, 2815956275, 77089521, 3973773121, 3444575871, 2448830231, 1305906550, 4021308739, 2857194700, 2516901860, 3518358430, 1787304780, 740276417, 1699839814, 1592394909, 2352307457, 2272556026, 188821243, 1729977011, 3687994002, 274084841, 3594982253, 3613494426, 2701949495, 4162096729, 322734571, 2837966542, 1640576439, 484830689, 1202797690, 3537852828, 4067639125, 349075736, 3342319475, 4157467219, 4255800159, 1030690015, 1155237496, 2951971274, 1757691577, 607398968, 2738905026, 499347990, 3794078908, 1011452712, 227885567, 2818666809, 213114376, 3034881240, 1455525988, 3414450555, 850817237, 1817998408, 3092726480];\n var U1 = [0, 235474187, 470948374, 303765277, 941896748, 908933415, 607530554, 708780849, 1883793496, 2118214995, 1817866830, 1649639237, 1215061108, 1181045119, 1417561698, 1517767529, 3767586992, 4003061179, 4236429990, 4069246893, 3635733660, 3602770327, 3299278474, 3400528769, 2430122216, 2664543715, 2362090238, 2193862645, 2835123396, 2801107407, 3035535058, 3135740889, 3678124923, 3576870512, 3341394285, 3374361702, 3810496343, 3977675356, 4279080257, 4043610186, 2876494627, 2776292904, 3076639029, 3110650942, 2472011535, 2640243204, 2403728665, 2169303058, 1001089995, 899835584, 666464733, 699432150, 59727847, 226906860, 530400753, 294930682, 1273168787, 1172967064, 1475418501, 1509430414, 1942435775, 2110667444, 1876241833, 1641816226, 2910219766, 2743034109, 2976151520, 3211623147, 2505202138, 2606453969, 2302690252, 2269728455, 3711829422, 3543599269, 3240894392, 3475313331, 3843699074, 3943906441, 4178062228, 4144047775, 1306967366, 1139781709, 1374988112, 1610459739, 1975683434, 2076935265, 1775276924, 1742315127, 1034867998, 866637845, 566021896, 800440835, 92987698, 193195065, 429456164, 395441711, 1984812685, 2017778566, 1784663195, 1683407248, 1315562145, 1080094634, 1383856311, 1551037884, 101039829, 135050206, 437757123, 337553864, 1042385657, 807962610, 573804783, 742039012, 2531067453, 2564033334, 2328828971, 2227573024, 2935566865, 2700099354, 3001755655, 3168937228, 3868552805, 3902563182, 4203181171, 4102977912, 3736164937, 3501741890, 3265478751, 3433712980, 1106041591, 1340463100, 1576976609, 1408749034, 2043211483, 2009195472, 1708848333, 1809054150, 832877231, 1068351396, 766945465, 599762354, 159417987, 126454664, 361929877, 463180190, 2709260871, 2943682380, 3178106961, 3009879386, 2572697195, 2538681184, 2236228733, 2336434550, 3509871135, 3745345300, 3441850377, 3274667266, 3910161971, 3877198648, 4110568485, 4211818798, 2597806476, 2497604743, 2261089178, 2295101073, 2733856160, 2902087851, 3202437046, 2968011453, 3936291284, 3835036895, 4136440770, 4169408201, 3535486456, 3702665459, 3467192302, 3231722213, 2051518780, 1951317047, 1716890410, 1750902305, 1113818384, 1282050075, 1584504582, 1350078989, 168810852, 67556463, 371049330, 404016761, 841739592, 1008918595, 775550814, 540080725, 3969562369, 3801332234, 4035489047, 4269907996, 3569255213, 3669462566, 3366754619, 3332740144, 2631065433, 2463879762, 2160117071, 2395588676, 2767645557, 2868897406, 3102011747, 3069049960, 202008497, 33778362, 270040487, 504459436, 875451293, 975658646, 675039627, 641025152, 2084704233, 1917518562, 1615861247, 1851332852, 1147550661, 1248802510, 1484005843, 1451044056, 933301370, 967311729, 733156972, 632953703, 260388950, 25965917, 328671808, 496906059, 1206477858, 1239443753, 1543208500, 1441952575, 2144161806, 1908694277, 1675577880, 1842759443, 3610369226, 3644379585, 3408119516, 3307916247, 4011190502, 3776767469, 4077384432, 4245618683, 2809771154, 2842737049, 3144396420, 3043140495, 2673705150, 2438237621, 2203032232, 2370213795];\n var U22 = [0, 185469197, 370938394, 487725847, 741876788, 657861945, 975451694, 824852259, 1483753576, 1400783205, 1315723890, 1164071807, 1950903388, 2135319889, 1649704518, 1767536459, 2967507152, 3152976349, 2801566410, 2918353863, 2631447780, 2547432937, 2328143614, 2177544179, 3901806776, 3818836405, 4270639778, 4118987695, 3299409036, 3483825537, 3535072918, 3652904859, 2077965243, 1893020342, 1841768865, 1724457132, 1474502543, 1559041666, 1107234197, 1257309336, 598438867, 681933534, 901210569, 1052338372, 261314535, 77422314, 428819965, 310463728, 3409685355, 3224740454, 3710368113, 3593056380, 3875770207, 3960309330, 4045380933, 4195456072, 2471224067, 2554718734, 2237133081, 2388260884, 3212035895, 3028143674, 2842678573, 2724322336, 4138563181, 4255350624, 3769721975, 3955191162, 3667219033, 3516619604, 3431546947, 3347532110, 2933734917, 2782082824, 3099667487, 3016697106, 2196052529, 2313884476, 2499348523, 2683765030, 1179510461, 1296297904, 1347548327, 1533017514, 1786102409, 1635502980, 2087309459, 2003294622, 507358933, 355706840, 136428751, 53458370, 839224033, 957055980, 605657339, 790073846, 2373340630, 2256028891, 2607439820, 2422494913, 2706270690, 2856345839, 3075636216, 3160175349, 3573941694, 3725069491, 3273267108, 3356761769, 4181598602, 4063242375, 4011996048, 3828103837, 1033297158, 915985419, 730517276, 545572369, 296679730, 446754879, 129166120, 213705253, 1709610350, 1860738147, 1945798516, 2029293177, 1239331162, 1120974935, 1606591296, 1422699085, 4148292826, 4233094615, 3781033664, 3931371469, 3682191598, 3497509347, 3446004468, 3328955385, 2939266226, 2755636671, 3106780840, 2988687269, 2198438022, 2282195339, 2501218972, 2652609425, 1201765386, 1286567175, 1371368976, 1521706781, 1805211710, 1620529459, 2105887268, 1988838185, 533804130, 350174575, 164439672, 46346101, 870912086, 954669403, 636813900, 788204353, 2358957921, 2274680428, 2592523643, 2441661558, 2695033685, 2880240216, 3065962831, 3182487618, 3572145929, 3756299780, 3270937875, 3388507166, 4174560061, 4091327024, 4006521127, 3854606378, 1014646705, 930369212, 711349675, 560487590, 272786309, 457992840, 106852767, 223377554, 1678381017, 1862534868, 1914052035, 2031621326, 1211247597, 1128014560, 1580087799, 1428173050, 32283319, 182621114, 401639597, 486441376, 768917123, 651868046, 1003007129, 818324884, 1503449823, 1385356242, 1333838021, 1150208456, 1973745387, 2125135846, 1673061617, 1756818940, 2970356327, 3120694122, 2802849917, 2887651696, 2637442643, 2520393566, 2334669897, 2149987652, 3917234703, 3799141122, 4284502037, 4100872472, 3309594171, 3460984630, 3545789473, 3629546796, 2050466060, 1899603969, 1814803222, 1730525723, 1443857720, 1560382517, 1075025698, 1260232239, 575138148, 692707433, 878443390, 1062597235, 243256656, 91341917, 409198410, 325965383, 3403100636, 3252238545, 3704300486, 3620022987, 3874428392, 3990953189, 4042459122, 4227665663, 2460449204, 2578018489, 2226875310, 2411029155, 3198115200, 3046200461, 2827177882, 2743944855];\n var U32 = [0, 218828297, 437656594, 387781147, 875313188, 958871085, 775562294, 590424639, 1750626376, 1699970625, 1917742170, 2135253587, 1551124588, 1367295589, 1180849278, 1265195639, 3501252752, 3720081049, 3399941250, 3350065803, 3835484340, 3919042237, 4270507174, 4085369519, 3102249176, 3051593425, 2734591178, 2952102595, 2361698556, 2177869557, 2530391278, 2614737639, 3145456443, 3060847922, 2708326185, 2892417312, 2404901663, 2187128086, 2504130317, 2555048196, 3542330227, 3727205754, 3375740769, 3292445032, 3876557655, 3926170974, 4246310725, 4027744588, 1808481195, 1723872674, 1910319033, 2094410160, 1608975247, 1391201670, 1173430173, 1224348052, 59984867, 244860394, 428169201, 344873464, 935293895, 984907214, 766078933, 547512796, 1844882806, 1627235199, 2011214180, 2062270317, 1507497298, 1423022939, 1137477952, 1321699145, 95345982, 145085239, 532201772, 313773861, 830661914, 1015671571, 731183368, 648017665, 3175501286, 2957853679, 2807058932, 2858115069, 2305455554, 2220981195, 2474404304, 2658625497, 3575528878, 3625268135, 3473416636, 3254988725, 3778151818, 3963161475, 4213447064, 4130281361, 3599595085, 3683022916, 3432737375, 3247465558, 3802222185, 4020912224, 4172763771, 4122762354, 3201631749, 3017672716, 2764249623, 2848461854, 2331590177, 2280796200, 2431590963, 2648976442, 104699613, 188127444, 472615631, 287343814, 840019705, 1058709744, 671593195, 621591778, 1852171925, 1668212892, 1953757831, 2037970062, 1514790577, 1463996600, 1080017571, 1297403050, 3673637356, 3623636965, 3235995134, 3454686199, 4007360968, 3822090177, 4107101658, 4190530515, 2997825956, 3215212461, 2830708150, 2779915199, 2256734592, 2340947849, 2627016082, 2443058075, 172466556, 122466165, 273792366, 492483431, 1047239e3, 861968209, 612205898, 695634755, 1646252340, 1863638845, 2013908262, 1963115311, 1446242576, 1530455833, 1277555970, 1093597963, 1636604631, 1820824798, 2073724613, 1989249228, 1436590835, 1487645946, 1337376481, 1119727848, 164948639, 81781910, 331544205, 516552836, 1039717051, 821288114, 669961897, 719700128, 2973530695, 3157750862, 2871682645, 2787207260, 2232435299, 2283490410, 2667994737, 2450346104, 3647212047, 3564045318, 3279033885, 3464042516, 3980931627, 3762502690, 4150144569, 4199882800, 3070356634, 3121275539, 2904027272, 2686254721, 2200818878, 2384911031, 2570832044, 2486224549, 3747192018, 3528626907, 3310321856, 3359936201, 3950355702, 3867060991, 4049844452, 4234721005, 1739656202, 1790575107, 2108100632, 1890328081, 1402811438, 1586903591, 1233856572, 1149249077, 266959938, 48394827, 369057872, 418672217, 1002783846, 919489135, 567498868, 752375421, 209336225, 24197544, 376187827, 459744698, 945164165, 895287692, 574624663, 793451934, 1679968233, 1764313568, 2117360635, 1933530610, 1343127501, 1560637892, 1243112415, 1192455638, 3704280881, 3519142200, 3336358691, 3419915562, 3907448597, 3857572124, 4075877127, 4294704398, 3029510009, 3113855344, 2927934315, 2744104290, 2159976285, 2377486676, 2594734927, 2544078150];\n var U4 = [0, 151849742, 303699484, 454499602, 607398968, 758720310, 908999204, 1059270954, 1214797936, 1097159550, 1517440620, 1400849762, 1817998408, 1699839814, 2118541908, 2001430874, 2429595872, 2581445614, 2194319100, 2345119218, 3034881240, 3186202582, 2801699524, 2951971274, 3635996816, 3518358430, 3399679628, 3283088770, 4237083816, 4118925222, 4002861748, 3885750714, 1002142683, 850817237, 698445255, 548169417, 529487843, 377642221, 227885567, 77089521, 1943217067, 2061379749, 1640576439, 1757691577, 1474760595, 1592394909, 1174215055, 1290801793, 2875968315, 2724642869, 3111247143, 2960971305, 2405426947, 2253581325, 2638606623, 2487810577, 3808662347, 3926825029, 4044981591, 4162096729, 3342319475, 3459953789, 3576539503, 3693126241, 1986918061, 2137062819, 1685577905, 1836772287, 1381620373, 1532285339, 1078185097, 1229899655, 1040559837, 923313619, 740276417, 621982671, 439452389, 322734571, 137073913, 19308535, 3871163981, 4021308739, 4104605777, 4255800159, 3263785589, 3414450555, 3499326569, 3651041127, 2933202493, 2815956275, 3167684641, 3049390895, 2330014213, 2213296395, 2566595609, 2448830231, 1305906550, 1155237496, 1607244650, 1455525988, 1776460110, 1626319424, 2079897426, 1928707164, 96392454, 213114376, 396673818, 514443284, 562755902, 679998e3, 865136418, 983426092, 3708173718, 3557504664, 3474729866, 3323011204, 4180808110, 4030667424, 3945269170, 3794078908, 2507040230, 2623762152, 2272556026, 2390325492, 2975484382, 3092726480, 2738905026, 2857194700, 3973773121, 3856137295, 4274053469, 4157467219, 3371096953, 3252932727, 3673476453, 3556361835, 2763173681, 2915017791, 3064510765, 3215307299, 2156299017, 2307622919, 2459735317, 2610011675, 2081048481, 1963412655, 1846563261, 1729977011, 1480485785, 1362321559, 1243905413, 1126790795, 878845905, 1030690015, 645401037, 796197571, 274084841, 425408743, 38544885, 188821243, 3613494426, 3731654548, 3313212038, 3430322568, 4082475170, 4200115116, 3780097726, 3896688048, 2668221674, 2516901860, 2366882550, 2216610296, 3141400786, 2989552604, 2837966542, 2687165888, 1202797690, 1320957812, 1437280870, 1554391400, 1669664834, 1787304780, 1906247262, 2022837584, 265905162, 114585348, 499347990, 349075736, 736970802, 585122620, 972512814, 821712160, 2595684844, 2478443234, 2293045232, 2174754046, 3196267988, 3079546586, 2895723464, 2777952454, 3537852828, 3687994002, 3234156416, 3385345166, 4142626212, 4293295786, 3841024952, 3992742070, 174567692, 57326082, 410887952, 292596766, 777231668, 660510266, 1011452712, 893681702, 1108339068, 1258480242, 1343618912, 1494807662, 1715193156, 1865862730, 1948373848, 2100090966, 2701949495, 2818666809, 3004591147, 3122358053, 2235061775, 2352307457, 2535604243, 2653899549, 3915653703, 3764988233, 4219352155, 4067639125, 3444575871, 3294430577, 3746175075, 3594982253, 836553431, 953270745, 600235211, 718002117, 367585007, 484830689, 133361907, 251657213, 2041877159, 1891211689, 1806599355, 1654886325, 1568718495, 1418573201, 1335535747, 1184342925];\n function convertToInt32(bytes) {\n const result = [];\n for (let i3 = 0; i3 < bytes.length; i3 += 4) {\n result.push(bytes[i3] << 24 | bytes[i3 + 1] << 16 | bytes[i3 + 2] << 8 | bytes[i3 + 3]);\n }\n return result;\n }\n var AES = class _AES {\n get key() {\n return __classPrivateFieldGet4(this, _AES_key, \"f\").slice();\n }\n constructor(key) {\n _AES_key.set(this, void 0);\n _AES_Kd.set(this, void 0);\n _AES_Ke.set(this, void 0);\n if (!(this instanceof _AES)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n __classPrivateFieldSet4(this, _AES_key, new Uint8Array(key), \"f\");\n const rounds = numberOfRounds[this.key.length];\n if (rounds == null) {\n throw new TypeError(\"invalid key size (must be 16, 24 or 32 bytes)\");\n }\n __classPrivateFieldSet4(this, _AES_Ke, [], \"f\");\n __classPrivateFieldSet4(this, _AES_Kd, [], \"f\");\n for (let i3 = 0; i3 <= rounds; i3++) {\n __classPrivateFieldGet4(this, _AES_Ke, \"f\").push([0, 0, 0, 0]);\n __classPrivateFieldGet4(this, _AES_Kd, \"f\").push([0, 0, 0, 0]);\n }\n const roundKeyCount = (rounds + 1) * 4;\n const KC = this.key.length / 4;\n const tk = convertToInt32(this.key);\n let index2;\n for (let i3 = 0; i3 < KC; i3++) {\n index2 = i3 >> 2;\n __classPrivateFieldGet4(this, _AES_Ke, \"f\")[index2][i3 % 4] = tk[i3];\n __classPrivateFieldGet4(this, _AES_Kd, \"f\")[rounds - index2][i3 % 4] = tk[i3];\n }\n let rconpointer = 0;\n let t3 = KC, tt;\n while (t3 < roundKeyCount) {\n tt = tk[KC - 1];\n tk[0] ^= S3[tt >> 16 & 255] << 24 ^ S3[tt >> 8 & 255] << 16 ^ S3[tt & 255] << 8 ^ S3[tt >> 24 & 255] ^ rcon[rconpointer] << 24;\n rconpointer += 1;\n if (KC != 8) {\n for (let i4 = 1; i4 < KC; i4++) {\n tk[i4] ^= tk[i4 - 1];\n }\n } else {\n for (let i4 = 1; i4 < KC / 2; i4++) {\n tk[i4] ^= tk[i4 - 1];\n }\n tt = tk[KC / 2 - 1];\n tk[KC / 2] ^= S3[tt & 255] ^ S3[tt >> 8 & 255] << 8 ^ S3[tt >> 16 & 255] << 16 ^ S3[tt >> 24 & 255] << 24;\n for (let i4 = KC / 2 + 1; i4 < KC; i4++) {\n tk[i4] ^= tk[i4 - 1];\n }\n }\n let i3 = 0, r2, c4;\n while (i3 < KC && t3 < roundKeyCount) {\n r2 = t3 >> 2;\n c4 = t3 % 4;\n __classPrivateFieldGet4(this, _AES_Ke, \"f\")[r2][c4] = tk[i3];\n __classPrivateFieldGet4(this, _AES_Kd, \"f\")[rounds - r2][c4] = tk[i3++];\n t3++;\n }\n }\n for (let r2 = 1; r2 < rounds; r2++) {\n for (let c4 = 0; c4 < 4; c4++) {\n tt = __classPrivateFieldGet4(this, _AES_Kd, \"f\")[r2][c4];\n __classPrivateFieldGet4(this, _AES_Kd, \"f\")[r2][c4] = U1[tt >> 24 & 255] ^ U22[tt >> 16 & 255] ^ U32[tt >> 8 & 255] ^ U4[tt & 255];\n }\n }\n }\n encrypt(plaintext) {\n if (plaintext.length != 16) {\n throw new TypeError(\"invalid plaintext size (must be 16 bytes)\");\n }\n const rounds = __classPrivateFieldGet4(this, _AES_Ke, \"f\").length - 1;\n const a3 = [0, 0, 0, 0];\n let t3 = convertToInt32(plaintext);\n for (let i3 = 0; i3 < 4; i3++) {\n t3[i3] ^= __classPrivateFieldGet4(this, _AES_Ke, \"f\")[0][i3];\n }\n for (let r2 = 1; r2 < rounds; r2++) {\n for (let i3 = 0; i3 < 4; i3++) {\n a3[i3] = T1[t3[i3] >> 24 & 255] ^ T22[t3[(i3 + 1) % 4] >> 16 & 255] ^ T32[t3[(i3 + 2) % 4] >> 8 & 255] ^ T4[t3[(i3 + 3) % 4] & 255] ^ __classPrivateFieldGet4(this, _AES_Ke, \"f\")[r2][i3];\n }\n t3 = a3.slice();\n }\n const result = new Uint8Array(16);\n let tt = 0;\n for (let i3 = 0; i3 < 4; i3++) {\n tt = __classPrivateFieldGet4(this, _AES_Ke, \"f\")[rounds][i3];\n result[4 * i3] = (S3[t3[i3] >> 24 & 255] ^ tt >> 24) & 255;\n result[4 * i3 + 1] = (S3[t3[(i3 + 1) % 4] >> 16 & 255] ^ tt >> 16) & 255;\n result[4 * i3 + 2] = (S3[t3[(i3 + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255;\n result[4 * i3 + 3] = (S3[t3[(i3 + 3) % 4] & 255] ^ tt) & 255;\n }\n return result;\n }\n decrypt(ciphertext) {\n if (ciphertext.length != 16) {\n throw new TypeError(\"invalid ciphertext size (must be 16 bytes)\");\n }\n const rounds = __classPrivateFieldGet4(this, _AES_Kd, \"f\").length - 1;\n const a3 = [0, 0, 0, 0];\n let t3 = convertToInt32(ciphertext);\n for (let i3 = 0; i3 < 4; i3++) {\n t3[i3] ^= __classPrivateFieldGet4(this, _AES_Kd, \"f\")[0][i3];\n }\n for (let r2 = 1; r2 < rounds; r2++) {\n for (let i3 = 0; i3 < 4; i3++) {\n a3[i3] = T5[t3[i3] >> 24 & 255] ^ T6[t3[(i3 + 3) % 4] >> 16 & 255] ^ T7[t3[(i3 + 2) % 4] >> 8 & 255] ^ T8[t3[(i3 + 1) % 4] & 255] ^ __classPrivateFieldGet4(this, _AES_Kd, \"f\")[r2][i3];\n }\n t3 = a3.slice();\n }\n const result = new Uint8Array(16);\n let tt = 0;\n for (let i3 = 0; i3 < 4; i3++) {\n tt = __classPrivateFieldGet4(this, _AES_Kd, \"f\")[rounds][i3];\n result[4 * i3] = (Si[t3[i3] >> 24 & 255] ^ tt >> 24) & 255;\n result[4 * i3 + 1] = (Si[t3[(i3 + 3) % 4] >> 16 & 255] ^ tt >> 16) & 255;\n result[4 * i3 + 2] = (Si[t3[(i3 + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255;\n result[4 * i3 + 3] = (Si[t3[(i3 + 1) % 4] & 255] ^ tt) & 255;\n }\n return result;\n }\n };\n exports3.AES = AES;\n _AES_key = /* @__PURE__ */ new WeakMap(), _AES_Kd = /* @__PURE__ */ new WeakMap(), _AES_Ke = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode.js\n var require_mode = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ModeOfOperation = void 0;\n var aes_js_1 = require_aes();\n var ModeOfOperation = class {\n constructor(name, key, cls) {\n if (cls && !(this instanceof cls)) {\n throw new Error(`${name} must be instantiated with \"new\"`);\n }\n Object.defineProperties(this, {\n aes: { enumerable: true, value: new aes_js_1.AES(key) },\n name: { enumerable: true, value: name }\n });\n }\n };\n exports3.ModeOfOperation = ModeOfOperation;\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-cbc.js\n var require_mode_cbc = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-cbc.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldSet4 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f7) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f7.call(receiver, value) : f7 ? f7.value = value : state.set(receiver, value), value;\n };\n var __classPrivateFieldGet4 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f7) {\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f7 : kind === \"a\" ? f7.call(receiver) : f7 ? f7.value : state.get(receiver);\n };\n var _CBC_iv;\n var _CBC_lastBlock;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CBC = void 0;\n var mode_js_1 = require_mode();\n var CBC = class _CBC extends mode_js_1.ModeOfOperation {\n constructor(key, iv) {\n super(\"ECC\", key, _CBC);\n _CBC_iv.set(this, void 0);\n _CBC_lastBlock.set(this, void 0);\n if (iv) {\n if (iv.length % 16) {\n throw new TypeError(\"invalid iv size (must be 16 bytes)\");\n }\n __classPrivateFieldSet4(this, _CBC_iv, new Uint8Array(iv), \"f\");\n } else {\n __classPrivateFieldSet4(this, _CBC_iv, new Uint8Array(16), \"f\");\n }\n __classPrivateFieldSet4(this, _CBC_lastBlock, this.iv, \"f\");\n }\n get iv() {\n return new Uint8Array(__classPrivateFieldGet4(this, _CBC_iv, \"f\"));\n }\n encrypt(plaintext) {\n if (plaintext.length % 16) {\n throw new TypeError(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n const ciphertext = new Uint8Array(plaintext.length);\n for (let i3 = 0; i3 < plaintext.length; i3 += 16) {\n for (let j2 = 0; j2 < 16; j2++) {\n __classPrivateFieldGet4(this, _CBC_lastBlock, \"f\")[j2] ^= plaintext[i3 + j2];\n }\n __classPrivateFieldSet4(this, _CBC_lastBlock, this.aes.encrypt(__classPrivateFieldGet4(this, _CBC_lastBlock, \"f\")), \"f\");\n ciphertext.set(__classPrivateFieldGet4(this, _CBC_lastBlock, \"f\"), i3);\n }\n return ciphertext;\n }\n decrypt(ciphertext) {\n if (ciphertext.length % 16) {\n throw new TypeError(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n const plaintext = new Uint8Array(ciphertext.length);\n for (let i3 = 0; i3 < ciphertext.length; i3 += 16) {\n const block = this.aes.decrypt(ciphertext.subarray(i3, i3 + 16));\n for (let j2 = 0; j2 < 16; j2++) {\n plaintext[i3 + j2] = block[j2] ^ __classPrivateFieldGet4(this, _CBC_lastBlock, \"f\")[j2];\n __classPrivateFieldGet4(this, _CBC_lastBlock, \"f\")[j2] = ciphertext[i3 + j2];\n }\n }\n return plaintext;\n }\n };\n exports3.CBC = CBC;\n _CBC_iv = /* @__PURE__ */ new WeakMap(), _CBC_lastBlock = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-cfb.js\n var require_mode_cfb = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-cfb.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldSet4 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f7) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f7.call(receiver, value) : f7 ? f7.value = value : state.set(receiver, value), value;\n };\n var __classPrivateFieldGet4 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f7) {\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f7 : kind === \"a\" ? f7.call(receiver) : f7 ? f7.value : state.get(receiver);\n };\n var _CFB_instances;\n var _CFB_iv;\n var _CFB_shiftRegister;\n var _CFB_shift;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CFB = void 0;\n var mode_js_1 = require_mode();\n var CFB = class _CFB extends mode_js_1.ModeOfOperation {\n constructor(key, iv, segmentSize = 8) {\n super(\"CFB\", key, _CFB);\n _CFB_instances.add(this);\n _CFB_iv.set(this, void 0);\n _CFB_shiftRegister.set(this, void 0);\n if (!Number.isInteger(segmentSize) || segmentSize % 8) {\n throw new TypeError(\"invalid segmentSize\");\n }\n Object.defineProperties(this, {\n segmentSize: { enumerable: true, value: segmentSize }\n });\n if (iv) {\n if (iv.length % 16) {\n throw new TypeError(\"invalid iv size (must be 16 bytes)\");\n }\n __classPrivateFieldSet4(this, _CFB_iv, new Uint8Array(iv), \"f\");\n } else {\n __classPrivateFieldSet4(this, _CFB_iv, new Uint8Array(16), \"f\");\n }\n __classPrivateFieldSet4(this, _CFB_shiftRegister, this.iv, \"f\");\n }\n get iv() {\n return new Uint8Array(__classPrivateFieldGet4(this, _CFB_iv, \"f\"));\n }\n encrypt(plaintext) {\n if (8 * plaintext.length % this.segmentSize) {\n throw new TypeError(\"invalid plaintext size (must be multiple of segmentSize bytes)\");\n }\n const segmentSize = this.segmentSize / 8;\n const ciphertext = new Uint8Array(plaintext);\n for (let i3 = 0; i3 < ciphertext.length; i3 += segmentSize) {\n const xorSegment = this.aes.encrypt(__classPrivateFieldGet4(this, _CFB_shiftRegister, \"f\"));\n for (let j2 = 0; j2 < segmentSize; j2++) {\n ciphertext[i3 + j2] ^= xorSegment[j2];\n }\n __classPrivateFieldGet4(this, _CFB_instances, \"m\", _CFB_shift).call(this, ciphertext.subarray(i3));\n }\n return ciphertext;\n }\n decrypt(ciphertext) {\n if (8 * ciphertext.length % this.segmentSize) {\n throw new TypeError(\"invalid ciphertext size (must be multiple of segmentSize bytes)\");\n }\n const segmentSize = this.segmentSize / 8;\n const plaintext = new Uint8Array(ciphertext);\n for (let i3 = 0; i3 < plaintext.length; i3 += segmentSize) {\n const xorSegment = this.aes.encrypt(__classPrivateFieldGet4(this, _CFB_shiftRegister, \"f\"));\n for (let j2 = 0; j2 < segmentSize; j2++) {\n plaintext[i3 + j2] ^= xorSegment[j2];\n }\n __classPrivateFieldGet4(this, _CFB_instances, \"m\", _CFB_shift).call(this, ciphertext.subarray(i3));\n }\n return plaintext;\n }\n };\n exports3.CFB = CFB;\n _CFB_iv = /* @__PURE__ */ new WeakMap(), _CFB_shiftRegister = /* @__PURE__ */ new WeakMap(), _CFB_instances = /* @__PURE__ */ new WeakSet(), _CFB_shift = function _CFB_shift2(data) {\n const segmentSize = this.segmentSize / 8;\n __classPrivateFieldGet4(this, _CFB_shiftRegister, \"f\").set(__classPrivateFieldGet4(this, _CFB_shiftRegister, \"f\").subarray(segmentSize));\n __classPrivateFieldGet4(this, _CFB_shiftRegister, \"f\").set(data.subarray(0, segmentSize), 16 - segmentSize);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ctr.js\n var require_mode_ctr = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ctr.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldSet4 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f7) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f7.call(receiver, value) : f7 ? f7.value = value : state.set(receiver, value), value;\n };\n var __classPrivateFieldGet4 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f7) {\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f7 : kind === \"a\" ? f7.call(receiver) : f7 ? f7.value : state.get(receiver);\n };\n var _CTR_remaining;\n var _CTR_remainingIndex;\n var _CTR_counter;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CTR = void 0;\n var mode_js_1 = require_mode();\n var CTR = class _CTR extends mode_js_1.ModeOfOperation {\n constructor(key, initialValue) {\n super(\"CTR\", key, _CTR);\n _CTR_remaining.set(this, void 0);\n _CTR_remainingIndex.set(this, void 0);\n _CTR_counter.set(this, void 0);\n __classPrivateFieldSet4(this, _CTR_counter, new Uint8Array(16), \"f\");\n __classPrivateFieldGet4(this, _CTR_counter, \"f\").fill(0);\n __classPrivateFieldSet4(this, _CTR_remaining, __classPrivateFieldGet4(this, _CTR_counter, \"f\"), \"f\");\n __classPrivateFieldSet4(this, _CTR_remainingIndex, 16, \"f\");\n if (initialValue == null) {\n initialValue = 1;\n }\n if (typeof initialValue === \"number\") {\n this.setCounterValue(initialValue);\n } else {\n this.setCounterBytes(initialValue);\n }\n }\n get counter() {\n return new Uint8Array(__classPrivateFieldGet4(this, _CTR_counter, \"f\"));\n }\n setCounterValue(value) {\n if (!Number.isInteger(value) || value < 0 || value > Number.MAX_SAFE_INTEGER) {\n throw new TypeError(\"invalid counter initial integer value\");\n }\n for (let index2 = 15; index2 >= 0; --index2) {\n __classPrivateFieldGet4(this, _CTR_counter, \"f\")[index2] = value % 256;\n value = Math.floor(value / 256);\n }\n }\n setCounterBytes(value) {\n if (value.length !== 16) {\n throw new TypeError(\"invalid counter initial Uint8Array value length\");\n }\n __classPrivateFieldGet4(this, _CTR_counter, \"f\").set(value);\n }\n increment() {\n for (let i3 = 15; i3 >= 0; i3--) {\n if (__classPrivateFieldGet4(this, _CTR_counter, \"f\")[i3] === 255) {\n __classPrivateFieldGet4(this, _CTR_counter, \"f\")[i3] = 0;\n } else {\n __classPrivateFieldGet4(this, _CTR_counter, \"f\")[i3]++;\n break;\n }\n }\n }\n encrypt(plaintext) {\n var _a, _b;\n const crypttext = new Uint8Array(plaintext);\n for (let i3 = 0; i3 < crypttext.length; i3++) {\n if (__classPrivateFieldGet4(this, _CTR_remainingIndex, \"f\") === 16) {\n __classPrivateFieldSet4(this, _CTR_remaining, this.aes.encrypt(__classPrivateFieldGet4(this, _CTR_counter, \"f\")), \"f\");\n __classPrivateFieldSet4(this, _CTR_remainingIndex, 0, \"f\");\n this.increment();\n }\n crypttext[i3] ^= __classPrivateFieldGet4(this, _CTR_remaining, \"f\")[__classPrivateFieldSet4(this, _CTR_remainingIndex, (_b = __classPrivateFieldGet4(this, _CTR_remainingIndex, \"f\"), _a = _b++, _b), \"f\"), _a];\n }\n return crypttext;\n }\n decrypt(ciphertext) {\n return this.encrypt(ciphertext);\n }\n };\n exports3.CTR = CTR;\n _CTR_remaining = /* @__PURE__ */ new WeakMap(), _CTR_remainingIndex = /* @__PURE__ */ new WeakMap(), _CTR_counter = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ecb.js\n var require_mode_ecb = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ecb.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ECB = void 0;\n var mode_js_1 = require_mode();\n var ECB = class _ECB extends mode_js_1.ModeOfOperation {\n constructor(key) {\n super(\"ECB\", key, _ECB);\n }\n encrypt(plaintext) {\n if (plaintext.length % 16) {\n throw new TypeError(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n const crypttext = new Uint8Array(plaintext.length);\n for (let i3 = 0; i3 < plaintext.length; i3 += 16) {\n crypttext.set(this.aes.encrypt(plaintext.subarray(i3, i3 + 16)), i3);\n }\n return crypttext;\n }\n decrypt(crypttext) {\n if (crypttext.length % 16) {\n throw new TypeError(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n const plaintext = new Uint8Array(crypttext.length);\n for (let i3 = 0; i3 < crypttext.length; i3 += 16) {\n plaintext.set(this.aes.decrypt(crypttext.subarray(i3, i3 + 16)), i3);\n }\n return plaintext;\n }\n };\n exports3.ECB = ECB;\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ofb.js\n var require_mode_ofb = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ofb.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldSet4 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f7) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f7.call(receiver, value) : f7 ? f7.value = value : state.set(receiver, value), value;\n };\n var __classPrivateFieldGet4 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f7) {\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f7 : kind === \"a\" ? f7.call(receiver) : f7 ? f7.value : state.get(receiver);\n };\n var _OFB_iv;\n var _OFB_lastPrecipher;\n var _OFB_lastPrecipherIndex;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.OFB = void 0;\n var mode_js_1 = require_mode();\n var OFB = class _OFB extends mode_js_1.ModeOfOperation {\n constructor(key, iv) {\n super(\"OFB\", key, _OFB);\n _OFB_iv.set(this, void 0);\n _OFB_lastPrecipher.set(this, void 0);\n _OFB_lastPrecipherIndex.set(this, void 0);\n if (iv) {\n if (iv.length % 16) {\n throw new TypeError(\"invalid iv size (must be 16 bytes)\");\n }\n __classPrivateFieldSet4(this, _OFB_iv, new Uint8Array(iv), \"f\");\n } else {\n __classPrivateFieldSet4(this, _OFB_iv, new Uint8Array(16), \"f\");\n }\n __classPrivateFieldSet4(this, _OFB_lastPrecipher, this.iv, \"f\");\n __classPrivateFieldSet4(this, _OFB_lastPrecipherIndex, 16, \"f\");\n }\n get iv() {\n return new Uint8Array(__classPrivateFieldGet4(this, _OFB_iv, \"f\"));\n }\n encrypt(plaintext) {\n var _a, _b;\n if (plaintext.length % 16) {\n throw new TypeError(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n const ciphertext = new Uint8Array(plaintext);\n for (let i3 = 0; i3 < ciphertext.length; i3++) {\n if (__classPrivateFieldGet4(this, _OFB_lastPrecipherIndex, \"f\") === 16) {\n __classPrivateFieldSet4(this, _OFB_lastPrecipher, this.aes.encrypt(__classPrivateFieldGet4(this, _OFB_lastPrecipher, \"f\")), \"f\");\n __classPrivateFieldSet4(this, _OFB_lastPrecipherIndex, 0, \"f\");\n }\n ciphertext[i3] ^= __classPrivateFieldGet4(this, _OFB_lastPrecipher, \"f\")[__classPrivateFieldSet4(this, _OFB_lastPrecipherIndex, (_b = __classPrivateFieldGet4(this, _OFB_lastPrecipherIndex, \"f\"), _a = _b++, _b), \"f\"), _a];\n }\n return ciphertext;\n }\n decrypt(ciphertext) {\n if (ciphertext.length % 16) {\n throw new TypeError(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n return this.encrypt(ciphertext);\n }\n };\n exports3.OFB = OFB;\n _OFB_iv = /* @__PURE__ */ new WeakMap(), _OFB_lastPrecipher = /* @__PURE__ */ new WeakMap(), _OFB_lastPrecipherIndex = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/padding.js\n var require_padding = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/padding.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pkcs7Strip = exports3.pkcs7Pad = void 0;\n function pkcs7Pad(data) {\n const padder = 16 - data.length % 16;\n const result = new Uint8Array(data.length + padder);\n result.set(data);\n for (let i3 = data.length; i3 < result.length; i3++) {\n result[i3] = padder;\n }\n return result;\n }\n exports3.pkcs7Pad = pkcs7Pad;\n function pkcs7Strip(data) {\n if (data.length < 16) {\n throw new TypeError(\"PKCS#7 invalid length\");\n }\n const padder = data[data.length - 1];\n if (padder > 16) {\n throw new TypeError(\"PKCS#7 padding byte out of range\");\n }\n const length = data.length - padder;\n for (let i3 = 0; i3 < padder; i3++) {\n if (data[length + i3] !== padder) {\n throw new TypeError(\"PKCS#7 invalid padding byte\");\n }\n }\n return new Uint8Array(data.subarray(0, length));\n }\n exports3.pkcs7Strip = pkcs7Strip;\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/index.js\n var require_lib33 = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pkcs7Strip = exports3.pkcs7Pad = exports3.OFB = exports3.ECB = exports3.CTR = exports3.CFB = exports3.CBC = exports3.ModeOfOperation = exports3.AES = void 0;\n var aes_js_1 = require_aes();\n Object.defineProperty(exports3, \"AES\", { enumerable: true, get: function() {\n return aes_js_1.AES;\n } });\n var mode_js_1 = require_mode();\n Object.defineProperty(exports3, \"ModeOfOperation\", { enumerable: true, get: function() {\n return mode_js_1.ModeOfOperation;\n } });\n var mode_cbc_js_1 = require_mode_cbc();\n Object.defineProperty(exports3, \"CBC\", { enumerable: true, get: function() {\n return mode_cbc_js_1.CBC;\n } });\n var mode_cfb_js_1 = require_mode_cfb();\n Object.defineProperty(exports3, \"CFB\", { enumerable: true, get: function() {\n return mode_cfb_js_1.CFB;\n } });\n var mode_ctr_js_1 = require_mode_ctr();\n Object.defineProperty(exports3, \"CTR\", { enumerable: true, get: function() {\n return mode_ctr_js_1.CTR;\n } });\n var mode_ecb_js_1 = require_mode_ecb();\n Object.defineProperty(exports3, \"ECB\", { enumerable: true, get: function() {\n return mode_ecb_js_1.ECB;\n } });\n var mode_ofb_js_1 = require_mode_ofb();\n Object.defineProperty(exports3, \"OFB\", { enumerable: true, get: function() {\n return mode_ofb_js_1.OFB;\n } });\n var padding_js_1 = require_padding();\n Object.defineProperty(exports3, \"pkcs7Pad\", { enumerable: true, get: function() {\n return padding_js_1.pkcs7Pad;\n } });\n Object.defineProperty(exports3, \"pkcs7Strip\", { enumerable: true, get: function() {\n return padding_js_1.pkcs7Strip;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/utils.js\n var require_utils11 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.spelunk = exports3.getPassword = exports3.zpad = exports3.looseArrayify = void 0;\n var index_js_1 = require_utils8();\n function looseArrayify(hexString) {\n if (typeof hexString === \"string\" && !hexString.startsWith(\"0x\")) {\n hexString = \"0x\" + hexString;\n }\n return (0, index_js_1.getBytesCopy)(hexString);\n }\n exports3.looseArrayify = looseArrayify;\n function zpad(value, length) {\n value = String(value);\n while (value.length < length) {\n value = \"0\" + value;\n }\n return value;\n }\n exports3.zpad = zpad;\n function getPassword(password) {\n if (typeof password === \"string\") {\n return (0, index_js_1.toUtf8Bytes)(password, \"NFKC\");\n }\n return (0, index_js_1.getBytesCopy)(password);\n }\n exports3.getPassword = getPassword;\n function spelunk(object, _path) {\n const match = _path.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i);\n (0, index_js_1.assertArgument)(match != null, \"invalid path\", \"path\", _path);\n const path = match[1];\n const type = match[3];\n const reqd = match[4] === \"!\";\n let cur = object;\n for (const comp of path.toLowerCase().split(\".\")) {\n if (Array.isArray(cur)) {\n if (!comp.match(/^[0-9]+$/)) {\n break;\n }\n cur = cur[parseInt(comp)];\n } else if (typeof cur === \"object\") {\n let found = null;\n for (const key in cur) {\n if (key.toLowerCase() === comp) {\n found = cur[key];\n break;\n }\n }\n cur = found;\n } else {\n cur = null;\n }\n if (cur == null) {\n break;\n }\n }\n (0, index_js_1.assertArgument)(!reqd || cur != null, \"missing required value\", \"path\", path);\n if (type && cur != null) {\n if (type === \"int\") {\n if (typeof cur === \"string\" && cur.match(/^-?[0-9]+$/)) {\n return parseInt(cur);\n } else if (Number.isSafeInteger(cur)) {\n return cur;\n }\n }\n if (type === \"number\") {\n if (typeof cur === \"string\" && cur.match(/^-?[0-9.]*$/)) {\n return parseFloat(cur);\n }\n }\n if (type === \"data\") {\n if (typeof cur === \"string\") {\n return looseArrayify(cur);\n }\n }\n if (type === \"array\" && Array.isArray(cur)) {\n return cur;\n }\n if (type === typeof cur) {\n return cur;\n }\n (0, index_js_1.assertArgument)(false, `wrong type found for ${type} `, \"path\", path);\n }\n return cur;\n }\n exports3.spelunk = spelunk;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/json-keystore.js\n var require_json_keystore = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/json-keystore.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encryptKeystoreJson = exports3.encryptKeystoreJsonSync = exports3.decryptKeystoreJson = exports3.decryptKeystoreJsonSync = exports3.isKeystoreJson = void 0;\n var aes_js_1 = require_lib33();\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n var utils_js_1 = require_utils11();\n var _version_js_1 = require_version27();\n var defaultPath = \"m/44'/60'/0'/0/0\";\n function isKeystoreJson(json) {\n try {\n const data = JSON.parse(json);\n const version7 = data.version != null ? parseInt(data.version) : 0;\n if (version7 === 3) {\n return true;\n }\n } catch (error) {\n }\n return false;\n }\n exports3.isKeystoreJson = isKeystoreJson;\n function decrypt(data, key, ciphertext) {\n const cipher = (0, utils_js_1.spelunk)(data, \"crypto.cipher:string\");\n if (cipher === \"aes-128-ctr\") {\n const iv = (0, utils_js_1.spelunk)(data, \"crypto.cipherparams.iv:data!\");\n const aesCtr = new aes_js_1.CTR(key, iv);\n return (0, index_js_4.hexlify)(aesCtr.decrypt(ciphertext));\n }\n (0, index_js_4.assert)(false, \"unsupported cipher\", \"UNSUPPORTED_OPERATION\", {\n operation: \"decrypt\"\n });\n }\n function getAccount(data, _key) {\n const key = (0, index_js_4.getBytes)(_key);\n const ciphertext = (0, utils_js_1.spelunk)(data, \"crypto.ciphertext:data!\");\n const computedMAC = (0, index_js_4.hexlify)((0, index_js_2.keccak256)((0, index_js_4.concat)([key.slice(16, 32), ciphertext]))).substring(2);\n (0, index_js_4.assertArgument)(computedMAC === (0, utils_js_1.spelunk)(data, \"crypto.mac:string!\").toLowerCase(), \"incorrect password\", \"password\", \"[ REDACTED ]\");\n const privateKey = decrypt(data, key.slice(0, 16), ciphertext);\n const address = (0, index_js_3.computeAddress)(privateKey);\n if (data.address) {\n let check = data.address.toLowerCase();\n if (!check.startsWith(\"0x\")) {\n check = \"0x\" + check;\n }\n (0, index_js_4.assertArgument)((0, index_js_1.getAddress)(check) === address, \"keystore address/privateKey mismatch\", \"address\", data.address);\n }\n const account = { address, privateKey };\n const version7 = (0, utils_js_1.spelunk)(data, \"x-ethers.version:string\");\n if (version7 === \"0.1\") {\n const mnemonicKey = key.slice(32, 64);\n const mnemonicCiphertext = (0, utils_js_1.spelunk)(data, \"x-ethers.mnemonicCiphertext:data!\");\n const mnemonicIv = (0, utils_js_1.spelunk)(data, \"x-ethers.mnemonicCounter:data!\");\n const mnemonicAesCtr = new aes_js_1.CTR(mnemonicKey, mnemonicIv);\n account.mnemonic = {\n path: (0, utils_js_1.spelunk)(data, \"x-ethers.path:string\") || defaultPath,\n locale: (0, utils_js_1.spelunk)(data, \"x-ethers.locale:string\") || \"en\",\n entropy: (0, index_js_4.hexlify)((0, index_js_4.getBytes)(mnemonicAesCtr.decrypt(mnemonicCiphertext)))\n };\n }\n return account;\n }\n function getDecryptKdfParams(data) {\n const kdf = (0, utils_js_1.spelunk)(data, \"crypto.kdf:string\");\n if (kdf && typeof kdf === \"string\") {\n if (kdf.toLowerCase() === \"scrypt\") {\n const salt = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.salt:data!\");\n const N4 = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.n:int!\");\n const r2 = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.r:int!\");\n const p4 = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.p:int!\");\n (0, index_js_4.assertArgument)(N4 > 0 && (N4 & N4 - 1) === 0, \"invalid kdf.N\", \"kdf.N\", N4);\n (0, index_js_4.assertArgument)(r2 > 0 && p4 > 0, \"invalid kdf\", \"kdf\", kdf);\n const dkLen = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.dklen:int!\");\n (0, index_js_4.assertArgument)(dkLen === 32, \"invalid kdf.dklen\", \"kdf.dflen\", dkLen);\n return { name: \"scrypt\", salt, N: N4, r: r2, p: p4, dkLen: 64 };\n } else if (kdf.toLowerCase() === \"pbkdf2\") {\n const salt = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.salt:data!\");\n const prf = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.prf:string!\");\n const algorithm = prf.split(\"-\").pop();\n (0, index_js_4.assertArgument)(algorithm === \"sha256\" || algorithm === \"sha512\", \"invalid kdf.pdf\", \"kdf.pdf\", prf);\n const count = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.c:int!\");\n const dkLen = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.dklen:int!\");\n (0, index_js_4.assertArgument)(dkLen === 32, \"invalid kdf.dklen\", \"kdf.dklen\", dkLen);\n return { name: \"pbkdf2\", salt, count, dkLen, algorithm };\n }\n }\n (0, index_js_4.assertArgument)(false, \"unsupported key-derivation function\", \"kdf\", kdf);\n }\n function decryptKeystoreJsonSync(json, _password) {\n const data = JSON.parse(json);\n const password = (0, utils_js_1.getPassword)(_password);\n const params = getDecryptKdfParams(data);\n if (params.name === \"pbkdf2\") {\n const { salt: salt2, count, dkLen: dkLen2, algorithm } = params;\n const key2 = (0, index_js_2.pbkdf2)(password, salt2, count, dkLen2, algorithm);\n return getAccount(data, key2);\n }\n (0, index_js_4.assert)(params.name === \"scrypt\", \"cannot be reached\", \"UNKNOWN_ERROR\", { params });\n const { salt, N: N4, r: r2, p: p4, dkLen } = params;\n const key = (0, index_js_2.scryptSync)(password, salt, N4, r2, p4, dkLen);\n return getAccount(data, key);\n }\n exports3.decryptKeystoreJsonSync = decryptKeystoreJsonSync;\n function stall(duration) {\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve();\n }, duration);\n });\n }\n async function decryptKeystoreJson(json, _password, progress) {\n const data = JSON.parse(json);\n const password = (0, utils_js_1.getPassword)(_password);\n const params = getDecryptKdfParams(data);\n if (params.name === \"pbkdf2\") {\n if (progress) {\n progress(0);\n await stall(0);\n }\n const { salt: salt2, count, dkLen: dkLen2, algorithm } = params;\n const key2 = (0, index_js_2.pbkdf2)(password, salt2, count, dkLen2, algorithm);\n if (progress) {\n progress(1);\n await stall(0);\n }\n return getAccount(data, key2);\n }\n (0, index_js_4.assert)(params.name === \"scrypt\", \"cannot be reached\", \"UNKNOWN_ERROR\", { params });\n const { salt, N: N4, r: r2, p: p4, dkLen } = params;\n const key = await (0, index_js_2.scrypt)(password, salt, N4, r2, p4, dkLen, progress);\n return getAccount(data, key);\n }\n exports3.decryptKeystoreJson = decryptKeystoreJson;\n function getEncryptKdfParams(options) {\n const salt = options.salt != null ? (0, index_js_4.getBytes)(options.salt, \"options.salt\") : (0, index_js_2.randomBytes)(32);\n let N4 = 1 << 17, r2 = 8, p4 = 1;\n if (options.scrypt) {\n if (options.scrypt.N) {\n N4 = options.scrypt.N;\n }\n if (options.scrypt.r) {\n r2 = options.scrypt.r;\n }\n if (options.scrypt.p) {\n p4 = options.scrypt.p;\n }\n }\n (0, index_js_4.assertArgument)(typeof N4 === \"number\" && N4 > 0 && Number.isSafeInteger(N4) && (BigInt(N4) & BigInt(N4 - 1)) === BigInt(0), \"invalid scrypt N parameter\", \"options.N\", N4);\n (0, index_js_4.assertArgument)(typeof r2 === \"number\" && r2 > 0 && Number.isSafeInteger(r2), \"invalid scrypt r parameter\", \"options.r\", r2);\n (0, index_js_4.assertArgument)(typeof p4 === \"number\" && p4 > 0 && Number.isSafeInteger(p4), \"invalid scrypt p parameter\", \"options.p\", p4);\n return { name: \"scrypt\", dkLen: 32, salt, N: N4, r: r2, p: p4 };\n }\n function _encryptKeystore(key, kdf, account, options) {\n const privateKey = (0, index_js_4.getBytes)(account.privateKey, \"privateKey\");\n const iv = options.iv != null ? (0, index_js_4.getBytes)(options.iv, \"options.iv\") : (0, index_js_2.randomBytes)(16);\n (0, index_js_4.assertArgument)(iv.length === 16, \"invalid options.iv length\", \"options.iv\", options.iv);\n const uuidRandom = options.uuid != null ? (0, index_js_4.getBytes)(options.uuid, \"options.uuid\") : (0, index_js_2.randomBytes)(16);\n (0, index_js_4.assertArgument)(uuidRandom.length === 16, \"invalid options.uuid length\", \"options.uuid\", options.iv);\n const derivedKey = key.slice(0, 16);\n const macPrefix = key.slice(16, 32);\n const aesCtr = new aes_js_1.CTR(derivedKey, iv);\n const ciphertext = (0, index_js_4.getBytes)(aesCtr.encrypt(privateKey));\n const mac = (0, index_js_2.keccak256)((0, index_js_4.concat)([macPrefix, ciphertext]));\n const data = {\n address: account.address.substring(2).toLowerCase(),\n id: (0, index_js_4.uuidV4)(uuidRandom),\n version: 3,\n Crypto: {\n cipher: \"aes-128-ctr\",\n cipherparams: {\n iv: (0, index_js_4.hexlify)(iv).substring(2)\n },\n ciphertext: (0, index_js_4.hexlify)(ciphertext).substring(2),\n kdf: \"scrypt\",\n kdfparams: {\n salt: (0, index_js_4.hexlify)(kdf.salt).substring(2),\n n: kdf.N,\n dklen: 32,\n p: kdf.p,\n r: kdf.r\n },\n mac: mac.substring(2)\n }\n };\n if (account.mnemonic) {\n const client = options.client != null ? options.client : `ethers/${_version_js_1.version}`;\n const path = account.mnemonic.path || defaultPath;\n const locale = account.mnemonic.locale || \"en\";\n const mnemonicKey = key.slice(32, 64);\n const entropy = (0, index_js_4.getBytes)(account.mnemonic.entropy, \"account.mnemonic.entropy\");\n const mnemonicIv = (0, index_js_2.randomBytes)(16);\n const mnemonicAesCtr = new aes_js_1.CTR(mnemonicKey, mnemonicIv);\n const mnemonicCiphertext = (0, index_js_4.getBytes)(mnemonicAesCtr.encrypt(entropy));\n const now = /* @__PURE__ */ new Date();\n const timestamp = now.getUTCFullYear() + \"-\" + (0, utils_js_1.zpad)(now.getUTCMonth() + 1, 2) + \"-\" + (0, utils_js_1.zpad)(now.getUTCDate(), 2) + \"T\" + (0, utils_js_1.zpad)(now.getUTCHours(), 2) + \"-\" + (0, utils_js_1.zpad)(now.getUTCMinutes(), 2) + \"-\" + (0, utils_js_1.zpad)(now.getUTCSeconds(), 2) + \".0Z\";\n const gethFilename = \"UTC--\" + timestamp + \"--\" + data.address;\n data[\"x-ethers\"] = {\n client,\n gethFilename,\n path,\n locale,\n mnemonicCounter: (0, index_js_4.hexlify)(mnemonicIv).substring(2),\n mnemonicCiphertext: (0, index_js_4.hexlify)(mnemonicCiphertext).substring(2),\n version: \"0.1\"\n };\n }\n return JSON.stringify(data);\n }\n function encryptKeystoreJsonSync(account, password, options) {\n if (options == null) {\n options = {};\n }\n const passwordBytes = (0, utils_js_1.getPassword)(password);\n const kdf = getEncryptKdfParams(options);\n const key = (0, index_js_2.scryptSync)(passwordBytes, kdf.salt, kdf.N, kdf.r, kdf.p, 64);\n return _encryptKeystore((0, index_js_4.getBytes)(key), kdf, account, options);\n }\n exports3.encryptKeystoreJsonSync = encryptKeystoreJsonSync;\n async function encryptKeystoreJson(account, password, options) {\n if (options == null) {\n options = {};\n }\n const passwordBytes = (0, utils_js_1.getPassword)(password);\n const kdf = getEncryptKdfParams(options);\n const key = await (0, index_js_2.scrypt)(passwordBytes, kdf.salt, kdf.N, kdf.r, kdf.p, 64, options.progressCallback);\n return _encryptKeystore((0, index_js_4.getBytes)(key), kdf, account, options);\n }\n exports3.encryptKeystoreJson = encryptKeystoreJson;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/hdwallet.js\n var require_hdwallet = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/hdwallet.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getIndexedAccountPath = exports3.getAccountPath = exports3.HDNodeVoidWallet = exports3.HDNodeWallet = exports3.defaultPath = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_providers();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils8();\n var lang_en_js_1 = require_lang_en2();\n var base_wallet_js_1 = require_base_wallet();\n var mnemonic_js_1 = require_mnemonic();\n var json_keystore_js_1 = require_json_keystore();\n exports3.defaultPath = \"m/44'/60'/0'/0/0\";\n var MasterSecret = new Uint8Array([66, 105, 116, 99, 111, 105, 110, 32, 115, 101, 101, 100]);\n var HardenedBit = 2147483648;\n var N4 = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n var Nibbles = \"0123456789abcdef\";\n function zpad(value, length) {\n let result = \"\";\n while (value) {\n result = Nibbles[value % 16] + result;\n value = Math.trunc(value / 16);\n }\n while (result.length < length * 2) {\n result = \"0\" + result;\n }\n return \"0x\" + result;\n }\n function encodeBase58Check(_value) {\n const value = (0, index_js_4.getBytes)(_value);\n const check = (0, index_js_4.dataSlice)((0, index_js_1.sha256)((0, index_js_1.sha256)(value)), 0, 4);\n const bytes = (0, index_js_4.concat)([value, check]);\n return (0, index_js_4.encodeBase58)(bytes);\n }\n var _guard = {};\n function ser_I(index2, chainCode, publicKey, privateKey) {\n const data = new Uint8Array(37);\n if (index2 & HardenedBit) {\n (0, index_js_4.assert)(privateKey != null, \"cannot derive child of neutered node\", \"UNSUPPORTED_OPERATION\", {\n operation: \"deriveChild\"\n });\n data.set((0, index_js_4.getBytes)(privateKey), 1);\n } else {\n data.set((0, index_js_4.getBytes)(publicKey));\n }\n for (let i3 = 24; i3 >= 0; i3 -= 8) {\n data[33 + (i3 >> 3)] = index2 >> 24 - i3 & 255;\n }\n const I2 = (0, index_js_4.getBytes)((0, index_js_1.computeHmac)(\"sha512\", chainCode, data));\n return { IL: I2.slice(0, 32), IR: I2.slice(32) };\n }\n function derivePath(node, path) {\n const components = path.split(\"/\");\n (0, index_js_4.assertArgument)(components.length > 0, \"invalid path\", \"path\", path);\n if (components[0] === \"m\") {\n (0, index_js_4.assertArgument)(node.depth === 0, `cannot derive root path (i.e. path starting with \"m/\") for a node at non-zero depth ${node.depth}`, \"path\", path);\n components.shift();\n }\n let result = node;\n for (let i3 = 0; i3 < components.length; i3++) {\n const component = components[i3];\n if (component.match(/^[0-9]+'$/)) {\n const index2 = parseInt(component.substring(0, component.length - 1));\n (0, index_js_4.assertArgument)(index2 < HardenedBit, \"invalid path index\", `path[${i3}]`, component);\n result = result.deriveChild(HardenedBit + index2);\n } else if (component.match(/^[0-9]+$/)) {\n const index2 = parseInt(component);\n (0, index_js_4.assertArgument)(index2 < HardenedBit, \"invalid path index\", `path[${i3}]`, component);\n result = result.deriveChild(index2);\n } else {\n (0, index_js_4.assertArgument)(false, \"invalid path component\", `path[${i3}]`, component);\n }\n }\n return result;\n }\n var HDNodeWallet = class _HDNodeWallet extends base_wallet_js_1.BaseWallet {\n /**\n * The compressed public key.\n */\n publicKey;\n /**\n * The fingerprint.\n *\n * A fingerprint allows quick qay to detect parent and child nodes,\n * but developers should be prepared to deal with collisions as it\n * is only 4 bytes.\n */\n fingerprint;\n /**\n * The parent fingerprint.\n */\n parentFingerprint;\n /**\n * The mnemonic used to create this HD Node, if available.\n *\n * Sources such as extended keys do not encode the mnemonic, in\n * which case this will be ``null``.\n */\n mnemonic;\n /**\n * The chaincode, which is effectively a public key used\n * to derive children.\n */\n chainCode;\n /**\n * The derivation path of this wallet.\n *\n * Since extended keys do not provide full path details, this\n * may be ``null``, if instantiated from a source that does not\n * encode it.\n */\n path;\n /**\n * The child index of this wallet. Values over ``2 *\\* 31`` indicate\n * the node is hardened.\n */\n index;\n /**\n * The depth of this wallet, which is the number of components\n * in its path.\n */\n depth;\n /**\n * @private\n */\n constructor(guard, signingKey, parentFingerprint, chainCode, path, index2, depth, mnemonic, provider) {\n super(signingKey, provider);\n (0, index_js_4.assertPrivate)(guard, _guard, \"HDNodeWallet\");\n (0, index_js_4.defineProperties)(this, { publicKey: signingKey.compressedPublicKey });\n const fingerprint = (0, index_js_4.dataSlice)((0, index_js_1.ripemd160)((0, index_js_1.sha256)(this.publicKey)), 0, 4);\n (0, index_js_4.defineProperties)(this, {\n parentFingerprint,\n fingerprint,\n chainCode,\n path,\n index: index2,\n depth\n });\n (0, index_js_4.defineProperties)(this, { mnemonic });\n }\n connect(provider) {\n return new _HDNodeWallet(_guard, this.signingKey, this.parentFingerprint, this.chainCode, this.path, this.index, this.depth, this.mnemonic, provider);\n }\n #account() {\n const account = { address: this.address, privateKey: this.privateKey };\n const m2 = this.mnemonic;\n if (this.path && m2 && m2.wordlist.locale === \"en\" && m2.password === \"\") {\n account.mnemonic = {\n path: this.path,\n locale: \"en\",\n entropy: m2.entropy\n };\n }\n return account;\n }\n /**\n * Resolves to a [JSON Keystore Wallet](json-wallets) encrypted with\n * %%password%%.\n *\n * If %%progressCallback%% is specified, it will receive periodic\n * updates as the encryption process progreses.\n */\n async encrypt(password, progressCallback) {\n return await (0, json_keystore_js_1.encryptKeystoreJson)(this.#account(), password, { progressCallback });\n }\n /**\n * Returns a [JSON Keystore Wallet](json-wallets) encryped with\n * %%password%%.\n *\n * It is preferred to use the [async version](encrypt) instead,\n * which allows a [[ProgressCallback]] to keep the user informed.\n *\n * This method will block the event loop (freezing all UI) until\n * it is complete, which may be a non-trivial duration.\n */\n encryptSync(password) {\n return (0, json_keystore_js_1.encryptKeystoreJsonSync)(this.#account(), password);\n }\n /**\n * The extended key.\n *\n * This key will begin with the prefix ``xpriv`` and can be used to\n * reconstruct this HD Node to derive its children.\n */\n get extendedKey() {\n (0, index_js_4.assert)(this.depth < 256, \"Depth too deep\", \"UNSUPPORTED_OPERATION\", { operation: \"extendedKey\" });\n return encodeBase58Check((0, index_js_4.concat)([\n \"0x0488ADE4\",\n zpad(this.depth, 1),\n this.parentFingerprint,\n zpad(this.index, 4),\n this.chainCode,\n (0, index_js_4.concat)([\"0x00\", this.privateKey])\n ]));\n }\n /**\n * Returns true if this wallet has a path, providing a Type Guard\n * that the path is non-null.\n */\n hasPath() {\n return this.path != null;\n }\n /**\n * Returns a neutered HD Node, which removes the private details\n * of an HD Node.\n *\n * A neutered node has no private key, but can be used to derive\n * child addresses and other public data about the HD Node.\n */\n neuter() {\n return new HDNodeVoidWallet(_guard, this.address, this.publicKey, this.parentFingerprint, this.chainCode, this.path, this.index, this.depth, this.provider);\n }\n /**\n * Return the child for %%index%%.\n */\n deriveChild(_index) {\n const index2 = (0, index_js_4.getNumber)(_index, \"index\");\n (0, index_js_4.assertArgument)(index2 <= 4294967295, \"invalid index\", \"index\", index2);\n let path = this.path;\n if (path) {\n path += \"/\" + (index2 & ~HardenedBit);\n if (index2 & HardenedBit) {\n path += \"'\";\n }\n }\n const { IR, IL } = ser_I(index2, this.chainCode, this.publicKey, this.privateKey);\n const ki = new index_js_1.SigningKey((0, index_js_4.toBeHex)(((0, index_js_4.toBigInt)(IL) + BigInt(this.privateKey)) % N4, 32));\n return new _HDNodeWallet(_guard, ki, this.fingerprint, (0, index_js_4.hexlify)(IR), path, index2, this.depth + 1, this.mnemonic, this.provider);\n }\n /**\n * Return the HDNode for %%path%% from this node.\n */\n derivePath(path) {\n return derivePath(this, path);\n }\n static #fromSeed(_seed, mnemonic) {\n (0, index_js_4.assertArgument)((0, index_js_4.isBytesLike)(_seed), \"invalid seed\", \"seed\", \"[REDACTED]\");\n const seed = (0, index_js_4.getBytes)(_seed, \"seed\");\n (0, index_js_4.assertArgument)(seed.length >= 16 && seed.length <= 64, \"invalid seed\", \"seed\", \"[REDACTED]\");\n const I2 = (0, index_js_4.getBytes)((0, index_js_1.computeHmac)(\"sha512\", MasterSecret, seed));\n const signingKey = new index_js_1.SigningKey((0, index_js_4.hexlify)(I2.slice(0, 32)));\n return new _HDNodeWallet(_guard, signingKey, \"0x00000000\", (0, index_js_4.hexlify)(I2.slice(32)), \"m\", 0, 0, mnemonic, null);\n }\n /**\n * Creates a new HD Node from %%extendedKey%%.\n *\n * If the %%extendedKey%% will either have a prefix or ``xpub`` or\n * ``xpriv``, returning a neutered HD Node ([[HDNodeVoidWallet]])\n * or full HD Node ([[HDNodeWallet) respectively.\n */\n static fromExtendedKey(extendedKey) {\n const bytes = (0, index_js_4.toBeArray)((0, index_js_4.decodeBase58)(extendedKey));\n (0, index_js_4.assertArgument)(bytes.length === 82 || encodeBase58Check(bytes.slice(0, 78)) === extendedKey, \"invalid extended key\", \"extendedKey\", \"[ REDACTED ]\");\n const depth = bytes[4];\n const parentFingerprint = (0, index_js_4.hexlify)(bytes.slice(5, 9));\n const index2 = parseInt((0, index_js_4.hexlify)(bytes.slice(9, 13)).substring(2), 16);\n const chainCode = (0, index_js_4.hexlify)(bytes.slice(13, 45));\n const key = bytes.slice(45, 78);\n switch ((0, index_js_4.hexlify)(bytes.slice(0, 4))) {\n case \"0x0488b21e\":\n case \"0x043587cf\": {\n const publicKey = (0, index_js_4.hexlify)(key);\n return new HDNodeVoidWallet(_guard, (0, index_js_3.computeAddress)(publicKey), publicKey, parentFingerprint, chainCode, null, index2, depth, null);\n }\n case \"0x0488ade4\":\n case \"0x04358394 \":\n if (key[0] !== 0) {\n break;\n }\n return new _HDNodeWallet(_guard, new index_js_1.SigningKey(key.slice(1)), parentFingerprint, chainCode, null, index2, depth, null, null);\n }\n (0, index_js_4.assertArgument)(false, \"invalid extended key prefix\", \"extendedKey\", \"[ REDACTED ]\");\n }\n /**\n * Creates a new random HDNode.\n */\n static createRandom(password, path, wordlist) {\n if (password == null) {\n password = \"\";\n }\n if (path == null) {\n path = exports3.defaultPath;\n }\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n const mnemonic = mnemonic_js_1.Mnemonic.fromEntropy((0, index_js_1.randomBytes)(16), password, wordlist);\n return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path);\n }\n /**\n * Create an HD Node from %%mnemonic%%.\n */\n static fromMnemonic(mnemonic, path) {\n if (!path) {\n path = exports3.defaultPath;\n }\n return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path);\n }\n /**\n * Creates an HD Node from a mnemonic %%phrase%%.\n */\n static fromPhrase(phrase, password, path, wordlist) {\n if (password == null) {\n password = \"\";\n }\n if (path == null) {\n path = exports3.defaultPath;\n }\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n const mnemonic = mnemonic_js_1.Mnemonic.fromPhrase(phrase, password, wordlist);\n return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path);\n }\n /**\n * Creates an HD Node from a %%seed%%.\n */\n static fromSeed(seed) {\n return _HDNodeWallet.#fromSeed(seed, null);\n }\n };\n exports3.HDNodeWallet = HDNodeWallet;\n var HDNodeVoidWallet = class _HDNodeVoidWallet extends index_js_2.VoidSigner {\n /**\n * The compressed public key.\n */\n publicKey;\n /**\n * The fingerprint.\n *\n * A fingerprint allows quick qay to detect parent and child nodes,\n * but developers should be prepared to deal with collisions as it\n * is only 4 bytes.\n */\n fingerprint;\n /**\n * The parent node fingerprint.\n */\n parentFingerprint;\n /**\n * The chaincode, which is effectively a public key used\n * to derive children.\n */\n chainCode;\n /**\n * The derivation path of this wallet.\n *\n * Since extended keys do not provider full path details, this\n * may be ``null``, if instantiated from a source that does not\n * enocde it.\n */\n path;\n /**\n * The child index of this wallet. Values over ``2 *\\* 31`` indicate\n * the node is hardened.\n */\n index;\n /**\n * The depth of this wallet, which is the number of components\n * in its path.\n */\n depth;\n /**\n * @private\n */\n constructor(guard, address, publicKey, parentFingerprint, chainCode, path, index2, depth, provider) {\n super(address, provider);\n (0, index_js_4.assertPrivate)(guard, _guard, \"HDNodeVoidWallet\");\n (0, index_js_4.defineProperties)(this, { publicKey });\n const fingerprint = (0, index_js_4.dataSlice)((0, index_js_1.ripemd160)((0, index_js_1.sha256)(publicKey)), 0, 4);\n (0, index_js_4.defineProperties)(this, {\n publicKey,\n fingerprint,\n parentFingerprint,\n chainCode,\n path,\n index: index2,\n depth\n });\n }\n connect(provider) {\n return new _HDNodeVoidWallet(_guard, this.address, this.publicKey, this.parentFingerprint, this.chainCode, this.path, this.index, this.depth, provider);\n }\n /**\n * The extended key.\n *\n * This key will begin with the prefix ``xpub`` and can be used to\n * reconstruct this neutered key to derive its children addresses.\n */\n get extendedKey() {\n (0, index_js_4.assert)(this.depth < 256, \"Depth too deep\", \"UNSUPPORTED_OPERATION\", { operation: \"extendedKey\" });\n return encodeBase58Check((0, index_js_4.concat)([\n \"0x0488B21E\",\n zpad(this.depth, 1),\n this.parentFingerprint,\n zpad(this.index, 4),\n this.chainCode,\n this.publicKey\n ]));\n }\n /**\n * Returns true if this wallet has a path, providing a Type Guard\n * that the path is non-null.\n */\n hasPath() {\n return this.path != null;\n }\n /**\n * Return the child for %%index%%.\n */\n deriveChild(_index) {\n const index2 = (0, index_js_4.getNumber)(_index, \"index\");\n (0, index_js_4.assertArgument)(index2 <= 4294967295, \"invalid index\", \"index\", index2);\n let path = this.path;\n if (path) {\n path += \"/\" + (index2 & ~HardenedBit);\n if (index2 & HardenedBit) {\n path += \"'\";\n }\n }\n const { IR, IL } = ser_I(index2, this.chainCode, this.publicKey, null);\n const Ki = index_js_1.SigningKey.addPoints(IL, this.publicKey, true);\n const address = (0, index_js_3.computeAddress)(Ki);\n return new _HDNodeVoidWallet(_guard, address, Ki, this.fingerprint, (0, index_js_4.hexlify)(IR), path, index2, this.depth + 1, this.provider);\n }\n /**\n * Return the signer for %%path%% from this node.\n */\n derivePath(path) {\n return derivePath(this, path);\n }\n };\n exports3.HDNodeVoidWallet = HDNodeVoidWallet;\n function getAccountPath(_index) {\n const index2 = (0, index_js_4.getNumber)(_index, \"index\");\n (0, index_js_4.assertArgument)(index2 >= 0 && index2 < HardenedBit, \"invalid account index\", \"index\", index2);\n return `m/44'/60'/${index2}'/0/0`;\n }\n exports3.getAccountPath = getAccountPath;\n function getIndexedAccountPath(_index) {\n const index2 = (0, index_js_4.getNumber)(_index, \"index\");\n (0, index_js_4.assertArgument)(index2 >= 0 && index2 < HardenedBit, \"invalid account index\", \"index\", index2);\n return `m/44'/60'/0'/0/${index2}`;\n }\n exports3.getIndexedAccountPath = getIndexedAccountPath;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/json-crowdsale.js\n var require_json_crowdsale = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/json-crowdsale.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decryptCrowdsaleJson = exports3.isCrowdsaleJson = void 0;\n var aes_js_1 = require_lib33();\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_hash2();\n var index_js_4 = require_utils8();\n var utils_js_1 = require_utils11();\n function isCrowdsaleJson(json) {\n try {\n const data = JSON.parse(json);\n if (data.encseed) {\n return true;\n }\n } catch (error) {\n }\n return false;\n }\n exports3.isCrowdsaleJson = isCrowdsaleJson;\n function decryptCrowdsaleJson(json, _password) {\n const data = JSON.parse(json);\n const password = (0, utils_js_1.getPassword)(_password);\n const address = (0, index_js_1.getAddress)((0, utils_js_1.spelunk)(data, \"ethaddr:string!\"));\n const encseed = (0, utils_js_1.looseArrayify)((0, utils_js_1.spelunk)(data, \"encseed:string!\"));\n (0, index_js_4.assertArgument)(encseed && encseed.length % 16 === 0, \"invalid encseed\", \"json\", json);\n const key = (0, index_js_4.getBytes)((0, index_js_2.pbkdf2)(password, password, 2e3, 32, \"sha256\")).slice(0, 16);\n const iv = encseed.slice(0, 16);\n const encryptedSeed = encseed.slice(16);\n const aesCbc = new aes_js_1.CBC(key, iv);\n const seed = (0, aes_js_1.pkcs7Strip)((0, index_js_4.getBytes)(aesCbc.decrypt(encryptedSeed)));\n let seedHex = \"\";\n for (let i3 = 0; i3 < seed.length; i3++) {\n seedHex += String.fromCharCode(seed[i3]);\n }\n return { address, privateKey: (0, index_js_3.id)(seedHex) };\n }\n exports3.decryptCrowdsaleJson = decryptCrowdsaleJson;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/wallet.js\n var require_wallet = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/wallet.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wallet = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils8();\n var base_wallet_js_1 = require_base_wallet();\n var hdwallet_js_1 = require_hdwallet();\n var json_crowdsale_js_1 = require_json_crowdsale();\n var json_keystore_js_1 = require_json_keystore();\n var mnemonic_js_1 = require_mnemonic();\n function stall(duration) {\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve();\n }, duration);\n });\n }\n var Wallet = class _Wallet extends base_wallet_js_1.BaseWallet {\n /**\n * Create a new wallet for the private %%key%%, optionally connected\n * to %%provider%%.\n */\n constructor(key, provider) {\n if (typeof key === \"string\" && !key.startsWith(\"0x\")) {\n key = \"0x\" + key;\n }\n let signingKey = typeof key === \"string\" ? new index_js_1.SigningKey(key) : key;\n super(signingKey, provider);\n }\n connect(provider) {\n return new _Wallet(this.signingKey, provider);\n }\n /**\n * Resolves to a [JSON Keystore Wallet](json-wallets) encrypted with\n * %%password%%.\n *\n * If %%progressCallback%% is specified, it will receive periodic\n * updates as the encryption process progreses.\n */\n async encrypt(password, progressCallback) {\n const account = { address: this.address, privateKey: this.privateKey };\n return await (0, json_keystore_js_1.encryptKeystoreJson)(account, password, { progressCallback });\n }\n /**\n * Returns a [JSON Keystore Wallet](json-wallets) encryped with\n * %%password%%.\n *\n * It is preferred to use the [async version](encrypt) instead,\n * which allows a [[ProgressCallback]] to keep the user informed.\n *\n * This method will block the event loop (freezing all UI) until\n * it is complete, which may be a non-trivial duration.\n */\n encryptSync(password) {\n const account = { address: this.address, privateKey: this.privateKey };\n return (0, json_keystore_js_1.encryptKeystoreJsonSync)(account, password);\n }\n static #fromAccount(account) {\n (0, index_js_2.assertArgument)(account, \"invalid JSON wallet\", \"json\", \"[ REDACTED ]\");\n if (\"mnemonic\" in account && account.mnemonic && account.mnemonic.locale === \"en\") {\n const mnemonic = mnemonic_js_1.Mnemonic.fromEntropy(account.mnemonic.entropy);\n const wallet2 = hdwallet_js_1.HDNodeWallet.fromMnemonic(mnemonic, account.mnemonic.path);\n if (wallet2.address === account.address && wallet2.privateKey === account.privateKey) {\n return wallet2;\n }\n console.log(\"WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key\");\n }\n const wallet = new _Wallet(account.privateKey);\n (0, index_js_2.assertArgument)(wallet.address === account.address, \"address/privateKey mismatch\", \"json\", \"[ REDACTED ]\");\n return wallet;\n }\n /**\n * Creates (asynchronously) a **Wallet** by decrypting the %%json%%\n * with %%password%%.\n *\n * If %%progress%% is provided, it is called periodically during\n * decryption so that any UI can be updated.\n */\n static async fromEncryptedJson(json, password, progress) {\n let account = null;\n if ((0, json_keystore_js_1.isKeystoreJson)(json)) {\n account = await (0, json_keystore_js_1.decryptKeystoreJson)(json, password, progress);\n } else if ((0, json_crowdsale_js_1.isCrowdsaleJson)(json)) {\n if (progress) {\n progress(0);\n await stall(0);\n }\n account = (0, json_crowdsale_js_1.decryptCrowdsaleJson)(json, password);\n if (progress) {\n progress(1);\n await stall(0);\n }\n }\n return _Wallet.#fromAccount(account);\n }\n /**\n * Creates a **Wallet** by decrypting the %%json%% with %%password%%.\n *\n * The [[fromEncryptedJson]] method is preferred, as this method\n * will lock up and freeze the UI during decryption, which may take\n * some time.\n */\n static fromEncryptedJsonSync(json, password) {\n let account = null;\n if ((0, json_keystore_js_1.isKeystoreJson)(json)) {\n account = (0, json_keystore_js_1.decryptKeystoreJsonSync)(json, password);\n } else if ((0, json_crowdsale_js_1.isCrowdsaleJson)(json)) {\n account = (0, json_crowdsale_js_1.decryptCrowdsaleJson)(json, password);\n } else {\n (0, index_js_2.assertArgument)(false, \"invalid JSON wallet\", \"json\", \"[ REDACTED ]\");\n }\n return _Wallet.#fromAccount(account);\n }\n /**\n * Creates a new random [[HDNodeWallet]] using the available\n * [cryptographic random source](randomBytes).\n *\n * If there is no crytographic random source, this will throw.\n */\n static createRandom(provider) {\n const wallet = hdwallet_js_1.HDNodeWallet.createRandom();\n if (provider) {\n return wallet.connect(provider);\n }\n return wallet;\n }\n /**\n * Creates a [[HDNodeWallet]] for %%phrase%%.\n */\n static fromPhrase(phrase, provider) {\n const wallet = hdwallet_js_1.HDNodeWallet.fromPhrase(phrase);\n if (provider) {\n return wallet.connect(provider);\n }\n return wallet;\n }\n };\n exports3.Wallet = Wallet;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/index.js\n var require_wallet2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wallet = exports3.Mnemonic = exports3.encryptKeystoreJsonSync = exports3.encryptKeystoreJson = exports3.decryptKeystoreJson = exports3.decryptKeystoreJsonSync = exports3.isKeystoreJson = exports3.decryptCrowdsaleJson = exports3.isCrowdsaleJson = exports3.HDNodeVoidWallet = exports3.HDNodeWallet = exports3.getIndexedAccountPath = exports3.getAccountPath = exports3.defaultPath = exports3.BaseWallet = void 0;\n var base_wallet_js_1 = require_base_wallet();\n Object.defineProperty(exports3, \"BaseWallet\", { enumerable: true, get: function() {\n return base_wallet_js_1.BaseWallet;\n } });\n var hdwallet_js_1 = require_hdwallet();\n Object.defineProperty(exports3, \"defaultPath\", { enumerable: true, get: function() {\n return hdwallet_js_1.defaultPath;\n } });\n Object.defineProperty(exports3, \"getAccountPath\", { enumerable: true, get: function() {\n return hdwallet_js_1.getAccountPath;\n } });\n Object.defineProperty(exports3, \"getIndexedAccountPath\", { enumerable: true, get: function() {\n return hdwallet_js_1.getIndexedAccountPath;\n } });\n Object.defineProperty(exports3, \"HDNodeWallet\", { enumerable: true, get: function() {\n return hdwallet_js_1.HDNodeWallet;\n } });\n Object.defineProperty(exports3, \"HDNodeVoidWallet\", { enumerable: true, get: function() {\n return hdwallet_js_1.HDNodeVoidWallet;\n } });\n var json_crowdsale_js_1 = require_json_crowdsale();\n Object.defineProperty(exports3, \"isCrowdsaleJson\", { enumerable: true, get: function() {\n return json_crowdsale_js_1.isCrowdsaleJson;\n } });\n Object.defineProperty(exports3, \"decryptCrowdsaleJson\", { enumerable: true, get: function() {\n return json_crowdsale_js_1.decryptCrowdsaleJson;\n } });\n var json_keystore_js_1 = require_json_keystore();\n Object.defineProperty(exports3, \"isKeystoreJson\", { enumerable: true, get: function() {\n return json_keystore_js_1.isKeystoreJson;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreJsonSync\", { enumerable: true, get: function() {\n return json_keystore_js_1.decryptKeystoreJsonSync;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreJson\", { enumerable: true, get: function() {\n return json_keystore_js_1.decryptKeystoreJson;\n } });\n Object.defineProperty(exports3, \"encryptKeystoreJson\", { enumerable: true, get: function() {\n return json_keystore_js_1.encryptKeystoreJson;\n } });\n Object.defineProperty(exports3, \"encryptKeystoreJsonSync\", { enumerable: true, get: function() {\n return json_keystore_js_1.encryptKeystoreJsonSync;\n } });\n var mnemonic_js_1 = require_mnemonic();\n Object.defineProperty(exports3, \"Mnemonic\", { enumerable: true, get: function() {\n return mnemonic_js_1.Mnemonic;\n } });\n var wallet_js_1 = require_wallet();\n Object.defineProperty(exports3, \"Wallet\", { enumerable: true, get: function() {\n return wallet_js_1.Wallet;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/bit-reader.js\n var require_bit_reader = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/bit-reader.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeBits = void 0;\n var Base64 = \")!@#$%^&*(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_\";\n function decodeBits(width, data) {\n const maxValue = (1 << width) - 1;\n const result = [];\n let accum = 0, bits = 0, flood = 0;\n for (let i3 = 0; i3 < data.length; i3++) {\n accum = accum << 6 | Base64.indexOf(data[i3]);\n bits += 6;\n while (bits >= width) {\n const value = accum >> bits - width;\n accum &= (1 << bits - width) - 1;\n bits -= width;\n if (value === 0) {\n flood += maxValue;\n } else {\n result.push(value + flood);\n flood = 0;\n }\n }\n }\n return result;\n }\n exports3.decodeBits = decodeBits;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/decode-owla.js\n var require_decode_owla = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/decode-owla.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeOwlA = void 0;\n var index_js_1 = require_utils8();\n var bit_reader_js_1 = require_bit_reader();\n var decode_owl_js_1 = require_decode_owl();\n function decodeOwlA(data, accents) {\n let words = (0, decode_owl_js_1.decodeOwl)(data).join(\",\");\n accents.split(/,/g).forEach((accent) => {\n const match = accent.match(/^([a-z]*)([0-9]+)([0-9])(.*)$/);\n (0, index_js_1.assertArgument)(match !== null, \"internal error parsing accents\", \"accents\", accents);\n let posOffset = 0;\n const positions = (0, bit_reader_js_1.decodeBits)(parseInt(match[3]), match[4]);\n const charCode = parseInt(match[2]);\n const regex = new RegExp(`([${match[1]}])`, \"g\");\n words = words.replace(regex, (all, letter) => {\n const rem = --positions[posOffset];\n if (rem === 0) {\n letter = String.fromCharCode(letter.charCodeAt(0), charCode);\n posOffset++;\n }\n return letter;\n });\n });\n return words.split(\",\");\n }\n exports3.decodeOwlA = decodeOwlA;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist-owla.js\n var require_wordlist_owla = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist-owla.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WordlistOwlA = void 0;\n var wordlist_owl_js_1 = require_wordlist_owl();\n var decode_owla_js_1 = require_decode_owla();\n var WordlistOwlA = class extends wordlist_owl_js_1.WordlistOwl {\n #accent;\n /**\n * Creates a new Wordlist for %%locale%% using the OWLA %%data%%\n * and %%accent%% data and validated against the %%checksum%%.\n */\n constructor(locale, data, accent, checksum4) {\n super(locale, data, checksum4);\n this.#accent = accent;\n }\n /**\n * The OWLA-encoded accent data.\n */\n get _accent() {\n return this.#accent;\n }\n /**\n * Decode all the words for the wordlist.\n */\n _decodeWords() {\n return (0, decode_owla_js_1.decodeOwlA)(this._data, this._accent);\n }\n };\n exports3.WordlistOwlA = WordlistOwlA;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlists-browser.js\n var require_wordlists_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlists-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wordlists = void 0;\n var lang_en_js_1 = require_lang_en2();\n exports3.wordlists = {\n en: lang_en_js_1.LangEn.wordlist()\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/index.js\n var require_wordlists2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wordlists = exports3.WordlistOwlA = exports3.WordlistOwl = exports3.LangEn = exports3.Wordlist = void 0;\n var wordlist_js_1 = require_wordlist2();\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return wordlist_js_1.Wordlist;\n } });\n var lang_en_js_1 = require_lang_en2();\n Object.defineProperty(exports3, \"LangEn\", { enumerable: true, get: function() {\n return lang_en_js_1.LangEn;\n } });\n var wordlist_owl_js_1 = require_wordlist_owl();\n Object.defineProperty(exports3, \"WordlistOwl\", { enumerable: true, get: function() {\n return wordlist_owl_js_1.WordlistOwl;\n } });\n var wordlist_owla_js_1 = require_wordlist_owla();\n Object.defineProperty(exports3, \"WordlistOwlA\", { enumerable: true, get: function() {\n return wordlist_owla_js_1.WordlistOwlA;\n } });\n var wordlists_js_1 = require_wordlists_browser();\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return wordlists_js_1.wordlists;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/ethers.js\n var require_ethers2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/ethers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ripemd160 = exports3.keccak256 = exports3.randomBytes = exports3.computeHmac = exports3.UndecodedEventLog = exports3.EventLog = exports3.ContractUnknownEventPayload = exports3.ContractTransactionResponse = exports3.ContractTransactionReceipt = exports3.ContractEventPayload = exports3.ContractFactory = exports3.Contract = exports3.BaseContract = exports3.MessagePrefix = exports3.EtherSymbol = exports3.ZeroHash = exports3.N = exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.ZeroAddress = exports3.resolveAddress = exports3.isAddress = exports3.isAddressable = exports3.getCreate2Address = exports3.getCreateAddress = exports3.getIcapAddress = exports3.getAddress = exports3.Typed = exports3.TransactionDescription = exports3.Result = exports3.LogDescription = exports3.Interface = exports3.Indexed = exports3.ErrorDescription = exports3.checkResultErrors = exports3.StructFragment = exports3.ParamType = exports3.NamedFragment = exports3.FunctionFragment = exports3.FallbackFragment = exports3.Fragment = exports3.EventFragment = exports3.ErrorFragment = exports3.ConstructorFragment = exports3.AbiCoder = exports3.encodeBytes32String = exports3.decodeBytes32String = exports3.version = void 0;\n exports3.WebSocketProvider = exports3.SocketProvider = exports3.IpcSocketProvider = exports3.QuickNodeProvider = exports3.PocketProvider = exports3.InfuraWebSocketProvider = exports3.InfuraProvider = exports3.EtherscanProvider = exports3.CloudflareProvider = exports3.ChainstackProvider = exports3.BlockscoutProvider = exports3.AnkrProvider = exports3.AlchemyProvider = exports3.BrowserProvider = exports3.JsonRpcSigner = exports3.JsonRpcProvider = exports3.JsonRpcApiProvider = exports3.FallbackProvider = exports3.AbstractProvider = exports3.VoidSigner = exports3.NonceManager = exports3.AbstractSigner = exports3.TransactionResponse = exports3.TransactionReceipt = exports3.Log = exports3.FeeData = exports3.Block = exports3.getDefaultProvider = exports3.verifyTypedData = exports3.TypedDataEncoder = exports3.solidityPackedSha256 = exports3.solidityPackedKeccak256 = exports3.solidityPacked = exports3.verifyMessage = exports3.hashMessage = exports3.verifyAuthorization = exports3.hashAuthorization = exports3.dnsEncode = exports3.namehash = exports3.isValidName = exports3.ensNormalize = exports3.id = exports3.SigningKey = exports3.Signature = exports3.lock = exports3.scryptSync = exports3.scrypt = exports3.pbkdf2 = exports3.sha512 = exports3.sha256 = void 0;\n exports3.FetchCancelSignal = exports3.FetchResponse = exports3.FetchRequest = exports3.EventPayload = exports3.isError = exports3.isCallException = exports3.makeError = exports3.assertPrivate = exports3.assertNormalize = exports3.assertArgumentCount = exports3.assertArgument = exports3.assert = exports3.resolveProperties = exports3.defineProperties = exports3.zeroPadValue = exports3.zeroPadBytes = exports3.stripZerosLeft = exports3.isBytesLike = exports3.isHexString = exports3.hexlify = exports3.getBytesCopy = exports3.getBytes = exports3.dataSlice = exports3.dataLength = exports3.concat = exports3.encodeBase64 = exports3.decodeBase64 = exports3.encodeBase58 = exports3.decodeBase58 = exports3.Transaction = exports3.recoverAddress = exports3.computeAddress = exports3.authorizationify = exports3.accessListify = exports3.showThrottleMessage = exports3.copyRequest = exports3.UnmanagedSubscriber = exports3.SocketSubscriber = exports3.SocketPendingSubscriber = exports3.SocketEventSubscriber = exports3.SocketBlockSubscriber = exports3.MulticoinProviderPlugin = exports3.NetworkPlugin = exports3.GasCostPlugin = exports3.FetchUrlFeeDataNetworkPlugin = exports3.FeeDataNetworkPlugin = exports3.EtherscanPlugin = exports3.EnsPlugin = exports3.Network = exports3.EnsResolver = void 0;\n exports3.wordlists = exports3.WordlistOwlA = exports3.WordlistOwl = exports3.LangEn = exports3.Wordlist = exports3.encryptKeystoreJsonSync = exports3.encryptKeystoreJson = exports3.decryptKeystoreJson = exports3.decryptKeystoreJsonSync = exports3.decryptCrowdsaleJson = exports3.isKeystoreJson = exports3.isCrowdsaleJson = exports3.getIndexedAccountPath = exports3.getAccountPath = exports3.defaultPath = exports3.Wallet = exports3.HDNodeVoidWallet = exports3.HDNodeWallet = exports3.BaseWallet = exports3.Mnemonic = exports3.uuidV4 = exports3.encodeRlp = exports3.decodeRlp = exports3.Utf8ErrorFuncs = exports3.toUtf8String = exports3.toUtf8CodePoints = exports3.toUtf8Bytes = exports3.parseUnits = exports3.formatUnits = exports3.parseEther = exports3.formatEther = exports3.mask = exports3.toTwos = exports3.fromTwos = exports3.toQuantity = exports3.toNumber = exports3.toBeHex = exports3.toBigInt = exports3.toBeArray = exports3.getUint = exports3.getNumber = exports3.getBigInt = exports3.FixedNumber = void 0;\n var _version_js_1 = require_version27();\n Object.defineProperty(exports3, \"version\", { enumerable: true, get: function() {\n return _version_js_1.version;\n } });\n var index_js_1 = require_abi();\n Object.defineProperty(exports3, \"decodeBytes32String\", { enumerable: true, get: function() {\n return index_js_1.decodeBytes32String;\n } });\n Object.defineProperty(exports3, \"encodeBytes32String\", { enumerable: true, get: function() {\n return index_js_1.encodeBytes32String;\n } });\n Object.defineProperty(exports3, \"AbiCoder\", { enumerable: true, get: function() {\n return index_js_1.AbiCoder;\n } });\n Object.defineProperty(exports3, \"ConstructorFragment\", { enumerable: true, get: function() {\n return index_js_1.ConstructorFragment;\n } });\n Object.defineProperty(exports3, \"ErrorFragment\", { enumerable: true, get: function() {\n return index_js_1.ErrorFragment;\n } });\n Object.defineProperty(exports3, \"EventFragment\", { enumerable: true, get: function() {\n return index_js_1.EventFragment;\n } });\n Object.defineProperty(exports3, \"Fragment\", { enumerable: true, get: function() {\n return index_js_1.Fragment;\n } });\n Object.defineProperty(exports3, \"FallbackFragment\", { enumerable: true, get: function() {\n return index_js_1.FallbackFragment;\n } });\n Object.defineProperty(exports3, \"FunctionFragment\", { enumerable: true, get: function() {\n return index_js_1.FunctionFragment;\n } });\n Object.defineProperty(exports3, \"NamedFragment\", { enumerable: true, get: function() {\n return index_js_1.NamedFragment;\n } });\n Object.defineProperty(exports3, \"ParamType\", { enumerable: true, get: function() {\n return index_js_1.ParamType;\n } });\n Object.defineProperty(exports3, \"StructFragment\", { enumerable: true, get: function() {\n return index_js_1.StructFragment;\n } });\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return index_js_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"ErrorDescription\", { enumerable: true, get: function() {\n return index_js_1.ErrorDescription;\n } });\n Object.defineProperty(exports3, \"Indexed\", { enumerable: true, get: function() {\n return index_js_1.Indexed;\n } });\n Object.defineProperty(exports3, \"Interface\", { enumerable: true, get: function() {\n return index_js_1.Interface;\n } });\n Object.defineProperty(exports3, \"LogDescription\", { enumerable: true, get: function() {\n return index_js_1.LogDescription;\n } });\n Object.defineProperty(exports3, \"Result\", { enumerable: true, get: function() {\n return index_js_1.Result;\n } });\n Object.defineProperty(exports3, \"TransactionDescription\", { enumerable: true, get: function() {\n return index_js_1.TransactionDescription;\n } });\n Object.defineProperty(exports3, \"Typed\", { enumerable: true, get: function() {\n return index_js_1.Typed;\n } });\n var index_js_2 = require_address3();\n Object.defineProperty(exports3, \"getAddress\", { enumerable: true, get: function() {\n return index_js_2.getAddress;\n } });\n Object.defineProperty(exports3, \"getIcapAddress\", { enumerable: true, get: function() {\n return index_js_2.getIcapAddress;\n } });\n Object.defineProperty(exports3, \"getCreateAddress\", { enumerable: true, get: function() {\n return index_js_2.getCreateAddress;\n } });\n Object.defineProperty(exports3, \"getCreate2Address\", { enumerable: true, get: function() {\n return index_js_2.getCreate2Address;\n } });\n Object.defineProperty(exports3, \"isAddressable\", { enumerable: true, get: function() {\n return index_js_2.isAddressable;\n } });\n Object.defineProperty(exports3, \"isAddress\", { enumerable: true, get: function() {\n return index_js_2.isAddress;\n } });\n Object.defineProperty(exports3, \"resolveAddress\", { enumerable: true, get: function() {\n return index_js_2.resolveAddress;\n } });\n var index_js_3 = require_constants5();\n Object.defineProperty(exports3, \"ZeroAddress\", { enumerable: true, get: function() {\n return index_js_3.ZeroAddress;\n } });\n Object.defineProperty(exports3, \"WeiPerEther\", { enumerable: true, get: function() {\n return index_js_3.WeiPerEther;\n } });\n Object.defineProperty(exports3, \"MaxUint256\", { enumerable: true, get: function() {\n return index_js_3.MaxUint256;\n } });\n Object.defineProperty(exports3, \"MinInt256\", { enumerable: true, get: function() {\n return index_js_3.MinInt256;\n } });\n Object.defineProperty(exports3, \"MaxInt256\", { enumerable: true, get: function() {\n return index_js_3.MaxInt256;\n } });\n Object.defineProperty(exports3, \"N\", { enumerable: true, get: function() {\n return index_js_3.N;\n } });\n Object.defineProperty(exports3, \"ZeroHash\", { enumerable: true, get: function() {\n return index_js_3.ZeroHash;\n } });\n Object.defineProperty(exports3, \"EtherSymbol\", { enumerable: true, get: function() {\n return index_js_3.EtherSymbol;\n } });\n Object.defineProperty(exports3, \"MessagePrefix\", { enumerable: true, get: function() {\n return index_js_3.MessagePrefix;\n } });\n var index_js_4 = require_contract2();\n Object.defineProperty(exports3, \"BaseContract\", { enumerable: true, get: function() {\n return index_js_4.BaseContract;\n } });\n Object.defineProperty(exports3, \"Contract\", { enumerable: true, get: function() {\n return index_js_4.Contract;\n } });\n Object.defineProperty(exports3, \"ContractFactory\", { enumerable: true, get: function() {\n return index_js_4.ContractFactory;\n } });\n Object.defineProperty(exports3, \"ContractEventPayload\", { enumerable: true, get: function() {\n return index_js_4.ContractEventPayload;\n } });\n Object.defineProperty(exports3, \"ContractTransactionReceipt\", { enumerable: true, get: function() {\n return index_js_4.ContractTransactionReceipt;\n } });\n Object.defineProperty(exports3, \"ContractTransactionResponse\", { enumerable: true, get: function() {\n return index_js_4.ContractTransactionResponse;\n } });\n Object.defineProperty(exports3, \"ContractUnknownEventPayload\", { enumerable: true, get: function() {\n return index_js_4.ContractUnknownEventPayload;\n } });\n Object.defineProperty(exports3, \"EventLog\", { enumerable: true, get: function() {\n return index_js_4.EventLog;\n } });\n Object.defineProperty(exports3, \"UndecodedEventLog\", { enumerable: true, get: function() {\n return index_js_4.UndecodedEventLog;\n } });\n var index_js_5 = require_crypto2();\n Object.defineProperty(exports3, \"computeHmac\", { enumerable: true, get: function() {\n return index_js_5.computeHmac;\n } });\n Object.defineProperty(exports3, \"randomBytes\", { enumerable: true, get: function() {\n return index_js_5.randomBytes;\n } });\n Object.defineProperty(exports3, \"keccak256\", { enumerable: true, get: function() {\n return index_js_5.keccak256;\n } });\n Object.defineProperty(exports3, \"ripemd160\", { enumerable: true, get: function() {\n return index_js_5.ripemd160;\n } });\n Object.defineProperty(exports3, \"sha256\", { enumerable: true, get: function() {\n return index_js_5.sha256;\n } });\n Object.defineProperty(exports3, \"sha512\", { enumerable: true, get: function() {\n return index_js_5.sha512;\n } });\n Object.defineProperty(exports3, \"pbkdf2\", { enumerable: true, get: function() {\n return index_js_5.pbkdf2;\n } });\n Object.defineProperty(exports3, \"scrypt\", { enumerable: true, get: function() {\n return index_js_5.scrypt;\n } });\n Object.defineProperty(exports3, \"scryptSync\", { enumerable: true, get: function() {\n return index_js_5.scryptSync;\n } });\n Object.defineProperty(exports3, \"lock\", { enumerable: true, get: function() {\n return index_js_5.lock;\n } });\n Object.defineProperty(exports3, \"Signature\", { enumerable: true, get: function() {\n return index_js_5.Signature;\n } });\n Object.defineProperty(exports3, \"SigningKey\", { enumerable: true, get: function() {\n return index_js_5.SigningKey;\n } });\n var index_js_6 = require_hash2();\n Object.defineProperty(exports3, \"id\", { enumerable: true, get: function() {\n return index_js_6.id;\n } });\n Object.defineProperty(exports3, \"ensNormalize\", { enumerable: true, get: function() {\n return index_js_6.ensNormalize;\n } });\n Object.defineProperty(exports3, \"isValidName\", { enumerable: true, get: function() {\n return index_js_6.isValidName;\n } });\n Object.defineProperty(exports3, \"namehash\", { enumerable: true, get: function() {\n return index_js_6.namehash;\n } });\n Object.defineProperty(exports3, \"dnsEncode\", { enumerable: true, get: function() {\n return index_js_6.dnsEncode;\n } });\n Object.defineProperty(exports3, \"hashAuthorization\", { enumerable: true, get: function() {\n return index_js_6.hashAuthorization;\n } });\n Object.defineProperty(exports3, \"verifyAuthorization\", { enumerable: true, get: function() {\n return index_js_6.verifyAuthorization;\n } });\n Object.defineProperty(exports3, \"hashMessage\", { enumerable: true, get: function() {\n return index_js_6.hashMessage;\n } });\n Object.defineProperty(exports3, \"verifyMessage\", { enumerable: true, get: function() {\n return index_js_6.verifyMessage;\n } });\n Object.defineProperty(exports3, \"solidityPacked\", { enumerable: true, get: function() {\n return index_js_6.solidityPacked;\n } });\n Object.defineProperty(exports3, \"solidityPackedKeccak256\", { enumerable: true, get: function() {\n return index_js_6.solidityPackedKeccak256;\n } });\n Object.defineProperty(exports3, \"solidityPackedSha256\", { enumerable: true, get: function() {\n return index_js_6.solidityPackedSha256;\n } });\n Object.defineProperty(exports3, \"TypedDataEncoder\", { enumerable: true, get: function() {\n return index_js_6.TypedDataEncoder;\n } });\n Object.defineProperty(exports3, \"verifyTypedData\", { enumerable: true, get: function() {\n return index_js_6.verifyTypedData;\n } });\n var index_js_7 = require_providers();\n Object.defineProperty(exports3, \"getDefaultProvider\", { enumerable: true, get: function() {\n return index_js_7.getDefaultProvider;\n } });\n Object.defineProperty(exports3, \"Block\", { enumerable: true, get: function() {\n return index_js_7.Block;\n } });\n Object.defineProperty(exports3, \"FeeData\", { enumerable: true, get: function() {\n return index_js_7.FeeData;\n } });\n Object.defineProperty(exports3, \"Log\", { enumerable: true, get: function() {\n return index_js_7.Log;\n } });\n Object.defineProperty(exports3, \"TransactionReceipt\", { enumerable: true, get: function() {\n return index_js_7.TransactionReceipt;\n } });\n Object.defineProperty(exports3, \"TransactionResponse\", { enumerable: true, get: function() {\n return index_js_7.TransactionResponse;\n } });\n Object.defineProperty(exports3, \"AbstractSigner\", { enumerable: true, get: function() {\n return index_js_7.AbstractSigner;\n } });\n Object.defineProperty(exports3, \"NonceManager\", { enumerable: true, get: function() {\n return index_js_7.NonceManager;\n } });\n Object.defineProperty(exports3, \"VoidSigner\", { enumerable: true, get: function() {\n return index_js_7.VoidSigner;\n } });\n Object.defineProperty(exports3, \"AbstractProvider\", { enumerable: true, get: function() {\n return index_js_7.AbstractProvider;\n } });\n Object.defineProperty(exports3, \"FallbackProvider\", { enumerable: true, get: function() {\n return index_js_7.FallbackProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcApiProvider\", { enumerable: true, get: function() {\n return index_js_7.JsonRpcApiProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcProvider\", { enumerable: true, get: function() {\n return index_js_7.JsonRpcProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcSigner\", { enumerable: true, get: function() {\n return index_js_7.JsonRpcSigner;\n } });\n Object.defineProperty(exports3, \"BrowserProvider\", { enumerable: true, get: function() {\n return index_js_7.BrowserProvider;\n } });\n Object.defineProperty(exports3, \"AlchemyProvider\", { enumerable: true, get: function() {\n return index_js_7.AlchemyProvider;\n } });\n Object.defineProperty(exports3, \"AnkrProvider\", { enumerable: true, get: function() {\n return index_js_7.AnkrProvider;\n } });\n Object.defineProperty(exports3, \"BlockscoutProvider\", { enumerable: true, get: function() {\n return index_js_7.BlockscoutProvider;\n } });\n Object.defineProperty(exports3, \"ChainstackProvider\", { enumerable: true, get: function() {\n return index_js_7.ChainstackProvider;\n } });\n Object.defineProperty(exports3, \"CloudflareProvider\", { enumerable: true, get: function() {\n return index_js_7.CloudflareProvider;\n } });\n Object.defineProperty(exports3, \"EtherscanProvider\", { enumerable: true, get: function() {\n return index_js_7.EtherscanProvider;\n } });\n Object.defineProperty(exports3, \"InfuraProvider\", { enumerable: true, get: function() {\n return index_js_7.InfuraProvider;\n } });\n Object.defineProperty(exports3, \"InfuraWebSocketProvider\", { enumerable: true, get: function() {\n return index_js_7.InfuraWebSocketProvider;\n } });\n Object.defineProperty(exports3, \"PocketProvider\", { enumerable: true, get: function() {\n return index_js_7.PocketProvider;\n } });\n Object.defineProperty(exports3, \"QuickNodeProvider\", { enumerable: true, get: function() {\n return index_js_7.QuickNodeProvider;\n } });\n Object.defineProperty(exports3, \"IpcSocketProvider\", { enumerable: true, get: function() {\n return index_js_7.IpcSocketProvider;\n } });\n Object.defineProperty(exports3, \"SocketProvider\", { enumerable: true, get: function() {\n return index_js_7.SocketProvider;\n } });\n Object.defineProperty(exports3, \"WebSocketProvider\", { enumerable: true, get: function() {\n return index_js_7.WebSocketProvider;\n } });\n Object.defineProperty(exports3, \"EnsResolver\", { enumerable: true, get: function() {\n return index_js_7.EnsResolver;\n } });\n Object.defineProperty(exports3, \"Network\", { enumerable: true, get: function() {\n return index_js_7.Network;\n } });\n Object.defineProperty(exports3, \"EnsPlugin\", { enumerable: true, get: function() {\n return index_js_7.EnsPlugin;\n } });\n Object.defineProperty(exports3, \"EtherscanPlugin\", { enumerable: true, get: function() {\n return index_js_7.EtherscanPlugin;\n } });\n Object.defineProperty(exports3, \"FeeDataNetworkPlugin\", { enumerable: true, get: function() {\n return index_js_7.FeeDataNetworkPlugin;\n } });\n Object.defineProperty(exports3, \"FetchUrlFeeDataNetworkPlugin\", { enumerable: true, get: function() {\n return index_js_7.FetchUrlFeeDataNetworkPlugin;\n } });\n Object.defineProperty(exports3, \"GasCostPlugin\", { enumerable: true, get: function() {\n return index_js_7.GasCostPlugin;\n } });\n Object.defineProperty(exports3, \"NetworkPlugin\", { enumerable: true, get: function() {\n return index_js_7.NetworkPlugin;\n } });\n Object.defineProperty(exports3, \"MulticoinProviderPlugin\", { enumerable: true, get: function() {\n return index_js_7.MulticoinProviderPlugin;\n } });\n Object.defineProperty(exports3, \"SocketBlockSubscriber\", { enumerable: true, get: function() {\n return index_js_7.SocketBlockSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketEventSubscriber\", { enumerable: true, get: function() {\n return index_js_7.SocketEventSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketPendingSubscriber\", { enumerable: true, get: function() {\n return index_js_7.SocketPendingSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketSubscriber\", { enumerable: true, get: function() {\n return index_js_7.SocketSubscriber;\n } });\n Object.defineProperty(exports3, \"UnmanagedSubscriber\", { enumerable: true, get: function() {\n return index_js_7.UnmanagedSubscriber;\n } });\n Object.defineProperty(exports3, \"copyRequest\", { enumerable: true, get: function() {\n return index_js_7.copyRequest;\n } });\n Object.defineProperty(exports3, \"showThrottleMessage\", { enumerable: true, get: function() {\n return index_js_7.showThrottleMessage;\n } });\n var index_js_8 = require_transaction2();\n Object.defineProperty(exports3, \"accessListify\", { enumerable: true, get: function() {\n return index_js_8.accessListify;\n } });\n Object.defineProperty(exports3, \"authorizationify\", { enumerable: true, get: function() {\n return index_js_8.authorizationify;\n } });\n Object.defineProperty(exports3, \"computeAddress\", { enumerable: true, get: function() {\n return index_js_8.computeAddress;\n } });\n Object.defineProperty(exports3, \"recoverAddress\", { enumerable: true, get: function() {\n return index_js_8.recoverAddress;\n } });\n Object.defineProperty(exports3, \"Transaction\", { enumerable: true, get: function() {\n return index_js_8.Transaction;\n } });\n var index_js_9 = require_utils8();\n Object.defineProperty(exports3, \"decodeBase58\", { enumerable: true, get: function() {\n return index_js_9.decodeBase58;\n } });\n Object.defineProperty(exports3, \"encodeBase58\", { enumerable: true, get: function() {\n return index_js_9.encodeBase58;\n } });\n Object.defineProperty(exports3, \"decodeBase64\", { enumerable: true, get: function() {\n return index_js_9.decodeBase64;\n } });\n Object.defineProperty(exports3, \"encodeBase64\", { enumerable: true, get: function() {\n return index_js_9.encodeBase64;\n } });\n Object.defineProperty(exports3, \"concat\", { enumerable: true, get: function() {\n return index_js_9.concat;\n } });\n Object.defineProperty(exports3, \"dataLength\", { enumerable: true, get: function() {\n return index_js_9.dataLength;\n } });\n Object.defineProperty(exports3, \"dataSlice\", { enumerable: true, get: function() {\n return index_js_9.dataSlice;\n } });\n Object.defineProperty(exports3, \"getBytes\", { enumerable: true, get: function() {\n return index_js_9.getBytes;\n } });\n Object.defineProperty(exports3, \"getBytesCopy\", { enumerable: true, get: function() {\n return index_js_9.getBytesCopy;\n } });\n Object.defineProperty(exports3, \"hexlify\", { enumerable: true, get: function() {\n return index_js_9.hexlify;\n } });\n Object.defineProperty(exports3, \"isHexString\", { enumerable: true, get: function() {\n return index_js_9.isHexString;\n } });\n Object.defineProperty(exports3, \"isBytesLike\", { enumerable: true, get: function() {\n return index_js_9.isBytesLike;\n } });\n Object.defineProperty(exports3, \"stripZerosLeft\", { enumerable: true, get: function() {\n return index_js_9.stripZerosLeft;\n } });\n Object.defineProperty(exports3, \"zeroPadBytes\", { enumerable: true, get: function() {\n return index_js_9.zeroPadBytes;\n } });\n Object.defineProperty(exports3, \"zeroPadValue\", { enumerable: true, get: function() {\n return index_js_9.zeroPadValue;\n } });\n Object.defineProperty(exports3, \"defineProperties\", { enumerable: true, get: function() {\n return index_js_9.defineProperties;\n } });\n Object.defineProperty(exports3, \"resolveProperties\", { enumerable: true, get: function() {\n return index_js_9.resolveProperties;\n } });\n Object.defineProperty(exports3, \"assert\", { enumerable: true, get: function() {\n return index_js_9.assert;\n } });\n Object.defineProperty(exports3, \"assertArgument\", { enumerable: true, get: function() {\n return index_js_9.assertArgument;\n } });\n Object.defineProperty(exports3, \"assertArgumentCount\", { enumerable: true, get: function() {\n return index_js_9.assertArgumentCount;\n } });\n Object.defineProperty(exports3, \"assertNormalize\", { enumerable: true, get: function() {\n return index_js_9.assertNormalize;\n } });\n Object.defineProperty(exports3, \"assertPrivate\", { enumerable: true, get: function() {\n return index_js_9.assertPrivate;\n } });\n Object.defineProperty(exports3, \"makeError\", { enumerable: true, get: function() {\n return index_js_9.makeError;\n } });\n Object.defineProperty(exports3, \"isCallException\", { enumerable: true, get: function() {\n return index_js_9.isCallException;\n } });\n Object.defineProperty(exports3, \"isError\", { enumerable: true, get: function() {\n return index_js_9.isError;\n } });\n Object.defineProperty(exports3, \"EventPayload\", { enumerable: true, get: function() {\n return index_js_9.EventPayload;\n } });\n Object.defineProperty(exports3, \"FetchRequest\", { enumerable: true, get: function() {\n return index_js_9.FetchRequest;\n } });\n Object.defineProperty(exports3, \"FetchResponse\", { enumerable: true, get: function() {\n return index_js_9.FetchResponse;\n } });\n Object.defineProperty(exports3, \"FetchCancelSignal\", { enumerable: true, get: function() {\n return index_js_9.FetchCancelSignal;\n } });\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return index_js_9.FixedNumber;\n } });\n Object.defineProperty(exports3, \"getBigInt\", { enumerable: true, get: function() {\n return index_js_9.getBigInt;\n } });\n Object.defineProperty(exports3, \"getNumber\", { enumerable: true, get: function() {\n return index_js_9.getNumber;\n } });\n Object.defineProperty(exports3, \"getUint\", { enumerable: true, get: function() {\n return index_js_9.getUint;\n } });\n Object.defineProperty(exports3, \"toBeArray\", { enumerable: true, get: function() {\n return index_js_9.toBeArray;\n } });\n Object.defineProperty(exports3, \"toBigInt\", { enumerable: true, get: function() {\n return index_js_9.toBigInt;\n } });\n Object.defineProperty(exports3, \"toBeHex\", { enumerable: true, get: function() {\n return index_js_9.toBeHex;\n } });\n Object.defineProperty(exports3, \"toNumber\", { enumerable: true, get: function() {\n return index_js_9.toNumber;\n } });\n Object.defineProperty(exports3, \"toQuantity\", { enumerable: true, get: function() {\n return index_js_9.toQuantity;\n } });\n Object.defineProperty(exports3, \"fromTwos\", { enumerable: true, get: function() {\n return index_js_9.fromTwos;\n } });\n Object.defineProperty(exports3, \"toTwos\", { enumerable: true, get: function() {\n return index_js_9.toTwos;\n } });\n Object.defineProperty(exports3, \"mask\", { enumerable: true, get: function() {\n return index_js_9.mask;\n } });\n Object.defineProperty(exports3, \"formatEther\", { enumerable: true, get: function() {\n return index_js_9.formatEther;\n } });\n Object.defineProperty(exports3, \"parseEther\", { enumerable: true, get: function() {\n return index_js_9.parseEther;\n } });\n Object.defineProperty(exports3, \"formatUnits\", { enumerable: true, get: function() {\n return index_js_9.formatUnits;\n } });\n Object.defineProperty(exports3, \"parseUnits\", { enumerable: true, get: function() {\n return index_js_9.parseUnits;\n } });\n Object.defineProperty(exports3, \"toUtf8Bytes\", { enumerable: true, get: function() {\n return index_js_9.toUtf8Bytes;\n } });\n Object.defineProperty(exports3, \"toUtf8CodePoints\", { enumerable: true, get: function() {\n return index_js_9.toUtf8CodePoints;\n } });\n Object.defineProperty(exports3, \"toUtf8String\", { enumerable: true, get: function() {\n return index_js_9.toUtf8String;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorFuncs\", { enumerable: true, get: function() {\n return index_js_9.Utf8ErrorFuncs;\n } });\n Object.defineProperty(exports3, \"decodeRlp\", { enumerable: true, get: function() {\n return index_js_9.decodeRlp;\n } });\n Object.defineProperty(exports3, \"encodeRlp\", { enumerable: true, get: function() {\n return index_js_9.encodeRlp;\n } });\n Object.defineProperty(exports3, \"uuidV4\", { enumerable: true, get: function() {\n return index_js_9.uuidV4;\n } });\n var index_js_10 = require_wallet2();\n Object.defineProperty(exports3, \"Mnemonic\", { enumerable: true, get: function() {\n return index_js_10.Mnemonic;\n } });\n Object.defineProperty(exports3, \"BaseWallet\", { enumerable: true, get: function() {\n return index_js_10.BaseWallet;\n } });\n Object.defineProperty(exports3, \"HDNodeWallet\", { enumerable: true, get: function() {\n return index_js_10.HDNodeWallet;\n } });\n Object.defineProperty(exports3, \"HDNodeVoidWallet\", { enumerable: true, get: function() {\n return index_js_10.HDNodeVoidWallet;\n } });\n Object.defineProperty(exports3, \"Wallet\", { enumerable: true, get: function() {\n return index_js_10.Wallet;\n } });\n Object.defineProperty(exports3, \"defaultPath\", { enumerable: true, get: function() {\n return index_js_10.defaultPath;\n } });\n Object.defineProperty(exports3, \"getAccountPath\", { enumerable: true, get: function() {\n return index_js_10.getAccountPath;\n } });\n Object.defineProperty(exports3, \"getIndexedAccountPath\", { enumerable: true, get: function() {\n return index_js_10.getIndexedAccountPath;\n } });\n Object.defineProperty(exports3, \"isCrowdsaleJson\", { enumerable: true, get: function() {\n return index_js_10.isCrowdsaleJson;\n } });\n Object.defineProperty(exports3, \"isKeystoreJson\", { enumerable: true, get: function() {\n return index_js_10.isKeystoreJson;\n } });\n Object.defineProperty(exports3, \"decryptCrowdsaleJson\", { enumerable: true, get: function() {\n return index_js_10.decryptCrowdsaleJson;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreJsonSync\", { enumerable: true, get: function() {\n return index_js_10.decryptKeystoreJsonSync;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreJson\", { enumerable: true, get: function() {\n return index_js_10.decryptKeystoreJson;\n } });\n Object.defineProperty(exports3, \"encryptKeystoreJson\", { enumerable: true, get: function() {\n return index_js_10.encryptKeystoreJson;\n } });\n Object.defineProperty(exports3, \"encryptKeystoreJsonSync\", { enumerable: true, get: function() {\n return index_js_10.encryptKeystoreJsonSync;\n } });\n var index_js_11 = require_wordlists2();\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return index_js_11.Wordlist;\n } });\n Object.defineProperty(exports3, \"LangEn\", { enumerable: true, get: function() {\n return index_js_11.LangEn;\n } });\n Object.defineProperty(exports3, \"WordlistOwl\", { enumerable: true, get: function() {\n return index_js_11.WordlistOwl;\n } });\n Object.defineProperty(exports3, \"WordlistOwlA\", { enumerable: true, get: function() {\n return index_js_11.WordlistOwlA;\n } });\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return index_js_11.wordlists;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/index.js\n var require_lib34 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ethers = void 0;\n var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));\n var ethers3 = tslib_1.__importStar(require_ethers2());\n exports3.ethers = ethers3;\n tslib_1.__exportStar(require_ethers2(), exports3);\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/populateTransaction.js\n var require_populateTransaction = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/populateTransaction.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.populateTransaction = void 0;\n var ethers_v6_1 = require_lib34();\n var populateTransaction = async ({ to, from: from14, data, value, rpcUrl, chainId, gasBufferPercentage, baseFeePerGasBufferPercentage }) => {\n if (gasBufferPercentage !== void 0 && !Number.isInteger(gasBufferPercentage)) {\n throw new Error(\"[populateTransaction] gasBufferPercentage must be an integer\");\n }\n if (baseFeePerGasBufferPercentage !== void 0 && !Number.isInteger(baseFeePerGasBufferPercentage)) {\n throw new Error(\"[populateTransaction] baseFeePerGasBufferPercentage must be an integer\");\n }\n const provider = new ethers_v6_1.JsonRpcProvider(rpcUrl);\n const signer = new ethers_v6_1.VoidSigner(from14, provider);\n const populatedTx = await signer.populateTransaction({\n to,\n from: from14,\n data,\n value,\n chainId\n });\n if (!populatedTx.gasLimit) {\n throw new Error(`[estimateGas] Unable to estimate gas for transaction: ${JSON.stringify({\n to,\n from: from14,\n data,\n value\n })}`);\n }\n if (gasBufferPercentage !== void 0) {\n populatedTx.gasLimit = BigInt(populatedTx.gasLimit) * BigInt(100 + gasBufferPercentage) / 100n;\n }\n const partialUnsignedTx = {\n to: populatedTx.to ?? void 0,\n nonce: populatedTx.nonce ?? void 0,\n gasLimit: (0, ethers_v6_1.toQuantity)(populatedTx.gasLimit),\n data: populatedTx.data ?? void 0,\n value: populatedTx.value ? (0, ethers_v6_1.toQuantity)(populatedTx.value) : \"0x0\",\n chainId: populatedTx.chainId ? (0, ethers_v6_1.toNumber)(populatedTx.chainId) : void 0,\n // Typed-Transaction features\n type: populatedTx.type ?? void 0,\n // EIP-2930; Type 1 & EIP-1559; Type 2\n accessList: populatedTx.accessList ?? void 0\n };\n if (populatedTx.gasPrice != null) {\n return {\n ...partialUnsignedTx,\n gasPrice: (0, ethers_v6_1.toQuantity)(populatedTx.gasPrice)\n };\n }\n if (populatedTx.maxFeePerGas == null) {\n throw new Error(\"[estimateGas] maxFeePerGas is missing from populated transaction\");\n }\n if (populatedTx.maxPriorityFeePerGas == null) {\n throw new Error(\"[estimateGas] maxPriorityFeePerGas is missing from populated transaction\");\n }\n if (baseFeePerGasBufferPercentage !== void 0) {\n populatedTx.maxFeePerGas = BigInt(populatedTx.maxFeePerGas) * BigInt(100 + baseFeePerGasBufferPercentage) / 100n;\n }\n return {\n ...partialUnsignedTx,\n maxFeePerGas: (0, ethers_v6_1.toQuantity)(populatedTx.maxFeePerGas),\n maxPriorityFeePerGas: (0, ethers_v6_1.toQuantity)(populatedTx.maxPriorityFeePerGas)\n };\n };\n exports3.populateTransaction = populateTransaction;\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/abis/EntryPointAbi_v6.js\n var EntryPointAbi_v6;\n var init_EntryPointAbi_v6 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/abis/EntryPointAbi_v6.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n EntryPointAbi_v6 = [\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"preOpGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"paid\",\n type: \"uint256\"\n },\n {\n internalType: \"uint48\",\n name: \"validAfter\",\n type: \"uint48\"\n },\n {\n internalType: \"uint48\",\n name: \"validUntil\",\n type: \"uint48\"\n },\n {\n internalType: \"bool\",\n name: \"targetSuccess\",\n type: \"bool\"\n },\n {\n internalType: \"bytes\",\n name: \"targetResult\",\n type: \"bytes\"\n }\n ],\n name: \"ExecutionResult\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"opIndex\",\n type: \"uint256\"\n },\n {\n internalType: \"string\",\n name: \"reason\",\n type: \"string\"\n }\n ],\n name: \"FailedOp\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n }\n ],\n name: \"SenderAddressResult\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"aggregator\",\n type: \"address\"\n }\n ],\n name: \"SignatureValidationFailed\",\n type: \"error\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"preOpGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"prefund\",\n type: \"uint256\"\n },\n {\n internalType: \"bool\",\n name: \"sigFailed\",\n type: \"bool\"\n },\n {\n internalType: \"uint48\",\n name: \"validAfter\",\n type: \"uint48\"\n },\n {\n internalType: \"uint48\",\n name: \"validUntil\",\n type: \"uint48\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterContext\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct IEntryPoint.ReturnInfo\",\n name: \"returnInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"senderInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"factoryInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"paymasterInfo\",\n type: \"tuple\"\n }\n ],\n name: \"ValidationResult\",\n type: \"error\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"preOpGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"prefund\",\n type: \"uint256\"\n },\n {\n internalType: \"bool\",\n name: \"sigFailed\",\n type: \"bool\"\n },\n {\n internalType: \"uint48\",\n name: \"validAfter\",\n type: \"uint48\"\n },\n {\n internalType: \"uint48\",\n name: \"validUntil\",\n type: \"uint48\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterContext\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct IEntryPoint.ReturnInfo\",\n name: \"returnInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"senderInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"factoryInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"paymasterInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"aggregator\",\n type: \"address\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"stakeInfo\",\n type: \"tuple\"\n }\n ],\n internalType: \"struct IEntryPoint.AggregatorStakeInfo\",\n name: \"aggregatorInfo\",\n type: \"tuple\"\n }\n ],\n name: \"ValidationResultWithAggregation\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"factory\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n }\n ],\n name: \"AccountDeployed\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [],\n name: \"BeforeExecution\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"totalDeposit\",\n type: \"uint256\"\n }\n ],\n name: \"Deposited\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"aggregator\",\n type: \"address\"\n }\n ],\n name: \"SignatureAggregatorChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"totalStaked\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n name: \"StakeLocked\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"withdrawTime\",\n type: \"uint256\"\n }\n ],\n name: \"StakeUnlocked\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"StakeWithdrawn\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"actualGasCost\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"actualGasUsed\",\n type: \"uint256\"\n }\n ],\n name: \"UserOperationEvent\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"revertReason\",\n type: \"bytes\"\n }\n ],\n name: \"UserOperationRevertReason\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"Withdrawn\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"SIG_VALIDATION_FAILED\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n }\n ],\n name: \"_validateSenderAndPaymaster\",\n outputs: [],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint32\",\n name: \"unstakeDelaySec\",\n type: \"uint32\"\n }\n ],\n name: \"addStake\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"depositTo\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n name: \"deposits\",\n outputs: [\n {\n internalType: \"uint112\",\n name: \"deposit\",\n type: \"uint112\"\n },\n {\n internalType: \"bool\",\n name: \"staked\",\n type: \"bool\"\n },\n {\n internalType: \"uint112\",\n name: \"stake\",\n type: \"uint112\"\n },\n {\n internalType: \"uint32\",\n name: \"unstakeDelaySec\",\n type: \"uint32\"\n },\n {\n internalType: \"uint48\",\n name: \"withdrawTime\",\n type: \"uint48\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"getDepositInfo\",\n outputs: [\n {\n components: [\n {\n internalType: \"uint112\",\n name: \"deposit\",\n type: \"uint112\"\n },\n {\n internalType: \"bool\",\n name: \"staked\",\n type: \"bool\"\n },\n {\n internalType: \"uint112\",\n name: \"stake\",\n type: \"uint112\"\n },\n {\n internalType: \"uint32\",\n name: \"unstakeDelaySec\",\n type: \"uint32\"\n },\n {\n internalType: \"uint48\",\n name: \"withdrawTime\",\n type: \"uint48\"\n }\n ],\n internalType: \"struct IStakeManager.DepositInfo\",\n name: \"info\",\n type: \"tuple\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint192\",\n name: \"key\",\n type: \"uint192\"\n }\n ],\n name: \"getNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n }\n ],\n name: \"getSenderAddress\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation\",\n name: \"userOp\",\n type: \"tuple\"\n }\n ],\n name: \"getUserOpHash\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation[]\",\n name: \"userOps\",\n type: \"tuple[]\"\n },\n {\n internalType: \"contract IAggregator\",\n name: \"aggregator\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct IEntryPoint.UserOpsPerAggregator[]\",\n name: \"opsPerAggregator\",\n type: \"tuple[]\"\n },\n {\n internalType: \"address payable\",\n name: \"beneficiary\",\n type: \"address\"\n }\n ],\n name: \"handleAggregatedOps\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation[]\",\n name: \"ops\",\n type: \"tuple[]\"\n },\n {\n internalType: \"address payable\",\n name: \"beneficiary\",\n type: \"address\"\n }\n ],\n name: \"handleOps\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint192\",\n name: \"key\",\n type: \"uint192\"\n }\n ],\n name: \"incrementNonce\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n components: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct EntryPoint.MemoryUserOp\",\n name: \"mUserOp\",\n type: \"tuple\"\n },\n {\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint256\",\n name: \"prefund\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"contextOffset\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preOpGas\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct EntryPoint.UserOpInfo\",\n name: \"opInfo\",\n type: \"tuple\"\n },\n {\n internalType: \"bytes\",\n name: \"context\",\n type: \"bytes\"\n }\n ],\n name: \"innerHandleOp\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"actualGasCost\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n },\n {\n internalType: \"uint192\",\n name: \"\",\n type: \"uint192\"\n }\n ],\n name: \"nonceSequenceNumber\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation\",\n name: \"op\",\n type: \"tuple\"\n },\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"targetCallData\",\n type: \"bytes\"\n }\n ],\n name: \"simulateHandleOp\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation\",\n name: \"userOp\",\n type: \"tuple\"\n }\n ],\n name: \"simulateValidation\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"unlockStake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n }\n ],\n name: \"withdrawStake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"withdrawAmount\",\n type: \"uint256\"\n }\n ],\n name: \"withdrawTo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n stateMutability: \"payable\",\n type: \"receive\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/abis/EntryPointAbi_v7.js\n var EntryPointAbi_v7;\n var init_EntryPointAbi_v7 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/abis/EntryPointAbi_v7.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n EntryPointAbi_v7 = [\n {\n inputs: [\n { internalType: \"bool\", name: \"success\", type: \"bool\" },\n { internalType: \"bytes\", name: \"ret\", type: \"bytes\" }\n ],\n name: \"DelegateAndRevert\",\n type: \"error\"\n },\n {\n inputs: [\n { internalType: \"uint256\", name: \"opIndex\", type: \"uint256\" },\n { internalType: \"string\", name: \"reason\", type: \"string\" }\n ],\n name: \"FailedOp\",\n type: \"error\"\n },\n {\n inputs: [\n { internalType: \"uint256\", name: \"opIndex\", type: \"uint256\" },\n { internalType: \"string\", name: \"reason\", type: \"string\" },\n { internalType: \"bytes\", name: \"inner\", type: \"bytes\" }\n ],\n name: \"FailedOpWithRevert\",\n type: \"error\"\n },\n {\n inputs: [{ internalType: \"bytes\", name: \"returnData\", type: \"bytes\" }],\n name: \"PostOpReverted\",\n type: \"error\"\n },\n { inputs: [], name: \"ReentrancyGuardReentrantCall\", type: \"error\" },\n {\n inputs: [{ internalType: \"address\", name: \"sender\", type: \"address\" }],\n name: \"SenderAddressResult\",\n type: \"error\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"aggregator\", type: \"address\" }],\n name: \"SignatureValidationFailed\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"factory\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n }\n ],\n name: \"AccountDeployed\",\n type: \"event\"\n },\n { anonymous: false, inputs: [], name: \"BeforeExecution\", type: \"event\" },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"totalDeposit\",\n type: \"uint256\"\n }\n ],\n name: \"Deposited\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"revertReason\",\n type: \"bytes\"\n }\n ],\n name: \"PostOpRevertReason\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"aggregator\",\n type: \"address\"\n }\n ],\n name: \"SignatureAggregatorChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"totalStaked\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n name: \"StakeLocked\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"withdrawTime\",\n type: \"uint256\"\n }\n ],\n name: \"StakeUnlocked\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"StakeWithdrawn\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n { indexed: false, internalType: \"bool\", name: \"success\", type: \"bool\" },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"actualGasCost\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"actualGasUsed\",\n type: \"uint256\"\n }\n ],\n name: \"UserOperationEvent\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n }\n ],\n name: \"UserOperationPrefundTooLow\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"revertReason\",\n type: \"bytes\"\n }\n ],\n name: \"UserOperationRevertReason\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"Withdrawn\",\n type: \"event\"\n },\n {\n inputs: [\n { internalType: \"uint32\", name: \"unstakeDelaySec\", type: \"uint32\" }\n ],\n name: \"addStake\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"account\", type: \"address\" }],\n name: \"balanceOf\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"target\", type: \"address\" },\n { internalType: \"bytes\", name: \"data\", type: \"bytes\" }\n ],\n name: \"delegateAndRevert\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"account\", type: \"address\" }],\n name: \"depositTo\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"\", type: \"address\" }],\n name: \"deposits\",\n outputs: [\n { internalType: \"uint256\", name: \"deposit\", type: \"uint256\" },\n { internalType: \"bool\", name: \"staked\", type: \"bool\" },\n { internalType: \"uint112\", name: \"stake\", type: \"uint112\" },\n { internalType: \"uint32\", name: \"unstakeDelaySec\", type: \"uint32\" },\n { internalType: \"uint48\", name: \"withdrawTime\", type: \"uint48\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"account\", type: \"address\" }],\n name: \"getDepositInfo\",\n outputs: [\n {\n components: [\n { internalType: \"uint256\", name: \"deposit\", type: \"uint256\" },\n { internalType: \"bool\", name: \"staked\", type: \"bool\" },\n { internalType: \"uint112\", name: \"stake\", type: \"uint112\" },\n { internalType: \"uint32\", name: \"unstakeDelaySec\", type: \"uint32\" },\n { internalType: \"uint48\", name: \"withdrawTime\", type: \"uint48\" }\n ],\n internalType: \"struct IStakeManager.DepositInfo\",\n name: \"info\",\n type: \"tuple\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint192\", name: \"key\", type: \"uint192\" }\n ],\n name: \"getNonce\",\n outputs: [{ internalType: \"uint256\", name: \"nonce\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes\", name: \"initCode\", type: \"bytes\" }],\n name: \"getSenderAddress\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"initCode\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n {\n internalType: \"bytes32\",\n name: \"accountGasLimits\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"bytes32\", name: \"gasFees\", type: \"bytes32\" },\n { internalType: \"bytes\", name: \"paymasterAndData\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct PackedUserOperation\",\n name: \"userOp\",\n type: \"tuple\"\n }\n ],\n name: \"getUserOpHash\",\n outputs: [{ internalType: \"bytes32\", name: \"\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"initCode\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n {\n internalType: \"bytes32\",\n name: \"accountGasLimits\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"bytes32\", name: \"gasFees\", type: \"bytes32\" },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct PackedUserOperation[]\",\n name: \"userOps\",\n type: \"tuple[]\"\n },\n {\n internalType: \"contract IAggregator\",\n name: \"aggregator\",\n type: \"address\"\n },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct IEntryPoint.UserOpsPerAggregator[]\",\n name: \"opsPerAggregator\",\n type: \"tuple[]\"\n },\n { internalType: \"address payable\", name: \"beneficiary\", type: \"address\" }\n ],\n name: \"handleAggregatedOps\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"initCode\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n {\n internalType: \"bytes32\",\n name: \"accountGasLimits\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"bytes32\", name: \"gasFees\", type: \"bytes32\" },\n { internalType: \"bytes\", name: \"paymasterAndData\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct PackedUserOperation[]\",\n name: \"ops\",\n type: \"tuple[]\"\n },\n { internalType: \"address payable\", name: \"beneficiary\", type: \"address\" }\n ],\n name: \"handleOps\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"uint192\", name: \"key\", type: \"uint192\" }],\n name: \"incrementNonce\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n {\n components: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"paymasterVerificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"paymasterPostOpGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"address\", name: \"paymaster\", type: \"address\" },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct EntryPoint.MemoryUserOp\",\n name: \"mUserOp\",\n type: \"tuple\"\n },\n { internalType: \"bytes32\", name: \"userOpHash\", type: \"bytes32\" },\n { internalType: \"uint256\", name: \"prefund\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"contextOffset\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"preOpGas\", type: \"uint256\" }\n ],\n internalType: \"struct EntryPoint.UserOpInfo\",\n name: \"opInfo\",\n type: \"tuple\"\n },\n { internalType: \"bytes\", name: \"context\", type: \"bytes\" }\n ],\n name: \"innerHandleOp\",\n outputs: [\n { internalType: \"uint256\", name: \"actualGasCost\", type: \"uint256\" }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint192\", name: \"\", type: \"uint192\" }\n ],\n name: \"nonceSequenceNumber\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes4\", name: \"interfaceId\", type: \"bytes4\" }],\n name: \"supportsInterface\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"unlockStake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n }\n ],\n name: \"withdrawStake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n { internalType: \"uint256\", name: \"withdrawAmount\", type: \"uint256\" }\n ],\n name: \"withdrawTo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n { stateMutability: \"payable\", type: \"receive\" }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/version.js\n var version2;\n var init_version2 = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n version2 = \"1.1.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/errors.js\n var BaseError;\n var init_errors2 = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_version2();\n BaseError = class _BaseError extends Error {\n constructor(shortMessage, args = {}) {\n const details = args.cause instanceof _BaseError ? args.cause.details : args.cause?.message ? args.cause.message : args.details;\n const docsPath8 = args.cause instanceof _BaseError ? args.cause.docsPath || args.docsPath : args.docsPath;\n const message = [\n shortMessage || \"An error occurred.\",\n \"\",\n ...args.metaMessages ? [...args.metaMessages, \"\"] : [],\n ...docsPath8 ? [`Docs: https://abitype.dev${docsPath8}`] : [],\n ...details ? [`Details: ${details}`] : [],\n `Version: abitype@${version2}`\n ].join(\"\\n\");\n super(message);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiTypeError\"\n });\n if (args.cause)\n this.cause = args.cause;\n this.details = details;\n this.docsPath = docsPath8;\n this.metaMessages = args.metaMessages;\n this.shortMessage = shortMessage;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/regex.js\n function execTyped(regex, string) {\n const match = regex.exec(string);\n return match?.groups;\n }\n var bytesRegex, integerRegex, isTupleRegex;\n var init_regex = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/regex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n integerRegex = /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\n isTupleRegex = /^\\(.+?\\).*?$/;\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js\n function formatAbiParameter(abiParameter) {\n let type = abiParameter.type;\n if (tupleRegex.test(abiParameter.type) && \"components\" in abiParameter) {\n type = \"(\";\n const length = abiParameter.components.length;\n for (let i3 = 0; i3 < length; i3++) {\n const component = abiParameter.components[i3];\n type += formatAbiParameter(component);\n if (i3 < length - 1)\n type += \", \";\n }\n const result = execTyped(tupleRegex, abiParameter.type);\n type += `)${result?.array ?? \"\"}`;\n return formatAbiParameter({\n ...abiParameter,\n type\n });\n }\n if (\"indexed\" in abiParameter && abiParameter.indexed)\n type = `${type} indexed`;\n if (abiParameter.name)\n return `${type} ${abiParameter.name}`;\n return type;\n }\n var tupleRegex;\n var init_formatAbiParameter = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n tupleRegex = /^tuple(?(\\[(\\d*)\\])*)$/;\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js\n function formatAbiParameters(abiParameters) {\n let params = \"\";\n const length = abiParameters.length;\n for (let i3 = 0; i3 < length; i3++) {\n const abiParameter = abiParameters[i3];\n params += formatAbiParameter(abiParameter);\n if (i3 !== length - 1)\n params += \", \";\n }\n return params;\n }\n var init_formatAbiParameters = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatAbiParameter();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js\n function formatAbiItem(abiItem) {\n if (abiItem.type === \"function\")\n return `function ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability && abiItem.stateMutability !== \"nonpayable\" ? ` ${abiItem.stateMutability}` : \"\"}${abiItem.outputs?.length ? ` returns (${formatAbiParameters(abiItem.outputs)})` : \"\"}`;\n if (abiItem.type === \"event\")\n return `event ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;\n if (abiItem.type === \"error\")\n return `error ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;\n if (abiItem.type === \"constructor\")\n return `constructor(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability === \"payable\" ? \" payable\" : \"\"}`;\n if (abiItem.type === \"fallback\")\n return `fallback() external${abiItem.stateMutability === \"payable\" ? \" payable\" : \"\"}`;\n return \"receive() external payable\";\n }\n var init_formatAbiItem = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatAbiParameters();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js\n function isErrorSignature(signature) {\n return errorSignatureRegex.test(signature);\n }\n function execErrorSignature(signature) {\n return execTyped(errorSignatureRegex, signature);\n }\n function isEventSignature(signature) {\n return eventSignatureRegex.test(signature);\n }\n function execEventSignature(signature) {\n return execTyped(eventSignatureRegex, signature);\n }\n function isFunctionSignature(signature) {\n return functionSignatureRegex.test(signature);\n }\n function execFunctionSignature(signature) {\n return execTyped(functionSignatureRegex, signature);\n }\n function isStructSignature(signature) {\n return structSignatureRegex.test(signature);\n }\n function execStructSignature(signature) {\n return execTyped(structSignatureRegex, signature);\n }\n function isConstructorSignature(signature) {\n return constructorSignatureRegex.test(signature);\n }\n function execConstructorSignature(signature) {\n return execTyped(constructorSignatureRegex, signature);\n }\n function isFallbackSignature(signature) {\n return fallbackSignatureRegex.test(signature);\n }\n function execFallbackSignature(signature) {\n return execTyped(fallbackSignatureRegex, signature);\n }\n function isReceiveSignature(signature) {\n return receiveSignatureRegex.test(signature);\n }\n var errorSignatureRegex, eventSignatureRegex, functionSignatureRegex, structSignatureRegex, constructorSignatureRegex, fallbackSignatureRegex, receiveSignatureRegex, modifiers, eventModifiers, functionModifiers;\n var init_signatures = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n errorSignatureRegex = /^error (?[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?.*?)\\)$/;\n eventSignatureRegex = /^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?.*?)\\)$/;\n functionSignatureRegex = /^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?.*?)\\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\\s?\\((?.*?)\\))?$/;\n structSignatureRegex = /^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \\{(?.*?)\\}$/;\n constructorSignatureRegex = /^constructor\\((?.*?)\\)(?:\\s(?payable{1}))?$/;\n fallbackSignatureRegex = /^fallback\\(\\) external(?:\\s(?payable{1}))?$/;\n receiveSignatureRegex = /^receive\\(\\) external payable$/;\n modifiers = /* @__PURE__ */ new Set([\n \"memory\",\n \"indexed\",\n \"storage\",\n \"calldata\"\n ]);\n eventModifiers = /* @__PURE__ */ new Set([\"indexed\"]);\n functionModifiers = /* @__PURE__ */ new Set([\n \"calldata\",\n \"memory\",\n \"storage\"\n ]);\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js\n var InvalidAbiItemError, UnknownTypeError, UnknownSolidityTypeError;\n var init_abiItem = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n InvalidAbiItemError = class extends BaseError {\n constructor({ signature }) {\n super(\"Failed to parse ABI item.\", {\n details: `parseAbiItem(${JSON.stringify(signature, null, 2)})`,\n docsPath: \"/api/human#parseabiitem-1\"\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidAbiItemError\"\n });\n }\n };\n UnknownTypeError = class extends BaseError {\n constructor({ type }) {\n super(\"Unknown type.\", {\n metaMessages: [\n `Type \"${type}\" is not a valid ABI type. Perhaps you forgot to include a struct signature?`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"UnknownTypeError\"\n });\n }\n };\n UnknownSolidityTypeError = class extends BaseError {\n constructor({ type }) {\n super(\"Unknown type.\", {\n metaMessages: [`Type \"${type}\" is not a valid ABI type.`]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"UnknownSolidityTypeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js\n var InvalidAbiParametersError, InvalidParameterError, SolidityProtectedKeywordError, InvalidModifierError, InvalidFunctionModifierError, InvalidAbiTypeParameterError;\n var init_abiParameter = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n InvalidAbiParametersError = class extends BaseError {\n constructor({ params }) {\n super(\"Failed to parse ABI parameters.\", {\n details: `parseAbiParameters(${JSON.stringify(params, null, 2)})`,\n docsPath: \"/api/human#parseabiparameters-1\"\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidAbiParametersError\"\n });\n }\n };\n InvalidParameterError = class extends BaseError {\n constructor({ param }) {\n super(\"Invalid ABI parameter.\", {\n details: param\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidParameterError\"\n });\n }\n };\n SolidityProtectedKeywordError = class extends BaseError {\n constructor({ param, name }) {\n super(\"Invalid ABI parameter.\", {\n details: param,\n metaMessages: [\n `\"${name}\" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SolidityProtectedKeywordError\"\n });\n }\n };\n InvalidModifierError = class extends BaseError {\n constructor({ param, type, modifier }) {\n super(\"Invalid ABI parameter.\", {\n details: param,\n metaMessages: [\n `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : \"\"}.`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidModifierError\"\n });\n }\n };\n InvalidFunctionModifierError = class extends BaseError {\n constructor({ param, type, modifier }) {\n super(\"Invalid ABI parameter.\", {\n details: param,\n metaMessages: [\n `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : \"\"}.`,\n `Data location can only be specified for array, struct, or mapping types, but \"${modifier}\" was given.`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidFunctionModifierError\"\n });\n }\n };\n InvalidAbiTypeParameterError = class extends BaseError {\n constructor({ abiParameter }) {\n super(\"Invalid ABI parameter.\", {\n details: JSON.stringify(abiParameter, null, 2),\n metaMessages: [\"ABI parameter type is invalid.\"]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidAbiTypeParameterError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/signature.js\n var InvalidSignatureError, UnknownSignatureError, InvalidStructSignatureError;\n var init_signature = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/signature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n InvalidSignatureError = class extends BaseError {\n constructor({ signature, type }) {\n super(`Invalid ${type} signature.`, {\n details: signature\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidSignatureError\"\n });\n }\n };\n UnknownSignatureError = class extends BaseError {\n constructor({ signature }) {\n super(\"Unknown signature.\", {\n details: signature\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"UnknownSignatureError\"\n });\n }\n };\n InvalidStructSignatureError = class extends BaseError {\n constructor({ signature }) {\n super(\"Invalid struct signature.\", {\n details: signature,\n metaMessages: [\"No properties exist.\"]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidStructSignatureError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/struct.js\n var CircularReferenceError;\n var init_struct = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/struct.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n CircularReferenceError = class extends BaseError {\n constructor({ type }) {\n super(\"Circular reference detected.\", {\n metaMessages: [`Struct \"${type}\" is a circular reference.`]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"CircularReferenceError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js\n var InvalidParenthesisError;\n var init_splitParameters = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n InvalidParenthesisError = class extends BaseError {\n constructor({ current, depth }) {\n super(\"Unbalanced parentheses.\", {\n metaMessages: [\n `\"${current.trim()}\" has too many ${depth > 0 ? \"opening\" : \"closing\"} parentheses.`\n ],\n details: `Depth \"${depth}\"`\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidParenthesisError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/cache.js\n function getParameterCacheKey(param, type, structs) {\n let structKey = \"\";\n if (structs)\n for (const struct of Object.entries(structs)) {\n if (!struct)\n continue;\n let propertyKey = \"\";\n for (const property of struct[1]) {\n propertyKey += `[${property.type}${property.name ? `:${property.name}` : \"\"}]`;\n }\n structKey += `(${struct[0]}{${propertyKey}})`;\n }\n if (type)\n return `${type}:${param}${structKey}`;\n return param;\n }\n var parameterCache;\n var init_cache = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/cache.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n parameterCache = /* @__PURE__ */ new Map([\n // Unnamed\n [\"address\", { type: \"address\" }],\n [\"bool\", { type: \"bool\" }],\n [\"bytes\", { type: \"bytes\" }],\n [\"bytes32\", { type: \"bytes32\" }],\n [\"int\", { type: \"int256\" }],\n [\"int256\", { type: \"int256\" }],\n [\"string\", { type: \"string\" }],\n [\"uint\", { type: \"uint256\" }],\n [\"uint8\", { type: \"uint8\" }],\n [\"uint16\", { type: \"uint16\" }],\n [\"uint24\", { type: \"uint24\" }],\n [\"uint32\", { type: \"uint32\" }],\n [\"uint64\", { type: \"uint64\" }],\n [\"uint96\", { type: \"uint96\" }],\n [\"uint112\", { type: \"uint112\" }],\n [\"uint160\", { type: \"uint160\" }],\n [\"uint192\", { type: \"uint192\" }],\n [\"uint256\", { type: \"uint256\" }],\n // Named\n [\"address owner\", { type: \"address\", name: \"owner\" }],\n [\"address to\", { type: \"address\", name: \"to\" }],\n [\"bool approved\", { type: \"bool\", name: \"approved\" }],\n [\"bytes _data\", { type: \"bytes\", name: \"_data\" }],\n [\"bytes data\", { type: \"bytes\", name: \"data\" }],\n [\"bytes signature\", { type: \"bytes\", name: \"signature\" }],\n [\"bytes32 hash\", { type: \"bytes32\", name: \"hash\" }],\n [\"bytes32 r\", { type: \"bytes32\", name: \"r\" }],\n [\"bytes32 root\", { type: \"bytes32\", name: \"root\" }],\n [\"bytes32 s\", { type: \"bytes32\", name: \"s\" }],\n [\"string name\", { type: \"string\", name: \"name\" }],\n [\"string symbol\", { type: \"string\", name: \"symbol\" }],\n [\"string tokenURI\", { type: \"string\", name: \"tokenURI\" }],\n [\"uint tokenId\", { type: \"uint256\", name: \"tokenId\" }],\n [\"uint8 v\", { type: \"uint8\", name: \"v\" }],\n [\"uint256 balance\", { type: \"uint256\", name: \"balance\" }],\n [\"uint256 tokenId\", { type: \"uint256\", name: \"tokenId\" }],\n [\"uint256 value\", { type: \"uint256\", name: \"value\" }],\n // Indexed\n [\n \"event:address indexed from\",\n { type: \"address\", name: \"from\", indexed: true }\n ],\n [\"event:address indexed to\", { type: \"address\", name: \"to\", indexed: true }],\n [\n \"event:uint indexed tokenId\",\n { type: \"uint256\", name: \"tokenId\", indexed: true }\n ],\n [\n \"event:uint256 indexed tokenId\",\n { type: \"uint256\", name: \"tokenId\", indexed: true }\n ]\n ]);\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/utils.js\n function parseSignature(signature, structs = {}) {\n if (isFunctionSignature(signature))\n return parseFunctionSignature(signature, structs);\n if (isEventSignature(signature))\n return parseEventSignature(signature, structs);\n if (isErrorSignature(signature))\n return parseErrorSignature(signature, structs);\n if (isConstructorSignature(signature))\n return parseConstructorSignature(signature, structs);\n if (isFallbackSignature(signature))\n return parseFallbackSignature(signature);\n if (isReceiveSignature(signature))\n return {\n type: \"receive\",\n stateMutability: \"payable\"\n };\n throw new UnknownSignatureError({ signature });\n }\n function parseFunctionSignature(signature, structs = {}) {\n const match = execFunctionSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"function\" });\n const inputParams = splitParameters(match.parameters);\n const inputs = [];\n const inputLength = inputParams.length;\n for (let i3 = 0; i3 < inputLength; i3++) {\n inputs.push(parseAbiParameter(inputParams[i3], {\n modifiers: functionModifiers,\n structs,\n type: \"function\"\n }));\n }\n const outputs = [];\n if (match.returns) {\n const outputParams = splitParameters(match.returns);\n const outputLength = outputParams.length;\n for (let i3 = 0; i3 < outputLength; i3++) {\n outputs.push(parseAbiParameter(outputParams[i3], {\n modifiers: functionModifiers,\n structs,\n type: \"function\"\n }));\n }\n }\n return {\n name: match.name,\n type: \"function\",\n stateMutability: match.stateMutability ?? \"nonpayable\",\n inputs,\n outputs\n };\n }\n function parseEventSignature(signature, structs = {}) {\n const match = execEventSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"event\" });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i3 = 0; i3 < length; i3++)\n abiParameters.push(parseAbiParameter(params[i3], {\n modifiers: eventModifiers,\n structs,\n type: \"event\"\n }));\n return { name: match.name, type: \"event\", inputs: abiParameters };\n }\n function parseErrorSignature(signature, structs = {}) {\n const match = execErrorSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"error\" });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i3 = 0; i3 < length; i3++)\n abiParameters.push(parseAbiParameter(params[i3], { structs, type: \"error\" }));\n return { name: match.name, type: \"error\", inputs: abiParameters };\n }\n function parseConstructorSignature(signature, structs = {}) {\n const match = execConstructorSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"constructor\" });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i3 = 0; i3 < length; i3++)\n abiParameters.push(parseAbiParameter(params[i3], { structs, type: \"constructor\" }));\n return {\n type: \"constructor\",\n stateMutability: match.stateMutability ?? \"nonpayable\",\n inputs: abiParameters\n };\n }\n function parseFallbackSignature(signature) {\n const match = execFallbackSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"fallback\" });\n return {\n type: \"fallback\",\n stateMutability: match.stateMutability ?? \"nonpayable\"\n };\n }\n function parseAbiParameter(param, options) {\n const parameterCacheKey = getParameterCacheKey(param, options?.type, options?.structs);\n if (parameterCache.has(parameterCacheKey))\n return parameterCache.get(parameterCacheKey);\n const isTuple = isTupleRegex.test(param);\n const match = execTyped(isTuple ? abiParameterWithTupleRegex : abiParameterWithoutTupleRegex, param);\n if (!match)\n throw new InvalidParameterError({ param });\n if (match.name && isSolidityKeyword(match.name))\n throw new SolidityProtectedKeywordError({ param, name: match.name });\n const name = match.name ? { name: match.name } : {};\n const indexed = match.modifier === \"indexed\" ? { indexed: true } : {};\n const structs = options?.structs ?? {};\n let type;\n let components = {};\n if (isTuple) {\n type = \"tuple\";\n const params = splitParameters(match.type);\n const components_ = [];\n const length = params.length;\n for (let i3 = 0; i3 < length; i3++) {\n components_.push(parseAbiParameter(params[i3], { structs }));\n }\n components = { components: components_ };\n } else if (match.type in structs) {\n type = \"tuple\";\n components = { components: structs[match.type] };\n } else if (dynamicIntegerRegex.test(match.type)) {\n type = `${match.type}256`;\n } else if (match.type === \"address payable\") {\n type = \"address\";\n } else {\n type = match.type;\n if (!(options?.type === \"struct\") && !isSolidityType(type))\n throw new UnknownSolidityTypeError({ type });\n }\n if (match.modifier) {\n if (!options?.modifiers?.has?.(match.modifier))\n throw new InvalidModifierError({\n param,\n type: options?.type,\n modifier: match.modifier\n });\n if (functionModifiers.has(match.modifier) && !isValidDataLocation(type, !!match.array))\n throw new InvalidFunctionModifierError({\n param,\n type: options?.type,\n modifier: match.modifier\n });\n }\n const abiParameter = {\n type: `${type}${match.array ?? \"\"}`,\n ...name,\n ...indexed,\n ...components\n };\n parameterCache.set(parameterCacheKey, abiParameter);\n return abiParameter;\n }\n function splitParameters(params, result = [], current = \"\", depth = 0) {\n const length = params.trim().length;\n for (let i3 = 0; i3 < length; i3++) {\n const char = params[i3];\n const tail = params.slice(i3 + 1);\n switch (char) {\n case \",\":\n return depth === 0 ? splitParameters(tail, [...result, current.trim()]) : splitParameters(tail, result, `${current}${char}`, depth);\n case \"(\":\n return splitParameters(tail, result, `${current}${char}`, depth + 1);\n case \")\":\n return splitParameters(tail, result, `${current}${char}`, depth - 1);\n default:\n return splitParameters(tail, result, `${current}${char}`, depth);\n }\n }\n if (current === \"\")\n return result;\n if (depth !== 0)\n throw new InvalidParenthesisError({ current, depth });\n result.push(current.trim());\n return result;\n }\n function isSolidityType(type) {\n return type === \"address\" || type === \"bool\" || type === \"function\" || type === \"string\" || bytesRegex.test(type) || integerRegex.test(type);\n }\n function isSolidityKeyword(name) {\n return name === \"address\" || name === \"bool\" || name === \"function\" || name === \"string\" || name === \"tuple\" || bytesRegex.test(name) || integerRegex.test(name) || protectedKeywordsRegex.test(name);\n }\n function isValidDataLocation(type, isArray) {\n return isArray || type === \"bytes\" || type === \"string\" || type === \"tuple\";\n }\n var abiParameterWithoutTupleRegex, abiParameterWithTupleRegex, dynamicIntegerRegex, protectedKeywordsRegex;\n var init_utils2 = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n init_abiItem();\n init_abiParameter();\n init_signature();\n init_splitParameters();\n init_cache();\n init_signatures();\n abiParameterWithoutTupleRegex = /^(?[a-zA-Z$_][a-zA-Z0-9$_]*(?:\\spayable)?)(?(?:\\[\\d*?\\])+?)?(?:\\s(?calldata|indexed|memory|storage{1}))?(?:\\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\n abiParameterWithTupleRegex = /^\\((?.+?)\\)(?(?:\\[\\d*?\\])+?)?(?:\\s(?calldata|indexed|memory|storage{1}))?(?:\\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\n dynamicIntegerRegex = /^u?int$/;\n protectedKeywordsRegex = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/structs.js\n function parseStructs(signatures) {\n const shallowStructs = {};\n const signaturesLength = signatures.length;\n for (let i3 = 0; i3 < signaturesLength; i3++) {\n const signature = signatures[i3];\n if (!isStructSignature(signature))\n continue;\n const match = execStructSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"struct\" });\n const properties = match.properties.split(\";\");\n const components = [];\n const propertiesLength = properties.length;\n for (let k4 = 0; k4 < propertiesLength; k4++) {\n const property = properties[k4];\n const trimmed = property.trim();\n if (!trimmed)\n continue;\n const abiParameter = parseAbiParameter(trimmed, {\n type: \"struct\"\n });\n components.push(abiParameter);\n }\n if (!components.length)\n throw new InvalidStructSignatureError({ signature });\n shallowStructs[match.name] = components;\n }\n const resolvedStructs = {};\n const entries = Object.entries(shallowStructs);\n const entriesLength = entries.length;\n for (let i3 = 0; i3 < entriesLength; i3++) {\n const [name, parameters] = entries[i3];\n resolvedStructs[name] = resolveStructs(parameters, shallowStructs);\n }\n return resolvedStructs;\n }\n function resolveStructs(abiParameters, structs, ancestors = /* @__PURE__ */ new Set()) {\n const components = [];\n const length = abiParameters.length;\n for (let i3 = 0; i3 < length; i3++) {\n const abiParameter = abiParameters[i3];\n const isTuple = isTupleRegex.test(abiParameter.type);\n if (isTuple)\n components.push(abiParameter);\n else {\n const match = execTyped(typeWithoutTupleRegex, abiParameter.type);\n if (!match?.type)\n throw new InvalidAbiTypeParameterError({ abiParameter });\n const { array, type } = match;\n if (type in structs) {\n if (ancestors.has(type))\n throw new CircularReferenceError({ type });\n components.push({\n ...abiParameter,\n type: `tuple${array ?? \"\"}`,\n components: resolveStructs(structs[type] ?? [], structs, /* @__PURE__ */ new Set([...ancestors, type]))\n });\n } else {\n if (isSolidityType(type))\n components.push(abiParameter);\n else\n throw new UnknownTypeError({ type });\n }\n }\n }\n return components;\n }\n var typeWithoutTupleRegex;\n var init_structs = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/structs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n init_abiItem();\n init_abiParameter();\n init_signature();\n init_struct();\n init_signatures();\n init_utils2();\n typeWithoutTupleRegex = /^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\\[\\d*?\\])+?)?$/;\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbi.js\n function parseAbi(signatures) {\n const structs = parseStructs(signatures);\n const abi2 = [];\n const length = signatures.length;\n for (let i3 = 0; i3 < length; i3++) {\n const signature = signatures[i3];\n if (isStructSignature(signature))\n continue;\n abi2.push(parseSignature(signature, structs));\n }\n return abi2;\n }\n var init_parseAbi = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_signatures();\n init_structs();\n init_utils2();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbiItem.js\n function parseAbiItem(signature) {\n let abiItem;\n if (typeof signature === \"string\")\n abiItem = parseSignature(signature);\n else {\n const structs = parseStructs(signature);\n const length = signature.length;\n for (let i3 = 0; i3 < length; i3++) {\n const signature_ = signature[i3];\n if (isStructSignature(signature_))\n continue;\n abiItem = parseSignature(signature_, structs);\n break;\n }\n }\n if (!abiItem)\n throw new InvalidAbiItemError({ signature });\n return abiItem;\n }\n var init_parseAbiItem = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abiItem();\n init_signatures();\n init_structs();\n init_utils2();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js\n function parseAbiParameters(params) {\n const abiParameters = [];\n if (typeof params === \"string\") {\n const parameters = splitParameters(params);\n const length = parameters.length;\n for (let i3 = 0; i3 < length; i3++) {\n abiParameters.push(parseAbiParameter(parameters[i3], { modifiers }));\n }\n } else {\n const structs = parseStructs(params);\n const length = params.length;\n for (let i3 = 0; i3 < length; i3++) {\n const signature = params[i3];\n if (isStructSignature(signature))\n continue;\n const parameters = splitParameters(signature);\n const length2 = parameters.length;\n for (let k4 = 0; k4 < length2; k4++) {\n abiParameters.push(parseAbiParameter(parameters[k4], { modifiers, structs }));\n }\n }\n }\n if (abiParameters.length === 0)\n throw new InvalidAbiParametersError({ params });\n return abiParameters;\n }\n var init_parseAbiParameters = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abiParameter();\n init_signatures();\n init_structs();\n init_utils2();\n init_utils2();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/exports/index.js\n var init_exports = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/exports/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatAbiItem();\n init_formatAbiParameters();\n init_parseAbi();\n init_parseAbiItem();\n init_parseAbiParameters();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/getAction.js\n function getAction(client, actionFn, name) {\n const action_implicit = client[actionFn.name];\n if (typeof action_implicit === \"function\")\n return action_implicit;\n const action_explicit = client[name];\n if (typeof action_explicit === \"function\")\n return action_explicit;\n return (params) => actionFn(client, params);\n }\n var init_getAction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/getAction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/formatAbiItem.js\n function formatAbiItem2(abiItem, { includeName = false } = {}) {\n if (abiItem.type !== \"function\" && abiItem.type !== \"event\" && abiItem.type !== \"error\")\n throw new InvalidDefinitionTypeError(abiItem.type);\n return `${abiItem.name}(${formatAbiParams(abiItem.inputs, { includeName })})`;\n }\n function formatAbiParams(params, { includeName = false } = {}) {\n if (!params)\n return \"\";\n return params.map((param) => formatAbiParam(param, { includeName })).join(includeName ? \", \" : \",\");\n }\n function formatAbiParam(param, { includeName }) {\n if (param.type.startsWith(\"tuple\")) {\n return `(${formatAbiParams(param.components, { includeName })})${param.type.slice(\"tuple\".length)}`;\n }\n return param.type + (includeName && param.name ? ` ${param.name}` : \"\");\n }\n var init_formatAbiItem2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/formatAbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/isHex.js\n function isHex(value, { strict = true } = {}) {\n if (!value)\n return false;\n if (typeof value !== \"string\")\n return false;\n return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith(\"0x\");\n }\n var init_isHex = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/isHex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/size.js\n function size(value) {\n if (isHex(value, { strict: false }))\n return Math.ceil((value.length - 2) / 2);\n return value.length;\n }\n var init_size = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/size.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/version.js\n var version3;\n var init_version3 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n version3 = \"2.38.4\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/base.js\n function walk(err, fn) {\n if (fn?.(err))\n return err;\n if (err && typeof err === \"object\" && \"cause\" in err && err.cause !== void 0)\n return walk(err.cause, fn);\n return fn ? null : err;\n }\n var errorConfig, BaseError2;\n var init_base = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_version3();\n errorConfig = {\n getDocsUrl: ({ docsBaseUrl, docsPath: docsPath8 = \"\", docsSlug }) => docsPath8 ? `${docsBaseUrl ?? \"https://viem.sh\"}${docsPath8}${docsSlug ? `#${docsSlug}` : \"\"}` : void 0,\n version: `viem@${version3}`\n };\n BaseError2 = class _BaseError extends Error {\n constructor(shortMessage, args = {}) {\n const details = (() => {\n if (args.cause instanceof _BaseError)\n return args.cause.details;\n if (args.cause?.message)\n return args.cause.message;\n return args.details;\n })();\n const docsPath8 = (() => {\n if (args.cause instanceof _BaseError)\n return args.cause.docsPath || args.docsPath;\n return args.docsPath;\n })();\n const docsUrl = errorConfig.getDocsUrl?.({ ...args, docsPath: docsPath8 });\n const message = [\n shortMessage || \"An error occurred.\",\n \"\",\n ...args.metaMessages ? [...args.metaMessages, \"\"] : [],\n ...docsUrl ? [`Docs: ${docsUrl}`] : [],\n ...details ? [`Details: ${details}`] : [],\n ...errorConfig.version ? [`Version: ${errorConfig.version}`] : []\n ].join(\"\\n\");\n super(message, args.cause ? { cause: args.cause } : void 0);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"BaseError\"\n });\n this.details = details;\n this.docsPath = docsPath8;\n this.metaMessages = args.metaMessages;\n this.name = args.name ?? this.name;\n this.shortMessage = shortMessage;\n this.version = version3;\n }\n walk(fn) {\n return walk(this, fn);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/abi.js\n var AbiConstructorNotFoundError, AbiConstructorParamsNotFoundError, AbiDecodingDataSizeTooSmallError, AbiDecodingZeroDataError, AbiEncodingArrayLengthMismatchError, AbiEncodingBytesSizeMismatchError, AbiEncodingLengthMismatchError, AbiErrorInputsNotFoundError, AbiErrorNotFoundError, AbiErrorSignatureNotFoundError, AbiEventSignatureEmptyTopicsError, AbiEventSignatureNotFoundError, AbiEventNotFoundError, AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, AbiFunctionSignatureNotFoundError, AbiItemAmbiguityError, BytesSizeMismatchError, DecodeLogDataMismatch, DecodeLogTopicsMismatch, InvalidAbiEncodingTypeError, InvalidAbiDecodingTypeError, InvalidArrayError, InvalidDefinitionTypeError, UnsupportedPackedAbiType;\n var init_abi = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/abi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatAbiItem2();\n init_size();\n init_base();\n AbiConstructorNotFoundError = class extends BaseError2 {\n constructor({ docsPath: docsPath8 }) {\n super([\n \"A constructor was not found on the ABI.\",\n \"Make sure you are using the correct ABI and that the constructor exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiConstructorNotFoundError\"\n });\n }\n };\n AbiConstructorParamsNotFoundError = class extends BaseError2 {\n constructor({ docsPath: docsPath8 }) {\n super([\n \"Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.\",\n \"Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiConstructorParamsNotFoundError\"\n });\n }\n };\n AbiDecodingDataSizeTooSmallError = class extends BaseError2 {\n constructor({ data, params, size: size6 }) {\n super([`Data size of ${size6} bytes is too small for given parameters.`].join(\"\\n\"), {\n metaMessages: [\n `Params: (${formatAbiParams(params, { includeName: true })})`,\n `Data: ${data} (${size6} bytes)`\n ],\n name: \"AbiDecodingDataSizeTooSmallError\"\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"params\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"size\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = data;\n this.params = params;\n this.size = size6;\n }\n };\n AbiDecodingZeroDataError = class extends BaseError2 {\n constructor() {\n super('Cannot decode zero data (\"0x\") with ABI parameters.', {\n name: \"AbiDecodingZeroDataError\"\n });\n }\n };\n AbiEncodingArrayLengthMismatchError = class extends BaseError2 {\n constructor({ expectedLength, givenLength, type }) {\n super([\n `ABI encoding array length mismatch for type ${type}.`,\n `Expected length: ${expectedLength}`,\n `Given length: ${givenLength}`\n ].join(\"\\n\"), { name: \"AbiEncodingArrayLengthMismatchError\" });\n }\n };\n AbiEncodingBytesSizeMismatchError = class extends BaseError2 {\n constructor({ expectedSize, value }) {\n super(`Size of bytes \"${value}\" (bytes${size(value)}) does not match expected size (bytes${expectedSize}).`, { name: \"AbiEncodingBytesSizeMismatchError\" });\n }\n };\n AbiEncodingLengthMismatchError = class extends BaseError2 {\n constructor({ expectedLength, givenLength }) {\n super([\n \"ABI encoding params/values length mismatch.\",\n `Expected length (params): ${expectedLength}`,\n `Given length (values): ${givenLength}`\n ].join(\"\\n\"), { name: \"AbiEncodingLengthMismatchError\" });\n }\n };\n AbiErrorInputsNotFoundError = class extends BaseError2 {\n constructor(errorName, { docsPath: docsPath8 }) {\n super([\n `Arguments (\\`args\\`) were provided to \"${errorName}\", but \"${errorName}\" on the ABI does not contain any parameters (\\`inputs\\`).`,\n \"Cannot encode error result without knowing what the parameter types are.\",\n \"Make sure you are using the correct ABI and that the inputs exist on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiErrorInputsNotFoundError\"\n });\n }\n };\n AbiErrorNotFoundError = class extends BaseError2 {\n constructor(errorName, { docsPath: docsPath8 } = {}) {\n super([\n `Error ${errorName ? `\"${errorName}\" ` : \"\"}not found on ABI.`,\n \"Make sure you are using the correct ABI and that the error exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiErrorNotFoundError\"\n });\n }\n };\n AbiErrorSignatureNotFoundError = class extends BaseError2 {\n constructor(signature, { docsPath: docsPath8 }) {\n super([\n `Encoded error signature \"${signature}\" not found on ABI.`,\n \"Make sure you are using the correct ABI and that the error exists on it.\",\n `You can look up the decoded signature here: https://openchain.xyz/signatures?query=${signature}.`\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiErrorSignatureNotFoundError\"\n });\n Object.defineProperty(this, \"signature\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.signature = signature;\n }\n };\n AbiEventSignatureEmptyTopicsError = class extends BaseError2 {\n constructor({ docsPath: docsPath8 }) {\n super(\"Cannot extract event signature from empty topics.\", {\n docsPath: docsPath8,\n name: \"AbiEventSignatureEmptyTopicsError\"\n });\n }\n };\n AbiEventSignatureNotFoundError = class extends BaseError2 {\n constructor(signature, { docsPath: docsPath8 }) {\n super([\n `Encoded event signature \"${signature}\" not found on ABI.`,\n \"Make sure you are using the correct ABI and that the event exists on it.\",\n `You can look up the signature here: https://openchain.xyz/signatures?query=${signature}.`\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiEventSignatureNotFoundError\"\n });\n }\n };\n AbiEventNotFoundError = class extends BaseError2 {\n constructor(eventName, { docsPath: docsPath8 } = {}) {\n super([\n `Event ${eventName ? `\"${eventName}\" ` : \"\"}not found on ABI.`,\n \"Make sure you are using the correct ABI and that the event exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiEventNotFoundError\"\n });\n }\n };\n AbiFunctionNotFoundError = class extends BaseError2 {\n constructor(functionName, { docsPath: docsPath8 } = {}) {\n super([\n `Function ${functionName ? `\"${functionName}\" ` : \"\"}not found on ABI.`,\n \"Make sure you are using the correct ABI and that the function exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiFunctionNotFoundError\"\n });\n }\n };\n AbiFunctionOutputsNotFoundError = class extends BaseError2 {\n constructor(functionName, { docsPath: docsPath8 }) {\n super([\n `Function \"${functionName}\" does not contain any \\`outputs\\` on ABI.`,\n \"Cannot decode function result without knowing what the parameter types are.\",\n \"Make sure you are using the correct ABI and that the function exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiFunctionOutputsNotFoundError\"\n });\n }\n };\n AbiFunctionSignatureNotFoundError = class extends BaseError2 {\n constructor(signature, { docsPath: docsPath8 }) {\n super([\n `Encoded function signature \"${signature}\" not found on ABI.`,\n \"Make sure you are using the correct ABI and that the function exists on it.\",\n `You can look up the signature here: https://openchain.xyz/signatures?query=${signature}.`\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiFunctionSignatureNotFoundError\"\n });\n }\n };\n AbiItemAmbiguityError = class extends BaseError2 {\n constructor(x4, y6) {\n super(\"Found ambiguous types in overloaded ABI items.\", {\n metaMessages: [\n `\\`${x4.type}\\` in \\`${formatAbiItem2(x4.abiItem)}\\`, and`,\n `\\`${y6.type}\\` in \\`${formatAbiItem2(y6.abiItem)}\\``,\n \"\",\n \"These types encode differently and cannot be distinguished at runtime.\",\n \"Remove one of the ambiguous items in the ABI.\"\n ],\n name: \"AbiItemAmbiguityError\"\n });\n }\n };\n BytesSizeMismatchError = class extends BaseError2 {\n constructor({ expectedSize, givenSize }) {\n super(`Expected bytes${expectedSize}, got bytes${givenSize}.`, {\n name: \"BytesSizeMismatchError\"\n });\n }\n };\n DecodeLogDataMismatch = class extends BaseError2 {\n constructor({ abiItem, data, params, size: size6 }) {\n super([\n `Data size of ${size6} bytes is too small for non-indexed event parameters.`\n ].join(\"\\n\"), {\n metaMessages: [\n `Params: (${formatAbiParams(params, { includeName: true })})`,\n `Data: ${data} (${size6} bytes)`\n ],\n name: \"DecodeLogDataMismatch\"\n });\n Object.defineProperty(this, \"abiItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"params\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"size\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abiItem = abiItem;\n this.data = data;\n this.params = params;\n this.size = size6;\n }\n };\n DecodeLogTopicsMismatch = class extends BaseError2 {\n constructor({ abiItem, param }) {\n super([\n `Expected a topic for indexed event parameter${param.name ? ` \"${param.name}\"` : \"\"} on event \"${formatAbiItem2(abiItem, { includeName: true })}\".`\n ].join(\"\\n\"), { name: \"DecodeLogTopicsMismatch\" });\n Object.defineProperty(this, \"abiItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abiItem = abiItem;\n }\n };\n InvalidAbiEncodingTypeError = class extends BaseError2 {\n constructor(type, { docsPath: docsPath8 }) {\n super([\n `Type \"${type}\" is not a valid encoding type.`,\n \"Please provide a valid ABI type.\"\n ].join(\"\\n\"), { docsPath: docsPath8, name: \"InvalidAbiEncodingType\" });\n }\n };\n InvalidAbiDecodingTypeError = class extends BaseError2 {\n constructor(type, { docsPath: docsPath8 }) {\n super([\n `Type \"${type}\" is not a valid decoding type.`,\n \"Please provide a valid ABI type.\"\n ].join(\"\\n\"), { docsPath: docsPath8, name: \"InvalidAbiDecodingType\" });\n }\n };\n InvalidArrayError = class extends BaseError2 {\n constructor(value) {\n super([`Value \"${value}\" is not a valid array.`].join(\"\\n\"), {\n name: \"InvalidArrayError\"\n });\n }\n };\n InvalidDefinitionTypeError = class extends BaseError2 {\n constructor(type) {\n super([\n `\"${type}\" is not a valid definition type.`,\n 'Valid types: \"function\", \"event\", \"error\"'\n ].join(\"\\n\"), { name: \"InvalidDefinitionTypeError\" });\n }\n };\n UnsupportedPackedAbiType = class extends BaseError2 {\n constructor(type) {\n super(`Type \"${type}\" is not supported for packed encoding.`, {\n name: \"UnsupportedPackedAbiType\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/log.js\n var FilterTypeNotSupportedError;\n var init_log = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/log.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n FilterTypeNotSupportedError = class extends BaseError2 {\n constructor(type) {\n super(`Filter type \"${type}\" is not supported.`, {\n name: \"FilterTypeNotSupportedError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/data.js\n var SliceOffsetOutOfBoundsError, SizeExceedsPaddingSizeError, InvalidBytesLengthError;\n var init_data = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/data.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n SliceOffsetOutOfBoundsError = class extends BaseError2 {\n constructor({ offset, position, size: size6 }) {\n super(`Slice ${position === \"start\" ? \"starting\" : \"ending\"} at offset \"${offset}\" is out-of-bounds (size: ${size6}).`, { name: \"SliceOffsetOutOfBoundsError\" });\n }\n };\n SizeExceedsPaddingSizeError = class extends BaseError2 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (${size6}) exceeds padding size (${targetSize}).`, { name: \"SizeExceedsPaddingSizeError\" });\n }\n };\n InvalidBytesLengthError = class extends BaseError2 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} is expected to be ${targetSize} ${type} long, but is ${size6} ${type} long.`, { name: \"InvalidBytesLengthError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/pad.js\n function pad(hexOrBytes, { dir, size: size6 = 32 } = {}) {\n if (typeof hexOrBytes === \"string\")\n return padHex(hexOrBytes, { dir, size: size6 });\n return padBytes(hexOrBytes, { dir, size: size6 });\n }\n function padHex(hex_, { dir, size: size6 = 32 } = {}) {\n if (size6 === null)\n return hex_;\n const hex = hex_.replace(\"0x\", \"\");\n if (hex.length > size6 * 2)\n throw new SizeExceedsPaddingSizeError({\n size: Math.ceil(hex.length / 2),\n targetSize: size6,\n type: \"hex\"\n });\n return `0x${hex[dir === \"right\" ? \"padEnd\" : \"padStart\"](size6 * 2, \"0\")}`;\n }\n function padBytes(bytes, { dir, size: size6 = 32 } = {}) {\n if (size6 === null)\n return bytes;\n if (bytes.length > size6)\n throw new SizeExceedsPaddingSizeError({\n size: bytes.length,\n targetSize: size6,\n type: \"bytes\"\n });\n const paddedBytes = new Uint8Array(size6);\n for (let i3 = 0; i3 < size6; i3++) {\n const padEnd = dir === \"right\";\n paddedBytes[padEnd ? i3 : size6 - i3 - 1] = bytes[padEnd ? i3 : bytes.length - i3 - 1];\n }\n return paddedBytes;\n }\n var init_pad = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/pad.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_data();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/encoding.js\n var IntegerOutOfRangeError, InvalidBytesBooleanError, InvalidHexBooleanError, SizeOverflowError;\n var init_encoding = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/encoding.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n IntegerOutOfRangeError = class extends BaseError2 {\n constructor({ max, min, signed, size: size6, value }) {\n super(`Number \"${value}\" is not in safe ${size6 ? `${size6 * 8}-bit ${signed ? \"signed\" : \"unsigned\"} ` : \"\"}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, { name: \"IntegerOutOfRangeError\" });\n }\n };\n InvalidBytesBooleanError = class extends BaseError2 {\n constructor(bytes) {\n super(`Bytes value \"${bytes}\" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {\n name: \"InvalidBytesBooleanError\"\n });\n }\n };\n InvalidHexBooleanError = class extends BaseError2 {\n constructor(hex) {\n super(`Hex value \"${hex}\" is not a valid boolean. The hex value must be \"0x0\" (false) or \"0x1\" (true).`, { name: \"InvalidHexBooleanError\" });\n }\n };\n SizeOverflowError = class extends BaseError2 {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed ${maxSize} bytes. Given size: ${givenSize} bytes.`, { name: \"SizeOverflowError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/trim.js\n function trim(hexOrBytes, { dir = \"left\" } = {}) {\n let data = typeof hexOrBytes === \"string\" ? hexOrBytes.replace(\"0x\", \"\") : hexOrBytes;\n let sliceLength = 0;\n for (let i3 = 0; i3 < data.length - 1; i3++) {\n if (data[dir === \"left\" ? i3 : data.length - i3 - 1].toString() === \"0\")\n sliceLength++;\n else\n break;\n }\n data = dir === \"left\" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);\n if (typeof hexOrBytes === \"string\") {\n if (data.length === 1 && dir === \"right\")\n data = `${data}0`;\n return `0x${data.length % 2 === 1 ? `0${data}` : data}`;\n }\n return data;\n }\n var init_trim = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/trim.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/fromHex.js\n function assertSize(hexOrBytes, { size: size6 }) {\n if (size(hexOrBytes) > size6)\n throw new SizeOverflowError({\n givenSize: size(hexOrBytes),\n maxSize: size6\n });\n }\n function fromHex(hex, toOrOpts) {\n const opts = typeof toOrOpts === \"string\" ? { to: toOrOpts } : toOrOpts;\n const to = opts.to;\n if (to === \"number\")\n return hexToNumber(hex, opts);\n if (to === \"bigint\")\n return hexToBigInt(hex, opts);\n if (to === \"string\")\n return hexToString(hex, opts);\n if (to === \"boolean\")\n return hexToBool(hex, opts);\n return hexToBytes(hex, opts);\n }\n function hexToBigInt(hex, opts = {}) {\n const { signed } = opts;\n if (opts.size)\n assertSize(hex, { size: opts.size });\n const value = BigInt(hex);\n if (!signed)\n return value;\n const size6 = (hex.length - 2) / 2;\n const max = (1n << BigInt(size6) * 8n - 1n) - 1n;\n if (value <= max)\n return value;\n return value - BigInt(`0x${\"f\".padStart(size6 * 2, \"f\")}`) - 1n;\n }\n function hexToBool(hex_, opts = {}) {\n let hex = hex_;\n if (opts.size) {\n assertSize(hex, { size: opts.size });\n hex = trim(hex);\n }\n if (trim(hex) === \"0x00\")\n return false;\n if (trim(hex) === \"0x01\")\n return true;\n throw new InvalidHexBooleanError(hex);\n }\n function hexToNumber(hex, opts = {}) {\n return Number(hexToBigInt(hex, opts));\n }\n function hexToString(hex, opts = {}) {\n let bytes = hexToBytes(hex);\n if (opts.size) {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes, { dir: \"right\" });\n }\n return new TextDecoder().decode(bytes);\n }\n var init_fromHex = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/fromHex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encoding();\n init_size();\n init_trim();\n init_toBytes();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toHex.js\n function toHex(value, opts = {}) {\n if (typeof value === \"number\" || typeof value === \"bigint\")\n return numberToHex(value, opts);\n if (typeof value === \"string\") {\n return stringToHex(value, opts);\n }\n if (typeof value === \"boolean\")\n return boolToHex(value, opts);\n return bytesToHex(value, opts);\n }\n function boolToHex(value, opts = {}) {\n const hex = `0x${Number(value)}`;\n if (typeof opts.size === \"number\") {\n assertSize(hex, { size: opts.size });\n return pad(hex, { size: opts.size });\n }\n return hex;\n }\n function bytesToHex(value, opts = {}) {\n let string = \"\";\n for (let i3 = 0; i3 < value.length; i3++) {\n string += hexes[value[i3]];\n }\n const hex = `0x${string}`;\n if (typeof opts.size === \"number\") {\n assertSize(hex, { size: opts.size });\n return pad(hex, { dir: \"right\", size: opts.size });\n }\n return hex;\n }\n function numberToHex(value_, opts = {}) {\n const { signed, size: size6 } = opts;\n const value = BigInt(value_);\n let maxValue;\n if (size6) {\n if (signed)\n maxValue = (1n << BigInt(size6) * 8n - 1n) - 1n;\n else\n maxValue = 2n ** (BigInt(size6) * 8n) - 1n;\n } else if (typeof value_ === \"number\") {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n }\n const minValue = typeof maxValue === \"bigint\" && signed ? -maxValue - 1n : 0;\n if (maxValue && value > maxValue || value < minValue) {\n const suffix = typeof value_ === \"bigint\" ? \"n\" : \"\";\n throw new IntegerOutOfRangeError({\n max: maxValue ? `${maxValue}${suffix}` : void 0,\n min: `${minValue}${suffix}`,\n signed,\n size: size6,\n value: `${value_}${suffix}`\n });\n }\n const hex = `0x${(signed && value < 0 ? (1n << BigInt(size6 * 8)) + BigInt(value) : value).toString(16)}`;\n if (size6)\n return pad(hex, { size: size6 });\n return hex;\n }\n function stringToHex(value_, opts = {}) {\n const value = encoder.encode(value_);\n return bytesToHex(value, opts);\n }\n var hexes, encoder;\n var init_toHex = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toHex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encoding();\n init_pad();\n init_fromHex();\n hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i3) => i3.toString(16).padStart(2, \"0\"));\n encoder = /* @__PURE__ */ new TextEncoder();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toBytes.js\n function toBytes(value, opts = {}) {\n if (typeof value === \"number\" || typeof value === \"bigint\")\n return numberToBytes(value, opts);\n if (typeof value === \"boolean\")\n return boolToBytes(value, opts);\n if (isHex(value))\n return hexToBytes(value, opts);\n return stringToBytes(value, opts);\n }\n function boolToBytes(value, opts = {}) {\n const bytes = new Uint8Array(1);\n bytes[0] = Number(value);\n if (typeof opts.size === \"number\") {\n assertSize(bytes, { size: opts.size });\n return pad(bytes, { size: opts.size });\n }\n return bytes;\n }\n function charCodeToBase16(char) {\n if (char >= charCodeMap.zero && char <= charCodeMap.nine)\n return char - charCodeMap.zero;\n if (char >= charCodeMap.A && char <= charCodeMap.F)\n return char - (charCodeMap.A - 10);\n if (char >= charCodeMap.a && char <= charCodeMap.f)\n return char - (charCodeMap.a - 10);\n return void 0;\n }\n function hexToBytes(hex_, opts = {}) {\n let hex = hex_;\n if (opts.size) {\n assertSize(hex, { size: opts.size });\n hex = pad(hex, { dir: \"right\", size: opts.size });\n }\n let hexString = hex.slice(2);\n if (hexString.length % 2)\n hexString = `0${hexString}`;\n const length = hexString.length / 2;\n const bytes = new Uint8Array(length);\n for (let index2 = 0, j2 = 0; index2 < length; index2++) {\n const nibbleLeft = charCodeToBase16(hexString.charCodeAt(j2++));\n const nibbleRight = charCodeToBase16(hexString.charCodeAt(j2++));\n if (nibbleLeft === void 0 || nibbleRight === void 0) {\n throw new BaseError2(`Invalid byte sequence (\"${hexString[j2 - 2]}${hexString[j2 - 1]}\" in \"${hexString}\").`);\n }\n bytes[index2] = nibbleLeft * 16 + nibbleRight;\n }\n return bytes;\n }\n function numberToBytes(value, opts) {\n const hex = numberToHex(value, opts);\n return hexToBytes(hex);\n }\n function stringToBytes(value, opts = {}) {\n const bytes = encoder2.encode(value);\n if (typeof opts.size === \"number\") {\n assertSize(bytes, { size: opts.size });\n return pad(bytes, { dir: \"right\", size: opts.size });\n }\n return bytes;\n }\n var encoder2, charCodeMap;\n var init_toBytes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toBytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_isHex();\n init_pad();\n init_fromHex();\n init_toHex();\n encoder2 = /* @__PURE__ */ new TextEncoder();\n charCodeMap = {\n zero: 48,\n nine: 57,\n A: 65,\n F: 70,\n a: 97,\n f: 102\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js\n function fromBig(n2, le = false) {\n if (le)\n return { h: Number(n2 & U32_MASK64), l: Number(n2 >> _32n & U32_MASK64) };\n return { h: Number(n2 >> _32n & U32_MASK64) | 0, l: Number(n2 & U32_MASK64) | 0 };\n }\n function split(lst, le = false) {\n const len = lst.length;\n let Ah = new Uint32Array(len);\n let Al = new Uint32Array(len);\n for (let i3 = 0; i3 < len; i3++) {\n const { h: h4, l: l6 } = fromBig(lst[i3], le);\n [Ah[i3], Al[i3]] = [h4, l6];\n }\n return [Ah, Al];\n }\n function add(Ah, Al, Bh, Bl) {\n const l6 = (Al >>> 0) + (Bl >>> 0);\n return { h: Ah + Bh + (l6 / 2 ** 32 | 0) | 0, l: l6 | 0 };\n }\n var U32_MASK64, _32n, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotlSH, rotlSL, rotlBH, rotlBL, add3L, add3H, add4L, add4H, add5L, add5H;\n var init_u64 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\n _32n = /* @__PURE__ */ BigInt(32);\n shrSH = (h4, _l, s4) => h4 >>> s4;\n shrSL = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n rotrSH = (h4, l6, s4) => h4 >>> s4 | l6 << 32 - s4;\n rotrSL = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n rotrBH = (h4, l6, s4) => h4 << 64 - s4 | l6 >>> s4 - 32;\n rotrBL = (h4, l6, s4) => h4 >>> s4 - 32 | l6 << 64 - s4;\n rotlSH = (h4, l6, s4) => h4 << s4 | l6 >>> 32 - s4;\n rotlSL = (h4, l6, s4) => l6 << s4 | h4 >>> 32 - s4;\n rotlBH = (h4, l6, s4) => l6 << s4 - 32 | h4 >>> 64 - s4;\n rotlBL = (h4, l6, s4) => h4 << s4 - 32 | l6 >>> 64 - s4;\n add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\n add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;\n add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\n add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;\n add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\n add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/crypto.js\n var crypto2;\n var init_crypto = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/crypto.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n crypto2 = typeof globalThis === \"object\" && \"crypto\" in globalThis ? globalThis.crypto : void 0;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js\n function isBytes(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function anumber(n2) {\n if (!Number.isSafeInteger(n2) || n2 < 0)\n throw new Error(\"positive integer expected, got \" + n2);\n }\n function abytes(b4, ...lengths) {\n if (!isBytes(b4))\n throw new Error(\"Uint8Array expected\");\n if (lengths.length > 0 && !lengths.includes(b4.length))\n throw new Error(\"Uint8Array expected of length \" + lengths + \", got length=\" + b4.length);\n }\n function ahash(h4) {\n if (typeof h4 !== \"function\" || typeof h4.create !== \"function\")\n throw new Error(\"Hash should be wrapped by utils.createHasher\");\n anumber(h4.outputLen);\n anumber(h4.blockLen);\n }\n function aexists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error(\"Hash instance has been destroyed\");\n if (checkFinished && instance.finished)\n throw new Error(\"Hash#digest() has already been called\");\n }\n function aoutput(out, instance) {\n abytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(\"digestInto() expects output buffer of length at least \" + min);\n }\n }\n function u32(arr) {\n return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n }\n function clean(...arrays) {\n for (let i3 = 0; i3 < arrays.length; i3++) {\n arrays[i3].fill(0);\n }\n }\n function createView(arr) {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n }\n function rotr(word, shift) {\n return word << 32 - shift | word >>> shift;\n }\n function rotl(word, shift) {\n return word << shift | word >>> 32 - shift >>> 0;\n }\n function byteSwap(word) {\n return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;\n }\n function byteSwap32(arr) {\n for (let i3 = 0; i3 < arr.length; i3++) {\n arr[i3] = byteSwap(arr[i3]);\n }\n return arr;\n }\n function bytesToHex2(bytes) {\n abytes(bytes);\n if (hasHexBuiltin)\n return bytes.toHex();\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes2[bytes[i3]];\n }\n return hex;\n }\n function asciiToBase16(ch) {\n if (ch >= asciis._0 && ch <= asciis._9)\n return ch - asciis._0;\n if (ch >= asciis.A && ch <= asciis.F)\n return ch - (asciis.A - 10);\n if (ch >= asciis.a && ch <= asciis.f)\n return ch - (asciis.a - 10);\n return;\n }\n function hexToBytes2(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n if (hasHexBuiltin)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error(\"hex string expected, got unpadded hex of length \" + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === void 0 || n2 === void 0) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n }\n function utf8ToBytes(str) {\n if (typeof str !== \"string\")\n throw new Error(\"string expected\");\n return new Uint8Array(new TextEncoder().encode(str));\n }\n function toBytes2(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes(data);\n abytes(data);\n return data;\n }\n function kdfInputToBytes(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes(data);\n abytes(data);\n return data;\n }\n function concatBytes(...arrays) {\n let sum = 0;\n for (let i3 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n abytes(a3);\n sum += a3.length;\n }\n const res = new Uint8Array(sum);\n for (let i3 = 0, pad6 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n res.set(a3, pad6);\n pad6 += a3.length;\n }\n return res;\n }\n function checkOpts(defaults, opts) {\n if (opts !== void 0 && {}.toString.call(opts) !== \"[object Object]\")\n throw new Error(\"options should be object or undefined\");\n const merged = Object.assign(defaults, opts);\n return merged;\n }\n function createHasher(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes2(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n }\n function randomBytes(bytesLength = 32) {\n if (crypto2 && typeof crypto2.getRandomValues === \"function\") {\n return crypto2.getRandomValues(new Uint8Array(bytesLength));\n }\n if (crypto2 && typeof crypto2.randomBytes === \"function\") {\n return Uint8Array.from(crypto2.randomBytes(bytesLength));\n }\n throw new Error(\"crypto.getRandomValues must be defined\");\n }\n var isLE, swap32IfBE, hasHexBuiltin, hexes2, asciis, Hash;\n var init_utils3 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_crypto();\n isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();\n swap32IfBE = isLE ? (u2) => u2 : byteSwap32;\n hasHexBuiltin = /* @__PURE__ */ (() => (\n // @ts-ignore\n typeof Uint8Array.from([]).toHex === \"function\" && typeof Uint8Array.fromHex === \"function\"\n ))();\n hexes2 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\n Hash = class {\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha3.js\n function keccakP(s4, rounds = 24) {\n const B2 = new Uint32Array(5 * 2);\n for (let round = 24 - rounds; round < 24; round++) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[x4] ^ s4[x4 + 10] ^ s4[x4 + 20] ^ s4[x4 + 30] ^ s4[x4 + 40];\n for (let x4 = 0; x4 < 10; x4 += 2) {\n const idx1 = (x4 + 8) % 10;\n const idx0 = (x4 + 2) % 10;\n const B0 = B2[idx0];\n const B1 = B2[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B2[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B2[idx1 + 1];\n for (let y6 = 0; y6 < 50; y6 += 10) {\n s4[x4 + y6] ^= Th;\n s4[x4 + y6 + 1] ^= Tl;\n }\n }\n let curH = s4[2];\n let curL = s4[3];\n for (let t3 = 0; t3 < 24; t3++) {\n const shift = SHA3_ROTL[t3];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t3];\n curH = s4[PI];\n curL = s4[PI + 1];\n s4[PI] = Th;\n s4[PI + 1] = Tl;\n }\n for (let y6 = 0; y6 < 50; y6 += 10) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[y6 + x4];\n for (let x4 = 0; x4 < 10; x4++)\n s4[y6 + x4] ^= ~B2[(x4 + 2) % 10] & B2[(x4 + 4) % 10];\n }\n s4[0] ^= SHA3_IOTA_H[round];\n s4[1] ^= SHA3_IOTA_L[round];\n }\n clean(B2);\n }\n var _0n, _1n, _2n, _7n, _256n, _0x71n, SHA3_PI, SHA3_ROTL, _SHA3_IOTA, IOTAS, SHA3_IOTA_H, SHA3_IOTA_L, rotlH, rotlL, Keccak, gen, keccak_256;\n var init_sha3 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha3.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_u64();\n init_utils3();\n _0n = BigInt(0);\n _1n = BigInt(1);\n _2n = BigInt(2);\n _7n = BigInt(7);\n _256n = BigInt(256);\n _0x71n = BigInt(113);\n SHA3_PI = [];\n SHA3_ROTL = [];\n _SHA3_IOTA = [];\n for (let round = 0, R3 = _1n, x4 = 1, y6 = 0; round < 24; round++) {\n [x4, y6] = [y6, (2 * x4 + 3 * y6) % 5];\n SHA3_PI.push(2 * (5 * y6 + x4));\n SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);\n let t3 = _0n;\n for (let j2 = 0; j2 < 7; j2++) {\n R3 = (R3 << _1n ^ (R3 >> _7n) * _0x71n) % _256n;\n if (R3 & _2n)\n t3 ^= _1n << (_1n << /* @__PURE__ */ BigInt(j2)) - _1n;\n }\n _SHA3_IOTA.push(t3);\n }\n IOTAS = split(_SHA3_IOTA, true);\n SHA3_IOTA_H = IOTAS[0];\n SHA3_IOTA_L = IOTAS[1];\n rotlH = (h4, l6, s4) => s4 > 32 ? rotlBH(h4, l6, s4) : rotlSH(h4, l6, s4);\n rotlL = (h4, l6, s4) => s4 > 32 ? rotlBL(h4, l6, s4) : rotlSL(h4, l6, s4);\n Keccak = class _Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n this.enableXOF = false;\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n anumber(outputLen);\n if (!(0 < blockLen && blockLen < 200))\n throw new Error(\"only keccak-f1600 function is supported\");\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n clone() {\n return this._cloneInto();\n }\n keccak() {\n swap32IfBE(this.state32);\n keccakP(this.state32, this.rounds);\n swap32IfBE(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n aexists(this);\n data = toBytes2(data);\n abytes(data);\n const { blockLen, state } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i3 = 0; i3 < take; i3++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n state[pos] ^= suffix;\n if ((suffix & 128) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 128;\n this.keccak();\n }\n writeInto(out) {\n aexists(this, false);\n abytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len; ) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n if (!this.enableXOF)\n throw new Error(\"XOF is not possible for this instance\");\n return this.writeInto(out);\n }\n xof(bytes) {\n anumber(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n aoutput(out, this);\n if (this.finished)\n throw new Error(\"digest() was already called\");\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n clean(this.state);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n };\n gen = (suffix, blockLen, outputLen) => createHasher(() => new Keccak(blockLen, suffix, outputLen));\n keccak_256 = /* @__PURE__ */ (() => gen(1, 136, 256 / 8))();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/keccak256.js\n function keccak256(value, to_) {\n const to = to_ || \"hex\";\n const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);\n if (to === \"bytes\")\n return bytes;\n return toHex(bytes);\n }\n var init_keccak256 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/keccak256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha3();\n init_isHex();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/hashSignature.js\n function hashSignature(sig) {\n return hash(sig);\n }\n var hash;\n var init_hashSignature = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/hashSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_keccak256();\n hash = (value) => keccak256(toBytes(value));\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/normalizeSignature.js\n function normalizeSignature(signature) {\n let active = true;\n let current = \"\";\n let level = 0;\n let result = \"\";\n let valid = false;\n for (let i3 = 0; i3 < signature.length; i3++) {\n const char = signature[i3];\n if ([\"(\", \")\", \",\"].includes(char))\n active = true;\n if (char === \"(\")\n level++;\n if (char === \")\")\n level--;\n if (!active)\n continue;\n if (level === 0) {\n if (char === \" \" && [\"event\", \"function\", \"\"].includes(result))\n result = \"\";\n else {\n result += char;\n if (char === \")\") {\n valid = true;\n break;\n }\n }\n continue;\n }\n if (char === \" \") {\n if (signature[i3 - 1] !== \",\" && current !== \",\" && current !== \",(\") {\n current = \"\";\n active = false;\n }\n continue;\n }\n result += char;\n current += char;\n }\n if (!valid)\n throw new BaseError2(\"Unable to normalize signature.\");\n return result;\n }\n var init_normalizeSignature = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/normalizeSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toSignature.js\n var toSignature;\n var init_toSignature = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_normalizeSignature();\n toSignature = (def) => {\n const def_ = (() => {\n if (typeof def === \"string\")\n return def;\n return formatAbiItem(def);\n })();\n return normalizeSignature(def_);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toSignatureHash.js\n function toSignatureHash(fn) {\n return hashSignature(toSignature(fn));\n }\n var init_toSignatureHash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toSignatureHash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashSignature();\n init_toSignature();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toEventSelector.js\n var toEventSelector;\n var init_toEventSelector = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toEventSelector.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toSignatureHash();\n toEventSelector = toSignatureHash;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/address.js\n var InvalidAddressError;\n var init_address = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/address.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n InvalidAddressError = class extends BaseError2 {\n constructor({ address }) {\n super(`Address \"${address}\" is invalid.`, {\n metaMessages: [\n \"- Address must be a hex value of 20 bytes (40 hex characters).\",\n \"- Address must match its checksum counterpart.\"\n ],\n name: \"InvalidAddressError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/lru.js\n var LruMap;\n var init_lru = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/lru.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LruMap = class extends Map {\n constructor(size6) {\n super();\n Object.defineProperty(this, \"maxSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.maxSize = size6;\n }\n get(key) {\n const value = super.get(key);\n if (super.has(key) && value !== void 0) {\n this.delete(key);\n super.set(key, value);\n }\n return value;\n }\n set(key, value) {\n super.set(key, value);\n if (this.maxSize && this.size > this.maxSize) {\n const firstKey = this.keys().next().value;\n if (firstKey)\n this.delete(firstKey);\n }\n return this;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/getAddress.js\n function checksumAddress(address_, chainId) {\n if (checksumAddressCache.has(`${address_}.${chainId}`))\n return checksumAddressCache.get(`${address_}.${chainId}`);\n const hexAddress = chainId ? `${chainId}${address_.toLowerCase()}` : address_.substring(2).toLowerCase();\n const hash3 = keccak256(stringToBytes(hexAddress), \"bytes\");\n const address = (chainId ? hexAddress.substring(`${chainId}0x`.length) : hexAddress).split(\"\");\n for (let i3 = 0; i3 < 40; i3 += 2) {\n if (hash3[i3 >> 1] >> 4 >= 8 && address[i3]) {\n address[i3] = address[i3].toUpperCase();\n }\n if ((hash3[i3 >> 1] & 15) >= 8 && address[i3 + 1]) {\n address[i3 + 1] = address[i3 + 1].toUpperCase();\n }\n }\n const result = `0x${address.join(\"\")}`;\n checksumAddressCache.set(`${address_}.${chainId}`, result);\n return result;\n }\n function getAddress(address, chainId) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n return checksumAddress(address, chainId);\n }\n var checksumAddressCache;\n var init_getAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/getAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_toBytes();\n init_keccak256();\n init_lru();\n init_isAddress();\n checksumAddressCache = /* @__PURE__ */ new LruMap(8192);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/isAddress.js\n function isAddress(address, options) {\n const { strict = true } = options ?? {};\n const cacheKey2 = `${address}.${strict}`;\n if (isAddressCache.has(cacheKey2))\n return isAddressCache.get(cacheKey2);\n const result = (() => {\n if (!addressRegex.test(address))\n return false;\n if (address.toLowerCase() === address)\n return true;\n if (strict)\n return checksumAddress(address) === address;\n return true;\n })();\n isAddressCache.set(cacheKey2, result);\n return result;\n }\n var addressRegex, isAddressCache;\n var init_isAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/isAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_lru();\n init_getAddress();\n addressRegex = /^0x[a-fA-F0-9]{40}$/;\n isAddressCache = /* @__PURE__ */ new LruMap(8192);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/concat.js\n function concat(values) {\n if (typeof values[0] === \"string\")\n return concatHex(values);\n return concatBytes2(values);\n }\n function concatBytes2(values) {\n let length = 0;\n for (const arr of values) {\n length += arr.length;\n }\n const result = new Uint8Array(length);\n let offset = 0;\n for (const arr of values) {\n result.set(arr, offset);\n offset += arr.length;\n }\n return result;\n }\n function concatHex(values) {\n return `0x${values.reduce((acc, x4) => acc + x4.replace(\"0x\", \"\"), \"\")}`;\n }\n var init_concat = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/concat.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/slice.js\n function slice(value, start, end, { strict } = {}) {\n if (isHex(value, { strict: false }))\n return sliceHex(value, start, end, {\n strict\n });\n return sliceBytes(value, start, end, {\n strict\n });\n }\n function assertStartOffset(value, start) {\n if (typeof start === \"number\" && start > 0 && start > size(value) - 1)\n throw new SliceOffsetOutOfBoundsError({\n offset: start,\n position: \"start\",\n size: size(value)\n });\n }\n function assertEndOffset(value, start, end) {\n if (typeof start === \"number\" && typeof end === \"number\" && size(value) !== end - start) {\n throw new SliceOffsetOutOfBoundsError({\n offset: end,\n position: \"end\",\n size: size(value)\n });\n }\n }\n function sliceBytes(value_, start, end, { strict } = {}) {\n assertStartOffset(value_, start);\n const value = value_.slice(start, end);\n if (strict)\n assertEndOffset(value, start, end);\n return value;\n }\n function sliceHex(value_, start, end, { strict } = {}) {\n assertStartOffset(value_, start);\n const value = `0x${value_.replace(\"0x\", \"\").slice((start ?? 0) * 2, (end ?? value_.length) * 2)}`;\n if (strict)\n assertEndOffset(value, start, end);\n return value;\n }\n var init_slice = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/slice.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_data();\n init_isHex();\n init_size();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/regex.js\n var arrayRegex, bytesRegex2, integerRegex2;\n var init_regex2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/regex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n arrayRegex = /^(.*)\\[([0-9]*)\\]$/;\n bytesRegex2 = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n integerRegex2 = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js\n function encodeAbiParameters(params, values) {\n if (params.length !== values.length)\n throw new AbiEncodingLengthMismatchError({\n expectedLength: params.length,\n givenLength: values.length\n });\n const preparedParams = prepareParams({\n params,\n values\n });\n const data = encodeParams(preparedParams);\n if (data.length === 0)\n return \"0x\";\n return data;\n }\n function prepareParams({ params, values }) {\n const preparedParams = [];\n for (let i3 = 0; i3 < params.length; i3++) {\n preparedParams.push(prepareParam({ param: params[i3], value: values[i3] }));\n }\n return preparedParams;\n }\n function prepareParam({ param, value }) {\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents) {\n const [length, type] = arrayComponents;\n return encodeArray(value, { length, param: { ...param, type } });\n }\n if (param.type === \"tuple\") {\n return encodeTuple(value, {\n param\n });\n }\n if (param.type === \"address\") {\n return encodeAddress(value);\n }\n if (param.type === \"bool\") {\n return encodeBool(value);\n }\n if (param.type.startsWith(\"uint\") || param.type.startsWith(\"int\")) {\n const signed = param.type.startsWith(\"int\");\n const [, , size6 = \"256\"] = integerRegex2.exec(param.type) ?? [];\n return encodeNumber(value, {\n signed,\n size: Number(size6)\n });\n }\n if (param.type.startsWith(\"bytes\")) {\n return encodeBytes(value, { param });\n }\n if (param.type === \"string\") {\n return encodeString(value);\n }\n throw new InvalidAbiEncodingTypeError(param.type, {\n docsPath: \"/docs/contract/encodeAbiParameters\"\n });\n }\n function encodeParams(preparedParams) {\n let staticSize = 0;\n for (let i3 = 0; i3 < preparedParams.length; i3++) {\n const { dynamic, encoded } = preparedParams[i3];\n if (dynamic)\n staticSize += 32;\n else\n staticSize += size(encoded);\n }\n const staticParams = [];\n const dynamicParams = [];\n let dynamicSize = 0;\n for (let i3 = 0; i3 < preparedParams.length; i3++) {\n const { dynamic, encoded } = preparedParams[i3];\n if (dynamic) {\n staticParams.push(numberToHex(staticSize + dynamicSize, { size: 32 }));\n dynamicParams.push(encoded);\n dynamicSize += size(encoded);\n } else {\n staticParams.push(encoded);\n }\n }\n return concat([...staticParams, ...dynamicParams]);\n }\n function encodeAddress(value) {\n if (!isAddress(value))\n throw new InvalidAddressError({ address: value });\n return { dynamic: false, encoded: padHex(value.toLowerCase()) };\n }\n function encodeArray(value, { length, param }) {\n const dynamic = length === null;\n if (!Array.isArray(value))\n throw new InvalidArrayError(value);\n if (!dynamic && value.length !== length)\n throw new AbiEncodingArrayLengthMismatchError({\n expectedLength: length,\n givenLength: value.length,\n type: `${param.type}[${length}]`\n });\n let dynamicChild = false;\n const preparedParams = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n const preparedParam = prepareParam({ param, value: value[i3] });\n if (preparedParam.dynamic)\n dynamicChild = true;\n preparedParams.push(preparedParam);\n }\n if (dynamic || dynamicChild) {\n const data = encodeParams(preparedParams);\n if (dynamic) {\n const length2 = numberToHex(preparedParams.length, { size: 32 });\n return {\n dynamic: true,\n encoded: preparedParams.length > 0 ? concat([length2, data]) : length2\n };\n }\n if (dynamicChild)\n return { dynamic: true, encoded: data };\n }\n return {\n dynamic: false,\n encoded: concat(preparedParams.map(({ encoded }) => encoded))\n };\n }\n function encodeBytes(value, { param }) {\n const [, paramSize] = param.type.split(\"bytes\");\n const bytesSize = size(value);\n if (!paramSize) {\n let value_ = value;\n if (bytesSize % 32 !== 0)\n value_ = padHex(value_, {\n dir: \"right\",\n size: Math.ceil((value.length - 2) / 2 / 32) * 32\n });\n return {\n dynamic: true,\n encoded: concat([padHex(numberToHex(bytesSize, { size: 32 })), value_])\n };\n }\n if (bytesSize !== Number.parseInt(paramSize, 10))\n throw new AbiEncodingBytesSizeMismatchError({\n expectedSize: Number.parseInt(paramSize, 10),\n value\n });\n return { dynamic: false, encoded: padHex(value, { dir: \"right\" }) };\n }\n function encodeBool(value) {\n if (typeof value !== \"boolean\")\n throw new BaseError2(`Invalid boolean value: \"${value}\" (type: ${typeof value}). Expected: \\`true\\` or \\`false\\`.`);\n return { dynamic: false, encoded: padHex(boolToHex(value)) };\n }\n function encodeNumber(value, { signed, size: size6 = 256 }) {\n if (typeof size6 === \"number\") {\n const max = 2n ** (BigInt(size6) - (signed ? 1n : 0n)) - 1n;\n const min = signed ? -max - 1n : 0n;\n if (value > max || value < min)\n throw new IntegerOutOfRangeError({\n max: max.toString(),\n min: min.toString(),\n signed,\n size: size6 / 8,\n value: value.toString()\n });\n }\n return {\n dynamic: false,\n encoded: numberToHex(value, {\n size: 32,\n signed\n })\n };\n }\n function encodeString(value) {\n const hexValue = stringToHex(value);\n const partsLength = Math.ceil(size(hexValue) / 32);\n const parts = [];\n for (let i3 = 0; i3 < partsLength; i3++) {\n parts.push(padHex(slice(hexValue, i3 * 32, (i3 + 1) * 32), {\n dir: \"right\"\n }));\n }\n return {\n dynamic: true,\n encoded: concat([\n padHex(numberToHex(size(hexValue), { size: 32 })),\n ...parts\n ])\n };\n }\n function encodeTuple(value, { param }) {\n let dynamic = false;\n const preparedParams = [];\n for (let i3 = 0; i3 < param.components.length; i3++) {\n const param_ = param.components[i3];\n const index2 = Array.isArray(value) ? i3 : param_.name;\n const preparedParam = prepareParam({\n param: param_,\n value: value[index2]\n });\n preparedParams.push(preparedParam);\n if (preparedParam.dynamic)\n dynamic = true;\n }\n return {\n dynamic,\n encoded: dynamic ? encodeParams(preparedParams) : concat(preparedParams.map(({ encoded }) => encoded))\n };\n }\n function getArrayComponents(type) {\n const matches = type.match(/^(.*)\\[(\\d+)?\\]$/);\n return matches ? (\n // Return `null` if the array is dynamic.\n [matches[2] ? Number(matches[2]) : null, matches[1]]\n ) : void 0;\n }\n var init_encodeAbiParameters = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_address();\n init_base();\n init_encoding();\n init_isAddress();\n init_concat();\n init_pad();\n init_size();\n init_slice();\n init_toHex();\n init_regex2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toFunctionSelector.js\n var toFunctionSelector;\n var init_toFunctionSelector = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toFunctionSelector.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_slice();\n init_toSignatureHash();\n toFunctionSelector = (fn) => slice(toSignatureHash(fn), 0, 4);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/getAbiItem.js\n function getAbiItem(parameters) {\n const { abi: abi2, args = [], name } = parameters;\n const isSelector = isHex(name, { strict: false });\n const abiItems = abi2.filter((abiItem) => {\n if (isSelector) {\n if (abiItem.type === \"function\")\n return toFunctionSelector(abiItem) === name;\n if (abiItem.type === \"event\")\n return toEventSelector(abiItem) === name;\n return false;\n }\n return \"name\" in abiItem && abiItem.name === name;\n });\n if (abiItems.length === 0)\n return void 0;\n if (abiItems.length === 1)\n return abiItems[0];\n let matchedAbiItem;\n for (const abiItem of abiItems) {\n if (!(\"inputs\" in abiItem))\n continue;\n if (!args || args.length === 0) {\n if (!abiItem.inputs || abiItem.inputs.length === 0)\n return abiItem;\n continue;\n }\n if (!abiItem.inputs)\n continue;\n if (abiItem.inputs.length === 0)\n continue;\n if (abiItem.inputs.length !== args.length)\n continue;\n const matched = args.every((arg, index2) => {\n const abiParameter = \"inputs\" in abiItem && abiItem.inputs[index2];\n if (!abiParameter)\n return false;\n return isArgOfType(arg, abiParameter);\n });\n if (matched) {\n if (matchedAbiItem && \"inputs\" in matchedAbiItem && matchedAbiItem.inputs) {\n const ambiguousTypes = getAmbiguousTypes(abiItem.inputs, matchedAbiItem.inputs, args);\n if (ambiguousTypes)\n throw new AbiItemAmbiguityError({\n abiItem,\n type: ambiguousTypes[0]\n }, {\n abiItem: matchedAbiItem,\n type: ambiguousTypes[1]\n });\n }\n matchedAbiItem = abiItem;\n }\n }\n if (matchedAbiItem)\n return matchedAbiItem;\n return abiItems[0];\n }\n function isArgOfType(arg, abiParameter) {\n const argType = typeof arg;\n const abiParameterType = abiParameter.type;\n switch (abiParameterType) {\n case \"address\":\n return isAddress(arg, { strict: false });\n case \"bool\":\n return argType === \"boolean\";\n case \"function\":\n return argType === \"string\";\n case \"string\":\n return argType === \"string\";\n default: {\n if (abiParameterType === \"tuple\" && \"components\" in abiParameter)\n return Object.values(abiParameter.components).every((component, index2) => {\n return isArgOfType(Object.values(arg)[index2], component);\n });\n if (/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(abiParameterType))\n return argType === \"number\" || argType === \"bigint\";\n if (/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(abiParameterType))\n return argType === \"string\" || arg instanceof Uint8Array;\n if (/[a-z]+[1-9]{0,3}(\\[[0-9]{0,}\\])+$/.test(abiParameterType)) {\n return Array.isArray(arg) && arg.every((x4) => isArgOfType(x4, {\n ...abiParameter,\n // Pop off `[]` or `[M]` from end of type\n type: abiParameterType.replace(/(\\[[0-9]{0,}\\])$/, \"\")\n }));\n }\n return false;\n }\n }\n }\n function getAmbiguousTypes(sourceParameters, targetParameters, args) {\n for (const parameterIndex in sourceParameters) {\n const sourceParameter = sourceParameters[parameterIndex];\n const targetParameter = targetParameters[parameterIndex];\n if (sourceParameter.type === \"tuple\" && targetParameter.type === \"tuple\" && \"components\" in sourceParameter && \"components\" in targetParameter)\n return getAmbiguousTypes(sourceParameter.components, targetParameter.components, args[parameterIndex]);\n const types = [sourceParameter.type, targetParameter.type];\n const ambiguous = (() => {\n if (types.includes(\"address\") && types.includes(\"bytes20\"))\n return true;\n if (types.includes(\"address\") && types.includes(\"string\"))\n return isAddress(args[parameterIndex], { strict: false });\n if (types.includes(\"address\") && types.includes(\"bytes\"))\n return isAddress(args[parameterIndex], { strict: false });\n return false;\n })();\n if (ambiguous)\n return types;\n }\n return;\n }\n var init_getAbiItem = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/getAbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_isHex();\n init_isAddress();\n init_toEventSelector();\n init_toFunctionSelector();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeEventTopics.js\n function encodeEventTopics(parameters) {\n const { abi: abi2, eventName, args } = parameters;\n let abiItem = abi2[0];\n if (eventName) {\n const item = getAbiItem({ abi: abi2, name: eventName });\n if (!item)\n throw new AbiEventNotFoundError(eventName, { docsPath });\n abiItem = item;\n }\n if (abiItem.type !== \"event\")\n throw new AbiEventNotFoundError(void 0, { docsPath });\n const definition = formatAbiItem2(abiItem);\n const signature = toEventSelector(definition);\n let topics = [];\n if (args && \"inputs\" in abiItem) {\n const indexedInputs = abiItem.inputs?.filter((param) => \"indexed\" in param && param.indexed);\n const args_ = Array.isArray(args) ? args : Object.values(args).length > 0 ? indexedInputs?.map((x4) => args[x4.name]) ?? [] : [];\n if (args_.length > 0) {\n topics = indexedInputs?.map((param, i3) => {\n if (Array.isArray(args_[i3]))\n return args_[i3].map((_2, j2) => encodeArg({ param, value: args_[i3][j2] }));\n return typeof args_[i3] !== \"undefined\" && args_[i3] !== null ? encodeArg({ param, value: args_[i3] }) : null;\n }) ?? [];\n }\n }\n return [signature, ...topics];\n }\n function encodeArg({ param, value }) {\n if (param.type === \"string\" || param.type === \"bytes\")\n return keccak256(toBytes(value));\n if (param.type === \"tuple\" || param.type.match(/^(.*)\\[(\\d+)?\\]$/))\n throw new FilterTypeNotSupportedError(param.type);\n return encodeAbiParameters([param], [value]);\n }\n var docsPath;\n var init_encodeEventTopics = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeEventTopics.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_log();\n init_toBytes();\n init_keccak256();\n init_toEventSelector();\n init_encodeAbiParameters();\n init_formatAbiItem2();\n init_getAbiItem();\n docsPath = \"/docs/contract/encodeEventTopics\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/filters/createFilterRequestScope.js\n function createFilterRequestScope(client, { method }) {\n const requestMap = {};\n if (client.transport.type === \"fallback\")\n client.transport.onResponse?.(({ method: method_, response: id, status, transport }) => {\n if (status === \"success\" && method === method_)\n requestMap[id] = transport.request;\n });\n return (id) => requestMap[id] || client.request;\n }\n var init_createFilterRequestScope = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/filters/createFilterRequestScope.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createContractEventFilter.js\n async function createContractEventFilter(client, parameters) {\n const { address, abi: abi2, args, eventName, fromBlock, strict, toBlock } = parameters;\n const getRequest = createFilterRequestScope(client, {\n method: \"eth_newFilter\"\n });\n const topics = eventName ? encodeEventTopics({\n abi: abi2,\n args,\n eventName\n }) : void 0;\n const id = await client.request({\n method: \"eth_newFilter\",\n params: [\n {\n address,\n fromBlock: typeof fromBlock === \"bigint\" ? numberToHex(fromBlock) : fromBlock,\n toBlock: typeof toBlock === \"bigint\" ? numberToHex(toBlock) : toBlock,\n topics\n }\n ]\n });\n return {\n abi: abi2,\n args,\n eventName,\n id,\n request: getRequest(id),\n strict: Boolean(strict),\n type: \"event\"\n };\n }\n var init_createContractEventFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createContractEventFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encodeEventTopics();\n init_toHex();\n init_createFilterRequestScope();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/parseAccount.js\n function parseAccount(account) {\n if (typeof account === \"string\")\n return { address: account, type: \"json-rpc\" };\n return account;\n }\n var init_parseAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/parseAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js\n function prepareEncodeFunctionData(parameters) {\n const { abi: abi2, args, functionName } = parameters;\n let abiItem = abi2[0];\n if (functionName) {\n const item = getAbiItem({\n abi: abi2,\n args,\n name: functionName\n });\n if (!item)\n throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath2 });\n abiItem = item;\n }\n if (abiItem.type !== \"function\")\n throw new AbiFunctionNotFoundError(void 0, { docsPath: docsPath2 });\n return {\n abi: [abiItem],\n functionName: toFunctionSelector(formatAbiItem2(abiItem))\n };\n }\n var docsPath2;\n var init_prepareEncodeFunctionData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_toFunctionSelector();\n init_formatAbiItem2();\n init_getAbiItem();\n docsPath2 = \"/docs/contract/encodeFunctionData\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeFunctionData.js\n function encodeFunctionData(parameters) {\n const { args } = parameters;\n const { abi: abi2, functionName } = (() => {\n if (parameters.abi.length === 1 && parameters.functionName?.startsWith(\"0x\"))\n return parameters;\n return prepareEncodeFunctionData(parameters);\n })();\n const abiItem = abi2[0];\n const signature = functionName;\n const data = \"inputs\" in abiItem && abiItem.inputs ? encodeAbiParameters(abiItem.inputs, args ?? []) : void 0;\n return concatHex([signature, data ?? \"0x\"]);\n }\n var init_encodeFunctionData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeFunctionData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_concat();\n init_encodeAbiParameters();\n init_prepareEncodeFunctionData();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/solidity.js\n var panicReasons, solidityError, solidityPanic;\n var init_solidity = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/solidity.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n panicReasons = {\n 1: \"An `assert` condition failed.\",\n 17: \"Arithmetic operation resulted in underflow or overflow.\",\n 18: \"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).\",\n 33: \"Attempted to convert to an invalid type.\",\n 34: \"Attempted to access a storage byte array that is incorrectly encoded.\",\n 49: \"Performed `.pop()` on an empty array\",\n 50: \"Array index is out of bounds.\",\n 65: \"Allocated too much memory or created an array which is too large.\",\n 81: \"Attempted to call a zero-initialized variable of internal function type.\"\n };\n solidityError = {\n inputs: [\n {\n name: \"message\",\n type: \"string\"\n }\n ],\n name: \"Error\",\n type: \"error\"\n };\n solidityPanic = {\n inputs: [\n {\n name: \"reason\",\n type: \"uint256\"\n }\n ],\n name: \"Panic\",\n type: \"error\"\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/cursor.js\n var NegativeOffsetError, PositionOutOfBoundsError, RecursiveReadLimitExceededError;\n var init_cursor = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/cursor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n NegativeOffsetError = class extends BaseError2 {\n constructor({ offset }) {\n super(`Offset \\`${offset}\\` cannot be negative.`, {\n name: \"NegativeOffsetError\"\n });\n }\n };\n PositionOutOfBoundsError = class extends BaseError2 {\n constructor({ length, position }) {\n super(`Position \\`${position}\\` is out of bounds (\\`0 < position < ${length}\\`).`, { name: \"PositionOutOfBoundsError\" });\n }\n };\n RecursiveReadLimitExceededError = class extends BaseError2 {\n constructor({ count, limit }) {\n super(`Recursive read limit of \\`${limit}\\` exceeded (recursive read count: \\`${count}\\`).`, { name: \"RecursiveReadLimitExceededError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/cursor.js\n function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {\n const cursor = Object.create(staticCursor);\n cursor.bytes = bytes;\n cursor.dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n cursor.positionReadCount = /* @__PURE__ */ new Map();\n cursor.recursiveReadLimit = recursiveReadLimit;\n return cursor;\n }\n var staticCursor;\n var init_cursor2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/cursor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_cursor();\n staticCursor = {\n bytes: new Uint8Array(),\n dataView: new DataView(new ArrayBuffer(0)),\n position: 0,\n positionReadCount: /* @__PURE__ */ new Map(),\n recursiveReadCount: 0,\n recursiveReadLimit: Number.POSITIVE_INFINITY,\n assertReadLimit() {\n if (this.recursiveReadCount >= this.recursiveReadLimit)\n throw new RecursiveReadLimitExceededError({\n count: this.recursiveReadCount + 1,\n limit: this.recursiveReadLimit\n });\n },\n assertPosition(position) {\n if (position < 0 || position > this.bytes.length - 1)\n throw new PositionOutOfBoundsError({\n length: this.bytes.length,\n position\n });\n },\n decrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError({ offset });\n const position = this.position - offset;\n this.assertPosition(position);\n this.position = position;\n },\n getReadCount(position) {\n return this.positionReadCount.get(position || this.position) || 0;\n },\n incrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError({ offset });\n const position = this.position + offset;\n this.assertPosition(position);\n this.position = position;\n },\n inspectByte(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectBytes(length, position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + length - 1);\n return this.bytes.subarray(position, position + length);\n },\n inspectUint8(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectUint16(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 1);\n return this.dataView.getUint16(position);\n },\n inspectUint24(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 2);\n return (this.dataView.getUint16(position) << 8) + this.dataView.getUint8(position + 2);\n },\n inspectUint32(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 3);\n return this.dataView.getUint32(position);\n },\n pushByte(byte) {\n this.assertPosition(this.position);\n this.bytes[this.position] = byte;\n this.position++;\n },\n pushBytes(bytes) {\n this.assertPosition(this.position + bytes.length - 1);\n this.bytes.set(bytes, this.position);\n this.position += bytes.length;\n },\n pushUint8(value) {\n this.assertPosition(this.position);\n this.bytes[this.position] = value;\n this.position++;\n },\n pushUint16(value) {\n this.assertPosition(this.position + 1);\n this.dataView.setUint16(this.position, value);\n this.position += 2;\n },\n pushUint24(value) {\n this.assertPosition(this.position + 2);\n this.dataView.setUint16(this.position, value >> 8);\n this.dataView.setUint8(this.position + 2, value & ~4294967040);\n this.position += 3;\n },\n pushUint32(value) {\n this.assertPosition(this.position + 3);\n this.dataView.setUint32(this.position, value);\n this.position += 4;\n },\n readByte() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectByte();\n this.position++;\n return value;\n },\n readBytes(length, size6) {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectBytes(length);\n this.position += size6 ?? length;\n return value;\n },\n readUint8() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint8();\n this.position += 1;\n return value;\n },\n readUint16() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint16();\n this.position += 2;\n return value;\n },\n readUint24() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint24();\n this.position += 3;\n return value;\n },\n readUint32() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint32();\n this.position += 4;\n return value;\n },\n get remaining() {\n return this.bytes.length - this.position;\n },\n setPosition(position) {\n const oldPosition = this.position;\n this.assertPosition(position);\n this.position = position;\n return () => this.position = oldPosition;\n },\n _touch() {\n if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)\n return;\n const count = this.getReadCount();\n this.positionReadCount.set(this.position, count + 1);\n if (count > 0)\n this.recursiveReadCount++;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/fromBytes.js\n function bytesToBigInt(bytes, opts = {}) {\n if (typeof opts.size !== \"undefined\")\n assertSize(bytes, { size: opts.size });\n const hex = bytesToHex(bytes, opts);\n return hexToBigInt(hex, opts);\n }\n function bytesToBool(bytes_, opts = {}) {\n let bytes = bytes_;\n if (typeof opts.size !== \"undefined\") {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes);\n }\n if (bytes.length > 1 || bytes[0] > 1)\n throw new InvalidBytesBooleanError(bytes);\n return Boolean(bytes[0]);\n }\n function bytesToNumber(bytes, opts = {}) {\n if (typeof opts.size !== \"undefined\")\n assertSize(bytes, { size: opts.size });\n const hex = bytesToHex(bytes, opts);\n return hexToNumber(hex, opts);\n }\n function bytesToString(bytes_, opts = {}) {\n let bytes = bytes_;\n if (typeof opts.size !== \"undefined\") {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes, { dir: \"right\" });\n }\n return new TextDecoder().decode(bytes);\n }\n var init_fromBytes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/fromBytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encoding();\n init_trim();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js\n function decodeAbiParameters(params, data) {\n const bytes = typeof data === \"string\" ? hexToBytes(data) : data;\n const cursor = createCursor(bytes);\n if (size(bytes) === 0 && params.length > 0)\n throw new AbiDecodingZeroDataError();\n if (size(data) && size(data) < 32)\n throw new AbiDecodingDataSizeTooSmallError({\n data: typeof data === \"string\" ? data : bytesToHex(data),\n params,\n size: size(data)\n });\n let consumed = 0;\n const values = [];\n for (let i3 = 0; i3 < params.length; ++i3) {\n const param = params[i3];\n cursor.setPosition(consumed);\n const [data2, consumed_] = decodeParameter(cursor, param, {\n staticPosition: 0\n });\n consumed += consumed_;\n values.push(data2);\n }\n return values;\n }\n function decodeParameter(cursor, param, { staticPosition }) {\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents) {\n const [length, type] = arrayComponents;\n return decodeArray(cursor, { ...param, type }, { length, staticPosition });\n }\n if (param.type === \"tuple\")\n return decodeTuple(cursor, param, { staticPosition });\n if (param.type === \"address\")\n return decodeAddress(cursor);\n if (param.type === \"bool\")\n return decodeBool(cursor);\n if (param.type.startsWith(\"bytes\"))\n return decodeBytes(cursor, param, { staticPosition });\n if (param.type.startsWith(\"uint\") || param.type.startsWith(\"int\"))\n return decodeNumber(cursor, param);\n if (param.type === \"string\")\n return decodeString(cursor, { staticPosition });\n throw new InvalidAbiDecodingTypeError(param.type, {\n docsPath: \"/docs/contract/decodeAbiParameters\"\n });\n }\n function decodeAddress(cursor) {\n const value = cursor.readBytes(32);\n return [checksumAddress(bytesToHex(sliceBytes(value, -20))), 32];\n }\n function decodeArray(cursor, param, { length, staticPosition }) {\n if (!length) {\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n const start = staticPosition + offset;\n const startOfData = start + sizeOfLength;\n cursor.setPosition(start);\n const length2 = bytesToNumber(cursor.readBytes(sizeOfLength));\n const dynamicChild = hasDynamicChild(param);\n let consumed2 = 0;\n const value2 = [];\n for (let i3 = 0; i3 < length2; ++i3) {\n cursor.setPosition(startOfData + (dynamicChild ? i3 * 32 : consumed2));\n const [data, consumed_] = decodeParameter(cursor, param, {\n staticPosition: startOfData\n });\n consumed2 += consumed_;\n value2.push(data);\n }\n cursor.setPosition(staticPosition + 32);\n return [value2, 32];\n }\n if (hasDynamicChild(param)) {\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n const start = staticPosition + offset;\n const value2 = [];\n for (let i3 = 0; i3 < length; ++i3) {\n cursor.setPosition(start + i3 * 32);\n const [data] = decodeParameter(cursor, param, {\n staticPosition: start\n });\n value2.push(data);\n }\n cursor.setPosition(staticPosition + 32);\n return [value2, 32];\n }\n let consumed = 0;\n const value = [];\n for (let i3 = 0; i3 < length; ++i3) {\n const [data, consumed_] = decodeParameter(cursor, param, {\n staticPosition: staticPosition + consumed\n });\n consumed += consumed_;\n value.push(data);\n }\n return [value, consumed];\n }\n function decodeBool(cursor) {\n return [bytesToBool(cursor.readBytes(32), { size: 32 }), 32];\n }\n function decodeBytes(cursor, param, { staticPosition }) {\n const [_2, size6] = param.type.split(\"bytes\");\n if (!size6) {\n const offset = bytesToNumber(cursor.readBytes(32));\n cursor.setPosition(staticPosition + offset);\n const length = bytesToNumber(cursor.readBytes(32));\n if (length === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"0x\", 32];\n }\n const data = cursor.readBytes(length);\n cursor.setPosition(staticPosition + 32);\n return [bytesToHex(data), 32];\n }\n const value = bytesToHex(cursor.readBytes(Number.parseInt(size6, 10), 32));\n return [value, 32];\n }\n function decodeNumber(cursor, param) {\n const signed = param.type.startsWith(\"int\");\n const size6 = Number.parseInt(param.type.split(\"int\")[1] || \"256\", 10);\n const value = cursor.readBytes(32);\n return [\n size6 > 48 ? bytesToBigInt(value, { signed }) : bytesToNumber(value, { signed }),\n 32\n ];\n }\n function decodeTuple(cursor, param, { staticPosition }) {\n const hasUnnamedChild = param.components.length === 0 || param.components.some(({ name }) => !name);\n const value = hasUnnamedChild ? [] : {};\n let consumed = 0;\n if (hasDynamicChild(param)) {\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n const start = staticPosition + offset;\n for (let i3 = 0; i3 < param.components.length; ++i3) {\n const component = param.components[i3];\n cursor.setPosition(start + consumed);\n const [data, consumed_] = decodeParameter(cursor, component, {\n staticPosition: start\n });\n consumed += consumed_;\n value[hasUnnamedChild ? i3 : component?.name] = data;\n }\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n for (let i3 = 0; i3 < param.components.length; ++i3) {\n const component = param.components[i3];\n const [data, consumed_] = decodeParameter(cursor, component, {\n staticPosition\n });\n value[hasUnnamedChild ? i3 : component?.name] = data;\n consumed += consumed_;\n }\n return [value, consumed];\n }\n function decodeString(cursor, { staticPosition }) {\n const offset = bytesToNumber(cursor.readBytes(32));\n const start = staticPosition + offset;\n cursor.setPosition(start);\n const length = bytesToNumber(cursor.readBytes(32));\n if (length === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"\", 32];\n }\n const data = cursor.readBytes(length, 32);\n const value = bytesToString(trim(data));\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n function hasDynamicChild(param) {\n const { type } = param;\n if (type === \"string\")\n return true;\n if (type === \"bytes\")\n return true;\n if (type.endsWith(\"[]\"))\n return true;\n if (type === \"tuple\")\n return param.components?.some(hasDynamicChild);\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents && hasDynamicChild({ ...param, type: arrayComponents[1] }))\n return true;\n return false;\n }\n var sizeOfLength, sizeOfOffset;\n var init_decodeAbiParameters = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_getAddress();\n init_cursor2();\n init_size();\n init_slice();\n init_trim();\n init_fromBytes();\n init_toBytes();\n init_toHex();\n init_encodeAbiParameters();\n sizeOfLength = 32;\n sizeOfOffset = 32;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeErrorResult.js\n function decodeErrorResult(parameters) {\n const { abi: abi2, data } = parameters;\n const signature = slice(data, 0, 4);\n if (signature === \"0x\")\n throw new AbiDecodingZeroDataError();\n const abi_ = [...abi2 || [], solidityError, solidityPanic];\n const abiItem = abi_.find((x4) => x4.type === \"error\" && signature === toFunctionSelector(formatAbiItem2(x4)));\n if (!abiItem)\n throw new AbiErrorSignatureNotFoundError(signature, {\n docsPath: \"/docs/contract/decodeErrorResult\"\n });\n return {\n abiItem,\n args: \"inputs\" in abiItem && abiItem.inputs && abiItem.inputs.length > 0 ? decodeAbiParameters(abiItem.inputs, slice(data, 4)) : void 0,\n errorName: abiItem.name\n };\n }\n var init_decodeErrorResult = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeErrorResult.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_solidity();\n init_abi();\n init_slice();\n init_toFunctionSelector();\n init_decodeAbiParameters();\n init_formatAbiItem2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/stringify.js\n var stringify;\n var init_stringify = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/stringify.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n stringify = (value, replacer, space) => JSON.stringify(value, (key, value_) => {\n const value2 = typeof value_ === \"bigint\" ? value_.toString() : value_;\n return typeof replacer === \"function\" ? replacer(key, value2) : value2;\n }, space);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js\n function formatAbiItemWithArgs({ abiItem, args, includeFunctionName = true, includeName = false }) {\n if (!(\"name\" in abiItem))\n return;\n if (!(\"inputs\" in abiItem))\n return;\n if (!abiItem.inputs)\n return;\n return `${includeFunctionName ? abiItem.name : \"\"}(${abiItem.inputs.map((input, i3) => `${includeName && input.name ? `${input.name}: ` : \"\"}${typeof args[i3] === \"object\" ? stringify(args[i3]) : args[i3]}`).join(\", \")})`;\n }\n var init_formatAbiItemWithArgs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/unit.js\n var etherUnits, gweiUnits;\n var init_unit = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/unit.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n etherUnits = {\n gwei: 9,\n wei: 18\n };\n gweiUnits = {\n ether: -9,\n wei: 9\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatUnits.js\n function formatUnits(value, decimals) {\n let display = value.toString();\n const negative = display.startsWith(\"-\");\n if (negative)\n display = display.slice(1);\n display = display.padStart(decimals, \"0\");\n let [integer, fraction] = [\n display.slice(0, display.length - decimals),\n display.slice(display.length - decimals)\n ];\n fraction = fraction.replace(/(0+)$/, \"\");\n return `${negative ? \"-\" : \"\"}${integer || \"0\"}${fraction ? `.${fraction}` : \"\"}`;\n }\n var init_formatUnits = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatUnits.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatEther.js\n function formatEther(wei, unit = \"wei\") {\n return formatUnits(wei, etherUnits[unit]);\n }\n var init_formatEther = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatEther.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_unit();\n init_formatUnits();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatGwei.js\n function formatGwei(wei, unit = \"wei\") {\n return formatUnits(wei, gweiUnits[unit]);\n }\n var init_formatGwei = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatGwei.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_unit();\n init_formatUnits();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/stateOverride.js\n function prettyStateMapping(stateMapping) {\n return stateMapping.reduce((pretty, { slot, value }) => {\n return `${pretty} ${slot}: ${value}\n`;\n }, \"\");\n }\n function prettyStateOverride(stateOverride) {\n return stateOverride.reduce((pretty, { address, ...state }) => {\n let val = `${pretty} ${address}:\n`;\n if (state.nonce)\n val += ` nonce: ${state.nonce}\n`;\n if (state.balance)\n val += ` balance: ${state.balance}\n`;\n if (state.code)\n val += ` code: ${state.code}\n`;\n if (state.state) {\n val += \" state:\\n\";\n val += prettyStateMapping(state.state);\n }\n if (state.stateDiff) {\n val += \" stateDiff:\\n\";\n val += prettyStateMapping(state.stateDiff);\n }\n return val;\n }, \" State Override:\\n\").slice(0, -1);\n }\n var AccountStateConflictError, StateAssignmentConflictError;\n var init_stateOverride = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/stateOverride.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n AccountStateConflictError = class extends BaseError2 {\n constructor({ address }) {\n super(`State for account \"${address}\" is set multiple times.`, {\n name: \"AccountStateConflictError\"\n });\n }\n };\n StateAssignmentConflictError = class extends BaseError2 {\n constructor() {\n super(\"state and stateDiff are set on the same account.\", {\n name: \"StateAssignmentConflictError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/transaction.js\n function prettyPrint(args) {\n const entries = Object.entries(args).map(([key, value]) => {\n if (value === void 0 || value === false)\n return null;\n return [key, value];\n }).filter(Boolean);\n const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0);\n return entries.map(([key, value]) => ` ${`${key}:`.padEnd(maxLength + 1)} ${value}`).join(\"\\n\");\n }\n var FeeConflictError, InvalidLegacyVError, InvalidSerializableTransactionError, InvalidStorageKeySizeError, TransactionExecutionError, TransactionNotFoundError, TransactionReceiptNotFoundError, TransactionReceiptRevertedError, WaitForTransactionReceiptTimeoutError;\n var init_transaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/transaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatEther();\n init_formatGwei();\n init_base();\n FeeConflictError = class extends BaseError2 {\n constructor() {\n super([\n \"Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.\",\n \"Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.\"\n ].join(\"\\n\"), { name: \"FeeConflictError\" });\n }\n };\n InvalidLegacyVError = class extends BaseError2 {\n constructor({ v: v2 }) {\n super(`Invalid \\`v\\` value \"${v2}\". Expected 27 or 28.`, {\n name: \"InvalidLegacyVError\"\n });\n }\n };\n InvalidSerializableTransactionError = class extends BaseError2 {\n constructor({ transaction }) {\n super(\"Cannot infer a transaction type from provided transaction.\", {\n metaMessages: [\n \"Provided Transaction:\",\n \"{\",\n prettyPrint(transaction),\n \"}\",\n \"\",\n \"To infer the type, either provide:\",\n \"- a `type` to the Transaction, or\",\n \"- an EIP-1559 Transaction with `maxFeePerGas`, or\",\n \"- an EIP-2930 Transaction with `gasPrice` & `accessList`, or\",\n \"- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or\",\n \"- an EIP-7702 Transaction with `authorizationList`, or\",\n \"- a Legacy Transaction with `gasPrice`\"\n ],\n name: \"InvalidSerializableTransactionError\"\n });\n }\n };\n InvalidStorageKeySizeError = class extends BaseError2 {\n constructor({ storageKey }) {\n super(`Size for storage key \"${storageKey}\" is invalid. Expected 32 bytes. Got ${Math.floor((storageKey.length - 2) / 2)} bytes.`, { name: \"InvalidStorageKeySizeError\" });\n }\n };\n TransactionExecutionError = class extends BaseError2 {\n constructor(cause, { account, docsPath: docsPath8, chain: chain2, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value }) {\n const prettyArgs = prettyPrint({\n chain: chain2 && `${chain2?.name} (id: ${chain2?.id})`,\n from: account?.address,\n to,\n value: typeof value !== \"undefined\" && `${formatEther(value)} ${chain2?.nativeCurrency?.symbol || \"ETH\"}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== \"undefined\" && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== \"undefined\" && `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== \"undefined\" && `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce\n });\n super(cause.shortMessage, {\n cause,\n docsPath: docsPath8,\n metaMessages: [\n ...cause.metaMessages ? [...cause.metaMessages, \" \"] : [],\n \"Request Arguments:\",\n prettyArgs\n ].filter(Boolean),\n name: \"TransactionExecutionError\"\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n };\n TransactionNotFoundError = class extends BaseError2 {\n constructor({ blockHash, blockNumber, blockTag, hash: hash3, index: index2 }) {\n let identifier = \"Transaction\";\n if (blockTag && index2 !== void 0)\n identifier = `Transaction at block time \"${blockTag}\" at index \"${index2}\"`;\n if (blockHash && index2 !== void 0)\n identifier = `Transaction at block hash \"${blockHash}\" at index \"${index2}\"`;\n if (blockNumber && index2 !== void 0)\n identifier = `Transaction at block number \"${blockNumber}\" at index \"${index2}\"`;\n if (hash3)\n identifier = `Transaction with hash \"${hash3}\"`;\n super(`${identifier} could not be found.`, {\n name: \"TransactionNotFoundError\"\n });\n }\n };\n TransactionReceiptNotFoundError = class extends BaseError2 {\n constructor({ hash: hash3 }) {\n super(`Transaction receipt with hash \"${hash3}\" could not be found. The Transaction may not be processed on a block yet.`, {\n name: \"TransactionReceiptNotFoundError\"\n });\n }\n };\n TransactionReceiptRevertedError = class extends BaseError2 {\n constructor({ receipt }) {\n super(`Transaction with hash \"${receipt.transactionHash}\" reverted.`, {\n metaMessages: [\n 'The receipt marked the transaction as \"reverted\". This could mean that the function on the contract you are trying to call threw an error.',\n \" \",\n \"You can attempt to extract the revert reason by:\",\n \"- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract\",\n \"- using the `call` Action with raw `data`\"\n ],\n name: \"TransactionReceiptRevertedError\"\n });\n Object.defineProperty(this, \"receipt\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.receipt = receipt;\n }\n };\n WaitForTransactionReceiptTimeoutError = class extends BaseError2 {\n constructor({ hash: hash3 }) {\n super(`Timed out while waiting for transaction with hash \"${hash3}\" to be confirmed.`, { name: \"WaitForTransactionReceiptTimeoutError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/utils.js\n var getContractAddress, getUrl;\n var init_utils4 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n getContractAddress = (address) => address;\n getUrl = (url) => url;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/contract.js\n var CallExecutionError, ContractFunctionExecutionError, ContractFunctionRevertedError, ContractFunctionZeroDataError, CounterfactualDeploymentFailedError, RawContractError;\n var init_contract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/contract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_solidity();\n init_decodeErrorResult();\n init_formatAbiItem2();\n init_formatAbiItemWithArgs();\n init_getAbiItem();\n init_formatEther();\n init_formatGwei();\n init_abi();\n init_base();\n init_stateOverride();\n init_transaction();\n init_utils4();\n CallExecutionError = class extends BaseError2 {\n constructor(cause, { account: account_, docsPath: docsPath8, chain: chain2, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride }) {\n const account = account_ ? parseAccount(account_) : void 0;\n let prettyArgs = prettyPrint({\n from: account?.address,\n to,\n value: typeof value !== \"undefined\" && `${formatEther(value)} ${chain2?.nativeCurrency?.symbol || \"ETH\"}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== \"undefined\" && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== \"undefined\" && `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== \"undefined\" && `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce\n });\n if (stateOverride) {\n prettyArgs += `\n${prettyStateOverride(stateOverride)}`;\n }\n super(cause.shortMessage, {\n cause,\n docsPath: docsPath8,\n metaMessages: [\n ...cause.metaMessages ? [...cause.metaMessages, \" \"] : [],\n \"Raw Call Arguments:\",\n prettyArgs\n ].filter(Boolean),\n name: \"CallExecutionError\"\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n };\n ContractFunctionExecutionError = class extends BaseError2 {\n constructor(cause, { abi: abi2, args, contractAddress, docsPath: docsPath8, functionName, sender }) {\n const abiItem = getAbiItem({ abi: abi2, args, name: functionName });\n const formattedArgs = abiItem ? formatAbiItemWithArgs({\n abiItem,\n args,\n includeFunctionName: false,\n includeName: false\n }) : void 0;\n const functionWithParams = abiItem ? formatAbiItem2(abiItem, { includeName: true }) : void 0;\n const prettyArgs = prettyPrint({\n address: contractAddress && getContractAddress(contractAddress),\n function: functionWithParams,\n args: formattedArgs && formattedArgs !== \"()\" && `${[...Array(functionName?.length ?? 0).keys()].map(() => \" \").join(\"\")}${formattedArgs}`,\n sender\n });\n super(cause.shortMessage || `An unknown error occurred while executing the contract function \"${functionName}\".`, {\n cause,\n docsPath: docsPath8,\n metaMessages: [\n ...cause.metaMessages ? [...cause.metaMessages, \" \"] : [],\n prettyArgs && \"Contract Call:\",\n prettyArgs\n ].filter(Boolean),\n name: \"ContractFunctionExecutionError\"\n });\n Object.defineProperty(this, \"abi\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"args\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"contractAddress\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"formattedArgs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"functionName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"sender\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abi = abi2;\n this.args = args;\n this.cause = cause;\n this.contractAddress = contractAddress;\n this.functionName = functionName;\n this.sender = sender;\n }\n };\n ContractFunctionRevertedError = class extends BaseError2 {\n constructor({ abi: abi2, data, functionName, message }) {\n let cause;\n let decodedData;\n let metaMessages;\n let reason;\n if (data && data !== \"0x\") {\n try {\n decodedData = decodeErrorResult({ abi: abi2, data });\n const { abiItem, errorName, args: errorArgs } = decodedData;\n if (errorName === \"Error\") {\n reason = errorArgs[0];\n } else if (errorName === \"Panic\") {\n const [firstArg] = errorArgs;\n reason = panicReasons[firstArg];\n } else {\n const errorWithParams = abiItem ? formatAbiItem2(abiItem, { includeName: true }) : void 0;\n const formattedArgs = abiItem && errorArgs ? formatAbiItemWithArgs({\n abiItem,\n args: errorArgs,\n includeFunctionName: false,\n includeName: false\n }) : void 0;\n metaMessages = [\n errorWithParams ? `Error: ${errorWithParams}` : \"\",\n formattedArgs && formattedArgs !== \"()\" ? ` ${[...Array(errorName?.length ?? 0).keys()].map(() => \" \").join(\"\")}${formattedArgs}` : \"\"\n ];\n }\n } catch (err) {\n cause = err;\n }\n } else if (message)\n reason = message;\n let signature;\n if (cause instanceof AbiErrorSignatureNotFoundError) {\n signature = cause.signature;\n metaMessages = [\n `Unable to decode signature \"${signature}\" as it was not found on the provided ABI.`,\n \"Make sure you are using the correct ABI and that the error exists on it.\",\n `You can look up the decoded signature here: https://openchain.xyz/signatures?query=${signature}.`\n ];\n }\n super(reason && reason !== \"execution reverted\" || signature ? [\n `The contract function \"${functionName}\" reverted with the following ${signature ? \"signature\" : \"reason\"}:`,\n reason || signature\n ].join(\"\\n\") : `The contract function \"${functionName}\" reverted.`, {\n cause,\n metaMessages,\n name: \"ContractFunctionRevertedError\"\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"raw\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"reason\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"signature\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = decodedData;\n this.raw = data;\n this.reason = reason;\n this.signature = signature;\n }\n };\n ContractFunctionZeroDataError = class extends BaseError2 {\n constructor({ functionName }) {\n super(`The contract function \"${functionName}\" returned no data (\"0x\").`, {\n metaMessages: [\n \"This could be due to any of the following:\",\n ` - The contract does not have the function \"${functionName}\",`,\n \" - The parameters passed to the contract function may be invalid, or\",\n \" - The address is not a contract.\"\n ],\n name: \"ContractFunctionZeroDataError\"\n });\n }\n };\n CounterfactualDeploymentFailedError = class extends BaseError2 {\n constructor({ factory }) {\n super(`Deployment for counterfactual contract call failed${factory ? ` for factory \"${factory}\".` : \"\"}`, {\n metaMessages: [\n \"Please ensure:\",\n \"- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).\",\n \"- The `factoryData` is a valid encoded function call for contract deployment function on the factory.\"\n ],\n name: \"CounterfactualDeploymentFailedError\"\n });\n }\n };\n RawContractError = class extends BaseError2 {\n constructor({ data, message }) {\n super(message || \"\", { name: \"RawContractError\" });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 3\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = data;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/request.js\n var HttpRequestError, RpcRequestError, TimeoutError;\n var init_request = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/request.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n init_base();\n init_utils4();\n HttpRequestError = class extends BaseError2 {\n constructor({ body, cause, details, headers, status, url }) {\n super(\"HTTP request failed.\", {\n cause,\n details,\n metaMessages: [\n status && `Status: ${status}`,\n `URL: ${getUrl(url)}`,\n body && `Request body: ${stringify(body)}`\n ].filter(Boolean),\n name: \"HttpRequestError\"\n });\n Object.defineProperty(this, \"body\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"headers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"status\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"url\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.body = body;\n this.headers = headers;\n this.status = status;\n this.url = url;\n }\n };\n RpcRequestError = class extends BaseError2 {\n constructor({ body, error, url }) {\n super(\"RPC Request failed.\", {\n cause: error,\n details: error.message,\n metaMessages: [`URL: ${getUrl(url)}`, `Request body: ${stringify(body)}`],\n name: \"RpcRequestError\"\n });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.code = error.code;\n this.data = error.data;\n }\n };\n TimeoutError = class extends BaseError2 {\n constructor({ body, url }) {\n super(\"The request took too long to respond.\", {\n details: \"The request timed out.\",\n metaMessages: [`URL: ${getUrl(url)}`, `Request body: ${stringify(body)}`],\n name: \"TimeoutError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/rpc.js\n var unknownErrorCode, RpcError, ProviderRpcError, ParseRpcError, InvalidRequestRpcError, MethodNotFoundRpcError, InvalidParamsRpcError, InternalRpcError, InvalidInputRpcError, ResourceNotFoundRpcError, ResourceUnavailableRpcError, TransactionRejectedRpcError, MethodNotSupportedRpcError, LimitExceededRpcError, JsonRpcVersionUnsupportedError, UserRejectedRequestError, UnauthorizedProviderError, UnsupportedProviderMethodError, ProviderDisconnectedError, ChainDisconnectedError, SwitchChainError, UnsupportedNonOptionalCapabilityError, UnsupportedChainIdError, DuplicateIdError, UnknownBundleIdError, BundleTooLargeError, AtomicReadyWalletRejectedUpgradeError, AtomicityNotSupportedError, UnknownRpcError;\n var init_rpc = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/rpc.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_request();\n unknownErrorCode = -1;\n RpcError = class extends BaseError2 {\n constructor(cause, { code, docsPath: docsPath8, metaMessages, name, shortMessage }) {\n super(shortMessage, {\n cause,\n docsPath: docsPath8,\n metaMessages: metaMessages || cause?.metaMessages,\n name: name || \"RpcError\"\n });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.name = name || cause.name;\n this.code = cause instanceof RpcRequestError ? cause.code : code ?? unknownErrorCode;\n }\n };\n ProviderRpcError = class extends RpcError {\n constructor(cause, options) {\n super(cause, options);\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = options.data;\n }\n };\n ParseRpcError = class _ParseRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _ParseRpcError.code,\n name: \"ParseRpcError\",\n shortMessage: \"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.\"\n });\n }\n };\n Object.defineProperty(ParseRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32700\n });\n InvalidRequestRpcError = class _InvalidRequestRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _InvalidRequestRpcError.code,\n name: \"InvalidRequestRpcError\",\n shortMessage: \"JSON is not a valid request object.\"\n });\n }\n };\n Object.defineProperty(InvalidRequestRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32600\n });\n MethodNotFoundRpcError = class _MethodNotFoundRpcError extends RpcError {\n constructor(cause, { method } = {}) {\n super(cause, {\n code: _MethodNotFoundRpcError.code,\n name: \"MethodNotFoundRpcError\",\n shortMessage: `The method${method ? ` \"${method}\"` : \"\"} does not exist / is not available.`\n });\n }\n };\n Object.defineProperty(MethodNotFoundRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32601\n });\n InvalidParamsRpcError = class _InvalidParamsRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _InvalidParamsRpcError.code,\n name: \"InvalidParamsRpcError\",\n shortMessage: [\n \"Invalid parameters were provided to the RPC method.\",\n \"Double check you have provided the correct parameters.\"\n ].join(\"\\n\")\n });\n }\n };\n Object.defineProperty(InvalidParamsRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32602\n });\n InternalRpcError = class _InternalRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _InternalRpcError.code,\n name: \"InternalRpcError\",\n shortMessage: \"An internal error was received.\"\n });\n }\n };\n Object.defineProperty(InternalRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32603\n });\n InvalidInputRpcError = class _InvalidInputRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _InvalidInputRpcError.code,\n name: \"InvalidInputRpcError\",\n shortMessage: [\n \"Missing or invalid parameters.\",\n \"Double check you have provided the correct parameters.\"\n ].join(\"\\n\")\n });\n }\n };\n Object.defineProperty(InvalidInputRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32e3\n });\n ResourceNotFoundRpcError = class _ResourceNotFoundRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _ResourceNotFoundRpcError.code,\n name: \"ResourceNotFoundRpcError\",\n shortMessage: \"Requested resource not found.\"\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"ResourceNotFoundRpcError\"\n });\n }\n };\n Object.defineProperty(ResourceNotFoundRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32001\n });\n ResourceUnavailableRpcError = class _ResourceUnavailableRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _ResourceUnavailableRpcError.code,\n name: \"ResourceUnavailableRpcError\",\n shortMessage: \"Requested resource not available.\"\n });\n }\n };\n Object.defineProperty(ResourceUnavailableRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32002\n });\n TransactionRejectedRpcError = class _TransactionRejectedRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _TransactionRejectedRpcError.code,\n name: \"TransactionRejectedRpcError\",\n shortMessage: \"Transaction creation failed.\"\n });\n }\n };\n Object.defineProperty(TransactionRejectedRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32003\n });\n MethodNotSupportedRpcError = class _MethodNotSupportedRpcError extends RpcError {\n constructor(cause, { method } = {}) {\n super(cause, {\n code: _MethodNotSupportedRpcError.code,\n name: \"MethodNotSupportedRpcError\",\n shortMessage: `Method${method ? ` \"${method}\"` : \"\"} is not supported.`\n });\n }\n };\n Object.defineProperty(MethodNotSupportedRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32004\n });\n LimitExceededRpcError = class _LimitExceededRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _LimitExceededRpcError.code,\n name: \"LimitExceededRpcError\",\n shortMessage: \"Request exceeds defined limit.\"\n });\n }\n };\n Object.defineProperty(LimitExceededRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32005\n });\n JsonRpcVersionUnsupportedError = class _JsonRpcVersionUnsupportedError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _JsonRpcVersionUnsupportedError.code,\n name: \"JsonRpcVersionUnsupportedError\",\n shortMessage: \"Version of JSON-RPC protocol is not supported.\"\n });\n }\n };\n Object.defineProperty(JsonRpcVersionUnsupportedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32006\n });\n UserRejectedRequestError = class _UserRejectedRequestError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UserRejectedRequestError.code,\n name: \"UserRejectedRequestError\",\n shortMessage: \"User rejected the request.\"\n });\n }\n };\n Object.defineProperty(UserRejectedRequestError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4001\n });\n UnauthorizedProviderError = class _UnauthorizedProviderError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UnauthorizedProviderError.code,\n name: \"UnauthorizedProviderError\",\n shortMessage: \"The requested method and/or account has not been authorized by the user.\"\n });\n }\n };\n Object.defineProperty(UnauthorizedProviderError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4100\n });\n UnsupportedProviderMethodError = class _UnsupportedProviderMethodError extends ProviderRpcError {\n constructor(cause, { method } = {}) {\n super(cause, {\n code: _UnsupportedProviderMethodError.code,\n name: \"UnsupportedProviderMethodError\",\n shortMessage: `The Provider does not support the requested method${method ? ` \" ${method}\"` : \"\"}.`\n });\n }\n };\n Object.defineProperty(UnsupportedProviderMethodError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4200\n });\n ProviderDisconnectedError = class _ProviderDisconnectedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _ProviderDisconnectedError.code,\n name: \"ProviderDisconnectedError\",\n shortMessage: \"The Provider is disconnected from all chains.\"\n });\n }\n };\n Object.defineProperty(ProviderDisconnectedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4900\n });\n ChainDisconnectedError = class _ChainDisconnectedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _ChainDisconnectedError.code,\n name: \"ChainDisconnectedError\",\n shortMessage: \"The Provider is not connected to the requested chain.\"\n });\n }\n };\n Object.defineProperty(ChainDisconnectedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4901\n });\n SwitchChainError = class _SwitchChainError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _SwitchChainError.code,\n name: \"SwitchChainError\",\n shortMessage: \"An error occurred when attempting to switch chain.\"\n });\n }\n };\n Object.defineProperty(SwitchChainError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4902\n });\n UnsupportedNonOptionalCapabilityError = class _UnsupportedNonOptionalCapabilityError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UnsupportedNonOptionalCapabilityError.code,\n name: \"UnsupportedNonOptionalCapabilityError\",\n shortMessage: \"This Wallet does not support a capability that was not marked as optional.\"\n });\n }\n };\n Object.defineProperty(UnsupportedNonOptionalCapabilityError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5700\n });\n UnsupportedChainIdError = class _UnsupportedChainIdError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UnsupportedChainIdError.code,\n name: \"UnsupportedChainIdError\",\n shortMessage: \"This Wallet does not support the requested chain ID.\"\n });\n }\n };\n Object.defineProperty(UnsupportedChainIdError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5710\n });\n DuplicateIdError = class _DuplicateIdError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _DuplicateIdError.code,\n name: \"DuplicateIdError\",\n shortMessage: \"There is already a bundle submitted with this ID.\"\n });\n }\n };\n Object.defineProperty(DuplicateIdError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5720\n });\n UnknownBundleIdError = class _UnknownBundleIdError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UnknownBundleIdError.code,\n name: \"UnknownBundleIdError\",\n shortMessage: \"This bundle id is unknown / has not been submitted\"\n });\n }\n };\n Object.defineProperty(UnknownBundleIdError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5730\n });\n BundleTooLargeError = class _BundleTooLargeError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _BundleTooLargeError.code,\n name: \"BundleTooLargeError\",\n shortMessage: \"The call bundle is too large for the Wallet to process.\"\n });\n }\n };\n Object.defineProperty(BundleTooLargeError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5740\n });\n AtomicReadyWalletRejectedUpgradeError = class _AtomicReadyWalletRejectedUpgradeError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _AtomicReadyWalletRejectedUpgradeError.code,\n name: \"AtomicReadyWalletRejectedUpgradeError\",\n shortMessage: \"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade.\"\n });\n }\n };\n Object.defineProperty(AtomicReadyWalletRejectedUpgradeError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5750\n });\n AtomicityNotSupportedError = class _AtomicityNotSupportedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _AtomicityNotSupportedError.code,\n name: \"AtomicityNotSupportedError\",\n shortMessage: \"The wallet does not support atomic execution but the request requires it.\"\n });\n }\n };\n Object.defineProperty(AtomicityNotSupportedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5760\n });\n UnknownRpcError = class extends RpcError {\n constructor(cause) {\n super(cause, {\n name: \"UnknownRpcError\",\n shortMessage: \"An unknown RPC error occurred.\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getContractError.js\n function getContractError(err, { abi: abi2, address, args, docsPath: docsPath8, functionName, sender }) {\n const error = err instanceof RawContractError ? err : err instanceof BaseError2 ? err.walk((err2) => \"data\" in err2) || err.walk() : {};\n const { code, data, details, message, shortMessage } = error;\n const cause = (() => {\n if (err instanceof AbiDecodingZeroDataError)\n return new ContractFunctionZeroDataError({ functionName });\n if ([EXECUTION_REVERTED_ERROR_CODE, InternalRpcError.code].includes(code) && (data || details || message || shortMessage)) {\n return new ContractFunctionRevertedError({\n abi: abi2,\n data: typeof data === \"object\" ? data.data : data,\n functionName,\n message: error instanceof RpcRequestError ? details : shortMessage ?? message\n });\n }\n return err;\n })();\n return new ContractFunctionExecutionError(cause, {\n abi: abi2,\n args,\n contractAddress: address,\n docsPath: docsPath8,\n functionName,\n sender\n });\n }\n var EXECUTION_REVERTED_ERROR_CODE;\n var init_getContractError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getContractError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_base();\n init_contract();\n init_request();\n init_rpc();\n EXECUTION_REVERTED_ERROR_CODE = 3;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js\n function publicKeyToAddress(publicKey) {\n const address = keccak256(`0x${publicKey.substring(4)}`).substring(26);\n return checksumAddress(`0x${address}`);\n }\n var init_publicKeyToAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAddress();\n init_keccak256();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js\n function setBigUint64(view, byteOffset, value, isLE2) {\n if (typeof view.setBigUint64 === \"function\")\n return view.setBigUint64(byteOffset, value, isLE2);\n const _32n2 = BigInt(32);\n const _u32_max = BigInt(4294967295);\n const wh = Number(value >> _32n2 & _u32_max);\n const wl = Number(value & _u32_max);\n const h4 = isLE2 ? 4 : 0;\n const l6 = isLE2 ? 0 : 4;\n view.setUint32(byteOffset + h4, wh, isLE2);\n view.setUint32(byteOffset + l6, wl, isLE2);\n }\n function Chi(a3, b4, c4) {\n return a3 & b4 ^ ~a3 & c4;\n }\n function Maj(a3, b4, c4) {\n return a3 & b4 ^ a3 & c4 ^ b4 & c4;\n }\n var HashMD, SHA256_IV, SHA512_IV;\n var init_md = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n HashMD = class extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE2) {\n super();\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE2;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n aexists(this);\n data = toBytes2(data);\n abytes(data);\n const { view, buffer: buffer2, blockLen } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer2.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n aexists(this);\n aoutput(out, this);\n this.finished = true;\n const { buffer: buffer2, view, blockLen, isLE: isLE2 } = this;\n let { pos } = this;\n buffer2[pos++] = 128;\n clean(this.buffer.subarray(pos));\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n for (let i3 = pos; i3 < blockLen; i3++)\n buffer2[i3] = 0;\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE2);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n if (len % 4)\n throw new Error(\"_sha2: outputLen should be aligned to 32bit\");\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error(\"_sha2: outputLen bigger than state\");\n for (let i3 = 0; i3 < outLen; i3++)\n oview.setUint32(4 * i3, state[i3], isLE2);\n }\n digest() {\n const { buffer: buffer2, outputLen } = this;\n this.digestInto(buffer2);\n const res = buffer2.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer: buffer2, length, finished, destroyed, pos } = this;\n to.destroyed = destroyed;\n to.finished = finished;\n to.length = length;\n to.pos = pos;\n if (length % blockLen)\n to.buffer.set(buffer2);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n };\n SHA256_IV = /* @__PURE__ */ Uint32Array.from([\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ]);\n SHA512_IV = /* @__PURE__ */ Uint32Array.from([\n 1779033703,\n 4089235720,\n 3144134277,\n 2227873595,\n 1013904242,\n 4271175723,\n 2773480762,\n 1595750129,\n 1359893119,\n 2917565137,\n 2600822924,\n 725511199,\n 528734635,\n 4215389547,\n 1541459225,\n 327033209\n ]);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js\n var SHA256_K, SHA256_W, SHA256, K512, SHA512_Kh, SHA512_Kl, SHA512_W_H, SHA512_W_L, SHA512, sha256, sha512;\n var init_sha2 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_md();\n init_u64();\n init_utils3();\n SHA256_K = /* @__PURE__ */ Uint32Array.from([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n SHA256_W = /* @__PURE__ */ new Uint32Array(64);\n SHA256 = class extends HashMD {\n constructor(outputLen = 32) {\n super(64, outputLen, 8, false);\n this.A = SHA256_IV[0] | 0;\n this.B = SHA256_IV[1] | 0;\n this.C = SHA256_IV[2] | 0;\n this.D = SHA256_IV[3] | 0;\n this.E = SHA256_IV[4] | 0;\n this.F = SHA256_IV[5] | 0;\n this.G = SHA256_IV[6] | 0;\n this.H = SHA256_IV[7] | 0;\n }\n get() {\n const { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n return [A4, B2, C, D2, E2, F2, G, H3];\n }\n // prettier-ignore\n set(A4, B2, C, D2, E2, F2, G, H3) {\n this.A = A4 | 0;\n this.B = B2 | 0;\n this.C = C | 0;\n this.D = D2 | 0;\n this.E = E2 | 0;\n this.F = F2 | 0;\n this.G = G | 0;\n this.H = H3 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n SHA256_W[i3] = view.getUint32(offset, false);\n for (let i3 = 16; i3 < 64; i3++) {\n const W15 = SHA256_W[i3 - 15];\n const W2 = SHA256_W[i3 - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ W15 >>> 3;\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ W2 >>> 10;\n SHA256_W[i3] = s1 + SHA256_W[i3 - 7] + s0 + SHA256_W[i3 - 16] | 0;\n }\n let { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n for (let i3 = 0; i3 < 64; i3++) {\n const sigma1 = rotr(E2, 6) ^ rotr(E2, 11) ^ rotr(E2, 25);\n const T1 = H3 + sigma1 + Chi(E2, F2, G) + SHA256_K[i3] + SHA256_W[i3] | 0;\n const sigma0 = rotr(A4, 2) ^ rotr(A4, 13) ^ rotr(A4, 22);\n const T22 = sigma0 + Maj(A4, B2, C) | 0;\n H3 = G;\n G = F2;\n F2 = E2;\n E2 = D2 + T1 | 0;\n D2 = C;\n C = B2;\n B2 = A4;\n A4 = T1 + T22 | 0;\n }\n A4 = A4 + this.A | 0;\n B2 = B2 + this.B | 0;\n C = C + this.C | 0;\n D2 = D2 + this.D | 0;\n E2 = E2 + this.E | 0;\n F2 = F2 + this.F | 0;\n G = G + this.G | 0;\n H3 = H3 + this.H | 0;\n this.set(A4, B2, C, D2, E2, F2, G, H3);\n }\n roundClean() {\n clean(SHA256_W);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n clean(this.buffer);\n }\n };\n K512 = /* @__PURE__ */ (() => split([\n \"0x428a2f98d728ae22\",\n \"0x7137449123ef65cd\",\n \"0xb5c0fbcfec4d3b2f\",\n \"0xe9b5dba58189dbbc\",\n \"0x3956c25bf348b538\",\n \"0x59f111f1b605d019\",\n \"0x923f82a4af194f9b\",\n \"0xab1c5ed5da6d8118\",\n \"0xd807aa98a3030242\",\n \"0x12835b0145706fbe\",\n \"0x243185be4ee4b28c\",\n \"0x550c7dc3d5ffb4e2\",\n \"0x72be5d74f27b896f\",\n \"0x80deb1fe3b1696b1\",\n \"0x9bdc06a725c71235\",\n \"0xc19bf174cf692694\",\n \"0xe49b69c19ef14ad2\",\n \"0xefbe4786384f25e3\",\n \"0x0fc19dc68b8cd5b5\",\n \"0x240ca1cc77ac9c65\",\n \"0x2de92c6f592b0275\",\n \"0x4a7484aa6ea6e483\",\n \"0x5cb0a9dcbd41fbd4\",\n \"0x76f988da831153b5\",\n \"0x983e5152ee66dfab\",\n \"0xa831c66d2db43210\",\n \"0xb00327c898fb213f\",\n \"0xbf597fc7beef0ee4\",\n \"0xc6e00bf33da88fc2\",\n \"0xd5a79147930aa725\",\n \"0x06ca6351e003826f\",\n \"0x142929670a0e6e70\",\n \"0x27b70a8546d22ffc\",\n \"0x2e1b21385c26c926\",\n \"0x4d2c6dfc5ac42aed\",\n \"0x53380d139d95b3df\",\n \"0x650a73548baf63de\",\n \"0x766a0abb3c77b2a8\",\n \"0x81c2c92e47edaee6\",\n \"0x92722c851482353b\",\n \"0xa2bfe8a14cf10364\",\n \"0xa81a664bbc423001\",\n \"0xc24b8b70d0f89791\",\n \"0xc76c51a30654be30\",\n \"0xd192e819d6ef5218\",\n \"0xd69906245565a910\",\n \"0xf40e35855771202a\",\n \"0x106aa07032bbd1b8\",\n \"0x19a4c116b8d2d0c8\",\n \"0x1e376c085141ab53\",\n \"0x2748774cdf8eeb99\",\n \"0x34b0bcb5e19b48a8\",\n \"0x391c0cb3c5c95a63\",\n \"0x4ed8aa4ae3418acb\",\n \"0x5b9cca4f7763e373\",\n \"0x682e6ff3d6b2b8a3\",\n \"0x748f82ee5defb2fc\",\n \"0x78a5636f43172f60\",\n \"0x84c87814a1f0ab72\",\n \"0x8cc702081a6439ec\",\n \"0x90befffa23631e28\",\n \"0xa4506cebde82bde9\",\n \"0xbef9a3f7b2c67915\",\n \"0xc67178f2e372532b\",\n \"0xca273eceea26619c\",\n \"0xd186b8c721c0c207\",\n \"0xeada7dd6cde0eb1e\",\n \"0xf57d4f7fee6ed178\",\n \"0x06f067aa72176fba\",\n \"0x0a637dc5a2c898a6\",\n \"0x113f9804bef90dae\",\n \"0x1b710b35131c471b\",\n \"0x28db77f523047d84\",\n \"0x32caab7b40c72493\",\n \"0x3c9ebe0a15c9bebc\",\n \"0x431d67c49c100d4c\",\n \"0x4cc5d4becb3e42b6\",\n \"0x597f299cfc657e2a\",\n \"0x5fcb6fab3ad6faec\",\n \"0x6c44198c4a475817\"\n ].map((n2) => BigInt(n2))))();\n SHA512_Kh = /* @__PURE__ */ (() => K512[0])();\n SHA512_Kl = /* @__PURE__ */ (() => K512[1])();\n SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);\n SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);\n SHA512 = class extends HashMD {\n constructor(outputLen = 64) {\n super(128, outputLen, 16, false);\n this.Ah = SHA512_IV[0] | 0;\n this.Al = SHA512_IV[1] | 0;\n this.Bh = SHA512_IV[2] | 0;\n this.Bl = SHA512_IV[3] | 0;\n this.Ch = SHA512_IV[4] | 0;\n this.Cl = SHA512_IV[5] | 0;\n this.Dh = SHA512_IV[6] | 0;\n this.Dl = SHA512_IV[7] | 0;\n this.Eh = SHA512_IV[8] | 0;\n this.El = SHA512_IV[9] | 0;\n this.Fh = SHA512_IV[10] | 0;\n this.Fl = SHA512_IV[11] | 0;\n this.Gh = SHA512_IV[12] | 0;\n this.Gl = SHA512_IV[13] | 0;\n this.Hh = SHA512_IV[14] | 0;\n this.Hl = SHA512_IV[15] | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4) {\n SHA512_W_H[i3] = view.getUint32(offset);\n SHA512_W_L[i3] = view.getUint32(offset += 4);\n }\n for (let i3 = 16; i3 < 80; i3++) {\n const W15h = SHA512_W_H[i3 - 15] | 0;\n const W15l = SHA512_W_L[i3 - 15] | 0;\n const s0h = rotrSH(W15h, W15l, 1) ^ rotrSH(W15h, W15l, 8) ^ shrSH(W15h, W15l, 7);\n const s0l = rotrSL(W15h, W15l, 1) ^ rotrSL(W15h, W15l, 8) ^ shrSL(W15h, W15l, 7);\n const W2h = SHA512_W_H[i3 - 2] | 0;\n const W2l = SHA512_W_L[i3 - 2] | 0;\n const s1h = rotrSH(W2h, W2l, 19) ^ rotrBH(W2h, W2l, 61) ^ shrSH(W2h, W2l, 6);\n const s1l = rotrSL(W2h, W2l, 19) ^ rotrBL(W2h, W2l, 61) ^ shrSL(W2h, W2l, 6);\n const SUMl = add4L(s0l, s1l, SHA512_W_L[i3 - 7], SHA512_W_L[i3 - 16]);\n const SUMh = add4H(SUMl, s0h, s1h, SHA512_W_H[i3 - 7], SHA512_W_H[i3 - 16]);\n SHA512_W_H[i3] = SUMh | 0;\n SHA512_W_L[i3] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n for (let i3 = 0; i3 < 80; i3++) {\n const sigma1h = rotrSH(Eh, El, 14) ^ rotrSH(Eh, El, 18) ^ rotrBH(Eh, El, 41);\n const sigma1l = rotrSL(Eh, El, 14) ^ rotrSL(Eh, El, 18) ^ rotrBL(Eh, El, 41);\n const CHIh = Eh & Fh ^ ~Eh & Gh;\n const CHIl = El & Fl ^ ~El & Gl;\n const T1ll = add5L(Hl, sigma1l, CHIl, SHA512_Kl[i3], SHA512_W_L[i3]);\n const T1h = add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i3], SHA512_W_H[i3]);\n const T1l = T1ll | 0;\n const sigma0h = rotrSH(Ah, Al, 28) ^ rotrBH(Ah, Al, 34) ^ rotrBH(Ah, Al, 39);\n const sigma0l = rotrSL(Ah, Al, 28) ^ rotrBL(Ah, Al, 34) ^ rotrBL(Ah, Al, 39);\n const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;\n const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = add3L(T1l, sigma0l, MAJl);\n Ah = add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n ({ h: Ah, l: Al } = add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n clean(SHA512_W_H, SHA512_W_L);\n }\n destroy() {\n clean(this.buffer);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n };\n sha256 = /* @__PURE__ */ createHasher(() => new SHA256());\n sha512 = /* @__PURE__ */ createHasher(() => new SHA512());\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js\n var HMAC, hmac;\n var init_hmac = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n HMAC = class extends Hash {\n constructor(hash3, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n ahash(hash3);\n const key = toBytes2(_key);\n this.iHash = hash3.create();\n if (typeof this.iHash.update !== \"function\")\n throw new Error(\"Expected instance of class which extends utils.Hash\");\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad6 = new Uint8Array(blockLen);\n pad6.set(key.length > blockLen ? hash3.create().update(key).digest() : key);\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54;\n this.iHash.update(pad6);\n this.oHash = hash3.create();\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54 ^ 92;\n this.oHash.update(pad6);\n clean(pad6);\n }\n update(buf) {\n aexists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n aexists(this);\n abytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n };\n hmac = (hash3, key, message) => new HMAC(hash3, key).update(message).digest();\n hmac.create = (hash3, key) => new HMAC(hash3, key);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/utils.js\n function isBytes2(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function abytes2(item) {\n if (!isBytes2(item))\n throw new Error(\"Uint8Array expected\");\n }\n function abool(title2, value) {\n if (typeof value !== \"boolean\")\n throw new Error(title2 + \" boolean expected, got \" + value);\n }\n function numberToHexUnpadded(num2) {\n const hex = num2.toString(16);\n return hex.length & 1 ? \"0\" + hex : hex;\n }\n function hexToNumber2(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n return hex === \"\" ? _0n2 : BigInt(\"0x\" + hex);\n }\n function bytesToHex3(bytes) {\n abytes2(bytes);\n if (hasHexBuiltin2)\n return bytes.toHex();\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes3[bytes[i3]];\n }\n return hex;\n }\n function asciiToBase162(ch) {\n if (ch >= asciis2._0 && ch <= asciis2._9)\n return ch - asciis2._0;\n if (ch >= asciis2.A && ch <= asciis2.F)\n return ch - (asciis2.A - 10);\n if (ch >= asciis2.a && ch <= asciis2.f)\n return ch - (asciis2.a - 10);\n return;\n }\n function hexToBytes3(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n if (hasHexBuiltin2)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error(\"hex string expected, got unpadded hex of length \" + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase162(hex.charCodeAt(hi));\n const n2 = asciiToBase162(hex.charCodeAt(hi + 1));\n if (n1 === void 0 || n2 === void 0) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n }\n function bytesToNumberBE(bytes) {\n return hexToNumber2(bytesToHex3(bytes));\n }\n function bytesToNumberLE(bytes) {\n abytes2(bytes);\n return hexToNumber2(bytesToHex3(Uint8Array.from(bytes).reverse()));\n }\n function numberToBytesBE(n2, len) {\n return hexToBytes3(n2.toString(16).padStart(len * 2, \"0\"));\n }\n function numberToBytesLE(n2, len) {\n return numberToBytesBE(n2, len).reverse();\n }\n function ensureBytes(title2, hex, expectedLength) {\n let res;\n if (typeof hex === \"string\") {\n try {\n res = hexToBytes3(hex);\n } catch (e2) {\n throw new Error(title2 + \" must be hex string or Uint8Array, cause: \" + e2);\n }\n } else if (isBytes2(hex)) {\n res = Uint8Array.from(hex);\n } else {\n throw new Error(title2 + \" must be hex string or Uint8Array\");\n }\n const len = res.length;\n if (typeof expectedLength === \"number\" && len !== expectedLength)\n throw new Error(title2 + \" of length \" + expectedLength + \" expected, got \" + len);\n return res;\n }\n function concatBytes3(...arrays) {\n let sum = 0;\n for (let i3 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n abytes2(a3);\n sum += a3.length;\n }\n const res = new Uint8Array(sum);\n for (let i3 = 0, pad6 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n res.set(a3, pad6);\n pad6 += a3.length;\n }\n return res;\n }\n function utf8ToBytes2(str) {\n if (typeof str !== \"string\")\n throw new Error(\"string expected\");\n return new Uint8Array(new TextEncoder().encode(str));\n }\n function inRange(n2, min, max) {\n return isPosBig(n2) && isPosBig(min) && isPosBig(max) && min <= n2 && n2 < max;\n }\n function aInRange(title2, n2, min, max) {\n if (!inRange(n2, min, max))\n throw new Error(\"expected valid \" + title2 + \": \" + min + \" <= n < \" + max + \", got \" + n2);\n }\n function bitLen(n2) {\n let len;\n for (len = 0; n2 > _0n2; n2 >>= _1n2, len += 1)\n ;\n return len;\n }\n function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== \"number\" || hashLen < 2)\n throw new Error(\"hashLen must be a number\");\n if (typeof qByteLen !== \"number\" || qByteLen < 2)\n throw new Error(\"qByteLen must be a number\");\n if (typeof hmacFn !== \"function\")\n throw new Error(\"hmacFn must be a function\");\n let v2 = u8n(hashLen);\n let k4 = u8n(hashLen);\n let i3 = 0;\n const reset = () => {\n v2.fill(1);\n k4.fill(0);\n i3 = 0;\n };\n const h4 = (...b4) => hmacFn(k4, v2, ...b4);\n const reseed = (seed = u8n(0)) => {\n k4 = h4(u8fr([0]), seed);\n v2 = h4();\n if (seed.length === 0)\n return;\n k4 = h4(u8fr([1]), seed);\n v2 = h4();\n };\n const gen2 = () => {\n if (i3++ >= 1e3)\n throw new Error(\"drbg: tried 1000 values\");\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v2 = h4();\n const sl = v2.slice();\n out.push(sl);\n len += v2.length;\n }\n return concatBytes3(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed);\n let res = void 0;\n while (!(res = pred(gen2())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n }\n function validateObject(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns[type];\n if (typeof checkVal !== \"function\")\n throw new Error(\"invalid validator function\");\n const val = object[fieldName];\n if (isOptional && val === void 0)\n return;\n if (!checkVal(val, object)) {\n throw new Error(\"param \" + String(fieldName) + \" is invalid. Expected \" + type + \", got \" + val);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n }\n function memoized(fn) {\n const map = /* @__PURE__ */ new WeakMap();\n return (arg, ...args) => {\n const val = map.get(arg);\n if (val !== void 0)\n return val;\n const computed = fn(arg, ...args);\n map.set(arg, computed);\n return computed;\n };\n }\n var _0n2, _1n2, hasHexBuiltin2, hexes3, asciis2, isPosBig, bitMask, u8n, u8fr, validatorFns;\n var init_utils5 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n _0n2 = /* @__PURE__ */ BigInt(0);\n _1n2 = /* @__PURE__ */ BigInt(1);\n hasHexBuiltin2 = // @ts-ignore\n typeof Uint8Array.from([]).toHex === \"function\" && typeof Uint8Array.fromHex === \"function\";\n hexes3 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n asciis2 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\n isPosBig = (n2) => typeof n2 === \"bigint\" && _0n2 <= n2;\n bitMask = (n2) => (_1n2 << BigInt(n2)) - _1n2;\n u8n = (len) => new Uint8Array(len);\n u8fr = (arr) => Uint8Array.from(arr);\n validatorFns = {\n bigint: (val) => typeof val === \"bigint\",\n function: (val) => typeof val === \"function\",\n boolean: (val) => typeof val === \"boolean\",\n string: (val) => typeof val === \"string\",\n stringOrUint8Array: (val) => typeof val === \"string\" || isBytes2(val),\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === \"function\" && Number.isSafeInteger(val.outputLen)\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/modular.js\n function mod(a3, b4) {\n const result = a3 % b4;\n return result >= _0n3 ? result : b4 + result;\n }\n function pow2(x4, power, modulo) {\n let res = x4;\n while (power-- > _0n3) {\n res *= res;\n res %= modulo;\n }\n return res;\n }\n function invert(number, modulo) {\n if (number === _0n3)\n throw new Error(\"invert: expected non-zero number\");\n if (modulo <= _0n3)\n throw new Error(\"invert: expected positive modulus, got \" + modulo);\n let a3 = mod(number, modulo);\n let b4 = modulo;\n let x4 = _0n3, y6 = _1n3, u2 = _1n3, v2 = _0n3;\n while (a3 !== _0n3) {\n const q3 = b4 / a3;\n const r2 = b4 % a3;\n const m2 = x4 - u2 * q3;\n const n2 = y6 - v2 * q3;\n b4 = a3, a3 = r2, x4 = u2, y6 = v2, u2 = m2, v2 = n2;\n }\n const gcd = b4;\n if (gcd !== _1n3)\n throw new Error(\"invert: does not exist\");\n return mod(x4, modulo);\n }\n function sqrt3mod4(Fp, n2) {\n const p1div4 = (Fp.ORDER + _1n3) / _4n;\n const root = Fp.pow(n2, p1div4);\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n function sqrt5mod8(Fp, n2) {\n const p5div8 = (Fp.ORDER - _5n) / _8n;\n const n22 = Fp.mul(n2, _2n2);\n const v2 = Fp.pow(n22, p5div8);\n const nv = Fp.mul(n2, v2);\n const i3 = Fp.mul(Fp.mul(nv, _2n2), v2);\n const root = Fp.mul(nv, Fp.sub(i3, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n function tonelliShanks(P2) {\n if (P2 < BigInt(3))\n throw new Error(\"sqrt is not defined for small field\");\n let Q2 = P2 - _1n3;\n let S3 = 0;\n while (Q2 % _2n2 === _0n3) {\n Q2 /= _2n2;\n S3++;\n }\n let Z2 = _2n2;\n const _Fp = Field(P2);\n while (FpLegendre(_Fp, Z2) === 1) {\n if (Z2++ > 1e3)\n throw new Error(\"Cannot find square root: probably non-prime P\");\n }\n if (S3 === 1)\n return sqrt3mod4;\n let cc = _Fp.pow(Z2, Q2);\n const Q1div2 = (Q2 + _1n3) / _2n2;\n return function tonelliSlow(Fp, n2) {\n if (Fp.is0(n2))\n return n2;\n if (FpLegendre(Fp, n2) !== 1)\n throw new Error(\"Cannot find square root\");\n let M2 = S3;\n let c4 = Fp.mul(Fp.ONE, cc);\n let t3 = Fp.pow(n2, Q2);\n let R3 = Fp.pow(n2, Q1div2);\n while (!Fp.eql(t3, Fp.ONE)) {\n if (Fp.is0(t3))\n return Fp.ZERO;\n let i3 = 1;\n let t_tmp = Fp.sqr(t3);\n while (!Fp.eql(t_tmp, Fp.ONE)) {\n i3++;\n t_tmp = Fp.sqr(t_tmp);\n if (i3 === M2)\n throw new Error(\"Cannot find square root\");\n }\n const exponent = _1n3 << BigInt(M2 - i3 - 1);\n const b4 = Fp.pow(c4, exponent);\n M2 = i3;\n c4 = Fp.sqr(b4);\n t3 = Fp.mul(t3, c4);\n R3 = Fp.mul(R3, b4);\n }\n return R3;\n };\n }\n function FpSqrt(P2) {\n if (P2 % _4n === _3n)\n return sqrt3mod4;\n if (P2 % _8n === _5n)\n return sqrt5mod8;\n return tonelliShanks(P2);\n }\n function validateField(field) {\n const initial = {\n ORDER: \"bigint\",\n MASK: \"bigint\",\n BYTES: \"isSafeInteger\",\n BITS: \"isSafeInteger\"\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n return validateObject(field, opts);\n }\n function FpPow(Fp, num2, power) {\n if (power < _0n3)\n throw new Error(\"invalid exponent, negatives unsupported\");\n if (power === _0n3)\n return Fp.ONE;\n if (power === _1n3)\n return num2;\n let p4 = Fp.ONE;\n let d5 = num2;\n while (power > _0n3) {\n if (power & _1n3)\n p4 = Fp.mul(p4, d5);\n d5 = Fp.sqr(d5);\n power >>= _1n3;\n }\n return p4;\n }\n function FpInvertBatch(Fp, nums, passZero = false) {\n const inverted = new Array(nums.length).fill(passZero ? Fp.ZERO : void 0);\n const multipliedAcc = nums.reduce((acc, num2, i3) => {\n if (Fp.is0(num2))\n return acc;\n inverted[i3] = acc;\n return Fp.mul(acc, num2);\n }, Fp.ONE);\n const invertedAcc = Fp.inv(multipliedAcc);\n nums.reduceRight((acc, num2, i3) => {\n if (Fp.is0(num2))\n return acc;\n inverted[i3] = Fp.mul(acc, inverted[i3]);\n return Fp.mul(acc, num2);\n }, invertedAcc);\n return inverted;\n }\n function FpLegendre(Fp, n2) {\n const p1mod2 = (Fp.ORDER - _1n3) / _2n2;\n const powered = Fp.pow(n2, p1mod2);\n const yes = Fp.eql(powered, Fp.ONE);\n const zero = Fp.eql(powered, Fp.ZERO);\n const no = Fp.eql(powered, Fp.neg(Fp.ONE));\n if (!yes && !zero && !no)\n throw new Error(\"invalid Legendre symbol result\");\n return yes ? 1 : zero ? 0 : -1;\n }\n function nLength(n2, nBitLength) {\n if (nBitLength !== void 0)\n anumber(nBitLength);\n const _nBitLength = nBitLength !== void 0 ? nBitLength : n2.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n }\n function Field(ORDER, bitLen3, isLE2 = false, redef = {}) {\n if (ORDER <= _0n3)\n throw new Error(\"invalid field: expected ORDER > 0, got \" + ORDER);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen3);\n if (BYTES > 2048)\n throw new Error(\"invalid field: expected ORDER of <= 2048 bytes\");\n let sqrtP;\n const f7 = Object.freeze({\n ORDER,\n isLE: isLE2,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: _0n3,\n ONE: _1n3,\n create: (num2) => mod(num2, ORDER),\n isValid: (num2) => {\n if (typeof num2 !== \"bigint\")\n throw new Error(\"invalid field element: expected bigint, got \" + typeof num2);\n return _0n3 <= num2 && num2 < ORDER;\n },\n is0: (num2) => num2 === _0n3,\n isOdd: (num2) => (num2 & _1n3) === _1n3,\n neg: (num2) => mod(-num2, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num2) => mod(num2 * num2, ORDER),\n add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n pow: (num2, power) => FpPow(f7, num2, power),\n div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num2) => num2 * num2,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num2) => invert(num2, ORDER),\n sqrt: redef.sqrt || ((n2) => {\n if (!sqrtP)\n sqrtP = FpSqrt(ORDER);\n return sqrtP(f7, n2);\n }),\n toBytes: (num2) => isLE2 ? numberToBytesLE(num2, BYTES) : numberToBytesBE(num2, BYTES),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(\"Field.fromBytes: expected \" + BYTES + \" bytes, got \" + bytes.length);\n return isLE2 ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n },\n // TODO: we don't need it here, move out to separate fn\n invertBatch: (lst) => FpInvertBatch(f7, lst),\n // We can't move this out because Fp6, Fp12 implement it\n // and it's unclear what to return in there.\n cmov: (a3, b4, c4) => c4 ? b4 : a3\n });\n return Object.freeze(f7);\n }\n function getFieldBytesLength(fieldOrder) {\n if (typeof fieldOrder !== \"bigint\")\n throw new Error(\"field order must be bigint\");\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n }\n function getMinHashLength(fieldOrder) {\n const length = getFieldBytesLength(fieldOrder);\n return length + Math.ceil(length / 2);\n }\n function mapHashToField(key, fieldOrder, isLE2 = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength(fieldOrder);\n const minLen = getMinHashLength(fieldOrder);\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(\"expected \" + minLen + \"-1024 bytes of input, got \" + len);\n const num2 = isLE2 ? bytesToNumberLE(key) : bytesToNumberBE(key);\n const reduced = mod(num2, fieldOrder - _1n3) + _1n3;\n return isLE2 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);\n }\n var _0n3, _1n3, _2n2, _3n, _4n, _5n, _8n, FIELD_FIELDS;\n var init_modular = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/modular.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n init_utils5();\n _0n3 = BigInt(0);\n _1n3 = BigInt(1);\n _2n2 = /* @__PURE__ */ BigInt(2);\n _3n = /* @__PURE__ */ BigInt(3);\n _4n = /* @__PURE__ */ BigInt(4);\n _5n = /* @__PURE__ */ BigInt(5);\n _8n = /* @__PURE__ */ BigInt(8);\n FIELD_FIELDS = [\n \"create\",\n \"isValid\",\n \"is0\",\n \"neg\",\n \"inv\",\n \"sqrt\",\n \"sqr\",\n \"eql\",\n \"add\",\n \"sub\",\n \"mul\",\n \"pow\",\n \"div\",\n \"addN\",\n \"subN\",\n \"mulN\",\n \"sqrN\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/curve.js\n function constTimeNegate(condition, item) {\n const neg = item.negate();\n return condition ? neg : item;\n }\n function validateW(W, bits) {\n if (!Number.isSafeInteger(W) || W <= 0 || W > bits)\n throw new Error(\"invalid window size, expected [1..\" + bits + \"], got W=\" + W);\n }\n function calcWOpts(W, scalarBits) {\n validateW(W, scalarBits);\n const windows = Math.ceil(scalarBits / W) + 1;\n const windowSize = 2 ** (W - 1);\n const maxNumber = 2 ** W;\n const mask = bitMask(W);\n const shiftBy = BigInt(W);\n return { windows, windowSize, mask, maxNumber, shiftBy };\n }\n function calcOffsets(n2, window2, wOpts) {\n const { windowSize, mask, maxNumber, shiftBy } = wOpts;\n let wbits = Number(n2 & mask);\n let nextN = n2 >> shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n nextN += _1n4;\n }\n const offsetStart = window2 * windowSize;\n const offset = offsetStart + Math.abs(wbits) - 1;\n const isZero = wbits === 0;\n const isNeg = wbits < 0;\n const isNegF = window2 % 2 !== 0;\n const offsetF = offsetStart;\n return { nextN, offset, isZero, isNeg, isNegF, offsetF };\n }\n function validateMSMPoints(points, c4) {\n if (!Array.isArray(points))\n throw new Error(\"array expected\");\n points.forEach((p4, i3) => {\n if (!(p4 instanceof c4))\n throw new Error(\"invalid point at index \" + i3);\n });\n }\n function validateMSMScalars(scalars, field) {\n if (!Array.isArray(scalars))\n throw new Error(\"array of scalars expected\");\n scalars.forEach((s4, i3) => {\n if (!field.isValid(s4))\n throw new Error(\"invalid scalar at index \" + i3);\n });\n }\n function getW(P2) {\n return pointWindowSizes.get(P2) || 1;\n }\n function wNAF(c4, bits) {\n return {\n constTimeNegate,\n hasPrecomputes(elm) {\n return getW(elm) !== 1;\n },\n // non-const time multiplication ladder\n unsafeLadder(elm, n2, p4 = c4.ZERO) {\n let d5 = elm;\n while (n2 > _0n4) {\n if (n2 & _1n4)\n p4 = p4.add(d5);\n d5 = d5.double();\n n2 >>= _1n4;\n }\n return p4;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @param elm Point instance\n * @param W window size\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = calcWOpts(W, bits);\n const points = [];\n let p4 = elm;\n let base4 = p4;\n for (let window2 = 0; window2 < windows; window2++) {\n base4 = p4;\n points.push(base4);\n for (let i3 = 1; i3 < windowSize; i3++) {\n base4 = base4.add(p4);\n points.push(base4);\n }\n p4 = base4.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n2) {\n let p4 = c4.ZERO;\n let f7 = c4.BASE;\n const wo = calcWOpts(W, bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n const { nextN, offset, isZero, isNeg, isNegF, offsetF } = calcOffsets(n2, window2, wo);\n n2 = nextN;\n if (isZero) {\n f7 = f7.add(constTimeNegate(isNegF, precomputes[offsetF]));\n } else {\n p4 = p4.add(constTimeNegate(isNeg, precomputes[offset]));\n }\n }\n return { p: p4, f: f7 };\n },\n /**\n * Implements ec unsafe (non const-time) multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @param acc accumulator point to add result of multiplication\n * @returns point\n */\n wNAFUnsafe(W, precomputes, n2, acc = c4.ZERO) {\n const wo = calcWOpts(W, bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n if (n2 === _0n4)\n break;\n const { nextN, offset, isZero, isNeg } = calcOffsets(n2, window2, wo);\n n2 = nextN;\n if (isZero) {\n continue;\n } else {\n const item = precomputes[offset];\n acc = acc.add(isNeg ? item.negate() : item);\n }\n }\n return acc;\n },\n getPrecomputes(W, P2, transform) {\n let comp = pointPrecomputes.get(P2);\n if (!comp) {\n comp = this.precomputeWindow(P2, W);\n if (W !== 1)\n pointPrecomputes.set(P2, transform(comp));\n }\n return comp;\n },\n wNAFCached(P2, n2, transform) {\n const W = getW(P2);\n return this.wNAF(W, this.getPrecomputes(W, P2, transform), n2);\n },\n wNAFCachedUnsafe(P2, n2, transform, prev) {\n const W = getW(P2);\n if (W === 1)\n return this.unsafeLadder(P2, n2, prev);\n return this.wNAFUnsafe(W, this.getPrecomputes(W, P2, transform), n2, prev);\n },\n // We calculate precomputes for elliptic curve point multiplication\n // using windowed method. This specifies window size and\n // stores precomputed values. Usually only base point would be precomputed.\n setWindowSize(P2, W) {\n validateW(W, bits);\n pointWindowSizes.set(P2, W);\n pointPrecomputes.delete(P2);\n }\n };\n }\n function pippenger(c4, fieldN, points, scalars) {\n validateMSMPoints(points, c4);\n validateMSMScalars(scalars, fieldN);\n const plength = points.length;\n const slength = scalars.length;\n if (plength !== slength)\n throw new Error(\"arrays of points and scalars must have equal length\");\n const zero = c4.ZERO;\n const wbits = bitLen(BigInt(plength));\n let windowSize = 1;\n if (wbits > 12)\n windowSize = wbits - 3;\n else if (wbits > 4)\n windowSize = wbits - 2;\n else if (wbits > 0)\n windowSize = 2;\n const MASK = bitMask(windowSize);\n const buckets = new Array(Number(MASK) + 1).fill(zero);\n const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;\n let sum = zero;\n for (let i3 = lastBits; i3 >= 0; i3 -= windowSize) {\n buckets.fill(zero);\n for (let j2 = 0; j2 < slength; j2++) {\n const scalar = scalars[j2];\n const wbits2 = Number(scalar >> BigInt(i3) & MASK);\n buckets[wbits2] = buckets[wbits2].add(points[j2]);\n }\n let resI = zero;\n for (let j2 = buckets.length - 1, sumI = zero; j2 > 0; j2--) {\n sumI = sumI.add(buckets[j2]);\n resI = resI.add(sumI);\n }\n sum = sum.add(resI);\n if (i3 !== 0)\n for (let j2 = 0; j2 < windowSize; j2++)\n sum = sum.double();\n }\n return sum;\n }\n function validateBasic(curve) {\n validateField(curve.Fp);\n validateObject(curve, {\n n: \"bigint\",\n h: \"bigint\",\n Gx: \"field\",\n Gy: \"field\"\n }, {\n nBitLength: \"isSafeInteger\",\n nByteLength: \"isSafeInteger\"\n });\n return Object.freeze({\n ...nLength(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER }\n });\n }\n var _0n4, _1n4, pointPrecomputes, pointWindowSizes;\n var init_curve = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/curve.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_modular();\n init_utils5();\n _0n4 = BigInt(0);\n _1n4 = BigInt(1);\n pointPrecomputes = /* @__PURE__ */ new WeakMap();\n pointWindowSizes = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/weierstrass.js\n function validateSigVerOpts(opts) {\n if (opts.lowS !== void 0)\n abool(\"lowS\", opts.lowS);\n if (opts.prehash !== void 0)\n abool(\"prehash\", opts.prehash);\n }\n function validatePointOpts(curve) {\n const opts = validateBasic(curve);\n validateObject(opts, {\n a: \"field\",\n b: \"field\"\n }, {\n allowInfinityPoint: \"boolean\",\n allowedPrivateKeyLengths: \"array\",\n clearCofactor: \"function\",\n fromBytes: \"function\",\n isTorsionFree: \"function\",\n toBytes: \"function\",\n wrapPrivateKey: \"boolean\"\n });\n const { endo, Fp, a: a3 } = opts;\n if (endo) {\n if (!Fp.eql(a3, Fp.ZERO)) {\n throw new Error(\"invalid endo: CURVE.a must be 0\");\n }\n if (typeof endo !== \"object\" || typeof endo.beta !== \"bigint\" || typeof endo.splitScalar !== \"function\") {\n throw new Error('invalid endo: expected \"beta\": bigint and \"splitScalar\": function');\n }\n }\n return Object.freeze({ ...opts });\n }\n function numToSizedHex(num2, size6) {\n return bytesToHex3(numberToBytesBE(num2, size6));\n }\n function weierstrassPoints(opts) {\n const CURVE = validatePointOpts(opts);\n const { Fp } = CURVE;\n const Fn = Field(CURVE.n, CURVE.nBitLength);\n const toBytes6 = CURVE.toBytes || ((_c, point, _isCompressed) => {\n const a3 = point.toAffine();\n return concatBytes3(Uint8Array.from([4]), Fp.toBytes(a3.x), Fp.toBytes(a3.y));\n });\n const fromBytes5 = CURVE.fromBytes || ((bytes) => {\n const tail = bytes.subarray(1);\n const x4 = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y6 = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x: x4, y: y6 };\n });\n function weierstrassEquation(x4) {\n const { a: a3, b: b4 } = CURVE;\n const x22 = Fp.sqr(x4);\n const x32 = Fp.mul(x22, x4);\n return Fp.add(Fp.add(x32, Fp.mul(x4, a3)), b4);\n }\n function isValidXY(x4, y6) {\n const left = Fp.sqr(y6);\n const right = weierstrassEquation(x4);\n return Fp.eql(left, right);\n }\n if (!isValidXY(CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n const _4a3 = Fp.mul(Fp.pow(CURVE.a, _3n2), _4n2);\n const _27b2 = Fp.mul(Fp.sqr(CURVE.b), BigInt(27));\n if (Fp.is0(Fp.add(_4a3, _27b2)))\n throw new Error(\"bad curve params: a or b\");\n function isWithinCurveOrder(num2) {\n return inRange(num2, _1n5, CURVE.n);\n }\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n: N4 } = CURVE;\n if (lengths && typeof key !== \"bigint\") {\n if (isBytes2(key))\n key = bytesToHex3(key);\n if (typeof key !== \"string\" || !lengths.includes(key.length))\n throw new Error(\"invalid private key\");\n key = key.padStart(nByteLength * 2, \"0\");\n }\n let num2;\n try {\n num2 = typeof key === \"bigint\" ? key : bytesToNumberBE(ensureBytes(\"private key\", key, nByteLength));\n } catch (error) {\n throw new Error(\"invalid private key, expected hex or \" + nByteLength + \" bytes, got \" + typeof key);\n }\n if (wrapPrivateKey)\n num2 = mod(num2, N4);\n aInRange(\"private key\", num2, _1n5, N4);\n return num2;\n }\n function aprjpoint(other) {\n if (!(other instanceof Point3))\n throw new Error(\"ProjectivePoint expected\");\n }\n const toAffineMemo = memoized((p4, iz) => {\n const { px: x4, py: y6, pz: z2 } = p4;\n if (Fp.eql(z2, Fp.ONE))\n return { x: x4, y: y6 };\n const is0 = p4.is0();\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z2);\n const ax = Fp.mul(x4, iz);\n const ay = Fp.mul(y6, iz);\n const zz = Fp.mul(z2, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error(\"invZ was invalid\");\n return { x: ax, y: ay };\n });\n const assertValidMemo = memoized((p4) => {\n if (p4.is0()) {\n if (CURVE.allowInfinityPoint && !Fp.is0(p4.py))\n return;\n throw new Error(\"bad point: ZERO\");\n }\n const { x: x4, y: y6 } = p4.toAffine();\n if (!Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"bad point: x or y not FE\");\n if (!isValidXY(x4, y6))\n throw new Error(\"bad point: equation left != right\");\n if (!p4.isTorsionFree())\n throw new Error(\"bad point: not in prime-order subgroup\");\n return true;\n });\n class Point3 {\n constructor(px, py, pz) {\n if (px == null || !Fp.isValid(px))\n throw new Error(\"x required\");\n if (py == null || !Fp.isValid(py) || Fp.is0(py))\n throw new Error(\"y required\");\n if (pz == null || !Fp.isValid(pz))\n throw new Error(\"z required\");\n this.px = px;\n this.py = py;\n this.pz = pz;\n Object.freeze(this);\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p4) {\n const { x: x4, y: y6 } = p4 || {};\n if (!p4 || !Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"invalid affine point\");\n if (p4 instanceof Point3)\n throw new Error(\"projective point not allowed\");\n const is0 = (i3) => Fp.eql(i3, Fp.ZERO);\n if (is0(x4) && is0(y6))\n return Point3.ZERO;\n return new Point3(x4, y6, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = FpInvertBatch(Fp, points.map((p4) => p4.pz));\n return points.map((p4, i3) => p4.toAffine(toInv[i3])).map(Point3.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P2 = Point3.fromAffine(fromBytes5(ensureBytes(\"pointHex\", hex)));\n P2.assertValidity();\n return P2;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point3.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // Multiscalar Multiplication\n static msm(points, scalars) {\n return pippenger(Point3, Fn, points, scalars);\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n wnaf.setWindowSize(this, windowSize);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n assertValidMemo(this);\n }\n hasEvenY() {\n const { y: y6 } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y6);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n aprjpoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U22 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U22;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point3(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a: a3, b: b4 } = CURVE;\n const b32 = Fp.mul(b4, _3n2);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n let t0 = Fp.mul(X1, X1);\n let t1 = Fp.mul(Y1, Y1);\n let t22 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3);\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a3, Z3);\n Y3 = Fp.mul(b32, t22);\n Y3 = Fp.add(X3, Y3);\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b32, Z3);\n t22 = Fp.mul(a3, t22);\n t3 = Fp.sub(t0, t22);\n t3 = Fp.mul(a3, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0);\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t22);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t22 = Fp.mul(Y1, Z1);\n t22 = Fp.add(t22, t22);\n t0 = Fp.mul(t22, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t22, t1);\n Z3 = Fp.add(Z3, Z3);\n Z3 = Fp.add(Z3, Z3);\n return new Point3(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n aprjpoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n const a3 = CURVE.a;\n const b32 = Fp.mul(CURVE.b, _3n2);\n let t0 = Fp.mul(X1, X2);\n let t1 = Fp.mul(Y1, Y2);\n let t22 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2);\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2);\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t22);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2);\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t22);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a3, t4);\n X3 = Fp.mul(b32, t22);\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0);\n t1 = Fp.add(t1, t0);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.mul(b32, t4);\n t1 = Fp.add(t1, t22);\n t22 = Fp.sub(t0, t22);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.add(t4, t22);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4);\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0);\n return new Point3(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point3.ZERO);\n }\n wNAF(n2) {\n return wnaf.wNAFCached(this, n2, Point3.normalizeZ);\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(sc) {\n const { endo: endo2, n: N4 } = CURVE;\n aInRange(\"scalar\", sc, _0n5, N4);\n const I2 = Point3.ZERO;\n if (sc === _0n5)\n return I2;\n if (this.is0() || sc === _1n5)\n return this;\n if (!endo2 || wnaf.hasPrecomputes(this))\n return wnaf.wNAFCachedUnsafe(this, sc, Point3.normalizeZ);\n let { k1neg, k1, k2neg, k2: k22 } = endo2.splitScalar(sc);\n let k1p = I2;\n let k2p = I2;\n let d5 = this;\n while (k1 > _0n5 || k22 > _0n5) {\n if (k1 & _1n5)\n k1p = k1p.add(d5);\n if (k22 & _1n5)\n k2p = k2p.add(d5);\n d5 = d5.double();\n k1 >>= _1n5;\n k22 >>= _1n5;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point3(Fp.mul(k2p.px, endo2.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n const { endo: endo2, n: N4 } = CURVE;\n aInRange(\"scalar\", scalar, _1n5, N4);\n let point, fake;\n if (endo2) {\n const { k1neg, k1, k2neg, k2: k22 } = endo2.splitScalar(scalar);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k22);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point3(Fp.mul(k2p.px, endo2.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n } else {\n const { p: p4, f: f7 } = this.wNAF(scalar);\n point = p4;\n fake = f7;\n }\n return Point3.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q2, a3, b4) {\n const G = Point3.BASE;\n const mul = (P2, a4) => a4 === _0n5 || a4 === _1n5 || !P2.equals(G) ? P2.multiplyUnsafe(a4) : P2.multiply(a4);\n const sum = mul(this, a3).add(mul(Q2, b4));\n return sum.is0() ? void 0 : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n return toAffineMemo(this, iz);\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n5)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point3, this);\n throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\");\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n5)\n return this;\n if (clearCofactor)\n return clearCofactor(Point3, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n abool(\"isCompressed\", isCompressed);\n this.assertValidity();\n return toBytes6(Point3, this, isCompressed);\n }\n toHex(isCompressed = true) {\n abool(\"isCompressed\", isCompressed);\n return bytesToHex3(this.toRawBytes(isCompressed));\n }\n }\n Point3.BASE = new Point3(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point3.ZERO = new Point3(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const { endo, nBitLength } = CURVE;\n const wnaf = wNAF(Point3, endo ? Math.ceil(nBitLength / 2) : nBitLength);\n return {\n CURVE,\n ProjectivePoint: Point3,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder\n };\n }\n function validateOpts(curve) {\n const opts = validateBasic(curve);\n validateObject(opts, {\n hash: \"hash\",\n hmac: \"function\",\n randomBytes: \"function\"\n }, {\n bits2int: \"function\",\n bits2int_modN: \"function\",\n lowS: \"boolean\"\n });\n return Object.freeze({ lowS: true, ...opts });\n }\n function weierstrass(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER, nByteLength, nBitLength } = CURVE;\n const compressedLen = Fp.BYTES + 1;\n const uncompressedLen = 2 * Fp.BYTES + 1;\n function modN2(a3) {\n return mod(a3, CURVE_ORDER);\n }\n function invN(a3) {\n return invert(a3, CURVE_ORDER);\n }\n const { ProjectivePoint: Point3, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder } = weierstrassPoints({\n ...CURVE,\n toBytes(_c, point, isCompressed) {\n const a3 = point.toAffine();\n const x4 = Fp.toBytes(a3.x);\n const cat = concatBytes3;\n abool(\"isCompressed\", isCompressed);\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 2 : 3]), x4);\n } else {\n return cat(Uint8Array.from([4]), x4, Fp.toBytes(a3.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (len === compressedLen && (head === 2 || head === 3)) {\n const x4 = bytesToNumberBE(tail);\n if (!inRange(x4, _1n5, Fp.ORDER))\n throw new Error(\"Point is not on curve\");\n const y22 = weierstrassEquation(x4);\n let y6;\n try {\n y6 = Fp.sqrt(y22);\n } catch (sqrtError) {\n const suffix = sqrtError instanceof Error ? \": \" + sqrtError.message : \"\";\n throw new Error(\"Point is not on curve\" + suffix);\n }\n const isYOdd = (y6 & _1n5) === _1n5;\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y6 = Fp.neg(y6);\n return { x: x4, y: y6 };\n } else if (len === uncompressedLen && head === 4) {\n const x4 = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y6 = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x: x4, y: y6 };\n } else {\n const cl = compressedLen;\n const ul = uncompressedLen;\n throw new Error(\"invalid Point, expected length of \" + cl + \", or uncompressed \" + ul + \", got \" + len);\n }\n }\n });\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n5;\n return number > HALF;\n }\n function normalizeS(s4) {\n return isBiggerThanHalfOrder(s4) ? modN2(-s4) : s4;\n }\n const slcNum = (b4, from14, to) => bytesToNumberBE(b4.slice(from14, to));\n class Signature {\n constructor(r2, s4, recovery) {\n aInRange(\"r\", r2, _1n5, CURVE_ORDER);\n aInRange(\"s\", s4, _1n5, CURVE_ORDER);\n this.r = r2;\n this.s = s4;\n if (recovery != null)\n this.recovery = recovery;\n Object.freeze(this);\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l6 = nByteLength;\n hex = ensureBytes(\"compactSignature\", hex, l6 * 2);\n return new Signature(slcNum(hex, 0, l6), slcNum(hex, l6, 2 * l6));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r: r2, s: s4 } = DER.toSig(ensureBytes(\"DER\", hex));\n return new Signature(r2, s4);\n }\n /**\n * @todo remove\n * @deprecated\n */\n assertValidity() {\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r: r2, s: s4, recovery: rec } = this;\n const h4 = bits2int_modN(ensureBytes(\"msgHash\", msgHash));\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error(\"recovery id invalid\");\n const radj = rec === 2 || rec === 3 ? r2 + CURVE.n : r2;\n if (radj >= Fp.ORDER)\n throw new Error(\"recovery id 2 or 3 invalid\");\n const prefix = (rec & 1) === 0 ? \"02\" : \"03\";\n const R3 = Point3.fromHex(prefix + numToSizedHex(radj, Fp.BYTES));\n const ir = invN(radj);\n const u1 = modN2(-h4 * ir);\n const u2 = modN2(s4 * ir);\n const Q2 = Point3.BASE.multiplyAndAddUnsafe(R3, u1, u2);\n if (!Q2)\n throw new Error(\"point at infinify\");\n Q2.assertValidity();\n return Q2;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, modN2(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return hexToBytes3(this.toDERHex());\n }\n toDERHex() {\n return DER.hexFromSig(this);\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return hexToBytes3(this.toCompactHex());\n }\n toCompactHex() {\n const l6 = nByteLength;\n return numToSizedHex(this.r, l6) + numToSizedHex(this.s, l6);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n } catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size\n * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.\n */\n randomPrivateKey: () => {\n const length = getMinHashLength(CURVE.n);\n return mapHashToField(CURVE.randomBytes(length), CURVE.n);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point3.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3));\n return point;\n }\n };\n function getPublicKey(privateKey, isCompressed = true) {\n return Point3.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n function isProbPub(item) {\n if (typeof item === \"bigint\")\n return false;\n if (item instanceof Point3)\n return true;\n const arr = ensureBytes(\"key\", item);\n const len = arr.length;\n const fpl = Fp.BYTES;\n const compLen = fpl + 1;\n const uncompLen = 2 * fpl + 1;\n if (CURVE.allowedPrivateKeyLengths || nByteLength === compLen) {\n return void 0;\n } else {\n return len === compLen || len === uncompLen;\n }\n }\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA) === true)\n throw new Error(\"first arg must be private key\");\n if (isProbPub(publicB) === false)\n throw new Error(\"second arg must be public key\");\n const b4 = Point3.fromHex(publicB);\n return b4.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n const bits2int = CURVE.bits2int || function(bytes) {\n if (bytes.length > 8192)\n throw new Error(\"input is too large\");\n const num2 = bytesToNumberBE(bytes);\n const delta = bytes.length * 8 - nBitLength;\n return delta > 0 ? num2 >> BigInt(delta) : num2;\n };\n const bits2int_modN = CURVE.bits2int_modN || function(bytes) {\n return modN2(bits2int(bytes));\n };\n const ORDER_MASK = bitMask(nBitLength);\n function int2octets(num2) {\n aInRange(\"num < 2^\" + nBitLength, num2, _0n5, ORDER_MASK);\n return numberToBytesBE(num2, nByteLength);\n }\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if ([\"recovered\", \"canonical\"].some((k4) => k4 in opts))\n throw new Error(\"sign() legacy options not supported\");\n const { hash: hash3, randomBytes: randomBytes3 } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts;\n if (lowS == null)\n lowS = true;\n msgHash = ensureBytes(\"msgHash\", msgHash);\n validateSigVerOpts(opts);\n if (prehash)\n msgHash = ensureBytes(\"prehashed msgHash\", hash3(msgHash));\n const h1int = bits2int_modN(msgHash);\n const d5 = normPrivateKeyToScalar(privateKey);\n const seedArgs = [int2octets(d5), int2octets(h1int)];\n if (ent != null && ent !== false) {\n const e2 = ent === true ? randomBytes3(Fp.BYTES) : ent;\n seedArgs.push(ensureBytes(\"extraEntropy\", e2));\n }\n const seed = concatBytes3(...seedArgs);\n const m2 = h1int;\n function k2sig(kBytes) {\n const k4 = bits2int(kBytes);\n if (!isWithinCurveOrder(k4))\n return;\n const ik = invN(k4);\n const q3 = Point3.BASE.multiply(k4).toAffine();\n const r2 = modN2(q3.x);\n if (r2 === _0n5)\n return;\n const s4 = modN2(ik * modN2(m2 + r2 * d5));\n if (s4 === _0n5)\n return;\n let recovery = (q3.x === r2 ? 0 : 2) | Number(q3.y & _1n5);\n let normS = s4;\n if (lowS && isBiggerThanHalfOrder(s4)) {\n normS = normalizeS(s4);\n recovery ^= 1;\n }\n return new Signature(r2, normS, recovery);\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n function sign3(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts);\n const C = CURVE;\n const drbg = createHmacDrbg(C.hash.outputLen, C.nByteLength, C.hmac);\n return drbg(seed, k2sig);\n }\n Point3.BASE._setWindowSize(8);\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = ensureBytes(\"msgHash\", msgHash);\n publicKey = ensureBytes(\"publicKey\", publicKey);\n const { lowS, prehash, format } = opts;\n validateSigVerOpts(opts);\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n if (format !== void 0 && format !== \"compact\" && format !== \"der\")\n throw new Error(\"format must be compact or der\");\n const isHex2 = typeof sg === \"string\" || isBytes2(sg);\n const isObj = !isHex2 && !format && typeof sg === \"object\" && sg !== null && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\";\n if (!isHex2 && !isObj)\n throw new Error(\"invalid signature, expected Uint8Array, hex string or Signature instance\");\n let _sig = void 0;\n let P2;\n try {\n if (isObj)\n _sig = new Signature(sg.r, sg.s);\n if (isHex2) {\n try {\n if (format !== \"compact\")\n _sig = Signature.fromDER(sg);\n } catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n }\n if (!_sig && format !== \"der\")\n _sig = Signature.fromCompact(sg);\n }\n P2 = Point3.fromHex(publicKey);\n } catch (error) {\n return false;\n }\n if (!_sig)\n return false;\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r: r2, s: s4 } = _sig;\n const h4 = bits2int_modN(msgHash);\n const is = invN(s4);\n const u1 = modN2(h4 * is);\n const u2 = modN2(r2 * is);\n const R3 = Point3.BASE.multiplyAndAddUnsafe(P2, u1, u2)?.toAffine();\n if (!R3)\n return false;\n const v2 = modN2(R3.x);\n return v2 === r2;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign: sign3,\n verify,\n ProjectivePoint: Point3,\n Signature,\n utils\n };\n }\n function SWUFpSqrtRatio(Fp, Z2) {\n const q3 = Fp.ORDER;\n let l6 = _0n5;\n for (let o5 = q3 - _1n5; o5 % _2n3 === _0n5; o5 /= _2n3)\n l6 += _1n5;\n const c1 = l6;\n const _2n_pow_c1_1 = _2n3 << c1 - _1n5 - _1n5;\n const _2n_pow_c1 = _2n_pow_c1_1 * _2n3;\n const c22 = (q3 - _1n5) / _2n_pow_c1;\n const c32 = (c22 - _1n5) / _2n3;\n const c4 = _2n_pow_c1 - _1n5;\n const c5 = _2n_pow_c1_1;\n const c6 = Fp.pow(Z2, c22);\n const c7 = Fp.pow(Z2, (c22 + _1n5) / _2n3);\n let sqrtRatio = (u2, v2) => {\n let tv1 = c6;\n let tv2 = Fp.pow(v2, c4);\n let tv3 = Fp.sqr(tv2);\n tv3 = Fp.mul(tv3, v2);\n let tv5 = Fp.mul(u2, tv3);\n tv5 = Fp.pow(tv5, c32);\n tv5 = Fp.mul(tv5, tv2);\n tv2 = Fp.mul(tv5, v2);\n tv3 = Fp.mul(tv5, u2);\n let tv4 = Fp.mul(tv3, tv2);\n tv5 = Fp.pow(tv4, c5);\n let isQR = Fp.eql(tv5, Fp.ONE);\n tv2 = Fp.mul(tv3, c7);\n tv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, isQR);\n tv4 = Fp.cmov(tv5, tv4, isQR);\n for (let i3 = c1; i3 > _1n5; i3--) {\n let tv52 = i3 - _2n3;\n tv52 = _2n3 << tv52 - _1n5;\n let tvv5 = Fp.pow(tv4, tv52);\n const e1 = Fp.eql(tvv5, Fp.ONE);\n tv2 = Fp.mul(tv3, tv1);\n tv1 = Fp.mul(tv1, tv1);\n tvv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, e1);\n tv4 = Fp.cmov(tvv5, tv4, e1);\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n2 === _3n2) {\n const c12 = (Fp.ORDER - _3n2) / _4n2;\n const c23 = Fp.sqrt(Fp.neg(Z2));\n sqrtRatio = (u2, v2) => {\n let tv1 = Fp.sqr(v2);\n const tv2 = Fp.mul(u2, v2);\n tv1 = Fp.mul(tv1, tv2);\n let y1 = Fp.pow(tv1, c12);\n y1 = Fp.mul(y1, tv2);\n const y22 = Fp.mul(y1, c23);\n const tv3 = Fp.mul(Fp.sqr(y1), v2);\n const isQR = Fp.eql(tv3, u2);\n let y6 = Fp.cmov(y22, y1, isQR);\n return { isValid: isQR, value: y6 };\n };\n }\n return sqrtRatio;\n }\n function mapToCurveSimpleSWU(Fp, opts) {\n validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error(\"mapToCurveSimpleSWU: invalid opts\");\n const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error(\"Fp.isOdd is not implemented!\");\n return (u2) => {\n let tv1, tv2, tv3, tv4, tv5, tv6, x4, y6;\n tv1 = Fp.sqr(u2);\n tv1 = Fp.mul(tv1, opts.Z);\n tv2 = Fp.sqr(tv1);\n tv2 = Fp.add(tv2, tv1);\n tv3 = Fp.add(tv2, Fp.ONE);\n tv3 = Fp.mul(tv3, opts.B);\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO));\n tv4 = Fp.mul(tv4, opts.A);\n tv2 = Fp.sqr(tv3);\n tv6 = Fp.sqr(tv4);\n tv5 = Fp.mul(tv6, opts.A);\n tv2 = Fp.add(tv2, tv5);\n tv2 = Fp.mul(tv2, tv3);\n tv6 = Fp.mul(tv6, tv4);\n tv5 = Fp.mul(tv6, opts.B);\n tv2 = Fp.add(tv2, tv5);\n x4 = Fp.mul(tv1, tv3);\n const { isValid: isValid2, value } = sqrtRatio(tv2, tv6);\n y6 = Fp.mul(tv1, u2);\n y6 = Fp.mul(y6, value);\n x4 = Fp.cmov(x4, tv3, isValid2);\n y6 = Fp.cmov(y6, value, isValid2);\n const e1 = Fp.isOdd(u2) === Fp.isOdd(y6);\n y6 = Fp.cmov(Fp.neg(y6), y6, e1);\n const tv4_inv = FpInvertBatch(Fp, [tv4], true)[0];\n x4 = Fp.mul(x4, tv4_inv);\n return { x: x4, y: y6 };\n };\n }\n var DERErr, DER, _0n5, _1n5, _2n3, _3n2, _4n2;\n var init_weierstrass = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/weierstrass.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_curve();\n init_modular();\n init_utils5();\n DERErr = class extends Error {\n constructor(m2 = \"\") {\n super(m2);\n }\n };\n DER = {\n // asn.1 DER encoding utils\n Err: DERErr,\n // Basic building block is TLV (Tag-Length-Value)\n _tlv: {\n encode: (tag, data) => {\n const { Err: E2 } = DER;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length & 1)\n throw new E2(\"tlv.encode: unpadded data\");\n const dataLen = data.length / 2;\n const len = numberToHexUnpadded(dataLen);\n if (len.length / 2 & 128)\n throw new E2(\"tlv.encode: long form length too big\");\n const lenLen = dataLen > 127 ? numberToHexUnpadded(len.length / 2 | 128) : \"\";\n const t3 = numberToHexUnpadded(tag);\n return t3 + lenLen + len + data;\n },\n // v - value, l - left bytes (unparsed)\n decode(tag, data) {\n const { Err: E2 } = DER;\n let pos = 0;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length < 2 || data[pos++] !== tag)\n throw new E2(\"tlv.decode: wrong tlv\");\n const first = data[pos++];\n const isLong = !!(first & 128);\n let length = 0;\n if (!isLong)\n length = first;\n else {\n const lenLen = first & 127;\n if (!lenLen)\n throw new E2(\"tlv.decode(long): indefinite length not supported\");\n if (lenLen > 4)\n throw new E2(\"tlv.decode(long): byte length is too big\");\n const lengthBytes = data.subarray(pos, pos + lenLen);\n if (lengthBytes.length !== lenLen)\n throw new E2(\"tlv.decode: length bytes not complete\");\n if (lengthBytes[0] === 0)\n throw new E2(\"tlv.decode(long): zero leftmost byte\");\n for (const b4 of lengthBytes)\n length = length << 8 | b4;\n pos += lenLen;\n if (length < 128)\n throw new E2(\"tlv.decode(long): not minimal encoding\");\n }\n const v2 = data.subarray(pos, pos + length);\n if (v2.length !== length)\n throw new E2(\"tlv.decode: wrong value length\");\n return { v: v2, l: data.subarray(pos + length) };\n }\n },\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n _int: {\n encode(num2) {\n const { Err: E2 } = DER;\n if (num2 < _0n5)\n throw new E2(\"integer: negative integers are not allowed\");\n let hex = numberToHexUnpadded(num2);\n if (Number.parseInt(hex[0], 16) & 8)\n hex = \"00\" + hex;\n if (hex.length & 1)\n throw new E2(\"unexpected DER parsing assertion: unpadded hex\");\n return hex;\n },\n decode(data) {\n const { Err: E2 } = DER;\n if (data[0] & 128)\n throw new E2(\"invalid signature integer: negative\");\n if (data[0] === 0 && !(data[1] & 128))\n throw new E2(\"invalid signature integer: unnecessary leading zero\");\n return bytesToNumberBE(data);\n }\n },\n toSig(hex) {\n const { Err: E2, _int: int, _tlv: tlv } = DER;\n const data = ensureBytes(\"signature\", hex);\n const { v: seqBytes, l: seqLeftBytes } = tlv.decode(48, data);\n if (seqLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n const { v: rBytes, l: rLeftBytes } = tlv.decode(2, seqBytes);\n const { v: sBytes, l: sLeftBytes } = tlv.decode(2, rLeftBytes);\n if (sLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n return { r: int.decode(rBytes), s: int.decode(sBytes) };\n },\n hexFromSig(sig) {\n const { _tlv: tlv, _int: int } = DER;\n const rs = tlv.encode(2, int.encode(sig.r));\n const ss = tlv.encode(2, int.encode(sig.s));\n const seq = rs + ss;\n return tlv.encode(48, seq);\n }\n };\n _0n5 = BigInt(0);\n _1n5 = BigInt(1);\n _2n3 = BigInt(2);\n _3n2 = BigInt(3);\n _4n2 = BigInt(4);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/_shortw_utils.js\n function getHash(hash3) {\n return {\n hash: hash3,\n hmac: (key, ...msgs) => hmac(hash3, key, concatBytes(...msgs)),\n randomBytes\n };\n }\n function createCurve(curveDef, defHash) {\n const create2 = (hash3) => weierstrass({ ...curveDef, ...getHash(hash3) });\n return { ...create2(defHash), create: create2 };\n }\n var init_shortw_utils = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/_shortw_utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hmac();\n init_utils3();\n init_weierstrass();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/hash-to-curve.js\n function i2osp(value, length) {\n anum(value);\n anum(length);\n if (value < 0 || value >= 1 << 8 * length)\n throw new Error(\"invalid I2OSP input: \" + value);\n const res = Array.from({ length }).fill(0);\n for (let i3 = length - 1; i3 >= 0; i3--) {\n res[i3] = value & 255;\n value >>>= 8;\n }\n return new Uint8Array(res);\n }\n function strxor(a3, b4) {\n const arr = new Uint8Array(a3.length);\n for (let i3 = 0; i3 < a3.length; i3++) {\n arr[i3] = a3[i3] ^ b4[i3];\n }\n return arr;\n }\n function anum(item) {\n if (!Number.isSafeInteger(item))\n throw new Error(\"number expected\");\n }\n function expand_message_xmd(msg, DST, lenInBytes, H3) {\n abytes2(msg);\n abytes2(DST);\n anum(lenInBytes);\n if (DST.length > 255)\n DST = H3(concatBytes3(utf8ToBytes2(\"H2C-OVERSIZE-DST-\"), DST));\n const { outputLen: b_in_bytes, blockLen: r_in_bytes } = H3;\n const ell = Math.ceil(lenInBytes / b_in_bytes);\n if (lenInBytes > 65535 || ell > 255)\n throw new Error(\"expand_message_xmd: invalid lenInBytes\");\n const DST_prime = concatBytes3(DST, i2osp(DST.length, 1));\n const Z_pad = i2osp(0, r_in_bytes);\n const l_i_b_str = i2osp(lenInBytes, 2);\n const b4 = new Array(ell);\n const b_0 = H3(concatBytes3(Z_pad, msg, l_i_b_str, i2osp(0, 1), DST_prime));\n b4[0] = H3(concatBytes3(b_0, i2osp(1, 1), DST_prime));\n for (let i3 = 1; i3 <= ell; i3++) {\n const args = [strxor(b_0, b4[i3 - 1]), i2osp(i3 + 1, 1), DST_prime];\n b4[i3] = H3(concatBytes3(...args));\n }\n const pseudo_random_bytes = concatBytes3(...b4);\n return pseudo_random_bytes.slice(0, lenInBytes);\n }\n function expand_message_xof(msg, DST, lenInBytes, k4, H3) {\n abytes2(msg);\n abytes2(DST);\n anum(lenInBytes);\n if (DST.length > 255) {\n const dkLen = Math.ceil(2 * k4 / 8);\n DST = H3.create({ dkLen }).update(utf8ToBytes2(\"H2C-OVERSIZE-DST-\")).update(DST).digest();\n }\n if (lenInBytes > 65535 || DST.length > 255)\n throw new Error(\"expand_message_xof: invalid lenInBytes\");\n return H3.create({ dkLen: lenInBytes }).update(msg).update(i2osp(lenInBytes, 2)).update(DST).update(i2osp(DST.length, 1)).digest();\n }\n function hash_to_field(msg, count, options) {\n validateObject(options, {\n DST: \"stringOrUint8Array\",\n p: \"bigint\",\n m: \"isSafeInteger\",\n k: \"isSafeInteger\",\n hash: \"hash\"\n });\n const { p: p4, k: k4, m: m2, hash: hash3, expand, DST: _DST } = options;\n abytes2(msg);\n anum(count);\n const DST = typeof _DST === \"string\" ? utf8ToBytes2(_DST) : _DST;\n const log2p = p4.toString(2).length;\n const L2 = Math.ceil((log2p + k4) / 8);\n const len_in_bytes = count * m2 * L2;\n let prb;\n if (expand === \"xmd\") {\n prb = expand_message_xmd(msg, DST, len_in_bytes, hash3);\n } else if (expand === \"xof\") {\n prb = expand_message_xof(msg, DST, len_in_bytes, k4, hash3);\n } else if (expand === \"_internal_pass\") {\n prb = msg;\n } else {\n throw new Error('expand must be \"xmd\" or \"xof\"');\n }\n const u2 = new Array(count);\n for (let i3 = 0; i3 < count; i3++) {\n const e2 = new Array(m2);\n for (let j2 = 0; j2 < m2; j2++) {\n const elm_offset = L2 * (j2 + i3 * m2);\n const tv = prb.subarray(elm_offset, elm_offset + L2);\n e2[j2] = mod(os2ip(tv), p4);\n }\n u2[i3] = e2;\n }\n return u2;\n }\n function isogenyMap(field, map) {\n const coeff = map.map((i3) => Array.from(i3).reverse());\n return (x4, y6) => {\n const [xn, xd, yn, yd] = coeff.map((val) => val.reduce((acc, i3) => field.add(field.mul(acc, x4), i3)));\n const [xd_inv, yd_inv] = FpInvertBatch(field, [xd, yd], true);\n x4 = field.mul(xn, xd_inv);\n y6 = field.mul(y6, field.mul(yn, yd_inv));\n return { x: x4, y: y6 };\n };\n }\n function createHasher2(Point3, mapToCurve, defaults) {\n if (typeof mapToCurve !== \"function\")\n throw new Error(\"mapToCurve() must be defined\");\n function map(num2) {\n return Point3.fromAffine(mapToCurve(num2));\n }\n function clear(initial) {\n const P2 = initial.clearCofactor();\n if (P2.equals(Point3.ZERO))\n return Point3.ZERO;\n P2.assertValidity();\n return P2;\n }\n return {\n defaults,\n // Encodes byte string to elliptic curve.\n // hash_to_curve from https://www.rfc-editor.org/rfc/rfc9380#section-3\n hashToCurve(msg, options) {\n const u2 = hash_to_field(msg, 2, { ...defaults, DST: defaults.DST, ...options });\n const u0 = map(u2[0]);\n const u1 = map(u2[1]);\n return clear(u0.add(u1));\n },\n // Encodes byte string to elliptic curve.\n // encode_to_curve from https://www.rfc-editor.org/rfc/rfc9380#section-3\n encodeToCurve(msg, options) {\n const u2 = hash_to_field(msg, 1, { ...defaults, DST: defaults.encodeDST, ...options });\n return clear(map(u2[0]));\n },\n // Same as encodeToCurve, but without hash\n mapToCurve(scalars) {\n if (!Array.isArray(scalars))\n throw new Error(\"expected array of bigints\");\n for (const i3 of scalars)\n if (typeof i3 !== \"bigint\")\n throw new Error(\"expected array of bigints\");\n return clear(map(scalars));\n }\n };\n }\n var os2ip;\n var init_hash_to_curve = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/hash-to-curve.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_modular();\n init_utils5();\n os2ip = bytesToNumberBE;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/secp256k1.js\n var secp256k1_exports = {};\n __export(secp256k1_exports, {\n encodeToCurve: () => encodeToCurve,\n hashToCurve: () => hashToCurve,\n schnorr: () => schnorr,\n secp256k1: () => secp256k1,\n secp256k1_hasher: () => secp256k1_hasher\n });\n function sqrtMod(y6) {\n const P2 = secp256k1P;\n const _3n5 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b22 = y6 * y6 * y6 % P2;\n const b32 = b22 * b22 * y6 % P2;\n const b6 = pow2(b32, _3n5, P2) * b32 % P2;\n const b9 = pow2(b6, _3n5, P2) * b32 % P2;\n const b11 = pow2(b9, _2n4, P2) * b22 % P2;\n const b222 = pow2(b11, _11n, P2) * b11 % P2;\n const b44 = pow2(b222, _22n, P2) * b222 % P2;\n const b88 = pow2(b44, _44n, P2) * b44 % P2;\n const b176 = pow2(b88, _88n, P2) * b88 % P2;\n const b220 = pow2(b176, _44n, P2) * b44 % P2;\n const b223 = pow2(b220, _3n5, P2) * b32 % P2;\n const t1 = pow2(b223, _23n, P2) * b222 % P2;\n const t22 = pow2(t1, _6n, P2) * b22 % P2;\n const root = pow2(t22, _2n4, P2);\n if (!Fpk1.eql(Fpk1.sqr(root), y6))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n function taggedHash(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === void 0) {\n const tagH = sha256(Uint8Array.from(tag, (c4) => c4.charCodeAt(0)));\n tagP = concatBytes3(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes3(tagP, ...messages));\n }\n function schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv);\n let p4 = Point.fromPrivateKey(d_);\n const scalar = p4.hasEvenY() ? d_ : modN(-d_);\n return { scalar, bytes: pointToBytes(p4) };\n }\n function lift_x(x4) {\n aInRange(\"x\", x4, _1n6, secp256k1P);\n const xx = modP(x4 * x4);\n const c4 = modP(xx * x4 + BigInt(7));\n let y6 = sqrtMod(c4);\n if (y6 % _2n4 !== _0n6)\n y6 = modP(-y6);\n const p4 = new Point(x4, y6, _1n6);\n p4.assertValidity();\n return p4;\n }\n function challenge(...args) {\n return modN(num(taggedHash(\"BIP0340/challenge\", ...args)));\n }\n function schnorrGetPublicKey(privateKey) {\n return schnorrGetExtPubKey(privateKey).bytes;\n }\n function schnorrSign(message, privateKey, auxRand = randomBytes(32)) {\n const m2 = ensureBytes(\"message\", message);\n const { bytes: px, scalar: d5 } = schnorrGetExtPubKey(privateKey);\n const a3 = ensureBytes(\"auxRand\", auxRand, 32);\n const t3 = numTo32b(d5 ^ num(taggedHash(\"BIP0340/aux\", a3)));\n const rand = taggedHash(\"BIP0340/nonce\", t3, px, m2);\n const k_ = modN(num(rand));\n if (k_ === _0n6)\n throw new Error(\"sign failed: k is zero\");\n const { bytes: rx, scalar: k4 } = schnorrGetExtPubKey(k_);\n const e2 = challenge(rx, px, m2);\n const sig = new Uint8Array(64);\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k4 + e2 * d5)), 32);\n if (!schnorrVerify(sig, m2, px))\n throw new Error(\"sign: Invalid signature produced\");\n return sig;\n }\n function schnorrVerify(signature, message, publicKey) {\n const sig = ensureBytes(\"signature\", signature, 64);\n const m2 = ensureBytes(\"message\", message);\n const pub = ensureBytes(\"publicKey\", publicKey, 32);\n try {\n const P2 = lift_x(num(pub));\n const r2 = num(sig.subarray(0, 32));\n if (!inRange(r2, _1n6, secp256k1P))\n return false;\n const s4 = num(sig.subarray(32, 64));\n if (!inRange(s4, _1n6, secp256k1N))\n return false;\n const e2 = challenge(numTo32b(r2), pointToBytes(P2), m2);\n const R3 = GmulAdd(P2, s4, modN(-e2));\n if (!R3 || !R3.hasEvenY() || R3.toAffine().x !== r2)\n return false;\n return true;\n } catch (error) {\n return false;\n }\n }\n var secp256k1P, secp256k1N, _0n6, _1n6, _2n4, divNearest, Fpk1, secp256k1, TAGGED_HASH_PREFIXES, pointToBytes, numTo32b, modP, modN, Point, GmulAdd, num, schnorr, isoMap, mapSWU, secp256k1_hasher, hashToCurve, encodeToCurve;\n var init_secp256k1 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/secp256k1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha2();\n init_utils3();\n init_shortw_utils();\n init_hash_to_curve();\n init_modular();\n init_utils5();\n init_weierstrass();\n secp256k1P = BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\");\n secp256k1N = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n _0n6 = BigInt(0);\n _1n6 = BigInt(1);\n _2n4 = BigInt(2);\n divNearest = (a3, b4) => (a3 + b4 / _2n4) / b4;\n Fpk1 = Field(secp256k1P, void 0, void 0, { sqrt: sqrtMod });\n secp256k1 = createCurve({\n a: _0n6,\n b: BigInt(7),\n Fp: Fpk1,\n n: secp256k1N,\n Gx: BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),\n Gy: BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),\n h: BigInt(1),\n lowS: true,\n // Allow only low-S signatures by default in sign() and verify()\n endo: {\n // Endomorphism, see above\n beta: BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),\n splitScalar: (k4) => {\n const n2 = secp256k1N;\n const a1 = BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\");\n const b1 = -_1n6 * BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\");\n const a22 = BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\");\n const b22 = a1;\n const POW_2_128 = BigInt(\"0x100000000000000000000000000000000\");\n const c1 = divNearest(b22 * k4, n2);\n const c22 = divNearest(-b1 * k4, n2);\n let k1 = mod(k4 - c1 * a1 - c22 * a22, n2);\n let k22 = mod(-c1 * b1 - c22 * b22, n2);\n const k1neg = k1 > POW_2_128;\n const k2neg = k22 > POW_2_128;\n if (k1neg)\n k1 = n2 - k1;\n if (k2neg)\n k22 = n2 - k22;\n if (k1 > POW_2_128 || k22 > POW_2_128) {\n throw new Error(\"splitScalar: Endomorphism failed, k=\" + k4);\n }\n return { k1neg, k1, k2neg, k2: k22 };\n }\n }\n }, sha256);\n TAGGED_HASH_PREFIXES = {};\n pointToBytes = (point) => point.toRawBytes(true).slice(1);\n numTo32b = (n2) => numberToBytesBE(n2, 32);\n modP = (x4) => mod(x4, secp256k1P);\n modN = (x4) => mod(x4, secp256k1N);\n Point = /* @__PURE__ */ (() => secp256k1.ProjectivePoint)();\n GmulAdd = (Q2, a3, b4) => Point.BASE.multiplyAndAddUnsafe(Q2, a3, b4);\n num = bytesToNumberBE;\n schnorr = /* @__PURE__ */ (() => ({\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n utils: {\n randomPrivateKey: secp256k1.utils.randomPrivateKey,\n lift_x,\n pointToBytes,\n numberToBytesBE,\n bytesToNumberBE,\n taggedHash,\n mod\n }\n }))();\n isoMap = /* @__PURE__ */ (() => isogenyMap(Fpk1, [\n // xNum\n [\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7\",\n \"0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581\",\n \"0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262\",\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c\"\n ],\n // xDen\n [\n \"0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b\",\n \"0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ],\n // yNum\n [\n \"0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c\",\n \"0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3\",\n \"0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931\",\n \"0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84\"\n ],\n // yDen\n [\n \"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b\",\n \"0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573\",\n \"0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ]\n ].map((i3) => i3.map((j2) => BigInt(j2)))))();\n mapSWU = /* @__PURE__ */ (() => mapToCurveSimpleSWU(Fpk1, {\n A: BigInt(\"0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533\"),\n B: BigInt(\"1771\"),\n Z: Fpk1.create(BigInt(\"-11\"))\n }))();\n secp256k1_hasher = /* @__PURE__ */ (() => createHasher2(secp256k1.ProjectivePoint, (scalars) => {\n const { x: x4, y: y6 } = mapSWU(Fpk1.create(scalars[0]));\n return isoMap(x4, y6);\n }, {\n DST: \"secp256k1_XMD:SHA-256_SSWU_RO_\",\n encodeDST: \"secp256k1_XMD:SHA-256_SSWU_NU_\",\n p: Fpk1.ORDER,\n m: 1,\n k: 128,\n expand: \"xmd\",\n hash: sha256\n }))();\n hashToCurve = /* @__PURE__ */ (() => secp256k1_hasher.hashToCurve)();\n encodeToCurve = /* @__PURE__ */ (() => secp256k1_hasher.encodeToCurve)();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/recoverPublicKey.js\n async function recoverPublicKey({ hash: hash3, signature }) {\n const hashHex = isHex(hash3) ? hash3 : toHex(hash3);\n const { secp256k1: secp256k12 } = await Promise.resolve().then(() => (init_secp256k1(), secp256k1_exports));\n const signature_ = (() => {\n if (typeof signature === \"object\" && \"r\" in signature && \"s\" in signature) {\n const { r: r2, s: s4, v: v2, yParity } = signature;\n const yParityOrV2 = Number(yParity ?? v2);\n const recoveryBit2 = toRecoveryBit(yParityOrV2);\n return new secp256k12.Signature(hexToBigInt(r2), hexToBigInt(s4)).addRecoveryBit(recoveryBit2);\n }\n const signatureHex = isHex(signature) ? signature : toHex(signature);\n if (size(signatureHex) !== 65)\n throw new Error(\"invalid signature length\");\n const yParityOrV = hexToNumber(`0x${signatureHex.slice(130)}`);\n const recoveryBit = toRecoveryBit(yParityOrV);\n return secp256k12.Signature.fromCompact(signatureHex.substring(2, 130)).addRecoveryBit(recoveryBit);\n })();\n const publicKey = signature_.recoverPublicKey(hashHex.substring(2)).toHex(false);\n return `0x${publicKey}`;\n }\n function toRecoveryBit(yParityOrV) {\n if (yParityOrV === 0 || yParityOrV === 1)\n return yParityOrV;\n if (yParityOrV === 27)\n return 0;\n if (yParityOrV === 28)\n return 1;\n throw new Error(\"Invalid yParityOrV value\");\n }\n var init_recoverPublicKey = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/recoverPublicKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isHex();\n init_size();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/recoverAddress.js\n async function recoverAddress({ hash: hash3, signature }) {\n return publicKeyToAddress(await recoverPublicKey({ hash: hash3, signature }));\n }\n var init_recoverAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/recoverAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_publicKeyToAddress();\n init_recoverPublicKey();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toRlp.js\n function toRlp(bytes, to = \"hex\") {\n const encodable = getEncodable(bytes);\n const cursor = createCursor(new Uint8Array(encodable.length));\n encodable.encode(cursor);\n if (to === \"hex\")\n return bytesToHex(cursor.bytes);\n return cursor.bytes;\n }\n function getEncodable(bytes) {\n if (Array.isArray(bytes))\n return getEncodableList(bytes.map((x4) => getEncodable(x4)));\n return getEncodableBytes(bytes);\n }\n function getEncodableList(list) {\n const bodyLength = list.reduce((acc, x4) => acc + x4.length, 0);\n const sizeOfBodyLength = getSizeOfLength(bodyLength);\n const length = (() => {\n if (bodyLength <= 55)\n return 1 + bodyLength;\n return 1 + sizeOfBodyLength + bodyLength;\n })();\n return {\n length,\n encode(cursor) {\n if (bodyLength <= 55) {\n cursor.pushByte(192 + bodyLength);\n } else {\n cursor.pushByte(192 + 55 + sizeOfBodyLength);\n if (sizeOfBodyLength === 1)\n cursor.pushUint8(bodyLength);\n else if (sizeOfBodyLength === 2)\n cursor.pushUint16(bodyLength);\n else if (sizeOfBodyLength === 3)\n cursor.pushUint24(bodyLength);\n else\n cursor.pushUint32(bodyLength);\n }\n for (const { encode: encode5 } of list) {\n encode5(cursor);\n }\n }\n };\n }\n function getEncodableBytes(bytesOrHex) {\n const bytes = typeof bytesOrHex === \"string\" ? hexToBytes(bytesOrHex) : bytesOrHex;\n const sizeOfBytesLength = getSizeOfLength(bytes.length);\n const length = (() => {\n if (bytes.length === 1 && bytes[0] < 128)\n return 1;\n if (bytes.length <= 55)\n return 1 + bytes.length;\n return 1 + sizeOfBytesLength + bytes.length;\n })();\n return {\n length,\n encode(cursor) {\n if (bytes.length === 1 && bytes[0] < 128) {\n cursor.pushBytes(bytes);\n } else if (bytes.length <= 55) {\n cursor.pushByte(128 + bytes.length);\n cursor.pushBytes(bytes);\n } else {\n cursor.pushByte(128 + 55 + sizeOfBytesLength);\n if (sizeOfBytesLength === 1)\n cursor.pushUint8(bytes.length);\n else if (sizeOfBytesLength === 2)\n cursor.pushUint16(bytes.length);\n else if (sizeOfBytesLength === 3)\n cursor.pushUint24(bytes.length);\n else\n cursor.pushUint32(bytes.length);\n cursor.pushBytes(bytes);\n }\n }\n };\n }\n function getSizeOfLength(length) {\n if (length < 2 ** 8)\n return 1;\n if (length < 2 ** 16)\n return 2;\n if (length < 2 ** 24)\n return 3;\n if (length < 2 ** 32)\n return 4;\n throw new BaseError2(\"Length is too large.\");\n }\n var init_toRlp = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toRlp.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_cursor2();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/hashAuthorization.js\n function hashAuthorization(parameters) {\n const { chainId, nonce, to } = parameters;\n const address = parameters.contractAddress ?? parameters.address;\n const hash3 = keccak256(concatHex([\n \"0x05\",\n toRlp([\n chainId ? numberToHex(chainId) : \"0x\",\n address,\n nonce ? numberToHex(nonce) : \"0x\"\n ])\n ]));\n if (to === \"bytes\")\n return hexToBytes(hash3);\n return hash3;\n }\n var init_hashAuthorization = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/hashAuthorization.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_concat();\n init_toBytes();\n init_toHex();\n init_toRlp();\n init_keccak256();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/recoverAuthorizationAddress.js\n async function recoverAuthorizationAddress(parameters) {\n const { authorization, signature } = parameters;\n return recoverAddress({\n hash: hashAuthorization(authorization),\n signature: signature ?? authorization\n });\n }\n var init_recoverAuthorizationAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/recoverAuthorizationAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_recoverAddress();\n init_hashAuthorization();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/estimateGas.js\n var EstimateGasExecutionError;\n var init_estimateGas = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/estimateGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatEther();\n init_formatGwei();\n init_base();\n init_transaction();\n EstimateGasExecutionError = class extends BaseError2 {\n constructor(cause, { account, docsPath: docsPath8, chain: chain2, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value }) {\n const prettyArgs = prettyPrint({\n from: account?.address,\n to,\n value: typeof value !== \"undefined\" && `${formatEther(value)} ${chain2?.nativeCurrency?.symbol || \"ETH\"}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== \"undefined\" && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== \"undefined\" && `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== \"undefined\" && `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce\n });\n super(cause.shortMessage, {\n cause,\n docsPath: docsPath8,\n metaMessages: [\n ...cause.metaMessages ? [...cause.metaMessages, \" \"] : [],\n \"Estimate Gas Arguments:\",\n prettyArgs\n ].filter(Boolean),\n name: \"EstimateGasExecutionError\"\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/node.js\n var ExecutionRevertedError, FeeCapTooHighError, FeeCapTooLowError, NonceTooHighError, NonceTooLowError, NonceMaxValueError, InsufficientFundsError, IntrinsicGasTooHighError, IntrinsicGasTooLowError, TransactionTypeNotSupportedError, TipAboveFeeCapError, UnknownNodeError;\n var init_node = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/node.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatGwei();\n init_base();\n ExecutionRevertedError = class extends BaseError2 {\n constructor({ cause, message } = {}) {\n const reason = message?.replace(\"execution reverted: \", \"\")?.replace(\"execution reverted\", \"\");\n super(`Execution reverted ${reason ? `with reason: ${reason}` : \"for an unknown reason\"}.`, {\n cause,\n name: \"ExecutionRevertedError\"\n });\n }\n };\n Object.defineProperty(ExecutionRevertedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 3\n });\n Object.defineProperty(ExecutionRevertedError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /execution reverted/\n });\n FeeCapTooHighError = class extends BaseError2 {\n constructor({ cause, maxFeePerGas } = {}) {\n super(`The fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : \"\"}) cannot be higher than the maximum allowed value (2^256-1).`, {\n cause,\n name: \"FeeCapTooHighError\"\n });\n }\n };\n Object.defineProperty(FeeCapTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max fee per gas higher than 2\\^256-1|fee cap higher than 2\\^256-1/\n });\n FeeCapTooLowError = class extends BaseError2 {\n constructor({ cause, maxFeePerGas } = {}) {\n super(`The fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)}` : \"\"} gwei) cannot be lower than the block base fee.`, {\n cause,\n name: \"FeeCapTooLowError\"\n });\n }\n };\n Object.defineProperty(FeeCapTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/\n });\n NonceTooHighError = class extends BaseError2 {\n constructor({ cause, nonce } = {}) {\n super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : \"\"}is higher than the next one expected.`, { cause, name: \"NonceTooHighError\" });\n }\n };\n Object.defineProperty(NonceTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce too high/\n });\n NonceTooLowError = class extends BaseError2 {\n constructor({ cause, nonce } = {}) {\n super([\n `Nonce provided for the transaction ${nonce ? `(${nonce}) ` : \"\"}is lower than the current nonce of the account.`,\n \"Try increasing the nonce or find the latest nonce with `getTransactionCount`.\"\n ].join(\"\\n\"), { cause, name: \"NonceTooLowError\" });\n }\n };\n Object.defineProperty(NonceTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce too low|transaction already imported|already known/\n });\n NonceMaxValueError = class extends BaseError2 {\n constructor({ cause, nonce } = {}) {\n super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : \"\"}exceeds the maximum allowed nonce.`, { cause, name: \"NonceMaxValueError\" });\n }\n };\n Object.defineProperty(NonceMaxValueError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce has max value/\n });\n InsufficientFundsError = class extends BaseError2 {\n constructor({ cause } = {}) {\n super([\n \"The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.\"\n ].join(\"\\n\"), {\n cause,\n metaMessages: [\n \"This error could arise when the account does not have enough funds to:\",\n \" - pay for the total gas fee,\",\n \" - pay for the value to send.\",\n \" \",\n \"The cost of the transaction is calculated as `gas * gas fee + value`, where:\",\n \" - `gas` is the amount of gas needed for transaction to execute,\",\n \" - `gas fee` is the gas fee,\",\n \" - `value` is the amount of ether to send to the recipient.\"\n ],\n name: \"InsufficientFundsError\"\n });\n }\n };\n Object.defineProperty(InsufficientFundsError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /insufficient funds|exceeds transaction sender account balance/\n });\n IntrinsicGasTooHighError = class extends BaseError2 {\n constructor({ cause, gas } = {}) {\n super(`The amount of gas ${gas ? `(${gas}) ` : \"\"}provided for the transaction exceeds the limit allowed for the block.`, {\n cause,\n name: \"IntrinsicGasTooHighError\"\n });\n }\n };\n Object.defineProperty(IntrinsicGasTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /intrinsic gas too high|gas limit reached/\n });\n IntrinsicGasTooLowError = class extends BaseError2 {\n constructor({ cause, gas } = {}) {\n super(`The amount of gas ${gas ? `(${gas}) ` : \"\"}provided for the transaction is too low.`, {\n cause,\n name: \"IntrinsicGasTooLowError\"\n });\n }\n };\n Object.defineProperty(IntrinsicGasTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /intrinsic gas too low/\n });\n TransactionTypeNotSupportedError = class extends BaseError2 {\n constructor({ cause }) {\n super(\"The transaction type is not supported for this chain.\", {\n cause,\n name: \"TransactionTypeNotSupportedError\"\n });\n }\n };\n Object.defineProperty(TransactionTypeNotSupportedError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /transaction type not valid/\n });\n TipAboveFeeCapError = class extends BaseError2 {\n constructor({ cause, maxPriorityFeePerGas, maxFeePerGas } = {}) {\n super([\n `The provided tip (\\`maxPriorityFeePerGas\\`${maxPriorityFeePerGas ? ` = ${formatGwei(maxPriorityFeePerGas)} gwei` : \"\"}) cannot be higher than the fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : \"\"}).`\n ].join(\"\\n\"), {\n cause,\n name: \"TipAboveFeeCapError\"\n });\n }\n };\n Object.defineProperty(TipAboveFeeCapError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/\n });\n UnknownNodeError = class extends BaseError2 {\n constructor({ cause }) {\n super(`An error occurred while executing: ${cause?.shortMessage}`, {\n cause,\n name: \"UnknownNodeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getNodeError.js\n function getNodeError(err, args) {\n const message = (err.details || \"\").toLowerCase();\n const executionRevertedError = err instanceof BaseError2 ? err.walk((e2) => e2?.code === ExecutionRevertedError.code) : err;\n if (executionRevertedError instanceof BaseError2)\n return new ExecutionRevertedError({\n cause: err,\n message: executionRevertedError.details\n });\n if (ExecutionRevertedError.nodeMessage.test(message))\n return new ExecutionRevertedError({\n cause: err,\n message: err.details\n });\n if (FeeCapTooHighError.nodeMessage.test(message))\n return new FeeCapTooHighError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas\n });\n if (FeeCapTooLowError.nodeMessage.test(message))\n return new FeeCapTooLowError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas\n });\n if (NonceTooHighError.nodeMessage.test(message))\n return new NonceTooHighError({ cause: err, nonce: args?.nonce });\n if (NonceTooLowError.nodeMessage.test(message))\n return new NonceTooLowError({ cause: err, nonce: args?.nonce });\n if (NonceMaxValueError.nodeMessage.test(message))\n return new NonceMaxValueError({ cause: err, nonce: args?.nonce });\n if (InsufficientFundsError.nodeMessage.test(message))\n return new InsufficientFundsError({ cause: err });\n if (IntrinsicGasTooHighError.nodeMessage.test(message))\n return new IntrinsicGasTooHighError({ cause: err, gas: args?.gas });\n if (IntrinsicGasTooLowError.nodeMessage.test(message))\n return new IntrinsicGasTooLowError({ cause: err, gas: args?.gas });\n if (TransactionTypeNotSupportedError.nodeMessage.test(message))\n return new TransactionTypeNotSupportedError({ cause: err });\n if (TipAboveFeeCapError.nodeMessage.test(message))\n return new TipAboveFeeCapError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n maxPriorityFeePerGas: args?.maxPriorityFeePerGas\n });\n return new UnknownNodeError({\n cause: err\n });\n }\n var init_getNodeError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getNodeError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_node();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getEstimateGasError.js\n function getEstimateGasError(err, { docsPath: docsPath8, ...args }) {\n const cause = (() => {\n const cause2 = getNodeError(err, args);\n if (cause2 instanceof UnknownNodeError)\n return err;\n return cause2;\n })();\n return new EstimateGasExecutionError(cause, {\n docsPath: docsPath8,\n ...args\n });\n }\n var init_getEstimateGasError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getEstimateGasError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_estimateGas();\n init_node();\n init_getNodeError();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/extract.js\n function extract(value_, { format }) {\n if (!format)\n return {};\n const value = {};\n function extract_(formatted2) {\n const keys = Object.keys(formatted2);\n for (const key of keys) {\n if (key in value_)\n value[key] = value_[key];\n if (formatted2[key] && typeof formatted2[key] === \"object\" && !Array.isArray(formatted2[key]))\n extract_(formatted2[key]);\n }\n }\n const formatted = format(value_ || {});\n extract_(formatted);\n return value;\n }\n var init_extract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/extract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/formatter.js\n function defineFormatter(type, format) {\n return ({ exclude, format: overrides }) => {\n return {\n exclude,\n format: (args, action) => {\n const formatted = format(args, action);\n if (exclude) {\n for (const key of exclude) {\n delete formatted[key];\n }\n }\n return {\n ...formatted,\n ...overrides(args, action)\n };\n },\n type\n };\n };\n }\n var init_formatter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/formatter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transactionRequest.js\n function formatTransactionRequest(request, _2) {\n const rpcRequest = {};\n if (typeof request.authorizationList !== \"undefined\")\n rpcRequest.authorizationList = formatAuthorizationList(request.authorizationList);\n if (typeof request.accessList !== \"undefined\")\n rpcRequest.accessList = request.accessList;\n if (typeof request.blobVersionedHashes !== \"undefined\")\n rpcRequest.blobVersionedHashes = request.blobVersionedHashes;\n if (typeof request.blobs !== \"undefined\") {\n if (typeof request.blobs[0] !== \"string\")\n rpcRequest.blobs = request.blobs.map((x4) => bytesToHex(x4));\n else\n rpcRequest.blobs = request.blobs;\n }\n if (typeof request.data !== \"undefined\")\n rpcRequest.data = request.data;\n if (request.account)\n rpcRequest.from = request.account.address;\n if (typeof request.from !== \"undefined\")\n rpcRequest.from = request.from;\n if (typeof request.gas !== \"undefined\")\n rpcRequest.gas = numberToHex(request.gas);\n if (typeof request.gasPrice !== \"undefined\")\n rpcRequest.gasPrice = numberToHex(request.gasPrice);\n if (typeof request.maxFeePerBlobGas !== \"undefined\")\n rpcRequest.maxFeePerBlobGas = numberToHex(request.maxFeePerBlobGas);\n if (typeof request.maxFeePerGas !== \"undefined\")\n rpcRequest.maxFeePerGas = numberToHex(request.maxFeePerGas);\n if (typeof request.maxPriorityFeePerGas !== \"undefined\")\n rpcRequest.maxPriorityFeePerGas = numberToHex(request.maxPriorityFeePerGas);\n if (typeof request.nonce !== \"undefined\")\n rpcRequest.nonce = numberToHex(request.nonce);\n if (typeof request.to !== \"undefined\")\n rpcRequest.to = request.to;\n if (typeof request.type !== \"undefined\")\n rpcRequest.type = rpcTransactionType[request.type];\n if (typeof request.value !== \"undefined\")\n rpcRequest.value = numberToHex(request.value);\n return rpcRequest;\n }\n function formatAuthorizationList(authorizationList) {\n return authorizationList.map((authorization) => ({\n address: authorization.address,\n r: authorization.r ? numberToHex(BigInt(authorization.r)) : authorization.r,\n s: authorization.s ? numberToHex(BigInt(authorization.s)) : authorization.s,\n chainId: numberToHex(authorization.chainId),\n nonce: numberToHex(authorization.nonce),\n ...typeof authorization.yParity !== \"undefined\" ? { yParity: numberToHex(authorization.yParity) } : {},\n ...typeof authorization.v !== \"undefined\" && typeof authorization.yParity === \"undefined\" ? { v: numberToHex(authorization.v) } : {}\n }));\n }\n var rpcTransactionType;\n var init_transactionRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transactionRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n rpcTransactionType = {\n legacy: \"0x0\",\n eip2930: \"0x1\",\n eip1559: \"0x2\",\n eip4844: \"0x3\",\n eip7702: \"0x4\"\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/stateOverride.js\n function serializeStateMapping(stateMapping) {\n if (!stateMapping || stateMapping.length === 0)\n return void 0;\n return stateMapping.reduce((acc, { slot, value }) => {\n if (slot.length !== 66)\n throw new InvalidBytesLengthError({\n size: slot.length,\n targetSize: 66,\n type: \"hex\"\n });\n if (value.length !== 66)\n throw new InvalidBytesLengthError({\n size: value.length,\n targetSize: 66,\n type: \"hex\"\n });\n acc[slot] = value;\n return acc;\n }, {});\n }\n function serializeAccountStateOverride(parameters) {\n const { balance, nonce, state, stateDiff, code } = parameters;\n const rpcAccountStateOverride = {};\n if (code !== void 0)\n rpcAccountStateOverride.code = code;\n if (balance !== void 0)\n rpcAccountStateOverride.balance = numberToHex(balance);\n if (nonce !== void 0)\n rpcAccountStateOverride.nonce = numberToHex(nonce);\n if (state !== void 0)\n rpcAccountStateOverride.state = serializeStateMapping(state);\n if (stateDiff !== void 0) {\n if (rpcAccountStateOverride.state)\n throw new StateAssignmentConflictError();\n rpcAccountStateOverride.stateDiff = serializeStateMapping(stateDiff);\n }\n return rpcAccountStateOverride;\n }\n function serializeStateOverride(parameters) {\n if (!parameters)\n return void 0;\n const rpcStateOverride = {};\n for (const { address, ...accountState } of parameters) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n if (rpcStateOverride[address])\n throw new AccountStateConflictError({ address });\n rpcStateOverride[address] = serializeAccountStateOverride(accountState);\n }\n return rpcStateOverride;\n }\n var init_stateOverride2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/stateOverride.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_data();\n init_stateOverride();\n init_isAddress();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/number.js\n var maxInt8, maxInt16, maxInt24, maxInt32, maxInt40, maxInt48, maxInt56, maxInt64, maxInt72, maxInt80, maxInt88, maxInt96, maxInt104, maxInt112, maxInt120, maxInt128, maxInt136, maxInt144, maxInt152, maxInt160, maxInt168, maxInt176, maxInt184, maxInt192, maxInt200, maxInt208, maxInt216, maxInt224, maxInt232, maxInt240, maxInt248, maxInt256, minInt8, minInt16, minInt24, minInt32, minInt40, minInt48, minInt56, minInt64, minInt72, minInt80, minInt88, minInt96, minInt104, minInt112, minInt120, minInt128, minInt136, minInt144, minInt152, minInt160, minInt168, minInt176, minInt184, minInt192, minInt200, minInt208, minInt216, minInt224, minInt232, minInt240, minInt248, minInt256, maxUint8, maxUint16, maxUint24, maxUint32, maxUint40, maxUint48, maxUint56, maxUint64, maxUint72, maxUint80, maxUint88, maxUint96, maxUint104, maxUint112, maxUint120, maxUint128, maxUint136, maxUint144, maxUint152, maxUint160, maxUint168, maxUint176, maxUint184, maxUint192, maxUint200, maxUint208, maxUint216, maxUint224, maxUint232, maxUint240, maxUint248, maxUint256;\n var init_number = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/number.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n maxInt8 = 2n ** (8n - 1n) - 1n;\n maxInt16 = 2n ** (16n - 1n) - 1n;\n maxInt24 = 2n ** (24n - 1n) - 1n;\n maxInt32 = 2n ** (32n - 1n) - 1n;\n maxInt40 = 2n ** (40n - 1n) - 1n;\n maxInt48 = 2n ** (48n - 1n) - 1n;\n maxInt56 = 2n ** (56n - 1n) - 1n;\n maxInt64 = 2n ** (64n - 1n) - 1n;\n maxInt72 = 2n ** (72n - 1n) - 1n;\n maxInt80 = 2n ** (80n - 1n) - 1n;\n maxInt88 = 2n ** (88n - 1n) - 1n;\n maxInt96 = 2n ** (96n - 1n) - 1n;\n maxInt104 = 2n ** (104n - 1n) - 1n;\n maxInt112 = 2n ** (112n - 1n) - 1n;\n maxInt120 = 2n ** (120n - 1n) - 1n;\n maxInt128 = 2n ** (128n - 1n) - 1n;\n maxInt136 = 2n ** (136n - 1n) - 1n;\n maxInt144 = 2n ** (144n - 1n) - 1n;\n maxInt152 = 2n ** (152n - 1n) - 1n;\n maxInt160 = 2n ** (160n - 1n) - 1n;\n maxInt168 = 2n ** (168n - 1n) - 1n;\n maxInt176 = 2n ** (176n - 1n) - 1n;\n maxInt184 = 2n ** (184n - 1n) - 1n;\n maxInt192 = 2n ** (192n - 1n) - 1n;\n maxInt200 = 2n ** (200n - 1n) - 1n;\n maxInt208 = 2n ** (208n - 1n) - 1n;\n maxInt216 = 2n ** (216n - 1n) - 1n;\n maxInt224 = 2n ** (224n - 1n) - 1n;\n maxInt232 = 2n ** (232n - 1n) - 1n;\n maxInt240 = 2n ** (240n - 1n) - 1n;\n maxInt248 = 2n ** (248n - 1n) - 1n;\n maxInt256 = 2n ** (256n - 1n) - 1n;\n minInt8 = -(2n ** (8n - 1n));\n minInt16 = -(2n ** (16n - 1n));\n minInt24 = -(2n ** (24n - 1n));\n minInt32 = -(2n ** (32n - 1n));\n minInt40 = -(2n ** (40n - 1n));\n minInt48 = -(2n ** (48n - 1n));\n minInt56 = -(2n ** (56n - 1n));\n minInt64 = -(2n ** (64n - 1n));\n minInt72 = -(2n ** (72n - 1n));\n minInt80 = -(2n ** (80n - 1n));\n minInt88 = -(2n ** (88n - 1n));\n minInt96 = -(2n ** (96n - 1n));\n minInt104 = -(2n ** (104n - 1n));\n minInt112 = -(2n ** (112n - 1n));\n minInt120 = -(2n ** (120n - 1n));\n minInt128 = -(2n ** (128n - 1n));\n minInt136 = -(2n ** (136n - 1n));\n minInt144 = -(2n ** (144n - 1n));\n minInt152 = -(2n ** (152n - 1n));\n minInt160 = -(2n ** (160n - 1n));\n minInt168 = -(2n ** (168n - 1n));\n minInt176 = -(2n ** (176n - 1n));\n minInt184 = -(2n ** (184n - 1n));\n minInt192 = -(2n ** (192n - 1n));\n minInt200 = -(2n ** (200n - 1n));\n minInt208 = -(2n ** (208n - 1n));\n minInt216 = -(2n ** (216n - 1n));\n minInt224 = -(2n ** (224n - 1n));\n minInt232 = -(2n ** (232n - 1n));\n minInt240 = -(2n ** (240n - 1n));\n minInt248 = -(2n ** (248n - 1n));\n minInt256 = -(2n ** (256n - 1n));\n maxUint8 = 2n ** 8n - 1n;\n maxUint16 = 2n ** 16n - 1n;\n maxUint24 = 2n ** 24n - 1n;\n maxUint32 = 2n ** 32n - 1n;\n maxUint40 = 2n ** 40n - 1n;\n maxUint48 = 2n ** 48n - 1n;\n maxUint56 = 2n ** 56n - 1n;\n maxUint64 = 2n ** 64n - 1n;\n maxUint72 = 2n ** 72n - 1n;\n maxUint80 = 2n ** 80n - 1n;\n maxUint88 = 2n ** 88n - 1n;\n maxUint96 = 2n ** 96n - 1n;\n maxUint104 = 2n ** 104n - 1n;\n maxUint112 = 2n ** 112n - 1n;\n maxUint120 = 2n ** 120n - 1n;\n maxUint128 = 2n ** 128n - 1n;\n maxUint136 = 2n ** 136n - 1n;\n maxUint144 = 2n ** 144n - 1n;\n maxUint152 = 2n ** 152n - 1n;\n maxUint160 = 2n ** 160n - 1n;\n maxUint168 = 2n ** 168n - 1n;\n maxUint176 = 2n ** 176n - 1n;\n maxUint184 = 2n ** 184n - 1n;\n maxUint192 = 2n ** 192n - 1n;\n maxUint200 = 2n ** 200n - 1n;\n maxUint208 = 2n ** 208n - 1n;\n maxUint216 = 2n ** 216n - 1n;\n maxUint224 = 2n ** 224n - 1n;\n maxUint232 = 2n ** 232n - 1n;\n maxUint240 = 2n ** 240n - 1n;\n maxUint248 = 2n ** 248n - 1n;\n maxUint256 = 2n ** 256n - 1n;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/assertRequest.js\n function assertRequest(args) {\n const { account: account_, gasPrice, maxFeePerGas, maxPriorityFeePerGas, to } = args;\n const account = account_ ? parseAccount(account_) : void 0;\n if (account && !isAddress(account.address))\n throw new InvalidAddressError({ address: account.address });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (typeof gasPrice !== \"undefined\" && (typeof maxFeePerGas !== \"undefined\" || typeof maxPriorityFeePerGas !== \"undefined\"))\n throw new FeeConflictError();\n if (maxFeePerGas && maxFeePerGas > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas });\n if (maxPriorityFeePerGas && maxFeePerGas && maxPriorityFeePerGas > maxFeePerGas)\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });\n }\n var init_assertRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/assertRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_number();\n init_address();\n init_node();\n init_transaction();\n init_isAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/fee.js\n var BaseFeeScalarError, Eip1559FeesNotSupportedError, MaxFeePerGasTooLowError;\n var init_fee = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/fee.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatGwei();\n init_base();\n BaseFeeScalarError = class extends BaseError2 {\n constructor() {\n super(\"`baseFeeMultiplier` must be greater than 1.\", {\n name: \"BaseFeeScalarError\"\n });\n }\n };\n Eip1559FeesNotSupportedError = class extends BaseError2 {\n constructor() {\n super(\"Chain does not support EIP-1559 fees.\", {\n name: \"Eip1559FeesNotSupportedError\"\n });\n }\n };\n MaxFeePerGasTooLowError = class extends BaseError2 {\n constructor({ maxPriorityFeePerGas }) {\n super(`\\`maxFeePerGas\\` cannot be less than the \\`maxPriorityFeePerGas\\` (${formatGwei(maxPriorityFeePerGas)} gwei).`, { name: \"MaxFeePerGasTooLowError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/block.js\n var BlockNotFoundError;\n var init_block = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/block.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n BlockNotFoundError = class extends BaseError2 {\n constructor({ blockHash, blockNumber }) {\n let identifier = \"Block\";\n if (blockHash)\n identifier = `Block at hash \"${blockHash}\"`;\n if (blockNumber)\n identifier = `Block at number \"${blockNumber}\"`;\n super(`${identifier} could not be found.`, { name: \"BlockNotFoundError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transaction.js\n function formatTransaction(transaction, _2) {\n const transaction_ = {\n ...transaction,\n blockHash: transaction.blockHash ? transaction.blockHash : null,\n blockNumber: transaction.blockNumber ? BigInt(transaction.blockNumber) : null,\n chainId: transaction.chainId ? hexToNumber(transaction.chainId) : void 0,\n gas: transaction.gas ? BigInt(transaction.gas) : void 0,\n gasPrice: transaction.gasPrice ? BigInt(transaction.gasPrice) : void 0,\n maxFeePerBlobGas: transaction.maxFeePerBlobGas ? BigInt(transaction.maxFeePerBlobGas) : void 0,\n maxFeePerGas: transaction.maxFeePerGas ? BigInt(transaction.maxFeePerGas) : void 0,\n maxPriorityFeePerGas: transaction.maxPriorityFeePerGas ? BigInt(transaction.maxPriorityFeePerGas) : void 0,\n nonce: transaction.nonce ? hexToNumber(transaction.nonce) : void 0,\n to: transaction.to ? transaction.to : null,\n transactionIndex: transaction.transactionIndex ? Number(transaction.transactionIndex) : null,\n type: transaction.type ? transactionType[transaction.type] : void 0,\n typeHex: transaction.type ? transaction.type : void 0,\n value: transaction.value ? BigInt(transaction.value) : void 0,\n v: transaction.v ? BigInt(transaction.v) : void 0\n };\n if (transaction.authorizationList)\n transaction_.authorizationList = formatAuthorizationList2(transaction.authorizationList);\n transaction_.yParity = (() => {\n if (transaction.yParity)\n return Number(transaction.yParity);\n if (typeof transaction_.v === \"bigint\") {\n if (transaction_.v === 0n || transaction_.v === 27n)\n return 0;\n if (transaction_.v === 1n || transaction_.v === 28n)\n return 1;\n if (transaction_.v >= 35n)\n return transaction_.v % 2n === 0n ? 1 : 0;\n }\n return void 0;\n })();\n if (transaction_.type === \"legacy\") {\n delete transaction_.accessList;\n delete transaction_.maxFeePerBlobGas;\n delete transaction_.maxFeePerGas;\n delete transaction_.maxPriorityFeePerGas;\n delete transaction_.yParity;\n }\n if (transaction_.type === \"eip2930\") {\n delete transaction_.maxFeePerBlobGas;\n delete transaction_.maxFeePerGas;\n delete transaction_.maxPriorityFeePerGas;\n }\n if (transaction_.type === \"eip1559\") {\n delete transaction_.maxFeePerBlobGas;\n }\n return transaction_;\n }\n function formatAuthorizationList2(authorizationList) {\n return authorizationList.map((authorization) => ({\n address: authorization.address,\n chainId: Number(authorization.chainId),\n nonce: Number(authorization.nonce),\n r: authorization.r,\n s: authorization.s,\n yParity: Number(authorization.yParity)\n }));\n }\n var transactionType, defineTransaction;\n var init_transaction2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_formatter();\n transactionType = {\n \"0x0\": \"legacy\",\n \"0x1\": \"eip2930\",\n \"0x2\": \"eip1559\",\n \"0x3\": \"eip4844\",\n \"0x4\": \"eip7702\"\n };\n defineTransaction = /* @__PURE__ */ defineFormatter(\"transaction\", formatTransaction);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/block.js\n function formatBlock(block, _2) {\n const transactions = (block.transactions ?? []).map((transaction) => {\n if (typeof transaction === \"string\")\n return transaction;\n return formatTransaction(transaction);\n });\n return {\n ...block,\n baseFeePerGas: block.baseFeePerGas ? BigInt(block.baseFeePerGas) : null,\n blobGasUsed: block.blobGasUsed ? BigInt(block.blobGasUsed) : void 0,\n difficulty: block.difficulty ? BigInt(block.difficulty) : void 0,\n excessBlobGas: block.excessBlobGas ? BigInt(block.excessBlobGas) : void 0,\n gasLimit: block.gasLimit ? BigInt(block.gasLimit) : void 0,\n gasUsed: block.gasUsed ? BigInt(block.gasUsed) : void 0,\n hash: block.hash ? block.hash : null,\n logsBloom: block.logsBloom ? block.logsBloom : null,\n nonce: block.nonce ? block.nonce : null,\n number: block.number ? BigInt(block.number) : null,\n size: block.size ? BigInt(block.size) : void 0,\n timestamp: block.timestamp ? BigInt(block.timestamp) : void 0,\n transactions,\n totalDifficulty: block.totalDifficulty ? BigInt(block.totalDifficulty) : null\n };\n }\n var defineBlock;\n var init_block2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/block.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatter();\n init_transaction2();\n defineBlock = /* @__PURE__ */ defineFormatter(\"block\", formatBlock);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlock.js\n async function getBlock(client, { blockHash, blockNumber, blockTag = client.experimental_blockTag ?? \"latest\", includeTransactions: includeTransactions_ } = {}) {\n const includeTransactions = includeTransactions_ ?? false;\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n let block = null;\n if (blockHash) {\n block = await client.request({\n method: \"eth_getBlockByHash\",\n params: [blockHash, includeTransactions]\n }, { dedupe: true });\n } else {\n block = await client.request({\n method: \"eth_getBlockByNumber\",\n params: [blockNumberHex || blockTag, includeTransactions]\n }, { dedupe: Boolean(blockNumberHex) });\n }\n if (!block)\n throw new BlockNotFoundError({ blockHash, blockNumber });\n const format = client.chain?.formatters?.block?.format || formatBlock;\n return format(block, \"getBlock\");\n }\n var init_getBlock = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlock.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_block();\n init_toHex();\n init_block2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getGasPrice.js\n async function getGasPrice(client) {\n const gasPrice = await client.request({\n method: \"eth_gasPrice\"\n });\n return BigInt(gasPrice);\n }\n var init_getGasPrice = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getGasPrice.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateMaxPriorityFeePerGas.js\n async function estimateMaxPriorityFeePerGas(client, args) {\n return internal_estimateMaxPriorityFeePerGas(client, args);\n }\n async function internal_estimateMaxPriorityFeePerGas(client, args) {\n const { block: block_, chain: chain2 = client.chain, request } = args || {};\n try {\n const maxPriorityFeePerGas = chain2?.fees?.maxPriorityFeePerGas ?? chain2?.fees?.defaultPriorityFee;\n if (typeof maxPriorityFeePerGas === \"function\") {\n const block = block_ || await getAction(client, getBlock, \"getBlock\")({});\n const maxPriorityFeePerGas_ = await maxPriorityFeePerGas({\n block,\n client,\n request\n });\n if (maxPriorityFeePerGas_ === null)\n throw new Error();\n return maxPriorityFeePerGas_;\n }\n if (typeof maxPriorityFeePerGas !== \"undefined\")\n return maxPriorityFeePerGas;\n const maxPriorityFeePerGasHex = await client.request({\n method: \"eth_maxPriorityFeePerGas\"\n });\n return hexToBigInt(maxPriorityFeePerGasHex);\n } catch {\n const [block, gasPrice] = await Promise.all([\n block_ ? Promise.resolve(block_) : getAction(client, getBlock, \"getBlock\")({}),\n getAction(client, getGasPrice, \"getGasPrice\")({})\n ]);\n if (typeof block.baseFeePerGas !== \"bigint\")\n throw new Eip1559FeesNotSupportedError();\n const maxPriorityFeePerGas = gasPrice - block.baseFeePerGas;\n if (maxPriorityFeePerGas < 0n)\n return 0n;\n return maxPriorityFeePerGas;\n }\n }\n var init_estimateMaxPriorityFeePerGas = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateMaxPriorityFeePerGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fee();\n init_fromHex();\n init_getAction();\n init_getBlock();\n init_getGasPrice();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateFeesPerGas.js\n async function estimateFeesPerGas(client, args) {\n return internal_estimateFeesPerGas(client, args);\n }\n async function internal_estimateFeesPerGas(client, args) {\n const { block: block_, chain: chain2 = client.chain, request, type = \"eip1559\" } = args || {};\n const baseFeeMultiplier = await (async () => {\n if (typeof chain2?.fees?.baseFeeMultiplier === \"function\")\n return chain2.fees.baseFeeMultiplier({\n block: block_,\n client,\n request\n });\n return chain2?.fees?.baseFeeMultiplier ?? 1.2;\n })();\n if (baseFeeMultiplier < 1)\n throw new BaseFeeScalarError();\n const decimals = baseFeeMultiplier.toString().split(\".\")[1]?.length ?? 0;\n const denominator = 10 ** decimals;\n const multiply = (base4) => base4 * BigInt(Math.ceil(baseFeeMultiplier * denominator)) / BigInt(denominator);\n const block = block_ ? block_ : await getAction(client, getBlock, \"getBlock\")({});\n if (typeof chain2?.fees?.estimateFeesPerGas === \"function\") {\n const fees = await chain2.fees.estimateFeesPerGas({\n block: block_,\n client,\n multiply,\n request,\n type\n });\n if (fees !== null)\n return fees;\n }\n if (type === \"eip1559\") {\n if (typeof block.baseFeePerGas !== \"bigint\")\n throw new Eip1559FeesNotSupportedError();\n const maxPriorityFeePerGas = typeof request?.maxPriorityFeePerGas === \"bigint\" ? request.maxPriorityFeePerGas : await internal_estimateMaxPriorityFeePerGas(client, {\n block,\n chain: chain2,\n request\n });\n const baseFeePerGas = multiply(block.baseFeePerGas);\n const maxFeePerGas = request?.maxFeePerGas ?? baseFeePerGas + maxPriorityFeePerGas;\n return {\n maxFeePerGas,\n maxPriorityFeePerGas\n };\n }\n const gasPrice = request?.gasPrice ?? multiply(await getAction(client, getGasPrice, \"getGasPrice\")({}));\n return {\n gasPrice\n };\n }\n var init_estimateFeesPerGas = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateFeesPerGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fee();\n init_getAction();\n init_estimateMaxPriorityFeePerGas();\n init_getBlock();\n init_getGasPrice();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionCount.js\n async function getTransactionCount(client, { address, blockTag = \"latest\", blockNumber }) {\n const count = await client.request({\n method: \"eth_getTransactionCount\",\n params: [\n address,\n typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : blockTag\n ]\n }, {\n dedupe: Boolean(blockNumber)\n });\n return hexToNumber(count);\n }\n var init_getTransactionCount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionCount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/blobsToCommitments.js\n function blobsToCommitments(parameters) {\n const { kzg } = parameters;\n const to = parameters.to ?? (typeof parameters.blobs[0] === \"string\" ? \"hex\" : \"bytes\");\n const blobs = typeof parameters.blobs[0] === \"string\" ? parameters.blobs.map((x4) => hexToBytes(x4)) : parameters.blobs;\n const commitments = [];\n for (const blob of blobs)\n commitments.push(Uint8Array.from(kzg.blobToKzgCommitment(blob)));\n return to === \"bytes\" ? commitments : commitments.map((x4) => bytesToHex(x4));\n }\n var init_blobsToCommitments = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/blobsToCommitments.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/blobsToProofs.js\n function blobsToProofs(parameters) {\n const { kzg } = parameters;\n const to = parameters.to ?? (typeof parameters.blobs[0] === \"string\" ? \"hex\" : \"bytes\");\n const blobs = typeof parameters.blobs[0] === \"string\" ? parameters.blobs.map((x4) => hexToBytes(x4)) : parameters.blobs;\n const commitments = typeof parameters.commitments[0] === \"string\" ? parameters.commitments.map((x4) => hexToBytes(x4)) : parameters.commitments;\n const proofs = [];\n for (let i3 = 0; i3 < blobs.length; i3++) {\n const blob = blobs[i3];\n const commitment = commitments[i3];\n proofs.push(Uint8Array.from(kzg.computeBlobKzgProof(blob, commitment)));\n }\n return to === \"bytes\" ? proofs : proofs.map((x4) => bytesToHex(x4));\n }\n var init_blobsToProofs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/blobsToProofs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js\n var sha2562;\n var init_sha256 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha2();\n sha2562 = sha256;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/sha256.js\n function sha2563(value, to_) {\n const to = to_ || \"hex\";\n const bytes = sha2562(isHex(value, { strict: false }) ? toBytes(value) : value);\n if (to === \"bytes\")\n return bytes;\n return toHex(bytes);\n }\n var init_sha2562 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/sha256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha256();\n init_isHex();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js\n function commitmentToVersionedHash(parameters) {\n const { commitment, version: version7 = 1 } = parameters;\n const to = parameters.to ?? (typeof commitment === \"string\" ? \"hex\" : \"bytes\");\n const versionedHash = sha2563(commitment, \"bytes\");\n versionedHash.set([version7], 0);\n return to === \"bytes\" ? versionedHash : bytesToHex(versionedHash);\n }\n var init_commitmentToVersionedHash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_sha2562();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js\n function commitmentsToVersionedHashes(parameters) {\n const { commitments, version: version7 } = parameters;\n const to = parameters.to ?? (typeof commitments[0] === \"string\" ? \"hex\" : \"bytes\");\n const hashes = [];\n for (const commitment of commitments) {\n hashes.push(commitmentToVersionedHash({\n commitment,\n to,\n version: version7\n }));\n }\n return hashes;\n }\n var init_commitmentsToVersionedHashes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_commitmentToVersionedHash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/blob.js\n var blobsPerTransaction, bytesPerFieldElement, fieldElementsPerBlob, bytesPerBlob, maxBytesPerTransaction;\n var init_blob = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/blob.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n blobsPerTransaction = 6;\n bytesPerFieldElement = 32;\n fieldElementsPerBlob = 4096;\n bytesPerBlob = bytesPerFieldElement * fieldElementsPerBlob;\n maxBytesPerTransaction = bytesPerBlob * blobsPerTransaction - // terminator byte (0x80).\n 1 - // zero byte (0x00) appended to each field element.\n 1 * fieldElementsPerBlob * blobsPerTransaction;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/kzg.js\n var versionedHashVersionKzg;\n var init_kzg = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/kzg.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n versionedHashVersionKzg = 1;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/blob.js\n var BlobSizeTooLargeError, EmptyBlobError, InvalidVersionedHashSizeError, InvalidVersionedHashVersionError;\n var init_blob2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/blob.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_kzg();\n init_base();\n BlobSizeTooLargeError = class extends BaseError2 {\n constructor({ maxSize, size: size6 }) {\n super(\"Blob size is too large.\", {\n metaMessages: [`Max: ${maxSize} bytes`, `Given: ${size6} bytes`],\n name: \"BlobSizeTooLargeError\"\n });\n }\n };\n EmptyBlobError = class extends BaseError2 {\n constructor() {\n super(\"Blob data must not be empty.\", { name: \"EmptyBlobError\" });\n }\n };\n InvalidVersionedHashSizeError = class extends BaseError2 {\n constructor({ hash: hash3, size: size6 }) {\n super(`Versioned hash \"${hash3}\" size is invalid.`, {\n metaMessages: [\"Expected: 32\", `Received: ${size6}`],\n name: \"InvalidVersionedHashSizeError\"\n });\n }\n };\n InvalidVersionedHashVersionError = class extends BaseError2 {\n constructor({ hash: hash3, version: version7 }) {\n super(`Versioned hash \"${hash3}\" version is invalid.`, {\n metaMessages: [\n `Expected: ${versionedHashVersionKzg}`,\n `Received: ${version7}`\n ],\n name: \"InvalidVersionedHashVersionError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/toBlobs.js\n function toBlobs(parameters) {\n const to = parameters.to ?? (typeof parameters.data === \"string\" ? \"hex\" : \"bytes\");\n const data = typeof parameters.data === \"string\" ? hexToBytes(parameters.data) : parameters.data;\n const size_ = size(data);\n if (!size_)\n throw new EmptyBlobError();\n if (size_ > maxBytesPerTransaction)\n throw new BlobSizeTooLargeError({\n maxSize: maxBytesPerTransaction,\n size: size_\n });\n const blobs = [];\n let active = true;\n let position = 0;\n while (active) {\n const blob = createCursor(new Uint8Array(bytesPerBlob));\n let size6 = 0;\n while (size6 < fieldElementsPerBlob) {\n const bytes = data.slice(position, position + (bytesPerFieldElement - 1));\n blob.pushByte(0);\n blob.pushBytes(bytes);\n if (bytes.length < 31) {\n blob.pushByte(128);\n active = false;\n break;\n }\n size6++;\n position += 31;\n }\n blobs.push(blob);\n }\n return to === \"bytes\" ? blobs.map((x4) => x4.bytes) : blobs.map((x4) => bytesToHex(x4.bytes));\n }\n var init_toBlobs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/toBlobs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_blob();\n init_blob2();\n init_cursor2();\n init_size();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/toBlobSidecars.js\n function toBlobSidecars(parameters) {\n const { data, kzg, to } = parameters;\n const blobs = parameters.blobs ?? toBlobs({ data, to });\n const commitments = parameters.commitments ?? blobsToCommitments({ blobs, kzg, to });\n const proofs = parameters.proofs ?? blobsToProofs({ blobs, commitments, kzg, to });\n const sidecars = [];\n for (let i3 = 0; i3 < blobs.length; i3++)\n sidecars.push({\n blob: blobs[i3],\n commitment: commitments[i3],\n proof: proofs[i3]\n });\n return sidecars;\n }\n var init_toBlobSidecars = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/toBlobSidecars.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_blobsToCommitments();\n init_blobsToProofs();\n init_toBlobs();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/getTransactionType.js\n function getTransactionType(transaction) {\n if (transaction.type)\n return transaction.type;\n if (typeof transaction.authorizationList !== \"undefined\")\n return \"eip7702\";\n if (typeof transaction.blobs !== \"undefined\" || typeof transaction.blobVersionedHashes !== \"undefined\" || typeof transaction.maxFeePerBlobGas !== \"undefined\" || typeof transaction.sidecars !== \"undefined\")\n return \"eip4844\";\n if (typeof transaction.maxFeePerGas !== \"undefined\" || typeof transaction.maxPriorityFeePerGas !== \"undefined\") {\n return \"eip1559\";\n }\n if (typeof transaction.gasPrice !== \"undefined\") {\n if (typeof transaction.accessList !== \"undefined\")\n return \"eip2930\";\n return \"legacy\";\n }\n throw new InvalidSerializableTransactionError({ transaction });\n }\n var init_getTransactionType = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/getTransactionType.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getChainId.js\n async function getChainId(client) {\n const chainIdHex = await client.request({\n method: \"eth_chainId\"\n }, { dedupe: true });\n return hexToNumber(chainIdHex);\n }\n var init_getChainId = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getChainId.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/prepareTransactionRequest.js\n async function prepareTransactionRequest(client, args) {\n const { account: account_ = client.account, blobs, chain: chain2, gas, kzg, nonce, nonceManager, parameters = defaultParameters, type } = args;\n const account = account_ ? parseAccount(account_) : account_;\n const request = { ...args, ...account ? { from: account?.address } : {} };\n let block;\n async function getBlock2() {\n if (block)\n return block;\n block = await getAction(client, getBlock, \"getBlock\")({ blockTag: \"latest\" });\n return block;\n }\n let chainId;\n async function getChainId2() {\n if (chainId)\n return chainId;\n if (chain2)\n return chain2.id;\n if (typeof args.chainId !== \"undefined\")\n return args.chainId;\n const chainId_ = await getAction(client, getChainId, \"getChainId\")({});\n chainId = chainId_;\n return chainId;\n }\n if (parameters.includes(\"nonce\") && typeof nonce === \"undefined\" && account) {\n if (nonceManager) {\n const chainId2 = await getChainId2();\n request.nonce = await nonceManager.consume({\n address: account.address,\n chainId: chainId2,\n client\n });\n } else {\n request.nonce = await getAction(client, getTransactionCount, \"getTransactionCount\")({\n address: account.address,\n blockTag: \"pending\"\n });\n }\n }\n if ((parameters.includes(\"blobVersionedHashes\") || parameters.includes(\"sidecars\")) && blobs && kzg) {\n const commitments = blobsToCommitments({ blobs, kzg });\n if (parameters.includes(\"blobVersionedHashes\")) {\n const versionedHashes = commitmentsToVersionedHashes({\n commitments,\n to: \"hex\"\n });\n request.blobVersionedHashes = versionedHashes;\n }\n if (parameters.includes(\"sidecars\")) {\n const proofs = blobsToProofs({ blobs, commitments, kzg });\n const sidecars = toBlobSidecars({\n blobs,\n commitments,\n proofs,\n to: \"hex\"\n });\n request.sidecars = sidecars;\n }\n }\n if (parameters.includes(\"chainId\"))\n request.chainId = await getChainId2();\n if ((parameters.includes(\"fees\") || parameters.includes(\"type\")) && typeof type === \"undefined\") {\n try {\n request.type = getTransactionType(request);\n } catch {\n let isEip1559Network = eip1559NetworkCache.get(client.uid);\n if (typeof isEip1559Network === \"undefined\") {\n const block2 = await getBlock2();\n isEip1559Network = typeof block2?.baseFeePerGas === \"bigint\";\n eip1559NetworkCache.set(client.uid, isEip1559Network);\n }\n request.type = isEip1559Network ? \"eip1559\" : \"legacy\";\n }\n }\n if (parameters.includes(\"fees\")) {\n if (request.type !== \"legacy\" && request.type !== \"eip2930\") {\n if (typeof request.maxFeePerGas === \"undefined\" || typeof request.maxPriorityFeePerGas === \"undefined\") {\n const block2 = await getBlock2();\n const { maxFeePerGas, maxPriorityFeePerGas } = await internal_estimateFeesPerGas(client, {\n block: block2,\n chain: chain2,\n request\n });\n if (typeof args.maxPriorityFeePerGas === \"undefined\" && args.maxFeePerGas && args.maxFeePerGas < maxPriorityFeePerGas)\n throw new MaxFeePerGasTooLowError({\n maxPriorityFeePerGas\n });\n request.maxPriorityFeePerGas = maxPriorityFeePerGas;\n request.maxFeePerGas = maxFeePerGas;\n }\n } else {\n if (typeof args.maxFeePerGas !== \"undefined\" || typeof args.maxPriorityFeePerGas !== \"undefined\")\n throw new Eip1559FeesNotSupportedError();\n if (typeof args.gasPrice === \"undefined\") {\n const block2 = await getBlock2();\n const { gasPrice: gasPrice_ } = await internal_estimateFeesPerGas(client, {\n block: block2,\n chain: chain2,\n request,\n type: \"legacy\"\n });\n request.gasPrice = gasPrice_;\n }\n }\n }\n if (parameters.includes(\"gas\") && typeof gas === \"undefined\")\n request.gas = await getAction(client, estimateGas, \"estimateGas\")({\n ...request,\n account,\n prepare: account?.type === \"local\" ? [] : [\"blobVersionedHashes\"]\n });\n assertRequest(request);\n delete request.parameters;\n return request;\n }\n var defaultParameters, eip1559NetworkCache;\n var init_prepareTransactionRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/prepareTransactionRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_estimateFeesPerGas();\n init_estimateGas2();\n init_getBlock();\n init_getTransactionCount();\n init_fee();\n init_blobsToCommitments();\n init_blobsToProofs();\n init_commitmentsToVersionedHashes();\n init_toBlobSidecars();\n init_getAction();\n init_assertRequest();\n init_getTransactionType();\n init_getChainId();\n defaultParameters = [\n \"blobVersionedHashes\",\n \"chainId\",\n \"fees\",\n \"gas\",\n \"nonce\",\n \"type\"\n ];\n eip1559NetworkCache = /* @__PURE__ */ new Map();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateGas.js\n async function estimateGas(client, args) {\n const { account: account_ = client.account, prepare = true } = args;\n const account = account_ ? parseAccount(account_) : void 0;\n const parameters = (() => {\n if (Array.isArray(prepare))\n return prepare;\n if (account?.type !== \"local\")\n return [\"blobVersionedHashes\"];\n return void 0;\n })();\n try {\n const { accessList, authorizationList, blobs, blobVersionedHashes, blockNumber, blockTag, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, value, stateOverride, ...rest } = prepare ? await prepareTransactionRequest(client, {\n ...args,\n parameters\n }) : args;\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const rpcStateOverride = serializeStateOverride(stateOverride);\n const to = await (async () => {\n if (rest.to)\n return rest.to;\n if (authorizationList && authorizationList.length > 0)\n return await recoverAuthorizationAddress({\n authorization: authorizationList[0]\n }).catch(() => {\n throw new BaseError2(\"`to` is required. Could not infer from `authorizationList`\");\n });\n return void 0;\n })();\n assertRequest(args);\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n account,\n accessList,\n authorizationList,\n blobs,\n blobVersionedHashes,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n value\n }, \"estimateGas\");\n return BigInt(await client.request({\n method: \"eth_estimateGas\",\n params: rpcStateOverride ? [\n request,\n block ?? client.experimental_blockTag ?? \"latest\",\n rpcStateOverride\n ] : block ? [request, block] : [request]\n }));\n } catch (err) {\n throw getEstimateGasError(err, {\n ...args,\n account,\n chain: client.chain\n });\n }\n }\n var init_estimateGas2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_base();\n init_recoverAuthorizationAddress();\n init_toHex();\n init_getEstimateGasError();\n init_extract();\n init_transactionRequest();\n init_stateOverride2();\n init_assertRequest();\n init_prepareTransactionRequest();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateContractGas.js\n async function estimateContractGas(client, parameters) {\n const { abi: abi2, address, args, functionName, dataSuffix, ...request } = parameters;\n const data = encodeFunctionData({\n abi: abi2,\n args,\n functionName\n });\n try {\n const gas = await getAction(client, estimateGas, \"estimateGas\")({\n data: `${data}${dataSuffix ? dataSuffix.replace(\"0x\", \"\") : \"\"}`,\n to: address,\n ...request\n });\n return gas;\n } catch (error) {\n const account = request.account ? parseAccount(request.account) : void 0;\n throw getContractError(error, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/estimateContractGas\",\n functionName,\n sender: account?.address\n });\n }\n }\n var init_estimateContractGas = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateContractGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_encodeFunctionData();\n init_getContractError();\n init_getAction();\n init_estimateGas2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/isAddressEqual.js\n function isAddressEqual(a3, b4) {\n if (!isAddress(a3, { strict: false }))\n throw new InvalidAddressError({ address: a3 });\n if (!isAddress(b4, { strict: false }))\n throw new InvalidAddressError({ address: b4 });\n return a3.toLowerCase() === b4.toLowerCase();\n }\n var init_isAddressEqual = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/isAddressEqual.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_isAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeEventLog.js\n function decodeEventLog(parameters) {\n const { abi: abi2, data, strict: strict_, topics } = parameters;\n const strict = strict_ ?? true;\n const [signature, ...argTopics] = topics;\n if (!signature)\n throw new AbiEventSignatureEmptyTopicsError({ docsPath: docsPath3 });\n const abiItem = abi2.find((x4) => x4.type === \"event\" && signature === toEventSelector(formatAbiItem2(x4)));\n if (!(abiItem && \"name\" in abiItem) || abiItem.type !== \"event\")\n throw new AbiEventSignatureNotFoundError(signature, { docsPath: docsPath3 });\n const { name, inputs } = abiItem;\n const isUnnamed = inputs?.some((x4) => !(\"name\" in x4 && x4.name));\n const args = isUnnamed ? [] : {};\n const indexedInputs = inputs.map((x4, i3) => [x4, i3]).filter(([x4]) => \"indexed\" in x4 && x4.indexed);\n for (let i3 = 0; i3 < indexedInputs.length; i3++) {\n const [param, argIndex] = indexedInputs[i3];\n const topic = argTopics[i3];\n if (!topic)\n throw new DecodeLogTopicsMismatch({\n abiItem,\n param\n });\n args[isUnnamed ? argIndex : param.name || argIndex] = decodeTopic({\n param,\n value: topic\n });\n }\n const nonIndexedInputs = inputs.filter((x4) => !(\"indexed\" in x4 && x4.indexed));\n if (nonIndexedInputs.length > 0) {\n if (data && data !== \"0x\") {\n try {\n const decodedData = decodeAbiParameters(nonIndexedInputs, data);\n if (decodedData) {\n if (isUnnamed)\n for (let i3 = 0; i3 < inputs.length; i3++)\n args[i3] = args[i3] ?? decodedData.shift();\n else\n for (let i3 = 0; i3 < nonIndexedInputs.length; i3++)\n args[nonIndexedInputs[i3].name] = decodedData[i3];\n }\n } catch (err) {\n if (strict) {\n if (err instanceof AbiDecodingDataSizeTooSmallError || err instanceof PositionOutOfBoundsError)\n throw new DecodeLogDataMismatch({\n abiItem,\n data,\n params: nonIndexedInputs,\n size: size(data)\n });\n throw err;\n }\n }\n } else if (strict) {\n throw new DecodeLogDataMismatch({\n abiItem,\n data: \"0x\",\n params: nonIndexedInputs,\n size: 0\n });\n }\n }\n return {\n eventName: name,\n args: Object.values(args).length > 0 ? args : void 0\n };\n }\n function decodeTopic({ param, value }) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.type === \"tuple\" || param.type.match(/^(.*)\\[(\\d+)?\\]$/))\n return value;\n const decodedArg = decodeAbiParameters([param], value) || [];\n return decodedArg[0];\n }\n var docsPath3;\n var init_decodeEventLog = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeEventLog.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_cursor();\n init_size();\n init_toEventSelector();\n init_decodeAbiParameters();\n init_formatAbiItem2();\n docsPath3 = \"/docs/contract/decodeEventLog\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/parseEventLogs.js\n function parseEventLogs(parameters) {\n const { abi: abi2, args, logs, strict = true } = parameters;\n const eventName = (() => {\n if (!parameters.eventName)\n return void 0;\n if (Array.isArray(parameters.eventName))\n return parameters.eventName;\n return [parameters.eventName];\n })();\n return logs.map((log) => {\n try {\n const abiItem = abi2.find((abiItem2) => abiItem2.type === \"event\" && log.topics[0] === toEventSelector(abiItem2));\n if (!abiItem)\n return null;\n const event = decodeEventLog({\n ...log,\n abi: [abiItem],\n strict\n });\n if (eventName && !eventName.includes(event.eventName))\n return null;\n if (!includesArgs({\n args: event.args,\n inputs: abiItem.inputs,\n matchArgs: args\n }))\n return null;\n return { ...event, ...log };\n } catch (err) {\n let eventName2;\n let isUnnamed;\n if (err instanceof AbiEventSignatureNotFoundError)\n return null;\n if (err instanceof DecodeLogDataMismatch || err instanceof DecodeLogTopicsMismatch) {\n if (strict)\n return null;\n eventName2 = err.abiItem.name;\n isUnnamed = err.abiItem.inputs?.some((x4) => !(\"name\" in x4 && x4.name));\n }\n return { ...log, args: isUnnamed ? [] : {}, eventName: eventName2 };\n }\n }).filter(Boolean);\n }\n function includesArgs(parameters) {\n const { args, inputs, matchArgs } = parameters;\n if (!matchArgs)\n return true;\n if (!args)\n return false;\n function isEqual2(input, value, arg) {\n try {\n if (input.type === \"address\")\n return isAddressEqual(value, arg);\n if (input.type === \"string\" || input.type === \"bytes\")\n return keccak256(toBytes(value)) === arg;\n return value === arg;\n } catch {\n return false;\n }\n }\n if (Array.isArray(args) && Array.isArray(matchArgs)) {\n return matchArgs.every((value, index2) => {\n if (value === null || value === void 0)\n return true;\n const input = inputs[index2];\n if (!input)\n return false;\n const value_ = Array.isArray(value) ? value : [value];\n return value_.some((value2) => isEqual2(input, value2, args[index2]));\n });\n }\n if (typeof args === \"object\" && !Array.isArray(args) && typeof matchArgs === \"object\" && !Array.isArray(matchArgs))\n return Object.entries(matchArgs).every(([key, value]) => {\n if (value === null || value === void 0)\n return true;\n const input = inputs.find((input2) => input2.name === key);\n if (!input)\n return false;\n const value_ = Array.isArray(value) ? value : [value];\n return value_.some((value2) => isEqual2(input, value2, args[key]));\n });\n return false;\n }\n var init_parseEventLogs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/parseEventLogs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_isAddressEqual();\n init_toBytes();\n init_keccak256();\n init_toEventSelector();\n init_decodeEventLog();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/log.js\n function formatLog(log, { args, eventName } = {}) {\n return {\n ...log,\n blockHash: log.blockHash ? log.blockHash : null,\n blockNumber: log.blockNumber ? BigInt(log.blockNumber) : null,\n logIndex: log.logIndex ? Number(log.logIndex) : null,\n transactionHash: log.transactionHash ? log.transactionHash : null,\n transactionIndex: log.transactionIndex ? Number(log.transactionIndex) : null,\n ...eventName ? { args, eventName } : {}\n };\n }\n var init_log2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/log.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getLogs.js\n async function getLogs(client, { address, blockHash, fromBlock, toBlock, event, events: events_, args, strict: strict_ } = {}) {\n const strict = strict_ ?? false;\n const events = events_ ?? (event ? [event] : void 0);\n let topics = [];\n if (events) {\n const encoded = events.flatMap((event2) => encodeEventTopics({\n abi: [event2],\n eventName: event2.name,\n args: events_ ? void 0 : args\n }));\n topics = [encoded];\n if (event)\n topics = topics[0];\n }\n let logs;\n if (blockHash) {\n logs = await client.request({\n method: \"eth_getLogs\",\n params: [{ address, topics, blockHash }]\n });\n } else {\n logs = await client.request({\n method: \"eth_getLogs\",\n params: [\n {\n address,\n topics,\n fromBlock: typeof fromBlock === \"bigint\" ? numberToHex(fromBlock) : fromBlock,\n toBlock: typeof toBlock === \"bigint\" ? numberToHex(toBlock) : toBlock\n }\n ]\n });\n }\n const formattedLogs = logs.map((log) => formatLog(log));\n if (!events)\n return formattedLogs;\n return parseEventLogs({\n abi: events,\n args,\n logs: formattedLogs,\n strict\n });\n }\n var init_getLogs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getLogs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encodeEventTopics();\n init_parseEventLogs();\n init_toHex();\n init_log2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getContractEvents.js\n async function getContractEvents(client, parameters) {\n const { abi: abi2, address, args, blockHash, eventName, fromBlock, toBlock, strict } = parameters;\n const event = eventName ? getAbiItem({ abi: abi2, name: eventName }) : void 0;\n const events = !event ? abi2.filter((x4) => x4.type === \"event\") : void 0;\n return getAction(client, getLogs, \"getLogs\")({\n address,\n args,\n blockHash,\n event,\n events,\n fromBlock,\n toBlock,\n strict\n });\n }\n var init_getContractEvents = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getContractEvents.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAbiItem();\n init_getAction();\n init_getLogs();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js\n function decodeFunctionResult(parameters) {\n const { abi: abi2, args, functionName, data } = parameters;\n let abiItem = abi2[0];\n if (functionName) {\n const item = getAbiItem({ abi: abi2, args, name: functionName });\n if (!item)\n throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath4 });\n abiItem = item;\n }\n if (abiItem.type !== \"function\")\n throw new AbiFunctionNotFoundError(void 0, { docsPath: docsPath4 });\n if (!abiItem.outputs)\n throw new AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath: docsPath4 });\n const values = decodeAbiParameters(abiItem.outputs, data);\n if (values && values.length > 1)\n return values;\n if (values && values.length === 1)\n return values[0];\n return void 0;\n }\n var docsPath4;\n var init_decodeFunctionResult = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_decodeAbiParameters();\n init_getAbiItem();\n docsPath4 = \"/docs/contract/decodeFunctionResult\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/version.js\n var version4;\n var init_version4 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n version4 = \"0.1.1\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/errors.js\n function getVersion() {\n return version4;\n }\n var init_errors3 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_version4();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Errors.js\n function walk2(err, fn) {\n if (fn?.(err))\n return err;\n if (err && typeof err === \"object\" && \"cause\" in err && err.cause)\n return walk2(err.cause, fn);\n return fn ? null : err;\n }\n var BaseError3;\n var init_Errors = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors3();\n BaseError3 = class _BaseError extends Error {\n constructor(shortMessage, options = {}) {\n const details = (() => {\n if (options.cause instanceof _BaseError) {\n if (options.cause.details)\n return options.cause.details;\n if (options.cause.shortMessage)\n return options.cause.shortMessage;\n }\n if (options.cause && \"details\" in options.cause && typeof options.cause.details === \"string\")\n return options.cause.details;\n if (options.cause?.message)\n return options.cause.message;\n return options.details;\n })();\n const docsPath8 = (() => {\n if (options.cause instanceof _BaseError)\n return options.cause.docsPath || options.docsPath;\n return options.docsPath;\n })();\n const docsBaseUrl = \"https://oxlib.sh\";\n const docs = `${docsBaseUrl}${docsPath8 ?? \"\"}`;\n const message = [\n shortMessage || \"An error occurred.\",\n ...options.metaMessages ? [\"\", ...options.metaMessages] : [],\n ...details || docsPath8 ? [\n \"\",\n details ? `Details: ${details}` : void 0,\n docsPath8 ? `See: ${docs}` : void 0\n ] : []\n ].filter((x4) => typeof x4 === \"string\").join(\"\\n\");\n super(message, options.cause ? { cause: options.cause } : void 0);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"BaseError\"\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: `ox@${getVersion()}`\n });\n this.cause = options.cause;\n this.details = details;\n this.docs = docs;\n this.docsPath = docsPath8;\n this.shortMessage = shortMessage;\n }\n walk(fn) {\n return walk2(this, fn);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/bytes.js\n function assertSize2(bytes, size_) {\n if (size2(bytes) > size_)\n throw new SizeOverflowError2({\n givenSize: size2(bytes),\n maxSize: size_\n });\n }\n function assertStartOffset2(value, start) {\n if (typeof start === \"number\" && start > 0 && start > size2(value) - 1)\n throw new SliceOffsetOutOfBoundsError2({\n offset: start,\n position: \"start\",\n size: size2(value)\n });\n }\n function assertEndOffset2(value, start, end) {\n if (typeof start === \"number\" && typeof end === \"number\" && size2(value) !== end - start) {\n throw new SliceOffsetOutOfBoundsError2({\n offset: end,\n position: \"end\",\n size: size2(value)\n });\n }\n }\n function charCodeToBase162(char) {\n if (char >= charCodeMap2.zero && char <= charCodeMap2.nine)\n return char - charCodeMap2.zero;\n if (char >= charCodeMap2.A && char <= charCodeMap2.F)\n return char - (charCodeMap2.A - 10);\n if (char >= charCodeMap2.a && char <= charCodeMap2.f)\n return char - (charCodeMap2.a - 10);\n return void 0;\n }\n function pad2(bytes, options = {}) {\n const { dir, size: size6 = 32 } = options;\n if (size6 === 0)\n return bytes;\n if (bytes.length > size6)\n throw new SizeExceedsPaddingSizeError2({\n size: bytes.length,\n targetSize: size6,\n type: \"Bytes\"\n });\n const paddedBytes = new Uint8Array(size6);\n for (let i3 = 0; i3 < size6; i3++) {\n const padEnd = dir === \"right\";\n paddedBytes[padEnd ? i3 : size6 - i3 - 1] = bytes[padEnd ? i3 : bytes.length - i3 - 1];\n }\n return paddedBytes;\n }\n function trim2(value, options = {}) {\n const { dir = \"left\" } = options;\n let data = value;\n let sliceLength = 0;\n for (let i3 = 0; i3 < data.length - 1; i3++) {\n if (data[dir === \"left\" ? i3 : data.length - i3 - 1].toString() === \"0\")\n sliceLength++;\n else\n break;\n }\n data = dir === \"left\" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);\n return data;\n }\n var charCodeMap2;\n var init_bytes = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Bytes();\n charCodeMap2 = {\n zero: 48,\n nine: 57,\n A: 65,\n F: 70,\n a: 97,\n f: 102\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/hex.js\n function assertSize3(hex, size_) {\n if (size3(hex) > size_)\n throw new SizeOverflowError3({\n givenSize: size3(hex),\n maxSize: size_\n });\n }\n function assertStartOffset3(value, start) {\n if (typeof start === \"number\" && start > 0 && start > size3(value) - 1)\n throw new SliceOffsetOutOfBoundsError3({\n offset: start,\n position: \"start\",\n size: size3(value)\n });\n }\n function assertEndOffset3(value, start, end) {\n if (typeof start === \"number\" && typeof end === \"number\" && size3(value) !== end - start) {\n throw new SliceOffsetOutOfBoundsError3({\n offset: end,\n position: \"end\",\n size: size3(value)\n });\n }\n }\n function pad3(hex_, options = {}) {\n const { dir, size: size6 = 32 } = options;\n if (size6 === 0)\n return hex_;\n const hex = hex_.replace(\"0x\", \"\");\n if (hex.length > size6 * 2)\n throw new SizeExceedsPaddingSizeError3({\n size: Math.ceil(hex.length / 2),\n targetSize: size6,\n type: \"Hex\"\n });\n return `0x${hex[dir === \"right\" ? \"padEnd\" : \"padStart\"](size6 * 2, \"0\")}`;\n }\n function trim3(value, options = {}) {\n const { dir = \"left\" } = options;\n let data = value.replace(\"0x\", \"\");\n let sliceLength = 0;\n for (let i3 = 0; i3 < data.length - 1; i3++) {\n if (data[dir === \"left\" ? i3 : data.length - i3 - 1].toString() === \"0\")\n sliceLength++;\n else\n break;\n }\n data = dir === \"left\" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);\n if (data === \"0\")\n return \"0x\";\n if (dir === \"right\" && data.length % 2 === 1)\n return `0x${data}0`;\n return `0x${data}`;\n }\n var init_hex = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/hex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Json.js\n function stringify2(value, replacer, space) {\n return JSON.stringify(value, (key, value2) => {\n if (typeof replacer === \"function\")\n return replacer(key, value2);\n if (typeof value2 === \"bigint\")\n return value2.toString() + bigIntSuffix;\n return value2;\n }, space);\n }\n var bigIntSuffix;\n var init_Json = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Json.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n bigIntSuffix = \"#__bigint\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Bytes.js\n function assert2(value) {\n if (value instanceof Uint8Array)\n return;\n if (!value)\n throw new InvalidBytesTypeError(value);\n if (typeof value !== \"object\")\n throw new InvalidBytesTypeError(value);\n if (!(\"BYTES_PER_ELEMENT\" in value))\n throw new InvalidBytesTypeError(value);\n if (value.BYTES_PER_ELEMENT !== 1 || value.constructor.name !== \"Uint8Array\")\n throw new InvalidBytesTypeError(value);\n }\n function from(value) {\n if (value instanceof Uint8Array)\n return value;\n if (typeof value === \"string\")\n return fromHex2(value);\n return fromArray(value);\n }\n function fromArray(value) {\n return value instanceof Uint8Array ? value : new Uint8Array(value);\n }\n function fromHex2(value, options = {}) {\n const { size: size6 } = options;\n let hex = value;\n if (size6) {\n assertSize3(value, size6);\n hex = padRight(value, size6);\n }\n let hexString = hex.slice(2);\n if (hexString.length % 2)\n hexString = `0${hexString}`;\n const length = hexString.length / 2;\n const bytes = new Uint8Array(length);\n for (let index2 = 0, j2 = 0; index2 < length; index2++) {\n const nibbleLeft = charCodeToBase162(hexString.charCodeAt(j2++));\n const nibbleRight = charCodeToBase162(hexString.charCodeAt(j2++));\n if (nibbleLeft === void 0 || nibbleRight === void 0) {\n throw new BaseError3(`Invalid byte sequence (\"${hexString[j2 - 2]}${hexString[j2 - 1]}\" in \"${hexString}\").`);\n }\n bytes[index2] = nibbleLeft * 16 + nibbleRight;\n }\n return bytes;\n }\n function fromString(value, options = {}) {\n const { size: size6 } = options;\n const bytes = encoder3.encode(value);\n if (typeof size6 === \"number\") {\n assertSize2(bytes, size6);\n return padRight2(bytes, size6);\n }\n return bytes;\n }\n function padRight2(value, size6) {\n return pad2(value, { dir: \"right\", size: size6 });\n }\n function size2(value) {\n return value.length;\n }\n function slice2(value, start, end, options = {}) {\n const { strict } = options;\n assertStartOffset2(value, start);\n const value_ = value.slice(start, end);\n if (strict)\n assertEndOffset2(value_, start, end);\n return value_;\n }\n function toBigInt2(bytes, options = {}) {\n const { size: size6 } = options;\n if (typeof size6 !== \"undefined\")\n assertSize2(bytes, size6);\n const hex = fromBytes(bytes, options);\n return toBigInt(hex, options);\n }\n function toBoolean(bytes, options = {}) {\n const { size: size6 } = options;\n let bytes_ = bytes;\n if (typeof size6 !== \"undefined\") {\n assertSize2(bytes_, size6);\n bytes_ = trimLeft(bytes_);\n }\n if (bytes_.length > 1 || bytes_[0] > 1)\n throw new InvalidBytesBooleanError2(bytes_);\n return Boolean(bytes_[0]);\n }\n function toNumber2(bytes, options = {}) {\n const { size: size6 } = options;\n if (typeof size6 !== \"undefined\")\n assertSize2(bytes, size6);\n const hex = fromBytes(bytes, options);\n return toNumber(hex, options);\n }\n function toString(bytes, options = {}) {\n const { size: size6 } = options;\n let bytes_ = bytes;\n if (typeof size6 !== \"undefined\") {\n assertSize2(bytes_, size6);\n bytes_ = trimRight(bytes_);\n }\n return decoder.decode(bytes_);\n }\n function trimLeft(value) {\n return trim2(value, { dir: \"left\" });\n }\n function trimRight(value) {\n return trim2(value, { dir: \"right\" });\n }\n function validate(value) {\n try {\n assert2(value);\n return true;\n } catch {\n return false;\n }\n }\n var decoder, encoder3, InvalidBytesBooleanError2, InvalidBytesTypeError, SizeOverflowError2, SliceOffsetOutOfBoundsError2, SizeExceedsPaddingSizeError2;\n var init_Bytes = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors();\n init_Hex();\n init_bytes();\n init_hex();\n init_Json();\n decoder = /* @__PURE__ */ new TextDecoder();\n encoder3 = /* @__PURE__ */ new TextEncoder();\n InvalidBytesBooleanError2 = class extends BaseError3 {\n constructor(bytes) {\n super(`Bytes value \\`${bytes}\\` is not a valid boolean.`, {\n metaMessages: [\n \"The bytes array must contain a single byte of either a `0` or `1` value.\"\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.InvalidBytesBooleanError\"\n });\n }\n };\n InvalidBytesTypeError = class extends BaseError3 {\n constructor(value) {\n super(`Value \\`${typeof value === \"object\" ? stringify2(value) : value}\\` of type \\`${typeof value}\\` is an invalid Bytes value.`, {\n metaMessages: [\"Bytes values must be of type `Bytes`.\"]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.InvalidBytesTypeError\"\n });\n }\n };\n SizeOverflowError2 = class extends BaseError3 {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed \\`${maxSize}\\` bytes. Given size: \\`${givenSize}\\` bytes.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.SizeOverflowError\"\n });\n }\n };\n SliceOffsetOutOfBoundsError2 = class extends BaseError3 {\n constructor({ offset, position, size: size6 }) {\n super(`Slice ${position === \"start\" ? \"starting\" : \"ending\"} at offset \\`${offset}\\` is out-of-bounds (size: \\`${size6}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.SliceOffsetOutOfBoundsError\"\n });\n }\n };\n SizeExceedsPaddingSizeError2 = class extends BaseError3 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\\`${size6}\\`) exceeds padding size (\\`${targetSize}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.SizeExceedsPaddingSizeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hex.js\n function assert3(value, options = {}) {\n const { strict = false } = options;\n if (!value)\n throw new InvalidHexTypeError(value);\n if (typeof value !== \"string\")\n throw new InvalidHexTypeError(value);\n if (strict) {\n if (!/^0x[0-9a-fA-F]*$/.test(value))\n throw new InvalidHexValueError(value);\n }\n if (!value.startsWith(\"0x\"))\n throw new InvalidHexValueError(value);\n }\n function concat2(...values) {\n return `0x${values.reduce((acc, x4) => acc + x4.replace(\"0x\", \"\"), \"\")}`;\n }\n function from2(value) {\n if (value instanceof Uint8Array)\n return fromBytes(value);\n if (Array.isArray(value))\n return fromBytes(new Uint8Array(value));\n return value;\n }\n function fromBoolean(value, options = {}) {\n const hex = `0x${Number(value)}`;\n if (typeof options.size === \"number\") {\n assertSize3(hex, options.size);\n return padLeft(hex, options.size);\n }\n return hex;\n }\n function fromBytes(value, options = {}) {\n let string = \"\";\n for (let i3 = 0; i3 < value.length; i3++)\n string += hexes4[value[i3]];\n const hex = `0x${string}`;\n if (typeof options.size === \"number\") {\n assertSize3(hex, options.size);\n return padRight(hex, options.size);\n }\n return hex;\n }\n function fromNumber(value, options = {}) {\n const { signed, size: size6 } = options;\n const value_ = BigInt(value);\n let maxValue;\n if (size6) {\n if (signed)\n maxValue = (1n << BigInt(size6) * 8n - 1n) - 1n;\n else\n maxValue = 2n ** (BigInt(size6) * 8n) - 1n;\n } else if (typeof value === \"number\") {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n }\n const minValue = typeof maxValue === \"bigint\" && signed ? -maxValue - 1n : 0;\n if (maxValue && value_ > maxValue || value_ < minValue) {\n const suffix = typeof value === \"bigint\" ? \"n\" : \"\";\n throw new IntegerOutOfRangeError2({\n max: maxValue ? `${maxValue}${suffix}` : void 0,\n min: `${minValue}${suffix}`,\n signed,\n size: size6,\n value: `${value}${suffix}`\n });\n }\n const stringValue = (signed && value_ < 0 ? (1n << BigInt(size6 * 8)) + BigInt(value_) : value_).toString(16);\n const hex = `0x${stringValue}`;\n if (size6)\n return padLeft(hex, size6);\n return hex;\n }\n function fromString2(value, options = {}) {\n return fromBytes(encoder4.encode(value), options);\n }\n function padLeft(value, size6) {\n return pad3(value, { dir: \"left\", size: size6 });\n }\n function padRight(value, size6) {\n return pad3(value, { dir: \"right\", size: size6 });\n }\n function slice3(value, start, end, options = {}) {\n const { strict } = options;\n assertStartOffset3(value, start);\n const value_ = `0x${value.replace(\"0x\", \"\").slice((start ?? 0) * 2, (end ?? value.length) * 2)}`;\n if (strict)\n assertEndOffset3(value_, start, end);\n return value_;\n }\n function size3(value) {\n return Math.ceil((value.length - 2) / 2);\n }\n function trimLeft2(value) {\n return trim3(value, { dir: \"left\" });\n }\n function toBigInt(hex, options = {}) {\n const { signed } = options;\n if (options.size)\n assertSize3(hex, options.size);\n const value = BigInt(hex);\n if (!signed)\n return value;\n const size6 = (hex.length - 2) / 2;\n const max_unsigned = (1n << BigInt(size6) * 8n) - 1n;\n const max_signed = max_unsigned >> 1n;\n if (value <= max_signed)\n return value;\n return value - max_unsigned - 1n;\n }\n function toNumber(hex, options = {}) {\n const { signed, size: size6 } = options;\n if (!signed && !size6)\n return Number(hex);\n return Number(toBigInt(hex, options));\n }\n function validate2(value, options = {}) {\n const { strict = false } = options;\n try {\n assert3(value, { strict });\n return true;\n } catch {\n return false;\n }\n }\n var encoder4, hexes4, IntegerOutOfRangeError2, InvalidHexTypeError, InvalidHexValueError, SizeOverflowError3, SliceOffsetOutOfBoundsError3, SizeExceedsPaddingSizeError3;\n var init_Hex = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors();\n init_hex();\n init_Json();\n encoder4 = /* @__PURE__ */ new TextEncoder();\n hexes4 = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i3) => i3.toString(16).padStart(2, \"0\"));\n IntegerOutOfRangeError2 = class extends BaseError3 {\n constructor({ max, min, signed, size: size6, value }) {\n super(`Number \\`${value}\\` is not in safe${size6 ? ` ${size6 * 8}-bit` : \"\"}${signed ? \" signed\" : \" unsigned\"} integer range ${max ? `(\\`${min}\\` to \\`${max}\\`)` : `(above \\`${min}\\`)`}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.IntegerOutOfRangeError\"\n });\n }\n };\n InvalidHexTypeError = class extends BaseError3 {\n constructor(value) {\n super(`Value \\`${typeof value === \"object\" ? stringify2(value) : value}\\` of type \\`${typeof value}\\` is an invalid hex type.`, {\n metaMessages: ['Hex types must be represented as `\"0x${string}\"`.']\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.InvalidHexTypeError\"\n });\n }\n };\n InvalidHexValueError = class extends BaseError3 {\n constructor(value) {\n super(`Value \\`${value}\\` is an invalid hex value.`, {\n metaMessages: [\n 'Hex values must start with `\"0x\"` and contain only hexadecimal characters (0-9, a-f, A-F).'\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.InvalidHexValueError\"\n });\n }\n };\n SizeOverflowError3 = class extends BaseError3 {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed \\`${maxSize}\\` bytes. Given size: \\`${givenSize}\\` bytes.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SizeOverflowError\"\n });\n }\n };\n SliceOffsetOutOfBoundsError3 = class extends BaseError3 {\n constructor({ offset, position, size: size6 }) {\n super(`Slice ${position === \"start\" ? \"starting\" : \"ending\"} at offset \\`${offset}\\` is out-of-bounds (size: \\`${size6}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SliceOffsetOutOfBoundsError\"\n });\n }\n };\n SizeExceedsPaddingSizeError3 = class extends BaseError3 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\\`${size6}\\`) exceeds padding size (\\`${targetSize}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SizeExceedsPaddingSizeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Withdrawal.js\n function toRpc(withdrawal) {\n return {\n address: withdrawal.address,\n amount: fromNumber(withdrawal.amount),\n index: fromNumber(withdrawal.index),\n validatorIndex: fromNumber(withdrawal.validatorIndex)\n };\n }\n var init_Withdrawal = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Withdrawal.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/BlockOverrides.js\n function toRpc2(blockOverrides) {\n return {\n ...typeof blockOverrides.baseFeePerGas === \"bigint\" && {\n baseFeePerGas: fromNumber(blockOverrides.baseFeePerGas)\n },\n ...typeof blockOverrides.blobBaseFee === \"bigint\" && {\n blobBaseFee: fromNumber(blockOverrides.blobBaseFee)\n },\n ...typeof blockOverrides.feeRecipient === \"string\" && {\n feeRecipient: blockOverrides.feeRecipient\n },\n ...typeof blockOverrides.gasLimit === \"bigint\" && {\n gasLimit: fromNumber(blockOverrides.gasLimit)\n },\n ...typeof blockOverrides.number === \"bigint\" && {\n number: fromNumber(blockOverrides.number)\n },\n ...typeof blockOverrides.prevRandao === \"bigint\" && {\n prevRandao: fromNumber(blockOverrides.prevRandao)\n },\n ...typeof blockOverrides.time === \"bigint\" && {\n time: fromNumber(blockOverrides.time)\n },\n ...blockOverrides.withdrawals && {\n withdrawals: blockOverrides.withdrawals.map(toRpc)\n }\n };\n }\n var init_BlockOverrides = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/BlockOverrides.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hex();\n init_Withdrawal();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/abis.js\n var multicall3Abi, batchGatewayAbi, universalResolverErrors, universalResolverResolveAbi, universalResolverReverseAbi, textResolverAbi, addressResolverAbi, erc1271Abi, erc6492SignatureValidatorAbi;\n var init_abis = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/abis.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n multicall3Abi = [\n {\n inputs: [\n {\n components: [\n {\n name: \"target\",\n type: \"address\"\n },\n {\n name: \"allowFailure\",\n type: \"bool\"\n },\n {\n name: \"callData\",\n type: \"bytes\"\n }\n ],\n name: \"calls\",\n type: \"tuple[]\"\n }\n ],\n name: \"aggregate3\",\n outputs: [\n {\n components: [\n {\n name: \"success\",\n type: \"bool\"\n },\n {\n name: \"returnData\",\n type: \"bytes\"\n }\n ],\n name: \"returnData\",\n type: \"tuple[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getCurrentBlockTimestamp\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"timestamp\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ];\n batchGatewayAbi = [\n {\n name: \"query\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n {\n type: \"tuple[]\",\n name: \"queries\",\n components: [\n {\n type: \"address\",\n name: \"sender\"\n },\n {\n type: \"string[]\",\n name: \"urls\"\n },\n {\n type: \"bytes\",\n name: \"data\"\n }\n ]\n }\n ],\n outputs: [\n {\n type: \"bool[]\",\n name: \"failures\"\n },\n {\n type: \"bytes[]\",\n name: \"responses\"\n }\n ]\n },\n {\n name: \"HttpError\",\n type: \"error\",\n inputs: [\n {\n type: \"uint16\",\n name: \"status\"\n },\n {\n type: \"string\",\n name: \"message\"\n }\n ]\n }\n ];\n universalResolverErrors = [\n {\n inputs: [\n {\n name: \"dns\",\n type: \"bytes\"\n }\n ],\n name: \"DNSDecodingFailed\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"ens\",\n type: \"string\"\n }\n ],\n name: \"DNSEncodingFailed\",\n type: \"error\"\n },\n {\n inputs: [],\n name: \"EmptyAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"status\",\n type: \"uint16\"\n },\n {\n name: \"message\",\n type: \"string\"\n }\n ],\n name: \"HttpError\",\n type: \"error\"\n },\n {\n inputs: [],\n name: \"InvalidBatchGatewayResponse\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"errorData\",\n type: \"bytes\"\n }\n ],\n name: \"ResolverError\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"name\",\n type: \"bytes\"\n },\n {\n name: \"resolver\",\n type: \"address\"\n }\n ],\n name: \"ResolverNotContract\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"name\",\n type: \"bytes\"\n }\n ],\n name: \"ResolverNotFound\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"primary\",\n type: \"string\"\n },\n {\n name: \"primaryAddress\",\n type: \"bytes\"\n }\n ],\n name: \"ReverseAddressMismatch\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\"\n }\n ],\n name: \"UnsupportedResolverProfile\",\n type: \"error\"\n }\n ];\n universalResolverResolveAbi = [\n ...universalResolverErrors,\n {\n name: \"resolveWithGateways\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { name: \"name\", type: \"bytes\" },\n { name: \"data\", type: \"bytes\" },\n { name: \"gateways\", type: \"string[]\" }\n ],\n outputs: [\n { name: \"\", type: \"bytes\" },\n { name: \"address\", type: \"address\" }\n ]\n }\n ];\n universalResolverReverseAbi = [\n ...universalResolverErrors,\n {\n name: \"reverseWithGateways\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { type: \"bytes\", name: \"reverseName\" },\n { type: \"uint256\", name: \"coinType\" },\n { type: \"string[]\", name: \"gateways\" }\n ],\n outputs: [\n { type: \"string\", name: \"resolvedName\" },\n { type: \"address\", name: \"resolver\" },\n { type: \"address\", name: \"reverseResolver\" }\n ]\n }\n ];\n textResolverAbi = [\n {\n name: \"text\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { name: \"name\", type: \"bytes32\" },\n { name: \"key\", type: \"string\" }\n ],\n outputs: [{ name: \"\", type: \"string\" }]\n }\n ];\n addressResolverAbi = [\n {\n name: \"addr\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [{ name: \"name\", type: \"bytes32\" }],\n outputs: [{ name: \"\", type: \"address\" }]\n },\n {\n name: \"addr\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { name: \"name\", type: \"bytes32\" },\n { name: \"coinType\", type: \"uint256\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\" }]\n }\n ];\n erc1271Abi = [\n {\n name: \"isValidSignature\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { name: \"hash\", type: \"bytes32\" },\n { name: \"signature\", type: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\" }]\n }\n ];\n erc6492SignatureValidatorAbi = [\n {\n inputs: [\n {\n name: \"_signer\",\n type: \"address\"\n },\n {\n name: \"_hash\",\n type: \"bytes32\"\n },\n {\n name: \"_signature\",\n type: \"bytes\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n inputs: [\n {\n name: \"_signer\",\n type: \"address\"\n },\n {\n name: \"_hash\",\n type: \"bytes32\"\n },\n {\n name: \"_signature\",\n type: \"bytes\"\n }\n ],\n outputs: [\n {\n type: \"bool\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"isValidSig\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/contract.js\n var aggregate3Signature;\n var init_contract2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/contract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n aggregate3Signature = \"0x82ad56cb\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/contracts.js\n var deploylessCallViaBytecodeBytecode, deploylessCallViaFactoryBytecode, erc6492SignatureValidatorByteCode, multicall3Bytecode;\n var init_contracts = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/contracts.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n deploylessCallViaBytecodeBytecode = \"0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe\";\n deploylessCallViaFactoryBytecode = \"0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe\";\n erc6492SignatureValidatorByteCode = \"0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572\";\n multicall3Bytecode = \"0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/chain.js\n var ChainDoesNotSupportContract, ChainMismatchError, ChainNotFoundError, ClientChainNotConfiguredError, InvalidChainIdError;\n var init_chain = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/chain.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n ChainDoesNotSupportContract = class extends BaseError2 {\n constructor({ blockNumber, chain: chain2, contract }) {\n super(`Chain \"${chain2.name}\" does not support contract \"${contract.name}\".`, {\n metaMessages: [\n \"This could be due to any of the following:\",\n ...blockNumber && contract.blockCreated && contract.blockCreated > blockNumber ? [\n `- The contract \"${contract.name}\" was not deployed until block ${contract.blockCreated} (current block ${blockNumber}).`\n ] : [\n `- The chain does not have the contract \"${contract.name}\" configured.`\n ]\n ],\n name: \"ChainDoesNotSupportContract\"\n });\n }\n };\n ChainMismatchError = class extends BaseError2 {\n constructor({ chain: chain2, currentChainId }) {\n super(`The current chain of the wallet (id: ${currentChainId}) does not match the target chain for the transaction (id: ${chain2.id} \\u2013 ${chain2.name}).`, {\n metaMessages: [\n `Current Chain ID: ${currentChainId}`,\n `Expected Chain ID: ${chain2.id} \\u2013 ${chain2.name}`\n ],\n name: \"ChainMismatchError\"\n });\n }\n };\n ChainNotFoundError = class extends BaseError2 {\n constructor() {\n super([\n \"No chain was provided to the request.\",\n \"Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.\"\n ].join(\"\\n\"), {\n name: \"ChainNotFoundError\"\n });\n }\n };\n ClientChainNotConfiguredError = class extends BaseError2 {\n constructor() {\n super(\"No chain was provided to the Client.\", {\n name: \"ClientChainNotConfiguredError\"\n });\n }\n };\n InvalidChainIdError = class extends BaseError2 {\n constructor({ chainId }) {\n super(typeof chainId === \"number\" ? `Chain ID \"${chainId}\" is invalid.` : \"Chain ID is invalid.\", { name: \"InvalidChainIdError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeDeployData.js\n function encodeDeployData(parameters) {\n const { abi: abi2, args, bytecode } = parameters;\n if (!args || args.length === 0)\n return bytecode;\n const description = abi2.find((x4) => \"type\" in x4 && x4.type === \"constructor\");\n if (!description)\n throw new AbiConstructorNotFoundError({ docsPath: docsPath5 });\n if (!(\"inputs\" in description))\n throw new AbiConstructorParamsNotFoundError({ docsPath: docsPath5 });\n if (!description.inputs || description.inputs.length === 0)\n throw new AbiConstructorParamsNotFoundError({ docsPath: docsPath5 });\n const data = encodeAbiParameters(description.inputs, args);\n return concatHex([bytecode, data]);\n }\n var docsPath5;\n var init_encodeDeployData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeDeployData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_concat();\n init_encodeAbiParameters();\n docsPath5 = \"/docs/contract/encodeDeployData\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/getChainContractAddress.js\n function getChainContractAddress({ blockNumber, chain: chain2, contract: name }) {\n const contract = chain2?.contracts?.[name];\n if (!contract)\n throw new ChainDoesNotSupportContract({\n chain: chain2,\n contract: { name }\n });\n if (blockNumber && contract.blockCreated && contract.blockCreated > blockNumber)\n throw new ChainDoesNotSupportContract({\n blockNumber,\n chain: chain2,\n contract: {\n name,\n blockCreated: contract.blockCreated\n }\n });\n return contract.address;\n }\n var init_getChainContractAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/getChainContractAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chain();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getCallError.js\n function getCallError(err, { docsPath: docsPath8, ...args }) {\n const cause = (() => {\n const cause2 = getNodeError(err, args);\n if (cause2 instanceof UnknownNodeError)\n return err;\n return cause2;\n })();\n return new CallExecutionError(cause, {\n docsPath: docsPath8,\n ...args\n });\n }\n var init_getCallError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getCallError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_contract();\n init_node();\n init_getNodeError();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withResolvers.js\n function withResolvers() {\n let resolve = () => void 0;\n let reject = () => void 0;\n const promise = new Promise((resolve_, reject_) => {\n resolve = resolve_;\n reject = reject_;\n });\n return { promise, resolve, reject };\n }\n var init_withResolvers = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withResolvers.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/createBatchScheduler.js\n function createBatchScheduler({ fn, id, shouldSplitBatch, wait: wait2 = 0, sort }) {\n const exec = async () => {\n const scheduler = getScheduler();\n flush();\n const args = scheduler.map(({ args: args2 }) => args2);\n if (args.length === 0)\n return;\n fn(args).then((data) => {\n if (sort && Array.isArray(data))\n data.sort(sort);\n for (let i3 = 0; i3 < scheduler.length; i3++) {\n const { resolve } = scheduler[i3];\n resolve?.([data[i3], data]);\n }\n }).catch((err) => {\n for (let i3 = 0; i3 < scheduler.length; i3++) {\n const { reject } = scheduler[i3];\n reject?.(err);\n }\n });\n };\n const flush = () => schedulerCache.delete(id);\n const getBatchedArgs = () => getScheduler().map(({ args }) => args);\n const getScheduler = () => schedulerCache.get(id) || [];\n const setScheduler = (item) => schedulerCache.set(id, [...getScheduler(), item]);\n return {\n flush,\n async schedule(args) {\n const { promise, resolve, reject } = withResolvers();\n const split3 = shouldSplitBatch?.([...getBatchedArgs(), args]);\n if (split3)\n exec();\n const hasActiveScheduler = getScheduler().length > 0;\n if (hasActiveScheduler) {\n setScheduler({ args, resolve, reject });\n return promise;\n }\n setScheduler({ args, resolve, reject });\n setTimeout(exec, wait2);\n return promise;\n }\n };\n }\n var schedulerCache;\n var init_createBatchScheduler = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/createBatchScheduler.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_withResolvers();\n schedulerCache = /* @__PURE__ */ new Map();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/ccip.js\n var OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError;\n var init_ccip = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/ccip.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n init_base();\n init_utils4();\n OffchainLookupError = class extends BaseError2 {\n constructor({ callbackSelector, cause, data, extraData, sender, urls }) {\n super(cause.shortMessage || \"An error occurred while fetching for an offchain result.\", {\n cause,\n metaMessages: [\n ...cause.metaMessages || [],\n cause.metaMessages?.length ? \"\" : [],\n \"Offchain Gateway Call:\",\n urls && [\n \" Gateway URL(s):\",\n ...urls.map((url) => ` ${getUrl(url)}`)\n ],\n ` Sender: ${sender}`,\n ` Data: ${data}`,\n ` Callback selector: ${callbackSelector}`,\n ` Extra data: ${extraData}`\n ].flat(),\n name: \"OffchainLookupError\"\n });\n }\n };\n OffchainLookupResponseMalformedError = class extends BaseError2 {\n constructor({ result, url }) {\n super(\"Offchain gateway response is malformed. Response data must be a hex value.\", {\n metaMessages: [\n `Gateway URL: ${getUrl(url)}`,\n `Response: ${stringify(result)}`\n ],\n name: \"OffchainLookupResponseMalformedError\"\n });\n }\n };\n OffchainLookupSenderMismatchError = class extends BaseError2 {\n constructor({ sender, to }) {\n super(\"Reverted sender address does not match target contract address (`to`).\", {\n metaMessages: [\n `Contract address: ${to}`,\n `OffchainLookup sender address: ${sender}`\n ],\n name: \"OffchainLookupSenderMismatchError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeFunctionData.js\n function decodeFunctionData(parameters) {\n const { abi: abi2, data } = parameters;\n const signature = slice(data, 0, 4);\n const description = abi2.find((x4) => x4.type === \"function\" && signature === toFunctionSelector(formatAbiItem2(x4)));\n if (!description)\n throw new AbiFunctionSignatureNotFoundError(signature, {\n docsPath: \"/docs/contract/decodeFunctionData\"\n });\n return {\n functionName: description.name,\n args: \"inputs\" in description && description.inputs && description.inputs.length > 0 ? decodeAbiParameters(description.inputs, slice(data, 4)) : void 0\n };\n }\n var init_decodeFunctionData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeFunctionData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_slice();\n init_toFunctionSelector();\n init_decodeAbiParameters();\n init_formatAbiItem2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeErrorResult.js\n function encodeErrorResult(parameters) {\n const { abi: abi2, errorName, args } = parameters;\n let abiItem = abi2[0];\n if (errorName) {\n const item = getAbiItem({ abi: abi2, args, name: errorName });\n if (!item)\n throw new AbiErrorNotFoundError(errorName, { docsPath: docsPath6 });\n abiItem = item;\n }\n if (abiItem.type !== \"error\")\n throw new AbiErrorNotFoundError(void 0, { docsPath: docsPath6 });\n const definition = formatAbiItem2(abiItem);\n const signature = toFunctionSelector(definition);\n let data = \"0x\";\n if (args && args.length > 0) {\n if (!abiItem.inputs)\n throw new AbiErrorInputsNotFoundError(abiItem.name, { docsPath: docsPath6 });\n data = encodeAbiParameters(abiItem.inputs, args);\n }\n return concatHex([signature, data]);\n }\n var docsPath6;\n var init_encodeErrorResult = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeErrorResult.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_concat();\n init_toFunctionSelector();\n init_encodeAbiParameters();\n init_formatAbiItem2();\n init_getAbiItem();\n docsPath6 = \"/docs/contract/encodeErrorResult\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeFunctionResult.js\n function encodeFunctionResult(parameters) {\n const { abi: abi2, functionName, result } = parameters;\n let abiItem = abi2[0];\n if (functionName) {\n const item = getAbiItem({ abi: abi2, name: functionName });\n if (!item)\n throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath7 });\n abiItem = item;\n }\n if (abiItem.type !== \"function\")\n throw new AbiFunctionNotFoundError(void 0, { docsPath: docsPath7 });\n if (!abiItem.outputs)\n throw new AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath: docsPath7 });\n const values = (() => {\n if (abiItem.outputs.length === 0)\n return [];\n if (abiItem.outputs.length === 1)\n return [result];\n if (Array.isArray(result))\n return result;\n throw new InvalidArrayError(result);\n })();\n return encodeAbiParameters(abiItem.outputs, values);\n }\n var docsPath7;\n var init_encodeFunctionResult = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeFunctionResult.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_encodeAbiParameters();\n init_getAbiItem();\n docsPath7 = \"/docs/contract/encodeFunctionResult\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js\n async function localBatchGatewayRequest(parameters) {\n const { data, ccipRequest: ccipRequest2 } = parameters;\n const { args: [queries] } = decodeFunctionData({ abi: batchGatewayAbi, data });\n const failures = [];\n const responses = [];\n await Promise.all(queries.map(async (query, i3) => {\n try {\n responses[i3] = query.urls.includes(localBatchGatewayUrl) ? await localBatchGatewayRequest({ data: query.data, ccipRequest: ccipRequest2 }) : await ccipRequest2(query);\n failures[i3] = false;\n } catch (err) {\n failures[i3] = true;\n responses[i3] = encodeError(err);\n }\n }));\n return encodeFunctionResult({\n abi: batchGatewayAbi,\n functionName: \"query\",\n result: [failures, responses]\n });\n }\n function encodeError(error) {\n if (error.name === \"HttpRequestError\" && error.status)\n return encodeErrorResult({\n abi: batchGatewayAbi,\n errorName: \"HttpError\",\n args: [error.status, error.shortMessage]\n });\n return encodeErrorResult({\n abi: [solidityError],\n errorName: \"Error\",\n args: [\"shortMessage\" in error ? error.shortMessage : error.message]\n });\n }\n var localBatchGatewayUrl;\n var init_localBatchGatewayRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_solidity();\n init_decodeFunctionData();\n init_encodeErrorResult();\n init_encodeFunctionResult();\n localBatchGatewayUrl = \"x-batch-gateway:true\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ccip.js\n var ccip_exports = {};\n __export(ccip_exports, {\n ccipRequest: () => ccipRequest,\n offchainLookup: () => offchainLookup,\n offchainLookupAbiItem: () => offchainLookupAbiItem,\n offchainLookupSignature: () => offchainLookupSignature\n });\n async function offchainLookup(client, { blockNumber, blockTag, data, to }) {\n const { args } = decodeErrorResult({\n data,\n abi: [offchainLookupAbiItem]\n });\n const [sender, urls, callData, callbackSelector, extraData] = args;\n const { ccipRead } = client;\n const ccipRequest_ = ccipRead && typeof ccipRead?.request === \"function\" ? ccipRead.request : ccipRequest;\n try {\n if (!isAddressEqual(to, sender))\n throw new OffchainLookupSenderMismatchError({ sender, to });\n const result = urls.includes(localBatchGatewayUrl) ? await localBatchGatewayRequest({\n data: callData,\n ccipRequest: ccipRequest_\n }) : await ccipRequest_({ data: callData, sender, urls });\n const { data: data_ } = await call(client, {\n blockNumber,\n blockTag,\n data: concat([\n callbackSelector,\n encodeAbiParameters([{ type: \"bytes\" }, { type: \"bytes\" }], [result, extraData])\n ]),\n to\n });\n return data_;\n } catch (err) {\n throw new OffchainLookupError({\n callbackSelector,\n cause: err,\n data,\n extraData,\n sender,\n urls\n });\n }\n }\n async function ccipRequest({ data, sender, urls }) {\n let error = new Error(\"An unknown error occurred.\");\n for (let i3 = 0; i3 < urls.length; i3++) {\n const url = urls[i3];\n const method = url.includes(\"{data}\") ? \"GET\" : \"POST\";\n const body = method === \"POST\" ? { data, sender } : void 0;\n const headers = method === \"POST\" ? { \"Content-Type\": \"application/json\" } : {};\n try {\n const response = await fetch(url.replace(\"{sender}\", sender.toLowerCase()).replace(\"{data}\", data), {\n body: JSON.stringify(body),\n headers,\n method\n });\n let result;\n if (response.headers.get(\"Content-Type\")?.startsWith(\"application/json\")) {\n result = (await response.json()).data;\n } else {\n result = await response.text();\n }\n if (!response.ok) {\n error = new HttpRequestError({\n body,\n details: result?.error ? stringify(result.error) : response.statusText,\n headers: response.headers,\n status: response.status,\n url\n });\n continue;\n }\n if (!isHex(result)) {\n error = new OffchainLookupResponseMalformedError({\n result,\n url\n });\n continue;\n }\n return result;\n } catch (err) {\n error = new HttpRequestError({\n body,\n details: err.message,\n url\n });\n }\n }\n throw error;\n }\n var offchainLookupSignature, offchainLookupAbiItem;\n var init_ccip2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ccip.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_call();\n init_ccip();\n init_request();\n init_decodeErrorResult();\n init_encodeAbiParameters();\n init_isAddressEqual();\n init_concat();\n init_isHex();\n init_localBatchGatewayRequest();\n init_stringify();\n offchainLookupSignature = \"0x556f1830\";\n offchainLookupAbiItem = {\n name: \"OffchainLookup\",\n type: \"error\",\n inputs: [\n {\n name: \"sender\",\n type: \"address\"\n },\n {\n name: \"urls\",\n type: \"string[]\"\n },\n {\n name: \"callData\",\n type: \"bytes\"\n },\n {\n name: \"callbackFunction\",\n type: \"bytes4\"\n },\n {\n name: \"extraData\",\n type: \"bytes\"\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/call.js\n async function call(client, args) {\n const { account: account_ = client.account, authorizationList, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = client.experimental_blockTag ?? \"latest\", accessList, blobs, blockOverrides, code, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride, ...rest } = args;\n const account = account_ ? parseAccount(account_) : void 0;\n if (code && (factory || factoryData))\n throw new BaseError2(\"Cannot provide both `code` & `factory`/`factoryData` as parameters.\");\n if (code && to)\n throw new BaseError2(\"Cannot provide both `code` & `to` as parameters.\");\n const deploylessCallViaBytecode = code && data_;\n const deploylessCallViaFactory = factory && factoryData && to && data_;\n const deploylessCall = deploylessCallViaBytecode || deploylessCallViaFactory;\n const data = (() => {\n if (deploylessCallViaBytecode)\n return toDeploylessCallViaBytecodeData({\n code,\n data: data_\n });\n if (deploylessCallViaFactory)\n return toDeploylessCallViaFactoryData({\n data: data_,\n factory,\n factoryData,\n to\n });\n return data_;\n })();\n try {\n assertRequest(args);\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const rpcBlockOverrides = blockOverrides ? toRpc2(blockOverrides) : void 0;\n const rpcStateOverride = serializeStateOverride(stateOverride);\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n accessList,\n account,\n authorizationList,\n blobs,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to: deploylessCall ? void 0 : to,\n value\n }, \"call\");\n if (batch && shouldPerformMulticall({ request }) && !rpcStateOverride && !rpcBlockOverrides) {\n try {\n return await scheduleMulticall(client, {\n ...request,\n blockNumber,\n blockTag\n });\n } catch (err) {\n if (!(err instanceof ClientChainNotConfiguredError) && !(err instanceof ChainDoesNotSupportContract))\n throw err;\n }\n }\n const params = (() => {\n const base4 = [\n request,\n block\n ];\n if (rpcStateOverride && rpcBlockOverrides)\n return [...base4, rpcStateOverride, rpcBlockOverrides];\n if (rpcStateOverride)\n return [...base4, rpcStateOverride];\n if (rpcBlockOverrides)\n return [...base4, {}, rpcBlockOverrides];\n return base4;\n })();\n const response = await client.request({\n method: \"eth_call\",\n params\n });\n if (response === \"0x\")\n return { data: void 0 };\n return { data: response };\n } catch (err) {\n const data2 = getRevertErrorData(err);\n const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await Promise.resolve().then(() => (init_ccip2(), ccip_exports));\n if (client.ccipRead !== false && data2?.slice(0, 10) === offchainLookupSignature2 && to)\n return { data: await offchainLookup2(client, { data: data2, to }) };\n if (deploylessCall && data2?.slice(0, 10) === \"0x101bb98d\")\n throw new CounterfactualDeploymentFailedError({ factory });\n throw getCallError(err, {\n ...args,\n account,\n chain: client.chain\n });\n }\n }\n function shouldPerformMulticall({ request }) {\n const { data, to, ...request_ } = request;\n if (!data)\n return false;\n if (data.startsWith(aggregate3Signature))\n return false;\n if (!to)\n return false;\n if (Object.values(request_).filter((x4) => typeof x4 !== \"undefined\").length > 0)\n return false;\n return true;\n }\n async function scheduleMulticall(client, args) {\n const { batchSize = 1024, deployless = false, wait: wait2 = 0 } = typeof client.batch?.multicall === \"object\" ? client.batch.multicall : {};\n const { blockNumber, blockTag = client.experimental_blockTag ?? \"latest\", data, to } = args;\n const multicallAddress = (() => {\n if (deployless)\n return null;\n if (args.multicallAddress)\n return args.multicallAddress;\n if (client.chain) {\n return getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: \"multicall3\"\n });\n }\n throw new ClientChainNotConfiguredError();\n })();\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const { schedule } = createBatchScheduler({\n id: `${client.uid}.${block}`,\n wait: wait2,\n shouldSplitBatch(args2) {\n const size6 = args2.reduce((size7, { data: data2 }) => size7 + (data2.length - 2), 0);\n return size6 > batchSize * 2;\n },\n fn: async (requests) => {\n const calls = requests.map((request) => ({\n allowFailure: true,\n callData: request.data,\n target: request.to\n }));\n const calldata = encodeFunctionData({\n abi: multicall3Abi,\n args: [calls],\n functionName: \"aggregate3\"\n });\n const data2 = await client.request({\n method: \"eth_call\",\n params: [\n {\n ...multicallAddress === null ? {\n data: toDeploylessCallViaBytecodeData({\n code: multicall3Bytecode,\n data: calldata\n })\n } : { to: multicallAddress, data: calldata }\n },\n block\n ]\n });\n return decodeFunctionResult({\n abi: multicall3Abi,\n args: [calls],\n functionName: \"aggregate3\",\n data: data2 || \"0x\"\n });\n }\n });\n const [{ returnData, success }] = await schedule({ data, to });\n if (!success)\n throw new RawContractError({ data: returnData });\n if (returnData === \"0x\")\n return { data: void 0 };\n return { data: returnData };\n }\n function toDeploylessCallViaBytecodeData(parameters) {\n const { code, data } = parameters;\n return encodeDeployData({\n abi: parseAbi([\"constructor(bytes, bytes)\"]),\n bytecode: deploylessCallViaBytecodeBytecode,\n args: [code, data]\n });\n }\n function toDeploylessCallViaFactoryData(parameters) {\n const { data, factory, factoryData, to } = parameters;\n return encodeDeployData({\n abi: parseAbi([\"constructor(address, bytes, address, bytes)\"]),\n bytecode: deploylessCallViaFactoryBytecode,\n args: [to, data, factory, factoryData]\n });\n }\n function getRevertErrorData(err) {\n if (!(err instanceof BaseError2))\n return void 0;\n const error = err.walk();\n return typeof error?.data === \"object\" ? error.data?.data : error.data;\n }\n var init_call = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/call.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_BlockOverrides();\n init_parseAccount();\n init_abis();\n init_contract2();\n init_contracts();\n init_base();\n init_chain();\n init_contract();\n init_decodeFunctionResult();\n init_encodeDeployData();\n init_encodeFunctionData();\n init_getChainContractAddress();\n init_toHex();\n init_getCallError();\n init_extract();\n init_transactionRequest();\n init_createBatchScheduler();\n init_stateOverride2();\n init_assertRequest();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/readContract.js\n async function readContract(client, parameters) {\n const { abi: abi2, address, args, functionName, ...rest } = parameters;\n const calldata = encodeFunctionData({\n abi: abi2,\n args,\n functionName\n });\n try {\n const { data } = await getAction(client, call, \"call\")({\n ...rest,\n data: calldata,\n to: address\n });\n return decodeFunctionResult({\n abi: abi2,\n args,\n functionName,\n data: data || \"0x\"\n });\n } catch (error) {\n throw getContractError(error, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/readContract\",\n functionName\n });\n }\n }\n var init_readContract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/readContract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getContractError();\n init_getAction();\n init_call();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateContract.js\n async function simulateContract(client, parameters) {\n const { abi: abi2, address, args, dataSuffix, functionName, ...callRequest } = parameters;\n const account = callRequest.account ? parseAccount(callRequest.account) : client.account;\n const calldata = encodeFunctionData({ abi: abi2, args, functionName });\n try {\n const { data } = await getAction(client, call, \"call\")({\n batch: false,\n data: `${calldata}${dataSuffix ? dataSuffix.replace(\"0x\", \"\") : \"\"}`,\n to: address,\n ...callRequest,\n account\n });\n const result = decodeFunctionResult({\n abi: abi2,\n args,\n functionName,\n data: data || \"0x\"\n });\n const minimizedAbi = abi2.filter((abiItem) => \"name\" in abiItem && abiItem.name === parameters.functionName);\n return {\n result,\n request: {\n abi: minimizedAbi,\n address,\n args,\n dataSuffix,\n functionName,\n ...callRequest,\n account\n }\n };\n } catch (error) {\n throw getContractError(error, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/simulateContract\",\n functionName,\n sender: account?.address\n });\n }\n }\n var init_simulateContract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateContract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getContractError();\n init_getAction();\n init_call();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/observe.js\n function observe(observerId, callbacks, fn) {\n const callbackId = ++callbackCount;\n const getListeners = () => listenersCache.get(observerId) || [];\n const unsubscribe = () => {\n const listeners3 = getListeners();\n listenersCache.set(observerId, listeners3.filter((cb) => cb.id !== callbackId));\n };\n const unwatch = () => {\n const listeners3 = getListeners();\n if (!listeners3.some((cb) => cb.id === callbackId))\n return;\n const cleanup2 = cleanupCache.get(observerId);\n if (listeners3.length === 1 && cleanup2) {\n const p4 = cleanup2();\n if (p4 instanceof Promise)\n p4.catch(() => {\n });\n }\n unsubscribe();\n };\n const listeners2 = getListeners();\n listenersCache.set(observerId, [\n ...listeners2,\n { id: callbackId, fns: callbacks }\n ]);\n if (listeners2 && listeners2.length > 0)\n return unwatch;\n const emit2 = {};\n for (const key in callbacks) {\n emit2[key] = (...args) => {\n const listeners3 = getListeners();\n if (listeners3.length === 0)\n return;\n for (const listener of listeners3)\n listener.fns[key]?.(...args);\n };\n }\n const cleanup = fn(emit2);\n if (typeof cleanup === \"function\")\n cleanupCache.set(observerId, cleanup);\n return unwatch;\n }\n var listenersCache, cleanupCache, callbackCount;\n var init_observe = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/observe.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n listenersCache = /* @__PURE__ */ new Map();\n cleanupCache = /* @__PURE__ */ new Map();\n callbackCount = 0;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/wait.js\n async function wait(time) {\n return new Promise((res) => setTimeout(res, time));\n }\n var init_wait = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/wait.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/poll.js\n function poll(fn, { emitOnBegin, initialWaitTime, interval }) {\n let active = true;\n const unwatch = () => active = false;\n const watch = async () => {\n let data;\n if (emitOnBegin)\n data = await fn({ unpoll: unwatch });\n const initialWait = await initialWaitTime?.(data) ?? interval;\n await wait(initialWait);\n const poll2 = async () => {\n if (!active)\n return;\n await fn({ unpoll: unwatch });\n await wait(interval);\n poll2();\n };\n poll2();\n };\n watch();\n return unwatch;\n }\n var init_poll = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/poll.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_wait();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withCache.js\n function getCache(cacheKey2) {\n const buildCache = (cacheKey3, cache) => ({\n clear: () => cache.delete(cacheKey3),\n get: () => cache.get(cacheKey3),\n set: (data) => cache.set(cacheKey3, data)\n });\n const promise = buildCache(cacheKey2, promiseCache);\n const response = buildCache(cacheKey2, responseCache);\n return {\n clear: () => {\n promise.clear();\n response.clear();\n },\n promise,\n response\n };\n }\n async function withCache(fn, { cacheKey: cacheKey2, cacheTime = Number.POSITIVE_INFINITY }) {\n const cache = getCache(cacheKey2);\n const response = cache.response.get();\n if (response && cacheTime > 0) {\n const age = Date.now() - response.created.getTime();\n if (age < cacheTime)\n return response.data;\n }\n let promise = cache.promise.get();\n if (!promise) {\n promise = fn();\n cache.promise.set(promise);\n }\n try {\n const data = await promise;\n cache.response.set({ created: /* @__PURE__ */ new Date(), data });\n return data;\n } finally {\n cache.promise.clear();\n }\n }\n var promiseCache, responseCache;\n var init_withCache = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withCache.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n promiseCache = /* @__PURE__ */ new Map();\n responseCache = /* @__PURE__ */ new Map();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlockNumber.js\n async function getBlockNumber(client, { cacheTime = client.cacheTime } = {}) {\n const blockNumberHex = await withCache(() => client.request({\n method: \"eth_blockNumber\"\n }), { cacheKey: cacheKey(client.uid), cacheTime });\n return BigInt(blockNumberHex);\n }\n var cacheKey;\n var init_getBlockNumber = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlockNumber.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_withCache();\n cacheKey = (id) => `blockNumber.${id}`;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFilterChanges.js\n async function getFilterChanges(_client, { filter }) {\n const strict = \"strict\" in filter && filter.strict;\n const logs = await filter.request({\n method: \"eth_getFilterChanges\",\n params: [filter.id]\n });\n if (typeof logs[0] === \"string\")\n return logs;\n const formattedLogs = logs.map((log) => formatLog(log));\n if (!(\"abi\" in filter) || !filter.abi)\n return formattedLogs;\n return parseEventLogs({\n abi: filter.abi,\n logs: formattedLogs,\n strict\n });\n }\n var init_getFilterChanges = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFilterChanges.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseEventLogs();\n init_log2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/uninstallFilter.js\n async function uninstallFilter(_client, { filter }) {\n return filter.request({\n method: \"eth_uninstallFilter\",\n params: [filter.id]\n });\n }\n var init_uninstallFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/uninstallFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchContractEvent.js\n function watchContractEvent(client, parameters) {\n const { abi: abi2, address, args, batch = true, eventName, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ } = parameters;\n const enablePolling = (() => {\n if (typeof poll_ !== \"undefined\")\n return poll_;\n if (typeof fromBlock === \"bigint\")\n return true;\n if (client.transport.type === \"webSocket\" || client.transport.type === \"ipc\")\n return false;\n if (client.transport.type === \"fallback\" && (client.transport.transports[0].config.type === \"webSocket\" || client.transport.transports[0].config.type === \"ipc\"))\n return false;\n return true;\n })();\n const pollContractEvent = () => {\n const strict = strict_ ?? false;\n const observerId = stringify([\n \"watchContractEvent\",\n address,\n args,\n batch,\n client.uid,\n eventName,\n pollingInterval,\n strict,\n fromBlock\n ]);\n return observe(observerId, { onLogs, onError }, (emit2) => {\n let previousBlockNumber;\n if (fromBlock !== void 0)\n previousBlockNumber = fromBlock - 1n;\n let filter;\n let initialized = false;\n const unwatch = poll(async () => {\n if (!initialized) {\n try {\n filter = await getAction(client, createContractEventFilter, \"createContractEventFilter\")({\n abi: abi2,\n address,\n args,\n eventName,\n strict,\n fromBlock\n });\n } catch {\n }\n initialized = true;\n return;\n }\n try {\n let logs;\n if (filter) {\n logs = await getAction(client, getFilterChanges, \"getFilterChanges\")({ filter });\n } else {\n const blockNumber = await getAction(client, getBlockNumber, \"getBlockNumber\")({});\n if (previousBlockNumber && previousBlockNumber < blockNumber) {\n logs = await getAction(client, getContractEvents, \"getContractEvents\")({\n abi: abi2,\n address,\n args,\n eventName,\n fromBlock: previousBlockNumber + 1n,\n toBlock: blockNumber,\n strict\n });\n } else {\n logs = [];\n }\n previousBlockNumber = blockNumber;\n }\n if (logs.length === 0)\n return;\n if (batch)\n emit2.onLogs(logs);\n else\n for (const log of logs)\n emit2.onLogs([log]);\n } catch (err) {\n if (filter && err instanceof InvalidInputRpcError)\n initialized = false;\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval\n });\n return async () => {\n if (filter)\n await getAction(client, uninstallFilter, \"uninstallFilter\")({ filter });\n unwatch();\n };\n });\n };\n const subscribeContractEvent = () => {\n const strict = strict_ ?? false;\n const observerId = stringify([\n \"watchContractEvent\",\n address,\n args,\n batch,\n client.uid,\n eventName,\n pollingInterval,\n strict\n ]);\n let active = true;\n let unsubscribe = () => active = false;\n return observe(observerId, { onLogs, onError }, (emit2) => {\n ;\n (async () => {\n try {\n const transport = (() => {\n if (client.transport.type === \"fallback\") {\n const transport2 = client.transport.transports.find((transport3) => transport3.config.type === \"webSocket\" || transport3.config.type === \"ipc\");\n if (!transport2)\n return client.transport;\n return transport2.value;\n }\n return client.transport;\n })();\n const topics = eventName ? encodeEventTopics({\n abi: abi2,\n eventName,\n args\n }) : [];\n const { unsubscribe: unsubscribe_ } = await transport.subscribe({\n params: [\"logs\", { address, topics }],\n onData(data) {\n if (!active)\n return;\n const log = data.result;\n try {\n const { eventName: eventName2, args: args2 } = decodeEventLog({\n abi: abi2,\n data: log.data,\n topics: log.topics,\n strict: strict_\n });\n const formatted = formatLog(log, {\n args: args2,\n eventName: eventName2\n });\n emit2.onLogs([formatted]);\n } catch (err) {\n let eventName2;\n let isUnnamed;\n if (err instanceof DecodeLogDataMismatch || err instanceof DecodeLogTopicsMismatch) {\n if (strict_)\n return;\n eventName2 = err.abiItem.name;\n isUnnamed = err.abiItem.inputs?.some((x4) => !(\"name\" in x4 && x4.name));\n }\n const formatted = formatLog(log, {\n args: isUnnamed ? [] : {},\n eventName: eventName2\n });\n emit2.onLogs([formatted]);\n }\n },\n onError(error) {\n emit2.onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n });\n };\n return enablePolling ? pollContractEvent() : subscribeContractEvent();\n }\n var init_watchContractEvent = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchContractEvent.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_rpc();\n init_decodeEventLog();\n init_encodeEventTopics();\n init_log2();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_createContractEventFilter();\n init_getBlockNumber();\n init_getContractEvents();\n init_getFilterChanges();\n init_uninstallFilter();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/account.js\n var AccountNotFoundError, AccountTypeNotSupportedError;\n var init_account = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/account.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n AccountNotFoundError = class extends BaseError2 {\n constructor({ docsPath: docsPath8 } = {}) {\n super([\n \"Could not find an Account to execute with this Action.\",\n \"Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n docsSlug: \"account\",\n name: \"AccountNotFoundError\"\n });\n }\n };\n AccountTypeNotSupportedError = class extends BaseError2 {\n constructor({ docsPath: docsPath8, metaMessages, type }) {\n super(`Account type \"${type}\" is not supported.`, {\n docsPath: docsPath8,\n metaMessages,\n name: \"AccountTypeNotSupportedError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/assertCurrentChain.js\n function assertCurrentChain({ chain: chain2, currentChainId }) {\n if (!chain2)\n throw new ChainNotFoundError();\n if (currentChainId !== chain2.id)\n throw new ChainMismatchError({ chain: chain2, currentChainId });\n }\n var init_assertCurrentChain = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/assertCurrentChain.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chain();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getTransactionError.js\n function getTransactionError(err, { docsPath: docsPath8, ...args }) {\n const cause = (() => {\n const cause2 = getNodeError(err, args);\n if (cause2 instanceof UnknownNodeError)\n return err;\n return cause2;\n })();\n return new TransactionExecutionError(cause, {\n docsPath: docsPath8,\n ...args\n });\n }\n var init_getTransactionError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getTransactionError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_node();\n init_transaction();\n init_getNodeError();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendRawTransaction.js\n async function sendRawTransaction(client, { serializedTransaction }) {\n return client.request({\n method: \"eth_sendRawTransaction\",\n params: [serializedTransaction]\n }, { retryCount: 0 });\n }\n var init_sendRawTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendRawTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendTransaction.js\n async function sendTransaction(client, parameters) {\n const { account: account_ = client.account, chain: chain2 = client.chain, accessList, authorizationList, blobs, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, type, value, ...rest } = parameters;\n if (typeof account_ === \"undefined\")\n throw new AccountNotFoundError({\n docsPath: \"/docs/actions/wallet/sendTransaction\"\n });\n const account = account_ ? parseAccount(account_) : null;\n try {\n assertRequest(parameters);\n const to = await (async () => {\n if (parameters.to)\n return parameters.to;\n if (parameters.to === null)\n return void 0;\n if (authorizationList && authorizationList.length > 0)\n return await recoverAuthorizationAddress({\n authorization: authorizationList[0]\n }).catch(() => {\n throw new BaseError2(\"`to` is required. Could not infer from `authorizationList`.\");\n });\n return void 0;\n })();\n if (account?.type === \"json-rpc\" || account === null) {\n let chainId;\n if (chain2 !== null) {\n chainId = await getAction(client, getChainId, \"getChainId\")({});\n assertCurrentChain({\n currentChainId: chainId,\n chain: chain2\n });\n }\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n accessList,\n account,\n authorizationList,\n blobs,\n chainId,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n type,\n value\n }, \"sendTransaction\");\n const isWalletNamespaceSupported = supportsWalletNamespace.get(client.uid);\n const method = isWalletNamespaceSupported ? \"wallet_sendTransaction\" : \"eth_sendTransaction\";\n try {\n return await client.request({\n method,\n params: [request]\n }, { retryCount: 0 });\n } catch (e2) {\n if (isWalletNamespaceSupported === false)\n throw e2;\n const error = e2;\n if (error.name === \"InvalidInputRpcError\" || error.name === \"InvalidParamsRpcError\" || error.name === \"MethodNotFoundRpcError\" || error.name === \"MethodNotSupportedRpcError\") {\n return await client.request({\n method: \"wallet_sendTransaction\",\n params: [request]\n }, { retryCount: 0 }).then((hash3) => {\n supportsWalletNamespace.set(client.uid, true);\n return hash3;\n }).catch((e3) => {\n const walletNamespaceError = e3;\n if (walletNamespaceError.name === \"MethodNotFoundRpcError\" || walletNamespaceError.name === \"MethodNotSupportedRpcError\") {\n supportsWalletNamespace.set(client.uid, false);\n throw error;\n }\n throw walletNamespaceError;\n });\n }\n throw error;\n }\n }\n if (account?.type === \"local\") {\n const request = await getAction(client, prepareTransactionRequest, \"prepareTransactionRequest\")({\n account,\n accessList,\n authorizationList,\n blobs,\n chain: chain2,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n nonceManager: account.nonceManager,\n parameters: [...defaultParameters, \"sidecars\"],\n type,\n value,\n ...rest,\n to\n });\n const serializer = chain2?.serializers?.transaction;\n const serializedTransaction = await account.signTransaction(request, {\n serializer\n });\n return await getAction(client, sendRawTransaction, \"sendRawTransaction\")({\n serializedTransaction\n });\n }\n if (account?.type === \"smart\")\n throw new AccountTypeNotSupportedError({\n metaMessages: [\n \"Consider using the `sendUserOperation` Action instead.\"\n ],\n docsPath: \"/docs/actions/bundler/sendUserOperation\",\n type: \"smart\"\n });\n throw new AccountTypeNotSupportedError({\n docsPath: \"/docs/actions/wallet/sendTransaction\",\n type: account?.type\n });\n } catch (err) {\n if (err instanceof AccountTypeNotSupportedError)\n throw err;\n throw getTransactionError(err, {\n ...parameters,\n account,\n chain: parameters.chain || void 0\n });\n }\n }\n var supportsWalletNamespace;\n var init_sendTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_account();\n init_base();\n init_recoverAuthorizationAddress();\n init_assertCurrentChain();\n init_getTransactionError();\n init_extract();\n init_transactionRequest();\n init_getAction();\n init_lru();\n init_assertRequest();\n init_getChainId();\n init_prepareTransactionRequest();\n init_sendRawTransaction();\n supportsWalletNamespace = new LruMap(128);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/writeContract.js\n async function writeContract(client, parameters) {\n return writeContract.internal(client, sendTransaction, \"sendTransaction\", parameters);\n }\n var init_writeContract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/writeContract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_account();\n init_encodeFunctionData();\n init_getContractError();\n init_getAction();\n init_sendTransaction();\n (function(writeContract2) {\n async function internal(client, actionFn, name, parameters) {\n const { abi: abi2, account: account_ = client.account, address, args, dataSuffix, functionName, ...request } = parameters;\n if (typeof account_ === \"undefined\")\n throw new AccountNotFoundError({\n docsPath: \"/docs/contract/writeContract\"\n });\n const account = account_ ? parseAccount(account_) : null;\n const data = encodeFunctionData({\n abi: abi2,\n args,\n functionName\n });\n try {\n return await getAction(client, actionFn, name)({\n data: `${data}${dataSuffix ? dataSuffix.replace(\"0x\", \"\") : \"\"}`,\n to: address,\n account,\n ...request\n });\n } catch (error) {\n throw getContractError(error, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/writeContract\",\n functionName,\n sender: account?.address\n });\n }\n }\n writeContract2.internal = internal;\n })(writeContract || (writeContract = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/getContract.js\n function getContract({ abi: abi2, address, client: client_ }) {\n const client = client_;\n const [publicClient, walletClient] = (() => {\n if (!client)\n return [void 0, void 0];\n if (\"public\" in client && \"wallet\" in client)\n return [client.public, client.wallet];\n if (\"public\" in client)\n return [client.public, void 0];\n if (\"wallet\" in client)\n return [void 0, client.wallet];\n return [client, client];\n })();\n const hasPublicClient = publicClient !== void 0 && publicClient !== null;\n const hasWalletClient = walletClient !== void 0 && walletClient !== null;\n const contract = {};\n let hasReadFunction = false;\n let hasWriteFunction = false;\n let hasEvent = false;\n for (const item of abi2) {\n if (item.type === \"function\")\n if (item.stateMutability === \"view\" || item.stateMutability === \"pure\")\n hasReadFunction = true;\n else\n hasWriteFunction = true;\n else if (item.type === \"event\")\n hasEvent = true;\n if (hasReadFunction && hasWriteFunction && hasEvent)\n break;\n }\n if (hasPublicClient) {\n if (hasReadFunction)\n contract.read = new Proxy({}, {\n get(_2, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n return getAction(publicClient, readContract, \"readContract\")({\n abi: abi2,\n address,\n functionName,\n args,\n ...options\n });\n };\n }\n });\n if (hasWriteFunction)\n contract.simulate = new Proxy({}, {\n get(_2, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n return getAction(publicClient, simulateContract, \"simulateContract\")({\n abi: abi2,\n address,\n functionName,\n args,\n ...options\n });\n };\n }\n });\n if (hasEvent) {\n contract.createEventFilter = new Proxy({}, {\n get(_2, eventName) {\n return (...parameters) => {\n const abiEvent = abi2.find((x4) => x4.type === \"event\" && x4.name === eventName);\n const { args, options } = getEventParameters(parameters, abiEvent);\n return getAction(publicClient, createContractEventFilter, \"createContractEventFilter\")({\n abi: abi2,\n address,\n eventName,\n args,\n ...options\n });\n };\n }\n });\n contract.getEvents = new Proxy({}, {\n get(_2, eventName) {\n return (...parameters) => {\n const abiEvent = abi2.find((x4) => x4.type === \"event\" && x4.name === eventName);\n const { args, options } = getEventParameters(parameters, abiEvent);\n return getAction(publicClient, getContractEvents, \"getContractEvents\")({\n abi: abi2,\n address,\n eventName,\n args,\n ...options\n });\n };\n }\n });\n contract.watchEvent = new Proxy({}, {\n get(_2, eventName) {\n return (...parameters) => {\n const abiEvent = abi2.find((x4) => x4.type === \"event\" && x4.name === eventName);\n const { args, options } = getEventParameters(parameters, abiEvent);\n return getAction(publicClient, watchContractEvent, \"watchContractEvent\")({\n abi: abi2,\n address,\n eventName,\n args,\n ...options\n });\n };\n }\n });\n }\n }\n if (hasWalletClient) {\n if (hasWriteFunction)\n contract.write = new Proxy({}, {\n get(_2, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n return getAction(walletClient, writeContract, \"writeContract\")({\n abi: abi2,\n address,\n functionName,\n args,\n ...options\n });\n };\n }\n });\n }\n if (hasPublicClient || hasWalletClient) {\n if (hasWriteFunction)\n contract.estimateGas = new Proxy({}, {\n get(_2, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n const client2 = publicClient ?? walletClient;\n return getAction(client2, estimateContractGas, \"estimateContractGas\")({\n abi: abi2,\n address,\n functionName,\n args,\n ...options,\n account: options.account ?? walletClient.account\n });\n };\n }\n });\n }\n contract.address = address;\n contract.abi = abi2;\n return contract;\n }\n function getFunctionParameters(values) {\n const hasArgs = values.length && Array.isArray(values[0]);\n const args = hasArgs ? values[0] : [];\n const options = (hasArgs ? values[1] : values[0]) ?? {};\n return { args, options };\n }\n function getEventParameters(values, abiEvent) {\n let hasArgs = false;\n if (Array.isArray(values[0]))\n hasArgs = true;\n else if (values.length === 1) {\n hasArgs = abiEvent.inputs.some((x4) => x4.indexed);\n } else if (values.length === 2) {\n hasArgs = true;\n }\n const args = hasArgs ? values[0] : void 0;\n const options = (hasArgs ? values[1] : values[0]) ?? {};\n return { args, options };\n }\n var init_getContract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/getContract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAction();\n init_createContractEventFilter();\n init_estimateContractGas();\n init_getContractEvents();\n init_readContract();\n init_simulateContract();\n init_watchContractEvent();\n init_writeContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withRetry.js\n function withRetry(fn, { delay: delay_ = 100, retryCount = 2, shouldRetry: shouldRetry2 = () => true } = {}) {\n return new Promise((resolve, reject) => {\n const attemptRetry = async ({ count = 0 } = {}) => {\n const retry = async ({ error }) => {\n const delay = typeof delay_ === \"function\" ? delay_({ count, error }) : delay_;\n if (delay)\n await wait(delay);\n attemptRetry({ count: count + 1 });\n };\n try {\n const data = await fn();\n resolve(data);\n } catch (err) {\n if (count < retryCount && await shouldRetry2({ count, error: err }))\n return retry({ error: err });\n reject(err);\n }\n };\n attemptRetry();\n });\n }\n var init_withRetry = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withRetry.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_wait();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transactionReceipt.js\n function formatTransactionReceipt(transactionReceipt, _2) {\n const receipt = {\n ...transactionReceipt,\n blockNumber: transactionReceipt.blockNumber ? BigInt(transactionReceipt.blockNumber) : null,\n contractAddress: transactionReceipt.contractAddress ? transactionReceipt.contractAddress : null,\n cumulativeGasUsed: transactionReceipt.cumulativeGasUsed ? BigInt(transactionReceipt.cumulativeGasUsed) : null,\n effectiveGasPrice: transactionReceipt.effectiveGasPrice ? BigInt(transactionReceipt.effectiveGasPrice) : null,\n gasUsed: transactionReceipt.gasUsed ? BigInt(transactionReceipt.gasUsed) : null,\n logs: transactionReceipt.logs ? transactionReceipt.logs.map((log) => formatLog(log)) : null,\n to: transactionReceipt.to ? transactionReceipt.to : null,\n transactionIndex: transactionReceipt.transactionIndex ? hexToNumber(transactionReceipt.transactionIndex) : null,\n status: transactionReceipt.status ? receiptStatuses[transactionReceipt.status] : null,\n type: transactionReceipt.type ? transactionType[transactionReceipt.type] || transactionReceipt.type : null\n };\n if (transactionReceipt.blobGasPrice)\n receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice);\n if (transactionReceipt.blobGasUsed)\n receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed);\n return receipt;\n }\n var receiptStatuses, defineTransactionReceipt;\n var init_transactionReceipt = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transactionReceipt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_formatter();\n init_log2();\n init_transaction2();\n receiptStatuses = {\n \"0x0\": \"reverted\",\n \"0x1\": \"success\"\n };\n defineTransactionReceipt = /* @__PURE__ */ defineFormatter(\"transactionReceipt\", formatTransactionReceipt);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/uid.js\n function uid(length = 11) {\n if (!buffer || index + length > size4 * 2) {\n buffer = \"\";\n index = 0;\n for (let i3 = 0; i3 < size4; i3++) {\n buffer += (256 + Math.random() * 256 | 0).toString(16).substring(1);\n }\n }\n return buffer.substring(index, index++ + length);\n }\n var size4, index, buffer;\n var init_uid = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/uid.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n size4 = 256;\n index = size4;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/createClient.js\n function createClient(parameters) {\n const { batch, chain: chain2, ccipRead, key = \"base\", name = \"Base Client\", type = \"base\" } = parameters;\n const experimental_blockTag = parameters.experimental_blockTag ?? (typeof chain2?.experimental_preconfirmationTime === \"number\" ? \"pending\" : void 0);\n const blockTime = chain2?.blockTime ?? 12e3;\n const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4e3);\n const pollingInterval = parameters.pollingInterval ?? defaultPollingInterval;\n const cacheTime = parameters.cacheTime ?? pollingInterval;\n const account = parameters.account ? parseAccount(parameters.account) : void 0;\n const { config: config2, request, value } = parameters.transport({\n chain: chain2,\n pollingInterval\n });\n const transport = { ...config2, ...value };\n const client = {\n account,\n batch,\n cacheTime,\n ccipRead,\n chain: chain2,\n key,\n name,\n pollingInterval,\n request,\n transport,\n type,\n uid: uid(),\n ...experimental_blockTag ? { experimental_blockTag } : {}\n };\n function extend(base4) {\n return (extendFn) => {\n const extended = extendFn(base4);\n for (const key2 in client)\n delete extended[key2];\n const combined = { ...base4, ...extended };\n return Object.assign(combined, { extend: extend(combined) });\n };\n }\n return Object.assign(client, { extend: extend(client) });\n }\n var init_createClient = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/createClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_uid();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/errors.js\n function isNullUniversalResolverError(err) {\n if (!(err instanceof BaseError2))\n return false;\n const cause = err.walk((e2) => e2 instanceof ContractFunctionRevertedError);\n if (!(cause instanceof ContractFunctionRevertedError))\n return false;\n if (cause.data?.errorName === \"HttpError\")\n return true;\n if (cause.data?.errorName === \"ResolverError\")\n return true;\n if (cause.data?.errorName === \"ResolverNotContract\")\n return true;\n if (cause.data?.errorName === \"ResolverNotFound\")\n return true;\n if (cause.data?.errorName === \"ReverseAddressMismatch\")\n return true;\n if (cause.data?.errorName === \"UnsupportedResolverProfile\")\n return true;\n return false;\n }\n var init_errors4 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_contract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/encodedLabelToLabelhash.js\n function encodedLabelToLabelhash(label) {\n if (label.length !== 66)\n return null;\n if (label.indexOf(\"[\") !== 0)\n return null;\n if (label.indexOf(\"]\") !== 65)\n return null;\n const hash3 = `0x${label.slice(1, 65)}`;\n if (!isHex(hash3))\n return null;\n return hash3;\n }\n var init_encodedLabelToLabelhash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/encodedLabelToLabelhash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/namehash.js\n function namehash(name) {\n let result = new Uint8Array(32).fill(0);\n if (!name)\n return bytesToHex(result);\n const labels = name.split(\".\");\n for (let i3 = labels.length - 1; i3 >= 0; i3 -= 1) {\n const hashFromEncodedLabel = encodedLabelToLabelhash(labels[i3]);\n const hashed = hashFromEncodedLabel ? toBytes(hashFromEncodedLabel) : keccak256(stringToBytes(labels[i3]), \"bytes\");\n result = keccak256(concat([result, hashed]), \"bytes\");\n }\n return bytesToHex(result);\n }\n var init_namehash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/namehash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_concat();\n init_toBytes();\n init_toHex();\n init_keccak256();\n init_encodedLabelToLabelhash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/encodeLabelhash.js\n function encodeLabelhash(hash3) {\n return `[${hash3.slice(2)}]`;\n }\n var init_encodeLabelhash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/encodeLabelhash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/labelhash.js\n function labelhash(label) {\n const result = new Uint8Array(32).fill(0);\n if (!label)\n return bytesToHex(result);\n return encodedLabelToLabelhash(label) || keccak256(stringToBytes(label));\n }\n var init_labelhash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/labelhash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_toHex();\n init_keccak256();\n init_encodedLabelToLabelhash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/packetToBytes.js\n function packetToBytes(packet) {\n const value = packet.replace(/^\\.|\\.$/gm, \"\");\n if (value.length === 0)\n return new Uint8Array(1);\n const bytes = new Uint8Array(stringToBytes(value).byteLength + 2);\n let offset = 0;\n const list = value.split(\".\");\n for (let i3 = 0; i3 < list.length; i3++) {\n let encoded = stringToBytes(list[i3]);\n if (encoded.byteLength > 255)\n encoded = stringToBytes(encodeLabelhash(labelhash(list[i3])));\n bytes[offset] = encoded.length;\n bytes.set(encoded, offset + 1);\n offset += encoded.length + 1;\n }\n if (bytes.byteLength !== offset + 1)\n return bytes.slice(0, offset + 1);\n return bytes;\n }\n var init_packetToBytes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/packetToBytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_encodeLabelhash();\n init_labelhash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsAddress.js\n async function getEnsAddress(client, parameters) {\n const { blockNumber, blockTag, coinType, name, gatewayUrls, strict } = parameters;\n const { chain: chain2 } = client;\n const universalResolverAddress = (() => {\n if (parameters.universalResolverAddress)\n return parameters.universalResolverAddress;\n if (!chain2)\n throw new Error(\"client chain not configured. universalResolverAddress is required.\");\n return getChainContractAddress({\n blockNumber,\n chain: chain2,\n contract: \"ensUniversalResolver\"\n });\n })();\n const tlds = chain2?.ensTlds;\n if (tlds && !tlds.some((tld) => name.endsWith(tld)))\n return null;\n const args = (() => {\n if (coinType != null)\n return [namehash(name), BigInt(coinType)];\n return [namehash(name)];\n })();\n try {\n const functionData = encodeFunctionData({\n abi: addressResolverAbi,\n functionName: \"addr\",\n args\n });\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverResolveAbi,\n functionName: \"resolveWithGateways\",\n args: [\n toHex(packetToBytes(name)),\n functionData,\n gatewayUrls ?? [localBatchGatewayUrl]\n ],\n blockNumber,\n blockTag\n };\n const readContractAction = getAction(client, readContract, \"readContract\");\n const res = await readContractAction(readContractParameters);\n if (res[0] === \"0x\")\n return null;\n const address = decodeFunctionResult({\n abi: addressResolverAbi,\n args,\n functionName: \"addr\",\n data: res[0]\n });\n if (address === \"0x\")\n return null;\n if (trim(address) === \"0x00\")\n return null;\n return address;\n } catch (err) {\n if (strict)\n throw err;\n if (isNullUniversalResolverError(err))\n return null;\n throw err;\n }\n }\n var init_getEnsAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getChainContractAddress();\n init_trim();\n init_toHex();\n init_errors4();\n init_localBatchGatewayRequest();\n init_namehash();\n init_packetToBytes();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/ens.js\n var EnsAvatarInvalidMetadataError, EnsAvatarInvalidNftUriError, EnsAvatarUriResolutionError, EnsAvatarUnsupportedNamespaceError;\n var init_ens = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/ens.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n EnsAvatarInvalidMetadataError = class extends BaseError2 {\n constructor({ data }) {\n super(\"Unable to extract image from metadata. The metadata may be malformed or invalid.\", {\n metaMessages: [\n \"- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.\",\n \"\",\n `Provided data: ${JSON.stringify(data)}`\n ],\n name: \"EnsAvatarInvalidMetadataError\"\n });\n }\n };\n EnsAvatarInvalidNftUriError = class extends BaseError2 {\n constructor({ reason }) {\n super(`ENS NFT avatar URI is invalid. ${reason}`, {\n name: \"EnsAvatarInvalidNftUriError\"\n });\n }\n };\n EnsAvatarUriResolutionError = class extends BaseError2 {\n constructor({ uri }) {\n super(`Unable to resolve ENS avatar URI \"${uri}\". The URI may be malformed, invalid, or does not respond with a valid image.`, { name: \"EnsAvatarUriResolutionError\" });\n }\n };\n EnsAvatarUnsupportedNamespaceError = class extends BaseError2 {\n constructor({ namespace }) {\n super(`ENS NFT avatar namespace \"${namespace}\" is not supported. Must be \"erc721\" or \"erc1155\".`, { name: \"EnsAvatarUnsupportedNamespaceError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/avatar/utils.js\n async function isImageUri(uri) {\n try {\n const res = await fetch(uri, { method: \"HEAD\" });\n if (res.status === 200) {\n const contentType = res.headers.get(\"content-type\");\n return contentType?.startsWith(\"image/\");\n }\n return false;\n } catch (error) {\n if (typeof error === \"object\" && typeof error.response !== \"undefined\") {\n return false;\n }\n if (!Object.hasOwn(globalThis, \"Image\"))\n return false;\n return new Promise((resolve) => {\n const img = new Image();\n img.onload = () => {\n resolve(true);\n };\n img.onerror = () => {\n resolve(false);\n };\n img.src = uri;\n });\n }\n }\n function getGateway(custom3, defaultGateway) {\n if (!custom3)\n return defaultGateway;\n if (custom3.endsWith(\"/\"))\n return custom3.slice(0, -1);\n return custom3;\n }\n function resolveAvatarUri({ uri, gatewayUrls }) {\n const isEncoded = base64Regex.test(uri);\n if (isEncoded)\n return { uri, isOnChain: true, isEncoded };\n const ipfsGateway = getGateway(gatewayUrls?.ipfs, \"https://ipfs.io\");\n const arweaveGateway = getGateway(gatewayUrls?.arweave, \"https://arweave.net\");\n const networkRegexMatch = uri.match(networkRegex);\n const { protocol, subpath, target, subtarget = \"\" } = networkRegexMatch?.groups || {};\n const isIPNS = protocol === \"ipns:/\" || subpath === \"ipns/\";\n const isIPFS = protocol === \"ipfs:/\" || subpath === \"ipfs/\" || ipfsHashRegex.test(uri);\n if (uri.startsWith(\"http\") && !isIPNS && !isIPFS) {\n let replacedUri = uri;\n if (gatewayUrls?.arweave)\n replacedUri = uri.replace(/https:\\/\\/arweave.net/g, gatewayUrls?.arweave);\n return { uri: replacedUri, isOnChain: false, isEncoded: false };\n }\n if ((isIPNS || isIPFS) && target) {\n return {\n uri: `${ipfsGateway}/${isIPNS ? \"ipns\" : \"ipfs\"}/${target}${subtarget}`,\n isOnChain: false,\n isEncoded: false\n };\n }\n if (protocol === \"ar:/\" && target) {\n return {\n uri: `${arweaveGateway}/${target}${subtarget || \"\"}`,\n isOnChain: false,\n isEncoded: false\n };\n }\n let parsedUri = uri.replace(dataURIRegex, \"\");\n if (parsedUri.startsWith(\" res2.json());\n const image = await parseAvatarUri({\n gatewayUrls,\n uri: getJsonImage(res)\n });\n return image;\n } catch {\n throw new EnsAvatarUriResolutionError({ uri });\n }\n }\n async function parseAvatarUri({ gatewayUrls, uri }) {\n const { uri: resolvedURI, isOnChain } = resolveAvatarUri({ uri, gatewayUrls });\n if (isOnChain)\n return resolvedURI;\n const isImage = await isImageUri(resolvedURI);\n if (isImage)\n return resolvedURI;\n throw new EnsAvatarUriResolutionError({ uri });\n }\n function parseNftUri(uri_) {\n let uri = uri_;\n if (uri.startsWith(\"did:nft:\")) {\n uri = uri.replace(\"did:nft:\", \"\").replace(/_/g, \"/\");\n }\n const [reference, asset_namespace, tokenID] = uri.split(\"/\");\n const [eip_namespace, chainID] = reference.split(\":\");\n const [erc_namespace, contractAddress] = asset_namespace.split(\":\");\n if (!eip_namespace || eip_namespace.toLowerCase() !== \"eip155\")\n throw new EnsAvatarInvalidNftUriError({ reason: \"Only EIP-155 supported\" });\n if (!chainID)\n throw new EnsAvatarInvalidNftUriError({ reason: \"Chain ID not found\" });\n if (!contractAddress)\n throw new EnsAvatarInvalidNftUriError({\n reason: \"Contract address not found\"\n });\n if (!tokenID)\n throw new EnsAvatarInvalidNftUriError({ reason: \"Token ID not found\" });\n if (!erc_namespace)\n throw new EnsAvatarInvalidNftUriError({ reason: \"ERC namespace not found\" });\n return {\n chainID: Number.parseInt(chainID, 10),\n namespace: erc_namespace.toLowerCase(),\n contractAddress,\n tokenID\n };\n }\n async function getNftTokenUri(client, { nft }) {\n if (nft.namespace === \"erc721\") {\n return readContract(client, {\n address: nft.contractAddress,\n abi: [\n {\n name: \"tokenURI\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [{ name: \"tokenId\", type: \"uint256\" }],\n outputs: [{ name: \"\", type: \"string\" }]\n }\n ],\n functionName: \"tokenURI\",\n args: [BigInt(nft.tokenID)]\n });\n }\n if (nft.namespace === \"erc1155\") {\n return readContract(client, {\n address: nft.contractAddress,\n abi: [\n {\n name: \"uri\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [{ name: \"_id\", type: \"uint256\" }],\n outputs: [{ name: \"\", type: \"string\" }]\n }\n ],\n functionName: \"uri\",\n args: [BigInt(nft.tokenID)]\n });\n }\n throw new EnsAvatarUnsupportedNamespaceError({ namespace: nft.namespace });\n }\n var networkRegex, ipfsHashRegex, base64Regex, dataURIRegex;\n var init_utils6 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/avatar/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_readContract();\n init_ens();\n networkRegex = /(?https?:\\/\\/[^/]*|ipfs:\\/|ipns:\\/|ar:\\/)?(?\\/)?(?ipfs\\/|ipns\\/)?(?[\\w\\-.]+)(?\\/.*)?/;\n ipfsHashRegex = /^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\\/(?[\\w\\-.]+))?(?\\/.*)?$/;\n base64Regex = /^data:([a-zA-Z\\-/+]*);base64,([^\"].*)/;\n dataURIRegex = /^data:([a-zA-Z\\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/avatar/parseAvatarRecord.js\n async function parseAvatarRecord(client, { gatewayUrls, record }) {\n if (/eip155:/i.test(record))\n return parseNftAvatarUri(client, { gatewayUrls, record });\n return parseAvatarUri({ uri: record, gatewayUrls });\n }\n async function parseNftAvatarUri(client, { gatewayUrls, record }) {\n const nft = parseNftUri(record);\n const nftUri = await getNftTokenUri(client, { nft });\n const { uri: resolvedNftUri, isOnChain, isEncoded } = resolveAvatarUri({ uri: nftUri, gatewayUrls });\n if (isOnChain && (resolvedNftUri.includes(\"data:application/json;base64,\") || resolvedNftUri.startsWith(\"{\"))) {\n const encodedJson = isEncoded ? (\n // if it is encoded, decode it\n atob(resolvedNftUri.replace(\"data:application/json;base64,\", \"\"))\n ) : (\n // if it isn't encoded assume it is a JSON string, but it could be anything (it will error if it is)\n resolvedNftUri\n );\n const decoded = JSON.parse(encodedJson);\n return parseAvatarUri({ uri: getJsonImage(decoded), gatewayUrls });\n }\n let uriTokenId = nft.tokenID;\n if (nft.namespace === \"erc1155\")\n uriTokenId = uriTokenId.replace(\"0x\", \"\").padStart(64, \"0\");\n return getMetadataAvatarUri({\n gatewayUrls,\n uri: resolvedNftUri.replace(/(?:0x)?{id}/, uriTokenId)\n });\n }\n var init_parseAvatarRecord = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/avatar/parseAvatarRecord.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils6();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsText.js\n async function getEnsText(client, parameters) {\n const { blockNumber, blockTag, key, name, gatewayUrls, strict } = parameters;\n const { chain: chain2 } = client;\n const universalResolverAddress = (() => {\n if (parameters.universalResolverAddress)\n return parameters.universalResolverAddress;\n if (!chain2)\n throw new Error(\"client chain not configured. universalResolverAddress is required.\");\n return getChainContractAddress({\n blockNumber,\n chain: chain2,\n contract: \"ensUniversalResolver\"\n });\n })();\n const tlds = chain2?.ensTlds;\n if (tlds && !tlds.some((tld) => name.endsWith(tld)))\n return null;\n try {\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverResolveAbi,\n args: [\n toHex(packetToBytes(name)),\n encodeFunctionData({\n abi: textResolverAbi,\n functionName: \"text\",\n args: [namehash(name), key]\n }),\n gatewayUrls ?? [localBatchGatewayUrl]\n ],\n functionName: \"resolveWithGateways\",\n blockNumber,\n blockTag\n };\n const readContractAction = getAction(client, readContract, \"readContract\");\n const res = await readContractAction(readContractParameters);\n if (res[0] === \"0x\")\n return null;\n const record = decodeFunctionResult({\n abi: textResolverAbi,\n functionName: \"text\",\n data: res[0]\n });\n return record === \"\" ? null : record;\n } catch (err) {\n if (strict)\n throw err;\n if (isNullUniversalResolverError(err))\n return null;\n throw err;\n }\n }\n var init_getEnsText = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsText.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getChainContractAddress();\n init_toHex();\n init_errors4();\n init_localBatchGatewayRequest();\n init_namehash();\n init_packetToBytes();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsAvatar.js\n async function getEnsAvatar(client, { blockNumber, blockTag, assetGatewayUrls, name, gatewayUrls, strict, universalResolverAddress }) {\n const record = await getAction(client, getEnsText, \"getEnsText\")({\n blockNumber,\n blockTag,\n key: \"avatar\",\n name,\n universalResolverAddress,\n gatewayUrls,\n strict\n });\n if (!record)\n return null;\n try {\n return await parseAvatarRecord(client, {\n record,\n gatewayUrls: assetGatewayUrls\n });\n } catch {\n return null;\n }\n }\n var init_getEnsAvatar = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsAvatar.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAvatarRecord();\n init_getAction();\n init_getEnsText();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsName.js\n async function getEnsName(client, parameters) {\n const { address, blockNumber, blockTag, coinType = 60n, gatewayUrls, strict } = parameters;\n const { chain: chain2 } = client;\n const universalResolverAddress = (() => {\n if (parameters.universalResolverAddress)\n return parameters.universalResolverAddress;\n if (!chain2)\n throw new Error(\"client chain not configured. universalResolverAddress is required.\");\n return getChainContractAddress({\n blockNumber,\n chain: chain2,\n contract: \"ensUniversalResolver\"\n });\n })();\n try {\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverReverseAbi,\n args: [address, coinType, gatewayUrls ?? [localBatchGatewayUrl]],\n functionName: \"reverseWithGateways\",\n blockNumber,\n blockTag\n };\n const readContractAction = getAction(client, readContract, \"readContract\");\n const [name] = await readContractAction(readContractParameters);\n return name || null;\n } catch (err) {\n if (strict)\n throw err;\n if (isNullUniversalResolverError(err))\n return null;\n throw err;\n }\n }\n var init_getEnsName = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsName.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_getChainContractAddress();\n init_errors4();\n init_localBatchGatewayRequest();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsResolver.js\n async function getEnsResolver(client, parameters) {\n const { blockNumber, blockTag, name } = parameters;\n const { chain: chain2 } = client;\n const universalResolverAddress = (() => {\n if (parameters.universalResolverAddress)\n return parameters.universalResolverAddress;\n if (!chain2)\n throw new Error(\"client chain not configured. universalResolverAddress is required.\");\n return getChainContractAddress({\n blockNumber,\n chain: chain2,\n contract: \"ensUniversalResolver\"\n });\n })();\n const tlds = chain2?.ensTlds;\n if (tlds && !tlds.some((tld) => name.endsWith(tld)))\n throw new Error(`${name} is not a valid ENS TLD (${tlds?.join(\", \")}) for chain \"${chain2.name}\" (id: ${chain2.id}).`);\n const [resolverAddress] = await getAction(client, readContract, \"readContract\")({\n address: universalResolverAddress,\n abi: [\n {\n inputs: [{ type: \"bytes\" }],\n name: \"findResolver\",\n outputs: [\n { type: \"address\" },\n { type: \"bytes32\" },\n { type: \"uint256\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ],\n functionName: \"findResolver\",\n args: [toHex(packetToBytes(name))],\n blockNumber,\n blockTag\n });\n return resolverAddress;\n }\n var init_getEnsResolver = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsResolver.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getChainContractAddress();\n init_toHex();\n init_packetToBytes();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createAccessList.js\n async function createAccessList(client, args) {\n const { account: account_ = client.account, blockNumber, blockTag = \"latest\", blobs, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, to, value, ...rest } = args;\n const account = account_ ? parseAccount(account_) : void 0;\n try {\n assertRequest(args);\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n account,\n blobs,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n to,\n value\n }, \"createAccessList\");\n const response = await client.request({\n method: \"eth_createAccessList\",\n params: [request, block]\n });\n return {\n accessList: response.accessList,\n gasUsed: BigInt(response.gasUsed)\n };\n } catch (err) {\n throw getCallError(err, {\n ...args,\n account,\n chain: client.chain\n });\n }\n }\n var init_createAccessList = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createAccessList.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_toHex();\n init_getCallError();\n init_extract();\n init_transactionRequest();\n init_assertRequest();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createBlockFilter.js\n async function createBlockFilter(client) {\n const getRequest = createFilterRequestScope(client, {\n method: \"eth_newBlockFilter\"\n });\n const id = await client.request({\n method: \"eth_newBlockFilter\"\n });\n return { id, request: getRequest(id), type: \"block\" };\n }\n var init_createBlockFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createBlockFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_createFilterRequestScope();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createEventFilter.js\n async function createEventFilter(client, { address, args, event, events: events_, fromBlock, strict, toBlock } = {}) {\n const events = events_ ?? (event ? [event] : void 0);\n const getRequest = createFilterRequestScope(client, {\n method: \"eth_newFilter\"\n });\n let topics = [];\n if (events) {\n const encoded = events.flatMap((event2) => encodeEventTopics({\n abi: [event2],\n eventName: event2.name,\n args\n }));\n topics = [encoded];\n if (event)\n topics = topics[0];\n }\n const id = await client.request({\n method: \"eth_newFilter\",\n params: [\n {\n address,\n fromBlock: typeof fromBlock === \"bigint\" ? numberToHex(fromBlock) : fromBlock,\n toBlock: typeof toBlock === \"bigint\" ? numberToHex(toBlock) : toBlock,\n ...topics.length ? { topics } : {}\n }\n ]\n });\n return {\n abi: events,\n args,\n eventName: event ? event.name : void 0,\n fromBlock,\n id,\n request: getRequest(id),\n strict: Boolean(strict),\n toBlock,\n type: \"event\"\n };\n }\n var init_createEventFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createEventFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encodeEventTopics();\n init_toHex();\n init_createFilterRequestScope();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createPendingTransactionFilter.js\n async function createPendingTransactionFilter(client) {\n const getRequest = createFilterRequestScope(client, {\n method: \"eth_newPendingTransactionFilter\"\n });\n const id = await client.request({\n method: \"eth_newPendingTransactionFilter\"\n });\n return { id, request: getRequest(id), type: \"transaction\" };\n }\n var init_createPendingTransactionFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createPendingTransactionFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_createFilterRequestScope();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBalance.js\n async function getBalance(client, { address, blockNumber, blockTag = client.experimental_blockTag ?? \"latest\" }) {\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const balance = await client.request({\n method: \"eth_getBalance\",\n params: [address, blockNumberHex || blockTag]\n });\n return BigInt(balance);\n }\n var init_getBalance = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBalance.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlobBaseFee.js\n async function getBlobBaseFee(client) {\n const baseFee = await client.request({\n method: \"eth_blobBaseFee\"\n });\n return BigInt(baseFee);\n }\n var init_getBlobBaseFee = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlobBaseFee.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlockTransactionCount.js\n async function getBlockTransactionCount(client, { blockHash, blockNumber, blockTag = \"latest\" } = {}) {\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n let count;\n if (blockHash) {\n count = await client.request({\n method: \"eth_getBlockTransactionCountByHash\",\n params: [blockHash]\n }, { dedupe: true });\n } else {\n count = await client.request({\n method: \"eth_getBlockTransactionCountByNumber\",\n params: [blockNumberHex || blockTag]\n }, { dedupe: Boolean(blockNumberHex) });\n }\n return hexToNumber(count);\n }\n var init_getBlockTransactionCount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlockTransactionCount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getCode.js\n async function getCode(client, { address, blockNumber, blockTag = \"latest\" }) {\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n const hex = await client.request({\n method: \"eth_getCode\",\n params: [address, blockNumberHex || blockTag]\n }, { dedupe: Boolean(blockNumberHex) });\n if (hex === \"0x\")\n return void 0;\n return hex;\n }\n var init_getCode = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getCode.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/eip712.js\n var Eip712DomainNotFoundError;\n var init_eip712 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/eip712.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n Eip712DomainNotFoundError = class extends BaseError2 {\n constructor({ address }) {\n super(`No EIP-712 domain found on contract \"${address}\".`, {\n metaMessages: [\n \"Ensure that:\",\n `- The contract is deployed at the address \"${address}\".`,\n \"- `eip712Domain()` function exists on the contract.\",\n \"- `eip712Domain()` function matches signature to ERC-5267 specification.\"\n ],\n name: \"Eip712DomainNotFoundError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getEip712Domain.js\n async function getEip712Domain(client, parameters) {\n const { address, factory, factoryData } = parameters;\n try {\n const [fields, name, version7, chainId, verifyingContract, salt, extensions] = await getAction(client, readContract, \"readContract\")({\n abi,\n address,\n functionName: \"eip712Domain\",\n factory,\n factoryData\n });\n return {\n domain: {\n name,\n version: version7,\n chainId: Number(chainId),\n verifyingContract,\n salt\n },\n extensions,\n fields\n };\n } catch (e2) {\n const error = e2;\n if (error.name === \"ContractFunctionExecutionError\" && error.cause.name === \"ContractFunctionZeroDataError\") {\n throw new Eip712DomainNotFoundError({ address });\n }\n throw error;\n }\n }\n var abi;\n var init_getEip712Domain = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getEip712Domain.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_eip712();\n init_getAction();\n init_readContract();\n abi = [\n {\n inputs: [],\n name: \"eip712Domain\",\n outputs: [\n { name: \"fields\", type: \"bytes1\" },\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" },\n { name: \"salt\", type: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/feeHistory.js\n function formatFeeHistory(feeHistory) {\n return {\n baseFeePerGas: feeHistory.baseFeePerGas.map((value) => BigInt(value)),\n gasUsedRatio: feeHistory.gasUsedRatio,\n oldestBlock: BigInt(feeHistory.oldestBlock),\n reward: feeHistory.reward?.map((reward) => reward.map((value) => BigInt(value)))\n };\n }\n var init_feeHistory = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/feeHistory.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFeeHistory.js\n async function getFeeHistory(client, { blockCount, blockNumber, blockTag = \"latest\", rewardPercentiles }) {\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const feeHistory = await client.request({\n method: \"eth_feeHistory\",\n params: [\n numberToHex(blockCount),\n blockNumberHex || blockTag,\n rewardPercentiles\n ]\n }, { dedupe: Boolean(blockNumberHex) });\n return formatFeeHistory(feeHistory);\n }\n var init_getFeeHistory = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFeeHistory.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_feeHistory();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFilterLogs.js\n async function getFilterLogs(_client, { filter }) {\n const strict = filter.strict ?? false;\n const logs = await filter.request({\n method: \"eth_getFilterLogs\",\n params: [filter.id]\n });\n const formattedLogs = logs.map((log) => formatLog(log));\n if (!filter.abi)\n return formattedLogs;\n return parseEventLogs({\n abi: filter.abi,\n logs: formattedLogs,\n strict\n });\n }\n var init_getFilterLogs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFilterLogs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseEventLogs();\n init_log2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodePacked.js\n function encodePacked(types, values) {\n if (types.length !== values.length)\n throw new AbiEncodingLengthMismatchError({\n expectedLength: types.length,\n givenLength: values.length\n });\n const data = [];\n for (let i3 = 0; i3 < types.length; i3++) {\n const type = types[i3];\n const value = values[i3];\n data.push(encode(type, value));\n }\n return concatHex(data);\n }\n function encode(type, value, isArray = false) {\n if (type === \"address\") {\n const address = value;\n if (!isAddress(address))\n throw new InvalidAddressError({ address });\n return pad(address.toLowerCase(), {\n size: isArray ? 32 : null\n });\n }\n if (type === \"string\")\n return stringToHex(value);\n if (type === \"bytes\")\n return value;\n if (type === \"bool\")\n return pad(boolToHex(value), { size: isArray ? 32 : 1 });\n const intMatch = type.match(integerRegex2);\n if (intMatch) {\n const [_type, baseType, bits = \"256\"] = intMatch;\n const size6 = Number.parseInt(bits, 10) / 8;\n return numberToHex(value, {\n size: isArray ? 32 : size6,\n signed: baseType === \"int\"\n });\n }\n const bytesMatch = type.match(bytesRegex2);\n if (bytesMatch) {\n const [_type, size6] = bytesMatch;\n if (Number.parseInt(size6, 10) !== (value.length - 2) / 2)\n throw new BytesSizeMismatchError({\n expectedSize: Number.parseInt(size6, 10),\n givenSize: (value.length - 2) / 2\n });\n return pad(value, { dir: \"right\", size: isArray ? 32 : null });\n }\n const arrayMatch = type.match(arrayRegex);\n if (arrayMatch && Array.isArray(value)) {\n const [_type, childType] = arrayMatch;\n const data = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n data.push(encode(childType, value[i3], true));\n }\n if (data.length === 0)\n return \"0x\";\n return concatHex(data);\n }\n throw new UnsupportedPackedAbiType(type);\n }\n var init_encodePacked = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodePacked.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_address();\n init_isAddress();\n init_concat();\n init_pad();\n init_toHex();\n init_regex2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/isBytes.js\n function isBytes3(value) {\n if (!value)\n return false;\n if (typeof value !== \"object\")\n return false;\n if (!(\"BYTES_PER_ELEMENT\" in value))\n return false;\n return value.BYTES_PER_ELEMENT === 1 && value.constructor.name === \"Uint8Array\";\n }\n var init_isBytes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/isBytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/getContractAddress.js\n function getContractAddress2(opts) {\n if (opts.opcode === \"CREATE2\")\n return getCreate2Address(opts);\n return getCreateAddress(opts);\n }\n function getCreateAddress(opts) {\n const from14 = toBytes(getAddress(opts.from));\n let nonce = toBytes(opts.nonce);\n if (nonce[0] === 0)\n nonce = new Uint8Array([]);\n return getAddress(`0x${keccak256(toRlp([from14, nonce], \"bytes\")).slice(26)}`);\n }\n function getCreate2Address(opts) {\n const from14 = toBytes(getAddress(opts.from));\n const salt = pad(isBytes3(opts.salt) ? opts.salt : toBytes(opts.salt), {\n size: 32\n });\n const bytecodeHash = (() => {\n if (\"bytecodeHash\" in opts) {\n if (isBytes3(opts.bytecodeHash))\n return opts.bytecodeHash;\n return toBytes(opts.bytecodeHash);\n }\n return keccak256(opts.bytecode, \"bytes\");\n })();\n return getAddress(slice(keccak256(concat([toBytes(\"0xff\"), from14, salt, bytecodeHash])), 12));\n }\n var init_getContractAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/getContractAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_concat();\n init_isBytes();\n init_pad();\n init_slice();\n init_toBytes();\n init_toRlp();\n init_keccak256();\n init_getAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/assertTransaction.js\n function assertTransactionEIP7702(transaction) {\n const { authorizationList } = transaction;\n if (authorizationList) {\n for (const authorization of authorizationList) {\n const { chainId } = authorization;\n const address = authorization.address;\n if (!isAddress(address))\n throw new InvalidAddressError({ address });\n if (chainId < 0)\n throw new InvalidChainIdError({ chainId });\n }\n }\n assertTransactionEIP1559(transaction);\n }\n function assertTransactionEIP4844(transaction) {\n const { blobVersionedHashes } = transaction;\n if (blobVersionedHashes) {\n if (blobVersionedHashes.length === 0)\n throw new EmptyBlobError();\n for (const hash3 of blobVersionedHashes) {\n const size_ = size(hash3);\n const version7 = hexToNumber(slice(hash3, 0, 1));\n if (size_ !== 32)\n throw new InvalidVersionedHashSizeError({ hash: hash3, size: size_ });\n if (version7 !== versionedHashVersionKzg)\n throw new InvalidVersionedHashVersionError({\n hash: hash3,\n version: version7\n });\n }\n }\n assertTransactionEIP1559(transaction);\n }\n function assertTransactionEIP1559(transaction) {\n const { chainId, maxPriorityFeePerGas, maxFeePerGas, to } = transaction;\n if (chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (maxFeePerGas && maxFeePerGas > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas });\n if (maxPriorityFeePerGas && maxFeePerGas && maxPriorityFeePerGas > maxFeePerGas)\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });\n }\n function assertTransactionEIP2930(transaction) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } = transaction;\n if (chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (maxPriorityFeePerGas || maxFeePerGas)\n throw new BaseError2(\"`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.\");\n if (gasPrice && gasPrice > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });\n }\n function assertTransactionLegacy(transaction) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } = transaction;\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (typeof chainId !== \"undefined\" && chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (maxPriorityFeePerGas || maxFeePerGas)\n throw new BaseError2(\"`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.\");\n if (gasPrice && gasPrice > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });\n }\n var init_assertTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/assertTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_kzg();\n init_number();\n init_address();\n init_base();\n init_blob2();\n init_chain();\n init_node();\n init_isAddress();\n init_size();\n init_slice();\n init_fromHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/serializeAccessList.js\n function serializeAccessList(accessList) {\n if (!accessList || accessList.length === 0)\n return [];\n const serializedAccessList = [];\n for (let i3 = 0; i3 < accessList.length; i3++) {\n const { address, storageKeys } = accessList[i3];\n for (let j2 = 0; j2 < storageKeys.length; j2++) {\n if (storageKeys[j2].length - 2 !== 64) {\n throw new InvalidStorageKeySizeError({ storageKey: storageKeys[j2] });\n }\n }\n if (!isAddress(address, { strict: false })) {\n throw new InvalidAddressError({ address });\n }\n serializedAccessList.push([address, storageKeys]);\n }\n return serializedAccessList;\n }\n var init_serializeAccessList = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/serializeAccessList.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_transaction();\n init_isAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/serializeTransaction.js\n function serializeTransaction(transaction, signature) {\n const type = getTransactionType(transaction);\n if (type === \"eip1559\")\n return serializeTransactionEIP1559(transaction, signature);\n if (type === \"eip2930\")\n return serializeTransactionEIP2930(transaction, signature);\n if (type === \"eip4844\")\n return serializeTransactionEIP4844(transaction, signature);\n if (type === \"eip7702\")\n return serializeTransactionEIP7702(transaction, signature);\n return serializeTransactionLegacy(transaction, signature);\n }\n function serializeTransactionEIP7702(transaction, signature) {\n const { authorizationList, chainId, gas, nonce, to, value, maxFeePerGas, maxPriorityFeePerGas, accessList, data } = transaction;\n assertTransactionEIP7702(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedAuthorizationList = serializeAuthorizationList(authorizationList);\n return concatHex([\n \"0x04\",\n toRlp([\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : \"0x\",\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : \"0x\",\n maxFeePerGas ? numberToHex(maxFeePerGas) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\",\n serializedAccessList,\n serializedAuthorizationList,\n ...toYParitySignatureArray(transaction, signature)\n ])\n ]);\n }\n function serializeTransactionEIP4844(transaction, signature) {\n const { chainId, gas, nonce, to, value, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, accessList, data } = transaction;\n assertTransactionEIP4844(transaction);\n let blobVersionedHashes = transaction.blobVersionedHashes;\n let sidecars = transaction.sidecars;\n if (transaction.blobs && (typeof blobVersionedHashes === \"undefined\" || typeof sidecars === \"undefined\")) {\n const blobs2 = typeof transaction.blobs[0] === \"string\" ? transaction.blobs : transaction.blobs.map((x4) => bytesToHex(x4));\n const kzg = transaction.kzg;\n const commitments2 = blobsToCommitments({\n blobs: blobs2,\n kzg\n });\n if (typeof blobVersionedHashes === \"undefined\")\n blobVersionedHashes = commitmentsToVersionedHashes({\n commitments: commitments2\n });\n if (typeof sidecars === \"undefined\") {\n const proofs2 = blobsToProofs({ blobs: blobs2, commitments: commitments2, kzg });\n sidecars = toBlobSidecars({ blobs: blobs2, commitments: commitments2, proofs: proofs2 });\n }\n }\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : \"0x\",\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : \"0x\",\n maxFeePerGas ? numberToHex(maxFeePerGas) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\",\n serializedAccessList,\n maxFeePerBlobGas ? numberToHex(maxFeePerBlobGas) : \"0x\",\n blobVersionedHashes ?? [],\n ...toYParitySignatureArray(transaction, signature)\n ];\n const blobs = [];\n const commitments = [];\n const proofs = [];\n if (sidecars)\n for (let i3 = 0; i3 < sidecars.length; i3++) {\n const { blob, commitment, proof } = sidecars[i3];\n blobs.push(blob);\n commitments.push(commitment);\n proofs.push(proof);\n }\n return concatHex([\n \"0x03\",\n sidecars ? (\n // If sidecars are enabled, envelope turns into a \"wrapper\":\n toRlp([serializedTransaction, blobs, commitments, proofs])\n ) : (\n // If sidecars are disabled, standard envelope is used:\n toRlp(serializedTransaction)\n )\n ]);\n }\n function serializeTransactionEIP1559(transaction, signature) {\n const { chainId, gas, nonce, to, value, maxFeePerGas, maxPriorityFeePerGas, accessList, data } = transaction;\n assertTransactionEIP1559(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : \"0x\",\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : \"0x\",\n maxFeePerGas ? numberToHex(maxFeePerGas) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\",\n serializedAccessList,\n ...toYParitySignatureArray(transaction, signature)\n ];\n return concatHex([\n \"0x02\",\n toRlp(serializedTransaction)\n ]);\n }\n function serializeTransactionEIP2930(transaction, signature) {\n const { chainId, gas, data, nonce, to, value, accessList, gasPrice } = transaction;\n assertTransactionEIP2930(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : \"0x\",\n gasPrice ? numberToHex(gasPrice) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\",\n serializedAccessList,\n ...toYParitySignatureArray(transaction, signature)\n ];\n return concatHex([\n \"0x01\",\n toRlp(serializedTransaction)\n ]);\n }\n function serializeTransactionLegacy(transaction, signature) {\n const { chainId = 0, gas, data, nonce, to, value, gasPrice } = transaction;\n assertTransactionLegacy(transaction);\n let serializedTransaction = [\n nonce ? numberToHex(nonce) : \"0x\",\n gasPrice ? numberToHex(gasPrice) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\"\n ];\n if (signature) {\n const v2 = (() => {\n if (signature.v >= 35n) {\n const inferredChainId = (signature.v - 35n) / 2n;\n if (inferredChainId > 0)\n return signature.v;\n return 27n + (signature.v === 35n ? 0n : 1n);\n }\n if (chainId > 0)\n return BigInt(chainId * 2) + BigInt(35n + signature.v - 27n);\n const v6 = 27n + (signature.v === 27n ? 0n : 1n);\n if (signature.v !== v6)\n throw new InvalidLegacyVError({ v: signature.v });\n return v6;\n })();\n const r2 = trim(signature.r);\n const s4 = trim(signature.s);\n serializedTransaction = [\n ...serializedTransaction,\n numberToHex(v2),\n r2 === \"0x00\" ? \"0x\" : r2,\n s4 === \"0x00\" ? \"0x\" : s4\n ];\n } else if (chainId > 0) {\n serializedTransaction = [\n ...serializedTransaction,\n numberToHex(chainId),\n \"0x\",\n \"0x\"\n ];\n }\n return toRlp(serializedTransaction);\n }\n function toYParitySignatureArray(transaction, signature_) {\n const signature = signature_ ?? transaction;\n const { v: v2, yParity } = signature;\n if (typeof signature.r === \"undefined\")\n return [];\n if (typeof signature.s === \"undefined\")\n return [];\n if (typeof v2 === \"undefined\" && typeof yParity === \"undefined\")\n return [];\n const r2 = trim(signature.r);\n const s4 = trim(signature.s);\n const yParity_ = (() => {\n if (typeof yParity === \"number\")\n return yParity ? numberToHex(1) : \"0x\";\n if (v2 === 0n)\n return \"0x\";\n if (v2 === 1n)\n return numberToHex(1);\n return v2 === 27n ? \"0x\" : numberToHex(1);\n })();\n return [yParity_, r2 === \"0x00\" ? \"0x\" : r2, s4 === \"0x00\" ? \"0x\" : s4];\n }\n var init_serializeTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/serializeTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n init_serializeAuthorizationList();\n init_blobsToCommitments();\n init_blobsToProofs();\n init_commitmentsToVersionedHashes();\n init_toBlobSidecars();\n init_concat();\n init_trim();\n init_toHex();\n init_toRlp();\n init_assertTransaction();\n init_getTransactionType();\n init_serializeAccessList();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js\n function serializeAuthorizationList(authorizationList) {\n if (!authorizationList || authorizationList.length === 0)\n return [];\n const serializedAuthorizationList = [];\n for (const authorization of authorizationList) {\n const { chainId, nonce, ...signature } = authorization;\n const contractAddress = authorization.address;\n serializedAuthorizationList.push([\n chainId ? toHex(chainId) : \"0x\",\n contractAddress,\n nonce ? toHex(nonce) : \"0x\",\n ...toYParitySignatureArray({}, signature)\n ]);\n }\n return serializedAuthorizationList;\n }\n var init_serializeAuthorizationList = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_serializeTransaction();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/verifyAuthorization.js\n async function verifyAuthorization({ address, authorization, signature }) {\n return isAddressEqual(getAddress(address), await recoverAuthorizationAddress({\n authorization,\n signature\n }));\n }\n var init_verifyAuthorization = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/verifyAuthorization.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAddress();\n init_isAddressEqual();\n init_recoverAuthorizationAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withDedupe.js\n function withDedupe(fn, { enabled = true, id }) {\n if (!enabled || !id)\n return fn();\n if (promiseCache2.get(id))\n return promiseCache2.get(id);\n const promise = fn().finally(() => promiseCache2.delete(id));\n promiseCache2.set(id, promise);\n return promise;\n }\n var promiseCache2;\n var init_withDedupe = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withDedupe.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_lru();\n promiseCache2 = /* @__PURE__ */ new LruMap(8192);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/buildRequest.js\n function buildRequest(request, options = {}) {\n return async (args, overrideOptions = {}) => {\n const { dedupe = false, methods, retryDelay = 150, retryCount = 3, uid: uid2 } = {\n ...options,\n ...overrideOptions\n };\n const { method } = args;\n if (methods?.exclude?.includes(method))\n throw new MethodNotSupportedRpcError(new Error(\"method not supported\"), {\n method\n });\n if (methods?.include && !methods.include.includes(method))\n throw new MethodNotSupportedRpcError(new Error(\"method not supported\"), {\n method\n });\n const requestId = dedupe ? stringToHex(`${uid2}.${stringify(args)}`) : void 0;\n return withDedupe(() => withRetry(async () => {\n try {\n return await request(args);\n } catch (err_) {\n const err = err_;\n switch (err.code) {\n case ParseRpcError.code:\n throw new ParseRpcError(err);\n case InvalidRequestRpcError.code:\n throw new InvalidRequestRpcError(err);\n case MethodNotFoundRpcError.code:\n throw new MethodNotFoundRpcError(err, { method: args.method });\n case InvalidParamsRpcError.code:\n throw new InvalidParamsRpcError(err);\n case InternalRpcError.code:\n throw new InternalRpcError(err);\n case InvalidInputRpcError.code:\n throw new InvalidInputRpcError(err);\n case ResourceNotFoundRpcError.code:\n throw new ResourceNotFoundRpcError(err);\n case ResourceUnavailableRpcError.code:\n throw new ResourceUnavailableRpcError(err);\n case TransactionRejectedRpcError.code:\n throw new TransactionRejectedRpcError(err);\n case MethodNotSupportedRpcError.code:\n throw new MethodNotSupportedRpcError(err, {\n method: args.method\n });\n case LimitExceededRpcError.code:\n throw new LimitExceededRpcError(err);\n case JsonRpcVersionUnsupportedError.code:\n throw new JsonRpcVersionUnsupportedError(err);\n case UserRejectedRequestError.code:\n throw new UserRejectedRequestError(err);\n case UnauthorizedProviderError.code:\n throw new UnauthorizedProviderError(err);\n case UnsupportedProviderMethodError.code:\n throw new UnsupportedProviderMethodError(err);\n case ProviderDisconnectedError.code:\n throw new ProviderDisconnectedError(err);\n case ChainDisconnectedError.code:\n throw new ChainDisconnectedError(err);\n case SwitchChainError.code:\n throw new SwitchChainError(err);\n case UnsupportedNonOptionalCapabilityError.code:\n throw new UnsupportedNonOptionalCapabilityError(err);\n case UnsupportedChainIdError.code:\n throw new UnsupportedChainIdError(err);\n case DuplicateIdError.code:\n throw new DuplicateIdError(err);\n case UnknownBundleIdError.code:\n throw new UnknownBundleIdError(err);\n case BundleTooLargeError.code:\n throw new BundleTooLargeError(err);\n case AtomicReadyWalletRejectedUpgradeError.code:\n throw new AtomicReadyWalletRejectedUpgradeError(err);\n case AtomicityNotSupportedError.code:\n throw new AtomicityNotSupportedError(err);\n case 5e3:\n throw new UserRejectedRequestError(err);\n default:\n if (err_ instanceof BaseError2)\n throw err_;\n throw new UnknownRpcError(err);\n }\n }\n }, {\n delay: ({ count, error }) => {\n if (error && error instanceof HttpRequestError) {\n const retryAfter = error?.headers?.get(\"Retry-After\");\n if (retryAfter?.match(/\\d/))\n return Number.parseInt(retryAfter, 10) * 1e3;\n }\n return ~~(1 << count) * retryDelay;\n },\n retryCount,\n shouldRetry: ({ error }) => shouldRetry(error)\n }), { enabled: dedupe, id: requestId });\n };\n }\n function shouldRetry(error) {\n if (\"code\" in error && typeof error.code === \"number\") {\n if (error.code === -1)\n return true;\n if (error.code === LimitExceededRpcError.code)\n return true;\n if (error.code === InternalRpcError.code)\n return true;\n return false;\n }\n if (error instanceof HttpRequestError && error.status) {\n if (error.status === 403)\n return true;\n if (error.status === 408)\n return true;\n if (error.status === 413)\n return true;\n if (error.status === 429)\n return true;\n if (error.status === 500)\n return true;\n if (error.status === 502)\n return true;\n if (error.status === 503)\n return true;\n if (error.status === 504)\n return true;\n return false;\n }\n return true;\n }\n var init_buildRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/buildRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_request();\n init_rpc();\n init_toHex();\n init_withDedupe();\n init_withRetry();\n init_stringify();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/defineChain.js\n function defineChain(chain2) {\n return {\n formatters: void 0,\n fees: void 0,\n serializers: void 0,\n ...chain2\n };\n }\n var init_defineChain = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/defineChain.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/legacy.js\n function ripemd_f(group, x4, y6, z2) {\n if (group === 0)\n return x4 ^ y6 ^ z2;\n if (group === 1)\n return x4 & y6 | ~x4 & z2;\n if (group === 2)\n return (x4 | ~y6) ^ z2;\n if (group === 3)\n return x4 & z2 | y6 & ~z2;\n return x4 ^ (y6 | ~z2);\n }\n var Rho160, Id160, Pi160, idxLR, idxL, idxR, shifts160, shiftsL160, shiftsR160, Kl160, Kr160, BUF_160, RIPEMD160, ripemd160;\n var init_legacy = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/legacy.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_md();\n init_utils3();\n Rho160 = /* @__PURE__ */ Uint8Array.from([\n 7,\n 4,\n 13,\n 1,\n 10,\n 6,\n 15,\n 3,\n 12,\n 0,\n 9,\n 5,\n 2,\n 14,\n 11,\n 8\n ]);\n Id160 = /* @__PURE__ */ (() => Uint8Array.from(new Array(16).fill(0).map((_2, i3) => i3)))();\n Pi160 = /* @__PURE__ */ (() => Id160.map((i3) => (9 * i3 + 5) % 16))();\n idxLR = /* @__PURE__ */ (() => {\n const L2 = [Id160];\n const R3 = [Pi160];\n const res = [L2, R3];\n for (let i3 = 0; i3 < 4; i3++)\n for (let j2 of res)\n j2.push(j2[i3].map((k4) => Rho160[k4]));\n return res;\n })();\n idxL = /* @__PURE__ */ (() => idxLR[0])();\n idxR = /* @__PURE__ */ (() => idxLR[1])();\n shifts160 = /* @__PURE__ */ [\n [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],\n [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],\n [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],\n [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],\n [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]\n ].map((i3) => Uint8Array.from(i3));\n shiftsL160 = /* @__PURE__ */ idxL.map((idx, i3) => idx.map((j2) => shifts160[i3][j2]));\n shiftsR160 = /* @__PURE__ */ idxR.map((idx, i3) => idx.map((j2) => shifts160[i3][j2]));\n Kl160 = /* @__PURE__ */ Uint32Array.from([\n 0,\n 1518500249,\n 1859775393,\n 2400959708,\n 2840853838\n ]);\n Kr160 = /* @__PURE__ */ Uint32Array.from([\n 1352829926,\n 1548603684,\n 1836072691,\n 2053994217,\n 0\n ]);\n BUF_160 = /* @__PURE__ */ new Uint32Array(16);\n RIPEMD160 = class extends HashMD {\n constructor() {\n super(64, 20, 8, true);\n this.h0 = 1732584193 | 0;\n this.h1 = 4023233417 | 0;\n this.h2 = 2562383102 | 0;\n this.h3 = 271733878 | 0;\n this.h4 = 3285377520 | 0;\n }\n get() {\n const { h0, h1, h2: h22, h3: h32, h4 } = this;\n return [h0, h1, h22, h32, h4];\n }\n set(h0, h1, h22, h32, h4) {\n this.h0 = h0 | 0;\n this.h1 = h1 | 0;\n this.h2 = h22 | 0;\n this.h3 = h32 | 0;\n this.h4 = h4 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n BUF_160[i3] = view.getUint32(offset, true);\n let al = this.h0 | 0, ar = al, bl = this.h1 | 0, br = bl, cl = this.h2 | 0, cr = cl, dl = this.h3 | 0, dr = dl, el = this.h4 | 0, er = el;\n for (let group = 0; group < 5; group++) {\n const rGroup = 4 - group;\n const hbl = Kl160[group], hbr = Kr160[group];\n const rl = idxL[group], rr = idxR[group];\n const sl = shiftsL160[group], sr = shiftsR160[group];\n for (let i3 = 0; i3 < 16; i3++) {\n const tl = rotl(al + ripemd_f(group, bl, cl, dl) + BUF_160[rl[i3]] + hbl, sl[i3]) + el | 0;\n al = el, el = dl, dl = rotl(cl, 10) | 0, cl = bl, bl = tl;\n }\n for (let i3 = 0; i3 < 16; i3++) {\n const tr = rotl(ar + ripemd_f(rGroup, br, cr, dr) + BUF_160[rr[i3]] + hbr, sr[i3]) + er | 0;\n ar = er, er = dr, dr = rotl(cr, 10) | 0, cr = br, br = tr;\n }\n }\n this.set(this.h1 + cl + dr | 0, this.h2 + dl + er | 0, this.h3 + el + ar | 0, this.h4 + al + br | 0, this.h0 + bl + cr | 0);\n }\n roundClean() {\n clean(BUF_160);\n }\n destroy() {\n this.destroyed = true;\n clean(this.buffer);\n this.set(0, 0, 0, 0, 0);\n }\n };\n ripemd160 = /* @__PURE__ */ createHasher(() => new RIPEMD160());\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withTimeout.js\n function withTimeout(fn, { errorInstance = new Error(\"timed out\"), timeout, signal }) {\n return new Promise((resolve, reject) => {\n ;\n (async () => {\n let timeoutId;\n try {\n const controller = new AbortController();\n if (timeout > 0) {\n timeoutId = setTimeout(() => {\n if (signal) {\n controller.abort();\n } else {\n reject(errorInstance);\n }\n }, timeout);\n }\n resolve(await fn({ signal: controller?.signal || null }));\n } catch (err) {\n if (err?.name === \"AbortError\")\n reject(errorInstance);\n reject(err);\n } finally {\n clearTimeout(timeoutId);\n }\n })();\n });\n }\n var init_withTimeout = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withTimeout.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/rpc/id.js\n function createIdStore() {\n return {\n current: 0,\n take() {\n return this.current++;\n },\n reset() {\n this.current = 0;\n }\n };\n }\n var idCache;\n var init_id = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/rpc/id.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n idCache = /* @__PURE__ */ createIdStore();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/rpc/http.js\n function getHttpRpcClient(url, options = {}) {\n return {\n async request(params) {\n const { body, fetchFn = options.fetchFn ?? fetch, onRequest = options.onRequest, onResponse = options.onResponse, timeout = options.timeout ?? 1e4 } = params;\n const fetchOptions = {\n ...options.fetchOptions ?? {},\n ...params.fetchOptions ?? {}\n };\n const { headers, method, signal: signal_ } = fetchOptions;\n try {\n const response = await withTimeout(async ({ signal }) => {\n const init = {\n ...fetchOptions,\n body: Array.isArray(body) ? stringify(body.map((body2) => ({\n jsonrpc: \"2.0\",\n id: body2.id ?? idCache.take(),\n ...body2\n }))) : stringify({\n jsonrpc: \"2.0\",\n id: body.id ?? idCache.take(),\n ...body\n }),\n headers: {\n \"Content-Type\": \"application/json\",\n ...headers\n },\n method: method || \"POST\",\n signal: signal_ || (timeout > 0 ? signal : null)\n };\n const request = new Request(url, init);\n const args = await onRequest?.(request, init) ?? { ...init, url };\n const response2 = await fetchFn(args.url ?? url, args);\n return response2;\n }, {\n errorInstance: new TimeoutError({ body, url }),\n timeout,\n signal: true\n });\n if (onResponse)\n await onResponse(response);\n let data;\n if (response.headers.get(\"Content-Type\")?.startsWith(\"application/json\"))\n data = await response.json();\n else {\n data = await response.text();\n try {\n data = JSON.parse(data || \"{}\");\n } catch (err) {\n if (response.ok)\n throw err;\n data = { error: data };\n }\n }\n if (!response.ok) {\n throw new HttpRequestError({\n body,\n details: stringify(data.error) || response.statusText,\n headers: response.headers,\n status: response.status,\n url\n });\n }\n return data;\n } catch (err) {\n if (err instanceof HttpRequestError)\n throw err;\n if (err instanceof TimeoutError)\n throw err;\n throw new HttpRequestError({\n body,\n cause: err,\n url\n });\n }\n }\n };\n }\n var init_http = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/rpc/http.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_request();\n init_withTimeout();\n init_stringify();\n init_id();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/strings.js\n var presignMessagePrefix;\n var init_strings = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/strings.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n presignMessagePrefix = \"\u0019Ethereum Signed Message:\\n\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js\n function toPrefixedMessage(message_) {\n const message = (() => {\n if (typeof message_ === \"string\")\n return stringToHex(message_);\n if (typeof message_.raw === \"string\")\n return message_.raw;\n return bytesToHex(message_.raw);\n })();\n const prefix = stringToHex(`${presignMessagePrefix}${size(message)}`);\n return concat([prefix, message]);\n }\n var init_toPrefixedMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_strings();\n init_concat();\n init_size();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/hashMessage.js\n function hashMessage(message, to_) {\n return keccak256(toPrefixedMessage(message), to_);\n }\n var init_hashMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/hashMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_keccak256();\n init_toPrefixedMessage();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/typedData.js\n var InvalidDomainError, InvalidPrimaryTypeError, InvalidStructTypeError;\n var init_typedData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/typedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n init_base();\n InvalidDomainError = class extends BaseError2 {\n constructor({ domain: domain2 }) {\n super(`Invalid domain \"${stringify(domain2)}\".`, {\n metaMessages: [\"Must be a valid EIP-712 domain.\"]\n });\n }\n };\n InvalidPrimaryTypeError = class extends BaseError2 {\n constructor({ primaryType, types }) {\n super(`Invalid primary type \\`${primaryType}\\` must be one of \\`${JSON.stringify(Object.keys(types))}\\`.`, {\n docsPath: \"/api/glossary/Errors#typeddatainvalidprimarytypeerror\",\n metaMessages: [\"Check that the primary type is a key in `types`.\"]\n });\n }\n };\n InvalidStructTypeError = class extends BaseError2 {\n constructor({ type }) {\n super(`Struct type \"${type}\" is invalid.`, {\n metaMessages: [\"Struct type must not be a Solidity type.\"],\n name: \"InvalidStructTypeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/typedData.js\n function validateTypedData(parameters) {\n const { domain: domain2, message, primaryType, types } = parameters;\n const validateData = (struct, data) => {\n for (const param of struct) {\n const { name, type } = param;\n const value = data[name];\n const integerMatch = type.match(integerRegex2);\n if (integerMatch && (typeof value === \"number\" || typeof value === \"bigint\")) {\n const [_type, base4, size_] = integerMatch;\n numberToHex(value, {\n signed: base4 === \"int\",\n size: Number.parseInt(size_, 10) / 8\n });\n }\n if (type === \"address\" && typeof value === \"string\" && !isAddress(value))\n throw new InvalidAddressError({ address: value });\n const bytesMatch = type.match(bytesRegex2);\n if (bytesMatch) {\n const [_type, size_] = bytesMatch;\n if (size_ && size(value) !== Number.parseInt(size_, 10))\n throw new BytesSizeMismatchError({\n expectedSize: Number.parseInt(size_, 10),\n givenSize: size(value)\n });\n }\n const struct2 = types[type];\n if (struct2) {\n validateReference(type);\n validateData(struct2, value);\n }\n }\n };\n if (types.EIP712Domain && domain2) {\n if (typeof domain2 !== \"object\")\n throw new InvalidDomainError({ domain: domain2 });\n validateData(types.EIP712Domain, domain2);\n }\n if (primaryType !== \"EIP712Domain\") {\n if (types[primaryType])\n validateData(types[primaryType], message);\n else\n throw new InvalidPrimaryTypeError({ primaryType, types });\n }\n }\n function getTypesForEIP712Domain({ domain: domain2 }) {\n return [\n typeof domain2?.name === \"string\" && { name: \"name\", type: \"string\" },\n domain2?.version && { name: \"version\", type: \"string\" },\n (typeof domain2?.chainId === \"number\" || typeof domain2?.chainId === \"bigint\") && {\n name: \"chainId\",\n type: \"uint256\"\n },\n domain2?.verifyingContract && {\n name: \"verifyingContract\",\n type: \"address\"\n },\n domain2?.salt && { name: \"salt\", type: \"bytes32\" }\n ].filter(Boolean);\n }\n function validateReference(type) {\n if (type === \"address\" || type === \"bool\" || type === \"string\" || type.startsWith(\"bytes\") || type.startsWith(\"uint\") || type.startsWith(\"int\"))\n throw new InvalidStructTypeError({ type });\n }\n var init_typedData2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/typedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_address();\n init_typedData();\n init_isAddress();\n init_size();\n init_toHex();\n init_regex2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/hashTypedData.js\n function hashTypedData(parameters) {\n const { domain: domain2 = {}, message, primaryType } = parameters;\n const types = {\n EIP712Domain: getTypesForEIP712Domain({ domain: domain2 }),\n ...parameters.types\n };\n validateTypedData({\n domain: domain2,\n message,\n primaryType,\n types\n });\n const parts = [\"0x1901\"];\n if (domain2)\n parts.push(hashDomain({\n domain: domain2,\n types\n }));\n if (primaryType !== \"EIP712Domain\")\n parts.push(hashStruct({\n data: message,\n primaryType,\n types\n }));\n return keccak256(concat(parts));\n }\n function hashDomain({ domain: domain2, types }) {\n return hashStruct({\n data: domain2,\n primaryType: \"EIP712Domain\",\n types\n });\n }\n function hashStruct({ data, primaryType, types }) {\n const encoded = encodeData({\n data,\n primaryType,\n types\n });\n return keccak256(encoded);\n }\n function encodeData({ data, primaryType, types }) {\n const encodedTypes = [{ type: \"bytes32\" }];\n const encodedValues = [hashType({ primaryType, types })];\n for (const field of types[primaryType]) {\n const [type, value] = encodeField({\n types,\n name: field.name,\n type: field.type,\n value: data[field.name]\n });\n encodedTypes.push(type);\n encodedValues.push(value);\n }\n return encodeAbiParameters(encodedTypes, encodedValues);\n }\n function hashType({ primaryType, types }) {\n const encodedHashType = toHex(encodeType({ primaryType, types }));\n return keccak256(encodedHashType);\n }\n function encodeType({ primaryType, types }) {\n let result = \"\";\n const unsortedDeps = findTypeDependencies({ primaryType, types });\n unsortedDeps.delete(primaryType);\n const deps = [primaryType, ...Array.from(unsortedDeps).sort()];\n for (const type of deps) {\n result += `${type}(${types[type].map(({ name, type: t3 }) => `${t3} ${name}`).join(\",\")})`;\n }\n return result;\n }\n function findTypeDependencies({ primaryType: primaryType_, types }, results = /* @__PURE__ */ new Set()) {\n const match = primaryType_.match(/^\\w*/u);\n const primaryType = match?.[0];\n if (results.has(primaryType) || types[primaryType] === void 0) {\n return results;\n }\n results.add(primaryType);\n for (const field of types[primaryType]) {\n findTypeDependencies({ primaryType: field.type, types }, results);\n }\n return results;\n }\n function encodeField({ types, name, type, value }) {\n if (types[type] !== void 0) {\n return [\n { type: \"bytes32\" },\n keccak256(encodeData({ data: value, primaryType: type, types }))\n ];\n }\n if (type === \"bytes\") {\n const prepend = value.length % 2 ? \"0\" : \"\";\n value = `0x${prepend + value.slice(2)}`;\n return [{ type: \"bytes32\" }, keccak256(value)];\n }\n if (type === \"string\")\n return [{ type: \"bytes32\" }, keccak256(toHex(value))];\n if (type.lastIndexOf(\"]\") === type.length - 1) {\n const parsedType = type.slice(0, type.lastIndexOf(\"[\"));\n const typeValuePairs = value.map((item) => encodeField({\n name,\n type: parsedType,\n types,\n value: item\n }));\n return [\n { type: \"bytes32\" },\n keccak256(encodeAbiParameters(typeValuePairs.map(([t3]) => t3), typeValuePairs.map(([, v2]) => v2)))\n ];\n }\n return [{ type }, value];\n }\n var init_hashTypedData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/hashTypedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encodeAbiParameters();\n init_concat();\n init_toHex();\n init_keccak256();\n init_typedData2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/bytes.js\n var zeroHash;\n var init_bytes2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n zeroHash = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/lru.js\n var LruMap2;\n var init_lru2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/lru.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LruMap2 = class extends Map {\n constructor(size6) {\n super();\n Object.defineProperty(this, \"maxSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.maxSize = size6;\n }\n get(key) {\n const value = super.get(key);\n if (super.has(key) && value !== void 0) {\n this.delete(key);\n super.set(key, value);\n }\n return value;\n }\n set(key, value) {\n super.set(key, value);\n if (this.maxSize && this.size > this.maxSize) {\n const firstKey = this.keys().next().value;\n if (firstKey)\n this.delete(firstKey);\n }\n return this;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Caches.js\n var caches, checksum;\n var init_Caches = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Caches.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_lru2();\n caches = {\n checksum: /* @__PURE__ */ new LruMap2(8192)\n };\n checksum = caches.checksum;\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hash.js\n function keccak2562(value, options = {}) {\n const { as = typeof value === \"string\" ? \"Hex\" : \"Bytes\" } = options;\n const bytes = keccak_256(from(value));\n if (as === \"Bytes\")\n return bytes;\n return fromBytes(bytes);\n }\n var init_Hash = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha3();\n init_Bytes();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/PublicKey.js\n function assert4(publicKey, options = {}) {\n const { compressed } = options;\n const { prefix, x: x4, y: y6 } = publicKey;\n if (compressed === false || typeof x4 === \"bigint\" && typeof y6 === \"bigint\") {\n if (prefix !== 4)\n throw new InvalidPrefixError({\n prefix,\n cause: new InvalidUncompressedPrefixError()\n });\n return;\n }\n if (compressed === true || typeof x4 === \"bigint\" && typeof y6 === \"undefined\") {\n if (prefix !== 3 && prefix !== 2)\n throw new InvalidPrefixError({\n prefix,\n cause: new InvalidCompressedPrefixError()\n });\n return;\n }\n throw new InvalidError({ publicKey });\n }\n function from3(value) {\n const publicKey = (() => {\n if (validate2(value))\n return fromHex3(value);\n if (validate(value))\n return fromBytes2(value);\n const { prefix, x: x4, y: y6 } = value;\n if (typeof x4 === \"bigint\" && typeof y6 === \"bigint\")\n return { prefix: prefix ?? 4, x: x4, y: y6 };\n return { prefix, x: x4 };\n })();\n assert4(publicKey);\n return publicKey;\n }\n function fromBytes2(publicKey) {\n return fromHex3(fromBytes(publicKey));\n }\n function fromHex3(publicKey) {\n if (publicKey.length !== 132 && publicKey.length !== 130 && publicKey.length !== 68)\n throw new InvalidSerializedSizeError({ publicKey });\n if (publicKey.length === 130) {\n const x5 = BigInt(slice3(publicKey, 0, 32));\n const y6 = BigInt(slice3(publicKey, 32, 64));\n return {\n prefix: 4,\n x: x5,\n y: y6\n };\n }\n if (publicKey.length === 132) {\n const prefix2 = Number(slice3(publicKey, 0, 1));\n const x5 = BigInt(slice3(publicKey, 1, 33));\n const y6 = BigInt(slice3(publicKey, 33, 65));\n return {\n prefix: prefix2,\n x: x5,\n y: y6\n };\n }\n const prefix = Number(slice3(publicKey, 0, 1));\n const x4 = BigInt(slice3(publicKey, 1, 33));\n return {\n prefix,\n x: x4\n };\n }\n function toHex2(publicKey, options = {}) {\n assert4(publicKey);\n const { prefix, x: x4, y: y6 } = publicKey;\n const { includePrefix = true } = options;\n const publicKey_ = concat2(\n includePrefix ? fromNumber(prefix, { size: 1 }) : \"0x\",\n fromNumber(x4, { size: 32 }),\n // If the public key is not compressed, add the y coordinate.\n typeof y6 === \"bigint\" ? fromNumber(y6, { size: 32 }) : \"0x\"\n );\n return publicKey_;\n }\n var InvalidError, InvalidPrefixError, InvalidCompressedPrefixError, InvalidUncompressedPrefixError, InvalidSerializedSizeError;\n var init_PublicKey = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/PublicKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Bytes();\n init_Errors();\n init_Hex();\n init_Json();\n InvalidError = class extends BaseError3 {\n constructor({ publicKey }) {\n super(`Value \\`${stringify2(publicKey)}\\` is not a valid public key.`, {\n metaMessages: [\n \"Public key must contain:\",\n \"- an `x` and `prefix` value (compressed)\",\n \"- an `x`, `y`, and `prefix` value (uncompressed)\"\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidError\"\n });\n }\n };\n InvalidPrefixError = class extends BaseError3 {\n constructor({ prefix, cause }) {\n super(`Prefix \"${prefix}\" is invalid.`, {\n cause\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidPrefixError\"\n });\n }\n };\n InvalidCompressedPrefixError = class extends BaseError3 {\n constructor() {\n super(\"Prefix must be 2 or 3 for compressed public keys.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidCompressedPrefixError\"\n });\n }\n };\n InvalidUncompressedPrefixError = class extends BaseError3 {\n constructor() {\n super(\"Prefix must be 4 for uncompressed public keys.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidUncompressedPrefixError\"\n });\n }\n };\n InvalidSerializedSizeError = class extends BaseError3 {\n constructor({ publicKey }) {\n super(`Value \\`${publicKey}\\` is an invalid public key size.`, {\n metaMessages: [\n \"Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).\",\n `Received ${size3(from2(publicKey))} bytes.`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidSerializedSizeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Address.js\n function assert5(value, options = {}) {\n const { strict = true } = options;\n if (!addressRegex2.test(value))\n throw new InvalidAddressError2({\n address: value,\n cause: new InvalidInputError()\n });\n if (strict) {\n if (value.toLowerCase() === value)\n return;\n if (checksum2(value) !== value)\n throw new InvalidAddressError2({\n address: value,\n cause: new InvalidChecksumError()\n });\n }\n }\n function checksum2(address) {\n if (checksum.has(address))\n return checksum.get(address);\n assert5(address, { strict: false });\n const hexAddress = address.substring(2).toLowerCase();\n const hash3 = keccak2562(fromString(hexAddress), { as: \"Bytes\" });\n const characters = hexAddress.split(\"\");\n for (let i3 = 0; i3 < 40; i3 += 2) {\n if (hash3[i3 >> 1] >> 4 >= 8 && characters[i3]) {\n characters[i3] = characters[i3].toUpperCase();\n }\n if ((hash3[i3 >> 1] & 15) >= 8 && characters[i3 + 1]) {\n characters[i3 + 1] = characters[i3 + 1].toUpperCase();\n }\n }\n const result = `0x${characters.join(\"\")}`;\n checksum.set(address, result);\n return result;\n }\n function from4(address, options = {}) {\n const { checksum: checksumVal = false } = options;\n assert5(address);\n if (checksumVal)\n return checksum2(address);\n return address;\n }\n function fromPublicKey(publicKey, options = {}) {\n const address = keccak2562(`0x${toHex2(publicKey).slice(4)}`).substring(26);\n return from4(`0x${address}`, options);\n }\n function validate3(address, options = {}) {\n const { strict = true } = options ?? {};\n try {\n assert5(address, { strict });\n return true;\n } catch {\n return false;\n }\n }\n var addressRegex2, InvalidAddressError2, InvalidInputError, InvalidChecksumError;\n var init_Address = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Address.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Bytes();\n init_Caches();\n init_Errors();\n init_Hash();\n init_PublicKey();\n addressRegex2 = /^0x[a-fA-F0-9]{40}$/;\n InvalidAddressError2 = class extends BaseError3 {\n constructor({ address, cause }) {\n super(`Address \"${address}\" is invalid.`, {\n cause\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Address.InvalidAddressError\"\n });\n }\n };\n InvalidInputError = class extends BaseError3 {\n constructor() {\n super(\"Address is not a 20 byte (40 hexadecimal character) value.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Address.InvalidInputError\"\n });\n }\n };\n InvalidChecksumError = class extends BaseError3 {\n constructor() {\n super(\"Address does not match its checksum counterpart.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Address.InvalidChecksumError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Solidity.js\n var arrayRegex2, bytesRegex3, integerRegex3, maxInt82, maxInt162, maxInt242, maxInt322, maxInt402, maxInt482, maxInt562, maxInt642, maxInt722, maxInt802, maxInt882, maxInt962, maxInt1042, maxInt1122, maxInt1202, maxInt1282, maxInt1362, maxInt1442, maxInt1522, maxInt1602, maxInt1682, maxInt1762, maxInt1842, maxInt1922, maxInt2002, maxInt2082, maxInt2162, maxInt2242, maxInt2322, maxInt2402, maxInt2482, maxInt2562, minInt82, minInt162, minInt242, minInt322, minInt402, minInt482, minInt562, minInt642, minInt722, minInt802, minInt882, minInt962, minInt1042, minInt1122, minInt1202, minInt1282, minInt1362, minInt1442, minInt1522, minInt1602, minInt1682, minInt1762, minInt1842, minInt1922, minInt2002, minInt2082, minInt2162, minInt2242, minInt2322, minInt2402, minInt2482, minInt2562, maxUint82, maxUint162, maxUint242, maxUint322, maxUint402, maxUint482, maxUint562, maxUint642, maxUint722, maxUint802, maxUint882, maxUint962, maxUint1042, maxUint1122, maxUint1202, maxUint1282, maxUint1362, maxUint1442, maxUint1522, maxUint1602, maxUint1682, maxUint1762, maxUint1842, maxUint1922, maxUint2002, maxUint2082, maxUint2162, maxUint2242, maxUint2322, maxUint2402, maxUint2482, maxUint2562;\n var init_Solidity = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Solidity.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n arrayRegex2 = /^(.*)\\[([0-9]*)\\]$/;\n bytesRegex3 = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n integerRegex3 = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\n maxInt82 = 2n ** (8n - 1n) - 1n;\n maxInt162 = 2n ** (16n - 1n) - 1n;\n maxInt242 = 2n ** (24n - 1n) - 1n;\n maxInt322 = 2n ** (32n - 1n) - 1n;\n maxInt402 = 2n ** (40n - 1n) - 1n;\n maxInt482 = 2n ** (48n - 1n) - 1n;\n maxInt562 = 2n ** (56n - 1n) - 1n;\n maxInt642 = 2n ** (64n - 1n) - 1n;\n maxInt722 = 2n ** (72n - 1n) - 1n;\n maxInt802 = 2n ** (80n - 1n) - 1n;\n maxInt882 = 2n ** (88n - 1n) - 1n;\n maxInt962 = 2n ** (96n - 1n) - 1n;\n maxInt1042 = 2n ** (104n - 1n) - 1n;\n maxInt1122 = 2n ** (112n - 1n) - 1n;\n maxInt1202 = 2n ** (120n - 1n) - 1n;\n maxInt1282 = 2n ** (128n - 1n) - 1n;\n maxInt1362 = 2n ** (136n - 1n) - 1n;\n maxInt1442 = 2n ** (144n - 1n) - 1n;\n maxInt1522 = 2n ** (152n - 1n) - 1n;\n maxInt1602 = 2n ** (160n - 1n) - 1n;\n maxInt1682 = 2n ** (168n - 1n) - 1n;\n maxInt1762 = 2n ** (176n - 1n) - 1n;\n maxInt1842 = 2n ** (184n - 1n) - 1n;\n maxInt1922 = 2n ** (192n - 1n) - 1n;\n maxInt2002 = 2n ** (200n - 1n) - 1n;\n maxInt2082 = 2n ** (208n - 1n) - 1n;\n maxInt2162 = 2n ** (216n - 1n) - 1n;\n maxInt2242 = 2n ** (224n - 1n) - 1n;\n maxInt2322 = 2n ** (232n - 1n) - 1n;\n maxInt2402 = 2n ** (240n - 1n) - 1n;\n maxInt2482 = 2n ** (248n - 1n) - 1n;\n maxInt2562 = 2n ** (256n - 1n) - 1n;\n minInt82 = -(2n ** (8n - 1n));\n minInt162 = -(2n ** (16n - 1n));\n minInt242 = -(2n ** (24n - 1n));\n minInt322 = -(2n ** (32n - 1n));\n minInt402 = -(2n ** (40n - 1n));\n minInt482 = -(2n ** (48n - 1n));\n minInt562 = -(2n ** (56n - 1n));\n minInt642 = -(2n ** (64n - 1n));\n minInt722 = -(2n ** (72n - 1n));\n minInt802 = -(2n ** (80n - 1n));\n minInt882 = -(2n ** (88n - 1n));\n minInt962 = -(2n ** (96n - 1n));\n minInt1042 = -(2n ** (104n - 1n));\n minInt1122 = -(2n ** (112n - 1n));\n minInt1202 = -(2n ** (120n - 1n));\n minInt1282 = -(2n ** (128n - 1n));\n minInt1362 = -(2n ** (136n - 1n));\n minInt1442 = -(2n ** (144n - 1n));\n minInt1522 = -(2n ** (152n - 1n));\n minInt1602 = -(2n ** (160n - 1n));\n minInt1682 = -(2n ** (168n - 1n));\n minInt1762 = -(2n ** (176n - 1n));\n minInt1842 = -(2n ** (184n - 1n));\n minInt1922 = -(2n ** (192n - 1n));\n minInt2002 = -(2n ** (200n - 1n));\n minInt2082 = -(2n ** (208n - 1n));\n minInt2162 = -(2n ** (216n - 1n));\n minInt2242 = -(2n ** (224n - 1n));\n minInt2322 = -(2n ** (232n - 1n));\n minInt2402 = -(2n ** (240n - 1n));\n minInt2482 = -(2n ** (248n - 1n));\n minInt2562 = -(2n ** (256n - 1n));\n maxUint82 = 2n ** 8n - 1n;\n maxUint162 = 2n ** 16n - 1n;\n maxUint242 = 2n ** 24n - 1n;\n maxUint322 = 2n ** 32n - 1n;\n maxUint402 = 2n ** 40n - 1n;\n maxUint482 = 2n ** 48n - 1n;\n maxUint562 = 2n ** 56n - 1n;\n maxUint642 = 2n ** 64n - 1n;\n maxUint722 = 2n ** 72n - 1n;\n maxUint802 = 2n ** 80n - 1n;\n maxUint882 = 2n ** 88n - 1n;\n maxUint962 = 2n ** 96n - 1n;\n maxUint1042 = 2n ** 104n - 1n;\n maxUint1122 = 2n ** 112n - 1n;\n maxUint1202 = 2n ** 120n - 1n;\n maxUint1282 = 2n ** 128n - 1n;\n maxUint1362 = 2n ** 136n - 1n;\n maxUint1442 = 2n ** 144n - 1n;\n maxUint1522 = 2n ** 152n - 1n;\n maxUint1602 = 2n ** 160n - 1n;\n maxUint1682 = 2n ** 168n - 1n;\n maxUint1762 = 2n ** 176n - 1n;\n maxUint1842 = 2n ** 184n - 1n;\n maxUint1922 = 2n ** 192n - 1n;\n maxUint2002 = 2n ** 200n - 1n;\n maxUint2082 = 2n ** 208n - 1n;\n maxUint2162 = 2n ** 216n - 1n;\n maxUint2242 = 2n ** 224n - 1n;\n maxUint2322 = 2n ** 232n - 1n;\n maxUint2402 = 2n ** 240n - 1n;\n maxUint2482 = 2n ** 248n - 1n;\n maxUint2562 = 2n ** 256n - 1n;\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/abiParameters.js\n function decodeParameter2(cursor, param, options) {\n const { checksumAddress: checksumAddress2, staticPosition } = options;\n const arrayComponents = getArrayComponents2(param.type);\n if (arrayComponents) {\n const [length, type] = arrayComponents;\n return decodeArray2(cursor, { ...param, type }, { checksumAddress: checksumAddress2, length, staticPosition });\n }\n if (param.type === \"tuple\")\n return decodeTuple2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition\n });\n if (param.type === \"address\")\n return decodeAddress2(cursor, { checksum: checksumAddress2 });\n if (param.type === \"bool\")\n return decodeBool2(cursor);\n if (param.type.startsWith(\"bytes\"))\n return decodeBytes2(cursor, param, { staticPosition });\n if (param.type.startsWith(\"uint\") || param.type.startsWith(\"int\"))\n return decodeNumber2(cursor, param);\n if (param.type === \"string\")\n return decodeString2(cursor, { staticPosition });\n throw new InvalidTypeError(param.type);\n }\n function decodeAddress2(cursor, options = {}) {\n const { checksum: checksum4 = false } = options;\n const value = cursor.readBytes(32);\n const wrap3 = (address) => checksum4 ? checksum2(address) : address;\n return [wrap3(fromBytes(slice2(value, -20))), 32];\n }\n function decodeArray2(cursor, param, options) {\n const { checksumAddress: checksumAddress2, length, staticPosition } = options;\n if (!length) {\n const offset = toNumber2(cursor.readBytes(sizeOfOffset2));\n const start = staticPosition + offset;\n const startOfData = start + sizeOfLength2;\n cursor.setPosition(start);\n const length2 = toNumber2(cursor.readBytes(sizeOfLength2));\n const dynamicChild = hasDynamicChild2(param);\n let consumed2 = 0;\n const value2 = [];\n for (let i3 = 0; i3 < length2; ++i3) {\n cursor.setPosition(startOfData + (dynamicChild ? i3 * 32 : consumed2));\n const [data, consumed_] = decodeParameter2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition: startOfData\n });\n consumed2 += consumed_;\n value2.push(data);\n }\n cursor.setPosition(staticPosition + 32);\n return [value2, 32];\n }\n if (hasDynamicChild2(param)) {\n const offset = toNumber2(cursor.readBytes(sizeOfOffset2));\n const start = staticPosition + offset;\n const value2 = [];\n for (let i3 = 0; i3 < length; ++i3) {\n cursor.setPosition(start + i3 * 32);\n const [data] = decodeParameter2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition: start\n });\n value2.push(data);\n }\n cursor.setPosition(staticPosition + 32);\n return [value2, 32];\n }\n let consumed = 0;\n const value = [];\n for (let i3 = 0; i3 < length; ++i3) {\n const [data, consumed_] = decodeParameter2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition: staticPosition + consumed\n });\n consumed += consumed_;\n value.push(data);\n }\n return [value, consumed];\n }\n function decodeBool2(cursor) {\n return [toBoolean(cursor.readBytes(32), { size: 32 }), 32];\n }\n function decodeBytes2(cursor, param, { staticPosition }) {\n const [_2, size6] = param.type.split(\"bytes\");\n if (!size6) {\n const offset = toNumber2(cursor.readBytes(32));\n cursor.setPosition(staticPosition + offset);\n const length = toNumber2(cursor.readBytes(32));\n if (length === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"0x\", 32];\n }\n const data = cursor.readBytes(length);\n cursor.setPosition(staticPosition + 32);\n return [fromBytes(data), 32];\n }\n const value = fromBytes(cursor.readBytes(Number.parseInt(size6, 10), 32));\n return [value, 32];\n }\n function decodeNumber2(cursor, param) {\n const signed = param.type.startsWith(\"int\");\n const size6 = Number.parseInt(param.type.split(\"int\")[1] || \"256\", 10);\n const value = cursor.readBytes(32);\n return [\n size6 > 48 ? toBigInt2(value, { signed }) : toNumber2(value, { signed }),\n 32\n ];\n }\n function decodeTuple2(cursor, param, options) {\n const { checksumAddress: checksumAddress2, staticPosition } = options;\n const hasUnnamedChild = param.components.length === 0 || param.components.some(({ name }) => !name);\n const value = hasUnnamedChild ? [] : {};\n let consumed = 0;\n if (hasDynamicChild2(param)) {\n const offset = toNumber2(cursor.readBytes(sizeOfOffset2));\n const start = staticPosition + offset;\n for (let i3 = 0; i3 < param.components.length; ++i3) {\n const component = param.components[i3];\n cursor.setPosition(start + consumed);\n const [data, consumed_] = decodeParameter2(cursor, component, {\n checksumAddress: checksumAddress2,\n staticPosition: start\n });\n consumed += consumed_;\n value[hasUnnamedChild ? i3 : component?.name] = data;\n }\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n for (let i3 = 0; i3 < param.components.length; ++i3) {\n const component = param.components[i3];\n const [data, consumed_] = decodeParameter2(cursor, component, {\n checksumAddress: checksumAddress2,\n staticPosition\n });\n value[hasUnnamedChild ? i3 : component?.name] = data;\n consumed += consumed_;\n }\n return [value, consumed];\n }\n function decodeString2(cursor, { staticPosition }) {\n const offset = toNumber2(cursor.readBytes(32));\n const start = staticPosition + offset;\n cursor.setPosition(start);\n const length = toNumber2(cursor.readBytes(32));\n if (length === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"\", 32];\n }\n const data = cursor.readBytes(length, 32);\n const value = toString(trimLeft(data));\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n function prepareParameters({ checksumAddress: checksumAddress2, parameters, values }) {\n const preparedParameters = [];\n for (let i3 = 0; i3 < parameters.length; i3++) {\n preparedParameters.push(prepareParameter({\n checksumAddress: checksumAddress2,\n parameter: parameters[i3],\n value: values[i3]\n }));\n }\n return preparedParameters;\n }\n function prepareParameter({ checksumAddress: checksumAddress2 = false, parameter: parameter_, value }) {\n const parameter = parameter_;\n const arrayComponents = getArrayComponents2(parameter.type);\n if (arrayComponents) {\n const [length, type] = arrayComponents;\n return encodeArray2(value, {\n checksumAddress: checksumAddress2,\n length,\n parameter: {\n ...parameter,\n type\n }\n });\n }\n if (parameter.type === \"tuple\") {\n return encodeTuple2(value, {\n checksumAddress: checksumAddress2,\n parameter\n });\n }\n if (parameter.type === \"address\") {\n return encodeAddress2(value, {\n checksum: checksumAddress2\n });\n }\n if (parameter.type === \"bool\") {\n return encodeBoolean(value);\n }\n if (parameter.type.startsWith(\"uint\") || parameter.type.startsWith(\"int\")) {\n const signed = parameter.type.startsWith(\"int\");\n const [, , size6 = \"256\"] = integerRegex3.exec(parameter.type) ?? [];\n return encodeNumber2(value, {\n signed,\n size: Number(size6)\n });\n }\n if (parameter.type.startsWith(\"bytes\")) {\n return encodeBytes2(value, { type: parameter.type });\n }\n if (parameter.type === \"string\") {\n return encodeString2(value);\n }\n throw new InvalidTypeError(parameter.type);\n }\n function encode2(preparedParameters) {\n let staticSize = 0;\n for (let i3 = 0; i3 < preparedParameters.length; i3++) {\n const { dynamic, encoded } = preparedParameters[i3];\n if (dynamic)\n staticSize += 32;\n else\n staticSize += size3(encoded);\n }\n const staticParameters = [];\n const dynamicParameters = [];\n let dynamicSize = 0;\n for (let i3 = 0; i3 < preparedParameters.length; i3++) {\n const { dynamic, encoded } = preparedParameters[i3];\n if (dynamic) {\n staticParameters.push(fromNumber(staticSize + dynamicSize, { size: 32 }));\n dynamicParameters.push(encoded);\n dynamicSize += size3(encoded);\n } else {\n staticParameters.push(encoded);\n }\n }\n return concat2(...staticParameters, ...dynamicParameters);\n }\n function encodeAddress2(value, options) {\n const { checksum: checksum4 = false } = options;\n assert5(value, { strict: checksum4 });\n return {\n dynamic: false,\n encoded: padLeft(value.toLowerCase())\n };\n }\n function encodeArray2(value, options) {\n const { checksumAddress: checksumAddress2, length, parameter } = options;\n const dynamic = length === null;\n if (!Array.isArray(value))\n throw new InvalidArrayError2(value);\n if (!dynamic && value.length !== length)\n throw new ArrayLengthMismatchError({\n expectedLength: length,\n givenLength: value.length,\n type: `${parameter.type}[${length}]`\n });\n let dynamicChild = false;\n const preparedParameters = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n const preparedParam = prepareParameter({\n checksumAddress: checksumAddress2,\n parameter,\n value: value[i3]\n });\n if (preparedParam.dynamic)\n dynamicChild = true;\n preparedParameters.push(preparedParam);\n }\n if (dynamic || dynamicChild) {\n const data = encode2(preparedParameters);\n if (dynamic) {\n const length2 = fromNumber(preparedParameters.length, { size: 32 });\n return {\n dynamic: true,\n encoded: preparedParameters.length > 0 ? concat2(length2, data) : length2\n };\n }\n if (dynamicChild)\n return { dynamic: true, encoded: data };\n }\n return {\n dynamic: false,\n encoded: concat2(...preparedParameters.map(({ encoded }) => encoded))\n };\n }\n function encodeBytes2(value, { type }) {\n const [, parametersize] = type.split(\"bytes\");\n const bytesSize = size3(value);\n if (!parametersize) {\n let value_ = value;\n if (bytesSize % 32 !== 0)\n value_ = padRight(value_, Math.ceil((value.length - 2) / 2 / 32) * 32);\n return {\n dynamic: true,\n encoded: concat2(padLeft(fromNumber(bytesSize, { size: 32 })), value_)\n };\n }\n if (bytesSize !== Number.parseInt(parametersize, 10))\n throw new BytesSizeMismatchError2({\n expectedSize: Number.parseInt(parametersize, 10),\n value\n });\n return { dynamic: false, encoded: padRight(value) };\n }\n function encodeBoolean(value) {\n if (typeof value !== \"boolean\")\n throw new BaseError3(`Invalid boolean value: \"${value}\" (type: ${typeof value}). Expected: \\`true\\` or \\`false\\`.`);\n return { dynamic: false, encoded: padLeft(fromBoolean(value)) };\n }\n function encodeNumber2(value, { signed, size: size6 }) {\n if (typeof size6 === \"number\") {\n const max = 2n ** (BigInt(size6) - (signed ? 1n : 0n)) - 1n;\n const min = signed ? -max - 1n : 0n;\n if (value > max || value < min)\n throw new IntegerOutOfRangeError2({\n max: max.toString(),\n min: min.toString(),\n signed,\n size: size6 / 8,\n value: value.toString()\n });\n }\n return {\n dynamic: false,\n encoded: fromNumber(value, {\n size: 32,\n signed\n })\n };\n }\n function encodeString2(value) {\n const hexValue = fromString2(value);\n const partsLength = Math.ceil(size3(hexValue) / 32);\n const parts = [];\n for (let i3 = 0; i3 < partsLength; i3++) {\n parts.push(padRight(slice3(hexValue, i3 * 32, (i3 + 1) * 32)));\n }\n return {\n dynamic: true,\n encoded: concat2(padRight(fromNumber(size3(hexValue), { size: 32 })), ...parts)\n };\n }\n function encodeTuple2(value, options) {\n const { checksumAddress: checksumAddress2, parameter } = options;\n let dynamic = false;\n const preparedParameters = [];\n for (let i3 = 0; i3 < parameter.components.length; i3++) {\n const param_ = parameter.components[i3];\n const index2 = Array.isArray(value) ? i3 : param_.name;\n const preparedParam = prepareParameter({\n checksumAddress: checksumAddress2,\n parameter: param_,\n value: value[index2]\n });\n preparedParameters.push(preparedParam);\n if (preparedParam.dynamic)\n dynamic = true;\n }\n return {\n dynamic,\n encoded: dynamic ? encode2(preparedParameters) : concat2(...preparedParameters.map(({ encoded }) => encoded))\n };\n }\n function getArrayComponents2(type) {\n const matches = type.match(/^(.*)\\[(\\d+)?\\]$/);\n return matches ? (\n // Return `null` if the array is dynamic.\n [matches[2] ? Number(matches[2]) : null, matches[1]]\n ) : void 0;\n }\n function hasDynamicChild2(param) {\n const { type } = param;\n if (type === \"string\")\n return true;\n if (type === \"bytes\")\n return true;\n if (type.endsWith(\"[]\"))\n return true;\n if (type === \"tuple\")\n return param.components?.some(hasDynamicChild2);\n const arrayComponents = getArrayComponents2(param.type);\n if (arrayComponents && hasDynamicChild2({\n ...param,\n type: arrayComponents[1]\n }))\n return true;\n return false;\n }\n var sizeOfLength2, sizeOfOffset2;\n var init_abiParameters = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/abiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiParameters();\n init_Address();\n init_Bytes();\n init_Errors();\n init_Hex();\n init_Solidity();\n sizeOfLength2 = 32;\n sizeOfOffset2 = 32;\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/cursor.js\n function create(bytes, { recursiveReadLimit = 8192 } = {}) {\n const cursor = Object.create(staticCursor2);\n cursor.bytes = bytes;\n cursor.dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n cursor.positionReadCount = /* @__PURE__ */ new Map();\n cursor.recursiveReadLimit = recursiveReadLimit;\n return cursor;\n }\n var staticCursor2, NegativeOffsetError2, PositionOutOfBoundsError2, RecursiveReadLimitExceededError2;\n var init_cursor3 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/cursor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors();\n staticCursor2 = {\n bytes: new Uint8Array(),\n dataView: new DataView(new ArrayBuffer(0)),\n position: 0,\n positionReadCount: /* @__PURE__ */ new Map(),\n recursiveReadCount: 0,\n recursiveReadLimit: Number.POSITIVE_INFINITY,\n assertReadLimit() {\n if (this.recursiveReadCount >= this.recursiveReadLimit)\n throw new RecursiveReadLimitExceededError2({\n count: this.recursiveReadCount + 1,\n limit: this.recursiveReadLimit\n });\n },\n assertPosition(position) {\n if (position < 0 || position > this.bytes.length - 1)\n throw new PositionOutOfBoundsError2({\n length: this.bytes.length,\n position\n });\n },\n decrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError2({ offset });\n const position = this.position - offset;\n this.assertPosition(position);\n this.position = position;\n },\n getReadCount(position) {\n return this.positionReadCount.get(position || this.position) || 0;\n },\n incrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError2({ offset });\n const position = this.position + offset;\n this.assertPosition(position);\n this.position = position;\n },\n inspectByte(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectBytes(length, position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + length - 1);\n return this.bytes.subarray(position, position + length);\n },\n inspectUint8(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectUint16(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 1);\n return this.dataView.getUint16(position);\n },\n inspectUint24(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 2);\n return (this.dataView.getUint16(position) << 8) + this.dataView.getUint8(position + 2);\n },\n inspectUint32(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 3);\n return this.dataView.getUint32(position);\n },\n pushByte(byte) {\n this.assertPosition(this.position);\n this.bytes[this.position] = byte;\n this.position++;\n },\n pushBytes(bytes) {\n this.assertPosition(this.position + bytes.length - 1);\n this.bytes.set(bytes, this.position);\n this.position += bytes.length;\n },\n pushUint8(value) {\n this.assertPosition(this.position);\n this.bytes[this.position] = value;\n this.position++;\n },\n pushUint16(value) {\n this.assertPosition(this.position + 1);\n this.dataView.setUint16(this.position, value);\n this.position += 2;\n },\n pushUint24(value) {\n this.assertPosition(this.position + 2);\n this.dataView.setUint16(this.position, value >> 8);\n this.dataView.setUint8(this.position + 2, value & ~4294967040);\n this.position += 3;\n },\n pushUint32(value) {\n this.assertPosition(this.position + 3);\n this.dataView.setUint32(this.position, value);\n this.position += 4;\n },\n readByte() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectByte();\n this.position++;\n return value;\n },\n readBytes(length, size6) {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectBytes(length);\n this.position += size6 ?? length;\n return value;\n },\n readUint8() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint8();\n this.position += 1;\n return value;\n },\n readUint16() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint16();\n this.position += 2;\n return value;\n },\n readUint24() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint24();\n this.position += 3;\n return value;\n },\n readUint32() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint32();\n this.position += 4;\n return value;\n },\n get remaining() {\n return this.bytes.length - this.position;\n },\n setPosition(position) {\n const oldPosition = this.position;\n this.assertPosition(position);\n this.position = position;\n return () => this.position = oldPosition;\n },\n _touch() {\n if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)\n return;\n const count = this.getReadCount();\n this.positionReadCount.set(this.position, count + 1);\n if (count > 0)\n this.recursiveReadCount++;\n }\n };\n NegativeOffsetError2 = class extends BaseError3 {\n constructor({ offset }) {\n super(`Offset \\`${offset}\\` cannot be negative.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Cursor.NegativeOffsetError\"\n });\n }\n };\n PositionOutOfBoundsError2 = class extends BaseError3 {\n constructor({ length, position }) {\n super(`Position \\`${position}\\` is out of bounds (\\`0 < position < ${length}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Cursor.PositionOutOfBoundsError\"\n });\n }\n };\n RecursiveReadLimitExceededError2 = class extends BaseError3 {\n constructor({ count, limit }) {\n super(`Recursive read limit of \\`${limit}\\` exceeded (recursive read count: \\`${count}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Cursor.RecursiveReadLimitExceededError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiParameters.js\n function decode(parameters, data, options = {}) {\n const { as = \"Array\", checksumAddress: checksumAddress2 = false } = options;\n const bytes = typeof data === \"string\" ? fromHex2(data) : data;\n const cursor = create(bytes);\n if (size2(bytes) === 0 && parameters.length > 0)\n throw new ZeroDataError();\n if (size2(bytes) && size2(bytes) < 32)\n throw new DataSizeTooSmallError({\n data: typeof data === \"string\" ? data : fromBytes(data),\n parameters,\n size: size2(bytes)\n });\n let consumed = 0;\n const values = as === \"Array\" ? [] : {};\n for (let i3 = 0; i3 < parameters.length; ++i3) {\n const param = parameters[i3];\n cursor.setPosition(consumed);\n const [data2, consumed_] = decodeParameter2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition: 0\n });\n consumed += consumed_;\n if (as === \"Array\")\n values.push(data2);\n else\n values[param.name ?? i3] = data2;\n }\n return values;\n }\n function encode3(parameters, values, options) {\n const { checksumAddress: checksumAddress2 = false } = options ?? {};\n if (parameters.length !== values.length)\n throw new LengthMismatchError({\n expectedLength: parameters.length,\n givenLength: values.length\n });\n const preparedParameters = prepareParameters({\n checksumAddress: checksumAddress2,\n parameters,\n values\n });\n const data = encode2(preparedParameters);\n if (data.length === 0)\n return \"0x\";\n return data;\n }\n function encodePacked2(types, values) {\n if (types.length !== values.length)\n throw new LengthMismatchError({\n expectedLength: types.length,\n givenLength: values.length\n });\n const data = [];\n for (let i3 = 0; i3 < types.length; i3++) {\n const type = types[i3];\n const value = values[i3];\n data.push(encodePacked2.encode(type, value));\n }\n return concat2(...data);\n }\n function from5(parameters) {\n if (Array.isArray(parameters) && typeof parameters[0] === \"string\")\n return parseAbiParameters(parameters);\n if (typeof parameters === \"string\")\n return parseAbiParameters(parameters);\n return parameters;\n }\n var DataSizeTooSmallError, ZeroDataError, ArrayLengthMismatchError, BytesSizeMismatchError2, LengthMismatchError, InvalidArrayError2, InvalidTypeError;\n var init_AbiParameters = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_Address();\n init_Bytes();\n init_Errors();\n init_Hex();\n init_abiParameters();\n init_cursor3();\n init_Solidity();\n (function(encodePacked3) {\n function encode5(type, value, isArray = false) {\n if (type === \"address\") {\n const address = value;\n assert5(address);\n return padLeft(address.toLowerCase(), isArray ? 32 : 0);\n }\n if (type === \"string\")\n return fromString2(value);\n if (type === \"bytes\")\n return value;\n if (type === \"bool\")\n return padLeft(fromBoolean(value), isArray ? 32 : 1);\n const intMatch = type.match(integerRegex3);\n if (intMatch) {\n const [_type, baseType, bits = \"256\"] = intMatch;\n const size6 = Number.parseInt(bits, 10) / 8;\n return fromNumber(value, {\n size: isArray ? 32 : size6,\n signed: baseType === \"int\"\n });\n }\n const bytesMatch = type.match(bytesRegex3);\n if (bytesMatch) {\n const [_type, size6] = bytesMatch;\n if (Number.parseInt(size6, 10) !== (value.length - 2) / 2)\n throw new BytesSizeMismatchError2({\n expectedSize: Number.parseInt(size6, 10),\n value\n });\n return padRight(value, isArray ? 32 : 0);\n }\n const arrayMatch = type.match(arrayRegex2);\n if (arrayMatch && Array.isArray(value)) {\n const [_type, childType] = arrayMatch;\n const data = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n data.push(encode5(childType, value[i3], true));\n }\n if (data.length === 0)\n return \"0x\";\n return concat2(...data);\n }\n throw new InvalidTypeError(type);\n }\n encodePacked3.encode = encode5;\n })(encodePacked2 || (encodePacked2 = {}));\n DataSizeTooSmallError = class extends BaseError3 {\n constructor({ data, parameters, size: size6 }) {\n super(`Data size of ${size6} bytes is too small for given parameters.`, {\n metaMessages: [\n `Params: (${formatAbiParameters(parameters)})`,\n `Data: ${data} (${size6} bytes)`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.DataSizeTooSmallError\"\n });\n }\n };\n ZeroDataError = class extends BaseError3 {\n constructor() {\n super('Cannot decode zero data (\"0x\") with ABI parameters.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.ZeroDataError\"\n });\n }\n };\n ArrayLengthMismatchError = class extends BaseError3 {\n constructor({ expectedLength, givenLength, type }) {\n super(`Array length mismatch for type \\`${type}\\`. Expected: \\`${expectedLength}\\`. Given: \\`${givenLength}\\`.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.ArrayLengthMismatchError\"\n });\n }\n };\n BytesSizeMismatchError2 = class extends BaseError3 {\n constructor({ expectedSize, value }) {\n super(`Size of bytes \"${value}\" (bytes${size3(value)}) does not match expected size (bytes${expectedSize}).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.BytesSizeMismatchError\"\n });\n }\n };\n LengthMismatchError = class extends BaseError3 {\n constructor({ expectedLength, givenLength }) {\n super([\n \"ABI encoding parameters/values length mismatch.\",\n `Expected length (parameters): ${expectedLength}`,\n `Given length (values): ${givenLength}`\n ].join(\"\\n\"));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.LengthMismatchError\"\n });\n }\n };\n InvalidArrayError2 = class extends BaseError3 {\n constructor(value) {\n super(`Value \\`${value}\\` is not a valid array.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.InvalidArrayError\"\n });\n }\n };\n InvalidTypeError = class extends BaseError3 {\n constructor(type) {\n super(`Type \\`${type}\\` is not a valid ABI Type.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.InvalidTypeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Rlp.js\n function from6(value, options) {\n const { as } = options;\n const encodable = getEncodable2(value);\n const cursor = create(new Uint8Array(encodable.length));\n encodable.encode(cursor);\n if (as === \"Hex\")\n return fromBytes(cursor.bytes);\n return cursor.bytes;\n }\n function fromHex4(hex, options = {}) {\n const { as = \"Hex\" } = options;\n return from6(hex, { as });\n }\n function getEncodable2(bytes) {\n if (Array.isArray(bytes))\n return getEncodableList2(bytes.map((x4) => getEncodable2(x4)));\n return getEncodableBytes2(bytes);\n }\n function getEncodableList2(list) {\n const bodyLength = list.reduce((acc, x4) => acc + x4.length, 0);\n const sizeOfBodyLength = getSizeOfLength2(bodyLength);\n const length = (() => {\n if (bodyLength <= 55)\n return 1 + bodyLength;\n return 1 + sizeOfBodyLength + bodyLength;\n })();\n return {\n length,\n encode(cursor) {\n if (bodyLength <= 55) {\n cursor.pushByte(192 + bodyLength);\n } else {\n cursor.pushByte(192 + 55 + sizeOfBodyLength);\n if (sizeOfBodyLength === 1)\n cursor.pushUint8(bodyLength);\n else if (sizeOfBodyLength === 2)\n cursor.pushUint16(bodyLength);\n else if (sizeOfBodyLength === 3)\n cursor.pushUint24(bodyLength);\n else\n cursor.pushUint32(bodyLength);\n }\n for (const { encode: encode5 } of list) {\n encode5(cursor);\n }\n }\n };\n }\n function getEncodableBytes2(bytesOrHex) {\n const bytes = typeof bytesOrHex === \"string\" ? fromHex2(bytesOrHex) : bytesOrHex;\n const sizeOfBytesLength = getSizeOfLength2(bytes.length);\n const length = (() => {\n if (bytes.length === 1 && bytes[0] < 128)\n return 1;\n if (bytes.length <= 55)\n return 1 + bytes.length;\n return 1 + sizeOfBytesLength + bytes.length;\n })();\n return {\n length,\n encode(cursor) {\n if (bytes.length === 1 && bytes[0] < 128) {\n cursor.pushBytes(bytes);\n } else if (bytes.length <= 55) {\n cursor.pushByte(128 + bytes.length);\n cursor.pushBytes(bytes);\n } else {\n cursor.pushByte(128 + 55 + sizeOfBytesLength);\n if (sizeOfBytesLength === 1)\n cursor.pushUint8(bytes.length);\n else if (sizeOfBytesLength === 2)\n cursor.pushUint16(bytes.length);\n else if (sizeOfBytesLength === 3)\n cursor.pushUint24(bytes.length);\n else\n cursor.pushUint32(bytes.length);\n cursor.pushBytes(bytes);\n }\n }\n };\n }\n function getSizeOfLength2(length) {\n if (length < 2 ** 8)\n return 1;\n if (length < 2 ** 16)\n return 2;\n if (length < 2 ** 24)\n return 3;\n if (length < 2 ** 32)\n return 4;\n throw new BaseError3(\"Length is too large.\");\n }\n var init_Rlp = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Rlp.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Bytes();\n init_Errors();\n init_Hex();\n init_cursor3();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Signature.js\n function assert6(signature, options = {}) {\n const { recovered } = options;\n if (typeof signature.r === \"undefined\")\n throw new MissingPropertiesError({ signature });\n if (typeof signature.s === \"undefined\")\n throw new MissingPropertiesError({ signature });\n if (recovered && typeof signature.yParity === \"undefined\")\n throw new MissingPropertiesError({ signature });\n if (signature.r < 0n || signature.r > maxUint2562)\n throw new InvalidRError({ value: signature.r });\n if (signature.s < 0n || signature.s > maxUint2562)\n throw new InvalidSError({ value: signature.s });\n if (typeof signature.yParity === \"number\" && signature.yParity !== 0 && signature.yParity !== 1)\n throw new InvalidYParityError({ value: signature.yParity });\n }\n function fromBytes3(signature) {\n return fromHex5(fromBytes(signature));\n }\n function fromHex5(signature) {\n if (signature.length !== 130 && signature.length !== 132)\n throw new InvalidSerializedSizeError2({ signature });\n const r2 = BigInt(slice3(signature, 0, 32));\n const s4 = BigInt(slice3(signature, 32, 64));\n const yParity = (() => {\n const yParity2 = Number(`0x${signature.slice(130)}`);\n if (Number.isNaN(yParity2))\n return void 0;\n try {\n return vToYParity(yParity2);\n } catch {\n throw new InvalidYParityError({ value: yParity2 });\n }\n })();\n if (typeof yParity === \"undefined\")\n return {\n r: r2,\n s: s4\n };\n return {\n r: r2,\n s: s4,\n yParity\n };\n }\n function extract2(value) {\n if (typeof value.r === \"undefined\")\n return void 0;\n if (typeof value.s === \"undefined\")\n return void 0;\n return from7(value);\n }\n function from7(signature) {\n const signature_ = (() => {\n if (typeof signature === \"string\")\n return fromHex5(signature);\n if (signature instanceof Uint8Array)\n return fromBytes3(signature);\n if (typeof signature.r === \"string\")\n return fromRpc2(signature);\n if (signature.v)\n return fromLegacy(signature);\n return {\n r: signature.r,\n s: signature.s,\n ...typeof signature.yParity !== \"undefined\" ? { yParity: signature.yParity } : {}\n };\n })();\n assert6(signature_);\n return signature_;\n }\n function fromLegacy(signature) {\n return {\n r: signature.r,\n s: signature.s,\n yParity: vToYParity(signature.v)\n };\n }\n function fromRpc2(signature) {\n const yParity = (() => {\n const v2 = signature.v ? Number(signature.v) : void 0;\n let yParity2 = signature.yParity ? Number(signature.yParity) : void 0;\n if (typeof v2 === \"number\" && typeof yParity2 !== \"number\")\n yParity2 = vToYParity(v2);\n if (typeof yParity2 !== \"number\")\n throw new InvalidYParityError({ value: signature.yParity });\n return yParity2;\n })();\n return {\n r: BigInt(signature.r),\n s: BigInt(signature.s),\n yParity\n };\n }\n function toTuple(signature) {\n const { r: r2, s: s4, yParity } = signature;\n return [\n yParity ? \"0x01\" : \"0x\",\n r2 === 0n ? \"0x\" : trimLeft2(fromNumber(r2)),\n s4 === 0n ? \"0x\" : trimLeft2(fromNumber(s4))\n ];\n }\n function vToYParity(v2) {\n if (v2 === 0 || v2 === 27)\n return 0;\n if (v2 === 1 || v2 === 28)\n return 1;\n if (v2 >= 35)\n return v2 % 2 === 0 ? 1 : 0;\n throw new InvalidVError({ value: v2 });\n }\n var InvalidSerializedSizeError2, MissingPropertiesError, InvalidRError, InvalidSError, InvalidYParityError, InvalidVError;\n var init_Signature = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Signature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors();\n init_Hex();\n init_Json();\n init_Solidity();\n InvalidSerializedSizeError2 = class extends BaseError3 {\n constructor({ signature }) {\n super(`Value \\`${signature}\\` is an invalid signature size.`, {\n metaMessages: [\n \"Expected: 64 bytes or 65 bytes.\",\n `Received ${size3(from2(signature))} bytes.`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidSerializedSizeError\"\n });\n }\n };\n MissingPropertiesError = class extends BaseError3 {\n constructor({ signature }) {\n super(`Signature \\`${stringify2(signature)}\\` is missing either an \\`r\\`, \\`s\\`, or \\`yParity\\` property.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.MissingPropertiesError\"\n });\n }\n };\n InvalidRError = class extends BaseError3 {\n constructor({ value }) {\n super(`Value \\`${value}\\` is an invalid r value. r must be a positive integer less than 2^256.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidRError\"\n });\n }\n };\n InvalidSError = class extends BaseError3 {\n constructor({ value }) {\n super(`Value \\`${value}\\` is an invalid s value. s must be a positive integer less than 2^256.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidSError\"\n });\n }\n };\n InvalidYParityError = class extends BaseError3 {\n constructor({ value }) {\n super(`Value \\`${value}\\` is an invalid y-parity value. Y-parity must be 0 or 1.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidYParityError\"\n });\n }\n };\n InvalidVError = class extends BaseError3 {\n constructor({ value }) {\n super(`Value \\`${value}\\` is an invalid v value. v must be 27, 28 or >=35.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidVError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Authorization.js\n function from8(authorization, options = {}) {\n if (typeof authorization.chainId === \"string\")\n return fromRpc3(authorization);\n return { ...authorization, ...options.signature };\n }\n function fromRpc3(authorization) {\n const { address, chainId, nonce } = authorization;\n const signature = extract2(authorization);\n return {\n address,\n chainId: Number(chainId),\n nonce: BigInt(nonce),\n ...signature\n };\n }\n function getSignPayload(authorization) {\n return hash2(authorization, { presign: true });\n }\n function hash2(authorization, options = {}) {\n const { presign } = options;\n return keccak2562(concat2(\"0x05\", fromHex4(toTuple2(presign ? {\n address: authorization.address,\n chainId: authorization.chainId,\n nonce: authorization.nonce\n } : authorization))));\n }\n function toTuple2(authorization) {\n const { address, chainId, nonce } = authorization;\n const signature = extract2(authorization);\n return [\n chainId ? fromNumber(chainId) : \"0x\",\n address,\n nonce ? fromNumber(nonce) : \"0x\",\n ...signature ? toTuple(signature) : []\n ];\n }\n var init_Authorization = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Authorization.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hash();\n init_Hex();\n init_Rlp();\n init_Signature();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Secp256k1.js\n function recoverAddress2(options) {\n return fromPublicKey(recoverPublicKey2(options));\n }\n function recoverPublicKey2(options) {\n const { payload, signature } = options;\n const { r: r2, s: s4, yParity } = signature;\n const signature_ = new secp256k1.Signature(BigInt(r2), BigInt(s4)).addRecoveryBit(yParity);\n const point = signature_.recoverPublicKey(from2(payload).substring(2));\n return from3(point);\n }\n var init_Secp256k1 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Secp256k1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_Address();\n init_Hex();\n init_PublicKey();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc8010/SignatureErc8010.js\n var SignatureErc8010_exports = {};\n __export(SignatureErc8010_exports, {\n InvalidWrappedSignatureError: () => InvalidWrappedSignatureError,\n assert: () => assert7,\n from: () => from9,\n magicBytes: () => magicBytes,\n suffixParameters: () => suffixParameters,\n unwrap: () => unwrap,\n validate: () => validate4,\n wrap: () => wrap\n });\n function assert7(value) {\n if (typeof value === \"string\") {\n if (slice3(value, -32) !== magicBytes)\n throw new InvalidWrappedSignatureError(value);\n } else\n assert6(value.authorization);\n }\n function from9(value) {\n if (typeof value === \"string\")\n return unwrap(value);\n return value;\n }\n function unwrap(wrapped) {\n assert7(wrapped);\n const suffixLength = toNumber(slice3(wrapped, -64, -32));\n const suffix = slice3(wrapped, -suffixLength - 64, -64);\n const signature = slice3(wrapped, 0, -suffixLength - 64);\n const [auth, to, data] = decode(suffixParameters, suffix);\n const authorization = from8({\n address: auth.delegation,\n chainId: Number(auth.chainId),\n nonce: auth.nonce,\n yParity: auth.yParity,\n r: auth.r,\n s: auth.s\n });\n return {\n authorization,\n signature,\n ...data && data !== \"0x\" ? { data, to } : {}\n };\n }\n function wrap(value) {\n const { data, signature } = value;\n assert7(value);\n const self2 = recoverAddress2({\n payload: getSignPayload(value.authorization),\n signature: from7(value.authorization)\n });\n const suffix = encode3(suffixParameters, [\n {\n ...value.authorization,\n delegation: value.authorization.address,\n chainId: BigInt(value.authorization.chainId)\n },\n value.to ?? self2,\n data ?? \"0x\"\n ]);\n const suffixLength = fromNumber(size3(suffix), { size: 32 });\n return concat2(signature, suffix, suffixLength, magicBytes);\n }\n function validate4(value) {\n try {\n assert7(value);\n return true;\n } catch {\n return false;\n }\n }\n var magicBytes, suffixParameters, InvalidWrappedSignatureError;\n var init_SignatureErc8010 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc8010/SignatureErc8010.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiParameters();\n init_Authorization();\n init_Errors();\n init_Hex();\n init_Secp256k1();\n init_Signature();\n magicBytes = \"0x8010801080108010801080108010801080108010801080108010801080108010\";\n suffixParameters = from5(\"(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data\");\n InvalidWrappedSignatureError = class extends BaseError3 {\n constructor(wrapped) {\n super(`Value \\`${wrapped}\\` is an invalid ERC-8010 wrapped signature.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignatureErc8010.InvalidWrappedSignatureError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc8010/index.js\n var init_erc8010 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc8010/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_SignatureErc8010();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/index.js\n var init_utils7 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/proof.js\n function formatStorageProof(storageProof) {\n return storageProof.map((proof) => ({\n ...proof,\n value: BigInt(proof.value)\n }));\n }\n function formatProof(proof) {\n return {\n ...proof,\n balance: proof.balance ? BigInt(proof.balance) : void 0,\n nonce: proof.nonce ? hexToNumber(proof.nonce) : void 0,\n storageProof: proof.storageProof ? formatStorageProof(proof.storageProof) : void 0\n };\n }\n var init_proof = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/proof.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils7();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getProof.js\n async function getProof(client, { address, blockNumber, blockTag: blockTag_, storageKeys }) {\n const blockTag = blockTag_ ?? \"latest\";\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n const proof = await client.request({\n method: \"eth_getProof\",\n params: [address, storageKeys, blockNumberHex || blockTag]\n });\n return formatProof(proof);\n }\n var init_getProof = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getProof.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_proof();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getStorageAt.js\n async function getStorageAt(client, { address, blockNumber, blockTag = \"latest\", slot }) {\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n const data = await client.request({\n method: \"eth_getStorageAt\",\n params: [address, slot, blockNumberHex || blockTag]\n });\n return data;\n }\n var init_getStorageAt = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getStorageAt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransaction.js\n async function getTransaction(client, { blockHash, blockNumber, blockTag: blockTag_, hash: hash3, index: index2 }) {\n const blockTag = blockTag_ || \"latest\";\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n let transaction = null;\n if (hash3) {\n transaction = await client.request({\n method: \"eth_getTransactionByHash\",\n params: [hash3]\n }, { dedupe: true });\n } else if (blockHash) {\n transaction = await client.request({\n method: \"eth_getTransactionByBlockHashAndIndex\",\n params: [blockHash, numberToHex(index2)]\n }, { dedupe: true });\n } else if (blockNumberHex || blockTag) {\n transaction = await client.request({\n method: \"eth_getTransactionByBlockNumberAndIndex\",\n params: [blockNumberHex || blockTag, numberToHex(index2)]\n }, { dedupe: Boolean(blockNumberHex) });\n }\n if (!transaction)\n throw new TransactionNotFoundError({\n blockHash,\n blockNumber,\n blockTag,\n hash: hash3,\n index: index2\n });\n const format = client.chain?.formatters?.transaction?.format || formatTransaction;\n return format(transaction, \"getTransaction\");\n }\n var init_getTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n init_toHex();\n init_transaction2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionConfirmations.js\n async function getTransactionConfirmations(client, { hash: hash3, transactionReceipt }) {\n const [blockNumber, transaction] = await Promise.all([\n getAction(client, getBlockNumber, \"getBlockNumber\")({}),\n hash3 ? getAction(client, getTransaction, \"getTransaction\")({ hash: hash3 }) : void 0\n ]);\n const transactionBlockNumber = transactionReceipt?.blockNumber || transaction?.blockNumber;\n if (!transactionBlockNumber)\n return 0n;\n return blockNumber - transactionBlockNumber + 1n;\n }\n var init_getTransactionConfirmations = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionConfirmations.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAction();\n init_getBlockNumber();\n init_getTransaction();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionReceipt.js\n async function getTransactionReceipt(client, { hash: hash3 }) {\n const receipt = await client.request({\n method: \"eth_getTransactionReceipt\",\n params: [hash3]\n }, { dedupe: true });\n if (!receipt)\n throw new TransactionReceiptNotFoundError({ hash: hash3 });\n const format = client.chain?.formatters?.transactionReceipt?.format || formatTransactionReceipt;\n return format(receipt, \"getTransactionReceipt\");\n }\n var init_getTransactionReceipt = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionReceipt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n init_transactionReceipt();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/multicall.js\n async function multicall(client, parameters) {\n const { account, authorizationList, allowFailure = true, blockNumber, blockOverrides, blockTag, stateOverride } = parameters;\n const contracts2 = parameters.contracts;\n const { batchSize = parameters.batchSize ?? 1024, deployless = parameters.deployless ?? false } = typeof client.batch?.multicall === \"object\" ? client.batch.multicall : {};\n const multicallAddress = (() => {\n if (parameters.multicallAddress)\n return parameters.multicallAddress;\n if (deployless)\n return null;\n if (client.chain) {\n return getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: \"multicall3\"\n });\n }\n throw new Error(\"client chain not configured. multicallAddress is required.\");\n })();\n const chunkedCalls = [[]];\n let currentChunk = 0;\n let currentChunkSize = 0;\n for (let i3 = 0; i3 < contracts2.length; i3++) {\n const { abi: abi2, address, args, functionName } = contracts2[i3];\n try {\n const callData = encodeFunctionData({ abi: abi2, args, functionName });\n currentChunkSize += (callData.length - 2) / 2;\n if (\n // Check if batching is enabled.\n batchSize > 0 && // Check if the current size of the batch exceeds the size limit.\n currentChunkSize > batchSize && // Check if the current chunk is not already empty.\n chunkedCalls[currentChunk].length > 0\n ) {\n currentChunk++;\n currentChunkSize = (callData.length - 2) / 2;\n chunkedCalls[currentChunk] = [];\n }\n chunkedCalls[currentChunk] = [\n ...chunkedCalls[currentChunk],\n {\n allowFailure: true,\n callData,\n target: address\n }\n ];\n } catch (err) {\n const error = getContractError(err, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/multicall\",\n functionName,\n sender: account\n });\n if (!allowFailure)\n throw error;\n chunkedCalls[currentChunk] = [\n ...chunkedCalls[currentChunk],\n {\n allowFailure: true,\n callData: \"0x\",\n target: address\n }\n ];\n }\n }\n const aggregate3Results = await Promise.allSettled(chunkedCalls.map((calls) => getAction(client, readContract, \"readContract\")({\n ...multicallAddress === null ? { code: multicall3Bytecode } : { address: multicallAddress },\n abi: multicall3Abi,\n account,\n args: [calls],\n authorizationList,\n blockNumber,\n blockOverrides,\n blockTag,\n functionName: \"aggregate3\",\n stateOverride\n })));\n const results = [];\n for (let i3 = 0; i3 < aggregate3Results.length; i3++) {\n const result = aggregate3Results[i3];\n if (result.status === \"rejected\") {\n if (!allowFailure)\n throw result.reason;\n for (let j2 = 0; j2 < chunkedCalls[i3].length; j2++) {\n results.push({\n status: \"failure\",\n error: result.reason,\n result: void 0\n });\n }\n continue;\n }\n const aggregate3Result = result.value;\n for (let j2 = 0; j2 < aggregate3Result.length; j2++) {\n const { returnData, success } = aggregate3Result[j2];\n const { callData } = chunkedCalls[i3][j2];\n const { abi: abi2, address, functionName, args } = contracts2[results.length];\n try {\n if (callData === \"0x\")\n throw new AbiDecodingZeroDataError();\n if (!success)\n throw new RawContractError({ data: returnData });\n const result2 = decodeFunctionResult({\n abi: abi2,\n args,\n data: returnData,\n functionName\n });\n results.push(allowFailure ? { result: result2, status: \"success\" } : result2);\n } catch (err) {\n const error = getContractError(err, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/multicall\",\n functionName\n });\n if (!allowFailure)\n throw error;\n results.push({ error, result: void 0, status: \"failure\" });\n }\n }\n }\n if (results.length !== contracts2.length)\n throw new BaseError2(\"multicall results mismatch\");\n return results;\n }\n var init_multicall = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/multicall.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_contracts();\n init_abi();\n init_base();\n init_contract();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getChainContractAddress();\n init_getContractError();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateBlocks.js\n async function simulateBlocks(client, parameters) {\n const { blockNumber, blockTag = client.experimental_blockTag ?? \"latest\", blocks, returnFullTransactions, traceTransfers, validation } = parameters;\n try {\n const blockStateCalls = [];\n for (const block2 of blocks) {\n const blockOverrides = block2.blockOverrides ? toRpc2(block2.blockOverrides) : void 0;\n const calls = block2.calls.map((call_) => {\n const call2 = call_;\n const account = call2.account ? parseAccount(call2.account) : void 0;\n const data = call2.abi ? encodeFunctionData(call2) : call2.data;\n const request = {\n ...call2,\n account,\n data: call2.dataSuffix ? concat([data || \"0x\", call2.dataSuffix]) : data,\n from: call2.from ?? account?.address\n };\n assertRequest(request);\n return formatTransactionRequest(request);\n });\n const stateOverrides = block2.stateOverrides ? serializeStateOverride(block2.stateOverrides) : void 0;\n blockStateCalls.push({\n blockOverrides,\n calls,\n stateOverrides\n });\n }\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const result = await client.request({\n method: \"eth_simulateV1\",\n params: [\n { blockStateCalls, returnFullTransactions, traceTransfers, validation },\n block\n ]\n });\n return result.map((block2, i3) => ({\n ...formatBlock(block2),\n calls: block2.calls.map((call2, j2) => {\n const { abi: abi2, args, functionName, to } = blocks[i3].calls[j2];\n const data = call2.error?.data ?? call2.returnData;\n const gasUsed = BigInt(call2.gasUsed);\n const logs = call2.logs?.map((log) => formatLog(log));\n const status = call2.status === \"0x1\" ? \"success\" : \"failure\";\n const result2 = abi2 && status === \"success\" && data !== \"0x\" ? decodeFunctionResult({\n abi: abi2,\n data,\n functionName\n }) : null;\n const error = (() => {\n if (status === \"success\")\n return void 0;\n let error2;\n if (call2.error?.data === \"0x\")\n error2 = new AbiDecodingZeroDataError();\n else if (call2.error)\n error2 = new RawContractError(call2.error);\n if (!error2)\n return void 0;\n return getContractError(error2, {\n abi: abi2 ?? [],\n address: to ?? \"0x\",\n args,\n functionName: functionName ?? \"\"\n });\n })();\n return {\n data,\n gasUsed,\n logs,\n status,\n ...status === \"success\" ? {\n result: result2\n } : {\n error\n }\n };\n })\n }));\n } catch (e2) {\n const cause = e2;\n const error = getNodeError(cause, {});\n if (error instanceof UnknownNodeError)\n throw cause;\n throw error;\n }\n }\n var init_simulateBlocks = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateBlocks.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_BlockOverrides();\n init_parseAccount();\n init_abi();\n init_contract();\n init_node();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_concat();\n init_toHex();\n init_getContractError();\n init_getNodeError();\n init_block2();\n init_log2();\n init_transactionRequest();\n init_stateOverride2();\n init_assertRequest();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/abiItem.js\n function normalizeSignature2(signature) {\n let active = true;\n let current = \"\";\n let level = 0;\n let result = \"\";\n let valid = false;\n for (let i3 = 0; i3 < signature.length; i3++) {\n const char = signature[i3];\n if ([\"(\", \")\", \",\"].includes(char))\n active = true;\n if (char === \"(\")\n level++;\n if (char === \")\")\n level--;\n if (!active)\n continue;\n if (level === 0) {\n if (char === \" \" && [\"event\", \"function\", \"error\", \"\"].includes(result))\n result = \"\";\n else {\n result += char;\n if (char === \")\") {\n valid = true;\n break;\n }\n }\n continue;\n }\n if (char === \" \") {\n if (signature[i3 - 1] !== \",\" && current !== \",\" && current !== \",(\") {\n current = \"\";\n active = false;\n }\n continue;\n }\n result += char;\n current += char;\n }\n if (!valid)\n throw new BaseError3(\"Unable to normalize signature.\");\n return result;\n }\n function isArgOfType2(arg, abiParameter) {\n const argType = typeof arg;\n const abiParameterType = abiParameter.type;\n switch (abiParameterType) {\n case \"address\":\n return validate3(arg, { strict: false });\n case \"bool\":\n return argType === \"boolean\";\n case \"function\":\n return argType === \"string\";\n case \"string\":\n return argType === \"string\";\n default: {\n if (abiParameterType === \"tuple\" && \"components\" in abiParameter)\n return Object.values(abiParameter.components).every((component, index2) => {\n return isArgOfType2(Object.values(arg)[index2], component);\n });\n if (/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(abiParameterType))\n return argType === \"number\" || argType === \"bigint\";\n if (/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(abiParameterType))\n return argType === \"string\" || arg instanceof Uint8Array;\n if (/[a-z]+[1-9]{0,3}(\\[[0-9]{0,}\\])+$/.test(abiParameterType)) {\n return Array.isArray(arg) && arg.every((x4) => isArgOfType2(x4, {\n ...abiParameter,\n // Pop off `[]` or `[M]` from end of type\n type: abiParameterType.replace(/(\\[[0-9]{0,}\\])$/, \"\")\n }));\n }\n return false;\n }\n }\n }\n function getAmbiguousTypes2(sourceParameters, targetParameters, args) {\n for (const parameterIndex in sourceParameters) {\n const sourceParameter = sourceParameters[parameterIndex];\n const targetParameter = targetParameters[parameterIndex];\n if (sourceParameter.type === \"tuple\" && targetParameter.type === \"tuple\" && \"components\" in sourceParameter && \"components\" in targetParameter)\n return getAmbiguousTypes2(sourceParameter.components, targetParameter.components, args[parameterIndex]);\n const types = [sourceParameter.type, targetParameter.type];\n const ambiguous = (() => {\n if (types.includes(\"address\") && types.includes(\"bytes20\"))\n return true;\n if (types.includes(\"address\") && types.includes(\"string\"))\n return validate3(args[parameterIndex], {\n strict: false\n });\n if (types.includes(\"address\") && types.includes(\"bytes\"))\n return validate3(args[parameterIndex], {\n strict: false\n });\n return false;\n })();\n if (ambiguous)\n return types;\n }\n return;\n }\n var init_abiItem2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/abiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Address();\n init_Errors();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiItem.js\n function from10(abiItem, options = {}) {\n const { prepare = true } = options;\n const item = (() => {\n if (Array.isArray(abiItem))\n return parseAbiItem(abiItem);\n if (typeof abiItem === \"string\")\n return parseAbiItem(abiItem);\n return abiItem;\n })();\n return {\n ...item,\n ...prepare ? { hash: getSignatureHash(item) } : {}\n };\n }\n function fromAbi(abi2, name, options) {\n const { args = [], prepare = true } = options ?? {};\n const isSelector = validate2(name, { strict: false });\n const abiItems = abi2.filter((abiItem2) => {\n if (isSelector) {\n if (abiItem2.type === \"function\" || abiItem2.type === \"error\")\n return getSelector(abiItem2) === slice3(name, 0, 4);\n if (abiItem2.type === \"event\")\n return getSignatureHash(abiItem2) === name;\n return false;\n }\n return \"name\" in abiItem2 && abiItem2.name === name;\n });\n if (abiItems.length === 0)\n throw new NotFoundError({ name });\n if (abiItems.length === 1)\n return {\n ...abiItems[0],\n ...prepare ? { hash: getSignatureHash(abiItems[0]) } : {}\n };\n let matchedAbiItem;\n for (const abiItem2 of abiItems) {\n if (!(\"inputs\" in abiItem2))\n continue;\n if (!args || args.length === 0) {\n if (!abiItem2.inputs || abiItem2.inputs.length === 0)\n return {\n ...abiItem2,\n ...prepare ? { hash: getSignatureHash(abiItem2) } : {}\n };\n continue;\n }\n if (!abiItem2.inputs)\n continue;\n if (abiItem2.inputs.length === 0)\n continue;\n if (abiItem2.inputs.length !== args.length)\n continue;\n const matched = args.every((arg, index2) => {\n const abiParameter = \"inputs\" in abiItem2 && abiItem2.inputs[index2];\n if (!abiParameter)\n return false;\n return isArgOfType2(arg, abiParameter);\n });\n if (matched) {\n if (matchedAbiItem && \"inputs\" in matchedAbiItem && matchedAbiItem.inputs) {\n const ambiguousTypes = getAmbiguousTypes2(abiItem2.inputs, matchedAbiItem.inputs, args);\n if (ambiguousTypes)\n throw new AmbiguityError({\n abiItem: abiItem2,\n type: ambiguousTypes[0]\n }, {\n abiItem: matchedAbiItem,\n type: ambiguousTypes[1]\n });\n }\n matchedAbiItem = abiItem2;\n }\n }\n const abiItem = (() => {\n if (matchedAbiItem)\n return matchedAbiItem;\n const [abiItem2, ...overloads] = abiItems;\n return { ...abiItem2, overloads };\n })();\n if (!abiItem)\n throw new NotFoundError({ name });\n return {\n ...abiItem,\n ...prepare ? { hash: getSignatureHash(abiItem) } : {}\n };\n }\n function getSelector(...parameters) {\n const abiItem = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, name] = parameters;\n return fromAbi(abi2, name);\n }\n return parameters[0];\n })();\n return slice3(getSignatureHash(abiItem), 0, 4);\n }\n function getSignature(...parameters) {\n const abiItem = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, name] = parameters;\n return fromAbi(abi2, name);\n }\n return parameters[0];\n })();\n const signature = (() => {\n if (typeof abiItem === \"string\")\n return abiItem;\n return formatAbiItem(abiItem);\n })();\n return normalizeSignature2(signature);\n }\n function getSignatureHash(...parameters) {\n const abiItem = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, name] = parameters;\n return fromAbi(abi2, name);\n }\n return parameters[0];\n })();\n if (typeof abiItem !== \"string\" && \"hash\" in abiItem && abiItem.hash)\n return abiItem.hash;\n return keccak2562(fromString2(getSignature(abiItem)));\n }\n var AmbiguityError, NotFoundError;\n var init_AbiItem = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_Errors();\n init_Hash();\n init_Hex();\n init_abiItem2();\n AmbiguityError = class extends BaseError3 {\n constructor(x4, y6) {\n super(\"Found ambiguous types in overloaded ABI Items.\", {\n metaMessages: [\n // TODO: abitype to add support for signature-formatted ABI items.\n `\\`${x4.type}\\` in \\`${normalizeSignature2(formatAbiItem(x4.abiItem))}\\`, and`,\n `\\`${y6.type}\\` in \\`${normalizeSignature2(formatAbiItem(y6.abiItem))}\\``,\n \"\",\n \"These types encode differently and cannot be distinguished at runtime.\",\n \"Remove one of the ambiguous items in the ABI.\"\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiItem.AmbiguityError\"\n });\n }\n };\n NotFoundError = class extends BaseError3 {\n constructor({ name, data, type = \"item\" }) {\n const selector = (() => {\n if (name)\n return ` with name \"${name}\"`;\n if (data)\n return ` with data \"${data}\"`;\n return \"\";\n })();\n super(`ABI ${type}${selector} not found.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiItem.NotFoundError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiConstructor.js\n function encode4(...parameters) {\n const [abiConstructor, options] = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, options2] = parameters;\n return [fromAbi2(abi2), options2];\n }\n return parameters;\n })();\n const { bytecode, args } = options;\n return concat2(bytecode, abiConstructor.inputs?.length && args?.length ? encode3(abiConstructor.inputs, args) : \"0x\");\n }\n function from11(abiConstructor) {\n return from10(abiConstructor);\n }\n function fromAbi2(abi2) {\n const item = abi2.find((item2) => item2.type === \"constructor\");\n if (!item)\n throw new NotFoundError({ name: \"constructor\" });\n return item;\n }\n var init_AbiConstructor = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiConstructor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiItem();\n init_AbiParameters();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiFunction.js\n function encodeData2(...parameters) {\n const [abiFunction, args = []] = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, name, args3] = parameters;\n return [fromAbi3(abi2, name, { args: args3 }), args3];\n }\n const [abiFunction2, args2] = parameters;\n return [abiFunction2, args2];\n })();\n const { overloads } = abiFunction;\n const item = overloads ? fromAbi3([abiFunction, ...overloads], abiFunction.name, {\n args\n }) : abiFunction;\n const selector = getSelector2(item);\n const data = args.length > 0 ? encode3(item.inputs, args) : void 0;\n return data ? concat2(selector, data) : selector;\n }\n function from12(abiFunction, options = {}) {\n return from10(abiFunction, options);\n }\n function fromAbi3(abi2, name, options) {\n const item = fromAbi(abi2, name, options);\n if (item.type !== \"function\")\n throw new NotFoundError({ name, type: \"function\" });\n return item;\n }\n function getSelector2(abiItem) {\n return getSelector(abiItem);\n }\n var init_AbiFunction = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiFunction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiItem();\n init_AbiParameters();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/address.js\n var ethAddress, zeroAddress;\n var init_address2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/address.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n ethAddress = \"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\";\n zeroAddress = \"0x0000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateCalls.js\n async function simulateCalls(client, parameters) {\n const { blockNumber, blockTag, calls, stateOverrides, traceAssetChanges, traceTransfers, validation } = parameters;\n const account = parameters.account ? parseAccount(parameters.account) : void 0;\n if (traceAssetChanges && !account)\n throw new BaseError2(\"`account` is required when `traceAssetChanges` is true\");\n const getBalanceData = account ? encode4(from11(\"constructor(bytes, bytes)\"), {\n bytecode: deploylessCallViaBytecodeBytecode,\n args: [\n getBalanceCode,\n encodeData2(from12(\"function getBalance(address)\"), [account.address])\n ]\n }) : void 0;\n const assetAddresses = traceAssetChanges ? await Promise.all(parameters.calls.map(async (call2) => {\n if (!call2.data && !call2.abi)\n return;\n const { accessList } = await createAccessList(client, {\n account: account.address,\n ...call2,\n data: call2.abi ? encodeFunctionData(call2) : call2.data\n });\n return accessList.map(({ address, storageKeys }) => storageKeys.length > 0 ? address : null);\n })).then((x4) => x4.flat().filter(Boolean)) : [];\n const blocks = await simulateBlocks(client, {\n blockNumber,\n blockTag,\n blocks: [\n ...traceAssetChanges ? [\n // ETH pre balances\n {\n calls: [{ data: getBalanceData }],\n stateOverrides\n },\n // Asset pre balances\n {\n calls: assetAddresses.map((address, i3) => ({\n abi: [\n from12(\"function balanceOf(address) returns (uint256)\")\n ],\n functionName: \"balanceOf\",\n args: [account.address],\n to: address,\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n }\n ] : [],\n {\n calls: [...calls, {}].map((call2) => ({\n ...call2,\n from: account?.address\n })),\n stateOverrides\n },\n ...traceAssetChanges ? [\n // ETH post balances\n {\n calls: [{ data: getBalanceData }]\n },\n // Asset post balances\n {\n calls: assetAddresses.map((address, i3) => ({\n abi: [\n from12(\"function balanceOf(address) returns (uint256)\")\n ],\n functionName: \"balanceOf\",\n args: [account.address],\n to: address,\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n },\n // Decimals\n {\n calls: assetAddresses.map((address, i3) => ({\n to: address,\n abi: [\n from12(\"function decimals() returns (uint256)\")\n ],\n functionName: \"decimals\",\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n },\n // Token URI\n {\n calls: assetAddresses.map((address, i3) => ({\n to: address,\n abi: [\n from12(\"function tokenURI(uint256) returns (string)\")\n ],\n functionName: \"tokenURI\",\n args: [0n],\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n },\n // Symbols\n {\n calls: assetAddresses.map((address, i3) => ({\n to: address,\n abi: [from12(\"function symbol() returns (string)\")],\n functionName: \"symbol\",\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n }\n ] : []\n ],\n traceTransfers,\n validation\n });\n const block_results = traceAssetChanges ? blocks[2] : blocks[0];\n const [block_ethPre, block_assetsPre, , block_ethPost, block_assetsPost, block_decimals, block_tokenURI, block_symbols] = traceAssetChanges ? blocks : [];\n const { calls: block_calls, ...block } = block_results;\n const results = block_calls.slice(0, -1) ?? [];\n const ethPre = block_ethPre?.calls ?? [];\n const assetsPre = block_assetsPre?.calls ?? [];\n const balancesPre = [...ethPre, ...assetsPre].map((call2) => call2.status === \"success\" ? hexToBigInt(call2.data) : null);\n const ethPost = block_ethPost?.calls ?? [];\n const assetsPost = block_assetsPost?.calls ?? [];\n const balancesPost = [...ethPost, ...assetsPost].map((call2) => call2.status === \"success\" ? hexToBigInt(call2.data) : null);\n const decimals = (block_decimals?.calls ?? []).map((x4) => x4.status === \"success\" ? x4.result : null);\n const symbols = (block_symbols?.calls ?? []).map((x4) => x4.status === \"success\" ? x4.result : null);\n const tokenURI = (block_tokenURI?.calls ?? []).map((x4) => x4.status === \"success\" ? x4.result : null);\n const changes = [];\n for (const [i3, balancePost] of balancesPost.entries()) {\n const balancePre = balancesPre[i3];\n if (typeof balancePost !== \"bigint\")\n continue;\n if (typeof balancePre !== \"bigint\")\n continue;\n const decimals_ = decimals[i3 - 1];\n const symbol_ = symbols[i3 - 1];\n const tokenURI_ = tokenURI[i3 - 1];\n const token = (() => {\n if (i3 === 0)\n return {\n address: ethAddress,\n decimals: 18,\n symbol: \"ETH\"\n };\n return {\n address: assetAddresses[i3 - 1],\n decimals: tokenURI_ || decimals_ ? Number(decimals_ ?? 1) : void 0,\n symbol: symbol_ ?? void 0\n };\n })();\n if (changes.some((change) => change.token.address === token.address))\n continue;\n changes.push({\n token,\n value: {\n pre: balancePre,\n post: balancePost,\n diff: balancePost - balancePre\n }\n });\n }\n return {\n assetChanges: changes,\n block,\n results\n };\n }\n var getBalanceCode;\n var init_simulateCalls = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateCalls.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiConstructor();\n init_AbiFunction();\n init_parseAccount();\n init_address2();\n init_contracts();\n init_base();\n init_encodeFunctionData();\n init_utils7();\n init_createAccessList();\n init_simulateBlocks();\n getBalanceCode = \"0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc6492/SignatureErc6492.js\n var SignatureErc6492_exports = {};\n __export(SignatureErc6492_exports, {\n InvalidWrappedSignatureError: () => InvalidWrappedSignatureError2,\n assert: () => assert8,\n from: () => from13,\n magicBytes: () => magicBytes2,\n universalSignatureValidatorAbi: () => universalSignatureValidatorAbi,\n universalSignatureValidatorBytecode: () => universalSignatureValidatorBytecode,\n unwrap: () => unwrap2,\n validate: () => validate5,\n wrap: () => wrap2\n });\n function assert8(wrapped) {\n if (slice3(wrapped, -32) !== magicBytes2)\n throw new InvalidWrappedSignatureError2(wrapped);\n }\n function from13(wrapped) {\n if (typeof wrapped === \"string\")\n return unwrap2(wrapped);\n return wrapped;\n }\n function unwrap2(wrapped) {\n assert8(wrapped);\n const [to, data, signature] = decode(from5(\"address, bytes, bytes\"), wrapped);\n return { data, signature, to };\n }\n function wrap2(value) {\n const { data, signature, to } = value;\n return concat2(encode3(from5(\"address, bytes, bytes\"), [\n to,\n data,\n signature\n ]), magicBytes2);\n }\n function validate5(wrapped) {\n try {\n assert8(wrapped);\n return true;\n } catch {\n return false;\n }\n }\n var magicBytes2, universalSignatureValidatorBytecode, universalSignatureValidatorAbi, InvalidWrappedSignatureError2;\n var init_SignatureErc6492 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc6492/SignatureErc6492.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiParameters();\n init_Errors();\n init_Hex();\n magicBytes2 = \"0x6492649264926492649264926492649264926492649264926492649264926492\";\n universalSignatureValidatorBytecode = \"0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572\";\n universalSignatureValidatorAbi = [\n {\n inputs: [\n {\n name: \"_signer\",\n type: \"address\"\n },\n {\n name: \"_hash\",\n type: \"bytes32\"\n },\n {\n name: \"_signature\",\n type: \"bytes\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n inputs: [\n {\n name: \"_signer\",\n type: \"address\"\n },\n {\n name: \"_hash\",\n type: \"bytes32\"\n },\n {\n name: \"_signature\",\n type: \"bytes\"\n }\n ],\n outputs: [\n {\n type: \"bool\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"isValidSig\"\n }\n ];\n InvalidWrappedSignatureError2 = class extends BaseError3 {\n constructor(wrapped) {\n super(`Value \\`${wrapped}\\` is an invalid ERC-6492 wrapped signature.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignatureErc6492.InvalidWrappedSignatureError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc6492/index.js\n var init_erc6492 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc6492/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_SignatureErc6492();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/serializeSignature.js\n function serializeSignature({ r: r2, s: s4, to = \"hex\", v: v2, yParity }) {\n const yParity_ = (() => {\n if (yParity === 0 || yParity === 1)\n return yParity;\n if (v2 && (v2 === 27n || v2 === 28n || v2 >= 35n))\n return v2 % 2n === 0n ? 1 : 0;\n throw new Error(\"Invalid `v` or `yParity` value\");\n })();\n const signature = `0x${new secp256k1.Signature(hexToBigInt(r2), hexToBigInt(s4)).toCompactHex()}${yParity_ === 0 ? \"1b\" : \"1c\"}`;\n if (to === \"hex\")\n return signature;\n return hexToBytes(signature);\n }\n var init_serializeSignature = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/serializeSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_fromHex();\n init_toBytes();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyHash.js\n async function verifyHash(client, parameters) {\n const { address, hash: hash3, erc6492VerifierAddress: verifierAddress = parameters.universalSignatureVerifierAddress ?? client.chain?.contracts?.erc6492Verifier?.address, multicallAddress = parameters.multicallAddress ?? client.chain?.contracts?.multicall3?.address } = parameters;\n const signature = (() => {\n const signature2 = parameters.signature;\n if (isHex(signature2))\n return signature2;\n if (typeof signature2 === \"object\" && \"r\" in signature2 && \"s\" in signature2)\n return serializeSignature(signature2);\n return bytesToHex(signature2);\n })();\n try {\n if (SignatureErc8010_exports.validate(signature))\n return await verifyErc8010(client, {\n ...parameters,\n multicallAddress,\n signature\n });\n return await verifyErc6492(client, {\n ...parameters,\n verifierAddress,\n signature\n });\n } catch (error) {\n try {\n const verified = isAddressEqual(getAddress(address), await recoverAddress({ hash: hash3, signature }));\n if (verified)\n return true;\n } catch {\n }\n if (error instanceof VerificationError) {\n return false;\n }\n throw error;\n }\n }\n async function verifyErc8010(client, parameters) {\n const { address, blockNumber, blockTag, hash: hash3, multicallAddress } = parameters;\n const { authorization: authorization_ox, data: initData, signature, to } = SignatureErc8010_exports.unwrap(parameters.signature);\n const code = await getCode(client, {\n address,\n blockNumber,\n blockTag\n });\n if (code === concatHex([\"0xef0100\", authorization_ox.address]))\n return await verifyErc1271(client, {\n address,\n blockNumber,\n blockTag,\n hash: hash3,\n signature\n });\n const authorization = {\n address: authorization_ox.address,\n chainId: Number(authorization_ox.chainId),\n nonce: Number(authorization_ox.nonce),\n r: numberToHex(authorization_ox.r, { size: 32 }),\n s: numberToHex(authorization_ox.s, { size: 32 }),\n yParity: authorization_ox.yParity\n };\n const valid = await verifyAuthorization({\n address,\n authorization\n });\n if (!valid)\n throw new VerificationError();\n const results = await getAction(client, readContract, \"readContract\")({\n ...multicallAddress ? { address: multicallAddress } : { code: multicall3Bytecode },\n authorizationList: [authorization],\n abi: multicall3Abi,\n blockNumber,\n blockTag: \"pending\",\n functionName: \"aggregate3\",\n args: [\n [\n ...initData ? [\n {\n allowFailure: true,\n target: to ?? address,\n callData: initData\n }\n ] : [],\n {\n allowFailure: true,\n target: address,\n callData: encodeFunctionData({\n abi: erc1271Abi,\n functionName: \"isValidSignature\",\n args: [hash3, signature]\n })\n }\n ]\n ]\n });\n const data = results[results.length - 1]?.returnData;\n if (data?.startsWith(\"0x1626ba7e\"))\n return true;\n throw new VerificationError();\n }\n async function verifyErc6492(client, parameters) {\n const { address, factory, factoryData, hash: hash3, signature, verifierAddress, ...rest } = parameters;\n const wrappedSignature = await (async () => {\n if (!factory && !factoryData)\n return signature;\n if (SignatureErc6492_exports.validate(signature))\n return signature;\n return SignatureErc6492_exports.wrap({\n data: factoryData,\n signature,\n to: factory\n });\n })();\n const args = verifierAddress ? {\n to: verifierAddress,\n data: encodeFunctionData({\n abi: erc6492SignatureValidatorAbi,\n functionName: \"isValidSig\",\n args: [address, hash3, wrappedSignature]\n }),\n ...rest\n } : {\n data: encodeDeployData({\n abi: erc6492SignatureValidatorAbi,\n args: [address, hash3, wrappedSignature],\n bytecode: erc6492SignatureValidatorByteCode\n }),\n ...rest\n };\n const { data } = await getAction(client, call, \"call\")(args).catch((error) => {\n if (error instanceof CallExecutionError)\n throw new VerificationError();\n throw error;\n });\n if (hexToBool(data ?? \"0x0\"))\n return true;\n throw new VerificationError();\n }\n async function verifyErc1271(client, parameters) {\n const { address, blockNumber, blockTag, hash: hash3, signature } = parameters;\n const result = await getAction(client, readContract, \"readContract\")({\n address,\n abi: erc1271Abi,\n args: [hash3, signature],\n blockNumber,\n blockTag,\n functionName: \"isValidSignature\"\n }).catch((error) => {\n if (error instanceof ContractFunctionExecutionError)\n throw new VerificationError();\n throw error;\n });\n if (result.startsWith(\"0x1626ba7e\"))\n return true;\n throw new VerificationError();\n }\n var VerificationError;\n var init_verifyHash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyHash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_erc6492();\n init_erc8010();\n init_abis();\n init_contracts();\n init_contract();\n init_encodeDeployData();\n init_encodeFunctionData();\n init_getAddress();\n init_isAddressEqual();\n init_verifyAuthorization();\n init_concat();\n init_isHex();\n init_fromHex();\n init_toHex();\n init_getAction();\n init_recoverAddress();\n init_serializeSignature();\n init_call();\n init_getCode();\n init_readContract();\n VerificationError = class extends Error {\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyMessage.js\n async function verifyMessage(client, { address, message, factory, factoryData, signature, ...callRequest }) {\n const hash3 = hashMessage(message);\n return verifyHash(client, {\n address,\n factory,\n factoryData,\n hash: hash3,\n signature,\n ...callRequest\n });\n }\n var init_verifyMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashMessage();\n init_verifyHash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyTypedData.js\n async function verifyTypedData(client, parameters) {\n const { address, factory, factoryData, signature, message, primaryType, types, domain: domain2, ...callRequest } = parameters;\n const hash3 = hashTypedData({ message, primaryType, types, domain: domain2 });\n return verifyHash(client, {\n address,\n factory,\n factoryData,\n hash: hash3,\n signature,\n ...callRequest\n });\n }\n var init_verifyTypedData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyTypedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashTypedData();\n init_verifyHash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchBlockNumber.js\n function watchBlockNumber(client, { emitOnBegin = false, emitMissed = false, onBlockNumber, onError, poll: poll_, pollingInterval = client.pollingInterval }) {\n const enablePolling = (() => {\n if (typeof poll_ !== \"undefined\")\n return poll_;\n if (client.transport.type === \"webSocket\" || client.transport.type === \"ipc\")\n return false;\n if (client.transport.type === \"fallback\" && (client.transport.transports[0].config.type === \"webSocket\" || client.transport.transports[0].config.type === \"ipc\"))\n return false;\n return true;\n })();\n let prevBlockNumber;\n const pollBlockNumber = () => {\n const observerId = stringify([\n \"watchBlockNumber\",\n client.uid,\n emitOnBegin,\n emitMissed,\n pollingInterval\n ]);\n return observe(observerId, { onBlockNumber, onError }, (emit2) => poll(async () => {\n try {\n const blockNumber = await getAction(client, getBlockNumber, \"getBlockNumber\")({ cacheTime: 0 });\n if (prevBlockNumber !== void 0) {\n if (blockNumber === prevBlockNumber)\n return;\n if (blockNumber - prevBlockNumber > 1 && emitMissed) {\n for (let i3 = prevBlockNumber + 1n; i3 < blockNumber; i3++) {\n emit2.onBlockNumber(i3, prevBlockNumber);\n prevBlockNumber = i3;\n }\n }\n }\n if (prevBlockNumber === void 0 || blockNumber > prevBlockNumber) {\n emit2.onBlockNumber(blockNumber, prevBlockNumber);\n prevBlockNumber = blockNumber;\n }\n } catch (err) {\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin,\n interval: pollingInterval\n }));\n };\n const subscribeBlockNumber = () => {\n const observerId = stringify([\n \"watchBlockNumber\",\n client.uid,\n emitOnBegin,\n emitMissed\n ]);\n return observe(observerId, { onBlockNumber, onError }, (emit2) => {\n let active = true;\n let unsubscribe = () => active = false;\n (async () => {\n try {\n const transport = (() => {\n if (client.transport.type === \"fallback\") {\n const transport2 = client.transport.transports.find((transport3) => transport3.config.type === \"webSocket\" || transport3.config.type === \"ipc\");\n if (!transport2)\n return client.transport;\n return transport2.value;\n }\n return client.transport;\n })();\n const { unsubscribe: unsubscribe_ } = await transport.subscribe({\n params: [\"newHeads\"],\n onData(data) {\n if (!active)\n return;\n const blockNumber = hexToBigInt(data.result?.number);\n emit2.onBlockNumber(blockNumber, prevBlockNumber);\n prevBlockNumber = blockNumber;\n },\n onError(error) {\n emit2.onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n });\n };\n return enablePolling ? pollBlockNumber() : subscribeBlockNumber();\n }\n var init_watchBlockNumber = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchBlockNumber.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_getBlockNumber();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/waitForTransactionReceipt.js\n async function waitForTransactionReceipt(client, parameters) {\n const {\n checkReplacement = true,\n confirmations = 1,\n hash: hash3,\n onReplaced,\n retryCount = 6,\n retryDelay = ({ count }) => ~~(1 << count) * 200,\n // exponential backoff\n timeout = 18e4\n } = parameters;\n const observerId = stringify([\"waitForTransactionReceipt\", client.uid, hash3]);\n const pollingInterval = (() => {\n if (parameters.pollingInterval)\n return parameters.pollingInterval;\n if (client.chain?.experimental_preconfirmationTime)\n return client.chain.experimental_preconfirmationTime;\n return client.pollingInterval;\n })();\n let transaction;\n let replacedTransaction;\n let receipt;\n let retrying = false;\n let _unobserve;\n let _unwatch;\n const { promise, resolve, reject } = withResolvers();\n const timer = timeout ? setTimeout(() => {\n _unwatch?.();\n _unobserve?.();\n reject(new WaitForTransactionReceiptTimeoutError({ hash: hash3 }));\n }, timeout) : void 0;\n _unobserve = observe(observerId, { onReplaced, resolve, reject }, async (emit2) => {\n receipt = await getAction(client, getTransactionReceipt, \"getTransactionReceipt\")({ hash: hash3 }).catch(() => void 0);\n if (receipt && confirmations <= 1) {\n clearTimeout(timer);\n emit2.resolve(receipt);\n _unobserve?.();\n return;\n }\n _unwatch = getAction(client, watchBlockNumber, \"watchBlockNumber\")({\n emitMissed: true,\n emitOnBegin: true,\n poll: true,\n pollingInterval,\n async onBlockNumber(blockNumber_) {\n const done = (fn) => {\n clearTimeout(timer);\n _unwatch?.();\n fn();\n _unobserve?.();\n };\n let blockNumber = blockNumber_;\n if (retrying)\n return;\n try {\n if (receipt) {\n if (confirmations > 1 && (!receipt.blockNumber || blockNumber - receipt.blockNumber + 1n < confirmations))\n return;\n done(() => emit2.resolve(receipt));\n return;\n }\n if (checkReplacement && !transaction) {\n retrying = true;\n await withRetry(async () => {\n transaction = await getAction(client, getTransaction, \"getTransaction\")({ hash: hash3 });\n if (transaction.blockNumber)\n blockNumber = transaction.blockNumber;\n }, {\n delay: retryDelay,\n retryCount\n });\n retrying = false;\n }\n receipt = await getAction(client, getTransactionReceipt, \"getTransactionReceipt\")({ hash: hash3 });\n if (confirmations > 1 && (!receipt.blockNumber || blockNumber - receipt.blockNumber + 1n < confirmations))\n return;\n done(() => emit2.resolve(receipt));\n } catch (err) {\n if (err instanceof TransactionNotFoundError || err instanceof TransactionReceiptNotFoundError) {\n if (!transaction) {\n retrying = false;\n return;\n }\n try {\n replacedTransaction = transaction;\n retrying = true;\n const block = await withRetry(() => getAction(client, getBlock, \"getBlock\")({\n blockNumber,\n includeTransactions: true\n }), {\n delay: retryDelay,\n retryCount,\n shouldRetry: ({ error }) => error instanceof BlockNotFoundError\n });\n retrying = false;\n const replacementTransaction = block.transactions.find(({ from: from14, nonce }) => from14 === replacedTransaction.from && nonce === replacedTransaction.nonce);\n if (!replacementTransaction)\n return;\n receipt = await getAction(client, getTransactionReceipt, \"getTransactionReceipt\")({\n hash: replacementTransaction.hash\n });\n if (confirmations > 1 && (!receipt.blockNumber || blockNumber - receipt.blockNumber + 1n < confirmations))\n return;\n let reason = \"replaced\";\n if (replacementTransaction.to === replacedTransaction.to && replacementTransaction.value === replacedTransaction.value && replacementTransaction.input === replacedTransaction.input) {\n reason = \"repriced\";\n } else if (replacementTransaction.from === replacementTransaction.to && replacementTransaction.value === 0n) {\n reason = \"cancelled\";\n }\n done(() => {\n emit2.onReplaced?.({\n reason,\n replacedTransaction,\n transaction: replacementTransaction,\n transactionReceipt: receipt\n });\n emit2.resolve(receipt);\n });\n } catch (err_) {\n done(() => emit2.reject(err_));\n }\n } else {\n done(() => emit2.reject(err));\n }\n }\n }\n });\n });\n return promise;\n }\n var init_waitForTransactionReceipt = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/waitForTransactionReceipt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_block();\n init_transaction();\n init_getAction();\n init_observe();\n init_withResolvers();\n init_withRetry();\n init_stringify();\n init_getBlock();\n init_getTransaction();\n init_getTransactionReceipt();\n init_watchBlockNumber();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchBlocks.js\n function watchBlocks(client, { blockTag = client.experimental_blockTag ?? \"latest\", emitMissed = false, emitOnBegin = false, onBlock, onError, includeTransactions: includeTransactions_, poll: poll_, pollingInterval = client.pollingInterval }) {\n const enablePolling = (() => {\n if (typeof poll_ !== \"undefined\")\n return poll_;\n if (client.transport.type === \"webSocket\" || client.transport.type === \"ipc\")\n return false;\n if (client.transport.type === \"fallback\" && (client.transport.transports[0].config.type === \"webSocket\" || client.transport.transports[0].config.type === \"ipc\"))\n return false;\n return true;\n })();\n const includeTransactions = includeTransactions_ ?? false;\n let prevBlock;\n const pollBlocks = () => {\n const observerId = stringify([\n \"watchBlocks\",\n client.uid,\n blockTag,\n emitMissed,\n emitOnBegin,\n includeTransactions,\n pollingInterval\n ]);\n return observe(observerId, { onBlock, onError }, (emit2) => poll(async () => {\n try {\n const block = await getAction(client, getBlock, \"getBlock\")({\n blockTag,\n includeTransactions\n });\n if (block.number !== null && prevBlock?.number != null) {\n if (block.number === prevBlock.number)\n return;\n if (block.number - prevBlock.number > 1 && emitMissed) {\n for (let i3 = prevBlock?.number + 1n; i3 < block.number; i3++) {\n const block2 = await getAction(client, getBlock, \"getBlock\")({\n blockNumber: i3,\n includeTransactions\n });\n emit2.onBlock(block2, prevBlock);\n prevBlock = block2;\n }\n }\n }\n if (\n // If no previous block exists, emit.\n prevBlock?.number == null || // If the block tag is \"pending\" with no block number, emit.\n blockTag === \"pending\" && block?.number == null || // If the next block number is greater than the previous block number, emit.\n // We don't want to emit blocks in the past.\n block.number !== null && block.number > prevBlock.number\n ) {\n emit2.onBlock(block, prevBlock);\n prevBlock = block;\n }\n } catch (err) {\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin,\n interval: pollingInterval\n }));\n };\n const subscribeBlocks = () => {\n let active = true;\n let emitFetched = true;\n let unsubscribe = () => active = false;\n (async () => {\n try {\n if (emitOnBegin) {\n getAction(client, getBlock, \"getBlock\")({\n blockTag,\n includeTransactions\n }).then((block) => {\n if (!active)\n return;\n if (!emitFetched)\n return;\n onBlock(block, void 0);\n emitFetched = false;\n }).catch(onError);\n }\n const transport = (() => {\n if (client.transport.type === \"fallback\") {\n const transport2 = client.transport.transports.find((transport3) => transport3.config.type === \"webSocket\" || transport3.config.type === \"ipc\");\n if (!transport2)\n return client.transport;\n return transport2.value;\n }\n return client.transport;\n })();\n const { unsubscribe: unsubscribe_ } = await transport.subscribe({\n params: [\"newHeads\"],\n async onData(data) {\n if (!active)\n return;\n const block = await getAction(client, getBlock, \"getBlock\")({\n blockNumber: data.result?.number,\n includeTransactions\n }).catch(() => {\n });\n if (!active)\n return;\n onBlock(block, prevBlock);\n emitFetched = false;\n prevBlock = block;\n },\n onError(error) {\n onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n };\n return enablePolling ? pollBlocks() : subscribeBlocks();\n }\n var init_watchBlocks = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchBlocks.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_getBlock();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchEvent.js\n function watchEvent(client, { address, args, batch = true, event, events, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ }) {\n const enablePolling = (() => {\n if (typeof poll_ !== \"undefined\")\n return poll_;\n if (typeof fromBlock === \"bigint\")\n return true;\n if (client.transport.type === \"webSocket\" || client.transport.type === \"ipc\")\n return false;\n if (client.transport.type === \"fallback\" && (client.transport.transports[0].config.type === \"webSocket\" || client.transport.transports[0].config.type === \"ipc\"))\n return false;\n return true;\n })();\n const strict = strict_ ?? false;\n const pollEvent = () => {\n const observerId = stringify([\n \"watchEvent\",\n address,\n args,\n batch,\n client.uid,\n event,\n pollingInterval,\n fromBlock\n ]);\n return observe(observerId, { onLogs, onError }, (emit2) => {\n let previousBlockNumber;\n if (fromBlock !== void 0)\n previousBlockNumber = fromBlock - 1n;\n let filter;\n let initialized = false;\n const unwatch = poll(async () => {\n if (!initialized) {\n try {\n filter = await getAction(client, createEventFilter, \"createEventFilter\")({\n address,\n args,\n event,\n events,\n strict,\n fromBlock\n });\n } catch {\n }\n initialized = true;\n return;\n }\n try {\n let logs;\n if (filter) {\n logs = await getAction(client, getFilterChanges, \"getFilterChanges\")({ filter });\n } else {\n const blockNumber = await getAction(client, getBlockNumber, \"getBlockNumber\")({});\n if (previousBlockNumber && previousBlockNumber !== blockNumber) {\n logs = await getAction(client, getLogs, \"getLogs\")({\n address,\n args,\n event,\n events,\n fromBlock: previousBlockNumber + 1n,\n toBlock: blockNumber\n });\n } else {\n logs = [];\n }\n previousBlockNumber = blockNumber;\n }\n if (logs.length === 0)\n return;\n if (batch)\n emit2.onLogs(logs);\n else\n for (const log of logs)\n emit2.onLogs([log]);\n } catch (err) {\n if (filter && err instanceof InvalidInputRpcError)\n initialized = false;\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval\n });\n return async () => {\n if (filter)\n await getAction(client, uninstallFilter, \"uninstallFilter\")({ filter });\n unwatch();\n };\n });\n };\n const subscribeEvent = () => {\n let active = true;\n let unsubscribe = () => active = false;\n (async () => {\n try {\n const transport = (() => {\n if (client.transport.type === \"fallback\") {\n const transport2 = client.transport.transports.find((transport3) => transport3.config.type === \"webSocket\" || transport3.config.type === \"ipc\");\n if (!transport2)\n return client.transport;\n return transport2.value;\n }\n return client.transport;\n })();\n const events_ = events ?? (event ? [event] : void 0);\n let topics = [];\n if (events_) {\n const encoded = events_.flatMap((event2) => encodeEventTopics({\n abi: [event2],\n eventName: event2.name,\n args\n }));\n topics = [encoded];\n if (event)\n topics = topics[0];\n }\n const { unsubscribe: unsubscribe_ } = await transport.subscribe({\n params: [\"logs\", { address, topics }],\n onData(data) {\n if (!active)\n return;\n const log = data.result;\n try {\n const { eventName, args: args2 } = decodeEventLog({\n abi: events_ ?? [],\n data: log.data,\n topics: log.topics,\n strict\n });\n const formatted = formatLog(log, { args: args2, eventName });\n onLogs([formatted]);\n } catch (err) {\n let eventName;\n let isUnnamed;\n if (err instanceof DecodeLogDataMismatch || err instanceof DecodeLogTopicsMismatch) {\n if (strict_)\n return;\n eventName = err.abiItem.name;\n isUnnamed = err.abiItem.inputs?.some((x4) => !(\"name\" in x4 && x4.name));\n }\n const formatted = formatLog(log, {\n args: isUnnamed ? [] : {},\n eventName\n });\n onLogs([formatted]);\n }\n },\n onError(error) {\n onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n };\n return enablePolling ? pollEvent() : subscribeEvent();\n }\n var init_watchEvent = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchEvent.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_rpc();\n init_decodeEventLog();\n init_encodeEventTopics();\n init_log2();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_createEventFilter();\n init_getBlockNumber();\n init_getFilterChanges();\n init_getLogs();\n init_uninstallFilter();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchPendingTransactions.js\n function watchPendingTransactions(client, { batch = true, onError, onTransactions, poll: poll_, pollingInterval = client.pollingInterval }) {\n const enablePolling = typeof poll_ !== \"undefined\" ? poll_ : client.transport.type !== \"webSocket\" && client.transport.type !== \"ipc\";\n const pollPendingTransactions = () => {\n const observerId = stringify([\n \"watchPendingTransactions\",\n client.uid,\n batch,\n pollingInterval\n ]);\n return observe(observerId, { onTransactions, onError }, (emit2) => {\n let filter;\n const unwatch = poll(async () => {\n try {\n if (!filter) {\n try {\n filter = await getAction(client, createPendingTransactionFilter, \"createPendingTransactionFilter\")({});\n return;\n } catch (err) {\n unwatch();\n throw err;\n }\n }\n const hashes = await getAction(client, getFilterChanges, \"getFilterChanges\")({ filter });\n if (hashes.length === 0)\n return;\n if (batch)\n emit2.onTransactions(hashes);\n else\n for (const hash3 of hashes)\n emit2.onTransactions([hash3]);\n } catch (err) {\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval\n });\n return async () => {\n if (filter)\n await getAction(client, uninstallFilter, \"uninstallFilter\")({ filter });\n unwatch();\n };\n });\n };\n const subscribePendingTransactions = () => {\n let active = true;\n let unsubscribe = () => active = false;\n (async () => {\n try {\n const { unsubscribe: unsubscribe_ } = await client.transport.subscribe({\n params: [\"newPendingTransactions\"],\n onData(data) {\n if (!active)\n return;\n const transaction = data.result;\n onTransactions([transaction]);\n },\n onError(error) {\n onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n };\n return enablePolling ? pollPendingTransactions() : subscribePendingTransactions();\n }\n var init_watchPendingTransactions = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchPendingTransactions.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_createPendingTransactionFilter();\n init_getFilterChanges();\n init_uninstallFilter();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/siwe/parseSiweMessage.js\n function parseSiweMessage(message) {\n const { scheme, statement, ...prefix } = message.match(prefixRegex)?.groups ?? {};\n const { chainId, expirationTime, issuedAt, notBefore, requestId, ...suffix } = message.match(suffixRegex)?.groups ?? {};\n const resources = message.split(\"Resources:\")[1]?.split(\"\\n- \").slice(1);\n return {\n ...prefix,\n ...suffix,\n ...chainId ? { chainId: Number(chainId) } : {},\n ...expirationTime ? { expirationTime: new Date(expirationTime) } : {},\n ...issuedAt ? { issuedAt: new Date(issuedAt) } : {},\n ...notBefore ? { notBefore: new Date(notBefore) } : {},\n ...requestId ? { requestId } : {},\n ...resources ? { resources } : {},\n ...scheme ? { scheme } : {},\n ...statement ? { statement } : {}\n };\n }\n var prefixRegex, suffixRegex;\n var init_parseSiweMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/siwe/parseSiweMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n prefixRegex = /^(?:(?[a-zA-Z][a-zA-Z0-9+-.]*):\\/\\/)?(?[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\\n)(?
0x[a-fA-F0-9]{40})\\n\\n(?:(?.*)\\n\\n)?/;\n suffixRegex = /(?:URI: (?.+))\\n(?:Version: (?.+))\\n(?:Chain ID: (?\\d+))\\n(?:Nonce: (?[a-zA-Z0-9]+))\\n(?:Issued At: (?.+))(?:\\nExpiration Time: (?.+))?(?:\\nNot Before: (?.+))?(?:\\nRequest ID: (?.+))?/;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/siwe/validateSiweMessage.js\n function validateSiweMessage(parameters) {\n const { address, domain: domain2, message, nonce, scheme, time = /* @__PURE__ */ new Date() } = parameters;\n if (domain2 && message.domain !== domain2)\n return false;\n if (nonce && message.nonce !== nonce)\n return false;\n if (scheme && message.scheme !== scheme)\n return false;\n if (message.expirationTime && time >= message.expirationTime)\n return false;\n if (message.notBefore && time < message.notBefore)\n return false;\n try {\n if (!message.address)\n return false;\n if (!isAddress(message.address, { strict: false }))\n return false;\n if (address && !isAddressEqual(message.address, address))\n return false;\n } catch {\n return false;\n }\n return true;\n }\n var init_validateSiweMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/siwe/validateSiweMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isAddress();\n init_isAddressEqual();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/siwe/verifySiweMessage.js\n async function verifySiweMessage(client, parameters) {\n const { address, domain: domain2, message, nonce, scheme, signature, time = /* @__PURE__ */ new Date(), ...callRequest } = parameters;\n const parsed = parseSiweMessage(message);\n if (!parsed.address)\n return false;\n const isValid2 = validateSiweMessage({\n address,\n domain: domain2,\n message: parsed,\n nonce,\n scheme,\n time\n });\n if (!isValid2)\n return false;\n const hash3 = hashMessage(message);\n return verifyHash(client, {\n address: parsed.address,\n hash: hash3,\n signature,\n ...callRequest\n });\n }\n var init_verifySiweMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/siwe/verifySiweMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashMessage();\n init_parseSiweMessage();\n init_validateSiweMessage();\n init_verifyHash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendRawTransactionSync.js\n async function sendRawTransactionSync(client, { serializedTransaction, throwOnReceiptRevert, timeout }) {\n const receipt = await client.request({\n method: \"eth_sendRawTransactionSync\",\n params: timeout ? [serializedTransaction, numberToHex(timeout)] : [serializedTransaction]\n }, { retryCount: 0 });\n const format = client.chain?.formatters?.transactionReceipt?.format || formatTransactionReceipt;\n const formatted = format(receipt);\n if (formatted.status === \"reverted\" && throwOnReceiptRevert)\n throw new TransactionReceiptRevertedError({ receipt: formatted });\n return formatted;\n }\n var init_sendRawTransactionSync = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendRawTransactionSync.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n init_transactionReceipt();\n init_utils7();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/decorators/public.js\n function publicActions(client) {\n return {\n call: (args) => call(client, args),\n createAccessList: (args) => createAccessList(client, args),\n createBlockFilter: () => createBlockFilter(client),\n createContractEventFilter: (args) => createContractEventFilter(client, args),\n createEventFilter: (args) => createEventFilter(client, args),\n createPendingTransactionFilter: () => createPendingTransactionFilter(client),\n estimateContractGas: (args) => estimateContractGas(client, args),\n estimateGas: (args) => estimateGas(client, args),\n getBalance: (args) => getBalance(client, args),\n getBlobBaseFee: () => getBlobBaseFee(client),\n getBlock: (args) => getBlock(client, args),\n getBlockNumber: (args) => getBlockNumber(client, args),\n getBlockTransactionCount: (args) => getBlockTransactionCount(client, args),\n getBytecode: (args) => getCode(client, args),\n getChainId: () => getChainId(client),\n getCode: (args) => getCode(client, args),\n getContractEvents: (args) => getContractEvents(client, args),\n getEip712Domain: (args) => getEip712Domain(client, args),\n getEnsAddress: (args) => getEnsAddress(client, args),\n getEnsAvatar: (args) => getEnsAvatar(client, args),\n getEnsName: (args) => getEnsName(client, args),\n getEnsResolver: (args) => getEnsResolver(client, args),\n getEnsText: (args) => getEnsText(client, args),\n getFeeHistory: (args) => getFeeHistory(client, args),\n estimateFeesPerGas: (args) => estimateFeesPerGas(client, args),\n getFilterChanges: (args) => getFilterChanges(client, args),\n getFilterLogs: (args) => getFilterLogs(client, args),\n getGasPrice: () => getGasPrice(client),\n getLogs: (args) => getLogs(client, args),\n getProof: (args) => getProof(client, args),\n estimateMaxPriorityFeePerGas: (args) => estimateMaxPriorityFeePerGas(client, args),\n getStorageAt: (args) => getStorageAt(client, args),\n getTransaction: (args) => getTransaction(client, args),\n getTransactionConfirmations: (args) => getTransactionConfirmations(client, args),\n getTransactionCount: (args) => getTransactionCount(client, args),\n getTransactionReceipt: (args) => getTransactionReceipt(client, args),\n multicall: (args) => multicall(client, args),\n prepareTransactionRequest: (args) => prepareTransactionRequest(client, args),\n readContract: (args) => readContract(client, args),\n sendRawTransaction: (args) => sendRawTransaction(client, args),\n sendRawTransactionSync: (args) => sendRawTransactionSync(client, args),\n simulate: (args) => simulateBlocks(client, args),\n simulateBlocks: (args) => simulateBlocks(client, args),\n simulateCalls: (args) => simulateCalls(client, args),\n simulateContract: (args) => simulateContract(client, args),\n verifyHash: (args) => verifyHash(client, args),\n verifyMessage: (args) => verifyMessage(client, args),\n verifySiweMessage: (args) => verifySiweMessage(client, args),\n verifyTypedData: (args) => verifyTypedData(client, args),\n uninstallFilter: (args) => uninstallFilter(client, args),\n waitForTransactionReceipt: (args) => waitForTransactionReceipt(client, args),\n watchBlocks: (args) => watchBlocks(client, args),\n watchBlockNumber: (args) => watchBlockNumber(client, args),\n watchContractEvent: (args) => watchContractEvent(client, args),\n watchEvent: (args) => watchEvent(client, args),\n watchPendingTransactions: (args) => watchPendingTransactions(client, args)\n };\n }\n var init_public = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/decorators/public.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getEnsAddress();\n init_getEnsAvatar();\n init_getEnsName();\n init_getEnsResolver();\n init_getEnsText();\n init_call();\n init_createAccessList();\n init_createBlockFilter();\n init_createContractEventFilter();\n init_createEventFilter();\n init_createPendingTransactionFilter();\n init_estimateContractGas();\n init_estimateFeesPerGas();\n init_estimateGas2();\n init_estimateMaxPriorityFeePerGas();\n init_getBalance();\n init_getBlobBaseFee();\n init_getBlock();\n init_getBlockNumber();\n init_getBlockTransactionCount();\n init_getChainId();\n init_getCode();\n init_getContractEvents();\n init_getEip712Domain();\n init_getFeeHistory();\n init_getFilterChanges();\n init_getFilterLogs();\n init_getGasPrice();\n init_getLogs();\n init_getProof();\n init_getStorageAt();\n init_getTransaction();\n init_getTransactionConfirmations();\n init_getTransactionCount();\n init_getTransactionReceipt();\n init_multicall();\n init_readContract();\n init_simulateBlocks();\n init_simulateCalls();\n init_simulateContract();\n init_uninstallFilter();\n init_verifyHash();\n init_verifyMessage();\n init_verifyTypedData();\n init_waitForTransactionReceipt();\n init_watchBlockNumber();\n init_watchBlocks();\n init_watchContractEvent();\n init_watchEvent();\n init_watchPendingTransactions();\n init_verifySiweMessage();\n init_prepareTransactionRequest();\n init_sendRawTransaction();\n init_sendRawTransactionSync();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/createTransport.js\n function createTransport({ key, methods, name, request, retryCount = 3, retryDelay = 150, timeout, type }, value) {\n const uid2 = uid();\n return {\n config: {\n key,\n methods,\n name,\n request,\n retryCount,\n retryDelay,\n timeout,\n type\n },\n request: buildRequest(request, { methods, retryCount, retryDelay, uid: uid2 }),\n value\n };\n }\n var init_createTransport = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/createTransport.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_buildRequest();\n init_uid();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/custom.js\n function custom(provider, config2 = {}) {\n const { key = \"custom\", methods, name = \"Custom Provider\", retryDelay } = config2;\n return ({ retryCount: defaultRetryCount }) => createTransport({\n key,\n methods,\n name,\n request: provider.request.bind(provider),\n retryCount: config2.retryCount ?? defaultRetryCount,\n retryDelay,\n type: \"custom\"\n });\n }\n var init_custom = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/custom.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_createTransport();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/transport.js\n var UrlRequiredError;\n var init_transport = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/transport.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n UrlRequiredError = class extends BaseError2 {\n constructor() {\n super(\"No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.\", {\n docsPath: \"/docs/clients/intro\",\n name: \"UrlRequiredError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/http.js\n function http(url, config2 = {}) {\n const { batch, fetchFn, fetchOptions, key = \"http\", methods, name = \"HTTP JSON-RPC\", onFetchRequest, onFetchResponse, retryDelay, raw } = config2;\n return ({ chain: chain2, retryCount: retryCount_, timeout: timeout_ }) => {\n const { batchSize = 1e3, wait: wait2 = 0 } = typeof batch === \"object\" ? batch : {};\n const retryCount = config2.retryCount ?? retryCount_;\n const timeout = timeout_ ?? config2.timeout ?? 1e4;\n const url_ = url || chain2?.rpcUrls.default.http[0];\n if (!url_)\n throw new UrlRequiredError();\n const rpcClient = getHttpRpcClient(url_, {\n fetchFn,\n fetchOptions,\n onRequest: onFetchRequest,\n onResponse: onFetchResponse,\n timeout\n });\n return createTransport({\n key,\n methods,\n name,\n async request({ method, params }) {\n const body = { method, params };\n const { schedule } = createBatchScheduler({\n id: url_,\n wait: wait2,\n shouldSplitBatch(requests) {\n return requests.length > batchSize;\n },\n fn: (body2) => rpcClient.request({\n body: body2\n }),\n sort: (a3, b4) => a3.id - b4.id\n });\n const fn = async (body2) => batch ? schedule(body2) : [\n await rpcClient.request({\n body: body2\n })\n ];\n const [{ error, result }] = await fn(body);\n if (raw)\n return { error, result };\n if (error)\n throw new RpcRequestError({\n body,\n error,\n url: url_\n });\n return result;\n },\n retryCount,\n retryDelay,\n timeout,\n type: \"http\"\n }, {\n fetchOptions,\n url: url_\n });\n };\n }\n var init_http2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/http.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_request();\n init_transport();\n init_createBatchScheduler();\n init_http();\n init_createTransport();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/index.js\n var init_esm = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_getContract();\n init_createClient();\n init_public();\n init_createTransport();\n init_custom();\n init_http2();\n init_address2();\n init_bytes2();\n init_number();\n init_address();\n init_base();\n init_stateOverride();\n init_decodeErrorResult();\n init_encodeAbiParameters();\n init_encodeDeployData();\n init_encodeFunctionData();\n init_encodeFunctionResult();\n init_encodePacked();\n init_getContractAddress();\n init_isAddress();\n init_defineChain();\n init_concat();\n init_isHex();\n init_pad();\n init_size();\n init_trim();\n init_fromHex();\n init_toBytes();\n init_toHex();\n init_keccak256();\n init_hashMessage();\n init_hashTypedData();\n init_recoverAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/@scure+base@1.2.6/node_modules/@scure/base/lib/esm/index.js\n function isBytes4(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function isArrayOf(isString, arr) {\n if (!Array.isArray(arr))\n return false;\n if (arr.length === 0)\n return true;\n if (isString) {\n return arr.every((item) => typeof item === \"string\");\n } else {\n return arr.every((item) => Number.isSafeInteger(item));\n }\n }\n function afn(input) {\n if (typeof input !== \"function\")\n throw new Error(\"function expected\");\n return true;\n }\n function astr(label, input) {\n if (typeof input !== \"string\")\n throw new Error(`${label}: string expected`);\n return true;\n }\n function anumber2(n2) {\n if (!Number.isSafeInteger(n2))\n throw new Error(`invalid integer: ${n2}`);\n }\n function aArr(input) {\n if (!Array.isArray(input))\n throw new Error(\"array expected\");\n }\n function astrArr(label, input) {\n if (!isArrayOf(true, input))\n throw new Error(`${label}: array of strings expected`);\n }\n function anumArr(label, input) {\n if (!isArrayOf(false, input))\n throw new Error(`${label}: array of numbers expected`);\n }\n // @__NO_SIDE_EFFECTS__\n function chain(...args) {\n const id = (a3) => a3;\n const wrap3 = (a3, b4) => (c4) => a3(b4(c4));\n const encode5 = args.map((x4) => x4.encode).reduceRight(wrap3, id);\n const decode2 = args.map((x4) => x4.decode).reduce(wrap3, id);\n return { encode: encode5, decode: decode2 };\n }\n // @__NO_SIDE_EFFECTS__\n function alphabet(letters) {\n const lettersA = typeof letters === \"string\" ? letters.split(\"\") : letters;\n const len = lettersA.length;\n astrArr(\"alphabet\", lettersA);\n const indexes = new Map(lettersA.map((l6, i3) => [l6, i3]));\n return {\n encode: (digits) => {\n aArr(digits);\n return digits.map((i3) => {\n if (!Number.isSafeInteger(i3) || i3 < 0 || i3 >= len)\n throw new Error(`alphabet.encode: digit index outside alphabet \"${i3}\". Allowed: ${letters}`);\n return lettersA[i3];\n });\n },\n decode: (input) => {\n aArr(input);\n return input.map((letter) => {\n astr(\"alphabet.decode\", letter);\n const i3 = indexes.get(letter);\n if (i3 === void 0)\n throw new Error(`Unknown letter: \"${letter}\". Allowed: ${letters}`);\n return i3;\n });\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function join(separator = \"\") {\n astr(\"join\", separator);\n return {\n encode: (from14) => {\n astrArr(\"join.decode\", from14);\n return from14.join(separator);\n },\n decode: (to) => {\n astr(\"join.decode\", to);\n return to.split(separator);\n }\n };\n }\n function convertRadix(data, from14, to) {\n if (from14 < 2)\n throw new Error(`convertRadix: invalid from=${from14}, base cannot be less than 2`);\n if (to < 2)\n throw new Error(`convertRadix: invalid to=${to}, base cannot be less than 2`);\n aArr(data);\n if (!data.length)\n return [];\n let pos = 0;\n const res = [];\n const digits = Array.from(data, (d5) => {\n anumber2(d5);\n if (d5 < 0 || d5 >= from14)\n throw new Error(`invalid integer: ${d5}`);\n return d5;\n });\n const dlen = digits.length;\n while (true) {\n let carry = 0;\n let done = true;\n for (let i3 = pos; i3 < dlen; i3++) {\n const digit = digits[i3];\n const fromCarry = from14 * carry;\n const digitBase = fromCarry + digit;\n if (!Number.isSafeInteger(digitBase) || fromCarry / from14 !== carry || digitBase - digit !== fromCarry) {\n throw new Error(\"convertRadix: carry overflow\");\n }\n const div = digitBase / to;\n carry = digitBase % to;\n const rounded = Math.floor(div);\n digits[i3] = rounded;\n if (!Number.isSafeInteger(rounded) || rounded * to + carry !== digitBase)\n throw new Error(\"convertRadix: carry overflow\");\n if (!done)\n continue;\n else if (!rounded)\n pos = i3;\n else\n done = false;\n }\n res.push(carry);\n if (done)\n break;\n }\n for (let i3 = 0; i3 < data.length - 1 && data[i3] === 0; i3++)\n res.push(0);\n return res.reverse();\n }\n // @__NO_SIDE_EFFECTS__\n function radix(num2) {\n anumber2(num2);\n const _256 = 2 ** 8;\n return {\n encode: (bytes) => {\n if (!isBytes4(bytes))\n throw new Error(\"radix.encode input should be Uint8Array\");\n return convertRadix(Array.from(bytes), _256, num2);\n },\n decode: (digits) => {\n anumArr(\"radix.decode\", digits);\n return Uint8Array.from(convertRadix(digits, num2, _256));\n }\n };\n }\n function checksum3(len, fn) {\n anumber2(len);\n afn(fn);\n return {\n encode(data) {\n if (!isBytes4(data))\n throw new Error(\"checksum.encode: input should be Uint8Array\");\n const sum = fn(data).slice(0, len);\n const res = new Uint8Array(data.length + len);\n res.set(data);\n res.set(sum, data.length);\n return res;\n },\n decode(data) {\n if (!isBytes4(data))\n throw new Error(\"checksum.decode: input should be Uint8Array\");\n const payload = data.slice(0, -len);\n const oldChecksum = data.slice(-len);\n const newChecksum = fn(payload).slice(0, len);\n for (let i3 = 0; i3 < len; i3++)\n if (newChecksum[i3] !== oldChecksum[i3])\n throw new Error(\"Invalid checksum\");\n return payload;\n }\n };\n }\n var genBase58, base58, createBase58check;\n var init_esm2 = __esm({\n \"../../../node_modules/.pnpm/@scure+base@1.2.6/node_modules/@scure/base/lib/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n genBase58 = /* @__NO_SIDE_EFFECTS__ */ (abc) => /* @__PURE__ */ chain(/* @__PURE__ */ radix(58), /* @__PURE__ */ alphabet(abc), /* @__PURE__ */ join(\"\"));\n base58 = /* @__PURE__ */ genBase58(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\");\n createBase58check = (sha2565) => /* @__PURE__ */ chain(checksum3(4, (data) => sha2565(sha2565(data))), base58);\n }\n });\n\n // ../../../node_modules/.pnpm/@scure+bip32@1.7.0/node_modules/@scure/bip32/lib/esm/index.js\n function bytesToNumber2(bytes) {\n abytes(bytes);\n const h4 = bytes.length === 0 ? \"0\" : bytesToHex2(bytes);\n return BigInt(\"0x\" + h4);\n }\n function numberToBytes2(num2) {\n if (typeof num2 !== \"bigint\")\n throw new Error(\"bigint expected\");\n return hexToBytes2(num2.toString(16).padStart(64, \"0\"));\n }\n var Point2, base58check, MASTER_SECRET, BITCOIN_VERSIONS, HARDENED_OFFSET, hash160, fromU32, toU32, HDKey;\n var init_esm3 = __esm({\n \"../../../node_modules/.pnpm/@scure+bip32@1.7.0/node_modules/@scure/bip32/lib/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_modular();\n init_secp256k1();\n init_hmac();\n init_legacy();\n init_sha2();\n init_utils3();\n init_esm2();\n Point2 = secp256k1.ProjectivePoint;\n base58check = createBase58check(sha256);\n MASTER_SECRET = utf8ToBytes(\"Bitcoin seed\");\n BITCOIN_VERSIONS = { private: 76066276, public: 76067358 };\n HARDENED_OFFSET = 2147483648;\n hash160 = (data) => ripemd160(sha256(data));\n fromU32 = (data) => createView(data).getUint32(0, false);\n toU32 = (n2) => {\n if (!Number.isSafeInteger(n2) || n2 < 0 || n2 > 2 ** 32 - 1) {\n throw new Error(\"invalid number, should be from 0 to 2**32-1, got \" + n2);\n }\n const buf = new Uint8Array(4);\n createView(buf).setUint32(0, n2, false);\n return buf;\n };\n HDKey = class _HDKey {\n get fingerprint() {\n if (!this.pubHash) {\n throw new Error(\"No publicKey set!\");\n }\n return fromU32(this.pubHash);\n }\n get identifier() {\n return this.pubHash;\n }\n get pubKeyHash() {\n return this.pubHash;\n }\n get privateKey() {\n return this.privKeyBytes || null;\n }\n get publicKey() {\n return this.pubKey || null;\n }\n get privateExtendedKey() {\n const priv = this.privateKey;\n if (!priv) {\n throw new Error(\"No private key\");\n }\n return base58check.encode(this.serialize(this.versions.private, concatBytes(new Uint8Array([0]), priv)));\n }\n get publicExtendedKey() {\n if (!this.pubKey) {\n throw new Error(\"No public key\");\n }\n return base58check.encode(this.serialize(this.versions.public, this.pubKey));\n }\n static fromMasterSeed(seed, versions2 = BITCOIN_VERSIONS) {\n abytes(seed);\n if (8 * seed.length < 128 || 8 * seed.length > 512) {\n throw new Error(\"HDKey: seed length must be between 128 and 512 bits; 256 bits is advised, got \" + seed.length);\n }\n const I2 = hmac(sha512, MASTER_SECRET, seed);\n return new _HDKey({\n versions: versions2,\n chainCode: I2.slice(32),\n privateKey: I2.slice(0, 32)\n });\n }\n static fromExtendedKey(base58key, versions2 = BITCOIN_VERSIONS) {\n const keyBuffer = base58check.decode(base58key);\n const keyView = createView(keyBuffer);\n const version7 = keyView.getUint32(0, false);\n const opt = {\n versions: versions2,\n depth: keyBuffer[4],\n parentFingerprint: keyView.getUint32(5, false),\n index: keyView.getUint32(9, false),\n chainCode: keyBuffer.slice(13, 45)\n };\n const key = keyBuffer.slice(45);\n const isPriv = key[0] === 0;\n if (version7 !== versions2[isPriv ? \"private\" : \"public\"]) {\n throw new Error(\"Version mismatch\");\n }\n if (isPriv) {\n return new _HDKey({ ...opt, privateKey: key.slice(1) });\n } else {\n return new _HDKey({ ...opt, publicKey: key });\n }\n }\n static fromJSON(json) {\n return _HDKey.fromExtendedKey(json.xpriv);\n }\n constructor(opt) {\n this.depth = 0;\n this.index = 0;\n this.chainCode = null;\n this.parentFingerprint = 0;\n if (!opt || typeof opt !== \"object\") {\n throw new Error(\"HDKey.constructor must not be called directly\");\n }\n this.versions = opt.versions || BITCOIN_VERSIONS;\n this.depth = opt.depth || 0;\n this.chainCode = opt.chainCode || null;\n this.index = opt.index || 0;\n this.parentFingerprint = opt.parentFingerprint || 0;\n if (!this.depth) {\n if (this.parentFingerprint || this.index) {\n throw new Error(\"HDKey: zero depth with non-zero index/parent fingerprint\");\n }\n }\n if (opt.publicKey && opt.privateKey) {\n throw new Error(\"HDKey: publicKey and privateKey at same time.\");\n }\n if (opt.privateKey) {\n if (!secp256k1.utils.isValidPrivateKey(opt.privateKey)) {\n throw new Error(\"Invalid private key\");\n }\n this.privKey = typeof opt.privateKey === \"bigint\" ? opt.privateKey : bytesToNumber2(opt.privateKey);\n this.privKeyBytes = numberToBytes2(this.privKey);\n this.pubKey = secp256k1.getPublicKey(opt.privateKey, true);\n } else if (opt.publicKey) {\n this.pubKey = Point2.fromHex(opt.publicKey).toRawBytes(true);\n } else {\n throw new Error(\"HDKey: no public or private key provided\");\n }\n this.pubHash = hash160(this.pubKey);\n }\n derive(path) {\n if (!/^[mM]'?/.test(path)) {\n throw new Error('Path must start with \"m\" or \"M\"');\n }\n if (/^[mM]'?$/.test(path)) {\n return this;\n }\n const parts = path.replace(/^[mM]'?\\//, \"\").split(\"/\");\n let child = this;\n for (const c4 of parts) {\n const m2 = /^(\\d+)('?)$/.exec(c4);\n const m1 = m2 && m2[1];\n if (!m2 || m2.length !== 3 || typeof m1 !== \"string\")\n throw new Error(\"invalid child index: \" + c4);\n let idx = +m1;\n if (!Number.isSafeInteger(idx) || idx >= HARDENED_OFFSET) {\n throw new Error(\"Invalid index\");\n }\n if (m2[2] === \"'\") {\n idx += HARDENED_OFFSET;\n }\n child = child.deriveChild(idx);\n }\n return child;\n }\n deriveChild(index2) {\n if (!this.pubKey || !this.chainCode) {\n throw new Error(\"No publicKey or chainCode set\");\n }\n let data = toU32(index2);\n if (index2 >= HARDENED_OFFSET) {\n const priv = this.privateKey;\n if (!priv) {\n throw new Error(\"Could not derive hardened child key\");\n }\n data = concatBytes(new Uint8Array([0]), priv, data);\n } else {\n data = concatBytes(this.pubKey, data);\n }\n const I2 = hmac(sha512, this.chainCode, data);\n const childTweak = bytesToNumber2(I2.slice(0, 32));\n const chainCode = I2.slice(32);\n if (!secp256k1.utils.isValidPrivateKey(childTweak)) {\n throw new Error(\"Tweak bigger than curve order\");\n }\n const opt = {\n versions: this.versions,\n chainCode,\n depth: this.depth + 1,\n parentFingerprint: this.fingerprint,\n index: index2\n };\n try {\n if (this.privateKey) {\n const added = mod(this.privKey + childTweak, secp256k1.CURVE.n);\n if (!secp256k1.utils.isValidPrivateKey(added)) {\n throw new Error(\"The tweak was out of range or the resulted private key is invalid\");\n }\n opt.privateKey = added;\n } else {\n const added = Point2.fromHex(this.pubKey).add(Point2.fromPrivateKey(childTweak));\n if (added.equals(Point2.ZERO)) {\n throw new Error(\"The tweak was equal to negative P, which made the result key invalid\");\n }\n opt.publicKey = added.toRawBytes(true);\n }\n return new _HDKey(opt);\n } catch (err) {\n return this.deriveChild(index2 + 1);\n }\n }\n sign(hash3) {\n if (!this.privateKey) {\n throw new Error(\"No privateKey set!\");\n }\n abytes(hash3, 32);\n return secp256k1.sign(hash3, this.privKey).toCompactRawBytes();\n }\n verify(hash3, signature) {\n abytes(hash3, 32);\n abytes(signature, 64);\n if (!this.publicKey) {\n throw new Error(\"No publicKey set!\");\n }\n let sig;\n try {\n sig = secp256k1.Signature.fromCompact(signature);\n } catch (error) {\n return false;\n }\n return secp256k1.verify(sig, hash3, this.publicKey);\n }\n wipePrivateData() {\n this.privKey = void 0;\n if (this.privKeyBytes) {\n this.privKeyBytes.fill(0);\n this.privKeyBytes = void 0;\n }\n return this;\n }\n toJSON() {\n return {\n xpriv: this.privateExtendedKey,\n xpub: this.publicExtendedKey\n };\n }\n serialize(version7, key) {\n if (!this.chainCode) {\n throw new Error(\"No chainCode set\");\n }\n abytes(key, 33);\n return concatBytes(toU32(version7), new Uint8Array([this.depth]), toU32(this.parentFingerprint), toU32(this.index), this.chainCode, key);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/pbkdf2.js\n function pbkdf2Init(hash3, _password, _salt, _opts) {\n ahash(hash3);\n const opts = checkOpts({ dkLen: 32, asyncTick: 10 }, _opts);\n const { c: c4, dkLen, asyncTick } = opts;\n anumber(c4);\n anumber(dkLen);\n anumber(asyncTick);\n if (c4 < 1)\n throw new Error(\"iterations (c) should be >= 1\");\n const password = kdfInputToBytes(_password);\n const salt = kdfInputToBytes(_salt);\n const DK = new Uint8Array(dkLen);\n const PRF = hmac.create(hash3, password);\n const PRFSalt = PRF._cloneInto().update(salt);\n return { c: c4, dkLen, asyncTick, DK, PRF, PRFSalt };\n }\n function pbkdf2Output(PRF, PRFSalt, DK, prfW, u2) {\n PRF.destroy();\n PRFSalt.destroy();\n if (prfW)\n prfW.destroy();\n clean(u2);\n return DK;\n }\n function pbkdf2(hash3, password, salt, opts) {\n const { c: c4, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash3, password, salt, opts);\n let prfW;\n const arr = new Uint8Array(4);\n const view = createView(arr);\n const u2 = new Uint8Array(PRF.outputLen);\n for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n const Ti = DK.subarray(pos, pos + PRF.outputLen);\n view.setInt32(0, ti, false);\n (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u2);\n Ti.set(u2.subarray(0, Ti.length));\n for (let ui = 1; ui < c4; ui++) {\n PRF._cloneInto(prfW).update(u2).digestInto(u2);\n for (let i3 = 0; i3 < Ti.length; i3++)\n Ti[i3] ^= u2[i3];\n }\n }\n return pbkdf2Output(PRF, PRFSalt, DK, prfW, u2);\n }\n var init_pbkdf2 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/pbkdf2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hmac();\n init_utils3();\n }\n });\n\n // ../../../node_modules/.pnpm/@scure+bip39@1.6.0/node_modules/@scure/bip39/esm/index.js\n function nfkd(str) {\n if (typeof str !== \"string\")\n throw new TypeError(\"invalid mnemonic type: \" + typeof str);\n return str.normalize(\"NFKD\");\n }\n function normalize(str) {\n const norm = nfkd(str);\n const words = norm.split(\" \");\n if (![12, 15, 18, 21, 24].includes(words.length))\n throw new Error(\"Invalid mnemonic\");\n return { nfkd: norm, words };\n }\n function mnemonicToSeedSync(mnemonic, passphrase = \"\") {\n return pbkdf2(sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 });\n }\n var psalt;\n var init_esm4 = __esm({\n \"../../../node_modules/.pnpm/@scure+bip39@1.6.0/node_modules/@scure/bip39/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_pbkdf2();\n init_sha2();\n psalt = (passphrase) => nfkd(\"mnemonic\" + passphrase);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/generatePrivateKey.js\n function generatePrivateKey() {\n return toHex(secp256k1.utils.randomPrivateKey());\n }\n var init_generatePrivateKey = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/generatePrivateKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/toAccount.js\n function toAccount(source) {\n if (typeof source === \"string\") {\n if (!isAddress(source, { strict: false }))\n throw new InvalidAddressError({ address: source });\n return {\n address: source,\n type: \"json-rpc\"\n };\n }\n if (!isAddress(source.address, { strict: false }))\n throw new InvalidAddressError({ address: source.address });\n return {\n address: source.address,\n nonceManager: source.nonceManager,\n sign: source.sign,\n signAuthorization: source.signAuthorization,\n signMessage: source.signMessage,\n signTransaction: source.signTransaction,\n signTypedData: source.signTypedData,\n source: \"custom\",\n type: \"local\"\n };\n }\n var init_toAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/toAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_isAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/sign.js\n async function sign({ hash: hash3, privateKey, to = \"object\" }) {\n const { r: r2, s: s4, recovery } = secp256k1.sign(hash3.slice(2), privateKey.slice(2), {\n lowS: true,\n extraEntropy: isHex(extraEntropy, { strict: false }) ? hexToBytes(extraEntropy) : extraEntropy\n });\n const signature = {\n r: numberToHex(r2, { size: 32 }),\n s: numberToHex(s4, { size: 32 }),\n v: recovery ? 28n : 27n,\n yParity: recovery\n };\n return (() => {\n if (to === \"bytes\" || to === \"hex\")\n return serializeSignature({ ...signature, to });\n return signature;\n })();\n }\n var extraEntropy;\n var init_sign = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/sign.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_isHex();\n init_toBytes();\n init_toHex();\n init_serializeSignature();\n extraEntropy = false;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signAuthorization.js\n async function signAuthorization(parameters) {\n const { chainId, nonce, privateKey, to = \"object\" } = parameters;\n const address = parameters.contractAddress ?? parameters.address;\n const signature = await sign({\n hash: hashAuthorization({ address, chainId, nonce }),\n privateKey,\n to\n });\n if (to === \"object\")\n return {\n address,\n chainId,\n nonce,\n ...signature\n };\n return signature;\n }\n var init_signAuthorization = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signAuthorization.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashAuthorization();\n init_sign();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signMessage.js\n async function signMessage({ message, privateKey }) {\n return await sign({ hash: hashMessage(message), privateKey, to: \"hex\" });\n }\n var init_signMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashMessage();\n init_sign();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signTransaction.js\n async function signTransaction(parameters) {\n const { privateKey, transaction, serializer = serializeTransaction } = parameters;\n const signableTransaction = (() => {\n if (transaction.type === \"eip4844\")\n return {\n ...transaction,\n sidecars: false\n };\n return transaction;\n })();\n const signature = await sign({\n hash: keccak256(await serializer(signableTransaction)),\n privateKey\n });\n return await serializer(transaction, signature);\n }\n var init_signTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_keccak256();\n init_serializeTransaction();\n init_sign();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signTypedData.js\n async function signTypedData(parameters) {\n const { privateKey, ...typedData } = parameters;\n return await sign({\n hash: hashTypedData(typedData),\n privateKey,\n to: \"hex\"\n });\n }\n var init_signTypedData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signTypedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashTypedData();\n init_sign();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/privateKeyToAccount.js\n function privateKeyToAccount(privateKey, options = {}) {\n const { nonceManager } = options;\n const publicKey = toHex(secp256k1.getPublicKey(privateKey.slice(2), false));\n const address = publicKeyToAddress(publicKey);\n const account = toAccount({\n address,\n nonceManager,\n async sign({ hash: hash3 }) {\n return sign({ hash: hash3, privateKey, to: \"hex\" });\n },\n async signAuthorization(authorization) {\n return signAuthorization({ ...authorization, privateKey });\n },\n async signMessage({ message }) {\n return signMessage({ message, privateKey });\n },\n async signTransaction(transaction, { serializer } = {}) {\n return signTransaction({ privateKey, transaction, serializer });\n },\n async signTypedData(typedData) {\n return signTypedData({ ...typedData, privateKey });\n }\n });\n return {\n ...account,\n publicKey,\n source: \"privateKey\"\n };\n }\n var init_privateKeyToAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/privateKeyToAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_toHex();\n init_toAccount();\n init_publicKeyToAddress();\n init_sign();\n init_signAuthorization();\n init_signMessage();\n init_signTransaction();\n init_signTypedData();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/hdKeyToAccount.js\n function hdKeyToAccount(hdKey_, { accountIndex = 0, addressIndex = 0, changeIndex = 0, path, ...options } = {}) {\n const hdKey = hdKey_.derive(path || `m/44'/60'/${accountIndex}'/${changeIndex}/${addressIndex}`);\n const account = privateKeyToAccount(toHex(hdKey.privateKey), options);\n return {\n ...account,\n getHdKey: () => hdKey,\n source: \"hd\"\n };\n }\n var init_hdKeyToAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/hdKeyToAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_privateKeyToAccount();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/mnemonicToAccount.js\n function mnemonicToAccount(mnemonic, opts = {}) {\n const seed = mnemonicToSeedSync(mnemonic);\n return hdKeyToAccount(HDKey.fromMasterSeed(seed), opts);\n }\n var init_mnemonicToAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/mnemonicToAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm3();\n init_esm4();\n init_hdKeyToAccount();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/index.js\n var init_accounts = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_generatePrivateKey();\n init_mnemonicToAccount();\n init_privateKeyToAccount();\n init_toAccount();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/version.js\n var VERSION;\n var init_version5 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n VERSION = \"4.62.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/base.js\n var BaseError4;\n var init_base2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_version5();\n BaseError4 = class _BaseError extends BaseError2 {\n constructor(shortMessage, args = {}) {\n super(shortMessage, args);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AASDKError\"\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: VERSION\n });\n const docsPath8 = args.cause instanceof _BaseError ? args.cause.docsPath || args.docsPath : args.docsPath;\n this.message = [\n shortMessage || \"An error occurred.\",\n \"\",\n ...args.metaMessages ? [...args.metaMessages, \"\"] : [],\n ...docsPath8 ? [\n `Docs: https://www.alchemy.com/docs/wallets${docsPath8}${args.docsSlug ? `#${args.docsSlug}` : \"\"}`\n ] : [],\n ...this.details ? [`Details: ${this.details}`] : [],\n `Version: ${this.version}`\n ].join(\"\\n\");\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/client.js\n var IncompatibleClientError, InvalidRpcUrlError, ChainNotFoundError2, InvalidEntityIdError, InvalidNonceKeyError, EntityIdOverrideError, InvalidModularAccountV2Mode, InvalidDeferredActionNonce;\n var init_client = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/client.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n IncompatibleClientError = class extends BaseError4 {\n /**\n * Throws an error when the client type does not match the expected client type.\n *\n * @param {string} expectedClient The expected type of the client.\n * @param {string} method The method that was called.\n * @param {Client} client The client instance.\n */\n constructor(expectedClient, method, client) {\n super([\n `Client of type (${client.type}) is not a ${expectedClient}.`,\n `Create one with \\`createSmartAccountClient\\` first before using \\`${method}\\``\n ].join(\"\\n\"));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"IncompatibleClientError\"\n });\n }\n };\n InvalidRpcUrlError = class extends BaseError4 {\n /**\n * Creates an instance of an error with a message indicating an invalid RPC URL.\n *\n * @param {string} [rpcUrl] The invalid RPC URL that caused the error\n */\n constructor(rpcUrl) {\n super(`Invalid RPC URL ${rpcUrl}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidRpcUrlError\"\n });\n }\n };\n ChainNotFoundError2 = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that no chain was supplied to the client.\n */\n constructor() {\n super(\"No chain supplied to the client\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"ChainNotFoundError\"\n });\n }\n };\n InvalidEntityIdError = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the entity id is invalid because it's too large.\n *\n * @param {number} entityId the invalid entityId used\n */\n constructor(entityId) {\n super(`Entity ID used is ${entityId}, but must be less than or equal to uint32.max`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidEntityIdError\"\n });\n }\n };\n InvalidNonceKeyError = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the nonce key is invalid.\n *\n * @param {bigint} nonceKey the invalid nonceKey used\n */\n constructor(nonceKey) {\n super(`Nonce key is ${nonceKey} but has to be less than or equal to 2**152`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidNonceKeyError\"\n });\n }\n };\n EntityIdOverrideError = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the nonce key is invalid.\n */\n constructor() {\n super(`EntityId of 0 is reserved for the owner and cannot be used`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"EntityIdOverrideError\"\n });\n }\n };\n InvalidModularAccountV2Mode = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the provided ma v2 account mode is invalid.\n */\n constructor() {\n super(`The provided account mode is invalid for ModularAccount V2`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidModularAccountV2Mode\"\n });\n }\n };\n InvalidDeferredActionNonce = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the provided deferred action nonce is invalid.\n */\n constructor() {\n super(`The provided deferred action nonce is invalid`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidDeferredActionNonce\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/stateOverride.js\n function serializeStateMapping2(stateMapping) {\n if (!stateMapping || stateMapping.length === 0)\n return void 0;\n return stateMapping.reduce((acc, { slot, value }) => {\n validateBytes32HexLength(slot);\n validateBytes32HexLength(value);\n acc[slot] = value;\n return acc;\n }, {});\n }\n function validateBytes32HexLength(value) {\n if (value.length !== 66) {\n throw new Error(`Hex is expected to be 66 hex long, but is ${value.length} hex long.`);\n }\n }\n function serializeAccountStateOverride2(parameters) {\n const { balance, nonce, state, stateDiff, code } = parameters;\n const rpcAccountStateOverride = {};\n if (code !== void 0)\n rpcAccountStateOverride.code = code;\n if (balance !== void 0)\n rpcAccountStateOverride.balance = numberToHex(balance);\n if (nonce !== void 0)\n rpcAccountStateOverride.nonce = numberToHex(nonce);\n if (state !== void 0)\n rpcAccountStateOverride.state = serializeStateMapping2(state);\n if (stateDiff !== void 0) {\n if (rpcAccountStateOverride.state)\n throw new StateAssignmentConflictError();\n rpcAccountStateOverride.stateDiff = serializeStateMapping2(stateDiff);\n }\n return rpcAccountStateOverride;\n }\n function serializeStateOverride2(parameters) {\n if (!parameters)\n return void 0;\n const rpcStateOverride = {};\n for (const { address, ...accountState } of parameters) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n if (rpcStateOverride[address])\n throw new AccountStateConflictError({ address });\n rpcStateOverride[address] = serializeAccountStateOverride2(accountState);\n }\n return rpcStateOverride;\n }\n var init_stateOverride3 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/stateOverride.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/estimateUserOperationGas.js\n var estimateUserOperationGas;\n var init_estimateUserOperationGas = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/estimateUserOperationGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stateOverride3();\n estimateUserOperationGas = async (client, args) => {\n return client.request({\n method: \"eth_estimateUserOperationGas\",\n params: args.stateOverride != null ? [\n args.request,\n args.entryPoint,\n serializeStateOverride2(args.stateOverride)\n ] : [args.request, args.entryPoint]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getSupportedEntryPoints.js\n var getSupportedEntryPoints;\n var init_getSupportedEntryPoints = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getSupportedEntryPoints.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n getSupportedEntryPoints = async (client) => {\n return client.request({\n method: \"eth_supportedEntryPoints\",\n params: []\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getUserOperationByHash.js\n var getUserOperationByHash;\n var init_getUserOperationByHash = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getUserOperationByHash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n getUserOperationByHash = async (client, args) => {\n return client.request({\n method: \"eth_getUserOperationByHash\",\n params: [args.hash]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getUserOperationReceipt.js\n var getUserOperationReceipt;\n var init_getUserOperationReceipt = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getUserOperationReceipt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n getUserOperationReceipt = async (client, args) => {\n if (args.tag === void 0) {\n return client.request({\n method: \"eth_getUserOperationReceipt\",\n params: [args.hash]\n });\n }\n return client.request({\n method: \"eth_getUserOperationReceipt\",\n params: [args.hash, args.tag]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/sendRawUserOperation.js\n var sendRawUserOperation;\n var init_sendRawUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/sendRawUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n sendRawUserOperation = async (client, args) => {\n return client.request({\n method: \"eth_sendUserOperation\",\n params: [args.request, args.entryPoint]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/decorators/bundlerClient.js\n var bundlerActions;\n var init_bundlerClient = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/decorators/bundlerClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_estimateUserOperationGas();\n init_getSupportedEntryPoints();\n init_getUserOperationByHash();\n init_getUserOperationReceipt();\n init_sendRawUserOperation();\n bundlerActions = (client) => ({\n estimateUserOperationGas: async (request, entryPoint, stateOverride) => estimateUserOperationGas(client, { request, entryPoint, stateOverride }),\n sendRawUserOperation: async (request, entryPoint) => sendRawUserOperation(client, { request, entryPoint }),\n getUserOperationByHash: async (hash3) => getUserOperationByHash(client, { hash: hash3 }),\n getSupportedEntryPoints: async () => getSupportedEntryPoints(client),\n getUserOperationReceipt: async (hash3, tag) => getUserOperationReceipt(client, {\n hash: hash3,\n tag\n })\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/bundlerClient.js\n function createBundlerClient(args) {\n if (!args.chain) {\n throw new ChainNotFoundError2();\n }\n const { key = \"bundler-public\", name = \"Public Bundler Client\", type = \"bundlerClient\" } = args;\n const { transport, ...opts } = args;\n const resolvedTransport = transport({\n chain: args.chain,\n pollingInterval: opts.pollingInterval\n });\n const baseParameters = {\n ...args,\n key,\n name,\n type\n };\n const client = (() => {\n if (resolvedTransport.config.type === \"http\") {\n const { url, fetchOptions: fetchOptions_ } = resolvedTransport.value;\n const fetchOptions = fetchOptions_ ?? {};\n if (url.toLowerCase().indexOf(\"alchemy\") > -1) {\n fetchOptions.headers = {\n ...fetchOptions.headers,\n \"Alchemy-AA-Sdk-Version\": VERSION\n };\n }\n return createClient({\n ...baseParameters,\n transport: http(url, {\n ...resolvedTransport.config,\n fetchOptions\n })\n });\n }\n return createClient(baseParameters);\n })();\n return client.extend(publicActions).extend(bundlerActions);\n }\n var init_bundlerClient2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/bundlerClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_client();\n init_version5();\n init_bundlerClient();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/account.js\n var AccountNotFoundError2, GetCounterFactualAddressError, UpgradesNotSupportedError, SignTransactionNotSupportedError, FailedToGetStorageSlotError, BatchExecutionNotSupportedError, SmartAccountWithSignerRequiredError;\n var init_account2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/account.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n AccountNotFoundError2 = class extends BaseError4 {\n // TODO: extend this further using docs path as well\n /**\n * Constructor for initializing an error message indicating that an account could not be found to execute the specified action.\n */\n constructor() {\n super(\"Could not find an Account to execute with this Action.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AccountNotFoundError\"\n });\n }\n };\n GetCounterFactualAddressError = class extends BaseError4 {\n /**\n * Constructor for initializing an error message indicating the failure of fetching the counter-factual address.\n */\n constructor() {\n super(\"getCounterFactualAddress failed\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"GetCounterFactualAddressError\"\n });\n }\n };\n UpgradesNotSupportedError = class extends BaseError4 {\n /**\n * Error constructor for indicating that upgrades are not supported by the given account type.\n *\n * @param {string} accountType The type of account that does not support upgrades\n */\n constructor(accountType) {\n super(`Upgrades are not supported by ${accountType}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"UpgradesNotSupported\"\n });\n }\n };\n SignTransactionNotSupportedError = class extends BaseError4 {\n /**\n * Throws an error indicating that signing a transaction is not supported by smart contracts.\n *\n \n */\n constructor() {\n super(`SignTransaction is not supported by smart contracts`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignTransactionNotSupported\"\n });\n }\n };\n FailedToGetStorageSlotError = class extends BaseError4 {\n /**\n * Custom error message constructor for failing to get a specific storage slot.\n *\n * @param {string} slot The storage slot that failed to be accessed or retrieved\n * @param {string} slotDescriptor A description of the storage slot, for additional context in the error message\n */\n constructor(slot, slotDescriptor) {\n super(`Failed to get storage slot ${slot} (${slotDescriptor})`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"FailedToGetStorageSlotError\"\n });\n }\n };\n BatchExecutionNotSupportedError = class extends BaseError4 {\n /**\n * Constructs an error message indicating that batch execution is not supported by the specified account type.\n *\n * @param {string} accountType the type of account that does not support batch execution\n */\n constructor(accountType) {\n super(`Batch execution is not supported by ${accountType}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"BatchExecutionNotSupportedError\"\n });\n }\n };\n SmartAccountWithSignerRequiredError = class extends BaseError4 {\n /**\n * Initializes a new instance of the error class with a predefined error message indicating that a smart account requires a signer.\n */\n constructor() {\n super(\"Smart account requires a signer\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SmartAccountWithSignerRequiredError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/entrypoint.js\n var EntryPointNotFoundError, InvalidEntryPointError;\n var init_entrypoint = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/entrypoint.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n EntryPointNotFoundError = class extends BaseError4 {\n /**\n * Constructs an error message indicating that no default entry point exists for the given chain and entry point version.\n *\n * @param {Chain} chain The blockchain network for which the entry point is being queried\n * @param {any} entryPointVersion The version of the entry point for which no default exists\n */\n constructor(chain2, entryPointVersion) {\n super([\n `No default entry point v${entryPointVersion} exists for ${chain2.name}.`,\n `Supply an override.`\n ].join(\"\\n\"));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"EntryPointNotFoundError\"\n });\n }\n };\n InvalidEntryPointError = class extends BaseError4 {\n /**\n * Constructs an error indicating an invalid entry point version for a specific chain.\n *\n * @param {Chain} chain The chain object containing information about the blockchain\n * @param {any} entryPointVersion The entry point version that is invalid\n */\n constructor(chain2, entryPointVersion) {\n super(`Invalid entry point: unexpected version ${entryPointVersion} for ${chain2.name}.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidEntryPointError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/logger.js\n var LogLevel, Logger;\n var init_logger = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/logger.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(LogLevel2) {\n LogLevel2[LogLevel2[\"VERBOSE\"] = 5] = \"VERBOSE\";\n LogLevel2[LogLevel2[\"DEBUG\"] = 4] = \"DEBUG\";\n LogLevel2[LogLevel2[\"INFO\"] = 3] = \"INFO\";\n LogLevel2[LogLevel2[\"WARN\"] = 2] = \"WARN\";\n LogLevel2[LogLevel2[\"ERROR\"] = 1] = \"ERROR\";\n LogLevel2[LogLevel2[\"NONE\"] = 0] = \"NONE\";\n })(LogLevel || (LogLevel = {}));\n Logger = class {\n /**\n * Sets the log level for logging purposes.\n *\n * @example\n * ```ts\n * import { Logger, LogLevel } from \"@aa-sdk/core\";\n * Logger.setLogLevel(LogLevel.DEBUG);\n * ```\n *\n * @param {LogLevel} logLevel The desired log level\n */\n static setLogLevel(logLevel) {\n this.logLevel = logLevel;\n }\n /**\n * Sets the log filter pattern.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.setLogFilter(\"error\");\n * ```\n *\n * @param {string} pattern The pattern to set as the log filter\n */\n static setLogFilter(pattern) {\n this.logFilter = pattern;\n }\n /**\n * Logs an error message to the console if the logging condition is met.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.error(\"An error occurred while processing the request\");\n * ```\n *\n * @param {string} msg The primary error message to be logged\n * @param {...any[]} args Additional arguments to be logged along with the error message\n */\n static error(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.ERROR))\n return;\n console.error(msg, ...args);\n }\n /**\n * Logs a warning message if the logging conditions are met.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.warn(\"Careful...\");\n * ```\n *\n * @param {string} msg The message to log as a warning\n * @param {...any[]} args Additional parameters to log along with the message\n */\n static warn(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.WARN))\n return;\n console.warn(msg, ...args);\n }\n /**\n * Logs a debug message to the console if the log level allows it.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.debug(\"Something is happening\");\n * ```\n *\n * @param {string} msg The message to log\n * @param {...any[]} args Additional arguments to pass to the console.debug method\n */\n static debug(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.DEBUG))\n return;\n console.debug(msg, ...args);\n }\n /**\n * Logs an informational message to the console if the logging level is set to INFO.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.info(\"Something is happening\");\n * ```\n *\n * @param {string} msg the message to log\n * @param {...any[]} args additional arguments to log alongside the message\n */\n static info(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.INFO))\n return;\n console.info(msg, ...args);\n }\n /**\n * Logs a message with additional arguments if the logging level permits it.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.verbose(\"Something is happening\");\n * ```\n *\n * @param {string} msg The message to log\n * @param {...any[]} args Additional arguments to be logged\n */\n static verbose(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.VERBOSE))\n return;\n console.log(msg, ...args);\n }\n static shouldLog(msg, level) {\n if (this.logLevel < level)\n return false;\n if (this.logFilter && !msg.includes(this.logFilter))\n return false;\n return true;\n }\n };\n Object.defineProperty(Logger, \"logLevel\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: LogLevel.INFO\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/signer/utils.js\n var wrapSignatureWith6492;\n var init_utils8 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/signer/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n wrapSignatureWith6492 = ({ factoryAddress, factoryCalldata, signature }) => {\n return concat([\n encodeAbiParameters(parseAbiParameters(\"address, bytes, bytes\"), [\n factoryAddress,\n factoryCalldata,\n signature\n ]),\n \"0x6492649264926492649264926492649264926492649264926492649264926492\"\n ]);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/account/smartContractAccount.js\n async function toSmartContractAccount(params) {\n const { transport, chain: chain2, entryPoint, source, accountAddress, getAccountInitCode, signMessage: signMessage3, signTypedData: signTypedData3, encodeExecute, encodeBatchExecute, getNonce, getDummySignature, signUserOperationHash, encodeUpgradeToAndCall, getImplementationAddress, prepareSign: prepareSign_, formatSign: formatSign_ } = params;\n const client = createBundlerClient({\n // we set the retry count to 0 so that viem doesn't retry during\n // getting the address. That call always reverts and without this\n // viem will retry 3 times, making this call very slow\n transport: (opts) => transport({ ...opts, chain: chain2, retryCount: 0 }),\n chain: chain2\n });\n const entryPointContract = getContract({\n address: entryPoint.address,\n abi: entryPoint.abi,\n client\n });\n const accountAddress_ = await getAccountAddress({\n client,\n entryPoint,\n accountAddress,\n getAccountInitCode\n });\n let deploymentState = DeploymentState.UNDEFINED;\n const getInitCode = async () => {\n if (deploymentState === DeploymentState.DEPLOYED) {\n return \"0x\";\n }\n const contractCode = await client.getCode({\n address: accountAddress_\n });\n if ((contractCode?.length ?? 0) > 2) {\n deploymentState = DeploymentState.DEPLOYED;\n return \"0x\";\n } else {\n deploymentState = DeploymentState.NOT_DEPLOYED;\n }\n return getAccountInitCode();\n };\n const signUserOperationHash_ = signUserOperationHash ?? (async (uoHash) => {\n return signMessage3({ message: { raw: hexToBytes(uoHash) } });\n });\n const getFactoryAddress = async () => parseFactoryAddressFromAccountInitCode(await getAccountInitCode())[0];\n const getFactoryData = async () => parseFactoryAddressFromAccountInitCode(await getAccountInitCode())[1];\n const encodeUpgradeToAndCall_ = encodeUpgradeToAndCall ?? (() => {\n throw new UpgradesNotSupportedError(source);\n });\n const isAccountDeployed = async () => {\n const initCode = await getInitCode();\n return initCode === \"0x\";\n };\n const getNonce_ = getNonce ?? (async (nonceKey = 0n) => {\n return entryPointContract.read.getNonce([\n accountAddress_,\n nonceKey\n ]);\n });\n const account = toAccount({\n address: accountAddress_,\n signMessage: signMessage3,\n signTypedData: signTypedData3,\n signTransaction: () => {\n throw new SignTransactionNotSupportedError();\n }\n });\n const create6492Signature = async (isDeployed, signature) => {\n if (isDeployed) {\n return signature;\n }\n const [factoryAddress, factoryCalldata] = parseFactoryAddressFromAccountInitCode(await getAccountInitCode());\n return wrapSignatureWith6492({\n factoryAddress,\n factoryCalldata,\n signature\n });\n };\n const signMessageWith6492 = async (message) => {\n const [isDeployed, signature] = await Promise.all([\n isAccountDeployed(),\n account.signMessage(message)\n ]);\n return create6492Signature(isDeployed, signature);\n };\n const signTypedDataWith6492 = async (typedDataDefinition) => {\n const [isDeployed, signature] = await Promise.all([\n isAccountDeployed(),\n account.signTypedData(typedDataDefinition)\n ]);\n return create6492Signature(isDeployed, signature);\n };\n const getImplementationAddress_ = getImplementationAddress ?? (async () => {\n const storage = await client.getStorageAt({\n address: account.address,\n // This is the default slot for the implementation address for Proxies\n slot: \"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\"\n });\n if (storage == null) {\n throw new FailedToGetStorageSlotError(\"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\", \"Proxy Implementation Address\");\n }\n return `0x${storage.slice(26)}`;\n });\n if (entryPoint.version !== \"0.6.0\" && entryPoint.version !== \"0.7.0\") {\n throw new InvalidEntryPointError(chain2, entryPoint.version);\n }\n if (prepareSign_ && !formatSign_ || !prepareSign_ && formatSign_) {\n throw new Error(\"Must implement both prepareSign and formatSign or neither\");\n }\n const prepareSign = prepareSign_ ?? (() => {\n throw new Error(\"prepareSign not implemented\");\n });\n const formatSign = formatSign_ ?? (() => {\n throw new Error(\"formatSign not implemented\");\n });\n return {\n ...account,\n source,\n // TODO: I think this should probably be signUserOperation instead\n // and allow for generating the UO hash based on the EP version\n signUserOperationHash: signUserOperationHash_,\n getFactoryAddress,\n getFactoryData,\n encodeBatchExecute: encodeBatchExecute ?? (() => {\n throw new BatchExecutionNotSupportedError(source);\n }),\n encodeExecute,\n getDummySignature,\n getInitCode,\n encodeUpgradeToAndCall: encodeUpgradeToAndCall_,\n getEntryPoint: () => entryPoint,\n isAccountDeployed,\n getAccountNonce: getNonce_,\n signMessageWith6492,\n signTypedDataWith6492,\n getImplementationAddress: getImplementationAddress_,\n prepareSign,\n formatSign\n };\n }\n var DeploymentState, isSmartAccountWithSigner, parseFactoryAddressFromAccountInitCode, getAccountAddress;\n var init_smartContractAccount = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/account/smartContractAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_accounts();\n init_bundlerClient2();\n init_account2();\n init_client();\n init_entrypoint();\n init_logger();\n init_utils8();\n (function(DeploymentState2) {\n DeploymentState2[\"UNDEFINED\"] = \"0x0\";\n DeploymentState2[\"NOT_DEPLOYED\"] = \"0x1\";\n DeploymentState2[\"DEPLOYED\"] = \"0x2\";\n })(DeploymentState || (DeploymentState = {}));\n isSmartAccountWithSigner = (account) => {\n return \"getSigner\" in account;\n };\n parseFactoryAddressFromAccountInitCode = (initCode) => {\n const factoryAddress = `0x${initCode.substring(2, 42)}`;\n const factoryCalldata = `0x${initCode.substring(42)}`;\n return [factoryAddress, factoryCalldata];\n };\n getAccountAddress = async ({ client, entryPoint, accountAddress, getAccountInitCode }) => {\n if (accountAddress)\n return accountAddress;\n const entryPointContract = getContract({\n address: entryPoint.address,\n abi: entryPoint.abi,\n client\n });\n const initCode = await getAccountInitCode();\n Logger.verbose(\"[BaseSmartContractAccount](getAddress) initCode: \", initCode);\n try {\n await entryPointContract.simulate.getSenderAddress([initCode]);\n } catch (err) {\n Logger.verbose(\"[BaseSmartContractAccount](getAddress) getSenderAddress err: \", err);\n if (err.cause?.data?.errorName === \"SenderAddressResult\") {\n Logger.verbose(\"[BaseSmartContractAccount](getAddress) entryPoint.getSenderAddress result:\", err.cause.data.args[0]);\n return err.cause.data.args[0];\n }\n if (err.details === \"Invalid URL\") {\n throw new InvalidRpcUrlError();\n }\n }\n throw new GetCounterFactualAddressError();\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/transaction.js\n var TransactionMissingToParamError, FailedToFindTransactionError;\n var init_transaction3 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/transaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n TransactionMissingToParamError = class extends BaseError4 {\n /**\n * Throws an error indicating that a transaction is missing the `to` address in the request.\n */\n constructor() {\n super(\"Transaction is missing `to` address set on request\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"TransactionMissingToParamError\"\n });\n }\n };\n FailedToFindTransactionError = class extends BaseError4 {\n /**\n * Constructs a new error message indicating a failure to find the transaction for the specified user operation hash.\n *\n * @param {Hex} hash The hexadecimal value representing the user operation hash.\n */\n constructor(hash3) {\n super(`Failed to find transaction for user operation ${hash3}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"FailedToFindTransactionError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperationFromTx.js\n async function buildUserOperationFromTx(client_, args, overrides, context2) {\n const client = clientHeaderTrack(client_, \"buildUserOperationFromTx\");\n const { account = client.account, ...request } = args;\n if (!account || typeof account === \"string\") {\n throw new AccountNotFoundError2();\n }\n if (!request.to) {\n throw new TransactionMissingToParamError();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"buildUserOperationFromTx\", client);\n }\n const _overrides = {\n ...overrides,\n maxFeePerGas: request.maxFeePerGas ? request.maxFeePerGas : void 0,\n maxPriorityFeePerGas: request.maxPriorityFeePerGas ? request.maxPriorityFeePerGas : void 0\n };\n return buildUserOperation(client, {\n uo: {\n target: request.to,\n data: request.data ?? \"0x\",\n value: request.value ? request.value : 0n\n },\n account,\n context: context2,\n overrides: _overrides\n });\n }\n var init_buildUserOperationFromTx = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperationFromTx.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_transaction3();\n init_buildUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/util.js\n var util, objectUtil, ZodParsedType, getParsedType;\n var init_util = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/util.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(util2) {\n util2.assertEqual = (_2) => {\n };\n function assertIs(_arg) {\n }\n util2.assertIs = assertIs;\n function assertNever2(_x) {\n throw new Error();\n }\n util2.assertNever = assertNever2;\n util2.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util2.getValidEnumValues = (obj) => {\n const validKeys = util2.objectKeys(obj).filter((k4) => typeof obj[obj[k4]] !== \"number\");\n const filtered = {};\n for (const k4 of validKeys) {\n filtered[k4] = obj[k4];\n }\n return util2.objectValues(filtered);\n };\n util2.objectValues = (obj) => {\n return util2.objectKeys(obj).map(function(e2) {\n return obj[e2];\n });\n };\n util2.objectKeys = typeof Object.keys === \"function\" ? (obj) => Object.keys(obj) : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util2.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return void 0;\n };\n util2.isInteger = typeof Number.isInteger === \"function\" ? (val) => Number.isInteger(val) : (val) => typeof val === \"number\" && Number.isFinite(val) && Math.floor(val) === val;\n function joinValues(array, separator = \" | \") {\n return array.map((val) => typeof val === \"string\" ? `'${val}'` : val).join(separator);\n }\n util2.joinValues = joinValues;\n util2.jsonStringifyReplacer = (_2, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n })(util || (util = {}));\n (function(objectUtil2) {\n objectUtil2.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second\n // second overwrites first\n };\n };\n })(objectUtil || (objectUtil = {}));\n ZodParsedType = util.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\"\n ]);\n getParsedType = (data) => {\n const t3 = typeof data;\n switch (t3) {\n case \"undefined\":\n return ZodParsedType.undefined;\n case \"string\":\n return ZodParsedType.string;\n case \"number\":\n return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;\n case \"boolean\":\n return ZodParsedType.boolean;\n case \"function\":\n return ZodParsedType.function;\n case \"bigint\":\n return ZodParsedType.bigint;\n case \"symbol\":\n return ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return ZodParsedType.array;\n }\n if (data === null) {\n return ZodParsedType.null;\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return ZodParsedType.date;\n }\n return ZodParsedType.object;\n default:\n return ZodParsedType.unknown;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/ZodError.js\n var ZodIssueCode, quotelessJson, ZodError;\n var init_ZodError = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/ZodError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_util();\n ZodIssueCode = util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\"\n ]);\n quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n };\n ZodError = class _ZodError extends Error {\n get errors() {\n return this.issues;\n }\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(this, actualProto);\n } else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n format(_mapper) {\n const mapper = _mapper || function(issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n } else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n } else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n } else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n } else {\n let curr = fieldErrors;\n let i3 = 0;\n while (i3 < issue.path.length) {\n const el = issue.path[i3];\n const terminal = i3 === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n } else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i3++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n static assert(value) {\n if (!(value instanceof _ZodError)) {\n throw new Error(`Not a ZodError: ${value}`);\n }\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n } else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n };\n ZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/locales/en.js\n var errorMap, en_default;\n var init_en = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/locales/en.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_ZodError();\n init_util();\n errorMap = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodIssueCode.invalid_type:\n if (issue.received === ZodParsedType.undefined) {\n message = \"Required\";\n } else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n break;\n case ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n break;\n case ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n } else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n } else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n } else {\n util.assertNever(issue.validation);\n }\n } else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n } else {\n message = \"Invalid\";\n }\n break;\n case ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util.assertNever(issue);\n }\n return { message };\n };\n en_default = errorMap;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/errors.js\n function setErrorMap(map) {\n overrideErrorMap = map;\n }\n function getErrorMap() {\n return overrideErrorMap;\n }\n var overrideErrorMap;\n var init_errors5 = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_en();\n overrideErrorMap = en_default;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/parseUtil.js\n function addIssueToContext(ctx, issueData) {\n const overrideMap = getErrorMap();\n const issue = makeIssue({\n issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n // contextual error map is first priority\n ctx.schemaErrorMap,\n // then schema-bound map if available\n overrideMap,\n // then global override map\n overrideMap === en_default ? void 0 : en_default\n // then global default map\n ].filter((x4) => !!x4)\n });\n ctx.common.issues.push(issue);\n }\n var makeIssue, EMPTY_PATH, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync;\n var init_parseUtil = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/parseUtil.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors5();\n init_en();\n makeIssue = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...issueData.path || []];\n const fullIssue = {\n ...issueData,\n path: fullPath\n };\n if (issueData.message !== void 0) {\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message\n };\n }\n let errorMessage = \"\";\n const maps = errorMaps.filter((m2) => !!m2).slice().reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: errorMessage\n };\n };\n EMPTY_PATH = [];\n ParseStatus = class _ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s4 of results) {\n if (s4.status === \"aborted\")\n return INVALID;\n if (s4.status === \"dirty\")\n status.dirty();\n arrayValue.push(s4.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value\n });\n }\n return _ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return INVALID;\n if (value.status === \"aborted\")\n return INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" && (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n };\n INVALID = Object.freeze({\n status: \"aborted\"\n });\n DIRTY = (value) => ({ status: \"dirty\", value });\n OK = (value) => ({ status: \"valid\", value });\n isAborted = (x4) => x4.status === \"aborted\";\n isDirty = (x4) => x4.status === \"dirty\";\n isValid = (x4) => x4.status === \"valid\";\n isAsync = (x4) => typeof Promise !== \"undefined\" && x4 instanceof Promise;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/typeAliases.js\n var init_typeAliases = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/typeAliases.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/errorUtil.js\n var errorUtil;\n var init_errorUtil = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/errorUtil.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(errorUtil2) {\n errorUtil2.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n errorUtil2.toString = (message) => typeof message === \"string\" ? message : message?.message;\n })(errorUtil || (errorUtil = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/types.js\n function processCreateParams(params) {\n if (!params)\n return {};\n const { errorMap: errorMap2, invalid_type_error, required_error, description } = params;\n if (errorMap2 && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap2)\n return { errorMap: errorMap2, description };\n const customMap = (iss, ctx) => {\n const { message } = params;\n if (iss.code === \"invalid_enum_value\") {\n return { message: message ?? ctx.defaultError };\n }\n if (typeof ctx.data === \"undefined\") {\n return { message: message ?? required_error ?? ctx.defaultError };\n }\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n return { message: message ?? invalid_type_error ?? ctx.defaultError };\n };\n return { errorMap: customMap, description };\n }\n function timeRegexSource(args) {\n let secondsRegexSource = `[0-5]\\\\d`;\n if (args.precision) {\n secondsRegexSource = `${secondsRegexSource}\\\\.\\\\d{${args.precision}}`;\n } else if (args.precision == null) {\n secondsRegexSource = `${secondsRegexSource}(\\\\.\\\\d+)?`;\n }\n const secondsQuantifier = args.precision ? \"+\" : \"?\";\n return `([01]\\\\d|2[0-3]):[0-5]\\\\d(:${secondsRegexSource})${secondsQuantifier}`;\n }\n function timeRegex(args) {\n return new RegExp(`^${timeRegexSource(args)}$`);\n }\n function datetimeRegex(args) {\n let regex = `${dateRegexSource}T${timeRegexSource(args)}`;\n const opts = [];\n opts.push(args.local ? `Z?` : `Z`);\n if (args.offset)\n opts.push(`([+-]\\\\d{2}:?\\\\d{2})`);\n regex = `${regex}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex}$`);\n }\n function isValidIP(ip, version7) {\n if ((version7 === \"v4\" || !version7) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version7 === \"v6\" || !version7) && ipv6Regex.test(ip)) {\n return true;\n }\n return false;\n }\n function isValidJWT(jwt, alg) {\n if (!jwtRegex.test(jwt))\n return false;\n try {\n const [header] = jwt.split(\".\");\n const base64 = header.replace(/-/g, \"+\").replace(/_/g, \"/\").padEnd(header.length + (4 - header.length % 4) % 4, \"=\");\n const decoded = JSON.parse(atob(base64));\n if (typeof decoded !== \"object\" || decoded === null)\n return false;\n if (\"typ\" in decoded && decoded?.typ !== \"JWT\")\n return false;\n if (!decoded.alg)\n return false;\n if (alg && decoded.alg !== alg)\n return false;\n return true;\n } catch {\n return false;\n }\n }\n function isValidCidr(ip, version7) {\n if ((version7 === \"v4\" || !version7) && ipv4CidrRegex.test(ip)) {\n return true;\n }\n if ((version7 === \"v6\" || !version7) && ipv6CidrRegex.test(ip)) {\n return true;\n }\n return false;\n }\n function floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return valInt % stepInt / 10 ** decCount;\n }\n function deepPartialify(schema) {\n if (schema instanceof ZodObject) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n }\n return new ZodObject({\n ...schema._def,\n shape: () => newShape\n });\n } else if (schema instanceof ZodArray) {\n return new ZodArray({\n ...schema._def,\n type: deepPartialify(schema.element)\n });\n } else if (schema instanceof ZodOptional) {\n return ZodOptional.create(deepPartialify(schema.unwrap()));\n } else if (schema instanceof ZodNullable) {\n return ZodNullable.create(deepPartialify(schema.unwrap()));\n } else if (schema instanceof ZodTuple) {\n return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n } else {\n return schema;\n }\n }\n function mergeValues(a3, b4) {\n const aType = getParsedType(a3);\n const bType = getParsedType(b4);\n if (a3 === b4) {\n return { valid: true, data: a3 };\n } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {\n const bKeys = util.objectKeys(b4);\n const sharedKeys = util.objectKeys(a3).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a3, ...b4 };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a3[key], b4[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {\n if (a3.length !== b4.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index2 = 0; index2 < a3.length; index2++) {\n const itemA = a3[index2];\n const itemB = b4[index2];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a3 === +b4) {\n return { valid: true, data: a3 };\n } else {\n return { valid: false };\n }\n }\n function createZodEnum(values, params) {\n return new ZodEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodEnum,\n ...processCreateParams(params)\n });\n }\n function cleanParams(params, data) {\n const p4 = typeof params === \"function\" ? params(data) : typeof params === \"string\" ? { message: params } : params;\n const p22 = typeof p4 === \"string\" ? { message: p4 } : p4;\n return p22;\n }\n function custom2(check, _params = {}, fatal) {\n if (check)\n return ZodAny.create().superRefine((data, ctx) => {\n const r2 = check(data);\n if (r2 instanceof Promise) {\n return r2.then((r3) => {\n if (!r3) {\n const params = cleanParams(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n });\n }\n if (!r2) {\n const params = cleanParams(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n return;\n });\n return ZodAny.create();\n }\n var ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex2, base64urlRegex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, instanceOfType, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, ostring, onumber, oboolean, coerce, NEVER;\n var init_types2 = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/types.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_ZodError();\n init_errors5();\n init_errorUtil();\n init_parseUtil();\n init_util();\n ParseInputLazyPath = class {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (Array.isArray(this._key)) {\n this._cachedPath.push(...this._path, ...this._key);\n } else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n };\n handleResult = (ctx, result) => {\n if (isValid(result)) {\n return { success: true, data: result.value };\n } else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n }\n };\n }\n };\n ZodType = class {\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return getParsedType(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent\n };\n }\n _processInputParams(input) {\n return {\n status: new ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent\n }\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if (isAsync(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n const ctx = {\n common: {\n issues: [],\n async: params?.async ?? false,\n contextualErrorMap: params?.errorMap\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data)\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult(ctx, result);\n }\n \"~validate\"(data) {\n const ctx = {\n common: {\n issues: [],\n async: !!this[\"~standard\"].async\n },\n path: [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data)\n };\n if (!this[\"~standard\"].async) {\n try {\n const result = this._parseSync({ data, path: [], parent: ctx });\n return isValid(result) ? {\n value: result.value\n } : {\n issues: ctx.common.issues\n };\n } catch (err) {\n if (err?.message?.toLowerCase()?.includes(\"encountered\")) {\n this[\"~standard\"].async = true;\n }\n ctx.common = {\n issues: [],\n async: true\n };\n }\n }\n return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result) ? {\n value: result.value\n } : {\n issues: ctx.common.issues\n });\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params?.errorMap,\n async: true\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data)\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));\n return handleResult(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n } else if (typeof message === \"function\") {\n return message(val);\n } else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodIssueCode.custom,\n ...getIssueProperties(val)\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n } else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n } else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\" ? refinementData(val, ctx) : refinementData);\n return false;\n } else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects({\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"refinement\", refinement }\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n constructor(def) {\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n this[\"~standard\"] = {\n version: 1,\n vendor: \"zod\",\n validate: (data) => this[\"~validate\"](data)\n };\n }\n optional() {\n return ZodOptional.create(this, this._def);\n }\n nullable() {\n return ZodNullable.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray.create(this);\n }\n promise() {\n return ZodPromise.create(this, this._def);\n }\n or(option) {\n return ZodUnion.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection.create(this, incoming, this._def);\n }\n transform(transform) {\n return new ZodEffects({\n ...processCreateParams(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"transform\", transform }\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault({\n ...processCreateParams(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodDefault\n });\n }\n brand() {\n return new ZodBranded({\n typeName: ZodFirstPartyTypeKind.ZodBranded,\n type: this,\n ...processCreateParams(this._def)\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch({\n ...processCreateParams(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodCatch\n });\n }\n describe(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description\n });\n }\n pipe(target) {\n return ZodPipeline.create(this, target);\n }\n readonly() {\n return ZodReadonly.create(this);\n }\n isOptional() {\n return this.safeParse(void 0).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n };\n cuidRegex = /^c[^\\s-]{8,}$/i;\n cuid2Regex = /^[0-9a-z]+$/;\n ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;\n uuidRegex = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\n nanoidRegex = /^[a-z0-9_-]{21}$/i;\n jwtRegex = /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/;\n durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n emailRegex = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n _emojiRegex = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\n ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\n ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/(3[0-2]|[12]?[0-9])$/;\n ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;\n ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n base64Regex2 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;\n base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;\n dateRegexSource = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\n dateRegex = new RegExp(`^${dateRegexSource}$`);\n ZodString = class _ZodString extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.string) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.string,\n received: ctx2.parsedType\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = void 0;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message\n });\n } else if (tooSmall) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message\n });\n }\n status.dirty();\n }\n } else if (check.kind === \"email\") {\n if (!emailRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"email\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"emoji\") {\n if (!emojiRegex) {\n emojiRegex = new RegExp(_emojiRegex, \"u\");\n }\n if (!emojiRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"emoji\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"uuid\") {\n if (!uuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"uuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"nanoid\") {\n if (!nanoidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"nanoid\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"cuid\") {\n if (!cuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"cuid2\") {\n if (!cuid2Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid2\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"ulid\") {\n if (!ulidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ulid\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n } catch {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"url\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"regex\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n } else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n } else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n } else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"datetime\") {\n const regex = datetimeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"date\") {\n const regex = dateRegex;\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"date\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"time\") {\n const regex = timeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"time\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"duration\") {\n if (!durationRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"duration\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"ip\") {\n if (!isValidIP(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ip\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"jwt\") {\n if (!isValidJWT(input.data, check.alg)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"jwt\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"cidr\") {\n if (!isValidCidr(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cidr\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"base64\") {\n if (!base64Regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"base64\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"base64url\") {\n if (!base64urlRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"base64url\",\n code: ZodIssueCode.invalid_string,\n message: check.message\n });\n status.dirty();\n }\n } else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _regex(regex, validation, message) {\n return this.refinement((data) => regex.test(data), {\n validation,\n code: ZodIssueCode.invalid_string,\n ...errorUtil.errToObj(message)\n });\n }\n _addCheck(check) {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil.errToObj(message) });\n }\n nanoid(message) {\n return this._addCheck({ kind: \"nanoid\", ...errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil.errToObj(message) });\n }\n base64(message) {\n return this._addCheck({ kind: \"base64\", ...errorUtil.errToObj(message) });\n }\n base64url(message) {\n return this._addCheck({\n kind: \"base64url\",\n ...errorUtil.errToObj(message)\n });\n }\n jwt(options) {\n return this._addCheck({ kind: \"jwt\", ...errorUtil.errToObj(options) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil.errToObj(options) });\n }\n cidr(options) {\n return this._addCheck({ kind: \"cidr\", ...errorUtil.errToObj(options) });\n }\n datetime(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n local: false,\n message: options\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n offset: options?.offset ?? false,\n local: options?.local ?? false,\n ...errorUtil.errToObj(options?.message)\n });\n }\n date(message) {\n return this._addCheck({ kind: \"date\", message });\n }\n time(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"time\",\n precision: null,\n message: options\n });\n }\n return this._addCheck({\n kind: \"time\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n ...errorUtil.errToObj(options?.message)\n });\n }\n duration(message) {\n return this._addCheck({ kind: \"duration\", ...errorUtil.errToObj(message) });\n }\n regex(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex,\n ...errorUtil.errToObj(message)\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value,\n position: options?.position,\n ...errorUtil.errToObj(options?.message)\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value,\n ...errorUtil.errToObj(message)\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value,\n ...errorUtil.errToObj(message)\n });\n }\n min(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\n ...errorUtil.errToObj(message)\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil.errToObj(message)\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil.errToObj(message)\n });\n }\n /**\n * Equivalent to `.min(1)`\n */\n nonempty(message) {\n return this.min(1, errorUtil.errToObj(message));\n }\n trim() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }]\n });\n }\n toLowerCase() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }]\n });\n }\n toUpperCase() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }]\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isDate() {\n return !!this._def.checks.find((ch) => ch.kind === \"date\");\n }\n get isTime() {\n return !!this._def.checks.find((ch) => ch.kind === \"time\");\n }\n get isDuration() {\n return !!this._def.checks.find((ch) => ch.kind === \"duration\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isNANOID() {\n return !!this._def.checks.find((ch) => ch.kind === \"nanoid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get isCIDR() {\n return !!this._def.checks.find((ch) => ch.kind === \"cidr\");\n }\n get isBase64() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64\");\n }\n get isBase64url() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64url\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n };\n ZodString.create = (params) => {\n return new ZodString({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodString,\n coerce: params?.coerce ?? false,\n ...processCreateParams(params)\n });\n };\n ZodNumber = class _ZodNumber extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.number) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.number,\n received: ctx2.parsedType\n });\n return INVALID;\n }\n let ctx = void 0;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"min\") {\n const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_finite,\n message: check.message\n });\n status.dirty();\n }\n } else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new _ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message)\n }\n ]\n });\n }\n _addCheck(check) {\n return new _ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil.toString(message)\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message)\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message)\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message)\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message)\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil.toString(message)\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil.toString(message)\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil.toString(message)\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil.toString(message)\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" || ch.kind === \"multipleOf\" && util.isInteger(ch.value));\n }\n get isFinite() {\n let max = null;\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" || ch.kind === \"int\" || ch.kind === \"multipleOf\") {\n return true;\n } else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n } else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n };\n ZodNumber.create = (params) => {\n return new ZodNumber({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodNumber,\n coerce: params?.coerce || false,\n ...processCreateParams(params)\n });\n };\n ZodBigInt = class _ZodBigInt extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n try {\n input.data = BigInt(input.data);\n } catch {\n return this._getInvalidInput(input);\n }\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.bigint) {\n return this._getInvalidInput(input);\n }\n let ctx = void 0;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message\n });\n status.dirty();\n }\n } else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message\n });\n status.dirty();\n }\n } else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _getInvalidInput(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.bigint,\n received: ctx.parsedType\n });\n return INVALID;\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new _ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message)\n }\n ]\n });\n }\n _addCheck(check) {\n return new _ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message)\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message)\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message)\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message)\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil.toString(message)\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n };\n ZodBigInt.create = (params) => {\n return new ZodBigInt({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodBigInt,\n coerce: params?.coerce ?? false,\n ...processCreateParams(params)\n });\n };\n ZodBoolean = class extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.boolean,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodBoolean.create = (params) => {\n return new ZodBoolean({\n typeName: ZodFirstPartyTypeKind.ZodBoolean,\n coerce: params?.coerce || false,\n ...processCreateParams(params)\n });\n };\n ZodDate = class _ZodDate extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.date) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.date,\n received: ctx2.parsedType\n });\n return INVALID;\n }\n if (Number.isNaN(input.data.getTime())) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_date\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = void 0;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\"\n });\n status.dirty();\n }\n } else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\"\n });\n status.dirty();\n }\n } else {\n util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime())\n };\n }\n _addCheck(check) {\n return new _ZodDate({\n ...this._def,\n checks: [...this._def.checks, check]\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil.toString(message)\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil.toString(message)\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n };\n ZodDate.create = (params) => {\n return new ZodDate({\n checks: [],\n coerce: params?.coerce || false,\n typeName: ZodFirstPartyTypeKind.ZodDate,\n ...processCreateParams(params)\n });\n };\n ZodSymbol = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.symbol,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodSymbol.create = (params) => {\n return new ZodSymbol({\n typeName: ZodFirstPartyTypeKind.ZodSymbol,\n ...processCreateParams(params)\n });\n };\n ZodUndefined = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.undefined,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodUndefined.create = (params) => {\n return new ZodUndefined({\n typeName: ZodFirstPartyTypeKind.ZodUndefined,\n ...processCreateParams(params)\n });\n };\n ZodNull = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.null,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodNull.create = (params) => {\n return new ZodNull({\n typeName: ZodFirstPartyTypeKind.ZodNull,\n ...processCreateParams(params)\n });\n };\n ZodAny = class extends ZodType {\n constructor() {\n super(...arguments);\n this._any = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n };\n ZodAny.create = (params) => {\n return new ZodAny({\n typeName: ZodFirstPartyTypeKind.ZodAny,\n ...processCreateParams(params)\n });\n };\n ZodUnknown = class extends ZodType {\n constructor() {\n super(...arguments);\n this._unknown = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n };\n ZodUnknown.create = (params) => {\n return new ZodUnknown({\n typeName: ZodFirstPartyTypeKind.ZodUnknown,\n ...processCreateParams(params)\n });\n };\n ZodNever = class extends ZodType {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.never,\n received: ctx.parsedType\n });\n return INVALID;\n }\n };\n ZodNever.create = (params) => {\n return new ZodNever({\n typeName: ZodFirstPartyTypeKind.ZodNever,\n ...processCreateParams(params)\n });\n };\n ZodVoid = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.void,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodVoid.create = (params) => {\n return new ZodVoid({\n typeName: ZodFirstPartyTypeKind.ZodVoid,\n ...processCreateParams(params)\n });\n };\n ZodArray = class _ZodArray extends ZodType {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType\n });\n return INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n addIssueToContext(ctx, {\n code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,\n minimum: tooSmall ? def.exactLength.value : void 0,\n maximum: tooBig ? def.exactLength.value : void 0,\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i3) => {\n return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i3));\n })).then((result2) => {\n return ParseStatus.mergeArray(status, result2);\n });\n }\n const result = [...ctx.data].map((item, i3) => {\n return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i3));\n });\n return ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength, message) {\n return new _ZodArray({\n ...this._def,\n minLength: { value: minLength, message: errorUtil.toString(message) }\n });\n }\n max(maxLength, message) {\n return new _ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil.toString(message) }\n });\n }\n length(len, message) {\n return new _ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil.toString(message) }\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n };\n ZodArray.create = (schema, params) => {\n return new ZodArray({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind.ZodArray,\n ...processCreateParams(params)\n });\n };\n ZodObject = class _ZodObject extends ZodType {\n constructor() {\n super(...arguments);\n this._cached = null;\n this.nonstrict = this.passthrough;\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape3 = this._def.shape();\n const keys = util.objectKeys(shape3);\n this._cached = { shape: shape3, keys };\n return this._cached;\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.object) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx2.parsedType\n });\n return INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape: shape3, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape3[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data\n });\n }\n if (this._def.catchall instanceof ZodNever) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] }\n });\n }\n } else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.unrecognized_keys,\n keys: extraKeys\n });\n status.dirty();\n }\n } else if (unknownKeys === \"strip\") {\n } else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n } else {\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(\n new ParseInputLazyPath(ctx, value, ctx.path, key)\n //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve().then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n alwaysSet: pair.alwaysSet\n });\n }\n return syncPairs;\n }).then((syncPairs) => {\n return ParseStatus.mergeObjectSync(status, syncPairs);\n });\n } else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil.errToObj;\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...message !== void 0 ? {\n errorMap: (issue, ctx) => {\n const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: errorUtil.errToObj(message).message ?? defaultError\n };\n return {\n message: defaultError\n };\n }\n } : {}\n });\n }\n strip() {\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"strip\"\n });\n }\n passthrough() {\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\"\n });\n }\n // const AugmentFactory =\n // (def: Def) =>\n // (\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new _ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation\n })\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new _ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape()\n }),\n typeName: ZodFirstPartyTypeKind.ZodObject\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge(\n // merging: Incoming\n // ): //ZodObject = (merging) => {\n // ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index2) {\n return new _ZodObject({\n ...this._def,\n catchall: index2\n });\n }\n pick(mask) {\n const shape3 = {};\n for (const key of util.objectKeys(mask)) {\n if (mask[key] && this.shape[key]) {\n shape3[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape3\n });\n }\n omit(mask) {\n const shape3 = {};\n for (const key of util.objectKeys(this.shape)) {\n if (!mask[key]) {\n shape3[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape3\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify(this);\n }\n partial(mask) {\n const newShape = {};\n for (const key of util.objectKeys(this.shape)) {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n } else {\n newShape[key] = fieldSchema.optional();\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => newShape\n });\n }\n required(mask) {\n const newShape = {};\n for (const key of util.objectKeys(this.shape)) {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n } else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => newShape\n });\n }\n keyof() {\n return createZodEnum(util.objectKeys(this.shape));\n }\n };\n ZodObject.create = (shape3, params) => {\n return new ZodObject({\n shape: () => shape3,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params)\n });\n };\n ZodObject.strictCreate = (shape3, params) => {\n return new ZodObject({\n shape: () => shape3,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params)\n });\n };\n ZodObject.lazycreate = (shape3, params) => {\n return new ZodObject({\n shape: shape3,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params)\n });\n };\n ZodUnion = class extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n },\n parent: null\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx\n }),\n ctx: childCtx\n };\n })).then(handleResults);\n } else {\n let dirty = void 0;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n },\n parent: null\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx\n });\n if (result.status === \"valid\") {\n return result;\n } else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues2) => new ZodError(issues2));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors\n });\n return INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n };\n ZodUnion.create = (types, params) => {\n return new ZodUnion({\n options: types,\n typeName: ZodFirstPartyTypeKind.ZodUnion,\n ...processCreateParams(params)\n });\n };\n getDiscriminator = (type) => {\n if (type instanceof ZodLazy) {\n return getDiscriminator(type.schema);\n } else if (type instanceof ZodEffects) {\n return getDiscriminator(type.innerType());\n } else if (type instanceof ZodLiteral) {\n return [type.value];\n } else if (type instanceof ZodEnum) {\n return type.options;\n } else if (type instanceof ZodNativeEnum) {\n return util.objectValues(type.enum);\n } else if (type instanceof ZodDefault) {\n return getDiscriminator(type._def.innerType);\n } else if (type instanceof ZodUndefined) {\n return [void 0];\n } else if (type instanceof ZodNull) {\n return [null];\n } else if (type instanceof ZodOptional) {\n return [void 0, ...getDiscriminator(type.unwrap())];\n } else if (type instanceof ZodNullable) {\n return [null, ...getDiscriminator(type.unwrap())];\n } else if (type instanceof ZodBranded) {\n return getDiscriminator(type.unwrap());\n } else if (type instanceof ZodReadonly) {\n return getDiscriminator(type.unwrap());\n } else if (type instanceof ZodCatch) {\n return getDiscriminator(type._def.innerType);\n } else {\n return [];\n }\n };\n ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator]\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n } else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n const optionsMap = /* @__PURE__ */ new Map();\n for (const type of options) {\n const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n if (!discriminatorValues.length) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new _ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams(params)\n });\n }\n };\n ZodIntersection = class extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if (isAborted(parsedLeft) || isAborted(parsedRight)) {\n return INVALID;\n }\n const merged = mergeValues(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_intersection_types\n });\n return INVALID;\n }\n if (isDirty(parsedLeft) || isDirty(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n })\n ]).then(([left, right]) => handleParsed(left, right));\n } else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }));\n }\n }\n };\n ZodIntersection.create = (left, right, params) => {\n return new ZodIntersection({\n left,\n right,\n typeName: ZodFirstPartyTypeKind.ZodIntersection,\n ...processCreateParams(params)\n });\n };\n ZodTuple = class _ZodTuple extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType\n });\n return INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\"\n });\n return INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\"\n });\n status.dirty();\n }\n const items = [...ctx.data].map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n }).filter((x4) => !!x4);\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return ParseStatus.mergeArray(status, results);\n });\n } else {\n return ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new _ZodTuple({\n ...this._def,\n rest\n });\n }\n };\n ZodTuple.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple({\n items: schemas,\n typeName: ZodFirstPartyTypeKind.ZodTuple,\n rest: null,\n ...processCreateParams(params)\n });\n };\n ZodRecord = class _ZodRecord extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n alwaysSet: key in ctx.data\n });\n }\n if (ctx.common.async) {\n return ParseStatus.mergeObjectAsync(status, pairs);\n } else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType) {\n return new _ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(third)\n });\n }\n return new _ZodRecord({\n keyType: ZodString.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(second)\n });\n }\n };\n ZodMap = class extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.map) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.map,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index2) => {\n return {\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index2, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index2, \"value\"]))\n };\n });\n if (ctx.common.async) {\n const finalMap = /* @__PURE__ */ new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n } else {\n const finalMap = /* @__PURE__ */ new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n };\n ZodMap.create = (keyType, valueType, params) => {\n return new ZodMap({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind.ZodMap,\n ...processCreateParams(params)\n });\n };\n ZodSet = class _ZodSet extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.set) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.set,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements2) {\n const parsedSet = /* @__PURE__ */ new Set();\n for (const element of elements2) {\n if (element.status === \"aborted\")\n return INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i3) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i3)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements2) => finalizeSet(elements2));\n } else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new _ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil.toString(message) }\n });\n }\n max(maxSize, message) {\n return new _ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil.toString(message) }\n });\n }\n size(size6, message) {\n return this.min(size6, message).max(size6, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n };\n ZodSet.create = (valueType, params) => {\n return new ZodSet({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind.ZodSet,\n ...processCreateParams(params)\n });\n };\n ZodFunction = class _ZodFunction extends ZodType {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.function) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.function,\n received: ctx.parsedType\n });\n return INVALID;\n }\n function makeArgsIssue(args, error) {\n return makeIssue({\n data: args,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x4) => !!x4),\n issueData: {\n code: ZodIssueCode.invalid_arguments,\n argumentsError: error\n }\n });\n }\n function makeReturnsIssue(returns, error) {\n return makeIssue({\n data: returns,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x4) => !!x4),\n issueData: {\n code: ZodIssueCode.invalid_return_type,\n returnTypeError: error\n }\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise) {\n const me = this;\n return OK(async function(...args) {\n const error = new ZodError([]);\n const parsedArgs = await me._def.args.parseAsync(args, params).catch((e2) => {\n error.addIssue(makeArgsIssue(args, e2));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e2) => {\n error.addIssue(makeReturnsIssue(result, e2));\n throw error;\n });\n return parsedReturns;\n });\n } else {\n const me = this;\n return OK(function(...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new _ZodFunction({\n ...this._def,\n args: ZodTuple.create(items).rest(ZodUnknown.create())\n });\n }\n returns(returnType) {\n return new _ZodFunction({\n ...this._def,\n returns: returnType\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new _ZodFunction({\n args: args ? args : ZodTuple.create([]).rest(ZodUnknown.create()),\n returns: returns || ZodUnknown.create(),\n typeName: ZodFirstPartyTypeKind.ZodFunction,\n ...processCreateParams(params)\n });\n }\n };\n ZodLazy = class extends ZodType {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n };\n ZodLazy.create = (getter, params) => {\n return new ZodLazy({\n getter,\n typeName: ZodFirstPartyTypeKind.ZodLazy,\n ...processCreateParams(params)\n });\n };\n ZodLiteral = class extends ZodType {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_literal,\n expected: this._def.value\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n };\n ZodLiteral.create = (value, params) => {\n return new ZodLiteral({\n value,\n typeName: ZodFirstPartyTypeKind.ZodLiteral,\n ...processCreateParams(params)\n });\n };\n ZodEnum = class _ZodEnum extends ZodType {\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type\n });\n return INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(this._def.values);\n }\n if (!this._cache.has(input.data)) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values, newDef = this._def) {\n return _ZodEnum.create(values, {\n ...this._def,\n ...newDef\n });\n }\n exclude(values, newDef = this._def) {\n return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {\n ...this._def,\n ...newDef\n });\n }\n };\n ZodEnum.create = createZodEnum;\n ZodNativeEnum = class extends ZodType {\n _parse(input) {\n const nativeEnumValues = util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type\n });\n return INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(util.getValidEnumValues(this._def.values));\n }\n if (!this._cache.has(input.data)) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get enum() {\n return this._def.values;\n }\n };\n ZodNativeEnum.create = (values, params) => {\n return new ZodNativeEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n ...processCreateParams(params)\n });\n };\n ZodPromise = class extends ZodType {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.promise,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);\n return OK(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap\n });\n }));\n }\n };\n ZodPromise.create = (schema, params) => {\n return new ZodPromise({\n type: schema,\n typeName: ZodFirstPartyTypeKind.ZodPromise,\n ...processCreateParams(params)\n });\n };\n ZodEffects = class extends ZodType {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects ? this._def.schema.sourceType() : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n addIssueToContext(ctx, arg);\n if (arg.fatal) {\n status.abort();\n } else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n }\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(processed).then(async (processed2) => {\n if (status.value === \"aborted\")\n return INVALID;\n const result = await this._def.schema._parseAsync({\n data: processed2,\n path: ctx.path,\n parent: ctx\n });\n if (result.status === \"aborted\")\n return INVALID;\n if (result.status === \"dirty\")\n return DIRTY(result.value);\n if (status.value === \"dirty\")\n return DIRTY(result.value);\n return result;\n });\n } else {\n if (status.value === \"aborted\")\n return INVALID;\n const result = this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx\n });\n if (result.status === \"aborted\")\n return INVALID;\n if (result.status === \"dirty\")\n return DIRTY(result.value);\n if (status.value === \"dirty\")\n return DIRTY(result.value);\n return result;\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n } else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => {\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base4 = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (!isValid(base4))\n return INVALID;\n const result = effect.transform(base4.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n } else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base4) => {\n if (!isValid(base4))\n return INVALID;\n return Promise.resolve(effect.transform(base4.value, checkCtx)).then((result) => ({\n status: status.value,\n value: result\n }));\n });\n }\n }\n util.assertNever(effect);\n }\n };\n ZodEffects.create = (schema, effect, params) => {\n return new ZodEffects({\n schema,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect,\n ...processCreateParams(params)\n });\n };\n ZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n ...processCreateParams(params)\n });\n };\n ZodOptional = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.undefined) {\n return OK(void 0);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n ZodOptional.create = (type, params) => {\n return new ZodOptional({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodOptional,\n ...processCreateParams(params)\n });\n };\n ZodNullable = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.null) {\n return OK(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n ZodNullable.create = (type, params) => {\n return new ZodNullable({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodNullable,\n ...processCreateParams(params)\n });\n };\n ZodDefault = class extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n };\n ZodDefault.create = (type, params) => {\n return new ZodDefault({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n defaultValue: typeof params.default === \"function\" ? params.default : () => params.default,\n ...processCreateParams(params)\n });\n };\n ZodCatch = class extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n }\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx\n }\n });\n if (isAsync(result)) {\n return result.then((result2) => {\n return {\n status: \"valid\",\n value: result2.status === \"valid\" ? result2.value : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data\n })\n };\n });\n } else {\n return {\n status: \"valid\",\n value: result.status === \"valid\" ? result.value : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data\n })\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n };\n ZodCatch.create = (type, params) => {\n return new ZodCatch({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams(params)\n });\n };\n ZodNaN = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.nan,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n };\n ZodNaN.create = (params) => {\n return new ZodNaN({\n typeName: ZodFirstPartyTypeKind.ZodNaN,\n ...processCreateParams(params)\n });\n };\n BRAND = Symbol(\"zod_brand\");\n ZodBranded = class extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx\n });\n }\n unwrap() {\n return this._def.type;\n }\n };\n ZodPipeline = class _ZodPipeline extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return DIRTY(inResult.value);\n } else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx\n });\n }\n };\n return handleAsync();\n } else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value\n };\n } else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx\n });\n }\n }\n }\n static create(a3, b4) {\n return new _ZodPipeline({\n in: a3,\n out: b4,\n typeName: ZodFirstPartyTypeKind.ZodPipeline\n });\n }\n };\n ZodReadonly = class extends ZodType {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n const freeze = (data) => {\n if (isValid(data)) {\n data.value = Object.freeze(data.value);\n }\n return data;\n };\n return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n ZodReadonly.create = (type, params) => {\n return new ZodReadonly({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodReadonly,\n ...processCreateParams(params)\n });\n };\n late = {\n object: ZodObject.lazycreate\n };\n (function(ZodFirstPartyTypeKind2) {\n ZodFirstPartyTypeKind2[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind2[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind2[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind2[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind2[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind2[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind2[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind2[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind2[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind2[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind2[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind2[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind2[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind2[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind2[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind2[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind2[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind2[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind2[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind2[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind2[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind2[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind2[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind2[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind2[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind2[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind2[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind2[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind2[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind2[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind2[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind2[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind2[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind2[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind2[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind2[\"ZodReadonly\"] = \"ZodReadonly\";\n })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\n instanceOfType = (cls, params = {\n message: `Input not instance of ${cls.name}`\n }) => custom2((data) => data instanceof cls, params);\n stringType = ZodString.create;\n numberType = ZodNumber.create;\n nanType = ZodNaN.create;\n bigIntType = ZodBigInt.create;\n booleanType = ZodBoolean.create;\n dateType = ZodDate.create;\n symbolType = ZodSymbol.create;\n undefinedType = ZodUndefined.create;\n nullType = ZodNull.create;\n anyType = ZodAny.create;\n unknownType = ZodUnknown.create;\n neverType = ZodNever.create;\n voidType = ZodVoid.create;\n arrayType = ZodArray.create;\n objectType = ZodObject.create;\n strictObjectType = ZodObject.strictCreate;\n unionType = ZodUnion.create;\n discriminatedUnionType = ZodDiscriminatedUnion.create;\n intersectionType = ZodIntersection.create;\n tupleType = ZodTuple.create;\n recordType = ZodRecord.create;\n mapType = ZodMap.create;\n setType = ZodSet.create;\n functionType = ZodFunction.create;\n lazyType = ZodLazy.create;\n literalType = ZodLiteral.create;\n enumType = ZodEnum.create;\n nativeEnumType = ZodNativeEnum.create;\n promiseType = ZodPromise.create;\n effectsType = ZodEffects.create;\n optionalType = ZodOptional.create;\n nullableType = ZodNullable.create;\n preprocessType = ZodEffects.createWithPreprocess;\n pipelineType = ZodPipeline.create;\n ostring = () => stringType().optional();\n onumber = () => numberType().optional();\n oboolean = () => booleanType().optional();\n coerce = {\n string: (arg) => ZodString.create({ ...arg, coerce: true }),\n number: (arg) => ZodNumber.create({ ...arg, coerce: true }),\n boolean: (arg) => ZodBoolean.create({\n ...arg,\n coerce: true\n }),\n bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),\n date: (arg) => ZodDate.create({ ...arg, coerce: true })\n };\n NEVER = INVALID;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/external.js\n var external_exports = {};\n __export(external_exports, {\n BRAND: () => BRAND,\n DIRTY: () => DIRTY,\n EMPTY_PATH: () => EMPTY_PATH,\n INVALID: () => INVALID,\n NEVER: () => NEVER,\n OK: () => OK,\n ParseStatus: () => ParseStatus,\n Schema: () => ZodType,\n ZodAny: () => ZodAny,\n ZodArray: () => ZodArray,\n ZodBigInt: () => ZodBigInt,\n ZodBoolean: () => ZodBoolean,\n ZodBranded: () => ZodBranded,\n ZodCatch: () => ZodCatch,\n ZodDate: () => ZodDate,\n ZodDefault: () => ZodDefault,\n ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,\n ZodEffects: () => ZodEffects,\n ZodEnum: () => ZodEnum,\n ZodError: () => ZodError,\n ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,\n ZodFunction: () => ZodFunction,\n ZodIntersection: () => ZodIntersection,\n ZodIssueCode: () => ZodIssueCode,\n ZodLazy: () => ZodLazy,\n ZodLiteral: () => ZodLiteral,\n ZodMap: () => ZodMap,\n ZodNaN: () => ZodNaN,\n ZodNativeEnum: () => ZodNativeEnum,\n ZodNever: () => ZodNever,\n ZodNull: () => ZodNull,\n ZodNullable: () => ZodNullable,\n ZodNumber: () => ZodNumber,\n ZodObject: () => ZodObject,\n ZodOptional: () => ZodOptional,\n ZodParsedType: () => ZodParsedType,\n ZodPipeline: () => ZodPipeline,\n ZodPromise: () => ZodPromise,\n ZodReadonly: () => ZodReadonly,\n ZodRecord: () => ZodRecord,\n ZodSchema: () => ZodType,\n ZodSet: () => ZodSet,\n ZodString: () => ZodString,\n ZodSymbol: () => ZodSymbol,\n ZodTransformer: () => ZodEffects,\n ZodTuple: () => ZodTuple,\n ZodType: () => ZodType,\n ZodUndefined: () => ZodUndefined,\n ZodUnion: () => ZodUnion,\n ZodUnknown: () => ZodUnknown,\n ZodVoid: () => ZodVoid,\n addIssueToContext: () => addIssueToContext,\n any: () => anyType,\n array: () => arrayType,\n bigint: () => bigIntType,\n boolean: () => booleanType,\n coerce: () => coerce,\n custom: () => custom2,\n date: () => dateType,\n datetimeRegex: () => datetimeRegex,\n defaultErrorMap: () => en_default,\n discriminatedUnion: () => discriminatedUnionType,\n effect: () => effectsType,\n enum: () => enumType,\n function: () => functionType,\n getErrorMap: () => getErrorMap,\n getParsedType: () => getParsedType,\n instanceof: () => instanceOfType,\n intersection: () => intersectionType,\n isAborted: () => isAborted,\n isAsync: () => isAsync,\n isDirty: () => isDirty,\n isValid: () => isValid,\n late: () => late,\n lazy: () => lazyType,\n literal: () => literalType,\n makeIssue: () => makeIssue,\n map: () => mapType,\n nan: () => nanType,\n nativeEnum: () => nativeEnumType,\n never: () => neverType,\n null: () => nullType,\n nullable: () => nullableType,\n number: () => numberType,\n object: () => objectType,\n objectUtil: () => objectUtil,\n oboolean: () => oboolean,\n onumber: () => onumber,\n optional: () => optionalType,\n ostring: () => ostring,\n pipeline: () => pipelineType,\n preprocess: () => preprocessType,\n promise: () => promiseType,\n quotelessJson: () => quotelessJson,\n record: () => recordType,\n set: () => setType,\n setErrorMap: () => setErrorMap,\n strictObject: () => strictObjectType,\n string: () => stringType,\n symbol: () => symbolType,\n transformer: () => effectsType,\n tuple: () => tupleType,\n undefined: () => undefinedType,\n union: () => unionType,\n unknown: () => unknownType,\n util: () => util,\n void: () => voidType\n });\n var init_external = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/external.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors5();\n init_parseUtil();\n init_typeAliases();\n init_util();\n init_types2();\n init_ZodError();\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/index.js\n var v3_default;\n var init_v3 = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_external();\n init_external();\n v3_default = external_exports;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/index.js\n var esm_default;\n var init_esm5 = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v3();\n init_v3();\n esm_default = v3_default;\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/schema.js\n function isBigNumberish(x4) {\n return x4 != null && BigNumberishSchema.safeParse(x4).success;\n }\n function isMultiplier(x4) {\n return x4 != null && MultiplierSchema.safeParse(x4).success;\n }\n var ChainSchema, HexSchema, BigNumberishSchema, BigNumberishRangeSchema, MultiplierSchema;\n var init_schema = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/schema.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm5();\n ChainSchema = external_exports.custom((chain2) => chain2 != null && typeof chain2 === \"object\" && \"id\" in chain2 && typeof chain2.id === \"number\");\n HexSchema = external_exports.custom((val) => {\n return isHex(val, { strict: true });\n });\n BigNumberishSchema = external_exports.union([HexSchema, external_exports.number(), external_exports.bigint()]);\n BigNumberishRangeSchema = external_exports.object({\n min: BigNumberishSchema.optional(),\n max: BigNumberishSchema.optional()\n }).strict();\n MultiplierSchema = external_exports.object({\n /**\n * Multiplier value with max precision of 4 decimal places\n */\n multiplier: external_exports.number().refine((n2) => {\n return (n2.toString().split(\".\")[1]?.length ?? 0) <= 4;\n }, { message: \"Max precision is 4 decimal places\" })\n }).strict();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/bigint.js\n var bigIntMax, bigIntClamp, RoundingMode, bigIntMultiply;\n var init_bigint = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/bigint.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_schema();\n bigIntMax = (...args) => {\n if (!args.length) {\n throw new Error(\"bigIntMax requires at least one argument\");\n }\n return args.reduce((m2, c4) => m2 > c4 ? m2 : c4);\n };\n bigIntClamp = (value, lower, upper) => {\n lower = lower != null ? BigInt(lower) : null;\n upper = upper != null ? BigInt(upper) : null;\n if (upper != null && lower != null && upper < lower) {\n throw new Error(`invalid range: upper bound ${upper} is less than lower bound ${lower}`);\n }\n let ret = BigInt(value);\n if (lower != null && lower > ret) {\n ret = lower;\n }\n if (upper != null && upper < ret) {\n ret = upper;\n }\n return ret;\n };\n (function(RoundingMode2) {\n RoundingMode2[RoundingMode2[\"ROUND_DOWN\"] = 0] = \"ROUND_DOWN\";\n RoundingMode2[RoundingMode2[\"ROUND_UP\"] = 1] = \"ROUND_UP\";\n })(RoundingMode || (RoundingMode = {}));\n bigIntMultiply = (base4, multiplier, roundingMode = RoundingMode.ROUND_UP) => {\n if (!isMultiplier({ multiplier })) {\n throw new Error(\"bigIntMultiply requires a multiplier validated number as the second argument\");\n }\n const decimalPlaces = multiplier.toString().split(\".\")[1]?.length ?? 0;\n const val = roundingMode === RoundingMode.ROUND_UP ? BigInt(base4) * BigInt(Math.round(multiplier * 10 ** decimalPlaces)) + BigInt(10 ** decimalPlaces - 1) : BigInt(base4) * BigInt(Math.round(multiplier * 10 ** decimalPlaces));\n return val / BigInt(10 ** decimalPlaces);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/bytes.js\n var takeBytes;\n var init_bytes3 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n takeBytes = (bytes, opts = {}) => {\n const { offset, count } = opts;\n const start = (offset ? offset * 2 : 0) + 2;\n const end = count ? start + count * 2 : void 0;\n return `0x${bytes.slice(start, end)}`;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/contracts.js\n var contracts;\n var init_contracts2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/contracts.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n contracts = {\n gasPriceOracle: { address: \"0x420000000000000000000000000000000000000F\" },\n l1Block: { address: \"0x4200000000000000000000000000000000000015\" },\n l2CrossDomainMessenger: {\n address: \"0x4200000000000000000000000000000000000007\"\n },\n l2Erc721Bridge: { address: \"0x4200000000000000000000000000000000000014\" },\n l2StandardBridge: { address: \"0x4200000000000000000000000000000000000010\" },\n l2ToL1MessagePasser: {\n address: \"0x4200000000000000000000000000000000000016\"\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/formatters.js\n var formatters;\n var init_formatters = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/formatters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_block2();\n init_transaction2();\n init_transactionReceipt();\n formatters = {\n block: /* @__PURE__ */ defineBlock({\n format(args) {\n const transactions = args.transactions?.map((transaction) => {\n if (typeof transaction === \"string\")\n return transaction;\n const formatted = formatTransaction(transaction);\n if (formatted.typeHex === \"0x7e\") {\n formatted.isSystemTx = transaction.isSystemTx;\n formatted.mint = transaction.mint ? hexToBigInt(transaction.mint) : void 0;\n formatted.sourceHash = transaction.sourceHash;\n formatted.type = \"deposit\";\n }\n return formatted;\n });\n return {\n transactions,\n stateRoot: args.stateRoot\n };\n }\n }),\n transaction: /* @__PURE__ */ defineTransaction({\n format(args) {\n const transaction = {};\n if (args.type === \"0x7e\") {\n transaction.isSystemTx = args.isSystemTx;\n transaction.mint = args.mint ? hexToBigInt(args.mint) : void 0;\n transaction.sourceHash = args.sourceHash;\n transaction.type = \"deposit\";\n }\n return transaction;\n }\n }),\n transactionReceipt: /* @__PURE__ */ defineTransactionReceipt({\n format(args) {\n return {\n l1GasPrice: args.l1GasPrice ? hexToBigInt(args.l1GasPrice) : null,\n l1GasUsed: args.l1GasUsed ? hexToBigInt(args.l1GasUsed) : null,\n l1Fee: args.l1Fee ? hexToBigInt(args.l1Fee) : null,\n l1FeeScalar: args.l1FeeScalar ? Number(args.l1FeeScalar) : null\n };\n }\n })\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/serializers.js\n function serializeTransaction2(transaction, signature) {\n if (isDeposit(transaction))\n return serializeTransactionDeposit(transaction);\n return serializeTransaction(transaction, signature);\n }\n function serializeTransactionDeposit(transaction) {\n assertTransactionDeposit(transaction);\n const { sourceHash, data, from: from14, gas, isSystemTx, mint, to, value } = transaction;\n const serializedTransaction = [\n sourceHash,\n from14,\n to ?? \"0x\",\n mint ? toHex(mint) : \"0x\",\n value ? toHex(value) : \"0x\",\n gas ? toHex(gas) : \"0x\",\n isSystemTx ? \"0x1\" : \"0x\",\n data ?? \"0x\"\n ];\n return concatHex([\n \"0x7e\",\n toRlp(serializedTransaction)\n ]);\n }\n function isDeposit(transaction) {\n if (transaction.type === \"deposit\")\n return true;\n if (typeof transaction.sourceHash !== \"undefined\")\n return true;\n return false;\n }\n function assertTransactionDeposit(transaction) {\n const { from: from14, to } = transaction;\n if (from14 && !isAddress(from14))\n throw new InvalidAddressError({ address: from14 });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n }\n var serializers;\n var init_serializers = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/serializers.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_isAddress();\n init_concat();\n init_toHex();\n init_toRlp();\n init_serializeTransaction();\n serializers = {\n transaction: serializeTransaction2\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/chainConfig.js\n var chainConfig;\n var init_chainConfig = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/chainConfig.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_contracts2();\n init_formatters();\n init_serializers();\n chainConfig = {\n blockTime: 2e3,\n contracts,\n formatters,\n serializers\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrum.js\n var arbitrum;\n var init_arbitrum = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrum.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n arbitrum = /* @__PURE__ */ defineChain({\n id: 42161,\n name: \"Arbitrum One\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n blockTime: 250,\n rpcUrls: {\n default: {\n http: [\"https://arb1.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Arbiscan\",\n url: \"https://arbiscan.io\",\n apiUrl: \"https://api.arbiscan.io/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 7654707\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumGoerli.js\n var arbitrumGoerli;\n var init_arbitrumGoerli = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumGoerli.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n arbitrumGoerli = /* @__PURE__ */ defineChain({\n id: 421613,\n name: \"Arbitrum Goerli\",\n nativeCurrency: {\n name: \"Arbitrum Goerli Ether\",\n symbol: \"ETH\",\n decimals: 18\n },\n rpcUrls: {\n default: {\n http: [\"https://goerli-rollup.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Arbiscan\",\n url: \"https://goerli.arbiscan.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 88114\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumNova.js\n var arbitrumNova;\n var init_arbitrumNova = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumNova.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n arbitrumNova = /* @__PURE__ */ defineChain({\n id: 42170,\n name: \"Arbitrum Nova\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://nova.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Arbiscan\",\n url: \"https://nova.arbiscan.io\",\n apiUrl: \"https://api-nova.arbiscan.io/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1746963\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumSepolia.js\n var arbitrumSepolia;\n var init_arbitrumSepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumSepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n arbitrumSepolia = /* @__PURE__ */ defineChain({\n id: 421614,\n name: \"Arbitrum Sepolia\",\n blockTime: 250,\n nativeCurrency: {\n name: \"Arbitrum Sepolia Ether\",\n symbol: \"ETH\",\n decimals: 18\n },\n rpcUrls: {\n default: {\n http: [\"https://sepolia-rollup.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Arbiscan\",\n url: \"https://sepolia.arbiscan.io\",\n apiUrl: \"https://api-sepolia.arbiscan.io/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 81930\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/base.js\n var sourceId, base, basePreconf;\n var init_base3 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId = 1;\n base = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 8453,\n name: \"Base\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.base.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Basescan\",\n url: \"https://basescan.org\",\n apiUrl: \"https://api.basescan.org/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: \"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e\"\n }\n },\n l2OutputOracle: {\n [sourceId]: {\n address: \"0x56315b90c40730925ec5485cf004d835058518A0\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 5022\n },\n portal: {\n [sourceId]: {\n address: \"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e\",\n blockCreated: 17482143\n }\n },\n l1StandardBridge: {\n [sourceId]: {\n address: \"0x3154Cf16ccdb4C6d922629664174b904d80F2C35\",\n blockCreated: 17482143\n }\n }\n },\n sourceId\n });\n basePreconf = /* @__PURE__ */ defineChain({\n ...base,\n experimental_preconfirmationTime: 200,\n rpcUrls: {\n default: {\n http: [\"https://mainnet-preconf.base.org\"]\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/baseGoerli.js\n var sourceId2, baseGoerli;\n var init_baseGoerli = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/baseGoerli.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId2 = 5;\n baseGoerli = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 84531,\n name: \"Base Goerli\",\n nativeCurrency: { name: \"Goerli Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: { http: [\"https://goerli.base.org\"] }\n },\n blockExplorers: {\n default: {\n name: \"Basescan\",\n url: \"https://goerli.basescan.org\",\n apiUrl: \"https://goerli.basescan.org/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId2]: {\n address: \"0x2A35891ff30313CcFa6CE88dcf3858bb075A2298\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1376988\n },\n portal: {\n [sourceId2]: {\n address: \"0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA\"\n }\n },\n l1StandardBridge: {\n [sourceId2]: {\n address: \"0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a\"\n }\n }\n },\n testnet: true,\n sourceId: sourceId2\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/baseSepolia.js\n var sourceId3, baseSepolia, baseSepoliaPreconf;\n var init_baseSepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/baseSepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId3 = 11155111;\n baseSepolia = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 84532,\n network: \"base-sepolia\",\n name: \"Base Sepolia\",\n nativeCurrency: { name: \"Sepolia Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://sepolia.base.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Basescan\",\n url: \"https://sepolia.basescan.org\",\n apiUrl: \"https://api-sepolia.basescan.org/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId3]: {\n address: \"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1\"\n }\n },\n l2OutputOracle: {\n [sourceId3]: {\n address: \"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254\"\n }\n },\n portal: {\n [sourceId3]: {\n address: \"0x49f53e41452c74589e85ca1677426ba426459e85\",\n blockCreated: 4446677\n }\n },\n l1StandardBridge: {\n [sourceId3]: {\n address: \"0xfd0Bf71F60660E2f608ed56e1659C450eB113120\",\n blockCreated: 4446677\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1059647\n }\n },\n testnet: true,\n sourceId: sourceId3\n });\n baseSepoliaPreconf = /* @__PURE__ */ defineChain({\n ...baseSepolia,\n experimental_preconfirmationTime: 200,\n rpcUrls: {\n default: {\n http: [\"https://sepolia-preconf.base.org\"]\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/fraxtal.js\n var sourceId4, fraxtal;\n var init_fraxtal = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/fraxtal.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId4 = 1;\n fraxtal = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 252,\n name: \"Fraxtal\",\n nativeCurrency: { name: \"Frax\", symbol: \"FRAX\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.frax.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"fraxscan\",\n url: \"https://fraxscan.com\",\n apiUrl: \"https://api.fraxscan.com/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId4]: {\n address: \"0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\"\n },\n portal: {\n [sourceId4]: {\n address: \"0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D\",\n blockCreated: 19135323\n }\n },\n l1StandardBridge: {\n [sourceId4]: {\n address: \"0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2\",\n blockCreated: 19135323\n }\n }\n },\n sourceId: sourceId4\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/goerli.js\n var goerli;\n var init_goerli = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/goerli.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n goerli = /* @__PURE__ */ defineChain({\n id: 5,\n name: \"Goerli\",\n nativeCurrency: { name: \"Goerli Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://5.rpc.thirdweb.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Etherscan\",\n url: \"https://goerli.etherscan.io\",\n apiUrl: \"https://api-goerli.etherscan.io/api\"\n }\n },\n contracts: {\n ensRegistry: {\n address: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\"\n },\n ensUniversalResolver: {\n address: \"0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1\",\n blockCreated: 10339206\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 6507670\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/mainnet.js\n var mainnet;\n var init_mainnet = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/mainnet.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n mainnet = /* @__PURE__ */ defineChain({\n id: 1,\n name: \"Ethereum\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n blockTime: 12e3,\n rpcUrls: {\n default: {\n http: [\"https://eth.merkle.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Etherscan\",\n url: \"https://etherscan.io\",\n apiUrl: \"https://api.etherscan.io/api\"\n }\n },\n contracts: {\n ensUniversalResolver: {\n address: \"0xeeeeeeee14d718c2b47d9923deab1335e144eeee\",\n blockCreated: 23085558\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 14353601\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimism.js\n var sourceId5, optimism;\n var init_optimism = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimism.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId5 = 1;\n optimism = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 10,\n name: \"OP Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.optimism.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Optimism Explorer\",\n url: \"https://optimistic.etherscan.io\",\n apiUrl: \"https://api-optimistic.etherscan.io/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId5]: {\n address: \"0xe5965Ab5962eDc7477C8520243A95517CD252fA9\"\n }\n },\n l2OutputOracle: {\n [sourceId5]: {\n address: \"0xdfe97868233d1aa22e815a266982f2cf17685a27\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 4286263\n },\n portal: {\n [sourceId5]: {\n address: \"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed\"\n }\n },\n l1StandardBridge: {\n [sourceId5]: {\n address: \"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1\"\n }\n }\n },\n sourceId: sourceId5\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimismGoerli.js\n var sourceId6, optimismGoerli;\n var init_optimismGoerli = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimismGoerli.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId6 = 5;\n optimismGoerli = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 420,\n name: \"Optimism Goerli\",\n nativeCurrency: { name: \"Goerli Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://goerli.optimism.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Etherscan\",\n url: \"https://goerli-optimism.etherscan.io\",\n apiUrl: \"https://goerli-optimism.etherscan.io/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId6]: {\n address: \"0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 49461\n },\n portal: {\n [sourceId6]: {\n address: \"0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383\"\n }\n },\n l1StandardBridge: {\n [sourceId6]: {\n address: \"0x636Af16bf2f682dD3109e60102b8E1A089FedAa8\"\n }\n }\n },\n testnet: true,\n sourceId: sourceId6\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimismSepolia.js\n var sourceId7, optimismSepolia;\n var init_optimismSepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimismSepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId7 = 11155111;\n optimismSepolia = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 11155420,\n name: \"OP Sepolia\",\n nativeCurrency: { name: \"Sepolia Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://sepolia.optimism.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Blockscout\",\n url: \"https://optimism-sepolia.blockscout.com\",\n apiUrl: \"https://optimism-sepolia.blockscout.com/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId7]: {\n address: \"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1\"\n }\n },\n l2OutputOracle: {\n [sourceId7]: {\n address: \"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1620204\n },\n portal: {\n [sourceId7]: {\n address: \"0x16Fc5058F25648194471939df75CF27A2fdC48BC\"\n }\n },\n l1StandardBridge: {\n [sourceId7]: {\n address: \"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1\"\n }\n }\n },\n testnet: true,\n sourceId: sourceId7\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygon.js\n var polygon;\n var init_polygon = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygon.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n polygon = /* @__PURE__ */ defineChain({\n id: 137,\n name: \"Polygon\",\n blockTime: 2e3,\n nativeCurrency: { name: \"POL\", symbol: \"POL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://polygon-rpc.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"PolygonScan\",\n url: \"https://polygonscan.com\",\n apiUrl: \"https://api.polygonscan.com/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 25770160\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygonAmoy.js\n var polygonAmoy;\n var init_polygonAmoy = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygonAmoy.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n polygonAmoy = /* @__PURE__ */ defineChain({\n id: 80002,\n name: \"Polygon Amoy\",\n nativeCurrency: { name: \"POL\", symbol: \"POL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc-amoy.polygon.technology\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"PolygonScan\",\n url: \"https://amoy.polygonscan.com\",\n apiUrl: \"https://api-amoy.polygonscan.com/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 3127388\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygonMumbai.js\n var polygonMumbai;\n var init_polygonMumbai = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygonMumbai.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n polygonMumbai = /* @__PURE__ */ defineChain({\n id: 80001,\n name: \"Polygon Mumbai\",\n nativeCurrency: { name: \"MATIC\", symbol: \"MATIC\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://80001.rpc.thirdweb.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"PolygonScan\",\n url: \"https://mumbai.polygonscan.com\",\n apiUrl: \"https://api-testnet.polygonscan.com/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 25770160\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/sepolia.js\n var sepolia;\n var init_sepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/sepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n sepolia = /* @__PURE__ */ defineChain({\n id: 11155111,\n name: \"Sepolia\",\n nativeCurrency: { name: \"Sepolia Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://11155111.rpc.thirdweb.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Etherscan\",\n url: \"https://sepolia.etherscan.io\",\n apiUrl: \"https://api-sepolia.etherscan.io/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 751532\n },\n ensUniversalResolver: {\n address: \"0xeeeeeeee14d718c2b47d9923deab1335e144eeee\",\n blockCreated: 8928790\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/zora.js\n var sourceId8, zora;\n var init_zora = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/zora.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId8 = 1;\n zora = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 7777777,\n name: \"Zora\",\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.zora.energy\"],\n webSocket: [\"wss://rpc.zora.energy\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Explorer\",\n url: \"https://explorer.zora.energy\",\n apiUrl: \"https://explorer.zora.energy/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId8]: {\n address: \"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c\"\n }\n },\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 5882\n },\n portal: {\n [sourceId8]: {\n address: \"0x1a0ad011913A150f69f6A19DF447A0CfD9551054\"\n }\n },\n l1StandardBridge: {\n [sourceId8]: {\n address: \"0x3e2Ea9B92B7E48A52296fD261dc26fd995284631\"\n }\n }\n },\n sourceId: sourceId8\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/zoraSepolia.js\n var sourceId9, zoraSepolia;\n var init_zoraSepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/zoraSepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId9 = 11155111;\n zoraSepolia = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 999999999,\n name: \"Zora Sepolia\",\n network: \"zora-sepolia\",\n nativeCurrency: {\n decimals: 18,\n name: \"Zora Sepolia\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: {\n http: [\"https://sepolia.rpc.zora.energy\"],\n webSocket: [\"wss://sepolia.rpc.zora.energy\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Zora Sepolia Explorer\",\n url: \"https://sepolia.explorer.zora.energy/\",\n apiUrl: \"https://sepolia.explorer.zora.energy/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId9]: {\n address: \"0x2615B481Bd3E5A1C0C7Ca3Da1bdc663E8615Ade9\"\n }\n },\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 83160\n },\n portal: {\n [sourceId9]: {\n address: \"0xeffE2C6cA9Ab797D418f0D91eA60807713f3536f\"\n }\n },\n l1StandardBridge: {\n [sourceId9]: {\n address: \"0x5376f1D543dcbB5BD416c56C189e4cB7399fCcCB\"\n }\n }\n },\n sourceId: sourceId9,\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/index.js\n var init_chains = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_arbitrum();\n init_arbitrumGoerli();\n init_arbitrumNova();\n init_arbitrumSepolia();\n init_base3();\n init_baseGoerli();\n init_baseSepolia();\n init_fraxtal();\n init_goerli();\n init_mainnet();\n init_optimism();\n init_optimismGoerli();\n init_optimismSepolia();\n init_polygon();\n init_polygonAmoy();\n init_polygonMumbai();\n init_sepolia();\n init_zora();\n init_zoraSepolia();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/defaults.js\n var minPriorityFeePerBidDefaults;\n var init_defaults = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/defaults.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains();\n minPriorityFeePerBidDefaults = /* @__PURE__ */ new Map([\n [arbitrum.id, 10000000n],\n [arbitrumGoerli.id, 10000000n],\n [arbitrumSepolia.id, 10000000n]\n ]);\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/userop.js\n function isValidRequest(request) {\n return request.callGasLimit != null && request.preVerificationGas != null && request.verificationGasLimit != null && request.maxFeePerGas != null && request.maxPriorityFeePerGas != null && isValidPaymasterAndData(request) && isValidFactoryAndData(request);\n }\n function isValidPaymasterAndData(request) {\n if (\"paymasterAndData\" in request) {\n return request.paymasterAndData != null;\n }\n return allEqual(request.paymaster == null, request.paymasterData == null, request.paymasterPostOpGasLimit == null, request.paymasterVerificationGasLimit == null);\n }\n function isValidFactoryAndData(request) {\n if (\"initCode\" in request) {\n const { initCode } = request;\n return initCode != null;\n }\n return allEqual(request.factory == null, request.factoryData == null);\n }\n function applyUserOpOverride(value, override) {\n if (override == null) {\n return value;\n }\n if (isBigNumberish(override)) {\n return override;\n } else {\n return value != null ? bigIntMultiply(value, override.multiplier) : value;\n }\n }\n function applyUserOpFeeOption(value, feeOption) {\n if (feeOption == null) {\n return value;\n }\n return value != null ? bigIntClamp(feeOption.multiplier ? bigIntMultiply(value, feeOption.multiplier) : value, feeOption.min, feeOption.max) : feeOption.min ?? 0n;\n }\n function applyUserOpOverrideOrFeeOption(value, override, feeOption) {\n return value != null && override != null ? applyUserOpOverride(value, override) : applyUserOpFeeOption(value, feeOption);\n }\n var bypassPaymasterAndData;\n var init_userop = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/userop.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_bigint();\n init_utils9();\n bypassPaymasterAndData = (overrides) => !!overrides && (\"paymasterAndData\" in overrides || \"paymasterData\" in overrides);\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/index.js\n async function resolveProperties(object) {\n const promises = Object.keys(object).map((key) => {\n const value = object[key];\n return Promise.resolve(value).then((v2) => ({ key, value: v2 }));\n });\n const results = await Promise.all(promises);\n return filterUndefined(results.reduce((accum, curr) => {\n accum[curr.key] = curr.value;\n return accum;\n }, {}));\n }\n function deepHexlify(obj) {\n if (typeof obj === \"function\") {\n return void 0;\n }\n if (obj == null || typeof obj === \"string\" || typeof obj === \"boolean\") {\n return obj;\n } else if (typeof obj === \"bigint\") {\n return toHex(obj);\n } else if (obj._isBigNumber != null || typeof obj !== \"object\") {\n return toHex(obj).replace(/^0x0/, \"0x\");\n }\n if (Array.isArray(obj)) {\n return obj.map((member) => deepHexlify(member));\n }\n return Object.keys(obj).reduce((set, key) => ({\n ...set,\n [key]: deepHexlify(obj[key])\n }), {});\n }\n function filterUndefined(obj) {\n for (const key in obj) {\n if (obj[key] == null) {\n delete obj[key];\n }\n }\n return obj;\n }\n var allEqual, conditionalReturn;\n var init_utils9 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_bigint();\n init_bytes3();\n init_defaults();\n init_schema();\n init_userop();\n allEqual = (...params) => {\n if (params.length === 0) {\n throw new Error(\"no values passed in\");\n }\n return params.every((v2) => v2 === params[0]);\n };\n conditionalReturn = (condition, value) => condition.then((t3) => t3 ? value() : void 0);\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js\n async function buildUserOperationFromTxs(client_, args) {\n const client = clientHeaderTrack(client_, \"buildUserOperationFromTxs\");\n const { account = client.account, requests, overrides, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"buildUserOperationFromTxs\", client);\n }\n const batch = requests.map((request) => {\n if (!request.to) {\n throw new TransactionMissingToParamError();\n }\n return {\n target: request.to,\n data: request.data ?? \"0x\",\n value: request.value ? fromHex(request.value, \"bigint\") : 0n\n };\n });\n const mfpgOverridesInTx = () => requests.filter((x4) => x4.maxFeePerGas != null).map((x4) => fromHex(x4.maxFeePerGas, \"bigint\"));\n const maxFeePerGas = overrides?.maxFeePerGas != null ? overrides?.maxFeePerGas : mfpgOverridesInTx().length > 0 ? bigIntMax(...mfpgOverridesInTx()) : void 0;\n const mpfpgOverridesInTx = () => requests.filter((x4) => x4.maxPriorityFeePerGas != null).map((x4) => fromHex(x4.maxPriorityFeePerGas, \"bigint\"));\n const maxPriorityFeePerGas = overrides?.maxPriorityFeePerGas != null ? overrides?.maxPriorityFeePerGas : mpfpgOverridesInTx().length > 0 ? bigIntMax(...mpfpgOverridesInTx()) : void 0;\n const _overrides = {\n maxFeePerGas,\n maxPriorityFeePerGas\n };\n const uoStruct = await buildUserOperation(client, {\n uo: batch,\n account,\n context: context2,\n overrides: _overrides\n });\n return {\n uoStruct,\n // TODO: in v4 major version update, remove these as below parameters are not needed\n batch,\n overrides: _overrides\n };\n }\n var init_buildUserOperationFromTxs = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_transaction3();\n init_utils9();\n init_buildUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js\n function checkGasSponsorshipEligibility(client_, args) {\n const client = clientHeaderTrack(client_, \"checkGasSponsorshipEligibility\");\n const { account = client.account, overrides, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"checkGasSponsorshipEligibility\", client);\n }\n return buildUserOperation(client, {\n uo: args.uo,\n account,\n overrides,\n context: context2\n }).then((userOperationStruct) => ({\n eligible: account.getEntryPoint().version === \"0.6.0\" ? userOperationStruct.paymasterAndData !== \"0x\" && userOperationStruct.paymasterAndData !== null : userOperationStruct.paymasterData !== \"0x\" && userOperationStruct.paymasterData !== null,\n request: userOperationStruct\n })).catch(() => ({\n eligible: false\n }));\n }\n var init_checkGasSponsorshipEligibility = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_buildUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/noopMiddleware.js\n var noopMiddleware;\n var init_noopMiddleware = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/noopMiddleware.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n noopMiddleware = async (args) => {\n return args;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js\n async function _runMiddlewareStack(client, args) {\n const { uo, overrides, account = client.account, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const { dummyPaymasterAndData, paymasterAndData } = bypassPaymasterAndData(overrides) ? {\n dummyPaymasterAndData: async (uo2, { overrides: overrides2 }) => {\n return {\n ...uo2,\n ...\"paymasterAndData\" in overrides2 ? { paymasterAndData: overrides2.paymasterAndData } : \"paymasterData\" in overrides2 && \"paymaster\" in overrides2 && overrides2.paymasterData !== \"0x\" ? {\n paymasterData: overrides2.paymasterData,\n paymaster: overrides2.paymaster\n } : (\n // At this point, nothing has run so no fields are set\n // for 0.7 when not using a paymaster, all fields should be undefined\n void 0\n )\n };\n },\n paymasterAndData: noopMiddleware\n } : {\n dummyPaymasterAndData: client.middleware.dummyPaymasterAndData,\n paymasterAndData: client.middleware.paymasterAndData\n };\n const result = await asyncPipe(dummyPaymasterAndData, client.middleware.feeEstimator, client.middleware.gasEstimator, client.middleware.customMiddleware, paymasterAndData, client.middleware.userOperationSimulator)(uo, { overrides, feeOptions: client.feeOptions, account, client, context: context2 });\n return resolveProperties(result);\n }\n var asyncPipe;\n var init_runMiddlewareStack = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_noopMiddleware();\n init_utils9();\n asyncPipe = (...fns) => async (s4, opts) => {\n let result = s4;\n for (const fn of fns) {\n result = await fn(result, opts);\n }\n return result;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signUserOperation.js\n async function signUserOperation(client, args) {\n const { account = client.account, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"signUserOperation\", client);\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n return await client.middleware.signUserOperation(args.uoStruct, {\n ...args,\n account,\n client,\n context: context2\n }).then(resolveProperties).then(deepHexlify);\n }\n var init_signUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_utils9();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/0.7.js\n function packAccountGasLimits(data) {\n return concat(Object.values(data).map((v2) => pad(v2, { size: 16 })));\n }\n function packPaymasterData({ paymaster, paymasterVerificationGasLimit, paymasterPostOpGasLimit, paymasterData }) {\n if (!paymaster || !paymasterVerificationGasLimit || !paymasterPostOpGasLimit || !paymasterData) {\n return \"0x\";\n }\n return concat([\n paymaster,\n pad(paymasterVerificationGasLimit, { size: 16 }),\n pad(paymasterPostOpGasLimit, { size: 16 }),\n paymasterData\n ]);\n }\n var packUserOperation, __default;\n var init__ = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/0.7.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_EntryPointAbi_v7();\n packUserOperation = (request) => {\n const initCode = request.factory && request.factoryData ? concat([request.factory, request.factoryData]) : \"0x\";\n const accountGasLimits = packAccountGasLimits({\n verificationGasLimit: request.verificationGasLimit,\n callGasLimit: request.callGasLimit\n });\n const gasFees = packAccountGasLimits({\n maxPriorityFeePerGas: request.maxPriorityFeePerGas,\n maxFeePerGas: request.maxFeePerGas\n });\n const paymasterAndData = request.paymaster && isAddress(request.paymaster) ? packPaymasterData({\n paymaster: request.paymaster,\n paymasterVerificationGasLimit: request.paymasterVerificationGasLimit,\n paymasterPostOpGasLimit: request.paymasterPostOpGasLimit,\n paymasterData: request.paymasterData\n }) : \"0x\";\n return encodeAbiParameters([\n { type: \"address\" },\n { type: \"uint256\" },\n { type: \"bytes32\" },\n { type: \"bytes32\" },\n { type: \"bytes32\" },\n { type: \"uint256\" },\n { type: \"bytes32\" },\n { type: \"bytes32\" }\n ], [\n request.sender,\n hexToBigInt(request.nonce),\n keccak256(initCode),\n keccak256(request.callData),\n accountGasLimits,\n hexToBigInt(request.preVerificationGas),\n gasFees,\n keccak256(paymasterAndData)\n ]);\n };\n __default = {\n version: \"0.7.0\",\n address: {\n default: \"0x0000000071727De22E5E9d8BAf0edAc6f37da032\"\n },\n abi: EntryPointAbi_v7,\n getUserOperationHash: (request, entryPointAddress, chainId) => {\n const encoded = encodeAbiParameters([{ type: \"bytes32\" }, { type: \"address\" }, { type: \"uint256\" }], [\n keccak256(packUserOperation(request)),\n entryPointAddress,\n BigInt(chainId)\n ]);\n return keccak256(encoded);\n },\n packUserOperation\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/getUserOperationError.js\n async function getUserOperationError(client, request, entryPoint) {\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n const uo = deepHexlify(request);\n try {\n switch (entryPoint.version) {\n case \"0.6.0\":\n break;\n case \"0.7.0\":\n await client.simulateContract({\n address: entryPoint.address,\n abi: entryPoint.abi,\n functionName: \"handleOps\",\n args: [\n [\n {\n sender: client.account.address,\n nonce: fromHex(uo.nonce, \"bigint\"),\n initCode: uo.factory && uo.factoryData ? concat([uo.factory, uo.factoryData]) : \"0x\",\n callData: uo.callData,\n accountGasLimits: packAccountGasLimits({\n verificationGasLimit: uo.verificationGasLimit,\n callGasLimit: uo.callGasLimit\n }),\n preVerificationGas: fromHex(uo.preVerificationGas, \"bigint\"),\n gasFees: packAccountGasLimits({\n maxPriorityFeePerGas: uo.maxPriorityFeePerGas,\n maxFeePerGas: uo.maxFeePerGas\n }),\n paymasterAndData: uo.paymaster && isAddress(uo.paymaster) ? packPaymasterData({\n paymaster: uo.paymaster,\n paymasterVerificationGasLimit: uo.paymasterVerificationGasLimit,\n paymasterPostOpGasLimit: uo.paymasterPostOpGasLimit,\n paymasterData: uo.paymasterData\n }) : \"0x\",\n signature: uo.signature\n }\n ],\n client.account.address\n ]\n });\n }\n } catch (err) {\n if (err?.cause && err?.cause?.raw) {\n try {\n const { errorName, args } = decodeErrorResult({\n abi: entryPoint.abi,\n data: err.cause.raw\n });\n console.error(`Failed with '${errorName}':`);\n switch (errorName) {\n case \"FailedOpWithRevert\":\n case \"FailedOp\":\n const argsIdx = errorName === \"FailedOp\" ? 1 : 2;\n console.error(args && args[argsIdx] ? `Smart contract account reverted with error: ${args[argsIdx]}` : \"No revert data from smart contract account\");\n break;\n default:\n args && args.forEach((arg) => console.error(`\n${arg}`));\n }\n return;\n } catch (err2) {\n }\n }\n console.error(\"Entrypoint reverted with error: \");\n console.error(err);\n }\n }\n var init_getUserOperationError = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/getUserOperationError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_account2();\n init_utils9();\n init__();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/sendUserOperation.js\n async function _sendUserOperation(client, args) {\n const { account = client.account, uoStruct, context: context2, overrides } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const entryPoint = account.getEntryPoint();\n const request = await signUserOperation(client, {\n uoStruct,\n account,\n context: context2,\n overrides\n });\n try {\n return {\n hash: await client.sendRawUserOperation(request, entryPoint.address),\n request\n };\n } catch (err) {\n getUserOperationError(client, request, entryPoint);\n throw err;\n }\n }\n var init_sendUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/sendUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_client();\n init_signUserOperation();\n init_getUserOperationError();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js\n async function dropAndReplaceUserOperation(client_, args) {\n const client = clientHeaderTrack(client_, \"dropAndReplaceUserOperation\");\n const { account = client.account, uoToDrop, overrides, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"dropAndReplaceUserOperation\", client);\n }\n const entryPoint = account.getEntryPoint();\n const uoToSubmit = entryPoint.version === \"0.6.0\" ? {\n initCode: uoToDrop.initCode,\n sender: uoToDrop.sender,\n nonce: uoToDrop.nonce,\n callData: uoToDrop.callData,\n signature: await account.getDummySignature()\n } : {\n ...uoToDrop.factory && uoToDrop.factoryData ? {\n factory: uoToDrop.factory,\n factoryData: uoToDrop.factoryData\n } : {},\n sender: uoToDrop.sender,\n nonce: uoToDrop.nonce,\n callData: uoToDrop.callData,\n signature: await account.getDummySignature()\n };\n const { maxFeePerGas, maxPriorityFeePerGas } = await resolveProperties(await client.middleware.feeEstimator(uoToSubmit, { account, client }));\n const _overrides = {\n ...overrides,\n maxFeePerGas: bigIntMax(BigInt(maxFeePerGas ?? 0n), bigIntMultiply(uoToDrop.maxFeePerGas, 1.1)),\n maxPriorityFeePerGas: bigIntMax(BigInt(maxPriorityFeePerGas ?? 0n), bigIntMultiply(uoToDrop.maxPriorityFeePerGas, 1.1))\n };\n const uoToSend = await _runMiddlewareStack(client, {\n uo: uoToSubmit,\n overrides: _overrides,\n account\n });\n return _sendUserOperation(client, {\n uoStruct: uoToSend,\n account,\n context: context2,\n overrides: _overrides\n });\n }\n var init_dropAndReplaceUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_utils9();\n init_runMiddlewareStack();\n init_sendUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/getAddress.js\n var getAddress2;\n var init_getAddress2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/getAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n getAddress2 = (client, args) => {\n const { account } = args ?? { account: client.account };\n if (!account) {\n throw new AccountNotFoundError2();\n }\n return account.address;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/useroperation.js\n var InvalidUserOperationError, WaitForUserOperationError;\n var init_useroperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/useroperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n InvalidUserOperationError = class extends BaseError4 {\n /**\n * Creates an instance of InvalidUserOperationError.\n *\n * InvalidUserOperationError constructor\n *\n * @param {UserOperationStruct} uo the invalid user operation struct\n */\n constructor(uo) {\n super(`Request is missing parameters. All properties on UserOperationStruct must be set. uo: ${JSON.stringify(uo, (_key, value) => typeof value === \"bigint\" ? {\n type: \"bigint\",\n value: value.toString()\n } : value, 2)}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidUserOperationError\"\n });\n }\n };\n WaitForUserOperationError = class extends BaseError4 {\n /**\n * @param {UserOperationRequest} request the user operation request that failed\n * @param {Error} error the underlying error that caused the failure\n */\n constructor(request, error) {\n super(`Failed to find User Operation: ${error.message}`);\n Object.defineProperty(this, \"request\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: request\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js\n var waitForUserOperationTransaction;\n var init_waitForUserOperationTransacation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_client();\n init_transaction3();\n init_logger();\n init_esm6();\n waitForUserOperationTransaction = async (client_, args) => {\n const client = clientHeaderTrack(client_, \"waitForUserOperationTransaction\");\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"waitForUserOperationTransaction\", client);\n }\n const { hash: hash3, retries = {\n maxRetries: client.txMaxRetries,\n intervalMs: client.txRetryIntervalMs,\n multiplier: client.txRetryMultiplier\n } } = args;\n for (let i3 = 0; i3 < retries.maxRetries; i3++) {\n const txRetryIntervalWithJitterMs = retries.intervalMs * Math.pow(retries.multiplier, i3) + Math.random() * 100;\n await new Promise((resolve) => setTimeout(resolve, txRetryIntervalWithJitterMs));\n const receipt = await client.getUserOperationReceipt(hash3, args.tag).catch((e2) => {\n Logger.error(`[SmartAccountProvider] waitForUserOperationTransaction error fetching receipt for ${hash3}: ${e2}`);\n });\n if (receipt) {\n return receipt?.receipt.transactionHash;\n }\n }\n throw new FailedToFindTransactionError(hash3);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendTransaction.js\n async function sendTransaction2(client_, args, overrides, context2) {\n const client = clientHeaderTrack(client_, \"estimateUserOperationGas\");\n const { account = client.account } = args;\n if (!account || typeof account === \"string\") {\n throw new AccountNotFoundError2();\n }\n if (!args.to) {\n throw new TransactionMissingToParamError();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"sendTransaction\", client);\n }\n const uoStruct = await buildUserOperationFromTx(client, args, overrides, context2);\n const { hash: hash3, request } = await _sendUserOperation(client, {\n account,\n uoStruct,\n context: context2,\n overrides\n });\n return waitForUserOperationTransaction(client, { hash: hash3 }).catch((e2) => {\n throw new WaitForUserOperationError(request, e2);\n });\n }\n var init_sendTransaction2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_transaction3();\n init_useroperation();\n init_buildUserOperationFromTx();\n init_sendUserOperation();\n init_waitForUserOperationTransacation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendTransactions.js\n async function sendTransactions(client_, args) {\n const client = clientHeaderTrack(client_, \"estimateUserOperationGas\");\n const { requests, overrides, account = client.account, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"sendTransactions\", client);\n }\n const { uoStruct } = await buildUserOperationFromTxs(client, {\n requests,\n overrides,\n account,\n context: context2\n });\n const { hash: hash3, request } = await _sendUserOperation(client, {\n account,\n uoStruct,\n context: context2,\n overrides\n });\n return waitForUserOperationTransaction(client, { hash: hash3 }).catch((e2) => {\n throw new WaitForUserOperationError(request, e2);\n });\n }\n var init_sendTransactions = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendTransactions.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_useroperation();\n init_buildUserOperationFromTxs();\n init_sendUserOperation();\n init_waitForUserOperationTransacation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendUserOperation.js\n async function sendUserOperation(client_, args) {\n const client = clientHeaderTrack(client_, \"sendUserOperation\");\n const { account = client.account, context: context2, overrides } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"sendUserOperation\", client);\n }\n const uoStruct = await buildUserOperation(client, {\n uo: args.uo,\n account,\n context: context2,\n overrides\n });\n return _sendUserOperation(client, {\n account,\n uoStruct,\n context: context2,\n overrides\n });\n }\n var init_sendUserOperation2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_buildUserOperation();\n init_sendUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signMessage.js\n var signMessage2;\n var init_signMessage2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n signMessage2 = async (client, { account = client.account, message }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n return account.signMessageWith6492({ message });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signTypedData.js\n var signTypedData2;\n var init_signTypedData2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signTypedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n signTypedData2 = async (client, { account = client.account, typedData }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n return account.signTypedDataWith6492(typedData);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/upgradeAccount.js\n var upgradeAccount;\n var init_upgradeAccount = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/upgradeAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_sendUserOperation2();\n init_waitForUserOperationTransacation();\n init_esm6();\n upgradeAccount = async (client_, args) => {\n const client = clientHeaderTrack(client_, \"upgradeAccount\");\n const { account = client.account, upgradeTo, overrides, waitForTx, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"upgradeAccount\", client);\n }\n const { implAddress: accountImplAddress, initializationData } = upgradeTo;\n const encodeUpgradeData = await account.encodeUpgradeToAndCall({\n upgradeToAddress: accountImplAddress,\n upgradeToInitData: initializationData\n });\n const result = await sendUserOperation(client, {\n uo: {\n target: account.address,\n data: encodeUpgradeData\n },\n account,\n overrides,\n context: context2\n });\n let hash3 = result.hash;\n if (waitForTx) {\n hash3 = await waitForUserOperationTransaction(client, result);\n }\n return hash3;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/decorators/smartAccountClient.js\n var smartAccountClientActions, smartAccountClientMethodKeys;\n var init_smartAccountClient = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/decorators/smartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_buildUserOperation();\n init_buildUserOperationFromTx();\n init_buildUserOperationFromTxs();\n init_checkGasSponsorshipEligibility();\n init_dropAndReplaceUserOperation();\n init_getAddress2();\n init_sendTransaction2();\n init_sendTransactions();\n init_sendUserOperation2();\n init_signMessage2();\n init_signTypedData2();\n init_signUserOperation();\n init_upgradeAccount();\n init_waitForUserOperationTransacation();\n smartAccountClientActions = (client) => ({\n buildUserOperation: (args) => buildUserOperation(client, args),\n buildUserOperationFromTx: (args, overrides, context2) => buildUserOperationFromTx(client, args, overrides, context2),\n buildUserOperationFromTxs: (args) => buildUserOperationFromTxs(client, args),\n checkGasSponsorshipEligibility: (args) => checkGasSponsorshipEligibility(client, args),\n signUserOperation: (args) => signUserOperation(client, args),\n dropAndReplaceUserOperation: (args) => dropAndReplaceUserOperation(client, args),\n sendTransaction: (args, overrides, context2) => sendTransaction2(client, args, overrides, context2),\n sendTransactions: (args) => sendTransactions(client, args),\n sendUserOperation: (args) => sendUserOperation(client, args),\n waitForUserOperationTransaction: (args) => waitForUserOperationTransaction.bind(client)(client, args),\n upgradeAccount: (args) => upgradeAccount(client, args),\n getAddress: (args) => getAddress2(client, args),\n signMessage: (args) => signMessage2(client, args),\n signTypedData: (args) => signTypedData2(client, args)\n });\n smartAccountClientMethodKeys = Object.keys(\n // @ts-expect-error we just want to get the keys\n smartAccountClientActions(void 0)\n ).reduce((accum, curr) => {\n accum.add(curr);\n return accum;\n }, /* @__PURE__ */ new Set());\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/isSmartAccountClient.js\n function isSmartAccountClient(client) {\n for (const key of smartAccountClientMethodKeys) {\n if (!(key in client)) {\n return false;\n }\n }\n return client && \"middleware\" in client;\n }\n function isBaseSmartAccountClient(client) {\n return client && \"middleware\" in client;\n }\n var init_isSmartAccountClient = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/isSmartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_smartAccountClient();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/initUserOperation.js\n async function _initUserOperation(client, args) {\n const { account = client.account, uo, overrides } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const entryPoint = account.getEntryPoint();\n const callData = Array.isArray(uo) ? account.encodeBatchExecute(uo) : typeof uo === \"string\" ? uo : account.encodeExecute(uo);\n const signature = account.getDummySignature();\n const nonce = overrides?.nonce ?? account.getAccountNonce(overrides?.nonceKey);\n const struct = entryPoint.version === \"0.6.0\" ? {\n initCode: account.getInitCode(),\n sender: account.address,\n nonce,\n callData,\n signature\n } : {\n factory: conditionalReturn(account.isAccountDeployed().then((deployed) => !deployed), account.getFactoryAddress),\n factoryData: conditionalReturn(account.isAccountDeployed().then((deployed) => !deployed), account.getFactoryData),\n sender: account.address,\n nonce,\n callData,\n signature\n };\n return struct;\n }\n var init_initUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/initUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_client();\n init_utils9();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/addBreadcrumb.js\n function hasAddBreadcrumb(a3) {\n return ADD_BREADCRUMB in a3;\n }\n function clientHeaderTrack(client, crumb) {\n if (hasAddBreadcrumb(client)) {\n return client[ADD_BREADCRUMB](crumb);\n }\n return client;\n }\n var ADD_BREADCRUMB;\n var init_addBreadcrumb = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/addBreadcrumb.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n ADD_BREADCRUMB = Symbol(\"addBreadcrumb\");\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperation.js\n async function buildUserOperation(client_, args) {\n const client = clientHeaderTrack(client_, USER_OPERATION_METHOD);\n const { account = client.account, overrides, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", USER_OPERATION_METHOD, client);\n }\n return _initUserOperation(client, args).then((_uo) => _runMiddlewareStack(client, {\n uo: _uo,\n overrides,\n account,\n context: context2\n }));\n }\n var USER_OPERATION_METHOD;\n var init_buildUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_initUserOperation();\n init_runMiddlewareStack();\n init_addBreadcrumb();\n USER_OPERATION_METHOD = \"buildUserOperation\";\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/schema.js\n var ConnectionConfigSchema, UserOperationFeeOptionsFieldSchema, UserOperationFeeOptionsSchema_v6, UserOperationFeeOptionsSchema_v7, UserOperationFeeOptionsSchema, SmartAccountClientOptsSchema;\n var init_schema2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/schema.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm5();\n init_utils9();\n ConnectionConfigSchema = external_exports.intersection(external_exports.union([\n external_exports.object({\n rpcUrl: external_exports.never().optional(),\n apiKey: external_exports.string(),\n jwt: external_exports.never().optional()\n }),\n external_exports.object({\n rpcUrl: external_exports.never().optional(),\n apiKey: external_exports.never().optional(),\n jwt: external_exports.string()\n }),\n external_exports.object({\n rpcUrl: external_exports.string(),\n apiKey: external_exports.never().optional(),\n jwt: external_exports.never().optional()\n }),\n external_exports.object({\n rpcUrl: external_exports.string(),\n apiKey: external_exports.never().optional(),\n jwt: external_exports.string()\n })\n ]), external_exports.object({\n chainAgnosticUrl: external_exports.string().optional()\n }));\n UserOperationFeeOptionsFieldSchema = BigNumberishRangeSchema.merge(MultiplierSchema).partial();\n UserOperationFeeOptionsSchema_v6 = external_exports.object({\n maxFeePerGas: UserOperationFeeOptionsFieldSchema,\n maxPriorityFeePerGas: UserOperationFeeOptionsFieldSchema,\n callGasLimit: UserOperationFeeOptionsFieldSchema,\n verificationGasLimit: UserOperationFeeOptionsFieldSchema,\n preVerificationGas: UserOperationFeeOptionsFieldSchema\n }).partial().strict();\n UserOperationFeeOptionsSchema_v7 = UserOperationFeeOptionsSchema_v6.extend({\n paymasterVerificationGasLimit: UserOperationFeeOptionsFieldSchema,\n paymasterPostOpGasLimit: UserOperationFeeOptionsFieldSchema\n }).partial().strict();\n UserOperationFeeOptionsSchema = UserOperationFeeOptionsSchema_v7;\n SmartAccountClientOptsSchema = external_exports.object({\n /**\n * The maximum number of times to try fetching a transaction receipt before giving up (default: 5)\n */\n txMaxRetries: external_exports.number().min(0).optional().default(5),\n /**\n * The interval in milliseconds to wait between retries while waiting for tx receipts (default: 2_000)\n */\n txRetryIntervalMs: external_exports.number().min(0).optional().default(2e3),\n /**\n * The multiplier on interval length to wait between retries while waiting for tx receipts (default: 1.5)\n */\n txRetryMultiplier: external_exports.number().min(0).optional().default(1.5),\n /**\n * Optional user operation fee options to be set globally at the provider level\n */\n feeOptions: UserOperationFeeOptionsSchema.optional()\n }).strict();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/feeEstimator.js\n function defaultFeeEstimator(client) {\n return async (struct, { overrides, feeOptions }) => {\n const feeData = await client.estimateFeesPerGas();\n if (!feeData.maxFeePerGas || feeData.maxPriorityFeePerGas == null) {\n throw new Error(\"feeData is missing maxFeePerGas or maxPriorityFeePerGas\");\n }\n let maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas();\n maxPriorityFeePerGas = applyUserOpOverrideOrFeeOption(maxPriorityFeePerGas, overrides?.maxPriorityFeePerGas, feeOptions?.maxPriorityFeePerGas);\n let maxFeePerGas = feeData.maxFeePerGas - feeData.maxPriorityFeePerGas + BigInt(maxPriorityFeePerGas);\n maxFeePerGas = applyUserOpOverrideOrFeeOption(maxFeePerGas, overrides?.maxFeePerGas, feeOptions?.maxFeePerGas);\n struct.maxFeePerGas = maxFeePerGas;\n struct.maxPriorityFeePerGas = maxPriorityFeePerGas;\n return struct;\n };\n }\n var init_feeEstimator = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/feeEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils9();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/gasEstimator.js\n var defaultGasEstimator;\n var init_gasEstimator = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/gasEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils9();\n init_userop();\n defaultGasEstimator = (client) => async (struct, { account, overrides, feeOptions }) => {\n const request = deepHexlify(await resolveProperties(struct));\n const estimates = await client.estimateUserOperationGas(request, account.getEntryPoint().address, overrides?.stateOverride);\n const callGasLimit = applyUserOpOverrideOrFeeOption(estimates.callGasLimit, overrides?.callGasLimit, feeOptions?.callGasLimit);\n const verificationGasLimit = applyUserOpOverrideOrFeeOption(estimates.verificationGasLimit, overrides?.verificationGasLimit, feeOptions?.verificationGasLimit);\n const preVerificationGas = applyUserOpOverrideOrFeeOption(estimates.preVerificationGas, overrides?.preVerificationGas, feeOptions?.preVerificationGas);\n struct.callGasLimit = callGasLimit;\n struct.verificationGasLimit = verificationGasLimit;\n struct.preVerificationGas = preVerificationGas;\n const entryPoint = account.getEntryPoint();\n if (entryPoint.version === \"0.7.0\") {\n const paymasterVerificationGasLimit = applyUserOpOverrideOrFeeOption(estimates.paymasterVerificationGasLimit, overrides?.paymasterVerificationGasLimit, feeOptions?.paymasterVerificationGasLimit);\n const uo_v7 = struct;\n uo_v7.paymasterVerificationGasLimit = paymasterVerificationGasLimit;\n uo_v7.paymasterPostOpGasLimit = uo_v7.paymasterPostOpGasLimit ?? (uo_v7.paymaster ? \"0x0\" : void 0);\n }\n return struct;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/paymasterAndData.js\n var defaultPaymasterAndData;\n var init_paymasterAndData = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/paymasterAndData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n defaultPaymasterAndData = async (struct, { account }) => {\n const entryPoint = account.getEntryPoint();\n if (entryPoint.version === \"0.6.0\") {\n struct.paymasterAndData = \"0x\";\n }\n return struct;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/userOpSigner.js\n var defaultUserOpSigner;\n var init_userOpSigner = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/userOpSigner.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_client();\n init_useroperation();\n init_utils9();\n defaultUserOpSigner = async (struct, { client, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!client?.chain) {\n throw new ChainNotFoundError2();\n }\n const resolvedStruct = await resolveProperties(struct);\n const request = deepHexlify(resolvedStruct);\n if (!isValidRequest(request)) {\n throw new InvalidUserOperationError(resolvedStruct);\n }\n return {\n ...resolvedStruct,\n signature: await account.signUserOperationHash(account.getEntryPoint().getUserOperationHash(request))\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/actions.js\n var middlewareActions;\n var init_actions = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/actions.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_feeEstimator();\n init_gasEstimator();\n init_paymasterAndData();\n init_userOpSigner();\n init_noopMiddleware();\n middlewareActions = (overrides) => (client) => ({\n middleware: {\n customMiddleware: overrides.customMiddleware ?? noopMiddleware,\n dummyPaymasterAndData: overrides.dummyPaymasterAndData ?? defaultPaymasterAndData,\n feeEstimator: overrides.feeEstimator ?? defaultFeeEstimator(client),\n gasEstimator: overrides.gasEstimator ?? defaultGasEstimator(client),\n paymasterAndData: overrides.paymasterAndData ?? defaultPaymasterAndData,\n userOperationSimulator: overrides.userOperationSimulator ?? noopMiddleware,\n signUserOperation: overrides.signUserOperation ?? defaultUserOpSigner\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/smartAccountClient.js\n function createSmartAccountClient(config2) {\n const { key = \"account\", name = \"account provider\", transport, type = \"SmartAccountClient\", addBreadCrumb, ...params } = config2;\n const client = createBundlerClient({\n ...params,\n key,\n name,\n // we start out with this because the base methods for a SmartAccountClient\n // require a smart account client, but once we have completed building everything\n // we want to override this value with the one passed in by the extender\n type: \"SmartAccountClient\",\n // TODO: this needs to be tested\n transport: (opts) => {\n const rpcTransport = transport(opts);\n return custom(\n {\n name: \"SmartAccountClientTransport\",\n async request({ method, params: params2 }) {\n switch (method) {\n case \"eth_accounts\": {\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n return [client.account.address];\n }\n case \"eth_sendTransaction\":\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const [tx] = params2;\n return client.sendTransaction({\n ...tx,\n account: client.account,\n chain: client.chain\n });\n case \"eth_sign\":\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n const [address, data] = params2;\n if (address?.toLowerCase() !== client.account.address.toLowerCase()) {\n throw new Error(\"cannot sign for address that is not the current account\");\n }\n return client.signMessage({\n message: data,\n account: client.account\n });\n case \"personal_sign\": {\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n const [data2, address2] = params2;\n if (address2?.toLowerCase() !== client.account.address.toLowerCase()) {\n throw new Error(\"cannot sign for address that is not the current account\");\n }\n return client.signMessage({\n message: data2,\n account: client.account\n });\n }\n case \"eth_signTypedData_v4\": {\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n const [address2, dataParams] = params2;\n if (address2?.toLowerCase() !== client.account.address.toLowerCase()) {\n throw new Error(\"cannot sign for address that is not the current account\");\n }\n try {\n return client.signTypedData({\n account: client.account,\n typedData: typeof dataParams === \"string\" ? JSON.parse(dataParams) : dataParams\n });\n } catch {\n throw new Error(\"invalid JSON data params\");\n }\n }\n case \"eth_chainId\":\n if (!opts.chain) {\n throw new ChainNotFoundError2();\n }\n return opts.chain.id;\n default:\n return rpcTransport.request(\n { method, params: params2 },\n // Retry count must be 0 here in order to respect the retry\n // count that is already specified on the underlying transport.\n { retryCount: 0 }\n );\n }\n }\n },\n // Retry count must be 0 here in order to respect the retry\n // count that is already specified on the underlying transport.\n { retryCount: 0 }\n )(opts);\n }\n }).extend(() => {\n const addBreadCrumbs = addBreadCrumb ? {\n [ADD_BREADCRUMB]: addBreadCrumb\n } : {};\n return {\n ...SmartAccountClientOptsSchema.parse(config2.opts ?? {}),\n ...addBreadCrumbs\n };\n }).extend(middlewareActions(config2)).extend(smartAccountClientActions);\n return { ...client, type };\n }\n var init_smartAccountClient2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/smartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm5();\n init_account2();\n init_client();\n init_actions();\n init_bundlerClient2();\n init_smartAccountClient();\n init_schema2();\n init_addBreadcrumb();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/0.6.js\n var packUserOperation2, __default2;\n var init__2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/0.6.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_EntryPointAbi_v6();\n packUserOperation2 = (request) => {\n const hashedInitCode = keccak256(request.initCode);\n const hashedCallData = keccak256(request.callData);\n const hashedPaymasterAndData = keccak256(request.paymasterAndData);\n return encodeAbiParameters([\n { type: \"address\" },\n { type: \"uint256\" },\n { type: \"bytes32\" },\n { type: \"bytes32\" },\n { type: \"uint256\" },\n { type: \"uint256\" },\n { type: \"uint256\" },\n { type: \"uint256\" },\n { type: \"uint256\" },\n { type: \"bytes32\" }\n ], [\n request.sender,\n hexToBigInt(request.nonce),\n hashedInitCode,\n hashedCallData,\n hexToBigInt(request.callGasLimit),\n hexToBigInt(request.verificationGasLimit),\n hexToBigInt(request.preVerificationGas),\n hexToBigInt(request.maxFeePerGas),\n hexToBigInt(request.maxPriorityFeePerGas),\n hashedPaymasterAndData\n ]);\n };\n __default2 = {\n version: \"0.6.0\",\n address: {\n default: \"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789\"\n },\n abi: EntryPointAbi_v6,\n getUserOperationHash: (request, entryPointAddress, chainId) => {\n const encoded = encodeAbiParameters([{ type: \"bytes32\" }, { type: \"address\" }, { type: \"uint256\" }], [\n keccak256(packUserOperation2(request)),\n entryPointAddress,\n BigInt(chainId)\n ]);\n return keccak256(encoded);\n },\n packUserOperation: packUserOperation2\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/index.js\n function getEntryPoint(chain2, options) {\n const { version: version7 = defaultEntryPointVersion, addressOverride } = options ?? {\n version: defaultEntryPointVersion\n };\n const entryPoint = entryPointRegistry[version7 ?? defaultEntryPointVersion];\n const address = addressOverride ?? entryPoint.address[chain2.id] ?? entryPoint.address.default;\n if (!address) {\n throw new EntryPointNotFoundError(chain2, version7);\n }\n if (entryPoint.version === \"0.6.0\") {\n return {\n version: entryPoint.version,\n address,\n chain: chain2,\n abi: entryPoint.abi,\n getUserOperationHash: (r2) => entryPoint.getUserOperationHash(r2, address, chain2.id),\n packUserOperation: entryPoint.packUserOperation\n };\n } else if (entryPoint.version === \"0.7.0\") {\n return {\n version: entryPoint.version,\n address,\n chain: chain2,\n abi: entryPoint.abi,\n getUserOperationHash: (r2) => entryPoint.getUserOperationHash(r2, address, chain2.id),\n packUserOperation: entryPoint.packUserOperation\n };\n }\n throw new EntryPointNotFoundError(chain2, version7);\n }\n var defaultEntryPointVersion, entryPointRegistry;\n var init_entrypoint2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_entrypoint();\n init__2();\n init__();\n defaultEntryPointVersion = \"0.6.0\";\n entryPointRegistry = {\n \"0.6.0\": __default2,\n \"0.7.0\": __default\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/7702signer.js\n var default7702UserOpSigner;\n var init_signer = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/7702signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_smartContractAccount();\n init_account2();\n init_client();\n init_userOpSigner();\n default7702UserOpSigner = (userOpSigner) => async (struct, params) => {\n const userOpSigner_ = userOpSigner ?? defaultUserOpSigner;\n const uo = await userOpSigner_({\n ...struct,\n // Strip out the dummy eip7702 fields.\n eip7702Auth: void 0\n }, params);\n const account = params.account ?? params.client.account;\n const { client } = params;\n if (!account || !isSmartAccountWithSigner(account)) {\n throw new AccountNotFoundError2();\n }\n const signer = account.getSigner();\n if (!signer.signAuthorization) {\n return uo;\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const code = await client.getCode({ address: account.address }) ?? \"0x\";\n const implAddress = await account.getImplementationAddress();\n const expectedCode = \"0xef0100\" + implAddress.slice(2);\n if (code.toLowerCase() === expectedCode.toLowerCase()) {\n return uo;\n }\n const accountNonce = await params.client.getTransactionCount({\n address: account.address\n });\n const authSignature = await signer.signAuthorization({\n chainId: client.chain.id,\n contractAddress: implAddress,\n nonce: accountNonce\n });\n const { r: r2, s: s4 } = authSignature;\n const yParity = authSignature.yParity ?? authSignature.v - 27n;\n return {\n ...uo,\n eip7702Auth: {\n // deepHexlify doesn't encode number(0) correctly, it returns \"0x\"\n chainId: toHex(client.chain.id),\n nonce: toHex(accountNonce),\n address: implAddress,\n r: r2,\n s: s4,\n yParity: toHex(yParity)\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/7702gasEstimator.js\n var default7702GasEstimator;\n var init_gasEstimator2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/7702gasEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_account2();\n init_gasEstimator();\n default7702GasEstimator = (gasEstimator) => async (struct, params) => {\n const gasEstimator_ = gasEstimator ?? defaultGasEstimator(params.client);\n const account = params.account ?? params.client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const entryPoint = account.getEntryPoint();\n if (entryPoint.version !== \"0.7.0\") {\n throw new Error(\"This middleware is only compatible with EntryPoint v0.7.0\");\n }\n const [implementationAddress, code = \"0x\"] = await Promise.all([\n account.getImplementationAddress(),\n params.client.getCode({ address: params.account.address })\n ]);\n const isAlreadyDelegated = code.toLowerCase() === concatHex([\"0xef0100\", implementationAddress]);\n if (!isAlreadyDelegated) {\n struct.eip7702Auth = {\n chainId: numberToHex(params.client.chain?.id ?? 0),\n nonce: numberToHex(await params.client.getTransactionCount({\n address: params.account.address\n })),\n address: implementationAddress,\n r: zeroHash,\n // aka `bytes32(0)`\n s: zeroHash,\n yParity: \"0x0\"\n };\n }\n return gasEstimator_(struct, params);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/webauthnGasEstimator.js\n var rip7212CheckBytecode, webauthnGasEstimator;\n var init_webauthnGasEstimator = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/webauthnGasEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_gasEstimator();\n rip7212CheckBytecode = \"0x60806040526040517f532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25815260056020820152600160408201527f4a03ef9f92eb268cafa601072489a56380fa0dc43171d7712813b3a19a1eb5e560608201527f3e213e28a608ce9a2f4a17fd830c6654018a79b3e0263d91a8ba90622df6f2f0608082015260208160a0836101005afa503d5f823e3d81f3fe\";\n webauthnGasEstimator = (gasEstimator) => async (struct, params) => {\n const gasEstimator_ = gasEstimator ?? defaultGasEstimator(params.client);\n const account = params.account ?? params.client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const entryPoint = account.getEntryPoint();\n if (entryPoint.version !== \"0.7.0\") {\n throw new Error(\"This middleware is only compatible with EntryPoint v0.7.0\");\n }\n const uo = await gasEstimator_(struct, params);\n const pvg = uo.verificationGasLimit instanceof Promise ? await uo.verificationGasLimit : uo?.verificationGasLimit ?? 0n;\n if (!pvg) {\n throw new Error(\"WebauthnGasEstimator: verificationGasLimit is 0 or not defined\");\n }\n const { data } = await params.client.call({ data: rip7212CheckBytecode });\n const chainHas7212 = data ? BigInt(data) === 1n : false;\n return {\n ...uo,\n verificationGasLimit: BigInt(typeof pvg === \"string\" ? BigInt(pvg) : pvg) + (chainHas7212 ? 10000n : 300000n)\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/erc7677middleware.js\n function erc7677Middleware(params) {\n const dummyPaymasterAndData = async (uo, { client, account, feeOptions, overrides }) => {\n const userOp = deepHexlify(await resolveProperties(uo));\n userOp.maxFeePerGas = \"0x0\";\n userOp.maxPriorityFeePerGas = \"0x0\";\n userOp.callGasLimit = \"0x0\";\n userOp.verificationGasLimit = \"0x0\";\n userOp.preVerificationGas = \"0x0\";\n const entrypoint = account.getEntryPoint();\n if (entrypoint.version === \"0.7.0\") {\n userOp.paymasterVerificationGasLimit = \"0x0\";\n userOp.paymasterPostOpGasLimit = \"0x0\";\n }\n const context2 = (typeof params?.context === \"function\" ? await params?.context(userOp, { overrides, feeOptions }) : params?.context) ?? {};\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const erc7677client = client;\n const { paymaster, paymasterAndData: paymasterAndData2, paymasterData, paymasterPostOpGasLimit, paymasterVerificationGasLimit } = await erc7677client.request({\n method: \"pm_getPaymasterStubData\",\n params: [userOp, entrypoint.address, toHex(client.chain.id), context2]\n });\n if (entrypoint.version === \"0.6.0\") {\n return {\n ...uo,\n paymasterAndData: paymasterAndData2\n };\n }\n return {\n ...uo,\n paymaster,\n paymasterData,\n // these values are currently not override-able, so can be set here directly\n paymasterVerificationGasLimit,\n paymasterPostOpGasLimit\n };\n };\n const paymasterAndData = async (uo, { client, account, feeOptions, overrides }) => {\n const userOp = deepHexlify(await resolveProperties(uo));\n const context2 = (typeof params?.context === \"function\" ? await params?.context(userOp, { overrides, feeOptions }) : params?.context) ?? {};\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const erc7677client = client;\n const entrypoint = account.getEntryPoint();\n const { paymaster, paymasterAndData: paymasterAndData2, paymasterData, paymasterPostOpGasLimit, paymasterVerificationGasLimit } = await erc7677client.request({\n method: \"pm_getPaymasterData\",\n params: [userOp, entrypoint.address, toHex(client.chain.id), context2]\n });\n if (entrypoint.version === \"0.6.0\") {\n return {\n ...uo,\n paymasterAndData: paymasterAndData2\n };\n }\n return {\n ...uo,\n paymaster,\n paymasterData,\n // if these fields are returned they should override the ones set by user operation gas estimation,\n // otherwise they shouldn't modify\n ...paymasterVerificationGasLimit ? { paymasterVerificationGasLimit } : {},\n ...paymasterPostOpGasLimit ? { paymasterPostOpGasLimit } : {}\n };\n };\n return {\n dummyPaymasterAndData,\n paymasterAndData\n };\n }\n var init_erc7677middleware = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/erc7677middleware.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_client();\n init_utils9();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/signer/local-account.js\n var LocalAccountSigner;\n var init_local_account = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/signer/local-account.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_accounts();\n LocalAccountSigner = class _LocalAccountSigner {\n /**\n * A function to initialize an object with an inner parameter and derive a signerType from it.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { privateKeyToAccount, generatePrivateKey } from \"viem\";\n *\n * const signer = new LocalAccountSigner(\n * privateKeyToAccount(generatePrivateKey()),\n * );\n * ```\n *\n * @param {T} inner The inner parameter containing the necessary data\n */\n constructor(inner) {\n Object.defineProperty(this, \"inner\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"signerType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"signMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (message) => {\n return this.inner.signMessage({ message });\n }\n });\n Object.defineProperty(this, \"signTypedData\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async (params) => {\n return this.inner.signTypedData(params);\n }\n });\n Object.defineProperty(this, \"getAddress\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async () => {\n return this.inner.address;\n }\n });\n this.inner = inner;\n this.signerType = inner.type;\n }\n /**\n * Signs an unsigned authorization using the provided private key account.\n *\n * @example\n * ```ts twoslash\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem/accounts\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * const signedAuthorization = await signer.signAuthorization({\n * contractAddress: \"0x1234123412341234123412341234123412341234\",\n * chainId: 1,\n * nonce: 3,\n * });\n * ```\n *\n * @param {AuthorizationRequest} unsignedAuthorization - The unsigned authorization to be signed.\n * @returns {Promise>} A promise that resolves to the signed authorization.\n */\n signAuthorization(unsignedAuthorization) {\n return this.inner.signAuthorization(unsignedAuthorization);\n }\n /**\n * Creates a LocalAccountSigner using the provided mnemonic key and optional HD options.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generateMnemonic } from \"viem\";\n *\n * const signer = LocalAccountSigner.mnemonicToAccountSigner(generateMnemonic());\n * ```\n *\n * @param {string} key The mnemonic key to derive the account from.\n * @param {HDOptions} [opts] Optional HD options for deriving the account.\n * @returns {LocalAccountSigner} A LocalAccountSigner object for the derived account.\n */\n static mnemonicToAccountSigner(key, opts) {\n const signer = mnemonicToAccount(key, opts);\n return new _LocalAccountSigner(signer);\n }\n /**\n * Creates a `LocalAccountSigner` instance using the provided private key.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * ```\n *\n * @param {Hex} key The private key in hexadecimal format\n * @returns {LocalAccountSigner} An instance of `LocalAccountSigner` initialized with the provided private key\n */\n static privateKeyToAccountSigner(key) {\n const signer = privateKeyToAccount(key);\n return new _LocalAccountSigner(signer);\n }\n /**\n * Generates a new private key and creates a `LocalAccountSigner` for a `PrivateKeyAccount`.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n *\n * const signer = LocalAccountSigner.generatePrivateKeySigner();\n * ```\n *\n * @returns {LocalAccountSigner} A `LocalAccountSigner` instance initialized with the generated private key account\n */\n static generatePrivateKeySigner() {\n const signer = privateKeyToAccount(generatePrivateKey());\n return new _LocalAccountSigner(signer);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/transport/split.js\n var split2;\n var init_split = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/transport/split.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n split2 = (params) => {\n const overrideMap = params.overrides.reduce((accum, curr) => {\n curr.methods.forEach((method) => {\n if (accum.has(method) && accum.get(method) !== curr.transport) {\n throw new Error(\"A method cannot be handled by more than one transport\");\n }\n accum.set(method, curr.transport);\n });\n return accum;\n }, /* @__PURE__ */ new Map());\n return (opts) => custom({\n request: async (args) => {\n const transportOverride = overrideMap.get(args.method);\n if (transportOverride != null) {\n return transportOverride(opts).request(args);\n }\n return params.fallback(opts).request(args);\n }\n })(opts);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/traceHeader.js\n function generateRandomHexString(numBytes) {\n const hexPairs = new Array(numBytes).fill(0).map(() => Math.floor(Math.random() * 16).toString(16).padStart(2, \"0\"));\n return hexPairs.join(\"\");\n }\n var TRACE_HEADER_NAME, TRACE_HEADER_STATE, clientTraceId, TraceHeader;\n var init_traceHeader = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/traceHeader.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n TRACE_HEADER_NAME = \"traceparent\";\n TRACE_HEADER_STATE = \"tracestate\";\n clientTraceId = generateRandomHexString(16);\n TraceHeader = class _TraceHeader {\n /**\n * Initializes a new instance with the provided trace identifiers and state information.\n *\n * @param {string} traceId The unique identifier for the trace\n * @param {string} parentId The identifier of the parent trace\n * @param {string} traceFlags Flags containing trace-related options\n * @param {TraceHeader[\"traceState\"]} traceState The trace state information for additional trace context\n */\n constructor(traceId, parentId, traceFlags, traceState) {\n Object.defineProperty(this, \"traceId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"parentId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"traceFlags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"traceState\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.traceId = traceId;\n this.parentId = parentId;\n this.traceFlags = traceFlags;\n this.traceState = traceState;\n }\n /**\n * Creating a default trace id that is a random setup for both trace id and parent id\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers) || TraceHeader.default();\n * ```\n *\n * @returns {TraceHeader} A default trace header\n */\n static default() {\n return new _TraceHeader(\n clientTraceId,\n generateRandomHexString(8),\n \"00\",\n //Means no flag have been set, and no sampled state https://www.w3.org/TR/trace-context/#trace-flags\n {}\n );\n }\n /**\n * Should be able to consume a trace header from the headers of an http request\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers);\n * ```\n *\n * @param {Record} headers The headers from the http request\n * @returns {TraceHeader | undefined} The trace header object, or nothing if not found\n */\n static fromTraceHeader(headers) {\n if (!headers[TRACE_HEADER_NAME]) {\n return void 0;\n }\n const [version7, traceId, parentId, traceFlags] = headers[TRACE_HEADER_NAME]?.split(\"-\");\n const traceState = headers[TRACE_HEADER_STATE]?.split(\",\").reduce((acc, curr) => {\n const [key, value] = curr.split(\"=\");\n acc[key] = value;\n return acc;\n }, {}) || {};\n if (version7 !== \"00\") {\n console.debug(new Error(`Invalid version for traceheader: ${headers[TRACE_HEADER_NAME]}`));\n return void 0;\n }\n return new _TraceHeader(traceId, parentId, traceFlags, traceState);\n }\n /**\n * Should be able to convert the trace header to the format that is used in the headers of an http request\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers) || TraceHeader.default();\n * const headers = traceHeader.toTraceHeader();\n * ```\n *\n * @returns {{traceparent: string, tracestate: string}} The trace header in the format of a record, used in our http client\n */\n toTraceHeader() {\n return {\n [TRACE_HEADER_NAME]: `00-${this.traceId}-${this.parentId}-${this.traceFlags}`,\n [TRACE_HEADER_STATE]: Object.entries(this.traceState).map(([key, value]) => `${key}=${value}`).join(\",\")\n };\n }\n /**\n * Should be able to create a new trace header with a new event in the trace state,\n * as the key of the eventName as breadcrumbs appending onto previous breadcrumbs with the - infix if exists. And the\n * trace parent gets updated as according to the docs\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers) || TraceHeader.default();\n * const newTraceHeader = traceHeader.withEvent(\"newEvent\");\n * ```\n *\n * @param {string} eventName The key of the new event\n * @returns {TraceHeader} The new trace header\n */\n withEvent(eventName) {\n const breadcrumbs = this.traceState.breadcrumbs ? `${this.traceState.breadcrumbs}-${eventName}` : eventName;\n return new _TraceHeader(this.traceId, this.parentId, this.traceFlags, {\n ...this.traceState,\n breadcrumbs\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/index.js\n var init_esm6 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_smartContractAccount();\n init_sendTransaction2();\n init_sendTransactions();\n init_sendUserOperation2();\n init_bundlerClient2();\n init_smartAccountClient();\n init_isSmartAccountClient();\n init_schema2();\n init_smartAccountClient2();\n init_entrypoint2();\n init_account2();\n init_base2();\n init_client();\n init_useroperation();\n init_addBreadcrumb();\n init_signer();\n init_gasEstimator2();\n init_webauthnGasEstimator();\n init_gasEstimator();\n init_erc7677middleware();\n init_noopMiddleware();\n init_local_account();\n init_split();\n init_traceHeader();\n init_utils9();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/isAlchemySmartAccountClient.js\n function isAlchemySmartAccountClient(client) {\n return client.transport.type === \"alchemy\";\n }\n var init_isAlchemySmartAccountClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/isAlchemySmartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/actions/simulateUserOperationChanges.js\n var simulateUserOperationChanges;\n var init_simulateUserOperationChanges = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/actions/simulateUserOperationChanges.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_isAlchemySmartAccountClient();\n simulateUserOperationChanges = async (client, { account = client.account, overrides, ...params }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isAlchemySmartAccountClient(client)) {\n throw new IncompatibleClientError(\"AlchemySmartAccountClient\", \"SimulateUserOperationAssetChanges\", client);\n }\n const uoStruct = deepHexlify(await client.buildUserOperation({\n ...params,\n account,\n overrides\n }));\n return client.request({\n method: \"alchemy_simulateUserOperationAssetChanges\",\n params: [uoStruct, account.getEntryPoint().address]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/alchemyTrackerHeaders.js\n function mutateRemoveTrackingHeaders(x4) {\n if (!x4)\n return;\n if (Array.isArray(x4))\n return;\n if (typeof x4 !== \"object\")\n return;\n TRACKER_HEADER in x4 && delete x4[TRACKER_HEADER];\n TRACKER_BREADCRUMB in x4 && delete x4[TRACKER_BREADCRUMB];\n TRACE_HEADER_NAME in x4 && delete x4[TRACE_HEADER_NAME];\n TRACE_HEADER_STATE in x4 && delete x4[TRACE_HEADER_STATE];\n }\n function addCrumb(previous, crumb) {\n if (!previous)\n return crumb;\n return `${previous} > ${crumb}`;\n }\n function headersUpdate(crumb) {\n const headerUpdate_ = (x4) => {\n const traceHeader = (TraceHeader.fromTraceHeader(x4) || TraceHeader.default()).withEvent(crumb);\n return {\n [TRACKER_HEADER]: traceHeader.parentId,\n ...x4,\n [TRACKER_BREADCRUMB]: addCrumb(x4[TRACKER_BREADCRUMB], crumb),\n ...traceHeader.toTraceHeader()\n };\n };\n return headerUpdate_;\n }\n var TRACKER_HEADER, TRACKER_BREADCRUMB;\n var init_alchemyTrackerHeaders = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/alchemyTrackerHeaders.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm6();\n init_esm6();\n TRACKER_HEADER = \"X-Alchemy-Client-Trace-Id\";\n TRACKER_BREADCRUMB = \"X-Alchemy-Client-Breadcrumb\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/schema.js\n var AlchemyChainSchema;\n var init_schema3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/schema.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm5();\n AlchemyChainSchema = esm_default.custom((chain2) => {\n const chain_ = ChainSchema.parse(chain2);\n return chain_.rpcUrls.alchemy != null;\n }, \"chain must include an alchemy rpc url. See `defineAlchemyChain` or import a chain from `@account-kit/infra`.\");\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/version.js\n var VERSION2;\n var init_version6 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n VERSION2 = \"4.62.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/alchemyTransport.js\n function isAlchemyTransport(transport, chain2) {\n return transport({ chain: chain2 }).config.type === \"alchemy\";\n }\n function alchemy(config2) {\n const { retryDelay, retryCount = 0 } = config2;\n const fetchOptions = { ...config2.fetchOptions };\n const connectionConfig = ConnectionConfigSchema.parse(config2.alchemyConnection ?? config2);\n const headersAsObject = convertHeadersToObject(fetchOptions.headers);\n fetchOptions.headers = {\n ...headersAsObject,\n \"Alchemy-AA-Sdk-Version\": VERSION2\n };\n if (connectionConfig.jwt != null || connectionConfig.apiKey != null) {\n fetchOptions.headers = {\n ...fetchOptions.headers,\n Authorization: `Bearer ${connectionConfig.jwt ?? connectionConfig.apiKey}`\n };\n }\n const transport = (opts) => {\n const { chain: chain_ } = opts;\n if (!chain_) {\n throw new ChainNotFoundError2();\n }\n const chain2 = AlchemyChainSchema.parse(chain_);\n const rpcUrl = connectionConfig.rpcUrl == null ? chain2.rpcUrls.alchemy.http[0] : connectionConfig.rpcUrl;\n const chainAgnosticRpcUrl = connectionConfig.rpcUrl == null ? \"https://api.g.alchemy.com/v2\" : connectionConfig.chainAgnosticUrl ?? connectionConfig.rpcUrl;\n const innerTransport = (() => {\n mutateRemoveTrackingHeaders(config2?.fetchOptions?.headers);\n if (config2.alchemyConnection && config2.nodeRpcUrl) {\n return split2({\n overrides: [\n {\n methods: alchemyMethods,\n transport: http(rpcUrl, { fetchOptions, retryCount })\n },\n {\n methods: chainAgnosticMethods,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay\n })\n }\n ],\n fallback: http(config2.nodeRpcUrl, {\n fetchOptions: config2.fetchOptions,\n retryCount,\n retryDelay\n })\n });\n }\n return split2({\n overrides: [\n {\n methods: chainAgnosticMethods,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay\n })\n }\n ],\n fallback: http(rpcUrl, { fetchOptions, retryCount, retryDelay })\n });\n })();\n return createTransport({\n key: \"alchemy\",\n name: \"Alchemy Transport\",\n request: innerTransport({\n ...opts,\n // Retries are already handled above within the split transport,\n // so `retryCount` must be 0 here for the expected behavior.\n retryCount: 0\n }).request,\n // Retries are already handled above within the split transport,\n // so `retryCount` must be 0 here too for the expected behavior.\n retryCount: 0,\n retryDelay,\n type: \"alchemy\"\n }, { alchemyRpcUrl: rpcUrl, fetchOptions });\n };\n return Object.assign(transport, {\n dynamicFetchOptions: fetchOptions,\n updateHeaders(newHeaders_) {\n const newHeaders = convertHeadersToObject(newHeaders_);\n fetchOptions.headers = {\n ...fetchOptions.headers,\n ...newHeaders\n };\n },\n config: config2\n });\n }\n var alchemyMethods, chainAgnosticMethods, convertHeadersToObject;\n var init_alchemyTransport = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/alchemyTransport.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_alchemyTrackerHeaders();\n init_schema3();\n init_version6();\n alchemyMethods = [\n \"eth_sendUserOperation\",\n \"eth_estimateUserOperationGas\",\n \"eth_getUserOperationReceipt\",\n \"eth_getUserOperationByHash\",\n \"eth_supportedEntryPoints\",\n \"rundler_maxPriorityFeePerGas\",\n \"pm_getPaymasterData\",\n \"pm_getPaymasterStubData\",\n \"alchemy_requestGasAndPaymasterAndData\"\n ];\n chainAgnosticMethods = [\n \"wallet_prepareCalls\",\n \"wallet_sendPreparedCalls\",\n \"wallet_requestAccount\",\n \"wallet_createAccount\",\n \"wallet_listAccounts\",\n \"wallet_createSession\",\n \"wallet_getCallsStatus\"\n ];\n convertHeadersToObject = (headers) => {\n if (!headers) {\n return {};\n }\n if (headers instanceof Headers) {\n const headersObject = {};\n headers.forEach((value, key) => {\n headersObject[key] = value;\n });\n return headersObject;\n }\n if (Array.isArray(headers)) {\n return headers.reduce((acc, header) => {\n acc[header[0]] = header[1];\n return acc;\n }, {});\n }\n return headers;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/chains.js\n var defineAlchemyChain, arbitrum2, arbitrumGoerli2, arbitrumSepolia2, goerli2, mainnet2, optimism2, optimismGoerli2, optimismSepolia2, sepolia2, base2, baseGoerli2, baseSepolia2, polygonMumbai2, polygonAmoy2, polygon2, fraxtal2, fraxtalSepolia, zora2, zoraSepolia2, worldChainSepolia, worldChain, shapeSepolia, shape, unichainMainnet, unichainSepolia, soneiumMinato, soneiumMainnet, opbnbTestnet, opbnbMainnet, beraChainBartio, inkMainnet, inkSepolia, arbitrumNova2, monadTestnet, mekong, openlootSepolia, gensynTestnet, riseTestnet, storyMainnet, storyAeneid, celoAlfajores, celoMainnet, teaSepolia, bobaSepolia, bobaMainnet;\n var init_chains2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/chains.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_chains();\n defineAlchemyChain = ({ chain: chain2, rpcBaseUrl }) => {\n return {\n ...chain2,\n rpcUrls: {\n ...chain2.rpcUrls,\n alchemy: {\n http: [rpcBaseUrl]\n }\n }\n };\n };\n arbitrum2 = {\n ...arbitrum,\n rpcUrls: {\n ...arbitrum.rpcUrls,\n alchemy: {\n http: [\"https://arb-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n arbitrumGoerli2 = {\n ...arbitrumGoerli,\n rpcUrls: {\n ...arbitrumGoerli.rpcUrls,\n alchemy: {\n http: [\"https://arb-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n arbitrumSepolia2 = {\n ...arbitrumSepolia,\n rpcUrls: {\n ...arbitrumSepolia.rpcUrls,\n alchemy: {\n http: [\"https://arb-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n goerli2 = {\n ...goerli,\n rpcUrls: {\n ...goerli.rpcUrls,\n alchemy: {\n http: [\"https://eth-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n mainnet2 = {\n ...mainnet,\n rpcUrls: {\n ...mainnet.rpcUrls,\n alchemy: {\n http: [\"https://eth-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n optimism2 = {\n ...optimism,\n rpcUrls: {\n ...optimism.rpcUrls,\n alchemy: {\n http: [\"https://opt-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n optimismGoerli2 = {\n ...optimismGoerli,\n rpcUrls: {\n ...optimismGoerli.rpcUrls,\n alchemy: {\n http: [\"https://opt-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n optimismSepolia2 = {\n ...optimismSepolia,\n rpcUrls: {\n ...optimismSepolia.rpcUrls,\n alchemy: {\n http: [\"https://opt-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n sepolia2 = {\n ...sepolia,\n rpcUrls: {\n ...sepolia.rpcUrls,\n alchemy: {\n http: [\"https://eth-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n base2 = {\n ...base,\n rpcUrls: {\n ...base.rpcUrls,\n alchemy: {\n http: [\"https://base-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n baseGoerli2 = {\n ...baseGoerli,\n rpcUrls: {\n ...baseGoerli.rpcUrls,\n alchemy: {\n http: [\"https://base-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n baseSepolia2 = {\n ...baseSepolia,\n rpcUrls: {\n ...baseSepolia.rpcUrls,\n alchemy: {\n http: [\"https://base-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n polygonMumbai2 = {\n ...polygonMumbai,\n rpcUrls: {\n ...polygonMumbai.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mumbai.g.alchemy.com/v2\"]\n }\n }\n };\n polygonAmoy2 = {\n ...polygonAmoy,\n rpcUrls: {\n ...polygonAmoy.rpcUrls,\n alchemy: {\n http: [\"https://polygon-amoy.g.alchemy.com/v2\"]\n }\n }\n };\n polygon2 = {\n ...polygon,\n rpcUrls: {\n ...polygon.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n fraxtal2 = {\n ...fraxtal,\n rpcUrls: {\n ...fraxtal.rpcUrls\n }\n };\n fraxtalSepolia = defineChain({\n id: 2523,\n name: \"Fraxtal Sepolia\",\n nativeCurrency: { name: \"Frax Ether\", symbol: \"frxETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.testnet-sepolia.frax.com\"]\n }\n }\n });\n zora2 = {\n ...zora,\n rpcUrls: {\n ...zora.rpcUrls\n }\n };\n zoraSepolia2 = {\n ...zoraSepolia,\n rpcUrls: {\n ...zoraSepolia.rpcUrls\n }\n };\n worldChainSepolia = defineChain({\n id: 4801,\n name: \"World Chain Sepolia\",\n network: \"World Chain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n worldChain = defineChain({\n id: 480,\n name: \"World Chain\",\n network: \"World Chain\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n shapeSepolia = defineChain({\n id: 11011,\n name: \"Shape Sepolia\",\n network: \"Shape Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n shape = defineChain({\n id: 360,\n name: \"Shape\",\n network: \"Shape\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n unichainMainnet = defineChain({\n id: 130,\n name: \"Unichain Mainnet\",\n network: \"Unichain Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n unichainSepolia = defineChain({\n id: 1301,\n name: \"Unichain Sepolia\",\n network: \"Unichain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n soneiumMinato = defineChain({\n id: 1946,\n name: \"Soneium Minato\",\n network: \"Soneium Minato\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n }\n }\n });\n soneiumMainnet = defineChain({\n id: 1868,\n name: \"Soneium Mainnet\",\n network: \"Soneium Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n opbnbTestnet = defineChain({\n id: 5611,\n name: \"OPBNB Testnet\",\n network: \"OPBNB Testnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n }\n }\n });\n opbnbMainnet = defineChain({\n id: 204,\n name: \"OPBNB Mainnet\",\n network: \"OPBNB Mainnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n beraChainBartio = defineChain({\n id: 80084,\n name: \"BeraChain Bartio\",\n network: \"BeraChain Bartio\",\n nativeCurrency: { name: \"Bera\", symbol: \"BERA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n }\n }\n });\n inkMainnet = defineChain({\n id: 57073,\n name: \"Ink Mainnet\",\n network: \"Ink Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n inkSepolia = defineChain({\n id: 763373,\n name: \"Ink Sepolia\",\n network: \"Ink Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n arbitrumNova2 = {\n ...arbitrumNova,\n rpcUrls: {\n ...arbitrumNova.rpcUrls\n }\n };\n monadTestnet = defineChain({\n id: 10143,\n name: \"Monad Testnet\",\n nativeCurrency: { name: \"Monad\", symbol: \"MON\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://testnet.monadexplorer.com\"\n }\n },\n testnet: true\n });\n mekong = defineChain({\n id: 7078815900,\n name: \"Mekong Pectra Devnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.mekong.ethpandaops.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.mekong.ethpandaops.io\"\n }\n },\n testnet: true\n });\n openlootSepolia = defineChain({\n id: 905905,\n name: \"Openloot Sepolia\",\n nativeCurrency: { name: \"Openloot\", symbol: \"OL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://openloot-sepolia.explorer.alchemy.com\"\n }\n },\n testnet: true\n });\n gensynTestnet = defineChain({\n id: 685685,\n name: \"Gensyn Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://gensyn-testnet.explorer.alchemy.com\"\n }\n },\n testnet: true\n });\n riseTestnet = defineChain({\n id: 11155931,\n name: \"Rise Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.testnet.riselabs.xyz\"\n }\n },\n testnet: true\n });\n storyMainnet = defineChain({\n id: 1514,\n name: \"Story Mainnet\",\n nativeCurrency: { name: \"IP\", symbol: \"IP\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://www.storyscan.io\"\n }\n },\n testnet: false\n });\n storyAeneid = defineChain({\n id: 1315,\n name: \"Story Aeneid\",\n nativeCurrency: { name: \"IP\", symbol: \"IP\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://aeneid.storyscan.io\"\n }\n },\n testnet: true\n });\n celoAlfajores = defineChain({\n id: 44787,\n name: \"Celo Alfajores\",\n nativeCurrency: { name: \"Celo native asset\", symbol: \"CELO\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://celo-alfajores.blockscout.com/\"\n }\n },\n testnet: true\n });\n celoMainnet = defineChain({\n id: 42220,\n name: \"Celo Mainnet\",\n nativeCurrency: { name: \"Celo native asset\", symbol: \"CELO\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://celo.blockscout.com/\"\n }\n },\n testnet: false\n });\n teaSepolia = defineChain({\n id: 10218,\n name: \"Tea Sepolia\",\n nativeCurrency: { name: \"TEA\", symbol: \"TEA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://sepolia.tea.xyz/\"\n }\n },\n testnet: true\n });\n bobaSepolia = defineChain({\n id: 28882,\n name: \"Boba Sepolia\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://sepolia.testnet.bobascan.com/\"\n }\n },\n testnet: true\n });\n bobaMainnet = defineChain({\n id: 288,\n name: \"Boba Mainnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://bobascan.com/\"\n }\n },\n testnet: false\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.62.0/node_modules/@account-kit/logging/dist/esm/noop.js\n var noopLogger;\n var init_noop = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.62.0/node_modules/@account-kit/logging/dist/esm/noop.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n noopLogger = {\n trackEvent: async () => {\n },\n _internal: {\n ready: Promise.resolve(),\n anonId: \"\"\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.62.0/node_modules/@account-kit/logging/dist/esm/index.js\n function createLogger(_context) {\n const innerLogger = noopLogger;\n const logger = {\n ...innerLogger,\n profiled(name, func) {\n return function(...args) {\n const start = Date.now();\n const result = func.apply(this, args);\n if (result instanceof Promise) {\n return result.then((res) => {\n innerLogger.trackEvent({\n name: \"performance\",\n data: {\n executionTimeMs: Date.now() - start,\n functionName: name\n }\n });\n return res;\n });\n }\n innerLogger.trackEvent({\n name: \"performance\",\n data: {\n executionTimeMs: Date.now() - start,\n functionName: name\n }\n });\n return result;\n };\n }\n };\n return logger;\n }\n var init_esm7 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.62.0/node_modules/@account-kit/logging/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_noop();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/metrics.js\n var InfraLogger;\n var init_metrics = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/metrics.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm7();\n init_version6();\n InfraLogger = createLogger({\n package: \"@account-kit/infra\",\n version: VERSION2\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/decorators/smartAccount.js\n function logSendUoEvent(chainId, account) {\n const signerType = isSmartAccountWithSigner(account) ? account.getSigner().signerType : \"unknown\";\n InfraLogger.trackEvent({\n name: \"client_send_uo\",\n data: {\n chainId,\n signerType,\n entryPoint: account.getEntryPoint().address\n }\n });\n }\n var alchemyActions;\n var init_smartAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/decorators/smartAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_simulateUserOperationChanges();\n init_metrics();\n alchemyActions = (client_) => ({\n simulateUserOperation: async (args) => {\n const client = clientHeaderTrack(client_, \"simulateUserOperation\");\n return simulateUserOperationChanges(client, args);\n },\n async sendUserOperation(args) {\n const client = clientHeaderTrack(client_, \"infraSendUserOperation\");\n const { account = client.account } = args;\n const result = sendUserOperation(client, args);\n logSendUoEvent(client.chain.id, account);\n return result;\n },\n sendTransaction: async (args, overrides, context2) => {\n const client = clientHeaderTrack(client_, \"sendTransaction\");\n const { account = client.account } = args;\n const result = await sendTransaction2(client, args, overrides, context2);\n logSendUoEvent(client.chain.id, account);\n return result;\n },\n async sendTransactions(args) {\n const client = clientHeaderTrack(client_, \"sendTransactions\");\n const { account = client.account } = args;\n const result = sendTransactions(client, args);\n logSendUoEvent(client.chain.id, account);\n return result;\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/rpcClient.js\n var createAlchemyPublicRpcClient;\n var init_rpcClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/rpcClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n createAlchemyPublicRpcClient = ({ transport, chain: chain2 }) => {\n return createBundlerClient({\n chain: chain2,\n transport\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/defaults.js\n var getDefaultUserOperationFeeOptions2;\n var init_defaults2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/defaults.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains2();\n getDefaultUserOperationFeeOptions2 = (chain2) => {\n const feeOptions = {\n maxFeePerGas: { multiplier: 1.5 },\n maxPriorityFeePerGas: { multiplier: 1.05 }\n };\n if ((/* @__PURE__ */ new Set([\n arbitrum2.id,\n arbitrumGoerli2.id,\n arbitrumSepolia2.id,\n optimism2.id,\n optimismGoerli2.id,\n optimismSepolia2.id\n ])).has(chain2.id)) {\n feeOptions.preVerificationGas = { multiplier: 1.05 };\n }\n return feeOptions;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/feeEstimator.js\n var alchemyFeeEstimator;\n var init_feeEstimator2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/feeEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n alchemyFeeEstimator = (transport) => async (struct, { overrides, feeOptions, client: client_ }) => {\n const client = clientHeaderTrack(client_, \"alchemyFeeEstimator\");\n const transport_ = transport({ chain: client.chain });\n let [block, maxPriorityFeePerGasEstimate] = await Promise.all([\n client.getBlock({ blockTag: \"latest\" }),\n // it is a fair assumption that if someone is using this Alchemy Middleware, then they are using Alchemy RPC\n transport_.request({\n method: \"rundler_maxPriorityFeePerGas\",\n params: []\n })\n ]);\n const baseFeePerGas = block.baseFeePerGas;\n if (baseFeePerGas == null) {\n throw new Error(\"baseFeePerGas is null\");\n }\n const maxPriorityFeePerGas = applyUserOpOverrideOrFeeOption(maxPriorityFeePerGasEstimate, overrides?.maxPriorityFeePerGas, feeOptions?.maxPriorityFeePerGas);\n const maxFeePerGas = applyUserOpOverrideOrFeeOption(bigIntMultiply(baseFeePerGas, 1.5) + BigInt(maxPriorityFeePerGas), overrides?.maxFeePerGas, feeOptions?.maxFeePerGas);\n return {\n ...struct,\n maxPriorityFeePerGas,\n maxFeePerGas\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/gas-manager.js\n var AlchemyPaymasterAddressV06Unify, AlchemyPaymasterAddressV07Unify, AlchemyPaymasterAddressV4, AlchemyPaymasterAddressV3, AlchemyPaymasterAddressV2, ArbSepoliaPaymasterAddress, AlchemyPaymasterAddressV1, AlchemyPaymasterAddressV07V2, AlchemyPaymasterAddressV07V1, getAlchemyPaymasterAddress, PermitTypes, ERC20Abis, EIP7597Abis;\n var init_gas_manager = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/gas-manager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains2();\n AlchemyPaymasterAddressV06Unify = \"0x0000000000ce04e2359130e7d0204A5249958921\";\n AlchemyPaymasterAddressV07Unify = \"0x00000000000667F27D4DB42334ec11a25db7EBb4\";\n AlchemyPaymasterAddressV4 = \"0xEaf0Cde110a5d503f2dD69B3a49E031e29b3F9D2\";\n AlchemyPaymasterAddressV3 = \"0x4f84a207A80c39E9e8BaE717c1F25bA7AD1fB08F\";\n AlchemyPaymasterAddressV2 = \"0x4Fd9098af9ddcB41DA48A1d78F91F1398965addc\";\n ArbSepoliaPaymasterAddress = \"0x0804Afe6EEFb73ce7F93CD0d5e7079a5a8068592\";\n AlchemyPaymasterAddressV1 = \"0xc03aac639bb21233e0139381970328db8bceeb67\";\n AlchemyPaymasterAddressV07V2 = \"0x2cc0c7981D846b9F2a16276556f6e8cb52BfB633\";\n AlchemyPaymasterAddressV07V1 = \"0xEF725Aa22d43Ea69FB22bE2EBe6ECa205a6BCf5B\";\n getAlchemyPaymasterAddress = (chain2, version7) => {\n switch (version7) {\n case \"0.6.0\":\n switch (chain2.id) {\n case fraxtalSepolia.id:\n case worldChainSepolia.id:\n case shapeSepolia.id:\n case unichainSepolia.id:\n case opbnbTestnet.id:\n case inkSepolia.id:\n case monadTestnet.id:\n case openlootSepolia.id:\n case gensynTestnet.id:\n case riseTestnet.id:\n case storyAeneid.id:\n case teaSepolia.id:\n case arbitrumGoerli2.id:\n case goerli2.id:\n case optimismGoerli2.id:\n case baseGoerli2.id:\n case polygonMumbai2.id:\n case worldChain.id:\n case shape.id:\n case unichainMainnet.id:\n case soneiumMinato.id:\n case soneiumMainnet.id:\n case opbnbMainnet.id:\n case beraChainBartio.id:\n case inkMainnet.id:\n case arbitrumNova2.id:\n case storyMainnet.id:\n case celoAlfajores.id:\n case celoMainnet.id:\n return AlchemyPaymasterAddressV4;\n case polygonAmoy2.id:\n case optimismSepolia2.id:\n case baseSepolia2.id:\n case zora2.id:\n case zoraSepolia2.id:\n case fraxtal2.id:\n return AlchemyPaymasterAddressV3;\n case mainnet2.id:\n case arbitrum2.id:\n case optimism2.id:\n case polygon2.id:\n case base2.id:\n return AlchemyPaymasterAddressV2;\n case arbitrumSepolia2.id:\n return ArbSepoliaPaymasterAddress;\n case sepolia2.id:\n return AlchemyPaymasterAddressV1;\n default:\n return AlchemyPaymasterAddressV06Unify;\n }\n case \"0.7.0\":\n switch (chain2.id) {\n case arbitrumNova2.id:\n case celoAlfajores.id:\n case celoMainnet.id:\n case gensynTestnet.id:\n case inkMainnet.id:\n case inkSepolia.id:\n case monadTestnet.id:\n case opbnbMainnet.id:\n case opbnbTestnet.id:\n case openlootSepolia.id:\n case riseTestnet.id:\n case shape.id:\n case shapeSepolia.id:\n case soneiumMainnet.id:\n case soneiumMinato.id:\n case storyAeneid.id:\n case storyMainnet.id:\n case teaSepolia.id:\n case unichainMainnet.id:\n case unichainSepolia.id:\n case worldChain.id:\n case worldChainSepolia.id:\n return AlchemyPaymasterAddressV07V1;\n case arbitrum2.id:\n case arbitrumGoerli2.id:\n case arbitrumSepolia2.id:\n case base2.id:\n case baseGoerli2.id:\n case baseSepolia2.id:\n case beraChainBartio.id:\n case fraxtal2.id:\n case fraxtalSepolia.id:\n case goerli2.id:\n case mainnet2.id:\n case optimism2.id:\n case optimismGoerli2.id:\n case optimismSepolia2.id:\n case polygon2.id:\n case polygonAmoy2.id:\n case polygonMumbai2.id:\n case sepolia2.id:\n case zora2.id:\n case zoraSepolia2.id:\n return AlchemyPaymasterAddressV07V2;\n default:\n return AlchemyPaymasterAddressV07Unify;\n }\n default:\n throw new Error(`Unsupported EntryPointVersion: ${version7}`);\n }\n };\n PermitTypes = {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" }\n ],\n Permit: [\n { name: \"owner\", type: \"address\" },\n { name: \"spender\", type: \"address\" },\n { name: \"value\", type: \"uint256\" },\n { name: \"nonce\", type: \"uint256\" },\n { name: \"deadline\", type: \"uint256\" }\n ]\n };\n ERC20Abis = [\n \"function decimals() public view returns (uint8)\",\n \"function balanceOf(address owner) external view returns (uint256)\",\n \"function allowance(address owner, address spender) external view returns (uint256)\",\n \"function approve(address spender, uint256 amount) external returns (bool)\"\n ];\n EIP7597Abis = [\n \"function nonces(address owner) external view returns (uint)\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/errors/base.js\n var BaseError5;\n var init_base4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/errors/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_version6();\n BaseError5 = class extends BaseError4 {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: VERSION2\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/errors/invalidSignedPermit.js\n var InvalidSignedPermit;\n var init_invalidSignedPermit = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/errors/invalidSignedPermit.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base4();\n InvalidSignedPermit = class extends BaseError5 {\n constructor(reason) {\n super([\"Invalid signed permit\"].join(\"\\n\"), {\n details: [reason, \"Please provide a valid signed permit\"].join(\"\\n\")\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidSignedPermit\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/gasManager.js\n function alchemyGasManagerMiddleware(policyId, policyToken) {\n const buildContext = async (args) => {\n const context2 = { policyId };\n const { account, client } = args;\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n if (policyToken !== void 0) {\n context2.erc20Context = {\n tokenAddress: policyToken.address,\n maxTokenAmount: policyToken.maxTokenAmount\n };\n if (policyToken.permit !== void 0) {\n const permit = await generateSignedPermit(client, account, policyToken);\n if (permit !== void 0) {\n context2.erc20Context.permit = permit;\n }\n } else if (args.context !== void 0) {\n context2.erc20Context.permit = extractSignedPermitFromContext(args.context);\n }\n }\n return context2;\n };\n return {\n dummyPaymasterAndData: async (uo, args) => {\n const context2 = await buildContext(args);\n const baseMiddleware = erc7677Middleware({ context: context2 });\n return baseMiddleware.dummyPaymasterAndData(uo, args);\n },\n paymasterAndData: async (uo, args) => {\n const context2 = await buildContext(args);\n const baseMiddleware = erc7677Middleware({ context: context2 });\n return baseMiddleware.paymasterAndData(uo, args);\n }\n };\n }\n function alchemyGasAndPaymasterAndDataMiddleware(params) {\n const { policyId, policyToken, transport, gasEstimatorOverride, feeEstimatorOverride } = params;\n return {\n dummyPaymasterAndData: async (uo, args) => {\n if (\n // No reason to generate dummy data if we are bypassing the paymaster.\n bypassPaymasterAndData(args.overrides) || // When using alchemy_requestGasAndPaymasterAndData, there is generally no reason to generate dummy\n // data. However, if the gas/feeEstimator is overriden, then this option should be enabled.\n !(gasEstimatorOverride || feeEstimatorOverride)\n ) {\n return noopMiddleware(uo, args);\n }\n return alchemyGasManagerMiddleware(policyId, policyToken).dummyPaymasterAndData(uo, args);\n },\n feeEstimator: (uo, args) => {\n return feeEstimatorOverride ? feeEstimatorOverride(uo, args) : bypassPaymasterAndData(args.overrides) ? alchemyFeeEstimator(transport)(uo, args) : noopMiddleware(uo, args);\n },\n gasEstimator: (uo, args) => {\n return gasEstimatorOverride ? gasEstimatorOverride(uo, args) : bypassPaymasterAndData(args.overrides) ? defaultGasEstimator(args.client)(uo, args) : noopMiddleware(uo, args);\n },\n paymasterAndData: async (uo, { account, client: client_, feeOptions, overrides: overrides_, context: uoContext }) => {\n const client = clientHeaderTrack(client_, \"alchemyFeeEstimator\");\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const userOp = deepHexlify(await resolveProperties(uo));\n const overrides = filterUndefined({\n maxFeePerGas: overrideField(\"maxFeePerGas\", overrides_, feeOptions, userOp),\n maxPriorityFeePerGas: overrideField(\"maxPriorityFeePerGas\", overrides_, feeOptions, userOp),\n callGasLimit: overrideField(\"callGasLimit\", overrides_, feeOptions, userOp),\n verificationGasLimit: overrideField(\"verificationGasLimit\", overrides_, feeOptions, userOp),\n preVerificationGas: overrideField(\"preVerificationGas\", overrides_, feeOptions, userOp),\n ...account.getEntryPoint().version === \"0.7.0\" ? {\n paymasterVerificationGasLimit: overrideField(\"paymasterVerificationGasLimit\", overrides_, feeOptions, userOp),\n paymasterPostOpGasLimit: overrideField(\"paymasterPostOpGasLimit\", overrides_, feeOptions, userOp)\n } : {}\n });\n let erc20Context = void 0;\n if (policyToken !== void 0) {\n erc20Context = {\n tokenAddress: policyToken.address,\n maxTokenAmount: policyToken.maxTokenAmount\n };\n if (policyToken.permit !== void 0) {\n const permit = await generateSignedPermit(client, account, policyToken);\n if (permit !== void 0) {\n erc20Context.permit = permit;\n }\n } else if (uoContext !== void 0) {\n erc20Context.permit = extractSignedPermitFromContext(uoContext);\n }\n }\n const result = await client.request({\n method: \"alchemy_requestGasAndPaymasterAndData\",\n params: [\n {\n policyId,\n entryPoint: account.getEntryPoint().address,\n userOperation: userOp,\n dummySignature: await account.getDummySignature(),\n overrides,\n ...erc20Context ? {\n erc20Context\n } : {}\n }\n ]\n });\n return {\n ...uo,\n ...result\n };\n }\n };\n }\n function extractSignedPermitFromContext(context2) {\n if (context2.signedPermit === void 0) {\n return void 0;\n }\n if (typeof context2.signedPermit !== \"object\") {\n throw new InvalidSignedPermit(\"signedPermit is not an object\");\n }\n if (typeof context2.signedPermit.value !== \"bigint\") {\n throw new InvalidSignedPermit(\"signedPermit.value is not a bigint\");\n }\n if (typeof context2.signedPermit.deadline !== \"bigint\") {\n throw new InvalidSignedPermit(\"signedPermit.deadline is not a bigint\");\n }\n if (!isHex(context2.signedPermit.signature)) {\n throw new InvalidSignedPermit(\"signedPermit.signature is not a hex string\");\n }\n return encodeSignedPermit(context2.signedPermit.value, context2.signedPermit.deadline, context2.signedPermit.signature);\n }\n function encodeSignedPermit(value, deadline, signedPermit) {\n return encodeAbiParameters([{ type: \"uint256\" }, { type: \"uint256\" }, { type: \"bytes\" }], [value, deadline, signedPermit]);\n }\n var overrideField, generateSignedPermit;\n var init_gasManager = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/gasManager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_feeEstimator2();\n init_gas_manager();\n init_invalidSignedPermit();\n overrideField = (field, overrides, feeOptions, userOperation) => {\n let _field = field;\n if (overrides?.[_field] != null) {\n if (isBigNumberish(overrides[_field])) {\n return deepHexlify(overrides[_field]);\n } else {\n return {\n multiplier: Number(overrides[_field].multiplier)\n };\n }\n }\n if (isMultiplier(feeOptions?.[field])) {\n return {\n multiplier: Number(feeOptions[field].multiplier)\n };\n }\n const userOpField = userOperation[field];\n if (isHex(userOpField) && fromHex(userOpField, \"bigint\") > 0n) {\n return userOpField;\n }\n return void 0;\n };\n generateSignedPermit = async (client, account, policyToken) => {\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n if (!policyToken.permit) {\n throw new Error(\"permit is missing\");\n }\n if (!policyToken.permit?.erc20Name || !policyToken.permit?.version) {\n throw new Error(\"erc20Name or version is missing\");\n }\n const paymasterAddress = policyToken.permit.paymasterAddress ?? getAlchemyPaymasterAddress(client.chain, account.getEntryPoint().version);\n if (paymasterAddress === void 0 || paymasterAddress === \"0x\") {\n throw new Error(\"no paymaster contract address available\");\n }\n let allowanceFuture = client.call({\n to: policyToken.address,\n data: encodeFunctionData({\n abi: parseAbi(ERC20Abis),\n functionName: \"allowance\",\n args: [account.address, paymasterAddress]\n })\n });\n let nonceFuture = client.call({\n to: policyToken.address,\n data: encodeFunctionData({\n abi: parseAbi(EIP7597Abis),\n functionName: \"nonces\",\n args: [account.address]\n })\n });\n const [allowanceResponse, nonceResponse] = await Promise.all([\n allowanceFuture,\n nonceFuture\n ]);\n if (!allowanceResponse.data) {\n throw new Error(\"No allowance returned from erc20 contract call\");\n }\n if (!nonceResponse.data) {\n throw new Error(\"No nonces returned from erc20 contract call\");\n }\n const permitLimit = policyToken.permit.autoPermitApproveTo;\n const currentAllowance = BigInt(allowanceResponse.data);\n if (currentAllowance > policyToken.permit.autoPermitBelow) {\n return void 0;\n }\n const nonce = BigInt(nonceResponse.data);\n const deadline = BigInt(Math.floor(Date.now() / 1e3) + 60 * 10);\n const typedPermitData = {\n types: PermitTypes,\n primaryType: \"Permit\",\n domain: {\n name: policyToken.permit.erc20Name ?? \"\",\n version: policyToken.permit.version ?? \"\",\n chainId: BigInt(client.chain.id),\n verifyingContract: policyToken.address\n },\n message: {\n owner: account.address,\n spender: paymasterAddress,\n value: permitLimit,\n nonce,\n deadline\n }\n };\n const signedPermit = await account.signTypedData(typedPermitData);\n return encodeSignedPermit(permitLimit, deadline, signedPermit);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/userOperationSimulator.js\n function alchemyUserOperationSimulator(transport) {\n return async (struct, { account, client }) => {\n const uoSimResult = await transport({ chain: client.chain }).request({\n method: \"alchemy_simulateUserOperationAssetChanges\",\n params: [\n deepHexlify(await resolveProperties(struct)),\n account.getEntryPoint().address\n ]\n });\n if (uoSimResult.error) {\n throw new Error(uoSimResult.error.message);\n }\n return struct;\n };\n }\n var init_userOperationSimulator = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/userOperationSimulator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/smartAccountClient.js\n function getSignerTypeHeader(account) {\n return { \"Alchemy-Aa-Sdk-Signer\": account.getSigner().signerType };\n }\n function createAlchemySmartAccountClient(config2) {\n if (!config2.chain) {\n throw new ChainNotFoundError2();\n }\n const feeOptions = config2.opts?.feeOptions ?? getDefaultUserOperationFeeOptions2(config2.chain);\n const scaClient = createSmartAccountClient({\n account: config2.account,\n transport: config2.transport,\n chain: config2.chain,\n type: \"AlchemySmartAccountClient\",\n opts: {\n ...config2.opts,\n feeOptions\n },\n feeEstimator: config2.feeEstimator ?? alchemyFeeEstimator(config2.transport),\n gasEstimator: config2.gasEstimator,\n customMiddleware: async (struct, args) => {\n if (isSmartAccountWithSigner(args.account)) {\n config2.transport.updateHeaders(getSignerTypeHeader(args.account));\n }\n return config2.customMiddleware ? config2.customMiddleware(struct, args) : struct;\n },\n ...config2.policyId ? alchemyGasAndPaymasterAndDataMiddleware({\n policyId: config2.policyId,\n policyToken: config2.policyToken,\n transport: config2.transport,\n gasEstimatorOverride: config2.gasEstimator,\n feeEstimatorOverride: config2.feeEstimator\n }) : {},\n userOperationSimulator: config2.useSimulation ? alchemyUserOperationSimulator(config2.transport) : void 0,\n signUserOperation: config2.signUserOperation,\n addBreadCrumb(breadcrumb) {\n const oldConfig = config2.transport.config;\n const dynamicFetchOptions = config2.transport.dynamicFetchOptions;\n const newTransport = alchemy({ ...oldConfig });\n newTransport.updateHeaders(headersUpdate(breadcrumb)(convertHeadersToObject(dynamicFetchOptions?.headers)));\n return createAlchemySmartAccountClient({\n ...config2,\n transport: newTransport\n });\n }\n }).extend(alchemyActions).extend((client_) => ({\n addBreadcrumb(breadcrumb) {\n return clientHeaderTrack(client_, breadcrumb);\n }\n }));\n if (config2.account && isSmartAccountWithSigner(config2.account)) {\n config2.transport.updateHeaders(getSignerTypeHeader(config2.account));\n }\n return scaClient;\n }\n var init_smartAccountClient3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/smartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_alchemyTransport();\n init_defaults2();\n init_feeEstimator2();\n init_gasManager();\n init_userOperationSimulator();\n init_smartAccount();\n init_alchemyTrackerHeaders();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/exports/index.js\n var exports_exports2 = {};\n __export(exports_exports2, {\n alchemy: () => alchemy,\n alchemyActions: () => alchemyActions,\n alchemyFeeEstimator: () => alchemyFeeEstimator,\n alchemyGasAndPaymasterAndDataMiddleware: () => alchemyGasAndPaymasterAndDataMiddleware,\n alchemyGasManagerMiddleware: () => alchemyGasManagerMiddleware,\n alchemyUserOperationSimulator: () => alchemyUserOperationSimulator,\n arbitrum: () => arbitrum2,\n arbitrumGoerli: () => arbitrumGoerli2,\n arbitrumNova: () => arbitrumNova2,\n arbitrumSepolia: () => arbitrumSepolia2,\n base: () => base2,\n baseGoerli: () => baseGoerli2,\n baseSepolia: () => baseSepolia2,\n beraChainBartio: () => beraChainBartio,\n bobaMainnet: () => bobaMainnet,\n bobaSepolia: () => bobaSepolia,\n celoAlfajores: () => celoAlfajores,\n celoMainnet: () => celoMainnet,\n createAlchemyPublicRpcClient: () => createAlchemyPublicRpcClient,\n createAlchemySmartAccountClient: () => createAlchemySmartAccountClient,\n defineAlchemyChain: () => defineAlchemyChain,\n fraxtal: () => fraxtal2,\n fraxtalSepolia: () => fraxtalSepolia,\n gensynTestnet: () => gensynTestnet,\n getAlchemyPaymasterAddress: () => getAlchemyPaymasterAddress,\n getDefaultUserOperationFeeOptions: () => getDefaultUserOperationFeeOptions2,\n goerli: () => goerli2,\n headersUpdate: () => headersUpdate,\n inkMainnet: () => inkMainnet,\n inkSepolia: () => inkSepolia,\n isAlchemySmartAccountClient: () => isAlchemySmartAccountClient,\n isAlchemyTransport: () => isAlchemyTransport,\n mainnet: () => mainnet2,\n mekong: () => mekong,\n monadTestnet: () => monadTestnet,\n mutateRemoveTrackingHeaders: () => mutateRemoveTrackingHeaders,\n opbnbMainnet: () => opbnbMainnet,\n opbnbTestnet: () => opbnbTestnet,\n openlootSepolia: () => openlootSepolia,\n optimism: () => optimism2,\n optimismGoerli: () => optimismGoerli2,\n optimismSepolia: () => optimismSepolia2,\n polygon: () => polygon2,\n polygonAmoy: () => polygonAmoy2,\n polygonMumbai: () => polygonMumbai2,\n riseTestnet: () => riseTestnet,\n sepolia: () => sepolia2,\n shape: () => shape,\n shapeSepolia: () => shapeSepolia,\n simulateUserOperationChanges: () => simulateUserOperationChanges,\n soneiumMainnet: () => soneiumMainnet,\n soneiumMinato: () => soneiumMinato,\n storyAeneid: () => storyAeneid,\n storyMainnet: () => storyMainnet,\n teaSepolia: () => teaSepolia,\n unichainMainnet: () => unichainMainnet,\n unichainSepolia: () => unichainSepolia,\n worldChain: () => worldChain,\n worldChainSepolia: () => worldChainSepolia,\n zora: () => zora2,\n zoraSepolia: () => zoraSepolia2\n });\n var init_exports2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/exports/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_simulateUserOperationChanges();\n init_alchemyTransport();\n init_chains2();\n init_smartAccount();\n init_isAlchemySmartAccountClient();\n init_rpcClient();\n init_smartAccountClient3();\n init_defaults2();\n init_gas_manager();\n init_feeEstimator2();\n init_alchemyTrackerHeaders();\n init_gasManager();\n init_userOperationSimulator();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountAbi_v1.js\n var LightAccountAbi_v1;\n var init_LightAccountAbi_v1 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountAbi_v1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LightAccountAbi_v1 = [\n {\n inputs: [\n {\n internalType: \"contract IEntryPoint\",\n name: \"anEntryPoint\",\n type: \"address\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n { inputs: [], name: \"ArrayLengthMismatch\", type: \"error\" },\n { inputs: [], name: \"InvalidInitialization\", type: \"error\" },\n {\n inputs: [{ internalType: \"address\", name: \"owner\", type: \"address\" }],\n name: \"InvalidOwner\",\n type: \"error\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"caller\", type: \"address\" }],\n name: \"NotAuthorized\",\n type: \"error\"\n },\n { inputs: [], name: \"NotInitializing\", type: \"error\" },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"previousAdmin\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"newAdmin\",\n type: \"address\"\n }\n ],\n name: \"AdminChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"beacon\",\n type: \"address\"\n }\n ],\n name: \"BeaconUpgraded\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint64\",\n name: \"version\",\n type: \"uint64\"\n }\n ],\n name: \"Initialized\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IEntryPoint\",\n name: \"entryPoint\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n }\n ],\n name: \"LightAccountInitialized\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"previousOwner\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\"\n }\n ],\n name: \"OwnershipTransferred\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"implementation\",\n type: \"address\"\n }\n ],\n name: \"Upgraded\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"addDeposit\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"domainSeparator\",\n outputs: [{ internalType: \"bytes32\", name: \"\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes\", name: \"message\", type: \"bytes\" }],\n name: \"encodeMessageData\",\n outputs: [{ internalType: \"bytes\", name: \"\", type: \"bytes\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"entryPoint\",\n outputs: [\n { internalType: \"contract IEntryPoint\", name: \"\", type: \"address\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"dest\", type: \"address\" },\n { internalType: \"uint256\", name: \"value\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"func\", type: \"bytes\" }\n ],\n name: \"execute\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address[]\", name: \"dest\", type: \"address[]\" },\n { internalType: \"bytes[]\", name: \"func\", type: \"bytes[]\" }\n ],\n name: \"executeBatch\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address[]\", name: \"dest\", type: \"address[]\" },\n { internalType: \"uint256[]\", name: \"value\", type: \"uint256[]\" },\n { internalType: \"bytes[]\", name: \"func\", type: \"bytes[]\" }\n ],\n name: \"executeBatch\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getDeposit\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes\", name: \"message\", type: \"bytes\" }],\n name: \"getMessageHash\",\n outputs: [{ internalType: \"bytes32\", name: \"\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getNonce\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"anOwner\", type: \"address\" }],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"bytes32\", name: \"digest\", type: \"bytes32\" },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n name: \"isValidSignature\",\n outputs: [{ internalType: \"bytes4\", name: \"\", type: \"bytes4\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint256[]\", name: \"\", type: \"uint256[]\" },\n { internalType: \"uint256[]\", name: \"\", type: \"uint256[]\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" }\n ],\n name: \"onERC1155BatchReceived\",\n outputs: [{ internalType: \"bytes4\", name: \"\", type: \"bytes4\" }],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint256\", name: \"\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" }\n ],\n name: \"onERC1155Received\",\n outputs: [{ internalType: \"bytes4\", name: \"\", type: \"bytes4\" }],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint256\", name: \"\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" }\n ],\n name: \"onERC721Received\",\n outputs: [{ internalType: \"bytes4\", name: \"\", type: \"bytes4\" }],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"owner\",\n outputs: [{ internalType: \"address\", name: \"\", type: \"address\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"proxiableUUID\",\n outputs: [{ internalType: \"bytes32\", name: \"\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes4\", name: \"interfaceId\", type: \"bytes4\" }],\n name: \"supportsInterface\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint256\", name: \"\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" }\n ],\n name: \"tokensReceived\",\n outputs: [],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"newOwner\", type: \"address\" }],\n name: \"transferOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"newImplementation\", type: \"address\" }\n ],\n name: \"upgradeTo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"newImplementation\", type: \"address\" },\n { internalType: \"bytes\", name: \"data\", type: \"bytes\" }\n ],\n name: \"upgradeToAndCall\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"initCode\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n { internalType: \"uint256\", name: \"callGasLimit\", type: \"uint256\" },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"uint256\", name: \"maxFeePerGas\", type: \"uint256\" },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n { internalType: \"bytes\", name: \"paymasterAndData\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct UserOperation\",\n name: \"userOp\",\n type: \"tuple\"\n },\n { internalType: \"bytes32\", name: \"userOpHash\", type: \"bytes32\" },\n { internalType: \"uint256\", name: \"missingAccountFunds\", type: \"uint256\" }\n ],\n name: \"validateUserOp\",\n outputs: [\n { internalType: \"uint256\", name: \"validationData\", type: \"uint256\" }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n { internalType: \"uint256\", name: \"amount\", type: \"uint256\" }\n ],\n name: \"withdrawDepositTo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n { stateMutability: \"payable\", type: \"receive\" }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountAbi_v2.js\n var LightAccountAbi_v2;\n var init_LightAccountAbi_v2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountAbi_v2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LightAccountAbi_v2 = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint_\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"addDeposit\",\n inputs: [],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verifyingContract\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"extensions\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n { name: \"dest\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"func\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n { name: \"dest\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"func\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n { name: \"dest\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"value\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"func\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getDeposit\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getNonce\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initialize\",\n inputs: [{ name: \"owner_\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"hash\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"result\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [{ name: \"newOwner\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"gasFees\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawDepositTo\",\n inputs: [\n {\n name: \"withdrawAddress\",\n type: \"address\",\n internalType: \"address payable\"\n },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"LightAccountInitialized\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n indexed: true,\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"owner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"ArrayLengthMismatch\", inputs: [] },\n { type: \"error\", name: \"ECDSAInvalidSignature\", inputs: [] },\n {\n type: \"error\",\n name: \"ECDSAInvalidSignatureLength\",\n inputs: [{ name: \"length\", type: \"uint256\", internalType: \"uint256\" }]\n },\n {\n type: \"error\",\n name: \"ECDSAInvalidSignatureS\",\n inputs: [{ name: \"s\", type: \"bytes32\", internalType: \"bytes32\" }]\n },\n { type: \"error\", name: \"InvalidInitialization\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"InvalidSignatureType\", inputs: [] },\n {\n type: \"error\",\n name: \"NotAuthorized\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"NotInitializing\", inputs: [] },\n { type: \"error\", name: \"UnauthorizedCallContext\", inputs: [] },\n { type: \"error\", name: \"UpgradeFailed\", inputs: [] },\n { type: \"error\", name: \"ZeroAddressNotAllowed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountFactoryAbi_v1.js\n var LightAccountFactoryAbi_v1;\n var init_LightAccountFactoryAbi_v1 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountFactoryAbi_v1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LightAccountFactoryAbi_v1 = [\n {\n inputs: [\n {\n internalType: \"contract IEntryPoint\",\n name: \"_entryPoint\",\n type: \"address\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n inputs: [],\n name: \"accountImplementation\",\n outputs: [\n {\n internalType: \"contract LightAccount\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"salt\",\n type: \"uint256\"\n }\n ],\n name: \"createAccount\",\n outputs: [\n {\n internalType: \"contract LightAccount\",\n name: \"ret\",\n type: \"address\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"salt\",\n type: \"uint256\"\n }\n ],\n name: \"getAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountFactoryAbi_v2.js\n var LightAccountFactoryAbi_v2;\n var init_LightAccountFactoryAbi_v2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountFactoryAbi_v2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LightAccountFactoryAbi_v2 = [\n {\n type: \"constructor\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"ACCOUNT_IMPLEMENTATION\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract LightAccount\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"ENTRY_POINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n { name: \"unstakeDelay\", type: \"uint32\", internalType: \"uint32\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"contract LightAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [{ name: \"newOwner\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n { name: \"to\", type: \"address\", internalType: \"address payable\" },\n { name: \"token\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [{ name: \"to\", type: \"address\", internalType: \"address payable\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AddressEmptyCode\",\n inputs: [{ name: \"target\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"AddressInsufficientBalance\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"FailedInnerCall\", inputs: [] },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidEntryPoint\",\n inputs: [{ name: \"entryPoint\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"OwnableInvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"OwnableUnauthorizedAccount\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"SafeERC20FailedOperation\",\n inputs: [{ name: \"token\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"TransferFailed\", inputs: [] },\n { type: \"error\", name: \"ZeroAddressNotAllowed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/utils.js\n async function getLightAccountVersionForAccount(account, chain2) {\n const accountType = account.source;\n const factoryAddress = await account.getFactoryAddress();\n const implAddress = await account.getImplementationAddress();\n const implToVersion = new Map(Object.entries(AccountVersionRegistry[accountType]).map((pair) => {\n const [version8, def] = pair;\n if (def.addresses.overrides != null && chain2.id in def.addresses.overrides) {\n return [def.addresses.overrides[chain2.id].impl, version8];\n }\n return [def.addresses.default.impl, version8];\n }));\n const factoryToVersion = new Map(Object.entries(AccountVersionRegistry[accountType]).map((pair) => {\n const [version8, def] = pair;\n if (def.addresses.overrides != null && chain2.id in def.addresses.overrides) {\n return [def.addresses.overrides[chain2.id].factory, version8];\n }\n return [def.addresses.default.factory, version8];\n }));\n const version7 = fromHex(implAddress, \"bigint\") === 0n ? factoryToVersion.get(factoryAddress.toLowerCase()) : implToVersion.get(implAddress.toLowerCase());\n if (!version7) {\n throw new Error(`Could not determine ${account.source} version for chain ${chain2.id}`);\n }\n return AccountVersionRegistry[accountType][version7];\n }\n var AccountVersionRegistry, defaultLightAccountVersion, getDefaultLightAccountFactoryAddress, getDefaultMultiOwnerLightAccountFactoryAddress, LightAccountUnsupported1271Impls, LightAccountUnsupported1271Factories;\n var init_utils10 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n AccountVersionRegistry = {\n LightAccount: {\n \"v1.0.1\": {\n entryPointVersion: \"0.6.0\",\n addresses: {\n default: {\n factory: \"0x000000893A26168158fbeaDD9335Be5bC96592E2\".toLowerCase(),\n impl: \"0xc1b2fc4197c9187853243e6e4eb5a4af8879a1c0\".toLowerCase()\n }\n }\n },\n \"v1.0.2\": {\n entryPointVersion: \"0.6.0\",\n addresses: {\n default: {\n factory: \"0x00000055C0b4fA41dde26A74435ff03692292FBD\".toLowerCase(),\n impl: \"0x5467b1947F47d0646704EB801E075e72aeAe8113\".toLowerCase()\n }\n }\n },\n \"v1.1.0\": {\n entryPointVersion: \"0.6.0\",\n addresses: {\n default: {\n factory: \"0x00004EC70002a32400f8ae005A26081065620D20\".toLowerCase(),\n impl: \"0xae8c656ad28F2B59a196AB61815C16A0AE1c3cba\".toLowerCase()\n }\n }\n },\n \"v2.0.0\": {\n entryPointVersion: \"0.7.0\",\n addresses: {\n default: {\n factory: \"0x0000000000400CdFef5E2714E63d8040b700BC24\".toLowerCase(),\n impl: \"0x8E8e658E22B12ada97B402fF0b044D6A325013C7\".toLowerCase()\n }\n }\n }\n },\n MultiOwnerLightAccount: {\n \"v2.0.0\": {\n entryPointVersion: \"0.7.0\",\n addresses: {\n default: {\n factory: \"0x000000000019d2Ee9F2729A65AfE20bb0020AefC\".toLowerCase(),\n impl: \"0xd2c27F9eE8E4355f71915ffD5568cB3433b6823D\".toLowerCase()\n }\n }\n }\n }\n };\n defaultLightAccountVersion = () => \"v2.0.0\";\n getDefaultLightAccountFactoryAddress = (chain2, version7) => {\n return AccountVersionRegistry.LightAccount[version7].addresses.overrides?.[chain2.id]?.factory ?? AccountVersionRegistry.LightAccount[version7].addresses.default.factory;\n };\n getDefaultMultiOwnerLightAccountFactoryAddress = (chain2, version7) => {\n return AccountVersionRegistry.MultiOwnerLightAccount[version7].addresses.overrides?.[chain2.id]?.factory ?? AccountVersionRegistry.MultiOwnerLightAccount[version7].addresses.default.factory;\n };\n LightAccountUnsupported1271Impls = [\n AccountVersionRegistry.LightAccount[\"v1.0.1\"],\n AccountVersionRegistry.LightAccount[\"v1.0.2\"]\n ];\n LightAccountUnsupported1271Factories = new Set(LightAccountUnsupported1271Impls.map((x4) => [\n x4.addresses.default.factory,\n ...Object.values(x4.addresses.overrides ?? {}).map((z2) => z2.factory)\n ]).flat());\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/base.js\n async function createLightAccountBase({ transport, chain: chain2, signer, abi: abi2, version: version7, type, entryPoint, accountAddress, getAccountInitCode }) {\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const encodeUpgradeToAndCall = async ({ upgradeToAddress, upgradeToInitData }) => {\n const storage = await client.getStorageAt({\n address: accountAddress,\n // the slot at which impl addresses are stored by UUPS\n slot: \"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\"\n });\n if (storage == null) {\n throw new FailedToGetStorageSlotError(\"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\", \"Proxy Implementation Address\");\n }\n const implementationAddresses = Object.values(AccountVersionRegistry[type]).map((x4) => x4.addresses.overrides?.[chain2.id]?.impl ?? x4.addresses.default.impl);\n if (fromHex(storage, \"number\") !== 0 && !implementationAddresses.some((x4) => x4 === trim(storage))) {\n throw new Error(`could not determine if smart account implementation is ${type} ${String(version7)}`);\n }\n return encodeFunctionData({\n abi: abi2,\n functionName: \"upgradeToAndCall\",\n args: [upgradeToAddress, upgradeToInitData]\n });\n };\n const get1271Wrapper = (hashedMessage, version8) => {\n return {\n // EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\n // https://github.com/alchemyplatform/light-account/blob/main/src/LightAccount.sol#L236\n domain: {\n chainId: Number(client.chain.id),\n name: type,\n verifyingContract: accountAddress,\n version: version8\n },\n types: {\n LightAccountMessage: [{ name: \"message\", type: \"bytes\" }]\n },\n message: {\n message: hashedMessage\n },\n primaryType: \"LightAccountMessage\"\n };\n };\n const prepareSign = async (params) => {\n const messageHash = params.type === \"personal_sign\" ? hashMessage(params.data) : hashTypedData(params.data);\n switch (version7) {\n case \"v1.0.1\":\n return params;\n case \"v1.0.2\":\n throw new Error(`Version ${String(version7)} of LightAccount doesn't support 1271`);\n case \"v1.1.0\":\n return {\n type: \"eth_signTypedData_v4\",\n data: get1271Wrapper(messageHash, \"1\")\n };\n case \"v2.0.0\":\n return {\n type: \"eth_signTypedData_v4\",\n data: get1271Wrapper(messageHash, \"2\")\n };\n default:\n throw new Error(`Unknown version ${String(version7)} of LightAccount`);\n }\n };\n const formatSign = async (signature) => {\n return version7 === \"v2.0.0\" ? concat([SignatureType.EOA, signature]) : signature;\n };\n const account = await toSmartContractAccount({\n transport,\n chain: chain2,\n entryPoint,\n accountAddress,\n source: type,\n getAccountInitCode,\n prepareSign,\n formatSign,\n encodeExecute: async ({ target, data, value }) => {\n return encodeFunctionData({\n abi: abi2,\n functionName: \"execute\",\n args: [target, value ?? 0n, data]\n });\n },\n encodeBatchExecute: async (txs) => {\n const [targets, values, datas] = txs.reduce((accum, curr) => {\n accum[0].push(curr.target);\n accum[1].push(curr.value ?? 0n);\n accum[2].push(curr.data);\n return accum;\n }, [[], [], []]);\n return encodeFunctionData({\n abi: abi2,\n functionName: \"executeBatch\",\n args: [targets, values, datas]\n });\n },\n signUserOperationHash: async (uoHash) => {\n const signature = await signer.signMessage({ raw: uoHash });\n switch (version7) {\n case \"v2.0.0\":\n return concat([SignatureType.EOA, signature]);\n default:\n return signature;\n }\n },\n async signMessage({ message }) {\n const { type: type2, data } = await prepareSign({\n type: \"personal_sign\",\n data: message\n });\n const sig = type2 === \"personal_sign\" ? await signer.signMessage(data) : await signer.signTypedData(data);\n return formatSign(sig);\n },\n async signTypedData(params) {\n const { type: type2, data } = await prepareSign({\n type: \"eth_signTypedData_v4\",\n data: params\n });\n const sig = type2 === \"personal_sign\" ? await signer.signMessage(data) : await signer.signTypedData(data);\n return formatSign(sig);\n },\n getDummySignature: () => {\n const signature = \"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\";\n switch (version7) {\n case \"v1.0.1\":\n case \"v1.0.2\":\n case \"v1.1.0\":\n return signature;\n case \"v2.0.0\":\n return concat([SignatureType.EOA, signature]);\n default:\n throw new Error(`Unknown version ${type} of ${String(version7)}`);\n }\n },\n encodeUpgradeToAndCall\n });\n return {\n ...account,\n source: type,\n getLightAccountVersion: () => version7,\n getSigner: () => signer\n };\n }\n var SignatureType;\n var init_base5 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_utils10();\n (function(SignatureType3) {\n SignatureType3[\"EOA\"] = \"0x00\";\n SignatureType3[\"CONTRACT\"] = \"0x01\";\n SignatureType3[\"CONTRACT_WITH_ADDR\"] = \"0x02\";\n })(SignatureType || (SignatureType = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/OZ_ERC1967Proxy.js\n var OZ_ERC1967Proxy_ConstructorAbi;\n var init_OZ_ERC1967Proxy = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/OZ_ERC1967Proxy.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n OZ_ERC1967Proxy_ConstructorAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"_logic\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"_data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/predictAddress.js\n function predictLightAccountAddress({ factoryAddress, salt, ownerAddress, version: version7 }) {\n const implementationAddress = (\n // If we aren't using the default factory address, we compute the implementation address from the factory's `create` deployment.\n // This is accurate for both LA v1 and v2 factories. If we are using the default factory address, we use the implementation address from the registry.\n factoryAddress !== AccountVersionRegistry.LightAccount[version7].addresses.default.factory ? getContractAddress2({\n from: factoryAddress,\n nonce: 1n\n }) : AccountVersionRegistry.LightAccount[version7].addresses.default.impl\n );\n switch (version7) {\n case \"v1.0.1\":\n case \"v1.0.2\":\n case \"v1.1.0\":\n const LAv1_proxy_bytecode = \"0x60406080815261042c908138038061001681610218565b93843982019181818403126102135780516001600160a01b038116808203610213576020838101516001600160401b0394919391858211610213570186601f820112156102135780519061007161006c83610253565b610218565b918083528583019886828401011161021357888661008f930161026e565b813b156101b9577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916841790556000927fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a28051158015906101b2575b61010b575b855160e790816103458239f35b855194606086019081118682101761019e578697849283926101889952602788527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c87890152660819985a5b195960ca1b8a8901525190845af4913d15610194573d9061017a61006c83610253565b91825281943d92013e610291565b508038808080806100fe565b5060609250610291565b634e487b7160e01b84526041600452602484fd5b50826100f9565b855162461bcd60e51b815260048101859052602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b600080fd5b6040519190601f01601f191682016001600160401b0381118382101761023d57604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b03811161023d57601f01601f191660200190565b60005b8381106102815750506000910152565b8181015183820152602001610271565b919290156102f357508151156102a5575090565b3b156102ae5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156103065750805190602001fd5b6044604051809262461bcd60e51b825260206004830152610336815180928160248601526020868601910161026e565b601f01601f19168101030190fdfe60806040523615605f5773ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e15605b573d90f35b3d90fd5b73ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e15605b573d90f3fea26469706673582212205da2750cd2b0cadfd354d8a1ca4752ed7f22214c8069d852f7dc6b8e9e5ee66964736f6c63430008150033\";\n return getContractAddress2({\n from: factoryAddress,\n opcode: \"CREATE2\",\n salt: toHex(salt, { size: 32 }),\n bytecode: encodeDeployData({\n bytecode: LAv1_proxy_bytecode,\n abi: OZ_ERC1967Proxy_ConstructorAbi,\n args: [\n implementationAddress,\n encodeFunctionData({\n abi: LightAccountAbi_v1,\n functionName: \"initialize\",\n args: [ownerAddress]\n })\n ]\n })\n });\n case \"v2.0.0\":\n const combinedSalt = keccak256(encodeAbiParameters([{ type: \"address\" }, { type: \"uint256\" }], [ownerAddress, salt]));\n const initCode = getLAv2ProxyBytecode(implementationAddress);\n return getContractAddress2({\n from: factoryAddress,\n opcode: \"CREATE2\",\n salt: combinedSalt,\n bytecode: initCode\n });\n default:\n assertNeverLightAccountVersion(version7);\n }\n }\n function predictMultiOwnerLightAccountAddress({ factoryAddress, salt, ownerAddresses }) {\n const implementationAddress = (\n // If we aren't using the default factory address, we compute the implementation address from the factory's `create` deployment.\n // This is accurate for both LA v1 and v2 factories. If we are using the default factory address, we use the implementation address from the registry.\n factoryAddress !== AccountVersionRegistry.MultiOwnerLightAccount[\"v2.0.0\"].addresses.default.factory ? getContractAddress2({\n from: factoryAddress,\n nonce: 1n\n }) : AccountVersionRegistry.MultiOwnerLightAccount[\"v2.0.0\"].addresses.default.impl\n );\n const combinedSalt = keccak256(encodeAbiParameters([{ type: \"address[]\" }, { type: \"uint256\" }], [ownerAddresses, salt]));\n const initCode = getLAv2ProxyBytecode(implementationAddress);\n return getContractAddress2({\n from: factoryAddress,\n opcode: \"CREATE2\",\n salt: combinedSalt,\n bytecode: initCode\n });\n }\n function getLAv2ProxyBytecode(implementationAddress) {\n return `0x603d3d8160223d3973${implementationAddress.slice(2)}60095155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3`;\n }\n function assertNeverLightAccountVersion(version7) {\n throw new Error(`Unknown light account version: ${version7}`);\n }\n var init_predictAddress = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/predictAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_OZ_ERC1967Proxy();\n init_utils10();\n init_LightAccountAbi_v1();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/account.js\n async function createLightAccount({ transport, chain: chain2, signer, initCode, version: version7 = defaultLightAccountVersion(), entryPoint = getEntryPoint(chain2, {\n version: AccountVersionRegistry[\"LightAccount\"][version7].entryPointVersion\n }), accountAddress, factoryAddress = getDefaultLightAccountFactoryAddress(chain2, version7), salt: salt_ = 0n }) {\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const accountAbi = version7 === \"v2.0.0\" ? LightAccountAbi_v2 : LightAccountAbi_v1;\n const factoryAbi = version7 === \"v2.0.0\" ? LightAccountFactoryAbi_v1 : LightAccountFactoryAbi_v2;\n const signerAddress = await signer.getAddress();\n const salt = LightAccountUnsupported1271Factories.has(factoryAddress.toLowerCase()) ? 0n : salt_;\n const getAccountInitCode = async () => {\n if (initCode)\n return initCode;\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: factoryAbi,\n functionName: \"createAccount\",\n args: [signerAddress, salt]\n })\n ]);\n };\n const address = accountAddress ?? predictLightAccountAddress({\n factoryAddress,\n salt,\n ownerAddress: signerAddress,\n version: version7\n });\n const account = await createLightAccountBase({\n transport,\n chain: chain2,\n signer,\n abi: accountAbi,\n type: \"LightAccount\",\n version: version7,\n entryPoint,\n accountAddress: address,\n getAccountInitCode\n });\n return {\n ...account,\n encodeTransferOwnership: (newOwner) => {\n return encodeFunctionData({\n abi: accountAbi,\n functionName: \"transferOwnership\",\n args: [newOwner]\n });\n },\n async getOwnerAddress() {\n const callResult = await client.readContract({\n address,\n abi: accountAbi,\n functionName: \"owner\"\n });\n if (callResult == null) {\n throw new Error(\"could not get on-chain owner\");\n }\n return callResult;\n }\n };\n }\n var init_account3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/account.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_LightAccountAbi_v1();\n init_LightAccountAbi_v2();\n init_LightAccountFactoryAbi_v1();\n init_LightAccountFactoryAbi_v2();\n init_utils10();\n init_base5();\n init_predictAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/actions/transferOwnership.js\n var transferOwnership;\n var init_transferOwnership = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/actions/transferOwnership.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n transferOwnership = async (client, args) => {\n const { newOwner, waitForTxn, overrides, account = client.account } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"transferOwnership\", client);\n }\n const data = account.encodeTransferOwnership(await newOwner.getAddress());\n const result = await client.sendUserOperation({\n uo: {\n target: account.address,\n data\n },\n account,\n overrides\n });\n if (waitForTxn) {\n return client.waitForUserOperationTransaction(result);\n }\n return result.hash;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/isAlchemySmartAccountClient.js\n function isAlchemySmartAccountClient2(client) {\n return client.transport.type === \"alchemy\";\n }\n var init_isAlchemySmartAccountClient2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/isAlchemySmartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/actions/simulateUserOperationChanges.js\n var simulateUserOperationChanges2;\n var init_simulateUserOperationChanges2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/actions/simulateUserOperationChanges.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_isAlchemySmartAccountClient2();\n simulateUserOperationChanges2 = async (client, { account = client.account, overrides, ...params }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isAlchemySmartAccountClient2(client)) {\n throw new IncompatibleClientError(\"AlchemySmartAccountClient\", \"SimulateUserOperationAssetChanges\", client);\n }\n const uoStruct = deepHexlify(await client.buildUserOperation({\n ...params,\n account,\n overrides\n }));\n return client.request({\n method: \"alchemy_simulateUserOperationAssetChanges\",\n params: [uoStruct, account.getEntryPoint().address]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/alchemyTrackerHeaders.js\n function mutateRemoveTrackingHeaders2(x4) {\n if (!x4)\n return;\n if (Array.isArray(x4))\n return;\n if (typeof x4 !== \"object\")\n return;\n TRACKER_HEADER2 in x4 && delete x4[TRACKER_HEADER2];\n TRACKER_BREADCRUMB2 in x4 && delete x4[TRACKER_BREADCRUMB2];\n TRACE_HEADER_NAME in x4 && delete x4[TRACE_HEADER_NAME];\n TRACE_HEADER_STATE in x4 && delete x4[TRACE_HEADER_STATE];\n }\n function addCrumb2(previous, crumb) {\n if (!previous)\n return crumb;\n return `${previous} > ${crumb}`;\n }\n function headersUpdate2(crumb) {\n const headerUpdate_ = (x4) => {\n const traceHeader = (TraceHeader.fromTraceHeader(x4) || TraceHeader.default()).withEvent(crumb);\n return {\n [TRACKER_HEADER2]: traceHeader.parentId,\n ...x4,\n [TRACKER_BREADCRUMB2]: addCrumb2(x4[TRACKER_BREADCRUMB2], crumb),\n ...traceHeader.toTraceHeader()\n };\n };\n return headerUpdate_;\n }\n var TRACKER_HEADER2, TRACKER_BREADCRUMB2;\n var init_alchemyTrackerHeaders2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/alchemyTrackerHeaders.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm6();\n init_esm6();\n TRACKER_HEADER2 = \"X-Alchemy-Client-Trace-Id\";\n TRACKER_BREADCRUMB2 = \"X-Alchemy-Client-Breadcrumb\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/schema.js\n var AlchemyChainSchema2;\n var init_schema4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/schema.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm5();\n AlchemyChainSchema2 = esm_default.custom((chain2) => {\n const chain_ = ChainSchema.parse(chain2);\n return chain_.rpcUrls.alchemy != null;\n }, \"chain must include an alchemy rpc url. See `defineAlchemyChain` or import a chain from `@account-kit/infra`.\");\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/version.js\n var VERSION3;\n var init_version7 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n VERSION3 = \"4.62.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/alchemyTransport.js\n function isAlchemyTransport2(transport, chain2) {\n return transport({ chain: chain2 }).config.type === \"alchemy\";\n }\n function alchemy2(config2) {\n const { retryDelay, retryCount = 0 } = config2;\n const fetchOptions = { ...config2.fetchOptions };\n const connectionConfig = ConnectionConfigSchema.parse(config2.alchemyConnection ?? config2);\n const headersAsObject = convertHeadersToObject2(fetchOptions.headers);\n fetchOptions.headers = {\n ...headersAsObject,\n \"Alchemy-AA-Sdk-Version\": VERSION3\n };\n if (connectionConfig.jwt != null || connectionConfig.apiKey != null) {\n fetchOptions.headers = {\n ...fetchOptions.headers,\n Authorization: `Bearer ${connectionConfig.jwt ?? connectionConfig.apiKey}`\n };\n }\n const transport = (opts) => {\n const { chain: chain_ } = opts;\n if (!chain_) {\n throw new ChainNotFoundError2();\n }\n const chain2 = AlchemyChainSchema2.parse(chain_);\n const rpcUrl = connectionConfig.rpcUrl == null ? chain2.rpcUrls.alchemy.http[0] : connectionConfig.rpcUrl;\n const chainAgnosticRpcUrl = connectionConfig.rpcUrl == null ? \"https://api.g.alchemy.com/v2\" : connectionConfig.chainAgnosticUrl ?? connectionConfig.rpcUrl;\n const innerTransport = (() => {\n mutateRemoveTrackingHeaders2(config2?.fetchOptions?.headers);\n if (config2.alchemyConnection && config2.nodeRpcUrl) {\n return split2({\n overrides: [\n {\n methods: alchemyMethods2,\n transport: http(rpcUrl, { fetchOptions, retryCount })\n },\n {\n methods: chainAgnosticMethods2,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay\n })\n }\n ],\n fallback: http(config2.nodeRpcUrl, {\n fetchOptions: config2.fetchOptions,\n retryCount,\n retryDelay\n })\n });\n }\n return split2({\n overrides: [\n {\n methods: chainAgnosticMethods2,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay\n })\n }\n ],\n fallback: http(rpcUrl, { fetchOptions, retryCount, retryDelay })\n });\n })();\n return createTransport({\n key: \"alchemy\",\n name: \"Alchemy Transport\",\n request: innerTransport({\n ...opts,\n // Retries are already handled above within the split transport,\n // so `retryCount` must be 0 here for the expected behavior.\n retryCount: 0\n }).request,\n // Retries are already handled above within the split transport,\n // so `retryCount` must be 0 here too for the expected behavior.\n retryCount: 0,\n retryDelay,\n type: \"alchemy\"\n }, { alchemyRpcUrl: rpcUrl, fetchOptions });\n };\n return Object.assign(transport, {\n dynamicFetchOptions: fetchOptions,\n updateHeaders(newHeaders_) {\n const newHeaders = convertHeadersToObject2(newHeaders_);\n fetchOptions.headers = {\n ...fetchOptions.headers,\n ...newHeaders\n };\n },\n config: config2\n });\n }\n var alchemyMethods2, chainAgnosticMethods2, convertHeadersToObject2;\n var init_alchemyTransport2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/alchemyTransport.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_alchemyTrackerHeaders2();\n init_schema4();\n init_version7();\n alchemyMethods2 = [\n \"eth_sendUserOperation\",\n \"eth_estimateUserOperationGas\",\n \"eth_getUserOperationReceipt\",\n \"eth_getUserOperationByHash\",\n \"eth_supportedEntryPoints\",\n \"rundler_maxPriorityFeePerGas\",\n \"pm_getPaymasterData\",\n \"pm_getPaymasterStubData\",\n \"alchemy_requestGasAndPaymasterAndData\"\n ];\n chainAgnosticMethods2 = [\n \"wallet_prepareCalls\",\n \"wallet_sendPreparedCalls\",\n \"wallet_requestAccount\",\n \"wallet_createAccount\",\n \"wallet_listAccounts\",\n \"wallet_createSession\",\n \"wallet_getCallsStatus\"\n ];\n convertHeadersToObject2 = (headers) => {\n if (!headers) {\n return {};\n }\n if (headers instanceof Headers) {\n const headersObject = {};\n headers.forEach((value, key) => {\n headersObject[key] = value;\n });\n return headersObject;\n }\n if (Array.isArray(headers)) {\n return headers.reduce((acc, header) => {\n acc[header[0]] = header[1];\n return acc;\n }, {});\n }\n return headers;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/chains.js\n var arbitrum3, arbitrumGoerli3, arbitrumSepolia3, goerli3, mainnet3, optimism3, optimismGoerli3, optimismSepolia3, sepolia3, base3, baseGoerli3, baseSepolia3, polygonMumbai3, polygonAmoy3, polygon3, fraxtal3, fraxtalSepolia2, zora3, zoraSepolia3, worldChainSepolia2, worldChain2, shapeSepolia2, shape2, unichainMainnet2, unichainSepolia2, soneiumMinato2, soneiumMainnet2, opbnbTestnet2, opbnbMainnet2, beraChainBartio2, inkMainnet2, inkSepolia2, arbitrumNova3, monadTestnet2, mekong2, openlootSepolia2, gensynTestnet2, riseTestnet2, storyMainnet2, storyAeneid2, celoAlfajores2, celoMainnet2, teaSepolia2, bobaSepolia2, bobaMainnet2;\n var init_chains3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/chains.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_chains();\n arbitrum3 = {\n ...arbitrum,\n rpcUrls: {\n ...arbitrum.rpcUrls,\n alchemy: {\n http: [\"https://arb-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n arbitrumGoerli3 = {\n ...arbitrumGoerli,\n rpcUrls: {\n ...arbitrumGoerli.rpcUrls,\n alchemy: {\n http: [\"https://arb-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n arbitrumSepolia3 = {\n ...arbitrumSepolia,\n rpcUrls: {\n ...arbitrumSepolia.rpcUrls,\n alchemy: {\n http: [\"https://arb-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n goerli3 = {\n ...goerli,\n rpcUrls: {\n ...goerli.rpcUrls,\n alchemy: {\n http: [\"https://eth-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n mainnet3 = {\n ...mainnet,\n rpcUrls: {\n ...mainnet.rpcUrls,\n alchemy: {\n http: [\"https://eth-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n optimism3 = {\n ...optimism,\n rpcUrls: {\n ...optimism.rpcUrls,\n alchemy: {\n http: [\"https://opt-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n optimismGoerli3 = {\n ...optimismGoerli,\n rpcUrls: {\n ...optimismGoerli.rpcUrls,\n alchemy: {\n http: [\"https://opt-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n optimismSepolia3 = {\n ...optimismSepolia,\n rpcUrls: {\n ...optimismSepolia.rpcUrls,\n alchemy: {\n http: [\"https://opt-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n sepolia3 = {\n ...sepolia,\n rpcUrls: {\n ...sepolia.rpcUrls,\n alchemy: {\n http: [\"https://eth-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n base3 = {\n ...base,\n rpcUrls: {\n ...base.rpcUrls,\n alchemy: {\n http: [\"https://base-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n baseGoerli3 = {\n ...baseGoerli,\n rpcUrls: {\n ...baseGoerli.rpcUrls,\n alchemy: {\n http: [\"https://base-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n baseSepolia3 = {\n ...baseSepolia,\n rpcUrls: {\n ...baseSepolia.rpcUrls,\n alchemy: {\n http: [\"https://base-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n polygonMumbai3 = {\n ...polygonMumbai,\n rpcUrls: {\n ...polygonMumbai.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mumbai.g.alchemy.com/v2\"]\n }\n }\n };\n polygonAmoy3 = {\n ...polygonAmoy,\n rpcUrls: {\n ...polygonAmoy.rpcUrls,\n alchemy: {\n http: [\"https://polygon-amoy.g.alchemy.com/v2\"]\n }\n }\n };\n polygon3 = {\n ...polygon,\n rpcUrls: {\n ...polygon.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n fraxtal3 = {\n ...fraxtal,\n rpcUrls: {\n ...fraxtal.rpcUrls\n }\n };\n fraxtalSepolia2 = defineChain({\n id: 2523,\n name: \"Fraxtal Sepolia\",\n nativeCurrency: { name: \"Frax Ether\", symbol: \"frxETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.testnet-sepolia.frax.com\"]\n }\n }\n });\n zora3 = {\n ...zora,\n rpcUrls: {\n ...zora.rpcUrls\n }\n };\n zoraSepolia3 = {\n ...zoraSepolia,\n rpcUrls: {\n ...zoraSepolia.rpcUrls\n }\n };\n worldChainSepolia2 = defineChain({\n id: 4801,\n name: \"World Chain Sepolia\",\n network: \"World Chain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n worldChain2 = defineChain({\n id: 480,\n name: \"World Chain\",\n network: \"World Chain\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n shapeSepolia2 = defineChain({\n id: 11011,\n name: \"Shape Sepolia\",\n network: \"Shape Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n shape2 = defineChain({\n id: 360,\n name: \"Shape\",\n network: \"Shape\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n unichainMainnet2 = defineChain({\n id: 130,\n name: \"Unichain Mainnet\",\n network: \"Unichain Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n unichainSepolia2 = defineChain({\n id: 1301,\n name: \"Unichain Sepolia\",\n network: \"Unichain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n soneiumMinato2 = defineChain({\n id: 1946,\n name: \"Soneium Minato\",\n network: \"Soneium Minato\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n }\n }\n });\n soneiumMainnet2 = defineChain({\n id: 1868,\n name: \"Soneium Mainnet\",\n network: \"Soneium Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n opbnbTestnet2 = defineChain({\n id: 5611,\n name: \"OPBNB Testnet\",\n network: \"OPBNB Testnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n }\n }\n });\n opbnbMainnet2 = defineChain({\n id: 204,\n name: \"OPBNB Mainnet\",\n network: \"OPBNB Mainnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n beraChainBartio2 = defineChain({\n id: 80084,\n name: \"BeraChain Bartio\",\n network: \"BeraChain Bartio\",\n nativeCurrency: { name: \"Bera\", symbol: \"BERA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n }\n }\n });\n inkMainnet2 = defineChain({\n id: 57073,\n name: \"Ink Mainnet\",\n network: \"Ink Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n inkSepolia2 = defineChain({\n id: 763373,\n name: \"Ink Sepolia\",\n network: \"Ink Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n arbitrumNova3 = {\n ...arbitrumNova,\n rpcUrls: {\n ...arbitrumNova.rpcUrls\n }\n };\n monadTestnet2 = defineChain({\n id: 10143,\n name: \"Monad Testnet\",\n nativeCurrency: { name: \"Monad\", symbol: \"MON\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://testnet.monadexplorer.com\"\n }\n },\n testnet: true\n });\n mekong2 = defineChain({\n id: 7078815900,\n name: \"Mekong Pectra Devnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.mekong.ethpandaops.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.mekong.ethpandaops.io\"\n }\n },\n testnet: true\n });\n openlootSepolia2 = defineChain({\n id: 905905,\n name: \"Openloot Sepolia\",\n nativeCurrency: { name: \"Openloot\", symbol: \"OL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://openloot-sepolia.explorer.alchemy.com\"\n }\n },\n testnet: true\n });\n gensynTestnet2 = defineChain({\n id: 685685,\n name: \"Gensyn Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://gensyn-testnet.explorer.alchemy.com\"\n }\n },\n testnet: true\n });\n riseTestnet2 = defineChain({\n id: 11155931,\n name: \"Rise Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.testnet.riselabs.xyz\"\n }\n },\n testnet: true\n });\n storyMainnet2 = defineChain({\n id: 1514,\n name: \"Story Mainnet\",\n nativeCurrency: { name: \"IP\", symbol: \"IP\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://www.storyscan.io\"\n }\n },\n testnet: false\n });\n storyAeneid2 = defineChain({\n id: 1315,\n name: \"Story Aeneid\",\n nativeCurrency: { name: \"IP\", symbol: \"IP\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://aeneid.storyscan.io\"\n }\n },\n testnet: true\n });\n celoAlfajores2 = defineChain({\n id: 44787,\n name: \"Celo Alfajores\",\n nativeCurrency: { name: \"Celo native asset\", symbol: \"CELO\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://celo-alfajores.blockscout.com/\"\n }\n },\n testnet: true\n });\n celoMainnet2 = defineChain({\n id: 42220,\n name: \"Celo Mainnet\",\n nativeCurrency: { name: \"Celo native asset\", symbol: \"CELO\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://celo.blockscout.com/\"\n }\n },\n testnet: false\n });\n teaSepolia2 = defineChain({\n id: 10218,\n name: \"Tea Sepolia\",\n nativeCurrency: { name: \"TEA\", symbol: \"TEA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://sepolia.tea.xyz/\"\n }\n },\n testnet: true\n });\n bobaSepolia2 = defineChain({\n id: 28882,\n name: \"Boba Sepolia\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://sepolia.testnet.bobascan.com/\"\n }\n },\n testnet: true\n });\n bobaMainnet2 = defineChain({\n id: 288,\n name: \"Boba Mainnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://bobascan.com/\"\n }\n },\n testnet: false\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/metrics.js\n var InfraLogger2;\n var init_metrics2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/metrics.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm7();\n init_version7();\n InfraLogger2 = createLogger({\n package: \"@account-kit/infra\",\n version: VERSION3\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/decorators/smartAccount.js\n function logSendUoEvent2(chainId, account) {\n const signerType = isSmartAccountWithSigner(account) ? account.getSigner().signerType : \"unknown\";\n InfraLogger2.trackEvent({\n name: \"client_send_uo\",\n data: {\n chainId,\n signerType,\n entryPoint: account.getEntryPoint().address\n }\n });\n }\n var alchemyActions2;\n var init_smartAccount2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/decorators/smartAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_simulateUserOperationChanges2();\n init_metrics2();\n alchemyActions2 = (client_) => ({\n simulateUserOperation: async (args) => {\n const client = clientHeaderTrack(client_, \"simulateUserOperation\");\n return simulateUserOperationChanges2(client, args);\n },\n async sendUserOperation(args) {\n const client = clientHeaderTrack(client_, \"infraSendUserOperation\");\n const { account = client.account } = args;\n const result = sendUserOperation(client, args);\n logSendUoEvent2(client.chain.id, account);\n return result;\n },\n sendTransaction: async (args, overrides, context2) => {\n const client = clientHeaderTrack(client_, \"sendTransaction\");\n const { account = client.account } = args;\n const result = await sendTransaction2(client, args, overrides, context2);\n logSendUoEvent2(client.chain.id, account);\n return result;\n },\n async sendTransactions(args) {\n const client = clientHeaderTrack(client_, \"sendTransactions\");\n const { account = client.account } = args;\n const result = sendTransactions(client, args);\n logSendUoEvent2(client.chain.id, account);\n return result;\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/defaults.js\n var getDefaultUserOperationFeeOptions3;\n var init_defaults3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/defaults.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains3();\n getDefaultUserOperationFeeOptions3 = (chain2) => {\n const feeOptions = {\n maxFeePerGas: { multiplier: 1.5 },\n maxPriorityFeePerGas: { multiplier: 1.05 }\n };\n if ((/* @__PURE__ */ new Set([\n arbitrum3.id,\n arbitrumGoerli3.id,\n arbitrumSepolia3.id,\n optimism3.id,\n optimismGoerli3.id,\n optimismSepolia3.id\n ])).has(chain2.id)) {\n feeOptions.preVerificationGas = { multiplier: 1.05 };\n }\n return feeOptions;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/feeEstimator.js\n var alchemyFeeEstimator2;\n var init_feeEstimator3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/feeEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n alchemyFeeEstimator2 = (transport) => async (struct, { overrides, feeOptions, client: client_ }) => {\n const client = clientHeaderTrack(client_, \"alchemyFeeEstimator\");\n const transport_ = transport({ chain: client.chain });\n let [block, maxPriorityFeePerGasEstimate] = await Promise.all([\n client.getBlock({ blockTag: \"latest\" }),\n // it is a fair assumption that if someone is using this Alchemy Middleware, then they are using Alchemy RPC\n transport_.request({\n method: \"rundler_maxPriorityFeePerGas\",\n params: []\n })\n ]);\n const baseFeePerGas = block.baseFeePerGas;\n if (baseFeePerGas == null) {\n throw new Error(\"baseFeePerGas is null\");\n }\n const maxPriorityFeePerGas = applyUserOpOverrideOrFeeOption(maxPriorityFeePerGasEstimate, overrides?.maxPriorityFeePerGas, feeOptions?.maxPriorityFeePerGas);\n const maxFeePerGas = applyUserOpOverrideOrFeeOption(bigIntMultiply(baseFeePerGas, 1.5) + BigInt(maxPriorityFeePerGas), overrides?.maxFeePerGas, feeOptions?.maxFeePerGas);\n return {\n ...struct,\n maxPriorityFeePerGas,\n maxFeePerGas\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/gas-manager.js\n var AlchemyPaymasterAddressV06Unify2, AlchemyPaymasterAddressV07Unify2, AlchemyPaymasterAddressV42, AlchemyPaymasterAddressV32, AlchemyPaymasterAddressV22, ArbSepoliaPaymasterAddress2, AlchemyPaymasterAddressV12, AlchemyPaymasterAddressV07V22, AlchemyPaymasterAddressV07V12, getAlchemyPaymasterAddress2, PermitTypes2, ERC20Abis2, EIP7597Abis2;\n var init_gas_manager2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/gas-manager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains3();\n AlchemyPaymasterAddressV06Unify2 = \"0x0000000000ce04e2359130e7d0204A5249958921\";\n AlchemyPaymasterAddressV07Unify2 = \"0x00000000000667F27D4DB42334ec11a25db7EBb4\";\n AlchemyPaymasterAddressV42 = \"0xEaf0Cde110a5d503f2dD69B3a49E031e29b3F9D2\";\n AlchemyPaymasterAddressV32 = \"0x4f84a207A80c39E9e8BaE717c1F25bA7AD1fB08F\";\n AlchemyPaymasterAddressV22 = \"0x4Fd9098af9ddcB41DA48A1d78F91F1398965addc\";\n ArbSepoliaPaymasterAddress2 = \"0x0804Afe6EEFb73ce7F93CD0d5e7079a5a8068592\";\n AlchemyPaymasterAddressV12 = \"0xc03aac639bb21233e0139381970328db8bceeb67\";\n AlchemyPaymasterAddressV07V22 = \"0x2cc0c7981D846b9F2a16276556f6e8cb52BfB633\";\n AlchemyPaymasterAddressV07V12 = \"0xEF725Aa22d43Ea69FB22bE2EBe6ECa205a6BCf5B\";\n getAlchemyPaymasterAddress2 = (chain2, version7) => {\n switch (version7) {\n case \"0.6.0\":\n switch (chain2.id) {\n case fraxtalSepolia2.id:\n case worldChainSepolia2.id:\n case shapeSepolia2.id:\n case unichainSepolia2.id:\n case opbnbTestnet2.id:\n case inkSepolia2.id:\n case monadTestnet2.id:\n case openlootSepolia2.id:\n case gensynTestnet2.id:\n case riseTestnet2.id:\n case storyAeneid2.id:\n case teaSepolia2.id:\n case arbitrumGoerli3.id:\n case goerli3.id:\n case optimismGoerli3.id:\n case baseGoerli3.id:\n case polygonMumbai3.id:\n case worldChain2.id:\n case shape2.id:\n case unichainMainnet2.id:\n case soneiumMinato2.id:\n case soneiumMainnet2.id:\n case opbnbMainnet2.id:\n case beraChainBartio2.id:\n case inkMainnet2.id:\n case arbitrumNova3.id:\n case storyMainnet2.id:\n case celoAlfajores2.id:\n case celoMainnet2.id:\n return AlchemyPaymasterAddressV42;\n case polygonAmoy3.id:\n case optimismSepolia3.id:\n case baseSepolia3.id:\n case zora3.id:\n case zoraSepolia3.id:\n case fraxtal3.id:\n return AlchemyPaymasterAddressV32;\n case mainnet3.id:\n case arbitrum3.id:\n case optimism3.id:\n case polygon3.id:\n case base3.id:\n return AlchemyPaymasterAddressV22;\n case arbitrumSepolia3.id:\n return ArbSepoliaPaymasterAddress2;\n case sepolia3.id:\n return AlchemyPaymasterAddressV12;\n default:\n return AlchemyPaymasterAddressV06Unify2;\n }\n case \"0.7.0\":\n switch (chain2.id) {\n case arbitrumNova3.id:\n case celoAlfajores2.id:\n case celoMainnet2.id:\n case gensynTestnet2.id:\n case inkMainnet2.id:\n case inkSepolia2.id:\n case monadTestnet2.id:\n case opbnbMainnet2.id:\n case opbnbTestnet2.id:\n case openlootSepolia2.id:\n case riseTestnet2.id:\n case shape2.id:\n case shapeSepolia2.id:\n case soneiumMainnet2.id:\n case soneiumMinato2.id:\n case storyAeneid2.id:\n case storyMainnet2.id:\n case teaSepolia2.id:\n case unichainMainnet2.id:\n case unichainSepolia2.id:\n case worldChain2.id:\n case worldChainSepolia2.id:\n return AlchemyPaymasterAddressV07V12;\n case arbitrum3.id:\n case arbitrumGoerli3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n case baseGoerli3.id:\n case baseSepolia3.id:\n case beraChainBartio2.id:\n case fraxtal3.id:\n case fraxtalSepolia2.id:\n case goerli3.id:\n case mainnet3.id:\n case optimism3.id:\n case optimismGoerli3.id:\n case optimismSepolia3.id:\n case polygon3.id:\n case polygonAmoy3.id:\n case polygonMumbai3.id:\n case sepolia3.id:\n case zora3.id:\n case zoraSepolia3.id:\n return AlchemyPaymasterAddressV07V22;\n default:\n return AlchemyPaymasterAddressV07Unify2;\n }\n default:\n throw new Error(`Unsupported EntryPointVersion: ${version7}`);\n }\n };\n PermitTypes2 = {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" }\n ],\n Permit: [\n { name: \"owner\", type: \"address\" },\n { name: \"spender\", type: \"address\" },\n { name: \"value\", type: \"uint256\" },\n { name: \"nonce\", type: \"uint256\" },\n { name: \"deadline\", type: \"uint256\" }\n ]\n };\n ERC20Abis2 = [\n \"function decimals() public view returns (uint8)\",\n \"function balanceOf(address owner) external view returns (uint256)\",\n \"function allowance(address owner, address spender) external view returns (uint256)\",\n \"function approve(address spender, uint256 amount) external returns (bool)\"\n ];\n EIP7597Abis2 = [\n \"function nonces(address owner) external view returns (uint)\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/errors/base.js\n var BaseError6;\n var init_base6 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/errors/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_version7();\n BaseError6 = class extends BaseError4 {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: VERSION3\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/errors/invalidSignedPermit.js\n var InvalidSignedPermit2;\n var init_invalidSignedPermit2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/errors/invalidSignedPermit.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base6();\n InvalidSignedPermit2 = class extends BaseError6 {\n constructor(reason) {\n super([\"Invalid signed permit\"].join(\"\\n\"), {\n details: [reason, \"Please provide a valid signed permit\"].join(\"\\n\")\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidSignedPermit\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/gasManager.js\n function alchemyGasManagerMiddleware2(policyId, policyToken) {\n const buildContext = async (args) => {\n const context2 = { policyId };\n const { account, client } = args;\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n if (policyToken !== void 0) {\n context2.erc20Context = {\n tokenAddress: policyToken.address,\n maxTokenAmount: policyToken.maxTokenAmount\n };\n if (policyToken.permit !== void 0) {\n const permit = await generateSignedPermit2(client, account, policyToken);\n if (permit !== void 0) {\n context2.erc20Context.permit = permit;\n }\n } else if (args.context !== void 0) {\n context2.erc20Context.permit = extractSignedPermitFromContext2(args.context);\n }\n }\n return context2;\n };\n return {\n dummyPaymasterAndData: async (uo, args) => {\n const context2 = await buildContext(args);\n const baseMiddleware = erc7677Middleware({ context: context2 });\n return baseMiddleware.dummyPaymasterAndData(uo, args);\n },\n paymasterAndData: async (uo, args) => {\n const context2 = await buildContext(args);\n const baseMiddleware = erc7677Middleware({ context: context2 });\n return baseMiddleware.paymasterAndData(uo, args);\n }\n };\n }\n function alchemyGasAndPaymasterAndDataMiddleware2(params) {\n const { policyId, policyToken, transport, gasEstimatorOverride, feeEstimatorOverride } = params;\n return {\n dummyPaymasterAndData: async (uo, args) => {\n if (\n // No reason to generate dummy data if we are bypassing the paymaster.\n bypassPaymasterAndData(args.overrides) || // When using alchemy_requestGasAndPaymasterAndData, there is generally no reason to generate dummy\n // data. However, if the gas/feeEstimator is overriden, then this option should be enabled.\n !(gasEstimatorOverride || feeEstimatorOverride)\n ) {\n return noopMiddleware(uo, args);\n }\n return alchemyGasManagerMiddleware2(policyId, policyToken).dummyPaymasterAndData(uo, args);\n },\n feeEstimator: (uo, args) => {\n return feeEstimatorOverride ? feeEstimatorOverride(uo, args) : bypassPaymasterAndData(args.overrides) ? alchemyFeeEstimator2(transport)(uo, args) : noopMiddleware(uo, args);\n },\n gasEstimator: (uo, args) => {\n return gasEstimatorOverride ? gasEstimatorOverride(uo, args) : bypassPaymasterAndData(args.overrides) ? defaultGasEstimator(args.client)(uo, args) : noopMiddleware(uo, args);\n },\n paymasterAndData: async (uo, { account, client: client_, feeOptions, overrides: overrides_, context: uoContext }) => {\n const client = clientHeaderTrack(client_, \"alchemyFeeEstimator\");\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const userOp = deepHexlify(await resolveProperties(uo));\n const overrides = filterUndefined({\n maxFeePerGas: overrideField2(\"maxFeePerGas\", overrides_, feeOptions, userOp),\n maxPriorityFeePerGas: overrideField2(\"maxPriorityFeePerGas\", overrides_, feeOptions, userOp),\n callGasLimit: overrideField2(\"callGasLimit\", overrides_, feeOptions, userOp),\n verificationGasLimit: overrideField2(\"verificationGasLimit\", overrides_, feeOptions, userOp),\n preVerificationGas: overrideField2(\"preVerificationGas\", overrides_, feeOptions, userOp),\n ...account.getEntryPoint().version === \"0.7.0\" ? {\n paymasterVerificationGasLimit: overrideField2(\"paymasterVerificationGasLimit\", overrides_, feeOptions, userOp),\n paymasterPostOpGasLimit: overrideField2(\"paymasterPostOpGasLimit\", overrides_, feeOptions, userOp)\n } : {}\n });\n let erc20Context = void 0;\n if (policyToken !== void 0) {\n erc20Context = {\n tokenAddress: policyToken.address,\n maxTokenAmount: policyToken.maxTokenAmount\n };\n if (policyToken.permit !== void 0) {\n const permit = await generateSignedPermit2(client, account, policyToken);\n if (permit !== void 0) {\n erc20Context.permit = permit;\n }\n } else if (uoContext !== void 0) {\n erc20Context.permit = extractSignedPermitFromContext2(uoContext);\n }\n }\n const result = await client.request({\n method: \"alchemy_requestGasAndPaymasterAndData\",\n params: [\n {\n policyId,\n entryPoint: account.getEntryPoint().address,\n userOperation: userOp,\n dummySignature: await account.getDummySignature(),\n overrides,\n ...erc20Context ? {\n erc20Context\n } : {}\n }\n ]\n });\n return {\n ...uo,\n ...result\n };\n }\n };\n }\n function extractSignedPermitFromContext2(context2) {\n if (context2.signedPermit === void 0) {\n return void 0;\n }\n if (typeof context2.signedPermit !== \"object\") {\n throw new InvalidSignedPermit2(\"signedPermit is not an object\");\n }\n if (typeof context2.signedPermit.value !== \"bigint\") {\n throw new InvalidSignedPermit2(\"signedPermit.value is not a bigint\");\n }\n if (typeof context2.signedPermit.deadline !== \"bigint\") {\n throw new InvalidSignedPermit2(\"signedPermit.deadline is not a bigint\");\n }\n if (!isHex(context2.signedPermit.signature)) {\n throw new InvalidSignedPermit2(\"signedPermit.signature is not a hex string\");\n }\n return encodeSignedPermit2(context2.signedPermit.value, context2.signedPermit.deadline, context2.signedPermit.signature);\n }\n function encodeSignedPermit2(value, deadline, signedPermit) {\n return encodeAbiParameters([{ type: \"uint256\" }, { type: \"uint256\" }, { type: \"bytes\" }], [value, deadline, signedPermit]);\n }\n var overrideField2, generateSignedPermit2;\n var init_gasManager2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/gasManager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_feeEstimator3();\n init_gas_manager2();\n init_invalidSignedPermit2();\n overrideField2 = (field, overrides, feeOptions, userOperation) => {\n let _field = field;\n if (overrides?.[_field] != null) {\n if (isBigNumberish(overrides[_field])) {\n return deepHexlify(overrides[_field]);\n } else {\n return {\n multiplier: Number(overrides[_field].multiplier)\n };\n }\n }\n if (isMultiplier(feeOptions?.[field])) {\n return {\n multiplier: Number(feeOptions[field].multiplier)\n };\n }\n const userOpField = userOperation[field];\n if (isHex(userOpField) && fromHex(userOpField, \"bigint\") > 0n) {\n return userOpField;\n }\n return void 0;\n };\n generateSignedPermit2 = async (client, account, policyToken) => {\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n if (!policyToken.permit) {\n throw new Error(\"permit is missing\");\n }\n if (!policyToken.permit?.erc20Name || !policyToken.permit?.version) {\n throw new Error(\"erc20Name or version is missing\");\n }\n const paymasterAddress = policyToken.permit.paymasterAddress ?? getAlchemyPaymasterAddress2(client.chain, account.getEntryPoint().version);\n if (paymasterAddress === void 0 || paymasterAddress === \"0x\") {\n throw new Error(\"no paymaster contract address available\");\n }\n let allowanceFuture = client.call({\n to: policyToken.address,\n data: encodeFunctionData({\n abi: parseAbi(ERC20Abis2),\n functionName: \"allowance\",\n args: [account.address, paymasterAddress]\n })\n });\n let nonceFuture = client.call({\n to: policyToken.address,\n data: encodeFunctionData({\n abi: parseAbi(EIP7597Abis2),\n functionName: \"nonces\",\n args: [account.address]\n })\n });\n const [allowanceResponse, nonceResponse] = await Promise.all([\n allowanceFuture,\n nonceFuture\n ]);\n if (!allowanceResponse.data) {\n throw new Error(\"No allowance returned from erc20 contract call\");\n }\n if (!nonceResponse.data) {\n throw new Error(\"No nonces returned from erc20 contract call\");\n }\n const permitLimit = policyToken.permit.autoPermitApproveTo;\n const currentAllowance = BigInt(allowanceResponse.data);\n if (currentAllowance > policyToken.permit.autoPermitBelow) {\n return void 0;\n }\n const nonce = BigInt(nonceResponse.data);\n const deadline = BigInt(Math.floor(Date.now() / 1e3) + 60 * 10);\n const typedPermitData = {\n types: PermitTypes2,\n primaryType: \"Permit\",\n domain: {\n name: policyToken.permit.erc20Name ?? \"\",\n version: policyToken.permit.version ?? \"\",\n chainId: BigInt(client.chain.id),\n verifyingContract: policyToken.address\n },\n message: {\n owner: account.address,\n spender: paymasterAddress,\n value: permitLimit,\n nonce,\n deadline\n }\n };\n const signedPermit = await account.signTypedData(typedPermitData);\n return encodeSignedPermit2(permitLimit, deadline, signedPermit);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/userOperationSimulator.js\n function alchemyUserOperationSimulator2(transport) {\n return async (struct, { account, client }) => {\n const uoSimResult = await transport({ chain: client.chain }).request({\n method: \"alchemy_simulateUserOperationAssetChanges\",\n params: [\n deepHexlify(await resolveProperties(struct)),\n account.getEntryPoint().address\n ]\n });\n if (uoSimResult.error) {\n throw new Error(uoSimResult.error.message);\n }\n return struct;\n };\n }\n var init_userOperationSimulator2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/userOperationSimulator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/smartAccountClient.js\n function getSignerTypeHeader2(account) {\n return { \"Alchemy-Aa-Sdk-Signer\": account.getSigner().signerType };\n }\n function createAlchemySmartAccountClient2(config2) {\n if (!config2.chain) {\n throw new ChainNotFoundError2();\n }\n const feeOptions = config2.opts?.feeOptions ?? getDefaultUserOperationFeeOptions3(config2.chain);\n const scaClient = createSmartAccountClient({\n account: config2.account,\n transport: config2.transport,\n chain: config2.chain,\n type: \"AlchemySmartAccountClient\",\n opts: {\n ...config2.opts,\n feeOptions\n },\n feeEstimator: config2.feeEstimator ?? alchemyFeeEstimator2(config2.transport),\n gasEstimator: config2.gasEstimator,\n customMiddleware: async (struct, args) => {\n if (isSmartAccountWithSigner(args.account)) {\n config2.transport.updateHeaders(getSignerTypeHeader2(args.account));\n }\n return config2.customMiddleware ? config2.customMiddleware(struct, args) : struct;\n },\n ...config2.policyId ? alchemyGasAndPaymasterAndDataMiddleware2({\n policyId: config2.policyId,\n policyToken: config2.policyToken,\n transport: config2.transport,\n gasEstimatorOverride: config2.gasEstimator,\n feeEstimatorOverride: config2.feeEstimator\n }) : {},\n userOperationSimulator: config2.useSimulation ? alchemyUserOperationSimulator2(config2.transport) : void 0,\n signUserOperation: config2.signUserOperation,\n addBreadCrumb(breadcrumb) {\n const oldConfig = config2.transport.config;\n const dynamicFetchOptions = config2.transport.dynamicFetchOptions;\n const newTransport = alchemy2({ ...oldConfig });\n newTransport.updateHeaders(headersUpdate2(breadcrumb)(convertHeadersToObject2(dynamicFetchOptions?.headers)));\n return createAlchemySmartAccountClient2({\n ...config2,\n transport: newTransport\n });\n }\n }).extend(alchemyActions2).extend((client_) => ({\n addBreadcrumb(breadcrumb) {\n return clientHeaderTrack(client_, breadcrumb);\n }\n }));\n if (config2.account && isSmartAccountWithSigner(config2.account)) {\n config2.transport.updateHeaders(getSignerTypeHeader2(config2.account));\n }\n return scaClient;\n }\n var init_smartAccountClient4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/smartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_alchemyTransport2();\n init_defaults3();\n init_feeEstimator3();\n init_gasManager2();\n init_userOperationSimulator2();\n init_smartAccount2();\n init_alchemyTrackerHeaders2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/exports/index.js\n var init_exports3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/exports/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_alchemyTransport2();\n init_chains3();\n init_smartAccountClient4();\n init_alchemyTrackerHeaders2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/alchemyClient.js\n async function createLightAccountAlchemyClient({ opts, transport, chain: chain2, ...config2 }) {\n return createLightAccountClient({\n opts,\n transport,\n chain: chain2,\n ...config2\n });\n }\n var init_alchemyClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/alchemyClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_src();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/decorators/lightAccount.js\n var lightAccountClientActions;\n var init_lightAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/decorators/lightAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transferOwnership();\n lightAccountClientActions = (client) => ({\n transferOwnership: async (args) => transferOwnership(client, args)\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/client.js\n async function createLightAccountClient(params) {\n const { transport, chain: chain2 } = params;\n const lightAccount = await createLightAccount({\n ...params,\n transport,\n chain: chain2\n });\n if (isAlchemyTransport2(transport, chain2)) {\n return createAlchemySmartAccountClient2({\n ...params,\n transport,\n chain: chain2,\n account: lightAccount\n }).extend(lightAccountClientActions);\n }\n return createSmartAccountClient({\n ...params,\n transport,\n chain: chain2,\n account: lightAccount\n }).extend(lightAccountClientActions);\n }\n var init_client2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/client.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_src();\n init_lightAccount();\n init_exports3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/multiOwnerAlchemyClient.js\n async function createMultiOwnerLightAccountAlchemyClient({ opts, transport, chain: chain2, ...config2 }) {\n return createMultiOwnerLightAccountClient({\n opts,\n transport,\n chain: chain2,\n ...config2\n });\n }\n var init_multiOwnerAlchemyClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/multiOwnerAlchemyClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_src();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/MultiOwnerLightAccountAbi.js\n var MultiOwnerLightAccountAbi;\n var init_MultiOwnerLightAccountAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/MultiOwnerLightAccountAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n MultiOwnerLightAccountAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint_\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"addDeposit\",\n inputs: [],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verifyingContract\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"extensions\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n { name: \"dest\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"func\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n { name: \"dest\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"func\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n { name: \"dest\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"value\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"func\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getDeposit\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getNonce\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initialize\",\n inputs: [{ name: \"owners_\", type: \"address[]\", internalType: \"address[]\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"hash\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"result\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"owners\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address[]\", internalType: \"address[]\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"updateOwners\",\n inputs: [\n {\n name: \"ownersToAdd\",\n type: \"address[]\",\n internalType: \"address[]\"\n },\n {\n name: \"ownersToRemove\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"gasFees\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawDepositTo\",\n inputs: [\n {\n name: \"withdrawAddress\",\n type: \"address\",\n internalType: \"address payable\"\n },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"LightAccountInitialized\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n indexed: true,\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"owners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnersUpdated\",\n inputs: [\n {\n name: \"addedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n },\n {\n name: \"removedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"ArrayLengthMismatch\", inputs: [] },\n { type: \"error\", name: \"ECDSAInvalidSignature\", inputs: [] },\n {\n type: \"error\",\n name: \"ECDSAInvalidSignatureLength\",\n inputs: [{ name: \"length\", type: \"uint256\", internalType: \"uint256\" }]\n },\n {\n type: \"error\",\n name: \"ECDSAInvalidSignatureS\",\n inputs: [{ name: \"s\", type: \"bytes32\", internalType: \"bytes32\" }]\n },\n { type: \"error\", name: \"EmptyOwnersNotAllowed\", inputs: [] },\n { type: \"error\", name: \"InvalidInitialization\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"InvalidSignatureType\", inputs: [] },\n {\n type: \"error\",\n name: \"NotAuthorized\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"NotInitializing\", inputs: [] },\n {\n type: \"error\",\n name: \"OwnerDoesNotExist\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"UnauthorizedCallContext\", inputs: [] },\n { type: \"error\", name: \"UpgradeFailed\", inputs: [] },\n { type: \"error\", name: \"ZeroAddressNotAllowed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/MultiOwnerLightAccountFactoryAbi.js\n var MultiOwnerLightAccountFactoryAbi;\n var init_MultiOwnerLightAccountFactoryAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/MultiOwnerLightAccountFactoryAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n MultiOwnerLightAccountFactoryAbi = [\n {\n type: \"constructor\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"ACCOUNT_IMPLEMENTATION\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract MultiOwnerLightAccount\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"ENTRY_POINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n { name: \"unstakeDelay\", type: \"uint32\", internalType: \"uint32\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n { name: \"owners\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"contract MultiOwnerLightAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"createAccountSingle\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"contract MultiOwnerLightAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n { name: \"owners\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [{ name: \"newOwner\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n { name: \"to\", type: \"address\", internalType: \"address payable\" },\n { name: \"token\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [{ name: \"to\", type: \"address\", internalType: \"address payable\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AddressEmptyCode\",\n inputs: [{ name: \"target\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"AddressInsufficientBalance\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"FailedInnerCall\", inputs: [] },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidEntryPoint\",\n inputs: [{ name: \"entryPoint\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"InvalidOwners\", inputs: [] },\n {\n type: \"error\",\n name: \"OwnableInvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"OwnableUnauthorizedAccount\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"OwnersArrayEmpty\", inputs: [] },\n { type: \"error\", name: \"OwnersLimitExceeded\", inputs: [] },\n {\n type: \"error\",\n name: \"SafeERC20FailedOperation\",\n inputs: [{ name: \"token\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"TransferFailed\", inputs: [] },\n { type: \"error\", name: \"ZeroAddressNotAllowed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/multiOwner.js\n async function createMultiOwnerLightAccount({ transport, chain: chain2, signer, initCode, version: version7 = defaultLightAccountVersion(), entryPoint = getEntryPoint(chain2, {\n version: \"0.7.0\"\n }), accountAddress, factoryAddress = getDefaultMultiOwnerLightAccountFactoryAddress(chain2, version7), salt: salt_ = 0n, owners = [] }) {\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const ownerAddress = await signer.getAddress();\n const owners_ = Array.from(/* @__PURE__ */ new Set([...owners, ownerAddress])).filter((x4) => hexToBigInt(x4) !== 0n).sort((a3, b4) => {\n const bigintA = hexToBigInt(a3);\n const bigintB = hexToBigInt(b4);\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n });\n const getAccountInitCode = async () => {\n if (initCode)\n return initCode;\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: MultiOwnerLightAccountFactoryAbi,\n functionName: \"createAccount\",\n args: [owners_, salt_]\n })\n ]);\n };\n const address = accountAddress ?? predictMultiOwnerLightAccountAddress({\n factoryAddress,\n salt: salt_,\n ownerAddresses: owners_\n });\n const account = await createLightAccountBase({\n transport,\n chain: chain2,\n signer,\n abi: MultiOwnerLightAccountAbi,\n version: version7,\n type: \"MultiOwnerLightAccount\",\n entryPoint,\n accountAddress: address,\n getAccountInitCode\n });\n return {\n ...account,\n encodeUpdateOwners: (ownersToAdd, ownersToRemove) => {\n return encodeFunctionData({\n abi: MultiOwnerLightAccountAbi,\n functionName: \"updateOwners\",\n args: [ownersToAdd, ownersToRemove]\n });\n },\n async getOwnerAddresses() {\n const callResult = await client.readContract({\n address,\n abi: MultiOwnerLightAccountAbi,\n functionName: \"owners\"\n });\n if (callResult == null) {\n throw new Error(\"could not get on-chain owners\");\n }\n if (!callResult.includes(await signer.getAddress())) {\n throw new Error(\"on-chain owners does not include the current signer\");\n }\n return callResult;\n }\n };\n }\n var init_multiOwner = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/multiOwner.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_MultiOwnerLightAccountAbi();\n init_MultiOwnerLightAccountFactoryAbi();\n init_utils10();\n init_base5();\n init_predictAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/actions/updateOwners.js\n var updateOwners;\n var init_updateOwners = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/actions/updateOwners.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n updateOwners = async (client, { ownersToAdd, ownersToRemove, waitForTxn, overrides, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"updateOwners\", client);\n }\n const data = account.encodeUpdateOwners(ownersToAdd, ownersToRemove);\n const result = await client.sendUserOperation({\n uo: {\n target: account.address,\n data\n },\n account,\n overrides\n });\n if (waitForTxn) {\n return client.waitForUserOperationTransaction(result);\n }\n return result.hash;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/multiOwnerLightAccount.js\n async function createMultiOwnerLightAccountClient(params) {\n const { transport, chain: chain2 } = params;\n const lightAccount = await createMultiOwnerLightAccount({\n ...params,\n transport,\n chain: chain2\n });\n if (isAlchemyTransport2(transport, chain2)) {\n return createAlchemySmartAccountClient2({\n ...params,\n transport,\n chain: chain2,\n account: lightAccount\n }).extend(multiOwnerLightAccountClientActions);\n }\n return createSmartAccountClient({\n ...params,\n transport,\n chain: chain2,\n account: lightAccount\n }).extend(multiOwnerLightAccountClientActions);\n }\n var init_multiOwnerLightAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/multiOwnerLightAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_src();\n init_exports3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/decorators/multiOwnerLightAccount.js\n var multiOwnerLightAccountClientActions;\n var init_multiOwnerLightAccount2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/decorators/multiOwnerLightAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_updateOwners();\n multiOwnerLightAccountClientActions = (client) => ({\n updateOwners: async (args) => updateOwners(client, args)\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IAccountLoupe.js\n var IAccountLoupeAbi;\n var init_IAccountLoupe = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IAccountLoupe.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n IAccountLoupeAbi = [\n {\n type: \"function\",\n name: \"getExecutionFunctionConfig\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IAccountLoupe.ExecutionFunctionConfig\",\n components: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n {\n name: \"userOpValidationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n },\n {\n name: \"runtimeValidationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getExecutionHooks\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct IAccountLoupe.ExecutionHooks[]\",\n components: [\n {\n name: \"preExecHook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n },\n {\n name: \"postExecHook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getInstalledPlugins\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address[]\", internalType: \"address[]\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getPreValidationHooks\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"preUserOpValidationHooks\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n }\n ],\n stateMutability: \"view\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IPlugin.js\n var IPluginAbi;\n var init_IPlugin = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IPlugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n IPluginAbi = [\n {\n type: \"function\",\n name: \"onInstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onUninstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"pluginManifest\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginManifest\",\n components: [\n { name: \"interfaceIds\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n {\n name: \"dependencyInterfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"executionFunctions\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permittedExecutionSelectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permitAnyExternalAddress\",\n type: \"bool\",\n internalType: \"bool\"\n },\n { name: \"canSpendNativeToken\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permittedExternalCalls\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExternalCallPermission[]\",\n components: [\n {\n name: \"externalAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"permitAnySelector\", type: \"bool\", internalType: \"bool\" },\n { name: \"selectors\", type: \"bytes4[]\", internalType: \"bytes4[]\" }\n ]\n },\n {\n name: \"userOpValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"runtimeValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preUserOpValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"preExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n name: \"postExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"pluginMetadata\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginMetadata\",\n components: [\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"author\", type: \"string\", internalType: \"string\" },\n {\n name: \"permissionDescriptors\",\n type: \"tuple[]\",\n internalType: \"struct SelectorPermission[]\",\n components: [\n {\n name: \"functionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"permissionDescription\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"postExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"preExecHookData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preRuntimeValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preUserOpValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"runtimeValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"userOpValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IPluginManager.js\n var IPluginManagerAbi;\n var init_IPluginManager = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IPluginManager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n IPluginManagerAbi = [\n {\n type: \"function\",\n name: \"installPlugin\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"manifestHash\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"pluginInitData\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"dependencies\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallPlugin\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"config\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"pluginUninstallData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"PluginIgnoredHookUnapplyCallbackFailure\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"providingPlugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginIgnoredUninstallCallbackFailure\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginInstalled\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifestHash\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\"\n },\n {\n name: \"dependencies\",\n type: \"bytes21[]\",\n indexed: false,\n internalType: \"FunctionReference[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginUninstalled\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"callbacksSucceeded\",\n type: \"bool\",\n indexed: true,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IStandardExecutor.js\n var IStandardExecutorAbi;\n var init_IStandardExecutor = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IStandardExecutor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n IStandardExecutorAbi = [\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n }\n ],\n outputs: [{ name: \"\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"payable\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/MultiOwnerModularAccountFactory.js\n var MultiOwnerModularAccountFactoryAbi;\n var init_MultiOwnerModularAccountFactory = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/MultiOwnerModularAccountFactory.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n MultiOwnerModularAccountFactoryAbi = [\n {\n type: \"constructor\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n {\n name: \"multiOwnerPlugin\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"implementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"multiOwnerPluginManifestHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"ENTRYPOINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"IMPL\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"MULTI_OWNER_PLUGIN\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n { name: \"unstakeDelay\", type: \"uint32\", internalType: \"uint32\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"owners\", type: \"address[]\", internalType: \"address[]\" }\n ],\n outputs: [{ name: \"addr\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"owners\", type: \"address[]\", internalType: \"address[]\" }\n ],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [{ name: \"newOwner\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n { name: \"to\", type: \"address\", internalType: \"address payable\" },\n { name: \"token\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [{ name: \"to\", type: \"address\", internalType: \"address payable\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n { type: \"error\", name: \"InvalidOwner\", inputs: [] },\n { type: \"error\", name: \"OwnersArrayEmpty\", inputs: [] },\n { type: \"error\", name: \"OwnersLimitExceeded\", inputs: [] },\n { type: \"error\", name: \"TransferFailed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/MultisigModularAccountFactory.js\n var MultisigModularAccountFactoryAbi;\n var init_MultisigModularAccountFactory = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/MultisigModularAccountFactory.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n MultisigModularAccountFactoryAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"multisigPlugin\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"implementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"multisigPluginManifestHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"receive\",\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"ENTRYPOINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"IMPL\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"MULTISIG_PLUGIN\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n {\n name: \"unstakeDelay\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"amount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"owners\",\n type: \"address[]\",\n internalType: \"address[]\"\n },\n {\n name: \"threshold\",\n type: \"uint128\",\n internalType: \"uint128\"\n }\n ],\n outputs: [\n {\n name: \"addr\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"owners\",\n type: \"address[]\",\n internalType: \"address[]\"\n },\n {\n name: \"threshold\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [\n {\n name: \"newOwner\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n {\n name: \"to\",\n type: \"address\",\n internalType: \"address payable\"\n },\n {\n name: \"token\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"amount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [\n {\n name: \"to\",\n type: \"address\",\n internalType: \"address payable\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"InvalidAction\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidThreshold\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"OwnersArrayEmpty\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"OwnersLimitExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"TransferFailed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/UpgradeableModularAccount.js\n var UpgradeableModularAccountAbi;\n var init_UpgradeableModularAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/UpgradeableModularAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n UpgradeableModularAccountAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"anEntryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"fallback\", stateMutability: \"payable\" },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"result\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n }\n ],\n outputs: [{ name: \"results\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeFromPlugin\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [{ name: \"returnData\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeFromPluginExternal\",\n inputs: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"getExecutionFunctionConfig\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"config\",\n type: \"tuple\",\n internalType: \"struct IAccountLoupe.ExecutionFunctionConfig\",\n components: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n {\n name: \"userOpValidationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n },\n {\n name: \"runtimeValidationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getExecutionHooks\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"execHooks\",\n type: \"tuple[]\",\n internalType: \"struct IAccountLoupe.ExecutionHooks[]\",\n components: [\n {\n name: \"preExecHook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n },\n {\n name: \"postExecHook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getInstalledPlugins\",\n inputs: [],\n outputs: [\n {\n name: \"pluginAddresses\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getNonce\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getPreValidationHooks\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"preUserOpValidationHooks\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initialize\",\n inputs: [\n { name: \"plugins\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"pluginInitData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installPlugin\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n {\n name: \"manifestHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"pluginInstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"dependencies\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n { name: \"operator\", type: \"address\", internalType: \"address\" },\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"ids\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"values\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n { name: \"operator\", type: \"address\", internalType: \"address\" },\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"id\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n { name: \"operator\", type: \"address\", internalType: \"address\" },\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"tokenId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"tokensReceived\",\n inputs: [\n { name: \"operator\", type: \"address\", internalType: \"address\" },\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"to\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"userData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"operatorData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallPlugin\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"config\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"pluginUninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"callGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"maxFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ModularAccountInitialized\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n indexed: true,\n internalType: \"contract IEntryPoint\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginInstalled\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifestHash\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\"\n },\n {\n name: \"dependencies\",\n type: \"bytes21[]\",\n indexed: false,\n internalType: \"FunctionReference[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginUninstalled\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: true,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n { type: \"error\", name: \"AlreadyInitializing\", inputs: [] },\n { type: \"error\", name: \"AlwaysDenyRule\", inputs: [] },\n { type: \"error\", name: \"ArrayLengthMismatch\", inputs: [] },\n {\n type: \"error\",\n name: \"DuplicateHookLimitExceeded\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"hook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicatePreRuntimeValidationHookLimitExceeded\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"hook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicatePreUserOpValidationHookLimitExceeded\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"hook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"Erc4337FunctionNotAllowed\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n {\n type: \"error\",\n name: \"ExecFromPluginExternalNotPermitted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"ExecFromPluginNotPermitted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }\n ]\n },\n {\n type: \"error\",\n name: \"ExecutionFunctionAlreadySet\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n {\n type: \"error\",\n name: \"IPluginFunctionNotAllowed\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n { type: \"error\", name: \"InterfaceNotAllowed\", inputs: [] },\n { type: \"error\", name: \"InvalidDependenciesProvided\", inputs: [] },\n { type: \"error\", name: \"InvalidPluginManifest\", inputs: [] },\n {\n type: \"error\",\n name: \"MissingPluginDependency\",\n inputs: [{ name: \"dependency\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"NativeFunctionNotAllowed\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n {\n type: \"error\",\n name: \"NativeTokenSpendingNotPermitted\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"NullFunctionReference\", inputs: [] },\n {\n type: \"error\",\n name: \"PluginAlreadyInstalled\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginCallDenied\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginDependencyViolation\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginInstallCallbackFailed\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"PluginInterfaceNotSupported\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginNotInstalled\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginUninstallCallbackFailed\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"PostExecHookReverted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"PreExecHookReverted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"PreRuntimeValidationHookFailed\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"RuntimeValidationFunctionAlreadySet\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"validationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"RuntimeValidationFunctionMissing\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n {\n type: \"error\",\n name: \"RuntimeValidationFunctionReverted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { type: \"error\", name: \"UnauthorizedCallContext\", inputs: [] },\n {\n type: \"error\",\n name: \"UnexpectedAggregator\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"aggregator\", type: \"address\", internalType: \"address\" }\n ]\n },\n {\n type: \"error\",\n name: \"UnrecognizedFunction\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n { type: \"error\", name: \"UpgradeFailed\", inputs: [] },\n { type: \"error\", name: \"UserOpNotFromEntryPoint\", inputs: [] },\n {\n type: \"error\",\n name: \"UserOpValidationFunctionAlreadySet\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"validationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UserOpValidationFunctionMissing\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account-loupe/decorator.js\n var accountLoupeActions;\n var init_decorator = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account-loupe/decorator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_IAccountLoupe();\n accountLoupeActions = (client) => ({\n getExecutionFunctionConfig: async ({ selector, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"getExecutionFunctionConfig\", client);\n }\n return client.readContract({\n address: account.address,\n abi: IAccountLoupeAbi,\n functionName: \"getExecutionFunctionConfig\",\n args: [selector]\n });\n },\n getExecutionHooks: async ({ selector, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"getExecutionHooks\", client);\n }\n return client.readContract({\n address: account.address,\n abi: IAccountLoupeAbi,\n functionName: \"getExecutionHooks\",\n args: [selector]\n });\n },\n getPreValidationHooks: async ({ selector, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"getPreValidationHooks\", client);\n }\n return client.readContract({\n address: account.address,\n abi: IAccountLoupeAbi,\n functionName: \"getPreValidationHooks\",\n args: [selector]\n });\n },\n getInstalledPlugins: async ({ account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"getInstalledPlugins\", client);\n }\n return client.readContract({\n address: account.address,\n abi: IAccountLoupeAbi,\n functionName: \"getInstalledPlugins\"\n }).catch(() => []);\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/plugin.js\n var addresses, MultiOwnerPlugin, multiOwnerPluginActions, MultiOwnerPluginExecutionFunctionAbi, MultiOwnerPluginAbi;\n var init_plugin = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/plugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm6();\n init_src();\n addresses = {\n 1: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 10: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 137: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 252: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 2523: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 8453: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 42161: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 80001: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 80002: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 84532: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 421614: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 7777777: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 11155111: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 11155420: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 999999999: \"0xcE0000007B008F50d762D155002600004cD6c647\"\n };\n MultiOwnerPlugin = {\n meta: {\n name: \"Multi Owner Plugin\",\n version: \"1.0.0\",\n addresses\n },\n getContract: (client, address) => {\n if (!client.chain)\n throw new ChainNotFoundError2();\n return getContract({\n address: address || addresses[client.chain.id],\n abi: MultiOwnerPluginAbi,\n client\n });\n }\n };\n multiOwnerPluginActions = (client) => ({\n updateOwners({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"updateOwners\", client);\n }\n const uo = encodeFunctionData({\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"updateOwners\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n installMultiOwnerPlugin({ account = client.account, overrides, context: context2, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"installMultiOwnerPlugin\", client);\n }\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const dependencies = params.dependencyOverrides ?? [];\n const pluginAddress = params.pluginAddress ?? MultiOwnerPlugin.meta.addresses[chain2.id];\n if (!pluginAddress) {\n throw new Error(\"missing MultiOwnerPlugin address for chain \" + chain2.name);\n }\n return installPlugin(client, {\n pluginAddress,\n pluginInitData: encodeAbiParameters([{ type: \"address[]\" }], params.args),\n dependencies,\n overrides,\n account,\n context: context2\n });\n },\n encodeUpdateOwners({ args }) {\n return encodeFunctionData({\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"updateOwners\",\n args\n });\n },\n encodeEip712Domain() {\n return encodeFunctionData({\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\"\n });\n },\n async readEip712Domain({ account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"readEip712Domain\", client);\n }\n return client.readContract({\n address: account.address,\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\"\n });\n },\n encodeIsValidSignature({ args }) {\n return encodeFunctionData({\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args\n });\n },\n async readIsValidSignature({ args, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"readIsValidSignature\", client);\n }\n return client.readContract({\n address: account.address,\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args\n });\n }\n });\n MultiOwnerPluginExecutionFunctionAbi = [\n {\n type: \"function\",\n name: \"updateOwners\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n }\n ];\n MultiOwnerPluginAbi = [\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"encodeMessageData\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getMessageHash\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isOwnerOf\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"ownerToCheck\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onInstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onUninstall\",\n inputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"ownersOf\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"address[]\", internalType: \"address[]\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pluginManifest\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginManifest\",\n components: [\n { name: \"interfaceIds\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n {\n name: \"dependencyInterfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"executionFunctions\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permittedExecutionSelectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permitAnyExternalAddress\",\n type: \"bool\",\n internalType: \"bool\"\n },\n { name: \"canSpendNativeToken\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permittedExternalCalls\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExternalCallPermission[]\",\n components: [\n {\n name: \"externalAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"permitAnySelector\", type: \"bool\", internalType: \"bool\" },\n { name: \"selectors\", type: \"bytes4[]\", internalType: \"bytes4[]\" }\n ]\n },\n {\n name: \"userOpValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"runtimeValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preUserOpValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"preExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n name: \"postExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"pluginMetadata\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginMetadata\",\n components: [\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"author\", type: \"string\", internalType: \"string\" },\n {\n name: \"permissionDescriptors\",\n type: \"tuple[]\",\n internalType: \"struct SelectorPermission[]\",\n components: [\n {\n name: \"functionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"permissionDescription\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"postExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"preExecHookData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preRuntimeValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preUserOpValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"runtimeValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"updateOwners\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"userOpValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"event\",\n name: \"OwnerUpdated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"addedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n },\n {\n name: \"removedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n { type: \"error\", name: \"EmptyOwnersNotAllowed\", inputs: [] },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"NotAuthorized\", inputs: [] },\n {\n type: \"error\",\n name: \"NotContractCaller\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"NotImplemented\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" }\n ]\n },\n { type: \"error\", name: \"NotInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"OwnerDoesNotExist\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/signer.js\n var multiOwnerMessageSigner;\n var init_signer2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_plugin();\n multiOwnerMessageSigner = (client, accountAddress, signer, pluginAddress = MultiOwnerPlugin.meta.addresses[client.chain.id]) => {\n const get712Wrapper = async (msg) => {\n const [, name, version7, chainId, verifyingContract, salt] = await client.readContract({\n abi: MultiOwnerPluginAbi,\n address: pluginAddress,\n functionName: \"eip712Domain\",\n account: accountAddress\n });\n return {\n domain: {\n chainId: Number(chainId),\n name,\n salt,\n verifyingContract,\n version: version7\n },\n types: {\n AlchemyModularAccountMessage: [{ name: \"message\", type: \"bytes\" }]\n },\n message: {\n message: msg\n },\n primaryType: \"AlchemyModularAccountMessage\"\n };\n };\n const prepareSign = async (params) => {\n const data = await get712Wrapper(params.type === \"personal_sign\" ? hashMessage(params.data) : hashTypedData(params.data));\n return {\n type: \"eth_signTypedData_v4\",\n data\n };\n };\n const formatSign = async (signature) => {\n return signature;\n };\n return {\n prepareSign,\n formatSign,\n getDummySignature: () => {\n return \"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\";\n },\n signUserOperationHash: (uoHash) => {\n return signer().signMessage({ raw: uoHash });\n },\n async signMessage({ message }) {\n const { type, data } = await prepareSign({\n type: \"personal_sign\",\n data: message\n });\n return type === \"personal_sign\" ? signer().signMessage(data) : signer().signTypedData(data);\n },\n signTypedData: async (typedDataDefinition) => {\n const { type, data } = await prepareSign({\n type: \"eth_signTypedData_v4\",\n data: typedDataDefinition\n });\n return type === \"personal_sign\" ? signer().signMessage(data) : signer().signTypedData(data);\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/utils.js\n async function getMSCAUpgradeToData(client, args) {\n const { account: account_ = client.account, multiOwnerPluginAddress } = args;\n if (!account_) {\n throw new AccountNotFoundError2();\n }\n const account = account_;\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const initData = await getMAInitializationData({\n client,\n multiOwnerPluginAddress,\n signerAddress: await account.getSigner().getAddress()\n });\n return {\n ...initData,\n createMAAccount: async () => createMultiOwnerModularAccount({\n transport: custom(client.transport),\n chain: chain2,\n signer: account.getSigner(),\n accountAddress: account.address\n })\n };\n }\n async function getMAInitializationData({ client, multiOwnerPluginAddress, signerAddress }) {\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const factoryAddress = getDefaultMultiOwnerModularAccountFactoryAddress(client.chain);\n const implAddress = await client.readContract({\n abi: MultiOwnerModularAccountFactoryAbi,\n address: factoryAddress,\n functionName: \"IMPL\"\n });\n const multiOwnerAddress = multiOwnerPluginAddress ?? MultiOwnerPlugin.meta.addresses[client.chain.id];\n if (!multiOwnerAddress) {\n throw new Error(\"could not get multi owner plugin address\");\n }\n const moPluginManifest = await client.readContract({\n abi: IPluginAbi,\n address: multiOwnerAddress,\n functionName: \"pluginManifest\"\n });\n const hashedMultiOwnerPluginManifest = keccak256(encodeFunctionResult({\n abi: IPluginAbi,\n functionName: \"pluginManifest\",\n result: moPluginManifest\n }));\n const encodedOwner = encodeAbiParameters(parseAbiParameters(\"address[]\"), Array.isArray(signerAddress) ? [signerAddress] : [[signerAddress]]);\n const encodedPluginInitData = encodeAbiParameters(parseAbiParameters(\"bytes32[], bytes[]\"), [[hashedMultiOwnerPluginManifest], [encodedOwner]]);\n const encodedMSCAInitializeData = encodeFunctionData({\n abi: UpgradeableModularAccountAbi,\n functionName: \"initialize\",\n args: [[multiOwnerAddress], encodedPluginInitData]\n });\n return {\n implAddress,\n initializationData: encodedMSCAInitializeData\n };\n }\n var getDefaultMultisigModularAccountFactoryAddress, getDefaultMultiOwnerModularAccountFactoryAddress;\n var init_utils11 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_exports3();\n init_esm();\n init_IPlugin();\n init_MultiOwnerModularAccountFactory();\n init_UpgradeableModularAccount();\n init_multiOwnerAccount();\n init_plugin();\n getDefaultMultisigModularAccountFactoryAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x000000000000204327E6669f00901a57CE15aE15\";\n }\n };\n getDefaultMultiOwnerModularAccountFactoryAddress = (chain2) => {\n switch (chain2.id) {\n default:\n return \"0x000000e92D78D90000007F0082006FDA09BD5f11\";\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/standardExecutor.js\n var standardExecutor;\n var init_standardExecutor = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/standardExecutor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_IStandardExecutor();\n standardExecutor = {\n encodeExecute: async ({ target, data, value }) => {\n return encodeFunctionData({\n abi: IStandardExecutorAbi,\n functionName: \"execute\",\n args: [target, value ?? 0n, data]\n });\n },\n encodeBatchExecute: async (txs) => {\n return encodeFunctionData({\n abi: IStandardExecutorAbi,\n functionName: \"executeBatch\",\n args: [\n txs.map((tx) => ({\n target: tx.target,\n data: tx.data,\n value: tx.value ?? 0n\n }))\n ]\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/multiOwnerAccount.js\n async function createMultiOwnerModularAccount(config2) {\n const { transport, chain: chain2, signer, accountAddress, initCode, entryPoint = getEntryPoint(chain2, { version: \"0.6.0\" }), factoryAddress = getDefaultMultiOwnerModularAccountFactoryAddress(chain2), owners = [], salt = 0n } = config2;\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const getAccountInitCode = async () => {\n if (initCode) {\n return initCode;\n }\n const ownerAddress = await signer.getAddress();\n const owners_ = Array.from(/* @__PURE__ */ new Set([...owners, ownerAddress])).filter((x4) => hexToBigInt(x4) !== 0n).sort((a3, b4) => {\n const bigintA = hexToBigInt(a3);\n const bigintB = hexToBigInt(b4);\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n });\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: MultiOwnerModularAccountFactoryAbi,\n functionName: \"createAccount\",\n args: [salt, owners_]\n })\n ]);\n };\n const _accountAddress = await getAccountAddress({\n client,\n entryPoint,\n accountAddress,\n getAccountInitCode\n });\n const baseAccount = await toSmartContractAccount({\n transport,\n chain: chain2,\n entryPoint,\n accountAddress: _accountAddress,\n source: `MultiOwnerModularAccount`,\n getAccountInitCode,\n ...standardExecutor,\n ...multiOwnerMessageSigner(client, _accountAddress, () => signer)\n });\n return {\n ...baseAccount,\n publicKey: await signer.getAddress(),\n getSigner: () => signer\n };\n }\n var init_multiOwnerAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/multiOwnerAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_MultiOwnerModularAccountFactory();\n init_signer2();\n init_utils11();\n init_standardExecutor();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/plugin.js\n var addresses2, MultisigPlugin, multisigPluginActions, MultisigPluginExecutionFunctionAbi, MultisigPluginAbi;\n var init_plugin2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/plugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm6();\n init_src();\n addresses2 = {\n 1: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 10: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 137: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 252: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 1337: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 2523: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 8453: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 42161: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 80002: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 84532: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 421614: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 7777777: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 11155111: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 11155420: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 999999999: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\"\n };\n MultisigPlugin = {\n meta: {\n name: \"Multisig Plugin\",\n version: \"1.0.0\",\n addresses: addresses2\n },\n getContract: (client, address) => {\n if (!client.chain)\n throw new ChainNotFoundError2();\n return getContract({\n address: address || addresses2[client.chain.id],\n abi: MultisigPluginAbi,\n client\n });\n }\n };\n multisigPluginActions = (client) => ({\n updateOwnership({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"updateOwnership\", client);\n }\n const uo = encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"updateOwnership\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n installMultisigPlugin({ account = client.account, overrides, context: context2, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"installMultisigPlugin\", client);\n }\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const dependencies = params.dependencyOverrides ?? [];\n const pluginAddress = params.pluginAddress ?? MultisigPlugin.meta.addresses[chain2.id];\n if (!pluginAddress) {\n throw new Error(\"missing MultisigPlugin address for chain \" + chain2.name);\n }\n return installPlugin(client, {\n pluginAddress,\n pluginInitData: encodeAbiParameters([{ type: \"address[]\" }, { type: \"uint256\" }], params.args),\n dependencies,\n overrides,\n account,\n context: context2\n });\n },\n encodeUpdateOwnership({ args }) {\n return encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"updateOwnership\",\n args\n });\n },\n encodeEip712Domain() {\n return encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\"\n });\n },\n async readEip712Domain({ account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"readEip712Domain\", client);\n }\n return client.readContract({\n address: account.address,\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\"\n });\n },\n encodeIsValidSignature({ args }) {\n return encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args\n });\n },\n async readIsValidSignature({ args, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"readIsValidSignature\", client);\n }\n return client.readContract({\n address: account.address,\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args\n });\n }\n });\n MultisigPluginExecutionFunctionAbi = [\n {\n type: \"function\",\n name: \"updateOwnership\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"newThreshold\", type: \"uint128\", internalType: \"uint128\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n }\n ];\n MultisigPluginAbi = [\n {\n type: \"constructor\",\n inputs: [{ name: \"entryPoint\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"ENTRYPOINT\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"checkNSignatures\",\n inputs: [\n { name: \"actualDigest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"upperLimitGasDigest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"signatures\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [\n { name: \"success\", type: \"bool\", internalType: \"bool\" },\n { name: \"firstFailure\", type: \"uint256\", internalType: \"uint256\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"encodeMessageData\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getMessageHash\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isOwnerOf\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"ownerToCheck\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onInstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onUninstall\",\n inputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"ownershipInfoOf\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }],\n outputs: [\n { name: \"\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pluginManifest\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginManifest\",\n components: [\n { name: \"interfaceIds\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n {\n name: \"dependencyInterfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"executionFunctions\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permittedExecutionSelectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permitAnyExternalAddress\",\n type: \"bool\",\n internalType: \"bool\"\n },\n { name: \"canSpendNativeToken\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permittedExternalCalls\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExternalCallPermission[]\",\n components: [\n {\n name: \"externalAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"permitAnySelector\", type: \"bool\", internalType: \"bool\" },\n { name: \"selectors\", type: \"bytes4[]\", internalType: \"bytes4[]\" }\n ]\n },\n {\n name: \"userOpValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"runtimeValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preUserOpValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"preExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n name: \"postExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"pluginMetadata\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginMetadata\",\n components: [\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"author\", type: \"string\", internalType: \"string\" },\n {\n name: \"permissionDescriptors\",\n type: \"tuple[]\",\n internalType: \"struct SelectorPermission[]\",\n components: [\n {\n name: \"functionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"permissionDescription\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"postExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"preExecHookData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preRuntimeValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preUserOpValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"runtimeValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"updateOwnership\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"newThreshold\", type: \"uint128\", internalType: \"uint128\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"userOpValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"event\",\n name: \"OwnerUpdated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"addedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n },\n {\n name: \"removedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n },\n {\n name: \"threshold\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n { type: \"error\", name: \"ECDSARecoverFailure\", inputs: [] },\n { type: \"error\", name: \"EmptyOwnersNotAllowed\", inputs: [] },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n { type: \"error\", name: \"InvalidAddress\", inputs: [] },\n { type: \"error\", name: \"InvalidMaxFeePerGas\", inputs: [] },\n { type: \"error\", name: \"InvalidMaxPriorityFeePerGas\", inputs: [] },\n { type: \"error\", name: \"InvalidNumSigsOnActualGas\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"InvalidPreVerificationGas\", inputs: [] },\n { type: \"error\", name: \"InvalidSigLength\", inputs: [] },\n { type: \"error\", name: \"InvalidSigOffset\", inputs: [] },\n { type: \"error\", name: \"InvalidThreshold\", inputs: [] },\n {\n type: \"error\",\n name: \"NotContractCaller\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"NotImplemented\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" }\n ]\n },\n { type: \"error\", name: \"NotInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"OwnerDoesNotExist\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/signer.js\n var multisigSignMethods;\n var init_signer3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_plugin2();\n multisigSignMethods = ({ client, accountAddress, signer, threshold, pluginAddress = MultisigPlugin.meta.addresses[client.chain.id] }) => {\n const get712Wrapper = async (msg) => {\n const [, name, version7, chainId, verifyingContract, salt] = await client.readContract({\n abi: MultisigPluginAbi,\n address: pluginAddress,\n functionName: \"eip712Domain\",\n account: accountAddress\n });\n return {\n domain: {\n chainId: Number(chainId),\n name,\n salt,\n verifyingContract,\n version: version7\n },\n types: {\n AlchemyMultisigMessage: [{ name: \"message\", type: \"bytes\" }]\n },\n message: {\n message: msg\n },\n primaryType: \"AlchemyMultisigMessage\"\n };\n };\n const prepareSign = async (params) => {\n const messageHash = params.type === \"personal_sign\" ? hashMessage(params.data) : hashTypedData(params.data);\n return {\n type: \"eth_signTypedData_v4\",\n data: await get712Wrapper(messageHash)\n };\n };\n const formatSign = async (signature) => {\n return signature;\n };\n return {\n prepareSign,\n formatSign,\n getDummySignature: async () => {\n const [, thresholdRead] = await client.readContract({\n abi: MultisigPluginAbi,\n address: pluginAddress,\n functionName: \"ownershipInfoOf\",\n args: [accountAddress]\n });\n const actualThreshold = thresholdRead === 0n ? threshold : thresholdRead;\n return \"0x\" + \"FF\".repeat(32 * 3) + \"fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa3c\" + \"fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\".repeat(Number(actualThreshold) - 1);\n },\n signUserOperationHash: (uoHash) => {\n return signer().signMessage({ raw: uoHash });\n },\n async signMessage({ message }) {\n const { type, data } = await prepareSign({\n type: \"personal_sign\",\n data: message\n });\n return type === \"personal_sign\" ? signer().signMessage(data) : signer().signTypedData(data);\n },\n signTypedData: async (typedDataDefinition) => {\n const { type, data } = await prepareSign({\n type: \"eth_signTypedData_v4\",\n data: typedDataDefinition\n });\n return type === \"personal_sign\" ? signer().signMessage(data) : signer().signTypedData(data);\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/multisigAccount.js\n async function createMultisigModularAccount(config2) {\n const { transport, chain: chain2, signer, accountAddress: accountAddress_, initCode, entryPoint = getEntryPoint(chain2, { version: \"0.6.0\" }), factoryAddress = getDefaultMultisigModularAccountFactoryAddress(chain2), owners = [], salt = 0n, threshold } = config2;\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const getAccountInitCode = async () => {\n if (initCode) {\n return initCode;\n }\n const sigAddress = await signer.getAddress();\n const sigs_ = Array.from(/* @__PURE__ */ new Set([...owners, sigAddress])).filter((x4) => hexToBigInt(x4) !== 0n).sort((a3, b4) => {\n const bigintA = hexToBigInt(a3);\n const bigintB = hexToBigInt(b4);\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n });\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: MultisigModularAccountFactoryAbi,\n functionName: \"createAccount\",\n args: [salt, sigs_, threshold]\n })\n ]);\n };\n const accountAddress = await getAccountAddress({\n client,\n entryPoint,\n accountAddress: accountAddress_,\n getAccountInitCode\n });\n const baseAccount = await toSmartContractAccount({\n transport,\n chain: chain2,\n entryPoint,\n accountAddress,\n source: MULTISIG_ACCOUNT_SOURCE,\n getAccountInitCode,\n ...standardExecutor,\n ...multisigSignMethods({\n client,\n accountAddress,\n threshold,\n signer: () => signer\n })\n });\n return {\n ...baseAccount,\n getLocalThreshold: () => threshold,\n publicKey: await signer.getAddress(),\n getSigner: () => signer\n };\n }\n var MULTISIG_ACCOUNT_SOURCE, isMultisigModularAccount;\n var init_multisigAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/multisigAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_MultisigModularAccountFactory();\n init_signer3();\n init_utils11();\n init_standardExecutor();\n MULTISIG_ACCOUNT_SOURCE = \"MultisigModularAccount\";\n isMultisigModularAccount = (acct) => {\n return acct.source === MULTISIG_ACCOUNT_SOURCE;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/alchemyClient.js\n async function createModularAccountAlchemyClient(config2) {\n return createMultiOwnerModularAccountClient(config2);\n }\n var init_alchemyClient2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/alchemyClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_src();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/installPlugin.js\n async function installPlugin(client, { overrides, context: context2, account = client.account, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"installPlugin\", client);\n }\n const callData = await encodeInstallPluginUserOperation(client, params);\n return client.sendUserOperation({\n uo: callData,\n overrides,\n account,\n context: context2\n });\n }\n async function encodeInstallPluginUserOperation(client, params) {\n const pluginManifest = await client.readContract({\n abi: IPluginAbi,\n address: params.pluginAddress,\n functionName: \"pluginManifest\"\n });\n const manifestHash = params.manifestHash ?? keccak256(encodeFunctionResult({\n abi: IPluginAbi,\n functionName: \"pluginManifest\",\n result: pluginManifest\n }));\n return encodeFunctionData({\n abi: IPluginManagerAbi,\n functionName: \"installPlugin\",\n args: [\n params.pluginAddress,\n manifestHash,\n params.pluginInitData ?? \"0x\",\n params.dependencies ?? []\n ]\n });\n }\n var init_installPlugin = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/installPlugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_IPlugin();\n init_IPluginManager();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/uninstallPlugin.js\n async function uninstallPlugin(client, { overrides, account = client.account, context: context2, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"uninstallPlugin\", client);\n }\n const callData = await encodeUninstallPluginUserOperation(params);\n return client.sendUserOperation({\n uo: callData,\n overrides,\n account,\n context: context2\n });\n }\n async function encodeUninstallPluginUserOperation(params) {\n return encodeFunctionData({\n abi: IPluginManagerAbi,\n functionName: \"uninstallPlugin\",\n args: [\n params.pluginAddress,\n params.config ?? \"0x\",\n params.pluginUninstallData ?? \"0x\"\n ]\n });\n }\n var init_uninstallPlugin = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/uninstallPlugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_IPluginManager();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/decorator.js\n function pluginManagerActions(client) {\n return {\n installPlugin: async (params) => installPlugin(client, params),\n uninstallPlugin: async (params) => uninstallPlugin(client, params)\n };\n }\n var init_decorator2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/decorator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_installPlugin();\n init_uninstallPlugin();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/extension.js\n var multiOwnerPluginActions2;\n var init_extension = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/extension.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin();\n multiOwnerPluginActions2 = (client) => ({\n ...multiOwnerPluginActions(client),\n async readOwners(args) {\n const account = args?.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const contract = MultiOwnerPlugin.getContract(client, args?.pluginAddress);\n return contract.read.ownersOf([account.address]);\n },\n async isOwnerOf(args) {\n const account = args.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const contract = MultiOwnerPlugin.getContract(client, args.pluginAddress);\n return contract.read.isOwnerOf([account.address, args.address]);\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/index.js\n var init_multi_owner = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_extension();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/errors.js\n var InvalidAggregatedSignatureError, InvalidContextSignatureError, MultisigAccountExpectedError, MultisigMissingSignatureError;\n var init_errors6 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n InvalidAggregatedSignatureError = class extends BaseError4 {\n constructor() {\n super(\"Invalid aggregated signature\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidAggregatedSignatureError\"\n });\n }\n };\n InvalidContextSignatureError = class extends BaseError4 {\n constructor() {\n super(\"Expected context.signature to be a hex string\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidContextSignatureError\"\n });\n }\n };\n MultisigAccountExpectedError = class extends BaseError4 {\n constructor() {\n super(\"Expected account to be a multisig modular account\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"MultisigAccountExpectedError\"\n });\n }\n };\n MultisigMissingSignatureError = class extends BaseError4 {\n constructor() {\n super(\"UserOp must have at least one signature already\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"MultisigMissingSignatureError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/getThreshold.js\n async function getThreshold(client, args) {\n const account = args.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isMultisigModularAccount(account)) {\n throw new MultisigAccountExpectedError();\n }\n const [, threshold] = await MultisigPlugin.getContract(client, args.pluginAddress).read.ownershipInfoOf([account.address]);\n return threshold === 0n ? account.getLocalThreshold() : threshold;\n }\n var init_getThreshold = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/getThreshold.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_multisigAccount();\n init_plugin2();\n init_errors6();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/isOwnerOf.js\n async function isOwnerOf(client, args) {\n const account = args.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const contract = MultisigPlugin.getContract(client, args.pluginAddress);\n return await contract.read.isOwnerOf([account.address, args.address]);\n }\n var init_isOwnerOf = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/isOwnerOf.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/splitAggregatedSignature.js\n var splitAggregatedSignature;\n var init_splitAggregatedSignature = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/splitAggregatedSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_errors6();\n splitAggregatedSignature = async (args) => {\n const { aggregatedSignature, threshold, account, request } = args;\n if (aggregatedSignature.length < 192 + (65 * threshold - 1)) {\n throw new InvalidAggregatedSignatureError();\n }\n const pvg = takeBytes(aggregatedSignature, { count: 32 });\n const maxFeePerGas = takeBytes(aggregatedSignature, {\n count: 32,\n offset: 32\n });\n const maxPriorityFeePerGas = takeBytes(aggregatedSignature, {\n count: 32,\n offset: 64\n });\n const signaturesAndData = takeBytes(aggregatedSignature, {\n offset: 96\n });\n const signatureHexes = (() => {\n const signatureStr = takeBytes(signaturesAndData, {\n count: 65 * threshold - 1\n });\n const signatures2 = [];\n for (let i3 = 0; i3 < threshold - 1; i3++) {\n signatures2.push(takeBytes(signatureStr, { count: 65, offset: i3 * 65 }));\n }\n return signatures2;\n })();\n const signatures = signatureHexes.map(async (signature) => {\n const v2 = BigInt(takeBytes(signature, { count: 1, offset: 64 }));\n const signerType = v2 === 0n ? \"CONTRACT\" : \"EOA\";\n if (signerType === \"EOA\") {\n const hash3 = hashMessage({\n raw: account.getEntryPoint().getUserOperationHash({\n ...request,\n preVerificationGas: pvg,\n maxFeePerGas,\n maxPriorityFeePerGas\n })\n });\n return {\n // the signer doesn't get used here for EOAs\n // TODO: nope. this needs to actually do an ec recover\n signer: await recoverAddress({ hash: hash3, signature }),\n signature,\n signerType,\n userOpSigType: \"UPPERLIMIT\"\n };\n }\n const signer = takeBytes(signature, { count: 20, offset: 12 });\n const offset = fromHex(takeBytes(signature, { count: 32, offset: 32 }), \"number\");\n const signatureLength = fromHex(takeBytes(signaturesAndData, { count: 32, offset }), \"number\");\n return {\n signer,\n signerType,\n userOpSigType: \"UPPERLIMIT\",\n signature: takeBytes(signaturesAndData, {\n count: signatureLength,\n offset: offset + 32\n })\n };\n });\n return {\n upperLimitPvg: pvg,\n upperLimitMaxFeePerGas: maxFeePerGas,\n upperLimitMaxPriorityFeePerGas: maxPriorityFeePerGas,\n signatures: await Promise.all(signatures)\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/proposeUserOperation.js\n async function proposeUserOperation(client, { uo, account = client.account, overrides: overrides_ }) {\n const overrides = {\n maxFeePerGas: { multiplier: 3 },\n maxPriorityFeePerGas: { multiplier: 2 },\n preVerificationGas: { multiplier: 1e3 },\n ...overrides_\n };\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"proposeUserOperation\", client);\n }\n if (!isSmartAccountWithSigner(account)) {\n throw new SmartAccountWithSignerRequiredError();\n }\n const builtUo = await client.buildUserOperation({\n account,\n uo,\n overrides\n });\n const request = await client.signUserOperation({\n uoStruct: builtUo,\n account,\n context: {\n userOpSignatureType: \"UPPERLIMIT\"\n }\n });\n const splitSignatures = await splitAggregatedSignature({\n request,\n aggregatedSignature: request.signature,\n account,\n // split works on the assumption that we have t - 1 signatures\n threshold: 2\n });\n return {\n request,\n signatureObj: splitSignatures.signatures[0],\n aggregatedSignature: request.signature\n };\n }\n var init_proposeUserOperation = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/proposeUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_splitAggregatedSignature();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/readOwners.js\n async function readOwners(client, args) {\n const account = args?.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const [owners] = await MultisigPlugin.getContract(client, args?.pluginAddress).read.ownershipInfoOf([account.address]);\n return owners;\n }\n var init_readOwners = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/readOwners.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/formatSignatures.js\n var formatSignatures;\n var init_formatSignatures = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/formatSignatures.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n formatSignatures = (signatures, usingMaxValues = false) => {\n let eoaSigs = \"\";\n let contractSigs = \"\";\n let offset = BigInt(65 * signatures.length);\n signatures.sort((a3, b4) => {\n const bigintA = hexToBigInt(a3.signer);\n const bigintB = hexToBigInt(b4.signer);\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n }).forEach((sig) => {\n const addV = sig.userOpSigType === \"ACTUAL\" && !usingMaxValues ? 32 : 0;\n if (sig.signerType === \"EOA\") {\n let v2 = parseInt(takeBytes(sig.signature, { count: 1, offset: 64 })) + addV;\n eoaSigs += concat([\n takeBytes(sig.signature, { count: 64 }),\n toHex(v2, { size: 1 })\n ]).slice(2);\n } else {\n const sigLen = BigInt(sig.signature.slice(2).length / 2);\n eoaSigs += concat([\n pad(sig.signer),\n toHex(offset, { size: 32 }),\n toHex(addV, { size: 1 })\n ]).slice(2);\n contractSigs += concat([\n toHex(sigLen, { size: 32 }),\n sig.signature\n ]).slice(2);\n offset += sigLen;\n }\n });\n return \"0x\" + eoaSigs + contractSigs;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/combineSignatures.js\n function combineSignatures({ signatures, upperLimitMaxFeePerGas, upperLimitMaxPriorityFeePerGas, upperLimitPvg, usingMaxValues }) {\n return concat([\n pad(upperLimitPvg),\n pad(upperLimitMaxFeePerGas),\n pad(upperLimitMaxPriorityFeePerGas),\n formatSignatures(signatures, usingMaxValues)\n ]);\n }\n var init_combineSignatures = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/combineSignatures.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_formatSignatures();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/getSignerType.js\n var getSignerType;\n var init_getSignerType = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/getSignerType.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n getSignerType = async ({ client, signature, signer }) => {\n const signerAddress = await signer.getAddress();\n const byteCode = await client.getBytecode({ address: signerAddress });\n return (byteCode ?? \"0x\") === \"0x\" && size(signature) === 65 ? \"EOA\" : \"CONTRACT\";\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/index.js\n var init_utils12 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_combineSignatures();\n init_formatSignatures();\n init_getSignerType();\n init_splitAggregatedSignature();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/signMultisigUserOperation.js\n async function signMultisigUserOperation(client, params) {\n const { account = client.account, signatures, userOperationRequest } = params;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"signMultisigUserOperation\", client);\n }\n if (!isSmartAccountWithSigner(account)) {\n throw new SmartAccountWithSignerRequiredError();\n }\n if (!signatures.length) {\n throw new MultisigMissingSignatureError();\n }\n const signerAddress = await account.getSigner().getAddress();\n const signedRequest = await client.signUserOperation({\n account,\n uoStruct: userOperationRequest,\n context: {\n aggregatedSignature: combineSignatures({\n signatures,\n upperLimitMaxFeePerGas: userOperationRequest.maxFeePerGas,\n upperLimitMaxPriorityFeePerGas: userOperationRequest.maxPriorityFeePerGas,\n upperLimitPvg: userOperationRequest.preVerificationGas,\n usingMaxValues: false\n }),\n signatures,\n userOpSignatureType: \"UPPERLIMIT\"\n }\n });\n const splitSignatures = await splitAggregatedSignature({\n account,\n request: signedRequest,\n aggregatedSignature: signedRequest.signature,\n // split works on the assumption that we have t - 1 signatures\n // we have signatures.length + 1 signatures now, so we need sl + 1 + 1\n threshold: signatures.length + 2\n });\n const signatureObj = splitSignatures.signatures.find((x4) => x4.signer === signerAddress);\n if (!signatureObj) {\n throw new Error(\"INTERNAL ERROR: signature not found in split signatures, this is an internal bug please report\");\n }\n return {\n signatureObj,\n signature: signatureObj.signature,\n aggregatedSignature: signedRequest.signature\n };\n }\n var init_signMultisigUserOperation = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/signMultisigUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_errors6();\n init_utils12();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/extension.js\n var multisigPluginActions2;\n var init_extension2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/extension.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getThreshold();\n init_isOwnerOf();\n init_proposeUserOperation();\n init_readOwners();\n init_signMultisigUserOperation();\n init_plugin2();\n multisigPluginActions2 = (client) => ({\n ...multisigPluginActions(client),\n readOwners: (args) => readOwners(client, args),\n isOwnerOf: (args) => isOwnerOf(client, args),\n getThreshold: (args) => getThreshold(client, args),\n proposeUserOperation: (args) => proposeUserOperation(client, args),\n signMultisigUserOperation: (params) => signMultisigUserOperation(client, params)\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/middleware.js\n var multisigSignatureMiddleware, isUsingMaxValues;\n var init_middleware = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/middleware.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_multisigAccount();\n init_errors6();\n init_utils12();\n multisigSignatureMiddleware = async (struct, { account, client, context: context2 }) => {\n if (!context2) {\n throw new InvalidContextSignatureError();\n }\n if (!isSmartAccountWithSigner(account)) {\n throw new SmartAccountWithSignerRequiredError();\n }\n if (!isMultisigModularAccount(account)) {\n throw new MultisigAccountExpectedError();\n }\n const resolvedStruct = await resolveProperties(struct);\n const request = deepHexlify(resolvedStruct);\n if (!isValidRequest(request)) {\n throw new InvalidUserOperationError(resolvedStruct);\n }\n const signature = await account.signUserOperationHash(account.getEntryPoint().getUserOperationHash(request));\n const signerType = await getSignerType({\n client,\n signature,\n signer: account.getSigner()\n });\n if (context2?.signatures?.length == null && context2?.aggregatedSignature == null) {\n return {\n ...resolvedStruct,\n signature: combineSignatures({\n signatures: [\n {\n signature,\n signer: await account.getSigner().getAddress(),\n signerType,\n userOpSigType: context2.userOpSignatureType\n }\n ],\n upperLimitMaxFeePerGas: request.maxFeePerGas,\n upperLimitMaxPriorityFeePerGas: request.maxPriorityFeePerGas,\n upperLimitPvg: request.preVerificationGas,\n usingMaxValues: context2.userOpSignatureType === \"ACTUAL\"\n })\n };\n }\n if (context2.aggregatedSignature == null || context2.signatures == null) {\n throw new InvalidContextSignatureError();\n }\n const { upperLimitPvg, upperLimitMaxFeePerGas, upperLimitMaxPriorityFeePerGas } = await splitAggregatedSignature({\n aggregatedSignature: context2.aggregatedSignature,\n threshold: context2.signatures.length + 1,\n account,\n request\n });\n const finalSignature = combineSignatures({\n signatures: context2.signatures.concat({\n userOpSigType: context2.userOpSignatureType,\n signerType,\n signature,\n signer: await account.getSigner().getAddress()\n }),\n upperLimitPvg,\n upperLimitMaxFeePerGas,\n upperLimitMaxPriorityFeePerGas,\n usingMaxValues: isUsingMaxValues(request, {\n upperLimitPvg,\n upperLimitMaxFeePerGas,\n upperLimitMaxPriorityFeePerGas\n })\n });\n return {\n ...resolvedStruct,\n signature: finalSignature\n };\n };\n isUsingMaxValues = (request, upperLimits) => {\n if (BigInt(request.preVerificationGas) !== BigInt(upperLimits.upperLimitPvg)) {\n return false;\n }\n if (BigInt(request.maxFeePerGas) !== BigInt(upperLimits.upperLimitMaxFeePerGas)) {\n return false;\n }\n if (BigInt(request.maxPriorityFeePerGas) !== BigInt(upperLimits.upperLimitMaxPriorityFeePerGas)) {\n return false;\n }\n return true;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/index.js\n var init_multisig = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_extension2();\n init_middleware();\n init_plugin2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/client.js\n async function createMultiOwnerModularAccountClient({ transport, chain: chain2, ...params }) {\n const modularAccount = await createMultiOwnerModularAccount({\n ...params,\n transport,\n chain: chain2\n });\n if (isAlchemyTransport2(transport, chain2)) {\n const { opts } = params;\n return createAlchemySmartAccountClient2({\n ...params,\n account: modularAccount,\n transport,\n chain: chain2,\n opts\n }).extend(multiOwnerPluginActions2).extend(pluginManagerActions).extend(accountLoupeActions);\n }\n return createSmartAccountClient({\n ...params,\n transport,\n chain: chain2,\n account: modularAccount\n }).extend(pluginManagerActions).extend(multiOwnerPluginActions2).extend(accountLoupeActions);\n }\n async function createMultisigModularAccountClient({ transport, chain: chain2, ...params }) {\n const modularAccount = await createMultisigModularAccount({\n ...params,\n transport,\n chain: chain2\n });\n if (isAlchemyTransport2(transport, chain2)) {\n let config2 = {\n ...params,\n chain: chain2,\n transport\n };\n const { opts } = config2;\n return createAlchemySmartAccountClient2({\n ...config2,\n account: modularAccount,\n opts,\n signUserOperation: multisigSignatureMiddleware\n }).extend(smartAccountClientActions).extend(multisigPluginActions2).extend(pluginManagerActions).extend(accountLoupeActions);\n }\n const client = createSmartAccountClient({\n ...params,\n transport,\n chain: chain2,\n account: modularAccount,\n signUserOperation: multisigSignatureMiddleware\n }).extend(smartAccountClientActions).extend(pluginManagerActions).extend(multisigPluginActions2).extend(accountLoupeActions);\n return client;\n }\n var init_client3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/client.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_decorator();\n init_multiOwnerAccount();\n init_multisigAccount();\n init_decorator2();\n init_multi_owner();\n init_multisig();\n init_middleware();\n init_exports3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/multiSigAlchemyClient.js\n async function createMultisigAccountAlchemyClient(config2) {\n return createMultisigModularAccountClient(config2);\n }\n var init_multiSigAlchemyClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/multiSigAlchemyClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_src();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/plugin.js\n var addresses3, SessionKeyPlugin, sessionKeyPluginActions, SessionKeyPluginExecutionFunctionAbi, SessionKeyPluginAbi;\n var init_plugin3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/plugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm6();\n init_src();\n init_plugin();\n addresses3 = {\n 1: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 10: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 137: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 252: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 2523: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 8453: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 42161: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 80001: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 80002: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 84532: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 421614: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 7777777: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 11155111: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 11155420: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 999999999: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\"\n };\n SessionKeyPlugin = {\n meta: {\n name: \"Session Key Plugin\",\n version: \"1.0.1\",\n addresses: addresses3\n },\n getContract: (client, address) => {\n if (!client.chain)\n throw new ChainNotFoundError2();\n return getContract({\n address: address || addresses3[client.chain.id],\n abi: SessionKeyPluginAbi,\n client\n });\n }\n };\n sessionKeyPluginActions = (client) => ({\n executeWithSessionKey({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"executeWithSessionKey\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"executeWithSessionKey\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n addSessionKey({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"addSessionKey\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"addSessionKey\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n removeSessionKey({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"removeSessionKey\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"removeSessionKey\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n rotateSessionKey({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"rotateSessionKey\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"rotateSessionKey\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n updateKeyPermissions({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"updateKeyPermissions\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"updateKeyPermissions\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n installSessionKeyPlugin({ account = client.account, overrides, context: context2, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"installSessionKeyPlugin\", client);\n }\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const dependencies = params.dependencyOverrides ?? [\n (() => {\n const pluginAddress2 = MultiOwnerPlugin.meta.addresses[chain2.id];\n if (!pluginAddress2) {\n throw new Error(\"missing MultiOwnerPlugin address for chain \" + chain2.name);\n }\n return encodePacked([\"address\", \"uint8\"], [pluginAddress2, 0]);\n })(),\n (() => {\n const pluginAddress2 = MultiOwnerPlugin.meta.addresses[chain2.id];\n if (!pluginAddress2) {\n throw new Error(\"missing MultiOwnerPlugin address for chain \" + chain2.name);\n }\n return encodePacked([\"address\", \"uint8\"], [pluginAddress2, 1]);\n })()\n ];\n const pluginAddress = params.pluginAddress ?? SessionKeyPlugin.meta.addresses[chain2.id];\n if (!pluginAddress) {\n throw new Error(\"missing SessionKeyPlugin address for chain \" + chain2.name);\n }\n return installPlugin(client, {\n pluginAddress,\n pluginInitData: encodeAbiParameters([\n { type: \"address[]\", name: \"initialKeys\" },\n { type: \"bytes32[]\", name: \"tags\" },\n { type: \"bytes[][]\", name: \"initialPermissions\" }\n ], params.args),\n dependencies,\n overrides,\n account,\n context: context2\n });\n },\n encodeExecuteWithSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"executeWithSessionKey\",\n args\n });\n },\n encodeAddSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"addSessionKey\",\n args\n });\n },\n encodeRemoveSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"removeSessionKey\",\n args\n });\n },\n encodeRotateSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"rotateSessionKey\",\n args\n });\n },\n encodeUpdateKeyPermissions({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"updateKeyPermissions\",\n args\n });\n }\n });\n SessionKeyPluginExecutionFunctionAbi = [\n {\n type: \"function\",\n name: \"executeWithSessionKey\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"tag\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"permissionUpdates\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"removeSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"rotateSessionKey\",\n inputs: [\n { name: \"oldSessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"newSessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateKeyPermissions\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"updates\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n }\n ];\n SessionKeyPluginAbi = [\n {\n type: \"function\",\n name: \"addSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"tag\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"permissionUpdates\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeWithSessionKey\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"findPredecessor\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAccessControlEntry\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"contractAddress\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n { name: \"isOnList\", type: \"bool\", internalType: \"bool\" },\n { name: \"checkSelectors\", type: \"bool\", internalType: \"bool\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAccessControlType\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint8\",\n internalType: \"enum ISessionKeyPlugin.ContractAccessControlType\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getERC20SpendLimitInfo\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"token\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct ISessionKeyPlugin.SpendLimitInfo\",\n components: [\n { name: \"hasLimit\", type: \"bool\", internalType: \"bool\" },\n { name: \"limit\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"limitUsed\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"refreshInterval\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"lastUsedTime\", type: \"uint48\", internalType: \"uint48\" }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getGasSpendLimit\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n {\n name: \"info\",\n type: \"tuple\",\n internalType: \"struct ISessionKeyPlugin.SpendLimitInfo\",\n components: [\n { name: \"hasLimit\", type: \"bool\", internalType: \"bool\" },\n { name: \"limit\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"limitUsed\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"refreshInterval\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"lastUsedTime\", type: \"uint48\", internalType: \"uint48\" }\n ]\n },\n { name: \"shouldReset\", type: \"bool\", internalType: \"bool\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getKeyTimeRange\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n { name: \"validAfter\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"validUntil\", type: \"uint48\", internalType: \"uint48\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getNativeTokenSpendLimitInfo\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n {\n name: \"info\",\n type: \"tuple\",\n internalType: \"struct ISessionKeyPlugin.SpendLimitInfo\",\n components: [\n { name: \"hasLimit\", type: \"bool\", internalType: \"bool\" },\n { name: \"limit\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"limitUsed\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"refreshInterval\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"lastUsedTime\", type: \"uint48\", internalType: \"uint48\" }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getRequiredPaymaster\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isSelectorOnAccessControlList\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"contractAddress\", type: \"address\", internalType: \"address\" },\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }\n ],\n outputs: [{ name: \"isOnList\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isSessionKeyOf\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onInstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onUninstall\",\n inputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"pluginManifest\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginManifest\",\n components: [\n { name: \"interfaceIds\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n {\n name: \"dependencyInterfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"executionFunctions\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permittedExecutionSelectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permitAnyExternalAddress\",\n type: \"bool\",\n internalType: \"bool\"\n },\n { name: \"canSpendNativeToken\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permittedExternalCalls\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExternalCallPermission[]\",\n components: [\n {\n name: \"externalAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"permitAnySelector\", type: \"bool\", internalType: \"bool\" },\n { name: \"selectors\", type: \"bytes4[]\", internalType: \"bytes4[]\" }\n ]\n },\n {\n name: \"userOpValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"runtimeValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preUserOpValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"preExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n name: \"postExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"pluginMetadata\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginMetadata\",\n components: [\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"author\", type: \"string\", internalType: \"string\" },\n {\n name: \"permissionDescriptors\",\n type: \"tuple[]\",\n internalType: \"struct SelectorPermission[]\",\n components: [\n {\n name: \"functionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"permissionDescription\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"postExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"preExecHookData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preRuntimeValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preUserOpValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"removeSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"resetSessionKeyGasLimitTimestamp\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"rotateSessionKey\",\n inputs: [\n { name: \"oldSessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"newSessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"runtimeValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"sessionKeysOf\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"address[]\", internalType: \"address[]\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"updateKeyPermissions\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"updates\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"userOpValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"PermissionsUpdated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"sessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"updates\",\n type: \"bytes[]\",\n indexed: false,\n internalType: \"bytes[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"SessionKeyAdded\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"sessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n { name: \"tag\", type: \"bytes32\", indexed: true, internalType: \"bytes32\" }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"SessionKeyRemoved\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"sessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"SessionKeyRotated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"oldSessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newSessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"ERC20SpendLimitExceeded\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"token\", type: \"address\", internalType: \"address\" }\n ]\n },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidPermissionsUpdate\",\n inputs: [\n { name: \"updateSelector\", type: \"bytes4\", internalType: \"bytes4\" }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidSessionKey\",\n inputs: [{ name: \"sessionKey\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"InvalidSignature\",\n inputs: [{ name: \"sessionKey\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"InvalidToken\",\n inputs: [{ name: \"token\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"LengthMismatch\", inputs: [] },\n {\n type: \"error\",\n name: \"NativeTokenSpendLimitExceeded\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ]\n },\n {\n type: \"error\",\n name: \"NotContractCaller\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"NotImplemented\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" }\n ]\n },\n { type: \"error\", name: \"NotInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"SessionKeyNotFound\",\n inputs: [{ name: \"sessionKey\", type: \"address\", internalType: \"address\" }]\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/utils.js\n async function buildSessionKeysToRemoveStruct(client, args) {\n const { keys, pluginAddress, account = client.account } = args;\n if (!account)\n throw new AccountNotFoundError2();\n const contract = SessionKeyPlugin.getContract(client, pluginAddress);\n return (await Promise.all(keys.map(async (key) => {\n return [\n key,\n await contract.read.findPredecessor([account.address, key])\n ];\n }))).map(([key, predecessor]) => ({\n sessionKey: key,\n predecessor\n }));\n }\n var init_utils13 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/debug-session-key-bytecode.js\n var debug_session_key_bytecode_exports = {};\n __export(debug_session_key_bytecode_exports, {\n DEBUG_SESSION_KEY_BYTECODE: () => DEBUG_SESSION_KEY_BYTECODE\n });\n var DEBUG_SESSION_KEY_BYTECODE;\n var init_debug_session_key_bytecode = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/debug-session-key-bytecode.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n DEBUG_SESSION_KEY_BYTECODE = \"0x6040608081526004908136101561001557600080fd5b6000803560e01c806331d99c2c146100975763af8734831461003657600080fd5b34610090576003196060368201126100935783359160ff83168303610090576024359167ffffffffffffffff831161009357610160908336030112610090575092610089916020946044359201906106ed565b9051908152f35b80fd5b5080fd5b50823461009357826003193601126100935767ffffffffffffffff81358181116105255736602382011215610525578083013590828211610521576024926024820191602436918560051b01011161051d576001600160a01b0394602435868116810361051957604080516080810182526060808252336020830190815263068076b960e21b938301939093526001600160a01b039093169083015220548761016f8233606091826040516001600160a01b03602082019460808301604052838352168452630b5ff94b60e11b604082015201522090565b91895b87811061045d57505060ff825460781c16156103ef575b5080549060ff8260801c166103b6575b50506101a88497959894610584565b956101b58551978861054c565b8787526101c188610584565b98602098601f19809b01885b8181106103a7575050875b818110610256575050505050505080519380850191818652845180935281818701918460051b880101950193965b8388106102135786860387f35b9091929394838080600193603f198b820301875285601f8b5161024181518092818752878088019101610529565b01160101970193019701969093929193610206565b6102668183899e9b9d9a9e61059c565b803585811680910361039557908c8a928f898e610285838701876105d9565b9790935196879586947f38997b1100000000000000000000000000000000000000000000000000000000865285015201358a83015260606044830152866064830152866084938484013784838884010152601f80970116810103018183335af191821561039d578d9261031a575b505090600191610303828d610628565b5261030e818c610628565b50019a9699979a6101d8565b9091503d808e843e61032c818461054c565b8201918a818403126103915780519089821161039957019081018213156103955790818e92519161036861035f8461060c565b9451948561054c565b8284528b8383010111610391578291610389918c8060019796019101610529565b90918e6102f3565b8d80fd5b8c80fd5b8e80fd5b8e513d8f823e3d90fd5b60608b82018d01528b016101cd565b70ff00000000000000000000000000000000199091168155600101805465ffffffffffff19164265ffffffffffff161790558880610199565b6104029060068301906002840190611191565b1561040d5789610189565b610459828a5191829162461bcd60e51b8352820160609060208152601460208201527f5370656e64206c696d697420657863656564656400000000000000000000000060408201520190565b0390fd5b6104713661046c838b8b61059c565b610673565b926104826020918286015190611042565b938d6104928d83511686336110b0565b9160ff835460101c166104ac575b50505050600101610172565b6104ca92916104bc910151611146565b600160028301920190611191565b156104d757808d816104a0565b85601a8b8f93606494519362461bcd60e51b85528401528201527f4552433230207370656e64206c696d69742065786365656465640000000000006044820152fd5b8780fd5b8580fd5b8480fd5b8380fd5b60005b83811061053c5750506000910152565b818101518382015260200161052c565b90601f8019910116810190811067ffffffffffffffff82111761056e57604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff811161056e5760051b60200190565b91908110156105c35760051b81013590605e19813603018212156105be570190565b600080fd5b634e487b7160e01b600052603260045260246000fd5b903590601e19813603018212156105be570180359067ffffffffffffffff82116105be576020019181360383136105be57565b67ffffffffffffffff811161056e57601f01601f191660200190565b80518210156105c35760209160051b010190565b9291926106488261060c565b91610656604051938461054c565b8294818452818301116105be578281602093846000960137010152565b91906060838203126105be576040519067ffffffffffffffff606083018181118482101761056e57604052829480356001600160a01b03811681036105be5784526020810135602085015260408101359182116105be570181601f820112156105be576040918160206106e89335910161063c565b910152565b60ff161561073957606460405162461bcd60e51b815260206004820152602060248201527f57726f6e672066756e6374696f6e20696420666f722076616c69646174696f6e6044820152fd5b61074660608201826105d9565b806004949294116105be57830192604081850360031901126105be5767ffffffffffffffff9360048201358581116105be57820194816023870112156105be5760048601359561079587610584565b966107a3604051988961054c565b8088526024602089019160051b830101928484116105be5760248301915b84831061101b5750505050505060240135906001600160a01b03821682036105be577f19457468657265756d205369676e6564204d6573736167653a0a333200000000600052601c52610830603c60002061082a6108236101408601866105d9565b369161063c565b90611065565b600581101561100557610f9c5760806040513381527ff938c976000000000000000000000000000000000000000000000000000000006020820152600160408201526bffffffffffffffffffffffff198460601b166060820152205415610f5857604080516080810182526060808252336020830190815263068076b960e21b938301939093526001600160a01b03851691810191909152902054926109058433606091826040516001600160a01b03602082019460808301604052838352168452630b5ff94b60e11b604082015201522090565b9081549465ffffffffffff8660081c16966000918151918215610f145760005b838110610ed2575050505060ff8660781c1615610d50575b5060ff8560701c16610aa8575b60ff825460681c166109db575b50506001600160a01b039182169116036109a85765ffffffffffff60a01b7fffffffffffff00000000000000000000000000000000000000000000000000006000935b60d01b169160681b16171790565b65ffffffffffff60a01b7fffffffffffff000000000000000000000000000000000000000000000000000060019361099a565b806101206109ea9201906105d9565b6bffffffffffffffffffffffff199135918216929160148210610a6c575b505060036001600160a01b03910154169060601c03610a28573880610957565b606460405162461bcd60e51b815260206004820152601b60248201527f4d75737420757365207265717569726564207061796d617374657200000000006044820152fd5b6001600160a01b03929350906003916bffffffffffffffffffffffff19916bffffffffffffffffffffffff1990601403841b1b16169291610a08565b946001600160a01b038416602087013560401c03610cc057610ace6101208701876105d9565b159050610cab57610b11610b06610afb610af160ff60035b1660a08b013561109d565b60808a0135611042565b60c089013590611042565b60e08801359061109d565b9060009060018401546005850154906004860154908583810110610c675765ffffffffffff8160301c1615600014610ba6575081850111610b6157610b5b9301600585015561154f565b9461094a565b60405162461bcd60e51b815260206004820152601260248201527f476173206c696d697420657863656564656400000000000000000000000000006044820152606490fd5b92935093848282011115600014610bf657610b5b945001600585015560ff8760801c16600014610bee578065ffffffffffff80610be89360301c169116611177565b9061154f565b506000610be8565b809392949150111580610c59575b15610b6157610c248365ffffffffffff80610b5b9660301c169116611177565b9170010000000000000000000000000000000070ff00000000000000000000000000000000198916178555600585015561154f565b5060ff8760801c1615610c04565b606460405162461bcd60e51b815260206004820152601260248201527f476173206c696d6974206f766572666c6f7700000000000000000000000000006044820152fd5b610b11610b06610afb610af160ff6001610ae6565b60a460405162461bcd60e51b815260206004820152604f60248201527f4d757374207573652073657373696f6e206b6579206173206b657920706f727460448201527f696f6e206f66206e6f6e6365207768656e20676173206c696d6974206368656360648201527f6b696e6720697320656e61626c656400000000000000000000000000000000006084820152fd5b6000969196906002840154906007850154906006860154928183810110610e8e5765ffffffffffff8160301c1615600014610de157500111610d9c57610d959161154f565b943861093d565b60405162461bcd60e51b815260206004820152601460248201527f5370656e64206c696d69742065786365656465640000000000000000000000006044820152606490fd5b94928092820111610df9575b5050610d95925061154f565b91925010610e2457610e1c8265ffffffffffff80610d959560301c169116611177565b903880610ded565b608460405162461bcd60e51b815260206004820152603260248201527f5370656e64206c696d69742065786365656465642c206576656e20696e636c7560448201527f64696e67206e65787420696e74657276616c00000000000000000000000000006064820152fd5b606460405162461bcd60e51b815260206004820152601460248201527f5370656e64206c696d6974206f766572666c6f770000000000000000000000006044820152fd5b80610f0e8b610ef3610ee660019587610628565b519860208a015190611042565b978660ff60406001600160a01b0384511693015193166112bf565b01610925565b606460405162461bcd60e51b815260206004820152601b60248201527f4d7573742068617665206174206c65617374206f6e652063616c6c00000000006044820152fd5b606460405162461bcd60e51b815260206004820152601360248201527f556e6b6e6f776e2073657373696f6e206b6579000000000000000000000000006044820152fd5b608460405162461bcd60e51b8152602060048201526024808201527f5369676e617475726520646f6573206e6f74206d617463682073657373696f6e60448201527f206b6579000000000000000000000000000000000000000000000000000000006064820152fd5b634e487b7160e01b600052602160045260246000fd5b82358281116105be576020916110378860248594890101610673565b8152019201916107c1565b9190820180921161104f57565b634e487b7160e01b600052601160045260246000fd5b9060418151146000146110935761108f916020820151906060604084015193015160001a90611230565b9091565b5050600090600290565b8181029291811591840414171561104f57565b9061111192916040519260a08401604052608084526001600160a01b0380921660208501527f634c29f50000000000000000000000000000000000000000000000000000000060408501521690606083015260808201526020815191012090565b90565b90602082519201516001600160e01b031990818116936004811061113757505050565b60040360031b82901b16169150565b61115761115282611114565b61156c565b6111615750600090565b6044815110611171576044015190565b50600090565b91909165ffffffffffff8080941691160191821161104f57565b9181549165ffffffffffff90818460301c169160018454940194855493828115928315611218575b5050506000146111ee57505083019283109081156111e4575b506111dd5755600190565b5050600090565b90508211386111d2565b9391509391821161120f5755421665ffffffffffff19825416179055600190565b50505050600090565b611223935016611177565b81429116113882816111b9565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116112b35791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa156112a65781516001600160a01b038116156112a0579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b91926112ca90611114565b926112d68183336110b0565b926003811015611005578061147d5750825460ff8116156114395760081c60ff1615611433578361130a9160ff93336115cb565b5416156113c95760ff905b5460101c1690816113b8575b5061132857565b60a460405162461bcd60e51b815260206004820152604460248201527f46756e6374696f6e2073656c6563746f72206e6f7420616c6c6f77656420666f60448201527f7220455243323020636f6e74726163742077697468207370656e64696e67206c60648201527f696d6974000000000000000000000000000000000000000000000000000000006084820152fd5b6113c2915061156c565b1538611321565b608460405162461bcd60e51b815260206004820152602260248201527f46756e6374696f6e2073656c6563746f72206e6f74206f6e20616c6c6f776c6960448201527f73740000000000000000000000000000000000000000000000000000000000006064820152fd5b50505050565b606460405162461bcd60e51b815260206004820152601f60248201527f5461726765742061646472657373206e6f74206f6e20616c6c6f776c697374006044820152fd5b60011461148f575b505060ff90611315565b825460ff8116156115485760081c60ff161561150457836114b39160ff93336115cb565b54166114c0573880611485565b606460405162461bcd60e51b815260206004820152601d60248201527f46756e6374696f6e2073656c6563746f72206f6e2064656e796c6973740000006044820152fd5b606460405162461bcd60e51b815260206004820152601a60248201527f5461726765742061646472657373206f6e2064656e796c6973740000000000006044820152fd5b5050505050565b9065ffffffffffff8082169083161115611567575090565b905090565b6001600160e01b0319167fa9059cbb0000000000000000000000000000000000000000000000000000000081149081156115a4575090565b7f095ea7b30000000000000000000000000000000000000000000000000000000091501490565b926001600160e01b0319611111946040519460a08601604052608086526001600160a01b0380921660208701527fd50536f0000000000000000000000000000000000000000000000000000000006040870152169116179060608301526080820152602081519101209056fea26469706673582212201c78177154c86c4d5ed4f532b4017a1d665037d4831a7cd69e8e8bd8408ab3e764736f6c63430008160033\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/extension.js\n function getRpcErrorMessageFromViemError(error) {\n const details = error?.details;\n return typeof details === \"string\" ? details : void 0;\n }\n var sessionKeyPluginActions2, SessionKeyPermissionError;\n var init_extension3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/extension.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin3();\n init_utils13();\n sessionKeyPluginActions2 = (client) => {\n const { removeSessionKey, addSessionKey, rotateSessionKey, updateKeyPermissions, executeWithSessionKey, ...og } = sessionKeyPluginActions(client);\n const fixedExecuteWithSessionKey = async (...originalArgs) => {\n let initialError;\n try {\n return await executeWithSessionKey(...originalArgs);\n } catch (error) {\n initialError = error;\n }\n const details = getRpcErrorMessageFromViemError(initialError);\n if (!details?.includes(\"AA23 reverted (or OOG)\")) {\n throw initialError;\n }\n if (!isSmartAccountClient(client) || !client.chain) {\n throw initialError;\n }\n const { args, overrides, context: context2, account = client.account } = originalArgs[0];\n if (!account) {\n throw initialError;\n }\n const data = og.encodeExecuteWithSessionKey({ args });\n const sessionKeyPluginAddress = SessionKeyPlugin.meta.addresses[client.chain.id];\n const { DEBUG_SESSION_KEY_BYTECODE: DEBUG_SESSION_KEY_BYTECODE2 } = await Promise.resolve().then(() => (init_debug_session_key_bytecode(), debug_session_key_bytecode_exports));\n const updatedOverrides = {\n ...overrides,\n stateOverride: [\n ...overrides?.stateOverride ?? [],\n {\n address: sessionKeyPluginAddress,\n code: DEBUG_SESSION_KEY_BYTECODE2\n }\n ]\n };\n try {\n await client.buildUserOperation({\n uo: data,\n overrides: updatedOverrides,\n context: context2,\n account\n });\n throw initialError;\n } catch (improvedError) {\n const details2 = getRpcErrorMessageFromViemError(improvedError) ?? \"\";\n const reason = details2.match(/AA23 reverted: (.+)/)?.[1];\n if (!reason) {\n throw initialError;\n }\n throw new SessionKeyPermissionError(reason);\n }\n };\n return {\n ...og,\n executeWithSessionKey: fixedExecuteWithSessionKey,\n isAccountSessionKey: async ({ key, pluginAddress, account = client.account }) => {\n if (!account)\n throw new AccountNotFoundError2();\n const contract = SessionKeyPlugin.getContract(client, pluginAddress);\n return await contract.read.isSessionKeyOf([account.address, key]);\n },\n getAccountSessionKeys: async (args) => {\n const account = args?.account ?? client.account;\n if (!account)\n throw new AccountNotFoundError2();\n const contract = SessionKeyPlugin.getContract(client, args?.pluginAddress);\n return await contract.read.sessionKeysOf([account.address]);\n },\n removeSessionKey: async ({ key, overrides, account = client.account, pluginAddress }) => {\n if (!account)\n throw new AccountNotFoundError2();\n const sessionKeysToRemove = await buildSessionKeysToRemoveStruct(client, {\n keys: [key],\n account,\n pluginAddress\n });\n return removeSessionKey({\n args: [key, sessionKeysToRemove[0].predecessor],\n overrides,\n account\n });\n },\n addSessionKey: async ({ key, tag, permissions, overrides, pluginAddress, account = client.account }) => {\n if (!account)\n throw new AccountNotFoundError2();\n return addSessionKey({\n args: [key, tag, permissions],\n overrides,\n account,\n pluginAddress\n });\n },\n rotateSessionKey: async ({ newKey, oldKey, overrides, pluginAddress, account = client.account }) => {\n if (!account)\n throw new AccountNotFoundError2();\n const contract = SessionKeyPlugin.getContract(client, pluginAddress);\n const predecessor = await contract.read.findPredecessor([\n account.address,\n oldKey\n ]);\n return rotateSessionKey({\n args: [oldKey, predecessor, newKey],\n overrides,\n account,\n pluginAddress\n });\n },\n updateSessionKeyPermissions: async ({ key, permissions, overrides, pluginAddress, account = client.account }) => {\n if (!account)\n throw new AccountNotFoundError2();\n return updateKeyPermissions({\n args: [key, permissions],\n overrides,\n account,\n pluginAddress\n });\n }\n };\n };\n SessionKeyPermissionError = class extends Error {\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/SessionKeyPermissionsUpdatesAbi.js\n var SessionKeyPermissionsUpdatesAbi;\n var init_SessionKeyPermissionsUpdatesAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/SessionKeyPermissionsUpdatesAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n SessionKeyPermissionsUpdatesAbi = [\n {\n type: \"function\",\n name: \"setAccessListType\",\n inputs: [\n {\n name: \"contractAccessControlType\",\n type: \"uint8\",\n internalType: \"enum ISessionKeyPlugin.ContractAccessControlType\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setERC20SpendLimit\",\n inputs: [\n { name: \"token\", type: \"address\", internalType: \"address\" },\n { name: \"spendLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"refreshInterval\",\n type: \"uint48\",\n internalType: \"uint48\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setGasSpendLimit\",\n inputs: [\n { name: \"spendLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"refreshInterval\",\n type: \"uint48\",\n internalType: \"uint48\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setNativeTokenSpendLimit\",\n inputs: [\n { name: \"spendLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"refreshInterval\",\n type: \"uint48\",\n internalType: \"uint48\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setRequiredPaymaster\",\n inputs: [\n {\n name: \"requiredPaymaster\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateAccessListAddressEntry\",\n inputs: [\n {\n name: \"contractAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"isOnList\", type: \"bool\", internalType: \"bool\" },\n { name: \"checkSelectors\", type: \"bool\", internalType: \"bool\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateAccessListFunctionEntry\",\n inputs: [\n {\n name: \"contractAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"isOnList\", type: \"bool\", internalType: \"bool\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateTimeRange\",\n inputs: [\n { name: \"validAfter\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"validUntil\", type: \"uint48\", internalType: \"uint48\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/permissions.js\n var SessionKeyAccessListType, SessionKeyPermissionsBuilder;\n var init_permissions = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/permissions.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_SessionKeyPermissionsUpdatesAbi();\n (function(SessionKeyAccessListType2) {\n SessionKeyAccessListType2[SessionKeyAccessListType2[\"ALLOWLIST\"] = 0] = \"ALLOWLIST\";\n SessionKeyAccessListType2[SessionKeyAccessListType2[\"DENYLIST\"] = 1] = \"DENYLIST\";\n SessionKeyAccessListType2[SessionKeyAccessListType2[\"ALLOW_ALL_ACCESS\"] = 2] = \"ALLOW_ALL_ACCESS\";\n })(SessionKeyAccessListType || (SessionKeyAccessListType = {}));\n SessionKeyPermissionsBuilder = class {\n constructor() {\n Object.defineProperty(this, \"_contractAccessControlType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: SessionKeyAccessListType.ALLOWLIST\n });\n Object.defineProperty(this, \"_contractAddressAccessEntrys\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object.defineProperty(this, \"_contractMethodAccessEntrys\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object.defineProperty(this, \"_timeRange\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_nativeTokenSpendLimit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_erc20TokenSpendLimits\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object.defineProperty(this, \"_gasSpendLimit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_requiredPaymaster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n }\n /**\n * Sets the access control type for the contract and returns the current instance for method chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setContractAccessControlType(SessionKeyAccessListType.ALLOWLIST);\n * ```\n *\n * @param {SessionKeyAccessListType} aclType The access control type for the session key\n * @returns {SessionKeyPermissionsBuilder} The current instance for method chaining\n */\n setContractAccessControlType(aclType) {\n this._contractAccessControlType = aclType;\n return this;\n }\n /**\n * Adds a contract access entry to the internal list of contract address access entries.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.addContractAddressAccessEntry({\n * contractAddress: \"0x1234\",\n * isOnList: true,\n * checkSelectors: true,\n * });\n * ```\n *\n * @param {ContractAccessEntry} entry the contract access entry to be added\n * @returns {SessionKeyPermissionsBuilder} the instance of the current class for chaining\n */\n addContractAddressAccessEntry(entry) {\n this._contractAddressAccessEntrys.push(entry);\n return this;\n }\n /**\n * Adds a contract method entry to the `_contractMethodAccessEntrys` array.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.addContractAddressAccessEntry({\n * contractAddress: \"0x1234\",\n * methodSelector: \"0x45678\",\n * isOnList: true,\n * });\n * ```\n *\n * @param {ContractMethodEntry} entry The contract method entry to be added\n * @returns {SessionKeyPermissionsBuilder} The instance of the class for method chaining\n */\n addContractFunctionAccessEntry(entry) {\n this._contractMethodAccessEntrys.push(entry);\n return this;\n }\n /**\n * Sets the time range for an object and returns the object itself for chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setTimeRange({\n * validFrom: Date.now(),\n * validUntil: Date.now() + (15 * 60 * 1000),\n * });\n * ```\n *\n * @param {TimeRange} timeRange The time range to be set\n * @returns {SessionKeyPermissionsBuilder} The current object for method chaining\n */\n setTimeRange(timeRange) {\n this._timeRange = timeRange;\n return this;\n }\n /**\n * Sets the native token spend limit and returns the instance for chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setNativeTokenSpendLimit({\n * spendLimit: 1000000000000000000n,\n * refreshInterval: 3600,\n * });\n * ```\n *\n * @param {NativeTokenLimit} limit The limit to set for native token spending\n * @returns {SessionKeyPermissionsBuilder} The instance for chaining\n */\n setNativeTokenSpendLimit(limit) {\n this._nativeTokenSpendLimit = limit;\n return this;\n }\n /**\n * Adds an ERC20 token spend limit to the list of limits and returns the updated object.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.addErc20TokenSpendLimit({\n * tokenAddress: \"0x1234\",\n * spendLimit: 1000000000000000000n,\n * refreshInterval: 3600,\n * });\n * ```\n *\n * @param {Erc20TokenLimit} limit The ERC20 token spend limit to be added\n * @returns {object} The updated object with the new ERC20 token spend limit\n */\n addErc20TokenSpendLimit(limit) {\n this._erc20TokenSpendLimits.push(limit);\n return this;\n }\n /**\n * Sets the gas spend limit and returns the current instance for method chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setGasSpendLimit({\n * spendLimit: 1000000000000000000n,\n * refreshInterval: 3600,\n * });\n * ```\n *\n * @param {GasSpendLimit} limit - The gas spend limit to be set\n * @returns {SessionKeyPermissionsBuilder} The current instance for chaining\n */\n setGasSpendLimit(limit) {\n this._gasSpendLimit = limit;\n return this;\n }\n /**\n * Sets the required paymaster address.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setRequiredPaymaster(\"0x1234\");\n * ```\n *\n * @param {Address} paymaster the address of the paymaster to be set\n * @returns {SessionKeyPermissionsBuilder} the current instance for method chaining\n */\n setRequiredPaymaster(paymaster) {\n this._requiredPaymaster = paymaster;\n return this;\n }\n /**\n * Encodes various function calls into an array of hexadecimal strings based on the provided permissions and limits.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setRequiredPaymaster(\"0x1234\");\n * const encoded = builder.encode();\n * ```\n *\n * @returns {Hex[]} An array of encoded hexadecimal strings representing the function calls for setting access control, permissions, and limits.\n */\n encode() {\n return [\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setAccessListType\",\n args: [this._contractAccessControlType]\n }),\n ...this._contractAddressAccessEntrys.map((entry) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"updateAccessListAddressEntry\",\n args: [entry.contractAddress, entry.isOnList, entry.checkSelectors]\n })),\n ...this._contractMethodAccessEntrys.map((entry) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"updateAccessListFunctionEntry\",\n args: [entry.contractAddress, entry.methodSelector, entry.isOnList]\n })),\n this.encodeIfDefined((timeRange) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"updateTimeRange\",\n args: [timeRange.validFrom, timeRange.validUntil]\n }), this._timeRange),\n this.encodeIfDefined((nativeSpendLimit) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setNativeTokenSpendLimit\",\n args: [\n nativeSpendLimit.spendLimit,\n nativeSpendLimit.refreshInterval ?? 0\n ]\n }), this._nativeTokenSpendLimit),\n ...this._erc20TokenSpendLimits.map((erc20SpendLimit) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setERC20SpendLimit\",\n args: [\n erc20SpendLimit.tokenAddress,\n erc20SpendLimit.spendLimit,\n erc20SpendLimit.refreshInterval ?? 0\n ]\n })),\n this.encodeIfDefined((spendLimit) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setGasSpendLimit\",\n args: [spendLimit.spendLimit, spendLimit.refreshInterval ?? 0]\n }), this._gasSpendLimit),\n this.encodeIfDefined((paymaster) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setRequiredPaymaster\",\n args: [paymaster]\n }), this._requiredPaymaster)\n ].filter((x4) => x4 !== \"0x\");\n }\n encodeIfDefined(encode5, param) {\n if (!param)\n return \"0x\";\n return encode5(param);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/signer.js\n var SessionKeySignerSchema, SESSION_KEY_SIGNER_TYPE_PFX, SessionKeySigner;\n var init_signer4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_accounts();\n init_esm5();\n SessionKeySignerSchema = external_exports.object({\n storageType: external_exports.union([external_exports.literal(\"local-storage\"), external_exports.literal(\"session-storage\")]).or(external_exports.custom()).default(\"local-storage\"),\n storageKey: external_exports.string().default(\"session-key-signer:session-key\")\n });\n SESSION_KEY_SIGNER_TYPE_PFX = \"alchemy:session-key\";\n SessionKeySigner = class {\n /**\n * Initializes a new instance of a session key signer with the provided configuration. This will set the `signerType`, `storageKey`, and `storageType`. It will also manage the session key, either fetching it from storage or generating a new one if it doesn't exist.\n *\n * @example\n * ```ts\n * import { SessionKeySigner } from \"@account-kit/smart-contracts\";\n *\n * const signer = new SessionKeySigner();\n * ```\n *\n * @param {SessionKeySignerConfig} config_ the configuration for initializing the session key signer\n */\n constructor(config_ = {}) {\n Object.defineProperty(this, \"signerType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"inner\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"storageType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"storageKey\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"getAddress\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async () => {\n return this.inner.getAddress();\n }\n });\n Object.defineProperty(this, \"signMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async (msg) => {\n return this.inner.signMessage(msg);\n }\n });\n Object.defineProperty(this, \"signTypedData\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async (params) => {\n return this.inner.signTypedData(params);\n }\n });\n Object.defineProperty(this, \"generateNewKey\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: () => {\n const storage = this.storageType === \"session-storage\" ? sessionStorage : localStorage;\n const newKey = generatePrivateKey();\n storage.setItem(this.storageKey, newKey);\n this.inner = LocalAccountSigner.privateKeyToAccountSigner(newKey);\n return this.inner.inner.address;\n }\n });\n const config2 = SessionKeySignerSchema.parse(config_);\n this.signerType = `${SESSION_KEY_SIGNER_TYPE_PFX}`;\n this.storageKey = config2.storageKey;\n this.storageType = config2.storageType;\n const sessionKey = (() => {\n const storage = typeof this.storageType !== \"string\" ? this.storageType : this.storageType === \"session-storage\" ? sessionStorage : localStorage;\n const key = storage.getItem(this.storageKey);\n if (key) {\n return key;\n } else {\n const newKey = generatePrivateKey();\n storage.setItem(this.storageKey, newKey);\n return newKey;\n }\n })();\n this.inner = LocalAccountSigner.privateKeyToAccountSigner(sessionKey);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/accountFactoryAbi.js\n var accountFactoryAbi;\n var init_accountFactoryAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/accountFactoryAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n accountFactoryAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"_entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"_accountImpl\",\n type: \"address\",\n internalType: \"contract ModularAccount\"\n },\n {\n name: \"_semiModularImpl\",\n type: \"address\",\n internalType: \"contract SemiModularAccountBytecode\"\n },\n {\n name: \"_singleSignerValidationModule\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"_webAuthnValidationModule\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"ACCOUNT_IMPL\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract ModularAccount\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"ENTRY_POINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"SEMI_MODULAR_ACCOUNT_IMPL\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract SemiModularAccountBytecode\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"SINGLE_SIGNER_VALIDATION_MODULE\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"WEBAUTHN_VALIDATION_MODULE\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n {\n name: \"unstakeDelay\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract ModularAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"createSemiModularAccount\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract SemiModularAccountBytecode\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"createWebAuthnAccount\",\n inputs: [\n {\n name: \"ownerX\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"ownerY\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract ModularAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAddressSemiModular\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAddressWebAuthn\",\n inputs: [\n {\n name: \"ownerX\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"ownerY\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getSalt\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"getSaltWebAuthn\",\n inputs: [\n {\n name: \"ownerX\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"ownerY\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [\n {\n name: \"newOwner\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n {\n name: \"to\",\n type: \"address\",\n internalType: \"address payable\"\n },\n {\n name: \"token\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"amount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [\n {\n name: \"withdrawAddress\",\n type: \"address\",\n internalType: \"address payable\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ModularAccountDeployed\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"owner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"SemiModularAccountDeployed\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"owner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"WebAuthnModularAccountDeployed\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"ownerX\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"ownerY\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AddressEmptyCode\",\n inputs: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AddressInsufficientBalance\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"FailedInnerCall\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidAction\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"OwnableInvalidOwner\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"OwnableUnauthorizedAccount\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"SafeERC20FailedOperation\",\n inputs: [\n {\n name: \"token\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"TransferFailed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/modularAccountAbi.js\n var modularAccountAbi;\n var init_modularAccountAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/modularAccountAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n modularAccountAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"executionInstallDelegate\",\n type: \"address\",\n internalType: \"contract ExecutionInstallDelegate\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"fallback\",\n stateMutability: \"payable\"\n },\n {\n type: \"receive\",\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"accountId\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"result\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeWithRuntimeValidation\",\n inputs: [\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"authorization\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"getExecutionData\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ExecutionDataView\",\n components: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getValidationData\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ValidationDataView\",\n components: [\n {\n name: \"validationFlags\",\n type: \"uint8\",\n internalType: \"ValidationFlags\"\n },\n {\n name: \"validationHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initializeWithValidation\",\n inputs: [\n {\n name: \"validationConfig\",\n type: \"bytes25\",\n internalType: \"ValidationConfig\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"installData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hooks\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleInstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installValidation\",\n inputs: [\n {\n name: \"validationConfig\",\n type: \"bytes25\",\n internalType: \"ValidationConfig\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"installData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hooks\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n {\n name: \"hash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"performCreate\",\n inputs: [\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"isCreate2\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"salt\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [\n {\n name: \"createdAddr\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [\n {\n name: \"interfaceId\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"uninstallExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleUninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallValidation\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"uninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hookUninstallData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"userOpHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ExecutionInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ExecutionUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"ArrayLengthMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"CreateFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredActionSignatureInvalid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredValidationHasValidationHooks\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ExecutionHookAlreadySet\",\n inputs: [\n {\n name: \"hookConfig\",\n type: \"bytes25\",\n internalType: \"HookConfig\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InterfaceNotSupported\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidInitialization\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ModuleInstallCallbackFailed\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"revertReason\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NonCanonicalEncoding\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"NotEntryPoint\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"PreValidationHookDuplicate\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"RequireUserOperationContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SegmentOutOfOrder\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SelfCallRecursionDepthExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SignatureValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnauthorizedCallContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UnexpectedAggregator\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"aggregator\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnrecognizedFunction\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UpgradeFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UserOpValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAlreadySet\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAssocHookLimitExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationEntityIdInUse\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationFunctionMissing\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationSignatureSegmentMissing\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/actions/common/utils.js\n function serializeModuleEntity(config2) {\n return concatHex([config2.moduleAddress, toHex(config2.entityId, { size: 4 })]);\n }\n var init_utils14 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/actions/common/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/utils.js\n var SignatureType2, getDefaultWebauthnValidationModuleAddress, getDefaultSingleSignerValidationModuleAddress;\n var init_utils15 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports3();\n (function(SignatureType3) {\n SignatureType3[\"EOA\"] = \"0x00\";\n SignatureType3[\"CONTRACT\"] = \"0x01\";\n })(SignatureType2 || (SignatureType2 = {}));\n getDefaultWebauthnValidationModuleAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x0000000000001D9d34E07D9834274dF9ae575217\";\n }\n };\n getDefaultSingleSignerValidationModuleAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x00000000000099DE0BF6fA90dEB851E2A2df7d83\";\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/single-signer-validation/signer.js\n var singleSignerMessageSigner;\n var init_signer5 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/single-signer-validation/signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_utils15();\n init_utils18();\n singleSignerMessageSigner = (signer, chain2, accountAddress, entityId, deferredActionData) => {\n const signingMethods = {\n prepareSign: async (request) => {\n let hash3;\n switch (request.type) {\n case \"personal_sign\":\n hash3 = hashMessage(request.data);\n break;\n case \"eth_signTypedData_v4\":\n hash3 = await hashTypedData(request.data);\n break;\n default:\n assertNeverSignatureRequestType();\n }\n return {\n type: \"eth_signTypedData_v4\",\n data: {\n domain: {\n chainId: Number(chain2.id),\n verifyingContract: getDefaultSingleSignerValidationModuleAddress(chain2),\n salt: concatHex([`0x${\"00\".repeat(12)}`, accountAddress])\n },\n types: {\n ReplaySafeHash: [{ name: \"hash\", type: \"bytes32\" }]\n },\n message: {\n hash: hash3\n },\n primaryType: \"ReplaySafeHash\"\n }\n };\n },\n formatSign: async (signature) => {\n return pack1271Signature({\n validationSignature: signature,\n entityId\n });\n }\n };\n return {\n ...signingMethods,\n getDummySignature: () => {\n const sig = packUOSignature({\n // orderedHookData: [],\n validationSignature: \"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\"\n });\n return deferredActionData ? concatHex([deferredActionData, sig]) : sig;\n },\n signUserOperationHash: async (uoHash) => {\n let sig = await signer.signMessage({ raw: uoHash }).then((signature) => packUOSignature({\n // orderedHookData: [],\n validationSignature: signature\n }));\n if (deferredActionData) {\n sig = concatHex([deferredActionData, sig]);\n deferredActionData = void 0;\n }\n return sig;\n },\n // we apply the expected 1271 packing here since the account contract will expect it\n async signMessage({ message }) {\n const { type, data } = await signingMethods.prepareSign({\n type: \"personal_sign\",\n data: message\n });\n if (type !== \"eth_signTypedData_v4\") {\n throw new Error(\"Invalid signature request type\");\n }\n const sig = await signer.signTypedData(data);\n return signingMethods.formatSign(sig);\n },\n // TODO: maybe move \"sign deferred actions\" to a separate function?\n // we don't apply the expected 1271 packing since deferred sigs use typed data sigs and don't expect the 1271 packing\n signTypedData: async (typedDataDefinition) => {\n const { type, data } = await signingMethods.prepareSign({\n type: \"eth_signTypedData_v4\",\n data: typedDataDefinition\n });\n if (type !== \"eth_signTypedData_v4\") {\n throw new Error(\"Invalid signature request type\");\n }\n const sig = await signer.signTypedData(data);\n const isDeferredAction = typedDataDefinition.primaryType === \"DeferredAction\" && typedDataDefinition.domain != null && // @ts-expect-error the domain type I think changed in viem, so this is not working correctly (TODO: fix this)\n \"verifyingContract\" in typedDataDefinition.domain && typedDataDefinition.domain.verifyingContract === accountAddress;\n return isDeferredAction ? concat([SignatureType2.EOA, sig]) : signingMethods.formatSign(sig);\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.8.1/node_modules/@noble/curves/esm/abstract/utils.js\n var utils_exports = {};\n __export(utils_exports, {\n aInRange: () => aInRange2,\n abool: () => abool2,\n abytes: () => abytes3,\n bitGet: () => bitGet,\n bitLen: () => bitLen2,\n bitMask: () => bitMask2,\n bitSet: () => bitSet,\n bytesToHex: () => bytesToHex4,\n bytesToNumberBE: () => bytesToNumberBE2,\n bytesToNumberLE: () => bytesToNumberLE2,\n concatBytes: () => concatBytes4,\n createHmacDrbg: () => createHmacDrbg2,\n ensureBytes: () => ensureBytes2,\n equalBytes: () => equalBytes,\n hexToBytes: () => hexToBytes4,\n hexToNumber: () => hexToNumber3,\n inRange: () => inRange2,\n isBytes: () => isBytes5,\n memoized: () => memoized2,\n notImplemented: () => notImplemented,\n numberToBytesBE: () => numberToBytesBE2,\n numberToBytesLE: () => numberToBytesLE2,\n numberToHexUnpadded: () => numberToHexUnpadded2,\n numberToVarBytesBE: () => numberToVarBytesBE,\n utf8ToBytes: () => utf8ToBytes3,\n validateObject: () => validateObject2\n });\n function isBytes5(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function abytes3(item) {\n if (!isBytes5(item))\n throw new Error(\"Uint8Array expected\");\n }\n function abool2(title2, value) {\n if (typeof value !== \"boolean\")\n throw new Error(title2 + \" boolean expected, got \" + value);\n }\n function bytesToHex4(bytes) {\n abytes3(bytes);\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes5[bytes[i3]];\n }\n return hex;\n }\n function numberToHexUnpadded2(num2) {\n const hex = num2.toString(16);\n return hex.length & 1 ? \"0\" + hex : hex;\n }\n function hexToNumber3(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n return hex === \"\" ? _0n7 : BigInt(\"0x\" + hex);\n }\n function asciiToBase163(ch) {\n if (ch >= asciis3._0 && ch <= asciis3._9)\n return ch - asciis3._0;\n if (ch >= asciis3.A && ch <= asciis3.F)\n return ch - (asciis3.A - 10);\n if (ch >= asciis3.a && ch <= asciis3.f)\n return ch - (asciis3.a - 10);\n return;\n }\n function hexToBytes4(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error(\"hex string expected, got unpadded hex of length \" + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase163(hex.charCodeAt(hi));\n const n2 = asciiToBase163(hex.charCodeAt(hi + 1));\n if (n1 === void 0 || n2 === void 0) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n }\n function bytesToNumberBE2(bytes) {\n return hexToNumber3(bytesToHex4(bytes));\n }\n function bytesToNumberLE2(bytes) {\n abytes3(bytes);\n return hexToNumber3(bytesToHex4(Uint8Array.from(bytes).reverse()));\n }\n function numberToBytesBE2(n2, len) {\n return hexToBytes4(n2.toString(16).padStart(len * 2, \"0\"));\n }\n function numberToBytesLE2(n2, len) {\n return numberToBytesBE2(n2, len).reverse();\n }\n function numberToVarBytesBE(n2) {\n return hexToBytes4(numberToHexUnpadded2(n2));\n }\n function ensureBytes2(title2, hex, expectedLength) {\n let res;\n if (typeof hex === \"string\") {\n try {\n res = hexToBytes4(hex);\n } catch (e2) {\n throw new Error(title2 + \" must be hex string or Uint8Array, cause: \" + e2);\n }\n } else if (isBytes5(hex)) {\n res = Uint8Array.from(hex);\n } else {\n throw new Error(title2 + \" must be hex string or Uint8Array\");\n }\n const len = res.length;\n if (typeof expectedLength === \"number\" && len !== expectedLength)\n throw new Error(title2 + \" of length \" + expectedLength + \" expected, got \" + len);\n return res;\n }\n function concatBytes4(...arrays) {\n let sum = 0;\n for (let i3 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n abytes3(a3);\n sum += a3.length;\n }\n const res = new Uint8Array(sum);\n for (let i3 = 0, pad6 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n res.set(a3, pad6);\n pad6 += a3.length;\n }\n return res;\n }\n function equalBytes(a3, b4) {\n if (a3.length !== b4.length)\n return false;\n let diff = 0;\n for (let i3 = 0; i3 < a3.length; i3++)\n diff |= a3[i3] ^ b4[i3];\n return diff === 0;\n }\n function utf8ToBytes3(str) {\n if (typeof str !== \"string\")\n throw new Error(\"string expected\");\n return new Uint8Array(new TextEncoder().encode(str));\n }\n function inRange2(n2, min, max) {\n return isPosBig2(n2) && isPosBig2(min) && isPosBig2(max) && min <= n2 && n2 < max;\n }\n function aInRange2(title2, n2, min, max) {\n if (!inRange2(n2, min, max))\n throw new Error(\"expected valid \" + title2 + \": \" + min + \" <= n < \" + max + \", got \" + n2);\n }\n function bitLen2(n2) {\n let len;\n for (len = 0; n2 > _0n7; n2 >>= _1n7, len += 1)\n ;\n return len;\n }\n function bitGet(n2, pos) {\n return n2 >> BigInt(pos) & _1n7;\n }\n function bitSet(n2, pos, value) {\n return n2 | (value ? _1n7 : _0n7) << BigInt(pos);\n }\n function createHmacDrbg2(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== \"number\" || hashLen < 2)\n throw new Error(\"hashLen must be a number\");\n if (typeof qByteLen !== \"number\" || qByteLen < 2)\n throw new Error(\"qByteLen must be a number\");\n if (typeof hmacFn !== \"function\")\n throw new Error(\"hmacFn must be a function\");\n let v2 = u8n2(hashLen);\n let k4 = u8n2(hashLen);\n let i3 = 0;\n const reset = () => {\n v2.fill(1);\n k4.fill(0);\n i3 = 0;\n };\n const h4 = (...b4) => hmacFn(k4, v2, ...b4);\n const reseed = (seed = u8n2()) => {\n k4 = h4(u8fr2([0]), seed);\n v2 = h4();\n if (seed.length === 0)\n return;\n k4 = h4(u8fr2([1]), seed);\n v2 = h4();\n };\n const gen2 = () => {\n if (i3++ >= 1e3)\n throw new Error(\"drbg: tried 1000 values\");\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v2 = h4();\n const sl = v2.slice();\n out.push(sl);\n len += v2.length;\n }\n return concatBytes4(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed);\n let res = void 0;\n while (!(res = pred(gen2())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n }\n function validateObject2(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns2[type];\n if (typeof checkVal !== \"function\")\n throw new Error(\"invalid validator function\");\n const val = object[fieldName];\n if (isOptional && val === void 0)\n return;\n if (!checkVal(val, object)) {\n throw new Error(\"param \" + String(fieldName) + \" is invalid. Expected \" + type + \", got \" + val);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n }\n function memoized2(fn) {\n const map = /* @__PURE__ */ new WeakMap();\n return (arg, ...args) => {\n const val = map.get(arg);\n if (val !== void 0)\n return val;\n const computed = fn(arg, ...args);\n map.set(arg, computed);\n return computed;\n };\n }\n var _0n7, _1n7, _2n5, hexes5, asciis3, isPosBig2, bitMask2, u8n2, u8fr2, validatorFns2, notImplemented;\n var init_utils16 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.8.1/node_modules/@noble/curves/esm/abstract/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n _0n7 = /* @__PURE__ */ BigInt(0);\n _1n7 = /* @__PURE__ */ BigInt(1);\n _2n5 = /* @__PURE__ */ BigInt(2);\n hexes5 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n asciis3 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\n isPosBig2 = (n2) => typeof n2 === \"bigint\" && _0n7 <= n2;\n bitMask2 = (n2) => (_2n5 << BigInt(n2 - 1)) - _1n7;\n u8n2 = (data) => new Uint8Array(data);\n u8fr2 = (arr) => Uint8Array.from(arr);\n validatorFns2 = {\n bigint: (val) => typeof val === \"bigint\",\n function: (val) => typeof val === \"function\",\n boolean: (val) => typeof val === \"boolean\",\n string: (val) => typeof val === \"string\",\n stringOrUint8Array: (val) => typeof val === \"string\" || isBytes5(val),\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === \"function\" && Number.isSafeInteger(val.outputLen)\n };\n notImplemented = () => {\n throw new Error(\"not implemented\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/version.js\n var version5;\n var init_version8 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n version5 = \"0.1.1\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/errors.js\n function getVersion2() {\n return version5;\n }\n var init_errors7 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_version8();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Errors.js\n function walk3(err, fn) {\n if (fn?.(err))\n return err;\n if (err && typeof err === \"object\" && \"cause\" in err && err.cause)\n return walk3(err.cause, fn);\n return fn ? null : err;\n }\n var BaseError7;\n var init_Errors2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors7();\n BaseError7 = class _BaseError extends Error {\n constructor(shortMessage, options = {}) {\n const details = (() => {\n if (options.cause instanceof _BaseError) {\n if (options.cause.details)\n return options.cause.details;\n if (options.cause.shortMessage)\n return options.cause.shortMessage;\n }\n if (options.cause?.message)\n return options.cause.message;\n return options.details;\n })();\n const docsPath8 = (() => {\n if (options.cause instanceof _BaseError)\n return options.cause.docsPath || options.docsPath;\n return options.docsPath;\n })();\n const docsBaseUrl = \"https://oxlib.sh\";\n const docs = `${docsBaseUrl}${docsPath8 ?? \"\"}`;\n const message = [\n shortMessage || \"An error occurred.\",\n ...options.metaMessages ? [\"\", ...options.metaMessages] : [],\n ...details || docsPath8 ? [\n \"\",\n details ? `Details: ${details}` : void 0,\n docsPath8 ? `See: ${docs}` : void 0\n ] : []\n ].filter((x4) => typeof x4 === \"string\").join(\"\\n\");\n super(message, options.cause ? { cause: options.cause } : void 0);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"BaseError\"\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: `ox@${getVersion2()}`\n });\n this.cause = options.cause;\n this.details = details;\n this.docs = docs;\n this.docsPath = docsPath8;\n this.shortMessage = shortMessage;\n }\n walk(fn) {\n return walk3(this, fn);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/bytes.js\n function charCodeToBase163(char) {\n if (char >= charCodeMap3.zero && char <= charCodeMap3.nine)\n return char - charCodeMap3.zero;\n if (char >= charCodeMap3.A && char <= charCodeMap3.F)\n return char - (charCodeMap3.A - 10);\n if (char >= charCodeMap3.a && char <= charCodeMap3.f)\n return char - (charCodeMap3.a - 10);\n return void 0;\n }\n var charCodeMap3;\n var init_bytes4 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n charCodeMap3 = {\n zero: 48,\n nine: 57,\n A: 65,\n F: 70,\n a: 97,\n f: 102\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/hex.js\n function assertSize4(hex, size_) {\n if (size5(hex) > size_)\n throw new SizeOverflowError4({\n givenSize: size5(hex),\n maxSize: size_\n });\n }\n function pad4(hex_, options = {}) {\n const { dir, size: size6 = 32 } = options;\n if (size6 === 0)\n return hex_;\n const hex = hex_.replace(\"0x\", \"\");\n if (hex.length > size6 * 2)\n throw new SizeExceedsPaddingSizeError4({\n size: Math.ceil(hex.length / 2),\n targetSize: size6,\n type: \"Hex\"\n });\n return `0x${hex[dir === \"right\" ? \"padEnd\" : \"padStart\"](size6 * 2, \"0\")}`;\n }\n var init_hex2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/hex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hex2();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hex.js\n function fromBytes4(value, options = {}) {\n let string = \"\";\n for (let i3 = 0; i3 < value.length; i3++)\n string += hexes6[value[i3]];\n const hex = `0x${string}`;\n if (typeof options.size === \"number\") {\n assertSize4(hex, options.size);\n return padRight3(hex, options.size);\n }\n return hex;\n }\n function padRight3(value, size6) {\n return pad4(value, { dir: \"right\", size: size6 });\n }\n function size5(value) {\n return Math.ceil((value.length - 2) / 2);\n }\n var hexes6, SizeOverflowError4, SizeExceedsPaddingSizeError4;\n var init_Hex2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors2();\n init_hex2();\n hexes6 = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i3) => i3.toString(16).padStart(2, \"0\"));\n SizeOverflowError4 = class extends BaseError7 {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed \\`${maxSize}\\` bytes. Given size: \\`${givenSize}\\` bytes.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SizeOverflowError\"\n });\n }\n };\n SizeExceedsPaddingSizeError4 = class extends BaseError7 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\\`${size6}\\`) exceeds padding size (\\`${targetSize}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SizeExceedsPaddingSizeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Bytes.js\n function fromHex6(value, options = {}) {\n const { size: size6 } = options;\n let hex = value;\n if (size6) {\n assertSize4(value, size6);\n hex = padRight3(value, size6);\n }\n let hexString = hex.slice(2);\n if (hexString.length % 2)\n hexString = `0${hexString}`;\n const length = hexString.length / 2;\n const bytes = new Uint8Array(length);\n for (let index2 = 0, j2 = 0; index2 < length; index2++) {\n const nibbleLeft = charCodeToBase163(hexString.charCodeAt(j2++));\n const nibbleRight = charCodeToBase163(hexString.charCodeAt(j2++));\n if (nibbleLeft === void 0 || nibbleRight === void 0) {\n throw new BaseError7(`Invalid byte sequence (\"${hexString[j2 - 2]}${hexString[j2 - 1]}\" in \"${hexString}\").`);\n }\n bytes[index2] = nibbleLeft * 16 + nibbleRight;\n }\n return bytes;\n }\n var init_Bytes2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors2();\n init_Hex2();\n init_bytes4();\n init_hex2();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Base64.js\n function toBytes4(value) {\n const base64 = value.replace(/=+$/, \"\");\n const size6 = base64.length;\n const decoded = new Uint8Array(size6 + 3);\n encoder5.encodeInto(base64 + \"===\", decoded);\n for (let i3 = 0, j2 = 0; i3 < base64.length; i3 += 4, j2 += 3) {\n const x4 = (characterToInteger[decoded[i3]] << 18) + (characterToInteger[decoded[i3 + 1]] << 12) + (characterToInteger[decoded[i3 + 2]] << 6) + characterToInteger[decoded[i3 + 3]];\n decoded[j2] = x4 >> 16;\n decoded[j2 + 1] = x4 >> 8 & 255;\n decoded[j2 + 2] = x4 & 255;\n }\n const decodedSize = (size6 >> 2) * 3 + (size6 % 4 && size6 % 4 - 1);\n return new Uint8Array(decoded.buffer, 0, decodedSize);\n }\n var encoder5, integerToCharacter, characterToInteger;\n var init_Base64 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Base64.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n encoder5 = /* @__PURE__ */ new TextEncoder();\n integerToCharacter = /* @__PURE__ */ Object.fromEntries(Array.from(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\").map((a3, i3) => [i3, a3.charCodeAt(0)]));\n characterToInteger = {\n ...Object.fromEntries(Array.from(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\").map((a3, i3) => [a3.charCodeAt(0), i3])),\n [\"=\".charCodeAt(0)]: 0,\n [\"-\".charCodeAt(0)]: 62,\n [\"_\".charCodeAt(0)]: 63\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/esm/_assert.js\n function anumber3(n2) {\n if (!Number.isSafeInteger(n2) || n2 < 0)\n throw new Error(\"positive integer expected, got \" + n2);\n }\n function isBytes6(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function abytes4(b4, ...lengths) {\n if (!isBytes6(b4))\n throw new Error(\"Uint8Array expected\");\n if (lengths.length > 0 && !lengths.includes(b4.length))\n throw new Error(\"Uint8Array expected of length \" + lengths + \", got length=\" + b4.length);\n }\n function ahash2(h4) {\n if (typeof h4 !== \"function\" || typeof h4.create !== \"function\")\n throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");\n anumber3(h4.outputLen);\n anumber3(h4.blockLen);\n }\n function aexists2(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error(\"Hash instance has been destroyed\");\n if (checkFinished && instance.finished)\n throw new Error(\"Hash#digest() has already been called\");\n }\n function aoutput2(out, instance) {\n abytes4(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(\"digestInto() expects output buffer of length at least \" + min);\n }\n }\n var init_assert = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/esm/_assert.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/esm/crypto.js\n var crypto3;\n var init_crypto2 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/esm/crypto.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n crypto3 = typeof globalThis === \"object\" && \"crypto\" in globalThis ? globalThis.crypto : void 0;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/esm/utils.js\n function createView2(arr) {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n }\n function rotr2(word, shift) {\n return word << 32 - shift | word >>> shift;\n }\n function utf8ToBytes4(str) {\n if (typeof str !== \"string\")\n throw new Error(\"utf8ToBytes expected string, got \" + typeof str);\n return new Uint8Array(new TextEncoder().encode(str));\n }\n function toBytes5(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes4(data);\n abytes4(data);\n return data;\n }\n function concatBytes5(...arrays) {\n let sum = 0;\n for (let i3 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n abytes4(a3);\n sum += a3.length;\n }\n const res = new Uint8Array(sum);\n for (let i3 = 0, pad6 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n res.set(a3, pad6);\n pad6 += a3.length;\n }\n return res;\n }\n function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes5(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n }\n function randomBytes2(bytesLength = 32) {\n if (crypto3 && typeof crypto3.getRandomValues === \"function\") {\n return crypto3.getRandomValues(new Uint8Array(bytesLength));\n }\n if (crypto3 && typeof crypto3.randomBytes === \"function\") {\n return crypto3.randomBytes(bytesLength);\n }\n throw new Error(\"crypto.getRandomValues must be defined\");\n }\n var Hash2;\n var init_utils17 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/esm/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_crypto2();\n init_assert();\n Hash2 = class {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/esm/_md.js\n function setBigUint642(view, byteOffset, value, isLE2) {\n if (typeof view.setBigUint64 === \"function\")\n return view.setBigUint64(byteOffset, value, isLE2);\n const _32n2 = BigInt(32);\n const _u32_max = BigInt(4294967295);\n const wh = Number(value >> _32n2 & _u32_max);\n const wl = Number(value & _u32_max);\n const h4 = isLE2 ? 4 : 0;\n const l6 = isLE2 ? 0 : 4;\n view.setUint32(byteOffset + h4, wh, isLE2);\n view.setUint32(byteOffset + l6, wl, isLE2);\n }\n function Chi2(a3, b4, c4) {\n return a3 & b4 ^ ~a3 & c4;\n }\n function Maj2(a3, b4, c4) {\n return a3 & b4 ^ a3 & c4 ^ b4 & c4;\n }\n var HashMD2;\n var init_md2 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/esm/_md.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_assert();\n init_utils17();\n HashMD2 = class extends Hash2 {\n constructor(blockLen, outputLen, padOffset, isLE2) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE2;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView2(this.buffer);\n }\n update(data) {\n aexists2(this);\n const { view, buffer: buffer2, blockLen } = this;\n data = toBytes5(data);\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n if (take === blockLen) {\n const dataView = createView2(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer2.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n aexists2(this);\n aoutput2(out, this);\n this.finished = true;\n const { buffer: buffer2, view, blockLen, isLE: isLE2 } = this;\n let { pos } = this;\n buffer2[pos++] = 128;\n this.buffer.subarray(pos).fill(0);\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n for (let i3 = pos; i3 < blockLen; i3++)\n buffer2[i3] = 0;\n setBigUint642(view, blockLen - 8, BigInt(this.length * 8), isLE2);\n this.process(view, 0);\n const oview = createView2(out);\n const len = this.outputLen;\n if (len % 4)\n throw new Error(\"_sha2: outputLen should be aligned to 32bit\");\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error(\"_sha2: outputLen bigger than state\");\n for (let i3 = 0; i3 < outLen; i3++)\n oview.setUint32(4 * i3, state[i3], isLE2);\n }\n digest() {\n const { buffer: buffer2, outputLen } = this;\n this.digestInto(buffer2);\n const res = buffer2.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer: buffer2, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer2);\n return to;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/esm/sha256.js\n var SHA256_K2, SHA256_IV2, SHA256_W2, SHA2562, sha2564;\n var init_sha2563 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/esm/sha256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_md2();\n init_utils17();\n SHA256_K2 = /* @__PURE__ */ new Uint32Array([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n SHA256_IV2 = /* @__PURE__ */ new Uint32Array([\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ]);\n SHA256_W2 = /* @__PURE__ */ new Uint32Array(64);\n SHA2562 = class extends HashMD2 {\n constructor() {\n super(64, 32, 8, false);\n this.A = SHA256_IV2[0] | 0;\n this.B = SHA256_IV2[1] | 0;\n this.C = SHA256_IV2[2] | 0;\n this.D = SHA256_IV2[3] | 0;\n this.E = SHA256_IV2[4] | 0;\n this.F = SHA256_IV2[5] | 0;\n this.G = SHA256_IV2[6] | 0;\n this.H = SHA256_IV2[7] | 0;\n }\n get() {\n const { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n return [A4, B2, C, D2, E2, F2, G, H3];\n }\n // prettier-ignore\n set(A4, B2, C, D2, E2, F2, G, H3) {\n this.A = A4 | 0;\n this.B = B2 | 0;\n this.C = C | 0;\n this.D = D2 | 0;\n this.E = E2 | 0;\n this.F = F2 | 0;\n this.G = G | 0;\n this.H = H3 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n SHA256_W2[i3] = view.getUint32(offset, false);\n for (let i3 = 16; i3 < 64; i3++) {\n const W15 = SHA256_W2[i3 - 15];\n const W2 = SHA256_W2[i3 - 2];\n const s0 = rotr2(W15, 7) ^ rotr2(W15, 18) ^ W15 >>> 3;\n const s1 = rotr2(W2, 17) ^ rotr2(W2, 19) ^ W2 >>> 10;\n SHA256_W2[i3] = s1 + SHA256_W2[i3 - 7] + s0 + SHA256_W2[i3 - 16] | 0;\n }\n let { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n for (let i3 = 0; i3 < 64; i3++) {\n const sigma1 = rotr2(E2, 6) ^ rotr2(E2, 11) ^ rotr2(E2, 25);\n const T1 = H3 + sigma1 + Chi2(E2, F2, G) + SHA256_K2[i3] + SHA256_W2[i3] | 0;\n const sigma0 = rotr2(A4, 2) ^ rotr2(A4, 13) ^ rotr2(A4, 22);\n const T22 = sigma0 + Maj2(A4, B2, C) | 0;\n H3 = G;\n G = F2;\n F2 = E2;\n E2 = D2 + T1 | 0;\n D2 = C;\n C = B2;\n B2 = A4;\n A4 = T1 + T22 | 0;\n }\n A4 = A4 + this.A | 0;\n B2 = B2 + this.B | 0;\n C = C + this.C | 0;\n D2 = D2 + this.D | 0;\n E2 = E2 + this.E | 0;\n F2 = F2 + this.F | 0;\n G = G + this.G | 0;\n H3 = H3 + this.H | 0;\n this.set(A4, B2, C, D2, E2, F2, G, H3);\n }\n roundClean() {\n SHA256_W2.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n };\n sha2564 = /* @__PURE__ */ wrapConstructor(() => new SHA2562());\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/esm/hmac.js\n var HMAC2, hmac2;\n var init_hmac2 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.7.1/node_modules/@noble/hashes/esm/hmac.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_assert();\n init_utils17();\n HMAC2 = class extends Hash2 {\n constructor(hash3, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n ahash2(hash3);\n const key = toBytes5(_key);\n this.iHash = hash3.create();\n if (typeof this.iHash.update !== \"function\")\n throw new Error(\"Expected instance of class which extends utils.Hash\");\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad6 = new Uint8Array(blockLen);\n pad6.set(key.length > blockLen ? hash3.create().update(key).digest() : key);\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54;\n this.iHash.update(pad6);\n this.oHash = hash3.create();\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54 ^ 92;\n this.oHash.update(pad6);\n pad6.fill(0);\n }\n update(buf) {\n aexists2(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n aexists2(this);\n abytes4(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n };\n hmac2 = (hash3, key, message) => new HMAC2(hash3, key).update(message).digest();\n hmac2.create = (hash3, key) => new HMAC2(hash3, key);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.8.1/node_modules/@noble/curves/esm/abstract/modular.js\n function mod2(a3, b4) {\n const result = a3 % b4;\n return result >= _0n8 ? result : b4 + result;\n }\n function pow(num2, power, modulo) {\n if (power < _0n8)\n throw new Error(\"invalid exponent, negatives unsupported\");\n if (modulo <= _0n8)\n throw new Error(\"invalid modulus\");\n if (modulo === _1n8)\n return _0n8;\n let res = _1n8;\n while (power > _0n8) {\n if (power & _1n8)\n res = res * num2 % modulo;\n num2 = num2 * num2 % modulo;\n power >>= _1n8;\n }\n return res;\n }\n function invert2(number, modulo) {\n if (number === _0n8)\n throw new Error(\"invert: expected non-zero number\");\n if (modulo <= _0n8)\n throw new Error(\"invert: expected positive modulus, got \" + modulo);\n let a3 = mod2(number, modulo);\n let b4 = modulo;\n let x4 = _0n8, y6 = _1n8, u2 = _1n8, v2 = _0n8;\n while (a3 !== _0n8) {\n const q3 = b4 / a3;\n const r2 = b4 % a3;\n const m2 = x4 - u2 * q3;\n const n2 = y6 - v2 * q3;\n b4 = a3, a3 = r2, x4 = u2, y6 = v2, u2 = m2, v2 = n2;\n }\n const gcd = b4;\n if (gcd !== _1n8)\n throw new Error(\"invert: does not exist\");\n return mod2(x4, modulo);\n }\n function tonelliShanks2(P2) {\n const legendreC = (P2 - _1n8) / _2n6;\n let Q2, S3, Z2;\n for (Q2 = P2 - _1n8, S3 = 0; Q2 % _2n6 === _0n8; Q2 /= _2n6, S3++)\n ;\n for (Z2 = _2n6; Z2 < P2 && pow(Z2, legendreC, P2) !== P2 - _1n8; Z2++) {\n if (Z2 > 1e3)\n throw new Error(\"Cannot find square root: likely non-prime P\");\n }\n if (S3 === 1) {\n const p1div4 = (P2 + _1n8) / _4n3;\n return function tonelliFast(Fp, n2) {\n const root = Fp.pow(n2, p1div4);\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n };\n }\n const Q1div2 = (Q2 + _1n8) / _2n6;\n return function tonelliSlow(Fp, n2) {\n if (Fp.pow(n2, legendreC) === Fp.neg(Fp.ONE))\n throw new Error(\"Cannot find square root\");\n let r2 = S3;\n let g4 = Fp.pow(Fp.mul(Fp.ONE, Z2), Q2);\n let x4 = Fp.pow(n2, Q1div2);\n let b4 = Fp.pow(n2, Q2);\n while (!Fp.eql(b4, Fp.ONE)) {\n if (Fp.eql(b4, Fp.ZERO))\n return Fp.ZERO;\n let m2 = 1;\n for (let t22 = Fp.sqr(b4); m2 < r2; m2++) {\n if (Fp.eql(t22, Fp.ONE))\n break;\n t22 = Fp.sqr(t22);\n }\n const ge = Fp.pow(g4, _1n8 << BigInt(r2 - m2 - 1));\n g4 = Fp.sqr(ge);\n x4 = Fp.mul(x4, ge);\n b4 = Fp.mul(b4, g4);\n r2 = m2;\n }\n return x4;\n };\n }\n function FpSqrt2(P2) {\n if (P2 % _4n3 === _3n3) {\n const p1div4 = (P2 + _1n8) / _4n3;\n return function sqrt3mod42(Fp, n2) {\n const root = Fp.pow(n2, p1div4);\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n };\n }\n if (P2 % _8n2 === _5n2) {\n const c1 = (P2 - _5n2) / _8n2;\n return function sqrt5mod82(Fp, n2) {\n const n22 = Fp.mul(n2, _2n6);\n const v2 = Fp.pow(n22, c1);\n const nv = Fp.mul(n2, v2);\n const i3 = Fp.mul(Fp.mul(nv, _2n6), v2);\n const root = Fp.mul(nv, Fp.sub(i3, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n };\n }\n if (P2 % _16n === _9n) {\n }\n return tonelliShanks2(P2);\n }\n function validateField2(field) {\n const initial = {\n ORDER: \"bigint\",\n MASK: \"bigint\",\n BYTES: \"isSafeInteger\",\n BITS: \"isSafeInteger\"\n };\n const opts = FIELD_FIELDS2.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n return validateObject2(field, opts);\n }\n function FpPow2(f7, num2, power) {\n if (power < _0n8)\n throw new Error(\"invalid exponent, negatives unsupported\");\n if (power === _0n8)\n return f7.ONE;\n if (power === _1n8)\n return num2;\n let p4 = f7.ONE;\n let d5 = num2;\n while (power > _0n8) {\n if (power & _1n8)\n p4 = f7.mul(p4, d5);\n d5 = f7.sqr(d5);\n power >>= _1n8;\n }\n return p4;\n }\n function FpInvertBatch2(f7, nums) {\n const tmp = new Array(nums.length);\n const lastMultiplied = nums.reduce((acc, num2, i3) => {\n if (f7.is0(num2))\n return acc;\n tmp[i3] = acc;\n return f7.mul(acc, num2);\n }, f7.ONE);\n const inverted = f7.inv(lastMultiplied);\n nums.reduceRight((acc, num2, i3) => {\n if (f7.is0(num2))\n return acc;\n tmp[i3] = f7.mul(acc, tmp[i3]);\n return f7.mul(acc, num2);\n }, inverted);\n return tmp;\n }\n function nLength2(n2, nBitLength) {\n const _nBitLength = nBitLength !== void 0 ? nBitLength : n2.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n }\n function Field2(ORDER, bitLen3, isLE2 = false, redef = {}) {\n if (ORDER <= _0n8)\n throw new Error(\"invalid field: expected ORDER > 0, got \" + ORDER);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength2(ORDER, bitLen3);\n if (BYTES > 2048)\n throw new Error(\"invalid field: expected ORDER of <= 2048 bytes\");\n let sqrtP;\n const f7 = Object.freeze({\n ORDER,\n isLE: isLE2,\n BITS,\n BYTES,\n MASK: bitMask2(BITS),\n ZERO: _0n8,\n ONE: _1n8,\n create: (num2) => mod2(num2, ORDER),\n isValid: (num2) => {\n if (typeof num2 !== \"bigint\")\n throw new Error(\"invalid field element: expected bigint, got \" + typeof num2);\n return _0n8 <= num2 && num2 < ORDER;\n },\n is0: (num2) => num2 === _0n8,\n isOdd: (num2) => (num2 & _1n8) === _1n8,\n neg: (num2) => mod2(-num2, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num2) => mod2(num2 * num2, ORDER),\n add: (lhs, rhs) => mod2(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod2(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod2(lhs * rhs, ORDER),\n pow: (num2, power) => FpPow2(f7, num2, power),\n div: (lhs, rhs) => mod2(lhs * invert2(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num2) => num2 * num2,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num2) => invert2(num2, ORDER),\n sqrt: redef.sqrt || ((n2) => {\n if (!sqrtP)\n sqrtP = FpSqrt2(ORDER);\n return sqrtP(f7, n2);\n }),\n invertBatch: (lst) => FpInvertBatch2(f7, lst),\n // TODO: do we really need constant cmov?\n // We don't have const-time bigints anyway, so probably will be not very useful\n cmov: (a3, b4, c4) => c4 ? b4 : a3,\n toBytes: (num2) => isLE2 ? numberToBytesLE2(num2, BYTES) : numberToBytesBE2(num2, BYTES),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(\"Field.fromBytes: expected \" + BYTES + \" bytes, got \" + bytes.length);\n return isLE2 ? bytesToNumberLE2(bytes) : bytesToNumberBE2(bytes);\n }\n });\n return Object.freeze(f7);\n }\n function getFieldBytesLength2(fieldOrder) {\n if (typeof fieldOrder !== \"bigint\")\n throw new Error(\"field order must be bigint\");\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n }\n function getMinHashLength2(fieldOrder) {\n const length = getFieldBytesLength2(fieldOrder);\n return length + Math.ceil(length / 2);\n }\n function mapHashToField2(key, fieldOrder, isLE2 = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength2(fieldOrder);\n const minLen = getMinHashLength2(fieldOrder);\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(\"expected \" + minLen + \"-1024 bytes of input, got \" + len);\n const num2 = isLE2 ? bytesToNumberLE2(key) : bytesToNumberBE2(key);\n const reduced = mod2(num2, fieldOrder - _1n8) + _1n8;\n return isLE2 ? numberToBytesLE2(reduced, fieldLen) : numberToBytesBE2(reduced, fieldLen);\n }\n var _0n8, _1n8, _2n6, _3n3, _4n3, _5n2, _8n2, _9n, _16n, FIELD_FIELDS2;\n var init_modular2 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.8.1/node_modules/@noble/curves/esm/abstract/modular.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils16();\n _0n8 = BigInt(0);\n _1n8 = BigInt(1);\n _2n6 = /* @__PURE__ */ BigInt(2);\n _3n3 = /* @__PURE__ */ BigInt(3);\n _4n3 = /* @__PURE__ */ BigInt(4);\n _5n2 = /* @__PURE__ */ BigInt(5);\n _8n2 = /* @__PURE__ */ BigInt(8);\n _9n = /* @__PURE__ */ BigInt(9);\n _16n = /* @__PURE__ */ BigInt(16);\n FIELD_FIELDS2 = [\n \"create\",\n \"isValid\",\n \"is0\",\n \"neg\",\n \"inv\",\n \"sqrt\",\n \"sqr\",\n \"eql\",\n \"add\",\n \"sub\",\n \"mul\",\n \"pow\",\n \"div\",\n \"addN\",\n \"subN\",\n \"mulN\",\n \"sqrN\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.8.1/node_modules/@noble/curves/esm/abstract/curve.js\n function constTimeNegate2(condition, item) {\n const neg = item.negate();\n return condition ? neg : item;\n }\n function validateW2(W, bits) {\n if (!Number.isSafeInteger(W) || W <= 0 || W > bits)\n throw new Error(\"invalid window size, expected [1..\" + bits + \"], got W=\" + W);\n }\n function calcWOpts2(W, bits) {\n validateW2(W, bits);\n const windows = Math.ceil(bits / W) + 1;\n const windowSize = 2 ** (W - 1);\n return { windows, windowSize };\n }\n function validateMSMPoints2(points, c4) {\n if (!Array.isArray(points))\n throw new Error(\"array expected\");\n points.forEach((p4, i3) => {\n if (!(p4 instanceof c4))\n throw new Error(\"invalid point at index \" + i3);\n });\n }\n function validateMSMScalars2(scalars, field) {\n if (!Array.isArray(scalars))\n throw new Error(\"array of scalars expected\");\n scalars.forEach((s4, i3) => {\n if (!field.isValid(s4))\n throw new Error(\"invalid scalar at index \" + i3);\n });\n }\n function getW2(P2) {\n return pointWindowSizes2.get(P2) || 1;\n }\n function wNAF2(c4, bits) {\n return {\n constTimeNegate: constTimeNegate2,\n hasPrecomputes(elm) {\n return getW2(elm) !== 1;\n },\n // non-const time multiplication ladder\n unsafeLadder(elm, n2, p4 = c4.ZERO) {\n let d5 = elm;\n while (n2 > _0n9) {\n if (n2 & _1n9)\n p4 = p4.add(d5);\n d5 = d5.double();\n n2 >>= _1n9;\n }\n return p4;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @param elm Point instance\n * @param W window size\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = calcWOpts2(W, bits);\n const points = [];\n let p4 = elm;\n let base4 = p4;\n for (let window2 = 0; window2 < windows; window2++) {\n base4 = p4;\n points.push(base4);\n for (let i3 = 1; i3 < windowSize; i3++) {\n base4 = base4.add(p4);\n points.push(base4);\n }\n p4 = base4.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n2) {\n const { windows, windowSize } = calcWOpts2(W, bits);\n let p4 = c4.ZERO;\n let f7 = c4.BASE;\n const mask = BigInt(2 ** W - 1);\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window2 = 0; window2 < windows; window2++) {\n const offset = window2 * windowSize;\n let wbits = Number(n2 & mask);\n n2 >>= shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n2 += _1n9;\n }\n const offset1 = offset;\n const offset2 = offset + Math.abs(wbits) - 1;\n const cond1 = window2 % 2 !== 0;\n const cond2 = wbits < 0;\n if (wbits === 0) {\n f7 = f7.add(constTimeNegate2(cond1, precomputes[offset1]));\n } else {\n p4 = p4.add(constTimeNegate2(cond2, precomputes[offset2]));\n }\n }\n return { p: p4, f: f7 };\n },\n /**\n * Implements ec unsafe (non const-time) multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @param acc accumulator point to add result of multiplication\n * @returns point\n */\n wNAFUnsafe(W, precomputes, n2, acc = c4.ZERO) {\n const { windows, windowSize } = calcWOpts2(W, bits);\n const mask = BigInt(2 ** W - 1);\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window2 = 0; window2 < windows; window2++) {\n const offset = window2 * windowSize;\n if (n2 === _0n9)\n break;\n let wbits = Number(n2 & mask);\n n2 >>= shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n2 += _1n9;\n }\n if (wbits === 0)\n continue;\n let curr = precomputes[offset + Math.abs(wbits) - 1];\n if (wbits < 0)\n curr = curr.negate();\n acc = acc.add(curr);\n }\n return acc;\n },\n getPrecomputes(W, P2, transform) {\n let comp = pointPrecomputes2.get(P2);\n if (!comp) {\n comp = this.precomputeWindow(P2, W);\n if (W !== 1)\n pointPrecomputes2.set(P2, transform(comp));\n }\n return comp;\n },\n wNAFCached(P2, n2, transform) {\n const W = getW2(P2);\n return this.wNAF(W, this.getPrecomputes(W, P2, transform), n2);\n },\n wNAFCachedUnsafe(P2, n2, transform, prev) {\n const W = getW2(P2);\n if (W === 1)\n return this.unsafeLadder(P2, n2, prev);\n return this.wNAFUnsafe(W, this.getPrecomputes(W, P2, transform), n2, prev);\n },\n // We calculate precomputes for elliptic curve point multiplication\n // using windowed method. This specifies window size and\n // stores precomputed values. Usually only base point would be precomputed.\n setWindowSize(P2, W) {\n validateW2(W, bits);\n pointWindowSizes2.set(P2, W);\n pointPrecomputes2.delete(P2);\n }\n };\n }\n function pippenger2(c4, fieldN, points, scalars) {\n validateMSMPoints2(points, c4);\n validateMSMScalars2(scalars, fieldN);\n if (points.length !== scalars.length)\n throw new Error(\"arrays of points and scalars must have equal length\");\n const zero = c4.ZERO;\n const wbits = bitLen2(BigInt(points.length));\n const windowSize = wbits > 12 ? wbits - 3 : wbits > 4 ? wbits - 2 : wbits ? 2 : 1;\n const MASK = (1 << windowSize) - 1;\n const buckets = new Array(MASK + 1).fill(zero);\n const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;\n let sum = zero;\n for (let i3 = lastBits; i3 >= 0; i3 -= windowSize) {\n buckets.fill(zero);\n for (let j2 = 0; j2 < scalars.length; j2++) {\n const scalar = scalars[j2];\n const wbits2 = Number(scalar >> BigInt(i3) & BigInt(MASK));\n buckets[wbits2] = buckets[wbits2].add(points[j2]);\n }\n let resI = zero;\n for (let j2 = buckets.length - 1, sumI = zero; j2 > 0; j2--) {\n sumI = sumI.add(buckets[j2]);\n resI = resI.add(sumI);\n }\n sum = sum.add(resI);\n if (i3 !== 0)\n for (let j2 = 0; j2 < windowSize; j2++)\n sum = sum.double();\n }\n return sum;\n }\n function validateBasic2(curve) {\n validateField2(curve.Fp);\n validateObject2(curve, {\n n: \"bigint\",\n h: \"bigint\",\n Gx: \"field\",\n Gy: \"field\"\n }, {\n nBitLength: \"isSafeInteger\",\n nByteLength: \"isSafeInteger\"\n });\n return Object.freeze({\n ...nLength2(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER }\n });\n }\n var _0n9, _1n9, pointPrecomputes2, pointWindowSizes2;\n var init_curve2 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.8.1/node_modules/@noble/curves/esm/abstract/curve.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_modular2();\n init_utils16();\n _0n9 = BigInt(0);\n _1n9 = BigInt(1);\n pointPrecomputes2 = /* @__PURE__ */ new WeakMap();\n pointWindowSizes2 = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.8.1/node_modules/@noble/curves/esm/abstract/weierstrass.js\n function validateSigVerOpts2(opts) {\n if (opts.lowS !== void 0)\n abool2(\"lowS\", opts.lowS);\n if (opts.prehash !== void 0)\n abool2(\"prehash\", opts.prehash);\n }\n function validatePointOpts2(curve) {\n const opts = validateBasic2(curve);\n validateObject2(opts, {\n a: \"field\",\n b: \"field\"\n }, {\n allowedPrivateKeyLengths: \"array\",\n wrapPrivateKey: \"boolean\",\n isTorsionFree: \"function\",\n clearCofactor: \"function\",\n allowInfinityPoint: \"boolean\",\n fromBytes: \"function\",\n toBytes: \"function\"\n });\n const { endo, Fp, a: a3 } = opts;\n if (endo) {\n if (!Fp.eql(a3, Fp.ZERO)) {\n throw new Error(\"invalid endomorphism, can only be defined for Koblitz curves that have a=0\");\n }\n if (typeof endo !== \"object\" || typeof endo.beta !== \"bigint\" || typeof endo.splitScalar !== \"function\") {\n throw new Error(\"invalid endomorphism, expected beta: bigint and splitScalar: function\");\n }\n }\n return Object.freeze({ ...opts });\n }\n function weierstrassPoints2(opts) {\n const CURVE = validatePointOpts2(opts);\n const { Fp } = CURVE;\n const Fn = Field2(CURVE.n, CURVE.nBitLength);\n const toBytes6 = CURVE.toBytes || ((_c, point, _isCompressed) => {\n const a3 = point.toAffine();\n return concatBytes4(Uint8Array.from([4]), Fp.toBytes(a3.x), Fp.toBytes(a3.y));\n });\n const fromBytes5 = CURVE.fromBytes || ((bytes) => {\n const tail = bytes.subarray(1);\n const x4 = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y6 = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x: x4, y: y6 };\n });\n function weierstrassEquation(x4) {\n const { a: a3, b: b4 } = CURVE;\n const x22 = Fp.sqr(x4);\n const x32 = Fp.mul(x22, x4);\n return Fp.add(Fp.add(x32, Fp.mul(x4, a3)), b4);\n }\n if (!Fp.eql(Fp.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))\n throw new Error(\"bad generator point: equation left != right\");\n function isWithinCurveOrder(num2) {\n return inRange2(num2, _1n10, CURVE.n);\n }\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n: N4 } = CURVE;\n if (lengths && typeof key !== \"bigint\") {\n if (isBytes5(key))\n key = bytesToHex4(key);\n if (typeof key !== \"string\" || !lengths.includes(key.length))\n throw new Error(\"invalid private key\");\n key = key.padStart(nByteLength * 2, \"0\");\n }\n let num2;\n try {\n num2 = typeof key === \"bigint\" ? key : bytesToNumberBE2(ensureBytes2(\"private key\", key, nByteLength));\n } catch (error) {\n throw new Error(\"invalid private key, expected hex or \" + nByteLength + \" bytes, got \" + typeof key);\n }\n if (wrapPrivateKey)\n num2 = mod2(num2, N4);\n aInRange2(\"private key\", num2, _1n10, N4);\n return num2;\n }\n function assertPrjPoint(other) {\n if (!(other instanceof Point3))\n throw new Error(\"ProjectivePoint expected\");\n }\n const toAffineMemo = memoized2((p4, iz) => {\n const { px: x4, py: y6, pz: z2 } = p4;\n if (Fp.eql(z2, Fp.ONE))\n return { x: x4, y: y6 };\n const is0 = p4.is0();\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z2);\n const ax = Fp.mul(x4, iz);\n const ay = Fp.mul(y6, iz);\n const zz = Fp.mul(z2, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error(\"invZ was invalid\");\n return { x: ax, y: ay };\n });\n const assertValidMemo = memoized2((p4) => {\n if (p4.is0()) {\n if (CURVE.allowInfinityPoint && !Fp.is0(p4.py))\n return;\n throw new Error(\"bad point: ZERO\");\n }\n const { x: x4, y: y6 } = p4.toAffine();\n if (!Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"bad point: x or y not FE\");\n const left = Fp.sqr(y6);\n const right = weierstrassEquation(x4);\n if (!Fp.eql(left, right))\n throw new Error(\"bad point: equation left != right\");\n if (!p4.isTorsionFree())\n throw new Error(\"bad point: not in prime-order subgroup\");\n return true;\n });\n class Point3 {\n constructor(px, py, pz) {\n this.px = px;\n this.py = py;\n this.pz = pz;\n if (px == null || !Fp.isValid(px))\n throw new Error(\"x required\");\n if (py == null || !Fp.isValid(py))\n throw new Error(\"y required\");\n if (pz == null || !Fp.isValid(pz))\n throw new Error(\"z required\");\n Object.freeze(this);\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p4) {\n const { x: x4, y: y6 } = p4 || {};\n if (!p4 || !Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"invalid affine point\");\n if (p4 instanceof Point3)\n throw new Error(\"projective point not allowed\");\n const is0 = (i3) => Fp.eql(i3, Fp.ZERO);\n if (is0(x4) && is0(y6))\n return Point3.ZERO;\n return new Point3(x4, y6, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p4) => p4.pz));\n return points.map((p4, i3) => p4.toAffine(toInv[i3])).map(Point3.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P2 = Point3.fromAffine(fromBytes5(ensureBytes2(\"pointHex\", hex)));\n P2.assertValidity();\n return P2;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point3.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // Multiscalar Multiplication\n static msm(points, scalars) {\n return pippenger2(Point3, Fn, points, scalars);\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n wnaf.setWindowSize(this, windowSize);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n assertValidMemo(this);\n }\n hasEvenY() {\n const { y: y6 } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y6);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U22 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U22;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point3(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a: a3, b: b4 } = CURVE;\n const b32 = Fp.mul(b4, _3n4);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n let t0 = Fp.mul(X1, X1);\n let t1 = Fp.mul(Y1, Y1);\n let t22 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3);\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a3, Z3);\n Y3 = Fp.mul(b32, t22);\n Y3 = Fp.add(X3, Y3);\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b32, Z3);\n t22 = Fp.mul(a3, t22);\n t3 = Fp.sub(t0, t22);\n t3 = Fp.mul(a3, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0);\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t22);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t22 = Fp.mul(Y1, Z1);\n t22 = Fp.add(t22, t22);\n t0 = Fp.mul(t22, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t22, t1);\n Z3 = Fp.add(Z3, Z3);\n Z3 = Fp.add(Z3, Z3);\n return new Point3(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n const a3 = CURVE.a;\n const b32 = Fp.mul(CURVE.b, _3n4);\n let t0 = Fp.mul(X1, X2);\n let t1 = Fp.mul(Y1, Y2);\n let t22 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2);\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2);\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t22);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2);\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t22);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a3, t4);\n X3 = Fp.mul(b32, t22);\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0);\n t1 = Fp.add(t1, t0);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.mul(b32, t4);\n t1 = Fp.add(t1, t22);\n t22 = Fp.sub(t0, t22);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.add(t4, t22);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4);\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0);\n return new Point3(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point3.ZERO);\n }\n wNAF(n2) {\n return wnaf.wNAFCached(this, n2, Point3.normalizeZ);\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(sc) {\n const { endo, n: N4 } = CURVE;\n aInRange2(\"scalar\", sc, _0n10, N4);\n const I2 = Point3.ZERO;\n if (sc === _0n10)\n return I2;\n if (this.is0() || sc === _1n10)\n return this;\n if (!endo || wnaf.hasPrecomputes(this))\n return wnaf.wNAFCachedUnsafe(this, sc, Point3.normalizeZ);\n let { k1neg, k1, k2neg, k2: k22 } = endo.splitScalar(sc);\n let k1p = I2;\n let k2p = I2;\n let d5 = this;\n while (k1 > _0n10 || k22 > _0n10) {\n if (k1 & _1n10)\n k1p = k1p.add(d5);\n if (k22 & _1n10)\n k2p = k2p.add(d5);\n d5 = d5.double();\n k1 >>= _1n10;\n k22 >>= _1n10;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point3(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n const { endo, n: N4 } = CURVE;\n aInRange2(\"scalar\", scalar, _1n10, N4);\n let point, fake;\n if (endo) {\n const { k1neg, k1, k2neg, k2: k22 } = endo.splitScalar(scalar);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k22);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point3(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n } else {\n const { p: p4, f: f7 } = this.wNAF(scalar);\n point = p4;\n fake = f7;\n }\n return Point3.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q2, a3, b4) {\n const G = Point3.BASE;\n const mul = (P2, a4) => a4 === _0n10 || a4 === _1n10 || !P2.equals(G) ? P2.multiplyUnsafe(a4) : P2.multiply(a4);\n const sum = mul(this, a3).add(mul(Q2, b4));\n return sum.is0() ? void 0 : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n return toAffineMemo(this, iz);\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n10)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point3, this);\n throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\");\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n10)\n return this;\n if (clearCofactor)\n return clearCofactor(Point3, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n abool2(\"isCompressed\", isCompressed);\n this.assertValidity();\n return toBytes6(Point3, this, isCompressed);\n }\n toHex(isCompressed = true) {\n abool2(\"isCompressed\", isCompressed);\n return bytesToHex4(this.toRawBytes(isCompressed));\n }\n }\n Point3.BASE = new Point3(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point3.ZERO = new Point3(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const _bits = CURVE.nBitLength;\n const wnaf = wNAF2(Point3, CURVE.endo ? Math.ceil(_bits / 2) : _bits);\n return {\n CURVE,\n ProjectivePoint: Point3,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder\n };\n }\n function validateOpts2(curve) {\n const opts = validateBasic2(curve);\n validateObject2(opts, {\n hash: \"hash\",\n hmac: \"function\",\n randomBytes: \"function\"\n }, {\n bits2int: \"function\",\n bits2int_modN: \"function\",\n lowS: \"boolean\"\n });\n return Object.freeze({ lowS: true, ...opts });\n }\n function weierstrass2(curveDef) {\n const CURVE = validateOpts2(curveDef);\n const { Fp, n: CURVE_ORDER } = CURVE;\n const compressedLen = Fp.BYTES + 1;\n const uncompressedLen = 2 * Fp.BYTES + 1;\n function modN2(a3) {\n return mod2(a3, CURVE_ORDER);\n }\n function invN(a3) {\n return invert2(a3, CURVE_ORDER);\n }\n const { ProjectivePoint: Point3, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder } = weierstrassPoints2({\n ...CURVE,\n toBytes(_c, point, isCompressed) {\n const a3 = point.toAffine();\n const x4 = Fp.toBytes(a3.x);\n const cat = concatBytes4;\n abool2(\"isCompressed\", isCompressed);\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 2 : 3]), x4);\n } else {\n return cat(Uint8Array.from([4]), x4, Fp.toBytes(a3.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (len === compressedLen && (head === 2 || head === 3)) {\n const x4 = bytesToNumberBE2(tail);\n if (!inRange2(x4, _1n10, Fp.ORDER))\n throw new Error(\"Point is not on curve\");\n const y22 = weierstrassEquation(x4);\n let y6;\n try {\n y6 = Fp.sqrt(y22);\n } catch (sqrtError) {\n const suffix = sqrtError instanceof Error ? \": \" + sqrtError.message : \"\";\n throw new Error(\"Point is not on curve\" + suffix);\n }\n const isYOdd = (y6 & _1n10) === _1n10;\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y6 = Fp.neg(y6);\n return { x: x4, y: y6 };\n } else if (len === uncompressedLen && head === 4) {\n const x4 = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y6 = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x: x4, y: y6 };\n } else {\n const cl = compressedLen;\n const ul = uncompressedLen;\n throw new Error(\"invalid Point, expected length of \" + cl + \", or uncompressed \" + ul + \", got \" + len);\n }\n }\n });\n const numToNByteStr = (num2) => bytesToHex4(numberToBytesBE2(num2, CURVE.nByteLength));\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n10;\n return number > HALF;\n }\n function normalizeS(s4) {\n return isBiggerThanHalfOrder(s4) ? modN2(-s4) : s4;\n }\n const slcNum = (b4, from14, to) => bytesToNumberBE2(b4.slice(from14, to));\n class Signature {\n constructor(r2, s4, recovery) {\n this.r = r2;\n this.s = s4;\n this.recovery = recovery;\n this.assertValidity();\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l6 = CURVE.nByteLength;\n hex = ensureBytes2(\"compactSignature\", hex, l6 * 2);\n return new Signature(slcNum(hex, 0, l6), slcNum(hex, l6, 2 * l6));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r: r2, s: s4 } = DER2.toSig(ensureBytes2(\"DER\", hex));\n return new Signature(r2, s4);\n }\n assertValidity() {\n aInRange2(\"r\", this.r, _1n10, CURVE_ORDER);\n aInRange2(\"s\", this.s, _1n10, CURVE_ORDER);\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r: r2, s: s4, recovery: rec } = this;\n const h4 = bits2int_modN(ensureBytes2(\"msgHash\", msgHash));\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error(\"recovery id invalid\");\n const radj = rec === 2 || rec === 3 ? r2 + CURVE.n : r2;\n if (radj >= Fp.ORDER)\n throw new Error(\"recovery id 2 or 3 invalid\");\n const prefix = (rec & 1) === 0 ? \"02\" : \"03\";\n const R3 = Point3.fromHex(prefix + numToNByteStr(radj));\n const ir = invN(radj);\n const u1 = modN2(-h4 * ir);\n const u2 = modN2(s4 * ir);\n const Q2 = Point3.BASE.multiplyAndAddUnsafe(R3, u1, u2);\n if (!Q2)\n throw new Error(\"point at infinify\");\n Q2.assertValidity();\n return Q2;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, modN2(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return hexToBytes4(this.toDERHex());\n }\n toDERHex() {\n return DER2.hexFromSig({ r: this.r, s: this.s });\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return hexToBytes4(this.toCompactHex());\n }\n toCompactHex() {\n return numToNByteStr(this.r) + numToNByteStr(this.s);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n } catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size\n * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.\n */\n randomPrivateKey: () => {\n const length = getMinHashLength2(CURVE.n);\n return mapHashToField2(CURVE.randomBytes(length), CURVE.n);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point3.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3));\n return point;\n }\n };\n function getPublicKey(privateKey, isCompressed = true) {\n return Point3.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n function isProbPub(item) {\n const arr = isBytes5(item);\n const str = typeof item === \"string\";\n const len = (arr || str) && item.length;\n if (arr)\n return len === compressedLen || len === uncompressedLen;\n if (str)\n return len === 2 * compressedLen || len === 2 * uncompressedLen;\n if (item instanceof Point3)\n return true;\n return false;\n }\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA))\n throw new Error(\"first arg must be private key\");\n if (!isProbPub(publicB))\n throw new Error(\"second arg must be public key\");\n const b4 = Point3.fromHex(publicB);\n return b4.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n const bits2int = CURVE.bits2int || function(bytes) {\n if (bytes.length > 8192)\n throw new Error(\"input is too large\");\n const num2 = bytesToNumberBE2(bytes);\n const delta = bytes.length * 8 - CURVE.nBitLength;\n return delta > 0 ? num2 >> BigInt(delta) : num2;\n };\n const bits2int_modN = CURVE.bits2int_modN || function(bytes) {\n return modN2(bits2int(bytes));\n };\n const ORDER_MASK = bitMask2(CURVE.nBitLength);\n function int2octets(num2) {\n aInRange2(\"num < 2^\" + CURVE.nBitLength, num2, _0n10, ORDER_MASK);\n return numberToBytesBE2(num2, CURVE.nByteLength);\n }\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if ([\"recovered\", \"canonical\"].some((k4) => k4 in opts))\n throw new Error(\"sign() legacy options not supported\");\n const { hash: hash3, randomBytes: randomBytes3 } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts;\n if (lowS == null)\n lowS = true;\n msgHash = ensureBytes2(\"msgHash\", msgHash);\n validateSigVerOpts2(opts);\n if (prehash)\n msgHash = ensureBytes2(\"prehashed msgHash\", hash3(msgHash));\n const h1int = bits2int_modN(msgHash);\n const d5 = normPrivateKeyToScalar(privateKey);\n const seedArgs = [int2octets(d5), int2octets(h1int)];\n if (ent != null && ent !== false) {\n const e2 = ent === true ? randomBytes3(Fp.BYTES) : ent;\n seedArgs.push(ensureBytes2(\"extraEntropy\", e2));\n }\n const seed = concatBytes4(...seedArgs);\n const m2 = h1int;\n function k2sig(kBytes) {\n const k4 = bits2int(kBytes);\n if (!isWithinCurveOrder(k4))\n return;\n const ik = invN(k4);\n const q3 = Point3.BASE.multiply(k4).toAffine();\n const r2 = modN2(q3.x);\n if (r2 === _0n10)\n return;\n const s4 = modN2(ik * modN2(m2 + r2 * d5));\n if (s4 === _0n10)\n return;\n let recovery = (q3.x === r2 ? 0 : 2) | Number(q3.y & _1n10);\n let normS = s4;\n if (lowS && isBiggerThanHalfOrder(s4)) {\n normS = normalizeS(s4);\n recovery ^= 1;\n }\n return new Signature(r2, normS, recovery);\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n function sign3(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts);\n const C = CURVE;\n const drbg = createHmacDrbg2(C.hash.outputLen, C.nByteLength, C.hmac);\n return drbg(seed, k2sig);\n }\n Point3.BASE._setWindowSize(8);\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = ensureBytes2(\"msgHash\", msgHash);\n publicKey = ensureBytes2(\"publicKey\", publicKey);\n const { lowS, prehash, format } = opts;\n validateSigVerOpts2(opts);\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n if (format !== void 0 && format !== \"compact\" && format !== \"der\")\n throw new Error(\"format must be compact or der\");\n const isHex2 = typeof sg === \"string\" || isBytes5(sg);\n const isObj = !isHex2 && !format && typeof sg === \"object\" && sg !== null && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\";\n if (!isHex2 && !isObj)\n throw new Error(\"invalid signature, expected Uint8Array, hex string or Signature instance\");\n let _sig = void 0;\n let P2;\n try {\n if (isObj)\n _sig = new Signature(sg.r, sg.s);\n if (isHex2) {\n try {\n if (format !== \"compact\")\n _sig = Signature.fromDER(sg);\n } catch (derError) {\n if (!(derError instanceof DER2.Err))\n throw derError;\n }\n if (!_sig && format !== \"der\")\n _sig = Signature.fromCompact(sg);\n }\n P2 = Point3.fromHex(publicKey);\n } catch (error) {\n return false;\n }\n if (!_sig)\n return false;\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r: r2, s: s4 } = _sig;\n const h4 = bits2int_modN(msgHash);\n const is = invN(s4);\n const u1 = modN2(h4 * is);\n const u2 = modN2(r2 * is);\n const R3 = Point3.BASE.multiplyAndAddUnsafe(P2, u1, u2)?.toAffine();\n if (!R3)\n return false;\n const v2 = modN2(R3.x);\n return v2 === r2;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign: sign3,\n verify,\n ProjectivePoint: Point3,\n Signature,\n utils\n };\n }\n var b2n, h2b, DERErr2, DER2, _0n10, _1n10, _2n7, _3n4, _4n4;\n var init_weierstrass2 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.8.1/node_modules/@noble/curves/esm/abstract/weierstrass.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_curve2();\n init_modular2();\n init_utils16();\n init_utils16();\n ({ bytesToNumberBE: b2n, hexToBytes: h2b } = utils_exports);\n DERErr2 = class extends Error {\n constructor(m2 = \"\") {\n super(m2);\n }\n };\n DER2 = {\n // asn.1 DER encoding utils\n Err: DERErr2,\n // Basic building block is TLV (Tag-Length-Value)\n _tlv: {\n encode: (tag, data) => {\n const { Err: E2 } = DER2;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length & 1)\n throw new E2(\"tlv.encode: unpadded data\");\n const dataLen = data.length / 2;\n const len = numberToHexUnpadded2(dataLen);\n if (len.length / 2 & 128)\n throw new E2(\"tlv.encode: long form length too big\");\n const lenLen = dataLen > 127 ? numberToHexUnpadded2(len.length / 2 | 128) : \"\";\n const t3 = numberToHexUnpadded2(tag);\n return t3 + lenLen + len + data;\n },\n // v - value, l - left bytes (unparsed)\n decode(tag, data) {\n const { Err: E2 } = DER2;\n let pos = 0;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length < 2 || data[pos++] !== tag)\n throw new E2(\"tlv.decode: wrong tlv\");\n const first = data[pos++];\n const isLong = !!(first & 128);\n let length = 0;\n if (!isLong)\n length = first;\n else {\n const lenLen = first & 127;\n if (!lenLen)\n throw new E2(\"tlv.decode(long): indefinite length not supported\");\n if (lenLen > 4)\n throw new E2(\"tlv.decode(long): byte length is too big\");\n const lengthBytes = data.subarray(pos, pos + lenLen);\n if (lengthBytes.length !== lenLen)\n throw new E2(\"tlv.decode: length bytes not complete\");\n if (lengthBytes[0] === 0)\n throw new E2(\"tlv.decode(long): zero leftmost byte\");\n for (const b4 of lengthBytes)\n length = length << 8 | b4;\n pos += lenLen;\n if (length < 128)\n throw new E2(\"tlv.decode(long): not minimal encoding\");\n }\n const v2 = data.subarray(pos, pos + length);\n if (v2.length !== length)\n throw new E2(\"tlv.decode: wrong value length\");\n return { v: v2, l: data.subarray(pos + length) };\n }\n },\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n _int: {\n encode(num2) {\n const { Err: E2 } = DER2;\n if (num2 < _0n10)\n throw new E2(\"integer: negative integers are not allowed\");\n let hex = numberToHexUnpadded2(num2);\n if (Number.parseInt(hex[0], 16) & 8)\n hex = \"00\" + hex;\n if (hex.length & 1)\n throw new E2(\"unexpected DER parsing assertion: unpadded hex\");\n return hex;\n },\n decode(data) {\n const { Err: E2 } = DER2;\n if (data[0] & 128)\n throw new E2(\"invalid signature integer: negative\");\n if (data[0] === 0 && !(data[1] & 128))\n throw new E2(\"invalid signature integer: unnecessary leading zero\");\n return b2n(data);\n }\n },\n toSig(hex) {\n const { Err: E2, _int: int, _tlv: tlv } = DER2;\n const data = typeof hex === \"string\" ? h2b(hex) : hex;\n abytes3(data);\n const { v: seqBytes, l: seqLeftBytes } = tlv.decode(48, data);\n if (seqLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n const { v: rBytes, l: rLeftBytes } = tlv.decode(2, seqBytes);\n const { v: sBytes, l: sLeftBytes } = tlv.decode(2, rLeftBytes);\n if (sLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n return { r: int.decode(rBytes), s: int.decode(sBytes) };\n },\n hexFromSig(sig) {\n const { _tlv: tlv, _int: int } = DER2;\n const rs = tlv.encode(2, int.encode(sig.r));\n const ss = tlv.encode(2, int.encode(sig.s));\n const seq = rs + ss;\n return tlv.encode(48, seq);\n }\n };\n _0n10 = BigInt(0);\n _1n10 = BigInt(1);\n _2n7 = BigInt(2);\n _3n4 = BigInt(3);\n _4n4 = BigInt(4);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.8.1/node_modules/@noble/curves/esm/_shortw_utils.js\n function getHash2(hash3) {\n return {\n hash: hash3,\n hmac: (key, ...msgs) => hmac2(hash3, key, concatBytes5(...msgs)),\n randomBytes: randomBytes2\n };\n }\n function createCurve2(curveDef, defHash) {\n const create2 = (hash3) => weierstrass2({ ...curveDef, ...getHash2(hash3) });\n return { ...create2(defHash), create: create2 };\n }\n var init_shortw_utils2 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.8.1/node_modules/@noble/curves/esm/_shortw_utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hmac2();\n init_utils17();\n init_weierstrass2();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.8.1/node_modules/@noble/curves/esm/p256.js\n var Fp256, CURVE_A, CURVE_B, p256;\n var init_p256 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.8.1/node_modules/@noble/curves/esm/p256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha2563();\n init_shortw_utils2();\n init_modular2();\n Fp256 = Field2(BigInt(\"0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff\"));\n CURVE_A = Fp256.create(BigInt(\"-3\"));\n CURVE_B = BigInt(\"0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b\");\n p256 = createCurve2({\n a: CURVE_A,\n // Equation params: a, b\n b: CURVE_B,\n Fp: Fp256,\n // Field: 2n**224n * (2n**32n-1n) + 2n**192n + 2n**96n-1n\n // Curve order, total count of valid points in the field\n n: BigInt(\"0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551\"),\n // Base (generator) point (x, y)\n Gx: BigInt(\"0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296\"),\n Gy: BigInt(\"0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5\"),\n h: BigInt(1),\n lowS: false\n }, sha2564);\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/webauthn.js\n function parseAsn1Signature(bytes) {\n const r_start = bytes[4] === 0 ? 5 : 4;\n const r_end = r_start + 32;\n const s_start = bytes[r_end + 2] === 0 ? r_end + 3 : r_end + 2;\n const r2 = BigInt(fromBytes4(bytes.slice(r_start, r_end)));\n const s4 = BigInt(fromBytes4(bytes.slice(s_start)));\n return {\n r: r2,\n s: s4 > p256.CURVE.n / 2n ? p256.CURVE.n - s4 : s4\n };\n }\n var init_webauthn = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/webauthn.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_p256();\n init_Hex2();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/WebAuthnP256.js\n function getCredentialRequestOptions(options) {\n const { credentialId, challenge: challenge2, rpId = window.location.hostname, userVerification = \"required\" } = options;\n return {\n publicKey: {\n ...credentialId ? {\n allowCredentials: [\n {\n id: toBytes4(credentialId),\n type: \"public-key\"\n }\n ]\n } : {},\n challenge: fromHex6(challenge2),\n rpId,\n userVerification\n }\n };\n }\n async function sign2(options) {\n const { getFn = window.navigator.credentials.get.bind(window.navigator.credentials), ...rest } = options;\n const requestOptions = getCredentialRequestOptions(rest);\n try {\n const credential = await getFn(requestOptions);\n if (!credential)\n throw new CredentialRequestFailedError();\n const response = credential.response;\n const clientDataJSON = String.fromCharCode(...new Uint8Array(response.clientDataJSON));\n const challengeIndex = clientDataJSON.indexOf('\"challenge\"');\n const typeIndex = clientDataJSON.indexOf('\"type\"');\n const signature = parseAsn1Signature(new Uint8Array(response.signature));\n return {\n metadata: {\n authenticatorData: fromBytes4(new Uint8Array(response.authenticatorData)),\n clientDataJSON,\n challengeIndex,\n typeIndex,\n userVerificationRequired: requestOptions.publicKey.userVerification === \"required\"\n },\n signature,\n raw: credential\n };\n } catch (error) {\n throw new CredentialRequestFailedError({\n cause: error\n });\n }\n }\n var createChallenge, CredentialRequestFailedError;\n var init_WebAuthnP256 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/WebAuthnP256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Base64();\n init_Bytes2();\n init_Errors2();\n init_Hex2();\n init_webauthn();\n createChallenge = Uint8Array.from([\n 105,\n 171,\n 180,\n 181,\n 160,\n 222,\n 75,\n 198,\n 42,\n 42,\n 32,\n 31,\n 141,\n 37,\n 186,\n 233\n ]);\n CredentialRequestFailedError = class extends BaseError7 {\n constructor({ cause } = {}) {\n super(\"Failed to request credential.\", {\n cause\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"WebAuthnP256.CredentialRequestFailedError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/webauthn-validation/signingMethods.js\n var webauthnSigningFunctions;\n var init_signingMethods = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/webauthn-validation/signingMethods.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_WebAuthnP256();\n init_esm();\n init_utils18();\n init_utils15();\n webauthnSigningFunctions = (credential, getFn, rpId, chain2, accountAddress, entityId, deferredActionData) => {\n const { id, publicKey } = credential;\n const sign3 = async ({ hash: hash3 }) => {\n const { metadata, signature } = await sign2({\n credentialId: id,\n getFn,\n challenge: hash3,\n rpId\n });\n return encodeAbiParameters([\n {\n name: \"params\",\n type: \"tuple\",\n components: [\n { name: \"authenticatorData\", type: \"bytes\" },\n { name: \"clientDataJSON\", type: \"string\" },\n { name: \"challengeIndex\", type: \"uint256\" },\n { name: \"typeIndex\", type: \"uint256\" },\n { name: \"r\", type: \"uint256\" },\n { name: \"s\", type: \"uint256\" }\n ]\n }\n ], [\n {\n authenticatorData: metadata.authenticatorData,\n clientDataJSON: metadata.clientDataJSON,\n challengeIndex: BigInt(metadata.challengeIndex),\n typeIndex: BigInt(metadata.typeIndex),\n r: signature.r,\n s: signature.s\n }\n ]);\n };\n return {\n id,\n publicKey,\n getDummySignature: () => \"0xff000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000170000000000000000000000000000000000000000000000000000000000000001949fc7c88032b9fcb5f6efc7a7b8c63668eae9871b765e23123bb473ff57aa831a7c0d9276168ebcc29f2875a0239cffdf2a9cd1c2007c5c77c071db9264df1d000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008a7b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a2273496a396e6164474850596759334b7156384f7a4a666c726275504b474f716d59576f4d57516869467773222c226f726967696e223a2268747470733a2f2f7369676e2e636f696e626173652e636f6d222c2263726f73734f726967696e223a66616c73657d00000000000000000000000000000000000000000000\",\n sign: sign3,\n signUserOperationHash: async (uoHash) => {\n let sig = await sign3({ hash: hashMessage({ raw: uoHash }) });\n if (deferredActionData) {\n sig = concatHex([deferredActionData, sig]);\n deferredActionData = void 0;\n }\n return concatHex([\"0xff\", sig]);\n },\n async signMessage({ message }) {\n const hash3 = hashTypedData({\n domain: {\n chainId: Number(chain2.id),\n verifyingContract: getDefaultWebauthnValidationModuleAddress(chain2),\n salt: concatHex([`0x${\"00\".repeat(12)}`, accountAddress])\n },\n types: {\n ReplaySafeHash: [{ name: \"hash\", type: \"bytes32\" }]\n },\n message: {\n hash: hashMessage(message)\n },\n primaryType: \"ReplaySafeHash\"\n });\n return pack1271Signature({\n validationSignature: await sign3({ hash: hash3 }),\n entityId\n });\n },\n signTypedData: async (typedDataDefinition) => {\n const isDeferredAction = typedDataDefinition?.primaryType === \"DeferredAction\" && // @ts-expect-error the domain type I think changed in viem, so this is not working correctly (TODO: fix this)\n \"verifyingContract\" in typedDataDefinition.domain && typedDataDefinition.domain.verifyingContract === accountAddress;\n const hash3 = await hashTypedData({\n domain: {\n chainId: Number(chain2.id),\n verifyingContract: getDefaultWebauthnValidationModuleAddress(chain2),\n salt: concatHex([`0x${\"00\".repeat(12)}`, accountAddress])\n },\n types: {\n ReplaySafeHash: [{ name: \"hash\", type: \"bytes32\" }]\n },\n message: {\n hash: hashTypedData(typedDataDefinition)\n },\n primaryType: \"ReplaySafeHash\"\n });\n const validationSignature = await sign3({ hash: hash3 });\n return isDeferredAction ? pack1271Signature({ validationSignature, entityId }) : validationSignature;\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/nativeSMASigner.js\n var nativeSMASigner;\n var init_nativeSMASigner = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/nativeSMASigner.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_utils18();\n init_utils15();\n nativeSMASigner = (signer, chain2, accountAddress, deferredActionData) => {\n const signingMethods = {\n prepareSign: async (request) => {\n let hash3;\n switch (request.type) {\n case \"personal_sign\":\n hash3 = hashMessage(request.data);\n break;\n case \"eth_signTypedData_v4\":\n const isDeferredAction = request.data?.primaryType === \"DeferredAction\" && request.data?.domain?.verifyingContract === accountAddress;\n if (isDeferredAction) {\n return request;\n } else {\n hash3 = await hashTypedData(request.data);\n break;\n }\n default:\n assertNeverSignatureRequestType();\n }\n return {\n type: \"eth_signTypedData_v4\",\n data: {\n domain: {\n chainId: Number(chain2.id),\n verifyingContract: accountAddress\n },\n types: {\n ReplaySafeHash: [{ name: \"hash\", type: \"bytes32\" }]\n },\n message: {\n hash: hash3\n },\n primaryType: \"ReplaySafeHash\"\n }\n };\n },\n formatSign: async (signature) => {\n return pack1271Signature({\n validationSignature: signature,\n entityId: DEFAULT_OWNER_ENTITY_ID\n });\n }\n };\n return {\n ...signingMethods,\n getDummySignature: () => {\n const sig = packUOSignature({\n // orderedHookData: [],\n validationSignature: \"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\"\n });\n return deferredActionData ? concatHex([deferredActionData, sig]) : sig;\n },\n signUserOperationHash: async (uoHash) => {\n let sig = await signer.signMessage({ raw: uoHash }).then((signature) => packUOSignature({\n // orderedHookData: [],\n validationSignature: signature\n }));\n if (deferredActionData) {\n sig = concatHex([deferredActionData, sig]);\n deferredActionData = void 0;\n }\n return sig;\n },\n // we apply the expected 1271 packing here since the account contract will expect it\n async signMessage({ message }) {\n const { type, data } = await signingMethods.prepareSign({\n type: \"personal_sign\",\n data: message\n });\n if (type !== \"eth_signTypedData_v4\") {\n throw new Error(\"Invalid signature request type\");\n }\n const sig = await signer.signTypedData(data);\n return signingMethods.formatSign(sig);\n },\n // TODO: maybe move \"sign deferred actions\" to a separate function?\n // we don't apply the expected 1271 packing since deferred sigs use typed data sigs and don't expect the 1271 packing\n signTypedData: async (typedDataDefinition) => {\n const { type, data } = await signingMethods.prepareSign({\n type: \"eth_signTypedData_v4\",\n data: typedDataDefinition\n });\n if (type !== \"eth_signTypedData_v4\") {\n throw new Error(\"Invalid signature request type\");\n }\n const sig = await signer.signTypedData(data);\n const isDeferredAction = typedDataDefinition.primaryType === \"DeferredAction\" && typedDataDefinition.domain != null && // @ts-expect-error the domain type I think changed in viem, so this is not working correctly (TODO: fix this)\n \"verifyingContract\" in typedDataDefinition.domain && typedDataDefinition.domain.verifyingContract === accountAddress;\n return isDeferredAction ? concat([SignatureType2.EOA, sig]) : signingMethods.formatSign(sig);\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/common/modularAccountV2Base.js\n async function createMAv2Base(config2) {\n let { transport, chain: chain2, entryPoint = getEntryPoint(chain2, { version: \"0.7.0\" }), signerEntity = {\n isGlobalValidation: true,\n entityId: DEFAULT_OWNER_ENTITY_ID\n }, signerEntity: { isGlobalValidation = true, entityId = DEFAULT_OWNER_ENTITY_ID } = {}, accountAddress, deferredAction, ...remainingToSmartContractAccountParams } = config2;\n const signer = \"signer\" in config2 ? config2.signer : void 0;\n const credential = \"credential\" in config2 ? config2.credential : void 0;\n const getFn = \"getFn\" in config2 ? config2.getFn : void 0;\n const rpId = \"rpId\" in config2 ? config2.rpId : void 0;\n if (entityId > Number(maxUint32)) {\n throw new InvalidEntityIdError(entityId);\n }\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const entryPointContract = getContract({\n address: entryPoint.address,\n abi: entryPoint.abi,\n client\n });\n let nonce;\n let deferredActionData;\n let hasAssociatedExecHooks = false;\n if (deferredAction) {\n let deferredActionNonce = 0n;\n ({\n entityId,\n isGlobalValidation,\n nonce: deferredActionNonce\n } = parseDeferredAction(deferredAction));\n const nextNonceForDeferredAction = await entryPointContract.read.getNonce([\n accountAddress,\n deferredActionNonce >> 64n\n ]);\n if (deferredActionNonce === nextNonceForDeferredAction) {\n ({ nonce, deferredActionData, hasAssociatedExecHooks } = parseDeferredAction(deferredAction));\n } else if (deferredActionNonce > nextNonceForDeferredAction) {\n throw new InvalidDeferredActionNonce();\n }\n }\n const encodeExecute = async ({ target, data, value }) => await encodeCallData(encodeFunctionData({\n abi: modularAccountAbi,\n functionName: \"execute\",\n args: [target, value ?? 0n, data]\n }));\n const encodeBatchExecute = async (txs) => await encodeCallData(encodeFunctionData({\n abi: modularAccountAbi,\n functionName: \"executeBatch\",\n args: [\n txs.map((tx) => ({\n target: tx.target,\n data: tx.data,\n value: tx.value ?? 0n\n }))\n ]\n }));\n const isAccountDeployed = async () => !!await client.getCode({ address: accountAddress });\n const getNonce = async (nonceKey = 0n) => {\n if (nonce) {\n const tempNonce = nonce;\n nonce = void 0;\n return tempNonce;\n }\n if (nonceKey > maxUint152) {\n throw new InvalidNonceKeyError(nonceKey);\n }\n const fullNonceKey = (nonceKey << 40n) + (BigInt(entityId) << 8n) + (isGlobalValidation ? 1n : 0n);\n return entryPointContract.read.getNonce([\n accountAddress,\n fullNonceKey\n ]);\n };\n const accountContract = getContract({\n address: accountAddress,\n abi: modularAccountAbi,\n client\n });\n const getExecutionData = async (selector) => {\n if (!await isAccountDeployed()) {\n return {\n module: zeroAddress,\n skipRuntimeValidation: false,\n allowGlobalValidation: false,\n executionHooks: []\n };\n }\n return await accountContract.read.getExecutionData([selector]);\n };\n const getValidationData = async (args) => {\n if (!await isAccountDeployed()) {\n return {\n validationHooks: [],\n executionHooks: [],\n selectors: [],\n validationFlags: 0\n };\n }\n const { validationModuleAddress, entityId: entityId2 } = args;\n return await accountContract.read.getValidationData([\n serializeModuleEntity({\n moduleAddress: validationModuleAddress ?? zeroAddress,\n entityId: entityId2 ?? Number(maxUint32)\n })\n ]);\n };\n const encodeCallData = async (callData) => {\n const validationData = await getValidationData({\n entityId: Number(entityId)\n });\n if (hasAssociatedExecHooks) {\n hasAssociatedExecHooks = false;\n return concatHex([executeUserOpSelector, callData]);\n }\n if (validationData.executionHooks.length) {\n return concatHex([executeUserOpSelector, callData]);\n }\n return callData;\n };\n const baseAccount = await toSmartContractAccount({\n ...remainingToSmartContractAccountParams,\n transport,\n chain: chain2,\n entryPoint,\n accountAddress,\n encodeExecute,\n encodeBatchExecute,\n getNonce,\n ...signer ? entityId === DEFAULT_OWNER_ENTITY_ID ? nativeSMASigner(signer, chain2, accountAddress, deferredActionData) : singleSignerMessageSigner(signer, chain2, accountAddress, entityId, deferredActionData) : webauthnSigningFunctions(\n // credential required for webauthn mode is checked at modularAccountV2 creation level\n credential,\n getFn,\n rpId,\n chain2,\n accountAddress,\n entityId,\n deferredActionData\n )\n });\n if (!signer) {\n return {\n ...baseAccount,\n signerEntity,\n getExecutionData,\n getValidationData,\n encodeCallData\n };\n }\n return {\n ...baseAccount,\n getSigner: () => signer,\n signerEntity,\n getExecutionData,\n getValidationData,\n encodeCallData\n };\n }\n var executeUserOpSelector;\n var init_modularAccountV2Base = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/common/modularAccountV2Base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_modularAccountAbi();\n init_utils14();\n init_signer5();\n init_signingMethods();\n init_utils18();\n init_nativeSMASigner();\n executeUserOpSelector = \"0x8DD7712F\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/semiModularAccountStorageAbi.js\n var semiModularAccountStorageAbi;\n var init_semiModularAccountStorageAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/semiModularAccountStorageAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n semiModularAccountStorageAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"executionInstallDelegate\",\n type: \"address\",\n internalType: \"contract ExecutionInstallDelegate\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"fallback\",\n stateMutability: \"payable\"\n },\n {\n type: \"receive\",\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"accountId\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"result\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeWithRuntimeValidation\",\n inputs: [\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"authorization\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"getExecutionData\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ExecutionDataView\",\n components: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getFallbackSignerData\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getValidationData\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ValidationDataView\",\n components: [\n {\n name: \"validationFlags\",\n type: \"uint8\",\n internalType: \"ValidationFlags\"\n },\n {\n name: \"validationHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initialize\",\n inputs: [\n {\n name: \"initialSigner\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleInstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installValidation\",\n inputs: [\n {\n name: \"validationConfig\",\n type: \"bytes25\",\n internalType: \"ValidationConfig\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"installData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hooks\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n {\n name: \"hash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"performCreate\",\n inputs: [\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"isCreate2\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"salt\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [\n {\n name: \"createdAddr\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [\n {\n name: \"interfaceId\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"uninstallExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleUninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallValidation\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"uninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hookUninstallData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateFallbackSignerData\",\n inputs: [\n {\n name: \"fallbackSigner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"isDisabled\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"userOpHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ExecutionInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ExecutionUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"FallbackSignerUpdated\",\n inputs: [\n {\n name: \"newFallbackSigner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"isDisabled\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"ArrayLengthMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"CreateFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredActionSignatureInvalid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredValidationHasValidationHooks\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ExecutionHookAlreadySet\",\n inputs: [\n {\n name: \"hookConfig\",\n type: \"bytes25\",\n internalType: \"HookConfig\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"FallbackSignerDisabled\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"FallbackSignerMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"FallbackValidationInstallationNotAllowed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InterfaceNotSupported\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidInitialization\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidSignatureType\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ModuleInstallCallbackFailed\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"revertReason\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NonCanonicalEncoding\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"NotEntryPoint\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"PreValidationHookDuplicate\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"RequireUserOperationContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SegmentOutOfOrder\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SelfCallRecursionDepthExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SignatureValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnauthorizedCallContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UnexpectedAggregator\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"aggregator\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnrecognizedFunction\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UpgradeFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UserOpValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAlreadySet\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAssocHookLimitExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationEntityIdInUse\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationFunctionMissing\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationSignatureSegmentMissing\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/utils.js\n async function getMAV2UpgradeToData(client, args) {\n const { account: account_ = client.account } = args;\n if (!account_) {\n throw new AccountNotFoundError2();\n }\n const account = account_;\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const initData = encodeFunctionData({\n abi: semiModularAccountStorageAbi,\n functionName: \"initialize\",\n args: [await account.getSigner().getAddress()]\n });\n return {\n implAddress: getDefaultSMAV2StorageAddress(chain2),\n initializationData: initData,\n createModularAccountV2FromExisting: async () => createModularAccountV2({\n transport: custom(client.transport),\n chain: chain2,\n signer: account.getSigner(),\n accountAddress: account.address\n })\n };\n }\n var DEFAULT_OWNER_ENTITY_ID, packUOSignature, pack1271Signature, getDefaultWebAuthnMAV2FactoryAddress, getDefaultMAV2FactoryAddress, getDefaultSMAV2BytecodeAddress, getDefaultSMAV2StorageAddress, mintableERC20Abi, parseDeferredAction, assertNeverSignatureRequestType;\n var init_utils18 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_exports3();\n init_modularAccountV2();\n init_semiModularAccountStorageAbi();\n init_esm6();\n DEFAULT_OWNER_ENTITY_ID = 0;\n packUOSignature = ({\n // orderedHookData, TODO: integrate in next iteration of MAv2 sdk\n validationSignature\n }) => {\n return concat([\"0xFF\", \"0x00\", validationSignature]);\n };\n pack1271Signature = ({ validationSignature, entityId }) => {\n return concat([\n \"0x00\",\n toHex(entityId, { size: 4 }),\n \"0xFF\",\n \"0x00\",\n // EOA type signature\n validationSignature\n ]);\n };\n getDefaultWebAuthnMAV2FactoryAddress = () => {\n return \"0x55010E571dCf07e254994bfc88b9C1C8FAe31960\";\n };\n getDefaultMAV2FactoryAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x00000000000017c61b5bEe81050EC8eFc9c6fecd\";\n }\n };\n getDefaultSMAV2BytecodeAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x000000000000c5A9089039570Dd36455b5C07383\";\n }\n };\n getDefaultSMAV2StorageAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x0000000000006E2f9d80CaEc0Da6500f005EB25A\";\n }\n };\n mintableERC20Abi = parseAbi([\n \"function transfer(address to, uint256 amount) external\",\n \"function mint(address to, uint256 amount) external\",\n \"function balanceOf(address target) external returns (uint256)\"\n ]);\n parseDeferredAction = (deferredAction) => {\n return {\n entityId: hexToNumber(`0x${deferredAction.slice(42, 50)}`),\n isGlobalValidation: hexToNumber(`0x${deferredAction.slice(50, 52)}`) % 2 === 1,\n nonce: BigInt(`0x${deferredAction.slice(4, 68)}`),\n deferredActionData: `0x${deferredAction.slice(68)}`,\n hasAssociatedExecHooks: deferredAction[3] === \"1\"\n };\n };\n assertNeverSignatureRequestType = () => {\n throw new Error(\"Invalid signature request type \");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/predictAddress.js\n function predictModularAccountV2Address(params) {\n const { factoryAddress, salt, implementationAddress } = params;\n let combinedSalt;\n let initcode;\n switch (params.type) {\n case \"SMA\":\n combinedSalt = getCombinedSaltK1(params.ownerAddress, salt, 4294967295);\n const immutableArgs = params.ownerAddress;\n initcode = getProxyBytecodeWithImmutableArgs(implementationAddress, immutableArgs);\n break;\n case \"MA\":\n combinedSalt = getCombinedSaltK1(params.ownerAddress, salt, params.entityId);\n initcode = getProxyBytecode(implementationAddress);\n break;\n case \"WebAuthn\":\n const { ownerPublicKey: { x: x4, y: y6 } } = params;\n combinedSalt = keccak256(encodePacked([\"uint256\", \"uint256\", \"uint256\", \"uint32\"], [x4, y6, salt, params.entityId]));\n initcode = getProxyBytecode(implementationAddress);\n break;\n default:\n return assertNeverModularAccountV2Type(params);\n }\n return getContractAddress2({\n from: factoryAddress,\n opcode: \"CREATE2\",\n salt: combinedSalt,\n bytecode: initcode\n });\n }\n function getCombinedSaltK1(ownerAddress, salt, entityId) {\n return keccak256(encodePacked([\"address\", \"uint256\", \"uint32\"], [ownerAddress, salt, entityId]));\n }\n function getProxyBytecode(implementationAddress) {\n return `0x603d3d8160223d3973${implementationAddress.slice(2)}60095155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3`;\n }\n function getProxyBytecodeWithImmutableArgs(implementationAddress, immutableArgs) {\n return `0x6100513d8160233d3973${implementationAddress.slice(2)}60095155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3${immutableArgs.slice(2)}`;\n }\n function assertNeverModularAccountV2Type(_2) {\n throw new Error(\"Unknown modular account type in predictModularAccountV2Address\");\n }\n var init_predictAddress2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/predictAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n }\n });\n\n // ../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/utils.js\n function bytesToHex5(bytes) {\n return `0x${bytesToHex2(bytes)}`;\n }\n function hexToBytes5(value) {\n return hexToBytes2(value.slice(2));\n }\n var init_utils19 = __esm({\n \"../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n }\n });\n\n // ../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/publicKey.js\n function parsePublicKey(publicKey) {\n const bytes = typeof publicKey === \"string\" ? hexToBytes5(publicKey) : publicKey;\n const offset = bytes.length === 65 ? 1 : 0;\n const x4 = bytes.slice(offset, 32 + offset);\n const y6 = bytes.slice(32 + offset, 64 + offset);\n return {\n prefix: bytes.length === 65 ? bytes[0] : void 0,\n x: BigInt(bytesToHex5(x4)),\n y: BigInt(bytesToHex5(y6))\n };\n }\n var init_publicKey = __esm({\n \"../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/publicKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils19();\n }\n });\n\n // ../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/index.js\n var init_esm8 = __esm({\n \"../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_publicKey();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/errors.js\n var WebauthnCredentialsRequiredError, SignerRequiredFor7702Error, SignerRequiredForDefaultError;\n var init_errors8 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n WebauthnCredentialsRequiredError = class extends BaseError4 {\n constructor() {\n super(\"Webauthn credentials are required to create a Webauthn Modular Account V2\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"WebauthnCredentialsRequiredError\"\n });\n }\n };\n SignerRequiredFor7702Error = class extends BaseError4 {\n constructor() {\n super(\"A signer is required to create a 7702 Modular Account V2\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignerRequiredFor7702Error\"\n });\n }\n };\n SignerRequiredForDefaultError = class extends BaseError4 {\n constructor() {\n super(\"A signer is required to create a default Modular Account V2\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignerRequiredForDefaultError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/modularAccountV2.js\n async function createModularAccountV2(config2) {\n const { transport, chain: chain2, accountAddress: _accountAddress, entryPoint = getEntryPoint(chain2, { version: \"0.7.0\" }), signerEntity = {\n isGlobalValidation: true,\n entityId: DEFAULT_OWNER_ENTITY_ID\n }, signerEntity: { entityId = DEFAULT_OWNER_ENTITY_ID } = {}, deferredAction } = config2;\n const signer = \"signer\" in config2 ? config2.signer : void 0;\n const credential = \"credential\" in config2 ? config2.credential : void 0;\n const getFn = \"getFn\" in config2 ? config2.getFn : void 0;\n const rpId = \"rpId\" in config2 ? config2.rpId : void 0;\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const accountFunctions = await (async () => {\n switch (config2.mode) {\n case \"webauthn\": {\n if (!credential)\n throw new WebauthnCredentialsRequiredError();\n const publicKey = credential.publicKey;\n const { x: x4, y: y6 } = parsePublicKey(publicKey);\n const { salt = 0n, factoryAddress = getDefaultWebAuthnMAV2FactoryAddress(), initCode } = config2;\n const getAccountInitCode = async () => {\n if (initCode) {\n return initCode;\n }\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: accountFactoryAbi,\n functionName: \"createWebAuthnAccount\",\n args: [x4, y6, salt, entityId]\n })\n ]);\n };\n const accountAddress = await getAccountAddress({\n client,\n entryPoint,\n accountAddress: _accountAddress,\n getAccountInitCode\n });\n return {\n getAccountInitCode,\n accountAddress\n };\n }\n case \"7702\": {\n const getAccountInitCode = async () => {\n return \"0x\";\n };\n if (!signer)\n throw new SignerRequiredFor7702Error();\n const signerAddress = await signer.getAddress();\n const accountAddress = _accountAddress ?? signerAddress;\n if (entityId === DEFAULT_OWNER_ENTITY_ID && signerAddress !== accountAddress) {\n throw new EntityIdOverrideError();\n }\n const implementation = \"0x69007702764179f14F51cdce752f4f775d74E139\";\n const getImplementationAddress = async () => implementation;\n return {\n getAccountInitCode,\n accountAddress,\n getImplementationAddress\n };\n }\n case \"default\":\n case void 0: {\n if (!signer)\n throw new SignerRequiredForDefaultError();\n const { salt = 0n, factoryAddress = getDefaultMAV2FactoryAddress(chain2), implementationAddress = getDefaultSMAV2BytecodeAddress(chain2), initCode } = config2;\n const signerAddress = await signer.getAddress();\n const getAccountInitCode = async () => {\n if (initCode) {\n return initCode;\n }\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: accountFactoryAbi,\n functionName: \"createSemiModularAccount\",\n args: [await signer.getAddress(), salt]\n })\n ]);\n };\n const accountAddress = _accountAddress ?? predictModularAccountV2Address({\n factoryAddress,\n implementationAddress,\n salt,\n type: \"SMA\",\n ownerAddress: signerAddress\n });\n return {\n getAccountInitCode,\n accountAddress\n };\n }\n default:\n assertNever(config2);\n }\n })();\n if (!signer) {\n if (!credential)\n throw new WebauthnCredentialsRequiredError();\n return await createMAv2Base({\n source: \"ModularAccountV2\",\n // TO DO: remove need to pass in source?\n transport,\n chain: chain2,\n entryPoint,\n signerEntity,\n deferredAction,\n credential,\n getFn,\n rpId,\n ...accountFunctions\n });\n }\n return await createMAv2Base({\n source: \"ModularAccountV2\",\n // TO DO: remove need to pass in source?\n transport,\n chain: chain2,\n signer,\n entryPoint,\n signerEntity,\n deferredAction,\n ...accountFunctions\n });\n }\n function assertNever(_valid) {\n throw new InvalidModularAccountV2Mode();\n }\n var init_modularAccountV2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/modularAccountV2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_accountFactoryAbi();\n init_utils18();\n init_modularAccountV2Base();\n init_utils18();\n init_predictAddress2();\n init_esm8();\n init_errors8();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/client/client.js\n async function createModularAccountV2Client(config2) {\n const { transport, chain: chain2 } = config2;\n let account;\n if (config2.mode === \"webauthn\") {\n account = await createModularAccountV2(config2);\n } else {\n account = await createModularAccountV2(config2);\n }\n const middlewareToAppend = await (async () => {\n switch (config2.mode) {\n case \"7702\":\n return {\n gasEstimator: default7702GasEstimator(config2.gasEstimator),\n signUserOperation: default7702UserOpSigner(config2.signUserOperation)\n };\n case \"webauthn\":\n return {\n gasEstimator: webauthnGasEstimator(config2.gasEstimator)\n };\n case \"default\":\n default:\n return {};\n }\n })();\n if (isAlchemyTransport2(transport, chain2)) {\n return createAlchemySmartAccountClient2({\n ...config2,\n transport,\n chain: chain2,\n account,\n ...middlewareToAppend\n });\n }\n return createSmartAccountClient({\n ...config2,\n account,\n ...middlewareToAppend\n });\n }\n var init_client4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/client/client.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_modularAccountV2();\n init_exports3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/semiModularAccountBytecodeAbi.js\n var semiModularAccountBytecodeAbi;\n var init_semiModularAccountBytecodeAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/semiModularAccountBytecodeAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n semiModularAccountBytecodeAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"executionInstallDelegate\",\n type: \"address\",\n internalType: \"contract ExecutionInstallDelegate\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"fallback\",\n stateMutability: \"payable\"\n },\n {\n type: \"receive\",\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"accountId\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"result\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeWithRuntimeValidation\",\n inputs: [\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"authorization\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"getExecutionData\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ExecutionDataView\",\n components: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getFallbackSignerData\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getValidationData\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ValidationDataView\",\n components: [\n {\n name: \"validationFlags\",\n type: \"uint8\",\n internalType: \"ValidationFlags\"\n },\n {\n name: \"validationHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"installExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleInstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installValidation\",\n inputs: [\n {\n name: \"validationConfig\",\n type: \"bytes25\",\n internalType: \"ValidationConfig\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"installData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hooks\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n {\n name: \"hash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"performCreate\",\n inputs: [\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"isCreate2\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"salt\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [\n {\n name: \"createdAddr\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [\n {\n name: \"interfaceId\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"uninstallExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleUninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallValidation\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"uninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hookUninstallData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateFallbackSignerData\",\n inputs: [\n {\n name: \"fallbackSigner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"isDisabled\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"userOpHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ExecutionInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ExecutionUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"FallbackSignerUpdated\",\n inputs: [\n {\n name: \"newFallbackSigner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"isDisabled\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"ArrayLengthMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"CreateFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredActionSignatureInvalid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredValidationHasValidationHooks\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ExecutionHookAlreadySet\",\n inputs: [\n {\n name: \"hookConfig\",\n type: \"bytes25\",\n internalType: \"HookConfig\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"FallbackSignerDisabled\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"FallbackSignerMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"FallbackValidationInstallationNotAllowed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InterfaceNotSupported\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidInitialization\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidSignatureType\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ModuleInstallCallbackFailed\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"revertReason\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NonCanonicalEncoding\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"NotEntryPoint\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"PreValidationHookDuplicate\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"RequireUserOperationContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SegmentOutOfOrder\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SelfCallRecursionDepthExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SignatureValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnauthorizedCallContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UnexpectedAggregator\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"aggregator\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnrecognizedFunction\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UpgradeFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UserOpValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAlreadySet\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAssocHookLimitExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationEntityIdInUse\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationFunctionMissing\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationSignatureSegmentMissing\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/index.js\n var src_exports = {};\n __export(src_exports, {\n AccountVersionRegistry: () => AccountVersionRegistry,\n IAccountLoupeAbi: () => IAccountLoupeAbi,\n IPluginAbi: () => IPluginAbi,\n IPluginManagerAbi: () => IPluginManagerAbi,\n IStandardExecutorAbi: () => IStandardExecutorAbi,\n InvalidAggregatedSignatureError: () => InvalidAggregatedSignatureError,\n InvalidContextSignatureError: () => InvalidContextSignatureError,\n LightAccountUnsupported1271Factories: () => LightAccountUnsupported1271Factories,\n LightAccountUnsupported1271Impls: () => LightAccountUnsupported1271Impls,\n MultiOwnerModularAccountFactoryAbi: () => MultiOwnerModularAccountFactoryAbi,\n MultiOwnerPlugin: () => MultiOwnerPlugin,\n MultiOwnerPluginAbi: () => MultiOwnerPluginAbi,\n MultiOwnerPluginExecutionFunctionAbi: () => MultiOwnerPluginExecutionFunctionAbi,\n MultisigAccountExpectedError: () => MultisigAccountExpectedError,\n MultisigMissingSignatureError: () => MultisigMissingSignatureError,\n MultisigModularAccountFactoryAbi: () => MultisigModularAccountFactoryAbi,\n MultisigPlugin: () => MultisigPlugin,\n MultisigPluginAbi: () => MultisigPluginAbi,\n MultisigPluginExecutionFunctionAbi: () => MultisigPluginExecutionFunctionAbi,\n SessionKeyAccessListType: () => SessionKeyAccessListType,\n SessionKeyPermissionsBuilder: () => SessionKeyPermissionsBuilder,\n SessionKeyPlugin: () => SessionKeyPlugin,\n SessionKeyPluginAbi: () => SessionKeyPluginAbi,\n SessionKeyPluginExecutionFunctionAbi: () => SessionKeyPluginExecutionFunctionAbi,\n SessionKeySigner: () => SessionKeySigner,\n UpgradeableModularAccountAbi: () => UpgradeableModularAccountAbi,\n accountLoupeActions: () => accountLoupeActions,\n buildSessionKeysToRemoveStruct: () => buildSessionKeysToRemoveStruct,\n combineSignatures: () => combineSignatures,\n createLightAccount: () => createLightAccount,\n createLightAccountAlchemyClient: () => createLightAccountAlchemyClient,\n createLightAccountClient: () => createLightAccountClient,\n createModularAccountAlchemyClient: () => createModularAccountAlchemyClient,\n createModularAccountV2: () => createModularAccountV2,\n createModularAccountV2Client: () => createModularAccountV2Client,\n createMultiOwnerLightAccount: () => createMultiOwnerLightAccount,\n createMultiOwnerLightAccountAlchemyClient: () => createMultiOwnerLightAccountAlchemyClient,\n createMultiOwnerLightAccountClient: () => createMultiOwnerLightAccountClient,\n createMultiOwnerModularAccount: () => createMultiOwnerModularAccount,\n createMultiOwnerModularAccountClient: () => createMultiOwnerModularAccountClient,\n createMultisigAccountAlchemyClient: () => createMultisigAccountAlchemyClient,\n createMultisigModularAccount: () => createMultisigModularAccount,\n createMultisigModularAccountClient: () => createMultisigModularAccountClient,\n defaultLightAccountVersion: () => defaultLightAccountVersion,\n formatSignatures: () => formatSignatures,\n getDefaultLightAccountFactoryAddress: () => getDefaultLightAccountFactoryAddress,\n getDefaultMultiOwnerLightAccountFactoryAddress: () => getDefaultMultiOwnerLightAccountFactoryAddress,\n getDefaultMultiOwnerModularAccountFactoryAddress: () => getDefaultMultiOwnerModularAccountFactoryAddress,\n getDefaultMultisigModularAccountFactoryAddress: () => getDefaultMultisigModularAccountFactoryAddress,\n getLightAccountVersionForAccount: () => getLightAccountVersionForAccount,\n getMAInitializationData: () => getMAInitializationData,\n getMAV2UpgradeToData: () => getMAV2UpgradeToData,\n getMSCAUpgradeToData: () => getMSCAUpgradeToData,\n getSignerType: () => getSignerType,\n installPlugin: () => installPlugin,\n lightAccountClientActions: () => lightAccountClientActions,\n multiOwnerLightAccountClientActions: () => multiOwnerLightAccountClientActions,\n multiOwnerPluginActions: () => multiOwnerPluginActions2,\n multisigPluginActions: () => multisigPluginActions2,\n multisigSignatureMiddleware: () => multisigSignatureMiddleware,\n pluginManagerActions: () => pluginManagerActions,\n predictLightAccountAddress: () => predictLightAccountAddress,\n predictModularAccountV2Address: () => predictModularAccountV2Address,\n predictMultiOwnerLightAccountAddress: () => predictMultiOwnerLightAccountAddress,\n semiModularAccountBytecodeAbi: () => semiModularAccountBytecodeAbi,\n sessionKeyPluginActions: () => sessionKeyPluginActions2,\n splitAggregatedSignature: () => splitAggregatedSignature,\n standardExecutor: () => standardExecutor,\n transferLightAccountOwnership: () => transferOwnership,\n updateMultiOwnerLightAccountOwners: () => updateOwners\n });\n var init_src = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account3();\n init_transferOwnership();\n init_alchemyClient();\n init_client2();\n init_multiOwnerAlchemyClient();\n init_lightAccount();\n init_predictAddress();\n init_predictAddress();\n init_utils10();\n init_multiOwner();\n init_updateOwners();\n init_multiOwnerLightAccount();\n init_multiOwnerLightAccount2();\n init_IAccountLoupe();\n init_IPlugin();\n init_IPluginManager();\n init_IStandardExecutor();\n init_MultiOwnerModularAccountFactory();\n init_MultisigModularAccountFactory();\n init_UpgradeableModularAccount();\n init_decorator();\n init_multiOwnerAccount();\n init_multisigAccount();\n init_standardExecutor();\n init_alchemyClient2();\n init_client3();\n init_multiSigAlchemyClient();\n init_errors6();\n init_decorator2();\n init_installPlugin();\n init_extension();\n init_plugin();\n init_multisig();\n init_utils12();\n init_extension3();\n init_permissions();\n init_plugin3();\n init_signer4();\n init_utils13();\n init_utils11();\n init_modularAccountV2();\n init_client4();\n init_utils18();\n init_predictAddress2();\n init_semiModularAccountBytecodeAbi();\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/get-alchemy-chain-config.js\n var require_get_alchemy_chain_config = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/get-alchemy-chain-config.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getAlchemyChainConfig = getAlchemyChainConfig;\n var infra_1 = (init_exports2(), __toCommonJS(exports_exports2));\n function getAlchemyChainConfig(chainId) {\n const supportedChains = [\n infra_1.arbitrum,\n infra_1.arbitrumGoerli,\n infra_1.arbitrumNova,\n infra_1.arbitrumSepolia,\n infra_1.base,\n infra_1.baseGoerli,\n infra_1.baseSepolia,\n infra_1.fraxtal,\n infra_1.fraxtalSepolia,\n infra_1.goerli,\n infra_1.mainnet,\n infra_1.optimism,\n infra_1.optimismGoerli,\n infra_1.optimismSepolia,\n infra_1.polygon,\n infra_1.polygonAmoy,\n infra_1.polygonMumbai,\n infra_1.sepolia,\n infra_1.shape,\n infra_1.shapeSepolia,\n infra_1.worldChain,\n infra_1.worldChainSepolia,\n infra_1.zora,\n infra_1.zoraSepolia,\n infra_1.beraChainBartio,\n infra_1.opbnbMainnet,\n infra_1.opbnbTestnet,\n infra_1.soneiumMinato,\n infra_1.soneiumMainnet,\n infra_1.unichainMainnet,\n infra_1.unichainSepolia,\n infra_1.inkMainnet,\n infra_1.inkSepolia,\n infra_1.mekong,\n infra_1.monadTestnet,\n infra_1.openlootSepolia,\n infra_1.gensynTestnet,\n infra_1.riseTestnet,\n infra_1.storyMainnet,\n infra_1.storyAeneid,\n infra_1.celoAlfajores,\n infra_1.celoMainnet,\n infra_1.teaSepolia,\n infra_1.bobaSepolia,\n infra_1.bobaMainnet\n ];\n const chain2 = supportedChains.find((c4) => c4.id === chainId);\n if (!chain2) {\n throw new Error(`Chain ID ${chainId} not supported by @account-kit/infra. Supported chain IDs: ${supportedChains.map((c4) => c4.id).join(\", \")}`);\n }\n return chain2;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/lit-actions-smart-signer.js\n var require_lit_actions_smart_signer = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/lit-actions-smart-signer.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LitActionsSmartSigner = void 0;\n var LitActionsSmartSigner = class {\n signerType = \"lit-actions\";\n inner;\n pkpPublicKey;\n signerAddress;\n constructor(config2) {\n if (config2.pkpPublicKey.startsWith(\"0x\")) {\n config2.pkpPublicKey = config2.pkpPublicKey.slice(2);\n }\n this.pkpPublicKey = config2.pkpPublicKey;\n this.signerAddress = ethers.utils.computeAddress(\"0x\" + config2.pkpPublicKey);\n this.inner = {\n pkpPublicKey: config2.pkpPublicKey,\n chainId: config2.chainId\n };\n }\n async getAddress() {\n return this.signerAddress;\n }\n async signMessage(message) {\n let messageToSign;\n if (typeof message === \"string\") {\n messageToSign = message;\n } else {\n messageToSign = typeof message.raw === \"string\" ? ethers.utils.arrayify(message.raw) : message.raw;\n }\n const messageHash = ethers.utils.hashMessage(messageToSign);\n const sig = await Lit.Actions.signAndCombineEcdsa({\n toSign: ethers.utils.arrayify(messageHash),\n publicKey: this.pkpPublicKey,\n sigName: `alchemyMessage`\n });\n const parsedSig = JSON.parse(sig);\n return ethers.utils.joinSignature({\n r: \"0x\" + parsedSig.r.substring(2),\n s: \"0x\" + parsedSig.s,\n v: parsedSig.v\n });\n }\n async signTypedData(params) {\n const hash3 = ethers.utils._TypedDataEncoder.hash(params.domain || {}, params.types || {}, params.message || {});\n const sig = await Lit.Actions.signAndCombineEcdsa({\n toSign: ethers.utils.arrayify(hash3),\n publicKey: this.pkpPublicKey,\n sigName: `alchemyTypedData`\n });\n const parsedSig = JSON.parse(sig);\n return ethers.utils.joinSignature({\n r: \"0x\" + parsedSig.r.substring(2),\n s: \"0x\" + parsedSig.s,\n v: parsedSig.v\n });\n }\n // reference implementation is from Viem SmartAccountSigner\n async signAuthorization(unsignedAuthorization) {\n const { contractAddress, chainId, nonce } = unsignedAuthorization;\n if (!contractAddress || !chainId) {\n throw new Error(\"Invalid authorization: contractAddress and chainId are required\");\n }\n const hash3 = ethers.utils.keccak256(ethers.utils.hexConcat([\n \"0x05\",\n ethers.utils.RLP.encode([\n ethers.utils.hexlify(chainId),\n contractAddress,\n nonce ? ethers.utils.hexlify(nonce) : \"0x\"\n ])\n ]));\n const sig = await Lit.Actions.signAndCombineEcdsa({\n toSign: ethers.utils.arrayify(hash3),\n publicKey: this.pkpPublicKey,\n sigName: `alchemyAuth7702`\n });\n const sigObj = JSON.parse(sig);\n return {\n address: unsignedAuthorization.address || contractAddress,\n chainId,\n nonce,\n r: \"0x\" + sigObj.r.substring(2),\n s: \"0x\" + sigObj.s,\n v: BigInt(sigObj.v),\n yParity: sigObj.v\n };\n }\n };\n exports3.LitActionsSmartSigner = LitActionsSmartSigner;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/sponsored-gas-raw-transaction.js\n var require_sponsored_gas_raw_transaction = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/sponsored-gas-raw-transaction.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sponsoredGasRawTransaction = void 0;\n var infra_1 = (init_exports2(), __toCommonJS(exports_exports2));\n var smart_contracts_1 = (init_src(), __toCommonJS(src_exports));\n var get_alchemy_chain_config_1 = require_get_alchemy_chain_config();\n var lit_actions_smart_signer_1 = require_lit_actions_smart_signer();\n var sponsoredGasRawTransaction = async ({ pkpPublicKey, to, value, data, chainId, eip7702AlchemyApiKey, eip7702AlchemyPolicyId }) => {\n if (!eip7702AlchemyApiKey || !eip7702AlchemyPolicyId) {\n throw new Error(\"EIP7702 Alchemy API key and policy ID are required when using Alchemy for gas sponsorship\");\n }\n if (!chainId) {\n throw new Error(\"Chain ID is required when using Alchemy for gas sponsorship\");\n }\n console.log(\"[sponsoredGasRawTransaction] Encoded data:\", data);\n const txValue = value ? BigInt(value.toString()) : 0n;\n const litSigner = new lit_actions_smart_signer_1.LitActionsSmartSigner({\n pkpPublicKey,\n chainId\n });\n const alchemyChain = (0, get_alchemy_chain_config_1.getAlchemyChainConfig)(chainId);\n const smartAccountClient = await (0, smart_contracts_1.createModularAccountV2Client)({\n mode: \"7702\",\n transport: (0, infra_1.alchemy)({ apiKey: eip7702AlchemyApiKey }),\n chain: alchemyChain,\n signer: litSigner,\n policyId: eip7702AlchemyPolicyId\n });\n console.log(\"[sponsoredGasRawTransaction] Smart account client created\");\n const userOperation = {\n target: to,\n value: txValue,\n data\n };\n console.log(\"[sponsoredGasRawTransaction] User operation prepared\", userOperation);\n const uoStructResponse = await Lit.Actions.runOnce({\n waitForResponse: true,\n name: \"buildUserOperation\"\n }, async () => {\n try {\n const uoStruct2 = await smartAccountClient.buildUserOperation({\n uo: userOperation,\n account: smartAccountClient.account\n });\n return JSON.stringify(uoStruct2, (_2, v2) => typeof v2 === \"bigint\" ? { type: \"BigInt\", value: v2.toString() } : v2);\n } catch (e2) {\n console.log(\"[sponsoredGasRawTransaction] Failed to build user operation, error below\");\n console.log(e2);\n console.log(e2.stack);\n return \"\";\n }\n });\n if (uoStructResponse === \"\") {\n throw new Error(\"[sponsoredGasRawTransaction] Failed to build user operation\");\n }\n const uoStruct = JSON.parse(uoStructResponse, (_2, v2) => {\n if (v2 && typeof v2 === \"object\" && v2.type === \"BigInt\" && typeof v2.value === \"string\") {\n return BigInt(v2.value);\n }\n return v2;\n });\n console.log(\"[sponsoredGasRawTransaction] User operation built, starting signing...\", uoStruct);\n const signedUserOperation = await smartAccountClient.signUserOperation({\n account: smartAccountClient.account,\n uoStruct\n });\n console.log(\"[sponsoredGasRawTransaction] User operation signed\", signedUserOperation);\n const entryPoint = smartAccountClient.account.getEntryPoint();\n const uoHash = await Lit.Actions.runOnce({\n waitForResponse: true,\n name: \"sendWithAlchemy\"\n }, async () => {\n try {\n const userOpResult = await smartAccountClient.sendRawUserOperation(signedUserOperation, entryPoint.address);\n console.log(`[sponsoredGasRawTransaction] User operation sent`, {\n userOpHash: userOpResult\n });\n return userOpResult;\n } catch (e2) {\n console.log(\"[sponsoredGasRawTransaction] Failed to send user operation, error below\");\n console.log(e2);\n console.log(e2.stack);\n return \"\";\n }\n });\n if (uoHash === \"\") {\n throw new Error(\"[sponsoredGasRawTransaction] Failed to send user operation\");\n }\n return uoHash;\n };\n exports3.sponsoredGasRawTransaction = sponsoredGasRawTransaction;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/sponsored-gas-contract-call.js\n var require_sponsored_gas_contract_call = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/sponsored-gas-contract-call.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sponsoredGasContractCall = void 0;\n var sponsored_gas_raw_transaction_1 = require_sponsored_gas_raw_transaction();\n var sponsoredGasContractCall = async ({ pkpPublicKey, abi: abi2, contractAddress, functionName, args, overrides = {}, chainId, eip7702AlchemyApiKey, eip7702AlchemyPolicyId }) => {\n const iface = new ethers.utils.Interface(abi2);\n const encodedData = iface.encodeFunctionData(functionName, args);\n console.log(\"Encoded data:\", encodedData);\n if (!eip7702AlchemyApiKey || !eip7702AlchemyPolicyId) {\n throw new Error(\"EIP7702 Alchemy API key and policy ID are required when using Alchemy for gas sponsorship\");\n }\n if (!chainId) {\n throw new Error(\"Chain ID is required when using Alchemy for gas sponsorship\");\n }\n const txValue = overrides.value ? BigInt(overrides.value.toString()) : 0n;\n return (0, sponsored_gas_raw_transaction_1.sponsoredGasRawTransaction)({\n pkpPublicKey,\n to: contractAddress,\n value: txValue.toString(),\n data: encodedData,\n chainId,\n eip7702AlchemyApiKey,\n eip7702AlchemyPolicyId\n });\n };\n exports3.sponsoredGasContractCall = sponsoredGasContractCall;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/index.js\n var require_gasSponsorship = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sponsoredGasContractCall = exports3.sponsoredGasRawTransaction = void 0;\n var sponsored_gas_raw_transaction_1 = require_sponsored_gas_raw_transaction();\n Object.defineProperty(exports3, \"sponsoredGasRawTransaction\", { enumerable: true, get: function() {\n return sponsored_gas_raw_transaction_1.sponsoredGasRawTransaction;\n } });\n var sponsored_gas_contract_call_1 = require_sponsored_gas_contract_call();\n Object.defineProperty(exports3, \"sponsoredGasContractCall\", { enumerable: true, get: function() {\n return sponsored_gas_contract_call_1.sponsoredGasContractCall;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/index.js\n var require_abilityHelpers = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sponsoredGasContractCall = exports3.sponsoredGasRawTransaction = exports3.populateTransaction = void 0;\n var populateTransaction_1 = require_populateTransaction();\n Object.defineProperty(exports3, \"populateTransaction\", { enumerable: true, get: function() {\n return populateTransaction_1.populateTransaction;\n } });\n var gasSponsorship_1 = require_gasSponsorship();\n Object.defineProperty(exports3, \"sponsoredGasRawTransaction\", { enumerable: true, get: function() {\n return gasSponsorship_1.sponsoredGasRawTransaction;\n } });\n Object.defineProperty(exports3, \"sponsoredGasContractCall\", { enumerable: true, get: function() {\n return gasSponsorship_1.sponsoredGasContractCall;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/index.js\n var require_src2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sponsoredGasContractCall = exports3.sponsoredGasRawTransaction = exports3.populateTransaction = exports3.supportedPoliciesForAbility = exports3.asBundledVincentPolicy = exports3.asBundledVincentAbility = exports3.vincentAbilityHandler = exports3.vincentPolicyHandler = exports3.VINCENT_TOOL_API_VERSION = exports3.createVincentAbility = exports3.createVincentAbilityPolicy = exports3.createVincentPolicy = void 0;\n var vincentPolicy_1 = require_vincentPolicy();\n Object.defineProperty(exports3, \"createVincentPolicy\", { enumerable: true, get: function() {\n return vincentPolicy_1.createVincentPolicy;\n } });\n Object.defineProperty(exports3, \"createVincentAbilityPolicy\", { enumerable: true, get: function() {\n return vincentPolicy_1.createVincentAbilityPolicy;\n } });\n var vincentAbility_1 = require_vincentAbility();\n Object.defineProperty(exports3, \"createVincentAbility\", { enumerable: true, get: function() {\n return vincentAbility_1.createVincentAbility;\n } });\n var constants_1 = require_constants2();\n Object.defineProperty(exports3, \"VINCENT_TOOL_API_VERSION\", { enumerable: true, get: function() {\n return constants_1.VINCENT_TOOL_API_VERSION;\n } });\n var vincentPolicyHandler_1 = require_vincentPolicyHandler();\n Object.defineProperty(exports3, \"vincentPolicyHandler\", { enumerable: true, get: function() {\n return vincentPolicyHandler_1.vincentPolicyHandler;\n } });\n var vincentAbilityHandler_1 = require_vincentAbilityHandler();\n Object.defineProperty(exports3, \"vincentAbilityHandler\", { enumerable: true, get: function() {\n return vincentAbilityHandler_1.vincentAbilityHandler;\n } });\n var bundledAbility_1 = require_bundledAbility();\n Object.defineProperty(exports3, \"asBundledVincentAbility\", { enumerable: true, get: function() {\n return bundledAbility_1.asBundledVincentAbility;\n } });\n var bundledPolicy_1 = require_bundledPolicy();\n Object.defineProperty(exports3, \"asBundledVincentPolicy\", { enumerable: true, get: function() {\n return bundledPolicy_1.asBundledVincentPolicy;\n } });\n var supportedPoliciesForAbility_1 = require_supportedPoliciesForAbility();\n Object.defineProperty(exports3, \"supportedPoliciesForAbility\", { enumerable: true, get: function() {\n return supportedPoliciesForAbility_1.supportedPoliciesForAbility;\n } });\n var abilityHelpers_1 = require_abilityHelpers();\n Object.defineProperty(exports3, \"populateTransaction\", { enumerable: true, get: function() {\n return abilityHelpers_1.populateTransaction;\n } });\n Object.defineProperty(exports3, \"sponsoredGasRawTransaction\", { enumerable: true, get: function() {\n return abilityHelpers_1.sponsoredGasRawTransaction;\n } });\n Object.defineProperty(exports3, \"sponsoredGasContractCall\", { enumerable: true, get: function() {\n return abilityHelpers_1.sponsoredGasContractCall;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/crypto.js\n var require_crypto3 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/crypto.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.crypto = void 0;\n exports3.crypto = typeof globalThis === \"object\" && \"crypto\" in globalThis ? globalThis.crypto : void 0;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/utils.js\n var require_utils12 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wrapXOFConstructorWithOpts = exports3.wrapConstructorWithOpts = exports3.wrapConstructor = exports3.Hash = exports3.nextTick = exports3.swap32IfBE = exports3.byteSwapIfBE = exports3.swap8IfBE = exports3.isLE = void 0;\n exports3.isBytes = isBytes7;\n exports3.anumber = anumber4;\n exports3.abytes = abytes5;\n exports3.ahash = ahash3;\n exports3.aexists = aexists3;\n exports3.aoutput = aoutput3;\n exports3.u8 = u8;\n exports3.u32 = u322;\n exports3.clean = clean2;\n exports3.createView = createView3;\n exports3.rotr = rotr3;\n exports3.rotl = rotl2;\n exports3.byteSwap = byteSwap2;\n exports3.byteSwap32 = byteSwap322;\n exports3.bytesToHex = bytesToHex6;\n exports3.hexToBytes = hexToBytes6;\n exports3.asyncLoop = asyncLoop2;\n exports3.utf8ToBytes = utf8ToBytes5;\n exports3.bytesToUtf8 = bytesToUtf8;\n exports3.toBytes = toBytes6;\n exports3.kdfInputToBytes = kdfInputToBytes2;\n exports3.concatBytes = concatBytes6;\n exports3.checkOpts = checkOpts2;\n exports3.createHasher = createHasher3;\n exports3.createOptHasher = createOptHasher;\n exports3.createXOFer = createXOFer2;\n exports3.randomBytes = randomBytes3;\n var crypto_1 = require_crypto3();\n function isBytes7(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function anumber4(n2) {\n if (!Number.isSafeInteger(n2) || n2 < 0)\n throw new Error(\"positive integer expected, got \" + n2);\n }\n function abytes5(b4, ...lengths) {\n if (!isBytes7(b4))\n throw new Error(\"Uint8Array expected\");\n if (lengths.length > 0 && !lengths.includes(b4.length))\n throw new Error(\"Uint8Array expected of length \" + lengths + \", got length=\" + b4.length);\n }\n function ahash3(h4) {\n if (typeof h4 !== \"function\" || typeof h4.create !== \"function\")\n throw new Error(\"Hash should be wrapped by utils.createHasher\");\n anumber4(h4.outputLen);\n anumber4(h4.blockLen);\n }\n function aexists3(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error(\"Hash instance has been destroyed\");\n if (checkFinished && instance.finished)\n throw new Error(\"Hash#digest() has already been called\");\n }\n function aoutput3(out, instance) {\n abytes5(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(\"digestInto() expects output buffer of length at least \" + min);\n }\n }\n function u8(arr) {\n return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\n }\n function u322(arr) {\n return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n }\n function clean2(...arrays) {\n for (let i3 = 0; i3 < arrays.length; i3++) {\n arrays[i3].fill(0);\n }\n }\n function createView3(arr) {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n }\n function rotr3(word, shift) {\n return word << 32 - shift | word >>> shift;\n }\n function rotl2(word, shift) {\n return word << shift | word >>> 32 - shift >>> 0;\n }\n exports3.isLE = (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();\n function byteSwap2(word) {\n return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;\n }\n exports3.swap8IfBE = exports3.isLE ? (n2) => n2 : (n2) => byteSwap2(n2);\n exports3.byteSwapIfBE = exports3.swap8IfBE;\n function byteSwap322(arr) {\n for (let i3 = 0; i3 < arr.length; i3++) {\n arr[i3] = byteSwap2(arr[i3]);\n }\n return arr;\n }\n exports3.swap32IfBE = exports3.isLE ? (u2) => u2 : byteSwap322;\n var hasHexBuiltin3 = /* @__PURE__ */ (() => (\n // @ts-ignore\n typeof Uint8Array.from([]).toHex === \"function\" && typeof Uint8Array.fromHex === \"function\"\n ))();\n var hexes7 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n function bytesToHex6(bytes) {\n abytes5(bytes);\n if (hasHexBuiltin3)\n return bytes.toHex();\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes7[bytes[i3]];\n }\n return hex;\n }\n var asciis4 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\n function asciiToBase164(ch) {\n if (ch >= asciis4._0 && ch <= asciis4._9)\n return ch - asciis4._0;\n if (ch >= asciis4.A && ch <= asciis4.F)\n return ch - (asciis4.A - 10);\n if (ch >= asciis4.a && ch <= asciis4.f)\n return ch - (asciis4.a - 10);\n return;\n }\n function hexToBytes6(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n if (hasHexBuiltin3)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error(\"hex string expected, got unpadded hex of length \" + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase164(hex.charCodeAt(hi));\n const n2 = asciiToBase164(hex.charCodeAt(hi + 1));\n if (n1 === void 0 || n2 === void 0) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n }\n var nextTick2 = async () => {\n };\n exports3.nextTick = nextTick2;\n async function asyncLoop2(iters, tick, cb) {\n let ts = Date.now();\n for (let i3 = 0; i3 < iters; i3++) {\n cb(i3);\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await (0, exports3.nextTick)();\n ts += diff;\n }\n }\n function utf8ToBytes5(str) {\n if (typeof str !== \"string\")\n throw new Error(\"string expected\");\n return new Uint8Array(new TextEncoder().encode(str));\n }\n function bytesToUtf8(bytes) {\n return new TextDecoder().decode(bytes);\n }\n function toBytes6(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes5(data);\n abytes5(data);\n return data;\n }\n function kdfInputToBytes2(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes5(data);\n abytes5(data);\n return data;\n }\n function concatBytes6(...arrays) {\n let sum = 0;\n for (let i3 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n abytes5(a3);\n sum += a3.length;\n }\n const res = new Uint8Array(sum);\n for (let i3 = 0, pad6 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n res.set(a3, pad6);\n pad6 += a3.length;\n }\n return res;\n }\n function checkOpts2(defaults, opts) {\n if (opts !== void 0 && {}.toString.call(opts) !== \"[object Object]\")\n throw new Error(\"options should be object or undefined\");\n const merged = Object.assign(defaults, opts);\n return merged;\n }\n var Hash3 = class {\n };\n exports3.Hash = Hash3;\n function createHasher3(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes6(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n }\n function createOptHasher(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes6(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n }\n function createXOFer2(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes6(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n }\n exports3.wrapConstructor = createHasher3;\n exports3.wrapConstructorWithOpts = createOptHasher;\n exports3.wrapXOFConstructorWithOpts = createXOFer2;\n function randomBytes3(bytesLength = 32) {\n if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === \"function\") {\n return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n if (crypto_1.crypto && typeof crypto_1.crypto.randomBytes === \"function\") {\n return Uint8Array.from(crypto_1.crypto.randomBytes(bytesLength));\n }\n throw new Error(\"crypto.getRandomValues must be defined\");\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/_md.js\n var require_md = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/_md.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SHA512_IV = exports3.SHA384_IV = exports3.SHA224_IV = exports3.SHA256_IV = exports3.HashMD = void 0;\n exports3.setBigUint64 = setBigUint643;\n exports3.Chi = Chi3;\n exports3.Maj = Maj3;\n var utils_ts_1 = require_utils12();\n function setBigUint643(view, byteOffset, value, isLE2) {\n if (typeof view.setBigUint64 === \"function\")\n return view.setBigUint64(byteOffset, value, isLE2);\n const _32n2 = BigInt(32);\n const _u32_max = BigInt(4294967295);\n const wh = Number(value >> _32n2 & _u32_max);\n const wl = Number(value & _u32_max);\n const h4 = isLE2 ? 4 : 0;\n const l6 = isLE2 ? 0 : 4;\n view.setUint32(byteOffset + h4, wh, isLE2);\n view.setUint32(byteOffset + l6, wl, isLE2);\n }\n function Chi3(a3, b4, c4) {\n return a3 & b4 ^ ~a3 & c4;\n }\n function Maj3(a3, b4, c4) {\n return a3 & b4 ^ a3 & c4 ^ b4 & c4;\n }\n var HashMD3 = class extends utils_ts_1.Hash {\n constructor(blockLen, outputLen, padOffset, isLE2) {\n super();\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE2;\n this.buffer = new Uint8Array(blockLen);\n this.view = (0, utils_ts_1.createView)(this.buffer);\n }\n update(data) {\n (0, utils_ts_1.aexists)(this);\n data = (0, utils_ts_1.toBytes)(data);\n (0, utils_ts_1.abytes)(data);\n const { view, buffer: buffer2, blockLen } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n if (take === blockLen) {\n const dataView = (0, utils_ts_1.createView)(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer2.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n (0, utils_ts_1.aexists)(this);\n (0, utils_ts_1.aoutput)(out, this);\n this.finished = true;\n const { buffer: buffer2, view, blockLen, isLE: isLE2 } = this;\n let { pos } = this;\n buffer2[pos++] = 128;\n (0, utils_ts_1.clean)(this.buffer.subarray(pos));\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n for (let i3 = pos; i3 < blockLen; i3++)\n buffer2[i3] = 0;\n setBigUint643(view, blockLen - 8, BigInt(this.length * 8), isLE2);\n this.process(view, 0);\n const oview = (0, utils_ts_1.createView)(out);\n const len = this.outputLen;\n if (len % 4)\n throw new Error(\"_sha2: outputLen should be aligned to 32bit\");\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error(\"_sha2: outputLen bigger than state\");\n for (let i3 = 0; i3 < outLen; i3++)\n oview.setUint32(4 * i3, state[i3], isLE2);\n }\n digest() {\n const { buffer: buffer2, outputLen } = this;\n this.digestInto(buffer2);\n const res = buffer2.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer: buffer2, length, finished, destroyed, pos } = this;\n to.destroyed = destroyed;\n to.finished = finished;\n to.length = length;\n to.pos = pos;\n if (length % blockLen)\n to.buffer.set(buffer2);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n };\n exports3.HashMD = HashMD3;\n exports3.SHA256_IV = Uint32Array.from([\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ]);\n exports3.SHA224_IV = Uint32Array.from([\n 3238371032,\n 914150663,\n 812702999,\n 4144912697,\n 4290775857,\n 1750603025,\n 1694076839,\n 3204075428\n ]);\n exports3.SHA384_IV = Uint32Array.from([\n 3418070365,\n 3238371032,\n 1654270250,\n 914150663,\n 2438529370,\n 812702999,\n 355462360,\n 4144912697,\n 1731405415,\n 4290775857,\n 2394180231,\n 1750603025,\n 3675008525,\n 1694076839,\n 1203062813,\n 3204075428\n ]);\n exports3.SHA512_IV = Uint32Array.from([\n 1779033703,\n 4089235720,\n 3144134277,\n 2227873595,\n 1013904242,\n 4271175723,\n 2773480762,\n 1595750129,\n 1359893119,\n 2917565137,\n 2600822924,\n 725511199,\n 528734635,\n 4215389547,\n 1541459225,\n 327033209\n ]);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/_u64.js\n var require_u642 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/_u64.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toBig = exports3.shrSL = exports3.shrSH = exports3.rotrSL = exports3.rotrSH = exports3.rotrBL = exports3.rotrBH = exports3.rotr32L = exports3.rotr32H = exports3.rotlSL = exports3.rotlSH = exports3.rotlBL = exports3.rotlBH = exports3.add5L = exports3.add5H = exports3.add4L = exports3.add4H = exports3.add3L = exports3.add3H = void 0;\n exports3.add = add2;\n exports3.fromBig = fromBig2;\n exports3.split = split3;\n var U32_MASK642 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\n var _32n2 = /* @__PURE__ */ BigInt(32);\n function fromBig2(n2, le = false) {\n if (le)\n return { h: Number(n2 & U32_MASK642), l: Number(n2 >> _32n2 & U32_MASK642) };\n return { h: Number(n2 >> _32n2 & U32_MASK642) | 0, l: Number(n2 & U32_MASK642) | 0 };\n }\n function split3(lst, le = false) {\n const len = lst.length;\n let Ah = new Uint32Array(len);\n let Al = new Uint32Array(len);\n for (let i3 = 0; i3 < len; i3++) {\n const { h: h4, l: l6 } = fromBig2(lst[i3], le);\n [Ah[i3], Al[i3]] = [h4, l6];\n }\n return [Ah, Al];\n }\n var toBig = (h4, l6) => BigInt(h4 >>> 0) << _32n2 | BigInt(l6 >>> 0);\n exports3.toBig = toBig;\n var shrSH2 = (h4, _l, s4) => h4 >>> s4;\n exports3.shrSH = shrSH2;\n var shrSL2 = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n exports3.shrSL = shrSL2;\n var rotrSH2 = (h4, l6, s4) => h4 >>> s4 | l6 << 32 - s4;\n exports3.rotrSH = rotrSH2;\n var rotrSL2 = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n exports3.rotrSL = rotrSL2;\n var rotrBH2 = (h4, l6, s4) => h4 << 64 - s4 | l6 >>> s4 - 32;\n exports3.rotrBH = rotrBH2;\n var rotrBL2 = (h4, l6, s4) => h4 >>> s4 - 32 | l6 << 64 - s4;\n exports3.rotrBL = rotrBL2;\n var rotr32H = (_h, l6) => l6;\n exports3.rotr32H = rotr32H;\n var rotr32L = (h4, _l) => h4;\n exports3.rotr32L = rotr32L;\n var rotlSH2 = (h4, l6, s4) => h4 << s4 | l6 >>> 32 - s4;\n exports3.rotlSH = rotlSH2;\n var rotlSL2 = (h4, l6, s4) => l6 << s4 | h4 >>> 32 - s4;\n exports3.rotlSL = rotlSL2;\n var rotlBH2 = (h4, l6, s4) => l6 << s4 - 32 | h4 >>> 64 - s4;\n exports3.rotlBH = rotlBH2;\n var rotlBL2 = (h4, l6, s4) => h4 << s4 - 32 | l6 >>> 64 - s4;\n exports3.rotlBL = rotlBL2;\n function add2(Ah, Al, Bh, Bl) {\n const l6 = (Al >>> 0) + (Bl >>> 0);\n return { h: Ah + Bh + (l6 / 2 ** 32 | 0) | 0, l: l6 | 0 };\n }\n var add3L2 = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\n exports3.add3L = add3L2;\n var add3H2 = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;\n exports3.add3H = add3H2;\n var add4L2 = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\n exports3.add4L = add4L2;\n var add4H2 = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;\n exports3.add4H = add4H2;\n var add5L2 = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\n exports3.add5L = add5L2;\n var add5H2 = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;\n exports3.add5H = add5H2;\n var u64 = {\n fromBig: fromBig2,\n split: split3,\n toBig,\n shrSH: shrSH2,\n shrSL: shrSL2,\n rotrSH: rotrSH2,\n rotrSL: rotrSL2,\n rotrBH: rotrBH2,\n rotrBL: rotrBL2,\n rotr32H,\n rotr32L,\n rotlSH: rotlSH2,\n rotlSL: rotlSL2,\n rotlBH: rotlBH2,\n rotlBL: rotlBL2,\n add: add2,\n add3L: add3L2,\n add3H: add3H2,\n add4L: add4L2,\n add4H: add4H2,\n add5H: add5H2,\n add5L: add5L2\n };\n exports3.default = u64;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha2.js\n var require_sha23 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha512_224 = exports3.sha512_256 = exports3.sha384 = exports3.sha512 = exports3.sha224 = exports3.sha256 = exports3.SHA512_256 = exports3.SHA512_224 = exports3.SHA384 = exports3.SHA512 = exports3.SHA224 = exports3.SHA256 = void 0;\n var _md_ts_1 = require_md();\n var u64 = require_u642();\n var utils_ts_1 = require_utils12();\n var SHA256_K3 = /* @__PURE__ */ Uint32Array.from([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n var SHA256_W3 = /* @__PURE__ */ new Uint32Array(64);\n var SHA2563 = class extends _md_ts_1.HashMD {\n constructor(outputLen = 32) {\n super(64, outputLen, 8, false);\n this.A = _md_ts_1.SHA256_IV[0] | 0;\n this.B = _md_ts_1.SHA256_IV[1] | 0;\n this.C = _md_ts_1.SHA256_IV[2] | 0;\n this.D = _md_ts_1.SHA256_IV[3] | 0;\n this.E = _md_ts_1.SHA256_IV[4] | 0;\n this.F = _md_ts_1.SHA256_IV[5] | 0;\n this.G = _md_ts_1.SHA256_IV[6] | 0;\n this.H = _md_ts_1.SHA256_IV[7] | 0;\n }\n get() {\n const { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n return [A4, B2, C, D2, E2, F2, G, H3];\n }\n // prettier-ignore\n set(A4, B2, C, D2, E2, F2, G, H3) {\n this.A = A4 | 0;\n this.B = B2 | 0;\n this.C = C | 0;\n this.D = D2 | 0;\n this.E = E2 | 0;\n this.F = F2 | 0;\n this.G = G | 0;\n this.H = H3 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n SHA256_W3[i3] = view.getUint32(offset, false);\n for (let i3 = 16; i3 < 64; i3++) {\n const W15 = SHA256_W3[i3 - 15];\n const W2 = SHA256_W3[i3 - 2];\n const s0 = (0, utils_ts_1.rotr)(W15, 7) ^ (0, utils_ts_1.rotr)(W15, 18) ^ W15 >>> 3;\n const s1 = (0, utils_ts_1.rotr)(W2, 17) ^ (0, utils_ts_1.rotr)(W2, 19) ^ W2 >>> 10;\n SHA256_W3[i3] = s1 + SHA256_W3[i3 - 7] + s0 + SHA256_W3[i3 - 16] | 0;\n }\n let { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n for (let i3 = 0; i3 < 64; i3++) {\n const sigma1 = (0, utils_ts_1.rotr)(E2, 6) ^ (0, utils_ts_1.rotr)(E2, 11) ^ (0, utils_ts_1.rotr)(E2, 25);\n const T1 = H3 + sigma1 + (0, _md_ts_1.Chi)(E2, F2, G) + SHA256_K3[i3] + SHA256_W3[i3] | 0;\n const sigma0 = (0, utils_ts_1.rotr)(A4, 2) ^ (0, utils_ts_1.rotr)(A4, 13) ^ (0, utils_ts_1.rotr)(A4, 22);\n const T22 = sigma0 + (0, _md_ts_1.Maj)(A4, B2, C) | 0;\n H3 = G;\n G = F2;\n F2 = E2;\n E2 = D2 + T1 | 0;\n D2 = C;\n C = B2;\n B2 = A4;\n A4 = T1 + T22 | 0;\n }\n A4 = A4 + this.A | 0;\n B2 = B2 + this.B | 0;\n C = C + this.C | 0;\n D2 = D2 + this.D | 0;\n E2 = E2 + this.E | 0;\n F2 = F2 + this.F | 0;\n G = G + this.G | 0;\n H3 = H3 + this.H | 0;\n this.set(A4, B2, C, D2, E2, F2, G, H3);\n }\n roundClean() {\n (0, utils_ts_1.clean)(SHA256_W3);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n (0, utils_ts_1.clean)(this.buffer);\n }\n };\n exports3.SHA256 = SHA2563;\n var SHA2242 = class extends SHA2563 {\n constructor() {\n super(28);\n this.A = _md_ts_1.SHA224_IV[0] | 0;\n this.B = _md_ts_1.SHA224_IV[1] | 0;\n this.C = _md_ts_1.SHA224_IV[2] | 0;\n this.D = _md_ts_1.SHA224_IV[3] | 0;\n this.E = _md_ts_1.SHA224_IV[4] | 0;\n this.F = _md_ts_1.SHA224_IV[5] | 0;\n this.G = _md_ts_1.SHA224_IV[6] | 0;\n this.H = _md_ts_1.SHA224_IV[7] | 0;\n }\n };\n exports3.SHA224 = SHA2242;\n var K5122 = /* @__PURE__ */ (() => u64.split([\n \"0x428a2f98d728ae22\",\n \"0x7137449123ef65cd\",\n \"0xb5c0fbcfec4d3b2f\",\n \"0xe9b5dba58189dbbc\",\n \"0x3956c25bf348b538\",\n \"0x59f111f1b605d019\",\n \"0x923f82a4af194f9b\",\n \"0xab1c5ed5da6d8118\",\n \"0xd807aa98a3030242\",\n \"0x12835b0145706fbe\",\n \"0x243185be4ee4b28c\",\n \"0x550c7dc3d5ffb4e2\",\n \"0x72be5d74f27b896f\",\n \"0x80deb1fe3b1696b1\",\n \"0x9bdc06a725c71235\",\n \"0xc19bf174cf692694\",\n \"0xe49b69c19ef14ad2\",\n \"0xefbe4786384f25e3\",\n \"0x0fc19dc68b8cd5b5\",\n \"0x240ca1cc77ac9c65\",\n \"0x2de92c6f592b0275\",\n \"0x4a7484aa6ea6e483\",\n \"0x5cb0a9dcbd41fbd4\",\n \"0x76f988da831153b5\",\n \"0x983e5152ee66dfab\",\n \"0xa831c66d2db43210\",\n \"0xb00327c898fb213f\",\n \"0xbf597fc7beef0ee4\",\n \"0xc6e00bf33da88fc2\",\n \"0xd5a79147930aa725\",\n \"0x06ca6351e003826f\",\n \"0x142929670a0e6e70\",\n \"0x27b70a8546d22ffc\",\n \"0x2e1b21385c26c926\",\n \"0x4d2c6dfc5ac42aed\",\n \"0x53380d139d95b3df\",\n \"0x650a73548baf63de\",\n \"0x766a0abb3c77b2a8\",\n \"0x81c2c92e47edaee6\",\n \"0x92722c851482353b\",\n \"0xa2bfe8a14cf10364\",\n \"0xa81a664bbc423001\",\n \"0xc24b8b70d0f89791\",\n \"0xc76c51a30654be30\",\n \"0xd192e819d6ef5218\",\n \"0xd69906245565a910\",\n \"0xf40e35855771202a\",\n \"0x106aa07032bbd1b8\",\n \"0x19a4c116b8d2d0c8\",\n \"0x1e376c085141ab53\",\n \"0x2748774cdf8eeb99\",\n \"0x34b0bcb5e19b48a8\",\n \"0x391c0cb3c5c95a63\",\n \"0x4ed8aa4ae3418acb\",\n \"0x5b9cca4f7763e373\",\n \"0x682e6ff3d6b2b8a3\",\n \"0x748f82ee5defb2fc\",\n \"0x78a5636f43172f60\",\n \"0x84c87814a1f0ab72\",\n \"0x8cc702081a6439ec\",\n \"0x90befffa23631e28\",\n \"0xa4506cebde82bde9\",\n \"0xbef9a3f7b2c67915\",\n \"0xc67178f2e372532b\",\n \"0xca273eceea26619c\",\n \"0xd186b8c721c0c207\",\n \"0xeada7dd6cde0eb1e\",\n \"0xf57d4f7fee6ed178\",\n \"0x06f067aa72176fba\",\n \"0x0a637dc5a2c898a6\",\n \"0x113f9804bef90dae\",\n \"0x1b710b35131c471b\",\n \"0x28db77f523047d84\",\n \"0x32caab7b40c72493\",\n \"0x3c9ebe0a15c9bebc\",\n \"0x431d67c49c100d4c\",\n \"0x4cc5d4becb3e42b6\",\n \"0x597f299cfc657e2a\",\n \"0x5fcb6fab3ad6faec\",\n \"0x6c44198c4a475817\"\n ].map((n2) => BigInt(n2))))();\n var SHA512_Kh2 = /* @__PURE__ */ (() => K5122[0])();\n var SHA512_Kl2 = /* @__PURE__ */ (() => K5122[1])();\n var SHA512_W_H2 = /* @__PURE__ */ new Uint32Array(80);\n var SHA512_W_L2 = /* @__PURE__ */ new Uint32Array(80);\n var SHA5122 = class extends _md_ts_1.HashMD {\n constructor(outputLen = 64) {\n super(128, outputLen, 16, false);\n this.Ah = _md_ts_1.SHA512_IV[0] | 0;\n this.Al = _md_ts_1.SHA512_IV[1] | 0;\n this.Bh = _md_ts_1.SHA512_IV[2] | 0;\n this.Bl = _md_ts_1.SHA512_IV[3] | 0;\n this.Ch = _md_ts_1.SHA512_IV[4] | 0;\n this.Cl = _md_ts_1.SHA512_IV[5] | 0;\n this.Dh = _md_ts_1.SHA512_IV[6] | 0;\n this.Dl = _md_ts_1.SHA512_IV[7] | 0;\n this.Eh = _md_ts_1.SHA512_IV[8] | 0;\n this.El = _md_ts_1.SHA512_IV[9] | 0;\n this.Fh = _md_ts_1.SHA512_IV[10] | 0;\n this.Fl = _md_ts_1.SHA512_IV[11] | 0;\n this.Gh = _md_ts_1.SHA512_IV[12] | 0;\n this.Gl = _md_ts_1.SHA512_IV[13] | 0;\n this.Hh = _md_ts_1.SHA512_IV[14] | 0;\n this.Hl = _md_ts_1.SHA512_IV[15] | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4) {\n SHA512_W_H2[i3] = view.getUint32(offset);\n SHA512_W_L2[i3] = view.getUint32(offset += 4);\n }\n for (let i3 = 16; i3 < 80; i3++) {\n const W15h = SHA512_W_H2[i3 - 15] | 0;\n const W15l = SHA512_W_L2[i3 - 15] | 0;\n const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);\n const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);\n const W2h = SHA512_W_H2[i3 - 2] | 0;\n const W2l = SHA512_W_L2[i3 - 2] | 0;\n const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);\n const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);\n const SUMl = u64.add4L(s0l, s1l, SHA512_W_L2[i3 - 7], SHA512_W_L2[i3 - 16]);\n const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H2[i3 - 7], SHA512_W_H2[i3 - 16]);\n SHA512_W_H2[i3] = SUMh | 0;\n SHA512_W_L2[i3] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n for (let i3 = 0; i3 < 80; i3++) {\n const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);\n const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);\n const CHIh = Eh & Fh ^ ~Eh & Gh;\n const CHIl = El & Fl ^ ~El & Gl;\n const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl2[i3], SHA512_W_L2[i3]);\n const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh2[i3], SHA512_W_H2[i3]);\n const T1l = T1ll | 0;\n const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);\n const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);\n const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;\n const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = u64.add3L(T1l, sigma0l, MAJl);\n Ah = u64.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n ({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n (0, utils_ts_1.clean)(SHA512_W_H2, SHA512_W_L2);\n }\n destroy() {\n (0, utils_ts_1.clean)(this.buffer);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n };\n exports3.SHA512 = SHA5122;\n var SHA384 = class extends SHA5122 {\n constructor() {\n super(48);\n this.Ah = _md_ts_1.SHA384_IV[0] | 0;\n this.Al = _md_ts_1.SHA384_IV[1] | 0;\n this.Bh = _md_ts_1.SHA384_IV[2] | 0;\n this.Bl = _md_ts_1.SHA384_IV[3] | 0;\n this.Ch = _md_ts_1.SHA384_IV[4] | 0;\n this.Cl = _md_ts_1.SHA384_IV[5] | 0;\n this.Dh = _md_ts_1.SHA384_IV[6] | 0;\n this.Dl = _md_ts_1.SHA384_IV[7] | 0;\n this.Eh = _md_ts_1.SHA384_IV[8] | 0;\n this.El = _md_ts_1.SHA384_IV[9] | 0;\n this.Fh = _md_ts_1.SHA384_IV[10] | 0;\n this.Fl = _md_ts_1.SHA384_IV[11] | 0;\n this.Gh = _md_ts_1.SHA384_IV[12] | 0;\n this.Gl = _md_ts_1.SHA384_IV[13] | 0;\n this.Hh = _md_ts_1.SHA384_IV[14] | 0;\n this.Hl = _md_ts_1.SHA384_IV[15] | 0;\n }\n };\n exports3.SHA384 = SHA384;\n var T224_IV = /* @__PURE__ */ Uint32Array.from([\n 2352822216,\n 424955298,\n 1944164710,\n 2312950998,\n 502970286,\n 855612546,\n 1738396948,\n 1479516111,\n 258812777,\n 2077511080,\n 2011393907,\n 79989058,\n 1067287976,\n 1780299464,\n 286451373,\n 2446758561\n ]);\n var T256_IV = /* @__PURE__ */ Uint32Array.from([\n 573645204,\n 4230739756,\n 2673172387,\n 3360449730,\n 596883563,\n 1867755857,\n 2520282905,\n 1497426621,\n 2519219938,\n 2827943907,\n 3193839141,\n 1401305490,\n 721525244,\n 746961066,\n 246885852,\n 2177182882\n ]);\n var SHA512_224 = class extends SHA5122 {\n constructor() {\n super(28);\n this.Ah = T224_IV[0] | 0;\n this.Al = T224_IV[1] | 0;\n this.Bh = T224_IV[2] | 0;\n this.Bl = T224_IV[3] | 0;\n this.Ch = T224_IV[4] | 0;\n this.Cl = T224_IV[5] | 0;\n this.Dh = T224_IV[6] | 0;\n this.Dl = T224_IV[7] | 0;\n this.Eh = T224_IV[8] | 0;\n this.El = T224_IV[9] | 0;\n this.Fh = T224_IV[10] | 0;\n this.Fl = T224_IV[11] | 0;\n this.Gh = T224_IV[12] | 0;\n this.Gl = T224_IV[13] | 0;\n this.Hh = T224_IV[14] | 0;\n this.Hl = T224_IV[15] | 0;\n }\n };\n exports3.SHA512_224 = SHA512_224;\n var SHA512_256 = class extends SHA5122 {\n constructor() {\n super(32);\n this.Ah = T256_IV[0] | 0;\n this.Al = T256_IV[1] | 0;\n this.Bh = T256_IV[2] | 0;\n this.Bl = T256_IV[3] | 0;\n this.Ch = T256_IV[4] | 0;\n this.Cl = T256_IV[5] | 0;\n this.Dh = T256_IV[6] | 0;\n this.Dl = T256_IV[7] | 0;\n this.Eh = T256_IV[8] | 0;\n this.El = T256_IV[9] | 0;\n this.Fh = T256_IV[10] | 0;\n this.Fl = T256_IV[11] | 0;\n this.Gh = T256_IV[12] | 0;\n this.Gl = T256_IV[13] | 0;\n this.Hh = T256_IV[14] | 0;\n this.Hl = T256_IV[15] | 0;\n }\n };\n exports3.SHA512_256 = SHA512_256;\n exports3.sha256 = (0, utils_ts_1.createHasher)(() => new SHA2563());\n exports3.sha224 = (0, utils_ts_1.createHasher)(() => new SHA2242());\n exports3.sha512 = (0, utils_ts_1.createHasher)(() => new SHA5122());\n exports3.sha384 = (0, utils_ts_1.createHasher)(() => new SHA384());\n exports3.sha512_256 = (0, utils_ts_1.createHasher)(() => new SHA512_256());\n exports3.sha512_224 = (0, utils_ts_1.createHasher)(() => new SHA512_224());\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/utils.js\n var require_utils13 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.notImplemented = exports3.bitMask = exports3.utf8ToBytes = exports3.randomBytes = exports3.isBytes = exports3.hexToBytes = exports3.concatBytes = exports3.bytesToUtf8 = exports3.bytesToHex = exports3.anumber = exports3.abytes = void 0;\n exports3.abool = abool3;\n exports3._abool2 = _abool2;\n exports3._abytes2 = _abytes2;\n exports3.numberToHexUnpadded = numberToHexUnpadded3;\n exports3.hexToNumber = hexToNumber4;\n exports3.bytesToNumberBE = bytesToNumberBE3;\n exports3.bytesToNumberLE = bytesToNumberLE3;\n exports3.numberToBytesBE = numberToBytesBE3;\n exports3.numberToBytesLE = numberToBytesLE3;\n exports3.numberToVarBytesBE = numberToVarBytesBE2;\n exports3.ensureBytes = ensureBytes3;\n exports3.equalBytes = equalBytes2;\n exports3.copyBytes = copyBytes;\n exports3.asciiToBytes = asciiToBytes;\n exports3.inRange = inRange3;\n exports3.aInRange = aInRange3;\n exports3.bitLen = bitLen3;\n exports3.bitGet = bitGet2;\n exports3.bitSet = bitSet2;\n exports3.createHmacDrbg = createHmacDrbg3;\n exports3.validateObject = validateObject3;\n exports3.isHash = isHash;\n exports3._validateObject = _validateObject;\n exports3.memoized = memoized3;\n var utils_js_1 = require_utils12();\n var utils_js_2 = require_utils12();\n Object.defineProperty(exports3, \"abytes\", { enumerable: true, get: function() {\n return utils_js_2.abytes;\n } });\n Object.defineProperty(exports3, \"anumber\", { enumerable: true, get: function() {\n return utils_js_2.anumber;\n } });\n Object.defineProperty(exports3, \"bytesToHex\", { enumerable: true, get: function() {\n return utils_js_2.bytesToHex;\n } });\n Object.defineProperty(exports3, \"bytesToUtf8\", { enumerable: true, get: function() {\n return utils_js_2.bytesToUtf8;\n } });\n Object.defineProperty(exports3, \"concatBytes\", { enumerable: true, get: function() {\n return utils_js_2.concatBytes;\n } });\n Object.defineProperty(exports3, \"hexToBytes\", { enumerable: true, get: function() {\n return utils_js_2.hexToBytes;\n } });\n Object.defineProperty(exports3, \"isBytes\", { enumerable: true, get: function() {\n return utils_js_2.isBytes;\n } });\n Object.defineProperty(exports3, \"randomBytes\", { enumerable: true, get: function() {\n return utils_js_2.randomBytes;\n } });\n Object.defineProperty(exports3, \"utf8ToBytes\", { enumerable: true, get: function() {\n return utils_js_2.utf8ToBytes;\n } });\n var _0n11 = /* @__PURE__ */ BigInt(0);\n var _1n11 = /* @__PURE__ */ BigInt(1);\n function abool3(title2, value) {\n if (typeof value !== \"boolean\")\n throw new Error(title2 + \" boolean expected, got \" + value);\n }\n function _abool2(value, title2 = \"\") {\n if (typeof value !== \"boolean\") {\n const prefix = title2 && `\"${title2}\"`;\n throw new Error(prefix + \"expected boolean, got type=\" + typeof value);\n }\n return value;\n }\n function _abytes2(value, length, title2 = \"\") {\n const bytes = (0, utils_js_1.isBytes)(value);\n const len = value?.length;\n const needsLen = length !== void 0;\n if (!bytes || needsLen && len !== length) {\n const prefix = title2 && `\"${title2}\" `;\n const ofLen = needsLen ? ` of length ${length}` : \"\";\n const got = bytes ? `length=${len}` : `type=${typeof value}`;\n throw new Error(prefix + \"expected Uint8Array\" + ofLen + \", got \" + got);\n }\n return value;\n }\n function numberToHexUnpadded3(num2) {\n const hex = num2.toString(16);\n return hex.length & 1 ? \"0\" + hex : hex;\n }\n function hexToNumber4(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n return hex === \"\" ? _0n11 : BigInt(\"0x\" + hex);\n }\n function bytesToNumberBE3(bytes) {\n return hexToNumber4((0, utils_js_1.bytesToHex)(bytes));\n }\n function bytesToNumberLE3(bytes) {\n (0, utils_js_1.abytes)(bytes);\n return hexToNumber4((0, utils_js_1.bytesToHex)(Uint8Array.from(bytes).reverse()));\n }\n function numberToBytesBE3(n2, len) {\n return (0, utils_js_1.hexToBytes)(n2.toString(16).padStart(len * 2, \"0\"));\n }\n function numberToBytesLE3(n2, len) {\n return numberToBytesBE3(n2, len).reverse();\n }\n function numberToVarBytesBE2(n2) {\n return (0, utils_js_1.hexToBytes)(numberToHexUnpadded3(n2));\n }\n function ensureBytes3(title2, hex, expectedLength) {\n let res;\n if (typeof hex === \"string\") {\n try {\n res = (0, utils_js_1.hexToBytes)(hex);\n } catch (e2) {\n throw new Error(title2 + \" must be hex string or Uint8Array, cause: \" + e2);\n }\n } else if ((0, utils_js_1.isBytes)(hex)) {\n res = Uint8Array.from(hex);\n } else {\n throw new Error(title2 + \" must be hex string or Uint8Array\");\n }\n const len = res.length;\n if (typeof expectedLength === \"number\" && len !== expectedLength)\n throw new Error(title2 + \" of length \" + expectedLength + \" expected, got \" + len);\n return res;\n }\n function equalBytes2(a3, b4) {\n if (a3.length !== b4.length)\n return false;\n let diff = 0;\n for (let i3 = 0; i3 < a3.length; i3++)\n diff |= a3[i3] ^ b4[i3];\n return diff === 0;\n }\n function copyBytes(bytes) {\n return Uint8Array.from(bytes);\n }\n function asciiToBytes(ascii) {\n return Uint8Array.from(ascii, (c4, i3) => {\n const charCode = c4.charCodeAt(0);\n if (c4.length !== 1 || charCode > 127) {\n throw new Error(`string contains non-ASCII character \"${ascii[i3]}\" with code ${charCode} at position ${i3}`);\n }\n return charCode;\n });\n }\n var isPosBig3 = (n2) => typeof n2 === \"bigint\" && _0n11 <= n2;\n function inRange3(n2, min, max) {\n return isPosBig3(n2) && isPosBig3(min) && isPosBig3(max) && min <= n2 && n2 < max;\n }\n function aInRange3(title2, n2, min, max) {\n if (!inRange3(n2, min, max))\n throw new Error(\"expected valid \" + title2 + \": \" + min + \" <= n < \" + max + \", got \" + n2);\n }\n function bitLen3(n2) {\n let len;\n for (len = 0; n2 > _0n11; n2 >>= _1n11, len += 1)\n ;\n return len;\n }\n function bitGet2(n2, pos) {\n return n2 >> BigInt(pos) & _1n11;\n }\n function bitSet2(n2, pos, value) {\n return n2 | (value ? _1n11 : _0n11) << BigInt(pos);\n }\n var bitMask3 = (n2) => (_1n11 << BigInt(n2)) - _1n11;\n exports3.bitMask = bitMask3;\n function createHmacDrbg3(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== \"number\" || hashLen < 2)\n throw new Error(\"hashLen must be a number\");\n if (typeof qByteLen !== \"number\" || qByteLen < 2)\n throw new Error(\"qByteLen must be a number\");\n if (typeof hmacFn !== \"function\")\n throw new Error(\"hmacFn must be a function\");\n const u8n3 = (len) => new Uint8Array(len);\n const u8of = (byte) => Uint8Array.of(byte);\n let v2 = u8n3(hashLen);\n let k4 = u8n3(hashLen);\n let i3 = 0;\n const reset = () => {\n v2.fill(1);\n k4.fill(0);\n i3 = 0;\n };\n const h4 = (...b4) => hmacFn(k4, v2, ...b4);\n const reseed = (seed = u8n3(0)) => {\n k4 = h4(u8of(0), seed);\n v2 = h4();\n if (seed.length === 0)\n return;\n k4 = h4(u8of(1), seed);\n v2 = h4();\n };\n const gen2 = () => {\n if (i3++ >= 1e3)\n throw new Error(\"drbg: tried 1000 values\");\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v2 = h4();\n const sl = v2.slice();\n out.push(sl);\n len += v2.length;\n }\n return (0, utils_js_1.concatBytes)(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed);\n let res = void 0;\n while (!(res = pred(gen2())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n }\n var validatorFns3 = {\n bigint: (val) => typeof val === \"bigint\",\n function: (val) => typeof val === \"function\",\n boolean: (val) => typeof val === \"boolean\",\n string: (val) => typeof val === \"string\",\n stringOrUint8Array: (val) => typeof val === \"string\" || (0, utils_js_1.isBytes)(val),\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === \"function\" && Number.isSafeInteger(val.outputLen)\n };\n function validateObject3(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns3[type];\n if (typeof checkVal !== \"function\")\n throw new Error(\"invalid validator function\");\n const val = object[fieldName];\n if (isOptional && val === void 0)\n return;\n if (!checkVal(val, object)) {\n throw new Error(\"param \" + String(fieldName) + \" is invalid. Expected \" + type + \", got \" + val);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n }\n function isHash(val) {\n return typeof val === \"function\" && Number.isSafeInteger(val.outputLen);\n }\n function _validateObject(object, fields, optFields = {}) {\n if (!object || typeof object !== \"object\")\n throw new Error(\"expected valid options object\");\n function checkField(fieldName, expectedType, isOpt) {\n const val = object[fieldName];\n if (isOpt && val === void 0)\n return;\n const current = typeof val;\n if (current !== expectedType || val === null)\n throw new Error(`param \"${fieldName}\" is invalid: expected ${expectedType}, got ${current}`);\n }\n Object.entries(fields).forEach(([k4, v2]) => checkField(k4, v2, false));\n Object.entries(optFields).forEach(([k4, v2]) => checkField(k4, v2, true));\n }\n var notImplemented2 = () => {\n throw new Error(\"not implemented\");\n };\n exports3.notImplemented = notImplemented2;\n function memoized3(fn) {\n const map = /* @__PURE__ */ new WeakMap();\n return (arg, ...args) => {\n const val = map.get(arg);\n if (val !== void 0)\n return val;\n const computed = fn(arg, ...args);\n map.set(arg, computed);\n return computed;\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/modular.js\n var require_modular2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/modular.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.isNegativeLE = void 0;\n exports3.mod = mod3;\n exports3.pow = pow3;\n exports3.pow2 = pow22;\n exports3.invert = invert3;\n exports3.tonelliShanks = tonelliShanks3;\n exports3.FpSqrt = FpSqrt3;\n exports3.validateField = validateField3;\n exports3.FpPow = FpPow3;\n exports3.FpInvertBatch = FpInvertBatch3;\n exports3.FpDiv = FpDiv;\n exports3.FpLegendre = FpLegendre2;\n exports3.FpIsSquare = FpIsSquare;\n exports3.nLength = nLength3;\n exports3.Field = Field3;\n exports3.FpSqrtOdd = FpSqrtOdd;\n exports3.FpSqrtEven = FpSqrtEven;\n exports3.hashToPrivateScalar = hashToPrivateScalar;\n exports3.getFieldBytesLength = getFieldBytesLength3;\n exports3.getMinHashLength = getMinHashLength3;\n exports3.mapHashToField = mapHashToField3;\n var utils_ts_1 = require_utils13();\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = /* @__PURE__ */ BigInt(2);\n var _3n5 = /* @__PURE__ */ BigInt(3);\n var _4n5 = /* @__PURE__ */ BigInt(4);\n var _5n3 = /* @__PURE__ */ BigInt(5);\n var _7n2 = /* @__PURE__ */ BigInt(7);\n var _8n3 = /* @__PURE__ */ BigInt(8);\n var _9n2 = /* @__PURE__ */ BigInt(9);\n var _16n2 = /* @__PURE__ */ BigInt(16);\n function mod3(a3, b4) {\n const result = a3 % b4;\n return result >= _0n11 ? result : b4 + result;\n }\n function pow3(num2, power, modulo) {\n return FpPow3(Field3(modulo), num2, power);\n }\n function pow22(x4, power, modulo) {\n let res = x4;\n while (power-- > _0n11) {\n res *= res;\n res %= modulo;\n }\n return res;\n }\n function invert3(number, modulo) {\n if (number === _0n11)\n throw new Error(\"invert: expected non-zero number\");\n if (modulo <= _0n11)\n throw new Error(\"invert: expected positive modulus, got \" + modulo);\n let a3 = mod3(number, modulo);\n let b4 = modulo;\n let x4 = _0n11, y6 = _1n11, u2 = _1n11, v2 = _0n11;\n while (a3 !== _0n11) {\n const q3 = b4 / a3;\n const r2 = b4 % a3;\n const m2 = x4 - u2 * q3;\n const n2 = y6 - v2 * q3;\n b4 = a3, a3 = r2, x4 = u2, y6 = v2, u2 = m2, v2 = n2;\n }\n const gcd = b4;\n if (gcd !== _1n11)\n throw new Error(\"invert: does not exist\");\n return mod3(x4, modulo);\n }\n function assertIsSquare(Fp, root, n2) {\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n }\n function sqrt3mod42(Fp, n2) {\n const p1div4 = (Fp.ORDER + _1n11) / _4n5;\n const root = Fp.pow(n2, p1div4);\n assertIsSquare(Fp, root, n2);\n return root;\n }\n function sqrt5mod82(Fp, n2) {\n const p5div8 = (Fp.ORDER - _5n3) / _8n3;\n const n22 = Fp.mul(n2, _2n8);\n const v2 = Fp.pow(n22, p5div8);\n const nv = Fp.mul(n2, v2);\n const i3 = Fp.mul(Fp.mul(nv, _2n8), v2);\n const root = Fp.mul(nv, Fp.sub(i3, Fp.ONE));\n assertIsSquare(Fp, root, n2);\n return root;\n }\n function sqrt9mod16(P2) {\n const Fp_ = Field3(P2);\n const tn = tonelliShanks3(P2);\n const c1 = tn(Fp_, Fp_.neg(Fp_.ONE));\n const c22 = tn(Fp_, c1);\n const c32 = tn(Fp_, Fp_.neg(c1));\n const c4 = (P2 + _7n2) / _16n2;\n return (Fp, n2) => {\n let tv1 = Fp.pow(n2, c4);\n let tv2 = Fp.mul(tv1, c1);\n const tv3 = Fp.mul(tv1, c22);\n const tv4 = Fp.mul(tv1, c32);\n const e1 = Fp.eql(Fp.sqr(tv2), n2);\n const e2 = Fp.eql(Fp.sqr(tv3), n2);\n tv1 = Fp.cmov(tv1, tv2, e1);\n tv2 = Fp.cmov(tv4, tv3, e2);\n const e3 = Fp.eql(Fp.sqr(tv2), n2);\n const root = Fp.cmov(tv1, tv2, e3);\n assertIsSquare(Fp, root, n2);\n return root;\n };\n }\n function tonelliShanks3(P2) {\n if (P2 < _3n5)\n throw new Error(\"sqrt is not defined for small field\");\n let Q2 = P2 - _1n11;\n let S3 = 0;\n while (Q2 % _2n8 === _0n11) {\n Q2 /= _2n8;\n S3++;\n }\n let Z2 = _2n8;\n const _Fp = Field3(P2);\n while (FpLegendre2(_Fp, Z2) === 1) {\n if (Z2++ > 1e3)\n throw new Error(\"Cannot find square root: probably non-prime P\");\n }\n if (S3 === 1)\n return sqrt3mod42;\n let cc = _Fp.pow(Z2, Q2);\n const Q1div2 = (Q2 + _1n11) / _2n8;\n return function tonelliSlow(Fp, n2) {\n if (Fp.is0(n2))\n return n2;\n if (FpLegendre2(Fp, n2) !== 1)\n throw new Error(\"Cannot find square root\");\n let M2 = S3;\n let c4 = Fp.mul(Fp.ONE, cc);\n let t3 = Fp.pow(n2, Q2);\n let R3 = Fp.pow(n2, Q1div2);\n while (!Fp.eql(t3, Fp.ONE)) {\n if (Fp.is0(t3))\n return Fp.ZERO;\n let i3 = 1;\n let t_tmp = Fp.sqr(t3);\n while (!Fp.eql(t_tmp, Fp.ONE)) {\n i3++;\n t_tmp = Fp.sqr(t_tmp);\n if (i3 === M2)\n throw new Error(\"Cannot find square root\");\n }\n const exponent = _1n11 << BigInt(M2 - i3 - 1);\n const b4 = Fp.pow(c4, exponent);\n M2 = i3;\n c4 = Fp.sqr(b4);\n t3 = Fp.mul(t3, c4);\n R3 = Fp.mul(R3, b4);\n }\n return R3;\n };\n }\n function FpSqrt3(P2) {\n if (P2 % _4n5 === _3n5)\n return sqrt3mod42;\n if (P2 % _8n3 === _5n3)\n return sqrt5mod82;\n if (P2 % _16n2 === _9n2)\n return sqrt9mod16(P2);\n return tonelliShanks3(P2);\n }\n var isNegativeLE = (num2, modulo) => (mod3(num2, modulo) & _1n11) === _1n11;\n exports3.isNegativeLE = isNegativeLE;\n var FIELD_FIELDS3 = [\n \"create\",\n \"isValid\",\n \"is0\",\n \"neg\",\n \"inv\",\n \"sqrt\",\n \"sqr\",\n \"eql\",\n \"add\",\n \"sub\",\n \"mul\",\n \"pow\",\n \"div\",\n \"addN\",\n \"subN\",\n \"mulN\",\n \"sqrN\"\n ];\n function validateField3(field) {\n const initial = {\n ORDER: \"bigint\",\n MASK: \"bigint\",\n BYTES: \"number\",\n BITS: \"number\"\n };\n const opts = FIELD_FIELDS3.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n (0, utils_ts_1._validateObject)(field, opts);\n return field;\n }\n function FpPow3(Fp, num2, power) {\n if (power < _0n11)\n throw new Error(\"invalid exponent, negatives unsupported\");\n if (power === _0n11)\n return Fp.ONE;\n if (power === _1n11)\n return num2;\n let p4 = Fp.ONE;\n let d5 = num2;\n while (power > _0n11) {\n if (power & _1n11)\n p4 = Fp.mul(p4, d5);\n d5 = Fp.sqr(d5);\n power >>= _1n11;\n }\n return p4;\n }\n function FpInvertBatch3(Fp, nums, passZero = false) {\n const inverted = new Array(nums.length).fill(passZero ? Fp.ZERO : void 0);\n const multipliedAcc = nums.reduce((acc, num2, i3) => {\n if (Fp.is0(num2))\n return acc;\n inverted[i3] = acc;\n return Fp.mul(acc, num2);\n }, Fp.ONE);\n const invertedAcc = Fp.inv(multipliedAcc);\n nums.reduceRight((acc, num2, i3) => {\n if (Fp.is0(num2))\n return acc;\n inverted[i3] = Fp.mul(acc, inverted[i3]);\n return Fp.mul(acc, num2);\n }, invertedAcc);\n return inverted;\n }\n function FpDiv(Fp, lhs, rhs) {\n return Fp.mul(lhs, typeof rhs === \"bigint\" ? invert3(rhs, Fp.ORDER) : Fp.inv(rhs));\n }\n function FpLegendre2(Fp, n2) {\n const p1mod2 = (Fp.ORDER - _1n11) / _2n8;\n const powered = Fp.pow(n2, p1mod2);\n const yes = Fp.eql(powered, Fp.ONE);\n const zero = Fp.eql(powered, Fp.ZERO);\n const no = Fp.eql(powered, Fp.neg(Fp.ONE));\n if (!yes && !zero && !no)\n throw new Error(\"invalid Legendre symbol result\");\n return yes ? 1 : zero ? 0 : -1;\n }\n function FpIsSquare(Fp, n2) {\n const l6 = FpLegendre2(Fp, n2);\n return l6 === 1;\n }\n function nLength3(n2, nBitLength) {\n if (nBitLength !== void 0)\n (0, utils_ts_1.anumber)(nBitLength);\n const _nBitLength = nBitLength !== void 0 ? nBitLength : n2.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n }\n function Field3(ORDER, bitLenOrOpts, isLE2 = false, opts = {}) {\n if (ORDER <= _0n11)\n throw new Error(\"invalid field: expected ORDER > 0, got \" + ORDER);\n let _nbitLength = void 0;\n let _sqrt = void 0;\n let modFromBytes = false;\n let allowedLengths = void 0;\n if (typeof bitLenOrOpts === \"object\" && bitLenOrOpts != null) {\n if (opts.sqrt || isLE2)\n throw new Error(\"cannot specify opts in two arguments\");\n const _opts = bitLenOrOpts;\n if (_opts.BITS)\n _nbitLength = _opts.BITS;\n if (_opts.sqrt)\n _sqrt = _opts.sqrt;\n if (typeof _opts.isLE === \"boolean\")\n isLE2 = _opts.isLE;\n if (typeof _opts.modFromBytes === \"boolean\")\n modFromBytes = _opts.modFromBytes;\n allowedLengths = _opts.allowedLengths;\n } else {\n if (typeof bitLenOrOpts === \"number\")\n _nbitLength = bitLenOrOpts;\n if (opts.sqrt)\n _sqrt = opts.sqrt;\n }\n const { nBitLength: BITS, nByteLength: BYTES } = nLength3(ORDER, _nbitLength);\n if (BYTES > 2048)\n throw new Error(\"invalid field: expected ORDER of <= 2048 bytes\");\n let sqrtP;\n const f7 = Object.freeze({\n ORDER,\n isLE: isLE2,\n BITS,\n BYTES,\n MASK: (0, utils_ts_1.bitMask)(BITS),\n ZERO: _0n11,\n ONE: _1n11,\n allowedLengths,\n create: (num2) => mod3(num2, ORDER),\n isValid: (num2) => {\n if (typeof num2 !== \"bigint\")\n throw new Error(\"invalid field element: expected bigint, got \" + typeof num2);\n return _0n11 <= num2 && num2 < ORDER;\n },\n is0: (num2) => num2 === _0n11,\n // is valid and invertible\n isValidNot0: (num2) => !f7.is0(num2) && f7.isValid(num2),\n isOdd: (num2) => (num2 & _1n11) === _1n11,\n neg: (num2) => mod3(-num2, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num2) => mod3(num2 * num2, ORDER),\n add: (lhs, rhs) => mod3(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod3(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod3(lhs * rhs, ORDER),\n pow: (num2, power) => FpPow3(f7, num2, power),\n div: (lhs, rhs) => mod3(lhs * invert3(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num2) => num2 * num2,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num2) => invert3(num2, ORDER),\n sqrt: _sqrt || ((n2) => {\n if (!sqrtP)\n sqrtP = FpSqrt3(ORDER);\n return sqrtP(f7, n2);\n }),\n toBytes: (num2) => isLE2 ? (0, utils_ts_1.numberToBytesLE)(num2, BYTES) : (0, utils_ts_1.numberToBytesBE)(num2, BYTES),\n fromBytes: (bytes, skipValidation = true) => {\n if (allowedLengths) {\n if (!allowedLengths.includes(bytes.length) || bytes.length > BYTES) {\n throw new Error(\"Field.fromBytes: expected \" + allowedLengths + \" bytes, got \" + bytes.length);\n }\n const padded = new Uint8Array(BYTES);\n padded.set(bytes, isLE2 ? 0 : padded.length - bytes.length);\n bytes = padded;\n }\n if (bytes.length !== BYTES)\n throw new Error(\"Field.fromBytes: expected \" + BYTES + \" bytes, got \" + bytes.length);\n let scalar = isLE2 ? (0, utils_ts_1.bytesToNumberLE)(bytes) : (0, utils_ts_1.bytesToNumberBE)(bytes);\n if (modFromBytes)\n scalar = mod3(scalar, ORDER);\n if (!skipValidation) {\n if (!f7.isValid(scalar))\n throw new Error(\"invalid field element: outside of range 0..ORDER\");\n }\n return scalar;\n },\n // TODO: we don't need it here, move out to separate fn\n invertBatch: (lst) => FpInvertBatch3(f7, lst),\n // We can't move this out because Fp6, Fp12 implement it\n // and it's unclear what to return in there.\n cmov: (a3, b4, c4) => c4 ? b4 : a3\n });\n return Object.freeze(f7);\n }\n function FpSqrtOdd(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(\"Field doesn't have isOdd\");\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? root : Fp.neg(root);\n }\n function FpSqrtEven(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(\"Field doesn't have isOdd\");\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? Fp.neg(root) : root;\n }\n function hashToPrivateScalar(hash3, groupOrder, isLE2 = false) {\n hash3 = (0, utils_ts_1.ensureBytes)(\"privateHash\", hash3);\n const hashLen = hash3.length;\n const minLen = nLength3(groupOrder).nByteLength + 8;\n if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n throw new Error(\"hashToPrivateScalar: expected \" + minLen + \"-1024 bytes of input, got \" + hashLen);\n const num2 = isLE2 ? (0, utils_ts_1.bytesToNumberLE)(hash3) : (0, utils_ts_1.bytesToNumberBE)(hash3);\n return mod3(num2, groupOrder - _1n11) + _1n11;\n }\n function getFieldBytesLength3(fieldOrder) {\n if (typeof fieldOrder !== \"bigint\")\n throw new Error(\"field order must be bigint\");\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n }\n function getMinHashLength3(fieldOrder) {\n const length = getFieldBytesLength3(fieldOrder);\n return length + Math.ceil(length / 2);\n }\n function mapHashToField3(key, fieldOrder, isLE2 = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength3(fieldOrder);\n const minLen = getMinHashLength3(fieldOrder);\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(\"expected \" + minLen + \"-1024 bytes of input, got \" + len);\n const num2 = isLE2 ? (0, utils_ts_1.bytesToNumberLE)(key) : (0, utils_ts_1.bytesToNumberBE)(key);\n const reduced = mod3(num2, fieldOrder - _1n11) + _1n11;\n return isLE2 ? (0, utils_ts_1.numberToBytesLE)(reduced, fieldLen) : (0, utils_ts_1.numberToBytesBE)(reduced, fieldLen);\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/curve.js\n var require_curve3 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/curve.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wNAF = void 0;\n exports3.negateCt = negateCt;\n exports3.normalizeZ = normalizeZ;\n exports3.mulEndoUnsafe = mulEndoUnsafe;\n exports3.pippenger = pippenger3;\n exports3.precomputeMSMUnsafe = precomputeMSMUnsafe;\n exports3.validateBasic = validateBasic3;\n exports3._createCurveFields = _createCurveFields;\n var utils_ts_1 = require_utils13();\n var modular_ts_1 = require_modular2();\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n function negateCt(condition, item) {\n const neg = item.negate();\n return condition ? neg : item;\n }\n function normalizeZ(c4, points) {\n const invertedZs = (0, modular_ts_1.FpInvertBatch)(c4.Fp, points.map((p4) => p4.Z));\n return points.map((p4, i3) => c4.fromAffine(p4.toAffine(invertedZs[i3])));\n }\n function validateW3(W, bits) {\n if (!Number.isSafeInteger(W) || W <= 0 || W > bits)\n throw new Error(\"invalid window size, expected [1..\" + bits + \"], got W=\" + W);\n }\n function calcWOpts3(W, scalarBits) {\n validateW3(W, scalarBits);\n const windows = Math.ceil(scalarBits / W) + 1;\n const windowSize = 2 ** (W - 1);\n const maxNumber = 2 ** W;\n const mask = (0, utils_ts_1.bitMask)(W);\n const shiftBy = BigInt(W);\n return { windows, windowSize, mask, maxNumber, shiftBy };\n }\n function calcOffsets2(n2, window2, wOpts) {\n const { windowSize, mask, maxNumber, shiftBy } = wOpts;\n let wbits = Number(n2 & mask);\n let nextN = n2 >> shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n nextN += _1n11;\n }\n const offsetStart = window2 * windowSize;\n const offset = offsetStart + Math.abs(wbits) - 1;\n const isZero = wbits === 0;\n const isNeg = wbits < 0;\n const isNegF = window2 % 2 !== 0;\n const offsetF = offsetStart;\n return { nextN, offset, isZero, isNeg, isNegF, offsetF };\n }\n function validateMSMPoints3(points, c4) {\n if (!Array.isArray(points))\n throw new Error(\"array expected\");\n points.forEach((p4, i3) => {\n if (!(p4 instanceof c4))\n throw new Error(\"invalid point at index \" + i3);\n });\n }\n function validateMSMScalars3(scalars, field) {\n if (!Array.isArray(scalars))\n throw new Error(\"array of scalars expected\");\n scalars.forEach((s4, i3) => {\n if (!field.isValid(s4))\n throw new Error(\"invalid scalar at index \" + i3);\n });\n }\n var pointPrecomputes3 = /* @__PURE__ */ new WeakMap();\n var pointWindowSizes3 = /* @__PURE__ */ new WeakMap();\n function getW3(P2) {\n return pointWindowSizes3.get(P2) || 1;\n }\n function assert0(n2) {\n if (n2 !== _0n11)\n throw new Error(\"invalid wNAF\");\n }\n var wNAF3 = class {\n // Parametrized with a given Point class (not individual point)\n constructor(Point3, bits) {\n this.BASE = Point3.BASE;\n this.ZERO = Point3.ZERO;\n this.Fn = Point3.Fn;\n this.bits = bits;\n }\n // non-const time multiplication ladder\n _unsafeLadder(elm, n2, p4 = this.ZERO) {\n let d5 = elm;\n while (n2 > _0n11) {\n if (n2 & _1n11)\n p4 = p4.add(d5);\n d5 = d5.double();\n n2 >>= _1n11;\n }\n return p4;\n }\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @param point Point instance\n * @param W window size\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(point, W) {\n const { windows, windowSize } = calcWOpts3(W, this.bits);\n const points = [];\n let p4 = point;\n let base4 = p4;\n for (let window2 = 0; window2 < windows; window2++) {\n base4 = p4;\n points.push(base4);\n for (let i3 = 1; i3 < windowSize; i3++) {\n base4 = base4.add(p4);\n points.push(base4);\n }\n p4 = base4.double();\n }\n return points;\n }\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * More compact implementation:\n * https://github.com/paulmillr/noble-secp256k1/blob/47cb1669b6e506ad66b35fe7d76132ae97465da2/index.ts#L502-L541\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n2) {\n if (!this.Fn.isValid(n2))\n throw new Error(\"invalid scalar\");\n let p4 = this.ZERO;\n let f7 = this.BASE;\n const wo = calcWOpts3(W, this.bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n const { nextN, offset, isZero, isNeg, isNegF, offsetF } = calcOffsets2(n2, window2, wo);\n n2 = nextN;\n if (isZero) {\n f7 = f7.add(negateCt(isNegF, precomputes[offsetF]));\n } else {\n p4 = p4.add(negateCt(isNeg, precomputes[offset]));\n }\n }\n assert0(n2);\n return { p: p4, f: f7 };\n }\n /**\n * Implements ec unsafe (non const-time) multiplication using precomputed tables and w-ary non-adjacent form.\n * @param acc accumulator point to add result of multiplication\n * @returns point\n */\n wNAFUnsafe(W, precomputes, n2, acc = this.ZERO) {\n const wo = calcWOpts3(W, this.bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n if (n2 === _0n11)\n break;\n const { nextN, offset, isZero, isNeg } = calcOffsets2(n2, window2, wo);\n n2 = nextN;\n if (isZero) {\n continue;\n } else {\n const item = precomputes[offset];\n acc = acc.add(isNeg ? item.negate() : item);\n }\n }\n assert0(n2);\n return acc;\n }\n getPrecomputes(W, point, transform) {\n let comp = pointPrecomputes3.get(point);\n if (!comp) {\n comp = this.precomputeWindow(point, W);\n if (W !== 1) {\n if (typeof transform === \"function\")\n comp = transform(comp);\n pointPrecomputes3.set(point, comp);\n }\n }\n return comp;\n }\n cached(point, scalar, transform) {\n const W = getW3(point);\n return this.wNAF(W, this.getPrecomputes(W, point, transform), scalar);\n }\n unsafe(point, scalar, transform, prev) {\n const W = getW3(point);\n if (W === 1)\n return this._unsafeLadder(point, scalar, prev);\n return this.wNAFUnsafe(W, this.getPrecomputes(W, point, transform), scalar, prev);\n }\n // We calculate precomputes for elliptic curve point multiplication\n // using windowed method. This specifies window size and\n // stores precomputed values. Usually only base point would be precomputed.\n createCache(P2, W) {\n validateW3(W, this.bits);\n pointWindowSizes3.set(P2, W);\n pointPrecomputes3.delete(P2);\n }\n hasCache(elm) {\n return getW3(elm) !== 1;\n }\n };\n exports3.wNAF = wNAF3;\n function mulEndoUnsafe(Point3, point, k1, k22) {\n let acc = point;\n let p1 = Point3.ZERO;\n let p22 = Point3.ZERO;\n while (k1 > _0n11 || k22 > _0n11) {\n if (k1 & _1n11)\n p1 = p1.add(acc);\n if (k22 & _1n11)\n p22 = p22.add(acc);\n acc = acc.double();\n k1 >>= _1n11;\n k22 >>= _1n11;\n }\n return { p1, p2: p22 };\n }\n function pippenger3(c4, fieldN, points, scalars) {\n validateMSMPoints3(points, c4);\n validateMSMScalars3(scalars, fieldN);\n const plength = points.length;\n const slength = scalars.length;\n if (plength !== slength)\n throw new Error(\"arrays of points and scalars must have equal length\");\n const zero = c4.ZERO;\n const wbits = (0, utils_ts_1.bitLen)(BigInt(plength));\n let windowSize = 1;\n if (wbits > 12)\n windowSize = wbits - 3;\n else if (wbits > 4)\n windowSize = wbits - 2;\n else if (wbits > 0)\n windowSize = 2;\n const MASK = (0, utils_ts_1.bitMask)(windowSize);\n const buckets = new Array(Number(MASK) + 1).fill(zero);\n const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;\n let sum = zero;\n for (let i3 = lastBits; i3 >= 0; i3 -= windowSize) {\n buckets.fill(zero);\n for (let j2 = 0; j2 < slength; j2++) {\n const scalar = scalars[j2];\n const wbits2 = Number(scalar >> BigInt(i3) & MASK);\n buckets[wbits2] = buckets[wbits2].add(points[j2]);\n }\n let resI = zero;\n for (let j2 = buckets.length - 1, sumI = zero; j2 > 0; j2--) {\n sumI = sumI.add(buckets[j2]);\n resI = resI.add(sumI);\n }\n sum = sum.add(resI);\n if (i3 !== 0)\n for (let j2 = 0; j2 < windowSize; j2++)\n sum = sum.double();\n }\n return sum;\n }\n function precomputeMSMUnsafe(c4, fieldN, points, windowSize) {\n validateW3(windowSize, fieldN.BITS);\n validateMSMPoints3(points, c4);\n const zero = c4.ZERO;\n const tableSize = 2 ** windowSize - 1;\n const chunks = Math.ceil(fieldN.BITS / windowSize);\n const MASK = (0, utils_ts_1.bitMask)(windowSize);\n const tables = points.map((p4) => {\n const res = [];\n for (let i3 = 0, acc = p4; i3 < tableSize; i3++) {\n res.push(acc);\n acc = acc.add(p4);\n }\n return res;\n });\n return (scalars) => {\n validateMSMScalars3(scalars, fieldN);\n if (scalars.length > points.length)\n throw new Error(\"array of scalars must be smaller than array of points\");\n let res = zero;\n for (let i3 = 0; i3 < chunks; i3++) {\n if (res !== zero)\n for (let j2 = 0; j2 < windowSize; j2++)\n res = res.double();\n const shiftBy = BigInt(chunks * windowSize - (i3 + 1) * windowSize);\n for (let j2 = 0; j2 < scalars.length; j2++) {\n const n2 = scalars[j2];\n const curr = Number(n2 >> shiftBy & MASK);\n if (!curr)\n continue;\n res = res.add(tables[j2][curr - 1]);\n }\n }\n return res;\n };\n }\n function validateBasic3(curve) {\n (0, modular_ts_1.validateField)(curve.Fp);\n (0, utils_ts_1.validateObject)(curve, {\n n: \"bigint\",\n h: \"bigint\",\n Gx: \"field\",\n Gy: \"field\"\n }, {\n nBitLength: \"isSafeInteger\",\n nByteLength: \"isSafeInteger\"\n });\n return Object.freeze({\n ...(0, modular_ts_1.nLength)(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER }\n });\n }\n function createField(order, field, isLE2) {\n if (field) {\n if (field.ORDER !== order)\n throw new Error(\"Field.ORDER must match order: Fp == p, Fn == n\");\n (0, modular_ts_1.validateField)(field);\n return field;\n } else {\n return (0, modular_ts_1.Field)(order, { isLE: isLE2 });\n }\n }\n function _createCurveFields(type, CURVE, curveOpts = {}, FpFnLE) {\n if (FpFnLE === void 0)\n FpFnLE = type === \"edwards\";\n if (!CURVE || typeof CURVE !== \"object\")\n throw new Error(`expected valid ${type} CURVE object`);\n for (const p4 of [\"p\", \"n\", \"h\"]) {\n const val = CURVE[p4];\n if (!(typeof val === \"bigint\" && val > _0n11))\n throw new Error(`CURVE.${p4} must be positive bigint`);\n }\n const Fp = createField(CURVE.p, curveOpts.Fp, FpFnLE);\n const Fn = createField(CURVE.n, curveOpts.Fn, FpFnLE);\n const _b = type === \"weierstrass\" ? \"b\" : \"d\";\n const params = [\"Gx\", \"Gy\", \"a\", _b];\n for (const p4 of params) {\n if (!Fp.isValid(CURVE[p4]))\n throw new Error(`CURVE.${p4} must be valid field element of CURVE.Fp`);\n }\n CURVE = Object.freeze(Object.assign({}, CURVE));\n return { CURVE, Fp, Fn };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/edwards.js\n var require_edwards2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/edwards.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PrimeEdwardsPoint = void 0;\n exports3.edwards = edwards;\n exports3.eddsa = eddsa;\n exports3.twistedEdwards = twistedEdwards;\n var utils_ts_1 = require_utils13();\n var curve_ts_1 = require_curve3();\n var modular_ts_1 = require_modular2();\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n var _8n3 = BigInt(8);\n function isEdValidXY(Fp, CURVE, x4, y6) {\n const x22 = Fp.sqr(x4);\n const y22 = Fp.sqr(y6);\n const left = Fp.add(Fp.mul(CURVE.a, x22), y22);\n const right = Fp.add(Fp.ONE, Fp.mul(CURVE.d, Fp.mul(x22, y22)));\n return Fp.eql(left, right);\n }\n function edwards(params, extraOpts = {}) {\n const validated = (0, curve_ts_1._createCurveFields)(\"edwards\", params, extraOpts, extraOpts.FpFnLE);\n const { Fp, Fn } = validated;\n let CURVE = validated.CURVE;\n const { h: cofactor } = CURVE;\n (0, utils_ts_1._validateObject)(extraOpts, {}, { uvRatio: \"function\" });\n const MASK = _2n8 << BigInt(Fn.BYTES * 8) - _1n11;\n const modP2 = (n2) => Fp.create(n2);\n const uvRatio = extraOpts.uvRatio || ((u2, v2) => {\n try {\n return { isValid: true, value: Fp.sqrt(Fp.div(u2, v2)) };\n } catch (e2) {\n return { isValid: false, value: _0n11 };\n }\n });\n if (!isEdValidXY(Fp, CURVE, CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n function acoord(title2, n2, banZero = false) {\n const min = banZero ? _1n11 : _0n11;\n (0, utils_ts_1.aInRange)(\"coordinate \" + title2, n2, min, MASK);\n return n2;\n }\n function aextpoint(other) {\n if (!(other instanceof Point3))\n throw new Error(\"ExtendedPoint expected\");\n }\n const toAffineMemo = (0, utils_ts_1.memoized)((p4, iz) => {\n const { X: X2, Y: Y2, Z: Z2 } = p4;\n const is0 = p4.is0();\n if (iz == null)\n iz = is0 ? _8n3 : Fp.inv(Z2);\n const x4 = modP2(X2 * iz);\n const y6 = modP2(Y2 * iz);\n const zz = Fp.mul(Z2, iz);\n if (is0)\n return { x: _0n11, y: _1n11 };\n if (zz !== _1n11)\n throw new Error(\"invZ was invalid\");\n return { x: x4, y: y6 };\n });\n const assertValidMemo = (0, utils_ts_1.memoized)((p4) => {\n const { a: a3, d: d5 } = CURVE;\n if (p4.is0())\n throw new Error(\"bad point: ZERO\");\n const { X: X2, Y: Y2, Z: Z2, T: T4 } = p4;\n const X22 = modP2(X2 * X2);\n const Y22 = modP2(Y2 * Y2);\n const Z22 = modP2(Z2 * Z2);\n const Z4 = modP2(Z22 * Z22);\n const aX2 = modP2(X22 * a3);\n const left = modP2(Z22 * modP2(aX2 + Y22));\n const right = modP2(Z4 + modP2(d5 * modP2(X22 * Y22)));\n if (left !== right)\n throw new Error(\"bad point: equation left != right (1)\");\n const XY = modP2(X2 * Y2);\n const ZT = modP2(Z2 * T4);\n if (XY !== ZT)\n throw new Error(\"bad point: equation left != right (2)\");\n return true;\n });\n class Point3 {\n constructor(X2, Y2, Z2, T4) {\n this.X = acoord(\"x\", X2);\n this.Y = acoord(\"y\", Y2);\n this.Z = acoord(\"z\", Z2, true);\n this.T = acoord(\"t\", T4);\n Object.freeze(this);\n }\n static CURVE() {\n return CURVE;\n }\n static fromAffine(p4) {\n if (p4 instanceof Point3)\n throw new Error(\"extended point not allowed\");\n const { x: x4, y: y6 } = p4 || {};\n acoord(\"x\", x4);\n acoord(\"y\", y6);\n return new Point3(x4, y6, _1n11, modP2(x4 * y6));\n }\n // Uses algo from RFC8032 5.1.3.\n static fromBytes(bytes, zip215 = false) {\n const len = Fp.BYTES;\n const { a: a3, d: d5 } = CURVE;\n bytes = (0, utils_ts_1.copyBytes)((0, utils_ts_1._abytes2)(bytes, len, \"point\"));\n (0, utils_ts_1._abool2)(zip215, \"zip215\");\n const normed = (0, utils_ts_1.copyBytes)(bytes);\n const lastByte = bytes[len - 1];\n normed[len - 1] = lastByte & ~128;\n const y6 = (0, utils_ts_1.bytesToNumberLE)(normed);\n const max = zip215 ? MASK : Fp.ORDER;\n (0, utils_ts_1.aInRange)(\"point.y\", y6, _0n11, max);\n const y22 = modP2(y6 * y6);\n const u2 = modP2(y22 - _1n11);\n const v2 = modP2(d5 * y22 - a3);\n let { isValid: isValid2, value: x4 } = uvRatio(u2, v2);\n if (!isValid2)\n throw new Error(\"bad point: invalid y coordinate\");\n const isXOdd = (x4 & _1n11) === _1n11;\n const isLastByteOdd = (lastByte & 128) !== 0;\n if (!zip215 && x4 === _0n11 && isLastByteOdd)\n throw new Error(\"bad point: x=0 and x_0=1\");\n if (isLastByteOdd !== isXOdd)\n x4 = modP2(-x4);\n return Point3.fromAffine({ x: x4, y: y6 });\n }\n static fromHex(bytes, zip215 = false) {\n return Point3.fromBytes((0, utils_ts_1.ensureBytes)(\"point\", bytes), zip215);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n precompute(windowSize = 8, isLazy = true) {\n wnaf.createCache(this, windowSize);\n if (!isLazy)\n this.multiply(_2n8);\n return this;\n }\n // Useful in fromAffine() - not for fromBytes(), which always created valid points.\n assertValidity() {\n assertValidMemo(this);\n }\n // Compare one point to another.\n equals(other) {\n aextpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n const X1Z2 = modP2(X1 * Z2);\n const X2Z1 = modP2(X2 * Z1);\n const Y1Z2 = modP2(Y1 * Z2);\n const Y2Z1 = modP2(Y2 * Z1);\n return X1Z2 === X2Z1 && Y1Z2 === Y2Z1;\n }\n is0() {\n return this.equals(Point3.ZERO);\n }\n negate() {\n return new Point3(modP2(-this.X), this.Y, this.Z, modP2(-this.T));\n }\n // Fast algo for doubling Extended Point.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd\n // Cost: 4M + 4S + 1*a + 6add + 1*2.\n double() {\n const { a: a3 } = CURVE;\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const A4 = modP2(X1 * X1);\n const B2 = modP2(Y1 * Y1);\n const C = modP2(_2n8 * modP2(Z1 * Z1));\n const D2 = modP2(a3 * A4);\n const x1y1 = X1 + Y1;\n const E2 = modP2(modP2(x1y1 * x1y1) - A4 - B2);\n const G = D2 + B2;\n const F2 = G - C;\n const H3 = D2 - B2;\n const X3 = modP2(E2 * F2);\n const Y3 = modP2(G * H3);\n const T32 = modP2(E2 * H3);\n const Z3 = modP2(F2 * G);\n return new Point3(X3, Y3, Z3, T32);\n }\n // Fast algo for adding 2 Extended Points.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#addition-add-2008-hwcd\n // Cost: 9M + 1*a + 1*d + 7add.\n add(other) {\n aextpoint(other);\n const { a: a3, d: d5 } = CURVE;\n const { X: X1, Y: Y1, Z: Z1, T: T1 } = this;\n const { X: X2, Y: Y2, Z: Z2, T: T22 } = other;\n const A4 = modP2(X1 * X2);\n const B2 = modP2(Y1 * Y2);\n const C = modP2(T1 * d5 * T22);\n const D2 = modP2(Z1 * Z2);\n const E2 = modP2((X1 + Y1) * (X2 + Y2) - A4 - B2);\n const F2 = D2 - C;\n const G = D2 + C;\n const H3 = modP2(B2 - a3 * A4);\n const X3 = modP2(E2 * F2);\n const Y3 = modP2(G * H3);\n const T32 = modP2(E2 * H3);\n const Z3 = modP2(F2 * G);\n return new Point3(X3, Y3, Z3, T32);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n // Constant-time multiplication.\n multiply(scalar) {\n if (!Fn.isValidNot0(scalar))\n throw new Error(\"invalid scalar: expected 1 <= sc < curve.n\");\n const { p: p4, f: f7 } = wnaf.cached(this, scalar, (p5) => (0, curve_ts_1.normalizeZ)(Point3, p5));\n return (0, curve_ts_1.normalizeZ)(Point3, [p4, f7])[0];\n }\n // Non-constant-time multiplication. Uses double-and-add algorithm.\n // It's faster, but should only be used when you don't care about\n // an exposed private key e.g. sig verification.\n // Does NOT allow scalars higher than CURVE.n.\n // Accepts optional accumulator to merge with multiply (important for sparse scalars)\n multiplyUnsafe(scalar, acc = Point3.ZERO) {\n if (!Fn.isValid(scalar))\n throw new Error(\"invalid scalar: expected 0 <= sc < curve.n\");\n if (scalar === _0n11)\n return Point3.ZERO;\n if (this.is0() || scalar === _1n11)\n return this;\n return wnaf.unsafe(this, scalar, (p4) => (0, curve_ts_1.normalizeZ)(Point3, p4), acc);\n }\n // Checks if point is of small order.\n // If you add something to small order point, you will have \"dirty\"\n // point with torsion component.\n // Multiplies point by cofactor and checks if the result is 0.\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n // Multiplies point by curve order and checks if the result is 0.\n // Returns `false` is the point is dirty.\n isTorsionFree() {\n return wnaf.unsafe(this, CURVE.n).is0();\n }\n // Converts Extended point to default (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n toAffine(invertedZ) {\n return toAffineMemo(this, invertedZ);\n }\n clearCofactor() {\n if (cofactor === _1n11)\n return this;\n return this.multiplyUnsafe(cofactor);\n }\n toBytes() {\n const { x: x4, y: y6 } = this.toAffine();\n const bytes = Fp.toBytes(y6);\n bytes[bytes.length - 1] |= x4 & _1n11 ? 128 : 0;\n return bytes;\n }\n toHex() {\n return (0, utils_ts_1.bytesToHex)(this.toBytes());\n }\n toString() {\n return ``;\n }\n // TODO: remove\n get ex() {\n return this.X;\n }\n get ey() {\n return this.Y;\n }\n get ez() {\n return this.Z;\n }\n get et() {\n return this.T;\n }\n static normalizeZ(points) {\n return (0, curve_ts_1.normalizeZ)(Point3, points);\n }\n static msm(points, scalars) {\n return (0, curve_ts_1.pippenger)(Point3, Fn, points, scalars);\n }\n _setWindowSize(windowSize) {\n this.precompute(windowSize);\n }\n toRawBytes() {\n return this.toBytes();\n }\n }\n Point3.BASE = new Point3(CURVE.Gx, CURVE.Gy, _1n11, modP2(CURVE.Gx * CURVE.Gy));\n Point3.ZERO = new Point3(_0n11, _1n11, _1n11, _0n11);\n Point3.Fp = Fp;\n Point3.Fn = Fn;\n const wnaf = new curve_ts_1.wNAF(Point3, Fn.BITS);\n Point3.BASE.precompute(8);\n return Point3;\n }\n var PrimeEdwardsPoint = class {\n constructor(ep) {\n this.ep = ep;\n }\n // Static methods that must be implemented by subclasses\n static fromBytes(_bytes) {\n (0, utils_ts_1.notImplemented)();\n }\n static fromHex(_hex) {\n (0, utils_ts_1.notImplemented)();\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n // Common implementations\n clearCofactor() {\n return this;\n }\n assertValidity() {\n this.ep.assertValidity();\n }\n toAffine(invertedZ) {\n return this.ep.toAffine(invertedZ);\n }\n toHex() {\n return (0, utils_ts_1.bytesToHex)(this.toBytes());\n }\n toString() {\n return this.toHex();\n }\n isTorsionFree() {\n return true;\n }\n isSmallOrder() {\n return false;\n }\n add(other) {\n this.assertSame(other);\n return this.init(this.ep.add(other.ep));\n }\n subtract(other) {\n this.assertSame(other);\n return this.init(this.ep.subtract(other.ep));\n }\n multiply(scalar) {\n return this.init(this.ep.multiply(scalar));\n }\n multiplyUnsafe(scalar) {\n return this.init(this.ep.multiplyUnsafe(scalar));\n }\n double() {\n return this.init(this.ep.double());\n }\n negate() {\n return this.init(this.ep.negate());\n }\n precompute(windowSize, isLazy) {\n return this.init(this.ep.precompute(windowSize, isLazy));\n }\n /** @deprecated use `toBytes` */\n toRawBytes() {\n return this.toBytes();\n }\n };\n exports3.PrimeEdwardsPoint = PrimeEdwardsPoint;\n function eddsa(Point3, cHash, eddsaOpts = {}) {\n if (typeof cHash !== \"function\")\n throw new Error('\"hash\" function param is required');\n (0, utils_ts_1._validateObject)(eddsaOpts, {}, {\n adjustScalarBytes: \"function\",\n randomBytes: \"function\",\n domain: \"function\",\n prehash: \"function\",\n mapToCurve: \"function\"\n });\n const { prehash } = eddsaOpts;\n const { BASE, Fp, Fn } = Point3;\n const randomBytes3 = eddsaOpts.randomBytes || utils_ts_1.randomBytes;\n const adjustScalarBytes = eddsaOpts.adjustScalarBytes || ((bytes) => bytes);\n const domain2 = eddsaOpts.domain || ((data, ctx, phflag) => {\n (0, utils_ts_1._abool2)(phflag, \"phflag\");\n if (ctx.length || phflag)\n throw new Error(\"Contexts/pre-hash are not supported\");\n return data;\n });\n function modN_LE(hash3) {\n return Fn.create((0, utils_ts_1.bytesToNumberLE)(hash3));\n }\n function getPrivateScalar(key) {\n const len = lengths.secretKey;\n key = (0, utils_ts_1.ensureBytes)(\"private key\", key, len);\n const hashed = (0, utils_ts_1.ensureBytes)(\"hashed private key\", cHash(key), 2 * len);\n const head = adjustScalarBytes(hashed.slice(0, len));\n const prefix = hashed.slice(len, 2 * len);\n const scalar = modN_LE(head);\n return { head, prefix, scalar };\n }\n function getExtendedPublicKey(secretKey) {\n const { head, prefix, scalar } = getPrivateScalar(secretKey);\n const point = BASE.multiply(scalar);\n const pointBytes = point.toBytes();\n return { head, prefix, scalar, point, pointBytes };\n }\n function getPublicKey(secretKey) {\n return getExtendedPublicKey(secretKey).pointBytes;\n }\n function hashDomainToScalar(context2 = Uint8Array.of(), ...msgs) {\n const msg = (0, utils_ts_1.concatBytes)(...msgs);\n return modN_LE(cHash(domain2(msg, (0, utils_ts_1.ensureBytes)(\"context\", context2), !!prehash)));\n }\n function sign3(msg, secretKey, options = {}) {\n msg = (0, utils_ts_1.ensureBytes)(\"message\", msg);\n if (prehash)\n msg = prehash(msg);\n const { prefix, scalar, pointBytes } = getExtendedPublicKey(secretKey);\n const r2 = hashDomainToScalar(options.context, prefix, msg);\n const R3 = BASE.multiply(r2).toBytes();\n const k4 = hashDomainToScalar(options.context, R3, pointBytes, msg);\n const s4 = Fn.create(r2 + k4 * scalar);\n if (!Fn.isValid(s4))\n throw new Error(\"sign failed: invalid s\");\n const rs = (0, utils_ts_1.concatBytes)(R3, Fn.toBytes(s4));\n return (0, utils_ts_1._abytes2)(rs, lengths.signature, \"result\");\n }\n const verifyOpts = { zip215: true };\n function verify(sig, msg, publicKey, options = verifyOpts) {\n const { context: context2, zip215 } = options;\n const len = lengths.signature;\n sig = (0, utils_ts_1.ensureBytes)(\"signature\", sig, len);\n msg = (0, utils_ts_1.ensureBytes)(\"message\", msg);\n publicKey = (0, utils_ts_1.ensureBytes)(\"publicKey\", publicKey, lengths.publicKey);\n if (zip215 !== void 0)\n (0, utils_ts_1._abool2)(zip215, \"zip215\");\n if (prehash)\n msg = prehash(msg);\n const mid = len / 2;\n const r2 = sig.subarray(0, mid);\n const s4 = (0, utils_ts_1.bytesToNumberLE)(sig.subarray(mid, len));\n let A4, R3, SB;\n try {\n A4 = Point3.fromBytes(publicKey, zip215);\n R3 = Point3.fromBytes(r2, zip215);\n SB = BASE.multiplyUnsafe(s4);\n } catch (error) {\n return false;\n }\n if (!zip215 && A4.isSmallOrder())\n return false;\n const k4 = hashDomainToScalar(context2, R3.toBytes(), A4.toBytes(), msg);\n const RkA = R3.add(A4.multiplyUnsafe(k4));\n return RkA.subtract(SB).clearCofactor().is0();\n }\n const _size = Fp.BYTES;\n const lengths = {\n secretKey: _size,\n publicKey: _size,\n signature: 2 * _size,\n seed: _size\n };\n function randomSecretKey(seed = randomBytes3(lengths.seed)) {\n return (0, utils_ts_1._abytes2)(seed, lengths.seed, \"seed\");\n }\n function keygen(seed) {\n const secretKey = utils.randomSecretKey(seed);\n return { secretKey, publicKey: getPublicKey(secretKey) };\n }\n function isValidSecretKey(key) {\n return (0, utils_ts_1.isBytes)(key) && key.length === Fn.BYTES;\n }\n function isValidPublicKey(key, zip215) {\n try {\n return !!Point3.fromBytes(key, zip215);\n } catch (error) {\n return false;\n }\n }\n const utils = {\n getExtendedPublicKey,\n randomSecretKey,\n isValidSecretKey,\n isValidPublicKey,\n /**\n * Converts ed public key to x public key. Uses formula:\n * - ed25519:\n * - `(u, v) = ((1+y)/(1-y), sqrt(-486664)*u/x)`\n * - `(x, y) = (sqrt(-486664)*u/v, (u-1)/(u+1))`\n * - ed448:\n * - `(u, v) = ((y-1)/(y+1), sqrt(156324)*u/x)`\n * - `(x, y) = (sqrt(156324)*u/v, (1+u)/(1-u))`\n */\n toMontgomery(publicKey) {\n const { y: y6 } = Point3.fromBytes(publicKey);\n const size6 = lengths.publicKey;\n const is25519 = size6 === 32;\n if (!is25519 && size6 !== 57)\n throw new Error(\"only defined for 25519 and 448\");\n const u2 = is25519 ? Fp.div(_1n11 + y6, _1n11 - y6) : Fp.div(y6 - _1n11, y6 + _1n11);\n return Fp.toBytes(u2);\n },\n toMontgomerySecret(secretKey) {\n const size6 = lengths.secretKey;\n (0, utils_ts_1._abytes2)(secretKey, size6);\n const hashed = cHash(secretKey.subarray(0, size6));\n return adjustScalarBytes(hashed).subarray(0, size6);\n },\n /** @deprecated */\n randomPrivateKey: randomSecretKey,\n /** @deprecated */\n precompute(windowSize = 8, point = Point3.BASE) {\n return point.precompute(windowSize, false);\n }\n };\n return Object.freeze({\n keygen,\n getPublicKey,\n sign: sign3,\n verify,\n utils,\n Point: Point3,\n lengths\n });\n }\n function _eddsa_legacy_opts_to_new(c4) {\n const CURVE = {\n a: c4.a,\n d: c4.d,\n p: c4.Fp.ORDER,\n n: c4.n,\n h: c4.h,\n Gx: c4.Gx,\n Gy: c4.Gy\n };\n const Fp = c4.Fp;\n const Fn = (0, modular_ts_1.Field)(CURVE.n, c4.nBitLength, true);\n const curveOpts = { Fp, Fn, uvRatio: c4.uvRatio };\n const eddsaOpts = {\n randomBytes: c4.randomBytes,\n adjustScalarBytes: c4.adjustScalarBytes,\n domain: c4.domain,\n prehash: c4.prehash,\n mapToCurve: c4.mapToCurve\n };\n return { CURVE, curveOpts, hash: c4.hash, eddsaOpts };\n }\n function _eddsa_new_output_to_legacy(c4, eddsa2) {\n const Point3 = eddsa2.Point;\n const legacy = Object.assign({}, eddsa2, {\n ExtendedPoint: Point3,\n CURVE: c4,\n nBitLength: Point3.Fn.BITS,\n nByteLength: Point3.Fn.BYTES\n });\n return legacy;\n }\n function twistedEdwards(c4) {\n const { CURVE, curveOpts, hash: hash3, eddsaOpts } = _eddsa_legacy_opts_to_new(c4);\n const Point3 = edwards(CURVE, curveOpts);\n const EDDSA = eddsa(Point3, hash3, eddsaOpts);\n return _eddsa_new_output_to_legacy(c4, EDDSA);\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/hash-to-curve.js\n var require_hash_to_curve2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/hash-to-curve.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3._DST_scalar = void 0;\n exports3.expand_message_xmd = expand_message_xmd2;\n exports3.expand_message_xof = expand_message_xof2;\n exports3.hash_to_field = hash_to_field2;\n exports3.isogenyMap = isogenyMap2;\n exports3.createHasher = createHasher3;\n var utils_ts_1 = require_utils13();\n var modular_ts_1 = require_modular2();\n var os2ip2 = utils_ts_1.bytesToNumberBE;\n function i2osp2(value, length) {\n anum2(value);\n anum2(length);\n if (value < 0 || value >= 1 << 8 * length)\n throw new Error(\"invalid I2OSP input: \" + value);\n const res = Array.from({ length }).fill(0);\n for (let i3 = length - 1; i3 >= 0; i3--) {\n res[i3] = value & 255;\n value >>>= 8;\n }\n return new Uint8Array(res);\n }\n function strxor2(a3, b4) {\n const arr = new Uint8Array(a3.length);\n for (let i3 = 0; i3 < a3.length; i3++) {\n arr[i3] = a3[i3] ^ b4[i3];\n }\n return arr;\n }\n function anum2(item) {\n if (!Number.isSafeInteger(item))\n throw new Error(\"number expected\");\n }\n function normDST(DST) {\n if (!(0, utils_ts_1.isBytes)(DST) && typeof DST !== \"string\")\n throw new Error(\"DST must be Uint8Array or string\");\n return typeof DST === \"string\" ? (0, utils_ts_1.utf8ToBytes)(DST) : DST;\n }\n function expand_message_xmd2(msg, DST, lenInBytes, H3) {\n (0, utils_ts_1.abytes)(msg);\n anum2(lenInBytes);\n DST = normDST(DST);\n if (DST.length > 255)\n DST = H3((0, utils_ts_1.concatBytes)((0, utils_ts_1.utf8ToBytes)(\"H2C-OVERSIZE-DST-\"), DST));\n const { outputLen: b_in_bytes, blockLen: r_in_bytes } = H3;\n const ell = Math.ceil(lenInBytes / b_in_bytes);\n if (lenInBytes > 65535 || ell > 255)\n throw new Error(\"expand_message_xmd: invalid lenInBytes\");\n const DST_prime = (0, utils_ts_1.concatBytes)(DST, i2osp2(DST.length, 1));\n const Z_pad = i2osp2(0, r_in_bytes);\n const l_i_b_str = i2osp2(lenInBytes, 2);\n const b4 = new Array(ell);\n const b_0 = H3((0, utils_ts_1.concatBytes)(Z_pad, msg, l_i_b_str, i2osp2(0, 1), DST_prime));\n b4[0] = H3((0, utils_ts_1.concatBytes)(b_0, i2osp2(1, 1), DST_prime));\n for (let i3 = 1; i3 <= ell; i3++) {\n const args = [strxor2(b_0, b4[i3 - 1]), i2osp2(i3 + 1, 1), DST_prime];\n b4[i3] = H3((0, utils_ts_1.concatBytes)(...args));\n }\n const pseudo_random_bytes = (0, utils_ts_1.concatBytes)(...b4);\n return pseudo_random_bytes.slice(0, lenInBytes);\n }\n function expand_message_xof2(msg, DST, lenInBytes, k4, H3) {\n (0, utils_ts_1.abytes)(msg);\n anum2(lenInBytes);\n DST = normDST(DST);\n if (DST.length > 255) {\n const dkLen = Math.ceil(2 * k4 / 8);\n DST = H3.create({ dkLen }).update((0, utils_ts_1.utf8ToBytes)(\"H2C-OVERSIZE-DST-\")).update(DST).digest();\n }\n if (lenInBytes > 65535 || DST.length > 255)\n throw new Error(\"expand_message_xof: invalid lenInBytes\");\n return H3.create({ dkLen: lenInBytes }).update(msg).update(i2osp2(lenInBytes, 2)).update(DST).update(i2osp2(DST.length, 1)).digest();\n }\n function hash_to_field2(msg, count, options) {\n (0, utils_ts_1._validateObject)(options, {\n p: \"bigint\",\n m: \"number\",\n k: \"number\",\n hash: \"function\"\n });\n const { p: p4, k: k4, m: m2, hash: hash3, expand, DST } = options;\n if (!(0, utils_ts_1.isHash)(options.hash))\n throw new Error(\"expected valid hash\");\n (0, utils_ts_1.abytes)(msg);\n anum2(count);\n const log2p = p4.toString(2).length;\n const L2 = Math.ceil((log2p + k4) / 8);\n const len_in_bytes = count * m2 * L2;\n let prb;\n if (expand === \"xmd\") {\n prb = expand_message_xmd2(msg, DST, len_in_bytes, hash3);\n } else if (expand === \"xof\") {\n prb = expand_message_xof2(msg, DST, len_in_bytes, k4, hash3);\n } else if (expand === \"_internal_pass\") {\n prb = msg;\n } else {\n throw new Error('expand must be \"xmd\" or \"xof\"');\n }\n const u2 = new Array(count);\n for (let i3 = 0; i3 < count; i3++) {\n const e2 = new Array(m2);\n for (let j2 = 0; j2 < m2; j2++) {\n const elm_offset = L2 * (j2 + i3 * m2);\n const tv = prb.subarray(elm_offset, elm_offset + L2);\n e2[j2] = (0, modular_ts_1.mod)(os2ip2(tv), p4);\n }\n u2[i3] = e2;\n }\n return u2;\n }\n function isogenyMap2(field, map) {\n const coeff = map.map((i3) => Array.from(i3).reverse());\n return (x4, y6) => {\n const [xn, xd, yn, yd] = coeff.map((val) => val.reduce((acc, i3) => field.add(field.mul(acc, x4), i3)));\n const [xd_inv, yd_inv] = (0, modular_ts_1.FpInvertBatch)(field, [xd, yd], true);\n x4 = field.mul(xn, xd_inv);\n y6 = field.mul(y6, field.mul(yn, yd_inv));\n return { x: x4, y: y6 };\n };\n }\n exports3._DST_scalar = (0, utils_ts_1.utf8ToBytes)(\"HashToScalar-\");\n function createHasher3(Point3, mapToCurve, defaults) {\n if (typeof mapToCurve !== \"function\")\n throw new Error(\"mapToCurve() must be defined\");\n function map(num2) {\n return Point3.fromAffine(mapToCurve(num2));\n }\n function clear(initial) {\n const P2 = initial.clearCofactor();\n if (P2.equals(Point3.ZERO))\n return Point3.ZERO;\n P2.assertValidity();\n return P2;\n }\n return {\n defaults,\n hashToCurve(msg, options) {\n const opts = Object.assign({}, defaults, options);\n const u2 = hash_to_field2(msg, 2, opts);\n const u0 = map(u2[0]);\n const u1 = map(u2[1]);\n return clear(u0.add(u1));\n },\n encodeToCurve(msg, options) {\n const optsDst = defaults.encodeDST ? { DST: defaults.encodeDST } : {};\n const opts = Object.assign({}, defaults, optsDst, options);\n const u2 = hash_to_field2(msg, 1, opts);\n const u0 = map(u2[0]);\n return clear(u0);\n },\n /** See {@link H2CHasher} */\n mapToCurve(scalars) {\n if (!Array.isArray(scalars))\n throw new Error(\"expected array of bigints\");\n for (const i3 of scalars)\n if (typeof i3 !== \"bigint\")\n throw new Error(\"expected array of bigints\");\n return clear(map(scalars));\n },\n // hash_to_scalar can produce 0: https://www.rfc-editor.org/errata/eid8393\n // RFC 9380, draft-irtf-cfrg-bbs-signatures-08\n hashToScalar(msg, options) {\n const N4 = Point3.Fn.ORDER;\n const opts = Object.assign({}, defaults, { p: N4, m: 1, DST: exports3._DST_scalar }, options);\n return hash_to_field2(msg, 1, opts)[0][0];\n }\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/montgomery.js\n var require_montgomery = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/montgomery.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.montgomery = montgomery;\n var utils_ts_1 = require_utils13();\n var modular_ts_1 = require_modular2();\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n function validateOpts3(curve) {\n (0, utils_ts_1._validateObject)(curve, {\n adjustScalarBytes: \"function\",\n powPminus2: \"function\"\n });\n return Object.freeze({ ...curve });\n }\n function montgomery(curveDef) {\n const CURVE = validateOpts3(curveDef);\n const { P: P2, type, adjustScalarBytes, powPminus2, randomBytes: rand } = CURVE;\n const is25519 = type === \"x25519\";\n if (!is25519 && type !== \"x448\")\n throw new Error(\"invalid type\");\n const randomBytes_ = rand || utils_ts_1.randomBytes;\n const montgomeryBits = is25519 ? 255 : 448;\n const fieldLen = is25519 ? 32 : 56;\n const Gu = is25519 ? BigInt(9) : BigInt(5);\n const a24 = is25519 ? BigInt(121665) : BigInt(39081);\n const minScalar = is25519 ? _2n8 ** BigInt(254) : _2n8 ** BigInt(447);\n const maxAdded = is25519 ? BigInt(8) * _2n8 ** BigInt(251) - _1n11 : BigInt(4) * _2n8 ** BigInt(445) - _1n11;\n const maxScalar = minScalar + maxAdded + _1n11;\n const modP2 = (n2) => (0, modular_ts_1.mod)(n2, P2);\n const GuBytes = encodeU(Gu);\n function encodeU(u2) {\n return (0, utils_ts_1.numberToBytesLE)(modP2(u2), fieldLen);\n }\n function decodeU(u2) {\n const _u = (0, utils_ts_1.ensureBytes)(\"u coordinate\", u2, fieldLen);\n if (is25519)\n _u[31] &= 127;\n return modP2((0, utils_ts_1.bytesToNumberLE)(_u));\n }\n function decodeScalar(scalar) {\n return (0, utils_ts_1.bytesToNumberLE)(adjustScalarBytes((0, utils_ts_1.ensureBytes)(\"scalar\", scalar, fieldLen)));\n }\n function scalarMult(scalar, u2) {\n const pu = montgomeryLadder(decodeU(u2), decodeScalar(scalar));\n if (pu === _0n11)\n throw new Error(\"invalid private or public key received\");\n return encodeU(pu);\n }\n function scalarMultBase(scalar) {\n return scalarMult(scalar, GuBytes);\n }\n function cswap(swap, x_2, x_3) {\n const dummy = modP2(swap * (x_2 - x_3));\n x_2 = modP2(x_2 - dummy);\n x_3 = modP2(x_3 + dummy);\n return { x_2, x_3 };\n }\n function montgomeryLadder(u2, scalar) {\n (0, utils_ts_1.aInRange)(\"u\", u2, _0n11, P2);\n (0, utils_ts_1.aInRange)(\"scalar\", scalar, minScalar, maxScalar);\n const k4 = scalar;\n const x_1 = u2;\n let x_2 = _1n11;\n let z_2 = _0n11;\n let x_3 = u2;\n let z_3 = _1n11;\n let swap = _0n11;\n for (let t3 = BigInt(montgomeryBits - 1); t3 >= _0n11; t3--) {\n const k_t = k4 >> t3 & _1n11;\n swap ^= k_t;\n ({ x_2, x_3 } = cswap(swap, x_2, x_3));\n ({ x_2: z_2, x_3: z_3 } = cswap(swap, z_2, z_3));\n swap = k_t;\n const A4 = x_2 + z_2;\n const AA = modP2(A4 * A4);\n const B2 = x_2 - z_2;\n const BB = modP2(B2 * B2);\n const E2 = AA - BB;\n const C = x_3 + z_3;\n const D2 = x_3 - z_3;\n const DA = modP2(D2 * A4);\n const CB = modP2(C * B2);\n const dacb = DA + CB;\n const da_cb = DA - CB;\n x_3 = modP2(dacb * dacb);\n z_3 = modP2(x_1 * modP2(da_cb * da_cb));\n x_2 = modP2(AA * BB);\n z_2 = modP2(E2 * (AA + modP2(a24 * E2)));\n }\n ({ x_2, x_3 } = cswap(swap, x_2, x_3));\n ({ x_2: z_2, x_3: z_3 } = cswap(swap, z_2, z_3));\n const z2 = powPminus2(z_2);\n return modP2(x_2 * z2);\n }\n const lengths = {\n secretKey: fieldLen,\n publicKey: fieldLen,\n seed: fieldLen\n };\n const randomSecretKey = (seed = randomBytes_(fieldLen)) => {\n (0, utils_ts_1.abytes)(seed, lengths.seed);\n return seed;\n };\n function keygen(seed) {\n const secretKey = randomSecretKey(seed);\n return { secretKey, publicKey: scalarMultBase(secretKey) };\n }\n const utils = {\n randomSecretKey,\n randomPrivateKey: randomSecretKey\n };\n return {\n keygen,\n getSharedSecret: (secretKey, publicKey) => scalarMult(secretKey, publicKey),\n getPublicKey: (secretKey) => scalarMultBase(secretKey),\n scalarMult,\n scalarMultBase,\n utils,\n GuBytes: GuBytes.slice(),\n lengths\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/ed25519.js\n var require_ed25519 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/ed25519.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.hash_to_ristretto255 = exports3.hashToRistretto255 = exports3.encodeToCurve = exports3.hashToCurve = exports3.RistrettoPoint = exports3.edwardsToMontgomery = exports3.ED25519_TORSION_SUBGROUP = exports3.ristretto255_hasher = exports3.ristretto255 = exports3.ed25519_hasher = exports3.x25519 = exports3.ed25519ph = exports3.ed25519ctx = exports3.ed25519 = void 0;\n exports3.edwardsToMontgomeryPub = edwardsToMontgomeryPub;\n exports3.edwardsToMontgomeryPriv = edwardsToMontgomeryPriv;\n var sha2_js_1 = require_sha23();\n var utils_js_1 = require_utils12();\n var curve_ts_1 = require_curve3();\n var edwards_ts_1 = require_edwards2();\n var hash_to_curve_ts_1 = require_hash_to_curve2();\n var modular_ts_1 = require_modular2();\n var montgomery_ts_1 = require_montgomery();\n var utils_ts_1 = require_utils13();\n var _0n11 = /* @__PURE__ */ BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n var _3n5 = BigInt(3);\n var _5n3 = BigInt(5);\n var _8n3 = BigInt(8);\n var ed25519_CURVE_p = BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed\");\n var ed25519_CURVE = /* @__PURE__ */ (() => ({\n p: ed25519_CURVE_p,\n n: BigInt(\"0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed\"),\n h: _8n3,\n a: BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec\"),\n d: BigInt(\"0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3\"),\n Gx: BigInt(\"0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a\"),\n Gy: BigInt(\"0x6666666666666666666666666666666666666666666666666666666666666658\")\n }))();\n function ed25519_pow_2_252_3(x4) {\n const _10n = BigInt(10), _20n = BigInt(20), _40n = BigInt(40), _80n = BigInt(80);\n const P2 = ed25519_CURVE_p;\n const x22 = x4 * x4 % P2;\n const b22 = x22 * x4 % P2;\n const b4 = (0, modular_ts_1.pow2)(b22, _2n8, P2) * b22 % P2;\n const b5 = (0, modular_ts_1.pow2)(b4, _1n11, P2) * x4 % P2;\n const b10 = (0, modular_ts_1.pow2)(b5, _5n3, P2) * b5 % P2;\n const b20 = (0, modular_ts_1.pow2)(b10, _10n, P2) * b10 % P2;\n const b40 = (0, modular_ts_1.pow2)(b20, _20n, P2) * b20 % P2;\n const b80 = (0, modular_ts_1.pow2)(b40, _40n, P2) * b40 % P2;\n const b160 = (0, modular_ts_1.pow2)(b80, _80n, P2) * b80 % P2;\n const b240 = (0, modular_ts_1.pow2)(b160, _80n, P2) * b80 % P2;\n const b250 = (0, modular_ts_1.pow2)(b240, _10n, P2) * b10 % P2;\n const pow_p_5_8 = (0, modular_ts_1.pow2)(b250, _2n8, P2) * x4 % P2;\n return { pow_p_5_8, b2: b22 };\n }\n function adjustScalarBytes(bytes) {\n bytes[0] &= 248;\n bytes[31] &= 127;\n bytes[31] |= 64;\n return bytes;\n }\n var ED25519_SQRT_M1 = /* @__PURE__ */ BigInt(\"19681161376707505956807079304988542015446066515923890162744021073123829784752\");\n function uvRatio(u2, v2) {\n const P2 = ed25519_CURVE_p;\n const v32 = (0, modular_ts_1.mod)(v2 * v2 * v2, P2);\n const v7 = (0, modular_ts_1.mod)(v32 * v32 * v2, P2);\n const pow3 = ed25519_pow_2_252_3(u2 * v7).pow_p_5_8;\n let x4 = (0, modular_ts_1.mod)(u2 * v32 * pow3, P2);\n const vx2 = (0, modular_ts_1.mod)(v2 * x4 * x4, P2);\n const root1 = x4;\n const root2 = (0, modular_ts_1.mod)(x4 * ED25519_SQRT_M1, P2);\n const useRoot1 = vx2 === u2;\n const useRoot2 = vx2 === (0, modular_ts_1.mod)(-u2, P2);\n const noRoot = vx2 === (0, modular_ts_1.mod)(-u2 * ED25519_SQRT_M1, P2);\n if (useRoot1)\n x4 = root1;\n if (useRoot2 || noRoot)\n x4 = root2;\n if ((0, modular_ts_1.isNegativeLE)(x4, P2))\n x4 = (0, modular_ts_1.mod)(-x4, P2);\n return { isValid: useRoot1 || useRoot2, value: x4 };\n }\n var Fp = /* @__PURE__ */ (() => (0, modular_ts_1.Field)(ed25519_CURVE.p, { isLE: true }))();\n var Fn = /* @__PURE__ */ (() => (0, modular_ts_1.Field)(ed25519_CURVE.n, { isLE: true }))();\n var ed25519Defaults = /* @__PURE__ */ (() => ({\n ...ed25519_CURVE,\n Fp,\n hash: sha2_js_1.sha512,\n adjustScalarBytes,\n // dom2\n // Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.\n // Constant-time, u/√v\n uvRatio\n }))();\n exports3.ed25519 = (() => (0, edwards_ts_1.twistedEdwards)(ed25519Defaults))();\n function ed25519_domain(data, ctx, phflag) {\n if (ctx.length > 255)\n throw new Error(\"Context is too big\");\n return (0, utils_js_1.concatBytes)((0, utils_js_1.utf8ToBytes)(\"SigEd25519 no Ed25519 collisions\"), new Uint8Array([phflag ? 1 : 0, ctx.length]), ctx, data);\n }\n exports3.ed25519ctx = (() => (0, edwards_ts_1.twistedEdwards)({\n ...ed25519Defaults,\n domain: ed25519_domain\n }))();\n exports3.ed25519ph = (() => (0, edwards_ts_1.twistedEdwards)(Object.assign({}, ed25519Defaults, {\n domain: ed25519_domain,\n prehash: sha2_js_1.sha512\n })))();\n exports3.x25519 = (() => {\n const P2 = Fp.ORDER;\n return (0, montgomery_ts_1.montgomery)({\n P: P2,\n type: \"x25519\",\n powPminus2: (x4) => {\n const { pow_p_5_8, b2: b22 } = ed25519_pow_2_252_3(x4);\n return (0, modular_ts_1.mod)((0, modular_ts_1.pow2)(pow_p_5_8, _3n5, P2) * b22, P2);\n },\n adjustScalarBytes\n });\n })();\n var ELL2_C1 = /* @__PURE__ */ (() => (ed25519_CURVE_p + _3n5) / _8n3)();\n var ELL2_C2 = /* @__PURE__ */ (() => Fp.pow(_2n8, ELL2_C1))();\n var ELL2_C3 = /* @__PURE__ */ (() => Fp.sqrt(Fp.neg(Fp.ONE)))();\n function map_to_curve_elligator2_curve25519(u2) {\n const ELL2_C4 = (ed25519_CURVE_p - _5n3) / _8n3;\n const ELL2_J = BigInt(486662);\n let tv1 = Fp.sqr(u2);\n tv1 = Fp.mul(tv1, _2n8);\n let xd = Fp.add(tv1, Fp.ONE);\n let x1n = Fp.neg(ELL2_J);\n let tv2 = Fp.sqr(xd);\n let gxd = Fp.mul(tv2, xd);\n let gx1 = Fp.mul(tv1, ELL2_J);\n gx1 = Fp.mul(gx1, x1n);\n gx1 = Fp.add(gx1, tv2);\n gx1 = Fp.mul(gx1, x1n);\n let tv3 = Fp.sqr(gxd);\n tv2 = Fp.sqr(tv3);\n tv3 = Fp.mul(tv3, gxd);\n tv3 = Fp.mul(tv3, gx1);\n tv2 = Fp.mul(tv2, tv3);\n let y11 = Fp.pow(tv2, ELL2_C4);\n y11 = Fp.mul(y11, tv3);\n let y12 = Fp.mul(y11, ELL2_C3);\n tv2 = Fp.sqr(y11);\n tv2 = Fp.mul(tv2, gxd);\n let e1 = Fp.eql(tv2, gx1);\n let y1 = Fp.cmov(y12, y11, e1);\n let x2n = Fp.mul(x1n, tv1);\n let y21 = Fp.mul(y11, u2);\n y21 = Fp.mul(y21, ELL2_C2);\n let y22 = Fp.mul(y21, ELL2_C3);\n let gx2 = Fp.mul(gx1, tv1);\n tv2 = Fp.sqr(y21);\n tv2 = Fp.mul(tv2, gxd);\n let e2 = Fp.eql(tv2, gx2);\n let y23 = Fp.cmov(y22, y21, e2);\n tv2 = Fp.sqr(y1);\n tv2 = Fp.mul(tv2, gxd);\n let e3 = Fp.eql(tv2, gx1);\n let xn = Fp.cmov(x2n, x1n, e3);\n let y6 = Fp.cmov(y23, y1, e3);\n let e4 = Fp.isOdd(y6);\n y6 = Fp.cmov(y6, Fp.neg(y6), e3 !== e4);\n return { xMn: xn, xMd: xd, yMn: y6, yMd: _1n11 };\n }\n var ELL2_C1_EDWARDS = /* @__PURE__ */ (() => (0, modular_ts_1.FpSqrtEven)(Fp, Fp.neg(BigInt(486664))))();\n function map_to_curve_elligator2_edwards25519(u2) {\n const { xMn, xMd, yMn, yMd } = map_to_curve_elligator2_curve25519(u2);\n let xn = Fp.mul(xMn, yMd);\n xn = Fp.mul(xn, ELL2_C1_EDWARDS);\n let xd = Fp.mul(xMd, yMn);\n let yn = Fp.sub(xMn, xMd);\n let yd = Fp.add(xMn, xMd);\n let tv1 = Fp.mul(xd, yd);\n let e2 = Fp.eql(tv1, Fp.ZERO);\n xn = Fp.cmov(xn, Fp.ZERO, e2);\n xd = Fp.cmov(xd, Fp.ONE, e2);\n yn = Fp.cmov(yn, Fp.ONE, e2);\n yd = Fp.cmov(yd, Fp.ONE, e2);\n const [xd_inv, yd_inv] = (0, modular_ts_1.FpInvertBatch)(Fp, [xd, yd], true);\n return { x: Fp.mul(xn, xd_inv), y: Fp.mul(yn, yd_inv) };\n }\n exports3.ed25519_hasher = (() => (0, hash_to_curve_ts_1.createHasher)(exports3.ed25519.Point, (scalars) => map_to_curve_elligator2_edwards25519(scalars[0]), {\n DST: \"edwards25519_XMD:SHA-512_ELL2_RO_\",\n encodeDST: \"edwards25519_XMD:SHA-512_ELL2_NU_\",\n p: ed25519_CURVE_p,\n m: 1,\n k: 128,\n expand: \"xmd\",\n hash: sha2_js_1.sha512\n }))();\n var SQRT_M1 = ED25519_SQRT_M1;\n var SQRT_AD_MINUS_ONE = /* @__PURE__ */ BigInt(\"25063068953384623474111414158702152701244531502492656460079210482610430750235\");\n var INVSQRT_A_MINUS_D = /* @__PURE__ */ BigInt(\"54469307008909316920995813868745141605393597292927456921205312896311721017578\");\n var ONE_MINUS_D_SQ = /* @__PURE__ */ BigInt(\"1159843021668779879193775521855586647937357759715417654439879720876111806838\");\n var D_MINUS_ONE_SQ = /* @__PURE__ */ BigInt(\"40440834346308536858101042469323190826248399146238708352240133220865137265952\");\n var invertSqrt = (number) => uvRatio(_1n11, number);\n var MAX_255B = /* @__PURE__ */ BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n var bytes255ToNumberLE = (bytes) => exports3.ed25519.Point.Fp.create((0, utils_ts_1.bytesToNumberLE)(bytes) & MAX_255B);\n function calcElligatorRistrettoMap(r0) {\n const { d: d5 } = ed25519_CURVE;\n const P2 = ed25519_CURVE_p;\n const mod3 = (n2) => Fp.create(n2);\n const r2 = mod3(SQRT_M1 * r0 * r0);\n const Ns = mod3((r2 + _1n11) * ONE_MINUS_D_SQ);\n let c4 = BigInt(-1);\n const D2 = mod3((c4 - d5 * r2) * mod3(r2 + d5));\n let { isValid: Ns_D_is_sq, value: s4 } = uvRatio(Ns, D2);\n let s_ = mod3(s4 * r0);\n if (!(0, modular_ts_1.isNegativeLE)(s_, P2))\n s_ = mod3(-s_);\n if (!Ns_D_is_sq)\n s4 = s_;\n if (!Ns_D_is_sq)\n c4 = r2;\n const Nt = mod3(c4 * (r2 - _1n11) * D_MINUS_ONE_SQ - D2);\n const s22 = s4 * s4;\n const W0 = mod3((s4 + s4) * D2);\n const W1 = mod3(Nt * SQRT_AD_MINUS_ONE);\n const W2 = mod3(_1n11 - s22);\n const W3 = mod3(_1n11 + s22);\n return new exports3.ed25519.Point(mod3(W0 * W3), mod3(W2 * W1), mod3(W1 * W3), mod3(W0 * W2));\n }\n function ristretto255_map(bytes) {\n (0, utils_js_1.abytes)(bytes, 64);\n const r1 = bytes255ToNumberLE(bytes.subarray(0, 32));\n const R1 = calcElligatorRistrettoMap(r1);\n const r2 = bytes255ToNumberLE(bytes.subarray(32, 64));\n const R22 = calcElligatorRistrettoMap(r2);\n return new _RistrettoPoint(R1.add(R22));\n }\n var _RistrettoPoint = class __RistrettoPoint extends edwards_ts_1.PrimeEdwardsPoint {\n constructor(ep) {\n super(ep);\n }\n static fromAffine(ap) {\n return new __RistrettoPoint(exports3.ed25519.Point.fromAffine(ap));\n }\n assertSame(other) {\n if (!(other instanceof __RistrettoPoint))\n throw new Error(\"RistrettoPoint expected\");\n }\n init(ep) {\n return new __RistrettoPoint(ep);\n }\n /** @deprecated use `import { ristretto255_hasher } from '@noble/curves/ed25519.js';` */\n static hashToCurve(hex) {\n return ristretto255_map((0, utils_ts_1.ensureBytes)(\"ristrettoHash\", hex, 64));\n }\n static fromBytes(bytes) {\n (0, utils_js_1.abytes)(bytes, 32);\n const { a: a3, d: d5 } = ed25519_CURVE;\n const P2 = ed25519_CURVE_p;\n const mod3 = (n2) => Fp.create(n2);\n const s4 = bytes255ToNumberLE(bytes);\n if (!(0, utils_ts_1.equalBytes)(Fp.toBytes(s4), bytes) || (0, modular_ts_1.isNegativeLE)(s4, P2))\n throw new Error(\"invalid ristretto255 encoding 1\");\n const s22 = mod3(s4 * s4);\n const u1 = mod3(_1n11 + a3 * s22);\n const u2 = mod3(_1n11 - a3 * s22);\n const u1_2 = mod3(u1 * u1);\n const u2_2 = mod3(u2 * u2);\n const v2 = mod3(a3 * d5 * u1_2 - u2_2);\n const { isValid: isValid2, value: I2 } = invertSqrt(mod3(v2 * u2_2));\n const Dx = mod3(I2 * u2);\n const Dy = mod3(I2 * Dx * v2);\n let x4 = mod3((s4 + s4) * Dx);\n if ((0, modular_ts_1.isNegativeLE)(x4, P2))\n x4 = mod3(-x4);\n const y6 = mod3(u1 * Dy);\n const t3 = mod3(x4 * y6);\n if (!isValid2 || (0, modular_ts_1.isNegativeLE)(t3, P2) || y6 === _0n11)\n throw new Error(\"invalid ristretto255 encoding 2\");\n return new __RistrettoPoint(new exports3.ed25519.Point(x4, y6, _1n11, t3));\n }\n /**\n * Converts ristretto-encoded string to ristretto point.\n * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-decode).\n * @param hex Ristretto-encoded 32 bytes. Not every 32-byte string is valid ristretto encoding\n */\n static fromHex(hex) {\n return __RistrettoPoint.fromBytes((0, utils_ts_1.ensureBytes)(\"ristrettoHex\", hex, 32));\n }\n static msm(points, scalars) {\n return (0, curve_ts_1.pippenger)(__RistrettoPoint, exports3.ed25519.Point.Fn, points, scalars);\n }\n /**\n * Encodes ristretto point to Uint8Array.\n * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-encode).\n */\n toBytes() {\n let { X: X2, Y: Y2, Z: Z2, T: T4 } = this.ep;\n const P2 = ed25519_CURVE_p;\n const mod3 = (n2) => Fp.create(n2);\n const u1 = mod3(mod3(Z2 + Y2) * mod3(Z2 - Y2));\n const u2 = mod3(X2 * Y2);\n const u2sq = mod3(u2 * u2);\n const { value: invsqrt } = invertSqrt(mod3(u1 * u2sq));\n const D1 = mod3(invsqrt * u1);\n const D2 = mod3(invsqrt * u2);\n const zInv = mod3(D1 * D2 * T4);\n let D3;\n if ((0, modular_ts_1.isNegativeLE)(T4 * zInv, P2)) {\n let _x = mod3(Y2 * SQRT_M1);\n let _y = mod3(X2 * SQRT_M1);\n X2 = _x;\n Y2 = _y;\n D3 = mod3(D1 * INVSQRT_A_MINUS_D);\n } else {\n D3 = D2;\n }\n if ((0, modular_ts_1.isNegativeLE)(X2 * zInv, P2))\n Y2 = mod3(-Y2);\n let s4 = mod3((Z2 - Y2) * D3);\n if ((0, modular_ts_1.isNegativeLE)(s4, P2))\n s4 = mod3(-s4);\n return Fp.toBytes(s4);\n }\n /**\n * Compares two Ristretto points.\n * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-equals).\n */\n equals(other) {\n this.assertSame(other);\n const { X: X1, Y: Y1 } = this.ep;\n const { X: X2, Y: Y2 } = other.ep;\n const mod3 = (n2) => Fp.create(n2);\n const one = mod3(X1 * Y2) === mod3(Y1 * X2);\n const two = mod3(Y1 * Y2) === mod3(X1 * X2);\n return one || two;\n }\n is0() {\n return this.equals(__RistrettoPoint.ZERO);\n }\n };\n _RistrettoPoint.BASE = /* @__PURE__ */ (() => new _RistrettoPoint(exports3.ed25519.Point.BASE))();\n _RistrettoPoint.ZERO = /* @__PURE__ */ (() => new _RistrettoPoint(exports3.ed25519.Point.ZERO))();\n _RistrettoPoint.Fp = /* @__PURE__ */ (() => Fp)();\n _RistrettoPoint.Fn = /* @__PURE__ */ (() => Fn)();\n exports3.ristretto255 = { Point: _RistrettoPoint };\n exports3.ristretto255_hasher = {\n hashToCurve(msg, options) {\n const DST = options?.DST || \"ristretto255_XMD:SHA-512_R255MAP_RO_\";\n const xmd = (0, hash_to_curve_ts_1.expand_message_xmd)(msg, DST, 64, sha2_js_1.sha512);\n return ristretto255_map(xmd);\n },\n hashToScalar(msg, options = { DST: hash_to_curve_ts_1._DST_scalar }) {\n const xmd = (0, hash_to_curve_ts_1.expand_message_xmd)(msg, options.DST, 64, sha2_js_1.sha512);\n return Fn.create((0, utils_ts_1.bytesToNumberLE)(xmd));\n }\n };\n exports3.ED25519_TORSION_SUBGROUP = [\n \"0100000000000000000000000000000000000000000000000000000000000000\",\n \"c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a\",\n \"0000000000000000000000000000000000000000000000000000000000000080\",\n \"26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05\",\n \"ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f\",\n \"26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85\",\n \"0000000000000000000000000000000000000000000000000000000000000000\",\n \"c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa\"\n ];\n function edwardsToMontgomeryPub(edwardsPub) {\n return exports3.ed25519.utils.toMontgomery((0, utils_ts_1.ensureBytes)(\"pub\", edwardsPub));\n }\n exports3.edwardsToMontgomery = edwardsToMontgomeryPub;\n function edwardsToMontgomeryPriv(edwardsPriv) {\n return exports3.ed25519.utils.toMontgomerySecret((0, utils_ts_1.ensureBytes)(\"pub\", edwardsPriv));\n }\n exports3.RistrettoPoint = _RistrettoPoint;\n exports3.hashToCurve = (() => exports3.ed25519_hasher.hashToCurve)();\n exports3.encodeToCurve = (() => exports3.ed25519_hasher.encodeToCurve)();\n exports3.hashToRistretto255 = (() => exports3.ristretto255_hasher.hashToCurve)();\n exports3.hash_to_ristretto255 = (() => exports3.ristretto255_hasher.hashToCurve)();\n }\n });\n\n // ../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js\n var require_safe_buffer = __commonJS({\n \"../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var buffer2 = (init_buffer(), __toCommonJS(buffer_exports));\n var Buffer3 = buffer2.Buffer;\n function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n }\n if (Buffer3.from && Buffer3.alloc && Buffer3.allocUnsafe && Buffer3.allocUnsafeSlow) {\n module.exports = buffer2;\n } else {\n copyProps(buffer2, exports3);\n exports3.Buffer = SafeBuffer;\n }\n function SafeBuffer(arg, encodingOrOffset, length) {\n return Buffer3(arg, encodingOrOffset, length);\n }\n SafeBuffer.prototype = Object.create(Buffer3.prototype);\n copyProps(Buffer3, SafeBuffer);\n SafeBuffer.from = function(arg, encodingOrOffset, length) {\n if (typeof arg === \"number\") {\n throw new TypeError(\"Argument must not be a number\");\n }\n return Buffer3(arg, encodingOrOffset, length);\n };\n SafeBuffer.alloc = function(size6, fill, encoding) {\n if (typeof size6 !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n var buf = Buffer3(size6);\n if (fill !== void 0) {\n if (typeof encoding === \"string\") {\n buf.fill(fill, encoding);\n } else {\n buf.fill(fill);\n }\n } else {\n buf.fill(0);\n }\n return buf;\n };\n SafeBuffer.allocUnsafe = function(size6) {\n if (typeof size6 !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n return Buffer3(size6);\n };\n SafeBuffer.allocUnsafeSlow = function(size6) {\n if (typeof size6 !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n return buffer2.SlowBuffer(size6);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/base-x@3.0.11/node_modules/base-x/src/index.js\n var require_src3 = __commonJS({\n \"../../../node_modules/.pnpm/base-x@3.0.11/node_modules/base-x/src/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var _Buffer = require_safe_buffer().Buffer;\n function base4(ALPHABET) {\n if (ALPHABET.length >= 255) {\n throw new TypeError(\"Alphabet too long\");\n }\n var BASE_MAP = new Uint8Array(256);\n for (var j2 = 0; j2 < BASE_MAP.length; j2++) {\n BASE_MAP[j2] = 255;\n }\n for (var i3 = 0; i3 < ALPHABET.length; i3++) {\n var x4 = ALPHABET.charAt(i3);\n var xc = x4.charCodeAt(0);\n if (BASE_MAP[xc] !== 255) {\n throw new TypeError(x4 + \" is ambiguous\");\n }\n BASE_MAP[xc] = i3;\n }\n var BASE = ALPHABET.length;\n var LEADER = ALPHABET.charAt(0);\n var FACTOR = Math.log(BASE) / Math.log(256);\n var iFACTOR = Math.log(256) / Math.log(BASE);\n function encode5(source) {\n if (Array.isArray(source) || source instanceof Uint8Array) {\n source = _Buffer.from(source);\n }\n if (!_Buffer.isBuffer(source)) {\n throw new TypeError(\"Expected Buffer\");\n }\n if (source.length === 0) {\n return \"\";\n }\n var zeroes = 0;\n var length = 0;\n var pbegin = 0;\n var pend = source.length;\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++;\n zeroes++;\n }\n var size6 = (pend - pbegin) * iFACTOR + 1 >>> 0;\n var b58 = new Uint8Array(size6);\n while (pbegin !== pend) {\n var carry = source[pbegin];\n var i4 = 0;\n for (var it1 = size6 - 1; (carry !== 0 || i4 < length) && it1 !== -1; it1--, i4++) {\n carry += 256 * b58[it1] >>> 0;\n b58[it1] = carry % BASE >>> 0;\n carry = carry / BASE >>> 0;\n }\n if (carry !== 0) {\n throw new Error(\"Non-zero carry\");\n }\n length = i4;\n pbegin++;\n }\n var it2 = size6 - length;\n while (it2 !== size6 && b58[it2] === 0) {\n it2++;\n }\n var str = LEADER.repeat(zeroes);\n for (; it2 < size6; ++it2) {\n str += ALPHABET.charAt(b58[it2]);\n }\n return str;\n }\n function decodeUnsafe(source) {\n if (typeof source !== \"string\") {\n throw new TypeError(\"Expected String\");\n }\n if (source.length === 0) {\n return _Buffer.alloc(0);\n }\n var psz = 0;\n var zeroes = 0;\n var length = 0;\n while (source[psz] === LEADER) {\n zeroes++;\n psz++;\n }\n var size6 = (source.length - psz) * FACTOR + 1 >>> 0;\n var b256 = new Uint8Array(size6);\n while (psz < source.length) {\n var charCode = source.charCodeAt(psz);\n if (charCode > 255) {\n return;\n }\n var carry = BASE_MAP[charCode];\n if (carry === 255) {\n return;\n }\n var i4 = 0;\n for (var it3 = size6 - 1; (carry !== 0 || i4 < length) && it3 !== -1; it3--, i4++) {\n carry += BASE * b256[it3] >>> 0;\n b256[it3] = carry % 256 >>> 0;\n carry = carry / 256 >>> 0;\n }\n if (carry !== 0) {\n throw new Error(\"Non-zero carry\");\n }\n length = i4;\n psz++;\n }\n var it4 = size6 - length;\n while (it4 !== size6 && b256[it4] === 0) {\n it4++;\n }\n var vch = _Buffer.allocUnsafe(zeroes + (size6 - it4));\n vch.fill(0, 0, zeroes);\n var j3 = zeroes;\n while (it4 !== size6) {\n vch[j3++] = b256[it4++];\n }\n return vch;\n }\n function decode2(string) {\n var buffer2 = decodeUnsafe(string);\n if (buffer2) {\n return buffer2;\n }\n throw new Error(\"Non-base\" + BASE + \" character\");\n }\n return {\n encode: encode5,\n decodeUnsafe,\n decode: decode2\n };\n }\n module.exports = base4;\n }\n });\n\n // ../../../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js\n var require_bs58 = __commonJS({\n \"../../../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var basex = require_src3();\n var ALPHABET = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n module.exports = basex(ALPHABET);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha256.js\n var require_sha2562 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha256.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha224 = exports3.SHA224 = exports3.sha256 = exports3.SHA256 = void 0;\n var sha2_ts_1 = require_sha23();\n exports3.SHA256 = sha2_ts_1.SHA256;\n exports3.sha256 = sha2_ts_1.sha256;\n exports3.SHA224 = sha2_ts_1.SHA224;\n exports3.sha224 = sha2_ts_1.sha224;\n }\n });\n\n // ../../../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js\n var require_encoding_lib = __commonJS({\n \"../../../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n function inRange3(a3, min, max) {\n return min <= a3 && a3 <= max;\n }\n function ToDictionary(o5) {\n if (o5 === void 0)\n return {};\n if (o5 === Object(o5))\n return o5;\n throw TypeError(\"Could not convert argument to dictionary\");\n }\n function stringToCodePoints(string) {\n var s4 = String(string);\n var n2 = s4.length;\n var i3 = 0;\n var u2 = [];\n while (i3 < n2) {\n var c4 = s4.charCodeAt(i3);\n if (c4 < 55296 || c4 > 57343) {\n u2.push(c4);\n } else if (56320 <= c4 && c4 <= 57343) {\n u2.push(65533);\n } else if (55296 <= c4 && c4 <= 56319) {\n if (i3 === n2 - 1) {\n u2.push(65533);\n } else {\n var d5 = string.charCodeAt(i3 + 1);\n if (56320 <= d5 && d5 <= 57343) {\n var a3 = c4 & 1023;\n var b4 = d5 & 1023;\n u2.push(65536 + (a3 << 10) + b4);\n i3 += 1;\n } else {\n u2.push(65533);\n }\n }\n }\n i3 += 1;\n }\n return u2;\n }\n function codePointsToString(code_points) {\n var s4 = \"\";\n for (var i3 = 0; i3 < code_points.length; ++i3) {\n var cp = code_points[i3];\n if (cp <= 65535) {\n s4 += String.fromCharCode(cp);\n } else {\n cp -= 65536;\n s4 += String.fromCharCode(\n (cp >> 10) + 55296,\n (cp & 1023) + 56320\n );\n }\n }\n return s4;\n }\n var end_of_stream = -1;\n function Stream(tokens) {\n this.tokens = [].slice.call(tokens);\n }\n Stream.prototype = {\n /**\n * @return {boolean} True if end-of-stream has been hit.\n */\n endOfStream: function() {\n return !this.tokens.length;\n },\n /**\n * When a token is read from a stream, the first token in the\n * stream must be returned and subsequently removed, and\n * end-of-stream must be returned otherwise.\n *\n * @return {number} Get the next token from the stream, or\n * end_of_stream.\n */\n read: function() {\n if (!this.tokens.length)\n return end_of_stream;\n return this.tokens.shift();\n },\n /**\n * When one or more tokens are prepended to a stream, those tokens\n * must be inserted, in given order, before the first token in the\n * stream.\n *\n * @param {(number|!Array.)} token The token(s) to prepend to the stream.\n */\n prepend: function(token) {\n if (Array.isArray(token)) {\n var tokens = (\n /**@type {!Array.}*/\n token\n );\n while (tokens.length)\n this.tokens.unshift(tokens.pop());\n } else {\n this.tokens.unshift(token);\n }\n },\n /**\n * When one or more tokens are pushed to a stream, those tokens\n * must be inserted, in given order, after the last token in the\n * stream.\n *\n * @param {(number|!Array.)} token The tokens(s) to prepend to the stream.\n */\n push: function(token) {\n if (Array.isArray(token)) {\n var tokens = (\n /**@type {!Array.}*/\n token\n );\n while (tokens.length)\n this.tokens.push(tokens.shift());\n } else {\n this.tokens.push(token);\n }\n }\n };\n var finished = -1;\n function decoderError(fatal, opt_code_point) {\n if (fatal)\n throw TypeError(\"Decoder error\");\n return opt_code_point || 65533;\n }\n var DEFAULT_ENCODING = \"utf-8\";\n function TextDecoder2(encoding, options) {\n if (!(this instanceof TextDecoder2)) {\n return new TextDecoder2(encoding, options);\n }\n encoding = encoding !== void 0 ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error(\"Encoding not supported. Only utf-8 is supported\");\n }\n options = ToDictionary(options);\n this._streaming = false;\n this._BOMseen = false;\n this._decoder = null;\n this._fatal = Boolean(options[\"fatal\"]);\n this._ignoreBOM = Boolean(options[\"ignoreBOM\"]);\n Object.defineProperty(this, \"encoding\", { value: \"utf-8\" });\n Object.defineProperty(this, \"fatal\", { value: this._fatal });\n Object.defineProperty(this, \"ignoreBOM\", { value: this._ignoreBOM });\n }\n TextDecoder2.prototype = {\n /**\n * @param {ArrayBufferView=} input The buffer of bytes to decode.\n * @param {Object=} options\n * @return {string} The decoded string.\n */\n decode: function decode2(input, options) {\n var bytes;\n if (typeof input === \"object\" && input instanceof ArrayBuffer) {\n bytes = new Uint8Array(input);\n } else if (typeof input === \"object\" && \"buffer\" in input && input.buffer instanceof ArrayBuffer) {\n bytes = new Uint8Array(\n input.buffer,\n input.byteOffset,\n input.byteLength\n );\n } else {\n bytes = new Uint8Array(0);\n }\n options = ToDictionary(options);\n if (!this._streaming) {\n this._decoder = new UTF8Decoder({ fatal: this._fatal });\n this._BOMseen = false;\n }\n this._streaming = Boolean(options[\"stream\"]);\n var input_stream = new Stream(bytes);\n var code_points = [];\n var result;\n while (!input_stream.endOfStream()) {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(\n code_points,\n /**@type {!Array.}*/\n result\n );\n else\n code_points.push(result);\n }\n if (!this._streaming) {\n do {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(\n code_points,\n /**@type {!Array.}*/\n result\n );\n else\n code_points.push(result);\n } while (!input_stream.endOfStream());\n this._decoder = null;\n }\n if (code_points.length) {\n if ([\"utf-8\"].indexOf(this.encoding) !== -1 && !this._ignoreBOM && !this._BOMseen) {\n if (code_points[0] === 65279) {\n this._BOMseen = true;\n code_points.shift();\n } else {\n this._BOMseen = true;\n }\n }\n }\n return codePointsToString(code_points);\n }\n };\n function TextEncoder2(encoding, options) {\n if (!(this instanceof TextEncoder2))\n return new TextEncoder2(encoding, options);\n encoding = encoding !== void 0 ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error(\"Encoding not supported. Only utf-8 is supported\");\n }\n options = ToDictionary(options);\n this._streaming = false;\n this._encoder = null;\n this._options = { fatal: Boolean(options[\"fatal\"]) };\n Object.defineProperty(this, \"encoding\", { value: \"utf-8\" });\n }\n TextEncoder2.prototype = {\n /**\n * @param {string=} opt_string The string to encode.\n * @param {Object=} options\n * @return {Uint8Array} Encoded bytes, as a Uint8Array.\n */\n encode: function encode5(opt_string, options) {\n opt_string = opt_string ? String(opt_string) : \"\";\n options = ToDictionary(options);\n if (!this._streaming)\n this._encoder = new UTF8Encoder(this._options);\n this._streaming = Boolean(options[\"stream\"]);\n var bytes = [];\n var input_stream = new Stream(stringToCodePoints(opt_string));\n var result;\n while (!input_stream.endOfStream()) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(\n bytes,\n /**@type {!Array.}*/\n result\n );\n else\n bytes.push(result);\n }\n if (!this._streaming) {\n while (true) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(\n bytes,\n /**@type {!Array.}*/\n result\n );\n else\n bytes.push(result);\n }\n this._encoder = null;\n }\n return new Uint8Array(bytes);\n }\n };\n function UTF8Decoder(options) {\n var fatal = options.fatal;\n var utf8_code_point = 0, utf8_bytes_seen = 0, utf8_bytes_needed = 0, utf8_lower_boundary = 128, utf8_upper_boundary = 191;\n this.handler = function(stream, bite) {\n if (bite === end_of_stream && utf8_bytes_needed !== 0) {\n utf8_bytes_needed = 0;\n return decoderError(fatal);\n }\n if (bite === end_of_stream)\n return finished;\n if (utf8_bytes_needed === 0) {\n if (inRange3(bite, 0, 127)) {\n return bite;\n }\n if (inRange3(bite, 194, 223)) {\n utf8_bytes_needed = 1;\n utf8_code_point = bite - 192;\n } else if (inRange3(bite, 224, 239)) {\n if (bite === 224)\n utf8_lower_boundary = 160;\n if (bite === 237)\n utf8_upper_boundary = 159;\n utf8_bytes_needed = 2;\n utf8_code_point = bite - 224;\n } else if (inRange3(bite, 240, 244)) {\n if (bite === 240)\n utf8_lower_boundary = 144;\n if (bite === 244)\n utf8_upper_boundary = 143;\n utf8_bytes_needed = 3;\n utf8_code_point = bite - 240;\n } else {\n return decoderError(fatal);\n }\n utf8_code_point = utf8_code_point << 6 * utf8_bytes_needed;\n return null;\n }\n if (!inRange3(bite, utf8_lower_boundary, utf8_upper_boundary)) {\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n utf8_lower_boundary = 128;\n utf8_upper_boundary = 191;\n stream.prepend(bite);\n return decoderError(fatal);\n }\n utf8_lower_boundary = 128;\n utf8_upper_boundary = 191;\n utf8_bytes_seen += 1;\n utf8_code_point += bite - 128 << 6 * (utf8_bytes_needed - utf8_bytes_seen);\n if (utf8_bytes_seen !== utf8_bytes_needed)\n return null;\n var code_point = utf8_code_point;\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n return code_point;\n };\n }\n function UTF8Encoder(options) {\n var fatal = options.fatal;\n this.handler = function(stream, code_point) {\n if (code_point === end_of_stream)\n return finished;\n if (inRange3(code_point, 0, 127))\n return code_point;\n var count, offset;\n if (inRange3(code_point, 128, 2047)) {\n count = 1;\n offset = 192;\n } else if (inRange3(code_point, 2048, 65535)) {\n count = 2;\n offset = 224;\n } else if (inRange3(code_point, 65536, 1114111)) {\n count = 3;\n offset = 240;\n }\n var bytes = [(code_point >> 6 * count) + offset];\n while (count > 0) {\n var temp = code_point >> 6 * (count - 1);\n bytes.push(128 | temp & 63);\n count -= 1;\n }\n return bytes;\n };\n }\n exports3.TextEncoder = TextEncoder2;\n exports3.TextDecoder = TextDecoder2;\n }\n });\n\n // ../../../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js\n var require_lib35 = __commonJS({\n \"../../../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding4 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n Object.defineProperty(o5, k22, { enumerable: true, get: function() {\n return m2[k4];\n } });\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __decorate4 = exports3 && exports3.__decorate || function(decorators, target, key, desc) {\n var c4 = arguments.length, r2 = c4 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d5;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r2 = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i3 = decorators.length - 1; i3 >= 0; i3--)\n if (d5 = decorators[i3])\n r2 = (c4 < 3 ? d5(r2) : c4 > 3 ? d5(target, key, r2) : d5(target, key)) || r2;\n return c4 > 3 && r2 && Object.defineProperty(target, key, r2), r2;\n };\n var __importStar4 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.hasOwnProperty.call(mod3, k4))\n __createBinding4(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.deserializeUnchecked = exports3.deserialize = exports3.serialize = exports3.BinaryReader = exports3.BinaryWriter = exports3.BorshError = exports3.baseDecode = exports3.baseEncode = void 0;\n var bn_js_1 = __importDefault4(require_bn());\n var bs58_1 = __importDefault4(require_bs58());\n var encoding = __importStar4(require_encoding_lib());\n var ResolvedTextDecoder = typeof TextDecoder !== \"function\" ? encoding.TextDecoder : TextDecoder;\n var textDecoder = new ResolvedTextDecoder(\"utf-8\", { fatal: true });\n function baseEncode(value) {\n if (typeof value === \"string\") {\n value = Buffer2.from(value, \"utf8\");\n }\n return bs58_1.default.encode(Buffer2.from(value));\n }\n exports3.baseEncode = baseEncode;\n function baseDecode(value) {\n return Buffer2.from(bs58_1.default.decode(value));\n }\n exports3.baseDecode = baseDecode;\n var INITIAL_LENGTH = 1024;\n var BorshError = class extends Error {\n constructor(message) {\n super(message);\n this.fieldPath = [];\n this.originalMessage = message;\n }\n addToFieldPath(fieldName) {\n this.fieldPath.splice(0, 0, fieldName);\n this.message = this.originalMessage + \": \" + this.fieldPath.join(\".\");\n }\n };\n exports3.BorshError = BorshError;\n var BinaryWriter = class {\n constructor() {\n this.buf = Buffer2.alloc(INITIAL_LENGTH);\n this.length = 0;\n }\n maybeResize() {\n if (this.buf.length < 16 + this.length) {\n this.buf = Buffer2.concat([this.buf, Buffer2.alloc(INITIAL_LENGTH)]);\n }\n }\n writeU8(value) {\n this.maybeResize();\n this.buf.writeUInt8(value, this.length);\n this.length += 1;\n }\n writeU16(value) {\n this.maybeResize();\n this.buf.writeUInt16LE(value, this.length);\n this.length += 2;\n }\n writeU32(value) {\n this.maybeResize();\n this.buf.writeUInt32LE(value, this.length);\n this.length += 4;\n }\n writeU64(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 8)));\n }\n writeU128(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 16)));\n }\n writeU256(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 32)));\n }\n writeU512(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 64)));\n }\n writeBuffer(buffer2) {\n this.buf = Buffer2.concat([\n Buffer2.from(this.buf.subarray(0, this.length)),\n buffer2,\n Buffer2.alloc(INITIAL_LENGTH)\n ]);\n this.length += buffer2.length;\n }\n writeString(str) {\n this.maybeResize();\n const b4 = Buffer2.from(str, \"utf8\");\n this.writeU32(b4.length);\n this.writeBuffer(b4);\n }\n writeFixedArray(array) {\n this.writeBuffer(Buffer2.from(array));\n }\n writeArray(array, fn) {\n this.maybeResize();\n this.writeU32(array.length);\n for (const elem of array) {\n this.maybeResize();\n fn(elem);\n }\n }\n toArray() {\n return this.buf.subarray(0, this.length);\n }\n };\n exports3.BinaryWriter = BinaryWriter;\n function handlingRangeError(target, propertyKey, propertyDescriptor) {\n const originalMethod = propertyDescriptor.value;\n propertyDescriptor.value = function(...args) {\n try {\n return originalMethod.apply(this, args);\n } catch (e2) {\n if (e2 instanceof RangeError) {\n const code = e2.code;\n if ([\"ERR_BUFFER_OUT_OF_BOUNDS\", \"ERR_OUT_OF_RANGE\"].indexOf(code) >= 0) {\n throw new BorshError(\"Reached the end of buffer when deserializing\");\n }\n }\n throw e2;\n }\n };\n }\n var BinaryReader = class {\n constructor(buf) {\n this.buf = buf;\n this.offset = 0;\n }\n readU8() {\n const value = this.buf.readUInt8(this.offset);\n this.offset += 1;\n return value;\n }\n readU16() {\n const value = this.buf.readUInt16LE(this.offset);\n this.offset += 2;\n return value;\n }\n readU32() {\n const value = this.buf.readUInt32LE(this.offset);\n this.offset += 4;\n return value;\n }\n readU64() {\n const buf = this.readBuffer(8);\n return new bn_js_1.default(buf, \"le\");\n }\n readU128() {\n const buf = this.readBuffer(16);\n return new bn_js_1.default(buf, \"le\");\n }\n readU256() {\n const buf = this.readBuffer(32);\n return new bn_js_1.default(buf, \"le\");\n }\n readU512() {\n const buf = this.readBuffer(64);\n return new bn_js_1.default(buf, \"le\");\n }\n readBuffer(len) {\n if (this.offset + len > this.buf.length) {\n throw new BorshError(`Expected buffer length ${len} isn't within bounds`);\n }\n const result = this.buf.slice(this.offset, this.offset + len);\n this.offset += len;\n return result;\n }\n readString() {\n const len = this.readU32();\n const buf = this.readBuffer(len);\n try {\n return textDecoder.decode(buf);\n } catch (e2) {\n throw new BorshError(`Error decoding UTF-8 string: ${e2}`);\n }\n }\n readFixedArray(len) {\n return new Uint8Array(this.readBuffer(len));\n }\n readArray(fn) {\n const len = this.readU32();\n const result = Array();\n for (let i3 = 0; i3 < len; ++i3) {\n result.push(fn());\n }\n return result;\n }\n };\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readU8\", null);\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readU16\", null);\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readU32\", null);\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readU64\", null);\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readU128\", null);\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readU256\", null);\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readU512\", null);\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readString\", null);\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readFixedArray\", null);\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readArray\", null);\n exports3.BinaryReader = BinaryReader;\n function capitalizeFirstLetter(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n }\n function serializeField(schema, fieldName, value, fieldType, writer) {\n try {\n if (typeof fieldType === \"string\") {\n writer[`write${capitalizeFirstLetter(fieldType)}`](value);\n } else if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n if (value.length !== fieldType[0]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[0]}, but got ${value.length} bytes`);\n }\n writer.writeFixedArray(value);\n } else if (fieldType.length === 2 && typeof fieldType[1] === \"number\") {\n if (value.length !== fieldType[1]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[1]}, but got ${value.length} bytes`);\n }\n for (let i3 = 0; i3 < fieldType[1]; i3++) {\n serializeField(schema, null, value[i3], fieldType[0], writer);\n }\n } else {\n writer.writeArray(value, (item) => {\n serializeField(schema, fieldName, item, fieldType[0], writer);\n });\n }\n } else if (fieldType.kind !== void 0) {\n switch (fieldType.kind) {\n case \"option\": {\n if (value === null || value === void 0) {\n writer.writeU8(0);\n } else {\n writer.writeU8(1);\n serializeField(schema, fieldName, value, fieldType.type, writer);\n }\n break;\n }\n case \"map\": {\n writer.writeU32(value.size);\n value.forEach((val, key) => {\n serializeField(schema, fieldName, key, fieldType.key, writer);\n serializeField(schema, fieldName, val, fieldType.value, writer);\n });\n break;\n }\n default:\n throw new BorshError(`FieldType ${fieldType} unrecognized`);\n }\n } else {\n serializeStruct(schema, value, writer);\n }\n } catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n }\n function serializeStruct(schema, obj, writer) {\n if (typeof obj.borshSerialize === \"function\") {\n obj.borshSerialize(writer);\n return;\n }\n const structSchema = schema.get(obj.constructor);\n if (!structSchema) {\n throw new BorshError(`Class ${obj.constructor.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n structSchema.fields.map(([fieldName, fieldType]) => {\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n });\n } else if (structSchema.kind === \"enum\") {\n const name = obj[structSchema.field];\n for (let idx = 0; idx < structSchema.values.length; ++idx) {\n const [fieldName, fieldType] = structSchema.values[idx];\n if (fieldName === name) {\n writer.writeU8(idx);\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n break;\n }\n }\n } else {\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${obj.constructor.name}`);\n }\n }\n function serialize(schema, obj, Writer = BinaryWriter) {\n const writer = new Writer();\n serializeStruct(schema, obj, writer);\n return writer.toArray();\n }\n exports3.serialize = serialize;\n function deserializeField(schema, fieldName, fieldType, reader) {\n try {\n if (typeof fieldType === \"string\") {\n return reader[`read${capitalizeFirstLetter(fieldType)}`]();\n }\n if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n return reader.readFixedArray(fieldType[0]);\n } else if (typeof fieldType[1] === \"number\") {\n const arr = [];\n for (let i3 = 0; i3 < fieldType[1]; i3++) {\n arr.push(deserializeField(schema, null, fieldType[0], reader));\n }\n return arr;\n } else {\n return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader));\n }\n }\n if (fieldType.kind === \"option\") {\n const option = reader.readU8();\n if (option) {\n return deserializeField(schema, fieldName, fieldType.type, reader);\n }\n return void 0;\n }\n if (fieldType.kind === \"map\") {\n let map = /* @__PURE__ */ new Map();\n const length = reader.readU32();\n for (let i3 = 0; i3 < length; i3++) {\n const key = deserializeField(schema, fieldName, fieldType.key, reader);\n const val = deserializeField(schema, fieldName, fieldType.value, reader);\n map.set(key, val);\n }\n return map;\n }\n return deserializeStruct(schema, fieldType, reader);\n } catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n }\n function deserializeStruct(schema, classType, reader) {\n if (typeof classType.borshDeserialize === \"function\") {\n return classType.borshDeserialize(reader);\n }\n const structSchema = schema.get(classType);\n if (!structSchema) {\n throw new BorshError(`Class ${classType.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n const result = {};\n for (const [fieldName, fieldType] of schema.get(classType).fields) {\n result[fieldName] = deserializeField(schema, fieldName, fieldType, reader);\n }\n return new classType(result);\n }\n if (structSchema.kind === \"enum\") {\n const idx = reader.readU8();\n if (idx >= structSchema.values.length) {\n throw new BorshError(`Enum index: ${idx} is out of range`);\n }\n const [fieldName, fieldType] = structSchema.values[idx];\n const fieldValue = deserializeField(schema, fieldName, fieldType, reader);\n return new classType({ [fieldName]: fieldValue });\n }\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`);\n }\n function deserialize(schema, classType, buffer2, Reader = BinaryReader) {\n const reader = new Reader(buffer2);\n const result = deserializeStruct(schema, classType, reader);\n if (reader.offset < buffer2.length) {\n throw new BorshError(`Unexpected ${buffer2.length - reader.offset} bytes after deserialized data`);\n }\n return result;\n }\n exports3.deserialize = deserialize;\n function deserializeUnchecked(schema, classType, buffer2, Reader = BinaryReader) {\n const reader = new Reader(buffer2);\n return deserializeStruct(schema, classType, reader);\n }\n exports3.deserializeUnchecked = deserializeUnchecked;\n }\n });\n\n // ../../../node_modules/.pnpm/@solana+buffer-layout@4.0.1/node_modules/@solana/buffer-layout/lib/Layout.js\n var require_Layout = __commonJS({\n \"../../../node_modules/.pnpm/@solana+buffer-layout@4.0.1/node_modules/@solana/buffer-layout/lib/Layout.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.s16 = exports3.s8 = exports3.nu64be = exports3.u48be = exports3.u40be = exports3.u32be = exports3.u24be = exports3.u16be = exports3.nu64 = exports3.u48 = exports3.u40 = exports3.u32 = exports3.u24 = exports3.u16 = exports3.u8 = exports3.offset = exports3.greedy = exports3.Constant = exports3.UTF8 = exports3.CString = exports3.Blob = exports3.Boolean = exports3.BitField = exports3.BitStructure = exports3.VariantLayout = exports3.Union = exports3.UnionLayoutDiscriminator = exports3.UnionDiscriminator = exports3.Structure = exports3.Sequence = exports3.DoubleBE = exports3.Double = exports3.FloatBE = exports3.Float = exports3.NearInt64BE = exports3.NearInt64 = exports3.NearUInt64BE = exports3.NearUInt64 = exports3.IntBE = exports3.Int = exports3.UIntBE = exports3.UInt = exports3.OffsetLayout = exports3.GreedyCount = exports3.ExternalLayout = exports3.bindConstructorLayout = exports3.nameWithProperty = exports3.Layout = exports3.uint8ArrayToBuffer = exports3.checkUint8Array = void 0;\n exports3.constant = exports3.utf8 = exports3.cstr = exports3.blob = exports3.unionLayoutDiscriminator = exports3.union = exports3.seq = exports3.bits = exports3.struct = exports3.f64be = exports3.f64 = exports3.f32be = exports3.f32 = exports3.ns64be = exports3.s48be = exports3.s40be = exports3.s32be = exports3.s24be = exports3.s16be = exports3.ns64 = exports3.s48 = exports3.s40 = exports3.s32 = exports3.s24 = void 0;\n var buffer_1 = (init_buffer(), __toCommonJS(buffer_exports));\n function checkUint8Array(b4) {\n if (!(b4 instanceof Uint8Array)) {\n throw new TypeError(\"b must be a Uint8Array\");\n }\n }\n exports3.checkUint8Array = checkUint8Array;\n function uint8ArrayToBuffer(b4) {\n checkUint8Array(b4);\n return buffer_1.Buffer.from(b4.buffer, b4.byteOffset, b4.length);\n }\n exports3.uint8ArrayToBuffer = uint8ArrayToBuffer;\n var Layout = class {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError(\"span must be an integer\");\n }\n this.span = span;\n this.property = property;\n }\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Uint8Array} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b4, offset) {\n if (0 > this.span) {\n throw new RangeError(\"indeterminate span\");\n }\n return this.span;\n }\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return void 0;\n }\n };\n exports3.Layout = Layout;\n function nameWithProperty(name, lo) {\n if (lo.property) {\n return name + \"[\" + lo.property + \"]\";\n }\n return name;\n }\n exports3.nameWithProperty = nameWithProperty;\n function bindConstructorLayout(Class, layout) {\n if (\"function\" !== typeof Class) {\n throw new TypeError(\"Class must be constructor\");\n }\n if (Object.prototype.hasOwnProperty.call(Class, \"layout_\")) {\n throw new Error(\"Class is already bound to a layout\");\n }\n if (!(layout && layout instanceof Layout)) {\n throw new TypeError(\"layout must be a Layout\");\n }\n if (Object.prototype.hasOwnProperty.call(layout, \"boundConstructor_\")) {\n throw new Error(\"layout is already bound to a constructor\");\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = () => new Class();\n Object.defineProperty(Class.prototype, \"encode\", {\n value(b4, offset) {\n return layout.encode(this, b4, offset);\n },\n writable: true\n });\n Object.defineProperty(Class, \"decode\", {\n value(b4, offset) {\n return layout.decode(b4, offset);\n },\n writable: true\n });\n }\n exports3.bindConstructorLayout = bindConstructorLayout;\n var ExternalLayout = class extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error(\"ExternalLayout is abstract\");\n }\n };\n exports3.ExternalLayout = ExternalLayout;\n var GreedyCount = class extends ExternalLayout {\n constructor(elementSpan = 1, property) {\n if (!Number.isInteger(elementSpan) || 0 >= elementSpan) {\n throw new TypeError(\"elementSpan must be a (positive) integer\");\n }\n super(-1, property);\n this.elementSpan = elementSpan;\n }\n /** @override */\n isCount() {\n return true;\n }\n /** @override */\n decode(b4, offset = 0) {\n checkUint8Array(b4);\n const rem = b4.length - offset;\n return Math.floor(rem / this.elementSpan);\n }\n /** @override */\n encode(src, b4, offset) {\n return 0;\n }\n };\n exports3.GreedyCount = GreedyCount;\n var OffsetLayout = class extends ExternalLayout {\n constructor(layout, offset = 0, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError(\"layout must be a Layout\");\n }\n if (!Number.isInteger(offset)) {\n throw new TypeError(\"offset must be integer or undefined\");\n }\n super(layout.span, property || layout.property);\n this.layout = layout;\n this.offset = offset;\n }\n /** @override */\n isCount() {\n return this.layout instanceof UInt || this.layout instanceof UIntBE;\n }\n /** @override */\n decode(b4, offset = 0) {\n return this.layout.decode(b4, offset + this.offset);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n return this.layout.encode(src, b4, offset + this.offset);\n }\n };\n exports3.OffsetLayout = OffsetLayout;\n var UInt = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b4, offset = 0) {\n return uint8ArrayToBuffer(b4).readUIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n uint8ArrayToBuffer(b4).writeUIntLE(src, offset, this.span);\n return this.span;\n }\n };\n exports3.UInt = UInt;\n var UIntBE = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b4, offset = 0) {\n return uint8ArrayToBuffer(b4).readUIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n uint8ArrayToBuffer(b4).writeUIntBE(src, offset, this.span);\n return this.span;\n }\n };\n exports3.UIntBE = UIntBE;\n var Int = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b4, offset = 0) {\n return uint8ArrayToBuffer(b4).readIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n uint8ArrayToBuffer(b4).writeIntLE(src, offset, this.span);\n return this.span;\n }\n };\n exports3.Int = Int;\n var IntBE = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b4, offset = 0) {\n return uint8ArrayToBuffer(b4).readIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n uint8ArrayToBuffer(b4).writeIntBE(src, offset, this.span);\n return this.span;\n }\n };\n exports3.IntBE = IntBE;\n var V2E32 = Math.pow(2, 32);\n function divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - hi32 * V2E32;\n return { hi32, lo32 };\n }\n function roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n }\n var NearUInt64 = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b4, offset = 0) {\n const buffer2 = uint8ArrayToBuffer(b4);\n const lo32 = buffer2.readUInt32LE(offset);\n const hi32 = buffer2.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n const split3 = divmodInt64(src);\n const buffer2 = uint8ArrayToBuffer(b4);\n buffer2.writeUInt32LE(split3.lo32, offset);\n buffer2.writeUInt32LE(split3.hi32, offset + 4);\n return 8;\n }\n };\n exports3.NearUInt64 = NearUInt64;\n var NearUInt64BE = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b4, offset = 0) {\n const buffer2 = uint8ArrayToBuffer(b4);\n const hi32 = buffer2.readUInt32BE(offset);\n const lo32 = buffer2.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n const split3 = divmodInt64(src);\n const buffer2 = uint8ArrayToBuffer(b4);\n buffer2.writeUInt32BE(split3.hi32, offset);\n buffer2.writeUInt32BE(split3.lo32, offset + 4);\n return 8;\n }\n };\n exports3.NearUInt64BE = NearUInt64BE;\n var NearInt64 = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b4, offset = 0) {\n const buffer2 = uint8ArrayToBuffer(b4);\n const lo32 = buffer2.readUInt32LE(offset);\n const hi32 = buffer2.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n const split3 = divmodInt64(src);\n const buffer2 = uint8ArrayToBuffer(b4);\n buffer2.writeUInt32LE(split3.lo32, offset);\n buffer2.writeInt32LE(split3.hi32, offset + 4);\n return 8;\n }\n };\n exports3.NearInt64 = NearInt64;\n var NearInt64BE = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b4, offset = 0) {\n const buffer2 = uint8ArrayToBuffer(b4);\n const hi32 = buffer2.readInt32BE(offset);\n const lo32 = buffer2.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n const split3 = divmodInt64(src);\n const buffer2 = uint8ArrayToBuffer(b4);\n buffer2.writeInt32BE(split3.hi32, offset);\n buffer2.writeUInt32BE(split3.lo32, offset + 4);\n return 8;\n }\n };\n exports3.NearInt64BE = NearInt64BE;\n var Float = class extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b4, offset = 0) {\n return uint8ArrayToBuffer(b4).readFloatLE(offset);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n uint8ArrayToBuffer(b4).writeFloatLE(src, offset);\n return 4;\n }\n };\n exports3.Float = Float;\n var FloatBE = class extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b4, offset = 0) {\n return uint8ArrayToBuffer(b4).readFloatBE(offset);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n uint8ArrayToBuffer(b4).writeFloatBE(src, offset);\n return 4;\n }\n };\n exports3.FloatBE = FloatBE;\n var Double = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b4, offset = 0) {\n return uint8ArrayToBuffer(b4).readDoubleLE(offset);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n uint8ArrayToBuffer(b4).writeDoubleLE(src, offset);\n return 8;\n }\n };\n exports3.Double = Double;\n var DoubleBE = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b4, offset = 0) {\n return uint8ArrayToBuffer(b4).readDoubleBE(offset);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n uint8ArrayToBuffer(b4).writeDoubleBE(src, offset);\n return 8;\n }\n };\n exports3.DoubleBE = DoubleBE;\n var Sequence = class extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError(\"elementLayout must be a Layout\");\n }\n if (!(count instanceof ExternalLayout && count.isCount() || Number.isInteger(count) && 0 <= count)) {\n throw new TypeError(\"count must be non-negative integer or an unsigned integer ExternalLayout\");\n }\n let span = -1;\n if (!(count instanceof ExternalLayout) && 0 < elementLayout.span) {\n span = count * elementLayout.span;\n }\n super(span, property);\n this.elementLayout = elementLayout;\n this.count = count;\n }\n /** @override */\n getSpan(b4, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b4, offset);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n } else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b4, offset + span);\n ++idx;\n }\n }\n return span;\n }\n /** @override */\n decode(b4, offset = 0) {\n const rv = [];\n let i3 = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b4, offset);\n }\n while (i3 < count) {\n rv.push(this.elementLayout.decode(b4, offset));\n offset += this.elementLayout.getSpan(b4, offset);\n i3 += 1;\n }\n return rv;\n }\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b4, offset = 0) {\n const elo = this.elementLayout;\n const span = src.reduce((span2, v2) => {\n return span2 + elo.encode(v2, b4, offset + span2);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b4, offset);\n }\n return span;\n }\n };\n exports3.Sequence = Sequence;\n var Structure = class extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields) && fields.reduce((acc, v2) => acc && v2 instanceof Layout, true))) {\n throw new TypeError(\"fields must be array of Layout instances\");\n }\n if (\"boolean\" === typeof property && void 0 === decodePrefixes) {\n decodePrefixes = property;\n property = void 0;\n }\n for (const fd of fields) {\n if (0 > fd.span && void 0 === fd.property) {\n throw new Error(\"fields cannot contain unnamed variable-length layout\");\n }\n }\n let span = -1;\n try {\n span = fields.reduce((span2, fd) => span2 + fd.getSpan(), 0);\n } catch (e2) {\n }\n super(span, property);\n this.fields = fields;\n this.decodePrefixes = !!decodePrefixes;\n }\n /** @override */\n getSpan(b4, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span2, fd) => {\n const fsp = fd.getSpan(b4, offset);\n offset += fsp;\n return span2 + fsp;\n }, 0);\n } catch (e2) {\n throw new RangeError(\"indeterminate span\");\n }\n return span;\n }\n /** @override */\n decode(b4, offset = 0) {\n checkUint8Array(b4);\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (void 0 !== fd.property) {\n dest[fd.property] = fd.decode(b4, offset);\n }\n offset += fd.getSpan(b4, offset);\n if (this.decodePrefixes && b4.length === offset) {\n break;\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b4, offset = 0) {\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = 0 < span ? span : 0;\n if (void 0 !== fd.property) {\n const fv = src[fd.property];\n if (void 0 !== fv) {\n lastWrote = fd.encode(fv, b4, offset);\n if (0 > span) {\n span = fd.getSpan(b4, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n return lastOffset + lastWrote - firstOffset;\n }\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (void 0 !== fd.property && 0 < values.length) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if (\"string\" !== typeof property) {\n throw new TypeError(\"property must be string\");\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return void 0;\n }\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if (\"string\" !== typeof property) {\n throw new TypeError(\"property must be string\");\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n } else if (0 <= offset) {\n offset += fd.span;\n }\n }\n return void 0;\n }\n };\n exports3.Structure = Structure;\n var UnionDiscriminator = class {\n constructor(property) {\n this.property = property;\n }\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode(b4, offset) {\n throw new Error(\"UnionDiscriminator is abstract\");\n }\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode(src, b4, offset) {\n throw new Error(\"UnionDiscriminator is abstract\");\n }\n };\n exports3.UnionDiscriminator = UnionDiscriminator;\n var UnionLayoutDiscriminator = class extends UnionDiscriminator {\n constructor(layout, property) {\n if (!(layout instanceof ExternalLayout && layout.isCount())) {\n throw new TypeError(\"layout must be an unsigned integer ExternalLayout\");\n }\n super(property || layout.property || \"variant\");\n this.layout = layout;\n }\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b4, offset) {\n return this.layout.decode(b4, offset);\n }\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b4, offset) {\n return this.layout.encode(src, b4, offset);\n }\n };\n exports3.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\n var Union = class extends Layout {\n constructor(discr, defaultLayout, property) {\n let discriminator;\n if (discr instanceof UInt || discr instanceof UIntBE) {\n discriminator = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n } else if (discr instanceof ExternalLayout && discr.isCount()) {\n discriminator = new UnionLayoutDiscriminator(discr);\n } else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError(\"discr must be a UnionDiscriminator or an unsigned integer layout\");\n } else {\n discriminator = discr;\n }\n if (void 0 === defaultLayout) {\n defaultLayout = null;\n }\n if (!(null === defaultLayout || defaultLayout instanceof Layout)) {\n throw new TypeError(\"defaultLayout must be null or a Layout\");\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error(\"defaultLayout must have constant span\");\n }\n if (void 0 === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate(\"content\");\n }\n }\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if (0 <= span && (discr instanceof UInt || discr instanceof UIntBE)) {\n span += discriminator.layout.span;\n }\n }\n super(span, property);\n this.discriminator = discriminator;\n this.usesPrefixDiscriminator = discr instanceof UInt || discr instanceof UIntBE;\n this.defaultLayout = defaultLayout;\n this.registry = {};\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n this.getSourceVariant = function(src) {\n return boundGetSourceVariant(src);\n };\n this.configGetSourceVariant = function(gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n /** @override */\n getSpan(b4, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n const vlo = this.getVariant(b4, offset);\n if (!vlo) {\n throw new Error(\"unable to determine span for unrecognized variant\");\n }\n return vlo.getSpan(b4, offset);\n }\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisfied rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (Object.prototype.hasOwnProperty.call(src, this.discriminator.property)) {\n if (this.defaultLayout && this.defaultLayout.property && Object.prototype.hasOwnProperty.call(src, this.defaultLayout.property)) {\n return void 0;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo && (!vlo.layout || vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property))) {\n return vlo;\n }\n } else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error(\"unable to infer src variant\");\n }\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b4, offset = 0) {\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b4, offset);\n const clo = this.registry[discr];\n if (void 0 === clo) {\n const defaultLayout = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n dest[defaultLayout.property] = defaultLayout.decode(b4, offset + contentOffset);\n } else {\n dest = clo.decode(b4, offset);\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b4, offset = 0) {\n const vlo = this.getSourceVariant(src);\n if (void 0 === vlo) {\n const dlo = this.discriminator;\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b4, offset);\n return contentOffset + clo.encode(src[clo.property], b4, offset + contentOffset);\n }\n return vlo.encode(src, b4, offset);\n }\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Uint8Array)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Uint8Array}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset = 0) {\n let variant;\n if (vb instanceof Uint8Array) {\n variant = this.discriminator.decode(vb, offset);\n } else {\n variant = vb;\n }\n return this.registry[variant];\n }\n };\n exports3.Union = Union;\n var VariantLayout = class extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError(\"union must be a Union\");\n }\n if (!Number.isInteger(variant) || 0 > variant) {\n throw new TypeError(\"variant must be a (non-negative) integer\");\n }\n if (\"string\" === typeof layout && void 0 === property) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError(\"layout must be a Layout\");\n }\n if (null !== union.defaultLayout && 0 <= layout.span && layout.span > union.defaultLayout.span) {\n throw new Error(\"variant span exceeds span of containing union\");\n }\n if (\"string\" !== typeof property) {\n throw new TypeError(\"variant must have a String property\");\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if (0 <= span && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n this.union = union;\n this.variant = variant;\n this.layout = layout || null;\n }\n /** @override */\n getSpan(b4, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n let span = 0;\n if (this.layout) {\n span = this.layout.getSpan(b4, offset + contentOffset);\n }\n return contentOffset + span;\n }\n /** @override */\n decode(b4, offset = 0) {\n const dest = this.makeDestinationObject();\n if (this !== this.union.getVariant(b4, offset)) {\n throw new Error(\"variant mismatch\");\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b4, offset + contentOffset);\n } else if (this.property) {\n dest[this.property] = true;\n } else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n /** @override */\n encode(src, b4, offset = 0) {\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout && !Object.prototype.hasOwnProperty.call(src, this.property)) {\n throw new TypeError(\"variant lacks property \" + this.property);\n }\n this.union.discriminator.encode(this.variant, b4, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b4, offset + contentOffset);\n span += this.layout.getSpan(b4, offset + contentOffset);\n if (0 <= this.union.span && span > this.union.span) {\n throw new Error(\"encoded variant overruns containing union\");\n }\n }\n return span;\n }\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n return void 0;\n }\n };\n exports3.VariantLayout = VariantLayout;\n function fixBitwiseResult(v2) {\n if (0 > v2) {\n v2 += 4294967296;\n }\n return v2;\n }\n var BitStructure = class extends Layout {\n constructor(word, msb, property) {\n if (!(word instanceof UInt || word instanceof UIntBE)) {\n throw new TypeError(\"word must be a UInt or UIntBE layout\");\n }\n if (\"string\" === typeof msb && void 0 === property) {\n property = msb;\n msb = false;\n }\n if (4 < word.span) {\n throw new RangeError(\"word cannot exceed 32 bits\");\n }\n super(word.span, property);\n this.word = word;\n this.msb = !!msb;\n this.fields = [];\n let value = 0;\n this._packedSetValue = function(v2) {\n value = fixBitwiseResult(v2);\n return this;\n };\n this._packedGetValue = function() {\n return value;\n };\n }\n /** @override */\n decode(b4, offset = 0) {\n const dest = this.makeDestinationObject();\n const value = this.word.decode(b4, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (void 0 !== fd.property) {\n dest[fd.property] = fd.decode(b4);\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b4, offset = 0) {\n const value = this.word.decode(b4, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (void 0 !== fd.property) {\n const fv = src[fd.property];\n if (void 0 !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b4, offset);\n }\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n // `Boolean` conflicts with the native primitive type\n // eslint-disable-next-line @typescript-eslint/ban-types\n addBoolean(property) {\n const bf = new Boolean2(this, property);\n this.fields.push(bf);\n return bf;\n }\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if (\"string\" !== typeof property) {\n throw new TypeError(\"property must be string\");\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return void 0;\n }\n };\n exports3.BitStructure = BitStructure;\n var BitField = class {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError(\"container must be a BitStructure\");\n }\n if (!Number.isInteger(bits) || 0 >= bits) {\n throw new TypeError(\"bits must be positive integer\");\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if (bits + usedBits > totalBits) {\n throw new Error(\"bits too long for span remainder (\" + (totalBits - usedBits) + \" of \" + totalBits + \" remain)\");\n }\n this.container = container;\n this.bits = bits;\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) {\n this.valueMask = 4294967295;\n }\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n this.property = property;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode(b4, offset) {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if (\"number\" !== typeof value || !Number.isInteger(value) || value !== fixBitwiseResult(value & this.valueMask)) {\n throw new TypeError(nameWithProperty(\"BitField.encode\", this) + \" value must be integer not exceeding \" + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask) | wordValue);\n }\n };\n exports3.BitField = BitField;\n var Boolean2 = class extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b4, offset) {\n return !!super.decode(b4, offset);\n }\n /** @override */\n encode(value) {\n if (\"boolean\" === typeof value) {\n value = +value;\n }\n super.encode(value);\n }\n };\n exports3.Boolean = Boolean2;\n var Blob = class extends Layout {\n constructor(length, property) {\n if (!(length instanceof ExternalLayout && length.isCount() || Number.isInteger(length) && 0 <= length)) {\n throw new TypeError(\"length must be positive integer or an unsigned integer ExternalLayout\");\n }\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n this.length = length;\n }\n /** @override */\n getSpan(b4, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b4, offset);\n }\n return span;\n }\n /** @override */\n decode(b4, offset = 0) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b4, offset);\n }\n return uint8ArrayToBuffer(b4).slice(offset, offset + span);\n }\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b4, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(src instanceof Uint8Array && span === src.length)) {\n throw new TypeError(nameWithProperty(\"Blob.encode\", this) + \" requires (length \" + span + \") Uint8Array as src\");\n }\n if (offset + span > b4.length) {\n throw new RangeError(\"encoding overruns Uint8Array\");\n }\n const srcBuffer = uint8ArrayToBuffer(src);\n uint8ArrayToBuffer(b4).write(srcBuffer.toString(\"hex\"), offset, span, \"hex\");\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b4, offset);\n }\n return span;\n }\n };\n exports3.Blob = Blob;\n var CString = class extends Layout {\n constructor(property) {\n super(-1, property);\n }\n /** @override */\n getSpan(b4, offset = 0) {\n checkUint8Array(b4);\n let idx = offset;\n while (idx < b4.length && 0 !== b4[idx]) {\n idx += 1;\n }\n return 1 + idx - offset;\n }\n /** @override */\n decode(b4, offset = 0) {\n const span = this.getSpan(b4, offset);\n return uint8ArrayToBuffer(b4).slice(offset, offset + span - 1).toString(\"utf-8\");\n }\n /** @override */\n encode(src, b4, offset = 0) {\n if (\"string\" !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, \"utf8\");\n const span = srcb.length;\n if (offset + span > b4.length) {\n throw new RangeError(\"encoding overruns Buffer\");\n }\n const buffer2 = uint8ArrayToBuffer(b4);\n srcb.copy(buffer2, offset);\n buffer2[offset + span] = 0;\n return span + 1;\n }\n };\n exports3.CString = CString;\n var UTF8 = class extends Layout {\n constructor(maxSpan, property) {\n if (\"string\" === typeof maxSpan && void 0 === property) {\n property = maxSpan;\n maxSpan = void 0;\n }\n if (void 0 === maxSpan) {\n maxSpan = -1;\n } else if (!Number.isInteger(maxSpan)) {\n throw new TypeError(\"maxSpan must be an integer\");\n }\n super(-1, property);\n this.maxSpan = maxSpan;\n }\n /** @override */\n getSpan(b4, offset = 0) {\n checkUint8Array(b4);\n return b4.length - offset;\n }\n /** @override */\n decode(b4, offset = 0) {\n const span = this.getSpan(b4, offset);\n if (0 <= this.maxSpan && this.maxSpan < span) {\n throw new RangeError(\"text length exceeds maxSpan\");\n }\n return uint8ArrayToBuffer(b4).slice(offset, offset + span).toString(\"utf-8\");\n }\n /** @override */\n encode(src, b4, offset = 0) {\n if (\"string\" !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, \"utf8\");\n const span = srcb.length;\n if (0 <= this.maxSpan && this.maxSpan < span) {\n throw new RangeError(\"text length exceeds maxSpan\");\n }\n if (offset + span > b4.length) {\n throw new RangeError(\"encoding overruns Buffer\");\n }\n srcb.copy(uint8ArrayToBuffer(b4), offset);\n return span;\n }\n };\n exports3.UTF8 = UTF8;\n var Constant = class extends Layout {\n constructor(value, property) {\n super(0, property);\n this.value = value;\n }\n /** @override */\n decode(b4, offset) {\n return this.value;\n }\n /** @override */\n encode(src, b4, offset) {\n return 0;\n }\n };\n exports3.Constant = Constant;\n exports3.greedy = (elementSpan, property) => new GreedyCount(elementSpan, property);\n exports3.offset = (layout, offset, property) => new OffsetLayout(layout, offset, property);\n exports3.u8 = (property) => new UInt(1, property);\n exports3.u16 = (property) => new UInt(2, property);\n exports3.u24 = (property) => new UInt(3, property);\n exports3.u32 = (property) => new UInt(4, property);\n exports3.u40 = (property) => new UInt(5, property);\n exports3.u48 = (property) => new UInt(6, property);\n exports3.nu64 = (property) => new NearUInt64(property);\n exports3.u16be = (property) => new UIntBE(2, property);\n exports3.u24be = (property) => new UIntBE(3, property);\n exports3.u32be = (property) => new UIntBE(4, property);\n exports3.u40be = (property) => new UIntBE(5, property);\n exports3.u48be = (property) => new UIntBE(6, property);\n exports3.nu64be = (property) => new NearUInt64BE(property);\n exports3.s8 = (property) => new Int(1, property);\n exports3.s16 = (property) => new Int(2, property);\n exports3.s24 = (property) => new Int(3, property);\n exports3.s32 = (property) => new Int(4, property);\n exports3.s40 = (property) => new Int(5, property);\n exports3.s48 = (property) => new Int(6, property);\n exports3.ns64 = (property) => new NearInt64(property);\n exports3.s16be = (property) => new IntBE(2, property);\n exports3.s24be = (property) => new IntBE(3, property);\n exports3.s32be = (property) => new IntBE(4, property);\n exports3.s40be = (property) => new IntBE(5, property);\n exports3.s48be = (property) => new IntBE(6, property);\n exports3.ns64be = (property) => new NearInt64BE(property);\n exports3.f32 = (property) => new Float(property);\n exports3.f32be = (property) => new FloatBE(property);\n exports3.f64 = (property) => new Double(property);\n exports3.f64be = (property) => new DoubleBE(property);\n exports3.struct = (fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes);\n exports3.bits = (word, msb, property) => new BitStructure(word, msb, property);\n exports3.seq = (elementLayout, count, property) => new Sequence(elementLayout, count, property);\n exports3.union = (discr, defaultLayout, property) => new Union(discr, defaultLayout, property);\n exports3.unionLayoutDiscriminator = (layout, property) => new UnionLayoutDiscriminator(layout, property);\n exports3.blob = (length, property) => new Blob(length, property);\n exports3.cstr = (property) => new CString(property);\n exports3.utf8 = (maxSpan, property) => new UTF8(maxSpan, property);\n exports3.constant = (value, property) => new Constant(value, property);\n }\n });\n\n // ../../../node_modules/.pnpm/@solana+errors@2.3.0_typescript@5.8.3/node_modules/@solana/errors/dist/index.browser.cjs\n var require_index_browser = __commonJS({\n \"../../../node_modules/.pnpm/@solana+errors@2.3.0_typescript@5.8.3/node_modules/@solana/errors/dist/index.browser.cjs\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED = 1;\n var SOLANA_ERROR__INVALID_NONCE = 2;\n var SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = 3;\n var SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE = 4;\n var SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH = 5;\n var SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE = 6;\n var SOLANA_ERROR__MALFORMED_BIGINT_STRING = 7;\n var SOLANA_ERROR__MALFORMED_NUMBER_STRING = 8;\n var SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE = 9;\n var SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR = 10;\n var SOLANA_ERROR__JSON_RPC__PARSE_ERROR = -32700;\n var SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR = -32603;\n var SOLANA_ERROR__JSON_RPC__INVALID_PARAMS = -32602;\n var SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND = -32601;\n var SOLANA_ERROR__JSON_RPC__INVALID_REQUEST = -32600;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED = -32016;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION = -32015;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET = -32014;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH = -32013;\n var SOLANA_ERROR__JSON_RPC__SCAN_ERROR = -32012;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE = -32011;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX = -32010;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED = -32009;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT = -32008;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED = -32007;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE = -32006;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY = -32005;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE = -32004;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE = -32003;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE = -32002;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP = -32001;\n var SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH = 28e5;\n var SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE = 2800001;\n var SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS = 2800002;\n var SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY = 2800003;\n var SOLANA_ERROR__ADDRESSES__MALFORMED_PDA = 2800004;\n var SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE = 2800005;\n var SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED = 2800006;\n var SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED = 2800007;\n var SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE = 2800008;\n var SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED = 2800009;\n var SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER = 2800010;\n var SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS = 2800011;\n var SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND = 323e4;\n var SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND = 32300001;\n var SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT = 3230002;\n var SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT = 3230003;\n var SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED = 3230004;\n var SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT = 361e4;\n var SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED = 3610001;\n var SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED = 3610002;\n var SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED = 3610003;\n var SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED = 3610004;\n var SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED = 3610005;\n var SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED = 3610006;\n var SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY = 3610007;\n var SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED = 3611e3;\n var SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH = 3704e3;\n var SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH = 3704001;\n var SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH = 3704002;\n var SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE = 3704003;\n var SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY = 3704004;\n var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS = 4128e3;\n var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA = 4128001;\n var SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH = 4128002;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN = 4615e3;\n var SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR = 4615001;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT = 4615002;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA = 4615003;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA = 4615004;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL = 4615005;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS = 4615006;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID = 4615007;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE = 4615008;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED = 4615009;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT = 4615010;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION = 4615011;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID = 4615012;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND = 4615013;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED = 4615014;\n var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE = 4615015;\n var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED = 4615016;\n var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX = 4615017;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED = 4615018;\n var SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED = 4615019;\n var SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS = 4615020;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED = 4615021;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE = 4615022;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED = 4615023;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = 4615024;\n var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC = 4615025;\n var SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM = 4615026;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR = 4615027;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED = 4615028;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE = 4615029;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT = 4615030;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID = 4615031;\n var SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH = 4615032;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT = 4615033;\n var SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED = 4615034;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED = 4615035;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS = 4615036;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC = 4615037;\n var SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED = 4615038;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION = 4615039;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE = 4615040;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE = 4615041;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE = 4615042;\n var SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE = 4615043;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY = 4615044;\n var SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR = 4615045;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT = 4615046;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER = 4615047;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW = 4615048;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR = 4615049;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER = 4615050;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED = 4615051;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED = 4615052;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED = 4615053;\n var SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS = 4615054;\n var SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS = 5508e3;\n var SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER = 5508001;\n var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER = 5508002;\n var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER = 5508003;\n var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER = 5508004;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER = 5508005;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER = 5508006;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER = 5508007;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER = 5508008;\n var SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS = 5508009;\n var SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING = 5508010;\n var SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED = 5508011;\n var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES = 5663e3;\n var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE = 5663001;\n var SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME = 5663002;\n var SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME = 5663003;\n var SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE = 5663004;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING = 5663005;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE = 5663006;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND = 5663007;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING = 5663008;\n var SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING = 5663009;\n var SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING = 5663010;\n var SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING = 5663011;\n var SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING = 5663012;\n var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING = 5663013;\n var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE = 5663014;\n var SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION = 5663015;\n var SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES = 5663016;\n var SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH = 5663017;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT = 5663018;\n var SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT = 5663019;\n var SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT = 5663020;\n var SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN = 705e4;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE = 7050001;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE = 7050002;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND = 7050003;\n var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND = 7050004;\n var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE = 7050005;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE = 7050006;\n var SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED = 7050007;\n var SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND = 7050008;\n var SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP = 7050009;\n var SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE = 7050010;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX = 7050011;\n var SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE = 7050012;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION = 7050013;\n var SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE = 7050014;\n var SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE = 7050015;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = 7050016;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT = 7050017;\n var SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION = 7050018;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT = 7050019;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT = 7050020;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT = 7050021;\n var SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS = 7050022;\n var SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND = 7050023;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER = 7050024;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA = 7050025;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX = 7050026;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT = 7050027;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT = 7050028;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT = 7050029;\n var SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION = 7050030;\n var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT = 7050031;\n var SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED = 7050032;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT = 7050033;\n var SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED = 7050034;\n var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED = 7050035;\n var SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION = 7050036;\n var SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY = 8078e3;\n var SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH = 8078001;\n var SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH = 8078002;\n var SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH = 8078003;\n var SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH = 8078004;\n var SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH = 8078005;\n var SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH = 8078006;\n var SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS = 8078007;\n var SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE = 8078008;\n var SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT = 8078009;\n var SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT = 8078010;\n var SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE = 8078011;\n var SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE = 8078012;\n var SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH = 8078013;\n var SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE = 8078014;\n var SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT = 8078015;\n var SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE = 8078016;\n var SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE = 8078017;\n var SOLANA_ERROR__CODECS__INVALID_CONSTANT = 8078018;\n var SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE = 8078019;\n var SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL = 8078020;\n var SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES = 8078021;\n var SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS = 8078022;\n var SOLANA_ERROR__RPC__INTEGER_OVERFLOW = 81e5;\n var SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN = 8100001;\n var SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR = 8100002;\n var SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD = 8100003;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN = 819e4;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID = 8190001;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED = 8190002;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED = 8190003;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT = 8190004;\n var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING = 99e5;\n var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE = 9900001;\n var SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING = 9900002;\n var SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE = 9900003;\n var SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED = 9900004;\n var SolanaErrorMessages = {\n [SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND]: \"Account not found at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED]: \"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.\",\n [SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT]: \"Expected decoded account at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT]: \"Failed to decode account data at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND]: \"Accounts not found at addresses: $addresses\",\n [SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED]: \"Unable to find a viable program address bump seed.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS]: \"$putativeAddress is not a base58-encoded address.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH]: \"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY]: \"The `CryptoKey` must be an `Ed25519` public key.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS]: \"$putativeOffCurveAddress is not a base58-encoded off-curve address.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE]: \"Invalid seeds; point must fall off the Ed25519 curve.\",\n [SOLANA_ERROR__ADDRESSES__MALFORMED_PDA]: \"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].\",\n [SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED]: \"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.\",\n [SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED]: \"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.\",\n [SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE]: \"Expected program derived address bump to be in the range [0, 255], got: $bump.\",\n [SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER]: \"Program address cannot end with PDA marker.\",\n [SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.\",\n [SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.\",\n [SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: \"The network has progressed past the last block for which this transaction could have been committed.\",\n [SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY]: \"Codec [$codecDescription] cannot decode empty byte arrays.\",\n [SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS]: \"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.\",\n [SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL]: \"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH]: \"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH]: \"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH]: \"Encoder and decoder must either both be fixed-size or variable-size.\",\n [SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE]: \"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.\",\n [SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH]: \"Expected a fixed-size codec, got a variable-size one.\",\n [SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH]: \"Codec [$codecDescription] expected a positive byte length, got $bytesLength.\",\n [SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH]: \"Expected a variable-size codec, got a fixed-size one.\",\n [SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE]: \"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].\",\n [SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH]: \"Codec [$codecDescription] expected $expected bytes, got $bytesLength.\",\n [SOLANA_ERROR__CODECS__INVALID_CONSTANT]: \"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].\",\n [SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT]: \"Invalid discriminated union variant. Expected one of [$variants], got $value.\",\n [SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT]: \"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.\",\n [SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT]: \"Invalid literal union variant. Expected one of [$variants], got $value.\",\n [SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS]: \"Expected [$codecDescription] to have $expected items, got $actual.\",\n [SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE]: \"Invalid value $value for base $base with alphabet $alphabet.\",\n [SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE]: \"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.\",\n [SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE]: \"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.\",\n [SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE]: \"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.\",\n [SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES]: \"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].\",\n [SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE]: \"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.\",\n [SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED]: \"No random values implementation could be found.\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED]: \"instruction requires an uninitialized account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED]: \"instruction tries to borrow reference for an account which is already borrowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING]: \"instruction left account with an outstanding borrowed reference\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED]: \"program other than the account's owner changed the size of the account data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL]: \"account data too small for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE]: \"instruction expected an executable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT]: \"An account does not have enough lamports to be rent-exempt\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW]: \"Program arithmetic overflowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR]: \"Failed to serialize or deserialize account data: $encodedData\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS]: \"Builtin programs must consume compute units\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH]: \"Cross-program invocation call depth too deep\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED]: \"Computational budget exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM]: \"custom program error: #$code\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX]: \"instruction contains duplicate accounts\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC]: \"instruction modifications of multiply-passed account differ\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT]: \"executable accounts must be rent exempt\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED]: \"instruction changed executable accounts data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE]: \"instruction changed the balance of an executable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED]: \"instruction changed executable bit of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED]: \"instruction modified data of an account it does not own\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND]: \"instruction spent from the balance of an account it does not own\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR]: \"generic instruction error\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER]: \"Provided owner is not allowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE]: \"Account is immutable\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY]: \"Incorrect authority provided\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID]: \"incorrect program id for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS]: \"insufficient funds for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA]: \"invalid account data for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER]: \"Invalid account owner\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT]: \"invalid program argument\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR]: \"program returned invalid error code\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA]: \"invalid instruction data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC]: \"Failed to reallocate account data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS]: \"Provided seeds do not result in a valid address\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED]: \"Accounts data allocations exceeded the maximum allowed per transaction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED]: \"Max accounts exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED]: \"Max instruction trace length exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED]: \"Length of the seed is too long for address generation\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT]: \"An account required by the instruction is missing\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE]: \"missing required signature for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID]: \"instruction illegally modified the program id of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS]: \"insufficient account keys for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION]: \"Cross-program invocation with unauthorized signer or writable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE]: \"Failed to create program execution environment\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE]: \"Program failed to compile\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE]: \"Program failed to complete\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED]: \"instruction modified data of a read-only account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE]: \"instruction changed the balance of a read-only account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED]: \"Cross-program invocation reentrancy not allowed for this instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED]: \"instruction modified rent epoch of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION]: \"sum of account balances before and after instruction do not match\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT]: \"instruction requires an initialized account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN]: \"\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID]: \"Unsupported program id\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR]: \"Unsupported sysvar\",\n [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS]: \"The instruction does not have any accounts.\",\n [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA]: \"The instruction does not have any data.\",\n [SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH]: \"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.\",\n [SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH]: \"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__INVALID_NONCE]: \"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING]: \"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED]: \"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE]: \"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING]: \"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE]: \"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR]: \"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__INVALID_PARAMS]: \"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__INVALID_REQUEST]: \"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND]: \"JSON-RPC error: The method does not exist / is not available ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__PARSE_ERROR]: \"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__SCAN_ERROR]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED]: \"Minimum context slot has not been reached\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY]: \"Node is unhealthy; behind by $numSlotsBehind slots\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT]: \"No snapshot\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE]: \"Transaction simulation failed\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE]: \"Transaction history is not available from this node\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH]: \"Transaction signature length mismatch\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE]: \"Transaction signature verification failure\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION]: \"$__serverMessage\",\n [SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH]: \"Key pair bytes must be of length 64, got $byteLength.\",\n [SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH]: \"Expected private key bytes with length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH]: \"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.\",\n [SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY]: \"The provided private key does not match the provided public key.\",\n [SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.\",\n [SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE]: \"Lamports value must be in the range [0, 2e64-1]\",\n [SOLANA_ERROR__MALFORMED_BIGINT_STRING]: \"`$value` cannot be parsed as a `BigInt`\",\n [SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR]: \"$message\",\n [SOLANA_ERROR__MALFORMED_NUMBER_STRING]: \"`$value` cannot be parsed as a `Number`\",\n [SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND]: \"No nonce account could be found at address `$nonceAccountAddress`\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN]: \"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED]: \"WebSocket was closed before payload could be added to the send buffer\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED]: \"WebSocket connection closed\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT]: \"WebSocket failed to connect\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID]: \"Failed to obtain a subscription id from the server\",\n [SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD]: \"Could not find an API plan for RPC method: `$method`\",\n [SOLANA_ERROR__RPC__INTEGER_OVERFLOW]: \"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.\",\n [SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR]: \"HTTP error ($statusCode): $message\",\n [SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN]: \"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.\",\n [SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS]: \"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.\",\n [SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER]: \"The provided value does not implement the `KeyPairSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER]: \"The provided value does not implement the `MessageModifyingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER]: \"The provided value does not implement the `MessagePartialSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER]: \"The provided value does not implement any of the `MessageSigner` interfaces\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER]: \"The provided value does not implement the `TransactionModifyingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER]: \"The provided value does not implement the `TransactionPartialSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER]: \"The provided value does not implement the `TransactionSendingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER]: \"The provided value does not implement any of the `TransactionSigner` interfaces\",\n [SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS]: \"More than one `TransactionSendingSigner` was identified.\",\n [SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING]: \"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.\",\n [SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED]: \"Wallet account signers do not support signing multiple messages/transactions in a single operation\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY]: \"Cannot export a non-extractable key.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED]: \"No digest implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT]: \"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED]: \"This runtime does not support the generation of Ed25519 key pairs.\\n\\nInstall @solana/webcrypto-ed25519-polyfill and call its `install` function before generating keys in environments that do not support Ed25519.\\n\\nFor a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED]: \"No signature verification implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED]: \"No key generation implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED]: \"No signing implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED]: \"No key export implementation could be found.\",\n [SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE]: \"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING]: \"Transaction processing left an account with an outstanding borrowed reference\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE]: \"Account in use\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE]: \"Account loaded twice\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND]: \"Attempt to debit an account but found no record of a prior credit.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND]: \"Transaction loads an address table account that doesn't exist\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED]: \"This transaction has already been processed\",\n [SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND]: \"Blockhash not found\",\n [SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP]: \"Loader call chain is too deep\",\n [SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE]: \"Transactions are currently disabled due to cluster maintenance\",\n [SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION]: \"Transaction contains a duplicate instruction ($index) that is not allowed\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE]: \"Insufficient funds for fee\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT]: \"Transaction results in an account ($accountIndex) with insufficient funds for rent\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE]: \"This account may not be used to pay transaction fees\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX]: \"Transaction contains an invalid account reference\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA]: \"Transaction loads an address table account with invalid data\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX]: \"Transaction address table lookup uses an invalid index\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER]: \"Transaction loads an address table account with an invalid owner\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT]: \"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION]: \"This program may not be used for executing instructions\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT]: \"Transaction leaves an account with a lower balance than rent-exempt minimum\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT]: \"Transaction loads a writable account that cannot be written\",\n [SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED]: \"Transaction exceeded max loaded accounts data size cap\",\n [SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE]: \"Transaction requires a fee but has no signature present\",\n [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND]: \"Attempt to load a program that does not exist\",\n [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED]: \"Execution of the program referenced by account at index $accountIndex is temporarily restricted.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED]: \"ResanitizationNeeded\",\n [SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE]: \"Transaction failed to sanitize accounts offsets correctly\",\n [SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE]: \"Transaction did not pass signature verification\",\n [SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS]: \"Transaction locked too many accounts\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION]: \"Sum of account balances before and after transaction do not match\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN]: \"The transaction failed with the error `$errorName`\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION]: \"Transaction version is unsupported\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT]: \"Transaction would exceed account data limit within the block\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT]: \"Transaction would exceed total account data limit\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT]: \"Transaction would exceed max account limit within the block\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT]: \"Transaction would exceed max Block Cost Limit\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT]: \"Transaction would exceed max Vote Cost Limit\",\n [SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION]: \"Attempted to sign a transaction with an address that is not a signer for it\",\n [SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING]: \"Transaction is missing an address at index: $index.\",\n [SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES]: \"Transaction has no expected signers therefore it cannot be encoded\",\n [SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT]: \"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes\",\n [SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME]: \"Transaction does not have a blockhash lifetime\",\n [SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME]: \"Transaction is not a durable nonce transaction\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING]: \"Contents of these address lookup tables unknown: $lookupTableAddresses\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE]: \"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING]: \"No fee payer set in CompiledTransaction\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND]: \"Could not find program address at index $index\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT]: \"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more\",\n [SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT]: \"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more\",\n [SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING]: \"Transaction is missing a fee payer.\",\n [SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING]: \"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.\",\n [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE]: \"Transaction first instruction is not advance nonce account instruction.\",\n [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING]: \"Transaction with no instructions cannot be durable nonce transaction.\",\n [SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES]: \"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees\",\n [SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE]: \"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable\",\n [SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH]: \"The transaction message expected the transaction to have $signerAddressesLength signatures, got $signaturesLength.\",\n [SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING]: \"Transaction is missing signatures for addresses: $addresses.\",\n [SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE]: \"Transaction version must be in the range [0, 127]. `$actualVersion` given\"\n };\n var START_INDEX = \"i\";\n var TYPE = \"t\";\n function getHumanReadableErrorMessage(code, context2 = {}) {\n const messageFormatString = SolanaErrorMessages[code];\n if (messageFormatString.length === 0) {\n return \"\";\n }\n let state;\n function commitStateUpTo(endIndex) {\n if (state[TYPE] === 2) {\n const variableName = messageFormatString.slice(state[START_INDEX] + 1, endIndex);\n fragments.push(\n variableName in context2 ? (\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n `${context2[variableName]}`\n ) : `$${variableName}`\n );\n } else if (state[TYPE] === 1) {\n fragments.push(messageFormatString.slice(state[START_INDEX], endIndex));\n }\n }\n const fragments = [];\n messageFormatString.split(\"\").forEach((char, ii) => {\n if (ii === 0) {\n state = {\n [START_INDEX]: 0,\n [TYPE]: messageFormatString[0] === \"\\\\\" ? 0 : messageFormatString[0] === \"$\" ? 2 : 1\n /* Text */\n };\n return;\n }\n let nextState;\n switch (state[TYPE]) {\n case 0:\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 1\n /* Text */\n };\n break;\n case 1:\n if (char === \"\\\\\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 0\n /* EscapeSequence */\n };\n } else if (char === \"$\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 2\n /* Variable */\n };\n }\n break;\n case 2:\n if (char === \"\\\\\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 0\n /* EscapeSequence */\n };\n } else if (char === \"$\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 2\n /* Variable */\n };\n } else if (!char.match(/\\w/)) {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 1\n /* Text */\n };\n }\n break;\n }\n if (nextState) {\n if (state !== nextState) {\n commitStateUpTo(ii);\n }\n state = nextState;\n }\n });\n commitStateUpTo();\n return fragments.join(\"\");\n }\n function getErrorMessage(code, context2 = {}) {\n if (true) {\n return getHumanReadableErrorMessage(code, context2);\n } else {\n let decodingAdviceMessage = `Solana error #${code}; Decode this error by running \\`npx @solana/errors decode -- ${code}`;\n if (Object.keys(context2).length) {\n decodingAdviceMessage += ` '${encodeContextObject(context2)}'`;\n }\n return `${decodingAdviceMessage}\\``;\n }\n }\n function isSolanaError(e2, code) {\n const isSolanaError2 = e2 instanceof Error && e2.name === \"SolanaError\";\n if (isSolanaError2) {\n if (code !== void 0) {\n return e2.context.__code === code;\n }\n return true;\n }\n return false;\n }\n var SolanaError = class extends Error {\n /**\n * Indicates the root cause of this {@link SolanaError}, if any.\n *\n * For example, a transaction error might have an instruction error as its root cause. In this\n * case, you will be able to access the instruction error on the transaction error as `cause`.\n */\n cause = this.cause;\n /**\n * Contains context that can assist in understanding or recovering from a {@link SolanaError}.\n */\n context;\n constructor(...[code, contextAndErrorOptions]) {\n let context2;\n let errorOptions;\n if (contextAndErrorOptions) {\n const { cause, ...contextRest } = contextAndErrorOptions;\n if (cause) {\n errorOptions = { cause };\n }\n if (Object.keys(contextRest).length > 0) {\n context2 = contextRest;\n }\n }\n const message = getErrorMessage(code, context2);\n super(message, errorOptions);\n this.context = {\n __code: code,\n ...context2\n };\n this.name = \"SolanaError\";\n }\n };\n function safeCaptureStackTrace(...args) {\n if (\"captureStackTrace\" in Error && typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(...args);\n }\n }\n function getSolanaErrorFromRpcError({ errorCodeBaseOffset, getErrorContext, orderedErrorNames, rpcEnumError }, constructorOpt) {\n let rpcErrorName;\n let rpcErrorContext;\n if (typeof rpcEnumError === \"string\") {\n rpcErrorName = rpcEnumError;\n } else {\n rpcErrorName = Object.keys(rpcEnumError)[0];\n rpcErrorContext = rpcEnumError[rpcErrorName];\n }\n const codeOffset = orderedErrorNames.indexOf(rpcErrorName);\n const errorCode = errorCodeBaseOffset + codeOffset;\n const errorContext = getErrorContext(errorCode, rpcErrorName, rpcErrorContext);\n const err = new SolanaError(errorCode, errorContext);\n safeCaptureStackTrace(err, constructorOpt);\n return err;\n }\n var ORDERED_ERROR_NAMES = [\n // Keep synced with RPC source: https://github.com/anza-xyz/agave/blob/master/sdk/program/src/instruction.rs\n // If this list ever gets too large, consider implementing a compression strategy like this:\n // https://gist.github.com/steveluscher/aaa7cbbb5433b1197983908a40860c47\n \"GenericError\",\n \"InvalidArgument\",\n \"InvalidInstructionData\",\n \"InvalidAccountData\",\n \"AccountDataTooSmall\",\n \"InsufficientFunds\",\n \"IncorrectProgramId\",\n \"MissingRequiredSignature\",\n \"AccountAlreadyInitialized\",\n \"UninitializedAccount\",\n \"UnbalancedInstruction\",\n \"ModifiedProgramId\",\n \"ExternalAccountLamportSpend\",\n \"ExternalAccountDataModified\",\n \"ReadonlyLamportChange\",\n \"ReadonlyDataModified\",\n \"DuplicateAccountIndex\",\n \"ExecutableModified\",\n \"RentEpochModified\",\n \"NotEnoughAccountKeys\",\n \"AccountDataSizeChanged\",\n \"AccountNotExecutable\",\n \"AccountBorrowFailed\",\n \"AccountBorrowOutstanding\",\n \"DuplicateAccountOutOfSync\",\n \"Custom\",\n \"InvalidError\",\n \"ExecutableDataModified\",\n \"ExecutableLamportChange\",\n \"ExecutableAccountNotRentExempt\",\n \"UnsupportedProgramId\",\n \"CallDepth\",\n \"MissingAccount\",\n \"ReentrancyNotAllowed\",\n \"MaxSeedLengthExceeded\",\n \"InvalidSeeds\",\n \"InvalidRealloc\",\n \"ComputationalBudgetExceeded\",\n \"PrivilegeEscalation\",\n \"ProgramEnvironmentSetupFailure\",\n \"ProgramFailedToComplete\",\n \"ProgramFailedToCompile\",\n \"Immutable\",\n \"IncorrectAuthority\",\n \"BorshIoError\",\n \"AccountNotRentExempt\",\n \"InvalidAccountOwner\",\n \"ArithmeticOverflow\",\n \"UnsupportedSysvar\",\n \"IllegalOwner\",\n \"MaxAccountsDataAllocationsExceeded\",\n \"MaxAccountsExceeded\",\n \"MaxInstructionTraceLengthExceeded\",\n \"BuiltinProgramsMustConsumeComputeUnits\"\n ];\n function getSolanaErrorFromInstructionError(index2, instructionError) {\n const numberIndex = Number(index2);\n return getSolanaErrorFromRpcError(\n {\n errorCodeBaseOffset: 4615001,\n getErrorContext(errorCode, rpcErrorName, rpcErrorContext) {\n if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN) {\n return {\n errorName: rpcErrorName,\n index: numberIndex,\n ...rpcErrorContext !== void 0 ? { instructionErrorContext: rpcErrorContext } : null\n };\n } else if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM) {\n return {\n code: Number(rpcErrorContext),\n index: numberIndex\n };\n } else if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR) {\n return {\n encodedData: rpcErrorContext,\n index: numberIndex\n };\n }\n return { index: numberIndex };\n },\n orderedErrorNames: ORDERED_ERROR_NAMES,\n rpcEnumError: instructionError\n },\n getSolanaErrorFromInstructionError\n );\n }\n var ORDERED_ERROR_NAMES2 = [\n // Keep synced with RPC source: https://github.com/anza-xyz/agave/blob/master/sdk/src/transaction/error.rs\n // If this list ever gets too large, consider implementing a compression strategy like this:\n // https://gist.github.com/steveluscher/aaa7cbbb5433b1197983908a40860c47\n \"AccountInUse\",\n \"AccountLoadedTwice\",\n \"AccountNotFound\",\n \"ProgramAccountNotFound\",\n \"InsufficientFundsForFee\",\n \"InvalidAccountForFee\",\n \"AlreadyProcessed\",\n \"BlockhashNotFound\",\n // `InstructionError` intentionally omitted; delegated to `getSolanaErrorFromInstructionError`\n \"CallChainTooDeep\",\n \"MissingSignatureForFee\",\n \"InvalidAccountIndex\",\n \"SignatureFailure\",\n \"InvalidProgramForExecution\",\n \"SanitizeFailure\",\n \"ClusterMaintenance\",\n \"AccountBorrowOutstanding\",\n \"WouldExceedMaxBlockCostLimit\",\n \"UnsupportedVersion\",\n \"InvalidWritableAccount\",\n \"WouldExceedMaxAccountCostLimit\",\n \"WouldExceedAccountDataBlockLimit\",\n \"TooManyAccountLocks\",\n \"AddressLookupTableNotFound\",\n \"InvalidAddressLookupTableOwner\",\n \"InvalidAddressLookupTableData\",\n \"InvalidAddressLookupTableIndex\",\n \"InvalidRentPayingAccount\",\n \"WouldExceedMaxVoteCostLimit\",\n \"WouldExceedAccountDataTotalLimit\",\n \"DuplicateInstruction\",\n \"InsufficientFundsForRent\",\n \"MaxLoadedAccountsDataSizeExceeded\",\n \"InvalidLoadedAccountsDataSizeLimit\",\n \"ResanitizationNeeded\",\n \"ProgramExecutionTemporarilyRestricted\",\n \"UnbalancedTransaction\"\n ];\n function getSolanaErrorFromTransactionError(transactionError) {\n if (typeof transactionError === \"object\" && \"InstructionError\" in transactionError) {\n return getSolanaErrorFromInstructionError(\n ...transactionError.InstructionError\n );\n }\n return getSolanaErrorFromRpcError(\n {\n errorCodeBaseOffset: 7050001,\n getErrorContext(errorCode, rpcErrorName, rpcErrorContext) {\n if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN) {\n return {\n errorName: rpcErrorName,\n ...rpcErrorContext !== void 0 ? { transactionErrorContext: rpcErrorContext } : null\n };\n } else if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION) {\n return {\n index: Number(rpcErrorContext)\n };\n } else if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT || errorCode === SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED) {\n return {\n accountIndex: Number(rpcErrorContext.account_index)\n };\n }\n },\n orderedErrorNames: ORDERED_ERROR_NAMES2,\n rpcEnumError: transactionError\n },\n getSolanaErrorFromTransactionError\n );\n }\n function getSolanaErrorFromJsonRpcError(putativeErrorResponse) {\n let out;\n if (isRpcErrorResponse(putativeErrorResponse)) {\n const { code: rawCode, data, message } = putativeErrorResponse;\n const code = Number(rawCode);\n if (code === SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE) {\n const { err, ...preflightErrorContext } = data;\n const causeObject = err ? { cause: getSolanaErrorFromTransactionError(err) } : null;\n out = new SolanaError(SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE, {\n ...preflightErrorContext,\n ...causeObject\n });\n } else {\n let errorContext;\n switch (code) {\n case SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR:\n case SOLANA_ERROR__JSON_RPC__INVALID_PARAMS:\n case SOLANA_ERROR__JSON_RPC__INVALID_REQUEST:\n case SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND:\n case SOLANA_ERROR__JSON_RPC__PARSE_ERROR:\n case SOLANA_ERROR__JSON_RPC__SCAN_ERROR:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION:\n errorContext = { __serverMessage: message };\n break;\n default:\n if (typeof data === \"object\" && !Array.isArray(data)) {\n errorContext = data;\n }\n }\n out = new SolanaError(code, errorContext);\n }\n } else {\n const message = typeof putativeErrorResponse === \"object\" && putativeErrorResponse !== null && \"message\" in putativeErrorResponse && typeof putativeErrorResponse.message === \"string\" ? putativeErrorResponse.message : \"Malformed JSON-RPC error with no message attribute\";\n out = new SolanaError(SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR, { error: putativeErrorResponse, message });\n }\n safeCaptureStackTrace(out, getSolanaErrorFromJsonRpcError);\n return out;\n }\n function isRpcErrorResponse(value) {\n return typeof value === \"object\" && value !== null && \"code\" in value && \"message\" in value && (typeof value.code === \"number\" || typeof value.code === \"bigint\") && typeof value.message === \"string\";\n }\n exports3.SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND = SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND;\n exports3.SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED = SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED;\n exports3.SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT = SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT;\n exports3.SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT = SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT;\n exports3.SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND = SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND;\n exports3.SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED = SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED;\n exports3.SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS = SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS;\n exports3.SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH = SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH;\n exports3.SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY = SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY;\n exports3.SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS = SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS;\n exports3.SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE = SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE;\n exports3.SOLANA_ERROR__ADDRESSES__MALFORMED_PDA = SOLANA_ERROR__ADDRESSES__MALFORMED_PDA;\n exports3.SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED = SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED;\n exports3.SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED = SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED;\n exports3.SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE = SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER = SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER;\n exports3.SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE = SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE = SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED = SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED;\n exports3.SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY = SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY;\n exports3.SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS = SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS;\n exports3.SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL = SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL;\n exports3.SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH = SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH;\n exports3.SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH = SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH;\n exports3.SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH = SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH;\n exports3.SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE = SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH = SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH;\n exports3.SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH = SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH;\n exports3.SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH = SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH;\n exports3.SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE = SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE;\n exports3.SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH = SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH;\n exports3.SOLANA_ERROR__CODECS__INVALID_CONSTANT = SOLANA_ERROR__CODECS__INVALID_CONSTANT;\n exports3.SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT = SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT;\n exports3.SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT = SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT;\n exports3.SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT = SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT;\n exports3.SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS = SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS;\n exports3.SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE = SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE;\n exports3.SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE = SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE = SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE = SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES = SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES;\n exports3.SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE = SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED = SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED = SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED = SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED = SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL = SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE = SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT = SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW = SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR = SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS = SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH = SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED = SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM = SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX = SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC = SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT = SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED = SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE = SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED = SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED = SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND = SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR = SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER = SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE = SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY = SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID = SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS = SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA = SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER = SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT = SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR = SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA = SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC = SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS = SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED = SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED = SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED = SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED = SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT = SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE = SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID = SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS = SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION = SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE = SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE = SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE = SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED = SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE = SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED = SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED = SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION = SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT = SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN = SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID = SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR = SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR;\n exports3.SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS = SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS;\n exports3.SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA = SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA;\n exports3.SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH = SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH;\n exports3.SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH = SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH;\n exports3.SOLANA_ERROR__INVALID_NONCE = SOLANA_ERROR__INVALID_NONCE;\n exports3.SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING = SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING;\n exports3.SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED = SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED;\n exports3.SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE = SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE;\n exports3.SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING = SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING;\n exports3.SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE = SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE;\n exports3.SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR = SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR;\n exports3.SOLANA_ERROR__JSON_RPC__INVALID_PARAMS = SOLANA_ERROR__JSON_RPC__INVALID_PARAMS;\n exports3.SOLANA_ERROR__JSON_RPC__INVALID_REQUEST = SOLANA_ERROR__JSON_RPC__INVALID_REQUEST;\n exports3.SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND = SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND;\n exports3.SOLANA_ERROR__JSON_RPC__PARSE_ERROR = SOLANA_ERROR__JSON_RPC__PARSE_ERROR;\n exports3.SOLANA_ERROR__JSON_RPC__SCAN_ERROR = SOLANA_ERROR__JSON_RPC__SCAN_ERROR;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION;\n exports3.SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH = SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH;\n exports3.SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH = SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH;\n exports3.SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH = SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH;\n exports3.SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY = SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY;\n exports3.SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE = SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE = SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__MALFORMED_BIGINT_STRING = SOLANA_ERROR__MALFORMED_BIGINT_STRING;\n exports3.SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR = SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR;\n exports3.SOLANA_ERROR__MALFORMED_NUMBER_STRING = SOLANA_ERROR__MALFORMED_NUMBER_STRING;\n exports3.SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND;\n exports3.SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN = SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN;\n exports3.SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED = SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED;\n exports3.SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED = SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED;\n exports3.SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT = SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT;\n exports3.SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID = SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID;\n exports3.SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD = SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD;\n exports3.SOLANA_ERROR__RPC__INTEGER_OVERFLOW = SOLANA_ERROR__RPC__INTEGER_OVERFLOW;\n exports3.SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR = SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR;\n exports3.SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN = SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN;\n exports3.SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS = SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS;\n exports3.SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER = SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER;\n exports3.SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER = SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER;\n exports3.SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER = SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER;\n exports3.SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER = SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER;\n exports3.SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER = SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER;\n exports3.SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER = SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER;\n exports3.SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER = SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER;\n exports3.SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER = SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER;\n exports3.SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS = SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS;\n exports3.SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING = SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING;\n exports3.SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED = SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED;\n exports3.SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY = SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY;\n exports3.SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED = SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED;\n exports3.SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT = SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT;\n exports3.SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED = SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED;\n exports3.SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED = SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED;\n exports3.SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED = SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED;\n exports3.SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED = SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED;\n exports3.SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED = SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED;\n exports3.SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE = SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE = SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE = SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND = SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND = SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED = SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND = SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP = SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE = SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION = SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE = SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT = SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE = SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX = SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA = SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX = SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER = SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT = SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION = SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT = SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT = SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED = SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE = SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND = SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED = SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED = SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE = SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE = SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS = SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION = SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN = SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION = SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT = SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT = SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT = SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT = SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT = SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT;\n exports3.SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION = SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION;\n exports3.SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING = SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING;\n exports3.SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES = SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES;\n exports3.SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT = SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT;\n exports3.SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME = SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME;\n exports3.SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME = SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME;\n exports3.SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING = SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING;\n exports3.SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE = SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING = SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING;\n exports3.SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND = SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND;\n exports3.SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT = SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT;\n exports3.SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT = SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT;\n exports3.SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING = SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING;\n exports3.SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING = SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING;\n exports3.SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE = SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE;\n exports3.SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING = SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING;\n exports3.SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES = SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES;\n exports3.SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE = SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE;\n exports3.SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH = SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH;\n exports3.SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING = SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING;\n exports3.SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE = SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE;\n exports3.SolanaError = SolanaError;\n exports3.getSolanaErrorFromInstructionError = getSolanaErrorFromInstructionError;\n exports3.getSolanaErrorFromJsonRpcError = getSolanaErrorFromJsonRpcError;\n exports3.getSolanaErrorFromTransactionError = getSolanaErrorFromTransactionError;\n exports3.isSolanaError = isSolanaError;\n exports3.safeCaptureStackTrace = safeCaptureStackTrace;\n }\n });\n\n // ../../../node_modules/.pnpm/@solana+codecs-core@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-core/dist/index.browser.cjs\n var require_index_browser2 = __commonJS({\n \"../../../node_modules/.pnpm/@solana+codecs-core@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-core/dist/index.browser.cjs\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var errors = require_index_browser();\n var mergeBytes = (byteArrays) => {\n const nonEmptyByteArrays = byteArrays.filter((arr) => arr.length);\n if (nonEmptyByteArrays.length === 0) {\n return byteArrays.length ? byteArrays[0] : new Uint8Array();\n }\n if (nonEmptyByteArrays.length === 1) {\n return nonEmptyByteArrays[0];\n }\n const totalLength = nonEmptyByteArrays.reduce((total, arr) => total + arr.length, 0);\n const result = new Uint8Array(totalLength);\n let offset = 0;\n nonEmptyByteArrays.forEach((arr) => {\n result.set(arr, offset);\n offset += arr.length;\n });\n return result;\n };\n var padBytes2 = (bytes, length) => {\n if (bytes.length >= length)\n return bytes;\n const paddedBytes = new Uint8Array(length).fill(0);\n paddedBytes.set(bytes);\n return paddedBytes;\n };\n var fixBytes = (bytes, length) => padBytes2(bytes.length <= length ? bytes : bytes.slice(0, length), length);\n function containsBytes(data, bytes, offset) {\n const slice4 = offset === 0 && data.length === bytes.length ? data : data.slice(offset, offset + bytes.length);\n if (slice4.length !== bytes.length)\n return false;\n return bytes.every((b4, i3) => b4 === slice4[i3]);\n }\n function getEncodedSize(value, encoder6) {\n return \"fixedSize\" in encoder6 ? encoder6.fixedSize : encoder6.getSizeFromValue(value);\n }\n function createEncoder(encoder6) {\n return Object.freeze({\n ...encoder6,\n encode: (value) => {\n const bytes = new Uint8Array(getEncodedSize(value, encoder6));\n encoder6.write(value, bytes, 0);\n return bytes;\n }\n });\n }\n function createDecoder(decoder2) {\n return Object.freeze({\n ...decoder2,\n decode: (bytes, offset = 0) => decoder2.read(bytes, offset)[0]\n });\n }\n function createCodec(codec) {\n return Object.freeze({\n ...codec,\n decode: (bytes, offset = 0) => codec.read(bytes, offset)[0],\n encode: (value) => {\n const bytes = new Uint8Array(getEncodedSize(value, codec));\n codec.write(value, bytes, 0);\n return bytes;\n }\n });\n }\n function isFixedSize(codec) {\n return \"fixedSize\" in codec && typeof codec.fixedSize === \"number\";\n }\n function assertIsFixedSize(codec) {\n if (!isFixedSize(codec)) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH);\n }\n }\n function isVariableSize(codec) {\n return !isFixedSize(codec);\n }\n function assertIsVariableSize(codec) {\n if (!isVariableSize(codec)) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH);\n }\n }\n function combineCodec(encoder6, decoder2) {\n if (isFixedSize(encoder6) !== isFixedSize(decoder2)) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH);\n }\n if (isFixedSize(encoder6) && isFixedSize(decoder2) && encoder6.fixedSize !== decoder2.fixedSize) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH, {\n decoderFixedSize: decoder2.fixedSize,\n encoderFixedSize: encoder6.fixedSize\n });\n }\n if (!isFixedSize(encoder6) && !isFixedSize(decoder2) && encoder6.maxSize !== decoder2.maxSize) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH, {\n decoderMaxSize: decoder2.maxSize,\n encoderMaxSize: encoder6.maxSize\n });\n }\n return {\n ...decoder2,\n ...encoder6,\n decode: decoder2.decode,\n encode: encoder6.encode,\n read: decoder2.read,\n write: encoder6.write\n };\n }\n function addEncoderSentinel(encoder6, sentinel) {\n const write = (value, bytes, offset) => {\n const encoderBytes = encoder6.encode(value);\n if (findSentinelIndex(encoderBytes, sentinel) >= 0) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL, {\n encodedBytes: encoderBytes,\n hexEncodedBytes: hexBytes(encoderBytes),\n hexSentinel: hexBytes(sentinel),\n sentinel\n });\n }\n bytes.set(encoderBytes, offset);\n offset += encoderBytes.length;\n bytes.set(sentinel, offset);\n offset += sentinel.length;\n return offset;\n };\n if (isFixedSize(encoder6)) {\n return createEncoder({ ...encoder6, fixedSize: encoder6.fixedSize + sentinel.length, write });\n }\n return createEncoder({\n ...encoder6,\n ...encoder6.maxSize != null ? { maxSize: encoder6.maxSize + sentinel.length } : {},\n getSizeFromValue: (value) => encoder6.getSizeFromValue(value) + sentinel.length,\n write\n });\n }\n function addDecoderSentinel(decoder2, sentinel) {\n const read = (bytes, offset) => {\n const candidateBytes = offset === 0 ? bytes : bytes.slice(offset);\n const sentinelIndex = findSentinelIndex(candidateBytes, sentinel);\n if (sentinelIndex === -1) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES, {\n decodedBytes: candidateBytes,\n hexDecodedBytes: hexBytes(candidateBytes),\n hexSentinel: hexBytes(sentinel),\n sentinel\n });\n }\n const preSentinelBytes = candidateBytes.slice(0, sentinelIndex);\n return [decoder2.decode(preSentinelBytes), offset + preSentinelBytes.length + sentinel.length];\n };\n if (isFixedSize(decoder2)) {\n return createDecoder({ ...decoder2, fixedSize: decoder2.fixedSize + sentinel.length, read });\n }\n return createDecoder({\n ...decoder2,\n ...decoder2.maxSize != null ? { maxSize: decoder2.maxSize + sentinel.length } : {},\n read\n });\n }\n function addCodecSentinel(codec, sentinel) {\n return combineCodec(addEncoderSentinel(codec, sentinel), addDecoderSentinel(codec, sentinel));\n }\n function findSentinelIndex(bytes, sentinel) {\n return bytes.findIndex((byte, index2, arr) => {\n if (sentinel.length === 1)\n return byte === sentinel[0];\n return containsBytes(arr, sentinel, index2);\n });\n }\n function hexBytes(bytes) {\n return bytes.reduce((str, byte) => str + byte.toString(16).padStart(2, \"0\"), \"\");\n }\n function assertByteArrayIsNotEmptyForCodec(codecDescription, bytes, offset = 0) {\n if (bytes.length - offset <= 0) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY, {\n codecDescription\n });\n }\n }\n function assertByteArrayHasEnoughBytesForCodec(codecDescription, expected, bytes, offset = 0) {\n const bytesLength = bytes.length - offset;\n if (bytesLength < expected) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH, {\n bytesLength,\n codecDescription,\n expected\n });\n }\n }\n function assertByteArrayOffsetIsNotOutOfRange(codecDescription, offset, bytesLength) {\n if (offset < 0 || offset > bytesLength) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE, {\n bytesLength,\n codecDescription,\n offset\n });\n }\n }\n function addEncoderSizePrefix(encoder6, prefix) {\n const write = (value, bytes, offset) => {\n const encoderBytes = encoder6.encode(value);\n offset = prefix.write(encoderBytes.length, bytes, offset);\n bytes.set(encoderBytes, offset);\n return offset + encoderBytes.length;\n };\n if (isFixedSize(prefix) && isFixedSize(encoder6)) {\n return createEncoder({ ...encoder6, fixedSize: prefix.fixedSize + encoder6.fixedSize, write });\n }\n const prefixMaxSize = isFixedSize(prefix) ? prefix.fixedSize : prefix.maxSize ?? null;\n const encoderMaxSize = isFixedSize(encoder6) ? encoder6.fixedSize : encoder6.maxSize ?? null;\n const maxSize = prefixMaxSize !== null && encoderMaxSize !== null ? prefixMaxSize + encoderMaxSize : null;\n return createEncoder({\n ...encoder6,\n ...maxSize !== null ? { maxSize } : {},\n getSizeFromValue: (value) => {\n const encoderSize = getEncodedSize(value, encoder6);\n return getEncodedSize(encoderSize, prefix) + encoderSize;\n },\n write\n });\n }\n function addDecoderSizePrefix(decoder2, prefix) {\n const read = (bytes, offset) => {\n const [bigintSize, decoderOffset] = prefix.read(bytes, offset);\n const size6 = Number(bigintSize);\n offset = decoderOffset;\n if (offset > 0 || bytes.length > size6) {\n bytes = bytes.slice(offset, offset + size6);\n }\n assertByteArrayHasEnoughBytesForCodec(\"addDecoderSizePrefix\", size6, bytes);\n return [decoder2.decode(bytes), offset + size6];\n };\n if (isFixedSize(prefix) && isFixedSize(decoder2)) {\n return createDecoder({ ...decoder2, fixedSize: prefix.fixedSize + decoder2.fixedSize, read });\n }\n const prefixMaxSize = isFixedSize(prefix) ? prefix.fixedSize : prefix.maxSize ?? null;\n const decoderMaxSize = isFixedSize(decoder2) ? decoder2.fixedSize : decoder2.maxSize ?? null;\n const maxSize = prefixMaxSize !== null && decoderMaxSize !== null ? prefixMaxSize + decoderMaxSize : null;\n return createDecoder({ ...decoder2, ...maxSize !== null ? { maxSize } : {}, read });\n }\n function addCodecSizePrefix(codec, prefix) {\n return combineCodec(addEncoderSizePrefix(codec, prefix), addDecoderSizePrefix(codec, prefix));\n }\n function fixEncoderSize(encoder6, fixedBytes) {\n return createEncoder({\n fixedSize: fixedBytes,\n write: (value, bytes, offset) => {\n const variableByteArray = encoder6.encode(value);\n const fixedByteArray = variableByteArray.length > fixedBytes ? variableByteArray.slice(0, fixedBytes) : variableByteArray;\n bytes.set(fixedByteArray, offset);\n return offset + fixedBytes;\n }\n });\n }\n function fixDecoderSize(decoder2, fixedBytes) {\n return createDecoder({\n fixedSize: fixedBytes,\n read: (bytes, offset) => {\n assertByteArrayHasEnoughBytesForCodec(\"fixCodecSize\", fixedBytes, bytes, offset);\n if (offset > 0 || bytes.length > fixedBytes) {\n bytes = bytes.slice(offset, offset + fixedBytes);\n }\n if (isFixedSize(decoder2)) {\n bytes = fixBytes(bytes, decoder2.fixedSize);\n }\n const [value] = decoder2.read(bytes, 0);\n return [value, offset + fixedBytes];\n }\n });\n }\n function fixCodecSize(codec, fixedBytes) {\n return combineCodec(fixEncoderSize(codec, fixedBytes), fixDecoderSize(codec, fixedBytes));\n }\n function offsetEncoder(encoder6, config2) {\n return createEncoder({\n ...encoder6,\n write: (value, bytes, preOffset) => {\n const wrapBytes = (offset) => modulo(offset, bytes.length);\n const newPreOffset = config2.preOffset ? config2.preOffset({ bytes, preOffset, wrapBytes }) : preOffset;\n assertByteArrayOffsetIsNotOutOfRange(\"offsetEncoder\", newPreOffset, bytes.length);\n const postOffset = encoder6.write(value, bytes, newPreOffset);\n const newPostOffset = config2.postOffset ? config2.postOffset({ bytes, newPreOffset, postOffset, preOffset, wrapBytes }) : postOffset;\n assertByteArrayOffsetIsNotOutOfRange(\"offsetEncoder\", newPostOffset, bytes.length);\n return newPostOffset;\n }\n });\n }\n function offsetDecoder(decoder2, config2) {\n return createDecoder({\n ...decoder2,\n read: (bytes, preOffset) => {\n const wrapBytes = (offset) => modulo(offset, bytes.length);\n const newPreOffset = config2.preOffset ? config2.preOffset({ bytes, preOffset, wrapBytes }) : preOffset;\n assertByteArrayOffsetIsNotOutOfRange(\"offsetDecoder\", newPreOffset, bytes.length);\n const [value, postOffset] = decoder2.read(bytes, newPreOffset);\n const newPostOffset = config2.postOffset ? config2.postOffset({ bytes, newPreOffset, postOffset, preOffset, wrapBytes }) : postOffset;\n assertByteArrayOffsetIsNotOutOfRange(\"offsetDecoder\", newPostOffset, bytes.length);\n return [value, newPostOffset];\n }\n });\n }\n function offsetCodec(codec, config2) {\n return combineCodec(offsetEncoder(codec, config2), offsetDecoder(codec, config2));\n }\n function modulo(dividend, divisor) {\n if (divisor === 0)\n return 0;\n return (dividend % divisor + divisor) % divisor;\n }\n function resizeEncoder(encoder6, resize) {\n if (isFixedSize(encoder6)) {\n const fixedSize = resize(encoder6.fixedSize);\n if (fixedSize < 0) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH, {\n bytesLength: fixedSize,\n codecDescription: \"resizeEncoder\"\n });\n }\n return createEncoder({ ...encoder6, fixedSize });\n }\n return createEncoder({\n ...encoder6,\n getSizeFromValue: (value) => {\n const newSize = resize(encoder6.getSizeFromValue(value));\n if (newSize < 0) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH, {\n bytesLength: newSize,\n codecDescription: \"resizeEncoder\"\n });\n }\n return newSize;\n }\n });\n }\n function resizeDecoder(decoder2, resize) {\n if (isFixedSize(decoder2)) {\n const fixedSize = resize(decoder2.fixedSize);\n if (fixedSize < 0) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH, {\n bytesLength: fixedSize,\n codecDescription: \"resizeDecoder\"\n });\n }\n return createDecoder({ ...decoder2, fixedSize });\n }\n return decoder2;\n }\n function resizeCodec(codec, resize) {\n return combineCodec(resizeEncoder(codec, resize), resizeDecoder(codec, resize));\n }\n function padLeftEncoder(encoder6, offset) {\n return offsetEncoder(\n resizeEncoder(encoder6, (size6) => size6 + offset),\n { preOffset: ({ preOffset }) => preOffset + offset }\n );\n }\n function padRightEncoder(encoder6, offset) {\n return offsetEncoder(\n resizeEncoder(encoder6, (size6) => size6 + offset),\n { postOffset: ({ postOffset }) => postOffset + offset }\n );\n }\n function padLeftDecoder(decoder2, offset) {\n return offsetDecoder(\n resizeDecoder(decoder2, (size6) => size6 + offset),\n { preOffset: ({ preOffset }) => preOffset + offset }\n );\n }\n function padRightDecoder(decoder2, offset) {\n return offsetDecoder(\n resizeDecoder(decoder2, (size6) => size6 + offset),\n { postOffset: ({ postOffset }) => postOffset + offset }\n );\n }\n function padLeftCodec(codec, offset) {\n return combineCodec(padLeftEncoder(codec, offset), padLeftDecoder(codec, offset));\n }\n function padRightCodec(codec, offset) {\n return combineCodec(padRightEncoder(codec, offset), padRightDecoder(codec, offset));\n }\n function copySourceToTargetInReverse(source, target_WILL_MUTATE, sourceOffset, sourceLength, targetOffset = 0) {\n while (sourceOffset < --sourceLength) {\n const leftValue = source[sourceOffset];\n target_WILL_MUTATE[sourceOffset + targetOffset] = source[sourceLength];\n target_WILL_MUTATE[sourceLength + targetOffset] = leftValue;\n sourceOffset++;\n }\n if (sourceOffset === sourceLength) {\n target_WILL_MUTATE[sourceOffset + targetOffset] = source[sourceOffset];\n }\n }\n function reverseEncoder(encoder6) {\n assertIsFixedSize(encoder6);\n return createEncoder({\n ...encoder6,\n write: (value, bytes, offset) => {\n const newOffset = encoder6.write(value, bytes, offset);\n copySourceToTargetInReverse(\n bytes,\n bytes,\n offset,\n offset + encoder6.fixedSize\n );\n return newOffset;\n }\n });\n }\n function reverseDecoder(decoder2) {\n assertIsFixedSize(decoder2);\n return createDecoder({\n ...decoder2,\n read: (bytes, offset) => {\n const reversedBytes = bytes.slice();\n copySourceToTargetInReverse(\n bytes,\n reversedBytes,\n offset,\n offset + decoder2.fixedSize\n );\n return decoder2.read(reversedBytes, offset);\n }\n });\n }\n function reverseCodec(codec) {\n return combineCodec(reverseEncoder(codec), reverseDecoder(codec));\n }\n function transformEncoder(encoder6, unmap) {\n return createEncoder({\n ...isVariableSize(encoder6) ? { ...encoder6, getSizeFromValue: (value) => encoder6.getSizeFromValue(unmap(value)) } : encoder6,\n write: (value, bytes, offset) => encoder6.write(unmap(value), bytes, offset)\n });\n }\n function transformDecoder(decoder2, map) {\n return createDecoder({\n ...decoder2,\n read: (bytes, offset) => {\n const [value, newOffset] = decoder2.read(bytes, offset);\n return [map(value, bytes, offset), newOffset];\n }\n });\n }\n function transformCodec(codec, unmap, map) {\n return createCodec({\n ...transformEncoder(codec, unmap),\n read: map ? transformDecoder(codec, map).read : codec.read\n });\n }\n exports3.addCodecSentinel = addCodecSentinel;\n exports3.addCodecSizePrefix = addCodecSizePrefix;\n exports3.addDecoderSentinel = addDecoderSentinel;\n exports3.addDecoderSizePrefix = addDecoderSizePrefix;\n exports3.addEncoderSentinel = addEncoderSentinel;\n exports3.addEncoderSizePrefix = addEncoderSizePrefix;\n exports3.assertByteArrayHasEnoughBytesForCodec = assertByteArrayHasEnoughBytesForCodec;\n exports3.assertByteArrayIsNotEmptyForCodec = assertByteArrayIsNotEmptyForCodec;\n exports3.assertByteArrayOffsetIsNotOutOfRange = assertByteArrayOffsetIsNotOutOfRange;\n exports3.assertIsFixedSize = assertIsFixedSize;\n exports3.assertIsVariableSize = assertIsVariableSize;\n exports3.combineCodec = combineCodec;\n exports3.containsBytes = containsBytes;\n exports3.createCodec = createCodec;\n exports3.createDecoder = createDecoder;\n exports3.createEncoder = createEncoder;\n exports3.fixBytes = fixBytes;\n exports3.fixCodecSize = fixCodecSize;\n exports3.fixDecoderSize = fixDecoderSize;\n exports3.fixEncoderSize = fixEncoderSize;\n exports3.getEncodedSize = getEncodedSize;\n exports3.isFixedSize = isFixedSize;\n exports3.isVariableSize = isVariableSize;\n exports3.mergeBytes = mergeBytes;\n exports3.offsetCodec = offsetCodec;\n exports3.offsetDecoder = offsetDecoder;\n exports3.offsetEncoder = offsetEncoder;\n exports3.padBytes = padBytes2;\n exports3.padLeftCodec = padLeftCodec;\n exports3.padLeftDecoder = padLeftDecoder;\n exports3.padLeftEncoder = padLeftEncoder;\n exports3.padRightCodec = padRightCodec;\n exports3.padRightDecoder = padRightDecoder;\n exports3.padRightEncoder = padRightEncoder;\n exports3.resizeCodec = resizeCodec;\n exports3.resizeDecoder = resizeDecoder;\n exports3.resizeEncoder = resizeEncoder;\n exports3.reverseCodec = reverseCodec;\n exports3.reverseDecoder = reverseDecoder;\n exports3.reverseEncoder = reverseEncoder;\n exports3.transformCodec = transformCodec;\n exports3.transformDecoder = transformDecoder;\n exports3.transformEncoder = transformEncoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@solana+codecs-numbers@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-numbers/dist/index.browser.cjs\n var require_index_browser3 = __commonJS({\n \"../../../node_modules/.pnpm/@solana+codecs-numbers@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-numbers/dist/index.browser.cjs\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var errors = require_index_browser();\n var codecsCore = require_index_browser2();\n function assertNumberIsBetweenForCodec(codecDescription, min, max, value) {\n if (value < min || value > max) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE, {\n codecDescription,\n max,\n min,\n value\n });\n }\n }\n var Endian = /* @__PURE__ */ ((Endian2) => {\n Endian2[Endian2[\"Little\"] = 0] = \"Little\";\n Endian2[Endian2[\"Big\"] = 1] = \"Big\";\n return Endian2;\n })(Endian || {});\n function isLittleEndian(config2) {\n return config2?.endian === 1 ? false : true;\n }\n function numberEncoderFactory(input) {\n return codecsCore.createEncoder({\n fixedSize: input.size,\n write(value, bytes, offset) {\n if (input.range) {\n assertNumberIsBetweenForCodec(input.name, input.range[0], input.range[1], value);\n }\n const arrayBuffer = new ArrayBuffer(input.size);\n input.set(new DataView(arrayBuffer), value, isLittleEndian(input.config));\n bytes.set(new Uint8Array(arrayBuffer), offset);\n return offset + input.size;\n }\n });\n }\n function numberDecoderFactory(input) {\n return codecsCore.createDecoder({\n fixedSize: input.size,\n read(bytes, offset = 0) {\n codecsCore.assertByteArrayIsNotEmptyForCodec(input.name, bytes, offset);\n codecsCore.assertByteArrayHasEnoughBytesForCodec(input.name, input.size, bytes, offset);\n const view = new DataView(toArrayBuffer(bytes, offset, input.size));\n return [input.get(view, isLittleEndian(input.config)), offset + input.size];\n }\n });\n }\n function toArrayBuffer(bytes, offset, length) {\n const bytesOffset = bytes.byteOffset + (offset ?? 0);\n const bytesLength = length ?? bytes.byteLength;\n return bytes.buffer.slice(bytesOffset, bytesOffset + bytesLength);\n }\n var getF32Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"f32\",\n set: (view, value, le) => view.setFloat32(0, Number(value), le),\n size: 4\n });\n var getF32Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => view.getFloat32(0, le),\n name: \"f32\",\n size: 4\n });\n var getF32Codec = (config2 = {}) => codecsCore.combineCodec(getF32Encoder(config2), getF32Decoder(config2));\n var getF64Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"f64\",\n set: (view, value, le) => view.setFloat64(0, Number(value), le),\n size: 8\n });\n var getF64Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => view.getFloat64(0, le),\n name: \"f64\",\n size: 8\n });\n var getF64Codec = (config2 = {}) => codecsCore.combineCodec(getF64Encoder(config2), getF64Decoder(config2));\n var getI128Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"i128\",\n range: [-BigInt(\"0x7fffffffffffffffffffffffffffffff\") - 1n, BigInt(\"0x7fffffffffffffffffffffffffffffff\")],\n set: (view, value, le) => {\n const leftOffset = le ? 8 : 0;\n const rightOffset = le ? 0 : 8;\n const rightMask = 0xffffffffffffffffn;\n view.setBigInt64(leftOffset, BigInt(value) >> 64n, le);\n view.setBigUint64(rightOffset, BigInt(value) & rightMask, le);\n },\n size: 16\n });\n var getI128Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => {\n const leftOffset = le ? 8 : 0;\n const rightOffset = le ? 0 : 8;\n const left = view.getBigInt64(leftOffset, le);\n const right = view.getBigUint64(rightOffset, le);\n return (left << 64n) + right;\n },\n name: \"i128\",\n size: 16\n });\n var getI128Codec = (config2 = {}) => codecsCore.combineCodec(getI128Encoder(config2), getI128Decoder(config2));\n var getI16Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"i16\",\n range: [-Number(\"0x7fff\") - 1, Number(\"0x7fff\")],\n set: (view, value, le) => view.setInt16(0, Number(value), le),\n size: 2\n });\n var getI16Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => view.getInt16(0, le),\n name: \"i16\",\n size: 2\n });\n var getI16Codec = (config2 = {}) => codecsCore.combineCodec(getI16Encoder(config2), getI16Decoder(config2));\n var getI32Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"i32\",\n range: [-Number(\"0x7fffffff\") - 1, Number(\"0x7fffffff\")],\n set: (view, value, le) => view.setInt32(0, Number(value), le),\n size: 4\n });\n var getI32Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => view.getInt32(0, le),\n name: \"i32\",\n size: 4\n });\n var getI32Codec = (config2 = {}) => codecsCore.combineCodec(getI32Encoder(config2), getI32Decoder(config2));\n var getI64Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"i64\",\n range: [-BigInt(\"0x7fffffffffffffff\") - 1n, BigInt(\"0x7fffffffffffffff\")],\n set: (view, value, le) => view.setBigInt64(0, BigInt(value), le),\n size: 8\n });\n var getI64Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => view.getBigInt64(0, le),\n name: \"i64\",\n size: 8\n });\n var getI64Codec = (config2 = {}) => codecsCore.combineCodec(getI64Encoder(config2), getI64Decoder(config2));\n var getI8Encoder = () => numberEncoderFactory({\n name: \"i8\",\n range: [-Number(\"0x7f\") - 1, Number(\"0x7f\")],\n set: (view, value) => view.setInt8(0, Number(value)),\n size: 1\n });\n var getI8Decoder = () => numberDecoderFactory({\n get: (view) => view.getInt8(0),\n name: \"i8\",\n size: 1\n });\n var getI8Codec = () => codecsCore.combineCodec(getI8Encoder(), getI8Decoder());\n var getShortU16Encoder = () => codecsCore.createEncoder({\n getSizeFromValue: (value) => {\n if (value <= 127)\n return 1;\n if (value <= 16383)\n return 2;\n return 3;\n },\n maxSize: 3,\n write: (value, bytes, offset) => {\n assertNumberIsBetweenForCodec(\"shortU16\", 0, 65535, value);\n const shortU16Bytes = [0];\n for (let ii = 0; ; ii += 1) {\n const alignedValue = Number(value) >> ii * 7;\n if (alignedValue === 0) {\n break;\n }\n const nextSevenBits = 127 & alignedValue;\n shortU16Bytes[ii] = nextSevenBits;\n if (ii > 0) {\n shortU16Bytes[ii - 1] |= 128;\n }\n }\n bytes.set(shortU16Bytes, offset);\n return offset + shortU16Bytes.length;\n }\n });\n var getShortU16Decoder = () => codecsCore.createDecoder({\n maxSize: 3,\n read: (bytes, offset) => {\n let value = 0;\n let byteCount = 0;\n while (++byteCount) {\n const byteIndex = byteCount - 1;\n const currentByte = bytes[offset + byteIndex];\n const nextSevenBits = 127 & currentByte;\n value |= nextSevenBits << byteIndex * 7;\n if ((currentByte & 128) === 0) {\n break;\n }\n }\n return [value, offset + byteCount];\n }\n });\n var getShortU16Codec = () => codecsCore.combineCodec(getShortU16Encoder(), getShortU16Decoder());\n var getU128Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"u128\",\n range: [0n, BigInt(\"0xffffffffffffffffffffffffffffffff\")],\n set: (view, value, le) => {\n const leftOffset = le ? 8 : 0;\n const rightOffset = le ? 0 : 8;\n const rightMask = 0xffffffffffffffffn;\n view.setBigUint64(leftOffset, BigInt(value) >> 64n, le);\n view.setBigUint64(rightOffset, BigInt(value) & rightMask, le);\n },\n size: 16\n });\n var getU128Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => {\n const leftOffset = le ? 8 : 0;\n const rightOffset = le ? 0 : 8;\n const left = view.getBigUint64(leftOffset, le);\n const right = view.getBigUint64(rightOffset, le);\n return (left << 64n) + right;\n },\n name: \"u128\",\n size: 16\n });\n var getU128Codec = (config2 = {}) => codecsCore.combineCodec(getU128Encoder(config2), getU128Decoder(config2));\n var getU16Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"u16\",\n range: [0, Number(\"0xffff\")],\n set: (view, value, le) => view.setUint16(0, Number(value), le),\n size: 2\n });\n var getU16Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => view.getUint16(0, le),\n name: \"u16\",\n size: 2\n });\n var getU16Codec = (config2 = {}) => codecsCore.combineCodec(getU16Encoder(config2), getU16Decoder(config2));\n var getU32Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"u32\",\n range: [0, Number(\"0xffffffff\")],\n set: (view, value, le) => view.setUint32(0, Number(value), le),\n size: 4\n });\n var getU32Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => view.getUint32(0, le),\n name: \"u32\",\n size: 4\n });\n var getU32Codec = (config2 = {}) => codecsCore.combineCodec(getU32Encoder(config2), getU32Decoder(config2));\n var getU64Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"u64\",\n range: [0n, BigInt(\"0xffffffffffffffff\")],\n set: (view, value, le) => view.setBigUint64(0, BigInt(value), le),\n size: 8\n });\n var getU64Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => view.getBigUint64(0, le),\n name: \"u64\",\n size: 8\n });\n var getU64Codec = (config2 = {}) => codecsCore.combineCodec(getU64Encoder(config2), getU64Decoder(config2));\n var getU8Encoder = () => numberEncoderFactory({\n name: \"u8\",\n range: [0, Number(\"0xff\")],\n set: (view, value) => view.setUint8(0, Number(value)),\n size: 1\n });\n var getU8Decoder = () => numberDecoderFactory({\n get: (view) => view.getUint8(0),\n name: \"u8\",\n size: 1\n });\n var getU8Codec = () => codecsCore.combineCodec(getU8Encoder(), getU8Decoder());\n exports3.Endian = Endian;\n exports3.assertNumberIsBetweenForCodec = assertNumberIsBetweenForCodec;\n exports3.getF32Codec = getF32Codec;\n exports3.getF32Decoder = getF32Decoder;\n exports3.getF32Encoder = getF32Encoder;\n exports3.getF64Codec = getF64Codec;\n exports3.getF64Decoder = getF64Decoder;\n exports3.getF64Encoder = getF64Encoder;\n exports3.getI128Codec = getI128Codec;\n exports3.getI128Decoder = getI128Decoder;\n exports3.getI128Encoder = getI128Encoder;\n exports3.getI16Codec = getI16Codec;\n exports3.getI16Decoder = getI16Decoder;\n exports3.getI16Encoder = getI16Encoder;\n exports3.getI32Codec = getI32Codec;\n exports3.getI32Decoder = getI32Decoder;\n exports3.getI32Encoder = getI32Encoder;\n exports3.getI64Codec = getI64Codec;\n exports3.getI64Decoder = getI64Decoder;\n exports3.getI64Encoder = getI64Encoder;\n exports3.getI8Codec = getI8Codec;\n exports3.getI8Decoder = getI8Decoder;\n exports3.getI8Encoder = getI8Encoder;\n exports3.getShortU16Codec = getShortU16Codec;\n exports3.getShortU16Decoder = getShortU16Decoder;\n exports3.getShortU16Encoder = getShortU16Encoder;\n exports3.getU128Codec = getU128Codec;\n exports3.getU128Decoder = getU128Decoder;\n exports3.getU128Encoder = getU128Encoder;\n exports3.getU16Codec = getU16Codec;\n exports3.getU16Decoder = getU16Decoder;\n exports3.getU16Encoder = getU16Encoder;\n exports3.getU32Codec = getU32Codec;\n exports3.getU32Decoder = getU32Decoder;\n exports3.getU32Encoder = getU32Encoder;\n exports3.getU64Codec = getU64Codec;\n exports3.getU64Decoder = getU64Decoder;\n exports3.getU64Encoder = getU64Encoder;\n exports3.getU8Codec = getU8Codec;\n exports3.getU8Decoder = getU8Decoder;\n exports3.getU8Encoder = getU8Encoder;\n }\n });\n\n // ../../../node_modules/.pnpm/superstruct@2.0.2/node_modules/superstruct/dist/index.cjs\n var require_dist2 = __commonJS({\n \"../../../node_modules/.pnpm/superstruct@2.0.2/node_modules/superstruct/dist/index.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(global2, factory) {\n typeof exports3 === \"object\" && typeof module !== \"undefined\" ? factory(exports3) : typeof define === \"function\" && define.amd ? define([\"exports\"], factory) : (global2 = typeof globalThis !== \"undefined\" ? globalThis : global2 || self, factory(global2.Superstruct = {}));\n })(exports3, function(exports4) {\n \"use strict\";\n class StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const { message, explanation, ...rest } = failure;\n const { path } = failure;\n const msg = path.length === 0 ? message : `At path: ${path.join(\".\")} -- ${message}`;\n super(explanation ?? msg);\n if (explanation != null)\n this.cause = msg;\n Object.assign(this, rest);\n this.name = this.constructor.name;\n this.failures = () => {\n return cached ?? (cached = [failure, ...failures()]);\n };\n }\n }\n function isIterable(x4) {\n return isObject(x4) && typeof x4[Symbol.iterator] === \"function\";\n }\n function isObject(x4) {\n return typeof x4 === \"object\" && x4 != null;\n }\n function isNonArrayObject(x4) {\n return isObject(x4) && !Array.isArray(x4);\n }\n function isPlainObject(x4) {\n if (Object.prototype.toString.call(x4) !== \"[object Object]\") {\n return false;\n }\n const prototype = Object.getPrototypeOf(x4);\n return prototype === null || prototype === Object.prototype;\n }\n function print(value) {\n if (typeof value === \"symbol\") {\n return value.toString();\n }\n return typeof value === \"string\" ? JSON.stringify(value) : `${value}`;\n }\n function shiftIterator(input) {\n const { done, value } = input.next();\n return done ? void 0 : value;\n }\n function toFailure(result, context2, struct2, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === \"string\") {\n result = { message: result };\n }\n const { path, branch } = context2;\n const { type: type2 } = struct2;\n const { refinement, message = `Expected a value of type \\`${type2}\\`${refinement ? ` with refinement \\`${refinement}\\`` : \"\"}, but received: \\`${print(value)}\\`` } = result;\n return {\n value,\n type: type2,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message\n };\n }\n function* toFailures(result, context2, struct2, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n for (const r2 of result) {\n const failure = toFailure(r2, context2, struct2, value);\n if (failure) {\n yield failure;\n }\n }\n }\n function* run(value, struct2, options = {}) {\n const { path = [], branch = [value], coerce: coerce3 = false, mask: mask2 = false } = options;\n const ctx = { path, branch, mask: mask2 };\n if (coerce3) {\n value = struct2.coercer(value, ctx);\n }\n let status = \"valid\";\n for (const failure of struct2.validator(value, ctx)) {\n failure.explanation = options.message;\n status = \"not_valid\";\n yield [failure, void 0];\n }\n for (let [k4, v2, s4] of struct2.entries(value, ctx)) {\n const ts = run(v2, s4, {\n path: k4 === void 0 ? path : [...path, k4],\n branch: k4 === void 0 ? branch : [...branch, v2],\n coerce: coerce3,\n mask: mask2,\n message: options.message\n });\n for (const t3 of ts) {\n if (t3[0]) {\n status = t3[0].refinement != null ? \"not_refined\" : \"not_valid\";\n yield [t3[0], void 0];\n } else if (coerce3) {\n v2 = t3[1];\n if (k4 === void 0) {\n value = v2;\n } else if (value instanceof Map) {\n value.set(k4, v2);\n } else if (value instanceof Set) {\n value.add(v2);\n } else if (isObject(value)) {\n if (v2 !== void 0 || k4 in value)\n value[k4] = v2;\n }\n }\n }\n }\n if (status !== \"not_valid\") {\n for (const failure of struct2.refiner(value, ctx)) {\n failure.explanation = options.message;\n status = \"not_refined\";\n yield [failure, void 0];\n }\n }\n if (status === \"valid\") {\n yield [void 0, value];\n }\n }\n class Struct {\n constructor(props) {\n const { type: type2, schema, validator, refiner, coercer = (value) => value, entries = function* () {\n } } = props;\n this.type = type2;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n if (validator) {\n this.validator = (value, context2) => {\n const result = validator(value, context2);\n return toFailures(result, context2, this, value);\n };\n } else {\n this.validator = () => [];\n }\n if (refiner) {\n this.refiner = (value, context2) => {\n const result = refiner(value, context2);\n return toFailures(result, context2, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n assert(value, message) {\n return assert9(value, this, message);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n create(value, message) {\n return create2(value, this, message);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema. Masking applies recursively to\n * props of `object` structs only.\n */\n mask(value, message) {\n return mask(value, this, message);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `coerce` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful. Also, `mask` will turn on\n * masking of the unknown `object` props recursively if passed.\n */\n validate(value, options = {}) {\n return validate7(value, this, options);\n }\n }\n function assert9(value, struct2, message) {\n const result = validate7(value, struct2, { message });\n if (result[0]) {\n throw result[0];\n }\n }\n function create2(value, struct2, message) {\n const result = validate7(value, struct2, { coerce: true, message });\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n }\n function mask(value, struct2, message) {\n const result = validate7(value, struct2, { coerce: true, mask: true, message });\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n }\n function is(value, struct2) {\n const result = validate7(value, struct2);\n return !result[0];\n }\n function validate7(value, struct2, options = {}) {\n const tuples = run(value, struct2, options);\n const tuple2 = shiftIterator(tuples);\n if (tuple2[0]) {\n const error = new StructError(tuple2[0], function* () {\n for (const t3 of tuples) {\n if (t3[0]) {\n yield t3[0];\n }\n }\n });\n return [error, void 0];\n } else {\n const v2 = tuple2[1];\n return [void 0, v2];\n }\n }\n function assign(...Structs) {\n const isType = Structs[0].type === \"type\";\n const schemas = Structs.map((s4) => s4.schema);\n const schema = Object.assign({}, ...schemas);\n return isType ? type(schema) : object(schema);\n }\n function define2(name, validator) {\n return new Struct({ type: name, schema: null, validator });\n }\n function deprecated(struct2, log) {\n return new Struct({\n ...struct2,\n refiner: (value, ctx) => value === void 0 || struct2.refiner(value, ctx),\n validator(value, ctx) {\n if (value === void 0) {\n return true;\n } else {\n log(value, ctx);\n return struct2.validator(value, ctx);\n }\n }\n });\n }\n function dynamic(fn) {\n return new Struct({\n type: \"dynamic\",\n schema: null,\n *entries(value, ctx) {\n const struct2 = fn(value, ctx);\n yield* struct2.entries(value, ctx);\n },\n validator(value, ctx) {\n const struct2 = fn(value, ctx);\n return struct2.validator(value, ctx);\n },\n coercer(value, ctx) {\n const struct2 = fn(value, ctx);\n return struct2.coercer(value, ctx);\n },\n refiner(value, ctx) {\n const struct2 = fn(value, ctx);\n return struct2.refiner(value, ctx);\n }\n });\n }\n function lazy(fn) {\n let struct2;\n return new Struct({\n type: \"lazy\",\n schema: null,\n *entries(value, ctx) {\n struct2 ?? (struct2 = fn());\n yield* struct2.entries(value, ctx);\n },\n validator(value, ctx) {\n struct2 ?? (struct2 = fn());\n return struct2.validator(value, ctx);\n },\n coercer(value, ctx) {\n struct2 ?? (struct2 = fn());\n return struct2.coercer(value, ctx);\n },\n refiner(value, ctx) {\n struct2 ?? (struct2 = fn());\n return struct2.refiner(value, ctx);\n }\n });\n }\n function omit(struct2, keys) {\n const { schema } = struct2;\n const subschema = { ...schema };\n for (const key of keys) {\n delete subschema[key];\n }\n switch (struct2.type) {\n case \"type\":\n return type(subschema);\n default:\n return object(subschema);\n }\n }\n function partial(struct2) {\n const isStruct = struct2 instanceof Struct;\n const schema = isStruct ? { ...struct2.schema } : { ...struct2 };\n for (const key in schema) {\n schema[key] = optional(schema[key]);\n }\n if (isStruct && struct2.type === \"type\") {\n return type(schema);\n }\n return object(schema);\n }\n function pick2(struct2, keys) {\n const { schema } = struct2;\n const subschema = {};\n for (const key of keys) {\n subschema[key] = schema[key];\n }\n switch (struct2.type) {\n case \"type\":\n return type(subschema);\n default:\n return object(subschema);\n }\n }\n function struct(name, validator) {\n console.warn(\"superstruct@0.11 - The `struct` helper has been renamed to `define`.\");\n return define2(name, validator);\n }\n function any() {\n return define2(\"any\", () => true);\n }\n function array(Element) {\n return new Struct({\n type: \"array\",\n schema: Element,\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i3, v2] of value.entries()) {\n yield [i3, v2, Element];\n }\n }\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n validator(value) {\n return Array.isArray(value) || `Expected an array value, but received: ${print(value)}`;\n }\n });\n }\n function bigint() {\n return define2(\"bigint\", (value) => {\n return typeof value === \"bigint\";\n });\n }\n function boolean() {\n return define2(\"boolean\", (value) => {\n return typeof value === \"boolean\";\n });\n }\n function date() {\n return define2(\"date\", (value) => {\n return value instanceof Date && !isNaN(value.getTime()) || `Expected a valid \\`Date\\` object, but received: ${print(value)}`;\n });\n }\n function enums(values) {\n const schema = {};\n const description = values.map((v2) => print(v2)).join();\n for (const key of values) {\n schema[key] = key;\n }\n return new Struct({\n type: \"enums\",\n schema,\n validator(value) {\n return values.includes(value) || `Expected one of \\`${description}\\`, but received: ${print(value)}`;\n }\n });\n }\n function func() {\n return define2(\"func\", (value) => {\n return typeof value === \"function\" || `Expected a function, but received: ${print(value)}`;\n });\n }\n function instance(Class) {\n return define2(\"instance\", (value) => {\n return value instanceof Class || `Expected a \\`${Class.name}\\` instance, but received: ${print(value)}`;\n });\n }\n function integer() {\n return define2(\"integer\", (value) => {\n return typeof value === \"number\" && !isNaN(value) && Number.isInteger(value) || `Expected an integer, but received: ${print(value)}`;\n });\n }\n function intersection(Structs) {\n return new Struct({\n type: \"intersection\",\n schema: null,\n *entries(value, ctx) {\n for (const S3 of Structs) {\n yield* S3.entries(value, ctx);\n }\n },\n *validator(value, ctx) {\n for (const S3 of Structs) {\n yield* S3.validator(value, ctx);\n }\n },\n *refiner(value, ctx) {\n for (const S3 of Structs) {\n yield* S3.refiner(value, ctx);\n }\n }\n });\n }\n function literal(constant) {\n const description = print(constant);\n const t3 = typeof constant;\n return new Struct({\n type: \"literal\",\n schema: t3 === \"string\" || t3 === \"number\" || t3 === \"boolean\" ? constant : null,\n validator(value) {\n return value === constant || `Expected the literal \\`${description}\\`, but received: ${print(value)}`;\n }\n });\n }\n function map(Key, Value) {\n return new Struct({\n type: \"map\",\n schema: null,\n *entries(value) {\n if (Key && Value && value instanceof Map) {\n for (const [k4, v2] of value.entries()) {\n yield [k4, k4, Key];\n yield [k4, v2, Value];\n }\n }\n },\n coercer(value) {\n return value instanceof Map ? new Map(value) : value;\n },\n validator(value) {\n return value instanceof Map || `Expected a \\`Map\\` object, but received: ${print(value)}`;\n }\n });\n }\n function never() {\n return define2(\"never\", () => false);\n }\n function nullable(struct2) {\n return new Struct({\n ...struct2,\n validator: (value, ctx) => value === null || struct2.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct2.refiner(value, ctx)\n });\n }\n function number() {\n return define2(\"number\", (value) => {\n return typeof value === \"number\" && !isNaN(value) || `Expected a number, but received: ${print(value)}`;\n });\n }\n function object(schema) {\n const knowns = schema ? Object.keys(schema) : [];\n const Never = never();\n return new Struct({\n type: \"object\",\n schema: schema ? schema : null,\n *entries(value) {\n if (schema && isObject(value)) {\n const unknowns = new Set(Object.keys(value));\n for (const key of knowns) {\n unknowns.delete(key);\n yield [key, value[key], schema[key]];\n }\n for (const key of unknowns) {\n yield [key, value[key], Never];\n }\n }\n },\n validator(value) {\n return isNonArrayObject(value) || `Expected an object, but received: ${print(value)}`;\n },\n coercer(value, ctx) {\n if (!isNonArrayObject(value)) {\n return value;\n }\n const coerced = { ...value };\n if (ctx.mask && schema) {\n for (const key in coerced) {\n if (schema[key] === void 0) {\n delete coerced[key];\n }\n }\n }\n return coerced;\n }\n });\n }\n function optional(struct2) {\n return new Struct({\n ...struct2,\n validator: (value, ctx) => value === void 0 || struct2.validator(value, ctx),\n refiner: (value, ctx) => value === void 0 || struct2.refiner(value, ctx)\n });\n }\n function record(Key, Value) {\n return new Struct({\n type: \"record\",\n schema: null,\n *entries(value) {\n if (isObject(value)) {\n for (const k4 in value) {\n const v2 = value[k4];\n yield [k4, k4, Key];\n yield [k4, v2, Value];\n }\n }\n },\n validator(value) {\n return isNonArrayObject(value) || `Expected an object, but received: ${print(value)}`;\n },\n coercer(value) {\n return isNonArrayObject(value) ? { ...value } : value;\n }\n });\n }\n function regexp() {\n return define2(\"regexp\", (value) => {\n return value instanceof RegExp;\n });\n }\n function set(Element) {\n return new Struct({\n type: \"set\",\n schema: null,\n *entries(value) {\n if (Element && value instanceof Set) {\n for (const v2 of value) {\n yield [v2, v2, Element];\n }\n }\n },\n coercer(value) {\n return value instanceof Set ? new Set(value) : value;\n },\n validator(value) {\n return value instanceof Set || `Expected a \\`Set\\` object, but received: ${print(value)}`;\n }\n });\n }\n function string() {\n return define2(\"string\", (value) => {\n return typeof value === \"string\" || `Expected a string, but received: ${print(value)}`;\n });\n }\n function tuple(Structs) {\n const Never = never();\n return new Struct({\n type: \"tuple\",\n schema: null,\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Structs.length, value.length);\n for (let i3 = 0; i3 < length; i3++) {\n yield [i3, value[i3], Structs[i3] || Never];\n }\n }\n },\n validator(value) {\n return Array.isArray(value) || `Expected an array, but received: ${print(value)}`;\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n }\n });\n }\n function type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: \"type\",\n schema,\n *entries(value) {\n if (isObject(value)) {\n for (const k4 of keys) {\n yield [k4, value[k4], schema[k4]];\n }\n }\n },\n validator(value) {\n return isNonArrayObject(value) || `Expected an object, but received: ${print(value)}`;\n },\n coercer(value) {\n return isNonArrayObject(value) ? { ...value } : value;\n }\n });\n }\n function union(Structs) {\n const description = Structs.map((s4) => s4.type).join(\" | \");\n return new Struct({\n type: \"union\",\n schema: null,\n coercer(value, ctx) {\n for (const S3 of Structs) {\n const [error, coerced] = S3.validate(value, {\n coerce: true,\n mask: ctx.mask\n });\n if (!error) {\n return coerced;\n }\n }\n return value;\n },\n validator(value, ctx) {\n const failures = [];\n for (const S3 of Structs) {\n const [...tuples] = run(value, S3, ctx);\n const [first] = tuples;\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n return [\n `Expected the value to satisfy a union of \\`${description}\\`, but received: ${print(value)}`,\n ...failures\n ];\n }\n });\n }\n function unknown() {\n return define2(\"unknown\", () => true);\n }\n function coerce2(struct2, condition, coercer) {\n return new Struct({\n ...struct2,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct2.coercer(coercer(value, ctx), ctx) : struct2.coercer(value, ctx);\n }\n });\n }\n function defaulted(struct2, fallback, options = {}) {\n return coerce2(struct2, unknown(), (x4) => {\n const f7 = typeof fallback === \"function\" ? fallback() : fallback;\n if (x4 === void 0) {\n return f7;\n }\n if (!options.strict && isPlainObject(x4) && isPlainObject(f7)) {\n const ret = { ...x4 };\n let changed = false;\n for (const key in f7) {\n if (ret[key] === void 0) {\n ret[key] = f7[key];\n changed = true;\n }\n }\n if (changed) {\n return ret;\n }\n }\n return x4;\n });\n }\n function trimmed(struct2) {\n return coerce2(struct2, string(), (x4) => x4.trim());\n }\n function empty(struct2) {\n return refine(struct2, \"empty\", (value) => {\n const size7 = getSize(value);\n return size7 === 0 || `Expected an empty ${struct2.type} but received one with a size of \\`${size7}\\``;\n });\n }\n function getSize(value) {\n if (value instanceof Map || value instanceof Set) {\n return value.size;\n } else {\n return value.length;\n }\n }\n function max(struct2, threshold, options = {}) {\n const { exclusive } = options;\n return refine(struct2, \"max\", (value) => {\n return exclusive ? value < threshold : value <= threshold || `Expected a ${struct2.type} less than ${exclusive ? \"\" : \"or equal to \"}${threshold} but received \\`${value}\\``;\n });\n }\n function min(struct2, threshold, options = {}) {\n const { exclusive } = options;\n return refine(struct2, \"min\", (value) => {\n return exclusive ? value > threshold : value >= threshold || `Expected a ${struct2.type} greater than ${exclusive ? \"\" : \"or equal to \"}${threshold} but received \\`${value}\\``;\n });\n }\n function nonempty(struct2) {\n return refine(struct2, \"nonempty\", (value) => {\n const size7 = getSize(value);\n return size7 > 0 || `Expected a nonempty ${struct2.type} but received an empty one`;\n });\n }\n function pattern(struct2, regexp2) {\n return refine(struct2, \"pattern\", (value) => {\n return regexp2.test(value) || `Expected a ${struct2.type} matching \\`/${regexp2.source}/\\` but received \"${value}\"`;\n });\n }\n function size6(struct2, min2, max2 = min2) {\n const expected = `Expected a ${struct2.type}`;\n const of = min2 === max2 ? `of \\`${min2}\\`` : `between \\`${min2}\\` and \\`${max2}\\``;\n return refine(struct2, \"size\", (value) => {\n if (typeof value === \"number\" || value instanceof Date) {\n return min2 <= value && value <= max2 || `${expected} ${of} but received \\`${value}\\``;\n } else if (value instanceof Map || value instanceof Set) {\n const { size: size7 } = value;\n return min2 <= size7 && size7 <= max2 || `${expected} with a size ${of} but received one with a size of \\`${size7}\\``;\n } else {\n const { length } = value;\n return min2 <= length && length <= max2 || `${expected} with a length ${of} but received one with a length of \\`${length}\\``;\n }\n });\n }\n function refine(struct2, name, refiner) {\n return new Struct({\n ...struct2,\n *refiner(value, ctx) {\n yield* struct2.refiner(value, ctx);\n const result = refiner(value, ctx);\n const failures = toFailures(result, ctx, struct2, value);\n for (const failure of failures) {\n yield { ...failure, refinement: name };\n }\n }\n });\n }\n exports4.Struct = Struct;\n exports4.StructError = StructError;\n exports4.any = any;\n exports4.array = array;\n exports4.assert = assert9;\n exports4.assign = assign;\n exports4.bigint = bigint;\n exports4.boolean = boolean;\n exports4.coerce = coerce2;\n exports4.create = create2;\n exports4.date = date;\n exports4.defaulted = defaulted;\n exports4.define = define2;\n exports4.deprecated = deprecated;\n exports4.dynamic = dynamic;\n exports4.empty = empty;\n exports4.enums = enums;\n exports4.func = func;\n exports4.instance = instance;\n exports4.integer = integer;\n exports4.intersection = intersection;\n exports4.is = is;\n exports4.lazy = lazy;\n exports4.literal = literal;\n exports4.map = map;\n exports4.mask = mask;\n exports4.max = max;\n exports4.min = min;\n exports4.never = never;\n exports4.nonempty = nonempty;\n exports4.nullable = nullable;\n exports4.number = number;\n exports4.object = object;\n exports4.omit = omit;\n exports4.optional = optional;\n exports4.partial = partial;\n exports4.pattern = pattern;\n exports4.pick = pick2;\n exports4.record = record;\n exports4.refine = refine;\n exports4.regexp = regexp;\n exports4.set = set;\n exports4.size = size6;\n exports4.string = string;\n exports4.struct = struct;\n exports4.trimmed = trimmed;\n exports4.tuple = tuple;\n exports4.type = type;\n exports4.union = union;\n exports4.unknown = unknown;\n exports4.validate = validate7;\n });\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js\n function rng() {\n if (!getRandomValues) {\n getRandomValues = typeof crypto !== \"undefined\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== \"undefined\" && typeof msCrypto.getRandomValues === \"function\" && msCrypto.getRandomValues.bind(msCrypto);\n if (!getRandomValues) {\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n }\n }\n return getRandomValues(rnds8);\n }\n var getRandomValues, rnds8;\n var init_rng = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n rnds8 = new Uint8Array(16);\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js\n var regex_default;\n var init_regex3 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js\n function validate6(uuid) {\n return typeof uuid === \"string\" && regex_default.test(uuid);\n }\n var validate_default;\n var init_validate = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex3();\n validate_default = validate6;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js\n function stringify3(arr) {\n var offset = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + \"-\" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + \"-\" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + \"-\" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + \"-\" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();\n if (!validate_default(uuid)) {\n throw TypeError(\"Stringified UUID is invalid\");\n }\n return uuid;\n }\n var byteToHex, i3, stringify_default;\n var init_stringify2 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_validate();\n byteToHex = [];\n for (i3 = 0; i3 < 256; ++i3) {\n byteToHex.push((i3 + 256).toString(16).substr(1));\n }\n stringify_default = stringify3;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js\n function v1(options, buf, offset) {\n var i3 = buf && offset || 0;\n var b4 = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq;\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n if (node == null) {\n node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n if (clockseq == null) {\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383;\n }\n }\n var msecs = options.msecs !== void 0 ? options.msecs : Date.now();\n var nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1;\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;\n if (dt < 0 && options.clockseq === void 0) {\n clockseq = clockseq + 1 & 16383;\n }\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) {\n nsecs = 0;\n }\n if (nsecs >= 1e4) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n msecs += 122192928e5;\n var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;\n b4[i3++] = tl >>> 24 & 255;\n b4[i3++] = tl >>> 16 & 255;\n b4[i3++] = tl >>> 8 & 255;\n b4[i3++] = tl & 255;\n var tmh = msecs / 4294967296 * 1e4 & 268435455;\n b4[i3++] = tmh >>> 8 & 255;\n b4[i3++] = tmh & 255;\n b4[i3++] = tmh >>> 24 & 15 | 16;\n b4[i3++] = tmh >>> 16 & 255;\n b4[i3++] = clockseq >>> 8 | 128;\n b4[i3++] = clockseq & 255;\n for (var n2 = 0; n2 < 6; ++n2) {\n b4[i3 + n2] = node[n2];\n }\n return buf || stringify_default(b4);\n }\n var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default;\n var init_v1 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_rng();\n init_stringify2();\n _lastMSecs = 0;\n _lastNSecs = 0;\n v1_default = v1;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js\n function parse(uuid) {\n if (!validate_default(uuid)) {\n throw TypeError(\"Invalid UUID\");\n }\n var v2;\n var arr = new Uint8Array(16);\n arr[0] = (v2 = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v2 >>> 16 & 255;\n arr[2] = v2 >>> 8 & 255;\n arr[3] = v2 & 255;\n arr[4] = (v2 = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v2 & 255;\n arr[6] = (v2 = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v2 & 255;\n arr[8] = (v2 = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v2 & 255;\n arr[10] = (v2 = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255;\n arr[11] = v2 / 4294967296 & 255;\n arr[12] = v2 >>> 24 & 255;\n arr[13] = v2 >>> 16 & 255;\n arr[14] = v2 >>> 8 & 255;\n arr[15] = v2 & 255;\n return arr;\n }\n var parse_default;\n var init_parse = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_validate();\n parse_default = parse;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js\n function stringToBytes2(str) {\n str = unescape(encodeURIComponent(str));\n var bytes = [];\n for (var i3 = 0; i3 < str.length; ++i3) {\n bytes.push(str.charCodeAt(i3));\n }\n return bytes;\n }\n function v35_default(name, version7, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === \"string\") {\n value = stringToBytes2(value);\n }\n if (typeof namespace === \"string\") {\n namespace = parse_default(namespace);\n }\n if (namespace.length !== 16) {\n throw TypeError(\"Namespace must be array-like (16 iterable integer values, 0-255)\");\n }\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 15 | version7;\n bytes[8] = bytes[8] & 63 | 128;\n if (buf) {\n offset = offset || 0;\n for (var i3 = 0; i3 < 16; ++i3) {\n buf[offset + i3] = bytes[i3];\n }\n return buf;\n }\n return stringify_default(bytes);\n }\n try {\n generateUUID.name = name;\n } catch (err) {\n }\n generateUUID.DNS = DNS;\n generateUUID.URL = URL2;\n return generateUUID;\n }\n var DNS, URL2;\n var init_v35 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify2();\n init_parse();\n DNS = \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\";\n URL2 = \"6ba7b811-9dad-11d1-80b4-00c04fd430c8\";\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js\n function md5(bytes) {\n if (typeof bytes === \"string\") {\n var msg = unescape(encodeURIComponent(bytes));\n bytes = new Uint8Array(msg.length);\n for (var i3 = 0; i3 < msg.length; ++i3) {\n bytes[i3] = msg.charCodeAt(i3);\n }\n }\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n }\n function md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = \"0123456789abcdef\";\n for (var i3 = 0; i3 < length32; i3 += 8) {\n var x4 = input[i3 >> 5] >>> i3 % 32 & 255;\n var hex = parseInt(hexTab.charAt(x4 >>> 4 & 15) + hexTab.charAt(x4 & 15), 16);\n output.push(hex);\n }\n return output;\n }\n function getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n }\n function wordsToMd5(x4, len) {\n x4[len >> 5] |= 128 << len % 32;\n x4[getOutputLength(len) - 1] = len;\n var a3 = 1732584193;\n var b4 = -271733879;\n var c4 = -1732584194;\n var d5 = 271733878;\n for (var i3 = 0; i3 < x4.length; i3 += 16) {\n var olda = a3;\n var oldb = b4;\n var oldc = c4;\n var oldd = d5;\n a3 = md5ff(a3, b4, c4, d5, x4[i3], 7, -680876936);\n d5 = md5ff(d5, a3, b4, c4, x4[i3 + 1], 12, -389564586);\n c4 = md5ff(c4, d5, a3, b4, x4[i3 + 2], 17, 606105819);\n b4 = md5ff(b4, c4, d5, a3, x4[i3 + 3], 22, -1044525330);\n a3 = md5ff(a3, b4, c4, d5, x4[i3 + 4], 7, -176418897);\n d5 = md5ff(d5, a3, b4, c4, x4[i3 + 5], 12, 1200080426);\n c4 = md5ff(c4, d5, a3, b4, x4[i3 + 6], 17, -1473231341);\n b4 = md5ff(b4, c4, d5, a3, x4[i3 + 7], 22, -45705983);\n a3 = md5ff(a3, b4, c4, d5, x4[i3 + 8], 7, 1770035416);\n d5 = md5ff(d5, a3, b4, c4, x4[i3 + 9], 12, -1958414417);\n c4 = md5ff(c4, d5, a3, b4, x4[i3 + 10], 17, -42063);\n b4 = md5ff(b4, c4, d5, a3, x4[i3 + 11], 22, -1990404162);\n a3 = md5ff(a3, b4, c4, d5, x4[i3 + 12], 7, 1804603682);\n d5 = md5ff(d5, a3, b4, c4, x4[i3 + 13], 12, -40341101);\n c4 = md5ff(c4, d5, a3, b4, x4[i3 + 14], 17, -1502002290);\n b4 = md5ff(b4, c4, d5, a3, x4[i3 + 15], 22, 1236535329);\n a3 = md5gg(a3, b4, c4, d5, x4[i3 + 1], 5, -165796510);\n d5 = md5gg(d5, a3, b4, c4, x4[i3 + 6], 9, -1069501632);\n c4 = md5gg(c4, d5, a3, b4, x4[i3 + 11], 14, 643717713);\n b4 = md5gg(b4, c4, d5, a3, x4[i3], 20, -373897302);\n a3 = md5gg(a3, b4, c4, d5, x4[i3 + 5], 5, -701558691);\n d5 = md5gg(d5, a3, b4, c4, x4[i3 + 10], 9, 38016083);\n c4 = md5gg(c4, d5, a3, b4, x4[i3 + 15], 14, -660478335);\n b4 = md5gg(b4, c4, d5, a3, x4[i3 + 4], 20, -405537848);\n a3 = md5gg(a3, b4, c4, d5, x4[i3 + 9], 5, 568446438);\n d5 = md5gg(d5, a3, b4, c4, x4[i3 + 14], 9, -1019803690);\n c4 = md5gg(c4, d5, a3, b4, x4[i3 + 3], 14, -187363961);\n b4 = md5gg(b4, c4, d5, a3, x4[i3 + 8], 20, 1163531501);\n a3 = md5gg(a3, b4, c4, d5, x4[i3 + 13], 5, -1444681467);\n d5 = md5gg(d5, a3, b4, c4, x4[i3 + 2], 9, -51403784);\n c4 = md5gg(c4, d5, a3, b4, x4[i3 + 7], 14, 1735328473);\n b4 = md5gg(b4, c4, d5, a3, x4[i3 + 12], 20, -1926607734);\n a3 = md5hh(a3, b4, c4, d5, x4[i3 + 5], 4, -378558);\n d5 = md5hh(d5, a3, b4, c4, x4[i3 + 8], 11, -2022574463);\n c4 = md5hh(c4, d5, a3, b4, x4[i3 + 11], 16, 1839030562);\n b4 = md5hh(b4, c4, d5, a3, x4[i3 + 14], 23, -35309556);\n a3 = md5hh(a3, b4, c4, d5, x4[i3 + 1], 4, -1530992060);\n d5 = md5hh(d5, a3, b4, c4, x4[i3 + 4], 11, 1272893353);\n c4 = md5hh(c4, d5, a3, b4, x4[i3 + 7], 16, -155497632);\n b4 = md5hh(b4, c4, d5, a3, x4[i3 + 10], 23, -1094730640);\n a3 = md5hh(a3, b4, c4, d5, x4[i3 + 13], 4, 681279174);\n d5 = md5hh(d5, a3, b4, c4, x4[i3], 11, -358537222);\n c4 = md5hh(c4, d5, a3, b4, x4[i3 + 3], 16, -722521979);\n b4 = md5hh(b4, c4, d5, a3, x4[i3 + 6], 23, 76029189);\n a3 = md5hh(a3, b4, c4, d5, x4[i3 + 9], 4, -640364487);\n d5 = md5hh(d5, a3, b4, c4, x4[i3 + 12], 11, -421815835);\n c4 = md5hh(c4, d5, a3, b4, x4[i3 + 15], 16, 530742520);\n b4 = md5hh(b4, c4, d5, a3, x4[i3 + 2], 23, -995338651);\n a3 = md5ii(a3, b4, c4, d5, x4[i3], 6, -198630844);\n d5 = md5ii(d5, a3, b4, c4, x4[i3 + 7], 10, 1126891415);\n c4 = md5ii(c4, d5, a3, b4, x4[i3 + 14], 15, -1416354905);\n b4 = md5ii(b4, c4, d5, a3, x4[i3 + 5], 21, -57434055);\n a3 = md5ii(a3, b4, c4, d5, x4[i3 + 12], 6, 1700485571);\n d5 = md5ii(d5, a3, b4, c4, x4[i3 + 3], 10, -1894986606);\n c4 = md5ii(c4, d5, a3, b4, x4[i3 + 10], 15, -1051523);\n b4 = md5ii(b4, c4, d5, a3, x4[i3 + 1], 21, -2054922799);\n a3 = md5ii(a3, b4, c4, d5, x4[i3 + 8], 6, 1873313359);\n d5 = md5ii(d5, a3, b4, c4, x4[i3 + 15], 10, -30611744);\n c4 = md5ii(c4, d5, a3, b4, x4[i3 + 6], 15, -1560198380);\n b4 = md5ii(b4, c4, d5, a3, x4[i3 + 13], 21, 1309151649);\n a3 = md5ii(a3, b4, c4, d5, x4[i3 + 4], 6, -145523070);\n d5 = md5ii(d5, a3, b4, c4, x4[i3 + 11], 10, -1120210379);\n c4 = md5ii(c4, d5, a3, b4, x4[i3 + 2], 15, 718787259);\n b4 = md5ii(b4, c4, d5, a3, x4[i3 + 9], 21, -343485551);\n a3 = safeAdd(a3, olda);\n b4 = safeAdd(b4, oldb);\n c4 = safeAdd(c4, oldc);\n d5 = safeAdd(d5, oldd);\n }\n return [a3, b4, c4, d5];\n }\n function bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n for (var i3 = 0; i3 < length8; i3 += 8) {\n output[i3 >> 5] |= (input[i3 / 8] & 255) << i3 % 32;\n }\n return output;\n }\n function safeAdd(x4, y6) {\n var lsw = (x4 & 65535) + (y6 & 65535);\n var msw = (x4 >> 16) + (y6 >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 65535;\n }\n function bitRotateLeft(num2, cnt) {\n return num2 << cnt | num2 >>> 32 - cnt;\n }\n function md5cmn(q3, a3, b4, x4, s4, t3) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a3, q3), safeAdd(x4, t3)), s4), b4);\n }\n function md5ff(a3, b4, c4, d5, x4, s4, t3) {\n return md5cmn(b4 & c4 | ~b4 & d5, a3, b4, x4, s4, t3);\n }\n function md5gg(a3, b4, c4, d5, x4, s4, t3) {\n return md5cmn(b4 & d5 | c4 & ~d5, a3, b4, x4, s4, t3);\n }\n function md5hh(a3, b4, c4, d5, x4, s4, t3) {\n return md5cmn(b4 ^ c4 ^ d5, a3, b4, x4, s4, t3);\n }\n function md5ii(a3, b4, c4, d5, x4, s4, t3) {\n return md5cmn(c4 ^ (b4 | ~d5), a3, b4, x4, s4, t3);\n }\n var md5_default;\n var init_md5 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n md5_default = md5;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js\n var v3, v3_default2;\n var init_v32 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v35();\n init_md5();\n v3 = v35_default(\"v3\", 48, md5_default);\n v3_default2 = v3;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js\n function v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)();\n rnds[6] = rnds[6] & 15 | 64;\n rnds[8] = rnds[8] & 63 | 128;\n if (buf) {\n offset = offset || 0;\n for (var i3 = 0; i3 < 16; ++i3) {\n buf[offset + i3] = rnds[i3];\n }\n return buf;\n }\n return stringify_default(rnds);\n }\n var v4_default;\n var init_v4 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_rng();\n init_stringify2();\n v4_default = v4;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js\n function f6(s4, x4, y6, z2) {\n switch (s4) {\n case 0:\n return x4 & y6 ^ ~x4 & z2;\n case 1:\n return x4 ^ y6 ^ z2;\n case 2:\n return x4 & y6 ^ x4 & z2 ^ y6 & z2;\n case 3:\n return x4 ^ y6 ^ z2;\n }\n }\n function ROTL(x4, n2) {\n return x4 << n2 | x4 >>> 32 - n2;\n }\n function sha1(bytes) {\n var K2 = [1518500249, 1859775393, 2400959708, 3395469782];\n var H3 = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];\n if (typeof bytes === \"string\") {\n var msg = unescape(encodeURIComponent(bytes));\n bytes = [];\n for (var i3 = 0; i3 < msg.length; ++i3) {\n bytes.push(msg.charCodeAt(i3));\n }\n } else if (!Array.isArray(bytes)) {\n bytes = Array.prototype.slice.call(bytes);\n }\n bytes.push(128);\n var l6 = bytes.length / 4 + 2;\n var N4 = Math.ceil(l6 / 16);\n var M2 = new Array(N4);\n for (var _i = 0; _i < N4; ++_i) {\n var arr = new Uint32Array(16);\n for (var j2 = 0; j2 < 16; ++j2) {\n arr[j2] = bytes[_i * 64 + j2 * 4] << 24 | bytes[_i * 64 + j2 * 4 + 1] << 16 | bytes[_i * 64 + j2 * 4 + 2] << 8 | bytes[_i * 64 + j2 * 4 + 3];\n }\n M2[_i] = arr;\n }\n M2[N4 - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M2[N4 - 1][14] = Math.floor(M2[N4 - 1][14]);\n M2[N4 - 1][15] = (bytes.length - 1) * 8 & 4294967295;\n for (var _i2 = 0; _i2 < N4; ++_i2) {\n var W = new Uint32Array(80);\n for (var t3 = 0; t3 < 16; ++t3) {\n W[t3] = M2[_i2][t3];\n }\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n var a3 = H3[0];\n var b4 = H3[1];\n var c4 = H3[2];\n var d5 = H3[3];\n var e2 = H3[4];\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s4 = Math.floor(_t2 / 20);\n var T4 = ROTL(a3, 5) + f6(s4, b4, c4, d5) + e2 + K2[s4] + W[_t2] >>> 0;\n e2 = d5;\n d5 = c4;\n c4 = ROTL(b4, 30) >>> 0;\n b4 = a3;\n a3 = T4;\n }\n H3[0] = H3[0] + a3 >>> 0;\n H3[1] = H3[1] + b4 >>> 0;\n H3[2] = H3[2] + c4 >>> 0;\n H3[3] = H3[3] + d5 >>> 0;\n H3[4] = H3[4] + e2 >>> 0;\n }\n return [H3[0] >> 24 & 255, H3[0] >> 16 & 255, H3[0] >> 8 & 255, H3[0] & 255, H3[1] >> 24 & 255, H3[1] >> 16 & 255, H3[1] >> 8 & 255, H3[1] & 255, H3[2] >> 24 & 255, H3[2] >> 16 & 255, H3[2] >> 8 & 255, H3[2] & 255, H3[3] >> 24 & 255, H3[3] >> 16 & 255, H3[3] >> 8 & 255, H3[3] & 255, H3[4] >> 24 & 255, H3[4] >> 16 & 255, H3[4] >> 8 & 255, H3[4] & 255];\n }\n var sha1_default;\n var init_sha1 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n sha1_default = sha1;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js\n var v5, v5_default;\n var init_v5 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v35();\n init_sha1();\n v5 = v35_default(\"v5\", 80, sha1_default);\n v5_default = v5;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js\n var nil_default;\n var init_nil = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n nil_default = \"00000000-0000-0000-0000-000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js\n function version6(uuid) {\n if (!validate_default(uuid)) {\n throw TypeError(\"Invalid UUID\");\n }\n return parseInt(uuid.substr(14, 1), 16);\n }\n var version_default;\n var init_version9 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_validate();\n version_default = version6;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/index.js\n var esm_browser_exports = {};\n __export(esm_browser_exports, {\n NIL: () => nil_default,\n parse: () => parse_default,\n stringify: () => stringify_default,\n v1: () => v1_default,\n v3: () => v3_default2,\n v4: () => v4_default,\n v5: () => v5_default,\n validate: () => validate_default,\n version: () => version_default\n });\n var init_esm_browser = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v1();\n init_v32();\n init_v4();\n init_v5();\n init_nil();\n init_version9();\n init_validate();\n init_stringify2();\n init_parse();\n }\n });\n\n // ../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/generateRequest.js\n var require_generateRequest = __commonJS({\n \"../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/generateRequest.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var uuid = (init_esm_browser(), __toCommonJS(esm_browser_exports)).v4;\n var generateRequest = function(method, params, id, options) {\n if (typeof method !== \"string\") {\n throw new TypeError(method + \" must be a string\");\n }\n options = options || {};\n const version7 = typeof options.version === \"number\" ? options.version : 2;\n if (version7 !== 1 && version7 !== 2) {\n throw new TypeError(version7 + \" must be 1 or 2\");\n }\n const request = {\n method\n };\n if (version7 === 2) {\n request.jsonrpc = \"2.0\";\n }\n if (params) {\n if (typeof params !== \"object\" && !Array.isArray(params)) {\n throw new TypeError(params + \" must be an object, array or omitted\");\n }\n request.params = params;\n }\n if (typeof id === \"undefined\") {\n const generator = typeof options.generator === \"function\" ? options.generator : function() {\n return uuid();\n };\n request.id = generator(request, options);\n } else if (version7 === 2 && id === null) {\n if (options.notificationIdNull) {\n request.id = null;\n }\n } else {\n request.id = id;\n }\n return request;\n };\n module.exports = generateRequest;\n }\n });\n\n // ../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/client/browser/index.js\n var require_browser = __commonJS({\n \"../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/client/browser/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var uuid = (init_esm_browser(), __toCommonJS(esm_browser_exports)).v4;\n var generateRequest = require_generateRequest();\n var ClientBrowser = function(callServer, options) {\n if (!(this instanceof ClientBrowser)) {\n return new ClientBrowser(callServer, options);\n }\n if (!options) {\n options = {};\n }\n this.options = {\n reviver: typeof options.reviver !== \"undefined\" ? options.reviver : null,\n replacer: typeof options.replacer !== \"undefined\" ? options.replacer : null,\n generator: typeof options.generator !== \"undefined\" ? options.generator : function() {\n return uuid();\n },\n version: typeof options.version !== \"undefined\" ? options.version : 2,\n notificationIdNull: typeof options.notificationIdNull === \"boolean\" ? options.notificationIdNull : false\n };\n this.callServer = callServer;\n };\n module.exports = ClientBrowser;\n ClientBrowser.prototype.request = function(method, params, id, callback) {\n const self2 = this;\n let request = null;\n const isBatch = Array.isArray(method) && typeof params === \"function\";\n if (this.options.version === 1 && isBatch) {\n throw new TypeError(\"JSON-RPC 1.0 does not support batching\");\n }\n const isRaw = !isBatch && method && typeof method === \"object\" && typeof params === \"function\";\n if (isBatch || isRaw) {\n callback = params;\n request = method;\n } else {\n if (typeof id === \"function\") {\n callback = id;\n id = void 0;\n }\n const hasCallback = typeof callback === \"function\";\n try {\n request = generateRequest(method, params, id, {\n generator: this.options.generator,\n version: this.options.version,\n notificationIdNull: this.options.notificationIdNull\n });\n } catch (err) {\n if (hasCallback) {\n return callback(err);\n }\n throw err;\n }\n if (!hasCallback) {\n return request;\n }\n }\n let message;\n try {\n message = JSON.stringify(request, this.options.replacer);\n } catch (err) {\n return callback(err);\n }\n this.callServer(message, function(err, response) {\n self2._parseResponse(err, response, callback);\n });\n return request;\n };\n ClientBrowser.prototype._parseResponse = function(err, responseText, callback) {\n if (err) {\n callback(err);\n return;\n }\n if (!responseText) {\n return callback();\n }\n let response;\n try {\n response = JSON.parse(responseText, this.options.reviver);\n } catch (err2) {\n return callback(err2);\n }\n if (callback.length === 3) {\n if (Array.isArray(response)) {\n const isError = function(res) {\n return typeof res.error !== \"undefined\";\n };\n const isNotError = function(res) {\n return !isError(res);\n };\n return callback(null, response.filter(isError), response.filter(isNotError));\n } else {\n return callback(null, response.error, response.result);\n }\n }\n callback(null, response);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js\n var require_eventemitter3 = __commonJS({\n \"../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var has = Object.prototype.hasOwnProperty;\n var prefix = \"~\";\n function Events() {\n }\n if (Object.create) {\n Events.prototype = /* @__PURE__ */ Object.create(null);\n if (!new Events().__proto__)\n prefix = false;\n }\n function EE(fn, context2, once2) {\n this.fn = fn;\n this.context = context2;\n this.once = once2 || false;\n }\n function addListener2(emitter, event, fn, context2, once2) {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"The listener must be a function\");\n }\n var listener = new EE(fn, context2 || emitter, once2), evt = prefix ? prefix + event : event;\n if (!emitter._events[evt])\n emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn)\n emitter._events[evt].push(listener);\n else\n emitter._events[evt] = [emitter._events[evt], listener];\n return emitter;\n }\n function clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0)\n emitter._events = new Events();\n else\n delete emitter._events[evt];\n }\n function EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n }\n EventEmitter.prototype.eventNames = function eventNames() {\n var names = [], events, name;\n if (this._eventsCount === 0)\n return names;\n for (name in events = this._events) {\n if (has.call(events, name))\n names.push(prefix ? name.slice(1) : name);\n }\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n return names;\n };\n EventEmitter.prototype.listeners = function listeners2(event) {\n var evt = prefix ? prefix + event : event, handlers = this._events[evt];\n if (!handlers)\n return [];\n if (handlers.fn)\n return [handlers.fn];\n for (var i3 = 0, l6 = handlers.length, ee = new Array(l6); i3 < l6; i3++) {\n ee[i3] = handlers[i3].fn;\n }\n return ee;\n };\n EventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event, listeners2 = this._events[evt];\n if (!listeners2)\n return 0;\n if (listeners2.fn)\n return 1;\n return listeners2.length;\n };\n EventEmitter.prototype.emit = function emit2(event, a1, a22, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n if (!this._events[evt])\n return false;\n var listeners2 = this._events[evt], len = arguments.length, args, i3;\n if (listeners2.fn) {\n if (listeners2.once)\n this.removeListener(event, listeners2.fn, void 0, true);\n switch (len) {\n case 1:\n return listeners2.fn.call(listeners2.context), true;\n case 2:\n return listeners2.fn.call(listeners2.context, a1), true;\n case 3:\n return listeners2.fn.call(listeners2.context, a1, a22), true;\n case 4:\n return listeners2.fn.call(listeners2.context, a1, a22, a3), true;\n case 5:\n return listeners2.fn.call(listeners2.context, a1, a22, a3, a4), true;\n case 6:\n return listeners2.fn.call(listeners2.context, a1, a22, a3, a4, a5), true;\n }\n for (i3 = 1, args = new Array(len - 1); i3 < len; i3++) {\n args[i3 - 1] = arguments[i3];\n }\n listeners2.fn.apply(listeners2.context, args);\n } else {\n var length = listeners2.length, j2;\n for (i3 = 0; i3 < length; i3++) {\n if (listeners2[i3].once)\n this.removeListener(event, listeners2[i3].fn, void 0, true);\n switch (len) {\n case 1:\n listeners2[i3].fn.call(listeners2[i3].context);\n break;\n case 2:\n listeners2[i3].fn.call(listeners2[i3].context, a1);\n break;\n case 3:\n listeners2[i3].fn.call(listeners2[i3].context, a1, a22);\n break;\n case 4:\n listeners2[i3].fn.call(listeners2[i3].context, a1, a22, a3);\n break;\n default:\n if (!args)\n for (j2 = 1, args = new Array(len - 1); j2 < len; j2++) {\n args[j2 - 1] = arguments[j2];\n }\n listeners2[i3].fn.apply(listeners2[i3].context, args);\n }\n }\n }\n return true;\n };\n EventEmitter.prototype.on = function on2(event, fn, context2) {\n return addListener2(this, event, fn, context2, false);\n };\n EventEmitter.prototype.once = function once2(event, fn, context2) {\n return addListener2(this, event, fn, context2, true);\n };\n EventEmitter.prototype.removeListener = function removeListener2(event, fn, context2, once2) {\n var evt = prefix ? prefix + event : event;\n if (!this._events[evt])\n return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n var listeners2 = this._events[evt];\n if (listeners2.fn) {\n if (listeners2.fn === fn && (!once2 || listeners2.once) && (!context2 || listeners2.context === context2)) {\n clearEvent(this, evt);\n }\n } else {\n for (var i3 = 0, events = [], length = listeners2.length; i3 < length; i3++) {\n if (listeners2[i3].fn !== fn || once2 && !listeners2[i3].once || context2 && listeners2[i3].context !== context2) {\n events.push(listeners2[i3]);\n }\n }\n if (events.length)\n this._events[evt] = events.length === 1 ? events[0] : events;\n else\n clearEvent(this, evt);\n }\n return this;\n };\n EventEmitter.prototype.removeAllListeners = function removeAllListeners2(event) {\n var evt;\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt])\n clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n return this;\n };\n EventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n EventEmitter.prototype.addListener = EventEmitter.prototype.on;\n EventEmitter.prefixed = prefix;\n EventEmitter.EventEmitter = EventEmitter;\n if (\"undefined\" !== typeof module) {\n module.exports = EventEmitter;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/rpc-websockets@9.1.3/node_modules/rpc-websockets/dist/index.browser.cjs\n var require_index_browser4 = __commonJS({\n \"../../../node_modules/.pnpm/rpc-websockets@9.1.3/node_modules/rpc-websockets/dist/index.browser.cjs\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var buffer2 = (init_buffer(), __toCommonJS(buffer_exports));\n var eventemitter3 = require_eventemitter3();\n var WebSocketBrowserImpl = class extends eventemitter3.EventEmitter {\n socket;\n /** Instantiate a WebSocket class\n * @constructor\n * @param {String} address - url to a websocket server\n * @param {(Object)} options - websocket options\n * @param {(String|Array)} protocols - a list of protocols\n * @return {WebSocketBrowserImpl} - returns a WebSocket instance\n */\n constructor(address, options, protocols) {\n super();\n this.socket = new window.WebSocket(address, protocols);\n this.socket.onopen = () => this.emit(\"open\");\n this.socket.onmessage = (event) => this.emit(\"message\", event.data);\n this.socket.onerror = (error) => this.emit(\"error\", error);\n this.socket.onclose = (event) => {\n this.emit(\"close\", event.code, event.reason);\n };\n }\n /**\n * Sends data through a websocket connection\n * @method\n * @param {(String|Object)} data - data to be sent via websocket\n * @param {Object} optionsOrCallback - ws options\n * @param {Function} callback - a callback called once the data is sent\n * @return {Undefined}\n */\n send(data, optionsOrCallback, callback) {\n const cb = callback || optionsOrCallback;\n try {\n this.socket.send(data);\n cb();\n } catch (error) {\n cb(error);\n }\n }\n /**\n * Closes an underlying socket\n * @method\n * @param {Number} code - status code explaining why the connection is being closed\n * @param {String} reason - a description why the connection is closing\n * @return {Undefined}\n * @throws {Error}\n */\n close(code, reason) {\n this.socket.close(code, reason);\n }\n addEventListener(type, listener, options) {\n this.socket.addEventListener(type, listener, options);\n }\n };\n function WebSocket2(address, options) {\n return new WebSocketBrowserImpl(address, options);\n }\n var DefaultDataPack = class {\n encode(value) {\n return JSON.stringify(value);\n }\n decode(value) {\n return JSON.parse(value);\n }\n };\n var CommonClient = class extends eventemitter3.EventEmitter {\n address;\n rpc_id;\n queue;\n options;\n autoconnect;\n ready;\n reconnect;\n reconnect_timer_id;\n reconnect_interval;\n max_reconnects;\n rest_options;\n current_reconnects;\n generate_request_id;\n socket;\n webSocketFactory;\n dataPack;\n /**\n * Instantiate a Client class.\n * @constructor\n * @param {webSocketFactory} webSocketFactory - factory method for WebSocket\n * @param {String} address - url to a websocket server\n * @param {Object} options - ws options object with reconnect parameters\n * @param {Function} generate_request_id - custom generation request Id\n * @param {DataPack} dataPack - data pack contains encoder and decoder\n * @return {CommonClient}\n */\n constructor(webSocketFactory, address = \"ws://localhost:8080\", {\n autoconnect = true,\n reconnect = true,\n reconnect_interval = 1e3,\n max_reconnects = 5,\n ...rest_options\n } = {}, generate_request_id, dataPack) {\n super();\n this.webSocketFactory = webSocketFactory;\n this.queue = {};\n this.rpc_id = 0;\n this.address = address;\n this.autoconnect = autoconnect;\n this.ready = false;\n this.reconnect = reconnect;\n this.reconnect_timer_id = void 0;\n this.reconnect_interval = reconnect_interval;\n this.max_reconnects = max_reconnects;\n this.rest_options = rest_options;\n this.current_reconnects = 0;\n this.generate_request_id = generate_request_id || (() => typeof this.rpc_id === \"number\" ? ++this.rpc_id : Number(this.rpc_id) + 1);\n if (!dataPack)\n this.dataPack = new DefaultDataPack();\n else\n this.dataPack = dataPack;\n if (this.autoconnect)\n this._connect(this.address, {\n autoconnect: this.autoconnect,\n reconnect: this.reconnect,\n reconnect_interval: this.reconnect_interval,\n max_reconnects: this.max_reconnects,\n ...this.rest_options\n });\n }\n /**\n * Connects to a defined server if not connected already.\n * @method\n * @return {Undefined}\n */\n connect() {\n if (this.socket)\n return;\n this._connect(this.address, {\n autoconnect: this.autoconnect,\n reconnect: this.reconnect,\n reconnect_interval: this.reconnect_interval,\n max_reconnects: this.max_reconnects,\n ...this.rest_options\n });\n }\n /**\n * Calls a registered RPC method on server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object|Array} params - optional method parameters\n * @param {Number} timeout - RPC reply timeout value\n * @param {Object} ws_opts - options passed to ws\n * @return {Promise}\n */\n call(method, params, timeout, ws_opts) {\n if (!ws_opts && \"object\" === typeof timeout) {\n ws_opts = timeout;\n timeout = null;\n }\n return new Promise((resolve, reject) => {\n if (!this.ready)\n return reject(new Error(\"socket not ready\"));\n const rpc_id = this.generate_request_id(method, params);\n const message = {\n jsonrpc: \"2.0\",\n method,\n params: params || void 0,\n id: rpc_id\n };\n this.socket.send(this.dataPack.encode(message), ws_opts, (error) => {\n if (error)\n return reject(error);\n this.queue[rpc_id] = { promise: [resolve, reject] };\n if (timeout) {\n this.queue[rpc_id].timeout = setTimeout(() => {\n delete this.queue[rpc_id];\n reject(new Error(\"reply timeout\"));\n }, timeout);\n }\n });\n });\n }\n /**\n * Logins with the other side of the connection.\n * @method\n * @param {Object} params - Login credentials object\n * @return {Promise}\n */\n async login(params) {\n const resp = await this.call(\"rpc.login\", params);\n if (!resp)\n throw new Error(\"authentication failed\");\n return resp;\n }\n /**\n * Fetches a list of client's methods registered on server.\n * @method\n * @return {Array}\n */\n async listMethods() {\n return await this.call(\"__listMethods\");\n }\n /**\n * Sends a JSON-RPC 2.0 notification to server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object} params - optional method parameters\n * @return {Promise}\n */\n notify(method, params) {\n return new Promise((resolve, reject) => {\n if (!this.ready)\n return reject(new Error(\"socket not ready\"));\n const message = {\n jsonrpc: \"2.0\",\n method,\n params\n };\n this.socket.send(this.dataPack.encode(message), (error) => {\n if (error)\n return reject(error);\n resolve();\n });\n });\n }\n /**\n * Subscribes for a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n async subscribe(event) {\n if (typeof event === \"string\")\n event = [event];\n const result = await this.call(\"rpc.on\", event);\n if (typeof event === \"string\" && result[event] !== \"ok\")\n throw new Error(\n \"Failed subscribing to an event '\" + event + \"' with: \" + result[event]\n );\n return result;\n }\n /**\n * Unsubscribes from a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n async unsubscribe(event) {\n if (typeof event === \"string\")\n event = [event];\n const result = await this.call(\"rpc.off\", event);\n if (typeof event === \"string\" && result[event] !== \"ok\")\n throw new Error(\"Failed unsubscribing from an event with: \" + result);\n return result;\n }\n /**\n * Closes a WebSocket connection gracefully.\n * @method\n * @param {Number} code - socket close code\n * @param {String} data - optional data to be sent before closing\n * @return {Undefined}\n */\n close(code, data) {\n this.socket.close(code || 1e3, data);\n }\n /**\n * Enable / disable automatic reconnection.\n * @method\n * @param {Boolean} reconnect - enable / disable reconnection\n * @return {Undefined}\n */\n setAutoReconnect(reconnect) {\n this.reconnect = reconnect;\n }\n /**\n * Set the interval between reconnection attempts.\n * @method\n * @param {Number} interval - reconnection interval in milliseconds\n * @return {Undefined}\n */\n setReconnectInterval(interval) {\n this.reconnect_interval = interval;\n }\n /**\n * Set the maximum number of reconnection attempts.\n * @method\n * @param {Number} max_reconnects - maximum reconnection attempts\n * @return {Undefined}\n */\n setMaxReconnects(max_reconnects) {\n this.max_reconnects = max_reconnects;\n }\n /**\n * Connection/Message handler.\n * @method\n * @private\n * @param {String} address - WebSocket API address\n * @param {Object} options - ws options object\n * @return {Undefined}\n */\n _connect(address, options) {\n clearTimeout(this.reconnect_timer_id);\n this.socket = this.webSocketFactory(address, options);\n this.socket.addEventListener(\"open\", () => {\n this.ready = true;\n this.emit(\"open\");\n this.current_reconnects = 0;\n });\n this.socket.addEventListener(\"message\", ({ data: message }) => {\n if (message instanceof ArrayBuffer)\n message = buffer2.Buffer.from(message).toString();\n try {\n message = this.dataPack.decode(message);\n } catch (error) {\n return;\n }\n if (message.notification && this.listeners(message.notification).length) {\n if (!Object.keys(message.params).length)\n return this.emit(message.notification);\n const args = [message.notification];\n if (message.params.constructor === Object)\n args.push(message.params);\n else\n for (let i3 = 0; i3 < message.params.length; i3++)\n args.push(message.params[i3]);\n return Promise.resolve().then(() => {\n this.emit.apply(this, args);\n });\n }\n if (!this.queue[message.id]) {\n if (message.method) {\n return Promise.resolve().then(() => {\n this.emit(message.method, message?.params);\n });\n }\n return;\n }\n if (\"error\" in message === \"result\" in message)\n this.queue[message.id].promise[1](\n new Error(\n 'Server response malformed. Response must include either \"result\" or \"error\", but not both.'\n )\n );\n if (this.queue[message.id].timeout)\n clearTimeout(this.queue[message.id].timeout);\n if (message.error)\n this.queue[message.id].promise[1](message.error);\n else\n this.queue[message.id].promise[0](message.result);\n delete this.queue[message.id];\n });\n this.socket.addEventListener(\"error\", (error) => this.emit(\"error\", error));\n this.socket.addEventListener(\"close\", ({ code, reason }) => {\n if (this.ready)\n setTimeout(() => this.emit(\"close\", code, reason), 0);\n this.ready = false;\n this.socket = void 0;\n if (code === 1e3)\n return;\n this.current_reconnects++;\n if (this.reconnect && (this.max_reconnects > this.current_reconnects || this.max_reconnects === 0))\n this.reconnect_timer_id = setTimeout(\n () => this._connect(address, options),\n this.reconnect_interval\n );\n });\n }\n };\n var Client = class extends CommonClient {\n constructor(address = \"ws://localhost:8080\", {\n autoconnect = true,\n reconnect = true,\n reconnect_interval = 1e3,\n max_reconnects = 5\n } = {}, generate_request_id) {\n super(\n WebSocket2,\n address,\n {\n autoconnect,\n reconnect,\n reconnect_interval,\n max_reconnects\n },\n generate_request_id\n );\n }\n };\n exports3.Client = Client;\n exports3.CommonClient = CommonClient;\n exports3.DefaultDataPack = DefaultDataPack;\n exports3.WebSocket = WebSocket2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha3.js\n var require_sha33 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha3.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.shake256 = exports3.shake128 = exports3.keccak_512 = exports3.keccak_384 = exports3.keccak_256 = exports3.keccak_224 = exports3.sha3_512 = exports3.sha3_384 = exports3.sha3_256 = exports3.sha3_224 = exports3.Keccak = void 0;\n exports3.keccakP = keccakP2;\n var _u64_ts_1 = require_u642();\n var utils_ts_1 = require_utils12();\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n var _7n2 = BigInt(7);\n var _256n2 = BigInt(256);\n var _0x71n2 = BigInt(113);\n var SHA3_PI2 = [];\n var SHA3_ROTL2 = [];\n var _SHA3_IOTA2 = [];\n for (let round = 0, R3 = _1n11, x4 = 1, y6 = 0; round < 24; round++) {\n [x4, y6] = [y6, (2 * x4 + 3 * y6) % 5];\n SHA3_PI2.push(2 * (5 * y6 + x4));\n SHA3_ROTL2.push((round + 1) * (round + 2) / 2 % 64);\n let t3 = _0n11;\n for (let j2 = 0; j2 < 7; j2++) {\n R3 = (R3 << _1n11 ^ (R3 >> _7n2) * _0x71n2) % _256n2;\n if (R3 & _2n8)\n t3 ^= _1n11 << (_1n11 << /* @__PURE__ */ BigInt(j2)) - _1n11;\n }\n _SHA3_IOTA2.push(t3);\n }\n var IOTAS2 = (0, _u64_ts_1.split)(_SHA3_IOTA2, true);\n var SHA3_IOTA_H2 = IOTAS2[0];\n var SHA3_IOTA_L2 = IOTAS2[1];\n var rotlH2 = (h4, l6, s4) => s4 > 32 ? (0, _u64_ts_1.rotlBH)(h4, l6, s4) : (0, _u64_ts_1.rotlSH)(h4, l6, s4);\n var rotlL2 = (h4, l6, s4) => s4 > 32 ? (0, _u64_ts_1.rotlBL)(h4, l6, s4) : (0, _u64_ts_1.rotlSL)(h4, l6, s4);\n function keccakP2(s4, rounds = 24) {\n const B2 = new Uint32Array(5 * 2);\n for (let round = 24 - rounds; round < 24; round++) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[x4] ^ s4[x4 + 10] ^ s4[x4 + 20] ^ s4[x4 + 30] ^ s4[x4 + 40];\n for (let x4 = 0; x4 < 10; x4 += 2) {\n const idx1 = (x4 + 8) % 10;\n const idx0 = (x4 + 2) % 10;\n const B0 = B2[idx0];\n const B1 = B2[idx0 + 1];\n const Th = rotlH2(B0, B1, 1) ^ B2[idx1];\n const Tl = rotlL2(B0, B1, 1) ^ B2[idx1 + 1];\n for (let y6 = 0; y6 < 50; y6 += 10) {\n s4[x4 + y6] ^= Th;\n s4[x4 + y6 + 1] ^= Tl;\n }\n }\n let curH = s4[2];\n let curL = s4[3];\n for (let t3 = 0; t3 < 24; t3++) {\n const shift = SHA3_ROTL2[t3];\n const Th = rotlH2(curH, curL, shift);\n const Tl = rotlL2(curH, curL, shift);\n const PI = SHA3_PI2[t3];\n curH = s4[PI];\n curL = s4[PI + 1];\n s4[PI] = Th;\n s4[PI + 1] = Tl;\n }\n for (let y6 = 0; y6 < 50; y6 += 10) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[y6 + x4];\n for (let x4 = 0; x4 < 10; x4++)\n s4[y6 + x4] ^= ~B2[(x4 + 2) % 10] & B2[(x4 + 4) % 10];\n }\n s4[0] ^= SHA3_IOTA_H2[round];\n s4[1] ^= SHA3_IOTA_L2[round];\n }\n (0, utils_ts_1.clean)(B2);\n }\n var Keccak2 = class _Keccak extends utils_ts_1.Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n this.enableXOF = false;\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n (0, utils_ts_1.anumber)(outputLen);\n if (!(0 < blockLen && blockLen < 200))\n throw new Error(\"only keccak-f1600 function is supported\");\n this.state = new Uint8Array(200);\n this.state32 = (0, utils_ts_1.u32)(this.state);\n }\n clone() {\n return this._cloneInto();\n }\n keccak() {\n (0, utils_ts_1.swap32IfBE)(this.state32);\n keccakP2(this.state32, this.rounds);\n (0, utils_ts_1.swap32IfBE)(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n (0, utils_ts_1.aexists)(this);\n data = (0, utils_ts_1.toBytes)(data);\n (0, utils_ts_1.abytes)(data);\n const { blockLen, state } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i3 = 0; i3 < take; i3++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n state[pos] ^= suffix;\n if ((suffix & 128) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 128;\n this.keccak();\n }\n writeInto(out) {\n (0, utils_ts_1.aexists)(this, false);\n (0, utils_ts_1.abytes)(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len; ) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n if (!this.enableXOF)\n throw new Error(\"XOF is not possible for this instance\");\n return this.writeInto(out);\n }\n xof(bytes) {\n (0, utils_ts_1.anumber)(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n (0, utils_ts_1.aoutput)(out, this);\n if (this.finished)\n throw new Error(\"digest() was already called\");\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n (0, utils_ts_1.clean)(this.state);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n };\n exports3.Keccak = Keccak2;\n var gen2 = (suffix, blockLen, outputLen) => (0, utils_ts_1.createHasher)(() => new Keccak2(blockLen, suffix, outputLen));\n exports3.sha3_224 = (() => gen2(6, 144, 224 / 8))();\n exports3.sha3_256 = (() => gen2(6, 136, 256 / 8))();\n exports3.sha3_384 = (() => gen2(6, 104, 384 / 8))();\n exports3.sha3_512 = (() => gen2(6, 72, 512 / 8))();\n exports3.keccak_224 = (() => gen2(1, 144, 224 / 8))();\n exports3.keccak_256 = (() => gen2(1, 136, 256 / 8))();\n exports3.keccak_384 = (() => gen2(1, 104, 384 / 8))();\n exports3.keccak_512 = (() => gen2(1, 72, 512 / 8))();\n var genShake = (suffix, blockLen, outputLen) => (0, utils_ts_1.createXOFer)((opts = {}) => new Keccak2(blockLen, suffix, opts.dkLen === void 0 ? outputLen : opts.dkLen, true));\n exports3.shake128 = (() => genShake(31, 168, 128 / 8))();\n exports3.shake256 = (() => genShake(31, 136, 256 / 8))();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/hmac.js\n var require_hmac4 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/hmac.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.hmac = exports3.HMAC = void 0;\n var utils_ts_1 = require_utils12();\n var HMAC3 = class extends utils_ts_1.Hash {\n constructor(hash3, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n (0, utils_ts_1.ahash)(hash3);\n const key = (0, utils_ts_1.toBytes)(_key);\n this.iHash = hash3.create();\n if (typeof this.iHash.update !== \"function\")\n throw new Error(\"Expected instance of class which extends utils.Hash\");\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad6 = new Uint8Array(blockLen);\n pad6.set(key.length > blockLen ? hash3.create().update(key).digest() : key);\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54;\n this.iHash.update(pad6);\n this.oHash = hash3.create();\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54 ^ 92;\n this.oHash.update(pad6);\n (0, utils_ts_1.clean)(pad6);\n }\n update(buf) {\n (0, utils_ts_1.aexists)(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n (0, utils_ts_1.aexists)(this);\n (0, utils_ts_1.abytes)(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n };\n exports3.HMAC = HMAC3;\n var hmac3 = (hash3, key, message) => new HMAC3(hash3, key).update(message).digest();\n exports3.hmac = hmac3;\n exports3.hmac.create = (hash3, key) => new HMAC3(hash3, key);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/weierstrass.js\n var require_weierstrass2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/weierstrass.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.DER = exports3.DERErr = void 0;\n exports3._splitEndoScalar = _splitEndoScalar;\n exports3._normFnElement = _normFnElement;\n exports3.weierstrassN = weierstrassN;\n exports3.SWUFpSqrtRatio = SWUFpSqrtRatio2;\n exports3.mapToCurveSimpleSWU = mapToCurveSimpleSWU2;\n exports3.ecdh = ecdh;\n exports3.ecdsa = ecdsa;\n exports3.weierstrassPoints = weierstrassPoints3;\n exports3._legacyHelperEquat = _legacyHelperEquat;\n exports3.weierstrass = weierstrass3;\n var hmac_js_1 = require_hmac4();\n var utils_1 = require_utils12();\n var utils_ts_1 = require_utils13();\n var curve_ts_1 = require_curve3();\n var modular_ts_1 = require_modular2();\n var divNearest2 = (num2, den) => (num2 + (num2 >= 0 ? den : -den) / _2n8) / den;\n function _splitEndoScalar(k4, basis, n2) {\n const [[a1, b1], [a22, b22]] = basis;\n const c1 = divNearest2(b22 * k4, n2);\n const c22 = divNearest2(-b1 * k4, n2);\n let k1 = k4 - c1 * a1 - c22 * a22;\n let k22 = -c1 * b1 - c22 * b22;\n const k1neg = k1 < _0n11;\n const k2neg = k22 < _0n11;\n if (k1neg)\n k1 = -k1;\n if (k2neg)\n k22 = -k22;\n const MAX_NUM = (0, utils_ts_1.bitMask)(Math.ceil((0, utils_ts_1.bitLen)(n2) / 2)) + _1n11;\n if (k1 < _0n11 || k1 >= MAX_NUM || k22 < _0n11 || k22 >= MAX_NUM) {\n throw new Error(\"splitScalar (endomorphism): failed, k=\" + k4);\n }\n return { k1neg, k1, k2neg, k2: k22 };\n }\n function validateSigFormat(format) {\n if (![\"compact\", \"recovered\", \"der\"].includes(format))\n throw new Error('Signature format must be \"compact\", \"recovered\", or \"der\"');\n return format;\n }\n function validateSigOpts(opts, def) {\n const optsn = {};\n for (let optName of Object.keys(def)) {\n optsn[optName] = opts[optName] === void 0 ? def[optName] : opts[optName];\n }\n (0, utils_ts_1._abool2)(optsn.lowS, \"lowS\");\n (0, utils_ts_1._abool2)(optsn.prehash, \"prehash\");\n if (optsn.format !== void 0)\n validateSigFormat(optsn.format);\n return optsn;\n }\n var DERErr3 = class extends Error {\n constructor(m2 = \"\") {\n super(m2);\n }\n };\n exports3.DERErr = DERErr3;\n exports3.DER = {\n // asn.1 DER encoding utils\n Err: DERErr3,\n // Basic building block is TLV (Tag-Length-Value)\n _tlv: {\n encode: (tag, data) => {\n const { Err: E2 } = exports3.DER;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length & 1)\n throw new E2(\"tlv.encode: unpadded data\");\n const dataLen = data.length / 2;\n const len = (0, utils_ts_1.numberToHexUnpadded)(dataLen);\n if (len.length / 2 & 128)\n throw new E2(\"tlv.encode: long form length too big\");\n const lenLen = dataLen > 127 ? (0, utils_ts_1.numberToHexUnpadded)(len.length / 2 | 128) : \"\";\n const t3 = (0, utils_ts_1.numberToHexUnpadded)(tag);\n return t3 + lenLen + len + data;\n },\n // v - value, l - left bytes (unparsed)\n decode(tag, data) {\n const { Err: E2 } = exports3.DER;\n let pos = 0;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length < 2 || data[pos++] !== tag)\n throw new E2(\"tlv.decode: wrong tlv\");\n const first = data[pos++];\n const isLong = !!(first & 128);\n let length = 0;\n if (!isLong)\n length = first;\n else {\n const lenLen = first & 127;\n if (!lenLen)\n throw new E2(\"tlv.decode(long): indefinite length not supported\");\n if (lenLen > 4)\n throw new E2(\"tlv.decode(long): byte length is too big\");\n const lengthBytes = data.subarray(pos, pos + lenLen);\n if (lengthBytes.length !== lenLen)\n throw new E2(\"tlv.decode: length bytes not complete\");\n if (lengthBytes[0] === 0)\n throw new E2(\"tlv.decode(long): zero leftmost byte\");\n for (const b4 of lengthBytes)\n length = length << 8 | b4;\n pos += lenLen;\n if (length < 128)\n throw new E2(\"tlv.decode(long): not minimal encoding\");\n }\n const v2 = data.subarray(pos, pos + length);\n if (v2.length !== length)\n throw new E2(\"tlv.decode: wrong value length\");\n return { v: v2, l: data.subarray(pos + length) };\n }\n },\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n _int: {\n encode(num2) {\n const { Err: E2 } = exports3.DER;\n if (num2 < _0n11)\n throw new E2(\"integer: negative integers are not allowed\");\n let hex = (0, utils_ts_1.numberToHexUnpadded)(num2);\n if (Number.parseInt(hex[0], 16) & 8)\n hex = \"00\" + hex;\n if (hex.length & 1)\n throw new E2(\"unexpected DER parsing assertion: unpadded hex\");\n return hex;\n },\n decode(data) {\n const { Err: E2 } = exports3.DER;\n if (data[0] & 128)\n throw new E2(\"invalid signature integer: negative\");\n if (data[0] === 0 && !(data[1] & 128))\n throw new E2(\"invalid signature integer: unnecessary leading zero\");\n return (0, utils_ts_1.bytesToNumberBE)(data);\n }\n },\n toSig(hex) {\n const { Err: E2, _int: int, _tlv: tlv } = exports3.DER;\n const data = (0, utils_ts_1.ensureBytes)(\"signature\", hex);\n const { v: seqBytes, l: seqLeftBytes } = tlv.decode(48, data);\n if (seqLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n const { v: rBytes, l: rLeftBytes } = tlv.decode(2, seqBytes);\n const { v: sBytes, l: sLeftBytes } = tlv.decode(2, rLeftBytes);\n if (sLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n return { r: int.decode(rBytes), s: int.decode(sBytes) };\n },\n hexFromSig(sig) {\n const { _tlv: tlv, _int: int } = exports3.DER;\n const rs = tlv.encode(2, int.encode(sig.r));\n const ss = tlv.encode(2, int.encode(sig.s));\n const seq = rs + ss;\n return tlv.encode(48, seq);\n }\n };\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n var _3n5 = BigInt(3);\n var _4n5 = BigInt(4);\n function _normFnElement(Fn, key) {\n const { BYTES: expected } = Fn;\n let num2;\n if (typeof key === \"bigint\") {\n num2 = key;\n } else {\n let bytes = (0, utils_ts_1.ensureBytes)(\"private key\", key);\n try {\n num2 = Fn.fromBytes(bytes);\n } catch (error) {\n throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof key}`);\n }\n }\n if (!Fn.isValidNot0(num2))\n throw new Error(\"invalid private key: out of range [1..N-1]\");\n return num2;\n }\n function weierstrassN(params, extraOpts = {}) {\n const validated = (0, curve_ts_1._createCurveFields)(\"weierstrass\", params, extraOpts);\n const { Fp, Fn } = validated;\n let CURVE = validated.CURVE;\n const { h: cofactor, n: CURVE_ORDER } = CURVE;\n (0, utils_ts_1._validateObject)(extraOpts, {}, {\n allowInfinityPoint: \"boolean\",\n clearCofactor: \"function\",\n isTorsionFree: \"function\",\n fromBytes: \"function\",\n toBytes: \"function\",\n endo: \"object\",\n wrapPrivateKey: \"boolean\"\n });\n const { endo } = extraOpts;\n if (endo) {\n if (!Fp.is0(CURVE.a) || typeof endo.beta !== \"bigint\" || !Array.isArray(endo.basises)) {\n throw new Error('invalid endo: expected \"beta\": bigint and \"basises\": array');\n }\n }\n const lengths = getWLengths(Fp, Fn);\n function assertCompressionIsSupported() {\n if (!Fp.isOdd)\n throw new Error(\"compression is not supported: Field does not have .isOdd()\");\n }\n function pointToBytes2(_c, point, isCompressed) {\n const { x: x4, y: y6 } = point.toAffine();\n const bx = Fp.toBytes(x4);\n (0, utils_ts_1._abool2)(isCompressed, \"isCompressed\");\n if (isCompressed) {\n assertCompressionIsSupported();\n const hasEvenY = !Fp.isOdd(y6);\n return (0, utils_ts_1.concatBytes)(pprefix(hasEvenY), bx);\n } else {\n return (0, utils_ts_1.concatBytes)(Uint8Array.of(4), bx, Fp.toBytes(y6));\n }\n }\n function pointFromBytes(bytes) {\n (0, utils_ts_1._abytes2)(bytes, void 0, \"Point\");\n const { publicKey: comp, publicKeyUncompressed: uncomp } = lengths;\n const length = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (length === comp && (head === 2 || head === 3)) {\n const x4 = Fp.fromBytes(tail);\n if (!Fp.isValid(x4))\n throw new Error(\"bad point: is not on curve, wrong x\");\n const y22 = weierstrassEquation(x4);\n let y6;\n try {\n y6 = Fp.sqrt(y22);\n } catch (sqrtError) {\n const err = sqrtError instanceof Error ? \": \" + sqrtError.message : \"\";\n throw new Error(\"bad point: is not on curve, sqrt error\" + err);\n }\n assertCompressionIsSupported();\n const isYOdd = Fp.isOdd(y6);\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y6 = Fp.neg(y6);\n return { x: x4, y: y6 };\n } else if (length === uncomp && head === 4) {\n const L2 = Fp.BYTES;\n const x4 = Fp.fromBytes(tail.subarray(0, L2));\n const y6 = Fp.fromBytes(tail.subarray(L2, L2 * 2));\n if (!isValidXY(x4, y6))\n throw new Error(\"bad point: is not on curve\");\n return { x: x4, y: y6 };\n } else {\n throw new Error(`bad point: got length ${length}, expected compressed=${comp} or uncompressed=${uncomp}`);\n }\n }\n const encodePoint = extraOpts.toBytes || pointToBytes2;\n const decodePoint = extraOpts.fromBytes || pointFromBytes;\n function weierstrassEquation(x4) {\n const x22 = Fp.sqr(x4);\n const x32 = Fp.mul(x22, x4);\n return Fp.add(Fp.add(x32, Fp.mul(x4, CURVE.a)), CURVE.b);\n }\n function isValidXY(x4, y6) {\n const left = Fp.sqr(y6);\n const right = weierstrassEquation(x4);\n return Fp.eql(left, right);\n }\n if (!isValidXY(CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n const _4a3 = Fp.mul(Fp.pow(CURVE.a, _3n5), _4n5);\n const _27b2 = Fp.mul(Fp.sqr(CURVE.b), BigInt(27));\n if (Fp.is0(Fp.add(_4a3, _27b2)))\n throw new Error(\"bad curve params: a or b\");\n function acoord(title2, n2, banZero = false) {\n if (!Fp.isValid(n2) || banZero && Fp.is0(n2))\n throw new Error(`bad point coordinate ${title2}`);\n return n2;\n }\n function aprjpoint(other) {\n if (!(other instanceof Point3))\n throw new Error(\"ProjectivePoint expected\");\n }\n function splitEndoScalarN(k4) {\n if (!endo || !endo.basises)\n throw new Error(\"no endo\");\n return _splitEndoScalar(k4, endo.basises, Fn.ORDER);\n }\n const toAffineMemo = (0, utils_ts_1.memoized)((p4, iz) => {\n const { X: X2, Y: Y2, Z: Z2 } = p4;\n if (Fp.eql(Z2, Fp.ONE))\n return { x: X2, y: Y2 };\n const is0 = p4.is0();\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(Z2);\n const x4 = Fp.mul(X2, iz);\n const y6 = Fp.mul(Y2, iz);\n const zz = Fp.mul(Z2, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error(\"invZ was invalid\");\n return { x: x4, y: y6 };\n });\n const assertValidMemo = (0, utils_ts_1.memoized)((p4) => {\n if (p4.is0()) {\n if (extraOpts.allowInfinityPoint && !Fp.is0(p4.Y))\n return;\n throw new Error(\"bad point: ZERO\");\n }\n const { x: x4, y: y6 } = p4.toAffine();\n if (!Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"bad point: x or y not field elements\");\n if (!isValidXY(x4, y6))\n throw new Error(\"bad point: equation left != right\");\n if (!p4.isTorsionFree())\n throw new Error(\"bad point: not in prime-order subgroup\");\n return true;\n });\n function finishEndo(endoBeta, k1p, k2p, k1neg, k2neg) {\n k2p = new Point3(Fp.mul(k2p.X, endoBeta), k2p.Y, k2p.Z);\n k1p = (0, curve_ts_1.negateCt)(k1neg, k1p);\n k2p = (0, curve_ts_1.negateCt)(k2neg, k2p);\n return k1p.add(k2p);\n }\n class Point3 {\n /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n constructor(X2, Y2, Z2) {\n this.X = acoord(\"x\", X2);\n this.Y = acoord(\"y\", Y2, true);\n this.Z = acoord(\"z\", Z2);\n Object.freeze(this);\n }\n static CURVE() {\n return CURVE;\n }\n /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n static fromAffine(p4) {\n const { x: x4, y: y6 } = p4 || {};\n if (!p4 || !Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"invalid affine point\");\n if (p4 instanceof Point3)\n throw new Error(\"projective point not allowed\");\n if (Fp.is0(x4) && Fp.is0(y6))\n return Point3.ZERO;\n return new Point3(x4, y6, Fp.ONE);\n }\n static fromBytes(bytes) {\n const P2 = Point3.fromAffine(decodePoint((0, utils_ts_1._abytes2)(bytes, void 0, \"point\")));\n P2.assertValidity();\n return P2;\n }\n static fromHex(hex) {\n return Point3.fromBytes((0, utils_ts_1.ensureBytes)(\"pointHex\", hex));\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n *\n * @param windowSize\n * @param isLazy true will defer table computation until the first multiplication\n * @returns\n */\n precompute(windowSize = 8, isLazy = true) {\n wnaf.createCache(this, windowSize);\n if (!isLazy)\n this.multiply(_3n5);\n return this;\n }\n // TODO: return `this`\n /** A point on curve is valid if it conforms to equation. */\n assertValidity() {\n assertValidMemo(this);\n }\n hasEvenY() {\n const { y: y6 } = this.toAffine();\n if (!Fp.isOdd)\n throw new Error(\"Field doesn't support isOdd\");\n return !Fp.isOdd(y6);\n }\n /** Compare one point to another. */\n equals(other) {\n aprjpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U22 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U22;\n }\n /** Flips point to one corresponding to (x, -y) in Affine coordinates. */\n negate() {\n return new Point3(this.X, Fp.neg(this.Y), this.Z);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a: a3, b: b4 } = CURVE;\n const b32 = Fp.mul(b4, _3n5);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n let t0 = Fp.mul(X1, X1);\n let t1 = Fp.mul(Y1, Y1);\n let t22 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3);\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a3, Z3);\n Y3 = Fp.mul(b32, t22);\n Y3 = Fp.add(X3, Y3);\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b32, Z3);\n t22 = Fp.mul(a3, t22);\n t3 = Fp.sub(t0, t22);\n t3 = Fp.mul(a3, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0);\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t22);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t22 = Fp.mul(Y1, Z1);\n t22 = Fp.add(t22, t22);\n t0 = Fp.mul(t22, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t22, t1);\n Z3 = Fp.add(Z3, Z3);\n Z3 = Fp.add(Z3, Z3);\n return new Point3(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n aprjpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n const a3 = CURVE.a;\n const b32 = Fp.mul(CURVE.b, _3n5);\n let t0 = Fp.mul(X1, X2);\n let t1 = Fp.mul(Y1, Y2);\n let t22 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2);\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2);\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t22);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2);\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t22);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a3, t4);\n X3 = Fp.mul(b32, t22);\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0);\n t1 = Fp.add(t1, t0);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.mul(b32, t4);\n t1 = Fp.add(t1, t22);\n t22 = Fp.sub(t0, t22);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.add(t4, t22);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4);\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0);\n return new Point3(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point3.ZERO);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n const { endo: endo2 } = extraOpts;\n if (!Fn.isValidNot0(scalar))\n throw new Error(\"invalid scalar: out of range\");\n let point, fake;\n const mul = (n2) => wnaf.cached(this, n2, (p4) => (0, curve_ts_1.normalizeZ)(Point3, p4));\n if (endo2) {\n const { k1neg, k1, k2neg, k2: k22 } = splitEndoScalarN(scalar);\n const { p: k1p, f: k1f } = mul(k1);\n const { p: k2p, f: k2f } = mul(k22);\n fake = k1f.add(k2f);\n point = finishEndo(endo2.beta, k1p, k2p, k1neg, k2neg);\n } else {\n const { p: p4, f: f7 } = mul(scalar);\n point = p4;\n fake = f7;\n }\n return (0, curve_ts_1.normalizeZ)(Point3, [point, fake])[0];\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed secret key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(sc) {\n const { endo: endo2 } = extraOpts;\n const p4 = this;\n if (!Fn.isValid(sc))\n throw new Error(\"invalid scalar: out of range\");\n if (sc === _0n11 || p4.is0())\n return Point3.ZERO;\n if (sc === _1n11)\n return p4;\n if (wnaf.hasCache(this))\n return this.multiply(sc);\n if (endo2) {\n const { k1neg, k1, k2neg, k2: k22 } = splitEndoScalarN(sc);\n const { p1, p2: p22 } = (0, curve_ts_1.mulEndoUnsafe)(Point3, p4, k1, k22);\n return finishEndo(endo2.beta, p1, p22, k1neg, k2neg);\n } else {\n return wnaf.unsafe(p4, sc);\n }\n }\n multiplyAndAddUnsafe(Q2, a3, b4) {\n const sum = this.multiplyUnsafe(a3).add(Q2.multiplyUnsafe(b4));\n return sum.is0() ? void 0 : sum;\n }\n /**\n * Converts Projective point to affine (x, y) coordinates.\n * @param invertedZ Z^-1 (inverted zero) - optional, precomputation is useful for invertBatch\n */\n toAffine(invertedZ) {\n return toAffineMemo(this, invertedZ);\n }\n /**\n * Checks whether Point is free of torsion elements (is in prime subgroup).\n * Always torsion-free for cofactor=1 curves.\n */\n isTorsionFree() {\n const { isTorsionFree } = extraOpts;\n if (cofactor === _1n11)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point3, this);\n return wnaf.unsafe(this, CURVE_ORDER).is0();\n }\n clearCofactor() {\n const { clearCofactor } = extraOpts;\n if (cofactor === _1n11)\n return this;\n if (clearCofactor)\n return clearCofactor(Point3, this);\n return this.multiplyUnsafe(cofactor);\n }\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n toBytes(isCompressed = true) {\n (0, utils_ts_1._abool2)(isCompressed, \"isCompressed\");\n this.assertValidity();\n return encodePoint(Point3, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return (0, utils_ts_1.bytesToHex)(this.toBytes(isCompressed));\n }\n toString() {\n return ``;\n }\n // TODO: remove\n get px() {\n return this.X;\n }\n get py() {\n return this.X;\n }\n get pz() {\n return this.Z;\n }\n toRawBytes(isCompressed = true) {\n return this.toBytes(isCompressed);\n }\n _setWindowSize(windowSize) {\n this.precompute(windowSize);\n }\n static normalizeZ(points) {\n return (0, curve_ts_1.normalizeZ)(Point3, points);\n }\n static msm(points, scalars) {\n return (0, curve_ts_1.pippenger)(Point3, Fn, points, scalars);\n }\n static fromPrivateKey(privateKey) {\n return Point3.BASE.multiply(_normFnElement(Fn, privateKey));\n }\n }\n Point3.BASE = new Point3(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point3.ZERO = new Point3(Fp.ZERO, Fp.ONE, Fp.ZERO);\n Point3.Fp = Fp;\n Point3.Fn = Fn;\n const bits = Fn.BITS;\n const wnaf = new curve_ts_1.wNAF(Point3, extraOpts.endo ? Math.ceil(bits / 2) : bits);\n Point3.BASE.precompute(8);\n return Point3;\n }\n function pprefix(hasEvenY) {\n return Uint8Array.of(hasEvenY ? 2 : 3);\n }\n function SWUFpSqrtRatio2(Fp, Z2) {\n const q3 = Fp.ORDER;\n let l6 = _0n11;\n for (let o5 = q3 - _1n11; o5 % _2n8 === _0n11; o5 /= _2n8)\n l6 += _1n11;\n const c1 = l6;\n const _2n_pow_c1_1 = _2n8 << c1 - _1n11 - _1n11;\n const _2n_pow_c1 = _2n_pow_c1_1 * _2n8;\n const c22 = (q3 - _1n11) / _2n_pow_c1;\n const c32 = (c22 - _1n11) / _2n8;\n const c4 = _2n_pow_c1 - _1n11;\n const c5 = _2n_pow_c1_1;\n const c6 = Fp.pow(Z2, c22);\n const c7 = Fp.pow(Z2, (c22 + _1n11) / _2n8);\n let sqrtRatio = (u2, v2) => {\n let tv1 = c6;\n let tv2 = Fp.pow(v2, c4);\n let tv3 = Fp.sqr(tv2);\n tv3 = Fp.mul(tv3, v2);\n let tv5 = Fp.mul(u2, tv3);\n tv5 = Fp.pow(tv5, c32);\n tv5 = Fp.mul(tv5, tv2);\n tv2 = Fp.mul(tv5, v2);\n tv3 = Fp.mul(tv5, u2);\n let tv4 = Fp.mul(tv3, tv2);\n tv5 = Fp.pow(tv4, c5);\n let isQR = Fp.eql(tv5, Fp.ONE);\n tv2 = Fp.mul(tv3, c7);\n tv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, isQR);\n tv4 = Fp.cmov(tv5, tv4, isQR);\n for (let i3 = c1; i3 > _1n11; i3--) {\n let tv52 = i3 - _2n8;\n tv52 = _2n8 << tv52 - _1n11;\n let tvv5 = Fp.pow(tv4, tv52);\n const e1 = Fp.eql(tvv5, Fp.ONE);\n tv2 = Fp.mul(tv3, tv1);\n tv1 = Fp.mul(tv1, tv1);\n tvv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, e1);\n tv4 = Fp.cmov(tvv5, tv4, e1);\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n5 === _3n5) {\n const c12 = (Fp.ORDER - _3n5) / _4n5;\n const c23 = Fp.sqrt(Fp.neg(Z2));\n sqrtRatio = (u2, v2) => {\n let tv1 = Fp.sqr(v2);\n const tv2 = Fp.mul(u2, v2);\n tv1 = Fp.mul(tv1, tv2);\n let y1 = Fp.pow(tv1, c12);\n y1 = Fp.mul(y1, tv2);\n const y22 = Fp.mul(y1, c23);\n const tv3 = Fp.mul(Fp.sqr(y1), v2);\n const isQR = Fp.eql(tv3, u2);\n let y6 = Fp.cmov(y22, y1, isQR);\n return { isValid: isQR, value: y6 };\n };\n }\n return sqrtRatio;\n }\n function mapToCurveSimpleSWU2(Fp, opts) {\n (0, modular_ts_1.validateField)(Fp);\n const { A: A4, B: B2, Z: Z2 } = opts;\n if (!Fp.isValid(A4) || !Fp.isValid(B2) || !Fp.isValid(Z2))\n throw new Error(\"mapToCurveSimpleSWU: invalid opts\");\n const sqrtRatio = SWUFpSqrtRatio2(Fp, Z2);\n if (!Fp.isOdd)\n throw new Error(\"Field does not have .isOdd()\");\n return (u2) => {\n let tv1, tv2, tv3, tv4, tv5, tv6, x4, y6;\n tv1 = Fp.sqr(u2);\n tv1 = Fp.mul(tv1, Z2);\n tv2 = Fp.sqr(tv1);\n tv2 = Fp.add(tv2, tv1);\n tv3 = Fp.add(tv2, Fp.ONE);\n tv3 = Fp.mul(tv3, B2);\n tv4 = Fp.cmov(Z2, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO));\n tv4 = Fp.mul(tv4, A4);\n tv2 = Fp.sqr(tv3);\n tv6 = Fp.sqr(tv4);\n tv5 = Fp.mul(tv6, A4);\n tv2 = Fp.add(tv2, tv5);\n tv2 = Fp.mul(tv2, tv3);\n tv6 = Fp.mul(tv6, tv4);\n tv5 = Fp.mul(tv6, B2);\n tv2 = Fp.add(tv2, tv5);\n x4 = Fp.mul(tv1, tv3);\n const { isValid: isValid2, value } = sqrtRatio(tv2, tv6);\n y6 = Fp.mul(tv1, u2);\n y6 = Fp.mul(y6, value);\n x4 = Fp.cmov(x4, tv3, isValid2);\n y6 = Fp.cmov(y6, value, isValid2);\n const e1 = Fp.isOdd(u2) === Fp.isOdd(y6);\n y6 = Fp.cmov(Fp.neg(y6), y6, e1);\n const tv4_inv = (0, modular_ts_1.FpInvertBatch)(Fp, [tv4], true)[0];\n x4 = Fp.mul(x4, tv4_inv);\n return { x: x4, y: y6 };\n };\n }\n function getWLengths(Fp, Fn) {\n return {\n secretKey: Fn.BYTES,\n publicKey: 1 + Fp.BYTES,\n publicKeyUncompressed: 1 + 2 * Fp.BYTES,\n publicKeyHasPrefix: true,\n signature: 2 * Fn.BYTES\n };\n }\n function ecdh(Point3, ecdhOpts = {}) {\n const { Fn } = Point3;\n const randomBytes_ = ecdhOpts.randomBytes || utils_ts_1.randomBytes;\n const lengths = Object.assign(getWLengths(Point3.Fp, Fn), { seed: (0, modular_ts_1.getMinHashLength)(Fn.ORDER) });\n function isValidSecretKey(secretKey) {\n try {\n return !!_normFnElement(Fn, secretKey);\n } catch (error) {\n return false;\n }\n }\n function isValidPublicKey(publicKey, isCompressed) {\n const { publicKey: comp, publicKeyUncompressed } = lengths;\n try {\n const l6 = publicKey.length;\n if (isCompressed === true && l6 !== comp)\n return false;\n if (isCompressed === false && l6 !== publicKeyUncompressed)\n return false;\n return !!Point3.fromBytes(publicKey);\n } catch (error) {\n return false;\n }\n }\n function randomSecretKey(seed = randomBytes_(lengths.seed)) {\n return (0, modular_ts_1.mapHashToField)((0, utils_ts_1._abytes2)(seed, lengths.seed, \"seed\"), Fn.ORDER);\n }\n function getPublicKey(secretKey, isCompressed = true) {\n return Point3.BASE.multiply(_normFnElement(Fn, secretKey)).toBytes(isCompressed);\n }\n function keygen(seed) {\n const secretKey = randomSecretKey(seed);\n return { secretKey, publicKey: getPublicKey(secretKey) };\n }\n function isProbPub(item) {\n if (typeof item === \"bigint\")\n return false;\n if (item instanceof Point3)\n return true;\n const { secretKey, publicKey, publicKeyUncompressed } = lengths;\n if (Fn.allowedLengths || secretKey === publicKey)\n return void 0;\n const l6 = (0, utils_ts_1.ensureBytes)(\"key\", item).length;\n return l6 === publicKey || l6 === publicKeyUncompressed;\n }\n function getSharedSecret(secretKeyA, publicKeyB, isCompressed = true) {\n if (isProbPub(secretKeyA) === true)\n throw new Error(\"first arg must be private key\");\n if (isProbPub(publicKeyB) === false)\n throw new Error(\"second arg must be public key\");\n const s4 = _normFnElement(Fn, secretKeyA);\n const b4 = Point3.fromHex(publicKeyB);\n return b4.multiply(s4).toBytes(isCompressed);\n }\n const utils = {\n isValidSecretKey,\n isValidPublicKey,\n randomSecretKey,\n // TODO: remove\n isValidPrivateKey: isValidSecretKey,\n randomPrivateKey: randomSecretKey,\n normPrivateKeyToScalar: (key) => _normFnElement(Fn, key),\n precompute(windowSize = 8, point = Point3.BASE) {\n return point.precompute(windowSize, false);\n }\n };\n return Object.freeze({ getPublicKey, getSharedSecret, keygen, Point: Point3, utils, lengths });\n }\n function ecdsa(Point3, hash3, ecdsaOpts = {}) {\n (0, utils_1.ahash)(hash3);\n (0, utils_ts_1._validateObject)(ecdsaOpts, {}, {\n hmac: \"function\",\n lowS: \"boolean\",\n randomBytes: \"function\",\n bits2int: \"function\",\n bits2int_modN: \"function\"\n });\n const randomBytes3 = ecdsaOpts.randomBytes || utils_ts_1.randomBytes;\n const hmac3 = ecdsaOpts.hmac || ((key, ...msgs) => (0, hmac_js_1.hmac)(hash3, key, (0, utils_ts_1.concatBytes)(...msgs)));\n const { Fp, Fn } = Point3;\n const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn;\n const { keygen, getPublicKey, getSharedSecret, utils, lengths } = ecdh(Point3, ecdsaOpts);\n const defaultSigOpts = {\n prehash: false,\n lowS: typeof ecdsaOpts.lowS === \"boolean\" ? ecdsaOpts.lowS : false,\n format: void 0,\n //'compact' as ECDSASigFormat,\n extraEntropy: false\n };\n const defaultSigOpts_format = \"compact\";\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n11;\n return number > HALF;\n }\n function validateRS(title2, num2) {\n if (!Fn.isValidNot0(num2))\n throw new Error(`invalid signature ${title2}: out of range 1..Point.Fn.ORDER`);\n return num2;\n }\n function validateSigLength(bytes, format) {\n validateSigFormat(format);\n const size6 = lengths.signature;\n const sizer = format === \"compact\" ? size6 : format === \"recovered\" ? size6 + 1 : void 0;\n return (0, utils_ts_1._abytes2)(bytes, sizer, `${format} signature`);\n }\n class Signature {\n constructor(r2, s4, recovery) {\n this.r = validateRS(\"r\", r2);\n this.s = validateRS(\"s\", s4);\n if (recovery != null)\n this.recovery = recovery;\n Object.freeze(this);\n }\n static fromBytes(bytes, format = defaultSigOpts_format) {\n validateSigLength(bytes, format);\n let recid;\n if (format === \"der\") {\n const { r: r3, s: s5 } = exports3.DER.toSig((0, utils_ts_1._abytes2)(bytes));\n return new Signature(r3, s5);\n }\n if (format === \"recovered\") {\n recid = bytes[0];\n format = \"compact\";\n bytes = bytes.subarray(1);\n }\n const L2 = Fn.BYTES;\n const r2 = bytes.subarray(0, L2);\n const s4 = bytes.subarray(L2, L2 * 2);\n return new Signature(Fn.fromBytes(r2), Fn.fromBytes(s4), recid);\n }\n static fromHex(hex, format) {\n return this.fromBytes((0, utils_ts_1.hexToBytes)(hex), format);\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(messageHash) {\n const FIELD_ORDER = Fp.ORDER;\n const { r: r2, s: s4, recovery: rec } = this;\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error(\"recovery id invalid\");\n const hasCofactor = CURVE_ORDER * _2n8 < FIELD_ORDER;\n if (hasCofactor && rec > 1)\n throw new Error(\"recovery id is ambiguous for h>1 curve\");\n const radj = rec === 2 || rec === 3 ? r2 + CURVE_ORDER : r2;\n if (!Fp.isValid(radj))\n throw new Error(\"recovery id 2 or 3 invalid\");\n const x4 = Fp.toBytes(radj);\n const R3 = Point3.fromBytes((0, utils_ts_1.concatBytes)(pprefix((rec & 1) === 0), x4));\n const ir = Fn.inv(radj);\n const h4 = bits2int_modN((0, utils_ts_1.ensureBytes)(\"msgHash\", messageHash));\n const u1 = Fn.create(-h4 * ir);\n const u2 = Fn.create(s4 * ir);\n const Q2 = Point3.BASE.multiplyUnsafe(u1).add(R3.multiplyUnsafe(u2));\n if (Q2.is0())\n throw new Error(\"point at infinify\");\n Q2.assertValidity();\n return Q2;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n toBytes(format = defaultSigOpts_format) {\n validateSigFormat(format);\n if (format === \"der\")\n return (0, utils_ts_1.hexToBytes)(exports3.DER.hexFromSig(this));\n const r2 = Fn.toBytes(this.r);\n const s4 = Fn.toBytes(this.s);\n if (format === \"recovered\") {\n if (this.recovery == null)\n throw new Error(\"recovery bit must be present\");\n return (0, utils_ts_1.concatBytes)(Uint8Array.of(this.recovery), r2, s4);\n }\n return (0, utils_ts_1.concatBytes)(r2, s4);\n }\n toHex(format) {\n return (0, utils_ts_1.bytesToHex)(this.toBytes(format));\n }\n // TODO: remove\n assertValidity() {\n }\n static fromCompact(hex) {\n return Signature.fromBytes((0, utils_ts_1.ensureBytes)(\"sig\", hex), \"compact\");\n }\n static fromDER(hex) {\n return Signature.fromBytes((0, utils_ts_1.ensureBytes)(\"sig\", hex), \"der\");\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, Fn.neg(this.s), this.recovery) : this;\n }\n toDERRawBytes() {\n return this.toBytes(\"der\");\n }\n toDERHex() {\n return (0, utils_ts_1.bytesToHex)(this.toBytes(\"der\"));\n }\n toCompactRawBytes() {\n return this.toBytes(\"compact\");\n }\n toCompactHex() {\n return (0, utils_ts_1.bytesToHex)(this.toBytes(\"compact\"));\n }\n }\n const bits2int = ecdsaOpts.bits2int || function bits2int_def(bytes) {\n if (bytes.length > 8192)\n throw new Error(\"input is too large\");\n const num2 = (0, utils_ts_1.bytesToNumberBE)(bytes);\n const delta = bytes.length * 8 - fnBits;\n return delta > 0 ? num2 >> BigInt(delta) : num2;\n };\n const bits2int_modN = ecdsaOpts.bits2int_modN || function bits2int_modN_def(bytes) {\n return Fn.create(bits2int(bytes));\n };\n const ORDER_MASK = (0, utils_ts_1.bitMask)(fnBits);\n function int2octets(num2) {\n (0, utils_ts_1.aInRange)(\"num < 2^\" + fnBits, num2, _0n11, ORDER_MASK);\n return Fn.toBytes(num2);\n }\n function validateMsgAndHash(message, prehash) {\n (0, utils_ts_1._abytes2)(message, void 0, \"message\");\n return prehash ? (0, utils_ts_1._abytes2)(hash3(message), void 0, \"prehashed message\") : message;\n }\n function prepSig(message, privateKey, opts) {\n if ([\"recovered\", \"canonical\"].some((k4) => k4 in opts))\n throw new Error(\"sign() legacy options not supported\");\n const { lowS, prehash, extraEntropy: extraEntropy2 } = validateSigOpts(opts, defaultSigOpts);\n message = validateMsgAndHash(message, prehash);\n const h1int = bits2int_modN(message);\n const d5 = _normFnElement(Fn, privateKey);\n const seedArgs = [int2octets(d5), int2octets(h1int)];\n if (extraEntropy2 != null && extraEntropy2 !== false) {\n const e2 = extraEntropy2 === true ? randomBytes3(lengths.secretKey) : extraEntropy2;\n seedArgs.push((0, utils_ts_1.ensureBytes)(\"extraEntropy\", e2));\n }\n const seed = (0, utils_ts_1.concatBytes)(...seedArgs);\n const m2 = h1int;\n function k2sig(kBytes) {\n const k4 = bits2int(kBytes);\n if (!Fn.isValidNot0(k4))\n return;\n const ik = Fn.inv(k4);\n const q3 = Point3.BASE.multiply(k4).toAffine();\n const r2 = Fn.create(q3.x);\n if (r2 === _0n11)\n return;\n const s4 = Fn.create(ik * Fn.create(m2 + r2 * d5));\n if (s4 === _0n11)\n return;\n let recovery = (q3.x === r2 ? 0 : 2) | Number(q3.y & _1n11);\n let normS = s4;\n if (lowS && isBiggerThanHalfOrder(s4)) {\n normS = Fn.neg(s4);\n recovery ^= 1;\n }\n return new Signature(r2, normS, recovery);\n }\n return { seed, k2sig };\n }\n function sign3(message, secretKey, opts = {}) {\n message = (0, utils_ts_1.ensureBytes)(\"message\", message);\n const { seed, k2sig } = prepSig(message, secretKey, opts);\n const drbg = (0, utils_ts_1.createHmacDrbg)(hash3.outputLen, Fn.BYTES, hmac3);\n const sig = drbg(seed, k2sig);\n return sig;\n }\n function tryParsingSig(sg) {\n let sig = void 0;\n const isHex2 = typeof sg === \"string\" || (0, utils_ts_1.isBytes)(sg);\n const isObj = !isHex2 && sg !== null && typeof sg === \"object\" && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\";\n if (!isHex2 && !isObj)\n throw new Error(\"invalid signature, expected Uint8Array, hex string or Signature instance\");\n if (isObj) {\n sig = new Signature(sg.r, sg.s);\n } else if (isHex2) {\n try {\n sig = Signature.fromBytes((0, utils_ts_1.ensureBytes)(\"sig\", sg), \"der\");\n } catch (derError) {\n if (!(derError instanceof exports3.DER.Err))\n throw derError;\n }\n if (!sig) {\n try {\n sig = Signature.fromBytes((0, utils_ts_1.ensureBytes)(\"sig\", sg), \"compact\");\n } catch (error) {\n return false;\n }\n }\n }\n if (!sig)\n return false;\n return sig;\n }\n function verify(signature, message, publicKey, opts = {}) {\n const { lowS, prehash, format } = validateSigOpts(opts, defaultSigOpts);\n publicKey = (0, utils_ts_1.ensureBytes)(\"publicKey\", publicKey);\n message = validateMsgAndHash((0, utils_ts_1.ensureBytes)(\"message\", message), prehash);\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n const sig = format === void 0 ? tryParsingSig(signature) : Signature.fromBytes((0, utils_ts_1.ensureBytes)(\"sig\", signature), format);\n if (sig === false)\n return false;\n try {\n const P2 = Point3.fromBytes(publicKey);\n if (lowS && sig.hasHighS())\n return false;\n const { r: r2, s: s4 } = sig;\n const h4 = bits2int_modN(message);\n const is = Fn.inv(s4);\n const u1 = Fn.create(h4 * is);\n const u2 = Fn.create(r2 * is);\n const R3 = Point3.BASE.multiplyUnsafe(u1).add(P2.multiplyUnsafe(u2));\n if (R3.is0())\n return false;\n const v2 = Fn.create(R3.x);\n return v2 === r2;\n } catch (e2) {\n return false;\n }\n }\n function recoverPublicKey3(signature, message, opts = {}) {\n const { prehash } = validateSigOpts(opts, defaultSigOpts);\n message = validateMsgAndHash(message, prehash);\n return Signature.fromBytes(signature, \"recovered\").recoverPublicKey(message).toBytes();\n }\n return Object.freeze({\n keygen,\n getPublicKey,\n getSharedSecret,\n utils,\n lengths,\n Point: Point3,\n sign: sign3,\n verify,\n recoverPublicKey: recoverPublicKey3,\n Signature,\n hash: hash3\n });\n }\n function weierstrassPoints3(c4) {\n const { CURVE, curveOpts } = _weierstrass_legacy_opts_to_new(c4);\n const Point3 = weierstrassN(CURVE, curveOpts);\n return _weierstrass_new_output_to_legacy(c4, Point3);\n }\n function _weierstrass_legacy_opts_to_new(c4) {\n const CURVE = {\n a: c4.a,\n b: c4.b,\n p: c4.Fp.ORDER,\n n: c4.n,\n h: c4.h,\n Gx: c4.Gx,\n Gy: c4.Gy\n };\n const Fp = c4.Fp;\n let allowedLengths = c4.allowedPrivateKeyLengths ? Array.from(new Set(c4.allowedPrivateKeyLengths.map((l6) => Math.ceil(l6 / 2)))) : void 0;\n const Fn = (0, modular_ts_1.Field)(CURVE.n, {\n BITS: c4.nBitLength,\n allowedLengths,\n modFromBytes: c4.wrapPrivateKey\n });\n const curveOpts = {\n Fp,\n Fn,\n allowInfinityPoint: c4.allowInfinityPoint,\n endo: c4.endo,\n isTorsionFree: c4.isTorsionFree,\n clearCofactor: c4.clearCofactor,\n fromBytes: c4.fromBytes,\n toBytes: c4.toBytes\n };\n return { CURVE, curveOpts };\n }\n function _ecdsa_legacy_opts_to_new(c4) {\n const { CURVE, curveOpts } = _weierstrass_legacy_opts_to_new(c4);\n const ecdsaOpts = {\n hmac: c4.hmac,\n randomBytes: c4.randomBytes,\n lowS: c4.lowS,\n bits2int: c4.bits2int,\n bits2int_modN: c4.bits2int_modN\n };\n return { CURVE, curveOpts, hash: c4.hash, ecdsaOpts };\n }\n function _legacyHelperEquat(Fp, a3, b4) {\n function weierstrassEquation(x4) {\n const x22 = Fp.sqr(x4);\n const x32 = Fp.mul(x22, x4);\n return Fp.add(Fp.add(x32, Fp.mul(x4, a3)), b4);\n }\n return weierstrassEquation;\n }\n function _weierstrass_new_output_to_legacy(c4, Point3) {\n const { Fp, Fn } = Point3;\n function isWithinCurveOrder(num2) {\n return (0, utils_ts_1.inRange)(num2, _1n11, Fn.ORDER);\n }\n const weierstrassEquation = _legacyHelperEquat(Fp, c4.a, c4.b);\n return Object.assign({}, {\n CURVE: c4,\n Point: Point3,\n ProjectivePoint: Point3,\n normPrivateKeyToScalar: (key) => _normFnElement(Fn, key),\n weierstrassEquation,\n isWithinCurveOrder\n });\n }\n function _ecdsa_new_output_to_legacy(c4, _ecdsa) {\n const Point3 = _ecdsa.Point;\n return Object.assign({}, _ecdsa, {\n ProjectivePoint: Point3,\n CURVE: Object.assign({}, c4, (0, modular_ts_1.nLength)(Point3.Fn.ORDER, Point3.Fn.BITS))\n });\n }\n function weierstrass3(c4) {\n const { CURVE, curveOpts, hash: hash3, ecdsaOpts } = _ecdsa_legacy_opts_to_new(c4);\n const Point3 = weierstrassN(CURVE, curveOpts);\n const signs = ecdsa(Point3, hash3, ecdsaOpts);\n return _ecdsa_new_output_to_legacy(c4, signs);\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/_shortw_utils.js\n var require_shortw_utils2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/_shortw_utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getHash = getHash3;\n exports3.createCurve = createCurve3;\n var weierstrass_ts_1 = require_weierstrass2();\n function getHash3(hash3) {\n return { hash: hash3 };\n }\n function createCurve3(curveDef, defHash) {\n const create2 = (hash3) => (0, weierstrass_ts_1.weierstrass)({ ...curveDef, hash: hash3 });\n return { ...create2(defHash), create: create2 };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/secp256k1.js\n var require_secp256k13 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/secp256k1.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encodeToCurve = exports3.hashToCurve = exports3.secp256k1_hasher = exports3.schnorr = exports3.secp256k1 = void 0;\n var sha2_js_1 = require_sha23();\n var utils_js_1 = require_utils12();\n var _shortw_utils_ts_1 = require_shortw_utils2();\n var hash_to_curve_ts_1 = require_hash_to_curve2();\n var modular_ts_1 = require_modular2();\n var weierstrass_ts_1 = require_weierstrass2();\n var utils_ts_1 = require_utils13();\n var secp256k1_CURVE = {\n p: BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),\n n: BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),\n h: BigInt(1),\n a: BigInt(0),\n b: BigInt(7),\n Gx: BigInt(\"0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\"),\n Gy: BigInt(\"0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\")\n };\n var secp256k1_ENDO = {\n beta: BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),\n basises: [\n [BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"), -BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\")],\n [BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"), BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\")]\n ]\n };\n var _0n11 = /* @__PURE__ */ BigInt(0);\n var _1n11 = /* @__PURE__ */ BigInt(1);\n var _2n8 = /* @__PURE__ */ BigInt(2);\n function sqrtMod2(y6) {\n const P2 = secp256k1_CURVE.p;\n const _3n5 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b22 = y6 * y6 * y6 % P2;\n const b32 = b22 * b22 * y6 % P2;\n const b6 = (0, modular_ts_1.pow2)(b32, _3n5, P2) * b32 % P2;\n const b9 = (0, modular_ts_1.pow2)(b6, _3n5, P2) * b32 % P2;\n const b11 = (0, modular_ts_1.pow2)(b9, _2n8, P2) * b22 % P2;\n const b222 = (0, modular_ts_1.pow2)(b11, _11n, P2) * b11 % P2;\n const b44 = (0, modular_ts_1.pow2)(b222, _22n, P2) * b222 % P2;\n const b88 = (0, modular_ts_1.pow2)(b44, _44n, P2) * b44 % P2;\n const b176 = (0, modular_ts_1.pow2)(b88, _88n, P2) * b88 % P2;\n const b220 = (0, modular_ts_1.pow2)(b176, _44n, P2) * b44 % P2;\n const b223 = (0, modular_ts_1.pow2)(b220, _3n5, P2) * b32 % P2;\n const t1 = (0, modular_ts_1.pow2)(b223, _23n, P2) * b222 % P2;\n const t22 = (0, modular_ts_1.pow2)(t1, _6n, P2) * b22 % P2;\n const root = (0, modular_ts_1.pow2)(t22, _2n8, P2);\n if (!Fpk12.eql(Fpk12.sqr(root), y6))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n var Fpk12 = (0, modular_ts_1.Field)(secp256k1_CURVE.p, { sqrt: sqrtMod2 });\n exports3.secp256k1 = (0, _shortw_utils_ts_1.createCurve)({ ...secp256k1_CURVE, Fp: Fpk12, lowS: true, endo: secp256k1_ENDO }, sha2_js_1.sha256);\n var TAGGED_HASH_PREFIXES2 = {};\n function taggedHash2(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES2[tag];\n if (tagP === void 0) {\n const tagH = (0, sha2_js_1.sha256)((0, utils_ts_1.utf8ToBytes)(tag));\n tagP = (0, utils_ts_1.concatBytes)(tagH, tagH);\n TAGGED_HASH_PREFIXES2[tag] = tagP;\n }\n return (0, sha2_js_1.sha256)((0, utils_ts_1.concatBytes)(tagP, ...messages));\n }\n var pointToBytes2 = (point) => point.toBytes(true).slice(1);\n var Pointk1 = /* @__PURE__ */ (() => exports3.secp256k1.Point)();\n var hasEven = (y6) => y6 % _2n8 === _0n11;\n function schnorrGetExtPubKey2(priv) {\n const { Fn, BASE } = Pointk1;\n const d_ = (0, weierstrass_ts_1._normFnElement)(Fn, priv);\n const p4 = BASE.multiply(d_);\n const scalar = hasEven(p4.y) ? d_ : Fn.neg(d_);\n return { scalar, bytes: pointToBytes2(p4) };\n }\n function lift_x2(x4) {\n const Fp = Fpk12;\n if (!Fp.isValidNot0(x4))\n throw new Error(\"invalid x: Fail if x \\u2265 p\");\n const xx = Fp.create(x4 * x4);\n const c4 = Fp.create(xx * x4 + BigInt(7));\n let y6 = Fp.sqrt(c4);\n if (!hasEven(y6))\n y6 = Fp.neg(y6);\n const p4 = Pointk1.fromAffine({ x: x4, y: y6 });\n p4.assertValidity();\n return p4;\n }\n var num2 = utils_ts_1.bytesToNumberBE;\n function challenge2(...args) {\n return Pointk1.Fn.create(num2(taggedHash2(\"BIP0340/challenge\", ...args)));\n }\n function schnorrGetPublicKey2(secretKey) {\n return schnorrGetExtPubKey2(secretKey).bytes;\n }\n function schnorrSign2(message, secretKey, auxRand = (0, utils_js_1.randomBytes)(32)) {\n const { Fn } = Pointk1;\n const m2 = (0, utils_ts_1.ensureBytes)(\"message\", message);\n const { bytes: px, scalar: d5 } = schnorrGetExtPubKey2(secretKey);\n const a3 = (0, utils_ts_1.ensureBytes)(\"auxRand\", auxRand, 32);\n const t3 = Fn.toBytes(d5 ^ num2(taggedHash2(\"BIP0340/aux\", a3)));\n const rand = taggedHash2(\"BIP0340/nonce\", t3, px, m2);\n const { bytes: rx, scalar: k4 } = schnorrGetExtPubKey2(rand);\n const e2 = challenge2(rx, px, m2);\n const sig = new Uint8Array(64);\n sig.set(rx, 0);\n sig.set(Fn.toBytes(Fn.create(k4 + e2 * d5)), 32);\n if (!schnorrVerify2(sig, m2, px))\n throw new Error(\"sign: Invalid signature produced\");\n return sig;\n }\n function schnorrVerify2(signature, message, publicKey) {\n const { Fn, BASE } = Pointk1;\n const sig = (0, utils_ts_1.ensureBytes)(\"signature\", signature, 64);\n const m2 = (0, utils_ts_1.ensureBytes)(\"message\", message);\n const pub = (0, utils_ts_1.ensureBytes)(\"publicKey\", publicKey, 32);\n try {\n const P2 = lift_x2(num2(pub));\n const r2 = num2(sig.subarray(0, 32));\n if (!(0, utils_ts_1.inRange)(r2, _1n11, secp256k1_CURVE.p))\n return false;\n const s4 = num2(sig.subarray(32, 64));\n if (!(0, utils_ts_1.inRange)(s4, _1n11, secp256k1_CURVE.n))\n return false;\n const e2 = challenge2(Fn.toBytes(r2), pointToBytes2(P2), m2);\n const R3 = BASE.multiplyUnsafe(s4).add(P2.multiplyUnsafe(Fn.neg(e2)));\n const { x: x4, y: y6 } = R3.toAffine();\n if (R3.is0() || !hasEven(y6) || x4 !== r2)\n return false;\n return true;\n } catch (error) {\n return false;\n }\n }\n exports3.schnorr = (() => {\n const size6 = 32;\n const seedLength = 48;\n const randomSecretKey = (seed = (0, utils_js_1.randomBytes)(seedLength)) => {\n return (0, modular_ts_1.mapHashToField)(seed, secp256k1_CURVE.n);\n };\n exports3.secp256k1.utils.randomSecretKey;\n function keygen(seed) {\n const secretKey = randomSecretKey(seed);\n return { secretKey, publicKey: schnorrGetPublicKey2(secretKey) };\n }\n return {\n keygen,\n getPublicKey: schnorrGetPublicKey2,\n sign: schnorrSign2,\n verify: schnorrVerify2,\n Point: Pointk1,\n utils: {\n randomSecretKey,\n randomPrivateKey: randomSecretKey,\n taggedHash: taggedHash2,\n // TODO: remove\n lift_x: lift_x2,\n pointToBytes: pointToBytes2,\n numberToBytesBE: utils_ts_1.numberToBytesBE,\n bytesToNumberBE: utils_ts_1.bytesToNumberBE,\n mod: modular_ts_1.mod\n },\n lengths: {\n secretKey: size6,\n publicKey: size6,\n publicKeyHasPrefix: false,\n signature: size6 * 2,\n seed: seedLength\n }\n };\n })();\n var isoMap2 = /* @__PURE__ */ (() => (0, hash_to_curve_ts_1.isogenyMap)(Fpk12, [\n // xNum\n [\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7\",\n \"0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581\",\n \"0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262\",\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c\"\n ],\n // xDen\n [\n \"0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b\",\n \"0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ],\n // yNum\n [\n \"0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c\",\n \"0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3\",\n \"0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931\",\n \"0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84\"\n ],\n // yDen\n [\n \"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b\",\n \"0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573\",\n \"0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ]\n ].map((i3) => i3.map((j2) => BigInt(j2)))))();\n var mapSWU2 = /* @__PURE__ */ (() => (0, weierstrass_ts_1.mapToCurveSimpleSWU)(Fpk12, {\n A: BigInt(\"0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533\"),\n B: BigInt(\"1771\"),\n Z: Fpk12.create(BigInt(\"-11\"))\n }))();\n exports3.secp256k1_hasher = (() => (0, hash_to_curve_ts_1.createHasher)(exports3.secp256k1.Point, (scalars) => {\n const { x: x4, y: y6 } = mapSWU2(Fpk12.create(scalars[0]));\n return isoMap2(x4, y6);\n }, {\n DST: \"secp256k1_XMD:SHA-256_SSWU_RO_\",\n encodeDST: \"secp256k1_XMD:SHA-256_SSWU_NU_\",\n p: Fpk12.ORDER,\n m: 1,\n k: 128,\n expand: \"xmd\",\n hash: sha2_js_1.sha256\n }))();\n exports3.hashToCurve = (() => exports3.secp256k1_hasher.hashToCurve)();\n exports3.encodeToCurve = (() => exports3.secp256k1_hasher.encodeToCurve)();\n }\n });\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.cjs.js\n var require_index_browser_cjs = __commonJS({\n \"../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.cjs.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var buffer2 = (init_buffer(), __toCommonJS(buffer_exports));\n var ed25519 = require_ed25519();\n var BN = require_bn();\n var bs58 = require_bs58();\n var sha2565 = require_sha2562();\n var borsh = require_lib35();\n var BufferLayout = require_Layout();\n var codecsNumbers = require_index_browser3();\n var superstruct = require_dist2();\n var RpcClient = require_browser();\n var rpcWebsockets = require_index_browser4();\n var sha3 = require_sha33();\n var secp256k12 = require_secp256k13();\n function _interopDefaultCompat(e2) {\n return e2 && typeof e2 === \"object\" && \"default\" in e2 ? e2 : { default: e2 };\n }\n function _interopNamespaceCompat(e2) {\n if (e2 && typeof e2 === \"object\" && \"default\" in e2)\n return e2;\n var n2 = /* @__PURE__ */ Object.create(null);\n if (e2) {\n Object.keys(e2).forEach(function(k4) {\n if (k4 !== \"default\") {\n var d5 = Object.getOwnPropertyDescriptor(e2, k4);\n Object.defineProperty(n2, k4, d5.get ? d5 : {\n enumerable: true,\n get: function() {\n return e2[k4];\n }\n });\n }\n });\n }\n n2.default = e2;\n return Object.freeze(n2);\n }\n var BN__default = /* @__PURE__ */ _interopDefaultCompat(BN);\n var bs58__default = /* @__PURE__ */ _interopDefaultCompat(bs58);\n var BufferLayout__namespace = /* @__PURE__ */ _interopNamespaceCompat(BufferLayout);\n var RpcClient__default = /* @__PURE__ */ _interopDefaultCompat(RpcClient);\n var generatePrivateKey2 = ed25519.ed25519.utils.randomPrivateKey;\n var generateKeypair = () => {\n const privateScalar = ed25519.ed25519.utils.randomPrivateKey();\n const publicKey2 = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey2, 32);\n return {\n publicKey: publicKey2,\n secretKey\n };\n };\n var getPublicKey = ed25519.ed25519.getPublicKey;\n function isOnCurve(publicKey2) {\n try {\n ed25519.ed25519.ExtendedPoint.fromHex(publicKey2);\n return true;\n } catch {\n return false;\n }\n }\n var sign3 = (message, secretKey) => ed25519.ed25519.sign(message, secretKey.slice(0, 32));\n var verify = ed25519.ed25519.verify;\n var toBuffer = (arr) => {\n if (buffer2.Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return buffer2.Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return buffer2.Buffer.from(arr);\n }\n };\n var Struct = class {\n constructor(properties) {\n Object.assign(this, properties);\n }\n encode() {\n return buffer2.Buffer.from(borsh.serialize(SOLANA_SCHEMA, this));\n }\n static decode(data) {\n return borsh.deserialize(SOLANA_SCHEMA, this, data);\n }\n static decodeUnchecked(data) {\n return borsh.deserializeUnchecked(SOLANA_SCHEMA, this, data);\n }\n };\n var Enum = class extends Struct {\n constructor(properties) {\n super(properties);\n this.enum = \"\";\n if (Object.keys(properties).length !== 1) {\n throw new Error(\"Enum can only take single value\");\n }\n Object.keys(properties).map((key) => {\n this.enum = key;\n });\n }\n };\n var SOLANA_SCHEMA = /* @__PURE__ */ new Map();\n var _PublicKey;\n var MAX_SEED_LENGTH = 32;\n var PUBLIC_KEY_LENGTH = 32;\n function isPublicKeyData(value) {\n return value._bn !== void 0;\n }\n var uniquePublicKeyCounter = 1;\n var PublicKey = class _PublicKey2 extends Struct {\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value) {\n super({});\n this._bn = void 0;\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === \"string\") {\n const decoded = bs58__default.default.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new BN__default.default(decoded);\n } else {\n this._bn = new BN__default.default(value);\n }\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique() {\n const key = new _PublicKey2(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new _PublicKey2(key.toBuffer());\n }\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey2) {\n return this._bn.eq(publicKey2._bn);\n }\n /**\n * Return the base-58 representation of the public key\n */\n toBase58() {\n return bs58__default.default.encode(this.toBytes());\n }\n toJSON() {\n return this.toBase58();\n }\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes() {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer() {\n const b4 = this._bn.toArrayLike(buffer2.Buffer);\n if (b4.length === PUBLIC_KEY_LENGTH) {\n return b4;\n }\n const zeroPad = buffer2.Buffer.alloc(32);\n b4.copy(zeroPad, 32 - b4.length);\n return zeroPad;\n }\n get [Symbol.toStringTag]() {\n return `PublicKey(${this.toString()})`;\n }\n /**\n * Return the base-58 representation of the public key\n */\n toString() {\n return this.toBase58();\n }\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(fromPublicKey2, seed, programId) {\n const buffer$1 = buffer2.Buffer.concat([fromPublicKey2.toBuffer(), buffer2.Buffer.from(seed), programId.toBuffer()]);\n const publicKeyBytes = sha2565.sha256(buffer$1);\n return new _PublicKey2(publicKeyBytes);\n }\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(seeds, programId) {\n let buffer$1 = buffer2.Buffer.alloc(0);\n seeds.forEach(function(seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer$1 = buffer2.Buffer.concat([buffer$1, toBuffer(seed)]);\n });\n buffer$1 = buffer2.Buffer.concat([buffer$1, programId.toBuffer(), buffer2.Buffer.from(\"ProgramDerivedAddress\")]);\n const publicKeyBytes = sha2565.sha256(buffer$1);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new _PublicKey2(publicKeyBytes);\n }\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(seeds, programId) {\n return this.createProgramAddressSync(seeds, programId);\n }\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(seeds, programId) {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(buffer2.Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(seeds, programId) {\n return this.findProgramAddressSync(seeds, programId);\n }\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData) {\n const pubkey = new _PublicKey2(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n };\n _PublicKey = PublicKey;\n PublicKey.default = new _PublicKey(\"11111111111111111111111111111111\");\n SOLANA_SCHEMA.set(PublicKey, {\n kind: \"struct\",\n fields: [[\"_bn\", \"u256\"]]\n });\n var Account = class {\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey) {\n this._publicKey = void 0;\n this._secretKey = void 0;\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error(\"bad secret key size\");\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey2());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n /**\n * The public key for this account\n */\n get publicKey() {\n return new PublicKey(this._publicKey);\n }\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey() {\n return buffer2.Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n };\n var BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\"BPFLoader1111111111111111111111111111111111\");\n var PACKET_DATA_SIZE = 1280 - 40 - 8;\n var VERSION_PREFIX_MASK = 127;\n var SIGNATURE_LENGTH_IN_BYTES = 64;\n var TransactionExpiredBlockheightExceededError = class extends Error {\n constructor(signature2) {\n super(`Signature ${signature2} has expired: block height exceeded.`);\n this.signature = void 0;\n this.signature = signature2;\n }\n };\n Object.defineProperty(TransactionExpiredBlockheightExceededError.prototype, \"name\", {\n value: \"TransactionExpiredBlockheightExceededError\"\n });\n var TransactionExpiredTimeoutError = class extends Error {\n constructor(signature2, timeoutSeconds) {\n super(`Transaction was not confirmed in ${timeoutSeconds.toFixed(2)} seconds. It is unknown if it succeeded or failed. Check signature ${signature2} using the Solana Explorer or CLI tools.`);\n this.signature = void 0;\n this.signature = signature2;\n }\n };\n Object.defineProperty(TransactionExpiredTimeoutError.prototype, \"name\", {\n value: \"TransactionExpiredTimeoutError\"\n });\n var TransactionExpiredNonceInvalidError = class extends Error {\n constructor(signature2) {\n super(`Signature ${signature2} has expired: the nonce is no longer valid.`);\n this.signature = void 0;\n this.signature = signature2;\n }\n };\n Object.defineProperty(TransactionExpiredNonceInvalidError.prototype, \"name\", {\n value: \"TransactionExpiredNonceInvalidError\"\n });\n var MessageAccountKeys = class {\n constructor(staticAccountKeys, accountKeysFromLookups) {\n this.staticAccountKeys = void 0;\n this.accountKeysFromLookups = void 0;\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n keySegments() {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n get(index2) {\n for (const keySegment of this.keySegments()) {\n if (index2 < keySegment.length) {\n return keySegment[index2];\n } else {\n index2 -= keySegment.length;\n }\n }\n return;\n }\n get length() {\n return this.keySegments().flat().length;\n }\n compileInstructions(instructions) {\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error(\"Account index overflow encountered during compilation\");\n }\n const keyIndexMap = /* @__PURE__ */ new Map();\n this.keySegments().flat().forEach((key, index2) => {\n keyIndexMap.set(key.toBase58(), index2);\n });\n const findKeyIndex = (key) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === void 0)\n throw new Error(\"Encountered an unknown instruction account key during compilation\");\n return keyIndex;\n };\n return instructions.map((instruction) => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map((meta) => findKeyIndex(meta.pubkey)),\n data: instruction.data\n };\n });\n }\n };\n var publicKey = (property = \"publicKey\") => {\n return BufferLayout__namespace.blob(32, property);\n };\n var signature = (property = \"signature\") => {\n return BufferLayout__namespace.blob(64, property);\n };\n var rustString = (property = \"string\") => {\n const rsl = BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"length\"), BufferLayout__namespace.u32(\"lengthPadding\"), BufferLayout__namespace.blob(BufferLayout__namespace.offset(BufferLayout__namespace.u32(), -8), \"chars\")], property);\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n const rslShim = rsl;\n rslShim.decode = (b4, offset) => {\n const data = _decode(b4, offset);\n return data[\"chars\"].toString();\n };\n rslShim.encode = (str, b4, offset) => {\n const data = {\n chars: buffer2.Buffer.from(str, \"utf8\")\n };\n return _encode(data, b4, offset);\n };\n rslShim.alloc = (str) => {\n return BufferLayout__namespace.u32().span + BufferLayout__namespace.u32().span + buffer2.Buffer.from(str, \"utf8\").length;\n };\n return rslShim;\n };\n var authorized = (property = \"authorized\") => {\n return BufferLayout__namespace.struct([publicKey(\"staker\"), publicKey(\"withdrawer\")], property);\n };\n var lockup = (property = \"lockup\") => {\n return BufferLayout__namespace.struct([BufferLayout__namespace.ns64(\"unixTimestamp\"), BufferLayout__namespace.ns64(\"epoch\"), publicKey(\"custodian\")], property);\n };\n var voteInit = (property = \"voteInit\") => {\n return BufferLayout__namespace.struct([publicKey(\"nodePubkey\"), publicKey(\"authorizedVoter\"), publicKey(\"authorizedWithdrawer\"), BufferLayout__namespace.u8(\"commission\")], property);\n };\n var voteAuthorizeWithSeedArgs = (property = \"voteAuthorizeWithSeedArgs\") => {\n return BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"voteAuthorizationType\"), publicKey(\"currentAuthorityDerivedKeyOwnerPubkey\"), rustString(\"currentAuthorityDerivedKeySeed\"), publicKey(\"newAuthorized\")], property);\n };\n function getAlloc(type, fields) {\n const getItemAlloc = (item) => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === \"function\") {\n return item.alloc(fields[item.property]);\n } else if (\"count\" in item && \"elementLayout\" in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if (\"fields\" in item) {\n return getAlloc({\n layout: item\n }, fields[item.property]);\n }\n return 0;\n };\n let alloc = 0;\n type.layout.fields.forEach((item) => {\n alloc += getItemAlloc(item);\n });\n return alloc;\n }\n function decodeLength(bytes) {\n let len = 0;\n let size6 = 0;\n for (; ; ) {\n let elem = bytes.shift();\n len |= (elem & 127) << size6 * 7;\n size6 += 1;\n if ((elem & 128) === 0) {\n break;\n }\n }\n return len;\n }\n function encodeLength(bytes, len) {\n let rem_len = len;\n for (; ; ) {\n let elem = rem_len & 127;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 128;\n bytes.push(elem);\n }\n }\n }\n function assert9(condition, message) {\n if (!condition) {\n throw new Error(message || \"Assertion failed\");\n }\n }\n var CompiledKeys = class _CompiledKeys {\n constructor(payer, keyMetaMap) {\n this.payer = void 0;\n this.keyMetaMap = void 0;\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n static compile(instructions, payer) {\n const keyMetaMap = /* @__PURE__ */ new Map();\n const getOrInsertDefault = (pubkey) => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === void 0) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n return new _CompiledKeys(payer, keyMetaMap);\n }\n getMessageComponents() {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert9(mapEntries.length <= 256, \"Max static account keys length exceeded\");\n const writableSigners = mapEntries.filter(([, meta]) => meta.isSigner && meta.isWritable);\n const readonlySigners = mapEntries.filter(([, meta]) => meta.isSigner && !meta.isWritable);\n const writableNonSigners = mapEntries.filter(([, meta]) => !meta.isSigner && meta.isWritable);\n const readonlyNonSigners = mapEntries.filter(([, meta]) => !meta.isSigner && !meta.isWritable);\n const header = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length\n };\n {\n assert9(writableSigners.length > 0, \"Expected at least one writable signer key\");\n const [payerAddress] = writableSigners[0];\n assert9(payerAddress === this.payer.toBase58(), \"Expected first writable signer key to be the fee payer\");\n }\n const staticAccountKeys = [...writableSigners.map(([address]) => new PublicKey(address)), ...readonlySigners.map(([address]) => new PublicKey(address)), ...writableNonSigners.map(([address]) => new PublicKey(address)), ...readonlyNonSigners.map(([address]) => new PublicKey(address))];\n return [header, staticAccountKeys];\n }\n extractTableLookup(lookupTable) {\n const [writableIndexes, drainedWritableKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, (keyMeta) => !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable);\n const [readonlyIndexes, drainedReadonlyKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, (keyMeta) => !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable);\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n return [{\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes\n }, {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys\n }];\n }\n /** @internal */\n drainKeysFoundInLookupTable(lookupTableEntries, keyMetaFilter) {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex((entry) => entry.equals(key));\n if (lookupTableIndex >= 0) {\n assert9(lookupTableIndex < 256, \"Max lookup table index exceeded\");\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n return [lookupTableIndexes, drainedKeys];\n }\n };\n var END_OF_BUFFER_ERROR_MESSAGE = \"Reached end of buffer unexpectedly\";\n function guardedShift(byteArray) {\n if (byteArray.length === 0) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.shift();\n }\n function guardedSplice(byteArray, ...args) {\n const [start] = args;\n if (args.length === 2 ? start + (args[1] ?? 0) > byteArray.length : start >= byteArray.length) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.splice(...args);\n }\n var Message = class _Message {\n constructor(args) {\n this.header = void 0;\n this.accountKeys = void 0;\n this.recentBlockhash = void 0;\n this.instructions = void 0;\n this.indexToProgramIds = /* @__PURE__ */ new Map();\n this.header = args.header;\n this.accountKeys = args.accountKeys.map((account) => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach((ix) => this.indexToProgramIds.set(ix.programIdIndex, this.accountKeys[ix.programIdIndex]));\n }\n get version() {\n return \"legacy\";\n }\n get staticAccountKeys() {\n return this.accountKeys;\n }\n get compiledInstructions() {\n return this.instructions.map((ix) => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58__default.default.decode(ix.data)\n }));\n }\n get addressTableLookups() {\n return [];\n }\n getAccountKeys() {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n static compile(args) {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map((ix) => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58__default.default.encode(ix.data)\n }));\n return new _Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions\n });\n }\n isAccountSigner(index2) {\n return index2 < this.header.numRequiredSignatures;\n }\n isAccountWritable(index2) {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index2 >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index2 - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts = numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts = numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index2 < numWritableSignedAccounts;\n }\n }\n isProgramId(index2) {\n return this.indexToProgramIds.has(index2);\n }\n programIds() {\n return [...this.indexToProgramIds.values()];\n }\n nonProgramIds() {\n return this.accountKeys.filter((_2, index2) => !this.isProgramId(index2));\n }\n serialize() {\n const numKeys = this.accountKeys.length;\n let keyCount = [];\n encodeLength(keyCount, numKeys);\n const instructions = this.instructions.map((instruction) => {\n const {\n accounts,\n programIdIndex\n } = instruction;\n const data = Array.from(bs58__default.default.decode(instruction.data));\n let keyIndicesCount = [];\n encodeLength(keyIndicesCount, accounts.length);\n let dataCount = [];\n encodeLength(dataCount, data.length);\n return {\n programIdIndex,\n keyIndicesCount: buffer2.Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: buffer2.Buffer.from(dataCount),\n data\n };\n });\n let instructionCount = [];\n encodeLength(instructionCount, instructions.length);\n let instructionBuffer = buffer2.Buffer.alloc(PACKET_DATA_SIZE);\n buffer2.Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n instructions.forEach((instruction) => {\n const instructionLayout = BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"programIdIndex\"), BufferLayout__namespace.blob(instruction.keyIndicesCount.length, \"keyIndicesCount\"), BufferLayout__namespace.seq(BufferLayout__namespace.u8(\"keyIndex\"), instruction.keyIndices.length, \"keyIndices\"), BufferLayout__namespace.blob(instruction.dataLength.length, \"dataLength\"), BufferLayout__namespace.seq(BufferLayout__namespace.u8(\"userdatum\"), instruction.data.length, \"data\")]);\n const length2 = instructionLayout.encode(instruction, instructionBuffer, instructionBufferLength);\n instructionBufferLength += length2;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n const signDataLayout = BufferLayout__namespace.struct([BufferLayout__namespace.blob(1, \"numRequiredSignatures\"), BufferLayout__namespace.blob(1, \"numReadonlySignedAccounts\"), BufferLayout__namespace.blob(1, \"numReadonlyUnsignedAccounts\"), BufferLayout__namespace.blob(keyCount.length, \"keyCount\"), BufferLayout__namespace.seq(publicKey(\"key\"), numKeys, \"keys\"), publicKey(\"recentBlockhash\")]);\n const transaction = {\n numRequiredSignatures: buffer2.Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: buffer2.Buffer.from([this.header.numReadonlySignedAccounts]),\n numReadonlyUnsignedAccounts: buffer2.Buffer.from([this.header.numReadonlyUnsignedAccounts]),\n keyCount: buffer2.Buffer.from(keyCount),\n keys: this.accountKeys.map((key) => toBuffer(key.toBytes())),\n recentBlockhash: bs58__default.default.decode(this.recentBlockhash)\n };\n let signData = buffer2.Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer$1) {\n let byteArray = [...buffer$1];\n const numRequiredSignatures = guardedShift(byteArray);\n if (numRequiredSignatures !== (numRequiredSignatures & VERSION_PREFIX_MASK)) {\n throw new Error(\"Versioned messages must be deserialized with VersionedMessage.deserialize()\");\n }\n const numReadonlySignedAccounts = guardedShift(byteArray);\n const numReadonlyUnsignedAccounts = guardedShift(byteArray);\n const accountCount = decodeLength(byteArray);\n let accountKeys = [];\n for (let i3 = 0; i3 < accountCount; i3++) {\n const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(buffer2.Buffer.from(account)));\n }\n const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n const instructionCount = decodeLength(byteArray);\n let instructions = [];\n for (let i3 = 0; i3 < instructionCount; i3++) {\n const programIdIndex = guardedShift(byteArray);\n const accountCount2 = decodeLength(byteArray);\n const accounts = guardedSplice(byteArray, 0, accountCount2);\n const dataLength = decodeLength(byteArray);\n const dataSlice = guardedSplice(byteArray, 0, dataLength);\n const data = bs58__default.default.encode(buffer2.Buffer.from(dataSlice));\n instructions.push({\n programIdIndex,\n accounts,\n data\n });\n }\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n },\n recentBlockhash: bs58__default.default.encode(buffer2.Buffer.from(recentBlockhash)),\n accountKeys,\n instructions\n };\n return new _Message(messageArgs);\n }\n };\n var MessageV0 = class _MessageV0 {\n constructor(args) {\n this.header = void 0;\n this.staticAccountKeys = void 0;\n this.recentBlockhash = void 0;\n this.compiledInstructions = void 0;\n this.addressTableLookups = void 0;\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n get version() {\n return 0;\n }\n get numAccountKeysFromLookups() {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n getAccountKeys(args) {\n let accountKeysFromLookups;\n if (args && \"accountKeysFromLookups\" in args && args.accountKeysFromLookups) {\n if (this.numAccountKeysFromLookups != args.accountKeysFromLookups.writable.length + args.accountKeysFromLookups.readonly.length) {\n throw new Error(\"Failed to get account keys because of a mismatch in the number of account keys from lookups\");\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (args && \"addressLookupTableAccounts\" in args && args.addressLookupTableAccounts) {\n accountKeysFromLookups = this.resolveAddressTableLookups(args.addressLookupTableAccounts);\n } else if (this.addressTableLookups.length > 0) {\n throw new Error(\"Failed to get account keys because address table lookups were not resolved\");\n }\n return new MessageAccountKeys(this.staticAccountKeys, accountKeysFromLookups);\n }\n isAccountSigner(index2) {\n return index2 < this.header.numRequiredSignatures;\n }\n isAccountWritable(index2) {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index2 >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index2 - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce((count, lookup) => count + lookup.writableIndexes.length, 0);\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index2 >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index2 - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts = numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts = numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index2 < numWritableSignedAccounts;\n }\n }\n resolveAddressTableLookups(addressLookupTableAccounts) {\n const accountKeysFromLookups = {\n writable: [],\n readonly: []\n };\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find((account) => account.key.equals(tableLookup.accountKey));\n if (!tableAccount) {\n throw new Error(`Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`);\n }\n for (const index2 of tableLookup.writableIndexes) {\n if (index2 < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(tableAccount.state.addresses[index2]);\n } else {\n throw new Error(`Failed to find address for index ${index2} in address lookup table ${tableLookup.accountKey.toBase58()}`);\n }\n }\n for (const index2 of tableLookup.readonlyIndexes) {\n if (index2 < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(tableAccount.state.addresses[index2]);\n } else {\n throw new Error(`Failed to find address for index ${index2} in address lookup table ${tableLookup.accountKey.toBase58()}`);\n }\n }\n }\n return accountKeysFromLookups;\n }\n static compile(args) {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const addressTableLookups = new Array();\n const accountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array()\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== void 0) {\n const [addressTableLookup, {\n writable,\n readonly\n }] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys, accountKeysFromLookups);\n const compiledInstructions = accountKeys.compileInstructions(args.instructions);\n return new _MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups\n });\n }\n serialize() {\n const encodedStaticAccountKeysLength = Array();\n encodeLength(encodedStaticAccountKeysLength, this.staticAccountKeys.length);\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n encodeLength(encodedInstructionsLength, this.compiledInstructions.length);\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n encodeLength(encodedAddressTableLookupsLength, this.addressTableLookups.length);\n const messageLayout = BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"prefix\"), BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"numRequiredSignatures\"), BufferLayout__namespace.u8(\"numReadonlySignedAccounts\"), BufferLayout__namespace.u8(\"numReadonlyUnsignedAccounts\")], \"header\"), BufferLayout__namespace.blob(encodedStaticAccountKeysLength.length, \"staticAccountKeysLength\"), BufferLayout__namespace.seq(publicKey(), this.staticAccountKeys.length, \"staticAccountKeys\"), publicKey(\"recentBlockhash\"), BufferLayout__namespace.blob(encodedInstructionsLength.length, \"instructionsLength\"), BufferLayout__namespace.blob(serializedInstructions.length, \"serializedInstructions\"), BufferLayout__namespace.blob(encodedAddressTableLookupsLength.length, \"addressTableLookupsLength\"), BufferLayout__namespace.blob(serializedAddressTableLookups.length, \"serializedAddressTableLookups\")]);\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode({\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map((key) => key.toBytes()),\n recentBlockhash: bs58__default.default.decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(encodedAddressTableLookupsLength),\n serializedAddressTableLookups\n }, serializedMessage);\n return serializedMessage.slice(0, serializedMessageLength);\n }\n serializeInstructions() {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n encodeLength(encodedAccountKeyIndexesLength, instruction.accountKeyIndexes.length);\n const encodedDataLength = Array();\n encodeLength(encodedDataLength, instruction.data.length);\n const instructionLayout = BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"programIdIndex\"), BufferLayout__namespace.blob(encodedAccountKeyIndexesLength.length, \"encodedAccountKeyIndexesLength\"), BufferLayout__namespace.seq(BufferLayout__namespace.u8(), instruction.accountKeyIndexes.length, \"accountKeyIndexes\"), BufferLayout__namespace.blob(encodedDataLength.length, \"encodedDataLength\"), BufferLayout__namespace.blob(instruction.data.length, \"data\")]);\n serializedLength += instructionLayout.encode({\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(encodedAccountKeyIndexesLength),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data\n }, serializedInstructions, serializedLength);\n }\n return serializedInstructions.slice(0, serializedLength);\n }\n serializeAddressTableLookups() {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n encodeLength(encodedWritableIndexesLength, lookup.writableIndexes.length);\n const encodedReadonlyIndexesLength = Array();\n encodeLength(encodedReadonlyIndexesLength, lookup.readonlyIndexes.length);\n const addressTableLookupLayout = BufferLayout__namespace.struct([publicKey(\"accountKey\"), BufferLayout__namespace.blob(encodedWritableIndexesLength.length, \"encodedWritableIndexesLength\"), BufferLayout__namespace.seq(BufferLayout__namespace.u8(), lookup.writableIndexes.length, \"writableIndexes\"), BufferLayout__namespace.blob(encodedReadonlyIndexesLength.length, \"encodedReadonlyIndexesLength\"), BufferLayout__namespace.seq(BufferLayout__namespace.u8(), lookup.readonlyIndexes.length, \"readonlyIndexes\")]);\n serializedLength += addressTableLookupLayout.encode({\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(encodedWritableIndexesLength),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(encodedReadonlyIndexesLength),\n readonlyIndexes: lookup.readonlyIndexes\n }, serializedAddressTableLookups, serializedLength);\n }\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n static deserialize(serializedMessage) {\n let byteArray = [...serializedMessage];\n const prefix = guardedShift(byteArray);\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert9(prefix !== maskedPrefix, `Expected versioned message but received legacy message`);\n const version7 = maskedPrefix;\n assert9(version7 === 0, `Expected versioned message with version 0 but found version ${version7}`);\n const header = {\n numRequiredSignatures: guardedShift(byteArray),\n numReadonlySignedAccounts: guardedShift(byteArray),\n numReadonlyUnsignedAccounts: guardedShift(byteArray)\n };\n const staticAccountKeys = [];\n const staticAccountKeysLength = decodeLength(byteArray);\n for (let i3 = 0; i3 < staticAccountKeysLength; i3++) {\n staticAccountKeys.push(new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)));\n }\n const recentBlockhash = bs58__default.default.encode(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));\n const instructionCount = decodeLength(byteArray);\n const compiledInstructions = [];\n for (let i3 = 0; i3 < instructionCount; i3++) {\n const programIdIndex = guardedShift(byteArray);\n const accountKeyIndexesLength = decodeLength(byteArray);\n const accountKeyIndexes = guardedSplice(byteArray, 0, accountKeyIndexesLength);\n const dataLength = decodeLength(byteArray);\n const data = new Uint8Array(guardedSplice(byteArray, 0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data\n });\n }\n const addressTableLookupsCount = decodeLength(byteArray);\n const addressTableLookups = [];\n for (let i3 = 0; i3 < addressTableLookupsCount; i3++) {\n const accountKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));\n const writableIndexesLength = decodeLength(byteArray);\n const writableIndexes = guardedSplice(byteArray, 0, writableIndexesLength);\n const readonlyIndexesLength = decodeLength(byteArray);\n const readonlyIndexes = guardedSplice(byteArray, 0, readonlyIndexesLength);\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes\n });\n }\n return new _MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups\n });\n }\n };\n var VersionedMessage = {\n deserializeMessageVersion(serializedMessage) {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n if (maskedPrefix === prefix) {\n return \"legacy\";\n }\n return maskedPrefix;\n },\n deserialize: (serializedMessage) => {\n const version7 = VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version7 === \"legacy\") {\n return Message.from(serializedMessage);\n }\n if (version7 === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(`Transaction message version ${version7} deserialization is not supported`);\n }\n }\n };\n var TransactionStatus = /* @__PURE__ */ function(TransactionStatus2) {\n TransactionStatus2[TransactionStatus2[\"BLOCKHEIGHT_EXCEEDED\"] = 0] = \"BLOCKHEIGHT_EXCEEDED\";\n TransactionStatus2[TransactionStatus2[\"PROCESSED\"] = 1] = \"PROCESSED\";\n TransactionStatus2[TransactionStatus2[\"TIMED_OUT\"] = 2] = \"TIMED_OUT\";\n TransactionStatus2[TransactionStatus2[\"NONCE_INVALID\"] = 3] = \"NONCE_INVALID\";\n return TransactionStatus2;\n }({});\n var DEFAULT_SIGNATURE = buffer2.Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n var TransactionInstruction = class {\n constructor(opts) {\n this.keys = void 0;\n this.programId = void 0;\n this.data = buffer2.Buffer.alloc(0);\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n /**\n * @internal\n */\n toJSON() {\n return {\n keys: this.keys.map(({\n pubkey,\n isSigner,\n isWritable\n }) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable\n })),\n programId: this.programId.toJSON(),\n data: [...this.data]\n };\n }\n };\n var Transaction5 = class _Transaction {\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature() {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n /**\n * The transaction fee payer\n */\n // Construct a transaction with a blockhash and lastValidBlockHeight\n // Construct a transaction using a durable nonce\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n /**\n * Construct an empty Transaction\n */\n constructor(opts) {\n this.signatures = [];\n this.feePayer = void 0;\n this.instructions = [];\n this.recentBlockhash = void 0;\n this.lastValidBlockHeight = void 0;\n this.nonceInfo = void 0;\n this.minNonceContextSlot = void 0;\n this._message = void 0;\n this._json = void 0;\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, \"nonceInfo\")) {\n const {\n minContextSlot,\n nonceInfo\n } = opts;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (Object.prototype.hasOwnProperty.call(opts, \"lastValidBlockHeight\")) {\n const {\n blockhash,\n lastValidBlockHeight\n } = opts;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {\n recentBlockhash,\n nonceInfo\n } = opts;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n /**\n * @internal\n */\n toJSON() {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON()\n } : null,\n instructions: this.instructions.map((instruction) => instruction.toJSON()),\n signers: this.signatures.map(({\n publicKey: publicKey2\n }) => {\n return publicKey2.toJSON();\n })\n };\n }\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(...items) {\n if (items.length === 0) {\n throw new Error(\"No instructions\");\n }\n items.forEach((item) => {\n if (\"instructions\" in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if (\"data\" in item && \"programId\" in item && \"keys\" in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n /**\n * Compile transaction data\n */\n compileMessage() {\n if (this._message && JSON.stringify(this.toJSON()) === JSON.stringify(this._json)) {\n return this._message;\n }\n let recentBlockhash;\n let instructions;\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error(\"Transaction recentBlockhash required\");\n }\n if (instructions.length < 1) {\n console.warn(\"No instructions provided\");\n }\n let feePayer;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error(\"Transaction fee payer required\");\n }\n for (let i3 = 0; i3 < instructions.length; i3++) {\n if (instructions[i3].programId === void 0) {\n throw new Error(`Transaction instruction index ${i3} has undefined program id`);\n }\n }\n const programIds = [];\n const accountMetas = [];\n instructions.forEach((instruction) => {\n instruction.keys.forEach((accountMeta) => {\n accountMetas.push({\n ...accountMeta\n });\n });\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n programIds.forEach((programId) => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false\n });\n });\n const uniqueMetas = [];\n accountMetas.forEach((accountMeta) => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex((x4) => {\n return x4.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable = uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner = uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n uniqueMetas.sort(function(x4, y6) {\n if (x4.isSigner !== y6.isSigner) {\n return x4.isSigner ? -1 : 1;\n }\n if (x4.isWritable !== y6.isWritable) {\n return x4.isWritable ? -1 : 1;\n }\n const options = {\n localeMatcher: \"best fit\",\n usage: \"sort\",\n sensitivity: \"variant\",\n ignorePunctuation: false,\n numeric: false,\n caseFirst: \"lower\"\n };\n return x4.pubkey.toBase58().localeCompare(y6.pubkey.toBase58(), \"en\", options);\n });\n const feePayerIndex = uniqueMetas.findIndex((x4) => {\n return x4.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true\n });\n }\n for (const signature2 of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex((x4) => {\n return x4.pubkey.equals(signature2.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\"Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release.\");\n }\n } else {\n throw new Error(`unknown signer: ${signature2.publicKey.toString()}`);\n }\n }\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n const signedKeys = [];\n const unsignedKeys = [];\n uniqueMetas.forEach(({\n pubkey,\n isSigner,\n isWritable\n }) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions = instructions.map((instruction) => {\n const {\n data,\n programId\n } = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map((meta) => accountKeys.indexOf(meta.pubkey.toString())),\n data: bs58__default.default.encode(data)\n };\n });\n compiledInstructions.forEach((instruction) => {\n assert9(instruction.programIdIndex >= 0);\n instruction.accounts.forEach((keyIndex) => assert9(keyIndex >= 0));\n });\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions\n });\n }\n /**\n * @internal\n */\n _compile() {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(0, message.header.numRequiredSignatures);\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index2) => {\n return signedKeys[index2].equals(pair.publicKey);\n });\n if (valid)\n return message;\n }\n this.signatures = signedKeys.map((publicKey2) => ({\n signature: null,\n publicKey: publicKey2\n }));\n return message;\n }\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage() {\n return this._compile().serialize();\n }\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection) {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers) {\n if (signers.length === 0) {\n throw new Error(\"No signers\");\n }\n const seen = /* @__PURE__ */ new Set();\n this.signatures = signers.filter((publicKey2) => {\n const key = publicKey2.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n }).map((publicKey2) => ({\n signature: null,\n publicKey: publicKey2\n }));\n }\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers) {\n if (signers.length === 0) {\n throw new Error(\"No signers\");\n }\n const seen = /* @__PURE__ */ new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n this.signatures = uniqueSigners.map((signer) => ({\n signature: null,\n publicKey: signer.publicKey\n }));\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers) {\n if (signers.length === 0) {\n throw new Error(\"No signers\");\n }\n const seen = /* @__PURE__ */ new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n /**\n * @internal\n */\n _partialSign(message, ...signers) {\n const signData = message.serialize();\n signers.forEach((signer) => {\n const signature2 = sign3(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature2));\n });\n }\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey, signature2) {\n this._compile();\n this._addSignature(pubkey, signature2);\n }\n /**\n * @internal\n */\n _addSignature(pubkey, signature2) {\n assert9(signature2.length === 64);\n const index2 = this.signatures.findIndex((sigpair) => pubkey.equals(sigpair.publicKey));\n if (index2 < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n this.signatures[index2].signature = buffer2.Buffer.from(signature2);\n }\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures = true) {\n const signatureErrors = this._getMessageSignednessErrors(this.serializeMessage(), requireAllSignatures);\n return !signatureErrors;\n }\n /**\n * @internal\n */\n _getMessageSignednessErrors(message, requireAllSignatures) {\n const errors = {};\n for (const {\n signature: signature2,\n publicKey: publicKey2\n } of this.signatures) {\n if (signature2 === null) {\n if (requireAllSignatures) {\n (errors.missing ||= []).push(publicKey2);\n }\n } else {\n if (!verify(signature2, message, publicKey2.toBytes())) {\n (errors.invalid ||= []).push(publicKey2);\n }\n }\n }\n return errors.invalid || errors.missing ? errors : void 0;\n }\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config2) {\n const {\n requireAllSignatures,\n verifySignatures\n } = Object.assign({\n requireAllSignatures: true,\n verifySignatures: true\n }, config2);\n const signData = this.serializeMessage();\n if (verifySignatures) {\n const sigErrors = this._getMessageSignednessErrors(signData, requireAllSignatures);\n if (sigErrors) {\n let errorMessage = \"Signature verification failed.\";\n if (sigErrors.invalid) {\n errorMessage += `\nInvalid signature for public key${sigErrors.invalid.length === 1 ? \"\" : \"(s)\"} [\\`${sigErrors.invalid.map((p4) => p4.toBase58()).join(\"`, `\")}\\`].`;\n }\n if (sigErrors.missing) {\n errorMessage += `\nMissing signature for public key${sigErrors.missing.length === 1 ? \"\" : \"(s)\"} [\\`${sigErrors.missing.map((p4) => p4.toBase58()).join(\"`, `\")}\\`].`;\n }\n throw new Error(errorMessage);\n }\n }\n return this._serialize(signData);\n }\n /**\n * @internal\n */\n _serialize(signData) {\n const {\n signatures\n } = this;\n const signatureCount = [];\n encodeLength(signatureCount, signatures.length);\n const transactionLength = signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = buffer2.Buffer.alloc(transactionLength);\n assert9(signatures.length < 256);\n buffer2.Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({\n signature: signature2\n }, index2) => {\n if (signature2 !== null) {\n assert9(signature2.length === 64, `signature has invalid length`);\n buffer2.Buffer.from(signature2).copy(wireTransaction, signatureCount.length + index2 * 64);\n }\n });\n signData.copy(wireTransaction, signatureCount.length + signatures.length * 64);\n assert9(wireTransaction.length <= PACKET_DATA_SIZE, `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`);\n return wireTransaction;\n }\n /**\n * Deprecated method\n * @internal\n */\n get keys() {\n assert9(this.instructions.length === 1);\n return this.instructions[0].keys.map((keyObj) => keyObj.pubkey);\n }\n /**\n * Deprecated method\n * @internal\n */\n get programId() {\n assert9(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n /**\n * Deprecated method\n * @internal\n */\n get data() {\n assert9(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer$1) {\n let byteArray = [...buffer$1];\n const signatureCount = decodeLength(byteArray);\n let signatures = [];\n for (let i3 = 0; i3 < signatureCount; i3++) {\n const signature2 = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58__default.default.encode(buffer2.Buffer.from(signature2)));\n }\n return _Transaction.populate(Message.from(byteArray), signatures);\n }\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(message, signatures = []) {\n const transaction = new _Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature2, index2) => {\n const sigPubkeyPair = {\n signature: signature2 == bs58__default.default.encode(DEFAULT_SIGNATURE) ? null : bs58__default.default.decode(signature2),\n publicKey: message.accountKeys[index2]\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n message.instructions.forEach((instruction) => {\n const keys = instruction.accounts.map((account) => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner: transaction.signatures.some((keyObj) => keyObj.publicKey.toString() === pubkey.toString()) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account)\n };\n });\n transaction.instructions.push(new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58__default.default.decode(instruction.data)\n }));\n });\n transaction._message = message;\n transaction._json = transaction.toJSON();\n return transaction;\n }\n };\n var TransactionMessage = class _TransactionMessage {\n constructor(args) {\n this.payerKey = void 0;\n this.instructions = void 0;\n this.recentBlockhash = void 0;\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n static decompile(message, args) {\n const {\n header,\n compiledInstructions,\n recentBlockhash\n } = message;\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n } = header;\n const numWritableSignedAccounts = numRequiredSignatures - numReadonlySignedAccounts;\n assert9(numWritableSignedAccounts > 0, \"Message header is invalid\");\n const numWritableUnsignedAccounts = message.staticAccountKeys.length - numRequiredSignatures - numReadonlyUnsignedAccounts;\n assert9(numWritableUnsignedAccounts >= 0, \"Message header is invalid\");\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === void 0) {\n throw new Error(\"Failed to decompile message because no account keys were found\");\n }\n const instructions = [];\n for (const compiledIx of compiledInstructions) {\n const keys = [];\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === void 0) {\n throw new Error(`Failed to find key for account key index ${keyIndex}`);\n }\n const isSigner = keyIndex < numRequiredSignatures;\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable = keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable = keyIndex - accountKeys.staticAccountKeys.length < // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups.writable.length;\n }\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable\n });\n }\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === void 0) {\n throw new Error(`Failed to find program id for program id index ${compiledIx.programIdIndex}`);\n }\n instructions.push(new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys\n }));\n }\n return new _TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash\n });\n }\n compileToLegacyMessage() {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions\n });\n }\n compileToV0Message(addressLookupTableAccounts) {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts\n });\n }\n };\n var VersionedTransaction4 = class _VersionedTransaction {\n get version() {\n return this.message.version;\n }\n constructor(message, signatures) {\n this.signatures = void 0;\n this.message = void 0;\n if (signatures !== void 0) {\n assert9(signatures.length === message.header.numRequiredSignatures, \"Expected signatures length to be equal to the number of required signatures\");\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i3 = 0; i3 < message.header.numRequiredSignatures; i3++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n serialize() {\n const serializedMessage = this.message.serialize();\n const encodedSignaturesLength = Array();\n encodeLength(encodedSignaturesLength, this.signatures.length);\n const transactionLayout = BufferLayout__namespace.struct([BufferLayout__namespace.blob(encodedSignaturesLength.length, \"encodedSignaturesLength\"), BufferLayout__namespace.seq(signature(), this.signatures.length, \"signatures\"), BufferLayout__namespace.blob(serializedMessage.length, \"serializedMessage\")]);\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode({\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage\n }, serializedTransaction);\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n static deserialize(serializedTransaction) {\n let byteArray = [...serializedTransaction];\n const signatures = [];\n const signaturesLength = decodeLength(byteArray);\n for (let i3 = 0; i3 < signaturesLength; i3++) {\n signatures.push(new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES)));\n }\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new _VersionedTransaction(message, signatures);\n }\n sign(signers) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(0, this.message.header.numRequiredSignatures);\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex((pubkey) => pubkey.equals(signer.publicKey));\n assert9(signerIndex >= 0, `Cannot sign with non signer key ${signer.publicKey.toBase58()}`);\n this.signatures[signerIndex] = sign3(messageData, signer.secretKey);\n }\n }\n addSignature(publicKey2, signature2) {\n assert9(signature2.byteLength === 64, \"Signature must be 64 bytes long\");\n const signerPubkeys = this.message.staticAccountKeys.slice(0, this.message.header.numRequiredSignatures);\n const signerIndex = signerPubkeys.findIndex((pubkey) => pubkey.equals(publicKey2));\n assert9(signerIndex >= 0, `Can not add signature; \\`${publicKey2.toBase58()}\\` is not required to sign this transaction`);\n this.signatures[signerIndex] = signature2;\n }\n };\n var NUM_TICKS_PER_SECOND = 160;\n var DEFAULT_TICKS_PER_SLOT = 64;\n var NUM_SLOTS_PER_SECOND = NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n var MS_PER_SLOT = 1e3 / NUM_SLOTS_PER_SECOND;\n var SYSVAR_CLOCK_PUBKEY = new PublicKey(\"SysvarC1ock11111111111111111111111111111111\");\n var SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\"SysvarEpochSchedu1e111111111111111111111111\");\n var SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\"Sysvar1nstructions1111111111111111111111111\");\n var SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\"SysvarRecentB1ockHashes11111111111111111111\");\n var SYSVAR_RENT_PUBKEY = new PublicKey(\"SysvarRent111111111111111111111111111111111\");\n var SYSVAR_REWARDS_PUBKEY = new PublicKey(\"SysvarRewards111111111111111111111111111111\");\n var SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\"SysvarS1otHashes111111111111111111111111111\");\n var SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\"SysvarS1otHistory11111111111111111111111111\");\n var SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\"SysvarStakeHistory1111111111111111111111111\");\n var SendTransactionError = class extends Error {\n constructor({\n action,\n signature: signature2,\n transactionMessage,\n logs\n }) {\n const maybeLogsOutput = logs ? `Logs: \n${JSON.stringify(logs.slice(-10), null, 2)}. ` : \"\";\n const guideText = \"\\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.\";\n let message;\n switch (action) {\n case \"send\":\n message = `Transaction ${signature2} resulted in an error. \n${transactionMessage}. ` + maybeLogsOutput + guideText;\n break;\n case \"simulate\":\n message = `Simulation failed. \nMessage: ${transactionMessage}. \n` + maybeLogsOutput + guideText;\n break;\n default: {\n message = `Unknown action '${/* @__PURE__ */ ((a3) => a3)(action)}'`;\n }\n }\n super(message);\n this.signature = void 0;\n this.transactionMessage = void 0;\n this.transactionLogs = void 0;\n this.signature = signature2;\n this.transactionMessage = transactionMessage;\n this.transactionLogs = logs ? logs : void 0;\n }\n get transactionError() {\n return {\n message: this.transactionMessage,\n logs: Array.isArray(this.transactionLogs) ? this.transactionLogs : void 0\n };\n }\n /* @deprecated Use `await getLogs()` instead */\n get logs() {\n const cachedLogs = this.transactionLogs;\n if (cachedLogs != null && typeof cachedLogs === \"object\" && \"then\" in cachedLogs) {\n return void 0;\n }\n return cachedLogs;\n }\n async getLogs(connection) {\n if (!Array.isArray(this.transactionLogs)) {\n this.transactionLogs = new Promise((resolve, reject) => {\n connection.getTransaction(this.signature).then((tx) => {\n if (tx && tx.meta && tx.meta.logMessages) {\n const logs = tx.meta.logMessages;\n this.transactionLogs = logs;\n resolve(logs);\n } else {\n reject(new Error(\"Log messages not found\"));\n }\n }).catch(reject);\n });\n }\n return await this.transactionLogs;\n }\n };\n var SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016\n };\n var SolanaJSONRPCError = class extends Error {\n constructor({\n code,\n message,\n data\n }, customMessage) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = void 0;\n this.data = void 0;\n this.code = code;\n this.data = data;\n this.name = \"SolanaJSONRPCError\";\n }\n };\n async function sendAndConfirmTransaction(connection, transaction, signers, options) {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot\n };\n const signature2 = await connection.sendTransaction(transaction, signers, sendOptions);\n let status;\n if (transaction.recentBlockhash != null && transaction.lastValidBlockHeight != null) {\n status = (await connection.confirmTransaction({\n abortSignal: options?.abortSignal,\n signature: signature2,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight\n }, options && options.commitment)).value;\n } else if (transaction.minNonceContextSlot != null && transaction.nonceInfo != null) {\n const {\n nonceInstruction\n } = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (await connection.confirmTransaction({\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature: signature2\n }, options && options.commitment)).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\"sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.\");\n }\n status = (await connection.confirmTransaction(signature2, options && options.commitment)).value;\n }\n if (status.err) {\n if (signature2 != null) {\n throw new SendTransactionError({\n action: \"send\",\n signature: signature2,\n transactionMessage: `Status: (${JSON.stringify(status)})`\n });\n }\n throw new Error(`Transaction ${signature2} failed (${JSON.stringify(status)})`);\n }\n return signature2;\n }\n function sleep(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n function encodeData3(type, fields) {\n const allocLength = type.layout.span >= 0 ? type.layout.span : getAlloc(type, fields);\n const data = buffer2.Buffer.alloc(allocLength);\n const layoutFields = Object.assign({\n instruction: type.index\n }, fields);\n type.layout.encode(layoutFields, data);\n return data;\n }\n function decodeData$1(type, buffer3) {\n let data;\n try {\n data = type.layout.decode(buffer3);\n } catch (err) {\n throw new Error(\"invalid instruction; \" + err);\n }\n if (data.instruction !== type.index) {\n throw new Error(`invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`);\n }\n return data;\n }\n var FeeCalculatorLayout = BufferLayout__namespace.nu64(\"lamportsPerSignature\");\n var NonceAccountLayout = BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"version\"), BufferLayout__namespace.u32(\"state\"), publicKey(\"authorizedPubkey\"), publicKey(\"nonce\"), BufferLayout__namespace.struct([FeeCalculatorLayout], \"feeCalculator\")]);\n var NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n var NonceAccount = class _NonceAccount {\n /**\n * @internal\n */\n constructor(args) {\n this.authorizedPubkey = void 0;\n this.nonce = void 0;\n this.feeCalculator = void 0;\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(buffer3) {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer3), 0);\n return new _NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator\n });\n }\n };\n function u64(property) {\n const layout = BufferLayout.blob(8, property);\n const decode2 = layout.decode.bind(layout);\n const encode5 = layout.encode.bind(layout);\n const bigIntLayout = layout;\n const codec = codecsNumbers.getU64Codec();\n bigIntLayout.decode = (buffer3, offset) => {\n const src = decode2(buffer3, offset);\n return codec.decode(src);\n };\n bigIntLayout.encode = (bigInt, buffer3, offset) => {\n const src = codec.encode(bigInt);\n return encode5(src, buffer3, offset);\n };\n return bigIntLayout;\n }\n var SystemInstruction = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = BufferLayout__namespace.u32(\"instruction\");\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error(\"Instruction type incorrect; not a SystemInstruction\");\n }\n return type;\n }\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n lamports,\n space,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Create, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId)\n };\n }\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n lamports\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Transfer, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports\n };\n }\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n lamports,\n seed,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId)\n };\n }\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n space\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Allocate, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space\n };\n }\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n base: base4,\n seed,\n space,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base4),\n seed,\n space,\n programId: new PublicKey(programId)\n };\n }\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Assign, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId)\n };\n }\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n base: base4,\n seed,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base4),\n seed,\n programId: new PublicKey(programId)\n };\n }\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n base: base4,\n seed,\n lamports,\n space,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base4),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId)\n };\n }\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n authorized: authorized2\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized2)\n };\n }\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey\n };\n }\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {\n lamports\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports\n };\n }\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n authorized: authorized2\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized2)\n };\n }\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error(\"invalid instruction; programId is not SystemProgram\");\n }\n }\n /**\n * @internal\n */\n static checkKeyLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n };\n var SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze({\n Create: {\n index: 0,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), BufferLayout__namespace.ns64(\"lamports\"), BufferLayout__namespace.ns64(\"space\"), publicKey(\"programId\")])\n },\n Assign: {\n index: 1,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), publicKey(\"programId\")])\n },\n Transfer: {\n index: 2,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), u64(\"lamports\")])\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), publicKey(\"base\"), rustString(\"seed\"), BufferLayout__namespace.ns64(\"lamports\"), BufferLayout__namespace.ns64(\"space\"), publicKey(\"programId\")])\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")])\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), BufferLayout__namespace.ns64(\"lamports\")])\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), publicKey(\"authorized\")])\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), publicKey(\"authorized\")])\n },\n Allocate: {\n index: 8,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), BufferLayout__namespace.ns64(\"space\")])\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), publicKey(\"base\"), rustString(\"seed\"), BufferLayout__namespace.ns64(\"space\"), publicKey(\"programId\")])\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), publicKey(\"base\"), rustString(\"seed\"), publicKey(\"programId\")])\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), u64(\"lamports\"), rustString(\"seed\"), publicKey(\"programId\")])\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")])\n }\n });\n var SystemProgram = class _SystemProgram {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the System program\n */\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData3(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.newAccountPubkey,\n isSigner: true,\n isWritable: true\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(params) {\n let data;\n let keys;\n if (\"basePubkey\" in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData3(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.fromPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData3(type, {\n lamports: BigInt(params.lamports)\n });\n keys = [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(params) {\n let data;\n let keys;\n if (\"basePubkey\" in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData3(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData3(type, {\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: true,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData3(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n let keys = [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.newAccountPubkey,\n isSigner: false,\n isWritable: true\n }];\n if (!params.basePubkey.equals(params.fromPubkey)) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(params) {\n const transaction = new Transaction5();\n if (\"basePubkey\" in params && \"seed\" in params) {\n transaction.add(_SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId\n }));\n } else {\n transaction.add(_SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId\n }));\n }\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey\n };\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData3(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer())\n });\n const instructionData = {\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData3(type);\n const instructionData = {\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData3(type, {\n lamports: params.lamports\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData3(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer())\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(params) {\n let data;\n let keys;\n if (\"basePubkey\" in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData3(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData3(type, {\n space: params.space\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: true,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n };\n SystemProgram.programId = new PublicKey(\"11111111111111111111111111111111\");\n var CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n var Loader = class _Loader {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Amount of program data placed in each load Transaction\n */\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength) {\n return 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / _Loader.chunkSize) + 1 + // Add one for Create transaction\n 1);\n }\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(connection, payer, program, programId, data) {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(data.length);\n const programInfo = await connection.getAccountInfo(program.publicKey, \"confirmed\");\n let transaction = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error(\"Program load failed, account is already executable\");\n return false;\n }\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction5();\n transaction.add(SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length\n }));\n }\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction5();\n transaction.add(SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId\n }));\n }\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction5();\n transaction.add(SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports\n }));\n }\n } else {\n transaction = new Transaction5().add(SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId\n }));\n }\n if (transaction !== null) {\n await sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: \"confirmed\"\n });\n }\n }\n const dataLayout = BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), BufferLayout__namespace.u32(\"offset\"), BufferLayout__namespace.u32(\"bytesLength\"), BufferLayout__namespace.u32(\"bytesLengthPadding\"), BufferLayout__namespace.seq(BufferLayout__namespace.u8(\"byte\"), BufferLayout__namespace.offset(BufferLayout__namespace.u32(), -8), \"bytes\")]);\n const chunkSize = _Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data2 = buffer2.Buffer.alloc(chunkSize + 16);\n dataLayout.encode({\n instruction: 0,\n // Load instruction\n offset,\n bytes,\n bytesLength: 0,\n bytesLengthPadding: 0\n }, data2);\n const transaction = new Transaction5().add({\n keys: [{\n pubkey: program.publicKey,\n isSigner: true,\n isWritable: true\n }],\n programId,\n data: data2\n });\n transactions.push(sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: \"confirmed\"\n }));\n if (connection._rpcEndpoint.includes(\"solana.com\")) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1e3 / REQUESTS_PER_SECOND);\n }\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n {\n const dataLayout2 = BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")]);\n const data2 = buffer2.Buffer.alloc(dataLayout2.span);\n dataLayout2.encode({\n instruction: 1\n // Finalize instruction\n }, data2);\n const transaction = new Transaction5().add({\n keys: [{\n pubkey: program.publicKey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId,\n data: data2\n });\n const deployCommitment = \"processed\";\n const finalizeSignature = await connection.sendTransaction(transaction, [payer, program], {\n preflightCommitment: deployCommitment\n });\n const {\n context: context2,\n value\n } = await connection.confirmTransaction({\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n blockhash: transaction.recentBlockhash\n }, deployCommitment);\n if (value.err) {\n throw new Error(`Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`);\n }\n while (true) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment\n });\n if (currentSlot > context2.slot) {\n break;\n }\n } catch {\n }\n await new Promise((resolve) => setTimeout(resolve, Math.round(MS_PER_SLOT / 2)));\n }\n }\n return true;\n }\n };\n Loader.chunkSize = CHUNK_SIZE;\n var BPF_LOADER_PROGRAM_ID = new PublicKey(\"BPFLoader2111111111111111111111111111111111\");\n var BpfLoader = class {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength) {\n return Loader.getMinNumSignatures(dataLength);\n }\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(connection, payer, program, elf, loaderProgramId) {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n };\n function getDefaultExportFromCjs(x4) {\n return x4 && x4.__esModule && Object.prototype.hasOwnProperty.call(x4, \"default\") ? x4[\"default\"] : x4;\n }\n var fastStableStringify$1;\n var hasRequiredFastStableStringify;\n function requireFastStableStringify() {\n if (hasRequiredFastStableStringify)\n return fastStableStringify$1;\n hasRequiredFastStableStringify = 1;\n var objToString = Object.prototype.toString;\n var objKeys = Object.keys || function(obj) {\n var keys = [];\n for (var name in obj) {\n keys.push(name);\n }\n return keys;\n };\n function stringify4(val, isArrayProp) {\n var i3, max, str, keys, key, propVal, toStr;\n if (val === true) {\n return \"true\";\n }\n if (val === false) {\n return \"false\";\n }\n switch (typeof val) {\n case \"object\":\n if (val === null) {\n return null;\n } else if (val.toJSON && typeof val.toJSON === \"function\") {\n return stringify4(val.toJSON(), isArrayProp);\n } else {\n toStr = objToString.call(val);\n if (toStr === \"[object Array]\") {\n str = \"[\";\n max = val.length - 1;\n for (i3 = 0; i3 < max; i3++) {\n str += stringify4(val[i3], true) + \",\";\n }\n if (max > -1) {\n str += stringify4(val[i3], true);\n }\n return str + \"]\";\n } else if (toStr === \"[object Object]\") {\n keys = objKeys(val).sort();\n max = keys.length;\n str = \"\";\n i3 = 0;\n while (i3 < max) {\n key = keys[i3];\n propVal = stringify4(val[key], false);\n if (propVal !== void 0) {\n if (str) {\n str += \",\";\n }\n str += JSON.stringify(key) + \":\" + propVal;\n }\n i3++;\n }\n return \"{\" + str + \"}\";\n } else {\n return JSON.stringify(val);\n }\n }\n case \"function\":\n case \"undefined\":\n return isArrayProp ? null : void 0;\n case \"string\":\n return JSON.stringify(val);\n default:\n return isFinite(val) ? val : null;\n }\n }\n fastStableStringify$1 = function(val) {\n var returnVal = stringify4(val, false);\n if (returnVal !== void 0) {\n return \"\" + returnVal;\n }\n };\n return fastStableStringify$1;\n }\n var fastStableStringifyExports = /* @__PURE__ */ requireFastStableStringify();\n var fastStableStringify = /* @__PURE__ */ getDefaultExportFromCjs(fastStableStringifyExports);\n var MINIMUM_SLOT_PER_EPOCH = 32;\n function trailingZeros(n2) {\n let trailingZeros2 = 0;\n while (n2 > 1) {\n n2 /= 2;\n trailingZeros2++;\n }\n return trailingZeros2;\n }\n function nextPowerOfTwo(n2) {\n if (n2 === 0)\n return 1;\n n2--;\n n2 |= n2 >> 1;\n n2 |= n2 >> 2;\n n2 |= n2 >> 4;\n n2 |= n2 >> 8;\n n2 |= n2 >> 16;\n n2 |= n2 >> 32;\n return n2 + 1;\n }\n var EpochSchedule = class {\n constructor(slotsPerEpoch, leaderScheduleSlotOffset, warmup, firstNormalEpoch, firstNormalSlot) {\n this.slotsPerEpoch = void 0;\n this.leaderScheduleSlotOffset = void 0;\n this.warmup = void 0;\n this.firstNormalEpoch = void 0;\n this.firstNormalSlot = void 0;\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n getEpoch(slot) {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n getEpochAndSlotIndex(slot) {\n if (slot < this.firstNormalSlot) {\n const epoch = trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) - trailingZeros(MINIMUM_SLOT_PER_EPOCH) - 1;\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n getFirstSlotInEpoch(epoch) {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (epoch - this.firstNormalEpoch) * this.slotsPerEpoch + this.firstNormalSlot;\n }\n }\n getLastSlotInEpoch(epoch) {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n getSlotsInEpoch(epoch) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n };\n var fetchImpl = globalThis.fetch;\n var RpcWebSocketClient = class extends rpcWebsockets.CommonClient {\n constructor(address, options, generate_request_id) {\n const webSocketFactory = (url) => {\n const rpc = rpcWebsockets.WebSocket(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1e3,\n ...options\n });\n if (\"socket\" in rpc) {\n this.underlyingSocket = rpc.socket;\n } else {\n this.underlyingSocket = rpc;\n }\n return rpc;\n };\n super(webSocketFactory, address, options, generate_request_id);\n this.underlyingSocket = void 0;\n }\n call(...args) {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1) {\n return super.call(...args);\n }\n return Promise.reject(new Error(\"Tried to call a JSON-RPC method `\" + args[0] + \"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was \" + readyState + \")\"));\n }\n notify(...args) {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1) {\n return super.notify(...args);\n }\n return Promise.reject(new Error(\"Tried to send a JSON-RPC notification `\" + args[0] + \"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was \" + readyState + \")\"));\n }\n };\n function decodeData(type, data) {\n let decoded;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error(\"invalid instruction; \" + err);\n }\n if (decoded.typeIndex !== type.index) {\n throw new Error(`invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`);\n }\n return decoded;\n }\n var LOOKUP_TABLE_META_SIZE = 56;\n var AddressLookupTableAccount = class {\n constructor(args) {\n this.key = void 0;\n this.state = void 0;\n this.key = args.key;\n this.state = args.state;\n }\n isActive() {\n const U64_MAX = BigInt(\"0xffffffffffffffff\");\n return this.state.deactivationSlot === U64_MAX;\n }\n static deserialize(accountData) {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert9(serializedAddressesLen >= 0, \"lookup table is invalid\");\n assert9(serializedAddressesLen % 32 === 0, \"lookup table is invalid\");\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {\n addresses: addresses4\n } = BufferLayout__namespace.struct([BufferLayout__namespace.seq(publicKey(), numSerializedAddresses, \"addresses\")]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority: meta.authority.length !== 0 ? new PublicKey(meta.authority[0]) : void 0,\n addresses: addresses4.map((address) => new PublicKey(address))\n };\n }\n };\n var LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout__namespace.struct([\n BufferLayout__namespace.u32(\"typeIndex\"),\n u64(\"deactivationSlot\"),\n BufferLayout__namespace.nu64(\"lastExtendedSlot\"),\n BufferLayout__namespace.u8(\"lastExtendedStartIndex\"),\n BufferLayout__namespace.u8(),\n // option\n BufferLayout__namespace.seq(publicKey(), BufferLayout__namespace.offset(BufferLayout__namespace.u8(), -1), \"authority\")\n ])\n };\n var URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\n function makeWebsocketUrl(endpoint2) {\n const matches = endpoint2.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint2}\\``);\n }\n const [\n _2,\n // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish,\n portWithColon,\n rest\n ] = matches;\n const protocol = endpoint2.startsWith(\"https:\") ? \"wss:\" : \"ws:\";\n const startPort = portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort = (\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explicitly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to agave-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? \"\" : `:${startPort + 1}`\n );\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n }\n var PublicKeyFromString = superstruct.coerce(superstruct.instance(PublicKey), superstruct.string(), (value) => new PublicKey(value));\n var RawAccountDataResult = superstruct.tuple([superstruct.string(), superstruct.literal(\"base64\")]);\n var BufferFromRawAccountData = superstruct.coerce(superstruct.instance(buffer2.Buffer), RawAccountDataResult, (value) => buffer2.Buffer.from(value[0], \"base64\"));\n var BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1e3;\n function assertEndpointUrl(putativeUrl) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError(\"Endpoint URL must start with `http:` or `https:`.\");\n }\n return putativeUrl;\n }\n function extractCommitmentFromConfig(commitmentOrConfig) {\n let commitment;\n let config2;\n if (typeof commitmentOrConfig === \"string\") {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {\n commitment: specifiedCommitment,\n ...specifiedConfig\n } = commitmentOrConfig;\n commitment = specifiedCommitment;\n config2 = specifiedConfig;\n }\n return {\n commitment,\n config: config2\n };\n }\n function applyDefaultMemcmpEncodingToFilters(filters) {\n return filters.map((filter) => \"memcmp\" in filter ? {\n ...filter,\n memcmp: {\n ...filter.memcmp,\n encoding: filter.memcmp.encoding ?? \"base58\"\n }\n } : filter);\n }\n function createRpcResult(result) {\n return superstruct.union([superstruct.type({\n jsonrpc: superstruct.literal(\"2.0\"),\n id: superstruct.string(),\n result\n }), superstruct.type({\n jsonrpc: superstruct.literal(\"2.0\"),\n id: superstruct.string(),\n error: superstruct.type({\n code: superstruct.unknown(),\n message: superstruct.string(),\n data: superstruct.optional(superstruct.any())\n })\n })]);\n }\n var UnknownRpcResult = createRpcResult(superstruct.unknown());\n function jsonRpcResult(schema) {\n return superstruct.coerce(createRpcResult(schema), UnknownRpcResult, (value) => {\n if (\"error\" in value) {\n return value;\n } else {\n return {\n ...value,\n result: superstruct.create(value.result, schema)\n };\n }\n });\n }\n function jsonRpcResultAndContext(value) {\n return jsonRpcResult(superstruct.type({\n context: superstruct.type({\n slot: superstruct.number()\n }),\n value\n }));\n }\n function notificationResultAndContext(value) {\n return superstruct.type({\n context: superstruct.type({\n slot: superstruct.number()\n }),\n value\n });\n }\n function versionedMessageFromResponse(version7, response) {\n if (version7 === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map((accountKey) => new PublicKey(accountKey)),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map((ix) => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58__default.default.decode(ix.data)\n })),\n addressTableLookups: response.addressTableLookups\n });\n } else {\n return new Message(response);\n }\n }\n var GetInflationGovernorResult = superstruct.type({\n foundation: superstruct.number(),\n foundationTerm: superstruct.number(),\n initial: superstruct.number(),\n taper: superstruct.number(),\n terminal: superstruct.number()\n });\n var GetInflationRewardResult = jsonRpcResult(superstruct.array(superstruct.nullable(superstruct.type({\n epoch: superstruct.number(),\n effectiveSlot: superstruct.number(),\n amount: superstruct.number(),\n postBalance: superstruct.number(),\n commission: superstruct.optional(superstruct.nullable(superstruct.number()))\n }))));\n var GetRecentPrioritizationFeesResult = superstruct.array(superstruct.type({\n slot: superstruct.number(),\n prioritizationFee: superstruct.number()\n }));\n var GetInflationRateResult = superstruct.type({\n total: superstruct.number(),\n validator: superstruct.number(),\n foundation: superstruct.number(),\n epoch: superstruct.number()\n });\n var GetEpochInfoResult = superstruct.type({\n epoch: superstruct.number(),\n slotIndex: superstruct.number(),\n slotsInEpoch: superstruct.number(),\n absoluteSlot: superstruct.number(),\n blockHeight: superstruct.optional(superstruct.number()),\n transactionCount: superstruct.optional(superstruct.number())\n });\n var GetEpochScheduleResult = superstruct.type({\n slotsPerEpoch: superstruct.number(),\n leaderScheduleSlotOffset: superstruct.number(),\n warmup: superstruct.boolean(),\n firstNormalEpoch: superstruct.number(),\n firstNormalSlot: superstruct.number()\n });\n var GetLeaderScheduleResult = superstruct.record(superstruct.string(), superstruct.array(superstruct.number()));\n var TransactionErrorResult = superstruct.nullable(superstruct.union([superstruct.type({}), superstruct.string()]));\n var SignatureStatusResult = superstruct.type({\n err: TransactionErrorResult\n });\n var SignatureReceivedResult = superstruct.literal(\"receivedSignature\");\n var VersionResult = superstruct.type({\n \"solana-core\": superstruct.string(),\n \"feature-set\": superstruct.optional(superstruct.number())\n });\n var ParsedInstructionStruct = superstruct.type({\n program: superstruct.string(),\n programId: PublicKeyFromString,\n parsed: superstruct.unknown()\n });\n var PartiallyDecodedInstructionStruct = superstruct.type({\n programId: PublicKeyFromString,\n accounts: superstruct.array(PublicKeyFromString),\n data: superstruct.string()\n });\n var SimulatedTransactionResponseStruct = jsonRpcResultAndContext(superstruct.type({\n err: superstruct.nullable(superstruct.union([superstruct.type({}), superstruct.string()])),\n logs: superstruct.nullable(superstruct.array(superstruct.string())),\n accounts: superstruct.optional(superstruct.nullable(superstruct.array(superstruct.nullable(superstruct.type({\n executable: superstruct.boolean(),\n owner: superstruct.string(),\n lamports: superstruct.number(),\n data: superstruct.array(superstruct.string()),\n rentEpoch: superstruct.optional(superstruct.number())\n }))))),\n unitsConsumed: superstruct.optional(superstruct.number()),\n returnData: superstruct.optional(superstruct.nullable(superstruct.type({\n programId: superstruct.string(),\n data: superstruct.tuple([superstruct.string(), superstruct.literal(\"base64\")])\n }))),\n innerInstructions: superstruct.optional(superstruct.nullable(superstruct.array(superstruct.type({\n index: superstruct.number(),\n instructions: superstruct.array(superstruct.union([ParsedInstructionStruct, PartiallyDecodedInstructionStruct]))\n }))))\n }));\n var BlockProductionResponseStruct = jsonRpcResultAndContext(superstruct.type({\n byIdentity: superstruct.record(superstruct.string(), superstruct.array(superstruct.number())),\n range: superstruct.type({\n firstSlot: superstruct.number(),\n lastSlot: superstruct.number()\n })\n }));\n function createRpcClient(url, httpHeaders, customFetch, fetchMiddleware, disableRetryOnRateLimit, httpAgent) {\n const fetch2 = customFetch ? customFetch : fetchImpl;\n let agent;\n {\n if (httpAgent != null) {\n console.warn(\"You have supplied an `httpAgent` when creating a `Connection` in a browser environment.It has been ignored; `httpAgent` is only used in Node environments.\");\n }\n }\n let fetchWithMiddleware;\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise((resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) => resolve([modifiedInfo, modifiedInit]));\n } catch (error) {\n reject(error);\n }\n });\n return await fetch2(...modifiedFetchArgs);\n };\n }\n const clientBrowser = new RpcClient__default.default(async (request, callback) => {\n const options = {\n method: \"POST\",\n body: request,\n agent,\n headers: Object.assign({\n \"Content-Type\": \"application/json\"\n }, httpHeaders || {}, COMMON_HTTP_HEADERS)\n };\n try {\n let too_many_requests_retries = 5;\n let res;\n let waitTime = 500;\n for (; ; ) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch2(url, options);\n }\n if (res.status !== 429) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.error(`Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`);\n await sleep(waitTime);\n waitTime *= 2;\n }\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error)\n callback(err);\n }\n }, {});\n return clientBrowser;\n }\n function createRpcRequest(client) {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err, response) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n }\n function createRpcBatchRequest(client) {\n return (requests) => {\n return new Promise((resolve, reject) => {\n if (requests.length === 0)\n resolve([]);\n const batch = requests.map((params) => {\n return client.request(params.methodName, params.args);\n });\n client.request(batch, (err, response) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n }\n var GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n var GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n var GetRecentPrioritizationFeesRpcResult = jsonRpcResult(GetRecentPrioritizationFeesResult);\n var GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n var GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n var GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n var SlotRpcResult = jsonRpcResult(superstruct.number());\n var GetSupplyRpcResult = jsonRpcResultAndContext(superstruct.type({\n total: superstruct.number(),\n circulating: superstruct.number(),\n nonCirculating: superstruct.number(),\n nonCirculatingAccounts: superstruct.array(PublicKeyFromString)\n }));\n var TokenAmountResult = superstruct.type({\n amount: superstruct.string(),\n uiAmount: superstruct.nullable(superstruct.number()),\n decimals: superstruct.number(),\n uiAmountString: superstruct.optional(superstruct.string())\n });\n var GetTokenLargestAccountsResult = jsonRpcResultAndContext(superstruct.array(superstruct.type({\n address: PublicKeyFromString,\n amount: superstruct.string(),\n uiAmount: superstruct.nullable(superstruct.number()),\n decimals: superstruct.number(),\n uiAmountString: superstruct.optional(superstruct.string())\n })));\n var GetTokenAccountsByOwner = jsonRpcResultAndContext(superstruct.array(superstruct.type({\n pubkey: PublicKeyFromString,\n account: superstruct.type({\n executable: superstruct.boolean(),\n owner: PublicKeyFromString,\n lamports: superstruct.number(),\n data: BufferFromRawAccountData,\n rentEpoch: superstruct.number()\n })\n })));\n var ParsedAccountDataResult = superstruct.type({\n program: superstruct.string(),\n parsed: superstruct.unknown(),\n space: superstruct.number()\n });\n var GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(superstruct.array(superstruct.type({\n pubkey: PublicKeyFromString,\n account: superstruct.type({\n executable: superstruct.boolean(),\n owner: PublicKeyFromString,\n lamports: superstruct.number(),\n data: ParsedAccountDataResult,\n rentEpoch: superstruct.number()\n })\n })));\n var GetLargestAccountsRpcResult = jsonRpcResultAndContext(superstruct.array(superstruct.type({\n lamports: superstruct.number(),\n address: PublicKeyFromString\n })));\n var AccountInfoResult = superstruct.type({\n executable: superstruct.boolean(),\n owner: PublicKeyFromString,\n lamports: superstruct.number(),\n data: BufferFromRawAccountData,\n rentEpoch: superstruct.number()\n });\n var KeyedAccountInfoResult = superstruct.type({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult\n });\n var ParsedOrRawAccountData = superstruct.coerce(superstruct.union([superstruct.instance(buffer2.Buffer), ParsedAccountDataResult]), superstruct.union([RawAccountDataResult, ParsedAccountDataResult]), (value) => {\n if (Array.isArray(value)) {\n return superstruct.create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n });\n var ParsedAccountInfoResult = superstruct.type({\n executable: superstruct.boolean(),\n owner: PublicKeyFromString,\n lamports: superstruct.number(),\n data: ParsedOrRawAccountData,\n rentEpoch: superstruct.number()\n });\n var KeyedParsedAccountInfoResult = superstruct.type({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult\n });\n var StakeActivationResult = superstruct.type({\n state: superstruct.union([superstruct.literal(\"active\"), superstruct.literal(\"inactive\"), superstruct.literal(\"activating\"), superstruct.literal(\"deactivating\")]),\n active: superstruct.number(),\n inactive: superstruct.number()\n });\n var GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(superstruct.array(superstruct.type({\n signature: superstruct.string(),\n slot: superstruct.number(),\n err: TransactionErrorResult,\n memo: superstruct.nullable(superstruct.string()),\n blockTime: superstruct.optional(superstruct.nullable(superstruct.number()))\n })));\n var GetSignaturesForAddressRpcResult = jsonRpcResult(superstruct.array(superstruct.type({\n signature: superstruct.string(),\n slot: superstruct.number(),\n err: TransactionErrorResult,\n memo: superstruct.nullable(superstruct.string()),\n blockTime: superstruct.optional(superstruct.nullable(superstruct.number()))\n })));\n var AccountNotificationResult = superstruct.type({\n subscription: superstruct.number(),\n result: notificationResultAndContext(AccountInfoResult)\n });\n var ProgramAccountInfoResult = superstruct.type({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult\n });\n var ProgramAccountNotificationResult = superstruct.type({\n subscription: superstruct.number(),\n result: notificationResultAndContext(ProgramAccountInfoResult)\n });\n var SlotInfoResult = superstruct.type({\n parent: superstruct.number(),\n slot: superstruct.number(),\n root: superstruct.number()\n });\n var SlotNotificationResult = superstruct.type({\n subscription: superstruct.number(),\n result: SlotInfoResult\n });\n var SlotUpdateResult = superstruct.union([superstruct.type({\n type: superstruct.union([superstruct.literal(\"firstShredReceived\"), superstruct.literal(\"completed\"), superstruct.literal(\"optimisticConfirmation\"), superstruct.literal(\"root\")]),\n slot: superstruct.number(),\n timestamp: superstruct.number()\n }), superstruct.type({\n type: superstruct.literal(\"createdBank\"),\n parent: superstruct.number(),\n slot: superstruct.number(),\n timestamp: superstruct.number()\n }), superstruct.type({\n type: superstruct.literal(\"frozen\"),\n slot: superstruct.number(),\n timestamp: superstruct.number(),\n stats: superstruct.type({\n numTransactionEntries: superstruct.number(),\n numSuccessfulTransactions: superstruct.number(),\n numFailedTransactions: superstruct.number(),\n maxTransactionsPerEntry: superstruct.number()\n })\n }), superstruct.type({\n type: superstruct.literal(\"dead\"),\n slot: superstruct.number(),\n timestamp: superstruct.number(),\n err: superstruct.string()\n })]);\n var SlotUpdateNotificationResult = superstruct.type({\n subscription: superstruct.number(),\n result: SlotUpdateResult\n });\n var SignatureNotificationResult = superstruct.type({\n subscription: superstruct.number(),\n result: notificationResultAndContext(superstruct.union([SignatureStatusResult, SignatureReceivedResult]))\n });\n var RootNotificationResult = superstruct.type({\n subscription: superstruct.number(),\n result: superstruct.number()\n });\n var ContactInfoResult = superstruct.type({\n pubkey: superstruct.string(),\n gossip: superstruct.nullable(superstruct.string()),\n tpu: superstruct.nullable(superstruct.string()),\n rpc: superstruct.nullable(superstruct.string()),\n version: superstruct.nullable(superstruct.string())\n });\n var VoteAccountInfoResult = superstruct.type({\n votePubkey: superstruct.string(),\n nodePubkey: superstruct.string(),\n activatedStake: superstruct.number(),\n epochVoteAccount: superstruct.boolean(),\n epochCredits: superstruct.array(superstruct.tuple([superstruct.number(), superstruct.number(), superstruct.number()])),\n commission: superstruct.number(),\n lastVote: superstruct.number(),\n rootSlot: superstruct.nullable(superstruct.number())\n });\n var GetVoteAccounts = jsonRpcResult(superstruct.type({\n current: superstruct.array(VoteAccountInfoResult),\n delinquent: superstruct.array(VoteAccountInfoResult)\n }));\n var ConfirmationStatus = superstruct.union([superstruct.literal(\"processed\"), superstruct.literal(\"confirmed\"), superstruct.literal(\"finalized\")]);\n var SignatureStatusResponse = superstruct.type({\n slot: superstruct.number(),\n confirmations: superstruct.nullable(superstruct.number()),\n err: TransactionErrorResult,\n confirmationStatus: superstruct.optional(ConfirmationStatus)\n });\n var GetSignatureStatusesRpcResult = jsonRpcResultAndContext(superstruct.array(superstruct.nullable(SignatureStatusResponse)));\n var GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(superstruct.number());\n var AddressTableLookupStruct = superstruct.type({\n accountKey: PublicKeyFromString,\n writableIndexes: superstruct.array(superstruct.number()),\n readonlyIndexes: superstruct.array(superstruct.number())\n });\n var ConfirmedTransactionResult = superstruct.type({\n signatures: superstruct.array(superstruct.string()),\n message: superstruct.type({\n accountKeys: superstruct.array(superstruct.string()),\n header: superstruct.type({\n numRequiredSignatures: superstruct.number(),\n numReadonlySignedAccounts: superstruct.number(),\n numReadonlyUnsignedAccounts: superstruct.number()\n }),\n instructions: superstruct.array(superstruct.type({\n accounts: superstruct.array(superstruct.number()),\n data: superstruct.string(),\n programIdIndex: superstruct.number()\n })),\n recentBlockhash: superstruct.string(),\n addressTableLookups: superstruct.optional(superstruct.array(AddressTableLookupStruct))\n })\n });\n var AnnotatedAccountKey = superstruct.type({\n pubkey: PublicKeyFromString,\n signer: superstruct.boolean(),\n writable: superstruct.boolean(),\n source: superstruct.optional(superstruct.union([superstruct.literal(\"transaction\"), superstruct.literal(\"lookupTable\")]))\n });\n var ConfirmedTransactionAccountsModeResult = superstruct.type({\n accountKeys: superstruct.array(AnnotatedAccountKey),\n signatures: superstruct.array(superstruct.string())\n });\n var ParsedInstructionResult = superstruct.type({\n parsed: superstruct.unknown(),\n program: superstruct.string(),\n programId: PublicKeyFromString\n });\n var RawInstructionResult = superstruct.type({\n accounts: superstruct.array(PublicKeyFromString),\n data: superstruct.string(),\n programId: PublicKeyFromString\n });\n var InstructionResult = superstruct.union([RawInstructionResult, ParsedInstructionResult]);\n var UnknownInstructionResult = superstruct.union([superstruct.type({\n parsed: superstruct.unknown(),\n program: superstruct.string(),\n programId: superstruct.string()\n }), superstruct.type({\n accounts: superstruct.array(superstruct.string()),\n data: superstruct.string(),\n programId: superstruct.string()\n })]);\n var ParsedOrRawInstruction = superstruct.coerce(InstructionResult, UnknownInstructionResult, (value) => {\n if (\"accounts\" in value) {\n return superstruct.create(value, RawInstructionResult);\n } else {\n return superstruct.create(value, ParsedInstructionResult);\n }\n });\n var ParsedConfirmedTransactionResult = superstruct.type({\n signatures: superstruct.array(superstruct.string()),\n message: superstruct.type({\n accountKeys: superstruct.array(AnnotatedAccountKey),\n instructions: superstruct.array(ParsedOrRawInstruction),\n recentBlockhash: superstruct.string(),\n addressTableLookups: superstruct.optional(superstruct.nullable(superstruct.array(AddressTableLookupStruct)))\n })\n });\n var TokenBalanceResult = superstruct.type({\n accountIndex: superstruct.number(),\n mint: superstruct.string(),\n owner: superstruct.optional(superstruct.string()),\n programId: superstruct.optional(superstruct.string()),\n uiTokenAmount: TokenAmountResult\n });\n var LoadedAddressesResult = superstruct.type({\n writable: superstruct.array(PublicKeyFromString),\n readonly: superstruct.array(PublicKeyFromString)\n });\n var ConfirmedTransactionMetaResult = superstruct.type({\n err: TransactionErrorResult,\n fee: superstruct.number(),\n innerInstructions: superstruct.optional(superstruct.nullable(superstruct.array(superstruct.type({\n index: superstruct.number(),\n instructions: superstruct.array(superstruct.type({\n accounts: superstruct.array(superstruct.number()),\n data: superstruct.string(),\n programIdIndex: superstruct.number()\n }))\n })))),\n preBalances: superstruct.array(superstruct.number()),\n postBalances: superstruct.array(superstruct.number()),\n logMessages: superstruct.optional(superstruct.nullable(superstruct.array(superstruct.string()))),\n preTokenBalances: superstruct.optional(superstruct.nullable(superstruct.array(TokenBalanceResult))),\n postTokenBalances: superstruct.optional(superstruct.nullable(superstruct.array(TokenBalanceResult))),\n loadedAddresses: superstruct.optional(LoadedAddressesResult),\n computeUnitsConsumed: superstruct.optional(superstruct.number()),\n costUnits: superstruct.optional(superstruct.number())\n });\n var ParsedConfirmedTransactionMetaResult = superstruct.type({\n err: TransactionErrorResult,\n fee: superstruct.number(),\n innerInstructions: superstruct.optional(superstruct.nullable(superstruct.array(superstruct.type({\n index: superstruct.number(),\n instructions: superstruct.array(ParsedOrRawInstruction)\n })))),\n preBalances: superstruct.array(superstruct.number()),\n postBalances: superstruct.array(superstruct.number()),\n logMessages: superstruct.optional(superstruct.nullable(superstruct.array(superstruct.string()))),\n preTokenBalances: superstruct.optional(superstruct.nullable(superstruct.array(TokenBalanceResult))),\n postTokenBalances: superstruct.optional(superstruct.nullable(superstruct.array(TokenBalanceResult))),\n loadedAddresses: superstruct.optional(LoadedAddressesResult),\n computeUnitsConsumed: superstruct.optional(superstruct.number()),\n costUnits: superstruct.optional(superstruct.number())\n });\n var TransactionVersionStruct = superstruct.union([superstruct.literal(0), superstruct.literal(\"legacy\")]);\n var RewardsResult = superstruct.type({\n pubkey: superstruct.string(),\n lamports: superstruct.number(),\n postBalance: superstruct.nullable(superstruct.number()),\n rewardType: superstruct.nullable(superstruct.string()),\n commission: superstruct.optional(superstruct.nullable(superstruct.number()))\n });\n var GetBlockRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n blockhash: superstruct.string(),\n previousBlockhash: superstruct.string(),\n parentSlot: superstruct.number(),\n transactions: superstruct.array(superstruct.type({\n transaction: ConfirmedTransactionResult,\n meta: superstruct.nullable(ConfirmedTransactionMetaResult),\n version: superstruct.optional(TransactionVersionStruct)\n })),\n rewards: superstruct.optional(superstruct.array(RewardsResult)),\n blockTime: superstruct.nullable(superstruct.number()),\n blockHeight: superstruct.nullable(superstruct.number())\n })));\n var GetNoneModeBlockRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n blockhash: superstruct.string(),\n previousBlockhash: superstruct.string(),\n parentSlot: superstruct.number(),\n rewards: superstruct.optional(superstruct.array(RewardsResult)),\n blockTime: superstruct.nullable(superstruct.number()),\n blockHeight: superstruct.nullable(superstruct.number())\n })));\n var GetAccountsModeBlockRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n blockhash: superstruct.string(),\n previousBlockhash: superstruct.string(),\n parentSlot: superstruct.number(),\n transactions: superstruct.array(superstruct.type({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: superstruct.nullable(ConfirmedTransactionMetaResult),\n version: superstruct.optional(TransactionVersionStruct)\n })),\n rewards: superstruct.optional(superstruct.array(RewardsResult)),\n blockTime: superstruct.nullable(superstruct.number()),\n blockHeight: superstruct.nullable(superstruct.number())\n })));\n var GetParsedBlockRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n blockhash: superstruct.string(),\n previousBlockhash: superstruct.string(),\n parentSlot: superstruct.number(),\n transactions: superstruct.array(superstruct.type({\n transaction: ParsedConfirmedTransactionResult,\n meta: superstruct.nullable(ParsedConfirmedTransactionMetaResult),\n version: superstruct.optional(TransactionVersionStruct)\n })),\n rewards: superstruct.optional(superstruct.array(RewardsResult)),\n blockTime: superstruct.nullable(superstruct.number()),\n blockHeight: superstruct.nullable(superstruct.number())\n })));\n var GetParsedAccountsModeBlockRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n blockhash: superstruct.string(),\n previousBlockhash: superstruct.string(),\n parentSlot: superstruct.number(),\n transactions: superstruct.array(superstruct.type({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: superstruct.nullable(ParsedConfirmedTransactionMetaResult),\n version: superstruct.optional(TransactionVersionStruct)\n })),\n rewards: superstruct.optional(superstruct.array(RewardsResult)),\n blockTime: superstruct.nullable(superstruct.number()),\n blockHeight: superstruct.nullable(superstruct.number())\n })));\n var GetParsedNoneModeBlockRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n blockhash: superstruct.string(),\n previousBlockhash: superstruct.string(),\n parentSlot: superstruct.number(),\n rewards: superstruct.optional(superstruct.array(RewardsResult)),\n blockTime: superstruct.nullable(superstruct.number()),\n blockHeight: superstruct.nullable(superstruct.number())\n })));\n var GetConfirmedBlockRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n blockhash: superstruct.string(),\n previousBlockhash: superstruct.string(),\n parentSlot: superstruct.number(),\n transactions: superstruct.array(superstruct.type({\n transaction: ConfirmedTransactionResult,\n meta: superstruct.nullable(ConfirmedTransactionMetaResult)\n })),\n rewards: superstruct.optional(superstruct.array(RewardsResult)),\n blockTime: superstruct.nullable(superstruct.number())\n })));\n var GetBlockSignaturesRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n blockhash: superstruct.string(),\n previousBlockhash: superstruct.string(),\n parentSlot: superstruct.number(),\n signatures: superstruct.array(superstruct.string()),\n blockTime: superstruct.nullable(superstruct.number())\n })));\n var GetTransactionRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n slot: superstruct.number(),\n meta: superstruct.nullable(ConfirmedTransactionMetaResult),\n blockTime: superstruct.optional(superstruct.nullable(superstruct.number())),\n transaction: ConfirmedTransactionResult,\n version: superstruct.optional(TransactionVersionStruct)\n })));\n var GetParsedTransactionRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n slot: superstruct.number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: superstruct.nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: superstruct.optional(superstruct.nullable(superstruct.number())),\n version: superstruct.optional(TransactionVersionStruct)\n })));\n var GetLatestBlockhashRpcResult = jsonRpcResultAndContext(superstruct.type({\n blockhash: superstruct.string(),\n lastValidBlockHeight: superstruct.number()\n }));\n var IsBlockhashValidRpcResult = jsonRpcResultAndContext(superstruct.boolean());\n var PerfSampleResult = superstruct.type({\n slot: superstruct.number(),\n numTransactions: superstruct.number(),\n numSlots: superstruct.number(),\n samplePeriodSecs: superstruct.number()\n });\n var GetRecentPerformanceSamplesRpcResult = jsonRpcResult(superstruct.array(PerfSampleResult));\n var GetFeeCalculatorRpcResult = jsonRpcResultAndContext(superstruct.nullable(superstruct.type({\n feeCalculator: superstruct.type({\n lamportsPerSignature: superstruct.number()\n })\n })));\n var RequestAirdropRpcResult = jsonRpcResult(superstruct.string());\n var SendTransactionRpcResult = jsonRpcResult(superstruct.string());\n var LogsResult = superstruct.type({\n err: TransactionErrorResult,\n logs: superstruct.array(superstruct.string()),\n signature: superstruct.string()\n });\n var LogsNotificationResult = superstruct.type({\n result: notificationResultAndContext(LogsResult),\n subscription: superstruct.number()\n });\n var COMMON_HTTP_HEADERS = {\n \"solana-client\": `js/${\"1.0.0-maintenance\"}`\n };\n var Connection2 = class {\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(endpoint2, _commitmentOrConfig) {\n this._commitment = void 0;\n this._confirmTransactionInitialTimeout = void 0;\n this._rpcEndpoint = void 0;\n this._rpcWsEndpoint = void 0;\n this._rpcClient = void 0;\n this._rpcRequest = void 0;\n this._rpcBatchRequest = void 0;\n this._rpcWebSocket = void 0;\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketHeartbeat = null;\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketGeneration = 0;\n this._disableBlockhashCaching = false;\n this._pollingBlockhash = false;\n this._blockhashInfo = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: []\n };\n this._nextClientSubscriptionId = 0;\n this._subscriptionDisposeFunctionsByClientSubscriptionId = {};\n this._subscriptionHashByClientSubscriptionId = {};\n this._subscriptionStateChangeCallbacksByHash = {};\n this._subscriptionCallbacksByServerSubscriptionId = {};\n this._subscriptionsByHash = {};\n this._subscriptionsAutoDisposedByRpc = /* @__PURE__ */ new Set();\n this.getBlockHeight = /* @__PURE__ */ (() => {\n const requestPromises = {};\n return async (commitmentOrConfig) => {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, void 0, config2);\n const requestHash = fastStableStringify(args);\n requestPromises[requestHash] = requestPromises[requestHash] ?? (async () => {\n try {\n const unsafeRes = await this._rpcRequest(\"getBlockHeight\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.number()));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get block height information\");\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n let wsEndpoint;\n let httpHeaders;\n let fetch2;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (_commitmentOrConfig && typeof _commitmentOrConfig === \"string\") {\n this._commitment = _commitmentOrConfig;\n } else if (_commitmentOrConfig) {\n this._commitment = _commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout = _commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = _commitmentOrConfig.wsEndpoint;\n httpHeaders = _commitmentOrConfig.httpHeaders;\n fetch2 = _commitmentOrConfig.fetch;\n fetchMiddleware = _commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = _commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = _commitmentOrConfig.httpAgent;\n }\n this._rpcEndpoint = assertEndpointUrl(endpoint2);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint2);\n this._rpcClient = createRpcClient(endpoint2, httpHeaders, fetch2, fetchMiddleware, disableRetryOnRateLimit, httpAgent);\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity\n });\n this._rpcWebSocket.on(\"open\", this._wsOnOpen.bind(this));\n this._rpcWebSocket.on(\"error\", this._wsOnError.bind(this));\n this._rpcWebSocket.on(\"close\", this._wsOnClose.bind(this));\n this._rpcWebSocket.on(\"accountNotification\", this._wsOnAccountNotification.bind(this));\n this._rpcWebSocket.on(\"programNotification\", this._wsOnProgramAccountNotification.bind(this));\n this._rpcWebSocket.on(\"slotNotification\", this._wsOnSlotNotification.bind(this));\n this._rpcWebSocket.on(\"slotsUpdatesNotification\", this._wsOnSlotUpdatesNotification.bind(this));\n this._rpcWebSocket.on(\"signatureNotification\", this._wsOnSignatureNotification.bind(this));\n this._rpcWebSocket.on(\"rootNotification\", this._wsOnRootNotification.bind(this));\n this._rpcWebSocket.on(\"logsNotification\", this._wsOnLogsNotification.bind(this));\n }\n /**\n * The default commitment used for requests\n */\n get commitment() {\n return this._commitment;\n }\n /**\n * The RPC endpoint\n */\n get rpcEndpoint() {\n return this._rpcEndpoint;\n }\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(publicKey2, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey2.toBase58()], commitment, void 0, config2);\n const unsafeRes = await this._rpcRequest(\"getBalance\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(superstruct.number()));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get balance for ${publicKey2.toBase58()}`);\n }\n return res.result;\n }\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(publicKey2, commitmentOrConfig) {\n return await this.getBalanceAndContext(publicKey2, commitmentOrConfig).then((x4) => x4.value).catch((e2) => {\n throw new Error(\"failed to get balance of account \" + publicKey2.toBase58() + \": \" + e2);\n });\n }\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot) {\n const unsafeRes = await this._rpcRequest(\"getBlockTime\", [slot]);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.nullable(superstruct.number())));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get block time for slot ${slot}`);\n }\n return res.result;\n }\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot() {\n const unsafeRes = await this._rpcRequest(\"minimumLedgerSlot\", []);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.number()));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get minimum ledger slot\");\n }\n return res.result;\n }\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock() {\n const unsafeRes = await this._rpcRequest(\"getFirstAvailableBlock\", []);\n const res = superstruct.create(unsafeRes, SlotRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get first available block\");\n }\n return res.result;\n }\n /**\n * Fetch information about the current supply\n */\n async getSupply(config2) {\n let configArg = {};\n if (typeof config2 === \"string\") {\n configArg = {\n commitment: config2\n };\n } else if (config2) {\n configArg = {\n ...config2,\n commitment: config2 && config2.commitment || this.commitment\n };\n } else {\n configArg = {\n commitment: this.commitment\n };\n }\n const unsafeRes = await this._rpcRequest(\"getSupply\", [configArg]);\n const res = superstruct.create(unsafeRes, GetSupplyRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get supply\");\n }\n return res.result;\n }\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(tokenMintAddress, commitment) {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest(\"getTokenSupply\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get token supply\");\n }\n return res.result;\n }\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(tokenAddress, commitment) {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest(\"getTokenAccountBalance\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get token account balance\");\n }\n return res.result;\n }\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(ownerAddress, filter, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n let _args = [ownerAddress.toBase58()];\n if (\"mint\" in filter) {\n _args.push({\n mint: filter.mint.toBase58()\n });\n } else {\n _args.push({\n programId: filter.programId.toBase58()\n });\n }\n const args = this._buildArgs(_args, commitment, \"base64\", config2);\n const unsafeRes = await this._rpcRequest(\"getTokenAccountsByOwner\", args);\n const res = superstruct.create(unsafeRes, GetTokenAccountsByOwner);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get token accounts owned by account ${ownerAddress.toBase58()}`);\n }\n return res.result;\n }\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(ownerAddress, filter, commitment) {\n let _args = [ownerAddress.toBase58()];\n if (\"mint\" in filter) {\n _args.push({\n mint: filter.mint.toBase58()\n });\n } else {\n _args.push({\n programId: filter.programId.toBase58()\n });\n }\n const args = this._buildArgs(_args, commitment, \"jsonParsed\");\n const unsafeRes = await this._rpcRequest(\"getTokenAccountsByOwner\", args);\n const res = superstruct.create(unsafeRes, GetParsedTokenAccountsByOwner);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get token accounts owned by account ${ownerAddress.toBase58()}`);\n }\n return res.result;\n }\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(config2) {\n const arg = {\n ...config2,\n commitment: config2 && config2.commitment || this.commitment\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest(\"getLargestAccounts\", args);\n const res = superstruct.create(unsafeRes, GetLargestAccountsRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get largest accounts\");\n }\n return res.result;\n }\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(mintAddress, commitment) {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest(\"getTokenLargestAccounts\", args);\n const res = superstruct.create(unsafeRes, GetTokenLargestAccountsResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get token largest accounts\");\n }\n return res.result;\n }\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(publicKey2, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey2.toBase58()], commitment, \"base64\", config2);\n const unsafeRes = await this._rpcRequest(\"getAccountInfo\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(superstruct.nullable(AccountInfoResult)));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info about account ${publicKey2.toBase58()}`);\n }\n return res.result;\n }\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(publicKey2, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey2.toBase58()], commitment, \"jsonParsed\", config2);\n const unsafeRes = await this._rpcRequest(\"getAccountInfo\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(superstruct.nullable(ParsedAccountInfoResult)));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info about account ${publicKey2.toBase58()}`);\n }\n return res.result;\n }\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(publicKey2, commitmentOrConfig) {\n try {\n const res = await this.getAccountInfoAndContext(publicKey2, commitmentOrConfig);\n return res.value;\n } catch (e2) {\n throw new Error(\"failed to get info about account \" + publicKey2.toBase58() + \": \" + e2);\n }\n }\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(publicKeys, rawConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map((key) => key.toBase58());\n const args = this._buildArgs([keys], commitment, \"jsonParsed\", config2);\n const unsafeRes = await this._rpcRequest(\"getMultipleAccounts\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(superstruct.array(superstruct.nullable(ParsedAccountInfoResult))));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys}`);\n }\n return res.result;\n }\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map((key) => key.toBase58());\n const args = this._buildArgs([keys], commitment, \"base64\", config2);\n const unsafeRes = await this._rpcRequest(\"getMultipleAccounts\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(superstruct.array(superstruct.nullable(AccountInfoResult))));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys}`);\n }\n return res.result;\n }\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(publicKeys, commitmentOrConfig) {\n const res = await this.getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig);\n return res.value;\n }\n /**\n * Returns epoch activation information for a stake account that has been delegated\n *\n * @deprecated Deprecated since RPC v1.18; will be removed in a future version.\n */\n async getStakeActivation(publicKey2, commitmentOrConfig, epoch) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey2.toBase58()], commitment, void 0, {\n ...config2,\n epoch: epoch != null ? epoch : config2?.epoch\n });\n const unsafeRes = await this._rpcRequest(\"getStakeActivation\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get Stake Activation ${publicKey2.toBase58()}`);\n }\n return res.result;\n }\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n // eslint-disable-next-line no-dupe-class-members\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(programId, configOrCommitment) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(configOrCommitment);\n const {\n encoding,\n ...configWithoutEncoding\n } = config2 || {};\n const args = this._buildArgs([programId.toBase58()], commitment, encoding || \"base64\", {\n ...configWithoutEncoding,\n ...configWithoutEncoding.filters ? {\n filters: applyDefaultMemcmpEncodingToFilters(configWithoutEncoding.filters)\n } : null\n });\n const unsafeRes = await this._rpcRequest(\"getProgramAccounts\", args);\n const baseSchema = superstruct.array(KeyedAccountInfoResult);\n const res = configWithoutEncoding.withContext === true ? superstruct.create(unsafeRes, jsonRpcResultAndContext(baseSchema)) : superstruct.create(unsafeRes, jsonRpcResult(baseSchema));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get accounts owned by program ${programId.toBase58()}`);\n }\n return res.result;\n }\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(programId, configOrCommitment) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs([programId.toBase58()], commitment, \"jsonParsed\", config2);\n const unsafeRes = await this._rpcRequest(\"getProgramAccounts\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.array(KeyedParsedAccountInfoResult)));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get accounts owned by program ${programId.toBase58()}`);\n }\n return res.result;\n }\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(strategy, commitment) {\n let rawSignature;\n if (typeof strategy == \"string\") {\n rawSignature = strategy;\n } else {\n const config2 = strategy;\n if (config2.abortSignal?.aborted) {\n return Promise.reject(config2.abortSignal.reason);\n }\n rawSignature = config2.signature;\n }\n let decodedSignature;\n try {\n decodedSignature = bs58__default.default.decode(rawSignature);\n } catch (err) {\n throw new Error(\"signature must be base58 encoded: \" + rawSignature);\n }\n assert9(decodedSignature.length === 64, \"signature has invalid length\");\n if (typeof strategy === \"string\") {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature\n });\n } else if (\"lastValidBlockHeight\" in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy\n });\n }\n }\n getCancellationPromise(signal) {\n return new Promise((_2, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener(\"abort\", () => {\n reject(signal.reason);\n });\n }\n });\n }\n getTransactionConfirmationPromise({\n commitment,\n signature: signature2\n }) {\n let signatureSubscriptionId;\n let disposeSignatureSubscriptionStateChangeObserver;\n let done = false;\n const confirmationPromise = new Promise((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(signature2, (result, context2) => {\n signatureSubscriptionId = void 0;\n const response = {\n context: context2,\n value: result\n };\n resolve({\n __type: TransactionStatus.PROCESSED,\n response\n });\n }, commitment);\n const subscriptionSetupPromise = new Promise((resolveSubscriptionSetup) => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver = this._onSubscriptionStateChange(signatureSubscriptionId, (nextState) => {\n if (nextState === \"subscribed\") {\n resolveSubscriptionSetup();\n }\n });\n }\n });\n (async () => {\n await subscriptionSetupPromise;\n if (done)\n return;\n const response = await this.getSignatureStatus(signature2);\n if (done)\n return;\n if (response == null) {\n return;\n }\n const {\n context: context2,\n value\n } = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case \"confirmed\":\n case \"single\":\n case \"singleGossip\": {\n if (value.confirmationStatus === \"processed\") {\n return;\n }\n break;\n }\n case \"finalized\":\n case \"max\":\n case \"root\": {\n if (value.confirmationStatus === \"processed\" || value.confirmationStatus === \"confirmed\") {\n return;\n }\n break;\n }\n case \"processed\":\n case \"recent\":\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context: context2,\n value\n }\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = void 0;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = void 0;\n }\n };\n return {\n abortConfirmation,\n confirmationPromise\n };\n }\n async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {\n abortSignal,\n lastValidBlockHeight,\n signature: signature2\n }\n }) {\n let done = false;\n const expiryPromise = new Promise((resolve) => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done)\n return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1e3);\n if (done)\n return;\n currentBlockHeight = await checkBlockHeight();\n if (done)\n return;\n }\n resolve({\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED\n });\n })();\n });\n const {\n abortConfirmation,\n confirmationPromise\n } = this.getTransactionConfirmationPromise({\n commitment,\n signature: signature2\n });\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result;\n try {\n const outcome = await Promise.race([cancellationPromise, confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature2);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature: signature2\n }\n }) {\n let done = false;\n const expiryPromise = new Promise((resolve) => {\n let currentNonceValue = nonceValue;\n let lastCheckedSlot = null;\n const getCurrentNonceValue = async () => {\n try {\n const {\n context: context2,\n value: nonceAccount\n } = await this.getNonceAndContext(nonceAccountPubkey, {\n commitment,\n minContextSlot\n });\n lastCheckedSlot = context2.slot;\n return nonceAccount?.nonce;\n } catch (e2) {\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done)\n return;\n while (true) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot\n });\n return;\n }\n await sleep(2e3);\n if (done)\n return;\n currentNonceValue = await getCurrentNonceValue();\n if (done)\n return;\n }\n })();\n });\n const {\n abortConfirmation,\n confirmationPromise\n } = this.getTransactionConfirmationPromise({\n commitment,\n signature: signature2\n });\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result;\n try {\n const outcome = await Promise.race([cancellationPromise, confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n let signatureStatus;\n while (true) {\n const status = await this.getSignatureStatus(signature2);\n if (status == null) {\n break;\n }\n if (status.context.slot < (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || \"finalized\";\n const {\n confirmationStatus\n } = signatureStatus.value;\n switch (commitmentForStatus) {\n case \"processed\":\n case \"recent\":\n if (confirmationStatus !== \"processed\" && confirmationStatus !== \"confirmed\" && confirmationStatus !== \"finalized\") {\n throw new TransactionExpiredNonceInvalidError(signature2);\n }\n break;\n case \"confirmed\":\n case \"single\":\n case \"singleGossip\":\n if (confirmationStatus !== \"confirmed\" && confirmationStatus !== \"finalized\") {\n throw new TransactionExpiredNonceInvalidError(signature2);\n }\n break;\n case \"finalized\":\n case \"max\":\n case \"root\":\n if (confirmationStatus !== \"finalized\") {\n throw new TransactionExpiredNonceInvalidError(signature2);\n }\n break;\n default:\n /* @__PURE__ */ ((_2) => {\n })(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {\n err: signatureStatus.value.err\n }\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature2);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature: signature2\n }) {\n let timeoutId;\n const expiryPromise = new Promise((resolve) => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1e3;\n switch (commitment) {\n case \"processed\":\n case \"recent\":\n case \"single\":\n case \"confirmed\":\n case \"singleGossip\": {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1e3;\n break;\n }\n }\n timeoutId = setTimeout(() => resolve({\n __type: TransactionStatus.TIMED_OUT,\n timeoutMs\n }), timeoutMs);\n });\n const {\n abortConfirmation,\n confirmationPromise\n } = this.getTransactionConfirmationPromise({\n commitment,\n signature: signature2\n });\n let result;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(signature2, outcome.timeoutMs / 1e3);\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes() {\n const unsafeRes = await this._rpcRequest(\"getClusterNodes\", []);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.array(ContactInfoResult)));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get cluster nodes\");\n }\n return res.result;\n }\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment) {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest(\"getVoteAccounts\", args);\n const res = superstruct.create(unsafeRes, GetVoteAccounts);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get vote accounts\");\n }\n return res.result;\n }\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, void 0, config2);\n const unsafeRes = await this._rpcRequest(\"getSlot\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.number()));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get slot\");\n }\n return res.result;\n }\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, void 0, config2);\n const unsafeRes = await this._rpcRequest(\"getSlotLeader\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.string()));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get slot leader\");\n }\n return res.result;\n }\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(startSlot, limit) {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest(\"getSlotLeaders\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.array(PublicKeyFromString)));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get slot leaders\");\n }\n return res.result;\n }\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(signature2, config2) {\n const {\n context: context2,\n value: values\n } = await this.getSignatureStatuses([signature2], config2);\n assert9(values.length === 1);\n const value = values[0];\n return {\n context: context2,\n value\n };\n }\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(signatures, config2) {\n const params = [signatures];\n if (config2) {\n params.push(config2);\n }\n const unsafeRes = await this._rpcRequest(\"getSignatureStatuses\", params);\n const res = superstruct.create(unsafeRes, GetSignatureStatusesRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get signature status\");\n }\n return res.result;\n }\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, void 0, config2);\n const unsafeRes = await this._rpcRequest(\"getTransactionCount\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.number()));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get transaction count\");\n }\n return res.result;\n }\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since RPC v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment) {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true\n });\n return result.value.total;\n }\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(commitment) {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest(\"getInflationGovernor\", args);\n const res = superstruct.create(unsafeRes, GetInflationGovernorRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get inflation\");\n }\n return res.result;\n }\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(addresses4, epoch, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([addresses4.map((pubkey) => pubkey.toBase58())], commitment, void 0, {\n ...config2,\n epoch: epoch != null ? epoch : config2?.epoch\n });\n const unsafeRes = await this._rpcRequest(\"getInflationReward\", args);\n const res = superstruct.create(unsafeRes, GetInflationRewardResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get inflation reward\");\n }\n return res.result;\n }\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate() {\n const unsafeRes = await this._rpcRequest(\"getInflationRate\", []);\n const res = superstruct.create(unsafeRes, GetInflationRateRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get inflation rate\");\n }\n return res.result;\n }\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, void 0, config2);\n const unsafeRes = await this._rpcRequest(\"getEpochInfo\", args);\n const res = superstruct.create(unsafeRes, GetEpochInfoRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get epoch info\");\n }\n return res.result;\n }\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule() {\n const unsafeRes = await this._rpcRequest(\"getEpochSchedule\", []);\n const res = superstruct.create(unsafeRes, GetEpochScheduleRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get epoch schedule\");\n }\n const epochSchedule = res.result;\n return new EpochSchedule(epochSchedule.slotsPerEpoch, epochSchedule.leaderScheduleSlotOffset, epochSchedule.warmup, epochSchedule.firstNormalEpoch, epochSchedule.firstNormalSlot);\n }\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule() {\n const unsafeRes = await this._rpcRequest(\"getLeaderSchedule\", []);\n const res = superstruct.create(unsafeRes, GetLeaderScheduleRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get leader schedule\");\n }\n return res.result;\n }\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(dataLength, commitment) {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest(\"getMinimumBalanceForRentExemption\", args);\n const res = superstruct.create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if (\"error\" in res) {\n console.warn(\"Unable to fetch minimum balance for rent exemption\");\n return 0;\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since RPC v1.9.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment) {\n const {\n context: context2,\n value: {\n blockhash\n }\n } = await this.getLatestBlockhashAndContext(commitment);\n const feeCalculator = {\n get lamportsPerSignature() {\n throw new Error(\"The capability to fetch `lamportsPerSignature` using the `getRecentBlockhash` API is no longer offered by the network. Use the `getFeeForMessage` API to obtain the fee for a given message.\");\n },\n toJSON() {\n return {};\n }\n };\n return {\n context: context2,\n value: {\n blockhash,\n feeCalculator\n }\n };\n }\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(limit) {\n const unsafeRes = await this._rpcRequest(\"getRecentPerformanceSamples\", limit ? [limit] : []);\n const res = superstruct.create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get recent performance samples\");\n }\n return res.result;\n }\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since RPC v1.9.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(blockhash, commitment) {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest(\"getFeeCalculatorForBlockhash\", args);\n const res = superstruct.create(unsafeRes, GetFeeCalculatorRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get fee calculator\");\n }\n const {\n context: context2,\n value\n } = res.result;\n return {\n context: context2,\n value: value !== null ? value.feeCalculator : null\n };\n }\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(message, commitment) {\n const wireMessage = toBuffer(message.serialize()).toString(\"base64\");\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest(\"getFeeForMessage\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(superstruct.nullable(superstruct.number())));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get fee for message\");\n }\n if (res.result === null) {\n throw new Error(\"invalid blockhash\");\n }\n return res.result;\n }\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(config2) {\n const accounts = config2?.lockedWritableAccounts?.map((key) => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest(\"getRecentPrioritizationFees\", args);\n const res = superstruct.create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get recent prioritization fees\");\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(commitment) {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e2) {\n throw new Error(\"failed to get recent blockhash: \" + e2);\n }\n }\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(commitmentOrConfig) {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e2) {\n throw new Error(\"failed to get recent blockhash: \" + e2);\n }\n }\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, void 0, config2);\n const unsafeRes = await this._rpcRequest(\"getLatestBlockhash\", args);\n const res = superstruct.create(unsafeRes, GetLatestBlockhashRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get latest blockhash\");\n }\n return res.result;\n }\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(blockhash, rawConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs([blockhash], commitment, void 0, config2);\n const unsafeRes = await this._rpcRequest(\"isBlockhashValid\", args);\n const res = superstruct.create(unsafeRes, IsBlockhashValidRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to determine if the blockhash `\" + blockhash + \"`is valid\");\n }\n return res.result;\n }\n /**\n * Fetch the node version\n */\n async getVersion() {\n const unsafeRes = await this._rpcRequest(\"getVersion\", []);\n const res = superstruct.create(unsafeRes, jsonRpcResult(VersionResult));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get version\");\n }\n return res.result;\n }\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash() {\n const unsafeRes = await this._rpcRequest(\"getGenesisHash\", []);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.string()));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get genesis hash\");\n }\n return res.result;\n }\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n // eslint-disable-next-line no-dupe-class-members\n // eslint-disable-next-line no-dupe-class-members\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(slot, rawConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, void 0, config2);\n const unsafeRes = await this._rpcRequest(\"getBlock\", args);\n try {\n switch (config2?.transactionDetails) {\n case \"accounts\": {\n const res = superstruct.create(unsafeRes, GetAccountsModeBlockRpcResult);\n if (\"error\" in res) {\n throw res.error;\n }\n return res.result;\n }\n case \"none\": {\n const res = superstruct.create(unsafeRes, GetNoneModeBlockRpcResult);\n if (\"error\" in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = superstruct.create(unsafeRes, GetBlockRpcResult);\n if (\"error\" in res) {\n throw res.error;\n }\n const {\n result\n } = res;\n return result ? {\n ...result,\n transactions: result.transactions.map(({\n transaction,\n meta,\n version: version7\n }) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(version7, transaction.message)\n },\n version: version7\n }))\n } : null;\n }\n }\n } catch (e2) {\n throw new SolanaJSONRPCError(e2, \"failed to get confirmed block\");\n }\n }\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n // eslint-disable-next-line no-dupe-class-members\n // eslint-disable-next-line no-dupe-class-members\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(slot, rawConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, \"jsonParsed\", config2);\n const unsafeRes = await this._rpcRequest(\"getBlock\", args);\n try {\n switch (config2?.transactionDetails) {\n case \"accounts\": {\n const res = superstruct.create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if (\"error\" in res) {\n throw res.error;\n }\n return res.result;\n }\n case \"none\": {\n const res = superstruct.create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if (\"error\" in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = superstruct.create(unsafeRes, GetParsedBlockRpcResult);\n if (\"error\" in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e2) {\n throw new SolanaJSONRPCError(e2, \"failed to get block\");\n }\n }\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(configOrCommitment) {\n let extra;\n let commitment;\n if (typeof configOrCommitment === \"string\") {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {\n commitment: c4,\n ...rest\n } = configOrCommitment;\n commitment = c4;\n extra = rest;\n }\n const args = this._buildArgs([], commitment, \"base64\", extra);\n const unsafeRes = await this._rpcRequest(\"getBlockProduction\", args);\n const res = superstruct.create(unsafeRes, BlockProductionResponseStruct);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get block production information\");\n }\n return res.result;\n }\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(signature2, rawConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed([signature2], commitment, void 0, config2);\n const unsafeRes = await this._rpcRequest(\"getTransaction\", args);\n const res = superstruct.create(unsafeRes, GetTransactionRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get transaction\");\n }\n const result = res.result;\n if (!result)\n return result;\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(result.version, result.transaction.message)\n }\n };\n }\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(signature2, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed([signature2], commitment, \"jsonParsed\", config2);\n const unsafeRes = await this._rpcRequest(\"getTransaction\", args);\n const res = superstruct.create(unsafeRes, GetParsedTransactionRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get transaction\");\n }\n return res.result;\n }\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(signatures, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map((signature2) => {\n const args = this._buildArgsAtLeastConfirmed([signature2], commitment, \"jsonParsed\", config2);\n return {\n methodName: \"getTransaction\",\n args\n };\n });\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes2) => {\n const res2 = superstruct.create(unsafeRes2, GetParsedTransactionRpcResult);\n if (\"error\" in res2) {\n throw new SolanaJSONRPCError(res2.error, \"failed to get transactions\");\n }\n return res2.result;\n });\n return res;\n }\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(signatures, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map((signature2) => {\n const args = this._buildArgsAtLeastConfirmed([signature2], commitment, void 0, config2);\n return {\n methodName: \"getTransaction\",\n args\n };\n });\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes2) => {\n const res2 = superstruct.create(unsafeRes2, GetTransactionRpcResult);\n if (\"error\" in res2) {\n throw new SolanaJSONRPCError(res2.error, \"failed to get transactions\");\n }\n const result = res2.result;\n if (!result)\n return result;\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(result.version, result.transaction.message)\n }\n };\n });\n return res;\n }\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(slot, commitment) {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest(\"getBlock\", args);\n const res = superstruct.create(unsafeRes, GetConfirmedBlockRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get confirmed block\");\n }\n const result = res.result;\n if (!result) {\n throw new Error(\"Confirmed block \" + slot + \" not found\");\n }\n const block = {\n ...result,\n transactions: result.transactions.map(({\n transaction,\n meta\n }) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message\n }\n };\n })\n };\n return {\n ...block,\n transactions: block.transactions.map(({\n transaction,\n meta\n }) => {\n return {\n meta,\n transaction: Transaction5.populate(transaction.message, transaction.signatures)\n };\n })\n };\n }\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(startSlot, endSlot, commitment) {\n const args = this._buildArgsAtLeastConfirmed(endSlot !== void 0 ? [startSlot, endSlot] : [startSlot], commitment);\n const unsafeRes = await this._rpcRequest(\"getBlocks\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.array(superstruct.number())));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get blocks\");\n }\n return res.result;\n }\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(slot, commitment) {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, void 0, {\n transactionDetails: \"signatures\",\n rewards: false\n });\n const unsafeRes = await this._rpcRequest(\"getBlock\", args);\n const res = superstruct.create(unsafeRes, GetBlockSignaturesRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get block\");\n }\n const result = res.result;\n if (!result) {\n throw new Error(\"Block \" + slot + \" not found\");\n }\n return result;\n }\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(slot, commitment) {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, void 0, {\n transactionDetails: \"signatures\",\n rewards: false\n });\n const unsafeRes = await this._rpcRequest(\"getBlock\", args);\n const res = superstruct.create(unsafeRes, GetBlockSignaturesRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get confirmed block\");\n }\n const result = res.result;\n if (!result) {\n throw new Error(\"Confirmed block \" + slot + \" not found\");\n }\n return result;\n }\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(signature2, commitment) {\n const args = this._buildArgsAtLeastConfirmed([signature2], commitment);\n const unsafeRes = await this._rpcRequest(\"getTransaction\", args);\n const res = superstruct.create(unsafeRes, GetTransactionRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get transaction\");\n }\n const result = res.result;\n if (!result)\n return result;\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction5.populate(message, signatures)\n };\n }\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(signature2, commitment) {\n const args = this._buildArgsAtLeastConfirmed([signature2], commitment, \"jsonParsed\");\n const unsafeRes = await this._rpcRequest(\"getTransaction\", args);\n const res = superstruct.create(unsafeRes, GetParsedTransactionRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get confirmed transaction\");\n }\n return res.result;\n }\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(signatures, commitment) {\n const batch = signatures.map((signature2) => {\n const args = this._buildArgsAtLeastConfirmed([signature2], commitment, \"jsonParsed\");\n return {\n methodName: \"getTransaction\",\n args\n };\n });\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes2) => {\n const res2 = superstruct.create(unsafeRes2, GetParsedTransactionRpcResult);\n if (\"error\" in res2) {\n throw new SolanaJSONRPCError(res2.error, \"failed to get confirmed transactions\");\n }\n return res2.result;\n });\n return res;\n }\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since RPC v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(address, startSlot, endSlot) {\n let options = {};\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!(\"until\" in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n try {\n const block = await this.getConfirmedBlockSignatures(startSlot, \"finalized\");\n if (block.signatures.length > 0) {\n options.until = block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes(\"skipped\")) {\n continue;\n } else {\n throw err;\n }\n }\n }\n let highestConfirmedRoot = await this.getSlot(\"finalized\");\n while (!(\"before\" in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before = block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes(\"skipped\")) {\n continue;\n } else {\n throw err;\n }\n }\n }\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(address, options);\n return confirmedSignatureInfo.map((info) => info.signature);\n }\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getSignaturesForAddress} instead.\n */\n async getConfirmedSignaturesForAddress2(address, options, commitment) {\n const args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, void 0, options);\n const unsafeRes = await this._rpcRequest(\"getConfirmedSignaturesForAddress2\", args);\n const res = superstruct.create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get confirmed signatures for address\");\n }\n return res.result;\n }\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(address, options, commitment) {\n const args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, void 0, options);\n const unsafeRes = await this._rpcRequest(\"getSignaturesForAddress\", args);\n const res = superstruct.create(unsafeRes, GetSignaturesForAddressRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get signatures for address\");\n }\n return res.result;\n }\n async getAddressLookupTable(accountKey, config2) {\n const {\n context: context2,\n value: accountInfo\n } = await this.getAccountInfoAndContext(accountKey, config2);\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data)\n });\n }\n return {\n context: context2,\n value\n };\n }\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(nonceAccount, commitmentOrConfig) {\n const {\n context: context2,\n value: accountInfo\n } = await this.getAccountInfoAndContext(nonceAccount, commitmentOrConfig);\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n return {\n context: context2,\n value\n };\n }\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(nonceAccount, commitmentOrConfig) {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig).then((x4) => x4.value).catch((e2) => {\n throw new Error(\"failed to get nonce for account \" + nonceAccount.toBase58() + \": \" + e2);\n });\n }\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(to, lamports) {\n const unsafeRes = await this._rpcRequest(\"requestAirdrop\", [to.toBase58(), lamports]);\n const res = superstruct.create(unsafeRes, RequestAirdropRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `airdrop to ${to.toBase58()} failed`);\n }\n return res.result;\n }\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(disableCache) {\n if (!disableCache) {\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n return await this._pollNewBlockhash();\n }\n /**\n * @internal\n */\n async _pollNewBlockhash() {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash ? cachedLatestBlockhash.blockhash : null;\n for (let i3 = 0; i3 < 50; i3++) {\n const latestBlockhash = await this.getLatestBlockhash(\"finalized\");\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: []\n };\n return latestBlockhash;\n }\n await sleep(MS_PER_SLOT / 2);\n }\n throw new Error(`Unable to obtain a new blockhash after ${Date.now() - startTime}ms`);\n } finally {\n this._pollingBlockhash = false;\n }\n }\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(config2) {\n const {\n commitment,\n config: configArg\n } = extractCommitmentFromConfig(config2);\n const args = this._buildArgs([], commitment, \"base64\", configArg);\n const unsafeRes = await this._rpcRequest(\"getStakeMinimumDelegation\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(superstruct.number()));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get stake minimum delegation`);\n }\n return res.result;\n }\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(transactionOrMessage, configOrSigners, includeAccounts) {\n if (\"message\" in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction2 = versionedTx.serialize();\n const encodedTransaction2 = buffer2.Buffer.from(wireTransaction2).toString(\"base64\");\n if (Array.isArray(configOrSigners) || includeAccounts !== void 0) {\n throw new Error(\"Invalid arguments\");\n }\n const config3 = configOrSigners || {};\n config3.encoding = \"base64\";\n if (!(\"commitment\" in config3)) {\n config3.commitment = this.commitment;\n }\n if (configOrSigners && typeof configOrSigners === \"object\" && \"innerInstructions\" in configOrSigners) {\n config3.innerInstructions = configOrSigners.innerInstructions;\n }\n const args2 = [encodedTransaction2, config3];\n const unsafeRes2 = await this._rpcRequest(\"simulateTransaction\", args2);\n const res2 = superstruct.create(unsafeRes2, SimulatedTransactionResponseStruct);\n if (\"error\" in res2) {\n throw new Error(\"failed to simulate transaction: \" + res2.error.message);\n }\n return res2.result;\n }\n let transaction;\n if (transactionOrMessage instanceof Transaction5) {\n let originalTx = transactionOrMessage;\n transaction = new Transaction5();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction5.populate(transactionOrMessage);\n transaction._message = transaction._json = void 0;\n }\n if (configOrSigners !== void 0 && !Array.isArray(configOrSigners)) {\n throw new Error(\"Invalid arguments\");\n }\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (; ; ) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(disableCache);\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n if (!signers)\n break;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error(\"!signature\");\n }\n const signature2 = transaction.signature.toString(\"base64\");\n if (!this._blockhashInfo.simulatedSignatures.includes(signature2) && !this._blockhashInfo.transactionSignatures.includes(signature2)) {\n this._blockhashInfo.simulatedSignatures.push(signature2);\n break;\n } else {\n disableCache = true;\n }\n }\n }\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString(\"base64\");\n const config2 = {\n encoding: \"base64\",\n commitment: this.commitment\n };\n if (includeAccounts) {\n const addresses4 = (Array.isArray(includeAccounts) ? includeAccounts : message.nonProgramIds()).map((key) => key.toBase58());\n config2[\"accounts\"] = {\n encoding: \"base64\",\n addresses: addresses4\n };\n }\n if (signers) {\n config2.sigVerify = true;\n }\n if (configOrSigners && typeof configOrSigners === \"object\" && \"innerInstructions\" in configOrSigners) {\n config2.innerInstructions = configOrSigners.innerInstructions;\n }\n const args = [encodedTransaction, config2];\n const unsafeRes = await this._rpcRequest(\"simulateTransaction\", args);\n const res = superstruct.create(unsafeRes, SimulatedTransactionResponseStruct);\n if (\"error\" in res) {\n let logs;\n if (\"data\" in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = \"\\n \";\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError({\n action: \"simulate\",\n signature: \"\",\n transactionMessage: res.error.message,\n logs\n });\n }\n return res.result;\n }\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(transaction, signersOrOptions, options) {\n if (\"version\" in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error(\"Invalid arguments\");\n }\n const wireTransaction2 = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction2, signersOrOptions);\n }\n if (signersOrOptions === void 0 || !Array.isArray(signersOrOptions)) {\n throw new Error(\"Invalid arguments\");\n }\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (; ; ) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(disableCache);\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error(\"!signature\");\n }\n const signature2 = transaction.signature.toString(\"base64\");\n if (!this._blockhashInfo.transactionSignatures.includes(signature2)) {\n this._blockhashInfo.transactionSignatures.push(signature2);\n break;\n } else {\n disableCache = true;\n }\n }\n }\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(rawTransaction, options) {\n const encodedTransaction = toBuffer(rawTransaction).toString(\"base64\");\n const result = await this.sendEncodedTransaction(encodedTransaction, options);\n return result;\n }\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(encodedTransaction, options) {\n const config2 = {\n encoding: \"base64\"\n };\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment = skipPreflight === true ? \"processed\" : options && options.preflightCommitment || this.commitment;\n if (options && options.maxRetries != null) {\n config2.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config2.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config2.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config2.preflightCommitment = preflightCommitment;\n }\n const args = [encodedTransaction, config2];\n const unsafeRes = await this._rpcRequest(\"sendTransaction\", args);\n const res = superstruct.create(unsafeRes, SendTransactionRpcResult);\n if (\"error\" in res) {\n let logs = void 0;\n if (\"data\" in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError({\n action: skipPreflight ? \"send\" : \"simulate\",\n signature: \"\",\n transactionMessage: res.error.message,\n logs\n });\n }\n return res.result;\n }\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n (async () => {\n try {\n await this._rpcWebSocket.notify(\"ping\");\n } catch {\n }\n })();\n }, 5e3);\n this._updateSubscriptions();\n }\n /**\n * @internal\n */\n _wsOnError(err) {\n this._rpcWebSocketConnected = false;\n console.error(\"ws error:\", err.message);\n }\n /**\n * @internal\n */\n _wsOnClose(code) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration = (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n if (code === 1e3) {\n this._updateSubscriptions();\n return;\n }\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(this._subscriptionsByHash).forEach(([hash3, subscription]) => {\n this._setSubscription(hash3, {\n ...subscription,\n state: \"pending\"\n });\n });\n }\n /**\n * @internal\n */\n _setSubscription(hash3, nextSubscription) {\n const prevState = this._subscriptionsByHash[hash3]?.state;\n this._subscriptionsByHash[hash3] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks = this._subscriptionStateChangeCallbacksByHash[hash3];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach((cb) => {\n try {\n cb(nextSubscription.state);\n } catch {\n }\n });\n }\n }\n }\n /**\n * @internal\n */\n _onSubscriptionStateChange(clientSubscriptionId, callback) {\n const hash3 = this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash3 == null) {\n return () => {\n };\n }\n const stateChangeCallbacks = this._subscriptionStateChangeCallbacksByHash[hash3] ||= /* @__PURE__ */ new Set();\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash3];\n }\n };\n }\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n if (err instanceof Error) {\n console.log(`Error when closing socket connection: ${err.message}`);\n }\n }\n }, 500);\n }\n return;\n }\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async (hash3) => {\n const subscription = this._subscriptionsByHash[hash3];\n if (subscription === void 0) {\n return;\n }\n switch (subscription.state) {\n case \"pending\":\n case \"unsubscribed\":\n if (subscription.callbacks.size === 0) {\n delete this._subscriptionsByHash[hash3];\n if (subscription.state === \"unsubscribed\") {\n delete this._subscriptionCallbacksByServerSubscriptionId[subscription.serverSubscriptionId];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {\n args,\n method\n } = subscription;\n try {\n this._setSubscription(hash3, {\n ...subscription,\n state: \"subscribing\"\n });\n const serverSubscriptionId = await this._rpcWebSocket.call(method, args);\n this._setSubscription(hash3, {\n ...subscription,\n serverSubscriptionId,\n state: \"subscribed\"\n });\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e2) {\n console.error(`Received ${e2 instanceof Error ? \"\" : \"JSON-RPC \"}error calling \\`${method}\\``, {\n args,\n error: e2\n });\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n this._setSubscription(hash3, {\n ...subscription,\n state: \"pending\"\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case \"subscribed\":\n if (subscription.callbacks.size === 0) {\n await (async () => {\n const {\n serverSubscriptionId,\n unsubscribeMethod\n } = subscription;\n if (this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)) {\n this._subscriptionsAutoDisposedByRpc.delete(serverSubscriptionId);\n } else {\n this._setSubscription(hash3, {\n ...subscription,\n state: \"unsubscribing\"\n });\n this._setSubscription(hash3, {\n ...subscription,\n state: \"unsubscribing\"\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [serverSubscriptionId]);\n } catch (e2) {\n if (e2 instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e2.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n this._setSubscription(hash3, {\n ...subscription,\n state: \"subscribed\"\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash3, {\n ...subscription,\n state: \"unsubscribed\"\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n }\n })\n );\n }\n /**\n * @internal\n */\n _handleServerNotification(serverSubscriptionId, callbackArgs) {\n const callbacks = this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === void 0) {\n return;\n }\n callbacks.forEach((cb) => {\n try {\n cb(\n ...callbackArgs\n );\n } catch (e2) {\n console.error(e2);\n }\n });\n }\n /**\n * @internal\n */\n _wsOnAccountNotification(notification) {\n const {\n result,\n subscription\n } = superstruct.create(notification, AccountNotificationResult);\n this._handleServerNotification(subscription, [result.value, result.context]);\n }\n /**\n * @internal\n */\n _makeSubscription(subscriptionConfig, args) {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash3 = fastStableStringify([subscriptionConfig.method, args]);\n const existingSubscription = this._subscriptionsByHash[hash3];\n if (existingSubscription === void 0) {\n this._subscriptionsByHash[hash3] = {\n ...subscriptionConfig,\n args,\n callbacks: /* @__PURE__ */ new Set([subscriptionConfig.callback]),\n state: \"pending\"\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash3;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash3];\n assert9(subscription !== void 0, `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`);\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param config\n * @return subscription id\n */\n /** @deprecated Instead, pass in an {@link AccountSubscriptionConfig} */\n // eslint-disable-next-line no-dupe-class-members\n // eslint-disable-next-line no-dupe-class-members\n onAccountChange(publicKey2, callback, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey2.toBase58()],\n commitment || this._commitment || \"finalized\",\n // Apply connection/server default.\n \"base64\",\n config2\n );\n return this._makeSubscription({\n callback,\n method: \"accountSubscribe\",\n unsubscribeMethod: \"accountUnsubscribe\"\n }, args);\n }\n /**\n * Deregister an account notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeAccountChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, \"account change\");\n }\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification) {\n const {\n result,\n subscription\n } = superstruct.create(notification, ProgramAccountNotificationResult);\n this._handleServerNotification(subscription, [{\n accountId: result.value.pubkey,\n accountInfo: result.value.account\n }, result.context]);\n }\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param config\n * @return subscription id\n */\n /** @deprecated Instead, pass in a {@link ProgramAccountSubscriptionConfig} */\n // eslint-disable-next-line no-dupe-class-members\n // eslint-disable-next-line no-dupe-class-members\n onProgramAccountChange(programId, callback, commitmentOrConfig, maybeFilters) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment || this._commitment || \"finalized\",\n // Apply connection/server default.\n \"base64\",\n config2 ? config2 : maybeFilters ? {\n filters: applyDefaultMemcmpEncodingToFilters(maybeFilters)\n } : void 0\n /* extra */\n );\n return this._makeSubscription({\n callback,\n method: \"programSubscribe\",\n unsubscribeMethod: \"programUnsubscribe\"\n }, args);\n }\n /**\n * Deregister an account notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeProgramAccountChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, \"program account change\");\n }\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(filter, callback, commitment) {\n const args = this._buildArgs(\n [typeof filter === \"object\" ? {\n mentions: [filter.toString()]\n } : filter],\n commitment || this._commitment || \"finalized\"\n // Apply connection/server default.\n );\n return this._makeSubscription({\n callback,\n method: \"logsSubscribe\",\n unsubscribeMethod: \"logsUnsubscribe\"\n }, args);\n }\n /**\n * Deregister a logs callback.\n *\n * @param clientSubscriptionId client subscription id to deregister.\n */\n async removeOnLogsListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, \"logs\");\n }\n /**\n * @internal\n */\n _wsOnLogsNotification(notification) {\n const {\n result,\n subscription\n } = superstruct.create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [result.value, result.context]);\n }\n /**\n * @internal\n */\n _wsOnSlotNotification(notification) {\n const {\n result,\n subscription\n } = superstruct.create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback) {\n return this._makeSubscription(\n {\n callback,\n method: \"slotSubscribe\",\n unsubscribeMethod: \"slotUnsubscribe\"\n },\n []\n /* args */\n );\n }\n /**\n * Deregister a slot notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeSlotChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, \"slot change\");\n }\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification) {\n const {\n result,\n subscription\n } = superstruct.create(notification, SlotUpdateNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback) {\n return this._makeSubscription(\n {\n callback,\n method: \"slotsUpdatesSubscribe\",\n unsubscribeMethod: \"slotsUpdatesUnsubscribe\"\n },\n []\n /* args */\n );\n }\n /**\n * Deregister a slot update notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeSlotUpdateListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, \"slot update\");\n }\n /**\n * @internal\n */\n async _unsubscribeClientSubscription(clientSubscriptionId, subscriptionName) {\n const dispose = this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId];\n if (dispose) {\n await dispose();\n } else {\n console.warn(`Ignored unsubscribe request because an active subscription with id \\`${clientSubscriptionId}\\` for '${subscriptionName}' events could not be found.`);\n }\n }\n _buildArgs(args, override, encoding, extra) {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(args, override, encoding, extra) {\n const commitment = override || this._commitment;\n if (commitment && ![\"confirmed\", \"finalized\"].includes(commitment)) {\n throw new Error(\"Using Connection with default commitment: `\" + this._commitment + \"`, but method requires at least `confirmed`\");\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification) {\n const {\n result,\n subscription\n } = superstruct.create(notification, SignatureNotificationResult);\n if (result.value !== \"receivedSignature\") {\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(subscription, result.value === \"receivedSignature\" ? [{\n type: \"received\"\n }, result.context] : [{\n type: \"status\",\n result: result.value\n }, result.context]);\n }\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(signature2, callback, commitment) {\n const args = this._buildArgs(\n [signature2],\n commitment || this._commitment || \"finalized\"\n // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription({\n callback: (notification, context2) => {\n if (notification.type === \"status\") {\n callback(notification.result, context2);\n try {\n this.removeSignatureListener(clientSubscriptionId);\n } catch (_err) {\n }\n }\n },\n method: \"signatureSubscribe\",\n unsubscribeMethod: \"signatureUnsubscribe\"\n }, args);\n return clientSubscriptionId;\n }\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(signature2, callback, options) {\n const {\n commitment,\n ...extra\n } = {\n ...options,\n commitment: options && options.commitment || this._commitment || \"finalized\"\n // Apply connection/server default.\n };\n const args = this._buildArgs([signature2], commitment, void 0, extra);\n const clientSubscriptionId = this._makeSubscription({\n callback: (notification, context2) => {\n callback(notification, context2);\n try {\n this.removeSignatureListener(clientSubscriptionId);\n } catch (_err) {\n }\n },\n method: \"signatureSubscribe\",\n unsubscribeMethod: \"signatureUnsubscribe\"\n }, args);\n return clientSubscriptionId;\n }\n /**\n * Deregister a signature notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeSignatureListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, \"signature result\");\n }\n /**\n * @internal\n */\n _wsOnRootNotification(notification) {\n const {\n result,\n subscription\n } = superstruct.create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback) {\n return this._makeSubscription(\n {\n callback,\n method: \"rootSubscribe\",\n unsubscribeMethod: \"rootUnsubscribe\"\n },\n []\n /* args */\n );\n }\n /**\n * Deregister a root notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeRootChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, \"root change\");\n }\n };\n var Keypair2 = class _Keypair {\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair) {\n this._keypair = void 0;\n this._keypair = keypair ?? generateKeypair();\n }\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate() {\n return new _Keypair(generateKeypair());\n }\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(secretKey, options) {\n if (secretKey.byteLength !== 64) {\n throw new Error(\"bad secret key size\");\n }\n const publicKey2 = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey2[ii] !== computedPublicKey[ii]) {\n throw new Error(\"provided secretKey is invalid\");\n }\n }\n }\n return new _Keypair({\n publicKey: publicKey2,\n secretKey\n });\n }\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed) {\n const publicKey2 = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey2, 32);\n return new _Keypair({\n publicKey: publicKey2,\n secretKey\n });\n }\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey() {\n return new PublicKey(this._keypair.publicKey);\n }\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey() {\n return new Uint8Array(this._keypair.secretKey);\n }\n };\n var LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), u64(\"recentSlot\"), BufferLayout__namespace.u8(\"bumpSeed\")])\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")])\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), u64(), BufferLayout__namespace.seq(publicKey(), BufferLayout__namespace.offset(BufferLayout__namespace.u32(), -8), \"addresses\")])\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")])\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")])\n }\n });\n var AddressLookupTableInstruction = class {\n /**\n * @internal\n */\n constructor() {\n }\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = BufferLayout__namespace.u32(\"instruction\");\n const index2 = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [layoutType, layout] of Object.entries(LOOKUP_TABLE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == index2) {\n type = layoutType;\n break;\n }\n }\n if (!type) {\n throw new Error(\"Invalid Instruction. Should be a LookupTable Instruction\");\n }\n return type;\n }\n static decodeCreateLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n const {\n recentSlot\n } = decodeData$1(LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable, instruction.data);\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot)\n };\n }\n static decodeExtendLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(`invalid instruction; found ${instruction.keys.length} keys, expected at least 2`);\n }\n const {\n addresses: addresses4\n } = decodeData$1(LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable, instruction.data);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys.length > 2 ? instruction.keys[2].pubkey : void 0,\n addresses: addresses4.map((buffer3) => new PublicKey(buffer3))\n };\n }\n static decodeCloseLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey\n };\n }\n static decodeFreezeLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey\n };\n }\n static decodeDeactivateLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey\n };\n }\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error(\"invalid instruction; programId is not AddressLookupTable Program\");\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n };\n var AddressLookupTableProgram = class {\n /**\n * @internal\n */\n constructor() {\n }\n static createLookupTable(params) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync([params.authority.toBuffer(), codecsNumbers.getU64Encoder().encode(params.recentSlot)], this.programId);\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData3(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed\n });\n const keys = [{\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n }];\n return [new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n }), lookupTableAddress];\n }\n static freezeLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData3(type);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n static extendLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData3(type, {\n addresses: params.addresses.map((addr) => addr.toBytes())\n });\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n if (params.payer) {\n keys.push({\n pubkey: params.payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n });\n }\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n static deactivateLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData3(type);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n static closeLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData3(type);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n };\n AddressLookupTableProgram.programId = new PublicKey(\"AddressLookupTab1e1111111111111111111111111\");\n var ComputeBudgetInstruction = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = BufferLayout__namespace.u8(\"instruction\");\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error(\"Instruction type incorrect; not a ComputeBudgetInstruction\");\n }\n return type;\n }\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n units,\n additionalFee\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits, instruction.data);\n return {\n units,\n additionalFee\n };\n }\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n bytes\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame, instruction.data);\n return {\n bytes\n };\n }\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n units\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit, instruction.data);\n return {\n units\n };\n }\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n microLamports\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice, instruction.data);\n return {\n microLamports\n };\n }\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error(\"invalid instruction; programId is not ComputeBudgetProgram\");\n }\n }\n };\n var COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze({\n RequestUnits: {\n index: 0,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"instruction\"), BufferLayout__namespace.u32(\"units\"), BufferLayout__namespace.u32(\"additionalFee\")])\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"instruction\"), BufferLayout__namespace.u32(\"bytes\")])\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"instruction\"), BufferLayout__namespace.u32(\"units\")])\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"instruction\"), u64(\"microLamports\")])\n }\n });\n var ComputeBudgetProgram = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the Compute Budget program\n */\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData3(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static requestHeapFrame(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData3(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static setComputeUnitLimit(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData3(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static setComputeUnitPrice(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData3(type, {\n microLamports: BigInt(params.microLamports)\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n };\n ComputeBudgetProgram.programId = new PublicKey(\"ComputeBudget111111111111111111111111111111\");\n var PRIVATE_KEY_BYTES$1 = 64;\n var PUBLIC_KEY_BYTES$1 = 32;\n var SIGNATURE_BYTES = 64;\n var ED25519_INSTRUCTION_LAYOUT = BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"numSignatures\"), BufferLayout__namespace.u8(\"padding\"), BufferLayout__namespace.u16(\"signatureOffset\"), BufferLayout__namespace.u16(\"signatureInstructionIndex\"), BufferLayout__namespace.u16(\"publicKeyOffset\"), BufferLayout__namespace.u16(\"publicKeyInstructionIndex\"), BufferLayout__namespace.u16(\"messageDataOffset\"), BufferLayout__namespace.u16(\"messageDataSize\"), BufferLayout__namespace.u16(\"messageInstructionIndex\")]);\n var Ed25519Program = class _Ed25519Program {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the ed25519 program\n */\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(params) {\n const {\n publicKey: publicKey2,\n message,\n signature: signature2,\n instructionIndex\n } = params;\n assert9(publicKey2.length === PUBLIC_KEY_BYTES$1, `Public Key must be ${PUBLIC_KEY_BYTES$1} bytes but received ${publicKey2.length} bytes`);\n assert9(signature2.length === SIGNATURE_BYTES, `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature2.length} bytes`);\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey2.length;\n const messageDataOffset = signatureOffset + signature2.length;\n const numSignatures = 1;\n const instructionData = buffer2.Buffer.alloc(messageDataOffset + message.length);\n const index2 = instructionIndex == null ? 65535 : instructionIndex;\n ED25519_INSTRUCTION_LAYOUT.encode({\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index2,\n publicKeyOffset,\n publicKeyInstructionIndex: index2,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index2\n }, instructionData);\n instructionData.fill(publicKey2, publicKeyOffset);\n instructionData.fill(signature2, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n return new TransactionInstruction({\n keys: [],\n programId: _Ed25519Program.programId,\n data: instructionData\n });\n }\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(params) {\n const {\n privateKey,\n message,\n instructionIndex\n } = params;\n assert9(privateKey.length === PRIVATE_KEY_BYTES$1, `Private key must be ${PRIVATE_KEY_BYTES$1} bytes but received ${privateKey.length} bytes`);\n try {\n const keypair = Keypair2.fromSecretKey(privateKey);\n const publicKey2 = keypair.publicKey.toBytes();\n const signature2 = sign3(message, keypair.secretKey);\n return this.createInstructionWithPublicKey({\n publicKey: publicKey2,\n message,\n signature: signature2,\n instructionIndex\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n };\n Ed25519Program.programId = new PublicKey(\"Ed25519SigVerify111111111111111111111111111\");\n var ecdsaSign = (msgHash, privKey) => {\n const signature2 = secp256k12.secp256k1.sign(msgHash, privKey);\n return [signature2.toCompactRawBytes(), signature2.recovery];\n };\n secp256k12.secp256k1.utils.isValidPrivateKey;\n var publicKeyCreate = secp256k12.secp256k1.getPublicKey;\n var PRIVATE_KEY_BYTES = 32;\n var ETHEREUM_ADDRESS_BYTES = 20;\n var PUBLIC_KEY_BYTES = 64;\n var SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n var SECP256K1_INSTRUCTION_LAYOUT = BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"numSignatures\"), BufferLayout__namespace.u16(\"signatureOffset\"), BufferLayout__namespace.u8(\"signatureInstructionIndex\"), BufferLayout__namespace.u16(\"ethAddressOffset\"), BufferLayout__namespace.u8(\"ethAddressInstructionIndex\"), BufferLayout__namespace.u16(\"messageDataOffset\"), BufferLayout__namespace.u16(\"messageDataSize\"), BufferLayout__namespace.u8(\"messageInstructionIndex\"), BufferLayout__namespace.blob(20, \"ethAddress\"), BufferLayout__namespace.blob(64, \"signature\"), BufferLayout__namespace.u8(\"recoveryId\")]);\n var Secp256k1Program = class _Secp256k1Program {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the secp256k1 program\n */\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(publicKey2) {\n assert9(publicKey2.length === PUBLIC_KEY_BYTES, `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey2.length} bytes`);\n try {\n return buffer2.Buffer.from(sha3.keccak_256(toBuffer(publicKey2))).slice(-ETHEREUM_ADDRESS_BYTES);\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(params) {\n const {\n publicKey: publicKey2,\n message,\n signature: signature2,\n recoveryId,\n instructionIndex\n } = params;\n return _Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: _Secp256k1Program.publicKeyToEthAddress(publicKey2),\n message,\n signature: signature2,\n recoveryId,\n instructionIndex\n });\n }\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(params) {\n const {\n ethAddress: rawAddress,\n message,\n signature: signature2,\n recoveryId,\n instructionIndex = 0\n } = params;\n let ethAddress2;\n if (typeof rawAddress === \"string\") {\n if (rawAddress.startsWith(\"0x\")) {\n ethAddress2 = buffer2.Buffer.from(rawAddress.substr(2), \"hex\");\n } else {\n ethAddress2 = buffer2.Buffer.from(rawAddress, \"hex\");\n }\n } else {\n ethAddress2 = rawAddress;\n }\n assert9(ethAddress2.length === ETHEREUM_ADDRESS_BYTES, `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress2.length} bytes`);\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress2.length;\n const messageDataOffset = signatureOffset + signature2.length + 1;\n const numSignatures = 1;\n const instructionData = buffer2.Buffer.alloc(SECP256K1_INSTRUCTION_LAYOUT.span + message.length);\n SECP256K1_INSTRUCTION_LAYOUT.encode({\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature2),\n ethAddress: toBuffer(ethAddress2),\n recoveryId\n }, instructionData);\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n return new TransactionInstruction({\n keys: [],\n programId: _Secp256k1Program.programId,\n data: instructionData\n });\n }\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(params) {\n const {\n privateKey: pkey,\n message,\n instructionIndex\n } = params;\n assert9(pkey.length === PRIVATE_KEY_BYTES, `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`);\n try {\n const privateKey = toBuffer(pkey);\n const publicKey2 = publicKeyCreate(\n privateKey,\n false\n /* isCompressed */\n ).slice(1);\n const messageHash = buffer2.Buffer.from(sha3.keccak_256(toBuffer(message)));\n const [signature2, recoveryId] = ecdsaSign(messageHash, privateKey);\n return this.createInstructionWithPublicKey({\n publicKey: publicKey2,\n message,\n signature: signature2,\n recoveryId,\n instructionIndex\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n };\n Secp256k1Program.programId = new PublicKey(\"KeccakSecp256k11111111111111111111111111111\");\n var _Lockup;\n var STAKE_CONFIG_ID = new PublicKey(\"StakeConfig11111111111111111111111111111111\");\n var Authorized = class {\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker, withdrawer) {\n this.staker = void 0;\n this.withdrawer = void 0;\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n };\n var Lockup = class {\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp, epoch, custodian) {\n this.unixTimestamp = void 0;\n this.epoch = void 0;\n this.custodian = void 0;\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n /**\n * Default, inactive Lockup value\n */\n };\n _Lockup = Lockup;\n Lockup.default = new _Lockup(0, 0, PublicKey.default);\n var StakeInstruction = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = BufferLayout__namespace.u32(\"instruction\");\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error(\"Instruction type incorrect; not a StakeInstruction\");\n }\n return type;\n }\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n authorized: authorized2,\n lockup: lockup2\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Initialize, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(new PublicKey(authorized2.staker), new PublicKey(authorized2.withdrawer)),\n lockup: new Lockup(lockup2.unixTimestamp, lockup2.epoch, new PublicKey(lockup2.custodian))\n };\n }\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey\n };\n }\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n newAuthorized,\n stakeAuthorizationType\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Authorize, instruction.data);\n const o5 = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType\n }\n };\n if (instruction.keys.length > 3) {\n o5.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o5;\n }\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed, instruction.data);\n const o5 = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType\n }\n };\n if (instruction.keys.length > 3) {\n o5.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o5;\n }\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n lamports\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Split, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports\n };\n }\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey\n };\n }\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {\n lamports\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Withdraw, instruction.data);\n const o5 = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports\n };\n if (instruction.keys.length > 5) {\n o5.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o5;\n }\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey\n };\n }\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error(\"invalid instruction; programId is not StakeProgram\");\n }\n }\n /**\n * @internal\n */\n static checkKeyLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n };\n var STAKE_INSTRUCTION_LAYOUTS = Object.freeze({\n Initialize: {\n index: 0,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), authorized(), lockup()])\n },\n Authorize: {\n index: 1,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), publicKey(\"newAuthorized\"), BufferLayout__namespace.u32(\"stakeAuthorizationType\")])\n },\n Delegate: {\n index: 2,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")])\n },\n Split: {\n index: 3,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), BufferLayout__namespace.ns64(\"lamports\")])\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), BufferLayout__namespace.ns64(\"lamports\")])\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")])\n },\n Merge: {\n index: 7,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")])\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), publicKey(\"newAuthorized\"), BufferLayout__namespace.u32(\"stakeAuthorizationType\"), rustString(\"authoritySeed\"), publicKey(\"authorityOwner\")])\n }\n });\n var StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0\n },\n Withdrawer: {\n index: 1\n }\n });\n var StakeProgram = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the Stake program\n */\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params) {\n const {\n stakePubkey,\n authorized: authorized2,\n lockup: maybeLockup\n } = params;\n const lockup2 = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData3(type, {\n authorized: {\n staker: toBuffer(authorized2.staker.toBuffer()),\n withdrawer: toBuffer(authorized2.withdrawer.toBuffer())\n },\n lockup: {\n unixTimestamp: lockup2.unixTimestamp,\n epoch: lockup2.epoch,\n custodian: toBuffer(lockup2.custodian.toBuffer())\n }\n });\n const instructionData = {\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(params) {\n const transaction = new Transaction5();\n transaction.add(SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n const {\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n } = params;\n return transaction.add(this.initialize({\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n }));\n }\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params) {\n const transaction = new Transaction5();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n const {\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n } = params;\n return transaction.add(this.initialize({\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n }));\n }\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n votePubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData3(type);\n return new Transaction5().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: votePubkey,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: STAKE_CONFIG_ID,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData3(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction5().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params) {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData3(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer())\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorityBase,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction5().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * @internal\n */\n static splitInstruction(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData3(type, {\n lamports\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: splitStakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params, rentExemptReserve) {\n const transaction = new Transaction5();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: rentExemptReserve,\n space: this.space,\n programId: this.programId\n }));\n return transaction.add(this.splitInstruction(params));\n }\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params, rentExemptReserve) {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports\n } = params;\n const transaction = new Transaction5();\n transaction.add(SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId\n }));\n if (rentExemptReserve && rentExemptReserve > 0) {\n transaction.add(SystemProgram.transfer({\n fromPubkey: params.authorizedPubkey,\n toPubkey: splitStakePubkey,\n lamports: rentExemptReserve\n }));\n }\n return transaction.add(this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports\n }));\n }\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params) {\n const {\n stakePubkey,\n sourceStakePubKey,\n authorizedPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData3(type);\n return new Transaction5().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: sourceStakePubKey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n toPubkey,\n lamports,\n custodianPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData3(type, {\n lamports\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction5().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params) {\n const {\n stakePubkey,\n authorizedPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData3(type);\n return new Transaction5().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n };\n StakeProgram.programId = new PublicKey(\"Stake11111111111111111111111111111111111111\");\n StakeProgram.space = 200;\n var VoteInit = class {\n /** [0, 100] */\n constructor(nodePubkey, authorizedVoter, authorizedWithdrawer, commission) {\n this.nodePubkey = void 0;\n this.authorizedVoter = void 0;\n this.authorizedWithdrawer = void 0;\n this.commission = void 0;\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n };\n var VoteInstruction = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = BufferLayout__namespace.u32(\"instruction\");\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error(\"Instruction type incorrect; not a VoteInstruction\");\n }\n return type;\n }\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n const {\n voteInit: voteInit2\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.InitializeAccount, instruction.data);\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(new PublicKey(voteInit2.nodePubkey), new PublicKey(voteInit2.authorizedVoter), new PublicKey(voteInit2.authorizedWithdrawer), voteInit2.commission)\n };\n }\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n newAuthorized,\n voteAuthorizationType\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.Authorize, instruction.data);\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType\n }\n };\n }\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType\n }\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed, instruction.data);\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(currentAuthorityDerivedKeyOwnerPubkey),\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType\n },\n votePubkey: instruction.keys[0].pubkey\n };\n }\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n lamports\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.Withdraw, instruction.data);\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey\n };\n }\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error(\"invalid instruction; programId is not VoteProgram\");\n }\n }\n /**\n * @internal\n */\n static checkKeyLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n };\n var VOTE_INSTRUCTION_LAYOUTS = Object.freeze({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), voteInit()])\n },\n Authorize: {\n index: 1,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), publicKey(\"newAuthorized\"), BufferLayout__namespace.u32(\"voteAuthorizationType\")])\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), BufferLayout__namespace.ns64(\"lamports\")])\n },\n UpdateValidatorIdentity: {\n index: 4,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")])\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), voteAuthorizeWithSeedArgs()])\n }\n });\n var VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0\n },\n Withdrawer: {\n index: 1\n }\n });\n var VoteProgram = class _VoteProgram {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the Vote program\n */\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(params) {\n const {\n votePubkey,\n nodePubkey,\n voteInit: voteInit2\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData3(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit2.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit2.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(voteInit2.authorizedWithdrawer.toBuffer()),\n commission: voteInit2.commission\n }\n });\n const instructionData = {\n keys: [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: nodePubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params) {\n const transaction = new Transaction5();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n return transaction.add(this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit\n }));\n }\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params) {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData3(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction5().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params) {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData3(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(currentAuthorityDerivedKeyOwnerPubkey.toBuffer()),\n currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index\n }\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction5().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params) {\n const {\n votePubkey,\n authorizedWithdrawerPubkey,\n lamports,\n toPubkey\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData3(type, {\n lamports\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedWithdrawerPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction5().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(params, currentVoteAccountBalance, rentExemptMinimum) {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\"Withdraw will leave vote account with insufficient funds.\");\n }\n return _VoteProgram.withdraw(params);\n }\n /**\n * Generate a transaction to update the validator identity (node pubkey) of a Vote account.\n */\n static updateValidatorIdentity(params) {\n const {\n votePubkey,\n authorizedWithdrawerPubkey,\n nodePubkey\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.UpdateValidatorIdentity;\n const data = encodeData3(type);\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: nodePubkey,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: authorizedWithdrawerPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction5().add({\n keys,\n programId: this.programId,\n data\n });\n }\n };\n VoteProgram.programId = new PublicKey(\"Vote111111111111111111111111111111111111111\");\n VoteProgram.space = 3762;\n var VALIDATOR_INFO_KEY = new PublicKey(\"Va1idator1nfo111111111111111111111111111111\");\n var InfoString = superstruct.type({\n name: superstruct.string(),\n website: superstruct.optional(superstruct.string()),\n details: superstruct.optional(superstruct.string()),\n iconUrl: superstruct.optional(superstruct.string()),\n keybaseUsername: superstruct.optional(superstruct.string())\n });\n var ValidatorInfo = class _ValidatorInfo {\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key, info) {\n this.key = void 0;\n this.info = void 0;\n this.key = key;\n this.info = info;\n }\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(buffer$1) {\n let byteArray = [...buffer$1];\n const configKeyCount = decodeLength(byteArray);\n if (configKeyCount !== 2)\n return null;\n const configKeys = [];\n for (let i3 = 0; i3 < 2; i3++) {\n const publicKey2 = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));\n const isSigner = guardedShift(byteArray) === 1;\n configKeys.push({\n publicKey: publicKey2,\n isSigner\n });\n }\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo = rustString().decode(buffer2.Buffer.from(byteArray));\n const info = JSON.parse(rawInfo);\n superstruct.assert(info, InfoString);\n return new _ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n return null;\n }\n };\n var VOTE_PROGRAM_ID = new PublicKey(\"Vote111111111111111111111111111111111111111\");\n var VoteAccountLayout = BufferLayout__namespace.struct([\n publicKey(\"nodePubkey\"),\n publicKey(\"authorizedWithdrawer\"),\n BufferLayout__namespace.u8(\"commission\"),\n BufferLayout__namespace.nu64(),\n // votes.length\n BufferLayout__namespace.seq(BufferLayout__namespace.struct([BufferLayout__namespace.nu64(\"slot\"), BufferLayout__namespace.u32(\"confirmationCount\")]), BufferLayout__namespace.offset(BufferLayout__namespace.u32(), -8), \"votes\"),\n BufferLayout__namespace.u8(\"rootSlotValid\"),\n BufferLayout__namespace.nu64(\"rootSlot\"),\n BufferLayout__namespace.nu64(),\n // authorizedVoters.length\n BufferLayout__namespace.seq(BufferLayout__namespace.struct([BufferLayout__namespace.nu64(\"epoch\"), publicKey(\"authorizedVoter\")]), BufferLayout__namespace.offset(BufferLayout__namespace.u32(), -8), \"authorizedVoters\"),\n BufferLayout__namespace.struct([BufferLayout__namespace.seq(BufferLayout__namespace.struct([publicKey(\"authorizedPubkey\"), BufferLayout__namespace.nu64(\"epochOfLastAuthorizedSwitch\"), BufferLayout__namespace.nu64(\"targetEpoch\")]), 32, \"buf\"), BufferLayout__namespace.nu64(\"idx\"), BufferLayout__namespace.u8(\"isEmpty\")], \"priorVoters\"),\n BufferLayout__namespace.nu64(),\n // epochCredits.length\n BufferLayout__namespace.seq(BufferLayout__namespace.struct([BufferLayout__namespace.nu64(\"epoch\"), BufferLayout__namespace.nu64(\"credits\"), BufferLayout__namespace.nu64(\"prevCredits\")]), BufferLayout__namespace.offset(BufferLayout__namespace.u32(), -8), \"epochCredits\"),\n BufferLayout__namespace.struct([BufferLayout__namespace.nu64(\"slot\"), BufferLayout__namespace.nu64(\"timestamp\")], \"lastTimestamp\")\n ]);\n var VoteAccount = class _VoteAccount {\n /**\n * @internal\n */\n constructor(args) {\n this.nodePubkey = void 0;\n this.authorizedWithdrawer = void 0;\n this.commission = void 0;\n this.rootSlot = void 0;\n this.votes = void 0;\n this.authorizedVoters = void 0;\n this.priorVoters = void 0;\n this.epochCredits = void 0;\n this.lastTimestamp = void 0;\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(buffer3) {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer3), versionOffset);\n let rootSlot = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n return new _VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp\n });\n }\n };\n function parseAuthorizedVoter({\n authorizedVoter,\n epoch\n }) {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter)\n };\n }\n function parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch\n }) {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch\n };\n }\n function getPriorVoters({\n buf,\n idx,\n isEmpty\n }) {\n if (isEmpty) {\n return [];\n }\n return [...buf.slice(idx + 1).map(parsePriorVoters), ...buf.slice(0, idx).map(parsePriorVoters)];\n }\n var endpoint = {\n http: {\n devnet: \"http://api.devnet.solana.com\",\n testnet: \"http://api.testnet.solana.com\",\n \"mainnet-beta\": \"http://api.mainnet-beta.solana.com/\"\n },\n https: {\n devnet: \"https://api.devnet.solana.com\",\n testnet: \"https://api.testnet.solana.com\",\n \"mainnet-beta\": \"https://api.mainnet-beta.solana.com/\"\n }\n };\n function clusterApiUrl2(cluster, tls) {\n const key = tls === false ? \"http\" : \"https\";\n if (!cluster) {\n return endpoint[key][\"devnet\"];\n }\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n }\n async function sendAndConfirmRawTransaction(connection, rawTransaction, confirmationStrategyOrConfirmOptions, maybeConfirmOptions) {\n let confirmationStrategy;\n let options;\n if (confirmationStrategyOrConfirmOptions && Object.prototype.hasOwnProperty.call(confirmationStrategyOrConfirmOptions, \"lastValidBlockHeight\")) {\n confirmationStrategy = confirmationStrategyOrConfirmOptions;\n options = maybeConfirmOptions;\n } else if (confirmationStrategyOrConfirmOptions && Object.prototype.hasOwnProperty.call(confirmationStrategyOrConfirmOptions, \"nonceValue\")) {\n confirmationStrategy = confirmationStrategyOrConfirmOptions;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot\n };\n const signature2 = await connection.sendRawTransaction(rawTransaction, sendOptions);\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy ? connection.confirmTransaction(confirmationStrategy, commitment) : connection.confirmTransaction(signature2, commitment);\n const status = (await confirmationPromise).value;\n if (status.err) {\n if (signature2 != null) {\n throw new SendTransactionError({\n action: sendOptions?.skipPreflight ? \"send\" : \"simulate\",\n signature: signature2,\n transactionMessage: `Status: (${JSON.stringify(status)})`\n });\n }\n throw new Error(`Raw transaction ${signature2} failed (${JSON.stringify(status)})`);\n }\n return signature2;\n }\n var LAMPORTS_PER_SOL = 1e9;\n exports3.Account = Account;\n exports3.AddressLookupTableAccount = AddressLookupTableAccount;\n exports3.AddressLookupTableInstruction = AddressLookupTableInstruction;\n exports3.AddressLookupTableProgram = AddressLookupTableProgram;\n exports3.Authorized = Authorized;\n exports3.BLOCKHASH_CACHE_TIMEOUT_MS = BLOCKHASH_CACHE_TIMEOUT_MS;\n exports3.BPF_LOADER_DEPRECATED_PROGRAM_ID = BPF_LOADER_DEPRECATED_PROGRAM_ID;\n exports3.BPF_LOADER_PROGRAM_ID = BPF_LOADER_PROGRAM_ID;\n exports3.BpfLoader = BpfLoader;\n exports3.COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS;\n exports3.ComputeBudgetInstruction = ComputeBudgetInstruction;\n exports3.ComputeBudgetProgram = ComputeBudgetProgram;\n exports3.Connection = Connection2;\n exports3.Ed25519Program = Ed25519Program;\n exports3.Enum = Enum;\n exports3.EpochSchedule = EpochSchedule;\n exports3.FeeCalculatorLayout = FeeCalculatorLayout;\n exports3.Keypair = Keypair2;\n exports3.LAMPORTS_PER_SOL = LAMPORTS_PER_SOL;\n exports3.LOOKUP_TABLE_INSTRUCTION_LAYOUTS = LOOKUP_TABLE_INSTRUCTION_LAYOUTS;\n exports3.Loader = Loader;\n exports3.Lockup = Lockup;\n exports3.MAX_SEED_LENGTH = MAX_SEED_LENGTH;\n exports3.Message = Message;\n exports3.MessageAccountKeys = MessageAccountKeys;\n exports3.MessageV0 = MessageV0;\n exports3.NONCE_ACCOUNT_LENGTH = NONCE_ACCOUNT_LENGTH;\n exports3.NonceAccount = NonceAccount;\n exports3.PACKET_DATA_SIZE = PACKET_DATA_SIZE;\n exports3.PUBLIC_KEY_LENGTH = PUBLIC_KEY_LENGTH;\n exports3.PublicKey = PublicKey;\n exports3.SIGNATURE_LENGTH_IN_BYTES = SIGNATURE_LENGTH_IN_BYTES;\n exports3.SOLANA_SCHEMA = SOLANA_SCHEMA;\n exports3.STAKE_CONFIG_ID = STAKE_CONFIG_ID;\n exports3.STAKE_INSTRUCTION_LAYOUTS = STAKE_INSTRUCTION_LAYOUTS;\n exports3.SYSTEM_INSTRUCTION_LAYOUTS = SYSTEM_INSTRUCTION_LAYOUTS;\n exports3.SYSVAR_CLOCK_PUBKEY = SYSVAR_CLOCK_PUBKEY;\n exports3.SYSVAR_EPOCH_SCHEDULE_PUBKEY = SYSVAR_EPOCH_SCHEDULE_PUBKEY;\n exports3.SYSVAR_INSTRUCTIONS_PUBKEY = SYSVAR_INSTRUCTIONS_PUBKEY;\n exports3.SYSVAR_RECENT_BLOCKHASHES_PUBKEY = SYSVAR_RECENT_BLOCKHASHES_PUBKEY;\n exports3.SYSVAR_RENT_PUBKEY = SYSVAR_RENT_PUBKEY;\n exports3.SYSVAR_REWARDS_PUBKEY = SYSVAR_REWARDS_PUBKEY;\n exports3.SYSVAR_SLOT_HASHES_PUBKEY = SYSVAR_SLOT_HASHES_PUBKEY;\n exports3.SYSVAR_SLOT_HISTORY_PUBKEY = SYSVAR_SLOT_HISTORY_PUBKEY;\n exports3.SYSVAR_STAKE_HISTORY_PUBKEY = SYSVAR_STAKE_HISTORY_PUBKEY;\n exports3.Secp256k1Program = Secp256k1Program;\n exports3.SendTransactionError = SendTransactionError;\n exports3.SolanaJSONRPCError = SolanaJSONRPCError;\n exports3.SolanaJSONRPCErrorCode = SolanaJSONRPCErrorCode;\n exports3.StakeAuthorizationLayout = StakeAuthorizationLayout;\n exports3.StakeInstruction = StakeInstruction;\n exports3.StakeProgram = StakeProgram;\n exports3.Struct = Struct;\n exports3.SystemInstruction = SystemInstruction;\n exports3.SystemProgram = SystemProgram;\n exports3.Transaction = Transaction5;\n exports3.TransactionExpiredBlockheightExceededError = TransactionExpiredBlockheightExceededError;\n exports3.TransactionExpiredNonceInvalidError = TransactionExpiredNonceInvalidError;\n exports3.TransactionExpiredTimeoutError = TransactionExpiredTimeoutError;\n exports3.TransactionInstruction = TransactionInstruction;\n exports3.TransactionMessage = TransactionMessage;\n exports3.TransactionStatus = TransactionStatus;\n exports3.VALIDATOR_INFO_KEY = VALIDATOR_INFO_KEY;\n exports3.VERSION_PREFIX_MASK = VERSION_PREFIX_MASK;\n exports3.VOTE_PROGRAM_ID = VOTE_PROGRAM_ID;\n exports3.ValidatorInfo = ValidatorInfo;\n exports3.VersionedMessage = VersionedMessage;\n exports3.VersionedTransaction = VersionedTransaction4;\n exports3.VoteAccount = VoteAccount;\n exports3.VoteAuthorizationLayout = VoteAuthorizationLayout;\n exports3.VoteInit = VoteInit;\n exports3.VoteInstruction = VoteInstruction;\n exports3.VoteProgram = VoteProgram;\n exports3.clusterApiUrl = clusterApiUrl2;\n exports3.sendAndConfirmRawTransaction = sendAndConfirmRawTransaction;\n exports3.sendAndConfirmTransaction = sendAndConfirmTransaction;\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/lit-actions/generated/common/batchGenerateEncryptedKeys-metadata.json\n var require_batchGenerateEncryptedKeys_metadata = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/lit-actions/generated/common/batchGenerateEncryptedKeys-metadata.json\"(exports3, module) {\n module.exports = {\n ipfsCid: \"QmPFuLy3qYxXQvxfaswcXbgxYguEAS51Wo1GQYyGaAV9U2\"\n };\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/lit-actions/generated/solana/generateEncryptedSolanaPrivateKey-metadata.json\n var require_generateEncryptedSolanaPrivateKey_metadata = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/lit-actions/generated/solana/generateEncryptedSolanaPrivateKey-metadata.json\"(exports3, module) {\n module.exports = {\n ipfsCid: \"QmQg5uApmG88LTqFtvWzKYgkix2nSKjQ1NvERBeFyjdJVf\"\n };\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/lit-actions-client/utils.js\n var require_utils14 = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/lit-actions-client/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.postLitActionValidation = postLitActionValidation;\n exports3.getLitActionCid = getLitActionCid;\n exports3.getLitActionCommonCid = getLitActionCommonCid;\n var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));\n var batchGenerateEncryptedKeys_metadata_json_1 = tslib_1.__importDefault(require_batchGenerateEncryptedKeys_metadata());\n var generateEncryptedSolanaPrivateKey_metadata_json_1 = tslib_1.__importDefault(require_generateEncryptedSolanaPrivateKey_metadata());\n function postLitActionValidation(result) {\n if (!result) {\n throw new Error(\"There was an unknown error running the Lit Action.\");\n }\n const { response } = result;\n if (!response) {\n throw new Error(`Expected \"response\" in Lit Action result: ${JSON.stringify(result)}`);\n }\n if (typeof response !== \"string\") {\n throw new Error(`Lit Action should return a string response: ${JSON.stringify(result)}`);\n }\n if (!result.success) {\n throw new Error(`Expected \"success\" in res: ${JSON.stringify(result)}`);\n }\n if (response.startsWith(\"Error:\")) {\n throw new Error(`Error executing the Signing Lit Action: ${response}`);\n }\n return response;\n }\n function assertNetworkIsValid(network) {\n const validNetworks = [\"solana\"];\n if (!validNetworks.includes(network)) {\n throw new Error(`Invalid network: ${network}. Must be one of ${validNetworks.join(\", \")}.`);\n }\n }\n function getLitActionCid(network, actionType) {\n assertNetworkIsValid(network);\n if (network === \"solana\") {\n switch (actionType) {\n case \"generateEncryptedKey\":\n return generateEncryptedSolanaPrivateKey_metadata_json_1.default.ipfsCid;\n default:\n throw new Error(`Unsupported action type for Solana: ${actionType}`);\n }\n }\n throw new Error(`Unsupported network: ${network}`);\n }\n function getLitActionCommonCid(actionType) {\n switch (actionType) {\n case \"batchGenerateEncryptedKeys\":\n return batchGenerateEncryptedKeys_metadata_json_1.default.ipfsCid;\n default:\n throw new Error(`Unsupported common action type: ${actionType}`);\n }\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/lit-actions-client/batch-generate-keys.js\n var require_batch_generate_keys = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/lit-actions-client/batch-generate-keys.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.batchGenerateKeysWithLitAction = batchGenerateKeysWithLitAction;\n var utils_1 = require_utils14();\n async function batchGenerateKeysWithLitAction(args) {\n const { accessControlConditions, litNodeClient, actions, delegateeSessionSigs, litActionIpfsCid } = args;\n const result = await litNodeClient.executeJs({\n useSingleNode: true,\n sessionSigs: delegateeSessionSigs,\n ipfsId: litActionIpfsCid,\n jsParams: {\n actions,\n accessControlConditions\n }\n });\n const response = (0, utils_1.postLitActionValidation)(result);\n return JSON.parse(response);\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/lit-actions-client/generate-key.js\n var require_generate_key = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/lit-actions-client/generate-key.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.generateKeyWithLitAction = generateKeyWithLitAction;\n var utils_1 = require_utils14();\n async function generateKeyWithLitAction({ litNodeClient, delegateeSessionSigs, litActionIpfsCid, accessControlConditions, delegatorAddress }) {\n const result = await litNodeClient.executeJs({\n useSingleNode: true,\n sessionSigs: delegateeSessionSigs,\n ipfsId: litActionIpfsCid,\n jsParams: {\n delegatorAddress,\n accessControlConditions\n }\n });\n const response = (0, utils_1.postLitActionValidation)(result);\n return JSON.parse(response);\n }\n }\n });\n\n // ../../../node_modules/.pnpm/tslib@1.14.1/node_modules/tslib/tslib.es6.js\n var tslib_es6_exports3 = {};\n __export(tslib_es6_exports3, {\n __assign: () => __assign3,\n __asyncDelegator: () => __asyncDelegator3,\n __asyncGenerator: () => __asyncGenerator3,\n __asyncValues: () => __asyncValues3,\n __await: () => __await3,\n __awaiter: () => __awaiter3,\n __classPrivateFieldGet: () => __classPrivateFieldGet3,\n __classPrivateFieldSet: () => __classPrivateFieldSet3,\n __createBinding: () => __createBinding3,\n __decorate: () => __decorate3,\n __exportStar: () => __exportStar3,\n __extends: () => __extends3,\n __generator: () => __generator3,\n __importDefault: () => __importDefault3,\n __importStar: () => __importStar3,\n __makeTemplateObject: () => __makeTemplateObject3,\n __metadata: () => __metadata3,\n __param: () => __param3,\n __read: () => __read3,\n __rest: () => __rest3,\n __spread: () => __spread3,\n __spreadArrays: () => __spreadArrays3,\n __values: () => __values3\n });\n function __extends3(d5, b4) {\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n }\n function __rest3(s4, e2) {\n var t3 = {};\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4) && e2.indexOf(p4) < 0)\n t3[p4] = s4[p4];\n if (s4 != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i3 = 0, p4 = Object.getOwnPropertySymbols(s4); i3 < p4.length; i3++) {\n if (e2.indexOf(p4[i3]) < 0 && Object.prototype.propertyIsEnumerable.call(s4, p4[i3]))\n t3[p4[i3]] = s4[p4[i3]];\n }\n return t3;\n }\n function __decorate3(decorators, target, key, desc) {\n var c4 = arguments.length, r2 = c4 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d5;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r2 = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i3 = decorators.length - 1; i3 >= 0; i3--)\n if (d5 = decorators[i3])\n r2 = (c4 < 3 ? d5(r2) : c4 > 3 ? d5(target, key, r2) : d5(target, key)) || r2;\n return c4 > 3 && r2 && Object.defineProperty(target, key, r2), r2;\n }\n function __param3(paramIndex, decorator) {\n return function(target, key) {\n decorator(target, key, paramIndex);\n };\n }\n function __metadata3(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\")\n return Reflect.metadata(metadataKey, metadataValue);\n }\n function __awaiter3(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n }\n function __generator3(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n }\n function __createBinding3(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n }\n function __exportStar3(m2, exports3) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !exports3.hasOwnProperty(p4))\n exports3[p4] = m2[p4];\n }\n function __values3(o5) {\n var s4 = typeof Symbol === \"function\" && Symbol.iterator, m2 = s4 && o5[s4], i3 = 0;\n if (m2)\n return m2.call(o5);\n if (o5 && typeof o5.length === \"number\")\n return {\n next: function() {\n if (o5 && i3 >= o5.length)\n o5 = void 0;\n return { value: o5 && o5[i3++], done: !o5 };\n }\n };\n throw new TypeError(s4 ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n }\n function __read3(o5, n2) {\n var m2 = typeof Symbol === \"function\" && o5[Symbol.iterator];\n if (!m2)\n return o5;\n var i3 = m2.call(o5), r2, ar = [], e2;\n try {\n while ((n2 === void 0 || n2-- > 0) && !(r2 = i3.next()).done)\n ar.push(r2.value);\n } catch (error) {\n e2 = { error };\n } finally {\n try {\n if (r2 && !r2.done && (m2 = i3[\"return\"]))\n m2.call(i3);\n } finally {\n if (e2)\n throw e2.error;\n }\n }\n return ar;\n }\n function __spread3() {\n for (var ar = [], i3 = 0; i3 < arguments.length; i3++)\n ar = ar.concat(__read3(arguments[i3]));\n return ar;\n }\n function __spreadArrays3() {\n for (var s4 = 0, i3 = 0, il = arguments.length; i3 < il; i3++)\n s4 += arguments[i3].length;\n for (var r2 = Array(s4), k4 = 0, i3 = 0; i3 < il; i3++)\n for (var a3 = arguments[i3], j2 = 0, jl = a3.length; j2 < jl; j2++, k4++)\n r2[k4] = a3[j2];\n return r2;\n }\n function __await3(v2) {\n return this instanceof __await3 ? (this.v = v2, this) : new __await3(v2);\n }\n function __asyncGenerator3(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g4 = generator.apply(thisArg, _arguments || []), i3, q3 = [];\n return i3 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3;\n function verb(n2) {\n if (g4[n2])\n i3[n2] = function(v2) {\n return new Promise(function(a3, b4) {\n q3.push([n2, v2, a3, b4]) > 1 || resume(n2, v2);\n });\n };\n }\n function resume(n2, v2) {\n try {\n step(g4[n2](v2));\n } catch (e2) {\n settle(q3[0][3], e2);\n }\n }\n function step(r2) {\n r2.value instanceof __await3 ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle(q3[0][2], r2);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f7, v2) {\n if (f7(v2), q3.shift(), q3.length)\n resume(q3[0][0], q3[0][1]);\n }\n }\n function __asyncDelegator3(o5) {\n var i3, p4;\n return i3 = {}, verb(\"next\"), verb(\"throw\", function(e2) {\n throw e2;\n }), verb(\"return\"), i3[Symbol.iterator] = function() {\n return this;\n }, i3;\n function verb(n2, f7) {\n i3[n2] = o5[n2] ? function(v2) {\n return (p4 = !p4) ? { value: __await3(o5[n2](v2)), done: n2 === \"return\" } : f7 ? f7(v2) : v2;\n } : f7;\n }\n }\n function __asyncValues3(o5) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m2 = o5[Symbol.asyncIterator], i3;\n return m2 ? m2.call(o5) : (o5 = typeof __values3 === \"function\" ? __values3(o5) : o5[Symbol.iterator](), i3 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3);\n function verb(n2) {\n i3[n2] = o5[n2] && function(v2) {\n return new Promise(function(resolve, reject) {\n v2 = o5[n2](v2), settle(resolve, reject, v2.done, v2.value);\n });\n };\n }\n function settle(resolve, reject, d5, v2) {\n Promise.resolve(v2).then(function(v6) {\n resolve({ value: v6, done: d5 });\n }, reject);\n }\n }\n function __makeTemplateObject3(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", { value: raw });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n }\n function __importStar3(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (Object.hasOwnProperty.call(mod3, k4))\n result[k4] = mod3[k4];\n }\n result.default = mod3;\n return result;\n }\n function __importDefault3(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { default: mod3 };\n }\n function __classPrivateFieldGet3(receiver, privateMap) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n return privateMap.get(receiver);\n }\n function __classPrivateFieldSet3(receiver, privateMap, value) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n privateMap.set(receiver, value);\n return value;\n }\n var extendStatics3, __assign3;\n var init_tslib_es63 = __esm({\n \"../../../node_modules/.pnpm/tslib@1.14.1/node_modules/tslib/tslib.es6.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (b5.hasOwnProperty(p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n __assign3 = function() {\n __assign3 = Object.assign || function __assign4(t3) {\n for (var s4, i3 = 1, n2 = arguments.length; i3 < n2; i3++) {\n s4 = arguments[i3];\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4))\n t3[p4] = s4[p4];\n }\n return t3;\n };\n return __assign3.apply(this, arguments);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/version.js\n var require_version28 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"7.3.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/depd@2.0.0/node_modules/depd/lib/browser/index.js\n var require_browser2 = __commonJS({\n \"../../../node_modules/.pnpm/depd@2.0.0/node_modules/depd/lib/browser/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = depd;\n function depd(namespace) {\n if (!namespace) {\n throw new TypeError(\"argument namespace is required\");\n }\n function deprecate(message) {\n }\n deprecate._file = void 0;\n deprecate._ignored = true;\n deprecate._namespace = namespace;\n deprecate._traced = false;\n deprecate._warned = /* @__PURE__ */ Object.create(null);\n deprecate.function = wrapfunction;\n deprecate.property = wrapproperty;\n return deprecate;\n }\n function wrapfunction(fn, message) {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"argument fn must be a function\");\n }\n return fn;\n }\n function wrapproperty(obj, prop, message) {\n if (!obj || typeof obj !== \"object\" && typeof obj !== \"function\") {\n throw new TypeError(\"argument obj must be object\");\n }\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop);\n if (!descriptor) {\n throw new TypeError(\"must call property on owner object\");\n }\n if (!descriptor.configurable) {\n throw new TypeError(\"property must be configurable\");\n }\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/constants/constants.js\n var require_constants6 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/constants/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LOG_LEVEL = exports3.LitNamespace = exports3.LIT_NAMESPACE = exports3.LitRecapAbility = exports3.LIT_RECAP_ABILITY = exports3.LitAbility = exports3.LIT_ABILITY = exports3.LitResourcePrefix = exports3.LIT_RESOURCE_PREFIX = exports3.RelayAuthStatus = exports3.RELAY_AUTH_STATUS = exports3.StakingStates = exports3.STAKING_STATES = exports3.ProviderType = exports3.PROVIDER_TYPE = exports3.AuthMethodScope = exports3.AUTH_METHOD_SCOPE = exports3.AuthMethodType = exports3.AUTH_METHOD_TYPE = exports3.EITHER_TYPE = exports3.LIT_CURVE = exports3.VMTYPE = exports3.LIT_ACTION_IPFS_HASH = exports3.SIWE_DELEGATION_URI = exports3.PKP_CLIENT_SUPPORTED_CHAINS = exports3.AUTH_METHOD_TYPE_IDS = exports3.LIT_SESSION_KEY_URI = exports3.LIT_NETWORKS = exports3.SYMM_KEY_ALGO_PARAMS = exports3.LOCAL_STORAGE_KEYS = exports3.ALL_LIT_CHAINS = exports3.LIT_COSMOS_CHAINS = exports3.LIT_SVM_CHAINS = exports3.CENTRALISATION_BY_NETWORK = exports3.HTTP_BY_NETWORK = exports3.HTTPS = exports3.HTTP = exports3.METAMASK_CHAIN_INFO_BY_NETWORK = exports3.RELAYER_URL_BY_NETWORK = exports3.RPC_URL_BY_NETWORK = exports3.LitNetwork = exports3.LIT_NETWORK = exports3.LIT_EVM_CHAINS = exports3.LIT_RPC = exports3.metamaskChainInfo = exports3.METAMASK_CHAIN_INFO = exports3.LIT_CHAINS = exports3.AUTH_SIGNATURE_BODY = exports3.LIT_AUTH_SIG_CHAIN_KEYS = exports3.NETWORK_PUB_KEY = void 0;\n exports3.FALLBACK_IPFS_GATEWAYS = exports3.LogLevel = void 0;\n var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3));\n var depd_1 = tslib_1.__importDefault(require_browser2());\n var deprecated = (0, depd_1.default)(\"lit-js-sdk:constants:constants\");\n exports3.NETWORK_PUB_KEY = \"9971e835a1fe1a4d78e381eebbe0ddc84fde5119169db816900de796d10187f3c53d65c1202ac083d099a517f34a9b62\";\n exports3.LIT_AUTH_SIG_CHAIN_KEYS = [\n \"ethereum\",\n \"solana\",\n \"cosmos\",\n \"kyve\"\n ];\n exports3.AUTH_SIGNATURE_BODY = \"I am creating an account to use Lit Protocol at {{timestamp}}\";\n var yellowstoneChain = {\n contractAddress: null,\n chainId: 175188,\n name: \"Chronicle Yellowstone - Lit Protocol Testnet\",\n symbol: \"tstLPX\",\n decimals: 18,\n rpcUrls: [\"https://yellowstone-rpc.litprotocol.com/\"],\n blockExplorerUrls: [\"https://yellowstone-explorer.litprotocol.com/\"],\n type: null,\n vmType: \"EVM\"\n };\n exports3.LIT_CHAINS = {\n ethereum: {\n contractAddress: \"0xA54F7579fFb3F98bd8649fF02813F575f9b3d353\",\n chainId: 1,\n name: \"Ethereum\",\n symbol: \"ETH\",\n decimals: 18,\n type: \"ERC1155\",\n rpcUrls: [\n \"https://eth-mainnet.alchemyapi.io/v2/EuGnkVlzVoEkzdg0lpCarhm8YHOxWVxE\"\n ],\n blockExplorerUrls: [\"https://etherscan.io\"],\n vmType: \"EVM\"\n },\n polygon: {\n contractAddress: \"0x7C7757a9675f06F3BE4618bB68732c4aB25D2e88\",\n chainId: 137,\n name: \"Polygon\",\n symbol: \"MATIC\",\n decimals: 18,\n rpcUrls: [\"https://polygon-rpc.com\"],\n blockExplorerUrls: [\"https://explorer.matic.network\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n fantom: {\n contractAddress: \"0x5bD3Fe8Ab542f0AaBF7552FAAf376Fd8Aa9b3869\",\n chainId: 250,\n name: \"Fantom\",\n symbol: \"FTM\",\n decimals: 18,\n rpcUrls: [\"https://rpcapi.fantom.network\"],\n blockExplorerUrls: [\"https://ftmscan.com\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n xdai: {\n contractAddress: \"0xDFc2Fd83dFfD0Dafb216F412aB3B18f2777406aF\",\n chainId: 100,\n name: \"xDai\",\n symbol: \"xDai\",\n decimals: 18,\n rpcUrls: [\"https://rpc.gnosischain.com\"],\n blockExplorerUrls: [\" https://blockscout.com/xdai/mainnet\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n bsc: {\n contractAddress: \"0xc716950e5DEae248160109F562e1C9bF8E0CA25B\",\n chainId: 56,\n name: \"Binance Smart Chain\",\n symbol: \"BNB\",\n decimals: 18,\n rpcUrls: [\"https://bsc-dataseed.binance.org/\"],\n blockExplorerUrls: [\" https://bscscan.com/\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n arbitrum: {\n contractAddress: \"0xc716950e5DEae248160109F562e1C9bF8E0CA25B\",\n chainId: 42161,\n name: \"Arbitrum\",\n symbol: \"AETH\",\n decimals: 18,\n type: \"ERC1155\",\n rpcUrls: [\"https://arb1.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://arbiscan.io/\"],\n vmType: \"EVM\"\n },\n arbitrumSepolia: {\n contractAddress: null,\n chainId: 421614,\n name: \"Arbitrum Sepolia\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://sepolia-rollup.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://sepolia.arbiscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n avalanche: {\n contractAddress: \"0xBB118507E802D17ECDD4343797066dDc13Cde7C6\",\n chainId: 43114,\n name: \"Avalanche\",\n symbol: \"AVAX\",\n decimals: 18,\n type: \"ERC1155\",\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n vmType: \"EVM\"\n },\n fuji: {\n contractAddress: \"0xc716950e5DEae248160109F562e1C9bF8E0CA25B\",\n chainId: 43113,\n name: \"Avalanche FUJI Testnet\",\n symbol: \"AVAX\",\n decimals: 18,\n type: \"ERC1155\",\n rpcUrls: [\"https://api.avax-test.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://testnet.snowtrace.io/\"],\n vmType: \"EVM\"\n },\n harmony: {\n contractAddress: \"0xBB118507E802D17ECDD4343797066dDc13Cde7C6\",\n chainId: 16666e5,\n name: \"Harmony\",\n symbol: \"ONE\",\n decimals: 18,\n type: \"ERC1155\",\n rpcUrls: [\"https://api.harmony.one\"],\n blockExplorerUrls: [\"https://explorer.harmony.one/\"],\n vmType: \"EVM\"\n },\n mumbai: {\n contractAddress: \"0xc716950e5DEae248160109F562e1C9bF8E0CA25B\",\n chainId: 80001,\n name: \"Mumbai\",\n symbol: \"MATIC\",\n decimals: 18,\n rpcUrls: [\n \"https://rpc-mumbai.maticvigil.com/v1/96bf5fa6e03d272fbd09de48d03927b95633726c\"\n ],\n blockExplorerUrls: [\"https://mumbai.polygonscan.com\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n goerli: {\n contractAddress: \"0xc716950e5DEae248160109F562e1C9bF8E0CA25B\",\n chainId: 5,\n name: \"Goerli\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://goerli.infura.io/v3/96dffb3d8c084dec952c61bd6230af34\"],\n blockExplorerUrls: [\"https://goerli.etherscan.io\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n cronos: {\n contractAddress: \"0xc716950e5DEae248160109F562e1C9bF8E0CA25B\",\n chainId: 25,\n name: \"Cronos\",\n symbol: \"CRO\",\n decimals: 18,\n rpcUrls: [\"https://evm-cronos.org\"],\n blockExplorerUrls: [\"https://cronos.org/explorer/\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n optimism: {\n contractAddress: \"0xbF68B4c9aCbed79278465007f20a08Fa045281E0\",\n chainId: 10,\n name: \"Optimism\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.optimism.io\"],\n blockExplorerUrls: [\"https://optimistic.etherscan.io\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n celo: {\n contractAddress: \"0xBB118507E802D17ECDD4343797066dDc13Cde7C6\",\n chainId: 42220,\n name: \"Celo\",\n symbol: \"CELO\",\n decimals: 18,\n rpcUrls: [\"https://forno.celo.org\"],\n blockExplorerUrls: [\"https://explorer.celo.org\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n aurora: {\n contractAddress: null,\n chainId: 1313161554,\n name: \"Aurora\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.aurora.dev\"],\n blockExplorerUrls: [\"https://aurorascan.dev\"],\n type: null,\n vmType: \"EVM\"\n },\n eluvio: {\n contractAddress: null,\n chainId: 955305,\n name: \"Eluvio\",\n symbol: \"ELV\",\n decimals: 18,\n rpcUrls: [\"https://host-76-74-28-226.contentfabric.io/eth\"],\n blockExplorerUrls: [\"https://explorer.eluv.io\"],\n type: null,\n vmType: \"EVM\"\n },\n alfajores: {\n contractAddress: null,\n chainId: 44787,\n name: \"Alfajores\",\n symbol: \"CELO\",\n decimals: 18,\n rpcUrls: [\"https://alfajores-forno.celo-testnet.org\"],\n blockExplorerUrls: [\"https://alfajores-blockscout.celo-testnet.org\"],\n type: null,\n vmType: \"EVM\"\n },\n xdc: {\n contractAddress: null,\n chainId: 50,\n name: \"XDC Blockchain\",\n symbol: \"XDC\",\n decimals: 18,\n rpcUrls: [\"https://rpc.xinfin.network\"],\n blockExplorerUrls: [\"https://explorer.xinfin.network\"],\n type: null,\n vmType: \"EVM\"\n },\n evmos: {\n contractAddress: null,\n chainId: 9001,\n name: \"EVMOS\",\n symbol: \"EVMOS\",\n decimals: 18,\n rpcUrls: [\"https://eth.bd.evmos.org:8545\"],\n blockExplorerUrls: [\"https://evm.evmos.org\"],\n type: null,\n vmType: \"EVM\"\n },\n evmosTestnet: {\n contractAddress: null,\n chainId: 9e3,\n name: \"EVMOS Testnet\",\n symbol: \"EVMOS\",\n decimals: 18,\n rpcUrls: [\"https://eth.bd.evmos.dev:8545\"],\n blockExplorerUrls: [\"https://evm.evmos.dev\"],\n type: null,\n vmType: \"EVM\"\n },\n bscTestnet: {\n contractAddress: null,\n chainId: 97,\n name: \"BSC Testnet\",\n symbol: \"BNB\",\n decimals: 18,\n rpcUrls: [\"https://data-seed-prebsc-1-s1.binance.org:8545\"],\n blockExplorerUrls: [\"https://testnet.bscscan.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n baseGoerli: {\n contractAddress: null,\n chainId: 84531,\n name: \"Base Goerli\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://goerli.base.org\"],\n blockExplorerUrls: [\"https://goerli.basescan.org\"],\n type: null,\n vmType: \"EVM\"\n },\n baseSepolia: {\n contractAddress: null,\n chainId: 84532,\n name: \"Base Sepolia\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://sepolia.base.org\"],\n blockExplorerUrls: [\"https://sepolia.basescan.org\"],\n type: null,\n vmType: \"EVM\"\n },\n moonbeam: {\n contractAddress: null,\n chainId: 1284,\n name: \"Moonbeam\",\n symbol: \"GLMR\",\n decimals: 18,\n rpcUrls: [\"https://rpc.api.moonbeam.network\"],\n blockExplorerUrls: [\"https://moonscan.io\"],\n type: null,\n vmType: \"EVM\"\n },\n moonriver: {\n contractAddress: null,\n chainId: 1285,\n name: \"Moonriver\",\n symbol: \"MOVR\",\n decimals: 18,\n rpcUrls: [\"https://rpc.api.moonriver.moonbeam.network\"],\n blockExplorerUrls: [\"https://moonriver.moonscan.io\"],\n type: null,\n vmType: \"EVM\"\n },\n moonbaseAlpha: {\n contractAddress: null,\n chainId: 1287,\n name: \"Moonbase Alpha\",\n symbol: \"DEV\",\n decimals: 18,\n rpcUrls: [\"https://rpc.api.moonbase.moonbeam.network\"],\n blockExplorerUrls: [\"https://moonbase.moonscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n filecoin: {\n contractAddress: null,\n chainId: 314,\n name: \"Filecoin\",\n symbol: \"FIL\",\n decimals: 18,\n rpcUrls: [\"https://api.node.glif.io/rpc/v1\"],\n blockExplorerUrls: [\"https://filfox.info/\"],\n type: null,\n vmType: \"EVM\"\n },\n filecoinCalibrationTestnet: {\n contractAddress: null,\n chainId: 314159,\n name: \"Filecoin Calibration Testnet\",\n symbol: \"tFIL\",\n decimals: 18,\n rpcUrls: [\"https://api.calibration.node.glif.io/rpc/v1\"],\n blockExplorerUrls: [\"https://calibration.filscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n hyperspace: {\n contractAddress: null,\n chainId: 3141,\n name: \"Filecoin Hyperspace testnet\",\n symbol: \"tFIL\",\n decimals: 18,\n rpcUrls: [\"https://api.hyperspace.node.glif.io/rpc/v1\"],\n blockExplorerUrls: [\"https://hyperspace.filscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n sepolia: {\n contractAddress: null,\n chainId: 11155111,\n name: \"Sepolia Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://ethereum-sepolia-rpc.publicnode.com\"],\n blockExplorerUrls: [\"https://sepolia.etherscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n scrollSepolia: {\n contractAddress: null,\n chainId: 534351,\n name: \"Scroll Sepolia Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://sepolia-rpc.scroll.io\"],\n blockExplorerUrls: [\"https://sepolia.scrollscan.com\"],\n type: null,\n vmType: \"EVM\"\n },\n scroll: {\n contractAddress: null,\n chainId: 534352,\n name: \"Scroll\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.scroll.io\"],\n blockExplorerUrls: [\"https://scrollscan.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n zksync: {\n contractAddress: null,\n chainId: 324,\n name: \"zkSync Era Mainnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.era.zksync.io\"],\n blockExplorerUrls: [\"https://explorer.zksync.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n base: {\n contractAddress: null,\n chainId: 8453,\n name: \"Base Mainnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.base.org\"],\n blockExplorerUrls: [\"https://basescan.org\"],\n type: null,\n vmType: \"EVM\"\n },\n lukso: {\n contractAddress: null,\n chainId: 42,\n name: \"Lukso\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.lukso.gateway.fm\"],\n blockExplorerUrls: [\"https://explorer.execution.mainnet.lukso.network/\"],\n type: null,\n vmType: \"EVM\"\n },\n luksoTestnet: {\n contractAddress: null,\n chainId: 4201,\n name: \"Lukso Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.testnet.lukso.network\"],\n blockExplorerUrls: [\"https://explorer.execution.testnet.lukso.network\"],\n type: null,\n vmType: \"EVM\"\n },\n zora: {\n contractAddress: null,\n chainId: 7777777,\n name: \"\tZora\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.zora.energy/\"],\n blockExplorerUrls: [\"https://explorer.zora.energy\"],\n type: null,\n vmType: \"EVM\"\n },\n zoraGoerli: {\n contractAddress: null,\n chainId: 999,\n name: \"Zora Goerli\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://testnet.rpc.zora.energy\"],\n blockExplorerUrls: [\"https://testnet.explorer.zora.energy\"],\n type: null,\n vmType: \"EVM\"\n },\n zksyncTestnet: {\n contractAddress: null,\n chainId: 280,\n name: \"zkSync Era Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://testnet.era.zksync.dev\"],\n blockExplorerUrls: [\"https://goerli.explorer.zksync.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n lineaGoerli: {\n contractAddress: null,\n chainId: 59140,\n name: \"Linea Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.goerli.linea.build\"],\n blockExplorerUrls: [\"https://explorer.goerli.linea.build\"],\n type: null,\n vmType: \"EVM\"\n },\n lineaSepolia: {\n contractAddress: null,\n chainId: 59141,\n name: \"Linea Sepolia Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.sepolia.linea.build\"],\n blockExplorerUrls: [\"https://explorer.sepolia.linea.build\"],\n type: null,\n vmType: \"EVM\"\n },\n /**\n * Use this for `>= Datil` network.\n * Chainlist entry for the Chronicle Yellowstone Testnet.\n * https://chainlist.org/chain/175188\n */\n yellowstone: yellowstoneChain,\n chiado: {\n contractAddress: null,\n chainId: 10200,\n name: \"Chiado\",\n symbol: \"XDAI\",\n decimals: 18,\n rpcUrls: [\"https://rpc.chiadochain.net\"],\n blockExplorerUrls: [\"https://blockscout.chiadochain.net\"],\n type: null,\n vmType: \"EVM\"\n },\n zkEvm: {\n contractAddress: null,\n chainId: 1101,\n name: \"zkEvm\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://zkevm-rpc.com\"],\n blockExplorerUrls: [\"https://zkevm.polygonscan.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n mantleTestnet: {\n contractAddress: null,\n chainId: 5001,\n name: \"Mantle Testnet\",\n symbol: \"MNT\",\n decimals: 18,\n rpcUrls: [\"https://rpc.testnet.mantle.xyz\"],\n blockExplorerUrls: [\"https://explorer.testnet.mantle.xyz/\"],\n type: null,\n vmType: \"EVM\"\n },\n mantle: {\n contractAddress: null,\n chainId: 5e3,\n name: \"Mantle\",\n symbol: \"MNT\",\n decimals: 18,\n rpcUrls: [\"https://rpc.mantle.xyz\"],\n blockExplorerUrls: [\"http://explorer.mantle.xyz/\"],\n type: null,\n vmType: \"EVM\"\n },\n klaytn: {\n contractAddress: null,\n chainId: 8217,\n name: \"Klaytn\",\n symbol: \"KLAY\",\n decimals: 18,\n rpcUrls: [\"https://klaytn.blockpi.network/v1/rpc/public\"],\n blockExplorerUrls: [\"https://www.klaytnfinder.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n publicGoodsNetwork: {\n contractAddress: null,\n chainId: 424,\n name: \"Public Goods Network\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.publicgoods.network\"],\n blockExplorerUrls: [\"https://explorer.publicgoods.network/\"],\n type: null,\n vmType: \"EVM\"\n },\n optimismGoerli: {\n contractAddress: null,\n chainId: 420,\n name: \"Optimism Goerli\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://optimism-goerli.publicnode.com\"],\n blockExplorerUrls: [\"https://goerli-optimism.etherscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n waevEclipseTestnet: {\n contractAddress: null,\n chainId: 91006,\n name: \"Waev Eclipse Testnet\",\n symbol: \"ecWAEV\",\n decimals: 18,\n rpcUrls: [\"https://api.evm.waev.eclipsenetwork.xyz\"],\n blockExplorerUrls: [\"http://waev.explorer.modular.cloud/\"],\n type: null,\n vmType: \"EVM\"\n },\n waevEclipseDevnet: {\n contractAddress: null,\n chainId: 91006,\n name: \"Waev Eclipse Devnet\",\n symbol: \"ecWAEV\",\n decimals: 18,\n rpcUrls: [\"https://api.evm.waev.dev.eclipsenetwork.xyz\"],\n blockExplorerUrls: [\"http://waev.explorer.modular.cloud/\"],\n type: null,\n vmType: \"EVM\"\n },\n verifyTestnet: {\n contractAddress: null,\n chainId: 1833,\n name: \"Verify Testnet\",\n symbol: \"MATIC\",\n decimals: 18,\n rpcUrls: [\"https://rpc.verify-testnet.gelato.digital\"],\n blockExplorerUrls: [\"https://verify-testnet.blockscout.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n fuse: {\n contractAddress: null,\n chainId: 122,\n name: \"Fuse\",\n symbol: \"FUSE\",\n decimals: 18,\n rpcUrls: [\"https://rpc.fuse.io/\"],\n blockExplorerUrls: [\"https://explorer.fuse.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n campNetwork: {\n contractAddress: null,\n chainId: 325e3,\n name: \"Camp Network\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.camp-network-testnet.gelato.digital\"],\n blockExplorerUrls: [\n \"https://explorer.camp-network-testnet.gelato.digital/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n vanar: {\n contractAddress: null,\n chainId: 78600,\n name: \"Vanar Vanguard\",\n symbol: \"VANRY\",\n decimals: 18,\n rpcUrls: [\"https://rpc-vanguard.vanarchain.com\"],\n blockExplorerUrls: [\"https://explorer-vanguard.vanarchain.com\"],\n type: null,\n vmType: \"EVM\"\n },\n lisk: {\n contractAddress: null,\n chainId: 1135,\n name: \"Lisk\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://lisk.drpc.org\"],\n blockExplorerUrls: [\"https://blockscout.lisk.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n chilizMainnet: {\n contractAddress: null,\n chainId: 88888,\n name: \"Chiliz Mainnet\",\n symbol: \"CHZ\",\n decimals: 18,\n rpcUrls: [\"https://rpc.ankr.com/chiliz\"],\n blockExplorerUrls: [\"https://chiliscan.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n chilizTestnet: {\n contractAddress: null,\n chainId: 88882,\n name: \"Chiliz Spicy Testnet\",\n symbol: \"CHZ\",\n decimals: 18,\n rpcUrls: [\"https://spicy-rpc.chiliz.com/\"],\n blockExplorerUrls: [\"https://testnet.chiliscan.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n skaleTestnet: {\n contractAddress: null,\n chainId: 37084624,\n name: \"SKALE Nebula Hub Testnet\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://testnet.skalenodes.com/v1/lanky-ill-funny-testnet\"],\n blockExplorerUrls: [\n \"https://lanky-ill-funny-testnet.explorer.testnet.skalenodes.com\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skale: {\n contractAddress: null,\n chainId: 1482601649,\n name: \"SKALE Nebula Hub Mainnet\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.skalenodes.com/v1/green-giddy-denebola\"],\n blockExplorerUrls: [\n \"https://green-giddy-denebola.explorer.mainnet.skalenodes.com\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skaleCalypso: {\n contractAddress: null,\n chainId: 1564830818,\n name: \"SKALE Calypso Hub Mainnet\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague\"],\n blockExplorerUrls: [\n \"https://giant-half-dual-testnet.explorer.testnet.skalenodes.com/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skaleCalypsoTestnet: {\n contractAddress: null,\n chainId: 974399131,\n name: \"SKALE Calypso Hub Testnet\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://testnet.skalenodes.com/v1/giant-half-dual-testnet\"],\n blockExplorerUrls: [\n \"https://giant-half-dual-testnet.explorer.testnet.skalenodes.com/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skaleEuropa: {\n contractAddress: null,\n chainId: 2046399126,\n name: \"SKALE Europa DeFI Hub\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.skalenodes.com/v1/elated-tan-skat\"],\n blockExplorerUrls: [\n \"https://elated-tan-skat.explorer.mainnet.skalenodes.com/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skaleEuropaTestnet: {\n contractAddress: null,\n chainId: 1444673419,\n name: \"SKALE Europa DeFi Hub Testnet\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://testnet.skalenodes.com/v1/juicy-low-small-testnet\"],\n blockExplorerUrls: [\n \"https://juicy-low-small-testnet.explorer.testnet.skalenodes.com/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skaleTitan: {\n contractAddress: null,\n chainId: 1350216234,\n name: \"SKALE Titan AI Hub\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.skalenodes.com/v1/parallel-stormy-spica\"],\n blockExplorerUrls: [\n \"https://parallel-stormy-spica.explorer.mainnet.skalenodes.com/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skaleTitanTestnet: {\n contractAddress: null,\n chainId: 1020352220,\n name: \"SKALE Titan AI Hub Testnet\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://testnet.skalenodes.com/v1/aware-fake-trim-testnet\"],\n blockExplorerUrls: [\n \"https://aware-fake-trim-testnet.explorer.testnet.skalenodes.com/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n fhenixHelium: {\n contractAddress: null,\n chainId: 8008135,\n name: \"Fhenix Helium\",\n symbol: \"tFHE\",\n decimals: 18,\n rpcUrls: [\"https://api.helium.fhenix.zone\"],\n blockExplorerUrls: [\"https://explorer.helium.fhenix.zone\"],\n type: null,\n vmType: \"EVM\"\n },\n fhenixNitrogen: {\n contractAddress: null,\n chainId: 8008148,\n name: \"Fhenix Nitrogen\",\n symbol: \"tFHE\",\n decimals: 18,\n rpcUrls: [\"https://api.nitrogen.fhenix.zone\"],\n blockExplorerUrls: [\"https://explorer.nitrogen.fhenix.zone\"],\n type: null,\n vmType: \"EVM\"\n },\n hederaTestnet: {\n contractAddress: null,\n chainId: 296,\n name: \"Hedera Testnet\",\n symbol: \"HBAR\",\n decimals: 8,\n rpcUrls: [\"https://testnet.hashio.io/api\"],\n blockExplorerUrls: [\"https://hashscan.io/testnet/dashboard\"],\n type: null,\n vmType: \"EVM\"\n },\n hederaMainnet: {\n contractAddress: null,\n chainId: 295,\n name: \"Hedera Mainnet\",\n symbol: \"HBAR\",\n decimals: 8,\n rpcUrls: [\"https://mainnet.hashio.io/api\"],\n blockExplorerUrls: [\"https://hashscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n bitTorrentTestnet: {\n contractAddress: null,\n chainId: 1028,\n name: \"BitTorrent Testnet\",\n symbol: \"BTT\",\n decimals: 18,\n rpcUrls: [\"https://test-rpc.bittorrentchain.io\"],\n blockExplorerUrls: [\"https://testnet.bttcscan.com\"],\n type: null,\n vmType: \"EVM\"\n },\n storyOdyssey: {\n contractAddress: null,\n chainId: 1516,\n name: \"Story Odyssey\",\n symbol: \"IP\",\n decimals: 18,\n rpcUrls: [\"https://rpc.odyssey.storyrpc.io\"],\n blockExplorerUrls: [\"https://odyssey.storyscan.xyz\"],\n type: null,\n vmType: \"EVM\"\n },\n campTestnet: {\n contractAddress: null,\n chainId: 325e3,\n name: \"Camp Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.camp-network-testnet.gelato.digital\"],\n blockExplorerUrls: [\"https://camp-network-testnet.blockscout.com\"],\n type: null,\n vmType: \"EVM\"\n },\n hushedNorthstar: {\n contractAddress: null,\n chainId: 42161,\n name: \"Hushed Northstar Devnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.buildbear.io/yielddev\"],\n blockExplorerUrls: [\"https://explorer.buildbear.io/yielddev/transactions\"],\n type: null,\n vmType: \"EVM\"\n },\n amoy: {\n contractAddress: null,\n chainId: 80002,\n name: \"Amoy\",\n symbol: \"POL\",\n decimals: 18,\n rpcUrls: [\"https://rpc-amoy.polygon.technology\"],\n blockExplorerUrls: [\"https://amoy.polygonscan.com\"],\n type: null,\n vmType: \"EVM\"\n },\n matchain: {\n contractAddress: null,\n chainId: 698,\n name: \"Matchain\",\n symbol: \"BNB\",\n decimals: 18,\n rpcUrls: [\"https://rpc.matchain.io\"],\n blockExplorerUrls: [\"https://matchscan.io\"],\n type: null,\n vmType: \"EVM\"\n },\n coreDao: {\n contractAddress: null,\n chainId: 1116,\n name: \"Core DAO\",\n symbol: \"CORE\",\n decimals: 18,\n rpcUrls: [\"https://rpc.coredao.org\"],\n blockExplorerUrls: [\"https://scan.coredao.org/\"],\n type: null,\n vmType: \"EVM\"\n },\n zkCandySepoliaTestnet: {\n contractAddress: null,\n chainId: 302,\n name: \"ZKcandy Sepolia Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://sepolia.rpc.zkcandy.io\"],\n blockExplorerUrls: [\"https://sepolia.explorer.zkcandy.io\"],\n type: null,\n vmType: \"EVM\"\n },\n vana: {\n contractAddress: null,\n chainId: 1480,\n name: \"Vana\",\n symbol: \"VANA\",\n decimals: 18,\n rpcUrls: [\"https://rpc.vana.org\"],\n blockExplorerUrls: [\"https://vanascan.io\"],\n type: null,\n vmType: \"EVM\"\n },\n moksha: {\n contractAddress: null,\n chainId: 1480,\n name: \"Vana\",\n symbol: \"VANA\",\n decimals: 18,\n rpcUrls: [\"https://rpc.moksha.vana.org\"],\n blockExplorerUrls: [\"https://moksha.vanascan.io\"],\n type: null,\n vmType: \"EVM\"\n },\n rootstock: {\n contractAddress: null,\n chainId: 30,\n name: \"Rootstock\",\n symbol: \"RBTC\",\n decimals: 18,\n rpcUrls: [\"https://public-node.rsk.co\"],\n blockExplorerUrls: [\"https://rootstock-testnet.blockscout.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n rootstockTestnet: {\n contractAddress: null,\n chainId: 31,\n name: \"Rootstock Testnet\",\n symbol: \"tRBTC\",\n decimals: 18,\n rpcUrls: [\"https://public-node.testnet.rsk.co\"],\n blockExplorerUrls: [\"https://explorer.testnet.rootstock.io\"],\n type: null,\n vmType: \"EVM\"\n },\n merlin: {\n contractAddress: null,\n chainId: 4200,\n name: \"Merlin\",\n symbol: \"BTC\",\n decimals: 18,\n rpcUrls: [\"https://endpoints.omniatech.io/v1/merlin/mainnet/public\"],\n blockExplorerUrls: [\"https://scan.merlinchain.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n merlinTestnet: {\n contractAddress: null,\n chainId: 686868,\n name: \"Merlin Testnet\",\n symbol: \"BTC\",\n decimals: 18,\n rpcUrls: [\"https://testnet-rpc.merlinchain.io/\"],\n blockExplorerUrls: [\"https://testnet-scan.merlinchain.io\"],\n type: null,\n vmType: \"EVM\"\n },\n bsquared: {\n contractAddress: null,\n chainId: 223,\n name: \"BSquared\",\n symbol: \"BTC\",\n decimals: 18,\n rpcUrls: [\"https://rpc.bsquared.network\"],\n blockExplorerUrls: [\"https://explorer.bsquared.network\"],\n type: null,\n vmType: \"EVM\"\n },\n bsquaredTestnet: {\n contractAddress: null,\n chainId: 1123,\n name: \"BSquared Testnet\",\n symbol: \"tBTC\",\n decimals: 18,\n rpcUrls: [\"https://testnet-rpc.bsquared.network\"],\n blockExplorerUrls: [\"https://testnet-explorer.bsquared.network\"],\n type: null,\n vmType: \"EVM\"\n },\n monadTestnet: {\n contractAddress: null,\n chainId: 10143,\n name: \"Monad Testnet\",\n symbol: \"MON\",\n decimals: 18,\n rpcUrls: [\"https://testnet-rpc.monad.xyz\"],\n blockExplorerUrls: [\"https://testnet.monadexplorer.com\"],\n type: null,\n vmType: \"EVM\"\n },\n bitlayer: {\n contractAddress: null,\n chainId: 200901,\n name: \"Bitlayer\",\n symbol: \"BTC\",\n decimals: 18,\n rpcUrls: [\"https://rpc.bitlayer.org\"],\n blockExplorerUrls: [\"https://www.btrscan.com\"],\n type: null,\n vmType: \"EVM\"\n },\n bitlayerTestnet: {\n contractAddress: null,\n chainId: 200810,\n name: \"Bitlayer Testnet\",\n symbol: \"BTC\",\n decimals: 18,\n rpcUrls: [\"https://testnet-rpc.bitlayer.org\"],\n blockExplorerUrls: [\"https://testnet-scan.bitlayer.org\"],\n type: null,\n vmType: \"EVM\"\n },\n \"5ire\": {\n contractAddress: null,\n chainId: 995,\n name: \"5irechain\",\n symbol: \"5ire\",\n decimals: 18,\n rpcUrls: [\"https://rpc.5ire.network\"],\n blockExplorerUrls: [\"https://5irescan.io/dashboard\"],\n type: null,\n vmType: \"EVM\"\n },\n bob: {\n contractAddress: null,\n chainId: 60808,\n name: \"Bob\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.gobob.xyzg\"],\n blockExplorerUrls: [\"https://explorer.gobob.xyz\"],\n type: null,\n vmType: \"EVM\"\n },\n load: {\n contractAddress: null,\n chainId: 9496,\n name: \"Load Network\",\n symbol: \"LOAD\",\n decimals: 18,\n rpcUrls: [\"https://alphanet.load.network\"],\n blockExplorerUrls: [\"https://explorer.load.network\"],\n type: null,\n vmType: \"EVM\"\n },\n \"0gGalileoTestnet\": {\n contractAddress: null,\n chainId: 16601,\n name: \"0G Galileo Testnet\",\n symbol: \"OG\",\n decimals: 18,\n rpcUrls: [\"https://evmrpc-testnet.0g.ai\"],\n blockExplorerUrls: [\"https://chainscan-galileo.0g.ai/\"],\n type: null,\n vmType: \"EVM\"\n },\n peaqTestnet: {\n contractAddress: null,\n chainId: 9990,\n name: \"Peaq Testnet\",\n symbol: \"PEAQ\",\n decimals: 18,\n rpcUrls: [\"https://peaq-agung.api.onfinality.io/public\"],\n blockExplorerUrls: [\"https://agung-testnet.subscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n peaqMainnet: {\n contractAddress: null,\n chainId: 3338,\n name: \"Peaq Mainnet\",\n symbol: \"PEAQ\",\n decimals: 18,\n rpcUrls: [\"https://quicknode.peaq.xyz/\"],\n blockExplorerUrls: [\"https://peaq.subscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n sonicMainnet: {\n contractAddress: null,\n chainId: 146,\n name: \"Sonic Mainnet\",\n symbol: \"S\",\n decimals: 18,\n rpcUrls: [\"https://rpc.soniclabs.com\"],\n blockExplorerUrls: [\"https://sonicscan.org\"],\n type: null,\n vmType: \"EVM\"\n },\n sonicBlazeTestnet: {\n contractAddress: null,\n chainId: 57054,\n name: \"Sonic Blaze Testnet\",\n symbol: \"S\",\n decimals: 18,\n rpcUrls: [\"https://rpc.blaze.soniclabs.com\"],\n blockExplorerUrls: [\"https://testnet.sonicscan.org/\"],\n type: null,\n vmType: \"EVM\"\n },\n holeskyTestnet: {\n contractAddress: null,\n chainId: 17e3,\n name: \"Holesky Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.holesky.ethpandaops.io\"],\n blockExplorerUrls: [\"https://holesky.etherscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n flowEvmMainnet: {\n contractAddress: null,\n chainId: 747,\n name: \"Flow EVM Mainnet\",\n symbol: \"FLOW\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.evm.nodes.onflow.org\"],\n blockExplorerUrls: [\"https://evm.flowscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n flowEvmTestnet: {\n contractAddress: null,\n chainId: 545,\n name: \"Flow EVM Testnet\",\n symbol: \"FLOW\",\n decimals: 18,\n rpcUrls: [\"https://testnet.evm.nodes.onflow.org\"],\n blockExplorerUrls: [\"https://evm-testnet.flowscan.io\"],\n type: null,\n vmType: \"EVM\"\n }\n };\n exports3.METAMASK_CHAIN_INFO = {\n /**\n * Information about the \"chronicleYellowstone\" chain.\n */\n yellowstone: {\n chainId: exports3.LIT_CHAINS[\"yellowstone\"].chainId,\n chainName: exports3.LIT_CHAINS[\"yellowstone\"].name,\n nativeCurrency: {\n name: exports3.LIT_CHAINS[\"yellowstone\"].symbol,\n symbol: exports3.LIT_CHAINS[\"yellowstone\"].symbol,\n decimals: exports3.LIT_CHAINS[\"yellowstone\"].decimals\n },\n rpcUrls: exports3.LIT_CHAINS[\"yellowstone\"].rpcUrls,\n blockExplorerUrls: exports3.LIT_CHAINS[\"yellowstone\"].blockExplorerUrls,\n iconUrls: [\"future\"]\n }\n };\n exports3.metamaskChainInfo = new Proxy(exports3.METAMASK_CHAIN_INFO, {\n get(target, prop, receiver) {\n deprecated(\"metamaskChainInfo is deprecated and will be removed in a future version. Use METAMASK_CHAIN_INFO instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LIT_RPC = {\n /**\n * Local Anvil RPC endpoint.\n */\n LOCAL_ANVIL: \"http://127.0.0.1:8545\",\n /**\n * Chronicle Yellowstone RPC endpoint - used for >= Datil-test\n * More info: https://app.conduit.xyz/published/view/chronicle-yellowstone-testnet-9qgmzfcohk\n */\n CHRONICLE_YELLOWSTONE: \"https://yellowstone-rpc.litprotocol.com\"\n };\n exports3.LIT_EVM_CHAINS = exports3.LIT_CHAINS;\n exports3.LIT_NETWORK = {\n DatilDev: \"datil-dev\",\n DatilTest: \"datil-test\",\n Datil: \"datil\",\n Custom: \"custom\"\n };\n exports3.LitNetwork = new Proxy(exports3.LIT_NETWORK, {\n get(target, prop, receiver) {\n deprecated(\"LitNetwork is deprecated and will be removed in a future version. Use LIT_NETWORK instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.RPC_URL_BY_NETWORK = {\n \"datil-dev\": exports3.LIT_RPC.CHRONICLE_YELLOWSTONE,\n \"datil-test\": exports3.LIT_RPC.CHRONICLE_YELLOWSTONE,\n datil: exports3.LIT_RPC.CHRONICLE_YELLOWSTONE,\n custom: exports3.LIT_RPC.LOCAL_ANVIL\n };\n exports3.RELAYER_URL_BY_NETWORK = {\n \"datil-dev\": \"https://datil-dev-relayer.getlit.dev\",\n \"datil-test\": \"https://datil-test-relayer.getlit.dev\",\n datil: \"https://datil-relayer.getlit.dev\",\n custom: \"http://localhost:3000\"\n };\n exports3.METAMASK_CHAIN_INFO_BY_NETWORK = {\n \"datil-dev\": exports3.METAMASK_CHAIN_INFO.yellowstone,\n \"datil-test\": exports3.METAMASK_CHAIN_INFO.yellowstone,\n datil: exports3.METAMASK_CHAIN_INFO.yellowstone,\n custom: exports3.METAMASK_CHAIN_INFO.yellowstone\n };\n exports3.HTTP = \"http://\";\n exports3.HTTPS = \"https://\";\n exports3.HTTP_BY_NETWORK = {\n \"datil-dev\": exports3.HTTPS,\n \"datil-test\": exports3.HTTPS,\n datil: exports3.HTTPS,\n custom: exports3.HTTP\n // default, can be changed by config\n };\n exports3.CENTRALISATION_BY_NETWORK = {\n \"datil-dev\": \"centralised\",\n \"datil-test\": \"decentralised\",\n datil: \"decentralised\",\n custom: \"unknown\"\n };\n exports3.LIT_SVM_CHAINS = {\n solana: {\n name: \"Solana\",\n symbol: \"SOL\",\n decimals: 9,\n rpcUrls: [\"https://api.mainnet-beta.solana.com\"],\n blockExplorerUrls: [\"https://explorer.solana.com/\"],\n vmType: \"SVM\"\n },\n solanaDevnet: {\n name: \"Solana Devnet\",\n symbol: \"SOL\",\n decimals: 9,\n rpcUrls: [\"https://api.devnet.solana.com\"],\n blockExplorerUrls: [\"https://explorer.solana.com/\"],\n vmType: \"SVM\"\n },\n solanaTestnet: {\n name: \"Solana Testnet\",\n symbol: \"SOL\",\n decimals: 9,\n rpcUrls: [\"https://api.testnet.solana.com\"],\n blockExplorerUrls: [\"https://explorer.solana.com/\"],\n vmType: \"SVM\"\n }\n };\n exports3.LIT_COSMOS_CHAINS = {\n cosmos: {\n name: \"Cosmos\",\n symbol: \"ATOM\",\n decimals: 6,\n chainId: \"cosmoshub-4\",\n rpcUrls: [\"https://lcd-cosmoshub.keplr.app\"],\n blockExplorerUrls: [\"https://atomscan.com/\"],\n vmType: \"CVM\"\n },\n kyve: {\n name: \"Kyve\",\n symbol: \"KYVE\",\n decimals: 6,\n chainId: \"korellia\",\n rpcUrls: [\"https://api.korellia.kyve.network\"],\n blockExplorerUrls: [\"https://explorer.kyve.network/\"],\n vmType: \"CVM\"\n },\n evmosCosmos: {\n name: \"EVMOS Cosmos\",\n symbol: \"EVMOS\",\n decimals: 18,\n chainId: \"evmos_9001-2\",\n rpcUrls: [\"https://rest.bd.evmos.org:1317\"],\n blockExplorerUrls: [\"https://evmos.bigdipper.live\"],\n vmType: \"CVM\"\n },\n evmosCosmosTestnet: {\n name: \"Evmos Cosmos Testnet\",\n symbol: \"EVMOS\",\n decimals: 18,\n chainId: \"evmos_9000-4\",\n rpcUrls: [\"https://rest.bd.evmos.dev:1317\"],\n blockExplorerUrls: [\"https://testnet.bigdipper.live\"],\n vmType: \"CVM\"\n },\n cheqdMainnet: {\n name: \"Cheqd Mainnet\",\n symbol: \"CHEQ\",\n decimals: 9,\n chainId: \"cheqd-mainnet-1\",\n rpcUrls: [\"https://api.cheqd.net\"],\n blockExplorerUrls: [\"https://explorer.cheqd.io\"],\n vmType: \"CVM\"\n },\n cheqdTestnet: {\n name: \"Cheqd Testnet\",\n symbol: \"CHEQ\",\n decimals: 9,\n chainId: \"cheqd-testnet-6\",\n rpcUrls: [\"https://api.cheqd.network\"],\n blockExplorerUrls: [\"https://testnet-explorer.cheqd.io\"],\n vmType: \"CVM\"\n },\n juno: {\n name: \"Juno\",\n symbol: \"JUNO\",\n decimals: 6,\n chainId: \"juno-1\",\n rpcUrls: [\"https://rest.cosmos.directory/juno\"],\n blockExplorerUrls: [\"https://www.mintscan.io/juno\"],\n vmType: \"CVM\"\n }\n };\n exports3.ALL_LIT_CHAINS = {\n ...exports3.LIT_CHAINS,\n ...exports3.LIT_SVM_CHAINS,\n ...exports3.LIT_COSMOS_CHAINS\n };\n exports3.LOCAL_STORAGE_KEYS = {\n AUTH_COSMOS_SIGNATURE: \"lit-auth-cosmos-signature\",\n AUTH_SIGNATURE: \"lit-auth-signature\",\n AUTH_SOL_SIGNATURE: \"lit-auth-sol-signature\",\n WEB3_PROVIDER: \"lit-web3-provider\",\n KEY_PAIR: \"lit-comms-keypair\",\n SESSION_KEY: \"lit-session-key\",\n WALLET_SIGNATURE: \"lit-wallet-sig\"\n };\n exports3.SYMM_KEY_ALGO_PARAMS = {\n name: \"AES-CBC\",\n length: 256\n };\n exports3.LIT_NETWORKS = {\n \"datil-dev\": [],\n \"datil-test\": [],\n datil: [],\n custom: []\n };\n exports3.LIT_SESSION_KEY_URI = \"lit:session:\";\n exports3.AUTH_METHOD_TYPE_IDS = {\n WEBAUTHN: 3,\n DISCORD: 4,\n GOOGLE: 5,\n GOOGLE_JWT: 6\n };\n exports3.PKP_CLIENT_SUPPORTED_CHAINS = [\"eth\", \"cosmos\"];\n exports3.SIWE_DELEGATION_URI = \"lit:capability:delegation\";\n exports3.LIT_ACTION_IPFS_HASH = \"QmUjX8MW6StQ7NKNdaS6g4RMkvN5hcgtKmEi8Mca6oX4t3\";\n exports3.VMTYPE = {\n EVM: \"EVM\",\n SVM: \"SVM\",\n CVM: \"CVM\"\n };\n exports3.LIT_CURVE = {\n BLS: \"BLS\",\n EcdsaK256: \"K256\",\n EcdsaCaitSith: \"ECDSA_CAIT_SITH\",\n // Legacy alias of K256\n EcdsaCAITSITHP256: \"EcdsaCaitSithP256\"\n };\n exports3.EITHER_TYPE = {\n ERROR: \"ERROR\",\n SUCCESS: \"SUCCESS\"\n };\n exports3.AUTH_METHOD_TYPE = {\n EthWallet: 1,\n LitAction: 2,\n WebAuthn: 3,\n Discord: 4,\n Google: 5,\n GoogleJwt: 6,\n AppleJwt: 8,\n StytchOtp: 9,\n StytchEmailFactorOtp: 10,\n StytchSmsFactorOtp: 11,\n StytchWhatsAppFactorOtp: 12,\n StytchTotpFactorOtp: 13\n };\n exports3.AuthMethodType = new Proxy(exports3.AUTH_METHOD_TYPE, {\n get(target, prop, receiver) {\n deprecated(\"AuthMethodType is deprecated and will be removed in a future version. Use AUTH_METHOD_TYPE instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.AUTH_METHOD_SCOPE = {\n NoPermissions: 0,\n SignAnything: 1,\n PersonalSign: 2\n };\n exports3.AuthMethodScope = new Proxy(exports3.AUTH_METHOD_SCOPE, {\n get(target, prop, receiver) {\n deprecated(\"AuthMethodScope is deprecated and will be removed in a future version. Use AUTH_METHOD_SCOPE instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.PROVIDER_TYPE = {\n Discord: \"discord\",\n Google: \"google\",\n EthWallet: \"ethwallet\",\n WebAuthn: \"webauthn\",\n Apple: \"apple\",\n StytchOtp: \"stytchOtp\",\n StytchEmailFactorOtp: \"stytchEmailFactorOtp\",\n StytchSmsFactorOtp: \"stytchSmsFactorOtp\",\n StytchWhatsAppFactorOtp: \"stytchWhatsAppFactorOtp\",\n StytchTotpFactor: \"stytchTotpFactor\"\n };\n exports3.ProviderType = new Proxy(exports3.PROVIDER_TYPE, {\n get(target, prop, receiver) {\n deprecated(\"ProviderType is deprecated and will be removed in a future version. Use PROVIDER_TYPE instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.STAKING_STATES = {\n Active: 0,\n NextValidatorSetLocked: 1,\n ReadyForNextEpoch: 2,\n Unlocked: 3,\n Paused: 4,\n Restore: 5\n };\n exports3.StakingStates = new Proxy(exports3.STAKING_STATES, {\n get(target, prop, receiver) {\n deprecated(\"StakingStates is deprecated and will be removed in a future version. Use STAKING_STATES instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.RELAY_AUTH_STATUS = {\n InProgress: \"InProgress\",\n Succeeded: \"Succeeded\",\n Failed: \"Failed\"\n };\n exports3.RelayAuthStatus = new Proxy(exports3.RELAY_AUTH_STATUS, {\n get(target, prop, receiver) {\n deprecated(\"RelayAuthStatus is deprecated and will be removed in a future version. Use RELAY_AUTH_STATUS instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LIT_RESOURCE_PREFIX = {\n AccessControlCondition: \"lit-accesscontrolcondition\",\n PKP: \"lit-pkp\",\n RLI: \"lit-ratelimitincrease\",\n LitAction: \"lit-litaction\"\n };\n exports3.LitResourcePrefix = new Proxy(exports3.LIT_RESOURCE_PREFIX, {\n get(target, prop, receiver) {\n deprecated(\"LitResourcePrefix is deprecated and will be removed in a future version. Use LIT_RESOURCE_PREFIX instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LIT_ABILITY = {\n /**\n * This is the ability to process an encryption access control condition.\n * The resource will specify the corresponding hashed key value of the\n * access control condition.\n */\n AccessControlConditionDecryption: \"access-control-condition-decryption\",\n /**\n * This is the ability to process a signing access control condition.\n * The resource will specify the corresponding hashed key value of the\n * access control condition.\n */\n AccessControlConditionSigning: \"access-control-condition-signing\",\n /**\n * This is the ability to use a PKP for signing purposes. The resource will specify\n * the corresponding PKP token ID.\n */\n PKPSigning: \"pkp-signing\",\n /**\n * This is the ability to use a Rate Limit Increase (Capacity Credits NFT) token during\n * authentication with the nodes. The resource will specify the corresponding\n * Capacity Credits NFT token ID.\n */\n RateLimitIncreaseAuth: \"rate-limit-increase-auth\",\n /**\n * This is the ability to execute a Lit Action. The resource will specify the\n * corresponding Lit Action IPFS CID.\n */\n LitActionExecution: \"lit-action-execution\"\n };\n exports3.LitAbility = new Proxy(exports3.LIT_ABILITY, {\n get(target, prop, receiver) {\n deprecated(\"LitAbility is deprecated and will be removed in a future version. Use LIT_ABILITY instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LIT_RECAP_ABILITY = {\n Decryption: \"Decryption\",\n Signing: \"Signing\",\n Auth: \"Auth\",\n Execution: \"Execution\"\n };\n exports3.LitRecapAbility = new Proxy(exports3.LIT_RECAP_ABILITY, {\n get(target, prop, receiver) {\n deprecated(\"LitRecapAbility is deprecated and will be removed in a future version. Use LIT_RECAP_ABILITY instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LIT_NAMESPACE = {\n Auth: \"Auth\",\n Threshold: \"Threshold\"\n };\n exports3.LitNamespace = new Proxy(exports3.LIT_NAMESPACE, {\n get(target, prop, receiver) {\n deprecated(\"LitNamespace is deprecated and will be removed in a future version. Use LIT_NAMESPACE instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LOG_LEVEL = {\n INFO: 0,\n DEBUG: 1,\n WARN: 2,\n ERROR: 3,\n FATAL: 4,\n TIMING_START: 5,\n TIMING_END: 6,\n OFF: -1\n };\n exports3.LogLevel = new Proxy(exports3.LOG_LEVEL, {\n get(target, prop, receiver) {\n deprecated(\"LogLevel is deprecated and will be removed in a future version. Use LOG_LEVEL instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.FALLBACK_IPFS_GATEWAYS = [\n \"https://flk-ipfs.io/ipfs/\",\n \"https://litprotocol.mypinata.cloud/ipfs/\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/datil.cjs\n var require_datil = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/datil.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175188\",\n \"rpcUrl\": \"https://yellowstone-rpc.litprotocol.com\",\n \"chainName\": \"yellowstone\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x9c9D147dad75D8B9Bd327405098D65C727296B54\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x21d636d95eE71150c0c3Ffa79268c989a329d1CE\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwnerOrDevopsAdmin\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DevopsAdminSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"validators\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"adminSetValidatorsInCurrentEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminStakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setDevopsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"valueName\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ValueMustBeNonzero\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AttestedWalletRegistered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"registerAttestedWallet\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeAttestedPubKeyMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"pubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.PubKeyMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isRecentValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xB87CcFf487B84b60c09DBE15337a46bf5a9e0680\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xd78089bAAe410f5d0eae31D0D56157c73a3Ff98B\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xF182d6bEf16Ba77e69372dD096D8B70Bc3d5B475\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"rootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"adminSetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x487A9D096BB4B7Ac1520Cb12370e31e677B175EA\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x01205d94Fee4d9F59A4aB24bf80D11d4DdAf6Eed\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x5B55ee57C459a31072145F2Fc00b35de20520adD\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterialV2\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypesV2\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x213Db6E1446928E19588269bEF7dFc9187c4829A\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getPKPPubKeysByAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x4BB8681d3a24F130cC746C7DC31167C93D72d32b\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xE393BCD2a9099C903D28949Bac2C4cEd21E55415\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xF19ea8634969730cB51BFEe2E2A5353062053C14\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/datil-dev.cjs\n var require_datil_dev = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/datil-dev.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175188\",\n \"rpcUrl\": \"https://yellowstone-rpc.litprotocol.com\",\n \"chainName\": \"yellowstone\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x77F277D4858Ae589b2263FEfd50CaD7838fE4741\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xD4507CD392Af2c80919219d7896508728f6A623F\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwnerOrDevopsAdmin\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DevopsAdminSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"validators\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"adminSetValidatorsInCurrentEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminStakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setDevopsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"valueName\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ValueMustBeNonzero\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AttestedWalletRegistered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"registerAttestedWallet\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeAttestedPubKeyMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"pubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.PubKeyMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isRecentValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x116eBFb474C6aa13e1B8b19253fd0E3f226A982f\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x81d8f0e945E3Bdc735dA3E19C4Df77a8B91046Cd\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xbc01f21C58Ca83f25b09338401D53D4c2344D1d9\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"rootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"adminSetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x02C4242F72d62c8fEF2b2DB088A35a9F4ec741C7\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x1A12D5B3D6A52B3bDe0468900795D35ce994ac2b\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xCa9C62fB4ceA8831eBb6fD9fE747Cc372515CF7f\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterialV2\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypesV2\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xf64638F1eb3b064f5443F7c9e2Dc050ed535D891\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getPKPPubKeysByAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x784A743bBBB5f5225CeC7979A3304179be17D66d\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xC60051658E346554C1F572ef3Aa4bD8596E026b6\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xbB23168855efe735cE9e6fD6877bAf13E02c410f\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/datil-test.cjs\n var require_datil_test = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/datil-test.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175188\",\n \"rpcUrl\": \"https://yellowstone-rpc.litprotocol.com\",\n \"chainName\": \"yellowstone\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xCa3c64e7D8cA743aeD2B2d20DCA3233f400710E2\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xdec37933239846834b3BfD408913Ed3dbEf6588F\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwnerOrDevopsAdmin\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DevopsAdminSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"validators\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"adminSetValidatorsInCurrentEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminStakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setDevopsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"valueName\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ValueMustBeNonzero\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AttestedWalletRegistered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"registerAttestedWallet\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeAttestedPubKeyMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"pubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.PubKeyMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isRecentValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"CloneNet\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x1f4233b6C5b84978c458FA66412E4ae6d0561104\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminAddActiveStakingContract\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRemoveActiveStakingContract\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveStakingContracts\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getAllActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"epoch\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentValidatorCountForConsensus\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"activeUnkickedValidators\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.StakingAggregateDetails\",\n \"name\": \"details\",\n \"type\": \"tuple\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.KeyedStakingAggregateDetails[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"numActiveStakingContracts\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x8281f3A62f7de320B3a634e6814BeC36a1AA92bd\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xFA1208f5275a01Be1b4A6F6764d388FDcF5Bf85e\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x65C3d057aef28175AfaC61a74cc6b27E88405583\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"rootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"adminSetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x6a0f439f064B7167A8Ea6B22AcC07ae5360ee0d1\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xa17f11B7f828EEc97926E56D98D5AB63A0231b77\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x341E5273E2E2ea3c4aDa4101F008b1261E58510D\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterialV2\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypesV2\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x60C1ddC8b9e38F730F0e7B70A2F84C1A98A69167\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getPKPPubKeysByAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xaC1d01692EBA0E457134Eb7EB8bb96ee9D91FcdD\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x5DD7a0FD581aB11a5720bE7E388e63346bC266fe\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xd7188e0348F1dA8c9b3d6e614844cbA22329B99E\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/cayenne.cjs\n var require_cayenne = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/cayenne.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x523642999938B5e9085E1e7dF38Eac96DC3fdD91\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x5bFa704aF947b3b0f966e4248DED7bfa6edeF952\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwnerOrDevopsAdmin\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DevopsAdminSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"validators\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"adminSetValidatorsInCurrentEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminStakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setDevopsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"valueName\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ValueMustBeNonzero\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AttestedWalletRegistered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"registerAttestedWallet\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeAttestedPubKeyMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"pubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.PubKeyMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isRecentValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0xD4e3D27d21D6D6d596b6524610C486F8A9c70958\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x53695556f8a1a064EdFf91767f15652BbfaFaD04\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x4B5E97F2D811520e031A8F924e698B329ad83E29\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"rootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"adminSetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x58582b93d978F30b4c4E812A16a7b31C035A69f7\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x19593CbBC56Ddd339Fde26278A544a25166C2388\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0xF02b6D6b0970DB3810963300a6Ad38D8429c4cdb\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterialV2\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypesV2\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0xD01c9C30f8F6fa443721629775e1CC7DD9c9e209\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getPKPPubKeysByAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0xeD46dDcbFF662ad89b0987E0DFE2949901498Da6\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x6fc7834a538cDfF7B937490D9D11b4018692c5d5\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x30a5456Ea0D81FB81b82C2949eE1c798EBC933AC\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/habanero.cjs\n var require_habanero = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/habanero.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175177\",\n \"rpcUrl\": \"https://lit-protocol.calderachain.xyz/http\",\n \"chainName\": \"lit\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x50f6722544937b72EcaDFDE3386BfdDbdBB3103B\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0xde8627067188C0063384eC682D9187c7d7673934\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwnerOrDevopsAdmin\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DevopsAdminSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"validators\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"adminSetValidatorsInCurrentEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminStakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setDevopsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"valueName\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ValueMustBeNonzero\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AttestedWalletRegistered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"registerAttestedWallet\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeAttestedPubKeyMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"pubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.PubKeyMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isRecentValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x8c14AB9cF3edca9D28Ddef54bE895078352EDF83\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x53695556f8a1a064EdFf91767f15652BbfaFaD04\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0xaaFc41e3615108E558ECf1d873e1500e375b2328\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"rootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"adminSetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x80182Ec46E3dD7Bb8fa4f89b48d303bD769465B2\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0xf8a84406aB814dc3a25Ea2e3608cCb632f672427\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x087995cc8BE0Bd6C19b1c7A01F9DB6D2CfFe0c5C\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterialV2\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypesV2\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x1B76BFAA063A35c88c7e82066b32eEa91CB266C6\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getPKPPubKeysByAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x728C10dA8A152b71eAB4F8adD6225080323B506E\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0xEC97F162940883ed1feeccd9fb741f11a1F996e2\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x4AdDb026fbC0a329a75E77f179FFC78c896ac0e6\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/internalDev.cjs\n var require_internalDev = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/internalDev.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175188\",\n \"rpcUrl\": \"https://yellowstone-rpc.litprotocol.com\",\n \"chainName\": \"yellowstone\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x8D96F8B16338aB9D12339A508b5a3a39E61F8D74\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x386150020B7AdD47B03D0cf9f4cdaA4451F7c1D4\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwnerOrDevopsAdmin\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DevopsAdminSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"validators\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"adminSetValidatorsInCurrentEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminStakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setDevopsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"valueName\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ValueMustBeNonzero\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AttestedWalletRegistered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"registerAttestedWallet\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeAttestedPubKeyMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"pubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.PubKeyMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isRecentValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x7007C19435F504AF7a60f85862b9E756806aBF5A\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0xd78089bAAe410f5d0eae31D0D56157c73a3Ff98B\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0xBCb7EFc7FDB0b95Ce7C76a3D7faE12217828337D\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"rootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"adminSetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x1CaE44eD5e298C420142F5Bfdd5A72a0AFd2C95d\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0xa24EEee69493F5364d7A8de809c3547420616206\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x361Dc112F388c1c0F2a6954b6b2da0461791bB80\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterialV2\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypesV2\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x8087D9fcBC839ff6B493e47FD02A15F4EF460b75\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getPKPPubKeysByAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x9189D2C972373D8769F0e343d994204babb7197C\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0xF473cd925e7A3D6804fB74CE2F484CA8BCa35Bfb\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x49A8a438AAFF2D3EfD22993ECfb58923C28155A3\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/manzano.cjs\n var require_manzano = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/manzano.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175177\",\n \"rpcUrl\": \"https://lit-protocol.calderachain.xyz/http\",\n \"chainName\": \"lit\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x82F0a170CEDFAaab623513EE558DB19f5D787C8D\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xBC7F8d7864002b6629Ab49781D5199C8dD1DDcE1\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwnerOrDevopsAdmin\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DevopsAdminSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"validators\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"adminSetValidatorsInCurrentEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminStakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setDevopsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"valueName\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ValueMustBeNonzero\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AttestedWalletRegistered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"registerAttestedWallet\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeAttestedPubKeyMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"pubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.PubKeyMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isRecentValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xBd119B72B52d58A7dDd771A2E4984d106Da0D1DB\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x53695556f8a1a064EdFf91767f15652BbfaFaD04\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xF6b0fE0d0C27C855f7f2e021fAd028af02cC52cb\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"rootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"adminSetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x3c3ad2d238757Ea4AF87A8624c716B11455c1F9A\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x9b1B8aD8A4144Be9F8Fb5C4766eE37CE0754AEAb\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x24d646b9510e56af8B15de759331d897C4d66044\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterialV2\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypesV2\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x974856dB1C4259915b709E6BcA26A002fbdd31ea\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getPKPPubKeysByAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xa87fe043AD341A1Dc8c5E48d75BA9f712256fe7e\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x180BA6Ec983019c578004D91c08897c12d78F516\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xC52b72E2AD3dC58B7d23197575fb48A4523fa734\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/datil.cjs\n var require_datil2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/datil.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175188\",\n \"rpcUrl\": \"https://yellowstone-rpc.litprotocol.com\",\n \"chainName\": \"yellowstone\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x9c9D147dad75D8B9Bd327405098D65C727296B54\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x21d636d95eE71150c0c3Ffa79268c989a329d1CE\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xB87CcFf487B84b60c09DBE15337a46bf5a9e0680\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xd78089bAAe410f5d0eae31D0D56157c73a3Ff98B\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xF182d6bEf16Ba77e69372dD096D8B70Bc3d5B475\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x487A9D096BB4B7Ac1520Cb12370e31e677B175EA\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x01205d94Fee4d9F59A4aB24bf80D11d4DdAf6Eed\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x5B55ee57C459a31072145F2Fc00b35de20520adD\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x213Db6E1446928E19588269bEF7dFc9187c4829A\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x4BB8681d3a24F130cC746C7DC31167C93D72d32b\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xE393BCD2a9099C903D28949Bac2C4cEd21E55415\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xF19ea8634969730cB51BFEe2E2A5353062053C14\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"setDefaultRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/cayenne.cjs\n var require_cayenne2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/cayenne.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x523642999938B5e9085E1e7dF38Eac96DC3fdD91\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x5bFa704aF947b3b0f966e4248DED7bfa6edeF952\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0xD4e3D27d21D6D6d596b6524610C486F8A9c70958\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x53695556f8a1a064EdFf91767f15652BbfaFaD04\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x4B5E97F2D811520e031A8F924e698B329ad83E29\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x58582b93d978F30b4c4E812A16a7b31C035A69f7\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x19593CbBC56Ddd339Fde26278A544a25166C2388\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0xF02b6D6b0970DB3810963300a6Ad38D8429c4cdb\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0xD01c9C30f8F6fa443721629775e1CC7DD9c9e209\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0xeD46dDcbFF662ad89b0987E0DFE2949901498Da6\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x6fc7834a538cDfF7B937490D9D11b4018692c5d5\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x30a5456Ea0D81FB81b82C2949eE1c798EBC933AC\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"setDefaultRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/datil-dev.cjs\n var require_datil_dev2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/datil-dev.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175188\",\n \"rpcUrl\": \"https://yellowstone-rpc.litprotocol.com\",\n \"chainName\": \"yellowstone\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x77F277D4858Ae589b2263FEfd50CaD7838fE4741\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xD4507CD392Af2c80919219d7896508728f6A623F\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x116eBFb474C6aa13e1B8b19253fd0E3f226A982f\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x81d8f0e945E3Bdc735dA3E19C4Df77a8B91046Cd\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xbc01f21C58Ca83f25b09338401D53D4c2344D1d9\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x02C4242F72d62c8fEF2b2DB088A35a9F4ec741C7\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x1A12D5B3D6A52B3bDe0468900795D35ce994ac2b\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xCa9C62fB4ceA8831eBb6fD9fE747Cc372515CF7f\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xf64638F1eb3b064f5443F7c9e2Dc050ed535D891\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x784A743bBBB5f5225CeC7979A3304179be17D66d\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xC60051658E346554C1F572ef3Aa4bD8596E026b6\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xbB23168855efe735cE9e6fD6877bAf13E02c410f\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"setDefaultRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/datil-test.cjs\n var require_datil_test2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/datil-test.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175188\",\n \"rpcUrl\": \"https://yellowstone-rpc.litprotocol.com\",\n \"chainName\": \"yellowstone\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xCa3c64e7D8cA743aeD2B2d20DCA3233f400710E2\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xdec37933239846834b3BfD408913Ed3dbEf6588F\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"CloneNet\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x1f4233b6C5b84978c458FA66412E4ae6d0561104\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminAddActiveStakingContract\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRemoveActiveStakingContract\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveStakingContracts\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getAllActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"epoch\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentValidatorCountForConsensus\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"activeUnkickedValidators\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.StakingAggregateDetails\",\n \"name\": \"details\",\n \"type\": \"tuple\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.KeyedStakingAggregateDetails[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"numActiveStakingContracts\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x8281f3A62f7de320B3a634e6814BeC36a1AA92bd\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xFA1208f5275a01Be1b4A6F6764d388FDcF5Bf85e\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x65C3d057aef28175AfaC61a74cc6b27E88405583\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x6a0f439f064B7167A8Ea6B22AcC07ae5360ee0d1\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xa17f11B7f828EEc97926E56D98D5AB63A0231b77\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x341E5273E2E2ea3c4aDa4101F008b1261E58510D\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x60C1ddC8b9e38F730F0e7B70A2F84C1A98A69167\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xaC1d01692EBA0E457134Eb7EB8bb96ee9D91FcdD\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x5DD7a0FD581aB11a5720bE7E388e63346bC266fe\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xd7188e0348F1dA8c9b3d6e614844cbA22329B99E\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"setDefaultRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/habanero.cjs\n var require_habanero2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/habanero.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175177\",\n \"rpcUrl\": \"https://lit-protocol.calderachain.xyz/http\",\n \"chainName\": \"lit\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x50f6722544937b72EcaDFDE3386BfdDbdBB3103B\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0xde8627067188C0063384eC682D9187c7d7673934\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x8c14AB9cF3edca9D28Ddef54bE895078352EDF83\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x53695556f8a1a064EdFf91767f15652BbfaFaD04\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0xaaFc41e3615108E558ECf1d873e1500e375b2328\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x80182Ec46E3dD7Bb8fa4f89b48d303bD769465B2\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0xf8a84406aB814dc3a25Ea2e3608cCb632f672427\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x087995cc8BE0Bd6C19b1c7A01F9DB6D2CfFe0c5C\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x1B76BFAA063A35c88c7e82066b32eEa91CB266C6\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x728C10dA8A152b71eAB4F8adD6225080323B506E\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0xEC97F162940883ed1feeccd9fb741f11a1F996e2\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x4AdDb026fbC0a329a75E77f179FFC78c896ac0e6\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"setDefaultRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/internalDev.cjs\n var require_internalDev2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/internalDev.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175188\",\n \"rpcUrl\": \"https://yellowstone-rpc.litprotocol.com\",\n \"chainName\": \"yellowstone\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x8D96F8B16338aB9D12339A508b5a3a39E61F8D74\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x386150020B7AdD47B03D0cf9f4cdaA4451F7c1D4\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x7007C19435F504AF7a60f85862b9E756806aBF5A\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0xd78089bAAe410f5d0eae31D0D56157c73a3Ff98B\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0xBCb7EFc7FDB0b95Ce7C76a3D7faE12217828337D\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x1CaE44eD5e298C420142F5Bfdd5A72a0AFd2C95d\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0xa24EEee69493F5364d7A8de809c3547420616206\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x361Dc112F388c1c0F2a6954b6b2da0461791bB80\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x8087D9fcBC839ff6B493e47FD02A15F4EF460b75\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x9189D2C972373D8769F0e343d994204babb7197C\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0xF473cd925e7A3D6804fB74CE2F484CA8BCa35Bfb\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x49A8a438AAFF2D3EfD22993ECfb58923C28155A3\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"setDefaultRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/manzano.cjs\n var require_manzano2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/manzano.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175177\",\n \"rpcUrl\": \"https://lit-protocol.calderachain.xyz/http\",\n \"chainName\": \"lit\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x82F0a170CEDFAaab623513EE558DB19f5D787C8D\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xBC7F8d7864002b6629Ab49781D5199C8dD1DDcE1\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xBd119B72B52d58A7dDd771A2E4984d106Da0D1DB\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x53695556f8a1a064EdFf91767f15652BbfaFaD04\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xF6b0fE0d0C27C855f7f2e021fAd028af02cC52cb\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x3c3ad2d238757Ea4AF87A8624c716B11455c1F9A\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x9b1B8aD8A4144Be9F8Fb5C4766eE37CE0754AEAb\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x24d646b9510e56af8B15de759331d897C4d66044\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x974856dB1C4259915b709E6BcA26A002fbdd31ea\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xa87fe043AD341A1Dc8c5E48d75BA9f712256fe7e\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x180BA6Ec983019c578004D91c08897c12d78F516\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"setDefaultRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xC52b72E2AD3dC58B7d23197575fb48A4523fa734\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/index.cjs\n var require_dist3 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/index.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var _datil = require_datil();\n var _datilDev = require_datil_dev();\n var _datilTest = require_datil_test();\n var _cayenne = require_cayenne();\n var _habanero = require_habanero();\n var _internalDev = require_internalDev();\n var _manzano = require_manzano();\n var datil = require_datil2();\n var cayenne = require_cayenne2();\n var datilDev = require_datil_dev2();\n var datilTest = require_datil_test2();\n var habanero = require_habanero2();\n var internalDev = require_internalDev2();\n var manzano = require_manzano2();\n module.exports = {\n _datil,\n _datilDev,\n _datilTest,\n _cayenne,\n _habanero,\n _internalDev,\n _manzano,\n datil,\n cayenne,\n datilDev,\n datilTest,\n habanero,\n internalDev,\n manzano\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/constants/mappers.js\n var require_mappers = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/constants/mappers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.GLOBAL_OVERWRITE_IPFS_CODE_BY_NETWORK = exports3.NETWORK_CONTEXT_BY_NETWORK = void 0;\n var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3));\n var depd_1 = tslib_1.__importDefault(require_browser2());\n var contracts_1 = require_dist3();\n var deprecated = (0, depd_1.default)(\"lit-js-sdk:constants:mappers\");\n exports3.NETWORK_CONTEXT_BY_NETWORK = {\n \"datil-dev\": contracts_1.datilDev,\n \"datil-test\": contracts_1.datilTest,\n datil: contracts_1.datil,\n // just use datil dev abis for custom\n custom: contracts_1.datilDev\n };\n exports3.GLOBAL_OVERWRITE_IPFS_CODE_BY_NETWORK = {\n \"datil-dev\": false,\n \"datil-test\": false,\n datil: false,\n custom: false\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/constants/endpoints.js\n var require_endpoints = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/constants/endpoints.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LIT_ENDPOINT = exports3.LIT_ENDPOINT_VERSION = void 0;\n exports3.LIT_ENDPOINT_VERSION = {\n V0: \"/\",\n V1: \"/v1\"\n };\n exports3.LIT_ENDPOINT = {\n HANDSHAKE: {\n path: \"/web/handshake\",\n version: exports3.LIT_ENDPOINT_VERSION.V0\n },\n SIGN_SESSION_KEY: {\n path: \"/web/sign_session_key\",\n version: exports3.LIT_ENDPOINT_VERSION.V1\n },\n EXECUTE_JS: {\n path: \"/web/execute\",\n version: exports3.LIT_ENDPOINT_VERSION.V1\n },\n PKP_SIGN: {\n path: \"/web/pkp/sign\",\n version: exports3.LIT_ENDPOINT_VERSION.V1\n },\n PKP_CLAIM: {\n path: \"/web/pkp/claim\",\n version: exports3.LIT_ENDPOINT_VERSION.V0\n },\n SIGN_ACCS: {\n path: \"/web/signing/access_control_condition\",\n version: exports3.LIT_ENDPOINT_VERSION.V0\n },\n ENCRYPTION_SIGN: {\n path: \"/web/encryption/sign\",\n version: exports3.LIT_ENDPOINT_VERSION.V0\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/interfaces/i-errors.js\n var require_i_errors = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/interfaces/i-errors.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n }\n });\n\n // ../../../node_modules/.pnpm/assertion-error@1.1.0/node_modules/assertion-error/index.js\n var require_assertion_error = __commonJS({\n \"../../../node_modules/.pnpm/assertion-error@1.1.0/node_modules/assertion-error/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n function exclude() {\n var excludes = [].slice.call(arguments);\n function excludeProps(res, obj) {\n Object.keys(obj).forEach(function(key) {\n if (!~excludes.indexOf(key))\n res[key] = obj[key];\n });\n }\n return function extendExclude() {\n var args = [].slice.call(arguments), i3 = 0, res = {};\n for (; i3 < args.length; i3++) {\n excludeProps(res, args[i3]);\n }\n return res;\n };\n }\n module.exports = AssertionError;\n function AssertionError(message, _props, ssf) {\n var extend = exclude(\"name\", \"message\", \"stack\", \"constructor\", \"toJSON\"), props = extend(_props || {});\n this.message = message || \"Unspecified AssertionError\";\n this.showDiff = false;\n for (var key in props) {\n this[key] = props[key];\n }\n ssf = ssf || AssertionError;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, ssf);\n } else {\n try {\n throw new Error();\n } catch (e2) {\n this.stack = e2.stack;\n }\n }\n }\n AssertionError.prototype = Object.create(Error.prototype);\n AssertionError.prototype.name = \"AssertionError\";\n AssertionError.prototype.constructor = AssertionError;\n AssertionError.prototype.toJSON = function(stack) {\n var extend = exclude(\"constructor\", \"toJSON\", \"stack\"), props = extend({ name: this.name }, this);\n if (false !== stack && this.stack) {\n props.stack = this.stack;\n }\n return props;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/sprintf-js@1.1.3/node_modules/sprintf-js/src/sprintf.js\n var require_sprintf = __commonJS({\n \"../../../node_modules/.pnpm/sprintf-js@1.1.3/node_modules/sprintf-js/src/sprintf.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n !function() {\n \"use strict\";\n var re = {\n not_string: /[^s]/,\n not_bool: /[^t]/,\n not_type: /[^T]/,\n not_primitive: /[^v]/,\n number: /[diefg]/,\n numeric_arg: /[bcdiefguxX]/,\n json: /[j]/,\n not_json: /[^j]/,\n text: /^[^\\x25]+/,\n modulo: /^\\x25{2}/,\n placeholder: /^\\x25(?:([1-9]\\d*)\\$|\\(([^)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,\n key: /^([a-z_][a-z_\\d]*)/i,\n key_access: /^\\.([a-z_][a-z_\\d]*)/i,\n index_access: /^\\[(\\d+)\\]/,\n sign: /^[+-]/\n };\n function sprintf(key) {\n return sprintf_format(sprintf_parse(key), arguments);\n }\n function vsprintf(fmt, argv2) {\n return sprintf.apply(null, [fmt].concat(argv2 || []));\n }\n function sprintf_format(parse_tree, argv2) {\n var cursor = 1, tree_length = parse_tree.length, arg, output = \"\", i3, k4, ph, pad6, pad_character, pad_length, is_positive, sign3;\n for (i3 = 0; i3 < tree_length; i3++) {\n if (typeof parse_tree[i3] === \"string\") {\n output += parse_tree[i3];\n } else if (typeof parse_tree[i3] === \"object\") {\n ph = parse_tree[i3];\n if (ph.keys) {\n arg = argv2[cursor];\n for (k4 = 0; k4 < ph.keys.length; k4++) {\n if (arg == void 0) {\n throw new Error(sprintf('[sprintf] Cannot access property \"%s\" of undefined value \"%s\"', ph.keys[k4], ph.keys[k4 - 1]));\n }\n arg = arg[ph.keys[k4]];\n }\n } else if (ph.param_no) {\n arg = argv2[ph.param_no];\n } else {\n arg = argv2[cursor++];\n }\n if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {\n arg = arg();\n }\n if (re.numeric_arg.test(ph.type) && (typeof arg !== \"number\" && isNaN(arg))) {\n throw new TypeError(sprintf(\"[sprintf] expecting number but found %T\", arg));\n }\n if (re.number.test(ph.type)) {\n is_positive = arg >= 0;\n }\n switch (ph.type) {\n case \"b\":\n arg = parseInt(arg, 10).toString(2);\n break;\n case \"c\":\n arg = String.fromCharCode(parseInt(arg, 10));\n break;\n case \"d\":\n case \"i\":\n arg = parseInt(arg, 10);\n break;\n case \"j\":\n arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0);\n break;\n case \"e\":\n arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential();\n break;\n case \"f\":\n arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg);\n break;\n case \"g\":\n arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg);\n break;\n case \"o\":\n arg = (parseInt(arg, 10) >>> 0).toString(8);\n break;\n case \"s\":\n arg = String(arg);\n arg = ph.precision ? arg.substring(0, ph.precision) : arg;\n break;\n case \"t\":\n arg = String(!!arg);\n arg = ph.precision ? arg.substring(0, ph.precision) : arg;\n break;\n case \"T\":\n arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase();\n arg = ph.precision ? arg.substring(0, ph.precision) : arg;\n break;\n case \"u\":\n arg = parseInt(arg, 10) >>> 0;\n break;\n case \"v\":\n arg = arg.valueOf();\n arg = ph.precision ? arg.substring(0, ph.precision) : arg;\n break;\n case \"x\":\n arg = (parseInt(arg, 10) >>> 0).toString(16);\n break;\n case \"X\":\n arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase();\n break;\n }\n if (re.json.test(ph.type)) {\n output += arg;\n } else {\n if (re.number.test(ph.type) && (!is_positive || ph.sign)) {\n sign3 = is_positive ? \"+\" : \"-\";\n arg = arg.toString().replace(re.sign, \"\");\n } else {\n sign3 = \"\";\n }\n pad_character = ph.pad_char ? ph.pad_char === \"0\" ? \"0\" : ph.pad_char.charAt(1) : \" \";\n pad_length = ph.width - (sign3 + arg).length;\n pad6 = ph.width ? pad_length > 0 ? pad_character.repeat(pad_length) : \"\" : \"\";\n output += ph.align ? sign3 + arg + pad6 : pad_character === \"0\" ? sign3 + pad6 + arg : pad6 + sign3 + arg;\n }\n }\n }\n return output;\n }\n var sprintf_cache = /* @__PURE__ */ Object.create(null);\n function sprintf_parse(fmt) {\n if (sprintf_cache[fmt]) {\n return sprintf_cache[fmt];\n }\n var _fmt = fmt, match, parse_tree = [], arg_names = 0;\n while (_fmt) {\n if ((match = re.text.exec(_fmt)) !== null) {\n parse_tree.push(match[0]);\n } else if ((match = re.modulo.exec(_fmt)) !== null) {\n parse_tree.push(\"%\");\n } else if ((match = re.placeholder.exec(_fmt)) !== null) {\n if (match[2]) {\n arg_names |= 1;\n var field_list = [], replacement_field = match[2], field_match = [];\n if ((field_match = re.key.exec(replacement_field)) !== null) {\n field_list.push(field_match[1]);\n while ((replacement_field = replacement_field.substring(field_match[0].length)) !== \"\") {\n if ((field_match = re.key_access.exec(replacement_field)) !== null) {\n field_list.push(field_match[1]);\n } else if ((field_match = re.index_access.exec(replacement_field)) !== null) {\n field_list.push(field_match[1]);\n } else {\n throw new SyntaxError(\"[sprintf] failed to parse named argument key\");\n }\n }\n } else {\n throw new SyntaxError(\"[sprintf] failed to parse named argument key\");\n }\n match[2] = field_list;\n } else {\n arg_names |= 2;\n }\n if (arg_names === 3) {\n throw new Error(\"[sprintf] mixing positional and named placeholders is not (yet) supported\");\n }\n parse_tree.push(\n {\n placeholder: match[0],\n param_no: match[1],\n keys: match[2],\n sign: match[3],\n pad_char: match[4],\n align: match[5],\n width: match[6],\n precision: match[7],\n type: match[8]\n }\n );\n } else {\n throw new SyntaxError(\"[sprintf] unexpected placeholder\");\n }\n _fmt = _fmt.substring(match[0].length);\n }\n return sprintf_cache[fmt] = parse_tree;\n }\n if (typeof exports3 !== \"undefined\") {\n exports3[\"sprintf\"] = sprintf;\n exports3[\"vsprintf\"] = vsprintf;\n }\n if (typeof window !== \"undefined\") {\n window[\"sprintf\"] = sprintf;\n window[\"vsprintf\"] = vsprintf;\n if (typeof define === \"function\" && define[\"amd\"]) {\n define(function() {\n return {\n \"sprintf\": sprintf,\n \"vsprintf\": vsprintf\n };\n });\n }\n }\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@openagenda+verror@3.1.4/node_modules/@openagenda/verror/dist/index.js\n var require_dist4 = __commonJS({\n \"../../../node_modules/.pnpm/@openagenda+verror@3.1.4/node_modules/@openagenda/verror/dist/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __create2 = Object.create;\n var __defProp2 = Object.defineProperty;\n var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames2 = Object.getOwnPropertyNames;\n var __getProtoOf2 = Object.getPrototypeOf;\n var __hasOwnProp2 = Object.prototype.hasOwnProperty;\n var __export2 = (target, all) => {\n for (var name in all)\n __defProp2(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps2 = (to, from14, except, desc) => {\n if (from14 && typeof from14 === \"object\" || typeof from14 === \"function\") {\n for (let key of __getOwnPropNames2(from14))\n if (!__hasOwnProp2.call(to, key) && key !== except)\n __defProp2(to, key, { get: () => from14[key], enumerable: !(desc = __getOwnPropDesc2(from14, key)) || desc.enumerable });\n }\n return to;\n };\n var __toESM2 = (mod3, isNodeMode, target) => (target = mod3 != null ? __create2(__getProtoOf2(mod3)) : {}, __copyProps2(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod3 || !mod3.__esModule ? __defProp2(target, \"default\", { value: mod3, enumerable: true }) : target,\n mod3\n ));\n var __toCommonJS2 = (mod3) => __copyProps2(__defProp2({}, \"__esModule\", { value: true }), mod3);\n var src_exports2 = {};\n __export2(src_exports2, {\n BadGateway: () => BadGateway,\n BadRequest: () => BadRequest,\n Conflict: () => Conflict,\n Forbidden: () => Forbidden,\n GeneralError: () => GeneralError,\n Gone: () => Gone,\n LengthRequired: () => LengthRequired,\n MethodNotAllowed: () => MethodNotAllowed,\n NotAcceptable: () => NotAcceptable,\n NotAuthenticated: () => NotAuthenticated,\n NotFound: () => NotFound,\n NotImplemented: () => NotImplemented,\n PaymentError: () => PaymentError,\n Timeout: () => Timeout,\n TooManyRequests: () => TooManyRequests,\n Unavailable: () => Unavailable,\n Unprocessable: () => Unprocessable,\n VError: () => verror_default,\n default: () => src_default\n });\n module.exports = __toCommonJS2(src_exports2);\n var import_inherits = __toESM2(require_inherits_browser());\n var import_assertion_error2 = __toESM2(require_assertion_error());\n function isError(arg) {\n return Object.prototype.toString.call(arg) === \"[object Error]\" || arg instanceof Error;\n }\n function isObject(arg) {\n return typeof arg === \"object\" && arg !== null;\n }\n function isString(arg) {\n return typeof arg === \"string\";\n }\n function isFunc(arg) {\n return typeof arg === \"function\";\n }\n var import_sprintf_js = require_sprintf();\n var import_assertion_error = __toESM2(require_assertion_error());\n function parseConstructorArguments(...argv2) {\n let options;\n let sprintfArgs;\n if (argv2.length === 0) {\n options = {};\n sprintfArgs = [];\n } else if (isError(argv2[0])) {\n options = { cause: argv2[0] };\n sprintfArgs = argv2.slice(1);\n } else if (typeof argv2[0] === \"object\") {\n options = {};\n for (const k4 in argv2[0]) {\n if (Object.prototype.hasOwnProperty.call(argv2[0], k4)) {\n options[k4] = argv2[0][k4];\n }\n }\n sprintfArgs = argv2.slice(1);\n } else {\n if (!isString(argv2[0])) {\n throw new import_assertion_error.default(\n \"first argument to VError, or WError constructor must be a string, object, or Error\"\n );\n }\n options = {};\n sprintfArgs = argv2;\n }\n if (!isObject(options))\n throw new import_assertion_error.default(\"options (object) is required\");\n if (options.meta && !isObject(options.meta))\n throw new import_assertion_error.default(\"options.meta must be an object\");\n return {\n options,\n shortMessage: sprintfArgs.length === 0 ? \"\" : import_sprintf_js.sprintf.apply(null, sprintfArgs)\n };\n }\n function defineProperty(target, descriptor) {\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n function defineProperties(target, props) {\n for (let i3 = 0; i3 < props.length; i3++) {\n defineProperty(target, props[i3]);\n }\n }\n var META = \"@@verror/meta\";\n var reserved = [\n \"name\",\n \"message\",\n \"shortMessage\",\n \"cause\",\n \"info\",\n \"stack\",\n \"fileName\",\n \"lineNumber\"\n ];\n function mergeMeta(instance, meta2) {\n if (!meta2) {\n return;\n }\n for (const k4 in meta2) {\n if (Object.prototype.hasOwnProperty.call(meta2, k4)) {\n if (reserved.includes(k4)) {\n throw new import_assertion_error2.default(`\"${k4}\" is a reserved meta`);\n }\n instance[META][k4] = meta2[k4];\n instance[k4] = meta2[k4];\n }\n }\n }\n function VError(...args) {\n if (!(this instanceof VError)) {\n return new VError(...args);\n }\n const { options, shortMessage } = parseConstructorArguments(...args);\n const { cause: cause2, constructorOpt, info: info2, name, skipCauseMessage, meta: meta2 } = options;\n let message = shortMessage;\n if (cause2) {\n if (!isError(cause2))\n throw new import_assertion_error2.default(\"cause is not an Error\");\n if (!skipCauseMessage && cause2.message) {\n message = message === \"\" ? cause2.message : `${message}: ${cause2.message}`;\n }\n }\n Error.call(this, message);\n if (name) {\n if (!isString(name))\n throw new import_assertion_error2.default(`error's \"name\" must be a string`);\n this.name = name;\n }\n this.message = message;\n this.shortMessage = shortMessage;\n if (cause2) {\n this.cause = cause2;\n }\n this.info = {};\n if (info2) {\n for (const k4 in info2) {\n if (Object.prototype.hasOwnProperty.call(info2, k4)) {\n this.info[k4] = info2[k4];\n }\n }\n }\n defineProperty(this, {\n key: META,\n value: {}\n });\n mergeMeta(this, VError.meta(this));\n mergeMeta(this, meta2);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, constructorOpt || this.constructor);\n } else {\n this.stack = new Error().stack;\n }\n }\n (0, import_inherits.default)(VError, Error);\n defineProperties(VError.prototype, [\n {\n key: \"toString\",\n value: function toString2() {\n let str = Object.prototype.hasOwnProperty.call(this, \"name\") && this.name || this.constructor.name || this.constructor.prototype.name;\n if (this.message) {\n str += `: ${this.message}`;\n }\n return str;\n }\n },\n {\n key: \"toJSON\",\n value: function toJSON() {\n const obj = {\n name: this.name,\n message: this.message,\n shortMessage: this.shortMessage,\n cause: this.cause,\n info: this.info\n };\n for (const key in this[META]) {\n if (Object.prototype.hasOwnProperty.call(this[META], key) && !(key in obj)) {\n obj[key] = this[META][key];\n }\n }\n return obj;\n }\n }\n ]);\n defineProperties(VError, [\n {\n key: \"cause\",\n value: function cause(err) {\n if (!isError(err))\n throw new import_assertion_error2.default(\"err must be an Error\");\n return isError(err.cause) ? err.cause : null;\n }\n },\n {\n key: \"info\",\n value: function info(err) {\n if (!isError(err))\n throw new import_assertion_error2.default(\"err must be an Error\");\n const cause2 = VError.cause(err);\n const rv = cause2 !== null ? VError.info(cause2) : {};\n if (isObject(err.info)) {\n for (const k4 in err.info) {\n if (Object.prototype.hasOwnProperty.call(err.info, k4)) {\n rv[k4] = err.info[k4];\n }\n }\n }\n return rv;\n }\n },\n {\n key: \"meta\",\n value: function meta(err) {\n if (!isError(err))\n throw new import_assertion_error2.default(\"err must be an Error\");\n const cause2 = VError.cause(err);\n const rv = cause2 !== null ? VError.meta(cause2) : {};\n if (isObject(err[META])) {\n for (const k4 in err[META]) {\n if (Object.prototype.hasOwnProperty.call(err[META], k4)) {\n rv[k4] = err[META][k4];\n }\n }\n }\n return rv;\n }\n },\n {\n key: \"findCauseByName\",\n value: function findCauseByName(err, name) {\n if (!isError(err))\n throw new import_assertion_error2.default(\"err must be an Error\");\n if (!isString(name))\n throw new import_assertion_error2.default(\"name (string) is required\");\n if (name.length <= 0)\n throw new import_assertion_error2.default(\"name cannot be empty\");\n for (let cause2 = err; cause2 !== null; cause2 = VError.cause(cause2)) {\n if (!isError(err))\n throw new import_assertion_error2.default(\"cause must be an Error\");\n if (cause2.name === name) {\n return cause2;\n }\n }\n return null;\n }\n },\n {\n key: \"findCauseByType\",\n value: function findCauseByType(err, type) {\n if (!isError(err))\n throw new import_assertion_error2.default(\"err must be an Error\");\n if (!isFunc(type))\n throw new import_assertion_error2.default(\"type (func) is required\");\n for (let cause2 = err; cause2 !== null; cause2 = VError.cause(cause2)) {\n if (!isError(err))\n throw new import_assertion_error2.default(\"cause must be an Error\");\n if (cause2 instanceof type) {\n return cause2;\n }\n }\n return null;\n }\n },\n {\n key: \"hasCauseWithName\",\n value: function hasCauseWithName(err, name) {\n return VError.findCauseByName(err, name) !== null;\n }\n },\n {\n key: \"hasCauseWithType\",\n value: function hasCauseWithType(err, type) {\n return VError.findCauseByType(err, type) !== null;\n }\n },\n {\n key: \"fullStack\",\n value: function fullStack(err) {\n if (!isError(err))\n throw new import_assertion_error2.default(\"err must be an Error\");\n const cause2 = VError.cause(err);\n if (cause2) {\n return `${err.stack}\ncaused by: ${VError.fullStack(cause2)}`;\n }\n return err.stack;\n }\n },\n {\n key: \"errorFromList\",\n value: function errorFromList(errors) {\n if (!Array.isArray(errors)) {\n throw new import_assertion_error2.default(\"list of errors (array) is required\");\n }\n errors.forEach(function(error) {\n if (!isObject(error)) {\n throw new import_assertion_error2.default(\"errors ([object]) is required\");\n }\n });\n if (errors.length === 0) {\n return null;\n }\n errors.forEach((e2) => {\n if (!isError(e2))\n throw new import_assertion_error2.default(\"error must be an Error\");\n });\n if (errors.length === 1) {\n return errors[0];\n }\n return new MultiError(errors);\n }\n },\n {\n key: \"errorForEach\",\n value: function errorForEach(err, func) {\n if (!isError(err))\n throw new import_assertion_error2.default(\"err must be an Error\");\n if (!isFunc(func))\n throw new import_assertion_error2.default(\"func (func) is required\");\n if (err instanceof MultiError) {\n err.errors.forEach((e2) => {\n func(e2);\n });\n } else {\n func(err);\n }\n }\n }\n ]);\n VError.prototype.name = \"VError\";\n function MultiError(errors) {\n if (!(this instanceof MultiError)) {\n return new MultiError(errors);\n }\n if (!Array.isArray(errors)) {\n throw new import_assertion_error2.default(\"list of errors (array) is required\");\n }\n if (errors.length <= 0) {\n throw new import_assertion_error2.default(\"must be at least one error is required\");\n }\n VError.call(\n this,\n {\n cause: errors[0],\n meta: {\n errors: [...errors]\n }\n },\n \"first of %d error%s\",\n errors.length,\n errors.length === 1 ? \"\" : \"s\"\n );\n }\n (0, import_inherits.default)(MultiError, VError);\n MultiError.prototype.name = \"MultiError\";\n function WError(...args) {\n if (!(this instanceof WError)) {\n return new WError(...args);\n }\n const { options, shortMessage } = parseConstructorArguments(...args);\n options.skipCauseMessage = true;\n VError.call(\n this,\n options,\n \"%s\",\n shortMessage\n );\n }\n (0, import_inherits.default)(WError, VError);\n defineProperties(WError.prototype, [\n {\n key: \"toString\",\n value: function toString2() {\n let str = Object.prototype.hasOwnProperty.call(this, \"name\") && this.name || this.constructor.name || this.constructor.prototype.name;\n if (this.message) {\n str += `: ${this.message}`;\n }\n if (this.cause && this.cause.message) {\n str += `; caused by ${this.cause.toString()}`;\n }\n return str;\n }\n }\n ]);\n WError.prototype.name = \"WError\";\n VError.VError = VError;\n VError.WError = WError;\n VError.MultiError = MultiError;\n VError.META = META;\n var verror_default = VError;\n var http_exports = {};\n __export2(http_exports, {\n BadGateway: () => BadGateway,\n BadRequest: () => BadRequest,\n Conflict: () => Conflict,\n Forbidden: () => Forbidden,\n GeneralError: () => GeneralError,\n Gone: () => Gone,\n LengthRequired: () => LengthRequired,\n MethodNotAllowed: () => MethodNotAllowed,\n NotAcceptable: () => NotAcceptable,\n NotAuthenticated: () => NotAuthenticated,\n NotFound: () => NotFound,\n NotImplemented: () => NotImplemented,\n PaymentError: () => PaymentError,\n Timeout: () => Timeout,\n TooManyRequests: () => TooManyRequests,\n Unavailable: () => Unavailable,\n Unprocessable: () => Unprocessable,\n VError: () => verror_default\n });\n var import_inherits2 = __toESM2(require_inherits_browser());\n var import_depd = __toESM2(require_browser2());\n var deprecate = (0, import_depd.default)(\"@openangeda/verror\");\n function createError(name, statusCode, className) {\n const ExtendedError = function(...args) {\n if (!(this instanceof ExtendedError)) {\n return new ExtendedError(...args);\n }\n const { options, shortMessage } = parseConstructorArguments(...args);\n options.meta = {\n code: statusCode,\n statusCode,\n className,\n ...options.meta\n };\n verror_default.call(\n this,\n options,\n shortMessage\n );\n deprecate.property(this, \"code\", \"use `statusCode` instead of `code`\");\n };\n Object.defineProperty(ExtendedError, \"name\", { configurable: true, value: name });\n (0, import_inherits2.default)(ExtendedError, verror_default);\n ExtendedError.prototype.name = name;\n return ExtendedError;\n }\n var BadRequest = createError(\"BadRequest\", 400, \"bad-request\");\n var NotAuthenticated = createError(\"NotAuthenticated\", 401, \"not-authenticated\");\n var PaymentError = createError(\"PaymentError\", 402, \"payment-error\");\n var Forbidden = createError(\"Forbidden\", 403, \"forbidden\");\n var NotFound = createError(\"NotFound\", 404, \"not-found\");\n var MethodNotAllowed = createError(\"MethodNotAllowed\", 405, \"method-not-allowed\");\n var NotAcceptable = createError(\"NotAcceptable\", 406, \"not-acceptable\");\n var Timeout = createError(\"Timeout\", 408, \"timeout\");\n var Conflict = createError(\"Conflict\", 409, \"conflict\");\n var Gone = createError(\"Gone\", 410, \"gone\");\n var LengthRequired = createError(\"LengthRequired\", 411, \"length-required\");\n var Unprocessable = createError(\"Unprocessable\", 422, \"unprocessable\");\n var TooManyRequests = createError(\"TooManyRequests\", 429, \"too-many-requests\");\n var GeneralError = createError(\"GeneralError\", 500, \"general-error\");\n var NotImplemented = createError(\"NotImplemented\", 501, \"not-implemented\");\n var BadGateway = createError(\"BadGateway\", 502, \"bad-gateway\");\n var Unavailable = createError(\"Unavailable\", 503, \"unavailable\");\n var httpAliases = {\n 400: BadRequest,\n 401: NotAuthenticated,\n 402: PaymentError,\n 403: Forbidden,\n 404: NotFound,\n 405: MethodNotAllowed,\n 406: NotAcceptable,\n 408: Timeout,\n 409: Conflict,\n 410: Gone,\n 411: LengthRequired,\n 422: Unprocessable,\n 429: TooManyRequests,\n 500: GeneralError,\n 501: NotImplemented,\n 502: BadGateway,\n 503: Unavailable\n };\n Object.assign(verror_default, http_exports, httpAliases);\n var src_default = verror_default;\n }\n });\n\n // ../../../node_modules/.pnpm/@openagenda+verror@3.1.4/node_modules/@openagenda/verror/index.js\n var require_verror = __commonJS({\n \"../../../node_modules/.pnpm/@openagenda+verror@3.1.4/node_modules/@openagenda/verror/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = require_dist4().default;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/errors.js\n var require_errors3 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/errors.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WrongParamFormat = exports3.WrongNetworkException = exports3.WasmInitError = exports3.WalletSignatureNotFoundError = exports3.UnsupportedMethodError = exports3.UnsupportedChainException = exports3.UnknownSignatureType = exports3.UnknownSignatureError = exports3.UnknownError = exports3.UnknownDecryptionAlgorithmTypeError = exports3.UnauthorizedException = exports3.TransactionError = exports3.RemovedFunctionError = exports3.ParamsMissingError = exports3.ParamNullError = exports3.NodejsException = exports3.NodeError = exports3.NoWalletException = exports3.NoValidShares = exports3.NetworkError = exports3.MintingNotSupported = exports3.LocalStorageItemNotSetException = exports3.LocalStorageItemNotRemovedException = exports3.LocalStorageItemNotFoundException = exports3.LitNodeClientNotReadyError = exports3.LitNodeClientBadConfigError = exports3.InvalidUnifiedConditionType = exports3.InvalidSignatureError = exports3.InvalidParamType = exports3.InvalidNodeAttestation = exports3.InvalidSessionSigs = exports3.InvalidEthBlockhash = exports3.InvalidBooleanException = exports3.InvalidArgumentException = exports3.InvalidAccessControlConditions = exports3.InitError = exports3.AutomationError = exports3.MultiError = exports3.LitError = exports3.LIT_ERROR_CODE = exports3.LIT_ERROR = exports3.LitErrorKind = exports3.LIT_ERROR_KIND = void 0;\n var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3));\n var verror_1 = require_verror();\n var depd_1 = tslib_1.__importDefault(require_browser2());\n var deprecated = (0, depd_1.default)(\"lit-js-sdk:constants:errors\");\n exports3.LIT_ERROR_KIND = {\n Unknown: \"Unknown\",\n Unexpected: \"Unexpected\",\n Generic: \"Generic\",\n Config: \"Config\",\n Validation: \"Validation\",\n Conversion: \"Conversion\",\n Parser: \"Parser\",\n Serializer: \"Serializer\",\n Timeout: \"Timeout\"\n };\n exports3.LitErrorKind = new Proxy(exports3.LIT_ERROR_KIND, {\n get(target, prop, receiver) {\n deprecated(\"LitErrorKind is deprecated and will be removed in a future version. Use LIT_ERROR_KIND instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LIT_ERROR = {\n INVALID_PARAM_TYPE: {\n name: \"InvalidParamType\",\n code: \"invalid_param_type\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n INVALID_ACCESS_CONTROL_CONDITIONS: {\n name: \"InvalidAccessControlConditions\",\n code: \"invalid_access_control_conditions\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n WRONG_NETWORK_EXCEPTION: {\n name: \"WrongNetworkException\",\n code: \"wrong_network_exception\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n MINTING_NOT_SUPPORTED: {\n name: \"MintingNotSupported\",\n code: \"minting_not_supported\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n UNSUPPORTED_CHAIN_EXCEPTION: {\n name: \"UnsupportedChainException\",\n code: \"unsupported_chain_exception\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n INVALID_UNIFIED_CONDITION_TYPE: {\n name: \"InvalidUnifiedConditionType\",\n code: \"invalid_unified_condition_type\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n LIT_NODE_CLIENT_NOT_READY_ERROR: {\n name: \"LitNodeClientNotReadyError\",\n code: \"lit_node_client_not_ready_error\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n UNAUTHORIZED_EXCEPTION: {\n name: \"UnauthorizedException\",\n code: \"unauthorized_exception\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n INVALID_ARGUMENT_EXCEPTION: {\n name: \"InvalidArgumentException\",\n code: \"invalid_argument_exception\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n INVALID_BOOLEAN_EXCEPTION: {\n name: \"InvalidBooleanException\",\n code: \"invalid_boolean_exception\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n UNKNOWN_ERROR: {\n name: \"UnknownError\",\n code: \"unknown_error\",\n kind: exports3.LIT_ERROR_KIND.Unknown\n },\n NO_WALLET_EXCEPTION: {\n name: \"NoWalletException\",\n code: \"no_wallet_exception\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n WRONG_PARAM_FORMAT: {\n name: \"WrongParamFormat\",\n code: \"wrong_param_format\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n LOCAL_STORAGE_ITEM_NOT_FOUND_EXCEPTION: {\n name: \"LocalStorageItemNotFoundException\",\n code: \"local_storage_item_not_found_exception\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n LOCAL_STORAGE_ITEM_NOT_SET_EXCEPTION: {\n name: \"LocalStorageItemNotSetException\",\n code: \"local_storage_item_not_set_exception\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n LOCAL_STORAGE_ITEM_NOT_REMOVED_EXCEPTION: {\n name: \"LocalStorageItemNotRemovedException\",\n code: \"local_storage_item_not_removed_exception\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n REMOVED_FUNCTION_ERROR: {\n name: \"RemovedFunctionError\",\n code: \"removed_function_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n UNSUPPORTED_METHOD_ERROR: {\n name: \"UnsupportedMethodError\",\n code: \"unsupported_method_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n LIT_NODE_CLIENT_BAD_CONFIG_ERROR: {\n name: \"LitNodeClientBadConfigError\",\n code: \"lit_node_client_bad_config_error\",\n kind: exports3.LIT_ERROR_KIND.Config\n },\n PARAMS_MISSING_ERROR: {\n name: \"ParamsMissingError\",\n code: \"params_missing_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n UNKNOWN_SIGNATURE_TYPE: {\n name: \"UnknownSignatureType\",\n code: \"unknown_signature_type\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n UNKNOWN_SIGNATURE_ERROR: {\n name: \"UnknownSignatureError\",\n code: \"unknown_signature_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n INVALID_SIGNATURE_ERROR: {\n name: \"InvalidSignatureError\",\n code: \"invalid_signature_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n PARAM_NULL_ERROR: {\n name: \"ParamNullError\",\n code: \"param_null_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n UNKNOWN_DECRYPTION_ALGORITHM_TYPE_ERROR: {\n name: \"UnknownDecryptionAlgorithmTypeError\",\n code: \"unknown_decryption_algorithm_type_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n WASM_INIT_ERROR: {\n name: \"WasmInitError\",\n code: \"wasm_init_error\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n NODEJS_EXCEPTION: {\n name: \"NodejsException\",\n code: \"nodejs_exception\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n NODE_ERROR: {\n name: \"NodeError\",\n code: \"node_error\",\n kind: exports3.LitErrorKind.Unknown\n },\n WALLET_SIGNATURE_NOT_FOUND_ERROR: {\n name: \"WalletSignatureNotFoundError\",\n code: \"wallet_signature_not_found_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n NO_VALID_SHARES: {\n name: \"NoValidShares\",\n code: \"no_valid_shares\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n INVALID_NODE_ATTESTATION: {\n name: \"InvalidNodeAttestation\",\n code: \"invalid_node_attestation\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n INVALID_ETH_BLOCKHASH: {\n name: \"InvalidEthBlockhash\",\n code: \"invalid_eth_blockhash\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n INVALID_SESSION_SIGS: {\n name: \"InvalidSessionSigs\",\n code: \"invalid_session_sigs\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n INIT_ERROR: {\n name: \"InitError\",\n code: \"init_error\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n NETWORK_ERROR: {\n name: \"NetworkError\",\n code: \"network_error\",\n kind: exports3.LitErrorKind.Unexpected\n },\n TRANSACTION_ERROR: {\n name: \"TransactionError\",\n code: \"transaction_error\",\n kind: exports3.LitErrorKind.Unexpected\n },\n AUTOMATION_ERROR: {\n name: \"AutomationError\",\n code: \"automation_error\",\n kind: exports3.LitErrorKind.Unexpected\n }\n };\n exports3.LIT_ERROR_CODE = {\n NODE_NOT_AUTHORIZED: \"NodeNotAuthorized\"\n };\n var LitError = class extends verror_1.VError {\n constructor(options, message, ...params) {\n super(options, message, ...params);\n }\n };\n exports3.LitError = LitError;\n function createErrorClass({ name, code, kind }) {\n return class extends LitError {\n // VError has optional options parameter, but we make it required so thrower remembers to pass all the useful info\n constructor(options, message, ...params) {\n if (options instanceof Error) {\n options = {\n cause: options\n };\n }\n if (!(options.cause instanceof Error)) {\n options.cause = new Error(options.cause);\n }\n super({\n name,\n ...options,\n meta: {\n code,\n kind,\n ...options.meta\n }\n }, message, ...params);\n }\n };\n }\n var errorClasses = {};\n for (const key in exports3.LIT_ERROR) {\n if (key in exports3.LIT_ERROR) {\n const errorDef = exports3.LIT_ERROR[key];\n errorClasses[errorDef.name] = createErrorClass(errorDef);\n }\n }\n var MultiError = verror_1.VError.MultiError;\n exports3.MultiError = MultiError;\n exports3.AutomationError = errorClasses.AutomationError, exports3.InitError = errorClasses.InitError, exports3.InvalidAccessControlConditions = errorClasses.InvalidAccessControlConditions, exports3.InvalidArgumentException = errorClasses.InvalidArgumentException, exports3.InvalidBooleanException = errorClasses.InvalidBooleanException, exports3.InvalidEthBlockhash = errorClasses.InvalidEthBlockhash, exports3.InvalidSessionSigs = errorClasses.InvalidSessionSigs, exports3.InvalidNodeAttestation = errorClasses.InvalidNodeAttestation, exports3.InvalidParamType = errorClasses.InvalidParamType, exports3.InvalidSignatureError = errorClasses.InvalidSignatureError, exports3.InvalidUnifiedConditionType = errorClasses.InvalidUnifiedConditionType, exports3.LitNodeClientBadConfigError = errorClasses.LitNodeClientBadConfigError, exports3.LitNodeClientNotReadyError = errorClasses.LitNodeClientNotReadyError, exports3.LocalStorageItemNotFoundException = errorClasses.LocalStorageItemNotFoundException, exports3.LocalStorageItemNotRemovedException = errorClasses.LocalStorageItemNotRemovedException, exports3.LocalStorageItemNotSetException = errorClasses.LocalStorageItemNotSetException, exports3.MintingNotSupported = errorClasses.MintingNotSupported, exports3.NetworkError = errorClasses.NetworkError, exports3.NoValidShares = errorClasses.NoValidShares, exports3.NoWalletException = errorClasses.NoWalletException, exports3.NodeError = errorClasses.NodeError, exports3.NodejsException = errorClasses.NodejsException, exports3.ParamNullError = errorClasses.ParamNullError, exports3.ParamsMissingError = errorClasses.ParamsMissingError, exports3.RemovedFunctionError = errorClasses.RemovedFunctionError, exports3.TransactionError = errorClasses.TransactionError, exports3.UnauthorizedException = errorClasses.UnauthorizedException, exports3.UnknownDecryptionAlgorithmTypeError = errorClasses.UnknownDecryptionAlgorithmTypeError, exports3.UnknownError = errorClasses.UnknownError, exports3.UnknownSignatureError = errorClasses.UnknownSignatureError, exports3.UnknownSignatureType = errorClasses.UnknownSignatureType, exports3.UnsupportedChainException = errorClasses.UnsupportedChainException, exports3.UnsupportedMethodError = errorClasses.UnsupportedMethodError, exports3.WalletSignatureNotFoundError = errorClasses.WalletSignatureNotFoundError, exports3.WasmInitError = errorClasses.WasmInitError, exports3.WrongNetworkException = errorClasses.WrongNetworkException, exports3.WrongParamFormat = errorClasses.WrongParamFormat;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/utils/utils.js\n var require_utils15 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/utils/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ELeft = ELeft;\n exports3.ERight = ERight;\n var constants_1 = require_constants6();\n function ELeft(error) {\n return {\n type: constants_1.EITHER_TYPE.ERROR,\n result: error\n };\n }\n function ERight(result) {\n return {\n type: constants_1.EITHER_TYPE.SUCCESS,\n result\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/abis/ERC20.json\n var require_ERC20 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/abis/ERC20.json\"(exports3, module) {\n module.exports = {\n abi: [\n {\n constant: true,\n inputs: [],\n name: \"name\",\n outputs: [\n {\n name: \"\",\n type: \"string\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_spender\",\n type: \"address\"\n },\n {\n name: \"_value\",\n type: \"uint256\"\n }\n ],\n name: \"approve\",\n outputs: [\n {\n name: \"\",\n type: \"bool\"\n }\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n constant: true,\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n name: \"\",\n type: \"uint256\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_from\",\n type: \"address\"\n },\n {\n name: \"_to\",\n type: \"address\"\n },\n {\n name: \"_value\",\n type: \"uint256\"\n }\n ],\n name: \"transferFrom\",\n outputs: [\n {\n name: \"\",\n type: \"bool\"\n }\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n constant: true,\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n name: \"\",\n type: \"uint8\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n constant: true,\n inputs: [\n {\n name: \"_owner\",\n type: \"address\"\n }\n ],\n name: \"balanceOf\",\n outputs: [\n {\n name: \"balance\",\n type: \"uint256\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n constant: true,\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n name: \"\",\n type: \"string\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_to\",\n type: \"address\"\n },\n {\n name: \"_value\",\n type: \"uint256\"\n }\n ],\n name: \"transfer\",\n outputs: [\n {\n name: \"\",\n type: \"bool\"\n }\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n constant: true,\n inputs: [\n {\n name: \"_owner\",\n type: \"address\"\n },\n {\n name: \"_spender\",\n type: \"address\"\n }\n ],\n name: \"allowance\",\n outputs: [\n {\n name: \"\",\n type: \"uint256\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n payable: true,\n stateMutability: \"payable\",\n type: \"fallback\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: \"owner\",\n type: \"address\"\n },\n {\n indexed: true,\n name: \"spender\",\n type: \"address\"\n },\n {\n indexed: false,\n name: \"value\",\n type: \"uint256\"\n }\n ],\n name: \"Approval\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: \"from\",\n type: \"address\"\n },\n {\n indexed: true,\n name: \"to\",\n type: \"address\"\n },\n {\n indexed: false,\n name: \"value\",\n type: \"uint256\"\n }\n ],\n name: \"Transfer\",\n type: \"event\"\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/abis/LIT.json\n var require_LIT = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/abis/LIT.json\"(exports3, module) {\n module.exports = {\n contractName: \"LIT\",\n abi: [\n {\n inputs: [],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"operator\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\"\n }\n ],\n name: \"ApprovalForAll\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"userAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address payable\",\n name: \"relayerAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"functionSignature\",\n type: \"bytes\"\n }\n ],\n name: \"MetaTransactionExecuted\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"operator\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"ids\",\n type: \"uint256[]\"\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"values\",\n type: \"uint256[]\"\n }\n ],\n name: \"TransferBatch\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"operator\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"id\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\"\n }\n ],\n name: \"TransferSingle\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"string\",\n name: \"value\",\n type: \"string\"\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"id\",\n type: \"uint256\"\n }\n ],\n name: \"URI\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"ERC712_VERSION\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"id\",\n type: \"uint256\"\n }\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"accounts\",\n type: \"address[]\"\n },\n {\n internalType: \"uint256[]\",\n name: \"ids\",\n type: \"uint256[]\"\n }\n ],\n name: \"balanceOfBatch\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"userAddress\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"functionSignature\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes32\",\n name: \"sigR\",\n type: \"bytes32\"\n },\n {\n internalType: \"bytes32\",\n name: \"sigS\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint8\",\n name: \"sigV\",\n type: \"uint8\"\n }\n ],\n name: \"executeMetaTransaction\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\"\n }\n ],\n stateMutability: \"payable\",\n type: \"function\",\n payable: true\n },\n {\n inputs: [],\n name: \"getChainId\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"pure\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [],\n name: \"getDomainSeperator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\"\n }\n ],\n name: \"getNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n internalType: \"uint256[]\",\n name: \"ids\",\n type: \"uint256[]\"\n },\n {\n internalType: \"uint256[]\",\n name: \"amounts\",\n type: \"uint256[]\"\n },\n {\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\"\n }\n ],\n name: \"safeBatchTransferFrom\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"id\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\"\n }\n ],\n name: \"safeTransferFrom\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"operator\",\n type: \"address\"\n },\n {\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\"\n }\n ],\n name: \"setApprovalForAll\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"interfaceId\",\n type: \"bytes4\"\n }\n ],\n name: \"supportsInterface\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [],\n name: \"tokenIds\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n name: \"uri\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"quantity\",\n type: \"uint256\"\n }\n ],\n name: \"mint\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_owner\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"_operator\",\n type: \"address\"\n }\n ],\n name: \"isApprovedForAll\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"isOperator\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\"\n }\n ],\n name: \"setOpenseaProxyEnabled\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newAdmin\",\n type: \"address\"\n }\n ],\n name: \"changeAdmin\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"uri\",\n type: \"string\"\n }\n ],\n name: \"setURI\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getAdmin\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/index.js\n var require_src4 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ABI_ERC20 = exports3.ABI_LIT = void 0;\n var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3));\n tslib_1.__exportStar(require_version28(), exports3);\n tslib_1.__exportStar(require_constants6(), exports3);\n tslib_1.__exportStar(require_mappers(), exports3);\n tslib_1.__exportStar(require_endpoints(), exports3);\n tslib_1.__exportStar(require_mappers(), exports3);\n tslib_1.__exportStar(require_i_errors(), exports3);\n tslib_1.__exportStar(require_errors3(), exports3);\n tslib_1.__exportStar(require_utils15(), exports3);\n var ABI_ERC20 = tslib_1.__importStar(require_ERC20());\n exports3.ABI_ERC20 = ABI_ERC20;\n var ABI_LIT = tslib_1.__importStar(require_LIT());\n exports3.ABI_LIT = ABI_LIT;\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/constants.js\n var require_constants7 = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.KEYTYPE_ED25519 = exports3.NETWORK_SOLANA = exports3.LIT_PREFIX = exports3.CHAIN_YELLOWSTONE = void 0;\n exports3.CHAIN_YELLOWSTONE = \"yellowstone\";\n exports3.LIT_PREFIX = \"lit_\";\n exports3.NETWORK_SOLANA = \"solana\";\n exports3.KEYTYPE_ED25519 = \"ed25519\";\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/api/utils.js\n var require_utils16 = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/api/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getKeyTypeFromNetwork = getKeyTypeFromNetwork;\n exports3.getFirstSessionSig = getFirstSessionSig;\n exports3.getVincentRegistryAccessControlCondition = getVincentRegistryAccessControlCondition;\n var ethers_1 = require_lib32();\n var constants_1 = require_src4();\n var vincent_contracts_sdk_1 = require_src();\n var constants_2 = require_constants7();\n function getKeyTypeFromNetwork(network) {\n switch (network) {\n case constants_2.NETWORK_SOLANA:\n return \"ed25519\";\n default:\n throw new Error(`Network not implemented ${network}`);\n }\n }\n function getFirstSessionSig(pkpSessionSigs) {\n const sessionSigsEntries = Object.entries(pkpSessionSigs);\n if (sessionSigsEntries.length === 0) {\n throw new Error(`Invalid pkpSessionSigs, length zero: ${JSON.stringify(pkpSessionSigs)}`);\n }\n const [[, sessionSig]] = sessionSigsEntries;\n return sessionSig;\n }\n async function getVincentRegistryAccessControlCondition({ delegatorAddress }) {\n if (!ethers_1.ethers.utils.isAddress(delegatorAddress)) {\n throw new Error(`delegatorAddress is not a valid Ethereum Address: ${delegatorAddress}`);\n }\n const delegatorPkpTokenId = (await (0, vincent_contracts_sdk_1.getPkpTokenId)({\n pkpEthAddress: delegatorAddress,\n signer: ethers_1.ethers.Wallet.createRandom().connect(new ethers_1.ethers.providers.StaticJsonRpcProvider(constants_1.LIT_RPC.CHRONICLE_YELLOWSTONE))\n })).toString();\n const contractInterface = new ethers_1.ethers.utils.Interface(vincent_contracts_sdk_1.COMBINED_ABI.fragments);\n const fragment = contractInterface.getFunction(\"isDelegateePermitted\");\n const functionAbi = {\n type: \"function\",\n name: fragment.name,\n inputs: fragment.inputs.map((input) => ({\n name: input.name,\n type: input.type\n })),\n outputs: fragment.outputs?.map((output) => ({\n name: output.name,\n type: output.type\n })),\n stateMutability: fragment.stateMutability\n };\n return {\n contractAddress: vincent_contracts_sdk_1.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD,\n functionAbi,\n chain: constants_2.CHAIN_YELLOWSTONE,\n functionName: \"isDelegateePermitted\",\n functionParams: [\":userAddress\", delegatorPkpTokenId, \":currentActionIpfsId\"],\n returnValueTest: {\n key: \"isPermitted\",\n comparator: \"=\",\n value: \"true\"\n }\n };\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/lit-actions-client/get-solana-key-pair-from-wrapped-key.js\n var require_get_solana_key_pair_from_wrapped_key = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/lit-actions-client/get-solana-key-pair-from-wrapped-key.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getSolanaKeyPairFromWrappedKey = getSolanaKeyPairFromWrappedKey2;\n var web3_js_1 = require_index_browser_cjs();\n var utils_1 = require_utils16();\n var constants_1 = require_constants7();\n async function getSolanaKeyPairFromWrappedKey2({ delegatorAddress, ciphertext, dataToEncryptHash }) {\n const accessControlConditions = [\n await (0, utils_1.getVincentRegistryAccessControlCondition)({\n delegatorAddress\n })\n ];\n const decryptedPrivateKey = await Lit.Actions.decryptAndCombine({\n accessControlConditions,\n ciphertext,\n dataToEncryptHash,\n chain: \"ethereum\",\n authSig: null\n });\n if (!decryptedPrivateKey.startsWith(constants_1.LIT_PREFIX)) {\n throw new Error(`Private key was not encrypted with salt; all wrapped keys must be prefixed with '${constants_1.LIT_PREFIX}'`);\n }\n const noSaltPrivateKey = decryptedPrivateKey.slice(constants_1.LIT_PREFIX.length);\n const solanaKeypair = web3_js_1.Keypair.fromSecretKey(Buffer2.from(noSaltPrivateKey, \"hex\"));\n return solanaKeypair;\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/lit-actions-client/index.js\n var require_lit_actions_client = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/lit-actions-client/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getSolanaKeyPairFromWrappedKey = exports3.batchGenerateKeysWithLitAction = exports3.generateKeyWithLitAction = void 0;\n var batch_generate_keys_1 = require_batch_generate_keys();\n Object.defineProperty(exports3, \"batchGenerateKeysWithLitAction\", { enumerable: true, get: function() {\n return batch_generate_keys_1.batchGenerateKeysWithLitAction;\n } });\n var generate_key_1 = require_generate_key();\n Object.defineProperty(exports3, \"generateKeyWithLitAction\", { enumerable: true, get: function() {\n return generate_key_1.generateKeyWithLitAction;\n } });\n var get_solana_key_pair_from_wrapped_key_1 = require_get_solana_key_pair_from_wrapped_key();\n Object.defineProperty(exports3, \"getSolanaKeyPairFromWrappedKey\", { enumerable: true, get: function() {\n return get_solana_key_pair_from_wrapped_key_1.getSolanaKeyPairFromWrappedKey;\n } });\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/service-client/constants.js\n var require_constants8 = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/service-client/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.JWT_AUTHORIZATION_SCHEMA_PREFIX = exports3.SERVICE_URL_BY_LIT_NETWORK = void 0;\n exports3.SERVICE_URL_BY_LIT_NETWORK = {\n datil: \"https://wrapped.litprotocol.com\"\n };\n exports3.JWT_AUTHORIZATION_SCHEMA_PREFIX = \"Bearer \";\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/service-client/utils.js\n var require_utils17 = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/service-client/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getBaseRequestParams = getBaseRequestParams;\n exports3.generateRequestId = generateRequestId;\n exports3.makeRequest = makeRequest;\n var constants_1 = require_constants8();\n function composeAuthHeader(jwtToken) {\n return `${constants_1.JWT_AUTHORIZATION_SCHEMA_PREFIX}${jwtToken}`;\n }\n var supportedNetworks = [\"datil\"];\n function isSupportedLitNetwork(litNetwork) {\n if (!supportedNetworks.includes(litNetwork)) {\n throw new Error(`Unsupported LIT_NETWORK! Only ${supportedNetworks.join(\"|\")} are supported.`);\n }\n }\n function getServiceUrl({ litNetwork }) {\n isSupportedLitNetwork(litNetwork);\n return constants_1.SERVICE_URL_BY_LIT_NETWORK[litNetwork];\n }\n function getBaseRequestParams(requestParams) {\n const { jwtToken, method, litNetwork } = requestParams;\n return {\n baseUrl: getServiceUrl(requestParams),\n initParams: {\n method,\n headers: {\n \"x-correlation-id\": requestParams.requestId,\n \"Content-Type\": \"application/json\",\n \"lit-network\": litNetwork,\n authorization: composeAuthHeader(jwtToken)\n }\n }\n };\n }\n async function getResponseErrorMessage(response) {\n try {\n const parsedResponse = await response.json();\n if (parsedResponse.message) {\n return parsedResponse.message;\n }\n return JSON.stringify(parsedResponse);\n } catch {\n return response.text();\n }\n }\n async function getResponseJson(response) {\n try {\n return await response.json();\n } catch {\n return await response.text();\n }\n }\n function generateRequestId() {\n return Math.random().toString(16).slice(2);\n }\n async function makeRequest({ url, init, requestId }) {\n try {\n const response = await fetch(url, { ...init });\n if (!response.ok) {\n const errorMessage = await getResponseErrorMessage(response);\n throw new Error(`HTTP(${response.status}): ${errorMessage}`);\n }\n const result = await getResponseJson(response);\n if (typeof result === \"string\") {\n throw new Error(`HTTP(${response.status}): ${result}`);\n }\n return result;\n } catch (e2) {\n throw new Error(`Request(${requestId}) for Vincent wrapped key failed. Error: ${e2.message}${e2.cause ? \" - \" + e2.cause : \"\"}`);\n }\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/service-client/client.js\n var require_client = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/service-client/client.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.listPrivateKeyMetadata = listPrivateKeyMetadata;\n exports3.fetchPrivateKey = fetchPrivateKey;\n exports3.storePrivateKey = storePrivateKey;\n exports3.storePrivateKeyBatch = storePrivateKeyBatch;\n var utils_1 = require_utils17();\n async function listPrivateKeyMetadata(params) {\n const { litNetwork, jwtToken, delegatorAddress } = params;\n const requestId = (0, utils_1.generateRequestId)();\n const { baseUrl, initParams } = (0, utils_1.getBaseRequestParams)({\n litNetwork,\n jwtToken,\n method: \"GET\",\n requestId\n });\n return (0, utils_1.makeRequest)({\n url: `${baseUrl}/delegatee/encrypted/${delegatorAddress}`,\n init: initParams,\n requestId\n });\n }\n async function fetchPrivateKey(params) {\n const { litNetwork, jwtToken, id, delegatorAddress } = params;\n const requestId = (0, utils_1.generateRequestId)();\n const { baseUrl, initParams } = (0, utils_1.getBaseRequestParams)({\n litNetwork,\n jwtToken,\n method: \"GET\",\n requestId\n });\n return (0, utils_1.makeRequest)({\n url: `${baseUrl}/delegatee/encrypted/${delegatorAddress}/${id}`,\n init: initParams,\n requestId\n });\n }\n async function storePrivateKey(params) {\n const { litNetwork, jwtToken, storedKeyMetadata } = params;\n const requestId = (0, utils_1.generateRequestId)();\n const { baseUrl, initParams } = (0, utils_1.getBaseRequestParams)({\n litNetwork,\n jwtToken,\n method: \"POST\",\n requestId\n });\n const { pkpAddress, id } = await (0, utils_1.makeRequest)({\n url: `${baseUrl}/delegatee/encrypted`,\n init: {\n ...initParams,\n body: JSON.stringify(storedKeyMetadata)\n },\n requestId\n });\n return { pkpAddress, id };\n }\n async function storePrivateKeyBatch(params) {\n const { litNetwork, jwtToken, storedKeyMetadataBatch } = params;\n const requestId = (0, utils_1.generateRequestId)();\n const { baseUrl, initParams } = (0, utils_1.getBaseRequestParams)({\n litNetwork,\n jwtToken,\n method: \"POST\",\n requestId\n });\n const { pkpAddress, ids } = await (0, utils_1.makeRequest)({\n url: `${baseUrl}/delegatee/encrypted_batch`,\n init: {\n ...initParams,\n body: JSON.stringify({ keyParamsBatch: storedKeyMetadataBatch })\n },\n requestId\n });\n return { pkpAddress, ids };\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/service-client/index.js\n var require_service_client = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/service-client/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.storePrivateKeyBatch = exports3.storePrivateKey = exports3.listPrivateKeyMetadata = exports3.fetchPrivateKey = void 0;\n var client_1 = require_client();\n Object.defineProperty(exports3, \"fetchPrivateKey\", { enumerable: true, get: function() {\n return client_1.fetchPrivateKey;\n } });\n Object.defineProperty(exports3, \"listPrivateKeyMetadata\", { enumerable: true, get: function() {\n return client_1.listPrivateKeyMetadata;\n } });\n Object.defineProperty(exports3, \"storePrivateKey\", { enumerable: true, get: function() {\n return client_1.storePrivateKey;\n } });\n Object.defineProperty(exports3, \"storePrivateKeyBatch\", { enumerable: true, get: function() {\n return client_1.storePrivateKeyBatch;\n } });\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/api/generate-private-key.js\n var require_generate_private_key = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/api/generate-private-key.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.generatePrivateKey = generatePrivateKey2;\n var lit_actions_client_1 = require_lit_actions_client();\n var utils_1 = require_utils14();\n var service_client_1 = require_service_client();\n var utils_2 = require_utils16();\n async function generatePrivateKey2(params) {\n const { delegatorAddress, jwtToken, network, litNodeClient, memo } = params;\n const allowDelegateeToDecrypt = await (0, utils_2.getVincentRegistryAccessControlCondition)({\n delegatorAddress\n });\n const litActionIpfsCid = (0, utils_1.getLitActionCid)(network, \"generateEncryptedKey\");\n const { ciphertext, dataToEncryptHash, publicKey } = await (0, lit_actions_client_1.generateKeyWithLitAction)({\n ...params,\n litActionIpfsCid,\n accessControlConditions: [allowDelegateeToDecrypt]\n });\n const { id } = await (0, service_client_1.storePrivateKey)({\n jwtToken,\n storedKeyMetadata: {\n ciphertext,\n publicKey,\n keyType: (0, utils_2.getKeyTypeFromNetwork)(network),\n dataToEncryptHash,\n memo\n },\n litNetwork: litNodeClient.config.litNetwork\n });\n return {\n delegatorAddress,\n id,\n generatedPublicKey: publicKey\n };\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/api/batch-generate-private-keys.js\n var require_batch_generate_private_keys = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/api/batch-generate-private-keys.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.batchGeneratePrivateKeys = batchGeneratePrivateKeys;\n var lit_actions_client_1 = require_lit_actions_client();\n var utils_1 = require_utils14();\n var service_client_1 = require_service_client();\n var utils_2 = require_utils16();\n async function batchGeneratePrivateKeys(params) {\n const { jwtToken, delegatorAddress, litNodeClient } = params;\n const allowDelegateeToDecrypt = await (0, utils_2.getVincentRegistryAccessControlCondition)({\n delegatorAddress\n });\n const litActionIpfsCid = (0, utils_1.getLitActionCommonCid)(\"batchGenerateEncryptedKeys\");\n const actionResults = await (0, lit_actions_client_1.batchGenerateKeysWithLitAction)({\n ...params,\n litActionIpfsCid,\n accessControlConditions: [allowDelegateeToDecrypt]\n });\n const keyParamsBatch = actionResults.map((keyData) => {\n const { generateEncryptedPrivateKey } = keyData;\n return {\n ...generateEncryptedPrivateKey,\n keyType: (0, utils_2.getKeyTypeFromNetwork)(\"solana\")\n };\n });\n const { ids } = await (0, service_client_1.storePrivateKeyBatch)({\n jwtToken,\n storedKeyMetadataBatch: keyParamsBatch,\n litNetwork: litNodeClient.config.litNetwork\n });\n const results = actionResults.map((actionResult, index2) => {\n const { generateEncryptedPrivateKey: { memo, publicKey } } = actionResult;\n const id = ids[index2];\n const signature = actionResult.signMessage?.signature;\n return {\n ...signature ? { signMessage: { signature } } : {},\n generateEncryptedPrivateKey: {\n memo,\n id,\n generatedPublicKey: publicKey,\n delegatorAddress\n }\n };\n });\n return { delegatorAddress, results };\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/api/list-encrypted-key-metadata.js\n var require_list_encrypted_key_metadata = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/api/list-encrypted-key-metadata.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.listEncryptedKeyMetadata = listEncryptedKeyMetadata;\n var service_client_1 = require_service_client();\n async function listEncryptedKeyMetadata(params) {\n const { jwtToken, delegatorAddress, litNodeClient } = params;\n return (0, service_client_1.listPrivateKeyMetadata)({\n jwtToken,\n delegatorAddress,\n litNetwork: litNodeClient.config.litNetwork\n });\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/api/get-encrypted-key.js\n var require_get_encrypted_key = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/api/get-encrypted-key.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getEncryptedKey = getEncryptedKey;\n var service_client_1 = require_service_client();\n async function getEncryptedKey(params) {\n const { jwtToken, delegatorAddress, litNodeClient, id } = params;\n return (0, service_client_1.fetchPrivateKey)({\n jwtToken,\n delegatorAddress,\n id,\n litNetwork: litNodeClient.config.litNetwork\n });\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/api/store-encrypted-key.js\n var require_store_encrypted_key = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/api/store-encrypted-key.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.storeEncryptedKey = storeEncryptedKey;\n var service_client_1 = require_service_client();\n async function storeEncryptedKey(params) {\n const { jwtToken, litNodeClient } = params;\n const { publicKey, keyType, dataToEncryptHash, ciphertext, memo } = params;\n return (0, service_client_1.storePrivateKey)({\n storedKeyMetadata: {\n publicKey,\n keyType,\n dataToEncryptHash,\n ciphertext,\n memo\n },\n jwtToken,\n litNetwork: litNodeClient.config.litNetwork\n });\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/api/store-encrypted-key-batch.js\n var require_store_encrypted_key_batch = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/api/store-encrypted-key-batch.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.storeEncryptedKeyBatch = storeEncryptedKeyBatch;\n var service_client_1 = require_service_client();\n async function storeEncryptedKeyBatch(params) {\n const { jwtToken, litNodeClient, keyBatch } = params;\n const storedKeyMetadataBatch = keyBatch.map(({ keyType, publicKey, memo, dataToEncryptHash, ciphertext }) => ({\n publicKey,\n memo,\n dataToEncryptHash,\n ciphertext,\n keyType\n }));\n return (0, service_client_1.storePrivateKeyBatch)({\n storedKeyMetadataBatch,\n jwtToken,\n litNetwork: litNodeClient.config.litNetwork\n });\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/api/index.js\n var require_api = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/api/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getVincentRegistryAccessControlCondition = exports3.getFirstSessionSig = exports3.getKeyTypeFromNetwork = exports3.storeEncryptedKeyBatch = exports3.storeEncryptedKey = exports3.getEncryptedKey = exports3.listEncryptedKeyMetadata = exports3.batchGeneratePrivateKeys = exports3.generatePrivateKey = void 0;\n var generate_private_key_1 = require_generate_private_key();\n Object.defineProperty(exports3, \"generatePrivateKey\", { enumerable: true, get: function() {\n return generate_private_key_1.generatePrivateKey;\n } });\n var batch_generate_private_keys_1 = require_batch_generate_private_keys();\n Object.defineProperty(exports3, \"batchGeneratePrivateKeys\", { enumerable: true, get: function() {\n return batch_generate_private_keys_1.batchGeneratePrivateKeys;\n } });\n var list_encrypted_key_metadata_1 = require_list_encrypted_key_metadata();\n Object.defineProperty(exports3, \"listEncryptedKeyMetadata\", { enumerable: true, get: function() {\n return list_encrypted_key_metadata_1.listEncryptedKeyMetadata;\n } });\n var get_encrypted_key_1 = require_get_encrypted_key();\n Object.defineProperty(exports3, \"getEncryptedKey\", { enumerable: true, get: function() {\n return get_encrypted_key_1.getEncryptedKey;\n } });\n var store_encrypted_key_1 = require_store_encrypted_key();\n Object.defineProperty(exports3, \"storeEncryptedKey\", { enumerable: true, get: function() {\n return store_encrypted_key_1.storeEncryptedKey;\n } });\n var store_encrypted_key_batch_1 = require_store_encrypted_key_batch();\n Object.defineProperty(exports3, \"storeEncryptedKeyBatch\", { enumerable: true, get: function() {\n return store_encrypted_key_batch_1.storeEncryptedKeyBatch;\n } });\n var utils_1 = require_utils16();\n Object.defineProperty(exports3, \"getKeyTypeFromNetwork\", { enumerable: true, get: function() {\n return utils_1.getKeyTypeFromNetwork;\n } });\n Object.defineProperty(exports3, \"getFirstSessionSig\", { enumerable: true, get: function() {\n return utils_1.getFirstSessionSig;\n } });\n Object.defineProperty(exports3, \"getVincentRegistryAccessControlCondition\", { enumerable: true, get: function() {\n return utils_1.getVincentRegistryAccessControlCondition;\n } });\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/index.js\n var require_src5 = __commonJS({\n \"../../libs/wrapped-keys/dist/src/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.api = exports3.constants = void 0;\n var api_1 = require_api();\n var constants_1 = require_constants7();\n var lit_actions_client_1 = require_lit_actions_client();\n exports3.constants = {\n CHAIN_YELLOWSTONE: constants_1.CHAIN_YELLOWSTONE,\n LIT_PREFIX: constants_1.LIT_PREFIX,\n NETWORK_SOLANA: constants_1.NETWORK_SOLANA,\n KEYTYPE_ED25519: constants_1.KEYTYPE_ED25519\n };\n exports3.api = {\n generatePrivateKey: api_1.generatePrivateKey,\n getEncryptedKey: api_1.getEncryptedKey,\n listEncryptedKeyMetadata: api_1.listEncryptedKeyMetadata,\n storeEncryptedKey: api_1.storeEncryptedKey,\n storeEncryptedKeyBatch: api_1.storeEncryptedKeyBatch,\n batchGeneratePrivateKeys: api_1.batchGeneratePrivateKeys,\n getVincentRegistryAccessControlCondition: api_1.getVincentRegistryAccessControlCondition,\n litActionHelpers: {\n getSolanaKeyPairFromWrappedKey: lit_actions_client_1.getSolanaKeyPairFromWrappedKey\n }\n };\n }\n });\n\n // src/lib/lit-action.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_ability_sdk2 = __toESM(require_src2());\n\n // src/lib/vincent-ability.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_ability_sdk = __toESM(require_src2());\n var import_web34 = __toESM(require_index_browser_cjs());\n var import_vincent_wrapped_keys = __toESM(require_src5());\n\n // src/lib/schemas.ts\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm5();\n var abilityParamsSchema = external_exports.object({\n rpcUrl: external_exports.string().describe(\"The RPC URL for the Solana cluster\").optional(),\n cluster: external_exports.enum([\"devnet\", \"testnet\", \"mainnet-beta\"]).describe(\"The Solana cluster the transaction is intended for (used to verify blockhash)\"),\n serializedTransaction: external_exports.string().describe(\n \"The base64 encoded serialized Solana transaction to be evaluated and signed (transaction type is auto-detected)\"\n ),\n ciphertext: external_exports.string().describe(\"The encrypted private key ciphertext for the Agent Wallet\"),\n dataToEncryptHash: external_exports.string().describe(\"SHA-256 hash of the encrypted data for verification\"),\n legacyTransactionOptions: external_exports.object({\n requireAllSignatures: external_exports.boolean().describe(\n \"If true, serialization will fail unless all required signers have provided valid signatures. Set false to allow returning a partially signed transaction (useful for multisig or co-signing flows). Defaults to true.\"\n ),\n verifySignatures: external_exports.boolean().describe(\"If true, verify each signature before serialization. Defaults to false.\")\n }).optional()\n });\n var precheckFailSchema = external_exports.object({\n error: external_exports.string().describe(\"A string containing the error message if the precheck failed.\")\n });\n var executeSuccessSchema = external_exports.object({\n signedTransaction: external_exports.string().describe(\"The base64 encoded signed Solana transaction\")\n });\n var executeFailSchema = external_exports.object({\n error: external_exports.string().describe(\"A string containing the error message if the execution failed.\")\n }).optional();\n\n // src/lib/lit-action-helpers/index.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/lit-action-helpers/signSolanaTransaction.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_web3 = __toESM(require_index_browser_cjs());\n var import_ethers = __toESM(require_lib32());\n function signSolanaTransaction({\n solanaKeypair,\n transaction\n }) {\n try {\n if (transaction instanceof import_web3.Transaction) {\n transaction.sign(solanaKeypair);\n if (!transaction.signature) {\n throw new Error(\"Transaction signature is null\");\n }\n return import_ethers.ethers.utils.base58.encode(transaction.signature);\n } else {\n transaction.sign([solanaKeypair]);\n if (!transaction.signatures.length) {\n throw new Error(\"Transaction signature is null\");\n }\n return import_ethers.ethers.utils.base58.encode(transaction.signatures[0]);\n }\n } catch (err) {\n const txTypeDesc = transaction instanceof import_web3.Transaction ? \"legacy\" : `versioned v${transaction.version}`;\n throw new Error(`When signing ${txTypeDesc} transaction - ${err.message}`);\n }\n }\n\n // src/lib/lit-action-helpers/deserializeTransaction.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_web32 = __toESM(require_index_browser_cjs());\n function deserializeTransaction(serializedTransaction) {\n const transactionBuffer = Buffer2.from(serializedTransaction, \"base64\");\n try {\n const versionedTransaction = import_web32.VersionedTransaction.deserialize(transactionBuffer);\n console.log(\n `[deserializeTransaction] detected versioned transaction: ${versionedTransaction.version}`\n );\n return versionedTransaction;\n } catch {\n try {\n const legacyTransaction = import_web32.Transaction.from(transactionBuffer);\n console.log(`[deserializeTransaction] detected legacy transaction`);\n return legacyTransaction;\n } catch (legacyError) {\n throw new Error(\n `Failed to deserialize transaction: ${legacyError instanceof Error ? legacyError.message : String(legacyError)}`\n );\n }\n }\n }\n\n // src/lib/lit-action-helpers/verifyBlockhashForCluster.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_web33 = __toESM(require_index_browser_cjs());\n async function verifyBlockhashForCluster({\n transaction,\n cluster,\n rpcUrl\n }) {\n let blockhash;\n if (transaction instanceof import_web33.Transaction) {\n blockhash = transaction.recentBlockhash ?? transaction.compileMessage().recentBlockhash;\n } else {\n blockhash = transaction.message.recentBlockhash;\n }\n if (!blockhash) {\n return {\n valid: false,\n error: \"Transaction does not contain a blockhash\"\n };\n }\n const connection = new import_web33.Connection(rpcUrl, \"confirmed\");\n try {\n const isValid2 = await connection.isBlockhashValid(blockhash);\n if (!isValid2.value) {\n return {\n valid: false,\n error: `Blockhash is not valid for cluster ${cluster}. The transaction may be for a different cluster or the blockhash may have expired.`\n };\n }\n return { valid: true };\n } catch (err) {\n return {\n valid: false,\n error: `Unable to verify blockhash on cluster ${cluster}: ${err instanceof Error ? err.message : String(err)}`\n };\n }\n }\n\n // src/lib/vincent-ability.ts\n var getSolanaKeyPairFromWrappedKey = import_vincent_wrapped_keys.api.litActionHelpers.getSolanaKeyPairFromWrappedKey;\n var vincentAbility = (0, import_vincent_ability_sdk.createVincentAbility)({\n packageName: \"@lit-protocol/vincent-ability-sol-transaction-signer\",\n abilityDescription: \"Sign a Solana transaction using a Vincent Agent Wallet with encrypted private key.\",\n abilityParamsSchema,\n supportedPolicies: (0, import_vincent_ability_sdk.supportedPoliciesForAbility)([]),\n precheckFailSchema,\n executeSuccessSchema,\n executeFailSchema,\n precheck: async ({ abilityParams: abilityParams2 }, { succeed, fail }) => {\n const { serializedTransaction, cluster, rpcUrl } = abilityParams2;\n if (!rpcUrl) {\n console.log(\n \"[@lit-protocol/vincent-ability-sol-transaction-signer] rpcUrl not provided using @solana/web3.js default\"\n );\n }\n try {\n const transaction = deserializeTransaction(serializedTransaction);\n const verification = await verifyBlockhashForCluster({\n transaction,\n cluster,\n rpcUrl: rpcUrl || (0, import_web34.clusterApiUrl)(cluster)\n });\n if (!verification.valid) {\n return fail({\n error: `[@lit-protocol/vincent-ability-sol-transaction-signer] ${verification.error}`\n });\n }\n return succeed();\n } catch (error) {\n return fail({\n error: `[@lit-protocol/vincent-ability-sol-transaction-signer] Failed to decode Solana transaction: ${error instanceof Error ? error.message : String(error)}`\n });\n }\n },\n execute: async ({ abilityParams: abilityParams2 }, { succeed, fail, delegation: { delegatorPkpInfo } }) => {\n const {\n serializedTransaction,\n cluster,\n ciphertext,\n dataToEncryptHash,\n legacyTransactionOptions\n } = abilityParams2;\n const { ethAddress: ethAddress2 } = delegatorPkpInfo;\n try {\n const solanaKeypair = await getSolanaKeyPairFromWrappedKey({\n delegatorAddress: ethAddress2,\n ciphertext,\n dataToEncryptHash\n });\n const transaction = deserializeTransaction(serializedTransaction);\n const litChainIdentifier = {\n devnet: \"solanaDevnet\",\n testnet: \"solanaTestnet\",\n \"mainnet-beta\": \"solana\"\n };\n const verification = await verifyBlockhashForCluster({\n transaction,\n cluster,\n rpcUrl: await Lit.Actions.getRpcUrl({ chain: litChainIdentifier[cluster] })\n });\n if (!verification.valid) {\n return fail({\n error: `[@lit-protocol/vincent-ability-sol-transaction-signer] ${verification.error}`\n });\n }\n signSolanaTransaction({\n solanaKeypair,\n transaction\n });\n let signedSerializedTransaction;\n if (transaction instanceof import_web34.Transaction) {\n if (!transaction.feePayer)\n transaction.feePayer = solanaKeypair.publicKey;\n signedSerializedTransaction = Buffer2.from(\n transaction.serialize({\n requireAllSignatures: legacyTransactionOptions?.requireAllSignatures ?? true,\n verifySignatures: legacyTransactionOptions?.verifySignatures ?? false\n })\n ).toString(\"base64\");\n } else {\n signedSerializedTransaction = Buffer2.from(transaction.serialize()).toString(\"base64\");\n }\n return succeed({\n signedTransaction: signedSerializedTransaction\n });\n } catch (error) {\n return fail({\n error: `[@lit-protocol/vincent-ability-sol-transaction-signer] Failed to sign Solana transaction: ${error instanceof Error ? error.message : String(error)}`\n });\n }\n }\n });\n\n // src/lib/lit-action.ts\n (async () => {\n const func = (0, import_vincent_ability_sdk2.vincentAbilityHandler)({\n vincentAbility,\n context: {\n delegatorPkpEthAddress: context.delegatorPkpEthAddress\n },\n abilityParams\n });\n await func();\n })();\n})();\n/*! Bundled license information:\n\n@jspm/core/nodelibs/browser/chunk-DtuTasat.js:\n (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *)\n\njs-sha3/src/sha3.js:\n (**\n * [js-sha3]{@link https://github.com/emn178/js-sha3}\n *\n * @version 0.8.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2018\n * @license MIT\n *)\n\n@noble/hashes/utils.js:\n (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/modular.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/curve.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/weierstrass.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/_shortw_utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/secp256k1.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\naes-js/lib.commonjs/aes.js:\n (*! MIT License. Copyright 2015-2022 Richard Moore . See LICENSE.txt. *)\n\n@noble/hashes/esm/utils.js:\n (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/modular.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/curve.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/weierstrass.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/_shortw_utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/secp256k1.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@scure/base/lib/esm/index.js:\n (*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@scure/bip32/lib/esm/index.js:\n (*! scure-bip32 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)\n\n@scure/bip39/esm/index.js:\n (*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/hashes/esm/utils.js:\n (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/modular.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/curve.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/weierstrass.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/_shortw_utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/p256.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/hashes/utils.js:\n (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/modular.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/curve.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/edwards.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/montgomery.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/ed25519.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\nsafe-buffer/index.js:\n (*! safe-buffer. MIT License. Feross Aboukhadijeh *)\n\n@solana/buffer-layout/lib/Layout.js:\n (**\n * Support for translating between Uint8Array instances and JavaScript\n * native types.\n *\n * {@link module:Layout~Layout|Layout} is the basis of a class\n * hierarchy that associates property names with sequences of encoded\n * bytes.\n *\n * Layouts are supported for these scalar (numeric) types:\n * * {@link module:Layout~UInt|Unsigned integers in little-endian\n * format} with {@link module:Layout.u8|8-bit}, {@link\n * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},\n * {@link module:Layout.u32|32-bit}, {@link\n * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}\n * representation ranges;\n * * {@link module:Layout~UIntBE|Unsigned integers in big-endian\n * format} with {@link module:Layout.u16be|16-bit}, {@link\n * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},\n * {@link module:Layout.u40be|40-bit}, and {@link\n * module:Layout.u48be|48-bit} representation ranges;\n * * {@link module:Layout~Int|Signed integers in little-endian\n * format} with {@link module:Layout.s8|8-bit}, {@link\n * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},\n * {@link module:Layout.s32|32-bit}, {@link\n * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}\n * representation ranges;\n * * {@link module:Layout~IntBE|Signed integers in big-endian format}\n * with {@link module:Layout.s16be|16-bit}, {@link\n * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},\n * {@link module:Layout.s40be|40-bit}, and {@link\n * module:Layout.s48be|48-bit} representation ranges;\n * * 64-bit integral values that decode to an exact (if magnitude is\n * less than 2^53) or nearby integral Number in {@link\n * module:Layout.nu64|unsigned little-endian}, {@link\n * module:Layout.nu64be|unsigned big-endian}, {@link\n * module:Layout.ns64|signed little-endian}, and {@link\n * module:Layout.ns64be|unsigned big-endian} encodings;\n * * 32-bit floating point values with {@link\n * module:Layout.f32|little-endian} and {@link\n * module:Layout.f32be|big-endian} representations;\n * * 64-bit floating point values with {@link\n * module:Layout.f64|little-endian} and {@link\n * module:Layout.f64be|big-endian} representations;\n * * {@link module:Layout.const|Constants} that take no space in the\n * encoded expression.\n *\n * and for these aggregate types:\n * * {@link module:Layout.seq|Sequence}s of instances of a {@link\n * module:Layout~Layout|Layout}, with JavaScript representation as\n * an Array and constant or data-dependent {@link\n * module:Layout~Sequence#count|length};\n * * {@link module:Layout.struct|Structure}s that aggregate a\n * heterogeneous sequence of {@link module:Layout~Layout|Layout}\n * instances, with JavaScript representation as an Object;\n * * {@link module:Layout.union|Union}s that support multiple {@link\n * module:Layout~VariantLayout|variant layouts} over a fixed\n * (padded) or variable (not padded) span of bytes, using an\n * unsigned integer at the start of the data or a separate {@link\n * module:Layout.unionLayoutDiscriminator|layout element} to\n * determine which layout to use when interpreting the buffer\n * contents;\n * * {@link module:Layout.bits|BitStructure}s that contain a sequence\n * of individual {@link\n * module:Layout~BitStructure#addField|BitField}s packed into an 8,\n * 16, 24, or 32-bit unsigned integer starting at the least- or\n * most-significant bit;\n * * {@link module:Layout.cstr|C strings} of varying length;\n * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link\n * module:Layout~Blob#length|length} raw data.\n *\n * All {@link module:Layout~Layout|Layout} instances are immutable\n * after construction, to prevent internal state from becoming\n * inconsistent.\n *\n * @local Layout\n * @local ExternalLayout\n * @local GreedyCount\n * @local OffsetLayout\n * @local UInt\n * @local UIntBE\n * @local Int\n * @local IntBE\n * @local NearUInt64\n * @local NearUInt64BE\n * @local NearInt64\n * @local NearInt64BE\n * @local Float\n * @local FloatBE\n * @local Double\n * @local DoubleBE\n * @local Sequence\n * @local Structure\n * @local UnionDiscriminator\n * @local UnionLayoutDiscriminator\n * @local Union\n * @local VariantLayout\n * @local BitStructure\n * @local BitField\n * @local Boolean\n * @local Blob\n * @local CString\n * @local Constant\n * @local bindConstructorLayout\n * @module Layout\n * @license MIT\n * @author Peter A. Bigot\n * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}\n *)\n\n@noble/curves/abstract/weierstrass.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/_shortw_utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/secp256k1.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\ntslib/tslib.es6.js:\n (*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n \n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n \n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** *)\n\ndepd/lib/browser/index.js:\n (*!\n * depd\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n *)\n\nassertion-error/index.js:\n (*!\n * assertion-error\n * Copyright(c) 2013 Jake Luer \n * MIT Licensed\n *)\n (*!\n * Return a function that will copy properties from\n * one object to another excluding any originally\n * listed. Returned function will create a new `{}`.\n *\n * @param {String} excluded properties ...\n * @return {Function}\n *)\n (*!\n * Primary Exports\n *)\n (*!\n * Inherit from Error.prototype\n *)\n (*!\n * Statically set name\n *)\n (*!\n * Ensure correct constructor\n *)\n*/\n"; +const code = ";(()=>{try{const g=globalThis;const D=(g.Deno=g.Deno||{});const B=(D.build=D.build||{});if(B.os==null){B.os=\"linux\";}}catch{}})();\n\"use strict\";\n(() => {\n var __create = Object.create;\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __getProtoOf = Object.getPrototypeOf;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n };\n var __commonJS = (cb, mod3) => function __require() {\n return mod3 || (0, cb[__getOwnPropNames(cb)[0]])((mod3 = { exports: {} }).exports, mod3), mod3.exports;\n };\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from14, except, desc) => {\n if (from14 && typeof from14 === \"object\" || typeof from14 === \"function\") {\n for (let key of __getOwnPropNames(from14))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from14[key], enumerable: !(desc = __getOwnPropDesc(from14, key)) || desc.enumerable });\n }\n return to;\n };\n var __toESM = (mod3, isNodeMode, target) => (target = mod3 != null ? __create(__getProtoOf(mod3)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod3 || !mod3.__esModule ? __defProp(target, \"default\", { value: mod3, enumerable: true }) : target,\n mod3\n ));\n var __toCommonJS = (mod3) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod3);\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/__dirname.js\n var init_dirname = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/__dirname.js\"() {\n \"use strict\";\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js\n var process_exports = {};\n __export(process_exports, {\n _debugEnd: () => _debugEnd,\n _debugProcess: () => _debugProcess,\n _events: () => _events,\n _eventsCount: () => _eventsCount,\n _exiting: () => _exiting,\n _fatalExceptions: () => _fatalExceptions,\n _getActiveHandles: () => _getActiveHandles,\n _getActiveRequests: () => _getActiveRequests,\n _kill: () => _kill,\n _linkedBinding: () => _linkedBinding,\n _maxListeners: () => _maxListeners,\n _preload_modules: () => _preload_modules,\n _rawDebug: () => _rawDebug,\n _startProfilerIdleNotifier: () => _startProfilerIdleNotifier,\n _stopProfilerIdleNotifier: () => _stopProfilerIdleNotifier,\n _tickCallback: () => _tickCallback,\n abort: () => abort,\n addListener: () => addListener,\n allowedNodeEnvironmentFlags: () => allowedNodeEnvironmentFlags,\n arch: () => arch,\n argv: () => argv,\n argv0: () => argv0,\n assert: () => assert,\n binding: () => binding,\n browser: () => browser,\n chdir: () => chdir,\n config: () => config,\n cpuUsage: () => cpuUsage,\n cwd: () => cwd,\n debugPort: () => debugPort,\n default: () => process,\n dlopen: () => dlopen,\n domain: () => domain,\n emit: () => emit,\n emitWarning: () => emitWarning,\n env: () => env,\n execArgv: () => execArgv,\n execPath: () => execPath,\n exit: () => exit,\n features: () => features,\n hasUncaughtExceptionCaptureCallback: () => hasUncaughtExceptionCaptureCallback,\n hrtime: () => hrtime,\n kill: () => kill,\n listeners: () => listeners,\n memoryUsage: () => memoryUsage,\n moduleLoadList: () => moduleLoadList,\n nextTick: () => nextTick,\n off: () => off,\n on: () => on,\n once: () => once,\n openStdin: () => openStdin,\n pid: () => pid,\n platform: () => platform,\n ppid: () => ppid,\n prependListener: () => prependListener,\n prependOnceListener: () => prependOnceListener,\n reallyExit: () => reallyExit,\n release: () => release,\n removeAllListeners: () => removeAllListeners,\n removeListener: () => removeListener,\n resourceUsage: () => resourceUsage,\n setSourceMapsEnabled: () => setSourceMapsEnabled,\n setUncaughtExceptionCaptureCallback: () => setUncaughtExceptionCaptureCallback,\n stderr: () => stderr,\n stdin: () => stdin,\n stdout: () => stdout,\n title: () => title,\n umask: () => umask,\n uptime: () => uptime,\n version: () => version,\n versions: () => versions\n });\n function unimplemented(name) {\n throw new Error(\"Node.js process \" + name + \" is not supported by JSPM core outside of Node.js\");\n }\n function cleanUpNextTick() {\n if (!draining || !currentQueue)\n return;\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length)\n drainQueue();\n }\n function drainQueue() {\n if (draining)\n return;\n var timeout = setTimeout(cleanUpNextTick, 0);\n draining = true;\n var len = queue.length;\n while (len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue)\n currentQueue[queueIndex].run();\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n clearTimeout(timeout);\n }\n function nextTick(fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i3 = 1; i3 < arguments.length; i3++)\n args[i3 - 1] = arguments[i3];\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining)\n setTimeout(drainQueue, 0);\n }\n function Item(fun, array) {\n this.fun = fun;\n this.array = array;\n }\n function noop() {\n }\n function _linkedBinding(name) {\n unimplemented(\"_linkedBinding\");\n }\n function dlopen(name) {\n unimplemented(\"dlopen\");\n }\n function _getActiveRequests() {\n return [];\n }\n function _getActiveHandles() {\n return [];\n }\n function assert(condition, message2) {\n if (!condition)\n throw new Error(message2 || \"assertion error\");\n }\n function hasUncaughtExceptionCaptureCallback() {\n return false;\n }\n function uptime() {\n return _performance.now() / 1e3;\n }\n function hrtime(previousTimestamp) {\n var baseNow = Math.floor((Date.now() - _performance.now()) * 1e-3);\n var clocktime = _performance.now() * 1e-3;\n var seconds = Math.floor(clocktime) + baseNow;\n var nanoseconds = Math.floor(clocktime % 1 * 1e9);\n if (previousTimestamp) {\n seconds = seconds - previousTimestamp[0];\n nanoseconds = nanoseconds - previousTimestamp[1];\n if (nanoseconds < 0) {\n seconds--;\n nanoseconds += nanoPerSec;\n }\n }\n return [seconds, nanoseconds];\n }\n function on() {\n return process;\n }\n function listeners(name) {\n return [];\n }\n var queue, draining, currentQueue, queueIndex, title, arch, platform, env, argv, execArgv, version, versions, emitWarning, binding, umask, cwd, chdir, release, browser, _rawDebug, moduleLoadList, domain, _exiting, config, reallyExit, _kill, cpuUsage, resourceUsage, memoryUsage, kill, exit, openStdin, allowedNodeEnvironmentFlags, features, _fatalExceptions, setUncaughtExceptionCaptureCallback, _tickCallback, _debugProcess, _debugEnd, _startProfilerIdleNotifier, _stopProfilerIdleNotifier, stdout, stderr, stdin, abort, pid, ppid, execPath, debugPort, argv0, _preload_modules, setSourceMapsEnabled, _performance, nowOffset, nanoPerSec, _maxListeners, _events, _eventsCount, addListener, once, off, removeListener, removeAllListeners, emit, prependListener, prependOnceListener, process;\n var init_process = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n queue = [];\n draining = false;\n queueIndex = -1;\n Item.prototype.run = function() {\n this.fun.apply(null, this.array);\n };\n title = \"browser\";\n arch = \"x64\";\n platform = \"browser\";\n env = {\n PATH: \"/usr/bin\",\n LANG: typeof navigator !== \"undefined\" ? navigator.language + \".UTF-8\" : void 0,\n PWD: \"/\",\n HOME: \"/home\",\n TMP: \"/tmp\"\n };\n argv = [\"/usr/bin/node\"];\n execArgv = [];\n version = \"v16.8.0\";\n versions = {};\n emitWarning = function(message2, type) {\n console.warn((type ? type + \": \" : \"\") + message2);\n };\n binding = function(name) {\n unimplemented(\"binding\");\n };\n umask = function(mask) {\n return 0;\n };\n cwd = function() {\n return \"/\";\n };\n chdir = function(dir) {\n };\n release = {\n name: \"node\",\n sourceUrl: \"\",\n headersUrl: \"\",\n libUrl: \"\"\n };\n browser = true;\n _rawDebug = noop;\n moduleLoadList = [];\n domain = {};\n _exiting = false;\n config = {};\n reallyExit = noop;\n _kill = noop;\n cpuUsage = function() {\n return {};\n };\n resourceUsage = cpuUsage;\n memoryUsage = cpuUsage;\n kill = noop;\n exit = noop;\n openStdin = noop;\n allowedNodeEnvironmentFlags = {};\n features = {\n inspector: false,\n debug: false,\n uv: false,\n ipv6: false,\n tls_alpn: false,\n tls_sni: false,\n tls_ocsp: false,\n tls: false,\n cached_builtins: true\n };\n _fatalExceptions = noop;\n setUncaughtExceptionCaptureCallback = noop;\n _tickCallback = noop;\n _debugProcess = noop;\n _debugEnd = noop;\n _startProfilerIdleNotifier = noop;\n _stopProfilerIdleNotifier = noop;\n stdout = void 0;\n stderr = void 0;\n stdin = void 0;\n abort = noop;\n pid = 2;\n ppid = 1;\n execPath = \"/bin/usr/node\";\n debugPort = 9229;\n argv0 = \"node\";\n _preload_modules = [];\n setSourceMapsEnabled = noop;\n _performance = {\n now: typeof performance !== \"undefined\" ? performance.now.bind(performance) : void 0,\n timing: typeof performance !== \"undefined\" ? performance.timing : void 0\n };\n if (_performance.now === void 0) {\n nowOffset = Date.now();\n if (_performance.timing && _performance.timing.navigationStart) {\n nowOffset = _performance.timing.navigationStart;\n }\n _performance.now = () => Date.now() - nowOffset;\n }\n nanoPerSec = 1e9;\n hrtime.bigint = function(time) {\n var diff = hrtime(time);\n if (typeof BigInt === \"undefined\") {\n return diff[0] * nanoPerSec + diff[1];\n }\n return BigInt(diff[0] * nanoPerSec) + BigInt(diff[1]);\n };\n _maxListeners = 10;\n _events = {};\n _eventsCount = 0;\n addListener = on;\n once = on;\n off = on;\n removeListener = on;\n removeAllListeners = on;\n emit = noop;\n prependListener = on;\n prependOnceListener = on;\n process = {\n version,\n versions,\n arch,\n platform,\n browser,\n release,\n _rawDebug,\n moduleLoadList,\n binding,\n _linkedBinding,\n _events,\n _eventsCount,\n _maxListeners,\n on,\n addListener,\n once,\n off,\n removeListener,\n removeAllListeners,\n emit,\n prependListener,\n prependOnceListener,\n listeners,\n domain,\n _exiting,\n config,\n dlopen,\n uptime,\n _getActiveRequests,\n _getActiveHandles,\n reallyExit,\n _kill,\n cpuUsage,\n resourceUsage,\n memoryUsage,\n kill,\n exit,\n openStdin,\n allowedNodeEnvironmentFlags,\n assert,\n features,\n _fatalExceptions,\n setUncaughtExceptionCaptureCallback,\n hasUncaughtExceptionCaptureCallback,\n emitWarning,\n nextTick,\n _tickCallback,\n _debugProcess,\n _debugEnd,\n _startProfilerIdleNotifier,\n _stopProfilerIdleNotifier,\n stdout,\n stdin,\n stderr,\n abort,\n umask,\n chdir,\n cwd,\n env,\n title,\n argv,\n execArgv,\n pid,\n ppid,\n execPath,\n debugPort,\n hrtime,\n argv0,\n _preload_modules,\n setSourceMapsEnabled\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/process.js\n var init_process2 = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/process.js\"() {\n \"use strict\";\n init_process();\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js\n function dew$2() {\n if (_dewExec$2)\n return exports$2;\n _dewExec$2 = true;\n exports$2.byteLength = byteLength;\n exports$2.toByteArray = toByteArray;\n exports$2.fromByteArray = fromByteArray;\n var lookup = [];\n var revLookup = [];\n var Arr = typeof Uint8Array !== \"undefined\" ? Uint8Array : Array;\n var code = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n for (var i3 = 0, len = code.length; i3 < len; ++i3) {\n lookup[i3] = code[i3];\n revLookup[code.charCodeAt(i3)] = i3;\n }\n revLookup[\"-\".charCodeAt(0)] = 62;\n revLookup[\"_\".charCodeAt(0)] = 63;\n function getLens(b64) {\n var len2 = b64.length;\n if (len2 % 4 > 0) {\n throw new Error(\"Invalid string. Length must be a multiple of 4\");\n }\n var validLen = b64.indexOf(\"=\");\n if (validLen === -1)\n validLen = len2;\n var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;\n return [validLen, placeHoldersLen];\n }\n function byteLength(b64) {\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n }\n function _byteLength(b64, validLen, placeHoldersLen) {\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n }\n function toByteArray(b64) {\n var tmp;\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n var curByte = 0;\n var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;\n var i4;\n for (i4 = 0; i4 < len2; i4 += 4) {\n tmp = revLookup[b64.charCodeAt(i4)] << 18 | revLookup[b64.charCodeAt(i4 + 1)] << 12 | revLookup[b64.charCodeAt(i4 + 2)] << 6 | revLookup[b64.charCodeAt(i4 + 3)];\n arr[curByte++] = tmp >> 16 & 255;\n arr[curByte++] = tmp >> 8 & 255;\n arr[curByte++] = tmp & 255;\n }\n if (placeHoldersLen === 2) {\n tmp = revLookup[b64.charCodeAt(i4)] << 2 | revLookup[b64.charCodeAt(i4 + 1)] >> 4;\n arr[curByte++] = tmp & 255;\n }\n if (placeHoldersLen === 1) {\n tmp = revLookup[b64.charCodeAt(i4)] << 10 | revLookup[b64.charCodeAt(i4 + 1)] << 4 | revLookup[b64.charCodeAt(i4 + 2)] >> 2;\n arr[curByte++] = tmp >> 8 & 255;\n arr[curByte++] = tmp & 255;\n }\n return arr;\n }\n function tripletToBase64(num2) {\n return lookup[num2 >> 18 & 63] + lookup[num2 >> 12 & 63] + lookup[num2 >> 6 & 63] + lookup[num2 & 63];\n }\n function encodeChunk(uint8, start, end) {\n var tmp;\n var output = [];\n for (var i4 = start; i4 < end; i4 += 3) {\n tmp = (uint8[i4] << 16 & 16711680) + (uint8[i4 + 1] << 8 & 65280) + (uint8[i4 + 2] & 255);\n output.push(tripletToBase64(tmp));\n }\n return output.join(\"\");\n }\n function fromByteArray(uint8) {\n var tmp;\n var len2 = uint8.length;\n var extraBytes = len2 % 3;\n var parts = [];\n var maxChunkLength = 16383;\n for (var i4 = 0, len22 = len2 - extraBytes; i4 < len22; i4 += maxChunkLength) {\n parts.push(encodeChunk(uint8, i4, i4 + maxChunkLength > len22 ? len22 : i4 + maxChunkLength));\n }\n if (extraBytes === 1) {\n tmp = uint8[len2 - 1];\n parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 63] + \"==\");\n } else if (extraBytes === 2) {\n tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];\n parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + \"=\");\n }\n return parts.join(\"\");\n }\n return exports$2;\n }\n function dew$1() {\n if (_dewExec$1)\n return exports$1;\n _dewExec$1 = true;\n exports$1.read = function(buffer2, offset, isLE2, mLen, nBytes) {\n var e2, m2;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i3 = isLE2 ? nBytes - 1 : 0;\n var d5 = isLE2 ? -1 : 1;\n var s4 = buffer2[offset + i3];\n i3 += d5;\n e2 = s4 & (1 << -nBits) - 1;\n s4 >>= -nBits;\n nBits += eLen;\n for (; nBits > 0; e2 = e2 * 256 + buffer2[offset + i3], i3 += d5, nBits -= 8) {\n }\n m2 = e2 & (1 << -nBits) - 1;\n e2 >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m2 = m2 * 256 + buffer2[offset + i3], i3 += d5, nBits -= 8) {\n }\n if (e2 === 0) {\n e2 = 1 - eBias;\n } else if (e2 === eMax) {\n return m2 ? NaN : (s4 ? -1 : 1) * Infinity;\n } else {\n m2 = m2 + Math.pow(2, mLen);\n e2 = e2 - eBias;\n }\n return (s4 ? -1 : 1) * m2 * Math.pow(2, e2 - mLen);\n };\n exports$1.write = function(buffer2, value, offset, isLE2, mLen, nBytes) {\n var e2, m2, c4;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;\n var i3 = isLE2 ? 0 : nBytes - 1;\n var d5 = isLE2 ? 1 : -1;\n var s4 = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n value = Math.abs(value);\n if (isNaN(value) || value === Infinity) {\n m2 = isNaN(value) ? 1 : 0;\n e2 = eMax;\n } else {\n e2 = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c4 = Math.pow(2, -e2)) < 1) {\n e2--;\n c4 *= 2;\n }\n if (e2 + eBias >= 1) {\n value += rt / c4;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c4 >= 2) {\n e2++;\n c4 /= 2;\n }\n if (e2 + eBias >= eMax) {\n m2 = 0;\n e2 = eMax;\n } else if (e2 + eBias >= 1) {\n m2 = (value * c4 - 1) * Math.pow(2, mLen);\n e2 = e2 + eBias;\n } else {\n m2 = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e2 = 0;\n }\n }\n for (; mLen >= 8; buffer2[offset + i3] = m2 & 255, i3 += d5, m2 /= 256, mLen -= 8) {\n }\n e2 = e2 << mLen | m2;\n eLen += mLen;\n for (; eLen > 0; buffer2[offset + i3] = e2 & 255, i3 += d5, e2 /= 256, eLen -= 8) {\n }\n buffer2[offset + i3 - d5] |= s4 * 128;\n };\n return exports$1;\n }\n function dew() {\n if (_dewExec)\n return exports;\n _dewExec = true;\n const base64 = dew$2();\n const ieee754 = dew$1();\n const customInspectSymbol = typeof Symbol === \"function\" && typeof Symbol[\"for\"] === \"function\" ? Symbol[\"for\"](\"nodejs.util.inspect.custom\") : null;\n exports.Buffer = Buffer3;\n exports.SlowBuffer = SlowBuffer;\n exports.INSPECT_MAX_BYTES = 50;\n const K_MAX_LENGTH = 2147483647;\n exports.kMaxLength = K_MAX_LENGTH;\n Buffer3.TYPED_ARRAY_SUPPORT = typedArraySupport();\n if (!Buffer3.TYPED_ARRAY_SUPPORT && typeof console !== \"undefined\" && typeof console.error === \"function\") {\n console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");\n }\n function typedArraySupport() {\n try {\n const arr = new Uint8Array(1);\n const proto = {\n foo: function() {\n return 42;\n }\n };\n Object.setPrototypeOf(proto, Uint8Array.prototype);\n Object.setPrototypeOf(arr, proto);\n return arr.foo() === 42;\n } catch (e2) {\n return false;\n }\n }\n Object.defineProperty(Buffer3.prototype, \"parent\", {\n enumerable: true,\n get: function() {\n if (!Buffer3.isBuffer(this))\n return void 0;\n return this.buffer;\n }\n });\n Object.defineProperty(Buffer3.prototype, \"offset\", {\n enumerable: true,\n get: function() {\n if (!Buffer3.isBuffer(this))\n return void 0;\n return this.byteOffset;\n }\n });\n function createBuffer(length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"');\n }\n const buf = new Uint8Array(length);\n Object.setPrototypeOf(buf, Buffer3.prototype);\n return buf;\n }\n function Buffer3(arg, encodingOrOffset, length) {\n if (typeof arg === \"number\") {\n if (typeof encodingOrOffset === \"string\") {\n throw new TypeError('The \"string\" argument must be of type string. Received type number');\n }\n return allocUnsafe(arg);\n }\n return from14(arg, encodingOrOffset, length);\n }\n Buffer3.poolSize = 8192;\n function from14(value, encodingOrOffset, length) {\n if (typeof value === \"string\") {\n return fromString5(value, encodingOrOffset);\n }\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value);\n }\n if (value == null) {\n throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n }\n if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {\n return fromArrayBuffer(value, encodingOrOffset, length);\n }\n if (typeof SharedArrayBuffer !== \"undefined\" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length);\n }\n if (typeof value === \"number\") {\n throw new TypeError('The \"value\" argument must not be of type number. Received type number');\n }\n const valueOf = value.valueOf && value.valueOf();\n if (valueOf != null && valueOf !== value) {\n return Buffer3.from(valueOf, encodingOrOffset, length);\n }\n const b4 = fromObject(value);\n if (b4)\n return b4;\n if (typeof Symbol !== \"undefined\" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === \"function\") {\n return Buffer3.from(value[Symbol.toPrimitive](\"string\"), encodingOrOffset, length);\n }\n throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n }\n Buffer3.from = function(value, encodingOrOffset, length) {\n return from14(value, encodingOrOffset, length);\n };\n Object.setPrototypeOf(Buffer3.prototype, Uint8Array.prototype);\n Object.setPrototypeOf(Buffer3, Uint8Array);\n function assertSize6(size6) {\n if (typeof size6 !== \"number\") {\n throw new TypeError('\"size\" argument must be of type number');\n } else if (size6 < 0) {\n throw new RangeError('The value \"' + size6 + '\" is invalid for option \"size\"');\n }\n }\n function alloc(size6, fill, encoding) {\n assertSize6(size6);\n if (size6 <= 0) {\n return createBuffer(size6);\n }\n if (fill !== void 0) {\n return typeof encoding === \"string\" ? createBuffer(size6).fill(fill, encoding) : createBuffer(size6).fill(fill);\n }\n return createBuffer(size6);\n }\n Buffer3.alloc = function(size6, fill, encoding) {\n return alloc(size6, fill, encoding);\n };\n function allocUnsafe(size6) {\n assertSize6(size6);\n return createBuffer(size6 < 0 ? 0 : checked(size6) | 0);\n }\n Buffer3.allocUnsafe = function(size6) {\n return allocUnsafe(size6);\n };\n Buffer3.allocUnsafeSlow = function(size6) {\n return allocUnsafe(size6);\n };\n function fromString5(string, encoding) {\n if (typeof encoding !== \"string\" || encoding === \"\") {\n encoding = \"utf8\";\n }\n if (!Buffer3.isEncoding(encoding)) {\n throw new TypeError(\"Unknown encoding: \" + encoding);\n }\n const length = byteLength(string, encoding) | 0;\n let buf = createBuffer(length);\n const actual = buf.write(string, encoding);\n if (actual !== length) {\n buf = buf.slice(0, actual);\n }\n return buf;\n }\n function fromArrayLike(array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0;\n const buf = createBuffer(length);\n for (let i3 = 0; i3 < length; i3 += 1) {\n buf[i3] = array[i3] & 255;\n }\n return buf;\n }\n function fromArrayView(arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView);\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);\n }\n return fromArrayLike(arrayView);\n }\n function fromArrayBuffer(array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds');\n }\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds');\n }\n let buf;\n if (byteOffset === void 0 && length === void 0) {\n buf = new Uint8Array(array);\n } else if (length === void 0) {\n buf = new Uint8Array(array, byteOffset);\n } else {\n buf = new Uint8Array(array, byteOffset, length);\n }\n Object.setPrototypeOf(buf, Buffer3.prototype);\n return buf;\n }\n function fromObject(obj) {\n if (Buffer3.isBuffer(obj)) {\n const len = checked(obj.length) | 0;\n const buf = createBuffer(len);\n if (buf.length === 0) {\n return buf;\n }\n obj.copy(buf, 0, 0, len);\n return buf;\n }\n if (obj.length !== void 0) {\n if (typeof obj.length !== \"number\" || numberIsNaN(obj.length)) {\n return createBuffer(0);\n }\n return fromArrayLike(obj);\n }\n if (obj.type === \"Buffer\" && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data);\n }\n }\n function checked(length) {\n if (length >= K_MAX_LENGTH) {\n throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\" + K_MAX_LENGTH.toString(16) + \" bytes\");\n }\n return length | 0;\n }\n function SlowBuffer(length) {\n if (+length != length) {\n length = 0;\n }\n return Buffer3.alloc(+length);\n }\n Buffer3.isBuffer = function isBuffer(b4) {\n return b4 != null && b4._isBuffer === true && b4 !== Buffer3.prototype;\n };\n Buffer3.compare = function compare(a3, b4) {\n if (isInstance(a3, Uint8Array))\n a3 = Buffer3.from(a3, a3.offset, a3.byteLength);\n if (isInstance(b4, Uint8Array))\n b4 = Buffer3.from(b4, b4.offset, b4.byteLength);\n if (!Buffer3.isBuffer(a3) || !Buffer3.isBuffer(b4)) {\n throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');\n }\n if (a3 === b4)\n return 0;\n let x4 = a3.length;\n let y6 = b4.length;\n for (let i3 = 0, len = Math.min(x4, y6); i3 < len; ++i3) {\n if (a3[i3] !== b4[i3]) {\n x4 = a3[i3];\n y6 = b4[i3];\n break;\n }\n }\n if (x4 < y6)\n return -1;\n if (y6 < x4)\n return 1;\n return 0;\n };\n Buffer3.isEncoding = function isEncoding(encoding) {\n switch (String(encoding).toLowerCase()) {\n case \"hex\":\n case \"utf8\":\n case \"utf-8\":\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n case \"base64\":\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return true;\n default:\n return false;\n }\n };\n Buffer3.concat = function concat6(list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n if (list.length === 0) {\n return Buffer3.alloc(0);\n }\n let i3;\n if (length === void 0) {\n length = 0;\n for (i3 = 0; i3 < list.length; ++i3) {\n length += list[i3].length;\n }\n }\n const buffer2 = Buffer3.allocUnsafe(length);\n let pos = 0;\n for (i3 = 0; i3 < list.length; ++i3) {\n let buf = list[i3];\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer2.length) {\n if (!Buffer3.isBuffer(buf))\n buf = Buffer3.from(buf);\n buf.copy(buffer2, pos);\n } else {\n Uint8Array.prototype.set.call(buffer2, buf, pos);\n }\n } else if (!Buffer3.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n } else {\n buf.copy(buffer2, pos);\n }\n pos += buf.length;\n }\n return buffer2;\n };\n function byteLength(string, encoding) {\n if (Buffer3.isBuffer(string)) {\n return string.length;\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength;\n }\n if (typeof string !== \"string\") {\n throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string);\n }\n const len = string.length;\n const mustMatch = arguments.length > 2 && arguments[2] === true;\n if (!mustMatch && len === 0)\n return 0;\n let loweredCase = false;\n for (; ; ) {\n switch (encoding) {\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return len;\n case \"utf8\":\n case \"utf-8\":\n return utf8ToBytes3(string).length;\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return len * 2;\n case \"hex\":\n return len >>> 1;\n case \"base64\":\n return base64ToBytes(string).length;\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes3(string).length;\n }\n encoding = (\"\" + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer3.byteLength = byteLength;\n function slowToString(encoding, start, end) {\n let loweredCase = false;\n if (start === void 0 || start < 0) {\n start = 0;\n }\n if (start > this.length) {\n return \"\";\n }\n if (end === void 0 || end > this.length) {\n end = this.length;\n }\n if (end <= 0) {\n return \"\";\n }\n end >>>= 0;\n start >>>= 0;\n if (end <= start) {\n return \"\";\n }\n if (!encoding)\n encoding = \"utf8\";\n while (true) {\n switch (encoding) {\n case \"hex\":\n return hexSlice(this, start, end);\n case \"utf8\":\n case \"utf-8\":\n return utf8Slice(this, start, end);\n case \"ascii\":\n return asciiSlice(this, start, end);\n case \"latin1\":\n case \"binary\":\n return latin1Slice(this, start, end);\n case \"base64\":\n return base64Slice(this, start, end);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return utf16leSlice(this, start, end);\n default:\n if (loweredCase)\n throw new TypeError(\"Unknown encoding: \" + encoding);\n encoding = (encoding + \"\").toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer3.prototype._isBuffer = true;\n function swap(b4, n2, m2) {\n const i3 = b4[n2];\n b4[n2] = b4[m2];\n b4[m2] = i3;\n }\n Buffer3.prototype.swap16 = function swap16() {\n const len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 16-bits\");\n }\n for (let i3 = 0; i3 < len; i3 += 2) {\n swap(this, i3, i3 + 1);\n }\n return this;\n };\n Buffer3.prototype.swap32 = function swap32() {\n const len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 32-bits\");\n }\n for (let i3 = 0; i3 < len; i3 += 4) {\n swap(this, i3, i3 + 3);\n swap(this, i3 + 1, i3 + 2);\n }\n return this;\n };\n Buffer3.prototype.swap64 = function swap64() {\n const len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 64-bits\");\n }\n for (let i3 = 0; i3 < len; i3 += 8) {\n swap(this, i3, i3 + 7);\n swap(this, i3 + 1, i3 + 6);\n swap(this, i3 + 2, i3 + 5);\n swap(this, i3 + 3, i3 + 4);\n }\n return this;\n };\n Buffer3.prototype.toString = function toString2() {\n const length = this.length;\n if (length === 0)\n return \"\";\n if (arguments.length === 0)\n return utf8Slice(this, 0, length);\n return slowToString.apply(this, arguments);\n };\n Buffer3.prototype.toLocaleString = Buffer3.prototype.toString;\n Buffer3.prototype.equals = function equals(b4) {\n if (!Buffer3.isBuffer(b4))\n throw new TypeError(\"Argument must be a Buffer\");\n if (this === b4)\n return true;\n return Buffer3.compare(this, b4) === 0;\n };\n Buffer3.prototype.inspect = function inspect() {\n let str = \"\";\n const max = exports.INSPECT_MAX_BYTES;\n str = this.toString(\"hex\", 0, max).replace(/(.{2})/g, \"$1 \").trim();\n if (this.length > max)\n str += \" ... \";\n return \"\";\n };\n if (customInspectSymbol) {\n Buffer3.prototype[customInspectSymbol] = Buffer3.prototype.inspect;\n }\n Buffer3.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer3.from(target, target.offset, target.byteLength);\n }\n if (!Buffer3.isBuffer(target)) {\n throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target);\n }\n if (start === void 0) {\n start = 0;\n }\n if (end === void 0) {\n end = target ? target.length : 0;\n }\n if (thisStart === void 0) {\n thisStart = 0;\n }\n if (thisEnd === void 0) {\n thisEnd = this.length;\n }\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError(\"out of range index\");\n }\n if (thisStart >= thisEnd && start >= end) {\n return 0;\n }\n if (thisStart >= thisEnd) {\n return -1;\n }\n if (start >= end) {\n return 1;\n }\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n if (this === target)\n return 0;\n let x4 = thisEnd - thisStart;\n let y6 = end - start;\n const len = Math.min(x4, y6);\n const thisCopy = this.slice(thisStart, thisEnd);\n const targetCopy = target.slice(start, end);\n for (let i3 = 0; i3 < len; ++i3) {\n if (thisCopy[i3] !== targetCopy[i3]) {\n x4 = thisCopy[i3];\n y6 = targetCopy[i3];\n break;\n }\n }\n if (x4 < y6)\n return -1;\n if (y6 < x4)\n return 1;\n return 0;\n };\n function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) {\n if (buffer2.length === 0)\n return -1;\n if (typeof byteOffset === \"string\") {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 2147483647) {\n byteOffset = 2147483647;\n } else if (byteOffset < -2147483648) {\n byteOffset = -2147483648;\n }\n byteOffset = +byteOffset;\n if (numberIsNaN(byteOffset)) {\n byteOffset = dir ? 0 : buffer2.length - 1;\n }\n if (byteOffset < 0)\n byteOffset = buffer2.length + byteOffset;\n if (byteOffset >= buffer2.length) {\n if (dir)\n return -1;\n else\n byteOffset = buffer2.length - 1;\n } else if (byteOffset < 0) {\n if (dir)\n byteOffset = 0;\n else\n return -1;\n }\n if (typeof val === \"string\") {\n val = Buffer3.from(val, encoding);\n }\n if (Buffer3.isBuffer(val)) {\n if (val.length === 0) {\n return -1;\n }\n return arrayIndexOf(buffer2, val, byteOffset, encoding, dir);\n } else if (typeof val === \"number\") {\n val = val & 255;\n if (typeof Uint8Array.prototype.indexOf === \"function\") {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer2, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer2, val, byteOffset);\n }\n }\n return arrayIndexOf(buffer2, [val], byteOffset, encoding, dir);\n }\n throw new TypeError(\"val must be string, number or Buffer\");\n }\n function arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n let indexSize = 1;\n let arrLength = arr.length;\n let valLength = val.length;\n if (encoding !== void 0) {\n encoding = String(encoding).toLowerCase();\n if (encoding === \"ucs2\" || encoding === \"ucs-2\" || encoding === \"utf16le\" || encoding === \"utf-16le\") {\n if (arr.length < 2 || val.length < 2) {\n return -1;\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n function read(buf, i4) {\n if (indexSize === 1) {\n return buf[i4];\n } else {\n return buf.readUInt16BE(i4 * indexSize);\n }\n }\n let i3;\n if (dir) {\n let foundIndex = -1;\n for (i3 = byteOffset; i3 < arrLength; i3++) {\n if (read(arr, i3) === read(val, foundIndex === -1 ? 0 : i3 - foundIndex)) {\n if (foundIndex === -1)\n foundIndex = i3;\n if (i3 - foundIndex + 1 === valLength)\n return foundIndex * indexSize;\n } else {\n if (foundIndex !== -1)\n i3 -= i3 - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength)\n byteOffset = arrLength - valLength;\n for (i3 = byteOffset; i3 >= 0; i3--) {\n let found = true;\n for (let j2 = 0; j2 < valLength; j2++) {\n if (read(arr, i3 + j2) !== read(val, j2)) {\n found = false;\n break;\n }\n }\n if (found)\n return i3;\n }\n }\n return -1;\n }\n Buffer3.prototype.includes = function includes(val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1;\n };\n Buffer3.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n };\n Buffer3.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n };\n function hexWrite(buf, string, offset, length) {\n offset = Number(offset) || 0;\n const remaining = buf.length - offset;\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n if (length > remaining) {\n length = remaining;\n }\n }\n const strLen = string.length;\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n let i3;\n for (i3 = 0; i3 < length; ++i3) {\n const parsed = parseInt(string.substr(i3 * 2, 2), 16);\n if (numberIsNaN(parsed))\n return i3;\n buf[offset + i3] = parsed;\n }\n return i3;\n }\n function utf8Write(buf, string, offset, length) {\n return blitBuffer(utf8ToBytes3(string, buf.length - offset), buf, offset, length);\n }\n function asciiWrite(buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length);\n }\n function base64Write(buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length);\n }\n function ucs2Write(buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);\n }\n Buffer3.prototype.write = function write(string, offset, length, encoding) {\n if (offset === void 0) {\n encoding = \"utf8\";\n length = this.length;\n offset = 0;\n } else if (length === void 0 && typeof offset === \"string\") {\n encoding = offset;\n length = this.length;\n offset = 0;\n } else if (isFinite(offset)) {\n offset = offset >>> 0;\n if (isFinite(length)) {\n length = length >>> 0;\n if (encoding === void 0)\n encoding = \"utf8\";\n } else {\n encoding = length;\n length = void 0;\n }\n } else {\n throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");\n }\n const remaining = this.length - offset;\n if (length === void 0 || length > remaining)\n length = remaining;\n if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {\n throw new RangeError(\"Attempt to write outside buffer bounds\");\n }\n if (!encoding)\n encoding = \"utf8\";\n let loweredCase = false;\n for (; ; ) {\n switch (encoding) {\n case \"hex\":\n return hexWrite(this, string, offset, length);\n case \"utf8\":\n case \"utf-8\":\n return utf8Write(this, string, offset, length);\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return asciiWrite(this, string, offset, length);\n case \"base64\":\n return base64Write(this, string, offset, length);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return ucs2Write(this, string, offset, length);\n default:\n if (loweredCase)\n throw new TypeError(\"Unknown encoding: \" + encoding);\n encoding = (\"\" + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n };\n Buffer3.prototype.toJSON = function toJSON() {\n return {\n type: \"Buffer\",\n data: Array.prototype.slice.call(this._arr || this, 0)\n };\n };\n function base64Slice(buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf);\n } else {\n return base64.fromByteArray(buf.slice(start, end));\n }\n }\n function utf8Slice(buf, start, end) {\n end = Math.min(buf.length, end);\n const res = [];\n let i3 = start;\n while (i3 < end) {\n const firstByte = buf[i3];\n let codePoint = null;\n let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;\n if (i3 + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint;\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 128) {\n codePoint = firstByte;\n }\n break;\n case 2:\n secondByte = buf[i3 + 1];\n if ((secondByte & 192) === 128) {\n tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;\n if (tempCodePoint > 127) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 3:\n secondByte = buf[i3 + 1];\n thirdByte = buf[i3 + 2];\n if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {\n tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;\n if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 4:\n secondByte = buf[i3 + 1];\n thirdByte = buf[i3 + 2];\n fourthByte = buf[i3 + 3];\n if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {\n tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;\n if (tempCodePoint > 65535 && tempCodePoint < 1114112) {\n codePoint = tempCodePoint;\n }\n }\n }\n }\n if (codePoint === null) {\n codePoint = 65533;\n bytesPerSequence = 1;\n } else if (codePoint > 65535) {\n codePoint -= 65536;\n res.push(codePoint >>> 10 & 1023 | 55296);\n codePoint = 56320 | codePoint & 1023;\n }\n res.push(codePoint);\n i3 += bytesPerSequence;\n }\n return decodeCodePointsArray(res);\n }\n const MAX_ARGUMENTS_LENGTH = 4096;\n function decodeCodePointsArray(codePoints) {\n const len = codePoints.length;\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints);\n }\n let res = \"\";\n let i3 = 0;\n while (i3 < len) {\n res += String.fromCharCode.apply(String, codePoints.slice(i3, i3 += MAX_ARGUMENTS_LENGTH));\n }\n return res;\n }\n function asciiSlice(buf, start, end) {\n let ret = \"\";\n end = Math.min(buf.length, end);\n for (let i3 = start; i3 < end; ++i3) {\n ret += String.fromCharCode(buf[i3] & 127);\n }\n return ret;\n }\n function latin1Slice(buf, start, end) {\n let ret = \"\";\n end = Math.min(buf.length, end);\n for (let i3 = start; i3 < end; ++i3) {\n ret += String.fromCharCode(buf[i3]);\n }\n return ret;\n }\n function hexSlice(buf, start, end) {\n const len = buf.length;\n if (!start || start < 0)\n start = 0;\n if (!end || end < 0 || end > len)\n end = len;\n let out = \"\";\n for (let i3 = start; i3 < end; ++i3) {\n out += hexSliceLookupTable[buf[i3]];\n }\n return out;\n }\n function utf16leSlice(buf, start, end) {\n const bytes = buf.slice(start, end);\n let res = \"\";\n for (let i3 = 0; i3 < bytes.length - 1; i3 += 2) {\n res += String.fromCharCode(bytes[i3] + bytes[i3 + 1] * 256);\n }\n return res;\n }\n Buffer3.prototype.slice = function slice4(start, end) {\n const len = this.length;\n start = ~~start;\n end = end === void 0 ? len : ~~end;\n if (start < 0) {\n start += len;\n if (start < 0)\n start = 0;\n } else if (start > len) {\n start = len;\n }\n if (end < 0) {\n end += len;\n if (end < 0)\n end = 0;\n } else if (end > len) {\n end = len;\n }\n if (end < start)\n end = start;\n const newBuf = this.subarray(start, end);\n Object.setPrototypeOf(newBuf, Buffer3.prototype);\n return newBuf;\n };\n function checkOffset(offset, ext, length) {\n if (offset % 1 !== 0 || offset < 0)\n throw new RangeError(\"offset is not uint\");\n if (offset + ext > length)\n throw new RangeError(\"Trying to access beyond buffer length\");\n }\n Buffer3.prototype.readUintLE = Buffer3.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset, byteLength2, this.length);\n let val = this[offset];\n let mul = 1;\n let i3 = 0;\n while (++i3 < byteLength2 && (mul *= 256)) {\n val += this[offset + i3] * mul;\n }\n return val;\n };\n Buffer3.prototype.readUintBE = Buffer3.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n checkOffset(offset, byteLength2, this.length);\n }\n let val = this[offset + --byteLength2];\n let mul = 1;\n while (byteLength2 > 0 && (mul *= 256)) {\n val += this[offset + --byteLength2] * mul;\n }\n return val;\n };\n Buffer3.prototype.readUint8 = Buffer3.prototype.readUInt8 = function readUInt8(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 1, this.length);\n return this[offset];\n };\n Buffer3.prototype.readUint16LE = Buffer3.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n return this[offset] | this[offset + 1] << 8;\n };\n Buffer3.prototype.readUint16BE = Buffer3.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n return this[offset] << 8 | this[offset + 1];\n };\n Buffer3.prototype.readUint32LE = Buffer3.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;\n };\n Buffer3.prototype.readUint32BE = Buffer3.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);\n };\n Buffer3.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) {\n offset = offset >>> 0;\n validateNumber(offset, \"offset\");\n const first = this[offset];\n const last = this[offset + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset, this.length - 8);\n }\n const lo = first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24;\n const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24;\n return BigInt(lo) + (BigInt(hi) << BigInt(32));\n });\n Buffer3.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) {\n offset = offset >>> 0;\n validateNumber(offset, \"offset\");\n const first = this[offset];\n const last = this[offset + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset, this.length - 8);\n }\n const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];\n const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last;\n return (BigInt(hi) << BigInt(32)) + BigInt(lo);\n });\n Buffer3.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset, byteLength2, this.length);\n let val = this[offset];\n let mul = 1;\n let i3 = 0;\n while (++i3 < byteLength2 && (mul *= 256)) {\n val += this[offset + i3] * mul;\n }\n mul *= 128;\n if (val >= mul)\n val -= Math.pow(2, 8 * byteLength2);\n return val;\n };\n Buffer3.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) {\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset, byteLength2, this.length);\n let i3 = byteLength2;\n let mul = 1;\n let val = this[offset + --i3];\n while (i3 > 0 && (mul *= 256)) {\n val += this[offset + --i3] * mul;\n }\n mul *= 128;\n if (val >= mul)\n val -= Math.pow(2, 8 * byteLength2);\n return val;\n };\n Buffer3.prototype.readInt8 = function readInt8(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 1, this.length);\n if (!(this[offset] & 128))\n return this[offset];\n return (255 - this[offset] + 1) * -1;\n };\n Buffer3.prototype.readInt16LE = function readInt16LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n const val = this[offset] | this[offset + 1] << 8;\n return val & 32768 ? val | 4294901760 : val;\n };\n Buffer3.prototype.readInt16BE = function readInt16BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 2, this.length);\n const val = this[offset + 1] | this[offset] << 8;\n return val & 32768 ? val | 4294901760 : val;\n };\n Buffer3.prototype.readInt32LE = function readInt32LE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;\n };\n Buffer3.prototype.readInt32BE = function readInt32BE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];\n };\n Buffer3.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) {\n offset = offset >>> 0;\n validateNumber(offset, \"offset\");\n const first = this[offset];\n const last = this[offset + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset, this.length - 8);\n }\n const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24);\n return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24);\n });\n Buffer3.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) {\n offset = offset >>> 0;\n validateNumber(offset, \"offset\");\n const first = this[offset];\n const last = this[offset + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset, this.length - 8);\n }\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];\n return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last);\n });\n Buffer3.prototype.readFloatLE = function readFloatLE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, true, 23, 4);\n };\n Buffer3.prototype.readFloatBE = function readFloatBE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, false, 23, 4);\n };\n Buffer3.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, true, 52, 8);\n };\n Buffer3.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {\n offset = offset >>> 0;\n if (!noAssert)\n checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, false, 52, 8);\n };\n function checkInt(buf, value, offset, ext, max, min) {\n if (!Buffer3.isBuffer(buf))\n throw new TypeError('\"buffer\" argument must be a Buffer instance');\n if (value > max || value < min)\n throw new RangeError('\"value\" argument is out of bounds');\n if (offset + ext > buf.length)\n throw new RangeError(\"Index out of range\");\n }\n Buffer3.prototype.writeUintLE = Buffer3.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength2) - 1;\n checkInt(this, value, offset, byteLength2, maxBytes, 0);\n }\n let mul = 1;\n let i3 = 0;\n this[offset] = value & 255;\n while (++i3 < byteLength2 && (mul *= 256)) {\n this[offset + i3] = value / mul & 255;\n }\n return offset + byteLength2;\n };\n Buffer3.prototype.writeUintBE = Buffer3.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength2) - 1;\n checkInt(this, value, offset, byteLength2, maxBytes, 0);\n }\n let i3 = byteLength2 - 1;\n let mul = 1;\n this[offset + i3] = value & 255;\n while (--i3 >= 0 && (mul *= 256)) {\n this[offset + i3] = value / mul & 255;\n }\n return offset + byteLength2;\n };\n Buffer3.prototype.writeUint8 = Buffer3.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 1, 255, 0);\n this[offset] = value & 255;\n return offset + 1;\n };\n Buffer3.prototype.writeUint16LE = Buffer3.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 65535, 0);\n this[offset] = value & 255;\n this[offset + 1] = value >>> 8;\n return offset + 2;\n };\n Buffer3.prototype.writeUint16BE = Buffer3.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 65535, 0);\n this[offset] = value >>> 8;\n this[offset + 1] = value & 255;\n return offset + 2;\n };\n Buffer3.prototype.writeUint32LE = Buffer3.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 4294967295, 0);\n this[offset + 3] = value >>> 24;\n this[offset + 2] = value >>> 16;\n this[offset + 1] = value >>> 8;\n this[offset] = value & 255;\n return offset + 4;\n };\n Buffer3.prototype.writeUint32BE = Buffer3.prototype.writeUInt32BE = function writeUInt32BE2(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 4294967295, 0);\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 255;\n return offset + 4;\n };\n function wrtBigUInt64LE(buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7);\n let lo = Number(value & BigInt(4294967295));\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n lo = lo >> 8;\n buf[offset++] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(4294967295));\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n hi = hi >> 8;\n buf[offset++] = hi;\n return offset;\n }\n function wrtBigUInt64BE(buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7);\n let lo = Number(value & BigInt(4294967295));\n buf[offset + 7] = lo;\n lo = lo >> 8;\n buf[offset + 6] = lo;\n lo = lo >> 8;\n buf[offset + 5] = lo;\n lo = lo >> 8;\n buf[offset + 4] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(4294967295));\n buf[offset + 3] = hi;\n hi = hi >> 8;\n buf[offset + 2] = hi;\n hi = hi >> 8;\n buf[offset + 1] = hi;\n hi = hi >> 8;\n buf[offset] = hi;\n return offset + 8;\n }\n Buffer3.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt(\"0xffffffffffffffff\"));\n });\n Buffer3.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt(\"0xffffffffffffffff\"));\n });\n Buffer3.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, 8 * byteLength2 - 1);\n checkInt(this, value, offset, byteLength2, limit - 1, -limit);\n }\n let i3 = 0;\n let mul = 1;\n let sub = 0;\n this[offset] = value & 255;\n while (++i3 < byteLength2 && (mul *= 256)) {\n if (value < 0 && sub === 0 && this[offset + i3 - 1] !== 0) {\n sub = 1;\n }\n this[offset + i3] = (value / mul >> 0) - sub & 255;\n }\n return offset + byteLength2;\n };\n Buffer3.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, 8 * byteLength2 - 1);\n checkInt(this, value, offset, byteLength2, limit - 1, -limit);\n }\n let i3 = byteLength2 - 1;\n let mul = 1;\n let sub = 0;\n this[offset + i3] = value & 255;\n while (--i3 >= 0 && (mul *= 256)) {\n if (value < 0 && sub === 0 && this[offset + i3 + 1] !== 0) {\n sub = 1;\n }\n this[offset + i3] = (value / mul >> 0) - sub & 255;\n }\n return offset + byteLength2;\n };\n Buffer3.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 1, 127, -128);\n if (value < 0)\n value = 255 + value + 1;\n this[offset] = value & 255;\n return offset + 1;\n };\n Buffer3.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 32767, -32768);\n this[offset] = value & 255;\n this[offset + 1] = value >>> 8;\n return offset + 2;\n };\n Buffer3.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 2, 32767, -32768);\n this[offset] = value >>> 8;\n this[offset + 1] = value & 255;\n return offset + 2;\n };\n Buffer3.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 2147483647, -2147483648);\n this[offset] = value & 255;\n this[offset + 1] = value >>> 8;\n this[offset + 2] = value >>> 16;\n this[offset + 3] = value >>> 24;\n return offset + 4;\n };\n Buffer3.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert)\n checkInt(this, value, offset, 4, 2147483647, -2147483648);\n if (value < 0)\n value = 4294967295 + value + 1;\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 255;\n return offset + 4;\n };\n Buffer3.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt(\"0x8000000000000000\"), BigInt(\"0x7fffffffffffffff\"));\n });\n Buffer3.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt(\"0x8000000000000000\"), BigInt(\"0x7fffffffffffffff\"));\n });\n function checkIEEE754(buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length)\n throw new RangeError(\"Index out of range\");\n if (offset < 0)\n throw new RangeError(\"Index out of range\");\n }\n function writeFloat(buf, value, offset, littleEndian, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4);\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4);\n return offset + 4;\n }\n Buffer3.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert);\n };\n Buffer3.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert);\n };\n function writeDouble(buf, value, offset, littleEndian, noAssert) {\n value = +value;\n offset = offset >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8);\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8);\n return offset + 8;\n }\n Buffer3.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert);\n };\n Buffer3.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert);\n };\n Buffer3.prototype.copy = function copy(target, targetStart, start, end) {\n if (!Buffer3.isBuffer(target))\n throw new TypeError(\"argument should be a Buffer\");\n if (!start)\n start = 0;\n if (!end && end !== 0)\n end = this.length;\n if (targetStart >= target.length)\n targetStart = target.length;\n if (!targetStart)\n targetStart = 0;\n if (end > 0 && end < start)\n end = start;\n if (end === start)\n return 0;\n if (target.length === 0 || this.length === 0)\n return 0;\n if (targetStart < 0) {\n throw new RangeError(\"targetStart out of bounds\");\n }\n if (start < 0 || start >= this.length)\n throw new RangeError(\"Index out of range\");\n if (end < 0)\n throw new RangeError(\"sourceEnd out of bounds\");\n if (end > this.length)\n end = this.length;\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n const len = end - start;\n if (this === target && typeof Uint8Array.prototype.copyWithin === \"function\") {\n this.copyWithin(targetStart, start, end);\n } else {\n Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);\n }\n return len;\n };\n Buffer3.prototype.fill = function fill(val, start, end, encoding) {\n if (typeof val === \"string\") {\n if (typeof start === \"string\") {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === \"string\") {\n encoding = end;\n end = this.length;\n }\n if (encoding !== void 0 && typeof encoding !== \"string\") {\n throw new TypeError(\"encoding must be a string\");\n }\n if (typeof encoding === \"string\" && !Buffer3.isEncoding(encoding)) {\n throw new TypeError(\"Unknown encoding: \" + encoding);\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0);\n if (encoding === \"utf8\" && code < 128 || encoding === \"latin1\") {\n val = code;\n }\n }\n } else if (typeof val === \"number\") {\n val = val & 255;\n } else if (typeof val === \"boolean\") {\n val = Number(val);\n }\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError(\"Out of range index\");\n }\n if (end <= start) {\n return this;\n }\n start = start >>> 0;\n end = end === void 0 ? this.length : end >>> 0;\n if (!val)\n val = 0;\n let i3;\n if (typeof val === \"number\") {\n for (i3 = start; i3 < end; ++i3) {\n this[i3] = val;\n }\n } else {\n const bytes = Buffer3.isBuffer(val) ? val : Buffer3.from(val, encoding);\n const len = bytes.length;\n if (len === 0) {\n throw new TypeError('The value \"' + val + '\" is invalid for argument \"value\"');\n }\n for (i3 = 0; i3 < end - start; ++i3) {\n this[i3 + start] = bytes[i3 % len];\n }\n }\n return this;\n };\n const errors = {};\n function E2(sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor() {\n super();\n Object.defineProperty(this, \"message\", {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n });\n this.name = `${this.name} [${sym}]`;\n this.stack;\n delete this.name;\n }\n get code() {\n return sym;\n }\n set code(value) {\n Object.defineProperty(this, \"code\", {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n });\n }\n toString() {\n return `${this.name} [${sym}]: ${this.message}`;\n }\n };\n }\n E2(\"ERR_BUFFER_OUT_OF_BOUNDS\", function(name) {\n if (name) {\n return `${name} is outside of buffer bounds`;\n }\n return \"Attempt to access memory outside buffer bounds\";\n }, RangeError);\n E2(\"ERR_INVALID_ARG_TYPE\", function(name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`;\n }, TypeError);\n E2(\"ERR_OUT_OF_RANGE\", function(str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`;\n let received = input;\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input));\n } else if (typeof input === \"bigint\") {\n received = String(input);\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received);\n }\n received += \"n\";\n }\n msg += ` It must be ${range}. Received ${received}`;\n return msg;\n }, RangeError);\n function addNumericalSeparator(val) {\n let res = \"\";\n let i3 = val.length;\n const start = val[0] === \"-\" ? 1 : 0;\n for (; i3 >= start + 4; i3 -= 3) {\n res = `_${val.slice(i3 - 3, i3)}${res}`;\n }\n return `${val.slice(0, i3)}${res}`;\n }\n function checkBounds(buf, offset, byteLength2) {\n validateNumber(offset, \"offset\");\n if (buf[offset] === void 0 || buf[offset + byteLength2] === void 0) {\n boundsError(offset, buf.length - (byteLength2 + 1));\n }\n }\n function checkIntBI(value, min, max, buf, offset, byteLength2) {\n if (value > max || value < min) {\n const n2 = typeof min === \"bigint\" ? \"n\" : \"\";\n let range;\n {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n2} and < 2${n2} ** ${(byteLength2 + 1) * 8}${n2}`;\n } else {\n range = `>= -(2${n2} ** ${(byteLength2 + 1) * 8 - 1}${n2}) and < 2 ** ${(byteLength2 + 1) * 8 - 1}${n2}`;\n }\n }\n throw new errors.ERR_OUT_OF_RANGE(\"value\", range, value);\n }\n checkBounds(buf, offset, byteLength2);\n }\n function validateNumber(value, name) {\n if (typeof value !== \"number\") {\n throw new errors.ERR_INVALID_ARG_TYPE(name, \"number\", value);\n }\n }\n function boundsError(value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type);\n throw new errors.ERR_OUT_OF_RANGE(\"offset\", \"an integer\", value);\n }\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();\n }\n throw new errors.ERR_OUT_OF_RANGE(\"offset\", `>= ${0} and <= ${length}`, value);\n }\n const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\n function base64clean(str) {\n str = str.split(\"=\")[0];\n str = str.trim().replace(INVALID_BASE64_RE, \"\");\n if (str.length < 2)\n return \"\";\n while (str.length % 4 !== 0) {\n str = str + \"=\";\n }\n return str;\n }\n function utf8ToBytes3(string, units) {\n units = units || Infinity;\n let codePoint;\n const length = string.length;\n let leadSurrogate = null;\n const bytes = [];\n for (let i3 = 0; i3 < length; ++i3) {\n codePoint = string.charCodeAt(i3);\n if (codePoint > 55295 && codePoint < 57344) {\n if (!leadSurrogate) {\n if (codePoint > 56319) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n continue;\n } else if (i3 + 1 === length) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n continue;\n }\n leadSurrogate = codePoint;\n continue;\n }\n if (codePoint < 56320) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n leadSurrogate = codePoint;\n continue;\n }\n codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;\n } else if (leadSurrogate) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n }\n leadSurrogate = null;\n if (codePoint < 128) {\n if ((units -= 1) < 0)\n break;\n bytes.push(codePoint);\n } else if (codePoint < 2048) {\n if ((units -= 2) < 0)\n break;\n bytes.push(codePoint >> 6 | 192, codePoint & 63 | 128);\n } else if (codePoint < 65536) {\n if ((units -= 3) < 0)\n break;\n bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);\n } else if (codePoint < 1114112) {\n if ((units -= 4) < 0)\n break;\n bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);\n } else {\n throw new Error(\"Invalid code point\");\n }\n }\n return bytes;\n }\n function asciiToBytes(str) {\n const byteArray = [];\n for (let i3 = 0; i3 < str.length; ++i3) {\n byteArray.push(str.charCodeAt(i3) & 255);\n }\n return byteArray;\n }\n function utf16leToBytes(str, units) {\n let c4, hi, lo;\n const byteArray = [];\n for (let i3 = 0; i3 < str.length; ++i3) {\n if ((units -= 2) < 0)\n break;\n c4 = str.charCodeAt(i3);\n hi = c4 >> 8;\n lo = c4 % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n return byteArray;\n }\n function base64ToBytes(str) {\n return base64.toByteArray(base64clean(str));\n }\n function blitBuffer(src, dst, offset, length) {\n let i3;\n for (i3 = 0; i3 < length; ++i3) {\n if (i3 + offset >= dst.length || i3 >= src.length)\n break;\n dst[i3 + offset] = src[i3];\n }\n return i3;\n }\n function isInstance(obj, type) {\n return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;\n }\n function numberIsNaN(obj) {\n return obj !== obj;\n }\n const hexSliceLookupTable = function() {\n const alphabet2 = \"0123456789abcdef\";\n const table = new Array(256);\n for (let i3 = 0; i3 < 16; ++i3) {\n const i16 = i3 * 16;\n for (let j2 = 0; j2 < 16; ++j2) {\n table[i16 + j2] = alphabet2[i3] + alphabet2[j2];\n }\n }\n return table;\n }();\n function defineBigIntMethod(fn) {\n return typeof BigInt === \"undefined\" ? BufferBigIntNotDefined : fn;\n }\n function BufferBigIntNotDefined() {\n throw new Error(\"BigInt not supported\");\n }\n return exports;\n }\n var exports$2, _dewExec$2, exports$1, _dewExec$1, exports, _dewExec;\n var init_chunk_DtuTasat = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n exports$2 = {};\n _dewExec$2 = false;\n exports$1 = {};\n _dewExec$1 = false;\n exports = {};\n _dewExec = false;\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/buffer.js\n var buffer_exports = {};\n __export(buffer_exports, {\n Buffer: () => Buffer2,\n INSPECT_MAX_BYTES: () => INSPECT_MAX_BYTES,\n default: () => exports2,\n kMaxLength: () => kMaxLength\n });\n var exports2, Buffer2, INSPECT_MAX_BYTES, kMaxLength;\n var init_buffer = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/buffer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chunk_DtuTasat();\n exports2 = dew();\n exports2[\"Buffer\"];\n exports2[\"SlowBuffer\"];\n exports2[\"INSPECT_MAX_BYTES\"];\n exports2[\"kMaxLength\"];\n Buffer2 = exports2.Buffer;\n INSPECT_MAX_BYTES = exports2.INSPECT_MAX_BYTES;\n kMaxLength = exports2.kMaxLength;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/buffer.js\n var init_buffer2 = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/buffer.js\"() {\n \"use strict\";\n init_buffer();\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/util.js\n var require_util = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/util.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getParsedType = exports3.ZodParsedType = exports3.objectUtil = exports3.util = void 0;\n var util2;\n (function(util3) {\n util3.assertEqual = (_2) => {\n };\n function assertIs(_arg) {\n }\n util3.assertIs = assertIs;\n function assertNever2(_x) {\n throw new Error();\n }\n util3.assertNever = assertNever2;\n util3.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util3.getValidEnumValues = (obj) => {\n const validKeys = util3.objectKeys(obj).filter((k4) => typeof obj[obj[k4]] !== \"number\");\n const filtered = {};\n for (const k4 of validKeys) {\n filtered[k4] = obj[k4];\n }\n return util3.objectValues(filtered);\n };\n util3.objectValues = (obj) => {\n return util3.objectKeys(obj).map(function(e2) {\n return obj[e2];\n });\n };\n util3.objectKeys = typeof Object.keys === \"function\" ? (obj) => Object.keys(obj) : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util3.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return void 0;\n };\n util3.isInteger = typeof Number.isInteger === \"function\" ? (val) => Number.isInteger(val) : (val) => typeof val === \"number\" && Number.isFinite(val) && Math.floor(val) === val;\n function joinValues(array, separator = \" | \") {\n return array.map((val) => typeof val === \"string\" ? `'${val}'` : val).join(separator);\n }\n util3.joinValues = joinValues;\n util3.jsonStringifyReplacer = (_2, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n })(util2 || (exports3.util = util2 = {}));\n var objectUtil2;\n (function(objectUtil3) {\n objectUtil3.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second\n // second overwrites first\n };\n };\n })(objectUtil2 || (exports3.objectUtil = objectUtil2 = {}));\n exports3.ZodParsedType = util2.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\"\n ]);\n var getParsedType2 = (data) => {\n const t3 = typeof data;\n switch (t3) {\n case \"undefined\":\n return exports3.ZodParsedType.undefined;\n case \"string\":\n return exports3.ZodParsedType.string;\n case \"number\":\n return Number.isNaN(data) ? exports3.ZodParsedType.nan : exports3.ZodParsedType.number;\n case \"boolean\":\n return exports3.ZodParsedType.boolean;\n case \"function\":\n return exports3.ZodParsedType.function;\n case \"bigint\":\n return exports3.ZodParsedType.bigint;\n case \"symbol\":\n return exports3.ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return exports3.ZodParsedType.array;\n }\n if (data === null) {\n return exports3.ZodParsedType.null;\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return exports3.ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return exports3.ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return exports3.ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return exports3.ZodParsedType.date;\n }\n return exports3.ZodParsedType.object;\n default:\n return exports3.ZodParsedType.unknown;\n }\n };\n exports3.getParsedType = getParsedType2;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/ZodError.js\n var require_ZodError = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/ZodError.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ZodError = exports3.quotelessJson = exports3.ZodIssueCode = void 0;\n var util_js_1 = require_util();\n exports3.ZodIssueCode = util_js_1.util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\"\n ]);\n var quotelessJson2 = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n };\n exports3.quotelessJson = quotelessJson2;\n var ZodError2 = class _ZodError extends Error {\n get errors() {\n return this.issues;\n }\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(this, actualProto);\n } else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n format(_mapper) {\n const mapper = _mapper || function(issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n } else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n } else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n } else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n } else {\n let curr = fieldErrors;\n let i3 = 0;\n while (i3 < issue.path.length) {\n const el = issue.path[i3];\n const terminal = i3 === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n } else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i3++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n static assert(value) {\n if (!(value instanceof _ZodError)) {\n throw new Error(`Not a ZodError: ${value}`);\n }\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util_js_1.util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n } else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n };\n exports3.ZodError = ZodError2;\n ZodError2.create = (issues) => {\n const error = new ZodError2(issues);\n return error;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/locales/en.js\n var require_en = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/locales/en.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var ZodError_js_1 = require_ZodError();\n var util_js_1 = require_util();\n var errorMap2 = (issue, _ctx) => {\n let message2;\n switch (issue.code) {\n case ZodError_js_1.ZodIssueCode.invalid_type:\n if (issue.received === util_js_1.ZodParsedType.undefined) {\n message2 = \"Required\";\n } else {\n message2 = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodError_js_1.ZodIssueCode.invalid_literal:\n message2 = `Invalid literal value, expected ${JSON.stringify(issue.expected, util_js_1.util.jsonStringifyReplacer)}`;\n break;\n case ZodError_js_1.ZodIssueCode.unrecognized_keys:\n message2 = `Unrecognized key(s) in object: ${util_js_1.util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_union:\n message2 = `Invalid input`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_union_discriminator:\n message2 = `Invalid discriminator value. Expected ${util_js_1.util.joinValues(issue.options)}`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_enum_value:\n message2 = `Invalid enum value. Expected ${util_js_1.util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_arguments:\n message2 = `Invalid function arguments`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_return_type:\n message2 = `Invalid function return type`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_date:\n message2 = `Invalid date`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message2 = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message2 = `${message2} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n } else if (\"startsWith\" in issue.validation) {\n message2 = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n } else if (\"endsWith\" in issue.validation) {\n message2 = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n } else {\n util_js_1.util.assertNever(issue.validation);\n }\n } else if (issue.validation !== \"regex\") {\n message2 = `Invalid ${issue.validation}`;\n } else {\n message2 = \"Invalid\";\n }\n break;\n case ZodError_js_1.ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message2 = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message2 = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message2 = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message2 = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message2 = \"Invalid input\";\n break;\n case ZodError_js_1.ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message2 = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message2 = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message2 = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message2 = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message2 = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message2 = \"Invalid input\";\n break;\n case ZodError_js_1.ZodIssueCode.custom:\n message2 = `Invalid input`;\n break;\n case ZodError_js_1.ZodIssueCode.invalid_intersection_types:\n message2 = `Intersection results could not be merged`;\n break;\n case ZodError_js_1.ZodIssueCode.not_multiple_of:\n message2 = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodError_js_1.ZodIssueCode.not_finite:\n message2 = \"Number must be finite\";\n break;\n default:\n message2 = _ctx.defaultError;\n util_js_1.util.assertNever(issue);\n }\n return { message: message2 };\n };\n exports3.default = errorMap2;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/errors.js\n var require_errors = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/errors.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.defaultErrorMap = void 0;\n exports3.setErrorMap = setErrorMap2;\n exports3.getErrorMap = getErrorMap2;\n var en_js_1 = __importDefault4(require_en());\n exports3.defaultErrorMap = en_js_1.default;\n var overrideErrorMap2 = en_js_1.default;\n function setErrorMap2(map) {\n overrideErrorMap2 = map;\n }\n function getErrorMap2() {\n return overrideErrorMap2;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/parseUtil.js\n var require_parseUtil = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/parseUtil.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.isAsync = exports3.isValid = exports3.isDirty = exports3.isAborted = exports3.OK = exports3.DIRTY = exports3.INVALID = exports3.ParseStatus = exports3.EMPTY_PATH = exports3.makeIssue = void 0;\n exports3.addIssueToContext = addIssueToContext2;\n var errors_js_1 = require_errors();\n var en_js_1 = __importDefault4(require_en());\n var makeIssue2 = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...issueData.path || []];\n const fullIssue = {\n ...issueData,\n path: fullPath\n };\n if (issueData.message !== void 0) {\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message\n };\n }\n let errorMessage = \"\";\n const maps = errorMaps.filter((m2) => !!m2).slice().reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: errorMessage\n };\n };\n exports3.makeIssue = makeIssue2;\n exports3.EMPTY_PATH = [];\n function addIssueToContext2(ctx, issueData) {\n const overrideMap = (0, errors_js_1.getErrorMap)();\n const issue = (0, exports3.makeIssue)({\n issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n // contextual error map is first priority\n ctx.schemaErrorMap,\n // then schema-bound map if available\n overrideMap,\n // then global override map\n overrideMap === en_js_1.default ? void 0 : en_js_1.default\n // then global default map\n ].filter((x4) => !!x4)\n });\n ctx.common.issues.push(issue);\n }\n var ParseStatus2 = class _ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s4 of results) {\n if (s4.status === \"aborted\")\n return exports3.INVALID;\n if (s4.status === \"dirty\")\n status.dirty();\n arrayValue.push(s4.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value\n });\n }\n return _ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return exports3.INVALID;\n if (value.status === \"aborted\")\n return exports3.INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" && (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n };\n exports3.ParseStatus = ParseStatus2;\n exports3.INVALID = Object.freeze({\n status: \"aborted\"\n });\n var DIRTY2 = (value) => ({ status: \"dirty\", value });\n exports3.DIRTY = DIRTY2;\n var OK2 = (value) => ({ status: \"valid\", value });\n exports3.OK = OK2;\n var isAborted2 = (x4) => x4.status === \"aborted\";\n exports3.isAborted = isAborted2;\n var isDirty2 = (x4) => x4.status === \"dirty\";\n exports3.isDirty = isDirty2;\n var isValid2 = (x4) => x4.status === \"valid\";\n exports3.isValid = isValid2;\n var isAsync2 = (x4) => typeof Promise !== \"undefined\" && x4 instanceof Promise;\n exports3.isAsync = isAsync2;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/typeAliases.js\n var require_typeAliases = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/typeAliases.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/errorUtil.js\n var require_errorUtil = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/helpers/errorUtil.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.errorUtil = void 0;\n var errorUtil2;\n (function(errorUtil3) {\n errorUtil3.errToObj = (message2) => typeof message2 === \"string\" ? { message: message2 } : message2 || {};\n errorUtil3.toString = (message2) => typeof message2 === \"string\" ? message2 : message2?.message;\n })(errorUtil2 || (exports3.errorUtil = errorUtil2 = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/types.js\n var require_types = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/types.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.discriminatedUnion = exports3.date = exports3.boolean = exports3.bigint = exports3.array = exports3.any = exports3.coerce = exports3.ZodFirstPartyTypeKind = exports3.late = exports3.ZodSchema = exports3.Schema = exports3.ZodReadonly = exports3.ZodPipeline = exports3.ZodBranded = exports3.BRAND = exports3.ZodNaN = exports3.ZodCatch = exports3.ZodDefault = exports3.ZodNullable = exports3.ZodOptional = exports3.ZodTransformer = exports3.ZodEffects = exports3.ZodPromise = exports3.ZodNativeEnum = exports3.ZodEnum = exports3.ZodLiteral = exports3.ZodLazy = exports3.ZodFunction = exports3.ZodSet = exports3.ZodMap = exports3.ZodRecord = exports3.ZodTuple = exports3.ZodIntersection = exports3.ZodDiscriminatedUnion = exports3.ZodUnion = exports3.ZodObject = exports3.ZodArray = exports3.ZodVoid = exports3.ZodNever = exports3.ZodUnknown = exports3.ZodAny = exports3.ZodNull = exports3.ZodUndefined = exports3.ZodSymbol = exports3.ZodDate = exports3.ZodBoolean = exports3.ZodBigInt = exports3.ZodNumber = exports3.ZodString = exports3.ZodType = void 0;\n exports3.NEVER = exports3.void = exports3.unknown = exports3.union = exports3.undefined = exports3.tuple = exports3.transformer = exports3.symbol = exports3.string = exports3.strictObject = exports3.set = exports3.record = exports3.promise = exports3.preprocess = exports3.pipeline = exports3.ostring = exports3.optional = exports3.onumber = exports3.oboolean = exports3.object = exports3.number = exports3.nullable = exports3.null = exports3.never = exports3.nativeEnum = exports3.nan = exports3.map = exports3.literal = exports3.lazy = exports3.intersection = exports3.instanceof = exports3.function = exports3.enum = exports3.effect = void 0;\n exports3.datetimeRegex = datetimeRegex2;\n exports3.custom = custom3;\n var ZodError_js_1 = require_ZodError();\n var errors_js_1 = require_errors();\n var errorUtil_js_1 = require_errorUtil();\n var parseUtil_js_1 = require_parseUtil();\n var util_js_1 = require_util();\n var ParseInputLazyPath2 = class {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (Array.isArray(this._key)) {\n this._cachedPath.push(...this._path, ...this._key);\n } else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n };\n var handleResult2 = (ctx, result) => {\n if ((0, parseUtil_js_1.isValid)(result)) {\n return { success: true, data: result.value };\n } else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError_js_1.ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n }\n };\n }\n };\n function processCreateParams2(params) {\n if (!params)\n return {};\n const { errorMap: errorMap2, invalid_type_error, required_error, description } = params;\n if (errorMap2 && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap2)\n return { errorMap: errorMap2, description };\n const customMap = (iss, ctx) => {\n const { message: message2 } = params;\n if (iss.code === \"invalid_enum_value\") {\n return { message: message2 ?? ctx.defaultError };\n }\n if (typeof ctx.data === \"undefined\") {\n return { message: message2 ?? required_error ?? ctx.defaultError };\n }\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n return { message: message2 ?? invalid_type_error ?? ctx.defaultError };\n };\n return { errorMap: customMap, description };\n }\n var ZodType2 = class {\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return (0, util_js_1.getParsedType)(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: (0, util_js_1.getParsedType)(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent\n };\n }\n _processInputParams(input) {\n return {\n status: new parseUtil_js_1.ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: (0, util_js_1.getParsedType)(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent\n }\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if ((0, parseUtil_js_1.isAsync)(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n const ctx = {\n common: {\n issues: [],\n async: params?.async ?? false,\n contextualErrorMap: params?.errorMap\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_js_1.getParsedType)(data)\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult2(ctx, result);\n }\n \"~validate\"(data) {\n const ctx = {\n common: {\n issues: [],\n async: !!this[\"~standard\"].async\n },\n path: [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_js_1.getParsedType)(data)\n };\n if (!this[\"~standard\"].async) {\n try {\n const result = this._parseSync({ data, path: [], parent: ctx });\n return (0, parseUtil_js_1.isValid)(result) ? {\n value: result.value\n } : {\n issues: ctx.common.issues\n };\n } catch (err) {\n if (err?.message?.toLowerCase()?.includes(\"encountered\")) {\n this[\"~standard\"].async = true;\n }\n ctx.common = {\n issues: [],\n async: true\n };\n }\n }\n return this._parseAsync({ data, path: [], parent: ctx }).then((result) => (0, parseUtil_js_1.isValid)(result) ? {\n value: result.value\n } : {\n issues: ctx.common.issues\n });\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params?.errorMap,\n async: true\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_js_1.getParsedType)(data)\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await ((0, parseUtil_js_1.isAsync)(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));\n return handleResult2(ctx, result);\n }\n refine(check2, message2) {\n const getIssueProperties = (val) => {\n if (typeof message2 === \"string\" || typeof message2 === \"undefined\") {\n return { message: message2 };\n } else if (typeof message2 === \"function\") {\n return message2(val);\n } else {\n return message2;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check2(val);\n const setError = () => ctx.addIssue({\n code: ZodError_js_1.ZodIssueCode.custom,\n ...getIssueProperties(val)\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n } else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n } else {\n return true;\n }\n });\n }\n refinement(check2, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check2(val)) {\n ctx.addIssue(typeof refinementData === \"function\" ? refinementData(val, ctx) : refinementData);\n return false;\n } else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects2({\n schema: this,\n typeName: ZodFirstPartyTypeKind2.ZodEffects,\n effect: { type: \"refinement\", refinement }\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n constructor(def) {\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n this[\"~standard\"] = {\n version: 1,\n vendor: \"zod\",\n validate: (data) => this[\"~validate\"](data)\n };\n }\n optional() {\n return ZodOptional2.create(this, this._def);\n }\n nullable() {\n return ZodNullable2.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray2.create(this);\n }\n promise() {\n return ZodPromise2.create(this, this._def);\n }\n or(option) {\n return ZodUnion2.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection2.create(this, incoming, this._def);\n }\n transform(transform) {\n return new ZodEffects2({\n ...processCreateParams2(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind2.ZodEffects,\n effect: { type: \"transform\", transform }\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault2({\n ...processCreateParams2(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind2.ZodDefault\n });\n }\n brand() {\n return new ZodBranded2({\n typeName: ZodFirstPartyTypeKind2.ZodBranded,\n type: this,\n ...processCreateParams2(this._def)\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch2({\n ...processCreateParams2(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind2.ZodCatch\n });\n }\n describe(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description\n });\n }\n pipe(target) {\n return ZodPipeline2.create(this, target);\n }\n readonly() {\n return ZodReadonly2.create(this);\n }\n isOptional() {\n return this.safeParse(void 0).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n };\n exports3.ZodType = ZodType2;\n exports3.Schema = ZodType2;\n exports3.ZodSchema = ZodType2;\n var cuidRegex2 = /^c[^\\s-]{8,}$/i;\n var cuid2Regex2 = /^[0-9a-z]+$/;\n var ulidRegex2 = /^[0-9A-HJKMNP-TV-Z]{26}$/i;\n var uuidRegex2 = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\n var nanoidRegex2 = /^[a-z0-9_-]{21}$/i;\n var jwtRegex2 = /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/;\n var durationRegex2 = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n var emailRegex2 = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n var _emojiRegex2 = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\n var emojiRegex2;\n var ipv4Regex2 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\n var ipv4CidrRegex2 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/(3[0-2]|[12]?[0-9])$/;\n var ipv6Regex2 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;\n var ipv6CidrRegex2 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n var base64Regex3 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;\n var base64urlRegex2 = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;\n var dateRegexSource2 = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\n var dateRegex2 = new RegExp(`^${dateRegexSource2}$`);\n function timeRegexSource2(args) {\n let secondsRegexSource = `[0-5]\\\\d`;\n if (args.precision) {\n secondsRegexSource = `${secondsRegexSource}\\\\.\\\\d{${args.precision}}`;\n } else if (args.precision == null) {\n secondsRegexSource = `${secondsRegexSource}(\\\\.\\\\d+)?`;\n }\n const secondsQuantifier = args.precision ? \"+\" : \"?\";\n return `([01]\\\\d|2[0-3]):[0-5]\\\\d(:${secondsRegexSource})${secondsQuantifier}`;\n }\n function timeRegex2(args) {\n return new RegExp(`^${timeRegexSource2(args)}$`);\n }\n function datetimeRegex2(args) {\n let regex = `${dateRegexSource2}T${timeRegexSource2(args)}`;\n const opts = [];\n opts.push(args.local ? `Z?` : `Z`);\n if (args.offset)\n opts.push(`([+-]\\\\d{2}:?\\\\d{2})`);\n regex = `${regex}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex}$`);\n }\n function isValidIP2(ip, version7) {\n if ((version7 === \"v4\" || !version7) && ipv4Regex2.test(ip)) {\n return true;\n }\n if ((version7 === \"v6\" || !version7) && ipv6Regex2.test(ip)) {\n return true;\n }\n return false;\n }\n function isValidJWT2(jwt, alg) {\n if (!jwtRegex2.test(jwt))\n return false;\n try {\n const [header] = jwt.split(\".\");\n const base64 = header.replace(/-/g, \"+\").replace(/_/g, \"/\").padEnd(header.length + (4 - header.length % 4) % 4, \"=\");\n const decoded = JSON.parse(atob(base64));\n if (typeof decoded !== \"object\" || decoded === null)\n return false;\n if (\"typ\" in decoded && decoded?.typ !== \"JWT\")\n return false;\n if (!decoded.alg)\n return false;\n if (alg && decoded.alg !== alg)\n return false;\n return true;\n } catch {\n return false;\n }\n }\n function isValidCidr2(ip, version7) {\n if ((version7 === \"v4\" || !version7) && ipv4CidrRegex2.test(ip)) {\n return true;\n }\n if ((version7 === \"v6\" || !version7) && ipv6CidrRegex2.test(ip)) {\n return true;\n }\n return false;\n }\n var ZodString2 = class _ZodString extends ZodType2 {\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.string) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.string,\n received: ctx2.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const status = new parseUtil_js_1.ParseStatus();\n let ctx = void 0;\n for (const check2 of this._def.checks) {\n if (check2.kind === \"min\") {\n if (input.data.length < check2.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: check2.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"max\") {\n if (input.data.length > check2.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: check2.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"length\") {\n const tooBig = input.data.length > check2.value;\n const tooSmall = input.data.length < check2.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: check2.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check2.message\n });\n } else if (tooSmall) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: check2.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check2.message\n });\n }\n status.dirty();\n }\n } else if (check2.kind === \"email\") {\n if (!emailRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"email\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"emoji\") {\n if (!emojiRegex2) {\n emojiRegex2 = new RegExp(_emojiRegex2, \"u\");\n }\n if (!emojiRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"emoji\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"uuid\") {\n if (!uuidRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"uuid\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"nanoid\") {\n if (!nanoidRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"nanoid\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"cuid\") {\n if (!cuidRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"cuid\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"cuid2\") {\n if (!cuid2Regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"cuid2\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"ulid\") {\n if (!ulidRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"ulid\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"url\") {\n try {\n new URL(input.data);\n } catch {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"url\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"regex\") {\n check2.regex.lastIndex = 0;\n const testResult = check2.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"regex\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"trim\") {\n input.data = input.data.trim();\n } else if (check2.kind === \"includes\") {\n if (!input.data.includes(check2.value, check2.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: { includes: check2.value, position: check2.position },\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n } else if (check2.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n } else if (check2.kind === \"startsWith\") {\n if (!input.data.startsWith(check2.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: { startsWith: check2.value },\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"endsWith\") {\n if (!input.data.endsWith(check2.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: { endsWith: check2.value },\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"datetime\") {\n const regex = datetimeRegex2(check2);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"date\") {\n const regex = dateRegex2;\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: \"date\",\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"time\") {\n const regex = timeRegex2(check2);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n validation: \"time\",\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"duration\") {\n if (!durationRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"duration\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"ip\") {\n if (!isValidIP2(input.data, check2.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"ip\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"jwt\") {\n if (!isValidJWT2(input.data, check2.alg)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"jwt\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"cidr\") {\n if (!isValidCidr2(input.data, check2.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"cidr\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"base64\") {\n if (!base64Regex3.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"base64\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"base64url\") {\n if (!base64urlRegex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n validation: \"base64url\",\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else {\n util_js_1.util.assertNever(check2);\n }\n }\n return { status: status.value, value: input.data };\n }\n _regex(regex, validation, message2) {\n return this.refinement((data) => regex.test(data), {\n validation,\n code: ZodError_js_1.ZodIssueCode.invalid_string,\n ...errorUtil_js_1.errorUtil.errToObj(message2)\n });\n }\n _addCheck(check2) {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, check2]\n });\n }\n email(message2) {\n return this._addCheck({ kind: \"email\", ...errorUtil_js_1.errorUtil.errToObj(message2) });\n }\n url(message2) {\n return this._addCheck({ kind: \"url\", ...errorUtil_js_1.errorUtil.errToObj(message2) });\n }\n emoji(message2) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil_js_1.errorUtil.errToObj(message2) });\n }\n uuid(message2) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil_js_1.errorUtil.errToObj(message2) });\n }\n nanoid(message2) {\n return this._addCheck({ kind: \"nanoid\", ...errorUtil_js_1.errorUtil.errToObj(message2) });\n }\n cuid(message2) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil_js_1.errorUtil.errToObj(message2) });\n }\n cuid2(message2) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil_js_1.errorUtil.errToObj(message2) });\n }\n ulid(message2) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil_js_1.errorUtil.errToObj(message2) });\n }\n base64(message2) {\n return this._addCheck({ kind: \"base64\", ...errorUtil_js_1.errorUtil.errToObj(message2) });\n }\n base64url(message2) {\n return this._addCheck({\n kind: \"base64url\",\n ...errorUtil_js_1.errorUtil.errToObj(message2)\n });\n }\n jwt(options) {\n return this._addCheck({ kind: \"jwt\", ...errorUtil_js_1.errorUtil.errToObj(options) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil_js_1.errorUtil.errToObj(options) });\n }\n cidr(options) {\n return this._addCheck({ kind: \"cidr\", ...errorUtil_js_1.errorUtil.errToObj(options) });\n }\n datetime(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n local: false,\n message: options\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n offset: options?.offset ?? false,\n local: options?.local ?? false,\n ...errorUtil_js_1.errorUtil.errToObj(options?.message)\n });\n }\n date(message2) {\n return this._addCheck({ kind: \"date\", message: message2 });\n }\n time(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"time\",\n precision: null,\n message: options\n });\n }\n return this._addCheck({\n kind: \"time\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n ...errorUtil_js_1.errorUtil.errToObj(options?.message)\n });\n }\n duration(message2) {\n return this._addCheck({ kind: \"duration\", ...errorUtil_js_1.errorUtil.errToObj(message2) });\n }\n regex(regex, message2) {\n return this._addCheck({\n kind: \"regex\",\n regex,\n ...errorUtil_js_1.errorUtil.errToObj(message2)\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value,\n position: options?.position,\n ...errorUtil_js_1.errorUtil.errToObj(options?.message)\n });\n }\n startsWith(value, message2) {\n return this._addCheck({\n kind: \"startsWith\",\n value,\n ...errorUtil_js_1.errorUtil.errToObj(message2)\n });\n }\n endsWith(value, message2) {\n return this._addCheck({\n kind: \"endsWith\",\n value,\n ...errorUtil_js_1.errorUtil.errToObj(message2)\n });\n }\n min(minLength, message2) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\n ...errorUtil_js_1.errorUtil.errToObj(message2)\n });\n }\n max(maxLength, message2) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil_js_1.errorUtil.errToObj(message2)\n });\n }\n length(len, message2) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil_js_1.errorUtil.errToObj(message2)\n });\n }\n /**\n * Equivalent to `.min(1)`\n */\n nonempty(message2) {\n return this.min(1, errorUtil_js_1.errorUtil.errToObj(message2));\n }\n trim() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }]\n });\n }\n toLowerCase() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }]\n });\n }\n toUpperCase() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }]\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isDate() {\n return !!this._def.checks.find((ch) => ch.kind === \"date\");\n }\n get isTime() {\n return !!this._def.checks.find((ch) => ch.kind === \"time\");\n }\n get isDuration() {\n return !!this._def.checks.find((ch) => ch.kind === \"duration\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isNANOID() {\n return !!this._def.checks.find((ch) => ch.kind === \"nanoid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get isCIDR() {\n return !!this._def.checks.find((ch) => ch.kind === \"cidr\");\n }\n get isBase64() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64\");\n }\n get isBase64url() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64url\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n };\n exports3.ZodString = ZodString2;\n ZodString2.create = (params) => {\n return new ZodString2({\n checks: [],\n typeName: ZodFirstPartyTypeKind2.ZodString,\n coerce: params?.coerce ?? false,\n ...processCreateParams2(params)\n });\n };\n function floatSafeRemainder2(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return valInt % stepInt / 10 ** decCount;\n }\n var ZodNumber2 = class _ZodNumber extends ZodType2 {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.number) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.number,\n received: ctx2.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n let ctx = void 0;\n const status = new parseUtil_js_1.ParseStatus();\n for (const check2 of this._def.checks) {\n if (check2.kind === \"int\") {\n if (!util_js_1.util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"min\") {\n const tooSmall = check2.inclusive ? input.data < check2.value : input.data <= check2.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: check2.value,\n type: \"number\",\n inclusive: check2.inclusive,\n exact: false,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"max\") {\n const tooBig = check2.inclusive ? input.data > check2.value : input.data >= check2.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: check2.value,\n type: \"number\",\n inclusive: check2.inclusive,\n exact: false,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"multipleOf\") {\n if (floatSafeRemainder2(input.data, check2.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.not_multiple_of,\n multipleOf: check2.value,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.not_finite,\n message: check2.message\n });\n status.dirty();\n }\n } else {\n util_js_1.util.assertNever(check2);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message2) {\n return this.setLimit(\"min\", value, true, errorUtil_js_1.errorUtil.toString(message2));\n }\n gt(value, message2) {\n return this.setLimit(\"min\", value, false, errorUtil_js_1.errorUtil.toString(message2));\n }\n lte(value, message2) {\n return this.setLimit(\"max\", value, true, errorUtil_js_1.errorUtil.toString(message2));\n }\n lt(value, message2) {\n return this.setLimit(\"max\", value, false, errorUtil_js_1.errorUtil.toString(message2));\n }\n setLimit(kind, value, inclusive, message2) {\n return new _ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil_js_1.errorUtil.toString(message2)\n }\n ]\n });\n }\n _addCheck(check2) {\n return new _ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check2]\n });\n }\n int(message2) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil_js_1.errorUtil.toString(message2)\n });\n }\n positive(message2) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil_js_1.errorUtil.toString(message2)\n });\n }\n negative(message2) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil_js_1.errorUtil.toString(message2)\n });\n }\n nonpositive(message2) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil_js_1.errorUtil.toString(message2)\n });\n }\n nonnegative(message2) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil_js_1.errorUtil.toString(message2)\n });\n }\n multipleOf(value, message2) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil_js_1.errorUtil.toString(message2)\n });\n }\n finite(message2) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil_js_1.errorUtil.toString(message2)\n });\n }\n safe(message2) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil_js_1.errorUtil.toString(message2)\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil_js_1.errorUtil.toString(message2)\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" || ch.kind === \"multipleOf\" && util_js_1.util.isInteger(ch.value));\n }\n get isFinite() {\n let max = null;\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" || ch.kind === \"int\" || ch.kind === \"multipleOf\") {\n return true;\n } else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n } else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n };\n exports3.ZodNumber = ZodNumber2;\n ZodNumber2.create = (params) => {\n return new ZodNumber2({\n checks: [],\n typeName: ZodFirstPartyTypeKind2.ZodNumber,\n coerce: params?.coerce || false,\n ...processCreateParams2(params)\n });\n };\n var ZodBigInt2 = class _ZodBigInt extends ZodType2 {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n try {\n input.data = BigInt(input.data);\n } catch {\n return this._getInvalidInput(input);\n }\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.bigint) {\n return this._getInvalidInput(input);\n }\n let ctx = void 0;\n const status = new parseUtil_js_1.ParseStatus();\n for (const check2 of this._def.checks) {\n if (check2.kind === \"min\") {\n const tooSmall = check2.inclusive ? input.data < check2.value : input.data <= check2.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check2.value,\n inclusive: check2.inclusive,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"max\") {\n const tooBig = check2.inclusive ? input.data > check2.value : input.data >= check2.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check2.value,\n inclusive: check2.inclusive,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"multipleOf\") {\n if (input.data % check2.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.not_multiple_of,\n multipleOf: check2.value,\n message: check2.message\n });\n status.dirty();\n }\n } else {\n util_js_1.util.assertNever(check2);\n }\n }\n return { status: status.value, value: input.data };\n }\n _getInvalidInput(input) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.bigint,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n gte(value, message2) {\n return this.setLimit(\"min\", value, true, errorUtil_js_1.errorUtil.toString(message2));\n }\n gt(value, message2) {\n return this.setLimit(\"min\", value, false, errorUtil_js_1.errorUtil.toString(message2));\n }\n lte(value, message2) {\n return this.setLimit(\"max\", value, true, errorUtil_js_1.errorUtil.toString(message2));\n }\n lt(value, message2) {\n return this.setLimit(\"max\", value, false, errorUtil_js_1.errorUtil.toString(message2));\n }\n setLimit(kind, value, inclusive, message2) {\n return new _ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil_js_1.errorUtil.toString(message2)\n }\n ]\n });\n }\n _addCheck(check2) {\n return new _ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check2]\n });\n }\n positive(message2) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil_js_1.errorUtil.toString(message2)\n });\n }\n negative(message2) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil_js_1.errorUtil.toString(message2)\n });\n }\n nonpositive(message2) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil_js_1.errorUtil.toString(message2)\n });\n }\n nonnegative(message2) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil_js_1.errorUtil.toString(message2)\n });\n }\n multipleOf(value, message2) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil_js_1.errorUtil.toString(message2)\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n };\n exports3.ZodBigInt = ZodBigInt2;\n ZodBigInt2.create = (params) => {\n return new ZodBigInt2({\n checks: [],\n typeName: ZodFirstPartyTypeKind2.ZodBigInt,\n coerce: params?.coerce ?? false,\n ...processCreateParams2(params)\n });\n };\n var ZodBoolean2 = class extends ZodType2 {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.boolean,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodBoolean = ZodBoolean2;\n ZodBoolean2.create = (params) => {\n return new ZodBoolean2({\n typeName: ZodFirstPartyTypeKind2.ZodBoolean,\n coerce: params?.coerce || false,\n ...processCreateParams2(params)\n });\n };\n var ZodDate2 = class _ZodDate extends ZodType2 {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.date) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.date,\n received: ctx2.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n if (Number.isNaN(input.data.getTime())) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_date\n });\n return parseUtil_js_1.INVALID;\n }\n const status = new parseUtil_js_1.ParseStatus();\n let ctx = void 0;\n for (const check2 of this._def.checks) {\n if (check2.kind === \"min\") {\n if (input.data.getTime() < check2.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n message: check2.message,\n inclusive: true,\n exact: false,\n minimum: check2.value,\n type: \"date\"\n });\n status.dirty();\n }\n } else if (check2.kind === \"max\") {\n if (input.data.getTime() > check2.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n message: check2.message,\n inclusive: true,\n exact: false,\n maximum: check2.value,\n type: \"date\"\n });\n status.dirty();\n }\n } else {\n util_js_1.util.assertNever(check2);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime())\n };\n }\n _addCheck(check2) {\n return new _ZodDate({\n ...this._def,\n checks: [...this._def.checks, check2]\n });\n }\n min(minDate, message2) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil_js_1.errorUtil.toString(message2)\n });\n }\n max(maxDate, message2) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil_js_1.errorUtil.toString(message2)\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n };\n exports3.ZodDate = ZodDate2;\n ZodDate2.create = (params) => {\n return new ZodDate2({\n checks: [],\n coerce: params?.coerce || false,\n typeName: ZodFirstPartyTypeKind2.ZodDate,\n ...processCreateParams2(params)\n });\n };\n var ZodSymbol2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.symbol,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodSymbol = ZodSymbol2;\n ZodSymbol2.create = (params) => {\n return new ZodSymbol2({\n typeName: ZodFirstPartyTypeKind2.ZodSymbol,\n ...processCreateParams2(params)\n });\n };\n var ZodUndefined2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.undefined,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodUndefined = ZodUndefined2;\n ZodUndefined2.create = (params) => {\n return new ZodUndefined2({\n typeName: ZodFirstPartyTypeKind2.ZodUndefined,\n ...processCreateParams2(params)\n });\n };\n var ZodNull2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.null,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodNull = ZodNull2;\n ZodNull2.create = (params) => {\n return new ZodNull2({\n typeName: ZodFirstPartyTypeKind2.ZodNull,\n ...processCreateParams2(params)\n });\n };\n var ZodAny2 = class extends ZodType2 {\n constructor() {\n super(...arguments);\n this._any = true;\n }\n _parse(input) {\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodAny = ZodAny2;\n ZodAny2.create = (params) => {\n return new ZodAny2({\n typeName: ZodFirstPartyTypeKind2.ZodAny,\n ...processCreateParams2(params)\n });\n };\n var ZodUnknown2 = class extends ZodType2 {\n constructor() {\n super(...arguments);\n this._unknown = true;\n }\n _parse(input) {\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodUnknown = ZodUnknown2;\n ZodUnknown2.create = (params) => {\n return new ZodUnknown2({\n typeName: ZodFirstPartyTypeKind2.ZodUnknown,\n ...processCreateParams2(params)\n });\n };\n var ZodNever2 = class extends ZodType2 {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.never,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n };\n exports3.ZodNever = ZodNever2;\n ZodNever2.create = (params) => {\n return new ZodNever2({\n typeName: ZodFirstPartyTypeKind2.ZodNever,\n ...processCreateParams2(params)\n });\n };\n var ZodVoid2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.void,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n };\n exports3.ZodVoid = ZodVoid2;\n ZodVoid2.create = (params) => {\n return new ZodVoid2({\n typeName: ZodFirstPartyTypeKind2.ZodVoid,\n ...processCreateParams2(params)\n });\n };\n var ZodArray2 = class _ZodArray extends ZodType2 {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== util_js_1.ZodParsedType.array) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.array,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: tooBig ? ZodError_js_1.ZodIssueCode.too_big : ZodError_js_1.ZodIssueCode.too_small,\n minimum: tooSmall ? def.exactLength.value : void 0,\n maximum: tooBig ? def.exactLength.value : void 0,\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i3) => {\n return def.type._parseAsync(new ParseInputLazyPath2(ctx, item, ctx.path, i3));\n })).then((result2) => {\n return parseUtil_js_1.ParseStatus.mergeArray(status, result2);\n });\n }\n const result = [...ctx.data].map((item, i3) => {\n return def.type._parseSync(new ParseInputLazyPath2(ctx, item, ctx.path, i3));\n });\n return parseUtil_js_1.ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength, message2) {\n return new _ZodArray({\n ...this._def,\n minLength: { value: minLength, message: errorUtil_js_1.errorUtil.toString(message2) }\n });\n }\n max(maxLength, message2) {\n return new _ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil_js_1.errorUtil.toString(message2) }\n });\n }\n length(len, message2) {\n return new _ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil_js_1.errorUtil.toString(message2) }\n });\n }\n nonempty(message2) {\n return this.min(1, message2);\n }\n };\n exports3.ZodArray = ZodArray2;\n ZodArray2.create = (schema, params) => {\n return new ZodArray2({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind2.ZodArray,\n ...processCreateParams2(params)\n });\n };\n function deepPartialify2(schema) {\n if (schema instanceof ZodObject2) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional2.create(deepPartialify2(fieldSchema));\n }\n return new ZodObject2({\n ...schema._def,\n shape: () => newShape\n });\n } else if (schema instanceof ZodArray2) {\n return new ZodArray2({\n ...schema._def,\n type: deepPartialify2(schema.element)\n });\n } else if (schema instanceof ZodOptional2) {\n return ZodOptional2.create(deepPartialify2(schema.unwrap()));\n } else if (schema instanceof ZodNullable2) {\n return ZodNullable2.create(deepPartialify2(schema.unwrap()));\n } else if (schema instanceof ZodTuple2) {\n return ZodTuple2.create(schema.items.map((item) => deepPartialify2(item)));\n } else {\n return schema;\n }\n }\n var ZodObject2 = class _ZodObject extends ZodType2 {\n constructor() {\n super(...arguments);\n this._cached = null;\n this.nonstrict = this.passthrough;\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape3 = this._def.shape();\n const keys = util_js_1.util.objectKeys(shape3);\n this._cached = { shape: shape3, keys };\n return this._cached;\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.object) {\n const ctx2 = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx2, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.object,\n received: ctx2.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape: shape3, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever2 && this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape3[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath2(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data\n });\n }\n if (this._def.catchall instanceof ZodNever2) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] }\n });\n }\n } else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.unrecognized_keys,\n keys: extraKeys\n });\n status.dirty();\n }\n } else if (unknownKeys === \"strip\") {\n } else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n } else {\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(\n new ParseInputLazyPath2(ctx, value, ctx.path, key)\n //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve().then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n alwaysSet: pair.alwaysSet\n });\n }\n return syncPairs;\n }).then((syncPairs) => {\n return parseUtil_js_1.ParseStatus.mergeObjectSync(status, syncPairs);\n });\n } else {\n return parseUtil_js_1.ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message2) {\n errorUtil_js_1.errorUtil.errToObj;\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...message2 !== void 0 ? {\n errorMap: (issue, ctx) => {\n const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: errorUtil_js_1.errorUtil.errToObj(message2).message ?? defaultError\n };\n return {\n message: defaultError\n };\n }\n } : {}\n });\n }\n strip() {\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"strip\"\n });\n }\n passthrough() {\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\"\n });\n }\n // const AugmentFactory =\n // (def: Def) =>\n // (\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new _ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation\n })\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new _ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape()\n }),\n typeName: ZodFirstPartyTypeKind2.ZodObject\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge(\n // merging: Incoming\n // ): //ZodObject = (merging) => {\n // ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index2) {\n return new _ZodObject({\n ...this._def,\n catchall: index2\n });\n }\n pick(mask) {\n const shape3 = {};\n for (const key of util_js_1.util.objectKeys(mask)) {\n if (mask[key] && this.shape[key]) {\n shape3[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape3\n });\n }\n omit(mask) {\n const shape3 = {};\n for (const key of util_js_1.util.objectKeys(this.shape)) {\n if (!mask[key]) {\n shape3[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape3\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify2(this);\n }\n partial(mask) {\n const newShape = {};\n for (const key of util_js_1.util.objectKeys(this.shape)) {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n } else {\n newShape[key] = fieldSchema.optional();\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => newShape\n });\n }\n required(mask) {\n const newShape = {};\n for (const key of util_js_1.util.objectKeys(this.shape)) {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n } else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional2) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => newShape\n });\n }\n keyof() {\n return createZodEnum2(util_js_1.util.objectKeys(this.shape));\n }\n };\n exports3.ZodObject = ZodObject2;\n ZodObject2.create = (shape3, params) => {\n return new ZodObject2({\n shape: () => shape3,\n unknownKeys: \"strip\",\n catchall: ZodNever2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodObject,\n ...processCreateParams2(params)\n });\n };\n ZodObject2.strictCreate = (shape3, params) => {\n return new ZodObject2({\n shape: () => shape3,\n unknownKeys: \"strict\",\n catchall: ZodNever2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodObject,\n ...processCreateParams2(params)\n });\n };\n ZodObject2.lazycreate = (shape3, params) => {\n return new ZodObject2({\n shape: shape3,\n unknownKeys: \"strip\",\n catchall: ZodNever2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodObject,\n ...processCreateParams2(params)\n });\n };\n var ZodUnion2 = class extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n const unionErrors = results.map((result) => new ZodError_js_1.ZodError(result.ctx.common.issues));\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_union,\n unionErrors\n });\n return parseUtil_js_1.INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n },\n parent: null\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx\n }),\n ctx: childCtx\n };\n })).then(handleResults);\n } else {\n let dirty = void 0;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n },\n parent: null\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx\n });\n if (result.status === \"valid\") {\n return result;\n } else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues2) => new ZodError_js_1.ZodError(issues2));\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_union,\n unionErrors\n });\n return parseUtil_js_1.INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n };\n exports3.ZodUnion = ZodUnion2;\n ZodUnion2.create = (types2, params) => {\n return new ZodUnion2({\n options: types2,\n typeName: ZodFirstPartyTypeKind2.ZodUnion,\n ...processCreateParams2(params)\n });\n };\n var getDiscriminator2 = (type) => {\n if (type instanceof ZodLazy2) {\n return getDiscriminator2(type.schema);\n } else if (type instanceof ZodEffects2) {\n return getDiscriminator2(type.innerType());\n } else if (type instanceof ZodLiteral2) {\n return [type.value];\n } else if (type instanceof ZodEnum2) {\n return type.options;\n } else if (type instanceof ZodNativeEnum2) {\n return util_js_1.util.objectValues(type.enum);\n } else if (type instanceof ZodDefault2) {\n return getDiscriminator2(type._def.innerType);\n } else if (type instanceof ZodUndefined2) {\n return [void 0];\n } else if (type instanceof ZodNull2) {\n return [null];\n } else if (type instanceof ZodOptional2) {\n return [void 0, ...getDiscriminator2(type.unwrap())];\n } else if (type instanceof ZodNullable2) {\n return [null, ...getDiscriminator2(type.unwrap())];\n } else if (type instanceof ZodBranded2) {\n return getDiscriminator2(type.unwrap());\n } else if (type instanceof ZodReadonly2) {\n return getDiscriminator2(type.unwrap());\n } else if (type instanceof ZodCatch2) {\n return getDiscriminator2(type._def.innerType);\n } else {\n return [];\n }\n };\n var ZodDiscriminatedUnion2 = class _ZodDiscriminatedUnion extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.object) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.object,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator]\n });\n return parseUtil_js_1.INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n } else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n const optionsMap = /* @__PURE__ */ new Map();\n for (const type of options) {\n const discriminatorValues = getDiscriminator2(type.shape[discriminator]);\n if (!discriminatorValues.length) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new _ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind2.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams2(params)\n });\n }\n };\n exports3.ZodDiscriminatedUnion = ZodDiscriminatedUnion2;\n function mergeValues2(a3, b4) {\n const aType = (0, util_js_1.getParsedType)(a3);\n const bType = (0, util_js_1.getParsedType)(b4);\n if (a3 === b4) {\n return { valid: true, data: a3 };\n } else if (aType === util_js_1.ZodParsedType.object && bType === util_js_1.ZodParsedType.object) {\n const bKeys = util_js_1.util.objectKeys(b4);\n const sharedKeys = util_js_1.util.objectKeys(a3).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a3, ...b4 };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues2(a3[key], b4[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n } else if (aType === util_js_1.ZodParsedType.array && bType === util_js_1.ZodParsedType.array) {\n if (a3.length !== b4.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index2 = 0; index2 < a3.length; index2++) {\n const itemA = a3[index2];\n const itemB = b4[index2];\n const sharedValue = mergeValues2(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n } else if (aType === util_js_1.ZodParsedType.date && bType === util_js_1.ZodParsedType.date && +a3 === +b4) {\n return { valid: true, data: a3 };\n } else {\n return { valid: false };\n }\n }\n var ZodIntersection2 = class extends ZodType2 {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if ((0, parseUtil_js_1.isAborted)(parsedLeft) || (0, parseUtil_js_1.isAborted)(parsedRight)) {\n return parseUtil_js_1.INVALID;\n }\n const merged = mergeValues2(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_intersection_types\n });\n return parseUtil_js_1.INVALID;\n }\n if ((0, parseUtil_js_1.isDirty)(parsedLeft) || (0, parseUtil_js_1.isDirty)(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n })\n ]).then(([left, right]) => handleParsed(left, right));\n } else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }));\n }\n }\n };\n exports3.ZodIntersection = ZodIntersection2;\n ZodIntersection2.create = (left, right, params) => {\n return new ZodIntersection2({\n left,\n right,\n typeName: ZodFirstPartyTypeKind2.ZodIntersection,\n ...processCreateParams2(params)\n });\n };\n var ZodTuple2 = class _ZodTuple extends ZodType2 {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.array) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.array,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\"\n });\n return parseUtil_js_1.INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\"\n });\n status.dirty();\n }\n const items = [...ctx.data].map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath2(ctx, item, ctx.path, itemIndex));\n }).filter((x4) => !!x4);\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return parseUtil_js_1.ParseStatus.mergeArray(status, results);\n });\n } else {\n return parseUtil_js_1.ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new _ZodTuple({\n ...this._def,\n rest\n });\n }\n };\n exports3.ZodTuple = ZodTuple2;\n ZodTuple2.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple2({\n items: schemas,\n typeName: ZodFirstPartyTypeKind2.ZodTuple,\n rest: null,\n ...processCreateParams2(params)\n });\n };\n var ZodRecord2 = class _ZodRecord extends ZodType2 {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.object) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.object,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath2(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath2(ctx, ctx.data[key], ctx.path, key)),\n alwaysSet: key in ctx.data\n });\n }\n if (ctx.common.async) {\n return parseUtil_js_1.ParseStatus.mergeObjectAsync(status, pairs);\n } else {\n return parseUtil_js_1.ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType2) {\n return new _ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind2.ZodRecord,\n ...processCreateParams2(third)\n });\n }\n return new _ZodRecord({\n keyType: ZodString2.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind2.ZodRecord,\n ...processCreateParams2(second)\n });\n }\n };\n exports3.ZodRecord = ZodRecord2;\n var ZodMap2 = class extends ZodType2 {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.map) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.map,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index2) => {\n return {\n key: keyType._parse(new ParseInputLazyPath2(ctx, key, ctx.path, [index2, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath2(ctx, value, ctx.path, [index2, \"value\"]))\n };\n });\n if (ctx.common.async) {\n const finalMap = /* @__PURE__ */ new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return parseUtil_js_1.INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n } else {\n const finalMap = /* @__PURE__ */ new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return parseUtil_js_1.INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n };\n exports3.ZodMap = ZodMap2;\n ZodMap2.create = (keyType, valueType, params) => {\n return new ZodMap2({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind2.ZodMap,\n ...processCreateParams2(params)\n });\n };\n var ZodSet2 = class _ZodSet extends ZodType2 {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.set) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.set,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements2) {\n const parsedSet = /* @__PURE__ */ new Set();\n for (const element of elements2) {\n if (element.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i3) => valueType._parse(new ParseInputLazyPath2(ctx, item, ctx.path, i3)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements2) => finalizeSet(elements2));\n } else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message2) {\n return new _ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil_js_1.errorUtil.toString(message2) }\n });\n }\n max(maxSize, message2) {\n return new _ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil_js_1.errorUtil.toString(message2) }\n });\n }\n size(size6, message2) {\n return this.min(size6, message2).max(size6, message2);\n }\n nonempty(message2) {\n return this.min(1, message2);\n }\n };\n exports3.ZodSet = ZodSet2;\n ZodSet2.create = (valueType, params) => {\n return new ZodSet2({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind2.ZodSet,\n ...processCreateParams2(params)\n });\n };\n var ZodFunction2 = class _ZodFunction extends ZodType2 {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.function) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.function,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n function makeArgsIssue(args, error) {\n return (0, parseUtil_js_1.makeIssue)({\n data: args,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, (0, errors_js_1.getErrorMap)(), errors_js_1.defaultErrorMap].filter((x4) => !!x4),\n issueData: {\n code: ZodError_js_1.ZodIssueCode.invalid_arguments,\n argumentsError: error\n }\n });\n }\n function makeReturnsIssue(returns, error) {\n return (0, parseUtil_js_1.makeIssue)({\n data: returns,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, (0, errors_js_1.getErrorMap)(), errors_js_1.defaultErrorMap].filter((x4) => !!x4),\n issueData: {\n code: ZodError_js_1.ZodIssueCode.invalid_return_type,\n returnTypeError: error\n }\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise2) {\n const me = this;\n return (0, parseUtil_js_1.OK)(async function(...args) {\n const error = new ZodError_js_1.ZodError([]);\n const parsedArgs = await me._def.args.parseAsync(args, params).catch((e2) => {\n error.addIssue(makeArgsIssue(args, e2));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e2) => {\n error.addIssue(makeReturnsIssue(result, e2));\n throw error;\n });\n return parsedReturns;\n });\n } else {\n const me = this;\n return (0, parseUtil_js_1.OK)(function(...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError_js_1.ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError_js_1.ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new _ZodFunction({\n ...this._def,\n args: ZodTuple2.create(items).rest(ZodUnknown2.create())\n });\n }\n returns(returnType) {\n return new _ZodFunction({\n ...this._def,\n returns: returnType\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new _ZodFunction({\n args: args ? args : ZodTuple2.create([]).rest(ZodUnknown2.create()),\n returns: returns || ZodUnknown2.create(),\n typeName: ZodFirstPartyTypeKind2.ZodFunction,\n ...processCreateParams2(params)\n });\n }\n };\n exports3.ZodFunction = ZodFunction2;\n var ZodLazy2 = class extends ZodType2 {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n };\n exports3.ZodLazy = ZodLazy2;\n ZodLazy2.create = (getter, params) => {\n return new ZodLazy2({\n getter,\n typeName: ZodFirstPartyTypeKind2.ZodLazy,\n ...processCreateParams2(params)\n });\n };\n var ZodLiteral2 = class extends ZodType2 {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_js_1.ZodIssueCode.invalid_literal,\n expected: this._def.value\n });\n return parseUtil_js_1.INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n };\n exports3.ZodLiteral = ZodLiteral2;\n ZodLiteral2.create = (value, params) => {\n return new ZodLiteral2({\n value,\n typeName: ZodFirstPartyTypeKind2.ZodLiteral,\n ...processCreateParams2(params)\n });\n };\n function createZodEnum2(values, params) {\n return new ZodEnum2({\n values,\n typeName: ZodFirstPartyTypeKind2.ZodEnum,\n ...processCreateParams2(params)\n });\n }\n var ZodEnum2 = class _ZodEnum extends ZodType2 {\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n expected: util_js_1.util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodError_js_1.ZodIssueCode.invalid_type\n });\n return parseUtil_js_1.INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(this._def.values);\n }\n if (!this._cache.has(input.data)) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_js_1.ZodIssueCode.invalid_enum_value,\n options: expectedValues\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values, newDef = this._def) {\n return _ZodEnum.create(values, {\n ...this._def,\n ...newDef\n });\n }\n exclude(values, newDef = this._def) {\n return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {\n ...this._def,\n ...newDef\n });\n }\n };\n exports3.ZodEnum = ZodEnum2;\n ZodEnum2.create = createZodEnum2;\n var ZodNativeEnum2 = class extends ZodType2 {\n _parse(input) {\n const nativeEnumValues = util_js_1.util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.string && ctx.parsedType !== util_js_1.ZodParsedType.number) {\n const expectedValues = util_js_1.util.objectValues(nativeEnumValues);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n expected: util_js_1.util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodError_js_1.ZodIssueCode.invalid_type\n });\n return parseUtil_js_1.INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(util_js_1.util.getValidEnumValues(this._def.values));\n }\n if (!this._cache.has(input.data)) {\n const expectedValues = util_js_1.util.objectValues(nativeEnumValues);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_js_1.ZodIssueCode.invalid_enum_value,\n options: expectedValues\n });\n return parseUtil_js_1.INVALID;\n }\n return (0, parseUtil_js_1.OK)(input.data);\n }\n get enum() {\n return this._def.values;\n }\n };\n exports3.ZodNativeEnum = ZodNativeEnum2;\n ZodNativeEnum2.create = (values, params) => {\n return new ZodNativeEnum2({\n values,\n typeName: ZodFirstPartyTypeKind2.ZodNativeEnum,\n ...processCreateParams2(params)\n });\n };\n var ZodPromise2 = class extends ZodType2 {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_js_1.ZodParsedType.promise && ctx.common.async === false) {\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.promise,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n const promisified = ctx.parsedType === util_js_1.ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);\n return (0, parseUtil_js_1.OK)(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap\n });\n }));\n }\n };\n exports3.ZodPromise = ZodPromise2;\n ZodPromise2.create = (schema, params) => {\n return new ZodPromise2({\n type: schema,\n typeName: ZodFirstPartyTypeKind2.ZodPromise,\n ...processCreateParams2(params)\n });\n };\n var ZodEffects2 = class extends ZodType2 {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind2.ZodEffects ? this._def.schema.sourceType() : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n (0, parseUtil_js_1.addIssueToContext)(ctx, arg);\n if (arg.fatal) {\n status.abort();\n } else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n }\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(processed).then(async (processed2) => {\n if (status.value === \"aborted\")\n return parseUtil_js_1.INVALID;\n const result = await this._def.schema._parseAsync({\n data: processed2,\n path: ctx.path,\n parent: ctx\n });\n if (result.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (result.status === \"dirty\")\n return (0, parseUtil_js_1.DIRTY)(result.value);\n if (status.value === \"dirty\")\n return (0, parseUtil_js_1.DIRTY)(result.value);\n return result;\n });\n } else {\n if (status.value === \"aborted\")\n return parseUtil_js_1.INVALID;\n const result = this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx\n });\n if (result.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (result.status === \"dirty\")\n return (0, parseUtil_js_1.DIRTY)(result.value);\n if (status.value === \"dirty\")\n return (0, parseUtil_js_1.DIRTY)(result.value);\n return result;\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inner.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n } else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => {\n if (inner.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base4 = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (!(0, parseUtil_js_1.isValid)(base4))\n return parseUtil_js_1.INVALID;\n const result = effect.transform(base4.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n } else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base4) => {\n if (!(0, parseUtil_js_1.isValid)(base4))\n return parseUtil_js_1.INVALID;\n return Promise.resolve(effect.transform(base4.value, checkCtx)).then((result) => ({\n status: status.value,\n value: result\n }));\n });\n }\n }\n util_js_1.util.assertNever(effect);\n }\n };\n exports3.ZodEffects = ZodEffects2;\n exports3.ZodTransformer = ZodEffects2;\n ZodEffects2.create = (schema, effect, params) => {\n return new ZodEffects2({\n schema,\n typeName: ZodFirstPartyTypeKind2.ZodEffects,\n effect,\n ...processCreateParams2(params)\n });\n };\n ZodEffects2.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects2({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind2.ZodEffects,\n ...processCreateParams2(params)\n });\n };\n var ZodOptional2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === util_js_1.ZodParsedType.undefined) {\n return (0, parseUtil_js_1.OK)(void 0);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n exports3.ZodOptional = ZodOptional2;\n ZodOptional2.create = (type, params) => {\n return new ZodOptional2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodOptional,\n ...processCreateParams2(params)\n });\n };\n var ZodNullable2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === util_js_1.ZodParsedType.null) {\n return (0, parseUtil_js_1.OK)(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n exports3.ZodNullable = ZodNullable2;\n ZodNullable2.create = (type, params) => {\n return new ZodNullable2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodNullable,\n ...processCreateParams2(params)\n });\n };\n var ZodDefault2 = class extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === util_js_1.ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n };\n exports3.ZodDefault = ZodDefault2;\n ZodDefault2.create = (type, params) => {\n return new ZodDefault2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodDefault,\n defaultValue: typeof params.default === \"function\" ? params.default : () => params.default,\n ...processCreateParams2(params)\n });\n };\n var ZodCatch2 = class extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n }\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx\n }\n });\n if ((0, parseUtil_js_1.isAsync)(result)) {\n return result.then((result2) => {\n return {\n status: \"valid\",\n value: result2.status === \"valid\" ? result2.value : this._def.catchValue({\n get error() {\n return new ZodError_js_1.ZodError(newCtx.common.issues);\n },\n input: newCtx.data\n })\n };\n });\n } else {\n return {\n status: \"valid\",\n value: result.status === \"valid\" ? result.value : this._def.catchValue({\n get error() {\n return new ZodError_js_1.ZodError(newCtx.common.issues);\n },\n input: newCtx.data\n })\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n };\n exports3.ZodCatch = ZodCatch2;\n ZodCatch2.create = (type, params) => {\n return new ZodCatch2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams2(params)\n });\n };\n var ZodNaN2 = class extends ZodType2 {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_js_1.ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_js_1.addIssueToContext)(ctx, {\n code: ZodError_js_1.ZodIssueCode.invalid_type,\n expected: util_js_1.ZodParsedType.nan,\n received: ctx.parsedType\n });\n return parseUtil_js_1.INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n };\n exports3.ZodNaN = ZodNaN2;\n ZodNaN2.create = (params) => {\n return new ZodNaN2({\n typeName: ZodFirstPartyTypeKind2.ZodNaN,\n ...processCreateParams2(params)\n });\n };\n exports3.BRAND = Symbol(\"zod_brand\");\n var ZodBranded2 = class extends ZodType2 {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx\n });\n }\n unwrap() {\n return this._def.type;\n }\n };\n exports3.ZodBranded = ZodBranded2;\n var ZodPipeline2 = class _ZodPipeline extends ZodType2 {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inResult.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return (0, parseUtil_js_1.DIRTY)(inResult.value);\n } else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx\n });\n }\n };\n return handleAsync();\n } else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inResult.status === \"aborted\")\n return parseUtil_js_1.INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value\n };\n } else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx\n });\n }\n }\n }\n static create(a3, b4) {\n return new _ZodPipeline({\n in: a3,\n out: b4,\n typeName: ZodFirstPartyTypeKind2.ZodPipeline\n });\n }\n };\n exports3.ZodPipeline = ZodPipeline2;\n var ZodReadonly2 = class extends ZodType2 {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n const freeze = (data) => {\n if ((0, parseUtil_js_1.isValid)(data)) {\n data.value = Object.freeze(data.value);\n }\n return data;\n };\n return (0, parseUtil_js_1.isAsync)(result) ? result.then((data) => freeze(data)) : freeze(result);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n exports3.ZodReadonly = ZodReadonly2;\n ZodReadonly2.create = (type, params) => {\n return new ZodReadonly2({\n innerType: type,\n typeName: ZodFirstPartyTypeKind2.ZodReadonly,\n ...processCreateParams2(params)\n });\n };\n function cleanParams2(params, data) {\n const p4 = typeof params === \"function\" ? params(data) : typeof params === \"string\" ? { message: params } : params;\n const p22 = typeof p4 === \"string\" ? { message: p4 } : p4;\n return p22;\n }\n function custom3(check2, _params = {}, fatal) {\n if (check2)\n return ZodAny2.create().superRefine((data, ctx) => {\n const r2 = check2(data);\n if (r2 instanceof Promise) {\n return r2.then((r3) => {\n if (!r3) {\n const params = cleanParams2(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n });\n }\n if (!r2) {\n const params = cleanParams2(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n return;\n });\n return ZodAny2.create();\n }\n exports3.late = {\n object: ZodObject2.lazycreate\n };\n var ZodFirstPartyTypeKind2;\n (function(ZodFirstPartyTypeKind3) {\n ZodFirstPartyTypeKind3[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind3[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind3[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind3[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind3[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind3[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind3[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind3[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind3[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind3[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind3[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind3[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind3[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind3[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind3[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind3[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind3[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind3[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind3[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind3[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind3[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind3[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind3[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind3[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind3[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind3[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind3[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind3[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind3[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind3[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind3[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind3[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind3[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind3[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind3[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind3[\"ZodReadonly\"] = \"ZodReadonly\";\n })(ZodFirstPartyTypeKind2 || (exports3.ZodFirstPartyTypeKind = ZodFirstPartyTypeKind2 = {}));\n var instanceOfType2 = (cls, params = {\n message: `Input not instance of ${cls.name}`\n }) => custom3((data) => data instanceof cls, params);\n exports3.instanceof = instanceOfType2;\n var stringType2 = ZodString2.create;\n exports3.string = stringType2;\n var numberType2 = ZodNumber2.create;\n exports3.number = numberType2;\n var nanType2 = ZodNaN2.create;\n exports3.nan = nanType2;\n var bigIntType2 = ZodBigInt2.create;\n exports3.bigint = bigIntType2;\n var booleanType2 = ZodBoolean2.create;\n exports3.boolean = booleanType2;\n var dateType2 = ZodDate2.create;\n exports3.date = dateType2;\n var symbolType2 = ZodSymbol2.create;\n exports3.symbol = symbolType2;\n var undefinedType2 = ZodUndefined2.create;\n exports3.undefined = undefinedType2;\n var nullType2 = ZodNull2.create;\n exports3.null = nullType2;\n var anyType2 = ZodAny2.create;\n exports3.any = anyType2;\n var unknownType2 = ZodUnknown2.create;\n exports3.unknown = unknownType2;\n var neverType2 = ZodNever2.create;\n exports3.never = neverType2;\n var voidType2 = ZodVoid2.create;\n exports3.void = voidType2;\n var arrayType2 = ZodArray2.create;\n exports3.array = arrayType2;\n var objectType2 = ZodObject2.create;\n exports3.object = objectType2;\n var strictObjectType2 = ZodObject2.strictCreate;\n exports3.strictObject = strictObjectType2;\n var unionType2 = ZodUnion2.create;\n exports3.union = unionType2;\n var discriminatedUnionType2 = ZodDiscriminatedUnion2.create;\n exports3.discriminatedUnion = discriminatedUnionType2;\n var intersectionType2 = ZodIntersection2.create;\n exports3.intersection = intersectionType2;\n var tupleType2 = ZodTuple2.create;\n exports3.tuple = tupleType2;\n var recordType2 = ZodRecord2.create;\n exports3.record = recordType2;\n var mapType2 = ZodMap2.create;\n exports3.map = mapType2;\n var setType2 = ZodSet2.create;\n exports3.set = setType2;\n var functionType2 = ZodFunction2.create;\n exports3.function = functionType2;\n var lazyType2 = ZodLazy2.create;\n exports3.lazy = lazyType2;\n var literalType2 = ZodLiteral2.create;\n exports3.literal = literalType2;\n var enumType2 = ZodEnum2.create;\n exports3.enum = enumType2;\n var nativeEnumType2 = ZodNativeEnum2.create;\n exports3.nativeEnum = nativeEnumType2;\n var promiseType2 = ZodPromise2.create;\n exports3.promise = promiseType2;\n var effectsType2 = ZodEffects2.create;\n exports3.effect = effectsType2;\n exports3.transformer = effectsType2;\n var optionalType2 = ZodOptional2.create;\n exports3.optional = optionalType2;\n var nullableType2 = ZodNullable2.create;\n exports3.nullable = nullableType2;\n var preprocessType2 = ZodEffects2.createWithPreprocess;\n exports3.preprocess = preprocessType2;\n var pipelineType2 = ZodPipeline2.create;\n exports3.pipeline = pipelineType2;\n var ostring2 = () => stringType2().optional();\n exports3.ostring = ostring2;\n var onumber2 = () => numberType2().optional();\n exports3.onumber = onumber2;\n var oboolean2 = () => booleanType2().optional();\n exports3.oboolean = oboolean2;\n exports3.coerce = {\n string: (arg) => ZodString2.create({ ...arg, coerce: true }),\n number: (arg) => ZodNumber2.create({ ...arg, coerce: true }),\n boolean: (arg) => ZodBoolean2.create({\n ...arg,\n coerce: true\n }),\n bigint: (arg) => ZodBigInt2.create({ ...arg, coerce: true }),\n date: (arg) => ZodDate2.create({ ...arg, coerce: true })\n };\n exports3.NEVER = parseUtil_js_1.INVALID;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/external.js\n var require_external = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/external.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding4 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __exportStar4 = exports3 && exports3.__exportStar || function(m2, exports4) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(exports4, p4))\n __createBinding4(exports4, m2, p4);\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n __exportStar4(require_errors(), exports3);\n __exportStar4(require_parseUtil(), exports3);\n __exportStar4(require_typeAliases(), exports3);\n __exportStar4(require_util(), exports3);\n __exportStar4(require_types(), exports3);\n __exportStar4(require_ZodError(), exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/index.js\n var require_v3 = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/v3/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding4 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar4 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding4(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n var __exportStar4 = exports3 && exports3.__exportStar || function(m2, exports4) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(exports4, p4))\n __createBinding4(exports4, m2, p4);\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.z = void 0;\n var z2 = __importStar4(require_external());\n exports3.z = z2;\n __exportStar4(require_external(), exports3);\n exports3.default = z2;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/index.js\n var require_cjs = __commonJS({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/cjs/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding4 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __exportStar4 = exports3 && exports3.__exportStar || function(m2, exports4) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(exports4, p4))\n __createBinding4(exports4, m2, p4);\n };\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var index_js_1 = __importDefault4(require_v3());\n __exportStar4(require_v3(), exports3);\n exports3.default = index_js_1.default;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js\n var require_constants = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SEMVER_SPEC_VERSION = \"2.0.0\";\n var MAX_LENGTH = 256;\n var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */\n 9007199254740991;\n var MAX_SAFE_COMPONENT_LENGTH = 16;\n var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;\n var RELEASE_TYPES = [\n \"major\",\n \"premajor\",\n \"minor\",\n \"preminor\",\n \"patch\",\n \"prepatch\",\n \"prerelease\"\n ];\n module.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 1,\n FLAG_LOOSE: 2\n };\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js\n var require_debug = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var debug = typeof process_exports === \"object\" && process_exports.env && process_exports.env.NODE_DEBUG && /\\bsemver\\b/i.test(process_exports.env.NODE_DEBUG) ? (...args) => console.error(\"SEMVER\", ...args) : () => {\n };\n module.exports = debug;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js\n var require_re = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH\n } = require_constants();\n var debug = require_debug();\n exports3 = module.exports = {};\n var re = exports3.re = [];\n var safeRe = exports3.safeRe = [];\n var src = exports3.src = [];\n var safeSrc = exports3.safeSrc = [];\n var t3 = exports3.t = {};\n var R3 = 0;\n var LETTERDASHNUMBER = \"[a-zA-Z0-9-]\";\n var safeRegexReplacements = [\n [\"\\\\s\", 1],\n [\"\\\\d\", MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]\n ];\n var makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);\n }\n return value;\n };\n var createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value);\n const index2 = R3++;\n debug(name, index2, value);\n t3[name] = index2;\n src[index2] = value;\n safeSrc[index2] = safe;\n re[index2] = new RegExp(value, isGlobal ? \"g\" : void 0);\n safeRe[index2] = new RegExp(safe, isGlobal ? \"g\" : void 0);\n };\n createToken(\"NUMERICIDENTIFIER\", \"0|[1-9]\\\\d*\");\n createToken(\"NUMERICIDENTIFIERLOOSE\", \"\\\\d+\");\n createToken(\"NONNUMERICIDENTIFIER\", `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);\n createToken(\"MAINVERSION\", `(${src[t3.NUMERICIDENTIFIER]})\\\\.(${src[t3.NUMERICIDENTIFIER]})\\\\.(${src[t3.NUMERICIDENTIFIER]})`);\n createToken(\"MAINVERSIONLOOSE\", `(${src[t3.NUMERICIDENTIFIERLOOSE]})\\\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})\\\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})`);\n createToken(\"PRERELEASEIDENTIFIER\", `(?:${src[t3.NONNUMERICIDENTIFIER]}|${src[t3.NUMERICIDENTIFIER]})`);\n createToken(\"PRERELEASEIDENTIFIERLOOSE\", `(?:${src[t3.NONNUMERICIDENTIFIER]}|${src[t3.NUMERICIDENTIFIERLOOSE]})`);\n createToken(\"PRERELEASE\", `(?:-(${src[t3.PRERELEASEIDENTIFIER]}(?:\\\\.${src[t3.PRERELEASEIDENTIFIER]})*))`);\n createToken(\"PRERELEASELOOSE\", `(?:-?(${src[t3.PRERELEASEIDENTIFIERLOOSE]}(?:\\\\.${src[t3.PRERELEASEIDENTIFIERLOOSE]})*))`);\n createToken(\"BUILDIDENTIFIER\", `${LETTERDASHNUMBER}+`);\n createToken(\"BUILD\", `(?:\\\\+(${src[t3.BUILDIDENTIFIER]}(?:\\\\.${src[t3.BUILDIDENTIFIER]})*))`);\n createToken(\"FULLPLAIN\", `v?${src[t3.MAINVERSION]}${src[t3.PRERELEASE]}?${src[t3.BUILD]}?`);\n createToken(\"FULL\", `^${src[t3.FULLPLAIN]}$`);\n createToken(\"LOOSEPLAIN\", `[v=\\\\s]*${src[t3.MAINVERSIONLOOSE]}${src[t3.PRERELEASELOOSE]}?${src[t3.BUILD]}?`);\n createToken(\"LOOSE\", `^${src[t3.LOOSEPLAIN]}$`);\n createToken(\"GTLT\", \"((?:<|>)?=?)\");\n createToken(\"XRANGEIDENTIFIERLOOSE\", `${src[t3.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`);\n createToken(\"XRANGEIDENTIFIER\", `${src[t3.NUMERICIDENTIFIER]}|x|X|\\\\*`);\n createToken(\"XRANGEPLAIN\", `[v=\\\\s]*(${src[t3.XRANGEIDENTIFIER]})(?:\\\\.(${src[t3.XRANGEIDENTIFIER]})(?:\\\\.(${src[t3.XRANGEIDENTIFIER]})(?:${src[t3.PRERELEASE]})?${src[t3.BUILD]}?)?)?`);\n createToken(\"XRANGEPLAINLOOSE\", `[v=\\\\s]*(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:${src[t3.PRERELEASELOOSE]})?${src[t3.BUILD]}?)?)?`);\n createToken(\"XRANGE\", `^${src[t3.GTLT]}\\\\s*${src[t3.XRANGEPLAIN]}$`);\n createToken(\"XRANGELOOSE\", `^${src[t3.GTLT]}\\\\s*${src[t3.XRANGEPLAINLOOSE]}$`);\n createToken(\"COERCEPLAIN\", `${\"(^|[^\\\\d])(\\\\d{1,\"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);\n createToken(\"COERCE\", `${src[t3.COERCEPLAIN]}(?:$|[^\\\\d])`);\n createToken(\"COERCEFULL\", src[t3.COERCEPLAIN] + `(?:${src[t3.PRERELEASE]})?(?:${src[t3.BUILD]})?(?:$|[^\\\\d])`);\n createToken(\"COERCERTL\", src[t3.COERCE], true);\n createToken(\"COERCERTLFULL\", src[t3.COERCEFULL], true);\n createToken(\"LONETILDE\", \"(?:~>?)\");\n createToken(\"TILDETRIM\", `(\\\\s*)${src[t3.LONETILDE]}\\\\s+`, true);\n exports3.tildeTrimReplace = \"$1~\";\n createToken(\"TILDE\", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAIN]}$`);\n createToken(\"TILDELOOSE\", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAINLOOSE]}$`);\n createToken(\"LONECARET\", \"(?:\\\\^)\");\n createToken(\"CARETTRIM\", `(\\\\s*)${src[t3.LONECARET]}\\\\s+`, true);\n exports3.caretTrimReplace = \"$1^\";\n createToken(\"CARET\", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAIN]}$`);\n createToken(\"CARETLOOSE\", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAINLOOSE]}$`);\n createToken(\"COMPARATORLOOSE\", `^${src[t3.GTLT]}\\\\s*(${src[t3.LOOSEPLAIN]})$|^$`);\n createToken(\"COMPARATOR\", `^${src[t3.GTLT]}\\\\s*(${src[t3.FULLPLAIN]})$|^$`);\n createToken(\"COMPARATORTRIM\", `(\\\\s*)${src[t3.GTLT]}\\\\s*(${src[t3.LOOSEPLAIN]}|${src[t3.XRANGEPLAIN]})`, true);\n exports3.comparatorTrimReplace = \"$1$2$3\";\n createToken(\"HYPHENRANGE\", `^\\\\s*(${src[t3.XRANGEPLAIN]})\\\\s+-\\\\s+(${src[t3.XRANGEPLAIN]})\\\\s*$`);\n createToken(\"HYPHENRANGELOOSE\", `^\\\\s*(${src[t3.XRANGEPLAINLOOSE]})\\\\s+-\\\\s+(${src[t3.XRANGEPLAINLOOSE]})\\\\s*$`);\n createToken(\"STAR\", \"(<|>)?=?\\\\s*\\\\*\");\n createToken(\"GTE0\", \"^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$\");\n createToken(\"GTE0PRE\", \"^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$\");\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js\n var require_parse_options = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var looseOption = Object.freeze({ loose: true });\n var emptyOpts = Object.freeze({});\n var parseOptions = (options) => {\n if (!options) {\n return emptyOpts;\n }\n if (typeof options !== \"object\") {\n return looseOption;\n }\n return options;\n };\n module.exports = parseOptions;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js\n var require_identifiers = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var numeric = /^[0-9]+$/;\n var compareIdentifiers = (a3, b4) => {\n const anum2 = numeric.test(a3);\n const bnum = numeric.test(b4);\n if (anum2 && bnum) {\n a3 = +a3;\n b4 = +b4;\n }\n return a3 === b4 ? 0 : anum2 && !bnum ? -1 : bnum && !anum2 ? 1 : a3 < b4 ? -1 : 1;\n };\n var rcompareIdentifiers = (a3, b4) => compareIdentifiers(b4, a3);\n module.exports = {\n compareIdentifiers,\n rcompareIdentifiers\n };\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js\n var require_semver = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var debug = require_debug();\n var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();\n var { safeRe: re, t: t3 } = require_re();\n var parseOptions = require_parse_options();\n var { compareIdentifiers } = require_identifiers();\n var SemVer = class _SemVer {\n constructor(version7, options) {\n options = parseOptions(options);\n if (version7 instanceof _SemVer) {\n if (version7.loose === !!options.loose && version7.includePrerelease === !!options.includePrerelease) {\n return version7;\n } else {\n version7 = version7.version;\n }\n } else if (typeof version7 !== \"string\") {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version7}\".`);\n }\n if (version7.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n );\n }\n debug(\"SemVer\", version7, options);\n this.options = options;\n this.loose = !!options.loose;\n this.includePrerelease = !!options.includePrerelease;\n const m2 = version7.trim().match(options.loose ? re[t3.LOOSE] : re[t3.FULL]);\n if (!m2) {\n throw new TypeError(`Invalid Version: ${version7}`);\n }\n this.raw = version7;\n this.major = +m2[1];\n this.minor = +m2[2];\n this.patch = +m2[3];\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError(\"Invalid major version\");\n }\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError(\"Invalid minor version\");\n }\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError(\"Invalid patch version\");\n }\n if (!m2[4]) {\n this.prerelease = [];\n } else {\n this.prerelease = m2[4].split(\".\").map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num2 = +id;\n if (num2 >= 0 && num2 < MAX_SAFE_INTEGER) {\n return num2;\n }\n }\n return id;\n });\n }\n this.build = m2[5] ? m2[5].split(\".\") : [];\n this.format();\n }\n format() {\n this.version = `${this.major}.${this.minor}.${this.patch}`;\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join(\".\")}`;\n }\n return this.version;\n }\n toString() {\n return this.version;\n }\n compare(other) {\n debug(\"SemVer.compare\", this.version, this.options, other);\n if (!(other instanceof _SemVer)) {\n if (typeof other === \"string\" && other === this.version) {\n return 0;\n }\n other = new _SemVer(other, this.options);\n }\n if (other.version === this.version) {\n return 0;\n }\n return this.compareMain(other) || this.comparePre(other);\n }\n compareMain(other) {\n if (!(other instanceof _SemVer)) {\n other = new _SemVer(other, this.options);\n }\n return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);\n }\n comparePre(other) {\n if (!(other instanceof _SemVer)) {\n other = new _SemVer(other, this.options);\n }\n if (this.prerelease.length && !other.prerelease.length) {\n return -1;\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1;\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0;\n }\n let i3 = 0;\n do {\n const a3 = this.prerelease[i3];\n const b4 = other.prerelease[i3];\n debug(\"prerelease compare\", i3, a3, b4);\n if (a3 === void 0 && b4 === void 0) {\n return 0;\n } else if (b4 === void 0) {\n return 1;\n } else if (a3 === void 0) {\n return -1;\n } else if (a3 === b4) {\n continue;\n } else {\n return compareIdentifiers(a3, b4);\n }\n } while (++i3);\n }\n compareBuild(other) {\n if (!(other instanceof _SemVer)) {\n other = new _SemVer(other, this.options);\n }\n let i3 = 0;\n do {\n const a3 = this.build[i3];\n const b4 = other.build[i3];\n debug(\"build compare\", i3, a3, b4);\n if (a3 === void 0 && b4 === void 0) {\n return 0;\n } else if (b4 === void 0) {\n return 1;\n } else if (a3 === void 0) {\n return -1;\n } else if (a3 === b4) {\n continue;\n } else {\n return compareIdentifiers(a3, b4);\n }\n } while (++i3);\n }\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc(release2, identifier, identifierBase) {\n if (release2.startsWith(\"pre\")) {\n if (!identifier && identifierBase === false) {\n throw new Error(\"invalid increment argument: identifier is empty\");\n }\n if (identifier) {\n const match = `-${identifier}`.match(this.options.loose ? re[t3.PRERELEASELOOSE] : re[t3.PRERELEASE]);\n if (!match || match[1] !== identifier) {\n throw new Error(`invalid identifier: ${identifier}`);\n }\n }\n }\n switch (release2) {\n case \"premajor\":\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor = 0;\n this.major++;\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"preminor\":\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor++;\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"prepatch\":\n this.prerelease.length = 0;\n this.inc(\"patch\", identifier, identifierBase);\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"prerelease\":\n if (this.prerelease.length === 0) {\n this.inc(\"patch\", identifier, identifierBase);\n }\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"release\":\n if (this.prerelease.length === 0) {\n throw new Error(`version ${this.raw} is not a prerelease`);\n }\n this.prerelease.length = 0;\n break;\n case \"major\":\n if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {\n this.major++;\n }\n this.minor = 0;\n this.patch = 0;\n this.prerelease = [];\n break;\n case \"minor\":\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++;\n }\n this.patch = 0;\n this.prerelease = [];\n break;\n case \"patch\":\n if (this.prerelease.length === 0) {\n this.patch++;\n }\n this.prerelease = [];\n break;\n case \"pre\": {\n const base4 = Number(identifierBase) ? 1 : 0;\n if (this.prerelease.length === 0) {\n this.prerelease = [base4];\n } else {\n let i3 = this.prerelease.length;\n while (--i3 >= 0) {\n if (typeof this.prerelease[i3] === \"number\") {\n this.prerelease[i3]++;\n i3 = -2;\n }\n }\n if (i3 === -1) {\n if (identifier === this.prerelease.join(\".\") && identifierBase === false) {\n throw new Error(\"invalid increment argument: identifier already exists\");\n }\n this.prerelease.push(base4);\n }\n }\n if (identifier) {\n let prerelease = [identifier, base4];\n if (identifierBase === false) {\n prerelease = [identifier];\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease;\n }\n } else {\n this.prerelease = prerelease;\n }\n }\n break;\n }\n default:\n throw new Error(`invalid increment argument: ${release2}`);\n }\n this.raw = this.format();\n if (this.build.length) {\n this.raw += `+${this.build.join(\".\")}`;\n }\n return this;\n }\n };\n module.exports = SemVer;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js\n var require_parse = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var parse3 = (version7, options, throwErrors = false) => {\n if (version7 instanceof SemVer) {\n return version7;\n }\n try {\n return new SemVer(version7, options);\n } catch (er) {\n if (!throwErrors) {\n return null;\n }\n throw er;\n }\n };\n module.exports = parse3;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js\n var require_valid = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var parse3 = require_parse();\n var valid = (version7, options) => {\n const v2 = parse3(version7, options);\n return v2 ? v2.version : null;\n };\n module.exports = valid;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js\n var require_clean = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var parse3 = require_parse();\n var clean2 = (version7, options) => {\n const s4 = parse3(version7.trim().replace(/^[=v]+/, \"\"), options);\n return s4 ? s4.version : null;\n };\n module.exports = clean2;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js\n var require_inc = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var inc = (version7, release2, options, identifier, identifierBase) => {\n if (typeof options === \"string\") {\n identifierBase = identifier;\n identifier = options;\n options = void 0;\n }\n try {\n return new SemVer(\n version7 instanceof SemVer ? version7.version : version7,\n options\n ).inc(release2, identifier, identifierBase).version;\n } catch (er) {\n return null;\n }\n };\n module.exports = inc;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js\n var require_diff = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var parse3 = require_parse();\n var diff = (version1, version22) => {\n const v12 = parse3(version1, null, true);\n const v2 = parse3(version22, null, true);\n const comparison = v12.compare(v2);\n if (comparison === 0) {\n return null;\n }\n const v1Higher = comparison > 0;\n const highVersion = v1Higher ? v12 : v2;\n const lowVersion = v1Higher ? v2 : v12;\n const highHasPre = !!highVersion.prerelease.length;\n const lowHasPre = !!lowVersion.prerelease.length;\n if (lowHasPre && !highHasPre) {\n if (!lowVersion.patch && !lowVersion.minor) {\n return \"major\";\n }\n if (lowVersion.compareMain(highVersion) === 0) {\n if (lowVersion.minor && !lowVersion.patch) {\n return \"minor\";\n }\n return \"patch\";\n }\n }\n const prefix = highHasPre ? \"pre\" : \"\";\n if (v12.major !== v2.major) {\n return prefix + \"major\";\n }\n if (v12.minor !== v2.minor) {\n return prefix + \"minor\";\n }\n if (v12.patch !== v2.patch) {\n return prefix + \"patch\";\n }\n return \"prerelease\";\n };\n module.exports = diff;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js\n var require_major = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var major = (a3, loose) => new SemVer(a3, loose).major;\n module.exports = major;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js\n var require_minor = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var minor = (a3, loose) => new SemVer(a3, loose).minor;\n module.exports = minor;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js\n var require_patch = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var patch = (a3, loose) => new SemVer(a3, loose).patch;\n module.exports = patch;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js\n var require_prerelease = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var parse3 = require_parse();\n var prerelease = (version7, options) => {\n const parsed = parse3(version7, options);\n return parsed && parsed.prerelease.length ? parsed.prerelease : null;\n };\n module.exports = prerelease;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js\n var require_compare = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var compare = (a3, b4, loose) => new SemVer(a3, loose).compare(new SemVer(b4, loose));\n module.exports = compare;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js\n var require_rcompare = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var rcompare = (a3, b4, loose) => compare(b4, a3, loose);\n module.exports = rcompare;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js\n var require_compare_loose = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var compareLoose = (a3, b4) => compare(a3, b4, true);\n module.exports = compareLoose;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js\n var require_compare_build = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var compareBuild = (a3, b4, loose) => {\n const versionA = new SemVer(a3, loose);\n const versionB = new SemVer(b4, loose);\n return versionA.compare(versionB) || versionA.compareBuild(versionB);\n };\n module.exports = compareBuild;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js\n var require_sort = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compareBuild = require_compare_build();\n var sort = (list, loose) => list.sort((a3, b4) => compareBuild(a3, b4, loose));\n module.exports = sort;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js\n var require_rsort = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compareBuild = require_compare_build();\n var rsort = (list, loose) => list.sort((a3, b4) => compareBuild(b4, a3, loose));\n module.exports = rsort;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js\n var require_gt = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var gt = (a3, b4, loose) => compare(a3, b4, loose) > 0;\n module.exports = gt;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js\n var require_lt = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var lt = (a3, b4, loose) => compare(a3, b4, loose) < 0;\n module.exports = lt;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js\n var require_eq = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var eq = (a3, b4, loose) => compare(a3, b4, loose) === 0;\n module.exports = eq;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js\n var require_neq = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var neq = (a3, b4, loose) => compare(a3, b4, loose) !== 0;\n module.exports = neq;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js\n var require_gte = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var gte = (a3, b4, loose) => compare(a3, b4, loose) >= 0;\n module.exports = gte;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js\n var require_lte = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var compare = require_compare();\n var lte = (a3, b4, loose) => compare(a3, b4, loose) <= 0;\n module.exports = lte;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js\n var require_cmp = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var eq = require_eq();\n var neq = require_neq();\n var gt = require_gt();\n var gte = require_gte();\n var lt = require_lt();\n var lte = require_lte();\n var cmp = (a3, op, b4, loose) => {\n switch (op) {\n case \"===\":\n if (typeof a3 === \"object\") {\n a3 = a3.version;\n }\n if (typeof b4 === \"object\") {\n b4 = b4.version;\n }\n return a3 === b4;\n case \"!==\":\n if (typeof a3 === \"object\") {\n a3 = a3.version;\n }\n if (typeof b4 === \"object\") {\n b4 = b4.version;\n }\n return a3 !== b4;\n case \"\":\n case \"=\":\n case \"==\":\n return eq(a3, b4, loose);\n case \"!=\":\n return neq(a3, b4, loose);\n case \">\":\n return gt(a3, b4, loose);\n case \">=\":\n return gte(a3, b4, loose);\n case \"<\":\n return lt(a3, b4, loose);\n case \"<=\":\n return lte(a3, b4, loose);\n default:\n throw new TypeError(`Invalid operator: ${op}`);\n }\n };\n module.exports = cmp;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js\n var require_coerce = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var parse3 = require_parse();\n var { safeRe: re, t: t3 } = require_re();\n var coerce2 = (version7, options) => {\n if (version7 instanceof SemVer) {\n return version7;\n }\n if (typeof version7 === \"number\") {\n version7 = String(version7);\n }\n if (typeof version7 !== \"string\") {\n return null;\n }\n options = options || {};\n let match = null;\n if (!options.rtl) {\n match = version7.match(options.includePrerelease ? re[t3.COERCEFULL] : re[t3.COERCE]);\n } else {\n const coerceRtlRegex = options.includePrerelease ? re[t3.COERCERTLFULL] : re[t3.COERCERTL];\n let next;\n while ((next = coerceRtlRegex.exec(version7)) && (!match || match.index + match[0].length !== version7.length)) {\n if (!match || next.index + next[0].length !== match.index + match[0].length) {\n match = next;\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;\n }\n coerceRtlRegex.lastIndex = -1;\n }\n if (match === null) {\n return null;\n }\n const major = match[2];\n const minor = match[3] || \"0\";\n const patch = match[4] || \"0\";\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : \"\";\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : \"\";\n return parse3(`${major}.${minor}.${patch}${prerelease}${build}`, options);\n };\n module.exports = coerce2;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js\n var require_lrucache = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var LRUCache = class {\n constructor() {\n this.max = 1e3;\n this.map = /* @__PURE__ */ new Map();\n }\n get(key) {\n const value = this.map.get(key);\n if (value === void 0) {\n return void 0;\n } else {\n this.map.delete(key);\n this.map.set(key, value);\n return value;\n }\n }\n delete(key) {\n return this.map.delete(key);\n }\n set(key, value) {\n const deleted = this.delete(key);\n if (!deleted && value !== void 0) {\n if (this.map.size >= this.max) {\n const firstKey = this.map.keys().next().value;\n this.delete(firstKey);\n }\n this.map.set(key, value);\n }\n return this;\n }\n };\n module.exports = LRUCache;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js\n var require_range = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SPACE_CHARACTERS = /\\s+/g;\n var Range = class _Range {\n constructor(range, options) {\n options = parseOptions(options);\n if (range instanceof _Range) {\n if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {\n return range;\n } else {\n return new _Range(range.raw, options);\n }\n }\n if (range instanceof Comparator) {\n this.raw = range.value;\n this.set = [[range]];\n this.formatted = void 0;\n return this;\n }\n this.options = options;\n this.loose = !!options.loose;\n this.includePrerelease = !!options.includePrerelease;\n this.raw = range.trim().replace(SPACE_CHARACTERS, \" \");\n this.set = this.raw.split(\"||\").map((r2) => this.parseRange(r2.trim())).filter((c4) => c4.length);\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`);\n }\n if (this.set.length > 1) {\n const first = this.set[0];\n this.set = this.set.filter((c4) => !isNullSet(c4[0]));\n if (this.set.length === 0) {\n this.set = [first];\n } else if (this.set.length > 1) {\n for (const c4 of this.set) {\n if (c4.length === 1 && isAny(c4[0])) {\n this.set = [c4];\n break;\n }\n }\n }\n }\n this.formatted = void 0;\n }\n get range() {\n if (this.formatted === void 0) {\n this.formatted = \"\";\n for (let i3 = 0; i3 < this.set.length; i3++) {\n if (i3 > 0) {\n this.formatted += \"||\";\n }\n const comps = this.set[i3];\n for (let k4 = 0; k4 < comps.length; k4++) {\n if (k4 > 0) {\n this.formatted += \" \";\n }\n this.formatted += comps[k4].toString().trim();\n }\n }\n }\n return this.formatted;\n }\n format() {\n return this.range;\n }\n toString() {\n return this.range;\n }\n parseRange(range) {\n const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);\n const memoKey = memoOpts + \":\" + range;\n const cached = cache.get(memoKey);\n if (cached) {\n return cached;\n }\n const loose = this.options.loose;\n const hr = loose ? re[t3.HYPHENRANGELOOSE] : re[t3.HYPHENRANGE];\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease));\n debug(\"hyphen replace\", range);\n range = range.replace(re[t3.COMPARATORTRIM], comparatorTrimReplace);\n debug(\"comparator trim\", range);\n range = range.replace(re[t3.TILDETRIM], tildeTrimReplace);\n debug(\"tilde trim\", range);\n range = range.replace(re[t3.CARETTRIM], caretTrimReplace);\n debug(\"caret trim\", range);\n let rangeList = range.split(\" \").map((comp) => parseComparator(comp, this.options)).join(\" \").split(/\\s+/).map((comp) => replaceGTE0(comp, this.options));\n if (loose) {\n rangeList = rangeList.filter((comp) => {\n debug(\"loose invalid filter\", comp, this.options);\n return !!comp.match(re[t3.COMPARATORLOOSE]);\n });\n }\n debug(\"range list\", rangeList);\n const rangeMap = /* @__PURE__ */ new Map();\n const comparators = rangeList.map((comp) => new Comparator(comp, this.options));\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp];\n }\n rangeMap.set(comp.value, comp);\n }\n if (rangeMap.size > 1 && rangeMap.has(\"\")) {\n rangeMap.delete(\"\");\n }\n const result = [...rangeMap.values()];\n cache.set(memoKey, result);\n return result;\n }\n intersects(range, options) {\n if (!(range instanceof _Range)) {\n throw new TypeError(\"a Range is required\");\n }\n return this.set.some((thisComparators) => {\n return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {\n return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options);\n });\n });\n });\n });\n }\n // if ANY of the sets match ALL of its comparators, then pass\n test(version7) {\n if (!version7) {\n return false;\n }\n if (typeof version7 === \"string\") {\n try {\n version7 = new SemVer(version7, this.options);\n } catch (er) {\n return false;\n }\n }\n for (let i3 = 0; i3 < this.set.length; i3++) {\n if (testSet(this.set[i3], version7, this.options)) {\n return true;\n }\n }\n return false;\n }\n };\n module.exports = Range;\n var LRU = require_lrucache();\n var cache = new LRU();\n var parseOptions = require_parse_options();\n var Comparator = require_comparator();\n var debug = require_debug();\n var SemVer = require_semver();\n var {\n safeRe: re,\n t: t3,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace\n } = require_re();\n var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();\n var isNullSet = (c4) => c4.value === \"<0.0.0-0\";\n var isAny = (c4) => c4.value === \"\";\n var isSatisfiable = (comparators, options) => {\n let result = true;\n const remainingComparators = comparators.slice();\n let testComparator = remainingComparators.pop();\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options);\n });\n testComparator = remainingComparators.pop();\n }\n return result;\n };\n var parseComparator = (comp, options) => {\n debug(\"comp\", comp, options);\n comp = replaceCarets(comp, options);\n debug(\"caret\", comp);\n comp = replaceTildes(comp, options);\n debug(\"tildes\", comp);\n comp = replaceXRanges(comp, options);\n debug(\"xrange\", comp);\n comp = replaceStars(comp, options);\n debug(\"stars\", comp);\n return comp;\n };\n var isX = (id) => !id || id.toLowerCase() === \"x\" || id === \"*\";\n var replaceTildes = (comp, options) => {\n return comp.trim().split(/\\s+/).map((c4) => replaceTilde(c4, options)).join(\" \");\n };\n var replaceTilde = (comp, options) => {\n const r2 = options.loose ? re[t3.TILDELOOSE] : re[t3.TILDE];\n return comp.replace(r2, (_2, M2, m2, p4, pr) => {\n debug(\"tilde\", comp, _2, M2, m2, p4, pr);\n let ret;\n if (isX(M2)) {\n ret = \"\";\n } else if (isX(m2)) {\n ret = `>=${M2}.0.0 <${+M2 + 1}.0.0-0`;\n } else if (isX(p4)) {\n ret = `>=${M2}.${m2}.0 <${M2}.${+m2 + 1}.0-0`;\n } else if (pr) {\n debug(\"replaceTilde pr\", pr);\n ret = `>=${M2}.${m2}.${p4}-${pr} <${M2}.${+m2 + 1}.0-0`;\n } else {\n ret = `>=${M2}.${m2}.${p4} <${M2}.${+m2 + 1}.0-0`;\n }\n debug(\"tilde return\", ret);\n return ret;\n });\n };\n var replaceCarets = (comp, options) => {\n return comp.trim().split(/\\s+/).map((c4) => replaceCaret(c4, options)).join(\" \");\n };\n var replaceCaret = (comp, options) => {\n debug(\"caret\", comp, options);\n const r2 = options.loose ? re[t3.CARETLOOSE] : re[t3.CARET];\n const z2 = options.includePrerelease ? \"-0\" : \"\";\n return comp.replace(r2, (_2, M2, m2, p4, pr) => {\n debug(\"caret\", comp, _2, M2, m2, p4, pr);\n let ret;\n if (isX(M2)) {\n ret = \"\";\n } else if (isX(m2)) {\n ret = `>=${M2}.0.0${z2} <${+M2 + 1}.0.0-0`;\n } else if (isX(p4)) {\n if (M2 === \"0\") {\n ret = `>=${M2}.${m2}.0${z2} <${M2}.${+m2 + 1}.0-0`;\n } else {\n ret = `>=${M2}.${m2}.0${z2} <${+M2 + 1}.0.0-0`;\n }\n } else if (pr) {\n debug(\"replaceCaret pr\", pr);\n if (M2 === \"0\") {\n if (m2 === \"0\") {\n ret = `>=${M2}.${m2}.${p4}-${pr} <${M2}.${m2}.${+p4 + 1}-0`;\n } else {\n ret = `>=${M2}.${m2}.${p4}-${pr} <${M2}.${+m2 + 1}.0-0`;\n }\n } else {\n ret = `>=${M2}.${m2}.${p4}-${pr} <${+M2 + 1}.0.0-0`;\n }\n } else {\n debug(\"no pr\");\n if (M2 === \"0\") {\n if (m2 === \"0\") {\n ret = `>=${M2}.${m2}.${p4}${z2} <${M2}.${m2}.${+p4 + 1}-0`;\n } else {\n ret = `>=${M2}.${m2}.${p4}${z2} <${M2}.${+m2 + 1}.0-0`;\n }\n } else {\n ret = `>=${M2}.${m2}.${p4} <${+M2 + 1}.0.0-0`;\n }\n }\n debug(\"caret return\", ret);\n return ret;\n });\n };\n var replaceXRanges = (comp, options) => {\n debug(\"replaceXRanges\", comp, options);\n return comp.split(/\\s+/).map((c4) => replaceXRange(c4, options)).join(\" \");\n };\n var replaceXRange = (comp, options) => {\n comp = comp.trim();\n const r2 = options.loose ? re[t3.XRANGELOOSE] : re[t3.XRANGE];\n return comp.replace(r2, (ret, gtlt, M2, m2, p4, pr) => {\n debug(\"xRange\", comp, ret, gtlt, M2, m2, p4, pr);\n const xM = isX(M2);\n const xm = xM || isX(m2);\n const xp = xm || isX(p4);\n const anyX = xp;\n if (gtlt === \"=\" && anyX) {\n gtlt = \"\";\n }\n pr = options.includePrerelease ? \"-0\" : \"\";\n if (xM) {\n if (gtlt === \">\" || gtlt === \"<\") {\n ret = \"<0.0.0-0\";\n } else {\n ret = \"*\";\n }\n } else if (gtlt && anyX) {\n if (xm) {\n m2 = 0;\n }\n p4 = 0;\n if (gtlt === \">\") {\n gtlt = \">=\";\n if (xm) {\n M2 = +M2 + 1;\n m2 = 0;\n p4 = 0;\n } else {\n m2 = +m2 + 1;\n p4 = 0;\n }\n } else if (gtlt === \"<=\") {\n gtlt = \"<\";\n if (xm) {\n M2 = +M2 + 1;\n } else {\n m2 = +m2 + 1;\n }\n }\n if (gtlt === \"<\") {\n pr = \"-0\";\n }\n ret = `${gtlt + M2}.${m2}.${p4}${pr}`;\n } else if (xm) {\n ret = `>=${M2}.0.0${pr} <${+M2 + 1}.0.0-0`;\n } else if (xp) {\n ret = `>=${M2}.${m2}.0${pr} <${M2}.${+m2 + 1}.0-0`;\n }\n debug(\"xRange return\", ret);\n return ret;\n });\n };\n var replaceStars = (comp, options) => {\n debug(\"replaceStars\", comp, options);\n return comp.trim().replace(re[t3.STAR], \"\");\n };\n var replaceGTE0 = (comp, options) => {\n debug(\"replaceGTE0\", comp, options);\n return comp.trim().replace(re[options.includePrerelease ? t3.GTE0PRE : t3.GTE0], \"\");\n };\n var hyphenReplace = (incPr) => ($0, from14, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from14 = \"\";\n } else if (isX(fm)) {\n from14 = `>=${fM}.0.0${incPr ? \"-0\" : \"\"}`;\n } else if (isX(fp)) {\n from14 = `>=${fM}.${fm}.0${incPr ? \"-0\" : \"\"}`;\n } else if (fpr) {\n from14 = `>=${from14}`;\n } else {\n from14 = `>=${from14}${incPr ? \"-0\" : \"\"}`;\n }\n if (isX(tM)) {\n to = \"\";\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`;\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`;\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`;\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`;\n } else {\n to = `<=${to}`;\n }\n return `${from14} ${to}`.trim();\n };\n var testSet = (set, version7, options) => {\n for (let i3 = 0; i3 < set.length; i3++) {\n if (!set[i3].test(version7)) {\n return false;\n }\n }\n if (version7.prerelease.length && !options.includePrerelease) {\n for (let i3 = 0; i3 < set.length; i3++) {\n debug(set[i3].semver);\n if (set[i3].semver === Comparator.ANY) {\n continue;\n }\n if (set[i3].semver.prerelease.length > 0) {\n const allowed = set[i3].semver;\n if (allowed.major === version7.major && allowed.minor === version7.minor && allowed.patch === version7.patch) {\n return true;\n }\n }\n }\n return false;\n }\n return true;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js\n var require_comparator = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var ANY = Symbol(\"SemVer ANY\");\n var Comparator = class _Comparator {\n static get ANY() {\n return ANY;\n }\n constructor(comp, options) {\n options = parseOptions(options);\n if (comp instanceof _Comparator) {\n if (comp.loose === !!options.loose) {\n return comp;\n } else {\n comp = comp.value;\n }\n }\n comp = comp.trim().split(/\\s+/).join(\" \");\n debug(\"comparator\", comp, options);\n this.options = options;\n this.loose = !!options.loose;\n this.parse(comp);\n if (this.semver === ANY) {\n this.value = \"\";\n } else {\n this.value = this.operator + this.semver.version;\n }\n debug(\"comp\", this);\n }\n parse(comp) {\n const r2 = this.options.loose ? re[t3.COMPARATORLOOSE] : re[t3.COMPARATOR];\n const m2 = comp.match(r2);\n if (!m2) {\n throw new TypeError(`Invalid comparator: ${comp}`);\n }\n this.operator = m2[1] !== void 0 ? m2[1] : \"\";\n if (this.operator === \"=\") {\n this.operator = \"\";\n }\n if (!m2[2]) {\n this.semver = ANY;\n } else {\n this.semver = new SemVer(m2[2], this.options.loose);\n }\n }\n toString() {\n return this.value;\n }\n test(version7) {\n debug(\"Comparator.test\", version7, this.options.loose);\n if (this.semver === ANY || version7 === ANY) {\n return true;\n }\n if (typeof version7 === \"string\") {\n try {\n version7 = new SemVer(version7, this.options);\n } catch (er) {\n return false;\n }\n }\n return cmp(version7, this.operator, this.semver, this.options);\n }\n intersects(comp, options) {\n if (!(comp instanceof _Comparator)) {\n throw new TypeError(\"a Comparator is required\");\n }\n if (this.operator === \"\") {\n if (this.value === \"\") {\n return true;\n }\n return new Range(comp.value, options).test(this.value);\n } else if (comp.operator === \"\") {\n if (comp.value === \"\") {\n return true;\n }\n return new Range(this.value, options).test(comp.semver);\n }\n options = parseOptions(options);\n if (options.includePrerelease && (this.value === \"<0.0.0-0\" || comp.value === \"<0.0.0-0\")) {\n return false;\n }\n if (!options.includePrerelease && (this.value.startsWith(\"<0.0.0\") || comp.value.startsWith(\"<0.0.0\"))) {\n return false;\n }\n if (this.operator.startsWith(\">\") && comp.operator.startsWith(\">\")) {\n return true;\n }\n if (this.operator.startsWith(\"<\") && comp.operator.startsWith(\"<\")) {\n return true;\n }\n if (this.semver.version === comp.semver.version && this.operator.includes(\"=\") && comp.operator.includes(\"=\")) {\n return true;\n }\n if (cmp(this.semver, \"<\", comp.semver, options) && this.operator.startsWith(\">\") && comp.operator.startsWith(\"<\")) {\n return true;\n }\n if (cmp(this.semver, \">\", comp.semver, options) && this.operator.startsWith(\"<\") && comp.operator.startsWith(\">\")) {\n return true;\n }\n return false;\n }\n };\n module.exports = Comparator;\n var parseOptions = require_parse_options();\n var { safeRe: re, t: t3 } = require_re();\n var cmp = require_cmp();\n var debug = require_debug();\n var SemVer = require_semver();\n var Range = require_range();\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js\n var require_satisfies = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var satisfies = (version7, range, options) => {\n try {\n range = new Range(range, options);\n } catch (er) {\n return false;\n }\n return range.test(version7);\n };\n module.exports = satisfies;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js\n var require_to_comparators = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c4) => c4.value).join(\" \").trim().split(\" \"));\n module.exports = toComparators;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js\n var require_max_satisfying = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var Range = require_range();\n var maxSatisfying = (versions2, range, options) => {\n let max = null;\n let maxSV = null;\n let rangeObj = null;\n try {\n rangeObj = new Range(range, options);\n } catch (er) {\n return null;\n }\n versions2.forEach((v2) => {\n if (rangeObj.test(v2)) {\n if (!max || maxSV.compare(v2) === -1) {\n max = v2;\n maxSV = new SemVer(max, options);\n }\n }\n });\n return max;\n };\n module.exports = maxSatisfying;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js\n var require_min_satisfying = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var Range = require_range();\n var minSatisfying = (versions2, range, options) => {\n let min = null;\n let minSV = null;\n let rangeObj = null;\n try {\n rangeObj = new Range(range, options);\n } catch (er) {\n return null;\n }\n versions2.forEach((v2) => {\n if (rangeObj.test(v2)) {\n if (!min || minSV.compare(v2) === 1) {\n min = v2;\n minSV = new SemVer(min, options);\n }\n }\n });\n return min;\n };\n module.exports = minSatisfying;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js\n var require_min_version = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var Range = require_range();\n var gt = require_gt();\n var minVersion = (range, loose) => {\n range = new Range(range, loose);\n let minver = new SemVer(\"0.0.0\");\n if (range.test(minver)) {\n return minver;\n }\n minver = new SemVer(\"0.0.0-0\");\n if (range.test(minver)) {\n return minver;\n }\n minver = null;\n for (let i3 = 0; i3 < range.set.length; ++i3) {\n const comparators = range.set[i3];\n let setMin = null;\n comparators.forEach((comparator) => {\n const compver = new SemVer(comparator.semver.version);\n switch (comparator.operator) {\n case \">\":\n if (compver.prerelease.length === 0) {\n compver.patch++;\n } else {\n compver.prerelease.push(0);\n }\n compver.raw = compver.format();\n case \"\":\n case \">=\":\n if (!setMin || gt(compver, setMin)) {\n setMin = compver;\n }\n break;\n case \"<\":\n case \"<=\":\n break;\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`);\n }\n });\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin;\n }\n }\n if (minver && range.test(minver)) {\n return minver;\n }\n return null;\n };\n module.exports = minVersion;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js\n var require_valid2 = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var validRange = (range, options) => {\n try {\n return new Range(range, options).range || \"*\";\n } catch (er) {\n return null;\n }\n };\n module.exports = validRange;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js\n var require_outside = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SemVer = require_semver();\n var Comparator = require_comparator();\n var { ANY } = Comparator;\n var Range = require_range();\n var satisfies = require_satisfies();\n var gt = require_gt();\n var lt = require_lt();\n var lte = require_lte();\n var gte = require_gte();\n var outside = (version7, range, hilo, options) => {\n version7 = new SemVer(version7, options);\n range = new Range(range, options);\n let gtfn, ltefn, ltfn, comp, ecomp;\n switch (hilo) {\n case \">\":\n gtfn = gt;\n ltefn = lte;\n ltfn = lt;\n comp = \">\";\n ecomp = \">=\";\n break;\n case \"<\":\n gtfn = lt;\n ltefn = gte;\n ltfn = gt;\n comp = \"<\";\n ecomp = \"<=\";\n break;\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"');\n }\n if (satisfies(version7, range, options)) {\n return false;\n }\n for (let i3 = 0; i3 < range.set.length; ++i3) {\n const comparators = range.set[i3];\n let high = null;\n let low = null;\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator(\">=0.0.0\");\n }\n high = high || comparator;\n low = low || comparator;\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator;\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator;\n }\n });\n if (high.operator === comp || high.operator === ecomp) {\n return false;\n }\n if ((!low.operator || low.operator === comp) && ltefn(version7, low.semver)) {\n return false;\n } else if (low.operator === ecomp && ltfn(version7, low.semver)) {\n return false;\n }\n }\n return true;\n };\n module.exports = outside;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js\n var require_gtr = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var outside = require_outside();\n var gtr = (version7, range, options) => outside(version7, range, \">\", options);\n module.exports = gtr;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js\n var require_ltr = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var outside = require_outside();\n var ltr = (version7, range, options) => outside(version7, range, \"<\", options);\n module.exports = ltr;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js\n var require_intersects = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var intersects = (r1, r2, options) => {\n r1 = new Range(r1, options);\n r2 = new Range(r2, options);\n return r1.intersects(r2, options);\n };\n module.exports = intersects;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js\n var require_simplify = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var satisfies = require_satisfies();\n var compare = require_compare();\n module.exports = (versions2, range, options) => {\n const set = [];\n let first = null;\n let prev = null;\n const v2 = versions2.sort((a3, b4) => compare(a3, b4, options));\n for (const version7 of v2) {\n const included = satisfies(version7, range, options);\n if (included) {\n prev = version7;\n if (!first) {\n first = version7;\n }\n } else {\n if (prev) {\n set.push([first, prev]);\n }\n prev = null;\n first = null;\n }\n }\n if (first) {\n set.push([first, null]);\n }\n const ranges = [];\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min);\n } else if (!max && min === v2[0]) {\n ranges.push(\"*\");\n } else if (!max) {\n ranges.push(`>=${min}`);\n } else if (min === v2[0]) {\n ranges.push(`<=${max}`);\n } else {\n ranges.push(`${min} - ${max}`);\n }\n }\n const simplified = ranges.join(\" || \");\n const original = typeof range.raw === \"string\" ? range.raw : String(range);\n return simplified.length < original.length ? simplified : range;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js\n var require_subset = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var Range = require_range();\n var Comparator = require_comparator();\n var { ANY } = Comparator;\n var satisfies = require_satisfies();\n var compare = require_compare();\n var subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true;\n }\n sub = new Range(sub, options);\n dom = new Range(dom, options);\n let sawNonNull = false;\n OUTER:\n for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options);\n sawNonNull = sawNonNull || isSub !== null;\n if (isSub) {\n continue OUTER;\n }\n }\n if (sawNonNull) {\n return false;\n }\n }\n return true;\n };\n var minimumVersionWithPreRelease = [new Comparator(\">=0.0.0-0\")];\n var minimumVersion = [new Comparator(\">=0.0.0\")];\n var simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true;\n }\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true;\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease;\n } else {\n sub = minimumVersion;\n }\n }\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true;\n } else {\n dom = minimumVersion;\n }\n }\n const eqSet = /* @__PURE__ */ new Set();\n let gt, lt;\n for (const c4 of sub) {\n if (c4.operator === \">\" || c4.operator === \">=\") {\n gt = higherGT(gt, c4, options);\n } else if (c4.operator === \"<\" || c4.operator === \"<=\") {\n lt = lowerLT(lt, c4, options);\n } else {\n eqSet.add(c4.semver);\n }\n }\n if (eqSet.size > 1) {\n return null;\n }\n let gtltComp;\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options);\n if (gtltComp > 0) {\n return null;\n } else if (gtltComp === 0 && (gt.operator !== \">=\" || lt.operator !== \"<=\")) {\n return null;\n }\n }\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null;\n }\n if (lt && !satisfies(eq, String(lt), options)) {\n return null;\n }\n for (const c4 of dom) {\n if (!satisfies(eq, String(c4), options)) {\n return false;\n }\n }\n return true;\n }\n let higher, lower;\n let hasDomLT, hasDomGT;\n let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;\n let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === \"<\" && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false;\n }\n for (const c4 of dom) {\n hasDomGT = hasDomGT || c4.operator === \">\" || c4.operator === \">=\";\n hasDomLT = hasDomLT || c4.operator === \"<\" || c4.operator === \"<=\";\n if (gt) {\n if (needDomGTPre) {\n if (c4.semver.prerelease && c4.semver.prerelease.length && c4.semver.major === needDomGTPre.major && c4.semver.minor === needDomGTPre.minor && c4.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false;\n }\n }\n if (c4.operator === \">\" || c4.operator === \">=\") {\n higher = higherGT(gt, c4, options);\n if (higher === c4 && higher !== gt) {\n return false;\n }\n } else if (gt.operator === \">=\" && !satisfies(gt.semver, String(c4), options)) {\n return false;\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c4.semver.prerelease && c4.semver.prerelease.length && c4.semver.major === needDomLTPre.major && c4.semver.minor === needDomLTPre.minor && c4.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false;\n }\n }\n if (c4.operator === \"<\" || c4.operator === \"<=\") {\n lower = lowerLT(lt, c4, options);\n if (lower === c4 && lower !== lt) {\n return false;\n }\n } else if (lt.operator === \"<=\" && !satisfies(lt.semver, String(c4), options)) {\n return false;\n }\n }\n if (!c4.operator && (lt || gt) && gtltComp !== 0) {\n return false;\n }\n }\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false;\n }\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false;\n }\n if (needDomGTPre || needDomLTPre) {\n return false;\n }\n return true;\n };\n var higherGT = (a3, b4, options) => {\n if (!a3) {\n return b4;\n }\n const comp = compare(a3.semver, b4.semver, options);\n return comp > 0 ? a3 : comp < 0 ? b4 : b4.operator === \">\" && a3.operator === \">=\" ? b4 : a3;\n };\n var lowerLT = (a3, b4, options) => {\n if (!a3) {\n return b4;\n }\n const comp = compare(a3.semver, b4.semver, options);\n return comp < 0 ? a3 : comp > 0 ? b4 : b4.operator === \"<\" && a3.operator === \"<=\" ? b4 : a3;\n };\n module.exports = subset;\n }\n });\n\n // ../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js\n var require_semver2 = __commonJS({\n \"../../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var internalRe = require_re();\n var constants = require_constants();\n var SemVer = require_semver();\n var identifiers = require_identifiers();\n var parse3 = require_parse();\n var valid = require_valid();\n var clean2 = require_clean();\n var inc = require_inc();\n var diff = require_diff();\n var major = require_major();\n var minor = require_minor();\n var patch = require_patch();\n var prerelease = require_prerelease();\n var compare = require_compare();\n var rcompare = require_rcompare();\n var compareLoose = require_compare_loose();\n var compareBuild = require_compare_build();\n var sort = require_sort();\n var rsort = require_rsort();\n var gt = require_gt();\n var lt = require_lt();\n var eq = require_eq();\n var neq = require_neq();\n var gte = require_gte();\n var lte = require_lte();\n var cmp = require_cmp();\n var coerce2 = require_coerce();\n var Comparator = require_comparator();\n var Range = require_range();\n var satisfies = require_satisfies();\n var toComparators = require_to_comparators();\n var maxSatisfying = require_max_satisfying();\n var minSatisfying = require_min_satisfying();\n var minVersion = require_min_version();\n var validRange = require_valid2();\n var outside = require_outside();\n var gtr = require_gtr();\n var ltr = require_ltr();\n var intersects = require_intersects();\n var simplifyRange = require_simplify();\n var subset = require_subset();\n module.exports = {\n parse: parse3,\n valid,\n clean: clean2,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce: coerce2,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers\n };\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/constants.js\n var require_constants2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.VINCENT_TOOL_API_VERSION = void 0;\n exports3.VINCENT_TOOL_API_VERSION = \"2.0.0\";\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/assertSupportedAbilityVersion.js\n var require_assertSupportedAbilityVersion = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/assertSupportedAbilityVersion.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.assertSupportedAbilityVersion = assertSupportedAbilityVersion;\n var semver_1 = require_semver2();\n var constants_1 = require_constants2();\n function assertSupportedAbilityVersion(abilityVersionSemver) {\n if (!abilityVersionSemver) {\n throw new Error(\"Ability version is required\");\n }\n if ((0, semver_1.major)(abilityVersionSemver) !== (0, semver_1.major)(constants_1.VINCENT_TOOL_API_VERSION)) {\n throw new Error(`Ability version ${abilityVersionSemver} is not supported. Current version: ${constants_1.VINCENT_TOOL_API_VERSION}. Major versions must match.`);\n }\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/utils.js\n var require_utils = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.bigintReplacer = void 0;\n var bigintReplacer = (key, value) => {\n return typeof value === \"bigint\" ? value.toString() : value;\n };\n exports3.bigintReplacer = bigintReplacer;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/helpers/resultCreators.js\n var require_resultCreators = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/helpers/resultCreators.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createDenyResult = createDenyResult;\n exports3.createDenyNoResult = createDenyNoResult;\n exports3.createAllowResult = createAllowResult;\n exports3.createAllowEvaluationResult = createAllowEvaluationResult;\n exports3.createDenyEvaluationResult = createDenyEvaluationResult;\n exports3.wrapAllow = wrapAllow;\n exports3.wrapDeny = wrapDeny;\n exports3.returnNoResultDeny = returnNoResultDeny;\n exports3.isTypedAllowResponse = isTypedAllowResponse;\n function createDenyResult(params) {\n if (params.result === void 0) {\n return {\n allow: false,\n runtimeError: params.runtimeError,\n result: void 0,\n ...params.schemaValidationError ? { schemaValidationError: params.schemaValidationError } : {}\n };\n }\n return {\n allow: false,\n runtimeError: params.runtimeError,\n result: params.result,\n ...params.schemaValidationError ? { schemaValidationError: params.schemaValidationError } : {}\n };\n }\n function createDenyNoResult(runtimeError, schemaValidationError) {\n return createDenyResult({ runtimeError, schemaValidationError });\n }\n function createAllowResult(params) {\n if (params.result === void 0) {\n return {\n allow: true,\n result: void 0\n };\n }\n return {\n allow: true,\n result: params.result\n };\n }\n function createAllowEvaluationResult(params) {\n return {\n allow: true,\n evaluatedPolicies: params.evaluatedPolicies,\n allowedPolicies: params.allowedPolicies,\n deniedPolicy: void 0\n // important for union discrimination\n };\n }\n function createDenyEvaluationResult(params) {\n return {\n allow: false,\n evaluatedPolicies: params.evaluatedPolicies,\n allowedPolicies: params.allowedPolicies,\n deniedPolicy: params.deniedPolicy\n };\n }\n function wrapAllow(value) {\n return createAllowResult({ result: value });\n }\n function wrapDeny(runtimeError, result, schemaValidationError) {\n return createDenyResult({ runtimeError, result, schemaValidationError });\n }\n function returnNoResultDeny(runtimeError, schemaValidationError) {\n return createDenyNoResult(runtimeError, schemaValidationError);\n }\n function isTypedAllowResponse(val) {\n return typeof val === \"object\" && val !== null && val.allow === true;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/helpers/typeGuards.js\n var require_typeGuards = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/helpers/typeGuards.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.isZodValidationDenyResult = isZodValidationDenyResult;\n exports3.isPolicyDenyResponse = isPolicyDenyResponse;\n exports3.isPolicyAllowResponse = isPolicyAllowResponse;\n exports3.isPolicyResponse = isPolicyResponse;\n function isZodValidationDenyResult(result) {\n return typeof result === \"object\" && result !== null && \"zodError\" in result;\n }\n function isPolicyDenyResponse(val) {\n return typeof val === \"object\" && val !== null && val.allow === false;\n }\n function isPolicyAllowResponse(val) {\n return typeof val === \"object\" && val !== null && val.allow === true;\n }\n function isPolicyResponse(value) {\n return typeof value === \"object\" && value !== null && \"allow\" in value && typeof value.allow === \"boolean\";\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/helpers/zod.js\n var require_zod = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/helpers/zod.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PolicyResponseShape = void 0;\n exports3.validateOrDeny = validateOrDeny;\n exports3.getValidatedParamsOrDeny = getValidatedParamsOrDeny;\n exports3.getSchemaForPolicyResponseResult = getSchemaForPolicyResponseResult;\n var zod_1 = require_cjs();\n var utils_1 = require_utils();\n var resultCreators_1 = require_resultCreators();\n var typeGuards_1 = require_typeGuards();\n exports3.PolicyResponseShape = zod_1.z.object({\n allow: zod_1.z.boolean(),\n result: zod_1.z.unknown()\n });\n function validateOrDeny(value, schema, phase, stage) {\n const parsed = schema.safeParse(value);\n if (!parsed.success) {\n const descriptor = stage === \"input\" ? \"parameters\" : \"result\";\n const message2 = `Invalid ${phase} ${descriptor}.`;\n return (0, resultCreators_1.createDenyResult)({\n runtimeError: message2,\n schemaValidationError: {\n zodError: parsed.error,\n phase,\n stage\n }\n });\n }\n return parsed.data;\n }\n function getValidatedParamsOrDeny({ rawAbilityParams, rawUserParams, abilityParamsSchema: abilityParamsSchema2, userParamsSchema, phase }) {\n const abilityParams2 = validateOrDeny(rawAbilityParams, abilityParamsSchema2, phase, \"input\");\n if ((0, typeGuards_1.isPolicyDenyResponse)(abilityParams2)) {\n return abilityParams2;\n }\n const userParams = validateOrDeny(rawUserParams, userParamsSchema, phase, \"input\");\n if ((0, typeGuards_1.isPolicyDenyResponse)(userParams)) {\n return userParams;\n }\n return {\n abilityParams: abilityParams2,\n userParams\n };\n }\n function getSchemaForPolicyResponseResult({ value, allowResultSchema, denyResultSchema }) {\n if (!(0, typeGuards_1.isPolicyResponse)(value)) {\n console.log(\"getSchemaForPolicyResponseResult !isPolicyResponse\", JSON.stringify(value, utils_1.bigintReplacer));\n return {\n schemaToUse: exports3.PolicyResponseShape,\n parsedType: \"unknown\"\n };\n }\n console.log(\"getSchemaForPolicyResponseResult value is\", JSON.stringify(value, utils_1.bigintReplacer));\n return {\n schemaToUse: value.allow ? allowResultSchema : denyResultSchema,\n parsedType: value.allow ? \"allow\" : \"deny\"\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/helpers/index.js\n var require_helpers = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/helpers/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getSchemaForPolicyResponseResult = exports3.getValidatedParamsOrDeny = exports3.validateOrDeny = exports3.isPolicyDenyResponse = exports3.isPolicyAllowResponse = exports3.isPolicyResponse = exports3.createDenyResult = void 0;\n var resultCreators_1 = require_resultCreators();\n Object.defineProperty(exports3, \"createDenyResult\", { enumerable: true, get: function() {\n return resultCreators_1.createDenyResult;\n } });\n var typeGuards_1 = require_typeGuards();\n Object.defineProperty(exports3, \"isPolicyResponse\", { enumerable: true, get: function() {\n return typeGuards_1.isPolicyResponse;\n } });\n Object.defineProperty(exports3, \"isPolicyAllowResponse\", { enumerable: true, get: function() {\n return typeGuards_1.isPolicyAllowResponse;\n } });\n Object.defineProperty(exports3, \"isPolicyDenyResponse\", { enumerable: true, get: function() {\n return typeGuards_1.isPolicyDenyResponse;\n } });\n var zod_1 = require_zod();\n Object.defineProperty(exports3, \"validateOrDeny\", { enumerable: true, get: function() {\n return zod_1.validateOrDeny;\n } });\n Object.defineProperty(exports3, \"getValidatedParamsOrDeny\", { enumerable: true, get: function() {\n return zod_1.getValidatedParamsOrDeny;\n } });\n var zod_2 = require_zod();\n Object.defineProperty(exports3, \"getSchemaForPolicyResponseResult\", { enumerable: true, get: function() {\n return zod_2.getSchemaForPolicyResponseResult;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/policyConfig/context/resultCreators.js\n var require_resultCreators2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/policyConfig/context/resultCreators.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createAllow = createAllow;\n exports3.createAllowNoResult = createAllowNoResult;\n exports3.createDeny = createDeny;\n exports3.createDenyNoResult = createDenyNoResult;\n function createAllow(result) {\n return {\n allow: true,\n result\n };\n }\n function createAllowNoResult() {\n return {\n allow: true\n };\n }\n function createDeny(result) {\n return {\n allow: false,\n result\n };\n }\n function createDenyNoResult() {\n return {\n allow: false,\n result: void 0\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/policyConfig/context/policyConfigContext.js\n var require_policyConfigContext = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/policyConfig/context/policyConfigContext.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createPolicyContext = createPolicyContext;\n var resultCreators_1 = require_resultCreators2();\n function createPolicyContext({ baseContext }) {\n return {\n ...baseContext,\n allow: resultCreators_1.createAllow,\n deny: resultCreators_1.createDeny\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/vincentPolicy.js\n var require_vincentPolicy = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/vincentPolicy.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createVincentPolicy = createVincentPolicy;\n exports3.createVincentAbilityPolicy = createVincentAbilityPolicy;\n var zod_1 = require_cjs();\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n var utils_1 = require_utils();\n var helpers_1 = require_helpers();\n var resultCreators_1 = require_resultCreators();\n var policyConfigContext_1 = require_policyConfigContext();\n function createVincentPolicy(PolicyConfig) {\n if (PolicyConfig.commitParamsSchema && !PolicyConfig.commit) {\n throw new Error(\"Policy defines commitParamsSchema but is missing commit function\");\n }\n const userParamsSchema = PolicyConfig.userParamsSchema ?? zod_1.z.undefined();\n const evalAllowSchema = PolicyConfig.evalAllowResultSchema ?? zod_1.z.undefined();\n const evalDenySchema = PolicyConfig.evalDenyResultSchema ?? zod_1.z.undefined();\n const evaluate = async (args, baseContext) => {\n try {\n const context2 = (0, policyConfigContext_1.createPolicyContext)({\n baseContext\n });\n const paramsOrDeny = (0, helpers_1.getValidatedParamsOrDeny)({\n rawAbilityParams: args.abilityParams,\n rawUserParams: args.userParams,\n abilityParamsSchema: PolicyConfig.abilityParamsSchema,\n userParamsSchema,\n phase: \"evaluate\"\n });\n if ((0, helpers_1.isPolicyDenyResponse)(paramsOrDeny)) {\n return paramsOrDeny;\n }\n const { abilityParams: abilityParams2, userParams } = paramsOrDeny;\n const result = await PolicyConfig.evaluate({ abilityParams: abilityParams2, userParams }, context2);\n const { schemaToUse } = (0, helpers_1.getSchemaForPolicyResponseResult)({\n value: result,\n allowResultSchema: evalAllowSchema,\n denyResultSchema: evalDenySchema\n });\n const resultOrDeny = (0, helpers_1.validateOrDeny)(result.result, schemaToUse, \"evaluate\", \"output\");\n if ((0, helpers_1.isPolicyDenyResponse)(resultOrDeny)) {\n return resultOrDeny;\n }\n if ((0, helpers_1.isPolicyDenyResponse)(result)) {\n return (0, helpers_1.createDenyResult)({\n result: resultOrDeny\n });\n }\n return (0, resultCreators_1.wrapAllow)(resultOrDeny);\n } catch (err) {\n return (0, resultCreators_1.returnNoResultDeny)(err instanceof Error ? err.message : \"Unknown error\");\n }\n };\n const precheckAllowSchema = PolicyConfig.precheckAllowResultSchema ?? zod_1.z.undefined();\n const precheckDenySchema = PolicyConfig.precheckDenyResultSchema ?? zod_1.z.undefined();\n const precheck = PolicyConfig.precheck ? async (args, baseContext) => {\n try {\n const context2 = (0, policyConfigContext_1.createPolicyContext)({\n baseContext\n });\n const { precheck: precheckFn } = PolicyConfig;\n if (!precheckFn) {\n throw new Error(\"precheck function unexpectedly missing\");\n }\n const paramsOrDeny = (0, helpers_1.getValidatedParamsOrDeny)({\n rawAbilityParams: args.abilityParams,\n rawUserParams: args.userParams,\n abilityParamsSchema: PolicyConfig.abilityParamsSchema,\n userParamsSchema,\n phase: \"precheck\"\n });\n if ((0, helpers_1.isPolicyDenyResponse)(paramsOrDeny)) {\n return paramsOrDeny;\n }\n const result = await precheckFn(args, context2);\n const { schemaToUse } = (0, helpers_1.getSchemaForPolicyResponseResult)({\n value: result,\n allowResultSchema: precheckAllowSchema,\n denyResultSchema: precheckDenySchema\n });\n const resultOrDeny = (0, helpers_1.validateOrDeny)(result.result, schemaToUse, \"precheck\", \"output\");\n if ((0, helpers_1.isPolicyDenyResponse)(resultOrDeny)) {\n return resultOrDeny;\n }\n if ((0, helpers_1.isPolicyDenyResponse)(result)) {\n return (0, helpers_1.createDenyResult)({\n result: resultOrDeny\n });\n }\n return (0, resultCreators_1.createAllowResult)({ result: resultOrDeny });\n } catch (err) {\n return (0, resultCreators_1.createDenyNoResult)(err instanceof Error ? err.message : \"Unknown error\");\n }\n } : void 0;\n const commitAllowSchema = PolicyConfig.commitAllowResultSchema ?? zod_1.z.undefined();\n const commitDenySchema = PolicyConfig.commitDenyResultSchema ?? zod_1.z.undefined();\n const commitParamsSchema = PolicyConfig.commitParamsSchema ?? zod_1.z.undefined();\n const commit = PolicyConfig.commit ? async (args, baseContext) => {\n try {\n const context2 = (0, policyConfigContext_1.createPolicyContext)({\n baseContext\n });\n const { commit: commitFn } = PolicyConfig;\n if (!commitFn) {\n throw new Error(\"commit function unexpectedly missing\");\n }\n console.log(\"commit\", JSON.stringify({ args, context: context2 }, utils_1.bigintReplacer, 2));\n const paramsOrDeny = (0, helpers_1.validateOrDeny)(args, commitParamsSchema, \"commit\", \"input\");\n if ((0, helpers_1.isPolicyDenyResponse)(paramsOrDeny)) {\n return paramsOrDeny;\n }\n const result = await commitFn(args, context2);\n const { schemaToUse } = (0, helpers_1.getSchemaForPolicyResponseResult)({\n value: result,\n allowResultSchema: commitAllowSchema,\n denyResultSchema: commitDenySchema\n });\n const resultOrDeny = (0, helpers_1.validateOrDeny)(result.result, schemaToUse, \"commit\", \"output\");\n if ((0, helpers_1.isPolicyDenyResponse)(resultOrDeny)) {\n return resultOrDeny;\n }\n if ((0, helpers_1.isPolicyDenyResponse)(result)) {\n return (0, helpers_1.createDenyResult)({\n result: resultOrDeny\n });\n }\n return (0, resultCreators_1.createAllowResult)({ result: resultOrDeny });\n } catch (err) {\n return (0, resultCreators_1.createDenyNoResult)(err instanceof Error ? err.message : \"Unknown error\");\n }\n } : void 0;\n const vincentPolicy = {\n ...PolicyConfig,\n evaluate,\n precheck,\n commit\n };\n return vincentPolicy;\n }\n function createVincentAbilityPolicy(config2) {\n const { bundledVincentPolicy: { vincentPolicy, ipfsCid, vincentAbilityApiVersion: vincentAbilityApiVersion2 } } = config2;\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion2);\n const result = {\n vincentPolicy,\n ipfsCid,\n vincentAbilityApiVersion: vincentAbilityApiVersion2,\n abilityParameterMappings: config2.abilityParameterMappings,\n // Explicitly include schema types in the returned object for type inference\n /** @hidden */\n __schemaTypes: {\n policyAbilityParamsSchema: vincentPolicy.abilityParamsSchema,\n userParamsSchema: vincentPolicy.userParamsSchema,\n evalAllowResultSchema: vincentPolicy.evalAllowResultSchema,\n evalDenyResultSchema: vincentPolicy.evalDenyResultSchema,\n commitParamsSchema: vincentPolicy.commitParamsSchema,\n precheckAllowResultSchema: vincentPolicy.precheckAllowResultSchema,\n precheckDenyResultSchema: vincentPolicy.precheckDenyResultSchema,\n commitAllowResultSchema: vincentPolicy.commitAllowResultSchema,\n commitDenyResultSchema: vincentPolicy.commitDenyResultSchema,\n // Explicit function types\n evaluate: vincentPolicy.evaluate,\n precheck: vincentPolicy.precheck,\n commit: vincentPolicy.commit\n }\n };\n return result;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/types.js\n var require_types2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/types.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.YouMustCallContextSucceedOrFail = void 0;\n exports3.YouMustCallContextSucceedOrFail = Symbol(\"ExecuteAbilityResult must come from context.succeed() or context.fail()\");\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/resultCreators.js\n var require_resultCreators3 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/resultCreators.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createSuccess = createSuccess;\n exports3.createSuccessNoResult = createSuccessNoResult;\n exports3.createFailure = createFailure;\n exports3.createFailureNoResult = createFailureNoResult;\n var types_1 = require_types2();\n function createSuccess(result) {\n return {\n success: true,\n result,\n [types_1.YouMustCallContextSucceedOrFail]: \"AbilityResult\"\n };\n }\n function createSuccessNoResult() {\n return {\n success: true,\n [types_1.YouMustCallContextSucceedOrFail]: \"AbilityResult\"\n };\n }\n function createFailure(result) {\n return {\n success: false,\n result,\n [types_1.YouMustCallContextSucceedOrFail]: \"AbilityResult\"\n };\n }\n function createFailureNoResult() {\n return {\n success: false,\n result: void 0,\n [types_1.YouMustCallContextSucceedOrFail]: \"AbilityResult\"\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/abilityContext.js\n var require_abilityContext = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/abilityConfig/context/abilityContext.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createExecutionAbilityContext = createExecutionAbilityContext;\n exports3.createPrecheckAbilityContext = createPrecheckAbilityContext;\n var resultCreators_1 = require_resultCreators3();\n function createExecutionAbilityContext(params) {\n const { baseContext, policiesByPackageName } = params;\n const allowedPolicies = {};\n for (const key of Object.keys(policiesByPackageName)) {\n const k4 = key;\n const entry = baseContext.policiesContext.allowedPolicies[k4];\n if (!entry)\n continue;\n allowedPolicies[k4] = {\n ...entry\n };\n }\n const upgradedPoliciesContext = {\n evaluatedPolicies: baseContext.policiesContext.evaluatedPolicies,\n allow: true,\n deniedPolicy: void 0,\n allowedPolicies\n };\n return {\n ...baseContext,\n policiesContext: upgradedPoliciesContext,\n succeed: resultCreators_1.createSuccess,\n fail: resultCreators_1.createFailure\n };\n }\n function createPrecheckAbilityContext(params) {\n const { baseContext } = params;\n return {\n ...baseContext,\n succeed: resultCreators_1.createSuccess,\n fail: resultCreators_1.createFailure\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/resultCreators.js\n var require_resultCreators4 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/resultCreators.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createAbilitySuccessResult = createAbilitySuccessResult;\n exports3.createAbilityFailureResult = createAbilityFailureResult;\n exports3.createAbilityFailureNoResult = createAbilityFailureNoResult;\n exports3.wrapFailure = wrapFailure;\n exports3.wrapNoResultFailure = wrapNoResultFailure;\n exports3.wrapSuccess = wrapSuccess;\n exports3.wrapNoResultSuccess = wrapNoResultSuccess;\n function createAbilitySuccessResult(args) {\n if (!args || args.result === void 0) {\n return { success: true };\n }\n return { success: true, result: args.result };\n }\n function createAbilityFailureResult({ runtimeError, result, schemaValidationError }) {\n if (result === void 0) {\n return {\n success: false,\n runtimeError,\n result: void 0,\n ...schemaValidationError ? { schemaValidationError } : {}\n };\n }\n return {\n success: false,\n runtimeError,\n result,\n ...schemaValidationError ? { schemaValidationError } : {}\n };\n }\n function createAbilityFailureNoResult(runtimeError, schemaValidationError) {\n return createAbilityFailureResult({ runtimeError, schemaValidationError });\n }\n function wrapFailure(value, runtimeError, schemaValidationError) {\n return createAbilityFailureResult({ result: value, runtimeError, schemaValidationError });\n }\n function wrapNoResultFailure(runtimeError, schemaValidationError) {\n return createAbilityFailureNoResult(runtimeError, schemaValidationError);\n }\n function wrapSuccess(value) {\n return createAbilitySuccessResult({ result: value });\n }\n function wrapNoResultSuccess() {\n return createAbilitySuccessResult();\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/typeGuards.js\n var require_typeGuards2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/typeGuards.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.isAbilitySuccessResult = isAbilitySuccessResult;\n exports3.isAbilityFailureResult = isAbilityFailureResult;\n exports3.isAbilityResult = isAbilityResult;\n function isAbilitySuccessResult(value) {\n return typeof value === \"object\" && value !== null && \"success\" in value && value.success === true;\n }\n function isAbilityFailureResult(value) {\n return typeof value === \"object\" && value !== null && \"success\" in value && value.success === false;\n }\n function isAbilityResult(value) {\n return typeof value === \"object\" && value !== null && \"success\" in value && typeof value.success === \"boolean\";\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/zod.js\n var require_zod2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/zod.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AbilityResultShape = void 0;\n exports3.validateOrFail = validateOrFail;\n exports3.getSchemaForAbilityResult = getSchemaForAbilityResult;\n var zod_1 = require_cjs();\n var resultCreators_1 = require_resultCreators4();\n var typeGuards_1 = require_typeGuards2();\n exports3.AbilityResultShape = zod_1.z.object({\n success: zod_1.z.boolean(),\n result: zod_1.z.unknown()\n });\n var mustBeUndefinedSchema = zod_1.z.undefined();\n function validateOrFail(value, schema, phase, stage) {\n const effectiveSchema = schema ?? mustBeUndefinedSchema;\n const parsed = effectiveSchema.safeParse(value);\n if (!parsed.success) {\n const descriptor = stage === \"input\" ? \"parameters\" : \"result\";\n const message2 = `Invalid ${phase} ${descriptor}.`;\n return (0, resultCreators_1.createAbilityFailureResult)({\n runtimeError: message2,\n schemaValidationError: {\n zodError: parsed.error,\n phase,\n stage\n }\n });\n }\n return parsed.data;\n }\n function getSchemaForAbilityResult({ value, successResultSchema, failureResultSchema }) {\n if (!(0, typeGuards_1.isAbilityResult)(value)) {\n return {\n schemaToUse: exports3.AbilityResultShape,\n parsedType: \"unknown\"\n };\n }\n const schemaToUse = value.success ? successResultSchema ?? zod_1.z.undefined() : failureResultSchema ?? zod_1.z.undefined();\n return {\n schemaToUse,\n parsedType: value.success ? \"success\" : \"failure\"\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/vincentAbility.js\n var require_vincentAbility = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/vincentAbility.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createVincentAbility = createVincentAbility2;\n var zod_1 = require_cjs();\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n var constants_1 = require_constants2();\n var utils_1 = require_utils();\n var abilityContext_1 = require_abilityContext();\n var resultCreators_1 = require_resultCreators4();\n var typeGuards_1 = require_typeGuards2();\n var zod_2 = require_zod2();\n function createVincentAbility2(AbilityConfig) {\n const { policyByPackageName, policyByIpfsCid } = AbilityConfig.supportedPolicies;\n for (const policyId in policyByIpfsCid) {\n const policy = policyByIpfsCid[policyId];\n const { vincentAbilityApiVersion: vincentAbilityApiVersion2 } = policy;\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion2);\n }\n const executeSuccessSchema2 = AbilityConfig.executeSuccessSchema ?? zod_1.z.undefined();\n const executeFailSchema2 = AbilityConfig.executeFailSchema ?? zod_1.z.undefined();\n const execute = async ({ abilityParams: abilityParams2 }, baseAbilityContext) => {\n try {\n const context2 = (0, abilityContext_1.createExecutionAbilityContext)({\n baseContext: baseAbilityContext,\n policiesByPackageName: policyByPackageName\n });\n const parsedAbilityParams = (0, zod_2.validateOrFail)(abilityParams2, AbilityConfig.abilityParamsSchema, \"execute\", \"input\");\n if ((0, typeGuards_1.isAbilityFailureResult)(parsedAbilityParams)) {\n return parsedAbilityParams;\n }\n const result = await AbilityConfig.execute({ abilityParams: parsedAbilityParams }, {\n ...context2,\n policiesContext: { ...context2.policiesContext, allow: true }\n });\n console.log(\"AbilityConfig execute result\", JSON.stringify(result, utils_1.bigintReplacer));\n const { schemaToUse } = (0, zod_2.getSchemaForAbilityResult)({\n value: result,\n successResultSchema: executeSuccessSchema2,\n failureResultSchema: executeFailSchema2\n });\n const resultOrFailure = (0, zod_2.validateOrFail)(result.result, schemaToUse, \"execute\", \"output\");\n if ((0, typeGuards_1.isAbilityFailureResult)(resultOrFailure)) {\n return resultOrFailure;\n }\n if ((0, typeGuards_1.isAbilityFailureResult)(result)) {\n return (0, resultCreators_1.wrapFailure)(resultOrFailure);\n }\n return (0, resultCreators_1.wrapSuccess)(resultOrFailure);\n } catch (err) {\n return (0, resultCreators_1.wrapNoResultFailure)(err instanceof Error ? err.message : \"Unknown error\");\n }\n };\n const precheckSuccessSchema = AbilityConfig.precheckSuccessSchema ?? zod_1.z.undefined();\n const precheckFailSchema2 = AbilityConfig.precheckFailSchema ?? zod_1.z.undefined();\n const { precheck: precheckFn } = AbilityConfig;\n const precheck = precheckFn ? async ({ abilityParams: abilityParams2 }, baseAbilityContext) => {\n try {\n const context2 = (0, abilityContext_1.createPrecheckAbilityContext)({\n baseContext: baseAbilityContext\n });\n const parsedAbilityParams = (0, zod_2.validateOrFail)(abilityParams2, AbilityConfig.abilityParamsSchema, \"precheck\", \"input\");\n if ((0, typeGuards_1.isAbilityFailureResult)(parsedAbilityParams)) {\n return parsedAbilityParams;\n }\n const result = await precheckFn({ abilityParams: abilityParams2 }, context2);\n console.log(\"AbilityConfig precheck result\", JSON.stringify(result, utils_1.bigintReplacer));\n const { schemaToUse } = (0, zod_2.getSchemaForAbilityResult)({\n value: result,\n successResultSchema: precheckSuccessSchema,\n failureResultSchema: precheckFailSchema2\n });\n const resultOrFailure = (0, zod_2.validateOrFail)(result.result, schemaToUse, \"precheck\", \"output\");\n if ((0, typeGuards_1.isAbilityFailureResult)(resultOrFailure)) {\n return resultOrFailure;\n }\n if ((0, typeGuards_1.isAbilityFailureResult)(result)) {\n return (0, resultCreators_1.wrapFailure)(resultOrFailure, result.runtimeError);\n }\n return (0, resultCreators_1.wrapSuccess)(resultOrFailure);\n } catch (err) {\n return (0, resultCreators_1.wrapNoResultFailure)(err instanceof Error ? err.message : \"Unknown error\");\n }\n } : void 0;\n return {\n packageName: AbilityConfig.packageName,\n vincentAbilityApiVersion: constants_1.VINCENT_TOOL_API_VERSION,\n abilityDescription: AbilityConfig.abilityDescription,\n execute,\n precheck,\n supportedPolicies: AbilityConfig.supportedPolicies,\n policyByPackageName,\n abilityParamsSchema: AbilityConfig.abilityParamsSchema,\n /** @hidden */\n __schemaTypes: {\n precheckSuccessSchema: AbilityConfig.precheckSuccessSchema,\n precheckFailSchema: AbilityConfig.precheckFailSchema,\n executeSuccessSchema: AbilityConfig.executeSuccessSchema,\n executeFailSchema: AbilityConfig.executeFailSchema\n }\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/bn.js@5.2.2/node_modules/bn.js/lib/bn.js\n var require_bn = __commonJS({\n \"../../../node_modules/.pnpm/bn.js@5.2.2/node_modules/bn.js/lib/bn.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(module2, exports4) {\n \"use strict\";\n function assert9(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {\n };\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n function BN(number, base4, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n this.negative = 0;\n this.words = null;\n this.length = 0;\n this.red = null;\n if (number !== null) {\n if (base4 === \"le\" || base4 === \"be\") {\n endian = base4;\n base4 = 10;\n }\n this._init(number || 0, base4 || 10, endian || \"be\");\n }\n }\n if (typeof module2 === \"object\") {\n module2.exports = BN;\n } else {\n exports4.BN = BN;\n }\n BN.BN = BN;\n BN.wordSize = 26;\n var Buffer3;\n try {\n if (typeof window !== \"undefined\" && typeof window.Buffer !== \"undefined\") {\n Buffer3 = window.Buffer;\n } else {\n Buffer3 = (init_buffer(), __toCommonJS(buffer_exports)).Buffer;\n }\n } catch (e2) {\n }\n BN.isBN = function isBN(num2) {\n if (num2 instanceof BN) {\n return true;\n }\n return num2 !== null && typeof num2 === \"object\" && num2.constructor.wordSize === BN.wordSize && Array.isArray(num2.words);\n };\n BN.max = function max(left, right) {\n if (left.cmp(right) > 0)\n return left;\n return right;\n };\n BN.min = function min(left, right) {\n if (left.cmp(right) < 0)\n return left;\n return right;\n };\n BN.prototype._init = function init(number, base4, endian) {\n if (typeof number === \"number\") {\n return this._initNumber(number, base4, endian);\n }\n if (typeof number === \"object\") {\n return this._initArray(number, base4, endian);\n }\n if (base4 === \"hex\") {\n base4 = 16;\n }\n assert9(base4 === (base4 | 0) && base4 >= 2 && base4 <= 36);\n number = number.toString().replace(/\\s+/g, \"\");\n var start = 0;\n if (number[0] === \"-\") {\n start++;\n this.negative = 1;\n }\n if (start < number.length) {\n if (base4 === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base4, start);\n if (endian === \"le\") {\n this._initArray(this.toArray(), base4, endian);\n }\n }\n }\n };\n BN.prototype._initNumber = function _initNumber(number, base4, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 67108864) {\n this.words = [number & 67108863];\n this.length = 1;\n } else if (number < 4503599627370496) {\n this.words = [\n number & 67108863,\n number / 67108864 & 67108863\n ];\n this.length = 2;\n } else {\n assert9(number < 9007199254740992);\n this.words = [\n number & 67108863,\n number / 67108864 & 67108863,\n 1\n ];\n this.length = 3;\n }\n if (endian !== \"le\")\n return;\n this._initArray(this.toArray(), base4, endian);\n };\n BN.prototype._initArray = function _initArray(number, base4, endian) {\n assert9(typeof number.length === \"number\");\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = 0;\n }\n var j2, w3;\n var off2 = 0;\n if (endian === \"be\") {\n for (i3 = number.length - 1, j2 = 0; i3 >= 0; i3 -= 3) {\n w3 = number[i3] | number[i3 - 1] << 8 | number[i3 - 2] << 16;\n this.words[j2] |= w3 << off2 & 67108863;\n this.words[j2 + 1] = w3 >>> 26 - off2 & 67108863;\n off2 += 24;\n if (off2 >= 26) {\n off2 -= 26;\n j2++;\n }\n }\n } else if (endian === \"le\") {\n for (i3 = 0, j2 = 0; i3 < number.length; i3 += 3) {\n w3 = number[i3] | number[i3 + 1] << 8 | number[i3 + 2] << 16;\n this.words[j2] |= w3 << off2 & 67108863;\n this.words[j2 + 1] = w3 >>> 26 - off2 & 67108863;\n off2 += 24;\n if (off2 >= 26) {\n off2 -= 26;\n j2++;\n }\n }\n }\n return this._strip();\n };\n function parseHex4Bits(string, index2) {\n var c4 = string.charCodeAt(index2);\n if (c4 >= 48 && c4 <= 57) {\n return c4 - 48;\n } else if (c4 >= 65 && c4 <= 70) {\n return c4 - 55;\n } else if (c4 >= 97 && c4 <= 102) {\n return c4 - 87;\n } else {\n assert9(false, \"Invalid character in \" + string);\n }\n }\n function parseHexByte(string, lowerBound, index2) {\n var r2 = parseHex4Bits(string, index2);\n if (index2 - 1 >= lowerBound) {\n r2 |= parseHex4Bits(string, index2 - 1) << 4;\n }\n return r2;\n }\n BN.prototype._parseHex = function _parseHex(number, start, endian) {\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = 0;\n }\n var off2 = 0;\n var j2 = 0;\n var w3;\n if (endian === \"be\") {\n for (i3 = number.length - 1; i3 >= start; i3 -= 2) {\n w3 = parseHexByte(number, start, i3) << off2;\n this.words[j2] |= w3 & 67108863;\n if (off2 >= 18) {\n off2 -= 18;\n j2 += 1;\n this.words[j2] |= w3 >>> 26;\n } else {\n off2 += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i3 = parseLength % 2 === 0 ? start + 1 : start; i3 < number.length; i3 += 2) {\n w3 = parseHexByte(number, start, i3) << off2;\n this.words[j2] |= w3 & 67108863;\n if (off2 >= 18) {\n off2 -= 18;\n j2 += 1;\n this.words[j2] |= w3 >>> 26;\n } else {\n off2 += 8;\n }\n }\n }\n this._strip();\n };\n function parseBase(str, start, end, mul) {\n var r2 = 0;\n var b4 = 0;\n var len = Math.min(str.length, end);\n for (var i3 = start; i3 < len; i3++) {\n var c4 = str.charCodeAt(i3) - 48;\n r2 *= mul;\n if (c4 >= 49) {\n b4 = c4 - 49 + 10;\n } else if (c4 >= 17) {\n b4 = c4 - 17 + 10;\n } else {\n b4 = c4;\n }\n assert9(c4 >= 0 && b4 < mul, \"Invalid character\");\n r2 += b4;\n }\n return r2;\n }\n BN.prototype._parseBase = function _parseBase(number, base4, start) {\n this.words = [0];\n this.length = 1;\n for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base4) {\n limbLen++;\n }\n limbLen--;\n limbPow = limbPow / base4 | 0;\n var total = number.length - start;\n var mod3 = total % limbLen;\n var end = Math.min(total, total - mod3) + start;\n var word = 0;\n for (var i3 = start; i3 < end; i3 += limbLen) {\n word = parseBase(number, i3, i3 + limbLen, base4);\n this.imuln(limbPow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n if (mod3 !== 0) {\n var pow = 1;\n word = parseBase(number, i3, number.length, base4);\n for (i3 = 0; i3 < mod3; i3++) {\n pow *= base4;\n }\n this.imuln(pow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n this._strip();\n };\n BN.prototype.copy = function copy(dest) {\n dest.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n dest.words[i3] = this.words[i3];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n function move(dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n BN.prototype._move = function _move(dest) {\n move(dest, this);\n };\n BN.prototype.clone = function clone2() {\n var r2 = new BN(null);\n this.copy(r2);\n return r2;\n };\n BN.prototype._expand = function _expand(size6) {\n while (this.length < size6) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n BN.prototype._strip = function strip() {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n BN.prototype._normSign = function _normSign() {\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n if (typeof Symbol !== \"undefined\" && typeof Symbol.for === \"function\") {\n try {\n BN.prototype[Symbol.for(\"nodejs.util.inspect.custom\")] = inspect;\n } catch (e2) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n function inspect() {\n return (this.red ? \"\";\n }\n var zeros = [\n \"\",\n \"0\",\n \"00\",\n \"000\",\n \"0000\",\n \"00000\",\n \"000000\",\n \"0000000\",\n \"00000000\",\n \"000000000\",\n \"0000000000\",\n \"00000000000\",\n \"000000000000\",\n \"0000000000000\",\n \"00000000000000\",\n \"000000000000000\",\n \"0000000000000000\",\n \"00000000000000000\",\n \"000000000000000000\",\n \"0000000000000000000\",\n \"00000000000000000000\",\n \"000000000000000000000\",\n \"0000000000000000000000\",\n \"00000000000000000000000\",\n \"000000000000000000000000\",\n \"0000000000000000000000000\"\n ];\n var groupSizes = [\n 0,\n 0,\n 25,\n 16,\n 12,\n 11,\n 10,\n 9,\n 8,\n 8,\n 7,\n 7,\n 7,\n 7,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5\n ];\n var groupBases = [\n 0,\n 0,\n 33554432,\n 43046721,\n 16777216,\n 48828125,\n 60466176,\n 40353607,\n 16777216,\n 43046721,\n 1e7,\n 19487171,\n 35831808,\n 62748517,\n 7529536,\n 11390625,\n 16777216,\n 24137569,\n 34012224,\n 47045881,\n 64e6,\n 4084101,\n 5153632,\n 6436343,\n 7962624,\n 9765625,\n 11881376,\n 14348907,\n 17210368,\n 20511149,\n 243e5,\n 28629151,\n 33554432,\n 39135393,\n 45435424,\n 52521875,\n 60466176\n ];\n BN.prototype.toString = function toString2(base4, padding) {\n base4 = base4 || 10;\n padding = padding | 0 || 1;\n var out;\n if (base4 === 16 || base4 === \"hex\") {\n out = \"\";\n var off2 = 0;\n var carry = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var w3 = this.words[i3];\n var word = ((w3 << off2 | carry) & 16777215).toString(16);\n carry = w3 >>> 24 - off2 & 16777215;\n off2 += 2;\n if (off2 >= 26) {\n off2 -= 26;\n i3--;\n }\n if (carry !== 0 || i3 !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n if (base4 === (base4 | 0) && base4 >= 2 && base4 <= 36) {\n var groupSize = groupSizes[base4];\n var groupBase = groupBases[base4];\n out = \"\";\n var c4 = this.clone();\n c4.negative = 0;\n while (!c4.isZero()) {\n var r2 = c4.modrn(groupBase).toString(base4);\n c4 = c4.idivn(groupBase);\n if (!c4.isZero()) {\n out = zeros[groupSize - r2.length] + r2 + out;\n } else {\n out = r2 + out;\n }\n }\n if (this.isZero()) {\n out = \"0\" + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n assert9(false, \"Base should be between 2 and 36\");\n };\n BN.prototype.toNumber = function toNumber4() {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 67108864;\n } else if (this.length === 3 && this.words[2] === 1) {\n ret += 4503599627370496 + this.words[1] * 67108864;\n } else if (this.length > 2) {\n assert9(false, \"Number can only safely store up to 53 bits\");\n }\n return this.negative !== 0 ? -ret : ret;\n };\n BN.prototype.toJSON = function toJSON() {\n return this.toString(16, 2);\n };\n if (Buffer3) {\n BN.prototype.toBuffer = function toBuffer(endian, length) {\n return this.toArrayLike(Buffer3, endian, length);\n };\n }\n BN.prototype.toArray = function toArray(endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n var allocate = function allocate2(ArrayType, size6) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size6);\n }\n return new ArrayType(size6);\n };\n BN.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length) {\n this._strip();\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert9(byteLength <= reqLength, \"byte array longer than desired length\");\n assert9(reqLength > 0, \"Requested array length <= 0\");\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === \"le\" ? \"LE\" : \"BE\";\n this[\"_toArrayLike\" + postfix](res, byteLength);\n return res;\n };\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE(res, byteLength) {\n var position = 0;\n var carry = 0;\n for (var i3 = 0, shift = 0; i3 < this.length; i3++) {\n var word = this.words[i3] << shift | carry;\n res[position++] = word & 255;\n if (position < res.length) {\n res[position++] = word >> 8 & 255;\n }\n if (position < res.length) {\n res[position++] = word >> 16 & 255;\n }\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = word >> 24 & 255;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n if (position < res.length) {\n res[position++] = carry;\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE(res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n for (var i3 = 0, shift = 0; i3 < this.length; i3++) {\n var word = this.words[i3] << shift | carry;\n res[position--] = word & 255;\n if (position >= 0) {\n res[position--] = word >> 8 & 255;\n }\n if (position >= 0) {\n res[position--] = word >> 16 & 255;\n }\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = word >> 24 & 255;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n if (position >= 0) {\n res[position--] = carry;\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits(w3) {\n return 32 - Math.clz32(w3);\n };\n } else {\n BN.prototype._countBits = function _countBits(w3) {\n var t3 = w3;\n var r2 = 0;\n if (t3 >= 4096) {\n r2 += 13;\n t3 >>>= 13;\n }\n if (t3 >= 64) {\n r2 += 7;\n t3 >>>= 7;\n }\n if (t3 >= 8) {\n r2 += 4;\n t3 >>>= 4;\n }\n if (t3 >= 2) {\n r2 += 2;\n t3 >>>= 2;\n }\n return r2 + t3;\n };\n }\n BN.prototype._zeroBits = function _zeroBits(w3) {\n if (w3 === 0)\n return 26;\n var t3 = w3;\n var r2 = 0;\n if ((t3 & 8191) === 0) {\n r2 += 13;\n t3 >>>= 13;\n }\n if ((t3 & 127) === 0) {\n r2 += 7;\n t3 >>>= 7;\n }\n if ((t3 & 15) === 0) {\n r2 += 4;\n t3 >>>= 4;\n }\n if ((t3 & 3) === 0) {\n r2 += 2;\n t3 >>>= 2;\n }\n if ((t3 & 1) === 0) {\n r2++;\n }\n return r2;\n };\n BN.prototype.bitLength = function bitLength3() {\n var w3 = this.words[this.length - 1];\n var hi = this._countBits(w3);\n return (this.length - 1) * 26 + hi;\n };\n function toBitArray(num2) {\n var w3 = new Array(num2.bitLength());\n for (var bit = 0; bit < w3.length; bit++) {\n var off2 = bit / 26 | 0;\n var wbit = bit % 26;\n w3[bit] = num2.words[off2] >>> wbit & 1;\n }\n return w3;\n }\n BN.prototype.zeroBits = function zeroBits() {\n if (this.isZero())\n return 0;\n var r2 = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var b4 = this._zeroBits(this.words[i3]);\n r2 += b4;\n if (b4 !== 26)\n break;\n }\n return r2;\n };\n BN.prototype.byteLength = function byteLength() {\n return Math.ceil(this.bitLength() / 8);\n };\n BN.prototype.toTwos = function toTwos(width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n BN.prototype.fromTwos = function fromTwos(width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n BN.prototype.isNeg = function isNeg() {\n return this.negative !== 0;\n };\n BN.prototype.neg = function neg() {\n return this.clone().ineg();\n };\n BN.prototype.ineg = function ineg() {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n return this;\n };\n BN.prototype.iuor = function iuor(num2) {\n while (this.length < num2.length) {\n this.words[this.length++] = 0;\n }\n for (var i3 = 0; i3 < num2.length; i3++) {\n this.words[i3] = this.words[i3] | num2.words[i3];\n }\n return this._strip();\n };\n BN.prototype.ior = function ior(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuor(num2);\n };\n BN.prototype.or = function or(num2) {\n if (this.length > num2.length)\n return this.clone().ior(num2);\n return num2.clone().ior(this);\n };\n BN.prototype.uor = function uor(num2) {\n if (this.length > num2.length)\n return this.clone().iuor(num2);\n return num2.clone().iuor(this);\n };\n BN.prototype.iuand = function iuand(num2) {\n var b4;\n if (this.length > num2.length) {\n b4 = num2;\n } else {\n b4 = this;\n }\n for (var i3 = 0; i3 < b4.length; i3++) {\n this.words[i3] = this.words[i3] & num2.words[i3];\n }\n this.length = b4.length;\n return this._strip();\n };\n BN.prototype.iand = function iand(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuand(num2);\n };\n BN.prototype.and = function and(num2) {\n if (this.length > num2.length)\n return this.clone().iand(num2);\n return num2.clone().iand(this);\n };\n BN.prototype.uand = function uand(num2) {\n if (this.length > num2.length)\n return this.clone().iuand(num2);\n return num2.clone().iuand(this);\n };\n BN.prototype.iuxor = function iuxor(num2) {\n var a3;\n var b4;\n if (this.length > num2.length) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n for (var i3 = 0; i3 < b4.length; i3++) {\n this.words[i3] = a3.words[i3] ^ b4.words[i3];\n }\n if (this !== a3) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n this.length = a3.length;\n return this._strip();\n };\n BN.prototype.ixor = function ixor(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuxor(num2);\n };\n BN.prototype.xor = function xor(num2) {\n if (this.length > num2.length)\n return this.clone().ixor(num2);\n return num2.clone().ixor(this);\n };\n BN.prototype.uxor = function uxor(num2) {\n if (this.length > num2.length)\n return this.clone().iuxor(num2);\n return num2.clone().iuxor(this);\n };\n BN.prototype.inotn = function inotn(width) {\n assert9(typeof width === \"number\" && width >= 0);\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n this._expand(bytesNeeded);\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n for (var i3 = 0; i3 < bytesNeeded; i3++) {\n this.words[i3] = ~this.words[i3] & 67108863;\n }\n if (bitsLeft > 0) {\n this.words[i3] = ~this.words[i3] & 67108863 >> 26 - bitsLeft;\n }\n return this._strip();\n };\n BN.prototype.notn = function notn(width) {\n return this.clone().inotn(width);\n };\n BN.prototype.setn = function setn(bit, val) {\n assert9(typeof bit === \"number\" && bit >= 0);\n var off2 = bit / 26 | 0;\n var wbit = bit % 26;\n this._expand(off2 + 1);\n if (val) {\n this.words[off2] = this.words[off2] | 1 << wbit;\n } else {\n this.words[off2] = this.words[off2] & ~(1 << wbit);\n }\n return this._strip();\n };\n BN.prototype.iadd = function iadd(num2) {\n var r2;\n if (this.negative !== 0 && num2.negative === 0) {\n this.negative = 0;\n r2 = this.isub(num2);\n this.negative ^= 1;\n return this._normSign();\n } else if (this.negative === 0 && num2.negative !== 0) {\n num2.negative = 0;\n r2 = this.isub(num2);\n num2.negative = 1;\n return r2._normSign();\n }\n var a3, b4;\n if (this.length > num2.length) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n var carry = 0;\n for (var i3 = 0; i3 < b4.length; i3++) {\n r2 = (a3.words[i3] | 0) + (b4.words[i3] | 0) + carry;\n this.words[i3] = r2 & 67108863;\n carry = r2 >>> 26;\n }\n for (; carry !== 0 && i3 < a3.length; i3++) {\n r2 = (a3.words[i3] | 0) + carry;\n this.words[i3] = r2 & 67108863;\n carry = r2 >>> 26;\n }\n this.length = a3.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n } else if (a3 !== this) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n return this;\n };\n BN.prototype.add = function add2(num2) {\n var res;\n if (num2.negative !== 0 && this.negative === 0) {\n num2.negative = 0;\n res = this.sub(num2);\n num2.negative ^= 1;\n return res;\n } else if (num2.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num2.sub(this);\n this.negative = 1;\n return res;\n }\n if (this.length > num2.length)\n return this.clone().iadd(num2);\n return num2.clone().iadd(this);\n };\n BN.prototype.isub = function isub(num2) {\n if (num2.negative !== 0) {\n num2.negative = 0;\n var r2 = this.iadd(num2);\n num2.negative = 1;\n return r2._normSign();\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num2);\n this.negative = 1;\n return this._normSign();\n }\n var cmp = this.cmp(num2);\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n var a3, b4;\n if (cmp > 0) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n var carry = 0;\n for (var i3 = 0; i3 < b4.length; i3++) {\n r2 = (a3.words[i3] | 0) - (b4.words[i3] | 0) + carry;\n carry = r2 >> 26;\n this.words[i3] = r2 & 67108863;\n }\n for (; carry !== 0 && i3 < a3.length; i3++) {\n r2 = (a3.words[i3] | 0) + carry;\n carry = r2 >> 26;\n this.words[i3] = r2 & 67108863;\n }\n if (carry === 0 && i3 < a3.length && a3 !== this) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n this.length = Math.max(this.length, i3);\n if (a3 !== this) {\n this.negative = 1;\n }\n return this._strip();\n };\n BN.prototype.sub = function sub(num2) {\n return this.clone().isub(num2);\n };\n function smallMulTo(self2, num2, out) {\n out.negative = num2.negative ^ self2.negative;\n var len = self2.length + num2.length | 0;\n out.length = len;\n len = len - 1 | 0;\n var a3 = self2.words[0] | 0;\n var b4 = num2.words[0] | 0;\n var r2 = a3 * b4;\n var lo = r2 & 67108863;\n var carry = r2 / 67108864 | 0;\n out.words[0] = lo;\n for (var k4 = 1; k4 < len; k4++) {\n var ncarry = carry >>> 26;\n var rword = carry & 67108863;\n var maxJ = Math.min(k4, num2.length - 1);\n for (var j2 = Math.max(0, k4 - self2.length + 1); j2 <= maxJ; j2++) {\n var i3 = k4 - j2 | 0;\n a3 = self2.words[i3] | 0;\n b4 = num2.words[j2] | 0;\n r2 = a3 * b4 + rword;\n ncarry += r2 / 67108864 | 0;\n rword = r2 & 67108863;\n }\n out.words[k4] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k4] = carry | 0;\n } else {\n out.length--;\n }\n return out._strip();\n }\n var comb10MulTo = function comb10MulTo2(self2, num2, out) {\n var a3 = self2.words;\n var b4 = num2.words;\n var o5 = out.words;\n var c4 = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a3[0] | 0;\n var al0 = a0 & 8191;\n var ah0 = a0 >>> 13;\n var a1 = a3[1] | 0;\n var al1 = a1 & 8191;\n var ah1 = a1 >>> 13;\n var a22 = a3[2] | 0;\n var al2 = a22 & 8191;\n var ah2 = a22 >>> 13;\n var a32 = a3[3] | 0;\n var al3 = a32 & 8191;\n var ah3 = a32 >>> 13;\n var a4 = a3[4] | 0;\n var al4 = a4 & 8191;\n var ah4 = a4 >>> 13;\n var a5 = a3[5] | 0;\n var al5 = a5 & 8191;\n var ah5 = a5 >>> 13;\n var a6 = a3[6] | 0;\n var al6 = a6 & 8191;\n var ah6 = a6 >>> 13;\n var a7 = a3[7] | 0;\n var al7 = a7 & 8191;\n var ah7 = a7 >>> 13;\n var a8 = a3[8] | 0;\n var al8 = a8 & 8191;\n var ah8 = a8 >>> 13;\n var a9 = a3[9] | 0;\n var al9 = a9 & 8191;\n var ah9 = a9 >>> 13;\n var b0 = b4[0] | 0;\n var bl0 = b0 & 8191;\n var bh0 = b0 >>> 13;\n var b1 = b4[1] | 0;\n var bl1 = b1 & 8191;\n var bh1 = b1 >>> 13;\n var b22 = b4[2] | 0;\n var bl2 = b22 & 8191;\n var bh2 = b22 >>> 13;\n var b32 = b4[3] | 0;\n var bl3 = b32 & 8191;\n var bh3 = b32 >>> 13;\n var b42 = b4[4] | 0;\n var bl4 = b42 & 8191;\n var bh4 = b42 >>> 13;\n var b5 = b4[5] | 0;\n var bl5 = b5 & 8191;\n var bh5 = b5 >>> 13;\n var b6 = b4[6] | 0;\n var bl6 = b6 & 8191;\n var bh6 = b6 >>> 13;\n var b7 = b4[7] | 0;\n var bl7 = b7 & 8191;\n var bh7 = b7 >>> 13;\n var b8 = b4[8] | 0;\n var bl8 = b8 & 8191;\n var bh8 = b8 >>> 13;\n var b9 = b4[9] | 0;\n var bl9 = b9 & 8191;\n var bh9 = b9 >>> 13;\n out.negative = self2.negative ^ num2.negative;\n out.length = 19;\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = mid + Math.imul(ah0, bl0) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w0 >>> 26) | 0;\n w0 &= 67108863;\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = mid + Math.imul(ah1, bl0) | 0;\n hi = Math.imul(ah1, bh0);\n lo = lo + Math.imul(al0, bl1) | 0;\n mid = mid + Math.imul(al0, bh1) | 0;\n mid = mid + Math.imul(ah0, bl1) | 0;\n hi = hi + Math.imul(ah0, bh1) | 0;\n var w1 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w1 >>> 26) | 0;\n w1 &= 67108863;\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = mid + Math.imul(ah2, bl0) | 0;\n hi = Math.imul(ah2, bh0);\n lo = lo + Math.imul(al1, bl1) | 0;\n mid = mid + Math.imul(al1, bh1) | 0;\n mid = mid + Math.imul(ah1, bl1) | 0;\n hi = hi + Math.imul(ah1, bh1) | 0;\n lo = lo + Math.imul(al0, bl2) | 0;\n mid = mid + Math.imul(al0, bh2) | 0;\n mid = mid + Math.imul(ah0, bl2) | 0;\n hi = hi + Math.imul(ah0, bh2) | 0;\n var w22 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w22 >>> 26) | 0;\n w22 &= 67108863;\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = mid + Math.imul(ah3, bl0) | 0;\n hi = Math.imul(ah3, bh0);\n lo = lo + Math.imul(al2, bl1) | 0;\n mid = mid + Math.imul(al2, bh1) | 0;\n mid = mid + Math.imul(ah2, bl1) | 0;\n hi = hi + Math.imul(ah2, bh1) | 0;\n lo = lo + Math.imul(al1, bl2) | 0;\n mid = mid + Math.imul(al1, bh2) | 0;\n mid = mid + Math.imul(ah1, bl2) | 0;\n hi = hi + Math.imul(ah1, bh2) | 0;\n lo = lo + Math.imul(al0, bl3) | 0;\n mid = mid + Math.imul(al0, bh3) | 0;\n mid = mid + Math.imul(ah0, bl3) | 0;\n hi = hi + Math.imul(ah0, bh3) | 0;\n var w3 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w3 >>> 26) | 0;\n w3 &= 67108863;\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = mid + Math.imul(ah4, bl0) | 0;\n hi = Math.imul(ah4, bh0);\n lo = lo + Math.imul(al3, bl1) | 0;\n mid = mid + Math.imul(al3, bh1) | 0;\n mid = mid + Math.imul(ah3, bl1) | 0;\n hi = hi + Math.imul(ah3, bh1) | 0;\n lo = lo + Math.imul(al2, bl2) | 0;\n mid = mid + Math.imul(al2, bh2) | 0;\n mid = mid + Math.imul(ah2, bl2) | 0;\n hi = hi + Math.imul(ah2, bh2) | 0;\n lo = lo + Math.imul(al1, bl3) | 0;\n mid = mid + Math.imul(al1, bh3) | 0;\n mid = mid + Math.imul(ah1, bl3) | 0;\n hi = hi + Math.imul(ah1, bh3) | 0;\n lo = lo + Math.imul(al0, bl4) | 0;\n mid = mid + Math.imul(al0, bh4) | 0;\n mid = mid + Math.imul(ah0, bl4) | 0;\n hi = hi + Math.imul(ah0, bh4) | 0;\n var w4 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w4 >>> 26) | 0;\n w4 &= 67108863;\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = mid + Math.imul(ah5, bl0) | 0;\n hi = Math.imul(ah5, bh0);\n lo = lo + Math.imul(al4, bl1) | 0;\n mid = mid + Math.imul(al4, bh1) | 0;\n mid = mid + Math.imul(ah4, bl1) | 0;\n hi = hi + Math.imul(ah4, bh1) | 0;\n lo = lo + Math.imul(al3, bl2) | 0;\n mid = mid + Math.imul(al3, bh2) | 0;\n mid = mid + Math.imul(ah3, bl2) | 0;\n hi = hi + Math.imul(ah3, bh2) | 0;\n lo = lo + Math.imul(al2, bl3) | 0;\n mid = mid + Math.imul(al2, bh3) | 0;\n mid = mid + Math.imul(ah2, bl3) | 0;\n hi = hi + Math.imul(ah2, bh3) | 0;\n lo = lo + Math.imul(al1, bl4) | 0;\n mid = mid + Math.imul(al1, bh4) | 0;\n mid = mid + Math.imul(ah1, bl4) | 0;\n hi = hi + Math.imul(ah1, bh4) | 0;\n lo = lo + Math.imul(al0, bl5) | 0;\n mid = mid + Math.imul(al0, bh5) | 0;\n mid = mid + Math.imul(ah0, bl5) | 0;\n hi = hi + Math.imul(ah0, bh5) | 0;\n var w5 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w5 >>> 26) | 0;\n w5 &= 67108863;\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = mid + Math.imul(ah6, bl0) | 0;\n hi = Math.imul(ah6, bh0);\n lo = lo + Math.imul(al5, bl1) | 0;\n mid = mid + Math.imul(al5, bh1) | 0;\n mid = mid + Math.imul(ah5, bl1) | 0;\n hi = hi + Math.imul(ah5, bh1) | 0;\n lo = lo + Math.imul(al4, bl2) | 0;\n mid = mid + Math.imul(al4, bh2) | 0;\n mid = mid + Math.imul(ah4, bl2) | 0;\n hi = hi + Math.imul(ah4, bh2) | 0;\n lo = lo + Math.imul(al3, bl3) | 0;\n mid = mid + Math.imul(al3, bh3) | 0;\n mid = mid + Math.imul(ah3, bl3) | 0;\n hi = hi + Math.imul(ah3, bh3) | 0;\n lo = lo + Math.imul(al2, bl4) | 0;\n mid = mid + Math.imul(al2, bh4) | 0;\n mid = mid + Math.imul(ah2, bl4) | 0;\n hi = hi + Math.imul(ah2, bh4) | 0;\n lo = lo + Math.imul(al1, bl5) | 0;\n mid = mid + Math.imul(al1, bh5) | 0;\n mid = mid + Math.imul(ah1, bl5) | 0;\n hi = hi + Math.imul(ah1, bh5) | 0;\n lo = lo + Math.imul(al0, bl6) | 0;\n mid = mid + Math.imul(al0, bh6) | 0;\n mid = mid + Math.imul(ah0, bl6) | 0;\n hi = hi + Math.imul(ah0, bh6) | 0;\n var w6 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w6 >>> 26) | 0;\n w6 &= 67108863;\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = mid + Math.imul(ah7, bl0) | 0;\n hi = Math.imul(ah7, bh0);\n lo = lo + Math.imul(al6, bl1) | 0;\n mid = mid + Math.imul(al6, bh1) | 0;\n mid = mid + Math.imul(ah6, bl1) | 0;\n hi = hi + Math.imul(ah6, bh1) | 0;\n lo = lo + Math.imul(al5, bl2) | 0;\n mid = mid + Math.imul(al5, bh2) | 0;\n mid = mid + Math.imul(ah5, bl2) | 0;\n hi = hi + Math.imul(ah5, bh2) | 0;\n lo = lo + Math.imul(al4, bl3) | 0;\n mid = mid + Math.imul(al4, bh3) | 0;\n mid = mid + Math.imul(ah4, bl3) | 0;\n hi = hi + Math.imul(ah4, bh3) | 0;\n lo = lo + Math.imul(al3, bl4) | 0;\n mid = mid + Math.imul(al3, bh4) | 0;\n mid = mid + Math.imul(ah3, bl4) | 0;\n hi = hi + Math.imul(ah3, bh4) | 0;\n lo = lo + Math.imul(al2, bl5) | 0;\n mid = mid + Math.imul(al2, bh5) | 0;\n mid = mid + Math.imul(ah2, bl5) | 0;\n hi = hi + Math.imul(ah2, bh5) | 0;\n lo = lo + Math.imul(al1, bl6) | 0;\n mid = mid + Math.imul(al1, bh6) | 0;\n mid = mid + Math.imul(ah1, bl6) | 0;\n hi = hi + Math.imul(ah1, bh6) | 0;\n lo = lo + Math.imul(al0, bl7) | 0;\n mid = mid + Math.imul(al0, bh7) | 0;\n mid = mid + Math.imul(ah0, bl7) | 0;\n hi = hi + Math.imul(ah0, bh7) | 0;\n var w7 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w7 >>> 26) | 0;\n w7 &= 67108863;\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = mid + Math.imul(ah8, bl0) | 0;\n hi = Math.imul(ah8, bh0);\n lo = lo + Math.imul(al7, bl1) | 0;\n mid = mid + Math.imul(al7, bh1) | 0;\n mid = mid + Math.imul(ah7, bl1) | 0;\n hi = hi + Math.imul(ah7, bh1) | 0;\n lo = lo + Math.imul(al6, bl2) | 0;\n mid = mid + Math.imul(al6, bh2) | 0;\n mid = mid + Math.imul(ah6, bl2) | 0;\n hi = hi + Math.imul(ah6, bh2) | 0;\n lo = lo + Math.imul(al5, bl3) | 0;\n mid = mid + Math.imul(al5, bh3) | 0;\n mid = mid + Math.imul(ah5, bl3) | 0;\n hi = hi + Math.imul(ah5, bh3) | 0;\n lo = lo + Math.imul(al4, bl4) | 0;\n mid = mid + Math.imul(al4, bh4) | 0;\n mid = mid + Math.imul(ah4, bl4) | 0;\n hi = hi + Math.imul(ah4, bh4) | 0;\n lo = lo + Math.imul(al3, bl5) | 0;\n mid = mid + Math.imul(al3, bh5) | 0;\n mid = mid + Math.imul(ah3, bl5) | 0;\n hi = hi + Math.imul(ah3, bh5) | 0;\n lo = lo + Math.imul(al2, bl6) | 0;\n mid = mid + Math.imul(al2, bh6) | 0;\n mid = mid + Math.imul(ah2, bl6) | 0;\n hi = hi + Math.imul(ah2, bh6) | 0;\n lo = lo + Math.imul(al1, bl7) | 0;\n mid = mid + Math.imul(al1, bh7) | 0;\n mid = mid + Math.imul(ah1, bl7) | 0;\n hi = hi + Math.imul(ah1, bh7) | 0;\n lo = lo + Math.imul(al0, bl8) | 0;\n mid = mid + Math.imul(al0, bh8) | 0;\n mid = mid + Math.imul(ah0, bl8) | 0;\n hi = hi + Math.imul(ah0, bh8) | 0;\n var w8 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w8 >>> 26) | 0;\n w8 &= 67108863;\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = mid + Math.imul(ah9, bl0) | 0;\n hi = Math.imul(ah9, bh0);\n lo = lo + Math.imul(al8, bl1) | 0;\n mid = mid + Math.imul(al8, bh1) | 0;\n mid = mid + Math.imul(ah8, bl1) | 0;\n hi = hi + Math.imul(ah8, bh1) | 0;\n lo = lo + Math.imul(al7, bl2) | 0;\n mid = mid + Math.imul(al7, bh2) | 0;\n mid = mid + Math.imul(ah7, bl2) | 0;\n hi = hi + Math.imul(ah7, bh2) | 0;\n lo = lo + Math.imul(al6, bl3) | 0;\n mid = mid + Math.imul(al6, bh3) | 0;\n mid = mid + Math.imul(ah6, bl3) | 0;\n hi = hi + Math.imul(ah6, bh3) | 0;\n lo = lo + Math.imul(al5, bl4) | 0;\n mid = mid + Math.imul(al5, bh4) | 0;\n mid = mid + Math.imul(ah5, bl4) | 0;\n hi = hi + Math.imul(ah5, bh4) | 0;\n lo = lo + Math.imul(al4, bl5) | 0;\n mid = mid + Math.imul(al4, bh5) | 0;\n mid = mid + Math.imul(ah4, bl5) | 0;\n hi = hi + Math.imul(ah4, bh5) | 0;\n lo = lo + Math.imul(al3, bl6) | 0;\n mid = mid + Math.imul(al3, bh6) | 0;\n mid = mid + Math.imul(ah3, bl6) | 0;\n hi = hi + Math.imul(ah3, bh6) | 0;\n lo = lo + Math.imul(al2, bl7) | 0;\n mid = mid + Math.imul(al2, bh7) | 0;\n mid = mid + Math.imul(ah2, bl7) | 0;\n hi = hi + Math.imul(ah2, bh7) | 0;\n lo = lo + Math.imul(al1, bl8) | 0;\n mid = mid + Math.imul(al1, bh8) | 0;\n mid = mid + Math.imul(ah1, bl8) | 0;\n hi = hi + Math.imul(ah1, bh8) | 0;\n lo = lo + Math.imul(al0, bl9) | 0;\n mid = mid + Math.imul(al0, bh9) | 0;\n mid = mid + Math.imul(ah0, bl9) | 0;\n hi = hi + Math.imul(ah0, bh9) | 0;\n var w9 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w9 >>> 26) | 0;\n w9 &= 67108863;\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = mid + Math.imul(ah9, bl1) | 0;\n hi = Math.imul(ah9, bh1);\n lo = lo + Math.imul(al8, bl2) | 0;\n mid = mid + Math.imul(al8, bh2) | 0;\n mid = mid + Math.imul(ah8, bl2) | 0;\n hi = hi + Math.imul(ah8, bh2) | 0;\n lo = lo + Math.imul(al7, bl3) | 0;\n mid = mid + Math.imul(al7, bh3) | 0;\n mid = mid + Math.imul(ah7, bl3) | 0;\n hi = hi + Math.imul(ah7, bh3) | 0;\n lo = lo + Math.imul(al6, bl4) | 0;\n mid = mid + Math.imul(al6, bh4) | 0;\n mid = mid + Math.imul(ah6, bl4) | 0;\n hi = hi + Math.imul(ah6, bh4) | 0;\n lo = lo + Math.imul(al5, bl5) | 0;\n mid = mid + Math.imul(al5, bh5) | 0;\n mid = mid + Math.imul(ah5, bl5) | 0;\n hi = hi + Math.imul(ah5, bh5) | 0;\n lo = lo + Math.imul(al4, bl6) | 0;\n mid = mid + Math.imul(al4, bh6) | 0;\n mid = mid + Math.imul(ah4, bl6) | 0;\n hi = hi + Math.imul(ah4, bh6) | 0;\n lo = lo + Math.imul(al3, bl7) | 0;\n mid = mid + Math.imul(al3, bh7) | 0;\n mid = mid + Math.imul(ah3, bl7) | 0;\n hi = hi + Math.imul(ah3, bh7) | 0;\n lo = lo + Math.imul(al2, bl8) | 0;\n mid = mid + Math.imul(al2, bh8) | 0;\n mid = mid + Math.imul(ah2, bl8) | 0;\n hi = hi + Math.imul(ah2, bh8) | 0;\n lo = lo + Math.imul(al1, bl9) | 0;\n mid = mid + Math.imul(al1, bh9) | 0;\n mid = mid + Math.imul(ah1, bl9) | 0;\n hi = hi + Math.imul(ah1, bh9) | 0;\n var w10 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w10 >>> 26) | 0;\n w10 &= 67108863;\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = mid + Math.imul(ah9, bl2) | 0;\n hi = Math.imul(ah9, bh2);\n lo = lo + Math.imul(al8, bl3) | 0;\n mid = mid + Math.imul(al8, bh3) | 0;\n mid = mid + Math.imul(ah8, bl3) | 0;\n hi = hi + Math.imul(ah8, bh3) | 0;\n lo = lo + Math.imul(al7, bl4) | 0;\n mid = mid + Math.imul(al7, bh4) | 0;\n mid = mid + Math.imul(ah7, bl4) | 0;\n hi = hi + Math.imul(ah7, bh4) | 0;\n lo = lo + Math.imul(al6, bl5) | 0;\n mid = mid + Math.imul(al6, bh5) | 0;\n mid = mid + Math.imul(ah6, bl5) | 0;\n hi = hi + Math.imul(ah6, bh5) | 0;\n lo = lo + Math.imul(al5, bl6) | 0;\n mid = mid + Math.imul(al5, bh6) | 0;\n mid = mid + Math.imul(ah5, bl6) | 0;\n hi = hi + Math.imul(ah5, bh6) | 0;\n lo = lo + Math.imul(al4, bl7) | 0;\n mid = mid + Math.imul(al4, bh7) | 0;\n mid = mid + Math.imul(ah4, bl7) | 0;\n hi = hi + Math.imul(ah4, bh7) | 0;\n lo = lo + Math.imul(al3, bl8) | 0;\n mid = mid + Math.imul(al3, bh8) | 0;\n mid = mid + Math.imul(ah3, bl8) | 0;\n hi = hi + Math.imul(ah3, bh8) | 0;\n lo = lo + Math.imul(al2, bl9) | 0;\n mid = mid + Math.imul(al2, bh9) | 0;\n mid = mid + Math.imul(ah2, bl9) | 0;\n hi = hi + Math.imul(ah2, bh9) | 0;\n var w11 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w11 >>> 26) | 0;\n w11 &= 67108863;\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = mid + Math.imul(ah9, bl3) | 0;\n hi = Math.imul(ah9, bh3);\n lo = lo + Math.imul(al8, bl4) | 0;\n mid = mid + Math.imul(al8, bh4) | 0;\n mid = mid + Math.imul(ah8, bl4) | 0;\n hi = hi + Math.imul(ah8, bh4) | 0;\n lo = lo + Math.imul(al7, bl5) | 0;\n mid = mid + Math.imul(al7, bh5) | 0;\n mid = mid + Math.imul(ah7, bl5) | 0;\n hi = hi + Math.imul(ah7, bh5) | 0;\n lo = lo + Math.imul(al6, bl6) | 0;\n mid = mid + Math.imul(al6, bh6) | 0;\n mid = mid + Math.imul(ah6, bl6) | 0;\n hi = hi + Math.imul(ah6, bh6) | 0;\n lo = lo + Math.imul(al5, bl7) | 0;\n mid = mid + Math.imul(al5, bh7) | 0;\n mid = mid + Math.imul(ah5, bl7) | 0;\n hi = hi + Math.imul(ah5, bh7) | 0;\n lo = lo + Math.imul(al4, bl8) | 0;\n mid = mid + Math.imul(al4, bh8) | 0;\n mid = mid + Math.imul(ah4, bl8) | 0;\n hi = hi + Math.imul(ah4, bh8) | 0;\n lo = lo + Math.imul(al3, bl9) | 0;\n mid = mid + Math.imul(al3, bh9) | 0;\n mid = mid + Math.imul(ah3, bl9) | 0;\n hi = hi + Math.imul(ah3, bh9) | 0;\n var w12 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w12 >>> 26) | 0;\n w12 &= 67108863;\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = mid + Math.imul(ah9, bl4) | 0;\n hi = Math.imul(ah9, bh4);\n lo = lo + Math.imul(al8, bl5) | 0;\n mid = mid + Math.imul(al8, bh5) | 0;\n mid = mid + Math.imul(ah8, bl5) | 0;\n hi = hi + Math.imul(ah8, bh5) | 0;\n lo = lo + Math.imul(al7, bl6) | 0;\n mid = mid + Math.imul(al7, bh6) | 0;\n mid = mid + Math.imul(ah7, bl6) | 0;\n hi = hi + Math.imul(ah7, bh6) | 0;\n lo = lo + Math.imul(al6, bl7) | 0;\n mid = mid + Math.imul(al6, bh7) | 0;\n mid = mid + Math.imul(ah6, bl7) | 0;\n hi = hi + Math.imul(ah6, bh7) | 0;\n lo = lo + Math.imul(al5, bl8) | 0;\n mid = mid + Math.imul(al5, bh8) | 0;\n mid = mid + Math.imul(ah5, bl8) | 0;\n hi = hi + Math.imul(ah5, bh8) | 0;\n lo = lo + Math.imul(al4, bl9) | 0;\n mid = mid + Math.imul(al4, bh9) | 0;\n mid = mid + Math.imul(ah4, bl9) | 0;\n hi = hi + Math.imul(ah4, bh9) | 0;\n var w13 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w13 >>> 26) | 0;\n w13 &= 67108863;\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = mid + Math.imul(ah9, bl5) | 0;\n hi = Math.imul(ah9, bh5);\n lo = lo + Math.imul(al8, bl6) | 0;\n mid = mid + Math.imul(al8, bh6) | 0;\n mid = mid + Math.imul(ah8, bl6) | 0;\n hi = hi + Math.imul(ah8, bh6) | 0;\n lo = lo + Math.imul(al7, bl7) | 0;\n mid = mid + Math.imul(al7, bh7) | 0;\n mid = mid + Math.imul(ah7, bl7) | 0;\n hi = hi + Math.imul(ah7, bh7) | 0;\n lo = lo + Math.imul(al6, bl8) | 0;\n mid = mid + Math.imul(al6, bh8) | 0;\n mid = mid + Math.imul(ah6, bl8) | 0;\n hi = hi + Math.imul(ah6, bh8) | 0;\n lo = lo + Math.imul(al5, bl9) | 0;\n mid = mid + Math.imul(al5, bh9) | 0;\n mid = mid + Math.imul(ah5, bl9) | 0;\n hi = hi + Math.imul(ah5, bh9) | 0;\n var w14 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w14 >>> 26) | 0;\n w14 &= 67108863;\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = mid + Math.imul(ah9, bl6) | 0;\n hi = Math.imul(ah9, bh6);\n lo = lo + Math.imul(al8, bl7) | 0;\n mid = mid + Math.imul(al8, bh7) | 0;\n mid = mid + Math.imul(ah8, bl7) | 0;\n hi = hi + Math.imul(ah8, bh7) | 0;\n lo = lo + Math.imul(al7, bl8) | 0;\n mid = mid + Math.imul(al7, bh8) | 0;\n mid = mid + Math.imul(ah7, bl8) | 0;\n hi = hi + Math.imul(ah7, bh8) | 0;\n lo = lo + Math.imul(al6, bl9) | 0;\n mid = mid + Math.imul(al6, bh9) | 0;\n mid = mid + Math.imul(ah6, bl9) | 0;\n hi = hi + Math.imul(ah6, bh9) | 0;\n var w15 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w15 >>> 26) | 0;\n w15 &= 67108863;\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = mid + Math.imul(ah9, bl7) | 0;\n hi = Math.imul(ah9, bh7);\n lo = lo + Math.imul(al8, bl8) | 0;\n mid = mid + Math.imul(al8, bh8) | 0;\n mid = mid + Math.imul(ah8, bl8) | 0;\n hi = hi + Math.imul(ah8, bh8) | 0;\n lo = lo + Math.imul(al7, bl9) | 0;\n mid = mid + Math.imul(al7, bh9) | 0;\n mid = mid + Math.imul(ah7, bl9) | 0;\n hi = hi + Math.imul(ah7, bh9) | 0;\n var w16 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w16 >>> 26) | 0;\n w16 &= 67108863;\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = mid + Math.imul(ah9, bl8) | 0;\n hi = Math.imul(ah9, bh8);\n lo = lo + Math.imul(al8, bl9) | 0;\n mid = mid + Math.imul(al8, bh9) | 0;\n mid = mid + Math.imul(ah8, bl9) | 0;\n hi = hi + Math.imul(ah8, bh9) | 0;\n var w17 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w17 >>> 26) | 0;\n w17 &= 67108863;\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = mid + Math.imul(ah9, bl9) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w18 >>> 26) | 0;\n w18 &= 67108863;\n o5[0] = w0;\n o5[1] = w1;\n o5[2] = w22;\n o5[3] = w3;\n o5[4] = w4;\n o5[5] = w5;\n o5[6] = w6;\n o5[7] = w7;\n o5[8] = w8;\n o5[9] = w9;\n o5[10] = w10;\n o5[11] = w11;\n o5[12] = w12;\n o5[13] = w13;\n o5[14] = w14;\n o5[15] = w15;\n o5[16] = w16;\n o5[17] = w17;\n o5[18] = w18;\n if (c4 !== 0) {\n o5[19] = c4;\n out.length++;\n }\n return out;\n };\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n function bigMulTo(self2, num2, out) {\n out.negative = num2.negative ^ self2.negative;\n out.length = self2.length + num2.length;\n var carry = 0;\n var hncarry = 0;\n for (var k4 = 0; k4 < out.length - 1; k4++) {\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 67108863;\n var maxJ = Math.min(k4, num2.length - 1);\n for (var j2 = Math.max(0, k4 - self2.length + 1); j2 <= maxJ; j2++) {\n var i3 = k4 - j2;\n var a3 = self2.words[i3] | 0;\n var b4 = num2.words[j2] | 0;\n var r2 = a3 * b4;\n var lo = r2 & 67108863;\n ncarry = ncarry + (r2 / 67108864 | 0) | 0;\n lo = lo + rword | 0;\n rword = lo & 67108863;\n ncarry = ncarry + (lo >>> 26) | 0;\n hncarry += ncarry >>> 26;\n ncarry &= 67108863;\n }\n out.words[k4] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k4] = carry;\n } else {\n out.length--;\n }\n return out._strip();\n }\n function jumboMulTo(self2, num2, out) {\n return bigMulTo(self2, num2, out);\n }\n BN.prototype.mulTo = function mulTo(num2, out) {\n var res;\n var len = this.length + num2.length;\n if (this.length === 10 && num2.length === 10) {\n res = comb10MulTo(this, num2, out);\n } else if (len < 63) {\n res = smallMulTo(this, num2, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num2, out);\n } else {\n res = jumboMulTo(this, num2, out);\n }\n return res;\n };\n function FFTM(x4, y6) {\n this.x = x4;\n this.y = y6;\n }\n FFTM.prototype.makeRBT = function makeRBT(N4) {\n var t3 = new Array(N4);\n var l6 = BN.prototype._countBits(N4) - 1;\n for (var i3 = 0; i3 < N4; i3++) {\n t3[i3] = this.revBin(i3, l6, N4);\n }\n return t3;\n };\n FFTM.prototype.revBin = function revBin(x4, l6, N4) {\n if (x4 === 0 || x4 === N4 - 1)\n return x4;\n var rb = 0;\n for (var i3 = 0; i3 < l6; i3++) {\n rb |= (x4 & 1) << l6 - i3 - 1;\n x4 >>= 1;\n }\n return rb;\n };\n FFTM.prototype.permute = function permute(rbt, rws, iws, rtws, itws, N4) {\n for (var i3 = 0; i3 < N4; i3++) {\n rtws[i3] = rws[rbt[i3]];\n itws[i3] = iws[rbt[i3]];\n }\n };\n FFTM.prototype.transform = function transform(rws, iws, rtws, itws, N4, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N4);\n for (var s4 = 1; s4 < N4; s4 <<= 1) {\n var l6 = s4 << 1;\n var rtwdf = Math.cos(2 * Math.PI / l6);\n var itwdf = Math.sin(2 * Math.PI / l6);\n for (var p4 = 0; p4 < N4; p4 += l6) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n for (var j2 = 0; j2 < s4; j2++) {\n var re = rtws[p4 + j2];\n var ie = itws[p4 + j2];\n var ro = rtws[p4 + j2 + s4];\n var io = itws[p4 + j2 + s4];\n var rx = rtwdf_ * ro - itwdf_ * io;\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n rtws[p4 + j2] = re + ro;\n itws[p4 + j2] = ie + io;\n rtws[p4 + j2 + s4] = re - ro;\n itws[p4 + j2 + s4] = ie - io;\n if (j2 !== l6) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n FFTM.prototype.guessLen13b = function guessLen13b(n2, m2) {\n var N4 = Math.max(m2, n2) | 1;\n var odd = N4 & 1;\n var i3 = 0;\n for (N4 = N4 / 2 | 0; N4; N4 = N4 >>> 1) {\n i3++;\n }\n return 1 << i3 + 1 + odd;\n };\n FFTM.prototype.conjugate = function conjugate(rws, iws, N4) {\n if (N4 <= 1)\n return;\n for (var i3 = 0; i3 < N4 / 2; i3++) {\n var t3 = rws[i3];\n rws[i3] = rws[N4 - i3 - 1];\n rws[N4 - i3 - 1] = t3;\n t3 = iws[i3];\n iws[i3] = -iws[N4 - i3 - 1];\n iws[N4 - i3 - 1] = -t3;\n }\n };\n FFTM.prototype.normalize13b = function normalize13b(ws, N4) {\n var carry = 0;\n for (var i3 = 0; i3 < N4 / 2; i3++) {\n var w3 = Math.round(ws[2 * i3 + 1] / N4) * 8192 + Math.round(ws[2 * i3] / N4) + carry;\n ws[i3] = w3 & 67108863;\n if (w3 < 67108864) {\n carry = 0;\n } else {\n carry = w3 / 67108864 | 0;\n }\n }\n return ws;\n };\n FFTM.prototype.convert13b = function convert13b(ws, len, rws, N4) {\n var carry = 0;\n for (var i3 = 0; i3 < len; i3++) {\n carry = carry + (ws[i3] | 0);\n rws[2 * i3] = carry & 8191;\n carry = carry >>> 13;\n rws[2 * i3 + 1] = carry & 8191;\n carry = carry >>> 13;\n }\n for (i3 = 2 * len; i3 < N4; ++i3) {\n rws[i3] = 0;\n }\n assert9(carry === 0);\n assert9((carry & ~8191) === 0);\n };\n FFTM.prototype.stub = function stub(N4) {\n var ph = new Array(N4);\n for (var i3 = 0; i3 < N4; i3++) {\n ph[i3] = 0;\n }\n return ph;\n };\n FFTM.prototype.mulp = function mulp(x4, y6, out) {\n var N4 = 2 * this.guessLen13b(x4.length, y6.length);\n var rbt = this.makeRBT(N4);\n var _2 = this.stub(N4);\n var rws = new Array(N4);\n var rwst = new Array(N4);\n var iwst = new Array(N4);\n var nrws = new Array(N4);\n var nrwst = new Array(N4);\n var niwst = new Array(N4);\n var rmws = out.words;\n rmws.length = N4;\n this.convert13b(x4.words, x4.length, rws, N4);\n this.convert13b(y6.words, y6.length, nrws, N4);\n this.transform(rws, _2, rwst, iwst, N4, rbt);\n this.transform(nrws, _2, nrwst, niwst, N4, rbt);\n for (var i3 = 0; i3 < N4; i3++) {\n var rx = rwst[i3] * nrwst[i3] - iwst[i3] * niwst[i3];\n iwst[i3] = rwst[i3] * niwst[i3] + iwst[i3] * nrwst[i3];\n rwst[i3] = rx;\n }\n this.conjugate(rwst, iwst, N4);\n this.transform(rwst, iwst, rmws, _2, N4, rbt);\n this.conjugate(rmws, _2, N4);\n this.normalize13b(rmws, N4);\n out.negative = x4.negative ^ y6.negative;\n out.length = x4.length + y6.length;\n return out._strip();\n };\n BN.prototype.mul = function mul(num2) {\n var out = new BN(null);\n out.words = new Array(this.length + num2.length);\n return this.mulTo(num2, out);\n };\n BN.prototype.mulf = function mulf(num2) {\n var out = new BN(null);\n out.words = new Array(this.length + num2.length);\n return jumboMulTo(this, num2, out);\n };\n BN.prototype.imul = function imul(num2) {\n return this.clone().mulTo(num2, this);\n };\n BN.prototype.imuln = function imuln(num2) {\n var isNegNum = num2 < 0;\n if (isNegNum)\n num2 = -num2;\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n var carry = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var w3 = (this.words[i3] | 0) * num2;\n var lo = (w3 & 67108863) + (carry & 67108863);\n carry >>= 26;\n carry += w3 / 67108864 | 0;\n carry += lo >>> 26;\n this.words[i3] = lo & 67108863;\n }\n if (carry !== 0) {\n this.words[i3] = carry;\n this.length++;\n }\n this.length = num2 === 0 ? 1 : this.length;\n return isNegNum ? this.ineg() : this;\n };\n BN.prototype.muln = function muln(num2) {\n return this.clone().imuln(num2);\n };\n BN.prototype.sqr = function sqr() {\n return this.mul(this);\n };\n BN.prototype.isqr = function isqr() {\n return this.imul(this.clone());\n };\n BN.prototype.pow = function pow(num2) {\n var w3 = toBitArray(num2);\n if (w3.length === 0)\n return new BN(1);\n var res = this;\n for (var i3 = 0; i3 < w3.length; i3++, res = res.sqr()) {\n if (w3[i3] !== 0)\n break;\n }\n if (++i3 < w3.length) {\n for (var q3 = res.sqr(); i3 < w3.length; i3++, q3 = q3.sqr()) {\n if (w3[i3] === 0)\n continue;\n res = res.mul(q3);\n }\n }\n return res;\n };\n BN.prototype.iushln = function iushln(bits) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n var carryMask = 67108863 >>> 26 - r2 << 26 - r2;\n var i3;\n if (r2 !== 0) {\n var carry = 0;\n for (i3 = 0; i3 < this.length; i3++) {\n var newCarry = this.words[i3] & carryMask;\n var c4 = (this.words[i3] | 0) - newCarry << r2;\n this.words[i3] = c4 | carry;\n carry = newCarry >>> 26 - r2;\n }\n if (carry) {\n this.words[i3] = carry;\n this.length++;\n }\n }\n if (s4 !== 0) {\n for (i3 = this.length - 1; i3 >= 0; i3--) {\n this.words[i3 + s4] = this.words[i3];\n }\n for (i3 = 0; i3 < s4; i3++) {\n this.words[i3] = 0;\n }\n this.length += s4;\n }\n return this._strip();\n };\n BN.prototype.ishln = function ishln(bits) {\n assert9(this.negative === 0);\n return this.iushln(bits);\n };\n BN.prototype.iushrn = function iushrn(bits, hint, extended) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var h4;\n if (hint) {\n h4 = (hint - hint % 26) / 26;\n } else {\n h4 = 0;\n }\n var r2 = bits % 26;\n var s4 = Math.min((bits - r2) / 26, this.length);\n var mask = 67108863 ^ 67108863 >>> r2 << r2;\n var maskedWords = extended;\n h4 -= s4;\n h4 = Math.max(0, h4);\n if (maskedWords) {\n for (var i3 = 0; i3 < s4; i3++) {\n maskedWords.words[i3] = this.words[i3];\n }\n maskedWords.length = s4;\n }\n if (s4 === 0) {\n } else if (this.length > s4) {\n this.length -= s4;\n for (i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = this.words[i3 + s4];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n var carry = 0;\n for (i3 = this.length - 1; i3 >= 0 && (carry !== 0 || i3 >= h4); i3--) {\n var word = this.words[i3] | 0;\n this.words[i3] = carry << 26 - r2 | word >>> r2;\n carry = word & mask;\n }\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n return this._strip();\n };\n BN.prototype.ishrn = function ishrn(bits, hint, extended) {\n assert9(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n BN.prototype.shln = function shln(bits) {\n return this.clone().ishln(bits);\n };\n BN.prototype.ushln = function ushln(bits) {\n return this.clone().iushln(bits);\n };\n BN.prototype.shrn = function shrn(bits) {\n return this.clone().ishrn(bits);\n };\n BN.prototype.ushrn = function ushrn(bits) {\n return this.clone().iushrn(bits);\n };\n BN.prototype.testn = function testn(bit) {\n assert9(typeof bit === \"number\" && bit >= 0);\n var r2 = bit % 26;\n var s4 = (bit - r2) / 26;\n var q3 = 1 << r2;\n if (this.length <= s4)\n return false;\n var w3 = this.words[s4];\n return !!(w3 & q3);\n };\n BN.prototype.imaskn = function imaskn(bits) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n assert9(this.negative === 0, \"imaskn works only with positive numbers\");\n if (this.length <= s4) {\n return this;\n }\n if (r2 !== 0) {\n s4++;\n }\n this.length = Math.min(s4, this.length);\n if (r2 !== 0) {\n var mask = 67108863 ^ 67108863 >>> r2 << r2;\n this.words[this.length - 1] &= mask;\n }\n return this._strip();\n };\n BN.prototype.maskn = function maskn(bits) {\n return this.clone().imaskn(bits);\n };\n BN.prototype.iaddn = function iaddn(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n if (num2 < 0)\n return this.isubn(-num2);\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num2) {\n this.words[0] = num2 - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n this.negative = 0;\n this.isubn(num2);\n this.negative = 1;\n return this;\n }\n return this._iaddn(num2);\n };\n BN.prototype._iaddn = function _iaddn(num2) {\n this.words[0] += num2;\n for (var i3 = 0; i3 < this.length && this.words[i3] >= 67108864; i3++) {\n this.words[i3] -= 67108864;\n if (i3 === this.length - 1) {\n this.words[i3 + 1] = 1;\n } else {\n this.words[i3 + 1]++;\n }\n }\n this.length = Math.max(this.length, i3 + 1);\n return this;\n };\n BN.prototype.isubn = function isubn(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n if (num2 < 0)\n return this.iaddn(-num2);\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num2);\n this.negative = 1;\n return this;\n }\n this.words[0] -= num2;\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n for (var i3 = 0; i3 < this.length && this.words[i3] < 0; i3++) {\n this.words[i3] += 67108864;\n this.words[i3 + 1] -= 1;\n }\n }\n return this._strip();\n };\n BN.prototype.addn = function addn(num2) {\n return this.clone().iaddn(num2);\n };\n BN.prototype.subn = function subn(num2) {\n return this.clone().isubn(num2);\n };\n BN.prototype.iabs = function iabs() {\n this.negative = 0;\n return this;\n };\n BN.prototype.abs = function abs() {\n return this.clone().iabs();\n };\n BN.prototype._ishlnsubmul = function _ishlnsubmul(num2, mul, shift) {\n var len = num2.length + shift;\n var i3;\n this._expand(len);\n var w3;\n var carry = 0;\n for (i3 = 0; i3 < num2.length; i3++) {\n w3 = (this.words[i3 + shift] | 0) + carry;\n var right = (num2.words[i3] | 0) * mul;\n w3 -= right & 67108863;\n carry = (w3 >> 26) - (right / 67108864 | 0);\n this.words[i3 + shift] = w3 & 67108863;\n }\n for (; i3 < this.length - shift; i3++) {\n w3 = (this.words[i3 + shift] | 0) + carry;\n carry = w3 >> 26;\n this.words[i3 + shift] = w3 & 67108863;\n }\n if (carry === 0)\n return this._strip();\n assert9(carry === -1);\n carry = 0;\n for (i3 = 0; i3 < this.length; i3++) {\n w3 = -(this.words[i3] | 0) + carry;\n carry = w3 >> 26;\n this.words[i3] = w3 & 67108863;\n }\n this.negative = 1;\n return this._strip();\n };\n BN.prototype._wordDiv = function _wordDiv(num2, mode) {\n var shift = this.length - num2.length;\n var a3 = this.clone();\n var b4 = num2;\n var bhi = b4.words[b4.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b4 = b4.ushln(shift);\n a3.iushln(shift);\n bhi = b4.words[b4.length - 1] | 0;\n }\n var m2 = a3.length - b4.length;\n var q3;\n if (mode !== \"mod\") {\n q3 = new BN(null);\n q3.length = m2 + 1;\n q3.words = new Array(q3.length);\n for (var i3 = 0; i3 < q3.length; i3++) {\n q3.words[i3] = 0;\n }\n }\n var diff = a3.clone()._ishlnsubmul(b4, 1, m2);\n if (diff.negative === 0) {\n a3 = diff;\n if (q3) {\n q3.words[m2] = 1;\n }\n }\n for (var j2 = m2 - 1; j2 >= 0; j2--) {\n var qj = (a3.words[b4.length + j2] | 0) * 67108864 + (a3.words[b4.length + j2 - 1] | 0);\n qj = Math.min(qj / bhi | 0, 67108863);\n a3._ishlnsubmul(b4, qj, j2);\n while (a3.negative !== 0) {\n qj--;\n a3.negative = 0;\n a3._ishlnsubmul(b4, 1, j2);\n if (!a3.isZero()) {\n a3.negative ^= 1;\n }\n }\n if (q3) {\n q3.words[j2] = qj;\n }\n }\n if (q3) {\n q3._strip();\n }\n a3._strip();\n if (mode !== \"div\" && shift !== 0) {\n a3.iushrn(shift);\n }\n return {\n div: q3 || null,\n mod: a3\n };\n };\n BN.prototype.divmod = function divmod(num2, mode, positive) {\n assert9(!num2.isZero());\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n var div, mod3, res;\n if (this.negative !== 0 && num2.negative === 0) {\n res = this.neg().divmod(num2, mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n if (mode !== \"div\") {\n mod3 = res.mod.neg();\n if (positive && mod3.negative !== 0) {\n mod3.iadd(num2);\n }\n }\n return {\n div,\n mod: mod3\n };\n }\n if (this.negative === 0 && num2.negative !== 0) {\n res = this.divmod(num2.neg(), mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n return {\n div,\n mod: res.mod\n };\n }\n if ((this.negative & num2.negative) !== 0) {\n res = this.neg().divmod(num2.neg(), mode);\n if (mode !== \"div\") {\n mod3 = res.mod.neg();\n if (positive && mod3.negative !== 0) {\n mod3.isub(num2);\n }\n }\n return {\n div: res.div,\n mod: mod3\n };\n }\n if (num2.length > this.length || this.cmp(num2) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n if (num2.length === 1) {\n if (mode === \"div\") {\n return {\n div: this.divn(num2.words[0]),\n mod: null\n };\n }\n if (mode === \"mod\") {\n return {\n div: null,\n mod: new BN(this.modrn(num2.words[0]))\n };\n }\n return {\n div: this.divn(num2.words[0]),\n mod: new BN(this.modrn(num2.words[0]))\n };\n }\n return this._wordDiv(num2, mode);\n };\n BN.prototype.div = function div(num2) {\n return this.divmod(num2, \"div\", false).div;\n };\n BN.prototype.mod = function mod3(num2) {\n return this.divmod(num2, \"mod\", false).mod;\n };\n BN.prototype.umod = function umod(num2) {\n return this.divmod(num2, \"mod\", true).mod;\n };\n BN.prototype.divRound = function divRound(num2) {\n var dm = this.divmod(num2);\n if (dm.mod.isZero())\n return dm.div;\n var mod3 = dm.div.negative !== 0 ? dm.mod.isub(num2) : dm.mod;\n var half = num2.ushrn(1);\n var r2 = num2.andln(1);\n var cmp = mod3.cmp(half);\n if (cmp < 0 || r2 === 1 && cmp === 0)\n return dm.div;\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n BN.prototype.modrn = function modrn(num2) {\n var isNegNum = num2 < 0;\n if (isNegNum)\n num2 = -num2;\n assert9(num2 <= 67108863);\n var p4 = (1 << 26) % num2;\n var acc = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n acc = (p4 * acc + (this.words[i3] | 0)) % num2;\n }\n return isNegNum ? -acc : acc;\n };\n BN.prototype.modn = function modn(num2) {\n return this.modrn(num2);\n };\n BN.prototype.idivn = function idivn(num2) {\n var isNegNum = num2 < 0;\n if (isNegNum)\n num2 = -num2;\n assert9(num2 <= 67108863);\n var carry = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n var w3 = (this.words[i3] | 0) + carry * 67108864;\n this.words[i3] = w3 / num2 | 0;\n carry = w3 % num2;\n }\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n BN.prototype.divn = function divn(num2) {\n return this.clone().idivn(num2);\n };\n BN.prototype.egcd = function egcd(p4) {\n assert9(p4.negative === 0);\n assert9(!p4.isZero());\n var x4 = this;\n var y6 = p4.clone();\n if (x4.negative !== 0) {\n x4 = x4.umod(p4);\n } else {\n x4 = x4.clone();\n }\n var A4 = new BN(1);\n var B2 = new BN(0);\n var C = new BN(0);\n var D2 = new BN(1);\n var g4 = 0;\n while (x4.isEven() && y6.isEven()) {\n x4.iushrn(1);\n y6.iushrn(1);\n ++g4;\n }\n var yp = y6.clone();\n var xp = x4.clone();\n while (!x4.isZero()) {\n for (var i3 = 0, im = 1; (x4.words[0] & im) === 0 && i3 < 26; ++i3, im <<= 1)\n ;\n if (i3 > 0) {\n x4.iushrn(i3);\n while (i3-- > 0) {\n if (A4.isOdd() || B2.isOdd()) {\n A4.iadd(yp);\n B2.isub(xp);\n }\n A4.iushrn(1);\n B2.iushrn(1);\n }\n }\n for (var j2 = 0, jm = 1; (y6.words[0] & jm) === 0 && j2 < 26; ++j2, jm <<= 1)\n ;\n if (j2 > 0) {\n y6.iushrn(j2);\n while (j2-- > 0) {\n if (C.isOdd() || D2.isOdd()) {\n C.iadd(yp);\n D2.isub(xp);\n }\n C.iushrn(1);\n D2.iushrn(1);\n }\n }\n if (x4.cmp(y6) >= 0) {\n x4.isub(y6);\n A4.isub(C);\n B2.isub(D2);\n } else {\n y6.isub(x4);\n C.isub(A4);\n D2.isub(B2);\n }\n }\n return {\n a: C,\n b: D2,\n gcd: y6.iushln(g4)\n };\n };\n BN.prototype._invmp = function _invmp(p4) {\n assert9(p4.negative === 0);\n assert9(!p4.isZero());\n var a3 = this;\n var b4 = p4.clone();\n if (a3.negative !== 0) {\n a3 = a3.umod(p4);\n } else {\n a3 = a3.clone();\n }\n var x1 = new BN(1);\n var x22 = new BN(0);\n var delta = b4.clone();\n while (a3.cmpn(1) > 0 && b4.cmpn(1) > 0) {\n for (var i3 = 0, im = 1; (a3.words[0] & im) === 0 && i3 < 26; ++i3, im <<= 1)\n ;\n if (i3 > 0) {\n a3.iushrn(i3);\n while (i3-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n x1.iushrn(1);\n }\n }\n for (var j2 = 0, jm = 1; (b4.words[0] & jm) === 0 && j2 < 26; ++j2, jm <<= 1)\n ;\n if (j2 > 0) {\n b4.iushrn(j2);\n while (j2-- > 0) {\n if (x22.isOdd()) {\n x22.iadd(delta);\n }\n x22.iushrn(1);\n }\n }\n if (a3.cmp(b4) >= 0) {\n a3.isub(b4);\n x1.isub(x22);\n } else {\n b4.isub(a3);\n x22.isub(x1);\n }\n }\n var res;\n if (a3.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x22;\n }\n if (res.cmpn(0) < 0) {\n res.iadd(p4);\n }\n return res;\n };\n BN.prototype.gcd = function gcd(num2) {\n if (this.isZero())\n return num2.abs();\n if (num2.isZero())\n return this.abs();\n var a3 = this.clone();\n var b4 = num2.clone();\n a3.negative = 0;\n b4.negative = 0;\n for (var shift = 0; a3.isEven() && b4.isEven(); shift++) {\n a3.iushrn(1);\n b4.iushrn(1);\n }\n do {\n while (a3.isEven()) {\n a3.iushrn(1);\n }\n while (b4.isEven()) {\n b4.iushrn(1);\n }\n var r2 = a3.cmp(b4);\n if (r2 < 0) {\n var t3 = a3;\n a3 = b4;\n b4 = t3;\n } else if (r2 === 0 || b4.cmpn(1) === 0) {\n break;\n }\n a3.isub(b4);\n } while (true);\n return b4.iushln(shift);\n };\n BN.prototype.invm = function invm(num2) {\n return this.egcd(num2).a.umod(num2);\n };\n BN.prototype.isEven = function isEven() {\n return (this.words[0] & 1) === 0;\n };\n BN.prototype.isOdd = function isOdd() {\n return (this.words[0] & 1) === 1;\n };\n BN.prototype.andln = function andln(num2) {\n return this.words[0] & num2;\n };\n BN.prototype.bincn = function bincn(bit) {\n assert9(typeof bit === \"number\");\n var r2 = bit % 26;\n var s4 = (bit - r2) / 26;\n var q3 = 1 << r2;\n if (this.length <= s4) {\n this._expand(s4 + 1);\n this.words[s4] |= q3;\n return this;\n }\n var carry = q3;\n for (var i3 = s4; carry !== 0 && i3 < this.length; i3++) {\n var w3 = this.words[i3] | 0;\n w3 += carry;\n carry = w3 >>> 26;\n w3 &= 67108863;\n this.words[i3] = w3;\n }\n if (carry !== 0) {\n this.words[i3] = carry;\n this.length++;\n }\n return this;\n };\n BN.prototype.isZero = function isZero() {\n return this.length === 1 && this.words[0] === 0;\n };\n BN.prototype.cmpn = function cmpn(num2) {\n var negative = num2 < 0;\n if (this.negative !== 0 && !negative)\n return -1;\n if (this.negative === 0 && negative)\n return 1;\n this._strip();\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num2 = -num2;\n }\n assert9(num2 <= 67108863, \"Number is too big\");\n var w3 = this.words[0] | 0;\n res = w3 === num2 ? 0 : w3 < num2 ? -1 : 1;\n }\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN.prototype.cmp = function cmp(num2) {\n if (this.negative !== 0 && num2.negative === 0)\n return -1;\n if (this.negative === 0 && num2.negative !== 0)\n return 1;\n var res = this.ucmp(num2);\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN.prototype.ucmp = function ucmp(num2) {\n if (this.length > num2.length)\n return 1;\n if (this.length < num2.length)\n return -1;\n var res = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n var a3 = this.words[i3] | 0;\n var b4 = num2.words[i3] | 0;\n if (a3 === b4)\n continue;\n if (a3 < b4) {\n res = -1;\n } else if (a3 > b4) {\n res = 1;\n }\n break;\n }\n return res;\n };\n BN.prototype.gtn = function gtn(num2) {\n return this.cmpn(num2) === 1;\n };\n BN.prototype.gt = function gt(num2) {\n return this.cmp(num2) === 1;\n };\n BN.prototype.gten = function gten(num2) {\n return this.cmpn(num2) >= 0;\n };\n BN.prototype.gte = function gte(num2) {\n return this.cmp(num2) >= 0;\n };\n BN.prototype.ltn = function ltn(num2) {\n return this.cmpn(num2) === -1;\n };\n BN.prototype.lt = function lt(num2) {\n return this.cmp(num2) === -1;\n };\n BN.prototype.lten = function lten(num2) {\n return this.cmpn(num2) <= 0;\n };\n BN.prototype.lte = function lte(num2) {\n return this.cmp(num2) <= 0;\n };\n BN.prototype.eqn = function eqn(num2) {\n return this.cmpn(num2) === 0;\n };\n BN.prototype.eq = function eq(num2) {\n return this.cmp(num2) === 0;\n };\n BN.red = function red(num2) {\n return new Red(num2);\n };\n BN.prototype.toRed = function toRed(ctx) {\n assert9(!this.red, \"Already a number in reduction context\");\n assert9(this.negative === 0, \"red works only with positives\");\n return ctx.convertTo(this)._forceRed(ctx);\n };\n BN.prototype.fromRed = function fromRed() {\n assert9(this.red, \"fromRed works only with numbers in reduction context\");\n return this.red.convertFrom(this);\n };\n BN.prototype._forceRed = function _forceRed(ctx) {\n this.red = ctx;\n return this;\n };\n BN.prototype.forceRed = function forceRed(ctx) {\n assert9(!this.red, \"Already a number in reduction context\");\n return this._forceRed(ctx);\n };\n BN.prototype.redAdd = function redAdd(num2) {\n assert9(this.red, \"redAdd works only with red numbers\");\n return this.red.add(this, num2);\n };\n BN.prototype.redIAdd = function redIAdd(num2) {\n assert9(this.red, \"redIAdd works only with red numbers\");\n return this.red.iadd(this, num2);\n };\n BN.prototype.redSub = function redSub(num2) {\n assert9(this.red, \"redSub works only with red numbers\");\n return this.red.sub(this, num2);\n };\n BN.prototype.redISub = function redISub(num2) {\n assert9(this.red, \"redISub works only with red numbers\");\n return this.red.isub(this, num2);\n };\n BN.prototype.redShl = function redShl(num2) {\n assert9(this.red, \"redShl works only with red numbers\");\n return this.red.shl(this, num2);\n };\n BN.prototype.redMul = function redMul(num2) {\n assert9(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num2);\n return this.red.mul(this, num2);\n };\n BN.prototype.redIMul = function redIMul(num2) {\n assert9(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num2);\n return this.red.imul(this, num2);\n };\n BN.prototype.redSqr = function redSqr() {\n assert9(this.red, \"redSqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n BN.prototype.redISqr = function redISqr() {\n assert9(this.red, \"redISqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n BN.prototype.redSqrt = function redSqrt() {\n assert9(this.red, \"redSqrt works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n BN.prototype.redInvm = function redInvm() {\n assert9(this.red, \"redInvm works only with red numbers\");\n this.red._verify1(this);\n return this.red.invm(this);\n };\n BN.prototype.redNeg = function redNeg() {\n assert9(this.red, \"redNeg works only with red numbers\");\n this.red._verify1(this);\n return this.red.neg(this);\n };\n BN.prototype.redPow = function redPow(num2) {\n assert9(this.red && !num2.red, \"redPow(normalNum)\");\n this.red._verify1(this);\n return this.red.pow(this, num2);\n };\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n function MPrime(name, p4) {\n this.name = name;\n this.p = new BN(p4, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n this.tmp = this._tmp();\n }\n MPrime.prototype._tmp = function _tmp() {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n MPrime.prototype.ireduce = function ireduce(num2) {\n var r2 = num2;\n var rlen;\n do {\n this.split(r2, this.tmp);\n r2 = this.imulK(r2);\n r2 = r2.iadd(this.tmp);\n rlen = r2.bitLength();\n } while (rlen > this.n);\n var cmp = rlen < this.n ? -1 : r2.ucmp(this.p);\n if (cmp === 0) {\n r2.words[0] = 0;\n r2.length = 1;\n } else if (cmp > 0) {\n r2.isub(this.p);\n } else {\n if (r2.strip !== void 0) {\n r2.strip();\n } else {\n r2._strip();\n }\n }\n return r2;\n };\n MPrime.prototype.split = function split3(input, out) {\n input.iushrn(this.n, 0, out);\n };\n MPrime.prototype.imulK = function imulK(num2) {\n return num2.imul(this.k);\n };\n function K256() {\n MPrime.call(\n this,\n \"k256\",\n \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\"\n );\n }\n inherits(K256, MPrime);\n K256.prototype.split = function split3(input, output) {\n var mask = 4194303;\n var outLen = Math.min(input.length, 9);\n for (var i3 = 0; i3 < outLen; i3++) {\n output.words[i3] = input.words[i3];\n }\n output.length = outLen;\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n for (i3 = 10; i3 < input.length; i3++) {\n var next = input.words[i3] | 0;\n input.words[i3 - 10] = (next & mask) << 4 | prev >>> 22;\n prev = next;\n }\n prev >>>= 22;\n input.words[i3 - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n K256.prototype.imulK = function imulK(num2) {\n num2.words[num2.length] = 0;\n num2.words[num2.length + 1] = 0;\n num2.length += 2;\n var lo = 0;\n for (var i3 = 0; i3 < num2.length; i3++) {\n var w3 = num2.words[i3] | 0;\n lo += w3 * 977;\n num2.words[i3] = lo & 67108863;\n lo = w3 * 64 + (lo / 67108864 | 0);\n }\n if (num2.words[num2.length - 1] === 0) {\n num2.length--;\n if (num2.words[num2.length - 1] === 0) {\n num2.length--;\n }\n }\n return num2;\n };\n function P224() {\n MPrime.call(\n this,\n \"p224\",\n \"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\"\n );\n }\n inherits(P224, MPrime);\n function P192() {\n MPrime.call(\n this,\n \"p192\",\n \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\"\n );\n }\n inherits(P192, MPrime);\n function P25519() {\n MPrime.call(\n this,\n \"25519\",\n \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\"\n );\n }\n inherits(P25519, MPrime);\n P25519.prototype.imulK = function imulK(num2) {\n var carry = 0;\n for (var i3 = 0; i3 < num2.length; i3++) {\n var hi = (num2.words[i3] | 0) * 19 + carry;\n var lo = hi & 67108863;\n hi >>>= 26;\n num2.words[i3] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num2.words[num2.length++] = carry;\n }\n return num2;\n };\n BN._prime = function prime(name) {\n if (primes[name])\n return primes[name];\n var prime2;\n if (name === \"k256\") {\n prime2 = new K256();\n } else if (name === \"p224\") {\n prime2 = new P224();\n } else if (name === \"p192\") {\n prime2 = new P192();\n } else if (name === \"p25519\") {\n prime2 = new P25519();\n } else {\n throw new Error(\"Unknown prime \" + name);\n }\n primes[name] = prime2;\n return prime2;\n };\n function Red(m2) {\n if (typeof m2 === \"string\") {\n var prime = BN._prime(m2);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert9(m2.gtn(1), \"modulus must be greater than 1\");\n this.m = m2;\n this.prime = null;\n }\n }\n Red.prototype._verify1 = function _verify1(a3) {\n assert9(a3.negative === 0, \"red works only with positives\");\n assert9(a3.red, \"red works only with red numbers\");\n };\n Red.prototype._verify2 = function _verify2(a3, b4) {\n assert9((a3.negative | b4.negative) === 0, \"red works only with positives\");\n assert9(\n a3.red && a3.red === b4.red,\n \"red works only with red numbers\"\n );\n };\n Red.prototype.imod = function imod(a3) {\n if (this.prime)\n return this.prime.ireduce(a3)._forceRed(this);\n move(a3, a3.umod(this.m)._forceRed(this));\n return a3;\n };\n Red.prototype.neg = function neg(a3) {\n if (a3.isZero()) {\n return a3.clone();\n }\n return this.m.sub(a3)._forceRed(this);\n };\n Red.prototype.add = function add2(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.add(b4);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.iadd = function iadd(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.iadd(b4);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n Red.prototype.sub = function sub(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.sub(b4);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.isub = function isub(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.isub(b4);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n Red.prototype.shl = function shl(a3, num2) {\n this._verify1(a3);\n return this.imod(a3.ushln(num2));\n };\n Red.prototype.imul = function imul(a3, b4) {\n this._verify2(a3, b4);\n return this.imod(a3.imul(b4));\n };\n Red.prototype.mul = function mul(a3, b4) {\n this._verify2(a3, b4);\n return this.imod(a3.mul(b4));\n };\n Red.prototype.isqr = function isqr(a3) {\n return this.imul(a3, a3.clone());\n };\n Red.prototype.sqr = function sqr(a3) {\n return this.mul(a3, a3);\n };\n Red.prototype.sqrt = function sqrt(a3) {\n if (a3.isZero())\n return a3.clone();\n var mod3 = this.m.andln(3);\n assert9(mod3 % 2 === 1);\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a3, pow);\n }\n var q3 = this.m.subn(1);\n var s4 = 0;\n while (!q3.isZero() && q3.andln(1) === 0) {\n s4++;\n q3.iushrn(1);\n }\n assert9(!q3.isZero());\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n var lpow = this.m.subn(1).iushrn(1);\n var z2 = this.m.bitLength();\n z2 = new BN(2 * z2 * z2).toRed(this);\n while (this.pow(z2, lpow).cmp(nOne) !== 0) {\n z2.redIAdd(nOne);\n }\n var c4 = this.pow(z2, q3);\n var r2 = this.pow(a3, q3.addn(1).iushrn(1));\n var t3 = this.pow(a3, q3);\n var m2 = s4;\n while (t3.cmp(one) !== 0) {\n var tmp = t3;\n for (var i3 = 0; tmp.cmp(one) !== 0; i3++) {\n tmp = tmp.redSqr();\n }\n assert9(i3 < m2);\n var b4 = this.pow(c4, new BN(1).iushln(m2 - i3 - 1));\n r2 = r2.redMul(b4);\n c4 = b4.redSqr();\n t3 = t3.redMul(c4);\n m2 = i3;\n }\n return r2;\n };\n Red.prototype.invm = function invm(a3) {\n var inv = a3._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n Red.prototype.pow = function pow(a3, num2) {\n if (num2.isZero())\n return new BN(1).toRed(this);\n if (num2.cmpn(1) === 0)\n return a3.clone();\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a3;\n for (var i3 = 2; i3 < wnd.length; i3++) {\n wnd[i3] = this.mul(wnd[i3 - 1], a3);\n }\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num2.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n for (i3 = num2.length - 1; i3 >= 0; i3--) {\n var word = num2.words[i3];\n for (var j2 = start - 1; j2 >= 0; j2--) {\n var bit = word >> j2 & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i3 !== 0 || j2 !== 0))\n continue;\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n return res;\n };\n Red.prototype.convertTo = function convertTo(num2) {\n var r2 = num2.umod(this.m);\n return r2 === num2 ? r2.clone() : r2;\n };\n Red.prototype.convertFrom = function convertFrom(num2) {\n var res = num2.clone();\n res.red = null;\n return res;\n };\n BN.mont = function mont(num2) {\n return new Mont(num2);\n };\n function Mont(m2) {\n Red.call(this, m2);\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - this.shift % 26;\n }\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n Mont.prototype.convertTo = function convertTo(num2) {\n return this.imod(num2.ushln(this.shift));\n };\n Mont.prototype.convertFrom = function convertFrom(num2) {\n var r2 = this.imod(num2.mul(this.rinv));\n r2.red = null;\n return r2;\n };\n Mont.prototype.imul = function imul(a3, b4) {\n if (a3.isZero() || b4.isZero()) {\n a3.words[0] = 0;\n a3.length = 1;\n return a3;\n }\n var t3 = a3.imul(b4);\n var c4 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u2 = t3.isub(c4).iushrn(this.shift);\n var res = u2;\n if (u2.cmp(this.m) >= 0) {\n res = u2.isub(this.m);\n } else if (u2.cmpn(0) < 0) {\n res = u2.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.mul = function mul(a3, b4) {\n if (a3.isZero() || b4.isZero())\n return new BN(0)._forceRed(this);\n var t3 = a3.mul(b4);\n var c4 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u2 = t3.isub(c4).iushrn(this.shift);\n var res = u2;\n if (u2.cmp(this.m) >= 0) {\n res = u2.isub(this.m);\n } else if (u2.cmpn(0) < 0) {\n res = u2.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.invm = function invm(a3) {\n var res = this.imod(a3._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n })(typeof module === \"undefined\" || module, exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib/_version.js\n var require_version = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"logger/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib/index.js\n var require_lib = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+logger@5.8.0/node_modules/@ethersproject/logger/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Logger = exports3.ErrorCode = exports3.LogLevel = void 0;\n var _permanentCensorErrors = false;\n var _censorErrors = false;\n var LogLevels = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\n var _logLevel = LogLevels[\"default\"];\n var _version_1 = require_version();\n var _globalLogger = null;\n function _checkNormalize() {\n try {\n var missing_1 = [];\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach(function(form) {\n try {\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad normalize\");\n }\n ;\n } catch (error) {\n missing_1.push(form);\n }\n });\n if (missing_1.length) {\n throw new Error(\"missing \" + missing_1.join(\", \"));\n }\n if (String.fromCharCode(233).normalize(\"NFD\") !== String.fromCharCode(101, 769)) {\n throw new Error(\"broken implementation\");\n }\n } catch (error) {\n return error.message;\n }\n return null;\n }\n var _normalizeError = _checkNormalize();\n var LogLevel2;\n (function(LogLevel3) {\n LogLevel3[\"DEBUG\"] = \"DEBUG\";\n LogLevel3[\"INFO\"] = \"INFO\";\n LogLevel3[\"WARNING\"] = \"WARNING\";\n LogLevel3[\"ERROR\"] = \"ERROR\";\n LogLevel3[\"OFF\"] = \"OFF\";\n })(LogLevel2 = exports3.LogLevel || (exports3.LogLevel = {}));\n var ErrorCode;\n (function(ErrorCode2) {\n ErrorCode2[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n ErrorCode2[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n ErrorCode2[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\n ErrorCode2[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n ErrorCode2[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n ErrorCode2[\"TIMEOUT\"] = \"TIMEOUT\";\n ErrorCode2[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n ErrorCode2[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ErrorCode2[\"MISSING_NEW\"] = \"MISSING_NEW\";\n ErrorCode2[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n ErrorCode2[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n ErrorCode2[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ErrorCode2[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n ErrorCode2[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n ErrorCode2[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n ErrorCode2[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n ErrorCode2[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\n ErrorCode2[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ErrorCode2[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n })(ErrorCode = exports3.ErrorCode || (exports3.ErrorCode = {}));\n var HEX = \"0123456789abcdef\";\n var Logger2 = (\n /** @class */\n function() {\n function Logger3(version7) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version7,\n writable: false\n });\n }\n Logger3.prototype._log = function(logLevel, args) {\n var level = logLevel.toLowerCase();\n if (LogLevels[level] == null) {\n this.throwArgumentError(\"invalid log level name\", \"logLevel\", logLevel);\n }\n if (_logLevel > LogLevels[level]) {\n return;\n }\n console.log.apply(console, args);\n };\n Logger3.prototype.debug = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this._log(Logger3.levels.DEBUG, args);\n };\n Logger3.prototype.info = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this._log(Logger3.levels.INFO, args);\n };\n Logger3.prototype.warn = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this._log(Logger3.levels.WARNING, args);\n };\n Logger3.prototype.makeError = function(message2, code, params) {\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = Logger3.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n var messageDetails = [];\n Object.keys(params).forEach(function(key) {\n var value = params[key];\n try {\n if (value instanceof Uint8Array) {\n var hex = \"\";\n for (var i3 = 0; i3 < value.length; i3++) {\n hex += HEX[value[i3] >> 4];\n hex += HEX[value[i3] & 15];\n }\n messageDetails.push(key + \"=Uint8Array(0x\" + hex + \")\");\n } else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\n } catch (error2) {\n messageDetails.push(key + \"=\" + JSON.stringify(params[key].toString()));\n }\n });\n messageDetails.push(\"code=\" + code);\n messageDetails.push(\"version=\" + this.version);\n var reason = message2;\n var url = \"\";\n switch (code) {\n case ErrorCode.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n var fault = message2;\n switch (fault) {\n case \"overflow\":\n case \"underflow\":\n case \"division-by-zero\":\n url += \"-\" + fault;\n break;\n case \"negative-power\":\n case \"negative-width\":\n url += \"-unsupported\";\n break;\n case \"unbound-bitwise-result\":\n url += \"-unbound-result\";\n break;\n }\n break;\n }\n case ErrorCode.CALL_EXCEPTION:\n case ErrorCode.INSUFFICIENT_FUNDS:\n case ErrorCode.MISSING_NEW:\n case ErrorCode.NONCE_EXPIRED:\n case ErrorCode.REPLACEMENT_UNDERPRICED:\n case ErrorCode.TRANSACTION_REPLACED:\n case ErrorCode.UNPREDICTABLE_GAS_LIMIT:\n url = code;\n break;\n }\n if (url) {\n message2 += \" [ See: https://links.ethers.org/v5-errors-\" + url + \" ]\";\n }\n if (messageDetails.length) {\n message2 += \" (\" + messageDetails.join(\", \") + \")\";\n }\n var error = new Error(message2);\n error.reason = reason;\n error.code = code;\n Object.keys(params).forEach(function(key) {\n error[key] = params[key];\n });\n return error;\n };\n Logger3.prototype.throwError = function(message2, code, params) {\n throw this.makeError(message2, code, params);\n };\n Logger3.prototype.throwArgumentError = function(message2, name, value) {\n return this.throwError(message2, Logger3.errors.INVALID_ARGUMENT, {\n argument: name,\n value\n });\n };\n Logger3.prototype.assert = function(condition, message2, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message2, code, params);\n };\n Logger3.prototype.assertArgument = function(condition, message2, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message2, name, value);\n };\n Logger3.prototype.checkNormalize = function(message2) {\n if (message2 == null) {\n message2 = \"platform missing String.prototype.normalize\";\n }\n if (_normalizeError) {\n this.throwError(\"platform missing String.prototype.normalize\", Logger3.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\",\n form: _normalizeError\n });\n }\n };\n Logger3.prototype.checkSafeUint53 = function(value, message2) {\n if (typeof value !== \"number\") {\n return;\n }\n if (message2 == null) {\n message2 = \"value not safe\";\n }\n if (value < 0 || value >= 9007199254740991) {\n this.throwError(message2, Logger3.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value\n });\n }\n if (value % 1) {\n this.throwError(message2, Logger3.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value\n });\n }\n };\n Logger3.prototype.checkArgumentCount = function(count, expectedCount, message2) {\n if (message2) {\n message2 = \": \" + message2;\n } else {\n message2 = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message2, Logger3.errors.MISSING_ARGUMENT, {\n count,\n expectedCount\n });\n }\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message2, Logger3.errors.UNEXPECTED_ARGUMENT, {\n count,\n expectedCount\n });\n }\n };\n Logger3.prototype.checkNew = function(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger3.errors.MISSING_NEW, { name: kind.name });\n }\n };\n Logger3.prototype.checkAbstract = function(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", Logger3.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: \"new\" });\n } else if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger3.errors.MISSING_NEW, { name: kind.name });\n }\n };\n Logger3.globalLogger = function() {\n if (!_globalLogger) {\n _globalLogger = new Logger3(_version_1.version);\n }\n return _globalLogger;\n };\n Logger3.setCensorship = function(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger3.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", Logger3.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n };\n Logger3.setLogLevel = function(logLevel) {\n var level = LogLevels[logLevel.toLowerCase()];\n if (level == null) {\n Logger3.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel = level;\n };\n Logger3.from = function(version7) {\n return new Logger3(version7);\n };\n Logger3.errors = ErrorCode;\n Logger3.levels = LogLevel2;\n return Logger3;\n }()\n );\n exports3.Logger = Logger2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib/_version.js\n var require_version2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"bytes/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib/index.js\n var require_lib2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bytes@5.8.0/node_modules/@ethersproject/bytes/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.joinSignature = exports3.splitSignature = exports3.hexZeroPad = exports3.hexStripZeros = exports3.hexValue = exports3.hexConcat = exports3.hexDataSlice = exports3.hexDataLength = exports3.hexlify = exports3.isHexString = exports3.zeroPad = exports3.stripZeros = exports3.concat = exports3.arrayify = exports3.isBytes = exports3.isBytesLike = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version2();\n var logger = new logger_1.Logger(_version_1.version);\n function isHexable(value) {\n return !!value.toHexString;\n }\n function addSlice(array) {\n if (array.slice) {\n return array;\n }\n array.slice = function() {\n var args = Array.prototype.slice.call(arguments);\n return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args)));\n };\n return array;\n }\n function isBytesLike(value) {\n return isHexString(value) && !(value.length % 2) || isBytes5(value);\n }\n exports3.isBytesLike = isBytesLike;\n function isInteger(value) {\n return typeof value === \"number\" && value == value && value % 1 === 0;\n }\n function isBytes5(value) {\n if (value == null) {\n return false;\n }\n if (value.constructor === Uint8Array) {\n return true;\n }\n if (typeof value === \"string\") {\n return false;\n }\n if (!isInteger(value.length) || value.length < 0) {\n return false;\n }\n for (var i3 = 0; i3 < value.length; i3++) {\n var v2 = value[i3];\n if (!isInteger(v2) || v2 < 0 || v2 >= 256) {\n return false;\n }\n }\n return true;\n }\n exports3.isBytes = isBytes5;\n function arrayify(value, options) {\n if (!options) {\n options = {};\n }\n if (typeof value === \"number\") {\n logger.checkSafeUint53(value, \"invalid arrayify value\");\n var result = [];\n while (value) {\n result.unshift(value & 255);\n value = parseInt(String(value / 256));\n }\n if (result.length === 0) {\n result.push(0);\n }\n return addSlice(new Uint8Array(result));\n }\n if (options.allowMissingPrefix && typeof value === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if (isHexable(value)) {\n value = value.toHexString();\n }\n if (isHexString(value)) {\n var hex = value.substring(2);\n if (hex.length % 2) {\n if (options.hexPad === \"left\") {\n hex = \"0\" + hex;\n } else if (options.hexPad === \"right\") {\n hex += \"0\";\n } else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n var result = [];\n for (var i3 = 0; i3 < hex.length; i3 += 2) {\n result.push(parseInt(hex.substring(i3, i3 + 2), 16));\n }\n return addSlice(new Uint8Array(result));\n }\n if (isBytes5(value)) {\n return addSlice(new Uint8Array(value));\n }\n return logger.throwArgumentError(\"invalid arrayify value\", \"value\", value);\n }\n exports3.arrayify = arrayify;\n function concat6(items) {\n var objects = items.map(function(item) {\n return arrayify(item);\n });\n var length = objects.reduce(function(accum, item) {\n return accum + item.length;\n }, 0);\n var result = new Uint8Array(length);\n objects.reduce(function(offset, object) {\n result.set(object, offset);\n return offset + object.length;\n }, 0);\n return addSlice(result);\n }\n exports3.concat = concat6;\n function stripZeros(value) {\n var result = arrayify(value);\n if (result.length === 0) {\n return result;\n }\n var start = 0;\n while (start < result.length && result[start] === 0) {\n start++;\n }\n if (start) {\n result = result.slice(start);\n }\n return result;\n }\n exports3.stripZeros = stripZeros;\n function zeroPad(value, length) {\n value = arrayify(value);\n if (value.length > length) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[0]);\n }\n var result = new Uint8Array(length);\n result.set(value, length - value.length);\n return addSlice(result);\n }\n exports3.zeroPad = zeroPad;\n function isHexString(value, length) {\n if (typeof value !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false;\n }\n if (length && value.length !== 2 + 2 * length) {\n return false;\n }\n return true;\n }\n exports3.isHexString = isHexString;\n var HexCharacters = \"0123456789abcdef\";\n function hexlify(value, options) {\n if (!options) {\n options = {};\n }\n if (typeof value === \"number\") {\n logger.checkSafeUint53(value, \"invalid hexlify value\");\n var hex = \"\";\n while (value) {\n hex = HexCharacters[value & 15] + hex;\n value = Math.floor(value / 16);\n }\n if (hex.length) {\n if (hex.length % 2) {\n hex = \"0\" + hex;\n }\n return \"0x\" + hex;\n }\n return \"0x00\";\n }\n if (typeof value === \"bigint\") {\n value = value.toString(16);\n if (value.length % 2) {\n return \"0x0\" + value;\n }\n return \"0x\" + value;\n }\n if (options.allowMissingPrefix && typeof value === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if (isHexable(value)) {\n return value.toHexString();\n }\n if (isHexString(value)) {\n if (value.length % 2) {\n if (options.hexPad === \"left\") {\n value = \"0x0\" + value.substring(2);\n } else if (options.hexPad === \"right\") {\n value += \"0\";\n } else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n return value.toLowerCase();\n }\n if (isBytes5(value)) {\n var result = \"0x\";\n for (var i3 = 0; i3 < value.length; i3++) {\n var v2 = value[i3];\n result += HexCharacters[(v2 & 240) >> 4] + HexCharacters[v2 & 15];\n }\n return result;\n }\n return logger.throwArgumentError(\"invalid hexlify value\", \"value\", value);\n }\n exports3.hexlify = hexlify;\n function hexDataLength(data) {\n if (typeof data !== \"string\") {\n data = hexlify(data);\n } else if (!isHexString(data) || data.length % 2) {\n return null;\n }\n return (data.length - 2) / 2;\n }\n exports3.hexDataLength = hexDataLength;\n function hexDataSlice(data, offset, endOffset) {\n if (typeof data !== \"string\") {\n data = hexlify(data);\n } else if (!isHexString(data) || data.length % 2) {\n logger.throwArgumentError(\"invalid hexData\", \"value\", data);\n }\n offset = 2 + 2 * offset;\n if (endOffset != null) {\n return \"0x\" + data.substring(offset, 2 + 2 * endOffset);\n }\n return \"0x\" + data.substring(offset);\n }\n exports3.hexDataSlice = hexDataSlice;\n function hexConcat(items) {\n var result = \"0x\";\n items.forEach(function(item) {\n result += hexlify(item).substring(2);\n });\n return result;\n }\n exports3.hexConcat = hexConcat;\n function hexValue(value) {\n var trimmed = hexStripZeros(hexlify(value, { hexPad: \"left\" }));\n if (trimmed === \"0x\") {\n return \"0x0\";\n }\n return trimmed;\n }\n exports3.hexValue = hexValue;\n function hexStripZeros(value) {\n if (typeof value !== \"string\") {\n value = hexlify(value);\n }\n if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n value = value.substring(2);\n var offset = 0;\n while (offset < value.length && value[offset] === \"0\") {\n offset++;\n }\n return \"0x\" + value.substring(offset);\n }\n exports3.hexStripZeros = hexStripZeros;\n function hexZeroPad(value, length) {\n if (typeof value !== \"string\") {\n value = hexlify(value);\n } else if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n if (value.length > 2 * length + 2) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[1]);\n }\n while (value.length < 2 * length + 2) {\n value = \"0x0\" + value.substring(2);\n }\n return value;\n }\n exports3.hexZeroPad = hexZeroPad;\n function splitSignature(signature) {\n var result = {\n r: \"0x\",\n s: \"0x\",\n _vs: \"0x\",\n recoveryParam: 0,\n v: 0,\n yParityAndS: \"0x\",\n compact: \"0x\"\n };\n if (isBytesLike(signature)) {\n var bytes = arrayify(signature);\n if (bytes.length === 64) {\n result.v = 27 + (bytes[32] >> 7);\n bytes[32] &= 127;\n result.r = hexlify(bytes.slice(0, 32));\n result.s = hexlify(bytes.slice(32, 64));\n } else if (bytes.length === 65) {\n result.r = hexlify(bytes.slice(0, 32));\n result.s = hexlify(bytes.slice(32, 64));\n result.v = bytes[64];\n } else {\n logger.throwArgumentError(\"invalid signature string\", \"signature\", signature);\n }\n if (result.v < 27) {\n if (result.v === 0 || result.v === 1) {\n result.v += 27;\n } else {\n logger.throwArgumentError(\"signature invalid v byte\", \"signature\", signature);\n }\n }\n result.recoveryParam = 1 - result.v % 2;\n if (result.recoveryParam) {\n bytes[32] |= 128;\n }\n result._vs = hexlify(bytes.slice(32, 64));\n } else {\n result.r = signature.r;\n result.s = signature.s;\n result.v = signature.v;\n result.recoveryParam = signature.recoveryParam;\n result._vs = signature._vs;\n if (result._vs != null) {\n var vs_1 = zeroPad(arrayify(result._vs), 32);\n result._vs = hexlify(vs_1);\n var recoveryParam = vs_1[0] >= 128 ? 1 : 0;\n if (result.recoveryParam == null) {\n result.recoveryParam = recoveryParam;\n } else if (result.recoveryParam !== recoveryParam) {\n logger.throwArgumentError(\"signature recoveryParam mismatch _vs\", \"signature\", signature);\n }\n vs_1[0] &= 127;\n var s4 = hexlify(vs_1);\n if (result.s == null) {\n result.s = s4;\n } else if (result.s !== s4) {\n logger.throwArgumentError(\"signature v mismatch _vs\", \"signature\", signature);\n }\n }\n if (result.recoveryParam == null) {\n if (result.v == null) {\n logger.throwArgumentError(\"signature missing v and recoveryParam\", \"signature\", signature);\n } else if (result.v === 0 || result.v === 1) {\n result.recoveryParam = result.v;\n } else {\n result.recoveryParam = 1 - result.v % 2;\n }\n } else {\n if (result.v == null) {\n result.v = 27 + result.recoveryParam;\n } else {\n var recId = result.v === 0 || result.v === 1 ? result.v : 1 - result.v % 2;\n if (result.recoveryParam !== recId) {\n logger.throwArgumentError(\"signature recoveryParam mismatch v\", \"signature\", signature);\n }\n }\n }\n if (result.r == null || !isHexString(result.r)) {\n logger.throwArgumentError(\"signature missing or invalid r\", \"signature\", signature);\n } else {\n result.r = hexZeroPad(result.r, 32);\n }\n if (result.s == null || !isHexString(result.s)) {\n logger.throwArgumentError(\"signature missing or invalid s\", \"signature\", signature);\n } else {\n result.s = hexZeroPad(result.s, 32);\n }\n var vs = arrayify(result.s);\n if (vs[0] >= 128) {\n logger.throwArgumentError(\"signature s out of range\", \"signature\", signature);\n }\n if (result.recoveryParam) {\n vs[0] |= 128;\n }\n var _vs = hexlify(vs);\n if (result._vs) {\n if (!isHexString(result._vs)) {\n logger.throwArgumentError(\"signature invalid _vs\", \"signature\", signature);\n }\n result._vs = hexZeroPad(result._vs, 32);\n }\n if (result._vs == null) {\n result._vs = _vs;\n } else if (result._vs !== _vs) {\n logger.throwArgumentError(\"signature _vs mismatch v and s\", \"signature\", signature);\n }\n }\n result.yParityAndS = result._vs;\n result.compact = result.r + result.yParityAndS.substring(2);\n return result;\n }\n exports3.splitSignature = splitSignature;\n function joinSignature(signature) {\n signature = splitSignature(signature);\n return hexlify(concat6([\n signature.r,\n signature.s,\n signature.recoveryParam ? \"0x1c\" : \"0x1b\"\n ]));\n }\n exports3.joinSignature = joinSignature;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/_version.js\n var require_version3 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"bignumber/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/bignumber.js\n var require_bignumber = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/bignumber.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3._base16To36 = exports3._base36To16 = exports3.BigNumber = exports3.isBigNumberish = void 0;\n var bn_js_1 = __importDefault4(require_bn());\n var BN = bn_js_1.default.BN;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version3();\n var logger = new logger_1.Logger(_version_1.version);\n var _constructorGuard = {};\n var MAX_SAFE = 9007199254740991;\n function isBigNumberish2(value) {\n return value != null && (BigNumber.isBigNumber(value) || typeof value === \"number\" && value % 1 === 0 || typeof value === \"string\" && !!value.match(/^-?[0-9]+$/) || (0, bytes_1.isHexString)(value) || typeof value === \"bigint\" || (0, bytes_1.isBytes)(value));\n }\n exports3.isBigNumberish = isBigNumberish2;\n var _warnedToStringRadix = false;\n var BigNumber = (\n /** @class */\n function() {\n function BigNumber2(constructorGuard, hex) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot call constructor directly; use BigNumber.from\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new (BigNumber)\"\n });\n }\n this._hex = hex;\n this._isBigNumber = true;\n Object.freeze(this);\n }\n BigNumber2.prototype.fromTwos = function(value) {\n return toBigNumber(toBN(this).fromTwos(value));\n };\n BigNumber2.prototype.toTwos = function(value) {\n return toBigNumber(toBN(this).toTwos(value));\n };\n BigNumber2.prototype.abs = function() {\n if (this._hex[0] === \"-\") {\n return BigNumber2.from(this._hex.substring(1));\n }\n return this;\n };\n BigNumber2.prototype.add = function(other) {\n return toBigNumber(toBN(this).add(toBN(other)));\n };\n BigNumber2.prototype.sub = function(other) {\n return toBigNumber(toBN(this).sub(toBN(other)));\n };\n BigNumber2.prototype.div = function(other) {\n var o5 = BigNumber2.from(other);\n if (o5.isZero()) {\n throwFault(\"division-by-zero\", \"div\");\n }\n return toBigNumber(toBN(this).div(toBN(other)));\n };\n BigNumber2.prototype.mul = function(other) {\n return toBigNumber(toBN(this).mul(toBN(other)));\n };\n BigNumber2.prototype.mod = function(other) {\n var value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"division-by-zero\", \"mod\");\n }\n return toBigNumber(toBN(this).umod(value));\n };\n BigNumber2.prototype.pow = function(other) {\n var value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"negative-power\", \"pow\");\n }\n return toBigNumber(toBN(this).pow(value));\n };\n BigNumber2.prototype.and = function(other) {\n var value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"unbound-bitwise-result\", \"and\");\n }\n return toBigNumber(toBN(this).and(value));\n };\n BigNumber2.prototype.or = function(other) {\n var value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"unbound-bitwise-result\", \"or\");\n }\n return toBigNumber(toBN(this).or(value));\n };\n BigNumber2.prototype.xor = function(other) {\n var value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"unbound-bitwise-result\", \"xor\");\n }\n return toBigNumber(toBN(this).xor(value));\n };\n BigNumber2.prototype.mask = function(value) {\n if (this.isNegative() || value < 0) {\n throwFault(\"negative-width\", \"mask\");\n }\n return toBigNumber(toBN(this).maskn(value));\n };\n BigNumber2.prototype.shl = function(value) {\n if (this.isNegative() || value < 0) {\n throwFault(\"negative-width\", \"shl\");\n }\n return toBigNumber(toBN(this).shln(value));\n };\n BigNumber2.prototype.shr = function(value) {\n if (this.isNegative() || value < 0) {\n throwFault(\"negative-width\", \"shr\");\n }\n return toBigNumber(toBN(this).shrn(value));\n };\n BigNumber2.prototype.eq = function(other) {\n return toBN(this).eq(toBN(other));\n };\n BigNumber2.prototype.lt = function(other) {\n return toBN(this).lt(toBN(other));\n };\n BigNumber2.prototype.lte = function(other) {\n return toBN(this).lte(toBN(other));\n };\n BigNumber2.prototype.gt = function(other) {\n return toBN(this).gt(toBN(other));\n };\n BigNumber2.prototype.gte = function(other) {\n return toBN(this).gte(toBN(other));\n };\n BigNumber2.prototype.isNegative = function() {\n return this._hex[0] === \"-\";\n };\n BigNumber2.prototype.isZero = function() {\n return toBN(this).isZero();\n };\n BigNumber2.prototype.toNumber = function() {\n try {\n return toBN(this).toNumber();\n } catch (error) {\n throwFault(\"overflow\", \"toNumber\", this.toString());\n }\n return null;\n };\n BigNumber2.prototype.toBigInt = function() {\n try {\n return BigInt(this.toString());\n } catch (e2) {\n }\n return logger.throwError(\"this platform does not support BigInt\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n value: this.toString()\n });\n };\n BigNumber2.prototype.toString = function() {\n if (arguments.length > 0) {\n if (arguments[0] === 10) {\n if (!_warnedToStringRadix) {\n _warnedToStringRadix = true;\n logger.warn(\"BigNumber.toString does not accept any parameters; base-10 is assumed\");\n }\n } else if (arguments[0] === 16) {\n logger.throwError(\"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()\", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {});\n } else {\n logger.throwError(\"BigNumber.toString does not accept parameters\", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {});\n }\n }\n return toBN(this).toString(10);\n };\n BigNumber2.prototype.toHexString = function() {\n return this._hex;\n };\n BigNumber2.prototype.toJSON = function(key) {\n return { type: \"BigNumber\", hex: this.toHexString() };\n };\n BigNumber2.from = function(value) {\n if (value instanceof BigNumber2) {\n return value;\n }\n if (typeof value === \"string\") {\n if (value.match(/^-?0x[0-9a-f]+$/i)) {\n return new BigNumber2(_constructorGuard, toHex3(value));\n }\n if (value.match(/^-?[0-9]+$/)) {\n return new BigNumber2(_constructorGuard, toHex3(new BN(value)));\n }\n return logger.throwArgumentError(\"invalid BigNumber string\", \"value\", value);\n }\n if (typeof value === \"number\") {\n if (value % 1) {\n throwFault(\"underflow\", \"BigNumber.from\", value);\n }\n if (value >= MAX_SAFE || value <= -MAX_SAFE) {\n throwFault(\"overflow\", \"BigNumber.from\", value);\n }\n return BigNumber2.from(String(value));\n }\n var anyValue = value;\n if (typeof anyValue === \"bigint\") {\n return BigNumber2.from(anyValue.toString());\n }\n if ((0, bytes_1.isBytes)(anyValue)) {\n return BigNumber2.from((0, bytes_1.hexlify)(anyValue));\n }\n if (anyValue) {\n if (anyValue.toHexString) {\n var hex = anyValue.toHexString();\n if (typeof hex === \"string\") {\n return BigNumber2.from(hex);\n }\n } else {\n var hex = anyValue._hex;\n if (hex == null && anyValue.type === \"BigNumber\") {\n hex = anyValue.hex;\n }\n if (typeof hex === \"string\") {\n if ((0, bytes_1.isHexString)(hex) || hex[0] === \"-\" && (0, bytes_1.isHexString)(hex.substring(1))) {\n return BigNumber2.from(hex);\n }\n }\n }\n }\n return logger.throwArgumentError(\"invalid BigNumber value\", \"value\", value);\n };\n BigNumber2.isBigNumber = function(value) {\n return !!(value && value._isBigNumber);\n };\n return BigNumber2;\n }()\n );\n exports3.BigNumber = BigNumber;\n function toHex3(value) {\n if (typeof value !== \"string\") {\n return toHex3(value.toString(16));\n }\n if (value[0] === \"-\") {\n value = value.substring(1);\n if (value[0] === \"-\") {\n logger.throwArgumentError(\"invalid hex\", \"value\", value);\n }\n value = toHex3(value);\n if (value === \"0x00\") {\n return value;\n }\n return \"-\" + value;\n }\n if (value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if (value === \"0x\") {\n return \"0x00\";\n }\n if (value.length % 2) {\n value = \"0x0\" + value.substring(2);\n }\n while (value.length > 4 && value.substring(0, 4) === \"0x00\") {\n value = \"0x\" + value.substring(4);\n }\n return value;\n }\n function toBigNumber(value) {\n return BigNumber.from(toHex3(value));\n }\n function toBN(value) {\n var hex = BigNumber.from(value).toHexString();\n if (hex[0] === \"-\") {\n return new BN(\"-\" + hex.substring(3), 16);\n }\n return new BN(hex.substring(2), 16);\n }\n function throwFault(fault, operation, value) {\n var params = { fault, operation };\n if (value != null) {\n params.value = value;\n }\n return logger.throwError(fault, logger_1.Logger.errors.NUMERIC_FAULT, params);\n }\n function _base36To16(value) {\n return new BN(value, 36).toString(16);\n }\n exports3._base36To16 = _base36To16;\n function _base16To36(value) {\n return new BN(value, 16).toString(36);\n }\n exports3._base16To36 = _base16To36;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/fixednumber.js\n var require_fixednumber = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/fixednumber.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FixedNumber = exports3.FixedFormat = exports3.parseFixed = exports3.formatFixed = void 0;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version3();\n var logger = new logger_1.Logger(_version_1.version);\n var bignumber_1 = require_bignumber();\n var _constructorGuard = {};\n var Zero = bignumber_1.BigNumber.from(0);\n var NegativeOne = bignumber_1.BigNumber.from(-1);\n function throwFault(message2, fault, operation, value) {\n var params = { fault, operation };\n if (value !== void 0) {\n params.value = value;\n }\n return logger.throwError(message2, logger_1.Logger.errors.NUMERIC_FAULT, params);\n }\n var zeros = \"0\";\n while (zeros.length < 256) {\n zeros += zeros;\n }\n function getMultiplier(decimals) {\n if (typeof decimals !== \"number\") {\n try {\n decimals = bignumber_1.BigNumber.from(decimals).toNumber();\n } catch (e2) {\n }\n }\n if (typeof decimals === \"number\" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {\n return \"1\" + zeros.substring(0, decimals);\n }\n return logger.throwArgumentError(\"invalid decimal size\", \"decimals\", decimals);\n }\n function formatFixed(value, decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n var multiplier = getMultiplier(decimals);\n value = bignumber_1.BigNumber.from(value);\n var negative = value.lt(Zero);\n if (negative) {\n value = value.mul(NegativeOne);\n }\n var fraction = value.mod(multiplier).toString();\n while (fraction.length < multiplier.length - 1) {\n fraction = \"0\" + fraction;\n }\n fraction = fraction.match(/^([0-9]*[1-9]|0)(0*)/)[1];\n var whole = value.div(multiplier).toString();\n if (multiplier.length === 1) {\n value = whole;\n } else {\n value = whole + \".\" + fraction;\n }\n if (negative) {\n value = \"-\" + value;\n }\n return value;\n }\n exports3.formatFixed = formatFixed;\n function parseFixed(value, decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n var multiplier = getMultiplier(decimals);\n if (typeof value !== \"string\" || !value.match(/^-?[0-9.]+$/)) {\n logger.throwArgumentError(\"invalid decimal value\", \"value\", value);\n }\n var negative = value.substring(0, 1) === \"-\";\n if (negative) {\n value = value.substring(1);\n }\n if (value === \".\") {\n logger.throwArgumentError(\"missing value\", \"value\", value);\n }\n var comps = value.split(\".\");\n if (comps.length > 2) {\n logger.throwArgumentError(\"too many decimal points\", \"value\", value);\n }\n var whole = comps[0], fraction = comps[1];\n if (!whole) {\n whole = \"0\";\n }\n if (!fraction) {\n fraction = \"0\";\n }\n while (fraction[fraction.length - 1] === \"0\") {\n fraction = fraction.substring(0, fraction.length - 1);\n }\n if (fraction.length > multiplier.length - 1) {\n throwFault(\"fractional component exceeds decimals\", \"underflow\", \"parseFixed\");\n }\n if (fraction === \"\") {\n fraction = \"0\";\n }\n while (fraction.length < multiplier.length - 1) {\n fraction += \"0\";\n }\n var wholeValue = bignumber_1.BigNumber.from(whole);\n var fractionValue = bignumber_1.BigNumber.from(fraction);\n var wei = wholeValue.mul(multiplier).add(fractionValue);\n if (negative) {\n wei = wei.mul(NegativeOne);\n }\n return wei;\n }\n exports3.parseFixed = parseFixed;\n var FixedFormat = (\n /** @class */\n function() {\n function FixedFormat2(constructorGuard, signed, width, decimals) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot use FixedFormat constructor; use FixedFormat.from\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new FixedFormat\"\n });\n }\n this.signed = signed;\n this.width = width;\n this.decimals = decimals;\n this.name = (signed ? \"\" : \"u\") + \"fixed\" + String(width) + \"x\" + String(decimals);\n this._multiplier = getMultiplier(decimals);\n Object.freeze(this);\n }\n FixedFormat2.from = function(value) {\n if (value instanceof FixedFormat2) {\n return value;\n }\n if (typeof value === \"number\") {\n value = \"fixed128x\" + value;\n }\n var signed = true;\n var width = 128;\n var decimals = 18;\n if (typeof value === \"string\") {\n if (value === \"fixed\") {\n } else if (value === \"ufixed\") {\n signed = false;\n } else {\n var match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);\n if (!match) {\n logger.throwArgumentError(\"invalid fixed format\", \"format\", value);\n }\n signed = match[1] !== \"u\";\n width = parseInt(match[2]);\n decimals = parseInt(match[3]);\n }\n } else if (value) {\n var check2 = function(key, type, defaultValue) {\n if (value[key] == null) {\n return defaultValue;\n }\n if (typeof value[key] !== type) {\n logger.throwArgumentError(\"invalid fixed format (\" + key + \" not \" + type + \")\", \"format.\" + key, value[key]);\n }\n return value[key];\n };\n signed = check2(\"signed\", \"boolean\", signed);\n width = check2(\"width\", \"number\", width);\n decimals = check2(\"decimals\", \"number\", decimals);\n }\n if (width % 8) {\n logger.throwArgumentError(\"invalid fixed format width (not byte aligned)\", \"format.width\", width);\n }\n if (decimals > 80) {\n logger.throwArgumentError(\"invalid fixed format (decimals too large)\", \"format.decimals\", decimals);\n }\n return new FixedFormat2(_constructorGuard, signed, width, decimals);\n };\n return FixedFormat2;\n }()\n );\n exports3.FixedFormat = FixedFormat;\n var FixedNumber = (\n /** @class */\n function() {\n function FixedNumber2(constructorGuard, hex, value, format) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot use FixedNumber constructor; use FixedNumber.from\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new FixedFormat\"\n });\n }\n this.format = format;\n this._hex = hex;\n this._value = value;\n this._isFixedNumber = true;\n Object.freeze(this);\n }\n FixedNumber2.prototype._checkFormat = function(other) {\n if (this.format.name !== other.format.name) {\n logger.throwArgumentError(\"incompatible format; use fixedNumber.toFormat\", \"other\", other);\n }\n };\n FixedNumber2.prototype.addUnsafe = function(other) {\n this._checkFormat(other);\n var a3 = parseFixed(this._value, this.format.decimals);\n var b4 = parseFixed(other._value, other.format.decimals);\n return FixedNumber2.fromValue(a3.add(b4), this.format.decimals, this.format);\n };\n FixedNumber2.prototype.subUnsafe = function(other) {\n this._checkFormat(other);\n var a3 = parseFixed(this._value, this.format.decimals);\n var b4 = parseFixed(other._value, other.format.decimals);\n return FixedNumber2.fromValue(a3.sub(b4), this.format.decimals, this.format);\n };\n FixedNumber2.prototype.mulUnsafe = function(other) {\n this._checkFormat(other);\n var a3 = parseFixed(this._value, this.format.decimals);\n var b4 = parseFixed(other._value, other.format.decimals);\n return FixedNumber2.fromValue(a3.mul(b4).div(this.format._multiplier), this.format.decimals, this.format);\n };\n FixedNumber2.prototype.divUnsafe = function(other) {\n this._checkFormat(other);\n var a3 = parseFixed(this._value, this.format.decimals);\n var b4 = parseFixed(other._value, other.format.decimals);\n return FixedNumber2.fromValue(a3.mul(this.format._multiplier).div(b4), this.format.decimals, this.format);\n };\n FixedNumber2.prototype.floor = function() {\n var comps = this.toString().split(\".\");\n if (comps.length === 1) {\n comps.push(\"0\");\n }\n var result = FixedNumber2.from(comps[0], this.format);\n var hasFraction = !comps[1].match(/^(0*)$/);\n if (this.isNegative() && hasFraction) {\n result = result.subUnsafe(ONE.toFormat(result.format));\n }\n return result;\n };\n FixedNumber2.prototype.ceiling = function() {\n var comps = this.toString().split(\".\");\n if (comps.length === 1) {\n comps.push(\"0\");\n }\n var result = FixedNumber2.from(comps[0], this.format);\n var hasFraction = !comps[1].match(/^(0*)$/);\n if (!this.isNegative() && hasFraction) {\n result = result.addUnsafe(ONE.toFormat(result.format));\n }\n return result;\n };\n FixedNumber2.prototype.round = function(decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n var comps = this.toString().split(\".\");\n if (comps.length === 1) {\n comps.push(\"0\");\n }\n if (decimals < 0 || decimals > 80 || decimals % 1) {\n logger.throwArgumentError(\"invalid decimal count\", \"decimals\", decimals);\n }\n if (comps[1].length <= decimals) {\n return this;\n }\n var factor = FixedNumber2.from(\"1\" + zeros.substring(0, decimals), this.format);\n var bump = BUMP.toFormat(this.format);\n return this.mulUnsafe(factor).addUnsafe(bump).floor().divUnsafe(factor);\n };\n FixedNumber2.prototype.isZero = function() {\n return this._value === \"0.0\" || this._value === \"0\";\n };\n FixedNumber2.prototype.isNegative = function() {\n return this._value[0] === \"-\";\n };\n FixedNumber2.prototype.toString = function() {\n return this._value;\n };\n FixedNumber2.prototype.toHexString = function(width) {\n if (width == null) {\n return this._hex;\n }\n if (width % 8) {\n logger.throwArgumentError(\"invalid byte width\", \"width\", width);\n }\n var hex = bignumber_1.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString();\n return (0, bytes_1.hexZeroPad)(hex, width / 8);\n };\n FixedNumber2.prototype.toUnsafeFloat = function() {\n return parseFloat(this.toString());\n };\n FixedNumber2.prototype.toFormat = function(format) {\n return FixedNumber2.fromString(this._value, format);\n };\n FixedNumber2.fromValue = function(value, decimals, format) {\n if (format == null && decimals != null && !(0, bignumber_1.isBigNumberish)(decimals)) {\n format = decimals;\n decimals = null;\n }\n if (decimals == null) {\n decimals = 0;\n }\n if (format == null) {\n format = \"fixed\";\n }\n return FixedNumber2.fromString(formatFixed(value, decimals), FixedFormat.from(format));\n };\n FixedNumber2.fromString = function(value, format) {\n if (format == null) {\n format = \"fixed\";\n }\n var fixedFormat = FixedFormat.from(format);\n var numeric = parseFixed(value, fixedFormat.decimals);\n if (!fixedFormat.signed && numeric.lt(Zero)) {\n throwFault(\"unsigned value cannot be negative\", \"overflow\", \"value\", value);\n }\n var hex = null;\n if (fixedFormat.signed) {\n hex = numeric.toTwos(fixedFormat.width).toHexString();\n } else {\n hex = numeric.toHexString();\n hex = (0, bytes_1.hexZeroPad)(hex, fixedFormat.width / 8);\n }\n var decimal = formatFixed(numeric, fixedFormat.decimals);\n return new FixedNumber2(_constructorGuard, hex, decimal, fixedFormat);\n };\n FixedNumber2.fromBytes = function(value, format) {\n if (format == null) {\n format = \"fixed\";\n }\n var fixedFormat = FixedFormat.from(format);\n if ((0, bytes_1.arrayify)(value).length > fixedFormat.width / 8) {\n throw new Error(\"overflow\");\n }\n var numeric = bignumber_1.BigNumber.from(value);\n if (fixedFormat.signed) {\n numeric = numeric.fromTwos(fixedFormat.width);\n }\n var hex = numeric.toTwos((fixedFormat.signed ? 0 : 1) + fixedFormat.width).toHexString();\n var decimal = formatFixed(numeric, fixedFormat.decimals);\n return new FixedNumber2(_constructorGuard, hex, decimal, fixedFormat);\n };\n FixedNumber2.from = function(value, format) {\n if (typeof value === \"string\") {\n return FixedNumber2.fromString(value, format);\n }\n if ((0, bytes_1.isBytes)(value)) {\n return FixedNumber2.fromBytes(value, format);\n }\n try {\n return FixedNumber2.fromValue(value, 0, format);\n } catch (error) {\n if (error.code !== logger_1.Logger.errors.INVALID_ARGUMENT) {\n throw error;\n }\n }\n return logger.throwArgumentError(\"invalid FixedNumber value\", \"value\", value);\n };\n FixedNumber2.isFixedNumber = function(value) {\n return !!(value && value._isFixedNumber);\n };\n return FixedNumber2;\n }()\n );\n exports3.FixedNumber = FixedNumber;\n var ONE = FixedNumber.from(1);\n var BUMP = FixedNumber.from(\"0.5\");\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/index.js\n var require_lib3 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+bignumber@5.8.0/node_modules/@ethersproject/bignumber/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3._base36To16 = exports3._base16To36 = exports3.parseFixed = exports3.FixedNumber = exports3.FixedFormat = exports3.formatFixed = exports3.BigNumber = void 0;\n var bignumber_1 = require_bignumber();\n Object.defineProperty(exports3, \"BigNumber\", { enumerable: true, get: function() {\n return bignumber_1.BigNumber;\n } });\n var fixednumber_1 = require_fixednumber();\n Object.defineProperty(exports3, \"formatFixed\", { enumerable: true, get: function() {\n return fixednumber_1.formatFixed;\n } });\n Object.defineProperty(exports3, \"FixedFormat\", { enumerable: true, get: function() {\n return fixednumber_1.FixedFormat;\n } });\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return fixednumber_1.FixedNumber;\n } });\n Object.defineProperty(exports3, \"parseFixed\", { enumerable: true, get: function() {\n return fixednumber_1.parseFixed;\n } });\n var bignumber_2 = require_bignumber();\n Object.defineProperty(exports3, \"_base16To36\", { enumerable: true, get: function() {\n return bignumber_2._base16To36;\n } });\n Object.defineProperty(exports3, \"_base36To16\", { enumerable: true, get: function() {\n return bignumber_2._base36To16;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib/_version.js\n var require_version4 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"properties/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib/index.js\n var require_lib4 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+properties@5.8.0/node_modules/@ethersproject/properties/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Description = exports3.deepCopy = exports3.shallowCopy = exports3.checkProperties = exports3.resolveProperties = exports3.getStatic = exports3.defineReadOnly = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version4();\n var logger = new logger_1.Logger(_version_1.version);\n function defineReadOnly(object, name, value) {\n Object.defineProperty(object, name, {\n enumerable: true,\n value,\n writable: false\n });\n }\n exports3.defineReadOnly = defineReadOnly;\n function getStatic(ctor, key) {\n for (var i3 = 0; i3 < 32; i3++) {\n if (ctor[key]) {\n return ctor[key];\n }\n if (!ctor.prototype || typeof ctor.prototype !== \"object\") {\n break;\n }\n ctor = Object.getPrototypeOf(ctor.prototype).constructor;\n }\n return null;\n }\n exports3.getStatic = getStatic;\n function resolveProperties2(object) {\n return __awaiter4(this, void 0, void 0, function() {\n var promises, results;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n promises = Object.keys(object).map(function(key) {\n var value = object[key];\n return Promise.resolve(value).then(function(v2) {\n return { key, value: v2 };\n });\n });\n return [4, Promise.all(promises)];\n case 1:\n results = _a.sent();\n return [2, results.reduce(function(accum, result) {\n accum[result.key] = result.value;\n return accum;\n }, {})];\n }\n });\n });\n }\n exports3.resolveProperties = resolveProperties2;\n function checkProperties(object, properties) {\n if (!object || typeof object !== \"object\") {\n logger.throwArgumentError(\"invalid object\", \"object\", object);\n }\n Object.keys(object).forEach(function(key) {\n if (!properties[key]) {\n logger.throwArgumentError(\"invalid object key - \" + key, \"transaction:\" + key, object);\n }\n });\n }\n exports3.checkProperties = checkProperties;\n function shallowCopy(object) {\n var result = {};\n for (var key in object) {\n result[key] = object[key];\n }\n return result;\n }\n exports3.shallowCopy = shallowCopy;\n var opaque = { bigint: true, boolean: true, \"function\": true, number: true, string: true };\n function _isFrozen(object) {\n if (object === void 0 || object === null || opaque[typeof object]) {\n return true;\n }\n if (Array.isArray(object) || typeof object === \"object\") {\n if (!Object.isFrozen(object)) {\n return false;\n }\n var keys = Object.keys(object);\n for (var i3 = 0; i3 < keys.length; i3++) {\n var value = null;\n try {\n value = object[keys[i3]];\n } catch (error) {\n continue;\n }\n if (!_isFrozen(value)) {\n return false;\n }\n }\n return true;\n }\n return logger.throwArgumentError(\"Cannot deepCopy \" + typeof object, \"object\", object);\n }\n function _deepCopy(object) {\n if (_isFrozen(object)) {\n return object;\n }\n if (Array.isArray(object)) {\n return Object.freeze(object.map(function(item) {\n return deepCopy(item);\n }));\n }\n if (typeof object === \"object\") {\n var result = {};\n for (var key in object) {\n var value = object[key];\n if (value === void 0) {\n continue;\n }\n defineReadOnly(result, key, deepCopy(value));\n }\n return result;\n }\n return logger.throwArgumentError(\"Cannot deepCopy \" + typeof object, \"object\", object);\n }\n function deepCopy(object) {\n return _deepCopy(object);\n }\n exports3.deepCopy = deepCopy;\n var Description = (\n /** @class */\n /* @__PURE__ */ function() {\n function Description2(info) {\n for (var key in info) {\n this[key] = deepCopy(info[key]);\n }\n }\n return Description2;\n }()\n );\n exports3.Description = Description;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/_version.js\n var require_version5 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"abi/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/fragments.js\n var require_fragments = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/fragments.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ErrorFragment = exports3.FunctionFragment = exports3.ConstructorFragment = exports3.EventFragment = exports3.Fragment = exports3.ParamType = exports3.FormatTypes = void 0;\n var bignumber_1 = require_lib3();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n var _constructorGuard = {};\n var ModifiersBytes = { calldata: true, memory: true, storage: true };\n var ModifiersNest = { calldata: true, memory: true };\n function checkModifier(type, name) {\n if (type === \"bytes\" || type === \"string\") {\n if (ModifiersBytes[name]) {\n return true;\n }\n } else if (type === \"address\") {\n if (name === \"payable\") {\n return true;\n }\n } else if (type.indexOf(\"[\") >= 0 || type === \"tuple\") {\n if (ModifiersNest[name]) {\n return true;\n }\n }\n if (ModifiersBytes[name] || name === \"payable\") {\n logger.throwArgumentError(\"invalid modifier\", \"name\", name);\n }\n return false;\n }\n function parseParamType(param, allowIndexed) {\n var originalParam = param;\n function throwError(i4) {\n logger.throwArgumentError(\"unexpected character at position \" + i4, \"param\", param);\n }\n param = param.replace(/\\s/g, \" \");\n function newNode(parent2) {\n var node2 = { type: \"\", name: \"\", parent: parent2, state: { allowType: true } };\n if (allowIndexed) {\n node2.indexed = false;\n }\n return node2;\n }\n var parent = { type: \"\", name: \"\", state: { allowType: true } };\n var node = parent;\n for (var i3 = 0; i3 < param.length; i3++) {\n var c4 = param[i3];\n switch (c4) {\n case \"(\":\n if (node.state.allowType && node.type === \"\") {\n node.type = \"tuple\";\n } else if (!node.state.allowParams) {\n throwError(i3);\n }\n node.state.allowType = false;\n node.type = verifyType(node.type);\n node.components = [newNode(node)];\n node = node.components[0];\n break;\n case \")\":\n delete node.state;\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(i3);\n }\n node.indexed = true;\n node.name = \"\";\n }\n if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n node.type = verifyType(node.type);\n var child = node;\n node = node.parent;\n if (!node) {\n throwError(i3);\n }\n delete child.parent;\n node.state.allowParams = false;\n node.state.allowName = true;\n node.state.allowArray = true;\n break;\n case \",\":\n delete node.state;\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(i3);\n }\n node.indexed = true;\n node.name = \"\";\n }\n if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n node.type = verifyType(node.type);\n var sibling = newNode(node.parent);\n node.parent.components.push(sibling);\n delete node.parent;\n node = sibling;\n break;\n case \" \":\n if (node.state.allowType) {\n if (node.type !== \"\") {\n node.type = verifyType(node.type);\n delete node.state.allowType;\n node.state.allowName = true;\n node.state.allowParams = true;\n }\n }\n if (node.state.allowName) {\n if (node.name !== \"\") {\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(i3);\n }\n if (node.indexed) {\n throwError(i3);\n }\n node.indexed = true;\n node.name = \"\";\n } else if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n } else {\n node.state.allowName = false;\n }\n }\n }\n break;\n case \"[\":\n if (!node.state.allowArray) {\n throwError(i3);\n }\n node.type += c4;\n node.state.allowArray = false;\n node.state.allowName = false;\n node.state.readArray = true;\n break;\n case \"]\":\n if (!node.state.readArray) {\n throwError(i3);\n }\n node.type += c4;\n node.state.readArray = false;\n node.state.allowArray = true;\n node.state.allowName = true;\n break;\n default:\n if (node.state.allowType) {\n node.type += c4;\n node.state.allowParams = true;\n node.state.allowArray = true;\n } else if (node.state.allowName) {\n node.name += c4;\n delete node.state.allowArray;\n } else if (node.state.readArray) {\n node.type += c4;\n } else {\n throwError(i3);\n }\n }\n }\n if (node.parent) {\n logger.throwArgumentError(\"unexpected eof\", \"param\", param);\n }\n delete parent.state;\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(originalParam.length - 7);\n }\n if (node.indexed) {\n throwError(originalParam.length - 7);\n }\n node.indexed = true;\n node.name = \"\";\n } else if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n parent.type = verifyType(parent.type);\n return parent;\n }\n function populate(object, params) {\n for (var key in params) {\n (0, properties_1.defineReadOnly)(object, key, params[key]);\n }\n }\n exports3.FormatTypes = Object.freeze({\n // Bare formatting, as is needed for computing a sighash of an event or function\n sighash: \"sighash\",\n // Human-Readable with Minimal spacing and without names (compact human-readable)\n minimal: \"minimal\",\n // Human-Readable with nice spacing, including all names\n full: \"full\",\n // JSON-format a la Solidity\n json: \"json\"\n });\n var paramTypeArray = new RegExp(/^(.*)\\[([0-9]*)\\]$/);\n var ParamType = (\n /** @class */\n function() {\n function ParamType2(constructorGuard, params) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"use fromString\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new ParamType()\"\n });\n }\n populate(this, params);\n var match = this.type.match(paramTypeArray);\n if (match) {\n populate(this, {\n arrayLength: parseInt(match[2] || \"-1\"),\n arrayChildren: ParamType2.fromObject({\n type: match[1],\n components: this.components\n }),\n baseType: \"array\"\n });\n } else {\n populate(this, {\n arrayLength: null,\n arrayChildren: null,\n baseType: this.components != null ? \"tuple\" : this.type\n });\n }\n this._isParamType = true;\n Object.freeze(this);\n }\n ParamType2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n var result_1 = {\n type: this.baseType === \"tuple\" ? \"tuple\" : this.type,\n name: this.name || void 0\n };\n if (typeof this.indexed === \"boolean\") {\n result_1.indexed = this.indexed;\n }\n if (this.components) {\n result_1.components = this.components.map(function(comp) {\n return JSON.parse(comp.format(format));\n });\n }\n return JSON.stringify(result_1);\n }\n var result = \"\";\n if (this.baseType === \"array\") {\n result += this.arrayChildren.format(format);\n result += \"[\" + (this.arrayLength < 0 ? \"\" : String(this.arrayLength)) + \"]\";\n } else {\n if (this.baseType === \"tuple\") {\n if (format !== exports3.FormatTypes.sighash) {\n result += this.type;\n }\n result += \"(\" + this.components.map(function(comp) {\n return comp.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \")\";\n } else {\n result += this.type;\n }\n }\n if (format !== exports3.FormatTypes.sighash) {\n if (this.indexed === true) {\n result += \" indexed\";\n }\n if (format === exports3.FormatTypes.full && this.name) {\n result += \" \" + this.name;\n }\n }\n return result;\n };\n ParamType2.from = function(value, allowIndexed) {\n if (typeof value === \"string\") {\n return ParamType2.fromString(value, allowIndexed);\n }\n return ParamType2.fromObject(value);\n };\n ParamType2.fromObject = function(value) {\n if (ParamType2.isParamType(value)) {\n return value;\n }\n return new ParamType2(_constructorGuard, {\n name: value.name || null,\n type: verifyType(value.type),\n indexed: value.indexed == null ? null : !!value.indexed,\n components: value.components ? value.components.map(ParamType2.fromObject) : null\n });\n };\n ParamType2.fromString = function(value, allowIndexed) {\n function ParamTypify(node) {\n return ParamType2.fromObject({\n name: node.name,\n type: node.type,\n indexed: node.indexed,\n components: node.components\n });\n }\n return ParamTypify(parseParamType(value, !!allowIndexed));\n };\n ParamType2.isParamType = function(value) {\n return !!(value != null && value._isParamType);\n };\n return ParamType2;\n }()\n );\n exports3.ParamType = ParamType;\n function parseParams(value, allowIndex) {\n return splitNesting(value).map(function(param) {\n return ParamType.fromString(param, allowIndex);\n });\n }\n var Fragment = (\n /** @class */\n function() {\n function Fragment2(constructorGuard, params) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"use a static from method\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Fragment()\"\n });\n }\n populate(this, params);\n this._isFragment = true;\n Object.freeze(this);\n }\n Fragment2.from = function(value) {\n if (Fragment2.isFragment(value)) {\n return value;\n }\n if (typeof value === \"string\") {\n return Fragment2.fromString(value);\n }\n return Fragment2.fromObject(value);\n };\n Fragment2.fromObject = function(value) {\n if (Fragment2.isFragment(value)) {\n return value;\n }\n switch (value.type) {\n case \"function\":\n return FunctionFragment.fromObject(value);\n case \"event\":\n return EventFragment.fromObject(value);\n case \"constructor\":\n return ConstructorFragment.fromObject(value);\n case \"error\":\n return ErrorFragment.fromObject(value);\n case \"fallback\":\n case \"receive\":\n return null;\n }\n return logger.throwArgumentError(\"invalid fragment object\", \"value\", value);\n };\n Fragment2.fromString = function(value) {\n value = value.replace(/\\s/g, \" \");\n value = value.replace(/\\(/g, \" (\").replace(/\\)/g, \") \").replace(/\\s+/g, \" \");\n value = value.trim();\n if (value.split(\" \")[0] === \"event\") {\n return EventFragment.fromString(value.substring(5).trim());\n } else if (value.split(\" \")[0] === \"function\") {\n return FunctionFragment.fromString(value.substring(8).trim());\n } else if (value.split(\"(\")[0].trim() === \"constructor\") {\n return ConstructorFragment.fromString(value.trim());\n } else if (value.split(\" \")[0] === \"error\") {\n return ErrorFragment.fromString(value.substring(5).trim());\n }\n return logger.throwArgumentError(\"unsupported fragment\", \"value\", value);\n };\n Fragment2.isFragment = function(value) {\n return !!(value && value._isFragment);\n };\n return Fragment2;\n }()\n );\n exports3.Fragment = Fragment;\n var EventFragment = (\n /** @class */\n function(_super) {\n __extends4(EventFragment2, _super);\n function EventFragment2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n EventFragment2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n return JSON.stringify({\n type: \"event\",\n anonymous: this.anonymous,\n name: this.name,\n inputs: this.inputs.map(function(input) {\n return JSON.parse(input.format(format));\n })\n });\n }\n var result = \"\";\n if (format !== exports3.FormatTypes.sighash) {\n result += \"event \";\n }\n result += this.name + \"(\" + this.inputs.map(function(input) {\n return input.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \") \";\n if (format !== exports3.FormatTypes.sighash) {\n if (this.anonymous) {\n result += \"anonymous \";\n }\n }\n return result.trim();\n };\n EventFragment2.from = function(value) {\n if (typeof value === \"string\") {\n return EventFragment2.fromString(value);\n }\n return EventFragment2.fromObject(value);\n };\n EventFragment2.fromObject = function(value) {\n if (EventFragment2.isEventFragment(value)) {\n return value;\n }\n if (value.type !== \"event\") {\n logger.throwArgumentError(\"invalid event object\", \"value\", value);\n }\n var params = {\n name: verifyIdentifier(value.name),\n anonymous: value.anonymous,\n inputs: value.inputs ? value.inputs.map(ParamType.fromObject) : [],\n type: \"event\"\n };\n return new EventFragment2(_constructorGuard, params);\n };\n EventFragment2.fromString = function(value) {\n var match = value.match(regexParen);\n if (!match) {\n logger.throwArgumentError(\"invalid event string\", \"value\", value);\n }\n var anonymous = false;\n match[3].split(\" \").forEach(function(modifier) {\n switch (modifier.trim()) {\n case \"anonymous\":\n anonymous = true;\n break;\n case \"\":\n break;\n default:\n logger.warn(\"unknown modifier: \" + modifier);\n }\n });\n return EventFragment2.fromObject({\n name: match[1].trim(),\n anonymous,\n inputs: parseParams(match[2], true),\n type: \"event\"\n });\n };\n EventFragment2.isEventFragment = function(value) {\n return value && value._isFragment && value.type === \"event\";\n };\n return EventFragment2;\n }(Fragment)\n );\n exports3.EventFragment = EventFragment;\n function parseGas(value, params) {\n params.gas = null;\n var comps = value.split(\"@\");\n if (comps.length !== 1) {\n if (comps.length > 2) {\n logger.throwArgumentError(\"invalid human-readable ABI signature\", \"value\", value);\n }\n if (!comps[1].match(/^[0-9]+$/)) {\n logger.throwArgumentError(\"invalid human-readable ABI signature gas\", \"value\", value);\n }\n params.gas = bignumber_1.BigNumber.from(comps[1]);\n return comps[0];\n }\n return value;\n }\n function parseModifiers(value, params) {\n params.constant = false;\n params.payable = false;\n params.stateMutability = \"nonpayable\";\n value.split(\" \").forEach(function(modifier) {\n switch (modifier.trim()) {\n case \"constant\":\n params.constant = true;\n break;\n case \"payable\":\n params.payable = true;\n params.stateMutability = \"payable\";\n break;\n case \"nonpayable\":\n params.payable = false;\n params.stateMutability = \"nonpayable\";\n break;\n case \"pure\":\n params.constant = true;\n params.stateMutability = \"pure\";\n break;\n case \"view\":\n params.constant = true;\n params.stateMutability = \"view\";\n break;\n case \"external\":\n case \"public\":\n case \"\":\n break;\n default:\n console.log(\"unknown modifier: \" + modifier);\n }\n });\n }\n function verifyState(value) {\n var result = {\n constant: false,\n payable: true,\n stateMutability: \"payable\"\n };\n if (value.stateMutability != null) {\n result.stateMutability = value.stateMutability;\n result.constant = result.stateMutability === \"view\" || result.stateMutability === \"pure\";\n if (value.constant != null) {\n if (!!value.constant !== result.constant) {\n logger.throwArgumentError(\"cannot have constant function with mutability \" + result.stateMutability, \"value\", value);\n }\n }\n result.payable = result.stateMutability === \"payable\";\n if (value.payable != null) {\n if (!!value.payable !== result.payable) {\n logger.throwArgumentError(\"cannot have payable function with mutability \" + result.stateMutability, \"value\", value);\n }\n }\n } else if (value.payable != null) {\n result.payable = !!value.payable;\n if (value.constant == null && !result.payable && value.type !== \"constructor\") {\n logger.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n result.constant = !!value.constant;\n if (result.constant) {\n result.stateMutability = \"view\";\n } else {\n result.stateMutability = result.payable ? \"payable\" : \"nonpayable\";\n }\n if (result.payable && result.constant) {\n logger.throwArgumentError(\"cannot have constant payable function\", \"value\", value);\n }\n } else if (value.constant != null) {\n result.constant = !!value.constant;\n result.payable = !result.constant;\n result.stateMutability = result.constant ? \"view\" : \"payable\";\n } else if (value.type !== \"constructor\") {\n logger.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n return result;\n }\n var ConstructorFragment = (\n /** @class */\n function(_super) {\n __extends4(ConstructorFragment2, _super);\n function ConstructorFragment2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ConstructorFragment2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n return JSON.stringify({\n type: \"constructor\",\n stateMutability: this.stateMutability !== \"nonpayable\" ? this.stateMutability : void 0,\n payable: this.payable,\n gas: this.gas ? this.gas.toNumber() : void 0,\n inputs: this.inputs.map(function(input) {\n return JSON.parse(input.format(format));\n })\n });\n }\n if (format === exports3.FormatTypes.sighash) {\n logger.throwError(\"cannot format a constructor for sighash\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"format(sighash)\"\n });\n }\n var result = \"constructor(\" + this.inputs.map(function(input) {\n return input.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \") \";\n if (this.stateMutability && this.stateMutability !== \"nonpayable\") {\n result += this.stateMutability + \" \";\n }\n return result.trim();\n };\n ConstructorFragment2.from = function(value) {\n if (typeof value === \"string\") {\n return ConstructorFragment2.fromString(value);\n }\n return ConstructorFragment2.fromObject(value);\n };\n ConstructorFragment2.fromObject = function(value) {\n if (ConstructorFragment2.isConstructorFragment(value)) {\n return value;\n }\n if (value.type !== \"constructor\") {\n logger.throwArgumentError(\"invalid constructor object\", \"value\", value);\n }\n var state = verifyState(value);\n if (state.constant) {\n logger.throwArgumentError(\"constructor cannot be constant\", \"value\", value);\n }\n var params = {\n name: null,\n type: value.type,\n inputs: value.inputs ? value.inputs.map(ParamType.fromObject) : [],\n payable: state.payable,\n stateMutability: state.stateMutability,\n gas: value.gas ? bignumber_1.BigNumber.from(value.gas) : null\n };\n return new ConstructorFragment2(_constructorGuard, params);\n };\n ConstructorFragment2.fromString = function(value) {\n var params = { type: \"constructor\" };\n value = parseGas(value, params);\n var parens = value.match(regexParen);\n if (!parens || parens[1].trim() !== \"constructor\") {\n logger.throwArgumentError(\"invalid constructor string\", \"value\", value);\n }\n params.inputs = parseParams(parens[2].trim(), false);\n parseModifiers(parens[3].trim(), params);\n return ConstructorFragment2.fromObject(params);\n };\n ConstructorFragment2.isConstructorFragment = function(value) {\n return value && value._isFragment && value.type === \"constructor\";\n };\n return ConstructorFragment2;\n }(Fragment)\n );\n exports3.ConstructorFragment = ConstructorFragment;\n var FunctionFragment = (\n /** @class */\n function(_super) {\n __extends4(FunctionFragment2, _super);\n function FunctionFragment2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FunctionFragment2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n return JSON.stringify({\n type: \"function\",\n name: this.name,\n constant: this.constant,\n stateMutability: this.stateMutability !== \"nonpayable\" ? this.stateMutability : void 0,\n payable: this.payable,\n gas: this.gas ? this.gas.toNumber() : void 0,\n inputs: this.inputs.map(function(input) {\n return JSON.parse(input.format(format));\n }),\n outputs: this.outputs.map(function(output) {\n return JSON.parse(output.format(format));\n })\n });\n }\n var result = \"\";\n if (format !== exports3.FormatTypes.sighash) {\n result += \"function \";\n }\n result += this.name + \"(\" + this.inputs.map(function(input) {\n return input.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \") \";\n if (format !== exports3.FormatTypes.sighash) {\n if (this.stateMutability) {\n if (this.stateMutability !== \"nonpayable\") {\n result += this.stateMutability + \" \";\n }\n } else if (this.constant) {\n result += \"view \";\n }\n if (this.outputs && this.outputs.length) {\n result += \"returns (\" + this.outputs.map(function(output) {\n return output.format(format);\n }).join(\", \") + \") \";\n }\n if (this.gas != null) {\n result += \"@\" + this.gas.toString() + \" \";\n }\n }\n return result.trim();\n };\n FunctionFragment2.from = function(value) {\n if (typeof value === \"string\") {\n return FunctionFragment2.fromString(value);\n }\n return FunctionFragment2.fromObject(value);\n };\n FunctionFragment2.fromObject = function(value) {\n if (FunctionFragment2.isFunctionFragment(value)) {\n return value;\n }\n if (value.type !== \"function\") {\n logger.throwArgumentError(\"invalid function object\", \"value\", value);\n }\n var state = verifyState(value);\n var params = {\n type: value.type,\n name: verifyIdentifier(value.name),\n constant: state.constant,\n inputs: value.inputs ? value.inputs.map(ParamType.fromObject) : [],\n outputs: value.outputs ? value.outputs.map(ParamType.fromObject) : [],\n payable: state.payable,\n stateMutability: state.stateMutability,\n gas: value.gas ? bignumber_1.BigNumber.from(value.gas) : null\n };\n return new FunctionFragment2(_constructorGuard, params);\n };\n FunctionFragment2.fromString = function(value) {\n var params = { type: \"function\" };\n value = parseGas(value, params);\n var comps = value.split(\" returns \");\n if (comps.length > 2) {\n logger.throwArgumentError(\"invalid function string\", \"value\", value);\n }\n var parens = comps[0].match(regexParen);\n if (!parens) {\n logger.throwArgumentError(\"invalid function signature\", \"value\", value);\n }\n params.name = parens[1].trim();\n if (params.name) {\n verifyIdentifier(params.name);\n }\n params.inputs = parseParams(parens[2], false);\n parseModifiers(parens[3].trim(), params);\n if (comps.length > 1) {\n var returns = comps[1].match(regexParen);\n if (returns[1].trim() != \"\" || returns[3].trim() != \"\") {\n logger.throwArgumentError(\"unexpected tokens\", \"value\", value);\n }\n params.outputs = parseParams(returns[2], false);\n } else {\n params.outputs = [];\n }\n return FunctionFragment2.fromObject(params);\n };\n FunctionFragment2.isFunctionFragment = function(value) {\n return value && value._isFragment && value.type === \"function\";\n };\n return FunctionFragment2;\n }(ConstructorFragment)\n );\n exports3.FunctionFragment = FunctionFragment;\n function checkForbidden(fragment) {\n var sig = fragment.format();\n if (sig === \"Error(string)\" || sig === \"Panic(uint256)\") {\n logger.throwArgumentError(\"cannot specify user defined \" + sig + \" error\", \"fragment\", fragment);\n }\n return fragment;\n }\n var ErrorFragment = (\n /** @class */\n function(_super) {\n __extends4(ErrorFragment2, _super);\n function ErrorFragment2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ErrorFragment2.prototype.format = function(format) {\n if (!format) {\n format = exports3.FormatTypes.sighash;\n }\n if (!exports3.FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === exports3.FormatTypes.json) {\n return JSON.stringify({\n type: \"error\",\n name: this.name,\n inputs: this.inputs.map(function(input) {\n return JSON.parse(input.format(format));\n })\n });\n }\n var result = \"\";\n if (format !== exports3.FormatTypes.sighash) {\n result += \"error \";\n }\n result += this.name + \"(\" + this.inputs.map(function(input) {\n return input.format(format);\n }).join(format === exports3.FormatTypes.full ? \", \" : \",\") + \") \";\n return result.trim();\n };\n ErrorFragment2.from = function(value) {\n if (typeof value === \"string\") {\n return ErrorFragment2.fromString(value);\n }\n return ErrorFragment2.fromObject(value);\n };\n ErrorFragment2.fromObject = function(value) {\n if (ErrorFragment2.isErrorFragment(value)) {\n return value;\n }\n if (value.type !== \"error\") {\n logger.throwArgumentError(\"invalid error object\", \"value\", value);\n }\n var params = {\n type: value.type,\n name: verifyIdentifier(value.name),\n inputs: value.inputs ? value.inputs.map(ParamType.fromObject) : []\n };\n return checkForbidden(new ErrorFragment2(_constructorGuard, params));\n };\n ErrorFragment2.fromString = function(value) {\n var params = { type: \"error\" };\n var parens = value.match(regexParen);\n if (!parens) {\n logger.throwArgumentError(\"invalid error signature\", \"value\", value);\n }\n params.name = parens[1].trim();\n if (params.name) {\n verifyIdentifier(params.name);\n }\n params.inputs = parseParams(parens[2], false);\n return checkForbidden(ErrorFragment2.fromObject(params));\n };\n ErrorFragment2.isErrorFragment = function(value) {\n return value && value._isFragment && value.type === \"error\";\n };\n return ErrorFragment2;\n }(Fragment)\n );\n exports3.ErrorFragment = ErrorFragment;\n function verifyType(type) {\n if (type.match(/^uint($|[^1-9])/)) {\n type = \"uint256\" + type.substring(4);\n } else if (type.match(/^int($|[^1-9])/)) {\n type = \"int256\" + type.substring(3);\n }\n return type;\n }\n var regexIdentifier = new RegExp(\"^[a-zA-Z$_][a-zA-Z0-9$_]*$\");\n function verifyIdentifier(value) {\n if (!value || !value.match(regexIdentifier)) {\n logger.throwArgumentError('invalid identifier \"' + value + '\"', \"value\", value);\n }\n return value;\n }\n var regexParen = new RegExp(\"^([^)(]*)\\\\((.*)\\\\)([^)(]*)$\");\n function splitNesting(value) {\n value = value.trim();\n var result = [];\n var accum = \"\";\n var depth = 0;\n for (var offset = 0; offset < value.length; offset++) {\n var c4 = value[offset];\n if (c4 === \",\" && depth === 0) {\n result.push(accum);\n accum = \"\";\n } else {\n accum += c4;\n if (c4 === \"(\") {\n depth++;\n } else if (c4 === \")\") {\n depth--;\n if (depth === -1) {\n logger.throwArgumentError(\"unbalanced parenthesis\", \"value\", value);\n }\n }\n }\n }\n if (accum) {\n result.push(accum);\n }\n return result;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js\n var require_abstract_coder = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Reader = exports3.Writer = exports3.Coder = exports3.checkResultErrors = void 0;\n var bytes_1 = require_lib2();\n var bignumber_1 = require_lib3();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n function checkResultErrors(result) {\n var errors = [];\n var checkErrors = function(path, object) {\n if (!Array.isArray(object)) {\n return;\n }\n for (var key in object) {\n var childPath = path.slice();\n childPath.push(key);\n try {\n checkErrors(childPath, object[key]);\n } catch (error) {\n errors.push({ path: childPath, error });\n }\n }\n };\n checkErrors([], result);\n return errors;\n }\n exports3.checkResultErrors = checkResultErrors;\n var Coder = (\n /** @class */\n function() {\n function Coder2(name, type, localName, dynamic) {\n this.name = name;\n this.type = type;\n this.localName = localName;\n this.dynamic = dynamic;\n }\n Coder2.prototype._throwError = function(message2, value) {\n logger.throwArgumentError(message2, this.localName, value);\n };\n return Coder2;\n }()\n );\n exports3.Coder = Coder;\n var Writer = (\n /** @class */\n function() {\n function Writer2(wordSize) {\n (0, properties_1.defineReadOnly)(this, \"wordSize\", wordSize || 32);\n this._data = [];\n this._dataLength = 0;\n this._padding = new Uint8Array(wordSize);\n }\n Object.defineProperty(Writer2.prototype, \"data\", {\n get: function() {\n return (0, bytes_1.hexConcat)(this._data);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Writer2.prototype, \"length\", {\n get: function() {\n return this._dataLength;\n },\n enumerable: false,\n configurable: true\n });\n Writer2.prototype._writeData = function(data) {\n this._data.push(data);\n this._dataLength += data.length;\n return data.length;\n };\n Writer2.prototype.appendWriter = function(writer) {\n return this._writeData((0, bytes_1.concat)(writer._data));\n };\n Writer2.prototype.writeBytes = function(value) {\n var bytes = (0, bytes_1.arrayify)(value);\n var paddingOffset = bytes.length % this.wordSize;\n if (paddingOffset) {\n bytes = (0, bytes_1.concat)([bytes, this._padding.slice(paddingOffset)]);\n }\n return this._writeData(bytes);\n };\n Writer2.prototype._getValue = function(value) {\n var bytes = (0, bytes_1.arrayify)(bignumber_1.BigNumber.from(value));\n if (bytes.length > this.wordSize) {\n logger.throwError(\"value out-of-bounds\", logger_1.Logger.errors.BUFFER_OVERRUN, {\n length: this.wordSize,\n offset: bytes.length\n });\n }\n if (bytes.length % this.wordSize) {\n bytes = (0, bytes_1.concat)([this._padding.slice(bytes.length % this.wordSize), bytes]);\n }\n return bytes;\n };\n Writer2.prototype.writeValue = function(value) {\n return this._writeData(this._getValue(value));\n };\n Writer2.prototype.writeUpdatableValue = function() {\n var _this = this;\n var offset = this._data.length;\n this._data.push(this._padding);\n this._dataLength += this.wordSize;\n return function(value) {\n _this._data[offset] = _this._getValue(value);\n };\n };\n return Writer2;\n }()\n );\n exports3.Writer = Writer;\n var Reader = (\n /** @class */\n function() {\n function Reader2(data, wordSize, coerceFunc, allowLoose) {\n (0, properties_1.defineReadOnly)(this, \"_data\", (0, bytes_1.arrayify)(data));\n (0, properties_1.defineReadOnly)(this, \"wordSize\", wordSize || 32);\n (0, properties_1.defineReadOnly)(this, \"_coerceFunc\", coerceFunc);\n (0, properties_1.defineReadOnly)(this, \"allowLoose\", allowLoose);\n this._offset = 0;\n }\n Object.defineProperty(Reader2.prototype, \"data\", {\n get: function() {\n return (0, bytes_1.hexlify)(this._data);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Reader2.prototype, \"consumed\", {\n get: function() {\n return this._offset;\n },\n enumerable: false,\n configurable: true\n });\n Reader2.coerce = function(name, value) {\n var match = name.match(\"^u?int([0-9]+)$\");\n if (match && parseInt(match[1]) <= 48) {\n value = value.toNumber();\n }\n return value;\n };\n Reader2.prototype.coerce = function(name, value) {\n if (this._coerceFunc) {\n return this._coerceFunc(name, value);\n }\n return Reader2.coerce(name, value);\n };\n Reader2.prototype._peekBytes = function(offset, length, loose) {\n var alignedLength = Math.ceil(length / this.wordSize) * this.wordSize;\n if (this._offset + alignedLength > this._data.length) {\n if (this.allowLoose && loose && this._offset + length <= this._data.length) {\n alignedLength = length;\n } else {\n logger.throwError(\"data out-of-bounds\", logger_1.Logger.errors.BUFFER_OVERRUN, {\n length: this._data.length,\n offset: this._offset + alignedLength\n });\n }\n }\n return this._data.slice(this._offset, this._offset + alignedLength);\n };\n Reader2.prototype.subReader = function(offset) {\n return new Reader2(this._data.slice(this._offset + offset), this.wordSize, this._coerceFunc, this.allowLoose);\n };\n Reader2.prototype.readBytes = function(length, loose) {\n var bytes = this._peekBytes(0, length, !!loose);\n this._offset += bytes.length;\n return bytes.slice(0, length);\n };\n Reader2.prototype.readValue = function() {\n return bignumber_1.BigNumber.from(this.readBytes(this.wordSize));\n };\n return Reader2;\n }()\n );\n exports3.Reader = Reader;\n }\n });\n\n // ../../../node_modules/.pnpm/js-sha3@0.8.0/node_modules/js-sha3/src/sha3.js\n var require_sha3 = __commonJS({\n \"../../../node_modules/.pnpm/js-sha3@0.8.0/node_modules/js-sha3/src/sha3.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function() {\n \"use strict\";\n var INPUT_ERROR = \"input is invalid type\";\n var FINALIZE_ERROR = \"finalize already called\";\n var WINDOW = typeof window === \"object\";\n var root = WINDOW ? window : {};\n if (root.JS_SHA3_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === \"object\";\n var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process_exports === \"object\" && process_exports.versions && process_exports.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && typeof module === \"object\" && module.exports;\n var AMD = typeof define === \"function\" && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== \"undefined\";\n var HEX_CHARS = \"0123456789abcdef\".split(\"\");\n var SHAKE_PADDING = [31, 7936, 2031616, 520093696];\n var CSHAKE_PADDING = [4, 1024, 262144, 67108864];\n var KECCAK_PADDING = [1, 256, 65536, 16777216];\n var PADDING = [6, 1536, 393216, 100663296];\n var SHIFT = [0, 8, 16, 24];\n var RC = [\n 1,\n 0,\n 32898,\n 0,\n 32906,\n 2147483648,\n 2147516416,\n 2147483648,\n 32907,\n 0,\n 2147483649,\n 0,\n 2147516545,\n 2147483648,\n 32777,\n 2147483648,\n 138,\n 0,\n 136,\n 0,\n 2147516425,\n 0,\n 2147483658,\n 0,\n 2147516555,\n 0,\n 139,\n 2147483648,\n 32905,\n 2147483648,\n 32771,\n 2147483648,\n 32770,\n 2147483648,\n 128,\n 2147483648,\n 32778,\n 0,\n 2147483658,\n 2147483648,\n 2147516545,\n 2147483648,\n 32896,\n 2147483648,\n 2147483649,\n 0,\n 2147516424,\n 2147483648\n ];\n var BITS = [224, 256, 384, 512];\n var SHAKE_BITS = [128, 256];\n var OUTPUT_TYPES = [\"hex\", \"buffer\", \"arrayBuffer\", \"array\", \"digest\"];\n var CSHAKE_BYTEPAD = {\n \"128\": 168,\n \"256\": 136\n };\n if (root.JS_SHA3_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function(obj) {\n return Object.prototype.toString.call(obj) === \"[object Array]\";\n };\n }\n if (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function(obj) {\n return typeof obj === \"object\" && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n var createOutputMethod = function(bits2, padding, outputType) {\n return function(message2) {\n return new Keccak2(bits2, padding, bits2).update(message2)[outputType]();\n };\n };\n var createShakeOutputMethod = function(bits2, padding, outputType) {\n return function(message2, outputBits) {\n return new Keccak2(bits2, padding, outputBits).update(message2)[outputType]();\n };\n };\n var createCshakeOutputMethod = function(bits2, padding, outputType) {\n return function(message2, outputBits, n2, s4) {\n return methods[\"cshake\" + bits2].update(message2, outputBits, n2, s4)[outputType]();\n };\n };\n var createKmacOutputMethod = function(bits2, padding, outputType) {\n return function(key, message2, outputBits, s4) {\n return methods[\"kmac\" + bits2].update(key, message2, outputBits, s4)[outputType]();\n };\n };\n var createOutputMethods = function(method, createMethod2, bits2, padding) {\n for (var i4 = 0; i4 < OUTPUT_TYPES.length; ++i4) {\n var type = OUTPUT_TYPES[i4];\n method[type] = createMethod2(bits2, padding, type);\n }\n return method;\n };\n var createMethod = function(bits2, padding) {\n var method = createOutputMethod(bits2, padding, \"hex\");\n method.create = function() {\n return new Keccak2(bits2, padding, bits2);\n };\n method.update = function(message2) {\n return method.create().update(message2);\n };\n return createOutputMethods(method, createOutputMethod, bits2, padding);\n };\n var createShakeMethod = function(bits2, padding) {\n var method = createShakeOutputMethod(bits2, padding, \"hex\");\n method.create = function(outputBits) {\n return new Keccak2(bits2, padding, outputBits);\n };\n method.update = function(message2, outputBits) {\n return method.create(outputBits).update(message2);\n };\n return createOutputMethods(method, createShakeOutputMethod, bits2, padding);\n };\n var createCshakeMethod = function(bits2, padding) {\n var w3 = CSHAKE_BYTEPAD[bits2];\n var method = createCshakeOutputMethod(bits2, padding, \"hex\");\n method.create = function(outputBits, n2, s4) {\n if (!n2 && !s4) {\n return methods[\"shake\" + bits2].create(outputBits);\n } else {\n return new Keccak2(bits2, padding, outputBits).bytepad([n2, s4], w3);\n }\n };\n method.update = function(message2, outputBits, n2, s4) {\n return method.create(outputBits, n2, s4).update(message2);\n };\n return createOutputMethods(method, createCshakeOutputMethod, bits2, padding);\n };\n var createKmacMethod = function(bits2, padding) {\n var w3 = CSHAKE_BYTEPAD[bits2];\n var method = createKmacOutputMethod(bits2, padding, \"hex\");\n method.create = function(key, outputBits, s4) {\n return new Kmac(bits2, padding, outputBits).bytepad([\"KMAC\", s4], w3).bytepad([key], w3);\n };\n method.update = function(key, message2, outputBits, s4) {\n return method.create(key, outputBits, s4).update(message2);\n };\n return createOutputMethods(method, createKmacOutputMethod, bits2, padding);\n };\n var algorithms = [\n { name: \"keccak\", padding: KECCAK_PADDING, bits: BITS, createMethod },\n { name: \"sha3\", padding: PADDING, bits: BITS, createMethod },\n { name: \"shake\", padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod },\n { name: \"cshake\", padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod },\n { name: \"kmac\", padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod }\n ];\n var methods = {}, methodNames = [];\n for (var i3 = 0; i3 < algorithms.length; ++i3) {\n var algorithm = algorithms[i3];\n var bits = algorithm.bits;\n for (var j2 = 0; j2 < bits.length; ++j2) {\n var methodName = algorithm.name + \"_\" + bits[j2];\n methodNames.push(methodName);\n methods[methodName] = algorithm.createMethod(bits[j2], algorithm.padding);\n if (algorithm.name !== \"sha3\") {\n var newMethodName = algorithm.name + bits[j2];\n methodNames.push(newMethodName);\n methods[newMethodName] = methods[methodName];\n }\n }\n }\n function Keccak2(bits2, padding, outputBits) {\n this.blocks = [];\n this.s = [];\n this.padding = padding;\n this.outputBits = outputBits;\n this.reset = true;\n this.finalized = false;\n this.block = 0;\n this.start = 0;\n this.blockCount = 1600 - (bits2 << 1) >> 5;\n this.byteCount = this.blockCount << 2;\n this.outputBlocks = outputBits >> 5;\n this.extraBytes = (outputBits & 31) >> 3;\n for (var i4 = 0; i4 < 50; ++i4) {\n this.s[i4] = 0;\n }\n }\n Keccak2.prototype.update = function(message2) {\n if (this.finalized) {\n throw new Error(FINALIZE_ERROR);\n }\n var notString, type = typeof message2;\n if (type !== \"string\") {\n if (type === \"object\") {\n if (message2 === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && message2.constructor === ArrayBuffer) {\n message2 = new Uint8Array(message2);\n } else if (!Array.isArray(message2)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message2)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var blocks = this.blocks, byteCount = this.byteCount, length = message2.length, blockCount = this.blockCount, index2 = 0, s4 = this.s, i4, code;\n while (index2 < length) {\n if (this.reset) {\n this.reset = false;\n blocks[0] = this.block;\n for (i4 = 1; i4 < blockCount + 1; ++i4) {\n blocks[i4] = 0;\n }\n }\n if (notString) {\n for (i4 = this.start; index2 < length && i4 < byteCount; ++index2) {\n blocks[i4 >> 2] |= message2[index2] << SHIFT[i4++ & 3];\n }\n } else {\n for (i4 = this.start; index2 < length && i4 < byteCount; ++index2) {\n code = message2.charCodeAt(index2);\n if (code < 128) {\n blocks[i4 >> 2] |= code << SHIFT[i4++ & 3];\n } else if (code < 2048) {\n blocks[i4 >> 2] |= (192 | code >> 6) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code & 63) << SHIFT[i4++ & 3];\n } else if (code < 55296 || code >= 57344) {\n blocks[i4 >> 2] |= (224 | code >> 12) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code >> 6 & 63) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code & 63) << SHIFT[i4++ & 3];\n } else {\n code = 65536 + ((code & 1023) << 10 | message2.charCodeAt(++index2) & 1023);\n blocks[i4 >> 2] |= (240 | code >> 18) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code >> 12 & 63) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code >> 6 & 63) << SHIFT[i4++ & 3];\n blocks[i4 >> 2] |= (128 | code & 63) << SHIFT[i4++ & 3];\n }\n }\n }\n this.lastByteIndex = i4;\n if (i4 >= byteCount) {\n this.start = i4 - byteCount;\n this.block = blocks[blockCount];\n for (i4 = 0; i4 < blockCount; ++i4) {\n s4[i4] ^= blocks[i4];\n }\n f7(s4);\n this.reset = true;\n } else {\n this.start = i4;\n }\n }\n return this;\n };\n Keccak2.prototype.encode = function(x4, right) {\n var o5 = x4 & 255, n2 = 1;\n var bytes = [o5];\n x4 = x4 >> 8;\n o5 = x4 & 255;\n while (o5 > 0) {\n bytes.unshift(o5);\n x4 = x4 >> 8;\n o5 = x4 & 255;\n ++n2;\n }\n if (right) {\n bytes.push(n2);\n } else {\n bytes.unshift(n2);\n }\n this.update(bytes);\n return bytes.length;\n };\n Keccak2.prototype.encodeString = function(str) {\n var notString, type = typeof str;\n if (type !== \"string\") {\n if (type === \"object\") {\n if (str === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && str.constructor === ArrayBuffer) {\n str = new Uint8Array(str);\n } else if (!Array.isArray(str)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(str)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var bytes = 0, length = str.length;\n if (notString) {\n bytes = length;\n } else {\n for (var i4 = 0; i4 < str.length; ++i4) {\n var code = str.charCodeAt(i4);\n if (code < 128) {\n bytes += 1;\n } else if (code < 2048) {\n bytes += 2;\n } else if (code < 55296 || code >= 57344) {\n bytes += 3;\n } else {\n code = 65536 + ((code & 1023) << 10 | str.charCodeAt(++i4) & 1023);\n bytes += 4;\n }\n }\n }\n bytes += this.encode(bytes * 8);\n this.update(str);\n return bytes;\n };\n Keccak2.prototype.bytepad = function(strs, w3) {\n var bytes = this.encode(w3);\n for (var i4 = 0; i4 < strs.length; ++i4) {\n bytes += this.encodeString(strs[i4]);\n }\n var paddingBytes = w3 - bytes % w3;\n var zeros = [];\n zeros.length = paddingBytes;\n this.update(zeros);\n return this;\n };\n Keccak2.prototype.finalize = function() {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i4 = this.lastByteIndex, blockCount = this.blockCount, s4 = this.s;\n blocks[i4 >> 2] |= this.padding[i4 & 3];\n if (this.lastByteIndex === this.byteCount) {\n blocks[0] = blocks[blockCount];\n for (i4 = 1; i4 < blockCount + 1; ++i4) {\n blocks[i4] = 0;\n }\n }\n blocks[blockCount - 1] |= 2147483648;\n for (i4 = 0; i4 < blockCount; ++i4) {\n s4[i4] ^= blocks[i4];\n }\n f7(s4);\n };\n Keccak2.prototype.toString = Keccak2.prototype.hex = function() {\n this.finalize();\n var blockCount = this.blockCount, s4 = this.s, outputBlocks = this.outputBlocks, extraBytes = this.extraBytes, i4 = 0, j3 = 0;\n var hex = \"\", block;\n while (j3 < outputBlocks) {\n for (i4 = 0; i4 < blockCount && j3 < outputBlocks; ++i4, ++j3) {\n block = s4[i4];\n hex += HEX_CHARS[block >> 4 & 15] + HEX_CHARS[block & 15] + HEX_CHARS[block >> 12 & 15] + HEX_CHARS[block >> 8 & 15] + HEX_CHARS[block >> 20 & 15] + HEX_CHARS[block >> 16 & 15] + HEX_CHARS[block >> 28 & 15] + HEX_CHARS[block >> 24 & 15];\n }\n if (j3 % blockCount === 0) {\n f7(s4);\n i4 = 0;\n }\n }\n if (extraBytes) {\n block = s4[i4];\n hex += HEX_CHARS[block >> 4 & 15] + HEX_CHARS[block & 15];\n if (extraBytes > 1) {\n hex += HEX_CHARS[block >> 12 & 15] + HEX_CHARS[block >> 8 & 15];\n }\n if (extraBytes > 2) {\n hex += HEX_CHARS[block >> 20 & 15] + HEX_CHARS[block >> 16 & 15];\n }\n }\n return hex;\n };\n Keccak2.prototype.arrayBuffer = function() {\n this.finalize();\n var blockCount = this.blockCount, s4 = this.s, outputBlocks = this.outputBlocks, extraBytes = this.extraBytes, i4 = 0, j3 = 0;\n var bytes = this.outputBits >> 3;\n var buffer2;\n if (extraBytes) {\n buffer2 = new ArrayBuffer(outputBlocks + 1 << 2);\n } else {\n buffer2 = new ArrayBuffer(bytes);\n }\n var array = new Uint32Array(buffer2);\n while (j3 < outputBlocks) {\n for (i4 = 0; i4 < blockCount && j3 < outputBlocks; ++i4, ++j3) {\n array[j3] = s4[i4];\n }\n if (j3 % blockCount === 0) {\n f7(s4);\n }\n }\n if (extraBytes) {\n array[i4] = s4[i4];\n buffer2 = buffer2.slice(0, bytes);\n }\n return buffer2;\n };\n Keccak2.prototype.buffer = Keccak2.prototype.arrayBuffer;\n Keccak2.prototype.digest = Keccak2.prototype.array = function() {\n this.finalize();\n var blockCount = this.blockCount, s4 = this.s, outputBlocks = this.outputBlocks, extraBytes = this.extraBytes, i4 = 0, j3 = 0;\n var array = [], offset, block;\n while (j3 < outputBlocks) {\n for (i4 = 0; i4 < blockCount && j3 < outputBlocks; ++i4, ++j3) {\n offset = j3 << 2;\n block = s4[i4];\n array[offset] = block & 255;\n array[offset + 1] = block >> 8 & 255;\n array[offset + 2] = block >> 16 & 255;\n array[offset + 3] = block >> 24 & 255;\n }\n if (j3 % blockCount === 0) {\n f7(s4);\n }\n }\n if (extraBytes) {\n offset = j3 << 2;\n block = s4[i4];\n array[offset] = block & 255;\n if (extraBytes > 1) {\n array[offset + 1] = block >> 8 & 255;\n }\n if (extraBytes > 2) {\n array[offset + 2] = block >> 16 & 255;\n }\n }\n return array;\n };\n function Kmac(bits2, padding, outputBits) {\n Keccak2.call(this, bits2, padding, outputBits);\n }\n Kmac.prototype = new Keccak2();\n Kmac.prototype.finalize = function() {\n this.encode(this.outputBits, true);\n return Keccak2.prototype.finalize.call(this);\n };\n var f7 = function(s4) {\n var h4, l6, n2, c0, c1, c22, c32, c4, c5, c6, c7, c8, c9, b0, b1, b22, b32, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b222, b23, b24, b25, b26, b27, b28, b29, b30, b31, b322, b33, b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49;\n for (n2 = 0; n2 < 48; n2 += 2) {\n c0 = s4[0] ^ s4[10] ^ s4[20] ^ s4[30] ^ s4[40];\n c1 = s4[1] ^ s4[11] ^ s4[21] ^ s4[31] ^ s4[41];\n c22 = s4[2] ^ s4[12] ^ s4[22] ^ s4[32] ^ s4[42];\n c32 = s4[3] ^ s4[13] ^ s4[23] ^ s4[33] ^ s4[43];\n c4 = s4[4] ^ s4[14] ^ s4[24] ^ s4[34] ^ s4[44];\n c5 = s4[5] ^ s4[15] ^ s4[25] ^ s4[35] ^ s4[45];\n c6 = s4[6] ^ s4[16] ^ s4[26] ^ s4[36] ^ s4[46];\n c7 = s4[7] ^ s4[17] ^ s4[27] ^ s4[37] ^ s4[47];\n c8 = s4[8] ^ s4[18] ^ s4[28] ^ s4[38] ^ s4[48];\n c9 = s4[9] ^ s4[19] ^ s4[29] ^ s4[39] ^ s4[49];\n h4 = c8 ^ (c22 << 1 | c32 >>> 31);\n l6 = c9 ^ (c32 << 1 | c22 >>> 31);\n s4[0] ^= h4;\n s4[1] ^= l6;\n s4[10] ^= h4;\n s4[11] ^= l6;\n s4[20] ^= h4;\n s4[21] ^= l6;\n s4[30] ^= h4;\n s4[31] ^= l6;\n s4[40] ^= h4;\n s4[41] ^= l6;\n h4 = c0 ^ (c4 << 1 | c5 >>> 31);\n l6 = c1 ^ (c5 << 1 | c4 >>> 31);\n s4[2] ^= h4;\n s4[3] ^= l6;\n s4[12] ^= h4;\n s4[13] ^= l6;\n s4[22] ^= h4;\n s4[23] ^= l6;\n s4[32] ^= h4;\n s4[33] ^= l6;\n s4[42] ^= h4;\n s4[43] ^= l6;\n h4 = c22 ^ (c6 << 1 | c7 >>> 31);\n l6 = c32 ^ (c7 << 1 | c6 >>> 31);\n s4[4] ^= h4;\n s4[5] ^= l6;\n s4[14] ^= h4;\n s4[15] ^= l6;\n s4[24] ^= h4;\n s4[25] ^= l6;\n s4[34] ^= h4;\n s4[35] ^= l6;\n s4[44] ^= h4;\n s4[45] ^= l6;\n h4 = c4 ^ (c8 << 1 | c9 >>> 31);\n l6 = c5 ^ (c9 << 1 | c8 >>> 31);\n s4[6] ^= h4;\n s4[7] ^= l6;\n s4[16] ^= h4;\n s4[17] ^= l6;\n s4[26] ^= h4;\n s4[27] ^= l6;\n s4[36] ^= h4;\n s4[37] ^= l6;\n s4[46] ^= h4;\n s4[47] ^= l6;\n h4 = c6 ^ (c0 << 1 | c1 >>> 31);\n l6 = c7 ^ (c1 << 1 | c0 >>> 31);\n s4[8] ^= h4;\n s4[9] ^= l6;\n s4[18] ^= h4;\n s4[19] ^= l6;\n s4[28] ^= h4;\n s4[29] ^= l6;\n s4[38] ^= h4;\n s4[39] ^= l6;\n s4[48] ^= h4;\n s4[49] ^= l6;\n b0 = s4[0];\n b1 = s4[1];\n b322 = s4[11] << 4 | s4[10] >>> 28;\n b33 = s4[10] << 4 | s4[11] >>> 28;\n b14 = s4[20] << 3 | s4[21] >>> 29;\n b15 = s4[21] << 3 | s4[20] >>> 29;\n b46 = s4[31] << 9 | s4[30] >>> 23;\n b47 = s4[30] << 9 | s4[31] >>> 23;\n b28 = s4[40] << 18 | s4[41] >>> 14;\n b29 = s4[41] << 18 | s4[40] >>> 14;\n b20 = s4[2] << 1 | s4[3] >>> 31;\n b21 = s4[3] << 1 | s4[2] >>> 31;\n b22 = s4[13] << 12 | s4[12] >>> 20;\n b32 = s4[12] << 12 | s4[13] >>> 20;\n b34 = s4[22] << 10 | s4[23] >>> 22;\n b35 = s4[23] << 10 | s4[22] >>> 22;\n b16 = s4[33] << 13 | s4[32] >>> 19;\n b17 = s4[32] << 13 | s4[33] >>> 19;\n b48 = s4[42] << 2 | s4[43] >>> 30;\n b49 = s4[43] << 2 | s4[42] >>> 30;\n b40 = s4[5] << 30 | s4[4] >>> 2;\n b41 = s4[4] << 30 | s4[5] >>> 2;\n b222 = s4[14] << 6 | s4[15] >>> 26;\n b23 = s4[15] << 6 | s4[14] >>> 26;\n b4 = s4[25] << 11 | s4[24] >>> 21;\n b5 = s4[24] << 11 | s4[25] >>> 21;\n b36 = s4[34] << 15 | s4[35] >>> 17;\n b37 = s4[35] << 15 | s4[34] >>> 17;\n b18 = s4[45] << 29 | s4[44] >>> 3;\n b19 = s4[44] << 29 | s4[45] >>> 3;\n b10 = s4[6] << 28 | s4[7] >>> 4;\n b11 = s4[7] << 28 | s4[6] >>> 4;\n b42 = s4[17] << 23 | s4[16] >>> 9;\n b43 = s4[16] << 23 | s4[17] >>> 9;\n b24 = s4[26] << 25 | s4[27] >>> 7;\n b25 = s4[27] << 25 | s4[26] >>> 7;\n b6 = s4[36] << 21 | s4[37] >>> 11;\n b7 = s4[37] << 21 | s4[36] >>> 11;\n b38 = s4[47] << 24 | s4[46] >>> 8;\n b39 = s4[46] << 24 | s4[47] >>> 8;\n b30 = s4[8] << 27 | s4[9] >>> 5;\n b31 = s4[9] << 27 | s4[8] >>> 5;\n b12 = s4[18] << 20 | s4[19] >>> 12;\n b13 = s4[19] << 20 | s4[18] >>> 12;\n b44 = s4[29] << 7 | s4[28] >>> 25;\n b45 = s4[28] << 7 | s4[29] >>> 25;\n b26 = s4[38] << 8 | s4[39] >>> 24;\n b27 = s4[39] << 8 | s4[38] >>> 24;\n b8 = s4[48] << 14 | s4[49] >>> 18;\n b9 = s4[49] << 14 | s4[48] >>> 18;\n s4[0] = b0 ^ ~b22 & b4;\n s4[1] = b1 ^ ~b32 & b5;\n s4[10] = b10 ^ ~b12 & b14;\n s4[11] = b11 ^ ~b13 & b15;\n s4[20] = b20 ^ ~b222 & b24;\n s4[21] = b21 ^ ~b23 & b25;\n s4[30] = b30 ^ ~b322 & b34;\n s4[31] = b31 ^ ~b33 & b35;\n s4[40] = b40 ^ ~b42 & b44;\n s4[41] = b41 ^ ~b43 & b45;\n s4[2] = b22 ^ ~b4 & b6;\n s4[3] = b32 ^ ~b5 & b7;\n s4[12] = b12 ^ ~b14 & b16;\n s4[13] = b13 ^ ~b15 & b17;\n s4[22] = b222 ^ ~b24 & b26;\n s4[23] = b23 ^ ~b25 & b27;\n s4[32] = b322 ^ ~b34 & b36;\n s4[33] = b33 ^ ~b35 & b37;\n s4[42] = b42 ^ ~b44 & b46;\n s4[43] = b43 ^ ~b45 & b47;\n s4[4] = b4 ^ ~b6 & b8;\n s4[5] = b5 ^ ~b7 & b9;\n s4[14] = b14 ^ ~b16 & b18;\n s4[15] = b15 ^ ~b17 & b19;\n s4[24] = b24 ^ ~b26 & b28;\n s4[25] = b25 ^ ~b27 & b29;\n s4[34] = b34 ^ ~b36 & b38;\n s4[35] = b35 ^ ~b37 & b39;\n s4[44] = b44 ^ ~b46 & b48;\n s4[45] = b45 ^ ~b47 & b49;\n s4[6] = b6 ^ ~b8 & b0;\n s4[7] = b7 ^ ~b9 & b1;\n s4[16] = b16 ^ ~b18 & b10;\n s4[17] = b17 ^ ~b19 & b11;\n s4[26] = b26 ^ ~b28 & b20;\n s4[27] = b27 ^ ~b29 & b21;\n s4[36] = b36 ^ ~b38 & b30;\n s4[37] = b37 ^ ~b39 & b31;\n s4[46] = b46 ^ ~b48 & b40;\n s4[47] = b47 ^ ~b49 & b41;\n s4[8] = b8 ^ ~b0 & b22;\n s4[9] = b9 ^ ~b1 & b32;\n s4[18] = b18 ^ ~b10 & b12;\n s4[19] = b19 ^ ~b11 & b13;\n s4[28] = b28 ^ ~b20 & b222;\n s4[29] = b29 ^ ~b21 & b23;\n s4[38] = b38 ^ ~b30 & b322;\n s4[39] = b39 ^ ~b31 & b33;\n s4[48] = b48 ^ ~b40 & b42;\n s4[49] = b49 ^ ~b41 & b43;\n s4[0] ^= RC[n2];\n s4[1] ^= RC[n2 + 1];\n }\n };\n if (COMMON_JS) {\n module.exports = methods;\n } else {\n for (i3 = 0; i3 < methodNames.length; ++i3) {\n root[methodNames[i3]] = methods[methodNames[i3]];\n }\n if (AMD) {\n define(function() {\n return methods;\n });\n }\n }\n })();\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+keccak256@5.8.0/node_modules/@ethersproject/keccak256/lib/index.js\n var require_lib5 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+keccak256@5.8.0/node_modules/@ethersproject/keccak256/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.keccak256 = void 0;\n var js_sha3_1 = __importDefault4(require_sha3());\n var bytes_1 = require_lib2();\n function keccak2563(data) {\n return \"0x\" + js_sha3_1.default.keccak_256((0, bytes_1.arrayify)(data));\n }\n exports3.keccak256 = keccak2563;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+rlp@5.8.0/node_modules/@ethersproject/rlp/lib/_version.js\n var require_version6 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+rlp@5.8.0/node_modules/@ethersproject/rlp/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"rlp/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+rlp@5.8.0/node_modules/@ethersproject/rlp/lib/index.js\n var require_lib6 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+rlp@5.8.0/node_modules/@ethersproject/rlp/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decode = exports3.encode = void 0;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version6();\n var logger = new logger_1.Logger(_version_1.version);\n function arrayifyInteger(value) {\n var result = [];\n while (value) {\n result.unshift(value & 255);\n value >>= 8;\n }\n return result;\n }\n function unarrayifyInteger(data, offset, length) {\n var result = 0;\n for (var i3 = 0; i3 < length; i3++) {\n result = result * 256 + data[offset + i3];\n }\n return result;\n }\n function _encode(object) {\n if (Array.isArray(object)) {\n var payload_1 = [];\n object.forEach(function(child) {\n payload_1 = payload_1.concat(_encode(child));\n });\n if (payload_1.length <= 55) {\n payload_1.unshift(192 + payload_1.length);\n return payload_1;\n }\n var length_1 = arrayifyInteger(payload_1.length);\n length_1.unshift(247 + length_1.length);\n return length_1.concat(payload_1);\n }\n if (!(0, bytes_1.isBytesLike)(object)) {\n logger.throwArgumentError(\"RLP object must be BytesLike\", \"object\", object);\n }\n var data = Array.prototype.slice.call((0, bytes_1.arrayify)(object));\n if (data.length === 1 && data[0] <= 127) {\n return data;\n } else if (data.length <= 55) {\n data.unshift(128 + data.length);\n return data;\n }\n var length = arrayifyInteger(data.length);\n length.unshift(183 + length.length);\n return length.concat(data);\n }\n function encode7(object) {\n return (0, bytes_1.hexlify)(_encode(object));\n }\n exports3.encode = encode7;\n function _decodeChildren(data, offset, childOffset, length) {\n var result = [];\n while (childOffset < offset + 1 + length) {\n var decoded = _decode(data, childOffset);\n result.push(decoded.result);\n childOffset += decoded.consumed;\n if (childOffset > offset + 1 + length) {\n logger.throwError(\"child data too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n }\n return { consumed: 1 + length, result };\n }\n function _decode(data, offset) {\n if (data.length === 0) {\n logger.throwError(\"data too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n if (data[offset] >= 248) {\n var lengthLength = data[offset] - 247;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data short segment too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n var length_2 = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length_2 > data.length) {\n logger.throwError(\"data long segment too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length_2);\n } else if (data[offset] >= 192) {\n var length_3 = data[offset] - 192;\n if (offset + 1 + length_3 > data.length) {\n logger.throwError(\"data array too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n return _decodeChildren(data, offset, offset + 1, length_3);\n } else if (data[offset] >= 184) {\n var lengthLength = data[offset] - 183;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data array too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n var length_4 = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length_4 > data.length) {\n logger.throwError(\"data array too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n var result = (0, bytes_1.hexlify)(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length_4));\n return { consumed: 1 + lengthLength + length_4, result };\n } else if (data[offset] >= 128) {\n var length_5 = data[offset] - 128;\n if (offset + 1 + length_5 > data.length) {\n logger.throwError(\"data too short\", logger_1.Logger.errors.BUFFER_OVERRUN, {});\n }\n var result = (0, bytes_1.hexlify)(data.slice(offset + 1, offset + 1 + length_5));\n return { consumed: 1 + length_5, result };\n }\n return { consumed: 1, result: (0, bytes_1.hexlify)(data[offset]) };\n }\n function decode4(data) {\n var bytes = (0, bytes_1.arrayify)(data);\n var decoded = _decode(bytes, 0);\n if (decoded.consumed !== bytes.length) {\n logger.throwArgumentError(\"invalid rlp data\", \"data\", data);\n }\n return decoded.result;\n }\n exports3.decode = decode4;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib/_version.js\n var require_version7 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"address/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib/index.js\n var require_lib7 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+address@5.8.0/node_modules/@ethersproject/address/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getCreate2Address = exports3.getContractAddress = exports3.getIcapAddress = exports3.isAddress = exports3.getAddress = void 0;\n var bytes_1 = require_lib2();\n var bignumber_1 = require_lib3();\n var keccak256_1 = require_lib5();\n var rlp_1 = require_lib6();\n var logger_1 = require_lib();\n var _version_1 = require_version7();\n var logger = new logger_1.Logger(_version_1.version);\n function getChecksumAddress(address) {\n if (!(0, bytes_1.isHexString)(address, 20)) {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n address = address.toLowerCase();\n var chars = address.substring(2).split(\"\");\n var expanded = new Uint8Array(40);\n for (var i4 = 0; i4 < 40; i4++) {\n expanded[i4] = chars[i4].charCodeAt(0);\n }\n var hashed = (0, bytes_1.arrayify)((0, keccak256_1.keccak256)(expanded));\n for (var i4 = 0; i4 < 40; i4 += 2) {\n if (hashed[i4 >> 1] >> 4 >= 8) {\n chars[i4] = chars[i4].toUpperCase();\n }\n if ((hashed[i4 >> 1] & 15) >= 8) {\n chars[i4 + 1] = chars[i4 + 1].toUpperCase();\n }\n }\n return \"0x\" + chars.join(\"\");\n }\n var MAX_SAFE_INTEGER = 9007199254740991;\n function log10(x4) {\n if (Math.log10) {\n return Math.log10(x4);\n }\n return Math.log(x4) / Math.LN10;\n }\n var ibanLookup = {};\n for (i3 = 0; i3 < 10; i3++) {\n ibanLookup[String(i3)] = String(i3);\n }\n var i3;\n for (i3 = 0; i3 < 26; i3++) {\n ibanLookup[String.fromCharCode(65 + i3)] = String(10 + i3);\n }\n var i3;\n var safeDigits = Math.floor(log10(MAX_SAFE_INTEGER));\n function ibanChecksum(address) {\n address = address.toUpperCase();\n address = address.substring(4) + address.substring(0, 2) + \"00\";\n var expanded = address.split(\"\").map(function(c4) {\n return ibanLookup[c4];\n }).join(\"\");\n while (expanded.length >= safeDigits) {\n var block = expanded.substring(0, safeDigits);\n expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);\n }\n var checksum4 = String(98 - parseInt(expanded, 10) % 97);\n while (checksum4.length < 2) {\n checksum4 = \"0\" + checksum4;\n }\n return checksum4;\n }\n function getAddress3(address) {\n var result = null;\n if (typeof address !== \"string\") {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {\n if (address.substring(0, 2) !== \"0x\") {\n address = \"0x\" + address;\n }\n result = getChecksumAddress(address);\n if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {\n logger.throwArgumentError(\"bad address checksum\", \"address\", address);\n }\n } else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {\n if (address.substring(2, 4) !== ibanChecksum(address)) {\n logger.throwArgumentError(\"bad icap checksum\", \"address\", address);\n }\n result = (0, bignumber_1._base36To16)(address.substring(4));\n while (result.length < 40) {\n result = \"0\" + result;\n }\n result = getChecksumAddress(\"0x\" + result);\n } else {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n return result;\n }\n exports3.getAddress = getAddress3;\n function isAddress2(address) {\n try {\n getAddress3(address);\n return true;\n } catch (error) {\n }\n return false;\n }\n exports3.isAddress = isAddress2;\n function getIcapAddress(address) {\n var base36 = (0, bignumber_1._base16To36)(getAddress3(address).substring(2)).toUpperCase();\n while (base36.length < 30) {\n base36 = \"0\" + base36;\n }\n return \"XE\" + ibanChecksum(\"XE00\" + base36) + base36;\n }\n exports3.getIcapAddress = getIcapAddress;\n function getContractAddress3(transaction) {\n var from14 = null;\n try {\n from14 = getAddress3(transaction.from);\n } catch (error) {\n logger.throwArgumentError(\"missing from address\", \"transaction\", transaction);\n }\n var nonce = (0, bytes_1.stripZeros)((0, bytes_1.arrayify)(bignumber_1.BigNumber.from(transaction.nonce).toHexString()));\n return getAddress3((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, rlp_1.encode)([from14, nonce])), 12));\n }\n exports3.getContractAddress = getContractAddress3;\n function getCreate2Address2(from14, salt, initCodeHash) {\n if ((0, bytes_1.hexDataLength)(salt) !== 32) {\n logger.throwArgumentError(\"salt must be 32 bytes\", \"salt\", salt);\n }\n if ((0, bytes_1.hexDataLength)(initCodeHash) !== 32) {\n logger.throwArgumentError(\"initCodeHash must be 32 bytes\", \"initCodeHash\", initCodeHash);\n }\n return getAddress3((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, bytes_1.concat)([\"0xff\", getAddress3(from14), salt, initCodeHash])), 12));\n }\n exports3.getCreate2Address = getCreate2Address2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/address.js\n var require_address = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AddressCoder = void 0;\n var address_1 = require_lib7();\n var bytes_1 = require_lib2();\n var abstract_coder_1 = require_abstract_coder();\n var AddressCoder = (\n /** @class */\n function(_super) {\n __extends4(AddressCoder2, _super);\n function AddressCoder2(localName) {\n return _super.call(this, \"address\", \"address\", localName, false) || this;\n }\n AddressCoder2.prototype.defaultValue = function() {\n return \"0x0000000000000000000000000000000000000000\";\n };\n AddressCoder2.prototype.encode = function(writer, value) {\n try {\n value = (0, address_1.getAddress)(value);\n } catch (error) {\n this._throwError(error.message, value);\n }\n return writer.writeValue(value);\n };\n AddressCoder2.prototype.decode = function(reader) {\n return (0, address_1.getAddress)((0, bytes_1.hexZeroPad)(reader.readValue().toHexString(), 20));\n };\n return AddressCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.AddressCoder = AddressCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/anonymous.js\n var require_anonymous = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/anonymous.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AnonymousCoder = void 0;\n var abstract_coder_1 = require_abstract_coder();\n var AnonymousCoder = (\n /** @class */\n function(_super) {\n __extends4(AnonymousCoder2, _super);\n function AnonymousCoder2(coder) {\n var _this = _super.call(this, coder.name, coder.type, void 0, coder.dynamic) || this;\n _this.coder = coder;\n return _this;\n }\n AnonymousCoder2.prototype.defaultValue = function() {\n return this.coder.defaultValue();\n };\n AnonymousCoder2.prototype.encode = function(writer, value) {\n return this.coder.encode(writer, value);\n };\n AnonymousCoder2.prototype.decode = function(reader) {\n return this.coder.decode(reader);\n };\n return AnonymousCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.AnonymousCoder = AnonymousCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/array.js\n var require_array = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/array.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ArrayCoder = exports3.unpack = exports3.pack = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n var abstract_coder_1 = require_abstract_coder();\n var anonymous_1 = require_anonymous();\n function pack(writer, coders, values) {\n var arrayValues = null;\n if (Array.isArray(values)) {\n arrayValues = values;\n } else if (values && typeof values === \"object\") {\n var unique_1 = {};\n arrayValues = coders.map(function(coder) {\n var name = coder.localName;\n if (!name) {\n logger.throwError(\"cannot encode object for signature with missing names\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"values\",\n coder,\n value: values\n });\n }\n if (unique_1[name]) {\n logger.throwError(\"cannot encode object for signature with duplicate names\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"values\",\n coder,\n value: values\n });\n }\n unique_1[name] = true;\n return values[name];\n });\n } else {\n logger.throwArgumentError(\"invalid tuple value\", \"tuple\", values);\n }\n if (coders.length !== arrayValues.length) {\n logger.throwArgumentError(\"types/value length mismatch\", \"tuple\", values);\n }\n var staticWriter = new abstract_coder_1.Writer(writer.wordSize);\n var dynamicWriter = new abstract_coder_1.Writer(writer.wordSize);\n var updateFuncs = [];\n coders.forEach(function(coder, index2) {\n var value = arrayValues[index2];\n if (coder.dynamic) {\n var dynamicOffset_1 = dynamicWriter.length;\n coder.encode(dynamicWriter, value);\n var updateFunc_1 = staticWriter.writeUpdatableValue();\n updateFuncs.push(function(baseOffset) {\n updateFunc_1(baseOffset + dynamicOffset_1);\n });\n } else {\n coder.encode(staticWriter, value);\n }\n });\n updateFuncs.forEach(function(func) {\n func(staticWriter.length);\n });\n var length = writer.appendWriter(staticWriter);\n length += writer.appendWriter(dynamicWriter);\n return length;\n }\n exports3.pack = pack;\n function unpack(reader, coders) {\n var values = [];\n var baseReader = reader.subReader(0);\n coders.forEach(function(coder) {\n var value = null;\n if (coder.dynamic) {\n var offset = reader.readValue();\n var offsetReader = baseReader.subReader(offset.toNumber());\n try {\n value = coder.decode(offsetReader);\n } catch (error) {\n if (error.code === logger_1.Logger.errors.BUFFER_OVERRUN) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n } else {\n try {\n value = coder.decode(reader);\n } catch (error) {\n if (error.code === logger_1.Logger.errors.BUFFER_OVERRUN) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n }\n if (value != void 0) {\n values.push(value);\n }\n });\n var uniqueNames = coders.reduce(function(accum, coder) {\n var name = coder.localName;\n if (name) {\n if (!accum[name]) {\n accum[name] = 0;\n }\n accum[name]++;\n }\n return accum;\n }, {});\n coders.forEach(function(coder, index2) {\n var name = coder.localName;\n if (!name || uniqueNames[name] !== 1) {\n return;\n }\n if (name === \"length\") {\n name = \"_length\";\n }\n if (values[name] != null) {\n return;\n }\n var value = values[index2];\n if (value instanceof Error) {\n Object.defineProperty(values, name, {\n enumerable: true,\n get: function() {\n throw value;\n }\n });\n } else {\n values[name] = value;\n }\n });\n var _loop_1 = function(i4) {\n var value = values[i4];\n if (value instanceof Error) {\n Object.defineProperty(values, i4, {\n enumerable: true,\n get: function() {\n throw value;\n }\n });\n }\n };\n for (var i3 = 0; i3 < values.length; i3++) {\n _loop_1(i3);\n }\n return Object.freeze(values);\n }\n exports3.unpack = unpack;\n var ArrayCoder = (\n /** @class */\n function(_super) {\n __extends4(ArrayCoder2, _super);\n function ArrayCoder2(coder, length, localName) {\n var _this = this;\n var type = coder.type + \"[\" + (length >= 0 ? length : \"\") + \"]\";\n var dynamic = length === -1 || coder.dynamic;\n _this = _super.call(this, \"array\", type, localName, dynamic) || this;\n _this.coder = coder;\n _this.length = length;\n return _this;\n }\n ArrayCoder2.prototype.defaultValue = function() {\n var defaultChild = this.coder.defaultValue();\n var result = [];\n for (var i3 = 0; i3 < this.length; i3++) {\n result.push(defaultChild);\n }\n return result;\n };\n ArrayCoder2.prototype.encode = function(writer, value) {\n if (!Array.isArray(value)) {\n this._throwError(\"expected array value\", value);\n }\n var count = this.length;\n if (count === -1) {\n count = value.length;\n writer.writeValue(value.length);\n }\n logger.checkArgumentCount(value.length, count, \"coder array\" + (this.localName ? \" \" + this.localName : \"\"));\n var coders = [];\n for (var i3 = 0; i3 < value.length; i3++) {\n coders.push(this.coder);\n }\n return pack(writer, coders, value);\n };\n ArrayCoder2.prototype.decode = function(reader) {\n var count = this.length;\n if (count === -1) {\n count = reader.readValue().toNumber();\n if (count * 32 > reader._data.length) {\n logger.throwError(\"insufficient data length\", logger_1.Logger.errors.BUFFER_OVERRUN, {\n length: reader._data.length,\n count\n });\n }\n }\n var coders = [];\n for (var i3 = 0; i3 < count; i3++) {\n coders.push(new anonymous_1.AnonymousCoder(this.coder));\n }\n return reader.coerce(this.name, unpack(reader, coders));\n };\n return ArrayCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.ArrayCoder = ArrayCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/boolean.js\n var require_boolean = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/boolean.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BooleanCoder = void 0;\n var abstract_coder_1 = require_abstract_coder();\n var BooleanCoder = (\n /** @class */\n function(_super) {\n __extends4(BooleanCoder2, _super);\n function BooleanCoder2(localName) {\n return _super.call(this, \"bool\", \"bool\", localName, false) || this;\n }\n BooleanCoder2.prototype.defaultValue = function() {\n return false;\n };\n BooleanCoder2.prototype.encode = function(writer, value) {\n return writer.writeValue(value ? 1 : 0);\n };\n BooleanCoder2.prototype.decode = function(reader) {\n return reader.coerce(this.type, !reader.readValue().isZero());\n };\n return BooleanCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.BooleanCoder = BooleanCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/bytes.js\n var require_bytes = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/bytes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BytesCoder = exports3.DynamicBytesCoder = void 0;\n var bytes_1 = require_lib2();\n var abstract_coder_1 = require_abstract_coder();\n var DynamicBytesCoder = (\n /** @class */\n function(_super) {\n __extends4(DynamicBytesCoder2, _super);\n function DynamicBytesCoder2(type, localName) {\n return _super.call(this, type, type, localName, true) || this;\n }\n DynamicBytesCoder2.prototype.defaultValue = function() {\n return \"0x\";\n };\n DynamicBytesCoder2.prototype.encode = function(writer, value) {\n value = (0, bytes_1.arrayify)(value);\n var length = writer.writeValue(value.length);\n length += writer.writeBytes(value);\n return length;\n };\n DynamicBytesCoder2.prototype.decode = function(reader) {\n return reader.readBytes(reader.readValue().toNumber(), true);\n };\n return DynamicBytesCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.DynamicBytesCoder = DynamicBytesCoder;\n var BytesCoder = (\n /** @class */\n function(_super) {\n __extends4(BytesCoder2, _super);\n function BytesCoder2(localName) {\n return _super.call(this, \"bytes\", localName) || this;\n }\n BytesCoder2.prototype.decode = function(reader) {\n return reader.coerce(this.name, (0, bytes_1.hexlify)(_super.prototype.decode.call(this, reader)));\n };\n return BytesCoder2;\n }(DynamicBytesCoder)\n );\n exports3.BytesCoder = BytesCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js\n var require_fixed_bytes = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/fixed-bytes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FixedBytesCoder = void 0;\n var bytes_1 = require_lib2();\n var abstract_coder_1 = require_abstract_coder();\n var FixedBytesCoder = (\n /** @class */\n function(_super) {\n __extends4(FixedBytesCoder2, _super);\n function FixedBytesCoder2(size6, localName) {\n var _this = this;\n var name = \"bytes\" + String(size6);\n _this = _super.call(this, name, name, localName, false) || this;\n _this.size = size6;\n return _this;\n }\n FixedBytesCoder2.prototype.defaultValue = function() {\n return \"0x0000000000000000000000000000000000000000000000000000000000000000\".substring(0, 2 + this.size * 2);\n };\n FixedBytesCoder2.prototype.encode = function(writer, value) {\n var data = (0, bytes_1.arrayify)(value);\n if (data.length !== this.size) {\n this._throwError(\"incorrect data length\", value);\n }\n return writer.writeBytes(data);\n };\n FixedBytesCoder2.prototype.decode = function(reader) {\n return reader.coerce(this.name, (0, bytes_1.hexlify)(reader.readBytes(this.size)));\n };\n return FixedBytesCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.FixedBytesCoder = FixedBytesCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/null.js\n var require_null = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/null.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NullCoder = void 0;\n var abstract_coder_1 = require_abstract_coder();\n var NullCoder = (\n /** @class */\n function(_super) {\n __extends4(NullCoder2, _super);\n function NullCoder2(localName) {\n return _super.call(this, \"null\", \"\", localName, false) || this;\n }\n NullCoder2.prototype.defaultValue = function() {\n return null;\n };\n NullCoder2.prototype.encode = function(writer, value) {\n if (value != null) {\n this._throwError(\"not null\", value);\n }\n return writer.writeBytes([]);\n };\n NullCoder2.prototype.decode = function(reader) {\n reader.readBytes(0);\n return reader.coerce(this.name, null);\n };\n return NullCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.NullCoder = NullCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/addresses.js\n var require_addresses = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/addresses.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AddressZero = void 0;\n exports3.AddressZero = \"0x0000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/bignumbers.js\n var require_bignumbers = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/bignumbers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.Two = exports3.One = exports3.Zero = exports3.NegativeOne = void 0;\n var bignumber_1 = require_lib3();\n var NegativeOne = /* @__PURE__ */ bignumber_1.BigNumber.from(-1);\n exports3.NegativeOne = NegativeOne;\n var Zero = /* @__PURE__ */ bignumber_1.BigNumber.from(0);\n exports3.Zero = Zero;\n var One = /* @__PURE__ */ bignumber_1.BigNumber.from(1);\n exports3.One = One;\n var Two = /* @__PURE__ */ bignumber_1.BigNumber.from(2);\n exports3.Two = Two;\n var WeiPerEther = /* @__PURE__ */ bignumber_1.BigNumber.from(\"1000000000000000000\");\n exports3.WeiPerEther = WeiPerEther;\n var MaxUint256 = /* @__PURE__ */ bignumber_1.BigNumber.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n exports3.MaxUint256 = MaxUint256;\n var MinInt256 = /* @__PURE__ */ bignumber_1.BigNumber.from(\"-0x8000000000000000000000000000000000000000000000000000000000000000\");\n exports3.MinInt256 = MinInt256;\n var MaxInt256 = /* @__PURE__ */ bignumber_1.BigNumber.from(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n exports3.MaxInt256 = MaxInt256;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/hashes.js\n var require_hashes = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/hashes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.HashZero = void 0;\n exports3.HashZero = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/strings.js\n var require_strings = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/strings.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EtherSymbol = void 0;\n exports3.EtherSymbol = \"\\u039E\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/index.js\n var require_lib8 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+constants@5.8.0/node_modules/@ethersproject/constants/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EtherSymbol = exports3.HashZero = exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.Two = exports3.One = exports3.Zero = exports3.NegativeOne = exports3.AddressZero = void 0;\n var addresses_1 = require_addresses();\n Object.defineProperty(exports3, \"AddressZero\", { enumerable: true, get: function() {\n return addresses_1.AddressZero;\n } });\n var bignumbers_1 = require_bignumbers();\n Object.defineProperty(exports3, \"NegativeOne\", { enumerable: true, get: function() {\n return bignumbers_1.NegativeOne;\n } });\n Object.defineProperty(exports3, \"Zero\", { enumerable: true, get: function() {\n return bignumbers_1.Zero;\n } });\n Object.defineProperty(exports3, \"One\", { enumerable: true, get: function() {\n return bignumbers_1.One;\n } });\n Object.defineProperty(exports3, \"Two\", { enumerable: true, get: function() {\n return bignumbers_1.Two;\n } });\n Object.defineProperty(exports3, \"WeiPerEther\", { enumerable: true, get: function() {\n return bignumbers_1.WeiPerEther;\n } });\n Object.defineProperty(exports3, \"MaxUint256\", { enumerable: true, get: function() {\n return bignumbers_1.MaxUint256;\n } });\n Object.defineProperty(exports3, \"MinInt256\", { enumerable: true, get: function() {\n return bignumbers_1.MinInt256;\n } });\n Object.defineProperty(exports3, \"MaxInt256\", { enumerable: true, get: function() {\n return bignumbers_1.MaxInt256;\n } });\n var hashes_1 = require_hashes();\n Object.defineProperty(exports3, \"HashZero\", { enumerable: true, get: function() {\n return hashes_1.HashZero;\n } });\n var strings_1 = require_strings();\n Object.defineProperty(exports3, \"EtherSymbol\", { enumerable: true, get: function() {\n return strings_1.EtherSymbol;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/number.js\n var require_number = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/number.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NumberCoder = void 0;\n var bignumber_1 = require_lib3();\n var constants_1 = require_lib8();\n var abstract_coder_1 = require_abstract_coder();\n var NumberCoder = (\n /** @class */\n function(_super) {\n __extends4(NumberCoder2, _super);\n function NumberCoder2(size6, signed, localName) {\n var _this = this;\n var name = (signed ? \"int\" : \"uint\") + size6 * 8;\n _this = _super.call(this, name, name, localName, false) || this;\n _this.size = size6;\n _this.signed = signed;\n return _this;\n }\n NumberCoder2.prototype.defaultValue = function() {\n return 0;\n };\n NumberCoder2.prototype.encode = function(writer, value) {\n var v2 = bignumber_1.BigNumber.from(value);\n var maxUintValue = constants_1.MaxUint256.mask(writer.wordSize * 8);\n if (this.signed) {\n var bounds = maxUintValue.mask(this.size * 8 - 1);\n if (v2.gt(bounds) || v2.lt(bounds.add(constants_1.One).mul(constants_1.NegativeOne))) {\n this._throwError(\"value out-of-bounds\", value);\n }\n } else if (v2.lt(constants_1.Zero) || v2.gt(maxUintValue.mask(this.size * 8))) {\n this._throwError(\"value out-of-bounds\", value);\n }\n v2 = v2.toTwos(this.size * 8).mask(this.size * 8);\n if (this.signed) {\n v2 = v2.fromTwos(this.size * 8).toTwos(8 * writer.wordSize);\n }\n return writer.writeValue(v2);\n };\n NumberCoder2.prototype.decode = function(reader) {\n var value = reader.readValue().mask(this.size * 8);\n if (this.signed) {\n value = value.fromTwos(this.size * 8);\n }\n return reader.coerce(this.name, value);\n };\n return NumberCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.NumberCoder = NumberCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/_version.js\n var require_version8 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"strings/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/utf8.js\n var require_utf8 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/utf8.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toUtf8CodePoints = exports3.toUtf8String = exports3._toUtf8String = exports3._toEscapedUtf8String = exports3.toUtf8Bytes = exports3.Utf8ErrorFuncs = exports3.Utf8ErrorReason = exports3.UnicodeNormalizationForm = void 0;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version8();\n var logger = new logger_1.Logger(_version_1.version);\n var UnicodeNormalizationForm;\n (function(UnicodeNormalizationForm2) {\n UnicodeNormalizationForm2[\"current\"] = \"\";\n UnicodeNormalizationForm2[\"NFC\"] = \"NFC\";\n UnicodeNormalizationForm2[\"NFD\"] = \"NFD\";\n UnicodeNormalizationForm2[\"NFKC\"] = \"NFKC\";\n UnicodeNormalizationForm2[\"NFKD\"] = \"NFKD\";\n })(UnicodeNormalizationForm = exports3.UnicodeNormalizationForm || (exports3.UnicodeNormalizationForm = {}));\n var Utf8ErrorReason;\n (function(Utf8ErrorReason2) {\n Utf8ErrorReason2[\"UNEXPECTED_CONTINUE\"] = \"unexpected continuation byte\";\n Utf8ErrorReason2[\"BAD_PREFIX\"] = \"bad codepoint prefix\";\n Utf8ErrorReason2[\"OVERRUN\"] = \"string overrun\";\n Utf8ErrorReason2[\"MISSING_CONTINUE\"] = \"missing continuation byte\";\n Utf8ErrorReason2[\"OUT_OF_RANGE\"] = \"out of UTF-8 range\";\n Utf8ErrorReason2[\"UTF16_SURROGATE\"] = \"UTF-16 surrogate\";\n Utf8ErrorReason2[\"OVERLONG\"] = \"overlong representation\";\n })(Utf8ErrorReason = exports3.Utf8ErrorReason || (exports3.Utf8ErrorReason = {}));\n function errorFunc(reason, offset, bytes, output, badCodepoint) {\n return logger.throwArgumentError(\"invalid codepoint at offset \" + offset + \"; \" + reason, \"bytes\", bytes);\n }\n function ignoreFunc(reason, offset, bytes, output, badCodepoint) {\n if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) {\n var i3 = 0;\n for (var o5 = offset + 1; o5 < bytes.length; o5++) {\n if (bytes[o5] >> 6 !== 2) {\n break;\n }\n i3++;\n }\n return i3;\n }\n if (reason === Utf8ErrorReason.OVERRUN) {\n return bytes.length - offset - 1;\n }\n return 0;\n }\n function replaceFunc(reason, offset, bytes, output, badCodepoint) {\n if (reason === Utf8ErrorReason.OVERLONG) {\n output.push(badCodepoint);\n return 0;\n }\n output.push(65533);\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n }\n exports3.Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n });\n function getUtf8CodePoints(bytes, onError) {\n if (onError == null) {\n onError = exports3.Utf8ErrorFuncs.error;\n }\n bytes = (0, bytes_1.arrayify)(bytes);\n var result = [];\n var i3 = 0;\n while (i3 < bytes.length) {\n var c4 = bytes[i3++];\n if (c4 >> 7 === 0) {\n result.push(c4);\n continue;\n }\n var extraLength = null;\n var overlongMask = null;\n if ((c4 & 224) === 192) {\n extraLength = 1;\n overlongMask = 127;\n } else if ((c4 & 240) === 224) {\n extraLength = 2;\n overlongMask = 2047;\n } else if ((c4 & 248) === 240) {\n extraLength = 3;\n overlongMask = 65535;\n } else {\n if ((c4 & 192) === 128) {\n i3 += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i3 - 1, bytes, result);\n } else {\n i3 += onError(Utf8ErrorReason.BAD_PREFIX, i3 - 1, bytes, result);\n }\n continue;\n }\n if (i3 - 1 + extraLength >= bytes.length) {\n i3 += onError(Utf8ErrorReason.OVERRUN, i3 - 1, bytes, result);\n continue;\n }\n var res = c4 & (1 << 8 - extraLength - 1) - 1;\n for (var j2 = 0; j2 < extraLength; j2++) {\n var nextChar = bytes[i3];\n if ((nextChar & 192) != 128) {\n i3 += onError(Utf8ErrorReason.MISSING_CONTINUE, i3, bytes, result);\n res = null;\n break;\n }\n ;\n res = res << 6 | nextChar & 63;\n i3++;\n }\n if (res === null) {\n continue;\n }\n if (res > 1114111) {\n i3 += onError(Utf8ErrorReason.OUT_OF_RANGE, i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res >= 55296 && res <= 57343) {\n i3 += onError(Utf8ErrorReason.UTF16_SURROGATE, i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res <= overlongMask) {\n i3 += onError(Utf8ErrorReason.OVERLONG, i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n result.push(res);\n }\n return result;\n }\n function toUtf8Bytes(str, form) {\n if (form === void 0) {\n form = UnicodeNormalizationForm.current;\n }\n if (form != UnicodeNormalizationForm.current) {\n logger.checkNormalize();\n str = str.normalize(form);\n }\n var result = [];\n for (var i3 = 0; i3 < str.length; i3++) {\n var c4 = str.charCodeAt(i3);\n if (c4 < 128) {\n result.push(c4);\n } else if (c4 < 2048) {\n result.push(c4 >> 6 | 192);\n result.push(c4 & 63 | 128);\n } else if ((c4 & 64512) == 55296) {\n i3++;\n var c22 = str.charCodeAt(i3);\n if (i3 >= str.length || (c22 & 64512) !== 56320) {\n throw new Error(\"invalid utf-8 string\");\n }\n var pair = 65536 + ((c4 & 1023) << 10) + (c22 & 1023);\n result.push(pair >> 18 | 240);\n result.push(pair >> 12 & 63 | 128);\n result.push(pair >> 6 & 63 | 128);\n result.push(pair & 63 | 128);\n } else {\n result.push(c4 >> 12 | 224);\n result.push(c4 >> 6 & 63 | 128);\n result.push(c4 & 63 | 128);\n }\n }\n return (0, bytes_1.arrayify)(result);\n }\n exports3.toUtf8Bytes = toUtf8Bytes;\n function escapeChar(value) {\n var hex = \"0000\" + value.toString(16);\n return \"\\\\u\" + hex.substring(hex.length - 4);\n }\n function _toEscapedUtf8String(bytes, onError) {\n return '\"' + getUtf8CodePoints(bytes, onError).map(function(codePoint) {\n if (codePoint < 256) {\n switch (codePoint) {\n case 8:\n return \"\\\\b\";\n case 9:\n return \"\\\\t\";\n case 10:\n return \"\\\\n\";\n case 13:\n return \"\\\\r\";\n case 34:\n return '\\\\\"';\n case 92:\n return \"\\\\\\\\\";\n }\n if (codePoint >= 32 && codePoint < 127) {\n return String.fromCharCode(codePoint);\n }\n }\n if (codePoint <= 65535) {\n return escapeChar(codePoint);\n }\n codePoint -= 65536;\n return escapeChar((codePoint >> 10 & 1023) + 55296) + escapeChar((codePoint & 1023) + 56320);\n }).join(\"\") + '\"';\n }\n exports3._toEscapedUtf8String = _toEscapedUtf8String;\n function _toUtf8String(codePoints) {\n return codePoints.map(function(codePoint) {\n if (codePoint <= 65535) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 65536;\n return String.fromCharCode((codePoint >> 10 & 1023) + 55296, (codePoint & 1023) + 56320);\n }).join(\"\");\n }\n exports3._toUtf8String = _toUtf8String;\n function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n }\n exports3.toUtf8String = toUtf8String;\n function toUtf8CodePoints(str, form) {\n if (form === void 0) {\n form = UnicodeNormalizationForm.current;\n }\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n }\n exports3.toUtf8CodePoints = toUtf8CodePoints;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/bytes32.js\n var require_bytes32 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/bytes32.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.parseBytes32String = exports3.formatBytes32String = void 0;\n var constants_1 = require_lib8();\n var bytes_1 = require_lib2();\n var utf8_1 = require_utf8();\n function formatBytes32String(text) {\n var bytes = (0, utf8_1.toUtf8Bytes)(text);\n if (bytes.length > 31) {\n throw new Error(\"bytes32 string must be less than 32 bytes\");\n }\n return (0, bytes_1.hexlify)((0, bytes_1.concat)([bytes, constants_1.HashZero]).slice(0, 32));\n }\n exports3.formatBytes32String = formatBytes32String;\n function parseBytes32String(bytes) {\n var data = (0, bytes_1.arrayify)(bytes);\n if (data.length !== 32) {\n throw new Error(\"invalid bytes32 - not 32 bytes long\");\n }\n if (data[31] !== 0) {\n throw new Error(\"invalid bytes32 string - no null terminator\");\n }\n var length = 31;\n while (data[length - 1] === 0) {\n length--;\n }\n return (0, utf8_1.toUtf8String)(data.slice(0, length));\n }\n exports3.parseBytes32String = parseBytes32String;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/idna.js\n var require_idna = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/idna.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.nameprep = exports3._nameprepTableC = exports3._nameprepTableB2 = exports3._nameprepTableA1 = void 0;\n var utf8_1 = require_utf8();\n function bytes2(data) {\n if (data.length % 4 !== 0) {\n throw new Error(\"bad data\");\n }\n var result = [];\n for (var i3 = 0; i3 < data.length; i3 += 4) {\n result.push(parseInt(data.substring(i3, i3 + 4), 16));\n }\n return result;\n }\n function createTable(data, func) {\n if (!func) {\n func = function(value) {\n return [parseInt(value, 16)];\n };\n }\n var lo = 0;\n var result = {};\n data.split(\",\").forEach(function(pair) {\n var comps = pair.split(\":\");\n lo += parseInt(comps[0], 16);\n result[lo] = func(comps[1]);\n });\n return result;\n }\n function createRangeTable(data) {\n var hi = 0;\n return data.split(\",\").map(function(v2) {\n var comps = v2.split(\"-\");\n if (comps.length === 1) {\n comps[1] = \"0\";\n } else if (comps[1] === \"\") {\n comps[1] = \"1\";\n }\n var lo = hi + parseInt(comps[0], 16);\n hi = parseInt(comps[1], 16);\n return { l: lo, h: hi };\n });\n }\n function matchMap(value, ranges) {\n var lo = 0;\n for (var i3 = 0; i3 < ranges.length; i3++) {\n var range = ranges[i3];\n lo += range.l;\n if (value >= lo && value <= lo + range.h && (value - lo) % (range.d || 1) === 0) {\n if (range.e && range.e.indexOf(value - lo) !== -1) {\n continue;\n }\n return range;\n }\n }\n return null;\n }\n var Table_A_1_ranges = createRangeTable(\"221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d\");\n var Table_B_1_flags = \"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff\".split(\",\").map(function(v2) {\n return parseInt(v2, 16);\n });\n var Table_B_2_ranges = [\n { h: 25, s: 32, l: 65 },\n { h: 30, s: 32, e: [23], l: 127 },\n { h: 54, s: 1, e: [48], l: 64, d: 2 },\n { h: 14, s: 1, l: 57, d: 2 },\n { h: 44, s: 1, l: 17, d: 2 },\n { h: 10, s: 1, e: [2, 6, 8], l: 61, d: 2 },\n { h: 16, s: 1, l: 68, d: 2 },\n { h: 84, s: 1, e: [18, 24, 66], l: 19, d: 2 },\n { h: 26, s: 32, e: [17], l: 435 },\n { h: 22, s: 1, l: 71, d: 2 },\n { h: 15, s: 80, l: 40 },\n { h: 31, s: 32, l: 16 },\n { h: 32, s: 1, l: 80, d: 2 },\n { h: 52, s: 1, l: 42, d: 2 },\n { h: 12, s: 1, l: 55, d: 2 },\n { h: 40, s: 1, e: [38], l: 15, d: 2 },\n { h: 14, s: 1, l: 48, d: 2 },\n { h: 37, s: 48, l: 49 },\n { h: 148, s: 1, l: 6351, d: 2 },\n { h: 88, s: 1, l: 160, d: 2 },\n { h: 15, s: 16, l: 704 },\n { h: 25, s: 26, l: 854 },\n { h: 25, s: 32, l: 55915 },\n { h: 37, s: 40, l: 1247 },\n { h: 25, s: -119711, l: 53248 },\n { h: 25, s: -119763, l: 52 },\n { h: 25, s: -119815, l: 52 },\n { h: 25, s: -119867, e: [1, 4, 5, 7, 8, 11, 12, 17], l: 52 },\n { h: 25, s: -119919, l: 52 },\n { h: 24, s: -119971, e: [2, 7, 8, 17], l: 52 },\n { h: 24, s: -120023, e: [2, 7, 13, 15, 16, 17], l: 52 },\n { h: 25, s: -120075, l: 52 },\n { h: 25, s: -120127, l: 52 },\n { h: 25, s: -120179, l: 52 },\n { h: 25, s: -120231, l: 52 },\n { h: 25, s: -120283, l: 52 },\n { h: 25, s: -120335, l: 52 },\n { h: 24, s: -119543, e: [17], l: 56 },\n { h: 24, s: -119601, e: [17], l: 58 },\n { h: 24, s: -119659, e: [17], l: 58 },\n { h: 24, s: -119717, e: [17], l: 58 },\n { h: 24, s: -119775, e: [17], l: 58 }\n ];\n var Table_B_2_lut_abs = createTable(\"b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3\");\n var Table_B_2_lut_rel = createTable(\"179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7\");\n var Table_B_2_complex = createTable(\"df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D\", bytes2);\n var Table_C_ranges = createRangeTable(\"80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001\");\n function flatten(values) {\n return values.reduce(function(accum, value) {\n value.forEach(function(value2) {\n accum.push(value2);\n });\n return accum;\n }, []);\n }\n function _nameprepTableA1(codepoint) {\n return !!matchMap(codepoint, Table_A_1_ranges);\n }\n exports3._nameprepTableA1 = _nameprepTableA1;\n function _nameprepTableB2(codepoint) {\n var range = matchMap(codepoint, Table_B_2_ranges);\n if (range) {\n return [codepoint + range.s];\n }\n var codes = Table_B_2_lut_abs[codepoint];\n if (codes) {\n return codes;\n }\n var shift = Table_B_2_lut_rel[codepoint];\n if (shift) {\n return [codepoint + shift[0]];\n }\n var complex = Table_B_2_complex[codepoint];\n if (complex) {\n return complex;\n }\n return null;\n }\n exports3._nameprepTableB2 = _nameprepTableB2;\n function _nameprepTableC(codepoint) {\n return !!matchMap(codepoint, Table_C_ranges);\n }\n exports3._nameprepTableC = _nameprepTableC;\n function nameprep(value) {\n if (value.match(/^[a-z0-9-]*$/i) && value.length <= 59) {\n return value.toLowerCase();\n }\n var codes = (0, utf8_1.toUtf8CodePoints)(value);\n codes = flatten(codes.map(function(code) {\n if (Table_B_1_flags.indexOf(code) >= 0) {\n return [];\n }\n if (code >= 65024 && code <= 65039) {\n return [];\n }\n var codesTableB2 = _nameprepTableB2(code);\n if (codesTableB2) {\n return codesTableB2;\n }\n return [code];\n }));\n codes = (0, utf8_1.toUtf8CodePoints)((0, utf8_1._toUtf8String)(codes), utf8_1.UnicodeNormalizationForm.NFKC);\n codes.forEach(function(code) {\n if (_nameprepTableC(code)) {\n throw new Error(\"STRINGPREP_CONTAINS_PROHIBITED\");\n }\n });\n codes.forEach(function(code) {\n if (_nameprepTableA1(code)) {\n throw new Error(\"STRINGPREP_CONTAINS_UNASSIGNED\");\n }\n });\n var name = (0, utf8_1._toUtf8String)(codes);\n if (name.substring(0, 1) === \"-\" || name.substring(2, 4) === \"--\" || name.substring(name.length - 1) === \"-\") {\n throw new Error(\"invalid hyphen\");\n }\n return name;\n }\n exports3.nameprep = nameprep;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/index.js\n var require_lib9 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+strings@5.8.0/node_modules/@ethersproject/strings/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.nameprep = exports3.parseBytes32String = exports3.formatBytes32String = exports3.UnicodeNormalizationForm = exports3.Utf8ErrorReason = exports3.Utf8ErrorFuncs = exports3.toUtf8String = exports3.toUtf8CodePoints = exports3.toUtf8Bytes = exports3._toEscapedUtf8String = void 0;\n var bytes32_1 = require_bytes32();\n Object.defineProperty(exports3, \"formatBytes32String\", { enumerable: true, get: function() {\n return bytes32_1.formatBytes32String;\n } });\n Object.defineProperty(exports3, \"parseBytes32String\", { enumerable: true, get: function() {\n return bytes32_1.parseBytes32String;\n } });\n var idna_1 = require_idna();\n Object.defineProperty(exports3, \"nameprep\", { enumerable: true, get: function() {\n return idna_1.nameprep;\n } });\n var utf8_1 = require_utf8();\n Object.defineProperty(exports3, \"_toEscapedUtf8String\", { enumerable: true, get: function() {\n return utf8_1._toEscapedUtf8String;\n } });\n Object.defineProperty(exports3, \"toUtf8Bytes\", { enumerable: true, get: function() {\n return utf8_1.toUtf8Bytes;\n } });\n Object.defineProperty(exports3, \"toUtf8CodePoints\", { enumerable: true, get: function() {\n return utf8_1.toUtf8CodePoints;\n } });\n Object.defineProperty(exports3, \"toUtf8String\", { enumerable: true, get: function() {\n return utf8_1.toUtf8String;\n } });\n Object.defineProperty(exports3, \"UnicodeNormalizationForm\", { enumerable: true, get: function() {\n return utf8_1.UnicodeNormalizationForm;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorFuncs\", { enumerable: true, get: function() {\n return utf8_1.Utf8ErrorFuncs;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorReason\", { enumerable: true, get: function() {\n return utf8_1.Utf8ErrorReason;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/string.js\n var require_string = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/string.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.StringCoder = void 0;\n var strings_1 = require_lib9();\n var bytes_1 = require_bytes();\n var StringCoder = (\n /** @class */\n function(_super) {\n __extends4(StringCoder2, _super);\n function StringCoder2(localName) {\n return _super.call(this, \"string\", localName) || this;\n }\n StringCoder2.prototype.defaultValue = function() {\n return \"\";\n };\n StringCoder2.prototype.encode = function(writer, value) {\n return _super.prototype.encode.call(this, writer, (0, strings_1.toUtf8Bytes)(value));\n };\n StringCoder2.prototype.decode = function(reader) {\n return (0, strings_1.toUtf8String)(_super.prototype.decode.call(this, reader));\n };\n return StringCoder2;\n }(bytes_1.DynamicBytesCoder)\n );\n exports3.StringCoder = StringCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/tuple.js\n var require_tuple = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/coders/tuple.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TupleCoder = void 0;\n var abstract_coder_1 = require_abstract_coder();\n var array_1 = require_array();\n var TupleCoder = (\n /** @class */\n function(_super) {\n __extends4(TupleCoder2, _super);\n function TupleCoder2(coders, localName) {\n var _this = this;\n var dynamic = false;\n var types2 = [];\n coders.forEach(function(coder) {\n if (coder.dynamic) {\n dynamic = true;\n }\n types2.push(coder.type);\n });\n var type = \"tuple(\" + types2.join(\",\") + \")\";\n _this = _super.call(this, \"tuple\", type, localName, dynamic) || this;\n _this.coders = coders;\n return _this;\n }\n TupleCoder2.prototype.defaultValue = function() {\n var values = [];\n this.coders.forEach(function(coder) {\n values.push(coder.defaultValue());\n });\n var uniqueNames = this.coders.reduce(function(accum, coder) {\n var name = coder.localName;\n if (name) {\n if (!accum[name]) {\n accum[name] = 0;\n }\n accum[name]++;\n }\n return accum;\n }, {});\n this.coders.forEach(function(coder, index2) {\n var name = coder.localName;\n if (!name || uniqueNames[name] !== 1) {\n return;\n }\n if (name === \"length\") {\n name = \"_length\";\n }\n if (values[name] != null) {\n return;\n }\n values[name] = values[index2];\n });\n return Object.freeze(values);\n };\n TupleCoder2.prototype.encode = function(writer, value) {\n return (0, array_1.pack)(writer, this.coders, value);\n };\n TupleCoder2.prototype.decode = function(reader) {\n return reader.coerce(this.name, (0, array_1.unpack)(reader, this.coders));\n };\n return TupleCoder2;\n }(abstract_coder_1.Coder)\n );\n exports3.TupleCoder = TupleCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/abi-coder.js\n var require_abi_coder = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/abi-coder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.defaultAbiCoder = exports3.AbiCoder = void 0;\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n var abstract_coder_1 = require_abstract_coder();\n var address_1 = require_address();\n var array_1 = require_array();\n var boolean_1 = require_boolean();\n var bytes_2 = require_bytes();\n var fixed_bytes_1 = require_fixed_bytes();\n var null_1 = require_null();\n var number_1 = require_number();\n var string_1 = require_string();\n var tuple_1 = require_tuple();\n var fragments_1 = require_fragments();\n var paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);\n var paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);\n var AbiCoder = (\n /** @class */\n function() {\n function AbiCoder2(coerceFunc) {\n (0, properties_1.defineReadOnly)(this, \"coerceFunc\", coerceFunc || null);\n }\n AbiCoder2.prototype._getCoder = function(param) {\n var _this = this;\n switch (param.baseType) {\n case \"address\":\n return new address_1.AddressCoder(param.name);\n case \"bool\":\n return new boolean_1.BooleanCoder(param.name);\n case \"string\":\n return new string_1.StringCoder(param.name);\n case \"bytes\":\n return new bytes_2.BytesCoder(param.name);\n case \"array\":\n return new array_1.ArrayCoder(this._getCoder(param.arrayChildren), param.arrayLength, param.name);\n case \"tuple\":\n return new tuple_1.TupleCoder((param.components || []).map(function(component) {\n return _this._getCoder(component);\n }), param.name);\n case \"\":\n return new null_1.NullCoder(param.name);\n }\n var match = param.type.match(paramTypeNumber);\n if (match) {\n var size6 = parseInt(match[2] || \"256\");\n if (size6 === 0 || size6 > 256 || size6 % 8 !== 0) {\n logger.throwArgumentError(\"invalid \" + match[1] + \" bit length\", \"param\", param);\n }\n return new number_1.NumberCoder(size6 / 8, match[1] === \"int\", param.name);\n }\n match = param.type.match(paramTypeBytes);\n if (match) {\n var size6 = parseInt(match[1]);\n if (size6 === 0 || size6 > 32) {\n logger.throwArgumentError(\"invalid bytes length\", \"param\", param);\n }\n return new fixed_bytes_1.FixedBytesCoder(size6, param.name);\n }\n return logger.throwArgumentError(\"invalid type\", \"type\", param.type);\n };\n AbiCoder2.prototype._getWordSize = function() {\n return 32;\n };\n AbiCoder2.prototype._getReader = function(data, allowLoose) {\n return new abstract_coder_1.Reader(data, this._getWordSize(), this.coerceFunc, allowLoose);\n };\n AbiCoder2.prototype._getWriter = function() {\n return new abstract_coder_1.Writer(this._getWordSize());\n };\n AbiCoder2.prototype.getDefaultValue = function(types2) {\n var _this = this;\n var coders = types2.map(function(type) {\n return _this._getCoder(fragments_1.ParamType.from(type));\n });\n var coder = new tuple_1.TupleCoder(coders, \"_\");\n return coder.defaultValue();\n };\n AbiCoder2.prototype.encode = function(types2, values) {\n var _this = this;\n if (types2.length !== values.length) {\n logger.throwError(\"types/values length mismatch\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n count: { types: types2.length, values: values.length },\n value: { types: types2, values }\n });\n }\n var coders = types2.map(function(type) {\n return _this._getCoder(fragments_1.ParamType.from(type));\n });\n var coder = new tuple_1.TupleCoder(coders, \"_\");\n var writer = this._getWriter();\n coder.encode(writer, values);\n return writer.data;\n };\n AbiCoder2.prototype.decode = function(types2, data, loose) {\n var _this = this;\n var coders = types2.map(function(type) {\n return _this._getCoder(fragments_1.ParamType.from(type));\n });\n var coder = new tuple_1.TupleCoder(coders, \"_\");\n return coder.decode(this._getReader((0, bytes_1.arrayify)(data), loose));\n };\n return AbiCoder2;\n }()\n );\n exports3.AbiCoder = AbiCoder;\n exports3.defaultAbiCoder = new AbiCoder();\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/id.js\n var require_id = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/id.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.id = void 0;\n var keccak256_1 = require_lib5();\n var strings_1 = require_lib9();\n function id(text) {\n return (0, keccak256_1.keccak256)((0, strings_1.toUtf8Bytes)(text));\n }\n exports3.id = id;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/_version.js\n var require_version9 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"hash/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+base64@5.8.0/node_modules/@ethersproject/base64/lib/browser-base64.js\n var require_browser_base64 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+base64@5.8.0/node_modules/@ethersproject/base64/lib/browser-base64.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encode = exports3.decode = void 0;\n var bytes_1 = require_lib2();\n function decode4(textData) {\n textData = atob(textData);\n var data = [];\n for (var i3 = 0; i3 < textData.length; i3++) {\n data.push(textData.charCodeAt(i3));\n }\n return (0, bytes_1.arrayify)(data);\n }\n exports3.decode = decode4;\n function encode7(data) {\n data = (0, bytes_1.arrayify)(data);\n var textData = \"\";\n for (var i3 = 0; i3 < data.length; i3++) {\n textData += String.fromCharCode(data[i3]);\n }\n return btoa(textData);\n }\n exports3.encode = encode7;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+base64@5.8.0/node_modules/@ethersproject/base64/lib/index.js\n var require_lib10 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+base64@5.8.0/node_modules/@ethersproject/base64/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encode = exports3.decode = void 0;\n var base64_1 = require_browser_base64();\n Object.defineProperty(exports3, \"decode\", { enumerable: true, get: function() {\n return base64_1.decode;\n } });\n Object.defineProperty(exports3, \"encode\", { enumerable: true, get: function() {\n return base64_1.encode;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.js\n var require_decoder = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/decoder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.read_emoji_trie = exports3.read_zero_terminated_array = exports3.read_mapped_map = exports3.read_member_array = exports3.signed = exports3.read_compressed_payload = exports3.read_payload = exports3.decode_arithmetic = void 0;\n function flat(array, depth) {\n if (depth == null) {\n depth = 1;\n }\n var result = [];\n var forEach = result.forEach;\n var flatDeep = function(arr, depth2) {\n forEach.call(arr, function(val) {\n if (depth2 > 0 && Array.isArray(val)) {\n flatDeep(val, depth2 - 1);\n } else {\n result.push(val);\n }\n });\n };\n flatDeep(array, depth);\n return result;\n }\n function fromEntries(array) {\n var result = {};\n for (var i3 = 0; i3 < array.length; i3++) {\n var value = array[i3];\n result[value[0]] = value[1];\n }\n return result;\n }\n function decode_arithmetic(bytes) {\n var pos = 0;\n function u16() {\n return bytes[pos++] << 8 | bytes[pos++];\n }\n var symbol_count = u16();\n var total = 1;\n var acc = [0, 1];\n for (var i3 = 1; i3 < symbol_count; i3++) {\n acc.push(total += u16());\n }\n var skip = u16();\n var pos_payload = pos;\n pos += skip;\n var read_width = 0;\n var read_buffer = 0;\n function read_bit() {\n if (read_width == 0) {\n read_buffer = read_buffer << 8 | bytes[pos++];\n read_width = 8;\n }\n return read_buffer >> --read_width & 1;\n }\n var N4 = 31;\n var FULL = Math.pow(2, N4);\n var HALF = FULL >>> 1;\n var QRTR = HALF >> 1;\n var MASK = FULL - 1;\n var register = 0;\n for (var i3 = 0; i3 < N4; i3++)\n register = register << 1 | read_bit();\n var symbols = [];\n var low = 0;\n var range = FULL;\n while (true) {\n var value = Math.floor(((register - low + 1) * total - 1) / range);\n var start = 0;\n var end = symbol_count;\n while (end - start > 1) {\n var mid = start + end >>> 1;\n if (value < acc[mid]) {\n end = mid;\n } else {\n start = mid;\n }\n }\n if (start == 0)\n break;\n symbols.push(start);\n var a3 = low + Math.floor(range * acc[start] / total);\n var b4 = low + Math.floor(range * acc[start + 1] / total) - 1;\n while (((a3 ^ b4) & HALF) == 0) {\n register = register << 1 & MASK | read_bit();\n a3 = a3 << 1 & MASK;\n b4 = b4 << 1 & MASK | 1;\n }\n while (a3 & ~b4 & QRTR) {\n register = register & HALF | register << 1 & MASK >>> 1 | read_bit();\n a3 = a3 << 1 ^ HALF;\n b4 = (b4 ^ HALF) << 1 | HALF | 1;\n }\n low = a3;\n range = 1 + b4 - a3;\n }\n var offset = symbol_count - 4;\n return symbols.map(function(x4) {\n switch (x4 - offset) {\n case 3:\n return offset + 65792 + (bytes[pos_payload++] << 16 | bytes[pos_payload++] << 8 | bytes[pos_payload++]);\n case 2:\n return offset + 256 + (bytes[pos_payload++] << 8 | bytes[pos_payload++]);\n case 1:\n return offset + bytes[pos_payload++];\n default:\n return x4 - 1;\n }\n });\n }\n exports3.decode_arithmetic = decode_arithmetic;\n function read_payload(v2) {\n var pos = 0;\n return function() {\n return v2[pos++];\n };\n }\n exports3.read_payload = read_payload;\n function read_compressed_payload(bytes) {\n return read_payload(decode_arithmetic(bytes));\n }\n exports3.read_compressed_payload = read_compressed_payload;\n function signed(i3) {\n return i3 & 1 ? ~i3 >> 1 : i3 >> 1;\n }\n exports3.signed = signed;\n function read_counts(n2, next) {\n var v2 = Array(n2);\n for (var i3 = 0; i3 < n2; i3++)\n v2[i3] = 1 + next();\n return v2;\n }\n function read_ascending(n2, next) {\n var v2 = Array(n2);\n for (var i3 = 0, x4 = -1; i3 < n2; i3++)\n v2[i3] = x4 += 1 + next();\n return v2;\n }\n function read_deltas(n2, next) {\n var v2 = Array(n2);\n for (var i3 = 0, x4 = 0; i3 < n2; i3++)\n v2[i3] = x4 += signed(next());\n return v2;\n }\n function read_member_array(next, lookup) {\n var v2 = read_ascending(next(), next);\n var n2 = next();\n var vX = read_ascending(n2, next);\n var vN = read_counts(n2, next);\n for (var i3 = 0; i3 < n2; i3++) {\n for (var j2 = 0; j2 < vN[i3]; j2++) {\n v2.push(vX[i3] + j2);\n }\n }\n return lookup ? v2.map(function(x4) {\n return lookup[x4];\n }) : v2;\n }\n exports3.read_member_array = read_member_array;\n function read_mapped_map(next) {\n var ret = [];\n while (true) {\n var w3 = next();\n if (w3 == 0)\n break;\n ret.push(read_linear_table(w3, next));\n }\n while (true) {\n var w3 = next() - 1;\n if (w3 < 0)\n break;\n ret.push(read_replacement_table(w3, next));\n }\n return fromEntries(flat(ret));\n }\n exports3.read_mapped_map = read_mapped_map;\n function read_zero_terminated_array(next) {\n var v2 = [];\n while (true) {\n var i3 = next();\n if (i3 == 0)\n break;\n v2.push(i3);\n }\n return v2;\n }\n exports3.read_zero_terminated_array = read_zero_terminated_array;\n function read_transposed(n2, w3, next) {\n var m2 = Array(n2).fill(void 0).map(function() {\n return [];\n });\n for (var i3 = 0; i3 < w3; i3++) {\n read_deltas(n2, next).forEach(function(x4, j2) {\n return m2[j2].push(x4);\n });\n }\n return m2;\n }\n function read_linear_table(w3, next) {\n var dx = 1 + next();\n var dy = next();\n var vN = read_zero_terminated_array(next);\n var m2 = read_transposed(vN.length, 1 + w3, next);\n return flat(m2.map(function(v2, i3) {\n var x4 = v2[0], ys = v2.slice(1);\n return Array(vN[i3]).fill(void 0).map(function(_2, j2) {\n var j_dy = j2 * dy;\n return [x4 + j2 * dx, ys.map(function(y6) {\n return y6 + j_dy;\n })];\n });\n }));\n }\n function read_replacement_table(w3, next) {\n var n2 = 1 + next();\n var m2 = read_transposed(n2, 1 + w3, next);\n return m2.map(function(v2) {\n return [v2[0], v2.slice(1)];\n });\n }\n function read_emoji_trie(next) {\n var sorted = read_member_array(next).sort(function(a3, b4) {\n return a3 - b4;\n });\n return read();\n function read() {\n var branches = [];\n while (true) {\n var keys = read_member_array(next, sorted);\n if (keys.length == 0)\n break;\n branches.push({ set: new Set(keys), node: read() });\n }\n branches.sort(function(a3, b4) {\n return b4.set.size - a3.set.size;\n });\n var temp = next();\n var valid = temp % 3;\n temp = temp / 3 | 0;\n var fe0f = !!(temp & 1);\n temp >>= 1;\n var save = temp == 1;\n var check2 = temp == 2;\n return { branches, valid, fe0f, save, check: check2 };\n }\n }\n exports3.read_emoji_trie = read_emoji_trie;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/include.js\n var require_include = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/include.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getData = void 0;\n var base64_1 = require_lib10();\n var decoder_js_1 = require_decoder();\n function getData() {\n return (0, decoder_js_1.read_compressed_payload)((0, base64_1.decode)(\"AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==\"));\n }\n exports3.getData = getData;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/lib.js\n var require_lib11 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/ens-normalize/lib.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ens_normalize = exports3.ens_normalize_post_check = void 0;\n var strings_1 = require_lib9();\n var include_js_1 = require_include();\n var r2 = (0, include_js_1.getData)();\n var decoder_js_1 = require_decoder();\n var VALID = new Set((0, decoder_js_1.read_member_array)(r2));\n var IGNORED = new Set((0, decoder_js_1.read_member_array)(r2));\n var MAPPED = (0, decoder_js_1.read_mapped_map)(r2);\n var EMOJI_ROOT = (0, decoder_js_1.read_emoji_trie)(r2);\n var HYPHEN = 45;\n var UNDERSCORE = 95;\n function explode_cp(name) {\n return (0, strings_1.toUtf8CodePoints)(name);\n }\n function filter_fe0f(cps) {\n return cps.filter(function(cp) {\n return cp != 65039;\n });\n }\n function ens_normalize_post_check(name) {\n for (var _i = 0, _a = name.split(\".\"); _i < _a.length; _i++) {\n var label = _a[_i];\n var cps = explode_cp(label);\n try {\n for (var i3 = cps.lastIndexOf(UNDERSCORE) - 1; i3 >= 0; i3--) {\n if (cps[i3] !== UNDERSCORE) {\n throw new Error(\"underscore only allowed at start\");\n }\n }\n if (cps.length >= 4 && cps.every(function(cp) {\n return cp < 128;\n }) && cps[2] === HYPHEN && cps[3] === HYPHEN) {\n throw new Error(\"invalid label extension\");\n }\n } catch (err) {\n throw new Error('Invalid label \"' + label + '\": ' + err.message);\n }\n }\n return name;\n }\n exports3.ens_normalize_post_check = ens_normalize_post_check;\n function ens_normalize(name) {\n return ens_normalize_post_check(normalize2(name, filter_fe0f));\n }\n exports3.ens_normalize = ens_normalize;\n function normalize2(name, emoji_filter) {\n var input = explode_cp(name).reverse();\n var output = [];\n while (input.length) {\n var emoji = consume_emoji_reversed(input);\n if (emoji) {\n output.push.apply(output, emoji_filter(emoji));\n continue;\n }\n var cp = input.pop();\n if (VALID.has(cp)) {\n output.push(cp);\n continue;\n }\n if (IGNORED.has(cp)) {\n continue;\n }\n var cps = MAPPED[cp];\n if (cps) {\n output.push.apply(output, cps);\n continue;\n }\n throw new Error(\"Disallowed codepoint: 0x\" + cp.toString(16).toUpperCase());\n }\n return ens_normalize_post_check(nfc(String.fromCodePoint.apply(String, output)));\n }\n function nfc(s4) {\n return s4.normalize(\"NFC\");\n }\n function consume_emoji_reversed(cps, eaten) {\n var _a;\n var node = EMOJI_ROOT;\n var emoji;\n var saved;\n var stack = [];\n var pos = cps.length;\n if (eaten)\n eaten.length = 0;\n var _loop_1 = function() {\n var cp = cps[--pos];\n node = (_a = node.branches.find(function(x4) {\n return x4.set.has(cp);\n })) === null || _a === void 0 ? void 0 : _a.node;\n if (!node)\n return \"break\";\n if (node.save) {\n saved = cp;\n } else if (node.check) {\n if (cp === saved)\n return \"break\";\n }\n stack.push(cp);\n if (node.fe0f) {\n stack.push(65039);\n if (pos > 0 && cps[pos - 1] == 65039)\n pos--;\n }\n if (node.valid) {\n emoji = stack.slice();\n if (node.valid == 2)\n emoji.splice(1, 1);\n if (eaten)\n eaten.push.apply(eaten, cps.slice(pos).reverse());\n cps.length = pos;\n }\n };\n while (pos) {\n var state_1 = _loop_1();\n if (state_1 === \"break\")\n break;\n }\n return emoji;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/namehash.js\n var require_namehash = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/namehash.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.dnsEncode = exports3.namehash = exports3.isValidName = exports3.ensNormalize = void 0;\n var bytes_1 = require_lib2();\n var strings_1 = require_lib9();\n var keccak256_1 = require_lib5();\n var logger_1 = require_lib();\n var _version_1 = require_version9();\n var logger = new logger_1.Logger(_version_1.version);\n var lib_1 = require_lib11();\n var Zeros = new Uint8Array(32);\n Zeros.fill(0);\n function checkComponent(comp) {\n if (comp.length === 0) {\n throw new Error(\"invalid ENS name; empty component\");\n }\n return comp;\n }\n function ensNameSplit(name) {\n var bytes = (0, strings_1.toUtf8Bytes)((0, lib_1.ens_normalize)(name));\n var comps = [];\n if (name.length === 0) {\n return comps;\n }\n var last = 0;\n for (var i3 = 0; i3 < bytes.length; i3++) {\n var d5 = bytes[i3];\n if (d5 === 46) {\n comps.push(checkComponent(bytes.slice(last, i3)));\n last = i3 + 1;\n }\n }\n if (last >= bytes.length) {\n throw new Error(\"invalid ENS name; empty component\");\n }\n comps.push(checkComponent(bytes.slice(last)));\n return comps;\n }\n function ensNormalize(name) {\n return ensNameSplit(name).map(function(comp) {\n return (0, strings_1.toUtf8String)(comp);\n }).join(\".\");\n }\n exports3.ensNormalize = ensNormalize;\n function isValidName(name) {\n try {\n return ensNameSplit(name).length !== 0;\n } catch (error) {\n }\n return false;\n }\n exports3.isValidName = isValidName;\n function namehash2(name) {\n if (typeof name !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name; not a string\", \"name\", name);\n }\n var result = Zeros;\n var comps = ensNameSplit(name);\n while (comps.length) {\n result = (0, keccak256_1.keccak256)((0, bytes_1.concat)([result, (0, keccak256_1.keccak256)(comps.pop())]));\n }\n return (0, bytes_1.hexlify)(result);\n }\n exports3.namehash = namehash2;\n function dnsEncode(name) {\n return (0, bytes_1.hexlify)((0, bytes_1.concat)(ensNameSplit(name).map(function(comp) {\n if (comp.length > 63) {\n throw new Error(\"invalid DNS encoded entry; length exceeds 63 bytes\");\n }\n var bytes = new Uint8Array(comp.length + 1);\n bytes.set(comp, 1);\n bytes[0] = bytes.length - 1;\n return bytes;\n }))) + \"00\";\n }\n exports3.dnsEncode = dnsEncode;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/message.js\n var require_message = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/message.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.hashMessage = exports3.messagePrefix = void 0;\n var bytes_1 = require_lib2();\n var keccak256_1 = require_lib5();\n var strings_1 = require_lib9();\n exports3.messagePrefix = \"\u0019Ethereum Signed Message:\\n\";\n function hashMessage2(message2) {\n if (typeof message2 === \"string\") {\n message2 = (0, strings_1.toUtf8Bytes)(message2);\n }\n return (0, keccak256_1.keccak256)((0, bytes_1.concat)([\n (0, strings_1.toUtf8Bytes)(exports3.messagePrefix),\n (0, strings_1.toUtf8Bytes)(String(message2.length)),\n message2\n ]));\n }\n exports3.hashMessage = hashMessage2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/typed-data.js\n var require_typed_data = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/typed-data.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TypedDataEncoder = void 0;\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var keccak256_1 = require_lib5();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version9();\n var logger = new logger_1.Logger(_version_1.version);\n var id_1 = require_id();\n var padding = new Uint8Array(32);\n padding.fill(0);\n var NegativeOne = bignumber_1.BigNumber.from(-1);\n var Zero = bignumber_1.BigNumber.from(0);\n var One = bignumber_1.BigNumber.from(1);\n var MaxUint256 = bignumber_1.BigNumber.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n function hexPadRight(value) {\n var bytes = (0, bytes_1.arrayify)(value);\n var padOffset = bytes.length % 32;\n if (padOffset) {\n return (0, bytes_1.hexConcat)([bytes, padding.slice(padOffset)]);\n }\n return (0, bytes_1.hexlify)(bytes);\n }\n var hexTrue = (0, bytes_1.hexZeroPad)(One.toHexString(), 32);\n var hexFalse = (0, bytes_1.hexZeroPad)(Zero.toHexString(), 32);\n var domainFieldTypes = {\n name: \"string\",\n version: \"string\",\n chainId: \"uint256\",\n verifyingContract: \"address\",\n salt: \"bytes32\"\n };\n var domainFieldNames = [\n \"name\",\n \"version\",\n \"chainId\",\n \"verifyingContract\",\n \"salt\"\n ];\n function checkString(key) {\n return function(value) {\n if (typeof value !== \"string\") {\n logger.throwArgumentError(\"invalid domain value for \" + JSON.stringify(key), \"domain.\" + key, value);\n }\n return value;\n };\n }\n var domainChecks = {\n name: checkString(\"name\"),\n version: checkString(\"version\"),\n chainId: function(value) {\n try {\n return bignumber_1.BigNumber.from(value).toString();\n } catch (error) {\n }\n return logger.throwArgumentError('invalid domain value for \"chainId\"', \"domain.chainId\", value);\n },\n verifyingContract: function(value) {\n try {\n return (0, address_1.getAddress)(value).toLowerCase();\n } catch (error) {\n }\n return logger.throwArgumentError('invalid domain value \"verifyingContract\"', \"domain.verifyingContract\", value);\n },\n salt: function(value) {\n try {\n var bytes = (0, bytes_1.arrayify)(value);\n if (bytes.length !== 32) {\n throw new Error(\"bad length\");\n }\n return (0, bytes_1.hexlify)(bytes);\n } catch (error) {\n }\n return logger.throwArgumentError('invalid domain value \"salt\"', \"domain.salt\", value);\n }\n };\n function getBaseEncoder(type) {\n {\n var match = type.match(/^(u?)int(\\d*)$/);\n if (match) {\n var signed = match[1] === \"\";\n var width = parseInt(match[2] || \"256\");\n if (width % 8 !== 0 || width > 256 || match[2] && match[2] !== String(width)) {\n logger.throwArgumentError(\"invalid numeric width\", \"type\", type);\n }\n var boundsUpper_1 = MaxUint256.mask(signed ? width - 1 : width);\n var boundsLower_1 = signed ? boundsUpper_1.add(One).mul(NegativeOne) : Zero;\n return function(value) {\n var v2 = bignumber_1.BigNumber.from(value);\n if (v2.lt(boundsLower_1) || v2.gt(boundsUpper_1)) {\n logger.throwArgumentError(\"value out-of-bounds for \" + type, \"value\", value);\n }\n return (0, bytes_1.hexZeroPad)(v2.toTwos(256).toHexString(), 32);\n };\n }\n }\n {\n var match = type.match(/^bytes(\\d+)$/);\n if (match) {\n var width_1 = parseInt(match[1]);\n if (width_1 === 0 || width_1 > 32 || match[1] !== String(width_1)) {\n logger.throwArgumentError(\"invalid bytes width\", \"type\", type);\n }\n return function(value) {\n var bytes = (0, bytes_1.arrayify)(value);\n if (bytes.length !== width_1) {\n logger.throwArgumentError(\"invalid length for \" + type, \"value\", value);\n }\n return hexPadRight(value);\n };\n }\n }\n switch (type) {\n case \"address\":\n return function(value) {\n return (0, bytes_1.hexZeroPad)((0, address_1.getAddress)(value), 32);\n };\n case \"bool\":\n return function(value) {\n return !value ? hexFalse : hexTrue;\n };\n case \"bytes\":\n return function(value) {\n return (0, keccak256_1.keccak256)(value);\n };\n case \"string\":\n return function(value) {\n return (0, id_1.id)(value);\n };\n }\n return null;\n }\n function encodeType2(name, fields) {\n return name + \"(\" + fields.map(function(_a) {\n var name2 = _a.name, type = _a.type;\n return type + \" \" + name2;\n }).join(\",\") + \")\";\n }\n var TypedDataEncoder = (\n /** @class */\n function() {\n function TypedDataEncoder2(types2) {\n (0, properties_1.defineReadOnly)(this, \"types\", Object.freeze((0, properties_1.deepCopy)(types2)));\n (0, properties_1.defineReadOnly)(this, \"_encoderCache\", {});\n (0, properties_1.defineReadOnly)(this, \"_types\", {});\n var links = {};\n var parents = {};\n var subtypes = {};\n Object.keys(types2).forEach(function(type) {\n links[type] = {};\n parents[type] = [];\n subtypes[type] = {};\n });\n var _loop_1 = function(name_12) {\n var uniqueNames = {};\n types2[name_12].forEach(function(field) {\n if (uniqueNames[field.name]) {\n logger.throwArgumentError(\"duplicate variable name \" + JSON.stringify(field.name) + \" in \" + JSON.stringify(name_12), \"types\", types2);\n }\n uniqueNames[field.name] = true;\n var baseType = field.type.match(/^([^\\x5b]*)(\\x5b|$)/)[1];\n if (baseType === name_12) {\n logger.throwArgumentError(\"circular type reference to \" + JSON.stringify(baseType), \"types\", types2);\n }\n var encoder7 = getBaseEncoder(baseType);\n if (encoder7) {\n return;\n }\n if (!parents[baseType]) {\n logger.throwArgumentError(\"unknown type \" + JSON.stringify(baseType), \"types\", types2);\n }\n parents[baseType].push(name_12);\n links[name_12][baseType] = true;\n });\n };\n for (var name_1 in types2) {\n _loop_1(name_1);\n }\n var primaryTypes = Object.keys(parents).filter(function(n2) {\n return parents[n2].length === 0;\n });\n if (primaryTypes.length === 0) {\n logger.throwArgumentError(\"missing primary type\", \"types\", types2);\n } else if (primaryTypes.length > 1) {\n logger.throwArgumentError(\"ambiguous primary types or unused types: \" + primaryTypes.map(function(t3) {\n return JSON.stringify(t3);\n }).join(\", \"), \"types\", types2);\n }\n (0, properties_1.defineReadOnly)(this, \"primaryType\", primaryTypes[0]);\n function checkCircular(type, found) {\n if (found[type]) {\n logger.throwArgumentError(\"circular type reference to \" + JSON.stringify(type), \"types\", types2);\n }\n found[type] = true;\n Object.keys(links[type]).forEach(function(child) {\n if (!parents[child]) {\n return;\n }\n checkCircular(child, found);\n Object.keys(found).forEach(function(subtype) {\n subtypes[subtype][child] = true;\n });\n });\n delete found[type];\n }\n checkCircular(this.primaryType, {});\n for (var name_2 in subtypes) {\n var st = Object.keys(subtypes[name_2]);\n st.sort();\n this._types[name_2] = encodeType2(name_2, types2[name_2]) + st.map(function(t3) {\n return encodeType2(t3, types2[t3]);\n }).join(\"\");\n }\n }\n TypedDataEncoder2.prototype.getEncoder = function(type) {\n var encoder7 = this._encoderCache[type];\n if (!encoder7) {\n encoder7 = this._encoderCache[type] = this._getEncoder(type);\n }\n return encoder7;\n };\n TypedDataEncoder2.prototype._getEncoder = function(type) {\n var _this = this;\n {\n var encoder7 = getBaseEncoder(type);\n if (encoder7) {\n return encoder7;\n }\n }\n var match = type.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n var subtype_1 = match[1];\n var subEncoder_1 = this.getEncoder(subtype_1);\n var length_1 = parseInt(match[3]);\n return function(value) {\n if (length_1 >= 0 && value.length !== length_1) {\n logger.throwArgumentError(\"array length mismatch; expected length ${ arrayLength }\", \"value\", value);\n }\n var result = value.map(subEncoder_1);\n if (_this._types[subtype_1]) {\n result = result.map(keccak256_1.keccak256);\n }\n return (0, keccak256_1.keccak256)((0, bytes_1.hexConcat)(result));\n };\n }\n var fields = this.types[type];\n if (fields) {\n var encodedType_1 = (0, id_1.id)(this._types[type]);\n return function(value) {\n var values = fields.map(function(_a) {\n var name = _a.name, type2 = _a.type;\n var result = _this.getEncoder(type2)(value[name]);\n if (_this._types[type2]) {\n return (0, keccak256_1.keccak256)(result);\n }\n return result;\n });\n values.unshift(encodedType_1);\n return (0, bytes_1.hexConcat)(values);\n };\n }\n return logger.throwArgumentError(\"unknown type: \" + type, \"type\", type);\n };\n TypedDataEncoder2.prototype.encodeType = function(name) {\n var result = this._types[name];\n if (!result) {\n logger.throwArgumentError(\"unknown type: \" + JSON.stringify(name), \"name\", name);\n }\n return result;\n };\n TypedDataEncoder2.prototype.encodeData = function(type, value) {\n return this.getEncoder(type)(value);\n };\n TypedDataEncoder2.prototype.hashStruct = function(name, value) {\n return (0, keccak256_1.keccak256)(this.encodeData(name, value));\n };\n TypedDataEncoder2.prototype.encode = function(value) {\n return this.encodeData(this.primaryType, value);\n };\n TypedDataEncoder2.prototype.hash = function(value) {\n return this.hashStruct(this.primaryType, value);\n };\n TypedDataEncoder2.prototype._visit = function(type, value, callback) {\n var _this = this;\n {\n var encoder7 = getBaseEncoder(type);\n if (encoder7) {\n return callback(type, value);\n }\n }\n var match = type.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n var subtype_2 = match[1];\n var length_2 = parseInt(match[3]);\n if (length_2 >= 0 && value.length !== length_2) {\n logger.throwArgumentError(\"array length mismatch; expected length ${ arrayLength }\", \"value\", value);\n }\n return value.map(function(v2) {\n return _this._visit(subtype_2, v2, callback);\n });\n }\n var fields = this.types[type];\n if (fields) {\n return fields.reduce(function(accum, _a) {\n var name = _a.name, type2 = _a.type;\n accum[name] = _this._visit(type2, value[name], callback);\n return accum;\n }, {});\n }\n return logger.throwArgumentError(\"unknown type: \" + type, \"type\", type);\n };\n TypedDataEncoder2.prototype.visit = function(value, callback) {\n return this._visit(this.primaryType, value, callback);\n };\n TypedDataEncoder2.from = function(types2) {\n return new TypedDataEncoder2(types2);\n };\n TypedDataEncoder2.getPrimaryType = function(types2) {\n return TypedDataEncoder2.from(types2).primaryType;\n };\n TypedDataEncoder2.hashStruct = function(name, types2, value) {\n return TypedDataEncoder2.from(types2).hashStruct(name, value);\n };\n TypedDataEncoder2.hashDomain = function(domain2) {\n var domainFields = [];\n for (var name_3 in domain2) {\n var type = domainFieldTypes[name_3];\n if (!type) {\n logger.throwArgumentError(\"invalid typed-data domain key: \" + JSON.stringify(name_3), \"domain\", domain2);\n }\n domainFields.push({ name: name_3, type });\n }\n domainFields.sort(function(a3, b4) {\n return domainFieldNames.indexOf(a3.name) - domainFieldNames.indexOf(b4.name);\n });\n return TypedDataEncoder2.hashStruct(\"EIP712Domain\", { EIP712Domain: domainFields }, domain2);\n };\n TypedDataEncoder2.encode = function(domain2, types2, value) {\n return (0, bytes_1.hexConcat)([\n \"0x1901\",\n TypedDataEncoder2.hashDomain(domain2),\n TypedDataEncoder2.from(types2).hash(value)\n ]);\n };\n TypedDataEncoder2.hash = function(domain2, types2, value) {\n return (0, keccak256_1.keccak256)(TypedDataEncoder2.encode(domain2, types2, value));\n };\n TypedDataEncoder2.resolveNames = function(domain2, types2, value, resolveName) {\n return __awaiter4(this, void 0, void 0, function() {\n var ensCache, encoder7, _a, _b, _i, name_4, _c, _d;\n return __generator4(this, function(_e) {\n switch (_e.label) {\n case 0:\n domain2 = (0, properties_1.shallowCopy)(domain2);\n ensCache = {};\n if (domain2.verifyingContract && !(0, bytes_1.isHexString)(domain2.verifyingContract, 20)) {\n ensCache[domain2.verifyingContract] = \"0x\";\n }\n encoder7 = TypedDataEncoder2.from(types2);\n encoder7.visit(value, function(type, value2) {\n if (type === \"address\" && !(0, bytes_1.isHexString)(value2, 20)) {\n ensCache[value2] = \"0x\";\n }\n return value2;\n });\n _a = [];\n for (_b in ensCache)\n _a.push(_b);\n _i = 0;\n _e.label = 1;\n case 1:\n if (!(_i < _a.length))\n return [3, 4];\n name_4 = _a[_i];\n _c = ensCache;\n _d = name_4;\n return [4, resolveName(name_4)];\n case 2:\n _c[_d] = _e.sent();\n _e.label = 3;\n case 3:\n _i++;\n return [3, 1];\n case 4:\n if (domain2.verifyingContract && ensCache[domain2.verifyingContract]) {\n domain2.verifyingContract = ensCache[domain2.verifyingContract];\n }\n value = encoder7.visit(value, function(type, value2) {\n if (type === \"address\" && ensCache[value2]) {\n return ensCache[value2];\n }\n return value2;\n });\n return [2, { domain: domain2, value }];\n }\n });\n });\n };\n TypedDataEncoder2.getPayload = function(domain2, types2, value) {\n TypedDataEncoder2.hashDomain(domain2);\n var domainValues = {};\n var domainTypes = [];\n domainFieldNames.forEach(function(name) {\n var value2 = domain2[name];\n if (value2 == null) {\n return;\n }\n domainValues[name] = domainChecks[name](value2);\n domainTypes.push({ name, type: domainFieldTypes[name] });\n });\n var encoder7 = TypedDataEncoder2.from(types2);\n var typesWithDomain = (0, properties_1.shallowCopy)(types2);\n if (typesWithDomain.EIP712Domain) {\n logger.throwArgumentError(\"types must not contain EIP712Domain type\", \"types.EIP712Domain\", types2);\n } else {\n typesWithDomain.EIP712Domain = domainTypes;\n }\n encoder7.encode(value);\n return {\n types: typesWithDomain,\n domain: domainValues,\n primaryType: encoder7.primaryType,\n message: encoder7.visit(value, function(type, value2) {\n if (type.match(/^bytes(\\d*)/)) {\n return (0, bytes_1.hexlify)((0, bytes_1.arrayify)(value2));\n }\n if (type.match(/^u?int/)) {\n return bignumber_1.BigNumber.from(value2).toString();\n }\n switch (type) {\n case \"address\":\n return value2.toLowerCase();\n case \"bool\":\n return !!value2;\n case \"string\":\n if (typeof value2 !== \"string\") {\n logger.throwArgumentError(\"invalid string\", \"value\", value2);\n }\n return value2;\n }\n return logger.throwArgumentError(\"unsupported type\", \"type\", type);\n })\n };\n };\n return TypedDataEncoder2;\n }()\n );\n exports3.TypedDataEncoder = TypedDataEncoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/index.js\n var require_lib12 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hash@5.8.0/node_modules/@ethersproject/hash/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3._TypedDataEncoder = exports3.hashMessage = exports3.messagePrefix = exports3.ensNormalize = exports3.isValidName = exports3.namehash = exports3.dnsEncode = exports3.id = void 0;\n var id_1 = require_id();\n Object.defineProperty(exports3, \"id\", { enumerable: true, get: function() {\n return id_1.id;\n } });\n var namehash_1 = require_namehash();\n Object.defineProperty(exports3, \"dnsEncode\", { enumerable: true, get: function() {\n return namehash_1.dnsEncode;\n } });\n Object.defineProperty(exports3, \"isValidName\", { enumerable: true, get: function() {\n return namehash_1.isValidName;\n } });\n Object.defineProperty(exports3, \"namehash\", { enumerable: true, get: function() {\n return namehash_1.namehash;\n } });\n var message_1 = require_message();\n Object.defineProperty(exports3, \"hashMessage\", { enumerable: true, get: function() {\n return message_1.hashMessage;\n } });\n Object.defineProperty(exports3, \"messagePrefix\", { enumerable: true, get: function() {\n return message_1.messagePrefix;\n } });\n var namehash_2 = require_namehash();\n Object.defineProperty(exports3, \"ensNormalize\", { enumerable: true, get: function() {\n return namehash_2.ensNormalize;\n } });\n var typed_data_1 = require_typed_data();\n Object.defineProperty(exports3, \"_TypedDataEncoder\", { enumerable: true, get: function() {\n return typed_data_1.TypedDataEncoder;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/interface.js\n var require_interface = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/interface.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Interface = exports3.Indexed = exports3.ErrorDescription = exports3.TransactionDescription = exports3.LogDescription = exports3.checkResultErrors = void 0;\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var hash_1 = require_lib12();\n var keccak256_1 = require_lib5();\n var properties_1 = require_lib4();\n var abi_coder_1 = require_abi_coder();\n var abstract_coder_1 = require_abstract_coder();\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return abstract_coder_1.checkResultErrors;\n } });\n var fragments_1 = require_fragments();\n var logger_1 = require_lib();\n var _version_1 = require_version5();\n var logger = new logger_1.Logger(_version_1.version);\n var LogDescription = (\n /** @class */\n function(_super) {\n __extends4(LogDescription2, _super);\n function LogDescription2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return LogDescription2;\n }(properties_1.Description)\n );\n exports3.LogDescription = LogDescription;\n var TransactionDescription = (\n /** @class */\n function(_super) {\n __extends4(TransactionDescription2, _super);\n function TransactionDescription2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return TransactionDescription2;\n }(properties_1.Description)\n );\n exports3.TransactionDescription = TransactionDescription;\n var ErrorDescription = (\n /** @class */\n function(_super) {\n __extends4(ErrorDescription2, _super);\n function ErrorDescription2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ErrorDescription2;\n }(properties_1.Description)\n );\n exports3.ErrorDescription = ErrorDescription;\n var Indexed = (\n /** @class */\n function(_super) {\n __extends4(Indexed2, _super);\n function Indexed2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Indexed2.isIndexed = function(value) {\n return !!(value && value._isIndexed);\n };\n return Indexed2;\n }(properties_1.Description)\n );\n exports3.Indexed = Indexed;\n var BuiltinErrors = {\n \"0x08c379a0\": { signature: \"Error(string)\", name: \"Error\", inputs: [\"string\"], reason: true },\n \"0x4e487b71\": { signature: \"Panic(uint256)\", name: \"Panic\", inputs: [\"uint256\"] }\n };\n function wrapAccessError(property, error) {\n var wrap5 = new Error(\"deferred error during ABI decoding triggered accessing \" + property);\n wrap5.error = error;\n return wrap5;\n }\n var Interface = (\n /** @class */\n function() {\n function Interface2(fragments) {\n var _newTarget = this.constructor;\n var _this = this;\n var abi2 = [];\n if (typeof fragments === \"string\") {\n abi2 = JSON.parse(fragments);\n } else {\n abi2 = fragments;\n }\n (0, properties_1.defineReadOnly)(this, \"fragments\", abi2.map(function(fragment) {\n return fragments_1.Fragment.from(fragment);\n }).filter(function(fragment) {\n return fragment != null;\n }));\n (0, properties_1.defineReadOnly)(this, \"_abiCoder\", (0, properties_1.getStatic)(_newTarget, \"getAbiCoder\")());\n (0, properties_1.defineReadOnly)(this, \"functions\", {});\n (0, properties_1.defineReadOnly)(this, \"errors\", {});\n (0, properties_1.defineReadOnly)(this, \"events\", {});\n (0, properties_1.defineReadOnly)(this, \"structs\", {});\n this.fragments.forEach(function(fragment) {\n var bucket = null;\n switch (fragment.type) {\n case \"constructor\":\n if (_this.deploy) {\n logger.warn(\"duplicate definition - constructor\");\n return;\n }\n (0, properties_1.defineReadOnly)(_this, \"deploy\", fragment);\n return;\n case \"function\":\n bucket = _this.functions;\n break;\n case \"event\":\n bucket = _this.events;\n break;\n case \"error\":\n bucket = _this.errors;\n break;\n default:\n return;\n }\n var signature = fragment.format();\n if (bucket[signature]) {\n logger.warn(\"duplicate definition - \" + signature);\n return;\n }\n bucket[signature] = fragment;\n });\n if (!this.deploy) {\n (0, properties_1.defineReadOnly)(this, \"deploy\", fragments_1.ConstructorFragment.from({\n payable: false,\n type: \"constructor\"\n }));\n }\n (0, properties_1.defineReadOnly)(this, \"_isInterface\", true);\n }\n Interface2.prototype.format = function(format) {\n if (!format) {\n format = fragments_1.FormatTypes.full;\n }\n if (format === fragments_1.FormatTypes.sighash) {\n logger.throwArgumentError(\"interface does not support formatting sighash\", \"format\", format);\n }\n var abi2 = this.fragments.map(function(fragment) {\n return fragment.format(format);\n });\n if (format === fragments_1.FormatTypes.json) {\n return JSON.stringify(abi2.map(function(j2) {\n return JSON.parse(j2);\n }));\n }\n return abi2;\n };\n Interface2.getAbiCoder = function() {\n return abi_coder_1.defaultAbiCoder;\n };\n Interface2.getAddress = function(address) {\n return (0, address_1.getAddress)(address);\n };\n Interface2.getSighash = function(fragment) {\n return (0, bytes_1.hexDataSlice)((0, hash_1.id)(fragment.format()), 0, 4);\n };\n Interface2.getEventTopic = function(eventFragment) {\n return (0, hash_1.id)(eventFragment.format());\n };\n Interface2.prototype.getFunction = function(nameOrSignatureOrSighash) {\n if ((0, bytes_1.isHexString)(nameOrSignatureOrSighash)) {\n for (var name_1 in this.functions) {\n if (nameOrSignatureOrSighash === this.getSighash(name_1)) {\n return this.functions[name_1];\n }\n }\n logger.throwArgumentError(\"no matching function\", \"sighash\", nameOrSignatureOrSighash);\n }\n if (nameOrSignatureOrSighash.indexOf(\"(\") === -1) {\n var name_2 = nameOrSignatureOrSighash.trim();\n var matching = Object.keys(this.functions).filter(function(f7) {\n return f7.split(\n \"(\"\n /* fix:) */\n )[0] === name_2;\n });\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching function\", \"name\", name_2);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching functions\", \"name\", name_2);\n }\n return this.functions[matching[0]];\n }\n var result = this.functions[fragments_1.FunctionFragment.fromString(nameOrSignatureOrSighash).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching function\", \"signature\", nameOrSignatureOrSighash);\n }\n return result;\n };\n Interface2.prototype.getEvent = function(nameOrSignatureOrTopic) {\n if ((0, bytes_1.isHexString)(nameOrSignatureOrTopic)) {\n var topichash = nameOrSignatureOrTopic.toLowerCase();\n for (var name_3 in this.events) {\n if (topichash === this.getEventTopic(name_3)) {\n return this.events[name_3];\n }\n }\n logger.throwArgumentError(\"no matching event\", \"topichash\", topichash);\n }\n if (nameOrSignatureOrTopic.indexOf(\"(\") === -1) {\n var name_4 = nameOrSignatureOrTopic.trim();\n var matching = Object.keys(this.events).filter(function(f7) {\n return f7.split(\n \"(\"\n /* fix:) */\n )[0] === name_4;\n });\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching event\", \"name\", name_4);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching events\", \"name\", name_4);\n }\n return this.events[matching[0]];\n }\n var result = this.events[fragments_1.EventFragment.fromString(nameOrSignatureOrTopic).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching event\", \"signature\", nameOrSignatureOrTopic);\n }\n return result;\n };\n Interface2.prototype.getError = function(nameOrSignatureOrSighash) {\n if ((0, bytes_1.isHexString)(nameOrSignatureOrSighash)) {\n var getSighash = (0, properties_1.getStatic)(this.constructor, \"getSighash\");\n for (var name_5 in this.errors) {\n var error = this.errors[name_5];\n if (nameOrSignatureOrSighash === getSighash(error)) {\n return this.errors[name_5];\n }\n }\n logger.throwArgumentError(\"no matching error\", \"sighash\", nameOrSignatureOrSighash);\n }\n if (nameOrSignatureOrSighash.indexOf(\"(\") === -1) {\n var name_6 = nameOrSignatureOrSighash.trim();\n var matching = Object.keys(this.errors).filter(function(f7) {\n return f7.split(\n \"(\"\n /* fix:) */\n )[0] === name_6;\n });\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching error\", \"name\", name_6);\n } else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching errors\", \"name\", name_6);\n }\n return this.errors[matching[0]];\n }\n var result = this.errors[fragments_1.FunctionFragment.fromString(nameOrSignatureOrSighash).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching error\", \"signature\", nameOrSignatureOrSighash);\n }\n return result;\n };\n Interface2.prototype.getSighash = function(fragment) {\n if (typeof fragment === \"string\") {\n try {\n fragment = this.getFunction(fragment);\n } catch (error) {\n try {\n fragment = this.getError(fragment);\n } catch (_2) {\n throw error;\n }\n }\n }\n return (0, properties_1.getStatic)(this.constructor, \"getSighash\")(fragment);\n };\n Interface2.prototype.getEventTopic = function(eventFragment) {\n if (typeof eventFragment === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n return (0, properties_1.getStatic)(this.constructor, \"getEventTopic\")(eventFragment);\n };\n Interface2.prototype._decodeParams = function(params, data) {\n return this._abiCoder.decode(params, data);\n };\n Interface2.prototype._encodeParams = function(params, values) {\n return this._abiCoder.encode(params, values);\n };\n Interface2.prototype.encodeDeploy = function(values) {\n return this._encodeParams(this.deploy.inputs, values || []);\n };\n Interface2.prototype.decodeErrorResult = function(fragment, data) {\n if (typeof fragment === \"string\") {\n fragment = this.getError(fragment);\n }\n var bytes = (0, bytes_1.arrayify)(data);\n if ((0, bytes_1.hexlify)(bytes.slice(0, 4)) !== this.getSighash(fragment)) {\n logger.throwArgumentError(\"data signature does not match error \" + fragment.name + \".\", \"data\", (0, bytes_1.hexlify)(bytes));\n }\n return this._decodeParams(fragment.inputs, bytes.slice(4));\n };\n Interface2.prototype.encodeErrorResult = function(fragment, values) {\n if (typeof fragment === \"string\") {\n fragment = this.getError(fragment);\n }\n return (0, bytes_1.hexlify)((0, bytes_1.concat)([\n this.getSighash(fragment),\n this._encodeParams(fragment.inputs, values || [])\n ]));\n };\n Interface2.prototype.decodeFunctionData = function(functionFragment, data) {\n if (typeof functionFragment === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n var bytes = (0, bytes_1.arrayify)(data);\n if ((0, bytes_1.hexlify)(bytes.slice(0, 4)) !== this.getSighash(functionFragment)) {\n logger.throwArgumentError(\"data signature does not match function \" + functionFragment.name + \".\", \"data\", (0, bytes_1.hexlify)(bytes));\n }\n return this._decodeParams(functionFragment.inputs, bytes.slice(4));\n };\n Interface2.prototype.encodeFunctionData = function(functionFragment, values) {\n if (typeof functionFragment === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n return (0, bytes_1.hexlify)((0, bytes_1.concat)([\n this.getSighash(functionFragment),\n this._encodeParams(functionFragment.inputs, values || [])\n ]));\n };\n Interface2.prototype.decodeFunctionResult = function(functionFragment, data) {\n if (typeof functionFragment === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n var bytes = (0, bytes_1.arrayify)(data);\n var reason = null;\n var message2 = \"\";\n var errorArgs = null;\n var errorName = null;\n var errorSignature = null;\n switch (bytes.length % this._abiCoder._getWordSize()) {\n case 0:\n try {\n return this._abiCoder.decode(functionFragment.outputs, bytes);\n } catch (error2) {\n }\n break;\n case 4: {\n var selector = (0, bytes_1.hexlify)(bytes.slice(0, 4));\n var builtin = BuiltinErrors[selector];\n if (builtin) {\n errorArgs = this._abiCoder.decode(builtin.inputs, bytes.slice(4));\n errorName = builtin.name;\n errorSignature = builtin.signature;\n if (builtin.reason) {\n reason = errorArgs[0];\n }\n if (errorName === \"Error\") {\n message2 = \"; VM Exception while processing transaction: reverted with reason string \" + JSON.stringify(errorArgs[0]);\n } else if (errorName === \"Panic\") {\n message2 = \"; VM Exception while processing transaction: reverted with panic code \" + errorArgs[0];\n }\n } else {\n try {\n var error = this.getError(selector);\n errorArgs = this._abiCoder.decode(error.inputs, bytes.slice(4));\n errorName = error.name;\n errorSignature = error.format();\n } catch (error2) {\n }\n }\n break;\n }\n }\n return logger.throwError(\"call revert exception\" + message2, logger_1.Logger.errors.CALL_EXCEPTION, {\n method: functionFragment.format(),\n data: (0, bytes_1.hexlify)(data),\n errorArgs,\n errorName,\n errorSignature,\n reason\n });\n };\n Interface2.prototype.encodeFunctionResult = function(functionFragment, values) {\n if (typeof functionFragment === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n return (0, bytes_1.hexlify)(this._abiCoder.encode(functionFragment.outputs, values || []));\n };\n Interface2.prototype.encodeFilterTopics = function(eventFragment, values) {\n var _this = this;\n if (typeof eventFragment === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n if (values.length > eventFragment.inputs.length) {\n logger.throwError(\"too many arguments for \" + eventFragment.format(), logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {\n argument: \"values\",\n value: values\n });\n }\n var topics = [];\n if (!eventFragment.anonymous) {\n topics.push(this.getEventTopic(eventFragment));\n }\n var encodeTopic = function(param, value) {\n if (param.type === \"string\") {\n return (0, hash_1.id)(value);\n } else if (param.type === \"bytes\") {\n return (0, keccak256_1.keccak256)((0, bytes_1.hexlify)(value));\n }\n if (param.type === \"bool\" && typeof value === \"boolean\") {\n value = value ? \"0x01\" : \"0x00\";\n }\n if (param.type.match(/^u?int/)) {\n value = bignumber_1.BigNumber.from(value).toHexString();\n }\n if (param.type === \"address\") {\n _this._abiCoder.encode([\"address\"], [value]);\n }\n return (0, bytes_1.hexZeroPad)((0, bytes_1.hexlify)(value), 32);\n };\n values.forEach(function(value, index2) {\n var param = eventFragment.inputs[index2];\n if (!param.indexed) {\n if (value != null) {\n logger.throwArgumentError(\"cannot filter non-indexed parameters; must be null\", \"contract.\" + param.name, value);\n }\n return;\n }\n if (value == null) {\n topics.push(null);\n } else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n logger.throwArgumentError(\"filtering with tuples or arrays not supported\", \"contract.\" + param.name, value);\n } else if (Array.isArray(value)) {\n topics.push(value.map(function(value2) {\n return encodeTopic(param, value2);\n }));\n } else {\n topics.push(encodeTopic(param, value));\n }\n });\n while (topics.length && topics[topics.length - 1] === null) {\n topics.pop();\n }\n return topics;\n };\n Interface2.prototype.encodeEventLog = function(eventFragment, values) {\n var _this = this;\n if (typeof eventFragment === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n var topics = [];\n var dataTypes = [];\n var dataValues = [];\n if (!eventFragment.anonymous) {\n topics.push(this.getEventTopic(eventFragment));\n }\n if (values.length !== eventFragment.inputs.length) {\n logger.throwArgumentError(\"event arguments/values mismatch\", \"values\", values);\n }\n eventFragment.inputs.forEach(function(param, index2) {\n var value = values[index2];\n if (param.indexed) {\n if (param.type === \"string\") {\n topics.push((0, hash_1.id)(value));\n } else if (param.type === \"bytes\") {\n topics.push((0, keccak256_1.keccak256)(value));\n } else if (param.baseType === \"tuple\" || param.baseType === \"array\") {\n throw new Error(\"not implemented\");\n } else {\n topics.push(_this._abiCoder.encode([param.type], [value]));\n }\n } else {\n dataTypes.push(param);\n dataValues.push(value);\n }\n });\n return {\n data: this._abiCoder.encode(dataTypes, dataValues),\n topics\n };\n };\n Interface2.prototype.decodeEventLog = function(eventFragment, data, topics) {\n if (typeof eventFragment === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n if (topics != null && !eventFragment.anonymous) {\n var topicHash = this.getEventTopic(eventFragment);\n if (!(0, bytes_1.isHexString)(topics[0], 32) || topics[0].toLowerCase() !== topicHash) {\n logger.throwError(\"fragment/topic mismatch\", logger_1.Logger.errors.INVALID_ARGUMENT, { argument: \"topics[0]\", expected: topicHash, value: topics[0] });\n }\n topics = topics.slice(1);\n }\n var indexed = [];\n var nonIndexed = [];\n var dynamic = [];\n eventFragment.inputs.forEach(function(param, index2) {\n if (param.indexed) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.baseType === \"tuple\" || param.baseType === \"array\") {\n indexed.push(fragments_1.ParamType.fromObject({ type: \"bytes32\", name: param.name }));\n dynamic.push(true);\n } else {\n indexed.push(param);\n dynamic.push(false);\n }\n } else {\n nonIndexed.push(param);\n dynamic.push(false);\n }\n });\n var resultIndexed = topics != null ? this._abiCoder.decode(indexed, (0, bytes_1.concat)(topics)) : null;\n var resultNonIndexed = this._abiCoder.decode(nonIndexed, data, true);\n var result = [];\n var nonIndexedIndex = 0, indexedIndex = 0;\n eventFragment.inputs.forEach(function(param, index2) {\n if (param.indexed) {\n if (resultIndexed == null) {\n result[index2] = new Indexed({ _isIndexed: true, hash: null });\n } else if (dynamic[index2]) {\n result[index2] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] });\n } else {\n try {\n result[index2] = resultIndexed[indexedIndex++];\n } catch (error) {\n result[index2] = error;\n }\n }\n } else {\n try {\n result[index2] = resultNonIndexed[nonIndexedIndex++];\n } catch (error) {\n result[index2] = error;\n }\n }\n if (param.name && result[param.name] == null) {\n var value_1 = result[index2];\n if (value_1 instanceof Error) {\n Object.defineProperty(result, param.name, {\n enumerable: true,\n get: function() {\n throw wrapAccessError(\"property \" + JSON.stringify(param.name), value_1);\n }\n });\n } else {\n result[param.name] = value_1;\n }\n }\n });\n var _loop_1 = function(i4) {\n var value = result[i4];\n if (value instanceof Error) {\n Object.defineProperty(result, i4, {\n enumerable: true,\n get: function() {\n throw wrapAccessError(\"index \" + i4, value);\n }\n });\n }\n };\n for (var i3 = 0; i3 < result.length; i3++) {\n _loop_1(i3);\n }\n return Object.freeze(result);\n };\n Interface2.prototype.parseTransaction = function(tx) {\n var fragment = this.getFunction(tx.data.substring(0, 10).toLowerCase());\n if (!fragment) {\n return null;\n }\n return new TransactionDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + tx.data.substring(10)),\n functionFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n sighash: this.getSighash(fragment),\n value: bignumber_1.BigNumber.from(tx.value || \"0\")\n });\n };\n Interface2.prototype.parseLog = function(log) {\n var fragment = this.getEvent(log.topics[0]);\n if (!fragment || fragment.anonymous) {\n return null;\n }\n return new LogDescription({\n eventFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n topic: this.getEventTopic(fragment),\n args: this.decodeEventLog(fragment, log.data, log.topics)\n });\n };\n Interface2.prototype.parseError = function(data) {\n var hexData = (0, bytes_1.hexlify)(data);\n var fragment = this.getError(hexData.substring(0, 10).toLowerCase());\n if (!fragment) {\n return null;\n }\n return new ErrorDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + hexData.substring(10)),\n errorFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n sighash: this.getSighash(fragment)\n });\n };\n Interface2.isInterface = function(value) {\n return !!(value && value._isInterface);\n };\n return Interface2;\n }()\n );\n exports3.Interface = Interface;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/index.js\n var require_lib13 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TransactionDescription = exports3.LogDescription = exports3.checkResultErrors = exports3.Indexed = exports3.Interface = exports3.defaultAbiCoder = exports3.AbiCoder = exports3.FormatTypes = exports3.ParamType = exports3.FunctionFragment = exports3.Fragment = exports3.EventFragment = exports3.ErrorFragment = exports3.ConstructorFragment = void 0;\n var fragments_1 = require_fragments();\n Object.defineProperty(exports3, \"ConstructorFragment\", { enumerable: true, get: function() {\n return fragments_1.ConstructorFragment;\n } });\n Object.defineProperty(exports3, \"ErrorFragment\", { enumerable: true, get: function() {\n return fragments_1.ErrorFragment;\n } });\n Object.defineProperty(exports3, \"EventFragment\", { enumerable: true, get: function() {\n return fragments_1.EventFragment;\n } });\n Object.defineProperty(exports3, \"FormatTypes\", { enumerable: true, get: function() {\n return fragments_1.FormatTypes;\n } });\n Object.defineProperty(exports3, \"Fragment\", { enumerable: true, get: function() {\n return fragments_1.Fragment;\n } });\n Object.defineProperty(exports3, \"FunctionFragment\", { enumerable: true, get: function() {\n return fragments_1.FunctionFragment;\n } });\n Object.defineProperty(exports3, \"ParamType\", { enumerable: true, get: function() {\n return fragments_1.ParamType;\n } });\n var abi_coder_1 = require_abi_coder();\n Object.defineProperty(exports3, \"AbiCoder\", { enumerable: true, get: function() {\n return abi_coder_1.AbiCoder;\n } });\n Object.defineProperty(exports3, \"defaultAbiCoder\", { enumerable: true, get: function() {\n return abi_coder_1.defaultAbiCoder;\n } });\n var interface_1 = require_interface();\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return interface_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"Indexed\", { enumerable: true, get: function() {\n return interface_1.Indexed;\n } });\n Object.defineProperty(exports3, \"Interface\", { enumerable: true, get: function() {\n return interface_1.Interface;\n } });\n Object.defineProperty(exports3, \"LogDescription\", { enumerable: true, get: function() {\n return interface_1.LogDescription;\n } });\n Object.defineProperty(exports3, \"TransactionDescription\", { enumerable: true, get: function() {\n return interface_1.TransactionDescription;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.8.0/node_modules/@ethersproject/abstract-provider/lib/_version.js\n var require_version10 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.8.0/node_modules/@ethersproject/abstract-provider/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"abstract-provider/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.8.0/node_modules/@ethersproject/abstract-provider/lib/index.js\n var require_lib14 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.8.0/node_modules/@ethersproject/abstract-provider/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Provider = exports3.TransactionOrderForkEvent = exports3.TransactionForkEvent = exports3.BlockForkEvent = exports3.ForkEvent = void 0;\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version10();\n var logger = new logger_1.Logger(_version_1.version);\n var ForkEvent = (\n /** @class */\n function(_super) {\n __extends4(ForkEvent2, _super);\n function ForkEvent2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ForkEvent2.isForkEvent = function(value) {\n return !!(value && value._isForkEvent);\n };\n return ForkEvent2;\n }(properties_1.Description)\n );\n exports3.ForkEvent = ForkEvent;\n var BlockForkEvent = (\n /** @class */\n function(_super) {\n __extends4(BlockForkEvent2, _super);\n function BlockForkEvent2(blockHash, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(blockHash, 32)) {\n logger.throwArgumentError(\"invalid blockHash\", \"blockHash\", blockHash);\n }\n _this = _super.call(this, {\n _isForkEvent: true,\n _isBlockForkEvent: true,\n expiry: expiry || 0,\n blockHash\n }) || this;\n return _this;\n }\n return BlockForkEvent2;\n }(ForkEvent)\n );\n exports3.BlockForkEvent = BlockForkEvent;\n var TransactionForkEvent = (\n /** @class */\n function(_super) {\n __extends4(TransactionForkEvent2, _super);\n function TransactionForkEvent2(hash3, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(hash3, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"hash\", hash3);\n }\n _this = _super.call(this, {\n _isForkEvent: true,\n _isTransactionForkEvent: true,\n expiry: expiry || 0,\n hash: hash3\n }) || this;\n return _this;\n }\n return TransactionForkEvent2;\n }(ForkEvent)\n );\n exports3.TransactionForkEvent = TransactionForkEvent;\n var TransactionOrderForkEvent = (\n /** @class */\n function(_super) {\n __extends4(TransactionOrderForkEvent2, _super);\n function TransactionOrderForkEvent2(beforeHash, afterHash, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(beforeHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"beforeHash\", beforeHash);\n }\n if (!(0, bytes_1.isHexString)(afterHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"afterHash\", afterHash);\n }\n _this = _super.call(this, {\n _isForkEvent: true,\n _isTransactionOrderForkEvent: true,\n expiry: expiry || 0,\n beforeHash,\n afterHash\n }) || this;\n return _this;\n }\n return TransactionOrderForkEvent2;\n }(ForkEvent)\n );\n exports3.TransactionOrderForkEvent = TransactionOrderForkEvent;\n var Provider = (\n /** @class */\n function() {\n function Provider2() {\n var _newTarget = this.constructor;\n logger.checkAbstract(_newTarget, Provider2);\n (0, properties_1.defineReadOnly)(this, \"_isProvider\", true);\n }\n Provider2.prototype.getFeeData = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var _a, block, gasPrice, lastBaseFeePerGas, maxFeePerGas, maxPriorityFeePerGas;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n return [4, (0, properties_1.resolveProperties)({\n block: this.getBlock(\"latest\"),\n gasPrice: this.getGasPrice().catch(function(error) {\n return null;\n })\n })];\n case 1:\n _a = _b.sent(), block = _a.block, gasPrice = _a.gasPrice;\n lastBaseFeePerGas = null, maxFeePerGas = null, maxPriorityFeePerGas = null;\n if (block && block.baseFeePerGas) {\n lastBaseFeePerGas = block.baseFeePerGas;\n maxPriorityFeePerGas = bignumber_1.BigNumber.from(\"1500000000\");\n maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas);\n }\n return [2, { lastBaseFeePerGas, maxFeePerGas, maxPriorityFeePerGas, gasPrice }];\n }\n });\n });\n };\n Provider2.prototype.addListener = function(eventName, listener) {\n return this.on(eventName, listener);\n };\n Provider2.prototype.removeListener = function(eventName, listener) {\n return this.off(eventName, listener);\n };\n Provider2.isProvider = function(value) {\n return !!(value && value._isProvider);\n };\n return Provider2;\n }()\n );\n exports3.Provider = Provider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abstract-signer@5.8.0/node_modules/@ethersproject/abstract-signer/lib/_version.js\n var require_version11 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abstract-signer@5.8.0/node_modules/@ethersproject/abstract-signer/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"abstract-signer/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abstract-signer@5.8.0/node_modules/@ethersproject/abstract-signer/lib/index.js\n var require_lib15 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abstract-signer@5.8.0/node_modules/@ethersproject/abstract-signer/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.VoidSigner = exports3.Signer = void 0;\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version11();\n var logger = new logger_1.Logger(_version_1.version);\n var allowedTransactionKeys = [\n \"accessList\",\n \"ccipReadEnabled\",\n \"chainId\",\n \"customData\",\n \"data\",\n \"from\",\n \"gasLimit\",\n \"gasPrice\",\n \"maxFeePerGas\",\n \"maxPriorityFeePerGas\",\n \"nonce\",\n \"to\",\n \"type\",\n \"value\"\n ];\n var forwardErrors = [\n logger_1.Logger.errors.INSUFFICIENT_FUNDS,\n logger_1.Logger.errors.NONCE_EXPIRED,\n logger_1.Logger.errors.REPLACEMENT_UNDERPRICED\n ];\n var Signer = (\n /** @class */\n function() {\n function Signer2() {\n var _newTarget = this.constructor;\n logger.checkAbstract(_newTarget, Signer2);\n (0, properties_1.defineReadOnly)(this, \"_isSigner\", true);\n }\n Signer2.prototype.getBalance = function(blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getBalance\");\n return [4, this.provider.getBalance(this.getAddress(), blockTag)];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.getTransactionCount = function(blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getTransactionCount\");\n return [4, this.provider.getTransactionCount(this.getAddress(), blockTag)];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.estimateGas = function(transaction) {\n return __awaiter4(this, void 0, void 0, function() {\n var tx;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"estimateGas\");\n return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))];\n case 1:\n tx = _a.sent();\n return [4, this.provider.estimateGas(tx)];\n case 2:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.call = function(transaction, blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var tx;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"call\");\n return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))];\n case 1:\n tx = _a.sent();\n return [4, this.provider.call(tx, blockTag)];\n case 2:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.sendTransaction = function(transaction) {\n return __awaiter4(this, void 0, void 0, function() {\n var tx, signedTx;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"sendTransaction\");\n return [4, this.populateTransaction(transaction)];\n case 1:\n tx = _a.sent();\n return [4, this.signTransaction(tx)];\n case 2:\n signedTx = _a.sent();\n return [4, this.provider.sendTransaction(signedTx)];\n case 3:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.getChainId = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var network;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getChainId\");\n return [4, this.provider.getNetwork()];\n case 1:\n network = _a.sent();\n return [2, network.chainId];\n }\n });\n });\n };\n Signer2.prototype.getGasPrice = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getGasPrice\");\n return [4, this.provider.getGasPrice()];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.getFeeData = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"getFeeData\");\n return [4, this.provider.getFeeData()];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.resolveName = function(name) {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n this._checkProvider(\"resolveName\");\n return [4, this.provider.resolveName(name)];\n case 1:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype.checkTransaction = function(transaction) {\n for (var key in transaction) {\n if (allowedTransactionKeys.indexOf(key) === -1) {\n logger.throwArgumentError(\"invalid transaction key: \" + key, \"transaction\", transaction);\n }\n }\n var tx = (0, properties_1.shallowCopy)(transaction);\n if (tx.from == null) {\n tx.from = this.getAddress();\n } else {\n tx.from = Promise.all([\n Promise.resolve(tx.from),\n this.getAddress()\n ]).then(function(result) {\n if (result[0].toLowerCase() !== result[1].toLowerCase()) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n return result[0];\n });\n }\n return tx;\n };\n Signer2.prototype.populateTransaction = function(transaction) {\n return __awaiter4(this, void 0, void 0, function() {\n var tx, hasEip1559, feeData, gasPrice;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, (0, properties_1.resolveProperties)(this.checkTransaction(transaction))];\n case 1:\n tx = _a.sent();\n if (tx.to != null) {\n tx.to = Promise.resolve(tx.to).then(function(to) {\n return __awaiter4(_this, void 0, void 0, function() {\n var address;\n return __generator4(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (to == null) {\n return [2, null];\n }\n return [4, this.resolveName(to)];\n case 1:\n address = _a2.sent();\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return [2, address];\n }\n });\n });\n });\n tx.to.catch(function(error) {\n });\n }\n hasEip1559 = tx.maxFeePerGas != null || tx.maxPriorityFeePerGas != null;\n if (tx.gasPrice != null && (tx.type === 2 || hasEip1559)) {\n logger.throwArgumentError(\"eip-1559 transaction do not support gasPrice\", \"transaction\", transaction);\n } else if ((tx.type === 0 || tx.type === 1) && hasEip1559) {\n logger.throwArgumentError(\"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas\", \"transaction\", transaction);\n }\n if (!((tx.type === 2 || tx.type == null) && (tx.maxFeePerGas != null && tx.maxPriorityFeePerGas != null)))\n return [3, 2];\n tx.type = 2;\n return [3, 5];\n case 2:\n if (!(tx.type === 0 || tx.type === 1))\n return [3, 3];\n if (tx.gasPrice == null) {\n tx.gasPrice = this.getGasPrice();\n }\n return [3, 5];\n case 3:\n return [4, this.getFeeData()];\n case 4:\n feeData = _a.sent();\n if (tx.type == null) {\n if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) {\n tx.type = 2;\n if (tx.gasPrice != null) {\n gasPrice = tx.gasPrice;\n delete tx.gasPrice;\n tx.maxFeePerGas = gasPrice;\n tx.maxPriorityFeePerGas = gasPrice;\n } else {\n if (tx.maxFeePerGas == null) {\n tx.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (tx.maxPriorityFeePerGas == null) {\n tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n } else if (feeData.gasPrice != null) {\n if (hasEip1559) {\n logger.throwError(\"network does not support EIP-1559\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"populateTransaction\"\n });\n }\n if (tx.gasPrice == null) {\n tx.gasPrice = feeData.gasPrice;\n }\n tx.type = 0;\n } else {\n logger.throwError(\"failed to get consistent fee data\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signer.getFeeData\"\n });\n }\n } else if (tx.type === 2) {\n if (tx.maxFeePerGas == null) {\n tx.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (tx.maxPriorityFeePerGas == null) {\n tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n _a.label = 5;\n case 5:\n if (tx.nonce == null) {\n tx.nonce = this.getTransactionCount(\"pending\");\n }\n if (tx.gasLimit == null) {\n tx.gasLimit = this.estimateGas(tx).catch(function(error) {\n if (forwardErrors.indexOf(error.code) >= 0) {\n throw error;\n }\n return logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error,\n tx\n });\n });\n }\n if (tx.chainId == null) {\n tx.chainId = this.getChainId();\n } else {\n tx.chainId = Promise.all([\n Promise.resolve(tx.chainId),\n this.getChainId()\n ]).then(function(results) {\n if (results[1] !== 0 && results[0] !== results[1]) {\n logger.throwArgumentError(\"chainId address mismatch\", \"transaction\", transaction);\n }\n return results[0];\n });\n }\n return [4, (0, properties_1.resolveProperties)(tx)];\n case 6:\n return [2, _a.sent()];\n }\n });\n });\n };\n Signer2.prototype._checkProvider = function(operation) {\n if (!this.provider) {\n logger.throwError(\"missing provider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: operation || \"_checkProvider\"\n });\n }\n };\n Signer2.isSigner = function(value) {\n return !!(value && value._isSigner);\n };\n return Signer2;\n }()\n );\n exports3.Signer = Signer;\n var VoidSigner = (\n /** @class */\n function(_super) {\n __extends4(VoidSigner2, _super);\n function VoidSigner2(address, provider) {\n var _this = _super.call(this) || this;\n (0, properties_1.defineReadOnly)(_this, \"address\", address);\n (0, properties_1.defineReadOnly)(_this, \"provider\", provider || null);\n return _this;\n }\n VoidSigner2.prototype.getAddress = function() {\n return Promise.resolve(this.address);\n };\n VoidSigner2.prototype._fail = function(message2, operation) {\n return Promise.resolve().then(function() {\n logger.throwError(message2, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation });\n });\n };\n VoidSigner2.prototype.signMessage = function(message2) {\n return this._fail(\"VoidSigner cannot sign messages\", \"signMessage\");\n };\n VoidSigner2.prototype.signTransaction = function(transaction) {\n return this._fail(\"VoidSigner cannot sign transactions\", \"signTransaction\");\n };\n VoidSigner2.prototype._signTypedData = function(domain2, types2, value) {\n return this._fail(\"VoidSigner cannot sign typed data\", \"signTypedData\");\n };\n VoidSigner2.prototype.connect = function(provider) {\n return new VoidSigner2(this.address, provider);\n };\n return VoidSigner2;\n }(Signer)\n );\n exports3.VoidSigner = VoidSigner;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/package.json\n var require_package = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/package.json\"(exports3, module) {\n module.exports = {\n name: \"elliptic\",\n version: \"6.6.1\",\n description: \"EC cryptography\",\n main: \"lib/elliptic.js\",\n files: [\n \"lib\"\n ],\n scripts: {\n lint: \"eslint lib test\",\n \"lint:fix\": \"npm run lint -- --fix\",\n unit: \"istanbul test _mocha --reporter=spec test/index.js\",\n test: \"npm run lint && npm run unit\",\n version: \"grunt dist && git add dist/\"\n },\n repository: {\n type: \"git\",\n url: \"git@github.com:indutny/elliptic\"\n },\n keywords: [\n \"EC\",\n \"Elliptic\",\n \"curve\",\n \"Cryptography\"\n ],\n author: \"Fedor Indutny \",\n license: \"MIT\",\n bugs: {\n url: \"https://github.com/indutny/elliptic/issues\"\n },\n homepage: \"https://github.com/indutny/elliptic\",\n devDependencies: {\n brfs: \"^2.0.2\",\n coveralls: \"^3.1.0\",\n eslint: \"^7.6.0\",\n grunt: \"^1.2.1\",\n \"grunt-browserify\": \"^5.3.0\",\n \"grunt-cli\": \"^1.3.2\",\n \"grunt-contrib-connect\": \"^3.0.0\",\n \"grunt-contrib-copy\": \"^1.0.0\",\n \"grunt-contrib-uglify\": \"^5.0.0\",\n \"grunt-mocha-istanbul\": \"^5.0.2\",\n \"grunt-saucelabs\": \"^9.0.1\",\n istanbul: \"^0.4.5\",\n mocha: \"^8.0.1\"\n },\n dependencies: {\n \"bn.js\": \"^4.11.9\",\n brorand: \"^1.1.0\",\n \"hash.js\": \"^1.0.0\",\n \"hmac-drbg\": \"^1.0.1\",\n inherits: \"^2.0.4\",\n \"minimalistic-assert\": \"^1.0.1\",\n \"minimalistic-crypto-utils\": \"^1.0.1\"\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/bn.js@4.12.2/node_modules/bn.js/lib/bn.js\n var require_bn2 = __commonJS({\n \"../../../node_modules/.pnpm/bn.js@4.12.2/node_modules/bn.js/lib/bn.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(module2, exports4) {\n \"use strict\";\n function assert9(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {\n };\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n function BN(number, base4, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n this.negative = 0;\n this.words = null;\n this.length = 0;\n this.red = null;\n if (number !== null) {\n if (base4 === \"le\" || base4 === \"be\") {\n endian = base4;\n base4 = 10;\n }\n this._init(number || 0, base4 || 10, endian || \"be\");\n }\n }\n if (typeof module2 === \"object\") {\n module2.exports = BN;\n } else {\n exports4.BN = BN;\n }\n BN.BN = BN;\n BN.wordSize = 26;\n var Buffer3;\n try {\n if (typeof window !== \"undefined\" && typeof window.Buffer !== \"undefined\") {\n Buffer3 = window.Buffer;\n } else {\n Buffer3 = (init_buffer(), __toCommonJS(buffer_exports)).Buffer;\n }\n } catch (e2) {\n }\n BN.isBN = function isBN(num2) {\n if (num2 instanceof BN) {\n return true;\n }\n return num2 !== null && typeof num2 === \"object\" && num2.constructor.wordSize === BN.wordSize && Array.isArray(num2.words);\n };\n BN.max = function max(left, right) {\n if (left.cmp(right) > 0)\n return left;\n return right;\n };\n BN.min = function min(left, right) {\n if (left.cmp(right) < 0)\n return left;\n return right;\n };\n BN.prototype._init = function init(number, base4, endian) {\n if (typeof number === \"number\") {\n return this._initNumber(number, base4, endian);\n }\n if (typeof number === \"object\") {\n return this._initArray(number, base4, endian);\n }\n if (base4 === \"hex\") {\n base4 = 16;\n }\n assert9(base4 === (base4 | 0) && base4 >= 2 && base4 <= 36);\n number = number.toString().replace(/\\s+/g, \"\");\n var start = 0;\n if (number[0] === \"-\") {\n start++;\n this.negative = 1;\n }\n if (start < number.length) {\n if (base4 === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base4, start);\n if (endian === \"le\") {\n this._initArray(this.toArray(), base4, endian);\n }\n }\n }\n };\n BN.prototype._initNumber = function _initNumber(number, base4, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 67108864) {\n this.words = [number & 67108863];\n this.length = 1;\n } else if (number < 4503599627370496) {\n this.words = [\n number & 67108863,\n number / 67108864 & 67108863\n ];\n this.length = 2;\n } else {\n assert9(number < 9007199254740992);\n this.words = [\n number & 67108863,\n number / 67108864 & 67108863,\n 1\n ];\n this.length = 3;\n }\n if (endian !== \"le\")\n return;\n this._initArray(this.toArray(), base4, endian);\n };\n BN.prototype._initArray = function _initArray(number, base4, endian) {\n assert9(typeof number.length === \"number\");\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = 0;\n }\n var j2, w3;\n var off2 = 0;\n if (endian === \"be\") {\n for (i3 = number.length - 1, j2 = 0; i3 >= 0; i3 -= 3) {\n w3 = number[i3] | number[i3 - 1] << 8 | number[i3 - 2] << 16;\n this.words[j2] |= w3 << off2 & 67108863;\n this.words[j2 + 1] = w3 >>> 26 - off2 & 67108863;\n off2 += 24;\n if (off2 >= 26) {\n off2 -= 26;\n j2++;\n }\n }\n } else if (endian === \"le\") {\n for (i3 = 0, j2 = 0; i3 < number.length; i3 += 3) {\n w3 = number[i3] | number[i3 + 1] << 8 | number[i3 + 2] << 16;\n this.words[j2] |= w3 << off2 & 67108863;\n this.words[j2 + 1] = w3 >>> 26 - off2 & 67108863;\n off2 += 24;\n if (off2 >= 26) {\n off2 -= 26;\n j2++;\n }\n }\n }\n return this.strip();\n };\n function parseHex4Bits(string, index2) {\n var c4 = string.charCodeAt(index2);\n if (c4 >= 65 && c4 <= 70) {\n return c4 - 55;\n } else if (c4 >= 97 && c4 <= 102) {\n return c4 - 87;\n } else {\n return c4 - 48 & 15;\n }\n }\n function parseHexByte(string, lowerBound, index2) {\n var r2 = parseHex4Bits(string, index2);\n if (index2 - 1 >= lowerBound) {\n r2 |= parseHex4Bits(string, index2 - 1) << 4;\n }\n return r2;\n }\n BN.prototype._parseHex = function _parseHex(number, start, endian) {\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = 0;\n }\n var off2 = 0;\n var j2 = 0;\n var w3;\n if (endian === \"be\") {\n for (i3 = number.length - 1; i3 >= start; i3 -= 2) {\n w3 = parseHexByte(number, start, i3) << off2;\n this.words[j2] |= w3 & 67108863;\n if (off2 >= 18) {\n off2 -= 18;\n j2 += 1;\n this.words[j2] |= w3 >>> 26;\n } else {\n off2 += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i3 = parseLength % 2 === 0 ? start + 1 : start; i3 < number.length; i3 += 2) {\n w3 = parseHexByte(number, start, i3) << off2;\n this.words[j2] |= w3 & 67108863;\n if (off2 >= 18) {\n off2 -= 18;\n j2 += 1;\n this.words[j2] |= w3 >>> 26;\n } else {\n off2 += 8;\n }\n }\n }\n this.strip();\n };\n function parseBase(str, start, end, mul) {\n var r2 = 0;\n var len = Math.min(str.length, end);\n for (var i3 = start; i3 < len; i3++) {\n var c4 = str.charCodeAt(i3) - 48;\n r2 *= mul;\n if (c4 >= 49) {\n r2 += c4 - 49 + 10;\n } else if (c4 >= 17) {\n r2 += c4 - 17 + 10;\n } else {\n r2 += c4;\n }\n }\n return r2;\n }\n BN.prototype._parseBase = function _parseBase(number, base4, start) {\n this.words = [0];\n this.length = 1;\n for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base4) {\n limbLen++;\n }\n limbLen--;\n limbPow = limbPow / base4 | 0;\n var total = number.length - start;\n var mod3 = total % limbLen;\n var end = Math.min(total, total - mod3) + start;\n var word = 0;\n for (var i3 = start; i3 < end; i3 += limbLen) {\n word = parseBase(number, i3, i3 + limbLen, base4);\n this.imuln(limbPow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n if (mod3 !== 0) {\n var pow = 1;\n word = parseBase(number, i3, number.length, base4);\n for (i3 = 0; i3 < mod3; i3++) {\n pow *= base4;\n }\n this.imuln(pow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n this.strip();\n };\n BN.prototype.copy = function copy(dest) {\n dest.words = new Array(this.length);\n for (var i3 = 0; i3 < this.length; i3++) {\n dest.words[i3] = this.words[i3];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n BN.prototype.clone = function clone2() {\n var r2 = new BN(null);\n this.copy(r2);\n return r2;\n };\n BN.prototype._expand = function _expand(size6) {\n while (this.length < size6) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n BN.prototype.strip = function strip() {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n BN.prototype._normSign = function _normSign() {\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n BN.prototype.inspect = function inspect() {\n return (this.red ? \"\";\n };\n var zeros = [\n \"\",\n \"0\",\n \"00\",\n \"000\",\n \"0000\",\n \"00000\",\n \"000000\",\n \"0000000\",\n \"00000000\",\n \"000000000\",\n \"0000000000\",\n \"00000000000\",\n \"000000000000\",\n \"0000000000000\",\n \"00000000000000\",\n \"000000000000000\",\n \"0000000000000000\",\n \"00000000000000000\",\n \"000000000000000000\",\n \"0000000000000000000\",\n \"00000000000000000000\",\n \"000000000000000000000\",\n \"0000000000000000000000\",\n \"00000000000000000000000\",\n \"000000000000000000000000\",\n \"0000000000000000000000000\"\n ];\n var groupSizes = [\n 0,\n 0,\n 25,\n 16,\n 12,\n 11,\n 10,\n 9,\n 8,\n 8,\n 7,\n 7,\n 7,\n 7,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5\n ];\n var groupBases = [\n 0,\n 0,\n 33554432,\n 43046721,\n 16777216,\n 48828125,\n 60466176,\n 40353607,\n 16777216,\n 43046721,\n 1e7,\n 19487171,\n 35831808,\n 62748517,\n 7529536,\n 11390625,\n 16777216,\n 24137569,\n 34012224,\n 47045881,\n 64e6,\n 4084101,\n 5153632,\n 6436343,\n 7962624,\n 9765625,\n 11881376,\n 14348907,\n 17210368,\n 20511149,\n 243e5,\n 28629151,\n 33554432,\n 39135393,\n 45435424,\n 52521875,\n 60466176\n ];\n BN.prototype.toString = function toString2(base4, padding) {\n base4 = base4 || 10;\n padding = padding | 0 || 1;\n var out;\n if (base4 === 16 || base4 === \"hex\") {\n out = \"\";\n var off2 = 0;\n var carry = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var w3 = this.words[i3];\n var word = ((w3 << off2 | carry) & 16777215).toString(16);\n carry = w3 >>> 24 - off2 & 16777215;\n off2 += 2;\n if (off2 >= 26) {\n off2 -= 26;\n i3--;\n }\n if (carry !== 0 || i3 !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n if (base4 === (base4 | 0) && base4 >= 2 && base4 <= 36) {\n var groupSize = groupSizes[base4];\n var groupBase = groupBases[base4];\n out = \"\";\n var c4 = this.clone();\n c4.negative = 0;\n while (!c4.isZero()) {\n var r2 = c4.modn(groupBase).toString(base4);\n c4 = c4.idivn(groupBase);\n if (!c4.isZero()) {\n out = zeros[groupSize - r2.length] + r2 + out;\n } else {\n out = r2 + out;\n }\n }\n if (this.isZero()) {\n out = \"0\" + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n assert9(false, \"Base should be between 2 and 36\");\n };\n BN.prototype.toNumber = function toNumber4() {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 67108864;\n } else if (this.length === 3 && this.words[2] === 1) {\n ret += 4503599627370496 + this.words[1] * 67108864;\n } else if (this.length > 2) {\n assert9(false, \"Number can only safely store up to 53 bits\");\n }\n return this.negative !== 0 ? -ret : ret;\n };\n BN.prototype.toJSON = function toJSON() {\n return this.toString(16);\n };\n BN.prototype.toBuffer = function toBuffer(endian, length) {\n assert9(typeof Buffer3 !== \"undefined\");\n return this.toArrayLike(Buffer3, endian, length);\n };\n BN.prototype.toArray = function toArray(endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n BN.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert9(byteLength <= reqLength, \"byte array longer than desired length\");\n assert9(reqLength > 0, \"Requested array length <= 0\");\n this.strip();\n var littleEndian = endian === \"le\";\n var res = new ArrayType(reqLength);\n var b4, i3;\n var q3 = this.clone();\n if (!littleEndian) {\n for (i3 = 0; i3 < reqLength - byteLength; i3++) {\n res[i3] = 0;\n }\n for (i3 = 0; !q3.isZero(); i3++) {\n b4 = q3.andln(255);\n q3.iushrn(8);\n res[reqLength - i3 - 1] = b4;\n }\n } else {\n for (i3 = 0; !q3.isZero(); i3++) {\n b4 = q3.andln(255);\n q3.iushrn(8);\n res[i3] = b4;\n }\n for (; i3 < reqLength; i3++) {\n res[i3] = 0;\n }\n }\n return res;\n };\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits(w3) {\n return 32 - Math.clz32(w3);\n };\n } else {\n BN.prototype._countBits = function _countBits(w3) {\n var t3 = w3;\n var r2 = 0;\n if (t3 >= 4096) {\n r2 += 13;\n t3 >>>= 13;\n }\n if (t3 >= 64) {\n r2 += 7;\n t3 >>>= 7;\n }\n if (t3 >= 8) {\n r2 += 4;\n t3 >>>= 4;\n }\n if (t3 >= 2) {\n r2 += 2;\n t3 >>>= 2;\n }\n return r2 + t3;\n };\n }\n BN.prototype._zeroBits = function _zeroBits(w3) {\n if (w3 === 0)\n return 26;\n var t3 = w3;\n var r2 = 0;\n if ((t3 & 8191) === 0) {\n r2 += 13;\n t3 >>>= 13;\n }\n if ((t3 & 127) === 0) {\n r2 += 7;\n t3 >>>= 7;\n }\n if ((t3 & 15) === 0) {\n r2 += 4;\n t3 >>>= 4;\n }\n if ((t3 & 3) === 0) {\n r2 += 2;\n t3 >>>= 2;\n }\n if ((t3 & 1) === 0) {\n r2++;\n }\n return r2;\n };\n BN.prototype.bitLength = function bitLength3() {\n var w3 = this.words[this.length - 1];\n var hi = this._countBits(w3);\n return (this.length - 1) * 26 + hi;\n };\n function toBitArray(num2) {\n var w3 = new Array(num2.bitLength());\n for (var bit = 0; bit < w3.length; bit++) {\n var off2 = bit / 26 | 0;\n var wbit = bit % 26;\n w3[bit] = (num2.words[off2] & 1 << wbit) >>> wbit;\n }\n return w3;\n }\n BN.prototype.zeroBits = function zeroBits() {\n if (this.isZero())\n return 0;\n var r2 = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var b4 = this._zeroBits(this.words[i3]);\n r2 += b4;\n if (b4 !== 26)\n break;\n }\n return r2;\n };\n BN.prototype.byteLength = function byteLength() {\n return Math.ceil(this.bitLength() / 8);\n };\n BN.prototype.toTwos = function toTwos(width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n BN.prototype.fromTwos = function fromTwos(width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n BN.prototype.isNeg = function isNeg() {\n return this.negative !== 0;\n };\n BN.prototype.neg = function neg() {\n return this.clone().ineg();\n };\n BN.prototype.ineg = function ineg() {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n return this;\n };\n BN.prototype.iuor = function iuor(num2) {\n while (this.length < num2.length) {\n this.words[this.length++] = 0;\n }\n for (var i3 = 0; i3 < num2.length; i3++) {\n this.words[i3] = this.words[i3] | num2.words[i3];\n }\n return this.strip();\n };\n BN.prototype.ior = function ior(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuor(num2);\n };\n BN.prototype.or = function or(num2) {\n if (this.length > num2.length)\n return this.clone().ior(num2);\n return num2.clone().ior(this);\n };\n BN.prototype.uor = function uor(num2) {\n if (this.length > num2.length)\n return this.clone().iuor(num2);\n return num2.clone().iuor(this);\n };\n BN.prototype.iuand = function iuand(num2) {\n var b4;\n if (this.length > num2.length) {\n b4 = num2;\n } else {\n b4 = this;\n }\n for (var i3 = 0; i3 < b4.length; i3++) {\n this.words[i3] = this.words[i3] & num2.words[i3];\n }\n this.length = b4.length;\n return this.strip();\n };\n BN.prototype.iand = function iand(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuand(num2);\n };\n BN.prototype.and = function and(num2) {\n if (this.length > num2.length)\n return this.clone().iand(num2);\n return num2.clone().iand(this);\n };\n BN.prototype.uand = function uand(num2) {\n if (this.length > num2.length)\n return this.clone().iuand(num2);\n return num2.clone().iuand(this);\n };\n BN.prototype.iuxor = function iuxor(num2) {\n var a3;\n var b4;\n if (this.length > num2.length) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n for (var i3 = 0; i3 < b4.length; i3++) {\n this.words[i3] = a3.words[i3] ^ b4.words[i3];\n }\n if (this !== a3) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n this.length = a3.length;\n return this.strip();\n };\n BN.prototype.ixor = function ixor(num2) {\n assert9((this.negative | num2.negative) === 0);\n return this.iuxor(num2);\n };\n BN.prototype.xor = function xor(num2) {\n if (this.length > num2.length)\n return this.clone().ixor(num2);\n return num2.clone().ixor(this);\n };\n BN.prototype.uxor = function uxor(num2) {\n if (this.length > num2.length)\n return this.clone().iuxor(num2);\n return num2.clone().iuxor(this);\n };\n BN.prototype.inotn = function inotn(width) {\n assert9(typeof width === \"number\" && width >= 0);\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n this._expand(bytesNeeded);\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n for (var i3 = 0; i3 < bytesNeeded; i3++) {\n this.words[i3] = ~this.words[i3] & 67108863;\n }\n if (bitsLeft > 0) {\n this.words[i3] = ~this.words[i3] & 67108863 >> 26 - bitsLeft;\n }\n return this.strip();\n };\n BN.prototype.notn = function notn(width) {\n return this.clone().inotn(width);\n };\n BN.prototype.setn = function setn(bit, val) {\n assert9(typeof bit === \"number\" && bit >= 0);\n var off2 = bit / 26 | 0;\n var wbit = bit % 26;\n this._expand(off2 + 1);\n if (val) {\n this.words[off2] = this.words[off2] | 1 << wbit;\n } else {\n this.words[off2] = this.words[off2] & ~(1 << wbit);\n }\n return this.strip();\n };\n BN.prototype.iadd = function iadd(num2) {\n var r2;\n if (this.negative !== 0 && num2.negative === 0) {\n this.negative = 0;\n r2 = this.isub(num2);\n this.negative ^= 1;\n return this._normSign();\n } else if (this.negative === 0 && num2.negative !== 0) {\n num2.negative = 0;\n r2 = this.isub(num2);\n num2.negative = 1;\n return r2._normSign();\n }\n var a3, b4;\n if (this.length > num2.length) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n var carry = 0;\n for (var i3 = 0; i3 < b4.length; i3++) {\n r2 = (a3.words[i3] | 0) + (b4.words[i3] | 0) + carry;\n this.words[i3] = r2 & 67108863;\n carry = r2 >>> 26;\n }\n for (; carry !== 0 && i3 < a3.length; i3++) {\n r2 = (a3.words[i3] | 0) + carry;\n this.words[i3] = r2 & 67108863;\n carry = r2 >>> 26;\n }\n this.length = a3.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n } else if (a3 !== this) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n return this;\n };\n BN.prototype.add = function add2(num2) {\n var res;\n if (num2.negative !== 0 && this.negative === 0) {\n num2.negative = 0;\n res = this.sub(num2);\n num2.negative ^= 1;\n return res;\n } else if (num2.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num2.sub(this);\n this.negative = 1;\n return res;\n }\n if (this.length > num2.length)\n return this.clone().iadd(num2);\n return num2.clone().iadd(this);\n };\n BN.prototype.isub = function isub(num2) {\n if (num2.negative !== 0) {\n num2.negative = 0;\n var r2 = this.iadd(num2);\n num2.negative = 1;\n return r2._normSign();\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num2);\n this.negative = 1;\n return this._normSign();\n }\n var cmp = this.cmp(num2);\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n var a3, b4;\n if (cmp > 0) {\n a3 = this;\n b4 = num2;\n } else {\n a3 = num2;\n b4 = this;\n }\n var carry = 0;\n for (var i3 = 0; i3 < b4.length; i3++) {\n r2 = (a3.words[i3] | 0) - (b4.words[i3] | 0) + carry;\n carry = r2 >> 26;\n this.words[i3] = r2 & 67108863;\n }\n for (; carry !== 0 && i3 < a3.length; i3++) {\n r2 = (a3.words[i3] | 0) + carry;\n carry = r2 >> 26;\n this.words[i3] = r2 & 67108863;\n }\n if (carry === 0 && i3 < a3.length && a3 !== this) {\n for (; i3 < a3.length; i3++) {\n this.words[i3] = a3.words[i3];\n }\n }\n this.length = Math.max(this.length, i3);\n if (a3 !== this) {\n this.negative = 1;\n }\n return this.strip();\n };\n BN.prototype.sub = function sub(num2) {\n return this.clone().isub(num2);\n };\n function smallMulTo(self2, num2, out) {\n out.negative = num2.negative ^ self2.negative;\n var len = self2.length + num2.length | 0;\n out.length = len;\n len = len - 1 | 0;\n var a3 = self2.words[0] | 0;\n var b4 = num2.words[0] | 0;\n var r2 = a3 * b4;\n var lo = r2 & 67108863;\n var carry = r2 / 67108864 | 0;\n out.words[0] = lo;\n for (var k4 = 1; k4 < len; k4++) {\n var ncarry = carry >>> 26;\n var rword = carry & 67108863;\n var maxJ = Math.min(k4, num2.length - 1);\n for (var j2 = Math.max(0, k4 - self2.length + 1); j2 <= maxJ; j2++) {\n var i3 = k4 - j2 | 0;\n a3 = self2.words[i3] | 0;\n b4 = num2.words[j2] | 0;\n r2 = a3 * b4 + rword;\n ncarry += r2 / 67108864 | 0;\n rword = r2 & 67108863;\n }\n out.words[k4] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k4] = carry | 0;\n } else {\n out.length--;\n }\n return out.strip();\n }\n var comb10MulTo = function comb10MulTo2(self2, num2, out) {\n var a3 = self2.words;\n var b4 = num2.words;\n var o5 = out.words;\n var c4 = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a3[0] | 0;\n var al0 = a0 & 8191;\n var ah0 = a0 >>> 13;\n var a1 = a3[1] | 0;\n var al1 = a1 & 8191;\n var ah1 = a1 >>> 13;\n var a22 = a3[2] | 0;\n var al2 = a22 & 8191;\n var ah2 = a22 >>> 13;\n var a32 = a3[3] | 0;\n var al3 = a32 & 8191;\n var ah3 = a32 >>> 13;\n var a4 = a3[4] | 0;\n var al4 = a4 & 8191;\n var ah4 = a4 >>> 13;\n var a5 = a3[5] | 0;\n var al5 = a5 & 8191;\n var ah5 = a5 >>> 13;\n var a6 = a3[6] | 0;\n var al6 = a6 & 8191;\n var ah6 = a6 >>> 13;\n var a7 = a3[7] | 0;\n var al7 = a7 & 8191;\n var ah7 = a7 >>> 13;\n var a8 = a3[8] | 0;\n var al8 = a8 & 8191;\n var ah8 = a8 >>> 13;\n var a9 = a3[9] | 0;\n var al9 = a9 & 8191;\n var ah9 = a9 >>> 13;\n var b0 = b4[0] | 0;\n var bl0 = b0 & 8191;\n var bh0 = b0 >>> 13;\n var b1 = b4[1] | 0;\n var bl1 = b1 & 8191;\n var bh1 = b1 >>> 13;\n var b22 = b4[2] | 0;\n var bl2 = b22 & 8191;\n var bh2 = b22 >>> 13;\n var b32 = b4[3] | 0;\n var bl3 = b32 & 8191;\n var bh3 = b32 >>> 13;\n var b42 = b4[4] | 0;\n var bl4 = b42 & 8191;\n var bh4 = b42 >>> 13;\n var b5 = b4[5] | 0;\n var bl5 = b5 & 8191;\n var bh5 = b5 >>> 13;\n var b6 = b4[6] | 0;\n var bl6 = b6 & 8191;\n var bh6 = b6 >>> 13;\n var b7 = b4[7] | 0;\n var bl7 = b7 & 8191;\n var bh7 = b7 >>> 13;\n var b8 = b4[8] | 0;\n var bl8 = b8 & 8191;\n var bh8 = b8 >>> 13;\n var b9 = b4[9] | 0;\n var bl9 = b9 & 8191;\n var bh9 = b9 >>> 13;\n out.negative = self2.negative ^ num2.negative;\n out.length = 19;\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = mid + Math.imul(ah0, bl0) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w0 >>> 26) | 0;\n w0 &= 67108863;\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = mid + Math.imul(ah1, bl0) | 0;\n hi = Math.imul(ah1, bh0);\n lo = lo + Math.imul(al0, bl1) | 0;\n mid = mid + Math.imul(al0, bh1) | 0;\n mid = mid + Math.imul(ah0, bl1) | 0;\n hi = hi + Math.imul(ah0, bh1) | 0;\n var w1 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w1 >>> 26) | 0;\n w1 &= 67108863;\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = mid + Math.imul(ah2, bl0) | 0;\n hi = Math.imul(ah2, bh0);\n lo = lo + Math.imul(al1, bl1) | 0;\n mid = mid + Math.imul(al1, bh1) | 0;\n mid = mid + Math.imul(ah1, bl1) | 0;\n hi = hi + Math.imul(ah1, bh1) | 0;\n lo = lo + Math.imul(al0, bl2) | 0;\n mid = mid + Math.imul(al0, bh2) | 0;\n mid = mid + Math.imul(ah0, bl2) | 0;\n hi = hi + Math.imul(ah0, bh2) | 0;\n var w22 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w22 >>> 26) | 0;\n w22 &= 67108863;\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = mid + Math.imul(ah3, bl0) | 0;\n hi = Math.imul(ah3, bh0);\n lo = lo + Math.imul(al2, bl1) | 0;\n mid = mid + Math.imul(al2, bh1) | 0;\n mid = mid + Math.imul(ah2, bl1) | 0;\n hi = hi + Math.imul(ah2, bh1) | 0;\n lo = lo + Math.imul(al1, bl2) | 0;\n mid = mid + Math.imul(al1, bh2) | 0;\n mid = mid + Math.imul(ah1, bl2) | 0;\n hi = hi + Math.imul(ah1, bh2) | 0;\n lo = lo + Math.imul(al0, bl3) | 0;\n mid = mid + Math.imul(al0, bh3) | 0;\n mid = mid + Math.imul(ah0, bl3) | 0;\n hi = hi + Math.imul(ah0, bh3) | 0;\n var w3 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w3 >>> 26) | 0;\n w3 &= 67108863;\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = mid + Math.imul(ah4, bl0) | 0;\n hi = Math.imul(ah4, bh0);\n lo = lo + Math.imul(al3, bl1) | 0;\n mid = mid + Math.imul(al3, bh1) | 0;\n mid = mid + Math.imul(ah3, bl1) | 0;\n hi = hi + Math.imul(ah3, bh1) | 0;\n lo = lo + Math.imul(al2, bl2) | 0;\n mid = mid + Math.imul(al2, bh2) | 0;\n mid = mid + Math.imul(ah2, bl2) | 0;\n hi = hi + Math.imul(ah2, bh2) | 0;\n lo = lo + Math.imul(al1, bl3) | 0;\n mid = mid + Math.imul(al1, bh3) | 0;\n mid = mid + Math.imul(ah1, bl3) | 0;\n hi = hi + Math.imul(ah1, bh3) | 0;\n lo = lo + Math.imul(al0, bl4) | 0;\n mid = mid + Math.imul(al0, bh4) | 0;\n mid = mid + Math.imul(ah0, bl4) | 0;\n hi = hi + Math.imul(ah0, bh4) | 0;\n var w4 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w4 >>> 26) | 0;\n w4 &= 67108863;\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = mid + Math.imul(ah5, bl0) | 0;\n hi = Math.imul(ah5, bh0);\n lo = lo + Math.imul(al4, bl1) | 0;\n mid = mid + Math.imul(al4, bh1) | 0;\n mid = mid + Math.imul(ah4, bl1) | 0;\n hi = hi + Math.imul(ah4, bh1) | 0;\n lo = lo + Math.imul(al3, bl2) | 0;\n mid = mid + Math.imul(al3, bh2) | 0;\n mid = mid + Math.imul(ah3, bl2) | 0;\n hi = hi + Math.imul(ah3, bh2) | 0;\n lo = lo + Math.imul(al2, bl3) | 0;\n mid = mid + Math.imul(al2, bh3) | 0;\n mid = mid + Math.imul(ah2, bl3) | 0;\n hi = hi + Math.imul(ah2, bh3) | 0;\n lo = lo + Math.imul(al1, bl4) | 0;\n mid = mid + Math.imul(al1, bh4) | 0;\n mid = mid + Math.imul(ah1, bl4) | 0;\n hi = hi + Math.imul(ah1, bh4) | 0;\n lo = lo + Math.imul(al0, bl5) | 0;\n mid = mid + Math.imul(al0, bh5) | 0;\n mid = mid + Math.imul(ah0, bl5) | 0;\n hi = hi + Math.imul(ah0, bh5) | 0;\n var w5 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w5 >>> 26) | 0;\n w5 &= 67108863;\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = mid + Math.imul(ah6, bl0) | 0;\n hi = Math.imul(ah6, bh0);\n lo = lo + Math.imul(al5, bl1) | 0;\n mid = mid + Math.imul(al5, bh1) | 0;\n mid = mid + Math.imul(ah5, bl1) | 0;\n hi = hi + Math.imul(ah5, bh1) | 0;\n lo = lo + Math.imul(al4, bl2) | 0;\n mid = mid + Math.imul(al4, bh2) | 0;\n mid = mid + Math.imul(ah4, bl2) | 0;\n hi = hi + Math.imul(ah4, bh2) | 0;\n lo = lo + Math.imul(al3, bl3) | 0;\n mid = mid + Math.imul(al3, bh3) | 0;\n mid = mid + Math.imul(ah3, bl3) | 0;\n hi = hi + Math.imul(ah3, bh3) | 0;\n lo = lo + Math.imul(al2, bl4) | 0;\n mid = mid + Math.imul(al2, bh4) | 0;\n mid = mid + Math.imul(ah2, bl4) | 0;\n hi = hi + Math.imul(ah2, bh4) | 0;\n lo = lo + Math.imul(al1, bl5) | 0;\n mid = mid + Math.imul(al1, bh5) | 0;\n mid = mid + Math.imul(ah1, bl5) | 0;\n hi = hi + Math.imul(ah1, bh5) | 0;\n lo = lo + Math.imul(al0, bl6) | 0;\n mid = mid + Math.imul(al0, bh6) | 0;\n mid = mid + Math.imul(ah0, bl6) | 0;\n hi = hi + Math.imul(ah0, bh6) | 0;\n var w6 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w6 >>> 26) | 0;\n w6 &= 67108863;\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = mid + Math.imul(ah7, bl0) | 0;\n hi = Math.imul(ah7, bh0);\n lo = lo + Math.imul(al6, bl1) | 0;\n mid = mid + Math.imul(al6, bh1) | 0;\n mid = mid + Math.imul(ah6, bl1) | 0;\n hi = hi + Math.imul(ah6, bh1) | 0;\n lo = lo + Math.imul(al5, bl2) | 0;\n mid = mid + Math.imul(al5, bh2) | 0;\n mid = mid + Math.imul(ah5, bl2) | 0;\n hi = hi + Math.imul(ah5, bh2) | 0;\n lo = lo + Math.imul(al4, bl3) | 0;\n mid = mid + Math.imul(al4, bh3) | 0;\n mid = mid + Math.imul(ah4, bl3) | 0;\n hi = hi + Math.imul(ah4, bh3) | 0;\n lo = lo + Math.imul(al3, bl4) | 0;\n mid = mid + Math.imul(al3, bh4) | 0;\n mid = mid + Math.imul(ah3, bl4) | 0;\n hi = hi + Math.imul(ah3, bh4) | 0;\n lo = lo + Math.imul(al2, bl5) | 0;\n mid = mid + Math.imul(al2, bh5) | 0;\n mid = mid + Math.imul(ah2, bl5) | 0;\n hi = hi + Math.imul(ah2, bh5) | 0;\n lo = lo + Math.imul(al1, bl6) | 0;\n mid = mid + Math.imul(al1, bh6) | 0;\n mid = mid + Math.imul(ah1, bl6) | 0;\n hi = hi + Math.imul(ah1, bh6) | 0;\n lo = lo + Math.imul(al0, bl7) | 0;\n mid = mid + Math.imul(al0, bh7) | 0;\n mid = mid + Math.imul(ah0, bl7) | 0;\n hi = hi + Math.imul(ah0, bh7) | 0;\n var w7 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w7 >>> 26) | 0;\n w7 &= 67108863;\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = mid + Math.imul(ah8, bl0) | 0;\n hi = Math.imul(ah8, bh0);\n lo = lo + Math.imul(al7, bl1) | 0;\n mid = mid + Math.imul(al7, bh1) | 0;\n mid = mid + Math.imul(ah7, bl1) | 0;\n hi = hi + Math.imul(ah7, bh1) | 0;\n lo = lo + Math.imul(al6, bl2) | 0;\n mid = mid + Math.imul(al6, bh2) | 0;\n mid = mid + Math.imul(ah6, bl2) | 0;\n hi = hi + Math.imul(ah6, bh2) | 0;\n lo = lo + Math.imul(al5, bl3) | 0;\n mid = mid + Math.imul(al5, bh3) | 0;\n mid = mid + Math.imul(ah5, bl3) | 0;\n hi = hi + Math.imul(ah5, bh3) | 0;\n lo = lo + Math.imul(al4, bl4) | 0;\n mid = mid + Math.imul(al4, bh4) | 0;\n mid = mid + Math.imul(ah4, bl4) | 0;\n hi = hi + Math.imul(ah4, bh4) | 0;\n lo = lo + Math.imul(al3, bl5) | 0;\n mid = mid + Math.imul(al3, bh5) | 0;\n mid = mid + Math.imul(ah3, bl5) | 0;\n hi = hi + Math.imul(ah3, bh5) | 0;\n lo = lo + Math.imul(al2, bl6) | 0;\n mid = mid + Math.imul(al2, bh6) | 0;\n mid = mid + Math.imul(ah2, bl6) | 0;\n hi = hi + Math.imul(ah2, bh6) | 0;\n lo = lo + Math.imul(al1, bl7) | 0;\n mid = mid + Math.imul(al1, bh7) | 0;\n mid = mid + Math.imul(ah1, bl7) | 0;\n hi = hi + Math.imul(ah1, bh7) | 0;\n lo = lo + Math.imul(al0, bl8) | 0;\n mid = mid + Math.imul(al0, bh8) | 0;\n mid = mid + Math.imul(ah0, bl8) | 0;\n hi = hi + Math.imul(ah0, bh8) | 0;\n var w8 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w8 >>> 26) | 0;\n w8 &= 67108863;\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = mid + Math.imul(ah9, bl0) | 0;\n hi = Math.imul(ah9, bh0);\n lo = lo + Math.imul(al8, bl1) | 0;\n mid = mid + Math.imul(al8, bh1) | 0;\n mid = mid + Math.imul(ah8, bl1) | 0;\n hi = hi + Math.imul(ah8, bh1) | 0;\n lo = lo + Math.imul(al7, bl2) | 0;\n mid = mid + Math.imul(al7, bh2) | 0;\n mid = mid + Math.imul(ah7, bl2) | 0;\n hi = hi + Math.imul(ah7, bh2) | 0;\n lo = lo + Math.imul(al6, bl3) | 0;\n mid = mid + Math.imul(al6, bh3) | 0;\n mid = mid + Math.imul(ah6, bl3) | 0;\n hi = hi + Math.imul(ah6, bh3) | 0;\n lo = lo + Math.imul(al5, bl4) | 0;\n mid = mid + Math.imul(al5, bh4) | 0;\n mid = mid + Math.imul(ah5, bl4) | 0;\n hi = hi + Math.imul(ah5, bh4) | 0;\n lo = lo + Math.imul(al4, bl5) | 0;\n mid = mid + Math.imul(al4, bh5) | 0;\n mid = mid + Math.imul(ah4, bl5) | 0;\n hi = hi + Math.imul(ah4, bh5) | 0;\n lo = lo + Math.imul(al3, bl6) | 0;\n mid = mid + Math.imul(al3, bh6) | 0;\n mid = mid + Math.imul(ah3, bl6) | 0;\n hi = hi + Math.imul(ah3, bh6) | 0;\n lo = lo + Math.imul(al2, bl7) | 0;\n mid = mid + Math.imul(al2, bh7) | 0;\n mid = mid + Math.imul(ah2, bl7) | 0;\n hi = hi + Math.imul(ah2, bh7) | 0;\n lo = lo + Math.imul(al1, bl8) | 0;\n mid = mid + Math.imul(al1, bh8) | 0;\n mid = mid + Math.imul(ah1, bl8) | 0;\n hi = hi + Math.imul(ah1, bh8) | 0;\n lo = lo + Math.imul(al0, bl9) | 0;\n mid = mid + Math.imul(al0, bh9) | 0;\n mid = mid + Math.imul(ah0, bl9) | 0;\n hi = hi + Math.imul(ah0, bh9) | 0;\n var w9 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w9 >>> 26) | 0;\n w9 &= 67108863;\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = mid + Math.imul(ah9, bl1) | 0;\n hi = Math.imul(ah9, bh1);\n lo = lo + Math.imul(al8, bl2) | 0;\n mid = mid + Math.imul(al8, bh2) | 0;\n mid = mid + Math.imul(ah8, bl2) | 0;\n hi = hi + Math.imul(ah8, bh2) | 0;\n lo = lo + Math.imul(al7, bl3) | 0;\n mid = mid + Math.imul(al7, bh3) | 0;\n mid = mid + Math.imul(ah7, bl3) | 0;\n hi = hi + Math.imul(ah7, bh3) | 0;\n lo = lo + Math.imul(al6, bl4) | 0;\n mid = mid + Math.imul(al6, bh4) | 0;\n mid = mid + Math.imul(ah6, bl4) | 0;\n hi = hi + Math.imul(ah6, bh4) | 0;\n lo = lo + Math.imul(al5, bl5) | 0;\n mid = mid + Math.imul(al5, bh5) | 0;\n mid = mid + Math.imul(ah5, bl5) | 0;\n hi = hi + Math.imul(ah5, bh5) | 0;\n lo = lo + Math.imul(al4, bl6) | 0;\n mid = mid + Math.imul(al4, bh6) | 0;\n mid = mid + Math.imul(ah4, bl6) | 0;\n hi = hi + Math.imul(ah4, bh6) | 0;\n lo = lo + Math.imul(al3, bl7) | 0;\n mid = mid + Math.imul(al3, bh7) | 0;\n mid = mid + Math.imul(ah3, bl7) | 0;\n hi = hi + Math.imul(ah3, bh7) | 0;\n lo = lo + Math.imul(al2, bl8) | 0;\n mid = mid + Math.imul(al2, bh8) | 0;\n mid = mid + Math.imul(ah2, bl8) | 0;\n hi = hi + Math.imul(ah2, bh8) | 0;\n lo = lo + Math.imul(al1, bl9) | 0;\n mid = mid + Math.imul(al1, bh9) | 0;\n mid = mid + Math.imul(ah1, bl9) | 0;\n hi = hi + Math.imul(ah1, bh9) | 0;\n var w10 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w10 >>> 26) | 0;\n w10 &= 67108863;\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = mid + Math.imul(ah9, bl2) | 0;\n hi = Math.imul(ah9, bh2);\n lo = lo + Math.imul(al8, bl3) | 0;\n mid = mid + Math.imul(al8, bh3) | 0;\n mid = mid + Math.imul(ah8, bl3) | 0;\n hi = hi + Math.imul(ah8, bh3) | 0;\n lo = lo + Math.imul(al7, bl4) | 0;\n mid = mid + Math.imul(al7, bh4) | 0;\n mid = mid + Math.imul(ah7, bl4) | 0;\n hi = hi + Math.imul(ah7, bh4) | 0;\n lo = lo + Math.imul(al6, bl5) | 0;\n mid = mid + Math.imul(al6, bh5) | 0;\n mid = mid + Math.imul(ah6, bl5) | 0;\n hi = hi + Math.imul(ah6, bh5) | 0;\n lo = lo + Math.imul(al5, bl6) | 0;\n mid = mid + Math.imul(al5, bh6) | 0;\n mid = mid + Math.imul(ah5, bl6) | 0;\n hi = hi + Math.imul(ah5, bh6) | 0;\n lo = lo + Math.imul(al4, bl7) | 0;\n mid = mid + Math.imul(al4, bh7) | 0;\n mid = mid + Math.imul(ah4, bl7) | 0;\n hi = hi + Math.imul(ah4, bh7) | 0;\n lo = lo + Math.imul(al3, bl8) | 0;\n mid = mid + Math.imul(al3, bh8) | 0;\n mid = mid + Math.imul(ah3, bl8) | 0;\n hi = hi + Math.imul(ah3, bh8) | 0;\n lo = lo + Math.imul(al2, bl9) | 0;\n mid = mid + Math.imul(al2, bh9) | 0;\n mid = mid + Math.imul(ah2, bl9) | 0;\n hi = hi + Math.imul(ah2, bh9) | 0;\n var w11 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w11 >>> 26) | 0;\n w11 &= 67108863;\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = mid + Math.imul(ah9, bl3) | 0;\n hi = Math.imul(ah9, bh3);\n lo = lo + Math.imul(al8, bl4) | 0;\n mid = mid + Math.imul(al8, bh4) | 0;\n mid = mid + Math.imul(ah8, bl4) | 0;\n hi = hi + Math.imul(ah8, bh4) | 0;\n lo = lo + Math.imul(al7, bl5) | 0;\n mid = mid + Math.imul(al7, bh5) | 0;\n mid = mid + Math.imul(ah7, bl5) | 0;\n hi = hi + Math.imul(ah7, bh5) | 0;\n lo = lo + Math.imul(al6, bl6) | 0;\n mid = mid + Math.imul(al6, bh6) | 0;\n mid = mid + Math.imul(ah6, bl6) | 0;\n hi = hi + Math.imul(ah6, bh6) | 0;\n lo = lo + Math.imul(al5, bl7) | 0;\n mid = mid + Math.imul(al5, bh7) | 0;\n mid = mid + Math.imul(ah5, bl7) | 0;\n hi = hi + Math.imul(ah5, bh7) | 0;\n lo = lo + Math.imul(al4, bl8) | 0;\n mid = mid + Math.imul(al4, bh8) | 0;\n mid = mid + Math.imul(ah4, bl8) | 0;\n hi = hi + Math.imul(ah4, bh8) | 0;\n lo = lo + Math.imul(al3, bl9) | 0;\n mid = mid + Math.imul(al3, bh9) | 0;\n mid = mid + Math.imul(ah3, bl9) | 0;\n hi = hi + Math.imul(ah3, bh9) | 0;\n var w12 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w12 >>> 26) | 0;\n w12 &= 67108863;\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = mid + Math.imul(ah9, bl4) | 0;\n hi = Math.imul(ah9, bh4);\n lo = lo + Math.imul(al8, bl5) | 0;\n mid = mid + Math.imul(al8, bh5) | 0;\n mid = mid + Math.imul(ah8, bl5) | 0;\n hi = hi + Math.imul(ah8, bh5) | 0;\n lo = lo + Math.imul(al7, bl6) | 0;\n mid = mid + Math.imul(al7, bh6) | 0;\n mid = mid + Math.imul(ah7, bl6) | 0;\n hi = hi + Math.imul(ah7, bh6) | 0;\n lo = lo + Math.imul(al6, bl7) | 0;\n mid = mid + Math.imul(al6, bh7) | 0;\n mid = mid + Math.imul(ah6, bl7) | 0;\n hi = hi + Math.imul(ah6, bh7) | 0;\n lo = lo + Math.imul(al5, bl8) | 0;\n mid = mid + Math.imul(al5, bh8) | 0;\n mid = mid + Math.imul(ah5, bl8) | 0;\n hi = hi + Math.imul(ah5, bh8) | 0;\n lo = lo + Math.imul(al4, bl9) | 0;\n mid = mid + Math.imul(al4, bh9) | 0;\n mid = mid + Math.imul(ah4, bl9) | 0;\n hi = hi + Math.imul(ah4, bh9) | 0;\n var w13 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w13 >>> 26) | 0;\n w13 &= 67108863;\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = mid + Math.imul(ah9, bl5) | 0;\n hi = Math.imul(ah9, bh5);\n lo = lo + Math.imul(al8, bl6) | 0;\n mid = mid + Math.imul(al8, bh6) | 0;\n mid = mid + Math.imul(ah8, bl6) | 0;\n hi = hi + Math.imul(ah8, bh6) | 0;\n lo = lo + Math.imul(al7, bl7) | 0;\n mid = mid + Math.imul(al7, bh7) | 0;\n mid = mid + Math.imul(ah7, bl7) | 0;\n hi = hi + Math.imul(ah7, bh7) | 0;\n lo = lo + Math.imul(al6, bl8) | 0;\n mid = mid + Math.imul(al6, bh8) | 0;\n mid = mid + Math.imul(ah6, bl8) | 0;\n hi = hi + Math.imul(ah6, bh8) | 0;\n lo = lo + Math.imul(al5, bl9) | 0;\n mid = mid + Math.imul(al5, bh9) | 0;\n mid = mid + Math.imul(ah5, bl9) | 0;\n hi = hi + Math.imul(ah5, bh9) | 0;\n var w14 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w14 >>> 26) | 0;\n w14 &= 67108863;\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = mid + Math.imul(ah9, bl6) | 0;\n hi = Math.imul(ah9, bh6);\n lo = lo + Math.imul(al8, bl7) | 0;\n mid = mid + Math.imul(al8, bh7) | 0;\n mid = mid + Math.imul(ah8, bl7) | 0;\n hi = hi + Math.imul(ah8, bh7) | 0;\n lo = lo + Math.imul(al7, bl8) | 0;\n mid = mid + Math.imul(al7, bh8) | 0;\n mid = mid + Math.imul(ah7, bl8) | 0;\n hi = hi + Math.imul(ah7, bh8) | 0;\n lo = lo + Math.imul(al6, bl9) | 0;\n mid = mid + Math.imul(al6, bh9) | 0;\n mid = mid + Math.imul(ah6, bl9) | 0;\n hi = hi + Math.imul(ah6, bh9) | 0;\n var w15 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w15 >>> 26) | 0;\n w15 &= 67108863;\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = mid + Math.imul(ah9, bl7) | 0;\n hi = Math.imul(ah9, bh7);\n lo = lo + Math.imul(al8, bl8) | 0;\n mid = mid + Math.imul(al8, bh8) | 0;\n mid = mid + Math.imul(ah8, bl8) | 0;\n hi = hi + Math.imul(ah8, bh8) | 0;\n lo = lo + Math.imul(al7, bl9) | 0;\n mid = mid + Math.imul(al7, bh9) | 0;\n mid = mid + Math.imul(ah7, bl9) | 0;\n hi = hi + Math.imul(ah7, bh9) | 0;\n var w16 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w16 >>> 26) | 0;\n w16 &= 67108863;\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = mid + Math.imul(ah9, bl8) | 0;\n hi = Math.imul(ah9, bh8);\n lo = lo + Math.imul(al8, bl9) | 0;\n mid = mid + Math.imul(al8, bh9) | 0;\n mid = mid + Math.imul(ah8, bl9) | 0;\n hi = hi + Math.imul(ah8, bh9) | 0;\n var w17 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w17 >>> 26) | 0;\n w17 &= 67108863;\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = mid + Math.imul(ah9, bl9) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (c4 + lo | 0) + ((mid & 8191) << 13) | 0;\n c4 = (hi + (mid >>> 13) | 0) + (w18 >>> 26) | 0;\n w18 &= 67108863;\n o5[0] = w0;\n o5[1] = w1;\n o5[2] = w22;\n o5[3] = w3;\n o5[4] = w4;\n o5[5] = w5;\n o5[6] = w6;\n o5[7] = w7;\n o5[8] = w8;\n o5[9] = w9;\n o5[10] = w10;\n o5[11] = w11;\n o5[12] = w12;\n o5[13] = w13;\n o5[14] = w14;\n o5[15] = w15;\n o5[16] = w16;\n o5[17] = w17;\n o5[18] = w18;\n if (c4 !== 0) {\n o5[19] = c4;\n out.length++;\n }\n return out;\n };\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n function bigMulTo(self2, num2, out) {\n out.negative = num2.negative ^ self2.negative;\n out.length = self2.length + num2.length;\n var carry = 0;\n var hncarry = 0;\n for (var k4 = 0; k4 < out.length - 1; k4++) {\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 67108863;\n var maxJ = Math.min(k4, num2.length - 1);\n for (var j2 = Math.max(0, k4 - self2.length + 1); j2 <= maxJ; j2++) {\n var i3 = k4 - j2;\n var a3 = self2.words[i3] | 0;\n var b4 = num2.words[j2] | 0;\n var r2 = a3 * b4;\n var lo = r2 & 67108863;\n ncarry = ncarry + (r2 / 67108864 | 0) | 0;\n lo = lo + rword | 0;\n rword = lo & 67108863;\n ncarry = ncarry + (lo >>> 26) | 0;\n hncarry += ncarry >>> 26;\n ncarry &= 67108863;\n }\n out.words[k4] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k4] = carry;\n } else {\n out.length--;\n }\n return out.strip();\n }\n function jumboMulTo(self2, num2, out) {\n var fftm = new FFTM();\n return fftm.mulp(self2, num2, out);\n }\n BN.prototype.mulTo = function mulTo(num2, out) {\n var res;\n var len = this.length + num2.length;\n if (this.length === 10 && num2.length === 10) {\n res = comb10MulTo(this, num2, out);\n } else if (len < 63) {\n res = smallMulTo(this, num2, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num2, out);\n } else {\n res = jumboMulTo(this, num2, out);\n }\n return res;\n };\n function FFTM(x4, y6) {\n this.x = x4;\n this.y = y6;\n }\n FFTM.prototype.makeRBT = function makeRBT(N4) {\n var t3 = new Array(N4);\n var l6 = BN.prototype._countBits(N4) - 1;\n for (var i3 = 0; i3 < N4; i3++) {\n t3[i3] = this.revBin(i3, l6, N4);\n }\n return t3;\n };\n FFTM.prototype.revBin = function revBin(x4, l6, N4) {\n if (x4 === 0 || x4 === N4 - 1)\n return x4;\n var rb = 0;\n for (var i3 = 0; i3 < l6; i3++) {\n rb |= (x4 & 1) << l6 - i3 - 1;\n x4 >>= 1;\n }\n return rb;\n };\n FFTM.prototype.permute = function permute(rbt, rws, iws, rtws, itws, N4) {\n for (var i3 = 0; i3 < N4; i3++) {\n rtws[i3] = rws[rbt[i3]];\n itws[i3] = iws[rbt[i3]];\n }\n };\n FFTM.prototype.transform = function transform(rws, iws, rtws, itws, N4, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N4);\n for (var s4 = 1; s4 < N4; s4 <<= 1) {\n var l6 = s4 << 1;\n var rtwdf = Math.cos(2 * Math.PI / l6);\n var itwdf = Math.sin(2 * Math.PI / l6);\n for (var p4 = 0; p4 < N4; p4 += l6) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n for (var j2 = 0; j2 < s4; j2++) {\n var re = rtws[p4 + j2];\n var ie = itws[p4 + j2];\n var ro = rtws[p4 + j2 + s4];\n var io = itws[p4 + j2 + s4];\n var rx = rtwdf_ * ro - itwdf_ * io;\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n rtws[p4 + j2] = re + ro;\n itws[p4 + j2] = ie + io;\n rtws[p4 + j2 + s4] = re - ro;\n itws[p4 + j2 + s4] = ie - io;\n if (j2 !== l6) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n FFTM.prototype.guessLen13b = function guessLen13b(n2, m2) {\n var N4 = Math.max(m2, n2) | 1;\n var odd = N4 & 1;\n var i3 = 0;\n for (N4 = N4 / 2 | 0; N4; N4 = N4 >>> 1) {\n i3++;\n }\n return 1 << i3 + 1 + odd;\n };\n FFTM.prototype.conjugate = function conjugate(rws, iws, N4) {\n if (N4 <= 1)\n return;\n for (var i3 = 0; i3 < N4 / 2; i3++) {\n var t3 = rws[i3];\n rws[i3] = rws[N4 - i3 - 1];\n rws[N4 - i3 - 1] = t3;\n t3 = iws[i3];\n iws[i3] = -iws[N4 - i3 - 1];\n iws[N4 - i3 - 1] = -t3;\n }\n };\n FFTM.prototype.normalize13b = function normalize13b(ws, N4) {\n var carry = 0;\n for (var i3 = 0; i3 < N4 / 2; i3++) {\n var w3 = Math.round(ws[2 * i3 + 1] / N4) * 8192 + Math.round(ws[2 * i3] / N4) + carry;\n ws[i3] = w3 & 67108863;\n if (w3 < 67108864) {\n carry = 0;\n } else {\n carry = w3 / 67108864 | 0;\n }\n }\n return ws;\n };\n FFTM.prototype.convert13b = function convert13b(ws, len, rws, N4) {\n var carry = 0;\n for (var i3 = 0; i3 < len; i3++) {\n carry = carry + (ws[i3] | 0);\n rws[2 * i3] = carry & 8191;\n carry = carry >>> 13;\n rws[2 * i3 + 1] = carry & 8191;\n carry = carry >>> 13;\n }\n for (i3 = 2 * len; i3 < N4; ++i3) {\n rws[i3] = 0;\n }\n assert9(carry === 0);\n assert9((carry & ~8191) === 0);\n };\n FFTM.prototype.stub = function stub(N4) {\n var ph = new Array(N4);\n for (var i3 = 0; i3 < N4; i3++) {\n ph[i3] = 0;\n }\n return ph;\n };\n FFTM.prototype.mulp = function mulp(x4, y6, out) {\n var N4 = 2 * this.guessLen13b(x4.length, y6.length);\n var rbt = this.makeRBT(N4);\n var _2 = this.stub(N4);\n var rws = new Array(N4);\n var rwst = new Array(N4);\n var iwst = new Array(N4);\n var nrws = new Array(N4);\n var nrwst = new Array(N4);\n var niwst = new Array(N4);\n var rmws = out.words;\n rmws.length = N4;\n this.convert13b(x4.words, x4.length, rws, N4);\n this.convert13b(y6.words, y6.length, nrws, N4);\n this.transform(rws, _2, rwst, iwst, N4, rbt);\n this.transform(nrws, _2, nrwst, niwst, N4, rbt);\n for (var i3 = 0; i3 < N4; i3++) {\n var rx = rwst[i3] * nrwst[i3] - iwst[i3] * niwst[i3];\n iwst[i3] = rwst[i3] * niwst[i3] + iwst[i3] * nrwst[i3];\n rwst[i3] = rx;\n }\n this.conjugate(rwst, iwst, N4);\n this.transform(rwst, iwst, rmws, _2, N4, rbt);\n this.conjugate(rmws, _2, N4);\n this.normalize13b(rmws, N4);\n out.negative = x4.negative ^ y6.negative;\n out.length = x4.length + y6.length;\n return out.strip();\n };\n BN.prototype.mul = function mul(num2) {\n var out = new BN(null);\n out.words = new Array(this.length + num2.length);\n return this.mulTo(num2, out);\n };\n BN.prototype.mulf = function mulf(num2) {\n var out = new BN(null);\n out.words = new Array(this.length + num2.length);\n return jumboMulTo(this, num2, out);\n };\n BN.prototype.imul = function imul(num2) {\n return this.clone().mulTo(num2, this);\n };\n BN.prototype.imuln = function imuln(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n var carry = 0;\n for (var i3 = 0; i3 < this.length; i3++) {\n var w3 = (this.words[i3] | 0) * num2;\n var lo = (w3 & 67108863) + (carry & 67108863);\n carry >>= 26;\n carry += w3 / 67108864 | 0;\n carry += lo >>> 26;\n this.words[i3] = lo & 67108863;\n }\n if (carry !== 0) {\n this.words[i3] = carry;\n this.length++;\n }\n this.length = num2 === 0 ? 1 : this.length;\n return this;\n };\n BN.prototype.muln = function muln(num2) {\n return this.clone().imuln(num2);\n };\n BN.prototype.sqr = function sqr() {\n return this.mul(this);\n };\n BN.prototype.isqr = function isqr() {\n return this.imul(this.clone());\n };\n BN.prototype.pow = function pow(num2) {\n var w3 = toBitArray(num2);\n if (w3.length === 0)\n return new BN(1);\n var res = this;\n for (var i3 = 0; i3 < w3.length; i3++, res = res.sqr()) {\n if (w3[i3] !== 0)\n break;\n }\n if (++i3 < w3.length) {\n for (var q3 = res.sqr(); i3 < w3.length; i3++, q3 = q3.sqr()) {\n if (w3[i3] === 0)\n continue;\n res = res.mul(q3);\n }\n }\n return res;\n };\n BN.prototype.iushln = function iushln(bits) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n var carryMask = 67108863 >>> 26 - r2 << 26 - r2;\n var i3;\n if (r2 !== 0) {\n var carry = 0;\n for (i3 = 0; i3 < this.length; i3++) {\n var newCarry = this.words[i3] & carryMask;\n var c4 = (this.words[i3] | 0) - newCarry << r2;\n this.words[i3] = c4 | carry;\n carry = newCarry >>> 26 - r2;\n }\n if (carry) {\n this.words[i3] = carry;\n this.length++;\n }\n }\n if (s4 !== 0) {\n for (i3 = this.length - 1; i3 >= 0; i3--) {\n this.words[i3 + s4] = this.words[i3];\n }\n for (i3 = 0; i3 < s4; i3++) {\n this.words[i3] = 0;\n }\n this.length += s4;\n }\n return this.strip();\n };\n BN.prototype.ishln = function ishln(bits) {\n assert9(this.negative === 0);\n return this.iushln(bits);\n };\n BN.prototype.iushrn = function iushrn(bits, hint, extended) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var h4;\n if (hint) {\n h4 = (hint - hint % 26) / 26;\n } else {\n h4 = 0;\n }\n var r2 = bits % 26;\n var s4 = Math.min((bits - r2) / 26, this.length);\n var mask = 67108863 ^ 67108863 >>> r2 << r2;\n var maskedWords = extended;\n h4 -= s4;\n h4 = Math.max(0, h4);\n if (maskedWords) {\n for (var i3 = 0; i3 < s4; i3++) {\n maskedWords.words[i3] = this.words[i3];\n }\n maskedWords.length = s4;\n }\n if (s4 === 0) {\n } else if (this.length > s4) {\n this.length -= s4;\n for (i3 = 0; i3 < this.length; i3++) {\n this.words[i3] = this.words[i3 + s4];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n var carry = 0;\n for (i3 = this.length - 1; i3 >= 0 && (carry !== 0 || i3 >= h4); i3--) {\n var word = this.words[i3] | 0;\n this.words[i3] = carry << 26 - r2 | word >>> r2;\n carry = word & mask;\n }\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n return this.strip();\n };\n BN.prototype.ishrn = function ishrn(bits, hint, extended) {\n assert9(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n BN.prototype.shln = function shln(bits) {\n return this.clone().ishln(bits);\n };\n BN.prototype.ushln = function ushln(bits) {\n return this.clone().iushln(bits);\n };\n BN.prototype.shrn = function shrn(bits) {\n return this.clone().ishrn(bits);\n };\n BN.prototype.ushrn = function ushrn(bits) {\n return this.clone().iushrn(bits);\n };\n BN.prototype.testn = function testn(bit) {\n assert9(typeof bit === \"number\" && bit >= 0);\n var r2 = bit % 26;\n var s4 = (bit - r2) / 26;\n var q3 = 1 << r2;\n if (this.length <= s4)\n return false;\n var w3 = this.words[s4];\n return !!(w3 & q3);\n };\n BN.prototype.imaskn = function imaskn(bits) {\n assert9(typeof bits === \"number\" && bits >= 0);\n var r2 = bits % 26;\n var s4 = (bits - r2) / 26;\n assert9(this.negative === 0, \"imaskn works only with positive numbers\");\n if (this.length <= s4) {\n return this;\n }\n if (r2 !== 0) {\n s4++;\n }\n this.length = Math.min(s4, this.length);\n if (r2 !== 0) {\n var mask = 67108863 ^ 67108863 >>> r2 << r2;\n this.words[this.length - 1] &= mask;\n }\n return this.strip();\n };\n BN.prototype.maskn = function maskn(bits) {\n return this.clone().imaskn(bits);\n };\n BN.prototype.iaddn = function iaddn(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n if (num2 < 0)\n return this.isubn(-num2);\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num2) {\n this.words[0] = num2 - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n this.negative = 0;\n this.isubn(num2);\n this.negative = 1;\n return this;\n }\n return this._iaddn(num2);\n };\n BN.prototype._iaddn = function _iaddn(num2) {\n this.words[0] += num2;\n for (var i3 = 0; i3 < this.length && this.words[i3] >= 67108864; i3++) {\n this.words[i3] -= 67108864;\n if (i3 === this.length - 1) {\n this.words[i3 + 1] = 1;\n } else {\n this.words[i3 + 1]++;\n }\n }\n this.length = Math.max(this.length, i3 + 1);\n return this;\n };\n BN.prototype.isubn = function isubn(num2) {\n assert9(typeof num2 === \"number\");\n assert9(num2 < 67108864);\n if (num2 < 0)\n return this.iaddn(-num2);\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num2);\n this.negative = 1;\n return this;\n }\n this.words[0] -= num2;\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n for (var i3 = 0; i3 < this.length && this.words[i3] < 0; i3++) {\n this.words[i3] += 67108864;\n this.words[i3 + 1] -= 1;\n }\n }\n return this.strip();\n };\n BN.prototype.addn = function addn(num2) {\n return this.clone().iaddn(num2);\n };\n BN.prototype.subn = function subn(num2) {\n return this.clone().isubn(num2);\n };\n BN.prototype.iabs = function iabs() {\n this.negative = 0;\n return this;\n };\n BN.prototype.abs = function abs() {\n return this.clone().iabs();\n };\n BN.prototype._ishlnsubmul = function _ishlnsubmul(num2, mul, shift) {\n var len = num2.length + shift;\n var i3;\n this._expand(len);\n var w3;\n var carry = 0;\n for (i3 = 0; i3 < num2.length; i3++) {\n w3 = (this.words[i3 + shift] | 0) + carry;\n var right = (num2.words[i3] | 0) * mul;\n w3 -= right & 67108863;\n carry = (w3 >> 26) - (right / 67108864 | 0);\n this.words[i3 + shift] = w3 & 67108863;\n }\n for (; i3 < this.length - shift; i3++) {\n w3 = (this.words[i3 + shift] | 0) + carry;\n carry = w3 >> 26;\n this.words[i3 + shift] = w3 & 67108863;\n }\n if (carry === 0)\n return this.strip();\n assert9(carry === -1);\n carry = 0;\n for (i3 = 0; i3 < this.length; i3++) {\n w3 = -(this.words[i3] | 0) + carry;\n carry = w3 >> 26;\n this.words[i3] = w3 & 67108863;\n }\n this.negative = 1;\n return this.strip();\n };\n BN.prototype._wordDiv = function _wordDiv(num2, mode) {\n var shift = this.length - num2.length;\n var a3 = this.clone();\n var b4 = num2;\n var bhi = b4.words[b4.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b4 = b4.ushln(shift);\n a3.iushln(shift);\n bhi = b4.words[b4.length - 1] | 0;\n }\n var m2 = a3.length - b4.length;\n var q3;\n if (mode !== \"mod\") {\n q3 = new BN(null);\n q3.length = m2 + 1;\n q3.words = new Array(q3.length);\n for (var i3 = 0; i3 < q3.length; i3++) {\n q3.words[i3] = 0;\n }\n }\n var diff = a3.clone()._ishlnsubmul(b4, 1, m2);\n if (diff.negative === 0) {\n a3 = diff;\n if (q3) {\n q3.words[m2] = 1;\n }\n }\n for (var j2 = m2 - 1; j2 >= 0; j2--) {\n var qj = (a3.words[b4.length + j2] | 0) * 67108864 + (a3.words[b4.length + j2 - 1] | 0);\n qj = Math.min(qj / bhi | 0, 67108863);\n a3._ishlnsubmul(b4, qj, j2);\n while (a3.negative !== 0) {\n qj--;\n a3.negative = 0;\n a3._ishlnsubmul(b4, 1, j2);\n if (!a3.isZero()) {\n a3.negative ^= 1;\n }\n }\n if (q3) {\n q3.words[j2] = qj;\n }\n }\n if (q3) {\n q3.strip();\n }\n a3.strip();\n if (mode !== \"div\" && shift !== 0) {\n a3.iushrn(shift);\n }\n return {\n div: q3 || null,\n mod: a3\n };\n };\n BN.prototype.divmod = function divmod(num2, mode, positive) {\n assert9(!num2.isZero());\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n var div, mod3, res;\n if (this.negative !== 0 && num2.negative === 0) {\n res = this.neg().divmod(num2, mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n if (mode !== \"div\") {\n mod3 = res.mod.neg();\n if (positive && mod3.negative !== 0) {\n mod3.iadd(num2);\n }\n }\n return {\n div,\n mod: mod3\n };\n }\n if (this.negative === 0 && num2.negative !== 0) {\n res = this.divmod(num2.neg(), mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n return {\n div,\n mod: res.mod\n };\n }\n if ((this.negative & num2.negative) !== 0) {\n res = this.neg().divmod(num2.neg(), mode);\n if (mode !== \"div\") {\n mod3 = res.mod.neg();\n if (positive && mod3.negative !== 0) {\n mod3.isub(num2);\n }\n }\n return {\n div: res.div,\n mod: mod3\n };\n }\n if (num2.length > this.length || this.cmp(num2) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n if (num2.length === 1) {\n if (mode === \"div\") {\n return {\n div: this.divn(num2.words[0]),\n mod: null\n };\n }\n if (mode === \"mod\") {\n return {\n div: null,\n mod: new BN(this.modn(num2.words[0]))\n };\n }\n return {\n div: this.divn(num2.words[0]),\n mod: new BN(this.modn(num2.words[0]))\n };\n }\n return this._wordDiv(num2, mode);\n };\n BN.prototype.div = function div(num2) {\n return this.divmod(num2, \"div\", false).div;\n };\n BN.prototype.mod = function mod3(num2) {\n return this.divmod(num2, \"mod\", false).mod;\n };\n BN.prototype.umod = function umod(num2) {\n return this.divmod(num2, \"mod\", true).mod;\n };\n BN.prototype.divRound = function divRound(num2) {\n var dm = this.divmod(num2);\n if (dm.mod.isZero())\n return dm.div;\n var mod3 = dm.div.negative !== 0 ? dm.mod.isub(num2) : dm.mod;\n var half = num2.ushrn(1);\n var r2 = num2.andln(1);\n var cmp = mod3.cmp(half);\n if (cmp < 0 || r2 === 1 && cmp === 0)\n return dm.div;\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n BN.prototype.modn = function modn(num2) {\n assert9(num2 <= 67108863);\n var p4 = (1 << 26) % num2;\n var acc = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n acc = (p4 * acc + (this.words[i3] | 0)) % num2;\n }\n return acc;\n };\n BN.prototype.idivn = function idivn(num2) {\n assert9(num2 <= 67108863);\n var carry = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n var w3 = (this.words[i3] | 0) + carry * 67108864;\n this.words[i3] = w3 / num2 | 0;\n carry = w3 % num2;\n }\n return this.strip();\n };\n BN.prototype.divn = function divn(num2) {\n return this.clone().idivn(num2);\n };\n BN.prototype.egcd = function egcd(p4) {\n assert9(p4.negative === 0);\n assert9(!p4.isZero());\n var x4 = this;\n var y6 = p4.clone();\n if (x4.negative !== 0) {\n x4 = x4.umod(p4);\n } else {\n x4 = x4.clone();\n }\n var A4 = new BN(1);\n var B2 = new BN(0);\n var C = new BN(0);\n var D2 = new BN(1);\n var g4 = 0;\n while (x4.isEven() && y6.isEven()) {\n x4.iushrn(1);\n y6.iushrn(1);\n ++g4;\n }\n var yp = y6.clone();\n var xp = x4.clone();\n while (!x4.isZero()) {\n for (var i3 = 0, im = 1; (x4.words[0] & im) === 0 && i3 < 26; ++i3, im <<= 1)\n ;\n if (i3 > 0) {\n x4.iushrn(i3);\n while (i3-- > 0) {\n if (A4.isOdd() || B2.isOdd()) {\n A4.iadd(yp);\n B2.isub(xp);\n }\n A4.iushrn(1);\n B2.iushrn(1);\n }\n }\n for (var j2 = 0, jm = 1; (y6.words[0] & jm) === 0 && j2 < 26; ++j2, jm <<= 1)\n ;\n if (j2 > 0) {\n y6.iushrn(j2);\n while (j2-- > 0) {\n if (C.isOdd() || D2.isOdd()) {\n C.iadd(yp);\n D2.isub(xp);\n }\n C.iushrn(1);\n D2.iushrn(1);\n }\n }\n if (x4.cmp(y6) >= 0) {\n x4.isub(y6);\n A4.isub(C);\n B2.isub(D2);\n } else {\n y6.isub(x4);\n C.isub(A4);\n D2.isub(B2);\n }\n }\n return {\n a: C,\n b: D2,\n gcd: y6.iushln(g4)\n };\n };\n BN.prototype._invmp = function _invmp(p4) {\n assert9(p4.negative === 0);\n assert9(!p4.isZero());\n var a3 = this;\n var b4 = p4.clone();\n if (a3.negative !== 0) {\n a3 = a3.umod(p4);\n } else {\n a3 = a3.clone();\n }\n var x1 = new BN(1);\n var x22 = new BN(0);\n var delta = b4.clone();\n while (a3.cmpn(1) > 0 && b4.cmpn(1) > 0) {\n for (var i3 = 0, im = 1; (a3.words[0] & im) === 0 && i3 < 26; ++i3, im <<= 1)\n ;\n if (i3 > 0) {\n a3.iushrn(i3);\n while (i3-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n x1.iushrn(1);\n }\n }\n for (var j2 = 0, jm = 1; (b4.words[0] & jm) === 0 && j2 < 26; ++j2, jm <<= 1)\n ;\n if (j2 > 0) {\n b4.iushrn(j2);\n while (j2-- > 0) {\n if (x22.isOdd()) {\n x22.iadd(delta);\n }\n x22.iushrn(1);\n }\n }\n if (a3.cmp(b4) >= 0) {\n a3.isub(b4);\n x1.isub(x22);\n } else {\n b4.isub(a3);\n x22.isub(x1);\n }\n }\n var res;\n if (a3.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x22;\n }\n if (res.cmpn(0) < 0) {\n res.iadd(p4);\n }\n return res;\n };\n BN.prototype.gcd = function gcd(num2) {\n if (this.isZero())\n return num2.abs();\n if (num2.isZero())\n return this.abs();\n var a3 = this.clone();\n var b4 = num2.clone();\n a3.negative = 0;\n b4.negative = 0;\n for (var shift = 0; a3.isEven() && b4.isEven(); shift++) {\n a3.iushrn(1);\n b4.iushrn(1);\n }\n do {\n while (a3.isEven()) {\n a3.iushrn(1);\n }\n while (b4.isEven()) {\n b4.iushrn(1);\n }\n var r2 = a3.cmp(b4);\n if (r2 < 0) {\n var t3 = a3;\n a3 = b4;\n b4 = t3;\n } else if (r2 === 0 || b4.cmpn(1) === 0) {\n break;\n }\n a3.isub(b4);\n } while (true);\n return b4.iushln(shift);\n };\n BN.prototype.invm = function invm(num2) {\n return this.egcd(num2).a.umod(num2);\n };\n BN.prototype.isEven = function isEven() {\n return (this.words[0] & 1) === 0;\n };\n BN.prototype.isOdd = function isOdd() {\n return (this.words[0] & 1) === 1;\n };\n BN.prototype.andln = function andln(num2) {\n return this.words[0] & num2;\n };\n BN.prototype.bincn = function bincn(bit) {\n assert9(typeof bit === \"number\");\n var r2 = bit % 26;\n var s4 = (bit - r2) / 26;\n var q3 = 1 << r2;\n if (this.length <= s4) {\n this._expand(s4 + 1);\n this.words[s4] |= q3;\n return this;\n }\n var carry = q3;\n for (var i3 = s4; carry !== 0 && i3 < this.length; i3++) {\n var w3 = this.words[i3] | 0;\n w3 += carry;\n carry = w3 >>> 26;\n w3 &= 67108863;\n this.words[i3] = w3;\n }\n if (carry !== 0) {\n this.words[i3] = carry;\n this.length++;\n }\n return this;\n };\n BN.prototype.isZero = function isZero() {\n return this.length === 1 && this.words[0] === 0;\n };\n BN.prototype.cmpn = function cmpn(num2) {\n var negative = num2 < 0;\n if (this.negative !== 0 && !negative)\n return -1;\n if (this.negative === 0 && negative)\n return 1;\n this.strip();\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num2 = -num2;\n }\n assert9(num2 <= 67108863, \"Number is too big\");\n var w3 = this.words[0] | 0;\n res = w3 === num2 ? 0 : w3 < num2 ? -1 : 1;\n }\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN.prototype.cmp = function cmp(num2) {\n if (this.negative !== 0 && num2.negative === 0)\n return -1;\n if (this.negative === 0 && num2.negative !== 0)\n return 1;\n var res = this.ucmp(num2);\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN.prototype.ucmp = function ucmp(num2) {\n if (this.length > num2.length)\n return 1;\n if (this.length < num2.length)\n return -1;\n var res = 0;\n for (var i3 = this.length - 1; i3 >= 0; i3--) {\n var a3 = this.words[i3] | 0;\n var b4 = num2.words[i3] | 0;\n if (a3 === b4)\n continue;\n if (a3 < b4) {\n res = -1;\n } else if (a3 > b4) {\n res = 1;\n }\n break;\n }\n return res;\n };\n BN.prototype.gtn = function gtn(num2) {\n return this.cmpn(num2) === 1;\n };\n BN.prototype.gt = function gt(num2) {\n return this.cmp(num2) === 1;\n };\n BN.prototype.gten = function gten(num2) {\n return this.cmpn(num2) >= 0;\n };\n BN.prototype.gte = function gte(num2) {\n return this.cmp(num2) >= 0;\n };\n BN.prototype.ltn = function ltn(num2) {\n return this.cmpn(num2) === -1;\n };\n BN.prototype.lt = function lt(num2) {\n return this.cmp(num2) === -1;\n };\n BN.prototype.lten = function lten(num2) {\n return this.cmpn(num2) <= 0;\n };\n BN.prototype.lte = function lte(num2) {\n return this.cmp(num2) <= 0;\n };\n BN.prototype.eqn = function eqn(num2) {\n return this.cmpn(num2) === 0;\n };\n BN.prototype.eq = function eq(num2) {\n return this.cmp(num2) === 0;\n };\n BN.red = function red(num2) {\n return new Red(num2);\n };\n BN.prototype.toRed = function toRed(ctx) {\n assert9(!this.red, \"Already a number in reduction context\");\n assert9(this.negative === 0, \"red works only with positives\");\n return ctx.convertTo(this)._forceRed(ctx);\n };\n BN.prototype.fromRed = function fromRed() {\n assert9(this.red, \"fromRed works only with numbers in reduction context\");\n return this.red.convertFrom(this);\n };\n BN.prototype._forceRed = function _forceRed(ctx) {\n this.red = ctx;\n return this;\n };\n BN.prototype.forceRed = function forceRed(ctx) {\n assert9(!this.red, \"Already a number in reduction context\");\n return this._forceRed(ctx);\n };\n BN.prototype.redAdd = function redAdd(num2) {\n assert9(this.red, \"redAdd works only with red numbers\");\n return this.red.add(this, num2);\n };\n BN.prototype.redIAdd = function redIAdd(num2) {\n assert9(this.red, \"redIAdd works only with red numbers\");\n return this.red.iadd(this, num2);\n };\n BN.prototype.redSub = function redSub(num2) {\n assert9(this.red, \"redSub works only with red numbers\");\n return this.red.sub(this, num2);\n };\n BN.prototype.redISub = function redISub(num2) {\n assert9(this.red, \"redISub works only with red numbers\");\n return this.red.isub(this, num2);\n };\n BN.prototype.redShl = function redShl(num2) {\n assert9(this.red, \"redShl works only with red numbers\");\n return this.red.shl(this, num2);\n };\n BN.prototype.redMul = function redMul(num2) {\n assert9(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num2);\n return this.red.mul(this, num2);\n };\n BN.prototype.redIMul = function redIMul(num2) {\n assert9(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num2);\n return this.red.imul(this, num2);\n };\n BN.prototype.redSqr = function redSqr() {\n assert9(this.red, \"redSqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n BN.prototype.redISqr = function redISqr() {\n assert9(this.red, \"redISqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n BN.prototype.redSqrt = function redSqrt() {\n assert9(this.red, \"redSqrt works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n BN.prototype.redInvm = function redInvm() {\n assert9(this.red, \"redInvm works only with red numbers\");\n this.red._verify1(this);\n return this.red.invm(this);\n };\n BN.prototype.redNeg = function redNeg() {\n assert9(this.red, \"redNeg works only with red numbers\");\n this.red._verify1(this);\n return this.red.neg(this);\n };\n BN.prototype.redPow = function redPow(num2) {\n assert9(this.red && !num2.red, \"redPow(normalNum)\");\n this.red._verify1(this);\n return this.red.pow(this, num2);\n };\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n function MPrime(name, p4) {\n this.name = name;\n this.p = new BN(p4, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n this.tmp = this._tmp();\n }\n MPrime.prototype._tmp = function _tmp() {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n MPrime.prototype.ireduce = function ireduce(num2) {\n var r2 = num2;\n var rlen;\n do {\n this.split(r2, this.tmp);\n r2 = this.imulK(r2);\n r2 = r2.iadd(this.tmp);\n rlen = r2.bitLength();\n } while (rlen > this.n);\n var cmp = rlen < this.n ? -1 : r2.ucmp(this.p);\n if (cmp === 0) {\n r2.words[0] = 0;\n r2.length = 1;\n } else if (cmp > 0) {\n r2.isub(this.p);\n } else {\n if (r2.strip !== void 0) {\n r2.strip();\n } else {\n r2._strip();\n }\n }\n return r2;\n };\n MPrime.prototype.split = function split3(input, out) {\n input.iushrn(this.n, 0, out);\n };\n MPrime.prototype.imulK = function imulK(num2) {\n return num2.imul(this.k);\n };\n function K256() {\n MPrime.call(\n this,\n \"k256\",\n \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\"\n );\n }\n inherits(K256, MPrime);\n K256.prototype.split = function split3(input, output) {\n var mask = 4194303;\n var outLen = Math.min(input.length, 9);\n for (var i3 = 0; i3 < outLen; i3++) {\n output.words[i3] = input.words[i3];\n }\n output.length = outLen;\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n for (i3 = 10; i3 < input.length; i3++) {\n var next = input.words[i3] | 0;\n input.words[i3 - 10] = (next & mask) << 4 | prev >>> 22;\n prev = next;\n }\n prev >>>= 22;\n input.words[i3 - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n K256.prototype.imulK = function imulK(num2) {\n num2.words[num2.length] = 0;\n num2.words[num2.length + 1] = 0;\n num2.length += 2;\n var lo = 0;\n for (var i3 = 0; i3 < num2.length; i3++) {\n var w3 = num2.words[i3] | 0;\n lo += w3 * 977;\n num2.words[i3] = lo & 67108863;\n lo = w3 * 64 + (lo / 67108864 | 0);\n }\n if (num2.words[num2.length - 1] === 0) {\n num2.length--;\n if (num2.words[num2.length - 1] === 0) {\n num2.length--;\n }\n }\n return num2;\n };\n function P224() {\n MPrime.call(\n this,\n \"p224\",\n \"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\"\n );\n }\n inherits(P224, MPrime);\n function P192() {\n MPrime.call(\n this,\n \"p192\",\n \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\"\n );\n }\n inherits(P192, MPrime);\n function P25519() {\n MPrime.call(\n this,\n \"25519\",\n \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\"\n );\n }\n inherits(P25519, MPrime);\n P25519.prototype.imulK = function imulK(num2) {\n var carry = 0;\n for (var i3 = 0; i3 < num2.length; i3++) {\n var hi = (num2.words[i3] | 0) * 19 + carry;\n var lo = hi & 67108863;\n hi >>>= 26;\n num2.words[i3] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num2.words[num2.length++] = carry;\n }\n return num2;\n };\n BN._prime = function prime(name) {\n if (primes[name])\n return primes[name];\n var prime2;\n if (name === \"k256\") {\n prime2 = new K256();\n } else if (name === \"p224\") {\n prime2 = new P224();\n } else if (name === \"p192\") {\n prime2 = new P192();\n } else if (name === \"p25519\") {\n prime2 = new P25519();\n } else {\n throw new Error(\"Unknown prime \" + name);\n }\n primes[name] = prime2;\n return prime2;\n };\n function Red(m2) {\n if (typeof m2 === \"string\") {\n var prime = BN._prime(m2);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert9(m2.gtn(1), \"modulus must be greater than 1\");\n this.m = m2;\n this.prime = null;\n }\n }\n Red.prototype._verify1 = function _verify1(a3) {\n assert9(a3.negative === 0, \"red works only with positives\");\n assert9(a3.red, \"red works only with red numbers\");\n };\n Red.prototype._verify2 = function _verify2(a3, b4) {\n assert9((a3.negative | b4.negative) === 0, \"red works only with positives\");\n assert9(\n a3.red && a3.red === b4.red,\n \"red works only with red numbers\"\n );\n };\n Red.prototype.imod = function imod(a3) {\n if (this.prime)\n return this.prime.ireduce(a3)._forceRed(this);\n return a3.umod(this.m)._forceRed(this);\n };\n Red.prototype.neg = function neg(a3) {\n if (a3.isZero()) {\n return a3.clone();\n }\n return this.m.sub(a3)._forceRed(this);\n };\n Red.prototype.add = function add2(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.add(b4);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.iadd = function iadd(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.iadd(b4);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n Red.prototype.sub = function sub(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.sub(b4);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.isub = function isub(a3, b4) {\n this._verify2(a3, b4);\n var res = a3.isub(b4);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n Red.prototype.shl = function shl(a3, num2) {\n this._verify1(a3);\n return this.imod(a3.ushln(num2));\n };\n Red.prototype.imul = function imul(a3, b4) {\n this._verify2(a3, b4);\n return this.imod(a3.imul(b4));\n };\n Red.prototype.mul = function mul(a3, b4) {\n this._verify2(a3, b4);\n return this.imod(a3.mul(b4));\n };\n Red.prototype.isqr = function isqr(a3) {\n return this.imul(a3, a3.clone());\n };\n Red.prototype.sqr = function sqr(a3) {\n return this.mul(a3, a3);\n };\n Red.prototype.sqrt = function sqrt(a3) {\n if (a3.isZero())\n return a3.clone();\n var mod3 = this.m.andln(3);\n assert9(mod3 % 2 === 1);\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a3, pow);\n }\n var q3 = this.m.subn(1);\n var s4 = 0;\n while (!q3.isZero() && q3.andln(1) === 0) {\n s4++;\n q3.iushrn(1);\n }\n assert9(!q3.isZero());\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n var lpow = this.m.subn(1).iushrn(1);\n var z2 = this.m.bitLength();\n z2 = new BN(2 * z2 * z2).toRed(this);\n while (this.pow(z2, lpow).cmp(nOne) !== 0) {\n z2.redIAdd(nOne);\n }\n var c4 = this.pow(z2, q3);\n var r2 = this.pow(a3, q3.addn(1).iushrn(1));\n var t3 = this.pow(a3, q3);\n var m2 = s4;\n while (t3.cmp(one) !== 0) {\n var tmp = t3;\n for (var i3 = 0; tmp.cmp(one) !== 0; i3++) {\n tmp = tmp.redSqr();\n }\n assert9(i3 < m2);\n var b4 = this.pow(c4, new BN(1).iushln(m2 - i3 - 1));\n r2 = r2.redMul(b4);\n c4 = b4.redSqr();\n t3 = t3.redMul(c4);\n m2 = i3;\n }\n return r2;\n };\n Red.prototype.invm = function invm(a3) {\n var inv = a3._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n Red.prototype.pow = function pow(a3, num2) {\n if (num2.isZero())\n return new BN(1).toRed(this);\n if (num2.cmpn(1) === 0)\n return a3.clone();\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a3;\n for (var i3 = 2; i3 < wnd.length; i3++) {\n wnd[i3] = this.mul(wnd[i3 - 1], a3);\n }\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num2.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n for (i3 = num2.length - 1; i3 >= 0; i3--) {\n var word = num2.words[i3];\n for (var j2 = start - 1; j2 >= 0; j2--) {\n var bit = word >> j2 & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i3 !== 0 || j2 !== 0))\n continue;\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n return res;\n };\n Red.prototype.convertTo = function convertTo(num2) {\n var r2 = num2.umod(this.m);\n return r2 === num2 ? r2.clone() : r2;\n };\n Red.prototype.convertFrom = function convertFrom(num2) {\n var res = num2.clone();\n res.red = null;\n return res;\n };\n BN.mont = function mont(num2) {\n return new Mont(num2);\n };\n function Mont(m2) {\n Red.call(this, m2);\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - this.shift % 26;\n }\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n Mont.prototype.convertTo = function convertTo(num2) {\n return this.imod(num2.ushln(this.shift));\n };\n Mont.prototype.convertFrom = function convertFrom(num2) {\n var r2 = this.imod(num2.mul(this.rinv));\n r2.red = null;\n return r2;\n };\n Mont.prototype.imul = function imul(a3, b4) {\n if (a3.isZero() || b4.isZero()) {\n a3.words[0] = 0;\n a3.length = 1;\n return a3;\n }\n var t3 = a3.imul(b4);\n var c4 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u2 = t3.isub(c4).iushrn(this.shift);\n var res = u2;\n if (u2.cmp(this.m) >= 0) {\n res = u2.isub(this.m);\n } else if (u2.cmpn(0) < 0) {\n res = u2.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.mul = function mul(a3, b4) {\n if (a3.isZero() || b4.isZero())\n return new BN(0)._forceRed(this);\n var t3 = a3.mul(b4);\n var c4 = t3.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u2 = t3.isub(c4).iushrn(this.shift);\n var res = u2;\n if (u2.cmp(this.m) >= 0) {\n res = u2.isub(this.m);\n } else if (u2.cmpn(0) < 0) {\n res = u2.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.invm = function invm(a3) {\n var res = this.imod(a3._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n })(typeof module === \"undefined\" || module, exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/minimalistic-assert@1.0.1/node_modules/minimalistic-assert/index.js\n var require_minimalistic_assert = __commonJS({\n \"../../../node_modules/.pnpm/minimalistic-assert@1.0.1/node_modules/minimalistic-assert/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = assert9;\n function assert9(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n assert9.equal = function assertEqual(l6, r2, msg) {\n if (l6 != r2)\n throw new Error(msg || \"Assertion failed: \" + l6 + \" != \" + r2);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/minimalistic-crypto-utils@1.0.1/node_modules/minimalistic-crypto-utils/lib/utils.js\n var require_utils2 = __commonJS({\n \"../../../node_modules/.pnpm/minimalistic-crypto-utils@1.0.1/node_modules/minimalistic-crypto-utils/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = exports3;\n function toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg !== \"string\") {\n for (var i3 = 0; i3 < msg.length; i3++)\n res[i3] = msg[i3] | 0;\n return res;\n }\n if (enc === \"hex\") {\n msg = msg.replace(/[^a-z0-9]+/ig, \"\");\n if (msg.length % 2 !== 0)\n msg = \"0\" + msg;\n for (var i3 = 0; i3 < msg.length; i3 += 2)\n res.push(parseInt(msg[i3] + msg[i3 + 1], 16));\n } else {\n for (var i3 = 0; i3 < msg.length; i3++) {\n var c4 = msg.charCodeAt(i3);\n var hi = c4 >> 8;\n var lo = c4 & 255;\n if (hi)\n res.push(hi, lo);\n else\n res.push(lo);\n }\n }\n return res;\n }\n utils.toArray = toArray;\n function zero2(word) {\n if (word.length === 1)\n return \"0\" + word;\n else\n return word;\n }\n utils.zero2 = zero2;\n function toHex3(msg) {\n var res = \"\";\n for (var i3 = 0; i3 < msg.length; i3++)\n res += zero2(msg[i3].toString(16));\n return res;\n }\n utils.toHex = toHex3;\n utils.encode = function encode7(arr, enc) {\n if (enc === \"hex\")\n return toHex3(arr);\n else\n return arr;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/utils.js\n var require_utils3 = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = exports3;\n var BN = require_bn2();\n var minAssert = require_minimalistic_assert();\n var minUtils = require_utils2();\n utils.assert = minAssert;\n utils.toArray = minUtils.toArray;\n utils.zero2 = minUtils.zero2;\n utils.toHex = minUtils.toHex;\n utils.encode = minUtils.encode;\n function getNAF(num2, w3, bits) {\n var naf = new Array(Math.max(num2.bitLength(), bits) + 1);\n var i3;\n for (i3 = 0; i3 < naf.length; i3 += 1) {\n naf[i3] = 0;\n }\n var ws = 1 << w3 + 1;\n var k4 = num2.clone();\n for (i3 = 0; i3 < naf.length; i3++) {\n var z2;\n var mod3 = k4.andln(ws - 1);\n if (k4.isOdd()) {\n if (mod3 > (ws >> 1) - 1)\n z2 = (ws >> 1) - mod3;\n else\n z2 = mod3;\n k4.isubn(z2);\n } else {\n z2 = 0;\n }\n naf[i3] = z2;\n k4.iushrn(1);\n }\n return naf;\n }\n utils.getNAF = getNAF;\n function getJSF(k1, k22) {\n var jsf = [\n [],\n []\n ];\n k1 = k1.clone();\n k22 = k22.clone();\n var d1 = 0;\n var d22 = 0;\n var m8;\n while (k1.cmpn(-d1) > 0 || k22.cmpn(-d22) > 0) {\n var m14 = k1.andln(3) + d1 & 3;\n var m24 = k22.andln(3) + d22 & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n m8 = k1.andln(7) + d1 & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n m8 = k22.andln(7) + d22 & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d22 === u2 + 1)\n d22 = 1 - d22;\n k1.iushrn(1);\n k22.iushrn(1);\n }\n return jsf;\n }\n utils.getJSF = getJSF;\n function cachedProperty(obj, name, computer) {\n var key = \"_\" + name;\n obj.prototype[name] = function cachedProperty2() {\n return this[key] !== void 0 ? this[key] : this[key] = computer.call(this);\n };\n }\n utils.cachedProperty = cachedProperty;\n function parseBytes(bytes) {\n return typeof bytes === \"string\" ? utils.toArray(bytes, \"hex\") : bytes;\n }\n utils.parseBytes = parseBytes;\n function intFromLE(bytes) {\n return new BN(bytes, \"hex\", \"le\");\n }\n utils.intFromLE = intFromLE;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/empty.js\n var empty_exports = {};\n __export(empty_exports, {\n default: () => empty_default\n });\n var empty_default;\n var init_empty = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/empty.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n empty_default = {};\n }\n });\n\n // ../../../node_modules/.pnpm/brorand@1.1.0/node_modules/brorand/index.js\n var require_brorand = __commonJS({\n \"../../../node_modules/.pnpm/brorand@1.1.0/node_modules/brorand/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var r2;\n module.exports = function rand(len) {\n if (!r2)\n r2 = new Rand(null);\n return r2.generate(len);\n };\n function Rand(rand) {\n this.rand = rand;\n }\n module.exports.Rand = Rand;\n Rand.prototype.generate = function generate(len) {\n return this._rand(len);\n };\n Rand.prototype._rand = function _rand(n2) {\n if (this.rand.getBytes)\n return this.rand.getBytes(n2);\n var res = new Uint8Array(n2);\n for (var i3 = 0; i3 < res.length; i3++)\n res[i3] = this.rand.getByte();\n return res;\n };\n if (typeof self === \"object\") {\n if (self.crypto && self.crypto.getRandomValues) {\n Rand.prototype._rand = function _rand(n2) {\n var arr = new Uint8Array(n2);\n self.crypto.getRandomValues(arr);\n return arr;\n };\n } else if (self.msCrypto && self.msCrypto.getRandomValues) {\n Rand.prototype._rand = function _rand(n2) {\n var arr = new Uint8Array(n2);\n self.msCrypto.getRandomValues(arr);\n return arr;\n };\n } else if (typeof window === \"object\") {\n Rand.prototype._rand = function() {\n throw new Error(\"Not implemented yet\");\n };\n }\n } else {\n try {\n crypto3 = (init_empty(), __toCommonJS(empty_exports));\n if (typeof crypto3.randomBytes !== \"function\")\n throw new Error(\"Not supported\");\n Rand.prototype._rand = function _rand(n2) {\n return crypto3.randomBytes(n2);\n };\n } catch (e2) {\n }\n }\n var crypto3;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/base.js\n var require_base = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/base.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var utils = require_utils3();\n var getNAF = utils.getNAF;\n var getJSF = utils.getJSF;\n var assert9 = utils.assert;\n function BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n this._bitLength = this.n ? this.n.bitLength() : 0;\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n }\n module.exports = BaseCurve;\n BaseCurve.prototype.point = function point() {\n throw new Error(\"Not implemented\");\n };\n BaseCurve.prototype.validate = function validate7() {\n throw new Error(\"Not implemented\");\n };\n BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p4, k4) {\n assert9(p4.precomputed);\n var doubles = p4._getDoubles();\n var naf = getNAF(k4, 1, this._bitLength);\n var I2 = (1 << doubles.step + 1) - (doubles.step % 2 === 0 ? 2 : 1);\n I2 /= 3;\n var repr = [];\n var j2;\n var nafW;\n for (j2 = 0; j2 < naf.length; j2 += doubles.step) {\n nafW = 0;\n for (var l6 = j2 + doubles.step - 1; l6 >= j2; l6--)\n nafW = (nafW << 1) + naf[l6];\n repr.push(nafW);\n }\n var a3 = this.jpoint(null, null, null);\n var b4 = this.jpoint(null, null, null);\n for (var i3 = I2; i3 > 0; i3--) {\n for (j2 = 0; j2 < repr.length; j2++) {\n nafW = repr[j2];\n if (nafW === i3)\n b4 = b4.mixedAdd(doubles.points[j2]);\n else if (nafW === -i3)\n b4 = b4.mixedAdd(doubles.points[j2].neg());\n }\n a3 = a3.add(b4);\n }\n return a3.toP();\n };\n BaseCurve.prototype._wnafMul = function _wnafMul(p4, k4) {\n var w3 = 4;\n var nafPoints = p4._getNAFPoints(w3);\n w3 = nafPoints.wnd;\n var wnd = nafPoints.points;\n var naf = getNAF(k4, w3, this._bitLength);\n var acc = this.jpoint(null, null, null);\n for (var i3 = naf.length - 1; i3 >= 0; i3--) {\n for (var l6 = 0; i3 >= 0 && naf[i3] === 0; i3--)\n l6++;\n if (i3 >= 0)\n l6++;\n acc = acc.dblp(l6);\n if (i3 < 0)\n break;\n var z2 = naf[i3];\n assert9(z2 !== 0);\n if (p4.type === \"affine\") {\n if (z2 > 0)\n acc = acc.mixedAdd(wnd[z2 - 1 >> 1]);\n else\n acc = acc.mixedAdd(wnd[-z2 - 1 >> 1].neg());\n } else {\n if (z2 > 0)\n acc = acc.add(wnd[z2 - 1 >> 1]);\n else\n acc = acc.add(wnd[-z2 - 1 >> 1].neg());\n }\n }\n return p4.type === \"affine\" ? acc.toP() : acc;\n };\n BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, points, coeffs, len, jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n var max = 0;\n var i3;\n var j2;\n var p4;\n for (i3 = 0; i3 < len; i3++) {\n p4 = points[i3];\n var nafPoints = p4._getNAFPoints(defW);\n wndWidth[i3] = nafPoints.wnd;\n wnd[i3] = nafPoints.points;\n }\n for (i3 = len - 1; i3 >= 1; i3 -= 2) {\n var a3 = i3 - 1;\n var b4 = i3;\n if (wndWidth[a3] !== 1 || wndWidth[b4] !== 1) {\n naf[a3] = getNAF(coeffs[a3], wndWidth[a3], this._bitLength);\n naf[b4] = getNAF(coeffs[b4], wndWidth[b4], this._bitLength);\n max = Math.max(naf[a3].length, max);\n max = Math.max(naf[b4].length, max);\n continue;\n }\n var comb = [\n points[a3],\n /* 1 */\n null,\n /* 3 */\n null,\n /* 5 */\n points[b4]\n /* 7 */\n ];\n if (points[a3].y.cmp(points[b4].y) === 0) {\n comb[1] = points[a3].add(points[b4]);\n comb[2] = points[a3].toJ().mixedAdd(points[b4].neg());\n } else if (points[a3].y.cmp(points[b4].y.redNeg()) === 0) {\n comb[1] = points[a3].toJ().mixedAdd(points[b4]);\n comb[2] = points[a3].add(points[b4].neg());\n } else {\n comb[1] = points[a3].toJ().mixedAdd(points[b4]);\n comb[2] = points[a3].toJ().mixedAdd(points[b4].neg());\n }\n var index2 = [\n -3,\n /* -1 -1 */\n -1,\n /* -1 0 */\n -5,\n /* -1 1 */\n -7,\n /* 0 -1 */\n 0,\n /* 0 0 */\n 7,\n /* 0 1 */\n 5,\n /* 1 -1 */\n 1,\n /* 1 0 */\n 3\n /* 1 1 */\n ];\n var jsf = getJSF(coeffs[a3], coeffs[b4]);\n max = Math.max(jsf[0].length, max);\n naf[a3] = new Array(max);\n naf[b4] = new Array(max);\n for (j2 = 0; j2 < max; j2++) {\n var ja = jsf[0][j2] | 0;\n var jb = jsf[1][j2] | 0;\n naf[a3][j2] = index2[(ja + 1) * 3 + (jb + 1)];\n naf[b4][j2] = 0;\n wnd[a3] = comb;\n }\n }\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (i3 = max; i3 >= 0; i3--) {\n var k4 = 0;\n while (i3 >= 0) {\n var zero = true;\n for (j2 = 0; j2 < len; j2++) {\n tmp[j2] = naf[j2][i3] | 0;\n if (tmp[j2] !== 0)\n zero = false;\n }\n if (!zero)\n break;\n k4++;\n i3--;\n }\n if (i3 >= 0)\n k4++;\n acc = acc.dblp(k4);\n if (i3 < 0)\n break;\n for (j2 = 0; j2 < len; j2++) {\n var z2 = tmp[j2];\n p4;\n if (z2 === 0)\n continue;\n else if (z2 > 0)\n p4 = wnd[j2][z2 - 1 >> 1];\n else if (z2 < 0)\n p4 = wnd[j2][-z2 - 1 >> 1].neg();\n if (p4.type === \"affine\")\n acc = acc.mixedAdd(p4);\n else\n acc = acc.add(p4);\n }\n }\n for (i3 = 0; i3 < len; i3++)\n wnd[i3] = null;\n if (jacobianResult)\n return acc;\n else\n return acc.toP();\n };\n function BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n }\n BaseCurve.BasePoint = BasePoint;\n BasePoint.prototype.eq = function eq() {\n throw new Error(\"Not implemented\");\n };\n BasePoint.prototype.validate = function validate7() {\n return this.curve.validate(this);\n };\n BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils.toArray(bytes, enc);\n var len = this.p.byteLength();\n if ((bytes[0] === 4 || bytes[0] === 6 || bytes[0] === 7) && bytes.length - 1 === 2 * len) {\n if (bytes[0] === 6)\n assert9(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 7)\n assert9(bytes[bytes.length - 1] % 2 === 1);\n var res = this.point(\n bytes.slice(1, 1 + len),\n bytes.slice(1 + len, 1 + 2 * len)\n );\n return res;\n } else if ((bytes[0] === 2 || bytes[0] === 3) && bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 3);\n }\n throw new Error(\"Unknown point format\");\n };\n BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n };\n BasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x4 = this.getX().toArray(\"be\", len);\n if (compact)\n return [this.getY().isEven() ? 2 : 3].concat(x4);\n return [4].concat(x4, this.getY().toArray(\"be\", len));\n };\n BasePoint.prototype.encode = function encode7(enc, compact) {\n return utils.encode(this._encode(compact), enc);\n };\n BasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed)\n return this;\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n return this;\n };\n BasePoint.prototype._hasDoubles = function _hasDoubles(k4) {\n if (!this.precomputed)\n return false;\n var doubles = this.precomputed.doubles;\n if (!doubles)\n return false;\n return doubles.points.length >= Math.ceil((k4.bitLength() + 1) / doubles.step);\n };\n BasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles)\n return this.precomputed.doubles;\n var doubles = [this];\n var acc = this;\n for (var i3 = 0; i3 < power; i3 += step) {\n for (var j2 = 0; j2 < step; j2++)\n acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step,\n points: doubles\n };\n };\n BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf)\n return this.precomputed.naf;\n var res = [this];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i3 = 1; i3 < max; i3++)\n res[i3] = res[i3 - 1].add(dbl);\n return {\n wnd,\n points: res\n };\n };\n BasePoint.prototype._getBeta = function _getBeta() {\n return null;\n };\n BasePoint.prototype.dblp = function dblp(k4) {\n var r2 = this;\n for (var i3 = 0; i3 < k4; i3++)\n r2 = r2.dbl();\n return r2;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js\n var require_inherits_browser = __commonJS({\n \"../../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n if (typeof Object.create === \"function\") {\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n }\n };\n } else {\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {\n };\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/short.js\n var require_short = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/short.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils3();\n var BN = require_bn2();\n var inherits = require_inherits_browser();\n var Base = require_base();\n var assert9 = utils.assert;\n function ShortCurve(conf) {\n Base.call(this, \"short\", conf);\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.tinv = this.two.redInvm();\n this.zeroA = this.a.fromRed().cmpn(0) === 0;\n this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;\n this.endo = this._getEndomorphism(conf);\n this._endoWnafT1 = new Array(4);\n this._endoWnafT2 = new Array(4);\n }\n inherits(ShortCurve, Base);\n module.exports = ShortCurve;\n ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {\n if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)\n return;\n var beta;\n var lambda;\n if (conf.beta) {\n beta = new BN(conf.beta, 16).toRed(this.red);\n } else {\n var betas = this._getEndoRoots(this.p);\n beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];\n beta = beta.toRed(this.red);\n }\n if (conf.lambda) {\n lambda = new BN(conf.lambda, 16);\n } else {\n var lambdas = this._getEndoRoots(this.n);\n if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {\n lambda = lambdas[0];\n } else {\n lambda = lambdas[1];\n assert9(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);\n }\n }\n var basis;\n if (conf.basis) {\n basis = conf.basis.map(function(vec) {\n return {\n a: new BN(vec.a, 16),\n b: new BN(vec.b, 16)\n };\n });\n } else {\n basis = this._getEndoBasis(lambda);\n }\n return {\n beta,\n lambda,\n basis\n };\n };\n ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num2) {\n var red = num2 === this.p ? this.red : BN.mont(num2);\n var tinv = new BN(2).toRed(red).redInvm();\n var ntinv = tinv.redNeg();\n var s4 = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);\n var l1 = ntinv.redAdd(s4).fromRed();\n var l22 = ntinv.redSub(s4).fromRed();\n return [l1, l22];\n };\n ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {\n var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));\n var u2 = lambda;\n var v2 = this.n.clone();\n var x1 = new BN(1);\n var y1 = new BN(0);\n var x22 = new BN(0);\n var y22 = new BN(1);\n var a0;\n var b0;\n var a1;\n var b1;\n var a22;\n var b22;\n var prevR;\n var i3 = 0;\n var r2;\n var x4;\n while (u2.cmpn(0) !== 0) {\n var q3 = v2.div(u2);\n r2 = v2.sub(q3.mul(u2));\n x4 = x22.sub(q3.mul(x1));\n var y6 = y22.sub(q3.mul(y1));\n if (!a1 && r2.cmp(aprxSqrt) < 0) {\n a0 = prevR.neg();\n b0 = x1;\n a1 = r2.neg();\n b1 = x4;\n } else if (a1 && ++i3 === 2) {\n break;\n }\n prevR = r2;\n v2 = u2;\n u2 = r2;\n x22 = x1;\n x1 = x4;\n y22 = y1;\n y1 = y6;\n }\n a22 = r2.neg();\n b22 = x4;\n var len1 = a1.sqr().add(b1.sqr());\n var len2 = a22.sqr().add(b22.sqr());\n if (len2.cmp(len1) >= 0) {\n a22 = a0;\n b22 = b0;\n }\n if (a1.negative) {\n a1 = a1.neg();\n b1 = b1.neg();\n }\n if (a22.negative) {\n a22 = a22.neg();\n b22 = b22.neg();\n }\n return [\n { a: a1, b: b1 },\n { a: a22, b: b22 }\n ];\n };\n ShortCurve.prototype._endoSplit = function _endoSplit(k4) {\n var basis = this.endo.basis;\n var v12 = basis[0];\n var v2 = basis[1];\n var c1 = v2.b.mul(k4).divRound(this.n);\n var c22 = v12.b.neg().mul(k4).divRound(this.n);\n var p1 = c1.mul(v12.a);\n var p22 = c22.mul(v2.a);\n var q1 = c1.mul(v12.b);\n var q22 = c22.mul(v2.b);\n var k1 = k4.sub(p1).sub(p22);\n var k22 = q1.add(q22).neg();\n return { k1, k2: k22 };\n };\n ShortCurve.prototype.pointFromX = function pointFromX(x4, odd) {\n x4 = new BN(x4, 16);\n if (!x4.red)\n x4 = x4.toRed(this.red);\n var y22 = x4.redSqr().redMul(x4).redIAdd(x4.redMul(this.a)).redIAdd(this.b);\n var y6 = y22.redSqrt();\n if (y6.redSqr().redSub(y22).cmp(this.zero) !== 0)\n throw new Error(\"invalid point\");\n var isOdd = y6.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y6 = y6.redNeg();\n return this.point(x4, y6);\n };\n ShortCurve.prototype.validate = function validate7(point) {\n if (point.inf)\n return true;\n var x4 = point.x;\n var y6 = point.y;\n var ax = this.a.redMul(x4);\n var rhs = x4.redSqr().redMul(x4).redIAdd(ax).redIAdd(this.b);\n return y6.redSqr().redISub(rhs).cmpn(0) === 0;\n };\n ShortCurve.prototype._endoWnafMulAdd = function _endoWnafMulAdd(points, coeffs, jacobianResult) {\n var npoints = this._endoWnafT1;\n var ncoeffs = this._endoWnafT2;\n for (var i3 = 0; i3 < points.length; i3++) {\n var split3 = this._endoSplit(coeffs[i3]);\n var p4 = points[i3];\n var beta = p4._getBeta();\n if (split3.k1.negative) {\n split3.k1.ineg();\n p4 = p4.neg(true);\n }\n if (split3.k2.negative) {\n split3.k2.ineg();\n beta = beta.neg(true);\n }\n npoints[i3 * 2] = p4;\n npoints[i3 * 2 + 1] = beta;\n ncoeffs[i3 * 2] = split3.k1;\n ncoeffs[i3 * 2 + 1] = split3.k2;\n }\n var res = this._wnafMulAdd(1, npoints, ncoeffs, i3 * 2, jacobianResult);\n for (var j2 = 0; j2 < i3 * 2; j2++) {\n npoints[j2] = null;\n ncoeffs[j2] = null;\n }\n return res;\n };\n function Point3(curve, x4, y6, isRed) {\n Base.BasePoint.call(this, curve, \"affine\");\n if (x4 === null && y6 === null) {\n this.x = null;\n this.y = null;\n this.inf = true;\n } else {\n this.x = new BN(x4, 16);\n this.y = new BN(y6, 16);\n if (isRed) {\n this.x.forceRed(this.curve.red);\n this.y.forceRed(this.curve.red);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n this.inf = false;\n }\n }\n inherits(Point3, Base.BasePoint);\n ShortCurve.prototype.point = function point(x4, y6, isRed) {\n return new Point3(this, x4, y6, isRed);\n };\n ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {\n return Point3.fromJSON(this, obj, red);\n };\n Point3.prototype._getBeta = function _getBeta() {\n if (!this.curve.endo)\n return;\n var pre = this.precomputed;\n if (pre && pre.beta)\n return pre.beta;\n var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);\n if (pre) {\n var curve = this.curve;\n var endoMul = function(p4) {\n return curve.point(p4.x.redMul(curve.endo.beta), p4.y);\n };\n pre.beta = beta;\n beta.precomputed = {\n beta: null,\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(endoMul)\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(endoMul)\n }\n };\n }\n return beta;\n };\n Point3.prototype.toJSON = function toJSON() {\n if (!this.precomputed)\n return [this.x, this.y];\n return [this.x, this.y, this.precomputed && {\n doubles: this.precomputed.doubles && {\n step: this.precomputed.doubles.step,\n points: this.precomputed.doubles.points.slice(1)\n },\n naf: this.precomputed.naf && {\n wnd: this.precomputed.naf.wnd,\n points: this.precomputed.naf.points.slice(1)\n }\n }];\n };\n Point3.fromJSON = function fromJSON(curve, obj, red) {\n if (typeof obj === \"string\")\n obj = JSON.parse(obj);\n var res = curve.point(obj[0], obj[1], red);\n if (!obj[2])\n return res;\n function obj2point(obj2) {\n return curve.point(obj2[0], obj2[1], red);\n }\n var pre = obj[2];\n res.precomputed = {\n beta: null,\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: [res].concat(pre.doubles.points.map(obj2point))\n },\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: [res].concat(pre.naf.points.map(obj2point))\n }\n };\n return res;\n };\n Point3.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return \"\";\n return \"\";\n };\n Point3.prototype.isInfinity = function isInfinity() {\n return this.inf;\n };\n Point3.prototype.add = function add2(p4) {\n if (this.inf)\n return p4;\n if (p4.inf)\n return this;\n if (this.eq(p4))\n return this.dbl();\n if (this.neg().eq(p4))\n return this.curve.point(null, null);\n if (this.x.cmp(p4.x) === 0)\n return this.curve.point(null, null);\n var c4 = this.y.redSub(p4.y);\n if (c4.cmpn(0) !== 0)\n c4 = c4.redMul(this.x.redSub(p4.x).redInvm());\n var nx = c4.redSqr().redISub(this.x).redISub(p4.x);\n var ny = c4.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n };\n Point3.prototype.dbl = function dbl() {\n if (this.inf)\n return this;\n var ys1 = this.y.redAdd(this.y);\n if (ys1.cmpn(0) === 0)\n return this.curve.point(null, null);\n var a3 = this.curve.a;\n var x22 = this.x.redSqr();\n var dyinv = ys1.redInvm();\n var c4 = x22.redAdd(x22).redIAdd(x22).redIAdd(a3).redMul(dyinv);\n var nx = c4.redSqr().redISub(this.x.redAdd(this.x));\n var ny = c4.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n };\n Point3.prototype.getX = function getX() {\n return this.x.fromRed();\n };\n Point3.prototype.getY = function getY() {\n return this.y.fromRed();\n };\n Point3.prototype.mul = function mul(k4) {\n k4 = new BN(k4, 16);\n if (this.isInfinity())\n return this;\n else if (this._hasDoubles(k4))\n return this.curve._fixedNafMul(this, k4);\n else if (this.curve.endo)\n return this.curve._endoWnafMulAdd([this], [k4]);\n else\n return this.curve._wnafMul(this, k4);\n };\n Point3.prototype.mulAdd = function mulAdd(k1, p22, k22) {\n var points = [this, p22];\n var coeffs = [k1, k22];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2);\n };\n Point3.prototype.jmulAdd = function jmulAdd(k1, p22, k22) {\n var points = [this, p22];\n var coeffs = [k1, k22];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs, true);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2, true);\n };\n Point3.prototype.eq = function eq(p4) {\n return this === p4 || this.inf === p4.inf && (this.inf || this.x.cmp(p4.x) === 0 && this.y.cmp(p4.y) === 0);\n };\n Point3.prototype.neg = function neg(_precompute) {\n if (this.inf)\n return this;\n var res = this.curve.point(this.x, this.y.redNeg());\n if (_precompute && this.precomputed) {\n var pre = this.precomputed;\n var negate = function(p4) {\n return p4.neg();\n };\n res.precomputed = {\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(negate)\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(negate)\n }\n };\n }\n return res;\n };\n Point3.prototype.toJ = function toJ() {\n if (this.inf)\n return this.curve.jpoint(null, null, null);\n var res = this.curve.jpoint(this.x, this.y, this.curve.one);\n return res;\n };\n function JPoint(curve, x4, y6, z2) {\n Base.BasePoint.call(this, curve, \"jacobian\");\n if (x4 === null && y6 === null && z2 === null) {\n this.x = this.curve.one;\n this.y = this.curve.one;\n this.z = new BN(0);\n } else {\n this.x = new BN(x4, 16);\n this.y = new BN(y6, 16);\n this.z = new BN(z2, 16);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n this.zOne = this.z === this.curve.one;\n }\n inherits(JPoint, Base.BasePoint);\n ShortCurve.prototype.jpoint = function jpoint(x4, y6, z2) {\n return new JPoint(this, x4, y6, z2);\n };\n JPoint.prototype.toP = function toP() {\n if (this.isInfinity())\n return this.curve.point(null, null);\n var zinv = this.z.redInvm();\n var zinv2 = zinv.redSqr();\n var ax = this.x.redMul(zinv2);\n var ay = this.y.redMul(zinv2).redMul(zinv);\n return this.curve.point(ax, ay);\n };\n JPoint.prototype.neg = function neg() {\n return this.curve.jpoint(this.x, this.y.redNeg(), this.z);\n };\n JPoint.prototype.add = function add2(p4) {\n if (this.isInfinity())\n return p4;\n if (p4.isInfinity())\n return this;\n var pz2 = p4.z.redSqr();\n var z2 = this.z.redSqr();\n var u1 = this.x.redMul(pz2);\n var u2 = p4.x.redMul(z2);\n var s1 = this.y.redMul(pz2.redMul(p4.z));\n var s22 = p4.y.redMul(z2.redMul(this.z));\n var h4 = u1.redSub(u2);\n var r2 = s1.redSub(s22);\n if (h4.cmpn(0) === 0) {\n if (r2.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n var h22 = h4.redSqr();\n var h32 = h22.redMul(h4);\n var v2 = u1.redMul(h22);\n var nx = r2.redSqr().redIAdd(h32).redISub(v2).redISub(v2);\n var ny = r2.redMul(v2.redISub(nx)).redISub(s1.redMul(h32));\n var nz = this.z.redMul(p4.z).redMul(h4);\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype.mixedAdd = function mixedAdd(p4) {\n if (this.isInfinity())\n return p4.toJ();\n if (p4.isInfinity())\n return this;\n var z2 = this.z.redSqr();\n var u1 = this.x;\n var u2 = p4.x.redMul(z2);\n var s1 = this.y;\n var s22 = p4.y.redMul(z2).redMul(this.z);\n var h4 = u1.redSub(u2);\n var r2 = s1.redSub(s22);\n if (h4.cmpn(0) === 0) {\n if (r2.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n var h22 = h4.redSqr();\n var h32 = h22.redMul(h4);\n var v2 = u1.redMul(h22);\n var nx = r2.redSqr().redIAdd(h32).redISub(v2).redISub(v2);\n var ny = r2.redMul(v2.redISub(nx)).redISub(s1.redMul(h32));\n var nz = this.z.redMul(h4);\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype.dblp = function dblp(pow) {\n if (pow === 0)\n return this;\n if (this.isInfinity())\n return this;\n if (!pow)\n return this.dbl();\n var i3;\n if (this.curve.zeroA || this.curve.threeA) {\n var r2 = this;\n for (i3 = 0; i3 < pow; i3++)\n r2 = r2.dbl();\n return r2;\n }\n var a3 = this.curve.a;\n var tinv = this.curve.tinv;\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n var jyd = jy.redAdd(jy);\n for (i3 = 0; i3 < pow; i3++) {\n var jx2 = jx.redSqr();\n var jyd2 = jyd.redSqr();\n var jyd4 = jyd2.redSqr();\n var c4 = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a3.redMul(jz4));\n var t1 = jx.redMul(jyd2);\n var nx = c4.redSqr().redISub(t1.redAdd(t1));\n var t22 = t1.redISub(nx);\n var dny = c4.redMul(t22);\n dny = dny.redIAdd(dny).redISub(jyd4);\n var nz = jyd.redMul(jz);\n if (i3 + 1 < pow)\n jz4 = jz4.redMul(jyd4);\n jx = nx;\n jz = nz;\n jyd = dny;\n }\n return this.curve.jpoint(jx, jyd.redMul(tinv), jz);\n };\n JPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n if (this.curve.zeroA)\n return this._zeroDbl();\n else if (this.curve.threeA)\n return this._threeDbl();\n else\n return this._dbl();\n };\n JPoint.prototype._zeroDbl = function _zeroDbl() {\n var nx;\n var ny;\n var nz;\n if (this.zOne) {\n var xx = this.x.redSqr();\n var yy = this.y.redSqr();\n var yyyy = yy.redSqr();\n var s4 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s4 = s4.redIAdd(s4);\n var m2 = xx.redAdd(xx).redIAdd(xx);\n var t3 = m2.redSqr().redISub(s4).redISub(s4);\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n nx = t3;\n ny = m2.redMul(s4.redISub(t3)).redISub(yyyy8);\n nz = this.y.redAdd(this.y);\n } else {\n var a3 = this.x.redSqr();\n var b4 = this.y.redSqr();\n var c4 = b4.redSqr();\n var d5 = this.x.redAdd(b4).redSqr().redISub(a3).redISub(c4);\n d5 = d5.redIAdd(d5);\n var e2 = a3.redAdd(a3).redIAdd(a3);\n var f7 = e2.redSqr();\n var c8 = c4.redIAdd(c4);\n c8 = c8.redIAdd(c8);\n c8 = c8.redIAdd(c8);\n nx = f7.redISub(d5).redISub(d5);\n ny = e2.redMul(d5.redISub(nx)).redISub(c8);\n nz = this.y.redMul(this.z);\n nz = nz.redIAdd(nz);\n }\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype._threeDbl = function _threeDbl() {\n var nx;\n var ny;\n var nz;\n if (this.zOne) {\n var xx = this.x.redSqr();\n var yy = this.y.redSqr();\n var yyyy = yy.redSqr();\n var s4 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s4 = s4.redIAdd(s4);\n var m2 = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);\n var t3 = m2.redSqr().redISub(s4).redISub(s4);\n nx = t3;\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n ny = m2.redMul(s4.redISub(t3)).redISub(yyyy8);\n nz = this.y.redAdd(this.y);\n } else {\n var delta = this.z.redSqr();\n var gamma = this.y.redSqr();\n var beta = this.x.redMul(gamma);\n var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));\n alpha = alpha.redAdd(alpha).redIAdd(alpha);\n var beta4 = beta.redIAdd(beta);\n beta4 = beta4.redIAdd(beta4);\n var beta8 = beta4.redAdd(beta4);\n nx = alpha.redSqr().redISub(beta8);\n nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);\n var ggamma8 = gamma.redSqr();\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);\n }\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype._dbl = function _dbl() {\n var a3 = this.curve.a;\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n var jx2 = jx.redSqr();\n var jy2 = jy.redSqr();\n var c4 = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a3.redMul(jz4));\n var jxd4 = jx.redAdd(jx);\n jxd4 = jxd4.redIAdd(jxd4);\n var t1 = jxd4.redMul(jy2);\n var nx = c4.redSqr().redISub(t1.redAdd(t1));\n var t22 = t1.redISub(nx);\n var jyd8 = jy2.redSqr();\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n var ny = c4.redMul(t22).redISub(jyd8);\n var nz = jy.redAdd(jy).redMul(jz);\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype.trpl = function trpl() {\n if (!this.curve.zeroA)\n return this.dbl().add(this);\n var xx = this.x.redSqr();\n var yy = this.y.redSqr();\n var zz = this.z.redSqr();\n var yyyy = yy.redSqr();\n var m2 = xx.redAdd(xx).redIAdd(xx);\n var mm = m2.redSqr();\n var e2 = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e2 = e2.redIAdd(e2);\n e2 = e2.redAdd(e2).redIAdd(e2);\n e2 = e2.redISub(mm);\n var ee = e2.redSqr();\n var t3 = yyyy.redIAdd(yyyy);\n t3 = t3.redIAdd(t3);\n t3 = t3.redIAdd(t3);\n t3 = t3.redIAdd(t3);\n var u2 = m2.redIAdd(e2).redSqr().redISub(mm).redISub(ee).redISub(t3);\n var yyu4 = yy.redMul(u2);\n yyu4 = yyu4.redIAdd(yyu4);\n yyu4 = yyu4.redIAdd(yyu4);\n var nx = this.x.redMul(ee).redISub(yyu4);\n nx = nx.redIAdd(nx);\n nx = nx.redIAdd(nx);\n var ny = this.y.redMul(u2.redMul(t3.redISub(u2)).redISub(e2.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n var nz = this.z.redAdd(e2).redSqr().redISub(zz).redISub(ee);\n return this.curve.jpoint(nx, ny, nz);\n };\n JPoint.prototype.mul = function mul(k4, kbase) {\n k4 = new BN(k4, kbase);\n return this.curve._wnafMul(this, k4);\n };\n JPoint.prototype.eq = function eq(p4) {\n if (p4.type === \"affine\")\n return this.eq(p4.toJ());\n if (this === p4)\n return true;\n var z2 = this.z.redSqr();\n var pz2 = p4.z.redSqr();\n if (this.x.redMul(pz2).redISub(p4.x.redMul(z2)).cmpn(0) !== 0)\n return false;\n var z3 = z2.redMul(this.z);\n var pz3 = pz2.redMul(p4.z);\n return this.y.redMul(pz3).redISub(p4.y.redMul(z3)).cmpn(0) === 0;\n };\n JPoint.prototype.eqXToP = function eqXToP(x4) {\n var zs = this.z.redSqr();\n var rx = x4.toRed(this.curve.red).redMul(zs);\n if (this.x.cmp(rx) === 0)\n return true;\n var xc = x4.clone();\n var t3 = this.curve.redN.redMul(zs);\n for (; ; ) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n rx.redIAdd(t3);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n };\n JPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return \"\";\n return \"\";\n };\n JPoint.prototype.isInfinity = function isInfinity() {\n return this.z.cmpn(0) === 0;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/mont.js\n var require_mont = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/mont.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var inherits = require_inherits_browser();\n var Base = require_base();\n var utils = require_utils3();\n function MontCurve(conf) {\n Base.call(this, \"mont\", conf);\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.i4 = new BN(4).toRed(this.red).redInvm();\n this.two = new BN(2).toRed(this.red);\n this.a24 = this.i4.redMul(this.a.redAdd(this.two));\n }\n inherits(MontCurve, Base);\n module.exports = MontCurve;\n MontCurve.prototype.validate = function validate7(point) {\n var x4 = point.normalize().x;\n var x22 = x4.redSqr();\n var rhs = x22.redMul(x4).redAdd(x22.redMul(this.a)).redAdd(x4);\n var y6 = rhs.redSqrt();\n return y6.redSqr().cmp(rhs) === 0;\n };\n function Point3(curve, x4, z2) {\n Base.BasePoint.call(this, curve, \"projective\");\n if (x4 === null && z2 === null) {\n this.x = this.curve.one;\n this.z = this.curve.zero;\n } else {\n this.x = new BN(x4, 16);\n this.z = new BN(z2, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n }\n }\n inherits(Point3, Base.BasePoint);\n MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n return this.point(utils.toArray(bytes, enc), 1);\n };\n MontCurve.prototype.point = function point(x4, z2) {\n return new Point3(this, x4, z2);\n };\n MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point3.fromJSON(this, obj);\n };\n Point3.prototype.precompute = function precompute() {\n };\n Point3.prototype._encode = function _encode() {\n return this.getX().toArray(\"be\", this.curve.p.byteLength());\n };\n Point3.fromJSON = function fromJSON(curve, obj) {\n return new Point3(curve, obj[0], obj[1] || curve.one);\n };\n Point3.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return \"\";\n return \"\";\n };\n Point3.prototype.isInfinity = function isInfinity() {\n return this.z.cmpn(0) === 0;\n };\n Point3.prototype.dbl = function dbl() {\n var a3 = this.x.redAdd(this.z);\n var aa = a3.redSqr();\n var b4 = this.x.redSub(this.z);\n var bb = b4.redSqr();\n var c4 = aa.redSub(bb);\n var nx = aa.redMul(bb);\n var nz = c4.redMul(bb.redAdd(this.curve.a24.redMul(c4)));\n return this.curve.point(nx, nz);\n };\n Point3.prototype.add = function add2() {\n throw new Error(\"Not supported on Montgomery curve\");\n };\n Point3.prototype.diffAdd = function diffAdd(p4, diff) {\n var a3 = this.x.redAdd(this.z);\n var b4 = this.x.redSub(this.z);\n var c4 = p4.x.redAdd(p4.z);\n var d5 = p4.x.redSub(p4.z);\n var da = d5.redMul(a3);\n var cb = c4.redMul(b4);\n var nx = diff.z.redMul(da.redAdd(cb).redSqr());\n var nz = diff.x.redMul(da.redISub(cb).redSqr());\n return this.curve.point(nx, nz);\n };\n Point3.prototype.mul = function mul(k4) {\n var t3 = k4.clone();\n var a3 = this;\n var b4 = this.curve.point(null, null);\n var c4 = this;\n for (var bits = []; t3.cmpn(0) !== 0; t3.iushrn(1))\n bits.push(t3.andln(1));\n for (var i3 = bits.length - 1; i3 >= 0; i3--) {\n if (bits[i3] === 0) {\n a3 = a3.diffAdd(b4, c4);\n b4 = b4.dbl();\n } else {\n b4 = a3.diffAdd(b4, c4);\n a3 = a3.dbl();\n }\n }\n return b4;\n };\n Point3.prototype.mulAdd = function mulAdd() {\n throw new Error(\"Not supported on Montgomery curve\");\n };\n Point3.prototype.jumlAdd = function jumlAdd() {\n throw new Error(\"Not supported on Montgomery curve\");\n };\n Point3.prototype.eq = function eq(other) {\n return this.getX().cmp(other.getX()) === 0;\n };\n Point3.prototype.normalize = function normalize2() {\n this.x = this.x.redMul(this.z.redInvm());\n this.z = this.curve.one;\n return this;\n };\n Point3.prototype.getX = function getX() {\n this.normalize();\n return this.x.fromRed();\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/edwards.js\n var require_edwards = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/edwards.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils3();\n var BN = require_bn2();\n var inherits = require_inherits_browser();\n var Base = require_base();\n var assert9 = utils.assert;\n function EdwardsCurve(conf) {\n this.twisted = (conf.a | 0) !== 1;\n this.mOneA = this.twisted && (conf.a | 0) === -1;\n this.extended = this.mOneA;\n Base.call(this, \"edwards\", conf);\n this.a = new BN(conf.a, 16).umod(this.red.m);\n this.a = this.a.toRed(this.red);\n this.c = new BN(conf.c, 16).toRed(this.red);\n this.c2 = this.c.redSqr();\n this.d = new BN(conf.d, 16).toRed(this.red);\n this.dd = this.d.redAdd(this.d);\n assert9(!this.twisted || this.c.fromRed().cmpn(1) === 0);\n this.oneC = (conf.c | 0) === 1;\n }\n inherits(EdwardsCurve, Base);\n module.exports = EdwardsCurve;\n EdwardsCurve.prototype._mulA = function _mulA(num2) {\n if (this.mOneA)\n return num2.redNeg();\n else\n return this.a.redMul(num2);\n };\n EdwardsCurve.prototype._mulC = function _mulC(num2) {\n if (this.oneC)\n return num2;\n else\n return this.c.redMul(num2);\n };\n EdwardsCurve.prototype.jpoint = function jpoint(x4, y6, z2, t3) {\n return this.point(x4, y6, z2, t3);\n };\n EdwardsCurve.prototype.pointFromX = function pointFromX(x4, odd) {\n x4 = new BN(x4, 16);\n if (!x4.red)\n x4 = x4.toRed(this.red);\n var x22 = x4.redSqr();\n var rhs = this.c2.redSub(this.a.redMul(x22));\n var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x22));\n var y22 = rhs.redMul(lhs.redInvm());\n var y6 = y22.redSqrt();\n if (y6.redSqr().redSub(y22).cmp(this.zero) !== 0)\n throw new Error(\"invalid point\");\n var isOdd = y6.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y6 = y6.redNeg();\n return this.point(x4, y6);\n };\n EdwardsCurve.prototype.pointFromY = function pointFromY(y6, odd) {\n y6 = new BN(y6, 16);\n if (!y6.red)\n y6 = y6.toRed(this.red);\n var y22 = y6.redSqr();\n var lhs = y22.redSub(this.c2);\n var rhs = y22.redMul(this.d).redMul(this.c2).redSub(this.a);\n var x22 = lhs.redMul(rhs.redInvm());\n if (x22.cmp(this.zero) === 0) {\n if (odd)\n throw new Error(\"invalid point\");\n else\n return this.point(this.zero, y6);\n }\n var x4 = x22.redSqrt();\n if (x4.redSqr().redSub(x22).cmp(this.zero) !== 0)\n throw new Error(\"invalid point\");\n if (x4.fromRed().isOdd() !== odd)\n x4 = x4.redNeg();\n return this.point(x4, y6);\n };\n EdwardsCurve.prototype.validate = function validate7(point) {\n if (point.isInfinity())\n return true;\n point.normalize();\n var x22 = point.x.redSqr();\n var y22 = point.y.redSqr();\n var lhs = x22.redMul(this.a).redAdd(y22);\n var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x22).redMul(y22)));\n return lhs.cmp(rhs) === 0;\n };\n function Point3(curve, x4, y6, z2, t3) {\n Base.BasePoint.call(this, curve, \"projective\");\n if (x4 === null && y6 === null && z2 === null) {\n this.x = this.curve.zero;\n this.y = this.curve.one;\n this.z = this.curve.one;\n this.t = this.curve.zero;\n this.zOne = true;\n } else {\n this.x = new BN(x4, 16);\n this.y = new BN(y6, 16);\n this.z = z2 ? new BN(z2, 16) : this.curve.one;\n this.t = t3 && new BN(t3, 16);\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n if (this.t && !this.t.red)\n this.t = this.t.toRed(this.curve.red);\n this.zOne = this.z === this.curve.one;\n if (this.curve.extended && !this.t) {\n this.t = this.x.redMul(this.y);\n if (!this.zOne)\n this.t = this.t.redMul(this.z.redInvm());\n }\n }\n }\n inherits(Point3, Base.BasePoint);\n EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) {\n return Point3.fromJSON(this, obj);\n };\n EdwardsCurve.prototype.point = function point(x4, y6, z2, t3) {\n return new Point3(this, x4, y6, z2, t3);\n };\n Point3.fromJSON = function fromJSON(curve, obj) {\n return new Point3(curve, obj[0], obj[1], obj[2]);\n };\n Point3.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return \"\";\n return \"\";\n };\n Point3.prototype.isInfinity = function isInfinity() {\n return this.x.cmpn(0) === 0 && (this.y.cmp(this.z) === 0 || this.zOne && this.y.cmp(this.curve.c) === 0);\n };\n Point3.prototype._extDbl = function _extDbl() {\n var a3 = this.x.redSqr();\n var b4 = this.y.redSqr();\n var c4 = this.z.redSqr();\n c4 = c4.redIAdd(c4);\n var d5 = this.curve._mulA(a3);\n var e2 = this.x.redAdd(this.y).redSqr().redISub(a3).redISub(b4);\n var g4 = d5.redAdd(b4);\n var f7 = g4.redSub(c4);\n var h4 = d5.redSub(b4);\n var nx = e2.redMul(f7);\n var ny = g4.redMul(h4);\n var nt = e2.redMul(h4);\n var nz = f7.redMul(g4);\n return this.curve.point(nx, ny, nz, nt);\n };\n Point3.prototype._projDbl = function _projDbl() {\n var b4 = this.x.redAdd(this.y).redSqr();\n var c4 = this.x.redSqr();\n var d5 = this.y.redSqr();\n var nx;\n var ny;\n var nz;\n var e2;\n var h4;\n var j2;\n if (this.curve.twisted) {\n e2 = this.curve._mulA(c4);\n var f7 = e2.redAdd(d5);\n if (this.zOne) {\n nx = b4.redSub(c4).redSub(d5).redMul(f7.redSub(this.curve.two));\n ny = f7.redMul(e2.redSub(d5));\n nz = f7.redSqr().redSub(f7).redSub(f7);\n } else {\n h4 = this.z.redSqr();\n j2 = f7.redSub(h4).redISub(h4);\n nx = b4.redSub(c4).redISub(d5).redMul(j2);\n ny = f7.redMul(e2.redSub(d5));\n nz = f7.redMul(j2);\n }\n } else {\n e2 = c4.redAdd(d5);\n h4 = this.curve._mulC(this.z).redSqr();\n j2 = e2.redSub(h4).redSub(h4);\n nx = this.curve._mulC(b4.redISub(e2)).redMul(j2);\n ny = this.curve._mulC(e2).redMul(c4.redISub(d5));\n nz = e2.redMul(j2);\n }\n return this.curve.point(nx, ny, nz);\n };\n Point3.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n if (this.curve.extended)\n return this._extDbl();\n else\n return this._projDbl();\n };\n Point3.prototype._extAdd = function _extAdd(p4) {\n var a3 = this.y.redSub(this.x).redMul(p4.y.redSub(p4.x));\n var b4 = this.y.redAdd(this.x).redMul(p4.y.redAdd(p4.x));\n var c4 = this.t.redMul(this.curve.dd).redMul(p4.t);\n var d5 = this.z.redMul(p4.z.redAdd(p4.z));\n var e2 = b4.redSub(a3);\n var f7 = d5.redSub(c4);\n var g4 = d5.redAdd(c4);\n var h4 = b4.redAdd(a3);\n var nx = e2.redMul(f7);\n var ny = g4.redMul(h4);\n var nt = e2.redMul(h4);\n var nz = f7.redMul(g4);\n return this.curve.point(nx, ny, nz, nt);\n };\n Point3.prototype._projAdd = function _projAdd(p4) {\n var a3 = this.z.redMul(p4.z);\n var b4 = a3.redSqr();\n var c4 = this.x.redMul(p4.x);\n var d5 = this.y.redMul(p4.y);\n var e2 = this.curve.d.redMul(c4).redMul(d5);\n var f7 = b4.redSub(e2);\n var g4 = b4.redAdd(e2);\n var tmp = this.x.redAdd(this.y).redMul(p4.x.redAdd(p4.y)).redISub(c4).redISub(d5);\n var nx = a3.redMul(f7).redMul(tmp);\n var ny;\n var nz;\n if (this.curve.twisted) {\n ny = a3.redMul(g4).redMul(d5.redSub(this.curve._mulA(c4)));\n nz = f7.redMul(g4);\n } else {\n ny = a3.redMul(g4).redMul(d5.redSub(c4));\n nz = this.curve._mulC(f7).redMul(g4);\n }\n return this.curve.point(nx, ny, nz);\n };\n Point3.prototype.add = function add2(p4) {\n if (this.isInfinity())\n return p4;\n if (p4.isInfinity())\n return this;\n if (this.curve.extended)\n return this._extAdd(p4);\n else\n return this._projAdd(p4);\n };\n Point3.prototype.mul = function mul(k4) {\n if (this._hasDoubles(k4))\n return this.curve._fixedNafMul(this, k4);\n else\n return this.curve._wnafMul(this, k4);\n };\n Point3.prototype.mulAdd = function mulAdd(k1, p4, k22) {\n return this.curve._wnafMulAdd(1, [this, p4], [k1, k22], 2, false);\n };\n Point3.prototype.jmulAdd = function jmulAdd(k1, p4, k22) {\n return this.curve._wnafMulAdd(1, [this, p4], [k1, k22], 2, true);\n };\n Point3.prototype.normalize = function normalize2() {\n if (this.zOne)\n return this;\n var zi = this.z.redInvm();\n this.x = this.x.redMul(zi);\n this.y = this.y.redMul(zi);\n if (this.t)\n this.t = this.t.redMul(zi);\n this.z = this.curve.one;\n this.zOne = true;\n return this;\n };\n Point3.prototype.neg = function neg() {\n return this.curve.point(\n this.x.redNeg(),\n this.y,\n this.z,\n this.t && this.t.redNeg()\n );\n };\n Point3.prototype.getX = function getX() {\n this.normalize();\n return this.x.fromRed();\n };\n Point3.prototype.getY = function getY() {\n this.normalize();\n return this.y.fromRed();\n };\n Point3.prototype.eq = function eq(other) {\n return this === other || this.getX().cmp(other.getX()) === 0 && this.getY().cmp(other.getY()) === 0;\n };\n Point3.prototype.eqXToP = function eqXToP(x4) {\n var rx = x4.toRed(this.curve.red).redMul(this.z);\n if (this.x.cmp(rx) === 0)\n return true;\n var xc = x4.clone();\n var t3 = this.curve.redN.redMul(this.z);\n for (; ; ) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n rx.redIAdd(t3);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n };\n Point3.prototype.toP = Point3.prototype.normalize;\n Point3.prototype.mixedAdd = Point3.prototype.add;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/index.js\n var require_curve = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curve/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var curve = exports3;\n curve.base = require_base();\n curve.short = require_short();\n curve.mont = require_mont();\n curve.edwards = require_edwards();\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/utils.js\n var require_utils4 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var assert9 = require_minimalistic_assert();\n var inherits = require_inherits_browser();\n exports3.inherits = inherits;\n function isSurrogatePair(msg, i3) {\n if ((msg.charCodeAt(i3) & 64512) !== 55296) {\n return false;\n }\n if (i3 < 0 || i3 + 1 >= msg.length) {\n return false;\n }\n return (msg.charCodeAt(i3 + 1) & 64512) === 56320;\n }\n function toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg === \"string\") {\n if (!enc) {\n var p4 = 0;\n for (var i3 = 0; i3 < msg.length; i3++) {\n var c4 = msg.charCodeAt(i3);\n if (c4 < 128) {\n res[p4++] = c4;\n } else if (c4 < 2048) {\n res[p4++] = c4 >> 6 | 192;\n res[p4++] = c4 & 63 | 128;\n } else if (isSurrogatePair(msg, i3)) {\n c4 = 65536 + ((c4 & 1023) << 10) + (msg.charCodeAt(++i3) & 1023);\n res[p4++] = c4 >> 18 | 240;\n res[p4++] = c4 >> 12 & 63 | 128;\n res[p4++] = c4 >> 6 & 63 | 128;\n res[p4++] = c4 & 63 | 128;\n } else {\n res[p4++] = c4 >> 12 | 224;\n res[p4++] = c4 >> 6 & 63 | 128;\n res[p4++] = c4 & 63 | 128;\n }\n }\n } else if (enc === \"hex\") {\n msg = msg.replace(/[^a-z0-9]+/ig, \"\");\n if (msg.length % 2 !== 0)\n msg = \"0\" + msg;\n for (i3 = 0; i3 < msg.length; i3 += 2)\n res.push(parseInt(msg[i3] + msg[i3 + 1], 16));\n }\n } else {\n for (i3 = 0; i3 < msg.length; i3++)\n res[i3] = msg[i3] | 0;\n }\n return res;\n }\n exports3.toArray = toArray;\n function toHex3(msg) {\n var res = \"\";\n for (var i3 = 0; i3 < msg.length; i3++)\n res += zero2(msg[i3].toString(16));\n return res;\n }\n exports3.toHex = toHex3;\n function htonl(w3) {\n var res = w3 >>> 24 | w3 >>> 8 & 65280 | w3 << 8 & 16711680 | (w3 & 255) << 24;\n return res >>> 0;\n }\n exports3.htonl = htonl;\n function toHex32(msg, endian) {\n var res = \"\";\n for (var i3 = 0; i3 < msg.length; i3++) {\n var w3 = msg[i3];\n if (endian === \"little\")\n w3 = htonl(w3);\n res += zero8(w3.toString(16));\n }\n return res;\n }\n exports3.toHex32 = toHex32;\n function zero2(word) {\n if (word.length === 1)\n return \"0\" + word;\n else\n return word;\n }\n exports3.zero2 = zero2;\n function zero8(word) {\n if (word.length === 7)\n return \"0\" + word;\n else if (word.length === 6)\n return \"00\" + word;\n else if (word.length === 5)\n return \"000\" + word;\n else if (word.length === 4)\n return \"0000\" + word;\n else if (word.length === 3)\n return \"00000\" + word;\n else if (word.length === 2)\n return \"000000\" + word;\n else if (word.length === 1)\n return \"0000000\" + word;\n else\n return word;\n }\n exports3.zero8 = zero8;\n function join32(msg, start, end, endian) {\n var len = end - start;\n assert9(len % 4 === 0);\n var res = new Array(len / 4);\n for (var i3 = 0, k4 = start; i3 < res.length; i3++, k4 += 4) {\n var w3;\n if (endian === \"big\")\n w3 = msg[k4] << 24 | msg[k4 + 1] << 16 | msg[k4 + 2] << 8 | msg[k4 + 3];\n else\n w3 = msg[k4 + 3] << 24 | msg[k4 + 2] << 16 | msg[k4 + 1] << 8 | msg[k4];\n res[i3] = w3 >>> 0;\n }\n return res;\n }\n exports3.join32 = join32;\n function split32(msg, endian) {\n var res = new Array(msg.length * 4);\n for (var i3 = 0, k4 = 0; i3 < msg.length; i3++, k4 += 4) {\n var m2 = msg[i3];\n if (endian === \"big\") {\n res[k4] = m2 >>> 24;\n res[k4 + 1] = m2 >>> 16 & 255;\n res[k4 + 2] = m2 >>> 8 & 255;\n res[k4 + 3] = m2 & 255;\n } else {\n res[k4 + 3] = m2 >>> 24;\n res[k4 + 2] = m2 >>> 16 & 255;\n res[k4 + 1] = m2 >>> 8 & 255;\n res[k4] = m2 & 255;\n }\n }\n return res;\n }\n exports3.split32 = split32;\n function rotr32(w3, b4) {\n return w3 >>> b4 | w3 << 32 - b4;\n }\n exports3.rotr32 = rotr32;\n function rotl32(w3, b4) {\n return w3 << b4 | w3 >>> 32 - b4;\n }\n exports3.rotl32 = rotl32;\n function sum32(a3, b4) {\n return a3 + b4 >>> 0;\n }\n exports3.sum32 = sum32;\n function sum32_3(a3, b4, c4) {\n return a3 + b4 + c4 >>> 0;\n }\n exports3.sum32_3 = sum32_3;\n function sum32_4(a3, b4, c4, d5) {\n return a3 + b4 + c4 + d5 >>> 0;\n }\n exports3.sum32_4 = sum32_4;\n function sum32_5(a3, b4, c4, d5, e2) {\n return a3 + b4 + c4 + d5 + e2 >>> 0;\n }\n exports3.sum32_5 = sum32_5;\n function sum64(buf, pos, ah, al) {\n var bh = buf[pos];\n var bl = buf[pos + 1];\n var lo = al + bl >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n buf[pos] = hi >>> 0;\n buf[pos + 1] = lo;\n }\n exports3.sum64 = sum64;\n function sum64_hi(ah, al, bh, bl) {\n var lo = al + bl >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n return hi >>> 0;\n }\n exports3.sum64_hi = sum64_hi;\n function sum64_lo(ah, al, bh, bl) {\n var lo = al + bl;\n return lo >>> 0;\n }\n exports3.sum64_lo = sum64_lo;\n function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {\n var carry = 0;\n var lo = al;\n lo = lo + bl >>> 0;\n carry += lo < al ? 1 : 0;\n lo = lo + cl >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = lo + dl >>> 0;\n carry += lo < dl ? 1 : 0;\n var hi = ah + bh + ch + dh + carry;\n return hi >>> 0;\n }\n exports3.sum64_4_hi = sum64_4_hi;\n function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {\n var lo = al + bl + cl + dl;\n return lo >>> 0;\n }\n exports3.sum64_4_lo = sum64_4_lo;\n function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var carry = 0;\n var lo = al;\n lo = lo + bl >>> 0;\n carry += lo < al ? 1 : 0;\n lo = lo + cl >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = lo + dl >>> 0;\n carry += lo < dl ? 1 : 0;\n lo = lo + el >>> 0;\n carry += lo < el ? 1 : 0;\n var hi = ah + bh + ch + dh + eh + carry;\n return hi >>> 0;\n }\n exports3.sum64_5_hi = sum64_5_hi;\n function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var lo = al + bl + cl + dl + el;\n return lo >>> 0;\n }\n exports3.sum64_5_lo = sum64_5_lo;\n function rotr64_hi(ah, al, num2) {\n var r2 = al << 32 - num2 | ah >>> num2;\n return r2 >>> 0;\n }\n exports3.rotr64_hi = rotr64_hi;\n function rotr64_lo(ah, al, num2) {\n var r2 = ah << 32 - num2 | al >>> num2;\n return r2 >>> 0;\n }\n exports3.rotr64_lo = rotr64_lo;\n function shr64_hi(ah, al, num2) {\n return ah >>> num2;\n }\n exports3.shr64_hi = shr64_hi;\n function shr64_lo(ah, al, num2) {\n var r2 = ah << 32 - num2 | al >>> num2;\n return r2 >>> 0;\n }\n exports3.shr64_lo = shr64_lo;\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/common.js\n var require_common = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/common.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var assert9 = require_minimalistic_assert();\n function BlockHash() {\n this.pending = null;\n this.pendingTotal = 0;\n this.blockSize = this.constructor.blockSize;\n this.outSize = this.constructor.outSize;\n this.hmacStrength = this.constructor.hmacStrength;\n this.padLength = this.constructor.padLength / 8;\n this.endian = \"big\";\n this._delta8 = this.blockSize / 8;\n this._delta32 = this.blockSize / 32;\n }\n exports3.BlockHash = BlockHash;\n BlockHash.prototype.update = function update(msg, enc) {\n msg = utils.toArray(msg, enc);\n if (!this.pending)\n this.pending = msg;\n else\n this.pending = this.pending.concat(msg);\n this.pendingTotal += msg.length;\n if (this.pending.length >= this._delta8) {\n msg = this.pending;\n var r2 = msg.length % this._delta8;\n this.pending = msg.slice(msg.length - r2, msg.length);\n if (this.pending.length === 0)\n this.pending = null;\n msg = utils.join32(msg, 0, msg.length - r2, this.endian);\n for (var i3 = 0; i3 < msg.length; i3 += this._delta32)\n this._update(msg, i3, i3 + this._delta32);\n }\n return this;\n };\n BlockHash.prototype.digest = function digest2(enc) {\n this.update(this._pad());\n assert9(this.pending === null);\n return this._digest(enc);\n };\n BlockHash.prototype._pad = function pad6() {\n var len = this.pendingTotal;\n var bytes = this._delta8;\n var k4 = bytes - (len + this.padLength) % bytes;\n var res = new Array(k4 + this.padLength);\n res[0] = 128;\n for (var i3 = 1; i3 < k4; i3++)\n res[i3] = 0;\n len <<= 3;\n if (this.endian === \"big\") {\n for (var t3 = 8; t3 < this.padLength; t3++)\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = len >>> 24 & 255;\n res[i3++] = len >>> 16 & 255;\n res[i3++] = len >>> 8 & 255;\n res[i3++] = len & 255;\n } else {\n res[i3++] = len & 255;\n res[i3++] = len >>> 8 & 255;\n res[i3++] = len >>> 16 & 255;\n res[i3++] = len >>> 24 & 255;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n res[i3++] = 0;\n for (t3 = 8; t3 < this.padLength; t3++)\n res[i3++] = 0;\n }\n return res;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/common.js\n var require_common2 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/common.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var rotr32 = utils.rotr32;\n function ft_1(s4, x4, y6, z2) {\n if (s4 === 0)\n return ch32(x4, y6, z2);\n if (s4 === 1 || s4 === 3)\n return p32(x4, y6, z2);\n if (s4 === 2)\n return maj32(x4, y6, z2);\n }\n exports3.ft_1 = ft_1;\n function ch32(x4, y6, z2) {\n return x4 & y6 ^ ~x4 & z2;\n }\n exports3.ch32 = ch32;\n function maj32(x4, y6, z2) {\n return x4 & y6 ^ x4 & z2 ^ y6 & z2;\n }\n exports3.maj32 = maj32;\n function p32(x4, y6, z2) {\n return x4 ^ y6 ^ z2;\n }\n exports3.p32 = p32;\n function s0_256(x4) {\n return rotr32(x4, 2) ^ rotr32(x4, 13) ^ rotr32(x4, 22);\n }\n exports3.s0_256 = s0_256;\n function s1_256(x4) {\n return rotr32(x4, 6) ^ rotr32(x4, 11) ^ rotr32(x4, 25);\n }\n exports3.s1_256 = s1_256;\n function g0_256(x4) {\n return rotr32(x4, 7) ^ rotr32(x4, 18) ^ x4 >>> 3;\n }\n exports3.g0_256 = g0_256;\n function g1_256(x4) {\n return rotr32(x4, 17) ^ rotr32(x4, 19) ^ x4 >>> 10;\n }\n exports3.g1_256 = g1_256;\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/1.js\n var require__ = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/1.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var common = require_common();\n var shaCommon = require_common2();\n var rotl32 = utils.rotl32;\n var sum32 = utils.sum32;\n var sum32_5 = utils.sum32_5;\n var ft_1 = shaCommon.ft_1;\n var BlockHash = common.BlockHash;\n var sha1_K = [\n 1518500249,\n 1859775393,\n 2400959708,\n 3395469782\n ];\n function SHA1() {\n if (!(this instanceof SHA1))\n return new SHA1();\n BlockHash.call(this);\n this.h = [\n 1732584193,\n 4023233417,\n 2562383102,\n 271733878,\n 3285377520\n ];\n this.W = new Array(80);\n }\n utils.inherits(SHA1, BlockHash);\n module.exports = SHA1;\n SHA1.blockSize = 512;\n SHA1.outSize = 160;\n SHA1.hmacStrength = 80;\n SHA1.padLength = 64;\n SHA1.prototype._update = function _update(msg, start) {\n var W = this.W;\n for (var i3 = 0; i3 < 16; i3++)\n W[i3] = msg[start + i3];\n for (; i3 < W.length; i3++)\n W[i3] = rotl32(W[i3 - 3] ^ W[i3 - 8] ^ W[i3 - 14] ^ W[i3 - 16], 1);\n var a3 = this.h[0];\n var b4 = this.h[1];\n var c4 = this.h[2];\n var d5 = this.h[3];\n var e2 = this.h[4];\n for (i3 = 0; i3 < W.length; i3++) {\n var s4 = ~~(i3 / 20);\n var t3 = sum32_5(rotl32(a3, 5), ft_1(s4, b4, c4, d5), e2, W[i3], sha1_K[s4]);\n e2 = d5;\n d5 = c4;\n c4 = rotl32(b4, 30);\n b4 = a3;\n a3 = t3;\n }\n this.h[0] = sum32(this.h[0], a3);\n this.h[1] = sum32(this.h[1], b4);\n this.h[2] = sum32(this.h[2], c4);\n this.h[3] = sum32(this.h[3], d5);\n this.h[4] = sum32(this.h[4], e2);\n };\n SHA1.prototype._digest = function digest2(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h, \"big\");\n else\n return utils.split32(this.h, \"big\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/256.js\n var require__2 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/256.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var common = require_common();\n var shaCommon = require_common2();\n var assert9 = require_minimalistic_assert();\n var sum32 = utils.sum32;\n var sum32_4 = utils.sum32_4;\n var sum32_5 = utils.sum32_5;\n var ch32 = shaCommon.ch32;\n var maj32 = shaCommon.maj32;\n var s0_256 = shaCommon.s0_256;\n var s1_256 = shaCommon.s1_256;\n var g0_256 = shaCommon.g0_256;\n var g1_256 = shaCommon.g1_256;\n var BlockHash = common.BlockHash;\n var sha256_K = [\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ];\n function SHA2562() {\n if (!(this instanceof SHA2562))\n return new SHA2562();\n BlockHash.call(this);\n this.h = [\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ];\n this.k = sha256_K;\n this.W = new Array(64);\n }\n utils.inherits(SHA2562, BlockHash);\n module.exports = SHA2562;\n SHA2562.blockSize = 512;\n SHA2562.outSize = 256;\n SHA2562.hmacStrength = 192;\n SHA2562.padLength = 64;\n SHA2562.prototype._update = function _update(msg, start) {\n var W = this.W;\n for (var i3 = 0; i3 < 16; i3++)\n W[i3] = msg[start + i3];\n for (; i3 < W.length; i3++)\n W[i3] = sum32_4(g1_256(W[i3 - 2]), W[i3 - 7], g0_256(W[i3 - 15]), W[i3 - 16]);\n var a3 = this.h[0];\n var b4 = this.h[1];\n var c4 = this.h[2];\n var d5 = this.h[3];\n var e2 = this.h[4];\n var f7 = this.h[5];\n var g4 = this.h[6];\n var h4 = this.h[7];\n assert9(this.k.length === W.length);\n for (i3 = 0; i3 < W.length; i3++) {\n var T1 = sum32_5(h4, s1_256(e2), ch32(e2, f7, g4), this.k[i3], W[i3]);\n var T22 = sum32(s0_256(a3), maj32(a3, b4, c4));\n h4 = g4;\n g4 = f7;\n f7 = e2;\n e2 = sum32(d5, T1);\n d5 = c4;\n c4 = b4;\n b4 = a3;\n a3 = sum32(T1, T22);\n }\n this.h[0] = sum32(this.h[0], a3);\n this.h[1] = sum32(this.h[1], b4);\n this.h[2] = sum32(this.h[2], c4);\n this.h[3] = sum32(this.h[3], d5);\n this.h[4] = sum32(this.h[4], e2);\n this.h[5] = sum32(this.h[5], f7);\n this.h[6] = sum32(this.h[6], g4);\n this.h[7] = sum32(this.h[7], h4);\n };\n SHA2562.prototype._digest = function digest2(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h, \"big\");\n else\n return utils.split32(this.h, \"big\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/224.js\n var require__3 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/224.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var SHA2562 = require__2();\n function SHA2242() {\n if (!(this instanceof SHA2242))\n return new SHA2242();\n SHA2562.call(this);\n this.h = [\n 3238371032,\n 914150663,\n 812702999,\n 4144912697,\n 4290775857,\n 1750603025,\n 1694076839,\n 3204075428\n ];\n }\n utils.inherits(SHA2242, SHA2562);\n module.exports = SHA2242;\n SHA2242.blockSize = 512;\n SHA2242.outSize = 224;\n SHA2242.hmacStrength = 192;\n SHA2242.padLength = 64;\n SHA2242.prototype._digest = function digest2(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h.slice(0, 7), \"big\");\n else\n return utils.split32(this.h.slice(0, 7), \"big\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/512.js\n var require__4 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/512.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var common = require_common();\n var assert9 = require_minimalistic_assert();\n var rotr64_hi = utils.rotr64_hi;\n var rotr64_lo = utils.rotr64_lo;\n var shr64_hi = utils.shr64_hi;\n var shr64_lo = utils.shr64_lo;\n var sum64 = utils.sum64;\n var sum64_hi = utils.sum64_hi;\n var sum64_lo = utils.sum64_lo;\n var sum64_4_hi = utils.sum64_4_hi;\n var sum64_4_lo = utils.sum64_4_lo;\n var sum64_5_hi = utils.sum64_5_hi;\n var sum64_5_lo = utils.sum64_5_lo;\n var BlockHash = common.BlockHash;\n var sha512_K = [\n 1116352408,\n 3609767458,\n 1899447441,\n 602891725,\n 3049323471,\n 3964484399,\n 3921009573,\n 2173295548,\n 961987163,\n 4081628472,\n 1508970993,\n 3053834265,\n 2453635748,\n 2937671579,\n 2870763221,\n 3664609560,\n 3624381080,\n 2734883394,\n 310598401,\n 1164996542,\n 607225278,\n 1323610764,\n 1426881987,\n 3590304994,\n 1925078388,\n 4068182383,\n 2162078206,\n 991336113,\n 2614888103,\n 633803317,\n 3248222580,\n 3479774868,\n 3835390401,\n 2666613458,\n 4022224774,\n 944711139,\n 264347078,\n 2341262773,\n 604807628,\n 2007800933,\n 770255983,\n 1495990901,\n 1249150122,\n 1856431235,\n 1555081692,\n 3175218132,\n 1996064986,\n 2198950837,\n 2554220882,\n 3999719339,\n 2821834349,\n 766784016,\n 2952996808,\n 2566594879,\n 3210313671,\n 3203337956,\n 3336571891,\n 1034457026,\n 3584528711,\n 2466948901,\n 113926993,\n 3758326383,\n 338241895,\n 168717936,\n 666307205,\n 1188179964,\n 773529912,\n 1546045734,\n 1294757372,\n 1522805485,\n 1396182291,\n 2643833823,\n 1695183700,\n 2343527390,\n 1986661051,\n 1014477480,\n 2177026350,\n 1206759142,\n 2456956037,\n 344077627,\n 2730485921,\n 1290863460,\n 2820302411,\n 3158454273,\n 3259730800,\n 3505952657,\n 3345764771,\n 106217008,\n 3516065817,\n 3606008344,\n 3600352804,\n 1432725776,\n 4094571909,\n 1467031594,\n 275423344,\n 851169720,\n 430227734,\n 3100823752,\n 506948616,\n 1363258195,\n 659060556,\n 3750685593,\n 883997877,\n 3785050280,\n 958139571,\n 3318307427,\n 1322822218,\n 3812723403,\n 1537002063,\n 2003034995,\n 1747873779,\n 3602036899,\n 1955562222,\n 1575990012,\n 2024104815,\n 1125592928,\n 2227730452,\n 2716904306,\n 2361852424,\n 442776044,\n 2428436474,\n 593698344,\n 2756734187,\n 3733110249,\n 3204031479,\n 2999351573,\n 3329325298,\n 3815920427,\n 3391569614,\n 3928383900,\n 3515267271,\n 566280711,\n 3940187606,\n 3454069534,\n 4118630271,\n 4000239992,\n 116418474,\n 1914138554,\n 174292421,\n 2731055270,\n 289380356,\n 3203993006,\n 460393269,\n 320620315,\n 685471733,\n 587496836,\n 852142971,\n 1086792851,\n 1017036298,\n 365543100,\n 1126000580,\n 2618297676,\n 1288033470,\n 3409855158,\n 1501505948,\n 4234509866,\n 1607167915,\n 987167468,\n 1816402316,\n 1246189591\n ];\n function SHA5122() {\n if (!(this instanceof SHA5122))\n return new SHA5122();\n BlockHash.call(this);\n this.h = [\n 1779033703,\n 4089235720,\n 3144134277,\n 2227873595,\n 1013904242,\n 4271175723,\n 2773480762,\n 1595750129,\n 1359893119,\n 2917565137,\n 2600822924,\n 725511199,\n 528734635,\n 4215389547,\n 1541459225,\n 327033209\n ];\n this.k = sha512_K;\n this.W = new Array(160);\n }\n utils.inherits(SHA5122, BlockHash);\n module.exports = SHA5122;\n SHA5122.blockSize = 1024;\n SHA5122.outSize = 512;\n SHA5122.hmacStrength = 192;\n SHA5122.padLength = 128;\n SHA5122.prototype._prepareBlock = function _prepareBlock(msg, start) {\n var W = this.W;\n for (var i3 = 0; i3 < 32; i3++)\n W[i3] = msg[start + i3];\n for (; i3 < W.length; i3 += 2) {\n var c0_hi = g1_512_hi(W[i3 - 4], W[i3 - 3]);\n var c0_lo = g1_512_lo(W[i3 - 4], W[i3 - 3]);\n var c1_hi = W[i3 - 14];\n var c1_lo = W[i3 - 13];\n var c2_hi = g0_512_hi(W[i3 - 30], W[i3 - 29]);\n var c2_lo = g0_512_lo(W[i3 - 30], W[i3 - 29]);\n var c3_hi = W[i3 - 32];\n var c3_lo = W[i3 - 31];\n W[i3] = sum64_4_hi(\n c0_hi,\n c0_lo,\n c1_hi,\n c1_lo,\n c2_hi,\n c2_lo,\n c3_hi,\n c3_lo\n );\n W[i3 + 1] = sum64_4_lo(\n c0_hi,\n c0_lo,\n c1_hi,\n c1_lo,\n c2_hi,\n c2_lo,\n c3_hi,\n c3_lo\n );\n }\n };\n SHA5122.prototype._update = function _update(msg, start) {\n this._prepareBlock(msg, start);\n var W = this.W;\n var ah = this.h[0];\n var al = this.h[1];\n var bh = this.h[2];\n var bl = this.h[3];\n var ch = this.h[4];\n var cl = this.h[5];\n var dh = this.h[6];\n var dl = this.h[7];\n var eh = this.h[8];\n var el = this.h[9];\n var fh = this.h[10];\n var fl = this.h[11];\n var gh = this.h[12];\n var gl = this.h[13];\n var hh = this.h[14];\n var hl = this.h[15];\n assert9(this.k.length === W.length);\n for (var i3 = 0; i3 < W.length; i3 += 2) {\n var c0_hi = hh;\n var c0_lo = hl;\n var c1_hi = s1_512_hi(eh, el);\n var c1_lo = s1_512_lo(eh, el);\n var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);\n var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);\n var c3_hi = this.k[i3];\n var c3_lo = this.k[i3 + 1];\n var c4_hi = W[i3];\n var c4_lo = W[i3 + 1];\n var T1_hi = sum64_5_hi(\n c0_hi,\n c0_lo,\n c1_hi,\n c1_lo,\n c2_hi,\n c2_lo,\n c3_hi,\n c3_lo,\n c4_hi,\n c4_lo\n );\n var T1_lo = sum64_5_lo(\n c0_hi,\n c0_lo,\n c1_hi,\n c1_lo,\n c2_hi,\n c2_lo,\n c3_hi,\n c3_lo,\n c4_hi,\n c4_lo\n );\n c0_hi = s0_512_hi(ah, al);\n c0_lo = s0_512_lo(ah, al);\n c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);\n c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);\n var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);\n var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);\n hh = gh;\n hl = gl;\n gh = fh;\n gl = fl;\n fh = eh;\n fl = el;\n eh = sum64_hi(dh, dl, T1_hi, T1_lo);\n el = sum64_lo(dl, dl, T1_hi, T1_lo);\n dh = ch;\n dl = cl;\n ch = bh;\n cl = bl;\n bh = ah;\n bl = al;\n ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);\n al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);\n }\n sum64(this.h, 0, ah, al);\n sum64(this.h, 2, bh, bl);\n sum64(this.h, 4, ch, cl);\n sum64(this.h, 6, dh, dl);\n sum64(this.h, 8, eh, el);\n sum64(this.h, 10, fh, fl);\n sum64(this.h, 12, gh, gl);\n sum64(this.h, 14, hh, hl);\n };\n SHA5122.prototype._digest = function digest2(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h, \"big\");\n else\n return utils.split32(this.h, \"big\");\n };\n function ch64_hi(xh, xl, yh, yl, zh) {\n var r2 = xh & yh ^ ~xh & zh;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function ch64_lo(xh, xl, yh, yl, zh, zl) {\n var r2 = xl & yl ^ ~xl & zl;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function maj64_hi(xh, xl, yh, yl, zh) {\n var r2 = xh & yh ^ xh & zh ^ yh & zh;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function maj64_lo(xh, xl, yh, yl, zh, zl) {\n var r2 = xl & yl ^ xl & zl ^ yl & zl;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function s0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 28);\n var c1_hi = rotr64_hi(xl, xh, 2);\n var c2_hi = rotr64_hi(xl, xh, 7);\n var r2 = c0_hi ^ c1_hi ^ c2_hi;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function s0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 28);\n var c1_lo = rotr64_lo(xl, xh, 2);\n var c2_lo = rotr64_lo(xl, xh, 7);\n var r2 = c0_lo ^ c1_lo ^ c2_lo;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function s1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 14);\n var c1_hi = rotr64_hi(xh, xl, 18);\n var c2_hi = rotr64_hi(xl, xh, 9);\n var r2 = c0_hi ^ c1_hi ^ c2_hi;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function s1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 14);\n var c1_lo = rotr64_lo(xh, xl, 18);\n var c2_lo = rotr64_lo(xl, xh, 9);\n var r2 = c0_lo ^ c1_lo ^ c2_lo;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function g0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 1);\n var c1_hi = rotr64_hi(xh, xl, 8);\n var c2_hi = shr64_hi(xh, xl, 7);\n var r2 = c0_hi ^ c1_hi ^ c2_hi;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function g0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 1);\n var c1_lo = rotr64_lo(xh, xl, 8);\n var c2_lo = shr64_lo(xh, xl, 7);\n var r2 = c0_lo ^ c1_lo ^ c2_lo;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function g1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 19);\n var c1_hi = rotr64_hi(xl, xh, 29);\n var c2_hi = shr64_hi(xh, xl, 6);\n var r2 = c0_hi ^ c1_hi ^ c2_hi;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n function g1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 19);\n var c1_lo = rotr64_lo(xl, xh, 29);\n var c2_lo = shr64_lo(xh, xl, 6);\n var r2 = c0_lo ^ c1_lo ^ c2_lo;\n if (r2 < 0)\n r2 += 4294967296;\n return r2;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/384.js\n var require__5 = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/384.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var SHA5122 = require__4();\n function SHA3842() {\n if (!(this instanceof SHA3842))\n return new SHA3842();\n SHA5122.call(this);\n this.h = [\n 3418070365,\n 3238371032,\n 1654270250,\n 914150663,\n 2438529370,\n 812702999,\n 355462360,\n 4144912697,\n 1731405415,\n 4290775857,\n 2394180231,\n 1750603025,\n 3675008525,\n 1694076839,\n 1203062813,\n 3204075428\n ];\n }\n utils.inherits(SHA3842, SHA5122);\n module.exports = SHA3842;\n SHA3842.blockSize = 1024;\n SHA3842.outSize = 384;\n SHA3842.hmacStrength = 192;\n SHA3842.padLength = 128;\n SHA3842.prototype._digest = function digest2(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h.slice(0, 12), \"big\");\n else\n return utils.split32(this.h.slice(0, 12), \"big\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha.js\n var require_sha = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n exports3.sha1 = require__();\n exports3.sha224 = require__3();\n exports3.sha256 = require__2();\n exports3.sha384 = require__5();\n exports3.sha512 = require__4();\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/ripemd.js\n var require_ripemd = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/ripemd.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var common = require_common();\n var rotl32 = utils.rotl32;\n var sum32 = utils.sum32;\n var sum32_3 = utils.sum32_3;\n var sum32_4 = utils.sum32_4;\n var BlockHash = common.BlockHash;\n function RIPEMD1602() {\n if (!(this instanceof RIPEMD1602))\n return new RIPEMD1602();\n BlockHash.call(this);\n this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];\n this.endian = \"little\";\n }\n utils.inherits(RIPEMD1602, BlockHash);\n exports3.ripemd160 = RIPEMD1602;\n RIPEMD1602.blockSize = 512;\n RIPEMD1602.outSize = 160;\n RIPEMD1602.hmacStrength = 192;\n RIPEMD1602.padLength = 64;\n RIPEMD1602.prototype._update = function update(msg, start) {\n var A4 = this.h[0];\n var B2 = this.h[1];\n var C = this.h[2];\n var D2 = this.h[3];\n var E2 = this.h[4];\n var Ah = A4;\n var Bh = B2;\n var Ch = C;\n var Dh = D2;\n var Eh = E2;\n for (var j2 = 0; j2 < 80; j2++) {\n var T4 = sum32(\n rotl32(\n sum32_4(A4, f7(j2, B2, C, D2), msg[r2[j2] + start], K2(j2)),\n s4[j2]\n ),\n E2\n );\n A4 = E2;\n E2 = D2;\n D2 = rotl32(C, 10);\n C = B2;\n B2 = T4;\n T4 = sum32(\n rotl32(\n sum32_4(Ah, f7(79 - j2, Bh, Ch, Dh), msg[rh[j2] + start], Kh(j2)),\n sh[j2]\n ),\n Eh\n );\n Ah = Eh;\n Eh = Dh;\n Dh = rotl32(Ch, 10);\n Ch = Bh;\n Bh = T4;\n }\n T4 = sum32_3(this.h[1], C, Dh);\n this.h[1] = sum32_3(this.h[2], D2, Eh);\n this.h[2] = sum32_3(this.h[3], E2, Ah);\n this.h[3] = sum32_3(this.h[4], A4, Bh);\n this.h[4] = sum32_3(this.h[0], B2, Ch);\n this.h[0] = T4;\n };\n RIPEMD1602.prototype._digest = function digest2(enc) {\n if (enc === \"hex\")\n return utils.toHex32(this.h, \"little\");\n else\n return utils.split32(this.h, \"little\");\n };\n function f7(j2, x4, y6, z2) {\n if (j2 <= 15)\n return x4 ^ y6 ^ z2;\n else if (j2 <= 31)\n return x4 & y6 | ~x4 & z2;\n else if (j2 <= 47)\n return (x4 | ~y6) ^ z2;\n else if (j2 <= 63)\n return x4 & z2 | y6 & ~z2;\n else\n return x4 ^ (y6 | ~z2);\n }\n function K2(j2) {\n if (j2 <= 15)\n return 0;\n else if (j2 <= 31)\n return 1518500249;\n else if (j2 <= 47)\n return 1859775393;\n else if (j2 <= 63)\n return 2400959708;\n else\n return 2840853838;\n }\n function Kh(j2) {\n if (j2 <= 15)\n return 1352829926;\n else if (j2 <= 31)\n return 1548603684;\n else if (j2 <= 47)\n return 1836072691;\n else if (j2 <= 63)\n return 2053994217;\n else\n return 0;\n }\n var r2 = [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 11,\n 12,\n 13,\n 14,\n 15,\n 7,\n 4,\n 13,\n 1,\n 10,\n 6,\n 15,\n 3,\n 12,\n 0,\n 9,\n 5,\n 2,\n 14,\n 11,\n 8,\n 3,\n 10,\n 14,\n 4,\n 9,\n 15,\n 8,\n 1,\n 2,\n 7,\n 0,\n 6,\n 13,\n 11,\n 5,\n 12,\n 1,\n 9,\n 11,\n 10,\n 0,\n 8,\n 12,\n 4,\n 13,\n 3,\n 7,\n 15,\n 14,\n 5,\n 6,\n 2,\n 4,\n 0,\n 5,\n 9,\n 7,\n 12,\n 2,\n 10,\n 14,\n 1,\n 3,\n 8,\n 11,\n 6,\n 15,\n 13\n ];\n var rh = [\n 5,\n 14,\n 7,\n 0,\n 9,\n 2,\n 11,\n 4,\n 13,\n 6,\n 15,\n 8,\n 1,\n 10,\n 3,\n 12,\n 6,\n 11,\n 3,\n 7,\n 0,\n 13,\n 5,\n 10,\n 14,\n 15,\n 8,\n 12,\n 4,\n 9,\n 1,\n 2,\n 15,\n 5,\n 1,\n 3,\n 7,\n 14,\n 6,\n 9,\n 11,\n 8,\n 12,\n 2,\n 10,\n 0,\n 4,\n 13,\n 8,\n 6,\n 4,\n 1,\n 3,\n 11,\n 15,\n 0,\n 5,\n 12,\n 2,\n 13,\n 9,\n 7,\n 10,\n 14,\n 12,\n 15,\n 10,\n 4,\n 1,\n 5,\n 8,\n 7,\n 6,\n 2,\n 13,\n 14,\n 0,\n 3,\n 9,\n 11\n ];\n var s4 = [\n 11,\n 14,\n 15,\n 12,\n 5,\n 8,\n 7,\n 9,\n 11,\n 13,\n 14,\n 15,\n 6,\n 7,\n 9,\n 8,\n 7,\n 6,\n 8,\n 13,\n 11,\n 9,\n 7,\n 15,\n 7,\n 12,\n 15,\n 9,\n 11,\n 7,\n 13,\n 12,\n 11,\n 13,\n 6,\n 7,\n 14,\n 9,\n 13,\n 15,\n 14,\n 8,\n 13,\n 6,\n 5,\n 12,\n 7,\n 5,\n 11,\n 12,\n 14,\n 15,\n 14,\n 15,\n 9,\n 8,\n 9,\n 14,\n 5,\n 6,\n 8,\n 6,\n 5,\n 12,\n 9,\n 15,\n 5,\n 11,\n 6,\n 8,\n 13,\n 12,\n 5,\n 12,\n 13,\n 14,\n 11,\n 8,\n 5,\n 6\n ];\n var sh = [\n 8,\n 9,\n 9,\n 11,\n 13,\n 15,\n 15,\n 5,\n 7,\n 7,\n 8,\n 11,\n 14,\n 14,\n 12,\n 6,\n 9,\n 13,\n 15,\n 7,\n 12,\n 8,\n 9,\n 11,\n 7,\n 7,\n 12,\n 7,\n 6,\n 15,\n 13,\n 11,\n 9,\n 7,\n 15,\n 11,\n 8,\n 6,\n 6,\n 14,\n 12,\n 13,\n 5,\n 14,\n 13,\n 13,\n 7,\n 5,\n 15,\n 5,\n 8,\n 11,\n 14,\n 14,\n 6,\n 14,\n 6,\n 9,\n 12,\n 9,\n 12,\n 5,\n 15,\n 8,\n 8,\n 5,\n 12,\n 9,\n 12,\n 5,\n 14,\n 6,\n 8,\n 13,\n 6,\n 5,\n 15,\n 13,\n 11,\n 11\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/hmac.js\n var require_hmac = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/hmac.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils4();\n var assert9 = require_minimalistic_assert();\n function Hmac(hash3, key, enc) {\n if (!(this instanceof Hmac))\n return new Hmac(hash3, key, enc);\n this.Hash = hash3;\n this.blockSize = hash3.blockSize / 8;\n this.outSize = hash3.outSize / 8;\n this.inner = null;\n this.outer = null;\n this._init(utils.toArray(key, enc));\n }\n module.exports = Hmac;\n Hmac.prototype._init = function init(key) {\n if (key.length > this.blockSize)\n key = new this.Hash().update(key).digest();\n assert9(key.length <= this.blockSize);\n for (var i3 = key.length; i3 < this.blockSize; i3++)\n key.push(0);\n for (i3 = 0; i3 < key.length; i3++)\n key[i3] ^= 54;\n this.inner = new this.Hash().update(key);\n for (i3 = 0; i3 < key.length; i3++)\n key[i3] ^= 106;\n this.outer = new this.Hash().update(key);\n };\n Hmac.prototype.update = function update(msg, enc) {\n this.inner.update(msg, enc);\n return this;\n };\n Hmac.prototype.digest = function digest2(enc) {\n this.outer.update(this.inner.digest());\n return this.outer.digest(enc);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash.js\n var require_hash = __commonJS({\n \"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var hash3 = exports3;\n hash3.utils = require_utils4();\n hash3.common = require_common();\n hash3.sha = require_sha();\n hash3.ripemd = require_ripemd();\n hash3.hmac = require_hmac();\n hash3.sha1 = hash3.sha.sha1;\n hash3.sha256 = hash3.sha.sha256;\n hash3.sha224 = hash3.sha.sha224;\n hash3.sha384 = hash3.sha.sha384;\n hash3.sha512 = hash3.sha.sha512;\n hash3.ripemd160 = hash3.ripemd.ripemd160;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js\n var require_secp256k1 = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n doubles: {\n step: 4,\n points: [\n [\n \"e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a\",\n \"f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821\"\n ],\n [\n \"8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508\",\n \"11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf\"\n ],\n [\n \"175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739\",\n \"d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695\"\n ],\n [\n \"363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640\",\n \"4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9\"\n ],\n [\n \"8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c\",\n \"4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36\"\n ],\n [\n \"723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda\",\n \"96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f\"\n ],\n [\n \"eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa\",\n \"5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999\"\n ],\n [\n \"100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0\",\n \"cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09\"\n ],\n [\n \"e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d\",\n \"9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d\"\n ],\n [\n \"feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d\",\n \"e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088\"\n ],\n [\n \"da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1\",\n \"9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d\"\n ],\n [\n \"53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0\",\n \"5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8\"\n ],\n [\n \"8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047\",\n \"10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a\"\n ],\n [\n \"385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862\",\n \"283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453\"\n ],\n [\n \"6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7\",\n \"7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160\"\n ],\n [\n \"3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd\",\n \"56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0\"\n ],\n [\n \"85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83\",\n \"7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6\"\n ],\n [\n \"948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a\",\n \"53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589\"\n ],\n [\n \"6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8\",\n \"bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17\"\n ],\n [\n \"e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d\",\n \"4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda\"\n ],\n [\n \"e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725\",\n \"7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd\"\n ],\n [\n \"213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754\",\n \"4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2\"\n ],\n [\n \"4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c\",\n \"17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6\"\n ],\n [\n \"fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6\",\n \"6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f\"\n ],\n [\n \"76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39\",\n \"c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01\"\n ],\n [\n \"c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891\",\n \"893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3\"\n ],\n [\n \"d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b\",\n \"febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f\"\n ],\n [\n \"b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03\",\n \"2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7\"\n ],\n [\n \"e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d\",\n \"eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78\"\n ],\n [\n \"a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070\",\n \"7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1\"\n ],\n [\n \"90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4\",\n \"e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150\"\n ],\n [\n \"8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da\",\n \"662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82\"\n ],\n [\n \"e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11\",\n \"1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc\"\n ],\n [\n \"8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e\",\n \"efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b\"\n ],\n [\n \"e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41\",\n \"2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51\"\n ],\n [\n \"b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef\",\n \"67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45\"\n ],\n [\n \"d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8\",\n \"db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120\"\n ],\n [\n \"324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d\",\n \"648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84\"\n ],\n [\n \"4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96\",\n \"35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d\"\n ],\n [\n \"9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd\",\n \"ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d\"\n ],\n [\n \"6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5\",\n \"9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8\"\n ],\n [\n \"a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266\",\n \"40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8\"\n ],\n [\n \"7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71\",\n \"34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac\"\n ],\n [\n \"928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac\",\n \"c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f\"\n ],\n [\n \"85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751\",\n \"1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962\"\n ],\n [\n \"ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e\",\n \"493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907\"\n ],\n [\n \"827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241\",\n \"c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec\"\n ],\n [\n \"eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3\",\n \"be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d\"\n ],\n [\n \"e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f\",\n \"4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414\"\n ],\n [\n \"1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19\",\n \"aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd\"\n ],\n [\n \"146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be\",\n \"b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0\"\n ],\n [\n \"fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9\",\n \"6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811\"\n ],\n [\n \"da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2\",\n \"8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1\"\n ],\n [\n \"a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13\",\n \"7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c\"\n ],\n [\n \"174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c\",\n \"ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73\"\n ],\n [\n \"959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba\",\n \"2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd\"\n ],\n [\n \"d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151\",\n \"e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405\"\n ],\n [\n \"64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073\",\n \"d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589\"\n ],\n [\n \"8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458\",\n \"38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e\"\n ],\n [\n \"13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b\",\n \"69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27\"\n ],\n [\n \"bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366\",\n \"d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1\"\n ],\n [\n \"8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa\",\n \"40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482\"\n ],\n [\n \"8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0\",\n \"620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945\"\n ],\n [\n \"dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787\",\n \"7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573\"\n ],\n [\n \"f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e\",\n \"ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82\"\n ]\n ]\n },\n naf: {\n wnd: 7,\n points: [\n [\n \"f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9\",\n \"388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672\"\n ],\n [\n \"2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4\",\n \"d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6\"\n ],\n [\n \"5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc\",\n \"6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da\"\n ],\n [\n \"acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe\",\n \"cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37\"\n ],\n [\n \"774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb\",\n \"d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b\"\n ],\n [\n \"f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8\",\n \"ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81\"\n ],\n [\n \"d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e\",\n \"581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58\"\n ],\n [\n \"defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34\",\n \"4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77\"\n ],\n [\n \"2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c\",\n \"85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a\"\n ],\n [\n \"352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5\",\n \"321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c\"\n ],\n [\n \"2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f\",\n \"2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67\"\n ],\n [\n \"9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714\",\n \"73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402\"\n ],\n [\n \"daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729\",\n \"a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55\"\n ],\n [\n \"c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db\",\n \"2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482\"\n ],\n [\n \"6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4\",\n \"e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82\"\n ],\n [\n \"1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5\",\n \"b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396\"\n ],\n [\n \"605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479\",\n \"2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49\"\n ],\n [\n \"62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d\",\n \"80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf\"\n ],\n [\n \"80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f\",\n \"1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a\"\n ],\n [\n \"7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb\",\n \"d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7\"\n ],\n [\n \"d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9\",\n \"eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933\"\n ],\n [\n \"49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963\",\n \"758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a\"\n ],\n [\n \"77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74\",\n \"958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6\"\n ],\n [\n \"f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530\",\n \"e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37\"\n ],\n [\n \"463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b\",\n \"5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e\"\n ],\n [\n \"f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247\",\n \"cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6\"\n ],\n [\n \"caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1\",\n \"cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476\"\n ],\n [\n \"2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120\",\n \"4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40\"\n ],\n [\n \"7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435\",\n \"91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61\"\n ],\n [\n \"754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18\",\n \"673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683\"\n ],\n [\n \"e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8\",\n \"59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5\"\n ],\n [\n \"186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb\",\n \"3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b\"\n ],\n [\n \"df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f\",\n \"55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417\"\n ],\n [\n \"5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143\",\n \"efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868\"\n ],\n [\n \"290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba\",\n \"e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a\"\n ],\n [\n \"af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45\",\n \"f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6\"\n ],\n [\n \"766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a\",\n \"744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996\"\n ],\n [\n \"59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e\",\n \"c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e\"\n ],\n [\n \"f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8\",\n \"e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d\"\n ],\n [\n \"7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c\",\n \"30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2\"\n ],\n [\n \"948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519\",\n \"e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e\"\n ],\n [\n \"7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab\",\n \"100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437\"\n ],\n [\n \"3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca\",\n \"ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311\"\n ],\n [\n \"d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf\",\n \"8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4\"\n ],\n [\n \"1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610\",\n \"68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575\"\n ],\n [\n \"733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4\",\n \"f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d\"\n ],\n [\n \"15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c\",\n \"d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d\"\n ],\n [\n \"a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940\",\n \"edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629\"\n ],\n [\n \"e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980\",\n \"a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06\"\n ],\n [\n \"311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3\",\n \"66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374\"\n ],\n [\n \"34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf\",\n \"9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee\"\n ],\n [\n \"f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63\",\n \"4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1\"\n ],\n [\n \"d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448\",\n \"fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b\"\n ],\n [\n \"32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf\",\n \"5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661\"\n ],\n [\n \"7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5\",\n \"8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6\"\n ],\n [\n \"ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6\",\n \"8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e\"\n ],\n [\n \"16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5\",\n \"5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d\"\n ],\n [\n \"eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99\",\n \"f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc\"\n ],\n [\n \"78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51\",\n \"f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4\"\n ],\n [\n \"494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5\",\n \"42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c\"\n ],\n [\n \"a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5\",\n \"204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b\"\n ],\n [\n \"c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997\",\n \"4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913\"\n ],\n [\n \"841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881\",\n \"73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154\"\n ],\n [\n \"5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5\",\n \"39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865\"\n ],\n [\n \"36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66\",\n \"d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc\"\n ],\n [\n \"336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726\",\n \"ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224\"\n ],\n [\n \"8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede\",\n \"6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e\"\n ],\n [\n \"1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94\",\n \"60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6\"\n ],\n [\n \"85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31\",\n \"3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511\"\n ],\n [\n \"29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51\",\n \"b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b\"\n ],\n [\n \"a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252\",\n \"ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2\"\n ],\n [\n \"4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5\",\n \"cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c\"\n ],\n [\n \"d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b\",\n \"6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3\"\n ],\n [\n \"ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4\",\n \"322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d\"\n ],\n [\n \"af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f\",\n \"6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700\"\n ],\n [\n \"e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889\",\n \"2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4\"\n ],\n [\n \"591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246\",\n \"b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196\"\n ],\n [\n \"11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984\",\n \"998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4\"\n ],\n [\n \"3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a\",\n \"b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257\"\n ],\n [\n \"cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030\",\n \"bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13\"\n ],\n [\n \"c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197\",\n \"6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096\"\n ],\n [\n \"c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593\",\n \"c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38\"\n ],\n [\n \"a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef\",\n \"21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f\"\n ],\n [\n \"347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38\",\n \"60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448\"\n ],\n [\n \"da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a\",\n \"49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a\"\n ],\n [\n \"c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111\",\n \"5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4\"\n ],\n [\n \"4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502\",\n \"7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437\"\n ],\n [\n \"3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea\",\n \"be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7\"\n ],\n [\n \"cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26\",\n \"8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d\"\n ],\n [\n \"b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986\",\n \"39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a\"\n ],\n [\n \"d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e\",\n \"62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54\"\n ],\n [\n \"48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4\",\n \"25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77\"\n ],\n [\n \"dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda\",\n \"ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517\"\n ],\n [\n \"6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859\",\n \"cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10\"\n ],\n [\n \"e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f\",\n \"f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125\"\n ],\n [\n \"eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c\",\n \"6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e\"\n ],\n [\n \"13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942\",\n \"fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1\"\n ],\n [\n \"ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a\",\n \"1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2\"\n ],\n [\n \"b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80\",\n \"5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423\"\n ],\n [\n \"ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d\",\n \"438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8\"\n ],\n [\n \"8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1\",\n \"cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758\"\n ],\n [\n \"52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63\",\n \"c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375\"\n ],\n [\n \"e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352\",\n \"6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d\"\n ],\n [\n \"7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193\",\n \"ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec\"\n ],\n [\n \"5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00\",\n \"9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0\"\n ],\n [\n \"32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58\",\n \"ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c\"\n ],\n [\n \"e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7\",\n \"d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4\"\n ],\n [\n \"8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8\",\n \"c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f\"\n ],\n [\n \"4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e\",\n \"67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649\"\n ],\n [\n \"3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d\",\n \"cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826\"\n ],\n [\n \"674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b\",\n \"299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5\"\n ],\n [\n \"d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f\",\n \"f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87\"\n ],\n [\n \"30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6\",\n \"462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b\"\n ],\n [\n \"be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297\",\n \"62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc\"\n ],\n [\n \"93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a\",\n \"7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c\"\n ],\n [\n \"b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c\",\n \"ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f\"\n ],\n [\n \"d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52\",\n \"4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a\"\n ],\n [\n \"d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb\",\n \"bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46\"\n ],\n [\n \"463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065\",\n \"bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f\"\n ],\n [\n \"7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917\",\n \"603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03\"\n ],\n [\n \"74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9\",\n \"cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08\"\n ],\n [\n \"30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3\",\n \"553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8\"\n ],\n [\n \"9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57\",\n \"712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373\"\n ],\n [\n \"176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66\",\n \"ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3\"\n ],\n [\n \"75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8\",\n \"9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8\"\n ],\n [\n \"809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721\",\n \"9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1\"\n ],\n [\n \"1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180\",\n \"4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9\"\n ]\n ]\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curves.js\n var require_curves = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/curves.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var curves = exports3;\n var hash3 = require_hash();\n var curve = require_curve();\n var utils = require_utils3();\n var assert9 = utils.assert;\n function PresetCurve(options) {\n if (options.type === \"short\")\n this.curve = new curve.short(options);\n else if (options.type === \"edwards\")\n this.curve = new curve.edwards(options);\n else\n this.curve = new curve.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n assert9(this.g.validate(), \"Invalid curve\");\n assert9(this.g.mul(this.n).isInfinity(), \"Invalid curve, G*N != O\");\n }\n curves.PresetCurve = PresetCurve;\n function defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function() {\n var curve2 = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve2\n });\n return curve2;\n }\n });\n }\n defineCurve(\"p192\", {\n type: \"short\",\n prime: \"p192\",\n p: \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\",\n a: \"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc\",\n b: \"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1\",\n n: \"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012\",\n \"07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811\"\n ]\n });\n defineCurve(\"p224\", {\n type: \"short\",\n prime: \"p224\",\n p: \"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\",\n a: \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe\",\n b: \"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4\",\n n: \"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21\",\n \"bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34\"\n ]\n });\n defineCurve(\"p256\", {\n type: \"short\",\n prime: null,\n p: \"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff\",\n a: \"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc\",\n b: \"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b\",\n n: \"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296\",\n \"4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5\"\n ]\n });\n defineCurve(\"p384\", {\n type: \"short\",\n prime: null,\n p: \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff\",\n a: \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc\",\n b: \"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef\",\n n: \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973\",\n hash: hash3.sha384,\n gRed: false,\n g: [\n \"aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7\",\n \"3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f\"\n ]\n });\n defineCurve(\"p521\", {\n type: \"short\",\n prime: null,\n p: \"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff\",\n a: \"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc\",\n b: \"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00\",\n n: \"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409\",\n hash: hash3.sha512,\n gRed: false,\n g: [\n \"000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66\",\n \"00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650\"\n ]\n });\n defineCurve(\"curve25519\", {\n type: \"mont\",\n prime: \"p25519\",\n p: \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\",\n a: \"76d06\",\n b: \"1\",\n n: \"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"9\"\n ]\n });\n defineCurve(\"ed25519\", {\n type: \"edwards\",\n prime: \"p25519\",\n p: \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\",\n a: \"-1\",\n c: \"1\",\n // -121665 * (121666^(-1)) (mod P)\n d: \"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3\",\n n: \"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed\",\n hash: hash3.sha256,\n gRed: false,\n g: [\n \"216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a\",\n // 4/5\n \"6666666666666666666666666666666666666666666666666666666666666658\"\n ]\n });\n var pre;\n try {\n pre = require_secp256k1();\n } catch (e2) {\n pre = void 0;\n }\n defineCurve(\"secp256k1\", {\n type: \"short\",\n prime: \"k256\",\n p: \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\",\n a: \"0\",\n b: \"7\",\n n: \"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141\",\n h: \"1\",\n hash: hash3.sha256,\n // Precomputed endomorphism\n beta: \"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\",\n lambda: \"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72\",\n basis: [\n {\n a: \"3086d221a7d46bcde86c90e49284eb15\",\n b: \"-e4437ed6010e88286f547fa90abfe4c3\"\n },\n {\n a: \"114ca50f7a8e2f3f657c1108d9d44cfd8\",\n b: \"3086d221a7d46bcde86c90e49284eb15\"\n }\n ],\n gRed: false,\n g: [\n \"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\",\n \"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\",\n pre\n ]\n });\n }\n });\n\n // ../../../node_modules/.pnpm/hmac-drbg@1.0.1/node_modules/hmac-drbg/lib/hmac-drbg.js\n var require_hmac_drbg = __commonJS({\n \"../../../node_modules/.pnpm/hmac-drbg@1.0.1/node_modules/hmac-drbg/lib/hmac-drbg.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var hash3 = require_hash();\n var utils = require_utils2();\n var assert9 = require_minimalistic_assert();\n function HmacDRBG(options) {\n if (!(this instanceof HmacDRBG))\n return new HmacDRBG(options);\n this.hash = options.hash;\n this.predResist = !!options.predResist;\n this.outLen = this.hash.outSize;\n this.minEntropy = options.minEntropy || this.hash.hmacStrength;\n this._reseed = null;\n this.reseedInterval = null;\n this.K = null;\n this.V = null;\n var entropy = utils.toArray(options.entropy, options.entropyEnc || \"hex\");\n var nonce = utils.toArray(options.nonce, options.nonceEnc || \"hex\");\n var pers = utils.toArray(options.pers, options.persEnc || \"hex\");\n assert9(\n entropy.length >= this.minEntropy / 8,\n \"Not enough entropy. Minimum is: \" + this.minEntropy + \" bits\"\n );\n this._init(entropy, nonce, pers);\n }\n module.exports = HmacDRBG;\n HmacDRBG.prototype._init = function init(entropy, nonce, pers) {\n var seed = entropy.concat(nonce).concat(pers);\n this.K = new Array(this.outLen / 8);\n this.V = new Array(this.outLen / 8);\n for (var i3 = 0; i3 < this.V.length; i3++) {\n this.K[i3] = 0;\n this.V[i3] = 1;\n }\n this._update(seed);\n this._reseed = 1;\n this.reseedInterval = 281474976710656;\n };\n HmacDRBG.prototype._hmac = function hmac2() {\n return new hash3.hmac(this.hash, this.K);\n };\n HmacDRBG.prototype._update = function update(seed) {\n var kmac = this._hmac().update(this.V).update([0]);\n if (seed)\n kmac = kmac.update(seed);\n this.K = kmac.digest();\n this.V = this._hmac().update(this.V).digest();\n if (!seed)\n return;\n this.K = this._hmac().update(this.V).update([1]).update(seed).digest();\n this.V = this._hmac().update(this.V).digest();\n };\n HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add2, addEnc) {\n if (typeof entropyEnc !== \"string\") {\n addEnc = add2;\n add2 = entropyEnc;\n entropyEnc = null;\n }\n entropy = utils.toArray(entropy, entropyEnc);\n add2 = utils.toArray(add2, addEnc);\n assert9(\n entropy.length >= this.minEntropy / 8,\n \"Not enough entropy. Minimum is: \" + this.minEntropy + \" bits\"\n );\n this._update(entropy.concat(add2 || []));\n this._reseed = 1;\n };\n HmacDRBG.prototype.generate = function generate(len, enc, add2, addEnc) {\n if (this._reseed > this.reseedInterval)\n throw new Error(\"Reseed is required\");\n if (typeof enc !== \"string\") {\n addEnc = add2;\n add2 = enc;\n enc = null;\n }\n if (add2) {\n add2 = utils.toArray(add2, addEnc || \"hex\");\n this._update(add2);\n }\n var temp = [];\n while (temp.length < len) {\n this.V = this._hmac().update(this.V).digest();\n temp = temp.concat(this.V);\n }\n var res = temp.slice(0, len);\n this._update(add2);\n this._reseed++;\n return utils.encode(res, enc);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/key.js\n var require_key = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/key.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var utils = require_utils3();\n var assert9 = utils.assert;\n function KeyPair(ec, options) {\n this.ec = ec;\n this.priv = null;\n this.pub = null;\n if (options.priv)\n this._importPrivate(options.priv, options.privEnc);\n if (options.pub)\n this._importPublic(options.pub, options.pubEnc);\n }\n module.exports = KeyPair;\n KeyPair.fromPublic = function fromPublic(ec, pub, enc) {\n if (pub instanceof KeyPair)\n return pub;\n return new KeyPair(ec, {\n pub,\n pubEnc: enc\n });\n };\n KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {\n if (priv instanceof KeyPair)\n return priv;\n return new KeyPair(ec, {\n priv,\n privEnc: enc\n });\n };\n KeyPair.prototype.validate = function validate7() {\n var pub = this.getPublic();\n if (pub.isInfinity())\n return { result: false, reason: \"Invalid public key\" };\n if (!pub.validate())\n return { result: false, reason: \"Public key is not a point\" };\n if (!pub.mul(this.ec.curve.n).isInfinity())\n return { result: false, reason: \"Public key * N != O\" };\n return { result: true, reason: null };\n };\n KeyPair.prototype.getPublic = function getPublic(compact, enc) {\n if (typeof compact === \"string\") {\n enc = compact;\n compact = null;\n }\n if (!this.pub)\n this.pub = this.ec.g.mul(this.priv);\n if (!enc)\n return this.pub;\n return this.pub.encode(enc, compact);\n };\n KeyPair.prototype.getPrivate = function getPrivate(enc) {\n if (enc === \"hex\")\n return this.priv.toString(16, 2);\n else\n return this.priv;\n };\n KeyPair.prototype._importPrivate = function _importPrivate(key, enc) {\n this.priv = new BN(key, enc || 16);\n this.priv = this.priv.umod(this.ec.curve.n);\n };\n KeyPair.prototype._importPublic = function _importPublic(key, enc) {\n if (key.x || key.y) {\n if (this.ec.curve.type === \"mont\") {\n assert9(key.x, \"Need x coordinate\");\n } else if (this.ec.curve.type === \"short\" || this.ec.curve.type === \"edwards\") {\n assert9(key.x && key.y, \"Need both x and y coordinate\");\n }\n this.pub = this.ec.curve.point(key.x, key.y);\n return;\n }\n this.pub = this.ec.curve.decodePoint(key, enc);\n };\n KeyPair.prototype.derive = function derive(pub) {\n if (!pub.validate()) {\n assert9(pub.validate(), \"public point not validated\");\n }\n return pub.mul(this.priv).getX();\n };\n KeyPair.prototype.sign = function sign4(msg, enc, options) {\n return this.ec.sign(msg, this, enc, options);\n };\n KeyPair.prototype.verify = function verify2(msg, signature, options) {\n return this.ec.verify(msg, signature, this, void 0, options);\n };\n KeyPair.prototype.inspect = function inspect() {\n return \"\";\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/signature.js\n var require_signature = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/signature.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var utils = require_utils3();\n var assert9 = utils.assert;\n function Signature(options, enc) {\n if (options instanceof Signature)\n return options;\n if (this._importDER(options, enc))\n return;\n assert9(options.r && options.s, \"Signature without r or s\");\n this.r = new BN(options.r, 16);\n this.s = new BN(options.s, 16);\n if (options.recoveryParam === void 0)\n this.recoveryParam = null;\n else\n this.recoveryParam = options.recoveryParam;\n }\n module.exports = Signature;\n function Position() {\n this.place = 0;\n }\n function getLength(buf, p4) {\n var initial = buf[p4.place++];\n if (!(initial & 128)) {\n return initial;\n }\n var octetLen = initial & 15;\n if (octetLen === 0 || octetLen > 4) {\n return false;\n }\n if (buf[p4.place] === 0) {\n return false;\n }\n var val = 0;\n for (var i3 = 0, off2 = p4.place; i3 < octetLen; i3++, off2++) {\n val <<= 8;\n val |= buf[off2];\n val >>>= 0;\n }\n if (val <= 127) {\n return false;\n }\n p4.place = off2;\n return val;\n }\n function rmPadding(buf) {\n var i3 = 0;\n var len = buf.length - 1;\n while (!buf[i3] && !(buf[i3 + 1] & 128) && i3 < len) {\n i3++;\n }\n if (i3 === 0) {\n return buf;\n }\n return buf.slice(i3);\n }\n Signature.prototype._importDER = function _importDER(data, enc) {\n data = utils.toArray(data, enc);\n var p4 = new Position();\n if (data[p4.place++] !== 48) {\n return false;\n }\n var len = getLength(data, p4);\n if (len === false) {\n return false;\n }\n if (len + p4.place !== data.length) {\n return false;\n }\n if (data[p4.place++] !== 2) {\n return false;\n }\n var rlen = getLength(data, p4);\n if (rlen === false) {\n return false;\n }\n if ((data[p4.place] & 128) !== 0) {\n return false;\n }\n var r2 = data.slice(p4.place, rlen + p4.place);\n p4.place += rlen;\n if (data[p4.place++] !== 2) {\n return false;\n }\n var slen = getLength(data, p4);\n if (slen === false) {\n return false;\n }\n if (data.length !== slen + p4.place) {\n return false;\n }\n if ((data[p4.place] & 128) !== 0) {\n return false;\n }\n var s4 = data.slice(p4.place, slen + p4.place);\n if (r2[0] === 0) {\n if (r2[1] & 128) {\n r2 = r2.slice(1);\n } else {\n return false;\n }\n }\n if (s4[0] === 0) {\n if (s4[1] & 128) {\n s4 = s4.slice(1);\n } else {\n return false;\n }\n }\n this.r = new BN(r2);\n this.s = new BN(s4);\n this.recoveryParam = null;\n return true;\n };\n function constructLength(arr, len) {\n if (len < 128) {\n arr.push(len);\n return;\n }\n var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);\n arr.push(octets | 128);\n while (--octets) {\n arr.push(len >>> (octets << 3) & 255);\n }\n arr.push(len);\n }\n Signature.prototype.toDER = function toDER(enc) {\n var r2 = this.r.toArray();\n var s4 = this.s.toArray();\n if (r2[0] & 128)\n r2 = [0].concat(r2);\n if (s4[0] & 128)\n s4 = [0].concat(s4);\n r2 = rmPadding(r2);\n s4 = rmPadding(s4);\n while (!s4[0] && !(s4[1] & 128)) {\n s4 = s4.slice(1);\n }\n var arr = [2];\n constructLength(arr, r2.length);\n arr = arr.concat(r2);\n arr.push(2);\n constructLength(arr, s4.length);\n var backHalf = arr.concat(s4);\n var res = [48];\n constructLength(res, backHalf.length);\n res = res.concat(backHalf);\n return utils.encode(res, enc);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/index.js\n var require_ec = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/ec/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var HmacDRBG = require_hmac_drbg();\n var utils = require_utils3();\n var curves = require_curves();\n var rand = require_brorand();\n var assert9 = utils.assert;\n var KeyPair = require_key();\n var Signature = require_signature();\n function EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n if (typeof options === \"string\") {\n assert9(\n Object.prototype.hasOwnProperty.call(curves, options),\n \"Unknown curve \" + options\n );\n options = curves[options];\n }\n if (options instanceof curves.PresetCurve)\n options = { curve: options };\n this.curve = options.curve.curve;\n this.n = this.curve.n;\n this.nh = this.n.ushrn(1);\n this.g = this.curve.g;\n this.g = options.curve.g;\n this.g.precompute(options.curve.n.bitLength() + 1);\n this.hash = options.hash || options.curve.hash;\n }\n module.exports = EC;\n EC.prototype.keyPair = function keyPair(options) {\n return new KeyPair(this, options);\n };\n EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {\n return KeyPair.fromPrivate(this, priv, enc);\n };\n EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {\n return KeyPair.fromPublic(this, pub, enc);\n };\n EC.prototype.genKeyPair = function genKeyPair(options) {\n if (!options)\n options = {};\n var drbg = new HmacDRBG({\n hash: this.hash,\n pers: options.pers,\n persEnc: options.persEnc || \"utf8\",\n entropy: options.entropy || rand(this.hash.hmacStrength),\n entropyEnc: options.entropy && options.entropyEnc || \"utf8\",\n nonce: this.n.toArray()\n });\n var bytes = this.n.byteLength();\n var ns2 = this.n.sub(new BN(2));\n for (; ; ) {\n var priv = new BN(drbg.generate(bytes));\n if (priv.cmp(ns2) > 0)\n continue;\n priv.iaddn(1);\n return this.keyFromPrivate(priv);\n }\n };\n EC.prototype._truncateToN = function _truncateToN(msg, truncOnly, bitLength3) {\n var byteLength;\n if (BN.isBN(msg) || typeof msg === \"number\") {\n msg = new BN(msg, 16);\n byteLength = msg.byteLength();\n } else if (typeof msg === \"object\") {\n byteLength = msg.length;\n msg = new BN(msg, 16);\n } else {\n var str = msg.toString();\n byteLength = str.length + 1 >>> 1;\n msg = new BN(str, 16);\n }\n if (typeof bitLength3 !== \"number\") {\n bitLength3 = byteLength * 8;\n }\n var delta = bitLength3 - this.n.bitLength();\n if (delta > 0)\n msg = msg.ushrn(delta);\n if (!truncOnly && msg.cmp(this.n) >= 0)\n return msg.sub(this.n);\n else\n return msg;\n };\n EC.prototype.sign = function sign4(msg, key, enc, options) {\n if (typeof enc === \"object\") {\n options = enc;\n enc = null;\n }\n if (!options)\n options = {};\n if (typeof msg !== \"string\" && typeof msg !== \"number\" && !BN.isBN(msg)) {\n assert9(\n typeof msg === \"object\" && msg && typeof msg.length === \"number\",\n \"Expected message to be an array-like, a hex string, or a BN instance\"\n );\n assert9(msg.length >>> 0 === msg.length);\n for (var i3 = 0; i3 < msg.length; i3++)\n assert9((msg[i3] & 255) === msg[i3]);\n }\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(msg, false, options.msgBitLength);\n assert9(!msg.isNeg(), \"Can not sign a negative message\");\n var bytes = this.n.byteLength();\n var bkey = key.getPrivate().toArray(\"be\", bytes);\n var nonce = msg.toArray(\"be\", bytes);\n assert9(new BN(nonce).eq(msg), \"Can not sign message\");\n var drbg = new HmacDRBG({\n hash: this.hash,\n entropy: bkey,\n nonce,\n pers: options.pers,\n persEnc: options.persEnc || \"utf8\"\n });\n var ns1 = this.n.sub(new BN(1));\n for (var iter = 0; ; iter++) {\n var k4 = options.k ? options.k(iter) : new BN(drbg.generate(this.n.byteLength()));\n k4 = this._truncateToN(k4, true);\n if (k4.cmpn(1) <= 0 || k4.cmp(ns1) >= 0)\n continue;\n var kp = this.g.mul(k4);\n if (kp.isInfinity())\n continue;\n var kpX = kp.getX();\n var r2 = kpX.umod(this.n);\n if (r2.cmpn(0) === 0)\n continue;\n var s4 = k4.invm(this.n).mul(r2.mul(key.getPrivate()).iadd(msg));\n s4 = s4.umod(this.n);\n if (s4.cmpn(0) === 0)\n continue;\n var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | (kpX.cmp(r2) !== 0 ? 2 : 0);\n if (options.canonical && s4.cmp(this.nh) > 0) {\n s4 = this.n.sub(s4);\n recoveryParam ^= 1;\n }\n return new Signature({ r: r2, s: s4, recoveryParam });\n }\n };\n EC.prototype.verify = function verify2(msg, signature, key, enc, options) {\n if (!options)\n options = {};\n msg = this._truncateToN(msg, false, options.msgBitLength);\n key = this.keyFromPublic(key, enc);\n signature = new Signature(signature, \"hex\");\n var r2 = signature.r;\n var s4 = signature.s;\n if (r2.cmpn(1) < 0 || r2.cmp(this.n) >= 0)\n return false;\n if (s4.cmpn(1) < 0 || s4.cmp(this.n) >= 0)\n return false;\n var sinv = s4.invm(this.n);\n var u1 = sinv.mul(msg).umod(this.n);\n var u2 = sinv.mul(r2).umod(this.n);\n var p4;\n if (!this.curve._maxwellTrick) {\n p4 = this.g.mulAdd(u1, key.getPublic(), u2);\n if (p4.isInfinity())\n return false;\n return p4.getX().umod(this.n).cmp(r2) === 0;\n }\n p4 = this.g.jmulAdd(u1, key.getPublic(), u2);\n if (p4.isInfinity())\n return false;\n return p4.eqXToP(r2);\n };\n EC.prototype.recoverPubKey = function(msg, signature, j2, enc) {\n assert9((3 & j2) === j2, \"The recovery param is more than two bits\");\n signature = new Signature(signature, enc);\n var n2 = this.n;\n var e2 = new BN(msg);\n var r2 = signature.r;\n var s4 = signature.s;\n var isYOdd = j2 & 1;\n var isSecondKey = j2 >> 1;\n if (r2.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)\n throw new Error(\"Unable to find sencond key candinate\");\n if (isSecondKey)\n r2 = this.curve.pointFromX(r2.add(this.curve.n), isYOdd);\n else\n r2 = this.curve.pointFromX(r2, isYOdd);\n var rInv = signature.r.invm(n2);\n var s1 = n2.sub(e2).mul(rInv).umod(n2);\n var s22 = s4.mul(rInv).umod(n2);\n return this.g.mulAdd(s1, r2, s22);\n };\n EC.prototype.getKeyRecoveryParam = function(e2, signature, Q2, enc) {\n signature = new Signature(signature, enc);\n if (signature.recoveryParam !== null)\n return signature.recoveryParam;\n for (var i3 = 0; i3 < 4; i3++) {\n var Qprime;\n try {\n Qprime = this.recoverPubKey(e2, signature, i3);\n } catch (e3) {\n continue;\n }\n if (Qprime.eq(Q2))\n return i3;\n }\n throw new Error(\"Unable to find valid recovery factor\");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/key.js\n var require_key2 = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/key.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var utils = require_utils3();\n var assert9 = utils.assert;\n var parseBytes = utils.parseBytes;\n var cachedProperty = utils.cachedProperty;\n function KeyPair(eddsa, params) {\n this.eddsa = eddsa;\n this._secret = parseBytes(params.secret);\n if (eddsa.isPoint(params.pub))\n this._pub = params.pub;\n else\n this._pubBytes = parseBytes(params.pub);\n }\n KeyPair.fromPublic = function fromPublic(eddsa, pub) {\n if (pub instanceof KeyPair)\n return pub;\n return new KeyPair(eddsa, { pub });\n };\n KeyPair.fromSecret = function fromSecret(eddsa, secret) {\n if (secret instanceof KeyPair)\n return secret;\n return new KeyPair(eddsa, { secret });\n };\n KeyPair.prototype.secret = function secret() {\n return this._secret;\n };\n cachedProperty(KeyPair, \"pubBytes\", function pubBytes() {\n return this.eddsa.encodePoint(this.pub());\n });\n cachedProperty(KeyPair, \"pub\", function pub() {\n if (this._pubBytes)\n return this.eddsa.decodePoint(this._pubBytes);\n return this.eddsa.g.mul(this.priv());\n });\n cachedProperty(KeyPair, \"privBytes\", function privBytes() {\n var eddsa = this.eddsa;\n var hash3 = this.hash();\n var lastIx = eddsa.encodingLength - 1;\n var a3 = hash3.slice(0, eddsa.encodingLength);\n a3[0] &= 248;\n a3[lastIx] &= 127;\n a3[lastIx] |= 64;\n return a3;\n });\n cachedProperty(KeyPair, \"priv\", function priv() {\n return this.eddsa.decodeInt(this.privBytes());\n });\n cachedProperty(KeyPair, \"hash\", function hash3() {\n return this.eddsa.hash().update(this.secret()).digest();\n });\n cachedProperty(KeyPair, \"messagePrefix\", function messagePrefix() {\n return this.hash().slice(this.eddsa.encodingLength);\n });\n KeyPair.prototype.sign = function sign4(message2) {\n assert9(this._secret, \"KeyPair can only verify\");\n return this.eddsa.sign(message2, this);\n };\n KeyPair.prototype.verify = function verify2(message2, sig) {\n return this.eddsa.verify(message2, sig, this);\n };\n KeyPair.prototype.getSecret = function getSecret(enc) {\n assert9(this._secret, \"KeyPair is public only\");\n return utils.encode(this.secret(), enc);\n };\n KeyPair.prototype.getPublic = function getPublic(enc) {\n return utils.encode(this.pubBytes(), enc);\n };\n module.exports = KeyPair;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/signature.js\n var require_signature2 = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/signature.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var BN = require_bn2();\n var utils = require_utils3();\n var assert9 = utils.assert;\n var cachedProperty = utils.cachedProperty;\n var parseBytes = utils.parseBytes;\n function Signature(eddsa, sig) {\n this.eddsa = eddsa;\n if (typeof sig !== \"object\")\n sig = parseBytes(sig);\n if (Array.isArray(sig)) {\n assert9(sig.length === eddsa.encodingLength * 2, \"Signature has invalid size\");\n sig = {\n R: sig.slice(0, eddsa.encodingLength),\n S: sig.slice(eddsa.encodingLength)\n };\n }\n assert9(sig.R && sig.S, \"Signature without R or S\");\n if (eddsa.isPoint(sig.R))\n this._R = sig.R;\n if (sig.S instanceof BN)\n this._S = sig.S;\n this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded;\n this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded;\n }\n cachedProperty(Signature, \"S\", function S3() {\n return this.eddsa.decodeInt(this.Sencoded());\n });\n cachedProperty(Signature, \"R\", function R3() {\n return this.eddsa.decodePoint(this.Rencoded());\n });\n cachedProperty(Signature, \"Rencoded\", function Rencoded() {\n return this.eddsa.encodePoint(this.R());\n });\n cachedProperty(Signature, \"Sencoded\", function Sencoded() {\n return this.eddsa.encodeInt(this.S());\n });\n Signature.prototype.toBytes = function toBytes5() {\n return this.Rencoded().concat(this.Sencoded());\n };\n Signature.prototype.toHex = function toHex3() {\n return utils.encode(this.toBytes(), \"hex\").toUpperCase();\n };\n module.exports = Signature;\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/index.js\n var require_eddsa = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic/eddsa/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var hash3 = require_hash();\n var curves = require_curves();\n var utils = require_utils3();\n var assert9 = utils.assert;\n var parseBytes = utils.parseBytes;\n var KeyPair = require_key2();\n var Signature = require_signature2();\n function EDDSA(curve) {\n assert9(curve === \"ed25519\", \"only tested with ed25519 so far\");\n if (!(this instanceof EDDSA))\n return new EDDSA(curve);\n curve = curves[curve].curve;\n this.curve = curve;\n this.g = curve.g;\n this.g.precompute(curve.n.bitLength() + 1);\n this.pointClass = curve.point().constructor;\n this.encodingLength = Math.ceil(curve.n.bitLength() / 8);\n this.hash = hash3.sha512;\n }\n module.exports = EDDSA;\n EDDSA.prototype.sign = function sign4(message2, secret) {\n message2 = parseBytes(message2);\n var key = this.keyFromSecret(secret);\n var r2 = this.hashInt(key.messagePrefix(), message2);\n var R3 = this.g.mul(r2);\n var Rencoded = this.encodePoint(R3);\n var s_ = this.hashInt(Rencoded, key.pubBytes(), message2).mul(key.priv());\n var S3 = r2.add(s_).umod(this.curve.n);\n return this.makeSignature({ R: R3, S: S3, Rencoded });\n };\n EDDSA.prototype.verify = function verify2(message2, sig, pub) {\n message2 = parseBytes(message2);\n sig = this.makeSignature(sig);\n if (sig.S().gte(sig.eddsa.curve.n) || sig.S().isNeg()) {\n return false;\n }\n var key = this.keyFromPublic(pub);\n var h4 = this.hashInt(sig.Rencoded(), key.pubBytes(), message2);\n var SG = this.g.mul(sig.S());\n var RplusAh = sig.R().add(key.pub().mul(h4));\n return RplusAh.eq(SG);\n };\n EDDSA.prototype.hashInt = function hashInt() {\n var hash4 = this.hash();\n for (var i3 = 0; i3 < arguments.length; i3++)\n hash4.update(arguments[i3]);\n return utils.intFromLE(hash4.digest()).umod(this.curve.n);\n };\n EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {\n return KeyPair.fromPublic(this, pub);\n };\n EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) {\n return KeyPair.fromSecret(this, secret);\n };\n EDDSA.prototype.makeSignature = function makeSignature(sig) {\n if (sig instanceof Signature)\n return sig;\n return new Signature(this, sig);\n };\n EDDSA.prototype.encodePoint = function encodePoint(point) {\n var enc = point.getY().toArray(\"le\", this.encodingLength);\n enc[this.encodingLength - 1] |= point.getX().isOdd() ? 128 : 0;\n return enc;\n };\n EDDSA.prototype.decodePoint = function decodePoint(bytes) {\n bytes = utils.parseBytes(bytes);\n var lastIx = bytes.length - 1;\n var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~128);\n var xIsOdd = (bytes[lastIx] & 128) !== 0;\n var y6 = utils.intFromLE(normed);\n return this.curve.pointFromY(y6, xIsOdd);\n };\n EDDSA.prototype.encodeInt = function encodeInt(num2) {\n return num2.toArray(\"le\", this.encodingLength);\n };\n EDDSA.prototype.decodeInt = function decodeInt(bytes) {\n return utils.intFromLE(bytes);\n };\n EDDSA.prototype.isPoint = function isPoint(val) {\n return val instanceof this.pointClass;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic.js\n var require_elliptic = __commonJS({\n \"../../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var elliptic = exports3;\n elliptic.version = require_package().version;\n elliptic.utils = require_utils3();\n elliptic.rand = require_brorand();\n elliptic.curve = require_curve();\n elliptic.curves = require_curves();\n elliptic.ec = require_ec();\n elliptic.eddsa = require_eddsa();\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/elliptic.js\n var require_elliptic2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/elliptic.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EC = void 0;\n var elliptic_1 = __importDefault4(require_elliptic());\n var EC = elliptic_1.default.ec;\n exports3.EC = EC;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/_version.js\n var require_version12 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"signing-key/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/index.js\n var require_lib16 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+signing-key@5.8.0/node_modules/@ethersproject/signing-key/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.computePublicKey = exports3.recoverPublicKey = exports3.SigningKey = void 0;\n var elliptic_1 = require_elliptic2();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version12();\n var logger = new logger_1.Logger(_version_1.version);\n var _curve = null;\n function getCurve() {\n if (!_curve) {\n _curve = new elliptic_1.EC(\"secp256k1\");\n }\n return _curve;\n }\n var SigningKey = (\n /** @class */\n function() {\n function SigningKey2(privateKey) {\n (0, properties_1.defineReadOnly)(this, \"curve\", \"secp256k1\");\n (0, properties_1.defineReadOnly)(this, \"privateKey\", (0, bytes_1.hexlify)(privateKey));\n if ((0, bytes_1.hexDataLength)(this.privateKey) !== 32) {\n logger.throwArgumentError(\"invalid private key\", \"privateKey\", \"[[ REDACTED ]]\");\n }\n var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey));\n (0, properties_1.defineReadOnly)(this, \"publicKey\", \"0x\" + keyPair.getPublic(false, \"hex\"));\n (0, properties_1.defineReadOnly)(this, \"compressedPublicKey\", \"0x\" + keyPair.getPublic(true, \"hex\"));\n (0, properties_1.defineReadOnly)(this, \"_isSigningKey\", true);\n }\n SigningKey2.prototype._addPoint = function(other) {\n var p0 = getCurve().keyFromPublic((0, bytes_1.arrayify)(this.publicKey));\n var p1 = getCurve().keyFromPublic((0, bytes_1.arrayify)(other));\n return \"0x\" + p0.pub.add(p1.pub).encodeCompressed(\"hex\");\n };\n SigningKey2.prototype.signDigest = function(digest2) {\n var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey));\n var digestBytes = (0, bytes_1.arrayify)(digest2);\n if (digestBytes.length !== 32) {\n logger.throwArgumentError(\"bad digest length\", \"digest\", digest2);\n }\n var signature = keyPair.sign(digestBytes, { canonical: true });\n return (0, bytes_1.splitSignature)({\n recoveryParam: signature.recoveryParam,\n r: (0, bytes_1.hexZeroPad)(\"0x\" + signature.r.toString(16), 32),\n s: (0, bytes_1.hexZeroPad)(\"0x\" + signature.s.toString(16), 32)\n });\n };\n SigningKey2.prototype.computeSharedSecret = function(otherKey) {\n var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey));\n var otherKeyPair = getCurve().keyFromPublic((0, bytes_1.arrayify)(computePublicKey(otherKey)));\n return (0, bytes_1.hexZeroPad)(\"0x\" + keyPair.derive(otherKeyPair.getPublic()).toString(16), 32);\n };\n SigningKey2.isSigningKey = function(value) {\n return !!(value && value._isSigningKey);\n };\n return SigningKey2;\n }()\n );\n exports3.SigningKey = SigningKey;\n function recoverPublicKey3(digest2, signature) {\n var sig = (0, bytes_1.splitSignature)(signature);\n var rs = { r: (0, bytes_1.arrayify)(sig.r), s: (0, bytes_1.arrayify)(sig.s) };\n return \"0x\" + getCurve().recoverPubKey((0, bytes_1.arrayify)(digest2), rs, sig.recoveryParam).encode(\"hex\", false);\n }\n exports3.recoverPublicKey = recoverPublicKey3;\n function computePublicKey(key, compressed) {\n var bytes = (0, bytes_1.arrayify)(key);\n if (bytes.length === 32) {\n var signingKey = new SigningKey(bytes);\n if (compressed) {\n return \"0x\" + getCurve().keyFromPrivate(bytes).getPublic(true, \"hex\");\n }\n return signingKey.publicKey;\n } else if (bytes.length === 33) {\n if (compressed) {\n return (0, bytes_1.hexlify)(bytes);\n }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(false, \"hex\");\n } else if (bytes.length === 65) {\n if (!compressed) {\n return (0, bytes_1.hexlify)(bytes);\n }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(true, \"hex\");\n }\n return logger.throwArgumentError(\"invalid public or private key\", \"key\", \"[REDACTED]\");\n }\n exports3.computePublicKey = computePublicKey;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib/_version.js\n var require_version13 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"transactions/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib/index.js\n var require_lib17 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+transactions@5.8.0/node_modules/@ethersproject/transactions/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding4 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n Object.defineProperty(o5, k22, { enumerable: true, get: function() {\n return m2[k4];\n } });\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar4 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding4(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.parse = exports3.serialize = exports3.accessListify = exports3.recoverAddress = exports3.computeAddress = exports3.TransactionTypes = void 0;\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var constants_1 = require_lib8();\n var keccak256_1 = require_lib5();\n var properties_1 = require_lib4();\n var RLP = __importStar4(require_lib6());\n var signing_key_1 = require_lib16();\n var logger_1 = require_lib();\n var _version_1 = require_version13();\n var logger = new logger_1.Logger(_version_1.version);\n var TransactionTypes;\n (function(TransactionTypes2) {\n TransactionTypes2[TransactionTypes2[\"legacy\"] = 0] = \"legacy\";\n TransactionTypes2[TransactionTypes2[\"eip2930\"] = 1] = \"eip2930\";\n TransactionTypes2[TransactionTypes2[\"eip1559\"] = 2] = \"eip1559\";\n })(TransactionTypes = exports3.TransactionTypes || (exports3.TransactionTypes = {}));\n function handleAddress(value) {\n if (value === \"0x\") {\n return null;\n }\n return (0, address_1.getAddress)(value);\n }\n function handleNumber(value) {\n if (value === \"0x\") {\n return constants_1.Zero;\n }\n return bignumber_1.BigNumber.from(value);\n }\n var transactionFields = [\n { name: \"nonce\", maxLength: 32, numeric: true },\n { name: \"gasPrice\", maxLength: 32, numeric: true },\n { name: \"gasLimit\", maxLength: 32, numeric: true },\n { name: \"to\", length: 20 },\n { name: \"value\", maxLength: 32, numeric: true },\n { name: \"data\" }\n ];\n var allowedTransactionKeys = {\n chainId: true,\n data: true,\n gasLimit: true,\n gasPrice: true,\n nonce: true,\n to: true,\n type: true,\n value: true\n };\n function computeAddress(key) {\n var publicKey = (0, signing_key_1.computePublicKey)(key);\n return (0, address_1.getAddress)((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, bytes_1.hexDataSlice)(publicKey, 1)), 12));\n }\n exports3.computeAddress = computeAddress;\n function recoverAddress3(digest2, signature) {\n return computeAddress((0, signing_key_1.recoverPublicKey)((0, bytes_1.arrayify)(digest2), signature));\n }\n exports3.recoverAddress = recoverAddress3;\n function formatNumber(value, name) {\n var result = (0, bytes_1.stripZeros)(bignumber_1.BigNumber.from(value).toHexString());\n if (result.length > 32) {\n logger.throwArgumentError(\"invalid length for \" + name, \"transaction:\" + name, value);\n }\n return result;\n }\n function accessSetify(addr, storageKeys) {\n return {\n address: (0, address_1.getAddress)(addr),\n storageKeys: (storageKeys || []).map(function(storageKey, index2) {\n if ((0, bytes_1.hexDataLength)(storageKey) !== 32) {\n logger.throwArgumentError(\"invalid access list storageKey\", \"accessList[\" + addr + \":\" + index2 + \"]\", storageKey);\n }\n return storageKey.toLowerCase();\n })\n };\n }\n function accessListify(value) {\n if (Array.isArray(value)) {\n return value.map(function(set, index2) {\n if (Array.isArray(set)) {\n if (set.length > 2) {\n logger.throwArgumentError(\"access list expected to be [ address, storageKeys[] ]\", \"value[\" + index2 + \"]\", set);\n }\n return accessSetify(set[0], set[1]);\n }\n return accessSetify(set.address, set.storageKeys);\n });\n }\n var result = Object.keys(value).map(function(addr) {\n var storageKeys = value[addr].reduce(function(accum, storageKey) {\n accum[storageKey] = true;\n return accum;\n }, {});\n return accessSetify(addr, Object.keys(storageKeys).sort());\n });\n result.sort(function(a3, b4) {\n return a3.address.localeCompare(b4.address);\n });\n return result;\n }\n exports3.accessListify = accessListify;\n function formatAccessList(value) {\n return accessListify(value).map(function(set) {\n return [set.address, set.storageKeys];\n });\n }\n function _serializeEip1559(transaction, signature) {\n if (transaction.gasPrice != null) {\n var gasPrice = bignumber_1.BigNumber.from(transaction.gasPrice);\n var maxFeePerGas = bignumber_1.BigNumber.from(transaction.maxFeePerGas || 0);\n if (!gasPrice.eq(maxFeePerGas)) {\n logger.throwArgumentError(\"mismatch EIP-1559 gasPrice != maxFeePerGas\", \"tx\", {\n gasPrice,\n maxFeePerGas\n });\n }\n }\n var fields = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(transaction.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n transaction.to != null ? (0, address_1.getAddress)(transaction.to) : \"0x\",\n formatNumber(transaction.value || 0, \"value\"),\n transaction.data || \"0x\",\n formatAccessList(transaction.accessList || [])\n ];\n if (signature) {\n var sig = (0, bytes_1.splitSignature)(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push((0, bytes_1.stripZeros)(sig.r));\n fields.push((0, bytes_1.stripZeros)(sig.s));\n }\n return (0, bytes_1.hexConcat)([\"0x02\", RLP.encode(fields)]);\n }\n function _serializeEip2930(transaction, signature) {\n var fields = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.gasPrice || 0, \"gasPrice\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n transaction.to != null ? (0, address_1.getAddress)(transaction.to) : \"0x\",\n formatNumber(transaction.value || 0, \"value\"),\n transaction.data || \"0x\",\n formatAccessList(transaction.accessList || [])\n ];\n if (signature) {\n var sig = (0, bytes_1.splitSignature)(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push((0, bytes_1.stripZeros)(sig.r));\n fields.push((0, bytes_1.stripZeros)(sig.s));\n }\n return (0, bytes_1.hexConcat)([\"0x01\", RLP.encode(fields)]);\n }\n function _serialize(transaction, signature) {\n (0, properties_1.checkProperties)(transaction, allowedTransactionKeys);\n var raw = [];\n transactionFields.forEach(function(fieldInfo) {\n var value = transaction[fieldInfo.name] || [];\n var options = {};\n if (fieldInfo.numeric) {\n options.hexPad = \"left\";\n }\n value = (0, bytes_1.arrayify)((0, bytes_1.hexlify)(value, options));\n if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, \"transaction:\" + fieldInfo.name, value);\n }\n if (fieldInfo.maxLength) {\n value = (0, bytes_1.stripZeros)(value);\n if (value.length > fieldInfo.maxLength) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, \"transaction:\" + fieldInfo.name, value);\n }\n }\n raw.push((0, bytes_1.hexlify)(value));\n });\n var chainId = 0;\n if (transaction.chainId != null) {\n chainId = transaction.chainId;\n if (typeof chainId !== \"number\") {\n logger.throwArgumentError(\"invalid transaction.chainId\", \"transaction\", transaction);\n }\n } else if (signature && !(0, bytes_1.isBytesLike)(signature) && signature.v > 28) {\n chainId = Math.floor((signature.v - 35) / 2);\n }\n if (chainId !== 0) {\n raw.push((0, bytes_1.hexlify)(chainId));\n raw.push(\"0x\");\n raw.push(\"0x\");\n }\n if (!signature) {\n return RLP.encode(raw);\n }\n var sig = (0, bytes_1.splitSignature)(signature);\n var v2 = 27 + sig.recoveryParam;\n if (chainId !== 0) {\n raw.pop();\n raw.pop();\n raw.pop();\n v2 += chainId * 2 + 8;\n if (sig.v > 28 && sig.v !== v2) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n } else if (sig.v !== v2) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n raw.push((0, bytes_1.hexlify)(v2));\n raw.push((0, bytes_1.stripZeros)((0, bytes_1.arrayify)(sig.r)));\n raw.push((0, bytes_1.stripZeros)((0, bytes_1.arrayify)(sig.s)));\n return RLP.encode(raw);\n }\n function serialize(transaction, signature) {\n if (transaction.type == null || transaction.type === 0) {\n if (transaction.accessList != null) {\n logger.throwArgumentError(\"untyped transactions do not support accessList; include type: 1\", \"transaction\", transaction);\n }\n return _serialize(transaction, signature);\n }\n switch (transaction.type) {\n case 1:\n return _serializeEip2930(transaction, signature);\n case 2:\n return _serializeEip1559(transaction, signature);\n default:\n break;\n }\n return logger.throwError(\"unsupported transaction type: \" + transaction.type, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"serializeTransaction\",\n transactionType: transaction.type\n });\n }\n exports3.serialize = serialize;\n function _parseEipSignature(tx, fields, serialize2) {\n try {\n var recid = handleNumber(fields[0]).toNumber();\n if (recid !== 0 && recid !== 1) {\n throw new Error(\"bad recid\");\n }\n tx.v = recid;\n } catch (error) {\n logger.throwArgumentError(\"invalid v for transaction type: 1\", \"v\", fields[0]);\n }\n tx.r = (0, bytes_1.hexZeroPad)(fields[1], 32);\n tx.s = (0, bytes_1.hexZeroPad)(fields[2], 32);\n try {\n var digest2 = (0, keccak256_1.keccak256)(serialize2(tx));\n tx.from = recoverAddress3(digest2, { r: tx.r, s: tx.s, recoveryParam: tx.v });\n } catch (error) {\n }\n }\n function _parseEip1559(payload) {\n var transaction = RLP.decode(payload.slice(1));\n if (transaction.length !== 9 && transaction.length !== 12) {\n logger.throwArgumentError(\"invalid component count for transaction type: 2\", \"payload\", (0, bytes_1.hexlify)(payload));\n }\n var maxPriorityFeePerGas = handleNumber(transaction[2]);\n var maxFeePerGas = handleNumber(transaction[3]);\n var tx = {\n type: 2,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n maxPriorityFeePerGas,\n maxFeePerGas,\n gasPrice: null,\n gasLimit: handleNumber(transaction[4]),\n to: handleAddress(transaction[5]),\n value: handleNumber(transaction[6]),\n data: transaction[7],\n accessList: accessListify(transaction[8])\n };\n if (transaction.length === 9) {\n return tx;\n }\n tx.hash = (0, keccak256_1.keccak256)(payload);\n _parseEipSignature(tx, transaction.slice(9), _serializeEip1559);\n return tx;\n }\n function _parseEip2930(payload) {\n var transaction = RLP.decode(payload.slice(1));\n if (transaction.length !== 8 && transaction.length !== 11) {\n logger.throwArgumentError(\"invalid component count for transaction type: 1\", \"payload\", (0, bytes_1.hexlify)(payload));\n }\n var tx = {\n type: 1,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n gasPrice: handleNumber(transaction[2]),\n gasLimit: handleNumber(transaction[3]),\n to: handleAddress(transaction[4]),\n value: handleNumber(transaction[5]),\n data: transaction[6],\n accessList: accessListify(transaction[7])\n };\n if (transaction.length === 8) {\n return tx;\n }\n tx.hash = (0, keccak256_1.keccak256)(payload);\n _parseEipSignature(tx, transaction.slice(8), _serializeEip2930);\n return tx;\n }\n function _parse(rawTransaction) {\n var transaction = RLP.decode(rawTransaction);\n if (transaction.length !== 9 && transaction.length !== 6) {\n logger.throwArgumentError(\"invalid raw transaction\", \"rawTransaction\", rawTransaction);\n }\n var tx = {\n nonce: handleNumber(transaction[0]).toNumber(),\n gasPrice: handleNumber(transaction[1]),\n gasLimit: handleNumber(transaction[2]),\n to: handleAddress(transaction[3]),\n value: handleNumber(transaction[4]),\n data: transaction[5],\n chainId: 0\n };\n if (transaction.length === 6) {\n return tx;\n }\n try {\n tx.v = bignumber_1.BigNumber.from(transaction[6]).toNumber();\n } catch (error) {\n return tx;\n }\n tx.r = (0, bytes_1.hexZeroPad)(transaction[7], 32);\n tx.s = (0, bytes_1.hexZeroPad)(transaction[8], 32);\n if (bignumber_1.BigNumber.from(tx.r).isZero() && bignumber_1.BigNumber.from(tx.s).isZero()) {\n tx.chainId = tx.v;\n tx.v = 0;\n } else {\n tx.chainId = Math.floor((tx.v - 35) / 2);\n if (tx.chainId < 0) {\n tx.chainId = 0;\n }\n var recoveryParam = tx.v - 27;\n var raw = transaction.slice(0, 6);\n if (tx.chainId !== 0) {\n raw.push((0, bytes_1.hexlify)(tx.chainId));\n raw.push(\"0x\");\n raw.push(\"0x\");\n recoveryParam -= tx.chainId * 2 + 8;\n }\n var digest2 = (0, keccak256_1.keccak256)(RLP.encode(raw));\n try {\n tx.from = recoverAddress3(digest2, { r: (0, bytes_1.hexlify)(tx.r), s: (0, bytes_1.hexlify)(tx.s), recoveryParam });\n } catch (error) {\n }\n tx.hash = (0, keccak256_1.keccak256)(rawTransaction);\n }\n tx.type = null;\n return tx;\n }\n function parse3(rawTransaction) {\n var payload = (0, bytes_1.arrayify)(rawTransaction);\n if (payload[0] > 127) {\n return _parse(payload);\n }\n switch (payload[0]) {\n case 1:\n return _parseEip2930(payload);\n case 2:\n return _parseEip1559(payload);\n default:\n break;\n }\n return logger.throwError(\"unsupported transaction type: \" + payload[0], logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"parseTransaction\",\n transactionType: payload[0]\n });\n }\n exports3.parse = parse3;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+contracts@5.8.0/node_modules/@ethersproject/contracts/lib/_version.js\n var require_version14 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+contracts@5.8.0/node_modules/@ethersproject/contracts/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"contracts/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+contracts@5.8.0/node_modules/@ethersproject/contracts/lib/index.js\n var require_lib18 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+contracts@5.8.0/node_modules/@ethersproject/contracts/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n var __spreadArray3 = exports3 && exports3.__spreadArray || function(to, from14, pack) {\n if (pack || arguments.length === 2)\n for (var i3 = 0, l6 = from14.length, ar; i3 < l6; i3++) {\n if (ar || !(i3 in from14)) {\n if (!ar)\n ar = Array.prototype.slice.call(from14, 0, i3);\n ar[i3] = from14[i3];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from14));\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ContractFactory = exports3.Contract = exports3.BaseContract = void 0;\n var abi_1 = require_lib13();\n var abstract_provider_1 = require_lib14();\n var abstract_signer_1 = require_lib15();\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var logger_1 = require_lib();\n var _version_1 = require_version14();\n var logger = new logger_1.Logger(_version_1.version);\n var allowedTransactionKeys = {\n chainId: true,\n data: true,\n from: true,\n gasLimit: true,\n gasPrice: true,\n nonce: true,\n to: true,\n value: true,\n type: true,\n accessList: true,\n maxFeePerGas: true,\n maxPriorityFeePerGas: true,\n customData: true,\n ccipReadEnabled: true\n };\n function resolveName(resolver, nameOrPromise) {\n return __awaiter4(this, void 0, void 0, function() {\n var name, address;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, nameOrPromise];\n case 1:\n name = _a.sent();\n if (typeof name !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", name);\n }\n try {\n return [2, (0, address_1.getAddress)(name)];\n } catch (error) {\n }\n if (!resolver) {\n logger.throwError(\"a provider or signer is needed to resolve ENS names\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\"\n });\n }\n return [4, resolver.resolveName(name)];\n case 2:\n address = _a.sent();\n if (address == null) {\n logger.throwArgumentError(\"resolver or addr is not configured for ENS name\", \"name\", name);\n }\n return [2, address];\n }\n });\n });\n }\n function resolveAddresses(resolver, value, paramType) {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!Array.isArray(paramType))\n return [3, 2];\n return [4, Promise.all(paramType.map(function(paramType2, index2) {\n return resolveAddresses(resolver, Array.isArray(value) ? value[index2] : value[paramType2.name], paramType2);\n }))];\n case 1:\n return [2, _a.sent()];\n case 2:\n if (!(paramType.type === \"address\"))\n return [3, 4];\n return [4, resolveName(resolver, value)];\n case 3:\n return [2, _a.sent()];\n case 4:\n if (!(paramType.type === \"tuple\"))\n return [3, 6];\n return [4, resolveAddresses(resolver, value, paramType.components)];\n case 5:\n return [2, _a.sent()];\n case 6:\n if (!(paramType.baseType === \"array\"))\n return [3, 8];\n if (!Array.isArray(value)) {\n return [2, Promise.reject(logger.makeError(\"invalid value for array\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"value\",\n value\n }))];\n }\n return [4, Promise.all(value.map(function(v2) {\n return resolveAddresses(resolver, v2, paramType.arrayChildren);\n }))];\n case 7:\n return [2, _a.sent()];\n case 8:\n return [2, value];\n }\n });\n });\n }\n function populateTransaction(contract, fragment, args) {\n return __awaiter4(this, void 0, void 0, function() {\n var overrides, resolved, data, tx, ro, intrinsic, bytes, i3, roValue, leftovers;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n overrides = {};\n if (args.length === fragment.inputs.length + 1 && typeof args[args.length - 1] === \"object\") {\n overrides = (0, properties_1.shallowCopy)(args.pop());\n }\n logger.checkArgumentCount(args.length, fragment.inputs.length, \"passed to contract\");\n if (contract.signer) {\n if (overrides.from) {\n overrides.from = (0, properties_1.resolveProperties)({\n override: resolveName(contract.signer, overrides.from),\n signer: contract.signer.getAddress()\n }).then(function(check2) {\n return __awaiter4(_this, void 0, void 0, function() {\n return __generator4(this, function(_a2) {\n if ((0, address_1.getAddress)(check2.signer) !== check2.override) {\n logger.throwError(\"Contract with a Signer cannot override from\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.from\"\n });\n }\n return [2, check2.override];\n });\n });\n });\n } else {\n overrides.from = contract.signer.getAddress();\n }\n } else if (overrides.from) {\n overrides.from = resolveName(contract.provider, overrides.from);\n }\n return [4, (0, properties_1.resolveProperties)({\n args: resolveAddresses(contract.signer || contract.provider, args, fragment.inputs),\n address: contract.resolvedAddress,\n overrides: (0, properties_1.resolveProperties)(overrides) || {}\n })];\n case 1:\n resolved = _a.sent();\n data = contract.interface.encodeFunctionData(fragment, resolved.args);\n tx = {\n data,\n to: resolved.address\n };\n ro = resolved.overrides;\n if (ro.nonce != null) {\n tx.nonce = bignumber_1.BigNumber.from(ro.nonce).toNumber();\n }\n if (ro.gasLimit != null) {\n tx.gasLimit = bignumber_1.BigNumber.from(ro.gasLimit);\n }\n if (ro.gasPrice != null) {\n tx.gasPrice = bignumber_1.BigNumber.from(ro.gasPrice);\n }\n if (ro.maxFeePerGas != null) {\n tx.maxFeePerGas = bignumber_1.BigNumber.from(ro.maxFeePerGas);\n }\n if (ro.maxPriorityFeePerGas != null) {\n tx.maxPriorityFeePerGas = bignumber_1.BigNumber.from(ro.maxPriorityFeePerGas);\n }\n if (ro.from != null) {\n tx.from = ro.from;\n }\n if (ro.type != null) {\n tx.type = ro.type;\n }\n if (ro.accessList != null) {\n tx.accessList = (0, transactions_1.accessListify)(ro.accessList);\n }\n if (tx.gasLimit == null && fragment.gas != null) {\n intrinsic = 21e3;\n bytes = (0, bytes_1.arrayify)(data);\n for (i3 = 0; i3 < bytes.length; i3++) {\n intrinsic += 4;\n if (bytes[i3]) {\n intrinsic += 64;\n }\n }\n tx.gasLimit = bignumber_1.BigNumber.from(fragment.gas).add(intrinsic);\n }\n if (ro.value) {\n roValue = bignumber_1.BigNumber.from(ro.value);\n if (!roValue.isZero() && !fragment.payable) {\n logger.throwError(\"non-payable method cannot override value\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: overrides.value\n });\n }\n tx.value = roValue;\n }\n if (ro.customData) {\n tx.customData = (0, properties_1.shallowCopy)(ro.customData);\n }\n if (ro.ccipReadEnabled) {\n tx.ccipReadEnabled = !!ro.ccipReadEnabled;\n }\n delete overrides.nonce;\n delete overrides.gasLimit;\n delete overrides.gasPrice;\n delete overrides.from;\n delete overrides.value;\n delete overrides.type;\n delete overrides.accessList;\n delete overrides.maxFeePerGas;\n delete overrides.maxPriorityFeePerGas;\n delete overrides.customData;\n delete overrides.ccipReadEnabled;\n leftovers = Object.keys(overrides).filter(function(key) {\n return overrides[key] != null;\n });\n if (leftovers.length) {\n logger.throwError(\"cannot override \" + leftovers.map(function(l6) {\n return JSON.stringify(l6);\n }).join(\",\"), logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides\",\n overrides: leftovers\n });\n }\n return [2, tx];\n }\n });\n });\n }\n function buildPopulate(contract, fragment) {\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return populateTransaction(contract, fragment, args);\n };\n }\n function buildEstimate(contract, fragment) {\n var signerOrProvider = contract.signer || contract.provider;\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter4(this, void 0, void 0, function() {\n var tx;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!signerOrProvider) {\n logger.throwError(\"estimate require a provider or signer\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"estimateGas\"\n });\n }\n return [4, populateTransaction(contract, fragment, args)];\n case 1:\n tx = _a.sent();\n return [4, signerOrProvider.estimateGas(tx)];\n case 2:\n return [2, _a.sent()];\n }\n });\n });\n };\n }\n function addContractWait(contract, tx) {\n var wait2 = tx.wait.bind(tx);\n tx.wait = function(confirmations) {\n return wait2(confirmations).then(function(receipt) {\n receipt.events = receipt.logs.map(function(log) {\n var event = (0, properties_1.deepCopy)(log);\n var parsed = null;\n try {\n parsed = contract.interface.parseLog(log);\n } catch (e2) {\n }\n if (parsed) {\n event.args = parsed.args;\n event.decode = function(data, topics) {\n return contract.interface.decodeEventLog(parsed.eventFragment, data, topics);\n };\n event.event = parsed.name;\n event.eventSignature = parsed.signature;\n }\n event.removeListener = function() {\n return contract.provider;\n };\n event.getBlock = function() {\n return contract.provider.getBlock(receipt.blockHash);\n };\n event.getTransaction = function() {\n return contract.provider.getTransaction(receipt.transactionHash);\n };\n event.getTransactionReceipt = function() {\n return Promise.resolve(receipt);\n };\n return event;\n });\n return receipt;\n });\n };\n }\n function buildCall(contract, fragment, collapseSimple) {\n var signerOrProvider = contract.signer || contract.provider;\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter4(this, void 0, void 0, function() {\n var blockTag, overrides, tx, result, value;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n blockTag = void 0;\n if (!(args.length === fragment.inputs.length + 1 && typeof args[args.length - 1] === \"object\"))\n return [3, 3];\n overrides = (0, properties_1.shallowCopy)(args.pop());\n if (!(overrides.blockTag != null))\n return [3, 2];\n return [4, overrides.blockTag];\n case 1:\n blockTag = _a.sent();\n _a.label = 2;\n case 2:\n delete overrides.blockTag;\n args.push(overrides);\n _a.label = 3;\n case 3:\n if (!(contract.deployTransaction != null))\n return [3, 5];\n return [4, contract._deployed(blockTag)];\n case 4:\n _a.sent();\n _a.label = 5;\n case 5:\n return [4, populateTransaction(contract, fragment, args)];\n case 6:\n tx = _a.sent();\n return [4, signerOrProvider.call(tx, blockTag)];\n case 7:\n result = _a.sent();\n try {\n value = contract.interface.decodeFunctionResult(fragment, result);\n if (collapseSimple && fragment.outputs.length === 1) {\n value = value[0];\n }\n return [2, value];\n } catch (error) {\n if (error.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n error.address = contract.address;\n error.args = args;\n error.transaction = tx;\n }\n throw error;\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n }\n function buildSend(contract, fragment) {\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter4(this, void 0, void 0, function() {\n var txRequest, tx;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!contract.signer) {\n logger.throwError(\"sending a transaction requires a signer\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"sendTransaction\"\n });\n }\n if (!(contract.deployTransaction != null))\n return [3, 2];\n return [4, contract._deployed()];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n return [4, populateTransaction(contract, fragment, args)];\n case 3:\n txRequest = _a.sent();\n return [4, contract.signer.sendTransaction(txRequest)];\n case 4:\n tx = _a.sent();\n addContractWait(contract, tx);\n return [2, tx];\n }\n });\n });\n };\n }\n function buildDefault(contract, fragment, collapseSimple) {\n if (fragment.constant) {\n return buildCall(contract, fragment, collapseSimple);\n }\n return buildSend(contract, fragment);\n }\n function getEventTag(filter) {\n if (filter.address && (filter.topics == null || filter.topics.length === 0)) {\n return \"*\";\n }\n return (filter.address || \"*\") + \"@\" + (filter.topics ? filter.topics.map(function(topic) {\n if (Array.isArray(topic)) {\n return topic.join(\"|\");\n }\n return topic;\n }).join(\":\") : \"\");\n }\n var RunningEvent = (\n /** @class */\n function() {\n function RunningEvent2(tag, filter) {\n (0, properties_1.defineReadOnly)(this, \"tag\", tag);\n (0, properties_1.defineReadOnly)(this, \"filter\", filter);\n this._listeners = [];\n }\n RunningEvent2.prototype.addListener = function(listener, once2) {\n this._listeners.push({ listener, once: once2 });\n };\n RunningEvent2.prototype.removeListener = function(listener) {\n var done = false;\n this._listeners = this._listeners.filter(function(item) {\n if (done || item.listener !== listener) {\n return true;\n }\n done = true;\n return false;\n });\n };\n RunningEvent2.prototype.removeAllListeners = function() {\n this._listeners = [];\n };\n RunningEvent2.prototype.listeners = function() {\n return this._listeners.map(function(i3) {\n return i3.listener;\n });\n };\n RunningEvent2.prototype.listenerCount = function() {\n return this._listeners.length;\n };\n RunningEvent2.prototype.run = function(args) {\n var _this = this;\n var listenerCount = this.listenerCount();\n this._listeners = this._listeners.filter(function(item) {\n var argsCopy = args.slice();\n setTimeout(function() {\n item.listener.apply(_this, argsCopy);\n }, 0);\n return !item.once;\n });\n return listenerCount;\n };\n RunningEvent2.prototype.prepareEvent = function(event) {\n };\n RunningEvent2.prototype.getEmit = function(event) {\n return [event];\n };\n return RunningEvent2;\n }()\n );\n var ErrorRunningEvent = (\n /** @class */\n function(_super) {\n __extends4(ErrorRunningEvent2, _super);\n function ErrorRunningEvent2() {\n return _super.call(this, \"error\", null) || this;\n }\n return ErrorRunningEvent2;\n }(RunningEvent)\n );\n var FragmentRunningEvent = (\n /** @class */\n function(_super) {\n __extends4(FragmentRunningEvent2, _super);\n function FragmentRunningEvent2(address, contractInterface, fragment, topics) {\n var _this = this;\n var filter = {\n address\n };\n var topic = contractInterface.getEventTopic(fragment);\n if (topics) {\n if (topic !== topics[0]) {\n logger.throwArgumentError(\"topic mismatch\", \"topics\", topics);\n }\n filter.topics = topics.slice();\n } else {\n filter.topics = [topic];\n }\n _this = _super.call(this, getEventTag(filter), filter) || this;\n (0, properties_1.defineReadOnly)(_this, \"address\", address);\n (0, properties_1.defineReadOnly)(_this, \"interface\", contractInterface);\n (0, properties_1.defineReadOnly)(_this, \"fragment\", fragment);\n return _this;\n }\n FragmentRunningEvent2.prototype.prepareEvent = function(event) {\n var _this = this;\n _super.prototype.prepareEvent.call(this, event);\n event.event = this.fragment.name;\n event.eventSignature = this.fragment.format();\n event.decode = function(data, topics) {\n return _this.interface.decodeEventLog(_this.fragment, data, topics);\n };\n try {\n event.args = this.interface.decodeEventLog(this.fragment, event.data, event.topics);\n } catch (error) {\n event.args = null;\n event.decodeError = error;\n }\n };\n FragmentRunningEvent2.prototype.getEmit = function(event) {\n var errors = (0, abi_1.checkResultErrors)(event.args);\n if (errors.length) {\n throw errors[0].error;\n }\n var args = (event.args || []).slice();\n args.push(event);\n return args;\n };\n return FragmentRunningEvent2;\n }(RunningEvent)\n );\n var WildcardRunningEvent = (\n /** @class */\n function(_super) {\n __extends4(WildcardRunningEvent2, _super);\n function WildcardRunningEvent2(address, contractInterface) {\n var _this = _super.call(this, \"*\", { address }) || this;\n (0, properties_1.defineReadOnly)(_this, \"address\", address);\n (0, properties_1.defineReadOnly)(_this, \"interface\", contractInterface);\n return _this;\n }\n WildcardRunningEvent2.prototype.prepareEvent = function(event) {\n var _this = this;\n _super.prototype.prepareEvent.call(this, event);\n try {\n var parsed_1 = this.interface.parseLog(event);\n event.event = parsed_1.name;\n event.eventSignature = parsed_1.signature;\n event.decode = function(data, topics) {\n return _this.interface.decodeEventLog(parsed_1.eventFragment, data, topics);\n };\n event.args = parsed_1.args;\n } catch (error) {\n }\n };\n return WildcardRunningEvent2;\n }(RunningEvent)\n );\n var BaseContract = (\n /** @class */\n function() {\n function BaseContract2(addressOrName, contractInterface, signerOrProvider) {\n var _newTarget = this.constructor;\n var _this = this;\n (0, properties_1.defineReadOnly)(this, \"interface\", (0, properties_1.getStatic)(_newTarget, \"getInterface\")(contractInterface));\n if (signerOrProvider == null) {\n (0, properties_1.defineReadOnly)(this, \"provider\", null);\n (0, properties_1.defineReadOnly)(this, \"signer\", null);\n } else if (abstract_signer_1.Signer.isSigner(signerOrProvider)) {\n (0, properties_1.defineReadOnly)(this, \"provider\", signerOrProvider.provider || null);\n (0, properties_1.defineReadOnly)(this, \"signer\", signerOrProvider);\n } else if (abstract_provider_1.Provider.isProvider(signerOrProvider)) {\n (0, properties_1.defineReadOnly)(this, \"provider\", signerOrProvider);\n (0, properties_1.defineReadOnly)(this, \"signer\", null);\n } else {\n logger.throwArgumentError(\"invalid signer or provider\", \"signerOrProvider\", signerOrProvider);\n }\n (0, properties_1.defineReadOnly)(this, \"callStatic\", {});\n (0, properties_1.defineReadOnly)(this, \"estimateGas\", {});\n (0, properties_1.defineReadOnly)(this, \"functions\", {});\n (0, properties_1.defineReadOnly)(this, \"populateTransaction\", {});\n (0, properties_1.defineReadOnly)(this, \"filters\", {});\n {\n var uniqueFilters_1 = {};\n Object.keys(this.interface.events).forEach(function(eventSignature) {\n var event = _this.interface.events[eventSignature];\n (0, properties_1.defineReadOnly)(_this.filters, eventSignature, function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return {\n address: _this.address,\n topics: _this.interface.encodeFilterTopics(event, args)\n };\n });\n if (!uniqueFilters_1[event.name]) {\n uniqueFilters_1[event.name] = [];\n }\n uniqueFilters_1[event.name].push(eventSignature);\n });\n Object.keys(uniqueFilters_1).forEach(function(name) {\n var filters = uniqueFilters_1[name];\n if (filters.length === 1) {\n (0, properties_1.defineReadOnly)(_this.filters, name, _this.filters[filters[0]]);\n } else {\n logger.warn(\"Duplicate definition of \" + name + \" (\" + filters.join(\", \") + \")\");\n }\n });\n }\n (0, properties_1.defineReadOnly)(this, \"_runningEvents\", {});\n (0, properties_1.defineReadOnly)(this, \"_wrappedEmits\", {});\n if (addressOrName == null) {\n logger.throwArgumentError(\"invalid contract address or ENS name\", \"addressOrName\", addressOrName);\n }\n (0, properties_1.defineReadOnly)(this, \"address\", addressOrName);\n if (this.provider) {\n (0, properties_1.defineReadOnly)(this, \"resolvedAddress\", resolveName(this.provider, addressOrName));\n } else {\n try {\n (0, properties_1.defineReadOnly)(this, \"resolvedAddress\", Promise.resolve((0, address_1.getAddress)(addressOrName)));\n } catch (error) {\n logger.throwError(\"provider is required to use ENS name as contract address\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Contract\"\n });\n }\n }\n this.resolvedAddress.catch(function(e2) {\n });\n var uniqueNames = {};\n var uniqueSignatures = {};\n Object.keys(this.interface.functions).forEach(function(signature) {\n var fragment = _this.interface.functions[signature];\n if (uniqueSignatures[signature]) {\n logger.warn(\"Duplicate ABI entry for \" + JSON.stringify(signature));\n return;\n }\n uniqueSignatures[signature] = true;\n {\n var name_1 = fragment.name;\n if (!uniqueNames[\"%\" + name_1]) {\n uniqueNames[\"%\" + name_1] = [];\n }\n uniqueNames[\"%\" + name_1].push(signature);\n }\n if (_this[signature] == null) {\n (0, properties_1.defineReadOnly)(_this, signature, buildDefault(_this, fragment, true));\n }\n if (_this.functions[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.functions, signature, buildDefault(_this, fragment, false));\n }\n if (_this.callStatic[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.callStatic, signature, buildCall(_this, fragment, true));\n }\n if (_this.populateTransaction[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.populateTransaction, signature, buildPopulate(_this, fragment));\n }\n if (_this.estimateGas[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.estimateGas, signature, buildEstimate(_this, fragment));\n }\n });\n Object.keys(uniqueNames).forEach(function(name) {\n var signatures = uniqueNames[name];\n if (signatures.length > 1) {\n return;\n }\n name = name.substring(1);\n var signature = signatures[0];\n try {\n if (_this[name] == null) {\n (0, properties_1.defineReadOnly)(_this, name, _this[signature]);\n }\n } catch (e2) {\n }\n if (_this.functions[name] == null) {\n (0, properties_1.defineReadOnly)(_this.functions, name, _this.functions[signature]);\n }\n if (_this.callStatic[name] == null) {\n (0, properties_1.defineReadOnly)(_this.callStatic, name, _this.callStatic[signature]);\n }\n if (_this.populateTransaction[name] == null) {\n (0, properties_1.defineReadOnly)(_this.populateTransaction, name, _this.populateTransaction[signature]);\n }\n if (_this.estimateGas[name] == null) {\n (0, properties_1.defineReadOnly)(_this.estimateGas, name, _this.estimateGas[signature]);\n }\n });\n }\n BaseContract2.getContractAddress = function(transaction) {\n return (0, address_1.getContractAddress)(transaction);\n };\n BaseContract2.getInterface = function(contractInterface) {\n if (abi_1.Interface.isInterface(contractInterface)) {\n return contractInterface;\n }\n return new abi_1.Interface(contractInterface);\n };\n BaseContract2.prototype.deployed = function() {\n return this._deployed();\n };\n BaseContract2.prototype._deployed = function(blockTag) {\n var _this = this;\n if (!this._deployedPromise) {\n if (this.deployTransaction) {\n this._deployedPromise = this.deployTransaction.wait().then(function() {\n return _this;\n });\n } else {\n this._deployedPromise = this.provider.getCode(this.address, blockTag).then(function(code) {\n if (code === \"0x\") {\n logger.throwError(\"contract not deployed\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n contractAddress: _this.address,\n operation: \"getDeployed\"\n });\n }\n return _this;\n });\n }\n }\n return this._deployedPromise;\n };\n BaseContract2.prototype.fallback = function(overrides) {\n var _this = this;\n if (!this.signer) {\n logger.throwError(\"sending a transactions require a signer\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: \"sendTransaction(fallback)\" });\n }\n var tx = (0, properties_1.shallowCopy)(overrides || {});\n [\"from\", \"to\"].forEach(function(key) {\n if (tx[key] == null) {\n return;\n }\n logger.throwError(\"cannot override \" + key, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: key });\n });\n tx.to = this.resolvedAddress;\n return this.deployed().then(function() {\n return _this.signer.sendTransaction(tx);\n });\n };\n BaseContract2.prototype.connect = function(signerOrProvider) {\n if (typeof signerOrProvider === \"string\") {\n signerOrProvider = new abstract_signer_1.VoidSigner(signerOrProvider, this.provider);\n }\n var contract = new this.constructor(this.address, this.interface, signerOrProvider);\n if (this.deployTransaction) {\n (0, properties_1.defineReadOnly)(contract, \"deployTransaction\", this.deployTransaction);\n }\n return contract;\n };\n BaseContract2.prototype.attach = function(addressOrName) {\n return new this.constructor(addressOrName, this.interface, this.signer || this.provider);\n };\n BaseContract2.isIndexed = function(value) {\n return abi_1.Indexed.isIndexed(value);\n };\n BaseContract2.prototype._normalizeRunningEvent = function(runningEvent) {\n if (this._runningEvents[runningEvent.tag]) {\n return this._runningEvents[runningEvent.tag];\n }\n return runningEvent;\n };\n BaseContract2.prototype._getRunningEvent = function(eventName) {\n if (typeof eventName === \"string\") {\n if (eventName === \"error\") {\n return this._normalizeRunningEvent(new ErrorRunningEvent());\n }\n if (eventName === \"event\") {\n return this._normalizeRunningEvent(new RunningEvent(\"event\", null));\n }\n if (eventName === \"*\") {\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n }\n var fragment = this.interface.getEvent(eventName);\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment));\n }\n if (eventName.topics && eventName.topics.length > 0) {\n try {\n var topic = eventName.topics[0];\n if (typeof topic !== \"string\") {\n throw new Error(\"invalid topic\");\n }\n var fragment = this.interface.getEvent(topic);\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment, eventName.topics));\n } catch (error) {\n }\n var filter = {\n address: this.address,\n topics: eventName.topics\n };\n return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter), filter));\n }\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n };\n BaseContract2.prototype._checkRunningEvents = function(runningEvent) {\n if (runningEvent.listenerCount() === 0) {\n delete this._runningEvents[runningEvent.tag];\n var emit2 = this._wrappedEmits[runningEvent.tag];\n if (emit2 && runningEvent.filter) {\n this.provider.off(runningEvent.filter, emit2);\n delete this._wrappedEmits[runningEvent.tag];\n }\n }\n };\n BaseContract2.prototype._wrapEvent = function(runningEvent, log, listener) {\n var _this = this;\n var event = (0, properties_1.deepCopy)(log);\n event.removeListener = function() {\n if (!listener) {\n return;\n }\n runningEvent.removeListener(listener);\n _this._checkRunningEvents(runningEvent);\n };\n event.getBlock = function() {\n return _this.provider.getBlock(log.blockHash);\n };\n event.getTransaction = function() {\n return _this.provider.getTransaction(log.transactionHash);\n };\n event.getTransactionReceipt = function() {\n return _this.provider.getTransactionReceipt(log.transactionHash);\n };\n runningEvent.prepareEvent(event);\n return event;\n };\n BaseContract2.prototype._addEventListener = function(runningEvent, listener, once2) {\n var _this = this;\n if (!this.provider) {\n logger.throwError(\"events require a provider or a signer with a provider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: \"once\" });\n }\n runningEvent.addListener(listener, once2);\n this._runningEvents[runningEvent.tag] = runningEvent;\n if (!this._wrappedEmits[runningEvent.tag]) {\n var wrappedEmit = function(log) {\n var event = _this._wrapEvent(runningEvent, log, listener);\n if (event.decodeError == null) {\n try {\n var args = runningEvent.getEmit(event);\n _this.emit.apply(_this, __spreadArray3([runningEvent.filter], args, false));\n } catch (error) {\n event.decodeError = error.error;\n }\n }\n if (runningEvent.filter != null) {\n _this.emit(\"event\", event);\n }\n if (event.decodeError != null) {\n _this.emit(\"error\", event.decodeError, event);\n }\n };\n this._wrappedEmits[runningEvent.tag] = wrappedEmit;\n if (runningEvent.filter != null) {\n this.provider.on(runningEvent.filter, wrappedEmit);\n }\n }\n };\n BaseContract2.prototype.queryFilter = function(event, fromBlockOrBlockhash, toBlock) {\n var _this = this;\n var runningEvent = this._getRunningEvent(event);\n var filter = (0, properties_1.shallowCopy)(runningEvent.filter);\n if (typeof fromBlockOrBlockhash === \"string\" && (0, bytes_1.isHexString)(fromBlockOrBlockhash, 32)) {\n if (toBlock != null) {\n logger.throwArgumentError(\"cannot specify toBlock with blockhash\", \"toBlock\", toBlock);\n }\n filter.blockHash = fromBlockOrBlockhash;\n } else {\n filter.fromBlock = fromBlockOrBlockhash != null ? fromBlockOrBlockhash : 0;\n filter.toBlock = toBlock != null ? toBlock : \"latest\";\n }\n return this.provider.getLogs(filter).then(function(logs) {\n return logs.map(function(log) {\n return _this._wrapEvent(runningEvent, log, null);\n });\n });\n };\n BaseContract2.prototype.on = function(event, listener) {\n this._addEventListener(this._getRunningEvent(event), listener, false);\n return this;\n };\n BaseContract2.prototype.once = function(event, listener) {\n this._addEventListener(this._getRunningEvent(event), listener, true);\n return this;\n };\n BaseContract2.prototype.emit = function(eventName) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!this.provider) {\n return false;\n }\n var runningEvent = this._getRunningEvent(eventName);\n var result = runningEvent.run(args) > 0;\n this._checkRunningEvents(runningEvent);\n return result;\n };\n BaseContract2.prototype.listenerCount = function(eventName) {\n var _this = this;\n if (!this.provider) {\n return 0;\n }\n if (eventName == null) {\n return Object.keys(this._runningEvents).reduce(function(accum, key) {\n return accum + _this._runningEvents[key].listenerCount();\n }, 0);\n }\n return this._getRunningEvent(eventName).listenerCount();\n };\n BaseContract2.prototype.listeners = function(eventName) {\n if (!this.provider) {\n return [];\n }\n if (eventName == null) {\n var result_1 = [];\n for (var tag in this._runningEvents) {\n this._runningEvents[tag].listeners().forEach(function(listener) {\n result_1.push(listener);\n });\n }\n return result_1;\n }\n return this._getRunningEvent(eventName).listeners();\n };\n BaseContract2.prototype.removeAllListeners = function(eventName) {\n if (!this.provider) {\n return this;\n }\n if (eventName == null) {\n for (var tag in this._runningEvents) {\n var runningEvent_1 = this._runningEvents[tag];\n runningEvent_1.removeAllListeners();\n this._checkRunningEvents(runningEvent_1);\n }\n return this;\n }\n var runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeAllListeners();\n this._checkRunningEvents(runningEvent);\n return this;\n };\n BaseContract2.prototype.off = function(eventName, listener) {\n if (!this.provider) {\n return this;\n }\n var runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeListener(listener);\n this._checkRunningEvents(runningEvent);\n return this;\n };\n BaseContract2.prototype.removeListener = function(eventName, listener) {\n return this.off(eventName, listener);\n };\n return BaseContract2;\n }()\n );\n exports3.BaseContract = BaseContract;\n var Contract = (\n /** @class */\n function(_super) {\n __extends4(Contract2, _super);\n function Contract2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Contract2;\n }(BaseContract)\n );\n exports3.Contract = Contract;\n var ContractFactory = (\n /** @class */\n function() {\n function ContractFactory2(contractInterface, bytecode, signer) {\n var _newTarget = this.constructor;\n var bytecodeHex = null;\n if (typeof bytecode === \"string\") {\n bytecodeHex = bytecode;\n } else if ((0, bytes_1.isBytes)(bytecode)) {\n bytecodeHex = (0, bytes_1.hexlify)(bytecode);\n } else if (bytecode && typeof bytecode.object === \"string\") {\n bytecodeHex = bytecode.object;\n } else {\n bytecodeHex = \"!\";\n }\n if (bytecodeHex.substring(0, 2) !== \"0x\") {\n bytecodeHex = \"0x\" + bytecodeHex;\n }\n if (!(0, bytes_1.isHexString)(bytecodeHex) || bytecodeHex.length % 2) {\n logger.throwArgumentError(\"invalid bytecode\", \"bytecode\", bytecode);\n }\n if (signer && !abstract_signer_1.Signer.isSigner(signer)) {\n logger.throwArgumentError(\"invalid signer\", \"signer\", signer);\n }\n (0, properties_1.defineReadOnly)(this, \"bytecode\", bytecodeHex);\n (0, properties_1.defineReadOnly)(this, \"interface\", (0, properties_1.getStatic)(_newTarget, \"getInterface\")(contractInterface));\n (0, properties_1.defineReadOnly)(this, \"signer\", signer || null);\n }\n ContractFactory2.prototype.getDeployTransaction = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var tx = {};\n if (args.length === this.interface.deploy.inputs.length + 1 && typeof args[args.length - 1] === \"object\") {\n tx = (0, properties_1.shallowCopy)(args.pop());\n for (var key in tx) {\n if (!allowedTransactionKeys[key]) {\n throw new Error(\"unknown transaction override \" + key);\n }\n }\n }\n [\"data\", \"from\", \"to\"].forEach(function(key2) {\n if (tx[key2] == null) {\n return;\n }\n logger.throwError(\"cannot override \" + key2, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: key2 });\n });\n if (tx.value) {\n var value = bignumber_1.BigNumber.from(tx.value);\n if (!value.isZero() && !this.interface.deploy.payable) {\n logger.throwError(\"non-payable constructor cannot override value\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: tx.value\n });\n }\n }\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n tx.data = (0, bytes_1.hexlify)((0, bytes_1.concat)([\n this.bytecode,\n this.interface.encodeDeploy(args)\n ]));\n return tx;\n };\n ContractFactory2.prototype.deploy = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter4(this, void 0, void 0, function() {\n var overrides, params, unsignedTx, tx, address, contract;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n overrides = {};\n if (args.length === this.interface.deploy.inputs.length + 1) {\n overrides = args.pop();\n }\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n return [4, resolveAddresses(this.signer, args, this.interface.deploy.inputs)];\n case 1:\n params = _a.sent();\n params.push(overrides);\n unsignedTx = this.getDeployTransaction.apply(this, params);\n return [4, this.signer.sendTransaction(unsignedTx)];\n case 2:\n tx = _a.sent();\n address = (0, properties_1.getStatic)(this.constructor, \"getContractAddress\")(tx);\n contract = (0, properties_1.getStatic)(this.constructor, \"getContract\")(address, this.interface, this.signer);\n addContractWait(contract, tx);\n (0, properties_1.defineReadOnly)(contract, \"deployTransaction\", tx);\n return [2, contract];\n }\n });\n });\n };\n ContractFactory2.prototype.attach = function(address) {\n return this.constructor.getContract(address, this.interface, this.signer);\n };\n ContractFactory2.prototype.connect = function(signer) {\n return new this.constructor(this.interface, this.bytecode, signer);\n };\n ContractFactory2.fromSolidity = function(compilerOutput, signer) {\n if (compilerOutput == null) {\n logger.throwError(\"missing compiler output\", logger_1.Logger.errors.MISSING_ARGUMENT, { argument: \"compilerOutput\" });\n }\n if (typeof compilerOutput === \"string\") {\n compilerOutput = JSON.parse(compilerOutput);\n }\n var abi2 = compilerOutput.abi;\n var bytecode = null;\n if (compilerOutput.bytecode) {\n bytecode = compilerOutput.bytecode;\n } else if (compilerOutput.evm && compilerOutput.evm.bytecode) {\n bytecode = compilerOutput.evm.bytecode;\n }\n return new this(abi2, bytecode, signer);\n };\n ContractFactory2.getInterface = function(contractInterface) {\n return Contract.getInterface(contractInterface);\n };\n ContractFactory2.getContractAddress = function(tx) {\n return (0, address_1.getContractAddress)(tx);\n };\n ContractFactory2.getContract = function(address, contractInterface, signer) {\n return new Contract(address, contractInterface, signer);\n };\n return ContractFactory2;\n }()\n );\n exports3.ContractFactory = ContractFactory;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+basex@5.8.0/node_modules/@ethersproject/basex/lib/index.js\n var require_lib19 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+basex@5.8.0/node_modules/@ethersproject/basex/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Base58 = exports3.Base32 = exports3.BaseX = void 0;\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var BaseX = (\n /** @class */\n function() {\n function BaseX2(alphabet2) {\n (0, properties_1.defineReadOnly)(this, \"alphabet\", alphabet2);\n (0, properties_1.defineReadOnly)(this, \"base\", alphabet2.length);\n (0, properties_1.defineReadOnly)(this, \"_alphabetMap\", {});\n (0, properties_1.defineReadOnly)(this, \"_leader\", alphabet2.charAt(0));\n for (var i3 = 0; i3 < alphabet2.length; i3++) {\n this._alphabetMap[alphabet2.charAt(i3)] = i3;\n }\n }\n BaseX2.prototype.encode = function(value) {\n var source = (0, bytes_1.arrayify)(value);\n if (source.length === 0) {\n return \"\";\n }\n var digits = [0];\n for (var i3 = 0; i3 < source.length; ++i3) {\n var carry = source[i3];\n for (var j2 = 0; j2 < digits.length; ++j2) {\n carry += digits[j2] << 8;\n digits[j2] = carry % this.base;\n carry = carry / this.base | 0;\n }\n while (carry > 0) {\n digits.push(carry % this.base);\n carry = carry / this.base | 0;\n }\n }\n var string = \"\";\n for (var k4 = 0; source[k4] === 0 && k4 < source.length - 1; ++k4) {\n string += this._leader;\n }\n for (var q3 = digits.length - 1; q3 >= 0; --q3) {\n string += this.alphabet[digits[q3]];\n }\n return string;\n };\n BaseX2.prototype.decode = function(value) {\n if (typeof value !== \"string\") {\n throw new TypeError(\"Expected String\");\n }\n var bytes = [];\n if (value.length === 0) {\n return new Uint8Array(bytes);\n }\n bytes.push(0);\n for (var i3 = 0; i3 < value.length; i3++) {\n var byte = this._alphabetMap[value[i3]];\n if (byte === void 0) {\n throw new Error(\"Non-base\" + this.base + \" character\");\n }\n var carry = byte;\n for (var j2 = 0; j2 < bytes.length; ++j2) {\n carry += bytes[j2] * this.base;\n bytes[j2] = carry & 255;\n carry >>= 8;\n }\n while (carry > 0) {\n bytes.push(carry & 255);\n carry >>= 8;\n }\n }\n for (var k4 = 0; value[k4] === this._leader && k4 < value.length - 1; ++k4) {\n bytes.push(0);\n }\n return (0, bytes_1.arrayify)(new Uint8Array(bytes.reverse()));\n };\n return BaseX2;\n }()\n );\n exports3.BaseX = BaseX;\n var Base32 = new BaseX(\"abcdefghijklmnopqrstuvwxyz234567\");\n exports3.Base32 = Base32;\n var Base58 = new BaseX(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\");\n exports3.Base58 = Base58;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/types.js\n var require_types3 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/types.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SupportedAlgorithm = void 0;\n var SupportedAlgorithm;\n (function(SupportedAlgorithm2) {\n SupportedAlgorithm2[\"sha256\"] = \"sha256\";\n SupportedAlgorithm2[\"sha512\"] = \"sha512\";\n })(SupportedAlgorithm = exports3.SupportedAlgorithm || (exports3.SupportedAlgorithm = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/_version.js\n var require_version15 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"sha2/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/browser-sha2.js\n var require_browser_sha2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/browser-sha2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.computeHmac = exports3.sha512 = exports3.sha256 = exports3.ripemd160 = void 0;\n var hash_js_1 = __importDefault4(require_hash());\n var bytes_1 = require_lib2();\n var types_1 = require_types3();\n var logger_1 = require_lib();\n var _version_1 = require_version15();\n var logger = new logger_1.Logger(_version_1.version);\n function ripemd1602(data) {\n return \"0x\" + hash_js_1.default.ripemd160().update((0, bytes_1.arrayify)(data)).digest(\"hex\");\n }\n exports3.ripemd160 = ripemd1602;\n function sha2564(data) {\n return \"0x\" + hash_js_1.default.sha256().update((0, bytes_1.arrayify)(data)).digest(\"hex\");\n }\n exports3.sha256 = sha2564;\n function sha5122(data) {\n return \"0x\" + hash_js_1.default.sha512().update((0, bytes_1.arrayify)(data)).digest(\"hex\");\n }\n exports3.sha512 = sha5122;\n function computeHmac(algorithm, key, data) {\n if (!types_1.SupportedAlgorithm[algorithm]) {\n logger.throwError(\"unsupported algorithm \" + algorithm, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"hmac\",\n algorithm\n });\n }\n return \"0x\" + hash_js_1.default.hmac(hash_js_1.default[algorithm], (0, bytes_1.arrayify)(key)).update((0, bytes_1.arrayify)(data)).digest(\"hex\");\n }\n exports3.computeHmac = computeHmac;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/index.js\n var require_lib20 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+sha2@5.8.0/node_modules/@ethersproject/sha2/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SupportedAlgorithm = exports3.sha512 = exports3.sha256 = exports3.ripemd160 = exports3.computeHmac = void 0;\n var sha2_1 = require_browser_sha2();\n Object.defineProperty(exports3, \"computeHmac\", { enumerable: true, get: function() {\n return sha2_1.computeHmac;\n } });\n Object.defineProperty(exports3, \"ripemd160\", { enumerable: true, get: function() {\n return sha2_1.ripemd160;\n } });\n Object.defineProperty(exports3, \"sha256\", { enumerable: true, get: function() {\n return sha2_1.sha256;\n } });\n Object.defineProperty(exports3, \"sha512\", { enumerable: true, get: function() {\n return sha2_1.sha512;\n } });\n var types_1 = require_types3();\n Object.defineProperty(exports3, \"SupportedAlgorithm\", { enumerable: true, get: function() {\n return types_1.SupportedAlgorithm;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+pbkdf2@5.8.0/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.js\n var require_browser_pbkdf2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+pbkdf2@5.8.0/node_modules/@ethersproject/pbkdf2/lib/browser-pbkdf2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pbkdf2 = void 0;\n var bytes_1 = require_lib2();\n var sha2_1 = require_lib20();\n function pbkdf22(password, salt, iterations, keylen, hashAlgorithm) {\n password = (0, bytes_1.arrayify)(password);\n salt = (0, bytes_1.arrayify)(salt);\n var hLen;\n var l6 = 1;\n var DK = new Uint8Array(keylen);\n var block1 = new Uint8Array(salt.length + 4);\n block1.set(salt);\n var r2;\n var T4;\n for (var i3 = 1; i3 <= l6; i3++) {\n block1[salt.length] = i3 >> 24 & 255;\n block1[salt.length + 1] = i3 >> 16 & 255;\n block1[salt.length + 2] = i3 >> 8 & 255;\n block1[salt.length + 3] = i3 & 255;\n var U4 = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(hashAlgorithm, password, block1));\n if (!hLen) {\n hLen = U4.length;\n T4 = new Uint8Array(hLen);\n l6 = Math.ceil(keylen / hLen);\n r2 = keylen - (l6 - 1) * hLen;\n }\n T4.set(U4);\n for (var j2 = 1; j2 < iterations; j2++) {\n U4 = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(hashAlgorithm, password, U4));\n for (var k4 = 0; k4 < hLen; k4++)\n T4[k4] ^= U4[k4];\n }\n var destPos = (i3 - 1) * hLen;\n var len = i3 === l6 ? r2 : hLen;\n DK.set((0, bytes_1.arrayify)(T4).slice(0, len), destPos);\n }\n return (0, bytes_1.hexlify)(DK);\n }\n exports3.pbkdf2 = pbkdf22;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+pbkdf2@5.8.0/node_modules/@ethersproject/pbkdf2/lib/index.js\n var require_lib21 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+pbkdf2@5.8.0/node_modules/@ethersproject/pbkdf2/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pbkdf2 = void 0;\n var pbkdf2_1 = require_browser_pbkdf2();\n Object.defineProperty(exports3, \"pbkdf2\", { enumerable: true, get: function() {\n return pbkdf2_1.pbkdf2;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/_version.js\n var require_version16 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"wordlists/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/wordlist.js\n var require_wordlist = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/wordlist.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wordlist = exports3.logger = void 0;\n var exportWordlist = false;\n var hash_1 = require_lib12();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version16();\n exports3.logger = new logger_1.Logger(_version_1.version);\n var Wordlist = (\n /** @class */\n function() {\n function Wordlist2(locale) {\n var _newTarget = this.constructor;\n exports3.logger.checkAbstract(_newTarget, Wordlist2);\n (0, properties_1.defineReadOnly)(this, \"locale\", locale);\n }\n Wordlist2.prototype.split = function(mnemonic) {\n return mnemonic.toLowerCase().split(/ +/g);\n };\n Wordlist2.prototype.join = function(words) {\n return words.join(\" \");\n };\n Wordlist2.check = function(wordlist) {\n var words = [];\n for (var i3 = 0; i3 < 2048; i3++) {\n var word = wordlist.getWord(i3);\n if (i3 !== wordlist.getWordIndex(word)) {\n return \"0x\";\n }\n words.push(word);\n }\n return (0, hash_1.id)(words.join(\"\\n\") + \"\\n\");\n };\n Wordlist2.register = function(lang, name) {\n if (!name) {\n name = lang.locale;\n }\n if (exportWordlist) {\n try {\n var anyGlobal = window;\n if (anyGlobal._ethers && anyGlobal._ethers.wordlists) {\n if (!anyGlobal._ethers.wordlists[name]) {\n (0, properties_1.defineReadOnly)(anyGlobal._ethers.wordlists, name, lang);\n }\n }\n } catch (error) {\n }\n }\n };\n return Wordlist2;\n }()\n );\n exports3.Wordlist = Wordlist;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-cz.js\n var require_lang_cz = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-cz.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langCz = void 0;\n var wordlist_1 = require_wordlist();\n var words = \"AbdikaceAbecedaAdresaAgreseAkceAktovkaAlejAlkoholAmputaceAnanasAndulkaAnekdotaAnketaAntikaAnulovatArchaAroganceAsfaltAsistentAspiraceAstmaAstronomAtlasAtletikaAtolAutobusAzylBabkaBachorBacilBaculkaBadatelBagetaBagrBahnoBakterieBaladaBaletkaBalkonBalonekBalvanBalzaBambusBankomatBarbarBaretBarmanBarokoBarvaBaterkaBatohBavlnaBazalkaBazilikaBazukaBednaBeranBesedaBestieBetonBezinkaBezmocBeztakBicyklBidloBiftekBikinyBilanceBiografBiologBitvaBizonBlahobytBlatouchBlechaBleduleBleskBlikatBliznaBlokovatBlouditBludBobekBobrBodlinaBodnoutBohatostBojkotBojovatBokorysBolestBorecBoroviceBotaBoubelBouchatBoudaBouleBouratBoxerBradavkaBramboraBrankaBratrBreptaBriketaBrkoBrlohBronzBroskevBrunetkaBrusinkaBrzdaBrzyBublinaBubnovatBuchtaBuditelBudkaBudovaBufetBujarostBukviceBuldokBulvaBundaBunkrBurzaButikBuvolBuzolaBydletBylinaBytovkaBzukotCapartCarevnaCedrCeduleCejchCejnCelaCelerCelkemCelniceCeninaCennostCenovkaCentrumCenzorCestopisCetkaChalupaChapadloCharitaChataChechtatChemieChichotChirurgChladChlebaChlubitChmelChmuraChobotChocholChodbaCholeraChomoutChopitChorobaChovChrapotChrlitChrtChrupChtivostChudinaChutnatChvatChvilkaChvostChybaChystatChytitCibuleCigaretaCihelnaCihlaCinkotCirkusCisternaCitaceCitrusCizinecCizostClonaCokolivCouvatCtitelCtnostCudnostCuketaCukrCupotCvaknoutCvalCvikCvrkotCyklistaDalekoDarebaDatelDatumDceraDebataDechovkaDecibelDeficitDeflaceDeklDekretDemokratDepreseDerbyDeskaDetektivDikobrazDiktovatDiodaDiplomDiskDisplejDivadloDivochDlahaDlouhoDluhopisDnesDobroDobytekDocentDochutitDodnesDohledDohodaDohraDojemDojniceDokladDokolaDoktorDokumentDolarDolevaDolinaDomaDominantDomluvitDomovDonutitDopadDopisDoplnitDoposudDoprovodDopustitDorazitDorostDortDosahDoslovDostatekDosudDosytaDotazDotekDotknoutDoufatDoutnatDovozceDozaduDoznatDozorceDrahotaDrakDramatikDravecDrazeDrdolDrobnostDrogerieDrozdDrsnostDrtitDrzostDubenDuchovnoDudekDuhaDuhovkaDusitDusnoDutostDvojiceDvorecDynamitEkologEkonomieElektronElipsaEmailEmiseEmoceEmpatieEpizodaEpochaEpopejEposEsejEsenceEskortaEskymoEtiketaEuforieEvoluceExekuceExkurzeExpediceExplozeExportExtraktFackaFajfkaFakultaFanatikFantazieFarmacieFavoritFazoleFederaceFejetonFenkaFialkaFigurantFilozofFiltrFinanceFintaFixaceFjordFlanelFlirtFlotilaFondFosforFotbalFotkaFotonFrakceFreskaFrontaFukarFunkceFyzikaGalejeGarantGenetikaGeologGilotinaGlazuraGlejtGolemGolfistaGotikaGrafGramofonGranuleGrepGrilGrogGroteskaGumaHadiceHadrHalaHalenkaHanbaHanopisHarfaHarpunaHavranHebkostHejkalHejnoHejtmanHektarHelmaHematomHerecHernaHesloHezkyHistorikHladovkaHlasivkyHlavaHledatHlenHlodavecHlohHloupostHltatHlubinaHluchotaHmatHmotaHmyzHnisHnojivoHnoutHoblinaHobojHochHodinyHodlatHodnotaHodovatHojnostHokejHolinkaHolkaHolubHomoleHonitbaHonoraceHoralHordaHorizontHorkoHorlivecHormonHorninaHoroskopHorstvoHospodaHostinaHotovostHoubaHoufHoupatHouskaHovorHradbaHraniceHravostHrazdaHrbolekHrdinaHrdloHrdostHrnekHrobkaHromadaHrotHroudaHrozenHrstkaHrubostHryzatHubenostHubnoutHudbaHukotHumrHusitaHustotaHvozdHybnostHydrantHygienaHymnaHysterikIdylkaIhnedIkonaIluzeImunitaInfekceInflaceInkasoInovaceInspekceInternetInvalidaInvestorInzerceIronieJablkoJachtaJahodaJakmileJakostJalovecJantarJarmarkJaroJasanJasnoJatkaJavorJazykJedinecJedleJednatelJehlanJekotJelenJelitoJemnostJenomJepiceJeseterJevitJezdecJezeroJinakJindyJinochJiskraJistotaJitrniceJizvaJmenovatJogurtJurtaKabaretKabelKabinetKachnaKadetKadidloKahanKajakKajutaKakaoKaktusKalamitaKalhotyKalibrKalnostKameraKamkolivKamnaKanibalKanoeKantorKapalinaKapelaKapitolaKapkaKapleKapotaKaprKapustaKapybaraKaramelKarotkaKartonKasaKatalogKatedraKauceKauzaKavalecKazajkaKazetaKazivostKdekolivKdesiKedlubenKempKeramikaKinoKlacekKladivoKlamKlapotKlasikaKlaunKlecKlenbaKlepatKlesnoutKlidKlimaKlisnaKloboukKlokanKlopaKloubKlubovnaKlusatKluzkostKmenKmitatKmotrKnihaKnotKoaliceKoberecKobkaKoblihaKobylaKocourKohoutKojenecKokosKoktejlKolapsKoledaKolizeKoloKomandoKometaKomikKomnataKomoraKompasKomunitaKonatKonceptKondiceKonecKonfeseKongresKoninaKonkursKontaktKonzervaKopanecKopieKopnoutKoprovkaKorbelKorektorKormidloKoroptevKorpusKorunaKorytoKorzetKosatecKostkaKotelKotletaKotoulKoukatKoupelnaKousekKouzloKovbojKozaKozorohKrabiceKrachKrajinaKralovatKrasopisKravataKreditKrejcarKresbaKrevetaKriketKritikKrizeKrkavecKrmelecKrmivoKrocanKrokKronikaKropitKroupaKrovkaKrtekKruhadloKrupiceKrutostKrvinkaKrychleKryptaKrystalKrytKudlankaKufrKujnostKuklaKulajdaKulichKulkaKulometKulturaKunaKupodivuKurtKurzorKutilKvalitaKvasinkaKvestorKynologKyselinaKytaraKyticeKytkaKytovecKyvadloLabradorLachtanLadnostLaikLakomecLamelaLampaLanovkaLasiceLasoLasturaLatinkaLavinaLebkaLeckdyLedenLedniceLedovkaLedvinaLegendaLegieLegraceLehceLehkostLehnoutLektvarLenochodLentilkaLepenkaLepidloLetadloLetecLetmoLetokruhLevhartLevitaceLevobokLibraLichotkaLidojedLidskostLihovinaLijavecLilekLimetkaLinieLinkaLinoleumListopadLitinaLitovatLobistaLodivodLogikaLogopedLokalitaLoketLomcovatLopataLopuchLordLososLotrLoudalLouhLoukaLouskatLovecLstivostLucernaLuciferLumpLuskLustraceLviceLyraLyrikaLysinaMadamMadloMagistrMahagonMajetekMajitelMajoritaMakakMakoviceMakrelaMalbaMalinaMalovatMalviceMaminkaMandleMankoMarnostMasakrMaskotMasopustMaticeMatrikaMaturitaMazanecMazivoMazlitMazurkaMdlobaMechanikMeditaceMedovinaMelasaMelounMentolkaMetlaMetodaMetrMezeraMigraceMihnoutMihuleMikinaMikrofonMilenecMilimetrMilostMimikaMincovnaMinibarMinometMinulostMiskaMistrMixovatMladostMlhaMlhovinaMlokMlsatMluvitMnichMnohemMobilMocnostModelkaModlitbaMohylaMokroMolekulaMomentkaMonarchaMonoklMonstrumMontovatMonzunMosazMoskytMostMotivaceMotorkaMotykaMouchaMoudrostMozaikaMozekMozolMramorMravenecMrkevMrtvolaMrzetMrzutostMstitelMudrcMuflonMulatMumieMuniceMusetMutaceMuzeumMuzikantMyslivecMzdaNabouratNachytatNadaceNadbytekNadhozNadobroNadpisNahlasNahnatNahodileNahraditNaivitaNajednouNajistoNajmoutNaklonitNakonecNakrmitNalevoNamazatNamluvitNanometrNaokoNaopakNaostroNapadatNapevnoNaplnitNapnoutNaposledNaprostoNaroditNarubyNarychloNasaditNasekatNaslepoNastatNatolikNavenekNavrchNavzdoryNazvatNebeNechatNeckyNedalekoNedbatNeduhNegaceNehetNehodaNejenNejprveNeklidNelibostNemilostNemocNeochotaNeonkaNepokojNerostNervNesmyslNesouladNetvorNeuronNevinaNezvykleNicotaNijakNikamNikdyNiklNikterakNitroNoclehNohaviceNominaceNoraNorekNositelNosnostNouzeNovinyNovotaNozdraNudaNudleNugetNutitNutnostNutrieNymfaObalObarvitObavaObdivObecObehnatObejmoutObezitaObhajobaObilniceObjasnitObjektObklopitOblastOblekOblibaOblohaObludaObnosObohatitObojekOboutObrazecObrnaObrubaObrysObsahObsluhaObstaratObuvObvazObvinitObvodObvykleObyvatelObzorOcasOcelOcenitOchladitOchotaOchranaOcitnoutOdbojOdbytOdchodOdcizitOdebratOdeslatOdevzdatOdezvaOdhadceOdhoditOdjetOdjinudOdkazOdkoupitOdlivOdlukaOdmlkaOdolnostOdpadOdpisOdploutOdporOdpustitOdpykatOdrazkaOdsouditOdstupOdsunOdtokOdtudOdvahaOdvetaOdvolatOdvracetOdznakOfinaOfsajdOhlasOhniskoOhradaOhrozitOhryzekOkapOkeniceOklikaOknoOkouzlitOkovyOkrasaOkresOkrsekOkruhOkupantOkurkaOkusitOlejninaOlizovatOmakOmeletaOmezitOmladinaOmlouvatOmluvaOmylOnehdyOpakovatOpasekOperaceOpiceOpilostOpisovatOporaOpoziceOpravduOprotiOrbitalOrchestrOrgieOrliceOrlojOrtelOsadaOschnoutOsikaOsivoOslavaOslepitOslnitOslovitOsnovaOsobaOsolitOspalecOstenOstrahaOstudaOstychOsvojitOteplitOtiskOtopOtrhatOtrlostOtrokOtrubyOtvorOvanoutOvarOvesOvlivnitOvoceOxidOzdobaPachatelPacientPadouchPahorekPaktPalandaPalecPalivoPalubaPamfletPamlsekPanenkaPanikaPannaPanovatPanstvoPantoflePaprikaParketaParodiePartaParukaParybaPasekaPasivitaPastelkaPatentPatronaPavoukPaznehtPazourekPeckaPedagogPejsekPekloPelotonPenaltaPendrekPenzePeriskopPeroPestrostPetardaPeticePetrolejPevninaPexesoPianistaPihaPijavicePiklePiknikPilinaPilnostPilulkaPinzetaPipetaPisatelPistolePitevnaPivnicePivovarPlacentaPlakatPlamenPlanetaPlastikaPlatitPlavidloPlazPlechPlemenoPlentaPlesPletivoPlevelPlivatPlnitPlnoPlochaPlodinaPlombaPloutPlukPlynPobavitPobytPochodPocitPoctivecPodatPodcenitPodepsatPodhledPodivitPodkladPodmanitPodnikPodobaPodporaPodrazPodstataPodvodPodzimPoeziePohankaPohnutkaPohovorPohromaPohybPointaPojistkaPojmoutPokazitPoklesPokojPokrokPokutaPokynPolednePolibekPolknoutPolohaPolynomPomaluPominoutPomlkaPomocPomstaPomysletPonechatPonorkaPonurostPopadatPopelPopisekPoplachPoprositPopsatPopudPoradcePorcePorodPoruchaPoryvPosaditPosedPosilaPoskokPoslanecPosouditPospoluPostavaPosudekPosypPotahPotkanPotleskPotomekPotravaPotupaPotvoraPoukazPoutoPouzdroPovahaPovidlaPovlakPovozPovrchPovstatPovykPovzdechPozdravPozemekPoznatekPozorPozvatPracovatPrahoryPraktikaPralesPraotecPraporekPrasePravdaPrincipPrknoProbuditProcentoProdejProfeseProhraProjektProlomitPromilePronikatPropadProrokProsbaProtonProutekProvazPrskavkaPrstenPrudkostPrutPrvekPrvohoryPsanecPsovodPstruhPtactvoPubertaPuchPudlPukavecPuklinaPukrlePultPumpaPuncPupenPusaPusinkaPustinaPutovatPutykaPyramidaPyskPytelRacekRachotRadiaceRadniceRadonRaftRagbyRaketaRakovinaRamenoRampouchRandeRarachRaritaRasovnaRastrRatolestRazanceRazidloReagovatReakceReceptRedaktorReferentReflexRejnokReklamaRekordRekrutRektorReputaceRevizeRevmaRevolverRezervaRiskovatRizikoRobotikaRodokmenRohovkaRokleRokokoRomanetoRopovodRopuchaRorejsRosolRostlinaRotmistrRotopedRotundaRoubenkaRouchoRoupRouraRovinaRovniceRozborRozchodRozdatRozeznatRozhodceRozinkaRozjezdRozkazRozlohaRozmarRozpadRozruchRozsahRoztokRozumRozvodRubrikaRuchadloRukaviceRukopisRybaRybolovRychlostRydloRypadloRytinaRyzostSadistaSahatSakoSamecSamizdatSamotaSanitkaSardinkaSasankaSatelitSazbaSazeniceSborSchovatSebrankaSeceseSedadloSedimentSedloSehnatSejmoutSekeraSektaSekundaSekvojeSemenoSenoServisSesaditSeshoraSeskokSeslatSestraSesuvSesypatSetbaSetinaSetkatSetnoutSetrvatSeverSeznamShodaShrnoutSifonSilniceSirkaSirotekSirupSituaceSkafandrSkaliskoSkanzenSkautSkeptikSkicaSkladbaSkleniceSkloSkluzSkobaSkokanSkoroSkriptaSkrzSkupinaSkvostSkvrnaSlabikaSladidloSlaninaSlastSlavnostSledovatSlepecSlevaSlezinaSlibSlinaSlizniceSlonSloupekSlovoSluchSluhaSlunceSlupkaSlzaSmaragdSmetanaSmilstvoSmlouvaSmogSmradSmrkSmrtkaSmutekSmyslSnadSnahaSnobSobotaSochaSodovkaSokolSopkaSotvaSoubojSoucitSoudceSouhlasSouladSoumrakSoupravaSousedSoutokSouvisetSpalovnaSpasitelSpisSplavSpodekSpojenecSpoluSponzorSpornostSpoustaSprchaSpustitSrandaSrazSrdceSrnaSrnecSrovnatSrpenSrstSrubStaniceStarostaStatikaStavbaStehnoStezkaStodolaStolekStopaStornoStoupatStrachStresStrhnoutStromStrunaStudnaStupniceStvolStykSubjektSubtropySucharSudostSuknoSundatSunoutSurikataSurovinaSvahSvalstvoSvetrSvatbaSvazekSvisleSvitekSvobodaSvodidloSvorkaSvrabSykavkaSykotSynekSynovecSypatSypkostSyrovostSyselSytostTabletkaTabuleTahounTajemnoTajfunTajgaTajitTajnostTaktikaTamhleTamponTancovatTanecTankerTapetaTaveninaTazatelTechnikaTehdyTekutinaTelefonTemnotaTendenceTenistaTenorTeplotaTepnaTeprveTerapieTermoskaTextilTichoTiskopisTitulekTkadlecTkaninaTlapkaTleskatTlukotTlupaTmelToaletaTopinkaTopolTorzoTouhaToulecTradiceTraktorTrampTrasaTraverzaTrefitTrestTrezorTrhavinaTrhlinaTrochuTrojiceTroskaTroubaTrpceTrpitelTrpkostTrubecTruchlitTruhliceTrusTrvatTudyTuhnoutTuhostTundraTuristaTurnajTuzemskoTvarohTvorbaTvrdostTvrzTygrTykevUbohostUbozeUbratUbrousekUbrusUbytovnaUchoUctivostUdivitUhraditUjednatUjistitUjmoutUkazatelUklidnitUklonitUkotvitUkrojitUliceUlitaUlovitUmyvadloUnavitUniformaUniknoutUpadnoutUplatnitUplynoutUpoutatUpravitUranUrazitUsednoutUsilovatUsmrtitUsnadnitUsnoutUsouditUstlatUstrnoutUtahovatUtkatUtlumitUtonoutUtopenecUtrousitUvalitUvolnitUvozovkaUzdravitUzelUzeninaUzlinaUznatVagonValchaValounVanaVandalVanilkaVaranVarhanyVarovatVcelkuVchodVdovaVedroVegetaceVejceVelbloudVeletrhVelitelVelmocVelrybaVenkovVerandaVerzeVeselkaVeskrzeVesniceVespoduVestaVeterinaVeverkaVibraceVichrVideohraVidinaVidleVilaViniceVisetVitalitaVizeVizitkaVjezdVkladVkusVlajkaVlakVlasecVlevoVlhkostVlivVlnovkaVloupatVnucovatVnukVodaVodivostVodoznakVodstvoVojenskyVojnaVojskoVolantVolbaVolitVolnoVoskovkaVozidloVozovnaVpravoVrabecVracetVrahVrataVrbaVrcholekVrhatVrstvaVrtuleVsaditVstoupitVstupVtipVybavitVybratVychovatVydatVydraVyfotitVyhledatVyhnoutVyhoditVyhraditVyhubitVyjasnitVyjetVyjmoutVyklopitVykonatVylekatVymazatVymezitVymizetVymysletVynechatVynikatVynutitVypadatVyplatitVypravitVypustitVyrazitVyrovnatVyrvatVyslovitVysokoVystavitVysunoutVysypatVytasitVytesatVytratitVyvinoutVyvolatVyvrhelVyzdobitVyznatVzaduVzbuditVzchopitVzdorVzduchVzdychatVzestupVzhledemVzkazVzlykatVznikVzorekVzpouraVztahVztekXylofonZabratZabydletZachovatZadarmoZadusitZafoukatZahltitZahoditZahradaZahynoutZajatecZajetZajistitZaklepatZakoupitZalepitZamezitZamotatZamysletZanechatZanikatZaplatitZapojitZapsatZarazitZastavitZasunoutZatajitZatemnitZatknoutZaujmoutZavalitZaveletZavinitZavolatZavrtatZazvonitZbavitZbrusuZbudovatZbytekZdalekaZdarmaZdatnostZdivoZdobitZdrojZdvihZdymadloZeleninaZemanZeminaZeptatZezaduZezdolaZhatitZhltnoutZhlubokaZhotovitZhrubaZimaZimniceZjemnitZklamatZkoumatZkratkaZkumavkaZlatoZlehkaZlobaZlomZlostZlozvykZmapovatZmarZmatekZmijeZmizetZmocnitZmodratZmrzlinaZmutovatZnakZnalostZnamenatZnovuZobrazitZotavitZoubekZoufaleZploditZpomalitZpravaZprostitZprudkaZprvuZradaZranitZrcadloZrnitostZrnoZrovnaZrychlitZrzavostZtichaZtratitZubovinaZubrZvednoutZvenkuZveselaZvonZvratZvukovodZvyk\";\n var wordlist = null;\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \");\n if (wordlist_1.Wordlist.check(lang) !== \"0x25f44555f4af25b51a711136e1c7d6e50ce9f8917d39d6b1f076b2bb4d2fac1a\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for en (English) FAILED\");\n }\n }\n var LangCz = (\n /** @class */\n function(_super) {\n __extends4(LangCz2, _super);\n function LangCz2() {\n return _super.call(this, \"cz\") || this;\n }\n LangCz2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangCz2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n return LangCz2;\n }(wordlist_1.Wordlist)\n );\n var langCz = new LangCz();\n exports3.langCz = langCz;\n wordlist_1.Wordlist.register(langCz);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-en.js\n var require_lang_en = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-en.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langEn = void 0;\n var wordlist_1 = require_wordlist();\n var words = \"AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo\";\n var wordlist = null;\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \");\n if (wordlist_1.Wordlist.check(lang) !== \"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for en (English) FAILED\");\n }\n }\n var LangEn = (\n /** @class */\n function(_super) {\n __extends4(LangEn2, _super);\n function LangEn2() {\n return _super.call(this, \"en\") || this;\n }\n LangEn2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangEn2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n return LangEn2;\n }(wordlist_1.Wordlist)\n );\n var langEn = new LangEn();\n exports3.langEn = langEn;\n wordlist_1.Wordlist.register(langEn);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-es.js\n var require_lang_es = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-es.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langEs = void 0;\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var words = \"A/bacoAbdomenAbejaAbiertoAbogadoAbonoAbortoAbrazoAbrirAbueloAbusoAcabarAcademiaAccesoAccio/nAceiteAcelgaAcentoAceptarA/cidoAclararAcne/AcogerAcosoActivoActoActrizActuarAcudirAcuerdoAcusarAdictoAdmitirAdoptarAdornoAduanaAdultoAe/reoAfectarAficio/nAfinarAfirmarA/gilAgitarAgoni/aAgostoAgotarAgregarAgrioAguaAgudoA/guilaAgujaAhogoAhorroAireAislarAjedrezAjenoAjusteAlacra/nAlambreAlarmaAlbaA/lbumAlcaldeAldeaAlegreAlejarAlertaAletaAlfilerAlgaAlgodo/nAliadoAlientoAlivioAlmaAlmejaAlmi/barAltarAltezaAltivoAltoAlturaAlumnoAlzarAmableAmanteAmapolaAmargoAmasarA/mbarA/mbitoAmenoAmigoAmistadAmorAmparoAmplioAnchoAncianoAnclaAndarAnde/nAnemiaA/nguloAnilloA/nimoAni/sAnotarAntenaAntiguoAntojoAnualAnularAnuncioA~adirA~ejoA~oApagarAparatoApetitoApioAplicarApodoAporteApoyoAprenderAprobarApuestaApuroAradoAra~aArarA/rbitroA/rbolArbustoArchivoArcoArderArdillaArduoA/reaA/ridoAriesArmoni/aArne/sAromaArpaArpo/nArregloArrozArrugaArteArtistaAsaAsadoAsaltoAscensoAsegurarAseoAsesorAsientoAsiloAsistirAsnoAsombroA/speroAstillaAstroAstutoAsumirAsuntoAtajoAtaqueAtarAtentoAteoA/ticoAtletaA/tomoAtraerAtrozAtu/nAudazAudioAugeAulaAumentoAusenteAutorAvalAvanceAvaroAveAvellanaAvenaAvestruzAvio/nAvisoAyerAyudaAyunoAzafra/nAzarAzoteAzu/carAzufreAzulBabaBaborBacheBahi/aBaileBajarBalanzaBalco/nBaldeBambu/BancoBandaBa~oBarbaBarcoBarnizBarroBa/sculaBasto/nBasuraBatallaBateri/aBatirBatutaBau/lBazarBebe/BebidaBelloBesarBesoBestiaBichoBienBingoBlancoBloqueBlusaBoaBobinaBoboBocaBocinaBodaBodegaBoinaBolaBoleroBolsaBombaBondadBonitoBonoBonsa/iBordeBorrarBosqueBoteBoti/nBo/vedaBozalBravoBrazoBrechaBreveBrilloBrincoBrisaBrocaBromaBronceBroteBrujaBruscoBrutoBuceoBucleBuenoBueyBufandaBufo/nBu/hoBuitreBultoBurbujaBurlaBurroBuscarButacaBuzo/nCaballoCabezaCabinaCabraCacaoCada/verCadenaCaerCafe/Cai/daCaima/nCajaCajo/nCalCalamarCalcioCaldoCalidadCalleCalmaCalorCalvoCamaCambioCamelloCaminoCampoCa/ncerCandilCanelaCanguroCanicaCantoCa~aCa~o/nCaobaCaosCapazCapita/nCapoteCaptarCapuchaCaraCarbo/nCa/rcelCaretaCargaCari~oCarneCarpetaCarroCartaCasaCascoCaseroCaspaCastorCatorceCatreCaudalCausaCazoCebollaCederCedroCeldaCe/lebreCelosoCe/lulaCementoCenizaCentroCercaCerdoCerezaCeroCerrarCertezaCe/spedCetroChacalChalecoChampu/ChanclaChapaCharlaChicoChisteChivoChoqueChozaChuletaChuparCiclo/nCiegoCieloCienCiertoCifraCigarroCimaCincoCineCintaCipre/sCircoCiruelaCisneCitaCiudadClamorClanClaroClaseClaveClienteClimaCli/nicaCobreCoccio/nCochinoCocinaCocoCo/digoCodoCofreCogerCoheteCoji/nCojoColaColchaColegioColgarColinaCollarColmoColumnaCombateComerComidaCo/modoCompraCondeConejoCongaConocerConsejoContarCopaCopiaCorazo/nCorbataCorchoCordo/nCoronaCorrerCoserCosmosCostaCra/neoCra/terCrearCrecerCrei/doCremaCri/aCrimenCriptaCrisisCromoCro/nicaCroquetaCrudoCruzCuadroCuartoCuatroCuboCubrirCucharaCuelloCuentoCuerdaCuestaCuevaCuidarCulebraCulpaCultoCumbreCumplirCunaCunetaCuotaCupo/nCu/pulaCurarCuriosoCursoCurvaCutisDamaDanzaDarDardoDa/tilDeberDe/bilDe/cadaDecirDedoDefensaDefinirDejarDelfi/nDelgadoDelitoDemoraDensoDentalDeporteDerechoDerrotaDesayunoDeseoDesfileDesnudoDestinoDesvi/oDetalleDetenerDeudaDi/aDiabloDiademaDiamanteDianaDiarioDibujoDictarDienteDietaDiezDifi/cilDignoDilemaDiluirDineroDirectoDirigirDiscoDise~oDisfrazDivaDivinoDobleDoceDolorDomingoDonDonarDoradoDormirDorsoDosDosisDrago/nDrogaDuchaDudaDueloDue~oDulceDu/oDuqueDurarDurezaDuroE/banoEbrioEcharEcoEcuadorEdadEdicio/nEdificioEditorEducarEfectoEficazEjeEjemploElefanteElegirElementoElevarElipseE/liteElixirElogioEludirEmbudoEmitirEmocio/nEmpateEmpe~oEmpleoEmpresaEnanoEncargoEnchufeEnci/aEnemigoEneroEnfadoEnfermoEnga~oEnigmaEnlaceEnormeEnredoEnsayoEnse~arEnteroEntrarEnvaseEnvi/oE/pocaEquipoErizoEscalaEscenaEscolarEscribirEscudoEsenciaEsferaEsfuerzoEspadaEspejoEspi/aEsposaEspumaEsqui/EstarEsteEstiloEstufaEtapaEternoE/ticaEtniaEvadirEvaluarEventoEvitarExactoExamenExcesoExcusaExentoExigirExilioExistirE/xitoExpertoExplicarExponerExtremoFa/bricaFa/bulaFachadaFa/cilFactorFaenaFajaFaldaFalloFalsoFaltarFamaFamiliaFamosoFarao/nFarmaciaFarolFarsaFaseFatigaFaunaFavorFaxFebreroFechaFelizFeoFeriaFerozFe/rtilFervorFesti/nFiableFianzaFiarFibraFiccio/nFichaFideoFiebreFielFieraFiestaFiguraFijarFijoFilaFileteFilialFiltroFinFincaFingirFinitoFirmaFlacoFlautaFlechaFlorFlotaFluirFlujoFlu/orFobiaFocaFogataFogo/nFolioFolletoFondoFormaForroFortunaForzarFosaFotoFracasoFra/gilFranjaFraseFraudeFrei/rFrenoFresaFri/oFritoFrutaFuegoFuenteFuerzaFugaFumarFuncio/nFundaFurgo/nFuriaFusilFu/tbolFuturoGacelaGafasGaitaGajoGalaGaleri/aGalloGambaGanarGanchoGangaGansoGarajeGarzaGasolinaGastarGatoGavila/nGemeloGemirGenGe/neroGenioGenteGeranioGerenteGermenGestoGiganteGimnasioGirarGiroGlaciarGloboGloriaGolGolfoGolosoGolpeGomaGordoGorilaGorraGotaGoteoGozarGradaGra/ficoGranoGrasaGratisGraveGrietaGrilloGripeGrisGritoGrosorGru/aGruesoGrumoGrupoGuanteGuapoGuardiaGuerraGui/aGui~oGuionGuisoGuitarraGusanoGustarHaberHa/bilHablarHacerHachaHadaHallarHamacaHarinaHazHaza~aHebillaHebraHechoHeladoHelioHembraHerirHermanoHe/roeHervirHieloHierroHi/gadoHigieneHijoHimnoHistoriaHocicoHogarHogueraHojaHombreHongoHonorHonraHoraHormigaHornoHostilHoyoHuecoHuelgaHuertaHuesoHuevoHuidaHuirHumanoHu/medoHumildeHumoHundirHuraca/nHurtoIconoIdealIdiomaI/doloIglesiaIglu/IgualIlegalIlusio/nImagenIma/nImitarImparImperioImponerImpulsoIncapazI/ndiceInerteInfielInformeIngenioInicioInmensoInmuneInnatoInsectoInstanteIntere/sI/ntimoIntuirInu/tilInviernoIraIrisIroni/aIslaIsloteJabali/Jabo/nJamo/nJarabeJardi/nJarraJaulaJazmi/nJefeJeringaJineteJornadaJorobaJovenJoyaJuergaJuevesJuezJugadorJugoJugueteJuicioJuncoJunglaJunioJuntarJu/piterJurarJustoJuvenilJuzgarKiloKoalaLabioLacioLacraLadoLadro/nLagartoLa/grimaLagunaLaicoLamerLa/minaLa/mparaLanaLanchaLangostaLanzaLa/pizLargoLarvaLa/stimaLataLa/texLatirLaurelLavarLazoLealLeccio/nLecheLectorLeerLegio/nLegumbreLejanoLenguaLentoLe~aLeo/nLeopardoLesio/nLetalLetraLeveLeyendaLibertadLibroLicorLi/derLidiarLienzoLigaLigeroLimaLi/miteLimo/nLimpioLinceLindoLi/neaLingoteLinoLinternaLi/quidoLisoListaLiteraLitioLitroLlagaLlamaLlantoLlaveLlegarLlenarLlevarLlorarLloverLluviaLoboLocio/nLocoLocuraLo/gicaLogroLombrizLomoLonjaLoteLuchaLucirLugarLujoLunaLunesLupaLustroLutoLuzMacetaMachoMaderaMadreMaduroMaestroMafiaMagiaMagoMai/zMaldadMaletaMallaMaloMama/MamboMamutMancoMandoManejarMangaManiqui/ManjarManoMansoMantaMa~anaMapaMa/quinaMarMarcoMareaMarfilMargenMaridoMa/rmolMarro/nMartesMarzoMasaMa/scaraMasivoMatarMateriaMatizMatrizMa/ximoMayorMazorcaMechaMedallaMedioMe/dulaMejillaMejorMelenaMelo/nMemoriaMenorMensajeMenteMenu/MercadoMerengueMe/ritoMesMeso/nMetaMeterMe/todoMetroMezclaMiedoMielMiembroMigaMilMilagroMilitarMillo/nMimoMinaMineroMi/nimoMinutoMiopeMirarMisaMiseriaMisilMismoMitadMitoMochilaMocio/nModaModeloMohoMojarMoldeMolerMolinoMomentoMomiaMonarcaMonedaMonjaMontoMo~oMoradaMorderMorenoMorirMorroMorsaMortalMoscaMostrarMotivoMoverMo/vilMozoMuchoMudarMuebleMuelaMuerteMuestraMugreMujerMulaMuletaMultaMundoMu~ecaMuralMuroMu/sculoMuseoMusgoMu/sicaMusloNa/carNacio/nNadarNaipeNaranjaNarizNarrarNasalNatalNativoNaturalNa/useaNavalNaveNavidadNecioNe/ctarNegarNegocioNegroNeo/nNervioNetoNeutroNevarNeveraNichoNidoNieblaNietoNi~ezNi~oNi/tidoNivelNoblezaNocheNo/minaNoriaNormaNorteNotaNoticiaNovatoNovelaNovioNubeNucaNu/cleoNudilloNudoNueraNueveNuezNuloNu/meroNutriaOasisObesoObispoObjetoObraObreroObservarObtenerObvioOcaOcasoOce/anoOchentaOchoOcioOcreOctavoOctubreOcultoOcuparOcurrirOdiarOdioOdiseaOesteOfensaOfertaOficioOfrecerOgroOi/doOi/rOjoOlaOleadaOlfatoOlivoOllaOlmoOlorOlvidoOmbligoOndaOnzaOpacoOpcio/nO/peraOpinarOponerOptarO/pticaOpuestoOracio/nOradorOralO/rbitaOrcaOrdenOrejaO/rganoOrgi/aOrgulloOrienteOrigenOrillaOroOrquestaOrugaOsadi/aOscuroOseznoOsoOstraOto~oOtroOvejaO/vuloO/xidoOxi/genoOyenteOzonoPactoPadrePaellaPa/ginaPagoPai/sPa/jaroPalabraPalcoPaletaPa/lidoPalmaPalomaPalparPanPanalPa/nicoPanteraPa~ueloPapa/PapelPapillaPaquetePararParcelaParedParirParoPa/rpadoParquePa/rrafoPartePasarPaseoPasio/nPasoPastaPataPatioPatriaPausaPautaPavoPayasoPeato/nPecadoPeceraPechoPedalPedirPegarPeinePelarPelda~oPeleaPeligroPellejoPeloPelucaPenaPensarPe~o/nPeo/nPeorPepinoPeque~oPeraPerchaPerderPerezaPerfilPericoPerlaPermisoPerroPersonaPesaPescaPe/simoPesta~aPe/taloPetro/leoPezPezu~aPicarPicho/nPiePiedraPiernaPiezaPijamaPilarPilotoPimientaPinoPintorPinzaPi~aPiojoPipaPirataPisarPiscinaPisoPistaPito/nPizcaPlacaPlanPlataPlayaPlazaPleitoPlenoPlomoPlumaPluralPobrePocoPoderPodioPoemaPoesi/aPoetaPolenPolici/aPolloPolvoPomadaPomeloPomoPompaPonerPorcio/nPortalPosadaPoseerPosiblePostePotenciaPotroPozoPradoPrecozPreguntaPremioPrensaPresoPrevioPrimoPri/ncipePrisio/nPrivarProaProbarProcesoProductoProezaProfesorProgramaProlePromesaProntoPropioPro/ximoPruebaPu/blicoPucheroPudorPuebloPuertaPuestoPulgaPulirPulmo/nPulpoPulsoPumaPuntoPu~alPu~oPupaPupilaPure/QuedarQuejaQuemarQuererQuesoQuietoQui/micaQuinceQuitarRa/banoRabiaRaboRacio/nRadicalRai/zRamaRampaRanchoRangoRapazRa/pidoRaptoRasgoRaspaRatoRayoRazaRazo/nReaccio/nRealidadReba~oReboteRecaerRecetaRechazoRecogerRecreoRectoRecursoRedRedondoReducirReflejoReformaRefra/nRefugioRegaloRegirReglaRegresoRehe/nReinoRei/rRejaRelatoRelevoRelieveRellenoRelojRemarRemedioRemoRencorRendirRentaRepartoRepetirReposoReptilResRescateResinaRespetoRestoResumenRetiroRetornoRetratoReunirReve/sRevistaReyRezarRicoRiegoRiendaRiesgoRifaRi/gidoRigorRinco/nRi~o/nRi/oRiquezaRisaRitmoRitoRizoRobleRoceRociarRodarRodeoRodillaRoerRojizoRojoRomeroRomperRonRoncoRondaRopaRoperoRosaRoscaRostroRotarRubi/RuborRudoRuedaRugirRuidoRuinaRuletaRuloRumboRumorRupturaRutaRutinaSa/badoSaberSabioSableSacarSagazSagradoSalaSaldoSaleroSalirSalmo/nSalo/nSalsaSaltoSaludSalvarSambaSancio/nSandi/aSanearSangreSanidadSanoSantoSapoSaqueSardinaSarte/nSastreSata/nSaunaSaxofo/nSeccio/nSecoSecretoSectaSedSeguirSeisSelloSelvaSemanaSemillaSendaSensorSe~alSe~orSepararSepiaSequi/aSerSerieSermo/nServirSesentaSesio/nSetaSetentaSeveroSexoSextoSidraSiestaSieteSigloSignoSi/labaSilbarSilencioSillaSi/mboloSimioSirenaSistemaSitioSituarSobreSocioSodioSolSolapaSoldadoSoledadSo/lidoSoltarSolucio/nSombraSondeoSonidoSonoroSonrisaSopaSoplarSoporteSordoSorpresaSorteoSoste/nSo/tanoSuaveSubirSucesoSudorSuegraSueloSue~oSuerteSufrirSujetoSulta/nSumarSuperarSuplirSuponerSupremoSurSurcoSure~oSurgirSustoSutilTabacoTabiqueTablaTabu/TacoTactoTajoTalarTalcoTalentoTallaTalo/nTama~oTamborTangoTanqueTapaTapeteTapiaTapo/nTaquillaTardeTareaTarifaTarjetaTarotTarroTartaTatuajeTauroTazaTazo/nTeatroTechoTeclaTe/cnicaTejadoTejerTejidoTelaTele/fonoTemaTemorTemploTenazTenderTenerTenisTensoTeori/aTerapiaTercoTe/rminoTernuraTerrorTesisTesoroTestigoTeteraTextoTezTibioTiburo/nTiempoTiendaTierraTiesoTigreTijeraTildeTimbreTi/midoTimoTintaTi/oTi/picoTipoTiraTiro/nTita/nTi/tereTi/tuloTizaToallaTobilloTocarTocinoTodoTogaToldoTomarTonoTontoToparTopeToqueTo/raxToreroTormentaTorneoToroTorpedoTorreTorsoTortugaTosToscoToserTo/xicoTrabajoTractorTraerTra/ficoTragoTrajeTramoTranceTratoTraumaTrazarTre/bolTreguaTreintaTrenTreparTresTribuTrigoTripaTristeTriunfoTrofeoTrompaTroncoTropaTroteTrozoTrucoTruenoTrufaTuberi/aTuboTuertoTumbaTumorTu/nelTu/nicaTurbinaTurismoTurnoTutorUbicarU/lceraUmbralUnidadUnirUniversoUnoUntarU~aUrbanoUrbeUrgenteUrnaUsarUsuarioU/tilUtopi/aUvaVacaVaci/oVacunaVagarVagoVainaVajillaValeVa/lidoValleValorVa/lvulaVampiroVaraVariarVaro/nVasoVecinoVectorVehi/culoVeinteVejezVelaVeleroVelozVenaVencerVendaVenenoVengarVenirVentaVenusVerVeranoVerboVerdeVeredaVerjaVersoVerterVi/aViajeVibrarVicioVi/ctimaVidaVi/deoVidrioViejoViernesVigorVilVillaVinagreVinoVi~edoVioli/nViralVirgoVirtudVisorVi/speraVistaVitaminaViudoVivazViveroVivirVivoVolca/nVolumenVolverVorazVotarVotoVozVueloVulgarYacerYateYeguaYemaYernoYesoYodoYogaYogurZafiroZanjaZapatoZarzaZonaZorroZumoZurdo\";\n var lookup = {};\n var wordlist = null;\n function dropDiacritic(word) {\n wordlist_1.logger.checkNormalize();\n return (0, strings_1.toUtf8String)(Array.prototype.filter.call((0, strings_1.toUtf8Bytes)(word.normalize(\"NFD\").toLowerCase()), function(c4) {\n return c4 >= 65 && c4 <= 90 || c4 >= 97 && c4 <= 123;\n }));\n }\n function expand(word) {\n var output = [];\n Array.prototype.forEach.call((0, strings_1.toUtf8Bytes)(word), function(c4) {\n if (c4 === 47) {\n output.push(204);\n output.push(129);\n } else if (c4 === 126) {\n output.push(110);\n output.push(204);\n output.push(131);\n } else {\n output.push(c4);\n }\n });\n return (0, strings_1.toUtf8String)(output);\n }\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \").map(function(w3) {\n return expand(w3);\n });\n wordlist.forEach(function(word, index2) {\n lookup[dropDiacritic(word)] = index2;\n });\n if (wordlist_1.Wordlist.check(lang) !== \"0xf74fb7092aeacdfbf8959557de22098da512207fb9f109cb526994938cf40300\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for es (Spanish) FAILED\");\n }\n }\n var LangEs = (\n /** @class */\n function(_super) {\n __extends4(LangEs2, _super);\n function LangEs2() {\n return _super.call(this, \"es\") || this;\n }\n LangEs2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangEs2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return lookup[dropDiacritic(word)];\n };\n return LangEs2;\n }(wordlist_1.Wordlist)\n );\n var langEs = new LangEs();\n exports3.langEs = langEs;\n wordlist_1.Wordlist.register(langEs);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-fr.js\n var require_lang_fr = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-fr.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langFr = void 0;\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var words = \"AbaisserAbandonAbdiquerAbeilleAbolirAborderAboutirAboyerAbrasifAbreuverAbriterAbrogerAbruptAbsenceAbsoluAbsurdeAbusifAbyssalAcade/mieAcajouAcarienAccablerAccepterAcclamerAccoladeAccrocheAccuserAcerbeAchatAcheterAcidulerAcierAcompteAcque/rirAcronymeActeurActifActuelAdepteAde/quatAdhe/sifAdjectifAdjugerAdmettreAdmirerAdopterAdorerAdoucirAdresseAdroitAdulteAdverbeAe/rerAe/ronefAffaireAffecterAfficheAffreuxAffublerAgacerAgencerAgileAgiterAgraferAgre/ableAgrumeAiderAiguilleAilierAimableAisanceAjouterAjusterAlarmerAlchimieAlerteAlge-breAlgueAlie/nerAlimentAlle/gerAlliageAllouerAllumerAlourdirAlpagaAltesseAlve/oleAmateurAmbiguAmbreAme/nagerAmertumeAmidonAmiralAmorcerAmourAmovibleAmphibieAmpleurAmusantAnalyseAnaphoreAnarchieAnatomieAncienAne/antirAngleAngoisseAnguleuxAnimalAnnexerAnnonceAnnuelAnodinAnomalieAnonymeAnormalAntenneAntidoteAnxieuxApaiserApe/ritifAplanirApologieAppareilAppelerApporterAppuyerAquariumAqueducArbitreArbusteArdeurArdoiseArgentArlequinArmatureArmementArmoireArmureArpenterArracherArriverArroserArsenicArte/rielArticleAspectAsphalteAspirerAssautAsservirAssietteAssocierAssurerAsticotAstreAstuceAtelierAtomeAtriumAtroceAttaqueAttentifAttirerAttraperAubaineAubergeAudaceAudibleAugurerAuroreAutomneAutrucheAvalerAvancerAvariceAvenirAverseAveugleAviateurAvideAvionAviserAvoineAvouerAvrilAxialAxiomeBadgeBafouerBagageBaguetteBaignadeBalancerBalconBaleineBalisageBambinBancaireBandageBanlieueBannie-reBanquierBarbierBarilBaronBarqueBarrageBassinBastionBatailleBateauBatterieBaudrierBavarderBeletteBe/lierBeloteBe/ne/ficeBerceauBergerBerlineBermudaBesaceBesogneBe/tailBeurreBiberonBicycleBiduleBijouBilanBilingueBillardBinaireBiologieBiopsieBiotypeBiscuitBisonBistouriBitumeBizarreBlafardBlagueBlanchirBlessantBlinderBlondBloquerBlousonBobardBobineBoireBoiserBolideBonbonBondirBonheurBonifierBonusBordureBorneBotteBoucleBoueuxBougieBoulonBouquinBourseBoussoleBoutiqueBoxeurBrancheBrasierBraveBrebisBre-cheBreuvageBricolerBrigadeBrillantBriocheBriqueBrochureBroderBronzerBrousseBroyeurBrumeBrusqueBrutalBruyantBuffleBuissonBulletinBureauBurinBustierButinerButoirBuvableBuvetteCabanonCabineCachetteCadeauCadreCafe/ineCaillouCaissonCalculerCalepinCalibreCalmerCalomnieCalvaireCamaradeCame/raCamionCampagneCanalCanetonCanonCantineCanularCapableCaporalCapriceCapsuleCapterCapucheCarabineCarboneCaresserCaribouCarnageCarotteCarreauCartonCascadeCasierCasqueCassureCauserCautionCavalierCaverneCaviarCe/dilleCeintureCe/lesteCelluleCendrierCensurerCentralCercleCe/re/bralCeriseCernerCerveauCesserChagrinChaiseChaleurChambreChanceChapitreCharbonChasseurChatonChaussonChavirerChemiseChenilleChe/quierChercherChevalChienChiffreChignonChime-reChiotChlorureChocolatChoisirChoseChouetteChromeChuteCigareCigogneCimenterCine/maCintrerCirculerCirerCirqueCiterneCitoyenCitronCivilClaironClameurClaquerClasseClavierClientClignerClimatClivageClocheClonageCloporteCobaltCobraCocasseCocotierCoderCodifierCoffreCognerCohe/sionCoifferCoincerCole-reColibriCollineColmaterColonelCombatCome/dieCommandeCompactConcertConduireConfierCongelerConnoterConsonneContactConvexeCopainCopieCorailCorbeauCordageCornicheCorpusCorrectCorte-geCosmiqueCostumeCotonCoudeCoupureCourageCouteauCouvrirCoyoteCrabeCrainteCravateCrayonCre/atureCre/diterCre/meuxCreuserCrevetteCriblerCrierCristalCrite-reCroireCroquerCrotaleCrucialCruelCrypterCubiqueCueillirCuille-reCuisineCuivreCulminerCultiverCumulerCupideCuratifCurseurCyanureCycleCylindreCyniqueDaignerDamierDangerDanseurDauphinDe/battreDe/biterDe/borderDe/briderDe/butantDe/calerDe/cembreDe/chirerDe/ciderDe/clarerDe/corerDe/crireDe/cuplerDe/daleDe/ductifDe/esseDe/fensifDe/filerDe/frayerDe/gagerDe/givrerDe/glutirDe/graferDe/jeunerDe/liceDe/logerDemanderDemeurerDe/molirDe/nicherDe/nouerDentelleDe/nuderDe/partDe/penserDe/phaserDe/placerDe/poserDe/rangerDe/roberDe/sastreDescenteDe/sertDe/signerDe/sobe/irDessinerDestrierDe/tacherDe/testerDe/tourerDe/tresseDevancerDevenirDevinerDevoirDiableDialogueDiamantDicterDiffe/rerDige/rerDigitalDigneDiluerDimancheDiminuerDioxydeDirectifDirigerDiscuterDisposerDissiperDistanceDivertirDiviserDocileDocteurDogmeDoigtDomaineDomicileDompterDonateurDonjonDonnerDopamineDortoirDorureDosageDoseurDossierDotationDouanierDoubleDouceurDouterDoyenDragonDraperDresserDribblerDroitureDuperieDuplexeDurableDurcirDynastieE/blouirE/carterE/charpeE/chelleE/clairerE/clipseE/cloreE/cluseE/coleE/conomieE/corceE/couterE/craserE/cre/merE/crivainE/crouE/cumeE/cureuilE/difierE/duquerEffacerEffectifEffigieEffortEffrayerEffusionE/galiserE/garerE/jecterE/laborerE/largirE/lectronE/le/gantE/le/phantE/le-veE/ligibleE/litismeE/logeE/luciderE/luderEmballerEmbellirEmbryonE/meraudeE/missionEmmenerE/motionE/mouvoirEmpereurEmployerEmporterEmpriseE/mulsionEncadrerEnche-reEnclaveEncocheEndiguerEndosserEndroitEnduireE/nergieEnfanceEnfermerEnfouirEngagerEnginEngloberE/nigmeEnjamberEnjeuEnleverEnnemiEnnuyeuxEnrichirEnrobageEnseigneEntasserEntendreEntierEntourerEntraverE/nume/rerEnvahirEnviableEnvoyerEnzymeE/olienE/paissirE/pargneE/patantE/pauleE/picerieE/pide/mieE/pierE/pilogueE/pineE/pisodeE/pitapheE/poqueE/preuveE/prouverE/puisantE/querreE/quipeE/rigerE/rosionErreurE/ruptionEscalierEspadonEspe-ceEspie-gleEspoirEspritEsquiverEssayerEssenceEssieuEssorerEstimeEstomacEstradeE/tage-reE/talerE/tancheE/tatiqueE/teindreE/tendoirE/ternelE/thanolE/thiqueEthnieE/tirerE/tofferE/toileE/tonnantE/tourdirE/trangeE/troitE/tudeEuphorieE/valuerE/vasionE/ventailE/videnceE/viterE/volutifE/voquerExactExage/rerExaucerExcellerExcitantExclusifExcuseExe/cuterExempleExercerExhalerExhorterExigenceExilerExisterExotiqueExpe/dierExplorerExposerExprimerExquisExtensifExtraireExulterFableFabuleuxFacetteFacileFactureFaiblirFalaiseFameuxFamilleFarceurFarfeluFarineFaroucheFascinerFatalFatigueFauconFautifFaveurFavoriFe/brileFe/conderFe/de/rerFe/linFemmeFe/murFendoirFe/odalFermerFe/roceFerveurFestivalFeuilleFeutreFe/vrierFiascoFicelerFictifFide-leFigureFilatureFiletageFilie-reFilleulFilmerFilouFiltrerFinancerFinirFioleFirmeFissureFixerFlairerFlammeFlasqueFlatteurFle/auFle-cheFleurFlexionFloconFloreFluctuerFluideFluvialFolieFonderieFongibleFontaineForcerForgeronFormulerFortuneFossileFoudreFouge-reFouillerFoulureFourmiFragileFraiseFranchirFrapperFrayeurFre/gateFreinerFrelonFre/mirFre/ne/sieFre-reFriableFrictionFrissonFrivoleFroidFromageFrontalFrotterFruitFugitifFuiteFureurFurieuxFurtifFusionFuturGagnerGalaxieGalerieGambaderGarantirGardienGarnirGarrigueGazelleGazonGe/antGe/latineGe/luleGendarmeGe/ne/ralGe/nieGenouGentilGe/ologieGe/ome-treGe/raniumGermeGestuelGeyserGibierGiclerGirafeGivreGlaceGlaiveGlisserGlobeGloireGlorieuxGolfeurGommeGonflerGorgeGorilleGoudronGouffreGoulotGoupilleGourmandGoutteGraduelGraffitiGraineGrandGrappinGratuitGravirGrenatGriffureGrillerGrimperGrognerGronderGrotteGroupeGrugerGrutierGruye-reGue/pardGuerrierGuideGuimauveGuitareGustatifGymnasteGyrostatHabitudeHachoirHalteHameauHangarHannetonHaricotHarmonieHarponHasardHe/liumHe/matomeHerbeHe/rissonHermineHe/ronHe/siterHeureuxHibernerHibouHilarantHistoireHiverHomardHommageHomoge-neHonneurHonorerHonteuxHordeHorizonHorlogeHormoneHorribleHouleuxHousseHublotHuileuxHumainHumbleHumideHumourHurlerHydromelHygie-neHymneHypnoseIdylleIgnorerIguaneIlliciteIllusionImageImbiberImiterImmenseImmobileImmuableImpactImpe/rialImplorerImposerImprimerImputerIncarnerIncendieIncidentInclinerIncoloreIndexerIndiceInductifIne/ditIneptieInexactInfiniInfligerInformerInfusionInge/rerInhalerInhiberInjecterInjureInnocentInoculerInonderInscrireInsecteInsigneInsoliteInspirerInstinctInsulterIntactIntenseIntimeIntrigueIntuitifInutileInvasionInventerInviterInvoquerIroniqueIrradierIrre/elIrriterIsolerIvoireIvresseJaguarJaillirJambeJanvierJardinJaugerJauneJavelotJetableJetonJeudiJeunesseJoindreJoncherJonglerJoueurJouissifJournalJovialJoyauJoyeuxJubilerJugementJuniorJuponJuristeJusticeJuteuxJuve/nileKayakKimonoKiosqueLabelLabialLabourerLace/rerLactoseLaguneLaineLaisserLaitierLambeauLamelleLampeLanceurLangageLanterneLapinLargeurLarmeLaurierLavaboLavoirLectureLe/galLe/gerLe/gumeLessiveLettreLevierLexiqueLe/zardLiasseLibe/rerLibreLicenceLicorneLie-geLie-vreLigatureLigoterLigueLimerLimiteLimonadeLimpideLine/aireLingotLionceauLiquideLisie-reListerLithiumLitigeLittoralLivreurLogiqueLointainLoisirLombricLoterieLouerLourdLoutreLouveLoyalLubieLucideLucratifLueurLugubreLuisantLumie-reLunaireLundiLuronLutterLuxueuxMachineMagasinMagentaMagiqueMaigreMaillonMaintienMairieMaisonMajorerMalaxerMale/ficeMalheurMaliceMalletteMammouthMandaterManiableManquantManteauManuelMarathonMarbreMarchandMardiMaritimeMarqueurMarronMartelerMascotteMassifMate/rielMatie-reMatraqueMaudireMaussadeMauveMaximalMe/chantMe/connuMe/dailleMe/decinMe/diterMe/duseMeilleurMe/langeMe/lodieMembreMe/moireMenacerMenerMenhirMensongeMentorMercrediMe/riteMerleMessagerMesureMe/talMe/te/oreMe/thodeMe/tierMeubleMiaulerMicrobeMietteMignonMigrerMilieuMillionMimiqueMinceMine/ralMinimalMinorerMinuteMiracleMiroiterMissileMixteMobileModerneMoelleuxMondialMoniteurMonnaieMonotoneMonstreMontagneMonumentMoqueurMorceauMorsureMortierMoteurMotifMoucheMoufleMoulinMoussonMoutonMouvantMultipleMunitionMurailleMure-neMurmureMuscleMuse/umMusicienMutationMuterMutuelMyriadeMyrtilleMyste-reMythiqueNageurNappeNarquoisNarrerNatationNationNatureNaufrageNautiqueNavireNe/buleuxNectarNe/fasteNe/gationNe/gligerNe/gocierNeigeNerveuxNettoyerNeuroneNeutronNeveuNicheNickelNitrateNiveauNobleNocifNocturneNoirceurNoisetteNomadeNombreuxNommerNormatifNotableNotifierNotoireNourrirNouveauNovateurNovembreNoviceNuageNuancerNuireNuisibleNume/roNuptialNuqueNutritifObe/irObjectifObligerObscurObserverObstacleObtenirObturerOccasionOccuperOce/anOctobreOctroyerOctuplerOculaireOdeurOdorantOffenserOfficierOffrirOgiveOiseauOisillonOlfactifOlivierOmbrageOmettreOnctueuxOndulerOne/reuxOniriqueOpaleOpaqueOpe/rerOpinionOpportunOpprimerOpterOptiqueOrageuxOrangeOrbiteOrdonnerOreilleOrganeOrgueilOrificeOrnementOrqueOrtieOscillerOsmoseOssatureOtarieOuraganOursonOutilOutragerOuvrageOvationOxydeOxyge-neOzonePaisiblePalacePalmare-sPalourdePalperPanachePandaPangolinPaniquerPanneauPanoramaPantalonPapayePapierPapoterPapyrusParadoxeParcelleParesseParfumerParlerParoleParrainParsemerPartagerParureParvenirPassionPaste-quePaternelPatiencePatronPavillonPavoiserPayerPaysagePeignePeintrePelagePe/licanPellePelousePeluchePendulePe/ne/trerPe/niblePensifPe/nuriePe/pitePe/plumPerdrixPerforerPe/riodePermuterPerplexePersilPertePeserPe/talePetitPe/trirPeuplePharaonPhobiePhoquePhotonPhrasePhysiquePianoPicturalPie-cePierrePieuvrePilotePinceauPipettePiquerPiroguePiscinePistonPivoterPixelPizzaPlacardPlafondPlaisirPlanerPlaquePlastronPlateauPleurerPlexusPliagePlombPlongerPluiePlumagePochettePoe/siePoe-tePointePoirierPoissonPoivrePolairePolicierPollenPolygonePommadePompierPonctuelPonde/rerPoneyPortiquePositionPosse/derPosturePotagerPoteauPotionPoucePoulainPoumonPourprePoussinPouvoirPrairiePratiquePre/cieuxPre/direPre/fixePre/ludePre/nomPre/sencePre/textePre/voirPrimitifPrincePrisonPriverProble-meProce/derProdigeProfondProgre-sProieProjeterProloguePromenerPropreProspe-reProte/gerProuesseProverbePrudencePruneauPsychosePublicPuceronPuiserPulpePulsarPunaisePunitifPupitrePurifierPuzzlePyramideQuasarQuerelleQuestionQuie/tudeQuitterQuotientRacineRaconterRadieuxRagondinRaideurRaisinRalentirRallongeRamasserRapideRasageRatisserRavagerRavinRayonnerRe/actifRe/agirRe/aliserRe/animerRecevoirRe/citerRe/clamerRe/colterRecruterReculerRecyclerRe/digerRedouterRefaireRe/flexeRe/formerRefrainRefugeRe/galienRe/gionRe/glageRe/gulierRe/ite/rerRejeterRejouerRelatifReleverReliefRemarqueReme-deRemiseRemonterRemplirRemuerRenardRenfortReniflerRenoncerRentrerRenvoiReplierReporterRepriseReptileRequinRe/serveRe/sineuxRe/soudreRespectResterRe/sultatRe/tablirRetenirRe/ticuleRetomberRetracerRe/unionRe/ussirRevancheRevivreRe/volteRe/vulsifRichesseRideauRieurRigideRigolerRincerRiposterRisibleRisqueRituelRivalRivie-reRocheuxRomanceRompreRonceRondinRoseauRosierRotatifRotorRotuleRougeRouilleRouleauRoutineRoyaumeRubanRubisRucheRuelleRugueuxRuinerRuisseauRuserRustiqueRythmeSablerSaboterSabreSacocheSafariSagesseSaisirSaladeSaliveSalonSaluerSamediSanctionSanglierSarcasmeSardineSaturerSaugrenuSaumonSauterSauvageSavantSavonnerScalpelScandaleSce/le/ratSce/narioSceptreSche/maScienceScinderScoreScrutinSculpterSe/anceSe/cableSe/cherSecouerSe/cre/terSe/datifSe/duireSeigneurSe/jourSe/lectifSemaineSemblerSemenceSe/minalSe/nateurSensibleSentenceSe/parerSe/quenceSereinSergentSe/rieuxSerrureSe/rumServiceSe/sameSe/virSevrageSextupleSide/ralSie-cleSie/gerSifflerSigleSignalSilenceSiliciumSimpleSince-reSinistreSiphonSiropSismiqueSituerSkierSocialSocleSodiumSoigneuxSoldatSoleilSolitudeSolubleSombreSommeilSomnolerSondeSongeurSonnetteSonoreSorcierSortirSosieSottiseSoucieuxSoudureSouffleSouleverSoupapeSourceSoutirerSouvenirSpacieuxSpatialSpe/cialSphe-reSpiralStableStationSternumStimulusStipulerStrictStudieuxStupeurStylisteSublimeSubstratSubtilSubvenirSucce-sSucreSuffixeSugge/rerSuiveurSulfateSuperbeSupplierSurfaceSuricateSurmenerSurpriseSursautSurvieSuspectSyllabeSymboleSyme/trieSynapseSyntaxeSyste-meTabacTablierTactileTaillerTalentTalismanTalonnerTambourTamiserTangibleTapisTaquinerTarderTarifTartineTasseTatamiTatouageTaupeTaureauTaxerTe/moinTemporelTenailleTendreTeneurTenirTensionTerminerTerneTerribleTe/tineTexteThe-meThe/orieThe/rapieThoraxTibiaTie-deTimideTirelireTiroirTissuTitaneTitreTituberTobogganTole/rantTomateToniqueTonneauToponymeTorcheTordreTornadeTorpilleTorrentTorseTortueTotemToucherTournageTousserToxineTractionTraficTragiqueTrahirTrainTrancherTravailTre-fleTremperTre/sorTreuilTriageTribunalTricoterTrilogieTriompheTriplerTriturerTrivialTromboneTroncTropicalTroupeauTuileTulipeTumulteTunnelTurbineTuteurTutoyerTuyauTympanTyphonTypiqueTyranUbuesqueUltimeUltrasonUnanimeUnifierUnionUniqueUnitaireUniversUraniumUrbainUrticantUsageUsineUsuelUsureUtileUtopieVacarmeVaccinVagabondVagueVaillantVaincreVaisseauValableValiseVallonValveVampireVanilleVapeurVarierVaseuxVassalVasteVecteurVedetteVe/ge/talVe/hiculeVeinardVe/loceVendrediVe/ne/rerVengerVenimeuxVentouseVerdureVe/rinVernirVerrouVerserVertuVestonVe/te/ranVe/tusteVexantVexerViaducViandeVictoireVidangeVide/oVignetteVigueurVilainVillageVinaigreViolonVipe-reVirementVirtuoseVirusVisageViseurVisionVisqueuxVisuelVitalVitesseViticoleVitrineVivaceVivipareVocationVoguerVoileVoisinVoitureVolailleVolcanVoltigerVolumeVoraceVortexVoterVouloirVoyageVoyelleWagonXe/nonYachtZe-breZe/nithZesteZoologie\";\n var wordlist = null;\n var lookup = {};\n function dropDiacritic(word) {\n wordlist_1.logger.checkNormalize();\n return (0, strings_1.toUtf8String)(Array.prototype.filter.call((0, strings_1.toUtf8Bytes)(word.normalize(\"NFD\").toLowerCase()), function(c4) {\n return c4 >= 65 && c4 <= 90 || c4 >= 97 && c4 <= 123;\n }));\n }\n function expand(word) {\n var output = [];\n Array.prototype.forEach.call((0, strings_1.toUtf8Bytes)(word), function(c4) {\n if (c4 === 47) {\n output.push(204);\n output.push(129);\n } else if (c4 === 45) {\n output.push(204);\n output.push(128);\n } else {\n output.push(c4);\n }\n });\n return (0, strings_1.toUtf8String)(output);\n }\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \").map(function(w3) {\n return expand(w3);\n });\n wordlist.forEach(function(word, index2) {\n lookup[dropDiacritic(word)] = index2;\n });\n if (wordlist_1.Wordlist.check(lang) !== \"0x51deb7ae009149dc61a6bd18a918eb7ac78d2775726c68e598b92d002519b045\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for fr (French) FAILED\");\n }\n }\n var LangFr = (\n /** @class */\n function(_super) {\n __extends4(LangFr2, _super);\n function LangFr2() {\n return _super.call(this, \"fr\") || this;\n }\n LangFr2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangFr2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return lookup[dropDiacritic(word)];\n };\n return LangFr2;\n }(wordlist_1.Wordlist)\n );\n var langFr = new LangFr();\n exports3.langFr = langFr;\n wordlist_1.Wordlist.register(langFr);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-ja.js\n var require_lang_ja = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-ja.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langJa = void 0;\n var bytes_1 = require_lib2();\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var data = [\n // 4-kana words\n \"AQRASRAGBAGUAIRAHBAghAURAdBAdcAnoAMEAFBAFCBKFBQRBSFBCXBCDBCHBGFBEQBpBBpQBIkBHNBeOBgFBVCBhBBhNBmOBmRBiHBiFBUFBZDBvFBsXBkFBlcBjYBwDBMBBTBBTRBWBBWXXaQXaRXQWXSRXCFXYBXpHXOQXHRXhRXuRXmXXbRXlXXwDXTRXrCXWQXWGaBWaKcaYgasFadQalmaMBacAKaRKKBKKXKKjKQRKDRKCYKCRKIDKeVKHcKlXKjHKrYNAHNBWNaRNKcNIBNIONmXNsXNdXNnBNMBNRBNrXNWDNWMNFOQABQAHQBrQXBQXFQaRQKXQKDQKOQKFQNBQNDQQgQCXQCDQGBQGDQGdQYXQpBQpQQpHQLXQHuQgBQhBQhCQuFQmXQiDQUFQZDQsFQdRQkHQbRQlOQlmQPDQjDQwXQMBQMDQcFQTBQTHQrDDXQDNFDGBDGQDGRDpFDhFDmXDZXDbRDMYDRdDTRDrXSAhSBCSBrSGQSEQSHBSVRShYShkSyQSuFSiBSdcSoESocSlmSMBSFBSFKSFNSFdSFcCByCaRCKcCSBCSRCCrCGbCEHCYXCpBCpQCIBCIHCeNCgBCgFCVECVcCmkCmwCZXCZFCdRClOClmClFCjDCjdCnXCwBCwXCcRCFQCFjGXhGNhGDEGDMGCDGCHGIFGgBGVXGVEGVRGmXGsXGdYGoSGbRGnXGwXGwDGWRGFNGFLGFOGFdGFkEABEBDEBFEXOEaBEKSENBENDEYXEIgEIkEgBEgQEgHEhFEudEuFEiBEiHEiFEZDEvBEsXEsFEdXEdREkFEbBEbRElFEPCEfkEFNYAEYAhYBNYQdYDXYSRYCEYYoYgQYgRYuRYmCYZTYdBYbEYlXYjQYRbYWRpKXpQopQnpSFpCXpIBpISphNpdBpdRpbRpcZpFBpFNpFDpFopFrLADLBuLXQLXcLaFLCXLEhLpBLpFLHXLeVLhILdHLdRLoDLbRLrXIABIBQIBCIBsIBoIBMIBRIXaIaRIKYIKRINBINuICDIGBIIDIIkIgRIxFIyQIiHIdRIbYIbRIlHIwRIMYIcRIRVITRIFBIFNIFQOABOAFOBQOaFONBONMOQFOSFOCDOGBOEQOpBOLXOIBOIFOgQOgFOyQOycOmXOsXOdIOkHOMEOMkOWWHBNHXNHXWHNXHDuHDRHSuHSRHHoHhkHmRHdRHkQHlcHlRHwBHWcgAEgAggAkgBNgBQgBEgXOgYcgLXgHjgyQgiBgsFgdagMYgWSgFQgFEVBTVXEVKBVKNVKDVKYVKRVNBVNYVDBVDxVSBVSRVCjVGNVLXVIFVhBVhcVsXVdRVbRVlRhBYhKYhDYhGShxWhmNhdahdkhbRhjohMXhTRxAXxXSxKBxNBxEQxeNxeQxhXxsFxdbxlHxjcxFBxFNxFQxFOxFoyNYyYoybcyMYuBQuBRuBruDMuCouHBudQukkuoBulVuMXuFEmCYmCRmpRmeDmiMmjdmTFmFQiADiBOiaRiKRiNBiNRiSFiGkiGFiERipRiLFiIFihYibHijBijEiMXiWBiFBiFCUBQUXFUaRUNDUNcUNRUNFUDBUSHUCDUGBUGFUEqULNULoUIRUeEUeYUgBUhFUuRUiFUsXUdFUkHUbBUjSUjYUwXUMDUcHURdUTBUrBUrXUrQZAFZXZZaRZKFZNBZQFZCXZGBZYdZpBZLDZIFZHXZHNZeQZVRZVFZmXZiBZvFZdFZkFZbHZbFZwXZcCZcRZRBvBQvBGvBLvBWvCovMYsAFsBDsaRsKFsNFsDrsSHsSFsCXsCRsEBsEHsEfspBsLBsLDsIgsIRseGsbRsFBsFQsFSdNBdSRdCVdGHdYDdHcdVbdySduDdsXdlRdwXdWYdWcdWRkBMkXOkaRkNIkNFkSFkCFkYBkpRkeNkgBkhVkmXksFklVkMBkWDkFNoBNoaQoaFoNBoNXoNaoNEoSRoEroYXoYCoYbopRopFomXojkowXorFbBEbEIbdBbjYlaRlDElMXlFDjKjjSRjGBjYBjYkjpRjLXjIBjOFjeVjbRjwBnXQnSHnpFnLXnINnMBnTRwXBwXNwXYwNFwQFwSBwGFwLXwLDweNwgBwuHwjDwnXMBXMpFMIBMeNMTHcaQcNBcDHcSFcCXcpBcLXcLDcgFcuFcnXcwXccDcTQcrFTQErXNrCHrpFrgFrbFrTHrFcWNYWNbWEHWMXWTR\",\n // 5-kana words\n \"ABGHABIJAEAVAYJQALZJAIaRAHNXAHdcAHbRAZJMAZJRAZTRAdVJAklmAbcNAjdRAMnRAMWYAWpRAWgRAFgBAFhBAFdcBNJBBNJDBQKBBQhcBQlmBDEJBYJkBYJTBpNBBpJFBIJBBIJDBIcABOKXBOEJBOVJBOiJBOZJBepBBeLXBeIFBegBBgGJBVJXBuocBiJRBUJQBlXVBlITBwNFBMYVBcqXBTlmBWNFBWiJBWnRBFGHBFwXXKGJXNJBXNZJXDTTXSHSXSVRXSlHXCJDXGQJXEhXXYQJXYbRXOfXXeNcXVJFXhQJXhEJXdTRXjdXXMhBXcQTXRGBXTEBXTnQXFCXXFOFXFgFaBaFaBNJaBCJaBpBaBwXaNJKaNJDaQIBaDpRaEPDaHMFamDJalEJaMZJaFaFaFNBaFQJaFLDaFVHKBCYKBEBKBHDKXaFKXGdKXEJKXpHKXIBKXZDKXwXKKwLKNacKNYJKNJoKNWcKDGdKDTRKChXKGaRKGhBKGbRKEBTKEaRKEPTKLMDKLWRKOHDKVJcKdBcKlIBKlOPKFSBKFEPKFpFNBNJNJBQNBGHNBEPNBHXNBgFNBVXNBZDNBsXNBwXNNaRNNJDNNJENNJkNDCJNDVDNGJRNJiDNZJNNsCJNJFNNFSBNFCXNFEPNFLXNFIFQJBFQCaRQJEQQLJDQLJFQIaRQOqXQHaFQHHQQVJXQVJDQhNJQmEIQZJFQsJXQJrFQWbRDJABDBYJDXNFDXCXDXLXDXZDDXsJDQqXDSJFDJCXDEPkDEqXDYmQDpSJDOCkDOGQDHEIDVJDDuDuDWEBDJFgSBNDSBSFSBGHSBIBSBTQSKVYSJQNSJQiSJCXSEqXSJYVSIiJSOMYSHAHSHaQSeCFSepQSegBSHdHSHrFShSJSJuHSJUFSkNRSrSrSWEBSFaHSJFQSFCXSFGDSFYXSFODSFgBSFVXSFhBSFxFSFkFSFbBSFMFCADdCJXBCXaFCXKFCXNFCXCXCXGBCXEJCXYBCXLDCXIBCXOPCXHXCXgBCXhBCXiBCXlDCXcHCJNBCJNFCDCJCDGBCDVXCDhBCDiDCDJdCCmNCpJFCIaRCOqXCHCHCHZJCViJCuCuCmddCJiFCdNBCdHhClEJCnUJCreSCWlgCWTRCFBFCFNBCFYBCFVFCFhFCFdSCFTBCFWDGBNBGBQFGJBCGBEqGBpBGBgQGNBEGNJYGNkOGNJRGDUFGJpQGHaBGJeNGJeEGVBlGVKjGiJDGvJHGsVJGkEBGMIJGWjNGFBFGFCXGFGBGFYXGFpBGFMFEASJEAWpEJNFECJVEIXSEIQJEOqXEOcFEeNcEHEJEHlFEJgFEhlmEmDJEmZJEiMBEUqXEoSREPBFEPXFEPKFEPSFEPEFEPpFEPLXEPIBEJPdEPcFEPTBEJnXEqlHEMpREFCXEFODEFcFYASJYJAFYBaBYBVXYXpFYDhBYCJBYJGFYYbRYeNcYJeVYiIJYZJcYvJgYvJRYJsXYsJFYMYMYreVpBNHpBEJpBwXpQxFpYEJpeNDpJeDpeSFpeCHpHUJpHbBpHcHpmUJpiiJpUJrpsJuplITpFaBpFQqpFGBpFEfpFYBpFpBpFLJpFIDpFgBpFVXpFyQpFuFpFlFpFjDpFnXpFwXpJFMpFTBLXCJLXEFLXhFLXUJLXbFLalmLNJBLSJQLCLCLGJBLLDJLHaFLeNFLeSHLeCXLepFLhaRLZsJLsJDLsJrLocaLlLlLMdbLFNBLFSBLFEHLFkFIBBFIBXFIBaQIBKXIBSFIBpHIBLXIBgBIBhBIBuHIBmXIBiFIBZXIBvFIBbFIBjQIBwXIBWFIKTRIQUJIDGFICjQIYSRIINXIJeCIVaRImEkIZJFIvJRIsJXIdCJIJoRIbBQIjYBIcqXITFVIreVIFKFIFSFIFCJIFGFIFLDIFIBIJFOIFgBIFVXIJFhIFxFIFmXIFdHIFbBIJFrIJFWOBGBOQfXOOKjOUqXOfXBOqXEOcqXORVJOFIBOFlDHBIOHXiFHNTRHCJXHIaRHHJDHHEJHVbRHZJYHbIBHRsJHRkDHWlmgBKFgBSBgBCDgBGHgBpBgBIBgBVJgBuBgBvFgKDTgQVXgDUJgGSJgOqXgmUMgZIJgTUJgWIEgFBFgFNBgFDJgFSFgFGBgFYXgJFOgFgQgFVXgFhBgFbHgJFWVJABVQKcVDgFVOfXVeDFVhaRVmGdViJYVMaRVFNHhBNDhBCXhBEqhBpFhBLXhNJBhSJRheVXhhKEhxlmhZIJhdBQhkIJhbMNhMUJhMZJxNJgxQUJxDEkxDdFxSJRxplmxeSBxeCXxeGFxeYXxepQxegBxWVcxFEQxFLXxFIBxFgBxFxDxFZtxFdcxFbBxFwXyDJXyDlcuASJuDJpuDIBuCpJuGSJuIJFueEFuZIJusJXudWEuoIBuWGJuFBcuFKEuFNFuFQFuFDJuFGJuFVJuFUtuFdHuFTBmBYJmNJYmQhkmLJDmLJomIdXmiJYmvJRmsJRmklmmMBymMuCmclmmcnQiJABiJBNiJBDiBSFiBCJiBEFiBYBiBpFiBLXiBTHiJNciDEfiCZJiECJiJEqiOkHiHKFieNDiHJQieQcieDHieSFieCXieGFieEFieIHiegFihUJixNoioNXiFaBiFKFiFNDiFEPiFYXitFOitFHiFgBiFVEiFmXiFitiFbBiFMFiFrFUCXQUIoQUIJcUHQJUeCEUHwXUUJDUUqXUdWcUcqXUrnQUFNDUFSHUFCFUFEfUFLXUtFOZBXOZXSBZXpFZXVXZEQJZEJkZpDJZOqXZeNHZeCDZUqXZFBQZFEHZFLXvBAFvBKFvBCXvBEPvBpHvBIDvBgFvBuHvQNJvFNFvFGBvFIBvJFcsXCDsXLXsXsXsXlFsXcHsQqXsJQFsEqXseIFsFEHsFjDdBxOdNpRdNJRdEJbdpJRdhZJdnSJdrjNdFNJdFQHdFhNkNJDkYaRkHNRkHSRkVbRkuMRkjSJkcqDoSJFoEiJoYZJoOfXohEBoMGQocqXbBAFbBXFbBaFbBNDbBGBbBLXbBTBbBWDbGJYbIJHbFQqbFpQlDgQlOrFlVJRjGEBjZJRnXvJnXbBnEfHnOPDngJRnxfXnUJWwXEJwNpJwDpBwEfXwrEBMDCJMDGHMDIJMLJDcQGDcQpHcqXccqNFcqCXcFCJRBSBRBGBRBEJRBpQTBNFTBQJTBpBTBVXTFABTFSBTFCFTFGBTFMDrXCJrXLDrDNJrEfHrFQJrFitWNjdWNTR\",\n // 6-kana words\n \"AKLJMANOPFASNJIAEJWXAYJNRAIIbRAIcdaAeEfDAgidRAdjNYAMYEJAMIbRAFNJBAFpJFBBIJYBDZJFBSiJhBGdEBBEJfXBEJqXBEJWRBpaUJBLXrXBIYJMBOcfXBeEfFBestXBjNJRBcDJOBFEqXXNvJRXDMBhXCJNYXOAWpXONJWXHDEBXeIaRXhYJDXZJSJXMDJOXcASJXFVJXaBQqXaBZJFasXdQaFSJQaFEfXaFpJHaFOqXKBNSRKXvJBKQJhXKEJQJKEJGFKINJBKIJjNKgJNSKVElmKVhEBKiJGFKlBgJKjnUJKwsJYKMFIJKFNJDKFIJFKFOfXNJBSFNJBCXNBpJFNJBvQNJBMBNJLJXNJOqXNJeCXNJeGFNdsJCNbTKFNwXUJQNFEPQDiJcQDMSJQSFpBQGMQJQJeOcQyCJEQUJEBQJFBrQFEJqDXDJFDJXpBDJXIMDGiJhDIJGRDJeYcDHrDJDVXgFDkAWpDkIgRDjDEqDMvJRDJFNFDJFIBSKclmSJQOFSJQVHSJQjDSJGJBSJGJFSECJoSHEJqSJHTBSJVJDSViJYSZJNBSJsJDSFSJFSFEfXSJFLXCBUJVCJXSBCJXpBCXVJXCJXsXCJXdFCJNJHCLIJgCHiJFCVNJMChCJhCUHEJCsJTRCJdYcCoQJCCFEfXCFIJgCFUJxCFstFGJBaQGJBIDGQJqXGYJNRGJHKFGeQqDGHEJFGJeLXGHIiJGHdBlGUJEBGkIJTGFQPDGJFEqEAGegEJIJBEJVJXEhQJTEiJNcEJZJFEJoEqEjDEqEPDsXEPGJBEPOqXEPeQFEfDiDEJfEFEfepQEfMiJEqXNBEqDIDEqeSFEqVJXEMvJRYXNJDYXEJHYKVJcYYJEBYJeEcYJUqXYFpJFYFstXpAZJMpBSJFpNBNFpeQPDpHLJDpHIJFpHgJFpeitFpHZJFpJFADpFSJFpJFCJpFOqXpFitBpJFZJLXIJFLIJgRLVNJWLVHJMLwNpJLFGJBLFLJDLFOqXLJFUJIBDJXIBGJBIJBYQIJBIBIBOqXIBcqDIEGJFILNJTIIJEBIOiJhIJeNBIJeIBIhiJIIWoTRIJFAHIJFpBIJFuHIFUtFIJFTHOSBYJOEcqXOHEJqOvBpFOkVJrObBVJOncqDOcNJkHhNJRHuHJuHdMhBgBUqXgBsJXgONJBgHNJDgHHJQgJeitgHsJXgJyNagyDJBgZJDrgsVJQgkEJNgkjSJgJFAHgFCJDgFZtMVJXNFVXQfXVJXDJVXoQJVQVJQVDEfXVDvJHVEqNFVeQfXVHpJFVHxfXVVJSRVVmaRVlIJOhCXVJhHjYkhxCJVhWVUJhWiJcxBNJIxeEqDxfXBFxcFEPxFSJFxFYJXyBDQJydaUJyFOPDuYCJYuLvJRuHLJXuZJLDuFOPDuFZJHuFcqXmKHJdmCQJcmOsVJiJAGFitLCFieOfXiestXiZJMEikNJQirXzFiFQqXiFIJFiFZJFiFvtFUHpJFUteIcUteOcUVCJkUhdHcUbEJEUJqXQUMNJhURjYkUFitFZDGJHZJIxDZJVJXZJFDJZJFpQvBNJBvBSJFvJxBrseQqDsVFVJdFLJDkEJNBkmNJYkFLJDoQJOPoGsJRoEAHBoEJfFbBQqDbBZJHbFVJXlFIJBjYIrXjeitcjjCEBjWMNBwXQfXwXOaFwDsJXwCJTRwrCZJMDNJQcDDJFcqDOPRYiJFTBsJXTQIJBTFEfXTFLJDrXEJFrEJXMrFZJFWEJdEWYTlm\",\n // 7-kana words\n \"ABCDEFACNJTRAMBDJdAcNJVXBLNJEBXSIdWRXErNJkXYDJMBXZJCJaXMNJaYKKVJKcKDEJqXKDcNJhKVJrNYKbgJVXKFVJSBNBYBwDNJeQfXNJeEqXNhGJWENJFiJRQlIJbEQJfXxDQqXcfXQFNDEJQFwXUJDYcnUJDJIBgQDIUJTRDJFEqDSJQSJFSJQIJFSOPeZtSJFZJHCJXQfXCTDEqFGJBSJFGJBOfXGJBcqXGJHNJDGJRLiJEJfXEqEJFEJPEFpBEJYJBZJFYBwXUJYiJMEBYJZJyTYTONJXpQMFXFpeGIDdpJFstXpJFcPDLBVSJRLHQJqXLJFZJFIJBNJDIJBUqXIBkFDJIJEJPTIYJGWRIJeQPDIJeEfHIJFsJXOqGDSFHXEJqXgJCsJCgGQJqXgdQYJEgFMFNBgJFcqDVJwXUJVJFZJchIgJCCxOEJqXxOwXUJyDJBVRuscisciJBiJBieUtqXiJFDJkiFsJXQUGEZJcUJFsJXZtXIrXZDZJDrZJFNJDZJFstXvJFQqXvJFCJEsJXQJqkhkNGBbDJdTRbYJMEBlDwXUJMEFiJFcfXNJDRcNJWMTBLJXC\",\n // 8-kana words\n \"BraFUtHBFSJFdbNBLJXVJQoYJNEBSJBEJfHSJHwXUJCJdAZJMGjaFVJXEJPNJBlEJfFiJFpFbFEJqIJBVJCrIBdHiJhOPFChvJVJZJNJWxGFNIFLueIBQJqUHEJfUFstOZJDrlXEASJRlXVJXSFwVJNJWD\",\n // 9-kana words\n \"QJEJNNJDQJEJIBSFQJEJxegBQJEJfHEPSJBmXEJFSJCDEJqXLXNJFQqXIcQsFNJFIFEJqXUJgFsJXIJBUJEJfHNFvJxEqXNJnXUJFQqD\",\n // 10-kana words\n \"IJBEJqXZJ\"\n ];\n var mapping = \"~~AzB~X~a~KN~Q~D~S~C~G~E~Y~p~L~I~O~eH~g~V~hxyumi~~U~~Z~~v~~s~~dkoblPjfnqwMcRTr~W~~~F~~~~~Jt\";\n var wordlist = null;\n function hex(word) {\n return (0, bytes_1.hexlify)((0, strings_1.toUtf8Bytes)(word));\n }\n var KiYoKu = \"0xe3818de38284e3818f\";\n var KyoKu = \"0xe3818de38283e3818f\";\n function loadWords(lang) {\n if (wordlist !== null) {\n return;\n }\n wordlist = [];\n var transform = {};\n transform[(0, strings_1.toUtf8String)([227, 130, 154])] = false;\n transform[(0, strings_1.toUtf8String)([227, 130, 153])] = false;\n transform[(0, strings_1.toUtf8String)([227, 130, 133])] = (0, strings_1.toUtf8String)([227, 130, 134]);\n transform[(0, strings_1.toUtf8String)([227, 129, 163])] = (0, strings_1.toUtf8String)([227, 129, 164]);\n transform[(0, strings_1.toUtf8String)([227, 130, 131])] = (0, strings_1.toUtf8String)([227, 130, 132]);\n transform[(0, strings_1.toUtf8String)([227, 130, 135])] = (0, strings_1.toUtf8String)([227, 130, 136]);\n function normalize2(word2) {\n var result = \"\";\n for (var i4 = 0; i4 < word2.length; i4++) {\n var kana = word2[i4];\n var target = transform[kana];\n if (target === false) {\n continue;\n }\n if (target) {\n kana = target;\n }\n result += kana;\n }\n return result;\n }\n function sortJapanese(a3, b4) {\n a3 = normalize2(a3);\n b4 = normalize2(b4);\n if (a3 < b4) {\n return -1;\n }\n if (a3 > b4) {\n return 1;\n }\n return 0;\n }\n for (var length_1 = 3; length_1 <= 9; length_1++) {\n var d5 = data[length_1 - 3];\n for (var offset = 0; offset < d5.length; offset += length_1) {\n var word = [];\n for (var i3 = 0; i3 < length_1; i3++) {\n var k4 = mapping.indexOf(d5[offset + i3]);\n word.push(227);\n word.push(k4 & 64 ? 130 : 129);\n word.push((k4 & 63) + 128);\n }\n wordlist.push((0, strings_1.toUtf8String)(word));\n }\n }\n wordlist.sort(sortJapanese);\n if (hex(wordlist[442]) === KiYoKu && hex(wordlist[443]) === KyoKu) {\n var tmp = wordlist[442];\n wordlist[442] = wordlist[443];\n wordlist[443] = tmp;\n }\n if (wordlist_1.Wordlist.check(lang) !== \"0xcb36b09e6baa935787fd762ce65e80b0c6a8dabdfbc3a7f86ac0e2c4fd111600\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for ja (Japanese) FAILED\");\n }\n }\n var LangJa = (\n /** @class */\n function(_super) {\n __extends4(LangJa2, _super);\n function LangJa2() {\n return _super.call(this, \"ja\") || this;\n }\n LangJa2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangJa2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n LangJa2.prototype.split = function(mnemonic) {\n wordlist_1.logger.checkNormalize();\n return mnemonic.split(/(?:\\u3000| )+/g);\n };\n LangJa2.prototype.join = function(words) {\n return words.join(\"\\u3000\");\n };\n return LangJa2;\n }(wordlist_1.Wordlist)\n );\n var langJa = new LangJa();\n exports3.langJa = langJa;\n wordlist_1.Wordlist.register(langJa);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-ko.js\n var require_lang_ko = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-ko.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langKo = void 0;\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var data = [\n \"OYAa\",\n \"ATAZoATBl3ATCTrATCl8ATDloATGg3ATHT8ATJT8ATJl3ATLlvATLn4ATMT8ATMX8ATMboATMgoAToLbAToMTATrHgATvHnAT3AnAT3JbAT3MTAT8DbAT8JTAT8LmAT8MYAT8MbAT#LnAUHT8AUHZvAUJXrAUJX8AULnrAXJnvAXLUoAXLgvAXMn6AXRg3AXrMbAX3JTAX3QbAYLn3AZLgvAZrSUAZvAcAZ8AaAZ8AbAZ8AnAZ8HnAZ8LgAZ8MYAZ8MgAZ8OnAaAboAaDTrAaFTrAaJTrAaJboAaLVoAaMXvAaOl8AaSeoAbAUoAbAg8AbAl4AbGnrAbMT8AbMXrAbMn4AbQb8AbSV8AbvRlAb8AUAb8AnAb8HgAb8JTAb8NTAb8RbAcGboAcLnvAcMT8AcMX8AcSToAcrAaAcrFnAc8AbAc8MgAfGgrAfHboAfJnvAfLV8AfLkoAfMT8AfMnoAfQb8AfScrAfSgrAgAZ8AgFl3AgGX8AgHZvAgHgrAgJXoAgJX8AgJboAgLZoAgLn4AgOX8AgoATAgoAnAgoCUAgoJgAgoLXAgoMYAgoSeAgrDUAgrJTAhrFnAhrLjAhrQgAjAgoAjJnrAkMX8AkOnoAlCTvAlCV8AlClvAlFg4AlFl6AlFn3AloSnAlrAXAlrAfAlrFUAlrFbAlrGgAlrOXAlvKnAlvMTAl3AbAl3MnAnATrAnAcrAnCZ3AnCl8AnDg8AnFboAnFl3AnHX4AnHbrAnHgrAnIl3AnJgvAnLXoAnLX4AnLbrAnLgrAnLhrAnMXoAnMgrAnOn3AnSbrAnSeoAnvLnAn3OnCTGgvCTSlvCTvAUCTvKnCTvNTCT3CZCT3GUCT3MTCT8HnCUCZrCULf8CULnvCU3HnCU3JUCY6NUCbDb8CbFZoCbLnrCboOTCboScCbrFnCbvLnCb8AgCb8HgCb$LnCkLfoClBn3CloDUDTHT8DTLl3DTSU8DTrAaDTrLXDTrLjDTrOYDTrOgDTvFXDTvFnDT3HUDT3LfDUCT9DUDT4DUFVoDUFV8DUFkoDUGgrDUJnrDULl8DUMT8DUMXrDUMX4DUMg8DUOUoDUOgvDUOg8DUSToDUSZ8DbDXoDbDgoDbGT8DbJn3DbLg3DbLn4DbMXrDbMg8DbOToDboJXGTClvGTDT8GTFZrGTLVoGTLlvGTLl3GTMg8GTOTvGTSlrGToCUGTrDgGTrJYGTrScGTtLnGTvAnGTvQgGUCZrGUDTvGUFZoGUHXrGULnvGUMT8GUoMgGXoLnGXrMXGXrMnGXvFnGYLnvGZOnvGZvOnGZ8LaGZ8LmGbAl3GbDYvGbDlrGbHX3GbJl4GbLV8GbLn3GbMn4GboJTGboRfGbvFUGb3GUGb4JnGgDX3GgFl$GgJlrGgLX6GgLZoGgLf8GgOXoGgrAgGgrJXGgrMYGgrScGgvATGgvOYGnAgoGnJgvGnLZoGnLg3GnLnrGnQn8GnSbrGnrMgHTClvHTDToHTFT3HTQT8HToJTHToJgHTrDUHTrMnHTvFYHTvRfHT8MnHT8SUHUAZ8HUBb4HUDTvHUoMYHXFl6HXJX6HXQlrHXrAUHXrMnHXrSbHXvFYHXvKXHX3LjHX3MeHYvQlHZrScHZvDbHbAcrHbFT3HbFl3HbJT8HbLTrHbMT8HbMXrHbMbrHbQb8HbSX3HboDbHboJTHbrFUHbrHgHbrJTHb8JTHb8MnHb8QgHgAlrHgDT3HgGgrHgHgrHgJTrHgJT8HgLX@HgLnrHgMT8HgMX8HgMboHgOnrHgQToHgRg3HgoHgHgrCbHgrFnHgrLVHgvAcHgvAfHnAloHnCTrHnCnvHnGTrHnGZ8HnGnvHnJT8HnLf8HnLkvHnMg8HnRTrITvFUITvFnJTAXrJTCV8JTFT3JTFT8JTFn4JTGgvJTHT8JTJT8JTJXvJTJl3JTJnvJTLX4JTLf8JTLhvJTMT8JTMXrJTMnrJTObrJTQT8JTSlvJT8DUJT8FkJT8MTJT8OXJT8OgJT8QUJT8RfJUHZoJXFT4JXFlrJXGZ8JXGnrJXLV8JXLgvJXMXoJXMX3JXNboJXPlvJXoJTJXoLkJXrAXJXrHUJXrJgJXvJTJXvOnJX4KnJYAl3JYJT8JYLhvJYQToJYrQXJY6NUJbAl3JbCZrJbDloJbGT8JbGgrJbJXvJbJboJbLf8JbLhrJbLl3JbMnvJbRg8JbSZ8JboDbJbrCZJbrSUJb3KnJb8LnJfRn8JgAXrJgCZrJgDTrJgGZrJgGZ8JgHToJgJT8JgJXoJgJgvJgLX4JgLZ3JgLZ8JgLn4JgMgrJgMn4JgOgvJgPX6JgRnvJgSToJgoCZJgoJbJgoMYJgrJXJgrJgJgrLjJg6MTJlCn3JlGgvJlJl8Jl4AnJl8FnJl8HgJnAToJnATrJnAbvJnDUoJnGnrJnJXrJnJXvJnLhvJnLnrJnLnvJnMToJnMT8JnMXvJnMX3JnMg8JnMlrJnMn4JnOX8JnST4JnSX3JnoAgJnoAnJnoJTJnoObJnrAbJnrAkJnrHnJnrJTJnrJYJnrOYJnrScJnvCUJnvFaJnvJgJnvJnJnvOYJnvQUJnvRUJn3FnJn3JTKnFl3KnLT6LTDlvLTMnoLTOn3LTRl3LTSb4LTSlrLToAnLToJgLTrAULTrAcLTrCULTrHgLTrMgLT3JnLULnrLUMX8LUoJgLVATrLVDTrLVLb8LVoJgLV8MgLV8RTLXDg3LXFlrLXrCnLXrLXLX3GTLX4GgLX4OYLZAXrLZAcrLZAgrLZAhrLZDXyLZDlrLZFbrLZFl3LZJX6LZJX8LZLc8LZLnrLZSU8LZoJTLZoJnLZrAgLZrAnLZrJYLZrLULZrMgLZrSkLZvAnLZvGULZvJeLZvOTLZ3FZLZ4JXLZ8STLZ8ScLaAT3LaAl3LaHT8LaJTrLaJT8LaJXrLaJgvLaJl4LaLVoLaMXrLaMXvLaMX8LbClvLbFToLbHlrLbJn4LbLZ3LbLhvLbMXrLbMnoLbvSULcLnrLc8HnLc8MTLdrMnLeAgoLeOgvLeOn3LfAl3LfLnvLfMl3LfOX8Lf8AnLf8JXLf8LXLgJTrLgJXrLgJl8LgMX8LgRZrLhCToLhrAbLhrFULhrJXLhvJYLjHTrLjHX4LjJX8LjLhrLjSX3LjSZ4LkFX4LkGZ8LkGgvLkJTrLkMXoLkSToLkSU8LkSZ8LkoOYLl3FfLl3MgLmAZrLmCbrLmGgrLmHboLmJnoLmJn3LmLfoLmLhrLmSToLnAX6LnAb6LnCZ3LnCb3LnDTvLnDb8LnFl3LnGnrLnHZvLnHgvLnITvLnJT8LnJX8LnJlvLnLf8LnLg6LnLhvLnLnoLnMXrLnMg8LnQlvLnSbrLnrAgLnrAnLnrDbLnrFkLnrJdLnrMULnrOYLnrSTLnvAnLnvDULnvHgLnvOYLnvOnLn3GgLn4DULn4JTLn4JnMTAZoMTAloMTDb8MTFT8MTJnoMTJnrMTLZrMTLhrMTLkvMTMX8MTRTrMToATMTrDnMTrOnMT3JnMT4MnMT8FUMT8FaMT8FlMT8GTMT8GbMT8GnMT8HnMT8JTMT8JbMT8OTMUCl8MUJTrMUJU8MUMX8MURTrMUSToMXAX6MXAb6MXCZoMXFXrMXHXrMXLgvMXOgoMXrAUMXrAnMXrHgMXrJYMXrJnMXrMTMXrMgMXrOYMXrSZMXrSgMXvDUMXvOTMX3JgMX3OTMX4JnMX8DbMX8FnMX8HbMX8HgMX8HnMX8LbMX8MnMX8OnMYAb8MYGboMYHTvMYHX4MYLTrMYLnvMYMToMYOgvMYRg3MYSTrMbAToMbAXrMbAl3MbAn8MbGZ8MbJT8MbJXrMbMXvMbMX8MbMnoMbrMUMb8AfMb8FbMb8FkMcJXoMeLnrMgFl3MgGTvMgGXoMgGgrMgGnrMgHT8MgHZrMgJnoMgLnrMgLnvMgMT8MgQUoMgrHnMgvAnMg8HgMg8JYMg8LfMloJnMl8ATMl8AXMl8JYMnAToMnAT4MnAZ8MnAl3MnAl4MnCl8MnHT8MnHg8MnJnoMnLZoMnLhrMnMXoMnMX3MnMnrMnOgvMnrFbMnrFfMnrFnMnrNTMnvJXNTMl8OTCT3OTFV8OTFn3OTHZvOTJXrOTOl3OT3ATOT3JUOT3LZOT3LeOT3MbOT8ATOT8AbOT8AgOT8MbOUCXvOUMX3OXHXvOXLl3OXrMUOXvDbOX6NUOX8JbOYFZoOYLbrOYLkoOYMg8OYSX3ObHTrObHT4ObJgrObLhrObMX3ObOX8Ob8FnOeAlrOeJT8OeJXrOeJnrOeLToOeMb8OgJXoOgLXoOgMnrOgOXrOgOloOgoAgOgoJbOgoMYOgoSTOg8AbOjLX4OjMnoOjSV8OnLVoOnrAgOn3DUPXQlrPXvFXPbvFTPdAT3PlFn3PnvFbQTLn4QToAgQToMTQULV8QURg8QUoJnQXCXvQbFbrQb8AaQb8AcQb8FbQb8MYQb8ScQeAlrQeLhrQjAn3QlFXoQloJgQloSnRTLnvRTrGURTrJTRUJZrRUoJlRUrQnRZrLmRZrMnRZrSnRZ8ATRZ8JbRZ8ScRbMT8RbST3RfGZrRfMX8RfMgrRfSZrRnAbrRnGT8RnvJgRnvLfRnvMTRn8AaSTClvSTJgrSTOXrSTRg3STRnvSToAcSToAfSToAnSToHnSToLjSToMTSTrAaSTrEUST3BYST8AgST8LmSUAZvSUAgrSUDT4SUDT8SUGgvSUJXoSUJXvSULTrSU8JTSU8LjSV8AnSV8JgSXFToSXLf8SYvAnSZrDUSZrMUSZrMnSZ8HgSZ8JTSZ8JgSZ8MYSZ8QUSaQUoSbCT3SbHToSbQYvSbSl4SboJnSbvFbSb8HbSb8JgSb8OTScGZrScHgrScJTvScMT8ScSToScoHbScrMTScvAnSeAZrSeAcrSeHboSeJUoSeLhrSeMT8SeMXrSe6JgSgHTrSkJnoSkLnvSk8CUSlFl3SlrSnSl8GnSmAboSmGT8SmJU8\",\n \"ATLnDlATrAZoATrJX4ATrMT8ATrMX4ATrRTrATvDl8ATvJUoATvMl8AT3AToAT3MX8AT8CT3AT8DT8AT8HZrAT8HgoAUAgFnAUCTFnAXoMX8AXrAT8AXrGgvAXrJXvAXrOgoAXvLl3AZvAgoAZvFbrAZvJXoAZvJl8AZvJn3AZvMX8AZvSbrAZ8FZoAZ8LZ8AZ8MU8AZ8OTvAZ8SV8AZ8SX3AbAgFZAboJnoAbvGboAb8ATrAb8AZoAb8AgrAb8Al4Ab8Db8Ab8JnoAb8LX4Ab8LZrAb8LhrAb8MT8Ab8OUoAb8Qb8Ab8ST8AcrAUoAcrAc8AcrCZ3AcrFT3AcrFZrAcrJl4AcrJn3AcrMX3AcrOTvAc8AZ8Ac8MT8AfAcJXAgoFn4AgoGgvAgoGnrAgoLc8AgoMXoAgrLnrAkrSZ8AlFXCTAloHboAlrHbrAlrLhrAlrLkoAl3CZrAl3LUoAl3LZrAnrAl4AnrMT8An3HT4BT3IToBX4MnvBb!Ln$CTGXMnCToLZ4CTrHT8CT3JTrCT3RZrCT#GTvCU6GgvCU8Db8CU8GZrCU8HT8CboLl3CbrGgrCbrMU8Cb8DT3Cb8GnrCb8LX4Cb8MT8Cb8ObrCgrGgvCgrKX4Cl8FZoDTrAbvDTrDboDTrGT6DTrJgrDTrMX3DTrRZrDTrRg8DTvAVvDTvFZoDT3DT8DT3Ln3DT4HZrDT4MT8DT8AlrDT8MT8DUAkGbDUDbJnDYLnQlDbDUOYDbMTAnDbMXSnDboAT3DboFn4DboLnvDj6JTrGTCgFTGTGgFnGTJTMnGTLnPlGToJT8GTrCT3GTrLVoGTrLnvGTrMX3GTrMboGTvKl3GZClFnGZrDT3GZ8DTrGZ8FZ8GZ8MXvGZ8On8GZ8ST3GbCnQXGbMbFnGboFboGboJg3GboMXoGb3JTvGb3JboGb3Mn6Gb3Qb8GgDXLjGgMnAUGgrDloGgrHX4GgrSToGgvAXrGgvAZvGgvFbrGgvLl3GgvMnvGnDnLXGnrATrGnrMboGnuLl3HTATMnHTAgCnHTCTCTHTrGTvHTrHTvHTrJX8HTrLl8HTrMT8HTrMgoHTrOTrHTuOn3HTvAZrHTvDTvHTvGboHTvJU8HTvLl3HTvMXrHTvQb4HT4GT6HT4JT8HT4Jb#HT8Al3HT8GZrHT8GgrHT8HX4HT8Jb8HT8JnoHT8LTrHT8LgvHT8SToHT8SV8HUoJUoHUoJX8HUoLnrHXrLZoHXvAl3HX3LnrHX4FkvHX4LhrHX4MXoHX4OnoHZrAZ8HZrDb8HZrGZ8HZrJnrHZvGZ8HZvLnvHZ8JnvHZ8LhrHbCXJlHbMTAnHboJl4HbpLl3HbrJX8HbrLnrHbrMnvHbvRYrHgoSTrHgrFV8HgrGZ8HgrJXoHgrRnvHgvBb!HgvGTrHgvHX4HgvHn!HgvLTrHgvSU8HnDnLbHnFbJbHnvDn8Hn6GgvHn!BTvJTCTLnJTQgFnJTrAnvJTrLX4JTrOUoJTvFn3JTvLnrJTvNToJT3AgoJT3Jn4JT3LhvJT3ObrJT8AcrJT8Al3JT8JT8JT8JnoJT8LX4JT8LnrJT8MX3JT8Rg3JT8Sc8JUoBTvJU8AToJU8GZ8JU8GgvJU8JTrJU8JXrJU8JnrJU8LnvJU8ScvJXHnJlJXrGgvJXrJU8JXrLhrJXrMT8JXrMXrJXrQUoJXvCTvJXvGZ8JXvGgrJXvQT8JX8Ab8JX8DT8JX8GZ8JX8HZvJX8LnrJX8MT8JX8MXoJX8MnvJX8ST3JYGnCTJbAkGbJbCTAnJbLTAcJboDT3JboLb6JbrAnvJbrCn3JbrDl8JbrGboJbrIZoJbrJnvJbrMnvJbrQb4Jb8RZrJeAbAnJgJnFbJgScAnJgrATrJgvHZ8JgvMn4JlJlFbJlLiQXJlLjOnJlRbOlJlvNXoJlvRl3Jl4AcrJl8AUoJl8MnrJnFnMlJnHgGbJnoDT8JnoFV8JnoGgvJnoIT8JnoQToJnoRg3JnrCZ3JnrGgrJnrHTvJnrLf8JnrOX8JnvAT3JnvFZoJnvGT8JnvJl4JnvMT8JnvMX8JnvOXrJnvPX6JnvSX3JnvSZrJn3MT8Jn3MX8Jn3RTrLTATKnLTJnLTLTMXKnLTRTQlLToGb8LTrAZ8LTrCZ8LTrDb8LTrHT8LT3PX6LT4FZoLT$CTvLT$GgrLUvHX3LVoATrLVoAgoLVoJboLVoMX3LVoRg3LV8CZ3LV8FZoLV8GTvLXrDXoLXrFbrLXvAgvLXvFlrLXvLl3LXvRn6LX4Mb8LX8GT8LYCXMnLYrMnrLZoSTvLZrAZvLZrAloLZrFToLZrJXvLZrJboLZrJl4LZrLnrLZrMT8LZrOgvLZrRnvLZrST4LZvMX8LZvSlvLZ8AgoLZ8CT3LZ8JT8LZ8LV8LZ8LZoLZ8Lg8LZ8SV8LZ8SbrLZ$HT8LZ$Mn4La6CTvLbFbMnLbRYFTLbSnFZLboJT8LbrAT9LbrGb3LbrQb8LcrJX8LcrMXrLerHTvLerJbrLerNboLgrDb8LgrGZ8LgrHTrLgrMXrLgrSU8LgvJTrLgvLl3Lg6Ll3LhrLnrLhrMT8LhvAl4LiLnQXLkoAgrLkoJT8LkoJn4LlrSU8Ll3FZoLl3HTrLl3JX8Ll3JnoLl3LToLmLeFbLnDUFbLnLVAnLnrATrLnrAZoLnrAb8LnrAlrLnrGgvLnrJU8LnrLZrLnrLhrLnrMb8LnrOXrLnrSZ8LnvAb4LnvDTrLnvDl8LnvHTrLnvHbrLnvJT8LnvJU8LnvJbrLnvLhvLnvMX8LnvMb8LnvNnoLnvSU8Ln3Al3Ln4FZoLn4GT6Ln4JgvLn4LhrLn4MT8Ln4SToMToCZrMToJX8MToLX4MToLf8MToRg3MTrEloMTvGb6MT3BTrMT3Lb6MT8AcrMT8AgrMT8GZrMT8JnoMT8LnrMT8MX3MUOUAnMXAbFnMXoAloMXoJX8MXoLf8MXoLl8MXrAb8MXrDTvMXrGT8MXrGgrMXrHTrMXrLf8MXrMU8MXrOXvMXrQb8MXvGT8MXvHTrMXvLVoMX3AX3MX3Jn3MX3LhrMX3MX3MX4AlrMX4OboMX8GTvMX8GZrMX8GgrMX8JT8MX8JX8MX8LhrMX8MT8MYDUFbMYMgDbMbGnFfMbvLX4MbvLl3Mb8Mb8Mb8ST4MgGXCnMg8ATrMg8AgoMg8CZrMg8DTrMg8DboMg8HTrMg8JgrMg8LT8MloJXoMl8AhrMl8JT8MnLgAUMnoJXrMnoLX4MnoLhrMnoMT8MnrAl4MnrDb8MnrOTvMnrOgvMnrQb8MnrSU8MnvGgrMnvHZ8Mn3MToMn4DTrMn4LTrMn4Mg8NnBXAnOTFTFnOToAToOTrGgvOTrJX8OT3JXoOT6MTrOT8GgrOT8HTpOT8MToOUoHT8OUoJT8OUoLn3OXrAgoOXrDg8OXrMT8OXvSToOX6CTvOX8CZrOX8OgrOb6HgvOb8AToOb8MT8OcvLZ8OgvAlrOgvHTvOgvJTrOgvJnrOgvLZrOgvLn4OgvMT8OgvRTrOg8AZoOg8DbvOnrOXoOnvJn4OnvLhvOnvRTrOn3GgoOn3JnvOn6JbvOn8OTrPTGYFTPbBnFnPbGnDnPgDYQTPlrAnvPlrETvPlrLnvPlrMXvPlvFX4QTMTAnQTrJU8QYCnJlQYJlQlQbGTQbQb8JnrQb8LZoQb8LnvQb8MT8Qb8Ml8Qb8ST4QloAl4QloHZvQloJX8QloMn8QnJZOlRTrAZvRTrDTrRTvJn4RTvLhvRT4Jb8RZrAZrRZ8AkrRZ8JU8RZ8LV8RZ8LnvRbJlQXRg3GboRg3MnvRg8AZ8Rg8JboRg8Jl4RnLTCbRnvFl3RnvQb8SToAl4SToCZrSToFZoSToHXrSToJU8SToJgvSToJl4SToLhrSToMX3STrAlvSTrCT9STrCgrSTrGgrSTrHXrSTrHboSTrJnoSTrNboSTvLnrST4AZoST8Ab8ST8JT8SUoJn3SU6HZ#SU6JTvSU8Db8SU8HboSU8LgrSV8JT8SZrAcrSZrAl3SZrJT8SZrJnvSZrMT8SZvLUoSZ4FZoSZ8JnoSZ8RZrScoLnrScoMT8ScoMX8ScrAT4ScrAZ8ScrLZ8ScrLkvScvDb8ScvLf8ScvNToSgrFZrShvKnrSloHUoSloLnrSlrMXoSl8HgrSmrJUoSn3BX6\",\n \"ATFlOn3ATLgrDYAT4MTAnAT8LTMnAYJnRTrAbGgJnrAbLV8LnAbvNTAnAeFbLg3AgOYMXoAlQbFboAnDboAfAnJgoJTBToDgAnBUJbAl3BboDUAnCTDlvLnCTFTrSnCYoQTLnDTwAbAnDUDTrSnDUHgHgrDX8LXFnDbJXAcrETvLTLnGTFTQbrGTMnGToGT3DUFbGUJlPX3GbQg8LnGboJbFnGb3GgAYGgAg8ScGgMbAXrGgvAbAnGnJTLnvGnvATFgHTDT6ATHTrDlJnHYLnMn8HZrSbJTHZ8LTFnHbFTJUoHgSeMT8HgrLjAnHgvAbAnHlFUrDlHnDgvAnHnHTFT3HnQTGnrJTAaMXvJTGbCn3JTOgrAnJXvAXMnJbMg8SnJbMnRg3Jb8LTMnJnAl3OnJnGYrQlJnJlQY3LTDlCn3LTJjLg3LTLgvFXLTMg3GTLV8HUOgLXFZLg3LXNXrMnLX8QXFnLX9AlMYLYLXPXrLZAbJU8LZDUJU8LZMXrSnLZ$AgFnLaPXrDULbFYrMnLbMn8LXLboJgJgLeFbLg3LgLZrSnLgOYAgoLhrRnJlLkCTrSnLkOnLhrLnFX%AYLnFZoJXLnHTvJbLnLloAbMTATLf8MTHgJn3MTMXrAXMT3MTFnMUITvFnMXFX%AYMXMXvFbMXrFTDbMYAcMX3MbLf8SnMb8JbFnMgMXrMTMgvAXFnMgvGgCmMnAloSnMnFnJTrOXvMXSnOX8HTMnObJT8ScObLZFl3ObMXCZoPTLgrQXPUFnoQXPU3RXJlPX3RkQXPbrJXQlPlrJbFnQUAhrDbQXGnCXvQYLnHlvQbLfLnvRTOgvJbRXJYrQlRYLnrQlRbLnrQlRlFT8JlRlFnrQXSTClCn3STHTrAnSTLZQlrSTMnGTrSToHgGbSTrGTDnSTvGXCnST3HgFbSU3HXAXSbAnJn3SbFT8LnScLfLnv\",\n \"AT3JgJX8AT8FZoSnAT8JgFV8AT8LhrDbAZ8JT8DbAb8GgLhrAb8SkLnvAe8MT8SnAlMYJXLVAl3GYDTvAl3LfLnvBUDTvLl3CTOn3HTrCT3DUGgrCU8MT8AbCbFTrJUoCgrDb8MTDTLV8JX8DTLnLXQlDT8LZrSnDUQb8FZ8DUST4JnvDb8ScOUoDj6GbJl4GTLfCYMlGToAXvFnGboAXvLnGgAcrJn3GgvFnSToGnLf8JnvGn#HTDToHTLnFXJlHTvATFToHTvHTDToHTvMTAgoHT3STClvHT4AlFl6HT8HTDToHUoDgJTrHUoScMX3HbRZrMXoHboJg8LTHgDb8JTrHgMToLf8HgvLnLnoHnHn3HT4Hn6MgvAnJTJU8ScvJT3AaQT8JT8HTrAnJXrRg8AnJbAloMXoJbrATFToJbvMnoSnJgDb6GgvJgDb8MXoJgSX3JU8JguATFToJlPYLnQlJlQkDnLbJlQlFYJlJl8Lf8OTJnCTFnLbJnLTHXMnJnLXGXCnJnoFfRg3JnrMYRg3Jn3HgFl3KT8Dg8LnLTRlFnPTLTvPbLbvLVoSbrCZLXMY6HT3LXNU7DlrLXNXDTATLX8DX8LnLZDb8JU8LZMnoLhrLZSToJU8LZrLaLnrLZvJn3SnLZ8LhrSnLaJnoMT8LbFlrHTvLbrFTLnrLbvATLlvLb6OTFn3LcLnJZOlLeAT6Mn4LeJT3ObrLg6LXFlrLhrJg8LnLhvDlPX4LhvLfLnvLj6JTFT3LnFbrMXoLnQluCTvLnrQXCY6LnvLfLnvLnvMgLnvLnvSeLf8MTMbrJn3MT3JgST3MT8AnATrMT8LULnrMUMToCZrMUScvLf8MXoDT8SnMX6ATFToMX8AXMT8MX8FkMT8MX8HTrDUMX8ScoSnMYJT6CTvMgAcrMXoMg8SToAfMlvAXLg3MnFl3AnvOT3AnFl3OUoATHT8OU3RnLXrOXrOXrSnObPbvFn6Og8HgrSnOg8OX8DbPTvAgoJgPU3RYLnrPXrDnJZrPb8CTGgvPlrLTDlvPlvFUJnoQUvFXrQlQeMnoAl3QlrQlrSnRTFTrJUoSTDlLiLXSTFg6HT3STJgoMn4STrFTJTrSTrLZFl3ST4FnMXoSUrDlHUoScvHTvSnSfLkvMXo\",\n \"AUoAcrMXoAZ8HboAg8AbOg6ATFgAg8AloMXoAl3AT8JTrAl8MX8MXoCT3SToJU8Cl8Db8MXoDT8HgrATrDboOT8MXoGTOTrATMnGT8LhrAZ8GnvFnGnQXHToGgvAcrHTvAXvLl3HbrAZoMXoHgBlFXLg3HgMnFXrSnHgrSb8JUoHn6HT8LgvITvATrJUoJUoLZrRnvJU8HT8Jb8JXvFX8QT8JXvLToJTrJYrQnGnQXJgrJnoATrJnoJU8ScvJnvMnvMXoLTCTLgrJXLTJlRTvQlLbRnJlQYvLbrMb8LnvLbvFn3RnoLdCVSTGZrLeSTvGXCnLg3MnoLn3MToLlrETvMT8SToAl3MbrDU6GTvMb8LX4LhrPlrLXGXCnSToLf8Rg3STrDb8LTrSTvLTHXMnSb3RYLnMnSgOg6ATFg\",\n \"HUDlGnrQXrJTrHgLnrAcJYMb8DULc8LTvFgGnCk3Mg8JbAnLX4QYvFYHnMXrRUoJnGnvFnRlvFTJlQnoSTrBXHXrLYSUJgLfoMT8Se8DTrHbDb\",\n \"AbDl8SToJU8An3RbAb8ST8DUSTrGnrAgoLbFU6Db8LTrMg8AaHT8Jb8ObDl8SToJU8Pb3RlvFYoJl\"\n ];\n var codes = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*\";\n function getHangul(code) {\n if (code >= 40) {\n code = code + 168 - 40;\n } else if (code >= 19) {\n code = code + 97 - 19;\n }\n return (0, strings_1.toUtf8String)([225, (code >> 6) + 132, (code & 63) + 128]);\n }\n var wordlist = null;\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = [];\n data.forEach(function(data2, length) {\n length += 4;\n for (var i3 = 0; i3 < data2.length; i3 += length) {\n var word = \"\";\n for (var j2 = 0; j2 < length; j2++) {\n word += getHangul(codes.indexOf(data2[i3 + j2]));\n }\n wordlist.push(word);\n }\n });\n wordlist.sort();\n if (wordlist_1.Wordlist.check(lang) !== \"0xf9eddeace9c5d3da9c93cf7d3cd38f6a13ed3affb933259ae865714e8a3ae71a\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for ko (Korean) FAILED\");\n }\n }\n var LangKo = (\n /** @class */\n function(_super) {\n __extends4(LangKo2, _super);\n function LangKo2() {\n return _super.call(this, \"ko\") || this;\n }\n LangKo2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangKo2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n return LangKo2;\n }(wordlist_1.Wordlist)\n );\n var langKo = new LangKo();\n exports3.langKo = langKo;\n wordlist_1.Wordlist.register(langKo);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-it.js\n var require_lang_it = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-it.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langIt = void 0;\n var wordlist_1 = require_wordlist();\n var words = \"AbacoAbbaglioAbbinatoAbeteAbissoAbolireAbrasivoAbrogatoAccadereAccennoAccusatoAcetoneAchilleAcidoAcquaAcreAcrilicoAcrobataAcutoAdagioAddebitoAddomeAdeguatoAderireAdipeAdottareAdulareAffabileAffettoAffissoAffrantoAforismaAfosoAfricanoAgaveAgenteAgevoleAggancioAgireAgitareAgonismoAgricoloAgrumetoAguzzoAlabardaAlatoAlbatroAlberatoAlboAlbumeAlceAlcolicoAlettoneAlfaAlgebraAlianteAlibiAlimentoAllagatoAllegroAllievoAllodolaAllusivoAlmenoAlogenoAlpacaAlpestreAltalenaAlternoAlticcioAltroveAlunnoAlveoloAlzareAmalgamaAmanitaAmarenaAmbitoAmbratoAmebaAmericaAmetistaAmicoAmmassoAmmendaAmmirareAmmonitoAmoreAmpioAmpliareAmuletoAnacardoAnagrafeAnalistaAnarchiaAnatraAncaAncellaAncoraAndareAndreaAnelloAngeloAngolareAngustoAnimaAnnegareAnnidatoAnnoAnnuncioAnonimoAnticipoAnziApaticoAperturaApodeApparireAppetitoAppoggioApprodoAppuntoAprileArabicaArachideAragostaAraldicaArancioAraturaArazzoArbitroArchivioArditoArenileArgentoArgineArgutoAriaArmoniaArneseArredatoArringaArrostoArsenicoArsoArteficeArzilloAsciuttoAscoltoAsepsiAsetticoAsfaltoAsinoAsolaAspiratoAsproAssaggioAsseAssolutoAssurdoAstaAstenutoAsticeAstrattoAtavicoAteismoAtomicoAtonoAttesaAttivareAttornoAttritoAttualeAusilioAustriaAutistaAutonomoAutunnoAvanzatoAvereAvvenireAvvisoAvvolgereAzioneAzotoAzzimoAzzurroBabeleBaccanoBacinoBacoBadessaBadilataBagnatoBaitaBalconeBaldoBalenaBallataBalzanoBambinoBandireBaraondaBarbaroBarcaBaritonoBarlumeBaroccoBasilicoBassoBatostaBattutoBauleBavaBavosaBeccoBeffaBelgioBelvaBendaBenevoleBenignoBenzinaBereBerlinaBetaBibitaBiciBidoneBifidoBigaBilanciaBimboBinocoloBiologoBipedeBipolareBirbanteBirraBiscottoBisestoBisnonnoBisonteBisturiBizzarroBlandoBlattaBollitoBonificoBordoBoscoBotanicoBottinoBozzoloBraccioBradipoBramaBrancaBravuraBretellaBrevettoBrezzaBrigliaBrillanteBrindareBroccoloBrodoBronzinaBrulloBrunoBubboneBucaBudinoBuffoneBuioBulboBuonoBurloneBurrascaBussolaBustaCadettoCaducoCalamaroCalcoloCalesseCalibroCalmoCaloriaCambusaCamerataCamiciaCamminoCamolaCampaleCanapaCandelaCaneCaninoCanottoCantinaCapaceCapelloCapitoloCapogiroCapperoCapraCapsulaCarapaceCarcassaCardoCarismaCarovanaCarrettoCartolinaCasaccioCascataCasermaCasoCassoneCastelloCasualeCatastaCatenaCatrameCautoCavilloCedibileCedrataCefaloCelebreCellulareCenaCenoneCentesimoCeramicaCercareCertoCerumeCervelloCesoiaCespoCetoChelaChiaroChiccaChiedereChimeraChinaChirurgoChitarraCiaoCiclismoCifrareCignoCilindroCiottoloCircaCirrosiCitricoCittadinoCiuffoCivettaCivileClassicoClinicaCloroCoccoCodardoCodiceCoerenteCognomeCollareColmatoColoreColposoColtivatoColzaComaCometaCommandoComodoComputerComuneConcisoCondurreConfermaCongelareConiugeConnessoConoscereConsumoContinuoConvegnoCopertoCopioneCoppiaCopricapoCorazzaCordataCoricatoCorniceCorollaCorpoCorredoCorsiaCorteseCosmicoCostanteCotturaCovatoCratereCravattaCreatoCredereCremosoCrescitaCretaCricetoCrinaleCrisiCriticoCroceCronacaCrostataCrucialeCruscaCucireCuculoCuginoCullatoCupolaCuratoreCursoreCurvoCuscinoCustodeDadoDainoDalmataDamerinoDanielaDannosoDanzareDatatoDavantiDavveroDebuttoDecennioDecisoDeclinoDecolloDecretoDedicatoDefinitoDeformeDegnoDelegareDelfinoDelirioDeltaDemenzaDenotatoDentroDepositoDerapataDerivareDerogaDescrittoDesertoDesiderioDesumereDetersivoDevotoDiametroDicembreDiedroDifesoDiffusoDigerireDigitaleDiluvioDinamicoDinnanziDipintoDiplomaDipoloDiradareDireDirottoDirupoDisagioDiscretoDisfareDisgeloDispostoDistanzaDisumanoDitoDivanoDiveltoDividereDivoratoDobloneDocenteDoganaleDogmaDolceDomatoDomenicaDominareDondoloDonoDormireDoteDottoreDovutoDozzinaDragoDruidoDubbioDubitareDucaleDunaDuomoDupliceDuraturoEbanoEccessoEccoEclissiEconomiaEderaEdicolaEdileEditoriaEducareEgemoniaEgliEgoismoEgregioElaboratoElargireEleganteElencatoElettoElevareElficoElicaElmoElsaElusoEmanatoEmblemaEmessoEmiroEmotivoEmozioneEmpiricoEmuloEndemicoEnduroEnergiaEnfasiEnotecaEntrareEnzimaEpatiteEpilogoEpisodioEpocaleEppureEquatoreErarioErbaErbosoEredeEremitaErigereErmeticoEroeErosivoErranteEsagonoEsameEsanimeEsaudireEscaEsempioEsercitoEsibitoEsigenteEsistereEsitoEsofagoEsortatoEsosoEspansoEspressoEssenzaEssoEstesoEstimareEstoniaEstrosoEsultareEtilicoEtnicoEtruscoEttoEuclideoEuropaEvasoEvidenzaEvitatoEvolutoEvvivaFabbricaFaccendaFachiroFalcoFamigliaFanaleFanfaraFangoFantasmaFareFarfallaFarinosoFarmacoFasciaFastosoFasulloFaticareFatoFavolosoFebbreFecolaFedeFegatoFelpaFeltroFemminaFendereFenomenoFermentoFerroFertileFessuraFestivoFettaFeudoFiabaFiduciaFifaFiguratoFiloFinanzaFinestraFinireFioreFiscaleFisicoFiumeFlaconeFlamencoFleboFlemmaFloridoFluenteFluoroFobicoFocacciaFocosoFoderatoFoglioFolataFolcloreFolgoreFondenteFoneticoFoniaFontanaForbitoForchettaForestaFormicaFornaioForoFortezzaForzareFosfatoFossoFracassoFranaFrassinoFratelloFreccettaFrenataFrescoFrigoFrollinoFrondeFrugaleFruttaFucilataFucsiaFuggenteFulmineFulvoFumanteFumettoFumosoFuneFunzioneFuocoFurboFurgoneFuroreFusoFutileGabbianoGaffeGalateoGallinaGaloppoGamberoGammaGaranziaGarboGarofanoGarzoneGasdottoGasolioGastricoGattoGaudioGazeboGazzellaGecoGelatinaGelsoGemelloGemmatoGeneGenitoreGennaioGenotipoGergoGhepardoGhiaccioGhisaGialloGildaGineproGiocareGioielloGiornoGioveGiratoGironeGittataGiudizioGiuratoGiustoGlobuloGlutineGnomoGobbaGolfGomitoGommoneGonfioGonnaGovernoGracileGradoGraficoGrammoGrandeGrattareGravosoGraziaGrecaGreggeGrifoneGrigioGrinzaGrottaGruppoGuadagnoGuaioGuantoGuardareGufoGuidareIbernatoIconaIdenticoIdillioIdoloIdraIdricoIdrogenoIgieneIgnaroIgnoratoIlareIllesoIllogicoIlludereImballoImbevutoImboccoImbutoImmaneImmersoImmolatoImpaccoImpetoImpiegoImportoImprontaInalareInarcareInattivoIncantoIncendioInchinoIncisivoInclusoIncontroIncrocioIncuboIndagineIndiaIndoleIneditoInfattiInfilareInflittoIngaggioIngegnoIngleseIngordoIngrossoInnescoInodoreInoltrareInondatoInsanoInsettoInsiemeInsonniaInsulinaIntasatoInteroIntonacoIntuitoInumidireInvalidoInveceInvitoIperboleIpnoticoIpotesiIppicaIrideIrlandaIronicoIrrigatoIrrorareIsolatoIsotopoIstericoIstitutoIstriceItaliaIterareLabbroLabirintoLaccaLaceratoLacrimaLacunaLaddoveLagoLampoLancettaLanternaLardosoLargaLaringeLastraLatenzaLatinoLattugaLavagnaLavoroLegaleLeggeroLemboLentezzaLenzaLeoneLepreLesivoLessatoLestoLetteraleLevaLevigatoLiberoLidoLievitoLillaLimaturaLimitareLimpidoLineareLinguaLiquidoLiraLiricaLiscaLiteLitigioLivreaLocandaLodeLogicaLombareLondraLongevoLoquaceLorenzoLotoLotteriaLuceLucidatoLumacaLuminosoLungoLupoLuppoloLusingaLussoLuttoMacabroMacchinaMaceroMacinatoMadamaMagicoMagliaMagneteMagroMaiolicaMalafedeMalgradoMalintesoMalsanoMaltoMalumoreManaManciaMandorlaMangiareManifestoMannaroManovraMansardaMantideManubrioMappaMaratonaMarcireMarettaMarmoMarsupioMascheraMassaiaMastinoMaterassoMatricolaMattoneMaturoMazurcaMeandroMeccanicoMecenateMedesimoMeditareMegaMelassaMelisMelodiaMeningeMenoMensolaMercurioMerendaMerloMeschinoMeseMessereMestoloMetalloMetodoMettereMiagolareMicaMicelioMicheleMicroboMidolloMieleMiglioreMilanoMiliteMimosaMineraleMiniMinoreMirinoMirtilloMiscelaMissivaMistoMisurareMitezzaMitigareMitraMittenteMnemonicoModelloModificaModuloMoganoMogioMoleMolossoMonasteroMoncoMondinaMonetarioMonileMonotonoMonsoneMontatoMonvisoMoraMordereMorsicatoMostroMotivatoMotosegaMottoMovenzaMovimentoMozzoMuccaMucosaMuffaMughettoMugnaioMulattoMulinelloMultiploMummiaMuntoMuovereMuraleMusaMuscoloMusicaMutevoleMutoNababboNaftaNanometroNarcisoNariceNarratoNascereNastrareNaturaleNauticaNaviglioNebulosaNecrosiNegativoNegozioNemmenoNeofitaNerettoNervoNessunoNettunoNeutraleNeveNevroticoNicchiaNinfaNitidoNobileNocivoNodoNomeNominaNordicoNormaleNorvegeseNostranoNotareNotiziaNotturnoNovellaNucleoNullaNumeroNuovoNutrireNuvolaNuzialeOasiObbedireObbligoObeliscoOblioOboloObsoletoOccasioneOcchioOccidenteOccorrereOccultareOcraOculatoOdiernoOdorareOffertaOffrireOffuscatoOggettoOggiOgnunoOlandeseOlfattoOliatoOlivaOlogrammaOltreOmaggioOmbelicoOmbraOmegaOmissioneOndosoOnereOniceOnnivoroOnorevoleOntaOperatoOpinioneOppostoOracoloOrafoOrdineOrecchinoOreficeOrfanoOrganicoOrigineOrizzonteOrmaOrmeggioOrnativoOrologioOrrendoOrribileOrtensiaOrticaOrzataOrzoOsareOscurareOsmosiOspedaleOspiteOssaOssidareOstacoloOsteOtiteOtreOttagonoOttimoOttobreOvaleOvestOvinoOviparoOvocitoOvunqueOvviareOzioPacchettoPacePacificoPadellaPadronePaesePagaPaginaPalazzinaPalesarePallidoPaloPaludePandoroPannelloPaoloPaonazzoPapricaParabolaParcellaParerePargoloPariParlatoParolaPartireParvenzaParzialePassivoPasticcaPataccaPatologiaPattumePavonePeccatoPedalarePedonalePeggioPelosoPenarePendicePenisolaPennutoPenombraPensarePentolaPepePepitaPerbenePercorsoPerdonatoPerforarePergamenaPeriodoPermessoPernoPerplessoPersuasoPertugioPervasoPesatorePesistaPesoPestiferoPetaloPettinePetulantePezzoPiacerePiantaPiattinoPiccinoPicozzaPiegaPietraPifferoPigiamaPigolioPigroPilaPiliferoPillolaPilotaPimpantePinetaPinnaPinoloPioggiaPiomboPiramidePireticoPiritePirolisiPitonePizzicoPlaceboPlanarePlasmaPlatanoPlenarioPochezzaPoderosoPodismoPoesiaPoggiarePolentaPoligonoPollicePolmonitePolpettaPolsoPoltronaPolverePomicePomodoroPontePopolosoPorfidoPorosoPorporaPorrePortataPosaPositivoPossessoPostulatoPotassioPoterePranzoPrassiPraticaPreclusoPredicaPrefissoPregiatoPrelievoPremerePrenotarePreparatoPresenzaPretestoPrevalsoPrimaPrincipePrivatoProblemaProcuraProdurreProfumoProgettoProlungaPromessaPronomePropostaProrogaProtesoProvaPrudentePrugnaPruritoPsichePubblicoPudicaPugilatoPugnoPulcePulitoPulsantePuntarePupazzoPupillaPuroQuadroQualcosaQuasiQuerelaQuotaRaccoltoRaddoppioRadicaleRadunatoRafficaRagazzoRagioneRagnoRamarroRamingoRamoRandagioRantolareRapatoRapinaRappresoRasaturaRaschiatoRasenteRassegnaRastrelloRataRavvedutoRealeRecepireRecintoReclutaReconditoRecuperoRedditoRedimereRegalatoRegistroRegolaRegressoRelazioneRemareRemotoRennaReplicaReprimereReputareResaResidenteResponsoRestauroReteRetinaRetoricaRettificaRevocatoRiassuntoRibadireRibelleRibrezzoRicaricaRiccoRicevereRiciclatoRicordoRicredutoRidicoloRidurreRifasareRiflessoRiformaRifugioRigareRigettatoRighelloRilassatoRilevatoRimanereRimbalzoRimedioRimorchioRinascitaRincaroRinforzoRinnovoRinomatoRinsavitoRintoccoRinunciaRinvenireRiparatoRipetutoRipienoRiportareRipresaRipulireRisataRischioRiservaRisibileRisoRispettoRistoroRisultatoRisvoltoRitardoRitegnoRitmicoRitrovoRiunioneRivaRiversoRivincitaRivoltoRizomaRobaRoboticoRobustoRocciaRocoRodaggioRodereRoditoreRogitoRollioRomanticoRompereRonzioRosolareRospoRotanteRotondoRotulaRovescioRubizzoRubricaRugaRullinoRumineRumorosoRuoloRupeRussareRusticoSabatoSabbiareSabotatoSagomaSalassoSaldaturaSalgemmaSalivareSalmoneSaloneSaltareSalutoSalvoSapereSapidoSaporitoSaracenoSarcasmoSartoSassosoSatelliteSatiraSatolloSaturnoSavanaSavioSaziatoSbadiglioSbalzoSbancatoSbarraSbattereSbavareSbendareSbirciareSbloccatoSbocciatoSbrinareSbruffoneSbuffareScabrosoScadenzaScalaScambiareScandaloScapolaScarsoScatenareScavatoSceltoScenicoScettroSchedaSchienaSciarpaScienzaScindereScippoSciroppoScivoloSclerareScodellaScolpitoScompartoSconfortoScoprireScortaScossoneScozzeseScribaScrollareScrutinioScuderiaScultoreScuolaScuroScusareSdebitareSdoganareSeccaturaSecondoSedanoSeggiolaSegnalatoSegregatoSeguitoSelciatoSelettivoSellaSelvaggioSemaforoSembrareSemeSeminatoSempreSensoSentireSepoltoSequenzaSerataSerbatoSerenoSerioSerpenteSerraglioServireSestinaSetolaSettimanaSfaceloSfaldareSfamatoSfarzosoSfaticatoSferaSfidaSfilatoSfingeSfocatoSfoderareSfogoSfoltireSforzatoSfrattoSfruttatoSfuggitoSfumareSfusoSgabelloSgarbatoSgonfiareSgorbioSgrassatoSguardoSibiloSiccomeSierraSiglaSignoreSilenzioSillabaSimboloSimpaticoSimulatoSinfoniaSingoloSinistroSinoSintesiSinusoideSiparioSismaSistoleSituatoSlittaSlogaturaSlovenoSmarritoSmemoratoSmentitoSmeraldoSmilzoSmontareSmottatoSmussatoSnellireSnervatoSnodoSobbalzoSobrioSoccorsoSocialeSodaleSoffittoSognoSoldatoSolenneSolidoSollazzoSoloSolubileSolventeSomaticoSommaSondaSonettoSonniferoSopireSoppesoSopraSorgereSorpassoSorrisoSorsoSorteggioSorvolatoSospiroSostaSottileSpadaSpallaSpargereSpatolaSpaventoSpazzolaSpecieSpedireSpegnereSpelaturaSperanzaSpessoreSpettraleSpezzatoSpiaSpigolosoSpillatoSpinosoSpiraleSplendidoSportivoSposoSprangaSprecareSpronatoSpruzzoSpuntinoSquilloSradicareSrotolatoStabileStaccoStaffaStagnareStampatoStantioStarnutoStaseraStatutoSteloSteppaSterzoStilettoStimaStirpeStivaleStizzosoStonatoStoricoStrappoStregatoStriduloStrozzareStruttoStuccareStufoStupendoSubentroSuccosoSudoreSuggeritoSugoSultanoSuonareSuperboSupportoSurgelatoSurrogatoSussurroSuturaSvagareSvedeseSveglioSvelareSvenutoSveziaSviluppoSvistaSvizzeraSvoltaSvuotareTabaccoTabulatoTacciareTaciturnoTaleTalismanoTamponeTanninoTaraTardivoTargatoTariffaTarpareTartarugaTastoTatticoTavernaTavolataTazzaTecaTecnicoTelefonoTemerarioTempoTemutoTendoneTeneroTensioneTentacoloTeoremaTermeTerrazzoTerzettoTesiTesseratoTestatoTetroTettoiaTifareTigellaTimbroTintoTipicoTipografoTiraggioTiroTitanioTitoloTitubanteTizioTizzoneToccareTollerareToltoTombolaTomoTonfoTonsillaTopazioTopologiaToppaTorbaTornareTorroneTortoraToscanoTossireTostaturaTotanoTraboccoTracheaTrafilaTragediaTralcioTramontoTransitoTrapanoTrarreTraslocoTrattatoTraveTrecciaTremolioTrespoloTributoTrichecoTrifoglioTrilloTrinceaTrioTristezzaTrituratoTrivellaTrombaTronoTroppoTrottolaTrovareTruccatoTubaturaTuffatoTulipanoTumultoTunisiaTurbareTurchinoTutaTutelaUbicatoUccelloUccisoreUdireUditivoUffaUfficioUgualeUlisseUltimatoUmanoUmileUmorismoUncinettoUngereUnghereseUnicornoUnificatoUnisonoUnitarioUnteUovoUpupaUraganoUrgenzaUrloUsanzaUsatoUscitoUsignoloUsuraioUtensileUtilizzoUtopiaVacanteVaccinatoVagabondoVagliatoValangaValgoValicoVallettaValorosoValutareValvolaVampataVangareVanitosoVanoVantaggioVanveraVaporeVaranoVarcatoVarianteVascaVedettaVedovaVedutoVegetaleVeicoloVelcroVelinaVellutoVeloceVenatoVendemmiaVentoVeraceVerbaleVergognaVerificaVeroVerrucaVerticaleVescicaVessilloVestaleVeteranoVetrinaVetustoViandanteVibranteVicendaVichingoVicinanzaVidimareVigiliaVignetoVigoreVileVillanoViminiVincitoreViolaViperaVirgolaVirologoVirulentoViscosoVisioneVispoVissutoVisuraVitaVitelloVittimaVivandaVividoViziareVoceVogaVolatileVolereVolpeVoragineVulcanoZampognaZannaZappatoZatteraZavorraZefiroZelanteZeloZenzeroZerbinoZibettoZincoZirconeZittoZollaZoticoZuccheroZufoloZuluZuppa\";\n var wordlist = null;\n function loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \");\n if (wordlist_1.Wordlist.check(lang) !== \"0x5c1362d88fd4cf614a96f3234941d29f7d37c08c5292fde03bf62c2db6ff7620\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for it (Italian) FAILED\");\n }\n }\n var LangIt = (\n /** @class */\n function(_super) {\n __extends4(LangIt2, _super);\n function LangIt2() {\n return _super.call(this, \"it\") || this;\n }\n LangIt2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[index2];\n };\n LangIt2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n };\n return LangIt2;\n }(wordlist_1.Wordlist)\n );\n var langIt = new LangIt();\n exports3.langIt = langIt;\n wordlist_1.Wordlist.register(langIt);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-zh.js\n var require_lang_zh = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/lang-zh.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.langZhTw = exports3.langZhCn = void 0;\n var strings_1 = require_lib9();\n var wordlist_1 = require_wordlist();\n var data = \"}aE#4A=Yv&co#4N#6G=cJ&SM#66|/Z#4t&kn~46#4K~4q%b9=IR#7l,mB#7W_X2*dl}Uo~7s}Uf&Iw#9c&cw~6O&H6&wx&IG%v5=IQ~8a&Pv#47$PR&50%Ko&QM&3l#5f,D9#4L|/H&tQ;v0~6n]nN?\";\n function loadWords(lang) {\n if (wordlist[lang.locale] !== null) {\n return;\n }\n wordlist[lang.locale] = [];\n var deltaOffset = 0;\n for (var i3 = 0; i3 < 2048; i3++) {\n var s4 = style.indexOf(data[i3 * 3]);\n var bytes = [\n 228 + (s4 >> 2),\n 128 + codes.indexOf(data[i3 * 3 + 1]),\n 128 + codes.indexOf(data[i3 * 3 + 2])\n ];\n if (lang.locale === \"zh_tw\") {\n var common = s4 % 4;\n for (var i_1 = common; i_1 < 3; i_1++) {\n bytes[i_1] = codes.indexOf(deltaData[deltaOffset++]) + (i_1 == 0 ? 228 : 128);\n }\n }\n wordlist[lang.locale].push((0, strings_1.toUtf8String)(bytes));\n }\n if (wordlist_1.Wordlist.check(lang) !== Checks[lang.locale]) {\n wordlist[lang.locale] = null;\n throw new Error(\"BIP39 Wordlist for \" + lang.locale + \" (Chinese) FAILED\");\n }\n }\n var LangZh = (\n /** @class */\n function(_super) {\n __extends4(LangZh2, _super);\n function LangZh2(country) {\n return _super.call(this, \"zh_\" + country) || this;\n }\n LangZh2.prototype.getWord = function(index2) {\n loadWords(this);\n return wordlist[this.locale][index2];\n };\n LangZh2.prototype.getWordIndex = function(word) {\n loadWords(this);\n return wordlist[this.locale].indexOf(word);\n };\n LangZh2.prototype.split = function(mnemonic) {\n mnemonic = mnemonic.replace(/(?:\\u3000| )+/g, \"\");\n return mnemonic.split(\"\");\n };\n return LangZh2;\n }(wordlist_1.Wordlist)\n );\n var langZhCn = new LangZh(\"cn\");\n exports3.langZhCn = langZhCn;\n wordlist_1.Wordlist.register(langZhCn);\n wordlist_1.Wordlist.register(langZhCn, \"zh\");\n var langZhTw = new LangZh(\"tw\");\n exports3.langZhTw = langZhTw;\n wordlist_1.Wordlist.register(langZhTw);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/wordlists.js\n var require_wordlists = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/wordlists.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wordlists = void 0;\n var lang_cz_1 = require_lang_cz();\n var lang_en_1 = require_lang_en();\n var lang_es_1 = require_lang_es();\n var lang_fr_1 = require_lang_fr();\n var lang_ja_1 = require_lang_ja();\n var lang_ko_1 = require_lang_ko();\n var lang_it_1 = require_lang_it();\n var lang_zh_1 = require_lang_zh();\n exports3.wordlists = {\n cz: lang_cz_1.langCz,\n en: lang_en_1.langEn,\n es: lang_es_1.langEs,\n fr: lang_fr_1.langFr,\n it: lang_it_1.langIt,\n ja: lang_ja_1.langJa,\n ko: lang_ko_1.langKo,\n zh: lang_zh_1.langZhCn,\n zh_cn: lang_zh_1.langZhCn,\n zh_tw: lang_zh_1.langZhTw\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/index.js\n var require_lib22 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wordlists@5.8.0/node_modules/@ethersproject/wordlists/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wordlists = exports3.Wordlist = exports3.logger = void 0;\n var wordlist_1 = require_wordlist();\n Object.defineProperty(exports3, \"logger\", { enumerable: true, get: function() {\n return wordlist_1.logger;\n } });\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return wordlist_1.Wordlist;\n } });\n var wordlists_1 = require_wordlists();\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return wordlists_1.wordlists;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hdnode@5.8.0/node_modules/@ethersproject/hdnode/lib/_version.js\n var require_version17 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hdnode@5.8.0/node_modules/@ethersproject/hdnode/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"hdnode/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+hdnode@5.8.0/node_modules/@ethersproject/hdnode/lib/index.js\n var require_lib23 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+hdnode@5.8.0/node_modules/@ethersproject/hdnode/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getAccountPath = exports3.isValidMnemonic = exports3.entropyToMnemonic = exports3.mnemonicToEntropy = exports3.mnemonicToSeed = exports3.HDNode = exports3.defaultPath = void 0;\n var basex_1 = require_lib19();\n var bytes_1 = require_lib2();\n var bignumber_1 = require_lib3();\n var strings_1 = require_lib9();\n var pbkdf2_1 = require_lib21();\n var properties_1 = require_lib4();\n var signing_key_1 = require_lib16();\n var sha2_1 = require_lib20();\n var transactions_1 = require_lib17();\n var wordlists_1 = require_lib22();\n var logger_1 = require_lib();\n var _version_1 = require_version17();\n var logger = new logger_1.Logger(_version_1.version);\n var N4 = bignumber_1.BigNumber.from(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n var MasterSecret = (0, strings_1.toUtf8Bytes)(\"Bitcoin seed\");\n var HardenedBit = 2147483648;\n function getUpperMask(bits) {\n return (1 << bits) - 1 << 8 - bits;\n }\n function getLowerMask(bits) {\n return (1 << bits) - 1;\n }\n function bytes32(value) {\n return (0, bytes_1.hexZeroPad)((0, bytes_1.hexlify)(value), 32);\n }\n function base58check2(data) {\n return basex_1.Base58.encode((0, bytes_1.concat)([data, (0, bytes_1.hexDataSlice)((0, sha2_1.sha256)((0, sha2_1.sha256)(data)), 0, 4)]));\n }\n function getWordlist(wordlist) {\n if (wordlist == null) {\n return wordlists_1.wordlists[\"en\"];\n }\n if (typeof wordlist === \"string\") {\n var words = wordlists_1.wordlists[wordlist];\n if (words == null) {\n logger.throwArgumentError(\"unknown locale\", \"wordlist\", wordlist);\n }\n return words;\n }\n return wordlist;\n }\n var _constructorGuard = {};\n exports3.defaultPath = \"m/44'/60'/0'/0/0\";\n var HDNode = (\n /** @class */\n function() {\n function HDNode2(constructorGuard, privateKey, publicKey, parentFingerprint, chainCode, index2, depth, mnemonicOrPath) {\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"HDNode constructor cannot be called directly\");\n }\n if (privateKey) {\n var signingKey = new signing_key_1.SigningKey(privateKey);\n (0, properties_1.defineReadOnly)(this, \"privateKey\", signingKey.privateKey);\n (0, properties_1.defineReadOnly)(this, \"publicKey\", signingKey.compressedPublicKey);\n } else {\n (0, properties_1.defineReadOnly)(this, \"privateKey\", null);\n (0, properties_1.defineReadOnly)(this, \"publicKey\", (0, bytes_1.hexlify)(publicKey));\n }\n (0, properties_1.defineReadOnly)(this, \"parentFingerprint\", parentFingerprint);\n (0, properties_1.defineReadOnly)(this, \"fingerprint\", (0, bytes_1.hexDataSlice)((0, sha2_1.ripemd160)((0, sha2_1.sha256)(this.publicKey)), 0, 4));\n (0, properties_1.defineReadOnly)(this, \"address\", (0, transactions_1.computeAddress)(this.publicKey));\n (0, properties_1.defineReadOnly)(this, \"chainCode\", chainCode);\n (0, properties_1.defineReadOnly)(this, \"index\", index2);\n (0, properties_1.defineReadOnly)(this, \"depth\", depth);\n if (mnemonicOrPath == null) {\n (0, properties_1.defineReadOnly)(this, \"mnemonic\", null);\n (0, properties_1.defineReadOnly)(this, \"path\", null);\n } else if (typeof mnemonicOrPath === \"string\") {\n (0, properties_1.defineReadOnly)(this, \"mnemonic\", null);\n (0, properties_1.defineReadOnly)(this, \"path\", mnemonicOrPath);\n } else {\n (0, properties_1.defineReadOnly)(this, \"mnemonic\", mnemonicOrPath);\n (0, properties_1.defineReadOnly)(this, \"path\", mnemonicOrPath.path);\n }\n }\n Object.defineProperty(HDNode2.prototype, \"extendedKey\", {\n get: function() {\n if (this.depth >= 256) {\n throw new Error(\"Depth too large!\");\n }\n return base58check2((0, bytes_1.concat)([\n this.privateKey != null ? \"0x0488ADE4\" : \"0x0488B21E\",\n (0, bytes_1.hexlify)(this.depth),\n this.parentFingerprint,\n (0, bytes_1.hexZeroPad)((0, bytes_1.hexlify)(this.index), 4),\n this.chainCode,\n this.privateKey != null ? (0, bytes_1.concat)([\"0x00\", this.privateKey]) : this.publicKey\n ]));\n },\n enumerable: false,\n configurable: true\n });\n HDNode2.prototype.neuter = function() {\n return new HDNode2(_constructorGuard, null, this.publicKey, this.parentFingerprint, this.chainCode, this.index, this.depth, this.path);\n };\n HDNode2.prototype._derive = function(index2) {\n if (index2 > 4294967295) {\n throw new Error(\"invalid index - \" + String(index2));\n }\n var path = this.path;\n if (path) {\n path += \"/\" + (index2 & ~HardenedBit);\n }\n var data = new Uint8Array(37);\n if (index2 & HardenedBit) {\n if (!this.privateKey) {\n throw new Error(\"cannot derive child of neutered node\");\n }\n data.set((0, bytes_1.arrayify)(this.privateKey), 1);\n if (path) {\n path += \"'\";\n }\n } else {\n data.set((0, bytes_1.arrayify)(this.publicKey));\n }\n for (var i3 = 24; i3 >= 0; i3 -= 8) {\n data[33 + (i3 >> 3)] = index2 >> 24 - i3 & 255;\n }\n var I2 = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(sha2_1.SupportedAlgorithm.sha512, this.chainCode, data));\n var IL = I2.slice(0, 32);\n var IR = I2.slice(32);\n var ki = null;\n var Ki = null;\n if (this.privateKey) {\n ki = bytes32(bignumber_1.BigNumber.from(IL).add(this.privateKey).mod(N4));\n } else {\n var ek = new signing_key_1.SigningKey((0, bytes_1.hexlify)(IL));\n Ki = ek._addPoint(this.publicKey);\n }\n var mnemonicOrPath = path;\n var srcMnemonic = this.mnemonic;\n if (srcMnemonic) {\n mnemonicOrPath = Object.freeze({\n phrase: srcMnemonic.phrase,\n path,\n locale: srcMnemonic.locale || \"en\"\n });\n }\n return new HDNode2(_constructorGuard, ki, Ki, this.fingerprint, bytes32(IR), index2, this.depth + 1, mnemonicOrPath);\n };\n HDNode2.prototype.derivePath = function(path) {\n var components = path.split(\"/\");\n if (components.length === 0 || components[0] === \"m\" && this.depth !== 0) {\n throw new Error(\"invalid path - \" + path);\n }\n if (components[0] === \"m\") {\n components.shift();\n }\n var result = this;\n for (var i3 = 0; i3 < components.length; i3++) {\n var component = components[i3];\n if (component.match(/^[0-9]+'$/)) {\n var index2 = parseInt(component.substring(0, component.length - 1));\n if (index2 >= HardenedBit) {\n throw new Error(\"invalid path index - \" + component);\n }\n result = result._derive(HardenedBit + index2);\n } else if (component.match(/^[0-9]+$/)) {\n var index2 = parseInt(component);\n if (index2 >= HardenedBit) {\n throw new Error(\"invalid path index - \" + component);\n }\n result = result._derive(index2);\n } else {\n throw new Error(\"invalid path component - \" + component);\n }\n }\n return result;\n };\n HDNode2._fromSeed = function(seed, mnemonic) {\n var seedArray = (0, bytes_1.arrayify)(seed);\n if (seedArray.length < 16 || seedArray.length > 64) {\n throw new Error(\"invalid seed\");\n }\n var I2 = (0, bytes_1.arrayify)((0, sha2_1.computeHmac)(sha2_1.SupportedAlgorithm.sha512, MasterSecret, seedArray));\n return new HDNode2(_constructorGuard, bytes32(I2.slice(0, 32)), null, \"0x00000000\", bytes32(I2.slice(32)), 0, 0, mnemonic);\n };\n HDNode2.fromMnemonic = function(mnemonic, password, wordlist) {\n wordlist = getWordlist(wordlist);\n mnemonic = entropyToMnemonic(mnemonicToEntropy(mnemonic, wordlist), wordlist);\n return HDNode2._fromSeed(mnemonicToSeed(mnemonic, password), {\n phrase: mnemonic,\n path: \"m\",\n locale: wordlist.locale\n });\n };\n HDNode2.fromSeed = function(seed) {\n return HDNode2._fromSeed(seed, null);\n };\n HDNode2.fromExtendedKey = function(extendedKey) {\n var bytes = basex_1.Base58.decode(extendedKey);\n if (bytes.length !== 82 || base58check2(bytes.slice(0, 78)) !== extendedKey) {\n logger.throwArgumentError(\"invalid extended key\", \"extendedKey\", \"[REDACTED]\");\n }\n var depth = bytes[4];\n var parentFingerprint = (0, bytes_1.hexlify)(bytes.slice(5, 9));\n var index2 = parseInt((0, bytes_1.hexlify)(bytes.slice(9, 13)).substring(2), 16);\n var chainCode = (0, bytes_1.hexlify)(bytes.slice(13, 45));\n var key = bytes.slice(45, 78);\n switch ((0, bytes_1.hexlify)(bytes.slice(0, 4))) {\n case \"0x0488b21e\":\n case \"0x043587cf\":\n return new HDNode2(_constructorGuard, null, (0, bytes_1.hexlify)(key), parentFingerprint, chainCode, index2, depth, null);\n case \"0x0488ade4\":\n case \"0x04358394 \":\n if (key[0] !== 0) {\n break;\n }\n return new HDNode2(_constructorGuard, (0, bytes_1.hexlify)(key.slice(1)), null, parentFingerprint, chainCode, index2, depth, null);\n }\n return logger.throwArgumentError(\"invalid extended key\", \"extendedKey\", \"[REDACTED]\");\n };\n return HDNode2;\n }()\n );\n exports3.HDNode = HDNode;\n function mnemonicToSeed(mnemonic, password) {\n if (!password) {\n password = \"\";\n }\n var salt = (0, strings_1.toUtf8Bytes)(\"mnemonic\" + password, strings_1.UnicodeNormalizationForm.NFKD);\n return (0, pbkdf2_1.pbkdf2)((0, strings_1.toUtf8Bytes)(mnemonic, strings_1.UnicodeNormalizationForm.NFKD), salt, 2048, 64, \"sha512\");\n }\n exports3.mnemonicToSeed = mnemonicToSeed;\n function mnemonicToEntropy(mnemonic, wordlist) {\n wordlist = getWordlist(wordlist);\n logger.checkNormalize();\n var words = wordlist.split(mnemonic);\n if (words.length % 3 !== 0) {\n throw new Error(\"invalid mnemonic\");\n }\n var entropy = (0, bytes_1.arrayify)(new Uint8Array(Math.ceil(11 * words.length / 8)));\n var offset = 0;\n for (var i3 = 0; i3 < words.length; i3++) {\n var index2 = wordlist.getWordIndex(words[i3].normalize(\"NFKD\"));\n if (index2 === -1) {\n throw new Error(\"invalid mnemonic\");\n }\n for (var bit = 0; bit < 11; bit++) {\n if (index2 & 1 << 10 - bit) {\n entropy[offset >> 3] |= 1 << 7 - offset % 8;\n }\n offset++;\n }\n }\n var entropyBits = 32 * words.length / 3;\n var checksumBits = words.length / 3;\n var checksumMask = getUpperMask(checksumBits);\n var checksum4 = (0, bytes_1.arrayify)((0, sha2_1.sha256)(entropy.slice(0, entropyBits / 8)))[0] & checksumMask;\n if (checksum4 !== (entropy[entropy.length - 1] & checksumMask)) {\n throw new Error(\"invalid checksum\");\n }\n return (0, bytes_1.hexlify)(entropy.slice(0, entropyBits / 8));\n }\n exports3.mnemonicToEntropy = mnemonicToEntropy;\n function entropyToMnemonic(entropy, wordlist) {\n wordlist = getWordlist(wordlist);\n entropy = (0, bytes_1.arrayify)(entropy);\n if (entropy.length % 4 !== 0 || entropy.length < 16 || entropy.length > 32) {\n throw new Error(\"invalid entropy\");\n }\n var indices = [0];\n var remainingBits = 11;\n for (var i3 = 0; i3 < entropy.length; i3++) {\n if (remainingBits > 8) {\n indices[indices.length - 1] <<= 8;\n indices[indices.length - 1] |= entropy[i3];\n remainingBits -= 8;\n } else {\n indices[indices.length - 1] <<= remainingBits;\n indices[indices.length - 1] |= entropy[i3] >> 8 - remainingBits;\n indices.push(entropy[i3] & getLowerMask(8 - remainingBits));\n remainingBits += 3;\n }\n }\n var checksumBits = entropy.length / 4;\n var checksum4 = (0, bytes_1.arrayify)((0, sha2_1.sha256)(entropy))[0] & getUpperMask(checksumBits);\n indices[indices.length - 1] <<= checksumBits;\n indices[indices.length - 1] |= checksum4 >> 8 - checksumBits;\n return wordlist.join(indices.map(function(index2) {\n return wordlist.getWord(index2);\n }));\n }\n exports3.entropyToMnemonic = entropyToMnemonic;\n function isValidMnemonic(mnemonic, wordlist) {\n try {\n mnemonicToEntropy(mnemonic, wordlist);\n return true;\n } catch (error) {\n }\n return false;\n }\n exports3.isValidMnemonic = isValidMnemonic;\n function getAccountPath(index2) {\n if (typeof index2 !== \"number\" || index2 < 0 || index2 >= HardenedBit || index2 % 1) {\n logger.throwArgumentError(\"invalid account index\", \"index\", index2);\n }\n return \"m/44'/60'/\" + index2 + \"'/0/0\";\n }\n exports3.getAccountPath = getAccountPath;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/_version.js\n var require_version18 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"random/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/browser-random.js\n var require_browser_random = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/browser-random.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.randomBytes = void 0;\n var bytes_1 = require_lib2();\n var logger_1 = require_lib();\n var _version_1 = require_version18();\n var logger = new logger_1.Logger(_version_1.version);\n function getGlobal() {\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw new Error(\"unable to locate global object\");\n }\n var anyGlobal = getGlobal();\n var crypto3 = anyGlobal.crypto || anyGlobal.msCrypto;\n if (!crypto3 || !crypto3.getRandomValues) {\n logger.warn(\"WARNING: Missing strong random number source\");\n crypto3 = {\n getRandomValues: function(buffer2) {\n return logger.throwError(\"no secure random source avaialble\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"crypto.getRandomValues\"\n });\n }\n };\n }\n function randomBytes2(length) {\n if (length <= 0 || length > 1024 || length % 1 || length != length) {\n logger.throwArgumentError(\"invalid length\", \"length\", length);\n }\n var result = new Uint8Array(length);\n crypto3.getRandomValues(result);\n return (0, bytes_1.arrayify)(result);\n }\n exports3.randomBytes = randomBytes2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/shuffle.js\n var require_shuffle = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/shuffle.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.shuffled = void 0;\n function shuffled(array) {\n array = array.slice();\n for (var i3 = array.length - 1; i3 > 0; i3--) {\n var j2 = Math.floor(Math.random() * (i3 + 1));\n var tmp = array[i3];\n array[i3] = array[j2];\n array[j2] = tmp;\n }\n return array;\n }\n exports3.shuffled = shuffled;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/index.js\n var require_lib24 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+random@5.8.0/node_modules/@ethersproject/random/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.shuffled = exports3.randomBytes = void 0;\n var random_1 = require_browser_random();\n Object.defineProperty(exports3, \"randomBytes\", { enumerable: true, get: function() {\n return random_1.randomBytes;\n } });\n var shuffle_1 = require_shuffle();\n Object.defineProperty(exports3, \"shuffled\", { enumerable: true, get: function() {\n return shuffle_1.shuffled;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@3.0.0/node_modules/aes-js/index.js\n var require_aes_js = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@3.0.0/node_modules/aes-js/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(root) {\n function checkInt(value) {\n return parseInt(value) === value;\n }\n function checkInts(arrayish) {\n if (!checkInt(arrayish.length)) {\n return false;\n }\n for (var i3 = 0; i3 < arrayish.length; i3++) {\n if (!checkInt(arrayish[i3]) || arrayish[i3] < 0 || arrayish[i3] > 255) {\n return false;\n }\n }\n return true;\n }\n function coerceArray(arg, copy) {\n if (arg.buffer && ArrayBuffer.isView(arg) && arg.name === \"Uint8Array\") {\n if (copy) {\n if (arg.slice) {\n arg = arg.slice();\n } else {\n arg = Array.prototype.slice.call(arg);\n }\n }\n return arg;\n }\n if (Array.isArray(arg)) {\n if (!checkInts(arg)) {\n throw new Error(\"Array contains invalid value: \" + arg);\n }\n return new Uint8Array(arg);\n }\n if (checkInt(arg.length) && checkInts(arg)) {\n return new Uint8Array(arg);\n }\n throw new Error(\"unsupported array-like object\");\n }\n function createArray(length) {\n return new Uint8Array(length);\n }\n function copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) {\n if (sourceStart != null || sourceEnd != null) {\n if (sourceArray.slice) {\n sourceArray = sourceArray.slice(sourceStart, sourceEnd);\n } else {\n sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd);\n }\n }\n targetArray.set(sourceArray, targetStart);\n }\n var convertUtf8 = /* @__PURE__ */ function() {\n function toBytes5(text) {\n var result = [], i3 = 0;\n text = encodeURI(text);\n while (i3 < text.length) {\n var c4 = text.charCodeAt(i3++);\n if (c4 === 37) {\n result.push(parseInt(text.substr(i3, 2), 16));\n i3 += 2;\n } else {\n result.push(c4);\n }\n }\n return coerceArray(result);\n }\n function fromBytes5(bytes) {\n var result = [], i3 = 0;\n while (i3 < bytes.length) {\n var c4 = bytes[i3];\n if (c4 < 128) {\n result.push(String.fromCharCode(c4));\n i3++;\n } else if (c4 > 191 && c4 < 224) {\n result.push(String.fromCharCode((c4 & 31) << 6 | bytes[i3 + 1] & 63));\n i3 += 2;\n } else {\n result.push(String.fromCharCode((c4 & 15) << 12 | (bytes[i3 + 1] & 63) << 6 | bytes[i3 + 2] & 63));\n i3 += 3;\n }\n }\n return result.join(\"\");\n }\n return {\n toBytes: toBytes5,\n fromBytes: fromBytes5\n };\n }();\n var convertHex = /* @__PURE__ */ function() {\n function toBytes5(text) {\n var result = [];\n for (var i3 = 0; i3 < text.length; i3 += 2) {\n result.push(parseInt(text.substr(i3, 2), 16));\n }\n return result;\n }\n var Hex = \"0123456789abcdef\";\n function fromBytes5(bytes) {\n var result = [];\n for (var i3 = 0; i3 < bytes.length; i3++) {\n var v2 = bytes[i3];\n result.push(Hex[(v2 & 240) >> 4] + Hex[v2 & 15]);\n }\n return result.join(\"\");\n }\n return {\n toBytes: toBytes5,\n fromBytes: fromBytes5\n };\n }();\n var numberOfRounds = { 16: 10, 24: 12, 32: 14 };\n var rcon = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145];\n var S3 = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22];\n var Si = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125];\n var T1 = [3328402341, 4168907908, 4000806809, 4135287693, 4294111757, 3597364157, 3731845041, 2445657428, 1613770832, 33620227, 3462883241, 1445669757, 3892248089, 3050821474, 1303096294, 3967186586, 2412431941, 528646813, 2311702848, 4202528135, 4026202645, 2992200171, 2387036105, 4226871307, 1101901292, 3017069671, 1604494077, 1169141738, 597466303, 1403299063, 3832705686, 2613100635, 1974974402, 3791519004, 1033081774, 1277568618, 1815492186, 2118074177, 4126668546, 2211236943, 1748251740, 1369810420, 3521504564, 4193382664, 3799085459, 2883115123, 1647391059, 706024767, 134480908, 2512897874, 1176707941, 2646852446, 806885416, 932615841, 168101135, 798661301, 235341577, 605164086, 461406363, 3756188221, 3454790438, 1311188841, 2142417613, 3933566367, 302582043, 495158174, 1479289972, 874125870, 907746093, 3698224818, 3025820398, 1537253627, 2756858614, 1983593293, 3084310113, 2108928974, 1378429307, 3722699582, 1580150641, 327451799, 2790478837, 3117535592, 0, 3253595436, 1075847264, 3825007647, 2041688520, 3059440621, 3563743934, 2378943302, 1740553945, 1916352843, 2487896798, 2555137236, 2958579944, 2244988746, 3151024235, 3320835882, 1336584933, 3992714006, 2252555205, 2588757463, 1714631509, 293963156, 2319795663, 3925473552, 67240454, 4269768577, 2689618160, 2017213508, 631218106, 1269344483, 2723238387, 1571005438, 2151694528, 93294474, 1066570413, 563977660, 1882732616, 4059428100, 1673313503, 2008463041, 2950355573, 1109467491, 537923632, 3858759450, 4260623118, 3218264685, 2177748300, 403442708, 638784309, 3287084079, 3193921505, 899127202, 2286175436, 773265209, 2479146071, 1437050866, 4236148354, 2050833735, 3362022572, 3126681063, 840505643, 3866325909, 3227541664, 427917720, 2655997905, 2749160575, 1143087718, 1412049534, 999329963, 193497219, 2353415882, 3354324521, 1807268051, 672404540, 2816401017, 3160301282, 369822493, 2916866934, 3688947771, 1681011286, 1949973070, 336202270, 2454276571, 201721354, 1210328172, 3093060836, 2680341085, 3184776046, 1135389935, 3294782118, 965841320, 831886756, 3554993207, 4068047243, 3588745010, 2345191491, 1849112409, 3664604599, 26054028, 2983581028, 2622377682, 1235855840, 3630984372, 2891339514, 4092916743, 3488279077, 3395642799, 4101667470, 1202630377, 268961816, 1874508501, 4034427016, 1243948399, 1546530418, 941366308, 1470539505, 1941222599, 2546386513, 3421038627, 2715671932, 3899946140, 1042226977, 2521517021, 1639824860, 227249030, 260737669, 3765465232, 2084453954, 1907733956, 3429263018, 2420656344, 100860677, 4160157185, 470683154, 3261161891, 1781871967, 2924959737, 1773779408, 394692241, 2579611992, 974986535, 664706745, 3655459128, 3958962195, 731420851, 571543859, 3530123707, 2849626480, 126783113, 865375399, 765172662, 1008606754, 361203602, 3387549984, 2278477385, 2857719295, 1344809080, 2782912378, 59542671, 1503764984, 160008576, 437062935, 1707065306, 3622233649, 2218934982, 3496503480, 2185314755, 697932208, 1512910199, 504303377, 2075177163, 2824099068, 1841019862, 739644986];\n var T22 = [2781242211, 2230877308, 2582542199, 2381740923, 234877682, 3184946027, 2984144751, 1418839493, 1348481072, 50462977, 2848876391, 2102799147, 434634494, 1656084439, 3863849899, 2599188086, 1167051466, 2636087938, 1082771913, 2281340285, 368048890, 3954334041, 3381544775, 201060592, 3963727277, 1739838676, 4250903202, 3930435503, 3206782108, 4149453988, 2531553906, 1536934080, 3262494647, 484572669, 2923271059, 1783375398, 1517041206, 1098792767, 49674231, 1334037708, 1550332980, 4098991525, 886171109, 150598129, 2481090929, 1940642008, 1398944049, 1059722517, 201851908, 1385547719, 1699095331, 1587397571, 674240536, 2704774806, 252314885, 3039795866, 151914247, 908333586, 2602270848, 1038082786, 651029483, 1766729511, 3447698098, 2682942837, 454166793, 2652734339, 1951935532, 775166490, 758520603, 3000790638, 4004797018, 4217086112, 4137964114, 1299594043, 1639438038, 3464344499, 2068982057, 1054729187, 1901997871, 2534638724, 4121318227, 1757008337, 0, 750906861, 1614815264, 535035132, 3363418545, 3988151131, 3201591914, 1183697867, 3647454910, 1265776953, 3734260298, 3566750796, 3903871064, 1250283471, 1807470800, 717615087, 3847203498, 384695291, 3313910595, 3617213773, 1432761139, 2484176261, 3481945413, 283769337, 100925954, 2180939647, 4037038160, 1148730428, 3123027871, 3813386408, 4087501137, 4267549603, 3229630528, 2315620239, 2906624658, 3156319645, 1215313976, 82966005, 3747855548, 3245848246, 1974459098, 1665278241, 807407632, 451280895, 251524083, 1841287890, 1283575245, 337120268, 891687699, 801369324, 3787349855, 2721421207, 3431482436, 959321879, 1469301956, 4065699751, 2197585534, 1199193405, 2898814052, 3887750493, 724703513, 2514908019, 2696962144, 2551808385, 3516813135, 2141445340, 1715741218, 2119445034, 2872807568, 2198571144, 3398190662, 700968686, 3547052216, 1009259540, 2041044702, 3803995742, 487983883, 1991105499, 1004265696, 1449407026, 1316239930, 504629770, 3683797321, 168560134, 1816667172, 3837287516, 1570751170, 1857934291, 4014189740, 2797888098, 2822345105, 2754712981, 936633572, 2347923833, 852879335, 1133234376, 1500395319, 3084545389, 2348912013, 1689376213, 3533459022, 3762923945, 3034082412, 4205598294, 133428468, 634383082, 2949277029, 2398386810, 3913789102, 403703816, 3580869306, 2297460856, 1867130149, 1918643758, 607656988, 4049053350, 3346248884, 1368901318, 600565992, 2090982877, 2632479860, 557719327, 3717614411, 3697393085, 2249034635, 2232388234, 2430627952, 1115438654, 3295786421, 2865522278, 3633334344, 84280067, 33027830, 303828494, 2747425121, 1600795957, 4188952407, 3496589753, 2434238086, 1486471617, 658119965, 3106381470, 953803233, 334231800, 3005978776, 857870609, 3151128937, 1890179545, 2298973838, 2805175444, 3056442267, 574365214, 2450884487, 550103529, 1233637070, 4289353045, 2018519080, 2057691103, 2399374476, 4166623649, 2148108681, 387583245, 3664101311, 836232934, 3330556482, 3100665960, 3280093505, 2955516313, 2002398509, 287182607, 3413881008, 4238890068, 3597515707, 975967766];\n var T32 = [1671808611, 2089089148, 2006576759, 2072901243, 4061003762, 1807603307, 1873927791, 3310653893, 810573872, 16974337, 1739181671, 729634347, 4263110654, 3613570519, 2883997099, 1989864566, 3393556426, 2191335298, 3376449993, 2106063485, 4195741690, 1508618841, 1204391495, 4027317232, 2917941677, 3563566036, 2734514082, 2951366063, 2629772188, 2767672228, 1922491506, 3227229120, 3082974647, 4246528509, 2477669779, 644500518, 911895606, 1061256767, 4144166391, 3427763148, 878471220, 2784252325, 3845444069, 4043897329, 1905517169, 3631459288, 827548209, 356461077, 67897348, 3344078279, 593839651, 3277757891, 405286936, 2527147926, 84871685, 2595565466, 118033927, 305538066, 2157648768, 3795705826, 3945188843, 661212711, 2999812018, 1973414517, 152769033, 2208177539, 745822252, 439235610, 455947803, 1857215598, 1525593178, 2700827552, 1391895634, 994932283, 3596728278, 3016654259, 695947817, 3812548067, 795958831, 2224493444, 1408607827, 3513301457, 0, 3979133421, 543178784, 4229948412, 2982705585, 1542305371, 1790891114, 3410398667, 3201918910, 961245753, 1256100938, 1289001036, 1491644504, 3477767631, 3496721360, 4012557807, 2867154858, 4212583931, 1137018435, 1305975373, 861234739, 2241073541, 1171229253, 4178635257, 33948674, 2139225727, 1357946960, 1011120188, 2679776671, 2833468328, 1374921297, 2751356323, 1086357568, 2408187279, 2460827538, 2646352285, 944271416, 4110742005, 3168756668, 3066132406, 3665145818, 560153121, 271589392, 4279952895, 4077846003, 3530407890, 3444343245, 202643468, 322250259, 3962553324, 1608629855, 2543990167, 1154254916, 389623319, 3294073796, 2817676711, 2122513534, 1028094525, 1689045092, 1575467613, 422261273, 1939203699, 1621147744, 2174228865, 1339137615, 3699352540, 577127458, 712922154, 2427141008, 2290289544, 1187679302, 3995715566, 3100863416, 339486740, 3732514782, 1591917662, 186455563, 3681988059, 3762019296, 844522546, 978220090, 169743370, 1239126601, 101321734, 611076132, 1558493276, 3260915650, 3547250131, 2901361580, 1655096418, 2443721105, 2510565781, 3828863972, 2039214713, 3878868455, 3359869896, 928607799, 1840765549, 2374762893, 3580146133, 1322425422, 2850048425, 1823791212, 1459268694, 4094161908, 3928346602, 1706019429, 2056189050, 2934523822, 135794696, 3134549946, 2022240376, 628050469, 779246638, 472135708, 2800834470, 3032970164, 3327236038, 3894660072, 3715932637, 1956440180, 522272287, 1272813131, 3185336765, 2340818315, 2323976074, 1888542832, 1044544574, 3049550261, 1722469478, 1222152264, 50660867, 4127324150, 236067854, 1638122081, 895445557, 1475980887, 3117443513, 2257655686, 3243809217, 489110045, 2662934430, 3778599393, 4162055160, 2561878936, 288563729, 1773916777, 3648039385, 2391345038, 2493985684, 2612407707, 505560094, 2274497927, 3911240169, 3460925390, 1442818645, 678973480, 3749357023, 2358182796, 2717407649, 2306869641, 219617805, 3218761151, 3862026214, 1120306242, 1756942440, 1103331905, 2578459033, 762796589, 252780047, 2966125488, 1425844308, 3151392187, 372911126];\n var T4 = [1667474886, 2088535288, 2004326894, 2071694838, 4075949567, 1802223062, 1869591006, 3318043793, 808472672, 16843522, 1734846926, 724270422, 4278065639, 3621216949, 2880169549, 1987484396, 3402253711, 2189597983, 3385409673, 2105378810, 4210693615, 1499065266, 1195886990, 4042263547, 2913856577, 3570689971, 2728590687, 2947541573, 2627518243, 2762274643, 1920112356, 3233831835, 3082273397, 4261223649, 2475929149, 640051788, 909531756, 1061110142, 4160160501, 3435941763, 875846760, 2779116625, 3857003729, 4059105529, 1903268834, 3638064043, 825316194, 353713962, 67374088, 3351728789, 589522246, 3284360861, 404236336, 2526454071, 84217610, 2593830191, 117901582, 303183396, 2155911963, 3806477791, 3958056653, 656894286, 2998062463, 1970642922, 151591698, 2206440989, 741110872, 437923380, 454765878, 1852748508, 1515908788, 2694904667, 1381168804, 993742198, 3604373943, 3014905469, 690584402, 3823320797, 791638366, 2223281939, 1398011302, 3520161977, 0, 3991743681, 538992704, 4244381667, 2981218425, 1532751286, 1785380564, 3419096717, 3200178535, 960056178, 1246420628, 1280103576, 1482221744, 3486468741, 3503319995, 4025428677, 2863326543, 4227536621, 1128514950, 1296947098, 859002214, 2240123921, 1162203018, 4193849577, 33687044, 2139062782, 1347481760, 1010582648, 2678045221, 2829640523, 1364325282, 2745433693, 1077985408, 2408548869, 2459086143, 2644360225, 943212656, 4126475505, 3166494563, 3065430391, 3671750063, 555836226, 269496352, 4294908645, 4092792573, 3537006015, 3452783745, 202118168, 320025894, 3974901699, 1600119230, 2543297077, 1145359496, 387397934, 3301201811, 2812801621, 2122220284, 1027426170, 1684319432, 1566435258, 421079858, 1936954854, 1616945344, 2172753945, 1330631070, 3705438115, 572679748, 707427924, 2425400123, 2290647819, 1179044492, 4008585671, 3099120491, 336870440, 3739122087, 1583276732, 185277718, 3688593069, 3772791771, 842159716, 976899700, 168435220, 1229577106, 101059084, 606366792, 1549591736, 3267517855, 3553849021, 2897014595, 1650632388, 2442242105, 2509612081, 3840161747, 2038008818, 3890688725, 3368567691, 926374254, 1835907034, 2374863873, 3587531953, 1313788572, 2846482505, 1819063512, 1448540844, 4109633523, 3941213647, 1701162954, 2054852340, 2930698567, 134748176, 3132806511, 2021165296, 623210314, 774795868, 471606328, 2795958615, 3031746419, 3334885783, 3907527627, 3722280097, 1953799400, 522133822, 1263263126, 3183336545, 2341176845, 2324333839, 1886425312, 1044267644, 3048588401, 1718004428, 1212733584, 50529542, 4143317495, 235803164, 1633788866, 892690282, 1465383342, 3115962473, 2256965911, 3250673817, 488449850, 2661202215, 3789633753, 4177007595, 2560144171, 286339874, 1768537042, 3654906025, 2391705863, 2492770099, 2610673197, 505291324, 2273808917, 3924369609, 3469625735, 1431699370, 673740880, 3755965093, 2358021891, 2711746649, 2307489801, 218961690, 3217021541, 3873845719, 1111672452, 1751693520, 1094828930, 2576986153, 757954394, 252645662, 2964376443, 1414855848, 3149649517, 370555436];\n var T5 = [1374988112, 2118214995, 437757123, 975658646, 1001089995, 530400753, 2902087851, 1273168787, 540080725, 2910219766, 2295101073, 4110568485, 1340463100, 3307916247, 641025152, 3043140495, 3736164937, 632953703, 1172967064, 1576976609, 3274667266, 2169303058, 2370213795, 1809054150, 59727847, 361929877, 3211623147, 2505202138, 3569255213, 1484005843, 1239443753, 2395588676, 1975683434, 4102977912, 2572697195, 666464733, 3202437046, 4035489047, 3374361702, 2110667444, 1675577880, 3843699074, 2538681184, 1649639237, 2976151520, 3144396420, 4269907996, 4178062228, 1883793496, 2403728665, 2497604743, 1383856311, 2876494627, 1917518562, 3810496343, 1716890410, 3001755655, 800440835, 2261089178, 3543599269, 807962610, 599762354, 33778362, 3977675356, 2328828971, 2809771154, 4077384432, 1315562145, 1708848333, 101039829, 3509871135, 3299278474, 875451293, 2733856160, 92987698, 2767645557, 193195065, 1080094634, 1584504582, 3178106961, 1042385657, 2531067453, 3711829422, 1306967366, 2438237621, 1908694277, 67556463, 1615861247, 429456164, 3602770327, 2302690252, 1742315127, 2968011453, 126454664, 3877198648, 2043211483, 2709260871, 2084704233, 4169408201, 0, 159417987, 841739592, 504459436, 1817866830, 4245618683, 260388950, 1034867998, 908933415, 168810852, 1750902305, 2606453969, 607530554, 202008497, 2472011535, 3035535058, 463180190, 2160117071, 1641816226, 1517767529, 470948374, 3801332234, 3231722213, 1008918595, 303765277, 235474187, 4069246893, 766945465, 337553864, 1475418501, 2943682380, 4003061179, 2743034109, 4144047775, 1551037884, 1147550661, 1543208500, 2336434550, 3408119516, 3069049960, 3102011747, 3610369226, 1113818384, 328671808, 2227573024, 2236228733, 3535486456, 2935566865, 3341394285, 496906059, 3702665459, 226906860, 2009195472, 733156972, 2842737049, 294930682, 1206477858, 2835123396, 2700099354, 1451044056, 573804783, 2269728455, 3644379585, 2362090238, 2564033334, 2801107407, 2776292904, 3669462566, 1068351396, 742039012, 1350078989, 1784663195, 1417561698, 4136440770, 2430122216, 775550814, 2193862645, 2673705150, 1775276924, 1876241833, 3475313331, 3366754619, 270040487, 3902563182, 3678124923, 3441850377, 1851332852, 3969562369, 2203032232, 3868552805, 2868897406, 566021896, 4011190502, 3135740889, 1248802510, 3936291284, 699432150, 832877231, 708780849, 3332740144, 899835584, 1951317047, 4236429990, 3767586992, 866637845, 4043610186, 1106041591, 2144161806, 395441711, 1984812685, 1139781709, 3433712980, 3835036895, 2664543715, 1282050075, 3240894392, 1181045119, 2640243204, 25965917, 4203181171, 4211818798, 3009879386, 2463879762, 3910161971, 1842759443, 2597806476, 933301370, 1509430414, 3943906441, 3467192302, 3076639029, 3776767469, 2051518780, 2631065433, 1441952575, 404016761, 1942435775, 1408749034, 1610459739, 3745345300, 2017778566, 3400528769, 3110650942, 941896748, 3265478751, 371049330, 3168937228, 675039627, 4279080257, 967311729, 135050206, 3635733660, 1683407248, 2076935265, 3576870512, 1215061108, 3501741890];\n var T6 = [1347548327, 1400783205, 3273267108, 2520393566, 3409685355, 4045380933, 2880240216, 2471224067, 1428173050, 4138563181, 2441661558, 636813900, 4233094615, 3620022987, 2149987652, 2411029155, 1239331162, 1730525723, 2554718734, 3781033664, 46346101, 310463728, 2743944855, 3328955385, 3875770207, 2501218972, 3955191162, 3667219033, 768917123, 3545789473, 692707433, 1150208456, 1786102409, 2029293177, 1805211710, 3710368113, 3065962831, 401639597, 1724457132, 3028143674, 409198410, 2196052529, 1620529459, 1164071807, 3769721975, 2226875310, 486441376, 2499348523, 1483753576, 428819965, 2274680428, 3075636216, 598438867, 3799141122, 1474502543, 711349675, 129166120, 53458370, 2592523643, 2782082824, 4063242375, 2988687269, 3120694122, 1559041666, 730517276, 2460449204, 4042459122, 2706270690, 3446004468, 3573941694, 533804130, 2328143614, 2637442643, 2695033685, 839224033, 1973745387, 957055980, 2856345839, 106852767, 1371368976, 4181598602, 1033297158, 2933734917, 1179510461, 3046200461, 91341917, 1862534868, 4284502037, 605657339, 2547432937, 3431546947, 2003294622, 3182487618, 2282195339, 954669403, 3682191598, 1201765386, 3917234703, 3388507166, 0, 2198438022, 1211247597, 2887651696, 1315723890, 4227665663, 1443857720, 507358933, 657861945, 1678381017, 560487590, 3516619604, 975451694, 2970356327, 261314535, 3535072918, 2652609425, 1333838021, 2724322336, 1767536459, 370938394, 182621114, 3854606378, 1128014560, 487725847, 185469197, 2918353863, 3106780840, 3356761769, 2237133081, 1286567175, 3152976349, 4255350624, 2683765030, 3160175349, 3309594171, 878443390, 1988838185, 3704300486, 1756818940, 1673061617, 3403100636, 272786309, 1075025698, 545572369, 2105887268, 4174560061, 296679730, 1841768865, 1260232239, 4091327024, 3960309330, 3497509347, 1814803222, 2578018489, 4195456072, 575138148, 3299409036, 446754879, 3629546796, 4011996048, 3347532110, 3252238545, 4270639778, 915985419, 3483825537, 681933534, 651868046, 2755636671, 3828103837, 223377554, 2607439820, 1649704518, 3270937875, 3901806776, 1580087799, 4118987695, 3198115200, 2087309459, 2842678573, 3016697106, 1003007129, 2802849917, 1860738147, 2077965243, 164439672, 4100872472, 32283319, 2827177882, 1709610350, 2125135846, 136428751, 3874428392, 3652904859, 3460984630, 3572145929, 3593056380, 2939266226, 824852259, 818324884, 3224740454, 930369212, 2801566410, 2967507152, 355706840, 1257309336, 4148292826, 243256656, 790073846, 2373340630, 1296297904, 1422699085, 3756299780, 3818836405, 457992840, 3099667487, 2135319889, 77422314, 1560382517, 1945798516, 788204353, 1521706781, 1385356242, 870912086, 325965383, 2358957921, 2050466060, 2388260884, 2313884476, 4006521127, 901210569, 3990953189, 1014646705, 1503449823, 1062597235, 2031621326, 3212035895, 3931371469, 1533017514, 350174575, 2256028891, 2177544179, 1052338372, 741876788, 1606591296, 1914052035, 213705253, 2334669897, 1107234197, 1899603969, 3725069491, 2631447780, 2422494913, 1635502980, 1893020342, 1950903388, 1120974935];\n var T7 = [2807058932, 1699970625, 2764249623, 1586903591, 1808481195, 1173430173, 1487645946, 59984867, 4199882800, 1844882806, 1989249228, 1277555970, 3623636965, 3419915562, 1149249077, 2744104290, 1514790577, 459744698, 244860394, 3235995134, 1963115311, 4027744588, 2544078150, 4190530515, 1608975247, 2627016082, 2062270317, 1507497298, 2200818878, 567498868, 1764313568, 3359936201, 2305455554, 2037970062, 1047239e3, 1910319033, 1337376481, 2904027272, 2892417312, 984907214, 1243112415, 830661914, 861968209, 2135253587, 2011214180, 2927934315, 2686254721, 731183368, 1750626376, 4246310725, 1820824798, 4172763771, 3542330227, 48394827, 2404901663, 2871682645, 671593195, 3254988725, 2073724613, 145085239, 2280796200, 2779915199, 1790575107, 2187128086, 472615631, 3029510009, 4075877127, 3802222185, 4107101658, 3201631749, 1646252340, 4270507174, 1402811438, 1436590835, 3778151818, 3950355702, 3963161475, 4020912224, 2667994737, 273792366, 2331590177, 104699613, 95345982, 3175501286, 2377486676, 1560637892, 3564045318, 369057872, 4213447064, 3919042237, 1137477952, 2658625497, 1119727848, 2340947849, 1530455833, 4007360968, 172466556, 266959938, 516552836, 0, 2256734592, 3980931627, 1890328081, 1917742170, 4294704398, 945164165, 3575528878, 958871085, 3647212047, 2787207260, 1423022939, 775562294, 1739656202, 3876557655, 2530391278, 2443058075, 3310321856, 547512796, 1265195639, 437656594, 3121275539, 719700128, 3762502690, 387781147, 218828297, 3350065803, 2830708150, 2848461854, 428169201, 122466165, 3720081049, 1627235199, 648017665, 4122762354, 1002783846, 2117360635, 695634755, 3336358691, 4234721005, 4049844452, 3704280881, 2232435299, 574624663, 287343814, 612205898, 1039717051, 840019705, 2708326185, 793451934, 821288114, 1391201670, 3822090177, 376187827, 3113855344, 1224348052, 1679968233, 2361698556, 1058709744, 752375421, 2431590963, 1321699145, 3519142200, 2734591178, 188127444, 2177869557, 3727205754, 2384911031, 3215212461, 2648976442, 2450346104, 3432737375, 1180849278, 331544205, 3102249176, 4150144569, 2952102595, 2159976285, 2474404304, 766078933, 313773861, 2570832044, 2108100632, 1668212892, 3145456443, 2013908262, 418672217, 3070356634, 2594734927, 1852171925, 3867060991, 3473416636, 3907448597, 2614737639, 919489135, 164948639, 2094410160, 2997825956, 590424639, 2486224549, 1723872674, 3157750862, 3399941250, 3501252752, 3625268135, 2555048196, 3673637356, 1343127501, 4130281361, 3599595085, 2957853679, 1297403050, 81781910, 3051593425, 2283490410, 532201772, 1367295589, 3926170974, 895287692, 1953757831, 1093597963, 492483431, 3528626907, 1446242576, 1192455638, 1636604631, 209336225, 344873464, 1015671571, 669961897, 3375740769, 3857572124, 2973530695, 3747192018, 1933530610, 3464042516, 935293895, 3454686199, 2858115069, 1863638845, 3683022916, 4085369519, 3292445032, 875313188, 1080017571, 3279033885, 621591778, 1233856572, 2504130317, 24197544, 3017672716, 3835484340, 3247465558, 2220981195, 3060847922, 1551124588, 1463996600];\n var T8 = [4104605777, 1097159550, 396673818, 660510266, 2875968315, 2638606623, 4200115116, 3808662347, 821712160, 1986918061, 3430322568, 38544885, 3856137295, 718002117, 893681702, 1654886325, 2975484382, 3122358053, 3926825029, 4274053469, 796197571, 1290801793, 1184342925, 3556361835, 2405426947, 2459735317, 1836772287, 1381620373, 3196267988, 1948373848, 3764988233, 3385345166, 3263785589, 2390325492, 1480485785, 3111247143, 3780097726, 2293045232, 548169417, 3459953789, 3746175075, 439452389, 1362321559, 1400849762, 1685577905, 1806599355, 2174754046, 137073913, 1214797936, 1174215055, 3731654548, 2079897426, 1943217067, 1258480242, 529487843, 1437280870, 3945269170, 3049390895, 3313212038, 923313619, 679998e3, 3215307299, 57326082, 377642221, 3474729866, 2041877159, 133361907, 1776460110, 3673476453, 96392454, 878845905, 2801699524, 777231668, 4082475170, 2330014213, 4142626212, 2213296395, 1626319424, 1906247262, 1846563261, 562755902, 3708173718, 1040559837, 3871163981, 1418573201, 3294430577, 114585348, 1343618912, 2566595609, 3186202582, 1078185097, 3651041127, 3896688048, 2307622919, 425408743, 3371096953, 2081048481, 1108339068, 2216610296, 0, 2156299017, 736970802, 292596766, 1517440620, 251657213, 2235061775, 2933202493, 758720310, 265905162, 1554391400, 1532285339, 908999204, 174567692, 1474760595, 4002861748, 2610011675, 3234156416, 3693126241, 2001430874, 303699484, 2478443234, 2687165888, 585122620, 454499602, 151849742, 2345119218, 3064510765, 514443284, 4044981591, 1963412655, 2581445614, 2137062819, 19308535, 1928707164, 1715193156, 4219352155, 1126790795, 600235211, 3992742070, 3841024952, 836553431, 1669664834, 2535604243, 3323011204, 1243905413, 3141400786, 4180808110, 698445255, 2653899549, 2989552604, 2253581325, 3252932727, 3004591147, 1891211689, 2487810577, 3915653703, 4237083816, 4030667424, 2100090966, 865136418, 1229899655, 953270745, 3399679628, 3557504664, 4118925222, 2061379749, 3079546586, 2915017791, 983426092, 2022837584, 1607244650, 2118541908, 2366882550, 3635996816, 972512814, 3283088770, 1568718495, 3499326569, 3576539503, 621982671, 2895723464, 410887952, 2623762152, 1002142683, 645401037, 1494807662, 2595684844, 1335535747, 2507040230, 4293295786, 3167684641, 367585007, 3885750714, 1865862730, 2668221674, 2960971305, 2763173681, 1059270954, 2777952454, 2724642869, 1320957812, 2194319100, 2429595872, 2815956275, 77089521, 3973773121, 3444575871, 2448830231, 1305906550, 4021308739, 2857194700, 2516901860, 3518358430, 1787304780, 740276417, 1699839814, 1592394909, 2352307457, 2272556026, 188821243, 1729977011, 3687994002, 274084841, 3594982253, 3613494426, 2701949495, 4162096729, 322734571, 2837966542, 1640576439, 484830689, 1202797690, 3537852828, 4067639125, 349075736, 3342319475, 4157467219, 4255800159, 1030690015, 1155237496, 2951971274, 1757691577, 607398968, 2738905026, 499347990, 3794078908, 1011452712, 227885567, 2818666809, 213114376, 3034881240, 1455525988, 3414450555, 850817237, 1817998408, 3092726480];\n var U1 = [0, 235474187, 470948374, 303765277, 941896748, 908933415, 607530554, 708780849, 1883793496, 2118214995, 1817866830, 1649639237, 1215061108, 1181045119, 1417561698, 1517767529, 3767586992, 4003061179, 4236429990, 4069246893, 3635733660, 3602770327, 3299278474, 3400528769, 2430122216, 2664543715, 2362090238, 2193862645, 2835123396, 2801107407, 3035535058, 3135740889, 3678124923, 3576870512, 3341394285, 3374361702, 3810496343, 3977675356, 4279080257, 4043610186, 2876494627, 2776292904, 3076639029, 3110650942, 2472011535, 2640243204, 2403728665, 2169303058, 1001089995, 899835584, 666464733, 699432150, 59727847, 226906860, 530400753, 294930682, 1273168787, 1172967064, 1475418501, 1509430414, 1942435775, 2110667444, 1876241833, 1641816226, 2910219766, 2743034109, 2976151520, 3211623147, 2505202138, 2606453969, 2302690252, 2269728455, 3711829422, 3543599269, 3240894392, 3475313331, 3843699074, 3943906441, 4178062228, 4144047775, 1306967366, 1139781709, 1374988112, 1610459739, 1975683434, 2076935265, 1775276924, 1742315127, 1034867998, 866637845, 566021896, 800440835, 92987698, 193195065, 429456164, 395441711, 1984812685, 2017778566, 1784663195, 1683407248, 1315562145, 1080094634, 1383856311, 1551037884, 101039829, 135050206, 437757123, 337553864, 1042385657, 807962610, 573804783, 742039012, 2531067453, 2564033334, 2328828971, 2227573024, 2935566865, 2700099354, 3001755655, 3168937228, 3868552805, 3902563182, 4203181171, 4102977912, 3736164937, 3501741890, 3265478751, 3433712980, 1106041591, 1340463100, 1576976609, 1408749034, 2043211483, 2009195472, 1708848333, 1809054150, 832877231, 1068351396, 766945465, 599762354, 159417987, 126454664, 361929877, 463180190, 2709260871, 2943682380, 3178106961, 3009879386, 2572697195, 2538681184, 2236228733, 2336434550, 3509871135, 3745345300, 3441850377, 3274667266, 3910161971, 3877198648, 4110568485, 4211818798, 2597806476, 2497604743, 2261089178, 2295101073, 2733856160, 2902087851, 3202437046, 2968011453, 3936291284, 3835036895, 4136440770, 4169408201, 3535486456, 3702665459, 3467192302, 3231722213, 2051518780, 1951317047, 1716890410, 1750902305, 1113818384, 1282050075, 1584504582, 1350078989, 168810852, 67556463, 371049330, 404016761, 841739592, 1008918595, 775550814, 540080725, 3969562369, 3801332234, 4035489047, 4269907996, 3569255213, 3669462566, 3366754619, 3332740144, 2631065433, 2463879762, 2160117071, 2395588676, 2767645557, 2868897406, 3102011747, 3069049960, 202008497, 33778362, 270040487, 504459436, 875451293, 975658646, 675039627, 641025152, 2084704233, 1917518562, 1615861247, 1851332852, 1147550661, 1248802510, 1484005843, 1451044056, 933301370, 967311729, 733156972, 632953703, 260388950, 25965917, 328671808, 496906059, 1206477858, 1239443753, 1543208500, 1441952575, 2144161806, 1908694277, 1675577880, 1842759443, 3610369226, 3644379585, 3408119516, 3307916247, 4011190502, 3776767469, 4077384432, 4245618683, 2809771154, 2842737049, 3144396420, 3043140495, 2673705150, 2438237621, 2203032232, 2370213795];\n var U22 = [0, 185469197, 370938394, 487725847, 741876788, 657861945, 975451694, 824852259, 1483753576, 1400783205, 1315723890, 1164071807, 1950903388, 2135319889, 1649704518, 1767536459, 2967507152, 3152976349, 2801566410, 2918353863, 2631447780, 2547432937, 2328143614, 2177544179, 3901806776, 3818836405, 4270639778, 4118987695, 3299409036, 3483825537, 3535072918, 3652904859, 2077965243, 1893020342, 1841768865, 1724457132, 1474502543, 1559041666, 1107234197, 1257309336, 598438867, 681933534, 901210569, 1052338372, 261314535, 77422314, 428819965, 310463728, 3409685355, 3224740454, 3710368113, 3593056380, 3875770207, 3960309330, 4045380933, 4195456072, 2471224067, 2554718734, 2237133081, 2388260884, 3212035895, 3028143674, 2842678573, 2724322336, 4138563181, 4255350624, 3769721975, 3955191162, 3667219033, 3516619604, 3431546947, 3347532110, 2933734917, 2782082824, 3099667487, 3016697106, 2196052529, 2313884476, 2499348523, 2683765030, 1179510461, 1296297904, 1347548327, 1533017514, 1786102409, 1635502980, 2087309459, 2003294622, 507358933, 355706840, 136428751, 53458370, 839224033, 957055980, 605657339, 790073846, 2373340630, 2256028891, 2607439820, 2422494913, 2706270690, 2856345839, 3075636216, 3160175349, 3573941694, 3725069491, 3273267108, 3356761769, 4181598602, 4063242375, 4011996048, 3828103837, 1033297158, 915985419, 730517276, 545572369, 296679730, 446754879, 129166120, 213705253, 1709610350, 1860738147, 1945798516, 2029293177, 1239331162, 1120974935, 1606591296, 1422699085, 4148292826, 4233094615, 3781033664, 3931371469, 3682191598, 3497509347, 3446004468, 3328955385, 2939266226, 2755636671, 3106780840, 2988687269, 2198438022, 2282195339, 2501218972, 2652609425, 1201765386, 1286567175, 1371368976, 1521706781, 1805211710, 1620529459, 2105887268, 1988838185, 533804130, 350174575, 164439672, 46346101, 870912086, 954669403, 636813900, 788204353, 2358957921, 2274680428, 2592523643, 2441661558, 2695033685, 2880240216, 3065962831, 3182487618, 3572145929, 3756299780, 3270937875, 3388507166, 4174560061, 4091327024, 4006521127, 3854606378, 1014646705, 930369212, 711349675, 560487590, 272786309, 457992840, 106852767, 223377554, 1678381017, 1862534868, 1914052035, 2031621326, 1211247597, 1128014560, 1580087799, 1428173050, 32283319, 182621114, 401639597, 486441376, 768917123, 651868046, 1003007129, 818324884, 1503449823, 1385356242, 1333838021, 1150208456, 1973745387, 2125135846, 1673061617, 1756818940, 2970356327, 3120694122, 2802849917, 2887651696, 2637442643, 2520393566, 2334669897, 2149987652, 3917234703, 3799141122, 4284502037, 4100872472, 3309594171, 3460984630, 3545789473, 3629546796, 2050466060, 1899603969, 1814803222, 1730525723, 1443857720, 1560382517, 1075025698, 1260232239, 575138148, 692707433, 878443390, 1062597235, 243256656, 91341917, 409198410, 325965383, 3403100636, 3252238545, 3704300486, 3620022987, 3874428392, 3990953189, 4042459122, 4227665663, 2460449204, 2578018489, 2226875310, 2411029155, 3198115200, 3046200461, 2827177882, 2743944855];\n var U32 = [0, 218828297, 437656594, 387781147, 875313188, 958871085, 775562294, 590424639, 1750626376, 1699970625, 1917742170, 2135253587, 1551124588, 1367295589, 1180849278, 1265195639, 3501252752, 3720081049, 3399941250, 3350065803, 3835484340, 3919042237, 4270507174, 4085369519, 3102249176, 3051593425, 2734591178, 2952102595, 2361698556, 2177869557, 2530391278, 2614737639, 3145456443, 3060847922, 2708326185, 2892417312, 2404901663, 2187128086, 2504130317, 2555048196, 3542330227, 3727205754, 3375740769, 3292445032, 3876557655, 3926170974, 4246310725, 4027744588, 1808481195, 1723872674, 1910319033, 2094410160, 1608975247, 1391201670, 1173430173, 1224348052, 59984867, 244860394, 428169201, 344873464, 935293895, 984907214, 766078933, 547512796, 1844882806, 1627235199, 2011214180, 2062270317, 1507497298, 1423022939, 1137477952, 1321699145, 95345982, 145085239, 532201772, 313773861, 830661914, 1015671571, 731183368, 648017665, 3175501286, 2957853679, 2807058932, 2858115069, 2305455554, 2220981195, 2474404304, 2658625497, 3575528878, 3625268135, 3473416636, 3254988725, 3778151818, 3963161475, 4213447064, 4130281361, 3599595085, 3683022916, 3432737375, 3247465558, 3802222185, 4020912224, 4172763771, 4122762354, 3201631749, 3017672716, 2764249623, 2848461854, 2331590177, 2280796200, 2431590963, 2648976442, 104699613, 188127444, 472615631, 287343814, 840019705, 1058709744, 671593195, 621591778, 1852171925, 1668212892, 1953757831, 2037970062, 1514790577, 1463996600, 1080017571, 1297403050, 3673637356, 3623636965, 3235995134, 3454686199, 4007360968, 3822090177, 4107101658, 4190530515, 2997825956, 3215212461, 2830708150, 2779915199, 2256734592, 2340947849, 2627016082, 2443058075, 172466556, 122466165, 273792366, 492483431, 1047239e3, 861968209, 612205898, 695634755, 1646252340, 1863638845, 2013908262, 1963115311, 1446242576, 1530455833, 1277555970, 1093597963, 1636604631, 1820824798, 2073724613, 1989249228, 1436590835, 1487645946, 1337376481, 1119727848, 164948639, 81781910, 331544205, 516552836, 1039717051, 821288114, 669961897, 719700128, 2973530695, 3157750862, 2871682645, 2787207260, 2232435299, 2283490410, 2667994737, 2450346104, 3647212047, 3564045318, 3279033885, 3464042516, 3980931627, 3762502690, 4150144569, 4199882800, 3070356634, 3121275539, 2904027272, 2686254721, 2200818878, 2384911031, 2570832044, 2486224549, 3747192018, 3528626907, 3310321856, 3359936201, 3950355702, 3867060991, 4049844452, 4234721005, 1739656202, 1790575107, 2108100632, 1890328081, 1402811438, 1586903591, 1233856572, 1149249077, 266959938, 48394827, 369057872, 418672217, 1002783846, 919489135, 567498868, 752375421, 209336225, 24197544, 376187827, 459744698, 945164165, 895287692, 574624663, 793451934, 1679968233, 1764313568, 2117360635, 1933530610, 1343127501, 1560637892, 1243112415, 1192455638, 3704280881, 3519142200, 3336358691, 3419915562, 3907448597, 3857572124, 4075877127, 4294704398, 3029510009, 3113855344, 2927934315, 2744104290, 2159976285, 2377486676, 2594734927, 2544078150];\n var U4 = [0, 151849742, 303699484, 454499602, 607398968, 758720310, 908999204, 1059270954, 1214797936, 1097159550, 1517440620, 1400849762, 1817998408, 1699839814, 2118541908, 2001430874, 2429595872, 2581445614, 2194319100, 2345119218, 3034881240, 3186202582, 2801699524, 2951971274, 3635996816, 3518358430, 3399679628, 3283088770, 4237083816, 4118925222, 4002861748, 3885750714, 1002142683, 850817237, 698445255, 548169417, 529487843, 377642221, 227885567, 77089521, 1943217067, 2061379749, 1640576439, 1757691577, 1474760595, 1592394909, 1174215055, 1290801793, 2875968315, 2724642869, 3111247143, 2960971305, 2405426947, 2253581325, 2638606623, 2487810577, 3808662347, 3926825029, 4044981591, 4162096729, 3342319475, 3459953789, 3576539503, 3693126241, 1986918061, 2137062819, 1685577905, 1836772287, 1381620373, 1532285339, 1078185097, 1229899655, 1040559837, 923313619, 740276417, 621982671, 439452389, 322734571, 137073913, 19308535, 3871163981, 4021308739, 4104605777, 4255800159, 3263785589, 3414450555, 3499326569, 3651041127, 2933202493, 2815956275, 3167684641, 3049390895, 2330014213, 2213296395, 2566595609, 2448830231, 1305906550, 1155237496, 1607244650, 1455525988, 1776460110, 1626319424, 2079897426, 1928707164, 96392454, 213114376, 396673818, 514443284, 562755902, 679998e3, 865136418, 983426092, 3708173718, 3557504664, 3474729866, 3323011204, 4180808110, 4030667424, 3945269170, 3794078908, 2507040230, 2623762152, 2272556026, 2390325492, 2975484382, 3092726480, 2738905026, 2857194700, 3973773121, 3856137295, 4274053469, 4157467219, 3371096953, 3252932727, 3673476453, 3556361835, 2763173681, 2915017791, 3064510765, 3215307299, 2156299017, 2307622919, 2459735317, 2610011675, 2081048481, 1963412655, 1846563261, 1729977011, 1480485785, 1362321559, 1243905413, 1126790795, 878845905, 1030690015, 645401037, 796197571, 274084841, 425408743, 38544885, 188821243, 3613494426, 3731654548, 3313212038, 3430322568, 4082475170, 4200115116, 3780097726, 3896688048, 2668221674, 2516901860, 2366882550, 2216610296, 3141400786, 2989552604, 2837966542, 2687165888, 1202797690, 1320957812, 1437280870, 1554391400, 1669664834, 1787304780, 1906247262, 2022837584, 265905162, 114585348, 499347990, 349075736, 736970802, 585122620, 972512814, 821712160, 2595684844, 2478443234, 2293045232, 2174754046, 3196267988, 3079546586, 2895723464, 2777952454, 3537852828, 3687994002, 3234156416, 3385345166, 4142626212, 4293295786, 3841024952, 3992742070, 174567692, 57326082, 410887952, 292596766, 777231668, 660510266, 1011452712, 893681702, 1108339068, 1258480242, 1343618912, 1494807662, 1715193156, 1865862730, 1948373848, 2100090966, 2701949495, 2818666809, 3004591147, 3122358053, 2235061775, 2352307457, 2535604243, 2653899549, 3915653703, 3764988233, 4219352155, 4067639125, 3444575871, 3294430577, 3746175075, 3594982253, 836553431, 953270745, 600235211, 718002117, 367585007, 484830689, 133361907, 251657213, 2041877159, 1891211689, 1806599355, 1654886325, 1568718495, 1418573201, 1335535747, 1184342925];\n function convertToInt32(bytes) {\n var result = [];\n for (var i3 = 0; i3 < bytes.length; i3 += 4) {\n result.push(\n bytes[i3] << 24 | bytes[i3 + 1] << 16 | bytes[i3 + 2] << 8 | bytes[i3 + 3]\n );\n }\n return result;\n }\n var AES = function(key) {\n if (!(this instanceof AES)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n Object.defineProperty(this, \"key\", {\n value: coerceArray(key, true)\n });\n this._prepare();\n };\n AES.prototype._prepare = function() {\n var rounds = numberOfRounds[this.key.length];\n if (rounds == null) {\n throw new Error(\"invalid key size (must be 16, 24 or 32 bytes)\");\n }\n this._Ke = [];\n this._Kd = [];\n for (var i3 = 0; i3 <= rounds; i3++) {\n this._Ke.push([0, 0, 0, 0]);\n this._Kd.push([0, 0, 0, 0]);\n }\n var roundKeyCount = (rounds + 1) * 4;\n var KC = this.key.length / 4;\n var tk = convertToInt32(this.key);\n var index2;\n for (var i3 = 0; i3 < KC; i3++) {\n index2 = i3 >> 2;\n this._Ke[index2][i3 % 4] = tk[i3];\n this._Kd[rounds - index2][i3 % 4] = tk[i3];\n }\n var rconpointer = 0;\n var t3 = KC, tt;\n while (t3 < roundKeyCount) {\n tt = tk[KC - 1];\n tk[0] ^= S3[tt >> 16 & 255] << 24 ^ S3[tt >> 8 & 255] << 16 ^ S3[tt & 255] << 8 ^ S3[tt >> 24 & 255] ^ rcon[rconpointer] << 24;\n rconpointer += 1;\n if (KC != 8) {\n for (var i3 = 1; i3 < KC; i3++) {\n tk[i3] ^= tk[i3 - 1];\n }\n } else {\n for (var i3 = 1; i3 < KC / 2; i3++) {\n tk[i3] ^= tk[i3 - 1];\n }\n tt = tk[KC / 2 - 1];\n tk[KC / 2] ^= S3[tt & 255] ^ S3[tt >> 8 & 255] << 8 ^ S3[tt >> 16 & 255] << 16 ^ S3[tt >> 24 & 255] << 24;\n for (var i3 = KC / 2 + 1; i3 < KC; i3++) {\n tk[i3] ^= tk[i3 - 1];\n }\n }\n var i3 = 0, r2, c4;\n while (i3 < KC && t3 < roundKeyCount) {\n r2 = t3 >> 2;\n c4 = t3 % 4;\n this._Ke[r2][c4] = tk[i3];\n this._Kd[rounds - r2][c4] = tk[i3++];\n t3++;\n }\n }\n for (var r2 = 1; r2 < rounds; r2++) {\n for (var c4 = 0; c4 < 4; c4++) {\n tt = this._Kd[r2][c4];\n this._Kd[r2][c4] = U1[tt >> 24 & 255] ^ U22[tt >> 16 & 255] ^ U32[tt >> 8 & 255] ^ U4[tt & 255];\n }\n }\n };\n AES.prototype.encrypt = function(plaintext) {\n if (plaintext.length != 16) {\n throw new Error(\"invalid plaintext size (must be 16 bytes)\");\n }\n var rounds = this._Ke.length - 1;\n var a3 = [0, 0, 0, 0];\n var t3 = convertToInt32(plaintext);\n for (var i3 = 0; i3 < 4; i3++) {\n t3[i3] ^= this._Ke[0][i3];\n }\n for (var r2 = 1; r2 < rounds; r2++) {\n for (var i3 = 0; i3 < 4; i3++) {\n a3[i3] = T1[t3[i3] >> 24 & 255] ^ T22[t3[(i3 + 1) % 4] >> 16 & 255] ^ T32[t3[(i3 + 2) % 4] >> 8 & 255] ^ T4[t3[(i3 + 3) % 4] & 255] ^ this._Ke[r2][i3];\n }\n t3 = a3.slice();\n }\n var result = createArray(16), tt;\n for (var i3 = 0; i3 < 4; i3++) {\n tt = this._Ke[rounds][i3];\n result[4 * i3] = (S3[t3[i3] >> 24 & 255] ^ tt >> 24) & 255;\n result[4 * i3 + 1] = (S3[t3[(i3 + 1) % 4] >> 16 & 255] ^ tt >> 16) & 255;\n result[4 * i3 + 2] = (S3[t3[(i3 + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255;\n result[4 * i3 + 3] = (S3[t3[(i3 + 3) % 4] & 255] ^ tt) & 255;\n }\n return result;\n };\n AES.prototype.decrypt = function(ciphertext) {\n if (ciphertext.length != 16) {\n throw new Error(\"invalid ciphertext size (must be 16 bytes)\");\n }\n var rounds = this._Kd.length - 1;\n var a3 = [0, 0, 0, 0];\n var t3 = convertToInt32(ciphertext);\n for (var i3 = 0; i3 < 4; i3++) {\n t3[i3] ^= this._Kd[0][i3];\n }\n for (var r2 = 1; r2 < rounds; r2++) {\n for (var i3 = 0; i3 < 4; i3++) {\n a3[i3] = T5[t3[i3] >> 24 & 255] ^ T6[t3[(i3 + 3) % 4] >> 16 & 255] ^ T7[t3[(i3 + 2) % 4] >> 8 & 255] ^ T8[t3[(i3 + 1) % 4] & 255] ^ this._Kd[r2][i3];\n }\n t3 = a3.slice();\n }\n var result = createArray(16), tt;\n for (var i3 = 0; i3 < 4; i3++) {\n tt = this._Kd[rounds][i3];\n result[4 * i3] = (Si[t3[i3] >> 24 & 255] ^ tt >> 24) & 255;\n result[4 * i3 + 1] = (Si[t3[(i3 + 3) % 4] >> 16 & 255] ^ tt >> 16) & 255;\n result[4 * i3 + 2] = (Si[t3[(i3 + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255;\n result[4 * i3 + 3] = (Si[t3[(i3 + 1) % 4] & 255] ^ tt) & 255;\n }\n return result;\n };\n var ModeOfOperationECB = function(key) {\n if (!(this instanceof ModeOfOperationECB)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Electronic Code Block\";\n this.name = \"ecb\";\n this._aes = new AES(key);\n };\n ModeOfOperationECB.prototype.encrypt = function(plaintext) {\n plaintext = coerceArray(plaintext);\n if (plaintext.length % 16 !== 0) {\n throw new Error(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n for (var i3 = 0; i3 < plaintext.length; i3 += 16) {\n copyArray(plaintext, block, 0, i3, i3 + 16);\n block = this._aes.encrypt(block);\n copyArray(block, ciphertext, i3);\n }\n return ciphertext;\n };\n ModeOfOperationECB.prototype.decrypt = function(ciphertext) {\n ciphertext = coerceArray(ciphertext);\n if (ciphertext.length % 16 !== 0) {\n throw new Error(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n for (var i3 = 0; i3 < ciphertext.length; i3 += 16) {\n copyArray(ciphertext, block, 0, i3, i3 + 16);\n block = this._aes.decrypt(block);\n copyArray(block, plaintext, i3);\n }\n return plaintext;\n };\n var ModeOfOperationCBC = function(key, iv) {\n if (!(this instanceof ModeOfOperationCBC)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Cipher Block Chaining\";\n this.name = \"cbc\";\n if (!iv) {\n iv = createArray(16);\n } else if (iv.length != 16) {\n throw new Error(\"invalid initialation vector size (must be 16 bytes)\");\n }\n this._lastCipherblock = coerceArray(iv, true);\n this._aes = new AES(key);\n };\n ModeOfOperationCBC.prototype.encrypt = function(plaintext) {\n plaintext = coerceArray(plaintext);\n if (plaintext.length % 16 !== 0) {\n throw new Error(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n for (var i3 = 0; i3 < plaintext.length; i3 += 16) {\n copyArray(plaintext, block, 0, i3, i3 + 16);\n for (var j2 = 0; j2 < 16; j2++) {\n block[j2] ^= this._lastCipherblock[j2];\n }\n this._lastCipherblock = this._aes.encrypt(block);\n copyArray(this._lastCipherblock, ciphertext, i3);\n }\n return ciphertext;\n };\n ModeOfOperationCBC.prototype.decrypt = function(ciphertext) {\n ciphertext = coerceArray(ciphertext);\n if (ciphertext.length % 16 !== 0) {\n throw new Error(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n for (var i3 = 0; i3 < ciphertext.length; i3 += 16) {\n copyArray(ciphertext, block, 0, i3, i3 + 16);\n block = this._aes.decrypt(block);\n for (var j2 = 0; j2 < 16; j2++) {\n plaintext[i3 + j2] = block[j2] ^ this._lastCipherblock[j2];\n }\n copyArray(ciphertext, this._lastCipherblock, 0, i3, i3 + 16);\n }\n return plaintext;\n };\n var ModeOfOperationCFB = function(key, iv, segmentSize) {\n if (!(this instanceof ModeOfOperationCFB)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Cipher Feedback\";\n this.name = \"cfb\";\n if (!iv) {\n iv = createArray(16);\n } else if (iv.length != 16) {\n throw new Error(\"invalid initialation vector size (must be 16 size)\");\n }\n if (!segmentSize) {\n segmentSize = 1;\n }\n this.segmentSize = segmentSize;\n this._shiftRegister = coerceArray(iv, true);\n this._aes = new AES(key);\n };\n ModeOfOperationCFB.prototype.encrypt = function(plaintext) {\n if (plaintext.length % this.segmentSize != 0) {\n throw new Error(\"invalid plaintext size (must be segmentSize bytes)\");\n }\n var encrypted = coerceArray(plaintext, true);\n var xorSegment;\n for (var i3 = 0; i3 < encrypted.length; i3 += this.segmentSize) {\n xorSegment = this._aes.encrypt(this._shiftRegister);\n for (var j2 = 0; j2 < this.segmentSize; j2++) {\n encrypted[i3 + j2] ^= xorSegment[j2];\n }\n copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);\n copyArray(encrypted, this._shiftRegister, 16 - this.segmentSize, i3, i3 + this.segmentSize);\n }\n return encrypted;\n };\n ModeOfOperationCFB.prototype.decrypt = function(ciphertext) {\n if (ciphertext.length % this.segmentSize != 0) {\n throw new Error(\"invalid ciphertext size (must be segmentSize bytes)\");\n }\n var plaintext = coerceArray(ciphertext, true);\n var xorSegment;\n for (var i3 = 0; i3 < plaintext.length; i3 += this.segmentSize) {\n xorSegment = this._aes.encrypt(this._shiftRegister);\n for (var j2 = 0; j2 < this.segmentSize; j2++) {\n plaintext[i3 + j2] ^= xorSegment[j2];\n }\n copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);\n copyArray(ciphertext, this._shiftRegister, 16 - this.segmentSize, i3, i3 + this.segmentSize);\n }\n return plaintext;\n };\n var ModeOfOperationOFB = function(key, iv) {\n if (!(this instanceof ModeOfOperationOFB)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Output Feedback\";\n this.name = \"ofb\";\n if (!iv) {\n iv = createArray(16);\n } else if (iv.length != 16) {\n throw new Error(\"invalid initialation vector size (must be 16 bytes)\");\n }\n this._lastPrecipher = coerceArray(iv, true);\n this._lastPrecipherIndex = 16;\n this._aes = new AES(key);\n };\n ModeOfOperationOFB.prototype.encrypt = function(plaintext) {\n var encrypted = coerceArray(plaintext, true);\n for (var i3 = 0; i3 < encrypted.length; i3++) {\n if (this._lastPrecipherIndex === 16) {\n this._lastPrecipher = this._aes.encrypt(this._lastPrecipher);\n this._lastPrecipherIndex = 0;\n }\n encrypted[i3] ^= this._lastPrecipher[this._lastPrecipherIndex++];\n }\n return encrypted;\n };\n ModeOfOperationOFB.prototype.decrypt = ModeOfOperationOFB.prototype.encrypt;\n var Counter = function(initialValue) {\n if (!(this instanceof Counter)) {\n throw Error(\"Counter must be instanitated with `new`\");\n }\n if (initialValue !== 0 && !initialValue) {\n initialValue = 1;\n }\n if (typeof initialValue === \"number\") {\n this._counter = createArray(16);\n this.setValue(initialValue);\n } else {\n this.setBytes(initialValue);\n }\n };\n Counter.prototype.setValue = function(value) {\n if (typeof value !== \"number\" || parseInt(value) != value) {\n throw new Error(\"invalid counter value (must be an integer)\");\n }\n for (var index2 = 15; index2 >= 0; --index2) {\n this._counter[index2] = value % 256;\n value = value >> 8;\n }\n };\n Counter.prototype.setBytes = function(bytes) {\n bytes = coerceArray(bytes, true);\n if (bytes.length != 16) {\n throw new Error(\"invalid counter bytes size (must be 16 bytes)\");\n }\n this._counter = bytes;\n };\n Counter.prototype.increment = function() {\n for (var i3 = 15; i3 >= 0; i3--) {\n if (this._counter[i3] === 255) {\n this._counter[i3] = 0;\n } else {\n this._counter[i3]++;\n break;\n }\n }\n };\n var ModeOfOperationCTR = function(key, counter) {\n if (!(this instanceof ModeOfOperationCTR)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n this.description = \"Counter\";\n this.name = \"ctr\";\n if (!(counter instanceof Counter)) {\n counter = new Counter(counter);\n }\n this._counter = counter;\n this._remainingCounter = null;\n this._remainingCounterIndex = 16;\n this._aes = new AES(key);\n };\n ModeOfOperationCTR.prototype.encrypt = function(plaintext) {\n var encrypted = coerceArray(plaintext, true);\n for (var i3 = 0; i3 < encrypted.length; i3++) {\n if (this._remainingCounterIndex === 16) {\n this._remainingCounter = this._aes.encrypt(this._counter._counter);\n this._remainingCounterIndex = 0;\n this._counter.increment();\n }\n encrypted[i3] ^= this._remainingCounter[this._remainingCounterIndex++];\n }\n return encrypted;\n };\n ModeOfOperationCTR.prototype.decrypt = ModeOfOperationCTR.prototype.encrypt;\n function pkcs7pad(data) {\n data = coerceArray(data, true);\n var padder = 16 - data.length % 16;\n var result = createArray(data.length + padder);\n copyArray(data, result);\n for (var i3 = data.length; i3 < result.length; i3++) {\n result[i3] = padder;\n }\n return result;\n }\n function pkcs7strip(data) {\n data = coerceArray(data, true);\n if (data.length < 16) {\n throw new Error(\"PKCS#7 invalid length\");\n }\n var padder = data[data.length - 1];\n if (padder > 16) {\n throw new Error(\"PKCS#7 padding byte out of range\");\n }\n var length = data.length - padder;\n for (var i3 = 0; i3 < padder; i3++) {\n if (data[length + i3] !== padder) {\n throw new Error(\"PKCS#7 invalid padding byte\");\n }\n }\n var result = createArray(length);\n copyArray(data, result, 0, 0, length);\n return result;\n }\n var aesjs = {\n AES,\n Counter,\n ModeOfOperation: {\n ecb: ModeOfOperationECB,\n cbc: ModeOfOperationCBC,\n cfb: ModeOfOperationCFB,\n ofb: ModeOfOperationOFB,\n ctr: ModeOfOperationCTR\n },\n utils: {\n hex: convertHex,\n utf8: convertUtf8\n },\n padding: {\n pkcs7: {\n pad: pkcs7pad,\n strip: pkcs7strip\n }\n },\n _arrayTest: {\n coerceArray,\n createArray,\n copyArray\n }\n };\n if (typeof exports3 !== \"undefined\") {\n module.exports = aesjs;\n } else if (typeof define === \"function\" && define.amd) {\n define(aesjs);\n } else {\n if (root.aesjs) {\n aesjs._aesjs = root.aesjs;\n }\n root.aesjs = aesjs;\n }\n })(exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/_version.js\n var require_version19 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"json-wallets/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/utils.js\n var require_utils5 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.uuidV4 = exports3.searchPath = exports3.getPassword = exports3.zpad = exports3.looseArrayify = void 0;\n var bytes_1 = require_lib2();\n var strings_1 = require_lib9();\n function looseArrayify(hexString) {\n if (typeof hexString === \"string\" && hexString.substring(0, 2) !== \"0x\") {\n hexString = \"0x\" + hexString;\n }\n return (0, bytes_1.arrayify)(hexString);\n }\n exports3.looseArrayify = looseArrayify;\n function zpad(value, length) {\n value = String(value);\n while (value.length < length) {\n value = \"0\" + value;\n }\n return value;\n }\n exports3.zpad = zpad;\n function getPassword(password) {\n if (typeof password === \"string\") {\n return (0, strings_1.toUtf8Bytes)(password, strings_1.UnicodeNormalizationForm.NFKC);\n }\n return (0, bytes_1.arrayify)(password);\n }\n exports3.getPassword = getPassword;\n function searchPath(object, path) {\n var currentChild = object;\n var comps = path.toLowerCase().split(\"/\");\n for (var i3 = 0; i3 < comps.length; i3++) {\n var matchingChild = null;\n for (var key in currentChild) {\n if (key.toLowerCase() === comps[i3]) {\n matchingChild = currentChild[key];\n break;\n }\n }\n if (matchingChild === null) {\n return null;\n }\n currentChild = matchingChild;\n }\n return currentChild;\n }\n exports3.searchPath = searchPath;\n function uuidV4(randomBytes2) {\n var bytes = (0, bytes_1.arrayify)(randomBytes2);\n bytes[6] = bytes[6] & 15 | 64;\n bytes[8] = bytes[8] & 63 | 128;\n var value = (0, bytes_1.hexlify)(bytes);\n return [\n value.substring(2, 10),\n value.substring(10, 14),\n value.substring(14, 18),\n value.substring(18, 22),\n value.substring(22, 34)\n ].join(\"-\");\n }\n exports3.uuidV4 = uuidV4;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/crowdsale.js\n var require_crowdsale = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/crowdsale.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decrypt = exports3.CrowdsaleAccount = void 0;\n var aes_js_1 = __importDefault4(require_aes_js());\n var address_1 = require_lib7();\n var bytes_1 = require_lib2();\n var keccak256_1 = require_lib5();\n var pbkdf2_1 = require_lib21();\n var strings_1 = require_lib9();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version19();\n var logger = new logger_1.Logger(_version_1.version);\n var utils_1 = require_utils5();\n var CrowdsaleAccount = (\n /** @class */\n function(_super) {\n __extends4(CrowdsaleAccount2, _super);\n function CrowdsaleAccount2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CrowdsaleAccount2.prototype.isCrowdsaleAccount = function(value) {\n return !!(value && value._isCrowdsaleAccount);\n };\n return CrowdsaleAccount2;\n }(properties_1.Description)\n );\n exports3.CrowdsaleAccount = CrowdsaleAccount;\n function decrypt4(json, password) {\n var data = JSON.parse(json);\n password = (0, utils_1.getPassword)(password);\n var ethaddr = (0, address_1.getAddress)((0, utils_1.searchPath)(data, \"ethaddr\"));\n var encseed = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"encseed\"));\n if (!encseed || encseed.length % 16 !== 0) {\n logger.throwArgumentError(\"invalid encseed\", \"json\", json);\n }\n var key = (0, bytes_1.arrayify)((0, pbkdf2_1.pbkdf2)(password, password, 2e3, 32, \"sha256\")).slice(0, 16);\n var iv = encseed.slice(0, 16);\n var encryptedSeed = encseed.slice(16);\n var aesCbc = new aes_js_1.default.ModeOfOperation.cbc(key, iv);\n var seed = aes_js_1.default.padding.pkcs7.strip((0, bytes_1.arrayify)(aesCbc.decrypt(encryptedSeed)));\n var seedHex = \"\";\n for (var i3 = 0; i3 < seed.length; i3++) {\n seedHex += String.fromCharCode(seed[i3]);\n }\n var seedHexBytes = (0, strings_1.toUtf8Bytes)(seedHex);\n var privateKey = (0, keccak256_1.keccak256)(seedHexBytes);\n return new CrowdsaleAccount({\n _isCrowdsaleAccount: true,\n address: ethaddr,\n privateKey\n });\n }\n exports3.decrypt = decrypt4;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/inspect.js\n var require_inspect = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/inspect.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getJsonWalletAddress = exports3.isKeystoreWallet = exports3.isCrowdsaleWallet = void 0;\n var address_1 = require_lib7();\n function isCrowdsaleWallet(json) {\n var data = null;\n try {\n data = JSON.parse(json);\n } catch (error) {\n return false;\n }\n return data.encseed && data.ethaddr;\n }\n exports3.isCrowdsaleWallet = isCrowdsaleWallet;\n function isKeystoreWallet(json) {\n var data = null;\n try {\n data = JSON.parse(json);\n } catch (error) {\n return false;\n }\n if (!data.version || parseInt(data.version) !== data.version || parseInt(data.version) !== 3) {\n return false;\n }\n return true;\n }\n exports3.isKeystoreWallet = isKeystoreWallet;\n function getJsonWalletAddress(json) {\n if (isCrowdsaleWallet(json)) {\n try {\n return (0, address_1.getAddress)(JSON.parse(json).ethaddr);\n } catch (error) {\n return null;\n }\n }\n if (isKeystoreWallet(json)) {\n try {\n return (0, address_1.getAddress)(JSON.parse(json).address);\n } catch (error) {\n return null;\n }\n }\n return null;\n }\n exports3.getJsonWalletAddress = getJsonWalletAddress;\n }\n });\n\n // ../../../node_modules/.pnpm/scrypt-js@3.0.1/node_modules/scrypt-js/scrypt.js\n var require_scrypt = __commonJS({\n \"../../../node_modules/.pnpm/scrypt-js@3.0.1/node_modules/scrypt-js/scrypt.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(root) {\n const MAX_VALUE = 2147483647;\n function SHA2562(m2) {\n const K2 = new Uint32Array([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n let h0 = 1779033703, h1 = 3144134277, h22 = 1013904242, h32 = 2773480762;\n let h4 = 1359893119, h5 = 2600822924, h6 = 528734635, h7 = 1541459225;\n const w3 = new Uint32Array(64);\n function blocks(p5) {\n let off2 = 0, len = p5.length;\n while (len >= 64) {\n let a3 = h0, b4 = h1, c4 = h22, d5 = h32, e2 = h4, f7 = h5, g4 = h6, h8 = h7, u2, i4, j2, t1, t22;\n for (i4 = 0; i4 < 16; i4++) {\n j2 = off2 + i4 * 4;\n w3[i4] = (p5[j2] & 255) << 24 | (p5[j2 + 1] & 255) << 16 | (p5[j2 + 2] & 255) << 8 | p5[j2 + 3] & 255;\n }\n for (i4 = 16; i4 < 64; i4++) {\n u2 = w3[i4 - 2];\n t1 = (u2 >>> 17 | u2 << 32 - 17) ^ (u2 >>> 19 | u2 << 32 - 19) ^ u2 >>> 10;\n u2 = w3[i4 - 15];\n t22 = (u2 >>> 7 | u2 << 32 - 7) ^ (u2 >>> 18 | u2 << 32 - 18) ^ u2 >>> 3;\n w3[i4] = (t1 + w3[i4 - 7] | 0) + (t22 + w3[i4 - 16] | 0) | 0;\n }\n for (i4 = 0; i4 < 64; i4++) {\n t1 = (((e2 >>> 6 | e2 << 32 - 6) ^ (e2 >>> 11 | e2 << 32 - 11) ^ (e2 >>> 25 | e2 << 32 - 25)) + (e2 & f7 ^ ~e2 & g4) | 0) + (h8 + (K2[i4] + w3[i4] | 0) | 0) | 0;\n t22 = ((a3 >>> 2 | a3 << 32 - 2) ^ (a3 >>> 13 | a3 << 32 - 13) ^ (a3 >>> 22 | a3 << 32 - 22)) + (a3 & b4 ^ a3 & c4 ^ b4 & c4) | 0;\n h8 = g4;\n g4 = f7;\n f7 = e2;\n e2 = d5 + t1 | 0;\n d5 = c4;\n c4 = b4;\n b4 = a3;\n a3 = t1 + t22 | 0;\n }\n h0 = h0 + a3 | 0;\n h1 = h1 + b4 | 0;\n h22 = h22 + c4 | 0;\n h32 = h32 + d5 | 0;\n h4 = h4 + e2 | 0;\n h5 = h5 + f7 | 0;\n h6 = h6 + g4 | 0;\n h7 = h7 + h8 | 0;\n off2 += 64;\n len -= 64;\n }\n }\n blocks(m2);\n let i3, bytesLeft = m2.length % 64, bitLenHi = m2.length / 536870912 | 0, bitLenLo = m2.length << 3, numZeros = bytesLeft < 56 ? 56 : 120, p4 = m2.slice(m2.length - bytesLeft, m2.length);\n p4.push(128);\n for (i3 = bytesLeft + 1; i3 < numZeros; i3++) {\n p4.push(0);\n }\n p4.push(bitLenHi >>> 24 & 255);\n p4.push(bitLenHi >>> 16 & 255);\n p4.push(bitLenHi >>> 8 & 255);\n p4.push(bitLenHi >>> 0 & 255);\n p4.push(bitLenLo >>> 24 & 255);\n p4.push(bitLenLo >>> 16 & 255);\n p4.push(bitLenLo >>> 8 & 255);\n p4.push(bitLenLo >>> 0 & 255);\n blocks(p4);\n return [\n h0 >>> 24 & 255,\n h0 >>> 16 & 255,\n h0 >>> 8 & 255,\n h0 >>> 0 & 255,\n h1 >>> 24 & 255,\n h1 >>> 16 & 255,\n h1 >>> 8 & 255,\n h1 >>> 0 & 255,\n h22 >>> 24 & 255,\n h22 >>> 16 & 255,\n h22 >>> 8 & 255,\n h22 >>> 0 & 255,\n h32 >>> 24 & 255,\n h32 >>> 16 & 255,\n h32 >>> 8 & 255,\n h32 >>> 0 & 255,\n h4 >>> 24 & 255,\n h4 >>> 16 & 255,\n h4 >>> 8 & 255,\n h4 >>> 0 & 255,\n h5 >>> 24 & 255,\n h5 >>> 16 & 255,\n h5 >>> 8 & 255,\n h5 >>> 0 & 255,\n h6 >>> 24 & 255,\n h6 >>> 16 & 255,\n h6 >>> 8 & 255,\n h6 >>> 0 & 255,\n h7 >>> 24 & 255,\n h7 >>> 16 & 255,\n h7 >>> 8 & 255,\n h7 >>> 0 & 255\n ];\n }\n function PBKDF2_HMAC_SHA256_OneIter(password, salt, dkLen) {\n password = password.length <= 64 ? password : SHA2562(password);\n const innerLen = 64 + salt.length + 4;\n const inner = new Array(innerLen);\n const outerKey = new Array(64);\n let i3;\n let dk = [];\n for (i3 = 0; i3 < 64; i3++) {\n inner[i3] = 54;\n }\n for (i3 = 0; i3 < password.length; i3++) {\n inner[i3] ^= password[i3];\n }\n for (i3 = 0; i3 < salt.length; i3++) {\n inner[64 + i3] = salt[i3];\n }\n for (i3 = innerLen - 4; i3 < innerLen; i3++) {\n inner[i3] = 0;\n }\n for (i3 = 0; i3 < 64; i3++)\n outerKey[i3] = 92;\n for (i3 = 0; i3 < password.length; i3++)\n outerKey[i3] ^= password[i3];\n function incrementCounter() {\n for (let i4 = innerLen - 1; i4 >= innerLen - 4; i4--) {\n inner[i4]++;\n if (inner[i4] <= 255)\n return;\n inner[i4] = 0;\n }\n }\n while (dkLen >= 32) {\n incrementCounter();\n dk = dk.concat(SHA2562(outerKey.concat(SHA2562(inner))));\n dkLen -= 32;\n }\n if (dkLen > 0) {\n incrementCounter();\n dk = dk.concat(SHA2562(outerKey.concat(SHA2562(inner))).slice(0, dkLen));\n }\n return dk;\n }\n function blockmix_salsa8(BY, Yi, r2, x4, _X) {\n let i3;\n arraycopy(BY, (2 * r2 - 1) * 16, _X, 0, 16);\n for (i3 = 0; i3 < 2 * r2; i3++) {\n blockxor(BY, i3 * 16, _X, 16);\n salsa20_8(_X, x4);\n arraycopy(_X, 0, BY, Yi + i3 * 16, 16);\n }\n for (i3 = 0; i3 < r2; i3++) {\n arraycopy(BY, Yi + i3 * 2 * 16, BY, i3 * 16, 16);\n }\n for (i3 = 0; i3 < r2; i3++) {\n arraycopy(BY, Yi + (i3 * 2 + 1) * 16, BY, (i3 + r2) * 16, 16);\n }\n }\n function R3(a3, b4) {\n return a3 << b4 | a3 >>> 32 - b4;\n }\n function salsa20_8(B2, x4) {\n arraycopy(B2, 0, x4, 0, 16);\n for (let i3 = 8; i3 > 0; i3 -= 2) {\n x4[4] ^= R3(x4[0] + x4[12], 7);\n x4[8] ^= R3(x4[4] + x4[0], 9);\n x4[12] ^= R3(x4[8] + x4[4], 13);\n x4[0] ^= R3(x4[12] + x4[8], 18);\n x4[9] ^= R3(x4[5] + x4[1], 7);\n x4[13] ^= R3(x4[9] + x4[5], 9);\n x4[1] ^= R3(x4[13] + x4[9], 13);\n x4[5] ^= R3(x4[1] + x4[13], 18);\n x4[14] ^= R3(x4[10] + x4[6], 7);\n x4[2] ^= R3(x4[14] + x4[10], 9);\n x4[6] ^= R3(x4[2] + x4[14], 13);\n x4[10] ^= R3(x4[6] + x4[2], 18);\n x4[3] ^= R3(x4[15] + x4[11], 7);\n x4[7] ^= R3(x4[3] + x4[15], 9);\n x4[11] ^= R3(x4[7] + x4[3], 13);\n x4[15] ^= R3(x4[11] + x4[7], 18);\n x4[1] ^= R3(x4[0] + x4[3], 7);\n x4[2] ^= R3(x4[1] + x4[0], 9);\n x4[3] ^= R3(x4[2] + x4[1], 13);\n x4[0] ^= R3(x4[3] + x4[2], 18);\n x4[6] ^= R3(x4[5] + x4[4], 7);\n x4[7] ^= R3(x4[6] + x4[5], 9);\n x4[4] ^= R3(x4[7] + x4[6], 13);\n x4[5] ^= R3(x4[4] + x4[7], 18);\n x4[11] ^= R3(x4[10] + x4[9], 7);\n x4[8] ^= R3(x4[11] + x4[10], 9);\n x4[9] ^= R3(x4[8] + x4[11], 13);\n x4[10] ^= R3(x4[9] + x4[8], 18);\n x4[12] ^= R3(x4[15] + x4[14], 7);\n x4[13] ^= R3(x4[12] + x4[15], 9);\n x4[14] ^= R3(x4[13] + x4[12], 13);\n x4[15] ^= R3(x4[14] + x4[13], 18);\n }\n for (let i3 = 0; i3 < 16; ++i3) {\n B2[i3] += x4[i3];\n }\n }\n function blockxor(S3, Si, D2, len) {\n for (let i3 = 0; i3 < len; i3++) {\n D2[i3] ^= S3[Si + i3];\n }\n }\n function arraycopy(src, srcPos, dest, destPos, length) {\n while (length--) {\n dest[destPos++] = src[srcPos++];\n }\n }\n function checkBufferish(o5) {\n if (!o5 || typeof o5.length !== \"number\") {\n return false;\n }\n for (let i3 = 0; i3 < o5.length; i3++) {\n const v2 = o5[i3];\n if (typeof v2 !== \"number\" || v2 % 1 || v2 < 0 || v2 >= 256) {\n return false;\n }\n }\n return true;\n }\n function ensureInteger(value, name) {\n if (typeof value !== \"number\" || value % 1) {\n throw new Error(\"invalid \" + name);\n }\n return value;\n }\n function _scrypt(password, salt, N4, r2, p4, dkLen, callback) {\n N4 = ensureInteger(N4, \"N\");\n r2 = ensureInteger(r2, \"r\");\n p4 = ensureInteger(p4, \"p\");\n dkLen = ensureInteger(dkLen, \"dkLen\");\n if (N4 === 0 || (N4 & N4 - 1) !== 0) {\n throw new Error(\"N must be power of 2\");\n }\n if (N4 > MAX_VALUE / 128 / r2) {\n throw new Error(\"N too large\");\n }\n if (r2 > MAX_VALUE / 128 / p4) {\n throw new Error(\"r too large\");\n }\n if (!checkBufferish(password)) {\n throw new Error(\"password must be an array or buffer\");\n }\n password = Array.prototype.slice.call(password);\n if (!checkBufferish(salt)) {\n throw new Error(\"salt must be an array or buffer\");\n }\n salt = Array.prototype.slice.call(salt);\n let b4 = PBKDF2_HMAC_SHA256_OneIter(password, salt, p4 * 128 * r2);\n const B2 = new Uint32Array(p4 * 32 * r2);\n for (let i3 = 0; i3 < B2.length; i3++) {\n const j2 = i3 * 4;\n B2[i3] = (b4[j2 + 3] & 255) << 24 | (b4[j2 + 2] & 255) << 16 | (b4[j2 + 1] & 255) << 8 | (b4[j2 + 0] & 255) << 0;\n }\n const XY = new Uint32Array(64 * r2);\n const V2 = new Uint32Array(32 * r2 * N4);\n const Yi = 32 * r2;\n const x4 = new Uint32Array(16);\n const _X = new Uint32Array(16);\n const totalOps = p4 * N4 * 2;\n let currentOp = 0;\n let lastPercent10 = null;\n let stop = false;\n let state = 0;\n let i0 = 0, i1;\n let Bi;\n const limit = callback ? parseInt(1e3 / r2) : 4294967295;\n const nextTick2 = typeof setImmediate !== \"undefined\" ? setImmediate : setTimeout;\n const incrementalSMix = function() {\n if (stop) {\n return callback(new Error(\"cancelled\"), currentOp / totalOps);\n }\n let steps;\n switch (state) {\n case 0:\n Bi = i0 * 32 * r2;\n arraycopy(B2, Bi, XY, 0, Yi);\n state = 1;\n i1 = 0;\n case 1:\n steps = N4 - i1;\n if (steps > limit) {\n steps = limit;\n }\n for (let i3 = 0; i3 < steps; i3++) {\n arraycopy(XY, 0, V2, (i1 + i3) * Yi, Yi);\n blockmix_salsa8(XY, Yi, r2, x4, _X);\n }\n i1 += steps;\n currentOp += steps;\n if (callback) {\n const percent10 = parseInt(1e3 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) {\n break;\n }\n lastPercent10 = percent10;\n }\n }\n if (i1 < N4) {\n break;\n }\n i1 = 0;\n state = 2;\n case 2:\n steps = N4 - i1;\n if (steps > limit) {\n steps = limit;\n }\n for (let i3 = 0; i3 < steps; i3++) {\n const offset = (2 * r2 - 1) * 16;\n const j2 = XY[offset] & N4 - 1;\n blockxor(V2, j2 * Yi, XY, Yi);\n blockmix_salsa8(XY, Yi, r2, x4, _X);\n }\n i1 += steps;\n currentOp += steps;\n if (callback) {\n const percent10 = parseInt(1e3 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) {\n break;\n }\n lastPercent10 = percent10;\n }\n }\n if (i1 < N4) {\n break;\n }\n arraycopy(XY, 0, B2, Bi, Yi);\n i0++;\n if (i0 < p4) {\n state = 0;\n break;\n }\n b4 = [];\n for (let i3 = 0; i3 < B2.length; i3++) {\n b4.push(B2[i3] >> 0 & 255);\n b4.push(B2[i3] >> 8 & 255);\n b4.push(B2[i3] >> 16 & 255);\n b4.push(B2[i3] >> 24 & 255);\n }\n const derivedKey = PBKDF2_HMAC_SHA256_OneIter(password, b4, dkLen);\n if (callback) {\n callback(null, 1, derivedKey);\n }\n return derivedKey;\n }\n if (callback) {\n nextTick2(incrementalSMix);\n }\n };\n if (!callback) {\n while (true) {\n const derivedKey = incrementalSMix();\n if (derivedKey != void 0) {\n return derivedKey;\n }\n }\n }\n incrementalSMix();\n }\n const lib = {\n scrypt: function(password, salt, N4, r2, p4, dkLen, progressCallback) {\n return new Promise(function(resolve, reject) {\n let lastProgress = 0;\n if (progressCallback) {\n progressCallback(0);\n }\n _scrypt(password, salt, N4, r2, p4, dkLen, function(error, progress, key) {\n if (error) {\n reject(error);\n } else if (key) {\n if (progressCallback && lastProgress !== 1) {\n progressCallback(1);\n }\n resolve(new Uint8Array(key));\n } else if (progressCallback && progress !== lastProgress) {\n lastProgress = progress;\n return progressCallback(progress);\n }\n });\n });\n },\n syncScrypt: function(password, salt, N4, r2, p4, dkLen) {\n return new Uint8Array(_scrypt(password, salt, N4, r2, p4, dkLen));\n }\n };\n if (typeof exports3 !== \"undefined\") {\n module.exports = lib;\n } else if (typeof define === \"function\" && define.amd) {\n define(lib);\n } else if (root) {\n if (root.scrypt) {\n root._scrypt = root.scrypt;\n }\n root.scrypt = lib;\n }\n })(exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/keystore.js\n var require_keystore = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/keystore.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encrypt = exports3.decrypt = exports3.decryptSync = exports3.KeystoreAccount = void 0;\n var aes_js_1 = __importDefault4(require_aes_js());\n var scrypt_js_1 = __importDefault4(require_scrypt());\n var address_1 = require_lib7();\n var bytes_1 = require_lib2();\n var hdnode_1 = require_lib23();\n var keccak256_1 = require_lib5();\n var pbkdf2_1 = require_lib21();\n var random_1 = require_lib24();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var utils_1 = require_utils5();\n var logger_1 = require_lib();\n var _version_1 = require_version19();\n var logger = new logger_1.Logger(_version_1.version);\n function hasMnemonic(value) {\n return value != null && value.mnemonic && value.mnemonic.phrase;\n }\n var KeystoreAccount = (\n /** @class */\n function(_super) {\n __extends4(KeystoreAccount2, _super);\n function KeystoreAccount2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n KeystoreAccount2.prototype.isKeystoreAccount = function(value) {\n return !!(value && value._isKeystoreAccount);\n };\n return KeystoreAccount2;\n }(properties_1.Description)\n );\n exports3.KeystoreAccount = KeystoreAccount;\n function _decrypt(data, key, ciphertext) {\n var cipher = (0, utils_1.searchPath)(data, \"crypto/cipher\");\n if (cipher === \"aes-128-ctr\") {\n var iv = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"crypto/cipherparams/iv\"));\n var counter = new aes_js_1.default.Counter(iv);\n var aesCtr = new aes_js_1.default.ModeOfOperation.ctr(key, counter);\n return (0, bytes_1.arrayify)(aesCtr.decrypt(ciphertext));\n }\n return null;\n }\n function _getAccount(data, key) {\n var ciphertext = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"crypto/ciphertext\"));\n var computedMAC = (0, bytes_1.hexlify)((0, keccak256_1.keccak256)((0, bytes_1.concat)([key.slice(16, 32), ciphertext]))).substring(2);\n if (computedMAC !== (0, utils_1.searchPath)(data, \"crypto/mac\").toLowerCase()) {\n throw new Error(\"invalid password\");\n }\n var privateKey = _decrypt(data, key.slice(0, 16), ciphertext);\n if (!privateKey) {\n logger.throwError(\"unsupported cipher\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"decrypt\"\n });\n }\n var mnemonicKey = key.slice(32, 64);\n var address = (0, transactions_1.computeAddress)(privateKey);\n if (data.address) {\n var check2 = data.address.toLowerCase();\n if (check2.substring(0, 2) !== \"0x\") {\n check2 = \"0x\" + check2;\n }\n if ((0, address_1.getAddress)(check2) !== address) {\n throw new Error(\"address mismatch\");\n }\n }\n var account = {\n _isKeystoreAccount: true,\n address,\n privateKey: (0, bytes_1.hexlify)(privateKey)\n };\n if ((0, utils_1.searchPath)(data, \"x-ethers/version\") === \"0.1\") {\n var mnemonicCiphertext = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"x-ethers/mnemonicCiphertext\"));\n var mnemonicIv = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"x-ethers/mnemonicCounter\"));\n var mnemonicCounter = new aes_js_1.default.Counter(mnemonicIv);\n var mnemonicAesCtr = new aes_js_1.default.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);\n var path = (0, utils_1.searchPath)(data, \"x-ethers/path\") || hdnode_1.defaultPath;\n var locale = (0, utils_1.searchPath)(data, \"x-ethers/locale\") || \"en\";\n var entropy = (0, bytes_1.arrayify)(mnemonicAesCtr.decrypt(mnemonicCiphertext));\n try {\n var mnemonic = (0, hdnode_1.entropyToMnemonic)(entropy, locale);\n var node = hdnode_1.HDNode.fromMnemonic(mnemonic, null, locale).derivePath(path);\n if (node.privateKey != account.privateKey) {\n throw new Error(\"mnemonic mismatch\");\n }\n account.mnemonic = node.mnemonic;\n } catch (error) {\n if (error.code !== logger_1.Logger.errors.INVALID_ARGUMENT || error.argument !== \"wordlist\") {\n throw error;\n }\n }\n }\n return new KeystoreAccount(account);\n }\n function pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc) {\n return (0, bytes_1.arrayify)((0, pbkdf2_1.pbkdf2)(passwordBytes, salt, count, dkLen, prfFunc));\n }\n function pbkdf22(passwordBytes, salt, count, dkLen, prfFunc) {\n return Promise.resolve(pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc));\n }\n function _computeKdfKey(data, password, pbkdf2Func, scryptFunc, progressCallback) {\n var passwordBytes = (0, utils_1.getPassword)(password);\n var kdf = (0, utils_1.searchPath)(data, \"crypto/kdf\");\n if (kdf && typeof kdf === \"string\") {\n var throwError = function(name, value) {\n return logger.throwArgumentError(\"invalid key-derivation function parameters\", name, value);\n };\n if (kdf.toLowerCase() === \"scrypt\") {\n var salt = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"crypto/kdfparams/salt\"));\n var N4 = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/n\"));\n var r2 = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/r\"));\n var p4 = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/p\"));\n if (!N4 || !r2 || !p4) {\n throwError(\"kdf\", kdf);\n }\n if ((N4 & N4 - 1) !== 0) {\n throwError(\"N\", N4);\n }\n var dkLen = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/dklen\"));\n if (dkLen !== 32) {\n throwError(\"dklen\", dkLen);\n }\n return scryptFunc(passwordBytes, salt, N4, r2, p4, 64, progressCallback);\n } else if (kdf.toLowerCase() === \"pbkdf2\") {\n var salt = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, \"crypto/kdfparams/salt\"));\n var prfFunc = null;\n var prf = (0, utils_1.searchPath)(data, \"crypto/kdfparams/prf\");\n if (prf === \"hmac-sha256\") {\n prfFunc = \"sha256\";\n } else if (prf === \"hmac-sha512\") {\n prfFunc = \"sha512\";\n } else {\n throwError(\"prf\", prf);\n }\n var count = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/c\"));\n var dkLen = parseInt((0, utils_1.searchPath)(data, \"crypto/kdfparams/dklen\"));\n if (dkLen !== 32) {\n throwError(\"dklen\", dkLen);\n }\n return pbkdf2Func(passwordBytes, salt, count, dkLen, prfFunc);\n }\n }\n return logger.throwArgumentError(\"unsupported key-derivation function\", \"kdf\", kdf);\n }\n function decryptSync(json, password) {\n var data = JSON.parse(json);\n var key = _computeKdfKey(data, password, pbkdf2Sync, scrypt_js_1.default.syncScrypt);\n return _getAccount(data, key);\n }\n exports3.decryptSync = decryptSync;\n function decrypt4(json, password, progressCallback) {\n return __awaiter4(this, void 0, void 0, function() {\n var data, key;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n data = JSON.parse(json);\n return [4, _computeKdfKey(data, password, pbkdf22, scrypt_js_1.default.scrypt, progressCallback)];\n case 1:\n key = _a.sent();\n return [2, _getAccount(data, key)];\n }\n });\n });\n }\n exports3.decrypt = decrypt4;\n function encrypt4(account, password, options, progressCallback) {\n try {\n if ((0, address_1.getAddress)(account.address) !== (0, transactions_1.computeAddress)(account.privateKey)) {\n throw new Error(\"address/privateKey mismatch\");\n }\n if (hasMnemonic(account)) {\n var mnemonic = account.mnemonic;\n var node = hdnode_1.HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path || hdnode_1.defaultPath);\n if (node.privateKey != account.privateKey) {\n throw new Error(\"mnemonic mismatch\");\n }\n }\n } catch (e2) {\n return Promise.reject(e2);\n }\n if (typeof options === \"function\" && !progressCallback) {\n progressCallback = options;\n options = {};\n }\n if (!options) {\n options = {};\n }\n var privateKey = (0, bytes_1.arrayify)(account.privateKey);\n var passwordBytes = (0, utils_1.getPassword)(password);\n var entropy = null;\n var path = null;\n var locale = null;\n if (hasMnemonic(account)) {\n var srcMnemonic = account.mnemonic;\n entropy = (0, bytes_1.arrayify)((0, hdnode_1.mnemonicToEntropy)(srcMnemonic.phrase, srcMnemonic.locale || \"en\"));\n path = srcMnemonic.path || hdnode_1.defaultPath;\n locale = srcMnemonic.locale || \"en\";\n }\n var client = options.client;\n if (!client) {\n client = \"ethers.js\";\n }\n var salt = null;\n if (options.salt) {\n salt = (0, bytes_1.arrayify)(options.salt);\n } else {\n salt = (0, random_1.randomBytes)(32);\n ;\n }\n var iv = null;\n if (options.iv) {\n iv = (0, bytes_1.arrayify)(options.iv);\n if (iv.length !== 16) {\n throw new Error(\"invalid iv\");\n }\n } else {\n iv = (0, random_1.randomBytes)(16);\n }\n var uuidRandom = null;\n if (options.uuid) {\n uuidRandom = (0, bytes_1.arrayify)(options.uuid);\n if (uuidRandom.length !== 16) {\n throw new Error(\"invalid uuid\");\n }\n } else {\n uuidRandom = (0, random_1.randomBytes)(16);\n }\n var N4 = 1 << 17, r2 = 8, p4 = 1;\n if (options.scrypt) {\n if (options.scrypt.N) {\n N4 = options.scrypt.N;\n }\n if (options.scrypt.r) {\n r2 = options.scrypt.r;\n }\n if (options.scrypt.p) {\n p4 = options.scrypt.p;\n }\n }\n return scrypt_js_1.default.scrypt(passwordBytes, salt, N4, r2, p4, 64, progressCallback).then(function(key) {\n key = (0, bytes_1.arrayify)(key);\n var derivedKey = key.slice(0, 16);\n var macPrefix = key.slice(16, 32);\n var mnemonicKey = key.slice(32, 64);\n var counter = new aes_js_1.default.Counter(iv);\n var aesCtr = new aes_js_1.default.ModeOfOperation.ctr(derivedKey, counter);\n var ciphertext = (0, bytes_1.arrayify)(aesCtr.encrypt(privateKey));\n var mac = (0, keccak256_1.keccak256)((0, bytes_1.concat)([macPrefix, ciphertext]));\n var data = {\n address: account.address.substring(2).toLowerCase(),\n id: (0, utils_1.uuidV4)(uuidRandom),\n version: 3,\n crypto: {\n cipher: \"aes-128-ctr\",\n cipherparams: {\n iv: (0, bytes_1.hexlify)(iv).substring(2)\n },\n ciphertext: (0, bytes_1.hexlify)(ciphertext).substring(2),\n kdf: \"scrypt\",\n kdfparams: {\n salt: (0, bytes_1.hexlify)(salt).substring(2),\n n: N4,\n dklen: 32,\n p: p4,\n r: r2\n },\n mac: mac.substring(2)\n }\n };\n if (entropy) {\n var mnemonicIv = (0, random_1.randomBytes)(16);\n var mnemonicCounter = new aes_js_1.default.Counter(mnemonicIv);\n var mnemonicAesCtr = new aes_js_1.default.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);\n var mnemonicCiphertext = (0, bytes_1.arrayify)(mnemonicAesCtr.encrypt(entropy));\n var now = /* @__PURE__ */ new Date();\n var timestamp = now.getUTCFullYear() + \"-\" + (0, utils_1.zpad)(now.getUTCMonth() + 1, 2) + \"-\" + (0, utils_1.zpad)(now.getUTCDate(), 2) + \"T\" + (0, utils_1.zpad)(now.getUTCHours(), 2) + \"-\" + (0, utils_1.zpad)(now.getUTCMinutes(), 2) + \"-\" + (0, utils_1.zpad)(now.getUTCSeconds(), 2) + \".0Z\";\n data[\"x-ethers\"] = {\n client,\n gethFilename: \"UTC--\" + timestamp + \"--\" + data.address,\n mnemonicCounter: (0, bytes_1.hexlify)(mnemonicIv).substring(2),\n mnemonicCiphertext: (0, bytes_1.hexlify)(mnemonicCiphertext).substring(2),\n path,\n locale,\n version: \"0.1\"\n };\n }\n return JSON.stringify(data);\n });\n }\n exports3.encrypt = encrypt4;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/index.js\n var require_lib25 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+json-wallets@5.8.0/node_modules/@ethersproject/json-wallets/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decryptJsonWalletSync = exports3.decryptJsonWallet = exports3.getJsonWalletAddress = exports3.isKeystoreWallet = exports3.isCrowdsaleWallet = exports3.encryptKeystore = exports3.decryptKeystoreSync = exports3.decryptKeystore = exports3.decryptCrowdsale = void 0;\n var crowdsale_1 = require_crowdsale();\n Object.defineProperty(exports3, \"decryptCrowdsale\", { enumerable: true, get: function() {\n return crowdsale_1.decrypt;\n } });\n var inspect_1 = require_inspect();\n Object.defineProperty(exports3, \"getJsonWalletAddress\", { enumerable: true, get: function() {\n return inspect_1.getJsonWalletAddress;\n } });\n Object.defineProperty(exports3, \"isCrowdsaleWallet\", { enumerable: true, get: function() {\n return inspect_1.isCrowdsaleWallet;\n } });\n Object.defineProperty(exports3, \"isKeystoreWallet\", { enumerable: true, get: function() {\n return inspect_1.isKeystoreWallet;\n } });\n var keystore_1 = require_keystore();\n Object.defineProperty(exports3, \"decryptKeystore\", { enumerable: true, get: function() {\n return keystore_1.decrypt;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreSync\", { enumerable: true, get: function() {\n return keystore_1.decryptSync;\n } });\n Object.defineProperty(exports3, \"encryptKeystore\", { enumerable: true, get: function() {\n return keystore_1.encrypt;\n } });\n function decryptJsonWallet(json, password, progressCallback) {\n if ((0, inspect_1.isCrowdsaleWallet)(json)) {\n if (progressCallback) {\n progressCallback(0);\n }\n var account = (0, crowdsale_1.decrypt)(json, password);\n if (progressCallback) {\n progressCallback(1);\n }\n return Promise.resolve(account);\n }\n if ((0, inspect_1.isKeystoreWallet)(json)) {\n return (0, keystore_1.decrypt)(json, password, progressCallback);\n }\n return Promise.reject(new Error(\"invalid JSON wallet\"));\n }\n exports3.decryptJsonWallet = decryptJsonWallet;\n function decryptJsonWalletSync(json, password) {\n if ((0, inspect_1.isCrowdsaleWallet)(json)) {\n return (0, crowdsale_1.decrypt)(json, password);\n }\n if ((0, inspect_1.isKeystoreWallet)(json)) {\n return (0, keystore_1.decryptSync)(json, password);\n }\n throw new Error(\"invalid JSON wallet\");\n }\n exports3.decryptJsonWalletSync = decryptJsonWalletSync;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wallet@5.8.0/node_modules/@ethersproject/wallet/lib/_version.js\n var require_version20 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wallet@5.8.0/node_modules/@ethersproject/wallet/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"wallet/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+wallet@5.8.0/node_modules/@ethersproject/wallet/lib/index.js\n var require_lib26 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+wallet@5.8.0/node_modules/@ethersproject/wallet/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyTypedData = exports3.verifyMessage = exports3.Wallet = void 0;\n var address_1 = require_lib7();\n var abstract_provider_1 = require_lib14();\n var abstract_signer_1 = require_lib15();\n var bytes_1 = require_lib2();\n var hash_1 = require_lib12();\n var hdnode_1 = require_lib23();\n var keccak256_1 = require_lib5();\n var properties_1 = require_lib4();\n var random_1 = require_lib24();\n var signing_key_1 = require_lib16();\n var json_wallets_1 = require_lib25();\n var transactions_1 = require_lib17();\n var logger_1 = require_lib();\n var _version_1 = require_version20();\n var logger = new logger_1.Logger(_version_1.version);\n function isAccount(value) {\n return value != null && (0, bytes_1.isHexString)(value.privateKey, 32) && value.address != null;\n }\n function hasMnemonic(value) {\n var mnemonic = value.mnemonic;\n return mnemonic && mnemonic.phrase;\n }\n var Wallet = (\n /** @class */\n function(_super) {\n __extends4(Wallet2, _super);\n function Wallet2(privateKey, provider) {\n var _this = _super.call(this) || this;\n if (isAccount(privateKey)) {\n var signingKey_1 = new signing_key_1.SigningKey(privateKey.privateKey);\n (0, properties_1.defineReadOnly)(_this, \"_signingKey\", function() {\n return signingKey_1;\n });\n (0, properties_1.defineReadOnly)(_this, \"address\", (0, transactions_1.computeAddress)(_this.publicKey));\n if (_this.address !== (0, address_1.getAddress)(privateKey.address)) {\n logger.throwArgumentError(\"privateKey/address mismatch\", \"privateKey\", \"[REDACTED]\");\n }\n if (hasMnemonic(privateKey)) {\n var srcMnemonic_1 = privateKey.mnemonic;\n (0, properties_1.defineReadOnly)(_this, \"_mnemonic\", function() {\n return {\n phrase: srcMnemonic_1.phrase,\n path: srcMnemonic_1.path || hdnode_1.defaultPath,\n locale: srcMnemonic_1.locale || \"en\"\n };\n });\n var mnemonic = _this.mnemonic;\n var node = hdnode_1.HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path);\n if ((0, transactions_1.computeAddress)(node.privateKey) !== _this.address) {\n logger.throwArgumentError(\"mnemonic/address mismatch\", \"privateKey\", \"[REDACTED]\");\n }\n } else {\n (0, properties_1.defineReadOnly)(_this, \"_mnemonic\", function() {\n return null;\n });\n }\n } else {\n if (signing_key_1.SigningKey.isSigningKey(privateKey)) {\n if (privateKey.curve !== \"secp256k1\") {\n logger.throwArgumentError(\"unsupported curve; must be secp256k1\", \"privateKey\", \"[REDACTED]\");\n }\n (0, properties_1.defineReadOnly)(_this, \"_signingKey\", function() {\n return privateKey;\n });\n } else {\n if (typeof privateKey === \"string\") {\n if (privateKey.match(/^[0-9a-f]*$/i) && privateKey.length === 64) {\n privateKey = \"0x\" + privateKey;\n }\n }\n var signingKey_2 = new signing_key_1.SigningKey(privateKey);\n (0, properties_1.defineReadOnly)(_this, \"_signingKey\", function() {\n return signingKey_2;\n });\n }\n (0, properties_1.defineReadOnly)(_this, \"_mnemonic\", function() {\n return null;\n });\n (0, properties_1.defineReadOnly)(_this, \"address\", (0, transactions_1.computeAddress)(_this.publicKey));\n }\n if (provider && !abstract_provider_1.Provider.isProvider(provider)) {\n logger.throwArgumentError(\"invalid provider\", \"provider\", provider);\n }\n (0, properties_1.defineReadOnly)(_this, \"provider\", provider || null);\n return _this;\n }\n Object.defineProperty(Wallet2.prototype, \"mnemonic\", {\n get: function() {\n return this._mnemonic();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Wallet2.prototype, \"privateKey\", {\n get: function() {\n return this._signingKey().privateKey;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Wallet2.prototype, \"publicKey\", {\n get: function() {\n return this._signingKey().publicKey;\n },\n enumerable: false,\n configurable: true\n });\n Wallet2.prototype.getAddress = function() {\n return Promise.resolve(this.address);\n };\n Wallet2.prototype.connect = function(provider) {\n return new Wallet2(this, provider);\n };\n Wallet2.prototype.signTransaction = function(transaction) {\n var _this = this;\n return (0, properties_1.resolveProperties)(transaction).then(function(tx) {\n if (tx.from != null) {\n if ((0, address_1.getAddress)(tx.from) !== _this.address) {\n logger.throwArgumentError(\"transaction from address mismatch\", \"transaction.from\", transaction.from);\n }\n delete tx.from;\n }\n var signature = _this._signingKey().signDigest((0, keccak256_1.keccak256)((0, transactions_1.serialize)(tx)));\n return (0, transactions_1.serialize)(tx, signature);\n });\n };\n Wallet2.prototype.signMessage = function(message2) {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n return [2, (0, bytes_1.joinSignature)(this._signingKey().signDigest((0, hash_1.hashMessage)(message2)))];\n });\n });\n };\n Wallet2.prototype._signTypedData = function(domain2, types2, value) {\n return __awaiter4(this, void 0, void 0, function() {\n var populated;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, hash_1._TypedDataEncoder.resolveNames(domain2, types2, value, function(name) {\n if (_this.provider == null) {\n logger.throwError(\"cannot resolve ENS names without a provider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\",\n value: name\n });\n }\n return _this.provider.resolveName(name);\n })];\n case 1:\n populated = _a.sent();\n return [2, (0, bytes_1.joinSignature)(this._signingKey().signDigest(hash_1._TypedDataEncoder.hash(populated.domain, types2, populated.value)))];\n }\n });\n });\n };\n Wallet2.prototype.encrypt = function(password, options, progressCallback) {\n if (typeof options === \"function\" && !progressCallback) {\n progressCallback = options;\n options = {};\n }\n if (progressCallback && typeof progressCallback !== \"function\") {\n throw new Error(\"invalid callback\");\n }\n if (!options) {\n options = {};\n }\n return (0, json_wallets_1.encryptKeystore)(this, password, options, progressCallback);\n };\n Wallet2.createRandom = function(options) {\n var entropy = (0, random_1.randomBytes)(16);\n if (!options) {\n options = {};\n }\n if (options.extraEntropy) {\n entropy = (0, bytes_1.arrayify)((0, bytes_1.hexDataSlice)((0, keccak256_1.keccak256)((0, bytes_1.concat)([entropy, options.extraEntropy])), 0, 16));\n }\n var mnemonic = (0, hdnode_1.entropyToMnemonic)(entropy, options.locale);\n return Wallet2.fromMnemonic(mnemonic, options.path, options.locale);\n };\n Wallet2.fromEncryptedJson = function(json, password, progressCallback) {\n return (0, json_wallets_1.decryptJsonWallet)(json, password, progressCallback).then(function(account) {\n return new Wallet2(account);\n });\n };\n Wallet2.fromEncryptedJsonSync = function(json, password) {\n return new Wallet2((0, json_wallets_1.decryptJsonWalletSync)(json, password));\n };\n Wallet2.fromMnemonic = function(mnemonic, path, wordlist) {\n if (!path) {\n path = hdnode_1.defaultPath;\n }\n return new Wallet2(hdnode_1.HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(path));\n };\n return Wallet2;\n }(abstract_signer_1.Signer)\n );\n exports3.Wallet = Wallet;\n function verifyMessage2(message2, signature) {\n return (0, transactions_1.recoverAddress)((0, hash_1.hashMessage)(message2), signature);\n }\n exports3.verifyMessage = verifyMessage2;\n function verifyTypedData2(domain2, types2, value, signature) {\n return (0, transactions_1.recoverAddress)(hash_1._TypedDataEncoder.hash(domain2, types2, value), signature);\n }\n exports3.verifyTypedData = verifyTypedData2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+networks@5.8.0/node_modules/@ethersproject/networks/lib/_version.js\n var require_version21 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+networks@5.8.0/node_modules/@ethersproject/networks/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"networks/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+networks@5.8.0/node_modules/@ethersproject/networks/lib/index.js\n var require_lib27 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+networks@5.8.0/node_modules/@ethersproject/networks/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getNetwork = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version21();\n var logger = new logger_1.Logger(_version_1.version);\n function isRenetworkable(value) {\n return value && typeof value.renetwork === \"function\";\n }\n function ethDefaultProvider(network) {\n var func = function(providers, options) {\n if (options == null) {\n options = {};\n }\n var providerList = [];\n if (providers.InfuraProvider && options.infura !== \"-\") {\n try {\n providerList.push(new providers.InfuraProvider(network, options.infura));\n } catch (error) {\n }\n }\n if (providers.EtherscanProvider && options.etherscan !== \"-\") {\n try {\n providerList.push(new providers.EtherscanProvider(network, options.etherscan));\n } catch (error) {\n }\n }\n if (providers.AlchemyProvider && options.alchemy !== \"-\") {\n try {\n providerList.push(new providers.AlchemyProvider(network, options.alchemy));\n } catch (error) {\n }\n }\n if (providers.PocketProvider && options.pocket !== \"-\") {\n var skip = [\"goerli\", \"ropsten\", \"rinkeby\", \"sepolia\"];\n try {\n var provider = new providers.PocketProvider(network, options.pocket);\n if (provider.network && skip.indexOf(provider.network.name) === -1) {\n providerList.push(provider);\n }\n } catch (error) {\n }\n }\n if (providers.CloudflareProvider && options.cloudflare !== \"-\") {\n try {\n providerList.push(new providers.CloudflareProvider(network));\n } catch (error) {\n }\n }\n if (providers.AnkrProvider && options.ankr !== \"-\") {\n try {\n var skip = [\"ropsten\"];\n var provider = new providers.AnkrProvider(network, options.ankr);\n if (provider.network && skip.indexOf(provider.network.name) === -1) {\n providerList.push(provider);\n }\n } catch (error) {\n }\n }\n if (providers.QuickNodeProvider && options.quicknode !== \"-\") {\n try {\n providerList.push(new providers.QuickNodeProvider(network, options.quicknode));\n } catch (error) {\n }\n }\n if (providerList.length === 0) {\n return null;\n }\n if (providers.FallbackProvider) {\n var quorum = 1;\n if (options.quorum != null) {\n quorum = options.quorum;\n } else if (network === \"homestead\") {\n quorum = 2;\n }\n return new providers.FallbackProvider(providerList, quorum);\n }\n return providerList[0];\n };\n func.renetwork = function(network2) {\n return ethDefaultProvider(network2);\n };\n return func;\n }\n function etcDefaultProvider(url, network) {\n var func = function(providers, options) {\n if (providers.JsonRpcProvider) {\n return new providers.JsonRpcProvider(url, network);\n }\n return null;\n };\n func.renetwork = function(network2) {\n return etcDefaultProvider(url, network2);\n };\n return func;\n }\n var homestead = {\n chainId: 1,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"homestead\",\n _defaultProvider: ethDefaultProvider(\"homestead\")\n };\n var ropsten = {\n chainId: 3,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"ropsten\",\n _defaultProvider: ethDefaultProvider(\"ropsten\")\n };\n var classicMordor = {\n chainId: 63,\n name: \"classicMordor\",\n _defaultProvider: etcDefaultProvider(\"https://www.ethercluster.com/mordor\", \"classicMordor\")\n };\n var networks = {\n unspecified: { chainId: 0, name: \"unspecified\" },\n homestead,\n mainnet: homestead,\n morden: { chainId: 2, name: \"morden\" },\n ropsten,\n testnet: ropsten,\n rinkeby: {\n chainId: 4,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"rinkeby\",\n _defaultProvider: ethDefaultProvider(\"rinkeby\")\n },\n kovan: {\n chainId: 42,\n name: \"kovan\",\n _defaultProvider: ethDefaultProvider(\"kovan\")\n },\n goerli: {\n chainId: 5,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"goerli\",\n _defaultProvider: ethDefaultProvider(\"goerli\")\n },\n kintsugi: { chainId: 1337702, name: \"kintsugi\" },\n sepolia: {\n chainId: 11155111,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"sepolia\",\n _defaultProvider: ethDefaultProvider(\"sepolia\")\n },\n holesky: {\n chainId: 17e3,\n name: \"holesky\",\n _defaultProvider: ethDefaultProvider(\"holesky\")\n },\n // ETC (See: #351)\n classic: {\n chainId: 61,\n name: \"classic\",\n _defaultProvider: etcDefaultProvider(\"https://www.ethercluster.com/etc\", \"classic\")\n },\n classicMorden: { chainId: 62, name: \"classicMorden\" },\n classicMordor,\n classicTestnet: classicMordor,\n classicKotti: {\n chainId: 6,\n name: \"classicKotti\",\n _defaultProvider: etcDefaultProvider(\"https://www.ethercluster.com/kotti\", \"classicKotti\")\n },\n xdai: { chainId: 100, name: \"xdai\" },\n matic: {\n chainId: 137,\n name: \"matic\",\n _defaultProvider: ethDefaultProvider(\"matic\")\n },\n maticmum: {\n chainId: 80001,\n name: \"maticmum\",\n _defaultProvider: ethDefaultProvider(\"maticmum\")\n },\n optimism: {\n chainId: 10,\n name: \"optimism\",\n _defaultProvider: ethDefaultProvider(\"optimism\")\n },\n \"optimism-kovan\": { chainId: 69, name: \"optimism-kovan\" },\n \"optimism-goerli\": { chainId: 420, name: \"optimism-goerli\" },\n \"optimism-sepolia\": { chainId: 11155420, name: \"optimism-sepolia\" },\n arbitrum: { chainId: 42161, name: \"arbitrum\" },\n \"arbitrum-rinkeby\": { chainId: 421611, name: \"arbitrum-rinkeby\" },\n \"arbitrum-goerli\": { chainId: 421613, name: \"arbitrum-goerli\" },\n \"arbitrum-sepolia\": { chainId: 421614, name: \"arbitrum-sepolia\" },\n bnb: { chainId: 56, name: \"bnb\" },\n bnbt: { chainId: 97, name: \"bnbt\" }\n };\n function getNetwork(network) {\n if (network == null) {\n return null;\n }\n if (typeof network === \"number\") {\n for (var name_1 in networks) {\n var standard_1 = networks[name_1];\n if (standard_1.chainId === network) {\n return {\n name: standard_1.name,\n chainId: standard_1.chainId,\n ensAddress: standard_1.ensAddress || null,\n _defaultProvider: standard_1._defaultProvider || null\n };\n }\n }\n return {\n chainId: network,\n name: \"unknown\"\n };\n }\n if (typeof network === \"string\") {\n var standard_2 = networks[network];\n if (standard_2 == null) {\n return null;\n }\n return {\n name: standard_2.name,\n chainId: standard_2.chainId,\n ensAddress: standard_2.ensAddress,\n _defaultProvider: standard_2._defaultProvider || null\n };\n }\n var standard = networks[network.name];\n if (!standard) {\n if (typeof network.chainId !== \"number\") {\n logger.throwArgumentError(\"invalid network chainId\", \"network\", network);\n }\n return network;\n }\n if (network.chainId !== 0 && network.chainId !== standard.chainId) {\n logger.throwArgumentError(\"network chainId mismatch\", \"network\", network);\n }\n var defaultProvider = network._defaultProvider || null;\n if (defaultProvider == null && standard._defaultProvider) {\n if (isRenetworkable(standard._defaultProvider)) {\n defaultProvider = standard._defaultProvider.renetwork(network);\n } else {\n defaultProvider = standard._defaultProvider;\n }\n }\n return {\n name: network.name,\n chainId: standard.chainId,\n ensAddress: network.ensAddress || standard.ensAddress || null,\n _defaultProvider: defaultProvider\n };\n }\n exports3.getNetwork = getNetwork;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/_version.js\n var require_version22 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"web/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/browser-geturl.js\n var require_browser_geturl = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/browser-geturl.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getUrl = void 0;\n var bytes_1 = require_lib2();\n function getUrl2(href, options) {\n return __awaiter4(this, void 0, void 0, function() {\n var request, opts, response, body, headers;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (options == null) {\n options = {};\n }\n request = {\n method: options.method || \"GET\",\n headers: options.headers || {},\n body: options.body || void 0\n };\n if (options.skipFetchSetup !== true) {\n request.mode = \"cors\";\n request.cache = \"no-cache\";\n request.credentials = \"same-origin\";\n request.redirect = \"follow\";\n request.referrer = \"client\";\n }\n ;\n if (options.fetchOptions != null) {\n opts = options.fetchOptions;\n if (opts.mode) {\n request.mode = opts.mode;\n }\n if (opts.cache) {\n request.cache = opts.cache;\n }\n if (opts.credentials) {\n request.credentials = opts.credentials;\n }\n if (opts.redirect) {\n request.redirect = opts.redirect;\n }\n if (opts.referrer) {\n request.referrer = opts.referrer;\n }\n }\n return [4, fetch(href, request)];\n case 1:\n response = _a.sent();\n return [4, response.arrayBuffer()];\n case 2:\n body = _a.sent();\n headers = {};\n if (response.headers.forEach) {\n response.headers.forEach(function(value, key) {\n headers[key.toLowerCase()] = value;\n });\n } else {\n response.headers.keys().forEach(function(key) {\n headers[key.toLowerCase()] = response.headers.get(key);\n });\n }\n return [2, {\n headers,\n statusCode: response.status,\n statusMessage: response.statusText,\n body: (0, bytes_1.arrayify)(new Uint8Array(body))\n }];\n }\n });\n });\n }\n exports3.getUrl = getUrl2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/index.js\n var require_lib28 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+web@5.8.0/node_modules/@ethersproject/web/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.poll = exports3.fetchJson = exports3._fetchData = void 0;\n var base64_1 = require_lib10();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var strings_1 = require_lib9();\n var logger_1 = require_lib();\n var _version_1 = require_version22();\n var logger = new logger_1.Logger(_version_1.version);\n var geturl_1 = require_browser_geturl();\n function staller(duration) {\n return new Promise(function(resolve) {\n setTimeout(resolve, duration);\n });\n }\n function bodyify(value, type) {\n if (value == null) {\n return null;\n }\n if (typeof value === \"string\") {\n return value;\n }\n if ((0, bytes_1.isBytesLike)(value)) {\n if (type && (type.split(\"/\")[0] === \"text\" || type.split(\";\")[0].trim() === \"application/json\")) {\n try {\n return (0, strings_1.toUtf8String)(value);\n } catch (error) {\n }\n ;\n }\n return (0, bytes_1.hexlify)(value);\n }\n return value;\n }\n function unpercent(value) {\n return (0, strings_1.toUtf8Bytes)(value.replace(/%([0-9a-f][0-9a-f])/gi, function(all, code) {\n return String.fromCharCode(parseInt(code, 16));\n }));\n }\n function _fetchData(connection, body, processFunc) {\n var attemptLimit = typeof connection === \"object\" && connection.throttleLimit != null ? connection.throttleLimit : 12;\n logger.assertArgument(attemptLimit > 0 && attemptLimit % 1 === 0, \"invalid connection throttle limit\", \"connection.throttleLimit\", attemptLimit);\n var throttleCallback = typeof connection === \"object\" ? connection.throttleCallback : null;\n var throttleSlotInterval = typeof connection === \"object\" && typeof connection.throttleSlotInterval === \"number\" ? connection.throttleSlotInterval : 100;\n logger.assertArgument(throttleSlotInterval > 0 && throttleSlotInterval % 1 === 0, \"invalid connection throttle slot interval\", \"connection.throttleSlotInterval\", throttleSlotInterval);\n var errorPassThrough = typeof connection === \"object\" ? !!connection.errorPassThrough : false;\n var headers = {};\n var url = null;\n var options = {\n method: \"GET\"\n };\n var allow304 = false;\n var timeout = 2 * 60 * 1e3;\n if (typeof connection === \"string\") {\n url = connection;\n } else if (typeof connection === \"object\") {\n if (connection == null || connection.url == null) {\n logger.throwArgumentError(\"missing URL\", \"connection.url\", connection);\n }\n url = connection.url;\n if (typeof connection.timeout === \"number\" && connection.timeout > 0) {\n timeout = connection.timeout;\n }\n if (connection.headers) {\n for (var key in connection.headers) {\n headers[key.toLowerCase()] = { key, value: String(connection.headers[key]) };\n if ([\"if-none-match\", \"if-modified-since\"].indexOf(key.toLowerCase()) >= 0) {\n allow304 = true;\n }\n }\n }\n options.allowGzip = !!connection.allowGzip;\n if (connection.user != null && connection.password != null) {\n if (url.substring(0, 6) !== \"https:\" && connection.allowInsecureAuthentication !== true) {\n logger.throwError(\"basic authentication requires a secure https url\", logger_1.Logger.errors.INVALID_ARGUMENT, { argument: \"url\", url, user: connection.user, password: \"[REDACTED]\" });\n }\n var authorization = connection.user + \":\" + connection.password;\n headers[\"authorization\"] = {\n key: \"Authorization\",\n value: \"Basic \" + (0, base64_1.encode)((0, strings_1.toUtf8Bytes)(authorization))\n };\n }\n if (connection.skipFetchSetup != null) {\n options.skipFetchSetup = !!connection.skipFetchSetup;\n }\n if (connection.fetchOptions != null) {\n options.fetchOptions = (0, properties_1.shallowCopy)(connection.fetchOptions);\n }\n }\n var reData = new RegExp(\"^data:([^;:]*)?(;base64)?,(.*)$\", \"i\");\n var dataMatch = url ? url.match(reData) : null;\n if (dataMatch) {\n try {\n var response = {\n statusCode: 200,\n statusMessage: \"OK\",\n headers: { \"content-type\": dataMatch[1] || \"text/plain\" },\n body: dataMatch[2] ? (0, base64_1.decode)(dataMatch[3]) : unpercent(dataMatch[3])\n };\n var result = response.body;\n if (processFunc) {\n result = processFunc(response.body, response);\n }\n return Promise.resolve(result);\n } catch (error) {\n logger.throwError(\"processing response error\", logger_1.Logger.errors.SERVER_ERROR, {\n body: bodyify(dataMatch[1], dataMatch[2]),\n error,\n requestBody: null,\n requestMethod: \"GET\",\n url\n });\n }\n }\n if (body) {\n options.method = \"POST\";\n options.body = body;\n if (headers[\"content-type\"] == null) {\n headers[\"content-type\"] = { key: \"Content-Type\", value: \"application/octet-stream\" };\n }\n if (headers[\"content-length\"] == null) {\n headers[\"content-length\"] = { key: \"Content-Length\", value: String(body.length) };\n }\n }\n var flatHeaders = {};\n Object.keys(headers).forEach(function(key2) {\n var header = headers[key2];\n flatHeaders[header.key] = header.value;\n });\n options.headers = flatHeaders;\n var runningTimeout = function() {\n var timer = null;\n var promise = new Promise(function(resolve, reject) {\n if (timeout) {\n timer = setTimeout(function() {\n if (timer == null) {\n return;\n }\n timer = null;\n reject(logger.makeError(\"timeout\", logger_1.Logger.errors.TIMEOUT, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n timeout,\n url\n }));\n }, timeout);\n }\n });\n var cancel = function() {\n if (timer == null) {\n return;\n }\n clearTimeout(timer);\n timer = null;\n };\n return { promise, cancel };\n }();\n var runningFetch = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var attempt, response2, location_1, tryAgain, stall, retryAfter, error_1, body_1, result2, error_2, tryAgain, timeout_1;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n attempt = 0;\n _a.label = 1;\n case 1:\n if (!(attempt < attemptLimit))\n return [3, 20];\n response2 = null;\n _a.label = 2;\n case 2:\n _a.trys.push([2, 9, , 10]);\n return [4, (0, geturl_1.getUrl)(url, options)];\n case 3:\n response2 = _a.sent();\n if (!(attempt < attemptLimit))\n return [3, 8];\n if (!(response2.statusCode === 301 || response2.statusCode === 302))\n return [3, 4];\n location_1 = response2.headers.location || \"\";\n if (options.method === \"GET\" && location_1.match(/^https:/)) {\n url = response2.headers.location;\n return [3, 19];\n }\n return [3, 8];\n case 4:\n if (!(response2.statusCode === 429))\n return [3, 8];\n tryAgain = true;\n if (!throttleCallback)\n return [3, 6];\n return [4, throttleCallback(attempt, url)];\n case 5:\n tryAgain = _a.sent();\n _a.label = 6;\n case 6:\n if (!tryAgain)\n return [3, 8];\n stall = 0;\n retryAfter = response2.headers[\"retry-after\"];\n if (typeof retryAfter === \"string\" && retryAfter.match(/^[1-9][0-9]*$/)) {\n stall = parseInt(retryAfter) * 1e3;\n } else {\n stall = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n }\n return [4, staller(stall)];\n case 7:\n _a.sent();\n return [3, 19];\n case 8:\n return [3, 10];\n case 9:\n error_1 = _a.sent();\n response2 = error_1.response;\n if (response2 == null) {\n runningTimeout.cancel();\n logger.throwError(\"missing response\", logger_1.Logger.errors.SERVER_ERROR, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n serverError: error_1,\n url\n });\n }\n return [3, 10];\n case 10:\n body_1 = response2.body;\n if (allow304 && response2.statusCode === 304) {\n body_1 = null;\n } else if (!errorPassThrough && (response2.statusCode < 200 || response2.statusCode >= 300)) {\n runningTimeout.cancel();\n logger.throwError(\"bad response\", logger_1.Logger.errors.SERVER_ERROR, {\n status: response2.statusCode,\n headers: response2.headers,\n body: bodyify(body_1, response2.headers ? response2.headers[\"content-type\"] : null),\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url\n });\n }\n if (!processFunc)\n return [3, 18];\n _a.label = 11;\n case 11:\n _a.trys.push([11, 13, , 18]);\n return [4, processFunc(body_1, response2)];\n case 12:\n result2 = _a.sent();\n runningTimeout.cancel();\n return [2, result2];\n case 13:\n error_2 = _a.sent();\n if (!(error_2.throttleRetry && attempt < attemptLimit))\n return [3, 17];\n tryAgain = true;\n if (!throttleCallback)\n return [3, 15];\n return [4, throttleCallback(attempt, url)];\n case 14:\n tryAgain = _a.sent();\n _a.label = 15;\n case 15:\n if (!tryAgain)\n return [3, 17];\n timeout_1 = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n return [4, staller(timeout_1)];\n case 16:\n _a.sent();\n return [3, 19];\n case 17:\n runningTimeout.cancel();\n logger.throwError(\"processing response error\", logger_1.Logger.errors.SERVER_ERROR, {\n body: bodyify(body_1, response2.headers ? response2.headers[\"content-type\"] : null),\n error: error_2,\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url\n });\n return [3, 18];\n case 18:\n runningTimeout.cancel();\n return [2, body_1];\n case 19:\n attempt++;\n return [3, 1];\n case 20:\n return [2, logger.throwError(\"failed response\", logger_1.Logger.errors.SERVER_ERROR, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url\n })];\n }\n });\n });\n }();\n return Promise.race([runningTimeout.promise, runningFetch]);\n }\n exports3._fetchData = _fetchData;\n function fetchJson(connection, json, processFunc) {\n var processJsonFunc = function(value, response) {\n var result = null;\n if (value != null) {\n try {\n result = JSON.parse((0, strings_1.toUtf8String)(value));\n } catch (error) {\n logger.throwError(\"invalid JSON\", logger_1.Logger.errors.SERVER_ERROR, {\n body: value,\n error\n });\n }\n }\n if (processFunc) {\n result = processFunc(result, response);\n }\n return result;\n };\n var body = null;\n if (json != null) {\n body = (0, strings_1.toUtf8Bytes)(json);\n var updated = typeof connection === \"string\" ? { url: connection } : (0, properties_1.shallowCopy)(connection);\n if (updated.headers) {\n var hasContentType = Object.keys(updated.headers).filter(function(k4) {\n return k4.toLowerCase() === \"content-type\";\n }).length !== 0;\n if (!hasContentType) {\n updated.headers = (0, properties_1.shallowCopy)(updated.headers);\n updated.headers[\"content-type\"] = \"application/json\";\n }\n } else {\n updated.headers = { \"content-type\": \"application/json\" };\n }\n connection = updated;\n }\n return _fetchData(connection, body, processJsonFunc);\n }\n exports3.fetchJson = fetchJson;\n function poll2(func, options) {\n if (!options) {\n options = {};\n }\n options = (0, properties_1.shallowCopy)(options);\n if (options.floor == null) {\n options.floor = 0;\n }\n if (options.ceiling == null) {\n options.ceiling = 1e4;\n }\n if (options.interval == null) {\n options.interval = 250;\n }\n return new Promise(function(resolve, reject) {\n var timer = null;\n var done = false;\n var cancel = function() {\n if (done) {\n return false;\n }\n done = true;\n if (timer) {\n clearTimeout(timer);\n }\n return true;\n };\n if (options.timeout) {\n timer = setTimeout(function() {\n if (cancel()) {\n reject(new Error(\"timeout\"));\n }\n }, options.timeout);\n }\n var retryLimit = options.retryLimit;\n var attempt = 0;\n function check2() {\n return func().then(function(result) {\n if (result !== void 0) {\n if (cancel()) {\n resolve(result);\n }\n } else if (options.oncePoll) {\n options.oncePoll.once(\"poll\", check2);\n } else if (options.onceBlock) {\n options.onceBlock.once(\"block\", check2);\n } else if (!done) {\n attempt++;\n if (attempt > retryLimit) {\n if (cancel()) {\n reject(new Error(\"retry limit reached\"));\n }\n return;\n }\n var timeout = options.interval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n if (timeout < options.floor) {\n timeout = options.floor;\n }\n if (timeout > options.ceiling) {\n timeout = options.ceiling;\n }\n setTimeout(check2, timeout);\n }\n return null;\n }, function(error) {\n if (cancel()) {\n reject(error);\n }\n });\n }\n check2();\n });\n }\n exports3.poll = poll2;\n }\n });\n\n // ../../../node_modules/.pnpm/bech32@1.1.4/node_modules/bech32/index.js\n var require_bech32 = __commonJS({\n \"../../../node_modules/.pnpm/bech32@1.1.4/node_modules/bech32/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var ALPHABET = \"qpzry9x8gf2tvdw0s3jn54khce6mua7l\";\n var ALPHABET_MAP = {};\n for (z2 = 0; z2 < ALPHABET.length; z2++) {\n x4 = ALPHABET.charAt(z2);\n if (ALPHABET_MAP[x4] !== void 0)\n throw new TypeError(x4 + \" is ambiguous\");\n ALPHABET_MAP[x4] = z2;\n }\n var x4;\n var z2;\n function polymodStep(pre) {\n var b4 = pre >> 25;\n return (pre & 33554431) << 5 ^ -(b4 >> 0 & 1) & 996825010 ^ -(b4 >> 1 & 1) & 642813549 ^ -(b4 >> 2 & 1) & 513874426 ^ -(b4 >> 3 & 1) & 1027748829 ^ -(b4 >> 4 & 1) & 705979059;\n }\n function prefixChk(prefix) {\n var chk = 1;\n for (var i3 = 0; i3 < prefix.length; ++i3) {\n var c4 = prefix.charCodeAt(i3);\n if (c4 < 33 || c4 > 126)\n return \"Invalid prefix (\" + prefix + \")\";\n chk = polymodStep(chk) ^ c4 >> 5;\n }\n chk = polymodStep(chk);\n for (i3 = 0; i3 < prefix.length; ++i3) {\n var v2 = prefix.charCodeAt(i3);\n chk = polymodStep(chk) ^ v2 & 31;\n }\n return chk;\n }\n function encode7(prefix, words, LIMIT) {\n LIMIT = LIMIT || 90;\n if (prefix.length + 7 + words.length > LIMIT)\n throw new TypeError(\"Exceeds length limit\");\n prefix = prefix.toLowerCase();\n var chk = prefixChk(prefix);\n if (typeof chk === \"string\")\n throw new Error(chk);\n var result = prefix + \"1\";\n for (var i3 = 0; i3 < words.length; ++i3) {\n var x5 = words[i3];\n if (x5 >> 5 !== 0)\n throw new Error(\"Non 5-bit word\");\n chk = polymodStep(chk) ^ x5;\n result += ALPHABET.charAt(x5);\n }\n for (i3 = 0; i3 < 6; ++i3) {\n chk = polymodStep(chk);\n }\n chk ^= 1;\n for (i3 = 0; i3 < 6; ++i3) {\n var v2 = chk >> (5 - i3) * 5 & 31;\n result += ALPHABET.charAt(v2);\n }\n return result;\n }\n function __decode(str, LIMIT) {\n LIMIT = LIMIT || 90;\n if (str.length < 8)\n return str + \" too short\";\n if (str.length > LIMIT)\n return \"Exceeds length limit\";\n var lowered = str.toLowerCase();\n var uppered = str.toUpperCase();\n if (str !== lowered && str !== uppered)\n return \"Mixed-case string \" + str;\n str = lowered;\n var split3 = str.lastIndexOf(\"1\");\n if (split3 === -1)\n return \"No separator character for \" + str;\n if (split3 === 0)\n return \"Missing prefix for \" + str;\n var prefix = str.slice(0, split3);\n var wordChars = str.slice(split3 + 1);\n if (wordChars.length < 6)\n return \"Data too short\";\n var chk = prefixChk(prefix);\n if (typeof chk === \"string\")\n return chk;\n var words = [];\n for (var i3 = 0; i3 < wordChars.length; ++i3) {\n var c4 = wordChars.charAt(i3);\n var v2 = ALPHABET_MAP[c4];\n if (v2 === void 0)\n return \"Unknown character \" + c4;\n chk = polymodStep(chk) ^ v2;\n if (i3 + 6 >= wordChars.length)\n continue;\n words.push(v2);\n }\n if (chk !== 1)\n return \"Invalid checksum for \" + str;\n return { prefix, words };\n }\n function decodeUnsafe() {\n var res = __decode.apply(null, arguments);\n if (typeof res === \"object\")\n return res;\n }\n function decode4(str) {\n var res = __decode.apply(null, arguments);\n if (typeof res === \"object\")\n return res;\n throw new Error(res);\n }\n function convert(data, inBits, outBits, pad6) {\n var value = 0;\n var bits = 0;\n var maxV = (1 << outBits) - 1;\n var result = [];\n for (var i3 = 0; i3 < data.length; ++i3) {\n value = value << inBits | data[i3];\n bits += inBits;\n while (bits >= outBits) {\n bits -= outBits;\n result.push(value >> bits & maxV);\n }\n }\n if (pad6) {\n if (bits > 0) {\n result.push(value << outBits - bits & maxV);\n }\n } else {\n if (bits >= inBits)\n return \"Excess padding\";\n if (value << outBits - bits & maxV)\n return \"Non-zero padding\";\n }\n return result;\n }\n function toWordsUnsafe(bytes) {\n var res = convert(bytes, 8, 5, true);\n if (Array.isArray(res))\n return res;\n }\n function toWords(bytes) {\n var res = convert(bytes, 8, 5, true);\n if (Array.isArray(res))\n return res;\n throw new Error(res);\n }\n function fromWordsUnsafe(words) {\n var res = convert(words, 5, 8, false);\n if (Array.isArray(res))\n return res;\n }\n function fromWords(words) {\n var res = convert(words, 5, 8, false);\n if (Array.isArray(res))\n return res;\n throw new Error(res);\n }\n module.exports = {\n decodeUnsafe,\n decode: decode4,\n encode: encode7,\n toWordsUnsafe,\n toWords,\n fromWordsUnsafe,\n fromWords\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/_version.js\n var require_version23 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"providers/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/formatter.js\n var require_formatter = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/formatter.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.showThrottleMessage = exports3.isCommunityResource = exports3.isCommunityResourcable = exports3.Formatter = void 0;\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var constants_1 = require_lib8();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var Formatter = (\n /** @class */\n function() {\n function Formatter2() {\n this.formats = this.getDefaultFormats();\n }\n Formatter2.prototype.getDefaultFormats = function() {\n var _this = this;\n var formats = {};\n var address = this.address.bind(this);\n var bigNumber = this.bigNumber.bind(this);\n var blockTag = this.blockTag.bind(this);\n var data = this.data.bind(this);\n var hash3 = this.hash.bind(this);\n var hex = this.hex.bind(this);\n var number = this.number.bind(this);\n var type = this.type.bind(this);\n var strictData = function(v2) {\n return _this.data(v2, true);\n };\n formats.transaction = {\n hash: hash3,\n type,\n accessList: Formatter2.allowNull(this.accessList.bind(this), null),\n blockHash: Formatter2.allowNull(hash3, null),\n blockNumber: Formatter2.allowNull(number, null),\n transactionIndex: Formatter2.allowNull(number, null),\n confirmations: Formatter2.allowNull(number, null),\n from: address,\n // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas)\n // must be set\n gasPrice: Formatter2.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter2.allowNull(bigNumber),\n maxFeePerGas: Formatter2.allowNull(bigNumber),\n gasLimit: bigNumber,\n to: Formatter2.allowNull(address, null),\n value: bigNumber,\n nonce: number,\n data,\n r: Formatter2.allowNull(this.uint256),\n s: Formatter2.allowNull(this.uint256),\n v: Formatter2.allowNull(number),\n creates: Formatter2.allowNull(address, null),\n raw: Formatter2.allowNull(data)\n };\n formats.transactionRequest = {\n from: Formatter2.allowNull(address),\n nonce: Formatter2.allowNull(number),\n gasLimit: Formatter2.allowNull(bigNumber),\n gasPrice: Formatter2.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter2.allowNull(bigNumber),\n maxFeePerGas: Formatter2.allowNull(bigNumber),\n to: Formatter2.allowNull(address),\n value: Formatter2.allowNull(bigNumber),\n data: Formatter2.allowNull(strictData),\n type: Formatter2.allowNull(number),\n accessList: Formatter2.allowNull(this.accessList.bind(this), null)\n };\n formats.receiptLog = {\n transactionIndex: number,\n blockNumber: number,\n transactionHash: hash3,\n address,\n topics: Formatter2.arrayOf(hash3),\n data,\n logIndex: number,\n blockHash: hash3\n };\n formats.receipt = {\n to: Formatter2.allowNull(this.address, null),\n from: Formatter2.allowNull(this.address, null),\n contractAddress: Formatter2.allowNull(address, null),\n transactionIndex: number,\n // should be allowNull(hash), but broken-EIP-658 support is handled in receipt\n root: Formatter2.allowNull(hex),\n gasUsed: bigNumber,\n logsBloom: Formatter2.allowNull(data),\n blockHash: hash3,\n transactionHash: hash3,\n logs: Formatter2.arrayOf(this.receiptLog.bind(this)),\n blockNumber: number,\n confirmations: Formatter2.allowNull(number, null),\n cumulativeGasUsed: bigNumber,\n effectiveGasPrice: Formatter2.allowNull(bigNumber),\n status: Formatter2.allowNull(number),\n type\n };\n formats.block = {\n hash: Formatter2.allowNull(hash3),\n parentHash: hash3,\n number,\n timestamp: number,\n nonce: Formatter2.allowNull(hex),\n difficulty: this.difficulty.bind(this),\n gasLimit: bigNumber,\n gasUsed: bigNumber,\n miner: Formatter2.allowNull(address),\n extraData: data,\n transactions: Formatter2.allowNull(Formatter2.arrayOf(hash3)),\n baseFeePerGas: Formatter2.allowNull(bigNumber)\n };\n formats.blockWithTransactions = (0, properties_1.shallowCopy)(formats.block);\n formats.blockWithTransactions.transactions = Formatter2.allowNull(Formatter2.arrayOf(this.transactionResponse.bind(this)));\n formats.filter = {\n fromBlock: Formatter2.allowNull(blockTag, void 0),\n toBlock: Formatter2.allowNull(blockTag, void 0),\n blockHash: Formatter2.allowNull(hash3, void 0),\n address: Formatter2.allowNull(address, void 0),\n topics: Formatter2.allowNull(this.topics.bind(this), void 0)\n };\n formats.filterLog = {\n blockNumber: Formatter2.allowNull(number),\n blockHash: Formatter2.allowNull(hash3),\n transactionIndex: number,\n removed: Formatter2.allowNull(this.boolean.bind(this)),\n address,\n data: Formatter2.allowFalsish(data, \"0x\"),\n topics: Formatter2.arrayOf(hash3),\n transactionHash: hash3,\n logIndex: number\n };\n return formats;\n };\n Formatter2.prototype.accessList = function(accessList) {\n return (0, transactions_1.accessListify)(accessList || []);\n };\n Formatter2.prototype.number = function(number) {\n if (number === \"0x\") {\n return 0;\n }\n return bignumber_1.BigNumber.from(number).toNumber();\n };\n Formatter2.prototype.type = function(number) {\n if (number === \"0x\" || number == null) {\n return 0;\n }\n return bignumber_1.BigNumber.from(number).toNumber();\n };\n Formatter2.prototype.bigNumber = function(value) {\n return bignumber_1.BigNumber.from(value);\n };\n Formatter2.prototype.boolean = function(value) {\n if (typeof value === \"boolean\") {\n return value;\n }\n if (typeof value === \"string\") {\n value = value.toLowerCase();\n if (value === \"true\") {\n return true;\n }\n if (value === \"false\") {\n return false;\n }\n }\n throw new Error(\"invalid boolean - \" + value);\n };\n Formatter2.prototype.hex = function(value, strict) {\n if (typeof value === \"string\") {\n if (!strict && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if ((0, bytes_1.isHexString)(value)) {\n return value.toLowerCase();\n }\n }\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n };\n Formatter2.prototype.data = function(value, strict) {\n var result = this.hex(value, strict);\n if (result.length % 2 !== 0) {\n throw new Error(\"invalid data; odd-length - \" + value);\n }\n return result;\n };\n Formatter2.prototype.address = function(value) {\n return (0, address_1.getAddress)(value);\n };\n Formatter2.prototype.callAddress = function(value) {\n if (!(0, bytes_1.isHexString)(value, 32)) {\n return null;\n }\n var address = (0, address_1.getAddress)((0, bytes_1.hexDataSlice)(value, 12));\n return address === constants_1.AddressZero ? null : address;\n };\n Formatter2.prototype.contractAddress = function(value) {\n return (0, address_1.getContractAddress)(value);\n };\n Formatter2.prototype.blockTag = function(blockTag) {\n if (blockTag == null) {\n return \"latest\";\n }\n if (blockTag === \"earliest\") {\n return \"0x0\";\n }\n switch (blockTag) {\n case \"earliest\":\n return \"0x0\";\n case \"latest\":\n case \"pending\":\n case \"safe\":\n case \"finalized\":\n return blockTag;\n }\n if (typeof blockTag === \"number\" || (0, bytes_1.isHexString)(blockTag)) {\n return (0, bytes_1.hexValue)(blockTag);\n }\n throw new Error(\"invalid blockTag\");\n };\n Formatter2.prototype.hash = function(value, strict) {\n var result = this.hex(value, strict);\n if ((0, bytes_1.hexDataLength)(result) !== 32) {\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n }\n return result;\n };\n Formatter2.prototype.difficulty = function(value) {\n if (value == null) {\n return null;\n }\n var v2 = bignumber_1.BigNumber.from(value);\n try {\n return v2.toNumber();\n } catch (error) {\n }\n return null;\n };\n Formatter2.prototype.uint256 = function(value) {\n if (!(0, bytes_1.isHexString)(value)) {\n throw new Error(\"invalid uint256\");\n }\n return (0, bytes_1.hexZeroPad)(value, 32);\n };\n Formatter2.prototype._block = function(value, format) {\n if (value.author != null && value.miner == null) {\n value.miner = value.author;\n }\n var difficulty = value._difficulty != null ? value._difficulty : value.difficulty;\n var result = Formatter2.check(format, value);\n result._difficulty = difficulty == null ? null : bignumber_1.BigNumber.from(difficulty);\n return result;\n };\n Formatter2.prototype.block = function(value) {\n return this._block(value, this.formats.block);\n };\n Formatter2.prototype.blockWithTransactions = function(value) {\n return this._block(value, this.formats.blockWithTransactions);\n };\n Formatter2.prototype.transactionRequest = function(value) {\n return Formatter2.check(this.formats.transactionRequest, value);\n };\n Formatter2.prototype.transactionResponse = function(transaction) {\n if (transaction.gas != null && transaction.gasLimit == null) {\n transaction.gasLimit = transaction.gas;\n }\n if (transaction.to && bignumber_1.BigNumber.from(transaction.to).isZero()) {\n transaction.to = \"0x0000000000000000000000000000000000000000\";\n }\n if (transaction.input != null && transaction.data == null) {\n transaction.data = transaction.input;\n }\n if (transaction.to == null && transaction.creates == null) {\n transaction.creates = this.contractAddress(transaction);\n }\n if ((transaction.type === 1 || transaction.type === 2) && transaction.accessList == null) {\n transaction.accessList = [];\n }\n var result = Formatter2.check(this.formats.transaction, transaction);\n if (transaction.chainId != null) {\n var chainId = transaction.chainId;\n if ((0, bytes_1.isHexString)(chainId)) {\n chainId = bignumber_1.BigNumber.from(chainId).toNumber();\n }\n result.chainId = chainId;\n } else {\n var chainId = transaction.networkId;\n if (chainId == null && result.v == null) {\n chainId = transaction.chainId;\n }\n if ((0, bytes_1.isHexString)(chainId)) {\n chainId = bignumber_1.BigNumber.from(chainId).toNumber();\n }\n if (typeof chainId !== \"number\" && result.v != null) {\n chainId = (result.v - 35) / 2;\n if (chainId < 0) {\n chainId = 0;\n }\n chainId = parseInt(chainId);\n }\n if (typeof chainId !== \"number\") {\n chainId = 0;\n }\n result.chainId = chainId;\n }\n if (result.blockHash && result.blockHash.replace(/0/g, \"\") === \"x\") {\n result.blockHash = null;\n }\n return result;\n };\n Formatter2.prototype.transaction = function(value) {\n return (0, transactions_1.parse)(value);\n };\n Formatter2.prototype.receiptLog = function(value) {\n return Formatter2.check(this.formats.receiptLog, value);\n };\n Formatter2.prototype.receipt = function(value) {\n var result = Formatter2.check(this.formats.receipt, value);\n if (result.root != null) {\n if (result.root.length <= 4) {\n var value_1 = bignumber_1.BigNumber.from(result.root).toNumber();\n if (value_1 === 0 || value_1 === 1) {\n if (result.status != null && result.status !== value_1) {\n logger.throwArgumentError(\"alt-root-status/status mismatch\", \"value\", { root: result.root, status: result.status });\n }\n result.status = value_1;\n delete result.root;\n } else {\n logger.throwArgumentError(\"invalid alt-root-status\", \"value.root\", result.root);\n }\n } else if (result.root.length !== 66) {\n logger.throwArgumentError(\"invalid root hash\", \"value.root\", result.root);\n }\n }\n if (result.status != null) {\n result.byzantium = true;\n }\n return result;\n };\n Formatter2.prototype.topics = function(value) {\n var _this = this;\n if (Array.isArray(value)) {\n return value.map(function(v2) {\n return _this.topics(v2);\n });\n } else if (value != null) {\n return this.hash(value, true);\n }\n return null;\n };\n Formatter2.prototype.filter = function(value) {\n return Formatter2.check(this.formats.filter, value);\n };\n Formatter2.prototype.filterLog = function(value) {\n return Formatter2.check(this.formats.filterLog, value);\n };\n Formatter2.check = function(format, object) {\n var result = {};\n for (var key in format) {\n try {\n var value = format[key](object[key]);\n if (value !== void 0) {\n result[key] = value;\n }\n } catch (error) {\n error.checkKey = key;\n error.checkValue = object[key];\n throw error;\n }\n }\n return result;\n };\n Formatter2.allowNull = function(format, nullValue) {\n return function(value) {\n if (value == null) {\n return nullValue;\n }\n return format(value);\n };\n };\n Formatter2.allowFalsish = function(format, replaceValue) {\n return function(value) {\n if (!value) {\n return replaceValue;\n }\n return format(value);\n };\n };\n Formatter2.arrayOf = function(format) {\n return function(array) {\n if (!Array.isArray(array)) {\n throw new Error(\"not an array\");\n }\n var result = [];\n array.forEach(function(value) {\n result.push(format(value));\n });\n return result;\n };\n };\n return Formatter2;\n }()\n );\n exports3.Formatter = Formatter;\n function isCommunityResourcable(value) {\n return value && typeof value.isCommunityResource === \"function\";\n }\n exports3.isCommunityResourcable = isCommunityResourcable;\n function isCommunityResource(value) {\n return isCommunityResourcable(value) && value.isCommunityResource();\n }\n exports3.isCommunityResource = isCommunityResource;\n var throttleMessage = false;\n function showThrottleMessage() {\n if (throttleMessage) {\n return;\n }\n throttleMessage = true;\n console.log(\"========= NOTICE =========\");\n console.log(\"Request-Rate Exceeded (this message will not be repeated)\");\n console.log(\"\");\n console.log(\"The default API keys for each service are provided as a highly-throttled,\");\n console.log(\"community resource for low-traffic projects and early prototyping.\");\n console.log(\"\");\n console.log(\"While your application will continue to function, we highly recommended\");\n console.log(\"signing up for your own API keys to improve performance, increase your\");\n console.log(\"request rate/limit and enable other perks, such as metrics and advanced APIs.\");\n console.log(\"\");\n console.log(\"For more details: https://docs.ethers.io/api-keys/\");\n console.log(\"==========================\");\n }\n exports3.showThrottleMessage = showThrottleMessage;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/base-provider.js\n var require_base_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/base-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BaseProvider = exports3.Resolver = exports3.Event = void 0;\n var abstract_provider_1 = require_lib14();\n var base64_1 = require_lib10();\n var basex_1 = require_lib19();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var constants_1 = require_lib8();\n var hash_1 = require_lib12();\n var networks_1 = require_lib27();\n var properties_1 = require_lib4();\n var sha2_1 = require_lib20();\n var strings_1 = require_lib9();\n var web_1 = require_lib28();\n var bech32_1 = __importDefault4(require_bech32());\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var formatter_1 = require_formatter();\n var MAX_CCIP_REDIRECTS = 10;\n function checkTopic(topic) {\n if (topic == null) {\n return \"null\";\n }\n if ((0, bytes_1.hexDataLength)(topic) !== 32) {\n logger.throwArgumentError(\"invalid topic\", \"topic\", topic);\n }\n return topic.toLowerCase();\n }\n function serializeTopics(topics) {\n topics = topics.slice();\n while (topics.length > 0 && topics[topics.length - 1] == null) {\n topics.pop();\n }\n return topics.map(function(topic) {\n if (Array.isArray(topic)) {\n var unique_1 = {};\n topic.forEach(function(topic2) {\n unique_1[checkTopic(topic2)] = true;\n });\n var sorted = Object.keys(unique_1);\n sorted.sort();\n return sorted.join(\"|\");\n } else {\n return checkTopic(topic);\n }\n }).join(\"&\");\n }\n function deserializeTopics(data) {\n if (data === \"\") {\n return [];\n }\n return data.split(/&/g).map(function(topic) {\n if (topic === \"\") {\n return [];\n }\n var comps = topic.split(\"|\").map(function(topic2) {\n return topic2 === \"null\" ? null : topic2;\n });\n return comps.length === 1 ? comps[0] : comps;\n });\n }\n function getEventTag(eventName) {\n if (typeof eventName === \"string\") {\n eventName = eventName.toLowerCase();\n if ((0, bytes_1.hexDataLength)(eventName) === 32) {\n return \"tx:\" + eventName;\n }\n if (eventName.indexOf(\":\") === -1) {\n return eventName;\n }\n } else if (Array.isArray(eventName)) {\n return \"filter:*:\" + serializeTopics(eventName);\n } else if (abstract_provider_1.ForkEvent.isForkEvent(eventName)) {\n logger.warn(\"not implemented\");\n throw new Error(\"not implemented\");\n } else if (eventName && typeof eventName === \"object\") {\n return \"filter:\" + (eventName.address || \"*\") + \":\" + serializeTopics(eventName.topics || []);\n }\n throw new Error(\"invalid event - \" + eventName);\n }\n function getTime() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n function stall(duration) {\n return new Promise(function(resolve) {\n setTimeout(resolve, duration);\n });\n }\n var PollableEvents = [\"block\", \"network\", \"pending\", \"poll\"];\n var Event2 = (\n /** @class */\n function() {\n function Event3(tag, listener, once2) {\n (0, properties_1.defineReadOnly)(this, \"tag\", tag);\n (0, properties_1.defineReadOnly)(this, \"listener\", listener);\n (0, properties_1.defineReadOnly)(this, \"once\", once2);\n this._lastBlockNumber = -2;\n this._inflight = false;\n }\n Object.defineProperty(Event3.prototype, \"event\", {\n get: function() {\n switch (this.type) {\n case \"tx\":\n return this.hash;\n case \"filter\":\n return this.filter;\n }\n return this.tag;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Event3.prototype, \"type\", {\n get: function() {\n return this.tag.split(\":\")[0];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Event3.prototype, \"hash\", {\n get: function() {\n var comps = this.tag.split(\":\");\n if (comps[0] !== \"tx\") {\n return null;\n }\n return comps[1];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Event3.prototype, \"filter\", {\n get: function() {\n var comps = this.tag.split(\":\");\n if (comps[0] !== \"filter\") {\n return null;\n }\n var address = comps[1];\n var topics = deserializeTopics(comps[2]);\n var filter = {};\n if (topics.length > 0) {\n filter.topics = topics;\n }\n if (address && address !== \"*\") {\n filter.address = address;\n }\n return filter;\n },\n enumerable: false,\n configurable: true\n });\n Event3.prototype.pollable = function() {\n return this.tag.indexOf(\":\") >= 0 || PollableEvents.indexOf(this.tag) >= 0;\n };\n return Event3;\n }()\n );\n exports3.Event = Event2;\n var coinInfos = {\n \"0\": { symbol: \"btc\", p2pkh: 0, p2sh: 5, prefix: \"bc\" },\n \"2\": { symbol: \"ltc\", p2pkh: 48, p2sh: 50, prefix: \"ltc\" },\n \"3\": { symbol: \"doge\", p2pkh: 30, p2sh: 22 },\n \"60\": { symbol: \"eth\", ilk: \"eth\" },\n \"61\": { symbol: \"etc\", ilk: \"eth\" },\n \"700\": { symbol: \"xdai\", ilk: \"eth\" }\n };\n function bytes32ify(value) {\n return (0, bytes_1.hexZeroPad)(bignumber_1.BigNumber.from(value).toHexString(), 32);\n }\n function base58Encode(data) {\n return basex_1.Base58.encode((0, bytes_1.concat)([data, (0, bytes_1.hexDataSlice)((0, sha2_1.sha256)((0, sha2_1.sha256)(data)), 0, 4)]));\n }\n var matcherIpfs = new RegExp(\"^(ipfs)://(.*)$\", \"i\");\n var matchers = [\n new RegExp(\"^(https)://(.*)$\", \"i\"),\n new RegExp(\"^(data):(.*)$\", \"i\"),\n matcherIpfs,\n new RegExp(\"^eip155:[0-9]+/(erc[0-9]+):(.*)$\", \"i\")\n ];\n function _parseString(result, start) {\n try {\n return (0, strings_1.toUtf8String)(_parseBytes(result, start));\n } catch (error) {\n }\n return null;\n }\n function _parseBytes(result, start) {\n if (result === \"0x\") {\n return null;\n }\n var offset = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(result, start, start + 32)).toNumber();\n var length = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(result, offset, offset + 32)).toNumber();\n return (0, bytes_1.hexDataSlice)(result, offset + 32, offset + 32 + length);\n }\n function getIpfsLink(link) {\n if (link.match(/^ipfs:\\/\\/ipfs\\//i)) {\n link = link.substring(12);\n } else if (link.match(/^ipfs:\\/\\//i)) {\n link = link.substring(7);\n } else {\n logger.throwArgumentError(\"unsupported IPFS format\", \"link\", link);\n }\n return \"https://gateway.ipfs.io/ipfs/\" + link;\n }\n function numPad(value) {\n var result = (0, bytes_1.arrayify)(value);\n if (result.length > 32) {\n throw new Error(\"internal; should not happen\");\n }\n var padded = new Uint8Array(32);\n padded.set(result, 32 - result.length);\n return padded;\n }\n function bytesPad(value) {\n if (value.length % 32 === 0) {\n return value;\n }\n var result = new Uint8Array(Math.ceil(value.length / 32) * 32);\n result.set(value);\n return result;\n }\n function encodeBytes3(datas) {\n var result = [];\n var byteCount = 0;\n for (var i3 = 0; i3 < datas.length; i3++) {\n result.push(null);\n byteCount += 32;\n }\n for (var i3 = 0; i3 < datas.length; i3++) {\n var data = (0, bytes_1.arrayify)(datas[i3]);\n result[i3] = numPad(byteCount);\n result.push(numPad(data.length));\n result.push(bytesPad(data));\n byteCount += 32 + Math.ceil(data.length / 32) * 32;\n }\n return (0, bytes_1.hexConcat)(result);\n }\n var Resolver = (\n /** @class */\n function() {\n function Resolver2(provider, address, name, resolvedAddress) {\n (0, properties_1.defineReadOnly)(this, \"provider\", provider);\n (0, properties_1.defineReadOnly)(this, \"name\", name);\n (0, properties_1.defineReadOnly)(this, \"address\", provider.formatter.address(address));\n (0, properties_1.defineReadOnly)(this, \"_resolvedAddress\", resolvedAddress);\n }\n Resolver2.prototype.supportsWildcard = function() {\n var _this = this;\n if (!this._supportsEip2544) {\n this._supportsEip2544 = this.provider.call({\n to: this.address,\n data: \"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000\"\n }).then(function(result) {\n return bignumber_1.BigNumber.from(result).eq(1);\n }).catch(function(error) {\n if (error.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n return false;\n }\n _this._supportsEip2544 = null;\n throw error;\n });\n }\n return this._supportsEip2544;\n };\n Resolver2.prototype._fetch = function(selector, parameters) {\n return __awaiter4(this, void 0, void 0, function() {\n var tx, parseBytes, result, error_1;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n tx = {\n to: this.address,\n ccipReadEnabled: true,\n data: (0, bytes_1.hexConcat)([selector, (0, hash_1.namehash)(this.name), parameters || \"0x\"])\n };\n parseBytes = false;\n return [4, this.supportsWildcard()];\n case 1:\n if (_a.sent()) {\n parseBytes = true;\n tx.data = (0, bytes_1.hexConcat)([\"0x9061b923\", encodeBytes3([(0, hash_1.dnsEncode)(this.name), tx.data])]);\n }\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.provider.call(tx)];\n case 3:\n result = _a.sent();\n if ((0, bytes_1.arrayify)(result).length % 32 === 4) {\n logger.throwError(\"resolver threw error\", logger_1.Logger.errors.CALL_EXCEPTION, {\n transaction: tx,\n data: result\n });\n }\n if (parseBytes) {\n result = _parseBytes(result, 0);\n }\n return [2, result];\n case 4:\n error_1 = _a.sent();\n if (error_1.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n return [2, null];\n }\n throw error_1;\n case 5:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n Resolver2.prototype._fetchBytes = function(selector, parameters) {\n return __awaiter4(this, void 0, void 0, function() {\n var result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._fetch(selector, parameters)];\n case 1:\n result = _a.sent();\n if (result != null) {\n return [2, _parseBytes(result, 0)];\n }\n return [2, null];\n }\n });\n });\n };\n Resolver2.prototype._getAddress = function(coinType, hexBytes) {\n var coinInfo = coinInfos[String(coinType)];\n if (coinInfo == null) {\n logger.throwError(\"unsupported coin type: \" + coinType, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress(\" + coinType + \")\"\n });\n }\n if (coinInfo.ilk === \"eth\") {\n return this.provider.formatter.address(hexBytes);\n }\n var bytes = (0, bytes_1.arrayify)(hexBytes);\n if (coinInfo.p2pkh != null) {\n var p2pkh = hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);\n if (p2pkh) {\n var length_1 = parseInt(p2pkh[1], 16);\n if (p2pkh[2].length === length_1 * 2 && length_1 >= 1 && length_1 <= 75) {\n return base58Encode((0, bytes_1.concat)([[coinInfo.p2pkh], \"0x\" + p2pkh[2]]));\n }\n }\n }\n if (coinInfo.p2sh != null) {\n var p2sh = hexBytes.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);\n if (p2sh) {\n var length_2 = parseInt(p2sh[1], 16);\n if (p2sh[2].length === length_2 * 2 && length_2 >= 1 && length_2 <= 75) {\n return base58Encode((0, bytes_1.concat)([[coinInfo.p2sh], \"0x\" + p2sh[2]]));\n }\n }\n }\n if (coinInfo.prefix != null) {\n var length_3 = bytes[1];\n var version_1 = bytes[0];\n if (version_1 === 0) {\n if (length_3 !== 20 && length_3 !== 32) {\n version_1 = -1;\n }\n } else {\n version_1 = -1;\n }\n if (version_1 >= 0 && bytes.length === 2 + length_3 && length_3 >= 1 && length_3 <= 75) {\n var words = bech32_1.default.toWords(bytes.slice(2));\n words.unshift(version_1);\n return bech32_1.default.encode(coinInfo.prefix, words);\n }\n }\n return null;\n };\n Resolver2.prototype.getAddress = function(coinType) {\n return __awaiter4(this, void 0, void 0, function() {\n var result, error_2, hexBytes, address;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (coinType == null) {\n coinType = 60;\n }\n if (!(coinType === 60))\n return [3, 4];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4, this._fetch(\"0x3b3b57de\")];\n case 2:\n result = _a.sent();\n if (result === \"0x\" || result === constants_1.HashZero) {\n return [2, null];\n }\n return [2, this.provider.formatter.callAddress(result)];\n case 3:\n error_2 = _a.sent();\n if (error_2.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n return [2, null];\n }\n throw error_2;\n case 4:\n return [4, this._fetchBytes(\"0xf1cb7e06\", bytes32ify(coinType))];\n case 5:\n hexBytes = _a.sent();\n if (hexBytes == null || hexBytes === \"0x\") {\n return [2, null];\n }\n address = this._getAddress(coinType, hexBytes);\n if (address == null) {\n logger.throwError(\"invalid or unsupported coin data\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress(\" + coinType + \")\",\n coinType,\n data: hexBytes\n });\n }\n return [2, address];\n }\n });\n });\n };\n Resolver2.prototype.getAvatar = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var linkage, avatar, i3, match, scheme, _a, selector, owner, _b, comps, addr, tokenId, tokenOwner, _c, _d, balance, _e, _f, tx, metadataUrl, _g, metadata, imageUrl, ipfs, error_3;\n return __generator4(this, function(_h) {\n switch (_h.label) {\n case 0:\n linkage = [{ type: \"name\", content: this.name }];\n _h.label = 1;\n case 1:\n _h.trys.push([1, 19, , 20]);\n return [4, this.getText(\"avatar\")];\n case 2:\n avatar = _h.sent();\n if (avatar == null) {\n return [2, null];\n }\n i3 = 0;\n _h.label = 3;\n case 3:\n if (!(i3 < matchers.length))\n return [3, 18];\n match = avatar.match(matchers[i3]);\n if (match == null) {\n return [3, 17];\n }\n scheme = match[1].toLowerCase();\n _a = scheme;\n switch (_a) {\n case \"https\":\n return [3, 4];\n case \"data\":\n return [3, 5];\n case \"ipfs\":\n return [3, 6];\n case \"erc721\":\n return [3, 7];\n case \"erc1155\":\n return [3, 7];\n }\n return [3, 17];\n case 4:\n linkage.push({ type: \"url\", content: avatar });\n return [2, { linkage, url: avatar }];\n case 5:\n linkage.push({ type: \"data\", content: avatar });\n return [2, { linkage, url: avatar }];\n case 6:\n linkage.push({ type: \"ipfs\", content: avatar });\n return [2, { linkage, url: getIpfsLink(avatar) }];\n case 7:\n selector = scheme === \"erc721\" ? \"0xc87b56dd\" : \"0x0e89341c\";\n linkage.push({ type: scheme, content: avatar });\n _b = this._resolvedAddress;\n if (_b)\n return [3, 9];\n return [4, this.getAddress()];\n case 8:\n _b = _h.sent();\n _h.label = 9;\n case 9:\n owner = _b;\n comps = (match[2] || \"\").split(\"/\");\n if (comps.length !== 2) {\n return [2, null];\n }\n return [4, this.provider.formatter.address(comps[0])];\n case 10:\n addr = _h.sent();\n tokenId = (0, bytes_1.hexZeroPad)(bignumber_1.BigNumber.from(comps[1]).toHexString(), 32);\n if (!(scheme === \"erc721\"))\n return [3, 12];\n _d = (_c = this.provider.formatter).callAddress;\n return [4, this.provider.call({\n to: addr,\n data: (0, bytes_1.hexConcat)([\"0x6352211e\", tokenId])\n })];\n case 11:\n tokenOwner = _d.apply(_c, [_h.sent()]);\n if (owner !== tokenOwner) {\n return [2, null];\n }\n linkage.push({ type: \"owner\", content: tokenOwner });\n return [3, 14];\n case 12:\n if (!(scheme === \"erc1155\"))\n return [3, 14];\n _f = (_e = bignumber_1.BigNumber).from;\n return [4, this.provider.call({\n to: addr,\n data: (0, bytes_1.hexConcat)([\"0x00fdd58e\", (0, bytes_1.hexZeroPad)(owner, 32), tokenId])\n })];\n case 13:\n balance = _f.apply(_e, [_h.sent()]);\n if (balance.isZero()) {\n return [2, null];\n }\n linkage.push({ type: \"balance\", content: balance.toString() });\n _h.label = 14;\n case 14:\n tx = {\n to: this.provider.formatter.address(comps[0]),\n data: (0, bytes_1.hexConcat)([selector, tokenId])\n };\n _g = _parseString;\n return [4, this.provider.call(tx)];\n case 15:\n metadataUrl = _g.apply(void 0, [_h.sent(), 0]);\n if (metadataUrl == null) {\n return [2, null];\n }\n linkage.push({ type: \"metadata-url-base\", content: metadataUrl });\n if (scheme === \"erc1155\") {\n metadataUrl = metadataUrl.replace(\"{id}\", tokenId.substring(2));\n linkage.push({ type: \"metadata-url-expanded\", content: metadataUrl });\n }\n if (metadataUrl.match(/^ipfs:/i)) {\n metadataUrl = getIpfsLink(metadataUrl);\n }\n linkage.push({ type: \"metadata-url\", content: metadataUrl });\n return [4, (0, web_1.fetchJson)(metadataUrl)];\n case 16:\n metadata = _h.sent();\n if (!metadata) {\n return [2, null];\n }\n linkage.push({ type: \"metadata\", content: JSON.stringify(metadata) });\n imageUrl = metadata.image;\n if (typeof imageUrl !== \"string\") {\n return [2, null];\n }\n if (imageUrl.match(/^(https:\\/\\/|data:)/i)) {\n } else {\n ipfs = imageUrl.match(matcherIpfs);\n if (ipfs == null) {\n return [2, null];\n }\n linkage.push({ type: \"url-ipfs\", content: imageUrl });\n imageUrl = getIpfsLink(imageUrl);\n }\n linkage.push({ type: \"url\", content: imageUrl });\n return [2, { linkage, url: imageUrl }];\n case 17:\n i3++;\n return [3, 3];\n case 18:\n return [3, 20];\n case 19:\n error_3 = _h.sent();\n return [3, 20];\n case 20:\n return [2, null];\n }\n });\n });\n };\n Resolver2.prototype.getContentHash = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var hexBytes, ipfs, length_4, ipns, length_5, swarm, skynet, urlSafe_1, hash3;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._fetchBytes(\"0xbc1c58d1\")];\n case 1:\n hexBytes = _a.sent();\n if (hexBytes == null || hexBytes === \"0x\") {\n return [2, null];\n }\n ipfs = hexBytes.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipfs) {\n length_4 = parseInt(ipfs[3], 16);\n if (ipfs[4].length === length_4 * 2) {\n return [2, \"ipfs://\" + basex_1.Base58.encode(\"0x\" + ipfs[1])];\n }\n }\n ipns = hexBytes.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipns) {\n length_5 = parseInt(ipns[3], 16);\n if (ipns[4].length === length_5 * 2) {\n return [2, \"ipns://\" + basex_1.Base58.encode(\"0x\" + ipns[1])];\n }\n }\n swarm = hexBytes.match(/^0xe40101fa011b20([0-9a-f]*)$/);\n if (swarm) {\n if (swarm[1].length === 32 * 2) {\n return [2, \"bzz://\" + swarm[1]];\n }\n }\n skynet = hexBytes.match(/^0x90b2c605([0-9a-f]*)$/);\n if (skynet) {\n if (skynet[1].length === 34 * 2) {\n urlSafe_1 = { \"=\": \"\", \"+\": \"-\", \"/\": \"_\" };\n hash3 = (0, base64_1.encode)(\"0x\" + skynet[1]).replace(/[=+\\/]/g, function(a3) {\n return urlSafe_1[a3];\n });\n return [2, \"sia://\" + hash3];\n }\n }\n return [2, logger.throwError(\"invalid or unsupported content hash data\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getContentHash()\",\n data: hexBytes\n })];\n }\n });\n });\n };\n Resolver2.prototype.getText = function(key) {\n return __awaiter4(this, void 0, void 0, function() {\n var keyBytes, hexBytes;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n keyBytes = (0, strings_1.toUtf8Bytes)(key);\n keyBytes = (0, bytes_1.concat)([bytes32ify(64), bytes32ify(keyBytes.length), keyBytes]);\n if (keyBytes.length % 32 !== 0) {\n keyBytes = (0, bytes_1.concat)([keyBytes, (0, bytes_1.hexZeroPad)(\"0x\", 32 - key.length % 32)]);\n }\n return [4, this._fetchBytes(\"0x59d1d43c\", (0, bytes_1.hexlify)(keyBytes))];\n case 1:\n hexBytes = _a.sent();\n if (hexBytes == null || hexBytes === \"0x\") {\n return [2, null];\n }\n return [2, (0, strings_1.toUtf8String)(hexBytes)];\n }\n });\n });\n };\n return Resolver2;\n }()\n );\n exports3.Resolver = Resolver;\n var defaultFormatter = null;\n var nextPollId = 1;\n var BaseProvider = (\n /** @class */\n function(_super) {\n __extends4(BaseProvider2, _super);\n function BaseProvider2(network) {\n var _newTarget = this.constructor;\n var _this = _super.call(this) || this;\n _this._events = [];\n _this._emitted = { block: -2 };\n _this.disableCcipRead = false;\n _this.formatter = _newTarget.getFormatter();\n (0, properties_1.defineReadOnly)(_this, \"anyNetwork\", network === \"any\");\n if (_this.anyNetwork) {\n network = _this.detectNetwork();\n }\n if (network instanceof Promise) {\n _this._networkPromise = network;\n network.catch(function(error) {\n });\n _this._ready().catch(function(error) {\n });\n } else {\n var knownNetwork = (0, properties_1.getStatic)(_newTarget, \"getNetwork\")(network);\n if (knownNetwork) {\n (0, properties_1.defineReadOnly)(_this, \"_network\", knownNetwork);\n _this.emit(\"network\", knownNetwork, null);\n } else {\n logger.throwArgumentError(\"invalid network\", \"network\", network);\n }\n }\n _this._maxInternalBlockNumber = -1024;\n _this._lastBlockNumber = -2;\n _this._maxFilterBlockRange = 10;\n _this._pollingInterval = 4e3;\n _this._fastQueryDate = 0;\n return _this;\n }\n BaseProvider2.prototype._ready = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var network, error_4;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(this._network == null))\n return [3, 7];\n network = null;\n if (!this._networkPromise)\n return [3, 4];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4, this._networkPromise];\n case 2:\n network = _a.sent();\n return [3, 4];\n case 3:\n error_4 = _a.sent();\n return [3, 4];\n case 4:\n if (!(network == null))\n return [3, 6];\n return [4, this.detectNetwork()];\n case 5:\n network = _a.sent();\n _a.label = 6;\n case 6:\n if (!network) {\n logger.throwError(\"no network detected\", logger_1.Logger.errors.UNKNOWN_ERROR, {});\n }\n if (this._network == null) {\n if (this.anyNetwork) {\n this._network = network;\n } else {\n (0, properties_1.defineReadOnly)(this, \"_network\", network);\n }\n this.emit(\"network\", network, null);\n }\n _a.label = 7;\n case 7:\n return [2, this._network];\n }\n });\n });\n };\n Object.defineProperty(BaseProvider2.prototype, \"ready\", {\n // This will always return the most recently established network.\n // For \"any\", this can change (a \"network\" event is emitted before\n // any change is reflected); otherwise this cannot change\n get: function() {\n var _this = this;\n return (0, web_1.poll)(function() {\n return _this._ready().then(function(network) {\n return network;\n }, function(error) {\n if (error.code === logger_1.Logger.errors.NETWORK_ERROR && error.event === \"noNetwork\") {\n return void 0;\n }\n throw error;\n });\n });\n },\n enumerable: false,\n configurable: true\n });\n BaseProvider2.getFormatter = function() {\n if (defaultFormatter == null) {\n defaultFormatter = new formatter_1.Formatter();\n }\n return defaultFormatter;\n };\n BaseProvider2.getNetwork = function(network) {\n return (0, networks_1.getNetwork)(network == null ? \"homestead\" : network);\n };\n BaseProvider2.prototype.ccipReadFetch = function(tx, calldata, urls) {\n return __awaiter4(this, void 0, void 0, function() {\n var sender, data, errorMessages, i3, url, href, json, result, errorMessage;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (this.disableCcipRead || urls.length === 0) {\n return [2, null];\n }\n sender = tx.to.toLowerCase();\n data = calldata.toLowerCase();\n errorMessages = [];\n i3 = 0;\n _a.label = 1;\n case 1:\n if (!(i3 < urls.length))\n return [3, 4];\n url = urls[i3];\n href = url.replace(\"{sender}\", sender).replace(\"{data}\", data);\n json = url.indexOf(\"{data}\") >= 0 ? null : JSON.stringify({ data, sender });\n return [4, (0, web_1.fetchJson)({ url: href, errorPassThrough: true }, json, function(value, response) {\n value.status = response.statusCode;\n return value;\n })];\n case 2:\n result = _a.sent();\n if (result.data) {\n return [2, result.data];\n }\n errorMessage = result.message || \"unknown error\";\n if (result.status >= 400 && result.status < 500) {\n return [2, logger.throwError(\"response not found during CCIP fetch: \" + errorMessage, logger_1.Logger.errors.SERVER_ERROR, { url, errorMessage })];\n }\n errorMessages.push(errorMessage);\n _a.label = 3;\n case 3:\n i3++;\n return [3, 1];\n case 4:\n return [2, logger.throwError(\"error encountered during CCIP fetch: \" + errorMessages.map(function(m2) {\n return JSON.stringify(m2);\n }).join(\", \"), logger_1.Logger.errors.SERVER_ERROR, {\n urls,\n errorMessages\n })];\n }\n });\n });\n };\n BaseProvider2.prototype._getInternalBlockNumber = function(maxAge) {\n return __awaiter4(this, void 0, void 0, function() {\n var internalBlockNumber, result, error_5, reqTime, checkInternalBlockNumber;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._ready()];\n case 1:\n _a.sent();\n if (!(maxAge > 0))\n return [3, 7];\n _a.label = 2;\n case 2:\n if (!this._internalBlockNumber)\n return [3, 7];\n internalBlockNumber = this._internalBlockNumber;\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, internalBlockNumber];\n case 4:\n result = _a.sent();\n if (getTime() - result.respTime <= maxAge) {\n return [2, result.blockNumber];\n }\n return [3, 7];\n case 5:\n error_5 = _a.sent();\n if (this._internalBlockNumber === internalBlockNumber) {\n return [3, 7];\n }\n return [3, 6];\n case 6:\n return [3, 2];\n case 7:\n reqTime = getTime();\n checkInternalBlockNumber = (0, properties_1.resolveProperties)({\n blockNumber: this.perform(\"getBlockNumber\", {}),\n networkError: this.getNetwork().then(function(network) {\n return null;\n }, function(error) {\n return error;\n })\n }).then(function(_a2) {\n var blockNumber = _a2.blockNumber, networkError = _a2.networkError;\n if (networkError) {\n if (_this._internalBlockNumber === checkInternalBlockNumber) {\n _this._internalBlockNumber = null;\n }\n throw networkError;\n }\n var respTime = getTime();\n blockNumber = bignumber_1.BigNumber.from(blockNumber).toNumber();\n if (blockNumber < _this._maxInternalBlockNumber) {\n blockNumber = _this._maxInternalBlockNumber;\n }\n _this._maxInternalBlockNumber = blockNumber;\n _this._setFastBlockNumber(blockNumber);\n return { blockNumber, reqTime, respTime };\n });\n this._internalBlockNumber = checkInternalBlockNumber;\n checkInternalBlockNumber.catch(function(error) {\n if (_this._internalBlockNumber === checkInternalBlockNumber) {\n _this._internalBlockNumber = null;\n }\n });\n return [4, checkInternalBlockNumber];\n case 8:\n return [2, _a.sent().blockNumber];\n }\n });\n });\n };\n BaseProvider2.prototype.poll = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var pollId, runners, blockNumber, error_6, i3;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n pollId = nextPollId++;\n runners = [];\n blockNumber = null;\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4, this._getInternalBlockNumber(100 + this.pollingInterval / 2)];\n case 2:\n blockNumber = _a.sent();\n return [3, 4];\n case 3:\n error_6 = _a.sent();\n this.emit(\"error\", error_6);\n return [\n 2\n /*return*/\n ];\n case 4:\n this._setFastBlockNumber(blockNumber);\n this.emit(\"poll\", pollId, blockNumber);\n if (blockNumber === this._lastBlockNumber) {\n this.emit(\"didPoll\", pollId);\n return [\n 2\n /*return*/\n ];\n }\n if (this._emitted.block === -2) {\n this._emitted.block = blockNumber - 1;\n }\n if (Math.abs(this._emitted.block - blockNumber) > 1e3) {\n logger.warn(\"network block skew detected; skipping block events (emitted=\" + this._emitted.block + \" blockNumber\" + blockNumber + \")\");\n this.emit(\"error\", logger.makeError(\"network block skew detected\", logger_1.Logger.errors.NETWORK_ERROR, {\n blockNumber,\n event: \"blockSkew\",\n previousBlockNumber: this._emitted.block\n }));\n this.emit(\"block\", blockNumber);\n } else {\n for (i3 = this._emitted.block + 1; i3 <= blockNumber; i3++) {\n this.emit(\"block\", i3);\n }\n }\n if (this._emitted.block !== blockNumber) {\n this._emitted.block = blockNumber;\n Object.keys(this._emitted).forEach(function(key) {\n if (key === \"block\") {\n return;\n }\n var eventBlockNumber = _this._emitted[key];\n if (eventBlockNumber === \"pending\") {\n return;\n }\n if (blockNumber - eventBlockNumber > 12) {\n delete _this._emitted[key];\n }\n });\n }\n if (this._lastBlockNumber === -2) {\n this._lastBlockNumber = blockNumber - 1;\n }\n this._events.forEach(function(event) {\n switch (event.type) {\n case \"tx\": {\n var hash_2 = event.hash;\n var runner = _this.getTransactionReceipt(hash_2).then(function(receipt) {\n if (!receipt || receipt.blockNumber == null) {\n return null;\n }\n _this._emitted[\"t:\" + hash_2] = receipt.blockNumber;\n _this.emit(hash_2, receipt);\n return null;\n }).catch(function(error) {\n _this.emit(\"error\", error);\n });\n runners.push(runner);\n break;\n }\n case \"filter\": {\n if (!event._inflight) {\n event._inflight = true;\n if (event._lastBlockNumber === -2) {\n event._lastBlockNumber = blockNumber - 1;\n }\n var filter_1 = event.filter;\n filter_1.fromBlock = event._lastBlockNumber + 1;\n filter_1.toBlock = blockNumber;\n var minFromBlock = filter_1.toBlock - _this._maxFilterBlockRange;\n if (minFromBlock > filter_1.fromBlock) {\n filter_1.fromBlock = minFromBlock;\n }\n if (filter_1.fromBlock < 0) {\n filter_1.fromBlock = 0;\n }\n var runner = _this.getLogs(filter_1).then(function(logs) {\n event._inflight = false;\n if (logs.length === 0) {\n return;\n }\n logs.forEach(function(log) {\n if (log.blockNumber > event._lastBlockNumber) {\n event._lastBlockNumber = log.blockNumber;\n }\n _this._emitted[\"b:\" + log.blockHash] = log.blockNumber;\n _this._emitted[\"t:\" + log.transactionHash] = log.blockNumber;\n _this.emit(filter_1, log);\n });\n }).catch(function(error) {\n _this.emit(\"error\", error);\n event._inflight = false;\n });\n runners.push(runner);\n }\n break;\n }\n }\n });\n this._lastBlockNumber = blockNumber;\n Promise.all(runners).then(function() {\n _this.emit(\"didPoll\", pollId);\n }).catch(function(error) {\n _this.emit(\"error\", error);\n });\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.resetEventsBlock = function(blockNumber) {\n this._lastBlockNumber = blockNumber - 1;\n if (this.polling) {\n this.poll();\n }\n };\n Object.defineProperty(BaseProvider2.prototype, \"network\", {\n get: function() {\n return this._network;\n },\n enumerable: false,\n configurable: true\n });\n BaseProvider2.prototype.detectNetwork = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n return [2, logger.throwError(\"provider does not support network detection\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"provider.detectNetwork\"\n })];\n });\n });\n };\n BaseProvider2.prototype.getNetwork = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var network, currentNetwork, error;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._ready()];\n case 1:\n network = _a.sent();\n return [4, this.detectNetwork()];\n case 2:\n currentNetwork = _a.sent();\n if (!(network.chainId !== currentNetwork.chainId))\n return [3, 5];\n if (!this.anyNetwork)\n return [3, 4];\n this._network = currentNetwork;\n this._lastBlockNumber = -2;\n this._fastBlockNumber = null;\n this._fastBlockNumberPromise = null;\n this._fastQueryDate = 0;\n this._emitted.block = -2;\n this._maxInternalBlockNumber = -1024;\n this._internalBlockNumber = null;\n this.emit(\"network\", currentNetwork, network);\n return [4, stall(0)];\n case 3:\n _a.sent();\n return [2, this._network];\n case 4:\n error = logger.makeError(\"underlying network changed\", logger_1.Logger.errors.NETWORK_ERROR, {\n event: \"changed\",\n network,\n detectedNetwork: currentNetwork\n });\n this.emit(\"error\", error);\n throw error;\n case 5:\n return [2, network];\n }\n });\n });\n };\n Object.defineProperty(BaseProvider2.prototype, \"blockNumber\", {\n get: function() {\n var _this = this;\n this._getInternalBlockNumber(100 + this.pollingInterval / 2).then(function(blockNumber) {\n _this._setFastBlockNumber(blockNumber);\n }, function(error) {\n });\n return this._fastBlockNumber != null ? this._fastBlockNumber : -1;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseProvider2.prototype, \"polling\", {\n get: function() {\n return this._poller != null;\n },\n set: function(value) {\n var _this = this;\n if (value && !this._poller) {\n this._poller = setInterval(function() {\n _this.poll();\n }, this.pollingInterval);\n if (!this._bootstrapPoll) {\n this._bootstrapPoll = setTimeout(function() {\n _this.poll();\n _this._bootstrapPoll = setTimeout(function() {\n if (!_this._poller) {\n _this.poll();\n }\n _this._bootstrapPoll = null;\n }, _this.pollingInterval);\n }, 0);\n }\n } else if (!value && this._poller) {\n clearInterval(this._poller);\n this._poller = null;\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseProvider2.prototype, \"pollingInterval\", {\n get: function() {\n return this._pollingInterval;\n },\n set: function(value) {\n var _this = this;\n if (typeof value !== \"number\" || value <= 0 || parseInt(String(value)) != value) {\n throw new Error(\"invalid polling interval\");\n }\n this._pollingInterval = value;\n if (this._poller) {\n clearInterval(this._poller);\n this._poller = setInterval(function() {\n _this.poll();\n }, this._pollingInterval);\n }\n },\n enumerable: false,\n configurable: true\n });\n BaseProvider2.prototype._getFastBlockNumber = function() {\n var _this = this;\n var now = getTime();\n if (now - this._fastQueryDate > 2 * this._pollingInterval) {\n this._fastQueryDate = now;\n this._fastBlockNumberPromise = this.getBlockNumber().then(function(blockNumber) {\n if (_this._fastBlockNumber == null || blockNumber > _this._fastBlockNumber) {\n _this._fastBlockNumber = blockNumber;\n }\n return _this._fastBlockNumber;\n });\n }\n return this._fastBlockNumberPromise;\n };\n BaseProvider2.prototype._setFastBlockNumber = function(blockNumber) {\n if (this._fastBlockNumber != null && blockNumber < this._fastBlockNumber) {\n return;\n }\n this._fastQueryDate = getTime();\n if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) {\n this._fastBlockNumber = blockNumber;\n this._fastBlockNumberPromise = Promise.resolve(blockNumber);\n }\n };\n BaseProvider2.prototype.waitForTransaction = function(transactionHash, confirmations, timeout) {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n return [2, this._waitForTransaction(transactionHash, confirmations == null ? 1 : confirmations, timeout || 0, null)];\n });\n });\n };\n BaseProvider2.prototype._waitForTransaction = function(transactionHash, confirmations, timeout, replaceable) {\n return __awaiter4(this, void 0, void 0, function() {\n var receipt;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getTransactionReceipt(transactionHash)];\n case 1:\n receipt = _a.sent();\n if ((receipt ? receipt.confirmations : 0) >= confirmations) {\n return [2, receipt];\n }\n return [2, new Promise(function(resolve, reject) {\n var cancelFuncs = [];\n var done = false;\n var alreadyDone = function() {\n if (done) {\n return true;\n }\n done = true;\n cancelFuncs.forEach(function(func) {\n func();\n });\n return false;\n };\n var minedHandler = function(receipt2) {\n if (receipt2.confirmations < confirmations) {\n return;\n }\n if (alreadyDone()) {\n return;\n }\n resolve(receipt2);\n };\n _this.on(transactionHash, minedHandler);\n cancelFuncs.push(function() {\n _this.removeListener(transactionHash, minedHandler);\n });\n if (replaceable) {\n var lastBlockNumber_1 = replaceable.startBlock;\n var scannedBlock_1 = null;\n var replaceHandler_1 = function(blockNumber) {\n return __awaiter4(_this, void 0, void 0, function() {\n var _this2 = this;\n return __generator4(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, stall(1e3)];\n case 1:\n _a2.sent();\n this.getTransactionCount(replaceable.from).then(function(nonce) {\n return __awaiter4(_this2, void 0, void 0, function() {\n var mined, block, ti, tx, receipt_1, reason;\n return __generator4(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n if (!(nonce <= replaceable.nonce))\n return [3, 1];\n lastBlockNumber_1 = blockNumber;\n return [3, 9];\n case 1:\n return [4, this.getTransaction(transactionHash)];\n case 2:\n mined = _a3.sent();\n if (mined && mined.blockNumber != null) {\n return [\n 2\n /*return*/\n ];\n }\n if (scannedBlock_1 == null) {\n scannedBlock_1 = lastBlockNumber_1 - 3;\n if (scannedBlock_1 < replaceable.startBlock) {\n scannedBlock_1 = replaceable.startBlock;\n }\n }\n _a3.label = 3;\n case 3:\n if (!(scannedBlock_1 <= blockNumber))\n return [3, 9];\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, this.getBlockWithTransactions(scannedBlock_1)];\n case 4:\n block = _a3.sent();\n ti = 0;\n _a3.label = 5;\n case 5:\n if (!(ti < block.transactions.length))\n return [3, 8];\n tx = block.transactions[ti];\n if (tx.hash === transactionHash) {\n return [\n 2\n /*return*/\n ];\n }\n if (!(tx.from === replaceable.from && tx.nonce === replaceable.nonce))\n return [3, 7];\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, this.waitForTransaction(tx.hash, confirmations)];\n case 6:\n receipt_1 = _a3.sent();\n if (alreadyDone()) {\n return [\n 2\n /*return*/\n ];\n }\n reason = \"replaced\";\n if (tx.data === replaceable.data && tx.to === replaceable.to && tx.value.eq(replaceable.value)) {\n reason = \"repriced\";\n } else if (tx.data === \"0x\" && tx.from === tx.to && tx.value.isZero()) {\n reason = \"cancelled\";\n }\n reject(logger.makeError(\"transaction was replaced\", logger_1.Logger.errors.TRANSACTION_REPLACED, {\n cancelled: reason === \"replaced\" || reason === \"cancelled\",\n reason,\n replacement: this._wrapTransaction(tx),\n hash: transactionHash,\n receipt: receipt_1\n }));\n return [\n 2\n /*return*/\n ];\n case 7:\n ti++;\n return [3, 5];\n case 8:\n scannedBlock_1++;\n return [3, 3];\n case 9:\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n this.once(\"block\", replaceHandler_1);\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }, function(error) {\n if (done) {\n return;\n }\n _this2.once(\"block\", replaceHandler_1);\n });\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n if (done) {\n return;\n }\n _this.once(\"block\", replaceHandler_1);\n cancelFuncs.push(function() {\n _this.removeListener(\"block\", replaceHandler_1);\n });\n }\n if (typeof timeout === \"number\" && timeout > 0) {\n var timer_1 = setTimeout(function() {\n if (alreadyDone()) {\n return;\n }\n reject(logger.makeError(\"timeout exceeded\", logger_1.Logger.errors.TIMEOUT, { timeout }));\n }, timeout);\n if (timer_1.unref) {\n timer_1.unref();\n }\n cancelFuncs.push(function() {\n clearTimeout(timer_1);\n });\n }\n })];\n }\n });\n });\n };\n BaseProvider2.prototype.getBlockNumber = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n return [2, this._getInternalBlockNumber(0)];\n });\n });\n };\n BaseProvider2.prototype.getGasPrice = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, this.perform(\"getGasPrice\", {})];\n case 2:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getGasPrice\",\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getBalance = function(addressOrName, blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getBalance\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getBalance\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getTransactionCount = function(addressOrName, blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getTransactionCount\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result).toNumber()];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getTransactionCount\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getCode = function(addressOrName, blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getCode\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getCode\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getStorageAt = function(addressOrName, position, blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag),\n position: Promise.resolve(position).then(function(p4) {\n return (0, bytes_1.hexValue)(p4);\n })\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getStorageAt\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getStorageAt\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._wrapTransaction = function(tx, hash3, startBlock) {\n var _this = this;\n if (hash3 != null && (0, bytes_1.hexDataLength)(hash3) !== 32) {\n throw new Error(\"invalid response - sendTransaction\");\n }\n var result = tx;\n if (hash3 != null && tx.hash !== hash3) {\n logger.throwError(\"Transaction hash mismatch from Provider.sendTransaction.\", logger_1.Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash3 });\n }\n result.wait = function(confirms, timeout) {\n return __awaiter4(_this, void 0, void 0, function() {\n var replacement, receipt;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (confirms == null) {\n confirms = 1;\n }\n if (timeout == null) {\n timeout = 0;\n }\n replacement = void 0;\n if (confirms !== 0 && startBlock != null) {\n replacement = {\n data: tx.data,\n from: tx.from,\n nonce: tx.nonce,\n to: tx.to,\n value: tx.value,\n startBlock\n };\n }\n return [4, this._waitForTransaction(tx.hash, confirms, timeout, replacement)];\n case 1:\n receipt = _a.sent();\n if (receipt == null && confirms === 0) {\n return [2, null];\n }\n this._emitted[\"t:\" + tx.hash] = receipt.blockNumber;\n if (receipt.status === 0) {\n logger.throwError(\"transaction failed\", logger_1.Logger.errors.CALL_EXCEPTION, {\n transactionHash: tx.hash,\n transaction: tx,\n receipt\n });\n }\n return [2, receipt];\n }\n });\n });\n };\n return result;\n };\n BaseProvider2.prototype.sendTransaction = function(signedTransaction) {\n return __awaiter4(this, void 0, void 0, function() {\n var hexTx, tx, blockNumber, hash3, error_7;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, Promise.resolve(signedTransaction).then(function(t3) {\n return (0, bytes_1.hexlify)(t3);\n })];\n case 2:\n hexTx = _a.sent();\n tx = this.formatter.transaction(signedTransaction);\n if (tx.confirmations == null) {\n tx.confirmations = 0;\n }\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 3:\n blockNumber = _a.sent();\n _a.label = 4;\n case 4:\n _a.trys.push([4, 6, , 7]);\n return [4, this.perform(\"sendTransaction\", { signedTransaction: hexTx })];\n case 5:\n hash3 = _a.sent();\n return [2, this._wrapTransaction(tx, hash3, blockNumber)];\n case 6:\n error_7 = _a.sent();\n error_7.transaction = tx;\n error_7.transactionHash = tx.hash;\n throw error_7;\n case 7:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._getTransactionRequest = function(transaction) {\n return __awaiter4(this, void 0, void 0, function() {\n var values, tx, _a, _b;\n var _this = this;\n return __generator4(this, function(_c) {\n switch (_c.label) {\n case 0:\n return [4, transaction];\n case 1:\n values = _c.sent();\n tx = {};\n [\"from\", \"to\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 ? _this._getAddress(v2) : null;\n });\n });\n [\"gasLimit\", \"gasPrice\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"value\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 ? bignumber_1.BigNumber.from(v2) : null;\n });\n });\n [\"type\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 != null ? v2 : null;\n });\n });\n if (values.accessList) {\n tx.accessList = this.formatter.accessList(values.accessList);\n }\n [\"data\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 ? (0, bytes_1.hexlify)(v2) : null;\n });\n });\n _b = (_a = this.formatter).transactionRequest;\n return [4, (0, properties_1.resolveProperties)(tx)];\n case 2:\n return [2, _b.apply(_a, [_c.sent()])];\n }\n });\n });\n };\n BaseProvider2.prototype._getFilter = function(filter) {\n return __awaiter4(this, void 0, void 0, function() {\n var result, _a, _b;\n var _this = this;\n return __generator4(this, function(_c) {\n switch (_c.label) {\n case 0:\n return [4, filter];\n case 1:\n filter = _c.sent();\n result = {};\n if (filter.address != null) {\n result.address = this._getAddress(filter.address);\n }\n [\"blockHash\", \"topics\"].forEach(function(key) {\n if (filter[key] == null) {\n return;\n }\n result[key] = filter[key];\n });\n [\"fromBlock\", \"toBlock\"].forEach(function(key) {\n if (filter[key] == null) {\n return;\n }\n result[key] = _this._getBlockTag(filter[key]);\n });\n _b = (_a = this.formatter).filter;\n return [4, (0, properties_1.resolveProperties)(result)];\n case 2:\n return [2, _b.apply(_a, [_c.sent()])];\n }\n });\n });\n };\n BaseProvider2.prototype._call = function(transaction, blockTag, attempt) {\n return __awaiter4(this, void 0, void 0, function() {\n var txSender, result, data, sender, urls, urlsOffset, urlsLength, urlsData, u2, url, calldata, callbackSelector, extraData, ccipResult, tx, error_8;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (attempt >= MAX_CCIP_REDIRECTS) {\n logger.throwError(\"CCIP read exceeded maximum redirections\", logger_1.Logger.errors.SERVER_ERROR, {\n redirects: attempt,\n transaction\n });\n }\n txSender = transaction.to;\n return [4, this.perform(\"call\", { transaction, blockTag })];\n case 1:\n result = _a.sent();\n if (!(attempt >= 0 && blockTag === \"latest\" && txSender != null && result.substring(0, 10) === \"0x556f1830\" && (0, bytes_1.hexDataLength)(result) % 32 === 4))\n return [3, 5];\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n data = (0, bytes_1.hexDataSlice)(result, 4);\n sender = (0, bytes_1.hexDataSlice)(data, 0, 32);\n if (!bignumber_1.BigNumber.from(sender).eq(txSender)) {\n logger.throwError(\"CCIP Read sender did not match\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n urls = [];\n urlsOffset = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(data, 32, 64)).toNumber();\n urlsLength = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(data, urlsOffset, urlsOffset + 32)).toNumber();\n urlsData = (0, bytes_1.hexDataSlice)(data, urlsOffset + 32);\n for (u2 = 0; u2 < urlsLength; u2++) {\n url = _parseString(urlsData, u2 * 32);\n if (url == null) {\n logger.throwError(\"CCIP Read contained corrupt URL string\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n urls.push(url);\n }\n calldata = _parseBytes(data, 64);\n if (!bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(data, 100, 128)).isZero()) {\n logger.throwError(\"CCIP Read callback selector included junk\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n callbackSelector = (0, bytes_1.hexDataSlice)(data, 96, 100);\n extraData = _parseBytes(data, 128);\n return [4, this.ccipReadFetch(transaction, calldata, urls)];\n case 3:\n ccipResult = _a.sent();\n if (ccipResult == null) {\n logger.throwError(\"CCIP Read disabled or provided no URLs\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n tx = {\n to: txSender,\n data: (0, bytes_1.hexConcat)([callbackSelector, encodeBytes3([ccipResult, extraData])])\n };\n return [2, this._call(tx, blockTag, attempt + 1)];\n case 4:\n error_8 = _a.sent();\n if (error_8.code === logger_1.Logger.errors.SERVER_ERROR) {\n throw error_8;\n }\n return [3, 5];\n case 5:\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"call\",\n params: { transaction, blockTag },\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.call = function(transaction, blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var resolved;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n transaction: this._getTransactionRequest(transaction),\n blockTag: this._getBlockTag(blockTag),\n ccipReadEnabled: Promise.resolve(transaction.ccipReadEnabled)\n })];\n case 2:\n resolved = _a.sent();\n return [2, this._call(resolved.transaction, resolved.blockTag, resolved.ccipReadEnabled ? 0 : -1)];\n }\n });\n });\n };\n BaseProvider2.prototype.estimateGas = function(transaction) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n transaction: this._getTransactionRequest(transaction)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"estimateGas\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"estimateGas\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._getAddress = function(addressOrName) {\n return __awaiter4(this, void 0, void 0, function() {\n var address;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, addressOrName];\n case 1:\n addressOrName = _a.sent();\n if (typeof addressOrName !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", addressOrName);\n }\n return [4, this.resolveName(addressOrName)];\n case 2:\n address = _a.sent();\n if (address == null) {\n logger.throwError(\"ENS name not configured\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName(\" + JSON.stringify(addressOrName) + \")\"\n });\n }\n return [2, address];\n }\n });\n });\n };\n BaseProvider2.prototype._getBlock = function(blockHashOrBlockTag, includeTransactions) {\n return __awaiter4(this, void 0, void 0, function() {\n var blockNumber, params, _a, error_9;\n var _this = this;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _b.sent();\n return [4, blockHashOrBlockTag];\n case 2:\n blockHashOrBlockTag = _b.sent();\n blockNumber = -128;\n params = {\n includeTransactions: !!includeTransactions\n };\n if (!(0, bytes_1.isHexString)(blockHashOrBlockTag, 32))\n return [3, 3];\n params.blockHash = blockHashOrBlockTag;\n return [3, 6];\n case 3:\n _b.trys.push([3, 5, , 6]);\n _a = params;\n return [4, this._getBlockTag(blockHashOrBlockTag)];\n case 4:\n _a.blockTag = _b.sent();\n if ((0, bytes_1.isHexString)(params.blockTag)) {\n blockNumber = parseInt(params.blockTag.substring(2), 16);\n }\n return [3, 6];\n case 5:\n error_9 = _b.sent();\n logger.throwArgumentError(\"invalid block hash or block tag\", \"blockHashOrBlockTag\", blockHashOrBlockTag);\n return [3, 6];\n case 6:\n return [2, (0, web_1.poll)(function() {\n return __awaiter4(_this, void 0, void 0, function() {\n var block, blockNumber_1, i3, tx, confirmations, blockWithTxs;\n var _this2 = this;\n return __generator4(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.perform(\"getBlock\", params)];\n case 1:\n block = _a2.sent();\n if (block == null) {\n if (params.blockHash != null) {\n if (this._emitted[\"b:\" + params.blockHash] == null) {\n return [2, null];\n }\n }\n if (params.blockTag != null) {\n if (blockNumber > this._emitted.block) {\n return [2, null];\n }\n }\n return [2, void 0];\n }\n if (!includeTransactions)\n return [3, 8];\n blockNumber_1 = null;\n i3 = 0;\n _a2.label = 2;\n case 2:\n if (!(i3 < block.transactions.length))\n return [3, 7];\n tx = block.transactions[i3];\n if (!(tx.blockNumber == null))\n return [3, 3];\n tx.confirmations = 0;\n return [3, 6];\n case 3:\n if (!(tx.confirmations == null))\n return [3, 6];\n if (!(blockNumber_1 == null))\n return [3, 5];\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 4:\n blockNumber_1 = _a2.sent();\n _a2.label = 5;\n case 5:\n confirmations = blockNumber_1 - tx.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n tx.confirmations = confirmations;\n _a2.label = 6;\n case 6:\n i3++;\n return [3, 2];\n case 7:\n blockWithTxs = this.formatter.blockWithTransactions(block);\n blockWithTxs.transactions = blockWithTxs.transactions.map(function(tx2) {\n return _this2._wrapTransaction(tx2);\n });\n return [2, blockWithTxs];\n case 8:\n return [2, this.formatter.block(block)];\n }\n });\n });\n }, { oncePoll: this })];\n }\n });\n });\n };\n BaseProvider2.prototype.getBlock = function(blockHashOrBlockTag) {\n return this._getBlock(blockHashOrBlockTag, false);\n };\n BaseProvider2.prototype.getBlockWithTransactions = function(blockHashOrBlockTag) {\n return this._getBlock(blockHashOrBlockTag, true);\n };\n BaseProvider2.prototype.getTransaction = function(transactionHash) {\n return __awaiter4(this, void 0, void 0, function() {\n var params;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, transactionHash];\n case 2:\n transactionHash = _a.sent();\n params = { transactionHash: this.formatter.hash(transactionHash, true) };\n return [2, (0, web_1.poll)(function() {\n return __awaiter4(_this, void 0, void 0, function() {\n var result, tx, blockNumber, confirmations;\n return __generator4(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.perform(\"getTransaction\", params)];\n case 1:\n result = _a2.sent();\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return [2, null];\n }\n return [2, void 0];\n }\n tx = this.formatter.transactionResponse(result);\n if (!(tx.blockNumber == null))\n return [3, 2];\n tx.confirmations = 0;\n return [3, 4];\n case 2:\n if (!(tx.confirmations == null))\n return [3, 4];\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 3:\n blockNumber = _a2.sent();\n confirmations = blockNumber - tx.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n tx.confirmations = confirmations;\n _a2.label = 4;\n case 4:\n return [2, this._wrapTransaction(tx)];\n }\n });\n });\n }, { oncePoll: this })];\n }\n });\n });\n };\n BaseProvider2.prototype.getTransactionReceipt = function(transactionHash) {\n return __awaiter4(this, void 0, void 0, function() {\n var params;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, transactionHash];\n case 2:\n transactionHash = _a.sent();\n params = { transactionHash: this.formatter.hash(transactionHash, true) };\n return [2, (0, web_1.poll)(function() {\n return __awaiter4(_this, void 0, void 0, function() {\n var result, receipt, blockNumber, confirmations;\n return __generator4(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.perform(\"getTransactionReceipt\", params)];\n case 1:\n result = _a2.sent();\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return [2, null];\n }\n return [2, void 0];\n }\n if (result.blockHash == null) {\n return [2, void 0];\n }\n receipt = this.formatter.receipt(result);\n if (!(receipt.blockNumber == null))\n return [3, 2];\n receipt.confirmations = 0;\n return [3, 4];\n case 2:\n if (!(receipt.confirmations == null))\n return [3, 4];\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 3:\n blockNumber = _a2.sent();\n confirmations = blockNumber - receipt.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n receipt.confirmations = confirmations;\n _a2.label = 4;\n case 4:\n return [2, receipt];\n }\n });\n });\n }, { oncePoll: this })];\n }\n });\n });\n };\n BaseProvider2.prototype.getLogs = function(filter) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, logs;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({ filter: this._getFilter(filter) })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getLogs\", params)];\n case 3:\n logs = _a.sent();\n logs.forEach(function(log) {\n if (log.removed == null) {\n log.removed = false;\n }\n });\n return [2, formatter_1.Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(logs)];\n }\n });\n });\n };\n BaseProvider2.prototype.getEtherPrice = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [2, this.perform(\"getEtherPrice\", {})];\n }\n });\n });\n };\n BaseProvider2.prototype._getBlockTag = function(blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var blockNumber;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, blockTag];\n case 1:\n blockTag = _a.sent();\n if (!(typeof blockTag === \"number\" && blockTag < 0))\n return [3, 3];\n if (blockTag % 1) {\n logger.throwArgumentError(\"invalid BlockTag\", \"blockTag\", blockTag);\n }\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 2:\n blockNumber = _a.sent();\n blockNumber += blockTag;\n if (blockNumber < 0) {\n blockNumber = 0;\n }\n return [2, this.formatter.blockTag(blockNumber)];\n case 3:\n return [2, this.formatter.blockTag(blockTag)];\n }\n });\n });\n };\n BaseProvider2.prototype.getResolver = function(name) {\n return __awaiter4(this, void 0, void 0, function() {\n var currentName, addr, resolver, _a;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n currentName = name;\n _b.label = 1;\n case 1:\n if (false)\n return [3, 6];\n if (currentName === \"\" || currentName === \".\") {\n return [2, null];\n }\n if (name !== \"eth\" && currentName === \"eth\") {\n return [2, null];\n }\n return [4, this._getResolver(currentName, \"getResolver\")];\n case 2:\n addr = _b.sent();\n if (!(addr != null))\n return [3, 5];\n resolver = new Resolver(this, addr, name);\n _a = currentName !== name;\n if (!_a)\n return [3, 4];\n return [4, resolver.supportsWildcard()];\n case 3:\n _a = !_b.sent();\n _b.label = 4;\n case 4:\n if (_a) {\n return [2, null];\n }\n return [2, resolver];\n case 5:\n currentName = currentName.split(\".\").slice(1).join(\".\");\n return [3, 1];\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._getResolver = function(name, operation) {\n return __awaiter4(this, void 0, void 0, function() {\n var network, addrData, error_10;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (operation == null) {\n operation = \"ENS\";\n }\n return [4, this.getNetwork()];\n case 1:\n network = _a.sent();\n if (!network.ensAddress) {\n logger.throwError(\"network does not support ENS\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation, network: network.name });\n }\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.call({\n to: network.ensAddress,\n data: \"0x0178b8bf\" + (0, hash_1.namehash)(name).substring(2)\n })];\n case 3:\n addrData = _a.sent();\n return [2, this.formatter.callAddress(addrData)];\n case 4:\n error_10 = _a.sent();\n return [3, 5];\n case 5:\n return [2, null];\n }\n });\n });\n };\n BaseProvider2.prototype.resolveName = function(name) {\n return __awaiter4(this, void 0, void 0, function() {\n var resolver;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, name];\n case 1:\n name = _a.sent();\n try {\n return [2, Promise.resolve(this.formatter.address(name))];\n } catch (error) {\n if ((0, bytes_1.isHexString)(name)) {\n throw error;\n }\n }\n if (typeof name !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name\", \"name\", name);\n }\n return [4, this.getResolver(name)];\n case 2:\n resolver = _a.sent();\n if (!resolver) {\n return [2, null];\n }\n return [4, resolver.getAddress()];\n case 3:\n return [2, _a.sent()];\n }\n });\n });\n };\n BaseProvider2.prototype.lookupAddress = function(address) {\n return __awaiter4(this, void 0, void 0, function() {\n var node, resolverAddr, name, _a, addr;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n return [4, address];\n case 1:\n address = _b.sent();\n address = this.formatter.address(address);\n node = address.substring(2).toLowerCase() + \".addr.reverse\";\n return [4, this._getResolver(node, \"lookupAddress\")];\n case 2:\n resolverAddr = _b.sent();\n if (resolverAddr == null) {\n return [2, null];\n }\n _a = _parseString;\n return [4, this.call({\n to: resolverAddr,\n data: \"0x691f3431\" + (0, hash_1.namehash)(node).substring(2)\n })];\n case 3:\n name = _a.apply(void 0, [_b.sent(), 0]);\n return [4, this.resolveName(name)];\n case 4:\n addr = _b.sent();\n if (addr != address) {\n return [2, null];\n }\n return [2, name];\n }\n });\n });\n };\n BaseProvider2.prototype.getAvatar = function(nameOrAddress) {\n return __awaiter4(this, void 0, void 0, function() {\n var resolver, address, node, resolverAddress, avatar_1, error_11, name_1, _a, error_12, avatar;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n resolver = null;\n if (!(0, bytes_1.isHexString)(nameOrAddress))\n return [3, 10];\n address = this.formatter.address(nameOrAddress);\n node = address.substring(2).toLowerCase() + \".addr.reverse\";\n return [4, this._getResolver(node, \"getAvatar\")];\n case 1:\n resolverAddress = _b.sent();\n if (!resolverAddress) {\n return [2, null];\n }\n resolver = new Resolver(this, resolverAddress, node);\n _b.label = 2;\n case 2:\n _b.trys.push([2, 4, , 5]);\n return [4, resolver.getAvatar()];\n case 3:\n avatar_1 = _b.sent();\n if (avatar_1) {\n return [2, avatar_1.url];\n }\n return [3, 5];\n case 4:\n error_11 = _b.sent();\n if (error_11.code !== logger_1.Logger.errors.CALL_EXCEPTION) {\n throw error_11;\n }\n return [3, 5];\n case 5:\n _b.trys.push([5, 8, , 9]);\n _a = _parseString;\n return [4, this.call({\n to: resolverAddress,\n data: \"0x691f3431\" + (0, hash_1.namehash)(node).substring(2)\n })];\n case 6:\n name_1 = _a.apply(void 0, [_b.sent(), 0]);\n return [4, this.getResolver(name_1)];\n case 7:\n resolver = _b.sent();\n return [3, 9];\n case 8:\n error_12 = _b.sent();\n if (error_12.code !== logger_1.Logger.errors.CALL_EXCEPTION) {\n throw error_12;\n }\n return [2, null];\n case 9:\n return [3, 12];\n case 10:\n return [4, this.getResolver(nameOrAddress)];\n case 11:\n resolver = _b.sent();\n if (!resolver) {\n return [2, null];\n }\n _b.label = 12;\n case 12:\n return [4, resolver.getAvatar()];\n case 13:\n avatar = _b.sent();\n if (avatar == null) {\n return [2, null];\n }\n return [2, avatar.url];\n }\n });\n });\n };\n BaseProvider2.prototype.perform = function(method, params) {\n return logger.throwError(method + \" not implemented\", logger_1.Logger.errors.NOT_IMPLEMENTED, { operation: method });\n };\n BaseProvider2.prototype._startEvent = function(event) {\n this.polling = this._events.filter(function(e2) {\n return e2.pollable();\n }).length > 0;\n };\n BaseProvider2.prototype._stopEvent = function(event) {\n this.polling = this._events.filter(function(e2) {\n return e2.pollable();\n }).length > 0;\n };\n BaseProvider2.prototype._addEventListener = function(eventName, listener, once2) {\n var event = new Event2(getEventTag(eventName), listener, once2);\n this._events.push(event);\n this._startEvent(event);\n return this;\n };\n BaseProvider2.prototype.on = function(eventName, listener) {\n return this._addEventListener(eventName, listener, false);\n };\n BaseProvider2.prototype.once = function(eventName, listener) {\n return this._addEventListener(eventName, listener, true);\n };\n BaseProvider2.prototype.emit = function(eventName) {\n var _this = this;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var result = false;\n var stopped = [];\n var eventTag = getEventTag(eventName);\n this._events = this._events.filter(function(event) {\n if (event.tag !== eventTag) {\n return true;\n }\n setTimeout(function() {\n event.listener.apply(_this, args);\n }, 0);\n result = true;\n if (event.once) {\n stopped.push(event);\n return false;\n }\n return true;\n });\n stopped.forEach(function(event) {\n _this._stopEvent(event);\n });\n return result;\n };\n BaseProvider2.prototype.listenerCount = function(eventName) {\n if (!eventName) {\n return this._events.length;\n }\n var eventTag = getEventTag(eventName);\n return this._events.filter(function(event) {\n return event.tag === eventTag;\n }).length;\n };\n BaseProvider2.prototype.listeners = function(eventName) {\n if (eventName == null) {\n return this._events.map(function(event) {\n return event.listener;\n });\n }\n var eventTag = getEventTag(eventName);\n return this._events.filter(function(event) {\n return event.tag === eventTag;\n }).map(function(event) {\n return event.listener;\n });\n };\n BaseProvider2.prototype.off = function(eventName, listener) {\n var _this = this;\n if (listener == null) {\n return this.removeAllListeners(eventName);\n }\n var stopped = [];\n var found = false;\n var eventTag = getEventTag(eventName);\n this._events = this._events.filter(function(event) {\n if (event.tag !== eventTag || event.listener != listener) {\n return true;\n }\n if (found) {\n return true;\n }\n found = true;\n stopped.push(event);\n return false;\n });\n stopped.forEach(function(event) {\n _this._stopEvent(event);\n });\n return this;\n };\n BaseProvider2.prototype.removeAllListeners = function(eventName) {\n var _this = this;\n var stopped = [];\n if (eventName == null) {\n stopped = this._events;\n this._events = [];\n } else {\n var eventTag_1 = getEventTag(eventName);\n this._events = this._events.filter(function(event) {\n if (event.tag !== eventTag_1) {\n return true;\n }\n stopped.push(event);\n return false;\n });\n }\n stopped.forEach(function(event) {\n _this._stopEvent(event);\n });\n return this;\n };\n return BaseProvider2;\n }(abstract_provider_1.Provider)\n );\n exports3.BaseProvider = BaseProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-provider.js\n var require_json_rpc_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.JsonRpcProvider = exports3.JsonRpcSigner = void 0;\n var abstract_signer_1 = require_lib15();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var hash_1 = require_lib12();\n var properties_1 = require_lib4();\n var strings_1 = require_lib9();\n var transactions_1 = require_lib17();\n var web_1 = require_lib28();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var base_provider_1 = require_base_provider();\n var errorGas = [\"call\", \"estimateGas\"];\n function spelunk(value, requireData) {\n if (value == null) {\n return null;\n }\n if (typeof value.message === \"string\" && value.message.match(\"reverted\")) {\n var data = (0, bytes_1.isHexString)(value.data) ? value.data : null;\n if (!requireData || data) {\n return { message: value.message, data };\n }\n }\n if (typeof value === \"object\") {\n for (var key in value) {\n var result = spelunk(value[key], requireData);\n if (result) {\n return result;\n }\n }\n return null;\n }\n if (typeof value === \"string\") {\n try {\n return spelunk(JSON.parse(value), requireData);\n } catch (error) {\n }\n }\n return null;\n }\n function checkError(method, error, params) {\n var transaction = params.transaction || params.signedTransaction;\n if (method === \"call\") {\n var result = spelunk(error, true);\n if (result) {\n return result.data;\n }\n logger.throwError(\"missing revert data in call exception; Transaction reverted without a reason string\", logger_1.Logger.errors.CALL_EXCEPTION, {\n data: \"0x\",\n transaction,\n error\n });\n }\n if (method === \"estimateGas\") {\n var result = spelunk(error.body, false);\n if (result == null) {\n result = spelunk(error, false);\n }\n if (result) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n reason: result.message,\n method,\n transaction,\n error\n });\n }\n }\n var message2 = error.message;\n if (error.code === logger_1.Logger.errors.SERVER_ERROR && error.error && typeof error.error.message === \"string\") {\n message2 = error.error.message;\n } else if (typeof error.body === \"string\") {\n message2 = error.body;\n } else if (typeof error.responseText === \"string\") {\n message2 = error.responseText;\n }\n message2 = (message2 || \"\").toLowerCase();\n if (message2.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", logger_1.Logger.errors.INSUFFICIENT_FUNDS, {\n error,\n method,\n transaction\n });\n }\n if (message2.match(/nonce (is )?too low/i)) {\n logger.throwError(\"nonce has already been used\", logger_1.Logger.errors.NONCE_EXPIRED, {\n error,\n method,\n transaction\n });\n }\n if (message2.match(/replacement transaction underpriced|transaction gas price.*too low/i)) {\n logger.throwError(\"replacement fee too low\", logger_1.Logger.errors.REPLACEMENT_UNDERPRICED, {\n error,\n method,\n transaction\n });\n }\n if (message2.match(/only replay-protected/i)) {\n logger.throwError(\"legacy pre-eip-155 transactions not supported\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n error,\n method,\n transaction\n });\n }\n if (errorGas.indexOf(method) >= 0 && message2.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error,\n method,\n transaction\n });\n }\n throw error;\n }\n function timer(timeout) {\n return new Promise(function(resolve) {\n setTimeout(resolve, timeout);\n });\n }\n function getResult(payload) {\n if (payload.error) {\n var error = new Error(payload.error.message);\n error.code = payload.error.code;\n error.data = payload.error.data;\n throw error;\n }\n return payload.result;\n }\n function getLowerCase(value) {\n if (value) {\n return value.toLowerCase();\n }\n return value;\n }\n var _constructorGuard = {};\n var JsonRpcSigner = (\n /** @class */\n function(_super) {\n __extends4(JsonRpcSigner2, _super);\n function JsonRpcSigner2(constructorGuard, provider, addressOrIndex) {\n var _this = _super.call(this) || this;\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"do not call the JsonRpcSigner constructor directly; use provider.getSigner\");\n }\n (0, properties_1.defineReadOnly)(_this, \"provider\", provider);\n if (addressOrIndex == null) {\n addressOrIndex = 0;\n }\n if (typeof addressOrIndex === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"_address\", _this.provider.formatter.address(addressOrIndex));\n (0, properties_1.defineReadOnly)(_this, \"_index\", null);\n } else if (typeof addressOrIndex === \"number\") {\n (0, properties_1.defineReadOnly)(_this, \"_index\", addressOrIndex);\n (0, properties_1.defineReadOnly)(_this, \"_address\", null);\n } else {\n logger.throwArgumentError(\"invalid address or index\", \"addressOrIndex\", addressOrIndex);\n }\n return _this;\n }\n JsonRpcSigner2.prototype.connect = function(provider) {\n return logger.throwError(\"cannot alter JSON-RPC Signer connection\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"connect\"\n });\n };\n JsonRpcSigner2.prototype.connectUnchecked = function() {\n return new UncheckedJsonRpcSigner(_constructorGuard, this.provider, this._address || this._index);\n };\n JsonRpcSigner2.prototype.getAddress = function() {\n var _this = this;\n if (this._address) {\n return Promise.resolve(this._address);\n }\n return this.provider.send(\"eth_accounts\", []).then(function(accounts) {\n if (accounts.length <= _this._index) {\n logger.throwError(\"unknown account #\" + _this._index, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress\"\n });\n }\n return _this.provider.formatter.address(accounts[_this._index]);\n });\n };\n JsonRpcSigner2.prototype.sendUncheckedTransaction = function(transaction) {\n var _this = this;\n transaction = (0, properties_1.shallowCopy)(transaction);\n var fromAddress = this.getAddress().then(function(address) {\n if (address) {\n address = address.toLowerCase();\n }\n return address;\n });\n if (transaction.gasLimit == null) {\n var estimate = (0, properties_1.shallowCopy)(transaction);\n estimate.from = fromAddress;\n transaction.gasLimit = this.provider.estimateGas(estimate);\n }\n if (transaction.to != null) {\n transaction.to = Promise.resolve(transaction.to).then(function(to) {\n return __awaiter4(_this, void 0, void 0, function() {\n var address;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (to == null) {\n return [2, null];\n }\n return [4, this.provider.resolveName(to)];\n case 1:\n address = _a.sent();\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return [2, address];\n }\n });\n });\n });\n }\n return (0, properties_1.resolveProperties)({\n tx: (0, properties_1.resolveProperties)(transaction),\n sender: fromAddress\n }).then(function(_a) {\n var tx = _a.tx, sender = _a.sender;\n if (tx.from != null) {\n if (tx.from.toLowerCase() !== sender) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n } else {\n tx.from = sender;\n }\n var hexTx = _this.provider.constructor.hexlifyTransaction(tx, { from: true });\n return _this.provider.send(\"eth_sendTransaction\", [hexTx]).then(function(hash3) {\n return hash3;\n }, function(error) {\n if (typeof error.message === \"string\" && error.message.match(/user denied/i)) {\n logger.throwError(\"user rejected transaction\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"sendTransaction\",\n transaction: tx\n });\n }\n return checkError(\"sendTransaction\", error, hexTx);\n });\n });\n };\n JsonRpcSigner2.prototype.signTransaction = function(transaction) {\n return logger.throwError(\"signing transactions is unsupported\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signTransaction\"\n });\n };\n JsonRpcSigner2.prototype.sendTransaction = function(transaction) {\n return __awaiter4(this, void 0, void 0, function() {\n var blockNumber, hash3, error_1;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval)];\n case 1:\n blockNumber = _a.sent();\n return [4, this.sendUncheckedTransaction(transaction)];\n case 2:\n hash3 = _a.sent();\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, (0, web_1.poll)(function() {\n return __awaiter4(_this, void 0, void 0, function() {\n var tx;\n return __generator4(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.provider.getTransaction(hash3)];\n case 1:\n tx = _a2.sent();\n if (tx === null) {\n return [2, void 0];\n }\n return [2, this.provider._wrapTransaction(tx, hash3, blockNumber)];\n }\n });\n });\n }, { oncePoll: this.provider })];\n case 4:\n return [2, _a.sent()];\n case 5:\n error_1 = _a.sent();\n error_1.transactionHash = hash3;\n throw error_1;\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype.signMessage = function(message2) {\n return __awaiter4(this, void 0, void 0, function() {\n var data, address, error_2;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n data = typeof message2 === \"string\" ? (0, strings_1.toUtf8Bytes)(message2) : message2;\n return [4, this.getAddress()];\n case 1:\n address = _a.sent();\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.provider.send(\"personal_sign\", [(0, bytes_1.hexlify)(data), address.toLowerCase()])];\n case 3:\n return [2, _a.sent()];\n case 4:\n error_2 = _a.sent();\n if (typeof error_2.message === \"string\" && error_2.message.match(/user denied/i)) {\n logger.throwError(\"user rejected signing\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"signMessage\",\n from: address,\n messageData: message2\n });\n }\n throw error_2;\n case 5:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype._legacySignMessage = function(message2) {\n return __awaiter4(this, void 0, void 0, function() {\n var data, address, error_3;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n data = typeof message2 === \"string\" ? (0, strings_1.toUtf8Bytes)(message2) : message2;\n return [4, this.getAddress()];\n case 1:\n address = _a.sent();\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.provider.send(\"eth_sign\", [address.toLowerCase(), (0, bytes_1.hexlify)(data)])];\n case 3:\n return [2, _a.sent()];\n case 4:\n error_3 = _a.sent();\n if (typeof error_3.message === \"string\" && error_3.message.match(/user denied/i)) {\n logger.throwError(\"user rejected signing\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"_legacySignMessage\",\n from: address,\n messageData: message2\n });\n }\n throw error_3;\n case 5:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype._signTypedData = function(domain2, types2, value) {\n return __awaiter4(this, void 0, void 0, function() {\n var populated, address, error_4;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, hash_1._TypedDataEncoder.resolveNames(domain2, types2, value, function(name) {\n return _this.provider.resolveName(name);\n })];\n case 1:\n populated = _a.sent();\n return [4, this.getAddress()];\n case 2:\n address = _a.sent();\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, this.provider.send(\"eth_signTypedData_v4\", [\n address.toLowerCase(),\n JSON.stringify(hash_1._TypedDataEncoder.getPayload(populated.domain, types2, populated.value))\n ])];\n case 4:\n return [2, _a.sent()];\n case 5:\n error_4 = _a.sent();\n if (typeof error_4.message === \"string\" && error_4.message.match(/user denied/i)) {\n logger.throwError(\"user rejected signing\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"_signTypedData\",\n from: address,\n messageData: { domain: populated.domain, types: types2, value: populated.value }\n });\n }\n throw error_4;\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype.unlock = function(password) {\n return __awaiter4(this, void 0, void 0, function() {\n var provider, address;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n provider = this.provider;\n return [4, this.getAddress()];\n case 1:\n address = _a.sent();\n return [2, provider.send(\"personal_unlockAccount\", [address.toLowerCase(), password, null])];\n }\n });\n });\n };\n return JsonRpcSigner2;\n }(abstract_signer_1.Signer)\n );\n exports3.JsonRpcSigner = JsonRpcSigner;\n var UncheckedJsonRpcSigner = (\n /** @class */\n function(_super) {\n __extends4(UncheckedJsonRpcSigner2, _super);\n function UncheckedJsonRpcSigner2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n UncheckedJsonRpcSigner2.prototype.sendTransaction = function(transaction) {\n var _this = this;\n return this.sendUncheckedTransaction(transaction).then(function(hash3) {\n return {\n hash: hash3,\n nonce: null,\n gasLimit: null,\n gasPrice: null,\n data: null,\n value: null,\n chainId: null,\n confirmations: 0,\n from: null,\n wait: function(confirmations) {\n return _this.provider.waitForTransaction(hash3, confirmations);\n }\n };\n });\n };\n return UncheckedJsonRpcSigner2;\n }(JsonRpcSigner)\n );\n var allowedTransactionKeys = {\n chainId: true,\n data: true,\n gasLimit: true,\n gasPrice: true,\n nonce: true,\n to: true,\n value: true,\n type: true,\n accessList: true,\n maxFeePerGas: true,\n maxPriorityFeePerGas: true\n };\n var JsonRpcProvider = (\n /** @class */\n function(_super) {\n __extends4(JsonRpcProvider2, _super);\n function JsonRpcProvider2(url, network) {\n var _this = this;\n var networkOrReady = network;\n if (networkOrReady == null) {\n networkOrReady = new Promise(function(resolve, reject) {\n setTimeout(function() {\n _this.detectNetwork().then(function(network2) {\n resolve(network2);\n }, function(error) {\n reject(error);\n });\n }, 0);\n });\n }\n _this = _super.call(this, networkOrReady) || this;\n if (!url) {\n url = (0, properties_1.getStatic)(_this.constructor, \"defaultUrl\")();\n }\n if (typeof url === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"connection\", Object.freeze({\n url\n }));\n } else {\n (0, properties_1.defineReadOnly)(_this, \"connection\", Object.freeze((0, properties_1.shallowCopy)(url)));\n }\n _this._nextId = 42;\n return _this;\n }\n Object.defineProperty(JsonRpcProvider2.prototype, \"_cache\", {\n get: function() {\n if (this._eventLoopCache == null) {\n this._eventLoopCache = {};\n }\n return this._eventLoopCache;\n },\n enumerable: false,\n configurable: true\n });\n JsonRpcProvider2.defaultUrl = function() {\n return \"http://localhost:8545\";\n };\n JsonRpcProvider2.prototype.detectNetwork = function() {\n var _this = this;\n if (!this._cache[\"detectNetwork\"]) {\n this._cache[\"detectNetwork\"] = this._uncachedDetectNetwork();\n setTimeout(function() {\n _this._cache[\"detectNetwork\"] = null;\n }, 0);\n }\n return this._cache[\"detectNetwork\"];\n };\n JsonRpcProvider2.prototype._uncachedDetectNetwork = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var chainId, error_5, error_6, getNetwork;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, timer(0)];\n case 1:\n _a.sent();\n chainId = null;\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 9]);\n return [4, this.send(\"eth_chainId\", [])];\n case 3:\n chainId = _a.sent();\n return [3, 9];\n case 4:\n error_5 = _a.sent();\n _a.label = 5;\n case 5:\n _a.trys.push([5, 7, , 8]);\n return [4, this.send(\"net_version\", [])];\n case 6:\n chainId = _a.sent();\n return [3, 8];\n case 7:\n error_6 = _a.sent();\n return [3, 8];\n case 8:\n return [3, 9];\n case 9:\n if (chainId != null) {\n getNetwork = (0, properties_1.getStatic)(this.constructor, \"getNetwork\");\n try {\n return [2, getNetwork(bignumber_1.BigNumber.from(chainId).toNumber())];\n } catch (error) {\n return [2, logger.throwError(\"could not detect network\", logger_1.Logger.errors.NETWORK_ERROR, {\n chainId,\n event: \"invalidNetwork\",\n serverError: error\n })];\n }\n }\n return [2, logger.throwError(\"could not detect network\", logger_1.Logger.errors.NETWORK_ERROR, {\n event: \"noNetwork\"\n })];\n }\n });\n });\n };\n JsonRpcProvider2.prototype.getSigner = function(addressOrIndex) {\n return new JsonRpcSigner(_constructorGuard, this, addressOrIndex);\n };\n JsonRpcProvider2.prototype.getUncheckedSigner = function(addressOrIndex) {\n return this.getSigner(addressOrIndex).connectUnchecked();\n };\n JsonRpcProvider2.prototype.listAccounts = function() {\n var _this = this;\n return this.send(\"eth_accounts\", []).then(function(accounts) {\n return accounts.map(function(a3) {\n return _this.formatter.address(a3);\n });\n });\n };\n JsonRpcProvider2.prototype.send = function(method, params) {\n var _this = this;\n var request = {\n method,\n params,\n id: this._nextId++,\n jsonrpc: \"2.0\"\n };\n this.emit(\"debug\", {\n action: \"request\",\n request: (0, properties_1.deepCopy)(request),\n provider: this\n });\n var cache = [\"eth_chainId\", \"eth_blockNumber\"].indexOf(method) >= 0;\n if (cache && this._cache[method]) {\n return this._cache[method];\n }\n var result = (0, web_1.fetchJson)(this.connection, JSON.stringify(request), getResult).then(function(result2) {\n _this.emit(\"debug\", {\n action: \"response\",\n request,\n response: result2,\n provider: _this\n });\n return result2;\n }, function(error) {\n _this.emit(\"debug\", {\n action: \"response\",\n error,\n request,\n provider: _this\n });\n throw error;\n });\n if (cache) {\n this._cache[method] = result;\n setTimeout(function() {\n _this._cache[method] = null;\n }, 0);\n }\n return result;\n };\n JsonRpcProvider2.prototype.prepareRequest = function(method, params) {\n switch (method) {\n case \"getBlockNumber\":\n return [\"eth_blockNumber\", []];\n case \"getGasPrice\":\n return [\"eth_gasPrice\", []];\n case \"getBalance\":\n return [\"eth_getBalance\", [getLowerCase(params.address), params.blockTag]];\n case \"getTransactionCount\":\n return [\"eth_getTransactionCount\", [getLowerCase(params.address), params.blockTag]];\n case \"getCode\":\n return [\"eth_getCode\", [getLowerCase(params.address), params.blockTag]];\n case \"getStorageAt\":\n return [\"eth_getStorageAt\", [getLowerCase(params.address), (0, bytes_1.hexZeroPad)(params.position, 32), params.blockTag]];\n case \"sendTransaction\":\n return [\"eth_sendRawTransaction\", [params.signedTransaction]];\n case \"getBlock\":\n if (params.blockTag) {\n return [\"eth_getBlockByNumber\", [params.blockTag, !!params.includeTransactions]];\n } else if (params.blockHash) {\n return [\"eth_getBlockByHash\", [params.blockHash, !!params.includeTransactions]];\n }\n return null;\n case \"getTransaction\":\n return [\"eth_getTransactionByHash\", [params.transactionHash]];\n case \"getTransactionReceipt\":\n return [\"eth_getTransactionReceipt\", [params.transactionHash]];\n case \"call\": {\n var hexlifyTransaction = (0, properties_1.getStatic)(this.constructor, \"hexlifyTransaction\");\n return [\"eth_call\", [hexlifyTransaction(params.transaction, { from: true }), params.blockTag]];\n }\n case \"estimateGas\": {\n var hexlifyTransaction = (0, properties_1.getStatic)(this.constructor, \"hexlifyTransaction\");\n return [\"eth_estimateGas\", [hexlifyTransaction(params.transaction, { from: true })]];\n }\n case \"getLogs\":\n if (params.filter && params.filter.address != null) {\n params.filter.address = getLowerCase(params.filter.address);\n }\n return [\"eth_getLogs\", [params.filter]];\n default:\n break;\n }\n return null;\n };\n JsonRpcProvider2.prototype.perform = function(method, params) {\n return __awaiter4(this, void 0, void 0, function() {\n var tx, feeData, args, error_7;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(method === \"call\" || method === \"estimateGas\"))\n return [3, 2];\n tx = params.transaction;\n if (!(tx && tx.type != null && bignumber_1.BigNumber.from(tx.type).isZero()))\n return [3, 2];\n if (!(tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null))\n return [3, 2];\n return [4, this.getFeeData()];\n case 1:\n feeData = _a.sent();\n if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {\n params = (0, properties_1.shallowCopy)(params);\n params.transaction = (0, properties_1.shallowCopy)(tx);\n delete params.transaction.type;\n }\n _a.label = 2;\n case 2:\n args = this.prepareRequest(method, params);\n if (args == null) {\n logger.throwError(method + \" not implemented\", logger_1.Logger.errors.NOT_IMPLEMENTED, { operation: method });\n }\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, this.send(args[0], args[1])];\n case 4:\n return [2, _a.sent()];\n case 5:\n error_7 = _a.sent();\n return [2, checkError(method, error_7, params)];\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcProvider2.prototype._startEvent = function(event) {\n if (event.tag === \"pending\") {\n this._startPending();\n }\n _super.prototype._startEvent.call(this, event);\n };\n JsonRpcProvider2.prototype._startPending = function() {\n if (this._pendingFilter != null) {\n return;\n }\n var self2 = this;\n var pendingFilter = this.send(\"eth_newPendingTransactionFilter\", []);\n this._pendingFilter = pendingFilter;\n pendingFilter.then(function(filterId) {\n function poll2() {\n self2.send(\"eth_getFilterChanges\", [filterId]).then(function(hashes) {\n if (self2._pendingFilter != pendingFilter) {\n return null;\n }\n var seq = Promise.resolve();\n hashes.forEach(function(hash3) {\n self2._emitted[\"t:\" + hash3.toLowerCase()] = \"pending\";\n seq = seq.then(function() {\n return self2.getTransaction(hash3).then(function(tx) {\n self2.emit(\"pending\", tx);\n return null;\n });\n });\n });\n return seq.then(function() {\n return timer(1e3);\n });\n }).then(function() {\n if (self2._pendingFilter != pendingFilter) {\n self2.send(\"eth_uninstallFilter\", [filterId]);\n return;\n }\n setTimeout(function() {\n poll2();\n }, 0);\n return null;\n }).catch(function(error) {\n });\n }\n poll2();\n return filterId;\n }).catch(function(error) {\n });\n };\n JsonRpcProvider2.prototype._stopEvent = function(event) {\n if (event.tag === \"pending\" && this.listenerCount(\"pending\") === 0) {\n this._pendingFilter = null;\n }\n _super.prototype._stopEvent.call(this, event);\n };\n JsonRpcProvider2.hexlifyTransaction = function(transaction, allowExtra) {\n var allowed = (0, properties_1.shallowCopy)(allowedTransactionKeys);\n if (allowExtra) {\n for (var key in allowExtra) {\n if (allowExtra[key]) {\n allowed[key] = true;\n }\n }\n }\n (0, properties_1.checkProperties)(transaction, allowed);\n var result = {};\n [\"chainId\", \"gasLimit\", \"gasPrice\", \"type\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"value\"].forEach(function(key2) {\n if (transaction[key2] == null) {\n return;\n }\n var value = (0, bytes_1.hexValue)(bignumber_1.BigNumber.from(transaction[key2]));\n if (key2 === \"gasLimit\") {\n key2 = \"gas\";\n }\n result[key2] = value;\n });\n [\"from\", \"to\", \"data\"].forEach(function(key2) {\n if (transaction[key2] == null) {\n return;\n }\n result[key2] = (0, bytes_1.hexlify)(transaction[key2]);\n });\n if (transaction.accessList) {\n result[\"accessList\"] = (0, transactions_1.accessListify)(transaction.accessList);\n }\n return result;\n };\n return JsonRpcProvider2;\n }(base_provider_1.BaseProvider)\n );\n exports3.JsonRpcProvider = JsonRpcProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ws.js\n var require_browser_ws = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ws.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WebSocket = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var WS = null;\n exports3.WebSocket = WS;\n try {\n exports3.WebSocket = WS = WebSocket;\n if (WS == null) {\n throw new Error(\"inject please\");\n }\n } catch (error) {\n logger_2 = new logger_1.Logger(_version_1.version);\n exports3.WebSocket = WS = function() {\n logger_2.throwError(\"WebSockets not supported in this environment\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new WebSocket()\"\n });\n };\n }\n var logger_2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/websocket-provider.js\n var require_websocket_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/websocket-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WebSocketProvider = void 0;\n var bignumber_1 = require_lib3();\n var properties_1 = require_lib4();\n var json_rpc_provider_1 = require_json_rpc_provider();\n var ws_1 = require_browser_ws();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var NextId = 1;\n var WebSocketProvider = (\n /** @class */\n function(_super) {\n __extends4(WebSocketProvider2, _super);\n function WebSocketProvider2(url, network) {\n var _this = this;\n if (network === \"any\") {\n logger.throwError(\"WebSocketProvider does not support 'any' network yet\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"network:any\"\n });\n }\n if (typeof url === \"string\") {\n _this = _super.call(this, url, network) || this;\n } else {\n _this = _super.call(this, \"_websocket\", network) || this;\n }\n _this._pollingInterval = -1;\n _this._wsReady = false;\n if (typeof url === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"_websocket\", new ws_1.WebSocket(_this.connection.url));\n } else {\n (0, properties_1.defineReadOnly)(_this, \"_websocket\", url);\n }\n (0, properties_1.defineReadOnly)(_this, \"_requests\", {});\n (0, properties_1.defineReadOnly)(_this, \"_subs\", {});\n (0, properties_1.defineReadOnly)(_this, \"_subIds\", {});\n (0, properties_1.defineReadOnly)(_this, \"_detectNetwork\", _super.prototype.detectNetwork.call(_this));\n _this.websocket.onopen = function() {\n _this._wsReady = true;\n Object.keys(_this._requests).forEach(function(id) {\n _this.websocket.send(_this._requests[id].payload);\n });\n };\n _this.websocket.onmessage = function(messageEvent) {\n var data = messageEvent.data;\n var result = JSON.parse(data);\n if (result.id != null) {\n var id = String(result.id);\n var request = _this._requests[id];\n delete _this._requests[id];\n if (result.result !== void 0) {\n request.callback(null, result.result);\n _this.emit(\"debug\", {\n action: \"response\",\n request: JSON.parse(request.payload),\n response: result.result,\n provider: _this\n });\n } else {\n var error = null;\n if (result.error) {\n error = new Error(result.error.message || \"unknown error\");\n (0, properties_1.defineReadOnly)(error, \"code\", result.error.code || null);\n (0, properties_1.defineReadOnly)(error, \"response\", data);\n } else {\n error = new Error(\"unknown error\");\n }\n request.callback(error, void 0);\n _this.emit(\"debug\", {\n action: \"response\",\n error,\n request: JSON.parse(request.payload),\n provider: _this\n });\n }\n } else if (result.method === \"eth_subscription\") {\n var sub = _this._subs[result.params.subscription];\n if (sub) {\n sub.processFunc(result.params.result);\n }\n } else {\n console.warn(\"this should not happen\");\n }\n };\n var fauxPoll = setInterval(function() {\n _this.emit(\"poll\");\n }, 1e3);\n if (fauxPoll.unref) {\n fauxPoll.unref();\n }\n return _this;\n }\n Object.defineProperty(WebSocketProvider2.prototype, \"websocket\", {\n // Cannot narrow the type of _websocket, as that is not backwards compatible\n // so we add a getter and let the WebSocket be a public API.\n get: function() {\n return this._websocket;\n },\n enumerable: false,\n configurable: true\n });\n WebSocketProvider2.prototype.detectNetwork = function() {\n return this._detectNetwork;\n };\n Object.defineProperty(WebSocketProvider2.prototype, \"pollingInterval\", {\n get: function() {\n return 0;\n },\n set: function(value) {\n logger.throwError(\"cannot set polling interval on WebSocketProvider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setPollingInterval\"\n });\n },\n enumerable: false,\n configurable: true\n });\n WebSocketProvider2.prototype.resetEventsBlock = function(blockNumber) {\n logger.throwError(\"cannot reset events block on WebSocketProvider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resetEventBlock\"\n });\n };\n WebSocketProvider2.prototype.poll = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n return [2, null];\n });\n });\n };\n Object.defineProperty(WebSocketProvider2.prototype, \"polling\", {\n set: function(value) {\n if (!value) {\n return;\n }\n logger.throwError(\"cannot set polling on WebSocketProvider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setPolling\"\n });\n },\n enumerable: false,\n configurable: true\n });\n WebSocketProvider2.prototype.send = function(method, params) {\n var _this = this;\n var rid = NextId++;\n return new Promise(function(resolve, reject) {\n function callback(error, result) {\n if (error) {\n return reject(error);\n }\n return resolve(result);\n }\n var payload = JSON.stringify({\n method,\n params,\n id: rid,\n jsonrpc: \"2.0\"\n });\n _this.emit(\"debug\", {\n action: \"request\",\n request: JSON.parse(payload),\n provider: _this\n });\n _this._requests[String(rid)] = { callback, payload };\n if (_this._wsReady) {\n _this.websocket.send(payload);\n }\n });\n };\n WebSocketProvider2.defaultUrl = function() {\n return \"ws://localhost:8546\";\n };\n WebSocketProvider2.prototype._subscribe = function(tag, param, processFunc) {\n return __awaiter4(this, void 0, void 0, function() {\n var subIdPromise, subId;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n subIdPromise = this._subIds[tag];\n if (subIdPromise == null) {\n subIdPromise = Promise.all(param).then(function(param2) {\n return _this.send(\"eth_subscribe\", param2);\n });\n this._subIds[tag] = subIdPromise;\n }\n return [4, subIdPromise];\n case 1:\n subId = _a.sent();\n this._subs[subId] = { tag, processFunc };\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n WebSocketProvider2.prototype._startEvent = function(event) {\n var _this = this;\n switch (event.type) {\n case \"block\":\n this._subscribe(\"block\", [\"newHeads\"], function(result) {\n var blockNumber = bignumber_1.BigNumber.from(result.number).toNumber();\n _this._emitted.block = blockNumber;\n _this.emit(\"block\", blockNumber);\n });\n break;\n case \"pending\":\n this._subscribe(\"pending\", [\"newPendingTransactions\"], function(result) {\n _this.emit(\"pending\", result);\n });\n break;\n case \"filter\":\n this._subscribe(event.tag, [\"logs\", this._getFilter(event.filter)], function(result) {\n if (result.removed == null) {\n result.removed = false;\n }\n _this.emit(event.filter, _this.formatter.filterLog(result));\n });\n break;\n case \"tx\": {\n var emitReceipt_1 = function(event2) {\n var hash3 = event2.hash;\n _this.getTransactionReceipt(hash3).then(function(receipt) {\n if (!receipt) {\n return;\n }\n _this.emit(hash3, receipt);\n });\n };\n emitReceipt_1(event);\n this._subscribe(\"tx\", [\"newHeads\"], function(result) {\n _this._events.filter(function(e2) {\n return e2.type === \"tx\";\n }).forEach(emitReceipt_1);\n });\n break;\n }\n case \"debug\":\n case \"poll\":\n case \"willPoll\":\n case \"didPoll\":\n case \"error\":\n break;\n default:\n console.log(\"unhandled:\", event);\n break;\n }\n };\n WebSocketProvider2.prototype._stopEvent = function(event) {\n var _this = this;\n var tag = event.tag;\n if (event.type === \"tx\") {\n if (this._events.filter(function(e2) {\n return e2.type === \"tx\";\n }).length) {\n return;\n }\n tag = \"tx\";\n } else if (this.listenerCount(event.event)) {\n return;\n }\n var subId = this._subIds[tag];\n if (!subId) {\n return;\n }\n delete this._subIds[tag];\n subId.then(function(subId2) {\n if (!_this._subs[subId2]) {\n return;\n }\n delete _this._subs[subId2];\n _this.send(\"eth_unsubscribe\", [subId2]);\n });\n };\n WebSocketProvider2.prototype.destroy = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(this.websocket.readyState === ws_1.WebSocket.CONNECTING))\n return [3, 2];\n return [4, new Promise(function(resolve) {\n _this.websocket.onopen = function() {\n resolve(true);\n };\n _this.websocket.onerror = function() {\n resolve(false);\n };\n })];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n this.websocket.close(1e3);\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n return WebSocketProvider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.WebSocketProvider = WebSocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js\n var require_url_json_rpc_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.UrlJsonRpcProvider = exports3.StaticJsonRpcProvider = void 0;\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var json_rpc_provider_1 = require_json_rpc_provider();\n var StaticJsonRpcProvider = (\n /** @class */\n function(_super) {\n __extends4(StaticJsonRpcProvider2, _super);\n function StaticJsonRpcProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n StaticJsonRpcProvider2.prototype.detectNetwork = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var network;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n network = this.network;\n if (!(network == null))\n return [3, 2];\n return [4, _super.prototype.detectNetwork.call(this)];\n case 1:\n network = _a.sent();\n if (!network) {\n logger.throwError(\"no network detected\", logger_1.Logger.errors.UNKNOWN_ERROR, {});\n }\n if (this._network == null) {\n (0, properties_1.defineReadOnly)(this, \"_network\", network);\n this.emit(\"network\", network, null);\n }\n _a.label = 2;\n case 2:\n return [2, network];\n }\n });\n });\n };\n return StaticJsonRpcProvider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.StaticJsonRpcProvider = StaticJsonRpcProvider;\n var UrlJsonRpcProvider = (\n /** @class */\n function(_super) {\n __extends4(UrlJsonRpcProvider2, _super);\n function UrlJsonRpcProvider2(network, apiKey) {\n var _newTarget = this.constructor;\n var _this = this;\n logger.checkAbstract(_newTarget, UrlJsonRpcProvider2);\n network = (0, properties_1.getStatic)(_newTarget, \"getNetwork\")(network);\n apiKey = (0, properties_1.getStatic)(_newTarget, \"getApiKey\")(apiKey);\n var connection = (0, properties_1.getStatic)(_newTarget, \"getUrl\")(network, apiKey);\n _this = _super.call(this, connection, network) || this;\n if (typeof apiKey === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", apiKey);\n } else if (apiKey != null) {\n Object.keys(apiKey).forEach(function(key) {\n (0, properties_1.defineReadOnly)(_this, key, apiKey[key]);\n });\n }\n return _this;\n }\n UrlJsonRpcProvider2.prototype._startPending = function() {\n logger.warn(\"WARNING: API provider does not support pending filters\");\n };\n UrlJsonRpcProvider2.prototype.isCommunityResource = function() {\n return false;\n };\n UrlJsonRpcProvider2.prototype.getSigner = function(address) {\n return logger.throwError(\"API provider does not support signing\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: \"getSigner\" });\n };\n UrlJsonRpcProvider2.prototype.listAccounts = function() {\n return Promise.resolve([]);\n };\n UrlJsonRpcProvider2.getApiKey = function(apiKey) {\n return apiKey;\n };\n UrlJsonRpcProvider2.getUrl = function(network, apiKey) {\n return logger.throwError(\"not implemented; sub-classes must override getUrl\", logger_1.Logger.errors.NOT_IMPLEMENTED, {\n operation: \"getUrl\"\n });\n };\n return UrlJsonRpcProvider2;\n }(StaticJsonRpcProvider)\n );\n exports3.UrlJsonRpcProvider = UrlJsonRpcProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/alchemy-provider.js\n var require_alchemy_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/alchemy-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AlchemyProvider = exports3.AlchemyWebSocketProvider = void 0;\n var properties_1 = require_lib4();\n var formatter_1 = require_formatter();\n var websocket_provider_1 = require_websocket_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var defaultApiKey = \"_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC\";\n var AlchemyWebSocketProvider = (\n /** @class */\n function(_super) {\n __extends4(AlchemyWebSocketProvider2, _super);\n function AlchemyWebSocketProvider2(network, apiKey) {\n var _this = this;\n var provider = new AlchemyProvider(network, apiKey);\n var url = provider.connection.url.replace(/^http/i, \"ws\").replace(\".alchemyapi.\", \".ws.alchemyapi.\");\n _this = _super.call(this, url, provider.network) || this;\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", provider.apiKey);\n return _this;\n }\n AlchemyWebSocketProvider2.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n return AlchemyWebSocketProvider2;\n }(websocket_provider_1.WebSocketProvider)\n );\n exports3.AlchemyWebSocketProvider = AlchemyWebSocketProvider;\n var AlchemyProvider = (\n /** @class */\n function(_super) {\n __extends4(AlchemyProvider2, _super);\n function AlchemyProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AlchemyProvider2.getWebSocketProvider = function(network, apiKey) {\n return new AlchemyWebSocketProvider(network, apiKey);\n };\n AlchemyProvider2.getApiKey = function(apiKey) {\n if (apiKey == null) {\n return defaultApiKey;\n }\n if (apiKey && typeof apiKey !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey;\n };\n AlchemyProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"eth-mainnet.alchemyapi.io/v2/\";\n break;\n case \"goerli\":\n host = \"eth-goerli.g.alchemy.com/v2/\";\n break;\n case \"sepolia\":\n host = \"eth-sepolia.g.alchemy.com/v2/\";\n break;\n case \"matic\":\n host = \"polygon-mainnet.g.alchemy.com/v2/\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai.g.alchemy.com/v2/\";\n break;\n case \"arbitrum\":\n host = \"arb-mainnet.g.alchemy.com/v2/\";\n break;\n case \"arbitrum-goerli\":\n host = \"arb-goerli.g.alchemy.com/v2/\";\n break;\n case \"arbitrum-sepolia\":\n host = \"arb-sepolia.g.alchemy.com/v2/\";\n break;\n case \"optimism\":\n host = \"opt-mainnet.g.alchemy.com/v2/\";\n break;\n case \"optimism-goerli\":\n host = \"opt-goerli.g.alchemy.com/v2/\";\n break;\n case \"optimism-sepolia\":\n host = \"opt-sepolia.g.alchemy.com/v2/\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return {\n allowGzip: true,\n url: \"https://\" + host + apiKey,\n throttleCallback: function(attempt, url) {\n if (apiKey === defaultApiKey) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n };\n AlchemyProvider2.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n return AlchemyProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.AlchemyProvider = AlchemyProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/ankr-provider.js\n var require_ankr_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/ankr-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AnkrProvider = void 0;\n var formatter_1 = require_formatter();\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var defaultApiKey = \"9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972\";\n function getHost(name) {\n switch (name) {\n case \"homestead\":\n return \"rpc.ankr.com/eth/\";\n case \"ropsten\":\n return \"rpc.ankr.com/eth_ropsten/\";\n case \"rinkeby\":\n return \"rpc.ankr.com/eth_rinkeby/\";\n case \"goerli\":\n return \"rpc.ankr.com/eth_goerli/\";\n case \"sepolia\":\n return \"rpc.ankr.com/eth_sepolia/\";\n case \"matic\":\n return \"rpc.ankr.com/polygon/\";\n case \"maticmum\":\n return \"rpc.ankr.com/polygon_mumbai/\";\n case \"optimism\":\n return \"rpc.ankr.com/optimism/\";\n case \"optimism-goerli\":\n return \"rpc.ankr.com/optimism_testnet/\";\n case \"optimism-sepolia\":\n return \"rpc.ankr.com/optimism_sepolia/\";\n case \"arbitrum\":\n return \"rpc.ankr.com/arbitrum/\";\n }\n return logger.throwArgumentError(\"unsupported network\", \"name\", name);\n }\n var AnkrProvider = (\n /** @class */\n function(_super) {\n __extends4(AnkrProvider2, _super);\n function AnkrProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AnkrProvider2.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n AnkrProvider2.getApiKey = function(apiKey) {\n if (apiKey == null) {\n return defaultApiKey;\n }\n return apiKey;\n };\n AnkrProvider2.getUrl = function(network, apiKey) {\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n var connection = {\n allowGzip: true,\n url: \"https://\" + getHost(network.name) + apiKey,\n throttleCallback: function(attempt, url) {\n if (apiKey.apiKey === defaultApiKey) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n if (apiKey.projectSecret != null) {\n connection.user = \"\";\n connection.password = apiKey.projectSecret;\n }\n return connection;\n };\n return AnkrProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.AnkrProvider = AnkrProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/cloudflare-provider.js\n var require_cloudflare_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/cloudflare-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CloudflareProvider = void 0;\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var CloudflareProvider = (\n /** @class */\n function(_super) {\n __extends4(CloudflareProvider2, _super);\n function CloudflareProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CloudflareProvider2.getApiKey = function(apiKey) {\n if (apiKey != null) {\n logger.throwArgumentError(\"apiKey not supported for cloudflare\", \"apiKey\", apiKey);\n }\n return null;\n };\n CloudflareProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"https://cloudflare-eth.com/\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return host;\n };\n CloudflareProvider2.prototype.perform = function(method, params) {\n return __awaiter4(this, void 0, void 0, function() {\n var block;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(method === \"getBlockNumber\"))\n return [3, 2];\n return [4, _super.prototype.perform.call(this, \"getBlock\", { blockTag: \"latest\" })];\n case 1:\n block = _a.sent();\n return [2, block.number];\n case 2:\n return [2, _super.prototype.perform.call(this, method, params)];\n }\n });\n });\n };\n return CloudflareProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.CloudflareProvider = CloudflareProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/etherscan-provider.js\n var require_etherscan_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/etherscan-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EtherscanProvider = void 0;\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var web_1 = require_lib28();\n var formatter_1 = require_formatter();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var base_provider_1 = require_base_provider();\n function getTransactionPostData(transaction) {\n var result = {};\n for (var key in transaction) {\n if (transaction[key] == null) {\n continue;\n }\n var value = transaction[key];\n if (key === \"type\" && value === 0) {\n continue;\n }\n if ({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true }[key]) {\n value = (0, bytes_1.hexValue)((0, bytes_1.hexlify)(value));\n } else if (key === \"accessList\") {\n value = \"[\" + (0, transactions_1.accessListify)(value).map(function(set) {\n return '{address:\"' + set.address + '\",storageKeys:[\"' + set.storageKeys.join('\",\"') + '\"]}';\n }).join(\",\") + \"]\";\n } else {\n value = (0, bytes_1.hexlify)(value);\n }\n result[key] = value;\n }\n return result;\n }\n function getResult(result) {\n if (result.status == 0 && (result.message === \"No records found\" || result.message === \"No transactions found\")) {\n return result.result;\n }\n if (result.status != 1 || typeof result.message !== \"string\" || !result.message.match(/^OK/)) {\n var error = new Error(\"invalid response\");\n error.result = JSON.stringify(result);\n if ((result.result || \"\").toLowerCase().indexOf(\"rate limit\") >= 0) {\n error.throttleRetry = true;\n }\n throw error;\n }\n return result.result;\n }\n function getJsonResult(result) {\n if (result && result.status == 0 && result.message == \"NOTOK\" && (result.result || \"\").toLowerCase().indexOf(\"rate limit\") >= 0) {\n var error = new Error(\"throttled response\");\n error.result = JSON.stringify(result);\n error.throttleRetry = true;\n throw error;\n }\n if (result.jsonrpc != \"2.0\") {\n var error = new Error(\"invalid response\");\n error.result = JSON.stringify(result);\n throw error;\n }\n if (result.error) {\n var error = new Error(result.error.message || \"unknown error\");\n if (result.error.code) {\n error.code = result.error.code;\n }\n if (result.error.data) {\n error.data = result.error.data;\n }\n throw error;\n }\n return result.result;\n }\n function checkLogTag(blockTag) {\n if (blockTag === \"pending\") {\n throw new Error(\"pending not supported\");\n }\n if (blockTag === \"latest\") {\n return blockTag;\n }\n return parseInt(blockTag.substring(2), 16);\n }\n function checkError(method, error, transaction) {\n if (method === \"call\" && error.code === logger_1.Logger.errors.SERVER_ERROR) {\n var e2 = error.error;\n if (e2 && (e2.message.match(/reverted/i) || e2.message.match(/VM execution error/i))) {\n var data = e2.data;\n if (data) {\n data = \"0x\" + data.replace(/^.*0x/i, \"\");\n }\n if ((0, bytes_1.isHexString)(data)) {\n return data;\n }\n logger.throwError(\"missing revert data in call exception\", logger_1.Logger.errors.CALL_EXCEPTION, {\n error,\n data: \"0x\"\n });\n }\n }\n var message2 = error.message;\n if (error.code === logger_1.Logger.errors.SERVER_ERROR) {\n if (error.error && typeof error.error.message === \"string\") {\n message2 = error.error.message;\n } else if (typeof error.body === \"string\") {\n message2 = error.body;\n } else if (typeof error.responseText === \"string\") {\n message2 = error.responseText;\n }\n }\n message2 = (message2 || \"\").toLowerCase();\n if (message2.match(/insufficient funds/)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", logger_1.Logger.errors.INSUFFICIENT_FUNDS, {\n error,\n method,\n transaction\n });\n }\n if (message2.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) {\n logger.throwError(\"nonce has already been used\", logger_1.Logger.errors.NONCE_EXPIRED, {\n error,\n method,\n transaction\n });\n }\n if (message2.match(/another transaction with same nonce/)) {\n logger.throwError(\"replacement fee too low\", logger_1.Logger.errors.REPLACEMENT_UNDERPRICED, {\n error,\n method,\n transaction\n });\n }\n if (message2.match(/execution failed due to an exception|execution reverted/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error,\n method,\n transaction\n });\n }\n throw error;\n }\n var EtherscanProvider = (\n /** @class */\n function(_super) {\n __extends4(EtherscanProvider2, _super);\n function EtherscanProvider2(network, apiKey) {\n var _this = _super.call(this, network) || this;\n (0, properties_1.defineReadOnly)(_this, \"baseUrl\", _this.getBaseUrl());\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", apiKey || null);\n return _this;\n }\n EtherscanProvider2.prototype.getBaseUrl = function() {\n switch (this.network ? this.network.name : \"invalid\") {\n case \"homestead\":\n return \"https://api.etherscan.io\";\n case \"goerli\":\n return \"https://api-goerli.etherscan.io\";\n case \"sepolia\":\n return \"https://api-sepolia.etherscan.io\";\n case \"matic\":\n return \"https://api.polygonscan.com\";\n case \"maticmum\":\n return \"https://api-testnet.polygonscan.com\";\n case \"arbitrum\":\n return \"https://api.arbiscan.io\";\n case \"arbitrum-goerli\":\n return \"https://api-goerli.arbiscan.io\";\n case \"optimism\":\n return \"https://api-optimistic.etherscan.io\";\n case \"optimism-goerli\":\n return \"https://api-goerli-optimistic.etherscan.io\";\n default:\n }\n return logger.throwArgumentError(\"unsupported network\", \"network\", this.network.name);\n };\n EtherscanProvider2.prototype.getUrl = function(module2, params) {\n var query = Object.keys(params).reduce(function(accum, key) {\n var value = params[key];\n if (value != null) {\n accum += \"&\" + key + \"=\" + value;\n }\n return accum;\n }, \"\");\n var apiKey = this.apiKey ? \"&apikey=\" + this.apiKey : \"\";\n return this.baseUrl + \"/api?module=\" + module2 + query + apiKey;\n };\n EtherscanProvider2.prototype.getPostUrl = function() {\n return this.baseUrl + \"/api\";\n };\n EtherscanProvider2.prototype.getPostData = function(module2, params) {\n params.module = module2;\n params.apikey = this.apiKey;\n return params;\n };\n EtherscanProvider2.prototype.fetch = function(module2, params, post) {\n return __awaiter4(this, void 0, void 0, function() {\n var url, payload, procFunc, connection, payloadStr, result;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n url = post ? this.getPostUrl() : this.getUrl(module2, params);\n payload = post ? this.getPostData(module2, params) : null;\n procFunc = module2 === \"proxy\" ? getJsonResult : getResult;\n this.emit(\"debug\", {\n action: \"request\",\n request: url,\n provider: this\n });\n connection = {\n url,\n throttleSlotInterval: 1e3,\n throttleCallback: function(attempt, url2) {\n if (_this.isCommunityResource()) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n payloadStr = null;\n if (payload) {\n connection.headers = { \"content-type\": \"application/x-www-form-urlencoded; charset=UTF-8\" };\n payloadStr = Object.keys(payload).map(function(key) {\n return key + \"=\" + payload[key];\n }).join(\"&\");\n }\n return [4, (0, web_1.fetchJson)(connection, payloadStr, procFunc || getJsonResult)];\n case 1:\n result = _a.sent();\n this.emit(\"debug\", {\n action: \"response\",\n request: url,\n response: (0, properties_1.deepCopy)(result),\n provider: this\n });\n return [2, result];\n }\n });\n });\n };\n EtherscanProvider2.prototype.detectNetwork = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n return [2, this.network];\n });\n });\n };\n EtherscanProvider2.prototype.perform = function(method, params) {\n return __awaiter4(this, void 0, void 0, function() {\n var _a, postData, error_1, postData, error_2, args, topic0, logs, blocks, i3, log, block, _b;\n return __generator4(this, function(_c) {\n switch (_c.label) {\n case 0:\n _a = method;\n switch (_a) {\n case \"getBlockNumber\":\n return [3, 1];\n case \"getGasPrice\":\n return [3, 2];\n case \"getBalance\":\n return [3, 3];\n case \"getTransactionCount\":\n return [3, 4];\n case \"getCode\":\n return [3, 5];\n case \"getStorageAt\":\n return [3, 6];\n case \"sendTransaction\":\n return [3, 7];\n case \"getBlock\":\n return [3, 8];\n case \"getTransaction\":\n return [3, 9];\n case \"getTransactionReceipt\":\n return [3, 10];\n case \"call\":\n return [3, 11];\n case \"estimateGas\":\n return [3, 15];\n case \"getLogs\":\n return [3, 19];\n case \"getEtherPrice\":\n return [3, 26];\n }\n return [3, 28];\n case 1:\n return [2, this.fetch(\"proxy\", { action: \"eth_blockNumber\" })];\n case 2:\n return [2, this.fetch(\"proxy\", { action: \"eth_gasPrice\" })];\n case 3:\n return [2, this.fetch(\"account\", {\n action: \"balance\",\n address: params.address,\n tag: params.blockTag\n })];\n case 4:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getTransactionCount\",\n address: params.address,\n tag: params.blockTag\n })];\n case 5:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getCode\",\n address: params.address,\n tag: params.blockTag\n })];\n case 6:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getStorageAt\",\n address: params.address,\n position: params.position,\n tag: params.blockTag\n })];\n case 7:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_sendRawTransaction\",\n hex: params.signedTransaction\n }, true).catch(function(error) {\n return checkError(\"sendTransaction\", error, params.signedTransaction);\n })];\n case 8:\n if (params.blockTag) {\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getBlockByNumber\",\n tag: params.blockTag,\n boolean: params.includeTransactions ? \"true\" : \"false\"\n })];\n }\n throw new Error(\"getBlock by blockHash not implemented\");\n case 9:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getTransactionByHash\",\n txhash: params.transactionHash\n })];\n case 10:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getTransactionReceipt\",\n txhash: params.transactionHash\n })];\n case 11:\n if (params.blockTag !== \"latest\") {\n throw new Error(\"EtherscanProvider does not support blockTag for call\");\n }\n postData = getTransactionPostData(params.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_call\";\n _c.label = 12;\n case 12:\n _c.trys.push([12, 14, , 15]);\n return [4, this.fetch(\"proxy\", postData, true)];\n case 13:\n return [2, _c.sent()];\n case 14:\n error_1 = _c.sent();\n return [2, checkError(\"call\", error_1, params.transaction)];\n case 15:\n postData = getTransactionPostData(params.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_estimateGas\";\n _c.label = 16;\n case 16:\n _c.trys.push([16, 18, , 19]);\n return [4, this.fetch(\"proxy\", postData, true)];\n case 17:\n return [2, _c.sent()];\n case 18:\n error_2 = _c.sent();\n return [2, checkError(\"estimateGas\", error_2, params.transaction)];\n case 19:\n args = { action: \"getLogs\" };\n if (params.filter.fromBlock) {\n args.fromBlock = checkLogTag(params.filter.fromBlock);\n }\n if (params.filter.toBlock) {\n args.toBlock = checkLogTag(params.filter.toBlock);\n }\n if (params.filter.address) {\n args.address = params.filter.address;\n }\n if (params.filter.topics && params.filter.topics.length > 0) {\n if (params.filter.topics.length > 1) {\n logger.throwError(\"unsupported topic count\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics });\n }\n if (params.filter.topics.length === 1) {\n topic0 = params.filter.topics[0];\n if (typeof topic0 !== \"string\" || topic0.length !== 66) {\n logger.throwError(\"unsupported topic format\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { topic0 });\n }\n args.topic0 = topic0;\n }\n }\n return [4, this.fetch(\"logs\", args)];\n case 20:\n logs = _c.sent();\n blocks = {};\n i3 = 0;\n _c.label = 21;\n case 21:\n if (!(i3 < logs.length))\n return [3, 25];\n log = logs[i3];\n if (log.blockHash != null) {\n return [3, 24];\n }\n if (!(blocks[log.blockNumber] == null))\n return [3, 23];\n return [4, this.getBlock(log.blockNumber)];\n case 22:\n block = _c.sent();\n if (block) {\n blocks[log.blockNumber] = block.hash;\n }\n _c.label = 23;\n case 23:\n log.blockHash = blocks[log.blockNumber];\n _c.label = 24;\n case 24:\n i3++;\n return [3, 21];\n case 25:\n return [2, logs];\n case 26:\n if (this.network.name !== \"homestead\") {\n return [2, 0];\n }\n _b = parseFloat;\n return [4, this.fetch(\"stats\", { action: \"ethprice\" })];\n case 27:\n return [2, _b.apply(void 0, [_c.sent().ethusd])];\n case 28:\n return [3, 29];\n case 29:\n return [2, _super.prototype.perform.call(this, method, params)];\n }\n });\n });\n };\n EtherscanProvider2.prototype.getHistory = function(addressOrName, startBlock, endBlock) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, result;\n var _a;\n var _this = this;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n _a = {\n action: \"txlist\"\n };\n return [4, this.resolveName(addressOrName)];\n case 1:\n params = (_a.address = _b.sent(), _a.startblock = startBlock == null ? 0 : startBlock, _a.endblock = endBlock == null ? 99999999 : endBlock, _a.sort = \"asc\", _a);\n return [4, this.fetch(\"account\", params)];\n case 2:\n result = _b.sent();\n return [2, result.map(function(tx) {\n [\"contractAddress\", \"to\"].forEach(function(key) {\n if (tx[key] == \"\") {\n delete tx[key];\n }\n });\n if (tx.creates == null && tx.contractAddress != null) {\n tx.creates = tx.contractAddress;\n }\n var item = _this.formatter.transactionResponse(tx);\n if (tx.timeStamp) {\n item.timestamp = parseInt(tx.timeStamp);\n }\n return item;\n })];\n }\n });\n });\n };\n EtherscanProvider2.prototype.isCommunityResource = function() {\n return this.apiKey == null;\n };\n return EtherscanProvider2;\n }(base_provider_1.BaseProvider)\n );\n exports3.EtherscanProvider = EtherscanProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/fallback-provider.js\n var require_fallback_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/fallback-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FallbackProvider = void 0;\n var abstract_provider_1 = require_lib14();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var random_1 = require_lib24();\n var web_1 = require_lib28();\n var base_provider_1 = require_base_provider();\n var formatter_1 = require_formatter();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n function now() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n function checkNetworks(networks) {\n var result = null;\n for (var i3 = 0; i3 < networks.length; i3++) {\n var network = networks[i3];\n if (network == null) {\n return null;\n }\n if (result) {\n if (!(result.name === network.name && result.chainId === network.chainId && (result.ensAddress === network.ensAddress || result.ensAddress == null && network.ensAddress == null))) {\n logger.throwArgumentError(\"provider mismatch\", \"networks\", networks);\n }\n } else {\n result = network;\n }\n }\n return result;\n }\n function median(values, maxDelta) {\n values = values.slice().sort();\n var middle = Math.floor(values.length / 2);\n if (values.length % 2) {\n return values[middle];\n }\n var a3 = values[middle - 1], b4 = values[middle];\n if (maxDelta != null && Math.abs(a3 - b4) > maxDelta) {\n return null;\n }\n return (a3 + b4) / 2;\n }\n function serialize(value) {\n if (value === null) {\n return \"null\";\n } else if (typeof value === \"number\" || typeof value === \"boolean\") {\n return JSON.stringify(value);\n } else if (typeof value === \"string\") {\n return value;\n } else if (bignumber_1.BigNumber.isBigNumber(value)) {\n return value.toString();\n } else if (Array.isArray(value)) {\n return JSON.stringify(value.map(function(i3) {\n return serialize(i3);\n }));\n } else if (typeof value === \"object\") {\n var keys = Object.keys(value);\n keys.sort();\n return \"{\" + keys.map(function(key) {\n var v2 = value[key];\n if (typeof v2 === \"function\") {\n v2 = \"[function]\";\n } else {\n v2 = serialize(v2);\n }\n return JSON.stringify(key) + \":\" + v2;\n }).join(\",\") + \"}\";\n }\n throw new Error(\"unknown value type: \" + typeof value);\n }\n var nextRid = 1;\n function stall(duration) {\n var cancel = null;\n var timer = null;\n var promise = new Promise(function(resolve) {\n cancel = function() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n resolve();\n };\n timer = setTimeout(cancel, duration);\n });\n var wait2 = function(func) {\n promise = promise.then(func);\n return promise;\n };\n function getPromise() {\n return promise;\n }\n return { cancel, getPromise, wait: wait2 };\n }\n var ForwardErrors = [\n logger_1.Logger.errors.CALL_EXCEPTION,\n logger_1.Logger.errors.INSUFFICIENT_FUNDS,\n logger_1.Logger.errors.NONCE_EXPIRED,\n logger_1.Logger.errors.REPLACEMENT_UNDERPRICED,\n logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT\n ];\n var ForwardProperties = [\n \"address\",\n \"args\",\n \"errorArgs\",\n \"errorSignature\",\n \"method\",\n \"transaction\"\n ];\n function exposeDebugConfig(config2, now2) {\n var result = {\n weight: config2.weight\n };\n Object.defineProperty(result, \"provider\", { get: function() {\n return config2.provider;\n } });\n if (config2.start) {\n result.start = config2.start;\n }\n if (now2) {\n result.duration = now2 - config2.start;\n }\n if (config2.done) {\n if (config2.error) {\n result.error = config2.error;\n } else {\n result.result = config2.result || null;\n }\n }\n return result;\n }\n function normalizedTally(normalize2, quorum) {\n return function(configs) {\n var tally = {};\n configs.forEach(function(c4) {\n var value = normalize2(c4.result);\n if (!tally[value]) {\n tally[value] = { count: 0, result: c4.result };\n }\n tally[value].count++;\n });\n var keys = Object.keys(tally);\n for (var i3 = 0; i3 < keys.length; i3++) {\n var check2 = tally[keys[i3]];\n if (check2.count >= quorum) {\n return check2.result;\n }\n }\n return void 0;\n };\n }\n function getProcessFunc(provider, method, params) {\n var normalize2 = serialize;\n switch (method) {\n case \"getBlockNumber\":\n return function(configs) {\n var values = configs.map(function(c4) {\n return c4.result;\n });\n var blockNumber = median(configs.map(function(c4) {\n return c4.result;\n }), 2);\n if (blockNumber == null) {\n return void 0;\n }\n blockNumber = Math.ceil(blockNumber);\n if (values.indexOf(blockNumber + 1) >= 0) {\n blockNumber++;\n }\n if (blockNumber >= provider._highestBlockNumber) {\n provider._highestBlockNumber = blockNumber;\n }\n return provider._highestBlockNumber;\n };\n case \"getGasPrice\":\n return function(configs) {\n var values = configs.map(function(c4) {\n return c4.result;\n });\n values.sort();\n return values[Math.floor(values.length / 2)];\n };\n case \"getEtherPrice\":\n return function(configs) {\n return median(configs.map(function(c4) {\n return c4.result;\n }));\n };\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n case \"getStorageAt\":\n case \"call\":\n case \"estimateGas\":\n case \"getLogs\":\n break;\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n normalize2 = function(tx) {\n if (tx == null) {\n return null;\n }\n tx = (0, properties_1.shallowCopy)(tx);\n tx.confirmations = -1;\n return serialize(tx);\n };\n break;\n case \"getBlock\":\n if (params.includeTransactions) {\n normalize2 = function(block) {\n if (block == null) {\n return null;\n }\n block = (0, properties_1.shallowCopy)(block);\n block.transactions = block.transactions.map(function(tx) {\n tx = (0, properties_1.shallowCopy)(tx);\n tx.confirmations = -1;\n return tx;\n });\n return serialize(block);\n };\n } else {\n normalize2 = function(block) {\n if (block == null) {\n return null;\n }\n return serialize(block);\n };\n }\n break;\n default:\n throw new Error(\"unknown method: \" + method);\n }\n return normalizedTally(normalize2, provider.quorum);\n }\n function waitForSync(config2, blockNumber) {\n return __awaiter4(this, void 0, void 0, function() {\n var provider;\n return __generator4(this, function(_a) {\n provider = config2.provider;\n if (provider.blockNumber != null && provider.blockNumber >= blockNumber || blockNumber === -1) {\n return [2, provider];\n }\n return [2, (0, web_1.poll)(function() {\n return new Promise(function(resolve, reject) {\n setTimeout(function() {\n if (provider.blockNumber >= blockNumber) {\n return resolve(provider);\n }\n if (config2.cancelled) {\n return resolve(null);\n }\n return resolve(void 0);\n }, 0);\n });\n }, { oncePoll: provider })];\n });\n });\n }\n function getRunner(config2, currentBlockNumber, method, params) {\n return __awaiter4(this, void 0, void 0, function() {\n var provider, _a, filter;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n provider = config2.provider;\n _a = method;\n switch (_a) {\n case \"getBlockNumber\":\n return [3, 1];\n case \"getGasPrice\":\n return [3, 1];\n case \"getEtherPrice\":\n return [3, 2];\n case \"getBalance\":\n return [3, 3];\n case \"getTransactionCount\":\n return [3, 3];\n case \"getCode\":\n return [3, 3];\n case \"getStorageAt\":\n return [3, 6];\n case \"getBlock\":\n return [3, 9];\n case \"call\":\n return [3, 12];\n case \"estimateGas\":\n return [3, 12];\n case \"getTransaction\":\n return [3, 15];\n case \"getTransactionReceipt\":\n return [3, 15];\n case \"getLogs\":\n return [3, 16];\n }\n return [3, 19];\n case 1:\n return [2, provider[method]()];\n case 2:\n if (provider.getEtherPrice) {\n return [2, provider.getEtherPrice()];\n }\n return [3, 19];\n case 3:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 5];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 4:\n provider = _b.sent();\n _b.label = 5;\n case 5:\n return [2, provider[method](params.address, params.blockTag || \"latest\")];\n case 6:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 8];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 7:\n provider = _b.sent();\n _b.label = 8;\n case 8:\n return [2, provider.getStorageAt(params.address, params.position, params.blockTag || \"latest\")];\n case 9:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 11];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 10:\n provider = _b.sent();\n _b.label = 11;\n case 11:\n return [2, provider[params.includeTransactions ? \"getBlockWithTransactions\" : \"getBlock\"](params.blockTag || params.blockHash)];\n case 12:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 14];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 13:\n provider = _b.sent();\n _b.label = 14;\n case 14:\n if (method === \"call\" && params.blockTag) {\n return [2, provider[method](params.transaction, params.blockTag)];\n }\n return [2, provider[method](params.transaction)];\n case 15:\n return [2, provider[method](params.transactionHash)];\n case 16:\n filter = params.filter;\n if (!(filter.fromBlock && (0, bytes_1.isHexString)(filter.fromBlock) || filter.toBlock && (0, bytes_1.isHexString)(filter.toBlock)))\n return [3, 18];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 17:\n provider = _b.sent();\n _b.label = 18;\n case 18:\n return [2, provider.getLogs(filter)];\n case 19:\n return [2, logger.throwError(\"unknown method error\", logger_1.Logger.errors.UNKNOWN_ERROR, {\n method,\n params\n })];\n }\n });\n });\n }\n var FallbackProvider = (\n /** @class */\n function(_super) {\n __extends4(FallbackProvider2, _super);\n function FallbackProvider2(providers, quorum) {\n var _this = this;\n if (providers.length === 0) {\n logger.throwArgumentError(\"missing providers\", \"providers\", providers);\n }\n var providerConfigs = providers.map(function(configOrProvider, index2) {\n if (abstract_provider_1.Provider.isProvider(configOrProvider)) {\n var stallTimeout = (0, formatter_1.isCommunityResource)(configOrProvider) ? 2e3 : 750;\n var priority = 1;\n return Object.freeze({ provider: configOrProvider, weight: 1, stallTimeout, priority });\n }\n var config2 = (0, properties_1.shallowCopy)(configOrProvider);\n if (config2.priority == null) {\n config2.priority = 1;\n }\n if (config2.stallTimeout == null) {\n config2.stallTimeout = (0, formatter_1.isCommunityResource)(configOrProvider) ? 2e3 : 750;\n }\n if (config2.weight == null) {\n config2.weight = 1;\n }\n var weight = config2.weight;\n if (weight % 1 || weight > 512 || weight < 1) {\n logger.throwArgumentError(\"invalid weight; must be integer in [1, 512]\", \"providers[\" + index2 + \"].weight\", weight);\n }\n return Object.freeze(config2);\n });\n var total = providerConfigs.reduce(function(accum, c4) {\n return accum + c4.weight;\n }, 0);\n if (quorum == null) {\n quorum = total / 2;\n } else if (quorum > total) {\n logger.throwArgumentError(\"quorum will always fail; larger than total weight\", \"quorum\", quorum);\n }\n var networkOrReady = checkNetworks(providerConfigs.map(function(c4) {\n return c4.provider.network;\n }));\n if (networkOrReady == null) {\n networkOrReady = new Promise(function(resolve, reject) {\n setTimeout(function() {\n _this.detectNetwork().then(resolve, reject);\n }, 0);\n });\n }\n _this = _super.call(this, networkOrReady) || this;\n (0, properties_1.defineReadOnly)(_this, \"providerConfigs\", Object.freeze(providerConfigs));\n (0, properties_1.defineReadOnly)(_this, \"quorum\", quorum);\n _this._highestBlockNumber = -1;\n return _this;\n }\n FallbackProvider2.prototype.detectNetwork = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var networks;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, Promise.all(this.providerConfigs.map(function(c4) {\n return c4.provider.getNetwork();\n }))];\n case 1:\n networks = _a.sent();\n return [2, checkNetworks(networks)];\n }\n });\n });\n };\n FallbackProvider2.prototype.perform = function(method, params) {\n return __awaiter4(this, void 0, void 0, function() {\n var results, i_1, result, processFunc, configs, currentBlockNumber, i3, first, _loop_1, this_1, state_1;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(method === \"sendTransaction\"))\n return [3, 2];\n return [4, Promise.all(this.providerConfigs.map(function(c4) {\n return c4.provider.sendTransaction(params.signedTransaction).then(function(result2) {\n return result2.hash;\n }, function(error) {\n return error;\n });\n }))];\n case 1:\n results = _a.sent();\n for (i_1 = 0; i_1 < results.length; i_1++) {\n result = results[i_1];\n if (typeof result === \"string\") {\n return [2, result];\n }\n }\n throw results[0];\n case 2:\n if (!(this._highestBlockNumber === -1 && method !== \"getBlockNumber\"))\n return [3, 4];\n return [4, this.getBlockNumber()];\n case 3:\n _a.sent();\n _a.label = 4;\n case 4:\n processFunc = getProcessFunc(this, method, params);\n configs = (0, random_1.shuffled)(this.providerConfigs.map(properties_1.shallowCopy));\n configs.sort(function(a3, b4) {\n return a3.priority - b4.priority;\n });\n currentBlockNumber = this._highestBlockNumber;\n i3 = 0;\n first = true;\n _loop_1 = function() {\n var t0, inflightWeight, _loop_2, waiting, results2, result2, errors;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n t0 = now();\n inflightWeight = configs.filter(function(c4) {\n return c4.runner && t0 - c4.start < c4.stallTimeout;\n }).reduce(function(accum, c4) {\n return accum + c4.weight;\n }, 0);\n _loop_2 = function() {\n var config2 = configs[i3++];\n var rid = nextRid++;\n config2.start = now();\n config2.staller = stall(config2.stallTimeout);\n config2.staller.wait(function() {\n config2.staller = null;\n });\n config2.runner = getRunner(config2, currentBlockNumber, method, params).then(function(result3) {\n config2.done = true;\n config2.result = result3;\n if (_this.listenerCount(\"debug\")) {\n _this.emit(\"debug\", {\n action: \"request\",\n rid,\n backend: exposeDebugConfig(config2, now()),\n request: { method, params: (0, properties_1.deepCopy)(params) },\n provider: _this\n });\n }\n }, function(error) {\n config2.done = true;\n config2.error = error;\n if (_this.listenerCount(\"debug\")) {\n _this.emit(\"debug\", {\n action: \"request\",\n rid,\n backend: exposeDebugConfig(config2, now()),\n request: { method, params: (0, properties_1.deepCopy)(params) },\n provider: _this\n });\n }\n });\n if (this_1.listenerCount(\"debug\")) {\n this_1.emit(\"debug\", {\n action: \"request\",\n rid,\n backend: exposeDebugConfig(config2, null),\n request: { method, params: (0, properties_1.deepCopy)(params) },\n provider: this_1\n });\n }\n inflightWeight += config2.weight;\n };\n while (inflightWeight < this_1.quorum && i3 < configs.length) {\n _loop_2();\n }\n waiting = [];\n configs.forEach(function(c4) {\n if (c4.done || !c4.runner) {\n return;\n }\n waiting.push(c4.runner);\n if (c4.staller) {\n waiting.push(c4.staller.getPromise());\n }\n });\n if (!waiting.length)\n return [3, 2];\n return [4, Promise.race(waiting)];\n case 1:\n _b.sent();\n _b.label = 2;\n case 2:\n results2 = configs.filter(function(c4) {\n return c4.done && c4.error == null;\n });\n if (!(results2.length >= this_1.quorum))\n return [3, 5];\n result2 = processFunc(results2);\n if (result2 !== void 0) {\n configs.forEach(function(c4) {\n if (c4.staller) {\n c4.staller.cancel();\n }\n c4.cancelled = true;\n });\n return [2, { value: result2 }];\n }\n if (!!first)\n return [3, 4];\n return [4, stall(100).getPromise()];\n case 3:\n _b.sent();\n _b.label = 4;\n case 4:\n first = false;\n _b.label = 5;\n case 5:\n errors = configs.reduce(function(accum, c4) {\n if (!c4.done || c4.error == null) {\n return accum;\n }\n var code = c4.error.code;\n if (ForwardErrors.indexOf(code) >= 0) {\n if (!accum[code]) {\n accum[code] = { error: c4.error, weight: 0 };\n }\n accum[code].weight += c4.weight;\n }\n return accum;\n }, {});\n Object.keys(errors).forEach(function(errorCode) {\n var tally = errors[errorCode];\n if (tally.weight < _this.quorum) {\n return;\n }\n configs.forEach(function(c4) {\n if (c4.staller) {\n c4.staller.cancel();\n }\n c4.cancelled = true;\n });\n var e2 = tally.error;\n var props = {};\n ForwardProperties.forEach(function(name) {\n if (e2[name] == null) {\n return;\n }\n props[name] = e2[name];\n });\n logger.throwError(e2.reason || e2.message, errorCode, props);\n });\n if (configs.filter(function(c4) {\n return !c4.done;\n }).length === 0) {\n return [2, \"break\"];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n };\n this_1 = this;\n _a.label = 5;\n case 5:\n if (false)\n return [3, 7];\n return [5, _loop_1()];\n case 6:\n state_1 = _a.sent();\n if (typeof state_1 === \"object\")\n return [2, state_1.value];\n if (state_1 === \"break\")\n return [3, 7];\n return [3, 5];\n case 7:\n configs.forEach(function(c4) {\n if (c4.staller) {\n c4.staller.cancel();\n }\n c4.cancelled = true;\n });\n return [2, logger.throwError(\"failed to meet quorum\", logger_1.Logger.errors.SERVER_ERROR, {\n method,\n params,\n //results: configs.map((c) => c.result),\n //errors: configs.map((c) => c.error),\n results: configs.map(function(c4) {\n return exposeDebugConfig(c4);\n }),\n provider: this\n })];\n }\n });\n });\n };\n return FallbackProvider2;\n }(base_provider_1.BaseProvider)\n );\n exports3.FallbackProvider = FallbackProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js\n var require_browser_ipc_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.IpcProvider = void 0;\n var IpcProvider = null;\n exports3.IpcProvider = IpcProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/infura-provider.js\n var require_infura_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/infura-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.InfuraProvider = exports3.InfuraWebSocketProvider = void 0;\n var properties_1 = require_lib4();\n var websocket_provider_1 = require_websocket_provider();\n var formatter_1 = require_formatter();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var defaultProjectId = \"84842078b09946638c03157f83405213\";\n var InfuraWebSocketProvider = (\n /** @class */\n function(_super) {\n __extends4(InfuraWebSocketProvider2, _super);\n function InfuraWebSocketProvider2(network, apiKey) {\n var _this = this;\n var provider = new InfuraProvider(network, apiKey);\n var connection = provider.connection;\n if (connection.password) {\n logger.throwError(\"INFURA WebSocket project secrets unsupported\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"InfuraProvider.getWebSocketProvider()\"\n });\n }\n var url = connection.url.replace(/^http/i, \"ws\").replace(\"/v3/\", \"/ws/v3/\");\n _this = _super.call(this, url, network) || this;\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", provider.projectId);\n (0, properties_1.defineReadOnly)(_this, \"projectId\", provider.projectId);\n (0, properties_1.defineReadOnly)(_this, \"projectSecret\", provider.projectSecret);\n return _this;\n }\n InfuraWebSocketProvider2.prototype.isCommunityResource = function() {\n return this.projectId === defaultProjectId;\n };\n return InfuraWebSocketProvider2;\n }(websocket_provider_1.WebSocketProvider)\n );\n exports3.InfuraWebSocketProvider = InfuraWebSocketProvider;\n var InfuraProvider = (\n /** @class */\n function(_super) {\n __extends4(InfuraProvider2, _super);\n function InfuraProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n InfuraProvider2.getWebSocketProvider = function(network, apiKey) {\n return new InfuraWebSocketProvider(network, apiKey);\n };\n InfuraProvider2.getApiKey = function(apiKey) {\n var apiKeyObj = {\n apiKey: defaultProjectId,\n projectId: defaultProjectId,\n projectSecret: null\n };\n if (apiKey == null) {\n return apiKeyObj;\n }\n if (typeof apiKey === \"string\") {\n apiKeyObj.projectId = apiKey;\n } else if (apiKey.projectSecret != null) {\n logger.assertArgument(typeof apiKey.projectId === \"string\", \"projectSecret requires a projectId\", \"projectId\", apiKey.projectId);\n logger.assertArgument(typeof apiKey.projectSecret === \"string\", \"invalid projectSecret\", \"projectSecret\", \"[REDACTED]\");\n apiKeyObj.projectId = apiKey.projectId;\n apiKeyObj.projectSecret = apiKey.projectSecret;\n } else if (apiKey.projectId) {\n apiKeyObj.projectId = apiKey.projectId;\n }\n apiKeyObj.apiKey = apiKeyObj.projectId;\n return apiKeyObj;\n };\n InfuraProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network ? network.name : \"unknown\") {\n case \"homestead\":\n host = \"mainnet.infura.io\";\n break;\n case \"goerli\":\n host = \"goerli.infura.io\";\n break;\n case \"sepolia\":\n host = \"sepolia.infura.io\";\n break;\n case \"matic\":\n host = \"polygon-mainnet.infura.io\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai.infura.io\";\n break;\n case \"optimism\":\n host = \"optimism-mainnet.infura.io\";\n break;\n case \"optimism-goerli\":\n host = \"optimism-goerli.infura.io\";\n break;\n case \"optimism-sepolia\":\n host = \"optimism-sepolia.infura.io\";\n break;\n case \"arbitrum\":\n host = \"arbitrum-mainnet.infura.io\";\n break;\n case \"arbitrum-goerli\":\n host = \"arbitrum-goerli.infura.io\";\n break;\n case \"arbitrum-sepolia\":\n host = \"arbitrum-sepolia.infura.io\";\n break;\n default:\n logger.throwError(\"unsupported network\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n var connection = {\n allowGzip: true,\n url: \"https://\" + host + \"/v3/\" + apiKey.projectId,\n throttleCallback: function(attempt, url) {\n if (apiKey.projectId === defaultProjectId) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n if (apiKey.projectSecret != null) {\n connection.user = \"\";\n connection.password = apiKey.projectSecret;\n }\n return connection;\n };\n InfuraProvider2.prototype.isCommunityResource = function() {\n return this.projectId === defaultProjectId;\n };\n return InfuraProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.InfuraProvider = InfuraProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js\n var require_json_rpc_batch_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.JsonRpcBatchProvider = void 0;\n var properties_1 = require_lib4();\n var web_1 = require_lib28();\n var json_rpc_provider_1 = require_json_rpc_provider();\n var JsonRpcBatchProvider = (\n /** @class */\n function(_super) {\n __extends4(JsonRpcBatchProvider2, _super);\n function JsonRpcBatchProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n JsonRpcBatchProvider2.prototype.send = function(method, params) {\n var _this = this;\n var request = {\n method,\n params,\n id: this._nextId++,\n jsonrpc: \"2.0\"\n };\n if (this._pendingBatch == null) {\n this._pendingBatch = [];\n }\n var inflightRequest = { request, resolve: null, reject: null };\n var promise = new Promise(function(resolve, reject) {\n inflightRequest.resolve = resolve;\n inflightRequest.reject = reject;\n });\n this._pendingBatch.push(inflightRequest);\n if (!this._pendingBatchAggregator) {\n this._pendingBatchAggregator = setTimeout(function() {\n var batch = _this._pendingBatch;\n _this._pendingBatch = null;\n _this._pendingBatchAggregator = null;\n var request2 = batch.map(function(inflight) {\n return inflight.request;\n });\n _this.emit(\"debug\", {\n action: \"requestBatch\",\n request: (0, properties_1.deepCopy)(request2),\n provider: _this\n });\n return (0, web_1.fetchJson)(_this.connection, JSON.stringify(request2)).then(function(result) {\n _this.emit(\"debug\", {\n action: \"response\",\n request: request2,\n response: result,\n provider: _this\n });\n batch.forEach(function(inflightRequest2, index2) {\n var payload = result[index2];\n if (payload.error) {\n var error = new Error(payload.error.message);\n error.code = payload.error.code;\n error.data = payload.error.data;\n inflightRequest2.reject(error);\n } else {\n inflightRequest2.resolve(payload.result);\n }\n });\n }, function(error) {\n _this.emit(\"debug\", {\n action: \"response\",\n error,\n request: request2,\n provider: _this\n });\n batch.forEach(function(inflightRequest2) {\n inflightRequest2.reject(error);\n });\n });\n }, 10);\n }\n return promise;\n };\n return JsonRpcBatchProvider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.JsonRpcBatchProvider = JsonRpcBatchProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/nodesmith-provider.js\n var require_nodesmith_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/nodesmith-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NodesmithProvider = void 0;\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var defaultApiKey = \"ETHERS_JS_SHARED\";\n var NodesmithProvider = (\n /** @class */\n function(_super) {\n __extends4(NodesmithProvider2, _super);\n function NodesmithProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NodesmithProvider2.getApiKey = function(apiKey) {\n if (apiKey && typeof apiKey !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey || defaultApiKey;\n };\n NodesmithProvider2.getUrl = function(network, apiKey) {\n logger.warn(\"NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.\");\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc\";\n break;\n case \"ropsten\":\n host = \"https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc\";\n break;\n case \"rinkeby\":\n host = \"https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc\";\n break;\n case \"goerli\":\n host = \"https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc\";\n break;\n case \"kovan\":\n host = \"https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return host + \"?apiKey=\" + apiKey;\n };\n return NodesmithProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.NodesmithProvider = NodesmithProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/pocket-provider.js\n var require_pocket_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/pocket-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PocketProvider = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var defaultApplicationId = \"62e1ad51b37b8e00394bda3b\";\n var PocketProvider = (\n /** @class */\n function(_super) {\n __extends4(PocketProvider2, _super);\n function PocketProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PocketProvider2.getApiKey = function(apiKey) {\n var apiKeyObj = {\n applicationId: null,\n loadBalancer: true,\n applicationSecretKey: null\n };\n if (apiKey == null) {\n apiKeyObj.applicationId = defaultApplicationId;\n } else if (typeof apiKey === \"string\") {\n apiKeyObj.applicationId = apiKey;\n } else if (apiKey.applicationSecretKey != null) {\n apiKeyObj.applicationId = apiKey.applicationId;\n apiKeyObj.applicationSecretKey = apiKey.applicationSecretKey;\n } else if (apiKey.applicationId) {\n apiKeyObj.applicationId = apiKey.applicationId;\n } else {\n logger.throwArgumentError(\"unsupported PocketProvider apiKey\", \"apiKey\", apiKey);\n }\n return apiKeyObj;\n };\n PocketProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network ? network.name : \"unknown\") {\n case \"goerli\":\n host = \"eth-goerli.gateway.pokt.network\";\n break;\n case \"homestead\":\n host = \"eth-mainnet.gateway.pokt.network\";\n break;\n case \"kovan\":\n host = \"poa-kovan.gateway.pokt.network\";\n break;\n case \"matic\":\n host = \"poly-mainnet.gateway.pokt.network\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai-rpc.gateway.pokt.network\";\n break;\n case \"rinkeby\":\n host = \"eth-rinkeby.gateway.pokt.network\";\n break;\n case \"ropsten\":\n host = \"eth-ropsten.gateway.pokt.network\";\n break;\n default:\n logger.throwError(\"unsupported network\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n var url = \"https://\" + host + \"/v1/lb/\" + apiKey.applicationId;\n var connection = { headers: {}, url };\n if (apiKey.applicationSecretKey != null) {\n connection.user = \"\";\n connection.password = apiKey.applicationSecretKey;\n }\n return connection;\n };\n PocketProvider2.prototype.isCommunityResource = function() {\n return this.applicationId === defaultApplicationId;\n };\n return PocketProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.PocketProvider = PocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/quicknode-provider.js\n var require_quicknode_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/quicknode-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.QuickNodeProvider = void 0;\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var defaultApiKey = \"919b412a057b5e9c9b6dce193c5a60242d6efadb\";\n var QuickNodeProvider = (\n /** @class */\n function(_super) {\n __extends4(QuickNodeProvider2, _super);\n function QuickNodeProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n QuickNodeProvider2.getApiKey = function(apiKey) {\n if (apiKey && typeof apiKey !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey || defaultApiKey;\n };\n QuickNodeProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"ethers.quiknode.pro\";\n break;\n case \"goerli\":\n host = \"ethers.ethereum-goerli.quiknode.pro\";\n break;\n case \"sepolia\":\n host = \"ethers.ethereum-sepolia.quiknode.pro\";\n break;\n case \"holesky\":\n host = \"ethers.ethereum-holesky.quiknode.pro\";\n break;\n case \"arbitrum\":\n host = \"ethers.arbitrum-mainnet.quiknode.pro\";\n break;\n case \"arbitrum-goerli\":\n host = \"ethers.arbitrum-goerli.quiknode.pro\";\n break;\n case \"arbitrum-sepolia\":\n host = \"ethers.arbitrum-sepolia.quiknode.pro\";\n break;\n case \"base\":\n host = \"ethers.base-mainnet.quiknode.pro\";\n break;\n case \"base-goerli\":\n host = \"ethers.base-goerli.quiknode.pro\";\n break;\n case \"base-spolia\":\n host = \"ethers.base-sepolia.quiknode.pro\";\n break;\n case \"bnb\":\n host = \"ethers.bsc.quiknode.pro\";\n break;\n case \"bnbt\":\n host = \"ethers.bsc-testnet.quiknode.pro\";\n break;\n case \"matic\":\n host = \"ethers.matic.quiknode.pro\";\n break;\n case \"maticmum\":\n host = \"ethers.matic-testnet.quiknode.pro\";\n break;\n case \"optimism\":\n host = \"ethers.optimism.quiknode.pro\";\n break;\n case \"optimism-goerli\":\n host = \"ethers.optimism-goerli.quiknode.pro\";\n break;\n case \"optimism-sepolia\":\n host = \"ethers.optimism-sepolia.quiknode.pro\";\n break;\n case \"xdai\":\n host = \"ethers.xdai.quiknode.pro\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return \"https://\" + host + \"/\" + apiKey;\n };\n return QuickNodeProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.QuickNodeProvider = QuickNodeProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/web3-provider.js\n var require_web3_provider = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/web3-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Web3Provider = void 0;\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n var json_rpc_provider_1 = require_json_rpc_provider();\n var _nextId = 1;\n function buildWeb3LegacyFetcher(provider, sendFunc) {\n var fetcher = \"Web3LegacyFetcher\";\n return function(method, params) {\n var _this = this;\n var request = {\n method,\n params,\n id: _nextId++,\n jsonrpc: \"2.0\"\n };\n return new Promise(function(resolve, reject) {\n _this.emit(\"debug\", {\n action: \"request\",\n fetcher,\n request: (0, properties_1.deepCopy)(request),\n provider: _this\n });\n sendFunc(request, function(error, response) {\n if (error) {\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher,\n error,\n request,\n provider: _this\n });\n return reject(error);\n }\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher,\n request,\n response,\n provider: _this\n });\n if (response.error) {\n var error_1 = new Error(response.error.message);\n error_1.code = response.error.code;\n error_1.data = response.error.data;\n return reject(error_1);\n }\n resolve(response.result);\n });\n });\n };\n }\n function buildEip1193Fetcher(provider) {\n return function(method, params) {\n var _this = this;\n if (params == null) {\n params = [];\n }\n var request = { method, params };\n this.emit(\"debug\", {\n action: \"request\",\n fetcher: \"Eip1193Fetcher\",\n request: (0, properties_1.deepCopy)(request),\n provider: this\n });\n return provider.request(request).then(function(response) {\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher: \"Eip1193Fetcher\",\n request,\n response,\n provider: _this\n });\n return response;\n }, function(error) {\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher: \"Eip1193Fetcher\",\n request,\n error,\n provider: _this\n });\n throw error;\n });\n };\n }\n var Web3Provider = (\n /** @class */\n function(_super) {\n __extends4(Web3Provider2, _super);\n function Web3Provider2(provider, network) {\n var _this = this;\n if (provider == null) {\n logger.throwArgumentError(\"missing provider\", \"provider\", provider);\n }\n var path = null;\n var jsonRpcFetchFunc = null;\n var subprovider = null;\n if (typeof provider === \"function\") {\n path = \"unknown:\";\n jsonRpcFetchFunc = provider;\n } else {\n path = provider.host || provider.path || \"\";\n if (!path && provider.isMetaMask) {\n path = \"metamask\";\n }\n subprovider = provider;\n if (provider.request) {\n if (path === \"\") {\n path = \"eip-1193:\";\n }\n jsonRpcFetchFunc = buildEip1193Fetcher(provider);\n } else if (provider.sendAsync) {\n jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.sendAsync.bind(provider));\n } else if (provider.send) {\n jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider));\n } else {\n logger.throwArgumentError(\"unsupported provider\", \"provider\", provider);\n }\n if (!path) {\n path = \"unknown:\";\n }\n }\n _this = _super.call(this, path, network) || this;\n (0, properties_1.defineReadOnly)(_this, \"jsonRpcFetchFunc\", jsonRpcFetchFunc);\n (0, properties_1.defineReadOnly)(_this, \"provider\", subprovider);\n return _this;\n }\n Web3Provider2.prototype.send = function(method, params) {\n return this.jsonRpcFetchFunc(method, params);\n };\n return Web3Provider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.Web3Provider = Web3Provider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/index.js\n var require_lib29 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Formatter = exports3.showThrottleMessage = exports3.isCommunityResourcable = exports3.isCommunityResource = exports3.getNetwork = exports3.getDefaultProvider = exports3.JsonRpcSigner = exports3.IpcProvider = exports3.WebSocketProvider = exports3.Web3Provider = exports3.StaticJsonRpcProvider = exports3.QuickNodeProvider = exports3.PocketProvider = exports3.NodesmithProvider = exports3.JsonRpcBatchProvider = exports3.JsonRpcProvider = exports3.InfuraWebSocketProvider = exports3.InfuraProvider = exports3.EtherscanProvider = exports3.CloudflareProvider = exports3.AnkrProvider = exports3.AlchemyWebSocketProvider = exports3.AlchemyProvider = exports3.FallbackProvider = exports3.UrlJsonRpcProvider = exports3.Resolver = exports3.BaseProvider = exports3.Provider = void 0;\n var abstract_provider_1 = require_lib14();\n Object.defineProperty(exports3, \"Provider\", { enumerable: true, get: function() {\n return abstract_provider_1.Provider;\n } });\n var networks_1 = require_lib27();\n Object.defineProperty(exports3, \"getNetwork\", { enumerable: true, get: function() {\n return networks_1.getNetwork;\n } });\n var base_provider_1 = require_base_provider();\n Object.defineProperty(exports3, \"BaseProvider\", { enumerable: true, get: function() {\n return base_provider_1.BaseProvider;\n } });\n Object.defineProperty(exports3, \"Resolver\", { enumerable: true, get: function() {\n return base_provider_1.Resolver;\n } });\n var alchemy_provider_1 = require_alchemy_provider();\n Object.defineProperty(exports3, \"AlchemyProvider\", { enumerable: true, get: function() {\n return alchemy_provider_1.AlchemyProvider;\n } });\n Object.defineProperty(exports3, \"AlchemyWebSocketProvider\", { enumerable: true, get: function() {\n return alchemy_provider_1.AlchemyWebSocketProvider;\n } });\n var ankr_provider_1 = require_ankr_provider();\n Object.defineProperty(exports3, \"AnkrProvider\", { enumerable: true, get: function() {\n return ankr_provider_1.AnkrProvider;\n } });\n var cloudflare_provider_1 = require_cloudflare_provider();\n Object.defineProperty(exports3, \"CloudflareProvider\", { enumerable: true, get: function() {\n return cloudflare_provider_1.CloudflareProvider;\n } });\n var etherscan_provider_1 = require_etherscan_provider();\n Object.defineProperty(exports3, \"EtherscanProvider\", { enumerable: true, get: function() {\n return etherscan_provider_1.EtherscanProvider;\n } });\n var fallback_provider_1 = require_fallback_provider();\n Object.defineProperty(exports3, \"FallbackProvider\", { enumerable: true, get: function() {\n return fallback_provider_1.FallbackProvider;\n } });\n var ipc_provider_1 = require_browser_ipc_provider();\n Object.defineProperty(exports3, \"IpcProvider\", { enumerable: true, get: function() {\n return ipc_provider_1.IpcProvider;\n } });\n var infura_provider_1 = require_infura_provider();\n Object.defineProperty(exports3, \"InfuraProvider\", { enumerable: true, get: function() {\n return infura_provider_1.InfuraProvider;\n } });\n Object.defineProperty(exports3, \"InfuraWebSocketProvider\", { enumerable: true, get: function() {\n return infura_provider_1.InfuraWebSocketProvider;\n } });\n var json_rpc_provider_1 = require_json_rpc_provider();\n Object.defineProperty(exports3, \"JsonRpcProvider\", { enumerable: true, get: function() {\n return json_rpc_provider_1.JsonRpcProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcSigner\", { enumerable: true, get: function() {\n return json_rpc_provider_1.JsonRpcSigner;\n } });\n var json_rpc_batch_provider_1 = require_json_rpc_batch_provider();\n Object.defineProperty(exports3, \"JsonRpcBatchProvider\", { enumerable: true, get: function() {\n return json_rpc_batch_provider_1.JsonRpcBatchProvider;\n } });\n var nodesmith_provider_1 = require_nodesmith_provider();\n Object.defineProperty(exports3, \"NodesmithProvider\", { enumerable: true, get: function() {\n return nodesmith_provider_1.NodesmithProvider;\n } });\n var pocket_provider_1 = require_pocket_provider();\n Object.defineProperty(exports3, \"PocketProvider\", { enumerable: true, get: function() {\n return pocket_provider_1.PocketProvider;\n } });\n var quicknode_provider_1 = require_quicknode_provider();\n Object.defineProperty(exports3, \"QuickNodeProvider\", { enumerable: true, get: function() {\n return quicknode_provider_1.QuickNodeProvider;\n } });\n var url_json_rpc_provider_1 = require_url_json_rpc_provider();\n Object.defineProperty(exports3, \"StaticJsonRpcProvider\", { enumerable: true, get: function() {\n return url_json_rpc_provider_1.StaticJsonRpcProvider;\n } });\n Object.defineProperty(exports3, \"UrlJsonRpcProvider\", { enumerable: true, get: function() {\n return url_json_rpc_provider_1.UrlJsonRpcProvider;\n } });\n var web3_provider_1 = require_web3_provider();\n Object.defineProperty(exports3, \"Web3Provider\", { enumerable: true, get: function() {\n return web3_provider_1.Web3Provider;\n } });\n var websocket_provider_1 = require_websocket_provider();\n Object.defineProperty(exports3, \"WebSocketProvider\", { enumerable: true, get: function() {\n return websocket_provider_1.WebSocketProvider;\n } });\n var formatter_1 = require_formatter();\n Object.defineProperty(exports3, \"Formatter\", { enumerable: true, get: function() {\n return formatter_1.Formatter;\n } });\n Object.defineProperty(exports3, \"isCommunityResourcable\", { enumerable: true, get: function() {\n return formatter_1.isCommunityResourcable;\n } });\n Object.defineProperty(exports3, \"isCommunityResource\", { enumerable: true, get: function() {\n return formatter_1.isCommunityResource;\n } });\n Object.defineProperty(exports3, \"showThrottleMessage\", { enumerable: true, get: function() {\n return formatter_1.showThrottleMessage;\n } });\n var logger_1 = require_lib();\n var _version_1 = require_version23();\n var logger = new logger_1.Logger(_version_1.version);\n function getDefaultProvider(network, options) {\n if (network == null) {\n network = \"homestead\";\n }\n if (typeof network === \"string\") {\n var match = network.match(/^(ws|http)s?:/i);\n if (match) {\n switch (match[1].toLowerCase()) {\n case \"http\":\n case \"https\":\n return new json_rpc_provider_1.JsonRpcProvider(network);\n case \"ws\":\n case \"wss\":\n return new websocket_provider_1.WebSocketProvider(network);\n default:\n logger.throwArgumentError(\"unsupported URL scheme\", \"network\", network);\n }\n }\n }\n var n2 = (0, networks_1.getNetwork)(network);\n if (!n2 || !n2._defaultProvider) {\n logger.throwError(\"unsupported getDefaultProvider network\", logger_1.Logger.errors.NETWORK_ERROR, {\n operation: \"getDefaultProvider\",\n network\n });\n }\n return n2._defaultProvider({\n FallbackProvider: fallback_provider_1.FallbackProvider,\n AlchemyProvider: alchemy_provider_1.AlchemyProvider,\n AnkrProvider: ankr_provider_1.AnkrProvider,\n CloudflareProvider: cloudflare_provider_1.CloudflareProvider,\n EtherscanProvider: etherscan_provider_1.EtherscanProvider,\n InfuraProvider: infura_provider_1.InfuraProvider,\n JsonRpcProvider: json_rpc_provider_1.JsonRpcProvider,\n NodesmithProvider: nodesmith_provider_1.NodesmithProvider,\n PocketProvider: pocket_provider_1.PocketProvider,\n QuickNodeProvider: quicknode_provider_1.QuickNodeProvider,\n Web3Provider: web3_provider_1.Web3Provider,\n IpcProvider: ipc_provider_1.IpcProvider\n }, options);\n }\n exports3.getDefaultProvider = getDefaultProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+solidity@5.8.0/node_modules/@ethersproject/solidity/lib/_version.js\n var require_version24 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+solidity@5.8.0/node_modules/@ethersproject/solidity/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"solidity/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+solidity@5.8.0/node_modules/@ethersproject/solidity/lib/index.js\n var require_lib30 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+solidity@5.8.0/node_modules/@ethersproject/solidity/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha256 = exports3.keccak256 = exports3.pack = void 0;\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var keccak256_1 = require_lib5();\n var sha2_1 = require_lib20();\n var strings_1 = require_lib9();\n var regexBytes = new RegExp(\"^bytes([0-9]+)$\");\n var regexNumber = new RegExp(\"^(u?int)([0-9]*)$\");\n var regexArray = new RegExp(\"^(.*)\\\\[([0-9]*)\\\\]$\");\n var Zeros = \"0000000000000000000000000000000000000000000000000000000000000000\";\n var logger_1 = require_lib();\n var _version_1 = require_version24();\n var logger = new logger_1.Logger(_version_1.version);\n function _pack(type, value, isArray) {\n switch (type) {\n case \"address\":\n if (isArray) {\n return (0, bytes_1.zeroPad)(value, 32);\n }\n return (0, bytes_1.arrayify)(value);\n case \"string\":\n return (0, strings_1.toUtf8Bytes)(value);\n case \"bytes\":\n return (0, bytes_1.arrayify)(value);\n case \"bool\":\n value = value ? \"0x01\" : \"0x00\";\n if (isArray) {\n return (0, bytes_1.zeroPad)(value, 32);\n }\n return (0, bytes_1.arrayify)(value);\n }\n var match = type.match(regexNumber);\n if (match) {\n var size6 = parseInt(match[2] || \"256\");\n if (match[2] && String(size6) !== match[2] || size6 % 8 !== 0 || size6 === 0 || size6 > 256) {\n logger.throwArgumentError(\"invalid number type\", \"type\", type);\n }\n if (isArray) {\n size6 = 256;\n }\n value = bignumber_1.BigNumber.from(value).toTwos(size6);\n return (0, bytes_1.zeroPad)(value, size6 / 8);\n }\n match = type.match(regexBytes);\n if (match) {\n var size6 = parseInt(match[1]);\n if (String(size6) !== match[1] || size6 === 0 || size6 > 32) {\n logger.throwArgumentError(\"invalid bytes type\", \"type\", type);\n }\n if ((0, bytes_1.arrayify)(value).byteLength !== size6) {\n logger.throwArgumentError(\"invalid value for \" + type, \"value\", value);\n }\n if (isArray) {\n return (0, bytes_1.arrayify)((value + Zeros).substring(0, 66));\n }\n return value;\n }\n match = type.match(regexArray);\n if (match && Array.isArray(value)) {\n var baseType_1 = match[1];\n var count = parseInt(match[2] || String(value.length));\n if (count != value.length) {\n logger.throwArgumentError(\"invalid array length for \" + type, \"value\", value);\n }\n var result_1 = [];\n value.forEach(function(value2) {\n result_1.push(_pack(baseType_1, value2, true));\n });\n return (0, bytes_1.concat)(result_1);\n }\n return logger.throwArgumentError(\"invalid type\", \"type\", type);\n }\n function pack(types2, values) {\n if (types2.length != values.length) {\n logger.throwArgumentError(\"wrong number of values; expected ${ types.length }\", \"values\", values);\n }\n var tight = [];\n types2.forEach(function(type, index2) {\n tight.push(_pack(type, values[index2]));\n });\n return (0, bytes_1.hexlify)((0, bytes_1.concat)(tight));\n }\n exports3.pack = pack;\n function keccak2563(types2, values) {\n return (0, keccak256_1.keccak256)(pack(types2, values));\n }\n exports3.keccak256 = keccak2563;\n function sha2564(types2, values) {\n return (0, sha2_1.sha256)(pack(types2, values));\n }\n exports3.sha256 = sha2564;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+units@5.8.0/node_modules/@ethersproject/units/lib/_version.js\n var require_version25 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+units@5.8.0/node_modules/@ethersproject/units/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"units/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+units@5.8.0/node_modules/@ethersproject/units/lib/index.js\n var require_lib31 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+units@5.8.0/node_modules/@ethersproject/units/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.parseEther = exports3.formatEther = exports3.parseUnits = exports3.formatUnits = exports3.commify = void 0;\n var bignumber_1 = require_lib3();\n var logger_1 = require_lib();\n var _version_1 = require_version25();\n var logger = new logger_1.Logger(_version_1.version);\n var names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\"\n ];\n function commify(value) {\n var comps = String(value).split(\".\");\n if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || comps[1] && !comps[1].match(/^[0-9]*$/) || value === \".\" || value === \"-.\") {\n logger.throwArgumentError(\"invalid value\", \"value\", value);\n }\n var whole = comps[0];\n var negative = \"\";\n if (whole.substring(0, 1) === \"-\") {\n negative = \"-\";\n whole = whole.substring(1);\n }\n while (whole.substring(0, 1) === \"0\") {\n whole = whole.substring(1);\n }\n if (whole === \"\") {\n whole = \"0\";\n }\n var suffix = \"\";\n if (comps.length === 2) {\n suffix = \".\" + (comps[1] || \"0\");\n }\n while (suffix.length > 2 && suffix[suffix.length - 1] === \"0\") {\n suffix = suffix.substring(0, suffix.length - 1);\n }\n var formatted = [];\n while (whole.length) {\n if (whole.length <= 3) {\n formatted.unshift(whole);\n break;\n } else {\n var index2 = whole.length - 3;\n formatted.unshift(whole.substring(index2));\n whole = whole.substring(0, index2);\n }\n }\n return negative + formatted.join(\",\") + suffix;\n }\n exports3.commify = commify;\n function formatUnits2(value, unitName) {\n if (typeof unitName === \"string\") {\n var index2 = names.indexOf(unitName);\n if (index2 !== -1) {\n unitName = 3 * index2;\n }\n }\n return (0, bignumber_1.formatFixed)(value, unitName != null ? unitName : 18);\n }\n exports3.formatUnits = formatUnits2;\n function parseUnits(value, unitName) {\n if (typeof value !== \"string\") {\n logger.throwArgumentError(\"value must be a string\", \"value\", value);\n }\n if (typeof unitName === \"string\") {\n var index2 = names.indexOf(unitName);\n if (index2 !== -1) {\n unitName = 3 * index2;\n }\n }\n return (0, bignumber_1.parseFixed)(value, unitName != null ? unitName : 18);\n }\n exports3.parseUnits = parseUnits;\n function formatEther2(wei) {\n return formatUnits2(wei, 18);\n }\n exports3.formatEther = formatEther2;\n function parseEther(ether) {\n return parseUnits(ether, 18);\n }\n exports3.parseEther = parseEther;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/utils.js\n var require_utils6 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding4 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n Object.defineProperty(o5, k22, { enumerable: true, get: function() {\n return m2[k4];\n } });\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar4 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding4(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.formatBytes32String = exports3.Utf8ErrorFuncs = exports3.toUtf8String = exports3.toUtf8CodePoints = exports3.toUtf8Bytes = exports3._toEscapedUtf8String = exports3.nameprep = exports3.hexDataSlice = exports3.hexDataLength = exports3.hexZeroPad = exports3.hexValue = exports3.hexStripZeros = exports3.hexConcat = exports3.isHexString = exports3.hexlify = exports3.base64 = exports3.base58 = exports3.TransactionDescription = exports3.LogDescription = exports3.Interface = exports3.SigningKey = exports3.HDNode = exports3.defaultPath = exports3.isBytesLike = exports3.isBytes = exports3.zeroPad = exports3.stripZeros = exports3.concat = exports3.arrayify = exports3.shallowCopy = exports3.resolveProperties = exports3.getStatic = exports3.defineReadOnly = exports3.deepCopy = exports3.checkProperties = exports3.poll = exports3.fetchJson = exports3._fetchData = exports3.RLP = exports3.Logger = exports3.checkResultErrors = exports3.FormatTypes = exports3.ParamType = exports3.FunctionFragment = exports3.EventFragment = exports3.ErrorFragment = exports3.ConstructorFragment = exports3.Fragment = exports3.defaultAbiCoder = exports3.AbiCoder = void 0;\n exports3.Indexed = exports3.Utf8ErrorReason = exports3.UnicodeNormalizationForm = exports3.SupportedAlgorithm = exports3.mnemonicToSeed = exports3.isValidMnemonic = exports3.entropyToMnemonic = exports3.mnemonicToEntropy = exports3.getAccountPath = exports3.verifyTypedData = exports3.verifyMessage = exports3.recoverPublicKey = exports3.computePublicKey = exports3.recoverAddress = exports3.computeAddress = exports3.getJsonWalletAddress = exports3.TransactionTypes = exports3.serializeTransaction = exports3.parseTransaction = exports3.accessListify = exports3.joinSignature = exports3.splitSignature = exports3.soliditySha256 = exports3.solidityKeccak256 = exports3.solidityPack = exports3.shuffled = exports3.randomBytes = exports3.sha512 = exports3.sha256 = exports3.ripemd160 = exports3.keccak256 = exports3.computeHmac = exports3.commify = exports3.parseUnits = exports3.formatUnits = exports3.parseEther = exports3.formatEther = exports3.isAddress = exports3.getCreate2Address = exports3.getContractAddress = exports3.getIcapAddress = exports3.getAddress = exports3._TypedDataEncoder = exports3.id = exports3.isValidName = exports3.namehash = exports3.hashMessage = exports3.dnsEncode = exports3.parseBytes32String = void 0;\n var abi_1 = require_lib13();\n Object.defineProperty(exports3, \"AbiCoder\", { enumerable: true, get: function() {\n return abi_1.AbiCoder;\n } });\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return abi_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"ConstructorFragment\", { enumerable: true, get: function() {\n return abi_1.ConstructorFragment;\n } });\n Object.defineProperty(exports3, \"defaultAbiCoder\", { enumerable: true, get: function() {\n return abi_1.defaultAbiCoder;\n } });\n Object.defineProperty(exports3, \"ErrorFragment\", { enumerable: true, get: function() {\n return abi_1.ErrorFragment;\n } });\n Object.defineProperty(exports3, \"EventFragment\", { enumerable: true, get: function() {\n return abi_1.EventFragment;\n } });\n Object.defineProperty(exports3, \"FormatTypes\", { enumerable: true, get: function() {\n return abi_1.FormatTypes;\n } });\n Object.defineProperty(exports3, \"Fragment\", { enumerable: true, get: function() {\n return abi_1.Fragment;\n } });\n Object.defineProperty(exports3, \"FunctionFragment\", { enumerable: true, get: function() {\n return abi_1.FunctionFragment;\n } });\n Object.defineProperty(exports3, \"Indexed\", { enumerable: true, get: function() {\n return abi_1.Indexed;\n } });\n Object.defineProperty(exports3, \"Interface\", { enumerable: true, get: function() {\n return abi_1.Interface;\n } });\n Object.defineProperty(exports3, \"LogDescription\", { enumerable: true, get: function() {\n return abi_1.LogDescription;\n } });\n Object.defineProperty(exports3, \"ParamType\", { enumerable: true, get: function() {\n return abi_1.ParamType;\n } });\n Object.defineProperty(exports3, \"TransactionDescription\", { enumerable: true, get: function() {\n return abi_1.TransactionDescription;\n } });\n var address_1 = require_lib7();\n Object.defineProperty(exports3, \"getAddress\", { enumerable: true, get: function() {\n return address_1.getAddress;\n } });\n Object.defineProperty(exports3, \"getCreate2Address\", { enumerable: true, get: function() {\n return address_1.getCreate2Address;\n } });\n Object.defineProperty(exports3, \"getContractAddress\", { enumerable: true, get: function() {\n return address_1.getContractAddress;\n } });\n Object.defineProperty(exports3, \"getIcapAddress\", { enumerable: true, get: function() {\n return address_1.getIcapAddress;\n } });\n Object.defineProperty(exports3, \"isAddress\", { enumerable: true, get: function() {\n return address_1.isAddress;\n } });\n var base64 = __importStar4(require_lib10());\n exports3.base64 = base64;\n var basex_1 = require_lib19();\n Object.defineProperty(exports3, \"base58\", { enumerable: true, get: function() {\n return basex_1.Base58;\n } });\n var bytes_1 = require_lib2();\n Object.defineProperty(exports3, \"arrayify\", { enumerable: true, get: function() {\n return bytes_1.arrayify;\n } });\n Object.defineProperty(exports3, \"concat\", { enumerable: true, get: function() {\n return bytes_1.concat;\n } });\n Object.defineProperty(exports3, \"hexConcat\", { enumerable: true, get: function() {\n return bytes_1.hexConcat;\n } });\n Object.defineProperty(exports3, \"hexDataSlice\", { enumerable: true, get: function() {\n return bytes_1.hexDataSlice;\n } });\n Object.defineProperty(exports3, \"hexDataLength\", { enumerable: true, get: function() {\n return bytes_1.hexDataLength;\n } });\n Object.defineProperty(exports3, \"hexlify\", { enumerable: true, get: function() {\n return bytes_1.hexlify;\n } });\n Object.defineProperty(exports3, \"hexStripZeros\", { enumerable: true, get: function() {\n return bytes_1.hexStripZeros;\n } });\n Object.defineProperty(exports3, \"hexValue\", { enumerable: true, get: function() {\n return bytes_1.hexValue;\n } });\n Object.defineProperty(exports3, \"hexZeroPad\", { enumerable: true, get: function() {\n return bytes_1.hexZeroPad;\n } });\n Object.defineProperty(exports3, \"isBytes\", { enumerable: true, get: function() {\n return bytes_1.isBytes;\n } });\n Object.defineProperty(exports3, \"isBytesLike\", { enumerable: true, get: function() {\n return bytes_1.isBytesLike;\n } });\n Object.defineProperty(exports3, \"isHexString\", { enumerable: true, get: function() {\n return bytes_1.isHexString;\n } });\n Object.defineProperty(exports3, \"joinSignature\", { enumerable: true, get: function() {\n return bytes_1.joinSignature;\n } });\n Object.defineProperty(exports3, \"zeroPad\", { enumerable: true, get: function() {\n return bytes_1.zeroPad;\n } });\n Object.defineProperty(exports3, \"splitSignature\", { enumerable: true, get: function() {\n return bytes_1.splitSignature;\n } });\n Object.defineProperty(exports3, \"stripZeros\", { enumerable: true, get: function() {\n return bytes_1.stripZeros;\n } });\n var hash_1 = require_lib12();\n Object.defineProperty(exports3, \"_TypedDataEncoder\", { enumerable: true, get: function() {\n return hash_1._TypedDataEncoder;\n } });\n Object.defineProperty(exports3, \"dnsEncode\", { enumerable: true, get: function() {\n return hash_1.dnsEncode;\n } });\n Object.defineProperty(exports3, \"hashMessage\", { enumerable: true, get: function() {\n return hash_1.hashMessage;\n } });\n Object.defineProperty(exports3, \"id\", { enumerable: true, get: function() {\n return hash_1.id;\n } });\n Object.defineProperty(exports3, \"isValidName\", { enumerable: true, get: function() {\n return hash_1.isValidName;\n } });\n Object.defineProperty(exports3, \"namehash\", { enumerable: true, get: function() {\n return hash_1.namehash;\n } });\n var hdnode_1 = require_lib23();\n Object.defineProperty(exports3, \"defaultPath\", { enumerable: true, get: function() {\n return hdnode_1.defaultPath;\n } });\n Object.defineProperty(exports3, \"entropyToMnemonic\", { enumerable: true, get: function() {\n return hdnode_1.entropyToMnemonic;\n } });\n Object.defineProperty(exports3, \"getAccountPath\", { enumerable: true, get: function() {\n return hdnode_1.getAccountPath;\n } });\n Object.defineProperty(exports3, \"HDNode\", { enumerable: true, get: function() {\n return hdnode_1.HDNode;\n } });\n Object.defineProperty(exports3, \"isValidMnemonic\", { enumerable: true, get: function() {\n return hdnode_1.isValidMnemonic;\n } });\n Object.defineProperty(exports3, \"mnemonicToEntropy\", { enumerable: true, get: function() {\n return hdnode_1.mnemonicToEntropy;\n } });\n Object.defineProperty(exports3, \"mnemonicToSeed\", { enumerable: true, get: function() {\n return hdnode_1.mnemonicToSeed;\n } });\n var json_wallets_1 = require_lib25();\n Object.defineProperty(exports3, \"getJsonWalletAddress\", { enumerable: true, get: function() {\n return json_wallets_1.getJsonWalletAddress;\n } });\n var keccak256_1 = require_lib5();\n Object.defineProperty(exports3, \"keccak256\", { enumerable: true, get: function() {\n return keccak256_1.keccak256;\n } });\n var logger_1 = require_lib();\n Object.defineProperty(exports3, \"Logger\", { enumerable: true, get: function() {\n return logger_1.Logger;\n } });\n var sha2_1 = require_lib20();\n Object.defineProperty(exports3, \"computeHmac\", { enumerable: true, get: function() {\n return sha2_1.computeHmac;\n } });\n Object.defineProperty(exports3, \"ripemd160\", { enumerable: true, get: function() {\n return sha2_1.ripemd160;\n } });\n Object.defineProperty(exports3, \"sha256\", { enumerable: true, get: function() {\n return sha2_1.sha256;\n } });\n Object.defineProperty(exports3, \"sha512\", { enumerable: true, get: function() {\n return sha2_1.sha512;\n } });\n var solidity_1 = require_lib30();\n Object.defineProperty(exports3, \"solidityKeccak256\", { enumerable: true, get: function() {\n return solidity_1.keccak256;\n } });\n Object.defineProperty(exports3, \"solidityPack\", { enumerable: true, get: function() {\n return solidity_1.pack;\n } });\n Object.defineProperty(exports3, \"soliditySha256\", { enumerable: true, get: function() {\n return solidity_1.sha256;\n } });\n var random_1 = require_lib24();\n Object.defineProperty(exports3, \"randomBytes\", { enumerable: true, get: function() {\n return random_1.randomBytes;\n } });\n Object.defineProperty(exports3, \"shuffled\", { enumerable: true, get: function() {\n return random_1.shuffled;\n } });\n var properties_1 = require_lib4();\n Object.defineProperty(exports3, \"checkProperties\", { enumerable: true, get: function() {\n return properties_1.checkProperties;\n } });\n Object.defineProperty(exports3, \"deepCopy\", { enumerable: true, get: function() {\n return properties_1.deepCopy;\n } });\n Object.defineProperty(exports3, \"defineReadOnly\", { enumerable: true, get: function() {\n return properties_1.defineReadOnly;\n } });\n Object.defineProperty(exports3, \"getStatic\", { enumerable: true, get: function() {\n return properties_1.getStatic;\n } });\n Object.defineProperty(exports3, \"resolveProperties\", { enumerable: true, get: function() {\n return properties_1.resolveProperties;\n } });\n Object.defineProperty(exports3, \"shallowCopy\", { enumerable: true, get: function() {\n return properties_1.shallowCopy;\n } });\n var RLP = __importStar4(require_lib6());\n exports3.RLP = RLP;\n var signing_key_1 = require_lib16();\n Object.defineProperty(exports3, \"computePublicKey\", { enumerable: true, get: function() {\n return signing_key_1.computePublicKey;\n } });\n Object.defineProperty(exports3, \"recoverPublicKey\", { enumerable: true, get: function() {\n return signing_key_1.recoverPublicKey;\n } });\n Object.defineProperty(exports3, \"SigningKey\", { enumerable: true, get: function() {\n return signing_key_1.SigningKey;\n } });\n var strings_1 = require_lib9();\n Object.defineProperty(exports3, \"formatBytes32String\", { enumerable: true, get: function() {\n return strings_1.formatBytes32String;\n } });\n Object.defineProperty(exports3, \"nameprep\", { enumerable: true, get: function() {\n return strings_1.nameprep;\n } });\n Object.defineProperty(exports3, \"parseBytes32String\", { enumerable: true, get: function() {\n return strings_1.parseBytes32String;\n } });\n Object.defineProperty(exports3, \"_toEscapedUtf8String\", { enumerable: true, get: function() {\n return strings_1._toEscapedUtf8String;\n } });\n Object.defineProperty(exports3, \"toUtf8Bytes\", { enumerable: true, get: function() {\n return strings_1.toUtf8Bytes;\n } });\n Object.defineProperty(exports3, \"toUtf8CodePoints\", { enumerable: true, get: function() {\n return strings_1.toUtf8CodePoints;\n } });\n Object.defineProperty(exports3, \"toUtf8String\", { enumerable: true, get: function() {\n return strings_1.toUtf8String;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorFuncs\", { enumerable: true, get: function() {\n return strings_1.Utf8ErrorFuncs;\n } });\n var transactions_1 = require_lib17();\n Object.defineProperty(exports3, \"accessListify\", { enumerable: true, get: function() {\n return transactions_1.accessListify;\n } });\n Object.defineProperty(exports3, \"computeAddress\", { enumerable: true, get: function() {\n return transactions_1.computeAddress;\n } });\n Object.defineProperty(exports3, \"parseTransaction\", { enumerable: true, get: function() {\n return transactions_1.parse;\n } });\n Object.defineProperty(exports3, \"recoverAddress\", { enumerable: true, get: function() {\n return transactions_1.recoverAddress;\n } });\n Object.defineProperty(exports3, \"serializeTransaction\", { enumerable: true, get: function() {\n return transactions_1.serialize;\n } });\n Object.defineProperty(exports3, \"TransactionTypes\", { enumerable: true, get: function() {\n return transactions_1.TransactionTypes;\n } });\n var units_1 = require_lib31();\n Object.defineProperty(exports3, \"commify\", { enumerable: true, get: function() {\n return units_1.commify;\n } });\n Object.defineProperty(exports3, \"formatEther\", { enumerable: true, get: function() {\n return units_1.formatEther;\n } });\n Object.defineProperty(exports3, \"parseEther\", { enumerable: true, get: function() {\n return units_1.parseEther;\n } });\n Object.defineProperty(exports3, \"formatUnits\", { enumerable: true, get: function() {\n return units_1.formatUnits;\n } });\n Object.defineProperty(exports3, \"parseUnits\", { enumerable: true, get: function() {\n return units_1.parseUnits;\n } });\n var wallet_1 = require_lib26();\n Object.defineProperty(exports3, \"verifyMessage\", { enumerable: true, get: function() {\n return wallet_1.verifyMessage;\n } });\n Object.defineProperty(exports3, \"verifyTypedData\", { enumerable: true, get: function() {\n return wallet_1.verifyTypedData;\n } });\n var web_1 = require_lib28();\n Object.defineProperty(exports3, \"_fetchData\", { enumerable: true, get: function() {\n return web_1._fetchData;\n } });\n Object.defineProperty(exports3, \"fetchJson\", { enumerable: true, get: function() {\n return web_1.fetchJson;\n } });\n Object.defineProperty(exports3, \"poll\", { enumerable: true, get: function() {\n return web_1.poll;\n } });\n var sha2_2 = require_lib20();\n Object.defineProperty(exports3, \"SupportedAlgorithm\", { enumerable: true, get: function() {\n return sha2_2.SupportedAlgorithm;\n } });\n var strings_2 = require_lib9();\n Object.defineProperty(exports3, \"UnicodeNormalizationForm\", { enumerable: true, get: function() {\n return strings_2.UnicodeNormalizationForm;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorReason\", { enumerable: true, get: function() {\n return strings_2.Utf8ErrorReason;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/_version.js\n var require_version26 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"ethers/5.8.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/ethers.js\n var require_ethers = __commonJS({\n \"../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/ethers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding4 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n Object.defineProperty(o5, k22, { enumerable: true, get: function() {\n return m2[k4];\n } });\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar4 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding4(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wordlist = exports3.version = exports3.wordlists = exports3.utils = exports3.logger = exports3.errors = exports3.constants = exports3.FixedNumber = exports3.BigNumber = exports3.ContractFactory = exports3.Contract = exports3.BaseContract = exports3.providers = exports3.getDefaultProvider = exports3.VoidSigner = exports3.Wallet = exports3.Signer = void 0;\n var contracts_1 = require_lib18();\n Object.defineProperty(exports3, \"BaseContract\", { enumerable: true, get: function() {\n return contracts_1.BaseContract;\n } });\n Object.defineProperty(exports3, \"Contract\", { enumerable: true, get: function() {\n return contracts_1.Contract;\n } });\n Object.defineProperty(exports3, \"ContractFactory\", { enumerable: true, get: function() {\n return contracts_1.ContractFactory;\n } });\n var bignumber_1 = require_lib3();\n Object.defineProperty(exports3, \"BigNumber\", { enumerable: true, get: function() {\n return bignumber_1.BigNumber;\n } });\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return bignumber_1.FixedNumber;\n } });\n var abstract_signer_1 = require_lib15();\n Object.defineProperty(exports3, \"Signer\", { enumerable: true, get: function() {\n return abstract_signer_1.Signer;\n } });\n Object.defineProperty(exports3, \"VoidSigner\", { enumerable: true, get: function() {\n return abstract_signer_1.VoidSigner;\n } });\n var wallet_1 = require_lib26();\n Object.defineProperty(exports3, \"Wallet\", { enumerable: true, get: function() {\n return wallet_1.Wallet;\n } });\n var constants = __importStar4(require_lib8());\n exports3.constants = constants;\n var providers = __importStar4(require_lib29());\n exports3.providers = providers;\n var providers_1 = require_lib29();\n Object.defineProperty(exports3, \"getDefaultProvider\", { enumerable: true, get: function() {\n return providers_1.getDefaultProvider;\n } });\n var wordlists_1 = require_lib22();\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return wordlists_1.Wordlist;\n } });\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return wordlists_1.wordlists;\n } });\n var utils = __importStar4(require_utils6());\n exports3.utils = utils;\n var logger_1 = require_lib();\n Object.defineProperty(exports3, \"errors\", { enumerable: true, get: function() {\n return logger_1.ErrorCode;\n } });\n var _version_1 = require_version26();\n Object.defineProperty(exports3, \"version\", { enumerable: true, get: function() {\n return _version_1.version;\n } });\n var logger = new logger_1.Logger(_version_1.version);\n exports3.logger = logger;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/index.js\n var require_lib32 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@5.8.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding4 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n Object.defineProperty(o5, k22, { enumerable: true, get: function() {\n return m2[k4];\n } });\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __importStar4 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding4(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wordlist = exports3.version = exports3.wordlists = exports3.utils = exports3.logger = exports3.errors = exports3.constants = exports3.FixedNumber = exports3.BigNumber = exports3.ContractFactory = exports3.Contract = exports3.BaseContract = exports3.providers = exports3.getDefaultProvider = exports3.VoidSigner = exports3.Wallet = exports3.Signer = exports3.ethers = void 0;\n var ethers3 = __importStar4(require_ethers());\n exports3.ethers = ethers3;\n try {\n anyGlobal = window;\n if (anyGlobal._ethers == null) {\n anyGlobal._ethers = ethers3;\n }\n } catch (error) {\n }\n var anyGlobal;\n var ethers_1 = require_ethers();\n Object.defineProperty(exports3, \"Signer\", { enumerable: true, get: function() {\n return ethers_1.Signer;\n } });\n Object.defineProperty(exports3, \"Wallet\", { enumerable: true, get: function() {\n return ethers_1.Wallet;\n } });\n Object.defineProperty(exports3, \"VoidSigner\", { enumerable: true, get: function() {\n return ethers_1.VoidSigner;\n } });\n Object.defineProperty(exports3, \"getDefaultProvider\", { enumerable: true, get: function() {\n return ethers_1.getDefaultProvider;\n } });\n Object.defineProperty(exports3, \"providers\", { enumerable: true, get: function() {\n return ethers_1.providers;\n } });\n Object.defineProperty(exports3, \"BaseContract\", { enumerable: true, get: function() {\n return ethers_1.BaseContract;\n } });\n Object.defineProperty(exports3, \"Contract\", { enumerable: true, get: function() {\n return ethers_1.Contract;\n } });\n Object.defineProperty(exports3, \"ContractFactory\", { enumerable: true, get: function() {\n return ethers_1.ContractFactory;\n } });\n Object.defineProperty(exports3, \"BigNumber\", { enumerable: true, get: function() {\n return ethers_1.BigNumber;\n } });\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return ethers_1.FixedNumber;\n } });\n Object.defineProperty(exports3, \"constants\", { enumerable: true, get: function() {\n return ethers_1.constants;\n } });\n Object.defineProperty(exports3, \"errors\", { enumerable: true, get: function() {\n return ethers_1.errors;\n } });\n Object.defineProperty(exports3, \"logger\", { enumerable: true, get: function() {\n return ethers_1.logger;\n } });\n Object.defineProperty(exports3, \"utils\", { enumerable: true, get: function() {\n return ethers_1.utils;\n } });\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return ethers_1.wordlists;\n } });\n Object.defineProperty(exports3, \"version\", { enumerable: true, get: function() {\n return ethers_1.version;\n } });\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return ethers_1.Wordlist;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/getMappedAbilityPolicyParams.js\n var require_getMappedAbilityPolicyParams = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/getMappedAbilityPolicyParams.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getMappedAbilityPolicyParams = getMappedAbilityPolicyParams;\n function getMappedAbilityPolicyParams({ abilityParameterMappings, parsedAbilityParams }) {\n const mappedAbilityParams = {};\n for (const [abilityParamKey, policyParamKey] of Object.entries(abilityParameterMappings)) {\n if (!policyParamKey) {\n throw new Error(`Missing policy param key for ability param \"${abilityParamKey}\" (evaluateSupportedPolicies)`);\n }\n if (!(abilityParamKey in parsedAbilityParams)) {\n throw new Error(`Ability param \"${abilityParamKey}\" expected in abilityParams but was not provided`);\n }\n mappedAbilityParams[policyParamKey] = parsedAbilityParams[abilityParamKey];\n }\n return mappedAbilityParams;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/getPkpInfo.js\n var require_getPkpInfo = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/getPkpInfo.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getPkpInfo = void 0;\n var ethers_1 = require_lib32();\n var getPkpInfo = async ({ litPubkeyRouterAddress, yellowstoneRpcUrl, pkpEthAddress }) => {\n try {\n const PUBKEY_ROUTER_ABI = [\n \"function ethAddressToPkpId(address ethAddress) public view returns (uint256)\",\n \"function getPubkey(uint256 tokenId) public view returns (bytes memory)\"\n ];\n const pubkeyRouter = new ethers_1.ethers.Contract(litPubkeyRouterAddress, PUBKEY_ROUTER_ABI, new ethers_1.ethers.providers.StaticJsonRpcProvider(yellowstoneRpcUrl));\n const pkpTokenId = await pubkeyRouter.ethAddressToPkpId(pkpEthAddress);\n const publicKey = await pubkeyRouter.getPubkey(pkpTokenId);\n return {\n tokenId: pkpTokenId.toString(),\n ethAddress: pkpEthAddress,\n publicKey: publicKey.toString(\"hex\")\n };\n } catch (error) {\n throw new Error(`Error getting PKP info for PKP Eth Address: ${pkpEthAddress} using Lit Pubkey Router: ${litPubkeyRouterAddress} and Yellowstone RPC URL: ${yellowstoneRpcUrl}: ${error instanceof Error ? error.message : String(error)}`);\n }\n };\n exports3.getPkpInfo = getPkpInfo;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/supportedPoliciesForAbility.js\n var require_supportedPoliciesForAbility = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/supportedPoliciesForAbility.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.supportedPoliciesForAbility = supportedPoliciesForAbility2;\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n function supportedPoliciesForAbility2(policies) {\n const policyByPackageName = {};\n const policyByIpfsCid = {};\n const cidToPackageName = /* @__PURE__ */ new Map();\n const packageNameToCid = /* @__PURE__ */ new Map();\n for (const policy of policies) {\n const { vincentAbilityApiVersion: vincentAbilityApiVersion2 } = policy;\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion2);\n const pkg = policy.vincentPolicy.packageName;\n const cid = policy.ipfsCid;\n if (!pkg)\n throw new Error(\"Missing policy packageName\");\n if (pkg in policyByPackageName) {\n throw new Error(`Duplicate policy packageName: ${pkg}`);\n }\n policyByPackageName[pkg] = policy;\n policyByIpfsCid[cid] = policy;\n cidToPackageName.set(cid, pkg);\n packageNameToCid.set(pkg, cid);\n }\n return {\n policyByPackageName,\n policyByIpfsCid,\n cidToPackageName,\n packageNameToCid\n };\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/index.js\n var require_helpers2 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.supportedPoliciesForAbility = exports3.getPkpInfo = exports3.getMappedAbilityPolicyParams = void 0;\n var getMappedAbilityPolicyParams_1 = require_getMappedAbilityPolicyParams();\n Object.defineProperty(exports3, \"getMappedAbilityPolicyParams\", { enumerable: true, get: function() {\n return getMappedAbilityPolicyParams_1.getMappedAbilityPolicyParams;\n } });\n var getPkpInfo_1 = require_getPkpInfo();\n Object.defineProperty(exports3, \"getPkpInfo\", { enumerable: true, get: function() {\n return getPkpInfo_1.getPkpInfo;\n } });\n var supportedPoliciesForAbility_1 = require_supportedPoliciesForAbility();\n Object.defineProperty(exports3, \"supportedPoliciesForAbility\", { enumerable: true, get: function() {\n return supportedPoliciesForAbility_1.supportedPoliciesForAbility;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs\n var tslib_es6_exports = {};\n __export(tslib_es6_exports, {\n __addDisposableResource: () => __addDisposableResource,\n __assign: () => __assign,\n __asyncDelegator: () => __asyncDelegator,\n __asyncGenerator: () => __asyncGenerator,\n __asyncValues: () => __asyncValues,\n __await: () => __await,\n __awaiter: () => __awaiter,\n __classPrivateFieldGet: () => __classPrivateFieldGet,\n __classPrivateFieldIn: () => __classPrivateFieldIn,\n __classPrivateFieldSet: () => __classPrivateFieldSet,\n __createBinding: () => __createBinding,\n __decorate: () => __decorate,\n __disposeResources: () => __disposeResources,\n __esDecorate: () => __esDecorate,\n __exportStar: () => __exportStar,\n __extends: () => __extends,\n __generator: () => __generator,\n __importDefault: () => __importDefault,\n __importStar: () => __importStar,\n __makeTemplateObject: () => __makeTemplateObject,\n __metadata: () => __metadata,\n __param: () => __param,\n __propKey: () => __propKey,\n __read: () => __read,\n __rest: () => __rest,\n __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension,\n __runInitializers: () => __runInitializers,\n __setFunctionName: () => __setFunctionName,\n __spread: () => __spread,\n __spreadArray: () => __spreadArray,\n __spreadArrays: () => __spreadArrays,\n __values: () => __values,\n default: () => tslib_es6_default\n });\n function __extends(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n }\n function __rest(s4, e2) {\n var t3 = {};\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4) && e2.indexOf(p4) < 0)\n t3[p4] = s4[p4];\n if (s4 != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i3 = 0, p4 = Object.getOwnPropertySymbols(s4); i3 < p4.length; i3++) {\n if (e2.indexOf(p4[i3]) < 0 && Object.prototype.propertyIsEnumerable.call(s4, p4[i3]))\n t3[p4[i3]] = s4[p4[i3]];\n }\n return t3;\n }\n function __decorate(decorators, target, key, desc) {\n var c4 = arguments.length, r2 = c4 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d5;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r2 = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i3 = decorators.length - 1; i3 >= 0; i3--)\n if (d5 = decorators[i3])\n r2 = (c4 < 3 ? d5(r2) : c4 > 3 ? d5(target, key, r2) : d5(target, key)) || r2;\n return c4 > 3 && r2 && Object.defineProperty(target, key, r2), r2;\n }\n function __param(paramIndex, decorator) {\n return function(target, key) {\n decorator(target, key, paramIndex);\n };\n }\n function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f7) {\n if (f7 !== void 0 && typeof f7 !== \"function\")\n throw new TypeError(\"Function expected\");\n return f7;\n }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _2, done = false;\n for (var i3 = decorators.length - 1; i3 >= 0; i3--) {\n var context2 = {};\n for (var p4 in contextIn)\n context2[p4] = p4 === \"access\" ? {} : contextIn[p4];\n for (var p4 in contextIn.access)\n context2.access[p4] = contextIn.access[p4];\n context2.addInitializer = function(f7) {\n if (done)\n throw new TypeError(\"Cannot add initializers after decoration has completed\");\n extraInitializers.push(accept(f7 || null));\n };\n var result = (0, decorators[i3])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);\n if (kind === \"accessor\") {\n if (result === void 0)\n continue;\n if (result === null || typeof result !== \"object\")\n throw new TypeError(\"Object expected\");\n if (_2 = accept(result.get))\n descriptor.get = _2;\n if (_2 = accept(result.set))\n descriptor.set = _2;\n if (_2 = accept(result.init))\n initializers.unshift(_2);\n } else if (_2 = accept(result)) {\n if (kind === \"field\")\n initializers.unshift(_2);\n else\n descriptor[key] = _2;\n }\n }\n if (target)\n Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n }\n function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i3 = 0; i3 < initializers.length; i3++) {\n value = useValue ? initializers[i3].call(thisArg, value) : initializers[i3].call(thisArg);\n }\n return useValue ? value : void 0;\n }\n function __propKey(x4) {\n return typeof x4 === \"symbol\" ? x4 : \"\".concat(x4);\n }\n function __setFunctionName(f7, name, prefix) {\n if (typeof name === \"symbol\")\n name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f7, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n }\n function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\")\n return Reflect.metadata(metadataKey, metadataValue);\n }\n function __awaiter(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n }\n function __generator(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4 = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g4.next = verb(0), g4[\"throw\"] = verb(1), g4[\"return\"] = verb(2), typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (g4 && (g4 = 0, op[0] && (_2 = 0)), _2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n }\n function __exportStar(m2, o5) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(o5, p4))\n __createBinding(o5, m2, p4);\n }\n function __values(o5) {\n var s4 = typeof Symbol === \"function\" && Symbol.iterator, m2 = s4 && o5[s4], i3 = 0;\n if (m2)\n return m2.call(o5);\n if (o5 && typeof o5.length === \"number\")\n return {\n next: function() {\n if (o5 && i3 >= o5.length)\n o5 = void 0;\n return { value: o5 && o5[i3++], done: !o5 };\n }\n };\n throw new TypeError(s4 ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n }\n function __read(o5, n2) {\n var m2 = typeof Symbol === \"function\" && o5[Symbol.iterator];\n if (!m2)\n return o5;\n var i3 = m2.call(o5), r2, ar = [], e2;\n try {\n while ((n2 === void 0 || n2-- > 0) && !(r2 = i3.next()).done)\n ar.push(r2.value);\n } catch (error) {\n e2 = { error };\n } finally {\n try {\n if (r2 && !r2.done && (m2 = i3[\"return\"]))\n m2.call(i3);\n } finally {\n if (e2)\n throw e2.error;\n }\n }\n return ar;\n }\n function __spread() {\n for (var ar = [], i3 = 0; i3 < arguments.length; i3++)\n ar = ar.concat(__read(arguments[i3]));\n return ar;\n }\n function __spreadArrays() {\n for (var s4 = 0, i3 = 0, il = arguments.length; i3 < il; i3++)\n s4 += arguments[i3].length;\n for (var r2 = Array(s4), k4 = 0, i3 = 0; i3 < il; i3++)\n for (var a3 = arguments[i3], j2 = 0, jl = a3.length; j2 < jl; j2++, k4++)\n r2[k4] = a3[j2];\n return r2;\n }\n function __spreadArray(to, from14, pack) {\n if (pack || arguments.length === 2)\n for (var i3 = 0, l6 = from14.length, ar; i3 < l6; i3++) {\n if (ar || !(i3 in from14)) {\n if (!ar)\n ar = Array.prototype.slice.call(from14, 0, i3);\n ar[i3] = from14[i3];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from14));\n }\n function __await(v2) {\n return this instanceof __await ? (this.v = v2, this) : new __await(v2);\n }\n function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g4 = generator.apply(thisArg, _arguments || []), i3, q3 = [];\n return i3 = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3;\n function awaitReturn(f7) {\n return function(v2) {\n return Promise.resolve(v2).then(f7, reject);\n };\n }\n function verb(n2, f7) {\n if (g4[n2]) {\n i3[n2] = function(v2) {\n return new Promise(function(a3, b4) {\n q3.push([n2, v2, a3, b4]) > 1 || resume(n2, v2);\n });\n };\n if (f7)\n i3[n2] = f7(i3[n2]);\n }\n }\n function resume(n2, v2) {\n try {\n step(g4[n2](v2));\n } catch (e2) {\n settle(q3[0][3], e2);\n }\n }\n function step(r2) {\n r2.value instanceof __await ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle(q3[0][2], r2);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f7, v2) {\n if (f7(v2), q3.shift(), q3.length)\n resume(q3[0][0], q3[0][1]);\n }\n }\n function __asyncDelegator(o5) {\n var i3, p4;\n return i3 = {}, verb(\"next\"), verb(\"throw\", function(e2) {\n throw e2;\n }), verb(\"return\"), i3[Symbol.iterator] = function() {\n return this;\n }, i3;\n function verb(n2, f7) {\n i3[n2] = o5[n2] ? function(v2) {\n return (p4 = !p4) ? { value: __await(o5[n2](v2)), done: false } : f7 ? f7(v2) : v2;\n } : f7;\n }\n }\n function __asyncValues(o5) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m2 = o5[Symbol.asyncIterator], i3;\n return m2 ? m2.call(o5) : (o5 = typeof __values === \"function\" ? __values(o5) : o5[Symbol.iterator](), i3 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3);\n function verb(n2) {\n i3[n2] = o5[n2] && function(v2) {\n return new Promise(function(resolve, reject) {\n v2 = o5[n2](v2), settle(resolve, reject, v2.done, v2.value);\n });\n };\n }\n function settle(resolve, reject, d5, v2) {\n Promise.resolve(v2).then(function(v6) {\n resolve({ value: v6, done: d5 });\n }, reject);\n }\n }\n function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", { value: raw });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n }\n function __importStar(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 = ownKeys(mod3), i3 = 0; i3 < k4.length; i3++)\n if (k4[i3] !== \"default\")\n __createBinding(result, mod3, k4[i3]);\n }\n __setModuleDefault(result, mod3);\n return result;\n }\n function __importDefault(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { default: mod3 };\n }\n function __classPrivateFieldGet(receiver, state, kind, f7) {\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f7 : kind === \"a\" ? f7.call(receiver) : f7 ? f7.value : state.get(receiver);\n }\n function __classPrivateFieldSet(receiver, state, value, kind, f7) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f7.call(receiver, value) : f7 ? f7.value = value : state.set(receiver, value), value;\n }\n function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || typeof receiver !== \"object\" && typeof receiver !== \"function\")\n throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n }\n function __addDisposableResource(env2, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\")\n throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose)\n throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose)\n throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async)\n inner = dispose;\n }\n if (typeof dispose !== \"function\")\n throw new TypeError(\"Object not disposable.\");\n if (inner)\n dispose = function() {\n try {\n inner.call(this);\n } catch (e2) {\n return Promise.reject(e2);\n }\n };\n env2.stack.push({ value, dispose, async });\n } else if (async) {\n env2.stack.push({ async: true });\n }\n return value;\n }\n function __disposeResources(env2) {\n function fail(e2) {\n env2.error = env2.hasError ? new _SuppressedError(e2, env2.error, \"An error was suppressed during disposal.\") : e2;\n env2.hasError = true;\n }\n var r2, s4 = 0;\n function next() {\n while (r2 = env2.stack.pop()) {\n try {\n if (!r2.async && s4 === 1)\n return s4 = 0, env2.stack.push(r2), Promise.resolve().then(next);\n if (r2.dispose) {\n var result = r2.dispose.call(r2.value);\n if (r2.async)\n return s4 |= 2, Promise.resolve(result).then(next, function(e2) {\n fail(e2);\n return next();\n });\n } else\n s4 |= 1;\n } catch (e2) {\n fail(e2);\n }\n }\n if (s4 === 1)\n return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();\n if (env2.hasError)\n throw env2.error;\n }\n return next();\n }\n function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function(m2, tsx, d5, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d5 && (!ext || !cm) ? m2 : d5 + ext + \".\" + cm.toLowerCase() + \"js\";\n });\n }\n return path;\n }\n var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;\n var init_tslib_es6 = __esm({\n \"../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n extendStatics = function(d5, b4) {\n extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics(d5, b4);\n };\n __assign = function() {\n __assign = Object.assign || function __assign4(t3) {\n for (var s4, i3 = 1, n2 = arguments.length; i3 < n2; i3++) {\n s4 = arguments[i3];\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4))\n t3[p4] = s4[p4];\n }\n return t3;\n };\n return __assign.apply(this, arguments);\n };\n __createBinding = Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n };\n __setModuleDefault = Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n };\n ownKeys = function(o5) {\n ownKeys = Object.getOwnPropertyNames || function(o6) {\n var ar = [];\n for (var k4 in o6)\n if (Object.prototype.hasOwnProperty.call(o6, k4))\n ar[ar.length] = k4;\n return ar;\n };\n return ownKeys(o5);\n };\n _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function(error, suppressed, message2) {\n var e2 = new Error(message2);\n return e2.name = \"SuppressedError\", e2.error = error, e2.suppressed = suppressed, e2;\n };\n tslib_es6_default = {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension\n };\n }\n });\n\n // ../../libs/contracts-sdk/dist/abis/VincentAppFacet.abi.json\n var require_VincentAppFacet_abi = __commonJS({\n \"../../libs/contracts-sdk/dist/abis/VincentAppFacet.abi.json\"(exports3, module) {\n module.exports = [\n {\n type: \"function\",\n name: \"addDelegatee\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"deleteApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"enableAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"enabled\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"registerApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n },\n {\n name: \"versionAbilities\",\n type: \"tuple\",\n internalType: \"struct VincentAppFacet.AppVersionAbilities\",\n components: [\n {\n name: \"abilityIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n },\n {\n name: \"abilityPolicies\",\n type: \"string[][]\",\n internalType: \"string[][]\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"newAppVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"registerNextAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"versionAbilities\",\n type: \"tuple\",\n internalType: \"struct VincentAppFacet.AppVersionAbilities\",\n components: [\n {\n name: \"abilityIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n },\n {\n name: \"abilityPolicies\",\n type: \"string[][]\",\n internalType: \"string[][]\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"newAppVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"removeDelegatee\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setDelegatee\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"undeleteApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"AppDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n },\n {\n name: \"enabled\",\n type: \"bool\",\n indexed: true,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppUndeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"DelegateeAdded\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"DelegateeRemoved\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"NewAppRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"manager\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"NewAppVersionRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n },\n {\n name: \"manager\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"NewLitActionRegistered\",\n inputs: [\n {\n name: \"litActionIpfsCidHash\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AbilityArrayDimensionMismatch\",\n inputs: [\n {\n name: \"abilitiesLength\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"policiesLength\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppAlreadyDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppAlreadyRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppAlreadyUndeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionAlreadyInRequestedState\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"enabled\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DelegateeAlreadyRegisteredToApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DelegateeNotRegisteredToApp\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicateAbilityIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicateAbilityPolicyIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"policyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"EmptyAbilityIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"EmptyPolicyIpfsCidNotAllowed\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidOffset\",\n inputs: [\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"totalCount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NoAbilitiesProvided\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NotAppManager\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"msgSender\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ZeroAddressDelegateeNotAllowed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ZeroAppIdNotAllowed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../libs/contracts-sdk/dist/abis/VincentAppViewFacet.abi.json\n var require_VincentAppViewFacet_abi = __commonJS({\n \"../../libs/contracts-sdk/dist/abis/VincentAppViewFacet.abi.json\"(exports3, module) {\n module.exports = [\n {\n type: \"function\",\n name: \"APP_PAGE_SIZE\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAppByDelegatee\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [\n {\n name: \"app\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.App\",\n components: [\n {\n name: \"id\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"isDeleted\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"manager\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"latestVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAppById\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [\n {\n name: \"app\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.App\",\n components: [\n {\n name: \"id\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"isDeleted\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"manager\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"latestVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"delegatees\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n outputs: [\n {\n name: \"appVersion\",\n type: \"tuple\",\n internalType: \"struct VincentAppViewFacet.AppVersion\",\n components: [\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"enabled\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"delegatedAgentPkpTokenIds\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"abilities\",\n type: \"tuple[]\",\n internalType: \"struct VincentAppViewFacet.Ability[]\",\n components: [\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"policyIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAppsByManager\",\n inputs: [\n {\n name: \"manager\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"appIds\",\n type: \"uint40[]\",\n internalType: \"uint40[]\"\n },\n {\n name: \"appVersionCounts\",\n type: \"uint24[]\",\n internalType: \"uint24[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getDelegatedAgentPkpTokenIds\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"delegatedAgentPkpTokenIds\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DelegateeNotRegistered\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidOffset\",\n inputs: [\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"totalCount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NoAppsFoundForManager\",\n inputs: [\n {\n name: \"manager\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NoDelegatedAgentPkpsFound\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ZeroAddressNotAllowed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../libs/contracts-sdk/dist/abis/VincentUserFacet.abi.json\n var require_VincentUserFacet_abi = __commonJS({\n \"../../libs/contracts-sdk/dist/abis/VincentUserFacet.abi.json\"(exports3, module) {\n module.exports = [\n {\n type: \"function\",\n name: \"permitAppVersion\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n },\n {\n name: \"policyIpfsCids\",\n type: \"string[][]\",\n internalType: \"string[][]\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes[][]\",\n internalType: \"bytes[][]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"rePermitApp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setAbilityPolicyParameters\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCids\",\n type: \"string[]\",\n internalType: \"string[]\"\n },\n {\n name: \"policyIpfsCids\",\n type: \"string[][]\",\n internalType: \"string[][]\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes[][]\",\n internalType: \"bytes[][]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unPermitAppVersion\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"AbilityPolicyParametersSet\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n },\n {\n name: \"hashedAbilityIpfsCid\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\"\n },\n {\n name: \"hashedAbilityPolicyIpfsCid\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppVersionPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppVersionRePermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"AppVersionUnPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n indexed: true,\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n indexed: true,\n internalType: \"uint24\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"NewUserAgentPkpRegistered\",\n inputs: [\n {\n name: \"userAddress\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AbilitiesAndPoliciesLengthMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"AbilityNotRegisteredForAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AbilityPolicyNotRegisteredForAppVersion\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"abilityPolicyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNeverPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionAlreadyPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotPermitted\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicateAbilityIpfsCid\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicateAbilityPolicyIpfsCid\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"abilityPolicyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"EmptyAbilityIpfsCid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"EmptyPolicyIpfsCid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidInput\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidOffset\",\n inputs: [\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"totalCount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NotAllRegisteredAbilitiesProvided\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NotPkpOwner\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"msgSender\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"PkpTokenDoesNotExist\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"PolicyArrayLengthMismatch\",\n inputs: [\n {\n name: \"abilityIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"policiesLength\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"paramValuesLength\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ZeroPkpTokenId\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../libs/contracts-sdk/dist/abis/VincentUserViewFacet.abi.json\n var require_VincentUserViewFacet_abi = __commonJS({\n \"../../libs/contracts-sdk/dist/abis/VincentUserViewFacet.abi.json\"(exports3, module) {\n module.exports = [\n {\n type: \"function\",\n name: \"AGENT_PAGE_SIZE\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAllAbilitiesAndPoliciesForApp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [\n {\n name: \"abilities\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.AbilityWithPolicies[]\",\n components: [\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"policies\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PolicyWithParameters[]\",\n components: [\n {\n name: \"policyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAllPermittedAppIdsForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint40[]\",\n internalType: \"uint40[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAllRegisteredAgentPkps\",\n inputs: [\n {\n name: \"userAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getLastPermittedAppVersionForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getPermittedAppVersionForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getPermittedAppsForPkps\",\n inputs: [\n {\n name: \"pkpTokenIds\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"pageSize\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PkpPermittedApps[]\",\n components: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"permittedApps\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PermittedApp[]\",\n components: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"version\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"versionEnabled\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isDeleted\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getUnpermittedAppsForPkps\",\n inputs: [\n {\n name: \"pkpTokenIds\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PkpUnpermittedApps[]\",\n components: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"unpermittedApps\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.UnpermittedApp[]\",\n components: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"previousPermittedVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"versionEnabled\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isDeleted\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isDelegateePermitted\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n outputs: [\n {\n name: \"isPermitted\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"validateAbilityExecutionAndGetPolicies\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"abilityIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n outputs: [\n {\n name: \"validation\",\n type: \"tuple\",\n internalType: \"struct VincentUserViewFacet.AbilityExecutionValidation\",\n components: [\n {\n name: \"isPermitted\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"policies\",\n type: \"tuple[]\",\n internalType: \"struct VincentUserViewFacet.PolicyWithParameters[]\",\n components: [\n {\n name: \"policyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"policyParameterValues\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"error\",\n name: \"AppHasBeenDeleted\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotEnabled\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AppVersionNotRegistered\",\n inputs: [\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DelegateeNotAssociatedWithApp\",\n inputs: [\n {\n name: \"delegatee\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"EmptyAbilityIpfsCid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidAppId\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidOffset\",\n inputs: [\n {\n name: \"offset\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"totalCount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidPkpTokenId\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"NoRegisteredPkpsFound\",\n inputs: [\n {\n name: \"userAddress\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"PkpNotPermittedForAppVersion\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"PolicyParameterNotSetForPkp\",\n inputs: [\n {\n name: \"pkpTokenId\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"appId\",\n type: \"uint40\",\n internalType: \"uint40\"\n },\n {\n name: \"appVersion\",\n type: \"uint24\",\n internalType: \"uint24\"\n },\n {\n name: \"policyIpfsCid\",\n type: \"string\",\n internalType: \"string\"\n },\n {\n name: \"parameterName\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ZeroAddressNotAllowed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/buildDiamondInterface.js\n var require_buildDiamondInterface = __commonJS({\n \"../../libs/contracts-sdk/dist/src/buildDiamondInterface.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.buildDiamondInterface = buildDiamondInterface;\n var utils_1 = require_utils6();\n function dedupeAbiFragments(abis) {\n const seen = /* @__PURE__ */ new Set();\n const deduped = [];\n for (const entry of abis) {\n try {\n const fragment = utils_1.Fragment.from(entry);\n const signature = fragment.format();\n if (!seen.has(signature)) {\n seen.add(signature);\n const jsonFragment = typeof entry === \"string\" ? JSON.parse(fragment.format(\"json\")) : entry;\n deduped.push(jsonFragment);\n }\n } catch {\n const fallbackKey = typeof entry === \"string\" ? entry : JSON.stringify(entry);\n if (!seen.has(fallbackKey)) {\n seen.add(fallbackKey);\n deduped.push(entry);\n }\n }\n }\n return deduped;\n }\n function buildDiamondInterface(facets) {\n const flattened = facets.flat();\n const deduped = dedupeAbiFragments(flattened);\n return new utils_1.Interface(deduped);\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/constants.js\n var require_constants3 = __commonJS({\n \"../../libs/contracts-sdk/dist/src/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.DEFAULT_PAGE_SIZE = exports3.GAS_ADJUSTMENT_PERCENT = exports3.COMBINED_ABI = exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD = exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_DEV = void 0;\n var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));\n var VincentAppFacet_abi_json_1 = tslib_1.__importDefault(require_VincentAppFacet_abi());\n var VincentAppViewFacet_abi_json_1 = tslib_1.__importDefault(require_VincentAppViewFacet_abi());\n var VincentUserFacet_abi_json_1 = tslib_1.__importDefault(require_VincentUserFacet_abi());\n var VincentUserViewFacet_abi_json_1 = tslib_1.__importDefault(require_VincentUserViewFacet_abi());\n var buildDiamondInterface_1 = require_buildDiamondInterface();\n exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_DEV = \"0x57f75581e0c9e51594C8080EcC833A3592A50df8\";\n exports3.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD = \"0xa3a602F399E9663279cdF63a290101cB6560A87e\";\n exports3.COMBINED_ABI = (0, buildDiamondInterface_1.buildDiamondInterface)([\n VincentAppFacet_abi_json_1.default,\n VincentAppViewFacet_abi_json_1.default,\n VincentUserFacet_abi_json_1.default,\n VincentUserViewFacet_abi_json_1.default\n ]);\n exports3.GAS_ADJUSTMENT_PERCENT = 120;\n exports3.DEFAULT_PAGE_SIZE = \"50\";\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/utils.js\n var require_utils7 = __commonJS({\n \"../../libs/contracts-sdk/dist/src/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createContract = createContract;\n exports3.findEventByName = findEventByName;\n exports3.gasAdjustedOverrides = gasAdjustedOverrides;\n exports3.decodeContractError = decodeContractError;\n var ethers_1 = require_lib32();\n var constants_1 = require_constants3();\n function createContract({ signer, contractAddress }) {\n return new ethers_1.Contract(contractAddress, constants_1.COMBINED_ABI, signer);\n }\n function findEventByName(contract, logs, eventName) {\n return logs.find((log) => {\n try {\n const parsed = contract.interface.parseLog(log);\n return parsed?.name === eventName;\n } catch {\n return false;\n }\n });\n }\n async function gasAdjustedOverrides(contract, methodName, args, overrides = {}) {\n if (!overrides?.gasLimit) {\n const estimatedGas = await contract.estimateGas[methodName](...args, overrides);\n console.log(\"Auto estimatedGas: \", estimatedGas);\n return {\n ...overrides,\n gasLimit: estimatedGas.mul(constants_1.GAS_ADJUSTMENT_PERCENT).div(100)\n };\n }\n return overrides;\n }\n function isBigNumberOrBigInt(arg) {\n return typeof arg === \"bigint\" || ethers_1.BigNumber.isBigNumber(arg);\n }\n function decodeContractError(error, contract) {\n try {\n if (error.code === \"CALL_EXCEPTION\" || error.code === \"UNPREDICTABLE_GAS_LIMIT\") {\n let errorData = error.data;\n if (!errorData && error.error && error.error.data) {\n errorData = error.error.data;\n }\n if (!errorData && error.error && error.error.body) {\n try {\n const body = JSON.parse(error.error.body);\n if (body.error && body.error.data) {\n errorData = body.error.data;\n }\n } catch {\n }\n }\n if (errorData) {\n try {\n const decodedError = contract.interface.parseError(errorData);\n if (decodedError) {\n const formattedArgs = decodedError.args.map((arg) => {\n if (isBigNumberOrBigInt(arg)) {\n return arg.toString();\n }\n return arg;\n });\n return `Contract Error: ${decodedError.name} - ${JSON.stringify(formattedArgs)}`;\n }\n } catch {\n if (error.reason) {\n return `Contract Error: ${error.reason}`;\n }\n }\n }\n if (error.reason) {\n return `Contract Error: ${error.reason}`;\n }\n }\n if (error.transaction) {\n try {\n const decodedError = contract.interface.parseError(error.data);\n if (decodedError) {\n const formattedArgs = decodedError.args.map((arg) => {\n if (isBigNumberOrBigInt(arg)) {\n return arg.toString();\n }\n return arg;\n });\n return `Transaction Error: ${decodedError.name} - ${JSON.stringify(formattedArgs)}`;\n }\n } catch {\n }\n }\n if (error.code === \"UNPREDICTABLE_GAS_LIMIT\") {\n let errorData = error.data;\n if (!errorData && error.error && error.error.data) {\n errorData = error.error.data;\n }\n if (!errorData && error.error && error.error.body) {\n try {\n const body = JSON.parse(error.error.body);\n if (body.error && body.error.data) {\n errorData = body.error.data;\n }\n } catch {\n }\n }\n if (errorData) {\n try {\n const decodedError = contract.interface.parseError(errorData);\n if (decodedError) {\n const formattedArgs = decodedError.args.map((arg) => {\n if (isBigNumberOrBigInt(arg)) {\n return arg.toString();\n }\n return arg;\n });\n return `Gas Estimation Error: ${decodedError.name} - ${JSON.stringify(formattedArgs)}`;\n }\n } catch {\n return `Gas Estimation Error: ${error.error?.message || error.message}`;\n }\n }\n return `Gas Estimation Error: ${error.error?.message || error.message}`;\n }\n if (error.errorArgs && Array.isArray(error.errorArgs)) {\n return `Contract Error: ${error.errorSignature || \"Unknown\"} - ${JSON.stringify(error.errorArgs)}`;\n }\n return error.message || \"Unknown contract error\";\n } catch {\n return error.message || \"Unknown error\";\n }\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/internal/app/App.js\n var require_App = __commonJS({\n \"../../libs/contracts-sdk/dist/src/internal/app/App.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.registerApp = registerApp;\n exports3.registerNextVersion = registerNextVersion;\n exports3.enableAppVersion = enableAppVersion;\n exports3.addDelegatee = addDelegatee;\n exports3.removeDelegatee = removeDelegatee;\n exports3.setDelegatee = setDelegatee;\n exports3.deleteApp = deleteApp;\n exports3.undeleteApp = undeleteApp;\n var utils_1 = require_utils7();\n async function registerApp(params) {\n const { contract, args: { appId, delegateeAddresses, versionAbilities }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"registerApp\", [appId, delegateeAddresses, versionAbilities], overrides);\n const tx = await contract.registerApp(appId, delegateeAddresses, versionAbilities, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Register App: ${decodedError}`);\n }\n }\n async function registerNextVersion(params) {\n const { contract, args: { appId, versionAbilities }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"registerNextAppVersion\", [appId, versionAbilities], overrides);\n const tx = await contract.registerNextAppVersion(appId, versionAbilities, {\n ...adjustedOverrides\n });\n const receipt = await tx.wait();\n const event = (0, utils_1.findEventByName)(contract, receipt.logs, \"NewAppVersionRegistered\");\n if (!event) {\n throw new Error(\"NewAppVersionRegistered event not found\");\n }\n const newAppVersion = contract.interface.parseLog(event)?.args?.appVersion;\n if (!newAppVersion) {\n throw new Error(\"NewAppVersionRegistered event does not contain appVersion argument\");\n }\n return {\n txHash: tx.hash,\n newAppVersion\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Register Next Version: ${decodedError}`);\n }\n }\n async function enableAppVersion(params) {\n const { contract, args: { appId, appVersion, enabled }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"enableAppVersion\", [appId, appVersion, enabled], overrides);\n const tx = await contract.enableAppVersion(appId, appVersion, enabled, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Enable App Version: ${decodedError}`);\n }\n }\n async function addDelegatee(params) {\n const { contract, args: { appId, delegateeAddress }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"addDelegatee\", [appId, delegateeAddress], overrides);\n const tx = await contract.addDelegatee(appId, delegateeAddress, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Add Delegatee: ${decodedError}`);\n }\n }\n async function removeDelegatee(params) {\n const { contract, args: { appId, delegateeAddress }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"removeDelegatee\", [appId, delegateeAddress], overrides);\n const tx = await contract.removeDelegatee(appId, delegateeAddress, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Remove Delegatee: ${decodedError}`);\n }\n }\n async function setDelegatee(params) {\n const { contract, args: { appId, delegateeAddresses }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"setDelegatee\", [appId, delegateeAddresses], overrides);\n const tx = await contract.setDelegatee(appId, delegateeAddresses, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Set Delegatee: ${decodedError}`);\n }\n }\n async function deleteApp(params) {\n const { contract, args: { appId }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"deleteApp\", [appId], overrides);\n const tx = await contract.deleteApp(appId, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Delete App: ${decodedError}`);\n }\n }\n async function undeleteApp(params) {\n const { contract, args: { appId }, overrides } = params;\n try {\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"undeleteApp\", [appId], overrides);\n const tx = await contract.undeleteApp(appId, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Undelete App: ${decodedError}`);\n }\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/utils/pkpInfo.js\n var require_pkpInfo = __commonJS({\n \"../../libs/contracts-sdk/dist/src/utils/pkpInfo.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getPkpTokenId = getPkpTokenId;\n exports3.getPkpEthAddress = getPkpEthAddress;\n var ethers_1 = require_lib32();\n var DATIL_PUBKEY_ROUTER_ADDRESS = \"0xF182d6bEf16Ba77e69372dD096D8B70Bc3d5B475\";\n var PUBKEY_ROUTER_ABI = [\n \"function ethAddressToPkpId(address ethAddress) public view returns (uint256)\",\n \"function getEthAddress(uint256 tokenId) public view returns (address)\"\n ];\n async function getPkpTokenId({ pkpEthAddress, signer }) {\n if (!ethers_1.ethers.utils.isAddress(pkpEthAddress)) {\n throw new Error(`Invalid Ethereum address: ${pkpEthAddress}`);\n }\n const pubkeyRouter = new ethers_1.ethers.Contract(DATIL_PUBKEY_ROUTER_ADDRESS, PUBKEY_ROUTER_ABI, signer.provider);\n return await pubkeyRouter.ethAddressToPkpId(pkpEthAddress);\n }\n async function getPkpEthAddress({ tokenId, signer }) {\n const tokenIdBN = ethers_1.ethers.BigNumber.from(tokenId);\n if (tokenIdBN.isZero()) {\n throw new Error(\"Invalid token ID: Token ID cannot be zero\");\n }\n const pubkeyRouter = new ethers_1.ethers.Contract(DATIL_PUBKEY_ROUTER_ADDRESS, PUBKEY_ROUTER_ABI, signer.provider);\n return await pubkeyRouter.getEthAddress(tokenIdBN);\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/internal/app/AppView.js\n var require_AppView = __commonJS({\n \"../../libs/contracts-sdk/dist/src/internal/app/AppView.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getAppById = getAppById;\n exports3.getAppIdByDelegatee = getAppIdByDelegatee;\n exports3.getAppVersion = getAppVersion;\n exports3.getAppsByManagerAddress = getAppsByManagerAddress;\n exports3.getAppByDelegateeAddress = getAppByDelegateeAddress;\n exports3.getDelegatedPkpEthAddresses = getDelegatedPkpEthAddresses;\n var utils_1 = require_utils7();\n var pkpInfo_1 = require_pkpInfo();\n async function getAppById(params) {\n const { args: { appId }, contract } = params;\n try {\n const chainApp = await contract.getAppById(appId);\n const { delegatees, ...app } = chainApp;\n return {\n ...app,\n id: app.id,\n latestVersion: app.latestVersion,\n delegateeAddresses: delegatees\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"AppNotRegistered\")) {\n return null;\n }\n throw new Error(`Failed to Get App By ID: ${decodedError}`);\n }\n }\n async function getAppIdByDelegatee(params) {\n const { args: { delegateeAddress }, contract } = params;\n try {\n const app = await contract.getAppByDelegatee(delegateeAddress);\n return app.id;\n } catch (error) {\n const decodedError = error instanceof Error ? error.message : String(error);\n if (decodedError.includes(\"DelegateeNotRegistered\")) {\n return null;\n }\n throw new Error(`Failed to Get App ID By Delegatee: ${decodedError}`);\n }\n }\n async function getAppVersion(params) {\n const { args: { appId, version: version7 }, contract } = params;\n try {\n const appVersion = await contract.getAppVersion(appId, version7);\n const convertedAppVersion = {\n version: appVersion.version,\n enabled: appVersion.enabled,\n abilities: appVersion.abilities.map((ability) => ({\n abilityIpfsCid: ability.abilityIpfsCid,\n policyIpfsCids: ability.policyIpfsCids\n }))\n };\n return {\n appVersion: convertedAppVersion\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"AppVersionNotRegistered\") || decodedError.includes(\"AppNotRegistered\")) {\n return null;\n }\n throw new Error(`Failed to Get App Version: ${decodedError}`);\n }\n }\n async function getAppsByManagerAddress(params) {\n const { args: { managerAddress, offset }, contract } = params;\n try {\n const [appIds, appVersionCounts] = await contract.getAppsByManager(managerAddress, offset);\n return appIds.map((id, idx) => ({\n id,\n versionCount: appVersionCounts[idx]\n }));\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"NoAppsFoundForManager\")) {\n return [];\n }\n throw new Error(`Failed to Get Apps By Manager: ${decodedError}`);\n }\n }\n async function getAppByDelegateeAddress(params) {\n const { args: { delegateeAddress }, contract } = params;\n try {\n const chainApp = await contract.getAppByDelegatee(delegateeAddress);\n const { delegatees, ...app } = chainApp;\n return {\n ...app,\n delegateeAddresses: delegatees,\n id: app.id,\n latestVersion: app.latestVersion\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"DelegateeNotRegistered\")) {\n return null;\n }\n throw new Error(`Failed to Get App By Delegatee: ${decodedError}`);\n }\n }\n async function getDelegatedPkpEthAddresses(params) {\n const { args: { appId, offset, version: version7 }, contract } = params;\n try {\n const delegatedAgentPkpTokenIds = await contract.getDelegatedAgentPkpTokenIds(appId, version7, offset);\n const delegatedAgentPkpEthAddresses = [];\n for (const tokenId of delegatedAgentPkpTokenIds) {\n const ethAddress2 = await (0, pkpInfo_1.getPkpEthAddress)({ tokenId, signer: contract.signer });\n delegatedAgentPkpEthAddresses.push(ethAddress2);\n }\n return delegatedAgentPkpEthAddresses;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Delegated Agent PKP Token IDs: ${decodedError}`);\n }\n }\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/constants.js\n var f, I, o, T, N, S;\n var init_constants = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/constants.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n f = { POS_INT: 0, NEG_INT: 1, BYTE_STRING: 2, UTF8_STRING: 3, ARRAY: 4, MAP: 5, TAG: 6, SIMPLE_FLOAT: 7 };\n I = { DATE_STRING: 0, DATE_EPOCH: 1, POS_BIGINT: 2, NEG_BIGINT: 3, DECIMAL_FRAC: 4, BIGFLOAT: 5, BASE64URL_EXPECTED: 21, BASE64_EXPECTED: 22, BASE16_EXPECTED: 23, CBOR: 24, URI: 32, BASE64URL: 33, BASE64: 34, MIME: 36, SET: 258, JSON: 262, WTF8: 273, REGEXP: 21066, SELF_DESCRIBED: 55799, INVALID_16: 65535, INVALID_32: 4294967295, INVALID_64: 0xffffffffffffffffn };\n o = { ZERO: 0, ONE: 24, TWO: 25, FOUR: 26, EIGHT: 27, INDEFINITE: 31 };\n T = { FALSE: 20, TRUE: 21, NULL: 22, UNDEFINED: 23 };\n N = class {\n static BREAK = Symbol.for(\"github.com/hildjj/cbor2/break\");\n static ENCODED = Symbol.for(\"github.com/hildjj/cbor2/cbor-encoded\");\n static LENGTH = Symbol.for(\"github.com/hildjj/cbor2/length\");\n };\n S = { MIN: -(2n ** 63n), MAX: 2n ** 64n - 1n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/tag.js\n var i;\n var init_tag = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/tag.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n i = class _i {\n static #e = /* @__PURE__ */ new Map();\n tag;\n contents;\n constructor(e2, t3 = void 0) {\n this.tag = e2, this.contents = t3;\n }\n get noChildren() {\n return !!_i.#e.get(this.tag)?.noChildren;\n }\n static registerDecoder(e2, t3, n2) {\n const o5 = this.#e.get(e2);\n return this.#e.set(e2, t3), o5 && (\"comment\" in t3 || (t3.comment = o5.comment), \"noChildren\" in t3 || (t3.noChildren = o5.noChildren)), n2 && !t3.comment && (t3.comment = () => `(${n2})`), o5;\n }\n static clearDecoder(e2) {\n const t3 = this.#e.get(e2);\n return this.#e.delete(e2), t3;\n }\n static getDecoder(e2) {\n return this.#e.get(e2);\n }\n static getAllDecoders() {\n return new Map(this.#e);\n }\n *[Symbol.iterator]() {\n yield this.contents;\n }\n push(e2) {\n return this.contents = e2, 1;\n }\n decode(e2) {\n const t3 = e2?.tags?.get(this.tag) ?? _i.#e.get(this.tag);\n return t3 ? t3(this, e2) : this;\n }\n comment(e2, t3) {\n const n2 = e2?.tags?.get(this.tag) ?? _i.#e.get(this.tag);\n if (n2?.comment)\n return n2.comment(this, e2, t3);\n }\n toCBOR() {\n return [this.tag, this.contents];\n }\n [Symbol.for(\"nodejs.util.inspect.custom\")](e2, t3, n2) {\n return `${this.tag}(${n2(this.contents, t3)})`;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/box.js\n function f2(n2) {\n if (n2 != null && typeof n2 == \"object\")\n return n2[N.ENCODED];\n }\n function s(n2) {\n if (n2 != null && typeof n2 == \"object\")\n return n2[N.LENGTH];\n }\n function u(n2, e2) {\n Object.defineProperty(n2, N.ENCODED, { configurable: true, enumerable: false, value: e2 });\n }\n function l(n2, e2) {\n Object.defineProperty(n2, N.LENGTH, { configurable: true, enumerable: false, value: e2 });\n }\n function d(n2, e2) {\n const r2 = Object(n2);\n return u(r2, e2), r2;\n }\n function t(n2) {\n if (!n2 || typeof n2 != \"object\")\n return n2;\n switch (n2.constructor) {\n case BigInt:\n case Boolean:\n case Number:\n case String:\n case Symbol:\n return n2.valueOf();\n case Array:\n return n2.map((e2) => t(e2));\n case Map: {\n const e2 = t([...n2.entries()]);\n return e2.every(([r2]) => typeof r2 == \"string\") ? Object.fromEntries(e2) : new Map(e2);\n }\n case i:\n return new i(t(n2.tag), t(n2.contents));\n case Object: {\n const e2 = {};\n for (const [r2, a3] of Object.entries(n2))\n e2[r2] = t(a3);\n return e2;\n }\n }\n return n2;\n }\n var init_box = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/box.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_tag();\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/utils.js\n function c(r2, n2) {\n Object.defineProperty(r2, g, { configurable: false, enumerable: false, writable: false, value: n2 });\n }\n function f3(r2) {\n return r2[g];\n }\n function l2(r2) {\n return f3(r2) !== void 0;\n }\n function R(r2, n2 = 0, t3 = r2.length - 1) {\n const o5 = r2.subarray(n2, t3), a3 = f3(r2);\n if (a3) {\n const s4 = [];\n for (const e2 of a3)\n if (e2[0] >= n2 && e2[0] + e2[1] <= t3) {\n const i3 = [...e2];\n i3[0] -= n2, s4.push(i3);\n }\n s4.length && c(o5, s4);\n }\n return o5;\n }\n function b(r2) {\n let n2 = Math.ceil(r2.length / 2);\n const t3 = new Uint8Array(n2);\n n2--;\n for (let o5 = r2.length, a3 = o5 - 2; o5 >= 0; o5 = a3, a3 -= 2, n2--)\n t3[n2] = parseInt(r2.substring(a3, o5), 16);\n return t3;\n }\n function A(r2) {\n return r2.reduce((n2, t3) => n2 + t3.toString(16).padStart(2, \"0\"), \"\");\n }\n function d2(r2) {\n const n2 = r2.reduce((e2, i3) => e2 + i3.length, 0), t3 = r2.some((e2) => l2(e2)), o5 = [], a3 = new Uint8Array(n2);\n let s4 = 0;\n for (const e2 of r2) {\n if (!(e2 instanceof Uint8Array))\n throw new TypeError(`Invalid array: ${e2}`);\n if (a3.set(e2, s4), t3) {\n const i3 = e2[g] ?? [[0, e2.length]];\n for (const u2 of i3)\n u2[0] += s4;\n o5.push(...i3);\n }\n s4 += e2.length;\n }\n return t3 && c(a3, o5), a3;\n }\n function y(r2) {\n const n2 = atob(r2);\n return Uint8Array.from(n2, (t3) => t3.codePointAt(0));\n }\n function x(r2) {\n const n2 = r2.replace(/[_-]/g, (t3) => p[t3]);\n return y(n2.padEnd(Math.ceil(n2.length / 4) * 4, \"=\"));\n }\n function h() {\n const r2 = new Uint8Array(4), n2 = new Uint32Array(r2.buffer);\n return !((n2[0] = 1) & r2[0]);\n }\n function U(r2) {\n let n2 = \"\";\n for (const t3 of r2) {\n const o5 = t3.codePointAt(0)?.toString(16).padStart(4, \"0\");\n n2 && (n2 += \", \"), n2 += `U+${o5}`;\n }\n return n2;\n }\n var g, p;\n var init_utils = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n g = Symbol(\"CBOR_RANGES\");\n p = { \"-\": \"+\", _: \"/\" };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/typeEncoderMap.js\n var s2;\n var init_typeEncoderMap = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/typeEncoderMap.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n s2 = class {\n #e = /* @__PURE__ */ new Map();\n registerEncoder(e2, t3) {\n const n2 = this.#e.get(e2);\n return this.#e.set(e2, t3), n2;\n }\n get(e2) {\n return this.#e.get(e2);\n }\n delete(e2) {\n return this.#e.delete(e2);\n }\n clear() {\n this.#e.clear();\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/sorts.js\n function f4(c4, d5) {\n const [u2, a3, n2] = c4, [l6, s4, t3] = d5, r2 = Math.min(n2.length, t3.length);\n for (let o5 = 0; o5 < r2; o5++) {\n const e2 = n2[o5] - t3[o5];\n if (e2 !== 0)\n return e2;\n }\n return 0;\n }\n var init_sorts = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/sorts.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/writer.js\n var e;\n var init_writer = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/writer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n e = class _e {\n static defaultOptions = { chunkSize: 4096 };\n #r;\n #i = [];\n #s = null;\n #t = 0;\n #a = 0;\n constructor(t3 = {}) {\n if (this.#r = { ..._e.defaultOptions, ...t3 }, this.#r.chunkSize < 8)\n throw new RangeError(`Expected size >= 8, got ${this.#r.chunkSize}`);\n this.#n();\n }\n get length() {\n return this.#a;\n }\n read() {\n this.#o();\n const t3 = new Uint8Array(this.#a);\n let i3 = 0;\n for (const s4 of this.#i)\n t3.set(s4, i3), i3 += s4.length;\n return this.#n(), t3;\n }\n write(t3) {\n const i3 = t3.length;\n i3 > this.#l() ? (this.#o(), i3 > this.#r.chunkSize ? (this.#i.push(t3), this.#n()) : (this.#n(), this.#i[this.#i.length - 1].set(t3), this.#t = i3)) : (this.#i[this.#i.length - 1].set(t3, this.#t), this.#t += i3), this.#a += i3;\n }\n writeUint8(t3) {\n this.#e(1), this.#s.setUint8(this.#t, t3), this.#h(1);\n }\n writeUint16(t3, i3 = false) {\n this.#e(2), this.#s.setUint16(this.#t, t3, i3), this.#h(2);\n }\n writeUint32(t3, i3 = false) {\n this.#e(4), this.#s.setUint32(this.#t, t3, i3), this.#h(4);\n }\n writeBigUint64(t3, i3 = false) {\n this.#e(8), this.#s.setBigUint64(this.#t, t3, i3), this.#h(8);\n }\n writeInt16(t3, i3 = false) {\n this.#e(2), this.#s.setInt16(this.#t, t3, i3), this.#h(2);\n }\n writeInt32(t3, i3 = false) {\n this.#e(4), this.#s.setInt32(this.#t, t3, i3), this.#h(4);\n }\n writeBigInt64(t3, i3 = false) {\n this.#e(8), this.#s.setBigInt64(this.#t, t3, i3), this.#h(8);\n }\n writeFloat32(t3, i3 = false) {\n this.#e(4), this.#s.setFloat32(this.#t, t3, i3), this.#h(4);\n }\n writeFloat64(t3, i3 = false) {\n this.#e(8), this.#s.setFloat64(this.#t, t3, i3), this.#h(8);\n }\n clear() {\n this.#a = 0, this.#i = [], this.#n();\n }\n #n() {\n const t3 = new Uint8Array(this.#r.chunkSize);\n this.#i.push(t3), this.#t = 0, this.#s = new DataView(t3.buffer, t3.byteOffset, t3.byteLength);\n }\n #o() {\n if (this.#t === 0) {\n this.#i.pop();\n return;\n }\n const t3 = this.#i.length - 1;\n this.#i[t3] = this.#i[t3].subarray(0, this.#t), this.#t = 0, this.#s = null;\n }\n #l() {\n const t3 = this.#i.length - 1;\n return this.#i[t3].length - this.#t;\n }\n #e(t3) {\n this.#l() < t3 && (this.#o(), this.#n());\n }\n #h(t3) {\n this.#t += t3, this.#a += t3;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/float.js\n function o2(e2, n2 = 0, t3 = false) {\n const r2 = e2[n2] & 128 ? -1 : 1, f7 = (e2[n2] & 124) >> 2, a3 = (e2[n2] & 3) << 8 | e2[n2 + 1];\n if (f7 === 0) {\n if (t3 && a3 !== 0)\n throw new Error(`Unwanted subnormal: ${r2 * 5960464477539063e-23 * a3}`);\n return r2 * 5960464477539063e-23 * a3;\n } else if (f7 === 31)\n return a3 ? NaN : r2 * (1 / 0);\n return r2 * 2 ** (f7 - 25) * (1024 + a3);\n }\n function s3(e2) {\n const n2 = new DataView(new ArrayBuffer(4));\n n2.setFloat32(0, e2, false);\n const t3 = n2.getUint32(0, false);\n if ((t3 & 8191) !== 0)\n return null;\n let r2 = t3 >> 16 & 32768;\n const f7 = t3 >> 23 & 255, a3 = t3 & 8388607;\n if (!(f7 === 0 && a3 === 0))\n if (f7 >= 113 && f7 <= 142)\n r2 += (f7 - 112 << 10) + (a3 >> 13);\n else if (f7 >= 103 && f7 < 113) {\n if (a3 & (1 << 126 - f7) - 1)\n return null;\n r2 += a3 + 8388608 >> 126 - f7;\n } else if (f7 === 255)\n r2 |= 31744, r2 |= a3 >> 13;\n else\n return null;\n return r2;\n }\n function i2(e2) {\n if (e2 !== 0) {\n const n2 = new ArrayBuffer(8), t3 = new DataView(n2);\n t3.setFloat64(0, e2, false);\n const r2 = t3.getBigUint64(0, false);\n if ((r2 & 0x7ff0000000000000n) === 0n)\n return r2 & 0x8000000000000000n ? -0 : 0;\n }\n return e2;\n }\n function l3(e2) {\n switch (e2.length) {\n case 2:\n o2(e2, 0, true);\n break;\n case 4: {\n const n2 = new DataView(e2.buffer, e2.byteOffset, e2.byteLength), t3 = n2.getUint32(0, false);\n if ((t3 & 2139095040) === 0 && t3 & 8388607)\n throw new Error(`Unwanted subnormal: ${n2.getFloat32(0, false)}`);\n break;\n }\n case 8: {\n const n2 = new DataView(e2.buffer, e2.byteOffset, e2.byteLength), t3 = n2.getBigUint64(0, false);\n if ((t3 & 0x7ff0000000000000n) === 0n && t3 & 0x000fffffffffffn)\n throw new Error(`Unwanted subnormal: ${n2.getFloat64(0, false)}`);\n break;\n }\n default:\n throw new TypeError(`Bad input to isSubnormal: ${e2}`);\n }\n }\n var init_float = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/float.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/errors.js\n var DecodeError, InvalidEncodingError;\n var init_errors = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n DecodeError = class extends TypeError {\n code = \"ERR_ENCODING_INVALID_ENCODED_DATA\";\n constructor() {\n super(\"The encoded data was not valid for encoding wtf-8\");\n }\n };\n InvalidEncodingError = class extends RangeError {\n code = \"ERR_ENCODING_NOT_SUPPORTED\";\n constructor(label) {\n super(`Invalid encoding: \"${label}\"`);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/const.js\n var BOM, EMPTY, MIN_HIGH_SURROGATE, MIN_LOW_SURROGATE, REPLACEMENT, WTF8;\n var init_const = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/const.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n BOM = 65279;\n EMPTY = new Uint8Array(0);\n MIN_HIGH_SURROGATE = 55296;\n MIN_LOW_SURROGATE = 56320;\n REPLACEMENT = 65533;\n WTF8 = \"wtf-8\";\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/decode.js\n function isArrayBufferView(input) {\n return input && !(input instanceof ArrayBuffer) && input.buffer instanceof ArrayBuffer;\n }\n function getUint8(input) {\n if (!input) {\n return EMPTY;\n }\n if (input instanceof Uint8Array) {\n return input;\n }\n if (isArrayBufferView(input)) {\n return new Uint8Array(input.buffer, input.byteOffset, input.byteLength);\n }\n return new Uint8Array(input);\n }\n var REMAINDER, Wtf8Decoder;\n var init_decode = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/decode.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_const();\n init_errors();\n REMAINDER = [\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n -1,\n -1,\n -1,\n -1,\n 1,\n 1,\n 2,\n 3\n ];\n Wtf8Decoder = class _Wtf8Decoder {\n static DEFAULT_BUFFERSIZE = 4096;\n encoding = WTF8;\n fatal;\n ignoreBOM;\n bufferSize;\n #left = 0;\n #cur = 0;\n #pending = 0;\n #first = true;\n #buf;\n constructor(label = \"wtf8\", options = void 0) {\n if (label.toLowerCase().replace(\"-\", \"\") !== \"wtf8\") {\n throw new InvalidEncodingError(label);\n }\n this.fatal = Boolean(options?.fatal);\n this.ignoreBOM = Boolean(options?.ignoreBOM);\n this.bufferSize = Math.floor(options?.bufferSize ?? _Wtf8Decoder.DEFAULT_BUFFERSIZE);\n if (isNaN(this.bufferSize) || this.bufferSize < 1) {\n throw new RangeError(`Invalid buffer size: ${options?.bufferSize}`);\n }\n this.#buf = new Uint16Array(this.bufferSize);\n }\n decode(input, options) {\n const streaming = Boolean(options?.stream);\n const bytes = getUint8(input);\n const res = [];\n const out = this.#buf;\n const maxSize = this.bufferSize - 3;\n let pos = 0;\n const fatal = () => {\n this.#cur = 0;\n this.#left = 0;\n this.#pending = 0;\n if (this.fatal) {\n throw new DecodeError();\n }\n out[pos++] = REPLACEMENT;\n };\n const fatals = () => {\n const p4 = this.#pending;\n for (let i3 = 0; i3 < p4; i3++) {\n fatal();\n }\n };\n const oneByte = (b4) => {\n if (this.#left === 0) {\n const n2 = REMAINDER[b4 >> 4];\n switch (n2) {\n case -1:\n fatal();\n break;\n case 0:\n out[pos++] = b4;\n break;\n case 1:\n this.#cur = b4 & 31;\n if ((this.#cur & 30) === 0) {\n fatal();\n } else {\n this.#left = 1;\n this.#pending = 1;\n }\n break;\n case 2:\n this.#cur = b4 & 15;\n this.#left = 2;\n this.#pending = 1;\n break;\n case 3:\n if (b4 & 8) {\n fatal();\n } else {\n this.#cur = b4 & 7;\n this.#left = 3;\n this.#pending = 1;\n }\n break;\n }\n } else {\n if ((b4 & 192) !== 128) {\n fatals();\n return oneByte(b4);\n }\n if (this.#pending === 1 && this.#left === 2 && this.#cur === 0 && (b4 & 32) === 0) {\n fatals();\n return oneByte(b4);\n }\n if (this.#left === 3 && this.#cur === 0 && (b4 & 48) === 0) {\n fatals();\n return oneByte(b4);\n }\n this.#cur = this.#cur << 6 | b4 & 63;\n this.#pending++;\n if (--this.#left === 0) {\n if (this.ignoreBOM || !this.#first || this.#cur !== BOM) {\n if (this.#cur < 65536) {\n out[pos++] = this.#cur;\n } else {\n const cp = this.#cur - 65536;\n out[pos++] = cp >>> 10 & 1023 | MIN_HIGH_SURROGATE;\n out[pos++] = cp & 1023 | MIN_LOW_SURROGATE;\n }\n }\n this.#cur = 0;\n this.#pending = 0;\n this.#first = false;\n }\n }\n };\n for (const b4 of bytes) {\n if (pos >= maxSize) {\n res.push(String.fromCharCode.apply(null, out.subarray(0, pos)));\n pos = 0;\n }\n oneByte(b4);\n }\n if (!streaming) {\n this.#first = true;\n if (this.#cur || this.#left) {\n fatals();\n }\n }\n if (pos > 0) {\n res.push(String.fromCharCode.apply(null, out.subarray(0, pos)));\n }\n return res.join(\"\");\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/encode.js\n function utf8length(str) {\n let len = 0;\n for (const s4 of str) {\n const cp = s4.codePointAt(0);\n if (cp < 128) {\n len++;\n } else if (cp < 2048) {\n len += 2;\n } else if (cp < 65536) {\n len += 3;\n } else {\n len += 4;\n }\n }\n return len;\n }\n var Wtf8Encoder;\n var init_encode = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/encode.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_const();\n Wtf8Encoder = class {\n encoding = WTF8;\n encode(input) {\n if (!input) {\n return EMPTY;\n }\n const buf = new Uint8Array(utf8length(String(input)));\n this.encodeInto(input, buf);\n return buf;\n }\n encodeInto(source, destination) {\n const str = String(source);\n const len = str.length;\n const outLen = destination.length;\n let written = 0;\n let read = 0;\n for (read = 0; read < len; read++) {\n const c4 = str.codePointAt(read);\n if (c4 < 128) {\n if (written >= outLen) {\n break;\n }\n destination[written++] = c4;\n } else if (c4 < 2048) {\n if (written >= outLen - 1) {\n break;\n }\n destination[written++] = 192 | c4 >> 6;\n destination[written++] = 128 | c4 & 63;\n } else if (c4 < 65536) {\n if (written >= outLen - 2) {\n break;\n }\n destination[written++] = 224 | c4 >> 12;\n destination[written++] = 128 | c4 >> 6 & 63;\n destination[written++] = 128 | c4 & 63;\n } else {\n if (written >= outLen - 3) {\n break;\n }\n destination[written++] = 240 | c4 >> 18;\n destination[written++] = 128 | c4 >> 12 & 63;\n destination[written++] = 128 | c4 >> 6 & 63;\n destination[written++] = 128 | c4 & 63;\n read++;\n }\n }\n return {\n read,\n written\n };\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/decodeStream.js\n var init_decodeStream = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/decodeStream.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_decode();\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/encodeStream.js\n var init_encodeStream = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/encodeStream.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_const();\n init_encode();\n }\n });\n\n // ../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/index.js\n var init_lib = __esm({\n \"../../../node_modules/.pnpm/@cto.af+wtf8@0.0.2/node_modules/@cto.af/wtf8/lib/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors();\n init_decode();\n init_encode();\n init_decodeStream();\n init_encodeStream();\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/encoder.js\n function y2(e2) {\n const n2 = e2 < 0;\n return typeof e2 == \"bigint\" ? [n2 ? -e2 - 1n : e2, n2] : [n2 ? -e2 - 1 : e2, n2];\n }\n function T2(e2, n2, t3) {\n if (t3.rejectFloats)\n throw new Error(`Attempt to encode an unwanted floating point number: ${e2}`);\n if (isNaN(e2))\n n2.writeUint8(U2), n2.writeUint16(32256);\n else if (!t3.float64 && Math.fround(e2) === e2) {\n const r2 = s3(e2);\n r2 === null ? (n2.writeUint8(h2), n2.writeFloat32(e2)) : (n2.writeUint8(U2), n2.writeUint16(r2));\n } else\n n2.writeUint8(B), n2.writeFloat64(e2);\n }\n function a(e2, n2, t3) {\n const [r2, i3] = y2(e2);\n if (i3 && t3)\n throw new TypeError(`Negative size: ${e2}`);\n t3 ??= i3 ? f.NEG_INT : f.POS_INT, t3 <<= 5, r2 < 24 ? n2.writeUint8(t3 | r2) : r2 <= 255 ? (n2.writeUint8(t3 | o.ONE), n2.writeUint8(r2)) : r2 <= 65535 ? (n2.writeUint8(t3 | o.TWO), n2.writeUint16(r2)) : r2 <= 4294967295 ? (n2.writeUint8(t3 | o.FOUR), n2.writeUint32(r2)) : (n2.writeUint8(t3 | o.EIGHT), n2.writeBigUint64(BigInt(r2)));\n }\n function p2(e2, n2, t3) {\n typeof e2 == \"number\" ? a(e2, n2, f.TAG) : typeof e2 == \"object\" && !t3.ignoreOriginalEncoding && N.ENCODED in e2 ? n2.write(e2[N.ENCODED]) : e2 <= Number.MAX_SAFE_INTEGER ? a(Number(e2), n2, f.TAG) : (n2.writeUint8(f.TAG << 5 | o.EIGHT), n2.writeBigUint64(BigInt(e2)));\n }\n function N2(e2, n2, t3) {\n const [r2, i3] = y2(e2);\n if (t3.collapseBigInts && (!t3.largeNegativeAsBigInt || e2 >= -0x8000000000000000n)) {\n if (r2 <= 0xffffffffn) {\n a(Number(e2), n2);\n return;\n }\n if (r2 <= 0xffffffffffffffffn) {\n const E2 = (i3 ? f.NEG_INT : f.POS_INT) << 5;\n n2.writeUint8(E2 | o.EIGHT), n2.writeBigUint64(r2);\n return;\n }\n }\n if (t3.rejectBigInts)\n throw new Error(`Attempt to encode unwanted bigint: ${e2}`);\n const o5 = i3 ? I.NEG_BIGINT : I.POS_BIGINT, c4 = r2.toString(16), s4 = c4.length % 2 ? \"0\" : \"\";\n p2(o5, n2, t3);\n const u2 = b(s4 + c4);\n a(u2.length, n2, f.BYTE_STRING), n2.write(u2);\n }\n function Y(e2, n2, t3) {\n t3.flushToZero && (e2 = i2(e2)), Object.is(e2, -0) ? t3.simplifyNegativeZero ? t3.avoidInts ? T2(0, n2, t3) : a(0, n2) : T2(e2, n2, t3) : !t3.avoidInts && Number.isSafeInteger(e2) ? a(e2, n2) : t3.reduceUnsafeNumbers && Math.floor(e2) === e2 && e2 >= S.MIN && e2 <= S.MAX ? N2(BigInt(e2), n2, t3) : T2(e2, n2, t3);\n }\n function Z(e2, n2, t3) {\n const r2 = t3.stringNormalization ? e2.normalize(t3.stringNormalization) : e2;\n if (t3.wtf8 && !e2.isWellFormed()) {\n const i3 = K.encode(r2);\n p2(I.WTF8, n2, t3), a(i3.length, n2, f.BYTE_STRING), n2.write(i3);\n } else {\n const i3 = z.encode(r2);\n a(i3.length, n2, f.UTF8_STRING), n2.write(i3);\n }\n }\n function J(e2, n2, t3) {\n const r2 = e2;\n R2(r2, r2.length, f.ARRAY, n2, t3);\n for (const i3 of r2)\n g2(i3, n2, t3);\n }\n function V(e2, n2) {\n a(e2.length, n2, f.BYTE_STRING), n2.write(e2);\n }\n function ce(e2, n2) {\n return b2.registerEncoder(e2, n2);\n }\n function R2(e2, n2, t3, r2, i3) {\n const o5 = s(e2);\n o5 && !i3.ignoreOriginalEncoding ? r2.write(o5) : a(n2, r2, t3);\n }\n function X(e2, n2, t3) {\n if (e2 === null) {\n n2.writeUint8(q);\n return;\n }\n if (!t3.ignoreOriginalEncoding && N.ENCODED in e2) {\n n2.write(e2[N.ENCODED]);\n return;\n }\n const r2 = e2.constructor;\n if (r2) {\n const o5 = t3.types?.get(r2) ?? b2.get(r2);\n if (o5) {\n const c4 = o5(e2, n2, t3);\n if (c4 !== void 0) {\n if (!Array.isArray(c4) || c4.length !== 2)\n throw new Error(\"Invalid encoder return value\");\n (typeof c4[0] == \"bigint\" || isFinite(Number(c4[0]))) && p2(c4[0], n2, t3), g2(c4[1], n2, t3);\n }\n return;\n }\n }\n if (typeof e2.toCBOR == \"function\") {\n const o5 = e2.toCBOR(n2, t3);\n o5 && ((typeof o5[0] == \"bigint\" || isFinite(Number(o5[0]))) && p2(o5[0], n2, t3), g2(o5[1], n2, t3));\n return;\n }\n if (typeof e2.toJSON == \"function\") {\n g2(e2.toJSON(), n2, t3);\n return;\n }\n const i3 = Object.entries(e2).map((o5) => [o5[0], o5[1], Q(o5[0], t3)]);\n t3.sortKeys && i3.sort(t3.sortKeys), R2(e2, i3.length, f.MAP, n2, t3);\n for (const [o5, c4, s4] of i3)\n n2.write(s4), g2(c4, n2, t3);\n }\n function g2(e2, n2, t3) {\n switch (typeof e2) {\n case \"number\":\n Y(e2, n2, t3);\n break;\n case \"bigint\":\n N2(e2, n2, t3);\n break;\n case \"string\":\n Z(e2, n2, t3);\n break;\n case \"boolean\":\n n2.writeUint8(e2 ? j : P);\n break;\n case \"undefined\":\n if (t3.rejectUndefined)\n throw new Error(\"Attempt to encode unwanted undefined.\");\n n2.writeUint8($);\n break;\n case \"object\":\n X(e2, n2, t3);\n break;\n case \"symbol\":\n throw new TypeError(`Unknown symbol: ${e2.toString()}`);\n default:\n throw new TypeError(`Unknown type: ${typeof e2}, ${String(e2)}`);\n }\n }\n function Q(e2, n2 = {}) {\n const t3 = { ...k };\n n2.dcbor ? Object.assign(t3, H) : n2.cde && Object.assign(t3, F), Object.assign(t3, n2);\n const r2 = new e(t3);\n return g2(e2, r2, t3), r2.read();\n }\n function de(e2, n2, t3 = f.POS_INT) {\n n2 || (n2 = \"f\");\n const r2 = { ...k, collapseBigInts: false, chunkSize: 10, simplifyNegativeZero: false }, i3 = new e(r2), o5 = Number(e2);\n function c4(s4) {\n if (Object.is(e2, -0))\n throw new Error(\"Invalid integer: -0\");\n const [u2, E2] = y2(e2);\n if (E2 && t3 !== f.POS_INT)\n throw new Error(\"Invalid major type combination\");\n const w3 = typeof s4 == \"number\" && isFinite(s4);\n if (w3 && !Number.isSafeInteger(o5))\n throw new TypeError(`Unsafe number for ${n2}: ${e2}`);\n if (u2 > s4)\n throw new TypeError(`Undersized encoding ${n2} for: ${e2}`);\n const A4 = (E2 ? f.NEG_INT : t3) << 5;\n return w3 ? [A4, Number(u2)] : [A4, u2];\n }\n switch (n2) {\n case \"bigint\":\n if (Object.is(e2, -0))\n throw new TypeError(\"Invalid bigint: -0\");\n e2 = BigInt(e2), N2(e2, i3, r2);\n break;\n case \"f\":\n T2(o5, i3, r2);\n break;\n case \"f16\": {\n const s4 = s3(o5);\n if (s4 === null)\n throw new TypeError(`Invalid f16: ${e2}`);\n i3.writeUint8(U2), i3.writeUint16(s4);\n break;\n }\n case \"f32\":\n if (!isNaN(o5) && Math.fround(o5) !== o5)\n throw new TypeError(`Invalid f32: ${e2}`);\n i3.writeUint8(h2), i3.writeFloat32(o5);\n break;\n case \"f64\":\n i3.writeUint8(B), i3.writeFloat64(o5);\n break;\n case \"i\":\n if (Object.is(e2, -0))\n throw new Error(\"Invalid integer: -0\");\n if (Number.isSafeInteger(o5))\n a(o5, i3, e2 < 0 ? void 0 : t3);\n else {\n const [s4, u2] = c4(1 / 0);\n u2 > 0xffffffffffffffffn ? (e2 = BigInt(e2), N2(e2, i3, r2)) : (i3.writeUint8(s4 | o.EIGHT), i3.writeBigUint64(BigInt(u2)));\n }\n break;\n case \"i0\": {\n const [s4, u2] = c4(23);\n i3.writeUint8(s4 | u2);\n break;\n }\n case \"i8\": {\n const [s4, u2] = c4(255);\n i3.writeUint8(s4 | o.ONE), i3.writeUint8(u2);\n break;\n }\n case \"i16\": {\n const [s4, u2] = c4(65535);\n i3.writeUint8(s4 | o.TWO), i3.writeUint16(u2);\n break;\n }\n case \"i32\": {\n const [s4, u2] = c4(4294967295);\n i3.writeUint8(s4 | o.FOUR), i3.writeUint32(u2);\n break;\n }\n case \"i64\": {\n const [s4, u2] = c4(0xffffffffffffffffn);\n i3.writeUint8(s4 | o.EIGHT), i3.writeBigUint64(BigInt(u2));\n break;\n }\n default:\n throw new TypeError(`Invalid number encoding: \"${n2}\"`);\n }\n return d(e2, i3.read());\n }\n var se, U2, h2, B, j, P, $, q, z, K, k, F, H, b2;\n var init_encoder = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/encoder.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_typeEncoderMap();\n init_constants();\n init_sorts();\n init_writer();\n init_box();\n init_float();\n init_lib();\n init_utils();\n ({ ENCODED: se } = N);\n U2 = f.SIMPLE_FLOAT << 5 | o.TWO;\n h2 = f.SIMPLE_FLOAT << 5 | o.FOUR;\n B = f.SIMPLE_FLOAT << 5 | o.EIGHT;\n j = f.SIMPLE_FLOAT << 5 | T.TRUE;\n P = f.SIMPLE_FLOAT << 5 | T.FALSE;\n $ = f.SIMPLE_FLOAT << 5 | T.UNDEFINED;\n q = f.SIMPLE_FLOAT << 5 | T.NULL;\n z = new TextEncoder();\n K = new Wtf8Encoder();\n k = { ...e.defaultOptions, avoidInts: false, cde: false, collapseBigInts: true, dcbor: false, float64: false, flushToZero: false, forceEndian: null, ignoreOriginalEncoding: false, largeNegativeAsBigInt: false, reduceUnsafeNumbers: false, rejectBigInts: false, rejectCustomSimples: false, rejectDuplicateKeys: false, rejectFloats: false, rejectUndefined: false, simplifyNegativeZero: false, sortKeys: null, stringNormalization: null, types: null, wtf8: false };\n F = { cde: true, ignoreOriginalEncoding: true, sortKeys: f4 };\n H = { ...F, dcbor: true, largeNegativeAsBigInt: true, reduceUnsafeNumbers: true, rejectCustomSimples: true, rejectDuplicateKeys: true, rejectUndefined: true, simplifyNegativeZero: true, stringNormalization: \"NFC\" };\n b2 = new s2();\n b2.registerEncoder(Array, J), b2.registerEncoder(Uint8Array, V);\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/options.js\n var o3;\n var init_options = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/options.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n o3 = ((e2) => (e2[e2.NEVER = -1] = \"NEVER\", e2[e2.PREFERRED = 0] = \"PREFERRED\", e2[e2.ALWAYS = 1] = \"ALWAYS\", e2))(o3 || {});\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/simple.js\n var t2;\n var init_simple = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/simple.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_encoder();\n t2 = class _t {\n static KnownSimple = /* @__PURE__ */ new Map([[T.FALSE, false], [T.TRUE, true], [T.NULL, null], [T.UNDEFINED, void 0]]);\n value;\n constructor(e2) {\n this.value = e2;\n }\n static create(e2) {\n return _t.KnownSimple.has(e2) ? _t.KnownSimple.get(e2) : new _t(e2);\n }\n toCBOR(e2, i3) {\n if (i3.rejectCustomSimples)\n throw new Error(`Cannot encode non-standard Simple value: ${this.value}`);\n a(this.value, e2, f.SIMPLE_FLOAT);\n }\n toString() {\n return `simple(${this.value})`;\n }\n decode() {\n return _t.KnownSimple.has(this.value) ? _t.KnownSimple.get(this.value) : this;\n }\n [Symbol.for(\"nodejs.util.inspect.custom\")](e2, i3, r2) {\n return `simple(${r2(this.value, i3)})`;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/decodeStream.js\n var p3, y3;\n var init_decodeStream2 = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/decodeStream.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_utils();\n init_simple();\n init_float();\n p3 = new TextDecoder(\"utf8\", { fatal: true, ignoreBOM: true });\n y3 = class _y {\n static defaultOptions = { maxDepth: 1024, encoding: \"hex\", requirePreferred: false };\n #t;\n #r;\n #e = 0;\n #i;\n constructor(t3, r2) {\n if (this.#i = { ..._y.defaultOptions, ...r2 }, typeof t3 == \"string\")\n switch (this.#i.encoding) {\n case \"hex\":\n this.#t = b(t3);\n break;\n case \"base64\":\n this.#t = y(t3);\n break;\n default:\n throw new TypeError(`Encoding not implemented: \"${this.#i.encoding}\"`);\n }\n else\n this.#t = t3;\n this.#r = new DataView(this.#t.buffer, this.#t.byteOffset, this.#t.byteLength);\n }\n toHere(t3) {\n return R(this.#t, t3, this.#e);\n }\n *[Symbol.iterator]() {\n if (yield* this.#n(0), this.#e !== this.#t.length)\n throw new Error(\"Extra data in input\");\n }\n *seq() {\n for (; this.#e < this.#t.length; )\n yield* this.#n(0);\n }\n *#n(t3) {\n if (t3++ > this.#i.maxDepth)\n throw new Error(`Maximum depth ${this.#i.maxDepth} exceeded`);\n const r2 = this.#e, c4 = this.#r.getUint8(this.#e++), i3 = c4 >> 5, n2 = c4 & 31;\n let e2 = n2, f7 = false, a3 = 0;\n switch (n2) {\n case o.ONE:\n if (a3 = 1, e2 = this.#r.getUint8(this.#e), i3 === f.SIMPLE_FLOAT) {\n if (e2 < 32)\n throw new Error(`Invalid simple encoding in extra byte: ${e2}`);\n f7 = true;\n } else if (this.#i.requirePreferred && e2 < 24)\n throw new Error(`Unexpectedly long integer encoding (1) for ${e2}`);\n break;\n case o.TWO:\n if (a3 = 2, i3 === f.SIMPLE_FLOAT)\n e2 = o2(this.#t, this.#e);\n else if (e2 = this.#r.getUint16(this.#e, false), this.#i.requirePreferred && e2 <= 255)\n throw new Error(`Unexpectedly long integer encoding (2) for ${e2}`);\n break;\n case o.FOUR:\n if (a3 = 4, i3 === f.SIMPLE_FLOAT)\n e2 = this.#r.getFloat32(this.#e, false);\n else if (e2 = this.#r.getUint32(this.#e, false), this.#i.requirePreferred && e2 <= 65535)\n throw new Error(`Unexpectedly long integer encoding (4) for ${e2}`);\n break;\n case o.EIGHT: {\n if (a3 = 8, i3 === f.SIMPLE_FLOAT)\n e2 = this.#r.getFloat64(this.#e, false);\n else if (e2 = this.#r.getBigUint64(this.#e, false), e2 <= Number.MAX_SAFE_INTEGER && (e2 = Number(e2)), this.#i.requirePreferred && e2 <= 4294967295)\n throw new Error(`Unexpectedly long integer encoding (8) for ${e2}`);\n break;\n }\n case 28:\n case 29:\n case 30:\n throw new Error(`Additional info not implemented: ${n2}`);\n case o.INDEFINITE:\n switch (i3) {\n case f.POS_INT:\n case f.NEG_INT:\n case f.TAG:\n throw new Error(`Invalid indefinite encoding for MT ${i3}`);\n case f.SIMPLE_FLOAT:\n yield [i3, n2, N.BREAK, r2, 0];\n return;\n }\n e2 = 1 / 0;\n break;\n default:\n f7 = true;\n }\n switch (this.#e += a3, i3) {\n case f.POS_INT:\n yield [i3, n2, e2, r2, a3];\n break;\n case f.NEG_INT:\n yield [i3, n2, typeof e2 == \"bigint\" ? -1n - e2 : -1 - Number(e2), r2, a3];\n break;\n case f.BYTE_STRING:\n e2 === 1 / 0 ? yield* this.#s(i3, t3, r2) : yield [i3, n2, this.#a(e2), r2, e2];\n break;\n case f.UTF8_STRING:\n e2 === 1 / 0 ? yield* this.#s(i3, t3, r2) : yield [i3, n2, p3.decode(this.#a(e2)), r2, e2];\n break;\n case f.ARRAY:\n if (e2 === 1 / 0)\n yield* this.#s(i3, t3, r2, false);\n else {\n const o5 = Number(e2);\n yield [i3, n2, o5, r2, a3];\n for (let h4 = 0; h4 < o5; h4++)\n yield* this.#n(t3 + 1);\n }\n break;\n case f.MAP:\n if (e2 === 1 / 0)\n yield* this.#s(i3, t3, r2, false);\n else {\n const o5 = Number(e2);\n yield [i3, n2, o5, r2, a3];\n for (let h4 = 0; h4 < o5; h4++)\n yield* this.#n(t3), yield* this.#n(t3);\n }\n break;\n case f.TAG:\n yield [i3, n2, e2, r2, a3], yield* this.#n(t3);\n break;\n case f.SIMPLE_FLOAT: {\n const o5 = e2;\n f7 && (e2 = t2.create(Number(e2))), yield [i3, n2, e2, r2, o5];\n break;\n }\n }\n }\n #a(t3) {\n const r2 = R(this.#t, this.#e, this.#e += t3);\n if (r2.length !== t3)\n throw new Error(`Unexpected end of stream reading ${t3} bytes, got ${r2.length}`);\n return r2;\n }\n *#s(t3, r2, c4, i3 = true) {\n for (yield [t3, o.INDEFINITE, 1 / 0, c4, 1 / 0]; ; ) {\n const n2 = this.#n(r2), e2 = n2.next(), [f7, a3, o5] = e2.value;\n if (o5 === N.BREAK) {\n yield e2.value, n2.next();\n return;\n }\n if (i3) {\n if (f7 !== t3)\n throw new Error(`Unmatched major type. Expected ${t3}, got ${f7}.`);\n if (a3 === o.INDEFINITE)\n throw new Error(\"New stream started in typed stream\");\n }\n yield e2.value, yield* n2;\n }\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/container.js\n function k2(d5, r2) {\n return !r2.boxed && !r2.preferMap && d5.every(([i3]) => typeof i3 == \"string\") ? Object.fromEntries(d5) : new Map(d5);\n }\n var v, A2, w;\n var init_container = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/container.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_options();\n init_sorts();\n init_box();\n init_encoder();\n init_utils();\n init_decodeStream2();\n init_simple();\n init_tag();\n init_float();\n v = /* @__PURE__ */ new Map([[o.ZERO, 1], [o.ONE, 2], [o.TWO, 3], [o.FOUR, 5], [o.EIGHT, 9]]);\n A2 = new Uint8Array(0);\n w = class _w {\n static defaultDecodeOptions = { ...y3.defaultOptions, ParentType: _w, boxed: false, cde: false, dcbor: false, diagnosticSizes: o3.PREFERRED, convertUnsafeIntsToFloat: false, createObject: k2, pretty: false, preferMap: false, rejectLargeNegatives: false, rejectBigInts: false, rejectDuplicateKeys: false, rejectFloats: false, rejectInts: false, rejectLongLoundNaN: false, rejectLongFloats: false, rejectNegativeZero: false, rejectSimple: false, rejectStreaming: false, rejectStringsNotNormalizedAs: null, rejectSubnormals: false, rejectUndefined: false, rejectUnsafeFloatInts: false, saveOriginal: false, sortKeys: null, tags: null };\n static cdeDecodeOptions = { cde: true, rejectStreaming: true, requirePreferred: true, sortKeys: f4 };\n static dcborDecodeOptions = { ...this.cdeDecodeOptions, dcbor: true, convertUnsafeIntsToFloat: true, rejectDuplicateKeys: true, rejectLargeNegatives: true, rejectLongLoundNaN: true, rejectLongFloats: true, rejectNegativeZero: true, rejectSimple: true, rejectUndefined: true, rejectUnsafeFloatInts: true, rejectStringsNotNormalizedAs: \"NFC\" };\n parent;\n mt;\n ai;\n left;\n offset;\n count = 0;\n children = [];\n depth = 0;\n #e;\n #t = null;\n constructor(r2, i3, e2, t3) {\n if ([this.mt, this.ai, , this.offset] = r2, this.left = i3, this.parent = e2, this.#e = t3, e2 && (this.depth = e2.depth + 1), this.mt === f.MAP && (this.#e.sortKeys || this.#e.rejectDuplicateKeys) && (this.#t = []), this.#e.rejectStreaming && this.ai === o.INDEFINITE)\n throw new Error(\"Streaming not supported\");\n }\n get isStreaming() {\n return this.left === 1 / 0;\n }\n get done() {\n return this.left === 0;\n }\n static create(r2, i3, e2, t3) {\n const [s4, l6, n2, c4] = r2;\n switch (s4) {\n case f.POS_INT:\n case f.NEG_INT: {\n if (e2.rejectInts)\n throw new Error(`Unexpected integer: ${n2}`);\n if (e2.rejectLargeNegatives && n2 < -0x8000000000000000n)\n throw new Error(`Invalid 65bit negative number: ${n2}`);\n let o5 = n2;\n return e2.convertUnsafeIntsToFloat && o5 >= S.MIN && o5 <= S.MAX && (o5 = Number(n2)), e2.boxed ? d(o5, t3.toHere(c4)) : o5;\n }\n case f.SIMPLE_FLOAT:\n if (l6 > o.ONE) {\n if (e2.rejectFloats)\n throw new Error(`Decoding unwanted floating point number: ${n2}`);\n if (e2.rejectNegativeZero && Object.is(n2, -0))\n throw new Error(\"Decoding negative zero\");\n if (e2.rejectLongLoundNaN && isNaN(n2)) {\n const o5 = t3.toHere(c4);\n if (o5.length !== 3 || o5[1] !== 126 || o5[2] !== 0)\n throw new Error(`Invalid NaN encoding: \"${A(o5)}\"`);\n }\n if (e2.rejectSubnormals && l3(t3.toHere(c4 + 1)), e2.rejectLongFloats) {\n const o5 = Q(n2, { chunkSize: 9, reduceUnsafeNumbers: e2.rejectUnsafeFloatInts });\n if (o5[0] >> 5 !== s4)\n throw new Error(`Should have been encoded as int, not float: ${n2}`);\n if (o5.length < v.get(l6))\n throw new Error(`Number should have been encoded shorter: ${n2}`);\n }\n if (typeof n2 == \"number\" && e2.boxed)\n return d(n2, t3.toHere(c4));\n } else {\n if (e2.rejectSimple && n2 instanceof t2)\n throw new Error(`Invalid simple value: ${n2}`);\n if (e2.rejectUndefined && n2 === void 0)\n throw new Error(\"Unexpected undefined\");\n }\n return n2;\n case f.BYTE_STRING:\n case f.UTF8_STRING:\n if (n2 === 1 / 0)\n return new e2.ParentType(r2, 1 / 0, i3, e2);\n if (e2.rejectStringsNotNormalizedAs && typeof n2 == \"string\") {\n const o5 = n2.normalize(e2.rejectStringsNotNormalizedAs);\n if (n2 !== o5)\n throw new Error(`String not normalized as \"${e2.rejectStringsNotNormalizedAs}\", got [${U(n2)}] instead of [${U(o5)}]`);\n }\n return e2.boxed ? d(n2, t3.toHere(c4)) : n2;\n case f.ARRAY:\n return new e2.ParentType(r2, n2, i3, e2);\n case f.MAP:\n return new e2.ParentType(r2, n2 * 2, i3, e2);\n case f.TAG: {\n const o5 = new e2.ParentType(r2, 1, i3, e2);\n return o5.children = new i(n2), o5;\n }\n }\n throw new TypeError(`Invalid major type: ${s4}`);\n }\n static decodeToEncodeOpts(r2) {\n return { ...k, avoidInts: r2.rejectInts, float64: !r2.rejectLongFloats, flushToZero: r2.rejectSubnormals, largeNegativeAsBigInt: r2.rejectLargeNegatives, sortKeys: r2.sortKeys };\n }\n push(r2, i3, e2) {\n if (this.children.push(r2), this.#t) {\n const t3 = f2(r2) || i3.toHere(e2);\n this.#t.push(t3);\n }\n return --this.left;\n }\n replaceLast(r2, i3, e2) {\n let t3, s4 = -1 / 0;\n if (this.children instanceof i ? (s4 = 0, t3 = this.children.contents, this.children.contents = r2) : (s4 = this.children.length - 1, t3 = this.children[s4], this.children[s4] = r2), this.#t) {\n const l6 = f2(r2) || e2.toHere(i3.offset);\n this.#t[s4] = l6;\n }\n return t3;\n }\n convert(r2) {\n let i3;\n switch (this.mt) {\n case f.ARRAY:\n i3 = this.children;\n break;\n case f.MAP: {\n const e2 = this.#r();\n if (this.#e.sortKeys) {\n let t3;\n for (const s4 of e2) {\n if (t3 && this.#e.sortKeys(t3, s4) >= 0)\n throw new Error(`Duplicate or out of order key: \"0x${s4[2]}\"`);\n t3 = s4;\n }\n } else if (this.#e.rejectDuplicateKeys) {\n const t3 = /* @__PURE__ */ new Set();\n for (const [s4, l6, n2] of e2) {\n const c4 = A(n2);\n if (t3.has(c4))\n throw new Error(`Duplicate key: \"0x${c4}\"`);\n t3.add(c4);\n }\n }\n i3 = this.#e.createObject(e2, this.#e);\n break;\n }\n case f.BYTE_STRING:\n return d2(this.children);\n case f.UTF8_STRING: {\n const e2 = this.children.join(\"\");\n i3 = this.#e.boxed ? d(e2, r2.toHere(this.offset)) : e2;\n break;\n }\n case f.TAG:\n i3 = this.children.decode(this.#e);\n break;\n default:\n throw new TypeError(`Invalid mt on convert: ${this.mt}`);\n }\n return this.#e.saveOriginal && i3 && typeof i3 == \"object\" && u(i3, r2.toHere(this.offset)), i3;\n }\n #r() {\n const r2 = this.children, i3 = r2.length;\n if (i3 % 2)\n throw new Error(\"Missing map value\");\n const e2 = new Array(i3 / 2);\n if (this.#t)\n for (let t3 = 0; t3 < i3; t3 += 2)\n e2[t3 >> 1] = [r2[t3], r2[t3 + 1], this.#t[t3]];\n else\n for (let t3 = 0; t3 < i3; t3 += 2)\n e2[t3 >> 1] = [r2[t3], r2[t3 + 1], A2];\n return e2;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/diagnostic.js\n function a2(m2, l6, n2, p4) {\n let t3 = \"\";\n if (l6 === o.INDEFINITE)\n t3 += \"_\";\n else {\n if (p4.diagnosticSizes === o3.NEVER)\n return \"\";\n {\n let r2 = p4.diagnosticSizes === o3.ALWAYS;\n if (!r2) {\n let e2 = o.ZERO;\n if (Object.is(n2, -0))\n e2 = o.TWO;\n else if (m2 === f.POS_INT || m2 === f.NEG_INT) {\n const T4 = n2 < 0, u2 = typeof n2 == \"bigint\" ? 1n : 1, o5 = T4 ? -n2 - u2 : n2;\n o5 <= 23 ? e2 = Number(o5) : o5 <= 255 ? e2 = o.ONE : o5 <= 65535 ? e2 = o.TWO : o5 <= 4294967295 ? e2 = o.FOUR : e2 = o.EIGHT;\n } else\n isFinite(n2) ? Math.fround(n2) === n2 ? s3(n2) == null ? e2 = o.FOUR : e2 = o.TWO : e2 = o.EIGHT : e2 = o.TWO;\n r2 = e2 !== l6;\n }\n r2 && (t3 += \"_\", l6 < o.ONE ? t3 += \"i\" : t3 += String(l6 - 24));\n }\n }\n return t3;\n }\n function M(m2, l6) {\n const n2 = { ...w.defaultDecodeOptions, ...l6, ParentType: g3 }, p4 = new y3(m2, n2);\n let t3, r2, e2 = \"\";\n for (const T4 of p4) {\n const [u2, o5, i3] = T4;\n switch (t3 && (t3.count > 0 && i3 !== N.BREAK && (t3.mt === f.MAP && t3.count % 2 ? e2 += \": \" : (e2 += \",\", n2.pretty || (e2 += \" \"))), n2.pretty && (t3.mt !== f.MAP || t3.count % 2 === 0) && (e2 += `\n${O.repeat(t3.depth + 1)}`)), r2 = w.create(T4, t3, n2, p4), u2) {\n case f.POS_INT:\n case f.NEG_INT:\n e2 += String(i3), e2 += a2(u2, o5, i3, n2);\n break;\n case f.SIMPLE_FLOAT:\n if (i3 !== N.BREAK)\n if (typeof i3 == \"number\") {\n const c4 = Object.is(i3, -0) ? \"-0.0\" : String(i3);\n e2 += c4, isFinite(i3) && !/[.e]/.test(c4) && (e2 += \".0\"), e2 += a2(u2, o5, i3, n2);\n } else\n i3 instanceof t2 ? (e2 += \"simple(\", e2 += String(i3.value), e2 += a2(f.POS_INT, o5, i3.value, n2), e2 += \")\") : e2 += String(i3);\n break;\n case f.BYTE_STRING:\n i3 === 1 / 0 ? (e2 += \"(_ \", r2.close = \")\", r2.quote = \"'\") : (e2 += \"h'\", e2 += A(i3), e2 += \"'\", e2 += a2(f.POS_INT, o5, i3.length, n2));\n break;\n case f.UTF8_STRING:\n i3 === 1 / 0 ? (e2 += \"(_ \", r2.close = \")\") : (e2 += JSON.stringify(i3), e2 += a2(f.POS_INT, o5, y4.encode(i3).length, n2));\n break;\n case f.ARRAY: {\n e2 += \"[\";\n const c4 = a2(f.POS_INT, o5, i3, n2);\n e2 += c4, c4 && (e2 += \" \"), n2.pretty && i3 ? r2.close = `\n${O.repeat(r2.depth)}]` : r2.close = \"]\";\n break;\n }\n case f.MAP: {\n e2 += \"{\";\n const c4 = a2(f.POS_INT, o5, i3, n2);\n e2 += c4, c4 && (e2 += \" \"), n2.pretty && i3 ? r2.close = `\n${O.repeat(r2.depth)}}` : r2.close = \"}\";\n break;\n }\n case f.TAG:\n e2 += String(i3), e2 += a2(f.POS_INT, o5, i3, n2), e2 += \"(\", r2.close = \")\";\n break;\n }\n if (r2 === N.BREAK)\n if (t3?.isStreaming)\n t3.left = 0;\n else\n throw new Error(\"Unexpected BREAK\");\n else\n t3 && (t3.count++, t3.left--);\n for (r2 instanceof g3 && (t3 = r2); t3?.done; ) {\n if (t3.isEmptyStream)\n e2 = e2.slice(0, -3), e2 += `${t3.quote}${t3.quote}_`;\n else {\n if (t3.mt === f.MAP && t3.count % 2 !== 0)\n throw new Error(`Odd streaming map size: ${t3.count}`);\n e2 += t3.close;\n }\n t3 = t3.parent;\n }\n }\n return e2;\n }\n var O, y4, g3;\n var init_diagnostic = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/diagnostic.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_options();\n init_constants();\n init_container();\n init_decodeStream2();\n init_simple();\n init_float();\n init_utils();\n O = \" \";\n y4 = new TextEncoder();\n g3 = class extends w {\n close = \"\";\n quote = '\"';\n get isEmptyStream() {\n return (this.mt === f.UTF8_STRING || this.mt === f.BYTE_STRING) && this.count === 0;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/comment.js\n function k3(t3) {\n return t3 instanceof A3;\n }\n function O2(t3, a3) {\n return t3 === 1 / 0 ? \"Indefinite\" : a3 ? `${t3} ${a3}${t3 !== 1 && t3 !== 1n ? \"s\" : \"\"}` : String(t3);\n }\n function y5(t3) {\n return \"\".padStart(t3, \" \");\n }\n function x2(t3, a3, f7) {\n let e2 = \"\";\n e2 += y5(t3.depth * 2);\n const n2 = f2(t3);\n e2 += A(n2.subarray(0, 1));\n const r2 = t3.numBytes();\n r2 && (e2 += \" \", e2 += A(n2.subarray(1, r2 + 1))), e2 = e2.padEnd(a3.minCol + 1, \" \"), e2 += \"-- \", f7 !== void 0 && (e2 += y5(t3.depth * 2), f7 !== \"\" && (e2 += `[${f7}] `));\n let p4 = false;\n const [s4] = t3.children;\n switch (t3.mt) {\n case f.POS_INT:\n e2 += `Unsigned: ${s4}`, typeof s4 == \"bigint\" && (e2 += \"n\");\n break;\n case f.NEG_INT:\n e2 += `Negative: ${s4}`, typeof s4 == \"bigint\" && (e2 += \"n\");\n break;\n case f.BYTE_STRING:\n e2 += `Bytes (Length: ${O2(t3.length)})`;\n break;\n case f.UTF8_STRING:\n e2 += `UTF8 (Length: ${O2(t3.length)})`, t3.length !== 1 / 0 && (e2 += `: ${JSON.stringify(s4)}`);\n break;\n case f.ARRAY:\n e2 += `Array (Length: ${O2(t3.value, \"item\")})`;\n break;\n case f.MAP:\n e2 += `Map (Length: ${O2(t3.value, \"pair\")})`;\n break;\n case f.TAG: {\n e2 += `Tag #${t3.value}`;\n const o5 = t3.children, [m2] = o5.contents.children, i3 = new i(o5.tag, m2);\n u(i3, n2);\n const l6 = i3.comment(a3, t3.depth);\n l6 && (e2 += \": \", e2 += l6), p4 ||= i3.noChildren;\n break;\n }\n case f.SIMPLE_FLOAT:\n s4 === N.BREAK ? e2 += \"BREAK\" : t3.ai > o.ONE ? Object.is(s4, -0) ? e2 += \"Float: -0\" : e2 += `Float: ${s4}` : (e2 += \"Simple: \", s4 instanceof t2 ? e2 += s4.value : e2 += s4);\n break;\n }\n if (!p4)\n if (t3.leaf) {\n if (e2 += `\n`, n2.length > r2 + 1) {\n const o5 = y5((t3.depth + 1) * 2), m2 = f3(n2);\n if (m2?.length) {\n m2.sort((l6, c4) => {\n const g4 = l6[0] - c4[0];\n return g4 || c4[1] - l6[1];\n });\n let i3 = 0;\n for (const [l6, c4, g4] of m2)\n if (!(l6 < i3)) {\n if (i3 = l6 + c4, g4 === \"<<\") {\n e2 += y5(a3.minCol + 1), e2 += \"--\", e2 += o5, e2 += \"<< \";\n const d5 = R(n2, l6, l6 + c4), h4 = f3(d5);\n if (h4) {\n const $3 = h4.findIndex(([w3, D2, v2]) => w3 === 0 && D2 === c4 && v2 === \"<<\");\n $3 >= 0 && h4.splice($3, 1);\n }\n e2 += M(d5), e2 += ` >>\n`, e2 += L(d5, { initialDepth: t3.depth + 1, minCol: a3.minCol, noPrefixHex: true });\n continue;\n } else\n g4 === \"'\" && (e2 += y5(a3.minCol + 1), e2 += \"--\", e2 += o5, e2 += \"'\", e2 += H2.decode(n2.subarray(l6, l6 + c4)), e2 += `'\n`);\n if (l6 > r2)\n for (let d5 = l6; d5 < l6 + c4; d5 += 8) {\n const h4 = Math.min(d5 + 8, l6 + c4);\n e2 += o5, e2 += A(n2.subarray(d5, h4)), e2 += `\n`;\n }\n }\n } else\n for (let i3 = r2 + 1; i3 < n2.length; i3 += 8)\n e2 += o5, e2 += A(n2.subarray(i3, i3 + 8)), e2 += `\n`;\n }\n } else {\n e2 += `\n`;\n let o5 = 0;\n for (const m2 of t3.children) {\n if (k3(m2)) {\n let i3 = String(o5);\n t3.mt === f.MAP ? i3 = o5 % 2 ? `val ${(o5 - 1) / 2}` : `key ${o5 / 2}` : t3.mt === f.TAG && (i3 = \"\"), e2 += x2(m2, a3, i3);\n }\n o5++;\n }\n }\n return e2;\n }\n function L(t3, a3) {\n const f7 = { ...q2, ...a3, ParentType: A3, saveOriginal: true }, e2 = new y3(t3, f7);\n let n2, r2;\n for (const s4 of e2) {\n if (r2 = w.create(s4, n2, f7, e2), s4[2] === N.BREAK)\n if (n2?.isStreaming)\n n2.left = 1;\n else\n throw new Error(\"Unexpected BREAK\");\n if (!k3(r2)) {\n const i3 = new A3(s4, 0, n2, f7);\n i3.leaf = true, i3.children.push(r2), u(i3, e2.toHere(s4[3])), r2 = i3;\n }\n let o5 = (r2.depth + 1) * 2;\n const m2 = r2.numBytes();\n for (m2 && (o5 += 1, o5 += m2 * 2), f7.minCol = Math.max(f7.minCol, o5), n2 && n2.push(r2, e2, s4[3]), n2 = r2; n2?.done; )\n r2 = n2, r2.leaf || u(r2, e2.toHere(r2.offset)), { parent: n2 } = n2;\n }\n a3 && (a3.minCol = f7.minCol);\n let p4 = f7.noPrefixHex ? \"\" : `0x${A(e2.toHere(0))}\n`;\n return p4 += x2(r2, f7), p4;\n }\n var H2, A3, q2;\n var init_comment = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/comment.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_box();\n init_utils();\n init_container();\n init_decodeStream2();\n init_simple();\n init_tag();\n init_diagnostic();\n H2 = new TextDecoder();\n A3 = class extends w {\n depth = 0;\n leaf = false;\n value;\n length;\n [N.ENCODED];\n constructor(a3, f7, e2, n2) {\n super(a3, f7, e2, n2), this.parent ? this.depth = this.parent.depth + 1 : this.depth = n2.initialDepth, [, , this.value, , this.length] = a3;\n }\n numBytes() {\n switch (this.ai) {\n case o.ONE:\n return 1;\n case o.TWO:\n return 2;\n case o.FOUR:\n return 4;\n case o.EIGHT:\n return 8;\n }\n return 0;\n }\n };\n q2 = { ...w.defaultDecodeOptions, initialDepth: 0, noPrefixHex: false, minCol: 0 };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/types.js\n function O3(e2) {\n if (typeof e2 == \"object\" && e2) {\n if (e2.constructor !== Number)\n throw new Error(`Expected number: ${e2}`);\n } else if (typeof e2 != \"number\")\n throw new Error(`Expected number: ${e2}`);\n }\n function E(e2) {\n if (typeof e2 == \"object\" && e2) {\n if (e2.constructor !== String)\n throw new Error(`Expected string: ${e2}`);\n } else if (typeof e2 != \"string\")\n throw new Error(`Expected string: ${e2}`);\n }\n function f5(e2) {\n if (!(e2 instanceof Uint8Array))\n throw new Error(`Expected Uint8Array: ${e2}`);\n }\n function U3(e2) {\n if (!Array.isArray(e2))\n throw new Error(`Expected Array: ${e2}`);\n }\n function h3(e2) {\n return E(e2.contents), new Date(e2.contents);\n }\n function N3(e2) {\n return O3(e2.contents), new Date(e2.contents * 1e3);\n }\n function T3(e2, r2, n2) {\n if (f5(r2.contents), n2.rejectBigInts)\n throw new Error(`Decoding unwanted big integer: ${r2}(h'${A(r2.contents)}')`);\n if (n2.requirePreferred && r2.contents[0] === 0)\n throw new Error(`Decoding overly-large bigint: ${r2.tag}(h'${A(r2.contents)})`);\n let t3 = r2.contents.reduce((o5, d5) => o5 << 8n | BigInt(d5), 0n);\n if (e2 && (t3 = -1n - t3), n2.requirePreferred && t3 >= Number.MIN_SAFE_INTEGER && t3 <= Number.MAX_SAFE_INTEGER)\n throw new Error(`Decoding bigint that could have been int: ${t3}n`);\n return n2.boxed ? d(t3, r2.contents) : t3;\n }\n function D(e2, r2) {\n return f5(e2.contents), e2;\n }\n function c2(e2, r2, n2) {\n f5(e2.contents);\n let t3 = e2.contents.length;\n if (t3 % r2.BYTES_PER_ELEMENT !== 0)\n throw new Error(`Number of bytes must be divisible by ${r2.BYTES_PER_ELEMENT}, got: ${t3}`);\n t3 /= r2.BYTES_PER_ELEMENT;\n const o5 = new r2(t3), d5 = new DataView(e2.contents.buffer, e2.contents.byteOffset, e2.contents.byteLength), u2 = d5[`get${r2.name.replace(/Array/, \"\")}`].bind(d5);\n for (let y6 = 0; y6 < t3; y6++)\n o5[y6] = u2(y6 * r2.BYTES_PER_ELEMENT, n2);\n return o5;\n }\n function l4(e2, r2, n2, t3, o5) {\n const d5 = o5.forceEndian ?? S2;\n if (p2(d5 ? r2 : n2, e2, o5), a(t3.byteLength, e2, f.BYTE_STRING), S2 === d5)\n e2.write(new Uint8Array(t3.buffer, t3.byteOffset, t3.byteLength));\n else {\n const y6 = `write${t3.constructor.name.replace(/Array/, \"\")}`, g4 = e2[y6].bind(e2);\n for (const p4 of t3)\n g4(p4, d5);\n }\n }\n function x3(e2) {\n return f5(e2.contents), new Wtf8Decoder().decode(e2.contents);\n }\n function w2(e2) {\n throw new Error(`Encoding ${e2.constructor.name} intentionally unimplmented. It is not concrete enough to interoperate. Convert to Uint8Array first.`);\n }\n function m(e2) {\n return [NaN, e2.valueOf()];\n }\n var S2, _, $2;\n var init_types = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/types.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_constants();\n init_box();\n init_utils();\n init_encoder();\n init_container();\n init_tag();\n init_lib();\n init_comment();\n S2 = !h();\n ce(Map, (e2, r2, n2) => {\n const t3 = [...e2.entries()].map((o5) => [o5[0], o5[1], Q(o5[0], n2)]);\n if (n2.rejectDuplicateKeys) {\n const o5 = /* @__PURE__ */ new Set();\n for (const [d5, u2, y6] of t3) {\n const g4 = A(y6);\n if (o5.has(g4))\n throw new Error(`Duplicate map key: 0x${g4}`);\n o5.add(g4);\n }\n }\n n2.sortKeys && t3.sort(n2.sortKeys), R2(e2, e2.size, f.MAP, r2, n2);\n for (const [o5, d5, u2] of t3)\n r2.write(u2), g2(d5, r2, n2);\n });\n h3.comment = (e2) => (E(e2.contents), `(String Date) ${new Date(e2.contents).toISOString()}`), i.registerDecoder(I.DATE_STRING, h3);\n N3.comment = (e2) => (O3(e2.contents), `(Epoch Date) ${new Date(e2.contents * 1e3).toISOString()}`), i.registerDecoder(I.DATE_EPOCH, N3), ce(Date, (e2) => [I.DATE_EPOCH, e2.valueOf() / 1e3]);\n _ = T3.bind(null, false);\n $2 = T3.bind(null, true);\n _.comment = (e2, r2) => `(Positive BigInt) ${T3(false, e2, r2)}n`, $2.comment = (e2, r2) => `(Negative BigInt) ${T3(true, e2, r2)}n`, i.registerDecoder(I.POS_BIGINT, _), i.registerDecoder(I.NEG_BIGINT, $2);\n D.comment = (e2, r2, n2) => {\n f5(e2.contents);\n const t3 = { ...r2, initialDepth: n2 + 2, noPrefixHex: true }, o5 = f2(e2);\n let u2 = 2 ** ((o5[0] & 31) - 24) + 1;\n const y6 = o5[u2] & 31;\n let g4 = A(o5.subarray(u2, ++u2));\n y6 >= 24 && (g4 += \" \", g4 += A(o5.subarray(u2, u2 + 2 ** (y6 - 24)))), t3.minCol = Math.max(t3.minCol, (n2 + 1) * 2 + g4.length);\n const p4 = L(e2.contents, t3);\n let I2 = `Embedded CBOR\n`;\n return I2 += `${\"\".padStart((n2 + 1) * 2, \" \")}${g4}`.padEnd(t3.minCol + 1, \" \"), I2 += `-- Bytes (Length: ${e2.contents.length})\n`, I2 += p4, I2;\n }, D.noChildren = true, i.registerDecoder(I.CBOR, D), i.registerDecoder(I.URI, (e2) => (E(e2.contents), new URL(e2.contents)), \"URI\"), ce(URL, (e2) => [I.URI, e2.toString()]), i.registerDecoder(I.BASE64URL, (e2) => (E(e2.contents), x(e2.contents)), \"Base64url-encoded\"), i.registerDecoder(I.BASE64, (e2) => (E(e2.contents), y(e2.contents)), \"Base64-encoded\"), i.registerDecoder(35, (e2) => (E(e2.contents), new RegExp(e2.contents)), \"RegExp\"), i.registerDecoder(21065, (e2) => {\n E(e2.contents);\n const r2 = `^(?:${e2.contents})$`;\n return new RegExp(r2, \"u\");\n }, \"I-RegExp\"), i.registerDecoder(I.REGEXP, (e2) => {\n if (U3(e2.contents), e2.contents.length < 1 || e2.contents.length > 2)\n throw new Error(`Invalid RegExp Array: ${e2.contents}`);\n return new RegExp(e2.contents[0], e2.contents[1]);\n }, \"RegExp\"), ce(RegExp, (e2) => [I.REGEXP, [e2.source, e2.flags]]), i.registerDecoder(64, (e2) => (f5(e2.contents), e2.contents), \"uint8 Typed Array\");\n i.registerDecoder(65, (e2) => c2(e2, Uint16Array, false), \"uint16, big endian, Typed Array\"), i.registerDecoder(66, (e2) => c2(e2, Uint32Array, false), \"uint32, big endian, Typed Array\"), i.registerDecoder(67, (e2) => c2(e2, BigUint64Array, false), \"uint64, big endian, Typed Array\"), i.registerDecoder(68, (e2) => (f5(e2.contents), new Uint8ClampedArray(e2.contents)), \"uint8 Typed Array, clamped arithmetic\"), ce(Uint8ClampedArray, (e2) => [68, new Uint8Array(e2.buffer, e2.byteOffset, e2.byteLength)]), i.registerDecoder(69, (e2) => c2(e2, Uint16Array, true), \"uint16, little endian, Typed Array\"), ce(Uint16Array, (e2, r2, n2) => l4(r2, 69, 65, e2, n2)), i.registerDecoder(70, (e2) => c2(e2, Uint32Array, true), \"uint32, little endian, Typed Array\"), ce(Uint32Array, (e2, r2, n2) => l4(r2, 70, 66, e2, n2)), i.registerDecoder(71, (e2) => c2(e2, BigUint64Array, true), \"uint64, little endian, Typed Array\"), ce(BigUint64Array, (e2, r2, n2) => l4(r2, 71, 67, e2, n2)), i.registerDecoder(72, (e2) => (f5(e2.contents), new Int8Array(e2.contents)), \"sint8 Typed Array\"), ce(Int8Array, (e2) => [72, new Uint8Array(e2.buffer, e2.byteOffset, e2.byteLength)]), i.registerDecoder(73, (e2) => c2(e2, Int16Array, false), \"sint16, big endian, Typed Array\"), i.registerDecoder(74, (e2) => c2(e2, Int32Array, false), \"sint32, big endian, Typed Array\"), i.registerDecoder(75, (e2) => c2(e2, BigInt64Array, false), \"sint64, big endian, Typed Array\"), i.registerDecoder(77, (e2) => c2(e2, Int16Array, true), \"sint16, little endian, Typed Array\"), ce(Int16Array, (e2, r2, n2) => l4(r2, 77, 73, e2, n2)), i.registerDecoder(78, (e2) => c2(e2, Int32Array, true), \"sint32, little endian, Typed Array\"), ce(Int32Array, (e2, r2, n2) => l4(r2, 78, 74, e2, n2)), i.registerDecoder(79, (e2) => c2(e2, BigInt64Array, true), \"sint64, little endian, Typed Array\"), ce(BigInt64Array, (e2, r2, n2) => l4(r2, 79, 75, e2, n2)), i.registerDecoder(81, (e2) => c2(e2, Float32Array, false), \"IEEE 754 binary32, big endian, Typed Array\"), i.registerDecoder(82, (e2) => c2(e2, Float64Array, false), \"IEEE 754 binary64, big endian, Typed Array\"), i.registerDecoder(85, (e2) => c2(e2, Float32Array, true), \"IEEE 754 binary32, little endian, Typed Array\"), ce(Float32Array, (e2, r2, n2) => l4(r2, 85, 81, e2, n2)), i.registerDecoder(86, (e2) => c2(e2, Float64Array, true), \"IEEE 754 binary64, big endian, Typed Array\"), ce(Float64Array, (e2, r2, n2) => l4(r2, 86, 82, e2, n2)), i.registerDecoder(I.SET, (e2, r2) => {\n if (U3(e2.contents), r2.sortKeys) {\n const n2 = w.decodeToEncodeOpts(r2);\n let t3 = null;\n for (const o5 of e2.contents) {\n const d5 = [o5, void 0, Q(o5, n2)];\n if (t3 && r2.sortKeys(t3, d5) >= 0)\n throw new Error(`Set items out of order in tag #${I.SET}`);\n t3 = d5;\n }\n }\n return new Set(e2.contents);\n }, \"Set\"), ce(Set, (e2, r2, n2) => {\n let t3 = [...e2];\n if (n2.sortKeys) {\n const o5 = t3.map((d5) => [d5, void 0, Q(d5, n2)]);\n o5.sort(n2.sortKeys), t3 = o5.map(([d5]) => d5);\n }\n return [I.SET, t3];\n }), i.registerDecoder(I.JSON, (e2) => (E(e2.contents), JSON.parse(e2.contents)), \"JSON-encoded\");\n x3.comment = (e2) => {\n f5(e2.contents);\n const r2 = new Wtf8Decoder();\n return `(WTF8 string): ${JSON.stringify(r2.decode(e2.contents))}`;\n }, i.registerDecoder(I.WTF8, x3), i.registerDecoder(I.SELF_DESCRIBED, (e2) => e2.contents, \"Self-Described\"), i.registerDecoder(I.INVALID_16, () => {\n throw new Error(`Tag always invalid: ${I.INVALID_16}`);\n }, \"Invalid\"), i.registerDecoder(I.INVALID_32, () => {\n throw new Error(`Tag always invalid: ${I.INVALID_32}`);\n }, \"Invalid\"), i.registerDecoder(I.INVALID_64, () => {\n throw new Error(`Tag always invalid: ${I.INVALID_64}`);\n }, \"Invalid\");\n ce(ArrayBuffer, w2), ce(DataView, w2), typeof SharedArrayBuffer < \"u\" && ce(SharedArrayBuffer, w2);\n ce(Boolean, m), ce(Number, m), ce(String, m), ce(BigInt, m);\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/version.js\n var o4;\n var init_version = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n o4 = \"2.0.1\";\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/decoder.js\n function c3(i3) {\n const e2 = { ...w.defaultDecodeOptions };\n if (i3.dcbor ? Object.assign(e2, w.dcborDecodeOptions) : i3.cde && Object.assign(e2, w.cdeDecodeOptions), Object.assign(e2, i3), Object.hasOwn(e2, \"rejectLongNumbers\"))\n throw new TypeError(\"rejectLongNumbers has changed to requirePreferred\");\n return e2.boxed && (e2.saveOriginal = true), e2;\n }\n function l5(i3, e2 = {}) {\n const n2 = c3(e2), t3 = new y3(i3, n2), r2 = new d3();\n for (const o5 of t3)\n r2.step(o5, n2, t3);\n return r2.ret;\n }\n function* b3(i3, e2 = {}) {\n const n2 = c3(e2), t3 = new y3(i3, n2), r2 = new d3();\n for (const o5 of t3.seq())\n r2.step(o5, n2, t3), r2.parent || (yield r2.ret);\n }\n var d3, O4;\n var init_decoder = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/decoder.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_decodeStream2();\n init_container();\n init_constants();\n d3 = class {\n parent = void 0;\n ret = void 0;\n step(e2, n2, t3) {\n if (this.ret = w.create(e2, this.parent, n2, t3), e2[2] === N.BREAK)\n if (this.parent?.isStreaming)\n this.parent.left = 0;\n else\n throw new Error(\"Unexpected BREAK\");\n else\n this.parent && this.parent.push(this.ret, t3, e2[3]);\n for (this.ret instanceof w && (this.parent = this.ret); this.parent?.done; ) {\n this.ret = this.parent.convert(t3);\n const r2 = this.parent.parent;\n r2?.replaceLast(this.ret, this.parent, t3), this.parent = r2;\n }\n }\n };\n O4 = class {\n #t;\n #e;\n constructor(e2, n2 = {}) {\n const t3 = new y3(e2, c3(n2));\n this.#t = t3.seq();\n }\n peek() {\n return this.#e || (this.#e = this.#n()), this.#e;\n }\n read() {\n const e2 = this.#e ?? this.#n();\n return this.#e = void 0, e2;\n }\n *[Symbol.iterator]() {\n for (; ; ) {\n const e2 = this.read();\n if (!e2)\n return;\n yield e2;\n }\n }\n #n() {\n const { value: e2, done: n2 } = this.#t.next();\n if (!n2)\n return e2;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/index.js\n var lib_exports = {};\n __export(lib_exports, {\n DiagnosticSizes: () => o3,\n SequenceEvents: () => O4,\n Simple: () => t2,\n Tag: () => i,\n TypeEncoderMap: () => s2,\n Writer: () => e,\n cdeDecodeOptions: () => r,\n cdeEncodeOptions: () => F,\n comment: () => L,\n dcborDecodeOptions: () => n,\n dcborEncodeOptions: () => H,\n decode: () => l5,\n decodeSequence: () => b3,\n defaultDecodeOptions: () => d4,\n defaultEncodeOptions: () => k,\n diagnose: () => M,\n encode: () => Q,\n encodedNumber: () => de,\n getEncoded: () => f2,\n saveEncoded: () => u,\n saveEncodedLength: () => l,\n unbox: () => t,\n version: () => o4\n });\n var r, n, d4;\n var init_lib2 = __esm({\n \"../../../node_modules/.pnpm/cbor2@2.0.1/node_modules/cbor2/lib/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_types();\n init_version();\n init_container();\n init_options();\n init_decoder();\n init_diagnostic();\n init_comment();\n init_encoder();\n init_simple();\n init_tag();\n init_writer();\n init_box();\n init_typeEncoderMap();\n ({ cdeDecodeOptions: r, dcborDecodeOptions: n, defaultDecodeOptions: d4 } = w);\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/utils/policyParams.js\n var require_policyParams = __commonJS({\n \"../../libs/contracts-sdk/dist/src/utils/policyParams.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encodePermissionDataForChain = encodePermissionDataForChain;\n exports3.decodePolicyParametersFromChain = decodePolicyParametersFromChain;\n exports3.decodePermissionDataFromChain = decodePermissionDataFromChain;\n exports3.decodePolicyParametersForOneAbility = decodePolicyParametersForOneAbility;\n var cbor2_1 = (init_lib2(), __toCommonJS(lib_exports));\n var utils_1 = require_utils6();\n function encodePermissionDataForChain(permissionData, deletePermissionData) {\n const abilityIpfsCids = [];\n const policyIpfsCids = [];\n const policyParameterValues = [];\n const safePermissionData = permissionData ?? {};\n if (deletePermissionData) {\n for (const abilityIpfsCid of Object.keys(deletePermissionData)) {\n if (safePermissionData[abilityIpfsCid]) {\n throw new Error(`deletePermissionData contains ability ${abilityIpfsCid} which also exists in permissionData. Please separate updates and deletes by ability.`);\n }\n }\n }\n const abilityKeys = [\n ...Object.keys(safePermissionData),\n ...deletePermissionData ? Object.keys(deletePermissionData) : []\n ];\n abilityKeys.forEach((abilityIpfsCid) => {\n abilityIpfsCids.push(abilityIpfsCid);\n const abilityPolicies = safePermissionData[abilityIpfsCid];\n const policiesToDelete = deletePermissionData?.[abilityIpfsCid];\n const abilityPolicyIpfsCids = [];\n const abilityPolicyParameterValues = [];\n if (abilityPolicies) {\n Object.keys(abilityPolicies).forEach((policyIpfsCid) => {\n abilityPolicyIpfsCids.push(policyIpfsCid);\n const policyParams = abilityPolicies[policyIpfsCid];\n const encodedParams = (0, cbor2_1.encode)(policyParams, { collapseBigInts: false });\n abilityPolicyParameterValues.push((0, utils_1.hexlify)(encodedParams));\n });\n } else if (policiesToDelete && policiesToDelete.length > 0) {\n for (const policyIpfsCid of policiesToDelete) {\n abilityPolicyIpfsCids.push(policyIpfsCid);\n abilityPolicyParameterValues.push(\"0x\");\n }\n }\n policyIpfsCids.push(abilityPolicyIpfsCids);\n policyParameterValues.push(abilityPolicyParameterValues);\n });\n return {\n abilityIpfsCids,\n policyIpfsCids,\n policyParameterValues\n };\n }\n function decodePolicyParametersFromChain(policy) {\n const encodedParams = policy.policyParameterValues;\n try {\n const byteArray = (0, utils_1.arrayify)(encodedParams);\n return (0, cbor2_1.decode)(byteArray);\n } catch (error) {\n console.error(\"Error decoding policy parameters:\", error);\n throw error;\n }\n }\n function decodePermissionDataFromChain(abilitiesWithPolicies) {\n const permissionData = {};\n for (const ability of abilitiesWithPolicies) {\n const { abilityIpfsCid, policies } = ability;\n permissionData[abilityIpfsCid] = decodePolicyParametersForOneAbility({ policies });\n }\n return permissionData;\n }\n function decodePolicyParametersForOneAbility({ policies }) {\n const policyParamsDict = {};\n for (const policy of policies) {\n const { policyIpfsCid, policyParameterValues } = policy;\n if (!policyParameterValues || policyParameterValues === \"0x\") {\n continue;\n }\n policyParamsDict[policyIpfsCid] = decodePolicyParametersFromChain(policy);\n }\n return policyParamsDict;\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/internal/user/User.js\n var require_User = __commonJS({\n \"../../libs/contracts-sdk/dist/src/internal/user/User.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.permitApp = permitApp;\n exports3.unPermitApp = unPermitApp;\n exports3.rePermitApp = rePermitApp;\n exports3.setAbilityPolicyParameters = setAbilityPolicyParameters;\n var utils_1 = require_utils7();\n var pkpInfo_1 = require_pkpInfo();\n var policyParams_1 = require_policyParams();\n async function permitApp(params) {\n const { contract, args: { pkpEthAddress, appId, appVersion, permissionData }, overrides } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const flattenedParams = (0, policyParams_1.encodePermissionDataForChain)(permissionData);\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"permitAppVersion\", [\n pkpTokenId,\n appId,\n appVersion,\n flattenedParams.abilityIpfsCids,\n flattenedParams.policyIpfsCids,\n flattenedParams.policyParameterValues\n ], overrides);\n const tx = await contract.permitAppVersion(pkpTokenId, appId, appVersion, flattenedParams.abilityIpfsCids, flattenedParams.policyIpfsCids, flattenedParams.policyParameterValues, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Permit App: ${decodedError}`);\n }\n }\n async function unPermitApp({ contract, args: { pkpEthAddress, appId, appVersion }, overrides }) {\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"unPermitAppVersion\", [pkpTokenId, appId, appVersion], overrides);\n const tx = await contract.unPermitAppVersion(pkpTokenId, appId, appVersion, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to UnPermit App: ${decodedError}`);\n }\n }\n async function rePermitApp(params) {\n const { contract, args: { pkpEthAddress, appId }, overrides } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"rePermitApp\", [pkpTokenId, appId], overrides);\n const tx = await contract.rePermitApp(pkpTokenId, appId, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Re-Permit App: ${decodedError}`);\n }\n }\n async function setAbilityPolicyParameters(params) {\n const { contract, args: { appId, appVersion, pkpEthAddress, policyParams, deletePermissionData }, overrides } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const flattenedParams = (0, policyParams_1.encodePermissionDataForChain)(policyParams, deletePermissionData);\n const adjustedOverrides = await (0, utils_1.gasAdjustedOverrides)(contract, \"setAbilityPolicyParameters\", [\n pkpTokenId,\n appId,\n appVersion,\n flattenedParams.abilityIpfsCids,\n flattenedParams.policyIpfsCids,\n flattenedParams.policyParameterValues\n ], overrides);\n const tx = await contract.setAbilityPolicyParameters(pkpTokenId, appId, appVersion, flattenedParams.abilityIpfsCids, flattenedParams.policyIpfsCids, flattenedParams.policyParameterValues, {\n ...adjustedOverrides\n });\n await tx.wait();\n return {\n txHash: tx.hash\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Set Ability Policy Parameters: ${decodedError}`);\n }\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/internal/user/UserView.js\n var require_UserView = __commonJS({\n \"../../libs/contracts-sdk/dist/src/internal/user/UserView.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getAllRegisteredAgentPkpEthAddresses = getAllRegisteredAgentPkpEthAddresses;\n exports3.getPermittedAppVersionForPkp = getPermittedAppVersionForPkp;\n exports3.getAllPermittedAppIdsForPkp = getAllPermittedAppIdsForPkp;\n exports3.getPermittedAppsForPkps = getPermittedAppsForPkps;\n exports3.getAllAbilitiesAndPoliciesForApp = getAllAbilitiesAndPoliciesForApp;\n exports3.validateAbilityExecutionAndGetPolicies = validateAbilityExecutionAndGetPolicies;\n exports3.getLastPermittedAppVersionForPkp = getLastPermittedAppVersionForPkp;\n exports3.getUnpermittedAppsForPkps = getUnpermittedAppsForPkps;\n exports3.isDelegateePermitted = isDelegateePermitted;\n var constants_1 = require_constants3();\n var utils_1 = require_utils7();\n var pkpInfo_1 = require_pkpInfo();\n var policyParams_1 = require_policyParams();\n async function getAllRegisteredAgentPkpEthAddresses(params) {\n const { contract, args: { userPkpAddress, offset } } = params;\n try {\n const pkpTokenIds = await contract.getAllRegisteredAgentPkps(userPkpAddress, offset);\n const pkpEthAdddresses = [];\n for (const tokenId of pkpTokenIds) {\n const pkpEthAddress = await (0, pkpInfo_1.getPkpEthAddress)({ signer: contract.signer, tokenId });\n pkpEthAdddresses.push(pkpEthAddress);\n }\n return pkpEthAdddresses;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n if (decodedError.includes(\"NoRegisteredPkpsFound\")) {\n return [];\n }\n throw new Error(`Failed to Get All Registered Agent PKPs: ${decodedError}`);\n }\n }\n async function getPermittedAppVersionForPkp(params) {\n const { contract, args: { pkpEthAddress, appId } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const appVersion = await contract.getPermittedAppVersionForPkp(pkpTokenId, appId);\n if (!appVersion)\n return null;\n return appVersion;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Permitted App Version For PKP: ${decodedError}`);\n }\n }\n async function getAllPermittedAppIdsForPkp(params) {\n const { contract, args: { pkpEthAddress, offset } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const appIds = await contract.getAllPermittedAppIdsForPkp(pkpTokenId, offset);\n return appIds.map((id) => id);\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get All Permitted App IDs For PKP: ${decodedError}`);\n }\n }\n async function getPermittedAppsForPkps(params) {\n const { contract, args: { pkpEthAddresses, offset, pageSize = constants_1.DEFAULT_PAGE_SIZE } } = params;\n try {\n const pkpTokenIds = [];\n for (const pkpEthAddress of pkpEthAddresses) {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n pkpTokenIds.push(pkpTokenId);\n }\n const results = await contract.getPermittedAppsForPkps(pkpTokenIds, offset, pageSize);\n return results.map((result) => ({\n pkpTokenId: result.pkpTokenId.toString(),\n permittedApps: result.permittedApps.map((app) => ({\n appId: app.appId,\n version: app.version,\n versionEnabled: app.versionEnabled,\n isDeleted: app.isDeleted\n }))\n }));\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Permitted Apps For PKPs: ${decodedError}`);\n }\n }\n async function getAllAbilitiesAndPoliciesForApp(params) {\n const { contract, args: { pkpEthAddress, appId } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const abilities = await contract.getAllAbilitiesAndPoliciesForApp(pkpTokenId, appId);\n return (0, policyParams_1.decodePermissionDataFromChain)(abilities);\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get All Abilities And Policies For App: ${decodedError}`);\n }\n }\n async function validateAbilityExecutionAndGetPolicies(params) {\n const { contract, args: { delegateeAddress, pkpEthAddress, abilityIpfsCid } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const validationResult = await contract.validateAbilityExecutionAndGetPolicies(delegateeAddress, pkpTokenId, abilityIpfsCid);\n const { policies } = validationResult;\n const decodedPolicies = (0, policyParams_1.decodePolicyParametersForOneAbility)({ policies });\n return {\n ...validationResult,\n appId: validationResult.appId,\n appVersion: validationResult.appVersion,\n decodedPolicies\n };\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Validate Ability Execution And Get Policies: ${decodedError}`);\n }\n }\n async function getLastPermittedAppVersionForPkp(params) {\n const { contract, args: { pkpEthAddress, appId } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const lastPermittedVersion = await contract.getLastPermittedAppVersionForPkp(pkpTokenId, appId);\n if (!lastPermittedVersion)\n return null;\n return lastPermittedVersion;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Last Permitted App Version: ${decodedError}`);\n }\n }\n async function getUnpermittedAppsForPkps(params) {\n const { contract, args: { pkpEthAddresses, offset } } = params;\n try {\n const pkpTokenIds = [];\n for (const pkpEthAddress of pkpEthAddresses) {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n pkpTokenIds.push(pkpTokenId);\n }\n const results = await contract.getUnpermittedAppsForPkps(pkpTokenIds, offset);\n return results.map((result) => ({\n pkpTokenId: result.pkpTokenId.toString(),\n unpermittedApps: result.unpermittedApps.map((app) => ({\n appId: app.appId,\n previousPermittedVersion: app.previousPermittedVersion,\n versionEnabled: app.versionEnabled,\n isDeleted: app.isDeleted\n }))\n }));\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Get Unpermitted Apps For PKPs: ${decodedError}`);\n }\n }\n async function isDelegateePermitted(params) {\n const { contract, args: { delegateeAddress, pkpEthAddress, abilityIpfsCid } } = params;\n try {\n const pkpTokenId = await (0, pkpInfo_1.getPkpTokenId)({ pkpEthAddress, signer: contract.signer });\n const isPermitted = await contract.isDelegateePermitted(delegateeAddress, pkpTokenId, abilityIpfsCid);\n return isPermitted;\n } catch (error) {\n const decodedError = (0, utils_1.decodeContractError)(error, contract);\n throw new Error(`Failed to Check If Delegatee Is Permitted: ${decodedError}`);\n }\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/contractClient.js\n var require_contractClient = __commonJS({\n \"../../libs/contracts-sdk/dist/src/contractClient.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.clientFromContract = clientFromContract;\n exports3.getTestClient = getTestClient;\n exports3.getClient = getClient;\n var constants_1 = require_constants3();\n var App_1 = require_App();\n var AppView_1 = require_AppView();\n var User_1 = require_User();\n var UserView_1 = require_UserView();\n var utils_1 = require_utils7();\n function clientFromContract({ contract }) {\n return {\n // App write methods\n registerApp: (params, overrides) => (0, App_1.registerApp)({ contract, args: params, overrides }),\n registerNextVersion: (params, overrides) => (0, App_1.registerNextVersion)({ contract, args: params, overrides }),\n enableAppVersion: (params, overrides) => (0, App_1.enableAppVersion)({ contract, args: params, overrides }),\n addDelegatee: (params, overrides) => (0, App_1.addDelegatee)({ contract, args: params, overrides }),\n removeDelegatee: (params, overrides) => (0, App_1.removeDelegatee)({ contract, args: params, overrides }),\n setDelegatee: (params, overrides) => (0, App_1.setDelegatee)({ contract, args: params, overrides }),\n deleteApp: (params, overrides) => (0, App_1.deleteApp)({ contract, args: params, overrides }),\n undeleteApp: (params, overrides) => (0, App_1.undeleteApp)({ contract, args: params, overrides }),\n // App view methods\n getAppById: (params) => (0, AppView_1.getAppById)({ contract, args: params }),\n getAppIdByDelegatee: (params) => (0, AppView_1.getAppIdByDelegatee)({ contract, args: params }),\n getAppVersion: (params) => (0, AppView_1.getAppVersion)({ contract, args: params }),\n getAppsByManagerAddress: (params) => (0, AppView_1.getAppsByManagerAddress)({ contract, args: params }),\n getAppByDelegateeAddress: (params) => (0, AppView_1.getAppByDelegateeAddress)({ contract, args: params }),\n getDelegatedPkpEthAddresses: (params) => (0, AppView_1.getDelegatedPkpEthAddresses)({ contract, args: params }),\n // User write methods\n permitApp: (params, overrides) => (0, User_1.permitApp)({ contract, args: params, overrides }),\n unPermitApp: (params, overrides) => (0, User_1.unPermitApp)({ contract, args: params, overrides }),\n rePermitApp: (params, overrides) => (0, User_1.rePermitApp)({ contract, args: params, overrides }),\n setAbilityPolicyParameters: (params, overrides) => (0, User_1.setAbilityPolicyParameters)({ contract, args: params, overrides }),\n // User view methods\n getAllRegisteredAgentPkpEthAddresses: (params) => (0, UserView_1.getAllRegisteredAgentPkpEthAddresses)({ contract, args: params }),\n getPermittedAppVersionForPkp: (params) => (0, UserView_1.getPermittedAppVersionForPkp)({ contract, args: params }),\n getAllPermittedAppIdsForPkp: (params) => (0, UserView_1.getAllPermittedAppIdsForPkp)({ contract, args: params }),\n getPermittedAppsForPkps: (params) => (0, UserView_1.getPermittedAppsForPkps)({ contract, args: params }),\n getAllAbilitiesAndPoliciesForApp: (params) => (0, UserView_1.getAllAbilitiesAndPoliciesForApp)({ contract, args: params }),\n validateAbilityExecutionAndGetPolicies: (params) => (0, UserView_1.validateAbilityExecutionAndGetPolicies)({ contract, args: params }),\n isDelegateePermitted: (params) => (0, UserView_1.isDelegateePermitted)({ contract, args: params }),\n getLastPermittedAppVersionForPkp: (params) => (0, UserView_1.getLastPermittedAppVersionForPkp)({ contract, args: params }),\n getUnpermittedAppsForPkps: (params) => (0, UserView_1.getUnpermittedAppsForPkps)({ contract, args: params })\n };\n }\n function getTestClient({ signer }) {\n const contract = (0, utils_1.createContract)({\n signer,\n contractAddress: constants_1.VINCENT_DIAMOND_CONTRACT_ADDRESS_DEV\n });\n return clientFromContract({ contract });\n }\n function getClient({ signer }) {\n const contract = (0, utils_1.createContract)({\n signer,\n contractAddress: constants_1.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD\n });\n return clientFromContract({ contract });\n }\n }\n });\n\n // ../../../node_modules/.pnpm/tslib@1.14.1/node_modules/tslib/tslib.es6.js\n var tslib_es6_exports2 = {};\n __export(tslib_es6_exports2, {\n __assign: () => __assign2,\n __asyncDelegator: () => __asyncDelegator2,\n __asyncGenerator: () => __asyncGenerator2,\n __asyncValues: () => __asyncValues2,\n __await: () => __await2,\n __awaiter: () => __awaiter2,\n __classPrivateFieldGet: () => __classPrivateFieldGet2,\n __classPrivateFieldSet: () => __classPrivateFieldSet2,\n __createBinding: () => __createBinding2,\n __decorate: () => __decorate2,\n __exportStar: () => __exportStar2,\n __extends: () => __extends2,\n __generator: () => __generator2,\n __importDefault: () => __importDefault2,\n __importStar: () => __importStar2,\n __makeTemplateObject: () => __makeTemplateObject2,\n __metadata: () => __metadata2,\n __param: () => __param2,\n __read: () => __read2,\n __rest: () => __rest2,\n __spread: () => __spread2,\n __spreadArrays: () => __spreadArrays2,\n __values: () => __values2\n });\n function __extends2(d5, b4) {\n extendStatics2(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n }\n function __rest2(s4, e2) {\n var t3 = {};\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4) && e2.indexOf(p4) < 0)\n t3[p4] = s4[p4];\n if (s4 != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i3 = 0, p4 = Object.getOwnPropertySymbols(s4); i3 < p4.length; i3++) {\n if (e2.indexOf(p4[i3]) < 0 && Object.prototype.propertyIsEnumerable.call(s4, p4[i3]))\n t3[p4[i3]] = s4[p4[i3]];\n }\n return t3;\n }\n function __decorate2(decorators, target, key, desc) {\n var c4 = arguments.length, r2 = c4 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d5;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r2 = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i3 = decorators.length - 1; i3 >= 0; i3--)\n if (d5 = decorators[i3])\n r2 = (c4 < 3 ? d5(r2) : c4 > 3 ? d5(target, key, r2) : d5(target, key)) || r2;\n return c4 > 3 && r2 && Object.defineProperty(target, key, r2), r2;\n }\n function __param2(paramIndex, decorator) {\n return function(target, key) {\n decorator(target, key, paramIndex);\n };\n }\n function __metadata2(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\")\n return Reflect.metadata(metadataKey, metadataValue);\n }\n function __awaiter2(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n }\n function __generator2(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n }\n function __createBinding2(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n }\n function __exportStar2(m2, exports3) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !exports3.hasOwnProperty(p4))\n exports3[p4] = m2[p4];\n }\n function __values2(o5) {\n var s4 = typeof Symbol === \"function\" && Symbol.iterator, m2 = s4 && o5[s4], i3 = 0;\n if (m2)\n return m2.call(o5);\n if (o5 && typeof o5.length === \"number\")\n return {\n next: function() {\n if (o5 && i3 >= o5.length)\n o5 = void 0;\n return { value: o5 && o5[i3++], done: !o5 };\n }\n };\n throw new TypeError(s4 ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n }\n function __read2(o5, n2) {\n var m2 = typeof Symbol === \"function\" && o5[Symbol.iterator];\n if (!m2)\n return o5;\n var i3 = m2.call(o5), r2, ar = [], e2;\n try {\n while ((n2 === void 0 || n2-- > 0) && !(r2 = i3.next()).done)\n ar.push(r2.value);\n } catch (error) {\n e2 = { error };\n } finally {\n try {\n if (r2 && !r2.done && (m2 = i3[\"return\"]))\n m2.call(i3);\n } finally {\n if (e2)\n throw e2.error;\n }\n }\n return ar;\n }\n function __spread2() {\n for (var ar = [], i3 = 0; i3 < arguments.length; i3++)\n ar = ar.concat(__read2(arguments[i3]));\n return ar;\n }\n function __spreadArrays2() {\n for (var s4 = 0, i3 = 0, il = arguments.length; i3 < il; i3++)\n s4 += arguments[i3].length;\n for (var r2 = Array(s4), k4 = 0, i3 = 0; i3 < il; i3++)\n for (var a3 = arguments[i3], j2 = 0, jl = a3.length; j2 < jl; j2++, k4++)\n r2[k4] = a3[j2];\n return r2;\n }\n function __await2(v2) {\n return this instanceof __await2 ? (this.v = v2, this) : new __await2(v2);\n }\n function __asyncGenerator2(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g4 = generator.apply(thisArg, _arguments || []), i3, q3 = [];\n return i3 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3;\n function verb(n2) {\n if (g4[n2])\n i3[n2] = function(v2) {\n return new Promise(function(a3, b4) {\n q3.push([n2, v2, a3, b4]) > 1 || resume(n2, v2);\n });\n };\n }\n function resume(n2, v2) {\n try {\n step(g4[n2](v2));\n } catch (e2) {\n settle(q3[0][3], e2);\n }\n }\n function step(r2) {\n r2.value instanceof __await2 ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle(q3[0][2], r2);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f7, v2) {\n if (f7(v2), q3.shift(), q3.length)\n resume(q3[0][0], q3[0][1]);\n }\n }\n function __asyncDelegator2(o5) {\n var i3, p4;\n return i3 = {}, verb(\"next\"), verb(\"throw\", function(e2) {\n throw e2;\n }), verb(\"return\"), i3[Symbol.iterator] = function() {\n return this;\n }, i3;\n function verb(n2, f7) {\n i3[n2] = o5[n2] ? function(v2) {\n return (p4 = !p4) ? { value: __await2(o5[n2](v2)), done: n2 === \"return\" } : f7 ? f7(v2) : v2;\n } : f7;\n }\n }\n function __asyncValues2(o5) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m2 = o5[Symbol.asyncIterator], i3;\n return m2 ? m2.call(o5) : (o5 = typeof __values2 === \"function\" ? __values2(o5) : o5[Symbol.iterator](), i3 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3);\n function verb(n2) {\n i3[n2] = o5[n2] && function(v2) {\n return new Promise(function(resolve, reject) {\n v2 = o5[n2](v2), settle(resolve, reject, v2.done, v2.value);\n });\n };\n }\n function settle(resolve, reject, d5, v2) {\n Promise.resolve(v2).then(function(v6) {\n resolve({ value: v6, done: d5 });\n }, reject);\n }\n }\n function __makeTemplateObject2(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", { value: raw });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n }\n function __importStar2(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (Object.hasOwnProperty.call(mod3, k4))\n result[k4] = mod3[k4];\n }\n result.default = mod3;\n return result;\n }\n function __importDefault2(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { default: mod3 };\n }\n function __classPrivateFieldGet2(receiver, privateMap) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n return privateMap.get(receiver);\n }\n function __classPrivateFieldSet2(receiver, privateMap, value) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n privateMap.set(receiver, value);\n return value;\n }\n var extendStatics2, __assign2;\n var init_tslib_es62 = __esm({\n \"../../../node_modules/.pnpm/tslib@1.14.1/node_modules/tslib/tslib.es6.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n extendStatics2 = function(d5, b4) {\n extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (b5.hasOwnProperty(p4))\n d6[p4] = b5[p4];\n };\n return extendStatics2(d5, b4);\n };\n __assign2 = function() {\n __assign2 = Object.assign || function __assign4(t3) {\n for (var s4, i3 = 1, n2 = arguments.length; i3 < n2; i3++) {\n s4 = arguments[i3];\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4))\n t3[p4] = s4[p4];\n }\n return t3;\n };\n return __assign2.apply(this, arguments);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/version.js\n var require_version27 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"7.3.1\";\n }\n });\n\n // ../../../node_modules/.pnpm/depd@2.0.0/node_modules/depd/lib/browser/index.js\n var require_browser = __commonJS({\n \"../../../node_modules/.pnpm/depd@2.0.0/node_modules/depd/lib/browser/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = depd;\n function depd(namespace) {\n if (!namespace) {\n throw new TypeError(\"argument namespace is required\");\n }\n function deprecate(message2) {\n }\n deprecate._file = void 0;\n deprecate._ignored = true;\n deprecate._namespace = namespace;\n deprecate._traced = false;\n deprecate._warned = /* @__PURE__ */ Object.create(null);\n deprecate.function = wrapfunction;\n deprecate.property = wrapproperty;\n return deprecate;\n }\n function wrapfunction(fn, message2) {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"argument fn must be a function\");\n }\n return fn;\n }\n function wrapproperty(obj, prop, message2) {\n if (!obj || typeof obj !== \"object\" && typeof obj !== \"function\") {\n throw new TypeError(\"argument obj must be object\");\n }\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop);\n if (!descriptor) {\n throw new TypeError(\"must call property on owner object\");\n }\n if (!descriptor.configurable) {\n throw new TypeError(\"property must be configurable\");\n }\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/constants/constants.js\n var require_constants4 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/constants/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LOG_LEVEL = exports3.LitNamespace = exports3.LIT_NAMESPACE = exports3.LitRecapAbility = exports3.LIT_RECAP_ABILITY = exports3.LitAbility = exports3.LIT_ABILITY = exports3.LitResourcePrefix = exports3.LIT_RESOURCE_PREFIX = exports3.RelayAuthStatus = exports3.RELAY_AUTH_STATUS = exports3.StakingStates = exports3.STAKING_STATES = exports3.ProviderType = exports3.PROVIDER_TYPE = exports3.AuthMethodScope = exports3.AUTH_METHOD_SCOPE = exports3.AuthMethodType = exports3.AUTH_METHOD_TYPE = exports3.EITHER_TYPE = exports3.LIT_CURVE = exports3.VMTYPE = exports3.LIT_ACTION_IPFS_HASH = exports3.SIWE_DELEGATION_URI = exports3.PKP_CLIENT_SUPPORTED_CHAINS = exports3.AUTH_METHOD_TYPE_IDS = exports3.LIT_SESSION_KEY_URI = exports3.LIT_NETWORKS = exports3.SYMM_KEY_ALGO_PARAMS = exports3.LOCAL_STORAGE_KEYS = exports3.ALL_LIT_CHAINS = exports3.LIT_COSMOS_CHAINS = exports3.LIT_SVM_CHAINS = exports3.CENTRALISATION_BY_NETWORK = exports3.HTTP_BY_NETWORK = exports3.HTTPS = exports3.HTTP = exports3.METAMASK_CHAIN_INFO_BY_NETWORK = exports3.RELAYER_URL_BY_NETWORK = exports3.RPC_URL_BY_NETWORK = exports3.LitNetwork = exports3.LIT_NETWORK = exports3.LIT_EVM_CHAINS = exports3.LIT_RPC = exports3.metamaskChainInfo = exports3.METAMASK_CHAIN_INFO = exports3.LIT_CHAINS = exports3.AUTH_SIGNATURE_BODY = exports3.LIT_AUTH_SIG_CHAIN_KEYS = exports3.NETWORK_PUB_KEY = void 0;\n exports3.FALLBACK_IPFS_GATEWAYS = exports3.LogLevel = void 0;\n var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));\n var depd_1 = tslib_1.__importDefault(require_browser());\n var deprecated = (0, depd_1.default)(\"lit-js-sdk:constants:constants\");\n exports3.NETWORK_PUB_KEY = \"9971e835a1fe1a4d78e381eebbe0ddc84fde5119169db816900de796d10187f3c53d65c1202ac083d099a517f34a9b62\";\n exports3.LIT_AUTH_SIG_CHAIN_KEYS = [\n \"ethereum\",\n \"solana\",\n \"cosmos\",\n \"kyve\"\n ];\n exports3.AUTH_SIGNATURE_BODY = \"I am creating an account to use Lit Protocol at {{timestamp}}\";\n var yellowstoneChain = {\n contractAddress: null,\n chainId: 175188,\n name: \"Chronicle Yellowstone - Lit Protocol Testnet\",\n symbol: \"tstLPX\",\n decimals: 18,\n rpcUrls: [\"https://yellowstone-rpc.litprotocol.com/\"],\n blockExplorerUrls: [\"https://yellowstone-explorer.litprotocol.com/\"],\n type: null,\n vmType: \"EVM\"\n };\n exports3.LIT_CHAINS = {\n ethereum: {\n contractAddress: \"0xA54F7579fFb3F98bd8649fF02813F575f9b3d353\",\n chainId: 1,\n name: \"Ethereum\",\n symbol: \"ETH\",\n decimals: 18,\n type: \"ERC1155\",\n rpcUrls: [\n \"https://eth-mainnet.alchemyapi.io/v2/EuGnkVlzVoEkzdg0lpCarhm8YHOxWVxE\"\n ],\n blockExplorerUrls: [\"https://etherscan.io\"],\n vmType: \"EVM\"\n },\n polygon: {\n contractAddress: \"0x7C7757a9675f06F3BE4618bB68732c4aB25D2e88\",\n chainId: 137,\n name: \"Polygon\",\n symbol: \"MATIC\",\n decimals: 18,\n rpcUrls: [\"https://polygon-rpc.com\"],\n blockExplorerUrls: [\"https://explorer.matic.network\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n fantom: {\n contractAddress: \"0x5bD3Fe8Ab542f0AaBF7552FAAf376Fd8Aa9b3869\",\n chainId: 250,\n name: \"Fantom\",\n symbol: \"FTM\",\n decimals: 18,\n rpcUrls: [\"https://rpcapi.fantom.network\"],\n blockExplorerUrls: [\"https://ftmscan.com\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n xdai: {\n contractAddress: \"0xDFc2Fd83dFfD0Dafb216F412aB3B18f2777406aF\",\n chainId: 100,\n name: \"xDai\",\n symbol: \"xDai\",\n decimals: 18,\n rpcUrls: [\"https://rpc.gnosischain.com\"],\n blockExplorerUrls: [\" https://blockscout.com/xdai/mainnet\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n bsc: {\n contractAddress: \"0xc716950e5DEae248160109F562e1C9bF8E0CA25B\",\n chainId: 56,\n name: \"Binance Smart Chain\",\n symbol: \"BNB\",\n decimals: 18,\n rpcUrls: [\"https://bsc-dataseed.binance.org/\"],\n blockExplorerUrls: [\" https://bscscan.com/\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n arbitrum: {\n contractAddress: \"0xc716950e5DEae248160109F562e1C9bF8E0CA25B\",\n chainId: 42161,\n name: \"Arbitrum\",\n symbol: \"AETH\",\n decimals: 18,\n type: \"ERC1155\",\n rpcUrls: [\"https://arb1.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://arbiscan.io/\"],\n vmType: \"EVM\"\n },\n arbitrumSepolia: {\n contractAddress: null,\n chainId: 421614,\n name: \"Arbitrum Sepolia\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://sepolia-rollup.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://sepolia.arbiscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n avalanche: {\n contractAddress: \"0xBB118507E802D17ECDD4343797066dDc13Cde7C6\",\n chainId: 43114,\n name: \"Avalanche\",\n symbol: \"AVAX\",\n decimals: 18,\n type: \"ERC1155\",\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n vmType: \"EVM\"\n },\n fuji: {\n contractAddress: \"0xc716950e5DEae248160109F562e1C9bF8E0CA25B\",\n chainId: 43113,\n name: \"Avalanche FUJI Testnet\",\n symbol: \"AVAX\",\n decimals: 18,\n type: \"ERC1155\",\n rpcUrls: [\"https://api.avax-test.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://testnet.snowtrace.io/\"],\n vmType: \"EVM\"\n },\n harmony: {\n contractAddress: \"0xBB118507E802D17ECDD4343797066dDc13Cde7C6\",\n chainId: 16666e5,\n name: \"Harmony\",\n symbol: \"ONE\",\n decimals: 18,\n type: \"ERC1155\",\n rpcUrls: [\"https://api.harmony.one\"],\n blockExplorerUrls: [\"https://explorer.harmony.one/\"],\n vmType: \"EVM\"\n },\n mumbai: {\n contractAddress: \"0xc716950e5DEae248160109F562e1C9bF8E0CA25B\",\n chainId: 80001,\n name: \"Mumbai\",\n symbol: \"MATIC\",\n decimals: 18,\n rpcUrls: [\n \"https://rpc-mumbai.maticvigil.com/v1/96bf5fa6e03d272fbd09de48d03927b95633726c\"\n ],\n blockExplorerUrls: [\"https://mumbai.polygonscan.com\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n goerli: {\n contractAddress: \"0xc716950e5DEae248160109F562e1C9bF8E0CA25B\",\n chainId: 5,\n name: \"Goerli\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://goerli.infura.io/v3/96dffb3d8c084dec952c61bd6230af34\"],\n blockExplorerUrls: [\"https://goerli.etherscan.io\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n cronos: {\n contractAddress: \"0xc716950e5DEae248160109F562e1C9bF8E0CA25B\",\n chainId: 25,\n name: \"Cronos\",\n symbol: \"CRO\",\n decimals: 18,\n rpcUrls: [\"https://evm-cronos.org\"],\n blockExplorerUrls: [\"https://cronos.org/explorer/\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n optimism: {\n contractAddress: \"0xbF68B4c9aCbed79278465007f20a08Fa045281E0\",\n chainId: 10,\n name: \"Optimism\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.optimism.io\"],\n blockExplorerUrls: [\"https://optimistic.etherscan.io\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n celo: {\n contractAddress: \"0xBB118507E802D17ECDD4343797066dDc13Cde7C6\",\n chainId: 42220,\n name: \"Celo\",\n symbol: \"CELO\",\n decimals: 18,\n rpcUrls: [\"https://forno.celo.org\"],\n blockExplorerUrls: [\"https://explorer.celo.org\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n aurora: {\n contractAddress: null,\n chainId: 1313161554,\n name: \"Aurora\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.aurora.dev\"],\n blockExplorerUrls: [\"https://aurorascan.dev\"],\n type: null,\n vmType: \"EVM\"\n },\n eluvio: {\n contractAddress: null,\n chainId: 955305,\n name: \"Eluvio\",\n symbol: \"ELV\",\n decimals: 18,\n rpcUrls: [\"https://host-76-74-28-226.contentfabric.io/eth\"],\n blockExplorerUrls: [\"https://explorer.eluv.io\"],\n type: null,\n vmType: \"EVM\"\n },\n alfajores: {\n contractAddress: null,\n chainId: 44787,\n name: \"Alfajores\",\n symbol: \"CELO\",\n decimals: 18,\n rpcUrls: [\"https://alfajores-forno.celo-testnet.org\"],\n blockExplorerUrls: [\"https://alfajores-blockscout.celo-testnet.org\"],\n type: null,\n vmType: \"EVM\"\n },\n xdc: {\n contractAddress: null,\n chainId: 50,\n name: \"XDC Blockchain\",\n symbol: \"XDC\",\n decimals: 18,\n rpcUrls: [\"https://rpc.xinfin.network\"],\n blockExplorerUrls: [\"https://explorer.xinfin.network\"],\n type: null,\n vmType: \"EVM\"\n },\n evmos: {\n contractAddress: null,\n chainId: 9001,\n name: \"EVMOS\",\n symbol: \"EVMOS\",\n decimals: 18,\n rpcUrls: [\"https://eth.bd.evmos.org:8545\"],\n blockExplorerUrls: [\"https://evm.evmos.org\"],\n type: null,\n vmType: \"EVM\"\n },\n evmosTestnet: {\n contractAddress: null,\n chainId: 9e3,\n name: \"EVMOS Testnet\",\n symbol: \"EVMOS\",\n decimals: 18,\n rpcUrls: [\"https://eth.bd.evmos.dev:8545\"],\n blockExplorerUrls: [\"https://evm.evmos.dev\"],\n type: null,\n vmType: \"EVM\"\n },\n bscTestnet: {\n contractAddress: null,\n chainId: 97,\n name: \"BSC Testnet\",\n symbol: \"BNB\",\n decimals: 18,\n rpcUrls: [\"https://data-seed-prebsc-1-s1.binance.org:8545\"],\n blockExplorerUrls: [\"https://testnet.bscscan.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n baseGoerli: {\n contractAddress: null,\n chainId: 84531,\n name: \"Base Goerli\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://goerli.base.org\"],\n blockExplorerUrls: [\"https://goerli.basescan.org\"],\n type: null,\n vmType: \"EVM\"\n },\n baseSepolia: {\n contractAddress: null,\n chainId: 84532,\n name: \"Base Sepolia\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://sepolia.base.org\"],\n blockExplorerUrls: [\"https://sepolia.basescan.org\"],\n type: null,\n vmType: \"EVM\"\n },\n moonbeam: {\n contractAddress: null,\n chainId: 1284,\n name: \"Moonbeam\",\n symbol: \"GLMR\",\n decimals: 18,\n rpcUrls: [\"https://rpc.api.moonbeam.network\"],\n blockExplorerUrls: [\"https://moonscan.io\"],\n type: null,\n vmType: \"EVM\"\n },\n moonriver: {\n contractAddress: null,\n chainId: 1285,\n name: \"Moonriver\",\n symbol: \"MOVR\",\n decimals: 18,\n rpcUrls: [\"https://rpc.api.moonriver.moonbeam.network\"],\n blockExplorerUrls: [\"https://moonriver.moonscan.io\"],\n type: null,\n vmType: \"EVM\"\n },\n moonbaseAlpha: {\n contractAddress: null,\n chainId: 1287,\n name: \"Moonbase Alpha\",\n symbol: \"DEV\",\n decimals: 18,\n rpcUrls: [\"https://rpc.api.moonbase.moonbeam.network\"],\n blockExplorerUrls: [\"https://moonbase.moonscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n filecoin: {\n contractAddress: null,\n chainId: 314,\n name: \"Filecoin\",\n symbol: \"FIL\",\n decimals: 18,\n rpcUrls: [\"https://api.node.glif.io/rpc/v1\"],\n blockExplorerUrls: [\"https://filfox.info/\"],\n type: null,\n vmType: \"EVM\"\n },\n filecoinCalibrationTestnet: {\n contractAddress: null,\n chainId: 314159,\n name: \"Filecoin Calibration Testnet\",\n symbol: \"tFIL\",\n decimals: 18,\n rpcUrls: [\"https://api.calibration.node.glif.io/rpc/v1\"],\n blockExplorerUrls: [\"https://calibration.filscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n hyperspace: {\n contractAddress: null,\n chainId: 3141,\n name: \"Filecoin Hyperspace testnet\",\n symbol: \"tFIL\",\n decimals: 18,\n rpcUrls: [\"https://api.hyperspace.node.glif.io/rpc/v1\"],\n blockExplorerUrls: [\"https://hyperspace.filscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n sepolia: {\n contractAddress: null,\n chainId: 11155111,\n name: \"Sepolia Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://ethereum-sepolia-rpc.publicnode.com\"],\n blockExplorerUrls: [\"https://sepolia.etherscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n scrollSepolia: {\n contractAddress: null,\n chainId: 534351,\n name: \"Scroll Sepolia Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://sepolia-rpc.scroll.io\"],\n blockExplorerUrls: [\"https://sepolia.scrollscan.com\"],\n type: null,\n vmType: \"EVM\"\n },\n scroll: {\n contractAddress: null,\n chainId: 534352,\n name: \"Scroll\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.scroll.io\"],\n blockExplorerUrls: [\"https://scrollscan.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n zksync: {\n contractAddress: null,\n chainId: 324,\n name: \"zkSync Era Mainnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.era.zksync.io\"],\n blockExplorerUrls: [\"https://explorer.zksync.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n base: {\n contractAddress: null,\n chainId: 8453,\n name: \"Base Mainnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.base.org\"],\n blockExplorerUrls: [\"https://basescan.org\"],\n type: null,\n vmType: \"EVM\"\n },\n lukso: {\n contractAddress: null,\n chainId: 42,\n name: \"Lukso\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.lukso.gateway.fm\"],\n blockExplorerUrls: [\"https://explorer.execution.mainnet.lukso.network/\"],\n type: null,\n vmType: \"EVM\"\n },\n luksoTestnet: {\n contractAddress: null,\n chainId: 4201,\n name: \"Lukso Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.testnet.lukso.network\"],\n blockExplorerUrls: [\"https://explorer.execution.testnet.lukso.network\"],\n type: null,\n vmType: \"EVM\"\n },\n zora: {\n contractAddress: null,\n chainId: 7777777,\n name: \"\tZora\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.zora.energy/\"],\n blockExplorerUrls: [\"https://explorer.zora.energy\"],\n type: null,\n vmType: \"EVM\"\n },\n zoraGoerli: {\n contractAddress: null,\n chainId: 999,\n name: \"Zora Goerli\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://testnet.rpc.zora.energy\"],\n blockExplorerUrls: [\"https://testnet.explorer.zora.energy\"],\n type: null,\n vmType: \"EVM\"\n },\n zksyncTestnet: {\n contractAddress: null,\n chainId: 280,\n name: \"zkSync Era Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://testnet.era.zksync.dev\"],\n blockExplorerUrls: [\"https://goerli.explorer.zksync.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n lineaGoerli: {\n contractAddress: null,\n chainId: 59140,\n name: \"Linea Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.goerli.linea.build\"],\n blockExplorerUrls: [\"https://explorer.goerli.linea.build\"],\n type: null,\n vmType: \"EVM\"\n },\n lineaSepolia: {\n contractAddress: null,\n chainId: 59141,\n name: \"Linea Sepolia Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.sepolia.linea.build\"],\n blockExplorerUrls: [\"https://explorer.sepolia.linea.build\"],\n type: null,\n vmType: \"EVM\"\n },\n /**\n * Use this for `>= Datil` network.\n * Chainlist entry for the Chronicle Yellowstone Testnet.\n * https://chainlist.org/chain/175188\n */\n yellowstone: yellowstoneChain,\n chiado: {\n contractAddress: null,\n chainId: 10200,\n name: \"Chiado\",\n symbol: \"XDAI\",\n decimals: 18,\n rpcUrls: [\"https://rpc.chiadochain.net\"],\n blockExplorerUrls: [\"https://blockscout.chiadochain.net\"],\n type: null,\n vmType: \"EVM\"\n },\n zkEvm: {\n contractAddress: null,\n chainId: 1101,\n name: \"zkEvm\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://zkevm-rpc.com\"],\n blockExplorerUrls: [\"https://zkevm.polygonscan.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n mantleTestnet: {\n contractAddress: null,\n chainId: 5001,\n name: \"Mantle Testnet\",\n symbol: \"MNT\",\n decimals: 18,\n rpcUrls: [\"https://rpc.testnet.mantle.xyz\"],\n blockExplorerUrls: [\"https://explorer.testnet.mantle.xyz/\"],\n type: null,\n vmType: \"EVM\"\n },\n mantle: {\n contractAddress: null,\n chainId: 5e3,\n name: \"Mantle\",\n symbol: \"MNT\",\n decimals: 18,\n rpcUrls: [\"https://rpc.mantle.xyz\"],\n blockExplorerUrls: [\"http://explorer.mantle.xyz/\"],\n type: null,\n vmType: \"EVM\"\n },\n klaytn: {\n contractAddress: null,\n chainId: 8217,\n name: \"Klaytn\",\n symbol: \"KLAY\",\n decimals: 18,\n rpcUrls: [\"https://klaytn.blockpi.network/v1/rpc/public\"],\n blockExplorerUrls: [\"https://www.klaytnfinder.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n publicGoodsNetwork: {\n contractAddress: null,\n chainId: 424,\n name: \"Public Goods Network\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.publicgoods.network\"],\n blockExplorerUrls: [\"https://explorer.publicgoods.network/\"],\n type: null,\n vmType: \"EVM\"\n },\n optimismGoerli: {\n contractAddress: null,\n chainId: 420,\n name: \"Optimism Goerli\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://optimism-goerli.publicnode.com\"],\n blockExplorerUrls: [\"https://goerli-optimism.etherscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n waevEclipseTestnet: {\n contractAddress: null,\n chainId: 91006,\n name: \"Waev Eclipse Testnet\",\n symbol: \"ecWAEV\",\n decimals: 18,\n rpcUrls: [\"https://api.evm.waev.eclipsenetwork.xyz\"],\n blockExplorerUrls: [\"http://waev.explorer.modular.cloud/\"],\n type: null,\n vmType: \"EVM\"\n },\n waevEclipseDevnet: {\n contractAddress: null,\n chainId: 91006,\n name: \"Waev Eclipse Devnet\",\n symbol: \"ecWAEV\",\n decimals: 18,\n rpcUrls: [\"https://api.evm.waev.dev.eclipsenetwork.xyz\"],\n blockExplorerUrls: [\"http://waev.explorer.modular.cloud/\"],\n type: null,\n vmType: \"EVM\"\n },\n verifyTestnet: {\n contractAddress: null,\n chainId: 1833,\n name: \"Verify Testnet\",\n symbol: \"MATIC\",\n decimals: 18,\n rpcUrls: [\"https://rpc.verify-testnet.gelato.digital\"],\n blockExplorerUrls: [\"https://verify-testnet.blockscout.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n fuse: {\n contractAddress: null,\n chainId: 122,\n name: \"Fuse\",\n symbol: \"FUSE\",\n decimals: 18,\n rpcUrls: [\"https://rpc.fuse.io/\"],\n blockExplorerUrls: [\"https://explorer.fuse.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n campNetwork: {\n contractAddress: null,\n chainId: 325e3,\n name: \"Camp Network\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.camp-network-testnet.gelato.digital\"],\n blockExplorerUrls: [\n \"https://explorer.camp-network-testnet.gelato.digital/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n vanar: {\n contractAddress: null,\n chainId: 78600,\n name: \"Vanar Vanguard\",\n symbol: \"VANRY\",\n decimals: 18,\n rpcUrls: [\"https://rpc-vanguard.vanarchain.com\"],\n blockExplorerUrls: [\"https://explorer-vanguard.vanarchain.com\"],\n type: null,\n vmType: \"EVM\"\n },\n lisk: {\n contractAddress: null,\n chainId: 1135,\n name: \"Lisk\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://lisk.drpc.org\"],\n blockExplorerUrls: [\"https://blockscout.lisk.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n chilizMainnet: {\n contractAddress: null,\n chainId: 88888,\n name: \"Chiliz Mainnet\",\n symbol: \"CHZ\",\n decimals: 18,\n rpcUrls: [\"https://rpc.ankr.com/chiliz\"],\n blockExplorerUrls: [\"https://chiliscan.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n chilizTestnet: {\n contractAddress: null,\n chainId: 88882,\n name: \"Chiliz Spicy Testnet\",\n symbol: \"CHZ\",\n decimals: 18,\n rpcUrls: [\"https://spicy-rpc.chiliz.com/\"],\n blockExplorerUrls: [\"https://testnet.chiliscan.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n skaleTestnet: {\n contractAddress: null,\n chainId: 37084624,\n name: \"SKALE Nebula Hub Testnet\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://testnet.skalenodes.com/v1/lanky-ill-funny-testnet\"],\n blockExplorerUrls: [\n \"https://lanky-ill-funny-testnet.explorer.testnet.skalenodes.com\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skale: {\n contractAddress: null,\n chainId: 1482601649,\n name: \"SKALE Nebula Hub Mainnet\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.skalenodes.com/v1/green-giddy-denebola\"],\n blockExplorerUrls: [\n \"https://green-giddy-denebola.explorer.mainnet.skalenodes.com\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skaleCalypso: {\n contractAddress: null,\n chainId: 1564830818,\n name: \"SKALE Calypso Hub Mainnet\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague\"],\n blockExplorerUrls: [\n \"https://giant-half-dual-testnet.explorer.testnet.skalenodes.com/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skaleCalypsoTestnet: {\n contractAddress: null,\n chainId: 974399131,\n name: \"SKALE Calypso Hub Testnet\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://testnet.skalenodes.com/v1/giant-half-dual-testnet\"],\n blockExplorerUrls: [\n \"https://giant-half-dual-testnet.explorer.testnet.skalenodes.com/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skaleEuropa: {\n contractAddress: null,\n chainId: 2046399126,\n name: \"SKALE Europa DeFI Hub\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.skalenodes.com/v1/elated-tan-skat\"],\n blockExplorerUrls: [\n \"https://elated-tan-skat.explorer.mainnet.skalenodes.com/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skaleEuropaTestnet: {\n contractAddress: null,\n chainId: 1444673419,\n name: \"SKALE Europa DeFi Hub Testnet\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://testnet.skalenodes.com/v1/juicy-low-small-testnet\"],\n blockExplorerUrls: [\n \"https://juicy-low-small-testnet.explorer.testnet.skalenodes.com/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skaleTitan: {\n contractAddress: null,\n chainId: 1350216234,\n name: \"SKALE Titan AI Hub\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.skalenodes.com/v1/parallel-stormy-spica\"],\n blockExplorerUrls: [\n \"https://parallel-stormy-spica.explorer.mainnet.skalenodes.com/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skaleTitanTestnet: {\n contractAddress: null,\n chainId: 1020352220,\n name: \"SKALE Titan AI Hub Testnet\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://testnet.skalenodes.com/v1/aware-fake-trim-testnet\"],\n blockExplorerUrls: [\n \"https://aware-fake-trim-testnet.explorer.testnet.skalenodes.com/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n fhenixHelium: {\n contractAddress: null,\n chainId: 8008135,\n name: \"Fhenix Helium\",\n symbol: \"tFHE\",\n decimals: 18,\n rpcUrls: [\"https://api.helium.fhenix.zone\"],\n blockExplorerUrls: [\"https://explorer.helium.fhenix.zone\"],\n type: null,\n vmType: \"EVM\"\n },\n fhenixNitrogen: {\n contractAddress: null,\n chainId: 8008148,\n name: \"Fhenix Nitrogen\",\n symbol: \"tFHE\",\n decimals: 18,\n rpcUrls: [\"https://api.nitrogen.fhenix.zone\"],\n blockExplorerUrls: [\"https://explorer.nitrogen.fhenix.zone\"],\n type: null,\n vmType: \"EVM\"\n },\n hederaTestnet: {\n contractAddress: null,\n chainId: 296,\n name: \"Hedera Testnet\",\n symbol: \"HBAR\",\n decimals: 8,\n rpcUrls: [\"https://testnet.hashio.io/api\"],\n blockExplorerUrls: [\"https://hashscan.io/testnet/dashboard\"],\n type: null,\n vmType: \"EVM\"\n },\n hederaMainnet: {\n contractAddress: null,\n chainId: 295,\n name: \"Hedera Mainnet\",\n symbol: \"HBAR\",\n decimals: 8,\n rpcUrls: [\"https://mainnet.hashio.io/api\"],\n blockExplorerUrls: [\"https://hashscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n bitTorrentTestnet: {\n contractAddress: null,\n chainId: 1028,\n name: \"BitTorrent Testnet\",\n symbol: \"BTT\",\n decimals: 18,\n rpcUrls: [\"https://test-rpc.bittorrentchain.io\"],\n blockExplorerUrls: [\"https://testnet.bttcscan.com\"],\n type: null,\n vmType: \"EVM\"\n },\n storyOdyssey: {\n contractAddress: null,\n chainId: 1516,\n name: \"Story Odyssey\",\n symbol: \"IP\",\n decimals: 18,\n rpcUrls: [\"https://rpc.odyssey.storyrpc.io\"],\n blockExplorerUrls: [\"https://odyssey.storyscan.xyz\"],\n type: null,\n vmType: \"EVM\"\n },\n campTestnet: {\n contractAddress: null,\n chainId: 325e3,\n name: \"Camp Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.camp-network-testnet.gelato.digital\"],\n blockExplorerUrls: [\"https://camp-network-testnet.blockscout.com\"],\n type: null,\n vmType: \"EVM\"\n },\n hushedNorthstar: {\n contractAddress: null,\n chainId: 42161,\n name: \"Hushed Northstar Devnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.buildbear.io/yielddev\"],\n blockExplorerUrls: [\"https://explorer.buildbear.io/yielddev/transactions\"],\n type: null,\n vmType: \"EVM\"\n },\n amoy: {\n contractAddress: null,\n chainId: 80002,\n name: \"Amoy\",\n symbol: \"POL\",\n decimals: 18,\n rpcUrls: [\"https://rpc-amoy.polygon.technology\"],\n blockExplorerUrls: [\"https://amoy.polygonscan.com\"],\n type: null,\n vmType: \"EVM\"\n },\n matchain: {\n contractAddress: null,\n chainId: 698,\n name: \"Matchain\",\n symbol: \"BNB\",\n decimals: 18,\n rpcUrls: [\"https://rpc.matchain.io\"],\n blockExplorerUrls: [\"https://matchscan.io\"],\n type: null,\n vmType: \"EVM\"\n },\n coreDao: {\n contractAddress: null,\n chainId: 1116,\n name: \"Core DAO\",\n symbol: \"CORE\",\n decimals: 18,\n rpcUrls: [\"https://rpc.coredao.org\"],\n blockExplorerUrls: [\"https://scan.coredao.org/\"],\n type: null,\n vmType: \"EVM\"\n },\n zkCandySepoliaTestnet: {\n contractAddress: null,\n chainId: 302,\n name: \"ZKcandy Sepolia Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://sepolia.rpc.zkcandy.io\"],\n blockExplorerUrls: [\"https://sepolia.explorer.zkcandy.io\"],\n type: null,\n vmType: \"EVM\"\n },\n vana: {\n contractAddress: null,\n chainId: 1480,\n name: \"Vana\",\n symbol: \"VANA\",\n decimals: 18,\n rpcUrls: [\"https://rpc.vana.org\"],\n blockExplorerUrls: [\"https://vanascan.io\"],\n type: null,\n vmType: \"EVM\"\n },\n moksha: {\n contractAddress: null,\n chainId: 1480,\n name: \"Vana\",\n symbol: \"VANA\",\n decimals: 18,\n rpcUrls: [\"https://rpc.moksha.vana.org\"],\n blockExplorerUrls: [\"https://moksha.vanascan.io\"],\n type: null,\n vmType: \"EVM\"\n },\n rootstock: {\n contractAddress: null,\n chainId: 30,\n name: \"Rootstock\",\n symbol: \"RBTC\",\n decimals: 18,\n rpcUrls: [\"https://public-node.rsk.co\"],\n blockExplorerUrls: [\"https://rootstock-testnet.blockscout.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n rootstockTestnet: {\n contractAddress: null,\n chainId: 31,\n name: \"Rootstock Testnet\",\n symbol: \"tRBTC\",\n decimals: 18,\n rpcUrls: [\"https://public-node.testnet.rsk.co\"],\n blockExplorerUrls: [\"https://explorer.testnet.rootstock.io\"],\n type: null,\n vmType: \"EVM\"\n },\n merlin: {\n contractAddress: null,\n chainId: 4200,\n name: \"Merlin\",\n symbol: \"BTC\",\n decimals: 18,\n rpcUrls: [\"https://endpoints.omniatech.io/v1/merlin/mainnet/public\"],\n blockExplorerUrls: [\"https://scan.merlinchain.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n merlinTestnet: {\n contractAddress: null,\n chainId: 686868,\n name: \"Merlin Testnet\",\n symbol: \"BTC\",\n decimals: 18,\n rpcUrls: [\"https://testnet-rpc.merlinchain.io/\"],\n blockExplorerUrls: [\"https://testnet-scan.merlinchain.io\"],\n type: null,\n vmType: \"EVM\"\n },\n bsquared: {\n contractAddress: null,\n chainId: 223,\n name: \"BSquared\",\n symbol: \"BTC\",\n decimals: 18,\n rpcUrls: [\"https://rpc.bsquared.network\"],\n blockExplorerUrls: [\"https://explorer.bsquared.network\"],\n type: null,\n vmType: \"EVM\"\n },\n bsquaredTestnet: {\n contractAddress: null,\n chainId: 1123,\n name: \"BSquared Testnet\",\n symbol: \"tBTC\",\n decimals: 18,\n rpcUrls: [\"https://testnet-rpc.bsquared.network\"],\n blockExplorerUrls: [\"https://testnet-explorer.bsquared.network\"],\n type: null,\n vmType: \"EVM\"\n },\n monadTestnet: {\n contractAddress: null,\n chainId: 10143,\n name: \"Monad Testnet\",\n symbol: \"MON\",\n decimals: 18,\n rpcUrls: [\"https://testnet-rpc.monad.xyz\"],\n blockExplorerUrls: [\"https://testnet.monadexplorer.com\"],\n type: null,\n vmType: \"EVM\"\n },\n bitlayer: {\n contractAddress: null,\n chainId: 200901,\n name: \"Bitlayer\",\n symbol: \"BTC\",\n decimals: 18,\n rpcUrls: [\"https://rpc.bitlayer.org\"],\n blockExplorerUrls: [\"https://www.btrscan.com\"],\n type: null,\n vmType: \"EVM\"\n },\n bitlayerTestnet: {\n contractAddress: null,\n chainId: 200810,\n name: \"Bitlayer Testnet\",\n symbol: \"BTC\",\n decimals: 18,\n rpcUrls: [\"https://testnet-rpc.bitlayer.org\"],\n blockExplorerUrls: [\"https://testnet-scan.bitlayer.org\"],\n type: null,\n vmType: \"EVM\"\n },\n \"5ire\": {\n contractAddress: null,\n chainId: 995,\n name: \"5irechain\",\n symbol: \"5ire\",\n decimals: 18,\n rpcUrls: [\"https://rpc.5ire.network\"],\n blockExplorerUrls: [\"https://5irescan.io/dashboard\"],\n type: null,\n vmType: \"EVM\"\n },\n bob: {\n contractAddress: null,\n chainId: 60808,\n name: \"Bob\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.gobob.xyzg\"],\n blockExplorerUrls: [\"https://explorer.gobob.xyz\"],\n type: null,\n vmType: \"EVM\"\n },\n load: {\n contractAddress: null,\n chainId: 9496,\n name: \"Load Network\",\n symbol: \"LOAD\",\n decimals: 18,\n rpcUrls: [\"https://alphanet.load.network\"],\n blockExplorerUrls: [\"https://explorer.load.network\"],\n type: null,\n vmType: \"EVM\"\n },\n \"0gGalileoTestnet\": {\n contractAddress: null,\n chainId: 16601,\n name: \"0G Galileo Testnet\",\n symbol: \"OG\",\n decimals: 18,\n rpcUrls: [\"https://evmrpc-testnet.0g.ai\"],\n blockExplorerUrls: [\"https://chainscan-galileo.0g.ai/\"],\n type: null,\n vmType: \"EVM\"\n },\n peaqTestnet: {\n contractAddress: null,\n chainId: 9990,\n name: \"Peaq Testnet\",\n symbol: \"PEAQ\",\n decimals: 18,\n rpcUrls: [\"https://peaq-agung.api.onfinality.io/public\"],\n blockExplorerUrls: [\"https://agung-testnet.subscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n peaqMainnet: {\n contractAddress: null,\n chainId: 3338,\n name: \"Peaq Mainnet\",\n symbol: \"PEAQ\",\n decimals: 18,\n rpcUrls: [\"https://quicknode.peaq.xyz/\"],\n blockExplorerUrls: [\"https://peaq.subscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n sonicMainnet: {\n contractAddress: null,\n chainId: 146,\n name: \"Sonic Mainnet\",\n symbol: \"S\",\n decimals: 18,\n rpcUrls: [\"https://rpc.soniclabs.com\"],\n blockExplorerUrls: [\"https://sonicscan.org\"],\n type: null,\n vmType: \"EVM\"\n },\n sonicBlazeTestnet: {\n contractAddress: null,\n chainId: 57054,\n name: \"Sonic Blaze Testnet\",\n symbol: \"S\",\n decimals: 18,\n rpcUrls: [\"https://rpc.blaze.soniclabs.com\"],\n blockExplorerUrls: [\"https://testnet.sonicscan.org/\"],\n type: null,\n vmType: \"EVM\"\n },\n holeskyTestnet: {\n contractAddress: null,\n chainId: 17e3,\n name: \"Holesky Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.holesky.ethpandaops.io\"],\n blockExplorerUrls: [\"https://holesky.etherscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n flowEvmMainnet: {\n contractAddress: null,\n chainId: 747,\n name: \"Flow EVM Mainnet\",\n symbol: \"FLOW\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.evm.nodes.onflow.org\"],\n blockExplorerUrls: [\"https://evm.flowscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n flowEvmTestnet: {\n contractAddress: null,\n chainId: 545,\n name: \"Flow EVM Testnet\",\n symbol: \"FLOW\",\n decimals: 18,\n rpcUrls: [\"https://testnet.evm.nodes.onflow.org\"],\n blockExplorerUrls: [\"https://evm-testnet.flowscan.io\"],\n type: null,\n vmType: \"EVM\"\n },\n confluxEspaceMainnet: {\n contractAddress: null,\n chainId: 1030,\n name: \"Conflux eSpace Mainnet\",\n symbol: \"CFX\",\n decimals: 18,\n rpcUrls: [\"evm.confluxrpc.com\"],\n blockExplorerUrls: [\"https://confluxscan.net/\"],\n type: null,\n vmType: \"EVM\"\n },\n statusNetworkSepolia: {\n contractAddress: null,\n chainId: 1660990954,\n name: \"Status Network Sepolia\",\n symbol: \"FLOW\",\n decimals: 18,\n rpcUrls: [\"https://public.sepolia.rpc.status.network\"],\n blockExplorerUrls: [\"https://sepoliascan.status.network\"],\n type: null,\n vmType: \"EVM\"\n },\n \"0gMainnet\": {\n contractAddress: null,\n chainId: 16661,\n name: \"0G Mainnet\",\n symbol: \"FLOW\",\n decimals: 18,\n rpcUrls: [\"http://evmrpc.0g.ai/ \"],\n blockExplorerUrls: [\"https://chainscan.0g.ai/\"],\n type: null,\n vmType: \"EVM\"\n }\n };\n exports3.METAMASK_CHAIN_INFO = {\n /**\n * Information about the \"chronicleYellowstone\" chain.\n */\n yellowstone: {\n chainId: exports3.LIT_CHAINS[\"yellowstone\"].chainId,\n chainName: exports3.LIT_CHAINS[\"yellowstone\"].name,\n nativeCurrency: {\n name: exports3.LIT_CHAINS[\"yellowstone\"].symbol,\n symbol: exports3.LIT_CHAINS[\"yellowstone\"].symbol,\n decimals: exports3.LIT_CHAINS[\"yellowstone\"].decimals\n },\n rpcUrls: exports3.LIT_CHAINS[\"yellowstone\"].rpcUrls,\n blockExplorerUrls: exports3.LIT_CHAINS[\"yellowstone\"].blockExplorerUrls,\n iconUrls: [\"future\"]\n }\n };\n exports3.metamaskChainInfo = new Proxy(exports3.METAMASK_CHAIN_INFO, {\n get(target, prop, receiver) {\n deprecated(\"metamaskChainInfo is deprecated and will be removed in a future version. Use METAMASK_CHAIN_INFO instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LIT_RPC = {\n /**\n * Local Anvil RPC endpoint.\n */\n LOCAL_ANVIL: \"http://127.0.0.1:8545\",\n /**\n * Chronicle Yellowstone RPC endpoint - used for >= Datil-test\n * More info: https://app.conduit.xyz/published/view/chronicle-yellowstone-testnet-9qgmzfcohk\n */\n CHRONICLE_YELLOWSTONE: \"https://yellowstone-rpc.litprotocol.com\"\n };\n exports3.LIT_EVM_CHAINS = exports3.LIT_CHAINS;\n exports3.LIT_NETWORK = {\n DatilDev: \"datil-dev\",\n DatilTest: \"datil-test\",\n Datil: \"datil\",\n Custom: \"custom\"\n };\n exports3.LitNetwork = new Proxy(exports3.LIT_NETWORK, {\n get(target, prop, receiver) {\n deprecated(\"LitNetwork is deprecated and will be removed in a future version. Use LIT_NETWORK instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.RPC_URL_BY_NETWORK = {\n \"datil-dev\": exports3.LIT_RPC.CHRONICLE_YELLOWSTONE,\n \"datil-test\": exports3.LIT_RPC.CHRONICLE_YELLOWSTONE,\n datil: exports3.LIT_RPC.CHRONICLE_YELLOWSTONE,\n custom: exports3.LIT_RPC.LOCAL_ANVIL\n };\n exports3.RELAYER_URL_BY_NETWORK = {\n \"datil-dev\": \"https://datil-dev-relayer.getlit.dev\",\n \"datil-test\": \"https://datil-test-relayer.getlit.dev\",\n datil: \"https://datil-relayer.getlit.dev\",\n custom: \"http://localhost:3000\"\n };\n exports3.METAMASK_CHAIN_INFO_BY_NETWORK = {\n \"datil-dev\": exports3.METAMASK_CHAIN_INFO.yellowstone,\n \"datil-test\": exports3.METAMASK_CHAIN_INFO.yellowstone,\n datil: exports3.METAMASK_CHAIN_INFO.yellowstone,\n custom: exports3.METAMASK_CHAIN_INFO.yellowstone\n };\n exports3.HTTP = \"http://\";\n exports3.HTTPS = \"https://\";\n exports3.HTTP_BY_NETWORK = {\n \"datil-dev\": exports3.HTTPS,\n \"datil-test\": exports3.HTTPS,\n datil: exports3.HTTPS,\n custom: exports3.HTTP\n // default, can be changed by config\n };\n exports3.CENTRALISATION_BY_NETWORK = {\n \"datil-dev\": \"centralised\",\n \"datil-test\": \"decentralised\",\n datil: \"decentralised\",\n custom: \"unknown\"\n };\n exports3.LIT_SVM_CHAINS = {\n solana: {\n name: \"Solana\",\n symbol: \"SOL\",\n decimals: 9,\n rpcUrls: [\"https://api.mainnet-beta.solana.com\"],\n blockExplorerUrls: [\"https://explorer.solana.com/\"],\n vmType: \"SVM\"\n },\n solanaDevnet: {\n name: \"Solana Devnet\",\n symbol: \"SOL\",\n decimals: 9,\n rpcUrls: [\"https://api.devnet.solana.com\"],\n blockExplorerUrls: [\"https://explorer.solana.com/\"],\n vmType: \"SVM\"\n },\n solanaTestnet: {\n name: \"Solana Testnet\",\n symbol: \"SOL\",\n decimals: 9,\n rpcUrls: [\"https://api.testnet.solana.com\"],\n blockExplorerUrls: [\"https://explorer.solana.com/\"],\n vmType: \"SVM\"\n }\n };\n exports3.LIT_COSMOS_CHAINS = {\n cosmos: {\n name: \"Cosmos\",\n symbol: \"ATOM\",\n decimals: 6,\n chainId: \"cosmoshub-4\",\n rpcUrls: [\"https://lcd-cosmoshub.keplr.app\"],\n blockExplorerUrls: [\"https://atomscan.com/\"],\n vmType: \"CVM\"\n },\n kyve: {\n name: \"Kyve\",\n symbol: \"KYVE\",\n decimals: 6,\n chainId: \"korellia\",\n rpcUrls: [\"https://api.korellia.kyve.network\"],\n blockExplorerUrls: [\"https://explorer.kyve.network/\"],\n vmType: \"CVM\"\n },\n evmosCosmos: {\n name: \"EVMOS Cosmos\",\n symbol: \"EVMOS\",\n decimals: 18,\n chainId: \"evmos_9001-2\",\n rpcUrls: [\"https://rest.bd.evmos.org:1317\"],\n blockExplorerUrls: [\"https://evmos.bigdipper.live\"],\n vmType: \"CVM\"\n },\n evmosCosmosTestnet: {\n name: \"Evmos Cosmos Testnet\",\n symbol: \"EVMOS\",\n decimals: 18,\n chainId: \"evmos_9000-4\",\n rpcUrls: [\"https://rest.bd.evmos.dev:1317\"],\n blockExplorerUrls: [\"https://testnet.bigdipper.live\"],\n vmType: \"CVM\"\n },\n cheqdMainnet: {\n name: \"Cheqd Mainnet\",\n symbol: \"CHEQ\",\n decimals: 9,\n chainId: \"cheqd-mainnet-1\",\n rpcUrls: [\"https://api.cheqd.net\"],\n blockExplorerUrls: [\"https://explorer.cheqd.io\"],\n vmType: \"CVM\"\n },\n cheqdTestnet: {\n name: \"Cheqd Testnet\",\n symbol: \"CHEQ\",\n decimals: 9,\n chainId: \"cheqd-testnet-6\",\n rpcUrls: [\"https://api.cheqd.network\"],\n blockExplorerUrls: [\"https://testnet-explorer.cheqd.io\"],\n vmType: \"CVM\"\n },\n juno: {\n name: \"Juno\",\n symbol: \"JUNO\",\n decimals: 6,\n chainId: \"juno-1\",\n rpcUrls: [\"https://rest.cosmos.directory/juno\"],\n blockExplorerUrls: [\"https://www.mintscan.io/juno\"],\n vmType: \"CVM\"\n }\n };\n exports3.ALL_LIT_CHAINS = {\n ...exports3.LIT_CHAINS,\n ...exports3.LIT_SVM_CHAINS,\n ...exports3.LIT_COSMOS_CHAINS\n };\n exports3.LOCAL_STORAGE_KEYS = {\n AUTH_COSMOS_SIGNATURE: \"lit-auth-cosmos-signature\",\n AUTH_SIGNATURE: \"lit-auth-signature\",\n AUTH_SOL_SIGNATURE: \"lit-auth-sol-signature\",\n WEB3_PROVIDER: \"lit-web3-provider\",\n KEY_PAIR: \"lit-comms-keypair\",\n SESSION_KEY: \"lit-session-key\",\n WALLET_SIGNATURE: \"lit-wallet-sig\"\n };\n exports3.SYMM_KEY_ALGO_PARAMS = {\n name: \"AES-CBC\",\n length: 256\n };\n exports3.LIT_NETWORKS = {\n \"datil-dev\": [],\n \"datil-test\": [],\n datil: [],\n custom: []\n };\n exports3.LIT_SESSION_KEY_URI = \"lit:session:\";\n exports3.AUTH_METHOD_TYPE_IDS = {\n WEBAUTHN: 3,\n DISCORD: 4,\n GOOGLE: 5,\n GOOGLE_JWT: 6\n };\n exports3.PKP_CLIENT_SUPPORTED_CHAINS = [\"eth\", \"cosmos\"];\n exports3.SIWE_DELEGATION_URI = \"lit:capability:delegation\";\n exports3.LIT_ACTION_IPFS_HASH = \"QmUjX8MW6StQ7NKNdaS6g4RMkvN5hcgtKmEi8Mca6oX4t3\";\n exports3.VMTYPE = {\n EVM: \"EVM\",\n SVM: \"SVM\",\n CVM: \"CVM\"\n };\n exports3.LIT_CURVE = {\n BLS: \"BLS\",\n EcdsaK256: \"K256\",\n EcdsaCaitSith: \"ECDSA_CAIT_SITH\",\n // Legacy alias of K256\n EcdsaCAITSITHP256: \"EcdsaCaitSithP256\"\n };\n exports3.EITHER_TYPE = {\n ERROR: \"ERROR\",\n SUCCESS: \"SUCCESS\"\n };\n exports3.AUTH_METHOD_TYPE = {\n EthWallet: 1,\n LitAction: 2,\n WebAuthn: 3,\n Discord: 4,\n Google: 5,\n GoogleJwt: 6,\n AppleJwt: 8,\n StytchOtp: 9,\n StytchEmailFactorOtp: 10,\n StytchSmsFactorOtp: 11,\n StytchWhatsAppFactorOtp: 12,\n StytchTotpFactorOtp: 13\n };\n exports3.AuthMethodType = new Proxy(exports3.AUTH_METHOD_TYPE, {\n get(target, prop, receiver) {\n deprecated(\"AuthMethodType is deprecated and will be removed in a future version. Use AUTH_METHOD_TYPE instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.AUTH_METHOD_SCOPE = {\n NoPermissions: 0,\n SignAnything: 1,\n PersonalSign: 2\n };\n exports3.AuthMethodScope = new Proxy(exports3.AUTH_METHOD_SCOPE, {\n get(target, prop, receiver) {\n deprecated(\"AuthMethodScope is deprecated and will be removed in a future version. Use AUTH_METHOD_SCOPE instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.PROVIDER_TYPE = {\n Discord: \"discord\",\n Google: \"google\",\n EthWallet: \"ethwallet\",\n WebAuthn: \"webauthn\",\n Apple: \"apple\",\n StytchOtp: \"stytchOtp\",\n StytchEmailFactorOtp: \"stytchEmailFactorOtp\",\n StytchSmsFactorOtp: \"stytchSmsFactorOtp\",\n StytchWhatsAppFactorOtp: \"stytchWhatsAppFactorOtp\",\n StytchTotpFactor: \"stytchTotpFactor\"\n };\n exports3.ProviderType = new Proxy(exports3.PROVIDER_TYPE, {\n get(target, prop, receiver) {\n deprecated(\"ProviderType is deprecated and will be removed in a future version. Use PROVIDER_TYPE instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.STAKING_STATES = {\n Active: 0,\n NextValidatorSetLocked: 1,\n ReadyForNextEpoch: 2,\n Unlocked: 3,\n Paused: 4,\n Restore: 5\n };\n exports3.StakingStates = new Proxy(exports3.STAKING_STATES, {\n get(target, prop, receiver) {\n deprecated(\"StakingStates is deprecated and will be removed in a future version. Use STAKING_STATES instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.RELAY_AUTH_STATUS = {\n InProgress: \"InProgress\",\n Succeeded: \"Succeeded\",\n Failed: \"Failed\"\n };\n exports3.RelayAuthStatus = new Proxy(exports3.RELAY_AUTH_STATUS, {\n get(target, prop, receiver) {\n deprecated(\"RelayAuthStatus is deprecated and will be removed in a future version. Use RELAY_AUTH_STATUS instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LIT_RESOURCE_PREFIX = {\n AccessControlCondition: \"lit-accesscontrolcondition\",\n PKP: \"lit-pkp\",\n RLI: \"lit-ratelimitincrease\",\n LitAction: \"lit-litaction\"\n };\n exports3.LitResourcePrefix = new Proxy(exports3.LIT_RESOURCE_PREFIX, {\n get(target, prop, receiver) {\n deprecated(\"LitResourcePrefix is deprecated and will be removed in a future version. Use LIT_RESOURCE_PREFIX instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LIT_ABILITY = {\n /**\n * This is the ability to process an encryption access control condition.\n * The resource will specify the corresponding hashed key value of the\n * access control condition.\n */\n AccessControlConditionDecryption: \"access-control-condition-decryption\",\n /**\n * This is the ability to process a signing access control condition.\n * The resource will specify the corresponding hashed key value of the\n * access control condition.\n */\n AccessControlConditionSigning: \"access-control-condition-signing\",\n /**\n * This is the ability to use a PKP for signing purposes. The resource will specify\n * the corresponding PKP token ID.\n */\n PKPSigning: \"pkp-signing\",\n /**\n * This is the ability to use a Rate Limit Increase (Capacity Credits NFT) token during\n * authentication with the nodes. The resource will specify the corresponding\n * Capacity Credits NFT token ID.\n */\n RateLimitIncreaseAuth: \"rate-limit-increase-auth\",\n /**\n * This is the ability to execute a Lit Action. The resource will specify the\n * corresponding Lit Action IPFS CID.\n */\n LitActionExecution: \"lit-action-execution\"\n };\n exports3.LitAbility = new Proxy(exports3.LIT_ABILITY, {\n get(target, prop, receiver) {\n deprecated(\"LitAbility is deprecated and will be removed in a future version. Use LIT_ABILITY instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LIT_RECAP_ABILITY = {\n Decryption: \"Decryption\",\n Signing: \"Signing\",\n Auth: \"Auth\",\n Execution: \"Execution\"\n };\n exports3.LitRecapAbility = new Proxy(exports3.LIT_RECAP_ABILITY, {\n get(target, prop, receiver) {\n deprecated(\"LitRecapAbility is deprecated and will be removed in a future version. Use LIT_RECAP_ABILITY instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LIT_NAMESPACE = {\n Auth: \"Auth\",\n Threshold: \"Threshold\"\n };\n exports3.LitNamespace = new Proxy(exports3.LIT_NAMESPACE, {\n get(target, prop, receiver) {\n deprecated(\"LitNamespace is deprecated and will be removed in a future version. Use LIT_NAMESPACE instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LOG_LEVEL = {\n INFO: 0,\n DEBUG: 1,\n WARN: 2,\n ERROR: 3,\n FATAL: 4,\n TIMING_START: 5,\n TIMING_END: 6,\n OFF: -1\n };\n exports3.LogLevel = new Proxy(exports3.LOG_LEVEL, {\n get(target, prop, receiver) {\n deprecated(\"LogLevel is deprecated and will be removed in a future version. Use LOG_LEVEL instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.FALLBACK_IPFS_GATEWAYS = [\n \"https://flk-ipfs.io/ipfs/\",\n \"https://litprotocol.mypinata.cloud/ipfs/\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/datil.cjs\n var require_datil = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/datil.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175188\",\n \"rpcUrl\": \"https://yellowstone-rpc.litprotocol.com\",\n \"chainName\": \"yellowstone\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x9c9D147dad75D8B9Bd327405098D65C727296B54\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x21d636d95eE71150c0c3Ffa79268c989a329d1CE\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwnerOrDevopsAdmin\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DevopsAdminSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"validators\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"adminSetValidatorsInCurrentEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminStakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setDevopsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"valueName\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ValueMustBeNonzero\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AttestedWalletRegistered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"registerAttestedWallet\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeAttestedPubKeyMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"pubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.PubKeyMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isRecentValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xB87CcFf487B84b60c09DBE15337a46bf5a9e0680\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xd78089bAAe410f5d0eae31D0D56157c73a3Ff98B\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xF182d6bEf16Ba77e69372dD096D8B70Bc3d5B475\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"rootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"adminSetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x487A9D096BB4B7Ac1520Cb12370e31e677B175EA\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x01205d94Fee4d9F59A4aB24bf80D11d4DdAf6Eed\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x5B55ee57C459a31072145F2Fc00b35de20520adD\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterialV2\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypesV2\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x213Db6E1446928E19588269bEF7dFc9187c4829A\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getPKPPubKeysByAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x4BB8681d3a24F130cC746C7DC31167C93D72d32b\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xE393BCD2a9099C903D28949Bac2C4cEd21E55415\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xF19ea8634969730cB51BFEe2E2A5353062053C14\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/datil-dev.cjs\n var require_datil_dev = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/datil-dev.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175188\",\n \"rpcUrl\": \"https://yellowstone-rpc.litprotocol.com\",\n \"chainName\": \"yellowstone\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x77F277D4858Ae589b2263FEfd50CaD7838fE4741\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xD4507CD392Af2c80919219d7896508728f6A623F\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwnerOrDevopsAdmin\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DevopsAdminSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"validators\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"adminSetValidatorsInCurrentEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminStakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setDevopsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"valueName\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ValueMustBeNonzero\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AttestedWalletRegistered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"registerAttestedWallet\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeAttestedPubKeyMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"pubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.PubKeyMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isRecentValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x116eBFb474C6aa13e1B8b19253fd0E3f226A982f\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x81d8f0e945E3Bdc735dA3E19C4Df77a8B91046Cd\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xbc01f21C58Ca83f25b09338401D53D4c2344D1d9\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"rootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"adminSetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x02C4242F72d62c8fEF2b2DB088A35a9F4ec741C7\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x1A12D5B3D6A52B3bDe0468900795D35ce994ac2b\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xCa9C62fB4ceA8831eBb6fD9fE747Cc372515CF7f\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterialV2\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypesV2\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xf64638F1eb3b064f5443F7c9e2Dc050ed535D891\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getPKPPubKeysByAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x784A743bBBB5f5225CeC7979A3304179be17D66d\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xC60051658E346554C1F572ef3Aa4bD8596E026b6\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xbB23168855efe735cE9e6fD6877bAf13E02c410f\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/datil-test.cjs\n var require_datil_test = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/datil-test.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175188\",\n \"rpcUrl\": \"https://yellowstone-rpc.litprotocol.com\",\n \"chainName\": \"yellowstone\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xCa3c64e7D8cA743aeD2B2d20DCA3233f400710E2\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xdec37933239846834b3BfD408913Ed3dbEf6588F\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwnerOrDevopsAdmin\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DevopsAdminSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"validators\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"adminSetValidatorsInCurrentEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminStakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setDevopsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"valueName\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ValueMustBeNonzero\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AttestedWalletRegistered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"registerAttestedWallet\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeAttestedPubKeyMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"pubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.PubKeyMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isRecentValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"CloneNet\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x1f4233b6C5b84978c458FA66412E4ae6d0561104\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminAddActiveStakingContract\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRemoveActiveStakingContract\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveStakingContracts\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getAllActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"epoch\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentValidatorCountForConsensus\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"activeUnkickedValidators\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.StakingAggregateDetails\",\n \"name\": \"details\",\n \"type\": \"tuple\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.KeyedStakingAggregateDetails[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"numActiveStakingContracts\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x8281f3A62f7de320B3a634e6814BeC36a1AA92bd\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xFA1208f5275a01Be1b4A6F6764d388FDcF5Bf85e\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x65C3d057aef28175AfaC61a74cc6b27E88405583\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"rootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"adminSetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x6a0f439f064B7167A8Ea6B22AcC07ae5360ee0d1\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xa17f11B7f828EEc97926E56D98D5AB63A0231b77\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x341E5273E2E2ea3c4aDa4101F008b1261E58510D\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterialV2\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypesV2\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x60C1ddC8b9e38F730F0e7B70A2F84C1A98A69167\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getPKPPubKeysByAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xaC1d01692EBA0E457134Eb7EB8bb96ee9D91FcdD\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x5DD7a0FD581aB11a5720bE7E388e63346bC266fe\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xd7188e0348F1dA8c9b3d6e614844cbA22329B99E\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/cayenne.cjs\n var require_cayenne = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/cayenne.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x523642999938B5e9085E1e7dF38Eac96DC3fdD91\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x5bFa704aF947b3b0f966e4248DED7bfa6edeF952\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwnerOrDevopsAdmin\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DevopsAdminSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"validators\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"adminSetValidatorsInCurrentEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminStakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setDevopsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"valueName\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ValueMustBeNonzero\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AttestedWalletRegistered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"registerAttestedWallet\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeAttestedPubKeyMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"pubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.PubKeyMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isRecentValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0xD4e3D27d21D6D6d596b6524610C486F8A9c70958\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x53695556f8a1a064EdFf91767f15652BbfaFaD04\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x4B5E97F2D811520e031A8F924e698B329ad83E29\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"rootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"adminSetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x58582b93d978F30b4c4E812A16a7b31C035A69f7\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x19593CbBC56Ddd339Fde26278A544a25166C2388\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0xF02b6D6b0970DB3810963300a6Ad38D8429c4cdb\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterialV2\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypesV2\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0xD01c9C30f8F6fa443721629775e1CC7DD9c9e209\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getPKPPubKeysByAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0xeD46dDcbFF662ad89b0987E0DFE2949901498Da6\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x6fc7834a538cDfF7B937490D9D11b4018692c5d5\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x30a5456Ea0D81FB81b82C2949eE1c798EBC933AC\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/habanero.cjs\n var require_habanero = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/habanero.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175177\",\n \"rpcUrl\": \"https://lit-protocol.calderachain.xyz/http\",\n \"chainName\": \"lit\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x50f6722544937b72EcaDFDE3386BfdDbdBB3103B\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0xde8627067188C0063384eC682D9187c7d7673934\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwnerOrDevopsAdmin\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DevopsAdminSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"validators\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"adminSetValidatorsInCurrentEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminStakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setDevopsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"valueName\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ValueMustBeNonzero\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AttestedWalletRegistered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"registerAttestedWallet\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeAttestedPubKeyMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"pubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.PubKeyMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isRecentValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x8c14AB9cF3edca9D28Ddef54bE895078352EDF83\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x53695556f8a1a064EdFf91767f15652BbfaFaD04\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0xaaFc41e3615108E558ECf1d873e1500e375b2328\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"rootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"adminSetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x80182Ec46E3dD7Bb8fa4f89b48d303bD769465B2\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0xf8a84406aB814dc3a25Ea2e3608cCb632f672427\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x087995cc8BE0Bd6C19b1c7A01F9DB6D2CfFe0c5C\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterialV2\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypesV2\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x1B76BFAA063A35c88c7e82066b32eEa91CB266C6\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getPKPPubKeysByAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x728C10dA8A152b71eAB4F8adD6225080323B506E\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0xEC97F162940883ed1feeccd9fb741f11a1F996e2\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x4AdDb026fbC0a329a75E77f179FFC78c896ac0e6\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/internalDev.cjs\n var require_internalDev = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/internalDev.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175188\",\n \"rpcUrl\": \"https://yellowstone-rpc.litprotocol.com\",\n \"chainName\": \"yellowstone\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x8D96F8B16338aB9D12339A508b5a3a39E61F8D74\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x386150020B7AdD47B03D0cf9f4cdaA4451F7c1D4\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwnerOrDevopsAdmin\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DevopsAdminSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"validators\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"adminSetValidatorsInCurrentEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminStakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setDevopsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"valueName\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ValueMustBeNonzero\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AttestedWalletRegistered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"registerAttestedWallet\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeAttestedPubKeyMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"pubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.PubKeyMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isRecentValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x7007C19435F504AF7a60f85862b9E756806aBF5A\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0xd78089bAAe410f5d0eae31D0D56157c73a3Ff98B\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0xBCb7EFc7FDB0b95Ce7C76a3D7faE12217828337D\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"rootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"adminSetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x1CaE44eD5e298C420142F5Bfdd5A72a0AFd2C95d\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0xa24EEee69493F5364d7A8de809c3547420616206\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x361Dc112F388c1c0F2a6954b6b2da0461791bB80\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterialV2\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypesV2\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x8087D9fcBC839ff6B493e47FD02A15F4EF460b75\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getPKPPubKeysByAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x9189D2C972373D8769F0e343d994204babb7197C\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0xF473cd925e7A3D6804fB74CE2F484CA8BCa35Bfb\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x49A8a438AAFF2D3EfD22993ECfb58923C28155A3\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/manzano.cjs\n var require_manzano = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/dev/manzano.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175177\",\n \"rpcUrl\": \"https://lit-protocol.calderachain.xyz/http\",\n \"chainName\": \"lit\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x82F0a170CEDFAaab623513EE558DB19f5D787C8D\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xBC7F8d7864002b6629Ab49781D5199C8dD1DDcE1\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwnerOrDevopsAdmin\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DevopsAdminSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"validators\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"adminSetValidatorsInCurrentEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminStakeForValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newDevopsAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setDevopsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"valueName\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"ValueMustBeNonzero\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AttestedWalletRegistered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"attestedAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"attestedPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"registerAttestedWallet\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeAttestedPubKeyMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"pubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.PubKeyMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isRecentValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xBd119B72B52d58A7dDd771A2E4984d106Da0D1DB\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x53695556f8a1a064EdFf91767f15652BbfaFaD04\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xF6b0fE0d0C27C855f7f2e021fAd028af02cC52cb\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"rootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"adminSetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x3c3ad2d238757Ea4AF87A8624c716B11455c1F9A\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x9b1B8aD8A4144Be9F8Fb5C4766eE37CE0754AEAb\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x24d646b9510e56af8B15de759331d897C4d66044\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterialV2\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypesV2\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x974856dB1C4259915b709E6BcA26A002fbdd31ea\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getPKPPubKeysByAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xa87fe043AD341A1Dc8c5E48d75BA9f712256fe7e\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x180BA6Ec983019c578004D91c08897c12d78F516\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint128\",\n \"name\": \"totalMaxPrice\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xC52b72E2AD3dC58B7d23197575fb48A4523fa734\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/datil.cjs\n var require_datil2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/datil.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175188\",\n \"rpcUrl\": \"https://yellowstone-rpc.litprotocol.com\",\n \"chainName\": \"yellowstone\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x9c9D147dad75D8B9Bd327405098D65C727296B54\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x21d636d95eE71150c0c3Ffa79268c989a329d1CE\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xB87CcFf487B84b60c09DBE15337a46bf5a9e0680\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xd78089bAAe410f5d0eae31D0D56157c73a3Ff98B\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xF182d6bEf16Ba77e69372dD096D8B70Bc3d5B475\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x487A9D096BB4B7Ac1520Cb12370e31e677B175EA\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x01205d94Fee4d9F59A4aB24bf80D11d4DdAf6Eed\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x5B55ee57C459a31072145F2Fc00b35de20520adD\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x213Db6E1446928E19588269bEF7dFc9187c4829A\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0x4BB8681d3a24F130cC746C7DC31167C93D72d32b\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xE393BCD2a9099C903D28949Bac2C4cEd21E55415\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"datil\",\n \"address_hash\": \"0xF19ea8634969730cB51BFEe2E2A5353062053C14\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"setDefaultRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/cayenne.cjs\n var require_cayenne2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/cayenne.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x523642999938B5e9085E1e7dF38Eac96DC3fdD91\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x5bFa704aF947b3b0f966e4248DED7bfa6edeF952\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0xD4e3D27d21D6D6d596b6524610C486F8A9c70958\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x53695556f8a1a064EdFf91767f15652BbfaFaD04\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x4B5E97F2D811520e031A8F924e698B329ad83E29\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x58582b93d978F30b4c4E812A16a7b31C035A69f7\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x19593CbBC56Ddd339Fde26278A544a25166C2388\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0xF02b6D6b0970DB3810963300a6Ad38D8429c4cdb\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0xD01c9C30f8F6fa443721629775e1CC7DD9c9e209\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0xeD46dDcbFF662ad89b0987E0DFE2949901498Da6\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x6fc7834a538cDfF7B937490D9D11b4018692c5d5\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"cayenne\",\n \"address_hash\": \"0x30a5456Ea0D81FB81b82C2949eE1c798EBC933AC\",\n \"inserted_at\": \"2024-05-02T21:29:06Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"setDefaultRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/datil-dev.cjs\n var require_datil_dev2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/datil-dev.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175188\",\n \"rpcUrl\": \"https://yellowstone-rpc.litprotocol.com\",\n \"chainName\": \"yellowstone\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x77F277D4858Ae589b2263FEfd50CaD7838fE4741\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xD4507CD392Af2c80919219d7896508728f6A623F\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x116eBFb474C6aa13e1B8b19253fd0E3f226A982f\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x81d8f0e945E3Bdc735dA3E19C4Df77a8B91046Cd\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xbc01f21C58Ca83f25b09338401D53D4c2344D1d9\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x02C4242F72d62c8fEF2b2DB088A35a9F4ec741C7\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x1A12D5B3D6A52B3bDe0468900795D35ce994ac2b\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xCa9C62fB4ceA8831eBb6fD9fE747Cc372515CF7f\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xf64638F1eb3b064f5443F7c9e2Dc050ed535D891\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0x784A743bBBB5f5225CeC7979A3304179be17D66d\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xC60051658E346554C1F572ef3Aa4bD8596E026b6\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"datil-dev\",\n \"address_hash\": \"0xbB23168855efe735cE9e6fD6877bAf13E02c410f\",\n \"inserted_at\": \"2024-11-27T01:57:28Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"setDefaultRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/datil-test.cjs\n var require_datil_test2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/datil-test.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175188\",\n \"rpcUrl\": \"https://yellowstone-rpc.litprotocol.com\",\n \"chainName\": \"yellowstone\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xCa3c64e7D8cA743aeD2B2d20DCA3233f400710E2\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xdec37933239846834b3BfD408913Ed3dbEf6588F\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"CloneNet\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x1f4233b6C5b84978c458FA66412E4ae6d0561104\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminAddActiveStakingContract\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRemoveActiveStakingContract\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveStakingContracts\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getAllActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"startTime\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"epoch\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentValidatorCountForConsensus\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lastActiveEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"activeUnkickedValidators\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.StakingAggregateDetails\",\n \"name\": \"details\",\n \"type\": \"tuple\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.KeyedStakingAggregateDetails[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"numActiveStakingContracts\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x8281f3A62f7de320B3a634e6814BeC36a1AA92bd\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xFA1208f5275a01Be1b4A6F6764d388FDcF5Bf85e\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x65C3d057aef28175AfaC61a74cc6b27E88405583\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x6a0f439f064B7167A8Ea6B22AcC07ae5360ee0d1\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xa17f11B7f828EEc97926E56D98D5AB63A0231b77\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x341E5273E2E2ea3c4aDa4101F008b1261E58510D\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x60C1ddC8b9e38F730F0e7B70A2F84C1A98A69167\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xaC1d01692EBA0E457134Eb7EB8bb96ee9D91FcdD\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0x5DD7a0FD581aB11a5720bE7E388e63346bC266fe\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"datil-test\",\n \"address_hash\": \"0xd7188e0348F1dA8c9b3d6e614844cbA22329B99E\",\n \"inserted_at\": \"2024-11-02T02:50:47Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"setDefaultRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/habanero.cjs\n var require_habanero2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/habanero.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175177\",\n \"rpcUrl\": \"https://lit-protocol.calderachain.xyz/http\",\n \"chainName\": \"lit\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x50f6722544937b72EcaDFDE3386BfdDbdBB3103B\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0xde8627067188C0063384eC682D9187c7d7673934\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x8c14AB9cF3edca9D28Ddef54bE895078352EDF83\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x53695556f8a1a064EdFf91767f15652BbfaFaD04\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0xaaFc41e3615108E558ECf1d873e1500e375b2328\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x80182Ec46E3dD7Bb8fa4f89b48d303bD769465B2\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0xf8a84406aB814dc3a25Ea2e3608cCb632f672427\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x087995cc8BE0Bd6C19b1c7A01F9DB6D2CfFe0c5C\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x1B76BFAA063A35c88c7e82066b32eEa91CB266C6\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x728C10dA8A152b71eAB4F8adD6225080323B506E\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0xEC97F162940883ed1feeccd9fb741f11a1F996e2\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"habanero\",\n \"address_hash\": \"0x4AdDb026fbC0a329a75E77f179FFC78c896ac0e6\",\n \"inserted_at\": \"2024-10-24T23:27:16Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"setDefaultRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/internalDev.cjs\n var require_internalDev2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/internalDev.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175188\",\n \"rpcUrl\": \"https://yellowstone-rpc.litprotocol.com\",\n \"chainName\": \"yellowstone\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x8D96F8B16338aB9D12339A508b5a3a39E61F8D74\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x386150020B7AdD47B03D0cf9f4cdaA4451F7c1D4\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x7007C19435F504AF7a60f85862b9E756806aBF5A\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0xd78089bAAe410f5d0eae31D0D56157c73a3Ff98B\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0xBCb7EFc7FDB0b95Ce7C76a3D7faE12217828337D\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x1CaE44eD5e298C420142F5Bfdd5A72a0AFd2C95d\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0xa24EEee69493F5364d7A8de809c3547420616206\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x361Dc112F388c1c0F2a6954b6b2da0461791bB80\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x8087D9fcBC839ff6B493e47FD02A15F4EF460b75\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x9189D2C972373D8769F0e343d994204babb7197C\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0xF473cd925e7A3D6804fB74CE2F484CA8BCa35Bfb\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"internalDev\",\n \"address_hash\": \"0x49A8a438AAFF2D3EfD22993ECfb58923C28155A3\",\n \"inserted_at\": \"2024-10-16T19:13:22Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"setDefaultRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/manzano.cjs\n var require_manzano2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/prod/manzano.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = {\n \"config\": {\n \"chainId\": \"175177\",\n \"rpcUrl\": \"https://lit-protocol.calderachain.xyz/http\",\n \"chainName\": \"lit\",\n \"litNodeDomainName\": \"127.0.0.1\",\n \"litNodePort\": 7470,\n \"rocketPort\": 7470\n },\n \"data\": [\n {\n \"name\": \"StakingBalances\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x82F0a170CEDFAaab623513EE558DB19f5D787C8D\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasNotOwnedBySender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRemoveAliasOfActiveValidator\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"aliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountReached\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OnlyStakingContract\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeGreaterThanMinimumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountStaked\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"StakeMustBeLessThanMaximumStake\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AliasRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaxAliasCountSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MaximumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MinimumStakeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"PermittedStakerRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"permittedStakersOn\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"PermittedStakersOnChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardPaid\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Staked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TokenRewardPerTokenPerEpochSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorNotRewardedBecauseAlias\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorRewarded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorTokensPenalized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrawn\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addPermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"stakers\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"addPermittedStakers\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkStakingAmounts\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedStaker\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maximumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumStake\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"penalizeTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"permittedStakersOn\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"aliasAccount\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAlias\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedStaker\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"restakePenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"rewardValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxAliasCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxAliasCount\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaximumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaximumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumStake\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMinimumStake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"permitted\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setPermittedStakersOn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalStaked\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"recipient\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawPenaltyTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Staking\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xBC7F8d7864002b6629Ab49781D5199C8dD1DDcE1\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"ActiveValidatorsCannotLeave\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotKickBelowCurrentValidatorThreshold\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotRejoinUntilNextEpochBecauseKicked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"CannotReuseCommsKeys\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotStakeZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CannotVoteTwice\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"CannotWithdrawZero\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"CouldNotMapNodeAddressToStakerAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedOrPausedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInActiveOrUnlockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedOrReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInNextValidatorSetLockedState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"state\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"MustBeInReadyForNextEpochState\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"MustBeValidatorInNextEpochToKick\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentTimestamp\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughTimeElapsedSinceLastEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nextReadyValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCountToBeReady\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"NotEnoughValidatorsReadyForNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"currentEpochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receivedEpochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"SignaledReadyForWrongEpochNumber\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakerNotPermitted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"yourBalance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedWithdrawlAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"TryingToWithdrawMoreThanStaked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"validatorsInNextEpoch\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"ValidatorIsNotInNextEpoch\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"ComplaintConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newTokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256[]\",\n \"name\": \"newKeyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMinTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newPeerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMaxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"newRpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ConfigSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochEndTimeSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochLengthSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"EpochTimeoutSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"KickPenaltyPercentSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ReadyForNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Recovered\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToJoin\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RequestToLeave\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ResolverContractAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newDuration\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RewardsDurationUpdated\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newStakingTokenAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"StakingTokenSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"StateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amountBurned\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ValidatorKickedFromNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ValidatorRejoinedNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"reporter\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"VotedToKickValidatorInNextEpoch\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminKickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"staker\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminRejoinValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"adminResetEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amountToPenalize\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"adminSlashValidator\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"advanceEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"exit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getReward\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"kickValidatorInNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"lockValidatorsForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"requestToJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeave\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"requestToLeaveAsNode\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"config\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setComplaintConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"newConfig\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setConfig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochEndTime\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochEndTime\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochLength\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochLength\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"newState\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"setEpochState\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newEpochTimeout\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setEpochTimeout\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setIpPortNodeAddressAndCommunicationPubKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"newKickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setKickPenaltyPercent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"signalReadyForNextEpoch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stake\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"stakeAndJoin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"VersionRequirementsUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"checkVersion\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMaxVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersion\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getMinVersionString\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMaxVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"major\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minor\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"patch\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Version\",\n \"name\": \"version\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setMinVersion\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"complaintConfig\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"intervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"kickPenaltyPercent\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.ComplaintConfig\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"config\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenRewardPerTokenPerEpoch\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintTolerance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"DEPRECATED_complaintIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"keyTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minimumValidatorCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxConcurrentRequests\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"minTripleCount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"peerCheckingIntervalSecs\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxTripleConcurrency\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"rpcHealthcheckEnabled\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Config\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfCurrentValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"countOfNextValidatorsReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"epoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidatorStructsAndCounts\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochLength\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"number\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"endTime\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"retries\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timeout\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Epoch\",\n \"name\": \"\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getActiveUnkickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKeyTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getKickedValidators\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getNodeStakerAddressMappings\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.AddressMapping[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingBalancesAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getTokenAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInCurrentEpochLength\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsInNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"addresses\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getValidatorsStructs\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInCurrentEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getValidatorsStructsInNextEpoch\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"epochNumber\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"validatorStakerAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"voterStakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotingStatusToKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isActiveValidatorByNodeAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isReadyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"reason\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"kickPenaltyPercentByReason\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"nextValidatorCountForConsensus\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nodeAddressToStakerAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"readyForNextEpoch\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"shouldKickValidator\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"state\",\n \"outputs\": [\n {\n \"internalType\": \"enum LibStakingStorage.States\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakerAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"validators\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"ip\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint128\",\n \"name\": \"ipv6\",\n \"type\": \"uint128\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"port\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"nodeAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"reward\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"senderPubKey\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"receiverPubKey\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibStakingStorage.Validator\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Multisender\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xBd119B72B52d58A7dDd771A2E4984d106Da0D1DB\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"sendEth\",\n \"outputs\": [],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"_recipients\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"sendTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"withdrawTokens\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"LITToken\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x53695556f8a1a064EdFf91767f15652BbfaFaD04\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"cap\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"InvalidShortString\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"str\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"StringTooLong\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"fromDelegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"toDelegate\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"DelegateChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"delegate\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"previousBalance\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newBalance\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"DelegateVotesChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [],\n \"name\": \"EIP712DomainChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Paused\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"Unpaused\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CLOCK_MODE\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"DOMAIN_SEPARATOR\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"MINTER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"PAUSER_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burnFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"cap\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint32\",\n \"name\": \"pos\",\n \"type\": \"uint32\"\n }\n ],\n \"name\": \"checkpoints\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"fromBlock\",\n \"type\": \"uint32\"\n },\n {\n \"internalType\": \"uint224\",\n \"name\": \"votes\",\n \"type\": \"uint224\"\n }\n ],\n \"internalType\": \"struct ERC20Votes.Checkpoint\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"clock\",\n \"outputs\": [\n {\n \"internalType\": \"uint48\",\n \"name\": \"\",\n \"type\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"subtractedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"decreaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegate\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"delegatee\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"nonce\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiry\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"delegateBySig\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegates\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"eip712Domain\",\n \"outputs\": [\n {\n \"internalType\": \"bytes1\",\n \"name\": \"fields\",\n \"type\": \"bytes1\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"version\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"chainId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"verifyingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"salt\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"extensions\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastTotalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"timepoint\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPastVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getVotes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"addedValue\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"increaseAllowance\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_recipient\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"nonces\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"numCheckpoints\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"pause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"paused\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"deadline\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"permit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"unpause\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PubkeyRouter\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xF6b0fE0d0C27C855f7f2e021fAd028af02cC52cb\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"PubkeyRoutingDataSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IPubkeyRouter.RootKey\",\n \"name\": \"rootKey\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RootKeySet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"adminResetRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"signedMessage\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"checkNodeSignatures\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deriveEthAddressFromPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ethAddressToPkpId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getDerivedPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRootKeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getRoutingData\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isRouted\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"pubkeys\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"internalType\": \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingData\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContract\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRoutingDataAsAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"stakingContractAddress\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.RootKey[]\",\n \"name\": \"newRootKeys\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"voteForRootKeys\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFT\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x3c3ad2d238757Ea4AF87A8624c716B11455c1F9A\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"MintCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"pubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PKPMinted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"claimAndMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"exists\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getNextDerivedKeyId\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftMetadataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getStakingAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"mintCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"mintGrantAndBurnNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mintNext\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"redeemedFreeMintIds\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMintCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMintCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"RateLimitNFT\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x9b1B8aD8A4144Be9F8Fb5C4766eE37CE0754AEAb\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"AdditionalRequestsPerKilosecondCostSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"approved\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"ApprovalForAll\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"FreeMintSignerSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"FreeRequestsPerRateLimitWindowSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint8\",\n \"name\": \"version\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"Initialized\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RLIHolderRateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"RateLimitWindowSecondsSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"amount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Withdrew\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getApproved\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"initialize\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isApprovedForAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ownerOf\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"data\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"safeTransferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newAdditionalRequestsPerKilosecondCost\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setAdditionalRequestsPerKilosecondCost\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"operator\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"approved\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setApprovalForAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newFreeMintSigner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setFreeMintSigner\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newFreeRequestsPerRateLimitWindow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setFreeRequestsPerRateLimitWindow\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxExpirationSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxExpirationSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newMaxRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setMaxRequestsPerKilosecond\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRLIHolderRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRLIHolderRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"newRateLimitWindowSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"setRateLimitWindowSeconds\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"index\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenOfOwnerByIndex\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"RLIHolderRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"additionalRequestsPerKilosecondCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateCost\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"payingAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"calculateRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"capacity\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibRateLimitNFTStorage.RateLimit\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestedRequestsPerKilosecond\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"checkBelowMaxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"currentSoldRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"defaultRateLimitWindowSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerKilosecond\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"sVal\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"freeMintSigTest\",\n \"outputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeMintSigner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"freeRequestsPerRateLimitWindow\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isExpired\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxExpirationSeconds\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"maxRequestsPerKilosecond\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"hash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"prefixed\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"msgHash\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"redeemedFreeMints\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenIdCounter\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"tokenSVG\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"expiresAt\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"totalSoldRequestsPerKilosecondByExpirationTime\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPHelper\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x24d646b9510e56af8B15de759331d897C4d66044\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"previousAdminRole\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"newAdminRole\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RoleAdminChanged\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleGranted\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RoleRevoked\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"DEFAULT_ADMIN_ROLE\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"derivedKeyId\",\n \"type\": \"bytes32\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"r\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"s\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"uint8\",\n \"name\": \"v\",\n \"type\": \"uint8\"\n }\n ],\n \"internalType\": \"struct IPubkeyRouter.Signature[]\",\n \"name\": \"signatures\",\n \"type\": \"tuple[]\"\n }\n ],\n \"internalType\": \"struct LibPKPNFTStorage.ClaimMaterial\",\n \"name\": \"claimMaterial\",\n \"type\": \"tuple\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"internalType\": \"struct PKPHelper.AuthMethodData\",\n \"name\": \"authMethodData\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getDomainWalletRegistry\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPKPNftMetdataAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpPermissionsAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"getRoleAdmin\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"grantRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"hasRole\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethods\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedIpfsCIDs\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedIpfsCIDScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"permittedAddresses\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAddressScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddAuthMethodsWithTypes\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"keyType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypes\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIds\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeys\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopes\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"addPkpEthAddressAsPermittedAddress\",\n \"type\": \"bool\"\n },\n {\n \"internalType\": \"bool\",\n \"name\": \"sendPkpToItself\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"mintNextAndAddDomainWalletMetadata\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"onERC721Received\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"\",\n \"type\": \"bytes4\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"renounceRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"role\",\n \"type\": \"bytes32\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeRole\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string[]\",\n \"name\": \"nftMetadata\",\n \"type\": \"string[]\"\n }\n ],\n \"name\": \"setPkpMetadata\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPPermissions\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x974856dB1C4259915b709E6BcA26A002fbdd31ea\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"CallerNotOwner\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ContractResolverAddressSet\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"PermittedAuthMethodRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"PermittedAuthMethodScopeRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"RootHashUpdated\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod\",\n \"name\": \"authMethod\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"scopes\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"addPermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addPermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToAdd\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodPubkeysToAdd\",\n \"type\": \"bytes[]\"\n },\n {\n \"internalType\": \"uint256[][]\",\n \"name\": \"permittedAuthMethodScopesToAdd\",\n \"type\": \"uint256[][]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"permittedAuthMethodTypesToRemove\",\n \"type\": \"uint256[]\"\n },\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"permittedAuthMethodIdsToRemove\",\n \"type\": \"bytes[]\"\n }\n ],\n \"name\": \"batchAddRemoveAuthMethods\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getAuthMethodId\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getEthAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedActions\",\n \"outputs\": [\n {\n \"internalType\": \"bytes[]\",\n \"name\": \"\",\n \"type\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"maxScopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethodScopes\",\n \"outputs\": [\n {\n \"internalType\": \"bool[]\",\n \"name\": \"\",\n \"type\": \"bool[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPermittedAuthMethods\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"userPubkey\",\n \"type\": \"bytes\"\n }\n ],\n \"internalType\": \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getPkpNftAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"getPubkey\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getRouterAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getTokenIdsForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"getUserPubkeyForAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAction\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"isPermittedAddress\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"isPermittedAuthMethod\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"isPermittedAuthMethodScopePresent\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"ipfsCID\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removePermittedAddress\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"removePermittedAuthMethod\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"authMethodType\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"id\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"scopeId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removePermittedAuthMethodScope\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newResolverAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"setContractResolver\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"root\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setRootHash\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bytes32\",\n \"name\": \"leaf\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"verifyState\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"group\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"proof\",\n \"type\": \"bytes32[]\"\n },\n {\n \"internalType\": \"bool[]\",\n \"name\": \"proofFlags\",\n \"type\": \"bool[]\"\n },\n {\n \"internalType\": \"bytes32[]\",\n \"name\": \"leaves\",\n \"type\": \"bytes32[]\"\n }\n ],\n \"name\": \"verifyStates\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PKPNFTMetadata\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xa87fe043AD341A1Dc8c5E48d75BA9f712256fe7e\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_resolver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"_env\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"buffer\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"bytesToHex\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"contractResolver\",\n \"outputs\": [\n {\n \"internalType\": \"contract ContractResolver\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"env\",\n \"outputs\": [\n {\n \"internalType\": \"enum ContractResolver.Env\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeProfileForPkp\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"imgUrl\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setProfileForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"url\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"setUrlForPKP\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"tokenId\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"pubKey\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"ethAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"tokenURI\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"PaymentDelegation\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0x180BA6Ec983019c578004D91c08897c12d78F516\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotAddFunctionToDiamondThatAlreadyExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotAddSelectorsToZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveFunctionThatDoesNotExist\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotRemoveImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionThatDoesNotExists\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_selectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"name\": \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_selector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"CannotReplaceImmutableFunction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"_action\",\n \"type\": \"uint8\"\n }\n ],\n \"name\": \"IncorrectFacetCutAction\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_initializationContractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"InitializationFunctionReverted\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_contractAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_message\",\n \"type\": \"string\"\n }\n ],\n \"name\": \"NoBytecodeAtAddress\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NoSelectorsProvidedForFacetForCut\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_user\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_contractOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"NotContractOwner\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facetAddress\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"RemoveFacetAddressMustBeZeroAddress\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"DiamondCut\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"enum IDiamond.FacetCutAction\",\n \"name\": \"action\",\n \"type\": \"uint8\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamond.FacetCut[]\",\n \"name\": \"_diamondCut\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"_init\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"_calldata\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"diamondCut\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_functionSelector\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"facetAddress\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facetAddresses\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"facetAddresses_\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_facet\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"facetFunctionSelectors\",\n \"outputs\": [\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"_facetFunctionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"facets\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"facetAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes4[]\",\n \"name\": \"functionSelectors\",\n \"type\": \"bytes4[]\"\n }\n ],\n \"internalType\": \"struct IDiamondLoupe.Facet[]\",\n \"name\": \"facets_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes4\",\n \"name\": \"_interfaceId\",\n \"type\": \"bytes4\"\n }\n ],\n \"name\": \"supportsInterface\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"indexed\": false,\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"restriction\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"RestrictionSet\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"delegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"delegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPayers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"getPayersAndRestrictions\",\n \"outputs\": [\n {\n \"internalType\": \"address[][]\",\n \"name\": \"\",\n \"type\": \"address[][]\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction[][]\",\n \"name\": \"\",\n \"type\": \"tuple[][]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getRestriction\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"\",\n \"type\": \"tuple\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"payer\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getUsers\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"setDefaultRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"requestsPerPeriod\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"periodSeconds\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct LibPaymentDelegationStorage.Restriction\",\n \"name\": \"r\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"setRestriction\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"user\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"undelegatePayments\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"users\",\n \"type\": \"address[]\"\n }\n ],\n \"name\": \"undelegatePaymentsBatch\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Allowlist\",\n \"contracts\": [\n {\n \"network\": \"manzano\",\n \"address_hash\": \"0xC52b72E2AD3dC58B7d23197575fb48A4523fa734\",\n \"inserted_at\": \"2024-09-24T21:52:38Z\",\n \"ABI\": [\n {\n \"inputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminAdded\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"AdminRemoved\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"ItemNotAllowed\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"previousOwner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"OwnershipTransferred\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"addAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"allowAll\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"allowedItems\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"isAllowed\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"owner\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newAdmin\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"removeAdmin\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"renounceOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"_allowAll\",\n \"type\": \"bool\"\n }\n ],\n \"name\": \"setAllowAll\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"key\",\n \"type\": \"bytes32\"\n }\n ],\n \"name\": \"setNotAllowed\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"newOwner\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"transferOwnership\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ]\n }\n ]\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/index.cjs\n var require_dist = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts@0.0.74_typescript@5.8.3/node_modules/@lit-protocol/contracts/dist/index.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var _datil = require_datil();\n var _datilDev = require_datil_dev();\n var _datilTest = require_datil_test();\n var _cayenne = require_cayenne();\n var _habanero = require_habanero();\n var _internalDev = require_internalDev();\n var _manzano = require_manzano();\n var datil = require_datil2();\n var cayenne = require_cayenne2();\n var datilDev = require_datil_dev2();\n var datilTest = require_datil_test2();\n var habanero = require_habanero2();\n var internalDev = require_internalDev2();\n var manzano = require_manzano2();\n module.exports = {\n _datil,\n _datilDev,\n _datilTest,\n _cayenne,\n _habanero,\n _internalDev,\n _manzano,\n datil,\n cayenne,\n datilDev,\n datilTest,\n habanero,\n internalDev,\n manzano\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/constants/mappers.js\n var require_mappers = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/constants/mappers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.GLOBAL_OVERWRITE_IPFS_CODE_BY_NETWORK = exports3.NETWORK_CONTEXT_BY_NETWORK = void 0;\n var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));\n var depd_1 = tslib_1.__importDefault(require_browser());\n var contracts_1 = require_dist();\n var deprecated = (0, depd_1.default)(\"lit-js-sdk:constants:mappers\");\n exports3.NETWORK_CONTEXT_BY_NETWORK = {\n \"datil-dev\": contracts_1.datilDev,\n \"datil-test\": contracts_1.datilTest,\n datil: contracts_1.datil,\n // just use datil dev abis for custom\n custom: contracts_1.datilDev\n };\n exports3.GLOBAL_OVERWRITE_IPFS_CODE_BY_NETWORK = {\n \"datil-dev\": false,\n \"datil-test\": false,\n datil: false,\n custom: false\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/constants/endpoints.js\n var require_endpoints = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/constants/endpoints.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LIT_ENDPOINT = exports3.LIT_ENDPOINT_VERSION = void 0;\n exports3.LIT_ENDPOINT_VERSION = {\n V0: \"/\",\n V1: \"/v1\"\n };\n exports3.LIT_ENDPOINT = {\n HANDSHAKE: {\n path: \"/web/handshake\",\n version: exports3.LIT_ENDPOINT_VERSION.V0\n },\n SIGN_SESSION_KEY: {\n path: \"/web/sign_session_key\",\n version: exports3.LIT_ENDPOINT_VERSION.V1\n },\n EXECUTE_JS: {\n path: \"/web/execute\",\n version: exports3.LIT_ENDPOINT_VERSION.V1\n },\n PKP_SIGN: {\n path: \"/web/pkp/sign\",\n version: exports3.LIT_ENDPOINT_VERSION.V1\n },\n PKP_CLAIM: {\n path: \"/web/pkp/claim\",\n version: exports3.LIT_ENDPOINT_VERSION.V0\n },\n SIGN_ACCS: {\n path: \"/web/signing/access_control_condition\",\n version: exports3.LIT_ENDPOINT_VERSION.V0\n },\n ENCRYPTION_SIGN: {\n path: \"/web/encryption/sign\",\n version: exports3.LIT_ENDPOINT_VERSION.V0\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/interfaces/i-errors.js\n var require_i_errors = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/interfaces/i-errors.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n }\n });\n\n // ../../../node_modules/.pnpm/assertion-error@1.1.0/node_modules/assertion-error/index.js\n var require_assertion_error = __commonJS({\n \"../../../node_modules/.pnpm/assertion-error@1.1.0/node_modules/assertion-error/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n function exclude() {\n var excludes = [].slice.call(arguments);\n function excludeProps(res, obj) {\n Object.keys(obj).forEach(function(key) {\n if (!~excludes.indexOf(key))\n res[key] = obj[key];\n });\n }\n return function extendExclude() {\n var args = [].slice.call(arguments), i3 = 0, res = {};\n for (; i3 < args.length; i3++) {\n excludeProps(res, args[i3]);\n }\n return res;\n };\n }\n module.exports = AssertionError;\n function AssertionError(message2, _props, ssf) {\n var extend = exclude(\"name\", \"message\", \"stack\", \"constructor\", \"toJSON\"), props = extend(_props || {});\n this.message = message2 || \"Unspecified AssertionError\";\n this.showDiff = false;\n for (var key in props) {\n this[key] = props[key];\n }\n ssf = ssf || AssertionError;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, ssf);\n } else {\n try {\n throw new Error();\n } catch (e2) {\n this.stack = e2.stack;\n }\n }\n }\n AssertionError.prototype = Object.create(Error.prototype);\n AssertionError.prototype.name = \"AssertionError\";\n AssertionError.prototype.constructor = AssertionError;\n AssertionError.prototype.toJSON = function(stack) {\n var extend = exclude(\"constructor\", \"toJSON\", \"stack\"), props = extend({ name: this.name }, this);\n if (false !== stack && this.stack) {\n props.stack = this.stack;\n }\n return props;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/sprintf-js@1.1.3/node_modules/sprintf-js/src/sprintf.js\n var require_sprintf = __commonJS({\n \"../../../node_modules/.pnpm/sprintf-js@1.1.3/node_modules/sprintf-js/src/sprintf.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n !function() {\n \"use strict\";\n var re = {\n not_string: /[^s]/,\n not_bool: /[^t]/,\n not_type: /[^T]/,\n not_primitive: /[^v]/,\n number: /[diefg]/,\n numeric_arg: /[bcdiefguxX]/,\n json: /[j]/,\n not_json: /[^j]/,\n text: /^[^\\x25]+/,\n modulo: /^\\x25{2}/,\n placeholder: /^\\x25(?:([1-9]\\d*)\\$|\\(([^)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,\n key: /^([a-z_][a-z_\\d]*)/i,\n key_access: /^\\.([a-z_][a-z_\\d]*)/i,\n index_access: /^\\[(\\d+)\\]/,\n sign: /^[+-]/\n };\n function sprintf(key) {\n return sprintf_format(sprintf_parse(key), arguments);\n }\n function vsprintf(fmt, argv2) {\n return sprintf.apply(null, [fmt].concat(argv2 || []));\n }\n function sprintf_format(parse_tree, argv2) {\n var cursor = 1, tree_length = parse_tree.length, arg, output = \"\", i3, k4, ph, pad6, pad_character, pad_length, is_positive, sign4;\n for (i3 = 0; i3 < tree_length; i3++) {\n if (typeof parse_tree[i3] === \"string\") {\n output += parse_tree[i3];\n } else if (typeof parse_tree[i3] === \"object\") {\n ph = parse_tree[i3];\n if (ph.keys) {\n arg = argv2[cursor];\n for (k4 = 0; k4 < ph.keys.length; k4++) {\n if (arg == void 0) {\n throw new Error(sprintf('[sprintf] Cannot access property \"%s\" of undefined value \"%s\"', ph.keys[k4], ph.keys[k4 - 1]));\n }\n arg = arg[ph.keys[k4]];\n }\n } else if (ph.param_no) {\n arg = argv2[ph.param_no];\n } else {\n arg = argv2[cursor++];\n }\n if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {\n arg = arg();\n }\n if (re.numeric_arg.test(ph.type) && (typeof arg !== \"number\" && isNaN(arg))) {\n throw new TypeError(sprintf(\"[sprintf] expecting number but found %T\", arg));\n }\n if (re.number.test(ph.type)) {\n is_positive = arg >= 0;\n }\n switch (ph.type) {\n case \"b\":\n arg = parseInt(arg, 10).toString(2);\n break;\n case \"c\":\n arg = String.fromCharCode(parseInt(arg, 10));\n break;\n case \"d\":\n case \"i\":\n arg = parseInt(arg, 10);\n break;\n case \"j\":\n arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0);\n break;\n case \"e\":\n arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential();\n break;\n case \"f\":\n arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg);\n break;\n case \"g\":\n arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg);\n break;\n case \"o\":\n arg = (parseInt(arg, 10) >>> 0).toString(8);\n break;\n case \"s\":\n arg = String(arg);\n arg = ph.precision ? arg.substring(0, ph.precision) : arg;\n break;\n case \"t\":\n arg = String(!!arg);\n arg = ph.precision ? arg.substring(0, ph.precision) : arg;\n break;\n case \"T\":\n arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase();\n arg = ph.precision ? arg.substring(0, ph.precision) : arg;\n break;\n case \"u\":\n arg = parseInt(arg, 10) >>> 0;\n break;\n case \"v\":\n arg = arg.valueOf();\n arg = ph.precision ? arg.substring(0, ph.precision) : arg;\n break;\n case \"x\":\n arg = (parseInt(arg, 10) >>> 0).toString(16);\n break;\n case \"X\":\n arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase();\n break;\n }\n if (re.json.test(ph.type)) {\n output += arg;\n } else {\n if (re.number.test(ph.type) && (!is_positive || ph.sign)) {\n sign4 = is_positive ? \"+\" : \"-\";\n arg = arg.toString().replace(re.sign, \"\");\n } else {\n sign4 = \"\";\n }\n pad_character = ph.pad_char ? ph.pad_char === \"0\" ? \"0\" : ph.pad_char.charAt(1) : \" \";\n pad_length = ph.width - (sign4 + arg).length;\n pad6 = ph.width ? pad_length > 0 ? pad_character.repeat(pad_length) : \"\" : \"\";\n output += ph.align ? sign4 + arg + pad6 : pad_character === \"0\" ? sign4 + pad6 + arg : pad6 + sign4 + arg;\n }\n }\n }\n return output;\n }\n var sprintf_cache = /* @__PURE__ */ Object.create(null);\n function sprintf_parse(fmt) {\n if (sprintf_cache[fmt]) {\n return sprintf_cache[fmt];\n }\n var _fmt = fmt, match, parse_tree = [], arg_names = 0;\n while (_fmt) {\n if ((match = re.text.exec(_fmt)) !== null) {\n parse_tree.push(match[0]);\n } else if ((match = re.modulo.exec(_fmt)) !== null) {\n parse_tree.push(\"%\");\n } else if ((match = re.placeholder.exec(_fmt)) !== null) {\n if (match[2]) {\n arg_names |= 1;\n var field_list = [], replacement_field = match[2], field_match = [];\n if ((field_match = re.key.exec(replacement_field)) !== null) {\n field_list.push(field_match[1]);\n while ((replacement_field = replacement_field.substring(field_match[0].length)) !== \"\") {\n if ((field_match = re.key_access.exec(replacement_field)) !== null) {\n field_list.push(field_match[1]);\n } else if ((field_match = re.index_access.exec(replacement_field)) !== null) {\n field_list.push(field_match[1]);\n } else {\n throw new SyntaxError(\"[sprintf] failed to parse named argument key\");\n }\n }\n } else {\n throw new SyntaxError(\"[sprintf] failed to parse named argument key\");\n }\n match[2] = field_list;\n } else {\n arg_names |= 2;\n }\n if (arg_names === 3) {\n throw new Error(\"[sprintf] mixing positional and named placeholders is not (yet) supported\");\n }\n parse_tree.push(\n {\n placeholder: match[0],\n param_no: match[1],\n keys: match[2],\n sign: match[3],\n pad_char: match[4],\n align: match[5],\n width: match[6],\n precision: match[7],\n type: match[8]\n }\n );\n } else {\n throw new SyntaxError(\"[sprintf] unexpected placeholder\");\n }\n _fmt = _fmt.substring(match[0].length);\n }\n return sprintf_cache[fmt] = parse_tree;\n }\n if (typeof exports3 !== \"undefined\") {\n exports3[\"sprintf\"] = sprintf;\n exports3[\"vsprintf\"] = vsprintf;\n }\n if (typeof window !== \"undefined\") {\n window[\"sprintf\"] = sprintf;\n window[\"vsprintf\"] = vsprintf;\n if (typeof define === \"function\" && define[\"amd\"]) {\n define(function() {\n return {\n \"sprintf\": sprintf,\n \"vsprintf\": vsprintf\n };\n });\n }\n }\n }();\n }\n });\n\n // ../../../node_modules/.pnpm/@openagenda+verror@3.1.4/node_modules/@openagenda/verror/dist/index.js\n var require_dist2 = __commonJS({\n \"../../../node_modules/.pnpm/@openagenda+verror@3.1.4/node_modules/@openagenda/verror/dist/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __create2 = Object.create;\n var __defProp2 = Object.defineProperty;\n var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames2 = Object.getOwnPropertyNames;\n var __getProtoOf2 = Object.getPrototypeOf;\n var __hasOwnProp2 = Object.prototype.hasOwnProperty;\n var __export2 = (target, all) => {\n for (var name in all)\n __defProp2(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps2 = (to, from14, except, desc) => {\n if (from14 && typeof from14 === \"object\" || typeof from14 === \"function\") {\n for (let key of __getOwnPropNames2(from14))\n if (!__hasOwnProp2.call(to, key) && key !== except)\n __defProp2(to, key, { get: () => from14[key], enumerable: !(desc = __getOwnPropDesc2(from14, key)) || desc.enumerable });\n }\n return to;\n };\n var __toESM2 = (mod3, isNodeMode, target) => (target = mod3 != null ? __create2(__getProtoOf2(mod3)) : {}, __copyProps2(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod3 || !mod3.__esModule ? __defProp2(target, \"default\", { value: mod3, enumerable: true }) : target,\n mod3\n ));\n var __toCommonJS2 = (mod3) => __copyProps2(__defProp2({}, \"__esModule\", { value: true }), mod3);\n var src_exports2 = {};\n __export2(src_exports2, {\n BadGateway: () => BadGateway,\n BadRequest: () => BadRequest,\n Conflict: () => Conflict,\n Forbidden: () => Forbidden,\n GeneralError: () => GeneralError,\n Gone: () => Gone,\n LengthRequired: () => LengthRequired,\n MethodNotAllowed: () => MethodNotAllowed,\n NotAcceptable: () => NotAcceptable,\n NotAuthenticated: () => NotAuthenticated,\n NotFound: () => NotFound,\n NotImplemented: () => NotImplemented,\n PaymentError: () => PaymentError,\n Timeout: () => Timeout,\n TooManyRequests: () => TooManyRequests,\n Unavailable: () => Unavailable,\n Unprocessable: () => Unprocessable,\n VError: () => verror_default,\n default: () => src_default\n });\n module.exports = __toCommonJS2(src_exports2);\n var import_inherits = __toESM2(require_inherits_browser());\n var import_assertion_error2 = __toESM2(require_assertion_error());\n function isError(arg) {\n return Object.prototype.toString.call(arg) === \"[object Error]\" || arg instanceof Error;\n }\n function isObject2(arg) {\n return typeof arg === \"object\" && arg !== null;\n }\n function isString(arg) {\n return typeof arg === \"string\";\n }\n function isFunc(arg) {\n return typeof arg === \"function\";\n }\n var import_sprintf_js = require_sprintf();\n var import_assertion_error = __toESM2(require_assertion_error());\n function parseConstructorArguments(...argv2) {\n let options;\n let sprintfArgs;\n if (argv2.length === 0) {\n options = {};\n sprintfArgs = [];\n } else if (isError(argv2[0])) {\n options = { cause: argv2[0] };\n sprintfArgs = argv2.slice(1);\n } else if (typeof argv2[0] === \"object\") {\n options = {};\n for (const k4 in argv2[0]) {\n if (Object.prototype.hasOwnProperty.call(argv2[0], k4)) {\n options[k4] = argv2[0][k4];\n }\n }\n sprintfArgs = argv2.slice(1);\n } else {\n if (!isString(argv2[0])) {\n throw new import_assertion_error.default(\n \"first argument to VError, or WError constructor must be a string, object, or Error\"\n );\n }\n options = {};\n sprintfArgs = argv2;\n }\n if (!isObject2(options))\n throw new import_assertion_error.default(\"options (object) is required\");\n if (options.meta && !isObject2(options.meta))\n throw new import_assertion_error.default(\"options.meta must be an object\");\n return {\n options,\n shortMessage: sprintfArgs.length === 0 ? \"\" : import_sprintf_js.sprintf.apply(null, sprintfArgs)\n };\n }\n function defineProperty(target, descriptor) {\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n function defineProperties(target, props) {\n for (let i3 = 0; i3 < props.length; i3++) {\n defineProperty(target, props[i3]);\n }\n }\n var META = \"@@verror/meta\";\n var reserved = [\n \"name\",\n \"message\",\n \"shortMessage\",\n \"cause\",\n \"info\",\n \"stack\",\n \"fileName\",\n \"lineNumber\"\n ];\n function mergeMeta(instance, meta2) {\n if (!meta2) {\n return;\n }\n for (const k4 in meta2) {\n if (Object.prototype.hasOwnProperty.call(meta2, k4)) {\n if (reserved.includes(k4)) {\n throw new import_assertion_error2.default(`\"${k4}\" is a reserved meta`);\n }\n instance[META][k4] = meta2[k4];\n instance[k4] = meta2[k4];\n }\n }\n }\n function VError(...args) {\n if (!(this instanceof VError)) {\n return new VError(...args);\n }\n const { options, shortMessage } = parseConstructorArguments(...args);\n const { cause: cause2, constructorOpt, info: info2, name, skipCauseMessage, meta: meta2 } = options;\n let message2 = shortMessage;\n if (cause2) {\n if (!isError(cause2))\n throw new import_assertion_error2.default(\"cause is not an Error\");\n if (!skipCauseMessage && cause2.message) {\n message2 = message2 === \"\" ? cause2.message : `${message2}: ${cause2.message}`;\n }\n }\n Error.call(this, message2);\n if (name) {\n if (!isString(name))\n throw new import_assertion_error2.default(`error's \"name\" must be a string`);\n this.name = name;\n }\n this.message = message2;\n this.shortMessage = shortMessage;\n if (cause2) {\n this.cause = cause2;\n }\n this.info = {};\n if (info2) {\n for (const k4 in info2) {\n if (Object.prototype.hasOwnProperty.call(info2, k4)) {\n this.info[k4] = info2[k4];\n }\n }\n }\n defineProperty(this, {\n key: META,\n value: {}\n });\n mergeMeta(this, VError.meta(this));\n mergeMeta(this, meta2);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, constructorOpt || this.constructor);\n } else {\n this.stack = new Error().stack;\n }\n }\n (0, import_inherits.default)(VError, Error);\n defineProperties(VError.prototype, [\n {\n key: \"toString\",\n value: function toString2() {\n let str = Object.prototype.hasOwnProperty.call(this, \"name\") && this.name || this.constructor.name || this.constructor.prototype.name;\n if (this.message) {\n str += `: ${this.message}`;\n }\n return str;\n }\n },\n {\n key: \"toJSON\",\n value: function toJSON() {\n const obj = {\n name: this.name,\n message: this.message,\n shortMessage: this.shortMessage,\n cause: this.cause,\n info: this.info\n };\n for (const key in this[META]) {\n if (Object.prototype.hasOwnProperty.call(this[META], key) && !(key in obj)) {\n obj[key] = this[META][key];\n }\n }\n return obj;\n }\n }\n ]);\n defineProperties(VError, [\n {\n key: \"cause\",\n value: function cause(err) {\n if (!isError(err))\n throw new import_assertion_error2.default(\"err must be an Error\");\n return isError(err.cause) ? err.cause : null;\n }\n },\n {\n key: \"info\",\n value: function info(err) {\n if (!isError(err))\n throw new import_assertion_error2.default(\"err must be an Error\");\n const cause2 = VError.cause(err);\n const rv = cause2 !== null ? VError.info(cause2) : {};\n if (isObject2(err.info)) {\n for (const k4 in err.info) {\n if (Object.prototype.hasOwnProperty.call(err.info, k4)) {\n rv[k4] = err.info[k4];\n }\n }\n }\n return rv;\n }\n },\n {\n key: \"meta\",\n value: function meta(err) {\n if (!isError(err))\n throw new import_assertion_error2.default(\"err must be an Error\");\n const cause2 = VError.cause(err);\n const rv = cause2 !== null ? VError.meta(cause2) : {};\n if (isObject2(err[META])) {\n for (const k4 in err[META]) {\n if (Object.prototype.hasOwnProperty.call(err[META], k4)) {\n rv[k4] = err[META][k4];\n }\n }\n }\n return rv;\n }\n },\n {\n key: \"findCauseByName\",\n value: function findCauseByName(err, name) {\n if (!isError(err))\n throw new import_assertion_error2.default(\"err must be an Error\");\n if (!isString(name))\n throw new import_assertion_error2.default(\"name (string) is required\");\n if (name.length <= 0)\n throw new import_assertion_error2.default(\"name cannot be empty\");\n for (let cause2 = err; cause2 !== null; cause2 = VError.cause(cause2)) {\n if (!isError(err))\n throw new import_assertion_error2.default(\"cause must be an Error\");\n if (cause2.name === name) {\n return cause2;\n }\n }\n return null;\n }\n },\n {\n key: \"findCauseByType\",\n value: function findCauseByType(err, type) {\n if (!isError(err))\n throw new import_assertion_error2.default(\"err must be an Error\");\n if (!isFunc(type))\n throw new import_assertion_error2.default(\"type (func) is required\");\n for (let cause2 = err; cause2 !== null; cause2 = VError.cause(cause2)) {\n if (!isError(err))\n throw new import_assertion_error2.default(\"cause must be an Error\");\n if (cause2 instanceof type) {\n return cause2;\n }\n }\n return null;\n }\n },\n {\n key: \"hasCauseWithName\",\n value: function hasCauseWithName(err, name) {\n return VError.findCauseByName(err, name) !== null;\n }\n },\n {\n key: \"hasCauseWithType\",\n value: function hasCauseWithType(err, type) {\n return VError.findCauseByType(err, type) !== null;\n }\n },\n {\n key: \"fullStack\",\n value: function fullStack(err) {\n if (!isError(err))\n throw new import_assertion_error2.default(\"err must be an Error\");\n const cause2 = VError.cause(err);\n if (cause2) {\n return `${err.stack}\ncaused by: ${VError.fullStack(cause2)}`;\n }\n return err.stack;\n }\n },\n {\n key: \"errorFromList\",\n value: function errorFromList(errors) {\n if (!Array.isArray(errors)) {\n throw new import_assertion_error2.default(\"list of errors (array) is required\");\n }\n errors.forEach(function(error) {\n if (!isObject2(error)) {\n throw new import_assertion_error2.default(\"errors ([object]) is required\");\n }\n });\n if (errors.length === 0) {\n return null;\n }\n errors.forEach((e2) => {\n if (!isError(e2))\n throw new import_assertion_error2.default(\"error must be an Error\");\n });\n if (errors.length === 1) {\n return errors[0];\n }\n return new MultiError(errors);\n }\n },\n {\n key: \"errorForEach\",\n value: function errorForEach(err, func) {\n if (!isError(err))\n throw new import_assertion_error2.default(\"err must be an Error\");\n if (!isFunc(func))\n throw new import_assertion_error2.default(\"func (func) is required\");\n if (err instanceof MultiError) {\n err.errors.forEach((e2) => {\n func(e2);\n });\n } else {\n func(err);\n }\n }\n }\n ]);\n VError.prototype.name = \"VError\";\n function MultiError(errors) {\n if (!(this instanceof MultiError)) {\n return new MultiError(errors);\n }\n if (!Array.isArray(errors)) {\n throw new import_assertion_error2.default(\"list of errors (array) is required\");\n }\n if (errors.length <= 0) {\n throw new import_assertion_error2.default(\"must be at least one error is required\");\n }\n VError.call(\n this,\n {\n cause: errors[0],\n meta: {\n errors: [...errors]\n }\n },\n \"first of %d error%s\",\n errors.length,\n errors.length === 1 ? \"\" : \"s\"\n );\n }\n (0, import_inherits.default)(MultiError, VError);\n MultiError.prototype.name = \"MultiError\";\n function WError(...args) {\n if (!(this instanceof WError)) {\n return new WError(...args);\n }\n const { options, shortMessage } = parseConstructorArguments(...args);\n options.skipCauseMessage = true;\n VError.call(\n this,\n options,\n \"%s\",\n shortMessage\n );\n }\n (0, import_inherits.default)(WError, VError);\n defineProperties(WError.prototype, [\n {\n key: \"toString\",\n value: function toString2() {\n let str = Object.prototype.hasOwnProperty.call(this, \"name\") && this.name || this.constructor.name || this.constructor.prototype.name;\n if (this.message) {\n str += `: ${this.message}`;\n }\n if (this.cause && this.cause.message) {\n str += `; caused by ${this.cause.toString()}`;\n }\n return str;\n }\n }\n ]);\n WError.prototype.name = \"WError\";\n VError.VError = VError;\n VError.WError = WError;\n VError.MultiError = MultiError;\n VError.META = META;\n var verror_default = VError;\n var http_exports = {};\n __export2(http_exports, {\n BadGateway: () => BadGateway,\n BadRequest: () => BadRequest,\n Conflict: () => Conflict,\n Forbidden: () => Forbidden,\n GeneralError: () => GeneralError,\n Gone: () => Gone,\n LengthRequired: () => LengthRequired,\n MethodNotAllowed: () => MethodNotAllowed,\n NotAcceptable: () => NotAcceptable,\n NotAuthenticated: () => NotAuthenticated,\n NotFound: () => NotFound,\n NotImplemented: () => NotImplemented,\n PaymentError: () => PaymentError,\n Timeout: () => Timeout,\n TooManyRequests: () => TooManyRequests,\n Unavailable: () => Unavailable,\n Unprocessable: () => Unprocessable,\n VError: () => verror_default\n });\n var import_inherits2 = __toESM2(require_inherits_browser());\n var import_depd = __toESM2(require_browser());\n var deprecate = (0, import_depd.default)(\"@openangeda/verror\");\n function createError(name, statusCode, className) {\n const ExtendedError = function(...args) {\n if (!(this instanceof ExtendedError)) {\n return new ExtendedError(...args);\n }\n const { options, shortMessage } = parseConstructorArguments(...args);\n options.meta = {\n code: statusCode,\n statusCode,\n className,\n ...options.meta\n };\n verror_default.call(\n this,\n options,\n shortMessage\n );\n deprecate.property(this, \"code\", \"use `statusCode` instead of `code`\");\n };\n Object.defineProperty(ExtendedError, \"name\", { configurable: true, value: name });\n (0, import_inherits2.default)(ExtendedError, verror_default);\n ExtendedError.prototype.name = name;\n return ExtendedError;\n }\n var BadRequest = createError(\"BadRequest\", 400, \"bad-request\");\n var NotAuthenticated = createError(\"NotAuthenticated\", 401, \"not-authenticated\");\n var PaymentError = createError(\"PaymentError\", 402, \"payment-error\");\n var Forbidden = createError(\"Forbidden\", 403, \"forbidden\");\n var NotFound = createError(\"NotFound\", 404, \"not-found\");\n var MethodNotAllowed = createError(\"MethodNotAllowed\", 405, \"method-not-allowed\");\n var NotAcceptable = createError(\"NotAcceptable\", 406, \"not-acceptable\");\n var Timeout = createError(\"Timeout\", 408, \"timeout\");\n var Conflict = createError(\"Conflict\", 409, \"conflict\");\n var Gone = createError(\"Gone\", 410, \"gone\");\n var LengthRequired = createError(\"LengthRequired\", 411, \"length-required\");\n var Unprocessable = createError(\"Unprocessable\", 422, \"unprocessable\");\n var TooManyRequests = createError(\"TooManyRequests\", 429, \"too-many-requests\");\n var GeneralError = createError(\"GeneralError\", 500, \"general-error\");\n var NotImplemented = createError(\"NotImplemented\", 501, \"not-implemented\");\n var BadGateway = createError(\"BadGateway\", 502, \"bad-gateway\");\n var Unavailable = createError(\"Unavailable\", 503, \"unavailable\");\n var httpAliases = {\n 400: BadRequest,\n 401: NotAuthenticated,\n 402: PaymentError,\n 403: Forbidden,\n 404: NotFound,\n 405: MethodNotAllowed,\n 406: NotAcceptable,\n 408: Timeout,\n 409: Conflict,\n 410: Gone,\n 411: LengthRequired,\n 422: Unprocessable,\n 429: TooManyRequests,\n 500: GeneralError,\n 501: NotImplemented,\n 502: BadGateway,\n 503: Unavailable\n };\n Object.assign(verror_default, http_exports, httpAliases);\n var src_default = verror_default;\n }\n });\n\n // ../../../node_modules/.pnpm/@openagenda+verror@3.1.4/node_modules/@openagenda/verror/index.js\n var require_verror = __commonJS({\n \"../../../node_modules/.pnpm/@openagenda+verror@3.1.4/node_modules/@openagenda/verror/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = require_dist2().default;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/errors.js\n var require_errors2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/errors.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WrongParamFormat = exports3.WrongNetworkException = exports3.WasmInitError = exports3.WalletSignatureNotFoundError = exports3.UnsupportedMethodError = exports3.UnsupportedChainException = exports3.UnknownSignatureType = exports3.UnknownSignatureError = exports3.UnknownError = exports3.UnknownDecryptionAlgorithmTypeError = exports3.UnauthorizedException = exports3.TransactionError = exports3.RemovedFunctionError = exports3.ParamsMissingError = exports3.ParamNullError = exports3.NodejsException = exports3.NodeError = exports3.NoWalletException = exports3.NoValidShares = exports3.NetworkError = exports3.MintingNotSupported = exports3.LocalStorageItemNotSetException = exports3.LocalStorageItemNotRemovedException = exports3.LocalStorageItemNotFoundException = exports3.LitNodeClientNotReadyError = exports3.LitNodeClientBadConfigError = exports3.InvalidUnifiedConditionType = exports3.InvalidSignatureError = exports3.InvalidParamType = exports3.InvalidNodeAttestation = exports3.InvalidSessionSigs = exports3.InvalidEthBlockhash = exports3.InvalidBooleanException = exports3.InvalidArgumentException = exports3.InvalidAccessControlConditions = exports3.InitError = exports3.AutomationError = exports3.MultiError = exports3.LitError = exports3.LIT_ERROR_CODE = exports3.LIT_ERROR = exports3.LitErrorKind = exports3.LIT_ERROR_KIND = void 0;\n var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));\n var verror_1 = require_verror();\n var depd_1 = tslib_1.__importDefault(require_browser());\n var deprecated = (0, depd_1.default)(\"lit-js-sdk:constants:errors\");\n exports3.LIT_ERROR_KIND = {\n Unknown: \"Unknown\",\n Unexpected: \"Unexpected\",\n Generic: \"Generic\",\n Config: \"Config\",\n Validation: \"Validation\",\n Conversion: \"Conversion\",\n Parser: \"Parser\",\n Serializer: \"Serializer\",\n Timeout: \"Timeout\"\n };\n exports3.LitErrorKind = new Proxy(exports3.LIT_ERROR_KIND, {\n get(target, prop, receiver) {\n deprecated(\"LitErrorKind is deprecated and will be removed in a future version. Use LIT_ERROR_KIND instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LIT_ERROR = {\n INVALID_PARAM_TYPE: {\n name: \"InvalidParamType\",\n code: \"invalid_param_type\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n INVALID_ACCESS_CONTROL_CONDITIONS: {\n name: \"InvalidAccessControlConditions\",\n code: \"invalid_access_control_conditions\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n WRONG_NETWORK_EXCEPTION: {\n name: \"WrongNetworkException\",\n code: \"wrong_network_exception\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n MINTING_NOT_SUPPORTED: {\n name: \"MintingNotSupported\",\n code: \"minting_not_supported\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n UNSUPPORTED_CHAIN_EXCEPTION: {\n name: \"UnsupportedChainException\",\n code: \"unsupported_chain_exception\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n INVALID_UNIFIED_CONDITION_TYPE: {\n name: \"InvalidUnifiedConditionType\",\n code: \"invalid_unified_condition_type\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n LIT_NODE_CLIENT_NOT_READY_ERROR: {\n name: \"LitNodeClientNotReadyError\",\n code: \"lit_node_client_not_ready_error\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n UNAUTHORIZED_EXCEPTION: {\n name: \"UnauthorizedException\",\n code: \"unauthorized_exception\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n INVALID_ARGUMENT_EXCEPTION: {\n name: \"InvalidArgumentException\",\n code: \"invalid_argument_exception\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n INVALID_BOOLEAN_EXCEPTION: {\n name: \"InvalidBooleanException\",\n code: \"invalid_boolean_exception\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n UNKNOWN_ERROR: {\n name: \"UnknownError\",\n code: \"unknown_error\",\n kind: exports3.LIT_ERROR_KIND.Unknown\n },\n NO_WALLET_EXCEPTION: {\n name: \"NoWalletException\",\n code: \"no_wallet_exception\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n WRONG_PARAM_FORMAT: {\n name: \"WrongParamFormat\",\n code: \"wrong_param_format\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n LOCAL_STORAGE_ITEM_NOT_FOUND_EXCEPTION: {\n name: \"LocalStorageItemNotFoundException\",\n code: \"local_storage_item_not_found_exception\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n LOCAL_STORAGE_ITEM_NOT_SET_EXCEPTION: {\n name: \"LocalStorageItemNotSetException\",\n code: \"local_storage_item_not_set_exception\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n LOCAL_STORAGE_ITEM_NOT_REMOVED_EXCEPTION: {\n name: \"LocalStorageItemNotRemovedException\",\n code: \"local_storage_item_not_removed_exception\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n REMOVED_FUNCTION_ERROR: {\n name: \"RemovedFunctionError\",\n code: \"removed_function_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n UNSUPPORTED_METHOD_ERROR: {\n name: \"UnsupportedMethodError\",\n code: \"unsupported_method_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n LIT_NODE_CLIENT_BAD_CONFIG_ERROR: {\n name: \"LitNodeClientBadConfigError\",\n code: \"lit_node_client_bad_config_error\",\n kind: exports3.LIT_ERROR_KIND.Config\n },\n PARAMS_MISSING_ERROR: {\n name: \"ParamsMissingError\",\n code: \"params_missing_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n UNKNOWN_SIGNATURE_TYPE: {\n name: \"UnknownSignatureType\",\n code: \"unknown_signature_type\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n UNKNOWN_SIGNATURE_ERROR: {\n name: \"UnknownSignatureError\",\n code: \"unknown_signature_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n INVALID_SIGNATURE_ERROR: {\n name: \"InvalidSignatureError\",\n code: \"invalid_signature_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n PARAM_NULL_ERROR: {\n name: \"ParamNullError\",\n code: \"param_null_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n UNKNOWN_DECRYPTION_ALGORITHM_TYPE_ERROR: {\n name: \"UnknownDecryptionAlgorithmTypeError\",\n code: \"unknown_decryption_algorithm_type_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n WASM_INIT_ERROR: {\n name: \"WasmInitError\",\n code: \"wasm_init_error\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n NODEJS_EXCEPTION: {\n name: \"NodejsException\",\n code: \"nodejs_exception\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n NODE_ERROR: {\n name: \"NodeError\",\n code: \"node_error\",\n kind: exports3.LitErrorKind.Unknown\n },\n WALLET_SIGNATURE_NOT_FOUND_ERROR: {\n name: \"WalletSignatureNotFoundError\",\n code: \"wallet_signature_not_found_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n NO_VALID_SHARES: {\n name: \"NoValidShares\",\n code: \"no_valid_shares\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n INVALID_NODE_ATTESTATION: {\n name: \"InvalidNodeAttestation\",\n code: \"invalid_node_attestation\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n INVALID_ETH_BLOCKHASH: {\n name: \"InvalidEthBlockhash\",\n code: \"invalid_eth_blockhash\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n INVALID_SESSION_SIGS: {\n name: \"InvalidSessionSigs\",\n code: \"invalid_session_sigs\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n INIT_ERROR: {\n name: \"InitError\",\n code: \"init_error\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n NETWORK_ERROR: {\n name: \"NetworkError\",\n code: \"network_error\",\n kind: exports3.LitErrorKind.Unexpected\n },\n TRANSACTION_ERROR: {\n name: \"TransactionError\",\n code: \"transaction_error\",\n kind: exports3.LitErrorKind.Unexpected\n },\n AUTOMATION_ERROR: {\n name: \"AutomationError\",\n code: \"automation_error\",\n kind: exports3.LitErrorKind.Unexpected\n }\n };\n exports3.LIT_ERROR_CODE = {\n NODE_NOT_AUTHORIZED: \"NodeNotAuthorized\"\n };\n var LitError = class extends verror_1.VError {\n constructor(options, message2, ...params) {\n super(options, message2, ...params);\n }\n };\n exports3.LitError = LitError;\n function createErrorClass({ name, code, kind }) {\n return class extends LitError {\n // VError has optional options parameter, but we make it required so thrower remembers to pass all the useful info\n constructor(options, message2, ...params) {\n if (options instanceof Error) {\n options = {\n cause: options\n };\n }\n if (!(options.cause instanceof Error)) {\n options.cause = new Error(options.cause);\n }\n super({\n name,\n ...options,\n meta: {\n code,\n kind,\n ...options.meta\n }\n }, message2, ...params);\n }\n };\n }\n var errorClasses = {};\n for (const key in exports3.LIT_ERROR) {\n if (key in exports3.LIT_ERROR) {\n const errorDef = exports3.LIT_ERROR[key];\n errorClasses[errorDef.name] = createErrorClass(errorDef);\n }\n }\n var MultiError = verror_1.VError.MultiError;\n exports3.MultiError = MultiError;\n exports3.AutomationError = errorClasses.AutomationError, exports3.InitError = errorClasses.InitError, exports3.InvalidAccessControlConditions = errorClasses.InvalidAccessControlConditions, exports3.InvalidArgumentException = errorClasses.InvalidArgumentException, exports3.InvalidBooleanException = errorClasses.InvalidBooleanException, exports3.InvalidEthBlockhash = errorClasses.InvalidEthBlockhash, exports3.InvalidSessionSigs = errorClasses.InvalidSessionSigs, exports3.InvalidNodeAttestation = errorClasses.InvalidNodeAttestation, exports3.InvalidParamType = errorClasses.InvalidParamType, exports3.InvalidSignatureError = errorClasses.InvalidSignatureError, exports3.InvalidUnifiedConditionType = errorClasses.InvalidUnifiedConditionType, exports3.LitNodeClientBadConfigError = errorClasses.LitNodeClientBadConfigError, exports3.LitNodeClientNotReadyError = errorClasses.LitNodeClientNotReadyError, exports3.LocalStorageItemNotFoundException = errorClasses.LocalStorageItemNotFoundException, exports3.LocalStorageItemNotRemovedException = errorClasses.LocalStorageItemNotRemovedException, exports3.LocalStorageItemNotSetException = errorClasses.LocalStorageItemNotSetException, exports3.MintingNotSupported = errorClasses.MintingNotSupported, exports3.NetworkError = errorClasses.NetworkError, exports3.NoValidShares = errorClasses.NoValidShares, exports3.NoWalletException = errorClasses.NoWalletException, exports3.NodeError = errorClasses.NodeError, exports3.NodejsException = errorClasses.NodejsException, exports3.ParamNullError = errorClasses.ParamNullError, exports3.ParamsMissingError = errorClasses.ParamsMissingError, exports3.RemovedFunctionError = errorClasses.RemovedFunctionError, exports3.TransactionError = errorClasses.TransactionError, exports3.UnauthorizedException = errorClasses.UnauthorizedException, exports3.UnknownDecryptionAlgorithmTypeError = errorClasses.UnknownDecryptionAlgorithmTypeError, exports3.UnknownError = errorClasses.UnknownError, exports3.UnknownSignatureError = errorClasses.UnknownSignatureError, exports3.UnknownSignatureType = errorClasses.UnknownSignatureType, exports3.UnsupportedChainException = errorClasses.UnsupportedChainException, exports3.UnsupportedMethodError = errorClasses.UnsupportedMethodError, exports3.WalletSignatureNotFoundError = errorClasses.WalletSignatureNotFoundError, exports3.WasmInitError = errorClasses.WasmInitError, exports3.WrongNetworkException = errorClasses.WrongNetworkException, exports3.WrongParamFormat = errorClasses.WrongParamFormat;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/utils/utils.js\n var require_utils8 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/utils/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ELeft = ELeft;\n exports3.ERight = ERight;\n var constants_1 = require_constants4();\n function ELeft(error) {\n return {\n type: constants_1.EITHER_TYPE.ERROR,\n result: error\n };\n }\n function ERight(result) {\n return {\n type: constants_1.EITHER_TYPE.SUCCESS,\n result\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/abis/ERC20.json\n var require_ERC20 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/abis/ERC20.json\"(exports3, module) {\n module.exports = {\n abi: [\n {\n constant: true,\n inputs: [],\n name: \"name\",\n outputs: [\n {\n name: \"\",\n type: \"string\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_spender\",\n type: \"address\"\n },\n {\n name: \"_value\",\n type: \"uint256\"\n }\n ],\n name: \"approve\",\n outputs: [\n {\n name: \"\",\n type: \"bool\"\n }\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n constant: true,\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n name: \"\",\n type: \"uint256\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_from\",\n type: \"address\"\n },\n {\n name: \"_to\",\n type: \"address\"\n },\n {\n name: \"_value\",\n type: \"uint256\"\n }\n ],\n name: \"transferFrom\",\n outputs: [\n {\n name: \"\",\n type: \"bool\"\n }\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n constant: true,\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n name: \"\",\n type: \"uint8\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n constant: true,\n inputs: [\n {\n name: \"_owner\",\n type: \"address\"\n }\n ],\n name: \"balanceOf\",\n outputs: [\n {\n name: \"balance\",\n type: \"uint256\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n constant: true,\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n name: \"\",\n type: \"string\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_to\",\n type: \"address\"\n },\n {\n name: \"_value\",\n type: \"uint256\"\n }\n ],\n name: \"transfer\",\n outputs: [\n {\n name: \"\",\n type: \"bool\"\n }\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n constant: true,\n inputs: [\n {\n name: \"_owner\",\n type: \"address\"\n },\n {\n name: \"_spender\",\n type: \"address\"\n }\n ],\n name: \"allowance\",\n outputs: [\n {\n name: \"\",\n type: \"uint256\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n payable: true,\n stateMutability: \"payable\",\n type: \"fallback\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: \"owner\",\n type: \"address\"\n },\n {\n indexed: true,\n name: \"spender\",\n type: \"address\"\n },\n {\n indexed: false,\n name: \"value\",\n type: \"uint256\"\n }\n ],\n name: \"Approval\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: \"from\",\n type: \"address\"\n },\n {\n indexed: true,\n name: \"to\",\n type: \"address\"\n },\n {\n indexed: false,\n name: \"value\",\n type: \"uint256\"\n }\n ],\n name: \"Transfer\",\n type: \"event\"\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/abis/LIT.json\n var require_LIT = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/abis/LIT.json\"(exports3, module) {\n module.exports = {\n contractName: \"LIT\",\n abi: [\n {\n inputs: [],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"operator\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\"\n }\n ],\n name: \"ApprovalForAll\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"userAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address payable\",\n name: \"relayerAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"functionSignature\",\n type: \"bytes\"\n }\n ],\n name: \"MetaTransactionExecuted\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"operator\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"ids\",\n type: \"uint256[]\"\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"values\",\n type: \"uint256[]\"\n }\n ],\n name: \"TransferBatch\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"operator\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"id\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\"\n }\n ],\n name: \"TransferSingle\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"string\",\n name: \"value\",\n type: \"string\"\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"id\",\n type: \"uint256\"\n }\n ],\n name: \"URI\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"ERC712_VERSION\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"id\",\n type: \"uint256\"\n }\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"accounts\",\n type: \"address[]\"\n },\n {\n internalType: \"uint256[]\",\n name: \"ids\",\n type: \"uint256[]\"\n }\n ],\n name: \"balanceOfBatch\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"userAddress\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"functionSignature\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes32\",\n name: \"sigR\",\n type: \"bytes32\"\n },\n {\n internalType: \"bytes32\",\n name: \"sigS\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint8\",\n name: \"sigV\",\n type: \"uint8\"\n }\n ],\n name: \"executeMetaTransaction\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\"\n }\n ],\n stateMutability: \"payable\",\n type: \"function\",\n payable: true\n },\n {\n inputs: [],\n name: \"getChainId\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"pure\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [],\n name: \"getDomainSeperator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\"\n }\n ],\n name: \"getNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n internalType: \"uint256[]\",\n name: \"ids\",\n type: \"uint256[]\"\n },\n {\n internalType: \"uint256[]\",\n name: \"amounts\",\n type: \"uint256[]\"\n },\n {\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\"\n }\n ],\n name: \"safeBatchTransferFrom\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"id\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\"\n }\n ],\n name: \"safeTransferFrom\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"operator\",\n type: \"address\"\n },\n {\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\"\n }\n ],\n name: \"setApprovalForAll\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"interfaceId\",\n type: \"bytes4\"\n }\n ],\n name: \"supportsInterface\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [],\n name: \"tokenIds\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n name: \"uri\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"quantity\",\n type: \"uint256\"\n }\n ],\n name: \"mint\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_owner\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"_operator\",\n type: \"address\"\n }\n ],\n name: \"isApprovedForAll\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"isOperator\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\"\n }\n ],\n name: \"setOpenseaProxyEnabled\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newAdmin\",\n type: \"address\"\n }\n ],\n name: \"changeAdmin\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"uri\",\n type: \"string\"\n }\n ],\n name: \"setURI\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getAdmin\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/index.js\n var require_src = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.1_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ABI_ERC20 = exports3.ABI_LIT = void 0;\n var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));\n tslib_1.__exportStar(require_version27(), exports3);\n tslib_1.__exportStar(require_constants4(), exports3);\n tslib_1.__exportStar(require_mappers(), exports3);\n tslib_1.__exportStar(require_endpoints(), exports3);\n tslib_1.__exportStar(require_mappers(), exports3);\n tslib_1.__exportStar(require_i_errors(), exports3);\n tslib_1.__exportStar(require_errors2(), exports3);\n tslib_1.__exportStar(require_utils8(), exports3);\n var ABI_ERC20 = tslib_1.__importStar(require_ERC20());\n exports3.ABI_ERC20 = ABI_ERC20;\n var ABI_LIT = tslib_1.__importStar(require_LIT());\n exports3.ABI_LIT = ABI_LIT;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/version.js\n var require_version28 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"7.3.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/constants/constants.js\n var require_constants5 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/constants/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LOG_LEVEL = exports3.LitNamespace = exports3.LIT_NAMESPACE = exports3.LitRecapAbility = exports3.LIT_RECAP_ABILITY = exports3.LitAbility = exports3.LIT_ABILITY = exports3.LitResourcePrefix = exports3.LIT_RESOURCE_PREFIX = exports3.RelayAuthStatus = exports3.RELAY_AUTH_STATUS = exports3.StakingStates = exports3.STAKING_STATES = exports3.ProviderType = exports3.PROVIDER_TYPE = exports3.AuthMethodScope = exports3.AUTH_METHOD_SCOPE = exports3.AuthMethodType = exports3.AUTH_METHOD_TYPE = exports3.EITHER_TYPE = exports3.LIT_CURVE = exports3.VMTYPE = exports3.LIT_ACTION_IPFS_HASH = exports3.SIWE_DELEGATION_URI = exports3.PKP_CLIENT_SUPPORTED_CHAINS = exports3.AUTH_METHOD_TYPE_IDS = exports3.LIT_SESSION_KEY_URI = exports3.LIT_NETWORKS = exports3.SYMM_KEY_ALGO_PARAMS = exports3.LOCAL_STORAGE_KEYS = exports3.ALL_LIT_CHAINS = exports3.LIT_COSMOS_CHAINS = exports3.LIT_SVM_CHAINS = exports3.CENTRALISATION_BY_NETWORK = exports3.HTTP_BY_NETWORK = exports3.HTTPS = exports3.HTTP = exports3.METAMASK_CHAIN_INFO_BY_NETWORK = exports3.RELAYER_URL_BY_NETWORK = exports3.RPC_URL_BY_NETWORK = exports3.LitNetwork = exports3.LIT_NETWORK = exports3.LIT_EVM_CHAINS = exports3.LIT_RPC = exports3.metamaskChainInfo = exports3.METAMASK_CHAIN_INFO = exports3.LIT_CHAINS = exports3.AUTH_SIGNATURE_BODY = exports3.LIT_AUTH_SIG_CHAIN_KEYS = exports3.NETWORK_PUB_KEY = void 0;\n exports3.FALLBACK_IPFS_GATEWAYS = exports3.LogLevel = void 0;\n var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));\n var depd_1 = tslib_1.__importDefault(require_browser());\n var deprecated = (0, depd_1.default)(\"lit-js-sdk:constants:constants\");\n exports3.NETWORK_PUB_KEY = \"9971e835a1fe1a4d78e381eebbe0ddc84fde5119169db816900de796d10187f3c53d65c1202ac083d099a517f34a9b62\";\n exports3.LIT_AUTH_SIG_CHAIN_KEYS = [\n \"ethereum\",\n \"solana\",\n \"cosmos\",\n \"kyve\"\n ];\n exports3.AUTH_SIGNATURE_BODY = \"I am creating an account to use Lit Protocol at {{timestamp}}\";\n var yellowstoneChain = {\n contractAddress: null,\n chainId: 175188,\n name: \"Chronicle Yellowstone - Lit Protocol Testnet\",\n symbol: \"tstLPX\",\n decimals: 18,\n rpcUrls: [\"https://yellowstone-rpc.litprotocol.com/\"],\n blockExplorerUrls: [\"https://yellowstone-explorer.litprotocol.com/\"],\n type: null,\n vmType: \"EVM\"\n };\n exports3.LIT_CHAINS = {\n ethereum: {\n contractAddress: \"0xA54F7579fFb3F98bd8649fF02813F575f9b3d353\",\n chainId: 1,\n name: \"Ethereum\",\n symbol: \"ETH\",\n decimals: 18,\n type: \"ERC1155\",\n rpcUrls: [\n \"https://eth-mainnet.alchemyapi.io/v2/EuGnkVlzVoEkzdg0lpCarhm8YHOxWVxE\"\n ],\n blockExplorerUrls: [\"https://etherscan.io\"],\n vmType: \"EVM\"\n },\n polygon: {\n contractAddress: \"0x7C7757a9675f06F3BE4618bB68732c4aB25D2e88\",\n chainId: 137,\n name: \"Polygon\",\n symbol: \"MATIC\",\n decimals: 18,\n rpcUrls: [\"https://polygon-rpc.com\"],\n blockExplorerUrls: [\"https://explorer.matic.network\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n fantom: {\n contractAddress: \"0x5bD3Fe8Ab542f0AaBF7552FAAf376Fd8Aa9b3869\",\n chainId: 250,\n name: \"Fantom\",\n symbol: \"FTM\",\n decimals: 18,\n rpcUrls: [\"https://rpcapi.fantom.network\"],\n blockExplorerUrls: [\"https://ftmscan.com\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n xdai: {\n contractAddress: \"0xDFc2Fd83dFfD0Dafb216F412aB3B18f2777406aF\",\n chainId: 100,\n name: \"xDai\",\n symbol: \"xDai\",\n decimals: 18,\n rpcUrls: [\"https://rpc.gnosischain.com\"],\n blockExplorerUrls: [\" https://blockscout.com/xdai/mainnet\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n bsc: {\n contractAddress: \"0xc716950e5DEae248160109F562e1C9bF8E0CA25B\",\n chainId: 56,\n name: \"Binance Smart Chain\",\n symbol: \"BNB\",\n decimals: 18,\n rpcUrls: [\"https://bsc-dataseed.binance.org/\"],\n blockExplorerUrls: [\" https://bscscan.com/\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n arbitrum: {\n contractAddress: \"0xc716950e5DEae248160109F562e1C9bF8E0CA25B\",\n chainId: 42161,\n name: \"Arbitrum\",\n symbol: \"AETH\",\n decimals: 18,\n type: \"ERC1155\",\n rpcUrls: [\"https://arb1.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://arbiscan.io/\"],\n vmType: \"EVM\"\n },\n arbitrumSepolia: {\n contractAddress: null,\n chainId: 421614,\n name: \"Arbitrum Sepolia\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://sepolia-rollup.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://sepolia.arbiscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n avalanche: {\n contractAddress: \"0xBB118507E802D17ECDD4343797066dDc13Cde7C6\",\n chainId: 43114,\n name: \"Avalanche\",\n symbol: \"AVAX\",\n decimals: 18,\n type: \"ERC1155\",\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n vmType: \"EVM\"\n },\n fuji: {\n contractAddress: \"0xc716950e5DEae248160109F562e1C9bF8E0CA25B\",\n chainId: 43113,\n name: \"Avalanche FUJI Testnet\",\n symbol: \"AVAX\",\n decimals: 18,\n type: \"ERC1155\",\n rpcUrls: [\"https://api.avax-test.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://testnet.snowtrace.io/\"],\n vmType: \"EVM\"\n },\n harmony: {\n contractAddress: \"0xBB118507E802D17ECDD4343797066dDc13Cde7C6\",\n chainId: 16666e5,\n name: \"Harmony\",\n symbol: \"ONE\",\n decimals: 18,\n type: \"ERC1155\",\n rpcUrls: [\"https://api.harmony.one\"],\n blockExplorerUrls: [\"https://explorer.harmony.one/\"],\n vmType: \"EVM\"\n },\n mumbai: {\n contractAddress: \"0xc716950e5DEae248160109F562e1C9bF8E0CA25B\",\n chainId: 80001,\n name: \"Mumbai\",\n symbol: \"MATIC\",\n decimals: 18,\n rpcUrls: [\n \"https://rpc-mumbai.maticvigil.com/v1/96bf5fa6e03d272fbd09de48d03927b95633726c\"\n ],\n blockExplorerUrls: [\"https://mumbai.polygonscan.com\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n goerli: {\n contractAddress: \"0xc716950e5DEae248160109F562e1C9bF8E0CA25B\",\n chainId: 5,\n name: \"Goerli\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://goerli.infura.io/v3/96dffb3d8c084dec952c61bd6230af34\"],\n blockExplorerUrls: [\"https://goerli.etherscan.io\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n cronos: {\n contractAddress: \"0xc716950e5DEae248160109F562e1C9bF8E0CA25B\",\n chainId: 25,\n name: \"Cronos\",\n symbol: \"CRO\",\n decimals: 18,\n rpcUrls: [\"https://evm-cronos.org\"],\n blockExplorerUrls: [\"https://cronos.org/explorer/\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n optimism: {\n contractAddress: \"0xbF68B4c9aCbed79278465007f20a08Fa045281E0\",\n chainId: 10,\n name: \"Optimism\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.optimism.io\"],\n blockExplorerUrls: [\"https://optimistic.etherscan.io\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n celo: {\n contractAddress: \"0xBB118507E802D17ECDD4343797066dDc13Cde7C6\",\n chainId: 42220,\n name: \"Celo\",\n symbol: \"CELO\",\n decimals: 18,\n rpcUrls: [\"https://forno.celo.org\"],\n blockExplorerUrls: [\"https://explorer.celo.org\"],\n type: \"ERC1155\",\n vmType: \"EVM\"\n },\n aurora: {\n contractAddress: null,\n chainId: 1313161554,\n name: \"Aurora\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.aurora.dev\"],\n blockExplorerUrls: [\"https://aurorascan.dev\"],\n type: null,\n vmType: \"EVM\"\n },\n eluvio: {\n contractAddress: null,\n chainId: 955305,\n name: \"Eluvio\",\n symbol: \"ELV\",\n decimals: 18,\n rpcUrls: [\"https://host-76-74-28-226.contentfabric.io/eth\"],\n blockExplorerUrls: [\"https://explorer.eluv.io\"],\n type: null,\n vmType: \"EVM\"\n },\n alfajores: {\n contractAddress: null,\n chainId: 44787,\n name: \"Alfajores\",\n symbol: \"CELO\",\n decimals: 18,\n rpcUrls: [\"https://alfajores-forno.celo-testnet.org\"],\n blockExplorerUrls: [\"https://alfajores-blockscout.celo-testnet.org\"],\n type: null,\n vmType: \"EVM\"\n },\n xdc: {\n contractAddress: null,\n chainId: 50,\n name: \"XDC Blockchain\",\n symbol: \"XDC\",\n decimals: 18,\n rpcUrls: [\"https://rpc.xinfin.network\"],\n blockExplorerUrls: [\"https://explorer.xinfin.network\"],\n type: null,\n vmType: \"EVM\"\n },\n evmos: {\n contractAddress: null,\n chainId: 9001,\n name: \"EVMOS\",\n symbol: \"EVMOS\",\n decimals: 18,\n rpcUrls: [\"https://eth.bd.evmos.org:8545\"],\n blockExplorerUrls: [\"https://evm.evmos.org\"],\n type: null,\n vmType: \"EVM\"\n },\n evmosTestnet: {\n contractAddress: null,\n chainId: 9e3,\n name: \"EVMOS Testnet\",\n symbol: \"EVMOS\",\n decimals: 18,\n rpcUrls: [\"https://eth.bd.evmos.dev:8545\"],\n blockExplorerUrls: [\"https://evm.evmos.dev\"],\n type: null,\n vmType: \"EVM\"\n },\n bscTestnet: {\n contractAddress: null,\n chainId: 97,\n name: \"BSC Testnet\",\n symbol: \"BNB\",\n decimals: 18,\n rpcUrls: [\"https://data-seed-prebsc-1-s1.binance.org:8545\"],\n blockExplorerUrls: [\"https://testnet.bscscan.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n baseGoerli: {\n contractAddress: null,\n chainId: 84531,\n name: \"Base Goerli\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://goerli.base.org\"],\n blockExplorerUrls: [\"https://goerli.basescan.org\"],\n type: null,\n vmType: \"EVM\"\n },\n baseSepolia: {\n contractAddress: null,\n chainId: 84532,\n name: \"Base Sepolia\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://sepolia.base.org\"],\n blockExplorerUrls: [\"https://sepolia.basescan.org\"],\n type: null,\n vmType: \"EVM\"\n },\n moonbeam: {\n contractAddress: null,\n chainId: 1284,\n name: \"Moonbeam\",\n symbol: \"GLMR\",\n decimals: 18,\n rpcUrls: [\"https://rpc.api.moonbeam.network\"],\n blockExplorerUrls: [\"https://moonscan.io\"],\n type: null,\n vmType: \"EVM\"\n },\n moonriver: {\n contractAddress: null,\n chainId: 1285,\n name: \"Moonriver\",\n symbol: \"MOVR\",\n decimals: 18,\n rpcUrls: [\"https://rpc.api.moonriver.moonbeam.network\"],\n blockExplorerUrls: [\"https://moonriver.moonscan.io\"],\n type: null,\n vmType: \"EVM\"\n },\n moonbaseAlpha: {\n contractAddress: null,\n chainId: 1287,\n name: \"Moonbase Alpha\",\n symbol: \"DEV\",\n decimals: 18,\n rpcUrls: [\"https://rpc.api.moonbase.moonbeam.network\"],\n blockExplorerUrls: [\"https://moonbase.moonscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n filecoin: {\n contractAddress: null,\n chainId: 314,\n name: \"Filecoin\",\n symbol: \"FIL\",\n decimals: 18,\n rpcUrls: [\"https://api.node.glif.io/rpc/v1\"],\n blockExplorerUrls: [\"https://filfox.info/\"],\n type: null,\n vmType: \"EVM\"\n },\n filecoinCalibrationTestnet: {\n contractAddress: null,\n chainId: 314159,\n name: \"Filecoin Calibration Testnet\",\n symbol: \"tFIL\",\n decimals: 18,\n rpcUrls: [\"https://api.calibration.node.glif.io/rpc/v1\"],\n blockExplorerUrls: [\"https://calibration.filscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n hyperspace: {\n contractAddress: null,\n chainId: 3141,\n name: \"Filecoin Hyperspace testnet\",\n symbol: \"tFIL\",\n decimals: 18,\n rpcUrls: [\"https://api.hyperspace.node.glif.io/rpc/v1\"],\n blockExplorerUrls: [\"https://hyperspace.filscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n sepolia: {\n contractAddress: null,\n chainId: 11155111,\n name: \"Sepolia Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://ethereum-sepolia-rpc.publicnode.com\"],\n blockExplorerUrls: [\"https://sepolia.etherscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n scrollSepolia: {\n contractAddress: null,\n chainId: 534351,\n name: \"Scroll Sepolia Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://sepolia-rpc.scroll.io\"],\n blockExplorerUrls: [\"https://sepolia.scrollscan.com\"],\n type: null,\n vmType: \"EVM\"\n },\n scroll: {\n contractAddress: null,\n chainId: 534352,\n name: \"Scroll\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.scroll.io\"],\n blockExplorerUrls: [\"https://scrollscan.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n zksync: {\n contractAddress: null,\n chainId: 324,\n name: \"zkSync Era Mainnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.era.zksync.io\"],\n blockExplorerUrls: [\"https://explorer.zksync.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n base: {\n contractAddress: null,\n chainId: 8453,\n name: \"Base Mainnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.base.org\"],\n blockExplorerUrls: [\"https://basescan.org\"],\n type: null,\n vmType: \"EVM\"\n },\n lukso: {\n contractAddress: null,\n chainId: 42,\n name: \"Lukso\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.lukso.gateway.fm\"],\n blockExplorerUrls: [\"https://explorer.execution.mainnet.lukso.network/\"],\n type: null,\n vmType: \"EVM\"\n },\n luksoTestnet: {\n contractAddress: null,\n chainId: 4201,\n name: \"Lukso Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.testnet.lukso.network\"],\n blockExplorerUrls: [\"https://explorer.execution.testnet.lukso.network\"],\n type: null,\n vmType: \"EVM\"\n },\n zora: {\n contractAddress: null,\n chainId: 7777777,\n name: \"\tZora\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.zora.energy/\"],\n blockExplorerUrls: [\"https://explorer.zora.energy\"],\n type: null,\n vmType: \"EVM\"\n },\n zoraGoerli: {\n contractAddress: null,\n chainId: 999,\n name: \"Zora Goerli\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://testnet.rpc.zora.energy\"],\n blockExplorerUrls: [\"https://testnet.explorer.zora.energy\"],\n type: null,\n vmType: \"EVM\"\n },\n zksyncTestnet: {\n contractAddress: null,\n chainId: 280,\n name: \"zkSync Era Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://testnet.era.zksync.dev\"],\n blockExplorerUrls: [\"https://goerli.explorer.zksync.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n lineaGoerli: {\n contractAddress: null,\n chainId: 59140,\n name: \"Linea Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.goerli.linea.build\"],\n blockExplorerUrls: [\"https://explorer.goerli.linea.build\"],\n type: null,\n vmType: \"EVM\"\n },\n lineaSepolia: {\n contractAddress: null,\n chainId: 59141,\n name: \"Linea Sepolia Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.sepolia.linea.build\"],\n blockExplorerUrls: [\"https://explorer.sepolia.linea.build\"],\n type: null,\n vmType: \"EVM\"\n },\n /**\n * Use this for `>= Datil` network.\n * Chainlist entry for the Chronicle Yellowstone Testnet.\n * https://chainlist.org/chain/175188\n */\n yellowstone: yellowstoneChain,\n chiado: {\n contractAddress: null,\n chainId: 10200,\n name: \"Chiado\",\n symbol: \"XDAI\",\n decimals: 18,\n rpcUrls: [\"https://rpc.chiadochain.net\"],\n blockExplorerUrls: [\"https://blockscout.chiadochain.net\"],\n type: null,\n vmType: \"EVM\"\n },\n zkEvm: {\n contractAddress: null,\n chainId: 1101,\n name: \"zkEvm\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://zkevm-rpc.com\"],\n blockExplorerUrls: [\"https://zkevm.polygonscan.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n mantleTestnet: {\n contractAddress: null,\n chainId: 5001,\n name: \"Mantle Testnet\",\n symbol: \"MNT\",\n decimals: 18,\n rpcUrls: [\"https://rpc.testnet.mantle.xyz\"],\n blockExplorerUrls: [\"https://explorer.testnet.mantle.xyz/\"],\n type: null,\n vmType: \"EVM\"\n },\n mantle: {\n contractAddress: null,\n chainId: 5e3,\n name: \"Mantle\",\n symbol: \"MNT\",\n decimals: 18,\n rpcUrls: [\"https://rpc.mantle.xyz\"],\n blockExplorerUrls: [\"http://explorer.mantle.xyz/\"],\n type: null,\n vmType: \"EVM\"\n },\n klaytn: {\n contractAddress: null,\n chainId: 8217,\n name: \"Klaytn\",\n symbol: \"KLAY\",\n decimals: 18,\n rpcUrls: [\"https://klaytn.blockpi.network/v1/rpc/public\"],\n blockExplorerUrls: [\"https://www.klaytnfinder.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n publicGoodsNetwork: {\n contractAddress: null,\n chainId: 424,\n name: \"Public Goods Network\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.publicgoods.network\"],\n blockExplorerUrls: [\"https://explorer.publicgoods.network/\"],\n type: null,\n vmType: \"EVM\"\n },\n optimismGoerli: {\n contractAddress: null,\n chainId: 420,\n name: \"Optimism Goerli\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://optimism-goerli.publicnode.com\"],\n blockExplorerUrls: [\"https://goerli-optimism.etherscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n waevEclipseTestnet: {\n contractAddress: null,\n chainId: 91006,\n name: \"Waev Eclipse Testnet\",\n symbol: \"ecWAEV\",\n decimals: 18,\n rpcUrls: [\"https://api.evm.waev.eclipsenetwork.xyz\"],\n blockExplorerUrls: [\"http://waev.explorer.modular.cloud/\"],\n type: null,\n vmType: \"EVM\"\n },\n waevEclipseDevnet: {\n contractAddress: null,\n chainId: 91006,\n name: \"Waev Eclipse Devnet\",\n symbol: \"ecWAEV\",\n decimals: 18,\n rpcUrls: [\"https://api.evm.waev.dev.eclipsenetwork.xyz\"],\n blockExplorerUrls: [\"http://waev.explorer.modular.cloud/\"],\n type: null,\n vmType: \"EVM\"\n },\n verifyTestnet: {\n contractAddress: null,\n chainId: 1833,\n name: \"Verify Testnet\",\n symbol: \"MATIC\",\n decimals: 18,\n rpcUrls: [\"https://rpc.verify-testnet.gelato.digital\"],\n blockExplorerUrls: [\"https://verify-testnet.blockscout.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n fuse: {\n contractAddress: null,\n chainId: 122,\n name: \"Fuse\",\n symbol: \"FUSE\",\n decimals: 18,\n rpcUrls: [\"https://rpc.fuse.io/\"],\n blockExplorerUrls: [\"https://explorer.fuse.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n campNetwork: {\n contractAddress: null,\n chainId: 325e3,\n name: \"Camp Network\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.camp-network-testnet.gelato.digital\"],\n blockExplorerUrls: [\n \"https://explorer.camp-network-testnet.gelato.digital/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n vanar: {\n contractAddress: null,\n chainId: 78600,\n name: \"Vanar Vanguard\",\n symbol: \"VANRY\",\n decimals: 18,\n rpcUrls: [\"https://rpc-vanguard.vanarchain.com\"],\n blockExplorerUrls: [\"https://explorer-vanguard.vanarchain.com\"],\n type: null,\n vmType: \"EVM\"\n },\n lisk: {\n contractAddress: null,\n chainId: 1135,\n name: \"Lisk\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://lisk.drpc.org\"],\n blockExplorerUrls: [\"https://blockscout.lisk.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n chilizMainnet: {\n contractAddress: null,\n chainId: 88888,\n name: \"Chiliz Mainnet\",\n symbol: \"CHZ\",\n decimals: 18,\n rpcUrls: [\"https://rpc.ankr.com/chiliz\"],\n blockExplorerUrls: [\"https://chiliscan.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n chilizTestnet: {\n contractAddress: null,\n chainId: 88882,\n name: \"Chiliz Spicy Testnet\",\n symbol: \"CHZ\",\n decimals: 18,\n rpcUrls: [\"https://spicy-rpc.chiliz.com/\"],\n blockExplorerUrls: [\"https://testnet.chiliscan.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n skaleTestnet: {\n contractAddress: null,\n chainId: 37084624,\n name: \"SKALE Nebula Hub Testnet\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://testnet.skalenodes.com/v1/lanky-ill-funny-testnet\"],\n blockExplorerUrls: [\n \"https://lanky-ill-funny-testnet.explorer.testnet.skalenodes.com\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skale: {\n contractAddress: null,\n chainId: 1482601649,\n name: \"SKALE Nebula Hub Mainnet\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.skalenodes.com/v1/green-giddy-denebola\"],\n blockExplorerUrls: [\n \"https://green-giddy-denebola.explorer.mainnet.skalenodes.com\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skaleCalypso: {\n contractAddress: null,\n chainId: 1564830818,\n name: \"SKALE Calypso Hub Mainnet\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague\"],\n blockExplorerUrls: [\n \"https://giant-half-dual-testnet.explorer.testnet.skalenodes.com/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skaleCalypsoTestnet: {\n contractAddress: null,\n chainId: 974399131,\n name: \"SKALE Calypso Hub Testnet\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://testnet.skalenodes.com/v1/giant-half-dual-testnet\"],\n blockExplorerUrls: [\n \"https://giant-half-dual-testnet.explorer.testnet.skalenodes.com/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skaleEuropa: {\n contractAddress: null,\n chainId: 2046399126,\n name: \"SKALE Europa DeFI Hub\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.skalenodes.com/v1/elated-tan-skat\"],\n blockExplorerUrls: [\n \"https://elated-tan-skat.explorer.mainnet.skalenodes.com/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skaleEuropaTestnet: {\n contractAddress: null,\n chainId: 1444673419,\n name: \"SKALE Europa DeFi Hub Testnet\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://testnet.skalenodes.com/v1/juicy-low-small-testnet\"],\n blockExplorerUrls: [\n \"https://juicy-low-small-testnet.explorer.testnet.skalenodes.com/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skaleTitan: {\n contractAddress: null,\n chainId: 1350216234,\n name: \"SKALE Titan AI Hub\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.skalenodes.com/v1/parallel-stormy-spica\"],\n blockExplorerUrls: [\n \"https://parallel-stormy-spica.explorer.mainnet.skalenodes.com/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n skaleTitanTestnet: {\n contractAddress: null,\n chainId: 1020352220,\n name: \"SKALE Titan AI Hub Testnet\",\n symbol: \"sFUEL\",\n decimals: 18,\n rpcUrls: [\"https://testnet.skalenodes.com/v1/aware-fake-trim-testnet\"],\n blockExplorerUrls: [\n \"https://aware-fake-trim-testnet.explorer.testnet.skalenodes.com/\"\n ],\n type: null,\n vmType: \"EVM\"\n },\n fhenixHelium: {\n contractAddress: null,\n chainId: 8008135,\n name: \"Fhenix Helium\",\n symbol: \"tFHE\",\n decimals: 18,\n rpcUrls: [\"https://api.helium.fhenix.zone\"],\n blockExplorerUrls: [\"https://explorer.helium.fhenix.zone\"],\n type: null,\n vmType: \"EVM\"\n },\n fhenixNitrogen: {\n contractAddress: null,\n chainId: 8008148,\n name: \"Fhenix Nitrogen\",\n symbol: \"tFHE\",\n decimals: 18,\n rpcUrls: [\"https://api.nitrogen.fhenix.zone\"],\n blockExplorerUrls: [\"https://explorer.nitrogen.fhenix.zone\"],\n type: null,\n vmType: \"EVM\"\n },\n hederaTestnet: {\n contractAddress: null,\n chainId: 296,\n name: \"Hedera Testnet\",\n symbol: \"HBAR\",\n decimals: 8,\n rpcUrls: [\"https://testnet.hashio.io/api\"],\n blockExplorerUrls: [\"https://hashscan.io/testnet/dashboard\"],\n type: null,\n vmType: \"EVM\"\n },\n hederaMainnet: {\n contractAddress: null,\n chainId: 295,\n name: \"Hedera Mainnet\",\n symbol: \"HBAR\",\n decimals: 8,\n rpcUrls: [\"https://mainnet.hashio.io/api\"],\n blockExplorerUrls: [\"https://hashscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n bitTorrentTestnet: {\n contractAddress: null,\n chainId: 1028,\n name: \"BitTorrent Testnet\",\n symbol: \"BTT\",\n decimals: 18,\n rpcUrls: [\"https://test-rpc.bittorrentchain.io\"],\n blockExplorerUrls: [\"https://testnet.bttcscan.com\"],\n type: null,\n vmType: \"EVM\"\n },\n storyOdyssey: {\n contractAddress: null,\n chainId: 1516,\n name: \"Story Odyssey\",\n symbol: \"IP\",\n decimals: 18,\n rpcUrls: [\"https://rpc.odyssey.storyrpc.io\"],\n blockExplorerUrls: [\"https://odyssey.storyscan.xyz\"],\n type: null,\n vmType: \"EVM\"\n },\n campTestnet: {\n contractAddress: null,\n chainId: 325e3,\n name: \"Camp Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.camp-network-testnet.gelato.digital\"],\n blockExplorerUrls: [\"https://camp-network-testnet.blockscout.com\"],\n type: null,\n vmType: \"EVM\"\n },\n hushedNorthstar: {\n contractAddress: null,\n chainId: 42161,\n name: \"Hushed Northstar Devnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.buildbear.io/yielddev\"],\n blockExplorerUrls: [\"https://explorer.buildbear.io/yielddev/transactions\"],\n type: null,\n vmType: \"EVM\"\n },\n amoy: {\n contractAddress: null,\n chainId: 80002,\n name: \"Amoy\",\n symbol: \"POL\",\n decimals: 18,\n rpcUrls: [\"https://rpc-amoy.polygon.technology\"],\n blockExplorerUrls: [\"https://amoy.polygonscan.com\"],\n type: null,\n vmType: \"EVM\"\n },\n matchain: {\n contractAddress: null,\n chainId: 698,\n name: \"Matchain\",\n symbol: \"BNB\",\n decimals: 18,\n rpcUrls: [\"https://rpc.matchain.io\"],\n blockExplorerUrls: [\"https://matchscan.io\"],\n type: null,\n vmType: \"EVM\"\n },\n coreDao: {\n contractAddress: null,\n chainId: 1116,\n name: \"Core DAO\",\n symbol: \"CORE\",\n decimals: 18,\n rpcUrls: [\"https://rpc.coredao.org\"],\n blockExplorerUrls: [\"https://scan.coredao.org/\"],\n type: null,\n vmType: \"EVM\"\n },\n zkCandySepoliaTestnet: {\n contractAddress: null,\n chainId: 302,\n name: \"ZKcandy Sepolia Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://sepolia.rpc.zkcandy.io\"],\n blockExplorerUrls: [\"https://sepolia.explorer.zkcandy.io\"],\n type: null,\n vmType: \"EVM\"\n },\n vana: {\n contractAddress: null,\n chainId: 1480,\n name: \"Vana\",\n symbol: \"VANA\",\n decimals: 18,\n rpcUrls: [\"https://rpc.vana.org\"],\n blockExplorerUrls: [\"https://vanascan.io\"],\n type: null,\n vmType: \"EVM\"\n },\n moksha: {\n contractAddress: null,\n chainId: 1480,\n name: \"Vana\",\n symbol: \"VANA\",\n decimals: 18,\n rpcUrls: [\"https://rpc.moksha.vana.org\"],\n blockExplorerUrls: [\"https://moksha.vanascan.io\"],\n type: null,\n vmType: \"EVM\"\n },\n rootstock: {\n contractAddress: null,\n chainId: 30,\n name: \"Rootstock\",\n symbol: \"RBTC\",\n decimals: 18,\n rpcUrls: [\"https://public-node.rsk.co\"],\n blockExplorerUrls: [\"https://rootstock-testnet.blockscout.com/\"],\n type: null,\n vmType: \"EVM\"\n },\n rootstockTestnet: {\n contractAddress: null,\n chainId: 31,\n name: \"Rootstock Testnet\",\n symbol: \"tRBTC\",\n decimals: 18,\n rpcUrls: [\"https://public-node.testnet.rsk.co\"],\n blockExplorerUrls: [\"https://explorer.testnet.rootstock.io\"],\n type: null,\n vmType: \"EVM\"\n },\n merlin: {\n contractAddress: null,\n chainId: 4200,\n name: \"Merlin\",\n symbol: \"BTC\",\n decimals: 18,\n rpcUrls: [\"https://endpoints.omniatech.io/v1/merlin/mainnet/public\"],\n blockExplorerUrls: [\"https://scan.merlinchain.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n merlinTestnet: {\n contractAddress: null,\n chainId: 686868,\n name: \"Merlin Testnet\",\n symbol: \"BTC\",\n decimals: 18,\n rpcUrls: [\"https://testnet-rpc.merlinchain.io/\"],\n blockExplorerUrls: [\"https://testnet-scan.merlinchain.io\"],\n type: null,\n vmType: \"EVM\"\n },\n bsquared: {\n contractAddress: null,\n chainId: 223,\n name: \"BSquared\",\n symbol: \"BTC\",\n decimals: 18,\n rpcUrls: [\"https://rpc.bsquared.network\"],\n blockExplorerUrls: [\"https://explorer.bsquared.network\"],\n type: null,\n vmType: \"EVM\"\n },\n bsquaredTestnet: {\n contractAddress: null,\n chainId: 1123,\n name: \"BSquared Testnet\",\n symbol: \"tBTC\",\n decimals: 18,\n rpcUrls: [\"https://testnet-rpc.bsquared.network\"],\n blockExplorerUrls: [\"https://testnet-explorer.bsquared.network\"],\n type: null,\n vmType: \"EVM\"\n },\n monadTestnet: {\n contractAddress: null,\n chainId: 10143,\n name: \"Monad Testnet\",\n symbol: \"MON\",\n decimals: 18,\n rpcUrls: [\"https://testnet-rpc.monad.xyz\"],\n blockExplorerUrls: [\"https://testnet.monadexplorer.com\"],\n type: null,\n vmType: \"EVM\"\n },\n bitlayer: {\n contractAddress: null,\n chainId: 200901,\n name: \"Bitlayer\",\n symbol: \"BTC\",\n decimals: 18,\n rpcUrls: [\"https://rpc.bitlayer.org\"],\n blockExplorerUrls: [\"https://www.btrscan.com\"],\n type: null,\n vmType: \"EVM\"\n },\n bitlayerTestnet: {\n contractAddress: null,\n chainId: 200810,\n name: \"Bitlayer Testnet\",\n symbol: \"BTC\",\n decimals: 18,\n rpcUrls: [\"https://testnet-rpc.bitlayer.org\"],\n blockExplorerUrls: [\"https://testnet-scan.bitlayer.org\"],\n type: null,\n vmType: \"EVM\"\n },\n \"5ire\": {\n contractAddress: null,\n chainId: 995,\n name: \"5irechain\",\n symbol: \"5ire\",\n decimals: 18,\n rpcUrls: [\"https://rpc.5ire.network\"],\n blockExplorerUrls: [\"https://5irescan.io/dashboard\"],\n type: null,\n vmType: \"EVM\"\n },\n bob: {\n contractAddress: null,\n chainId: 60808,\n name: \"Bob\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.gobob.xyzg\"],\n blockExplorerUrls: [\"https://explorer.gobob.xyz\"],\n type: null,\n vmType: \"EVM\"\n },\n load: {\n contractAddress: null,\n chainId: 9496,\n name: \"Load Network\",\n symbol: \"LOAD\",\n decimals: 18,\n rpcUrls: [\"https://alphanet.load.network\"],\n blockExplorerUrls: [\"https://explorer.load.network\"],\n type: null,\n vmType: \"EVM\"\n },\n \"0gGalileoTestnet\": {\n contractAddress: null,\n chainId: 16601,\n name: \"0G Galileo Testnet\",\n symbol: \"OG\",\n decimals: 18,\n rpcUrls: [\"https://evmrpc-testnet.0g.ai\"],\n blockExplorerUrls: [\"https://chainscan-galileo.0g.ai/\"],\n type: null,\n vmType: \"EVM\"\n },\n peaqTestnet: {\n contractAddress: null,\n chainId: 9990,\n name: \"Peaq Testnet\",\n symbol: \"PEAQ\",\n decimals: 18,\n rpcUrls: [\"https://peaq-agung.api.onfinality.io/public\"],\n blockExplorerUrls: [\"https://agung-testnet.subscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n peaqMainnet: {\n contractAddress: null,\n chainId: 3338,\n name: \"Peaq Mainnet\",\n symbol: \"PEAQ\",\n decimals: 18,\n rpcUrls: [\"https://quicknode.peaq.xyz/\"],\n blockExplorerUrls: [\"https://peaq.subscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n sonicMainnet: {\n contractAddress: null,\n chainId: 146,\n name: \"Sonic Mainnet\",\n symbol: \"S\",\n decimals: 18,\n rpcUrls: [\"https://rpc.soniclabs.com\"],\n blockExplorerUrls: [\"https://sonicscan.org\"],\n type: null,\n vmType: \"EVM\"\n },\n sonicBlazeTestnet: {\n contractAddress: null,\n chainId: 57054,\n name: \"Sonic Blaze Testnet\",\n symbol: \"S\",\n decimals: 18,\n rpcUrls: [\"https://rpc.blaze.soniclabs.com\"],\n blockExplorerUrls: [\"https://testnet.sonicscan.org/\"],\n type: null,\n vmType: \"EVM\"\n },\n holeskyTestnet: {\n contractAddress: null,\n chainId: 17e3,\n name: \"Holesky Testnet\",\n symbol: \"ETH\",\n decimals: 18,\n rpcUrls: [\"https://rpc.holesky.ethpandaops.io\"],\n blockExplorerUrls: [\"https://holesky.etherscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n flowEvmMainnet: {\n contractAddress: null,\n chainId: 747,\n name: \"Flow EVM Mainnet\",\n symbol: \"FLOW\",\n decimals: 18,\n rpcUrls: [\"https://mainnet.evm.nodes.onflow.org\"],\n blockExplorerUrls: [\"https://evm.flowscan.io/\"],\n type: null,\n vmType: \"EVM\"\n },\n flowEvmTestnet: {\n contractAddress: null,\n chainId: 545,\n name: \"Flow EVM Testnet\",\n symbol: \"FLOW\",\n decimals: 18,\n rpcUrls: [\"https://testnet.evm.nodes.onflow.org\"],\n blockExplorerUrls: [\"https://evm-testnet.flowscan.io\"],\n type: null,\n vmType: \"EVM\"\n }\n };\n exports3.METAMASK_CHAIN_INFO = {\n /**\n * Information about the \"chronicleYellowstone\" chain.\n */\n yellowstone: {\n chainId: exports3.LIT_CHAINS[\"yellowstone\"].chainId,\n chainName: exports3.LIT_CHAINS[\"yellowstone\"].name,\n nativeCurrency: {\n name: exports3.LIT_CHAINS[\"yellowstone\"].symbol,\n symbol: exports3.LIT_CHAINS[\"yellowstone\"].symbol,\n decimals: exports3.LIT_CHAINS[\"yellowstone\"].decimals\n },\n rpcUrls: exports3.LIT_CHAINS[\"yellowstone\"].rpcUrls,\n blockExplorerUrls: exports3.LIT_CHAINS[\"yellowstone\"].blockExplorerUrls,\n iconUrls: [\"future\"]\n }\n };\n exports3.metamaskChainInfo = new Proxy(exports3.METAMASK_CHAIN_INFO, {\n get(target, prop, receiver) {\n deprecated(\"metamaskChainInfo is deprecated and will be removed in a future version. Use METAMASK_CHAIN_INFO instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LIT_RPC = {\n /**\n * Local Anvil RPC endpoint.\n */\n LOCAL_ANVIL: \"http://127.0.0.1:8545\",\n /**\n * Chronicle Yellowstone RPC endpoint - used for >= Datil-test\n * More info: https://app.conduit.xyz/published/view/chronicle-yellowstone-testnet-9qgmzfcohk\n */\n CHRONICLE_YELLOWSTONE: \"https://yellowstone-rpc.litprotocol.com\"\n };\n exports3.LIT_EVM_CHAINS = exports3.LIT_CHAINS;\n exports3.LIT_NETWORK = {\n DatilDev: \"datil-dev\",\n DatilTest: \"datil-test\",\n Datil: \"datil\",\n Custom: \"custom\"\n };\n exports3.LitNetwork = new Proxy(exports3.LIT_NETWORK, {\n get(target, prop, receiver) {\n deprecated(\"LitNetwork is deprecated and will be removed in a future version. Use LIT_NETWORK instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.RPC_URL_BY_NETWORK = {\n \"datil-dev\": exports3.LIT_RPC.CHRONICLE_YELLOWSTONE,\n \"datil-test\": exports3.LIT_RPC.CHRONICLE_YELLOWSTONE,\n datil: exports3.LIT_RPC.CHRONICLE_YELLOWSTONE,\n custom: exports3.LIT_RPC.LOCAL_ANVIL\n };\n exports3.RELAYER_URL_BY_NETWORK = {\n \"datil-dev\": \"https://datil-dev-relayer.getlit.dev\",\n \"datil-test\": \"https://datil-test-relayer.getlit.dev\",\n datil: \"https://datil-relayer.getlit.dev\",\n custom: \"http://localhost:3000\"\n };\n exports3.METAMASK_CHAIN_INFO_BY_NETWORK = {\n \"datil-dev\": exports3.METAMASK_CHAIN_INFO.yellowstone,\n \"datil-test\": exports3.METAMASK_CHAIN_INFO.yellowstone,\n datil: exports3.METAMASK_CHAIN_INFO.yellowstone,\n custom: exports3.METAMASK_CHAIN_INFO.yellowstone\n };\n exports3.HTTP = \"http://\";\n exports3.HTTPS = \"https://\";\n exports3.HTTP_BY_NETWORK = {\n \"datil-dev\": exports3.HTTPS,\n \"datil-test\": exports3.HTTPS,\n datil: exports3.HTTPS,\n custom: exports3.HTTP\n // default, can be changed by config\n };\n exports3.CENTRALISATION_BY_NETWORK = {\n \"datil-dev\": \"centralised\",\n \"datil-test\": \"decentralised\",\n datil: \"decentralised\",\n custom: \"unknown\"\n };\n exports3.LIT_SVM_CHAINS = {\n solana: {\n name: \"Solana\",\n symbol: \"SOL\",\n decimals: 9,\n rpcUrls: [\"https://api.mainnet-beta.solana.com\"],\n blockExplorerUrls: [\"https://explorer.solana.com/\"],\n vmType: \"SVM\"\n },\n solanaDevnet: {\n name: \"Solana Devnet\",\n symbol: \"SOL\",\n decimals: 9,\n rpcUrls: [\"https://api.devnet.solana.com\"],\n blockExplorerUrls: [\"https://explorer.solana.com/\"],\n vmType: \"SVM\"\n },\n solanaTestnet: {\n name: \"Solana Testnet\",\n symbol: \"SOL\",\n decimals: 9,\n rpcUrls: [\"https://api.testnet.solana.com\"],\n blockExplorerUrls: [\"https://explorer.solana.com/\"],\n vmType: \"SVM\"\n }\n };\n exports3.LIT_COSMOS_CHAINS = {\n cosmos: {\n name: \"Cosmos\",\n symbol: \"ATOM\",\n decimals: 6,\n chainId: \"cosmoshub-4\",\n rpcUrls: [\"https://lcd-cosmoshub.keplr.app\"],\n blockExplorerUrls: [\"https://atomscan.com/\"],\n vmType: \"CVM\"\n },\n kyve: {\n name: \"Kyve\",\n symbol: \"KYVE\",\n decimals: 6,\n chainId: \"korellia\",\n rpcUrls: [\"https://api.korellia.kyve.network\"],\n blockExplorerUrls: [\"https://explorer.kyve.network/\"],\n vmType: \"CVM\"\n },\n evmosCosmos: {\n name: \"EVMOS Cosmos\",\n symbol: \"EVMOS\",\n decimals: 18,\n chainId: \"evmos_9001-2\",\n rpcUrls: [\"https://rest.bd.evmos.org:1317\"],\n blockExplorerUrls: [\"https://evmos.bigdipper.live\"],\n vmType: \"CVM\"\n },\n evmosCosmosTestnet: {\n name: \"Evmos Cosmos Testnet\",\n symbol: \"EVMOS\",\n decimals: 18,\n chainId: \"evmos_9000-4\",\n rpcUrls: [\"https://rest.bd.evmos.dev:1317\"],\n blockExplorerUrls: [\"https://testnet.bigdipper.live\"],\n vmType: \"CVM\"\n },\n cheqdMainnet: {\n name: \"Cheqd Mainnet\",\n symbol: \"CHEQ\",\n decimals: 9,\n chainId: \"cheqd-mainnet-1\",\n rpcUrls: [\"https://api.cheqd.net\"],\n blockExplorerUrls: [\"https://explorer.cheqd.io\"],\n vmType: \"CVM\"\n },\n cheqdTestnet: {\n name: \"Cheqd Testnet\",\n symbol: \"CHEQ\",\n decimals: 9,\n chainId: \"cheqd-testnet-6\",\n rpcUrls: [\"https://api.cheqd.network\"],\n blockExplorerUrls: [\"https://testnet-explorer.cheqd.io\"],\n vmType: \"CVM\"\n },\n juno: {\n name: \"Juno\",\n symbol: \"JUNO\",\n decimals: 6,\n chainId: \"juno-1\",\n rpcUrls: [\"https://rest.cosmos.directory/juno\"],\n blockExplorerUrls: [\"https://www.mintscan.io/juno\"],\n vmType: \"CVM\"\n }\n };\n exports3.ALL_LIT_CHAINS = {\n ...exports3.LIT_CHAINS,\n ...exports3.LIT_SVM_CHAINS,\n ...exports3.LIT_COSMOS_CHAINS\n };\n exports3.LOCAL_STORAGE_KEYS = {\n AUTH_COSMOS_SIGNATURE: \"lit-auth-cosmos-signature\",\n AUTH_SIGNATURE: \"lit-auth-signature\",\n AUTH_SOL_SIGNATURE: \"lit-auth-sol-signature\",\n WEB3_PROVIDER: \"lit-web3-provider\",\n KEY_PAIR: \"lit-comms-keypair\",\n SESSION_KEY: \"lit-session-key\",\n WALLET_SIGNATURE: \"lit-wallet-sig\"\n };\n exports3.SYMM_KEY_ALGO_PARAMS = {\n name: \"AES-CBC\",\n length: 256\n };\n exports3.LIT_NETWORKS = {\n \"datil-dev\": [],\n \"datil-test\": [],\n datil: [],\n custom: []\n };\n exports3.LIT_SESSION_KEY_URI = \"lit:session:\";\n exports3.AUTH_METHOD_TYPE_IDS = {\n WEBAUTHN: 3,\n DISCORD: 4,\n GOOGLE: 5,\n GOOGLE_JWT: 6\n };\n exports3.PKP_CLIENT_SUPPORTED_CHAINS = [\"eth\", \"cosmos\"];\n exports3.SIWE_DELEGATION_URI = \"lit:capability:delegation\";\n exports3.LIT_ACTION_IPFS_HASH = \"QmUjX8MW6StQ7NKNdaS6g4RMkvN5hcgtKmEi8Mca6oX4t3\";\n exports3.VMTYPE = {\n EVM: \"EVM\",\n SVM: \"SVM\",\n CVM: \"CVM\"\n };\n exports3.LIT_CURVE = {\n BLS: \"BLS\",\n EcdsaK256: \"K256\",\n EcdsaCaitSith: \"ECDSA_CAIT_SITH\",\n // Legacy alias of K256\n EcdsaCAITSITHP256: \"EcdsaCaitSithP256\"\n };\n exports3.EITHER_TYPE = {\n ERROR: \"ERROR\",\n SUCCESS: \"SUCCESS\"\n };\n exports3.AUTH_METHOD_TYPE = {\n EthWallet: 1,\n LitAction: 2,\n WebAuthn: 3,\n Discord: 4,\n Google: 5,\n GoogleJwt: 6,\n AppleJwt: 8,\n StytchOtp: 9,\n StytchEmailFactorOtp: 10,\n StytchSmsFactorOtp: 11,\n StytchWhatsAppFactorOtp: 12,\n StytchTotpFactorOtp: 13\n };\n exports3.AuthMethodType = new Proxy(exports3.AUTH_METHOD_TYPE, {\n get(target, prop, receiver) {\n deprecated(\"AuthMethodType is deprecated and will be removed in a future version. Use AUTH_METHOD_TYPE instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.AUTH_METHOD_SCOPE = {\n NoPermissions: 0,\n SignAnything: 1,\n PersonalSign: 2\n };\n exports3.AuthMethodScope = new Proxy(exports3.AUTH_METHOD_SCOPE, {\n get(target, prop, receiver) {\n deprecated(\"AuthMethodScope is deprecated and will be removed in a future version. Use AUTH_METHOD_SCOPE instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.PROVIDER_TYPE = {\n Discord: \"discord\",\n Google: \"google\",\n EthWallet: \"ethwallet\",\n WebAuthn: \"webauthn\",\n Apple: \"apple\",\n StytchOtp: \"stytchOtp\",\n StytchEmailFactorOtp: \"stytchEmailFactorOtp\",\n StytchSmsFactorOtp: \"stytchSmsFactorOtp\",\n StytchWhatsAppFactorOtp: \"stytchWhatsAppFactorOtp\",\n StytchTotpFactor: \"stytchTotpFactor\"\n };\n exports3.ProviderType = new Proxy(exports3.PROVIDER_TYPE, {\n get(target, prop, receiver) {\n deprecated(\"ProviderType is deprecated and will be removed in a future version. Use PROVIDER_TYPE instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.STAKING_STATES = {\n Active: 0,\n NextValidatorSetLocked: 1,\n ReadyForNextEpoch: 2,\n Unlocked: 3,\n Paused: 4,\n Restore: 5\n };\n exports3.StakingStates = new Proxy(exports3.STAKING_STATES, {\n get(target, prop, receiver) {\n deprecated(\"StakingStates is deprecated and will be removed in a future version. Use STAKING_STATES instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.RELAY_AUTH_STATUS = {\n InProgress: \"InProgress\",\n Succeeded: \"Succeeded\",\n Failed: \"Failed\"\n };\n exports3.RelayAuthStatus = new Proxy(exports3.RELAY_AUTH_STATUS, {\n get(target, prop, receiver) {\n deprecated(\"RelayAuthStatus is deprecated and will be removed in a future version. Use RELAY_AUTH_STATUS instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LIT_RESOURCE_PREFIX = {\n AccessControlCondition: \"lit-accesscontrolcondition\",\n PKP: \"lit-pkp\",\n RLI: \"lit-ratelimitincrease\",\n LitAction: \"lit-litaction\"\n };\n exports3.LitResourcePrefix = new Proxy(exports3.LIT_RESOURCE_PREFIX, {\n get(target, prop, receiver) {\n deprecated(\"LitResourcePrefix is deprecated and will be removed in a future version. Use LIT_RESOURCE_PREFIX instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LIT_ABILITY = {\n /**\n * This is the ability to process an encryption access control condition.\n * The resource will specify the corresponding hashed key value of the\n * access control condition.\n */\n AccessControlConditionDecryption: \"access-control-condition-decryption\",\n /**\n * This is the ability to process a signing access control condition.\n * The resource will specify the corresponding hashed key value of the\n * access control condition.\n */\n AccessControlConditionSigning: \"access-control-condition-signing\",\n /**\n * This is the ability to use a PKP for signing purposes. The resource will specify\n * the corresponding PKP token ID.\n */\n PKPSigning: \"pkp-signing\",\n /**\n * This is the ability to use a Rate Limit Increase (Capacity Credits NFT) token during\n * authentication with the nodes. The resource will specify the corresponding\n * Capacity Credits NFT token ID.\n */\n RateLimitIncreaseAuth: \"rate-limit-increase-auth\",\n /**\n * This is the ability to execute a Lit Action. The resource will specify the\n * corresponding Lit Action IPFS CID.\n */\n LitActionExecution: \"lit-action-execution\"\n };\n exports3.LitAbility = new Proxy(exports3.LIT_ABILITY, {\n get(target, prop, receiver) {\n deprecated(\"LitAbility is deprecated and will be removed in a future version. Use LIT_ABILITY instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LIT_RECAP_ABILITY = {\n Decryption: \"Decryption\",\n Signing: \"Signing\",\n Auth: \"Auth\",\n Execution: \"Execution\"\n };\n exports3.LitRecapAbility = new Proxy(exports3.LIT_RECAP_ABILITY, {\n get(target, prop, receiver) {\n deprecated(\"LitRecapAbility is deprecated and will be removed in a future version. Use LIT_RECAP_ABILITY instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LIT_NAMESPACE = {\n Auth: \"Auth\",\n Threshold: \"Threshold\"\n };\n exports3.LitNamespace = new Proxy(exports3.LIT_NAMESPACE, {\n get(target, prop, receiver) {\n deprecated(\"LitNamespace is deprecated and will be removed in a future version. Use LIT_NAMESPACE instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LOG_LEVEL = {\n INFO: 0,\n DEBUG: 1,\n WARN: 2,\n ERROR: 3,\n FATAL: 4,\n TIMING_START: 5,\n TIMING_END: 6,\n OFF: -1\n };\n exports3.LogLevel = new Proxy(exports3.LOG_LEVEL, {\n get(target, prop, receiver) {\n deprecated(\"LogLevel is deprecated and will be removed in a future version. Use LOG_LEVEL instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.FALLBACK_IPFS_GATEWAYS = [\n \"https://flk-ipfs.io/ipfs/\",\n \"https://litprotocol.mypinata.cloud/ipfs/\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/constants/mappers.js\n var require_mappers2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/constants/mappers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.GLOBAL_OVERWRITE_IPFS_CODE_BY_NETWORK = exports3.NETWORK_CONTEXT_BY_NETWORK = void 0;\n var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));\n var depd_1 = tslib_1.__importDefault(require_browser());\n var contracts_1 = require_dist();\n var deprecated = (0, depd_1.default)(\"lit-js-sdk:constants:mappers\");\n exports3.NETWORK_CONTEXT_BY_NETWORK = {\n \"datil-dev\": contracts_1.datilDev,\n \"datil-test\": contracts_1.datilTest,\n datil: contracts_1.datil,\n // just use datil dev abis for custom\n custom: contracts_1.datilDev\n };\n exports3.GLOBAL_OVERWRITE_IPFS_CODE_BY_NETWORK = {\n \"datil-dev\": false,\n \"datil-test\": false,\n datil: false,\n custom: false\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/constants/endpoints.js\n var require_endpoints2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/constants/endpoints.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LIT_ENDPOINT = exports3.LIT_ENDPOINT_VERSION = void 0;\n exports3.LIT_ENDPOINT_VERSION = {\n V0: \"/\",\n V1: \"/v1\"\n };\n exports3.LIT_ENDPOINT = {\n HANDSHAKE: {\n path: \"/web/handshake\",\n version: exports3.LIT_ENDPOINT_VERSION.V0\n },\n SIGN_SESSION_KEY: {\n path: \"/web/sign_session_key\",\n version: exports3.LIT_ENDPOINT_VERSION.V1\n },\n EXECUTE_JS: {\n path: \"/web/execute\",\n version: exports3.LIT_ENDPOINT_VERSION.V1\n },\n PKP_SIGN: {\n path: \"/web/pkp/sign\",\n version: exports3.LIT_ENDPOINT_VERSION.V1\n },\n PKP_CLAIM: {\n path: \"/web/pkp/claim\",\n version: exports3.LIT_ENDPOINT_VERSION.V0\n },\n SIGN_ACCS: {\n path: \"/web/signing/access_control_condition\",\n version: exports3.LIT_ENDPOINT_VERSION.V0\n },\n ENCRYPTION_SIGN: {\n path: \"/web/encryption/sign\",\n version: exports3.LIT_ENDPOINT_VERSION.V0\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/interfaces/i-errors.js\n var require_i_errors2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/interfaces/i-errors.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/errors.js\n var require_errors3 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/errors.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WrongParamFormat = exports3.WrongNetworkException = exports3.WasmInitError = exports3.WalletSignatureNotFoundError = exports3.UnsupportedMethodError = exports3.UnsupportedChainException = exports3.UnknownSignatureType = exports3.UnknownSignatureError = exports3.UnknownError = exports3.UnknownDecryptionAlgorithmTypeError = exports3.UnauthorizedException = exports3.TransactionError = exports3.RemovedFunctionError = exports3.ParamsMissingError = exports3.ParamNullError = exports3.NodejsException = exports3.NodeError = exports3.NoWalletException = exports3.NoValidShares = exports3.NetworkError = exports3.MintingNotSupported = exports3.LocalStorageItemNotSetException = exports3.LocalStorageItemNotRemovedException = exports3.LocalStorageItemNotFoundException = exports3.LitNodeClientNotReadyError = exports3.LitNodeClientBadConfigError = exports3.InvalidUnifiedConditionType = exports3.InvalidSignatureError = exports3.InvalidParamType = exports3.InvalidNodeAttestation = exports3.InvalidSessionSigs = exports3.InvalidEthBlockhash = exports3.InvalidBooleanException = exports3.InvalidArgumentException = exports3.InvalidAccessControlConditions = exports3.InitError = exports3.AutomationError = exports3.MultiError = exports3.LitError = exports3.LIT_ERROR_CODE = exports3.LIT_ERROR = exports3.LitErrorKind = exports3.LIT_ERROR_KIND = void 0;\n var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));\n var verror_1 = require_verror();\n var depd_1 = tslib_1.__importDefault(require_browser());\n var deprecated = (0, depd_1.default)(\"lit-js-sdk:constants:errors\");\n exports3.LIT_ERROR_KIND = {\n Unknown: \"Unknown\",\n Unexpected: \"Unexpected\",\n Generic: \"Generic\",\n Config: \"Config\",\n Validation: \"Validation\",\n Conversion: \"Conversion\",\n Parser: \"Parser\",\n Serializer: \"Serializer\",\n Timeout: \"Timeout\"\n };\n exports3.LitErrorKind = new Proxy(exports3.LIT_ERROR_KIND, {\n get(target, prop, receiver) {\n deprecated(\"LitErrorKind is deprecated and will be removed in a future version. Use LIT_ERROR_KIND instead.\");\n return Reflect.get(target, prop, receiver);\n }\n });\n exports3.LIT_ERROR = {\n INVALID_PARAM_TYPE: {\n name: \"InvalidParamType\",\n code: \"invalid_param_type\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n INVALID_ACCESS_CONTROL_CONDITIONS: {\n name: \"InvalidAccessControlConditions\",\n code: \"invalid_access_control_conditions\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n WRONG_NETWORK_EXCEPTION: {\n name: \"WrongNetworkException\",\n code: \"wrong_network_exception\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n MINTING_NOT_SUPPORTED: {\n name: \"MintingNotSupported\",\n code: \"minting_not_supported\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n UNSUPPORTED_CHAIN_EXCEPTION: {\n name: \"UnsupportedChainException\",\n code: \"unsupported_chain_exception\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n INVALID_UNIFIED_CONDITION_TYPE: {\n name: \"InvalidUnifiedConditionType\",\n code: \"invalid_unified_condition_type\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n LIT_NODE_CLIENT_NOT_READY_ERROR: {\n name: \"LitNodeClientNotReadyError\",\n code: \"lit_node_client_not_ready_error\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n UNAUTHORIZED_EXCEPTION: {\n name: \"UnauthorizedException\",\n code: \"unauthorized_exception\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n INVALID_ARGUMENT_EXCEPTION: {\n name: \"InvalidArgumentException\",\n code: \"invalid_argument_exception\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n INVALID_BOOLEAN_EXCEPTION: {\n name: \"InvalidBooleanException\",\n code: \"invalid_boolean_exception\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n UNKNOWN_ERROR: {\n name: \"UnknownError\",\n code: \"unknown_error\",\n kind: exports3.LIT_ERROR_KIND.Unknown\n },\n NO_WALLET_EXCEPTION: {\n name: \"NoWalletException\",\n code: \"no_wallet_exception\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n WRONG_PARAM_FORMAT: {\n name: \"WrongParamFormat\",\n code: \"wrong_param_format\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n LOCAL_STORAGE_ITEM_NOT_FOUND_EXCEPTION: {\n name: \"LocalStorageItemNotFoundException\",\n code: \"local_storage_item_not_found_exception\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n LOCAL_STORAGE_ITEM_NOT_SET_EXCEPTION: {\n name: \"LocalStorageItemNotSetException\",\n code: \"local_storage_item_not_set_exception\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n LOCAL_STORAGE_ITEM_NOT_REMOVED_EXCEPTION: {\n name: \"LocalStorageItemNotRemovedException\",\n code: \"local_storage_item_not_removed_exception\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n REMOVED_FUNCTION_ERROR: {\n name: \"RemovedFunctionError\",\n code: \"removed_function_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n UNSUPPORTED_METHOD_ERROR: {\n name: \"UnsupportedMethodError\",\n code: \"unsupported_method_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n LIT_NODE_CLIENT_BAD_CONFIG_ERROR: {\n name: \"LitNodeClientBadConfigError\",\n code: \"lit_node_client_bad_config_error\",\n kind: exports3.LIT_ERROR_KIND.Config\n },\n PARAMS_MISSING_ERROR: {\n name: \"ParamsMissingError\",\n code: \"params_missing_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n UNKNOWN_SIGNATURE_TYPE: {\n name: \"UnknownSignatureType\",\n code: \"unknown_signature_type\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n UNKNOWN_SIGNATURE_ERROR: {\n name: \"UnknownSignatureError\",\n code: \"unknown_signature_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n INVALID_SIGNATURE_ERROR: {\n name: \"InvalidSignatureError\",\n code: \"invalid_signature_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n PARAM_NULL_ERROR: {\n name: \"ParamNullError\",\n code: \"param_null_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n UNKNOWN_DECRYPTION_ALGORITHM_TYPE_ERROR: {\n name: \"UnknownDecryptionAlgorithmTypeError\",\n code: \"unknown_decryption_algorithm_type_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n WASM_INIT_ERROR: {\n name: \"WasmInitError\",\n code: \"wasm_init_error\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n NODEJS_EXCEPTION: {\n name: \"NodejsException\",\n code: \"nodejs_exception\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n NODE_ERROR: {\n name: \"NodeError\",\n code: \"node_error\",\n kind: exports3.LitErrorKind.Unknown\n },\n WALLET_SIGNATURE_NOT_FOUND_ERROR: {\n name: \"WalletSignatureNotFoundError\",\n code: \"wallet_signature_not_found_error\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n NO_VALID_SHARES: {\n name: \"NoValidShares\",\n code: \"no_valid_shares\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n INVALID_NODE_ATTESTATION: {\n name: \"InvalidNodeAttestation\",\n code: \"invalid_node_attestation\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n INVALID_ETH_BLOCKHASH: {\n name: \"InvalidEthBlockhash\",\n code: \"invalid_eth_blockhash\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n INVALID_SESSION_SIGS: {\n name: \"InvalidSessionSigs\",\n code: \"invalid_session_sigs\",\n kind: exports3.LIT_ERROR_KIND.Validation\n },\n INIT_ERROR: {\n name: \"InitError\",\n code: \"init_error\",\n kind: exports3.LIT_ERROR_KIND.Unexpected\n },\n NETWORK_ERROR: {\n name: \"NetworkError\",\n code: \"network_error\",\n kind: exports3.LitErrorKind.Unexpected\n },\n TRANSACTION_ERROR: {\n name: \"TransactionError\",\n code: \"transaction_error\",\n kind: exports3.LitErrorKind.Unexpected\n },\n AUTOMATION_ERROR: {\n name: \"AutomationError\",\n code: \"automation_error\",\n kind: exports3.LitErrorKind.Unexpected\n }\n };\n exports3.LIT_ERROR_CODE = {\n NODE_NOT_AUTHORIZED: \"NodeNotAuthorized\"\n };\n var LitError = class extends verror_1.VError {\n constructor(options, message2, ...params) {\n super(options, message2, ...params);\n }\n };\n exports3.LitError = LitError;\n function createErrorClass({ name, code, kind }) {\n return class extends LitError {\n // VError has optional options parameter, but we make it required so thrower remembers to pass all the useful info\n constructor(options, message2, ...params) {\n if (options instanceof Error) {\n options = {\n cause: options\n };\n }\n if (!(options.cause instanceof Error)) {\n options.cause = new Error(options.cause);\n }\n super({\n name,\n ...options,\n meta: {\n code,\n kind,\n ...options.meta\n }\n }, message2, ...params);\n }\n };\n }\n var errorClasses = {};\n for (const key in exports3.LIT_ERROR) {\n if (key in exports3.LIT_ERROR) {\n const errorDef = exports3.LIT_ERROR[key];\n errorClasses[errorDef.name] = createErrorClass(errorDef);\n }\n }\n var MultiError = verror_1.VError.MultiError;\n exports3.MultiError = MultiError;\n exports3.AutomationError = errorClasses.AutomationError, exports3.InitError = errorClasses.InitError, exports3.InvalidAccessControlConditions = errorClasses.InvalidAccessControlConditions, exports3.InvalidArgumentException = errorClasses.InvalidArgumentException, exports3.InvalidBooleanException = errorClasses.InvalidBooleanException, exports3.InvalidEthBlockhash = errorClasses.InvalidEthBlockhash, exports3.InvalidSessionSigs = errorClasses.InvalidSessionSigs, exports3.InvalidNodeAttestation = errorClasses.InvalidNodeAttestation, exports3.InvalidParamType = errorClasses.InvalidParamType, exports3.InvalidSignatureError = errorClasses.InvalidSignatureError, exports3.InvalidUnifiedConditionType = errorClasses.InvalidUnifiedConditionType, exports3.LitNodeClientBadConfigError = errorClasses.LitNodeClientBadConfigError, exports3.LitNodeClientNotReadyError = errorClasses.LitNodeClientNotReadyError, exports3.LocalStorageItemNotFoundException = errorClasses.LocalStorageItemNotFoundException, exports3.LocalStorageItemNotRemovedException = errorClasses.LocalStorageItemNotRemovedException, exports3.LocalStorageItemNotSetException = errorClasses.LocalStorageItemNotSetException, exports3.MintingNotSupported = errorClasses.MintingNotSupported, exports3.NetworkError = errorClasses.NetworkError, exports3.NoValidShares = errorClasses.NoValidShares, exports3.NoWalletException = errorClasses.NoWalletException, exports3.NodeError = errorClasses.NodeError, exports3.NodejsException = errorClasses.NodejsException, exports3.ParamNullError = errorClasses.ParamNullError, exports3.ParamsMissingError = errorClasses.ParamsMissingError, exports3.RemovedFunctionError = errorClasses.RemovedFunctionError, exports3.TransactionError = errorClasses.TransactionError, exports3.UnauthorizedException = errorClasses.UnauthorizedException, exports3.UnknownDecryptionAlgorithmTypeError = errorClasses.UnknownDecryptionAlgorithmTypeError, exports3.UnknownError = errorClasses.UnknownError, exports3.UnknownSignatureError = errorClasses.UnknownSignatureError, exports3.UnknownSignatureType = errorClasses.UnknownSignatureType, exports3.UnsupportedChainException = errorClasses.UnsupportedChainException, exports3.UnsupportedMethodError = errorClasses.UnsupportedMethodError, exports3.WalletSignatureNotFoundError = errorClasses.WalletSignatureNotFoundError, exports3.WasmInitError = errorClasses.WasmInitError, exports3.WrongNetworkException = errorClasses.WrongNetworkException, exports3.WrongParamFormat = errorClasses.WrongParamFormat;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/utils/utils.js\n var require_utils9 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/utils/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ELeft = ELeft;\n exports3.ERight = ERight;\n var constants_1 = require_constants5();\n function ELeft(error) {\n return {\n type: constants_1.EITHER_TYPE.ERROR,\n result: error\n };\n }\n function ERight(result) {\n return {\n type: constants_1.EITHER_TYPE.SUCCESS,\n result\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/abis/ERC20.json\n var require_ERC202 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/abis/ERC20.json\"(exports3, module) {\n module.exports = {\n abi: [\n {\n constant: true,\n inputs: [],\n name: \"name\",\n outputs: [\n {\n name: \"\",\n type: \"string\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_spender\",\n type: \"address\"\n },\n {\n name: \"_value\",\n type: \"uint256\"\n }\n ],\n name: \"approve\",\n outputs: [\n {\n name: \"\",\n type: \"bool\"\n }\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n constant: true,\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n name: \"\",\n type: \"uint256\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_from\",\n type: \"address\"\n },\n {\n name: \"_to\",\n type: \"address\"\n },\n {\n name: \"_value\",\n type: \"uint256\"\n }\n ],\n name: \"transferFrom\",\n outputs: [\n {\n name: \"\",\n type: \"bool\"\n }\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n constant: true,\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n name: \"\",\n type: \"uint8\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n constant: true,\n inputs: [\n {\n name: \"_owner\",\n type: \"address\"\n }\n ],\n name: \"balanceOf\",\n outputs: [\n {\n name: \"balance\",\n type: \"uint256\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n constant: true,\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n name: \"\",\n type: \"string\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_to\",\n type: \"address\"\n },\n {\n name: \"_value\",\n type: \"uint256\"\n }\n ],\n name: \"transfer\",\n outputs: [\n {\n name: \"\",\n type: \"bool\"\n }\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n constant: true,\n inputs: [\n {\n name: \"_owner\",\n type: \"address\"\n },\n {\n name: \"_spender\",\n type: \"address\"\n }\n ],\n name: \"allowance\",\n outputs: [\n {\n name: \"\",\n type: \"uint256\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n payable: true,\n stateMutability: \"payable\",\n type: \"fallback\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: \"owner\",\n type: \"address\"\n },\n {\n indexed: true,\n name: \"spender\",\n type: \"address\"\n },\n {\n indexed: false,\n name: \"value\",\n type: \"uint256\"\n }\n ],\n name: \"Approval\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: \"from\",\n type: \"address\"\n },\n {\n indexed: true,\n name: \"to\",\n type: \"address\"\n },\n {\n indexed: false,\n name: \"value\",\n type: \"uint256\"\n }\n ],\n name: \"Transfer\",\n type: \"event\"\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/abis/LIT.json\n var require_LIT2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/lib/abis/LIT.json\"(exports3, module) {\n module.exports = {\n contractName: \"LIT\",\n abi: [\n {\n inputs: [],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"operator\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\"\n }\n ],\n name: \"ApprovalForAll\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"userAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address payable\",\n name: \"relayerAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"functionSignature\",\n type: \"bytes\"\n }\n ],\n name: \"MetaTransactionExecuted\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"operator\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"ids\",\n type: \"uint256[]\"\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"values\",\n type: \"uint256[]\"\n }\n ],\n name: \"TransferBatch\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"operator\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"id\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\"\n }\n ],\n name: \"TransferSingle\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"string\",\n name: \"value\",\n type: \"string\"\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"id\",\n type: \"uint256\"\n }\n ],\n name: \"URI\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"ERC712_VERSION\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"id\",\n type: \"uint256\"\n }\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"accounts\",\n type: \"address[]\"\n },\n {\n internalType: \"uint256[]\",\n name: \"ids\",\n type: \"uint256[]\"\n }\n ],\n name: \"balanceOfBatch\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"userAddress\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"functionSignature\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes32\",\n name: \"sigR\",\n type: \"bytes32\"\n },\n {\n internalType: \"bytes32\",\n name: \"sigS\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint8\",\n name: \"sigV\",\n type: \"uint8\"\n }\n ],\n name: \"executeMetaTransaction\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\"\n }\n ],\n stateMutability: \"payable\",\n type: \"function\",\n payable: true\n },\n {\n inputs: [],\n name: \"getChainId\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"pure\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [],\n name: \"getDomainSeperator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\"\n }\n ],\n name: \"getNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n internalType: \"uint256[]\",\n name: \"ids\",\n type: \"uint256[]\"\n },\n {\n internalType: \"uint256[]\",\n name: \"amounts\",\n type: \"uint256[]\"\n },\n {\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\"\n }\n ],\n name: \"safeBatchTransferFrom\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"id\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\"\n }\n ],\n name: \"safeTransferFrom\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"operator\",\n type: \"address\"\n },\n {\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\"\n }\n ],\n name: \"setApprovalForAll\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"interfaceId\",\n type: \"bytes4\"\n }\n ],\n name: \"supportsInterface\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [],\n name: \"tokenIds\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n name: \"uri\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"quantity\",\n type: \"uint256\"\n }\n ],\n name: \"mint\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_owner\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"_operator\",\n type: \"address\"\n }\n ],\n name: \"isApprovedForAll\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"isOperator\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\"\n }\n ],\n name: \"setOpenseaProxyEnabled\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newAdmin\",\n type: \"address\"\n }\n ],\n name: \"changeAdmin\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"uri\",\n type: \"string\"\n }\n ],\n name: \"setURI\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getAdmin\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\",\n constant: true\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/index.js\n var require_src2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+constants@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/constants/src/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ABI_ERC20 = exports3.ABI_LIT = void 0;\n var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));\n tslib_1.__exportStar(require_version28(), exports3);\n tslib_1.__exportStar(require_constants5(), exports3);\n tslib_1.__exportStar(require_mappers2(), exports3);\n tslib_1.__exportStar(require_endpoints2(), exports3);\n tslib_1.__exportStar(require_mappers2(), exports3);\n tslib_1.__exportStar(require_i_errors2(), exports3);\n tslib_1.__exportStar(require_errors3(), exports3);\n tslib_1.__exportStar(require_utils9(), exports3);\n var ABI_ERC20 = tslib_1.__importStar(require_ERC202());\n exports3.ABI_ERC20 = ABI_ERC20;\n var ABI_LIT = tslib_1.__importStar(require_LIT2());\n exports3.ABI_LIT = ABI_LIT;\n }\n });\n\n // ../../../node_modules/.pnpm/bech32@2.0.0/node_modules/bech32/dist/index.js\n var require_dist3 = __commonJS({\n \"../../../node_modules/.pnpm/bech32@2.0.0/node_modules/bech32/dist/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.bech32m = exports3.bech32 = void 0;\n var ALPHABET = \"qpzry9x8gf2tvdw0s3jn54khce6mua7l\";\n var ALPHABET_MAP = {};\n for (let z2 = 0; z2 < ALPHABET.length; z2++) {\n const x4 = ALPHABET.charAt(z2);\n ALPHABET_MAP[x4] = z2;\n }\n function polymodStep(pre) {\n const b4 = pre >> 25;\n return (pre & 33554431) << 5 ^ -(b4 >> 0 & 1) & 996825010 ^ -(b4 >> 1 & 1) & 642813549 ^ -(b4 >> 2 & 1) & 513874426 ^ -(b4 >> 3 & 1) & 1027748829 ^ -(b4 >> 4 & 1) & 705979059;\n }\n function prefixChk(prefix) {\n let chk = 1;\n for (let i3 = 0; i3 < prefix.length; ++i3) {\n const c4 = prefix.charCodeAt(i3);\n if (c4 < 33 || c4 > 126)\n return \"Invalid prefix (\" + prefix + \")\";\n chk = polymodStep(chk) ^ c4 >> 5;\n }\n chk = polymodStep(chk);\n for (let i3 = 0; i3 < prefix.length; ++i3) {\n const v2 = prefix.charCodeAt(i3);\n chk = polymodStep(chk) ^ v2 & 31;\n }\n return chk;\n }\n function convert(data, inBits, outBits, pad6) {\n let value = 0;\n let bits = 0;\n const maxV = (1 << outBits) - 1;\n const result = [];\n for (let i3 = 0; i3 < data.length; ++i3) {\n value = value << inBits | data[i3];\n bits += inBits;\n while (bits >= outBits) {\n bits -= outBits;\n result.push(value >> bits & maxV);\n }\n }\n if (pad6) {\n if (bits > 0) {\n result.push(value << outBits - bits & maxV);\n }\n } else {\n if (bits >= inBits)\n return \"Excess padding\";\n if (value << outBits - bits & maxV)\n return \"Non-zero padding\";\n }\n return result;\n }\n function toWords(bytes) {\n return convert(bytes, 8, 5, true);\n }\n function fromWordsUnsafe(words) {\n const res = convert(words, 5, 8, false);\n if (Array.isArray(res))\n return res;\n }\n function fromWords(words) {\n const res = convert(words, 5, 8, false);\n if (Array.isArray(res))\n return res;\n throw new Error(res);\n }\n function getLibraryFromEncoding(encoding) {\n let ENCODING_CONST;\n if (encoding === \"bech32\") {\n ENCODING_CONST = 1;\n } else {\n ENCODING_CONST = 734539939;\n }\n function encode7(prefix, words, LIMIT) {\n LIMIT = LIMIT || 90;\n if (prefix.length + 7 + words.length > LIMIT)\n throw new TypeError(\"Exceeds length limit\");\n prefix = prefix.toLowerCase();\n let chk = prefixChk(prefix);\n if (typeof chk === \"string\")\n throw new Error(chk);\n let result = prefix + \"1\";\n for (let i3 = 0; i3 < words.length; ++i3) {\n const x4 = words[i3];\n if (x4 >> 5 !== 0)\n throw new Error(\"Non 5-bit word\");\n chk = polymodStep(chk) ^ x4;\n result += ALPHABET.charAt(x4);\n }\n for (let i3 = 0; i3 < 6; ++i3) {\n chk = polymodStep(chk);\n }\n chk ^= ENCODING_CONST;\n for (let i3 = 0; i3 < 6; ++i3) {\n const v2 = chk >> (5 - i3) * 5 & 31;\n result += ALPHABET.charAt(v2);\n }\n return result;\n }\n function __decode(str, LIMIT) {\n LIMIT = LIMIT || 90;\n if (str.length < 8)\n return str + \" too short\";\n if (str.length > LIMIT)\n return \"Exceeds length limit\";\n const lowered = str.toLowerCase();\n const uppered = str.toUpperCase();\n if (str !== lowered && str !== uppered)\n return \"Mixed-case string \" + str;\n str = lowered;\n const split3 = str.lastIndexOf(\"1\");\n if (split3 === -1)\n return \"No separator character for \" + str;\n if (split3 === 0)\n return \"Missing prefix for \" + str;\n const prefix = str.slice(0, split3);\n const wordChars = str.slice(split3 + 1);\n if (wordChars.length < 6)\n return \"Data too short\";\n let chk = prefixChk(prefix);\n if (typeof chk === \"string\")\n return chk;\n const words = [];\n for (let i3 = 0; i3 < wordChars.length; ++i3) {\n const c4 = wordChars.charAt(i3);\n const v2 = ALPHABET_MAP[c4];\n if (v2 === void 0)\n return \"Unknown character \" + c4;\n chk = polymodStep(chk) ^ v2;\n if (i3 + 6 >= wordChars.length)\n continue;\n words.push(v2);\n }\n if (chk !== ENCODING_CONST)\n return \"Invalid checksum for \" + str;\n return { prefix, words };\n }\n function decodeUnsafe(str, LIMIT) {\n const res = __decode(str, LIMIT);\n if (typeof res === \"object\")\n return res;\n }\n function decode4(str, LIMIT) {\n const res = __decode(str, LIMIT);\n if (typeof res === \"object\")\n return res;\n throw new Error(res);\n }\n return {\n decodeUnsafe,\n decode: decode4,\n encode: encode7,\n toWords,\n fromWordsUnsafe,\n fromWords\n };\n }\n exports3.bech32 = getLibraryFromEncoding(\"bech32\");\n exports3.bech32m = getLibraryFromEncoding(\"bech32m\");\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+misc@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/misc/src/lib/addresses.js\n var require_addresses2 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+misc@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/misc/src/lib/addresses.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.derivedAddresses = void 0;\n exports3.publicKeyConvert = publicKeyConvert;\n var constants_1 = require_src2();\n var bech32_1 = require_dist3();\n var crypto_1 = (init_empty(), __toCommonJS(empty_exports));\n var ethers_1 = require_lib32();\n var utils_1 = require_utils6();\n function publicKeyConvert(publicKey, compressed = true) {\n if (compressed) {\n if (publicKey.length === 65 && publicKey[0] === 4) {\n const x4 = publicKey.subarray(1, 33);\n const y6 = publicKey.subarray(33, 65);\n const prefix = y6[y6.length - 1] % 2 === 0 ? 2 : 3;\n return Buffer2.concat([Buffer2.from([prefix]), x4]);\n }\n } else {\n if (publicKey.length === 33 && (publicKey[0] === 2 || publicKey[0] === 3)) {\n const x4 = publicKey.subarray(1);\n const y6 = decompressY(publicKey[0], x4);\n return Buffer2.concat([Buffer2.from([4]), x4, y6]);\n }\n }\n return publicKey;\n }\n function decompressY(prefix, x4) {\n const p4 = BigInt(\"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F\");\n const a3 = BigInt(\"0\");\n const b4 = BigInt(\"7\");\n const xBigInt = BigInt(\"0x\" + x4.toString(\"hex\"));\n const rhs = (xBigInt ** 3n + a3 * xBigInt + b4) % p4;\n const yBigInt = modSqrt(rhs, p4);\n const isEven = yBigInt % 2n === 0n;\n const y6 = isEven === (prefix === 2) ? yBigInt : p4 - yBigInt;\n return Buffer2.from(y6.toString(16).padStart(64, \"0\"), \"hex\");\n }\n function modSqrt(a3, p4) {\n return a3 ** ((p4 + 1n) / 4n) % p4;\n }\n function deriveBitcoinAddress(ethPubKey) {\n if (ethPubKey.startsWith(\"0x\")) {\n ethPubKey = ethPubKey.slice(2);\n }\n const pubkeyBuffer = Buffer2.from(ethPubKey, \"hex\");\n const sha256Hash = (0, crypto_1.createHash)(\"sha256\").update(pubkeyBuffer).digest();\n const ripemd160Hash = (0, crypto_1.createHash)(\"ripemd160\").update(sha256Hash).digest();\n const versionedPayload = Buffer2.concat([Buffer2.from([0]), ripemd160Hash]);\n const checksum4 = (0, crypto_1.createHash)(\"sha256\").update((0, crypto_1.createHash)(\"sha256\").update(versionedPayload).digest()).digest().subarray(0, 4);\n const binaryBitcoinAddress = Buffer2.concat([versionedPayload, checksum4]);\n return ethers_1.ethers.utils.base58.encode(binaryBitcoinAddress);\n }\n function deriveCosmosAddress(ethPubKey, prefix = \"cosmos\") {\n let pubKeyBuffer = Buffer2.from(ethPubKey, \"hex\");\n if (pubKeyBuffer.length === 65 && pubKeyBuffer[0] === 4) {\n pubKeyBuffer = Buffer2.from(publicKeyConvert(pubKeyBuffer, true));\n }\n const sha256Hash = (0, crypto_1.createHash)(\"sha256\").update(pubKeyBuffer).digest();\n const ripemd160Hash = (0, crypto_1.createHash)(\"ripemd160\").update(sha256Hash).digest();\n return bech32_1.bech32.encode(prefix, bech32_1.bech32.toWords(ripemd160Hash));\n }\n var derivedAddresses = async ({ publicKey, pkpTokenId, pkpContractAddress, defaultRPCUrl, options = {\n cacheContractCall: false\n } }) => {\n if (!publicKey && !pkpTokenId) {\n throw new constants_1.ParamsMissingError({\n info: {\n publicKey,\n pkpTokenId\n }\n }, \"publicKey or pkpTokenId must be provided\");\n }\n let isNewPKP = false;\n if (pkpTokenId) {\n const CACHE_KEY = \"lit-cached-pkps\";\n let cachedPkpJSON;\n try {\n const cachedPkp = localStorage.getItem(CACHE_KEY);\n if (cachedPkp) {\n cachedPkpJSON = JSON.parse(cachedPkp);\n publicKey = cachedPkpJSON[pkpTokenId];\n }\n } catch (e2) {\n console.error(e2);\n }\n if (!publicKey) {\n if (!defaultRPCUrl || !pkpContractAddress) {\n throw new constants_1.NoWalletException({\n info: {\n publicKey,\n pkpTokenId,\n pkpContractAddress,\n defaultRPCUrl\n }\n }, \"defaultRPCUrl or pkpContractAddress was not provided\");\n }\n const provider = new ethers_1.ethers.providers.StaticJsonRpcProvider(defaultRPCUrl);\n const contract = new ethers_1.Contract(pkpContractAddress, [\"function getPubkey(uint256 tokenId) view returns (bytes memory)\"], provider);\n publicKey = await contract[\"getPubkey\"](pkpTokenId);\n isNewPKP = true;\n }\n if (options.cacheContractCall) {\n try {\n const cachedPkp = localStorage.getItem(CACHE_KEY);\n if (cachedPkp) {\n const cachedPkpJSON2 = JSON.parse(cachedPkp);\n cachedPkpJSON2[pkpTokenId] = publicKey;\n localStorage.setItem(CACHE_KEY, JSON.stringify(cachedPkpJSON2));\n } else {\n const cachedPkpJSON2 = {};\n cachedPkpJSON2[pkpTokenId] = publicKey;\n localStorage.setItem(CACHE_KEY, JSON.stringify(cachedPkpJSON2));\n }\n } catch (e2) {\n console.error(e2);\n }\n }\n }\n if (!publicKey) {\n throw new constants_1.NoWalletException({\n info: {\n publicKey,\n pkpTokenId,\n pkpContractAddress,\n defaultRPCUrl\n }\n }, \"publicKey was not provided or could not be obtained from the pkpTokenId\");\n }\n if (publicKey.startsWith(\"0x\")) {\n publicKey = publicKey.slice(2);\n }\n const pubkeyBuffer = Buffer2.from(publicKey, \"hex\");\n const ethAddress2 = (0, utils_1.computeAddress)(pubkeyBuffer);\n const btcAddress = deriveBitcoinAddress(publicKey);\n const cosmosAddress = deriveCosmosAddress(publicKey);\n if (!btcAddress || !ethAddress2 || !cosmosAddress) {\n const errors = [];\n if (!btcAddress) {\n errors.push(new constants_1.NoWalletException({\n info: {\n publicKey\n }\n }, \"btcAddress is undefined\"));\n }\n if (!ethAddress2) {\n errors.push(new constants_1.NoWalletException({\n info: {\n publicKey\n }\n }, \"ethAddress is undefined\"));\n }\n if (!cosmosAddress) {\n errors.push(new constants_1.NoWalletException({\n info: {\n publicKey\n }\n }, \"cosmosAddress is undefined\"));\n }\n throw new constants_1.MultiError(errors);\n }\n return {\n tokenId: pkpTokenId,\n publicKey: `0x${publicKey}`,\n publicKeyBuffer: pubkeyBuffer,\n ethAddress: ethAddress2,\n btcAddress,\n cosmosAddress,\n isNewPKP\n };\n };\n exports3.derivedAddresses = derivedAddresses;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.7.0/node_modules/@ethersproject/abstract-provider/lib/_version.js\n var require_version29 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.7.0/node_modules/@ethersproject/abstract-provider/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"abstract-provider/5.7.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.7.0/node_modules/@ethersproject/abstract-provider/lib/index.js\n var require_lib33 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.7.0/node_modules/@ethersproject/abstract-provider/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Provider = exports3.TransactionOrderForkEvent = exports3.TransactionForkEvent = exports3.BlockForkEvent = exports3.ForkEvent = void 0;\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version29();\n var logger = new logger_1.Logger(_version_1.version);\n var ForkEvent = (\n /** @class */\n function(_super) {\n __extends4(ForkEvent2, _super);\n function ForkEvent2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ForkEvent2.isForkEvent = function(value) {\n return !!(value && value._isForkEvent);\n };\n return ForkEvent2;\n }(properties_1.Description)\n );\n exports3.ForkEvent = ForkEvent;\n var BlockForkEvent = (\n /** @class */\n function(_super) {\n __extends4(BlockForkEvent2, _super);\n function BlockForkEvent2(blockHash, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(blockHash, 32)) {\n logger.throwArgumentError(\"invalid blockHash\", \"blockHash\", blockHash);\n }\n _this = _super.call(this, {\n _isForkEvent: true,\n _isBlockForkEvent: true,\n expiry: expiry || 0,\n blockHash\n }) || this;\n return _this;\n }\n return BlockForkEvent2;\n }(ForkEvent)\n );\n exports3.BlockForkEvent = BlockForkEvent;\n var TransactionForkEvent = (\n /** @class */\n function(_super) {\n __extends4(TransactionForkEvent2, _super);\n function TransactionForkEvent2(hash3, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(hash3, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"hash\", hash3);\n }\n _this = _super.call(this, {\n _isForkEvent: true,\n _isTransactionForkEvent: true,\n expiry: expiry || 0,\n hash: hash3\n }) || this;\n return _this;\n }\n return TransactionForkEvent2;\n }(ForkEvent)\n );\n exports3.TransactionForkEvent = TransactionForkEvent;\n var TransactionOrderForkEvent = (\n /** @class */\n function(_super) {\n __extends4(TransactionOrderForkEvent2, _super);\n function TransactionOrderForkEvent2(beforeHash, afterHash, expiry) {\n var _this = this;\n if (!(0, bytes_1.isHexString)(beforeHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"beforeHash\", beforeHash);\n }\n if (!(0, bytes_1.isHexString)(afterHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"afterHash\", afterHash);\n }\n _this = _super.call(this, {\n _isForkEvent: true,\n _isTransactionOrderForkEvent: true,\n expiry: expiry || 0,\n beforeHash,\n afterHash\n }) || this;\n return _this;\n }\n return TransactionOrderForkEvent2;\n }(ForkEvent)\n );\n exports3.TransactionOrderForkEvent = TransactionOrderForkEvent;\n var Provider = (\n /** @class */\n function() {\n function Provider2() {\n var _newTarget = this.constructor;\n logger.checkAbstract(_newTarget, Provider2);\n (0, properties_1.defineReadOnly)(this, \"_isProvider\", true);\n }\n Provider2.prototype.getFeeData = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var _a, block, gasPrice, lastBaseFeePerGas, maxFeePerGas, maxPriorityFeePerGas;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n return [4, (0, properties_1.resolveProperties)({\n block: this.getBlock(\"latest\"),\n gasPrice: this.getGasPrice().catch(function(error) {\n return null;\n })\n })];\n case 1:\n _a = _b.sent(), block = _a.block, gasPrice = _a.gasPrice;\n lastBaseFeePerGas = null, maxFeePerGas = null, maxPriorityFeePerGas = null;\n if (block && block.baseFeePerGas) {\n lastBaseFeePerGas = block.baseFeePerGas;\n maxPriorityFeePerGas = bignumber_1.BigNumber.from(\"1500000000\");\n maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas);\n }\n return [2, { lastBaseFeePerGas, maxFeePerGas, maxPriorityFeePerGas, gasPrice }];\n }\n });\n });\n };\n Provider2.prototype.addListener = function(eventName, listener) {\n return this.on(eventName, listener);\n };\n Provider2.prototype.removeListener = function(eventName, listener) {\n return this.off(eventName, listener);\n };\n Provider2.isProvider = function(value) {\n return !!(value && value._isProvider);\n };\n return Provider2;\n }()\n );\n exports3.Provider = Provider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+contracts@5.7.0/node_modules/@ethersproject/contracts/lib/_version.js\n var require_version30 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+contracts@5.7.0/node_modules/@ethersproject/contracts/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"contracts/5.7.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+contracts@5.7.0/node_modules/@ethersproject/contracts/lib/index.js\n var require_lib34 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+contracts@5.7.0/node_modules/@ethersproject/contracts/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n var __spreadArray3 = exports3 && exports3.__spreadArray || function(to, from14, pack) {\n if (pack || arguments.length === 2)\n for (var i3 = 0, l6 = from14.length, ar; i3 < l6; i3++) {\n if (ar || !(i3 in from14)) {\n if (!ar)\n ar = Array.prototype.slice.call(from14, 0, i3);\n ar[i3] = from14[i3];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from14));\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ContractFactory = exports3.Contract = exports3.BaseContract = void 0;\n var abi_1 = require_lib13();\n var abstract_provider_1 = require_lib33();\n var abstract_signer_1 = require_lib15();\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var logger_1 = require_lib();\n var _version_1 = require_version30();\n var logger = new logger_1.Logger(_version_1.version);\n var allowedTransactionKeys = {\n chainId: true,\n data: true,\n from: true,\n gasLimit: true,\n gasPrice: true,\n nonce: true,\n to: true,\n value: true,\n type: true,\n accessList: true,\n maxFeePerGas: true,\n maxPriorityFeePerGas: true,\n customData: true,\n ccipReadEnabled: true\n };\n function resolveName(resolver, nameOrPromise) {\n return __awaiter4(this, void 0, void 0, function() {\n var name, address;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, nameOrPromise];\n case 1:\n name = _a.sent();\n if (typeof name !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", name);\n }\n try {\n return [2, (0, address_1.getAddress)(name)];\n } catch (error) {\n }\n if (!resolver) {\n logger.throwError(\"a provider or signer is needed to resolve ENS names\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\"\n });\n }\n return [4, resolver.resolveName(name)];\n case 2:\n address = _a.sent();\n if (address == null) {\n logger.throwArgumentError(\"resolver or addr is not configured for ENS name\", \"name\", name);\n }\n return [2, address];\n }\n });\n });\n }\n function resolveAddresses(resolver, value, paramType) {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!Array.isArray(paramType))\n return [3, 2];\n return [4, Promise.all(paramType.map(function(paramType2, index2) {\n return resolveAddresses(resolver, Array.isArray(value) ? value[index2] : value[paramType2.name], paramType2);\n }))];\n case 1:\n return [2, _a.sent()];\n case 2:\n if (!(paramType.type === \"address\"))\n return [3, 4];\n return [4, resolveName(resolver, value)];\n case 3:\n return [2, _a.sent()];\n case 4:\n if (!(paramType.type === \"tuple\"))\n return [3, 6];\n return [4, resolveAddresses(resolver, value, paramType.components)];\n case 5:\n return [2, _a.sent()];\n case 6:\n if (!(paramType.baseType === \"array\"))\n return [3, 8];\n if (!Array.isArray(value)) {\n return [2, Promise.reject(logger.makeError(\"invalid value for array\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"value\",\n value\n }))];\n }\n return [4, Promise.all(value.map(function(v2) {\n return resolveAddresses(resolver, v2, paramType.arrayChildren);\n }))];\n case 7:\n return [2, _a.sent()];\n case 8:\n return [2, value];\n }\n });\n });\n }\n function populateTransaction(contract, fragment, args) {\n return __awaiter4(this, void 0, void 0, function() {\n var overrides, resolved, data, tx, ro, intrinsic, bytes, i3, roValue, leftovers;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n overrides = {};\n if (args.length === fragment.inputs.length + 1 && typeof args[args.length - 1] === \"object\") {\n overrides = (0, properties_1.shallowCopy)(args.pop());\n }\n logger.checkArgumentCount(args.length, fragment.inputs.length, \"passed to contract\");\n if (contract.signer) {\n if (overrides.from) {\n overrides.from = (0, properties_1.resolveProperties)({\n override: resolveName(contract.signer, overrides.from),\n signer: contract.signer.getAddress()\n }).then(function(check2) {\n return __awaiter4(_this, void 0, void 0, function() {\n return __generator4(this, function(_a2) {\n if ((0, address_1.getAddress)(check2.signer) !== check2.override) {\n logger.throwError(\"Contract with a Signer cannot override from\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.from\"\n });\n }\n return [2, check2.override];\n });\n });\n });\n } else {\n overrides.from = contract.signer.getAddress();\n }\n } else if (overrides.from) {\n overrides.from = resolveName(contract.provider, overrides.from);\n }\n return [4, (0, properties_1.resolveProperties)({\n args: resolveAddresses(contract.signer || contract.provider, args, fragment.inputs),\n address: contract.resolvedAddress,\n overrides: (0, properties_1.resolveProperties)(overrides) || {}\n })];\n case 1:\n resolved = _a.sent();\n data = contract.interface.encodeFunctionData(fragment, resolved.args);\n tx = {\n data,\n to: resolved.address\n };\n ro = resolved.overrides;\n if (ro.nonce != null) {\n tx.nonce = bignumber_1.BigNumber.from(ro.nonce).toNumber();\n }\n if (ro.gasLimit != null) {\n tx.gasLimit = bignumber_1.BigNumber.from(ro.gasLimit);\n }\n if (ro.gasPrice != null) {\n tx.gasPrice = bignumber_1.BigNumber.from(ro.gasPrice);\n }\n if (ro.maxFeePerGas != null) {\n tx.maxFeePerGas = bignumber_1.BigNumber.from(ro.maxFeePerGas);\n }\n if (ro.maxPriorityFeePerGas != null) {\n tx.maxPriorityFeePerGas = bignumber_1.BigNumber.from(ro.maxPriorityFeePerGas);\n }\n if (ro.from != null) {\n tx.from = ro.from;\n }\n if (ro.type != null) {\n tx.type = ro.type;\n }\n if (ro.accessList != null) {\n tx.accessList = (0, transactions_1.accessListify)(ro.accessList);\n }\n if (tx.gasLimit == null && fragment.gas != null) {\n intrinsic = 21e3;\n bytes = (0, bytes_1.arrayify)(data);\n for (i3 = 0; i3 < bytes.length; i3++) {\n intrinsic += 4;\n if (bytes[i3]) {\n intrinsic += 64;\n }\n }\n tx.gasLimit = bignumber_1.BigNumber.from(fragment.gas).add(intrinsic);\n }\n if (ro.value) {\n roValue = bignumber_1.BigNumber.from(ro.value);\n if (!roValue.isZero() && !fragment.payable) {\n logger.throwError(\"non-payable method cannot override value\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: overrides.value\n });\n }\n tx.value = roValue;\n }\n if (ro.customData) {\n tx.customData = (0, properties_1.shallowCopy)(ro.customData);\n }\n if (ro.ccipReadEnabled) {\n tx.ccipReadEnabled = !!ro.ccipReadEnabled;\n }\n delete overrides.nonce;\n delete overrides.gasLimit;\n delete overrides.gasPrice;\n delete overrides.from;\n delete overrides.value;\n delete overrides.type;\n delete overrides.accessList;\n delete overrides.maxFeePerGas;\n delete overrides.maxPriorityFeePerGas;\n delete overrides.customData;\n delete overrides.ccipReadEnabled;\n leftovers = Object.keys(overrides).filter(function(key) {\n return overrides[key] != null;\n });\n if (leftovers.length) {\n logger.throwError(\"cannot override \" + leftovers.map(function(l6) {\n return JSON.stringify(l6);\n }).join(\",\"), logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides\",\n overrides: leftovers\n });\n }\n return [2, tx];\n }\n });\n });\n }\n function buildPopulate(contract, fragment) {\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return populateTransaction(contract, fragment, args);\n };\n }\n function buildEstimate(contract, fragment) {\n var signerOrProvider = contract.signer || contract.provider;\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter4(this, void 0, void 0, function() {\n var tx;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!signerOrProvider) {\n logger.throwError(\"estimate require a provider or signer\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"estimateGas\"\n });\n }\n return [4, populateTransaction(contract, fragment, args)];\n case 1:\n tx = _a.sent();\n return [4, signerOrProvider.estimateGas(tx)];\n case 2:\n return [2, _a.sent()];\n }\n });\n });\n };\n }\n function addContractWait(contract, tx) {\n var wait2 = tx.wait.bind(tx);\n tx.wait = function(confirmations) {\n return wait2(confirmations).then(function(receipt) {\n receipt.events = receipt.logs.map(function(log) {\n var event = (0, properties_1.deepCopy)(log);\n var parsed = null;\n try {\n parsed = contract.interface.parseLog(log);\n } catch (e2) {\n }\n if (parsed) {\n event.args = parsed.args;\n event.decode = function(data, topics) {\n return contract.interface.decodeEventLog(parsed.eventFragment, data, topics);\n };\n event.event = parsed.name;\n event.eventSignature = parsed.signature;\n }\n event.removeListener = function() {\n return contract.provider;\n };\n event.getBlock = function() {\n return contract.provider.getBlock(receipt.blockHash);\n };\n event.getTransaction = function() {\n return contract.provider.getTransaction(receipt.transactionHash);\n };\n event.getTransactionReceipt = function() {\n return Promise.resolve(receipt);\n };\n return event;\n });\n return receipt;\n });\n };\n }\n function buildCall(contract, fragment, collapseSimple) {\n var signerOrProvider = contract.signer || contract.provider;\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter4(this, void 0, void 0, function() {\n var blockTag, overrides, tx, result, value;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n blockTag = void 0;\n if (!(args.length === fragment.inputs.length + 1 && typeof args[args.length - 1] === \"object\"))\n return [3, 3];\n overrides = (0, properties_1.shallowCopy)(args.pop());\n if (!(overrides.blockTag != null))\n return [3, 2];\n return [4, overrides.blockTag];\n case 1:\n blockTag = _a.sent();\n _a.label = 2;\n case 2:\n delete overrides.blockTag;\n args.push(overrides);\n _a.label = 3;\n case 3:\n if (!(contract.deployTransaction != null))\n return [3, 5];\n return [4, contract._deployed(blockTag)];\n case 4:\n _a.sent();\n _a.label = 5;\n case 5:\n return [4, populateTransaction(contract, fragment, args)];\n case 6:\n tx = _a.sent();\n return [4, signerOrProvider.call(tx, blockTag)];\n case 7:\n result = _a.sent();\n try {\n value = contract.interface.decodeFunctionResult(fragment, result);\n if (collapseSimple && fragment.outputs.length === 1) {\n value = value[0];\n }\n return [2, value];\n } catch (error) {\n if (error.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n error.address = contract.address;\n error.args = args;\n error.transaction = tx;\n }\n throw error;\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n }\n function buildSend(contract, fragment) {\n return function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter4(this, void 0, void 0, function() {\n var txRequest, tx;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!contract.signer) {\n logger.throwError(\"sending a transaction requires a signer\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"sendTransaction\"\n });\n }\n if (!(contract.deployTransaction != null))\n return [3, 2];\n return [4, contract._deployed()];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n return [4, populateTransaction(contract, fragment, args)];\n case 3:\n txRequest = _a.sent();\n return [4, contract.signer.sendTransaction(txRequest)];\n case 4:\n tx = _a.sent();\n addContractWait(contract, tx);\n return [2, tx];\n }\n });\n });\n };\n }\n function buildDefault(contract, fragment, collapseSimple) {\n if (fragment.constant) {\n return buildCall(contract, fragment, collapseSimple);\n }\n return buildSend(contract, fragment);\n }\n function getEventTag(filter) {\n if (filter.address && (filter.topics == null || filter.topics.length === 0)) {\n return \"*\";\n }\n return (filter.address || \"*\") + \"@\" + (filter.topics ? filter.topics.map(function(topic) {\n if (Array.isArray(topic)) {\n return topic.join(\"|\");\n }\n return topic;\n }).join(\":\") : \"\");\n }\n var RunningEvent = (\n /** @class */\n function() {\n function RunningEvent2(tag, filter) {\n (0, properties_1.defineReadOnly)(this, \"tag\", tag);\n (0, properties_1.defineReadOnly)(this, \"filter\", filter);\n this._listeners = [];\n }\n RunningEvent2.prototype.addListener = function(listener, once2) {\n this._listeners.push({ listener, once: once2 });\n };\n RunningEvent2.prototype.removeListener = function(listener) {\n var done = false;\n this._listeners = this._listeners.filter(function(item) {\n if (done || item.listener !== listener) {\n return true;\n }\n done = true;\n return false;\n });\n };\n RunningEvent2.prototype.removeAllListeners = function() {\n this._listeners = [];\n };\n RunningEvent2.prototype.listeners = function() {\n return this._listeners.map(function(i3) {\n return i3.listener;\n });\n };\n RunningEvent2.prototype.listenerCount = function() {\n return this._listeners.length;\n };\n RunningEvent2.prototype.run = function(args) {\n var _this = this;\n var listenerCount = this.listenerCount();\n this._listeners = this._listeners.filter(function(item) {\n var argsCopy = args.slice();\n setTimeout(function() {\n item.listener.apply(_this, argsCopy);\n }, 0);\n return !item.once;\n });\n return listenerCount;\n };\n RunningEvent2.prototype.prepareEvent = function(event) {\n };\n RunningEvent2.prototype.getEmit = function(event) {\n return [event];\n };\n return RunningEvent2;\n }()\n );\n var ErrorRunningEvent = (\n /** @class */\n function(_super) {\n __extends4(ErrorRunningEvent2, _super);\n function ErrorRunningEvent2() {\n return _super.call(this, \"error\", null) || this;\n }\n return ErrorRunningEvent2;\n }(RunningEvent)\n );\n var FragmentRunningEvent = (\n /** @class */\n function(_super) {\n __extends4(FragmentRunningEvent2, _super);\n function FragmentRunningEvent2(address, contractInterface, fragment, topics) {\n var _this = this;\n var filter = {\n address\n };\n var topic = contractInterface.getEventTopic(fragment);\n if (topics) {\n if (topic !== topics[0]) {\n logger.throwArgumentError(\"topic mismatch\", \"topics\", topics);\n }\n filter.topics = topics.slice();\n } else {\n filter.topics = [topic];\n }\n _this = _super.call(this, getEventTag(filter), filter) || this;\n (0, properties_1.defineReadOnly)(_this, \"address\", address);\n (0, properties_1.defineReadOnly)(_this, \"interface\", contractInterface);\n (0, properties_1.defineReadOnly)(_this, \"fragment\", fragment);\n return _this;\n }\n FragmentRunningEvent2.prototype.prepareEvent = function(event) {\n var _this = this;\n _super.prototype.prepareEvent.call(this, event);\n event.event = this.fragment.name;\n event.eventSignature = this.fragment.format();\n event.decode = function(data, topics) {\n return _this.interface.decodeEventLog(_this.fragment, data, topics);\n };\n try {\n event.args = this.interface.decodeEventLog(this.fragment, event.data, event.topics);\n } catch (error) {\n event.args = null;\n event.decodeError = error;\n }\n };\n FragmentRunningEvent2.prototype.getEmit = function(event) {\n var errors = (0, abi_1.checkResultErrors)(event.args);\n if (errors.length) {\n throw errors[0].error;\n }\n var args = (event.args || []).slice();\n args.push(event);\n return args;\n };\n return FragmentRunningEvent2;\n }(RunningEvent)\n );\n var WildcardRunningEvent = (\n /** @class */\n function(_super) {\n __extends4(WildcardRunningEvent2, _super);\n function WildcardRunningEvent2(address, contractInterface) {\n var _this = _super.call(this, \"*\", { address }) || this;\n (0, properties_1.defineReadOnly)(_this, \"address\", address);\n (0, properties_1.defineReadOnly)(_this, \"interface\", contractInterface);\n return _this;\n }\n WildcardRunningEvent2.prototype.prepareEvent = function(event) {\n var _this = this;\n _super.prototype.prepareEvent.call(this, event);\n try {\n var parsed_1 = this.interface.parseLog(event);\n event.event = parsed_1.name;\n event.eventSignature = parsed_1.signature;\n event.decode = function(data, topics) {\n return _this.interface.decodeEventLog(parsed_1.eventFragment, data, topics);\n };\n event.args = parsed_1.args;\n } catch (error) {\n }\n };\n return WildcardRunningEvent2;\n }(RunningEvent)\n );\n var BaseContract = (\n /** @class */\n function() {\n function BaseContract2(addressOrName, contractInterface, signerOrProvider) {\n var _newTarget = this.constructor;\n var _this = this;\n (0, properties_1.defineReadOnly)(this, \"interface\", (0, properties_1.getStatic)(_newTarget, \"getInterface\")(contractInterface));\n if (signerOrProvider == null) {\n (0, properties_1.defineReadOnly)(this, \"provider\", null);\n (0, properties_1.defineReadOnly)(this, \"signer\", null);\n } else if (abstract_signer_1.Signer.isSigner(signerOrProvider)) {\n (0, properties_1.defineReadOnly)(this, \"provider\", signerOrProvider.provider || null);\n (0, properties_1.defineReadOnly)(this, \"signer\", signerOrProvider);\n } else if (abstract_provider_1.Provider.isProvider(signerOrProvider)) {\n (0, properties_1.defineReadOnly)(this, \"provider\", signerOrProvider);\n (0, properties_1.defineReadOnly)(this, \"signer\", null);\n } else {\n logger.throwArgumentError(\"invalid signer or provider\", \"signerOrProvider\", signerOrProvider);\n }\n (0, properties_1.defineReadOnly)(this, \"callStatic\", {});\n (0, properties_1.defineReadOnly)(this, \"estimateGas\", {});\n (0, properties_1.defineReadOnly)(this, \"functions\", {});\n (0, properties_1.defineReadOnly)(this, \"populateTransaction\", {});\n (0, properties_1.defineReadOnly)(this, \"filters\", {});\n {\n var uniqueFilters_1 = {};\n Object.keys(this.interface.events).forEach(function(eventSignature) {\n var event = _this.interface.events[eventSignature];\n (0, properties_1.defineReadOnly)(_this.filters, eventSignature, function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return {\n address: _this.address,\n topics: _this.interface.encodeFilterTopics(event, args)\n };\n });\n if (!uniqueFilters_1[event.name]) {\n uniqueFilters_1[event.name] = [];\n }\n uniqueFilters_1[event.name].push(eventSignature);\n });\n Object.keys(uniqueFilters_1).forEach(function(name) {\n var filters = uniqueFilters_1[name];\n if (filters.length === 1) {\n (0, properties_1.defineReadOnly)(_this.filters, name, _this.filters[filters[0]]);\n } else {\n logger.warn(\"Duplicate definition of \" + name + \" (\" + filters.join(\", \") + \")\");\n }\n });\n }\n (0, properties_1.defineReadOnly)(this, \"_runningEvents\", {});\n (0, properties_1.defineReadOnly)(this, \"_wrappedEmits\", {});\n if (addressOrName == null) {\n logger.throwArgumentError(\"invalid contract address or ENS name\", \"addressOrName\", addressOrName);\n }\n (0, properties_1.defineReadOnly)(this, \"address\", addressOrName);\n if (this.provider) {\n (0, properties_1.defineReadOnly)(this, \"resolvedAddress\", resolveName(this.provider, addressOrName));\n } else {\n try {\n (0, properties_1.defineReadOnly)(this, \"resolvedAddress\", Promise.resolve((0, address_1.getAddress)(addressOrName)));\n } catch (error) {\n logger.throwError(\"provider is required to use ENS name as contract address\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Contract\"\n });\n }\n }\n this.resolvedAddress.catch(function(e2) {\n });\n var uniqueNames = {};\n var uniqueSignatures = {};\n Object.keys(this.interface.functions).forEach(function(signature) {\n var fragment = _this.interface.functions[signature];\n if (uniqueSignatures[signature]) {\n logger.warn(\"Duplicate ABI entry for \" + JSON.stringify(signature));\n return;\n }\n uniqueSignatures[signature] = true;\n {\n var name_1 = fragment.name;\n if (!uniqueNames[\"%\" + name_1]) {\n uniqueNames[\"%\" + name_1] = [];\n }\n uniqueNames[\"%\" + name_1].push(signature);\n }\n if (_this[signature] == null) {\n (0, properties_1.defineReadOnly)(_this, signature, buildDefault(_this, fragment, true));\n }\n if (_this.functions[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.functions, signature, buildDefault(_this, fragment, false));\n }\n if (_this.callStatic[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.callStatic, signature, buildCall(_this, fragment, true));\n }\n if (_this.populateTransaction[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.populateTransaction, signature, buildPopulate(_this, fragment));\n }\n if (_this.estimateGas[signature] == null) {\n (0, properties_1.defineReadOnly)(_this.estimateGas, signature, buildEstimate(_this, fragment));\n }\n });\n Object.keys(uniqueNames).forEach(function(name) {\n var signatures = uniqueNames[name];\n if (signatures.length > 1) {\n return;\n }\n name = name.substring(1);\n var signature = signatures[0];\n try {\n if (_this[name] == null) {\n (0, properties_1.defineReadOnly)(_this, name, _this[signature]);\n }\n } catch (e2) {\n }\n if (_this.functions[name] == null) {\n (0, properties_1.defineReadOnly)(_this.functions, name, _this.functions[signature]);\n }\n if (_this.callStatic[name] == null) {\n (0, properties_1.defineReadOnly)(_this.callStatic, name, _this.callStatic[signature]);\n }\n if (_this.populateTransaction[name] == null) {\n (0, properties_1.defineReadOnly)(_this.populateTransaction, name, _this.populateTransaction[signature]);\n }\n if (_this.estimateGas[name] == null) {\n (0, properties_1.defineReadOnly)(_this.estimateGas, name, _this.estimateGas[signature]);\n }\n });\n }\n BaseContract2.getContractAddress = function(transaction) {\n return (0, address_1.getContractAddress)(transaction);\n };\n BaseContract2.getInterface = function(contractInterface) {\n if (abi_1.Interface.isInterface(contractInterface)) {\n return contractInterface;\n }\n return new abi_1.Interface(contractInterface);\n };\n BaseContract2.prototype.deployed = function() {\n return this._deployed();\n };\n BaseContract2.prototype._deployed = function(blockTag) {\n var _this = this;\n if (!this._deployedPromise) {\n if (this.deployTransaction) {\n this._deployedPromise = this.deployTransaction.wait().then(function() {\n return _this;\n });\n } else {\n this._deployedPromise = this.provider.getCode(this.address, blockTag).then(function(code) {\n if (code === \"0x\") {\n logger.throwError(\"contract not deployed\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n contractAddress: _this.address,\n operation: \"getDeployed\"\n });\n }\n return _this;\n });\n }\n }\n return this._deployedPromise;\n };\n BaseContract2.prototype.fallback = function(overrides) {\n var _this = this;\n if (!this.signer) {\n logger.throwError(\"sending a transactions require a signer\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: \"sendTransaction(fallback)\" });\n }\n var tx = (0, properties_1.shallowCopy)(overrides || {});\n [\"from\", \"to\"].forEach(function(key) {\n if (tx[key] == null) {\n return;\n }\n logger.throwError(\"cannot override \" + key, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: key });\n });\n tx.to = this.resolvedAddress;\n return this.deployed().then(function() {\n return _this.signer.sendTransaction(tx);\n });\n };\n BaseContract2.prototype.connect = function(signerOrProvider) {\n if (typeof signerOrProvider === \"string\") {\n signerOrProvider = new abstract_signer_1.VoidSigner(signerOrProvider, this.provider);\n }\n var contract = new this.constructor(this.address, this.interface, signerOrProvider);\n if (this.deployTransaction) {\n (0, properties_1.defineReadOnly)(contract, \"deployTransaction\", this.deployTransaction);\n }\n return contract;\n };\n BaseContract2.prototype.attach = function(addressOrName) {\n return new this.constructor(addressOrName, this.interface, this.signer || this.provider);\n };\n BaseContract2.isIndexed = function(value) {\n return abi_1.Indexed.isIndexed(value);\n };\n BaseContract2.prototype._normalizeRunningEvent = function(runningEvent) {\n if (this._runningEvents[runningEvent.tag]) {\n return this._runningEvents[runningEvent.tag];\n }\n return runningEvent;\n };\n BaseContract2.prototype._getRunningEvent = function(eventName) {\n if (typeof eventName === \"string\") {\n if (eventName === \"error\") {\n return this._normalizeRunningEvent(new ErrorRunningEvent());\n }\n if (eventName === \"event\") {\n return this._normalizeRunningEvent(new RunningEvent(\"event\", null));\n }\n if (eventName === \"*\") {\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n }\n var fragment = this.interface.getEvent(eventName);\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment));\n }\n if (eventName.topics && eventName.topics.length > 0) {\n try {\n var topic = eventName.topics[0];\n if (typeof topic !== \"string\") {\n throw new Error(\"invalid topic\");\n }\n var fragment = this.interface.getEvent(topic);\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment, eventName.topics));\n } catch (error) {\n }\n var filter = {\n address: this.address,\n topics: eventName.topics\n };\n return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter), filter));\n }\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n };\n BaseContract2.prototype._checkRunningEvents = function(runningEvent) {\n if (runningEvent.listenerCount() === 0) {\n delete this._runningEvents[runningEvent.tag];\n var emit2 = this._wrappedEmits[runningEvent.tag];\n if (emit2 && runningEvent.filter) {\n this.provider.off(runningEvent.filter, emit2);\n delete this._wrappedEmits[runningEvent.tag];\n }\n }\n };\n BaseContract2.prototype._wrapEvent = function(runningEvent, log, listener) {\n var _this = this;\n var event = (0, properties_1.deepCopy)(log);\n event.removeListener = function() {\n if (!listener) {\n return;\n }\n runningEvent.removeListener(listener);\n _this._checkRunningEvents(runningEvent);\n };\n event.getBlock = function() {\n return _this.provider.getBlock(log.blockHash);\n };\n event.getTransaction = function() {\n return _this.provider.getTransaction(log.transactionHash);\n };\n event.getTransactionReceipt = function() {\n return _this.provider.getTransactionReceipt(log.transactionHash);\n };\n runningEvent.prepareEvent(event);\n return event;\n };\n BaseContract2.prototype._addEventListener = function(runningEvent, listener, once2) {\n var _this = this;\n if (!this.provider) {\n logger.throwError(\"events require a provider or a signer with a provider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: \"once\" });\n }\n runningEvent.addListener(listener, once2);\n this._runningEvents[runningEvent.tag] = runningEvent;\n if (!this._wrappedEmits[runningEvent.tag]) {\n var wrappedEmit = function(log) {\n var event = _this._wrapEvent(runningEvent, log, listener);\n if (event.decodeError == null) {\n try {\n var args = runningEvent.getEmit(event);\n _this.emit.apply(_this, __spreadArray3([runningEvent.filter], args, false));\n } catch (error) {\n event.decodeError = error.error;\n }\n }\n if (runningEvent.filter != null) {\n _this.emit(\"event\", event);\n }\n if (event.decodeError != null) {\n _this.emit(\"error\", event.decodeError, event);\n }\n };\n this._wrappedEmits[runningEvent.tag] = wrappedEmit;\n if (runningEvent.filter != null) {\n this.provider.on(runningEvent.filter, wrappedEmit);\n }\n }\n };\n BaseContract2.prototype.queryFilter = function(event, fromBlockOrBlockhash, toBlock) {\n var _this = this;\n var runningEvent = this._getRunningEvent(event);\n var filter = (0, properties_1.shallowCopy)(runningEvent.filter);\n if (typeof fromBlockOrBlockhash === \"string\" && (0, bytes_1.isHexString)(fromBlockOrBlockhash, 32)) {\n if (toBlock != null) {\n logger.throwArgumentError(\"cannot specify toBlock with blockhash\", \"toBlock\", toBlock);\n }\n filter.blockHash = fromBlockOrBlockhash;\n } else {\n filter.fromBlock = fromBlockOrBlockhash != null ? fromBlockOrBlockhash : 0;\n filter.toBlock = toBlock != null ? toBlock : \"latest\";\n }\n return this.provider.getLogs(filter).then(function(logs) {\n return logs.map(function(log) {\n return _this._wrapEvent(runningEvent, log, null);\n });\n });\n };\n BaseContract2.prototype.on = function(event, listener) {\n this._addEventListener(this._getRunningEvent(event), listener, false);\n return this;\n };\n BaseContract2.prototype.once = function(event, listener) {\n this._addEventListener(this._getRunningEvent(event), listener, true);\n return this;\n };\n BaseContract2.prototype.emit = function(eventName) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!this.provider) {\n return false;\n }\n var runningEvent = this._getRunningEvent(eventName);\n var result = runningEvent.run(args) > 0;\n this._checkRunningEvents(runningEvent);\n return result;\n };\n BaseContract2.prototype.listenerCount = function(eventName) {\n var _this = this;\n if (!this.provider) {\n return 0;\n }\n if (eventName == null) {\n return Object.keys(this._runningEvents).reduce(function(accum, key) {\n return accum + _this._runningEvents[key].listenerCount();\n }, 0);\n }\n return this._getRunningEvent(eventName).listenerCount();\n };\n BaseContract2.prototype.listeners = function(eventName) {\n if (!this.provider) {\n return [];\n }\n if (eventName == null) {\n var result_1 = [];\n for (var tag in this._runningEvents) {\n this._runningEvents[tag].listeners().forEach(function(listener) {\n result_1.push(listener);\n });\n }\n return result_1;\n }\n return this._getRunningEvent(eventName).listeners();\n };\n BaseContract2.prototype.removeAllListeners = function(eventName) {\n if (!this.provider) {\n return this;\n }\n if (eventName == null) {\n for (var tag in this._runningEvents) {\n var runningEvent_1 = this._runningEvents[tag];\n runningEvent_1.removeAllListeners();\n this._checkRunningEvents(runningEvent_1);\n }\n return this;\n }\n var runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeAllListeners();\n this._checkRunningEvents(runningEvent);\n return this;\n };\n BaseContract2.prototype.off = function(eventName, listener) {\n if (!this.provider) {\n return this;\n }\n var runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeListener(listener);\n this._checkRunningEvents(runningEvent);\n return this;\n };\n BaseContract2.prototype.removeListener = function(eventName, listener) {\n return this.off(eventName, listener);\n };\n return BaseContract2;\n }()\n );\n exports3.BaseContract = BaseContract;\n var Contract = (\n /** @class */\n function(_super) {\n __extends4(Contract2, _super);\n function Contract2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Contract2;\n }(BaseContract)\n );\n exports3.Contract = Contract;\n var ContractFactory = (\n /** @class */\n function() {\n function ContractFactory2(contractInterface, bytecode, signer) {\n var _newTarget = this.constructor;\n var bytecodeHex = null;\n if (typeof bytecode === \"string\") {\n bytecodeHex = bytecode;\n } else if ((0, bytes_1.isBytes)(bytecode)) {\n bytecodeHex = (0, bytes_1.hexlify)(bytecode);\n } else if (bytecode && typeof bytecode.object === \"string\") {\n bytecodeHex = bytecode.object;\n } else {\n bytecodeHex = \"!\";\n }\n if (bytecodeHex.substring(0, 2) !== \"0x\") {\n bytecodeHex = \"0x\" + bytecodeHex;\n }\n if (!(0, bytes_1.isHexString)(bytecodeHex) || bytecodeHex.length % 2) {\n logger.throwArgumentError(\"invalid bytecode\", \"bytecode\", bytecode);\n }\n if (signer && !abstract_signer_1.Signer.isSigner(signer)) {\n logger.throwArgumentError(\"invalid signer\", \"signer\", signer);\n }\n (0, properties_1.defineReadOnly)(this, \"bytecode\", bytecodeHex);\n (0, properties_1.defineReadOnly)(this, \"interface\", (0, properties_1.getStatic)(_newTarget, \"getInterface\")(contractInterface));\n (0, properties_1.defineReadOnly)(this, \"signer\", signer || null);\n }\n ContractFactory2.prototype.getDeployTransaction = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var tx = {};\n if (args.length === this.interface.deploy.inputs.length + 1 && typeof args[args.length - 1] === \"object\") {\n tx = (0, properties_1.shallowCopy)(args.pop());\n for (var key in tx) {\n if (!allowedTransactionKeys[key]) {\n throw new Error(\"unknown transaction override \" + key);\n }\n }\n }\n [\"data\", \"from\", \"to\"].forEach(function(key2) {\n if (tx[key2] == null) {\n return;\n }\n logger.throwError(\"cannot override \" + key2, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: key2 });\n });\n if (tx.value) {\n var value = bignumber_1.BigNumber.from(tx.value);\n if (!value.isZero() && !this.interface.deploy.payable) {\n logger.throwError(\"non-payable constructor cannot override value\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: tx.value\n });\n }\n }\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n tx.data = (0, bytes_1.hexlify)((0, bytes_1.concat)([\n this.bytecode,\n this.interface.encodeDeploy(args)\n ]));\n return tx;\n };\n ContractFactory2.prototype.deploy = function() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __awaiter4(this, void 0, void 0, function() {\n var overrides, params, unsignedTx, tx, address, contract;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n overrides = {};\n if (args.length === this.interface.deploy.inputs.length + 1) {\n overrides = args.pop();\n }\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n return [4, resolveAddresses(this.signer, args, this.interface.deploy.inputs)];\n case 1:\n params = _a.sent();\n params.push(overrides);\n unsignedTx = this.getDeployTransaction.apply(this, params);\n return [4, this.signer.sendTransaction(unsignedTx)];\n case 2:\n tx = _a.sent();\n address = (0, properties_1.getStatic)(this.constructor, \"getContractAddress\")(tx);\n contract = (0, properties_1.getStatic)(this.constructor, \"getContract\")(address, this.interface, this.signer);\n addContractWait(contract, tx);\n (0, properties_1.defineReadOnly)(contract, \"deployTransaction\", tx);\n return [2, contract];\n }\n });\n });\n };\n ContractFactory2.prototype.attach = function(address) {\n return this.constructor.getContract(address, this.interface, this.signer);\n };\n ContractFactory2.prototype.connect = function(signer) {\n return new this.constructor(this.interface, this.bytecode, signer);\n };\n ContractFactory2.fromSolidity = function(compilerOutput, signer) {\n if (compilerOutput == null) {\n logger.throwError(\"missing compiler output\", logger_1.Logger.errors.MISSING_ARGUMENT, { argument: \"compilerOutput\" });\n }\n if (typeof compilerOutput === \"string\") {\n compilerOutput = JSON.parse(compilerOutput);\n }\n var abi2 = compilerOutput.abi;\n var bytecode = null;\n if (compilerOutput.bytecode) {\n bytecode = compilerOutput.bytecode;\n } else if (compilerOutput.evm && compilerOutput.evm.bytecode) {\n bytecode = compilerOutput.evm.bytecode;\n }\n return new this(abi2, bytecode, signer);\n };\n ContractFactory2.getInterface = function(contractInterface) {\n return Contract.getInterface(contractInterface);\n };\n ContractFactory2.getContractAddress = function(tx) {\n return (0, address_1.getContractAddress)(tx);\n };\n ContractFactory2.getContract = function(address, contractInterface, signer) {\n return new Contract(address, contractInterface, signer);\n };\n return ContractFactory2;\n }()\n );\n exports3.ContractFactory = ContractFactory;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/_version.js\n var require_version31 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"providers/5.7.2\";\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/formatter.js\n var require_formatter2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/formatter.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.showThrottleMessage = exports3.isCommunityResource = exports3.isCommunityResourcable = exports3.Formatter = void 0;\n var address_1 = require_lib7();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var constants_1 = require_lib8();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var logger_1 = require_lib();\n var _version_1 = require_version31();\n var logger = new logger_1.Logger(_version_1.version);\n var Formatter = (\n /** @class */\n function() {\n function Formatter2() {\n this.formats = this.getDefaultFormats();\n }\n Formatter2.prototype.getDefaultFormats = function() {\n var _this = this;\n var formats = {};\n var address = this.address.bind(this);\n var bigNumber = this.bigNumber.bind(this);\n var blockTag = this.blockTag.bind(this);\n var data = this.data.bind(this);\n var hash3 = this.hash.bind(this);\n var hex = this.hex.bind(this);\n var number = this.number.bind(this);\n var type = this.type.bind(this);\n var strictData = function(v2) {\n return _this.data(v2, true);\n };\n formats.transaction = {\n hash: hash3,\n type,\n accessList: Formatter2.allowNull(this.accessList.bind(this), null),\n blockHash: Formatter2.allowNull(hash3, null),\n blockNumber: Formatter2.allowNull(number, null),\n transactionIndex: Formatter2.allowNull(number, null),\n confirmations: Formatter2.allowNull(number, null),\n from: address,\n // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas)\n // must be set\n gasPrice: Formatter2.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter2.allowNull(bigNumber),\n maxFeePerGas: Formatter2.allowNull(bigNumber),\n gasLimit: bigNumber,\n to: Formatter2.allowNull(address, null),\n value: bigNumber,\n nonce: number,\n data,\n r: Formatter2.allowNull(this.uint256),\n s: Formatter2.allowNull(this.uint256),\n v: Formatter2.allowNull(number),\n creates: Formatter2.allowNull(address, null),\n raw: Formatter2.allowNull(data)\n };\n formats.transactionRequest = {\n from: Formatter2.allowNull(address),\n nonce: Formatter2.allowNull(number),\n gasLimit: Formatter2.allowNull(bigNumber),\n gasPrice: Formatter2.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter2.allowNull(bigNumber),\n maxFeePerGas: Formatter2.allowNull(bigNumber),\n to: Formatter2.allowNull(address),\n value: Formatter2.allowNull(bigNumber),\n data: Formatter2.allowNull(strictData),\n type: Formatter2.allowNull(number),\n accessList: Formatter2.allowNull(this.accessList.bind(this), null)\n };\n formats.receiptLog = {\n transactionIndex: number,\n blockNumber: number,\n transactionHash: hash3,\n address,\n topics: Formatter2.arrayOf(hash3),\n data,\n logIndex: number,\n blockHash: hash3\n };\n formats.receipt = {\n to: Formatter2.allowNull(this.address, null),\n from: Formatter2.allowNull(this.address, null),\n contractAddress: Formatter2.allowNull(address, null),\n transactionIndex: number,\n // should be allowNull(hash), but broken-EIP-658 support is handled in receipt\n root: Formatter2.allowNull(hex),\n gasUsed: bigNumber,\n logsBloom: Formatter2.allowNull(data),\n blockHash: hash3,\n transactionHash: hash3,\n logs: Formatter2.arrayOf(this.receiptLog.bind(this)),\n blockNumber: number,\n confirmations: Formatter2.allowNull(number, null),\n cumulativeGasUsed: bigNumber,\n effectiveGasPrice: Formatter2.allowNull(bigNumber),\n status: Formatter2.allowNull(number),\n type\n };\n formats.block = {\n hash: Formatter2.allowNull(hash3),\n parentHash: hash3,\n number,\n timestamp: number,\n nonce: Formatter2.allowNull(hex),\n difficulty: this.difficulty.bind(this),\n gasLimit: bigNumber,\n gasUsed: bigNumber,\n miner: Formatter2.allowNull(address),\n extraData: data,\n transactions: Formatter2.allowNull(Formatter2.arrayOf(hash3)),\n baseFeePerGas: Formatter2.allowNull(bigNumber)\n };\n formats.blockWithTransactions = (0, properties_1.shallowCopy)(formats.block);\n formats.blockWithTransactions.transactions = Formatter2.allowNull(Formatter2.arrayOf(this.transactionResponse.bind(this)));\n formats.filter = {\n fromBlock: Formatter2.allowNull(blockTag, void 0),\n toBlock: Formatter2.allowNull(blockTag, void 0),\n blockHash: Formatter2.allowNull(hash3, void 0),\n address: Formatter2.allowNull(address, void 0),\n topics: Formatter2.allowNull(this.topics.bind(this), void 0)\n };\n formats.filterLog = {\n blockNumber: Formatter2.allowNull(number),\n blockHash: Formatter2.allowNull(hash3),\n transactionIndex: number,\n removed: Formatter2.allowNull(this.boolean.bind(this)),\n address,\n data: Formatter2.allowFalsish(data, \"0x\"),\n topics: Formatter2.arrayOf(hash3),\n transactionHash: hash3,\n logIndex: number\n };\n return formats;\n };\n Formatter2.prototype.accessList = function(accessList) {\n return (0, transactions_1.accessListify)(accessList || []);\n };\n Formatter2.prototype.number = function(number) {\n if (number === \"0x\") {\n return 0;\n }\n return bignumber_1.BigNumber.from(number).toNumber();\n };\n Formatter2.prototype.type = function(number) {\n if (number === \"0x\" || number == null) {\n return 0;\n }\n return bignumber_1.BigNumber.from(number).toNumber();\n };\n Formatter2.prototype.bigNumber = function(value) {\n return bignumber_1.BigNumber.from(value);\n };\n Formatter2.prototype.boolean = function(value) {\n if (typeof value === \"boolean\") {\n return value;\n }\n if (typeof value === \"string\") {\n value = value.toLowerCase();\n if (value === \"true\") {\n return true;\n }\n if (value === \"false\") {\n return false;\n }\n }\n throw new Error(\"invalid boolean - \" + value);\n };\n Formatter2.prototype.hex = function(value, strict) {\n if (typeof value === \"string\") {\n if (!strict && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if ((0, bytes_1.isHexString)(value)) {\n return value.toLowerCase();\n }\n }\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n };\n Formatter2.prototype.data = function(value, strict) {\n var result = this.hex(value, strict);\n if (result.length % 2 !== 0) {\n throw new Error(\"invalid data; odd-length - \" + value);\n }\n return result;\n };\n Formatter2.prototype.address = function(value) {\n return (0, address_1.getAddress)(value);\n };\n Formatter2.prototype.callAddress = function(value) {\n if (!(0, bytes_1.isHexString)(value, 32)) {\n return null;\n }\n var address = (0, address_1.getAddress)((0, bytes_1.hexDataSlice)(value, 12));\n return address === constants_1.AddressZero ? null : address;\n };\n Formatter2.prototype.contractAddress = function(value) {\n return (0, address_1.getContractAddress)(value);\n };\n Formatter2.prototype.blockTag = function(blockTag) {\n if (blockTag == null) {\n return \"latest\";\n }\n if (blockTag === \"earliest\") {\n return \"0x0\";\n }\n switch (blockTag) {\n case \"earliest\":\n return \"0x0\";\n case \"latest\":\n case \"pending\":\n case \"safe\":\n case \"finalized\":\n return blockTag;\n }\n if (typeof blockTag === \"number\" || (0, bytes_1.isHexString)(blockTag)) {\n return (0, bytes_1.hexValue)(blockTag);\n }\n throw new Error(\"invalid blockTag\");\n };\n Formatter2.prototype.hash = function(value, strict) {\n var result = this.hex(value, strict);\n if ((0, bytes_1.hexDataLength)(result) !== 32) {\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n }\n return result;\n };\n Formatter2.prototype.difficulty = function(value) {\n if (value == null) {\n return null;\n }\n var v2 = bignumber_1.BigNumber.from(value);\n try {\n return v2.toNumber();\n } catch (error) {\n }\n return null;\n };\n Formatter2.prototype.uint256 = function(value) {\n if (!(0, bytes_1.isHexString)(value)) {\n throw new Error(\"invalid uint256\");\n }\n return (0, bytes_1.hexZeroPad)(value, 32);\n };\n Formatter2.prototype._block = function(value, format) {\n if (value.author != null && value.miner == null) {\n value.miner = value.author;\n }\n var difficulty = value._difficulty != null ? value._difficulty : value.difficulty;\n var result = Formatter2.check(format, value);\n result._difficulty = difficulty == null ? null : bignumber_1.BigNumber.from(difficulty);\n return result;\n };\n Formatter2.prototype.block = function(value) {\n return this._block(value, this.formats.block);\n };\n Formatter2.prototype.blockWithTransactions = function(value) {\n return this._block(value, this.formats.blockWithTransactions);\n };\n Formatter2.prototype.transactionRequest = function(value) {\n return Formatter2.check(this.formats.transactionRequest, value);\n };\n Formatter2.prototype.transactionResponse = function(transaction) {\n if (transaction.gas != null && transaction.gasLimit == null) {\n transaction.gasLimit = transaction.gas;\n }\n if (transaction.to && bignumber_1.BigNumber.from(transaction.to).isZero()) {\n transaction.to = \"0x0000000000000000000000000000000000000000\";\n }\n if (transaction.input != null && transaction.data == null) {\n transaction.data = transaction.input;\n }\n if (transaction.to == null && transaction.creates == null) {\n transaction.creates = this.contractAddress(transaction);\n }\n if ((transaction.type === 1 || transaction.type === 2) && transaction.accessList == null) {\n transaction.accessList = [];\n }\n var result = Formatter2.check(this.formats.transaction, transaction);\n if (transaction.chainId != null) {\n var chainId = transaction.chainId;\n if ((0, bytes_1.isHexString)(chainId)) {\n chainId = bignumber_1.BigNumber.from(chainId).toNumber();\n }\n result.chainId = chainId;\n } else {\n var chainId = transaction.networkId;\n if (chainId == null && result.v == null) {\n chainId = transaction.chainId;\n }\n if ((0, bytes_1.isHexString)(chainId)) {\n chainId = bignumber_1.BigNumber.from(chainId).toNumber();\n }\n if (typeof chainId !== \"number\" && result.v != null) {\n chainId = (result.v - 35) / 2;\n if (chainId < 0) {\n chainId = 0;\n }\n chainId = parseInt(chainId);\n }\n if (typeof chainId !== \"number\") {\n chainId = 0;\n }\n result.chainId = chainId;\n }\n if (result.blockHash && result.blockHash.replace(/0/g, \"\") === \"x\") {\n result.blockHash = null;\n }\n return result;\n };\n Formatter2.prototype.transaction = function(value) {\n return (0, transactions_1.parse)(value);\n };\n Formatter2.prototype.receiptLog = function(value) {\n return Formatter2.check(this.formats.receiptLog, value);\n };\n Formatter2.prototype.receipt = function(value) {\n var result = Formatter2.check(this.formats.receipt, value);\n if (result.root != null) {\n if (result.root.length <= 4) {\n var value_1 = bignumber_1.BigNumber.from(result.root).toNumber();\n if (value_1 === 0 || value_1 === 1) {\n if (result.status != null && result.status !== value_1) {\n logger.throwArgumentError(\"alt-root-status/status mismatch\", \"value\", { root: result.root, status: result.status });\n }\n result.status = value_1;\n delete result.root;\n } else {\n logger.throwArgumentError(\"invalid alt-root-status\", \"value.root\", result.root);\n }\n } else if (result.root.length !== 66) {\n logger.throwArgumentError(\"invalid root hash\", \"value.root\", result.root);\n }\n }\n if (result.status != null) {\n result.byzantium = true;\n }\n return result;\n };\n Formatter2.prototype.topics = function(value) {\n var _this = this;\n if (Array.isArray(value)) {\n return value.map(function(v2) {\n return _this.topics(v2);\n });\n } else if (value != null) {\n return this.hash(value, true);\n }\n return null;\n };\n Formatter2.prototype.filter = function(value) {\n return Formatter2.check(this.formats.filter, value);\n };\n Formatter2.prototype.filterLog = function(value) {\n return Formatter2.check(this.formats.filterLog, value);\n };\n Formatter2.check = function(format, object) {\n var result = {};\n for (var key in format) {\n try {\n var value = format[key](object[key]);\n if (value !== void 0) {\n result[key] = value;\n }\n } catch (error) {\n error.checkKey = key;\n error.checkValue = object[key];\n throw error;\n }\n }\n return result;\n };\n Formatter2.allowNull = function(format, nullValue) {\n return function(value) {\n if (value == null) {\n return nullValue;\n }\n return format(value);\n };\n };\n Formatter2.allowFalsish = function(format, replaceValue) {\n return function(value) {\n if (!value) {\n return replaceValue;\n }\n return format(value);\n };\n };\n Formatter2.arrayOf = function(format) {\n return function(array) {\n if (!Array.isArray(array)) {\n throw new Error(\"not an array\");\n }\n var result = [];\n array.forEach(function(value) {\n result.push(format(value));\n });\n return result;\n };\n };\n return Formatter2;\n }()\n );\n exports3.Formatter = Formatter;\n function isCommunityResourcable(value) {\n return value && typeof value.isCommunityResource === \"function\";\n }\n exports3.isCommunityResourcable = isCommunityResourcable;\n function isCommunityResource(value) {\n return isCommunityResourcable(value) && value.isCommunityResource();\n }\n exports3.isCommunityResource = isCommunityResource;\n var throttleMessage = false;\n function showThrottleMessage() {\n if (throttleMessage) {\n return;\n }\n throttleMessage = true;\n console.log(\"========= NOTICE =========\");\n console.log(\"Request-Rate Exceeded (this message will not be repeated)\");\n console.log(\"\");\n console.log(\"The default API keys for each service are provided as a highly-throttled,\");\n console.log(\"community resource for low-traffic projects and early prototyping.\");\n console.log(\"\");\n console.log(\"While your application will continue to function, we highly recommended\");\n console.log(\"signing up for your own API keys to improve performance, increase your\");\n console.log(\"request rate/limit and enable other perks, such as metrics and advanced APIs.\");\n console.log(\"\");\n console.log(\"For more details: https://docs.ethers.io/api-keys/\");\n console.log(\"==========================\");\n }\n exports3.showThrottleMessage = showThrottleMessage;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/base-provider.js\n var require_base_provider2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/base-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BaseProvider = exports3.Resolver = exports3.Event = void 0;\n var abstract_provider_1 = require_lib33();\n var base64_1 = require_lib10();\n var basex_1 = require_lib19();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var constants_1 = require_lib8();\n var hash_1 = require_lib12();\n var networks_1 = require_lib27();\n var properties_1 = require_lib4();\n var sha2_1 = require_lib20();\n var strings_1 = require_lib9();\n var web_1 = require_lib28();\n var bech32_1 = __importDefault4(require_bech32());\n var logger_1 = require_lib();\n var _version_1 = require_version31();\n var logger = new logger_1.Logger(_version_1.version);\n var formatter_1 = require_formatter2();\n var MAX_CCIP_REDIRECTS = 10;\n function checkTopic(topic) {\n if (topic == null) {\n return \"null\";\n }\n if ((0, bytes_1.hexDataLength)(topic) !== 32) {\n logger.throwArgumentError(\"invalid topic\", \"topic\", topic);\n }\n return topic.toLowerCase();\n }\n function serializeTopics(topics) {\n topics = topics.slice();\n while (topics.length > 0 && topics[topics.length - 1] == null) {\n topics.pop();\n }\n return topics.map(function(topic) {\n if (Array.isArray(topic)) {\n var unique_1 = {};\n topic.forEach(function(topic2) {\n unique_1[checkTopic(topic2)] = true;\n });\n var sorted = Object.keys(unique_1);\n sorted.sort();\n return sorted.join(\"|\");\n } else {\n return checkTopic(topic);\n }\n }).join(\"&\");\n }\n function deserializeTopics(data) {\n if (data === \"\") {\n return [];\n }\n return data.split(/&/g).map(function(topic) {\n if (topic === \"\") {\n return [];\n }\n var comps = topic.split(\"|\").map(function(topic2) {\n return topic2 === \"null\" ? null : topic2;\n });\n return comps.length === 1 ? comps[0] : comps;\n });\n }\n function getEventTag(eventName) {\n if (typeof eventName === \"string\") {\n eventName = eventName.toLowerCase();\n if ((0, bytes_1.hexDataLength)(eventName) === 32) {\n return \"tx:\" + eventName;\n }\n if (eventName.indexOf(\":\") === -1) {\n return eventName;\n }\n } else if (Array.isArray(eventName)) {\n return \"filter:*:\" + serializeTopics(eventName);\n } else if (abstract_provider_1.ForkEvent.isForkEvent(eventName)) {\n logger.warn(\"not implemented\");\n throw new Error(\"not implemented\");\n } else if (eventName && typeof eventName === \"object\") {\n return \"filter:\" + (eventName.address || \"*\") + \":\" + serializeTopics(eventName.topics || []);\n }\n throw new Error(\"invalid event - \" + eventName);\n }\n function getTime() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n function stall(duration) {\n return new Promise(function(resolve) {\n setTimeout(resolve, duration);\n });\n }\n var PollableEvents = [\"block\", \"network\", \"pending\", \"poll\"];\n var Event2 = (\n /** @class */\n function() {\n function Event3(tag, listener, once2) {\n (0, properties_1.defineReadOnly)(this, \"tag\", tag);\n (0, properties_1.defineReadOnly)(this, \"listener\", listener);\n (0, properties_1.defineReadOnly)(this, \"once\", once2);\n this._lastBlockNumber = -2;\n this._inflight = false;\n }\n Object.defineProperty(Event3.prototype, \"event\", {\n get: function() {\n switch (this.type) {\n case \"tx\":\n return this.hash;\n case \"filter\":\n return this.filter;\n }\n return this.tag;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Event3.prototype, \"type\", {\n get: function() {\n return this.tag.split(\":\")[0];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Event3.prototype, \"hash\", {\n get: function() {\n var comps = this.tag.split(\":\");\n if (comps[0] !== \"tx\") {\n return null;\n }\n return comps[1];\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Event3.prototype, \"filter\", {\n get: function() {\n var comps = this.tag.split(\":\");\n if (comps[0] !== \"filter\") {\n return null;\n }\n var address = comps[1];\n var topics = deserializeTopics(comps[2]);\n var filter = {};\n if (topics.length > 0) {\n filter.topics = topics;\n }\n if (address && address !== \"*\") {\n filter.address = address;\n }\n return filter;\n },\n enumerable: false,\n configurable: true\n });\n Event3.prototype.pollable = function() {\n return this.tag.indexOf(\":\") >= 0 || PollableEvents.indexOf(this.tag) >= 0;\n };\n return Event3;\n }()\n );\n exports3.Event = Event2;\n var coinInfos = {\n \"0\": { symbol: \"btc\", p2pkh: 0, p2sh: 5, prefix: \"bc\" },\n \"2\": { symbol: \"ltc\", p2pkh: 48, p2sh: 50, prefix: \"ltc\" },\n \"3\": { symbol: \"doge\", p2pkh: 30, p2sh: 22 },\n \"60\": { symbol: \"eth\", ilk: \"eth\" },\n \"61\": { symbol: \"etc\", ilk: \"eth\" },\n \"700\": { symbol: \"xdai\", ilk: \"eth\" }\n };\n function bytes32ify(value) {\n return (0, bytes_1.hexZeroPad)(bignumber_1.BigNumber.from(value).toHexString(), 32);\n }\n function base58Encode(data) {\n return basex_1.Base58.encode((0, bytes_1.concat)([data, (0, bytes_1.hexDataSlice)((0, sha2_1.sha256)((0, sha2_1.sha256)(data)), 0, 4)]));\n }\n var matcherIpfs = new RegExp(\"^(ipfs)://(.*)$\", \"i\");\n var matchers = [\n new RegExp(\"^(https)://(.*)$\", \"i\"),\n new RegExp(\"^(data):(.*)$\", \"i\"),\n matcherIpfs,\n new RegExp(\"^eip155:[0-9]+/(erc[0-9]+):(.*)$\", \"i\")\n ];\n function _parseString(result, start) {\n try {\n return (0, strings_1.toUtf8String)(_parseBytes(result, start));\n } catch (error) {\n }\n return null;\n }\n function _parseBytes(result, start) {\n if (result === \"0x\") {\n return null;\n }\n var offset = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(result, start, start + 32)).toNumber();\n var length = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(result, offset, offset + 32)).toNumber();\n return (0, bytes_1.hexDataSlice)(result, offset + 32, offset + 32 + length);\n }\n function getIpfsLink(link) {\n if (link.match(/^ipfs:\\/\\/ipfs\\//i)) {\n link = link.substring(12);\n } else if (link.match(/^ipfs:\\/\\//i)) {\n link = link.substring(7);\n } else {\n logger.throwArgumentError(\"unsupported IPFS format\", \"link\", link);\n }\n return \"https://gateway.ipfs.io/ipfs/\" + link;\n }\n function numPad(value) {\n var result = (0, bytes_1.arrayify)(value);\n if (result.length > 32) {\n throw new Error(\"internal; should not happen\");\n }\n var padded = new Uint8Array(32);\n padded.set(result, 32 - result.length);\n return padded;\n }\n function bytesPad(value) {\n if (value.length % 32 === 0) {\n return value;\n }\n var result = new Uint8Array(Math.ceil(value.length / 32) * 32);\n result.set(value);\n return result;\n }\n function encodeBytes3(datas) {\n var result = [];\n var byteCount = 0;\n for (var i3 = 0; i3 < datas.length; i3++) {\n result.push(null);\n byteCount += 32;\n }\n for (var i3 = 0; i3 < datas.length; i3++) {\n var data = (0, bytes_1.arrayify)(datas[i3]);\n result[i3] = numPad(byteCount);\n result.push(numPad(data.length));\n result.push(bytesPad(data));\n byteCount += 32 + Math.ceil(data.length / 32) * 32;\n }\n return (0, bytes_1.hexConcat)(result);\n }\n var Resolver = (\n /** @class */\n function() {\n function Resolver2(provider, address, name, resolvedAddress) {\n (0, properties_1.defineReadOnly)(this, \"provider\", provider);\n (0, properties_1.defineReadOnly)(this, \"name\", name);\n (0, properties_1.defineReadOnly)(this, \"address\", provider.formatter.address(address));\n (0, properties_1.defineReadOnly)(this, \"_resolvedAddress\", resolvedAddress);\n }\n Resolver2.prototype.supportsWildcard = function() {\n var _this = this;\n if (!this._supportsEip2544) {\n this._supportsEip2544 = this.provider.call({\n to: this.address,\n data: \"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000\"\n }).then(function(result) {\n return bignumber_1.BigNumber.from(result).eq(1);\n }).catch(function(error) {\n if (error.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n return false;\n }\n _this._supportsEip2544 = null;\n throw error;\n });\n }\n return this._supportsEip2544;\n };\n Resolver2.prototype._fetch = function(selector, parameters) {\n return __awaiter4(this, void 0, void 0, function() {\n var tx, parseBytes, result, error_1;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n tx = {\n to: this.address,\n ccipReadEnabled: true,\n data: (0, bytes_1.hexConcat)([selector, (0, hash_1.namehash)(this.name), parameters || \"0x\"])\n };\n parseBytes = false;\n return [4, this.supportsWildcard()];\n case 1:\n if (_a.sent()) {\n parseBytes = true;\n tx.data = (0, bytes_1.hexConcat)([\"0x9061b923\", encodeBytes3([(0, hash_1.dnsEncode)(this.name), tx.data])]);\n }\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.provider.call(tx)];\n case 3:\n result = _a.sent();\n if ((0, bytes_1.arrayify)(result).length % 32 === 4) {\n logger.throwError(\"resolver threw error\", logger_1.Logger.errors.CALL_EXCEPTION, {\n transaction: tx,\n data: result\n });\n }\n if (parseBytes) {\n result = _parseBytes(result, 0);\n }\n return [2, result];\n case 4:\n error_1 = _a.sent();\n if (error_1.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n return [2, null];\n }\n throw error_1;\n case 5:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n Resolver2.prototype._fetchBytes = function(selector, parameters) {\n return __awaiter4(this, void 0, void 0, function() {\n var result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._fetch(selector, parameters)];\n case 1:\n result = _a.sent();\n if (result != null) {\n return [2, _parseBytes(result, 0)];\n }\n return [2, null];\n }\n });\n });\n };\n Resolver2.prototype._getAddress = function(coinType, hexBytes) {\n var coinInfo = coinInfos[String(coinType)];\n if (coinInfo == null) {\n logger.throwError(\"unsupported coin type: \" + coinType, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress(\" + coinType + \")\"\n });\n }\n if (coinInfo.ilk === \"eth\") {\n return this.provider.formatter.address(hexBytes);\n }\n var bytes = (0, bytes_1.arrayify)(hexBytes);\n if (coinInfo.p2pkh != null) {\n var p2pkh = hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);\n if (p2pkh) {\n var length_1 = parseInt(p2pkh[1], 16);\n if (p2pkh[2].length === length_1 * 2 && length_1 >= 1 && length_1 <= 75) {\n return base58Encode((0, bytes_1.concat)([[coinInfo.p2pkh], \"0x\" + p2pkh[2]]));\n }\n }\n }\n if (coinInfo.p2sh != null) {\n var p2sh = hexBytes.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);\n if (p2sh) {\n var length_2 = parseInt(p2sh[1], 16);\n if (p2sh[2].length === length_2 * 2 && length_2 >= 1 && length_2 <= 75) {\n return base58Encode((0, bytes_1.concat)([[coinInfo.p2sh], \"0x\" + p2sh[2]]));\n }\n }\n }\n if (coinInfo.prefix != null) {\n var length_3 = bytes[1];\n var version_1 = bytes[0];\n if (version_1 === 0) {\n if (length_3 !== 20 && length_3 !== 32) {\n version_1 = -1;\n }\n } else {\n version_1 = -1;\n }\n if (version_1 >= 0 && bytes.length === 2 + length_3 && length_3 >= 1 && length_3 <= 75) {\n var words = bech32_1.default.toWords(bytes.slice(2));\n words.unshift(version_1);\n return bech32_1.default.encode(coinInfo.prefix, words);\n }\n }\n return null;\n };\n Resolver2.prototype.getAddress = function(coinType) {\n return __awaiter4(this, void 0, void 0, function() {\n var result, error_2, hexBytes, address;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (coinType == null) {\n coinType = 60;\n }\n if (!(coinType === 60))\n return [3, 4];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4, this._fetch(\"0x3b3b57de\")];\n case 2:\n result = _a.sent();\n if (result === \"0x\" || result === constants_1.HashZero) {\n return [2, null];\n }\n return [2, this.provider.formatter.callAddress(result)];\n case 3:\n error_2 = _a.sent();\n if (error_2.code === logger_1.Logger.errors.CALL_EXCEPTION) {\n return [2, null];\n }\n throw error_2;\n case 4:\n return [4, this._fetchBytes(\"0xf1cb7e06\", bytes32ify(coinType))];\n case 5:\n hexBytes = _a.sent();\n if (hexBytes == null || hexBytes === \"0x\") {\n return [2, null];\n }\n address = this._getAddress(coinType, hexBytes);\n if (address == null) {\n logger.throwError(\"invalid or unsupported coin data\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress(\" + coinType + \")\",\n coinType,\n data: hexBytes\n });\n }\n return [2, address];\n }\n });\n });\n };\n Resolver2.prototype.getAvatar = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var linkage, avatar, i3, match, scheme, _a, selector, owner, _b, comps, addr, tokenId, tokenOwner, _c, _d, balance, _e, _f, tx, metadataUrl, _g, metadata, imageUrl, ipfs, error_3;\n return __generator4(this, function(_h) {\n switch (_h.label) {\n case 0:\n linkage = [{ type: \"name\", content: this.name }];\n _h.label = 1;\n case 1:\n _h.trys.push([1, 19, , 20]);\n return [4, this.getText(\"avatar\")];\n case 2:\n avatar = _h.sent();\n if (avatar == null) {\n return [2, null];\n }\n i3 = 0;\n _h.label = 3;\n case 3:\n if (!(i3 < matchers.length))\n return [3, 18];\n match = avatar.match(matchers[i3]);\n if (match == null) {\n return [3, 17];\n }\n scheme = match[1].toLowerCase();\n _a = scheme;\n switch (_a) {\n case \"https\":\n return [3, 4];\n case \"data\":\n return [3, 5];\n case \"ipfs\":\n return [3, 6];\n case \"erc721\":\n return [3, 7];\n case \"erc1155\":\n return [3, 7];\n }\n return [3, 17];\n case 4:\n linkage.push({ type: \"url\", content: avatar });\n return [2, { linkage, url: avatar }];\n case 5:\n linkage.push({ type: \"data\", content: avatar });\n return [2, { linkage, url: avatar }];\n case 6:\n linkage.push({ type: \"ipfs\", content: avatar });\n return [2, { linkage, url: getIpfsLink(avatar) }];\n case 7:\n selector = scheme === \"erc721\" ? \"0xc87b56dd\" : \"0x0e89341c\";\n linkage.push({ type: scheme, content: avatar });\n _b = this._resolvedAddress;\n if (_b)\n return [3, 9];\n return [4, this.getAddress()];\n case 8:\n _b = _h.sent();\n _h.label = 9;\n case 9:\n owner = _b;\n comps = (match[2] || \"\").split(\"/\");\n if (comps.length !== 2) {\n return [2, null];\n }\n return [4, this.provider.formatter.address(comps[0])];\n case 10:\n addr = _h.sent();\n tokenId = (0, bytes_1.hexZeroPad)(bignumber_1.BigNumber.from(comps[1]).toHexString(), 32);\n if (!(scheme === \"erc721\"))\n return [3, 12];\n _d = (_c = this.provider.formatter).callAddress;\n return [4, this.provider.call({\n to: addr,\n data: (0, bytes_1.hexConcat)([\"0x6352211e\", tokenId])\n })];\n case 11:\n tokenOwner = _d.apply(_c, [_h.sent()]);\n if (owner !== tokenOwner) {\n return [2, null];\n }\n linkage.push({ type: \"owner\", content: tokenOwner });\n return [3, 14];\n case 12:\n if (!(scheme === \"erc1155\"))\n return [3, 14];\n _f = (_e = bignumber_1.BigNumber).from;\n return [4, this.provider.call({\n to: addr,\n data: (0, bytes_1.hexConcat)([\"0x00fdd58e\", (0, bytes_1.hexZeroPad)(owner, 32), tokenId])\n })];\n case 13:\n balance = _f.apply(_e, [_h.sent()]);\n if (balance.isZero()) {\n return [2, null];\n }\n linkage.push({ type: \"balance\", content: balance.toString() });\n _h.label = 14;\n case 14:\n tx = {\n to: this.provider.formatter.address(comps[0]),\n data: (0, bytes_1.hexConcat)([selector, tokenId])\n };\n _g = _parseString;\n return [4, this.provider.call(tx)];\n case 15:\n metadataUrl = _g.apply(void 0, [_h.sent(), 0]);\n if (metadataUrl == null) {\n return [2, null];\n }\n linkage.push({ type: \"metadata-url-base\", content: metadataUrl });\n if (scheme === \"erc1155\") {\n metadataUrl = metadataUrl.replace(\"{id}\", tokenId.substring(2));\n linkage.push({ type: \"metadata-url-expanded\", content: metadataUrl });\n }\n if (metadataUrl.match(/^ipfs:/i)) {\n metadataUrl = getIpfsLink(metadataUrl);\n }\n linkage.push({ type: \"metadata-url\", content: metadataUrl });\n return [4, (0, web_1.fetchJson)(metadataUrl)];\n case 16:\n metadata = _h.sent();\n if (!metadata) {\n return [2, null];\n }\n linkage.push({ type: \"metadata\", content: JSON.stringify(metadata) });\n imageUrl = metadata.image;\n if (typeof imageUrl !== \"string\") {\n return [2, null];\n }\n if (imageUrl.match(/^(https:\\/\\/|data:)/i)) {\n } else {\n ipfs = imageUrl.match(matcherIpfs);\n if (ipfs == null) {\n return [2, null];\n }\n linkage.push({ type: \"url-ipfs\", content: imageUrl });\n imageUrl = getIpfsLink(imageUrl);\n }\n linkage.push({ type: \"url\", content: imageUrl });\n return [2, { linkage, url: imageUrl }];\n case 17:\n i3++;\n return [3, 3];\n case 18:\n return [3, 20];\n case 19:\n error_3 = _h.sent();\n return [3, 20];\n case 20:\n return [2, null];\n }\n });\n });\n };\n Resolver2.prototype.getContentHash = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var hexBytes, ipfs, length_4, ipns, length_5, swarm, skynet, urlSafe_1, hash3;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._fetchBytes(\"0xbc1c58d1\")];\n case 1:\n hexBytes = _a.sent();\n if (hexBytes == null || hexBytes === \"0x\") {\n return [2, null];\n }\n ipfs = hexBytes.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipfs) {\n length_4 = parseInt(ipfs[3], 16);\n if (ipfs[4].length === length_4 * 2) {\n return [2, \"ipfs://\" + basex_1.Base58.encode(\"0x\" + ipfs[1])];\n }\n }\n ipns = hexBytes.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipns) {\n length_5 = parseInt(ipns[3], 16);\n if (ipns[4].length === length_5 * 2) {\n return [2, \"ipns://\" + basex_1.Base58.encode(\"0x\" + ipns[1])];\n }\n }\n swarm = hexBytes.match(/^0xe40101fa011b20([0-9a-f]*)$/);\n if (swarm) {\n if (swarm[1].length === 32 * 2) {\n return [2, \"bzz://\" + swarm[1]];\n }\n }\n skynet = hexBytes.match(/^0x90b2c605([0-9a-f]*)$/);\n if (skynet) {\n if (skynet[1].length === 34 * 2) {\n urlSafe_1 = { \"=\": \"\", \"+\": \"-\", \"/\": \"_\" };\n hash3 = (0, base64_1.encode)(\"0x\" + skynet[1]).replace(/[=+\\/]/g, function(a3) {\n return urlSafe_1[a3];\n });\n return [2, \"sia://\" + hash3];\n }\n }\n return [2, logger.throwError(\"invalid or unsupported content hash data\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getContentHash()\",\n data: hexBytes\n })];\n }\n });\n });\n };\n Resolver2.prototype.getText = function(key) {\n return __awaiter4(this, void 0, void 0, function() {\n var keyBytes, hexBytes;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n keyBytes = (0, strings_1.toUtf8Bytes)(key);\n keyBytes = (0, bytes_1.concat)([bytes32ify(64), bytes32ify(keyBytes.length), keyBytes]);\n if (keyBytes.length % 32 !== 0) {\n keyBytes = (0, bytes_1.concat)([keyBytes, (0, bytes_1.hexZeroPad)(\"0x\", 32 - key.length % 32)]);\n }\n return [4, this._fetchBytes(\"0x59d1d43c\", (0, bytes_1.hexlify)(keyBytes))];\n case 1:\n hexBytes = _a.sent();\n if (hexBytes == null || hexBytes === \"0x\") {\n return [2, null];\n }\n return [2, (0, strings_1.toUtf8String)(hexBytes)];\n }\n });\n });\n };\n return Resolver2;\n }()\n );\n exports3.Resolver = Resolver;\n var defaultFormatter = null;\n var nextPollId = 1;\n var BaseProvider = (\n /** @class */\n function(_super) {\n __extends4(BaseProvider2, _super);\n function BaseProvider2(network) {\n var _newTarget = this.constructor;\n var _this = _super.call(this) || this;\n _this._events = [];\n _this._emitted = { block: -2 };\n _this.disableCcipRead = false;\n _this.formatter = _newTarget.getFormatter();\n (0, properties_1.defineReadOnly)(_this, \"anyNetwork\", network === \"any\");\n if (_this.anyNetwork) {\n network = _this.detectNetwork();\n }\n if (network instanceof Promise) {\n _this._networkPromise = network;\n network.catch(function(error) {\n });\n _this._ready().catch(function(error) {\n });\n } else {\n var knownNetwork = (0, properties_1.getStatic)(_newTarget, \"getNetwork\")(network);\n if (knownNetwork) {\n (0, properties_1.defineReadOnly)(_this, \"_network\", knownNetwork);\n _this.emit(\"network\", knownNetwork, null);\n } else {\n logger.throwArgumentError(\"invalid network\", \"network\", network);\n }\n }\n _this._maxInternalBlockNumber = -1024;\n _this._lastBlockNumber = -2;\n _this._maxFilterBlockRange = 10;\n _this._pollingInterval = 4e3;\n _this._fastQueryDate = 0;\n return _this;\n }\n BaseProvider2.prototype._ready = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var network, error_4;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(this._network == null))\n return [3, 7];\n network = null;\n if (!this._networkPromise)\n return [3, 4];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4, this._networkPromise];\n case 2:\n network = _a.sent();\n return [3, 4];\n case 3:\n error_4 = _a.sent();\n return [3, 4];\n case 4:\n if (!(network == null))\n return [3, 6];\n return [4, this.detectNetwork()];\n case 5:\n network = _a.sent();\n _a.label = 6;\n case 6:\n if (!network) {\n logger.throwError(\"no network detected\", logger_1.Logger.errors.UNKNOWN_ERROR, {});\n }\n if (this._network == null) {\n if (this.anyNetwork) {\n this._network = network;\n } else {\n (0, properties_1.defineReadOnly)(this, \"_network\", network);\n }\n this.emit(\"network\", network, null);\n }\n _a.label = 7;\n case 7:\n return [2, this._network];\n }\n });\n });\n };\n Object.defineProperty(BaseProvider2.prototype, \"ready\", {\n // This will always return the most recently established network.\n // For \"any\", this can change (a \"network\" event is emitted before\n // any change is reflected); otherwise this cannot change\n get: function() {\n var _this = this;\n return (0, web_1.poll)(function() {\n return _this._ready().then(function(network) {\n return network;\n }, function(error) {\n if (error.code === logger_1.Logger.errors.NETWORK_ERROR && error.event === \"noNetwork\") {\n return void 0;\n }\n throw error;\n });\n });\n },\n enumerable: false,\n configurable: true\n });\n BaseProvider2.getFormatter = function() {\n if (defaultFormatter == null) {\n defaultFormatter = new formatter_1.Formatter();\n }\n return defaultFormatter;\n };\n BaseProvider2.getNetwork = function(network) {\n return (0, networks_1.getNetwork)(network == null ? \"homestead\" : network);\n };\n BaseProvider2.prototype.ccipReadFetch = function(tx, calldata, urls) {\n return __awaiter4(this, void 0, void 0, function() {\n var sender, data, errorMessages, i3, url, href, json, result, errorMessage;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (this.disableCcipRead || urls.length === 0) {\n return [2, null];\n }\n sender = tx.to.toLowerCase();\n data = calldata.toLowerCase();\n errorMessages = [];\n i3 = 0;\n _a.label = 1;\n case 1:\n if (!(i3 < urls.length))\n return [3, 4];\n url = urls[i3];\n href = url.replace(\"{sender}\", sender).replace(\"{data}\", data);\n json = url.indexOf(\"{data}\") >= 0 ? null : JSON.stringify({ data, sender });\n return [4, (0, web_1.fetchJson)({ url: href, errorPassThrough: true }, json, function(value, response) {\n value.status = response.statusCode;\n return value;\n })];\n case 2:\n result = _a.sent();\n if (result.data) {\n return [2, result.data];\n }\n errorMessage = result.message || \"unknown error\";\n if (result.status >= 400 && result.status < 500) {\n return [2, logger.throwError(\"response not found during CCIP fetch: \" + errorMessage, logger_1.Logger.errors.SERVER_ERROR, { url, errorMessage })];\n }\n errorMessages.push(errorMessage);\n _a.label = 3;\n case 3:\n i3++;\n return [3, 1];\n case 4:\n return [2, logger.throwError(\"error encountered during CCIP fetch: \" + errorMessages.map(function(m2) {\n return JSON.stringify(m2);\n }).join(\", \"), logger_1.Logger.errors.SERVER_ERROR, {\n urls,\n errorMessages\n })];\n }\n });\n });\n };\n BaseProvider2.prototype._getInternalBlockNumber = function(maxAge) {\n return __awaiter4(this, void 0, void 0, function() {\n var internalBlockNumber, result, error_5, reqTime, checkInternalBlockNumber;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._ready()];\n case 1:\n _a.sent();\n if (!(maxAge > 0))\n return [3, 7];\n _a.label = 2;\n case 2:\n if (!this._internalBlockNumber)\n return [3, 7];\n internalBlockNumber = this._internalBlockNumber;\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, internalBlockNumber];\n case 4:\n result = _a.sent();\n if (getTime() - result.respTime <= maxAge) {\n return [2, result.blockNumber];\n }\n return [3, 7];\n case 5:\n error_5 = _a.sent();\n if (this._internalBlockNumber === internalBlockNumber) {\n return [3, 7];\n }\n return [3, 6];\n case 6:\n return [3, 2];\n case 7:\n reqTime = getTime();\n checkInternalBlockNumber = (0, properties_1.resolveProperties)({\n blockNumber: this.perform(\"getBlockNumber\", {}),\n networkError: this.getNetwork().then(function(network) {\n return null;\n }, function(error) {\n return error;\n })\n }).then(function(_a2) {\n var blockNumber = _a2.blockNumber, networkError = _a2.networkError;\n if (networkError) {\n if (_this._internalBlockNumber === checkInternalBlockNumber) {\n _this._internalBlockNumber = null;\n }\n throw networkError;\n }\n var respTime = getTime();\n blockNumber = bignumber_1.BigNumber.from(blockNumber).toNumber();\n if (blockNumber < _this._maxInternalBlockNumber) {\n blockNumber = _this._maxInternalBlockNumber;\n }\n _this._maxInternalBlockNumber = blockNumber;\n _this._setFastBlockNumber(blockNumber);\n return { blockNumber, reqTime, respTime };\n });\n this._internalBlockNumber = checkInternalBlockNumber;\n checkInternalBlockNumber.catch(function(error) {\n if (_this._internalBlockNumber === checkInternalBlockNumber) {\n _this._internalBlockNumber = null;\n }\n });\n return [4, checkInternalBlockNumber];\n case 8:\n return [2, _a.sent().blockNumber];\n }\n });\n });\n };\n BaseProvider2.prototype.poll = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var pollId, runners, blockNumber, error_6, i3;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n pollId = nextPollId++;\n runners = [];\n blockNumber = null;\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4, this._getInternalBlockNumber(100 + this.pollingInterval / 2)];\n case 2:\n blockNumber = _a.sent();\n return [3, 4];\n case 3:\n error_6 = _a.sent();\n this.emit(\"error\", error_6);\n return [\n 2\n /*return*/\n ];\n case 4:\n this._setFastBlockNumber(blockNumber);\n this.emit(\"poll\", pollId, blockNumber);\n if (blockNumber === this._lastBlockNumber) {\n this.emit(\"didPoll\", pollId);\n return [\n 2\n /*return*/\n ];\n }\n if (this._emitted.block === -2) {\n this._emitted.block = blockNumber - 1;\n }\n if (Math.abs(this._emitted.block - blockNumber) > 1e3) {\n logger.warn(\"network block skew detected; skipping block events (emitted=\" + this._emitted.block + \" blockNumber\" + blockNumber + \")\");\n this.emit(\"error\", logger.makeError(\"network block skew detected\", logger_1.Logger.errors.NETWORK_ERROR, {\n blockNumber,\n event: \"blockSkew\",\n previousBlockNumber: this._emitted.block\n }));\n this.emit(\"block\", blockNumber);\n } else {\n for (i3 = this._emitted.block + 1; i3 <= blockNumber; i3++) {\n this.emit(\"block\", i3);\n }\n }\n if (this._emitted.block !== blockNumber) {\n this._emitted.block = blockNumber;\n Object.keys(this._emitted).forEach(function(key) {\n if (key === \"block\") {\n return;\n }\n var eventBlockNumber = _this._emitted[key];\n if (eventBlockNumber === \"pending\") {\n return;\n }\n if (blockNumber - eventBlockNumber > 12) {\n delete _this._emitted[key];\n }\n });\n }\n if (this._lastBlockNumber === -2) {\n this._lastBlockNumber = blockNumber - 1;\n }\n this._events.forEach(function(event) {\n switch (event.type) {\n case \"tx\": {\n var hash_2 = event.hash;\n var runner = _this.getTransactionReceipt(hash_2).then(function(receipt) {\n if (!receipt || receipt.blockNumber == null) {\n return null;\n }\n _this._emitted[\"t:\" + hash_2] = receipt.blockNumber;\n _this.emit(hash_2, receipt);\n return null;\n }).catch(function(error) {\n _this.emit(\"error\", error);\n });\n runners.push(runner);\n break;\n }\n case \"filter\": {\n if (!event._inflight) {\n event._inflight = true;\n if (event._lastBlockNumber === -2) {\n event._lastBlockNumber = blockNumber - 1;\n }\n var filter_1 = event.filter;\n filter_1.fromBlock = event._lastBlockNumber + 1;\n filter_1.toBlock = blockNumber;\n var minFromBlock = filter_1.toBlock - _this._maxFilterBlockRange;\n if (minFromBlock > filter_1.fromBlock) {\n filter_1.fromBlock = minFromBlock;\n }\n if (filter_1.fromBlock < 0) {\n filter_1.fromBlock = 0;\n }\n var runner = _this.getLogs(filter_1).then(function(logs) {\n event._inflight = false;\n if (logs.length === 0) {\n return;\n }\n logs.forEach(function(log) {\n if (log.blockNumber > event._lastBlockNumber) {\n event._lastBlockNumber = log.blockNumber;\n }\n _this._emitted[\"b:\" + log.blockHash] = log.blockNumber;\n _this._emitted[\"t:\" + log.transactionHash] = log.blockNumber;\n _this.emit(filter_1, log);\n });\n }).catch(function(error) {\n _this.emit(\"error\", error);\n event._inflight = false;\n });\n runners.push(runner);\n }\n break;\n }\n }\n });\n this._lastBlockNumber = blockNumber;\n Promise.all(runners).then(function() {\n _this.emit(\"didPoll\", pollId);\n }).catch(function(error) {\n _this.emit(\"error\", error);\n });\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.resetEventsBlock = function(blockNumber) {\n this._lastBlockNumber = blockNumber - 1;\n if (this.polling) {\n this.poll();\n }\n };\n Object.defineProperty(BaseProvider2.prototype, \"network\", {\n get: function() {\n return this._network;\n },\n enumerable: false,\n configurable: true\n });\n BaseProvider2.prototype.detectNetwork = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n return [2, logger.throwError(\"provider does not support network detection\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"provider.detectNetwork\"\n })];\n });\n });\n };\n BaseProvider2.prototype.getNetwork = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var network, currentNetwork, error;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this._ready()];\n case 1:\n network = _a.sent();\n return [4, this.detectNetwork()];\n case 2:\n currentNetwork = _a.sent();\n if (!(network.chainId !== currentNetwork.chainId))\n return [3, 5];\n if (!this.anyNetwork)\n return [3, 4];\n this._network = currentNetwork;\n this._lastBlockNumber = -2;\n this._fastBlockNumber = null;\n this._fastBlockNumberPromise = null;\n this._fastQueryDate = 0;\n this._emitted.block = -2;\n this._maxInternalBlockNumber = -1024;\n this._internalBlockNumber = null;\n this.emit(\"network\", currentNetwork, network);\n return [4, stall(0)];\n case 3:\n _a.sent();\n return [2, this._network];\n case 4:\n error = logger.makeError(\"underlying network changed\", logger_1.Logger.errors.NETWORK_ERROR, {\n event: \"changed\",\n network,\n detectedNetwork: currentNetwork\n });\n this.emit(\"error\", error);\n throw error;\n case 5:\n return [2, network];\n }\n });\n });\n };\n Object.defineProperty(BaseProvider2.prototype, \"blockNumber\", {\n get: function() {\n var _this = this;\n this._getInternalBlockNumber(100 + this.pollingInterval / 2).then(function(blockNumber) {\n _this._setFastBlockNumber(blockNumber);\n }, function(error) {\n });\n return this._fastBlockNumber != null ? this._fastBlockNumber : -1;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseProvider2.prototype, \"polling\", {\n get: function() {\n return this._poller != null;\n },\n set: function(value) {\n var _this = this;\n if (value && !this._poller) {\n this._poller = setInterval(function() {\n _this.poll();\n }, this.pollingInterval);\n if (!this._bootstrapPoll) {\n this._bootstrapPoll = setTimeout(function() {\n _this.poll();\n _this._bootstrapPoll = setTimeout(function() {\n if (!_this._poller) {\n _this.poll();\n }\n _this._bootstrapPoll = null;\n }, _this.pollingInterval);\n }, 0);\n }\n } else if (!value && this._poller) {\n clearInterval(this._poller);\n this._poller = null;\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseProvider2.prototype, \"pollingInterval\", {\n get: function() {\n return this._pollingInterval;\n },\n set: function(value) {\n var _this = this;\n if (typeof value !== \"number\" || value <= 0 || parseInt(String(value)) != value) {\n throw new Error(\"invalid polling interval\");\n }\n this._pollingInterval = value;\n if (this._poller) {\n clearInterval(this._poller);\n this._poller = setInterval(function() {\n _this.poll();\n }, this._pollingInterval);\n }\n },\n enumerable: false,\n configurable: true\n });\n BaseProvider2.prototype._getFastBlockNumber = function() {\n var _this = this;\n var now = getTime();\n if (now - this._fastQueryDate > 2 * this._pollingInterval) {\n this._fastQueryDate = now;\n this._fastBlockNumberPromise = this.getBlockNumber().then(function(blockNumber) {\n if (_this._fastBlockNumber == null || blockNumber > _this._fastBlockNumber) {\n _this._fastBlockNumber = blockNumber;\n }\n return _this._fastBlockNumber;\n });\n }\n return this._fastBlockNumberPromise;\n };\n BaseProvider2.prototype._setFastBlockNumber = function(blockNumber) {\n if (this._fastBlockNumber != null && blockNumber < this._fastBlockNumber) {\n return;\n }\n this._fastQueryDate = getTime();\n if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) {\n this._fastBlockNumber = blockNumber;\n this._fastBlockNumberPromise = Promise.resolve(blockNumber);\n }\n };\n BaseProvider2.prototype.waitForTransaction = function(transactionHash, confirmations, timeout) {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n return [2, this._waitForTransaction(transactionHash, confirmations == null ? 1 : confirmations, timeout || 0, null)];\n });\n });\n };\n BaseProvider2.prototype._waitForTransaction = function(transactionHash, confirmations, timeout, replaceable) {\n return __awaiter4(this, void 0, void 0, function() {\n var receipt;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getTransactionReceipt(transactionHash)];\n case 1:\n receipt = _a.sent();\n if ((receipt ? receipt.confirmations : 0) >= confirmations) {\n return [2, receipt];\n }\n return [2, new Promise(function(resolve, reject) {\n var cancelFuncs = [];\n var done = false;\n var alreadyDone = function() {\n if (done) {\n return true;\n }\n done = true;\n cancelFuncs.forEach(function(func) {\n func();\n });\n return false;\n };\n var minedHandler = function(receipt2) {\n if (receipt2.confirmations < confirmations) {\n return;\n }\n if (alreadyDone()) {\n return;\n }\n resolve(receipt2);\n };\n _this.on(transactionHash, minedHandler);\n cancelFuncs.push(function() {\n _this.removeListener(transactionHash, minedHandler);\n });\n if (replaceable) {\n var lastBlockNumber_1 = replaceable.startBlock;\n var scannedBlock_1 = null;\n var replaceHandler_1 = function(blockNumber) {\n return __awaiter4(_this, void 0, void 0, function() {\n var _this2 = this;\n return __generator4(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, stall(1e3)];\n case 1:\n _a2.sent();\n this.getTransactionCount(replaceable.from).then(function(nonce) {\n return __awaiter4(_this2, void 0, void 0, function() {\n var mined, block, ti, tx, receipt_1, reason;\n return __generator4(this, function(_a3) {\n switch (_a3.label) {\n case 0:\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n if (!(nonce <= replaceable.nonce))\n return [3, 1];\n lastBlockNumber_1 = blockNumber;\n return [3, 9];\n case 1:\n return [4, this.getTransaction(transactionHash)];\n case 2:\n mined = _a3.sent();\n if (mined && mined.blockNumber != null) {\n return [\n 2\n /*return*/\n ];\n }\n if (scannedBlock_1 == null) {\n scannedBlock_1 = lastBlockNumber_1 - 3;\n if (scannedBlock_1 < replaceable.startBlock) {\n scannedBlock_1 = replaceable.startBlock;\n }\n }\n _a3.label = 3;\n case 3:\n if (!(scannedBlock_1 <= blockNumber))\n return [3, 9];\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, this.getBlockWithTransactions(scannedBlock_1)];\n case 4:\n block = _a3.sent();\n ti = 0;\n _a3.label = 5;\n case 5:\n if (!(ti < block.transactions.length))\n return [3, 8];\n tx = block.transactions[ti];\n if (tx.hash === transactionHash) {\n return [\n 2\n /*return*/\n ];\n }\n if (!(tx.from === replaceable.from && tx.nonce === replaceable.nonce))\n return [3, 7];\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n return [4, this.waitForTransaction(tx.hash, confirmations)];\n case 6:\n receipt_1 = _a3.sent();\n if (alreadyDone()) {\n return [\n 2\n /*return*/\n ];\n }\n reason = \"replaced\";\n if (tx.data === replaceable.data && tx.to === replaceable.to && tx.value.eq(replaceable.value)) {\n reason = \"repriced\";\n } else if (tx.data === \"0x\" && tx.from === tx.to && tx.value.isZero()) {\n reason = \"cancelled\";\n }\n reject(logger.makeError(\"transaction was replaced\", logger_1.Logger.errors.TRANSACTION_REPLACED, {\n cancelled: reason === \"replaced\" || reason === \"cancelled\",\n reason,\n replacement: this._wrapTransaction(tx),\n hash: transactionHash,\n receipt: receipt_1\n }));\n return [\n 2\n /*return*/\n ];\n case 7:\n ti++;\n return [3, 5];\n case 8:\n scannedBlock_1++;\n return [3, 3];\n case 9:\n if (done) {\n return [\n 2\n /*return*/\n ];\n }\n this.once(\"block\", replaceHandler_1);\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n }, function(error) {\n if (done) {\n return;\n }\n _this2.once(\"block\", replaceHandler_1);\n });\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n if (done) {\n return;\n }\n _this.once(\"block\", replaceHandler_1);\n cancelFuncs.push(function() {\n _this.removeListener(\"block\", replaceHandler_1);\n });\n }\n if (typeof timeout === \"number\" && timeout > 0) {\n var timer_1 = setTimeout(function() {\n if (alreadyDone()) {\n return;\n }\n reject(logger.makeError(\"timeout exceeded\", logger_1.Logger.errors.TIMEOUT, { timeout }));\n }, timeout);\n if (timer_1.unref) {\n timer_1.unref();\n }\n cancelFuncs.push(function() {\n clearTimeout(timer_1);\n });\n }\n })];\n }\n });\n });\n };\n BaseProvider2.prototype.getBlockNumber = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n return [2, this._getInternalBlockNumber(0)];\n });\n });\n };\n BaseProvider2.prototype.getGasPrice = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, this.perform(\"getGasPrice\", {})];\n case 2:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getGasPrice\",\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getBalance = function(addressOrName, blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getBalance\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getBalance\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getTransactionCount = function(addressOrName, blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getTransactionCount\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result).toNumber()];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getTransactionCount\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getCode = function(addressOrName, blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getCode\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getCode\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.getStorageAt = function(addressOrName, position, blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag),\n position: Promise.resolve(position).then(function(p4) {\n return (0, bytes_1.hexValue)(p4);\n })\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getStorageAt\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"getStorageAt\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._wrapTransaction = function(tx, hash3, startBlock) {\n var _this = this;\n if (hash3 != null && (0, bytes_1.hexDataLength)(hash3) !== 32) {\n throw new Error(\"invalid response - sendTransaction\");\n }\n var result = tx;\n if (hash3 != null && tx.hash !== hash3) {\n logger.throwError(\"Transaction hash mismatch from Provider.sendTransaction.\", logger_1.Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash3 });\n }\n result.wait = function(confirms, timeout) {\n return __awaiter4(_this, void 0, void 0, function() {\n var replacement, receipt;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (confirms == null) {\n confirms = 1;\n }\n if (timeout == null) {\n timeout = 0;\n }\n replacement = void 0;\n if (confirms !== 0 && startBlock != null) {\n replacement = {\n data: tx.data,\n from: tx.from,\n nonce: tx.nonce,\n to: tx.to,\n value: tx.value,\n startBlock\n };\n }\n return [4, this._waitForTransaction(tx.hash, confirms, timeout, replacement)];\n case 1:\n receipt = _a.sent();\n if (receipt == null && confirms === 0) {\n return [2, null];\n }\n this._emitted[\"t:\" + tx.hash] = receipt.blockNumber;\n if (receipt.status === 0) {\n logger.throwError(\"transaction failed\", logger_1.Logger.errors.CALL_EXCEPTION, {\n transactionHash: tx.hash,\n transaction: tx,\n receipt\n });\n }\n return [2, receipt];\n }\n });\n });\n };\n return result;\n };\n BaseProvider2.prototype.sendTransaction = function(signedTransaction) {\n return __awaiter4(this, void 0, void 0, function() {\n var hexTx, tx, blockNumber, hash3, error_7;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, Promise.resolve(signedTransaction).then(function(t3) {\n return (0, bytes_1.hexlify)(t3);\n })];\n case 2:\n hexTx = _a.sent();\n tx = this.formatter.transaction(signedTransaction);\n if (tx.confirmations == null) {\n tx.confirmations = 0;\n }\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 3:\n blockNumber = _a.sent();\n _a.label = 4;\n case 4:\n _a.trys.push([4, 6, , 7]);\n return [4, this.perform(\"sendTransaction\", { signedTransaction: hexTx })];\n case 5:\n hash3 = _a.sent();\n return [2, this._wrapTransaction(tx, hash3, blockNumber)];\n case 6:\n error_7 = _a.sent();\n error_7.transaction = tx;\n error_7.transactionHash = tx.hash;\n throw error_7;\n case 7:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._getTransactionRequest = function(transaction) {\n return __awaiter4(this, void 0, void 0, function() {\n var values, tx, _a, _b;\n var _this = this;\n return __generator4(this, function(_c) {\n switch (_c.label) {\n case 0:\n return [4, transaction];\n case 1:\n values = _c.sent();\n tx = {};\n [\"from\", \"to\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 ? _this._getAddress(v2) : null;\n });\n });\n [\"gasLimit\", \"gasPrice\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"value\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 ? bignumber_1.BigNumber.from(v2) : null;\n });\n });\n [\"type\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 != null ? v2 : null;\n });\n });\n if (values.accessList) {\n tx.accessList = this.formatter.accessList(values.accessList);\n }\n [\"data\"].forEach(function(key) {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then(function(v2) {\n return v2 ? (0, bytes_1.hexlify)(v2) : null;\n });\n });\n _b = (_a = this.formatter).transactionRequest;\n return [4, (0, properties_1.resolveProperties)(tx)];\n case 2:\n return [2, _b.apply(_a, [_c.sent()])];\n }\n });\n });\n };\n BaseProvider2.prototype._getFilter = function(filter) {\n return __awaiter4(this, void 0, void 0, function() {\n var result, _a, _b;\n var _this = this;\n return __generator4(this, function(_c) {\n switch (_c.label) {\n case 0:\n return [4, filter];\n case 1:\n filter = _c.sent();\n result = {};\n if (filter.address != null) {\n result.address = this._getAddress(filter.address);\n }\n [\"blockHash\", \"topics\"].forEach(function(key) {\n if (filter[key] == null) {\n return;\n }\n result[key] = filter[key];\n });\n [\"fromBlock\", \"toBlock\"].forEach(function(key) {\n if (filter[key] == null) {\n return;\n }\n result[key] = _this._getBlockTag(filter[key]);\n });\n _b = (_a = this.formatter).filter;\n return [4, (0, properties_1.resolveProperties)(result)];\n case 2:\n return [2, _b.apply(_a, [_c.sent()])];\n }\n });\n });\n };\n BaseProvider2.prototype._call = function(transaction, blockTag, attempt) {\n return __awaiter4(this, void 0, void 0, function() {\n var txSender, result, data, sender, urls, urlsOffset, urlsLength, urlsData, u2, url, calldata, callbackSelector, extraData, ccipResult, tx, error_8;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (attempt >= MAX_CCIP_REDIRECTS) {\n logger.throwError(\"CCIP read exceeded maximum redirections\", logger_1.Logger.errors.SERVER_ERROR, {\n redirects: attempt,\n transaction\n });\n }\n txSender = transaction.to;\n return [4, this.perform(\"call\", { transaction, blockTag })];\n case 1:\n result = _a.sent();\n if (!(attempt >= 0 && blockTag === \"latest\" && txSender != null && result.substring(0, 10) === \"0x556f1830\" && (0, bytes_1.hexDataLength)(result) % 32 === 4))\n return [3, 5];\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n data = (0, bytes_1.hexDataSlice)(result, 4);\n sender = (0, bytes_1.hexDataSlice)(data, 0, 32);\n if (!bignumber_1.BigNumber.from(sender).eq(txSender)) {\n logger.throwError(\"CCIP Read sender did not match\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n urls = [];\n urlsOffset = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(data, 32, 64)).toNumber();\n urlsLength = bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(data, urlsOffset, urlsOffset + 32)).toNumber();\n urlsData = (0, bytes_1.hexDataSlice)(data, urlsOffset + 32);\n for (u2 = 0; u2 < urlsLength; u2++) {\n url = _parseString(urlsData, u2 * 32);\n if (url == null) {\n logger.throwError(\"CCIP Read contained corrupt URL string\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n urls.push(url);\n }\n calldata = _parseBytes(data, 64);\n if (!bignumber_1.BigNumber.from((0, bytes_1.hexDataSlice)(data, 100, 128)).isZero()) {\n logger.throwError(\"CCIP Read callback selector included junk\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n callbackSelector = (0, bytes_1.hexDataSlice)(data, 96, 100);\n extraData = _parseBytes(data, 128);\n return [4, this.ccipReadFetch(transaction, calldata, urls)];\n case 3:\n ccipResult = _a.sent();\n if (ccipResult == null) {\n logger.throwError(\"CCIP Read disabled or provided no URLs\", logger_1.Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction,\n data: result\n });\n }\n tx = {\n to: txSender,\n data: (0, bytes_1.hexConcat)([callbackSelector, encodeBytes3([ccipResult, extraData])])\n };\n return [2, this._call(tx, blockTag, attempt + 1)];\n case 4:\n error_8 = _a.sent();\n if (error_8.code === logger_1.Logger.errors.SERVER_ERROR) {\n throw error_8;\n }\n return [3, 5];\n case 5:\n try {\n return [2, (0, bytes_1.hexlify)(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"call\",\n params: { transaction, blockTag },\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype.call = function(transaction, blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var resolved;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n transaction: this._getTransactionRequest(transaction),\n blockTag: this._getBlockTag(blockTag),\n ccipReadEnabled: Promise.resolve(transaction.ccipReadEnabled)\n })];\n case 2:\n resolved = _a.sent();\n return [2, this._call(resolved.transaction, resolved.blockTag, resolved.ccipReadEnabled ? 0 : -1)];\n }\n });\n });\n };\n BaseProvider2.prototype.estimateGas = function(transaction) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, result;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({\n transaction: this._getTransactionRequest(transaction)\n })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"estimateGas\", params)];\n case 3:\n result = _a.sent();\n try {\n return [2, bignumber_1.BigNumber.from(result)];\n } catch (error) {\n return [2, logger.throwError(\"bad result from backend\", logger_1.Logger.errors.SERVER_ERROR, {\n method: \"estimateGas\",\n params,\n result,\n error\n })];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._getAddress = function(addressOrName) {\n return __awaiter4(this, void 0, void 0, function() {\n var address;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, addressOrName];\n case 1:\n addressOrName = _a.sent();\n if (typeof addressOrName !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", addressOrName);\n }\n return [4, this.resolveName(addressOrName)];\n case 2:\n address = _a.sent();\n if (address == null) {\n logger.throwError(\"ENS name not configured\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName(\" + JSON.stringify(addressOrName) + \")\"\n });\n }\n return [2, address];\n }\n });\n });\n };\n BaseProvider2.prototype._getBlock = function(blockHashOrBlockTag, includeTransactions) {\n return __awaiter4(this, void 0, void 0, function() {\n var blockNumber, params, _a, error_9;\n var _this = this;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _b.sent();\n return [4, blockHashOrBlockTag];\n case 2:\n blockHashOrBlockTag = _b.sent();\n blockNumber = -128;\n params = {\n includeTransactions: !!includeTransactions\n };\n if (!(0, bytes_1.isHexString)(blockHashOrBlockTag, 32))\n return [3, 3];\n params.blockHash = blockHashOrBlockTag;\n return [3, 6];\n case 3:\n _b.trys.push([3, 5, , 6]);\n _a = params;\n return [4, this._getBlockTag(blockHashOrBlockTag)];\n case 4:\n _a.blockTag = _b.sent();\n if ((0, bytes_1.isHexString)(params.blockTag)) {\n blockNumber = parseInt(params.blockTag.substring(2), 16);\n }\n return [3, 6];\n case 5:\n error_9 = _b.sent();\n logger.throwArgumentError(\"invalid block hash or block tag\", \"blockHashOrBlockTag\", blockHashOrBlockTag);\n return [3, 6];\n case 6:\n return [2, (0, web_1.poll)(function() {\n return __awaiter4(_this, void 0, void 0, function() {\n var block, blockNumber_1, i3, tx, confirmations, blockWithTxs;\n var _this2 = this;\n return __generator4(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.perform(\"getBlock\", params)];\n case 1:\n block = _a2.sent();\n if (block == null) {\n if (params.blockHash != null) {\n if (this._emitted[\"b:\" + params.blockHash] == null) {\n return [2, null];\n }\n }\n if (params.blockTag != null) {\n if (blockNumber > this._emitted.block) {\n return [2, null];\n }\n }\n return [2, void 0];\n }\n if (!includeTransactions)\n return [3, 8];\n blockNumber_1 = null;\n i3 = 0;\n _a2.label = 2;\n case 2:\n if (!(i3 < block.transactions.length))\n return [3, 7];\n tx = block.transactions[i3];\n if (!(tx.blockNumber == null))\n return [3, 3];\n tx.confirmations = 0;\n return [3, 6];\n case 3:\n if (!(tx.confirmations == null))\n return [3, 6];\n if (!(blockNumber_1 == null))\n return [3, 5];\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 4:\n blockNumber_1 = _a2.sent();\n _a2.label = 5;\n case 5:\n confirmations = blockNumber_1 - tx.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n tx.confirmations = confirmations;\n _a2.label = 6;\n case 6:\n i3++;\n return [3, 2];\n case 7:\n blockWithTxs = this.formatter.blockWithTransactions(block);\n blockWithTxs.transactions = blockWithTxs.transactions.map(function(tx2) {\n return _this2._wrapTransaction(tx2);\n });\n return [2, blockWithTxs];\n case 8:\n return [2, this.formatter.block(block)];\n }\n });\n });\n }, { oncePoll: this })];\n }\n });\n });\n };\n BaseProvider2.prototype.getBlock = function(blockHashOrBlockTag) {\n return this._getBlock(blockHashOrBlockTag, false);\n };\n BaseProvider2.prototype.getBlockWithTransactions = function(blockHashOrBlockTag) {\n return this._getBlock(blockHashOrBlockTag, true);\n };\n BaseProvider2.prototype.getTransaction = function(transactionHash) {\n return __awaiter4(this, void 0, void 0, function() {\n var params;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, transactionHash];\n case 2:\n transactionHash = _a.sent();\n params = { transactionHash: this.formatter.hash(transactionHash, true) };\n return [2, (0, web_1.poll)(function() {\n return __awaiter4(_this, void 0, void 0, function() {\n var result, tx, blockNumber, confirmations;\n return __generator4(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.perform(\"getTransaction\", params)];\n case 1:\n result = _a2.sent();\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return [2, null];\n }\n return [2, void 0];\n }\n tx = this.formatter.transactionResponse(result);\n if (!(tx.blockNumber == null))\n return [3, 2];\n tx.confirmations = 0;\n return [3, 4];\n case 2:\n if (!(tx.confirmations == null))\n return [3, 4];\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 3:\n blockNumber = _a2.sent();\n confirmations = blockNumber - tx.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n tx.confirmations = confirmations;\n _a2.label = 4;\n case 4:\n return [2, this._wrapTransaction(tx)];\n }\n });\n });\n }, { oncePoll: this })];\n }\n });\n });\n };\n BaseProvider2.prototype.getTransactionReceipt = function(transactionHash) {\n return __awaiter4(this, void 0, void 0, function() {\n var params;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, transactionHash];\n case 2:\n transactionHash = _a.sent();\n params = { transactionHash: this.formatter.hash(transactionHash, true) };\n return [2, (0, web_1.poll)(function() {\n return __awaiter4(_this, void 0, void 0, function() {\n var result, receipt, blockNumber, confirmations;\n return __generator4(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.perform(\"getTransactionReceipt\", params)];\n case 1:\n result = _a2.sent();\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return [2, null];\n }\n return [2, void 0];\n }\n if (result.blockHash == null) {\n return [2, void 0];\n }\n receipt = this.formatter.receipt(result);\n if (!(receipt.blockNumber == null))\n return [3, 2];\n receipt.confirmations = 0;\n return [3, 4];\n case 2:\n if (!(receipt.confirmations == null))\n return [3, 4];\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 3:\n blockNumber = _a2.sent();\n confirmations = blockNumber - receipt.blockNumber + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n receipt.confirmations = confirmations;\n _a2.label = 4;\n case 4:\n return [2, receipt];\n }\n });\n });\n }, { oncePoll: this })];\n }\n });\n });\n };\n BaseProvider2.prototype.getLogs = function(filter) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, logs;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [4, (0, properties_1.resolveProperties)({ filter: this._getFilter(filter) })];\n case 2:\n params = _a.sent();\n return [4, this.perform(\"getLogs\", params)];\n case 3:\n logs = _a.sent();\n logs.forEach(function(log) {\n if (log.removed == null) {\n log.removed = false;\n }\n });\n return [2, formatter_1.Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(logs)];\n }\n });\n });\n };\n BaseProvider2.prototype.getEtherPrice = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.getNetwork()];\n case 1:\n _a.sent();\n return [2, this.perform(\"getEtherPrice\", {})];\n }\n });\n });\n };\n BaseProvider2.prototype._getBlockTag = function(blockTag) {\n return __awaiter4(this, void 0, void 0, function() {\n var blockNumber;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, blockTag];\n case 1:\n blockTag = _a.sent();\n if (!(typeof blockTag === \"number\" && blockTag < 0))\n return [3, 3];\n if (blockTag % 1) {\n logger.throwArgumentError(\"invalid BlockTag\", \"blockTag\", blockTag);\n }\n return [4, this._getInternalBlockNumber(100 + 2 * this.pollingInterval)];\n case 2:\n blockNumber = _a.sent();\n blockNumber += blockTag;\n if (blockNumber < 0) {\n blockNumber = 0;\n }\n return [2, this.formatter.blockTag(blockNumber)];\n case 3:\n return [2, this.formatter.blockTag(blockTag)];\n }\n });\n });\n };\n BaseProvider2.prototype.getResolver = function(name) {\n return __awaiter4(this, void 0, void 0, function() {\n var currentName, addr, resolver, _a;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n currentName = name;\n _b.label = 1;\n case 1:\n if (false)\n return [3, 6];\n if (currentName === \"\" || currentName === \".\") {\n return [2, null];\n }\n if (name !== \"eth\" && currentName === \"eth\") {\n return [2, null];\n }\n return [4, this._getResolver(currentName, \"getResolver\")];\n case 2:\n addr = _b.sent();\n if (!(addr != null))\n return [3, 5];\n resolver = new Resolver(this, addr, name);\n _a = currentName !== name;\n if (!_a)\n return [3, 4];\n return [4, resolver.supportsWildcard()];\n case 3:\n _a = !_b.sent();\n _b.label = 4;\n case 4:\n if (_a) {\n return [2, null];\n }\n return [2, resolver];\n case 5:\n currentName = currentName.split(\".\").slice(1).join(\".\");\n return [3, 1];\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n BaseProvider2.prototype._getResolver = function(name, operation) {\n return __awaiter4(this, void 0, void 0, function() {\n var network, addrData, error_10;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (operation == null) {\n operation = \"ENS\";\n }\n return [4, this.getNetwork()];\n case 1:\n network = _a.sent();\n if (!network.ensAddress) {\n logger.throwError(\"network does not support ENS\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation, network: network.name });\n }\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.call({\n to: network.ensAddress,\n data: \"0x0178b8bf\" + (0, hash_1.namehash)(name).substring(2)\n })];\n case 3:\n addrData = _a.sent();\n return [2, this.formatter.callAddress(addrData)];\n case 4:\n error_10 = _a.sent();\n return [3, 5];\n case 5:\n return [2, null];\n }\n });\n });\n };\n BaseProvider2.prototype.resolveName = function(name) {\n return __awaiter4(this, void 0, void 0, function() {\n var resolver;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, name];\n case 1:\n name = _a.sent();\n try {\n return [2, Promise.resolve(this.formatter.address(name))];\n } catch (error) {\n if ((0, bytes_1.isHexString)(name)) {\n throw error;\n }\n }\n if (typeof name !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name\", \"name\", name);\n }\n return [4, this.getResolver(name)];\n case 2:\n resolver = _a.sent();\n if (!resolver) {\n return [2, null];\n }\n return [4, resolver.getAddress()];\n case 3:\n return [2, _a.sent()];\n }\n });\n });\n };\n BaseProvider2.prototype.lookupAddress = function(address) {\n return __awaiter4(this, void 0, void 0, function() {\n var node, resolverAddr, name, _a, addr;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n return [4, address];\n case 1:\n address = _b.sent();\n address = this.formatter.address(address);\n node = address.substring(2).toLowerCase() + \".addr.reverse\";\n return [4, this._getResolver(node, \"lookupAddress\")];\n case 2:\n resolverAddr = _b.sent();\n if (resolverAddr == null) {\n return [2, null];\n }\n _a = _parseString;\n return [4, this.call({\n to: resolverAddr,\n data: \"0x691f3431\" + (0, hash_1.namehash)(node).substring(2)\n })];\n case 3:\n name = _a.apply(void 0, [_b.sent(), 0]);\n return [4, this.resolveName(name)];\n case 4:\n addr = _b.sent();\n if (addr != address) {\n return [2, null];\n }\n return [2, name];\n }\n });\n });\n };\n BaseProvider2.prototype.getAvatar = function(nameOrAddress) {\n return __awaiter4(this, void 0, void 0, function() {\n var resolver, address, node, resolverAddress, avatar_1, error_11, name_1, _a, error_12, avatar;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n resolver = null;\n if (!(0, bytes_1.isHexString)(nameOrAddress))\n return [3, 10];\n address = this.formatter.address(nameOrAddress);\n node = address.substring(2).toLowerCase() + \".addr.reverse\";\n return [4, this._getResolver(node, \"getAvatar\")];\n case 1:\n resolverAddress = _b.sent();\n if (!resolverAddress) {\n return [2, null];\n }\n resolver = new Resolver(this, resolverAddress, node);\n _b.label = 2;\n case 2:\n _b.trys.push([2, 4, , 5]);\n return [4, resolver.getAvatar()];\n case 3:\n avatar_1 = _b.sent();\n if (avatar_1) {\n return [2, avatar_1.url];\n }\n return [3, 5];\n case 4:\n error_11 = _b.sent();\n if (error_11.code !== logger_1.Logger.errors.CALL_EXCEPTION) {\n throw error_11;\n }\n return [3, 5];\n case 5:\n _b.trys.push([5, 8, , 9]);\n _a = _parseString;\n return [4, this.call({\n to: resolverAddress,\n data: \"0x691f3431\" + (0, hash_1.namehash)(node).substring(2)\n })];\n case 6:\n name_1 = _a.apply(void 0, [_b.sent(), 0]);\n return [4, this.getResolver(name_1)];\n case 7:\n resolver = _b.sent();\n return [3, 9];\n case 8:\n error_12 = _b.sent();\n if (error_12.code !== logger_1.Logger.errors.CALL_EXCEPTION) {\n throw error_12;\n }\n return [2, null];\n case 9:\n return [3, 12];\n case 10:\n return [4, this.getResolver(nameOrAddress)];\n case 11:\n resolver = _b.sent();\n if (!resolver) {\n return [2, null];\n }\n _b.label = 12;\n case 12:\n return [4, resolver.getAvatar()];\n case 13:\n avatar = _b.sent();\n if (avatar == null) {\n return [2, null];\n }\n return [2, avatar.url];\n }\n });\n });\n };\n BaseProvider2.prototype.perform = function(method, params) {\n return logger.throwError(method + \" not implemented\", logger_1.Logger.errors.NOT_IMPLEMENTED, { operation: method });\n };\n BaseProvider2.prototype._startEvent = function(event) {\n this.polling = this._events.filter(function(e2) {\n return e2.pollable();\n }).length > 0;\n };\n BaseProvider2.prototype._stopEvent = function(event) {\n this.polling = this._events.filter(function(e2) {\n return e2.pollable();\n }).length > 0;\n };\n BaseProvider2.prototype._addEventListener = function(eventName, listener, once2) {\n var event = new Event2(getEventTag(eventName), listener, once2);\n this._events.push(event);\n this._startEvent(event);\n return this;\n };\n BaseProvider2.prototype.on = function(eventName, listener) {\n return this._addEventListener(eventName, listener, false);\n };\n BaseProvider2.prototype.once = function(eventName, listener) {\n return this._addEventListener(eventName, listener, true);\n };\n BaseProvider2.prototype.emit = function(eventName) {\n var _this = this;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var result = false;\n var stopped = [];\n var eventTag = getEventTag(eventName);\n this._events = this._events.filter(function(event) {\n if (event.tag !== eventTag) {\n return true;\n }\n setTimeout(function() {\n event.listener.apply(_this, args);\n }, 0);\n result = true;\n if (event.once) {\n stopped.push(event);\n return false;\n }\n return true;\n });\n stopped.forEach(function(event) {\n _this._stopEvent(event);\n });\n return result;\n };\n BaseProvider2.prototype.listenerCount = function(eventName) {\n if (!eventName) {\n return this._events.length;\n }\n var eventTag = getEventTag(eventName);\n return this._events.filter(function(event) {\n return event.tag === eventTag;\n }).length;\n };\n BaseProvider2.prototype.listeners = function(eventName) {\n if (eventName == null) {\n return this._events.map(function(event) {\n return event.listener;\n });\n }\n var eventTag = getEventTag(eventName);\n return this._events.filter(function(event) {\n return event.tag === eventTag;\n }).map(function(event) {\n return event.listener;\n });\n };\n BaseProvider2.prototype.off = function(eventName, listener) {\n var _this = this;\n if (listener == null) {\n return this.removeAllListeners(eventName);\n }\n var stopped = [];\n var found = false;\n var eventTag = getEventTag(eventName);\n this._events = this._events.filter(function(event) {\n if (event.tag !== eventTag || event.listener != listener) {\n return true;\n }\n if (found) {\n return true;\n }\n found = true;\n stopped.push(event);\n return false;\n });\n stopped.forEach(function(event) {\n _this._stopEvent(event);\n });\n return this;\n };\n BaseProvider2.prototype.removeAllListeners = function(eventName) {\n var _this = this;\n var stopped = [];\n if (eventName == null) {\n stopped = this._events;\n this._events = [];\n } else {\n var eventTag_1 = getEventTag(eventName);\n this._events = this._events.filter(function(event) {\n if (event.tag !== eventTag_1) {\n return true;\n }\n stopped.push(event);\n return false;\n });\n }\n stopped.forEach(function(event) {\n _this._stopEvent(event);\n });\n return this;\n };\n return BaseProvider2;\n }(abstract_provider_1.Provider)\n );\n exports3.BaseProvider = BaseProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-provider.js\n var require_json_rpc_provider2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.JsonRpcProvider = exports3.JsonRpcSigner = void 0;\n var abstract_signer_1 = require_lib15();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var hash_1 = require_lib12();\n var properties_1 = require_lib4();\n var strings_1 = require_lib9();\n var transactions_1 = require_lib17();\n var web_1 = require_lib28();\n var logger_1 = require_lib();\n var _version_1 = require_version31();\n var logger = new logger_1.Logger(_version_1.version);\n var base_provider_1 = require_base_provider2();\n var errorGas = [\"call\", \"estimateGas\"];\n function spelunk(value, requireData) {\n if (value == null) {\n return null;\n }\n if (typeof value.message === \"string\" && value.message.match(\"reverted\")) {\n var data = (0, bytes_1.isHexString)(value.data) ? value.data : null;\n if (!requireData || data) {\n return { message: value.message, data };\n }\n }\n if (typeof value === \"object\") {\n for (var key in value) {\n var result = spelunk(value[key], requireData);\n if (result) {\n return result;\n }\n }\n return null;\n }\n if (typeof value === \"string\") {\n try {\n return spelunk(JSON.parse(value), requireData);\n } catch (error) {\n }\n }\n return null;\n }\n function checkError(method, error, params) {\n var transaction = params.transaction || params.signedTransaction;\n if (method === \"call\") {\n var result = spelunk(error, true);\n if (result) {\n return result.data;\n }\n logger.throwError(\"missing revert data in call exception; Transaction reverted without a reason string\", logger_1.Logger.errors.CALL_EXCEPTION, {\n data: \"0x\",\n transaction,\n error\n });\n }\n if (method === \"estimateGas\") {\n var result = spelunk(error.body, false);\n if (result == null) {\n result = spelunk(error, false);\n }\n if (result) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n reason: result.message,\n method,\n transaction,\n error\n });\n }\n }\n var message2 = error.message;\n if (error.code === logger_1.Logger.errors.SERVER_ERROR && error.error && typeof error.error.message === \"string\") {\n message2 = error.error.message;\n } else if (typeof error.body === \"string\") {\n message2 = error.body;\n } else if (typeof error.responseText === \"string\") {\n message2 = error.responseText;\n }\n message2 = (message2 || \"\").toLowerCase();\n if (message2.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", logger_1.Logger.errors.INSUFFICIENT_FUNDS, {\n error,\n method,\n transaction\n });\n }\n if (message2.match(/nonce (is )?too low/i)) {\n logger.throwError(\"nonce has already been used\", logger_1.Logger.errors.NONCE_EXPIRED, {\n error,\n method,\n transaction\n });\n }\n if (message2.match(/replacement transaction underpriced|transaction gas price.*too low/i)) {\n logger.throwError(\"replacement fee too low\", logger_1.Logger.errors.REPLACEMENT_UNDERPRICED, {\n error,\n method,\n transaction\n });\n }\n if (message2.match(/only replay-protected/i)) {\n logger.throwError(\"legacy pre-eip-155 transactions not supported\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n error,\n method,\n transaction\n });\n }\n if (errorGas.indexOf(method) >= 0 && message2.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error,\n method,\n transaction\n });\n }\n throw error;\n }\n function timer(timeout) {\n return new Promise(function(resolve) {\n setTimeout(resolve, timeout);\n });\n }\n function getResult(payload) {\n if (payload.error) {\n var error = new Error(payload.error.message);\n error.code = payload.error.code;\n error.data = payload.error.data;\n throw error;\n }\n return payload.result;\n }\n function getLowerCase(value) {\n if (value) {\n return value.toLowerCase();\n }\n return value;\n }\n var _constructorGuard = {};\n var JsonRpcSigner = (\n /** @class */\n function(_super) {\n __extends4(JsonRpcSigner2, _super);\n function JsonRpcSigner2(constructorGuard, provider, addressOrIndex) {\n var _this = _super.call(this) || this;\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"do not call the JsonRpcSigner constructor directly; use provider.getSigner\");\n }\n (0, properties_1.defineReadOnly)(_this, \"provider\", provider);\n if (addressOrIndex == null) {\n addressOrIndex = 0;\n }\n if (typeof addressOrIndex === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"_address\", _this.provider.formatter.address(addressOrIndex));\n (0, properties_1.defineReadOnly)(_this, \"_index\", null);\n } else if (typeof addressOrIndex === \"number\") {\n (0, properties_1.defineReadOnly)(_this, \"_index\", addressOrIndex);\n (0, properties_1.defineReadOnly)(_this, \"_address\", null);\n } else {\n logger.throwArgumentError(\"invalid address or index\", \"addressOrIndex\", addressOrIndex);\n }\n return _this;\n }\n JsonRpcSigner2.prototype.connect = function(provider) {\n return logger.throwError(\"cannot alter JSON-RPC Signer connection\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"connect\"\n });\n };\n JsonRpcSigner2.prototype.connectUnchecked = function() {\n return new UncheckedJsonRpcSigner(_constructorGuard, this.provider, this._address || this._index);\n };\n JsonRpcSigner2.prototype.getAddress = function() {\n var _this = this;\n if (this._address) {\n return Promise.resolve(this._address);\n }\n return this.provider.send(\"eth_accounts\", []).then(function(accounts) {\n if (accounts.length <= _this._index) {\n logger.throwError(\"unknown account #\" + _this._index, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress\"\n });\n }\n return _this.provider.formatter.address(accounts[_this._index]);\n });\n };\n JsonRpcSigner2.prototype.sendUncheckedTransaction = function(transaction) {\n var _this = this;\n transaction = (0, properties_1.shallowCopy)(transaction);\n var fromAddress = this.getAddress().then(function(address) {\n if (address) {\n address = address.toLowerCase();\n }\n return address;\n });\n if (transaction.gasLimit == null) {\n var estimate = (0, properties_1.shallowCopy)(transaction);\n estimate.from = fromAddress;\n transaction.gasLimit = this.provider.estimateGas(estimate);\n }\n if (transaction.to != null) {\n transaction.to = Promise.resolve(transaction.to).then(function(to) {\n return __awaiter4(_this, void 0, void 0, function() {\n var address;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (to == null) {\n return [2, null];\n }\n return [4, this.provider.resolveName(to)];\n case 1:\n address = _a.sent();\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return [2, address];\n }\n });\n });\n });\n }\n return (0, properties_1.resolveProperties)({\n tx: (0, properties_1.resolveProperties)(transaction),\n sender: fromAddress\n }).then(function(_a) {\n var tx = _a.tx, sender = _a.sender;\n if (tx.from != null) {\n if (tx.from.toLowerCase() !== sender) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n } else {\n tx.from = sender;\n }\n var hexTx = _this.provider.constructor.hexlifyTransaction(tx, { from: true });\n return _this.provider.send(\"eth_sendTransaction\", [hexTx]).then(function(hash3) {\n return hash3;\n }, function(error) {\n if (typeof error.message === \"string\" && error.message.match(/user denied/i)) {\n logger.throwError(\"user rejected transaction\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"sendTransaction\",\n transaction: tx\n });\n }\n return checkError(\"sendTransaction\", error, hexTx);\n });\n });\n };\n JsonRpcSigner2.prototype.signTransaction = function(transaction) {\n return logger.throwError(\"signing transactions is unsupported\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signTransaction\"\n });\n };\n JsonRpcSigner2.prototype.sendTransaction = function(transaction) {\n return __awaiter4(this, void 0, void 0, function() {\n var blockNumber, hash3, error_1;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval)];\n case 1:\n blockNumber = _a.sent();\n return [4, this.sendUncheckedTransaction(transaction)];\n case 2:\n hash3 = _a.sent();\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, (0, web_1.poll)(function() {\n return __awaiter4(_this, void 0, void 0, function() {\n var tx;\n return __generator4(this, function(_a2) {\n switch (_a2.label) {\n case 0:\n return [4, this.provider.getTransaction(hash3)];\n case 1:\n tx = _a2.sent();\n if (tx === null) {\n return [2, void 0];\n }\n return [2, this.provider._wrapTransaction(tx, hash3, blockNumber)];\n }\n });\n });\n }, { oncePoll: this.provider })];\n case 4:\n return [2, _a.sent()];\n case 5:\n error_1 = _a.sent();\n error_1.transactionHash = hash3;\n throw error_1;\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype.signMessage = function(message2) {\n return __awaiter4(this, void 0, void 0, function() {\n var data, address, error_2;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n data = typeof message2 === \"string\" ? (0, strings_1.toUtf8Bytes)(message2) : message2;\n return [4, this.getAddress()];\n case 1:\n address = _a.sent();\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.provider.send(\"personal_sign\", [(0, bytes_1.hexlify)(data), address.toLowerCase()])];\n case 3:\n return [2, _a.sent()];\n case 4:\n error_2 = _a.sent();\n if (typeof error_2.message === \"string\" && error_2.message.match(/user denied/i)) {\n logger.throwError(\"user rejected signing\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"signMessage\",\n from: address,\n messageData: message2\n });\n }\n throw error_2;\n case 5:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype._legacySignMessage = function(message2) {\n return __awaiter4(this, void 0, void 0, function() {\n var data, address, error_3;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n data = typeof message2 === \"string\" ? (0, strings_1.toUtf8Bytes)(message2) : message2;\n return [4, this.getAddress()];\n case 1:\n address = _a.sent();\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 5]);\n return [4, this.provider.send(\"eth_sign\", [address.toLowerCase(), (0, bytes_1.hexlify)(data)])];\n case 3:\n return [2, _a.sent()];\n case 4:\n error_3 = _a.sent();\n if (typeof error_3.message === \"string\" && error_3.message.match(/user denied/i)) {\n logger.throwError(\"user rejected signing\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"_legacySignMessage\",\n from: address,\n messageData: message2\n });\n }\n throw error_3;\n case 5:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype._signTypedData = function(domain2, types2, value) {\n return __awaiter4(this, void 0, void 0, function() {\n var populated, address, error_4;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, hash_1._TypedDataEncoder.resolveNames(domain2, types2, value, function(name) {\n return _this.provider.resolveName(name);\n })];\n case 1:\n populated = _a.sent();\n return [4, this.getAddress()];\n case 2:\n address = _a.sent();\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, this.provider.send(\"eth_signTypedData_v4\", [\n address.toLowerCase(),\n JSON.stringify(hash_1._TypedDataEncoder.getPayload(populated.domain, types2, populated.value))\n ])];\n case 4:\n return [2, _a.sent()];\n case 5:\n error_4 = _a.sent();\n if (typeof error_4.message === \"string\" && error_4.message.match(/user denied/i)) {\n logger.throwError(\"user rejected signing\", logger_1.Logger.errors.ACTION_REJECTED, {\n action: \"_signTypedData\",\n from: address,\n messageData: { domain: populated.domain, types: types2, value: populated.value }\n });\n }\n throw error_4;\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcSigner2.prototype.unlock = function(password) {\n return __awaiter4(this, void 0, void 0, function() {\n var provider, address;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n provider = this.provider;\n return [4, this.getAddress()];\n case 1:\n address = _a.sent();\n return [2, provider.send(\"personal_unlockAccount\", [address.toLowerCase(), password, null])];\n }\n });\n });\n };\n return JsonRpcSigner2;\n }(abstract_signer_1.Signer)\n );\n exports3.JsonRpcSigner = JsonRpcSigner;\n var UncheckedJsonRpcSigner = (\n /** @class */\n function(_super) {\n __extends4(UncheckedJsonRpcSigner2, _super);\n function UncheckedJsonRpcSigner2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n UncheckedJsonRpcSigner2.prototype.sendTransaction = function(transaction) {\n var _this = this;\n return this.sendUncheckedTransaction(transaction).then(function(hash3) {\n return {\n hash: hash3,\n nonce: null,\n gasLimit: null,\n gasPrice: null,\n data: null,\n value: null,\n chainId: null,\n confirmations: 0,\n from: null,\n wait: function(confirmations) {\n return _this.provider.waitForTransaction(hash3, confirmations);\n }\n };\n });\n };\n return UncheckedJsonRpcSigner2;\n }(JsonRpcSigner)\n );\n var allowedTransactionKeys = {\n chainId: true,\n data: true,\n gasLimit: true,\n gasPrice: true,\n nonce: true,\n to: true,\n value: true,\n type: true,\n accessList: true,\n maxFeePerGas: true,\n maxPriorityFeePerGas: true\n };\n var JsonRpcProvider = (\n /** @class */\n function(_super) {\n __extends4(JsonRpcProvider2, _super);\n function JsonRpcProvider2(url, network) {\n var _this = this;\n var networkOrReady = network;\n if (networkOrReady == null) {\n networkOrReady = new Promise(function(resolve, reject) {\n setTimeout(function() {\n _this.detectNetwork().then(function(network2) {\n resolve(network2);\n }, function(error) {\n reject(error);\n });\n }, 0);\n });\n }\n _this = _super.call(this, networkOrReady) || this;\n if (!url) {\n url = (0, properties_1.getStatic)(_this.constructor, \"defaultUrl\")();\n }\n if (typeof url === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"connection\", Object.freeze({\n url\n }));\n } else {\n (0, properties_1.defineReadOnly)(_this, \"connection\", Object.freeze((0, properties_1.shallowCopy)(url)));\n }\n _this._nextId = 42;\n return _this;\n }\n Object.defineProperty(JsonRpcProvider2.prototype, \"_cache\", {\n get: function() {\n if (this._eventLoopCache == null) {\n this._eventLoopCache = {};\n }\n return this._eventLoopCache;\n },\n enumerable: false,\n configurable: true\n });\n JsonRpcProvider2.defaultUrl = function() {\n return \"http://localhost:8545\";\n };\n JsonRpcProvider2.prototype.detectNetwork = function() {\n var _this = this;\n if (!this._cache[\"detectNetwork\"]) {\n this._cache[\"detectNetwork\"] = this._uncachedDetectNetwork();\n setTimeout(function() {\n _this._cache[\"detectNetwork\"] = null;\n }, 0);\n }\n return this._cache[\"detectNetwork\"];\n };\n JsonRpcProvider2.prototype._uncachedDetectNetwork = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var chainId, error_5, error_6, getNetwork;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, timer(0)];\n case 1:\n _a.sent();\n chainId = null;\n _a.label = 2;\n case 2:\n _a.trys.push([2, 4, , 9]);\n return [4, this.send(\"eth_chainId\", [])];\n case 3:\n chainId = _a.sent();\n return [3, 9];\n case 4:\n error_5 = _a.sent();\n _a.label = 5;\n case 5:\n _a.trys.push([5, 7, , 8]);\n return [4, this.send(\"net_version\", [])];\n case 6:\n chainId = _a.sent();\n return [3, 8];\n case 7:\n error_6 = _a.sent();\n return [3, 8];\n case 8:\n return [3, 9];\n case 9:\n if (chainId != null) {\n getNetwork = (0, properties_1.getStatic)(this.constructor, \"getNetwork\");\n try {\n return [2, getNetwork(bignumber_1.BigNumber.from(chainId).toNumber())];\n } catch (error) {\n return [2, logger.throwError(\"could not detect network\", logger_1.Logger.errors.NETWORK_ERROR, {\n chainId,\n event: \"invalidNetwork\",\n serverError: error\n })];\n }\n }\n return [2, logger.throwError(\"could not detect network\", logger_1.Logger.errors.NETWORK_ERROR, {\n event: \"noNetwork\"\n })];\n }\n });\n });\n };\n JsonRpcProvider2.prototype.getSigner = function(addressOrIndex) {\n return new JsonRpcSigner(_constructorGuard, this, addressOrIndex);\n };\n JsonRpcProvider2.prototype.getUncheckedSigner = function(addressOrIndex) {\n return this.getSigner(addressOrIndex).connectUnchecked();\n };\n JsonRpcProvider2.prototype.listAccounts = function() {\n var _this = this;\n return this.send(\"eth_accounts\", []).then(function(accounts) {\n return accounts.map(function(a3) {\n return _this.formatter.address(a3);\n });\n });\n };\n JsonRpcProvider2.prototype.send = function(method, params) {\n var _this = this;\n var request = {\n method,\n params,\n id: this._nextId++,\n jsonrpc: \"2.0\"\n };\n this.emit(\"debug\", {\n action: \"request\",\n request: (0, properties_1.deepCopy)(request),\n provider: this\n });\n var cache = [\"eth_chainId\", \"eth_blockNumber\"].indexOf(method) >= 0;\n if (cache && this._cache[method]) {\n return this._cache[method];\n }\n var result = (0, web_1.fetchJson)(this.connection, JSON.stringify(request), getResult).then(function(result2) {\n _this.emit(\"debug\", {\n action: \"response\",\n request,\n response: result2,\n provider: _this\n });\n return result2;\n }, function(error) {\n _this.emit(\"debug\", {\n action: \"response\",\n error,\n request,\n provider: _this\n });\n throw error;\n });\n if (cache) {\n this._cache[method] = result;\n setTimeout(function() {\n _this._cache[method] = null;\n }, 0);\n }\n return result;\n };\n JsonRpcProvider2.prototype.prepareRequest = function(method, params) {\n switch (method) {\n case \"getBlockNumber\":\n return [\"eth_blockNumber\", []];\n case \"getGasPrice\":\n return [\"eth_gasPrice\", []];\n case \"getBalance\":\n return [\"eth_getBalance\", [getLowerCase(params.address), params.blockTag]];\n case \"getTransactionCount\":\n return [\"eth_getTransactionCount\", [getLowerCase(params.address), params.blockTag]];\n case \"getCode\":\n return [\"eth_getCode\", [getLowerCase(params.address), params.blockTag]];\n case \"getStorageAt\":\n return [\"eth_getStorageAt\", [getLowerCase(params.address), (0, bytes_1.hexZeroPad)(params.position, 32), params.blockTag]];\n case \"sendTransaction\":\n return [\"eth_sendRawTransaction\", [params.signedTransaction]];\n case \"getBlock\":\n if (params.blockTag) {\n return [\"eth_getBlockByNumber\", [params.blockTag, !!params.includeTransactions]];\n } else if (params.blockHash) {\n return [\"eth_getBlockByHash\", [params.blockHash, !!params.includeTransactions]];\n }\n return null;\n case \"getTransaction\":\n return [\"eth_getTransactionByHash\", [params.transactionHash]];\n case \"getTransactionReceipt\":\n return [\"eth_getTransactionReceipt\", [params.transactionHash]];\n case \"call\": {\n var hexlifyTransaction = (0, properties_1.getStatic)(this.constructor, \"hexlifyTransaction\");\n return [\"eth_call\", [hexlifyTransaction(params.transaction, { from: true }), params.blockTag]];\n }\n case \"estimateGas\": {\n var hexlifyTransaction = (0, properties_1.getStatic)(this.constructor, \"hexlifyTransaction\");\n return [\"eth_estimateGas\", [hexlifyTransaction(params.transaction, { from: true })]];\n }\n case \"getLogs\":\n if (params.filter && params.filter.address != null) {\n params.filter.address = getLowerCase(params.filter.address);\n }\n return [\"eth_getLogs\", [params.filter]];\n default:\n break;\n }\n return null;\n };\n JsonRpcProvider2.prototype.perform = function(method, params) {\n return __awaiter4(this, void 0, void 0, function() {\n var tx, feeData, args, error_7;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(method === \"call\" || method === \"estimateGas\"))\n return [3, 2];\n tx = params.transaction;\n if (!(tx && tx.type != null && bignumber_1.BigNumber.from(tx.type).isZero()))\n return [3, 2];\n if (!(tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null))\n return [3, 2];\n return [4, this.getFeeData()];\n case 1:\n feeData = _a.sent();\n if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {\n params = (0, properties_1.shallowCopy)(params);\n params.transaction = (0, properties_1.shallowCopy)(tx);\n delete params.transaction.type;\n }\n _a.label = 2;\n case 2:\n args = this.prepareRequest(method, params);\n if (args == null) {\n logger.throwError(method + \" not implemented\", logger_1.Logger.errors.NOT_IMPLEMENTED, { operation: method });\n }\n _a.label = 3;\n case 3:\n _a.trys.push([3, 5, , 6]);\n return [4, this.send(args[0], args[1])];\n case 4:\n return [2, _a.sent()];\n case 5:\n error_7 = _a.sent();\n return [2, checkError(method, error_7, params)];\n case 6:\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n JsonRpcProvider2.prototype._startEvent = function(event) {\n if (event.tag === \"pending\") {\n this._startPending();\n }\n _super.prototype._startEvent.call(this, event);\n };\n JsonRpcProvider2.prototype._startPending = function() {\n if (this._pendingFilter != null) {\n return;\n }\n var self2 = this;\n var pendingFilter = this.send(\"eth_newPendingTransactionFilter\", []);\n this._pendingFilter = pendingFilter;\n pendingFilter.then(function(filterId) {\n function poll2() {\n self2.send(\"eth_getFilterChanges\", [filterId]).then(function(hashes) {\n if (self2._pendingFilter != pendingFilter) {\n return null;\n }\n var seq = Promise.resolve();\n hashes.forEach(function(hash3) {\n self2._emitted[\"t:\" + hash3.toLowerCase()] = \"pending\";\n seq = seq.then(function() {\n return self2.getTransaction(hash3).then(function(tx) {\n self2.emit(\"pending\", tx);\n return null;\n });\n });\n });\n return seq.then(function() {\n return timer(1e3);\n });\n }).then(function() {\n if (self2._pendingFilter != pendingFilter) {\n self2.send(\"eth_uninstallFilter\", [filterId]);\n return;\n }\n setTimeout(function() {\n poll2();\n }, 0);\n return null;\n }).catch(function(error) {\n });\n }\n poll2();\n return filterId;\n }).catch(function(error) {\n });\n };\n JsonRpcProvider2.prototype._stopEvent = function(event) {\n if (event.tag === \"pending\" && this.listenerCount(\"pending\") === 0) {\n this._pendingFilter = null;\n }\n _super.prototype._stopEvent.call(this, event);\n };\n JsonRpcProvider2.hexlifyTransaction = function(transaction, allowExtra) {\n var allowed = (0, properties_1.shallowCopy)(allowedTransactionKeys);\n if (allowExtra) {\n for (var key in allowExtra) {\n if (allowExtra[key]) {\n allowed[key] = true;\n }\n }\n }\n (0, properties_1.checkProperties)(transaction, allowed);\n var result = {};\n [\"chainId\", \"gasLimit\", \"gasPrice\", \"type\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"value\"].forEach(function(key2) {\n if (transaction[key2] == null) {\n return;\n }\n var value = (0, bytes_1.hexValue)(bignumber_1.BigNumber.from(transaction[key2]));\n if (key2 === \"gasLimit\") {\n key2 = \"gas\";\n }\n result[key2] = value;\n });\n [\"from\", \"to\", \"data\"].forEach(function(key2) {\n if (transaction[key2] == null) {\n return;\n }\n result[key2] = (0, bytes_1.hexlify)(transaction[key2]);\n });\n if (transaction.accessList) {\n result[\"accessList\"] = (0, transactions_1.accessListify)(transaction.accessList);\n }\n return result;\n };\n return JsonRpcProvider2;\n }(base_provider_1.BaseProvider)\n );\n exports3.JsonRpcProvider = JsonRpcProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ws.js\n var require_browser_ws2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ws.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WebSocket = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version31();\n var WS = null;\n exports3.WebSocket = WS;\n try {\n exports3.WebSocket = WS = WebSocket;\n if (WS == null) {\n throw new Error(\"inject please\");\n }\n } catch (error) {\n logger_2 = new logger_1.Logger(_version_1.version);\n exports3.WebSocket = WS = function() {\n logger_2.throwError(\"WebSockets not supported in this environment\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new WebSocket()\"\n });\n };\n }\n var logger_2;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/websocket-provider.js\n var require_websocket_provider2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/websocket-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WebSocketProvider = void 0;\n var bignumber_1 = require_lib3();\n var properties_1 = require_lib4();\n var json_rpc_provider_1 = require_json_rpc_provider2();\n var ws_1 = require_browser_ws2();\n var logger_1 = require_lib();\n var _version_1 = require_version31();\n var logger = new logger_1.Logger(_version_1.version);\n var NextId = 1;\n var WebSocketProvider = (\n /** @class */\n function(_super) {\n __extends4(WebSocketProvider2, _super);\n function WebSocketProvider2(url, network) {\n var _this = this;\n if (network === \"any\") {\n logger.throwError(\"WebSocketProvider does not support 'any' network yet\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"network:any\"\n });\n }\n if (typeof url === \"string\") {\n _this = _super.call(this, url, network) || this;\n } else {\n _this = _super.call(this, \"_websocket\", network) || this;\n }\n _this._pollingInterval = -1;\n _this._wsReady = false;\n if (typeof url === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"_websocket\", new ws_1.WebSocket(_this.connection.url));\n } else {\n (0, properties_1.defineReadOnly)(_this, \"_websocket\", url);\n }\n (0, properties_1.defineReadOnly)(_this, \"_requests\", {});\n (0, properties_1.defineReadOnly)(_this, \"_subs\", {});\n (0, properties_1.defineReadOnly)(_this, \"_subIds\", {});\n (0, properties_1.defineReadOnly)(_this, \"_detectNetwork\", _super.prototype.detectNetwork.call(_this));\n _this.websocket.onopen = function() {\n _this._wsReady = true;\n Object.keys(_this._requests).forEach(function(id) {\n _this.websocket.send(_this._requests[id].payload);\n });\n };\n _this.websocket.onmessage = function(messageEvent) {\n var data = messageEvent.data;\n var result = JSON.parse(data);\n if (result.id != null) {\n var id = String(result.id);\n var request = _this._requests[id];\n delete _this._requests[id];\n if (result.result !== void 0) {\n request.callback(null, result.result);\n _this.emit(\"debug\", {\n action: \"response\",\n request: JSON.parse(request.payload),\n response: result.result,\n provider: _this\n });\n } else {\n var error = null;\n if (result.error) {\n error = new Error(result.error.message || \"unknown error\");\n (0, properties_1.defineReadOnly)(error, \"code\", result.error.code || null);\n (0, properties_1.defineReadOnly)(error, \"response\", data);\n } else {\n error = new Error(\"unknown error\");\n }\n request.callback(error, void 0);\n _this.emit(\"debug\", {\n action: \"response\",\n error,\n request: JSON.parse(request.payload),\n provider: _this\n });\n }\n } else if (result.method === \"eth_subscription\") {\n var sub = _this._subs[result.params.subscription];\n if (sub) {\n sub.processFunc(result.params.result);\n }\n } else {\n console.warn(\"this should not happen\");\n }\n };\n var fauxPoll = setInterval(function() {\n _this.emit(\"poll\");\n }, 1e3);\n if (fauxPoll.unref) {\n fauxPoll.unref();\n }\n return _this;\n }\n Object.defineProperty(WebSocketProvider2.prototype, \"websocket\", {\n // Cannot narrow the type of _websocket, as that is not backwards compatible\n // so we add a getter and let the WebSocket be a public API.\n get: function() {\n return this._websocket;\n },\n enumerable: false,\n configurable: true\n });\n WebSocketProvider2.prototype.detectNetwork = function() {\n return this._detectNetwork;\n };\n Object.defineProperty(WebSocketProvider2.prototype, \"pollingInterval\", {\n get: function() {\n return 0;\n },\n set: function(value) {\n logger.throwError(\"cannot set polling interval on WebSocketProvider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setPollingInterval\"\n });\n },\n enumerable: false,\n configurable: true\n });\n WebSocketProvider2.prototype.resetEventsBlock = function(blockNumber) {\n logger.throwError(\"cannot reset events block on WebSocketProvider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resetEventBlock\"\n });\n };\n WebSocketProvider2.prototype.poll = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n return [2, null];\n });\n });\n };\n Object.defineProperty(WebSocketProvider2.prototype, \"polling\", {\n set: function(value) {\n if (!value) {\n return;\n }\n logger.throwError(\"cannot set polling on WebSocketProvider\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setPolling\"\n });\n },\n enumerable: false,\n configurable: true\n });\n WebSocketProvider2.prototype.send = function(method, params) {\n var _this = this;\n var rid = NextId++;\n return new Promise(function(resolve, reject) {\n function callback(error, result) {\n if (error) {\n return reject(error);\n }\n return resolve(result);\n }\n var payload = JSON.stringify({\n method,\n params,\n id: rid,\n jsonrpc: \"2.0\"\n });\n _this.emit(\"debug\", {\n action: \"request\",\n request: JSON.parse(payload),\n provider: _this\n });\n _this._requests[String(rid)] = { callback, payload };\n if (_this._wsReady) {\n _this.websocket.send(payload);\n }\n });\n };\n WebSocketProvider2.defaultUrl = function() {\n return \"ws://localhost:8546\";\n };\n WebSocketProvider2.prototype._subscribe = function(tag, param, processFunc) {\n return __awaiter4(this, void 0, void 0, function() {\n var subIdPromise, subId;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n subIdPromise = this._subIds[tag];\n if (subIdPromise == null) {\n subIdPromise = Promise.all(param).then(function(param2) {\n return _this.send(\"eth_subscribe\", param2);\n });\n this._subIds[tag] = subIdPromise;\n }\n return [4, subIdPromise];\n case 1:\n subId = _a.sent();\n this._subs[subId] = { tag, processFunc };\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n WebSocketProvider2.prototype._startEvent = function(event) {\n var _this = this;\n switch (event.type) {\n case \"block\":\n this._subscribe(\"block\", [\"newHeads\"], function(result) {\n var blockNumber = bignumber_1.BigNumber.from(result.number).toNumber();\n _this._emitted.block = blockNumber;\n _this.emit(\"block\", blockNumber);\n });\n break;\n case \"pending\":\n this._subscribe(\"pending\", [\"newPendingTransactions\"], function(result) {\n _this.emit(\"pending\", result);\n });\n break;\n case \"filter\":\n this._subscribe(event.tag, [\"logs\", this._getFilter(event.filter)], function(result) {\n if (result.removed == null) {\n result.removed = false;\n }\n _this.emit(event.filter, _this.formatter.filterLog(result));\n });\n break;\n case \"tx\": {\n var emitReceipt_1 = function(event2) {\n var hash3 = event2.hash;\n _this.getTransactionReceipt(hash3).then(function(receipt) {\n if (!receipt) {\n return;\n }\n _this.emit(hash3, receipt);\n });\n };\n emitReceipt_1(event);\n this._subscribe(\"tx\", [\"newHeads\"], function(result) {\n _this._events.filter(function(e2) {\n return e2.type === \"tx\";\n }).forEach(emitReceipt_1);\n });\n break;\n }\n case \"debug\":\n case \"poll\":\n case \"willPoll\":\n case \"didPoll\":\n case \"error\":\n break;\n default:\n console.log(\"unhandled:\", event);\n break;\n }\n };\n WebSocketProvider2.prototype._stopEvent = function(event) {\n var _this = this;\n var tag = event.tag;\n if (event.type === \"tx\") {\n if (this._events.filter(function(e2) {\n return e2.type === \"tx\";\n }).length) {\n return;\n }\n tag = \"tx\";\n } else if (this.listenerCount(event.event)) {\n return;\n }\n var subId = this._subIds[tag];\n if (!subId) {\n return;\n }\n delete this._subIds[tag];\n subId.then(function(subId2) {\n if (!_this._subs[subId2]) {\n return;\n }\n delete _this._subs[subId2];\n _this.send(\"eth_unsubscribe\", [subId2]);\n });\n };\n WebSocketProvider2.prototype.destroy = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(this.websocket.readyState === ws_1.WebSocket.CONNECTING))\n return [3, 2];\n return [4, new Promise(function(resolve) {\n _this.websocket.onopen = function() {\n resolve(true);\n };\n _this.websocket.onerror = function() {\n resolve(false);\n };\n })];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n this.websocket.close(1e3);\n return [\n 2\n /*return*/\n ];\n }\n });\n });\n };\n return WebSocketProvider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.WebSocketProvider = WebSocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js\n var require_url_json_rpc_provider2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/url-json-rpc-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.UrlJsonRpcProvider = exports3.StaticJsonRpcProvider = void 0;\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version31();\n var logger = new logger_1.Logger(_version_1.version);\n var json_rpc_provider_1 = require_json_rpc_provider2();\n var StaticJsonRpcProvider = (\n /** @class */\n function(_super) {\n __extends4(StaticJsonRpcProvider2, _super);\n function StaticJsonRpcProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n StaticJsonRpcProvider2.prototype.detectNetwork = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var network;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n network = this.network;\n if (!(network == null))\n return [3, 2];\n return [4, _super.prototype.detectNetwork.call(this)];\n case 1:\n network = _a.sent();\n if (!network) {\n logger.throwError(\"no network detected\", logger_1.Logger.errors.UNKNOWN_ERROR, {});\n }\n if (this._network == null) {\n (0, properties_1.defineReadOnly)(this, \"_network\", network);\n this.emit(\"network\", network, null);\n }\n _a.label = 2;\n case 2:\n return [2, network];\n }\n });\n });\n };\n return StaticJsonRpcProvider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.StaticJsonRpcProvider = StaticJsonRpcProvider;\n var UrlJsonRpcProvider = (\n /** @class */\n function(_super) {\n __extends4(UrlJsonRpcProvider2, _super);\n function UrlJsonRpcProvider2(network, apiKey) {\n var _newTarget = this.constructor;\n var _this = this;\n logger.checkAbstract(_newTarget, UrlJsonRpcProvider2);\n network = (0, properties_1.getStatic)(_newTarget, \"getNetwork\")(network);\n apiKey = (0, properties_1.getStatic)(_newTarget, \"getApiKey\")(apiKey);\n var connection = (0, properties_1.getStatic)(_newTarget, \"getUrl\")(network, apiKey);\n _this = _super.call(this, connection, network) || this;\n if (typeof apiKey === \"string\") {\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", apiKey);\n } else if (apiKey != null) {\n Object.keys(apiKey).forEach(function(key) {\n (0, properties_1.defineReadOnly)(_this, key, apiKey[key]);\n });\n }\n return _this;\n }\n UrlJsonRpcProvider2.prototype._startPending = function() {\n logger.warn(\"WARNING: API provider does not support pending filters\");\n };\n UrlJsonRpcProvider2.prototype.isCommunityResource = function() {\n return false;\n };\n UrlJsonRpcProvider2.prototype.getSigner = function(address) {\n return logger.throwError(\"API provider does not support signing\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: \"getSigner\" });\n };\n UrlJsonRpcProvider2.prototype.listAccounts = function() {\n return Promise.resolve([]);\n };\n UrlJsonRpcProvider2.getApiKey = function(apiKey) {\n return apiKey;\n };\n UrlJsonRpcProvider2.getUrl = function(network, apiKey) {\n return logger.throwError(\"not implemented; sub-classes must override getUrl\", logger_1.Logger.errors.NOT_IMPLEMENTED, {\n operation: \"getUrl\"\n });\n };\n return UrlJsonRpcProvider2;\n }(StaticJsonRpcProvider)\n );\n exports3.UrlJsonRpcProvider = UrlJsonRpcProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/alchemy-provider.js\n var require_alchemy_provider2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/alchemy-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AlchemyProvider = exports3.AlchemyWebSocketProvider = void 0;\n var properties_1 = require_lib4();\n var formatter_1 = require_formatter2();\n var websocket_provider_1 = require_websocket_provider2();\n var logger_1 = require_lib();\n var _version_1 = require_version31();\n var logger = new logger_1.Logger(_version_1.version);\n var url_json_rpc_provider_1 = require_url_json_rpc_provider2();\n var defaultApiKey = \"_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC\";\n var AlchemyWebSocketProvider = (\n /** @class */\n function(_super) {\n __extends4(AlchemyWebSocketProvider2, _super);\n function AlchemyWebSocketProvider2(network, apiKey) {\n var _this = this;\n var provider = new AlchemyProvider(network, apiKey);\n var url = provider.connection.url.replace(/^http/i, \"ws\").replace(\".alchemyapi.\", \".ws.alchemyapi.\");\n _this = _super.call(this, url, provider.network) || this;\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", provider.apiKey);\n return _this;\n }\n AlchemyWebSocketProvider2.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n return AlchemyWebSocketProvider2;\n }(websocket_provider_1.WebSocketProvider)\n );\n exports3.AlchemyWebSocketProvider = AlchemyWebSocketProvider;\n var AlchemyProvider = (\n /** @class */\n function(_super) {\n __extends4(AlchemyProvider2, _super);\n function AlchemyProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AlchemyProvider2.getWebSocketProvider = function(network, apiKey) {\n return new AlchemyWebSocketProvider(network, apiKey);\n };\n AlchemyProvider2.getApiKey = function(apiKey) {\n if (apiKey == null) {\n return defaultApiKey;\n }\n if (apiKey && typeof apiKey !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey;\n };\n AlchemyProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"eth-mainnet.alchemyapi.io/v2/\";\n break;\n case \"goerli\":\n host = \"eth-goerli.g.alchemy.com/v2/\";\n break;\n case \"matic\":\n host = \"polygon-mainnet.g.alchemy.com/v2/\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai.g.alchemy.com/v2/\";\n break;\n case \"arbitrum\":\n host = \"arb-mainnet.g.alchemy.com/v2/\";\n break;\n case \"arbitrum-goerli\":\n host = \"arb-goerli.g.alchemy.com/v2/\";\n break;\n case \"optimism\":\n host = \"opt-mainnet.g.alchemy.com/v2/\";\n break;\n case \"optimism-goerli\":\n host = \"opt-goerli.g.alchemy.com/v2/\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return {\n allowGzip: true,\n url: \"https://\" + host + apiKey,\n throttleCallback: function(attempt, url) {\n if (apiKey === defaultApiKey) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n };\n AlchemyProvider2.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n return AlchemyProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.AlchemyProvider = AlchemyProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/ankr-provider.js\n var require_ankr_provider2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/ankr-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AnkrProvider = void 0;\n var formatter_1 = require_formatter2();\n var url_json_rpc_provider_1 = require_url_json_rpc_provider2();\n var logger_1 = require_lib();\n var _version_1 = require_version31();\n var logger = new logger_1.Logger(_version_1.version);\n var defaultApiKey = \"9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972\";\n function getHost(name) {\n switch (name) {\n case \"homestead\":\n return \"rpc.ankr.com/eth/\";\n case \"ropsten\":\n return \"rpc.ankr.com/eth_ropsten/\";\n case \"rinkeby\":\n return \"rpc.ankr.com/eth_rinkeby/\";\n case \"goerli\":\n return \"rpc.ankr.com/eth_goerli/\";\n case \"matic\":\n return \"rpc.ankr.com/polygon/\";\n case \"arbitrum\":\n return \"rpc.ankr.com/arbitrum/\";\n }\n return logger.throwArgumentError(\"unsupported network\", \"name\", name);\n }\n var AnkrProvider = (\n /** @class */\n function(_super) {\n __extends4(AnkrProvider2, _super);\n function AnkrProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AnkrProvider2.prototype.isCommunityResource = function() {\n return this.apiKey === defaultApiKey;\n };\n AnkrProvider2.getApiKey = function(apiKey) {\n if (apiKey == null) {\n return defaultApiKey;\n }\n return apiKey;\n };\n AnkrProvider2.getUrl = function(network, apiKey) {\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n var connection = {\n allowGzip: true,\n url: \"https://\" + getHost(network.name) + apiKey,\n throttleCallback: function(attempt, url) {\n if (apiKey.apiKey === defaultApiKey) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n if (apiKey.projectSecret != null) {\n connection.user = \"\";\n connection.password = apiKey.projectSecret;\n }\n return connection;\n };\n return AnkrProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.AnkrProvider = AnkrProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/cloudflare-provider.js\n var require_cloudflare_provider2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/cloudflare-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CloudflareProvider = void 0;\n var url_json_rpc_provider_1 = require_url_json_rpc_provider2();\n var logger_1 = require_lib();\n var _version_1 = require_version31();\n var logger = new logger_1.Logger(_version_1.version);\n var CloudflareProvider = (\n /** @class */\n function(_super) {\n __extends4(CloudflareProvider2, _super);\n function CloudflareProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CloudflareProvider2.getApiKey = function(apiKey) {\n if (apiKey != null) {\n logger.throwArgumentError(\"apiKey not supported for cloudflare\", \"apiKey\", apiKey);\n }\n return null;\n };\n CloudflareProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"https://cloudflare-eth.com/\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return host;\n };\n CloudflareProvider2.prototype.perform = function(method, params) {\n return __awaiter4(this, void 0, void 0, function() {\n var block;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(method === \"getBlockNumber\"))\n return [3, 2];\n return [4, _super.prototype.perform.call(this, \"getBlock\", { blockTag: \"latest\" })];\n case 1:\n block = _a.sent();\n return [2, block.number];\n case 2:\n return [2, _super.prototype.perform.call(this, method, params)];\n }\n });\n });\n };\n return CloudflareProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.CloudflareProvider = CloudflareProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/etherscan-provider.js\n var require_etherscan_provider2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/etherscan-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EtherscanProvider = void 0;\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var transactions_1 = require_lib17();\n var web_1 = require_lib28();\n var formatter_1 = require_formatter2();\n var logger_1 = require_lib();\n var _version_1 = require_version31();\n var logger = new logger_1.Logger(_version_1.version);\n var base_provider_1 = require_base_provider2();\n function getTransactionPostData(transaction) {\n var result = {};\n for (var key in transaction) {\n if (transaction[key] == null) {\n continue;\n }\n var value = transaction[key];\n if (key === \"type\" && value === 0) {\n continue;\n }\n if ({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true }[key]) {\n value = (0, bytes_1.hexValue)((0, bytes_1.hexlify)(value));\n } else if (key === \"accessList\") {\n value = \"[\" + (0, transactions_1.accessListify)(value).map(function(set) {\n return '{address:\"' + set.address + '\",storageKeys:[\"' + set.storageKeys.join('\",\"') + '\"]}';\n }).join(\",\") + \"]\";\n } else {\n value = (0, bytes_1.hexlify)(value);\n }\n result[key] = value;\n }\n return result;\n }\n function getResult(result) {\n if (result.status == 0 && (result.message === \"No records found\" || result.message === \"No transactions found\")) {\n return result.result;\n }\n if (result.status != 1 || typeof result.message !== \"string\" || !result.message.match(/^OK/)) {\n var error = new Error(\"invalid response\");\n error.result = JSON.stringify(result);\n if ((result.result || \"\").toLowerCase().indexOf(\"rate limit\") >= 0) {\n error.throttleRetry = true;\n }\n throw error;\n }\n return result.result;\n }\n function getJsonResult(result) {\n if (result && result.status == 0 && result.message == \"NOTOK\" && (result.result || \"\").toLowerCase().indexOf(\"rate limit\") >= 0) {\n var error = new Error(\"throttled response\");\n error.result = JSON.stringify(result);\n error.throttleRetry = true;\n throw error;\n }\n if (result.jsonrpc != \"2.0\") {\n var error = new Error(\"invalid response\");\n error.result = JSON.stringify(result);\n throw error;\n }\n if (result.error) {\n var error = new Error(result.error.message || \"unknown error\");\n if (result.error.code) {\n error.code = result.error.code;\n }\n if (result.error.data) {\n error.data = result.error.data;\n }\n throw error;\n }\n return result.result;\n }\n function checkLogTag(blockTag) {\n if (blockTag === \"pending\") {\n throw new Error(\"pending not supported\");\n }\n if (blockTag === \"latest\") {\n return blockTag;\n }\n return parseInt(blockTag.substring(2), 16);\n }\n function checkError(method, error, transaction) {\n if (method === \"call\" && error.code === logger_1.Logger.errors.SERVER_ERROR) {\n var e2 = error.error;\n if (e2 && (e2.message.match(/reverted/i) || e2.message.match(/VM execution error/i))) {\n var data = e2.data;\n if (data) {\n data = \"0x\" + data.replace(/^.*0x/i, \"\");\n }\n if ((0, bytes_1.isHexString)(data)) {\n return data;\n }\n logger.throwError(\"missing revert data in call exception\", logger_1.Logger.errors.CALL_EXCEPTION, {\n error,\n data: \"0x\"\n });\n }\n }\n var message2 = error.message;\n if (error.code === logger_1.Logger.errors.SERVER_ERROR) {\n if (error.error && typeof error.error.message === \"string\") {\n message2 = error.error.message;\n } else if (typeof error.body === \"string\") {\n message2 = error.body;\n } else if (typeof error.responseText === \"string\") {\n message2 = error.responseText;\n }\n }\n message2 = (message2 || \"\").toLowerCase();\n if (message2.match(/insufficient funds/)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", logger_1.Logger.errors.INSUFFICIENT_FUNDS, {\n error,\n method,\n transaction\n });\n }\n if (message2.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) {\n logger.throwError(\"nonce has already been used\", logger_1.Logger.errors.NONCE_EXPIRED, {\n error,\n method,\n transaction\n });\n }\n if (message2.match(/another transaction with same nonce/)) {\n logger.throwError(\"replacement fee too low\", logger_1.Logger.errors.REPLACEMENT_UNDERPRICED, {\n error,\n method,\n transaction\n });\n }\n if (message2.match(/execution failed due to an exception|execution reverted/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error,\n method,\n transaction\n });\n }\n throw error;\n }\n var EtherscanProvider = (\n /** @class */\n function(_super) {\n __extends4(EtherscanProvider2, _super);\n function EtherscanProvider2(network, apiKey) {\n var _this = _super.call(this, network) || this;\n (0, properties_1.defineReadOnly)(_this, \"baseUrl\", _this.getBaseUrl());\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", apiKey || null);\n return _this;\n }\n EtherscanProvider2.prototype.getBaseUrl = function() {\n switch (this.network ? this.network.name : \"invalid\") {\n case \"homestead\":\n return \"https://api.etherscan.io\";\n case \"goerli\":\n return \"https://api-goerli.etherscan.io\";\n case \"sepolia\":\n return \"https://api-sepolia.etherscan.io\";\n case \"matic\":\n return \"https://api.polygonscan.com\";\n case \"maticmum\":\n return \"https://api-testnet.polygonscan.com\";\n case \"arbitrum\":\n return \"https://api.arbiscan.io\";\n case \"arbitrum-goerli\":\n return \"https://api-goerli.arbiscan.io\";\n case \"optimism\":\n return \"https://api-optimistic.etherscan.io\";\n case \"optimism-goerli\":\n return \"https://api-goerli-optimistic.etherscan.io\";\n default:\n }\n return logger.throwArgumentError(\"unsupported network\", \"network\", this.network.name);\n };\n EtherscanProvider2.prototype.getUrl = function(module2, params) {\n var query = Object.keys(params).reduce(function(accum, key) {\n var value = params[key];\n if (value != null) {\n accum += \"&\" + key + \"=\" + value;\n }\n return accum;\n }, \"\");\n var apiKey = this.apiKey ? \"&apikey=\" + this.apiKey : \"\";\n return this.baseUrl + \"/api?module=\" + module2 + query + apiKey;\n };\n EtherscanProvider2.prototype.getPostUrl = function() {\n return this.baseUrl + \"/api\";\n };\n EtherscanProvider2.prototype.getPostData = function(module2, params) {\n params.module = module2;\n params.apikey = this.apiKey;\n return params;\n };\n EtherscanProvider2.prototype.fetch = function(module2, params, post) {\n return __awaiter4(this, void 0, void 0, function() {\n var url, payload, procFunc, connection, payloadStr, result;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n url = post ? this.getPostUrl() : this.getUrl(module2, params);\n payload = post ? this.getPostData(module2, params) : null;\n procFunc = module2 === \"proxy\" ? getJsonResult : getResult;\n this.emit(\"debug\", {\n action: \"request\",\n request: url,\n provider: this\n });\n connection = {\n url,\n throttleSlotInterval: 1e3,\n throttleCallback: function(attempt, url2) {\n if (_this.isCommunityResource()) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n payloadStr = null;\n if (payload) {\n connection.headers = { \"content-type\": \"application/x-www-form-urlencoded; charset=UTF-8\" };\n payloadStr = Object.keys(payload).map(function(key) {\n return key + \"=\" + payload[key];\n }).join(\"&\");\n }\n return [4, (0, web_1.fetchJson)(connection, payloadStr, procFunc || getJsonResult)];\n case 1:\n result = _a.sent();\n this.emit(\"debug\", {\n action: \"response\",\n request: url,\n response: (0, properties_1.deepCopy)(result),\n provider: this\n });\n return [2, result];\n }\n });\n });\n };\n EtherscanProvider2.prototype.detectNetwork = function() {\n return __awaiter4(this, void 0, void 0, function() {\n return __generator4(this, function(_a) {\n return [2, this.network];\n });\n });\n };\n EtherscanProvider2.prototype.perform = function(method, params) {\n return __awaiter4(this, void 0, void 0, function() {\n var _a, postData, error_1, postData, error_2, args, topic0, logs, blocks, i3, log, block, _b;\n return __generator4(this, function(_c) {\n switch (_c.label) {\n case 0:\n _a = method;\n switch (_a) {\n case \"getBlockNumber\":\n return [3, 1];\n case \"getGasPrice\":\n return [3, 2];\n case \"getBalance\":\n return [3, 3];\n case \"getTransactionCount\":\n return [3, 4];\n case \"getCode\":\n return [3, 5];\n case \"getStorageAt\":\n return [3, 6];\n case \"sendTransaction\":\n return [3, 7];\n case \"getBlock\":\n return [3, 8];\n case \"getTransaction\":\n return [3, 9];\n case \"getTransactionReceipt\":\n return [3, 10];\n case \"call\":\n return [3, 11];\n case \"estimateGas\":\n return [3, 15];\n case \"getLogs\":\n return [3, 19];\n case \"getEtherPrice\":\n return [3, 26];\n }\n return [3, 28];\n case 1:\n return [2, this.fetch(\"proxy\", { action: \"eth_blockNumber\" })];\n case 2:\n return [2, this.fetch(\"proxy\", { action: \"eth_gasPrice\" })];\n case 3:\n return [2, this.fetch(\"account\", {\n action: \"balance\",\n address: params.address,\n tag: params.blockTag\n })];\n case 4:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getTransactionCount\",\n address: params.address,\n tag: params.blockTag\n })];\n case 5:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getCode\",\n address: params.address,\n tag: params.blockTag\n })];\n case 6:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getStorageAt\",\n address: params.address,\n position: params.position,\n tag: params.blockTag\n })];\n case 7:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_sendRawTransaction\",\n hex: params.signedTransaction\n }, true).catch(function(error) {\n return checkError(\"sendTransaction\", error, params.signedTransaction);\n })];\n case 8:\n if (params.blockTag) {\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getBlockByNumber\",\n tag: params.blockTag,\n boolean: params.includeTransactions ? \"true\" : \"false\"\n })];\n }\n throw new Error(\"getBlock by blockHash not implemented\");\n case 9:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getTransactionByHash\",\n txhash: params.transactionHash\n })];\n case 10:\n return [2, this.fetch(\"proxy\", {\n action: \"eth_getTransactionReceipt\",\n txhash: params.transactionHash\n })];\n case 11:\n if (params.blockTag !== \"latest\") {\n throw new Error(\"EtherscanProvider does not support blockTag for call\");\n }\n postData = getTransactionPostData(params.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_call\";\n _c.label = 12;\n case 12:\n _c.trys.push([12, 14, , 15]);\n return [4, this.fetch(\"proxy\", postData, true)];\n case 13:\n return [2, _c.sent()];\n case 14:\n error_1 = _c.sent();\n return [2, checkError(\"call\", error_1, params.transaction)];\n case 15:\n postData = getTransactionPostData(params.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_estimateGas\";\n _c.label = 16;\n case 16:\n _c.trys.push([16, 18, , 19]);\n return [4, this.fetch(\"proxy\", postData, true)];\n case 17:\n return [2, _c.sent()];\n case 18:\n error_2 = _c.sent();\n return [2, checkError(\"estimateGas\", error_2, params.transaction)];\n case 19:\n args = { action: \"getLogs\" };\n if (params.filter.fromBlock) {\n args.fromBlock = checkLogTag(params.filter.fromBlock);\n }\n if (params.filter.toBlock) {\n args.toBlock = checkLogTag(params.filter.toBlock);\n }\n if (params.filter.address) {\n args.address = params.filter.address;\n }\n if (params.filter.topics && params.filter.topics.length > 0) {\n if (params.filter.topics.length > 1) {\n logger.throwError(\"unsupported topic count\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics });\n }\n if (params.filter.topics.length === 1) {\n topic0 = params.filter.topics[0];\n if (typeof topic0 !== \"string\" || topic0.length !== 66) {\n logger.throwError(\"unsupported topic format\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { topic0 });\n }\n args.topic0 = topic0;\n }\n }\n return [4, this.fetch(\"logs\", args)];\n case 20:\n logs = _c.sent();\n blocks = {};\n i3 = 0;\n _c.label = 21;\n case 21:\n if (!(i3 < logs.length))\n return [3, 25];\n log = logs[i3];\n if (log.blockHash != null) {\n return [3, 24];\n }\n if (!(blocks[log.blockNumber] == null))\n return [3, 23];\n return [4, this.getBlock(log.blockNumber)];\n case 22:\n block = _c.sent();\n if (block) {\n blocks[log.blockNumber] = block.hash;\n }\n _c.label = 23;\n case 23:\n log.blockHash = blocks[log.blockNumber];\n _c.label = 24;\n case 24:\n i3++;\n return [3, 21];\n case 25:\n return [2, logs];\n case 26:\n if (this.network.name !== \"homestead\") {\n return [2, 0];\n }\n _b = parseFloat;\n return [4, this.fetch(\"stats\", { action: \"ethprice\" })];\n case 27:\n return [2, _b.apply(void 0, [_c.sent().ethusd])];\n case 28:\n return [3, 29];\n case 29:\n return [2, _super.prototype.perform.call(this, method, params)];\n }\n });\n });\n };\n EtherscanProvider2.prototype.getHistory = function(addressOrName, startBlock, endBlock) {\n return __awaiter4(this, void 0, void 0, function() {\n var params, result;\n var _a;\n var _this = this;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n _a = {\n action: \"txlist\"\n };\n return [4, this.resolveName(addressOrName)];\n case 1:\n params = (_a.address = _b.sent(), _a.startblock = startBlock == null ? 0 : startBlock, _a.endblock = endBlock == null ? 99999999 : endBlock, _a.sort = \"asc\", _a);\n return [4, this.fetch(\"account\", params)];\n case 2:\n result = _b.sent();\n return [2, result.map(function(tx) {\n [\"contractAddress\", \"to\"].forEach(function(key) {\n if (tx[key] == \"\") {\n delete tx[key];\n }\n });\n if (tx.creates == null && tx.contractAddress != null) {\n tx.creates = tx.contractAddress;\n }\n var item = _this.formatter.transactionResponse(tx);\n if (tx.timeStamp) {\n item.timestamp = parseInt(tx.timeStamp);\n }\n return item;\n })];\n }\n });\n });\n };\n EtherscanProvider2.prototype.isCommunityResource = function() {\n return this.apiKey == null;\n };\n return EtherscanProvider2;\n }(base_provider_1.BaseProvider)\n );\n exports3.EtherscanProvider = EtherscanProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/fallback-provider.js\n var require_fallback_provider2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/fallback-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n var __awaiter4 = exports3 && exports3.__awaiter || function(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };\n var __generator4 = exports3 && exports3.__generator || function(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4;\n return g4 = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (_2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FallbackProvider = void 0;\n var abstract_provider_1 = require_lib33();\n var bignumber_1 = require_lib3();\n var bytes_1 = require_lib2();\n var properties_1 = require_lib4();\n var random_1 = require_lib24();\n var web_1 = require_lib28();\n var base_provider_1 = require_base_provider2();\n var formatter_1 = require_formatter2();\n var logger_1 = require_lib();\n var _version_1 = require_version31();\n var logger = new logger_1.Logger(_version_1.version);\n function now() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n function checkNetworks(networks) {\n var result = null;\n for (var i3 = 0; i3 < networks.length; i3++) {\n var network = networks[i3];\n if (network == null) {\n return null;\n }\n if (result) {\n if (!(result.name === network.name && result.chainId === network.chainId && (result.ensAddress === network.ensAddress || result.ensAddress == null && network.ensAddress == null))) {\n logger.throwArgumentError(\"provider mismatch\", \"networks\", networks);\n }\n } else {\n result = network;\n }\n }\n return result;\n }\n function median(values, maxDelta) {\n values = values.slice().sort();\n var middle = Math.floor(values.length / 2);\n if (values.length % 2) {\n return values[middle];\n }\n var a3 = values[middle - 1], b4 = values[middle];\n if (maxDelta != null && Math.abs(a3 - b4) > maxDelta) {\n return null;\n }\n return (a3 + b4) / 2;\n }\n function serialize(value) {\n if (value === null) {\n return \"null\";\n } else if (typeof value === \"number\" || typeof value === \"boolean\") {\n return JSON.stringify(value);\n } else if (typeof value === \"string\") {\n return value;\n } else if (bignumber_1.BigNumber.isBigNumber(value)) {\n return value.toString();\n } else if (Array.isArray(value)) {\n return JSON.stringify(value.map(function(i3) {\n return serialize(i3);\n }));\n } else if (typeof value === \"object\") {\n var keys = Object.keys(value);\n keys.sort();\n return \"{\" + keys.map(function(key) {\n var v2 = value[key];\n if (typeof v2 === \"function\") {\n v2 = \"[function]\";\n } else {\n v2 = serialize(v2);\n }\n return JSON.stringify(key) + \":\" + v2;\n }).join(\",\") + \"}\";\n }\n throw new Error(\"unknown value type: \" + typeof value);\n }\n var nextRid = 1;\n function stall(duration) {\n var cancel = null;\n var timer = null;\n var promise = new Promise(function(resolve) {\n cancel = function() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n resolve();\n };\n timer = setTimeout(cancel, duration);\n });\n var wait2 = function(func) {\n promise = promise.then(func);\n return promise;\n };\n function getPromise() {\n return promise;\n }\n return { cancel, getPromise, wait: wait2 };\n }\n var ForwardErrors = [\n logger_1.Logger.errors.CALL_EXCEPTION,\n logger_1.Logger.errors.INSUFFICIENT_FUNDS,\n logger_1.Logger.errors.NONCE_EXPIRED,\n logger_1.Logger.errors.REPLACEMENT_UNDERPRICED,\n logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT\n ];\n var ForwardProperties = [\n \"address\",\n \"args\",\n \"errorArgs\",\n \"errorSignature\",\n \"method\",\n \"transaction\"\n ];\n function exposeDebugConfig(config2, now2) {\n var result = {\n weight: config2.weight\n };\n Object.defineProperty(result, \"provider\", { get: function() {\n return config2.provider;\n } });\n if (config2.start) {\n result.start = config2.start;\n }\n if (now2) {\n result.duration = now2 - config2.start;\n }\n if (config2.done) {\n if (config2.error) {\n result.error = config2.error;\n } else {\n result.result = config2.result || null;\n }\n }\n return result;\n }\n function normalizedTally(normalize2, quorum) {\n return function(configs) {\n var tally = {};\n configs.forEach(function(c4) {\n var value = normalize2(c4.result);\n if (!tally[value]) {\n tally[value] = { count: 0, result: c4.result };\n }\n tally[value].count++;\n });\n var keys = Object.keys(tally);\n for (var i3 = 0; i3 < keys.length; i3++) {\n var check2 = tally[keys[i3]];\n if (check2.count >= quorum) {\n return check2.result;\n }\n }\n return void 0;\n };\n }\n function getProcessFunc(provider, method, params) {\n var normalize2 = serialize;\n switch (method) {\n case \"getBlockNumber\":\n return function(configs) {\n var values = configs.map(function(c4) {\n return c4.result;\n });\n var blockNumber = median(configs.map(function(c4) {\n return c4.result;\n }), 2);\n if (blockNumber == null) {\n return void 0;\n }\n blockNumber = Math.ceil(blockNumber);\n if (values.indexOf(blockNumber + 1) >= 0) {\n blockNumber++;\n }\n if (blockNumber >= provider._highestBlockNumber) {\n provider._highestBlockNumber = blockNumber;\n }\n return provider._highestBlockNumber;\n };\n case \"getGasPrice\":\n return function(configs) {\n var values = configs.map(function(c4) {\n return c4.result;\n });\n values.sort();\n return values[Math.floor(values.length / 2)];\n };\n case \"getEtherPrice\":\n return function(configs) {\n return median(configs.map(function(c4) {\n return c4.result;\n }));\n };\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n case \"getStorageAt\":\n case \"call\":\n case \"estimateGas\":\n case \"getLogs\":\n break;\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n normalize2 = function(tx) {\n if (tx == null) {\n return null;\n }\n tx = (0, properties_1.shallowCopy)(tx);\n tx.confirmations = -1;\n return serialize(tx);\n };\n break;\n case \"getBlock\":\n if (params.includeTransactions) {\n normalize2 = function(block) {\n if (block == null) {\n return null;\n }\n block = (0, properties_1.shallowCopy)(block);\n block.transactions = block.transactions.map(function(tx) {\n tx = (0, properties_1.shallowCopy)(tx);\n tx.confirmations = -1;\n return tx;\n });\n return serialize(block);\n };\n } else {\n normalize2 = function(block) {\n if (block == null) {\n return null;\n }\n return serialize(block);\n };\n }\n break;\n default:\n throw new Error(\"unknown method: \" + method);\n }\n return normalizedTally(normalize2, provider.quorum);\n }\n function waitForSync(config2, blockNumber) {\n return __awaiter4(this, void 0, void 0, function() {\n var provider;\n return __generator4(this, function(_a) {\n provider = config2.provider;\n if (provider.blockNumber != null && provider.blockNumber >= blockNumber || blockNumber === -1) {\n return [2, provider];\n }\n return [2, (0, web_1.poll)(function() {\n return new Promise(function(resolve, reject) {\n setTimeout(function() {\n if (provider.blockNumber >= blockNumber) {\n return resolve(provider);\n }\n if (config2.cancelled) {\n return resolve(null);\n }\n return resolve(void 0);\n }, 0);\n });\n }, { oncePoll: provider })];\n });\n });\n }\n function getRunner(config2, currentBlockNumber, method, params) {\n return __awaiter4(this, void 0, void 0, function() {\n var provider, _a, filter;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n provider = config2.provider;\n _a = method;\n switch (_a) {\n case \"getBlockNumber\":\n return [3, 1];\n case \"getGasPrice\":\n return [3, 1];\n case \"getEtherPrice\":\n return [3, 2];\n case \"getBalance\":\n return [3, 3];\n case \"getTransactionCount\":\n return [3, 3];\n case \"getCode\":\n return [3, 3];\n case \"getStorageAt\":\n return [3, 6];\n case \"getBlock\":\n return [3, 9];\n case \"call\":\n return [3, 12];\n case \"estimateGas\":\n return [3, 12];\n case \"getTransaction\":\n return [3, 15];\n case \"getTransactionReceipt\":\n return [3, 15];\n case \"getLogs\":\n return [3, 16];\n }\n return [3, 19];\n case 1:\n return [2, provider[method]()];\n case 2:\n if (provider.getEtherPrice) {\n return [2, provider.getEtherPrice()];\n }\n return [3, 19];\n case 3:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 5];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 4:\n provider = _b.sent();\n _b.label = 5;\n case 5:\n return [2, provider[method](params.address, params.blockTag || \"latest\")];\n case 6:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 8];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 7:\n provider = _b.sent();\n _b.label = 8;\n case 8:\n return [2, provider.getStorageAt(params.address, params.position, params.blockTag || \"latest\")];\n case 9:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 11];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 10:\n provider = _b.sent();\n _b.label = 11;\n case 11:\n return [2, provider[params.includeTransactions ? \"getBlockWithTransactions\" : \"getBlock\"](params.blockTag || params.blockHash)];\n case 12:\n if (!(params.blockTag && (0, bytes_1.isHexString)(params.blockTag)))\n return [3, 14];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 13:\n provider = _b.sent();\n _b.label = 14;\n case 14:\n if (method === \"call\" && params.blockTag) {\n return [2, provider[method](params.transaction, params.blockTag)];\n }\n return [2, provider[method](params.transaction)];\n case 15:\n return [2, provider[method](params.transactionHash)];\n case 16:\n filter = params.filter;\n if (!(filter.fromBlock && (0, bytes_1.isHexString)(filter.fromBlock) || filter.toBlock && (0, bytes_1.isHexString)(filter.toBlock)))\n return [3, 18];\n return [4, waitForSync(config2, currentBlockNumber)];\n case 17:\n provider = _b.sent();\n _b.label = 18;\n case 18:\n return [2, provider.getLogs(filter)];\n case 19:\n return [2, logger.throwError(\"unknown method error\", logger_1.Logger.errors.UNKNOWN_ERROR, {\n method,\n params\n })];\n }\n });\n });\n }\n var FallbackProvider = (\n /** @class */\n function(_super) {\n __extends4(FallbackProvider2, _super);\n function FallbackProvider2(providers, quorum) {\n var _this = this;\n if (providers.length === 0) {\n logger.throwArgumentError(\"missing providers\", \"providers\", providers);\n }\n var providerConfigs = providers.map(function(configOrProvider, index2) {\n if (abstract_provider_1.Provider.isProvider(configOrProvider)) {\n var stallTimeout = (0, formatter_1.isCommunityResource)(configOrProvider) ? 2e3 : 750;\n var priority = 1;\n return Object.freeze({ provider: configOrProvider, weight: 1, stallTimeout, priority });\n }\n var config2 = (0, properties_1.shallowCopy)(configOrProvider);\n if (config2.priority == null) {\n config2.priority = 1;\n }\n if (config2.stallTimeout == null) {\n config2.stallTimeout = (0, formatter_1.isCommunityResource)(configOrProvider) ? 2e3 : 750;\n }\n if (config2.weight == null) {\n config2.weight = 1;\n }\n var weight = config2.weight;\n if (weight % 1 || weight > 512 || weight < 1) {\n logger.throwArgumentError(\"invalid weight; must be integer in [1, 512]\", \"providers[\" + index2 + \"].weight\", weight);\n }\n return Object.freeze(config2);\n });\n var total = providerConfigs.reduce(function(accum, c4) {\n return accum + c4.weight;\n }, 0);\n if (quorum == null) {\n quorum = total / 2;\n } else if (quorum > total) {\n logger.throwArgumentError(\"quorum will always fail; larger than total weight\", \"quorum\", quorum);\n }\n var networkOrReady = checkNetworks(providerConfigs.map(function(c4) {\n return c4.provider.network;\n }));\n if (networkOrReady == null) {\n networkOrReady = new Promise(function(resolve, reject) {\n setTimeout(function() {\n _this.detectNetwork().then(resolve, reject);\n }, 0);\n });\n }\n _this = _super.call(this, networkOrReady) || this;\n (0, properties_1.defineReadOnly)(_this, \"providerConfigs\", Object.freeze(providerConfigs));\n (0, properties_1.defineReadOnly)(_this, \"quorum\", quorum);\n _this._highestBlockNumber = -1;\n return _this;\n }\n FallbackProvider2.prototype.detectNetwork = function() {\n return __awaiter4(this, void 0, void 0, function() {\n var networks;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n return [4, Promise.all(this.providerConfigs.map(function(c4) {\n return c4.provider.getNetwork();\n }))];\n case 1:\n networks = _a.sent();\n return [2, checkNetworks(networks)];\n }\n });\n });\n };\n FallbackProvider2.prototype.perform = function(method, params) {\n return __awaiter4(this, void 0, void 0, function() {\n var results, i_1, result, processFunc, configs, currentBlockNumber, i3, first, _loop_1, this_1, state_1;\n var _this = this;\n return __generator4(this, function(_a) {\n switch (_a.label) {\n case 0:\n if (!(method === \"sendTransaction\"))\n return [3, 2];\n return [4, Promise.all(this.providerConfigs.map(function(c4) {\n return c4.provider.sendTransaction(params.signedTransaction).then(function(result2) {\n return result2.hash;\n }, function(error) {\n return error;\n });\n }))];\n case 1:\n results = _a.sent();\n for (i_1 = 0; i_1 < results.length; i_1++) {\n result = results[i_1];\n if (typeof result === \"string\") {\n return [2, result];\n }\n }\n throw results[0];\n case 2:\n if (!(this._highestBlockNumber === -1 && method !== \"getBlockNumber\"))\n return [3, 4];\n return [4, this.getBlockNumber()];\n case 3:\n _a.sent();\n _a.label = 4;\n case 4:\n processFunc = getProcessFunc(this, method, params);\n configs = (0, random_1.shuffled)(this.providerConfigs.map(properties_1.shallowCopy));\n configs.sort(function(a3, b4) {\n return a3.priority - b4.priority;\n });\n currentBlockNumber = this._highestBlockNumber;\n i3 = 0;\n first = true;\n _loop_1 = function() {\n var t0, inflightWeight, _loop_2, waiting, results2, result2, errors;\n return __generator4(this, function(_b) {\n switch (_b.label) {\n case 0:\n t0 = now();\n inflightWeight = configs.filter(function(c4) {\n return c4.runner && t0 - c4.start < c4.stallTimeout;\n }).reduce(function(accum, c4) {\n return accum + c4.weight;\n }, 0);\n _loop_2 = function() {\n var config2 = configs[i3++];\n var rid = nextRid++;\n config2.start = now();\n config2.staller = stall(config2.stallTimeout);\n config2.staller.wait(function() {\n config2.staller = null;\n });\n config2.runner = getRunner(config2, currentBlockNumber, method, params).then(function(result3) {\n config2.done = true;\n config2.result = result3;\n if (_this.listenerCount(\"debug\")) {\n _this.emit(\"debug\", {\n action: \"request\",\n rid,\n backend: exposeDebugConfig(config2, now()),\n request: { method, params: (0, properties_1.deepCopy)(params) },\n provider: _this\n });\n }\n }, function(error) {\n config2.done = true;\n config2.error = error;\n if (_this.listenerCount(\"debug\")) {\n _this.emit(\"debug\", {\n action: \"request\",\n rid,\n backend: exposeDebugConfig(config2, now()),\n request: { method, params: (0, properties_1.deepCopy)(params) },\n provider: _this\n });\n }\n });\n if (this_1.listenerCount(\"debug\")) {\n this_1.emit(\"debug\", {\n action: \"request\",\n rid,\n backend: exposeDebugConfig(config2, null),\n request: { method, params: (0, properties_1.deepCopy)(params) },\n provider: this_1\n });\n }\n inflightWeight += config2.weight;\n };\n while (inflightWeight < this_1.quorum && i3 < configs.length) {\n _loop_2();\n }\n waiting = [];\n configs.forEach(function(c4) {\n if (c4.done || !c4.runner) {\n return;\n }\n waiting.push(c4.runner);\n if (c4.staller) {\n waiting.push(c4.staller.getPromise());\n }\n });\n if (!waiting.length)\n return [3, 2];\n return [4, Promise.race(waiting)];\n case 1:\n _b.sent();\n _b.label = 2;\n case 2:\n results2 = configs.filter(function(c4) {\n return c4.done && c4.error == null;\n });\n if (!(results2.length >= this_1.quorum))\n return [3, 5];\n result2 = processFunc(results2);\n if (result2 !== void 0) {\n configs.forEach(function(c4) {\n if (c4.staller) {\n c4.staller.cancel();\n }\n c4.cancelled = true;\n });\n return [2, { value: result2 }];\n }\n if (!!first)\n return [3, 4];\n return [4, stall(100).getPromise()];\n case 3:\n _b.sent();\n _b.label = 4;\n case 4:\n first = false;\n _b.label = 5;\n case 5:\n errors = configs.reduce(function(accum, c4) {\n if (!c4.done || c4.error == null) {\n return accum;\n }\n var code = c4.error.code;\n if (ForwardErrors.indexOf(code) >= 0) {\n if (!accum[code]) {\n accum[code] = { error: c4.error, weight: 0 };\n }\n accum[code].weight += c4.weight;\n }\n return accum;\n }, {});\n Object.keys(errors).forEach(function(errorCode) {\n var tally = errors[errorCode];\n if (tally.weight < _this.quorum) {\n return;\n }\n configs.forEach(function(c4) {\n if (c4.staller) {\n c4.staller.cancel();\n }\n c4.cancelled = true;\n });\n var e2 = tally.error;\n var props = {};\n ForwardProperties.forEach(function(name) {\n if (e2[name] == null) {\n return;\n }\n props[name] = e2[name];\n });\n logger.throwError(e2.reason || e2.message, errorCode, props);\n });\n if (configs.filter(function(c4) {\n return !c4.done;\n }).length === 0) {\n return [2, \"break\"];\n }\n return [\n 2\n /*return*/\n ];\n }\n });\n };\n this_1 = this;\n _a.label = 5;\n case 5:\n if (false)\n return [3, 7];\n return [5, _loop_1()];\n case 6:\n state_1 = _a.sent();\n if (typeof state_1 === \"object\")\n return [2, state_1.value];\n if (state_1 === \"break\")\n return [3, 7];\n return [3, 5];\n case 7:\n configs.forEach(function(c4) {\n if (c4.staller) {\n c4.staller.cancel();\n }\n c4.cancelled = true;\n });\n return [2, logger.throwError(\"failed to meet quorum\", logger_1.Logger.errors.SERVER_ERROR, {\n method,\n params,\n //results: configs.map((c) => c.result),\n //errors: configs.map((c) => c.error),\n results: configs.map(function(c4) {\n return exposeDebugConfig(c4);\n }),\n provider: this\n })];\n }\n });\n });\n };\n return FallbackProvider2;\n }(base_provider_1.BaseProvider)\n );\n exports3.FallbackProvider = FallbackProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js\n var require_browser_ipc_provider2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/browser-ipc-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.IpcProvider = void 0;\n var IpcProvider = null;\n exports3.IpcProvider = IpcProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/infura-provider.js\n var require_infura_provider2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/infura-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.InfuraProvider = exports3.InfuraWebSocketProvider = void 0;\n var properties_1 = require_lib4();\n var websocket_provider_1 = require_websocket_provider2();\n var formatter_1 = require_formatter2();\n var logger_1 = require_lib();\n var _version_1 = require_version31();\n var logger = new logger_1.Logger(_version_1.version);\n var url_json_rpc_provider_1 = require_url_json_rpc_provider2();\n var defaultProjectId = \"84842078b09946638c03157f83405213\";\n var InfuraWebSocketProvider = (\n /** @class */\n function(_super) {\n __extends4(InfuraWebSocketProvider2, _super);\n function InfuraWebSocketProvider2(network, apiKey) {\n var _this = this;\n var provider = new InfuraProvider(network, apiKey);\n var connection = provider.connection;\n if (connection.password) {\n logger.throwError(\"INFURA WebSocket project secrets unsupported\", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"InfuraProvider.getWebSocketProvider()\"\n });\n }\n var url = connection.url.replace(/^http/i, \"ws\").replace(\"/v3/\", \"/ws/v3/\");\n _this = _super.call(this, url, network) || this;\n (0, properties_1.defineReadOnly)(_this, \"apiKey\", provider.projectId);\n (0, properties_1.defineReadOnly)(_this, \"projectId\", provider.projectId);\n (0, properties_1.defineReadOnly)(_this, \"projectSecret\", provider.projectSecret);\n return _this;\n }\n InfuraWebSocketProvider2.prototype.isCommunityResource = function() {\n return this.projectId === defaultProjectId;\n };\n return InfuraWebSocketProvider2;\n }(websocket_provider_1.WebSocketProvider)\n );\n exports3.InfuraWebSocketProvider = InfuraWebSocketProvider;\n var InfuraProvider = (\n /** @class */\n function(_super) {\n __extends4(InfuraProvider2, _super);\n function InfuraProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n InfuraProvider2.getWebSocketProvider = function(network, apiKey) {\n return new InfuraWebSocketProvider(network, apiKey);\n };\n InfuraProvider2.getApiKey = function(apiKey) {\n var apiKeyObj = {\n apiKey: defaultProjectId,\n projectId: defaultProjectId,\n projectSecret: null\n };\n if (apiKey == null) {\n return apiKeyObj;\n }\n if (typeof apiKey === \"string\") {\n apiKeyObj.projectId = apiKey;\n } else if (apiKey.projectSecret != null) {\n logger.assertArgument(typeof apiKey.projectId === \"string\", \"projectSecret requires a projectId\", \"projectId\", apiKey.projectId);\n logger.assertArgument(typeof apiKey.projectSecret === \"string\", \"invalid projectSecret\", \"projectSecret\", \"[REDACTED]\");\n apiKeyObj.projectId = apiKey.projectId;\n apiKeyObj.projectSecret = apiKey.projectSecret;\n } else if (apiKey.projectId) {\n apiKeyObj.projectId = apiKey.projectId;\n }\n apiKeyObj.apiKey = apiKeyObj.projectId;\n return apiKeyObj;\n };\n InfuraProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network ? network.name : \"unknown\") {\n case \"homestead\":\n host = \"mainnet.infura.io\";\n break;\n case \"goerli\":\n host = \"goerli.infura.io\";\n break;\n case \"sepolia\":\n host = \"sepolia.infura.io\";\n break;\n case \"matic\":\n host = \"polygon-mainnet.infura.io\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai.infura.io\";\n break;\n case \"optimism\":\n host = \"optimism-mainnet.infura.io\";\n break;\n case \"optimism-goerli\":\n host = \"optimism-goerli.infura.io\";\n break;\n case \"arbitrum\":\n host = \"arbitrum-mainnet.infura.io\";\n break;\n case \"arbitrum-goerli\":\n host = \"arbitrum-goerli.infura.io\";\n break;\n default:\n logger.throwError(\"unsupported network\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n var connection = {\n allowGzip: true,\n url: \"https://\" + host + \"/v3/\" + apiKey.projectId,\n throttleCallback: function(attempt, url) {\n if (apiKey.projectId === defaultProjectId) {\n (0, formatter_1.showThrottleMessage)();\n }\n return Promise.resolve(true);\n }\n };\n if (apiKey.projectSecret != null) {\n connection.user = \"\";\n connection.password = apiKey.projectSecret;\n }\n return connection;\n };\n InfuraProvider2.prototype.isCommunityResource = function() {\n return this.projectId === defaultProjectId;\n };\n return InfuraProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.InfuraProvider = InfuraProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js\n var require_json_rpc_batch_provider2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/json-rpc-batch-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.JsonRpcBatchProvider = void 0;\n var properties_1 = require_lib4();\n var web_1 = require_lib28();\n var json_rpc_provider_1 = require_json_rpc_provider2();\n var JsonRpcBatchProvider = (\n /** @class */\n function(_super) {\n __extends4(JsonRpcBatchProvider2, _super);\n function JsonRpcBatchProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n JsonRpcBatchProvider2.prototype.send = function(method, params) {\n var _this = this;\n var request = {\n method,\n params,\n id: this._nextId++,\n jsonrpc: \"2.0\"\n };\n if (this._pendingBatch == null) {\n this._pendingBatch = [];\n }\n var inflightRequest = { request, resolve: null, reject: null };\n var promise = new Promise(function(resolve, reject) {\n inflightRequest.resolve = resolve;\n inflightRequest.reject = reject;\n });\n this._pendingBatch.push(inflightRequest);\n if (!this._pendingBatchAggregator) {\n this._pendingBatchAggregator = setTimeout(function() {\n var batch = _this._pendingBatch;\n _this._pendingBatch = null;\n _this._pendingBatchAggregator = null;\n var request2 = batch.map(function(inflight) {\n return inflight.request;\n });\n _this.emit(\"debug\", {\n action: \"requestBatch\",\n request: (0, properties_1.deepCopy)(request2),\n provider: _this\n });\n return (0, web_1.fetchJson)(_this.connection, JSON.stringify(request2)).then(function(result) {\n _this.emit(\"debug\", {\n action: \"response\",\n request: request2,\n response: result,\n provider: _this\n });\n batch.forEach(function(inflightRequest2, index2) {\n var payload = result[index2];\n if (payload.error) {\n var error = new Error(payload.error.message);\n error.code = payload.error.code;\n error.data = payload.error.data;\n inflightRequest2.reject(error);\n } else {\n inflightRequest2.resolve(payload.result);\n }\n });\n }, function(error) {\n _this.emit(\"debug\", {\n action: \"response\",\n error,\n request: request2,\n provider: _this\n });\n batch.forEach(function(inflightRequest2) {\n inflightRequest2.reject(error);\n });\n });\n }, 10);\n }\n return promise;\n };\n return JsonRpcBatchProvider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.JsonRpcBatchProvider = JsonRpcBatchProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/nodesmith-provider.js\n var require_nodesmith_provider2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/nodesmith-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NodesmithProvider = void 0;\n var url_json_rpc_provider_1 = require_url_json_rpc_provider2();\n var logger_1 = require_lib();\n var _version_1 = require_version31();\n var logger = new logger_1.Logger(_version_1.version);\n var defaultApiKey = \"ETHERS_JS_SHARED\";\n var NodesmithProvider = (\n /** @class */\n function(_super) {\n __extends4(NodesmithProvider2, _super);\n function NodesmithProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NodesmithProvider2.getApiKey = function(apiKey) {\n if (apiKey && typeof apiKey !== \"string\") {\n logger.throwArgumentError(\"invalid apiKey\", \"apiKey\", apiKey);\n }\n return apiKey || defaultApiKey;\n };\n NodesmithProvider2.getUrl = function(network, apiKey) {\n logger.warn(\"NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.\");\n var host = null;\n switch (network.name) {\n case \"homestead\":\n host = \"https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc\";\n break;\n case \"ropsten\":\n host = \"https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc\";\n break;\n case \"rinkeby\":\n host = \"https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc\";\n break;\n case \"goerli\":\n host = \"https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc\";\n break;\n case \"kovan\":\n host = \"https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc\";\n break;\n default:\n logger.throwArgumentError(\"unsupported network\", \"network\", arguments[0]);\n }\n return host + \"?apiKey=\" + apiKey;\n };\n return NodesmithProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.NodesmithProvider = NodesmithProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/pocket-provider.js\n var require_pocket_provider2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/pocket-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PocketProvider = void 0;\n var logger_1 = require_lib();\n var _version_1 = require_version31();\n var logger = new logger_1.Logger(_version_1.version);\n var url_json_rpc_provider_1 = require_url_json_rpc_provider2();\n var defaultApplicationId = \"62e1ad51b37b8e00394bda3b\";\n var PocketProvider = (\n /** @class */\n function(_super) {\n __extends4(PocketProvider2, _super);\n function PocketProvider2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PocketProvider2.getApiKey = function(apiKey) {\n var apiKeyObj = {\n applicationId: null,\n loadBalancer: true,\n applicationSecretKey: null\n };\n if (apiKey == null) {\n apiKeyObj.applicationId = defaultApplicationId;\n } else if (typeof apiKey === \"string\") {\n apiKeyObj.applicationId = apiKey;\n } else if (apiKey.applicationSecretKey != null) {\n apiKeyObj.applicationId = apiKey.applicationId;\n apiKeyObj.applicationSecretKey = apiKey.applicationSecretKey;\n } else if (apiKey.applicationId) {\n apiKeyObj.applicationId = apiKey.applicationId;\n } else {\n logger.throwArgumentError(\"unsupported PocketProvider apiKey\", \"apiKey\", apiKey);\n }\n return apiKeyObj;\n };\n PocketProvider2.getUrl = function(network, apiKey) {\n var host = null;\n switch (network ? network.name : \"unknown\") {\n case \"goerli\":\n host = \"eth-goerli.gateway.pokt.network\";\n break;\n case \"homestead\":\n host = \"eth-mainnet.gateway.pokt.network\";\n break;\n case \"kovan\":\n host = \"poa-kovan.gateway.pokt.network\";\n break;\n case \"matic\":\n host = \"poly-mainnet.gateway.pokt.network\";\n break;\n case \"maticmum\":\n host = \"polygon-mumbai-rpc.gateway.pokt.network\";\n break;\n case \"rinkeby\":\n host = \"eth-rinkeby.gateway.pokt.network\";\n break;\n case \"ropsten\":\n host = \"eth-ropsten.gateway.pokt.network\";\n break;\n default:\n logger.throwError(\"unsupported network\", logger_1.Logger.errors.INVALID_ARGUMENT, {\n argument: \"network\",\n value: network\n });\n }\n var url = \"https://\" + host + \"/v1/lb/\" + apiKey.applicationId;\n var connection = { headers: {}, url };\n if (apiKey.applicationSecretKey != null) {\n connection.user = \"\";\n connection.password = apiKey.applicationSecretKey;\n }\n return connection;\n };\n PocketProvider2.prototype.isCommunityResource = function() {\n return this.applicationId === defaultApplicationId;\n };\n return PocketProvider2;\n }(url_json_rpc_provider_1.UrlJsonRpcProvider)\n );\n exports3.PocketProvider = PocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/web3-provider.js\n var require_web3_provider2 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/web3-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __extends4 = exports3 && exports3.__extends || /* @__PURE__ */ function() {\n var extendStatics4 = function(d5, b4) {\n extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics4(d5, b4);\n };\n return function(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics4(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n };\n }();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Web3Provider = void 0;\n var properties_1 = require_lib4();\n var logger_1 = require_lib();\n var _version_1 = require_version31();\n var logger = new logger_1.Logger(_version_1.version);\n var json_rpc_provider_1 = require_json_rpc_provider2();\n var _nextId = 1;\n function buildWeb3LegacyFetcher(provider, sendFunc) {\n var fetcher = \"Web3LegacyFetcher\";\n return function(method, params) {\n var _this = this;\n var request = {\n method,\n params,\n id: _nextId++,\n jsonrpc: \"2.0\"\n };\n return new Promise(function(resolve, reject) {\n _this.emit(\"debug\", {\n action: \"request\",\n fetcher,\n request: (0, properties_1.deepCopy)(request),\n provider: _this\n });\n sendFunc(request, function(error, response) {\n if (error) {\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher,\n error,\n request,\n provider: _this\n });\n return reject(error);\n }\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher,\n request,\n response,\n provider: _this\n });\n if (response.error) {\n var error_1 = new Error(response.error.message);\n error_1.code = response.error.code;\n error_1.data = response.error.data;\n return reject(error_1);\n }\n resolve(response.result);\n });\n });\n };\n }\n function buildEip1193Fetcher(provider) {\n return function(method, params) {\n var _this = this;\n if (params == null) {\n params = [];\n }\n var request = { method, params };\n this.emit(\"debug\", {\n action: \"request\",\n fetcher: \"Eip1193Fetcher\",\n request: (0, properties_1.deepCopy)(request),\n provider: this\n });\n return provider.request(request).then(function(response) {\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher: \"Eip1193Fetcher\",\n request,\n response,\n provider: _this\n });\n return response;\n }, function(error) {\n _this.emit(\"debug\", {\n action: \"response\",\n fetcher: \"Eip1193Fetcher\",\n request,\n error,\n provider: _this\n });\n throw error;\n });\n };\n }\n var Web3Provider = (\n /** @class */\n function(_super) {\n __extends4(Web3Provider2, _super);\n function Web3Provider2(provider, network) {\n var _this = this;\n if (provider == null) {\n logger.throwArgumentError(\"missing provider\", \"provider\", provider);\n }\n var path = null;\n var jsonRpcFetchFunc = null;\n var subprovider = null;\n if (typeof provider === \"function\") {\n path = \"unknown:\";\n jsonRpcFetchFunc = provider;\n } else {\n path = provider.host || provider.path || \"\";\n if (!path && provider.isMetaMask) {\n path = \"metamask\";\n }\n subprovider = provider;\n if (provider.request) {\n if (path === \"\") {\n path = \"eip-1193:\";\n }\n jsonRpcFetchFunc = buildEip1193Fetcher(provider);\n } else if (provider.sendAsync) {\n jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.sendAsync.bind(provider));\n } else if (provider.send) {\n jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider));\n } else {\n logger.throwArgumentError(\"unsupported provider\", \"provider\", provider);\n }\n if (!path) {\n path = \"unknown:\";\n }\n }\n _this = _super.call(this, path, network) || this;\n (0, properties_1.defineReadOnly)(_this, \"jsonRpcFetchFunc\", jsonRpcFetchFunc);\n (0, properties_1.defineReadOnly)(_this, \"provider\", subprovider);\n return _this;\n }\n Web3Provider2.prototype.send = function(method, params) {\n return this.jsonRpcFetchFunc(method, params);\n };\n return Web3Provider2;\n }(json_rpc_provider_1.JsonRpcProvider)\n );\n exports3.Web3Provider = Web3Provider;\n }\n });\n\n // ../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/index.js\n var require_lib35 = __commonJS({\n \"../../../node_modules/.pnpm/@ethersproject+providers@5.7.2_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/@ethersproject/providers/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Formatter = exports3.showThrottleMessage = exports3.isCommunityResourcable = exports3.isCommunityResource = exports3.getNetwork = exports3.getDefaultProvider = exports3.JsonRpcSigner = exports3.IpcProvider = exports3.WebSocketProvider = exports3.Web3Provider = exports3.StaticJsonRpcProvider = exports3.PocketProvider = exports3.NodesmithProvider = exports3.JsonRpcBatchProvider = exports3.JsonRpcProvider = exports3.InfuraWebSocketProvider = exports3.InfuraProvider = exports3.EtherscanProvider = exports3.CloudflareProvider = exports3.AnkrProvider = exports3.AlchemyWebSocketProvider = exports3.AlchemyProvider = exports3.FallbackProvider = exports3.UrlJsonRpcProvider = exports3.Resolver = exports3.BaseProvider = exports3.Provider = void 0;\n var abstract_provider_1 = require_lib33();\n Object.defineProperty(exports3, \"Provider\", { enumerable: true, get: function() {\n return abstract_provider_1.Provider;\n } });\n var networks_1 = require_lib27();\n Object.defineProperty(exports3, \"getNetwork\", { enumerable: true, get: function() {\n return networks_1.getNetwork;\n } });\n var base_provider_1 = require_base_provider2();\n Object.defineProperty(exports3, \"BaseProvider\", { enumerable: true, get: function() {\n return base_provider_1.BaseProvider;\n } });\n Object.defineProperty(exports3, \"Resolver\", { enumerable: true, get: function() {\n return base_provider_1.Resolver;\n } });\n var alchemy_provider_1 = require_alchemy_provider2();\n Object.defineProperty(exports3, \"AlchemyProvider\", { enumerable: true, get: function() {\n return alchemy_provider_1.AlchemyProvider;\n } });\n Object.defineProperty(exports3, \"AlchemyWebSocketProvider\", { enumerable: true, get: function() {\n return alchemy_provider_1.AlchemyWebSocketProvider;\n } });\n var ankr_provider_1 = require_ankr_provider2();\n Object.defineProperty(exports3, \"AnkrProvider\", { enumerable: true, get: function() {\n return ankr_provider_1.AnkrProvider;\n } });\n var cloudflare_provider_1 = require_cloudflare_provider2();\n Object.defineProperty(exports3, \"CloudflareProvider\", { enumerable: true, get: function() {\n return cloudflare_provider_1.CloudflareProvider;\n } });\n var etherscan_provider_1 = require_etherscan_provider2();\n Object.defineProperty(exports3, \"EtherscanProvider\", { enumerable: true, get: function() {\n return etherscan_provider_1.EtherscanProvider;\n } });\n var fallback_provider_1 = require_fallback_provider2();\n Object.defineProperty(exports3, \"FallbackProvider\", { enumerable: true, get: function() {\n return fallback_provider_1.FallbackProvider;\n } });\n var ipc_provider_1 = require_browser_ipc_provider2();\n Object.defineProperty(exports3, \"IpcProvider\", { enumerable: true, get: function() {\n return ipc_provider_1.IpcProvider;\n } });\n var infura_provider_1 = require_infura_provider2();\n Object.defineProperty(exports3, \"InfuraProvider\", { enumerable: true, get: function() {\n return infura_provider_1.InfuraProvider;\n } });\n Object.defineProperty(exports3, \"InfuraWebSocketProvider\", { enumerable: true, get: function() {\n return infura_provider_1.InfuraWebSocketProvider;\n } });\n var json_rpc_provider_1 = require_json_rpc_provider2();\n Object.defineProperty(exports3, \"JsonRpcProvider\", { enumerable: true, get: function() {\n return json_rpc_provider_1.JsonRpcProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcSigner\", { enumerable: true, get: function() {\n return json_rpc_provider_1.JsonRpcSigner;\n } });\n var json_rpc_batch_provider_1 = require_json_rpc_batch_provider2();\n Object.defineProperty(exports3, \"JsonRpcBatchProvider\", { enumerable: true, get: function() {\n return json_rpc_batch_provider_1.JsonRpcBatchProvider;\n } });\n var nodesmith_provider_1 = require_nodesmith_provider2();\n Object.defineProperty(exports3, \"NodesmithProvider\", { enumerable: true, get: function() {\n return nodesmith_provider_1.NodesmithProvider;\n } });\n var pocket_provider_1 = require_pocket_provider2();\n Object.defineProperty(exports3, \"PocketProvider\", { enumerable: true, get: function() {\n return pocket_provider_1.PocketProvider;\n } });\n var url_json_rpc_provider_1 = require_url_json_rpc_provider2();\n Object.defineProperty(exports3, \"StaticJsonRpcProvider\", { enumerable: true, get: function() {\n return url_json_rpc_provider_1.StaticJsonRpcProvider;\n } });\n Object.defineProperty(exports3, \"UrlJsonRpcProvider\", { enumerable: true, get: function() {\n return url_json_rpc_provider_1.UrlJsonRpcProvider;\n } });\n var web3_provider_1 = require_web3_provider2();\n Object.defineProperty(exports3, \"Web3Provider\", { enumerable: true, get: function() {\n return web3_provider_1.Web3Provider;\n } });\n var websocket_provider_1 = require_websocket_provider2();\n Object.defineProperty(exports3, \"WebSocketProvider\", { enumerable: true, get: function() {\n return websocket_provider_1.WebSocketProvider;\n } });\n var formatter_1 = require_formatter2();\n Object.defineProperty(exports3, \"Formatter\", { enumerable: true, get: function() {\n return formatter_1.Formatter;\n } });\n Object.defineProperty(exports3, \"isCommunityResourcable\", { enumerable: true, get: function() {\n return formatter_1.isCommunityResourcable;\n } });\n Object.defineProperty(exports3, \"isCommunityResource\", { enumerable: true, get: function() {\n return formatter_1.isCommunityResource;\n } });\n Object.defineProperty(exports3, \"showThrottleMessage\", { enumerable: true, get: function() {\n return formatter_1.showThrottleMessage;\n } });\n var logger_1 = require_lib();\n var _version_1 = require_version31();\n var logger = new logger_1.Logger(_version_1.version);\n function getDefaultProvider(network, options) {\n if (network == null) {\n network = \"homestead\";\n }\n if (typeof network === \"string\") {\n var match = network.match(/^(ws|http)s?:/i);\n if (match) {\n switch (match[1].toLowerCase()) {\n case \"http\":\n case \"https\":\n return new json_rpc_provider_1.JsonRpcProvider(network);\n case \"ws\":\n case \"wss\":\n return new websocket_provider_1.WebSocketProvider(network);\n default:\n logger.throwArgumentError(\"unsupported URL scheme\", \"network\", network);\n }\n }\n }\n var n2 = (0, networks_1.getNetwork)(network);\n if (!n2 || !n2._defaultProvider) {\n logger.throwError(\"unsupported getDefaultProvider network\", logger_1.Logger.errors.NETWORK_ERROR, {\n operation: \"getDefaultProvider\",\n network\n });\n }\n return n2._defaultProvider({\n FallbackProvider: fallback_provider_1.FallbackProvider,\n AlchemyProvider: alchemy_provider_1.AlchemyProvider,\n AnkrProvider: ankr_provider_1.AnkrProvider,\n CloudflareProvider: cloudflare_provider_1.CloudflareProvider,\n EtherscanProvider: etherscan_provider_1.EtherscanProvider,\n InfuraProvider: infura_provider_1.InfuraProvider,\n JsonRpcProvider: json_rpc_provider_1.JsonRpcProvider,\n NodesmithProvider: nodesmith_provider_1.NodesmithProvider,\n PocketProvider: pocket_provider_1.PocketProvider,\n Web3Provider: web3_provider_1.Web3Provider,\n IpcProvider: ipc_provider_1.IpcProvider\n }, options);\n }\n exports3.getDefaultProvider = getDefaultProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/code.js\n var require_code = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/code.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.regexpCode = exports3.getEsmExportName = exports3.getProperty = exports3.safeStringify = exports3.stringify = exports3.strConcat = exports3.addCodeArg = exports3.str = exports3._ = exports3.nil = exports3._Code = exports3.Name = exports3.IDENTIFIER = exports3._CodeOrName = void 0;\n var _CodeOrName = class {\n };\n exports3._CodeOrName = _CodeOrName;\n exports3.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;\n var Name = class extends _CodeOrName {\n constructor(s4) {\n super();\n if (!exports3.IDENTIFIER.test(s4))\n throw new Error(\"CodeGen: name must be a valid identifier\");\n this.str = s4;\n }\n toString() {\n return this.str;\n }\n emptyStr() {\n return false;\n }\n get names() {\n return { [this.str]: 1 };\n }\n };\n exports3.Name = Name;\n var _Code = class extends _CodeOrName {\n constructor(code) {\n super();\n this._items = typeof code === \"string\" ? [code] : code;\n }\n toString() {\n return this.str;\n }\n emptyStr() {\n if (this._items.length > 1)\n return false;\n const item = this._items[0];\n return item === \"\" || item === '\"\"';\n }\n get str() {\n var _a;\n return (_a = this._str) !== null && _a !== void 0 ? _a : this._str = this._items.reduce((s4, c4) => `${s4}${c4}`, \"\");\n }\n get names() {\n var _a;\n return (_a = this._names) !== null && _a !== void 0 ? _a : this._names = this._items.reduce((names, c4) => {\n if (c4 instanceof Name)\n names[c4.str] = (names[c4.str] || 0) + 1;\n return names;\n }, {});\n }\n };\n exports3._Code = _Code;\n exports3.nil = new _Code(\"\");\n function _2(strs, ...args) {\n const code = [strs[0]];\n let i3 = 0;\n while (i3 < args.length) {\n addCodeArg(code, args[i3]);\n code.push(strs[++i3]);\n }\n return new _Code(code);\n }\n exports3._ = _2;\n var plus = new _Code(\"+\");\n function str(strs, ...args) {\n const expr = [safeStringify(strs[0])];\n let i3 = 0;\n while (i3 < args.length) {\n expr.push(plus);\n addCodeArg(expr, args[i3]);\n expr.push(plus, safeStringify(strs[++i3]));\n }\n optimize(expr);\n return new _Code(expr);\n }\n exports3.str = str;\n function addCodeArg(code, arg) {\n if (arg instanceof _Code)\n code.push(...arg._items);\n else if (arg instanceof Name)\n code.push(arg);\n else\n code.push(interpolate(arg));\n }\n exports3.addCodeArg = addCodeArg;\n function optimize(expr) {\n let i3 = 1;\n while (i3 < expr.length - 1) {\n if (expr[i3] === plus) {\n const res = mergeExprItems(expr[i3 - 1], expr[i3 + 1]);\n if (res !== void 0) {\n expr.splice(i3 - 1, 3, res);\n continue;\n }\n expr[i3++] = \"+\";\n }\n i3++;\n }\n }\n function mergeExprItems(a3, b4) {\n if (b4 === '\"\"')\n return a3;\n if (a3 === '\"\"')\n return b4;\n if (typeof a3 == \"string\") {\n if (b4 instanceof Name || a3[a3.length - 1] !== '\"')\n return;\n if (typeof b4 != \"string\")\n return `${a3.slice(0, -1)}${b4}\"`;\n if (b4[0] === '\"')\n return a3.slice(0, -1) + b4.slice(1);\n return;\n }\n if (typeof b4 == \"string\" && b4[0] === '\"' && !(a3 instanceof Name))\n return `\"${a3}${b4.slice(1)}`;\n return;\n }\n function strConcat(c1, c22) {\n return c22.emptyStr() ? c1 : c1.emptyStr() ? c22 : str`${c1}${c22}`;\n }\n exports3.strConcat = strConcat;\n function interpolate(x4) {\n return typeof x4 == \"number\" || typeof x4 == \"boolean\" || x4 === null ? x4 : safeStringify(Array.isArray(x4) ? x4.join(\",\") : x4);\n }\n function stringify4(x4) {\n return new _Code(safeStringify(x4));\n }\n exports3.stringify = stringify4;\n function safeStringify(x4) {\n return JSON.stringify(x4).replace(/\\u2028/g, \"\\\\u2028\").replace(/\\u2029/g, \"\\\\u2029\");\n }\n exports3.safeStringify = safeStringify;\n function getProperty(key) {\n return typeof key == \"string\" && exports3.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _2`[${key}]`;\n }\n exports3.getProperty = getProperty;\n function getEsmExportName(key) {\n if (typeof key == \"string\" && exports3.IDENTIFIER.test(key)) {\n return new _Code(`${key}`);\n }\n throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);\n }\n exports3.getEsmExportName = getEsmExportName;\n function regexpCode(rx) {\n return new _Code(rx.toString());\n }\n exports3.regexpCode = regexpCode;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/scope.js\n var require_scope = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/scope.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ValueScope = exports3.ValueScopeName = exports3.Scope = exports3.varKinds = exports3.UsedValueState = void 0;\n var code_1 = require_code();\n var ValueError = class extends Error {\n constructor(name) {\n super(`CodeGen: \"code\" for ${name} not defined`);\n this.value = name.value;\n }\n };\n var UsedValueState;\n (function(UsedValueState2) {\n UsedValueState2[UsedValueState2[\"Started\"] = 0] = \"Started\";\n UsedValueState2[UsedValueState2[\"Completed\"] = 1] = \"Completed\";\n })(UsedValueState || (exports3.UsedValueState = UsedValueState = {}));\n exports3.varKinds = {\n const: new code_1.Name(\"const\"),\n let: new code_1.Name(\"let\"),\n var: new code_1.Name(\"var\")\n };\n var Scope = class {\n constructor({ prefixes, parent } = {}) {\n this._names = {};\n this._prefixes = prefixes;\n this._parent = parent;\n }\n toName(nameOrPrefix) {\n return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix);\n }\n name(prefix) {\n return new code_1.Name(this._newName(prefix));\n }\n _newName(prefix) {\n const ng = this._names[prefix] || this._nameGroup(prefix);\n return `${prefix}${ng.index++}`;\n }\n _nameGroup(prefix) {\n var _a, _b;\n if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) {\n throw new Error(`CodeGen: prefix \"${prefix}\" is not allowed in this scope`);\n }\n return this._names[prefix] = { prefix, index: 0 };\n }\n };\n exports3.Scope = Scope;\n var ValueScopeName = class extends code_1.Name {\n constructor(prefix, nameStr) {\n super(nameStr);\n this.prefix = prefix;\n }\n setValue(value, { property, itemIndex }) {\n this.value = value;\n this.scopePath = (0, code_1._)`.${new code_1.Name(property)}[${itemIndex}]`;\n }\n };\n exports3.ValueScopeName = ValueScopeName;\n var line = (0, code_1._)`\\n`;\n var ValueScope = class extends Scope {\n constructor(opts) {\n super(opts);\n this._values = {};\n this._scope = opts.scope;\n this.opts = { ...opts, _n: opts.lines ? line : code_1.nil };\n }\n get() {\n return this._scope;\n }\n name(prefix) {\n return new ValueScopeName(prefix, this._newName(prefix));\n }\n value(nameOrPrefix, value) {\n var _a;\n if (value.ref === void 0)\n throw new Error(\"CodeGen: ref must be passed in value\");\n const name = this.toName(nameOrPrefix);\n const { prefix } = name;\n const valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref;\n let vs = this._values[prefix];\n if (vs) {\n const _name = vs.get(valueKey);\n if (_name)\n return _name;\n } else {\n vs = this._values[prefix] = /* @__PURE__ */ new Map();\n }\n vs.set(valueKey, name);\n const s4 = this._scope[prefix] || (this._scope[prefix] = []);\n const itemIndex = s4.length;\n s4[itemIndex] = value.ref;\n name.setValue(value, { property: prefix, itemIndex });\n return name;\n }\n getValue(prefix, keyOrRef) {\n const vs = this._values[prefix];\n if (!vs)\n return;\n return vs.get(keyOrRef);\n }\n scopeRefs(scopeName, values = this._values) {\n return this._reduceValues(values, (name) => {\n if (name.scopePath === void 0)\n throw new Error(`CodeGen: name \"${name}\" has no value`);\n return (0, code_1._)`${scopeName}${name.scopePath}`;\n });\n }\n scopeCode(values = this._values, usedValues, getCode2) {\n return this._reduceValues(values, (name) => {\n if (name.value === void 0)\n throw new Error(`CodeGen: name \"${name}\" has no value`);\n return name.value.code;\n }, usedValues, getCode2);\n }\n _reduceValues(values, valueCode, usedValues = {}, getCode2) {\n let code = code_1.nil;\n for (const prefix in values) {\n const vs = values[prefix];\n if (!vs)\n continue;\n const nameSet = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map();\n vs.forEach((name) => {\n if (nameSet.has(name))\n return;\n nameSet.set(name, UsedValueState.Started);\n let c4 = valueCode(name);\n if (c4) {\n const def = this.opts.es5 ? exports3.varKinds.var : exports3.varKinds.const;\n code = (0, code_1._)`${code}${def} ${name} = ${c4};${this.opts._n}`;\n } else if (c4 = getCode2 === null || getCode2 === void 0 ? void 0 : getCode2(name)) {\n code = (0, code_1._)`${code}${c4}${this.opts._n}`;\n } else {\n throw new ValueError(name);\n }\n nameSet.set(name, UsedValueState.Completed);\n });\n }\n return code;\n }\n };\n exports3.ValueScope = ValueScope;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/index.js\n var require_codegen = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/codegen/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.or = exports3.and = exports3.not = exports3.CodeGen = exports3.operators = exports3.varKinds = exports3.ValueScopeName = exports3.ValueScope = exports3.Scope = exports3.Name = exports3.regexpCode = exports3.stringify = exports3.getProperty = exports3.nil = exports3.strConcat = exports3.str = exports3._ = void 0;\n var code_1 = require_code();\n var scope_1 = require_scope();\n var code_2 = require_code();\n Object.defineProperty(exports3, \"_\", { enumerable: true, get: function() {\n return code_2._;\n } });\n Object.defineProperty(exports3, \"str\", { enumerable: true, get: function() {\n return code_2.str;\n } });\n Object.defineProperty(exports3, \"strConcat\", { enumerable: true, get: function() {\n return code_2.strConcat;\n } });\n Object.defineProperty(exports3, \"nil\", { enumerable: true, get: function() {\n return code_2.nil;\n } });\n Object.defineProperty(exports3, \"getProperty\", { enumerable: true, get: function() {\n return code_2.getProperty;\n } });\n Object.defineProperty(exports3, \"stringify\", { enumerable: true, get: function() {\n return code_2.stringify;\n } });\n Object.defineProperty(exports3, \"regexpCode\", { enumerable: true, get: function() {\n return code_2.regexpCode;\n } });\n Object.defineProperty(exports3, \"Name\", { enumerable: true, get: function() {\n return code_2.Name;\n } });\n var scope_2 = require_scope();\n Object.defineProperty(exports3, \"Scope\", { enumerable: true, get: function() {\n return scope_2.Scope;\n } });\n Object.defineProperty(exports3, \"ValueScope\", { enumerable: true, get: function() {\n return scope_2.ValueScope;\n } });\n Object.defineProperty(exports3, \"ValueScopeName\", { enumerable: true, get: function() {\n return scope_2.ValueScopeName;\n } });\n Object.defineProperty(exports3, \"varKinds\", { enumerable: true, get: function() {\n return scope_2.varKinds;\n } });\n exports3.operators = {\n GT: new code_1._Code(\">\"),\n GTE: new code_1._Code(\">=\"),\n LT: new code_1._Code(\"<\"),\n LTE: new code_1._Code(\"<=\"),\n EQ: new code_1._Code(\"===\"),\n NEQ: new code_1._Code(\"!==\"),\n NOT: new code_1._Code(\"!\"),\n OR: new code_1._Code(\"||\"),\n AND: new code_1._Code(\"&&\"),\n ADD: new code_1._Code(\"+\")\n };\n var Node = class {\n optimizeNodes() {\n return this;\n }\n optimizeNames(_names, _constants) {\n return this;\n }\n };\n var Def = class extends Node {\n constructor(varKind, name, rhs) {\n super();\n this.varKind = varKind;\n this.name = name;\n this.rhs = rhs;\n }\n render({ es5, _n }) {\n const varKind = es5 ? scope_1.varKinds.var : this.varKind;\n const rhs = this.rhs === void 0 ? \"\" : ` = ${this.rhs}`;\n return `${varKind} ${this.name}${rhs};` + _n;\n }\n optimizeNames(names, constants) {\n if (!names[this.name.str])\n return;\n if (this.rhs)\n this.rhs = optimizeExpr(this.rhs, names, constants);\n return this;\n }\n get names() {\n return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {};\n }\n };\n var Assign = class extends Node {\n constructor(lhs, rhs, sideEffects) {\n super();\n this.lhs = lhs;\n this.rhs = rhs;\n this.sideEffects = sideEffects;\n }\n render({ _n }) {\n return `${this.lhs} = ${this.rhs};` + _n;\n }\n optimizeNames(names, constants) {\n if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects)\n return;\n this.rhs = optimizeExpr(this.rhs, names, constants);\n return this;\n }\n get names() {\n const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names };\n return addExprNames(names, this.rhs);\n }\n };\n var AssignOp = class extends Assign {\n constructor(lhs, op, rhs, sideEffects) {\n super(lhs, rhs, sideEffects);\n this.op = op;\n }\n render({ _n }) {\n return `${this.lhs} ${this.op}= ${this.rhs};` + _n;\n }\n };\n var Label = class extends Node {\n constructor(label) {\n super();\n this.label = label;\n this.names = {};\n }\n render({ _n }) {\n return `${this.label}:` + _n;\n }\n };\n var Break = class extends Node {\n constructor(label) {\n super();\n this.label = label;\n this.names = {};\n }\n render({ _n }) {\n const label = this.label ? ` ${this.label}` : \"\";\n return `break${label};` + _n;\n }\n };\n var Throw = class extends Node {\n constructor(error) {\n super();\n this.error = error;\n }\n render({ _n }) {\n return `throw ${this.error};` + _n;\n }\n get names() {\n return this.error.names;\n }\n };\n var AnyCode = class extends Node {\n constructor(code) {\n super();\n this.code = code;\n }\n render({ _n }) {\n return `${this.code};` + _n;\n }\n optimizeNodes() {\n return `${this.code}` ? this : void 0;\n }\n optimizeNames(names, constants) {\n this.code = optimizeExpr(this.code, names, constants);\n return this;\n }\n get names() {\n return this.code instanceof code_1._CodeOrName ? this.code.names : {};\n }\n };\n var ParentNode = class extends Node {\n constructor(nodes = []) {\n super();\n this.nodes = nodes;\n }\n render(opts) {\n return this.nodes.reduce((code, n2) => code + n2.render(opts), \"\");\n }\n optimizeNodes() {\n const { nodes } = this;\n let i3 = nodes.length;\n while (i3--) {\n const n2 = nodes[i3].optimizeNodes();\n if (Array.isArray(n2))\n nodes.splice(i3, 1, ...n2);\n else if (n2)\n nodes[i3] = n2;\n else\n nodes.splice(i3, 1);\n }\n return nodes.length > 0 ? this : void 0;\n }\n optimizeNames(names, constants) {\n const { nodes } = this;\n let i3 = nodes.length;\n while (i3--) {\n const n2 = nodes[i3];\n if (n2.optimizeNames(names, constants))\n continue;\n subtractNames(names, n2.names);\n nodes.splice(i3, 1);\n }\n return nodes.length > 0 ? this : void 0;\n }\n get names() {\n return this.nodes.reduce((names, n2) => addNames(names, n2.names), {});\n }\n };\n var BlockNode = class extends ParentNode {\n render(opts) {\n return \"{\" + opts._n + super.render(opts) + \"}\" + opts._n;\n }\n };\n var Root = class extends ParentNode {\n };\n var Else = class extends BlockNode {\n };\n Else.kind = \"else\";\n var If = class _If extends BlockNode {\n constructor(condition, nodes) {\n super(nodes);\n this.condition = condition;\n }\n render(opts) {\n let code = `if(${this.condition})` + super.render(opts);\n if (this.else)\n code += \"else \" + this.else.render(opts);\n return code;\n }\n optimizeNodes() {\n super.optimizeNodes();\n const cond = this.condition;\n if (cond === true)\n return this.nodes;\n let e2 = this.else;\n if (e2) {\n const ns = e2.optimizeNodes();\n e2 = this.else = Array.isArray(ns) ? new Else(ns) : ns;\n }\n if (e2) {\n if (cond === false)\n return e2 instanceof _If ? e2 : e2.nodes;\n if (this.nodes.length)\n return this;\n return new _If(not(cond), e2 instanceof _If ? [e2] : e2.nodes);\n }\n if (cond === false || !this.nodes.length)\n return void 0;\n return this;\n }\n optimizeNames(names, constants) {\n var _a;\n this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);\n if (!(super.optimizeNames(names, constants) || this.else))\n return;\n this.condition = optimizeExpr(this.condition, names, constants);\n return this;\n }\n get names() {\n const names = super.names;\n addExprNames(names, this.condition);\n if (this.else)\n addNames(names, this.else.names);\n return names;\n }\n };\n If.kind = \"if\";\n var For = class extends BlockNode {\n };\n For.kind = \"for\";\n var ForLoop = class extends For {\n constructor(iteration) {\n super();\n this.iteration = iteration;\n }\n render(opts) {\n return `for(${this.iteration})` + super.render(opts);\n }\n optimizeNames(names, constants) {\n if (!super.optimizeNames(names, constants))\n return;\n this.iteration = optimizeExpr(this.iteration, names, constants);\n return this;\n }\n get names() {\n return addNames(super.names, this.iteration.names);\n }\n };\n var ForRange = class extends For {\n constructor(varKind, name, from14, to) {\n super();\n this.varKind = varKind;\n this.name = name;\n this.from = from14;\n this.to = to;\n }\n render(opts) {\n const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind;\n const { name, from: from14, to } = this;\n return `for(${varKind} ${name}=${from14}; ${name}<${to}; ${name}++)` + super.render(opts);\n }\n get names() {\n const names = addExprNames(super.names, this.from);\n return addExprNames(names, this.to);\n }\n };\n var ForIter = class extends For {\n constructor(loop, varKind, name, iterable) {\n super();\n this.loop = loop;\n this.varKind = varKind;\n this.name = name;\n this.iterable = iterable;\n }\n render(opts) {\n return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);\n }\n optimizeNames(names, constants) {\n if (!super.optimizeNames(names, constants))\n return;\n this.iterable = optimizeExpr(this.iterable, names, constants);\n return this;\n }\n get names() {\n return addNames(super.names, this.iterable.names);\n }\n };\n var Func = class extends BlockNode {\n constructor(name, args, async) {\n super();\n this.name = name;\n this.args = args;\n this.async = async;\n }\n render(opts) {\n const _async = this.async ? \"async \" : \"\";\n return `${_async}function ${this.name}(${this.args})` + super.render(opts);\n }\n };\n Func.kind = \"func\";\n var Return = class extends ParentNode {\n render(opts) {\n return \"return \" + super.render(opts);\n }\n };\n Return.kind = \"return\";\n var Try = class extends BlockNode {\n render(opts) {\n let code = \"try\" + super.render(opts);\n if (this.catch)\n code += this.catch.render(opts);\n if (this.finally)\n code += this.finally.render(opts);\n return code;\n }\n optimizeNodes() {\n var _a, _b;\n super.optimizeNodes();\n (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes();\n (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes();\n return this;\n }\n optimizeNames(names, constants) {\n var _a, _b;\n super.optimizeNames(names, constants);\n (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);\n (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants);\n return this;\n }\n get names() {\n const names = super.names;\n if (this.catch)\n addNames(names, this.catch.names);\n if (this.finally)\n addNames(names, this.finally.names);\n return names;\n }\n };\n var Catch = class extends BlockNode {\n constructor(error) {\n super();\n this.error = error;\n }\n render(opts) {\n return `catch(${this.error})` + super.render(opts);\n }\n };\n Catch.kind = \"catch\";\n var Finally = class extends BlockNode {\n render(opts) {\n return \"finally\" + super.render(opts);\n }\n };\n Finally.kind = \"finally\";\n var CodeGen = class {\n constructor(extScope, opts = {}) {\n this._values = {};\n this._blockStarts = [];\n this._constants = {};\n this.opts = { ...opts, _n: opts.lines ? \"\\n\" : \"\" };\n this._extScope = extScope;\n this._scope = new scope_1.Scope({ parent: extScope });\n this._nodes = [new Root()];\n }\n toString() {\n return this._root.render(this.opts);\n }\n // returns unique name in the internal scope\n name(prefix) {\n return this._scope.name(prefix);\n }\n // reserves unique name in the external scope\n scopeName(prefix) {\n return this._extScope.name(prefix);\n }\n // reserves unique name in the external scope and assigns value to it\n scopeValue(prefixOrName, value) {\n const name = this._extScope.value(prefixOrName, value);\n const vs = this._values[name.prefix] || (this._values[name.prefix] = /* @__PURE__ */ new Set());\n vs.add(name);\n return name;\n }\n getScopeValue(prefix, keyOrRef) {\n return this._extScope.getValue(prefix, keyOrRef);\n }\n // return code that assigns values in the external scope to the names that are used internally\n // (same names that were returned by gen.scopeName or gen.scopeValue)\n scopeRefs(scopeName) {\n return this._extScope.scopeRefs(scopeName, this._values);\n }\n scopeCode() {\n return this._extScope.scopeCode(this._values);\n }\n _def(varKind, nameOrPrefix, rhs, constant) {\n const name = this._scope.toName(nameOrPrefix);\n if (rhs !== void 0 && constant)\n this._constants[name.str] = rhs;\n this._leafNode(new Def(varKind, name, rhs));\n return name;\n }\n // `const` declaration (`var` in es5 mode)\n const(nameOrPrefix, rhs, _constant) {\n return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant);\n }\n // `let` declaration with optional assignment (`var` in es5 mode)\n let(nameOrPrefix, rhs, _constant) {\n return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant);\n }\n // `var` declaration with optional assignment\n var(nameOrPrefix, rhs, _constant) {\n return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant);\n }\n // assignment code\n assign(lhs, rhs, sideEffects) {\n return this._leafNode(new Assign(lhs, rhs, sideEffects));\n }\n // `+=` code\n add(lhs, rhs) {\n return this._leafNode(new AssignOp(lhs, exports3.operators.ADD, rhs));\n }\n // appends passed SafeExpr to code or executes Block\n code(c4) {\n if (typeof c4 == \"function\")\n c4();\n else if (c4 !== code_1.nil)\n this._leafNode(new AnyCode(c4));\n return this;\n }\n // returns code for object literal for the passed argument list of key-value pairs\n object(...keyValues) {\n const code = [\"{\"];\n for (const [key, value] of keyValues) {\n if (code.length > 1)\n code.push(\",\");\n code.push(key);\n if (key !== value || this.opts.es5) {\n code.push(\":\");\n (0, code_1.addCodeArg)(code, value);\n }\n }\n code.push(\"}\");\n return new code_1._Code(code);\n }\n // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)\n if(condition, thenBody, elseBody) {\n this._blockNode(new If(condition));\n if (thenBody && elseBody) {\n this.code(thenBody).else().code(elseBody).endIf();\n } else if (thenBody) {\n this.code(thenBody).endIf();\n } else if (elseBody) {\n throw new Error('CodeGen: \"else\" body without \"then\" body');\n }\n return this;\n }\n // `else if` clause - invalid without `if` or after `else` clauses\n elseIf(condition) {\n return this._elseNode(new If(condition));\n }\n // `else` clause - only valid after `if` or `else if` clauses\n else() {\n return this._elseNode(new Else());\n }\n // end `if` statement (needed if gen.if was used only with condition)\n endIf() {\n return this._endBlockNode(If, Else);\n }\n _for(node, forBody) {\n this._blockNode(node);\n if (forBody)\n this.code(forBody).endFor();\n return this;\n }\n // a generic `for` clause (or statement if `forBody` is passed)\n for(iteration, forBody) {\n return this._for(new ForLoop(iteration), forBody);\n }\n // `for` statement for a range of values\n forRange(nameOrPrefix, from14, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) {\n const name = this._scope.toName(nameOrPrefix);\n return this._for(new ForRange(varKind, name, from14, to), () => forBody(name));\n }\n // `for-of` statement (in es5 mode replace with a normal for loop)\n forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {\n const name = this._scope.toName(nameOrPrefix);\n if (this.opts.es5) {\n const arr = iterable instanceof code_1.Name ? iterable : this.var(\"_arr\", iterable);\n return this.forRange(\"_i\", 0, (0, code_1._)`${arr}.length`, (i3) => {\n this.var(name, (0, code_1._)`${arr}[${i3}]`);\n forBody(name);\n });\n }\n return this._for(new ForIter(\"of\", varKind, name, iterable), () => forBody(name));\n }\n // `for-in` statement.\n // With option `ownProperties` replaced with a `for-of` loop for object keys\n forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {\n if (this.opts.ownProperties) {\n return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody);\n }\n const name = this._scope.toName(nameOrPrefix);\n return this._for(new ForIter(\"in\", varKind, name, obj), () => forBody(name));\n }\n // end `for` loop\n endFor() {\n return this._endBlockNode(For);\n }\n // `label` statement\n label(label) {\n return this._leafNode(new Label(label));\n }\n // `break` statement\n break(label) {\n return this._leafNode(new Break(label));\n }\n // `return` statement\n return(value) {\n const node = new Return();\n this._blockNode(node);\n this.code(value);\n if (node.nodes.length !== 1)\n throw new Error('CodeGen: \"return\" should have one node');\n return this._endBlockNode(Return);\n }\n // `try` statement\n try(tryBody, catchCode, finallyCode) {\n if (!catchCode && !finallyCode)\n throw new Error('CodeGen: \"try\" without \"catch\" and \"finally\"');\n const node = new Try();\n this._blockNode(node);\n this.code(tryBody);\n if (catchCode) {\n const error = this.name(\"e\");\n this._currNode = node.catch = new Catch(error);\n catchCode(error);\n }\n if (finallyCode) {\n this._currNode = node.finally = new Finally();\n this.code(finallyCode);\n }\n return this._endBlockNode(Catch, Finally);\n }\n // `throw` statement\n throw(error) {\n return this._leafNode(new Throw(error));\n }\n // start self-balancing block\n block(body, nodeCount) {\n this._blockStarts.push(this._nodes.length);\n if (body)\n this.code(body).endBlock(nodeCount);\n return this;\n }\n // end the current self-balancing block\n endBlock(nodeCount) {\n const len = this._blockStarts.pop();\n if (len === void 0)\n throw new Error(\"CodeGen: not in self-balancing block\");\n const toClose = this._nodes.length - len;\n if (toClose < 0 || nodeCount !== void 0 && toClose !== nodeCount) {\n throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);\n }\n this._nodes.length = len;\n return this;\n }\n // `function` heading (or definition if funcBody is passed)\n func(name, args = code_1.nil, async, funcBody) {\n this._blockNode(new Func(name, args, async));\n if (funcBody)\n this.code(funcBody).endFunc();\n return this;\n }\n // end function definition\n endFunc() {\n return this._endBlockNode(Func);\n }\n optimize(n2 = 1) {\n while (n2-- > 0) {\n this._root.optimizeNodes();\n this._root.optimizeNames(this._root.names, this._constants);\n }\n }\n _leafNode(node) {\n this._currNode.nodes.push(node);\n return this;\n }\n _blockNode(node) {\n this._currNode.nodes.push(node);\n this._nodes.push(node);\n }\n _endBlockNode(N1, N22) {\n const n2 = this._currNode;\n if (n2 instanceof N1 || N22 && n2 instanceof N22) {\n this._nodes.pop();\n return this;\n }\n throw new Error(`CodeGen: not in block \"${N22 ? `${N1.kind}/${N22.kind}` : N1.kind}\"`);\n }\n _elseNode(node) {\n const n2 = this._currNode;\n if (!(n2 instanceof If)) {\n throw new Error('CodeGen: \"else\" without \"if\"');\n }\n this._currNode = n2.else = node;\n return this;\n }\n get _root() {\n return this._nodes[0];\n }\n get _currNode() {\n const ns = this._nodes;\n return ns[ns.length - 1];\n }\n set _currNode(node) {\n const ns = this._nodes;\n ns[ns.length - 1] = node;\n }\n };\n exports3.CodeGen = CodeGen;\n function addNames(names, from14) {\n for (const n2 in from14)\n names[n2] = (names[n2] || 0) + (from14[n2] || 0);\n return names;\n }\n function addExprNames(names, from14) {\n return from14 instanceof code_1._CodeOrName ? addNames(names, from14.names) : names;\n }\n function optimizeExpr(expr, names, constants) {\n if (expr instanceof code_1.Name)\n return replaceName(expr);\n if (!canOptimize(expr))\n return expr;\n return new code_1._Code(expr._items.reduce((items, c4) => {\n if (c4 instanceof code_1.Name)\n c4 = replaceName(c4);\n if (c4 instanceof code_1._Code)\n items.push(...c4._items);\n else\n items.push(c4);\n return items;\n }, []));\n function replaceName(n2) {\n const c4 = constants[n2.str];\n if (c4 === void 0 || names[n2.str] !== 1)\n return n2;\n delete names[n2.str];\n return c4;\n }\n function canOptimize(e2) {\n return e2 instanceof code_1._Code && e2._items.some((c4) => c4 instanceof code_1.Name && names[c4.str] === 1 && constants[c4.str] !== void 0);\n }\n }\n function subtractNames(names, from14) {\n for (const n2 in from14)\n names[n2] = (names[n2] || 0) - (from14[n2] || 0);\n }\n function not(x4) {\n return typeof x4 == \"boolean\" || typeof x4 == \"number\" || x4 === null ? !x4 : (0, code_1._)`!${par(x4)}`;\n }\n exports3.not = not;\n var andCode = mappend(exports3.operators.AND);\n function and(...args) {\n return args.reduce(andCode);\n }\n exports3.and = and;\n var orCode = mappend(exports3.operators.OR);\n function or(...args) {\n return args.reduce(orCode);\n }\n exports3.or = or;\n function mappend(op) {\n return (x4, y6) => x4 === code_1.nil ? y6 : y6 === code_1.nil ? x4 : (0, code_1._)`${par(x4)} ${op} ${par(y6)}`;\n }\n function par(x4) {\n return x4 instanceof code_1.Name ? x4 : (0, code_1._)`(${x4})`;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/util.js\n var require_util2 = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/util.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.checkStrictMode = exports3.getErrorPath = exports3.Type = exports3.useFunc = exports3.setEvaluated = exports3.evaluatedPropsToName = exports3.mergeEvaluated = exports3.eachItem = exports3.unescapeJsonPointer = exports3.escapeJsonPointer = exports3.escapeFragment = exports3.unescapeFragment = exports3.schemaRefOrVal = exports3.schemaHasRulesButRef = exports3.schemaHasRules = exports3.checkUnknownRules = exports3.alwaysValidSchema = exports3.toHash = void 0;\n var codegen_1 = require_codegen();\n var code_1 = require_code();\n function toHash(arr) {\n const hash3 = {};\n for (const item of arr)\n hash3[item] = true;\n return hash3;\n }\n exports3.toHash = toHash;\n function alwaysValidSchema(it, schema) {\n if (typeof schema == \"boolean\")\n return schema;\n if (Object.keys(schema).length === 0)\n return true;\n checkUnknownRules(it, schema);\n return !schemaHasRules(schema, it.self.RULES.all);\n }\n exports3.alwaysValidSchema = alwaysValidSchema;\n function checkUnknownRules(it, schema = it.schema) {\n const { opts, self: self2 } = it;\n if (!opts.strictSchema)\n return;\n if (typeof schema === \"boolean\")\n return;\n const rules = self2.RULES.keywords;\n for (const key in schema) {\n if (!rules[key])\n checkStrictMode(it, `unknown keyword: \"${key}\"`);\n }\n }\n exports3.checkUnknownRules = checkUnknownRules;\n function schemaHasRules(schema, rules) {\n if (typeof schema == \"boolean\")\n return !schema;\n for (const key in schema)\n if (rules[key])\n return true;\n return false;\n }\n exports3.schemaHasRules = schemaHasRules;\n function schemaHasRulesButRef(schema, RULES) {\n if (typeof schema == \"boolean\")\n return !schema;\n for (const key in schema)\n if (key !== \"$ref\" && RULES.all[key])\n return true;\n return false;\n }\n exports3.schemaHasRulesButRef = schemaHasRulesButRef;\n function schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) {\n if (!$data) {\n if (typeof schema == \"number\" || typeof schema == \"boolean\")\n return schema;\n if (typeof schema == \"string\")\n return (0, codegen_1._)`${schema}`;\n }\n return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;\n }\n exports3.schemaRefOrVal = schemaRefOrVal;\n function unescapeFragment(str) {\n return unescapeJsonPointer(decodeURIComponent(str));\n }\n exports3.unescapeFragment = unescapeFragment;\n function escapeFragment(str) {\n return encodeURIComponent(escapeJsonPointer(str));\n }\n exports3.escapeFragment = escapeFragment;\n function escapeJsonPointer(str) {\n if (typeof str == \"number\")\n return `${str}`;\n return str.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n }\n exports3.escapeJsonPointer = escapeJsonPointer;\n function unescapeJsonPointer(str) {\n return str.replace(/~1/g, \"/\").replace(/~0/g, \"~\");\n }\n exports3.unescapeJsonPointer = unescapeJsonPointer;\n function eachItem(xs, f7) {\n if (Array.isArray(xs)) {\n for (const x4 of xs)\n f7(x4);\n } else {\n f7(xs);\n }\n }\n exports3.eachItem = eachItem;\n function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues: mergeValues2, resultToName }) {\n return (gen2, from14, to, toName) => {\n const res = to === void 0 ? from14 : to instanceof codegen_1.Name ? (from14 instanceof codegen_1.Name ? mergeNames(gen2, from14, to) : mergeToName(gen2, from14, to), to) : from14 instanceof codegen_1.Name ? (mergeToName(gen2, to, from14), from14) : mergeValues2(from14, to);\n return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen2, res) : res;\n };\n }\n exports3.mergeEvaluated = {\n props: makeMergeEvaluated({\n mergeNames: (gen2, from14, to) => gen2.if((0, codegen_1._)`${to} !== true && ${from14} !== undefined`, () => {\n gen2.if((0, codegen_1._)`${from14} === true`, () => gen2.assign(to, true), () => gen2.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from14})`));\n }),\n mergeToName: (gen2, from14, to) => gen2.if((0, codegen_1._)`${to} !== true`, () => {\n if (from14 === true) {\n gen2.assign(to, true);\n } else {\n gen2.assign(to, (0, codegen_1._)`${to} || {}`);\n setEvaluated(gen2, to, from14);\n }\n }),\n mergeValues: (from14, to) => from14 === true ? true : { ...from14, ...to },\n resultToName: evaluatedPropsToName\n }),\n items: makeMergeEvaluated({\n mergeNames: (gen2, from14, to) => gen2.if((0, codegen_1._)`${to} !== true && ${from14} !== undefined`, () => gen2.assign(to, (0, codegen_1._)`${from14} === true ? true : ${to} > ${from14} ? ${to} : ${from14}`)),\n mergeToName: (gen2, from14, to) => gen2.if((0, codegen_1._)`${to} !== true`, () => gen2.assign(to, from14 === true ? true : (0, codegen_1._)`${to} > ${from14} ? ${to} : ${from14}`)),\n mergeValues: (from14, to) => from14 === true ? true : Math.max(from14, to),\n resultToName: (gen2, items) => gen2.var(\"items\", items)\n })\n };\n function evaluatedPropsToName(gen2, ps) {\n if (ps === true)\n return gen2.var(\"props\", true);\n const props = gen2.var(\"props\", (0, codegen_1._)`{}`);\n if (ps !== void 0)\n setEvaluated(gen2, props, ps);\n return props;\n }\n exports3.evaluatedPropsToName = evaluatedPropsToName;\n function setEvaluated(gen2, props, ps) {\n Object.keys(ps).forEach((p4) => gen2.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p4)}`, true));\n }\n exports3.setEvaluated = setEvaluated;\n var snippets = {};\n function useFunc(gen2, f7) {\n return gen2.scopeValue(\"func\", {\n ref: f7,\n code: snippets[f7.code] || (snippets[f7.code] = new code_1._Code(f7.code))\n });\n }\n exports3.useFunc = useFunc;\n var Type;\n (function(Type2) {\n Type2[Type2[\"Num\"] = 0] = \"Num\";\n Type2[Type2[\"Str\"] = 1] = \"Str\";\n })(Type || (exports3.Type = Type = {}));\n function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {\n if (dataProp instanceof codegen_1.Name) {\n const isNumber = dataPropType === Type.Num;\n return jsPropertySyntax ? isNumber ? (0, codegen_1._)`\"[\" + ${dataProp} + \"]\"` : (0, codegen_1._)`\"['\" + ${dataProp} + \"']\"` : isNumber ? (0, codegen_1._)`\"/\" + ${dataProp}` : (0, codegen_1._)`\"/\" + ${dataProp}.replace(/~/g, \"~0\").replace(/\\\\//g, \"~1\")`;\n }\n return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : \"/\" + escapeJsonPointer(dataProp);\n }\n exports3.getErrorPath = getErrorPath;\n function checkStrictMode(it, msg, mode = it.opts.strictSchema) {\n if (!mode)\n return;\n msg = `strict mode: ${msg}`;\n if (mode === true)\n throw new Error(msg);\n it.self.logger.warn(msg);\n }\n exports3.checkStrictMode = checkStrictMode;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/names.js\n var require_names = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/names.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var codegen_1 = require_codegen();\n var names = {\n // validation function arguments\n data: new codegen_1.Name(\"data\"),\n // data passed to validation function\n // args passed from referencing schema\n valCxt: new codegen_1.Name(\"valCxt\"),\n // validation/data context - should not be used directly, it is destructured to the names below\n instancePath: new codegen_1.Name(\"instancePath\"),\n parentData: new codegen_1.Name(\"parentData\"),\n parentDataProperty: new codegen_1.Name(\"parentDataProperty\"),\n rootData: new codegen_1.Name(\"rootData\"),\n // root data - same as the data passed to the first/top validation function\n dynamicAnchors: new codegen_1.Name(\"dynamicAnchors\"),\n // used to support recursiveRef and dynamicRef\n // function scoped variables\n vErrors: new codegen_1.Name(\"vErrors\"),\n // null or array of validation errors\n errors: new codegen_1.Name(\"errors\"),\n // counter of validation errors\n this: new codegen_1.Name(\"this\"),\n // \"globals\"\n self: new codegen_1.Name(\"self\"),\n scope: new codegen_1.Name(\"scope\"),\n // JTD serialize/parse name for JSON string and position\n json: new codegen_1.Name(\"json\"),\n jsonPos: new codegen_1.Name(\"jsonPos\"),\n jsonLen: new codegen_1.Name(\"jsonLen\"),\n jsonPart: new codegen_1.Name(\"jsonPart\")\n };\n exports3.default = names;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/errors.js\n var require_errors4 = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/errors.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.extendErrors = exports3.resetErrorsCount = exports3.reportExtraError = exports3.reportError = exports3.keyword$DataError = exports3.keywordError = void 0;\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n var names_1 = require_names();\n exports3.keywordError = {\n message: ({ keyword }) => (0, codegen_1.str)`must pass \"${keyword}\" keyword validation`\n };\n exports3.keyword$DataError = {\n message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`\"${keyword}\" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`\"${keyword}\" keyword is invalid ($data)`\n };\n function reportError(cxt, error = exports3.keywordError, errorPaths, overrideAllErrors) {\n const { it } = cxt;\n const { gen: gen2, compositeRule, allErrors } = it;\n const errObj = errorObjectCode(cxt, error, errorPaths);\n if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) {\n addError(gen2, errObj);\n } else {\n returnErrors(it, (0, codegen_1._)`[${errObj}]`);\n }\n }\n exports3.reportError = reportError;\n function reportExtraError(cxt, error = exports3.keywordError, errorPaths) {\n const { it } = cxt;\n const { gen: gen2, compositeRule, allErrors } = it;\n const errObj = errorObjectCode(cxt, error, errorPaths);\n addError(gen2, errObj);\n if (!(compositeRule || allErrors)) {\n returnErrors(it, names_1.default.vErrors);\n }\n }\n exports3.reportExtraError = reportExtraError;\n function resetErrorsCount(gen2, errsCount) {\n gen2.assign(names_1.default.errors, errsCount);\n gen2.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen2.if(errsCount, () => gen2.assign((0, codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen2.assign(names_1.default.vErrors, null)));\n }\n exports3.resetErrorsCount = resetErrorsCount;\n function extendErrors({ gen: gen2, keyword, schemaValue, data, errsCount, it }) {\n if (errsCount === void 0)\n throw new Error(\"ajv implementation error\");\n const err = gen2.name(\"err\");\n gen2.forRange(\"i\", errsCount, names_1.default.errors, (i3) => {\n gen2.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${i3}]`);\n gen2.if((0, codegen_1._)`${err}.instancePath === undefined`, () => gen2.assign((0, codegen_1._)`${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath)));\n gen2.assign((0, codegen_1._)`${err}.schemaPath`, (0, codegen_1.str)`${it.errSchemaPath}/${keyword}`);\n if (it.opts.verbose) {\n gen2.assign((0, codegen_1._)`${err}.schema`, schemaValue);\n gen2.assign((0, codegen_1._)`${err}.data`, data);\n }\n });\n }\n exports3.extendErrors = extendErrors;\n function addError(gen2, errObj) {\n const err = gen2.const(\"err\", errObj);\n gen2.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen2.assign(names_1.default.vErrors, (0, codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`);\n gen2.code((0, codegen_1._)`${names_1.default.errors}++`);\n }\n function returnErrors(it, errs) {\n const { gen: gen2, validateName, schemaEnv } = it;\n if (schemaEnv.$async) {\n gen2.throw((0, codegen_1._)`new ${it.ValidationError}(${errs})`);\n } else {\n gen2.assign((0, codegen_1._)`${validateName}.errors`, errs);\n gen2.return(false);\n }\n }\n var E2 = {\n keyword: new codegen_1.Name(\"keyword\"),\n schemaPath: new codegen_1.Name(\"schemaPath\"),\n // also used in JTD errors\n params: new codegen_1.Name(\"params\"),\n propertyName: new codegen_1.Name(\"propertyName\"),\n message: new codegen_1.Name(\"message\"),\n schema: new codegen_1.Name(\"schema\"),\n parentSchema: new codegen_1.Name(\"parentSchema\")\n };\n function errorObjectCode(cxt, error, errorPaths) {\n const { createErrors } = cxt.it;\n if (createErrors === false)\n return (0, codegen_1._)`{}`;\n return errorObject(cxt, error, errorPaths);\n }\n function errorObject(cxt, error, errorPaths = {}) {\n const { gen: gen2, it } = cxt;\n const keyValues = [\n errorInstancePath(it, errorPaths),\n errorSchemaPath(cxt, errorPaths)\n ];\n extraErrorProps(cxt, error, keyValues);\n return gen2.object(...keyValues);\n }\n function errorInstancePath({ errorPath }, { instancePath }) {\n const instPath = instancePath ? (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` : errorPath;\n return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)];\n }\n function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) {\n let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str)`${errSchemaPath}/${keyword}`;\n if (schemaPath) {\n schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;\n }\n return [E2.schemaPath, schPath];\n }\n function extraErrorProps(cxt, { params, message: message2 }, keyValues) {\n const { keyword, data, schemaValue, it } = cxt;\n const { opts, propertyName, topSchemaRef, schemaPath } = it;\n keyValues.push([E2.keyword, keyword], [E2.params, typeof params == \"function\" ? params(cxt) : params || (0, codegen_1._)`{}`]);\n if (opts.messages) {\n keyValues.push([E2.message, typeof message2 == \"function\" ? message2(cxt) : message2]);\n }\n if (opts.verbose) {\n keyValues.push([E2.schema, schemaValue], [E2.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]);\n }\n if (propertyName)\n keyValues.push([E2.propertyName, propertyName]);\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/boolSchema.js\n var require_boolSchema = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/boolSchema.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.boolOrEmptySchema = exports3.topBoolOrEmptySchema = void 0;\n var errors_1 = require_errors4();\n var codegen_1 = require_codegen();\n var names_1 = require_names();\n var boolError = {\n message: \"boolean schema is false\"\n };\n function topBoolOrEmptySchema(it) {\n const { gen: gen2, schema, validateName } = it;\n if (schema === false) {\n falseSchemaError(it, false);\n } else if (typeof schema == \"object\" && schema.$async === true) {\n gen2.return(names_1.default.data);\n } else {\n gen2.assign((0, codegen_1._)`${validateName}.errors`, null);\n gen2.return(true);\n }\n }\n exports3.topBoolOrEmptySchema = topBoolOrEmptySchema;\n function boolOrEmptySchema(it, valid) {\n const { gen: gen2, schema } = it;\n if (schema === false) {\n gen2.var(valid, false);\n falseSchemaError(it);\n } else {\n gen2.var(valid, true);\n }\n }\n exports3.boolOrEmptySchema = boolOrEmptySchema;\n function falseSchemaError(it, overrideAllErrors) {\n const { gen: gen2, data } = it;\n const cxt = {\n gen: gen2,\n keyword: \"false schema\",\n data,\n schema: false,\n schemaCode: false,\n schemaValue: false,\n params: {},\n it\n };\n (0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors);\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/rules.js\n var require_rules = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/rules.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getRules = exports3.isJSONType = void 0;\n var _jsonTypes = [\"string\", \"number\", \"integer\", \"boolean\", \"null\", \"object\", \"array\"];\n var jsonTypes = new Set(_jsonTypes);\n function isJSONType(x4) {\n return typeof x4 == \"string\" && jsonTypes.has(x4);\n }\n exports3.isJSONType = isJSONType;\n function getRules() {\n const groups = {\n number: { type: \"number\", rules: [] },\n string: { type: \"string\", rules: [] },\n array: { type: \"array\", rules: [] },\n object: { type: \"object\", rules: [] }\n };\n return {\n types: { ...groups, integer: true, boolean: true, null: true },\n rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object],\n post: { rules: [] },\n all: {},\n keywords: {}\n };\n }\n exports3.getRules = getRules;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/applicability.js\n var require_applicability = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/applicability.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.shouldUseRule = exports3.shouldUseGroup = exports3.schemaHasRulesForType = void 0;\n function schemaHasRulesForType({ schema, self: self2 }, type) {\n const group = self2.RULES.types[type];\n return group && group !== true && shouldUseGroup(schema, group);\n }\n exports3.schemaHasRulesForType = schemaHasRulesForType;\n function shouldUseGroup(schema, group) {\n return group.rules.some((rule) => shouldUseRule(schema, rule));\n }\n exports3.shouldUseGroup = shouldUseGroup;\n function shouldUseRule(schema, rule) {\n var _a;\n return schema[rule.keyword] !== void 0 || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== void 0));\n }\n exports3.shouldUseRule = shouldUseRule;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/dataType.js\n var require_dataType = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/dataType.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.reportTypeError = exports3.checkDataTypes = exports3.checkDataType = exports3.coerceAndCheckDataType = exports3.getJSONTypes = exports3.getSchemaTypes = exports3.DataType = void 0;\n var rules_1 = require_rules();\n var applicability_1 = require_applicability();\n var errors_1 = require_errors4();\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n var DataType;\n (function(DataType2) {\n DataType2[DataType2[\"Correct\"] = 0] = \"Correct\";\n DataType2[DataType2[\"Wrong\"] = 1] = \"Wrong\";\n })(DataType || (exports3.DataType = DataType = {}));\n function getSchemaTypes(schema) {\n const types2 = getJSONTypes(schema.type);\n const hasNull = types2.includes(\"null\");\n if (hasNull) {\n if (schema.nullable === false)\n throw new Error(\"type: null contradicts nullable: false\");\n } else {\n if (!types2.length && schema.nullable !== void 0) {\n throw new Error('\"nullable\" cannot be used without \"type\"');\n }\n if (schema.nullable === true)\n types2.push(\"null\");\n }\n return types2;\n }\n exports3.getSchemaTypes = getSchemaTypes;\n function getJSONTypes(ts) {\n const types2 = Array.isArray(ts) ? ts : ts ? [ts] : [];\n if (types2.every(rules_1.isJSONType))\n return types2;\n throw new Error(\"type must be JSONType or JSONType[]: \" + types2.join(\",\"));\n }\n exports3.getJSONTypes = getJSONTypes;\n function coerceAndCheckDataType(it, types2) {\n const { gen: gen2, data, opts } = it;\n const coerceTo = coerceToTypes(types2, opts.coerceTypes);\n const checkTypes = types2.length > 0 && !(coerceTo.length === 0 && types2.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types2[0]));\n if (checkTypes) {\n const wrongType = checkDataTypes(types2, data, opts.strictNumbers, DataType.Wrong);\n gen2.if(wrongType, () => {\n if (coerceTo.length)\n coerceData(it, types2, coerceTo);\n else\n reportTypeError(it);\n });\n }\n return checkTypes;\n }\n exports3.coerceAndCheckDataType = coerceAndCheckDataType;\n var COERCIBLE = /* @__PURE__ */ new Set([\"string\", \"number\", \"integer\", \"boolean\", \"null\"]);\n function coerceToTypes(types2, coerceTypes) {\n return coerceTypes ? types2.filter((t3) => COERCIBLE.has(t3) || coerceTypes === \"array\" && t3 === \"array\") : [];\n }\n function coerceData(it, types2, coerceTo) {\n const { gen: gen2, data, opts } = it;\n const dataType = gen2.let(\"dataType\", (0, codegen_1._)`typeof ${data}`);\n const coerced = gen2.let(\"coerced\", (0, codegen_1._)`undefined`);\n if (opts.coerceTypes === \"array\") {\n gen2.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen2.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types2, data, opts.strictNumbers), () => gen2.assign(coerced, data)));\n }\n gen2.if((0, codegen_1._)`${coerced} !== undefined`);\n for (const t3 of coerceTo) {\n if (COERCIBLE.has(t3) || t3 === \"array\" && opts.coerceTypes === \"array\") {\n coerceSpecificType(t3);\n }\n }\n gen2.else();\n reportTypeError(it);\n gen2.endIf();\n gen2.if((0, codegen_1._)`${coerced} !== undefined`, () => {\n gen2.assign(data, coerced);\n assignParentData(it, coerced);\n });\n function coerceSpecificType(t3) {\n switch (t3) {\n case \"string\":\n gen2.elseIf((0, codegen_1._)`${dataType} == \"number\" || ${dataType} == \"boolean\"`).assign(coerced, (0, codegen_1._)`\"\" + ${data}`).elseIf((0, codegen_1._)`${data} === null`).assign(coerced, (0, codegen_1._)`\"\"`);\n return;\n case \"number\":\n gen2.elseIf((0, codegen_1._)`${dataType} == \"boolean\" || ${data} === null\n || (${dataType} == \"string\" && ${data} && ${data} == +${data})`).assign(coerced, (0, codegen_1._)`+${data}`);\n return;\n case \"integer\":\n gen2.elseIf((0, codegen_1._)`${dataType} === \"boolean\" || ${data} === null\n || (${dataType} === \"string\" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced, (0, codegen_1._)`+${data}`);\n return;\n case \"boolean\":\n gen2.elseIf((0, codegen_1._)`${data} === \"false\" || ${data} === 0 || ${data} === null`).assign(coerced, false).elseIf((0, codegen_1._)`${data} === \"true\" || ${data} === 1`).assign(coerced, true);\n return;\n case \"null\":\n gen2.elseIf((0, codegen_1._)`${data} === \"\" || ${data} === 0 || ${data} === false`);\n gen2.assign(coerced, null);\n return;\n case \"array\":\n gen2.elseIf((0, codegen_1._)`${dataType} === \"string\" || ${dataType} === \"number\"\n || ${dataType} === \"boolean\" || ${data} === null`).assign(coerced, (0, codegen_1._)`[${data}]`);\n }\n }\n }\n function assignParentData({ gen: gen2, parentData, parentDataProperty }, expr) {\n gen2.if((0, codegen_1._)`${parentData} !== undefined`, () => gen2.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr));\n }\n function checkDataType(dataType, data, strictNums, correct = DataType.Correct) {\n const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;\n let cond;\n switch (dataType) {\n case \"null\":\n return (0, codegen_1._)`${data} ${EQ} null`;\n case \"array\":\n cond = (0, codegen_1._)`Array.isArray(${data})`;\n break;\n case \"object\":\n cond = (0, codegen_1._)`${data} && typeof ${data} == \"object\" && !Array.isArray(${data})`;\n break;\n case \"integer\":\n cond = numCond((0, codegen_1._)`!(${data} % 1) && !isNaN(${data})`);\n break;\n case \"number\":\n cond = numCond();\n break;\n default:\n return (0, codegen_1._)`typeof ${data} ${EQ} ${dataType}`;\n }\n return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond);\n function numCond(_cond = codegen_1.nil) {\n return (0, codegen_1.and)((0, codegen_1._)`typeof ${data} == \"number\"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data})` : codegen_1.nil);\n }\n }\n exports3.checkDataType = checkDataType;\n function checkDataTypes(dataTypes, data, strictNums, correct) {\n if (dataTypes.length === 1) {\n return checkDataType(dataTypes[0], data, strictNums, correct);\n }\n let cond;\n const types2 = (0, util_1.toHash)(dataTypes);\n if (types2.array && types2.object) {\n const notObj = (0, codegen_1._)`typeof ${data} != \"object\"`;\n cond = types2.null ? notObj : (0, codegen_1._)`!${data} || ${notObj}`;\n delete types2.null;\n delete types2.array;\n delete types2.object;\n } else {\n cond = codegen_1.nil;\n }\n if (types2.number)\n delete types2.integer;\n for (const t3 in types2)\n cond = (0, codegen_1.and)(cond, checkDataType(t3, data, strictNums, correct));\n return cond;\n }\n exports3.checkDataTypes = checkDataTypes;\n var typeError = {\n message: ({ schema }) => `must be ${schema}`,\n params: ({ schema, schemaValue }) => typeof schema == \"string\" ? (0, codegen_1._)`{type: ${schema}}` : (0, codegen_1._)`{type: ${schemaValue}}`\n };\n function reportTypeError(it) {\n const cxt = getTypeErrorContext(it);\n (0, errors_1.reportError)(cxt, typeError);\n }\n exports3.reportTypeError = reportTypeError;\n function getTypeErrorContext(it) {\n const { gen: gen2, data, schema } = it;\n const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, \"type\");\n return {\n gen: gen2,\n keyword: \"type\",\n data,\n schema: schema.type,\n schemaCode,\n schemaValue: schemaCode,\n parentSchema: schema,\n params: {},\n it\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/defaults.js\n var require_defaults = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/defaults.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.assignDefaults = void 0;\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n function assignDefaults(it, ty) {\n const { properties, items } = it.schema;\n if (ty === \"object\" && properties) {\n for (const key in properties) {\n assignDefault(it, key, properties[key].default);\n }\n } else if (ty === \"array\" && Array.isArray(items)) {\n items.forEach((sch, i3) => assignDefault(it, i3, sch.default));\n }\n }\n exports3.assignDefaults = assignDefaults;\n function assignDefault(it, prop, defaultValue) {\n const { gen: gen2, compositeRule, data, opts } = it;\n if (defaultValue === void 0)\n return;\n const childData = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(prop)}`;\n if (compositeRule) {\n (0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`);\n return;\n }\n let condition = (0, codegen_1._)`${childData} === undefined`;\n if (opts.useDefaults === \"empty\") {\n condition = (0, codegen_1._)`${condition} || ${childData} === null || ${childData} === \"\"`;\n }\n gen2.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`);\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/code.js\n var require_code2 = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/code.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.validateUnion = exports3.validateArray = exports3.usePattern = exports3.callValidateCode = exports3.schemaProperties = exports3.allSchemaProperties = exports3.noPropertyInData = exports3.propertyInData = exports3.isOwnProperty = exports3.hasPropFunc = exports3.reportMissingProp = exports3.checkMissingProp = exports3.checkReportMissingProp = void 0;\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n var names_1 = require_names();\n var util_2 = require_util2();\n function checkReportMissingProp(cxt, prop) {\n const { gen: gen2, data, it } = cxt;\n gen2.if(noPropertyInData(gen2, data, prop, it.opts.ownProperties), () => {\n cxt.setParams({ missingProperty: (0, codegen_1._)`${prop}` }, true);\n cxt.error();\n });\n }\n exports3.checkReportMissingProp = checkReportMissingProp;\n function checkMissingProp({ gen: gen2, data, it: { opts } }, properties, missing) {\n return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen2, data, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`)));\n }\n exports3.checkMissingProp = checkMissingProp;\n function reportMissingProp(cxt, missing) {\n cxt.setParams({ missingProperty: missing }, true);\n cxt.error();\n }\n exports3.reportMissingProp = reportMissingProp;\n function hasPropFunc(gen2) {\n return gen2.scopeValue(\"func\", {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n ref: Object.prototype.hasOwnProperty,\n code: (0, codegen_1._)`Object.prototype.hasOwnProperty`\n });\n }\n exports3.hasPropFunc = hasPropFunc;\n function isOwnProperty(gen2, data, property) {\n return (0, codegen_1._)`${hasPropFunc(gen2)}.call(${data}, ${property})`;\n }\n exports3.isOwnProperty = isOwnProperty;\n function propertyInData(gen2, data, property, ownProperties) {\n const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} !== undefined`;\n return ownProperties ? (0, codegen_1._)`${cond} && ${isOwnProperty(gen2, data, property)}` : cond;\n }\n exports3.propertyInData = propertyInData;\n function noPropertyInData(gen2, data, property, ownProperties) {\n const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} === undefined`;\n return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen2, data, property))) : cond;\n }\n exports3.noPropertyInData = noPropertyInData;\n function allSchemaProperties(schemaMap) {\n return schemaMap ? Object.keys(schemaMap).filter((p4) => p4 !== \"__proto__\") : [];\n }\n exports3.allSchemaProperties = allSchemaProperties;\n function schemaProperties(it, schemaMap) {\n return allSchemaProperties(schemaMap).filter((p4) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p4]));\n }\n exports3.schemaProperties = schemaProperties;\n function callValidateCode({ schemaCode, data, it: { gen: gen2, topSchemaRef, schemaPath, errorPath }, it }, func, context2, passSchema) {\n const dataAndSchema = passSchema ? (0, codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data;\n const valCxt = [\n [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)],\n [names_1.default.parentData, it.parentData],\n [names_1.default.parentDataProperty, it.parentDataProperty],\n [names_1.default.rootData, names_1.default.rootData]\n ];\n if (it.opts.dynamicRef)\n valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]);\n const args = (0, codegen_1._)`${dataAndSchema}, ${gen2.object(...valCxt)}`;\n return context2 !== codegen_1.nil ? (0, codegen_1._)`${func}.call(${context2}, ${args})` : (0, codegen_1._)`${func}(${args})`;\n }\n exports3.callValidateCode = callValidateCode;\n var newRegExp = (0, codegen_1._)`new RegExp`;\n function usePattern({ gen: gen2, it: { opts } }, pattern) {\n const u2 = opts.unicodeRegExp ? \"u\" : \"\";\n const { regExp } = opts.code;\n const rx = regExp(pattern, u2);\n return gen2.scopeValue(\"pattern\", {\n key: rx.toString(),\n ref: rx,\n code: (0, codegen_1._)`${regExp.code === \"new RegExp\" ? newRegExp : (0, util_2.useFunc)(gen2, regExp)}(${pattern}, ${u2})`\n });\n }\n exports3.usePattern = usePattern;\n function validateArray(cxt) {\n const { gen: gen2, data, keyword, it } = cxt;\n const valid = gen2.name(\"valid\");\n if (it.allErrors) {\n const validArr = gen2.let(\"valid\", true);\n validateItems(() => gen2.assign(validArr, false));\n return validArr;\n }\n gen2.var(valid, true);\n validateItems(() => gen2.break());\n return valid;\n function validateItems(notValid) {\n const len = gen2.const(\"len\", (0, codegen_1._)`${data}.length`);\n gen2.forRange(\"i\", 0, len, (i3) => {\n cxt.subschema({\n keyword,\n dataProp: i3,\n dataPropType: util_1.Type.Num\n }, valid);\n gen2.if((0, codegen_1.not)(valid), notValid);\n });\n }\n }\n exports3.validateArray = validateArray;\n function validateUnion(cxt) {\n const { gen: gen2, schema, keyword, it } = cxt;\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n const alwaysValid = schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch));\n if (alwaysValid && !it.opts.unevaluated)\n return;\n const valid = gen2.let(\"valid\", false);\n const schValid = gen2.name(\"_valid\");\n gen2.block(() => schema.forEach((_sch, i3) => {\n const schCxt = cxt.subschema({\n keyword,\n schemaProp: i3,\n compositeRule: true\n }, schValid);\n gen2.assign(valid, (0, codegen_1._)`${valid} || ${schValid}`);\n const merged = cxt.mergeValidEvaluated(schCxt, schValid);\n if (!merged)\n gen2.if((0, codegen_1.not)(valid));\n }));\n cxt.result(valid, () => cxt.reset(), () => cxt.error(true));\n }\n exports3.validateUnion = validateUnion;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/keyword.js\n var require_keyword = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/keyword.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.validateKeywordUsage = exports3.validSchemaType = exports3.funcKeywordCode = exports3.macroKeywordCode = void 0;\n var codegen_1 = require_codegen();\n var names_1 = require_names();\n var code_1 = require_code2();\n var errors_1 = require_errors4();\n function macroKeywordCode(cxt, def) {\n const { gen: gen2, keyword, schema, parentSchema, it } = cxt;\n const macroSchema = def.macro.call(it.self, schema, parentSchema, it);\n const schemaRef = useKeyword(gen2, keyword, macroSchema);\n if (it.opts.validateSchema !== false)\n it.self.validateSchema(macroSchema, true);\n const valid = gen2.name(\"valid\");\n cxt.subschema({\n schema: macroSchema,\n schemaPath: codegen_1.nil,\n errSchemaPath: `${it.errSchemaPath}/${keyword}`,\n topSchemaRef: schemaRef,\n compositeRule: true\n }, valid);\n cxt.pass(valid, () => cxt.error(true));\n }\n exports3.macroKeywordCode = macroKeywordCode;\n function funcKeywordCode(cxt, def) {\n var _a;\n const { gen: gen2, keyword, schema, parentSchema, $data, it } = cxt;\n checkAsyncKeyword(it, def);\n const validate7 = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;\n const validateRef = useKeyword(gen2, keyword, validate7);\n const valid = gen2.let(\"valid\");\n cxt.block$data(valid, validateKeyword);\n cxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid);\n function validateKeyword() {\n if (def.errors === false) {\n assignValid();\n if (def.modifying)\n modifyData(cxt);\n reportErrs(() => cxt.error());\n } else {\n const ruleErrs = def.async ? validateAsync() : validateSync();\n if (def.modifying)\n modifyData(cxt);\n reportErrs(() => addErrs(cxt, ruleErrs));\n }\n }\n function validateAsync() {\n const ruleErrs = gen2.let(\"ruleErrs\", null);\n gen2.try(() => assignValid((0, codegen_1._)`await `), (e2) => gen2.assign(valid, false).if((0, codegen_1._)`${e2} instanceof ${it.ValidationError}`, () => gen2.assign(ruleErrs, (0, codegen_1._)`${e2}.errors`), () => gen2.throw(e2)));\n return ruleErrs;\n }\n function validateSync() {\n const validateErrs = (0, codegen_1._)`${validateRef}.errors`;\n gen2.assign(validateErrs, null);\n assignValid(codegen_1.nil);\n return validateErrs;\n }\n function assignValid(_await = def.async ? (0, codegen_1._)`await ` : codegen_1.nil) {\n const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self;\n const passSchema = !(\"compile\" in def && !$data || def.schema === false);\n gen2.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);\n }\n function reportErrs(errors) {\n var _a2;\n gen2.if((0, codegen_1.not)((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid), errors);\n }\n }\n exports3.funcKeywordCode = funcKeywordCode;\n function modifyData(cxt) {\n const { gen: gen2, data, it } = cxt;\n gen2.if(it.parentData, () => gen2.assign(data, (0, codegen_1._)`${it.parentData}[${it.parentDataProperty}]`));\n }\n function addErrs(cxt, errs) {\n const { gen: gen2 } = cxt;\n gen2.if((0, codegen_1._)`Array.isArray(${errs})`, () => {\n gen2.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);\n (0, errors_1.extendErrors)(cxt);\n }, () => cxt.error());\n }\n function checkAsyncKeyword({ schemaEnv }, def) {\n if (def.async && !schemaEnv.$async)\n throw new Error(\"async keyword in sync schema\");\n }\n function useKeyword(gen2, keyword, result) {\n if (result === void 0)\n throw new Error(`keyword \"${keyword}\" failed to compile`);\n return gen2.scopeValue(\"keyword\", typeof result == \"function\" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) });\n }\n function validSchemaType(schema, schemaType, allowUndefined = false) {\n return !schemaType.length || schemaType.some((st) => st === \"array\" ? Array.isArray(schema) : st === \"object\" ? schema && typeof schema == \"object\" && !Array.isArray(schema) : typeof schema == st || allowUndefined && typeof schema == \"undefined\");\n }\n exports3.validSchemaType = validSchemaType;\n function validateKeywordUsage({ schema, opts, self: self2, errSchemaPath }, def, keyword) {\n if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) {\n throw new Error(\"ajv implementation error\");\n }\n const deps = def.dependencies;\n if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) {\n throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(\",\")}`);\n }\n if (def.validateSchema) {\n const valid = def.validateSchema(schema[keyword]);\n if (!valid) {\n const msg = `keyword \"${keyword}\" value is invalid at path \"${errSchemaPath}\": ` + self2.errorsText(def.validateSchema.errors);\n if (opts.validateSchema === \"log\")\n self2.logger.error(msg);\n else\n throw new Error(msg);\n }\n }\n }\n exports3.validateKeywordUsage = validateKeywordUsage;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/subschema.js\n var require_subschema = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/subschema.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.extendSubschemaMode = exports3.extendSubschemaData = exports3.getSubschema = void 0;\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n function getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {\n if (keyword !== void 0 && schema !== void 0) {\n throw new Error('both \"keyword\" and \"schema\" passed, only one allowed');\n }\n if (keyword !== void 0) {\n const sch = it.schema[keyword];\n return schemaProp === void 0 ? {\n schema: sch,\n schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`,\n errSchemaPath: `${it.errSchemaPath}/${keyword}`\n } : {\n schema: sch[schemaProp],\n schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`,\n errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`\n };\n }\n if (schema !== void 0) {\n if (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) {\n throw new Error('\"schemaPath\", \"errSchemaPath\" and \"topSchemaRef\" are required with \"schema\"');\n }\n return {\n schema,\n schemaPath,\n topSchemaRef,\n errSchemaPath\n };\n }\n throw new Error('either \"keyword\" or \"schema\" must be passed');\n }\n exports3.getSubschema = getSubschema;\n function extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {\n if (data !== void 0 && dataProp !== void 0) {\n throw new Error('both \"data\" and \"dataProp\" passed, only one allowed');\n }\n const { gen: gen2 } = it;\n if (dataProp !== void 0) {\n const { errorPath, dataPathArr, opts } = it;\n const nextData = gen2.let(\"data\", (0, codegen_1._)`${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true);\n dataContextProps(nextData);\n subschema.errorPath = (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`;\n subschema.parentDataProperty = (0, codegen_1._)`${dataProp}`;\n subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty];\n }\n if (data !== void 0) {\n const nextData = data instanceof codegen_1.Name ? data : gen2.let(\"data\", data, true);\n dataContextProps(nextData);\n if (propertyName !== void 0)\n subschema.propertyName = propertyName;\n }\n if (dataTypes)\n subschema.dataTypes = dataTypes;\n function dataContextProps(_nextData) {\n subschema.data = _nextData;\n subschema.dataLevel = it.dataLevel + 1;\n subschema.dataTypes = [];\n it.definedProperties = /* @__PURE__ */ new Set();\n subschema.parentData = it.data;\n subschema.dataNames = [...it.dataNames, _nextData];\n }\n }\n exports3.extendSubschemaData = extendSubschemaData;\n function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {\n if (compositeRule !== void 0)\n subschema.compositeRule = compositeRule;\n if (createErrors !== void 0)\n subschema.createErrors = createErrors;\n if (allErrors !== void 0)\n subschema.allErrors = allErrors;\n subschema.jtdDiscriminator = jtdDiscriminator;\n subschema.jtdMetadata = jtdMetadata;\n }\n exports3.extendSubschemaMode = extendSubschemaMode;\n }\n });\n\n // ../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js\n var require_fast_deep_equal = __commonJS({\n \"../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n module.exports = function equal(a3, b4) {\n if (a3 === b4)\n return true;\n if (a3 && b4 && typeof a3 == \"object\" && typeof b4 == \"object\") {\n if (a3.constructor !== b4.constructor)\n return false;\n var length, i3, keys;\n if (Array.isArray(a3)) {\n length = a3.length;\n if (length != b4.length)\n return false;\n for (i3 = length; i3-- !== 0; )\n if (!equal(a3[i3], b4[i3]))\n return false;\n return true;\n }\n if (a3.constructor === RegExp)\n return a3.source === b4.source && a3.flags === b4.flags;\n if (a3.valueOf !== Object.prototype.valueOf)\n return a3.valueOf() === b4.valueOf();\n if (a3.toString !== Object.prototype.toString)\n return a3.toString() === b4.toString();\n keys = Object.keys(a3);\n length = keys.length;\n if (length !== Object.keys(b4).length)\n return false;\n for (i3 = length; i3-- !== 0; )\n if (!Object.prototype.hasOwnProperty.call(b4, keys[i3]))\n return false;\n for (i3 = length; i3-- !== 0; ) {\n var key = keys[i3];\n if (!equal(a3[key], b4[key]))\n return false;\n }\n return true;\n }\n return a3 !== a3 && b4 !== b4;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js\n var require_json_schema_traverse = __commonJS({\n \"../../../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var traverse = module.exports = function(schema, opts, cb) {\n if (typeof opts == \"function\") {\n cb = opts;\n opts = {};\n }\n cb = opts.cb || cb;\n var pre = typeof cb == \"function\" ? cb : cb.pre || function() {\n };\n var post = cb.post || function() {\n };\n _traverse(opts, pre, post, schema, \"\", schema);\n };\n traverse.keywords = {\n additionalItems: true,\n items: true,\n contains: true,\n additionalProperties: true,\n propertyNames: true,\n not: true,\n if: true,\n then: true,\n else: true\n };\n traverse.arrayKeywords = {\n items: true,\n allOf: true,\n anyOf: true,\n oneOf: true\n };\n traverse.propsKeywords = {\n $defs: true,\n definitions: true,\n properties: true,\n patternProperties: true,\n dependencies: true\n };\n traverse.skipKeywords = {\n default: true,\n enum: true,\n const: true,\n required: true,\n maximum: true,\n minimum: true,\n exclusiveMaximum: true,\n exclusiveMinimum: true,\n multipleOf: true,\n maxLength: true,\n minLength: true,\n pattern: true,\n format: true,\n maxItems: true,\n minItems: true,\n uniqueItems: true,\n maxProperties: true,\n minProperties: true\n };\n function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {\n if (schema && typeof schema == \"object\" && !Array.isArray(schema)) {\n pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);\n for (var key in schema) {\n var sch = schema[key];\n if (Array.isArray(sch)) {\n if (key in traverse.arrayKeywords) {\n for (var i3 = 0; i3 < sch.length; i3++)\n _traverse(opts, pre, post, sch[i3], jsonPtr + \"/\" + key + \"/\" + i3, rootSchema, jsonPtr, key, schema, i3);\n }\n } else if (key in traverse.propsKeywords) {\n if (sch && typeof sch == \"object\") {\n for (var prop in sch)\n _traverse(opts, pre, post, sch[prop], jsonPtr + \"/\" + key + \"/\" + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);\n }\n } else if (key in traverse.keywords || opts.allKeys && !(key in traverse.skipKeywords)) {\n _traverse(opts, pre, post, sch, jsonPtr + \"/\" + key, rootSchema, jsonPtr, key, schema);\n }\n }\n post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);\n }\n }\n function escapeJsonPtr(str) {\n return str.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/resolve.js\n var require_resolve = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/resolve.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getSchemaRefs = exports3.resolveUrl = exports3.normalizeId = exports3._getFullPath = exports3.getFullPath = exports3.inlineRef = void 0;\n var util_1 = require_util2();\n var equal = require_fast_deep_equal();\n var traverse = require_json_schema_traverse();\n var SIMPLE_INLINED = /* @__PURE__ */ new Set([\n \"type\",\n \"format\",\n \"pattern\",\n \"maxLength\",\n \"minLength\",\n \"maxProperties\",\n \"minProperties\",\n \"maxItems\",\n \"minItems\",\n \"maximum\",\n \"minimum\",\n \"uniqueItems\",\n \"multipleOf\",\n \"required\",\n \"enum\",\n \"const\"\n ]);\n function inlineRef(schema, limit = true) {\n if (typeof schema == \"boolean\")\n return true;\n if (limit === true)\n return !hasRef(schema);\n if (!limit)\n return false;\n return countKeys(schema) <= limit;\n }\n exports3.inlineRef = inlineRef;\n var REF_KEYWORDS = /* @__PURE__ */ new Set([\n \"$ref\",\n \"$recursiveRef\",\n \"$recursiveAnchor\",\n \"$dynamicRef\",\n \"$dynamicAnchor\"\n ]);\n function hasRef(schema) {\n for (const key in schema) {\n if (REF_KEYWORDS.has(key))\n return true;\n const sch = schema[key];\n if (Array.isArray(sch) && sch.some(hasRef))\n return true;\n if (typeof sch == \"object\" && hasRef(sch))\n return true;\n }\n return false;\n }\n function countKeys(schema) {\n let count = 0;\n for (const key in schema) {\n if (key === \"$ref\")\n return Infinity;\n count++;\n if (SIMPLE_INLINED.has(key))\n continue;\n if (typeof schema[key] == \"object\") {\n (0, util_1.eachItem)(schema[key], (sch) => count += countKeys(sch));\n }\n if (count === Infinity)\n return Infinity;\n }\n return count;\n }\n function getFullPath(resolver, id = \"\", normalize2) {\n if (normalize2 !== false)\n id = normalizeId(id);\n const p4 = resolver.parse(id);\n return _getFullPath(resolver, p4);\n }\n exports3.getFullPath = getFullPath;\n function _getFullPath(resolver, p4) {\n const serialized = resolver.serialize(p4);\n return serialized.split(\"#\")[0] + \"#\";\n }\n exports3._getFullPath = _getFullPath;\n var TRAILING_SLASH_HASH = /#\\/?$/;\n function normalizeId(id) {\n return id ? id.replace(TRAILING_SLASH_HASH, \"\") : \"\";\n }\n exports3.normalizeId = normalizeId;\n function resolveUrl(resolver, baseId, id) {\n id = normalizeId(id);\n return resolver.resolve(baseId, id);\n }\n exports3.resolveUrl = resolveUrl;\n var ANCHOR = /^[a-z_][-a-z0-9._]*$/i;\n function getSchemaRefs(schema, baseId) {\n if (typeof schema == \"boolean\")\n return {};\n const { schemaId, uriResolver } = this.opts;\n const schId = normalizeId(schema[schemaId] || baseId);\n const baseIds = { \"\": schId };\n const pathPrefix = getFullPath(uriResolver, schId, false);\n const localRefs = {};\n const schemaRefs = /* @__PURE__ */ new Set();\n traverse(schema, { allKeys: true }, (sch, jsonPtr, _2, parentJsonPtr) => {\n if (parentJsonPtr === void 0)\n return;\n const fullPath = pathPrefix + jsonPtr;\n let innerBaseId = baseIds[parentJsonPtr];\n if (typeof sch[schemaId] == \"string\")\n innerBaseId = addRef.call(this, sch[schemaId]);\n addAnchor.call(this, sch.$anchor);\n addAnchor.call(this, sch.$dynamicAnchor);\n baseIds[jsonPtr] = innerBaseId;\n function addRef(ref) {\n const _resolve = this.opts.uriResolver.resolve;\n ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref);\n if (schemaRefs.has(ref))\n throw ambiguos(ref);\n schemaRefs.add(ref);\n let schOrRef = this.refs[ref];\n if (typeof schOrRef == \"string\")\n schOrRef = this.refs[schOrRef];\n if (typeof schOrRef == \"object\") {\n checkAmbiguosRef(sch, schOrRef.schema, ref);\n } else if (ref !== normalizeId(fullPath)) {\n if (ref[0] === \"#\") {\n checkAmbiguosRef(sch, localRefs[ref], ref);\n localRefs[ref] = sch;\n } else {\n this.refs[ref] = fullPath;\n }\n }\n return ref;\n }\n function addAnchor(anchor) {\n if (typeof anchor == \"string\") {\n if (!ANCHOR.test(anchor))\n throw new Error(`invalid anchor \"${anchor}\"`);\n addRef.call(this, `#${anchor}`);\n }\n }\n });\n return localRefs;\n function checkAmbiguosRef(sch1, sch2, ref) {\n if (sch2 !== void 0 && !equal(sch1, sch2))\n throw ambiguos(ref);\n }\n function ambiguos(ref) {\n return new Error(`reference \"${ref}\" resolves to more than one schema`);\n }\n }\n exports3.getSchemaRefs = getSchemaRefs;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/index.js\n var require_validate = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/validate/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getData = exports3.KeywordCxt = exports3.validateFunctionCode = void 0;\n var boolSchema_1 = require_boolSchema();\n var dataType_1 = require_dataType();\n var applicability_1 = require_applicability();\n var dataType_2 = require_dataType();\n var defaults_1 = require_defaults();\n var keyword_1 = require_keyword();\n var subschema_1 = require_subschema();\n var codegen_1 = require_codegen();\n var names_1 = require_names();\n var resolve_1 = require_resolve();\n var util_1 = require_util2();\n var errors_1 = require_errors4();\n function validateFunctionCode(it) {\n if (isSchemaObj(it)) {\n checkKeywords(it);\n if (schemaCxtHasRules(it)) {\n topSchemaObjCode(it);\n return;\n }\n }\n validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));\n }\n exports3.validateFunctionCode = validateFunctionCode;\n function validateFunction({ gen: gen2, validateName, schema, schemaEnv, opts }, body) {\n if (opts.code.es5) {\n gen2.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {\n gen2.code((0, codegen_1._)`\"use strict\"; ${funcSourceUrl(schema, opts)}`);\n destructureValCxtES5(gen2, opts);\n gen2.code(body);\n });\n } else {\n gen2.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen2.code(funcSourceUrl(schema, opts)).code(body));\n }\n }\n function destructureValCxt(opts) {\n return (0, codegen_1._)`{${names_1.default.instancePath}=\"\", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._)`, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`;\n }\n function destructureValCxtES5(gen2, opts) {\n gen2.if(names_1.default.valCxt, () => {\n gen2.var(names_1.default.instancePath, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`);\n gen2.var(names_1.default.parentData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`);\n gen2.var(names_1.default.parentDataProperty, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`);\n gen2.var(names_1.default.rootData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.rootData}`);\n if (opts.dynamicRef)\n gen2.var(names_1.default.dynamicAnchors, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`);\n }, () => {\n gen2.var(names_1.default.instancePath, (0, codegen_1._)`\"\"`);\n gen2.var(names_1.default.parentData, (0, codegen_1._)`undefined`);\n gen2.var(names_1.default.parentDataProperty, (0, codegen_1._)`undefined`);\n gen2.var(names_1.default.rootData, names_1.default.data);\n if (opts.dynamicRef)\n gen2.var(names_1.default.dynamicAnchors, (0, codegen_1._)`{}`);\n });\n }\n function topSchemaObjCode(it) {\n const { schema, opts, gen: gen2 } = it;\n validateFunction(it, () => {\n if (opts.$comment && schema.$comment)\n commentKeyword(it);\n checkNoDefault(it);\n gen2.let(names_1.default.vErrors, null);\n gen2.let(names_1.default.errors, 0);\n if (opts.unevaluated)\n resetEvaluated(it);\n typeAndKeywords(it);\n returnResults(it);\n });\n return;\n }\n function resetEvaluated(it) {\n const { gen: gen2, validateName } = it;\n it.evaluated = gen2.const(\"evaluated\", (0, codegen_1._)`${validateName}.evaluated`);\n gen2.if((0, codegen_1._)`${it.evaluated}.dynamicProps`, () => gen2.assign((0, codegen_1._)`${it.evaluated}.props`, (0, codegen_1._)`undefined`));\n gen2.if((0, codegen_1._)`${it.evaluated}.dynamicItems`, () => gen2.assign((0, codegen_1._)`${it.evaluated}.items`, (0, codegen_1._)`undefined`));\n }\n function funcSourceUrl(schema, opts) {\n const schId = typeof schema == \"object\" && schema[opts.schemaId];\n return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._)`/*# sourceURL=${schId} */` : codegen_1.nil;\n }\n function subschemaCode(it, valid) {\n if (isSchemaObj(it)) {\n checkKeywords(it);\n if (schemaCxtHasRules(it)) {\n subSchemaObjCode(it, valid);\n return;\n }\n }\n (0, boolSchema_1.boolOrEmptySchema)(it, valid);\n }\n function schemaCxtHasRules({ schema, self: self2 }) {\n if (typeof schema == \"boolean\")\n return !schema;\n for (const key in schema)\n if (self2.RULES.all[key])\n return true;\n return false;\n }\n function isSchemaObj(it) {\n return typeof it.schema != \"boolean\";\n }\n function subSchemaObjCode(it, valid) {\n const { schema, gen: gen2, opts } = it;\n if (opts.$comment && schema.$comment)\n commentKeyword(it);\n updateContext(it);\n checkAsyncSchema(it);\n const errsCount = gen2.const(\"_errs\", names_1.default.errors);\n typeAndKeywords(it, errsCount);\n gen2.var(valid, (0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);\n }\n function checkKeywords(it) {\n (0, util_1.checkUnknownRules)(it);\n checkRefsAndKeywords(it);\n }\n function typeAndKeywords(it, errsCount) {\n if (it.opts.jtd)\n return schemaKeywords(it, [], false, errsCount);\n const types2 = (0, dataType_1.getSchemaTypes)(it.schema);\n const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it, types2);\n schemaKeywords(it, types2, !checkedTypes, errsCount);\n }\n function checkRefsAndKeywords(it) {\n const { schema, errSchemaPath, opts, self: self2 } = it;\n if (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self2.RULES)) {\n self2.logger.warn(`$ref: keywords ignored in schema at path \"${errSchemaPath}\"`);\n }\n }\n function checkNoDefault(it) {\n const { schema, opts } = it;\n if (schema.default !== void 0 && opts.useDefaults && opts.strictSchema) {\n (0, util_1.checkStrictMode)(it, \"default is ignored in the schema root\");\n }\n }\n function updateContext(it) {\n const schId = it.schema[it.opts.schemaId];\n if (schId)\n it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId);\n }\n function checkAsyncSchema(it) {\n if (it.schema.$async && !it.schemaEnv.$async)\n throw new Error(\"async schema in sync schema\");\n }\n function commentKeyword({ gen: gen2, schemaEnv, schema, errSchemaPath, opts }) {\n const msg = schema.$comment;\n if (opts.$comment === true) {\n gen2.code((0, codegen_1._)`${names_1.default.self}.logger.log(${msg})`);\n } else if (typeof opts.$comment == \"function\") {\n const schemaPath = (0, codegen_1.str)`${errSchemaPath}/$comment`;\n const rootName = gen2.scopeValue(\"root\", { ref: schemaEnv.root });\n gen2.code((0, codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`);\n }\n }\n function returnResults(it) {\n const { gen: gen2, schemaEnv, validateName, ValidationError, opts } = it;\n if (schemaEnv.$async) {\n gen2.if((0, codegen_1._)`${names_1.default.errors} === 0`, () => gen2.return(names_1.default.data), () => gen2.throw((0, codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`));\n } else {\n gen2.assign((0, codegen_1._)`${validateName}.errors`, names_1.default.vErrors);\n if (opts.unevaluated)\n assignEvaluated(it);\n gen2.return((0, codegen_1._)`${names_1.default.errors} === 0`);\n }\n }\n function assignEvaluated({ gen: gen2, evaluated, props, items }) {\n if (props instanceof codegen_1.Name)\n gen2.assign((0, codegen_1._)`${evaluated}.props`, props);\n if (items instanceof codegen_1.Name)\n gen2.assign((0, codegen_1._)`${evaluated}.items`, items);\n }\n function schemaKeywords(it, types2, typeErrors, errsCount) {\n const { gen: gen2, schema, data, allErrors, opts, self: self2 } = it;\n const { RULES } = self2;\n if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) {\n gen2.block(() => keywordCode(it, \"$ref\", RULES.all.$ref.definition));\n return;\n }\n if (!opts.jtd)\n checkStrictTypes(it, types2);\n gen2.block(() => {\n for (const group of RULES.rules)\n groupKeywords(group);\n groupKeywords(RULES.post);\n });\n function groupKeywords(group) {\n if (!(0, applicability_1.shouldUseGroup)(schema, group))\n return;\n if (group.type) {\n gen2.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers));\n iterateKeywords(it, group);\n if (types2.length === 1 && types2[0] === group.type && typeErrors) {\n gen2.else();\n (0, dataType_2.reportTypeError)(it);\n }\n gen2.endIf();\n } else {\n iterateKeywords(it, group);\n }\n if (!allErrors)\n gen2.if((0, codegen_1._)`${names_1.default.errors} === ${errsCount || 0}`);\n }\n }\n function iterateKeywords(it, group) {\n const { gen: gen2, schema, opts: { useDefaults } } = it;\n if (useDefaults)\n (0, defaults_1.assignDefaults)(it, group.type);\n gen2.block(() => {\n for (const rule of group.rules) {\n if ((0, applicability_1.shouldUseRule)(schema, rule)) {\n keywordCode(it, rule.keyword, rule.definition, group.type);\n }\n }\n });\n }\n function checkStrictTypes(it, types2) {\n if (it.schemaEnv.meta || !it.opts.strictTypes)\n return;\n checkContextTypes(it, types2);\n if (!it.opts.allowUnionTypes)\n checkMultipleTypes(it, types2);\n checkKeywordTypes(it, it.dataTypes);\n }\n function checkContextTypes(it, types2) {\n if (!types2.length)\n return;\n if (!it.dataTypes.length) {\n it.dataTypes = types2;\n return;\n }\n types2.forEach((t3) => {\n if (!includesType(it.dataTypes, t3)) {\n strictTypesError(it, `type \"${t3}\" not allowed by context \"${it.dataTypes.join(\",\")}\"`);\n }\n });\n narrowSchemaTypes(it, types2);\n }\n function checkMultipleTypes(it, ts) {\n if (ts.length > 1 && !(ts.length === 2 && ts.includes(\"null\"))) {\n strictTypesError(it, \"use allowUnionTypes to allow union type keyword\");\n }\n }\n function checkKeywordTypes(it, ts) {\n const rules = it.self.RULES.all;\n for (const keyword in rules) {\n const rule = rules[keyword];\n if (typeof rule == \"object\" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {\n const { type } = rule.definition;\n if (type.length && !type.some((t3) => hasApplicableType(ts, t3))) {\n strictTypesError(it, `missing type \"${type.join(\",\")}\" for keyword \"${keyword}\"`);\n }\n }\n }\n }\n function hasApplicableType(schTs, kwdT) {\n return schTs.includes(kwdT) || kwdT === \"number\" && schTs.includes(\"integer\");\n }\n function includesType(ts, t3) {\n return ts.includes(t3) || t3 === \"integer\" && ts.includes(\"number\");\n }\n function narrowSchemaTypes(it, withTypes) {\n const ts = [];\n for (const t3 of it.dataTypes) {\n if (includesType(withTypes, t3))\n ts.push(t3);\n else if (withTypes.includes(\"integer\") && t3 === \"number\")\n ts.push(\"integer\");\n }\n it.dataTypes = ts;\n }\n function strictTypesError(it, msg) {\n const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;\n msg += ` at \"${schemaPath}\" (strictTypes)`;\n (0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes);\n }\n var KeywordCxt = class {\n constructor(it, def, keyword) {\n (0, keyword_1.validateKeywordUsage)(it, def, keyword);\n this.gen = it.gen;\n this.allErrors = it.allErrors;\n this.keyword = keyword;\n this.data = it.data;\n this.schema = it.schema[keyword];\n this.$data = def.$data && it.opts.$data && this.schema && this.schema.$data;\n this.schemaValue = (0, util_1.schemaRefOrVal)(it, this.schema, keyword, this.$data);\n this.schemaType = def.schemaType;\n this.parentSchema = it.schema;\n this.params = {};\n this.it = it;\n this.def = def;\n if (this.$data) {\n this.schemaCode = it.gen.const(\"vSchema\", getData(this.$data, it));\n } else {\n this.schemaCode = this.schemaValue;\n if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) {\n throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`);\n }\n }\n if (\"code\" in def ? def.trackErrors : def.errors !== false) {\n this.errsCount = it.gen.const(\"_errs\", names_1.default.errors);\n }\n }\n result(condition, successAction, failAction) {\n this.failResult((0, codegen_1.not)(condition), successAction, failAction);\n }\n failResult(condition, successAction, failAction) {\n this.gen.if(condition);\n if (failAction)\n failAction();\n else\n this.error();\n if (successAction) {\n this.gen.else();\n successAction();\n if (this.allErrors)\n this.gen.endIf();\n } else {\n if (this.allErrors)\n this.gen.endIf();\n else\n this.gen.else();\n }\n }\n pass(condition, failAction) {\n this.failResult((0, codegen_1.not)(condition), void 0, failAction);\n }\n fail(condition) {\n if (condition === void 0) {\n this.error();\n if (!this.allErrors)\n this.gen.if(false);\n return;\n }\n this.gen.if(condition);\n this.error();\n if (this.allErrors)\n this.gen.endIf();\n else\n this.gen.else();\n }\n fail$data(condition) {\n if (!this.$data)\n return this.fail(condition);\n const { schemaCode } = this;\n this.fail((0, codegen_1._)`${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`);\n }\n error(append, errorParams, errorPaths) {\n if (errorParams) {\n this.setParams(errorParams);\n this._error(append, errorPaths);\n this.setParams({});\n return;\n }\n this._error(append, errorPaths);\n }\n _error(append, errorPaths) {\n ;\n (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths);\n }\n $dataError() {\n (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError);\n }\n reset() {\n if (this.errsCount === void 0)\n throw new Error('add \"trackErrors\" to keyword definition');\n (0, errors_1.resetErrorsCount)(this.gen, this.errsCount);\n }\n ok(cond) {\n if (!this.allErrors)\n this.gen.if(cond);\n }\n setParams(obj, assign) {\n if (assign)\n Object.assign(this.params, obj);\n else\n this.params = obj;\n }\n block$data(valid, codeBlock, $dataValid = codegen_1.nil) {\n this.gen.block(() => {\n this.check$data(valid, $dataValid);\n codeBlock();\n });\n }\n check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) {\n if (!this.$data)\n return;\n const { gen: gen2, schemaCode, schemaType, def } = this;\n gen2.if((0, codegen_1.or)((0, codegen_1._)`${schemaCode} === undefined`, $dataValid));\n if (valid !== codegen_1.nil)\n gen2.assign(valid, true);\n if (schemaType.length || def.validateSchema) {\n gen2.elseIf(this.invalid$data());\n this.$dataError();\n if (valid !== codegen_1.nil)\n gen2.assign(valid, false);\n }\n gen2.else();\n }\n invalid$data() {\n const { gen: gen2, schemaCode, schemaType, def, it } = this;\n return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema());\n function wrong$DataType() {\n if (schemaType.length) {\n if (!(schemaCode instanceof codegen_1.Name))\n throw new Error(\"ajv implementation error\");\n const st = Array.isArray(schemaType) ? schemaType : [schemaType];\n return (0, codegen_1._)`${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`;\n }\n return codegen_1.nil;\n }\n function invalid$DataSchema() {\n if (def.validateSchema) {\n const validateSchemaRef = gen2.scopeValue(\"validate$data\", { ref: def.validateSchema });\n return (0, codegen_1._)`!${validateSchemaRef}(${schemaCode})`;\n }\n return codegen_1.nil;\n }\n }\n subschema(appl, valid) {\n const subschema = (0, subschema_1.getSubschema)(this.it, appl);\n (0, subschema_1.extendSubschemaData)(subschema, this.it, appl);\n (0, subschema_1.extendSubschemaMode)(subschema, appl);\n const nextContext = { ...this.it, ...subschema, items: void 0, props: void 0 };\n subschemaCode(nextContext, valid);\n return nextContext;\n }\n mergeEvaluated(schemaCxt, toName) {\n const { it, gen: gen2 } = this;\n if (!it.opts.unevaluated)\n return;\n if (it.props !== true && schemaCxt.props !== void 0) {\n it.props = util_1.mergeEvaluated.props(gen2, schemaCxt.props, it.props, toName);\n }\n if (it.items !== true && schemaCxt.items !== void 0) {\n it.items = util_1.mergeEvaluated.items(gen2, schemaCxt.items, it.items, toName);\n }\n }\n mergeValidEvaluated(schemaCxt, valid) {\n const { it, gen: gen2 } = this;\n if (it.opts.unevaluated && (it.props !== true || it.items !== true)) {\n gen2.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name));\n return true;\n }\n }\n };\n exports3.KeywordCxt = KeywordCxt;\n function keywordCode(it, keyword, def, ruleType) {\n const cxt = new KeywordCxt(it, def, keyword);\n if (\"code\" in def) {\n def.code(cxt, ruleType);\n } else if (cxt.$data && def.validate) {\n (0, keyword_1.funcKeywordCode)(cxt, def);\n } else if (\"macro\" in def) {\n (0, keyword_1.macroKeywordCode)(cxt, def);\n } else if (def.compile || def.validate) {\n (0, keyword_1.funcKeywordCode)(cxt, def);\n }\n }\n var JSON_POINTER = /^\\/(?:[^~]|~0|~1)*$/;\n var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\\/(?:[^~]|~0|~1)*)?$/;\n function getData($data, { dataLevel, dataNames, dataPathArr }) {\n let jsonPointer;\n let data;\n if ($data === \"\")\n return names_1.default.rootData;\n if ($data[0] === \"/\") {\n if (!JSON_POINTER.test($data))\n throw new Error(`Invalid JSON-pointer: ${$data}`);\n jsonPointer = $data;\n data = names_1.default.rootData;\n } else {\n const matches = RELATIVE_JSON_POINTER.exec($data);\n if (!matches)\n throw new Error(`Invalid JSON-pointer: ${$data}`);\n const up = +matches[1];\n jsonPointer = matches[2];\n if (jsonPointer === \"#\") {\n if (up >= dataLevel)\n throw new Error(errorMsg(\"property/index\", up));\n return dataPathArr[dataLevel - up];\n }\n if (up > dataLevel)\n throw new Error(errorMsg(\"data\", up));\n data = dataNames[dataLevel - up];\n if (!jsonPointer)\n return data;\n }\n let expr = data;\n const segments = jsonPointer.split(\"/\");\n for (const segment of segments) {\n if (segment) {\n data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;\n expr = (0, codegen_1._)`${expr} && ${data}`;\n }\n }\n return expr;\n function errorMsg(pointerType, up) {\n return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`;\n }\n }\n exports3.getData = getData;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/validation_error.js\n var require_validation_error = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/validation_error.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var ValidationError = class extends Error {\n constructor(errors) {\n super(\"validation failed\");\n this.errors = errors;\n this.ajv = this.validation = true;\n }\n };\n exports3.default = ValidationError;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/ref_error.js\n var require_ref_error = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/ref_error.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var resolve_1 = require_resolve();\n var MissingRefError = class extends Error {\n constructor(resolver, baseId, ref, msg) {\n super(msg || `can't resolve reference ${ref} from id ${baseId}`);\n this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref);\n this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));\n }\n };\n exports3.default = MissingRefError;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/index.js\n var require_compile = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/compile/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.resolveSchema = exports3.getCompilingSchema = exports3.resolveRef = exports3.compileSchema = exports3.SchemaEnv = void 0;\n var codegen_1 = require_codegen();\n var validation_error_1 = require_validation_error();\n var names_1 = require_names();\n var resolve_1 = require_resolve();\n var util_1 = require_util2();\n var validate_1 = require_validate();\n var SchemaEnv = class {\n constructor(env2) {\n var _a;\n this.refs = {};\n this.dynamicAnchors = {};\n let schema;\n if (typeof env2.schema == \"object\")\n schema = env2.schema;\n this.schema = env2.schema;\n this.schemaId = env2.schemaId;\n this.root = env2.root || this;\n this.baseId = (_a = env2.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env2.schemaId || \"$id\"]);\n this.schemaPath = env2.schemaPath;\n this.localRefs = env2.localRefs;\n this.meta = env2.meta;\n this.$async = schema === null || schema === void 0 ? void 0 : schema.$async;\n this.refs = {};\n }\n };\n exports3.SchemaEnv = SchemaEnv;\n function compileSchema(sch) {\n const _sch = getCompilingSchema.call(this, sch);\n if (_sch)\n return _sch;\n const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId);\n const { es5, lines } = this.opts.code;\n const { ownProperties } = this.opts;\n const gen2 = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });\n let _ValidationError;\n if (sch.$async) {\n _ValidationError = gen2.scopeValue(\"Error\", {\n ref: validation_error_1.default,\n code: (0, codegen_1._)`require(\"ajv/dist/runtime/validation_error\").default`\n });\n }\n const validateName = gen2.scopeName(\"validate\");\n sch.validateName = validateName;\n const schemaCxt = {\n gen: gen2,\n allErrors: this.opts.allErrors,\n data: names_1.default.data,\n parentData: names_1.default.parentData,\n parentDataProperty: names_1.default.parentDataProperty,\n dataNames: [names_1.default.data],\n dataPathArr: [codegen_1.nil],\n // TODO can its length be used as dataLevel if nil is removed?\n dataLevel: 0,\n dataTypes: [],\n definedProperties: /* @__PURE__ */ new Set(),\n topSchemaRef: gen2.scopeValue(\"schema\", this.opts.code.source === true ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) } : { ref: sch.schema }),\n validateName,\n ValidationError: _ValidationError,\n schema: sch.schema,\n schemaEnv: sch,\n rootId,\n baseId: sch.baseId || rootId,\n schemaPath: codegen_1.nil,\n errSchemaPath: sch.schemaPath || (this.opts.jtd ? \"\" : \"#\"),\n errorPath: (0, codegen_1._)`\"\"`,\n opts: this.opts,\n self: this\n };\n let sourceCode;\n try {\n this._compilations.add(sch);\n (0, validate_1.validateFunctionCode)(schemaCxt);\n gen2.optimize(this.opts.code.optimize);\n const validateCode = gen2.toString();\n sourceCode = `${gen2.scopeRefs(names_1.default.scope)}return ${validateCode}`;\n if (this.opts.code.process)\n sourceCode = this.opts.code.process(sourceCode, sch);\n const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);\n const validate7 = makeValidate(this, this.scope.get());\n this.scope.value(validateName, { ref: validate7 });\n validate7.errors = null;\n validate7.schema = sch.schema;\n validate7.schemaEnv = sch;\n if (sch.$async)\n validate7.$async = true;\n if (this.opts.code.source === true) {\n validate7.source = { validateName, validateCode, scopeValues: gen2._values };\n }\n if (this.opts.unevaluated) {\n const { props, items } = schemaCxt;\n validate7.evaluated = {\n props: props instanceof codegen_1.Name ? void 0 : props,\n items: items instanceof codegen_1.Name ? void 0 : items,\n dynamicProps: props instanceof codegen_1.Name,\n dynamicItems: items instanceof codegen_1.Name\n };\n if (validate7.source)\n validate7.source.evaluated = (0, codegen_1.stringify)(validate7.evaluated);\n }\n sch.validate = validate7;\n return sch;\n } catch (e2) {\n delete sch.validate;\n delete sch.validateName;\n if (sourceCode)\n this.logger.error(\"Error compiling schema, function code:\", sourceCode);\n throw e2;\n } finally {\n this._compilations.delete(sch);\n }\n }\n exports3.compileSchema = compileSchema;\n function resolveRef(root, baseId, ref) {\n var _a;\n ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);\n const schOrFunc = root.refs[ref];\n if (schOrFunc)\n return schOrFunc;\n let _sch = resolve.call(this, root, ref);\n if (_sch === void 0) {\n const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref];\n const { schemaId } = this.opts;\n if (schema)\n _sch = new SchemaEnv({ schema, schemaId, root, baseId });\n }\n if (_sch === void 0)\n return;\n return root.refs[ref] = inlineOrCompile.call(this, _sch);\n }\n exports3.resolveRef = resolveRef;\n function inlineOrCompile(sch) {\n if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))\n return sch.schema;\n return sch.validate ? sch : compileSchema.call(this, sch);\n }\n function getCompilingSchema(schEnv) {\n for (const sch of this._compilations) {\n if (sameSchemaEnv(sch, schEnv))\n return sch;\n }\n }\n exports3.getCompilingSchema = getCompilingSchema;\n function sameSchemaEnv(s1, s22) {\n return s1.schema === s22.schema && s1.root === s22.root && s1.baseId === s22.baseId;\n }\n function resolve(root, ref) {\n let sch;\n while (typeof (sch = this.refs[ref]) == \"string\")\n ref = sch;\n return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);\n }\n function resolveSchema(root, ref) {\n const p4 = this.opts.uriResolver.parse(ref);\n const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p4);\n let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, void 0);\n if (Object.keys(root.schema).length > 0 && refPath === baseId) {\n return getJsonPointer.call(this, p4, root);\n }\n const id = (0, resolve_1.normalizeId)(refPath);\n const schOrRef = this.refs[id] || this.schemas[id];\n if (typeof schOrRef == \"string\") {\n const sch = resolveSchema.call(this, root, schOrRef);\n if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== \"object\")\n return;\n return getJsonPointer.call(this, p4, sch);\n }\n if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== \"object\")\n return;\n if (!schOrRef.validate)\n compileSchema.call(this, schOrRef);\n if (id === (0, resolve_1.normalizeId)(ref)) {\n const { schema } = schOrRef;\n const { schemaId } = this.opts;\n const schId = schema[schemaId];\n if (schId)\n baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n return new SchemaEnv({ schema, schemaId, root, baseId });\n }\n return getJsonPointer.call(this, p4, schOrRef);\n }\n exports3.resolveSchema = resolveSchema;\n var PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([\n \"properties\",\n \"patternProperties\",\n \"enum\",\n \"dependencies\",\n \"definitions\"\n ]);\n function getJsonPointer(parsedRef, { baseId, schema, root }) {\n var _a;\n if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== \"/\")\n return;\n for (const part of parsedRef.fragment.slice(1).split(\"/\")) {\n if (typeof schema === \"boolean\")\n return;\n const partSchema = schema[(0, util_1.unescapeFragment)(part)];\n if (partSchema === void 0)\n return;\n schema = partSchema;\n const schId = typeof schema === \"object\" && schema[this.opts.schemaId];\n if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {\n baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n }\n }\n let env2;\n if (typeof schema != \"boolean\" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {\n const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);\n env2 = resolveSchema.call(this, root, $ref);\n }\n const { schemaId } = this.opts;\n env2 = env2 || new SchemaEnv({ schema, schemaId, root, baseId });\n if (env2.schema !== env2.root.schema)\n return env2;\n return void 0;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/refs/data.json\n var require_data = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/refs/data.json\"(exports3, module) {\n module.exports = {\n $id: \"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#\",\n description: \"Meta-schema for $data reference (JSON AnySchema extension proposal)\",\n type: \"object\",\n required: [\"$data\"],\n properties: {\n $data: {\n type: \"string\",\n anyOf: [{ format: \"relative-json-pointer\" }, { format: \"json-pointer\" }]\n }\n },\n additionalProperties: false\n };\n }\n });\n\n // ../../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js\n var require_utils10 = __commonJS({\n \"../../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var isUUID = RegExp.prototype.test.bind(/^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$/iu);\n var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)$/u);\n function stringArrayToHexStripped(input) {\n let acc = \"\";\n let code = 0;\n let i3 = 0;\n for (i3 = 0; i3 < input.length; i3++) {\n code = input[i3].charCodeAt(0);\n if (code === 48) {\n continue;\n }\n if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) {\n return \"\";\n }\n acc += input[i3];\n break;\n }\n for (i3 += 1; i3 < input.length; i3++) {\n code = input[i3].charCodeAt(0);\n if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) {\n return \"\";\n }\n acc += input[i3];\n }\n return acc;\n }\n var nonSimpleDomain = RegExp.prototype.test.bind(/[^!\"$&'()*+,\\-.;=_`a-z{}~]/u);\n function consumeIsZone(buffer2) {\n buffer2.length = 0;\n return true;\n }\n function consumeHextets(buffer2, address, output) {\n if (buffer2.length) {\n const hex = stringArrayToHexStripped(buffer2);\n if (hex !== \"\") {\n address.push(hex);\n } else {\n output.error = true;\n return false;\n }\n buffer2.length = 0;\n }\n return true;\n }\n function getIPV6(input) {\n let tokenCount = 0;\n const output = { error: false, address: \"\", zone: \"\" };\n const address = [];\n const buffer2 = [];\n let endipv6Encountered = false;\n let endIpv6 = false;\n let consume = consumeHextets;\n for (let i3 = 0; i3 < input.length; i3++) {\n const cursor = input[i3];\n if (cursor === \"[\" || cursor === \"]\") {\n continue;\n }\n if (cursor === \":\") {\n if (endipv6Encountered === true) {\n endIpv6 = true;\n }\n if (!consume(buffer2, address, output)) {\n break;\n }\n if (++tokenCount > 7) {\n output.error = true;\n break;\n }\n if (i3 > 0 && input[i3 - 1] === \":\") {\n endipv6Encountered = true;\n }\n address.push(\":\");\n continue;\n } else if (cursor === \"%\") {\n if (!consume(buffer2, address, output)) {\n break;\n }\n consume = consumeIsZone;\n } else {\n buffer2.push(cursor);\n continue;\n }\n }\n if (buffer2.length) {\n if (consume === consumeIsZone) {\n output.zone = buffer2.join(\"\");\n } else if (endIpv6) {\n address.push(buffer2.join(\"\"));\n } else {\n address.push(stringArrayToHexStripped(buffer2));\n }\n }\n output.address = address.join(\"\");\n return output;\n }\n function normalizeIPv6(host) {\n if (findToken(host, \":\") < 2) {\n return { host, isIPV6: false };\n }\n const ipv6 = getIPV6(host);\n if (!ipv6.error) {\n let newHost = ipv6.address;\n let escapedHost = ipv6.address;\n if (ipv6.zone) {\n newHost += \"%\" + ipv6.zone;\n escapedHost += \"%25\" + ipv6.zone;\n }\n return { host: newHost, isIPV6: true, escapedHost };\n } else {\n return { host, isIPV6: false };\n }\n }\n function findToken(str, token) {\n let ind = 0;\n for (let i3 = 0; i3 < str.length; i3++) {\n if (str[i3] === token)\n ind++;\n }\n return ind;\n }\n function removeDotSegments(path) {\n let input = path;\n const output = [];\n let nextSlash = -1;\n let len = 0;\n while (len = input.length) {\n if (len === 1) {\n if (input === \".\") {\n break;\n } else if (input === \"/\") {\n output.push(\"/\");\n break;\n } else {\n output.push(input);\n break;\n }\n } else if (len === 2) {\n if (input[0] === \".\") {\n if (input[1] === \".\") {\n break;\n } else if (input[1] === \"/\") {\n input = input.slice(2);\n continue;\n }\n } else if (input[0] === \"/\") {\n if (input[1] === \".\" || input[1] === \"/\") {\n output.push(\"/\");\n break;\n }\n }\n } else if (len === 3) {\n if (input === \"/..\") {\n if (output.length !== 0) {\n output.pop();\n }\n output.push(\"/\");\n break;\n }\n }\n if (input[0] === \".\") {\n if (input[1] === \".\") {\n if (input[2] === \"/\") {\n input = input.slice(3);\n continue;\n }\n } else if (input[1] === \"/\") {\n input = input.slice(2);\n continue;\n }\n } else if (input[0] === \"/\") {\n if (input[1] === \".\") {\n if (input[2] === \"/\") {\n input = input.slice(2);\n continue;\n } else if (input[2] === \".\") {\n if (input[3] === \"/\") {\n input = input.slice(3);\n if (output.length !== 0) {\n output.pop();\n }\n continue;\n }\n }\n }\n }\n if ((nextSlash = input.indexOf(\"/\", 1)) === -1) {\n output.push(input);\n break;\n } else {\n output.push(input.slice(0, nextSlash));\n input = input.slice(nextSlash);\n }\n }\n return output.join(\"\");\n }\n function normalizeComponentEncoding(component, esc) {\n const func = esc !== true ? escape : unescape;\n if (component.scheme !== void 0) {\n component.scheme = func(component.scheme);\n }\n if (component.userinfo !== void 0) {\n component.userinfo = func(component.userinfo);\n }\n if (component.host !== void 0) {\n component.host = func(component.host);\n }\n if (component.path !== void 0) {\n component.path = func(component.path);\n }\n if (component.query !== void 0) {\n component.query = func(component.query);\n }\n if (component.fragment !== void 0) {\n component.fragment = func(component.fragment);\n }\n return component;\n }\n function recomposeAuthority(component) {\n const uriTokens = [];\n if (component.userinfo !== void 0) {\n uriTokens.push(component.userinfo);\n uriTokens.push(\"@\");\n }\n if (component.host !== void 0) {\n let host = unescape(component.host);\n if (!isIPv4(host)) {\n const ipV6res = normalizeIPv6(host);\n if (ipV6res.isIPV6 === true) {\n host = `[${ipV6res.escapedHost}]`;\n } else {\n host = component.host;\n }\n }\n uriTokens.push(host);\n }\n if (typeof component.port === \"number\" || typeof component.port === \"string\") {\n uriTokens.push(\":\");\n uriTokens.push(String(component.port));\n }\n return uriTokens.length ? uriTokens.join(\"\") : void 0;\n }\n module.exports = {\n nonSimpleDomain,\n recomposeAuthority,\n normalizeComponentEncoding,\n removeDotSegments,\n isIPv4,\n isUUID,\n normalizeIPv6,\n stringArrayToHexStripped\n };\n }\n });\n\n // ../../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js\n var require_schemes = __commonJS({\n \"../../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var { isUUID } = require_utils10();\n var URN_REG = /([\\da-z][\\d\\-a-z]{0,31}):((?:[\\w!$'()*+,\\-.:;=@]|%[\\da-f]{2})+)/iu;\n var supportedSchemeNames = (\n /** @type {const} */\n [\n \"http\",\n \"https\",\n \"ws\",\n \"wss\",\n \"urn\",\n \"urn:uuid\"\n ]\n );\n function isValidSchemeName(name) {\n return supportedSchemeNames.indexOf(\n /** @type {*} */\n name\n ) !== -1;\n }\n function wsIsSecure(wsComponent) {\n if (wsComponent.secure === true) {\n return true;\n } else if (wsComponent.secure === false) {\n return false;\n } else if (wsComponent.scheme) {\n return wsComponent.scheme.length === 3 && (wsComponent.scheme[0] === \"w\" || wsComponent.scheme[0] === \"W\") && (wsComponent.scheme[1] === \"s\" || wsComponent.scheme[1] === \"S\") && (wsComponent.scheme[2] === \"s\" || wsComponent.scheme[2] === \"S\");\n } else {\n return false;\n }\n }\n function httpParse(component) {\n if (!component.host) {\n component.error = component.error || \"HTTP URIs must have a host.\";\n }\n return component;\n }\n function httpSerialize(component) {\n const secure = String(component.scheme).toLowerCase() === \"https\";\n if (component.port === (secure ? 443 : 80) || component.port === \"\") {\n component.port = void 0;\n }\n if (!component.path) {\n component.path = \"/\";\n }\n return component;\n }\n function wsParse(wsComponent) {\n wsComponent.secure = wsIsSecure(wsComponent);\n wsComponent.resourceName = (wsComponent.path || \"/\") + (wsComponent.query ? \"?\" + wsComponent.query : \"\");\n wsComponent.path = void 0;\n wsComponent.query = void 0;\n return wsComponent;\n }\n function wsSerialize(wsComponent) {\n if (wsComponent.port === (wsIsSecure(wsComponent) ? 443 : 80) || wsComponent.port === \"\") {\n wsComponent.port = void 0;\n }\n if (typeof wsComponent.secure === \"boolean\") {\n wsComponent.scheme = wsComponent.secure ? \"wss\" : \"ws\";\n wsComponent.secure = void 0;\n }\n if (wsComponent.resourceName) {\n const [path, query] = wsComponent.resourceName.split(\"?\");\n wsComponent.path = path && path !== \"/\" ? path : void 0;\n wsComponent.query = query;\n wsComponent.resourceName = void 0;\n }\n wsComponent.fragment = void 0;\n return wsComponent;\n }\n function urnParse(urnComponent, options) {\n if (!urnComponent.path) {\n urnComponent.error = \"URN can not be parsed\";\n return urnComponent;\n }\n const matches = urnComponent.path.match(URN_REG);\n if (matches) {\n const scheme = options.scheme || urnComponent.scheme || \"urn\";\n urnComponent.nid = matches[1].toLowerCase();\n urnComponent.nss = matches[2];\n const urnScheme = `${scheme}:${options.nid || urnComponent.nid}`;\n const schemeHandler = getSchemeHandler(urnScheme);\n urnComponent.path = void 0;\n if (schemeHandler) {\n urnComponent = schemeHandler.parse(urnComponent, options);\n }\n } else {\n urnComponent.error = urnComponent.error || \"URN can not be parsed.\";\n }\n return urnComponent;\n }\n function urnSerialize(urnComponent, options) {\n if (urnComponent.nid === void 0) {\n throw new Error(\"URN without nid cannot be serialized\");\n }\n const scheme = options.scheme || urnComponent.scheme || \"urn\";\n const nid = urnComponent.nid.toLowerCase();\n const urnScheme = `${scheme}:${options.nid || nid}`;\n const schemeHandler = getSchemeHandler(urnScheme);\n if (schemeHandler) {\n urnComponent = schemeHandler.serialize(urnComponent, options);\n }\n const uriComponent = urnComponent;\n const nss = urnComponent.nss;\n uriComponent.path = `${nid || options.nid}:${nss}`;\n options.skipEscape = true;\n return uriComponent;\n }\n function urnuuidParse(urnComponent, options) {\n const uuidComponent = urnComponent;\n uuidComponent.uuid = uuidComponent.nss;\n uuidComponent.nss = void 0;\n if (!options.tolerant && (!uuidComponent.uuid || !isUUID(uuidComponent.uuid))) {\n uuidComponent.error = uuidComponent.error || \"UUID is not valid.\";\n }\n return uuidComponent;\n }\n function urnuuidSerialize(uuidComponent) {\n const urnComponent = uuidComponent;\n urnComponent.nss = (uuidComponent.uuid || \"\").toLowerCase();\n return urnComponent;\n }\n var http2 = (\n /** @type {SchemeHandler} */\n {\n scheme: \"http\",\n domainHost: true,\n parse: httpParse,\n serialize: httpSerialize\n }\n );\n var https = (\n /** @type {SchemeHandler} */\n {\n scheme: \"https\",\n domainHost: http2.domainHost,\n parse: httpParse,\n serialize: httpSerialize\n }\n );\n var ws = (\n /** @type {SchemeHandler} */\n {\n scheme: \"ws\",\n domainHost: true,\n parse: wsParse,\n serialize: wsSerialize\n }\n );\n var wss = (\n /** @type {SchemeHandler} */\n {\n scheme: \"wss\",\n domainHost: ws.domainHost,\n parse: ws.parse,\n serialize: ws.serialize\n }\n );\n var urn = (\n /** @type {SchemeHandler} */\n {\n scheme: \"urn\",\n parse: urnParse,\n serialize: urnSerialize,\n skipNormalize: true\n }\n );\n var urnuuid = (\n /** @type {SchemeHandler} */\n {\n scheme: \"urn:uuid\",\n parse: urnuuidParse,\n serialize: urnuuidSerialize,\n skipNormalize: true\n }\n );\n var SCHEMES = (\n /** @type {Record} */\n {\n http: http2,\n https,\n ws,\n wss,\n urn,\n \"urn:uuid\": urnuuid\n }\n );\n Object.setPrototypeOf(SCHEMES, null);\n function getSchemeHandler(scheme) {\n return scheme && (SCHEMES[\n /** @type {SchemeName} */\n scheme\n ] || SCHEMES[\n /** @type {SchemeName} */\n scheme.toLowerCase()\n ]) || void 0;\n }\n module.exports = {\n wsIsSecure,\n SCHEMES,\n isValidSchemeName,\n getSchemeHandler\n };\n }\n });\n\n // ../../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js\n var require_fast_uri = __commonJS({\n \"../../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils10();\n var { SCHEMES, getSchemeHandler } = require_schemes();\n function normalize2(uri, options) {\n if (typeof uri === \"string\") {\n uri = /** @type {T} */\n serialize(parse3(uri, options), options);\n } else if (typeof uri === \"object\") {\n uri = /** @type {T} */\n parse3(serialize(uri, options), options);\n }\n return uri;\n }\n function resolve(baseURI, relativeURI, options) {\n const schemelessOptions = options ? Object.assign({ scheme: \"null\" }, options) : { scheme: \"null\" };\n const resolved = resolveComponent(parse3(baseURI, schemelessOptions), parse3(relativeURI, schemelessOptions), schemelessOptions, true);\n schemelessOptions.skipEscape = true;\n return serialize(resolved, schemelessOptions);\n }\n function resolveComponent(base4, relative, options, skipNormalization) {\n const target = {};\n if (!skipNormalization) {\n base4 = parse3(serialize(base4, options), options);\n relative = parse3(serialize(relative, options), options);\n }\n options = options || {};\n if (!options.tolerant && relative.scheme) {\n target.scheme = relative.scheme;\n target.userinfo = relative.userinfo;\n target.host = relative.host;\n target.port = relative.port;\n target.path = removeDotSegments(relative.path || \"\");\n target.query = relative.query;\n } else {\n if (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) {\n target.userinfo = relative.userinfo;\n target.host = relative.host;\n target.port = relative.port;\n target.path = removeDotSegments(relative.path || \"\");\n target.query = relative.query;\n } else {\n if (!relative.path) {\n target.path = base4.path;\n if (relative.query !== void 0) {\n target.query = relative.query;\n } else {\n target.query = base4.query;\n }\n } else {\n if (relative.path[0] === \"/\") {\n target.path = removeDotSegments(relative.path);\n } else {\n if ((base4.userinfo !== void 0 || base4.host !== void 0 || base4.port !== void 0) && !base4.path) {\n target.path = \"/\" + relative.path;\n } else if (!base4.path) {\n target.path = relative.path;\n } else {\n target.path = base4.path.slice(0, base4.path.lastIndexOf(\"/\") + 1) + relative.path;\n }\n target.path = removeDotSegments(target.path);\n }\n target.query = relative.query;\n }\n target.userinfo = base4.userinfo;\n target.host = base4.host;\n target.port = base4.port;\n }\n target.scheme = base4.scheme;\n }\n target.fragment = relative.fragment;\n return target;\n }\n function equal(uriA, uriB, options) {\n if (typeof uriA === \"string\") {\n uriA = unescape(uriA);\n uriA = serialize(normalizeComponentEncoding(parse3(uriA, options), true), { ...options, skipEscape: true });\n } else if (typeof uriA === \"object\") {\n uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });\n }\n if (typeof uriB === \"string\") {\n uriB = unescape(uriB);\n uriB = serialize(normalizeComponentEncoding(parse3(uriB, options), true), { ...options, skipEscape: true });\n } else if (typeof uriB === \"object\") {\n uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });\n }\n return uriA.toLowerCase() === uriB.toLowerCase();\n }\n function serialize(cmpts, opts) {\n const component = {\n host: cmpts.host,\n scheme: cmpts.scheme,\n userinfo: cmpts.userinfo,\n port: cmpts.port,\n path: cmpts.path,\n query: cmpts.query,\n nid: cmpts.nid,\n nss: cmpts.nss,\n uuid: cmpts.uuid,\n fragment: cmpts.fragment,\n reference: cmpts.reference,\n resourceName: cmpts.resourceName,\n secure: cmpts.secure,\n error: \"\"\n };\n const options = Object.assign({}, opts);\n const uriTokens = [];\n const schemeHandler = getSchemeHandler(options.scheme || component.scheme);\n if (schemeHandler && schemeHandler.serialize)\n schemeHandler.serialize(component, options);\n if (component.path !== void 0) {\n if (!options.skipEscape) {\n component.path = escape(component.path);\n if (component.scheme !== void 0) {\n component.path = component.path.split(\"%3A\").join(\":\");\n }\n } else {\n component.path = unescape(component.path);\n }\n }\n if (options.reference !== \"suffix\" && component.scheme) {\n uriTokens.push(component.scheme, \":\");\n }\n const authority = recomposeAuthority(component);\n if (authority !== void 0) {\n if (options.reference !== \"suffix\") {\n uriTokens.push(\"//\");\n }\n uriTokens.push(authority);\n if (component.path && component.path[0] !== \"/\") {\n uriTokens.push(\"/\");\n }\n }\n if (component.path !== void 0) {\n let s4 = component.path;\n if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n s4 = removeDotSegments(s4);\n }\n if (authority === void 0 && s4[0] === \"/\" && s4[1] === \"/\") {\n s4 = \"/%2F\" + s4.slice(2);\n }\n uriTokens.push(s4);\n }\n if (component.query !== void 0) {\n uriTokens.push(\"?\", component.query);\n }\n if (component.fragment !== void 0) {\n uriTokens.push(\"#\", component.fragment);\n }\n return uriTokens.join(\"\");\n }\n var URI_PARSE = /^(?:([^#/:?]+):)?(?:\\/\\/((?:([^#/?@]*)@)?(\\[[^#/?\\]]+\\]|[^#/:?]*)(?::(\\d*))?))?([^#?]*)(?:\\?([^#]*))?(?:#((?:.|[\\n\\r])*))?/u;\n function parse3(uri, opts) {\n const options = Object.assign({}, opts);\n const parsed = {\n scheme: void 0,\n userinfo: void 0,\n host: \"\",\n port: void 0,\n path: \"\",\n query: void 0,\n fragment: void 0\n };\n let isIP = false;\n if (options.reference === \"suffix\") {\n if (options.scheme) {\n uri = options.scheme + \":\" + uri;\n } else {\n uri = \"//\" + uri;\n }\n }\n const matches = uri.match(URI_PARSE);\n if (matches) {\n parsed.scheme = matches[1];\n parsed.userinfo = matches[3];\n parsed.host = matches[4];\n parsed.port = parseInt(matches[5], 10);\n parsed.path = matches[6] || \"\";\n parsed.query = matches[7];\n parsed.fragment = matches[8];\n if (isNaN(parsed.port)) {\n parsed.port = matches[5];\n }\n if (parsed.host) {\n const ipv4result = isIPv4(parsed.host);\n if (ipv4result === false) {\n const ipv6result = normalizeIPv6(parsed.host);\n parsed.host = ipv6result.host.toLowerCase();\n isIP = ipv6result.isIPV6;\n } else {\n isIP = true;\n }\n }\n if (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && parsed.query === void 0 && !parsed.path) {\n parsed.reference = \"same-document\";\n } else if (parsed.scheme === void 0) {\n parsed.reference = \"relative\";\n } else if (parsed.fragment === void 0) {\n parsed.reference = \"absolute\";\n } else {\n parsed.reference = \"uri\";\n }\n if (options.reference && options.reference !== \"suffix\" && options.reference !== parsed.reference) {\n parsed.error = parsed.error || \"URI is not a \" + options.reference + \" reference.\";\n }\n const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);\n if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {\n try {\n parsed.host = URL.domainToASCII(parsed.host.toLowerCase());\n } catch (e2) {\n parsed.error = parsed.error || \"Host's domain name can not be converted to ASCII: \" + e2;\n }\n }\n }\n if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {\n if (uri.indexOf(\"%\") !== -1) {\n if (parsed.scheme !== void 0) {\n parsed.scheme = unescape(parsed.scheme);\n }\n if (parsed.host !== void 0) {\n parsed.host = unescape(parsed.host);\n }\n }\n if (parsed.path) {\n parsed.path = escape(unescape(parsed.path));\n }\n if (parsed.fragment) {\n parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));\n }\n }\n if (schemeHandler && schemeHandler.parse) {\n schemeHandler.parse(parsed, options);\n }\n } else {\n parsed.error = parsed.error || \"URI can not be parsed.\";\n }\n return parsed;\n }\n var fastUri = {\n SCHEMES,\n normalize: normalize2,\n resolve,\n resolveComponent,\n equal,\n serialize,\n parse: parse3\n };\n module.exports = fastUri;\n module.exports.default = fastUri;\n module.exports.fastUri = fastUri;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/uri.js\n var require_uri = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/uri.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var uri = require_fast_uri();\n uri.code = 'require(\"ajv/dist/runtime/uri\").default';\n exports3.default = uri;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/core.js\n var require_core = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/core.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CodeGen = exports3.Name = exports3.nil = exports3.stringify = exports3.str = exports3._ = exports3.KeywordCxt = void 0;\n var validate_1 = require_validate();\n Object.defineProperty(exports3, \"KeywordCxt\", { enumerable: true, get: function() {\n return validate_1.KeywordCxt;\n } });\n var codegen_1 = require_codegen();\n Object.defineProperty(exports3, \"_\", { enumerable: true, get: function() {\n return codegen_1._;\n } });\n Object.defineProperty(exports3, \"str\", { enumerable: true, get: function() {\n return codegen_1.str;\n } });\n Object.defineProperty(exports3, \"stringify\", { enumerable: true, get: function() {\n return codegen_1.stringify;\n } });\n Object.defineProperty(exports3, \"nil\", { enumerable: true, get: function() {\n return codegen_1.nil;\n } });\n Object.defineProperty(exports3, \"Name\", { enumerable: true, get: function() {\n return codegen_1.Name;\n } });\n Object.defineProperty(exports3, \"CodeGen\", { enumerable: true, get: function() {\n return codegen_1.CodeGen;\n } });\n var validation_error_1 = require_validation_error();\n var ref_error_1 = require_ref_error();\n var rules_1 = require_rules();\n var compile_1 = require_compile();\n var codegen_2 = require_codegen();\n var resolve_1 = require_resolve();\n var dataType_1 = require_dataType();\n var util_1 = require_util2();\n var $dataRefSchema = require_data();\n var uri_1 = require_uri();\n var defaultRegExp = (str, flags) => new RegExp(str, flags);\n defaultRegExp.code = \"new RegExp\";\n var META_IGNORE_OPTIONS = [\"removeAdditional\", \"useDefaults\", \"coerceTypes\"];\n var EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([\n \"validate\",\n \"serialize\",\n \"parse\",\n \"wrapper\",\n \"root\",\n \"schema\",\n \"keyword\",\n \"pattern\",\n \"formats\",\n \"validate$data\",\n \"func\",\n \"obj\",\n \"Error\"\n ]);\n var removedOptions = {\n errorDataPath: \"\",\n format: \"`validateFormats: false` can be used instead.\",\n nullable: '\"nullable\" keyword is supported by default.',\n jsonPointers: \"Deprecated jsPropertySyntax can be used instead.\",\n extendRefs: \"Deprecated ignoreKeywordsWithRef can be used instead.\",\n missingRefs: \"Pass empty schema with $id that should be ignored to ajv.addSchema.\",\n processCode: \"Use option `code: {process: (code, schemaEnv: object) => string}`\",\n sourceCode: \"Use option `code: {source: true}`\",\n strictDefaults: \"It is default now, see option `strict`.\",\n strictKeywords: \"It is default now, see option `strict`.\",\n uniqueItems: '\"uniqueItems\" keyword is always validated.',\n unknownFormats: \"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).\",\n cache: \"Map is used as cache, schema object as key.\",\n serialize: \"Map is used as cache, schema object as key.\",\n ajvErrors: \"It is default now.\"\n };\n var deprecatedOptions = {\n ignoreKeywordsWithRef: \"\",\n jsPropertySyntax: \"\",\n unicode: '\"minLength\"/\"maxLength\" account for unicode characters by default.'\n };\n var MAX_EXPRESSION = 200;\n function requiredOptions(o5) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;\n const s4 = o5.strict;\n const _optz = (_a = o5.code) === null || _a === void 0 ? void 0 : _a.optimize;\n const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0;\n const regExp = (_c = (_b = o5.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp;\n const uriResolver = (_d = o5.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;\n return {\n strictSchema: (_f = (_e = o5.strictSchema) !== null && _e !== void 0 ? _e : s4) !== null && _f !== void 0 ? _f : true,\n strictNumbers: (_h = (_g = o5.strictNumbers) !== null && _g !== void 0 ? _g : s4) !== null && _h !== void 0 ? _h : true,\n strictTypes: (_k = (_j = o5.strictTypes) !== null && _j !== void 0 ? _j : s4) !== null && _k !== void 0 ? _k : \"log\",\n strictTuples: (_m = (_l = o5.strictTuples) !== null && _l !== void 0 ? _l : s4) !== null && _m !== void 0 ? _m : \"log\",\n strictRequired: (_p = (_o = o5.strictRequired) !== null && _o !== void 0 ? _o : s4) !== null && _p !== void 0 ? _p : false,\n code: o5.code ? { ...o5.code, optimize, regExp } : { optimize, regExp },\n loopRequired: (_q = o5.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION,\n loopEnum: (_r = o5.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION,\n meta: (_s = o5.meta) !== null && _s !== void 0 ? _s : true,\n messages: (_t = o5.messages) !== null && _t !== void 0 ? _t : true,\n inlineRefs: (_u = o5.inlineRefs) !== null && _u !== void 0 ? _u : true,\n schemaId: (_v = o5.schemaId) !== null && _v !== void 0 ? _v : \"$id\",\n addUsedSchema: (_w = o5.addUsedSchema) !== null && _w !== void 0 ? _w : true,\n validateSchema: (_x = o5.validateSchema) !== null && _x !== void 0 ? _x : true,\n validateFormats: (_y = o5.validateFormats) !== null && _y !== void 0 ? _y : true,\n unicodeRegExp: (_z = o5.unicodeRegExp) !== null && _z !== void 0 ? _z : true,\n int32range: (_0 = o5.int32range) !== null && _0 !== void 0 ? _0 : true,\n uriResolver\n };\n }\n var Ajv = class {\n constructor(opts = {}) {\n this.schemas = {};\n this.refs = {};\n this.formats = {};\n this._compilations = /* @__PURE__ */ new Set();\n this._loading = {};\n this._cache = /* @__PURE__ */ new Map();\n opts = this.opts = { ...opts, ...requiredOptions(opts) };\n const { es5, lines } = this.opts.code;\n this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines });\n this.logger = getLogger(opts.logger);\n const formatOpt = opts.validateFormats;\n opts.validateFormats = false;\n this.RULES = (0, rules_1.getRules)();\n checkOptions.call(this, removedOptions, opts, \"NOT SUPPORTED\");\n checkOptions.call(this, deprecatedOptions, opts, \"DEPRECATED\", \"warn\");\n this._metaOpts = getMetaSchemaOptions.call(this);\n if (opts.formats)\n addInitialFormats.call(this);\n this._addVocabularies();\n this._addDefaultMetaSchema();\n if (opts.keywords)\n addInitialKeywords.call(this, opts.keywords);\n if (typeof opts.meta == \"object\")\n this.addMetaSchema(opts.meta);\n addInitialSchemas.call(this);\n opts.validateFormats = formatOpt;\n }\n _addVocabularies() {\n this.addKeyword(\"$async\");\n }\n _addDefaultMetaSchema() {\n const { $data, meta, schemaId } = this.opts;\n let _dataRefSchema = $dataRefSchema;\n if (schemaId === \"id\") {\n _dataRefSchema = { ...$dataRefSchema };\n _dataRefSchema.id = _dataRefSchema.$id;\n delete _dataRefSchema.$id;\n }\n if (meta && $data)\n this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false);\n }\n defaultMeta() {\n const { meta, schemaId } = this.opts;\n return this.opts.defaultMeta = typeof meta == \"object\" ? meta[schemaId] || meta : void 0;\n }\n validate(schemaKeyRef, data) {\n let v2;\n if (typeof schemaKeyRef == \"string\") {\n v2 = this.getSchema(schemaKeyRef);\n if (!v2)\n throw new Error(`no schema with key or ref \"${schemaKeyRef}\"`);\n } else {\n v2 = this.compile(schemaKeyRef);\n }\n const valid = v2(data);\n if (!(\"$async\" in v2))\n this.errors = v2.errors;\n return valid;\n }\n compile(schema, _meta) {\n const sch = this._addSchema(schema, _meta);\n return sch.validate || this._compileSchemaEnv(sch);\n }\n compileAsync(schema, meta) {\n if (typeof this.opts.loadSchema != \"function\") {\n throw new Error(\"options.loadSchema should be a function\");\n }\n const { loadSchema } = this.opts;\n return runCompileAsync.call(this, schema, meta);\n async function runCompileAsync(_schema, _meta) {\n await loadMetaSchema.call(this, _schema.$schema);\n const sch = this._addSchema(_schema, _meta);\n return sch.validate || _compileAsync.call(this, sch);\n }\n async function loadMetaSchema($ref) {\n if ($ref && !this.getSchema($ref)) {\n await runCompileAsync.call(this, { $ref }, true);\n }\n }\n async function _compileAsync(sch) {\n try {\n return this._compileSchemaEnv(sch);\n } catch (e2) {\n if (!(e2 instanceof ref_error_1.default))\n throw e2;\n checkLoaded.call(this, e2);\n await loadMissingSchema.call(this, e2.missingSchema);\n return _compileAsync.call(this, sch);\n }\n }\n function checkLoaded({ missingSchema: ref, missingRef }) {\n if (this.refs[ref]) {\n throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`);\n }\n }\n async function loadMissingSchema(ref) {\n const _schema = await _loadSchema.call(this, ref);\n if (!this.refs[ref])\n await loadMetaSchema.call(this, _schema.$schema);\n if (!this.refs[ref])\n this.addSchema(_schema, ref, meta);\n }\n async function _loadSchema(ref) {\n const p4 = this._loading[ref];\n if (p4)\n return p4;\n try {\n return await (this._loading[ref] = loadSchema(ref));\n } finally {\n delete this._loading[ref];\n }\n }\n }\n // Adds schema to the instance\n addSchema(schema, key, _meta, _validateSchema = this.opts.validateSchema) {\n if (Array.isArray(schema)) {\n for (const sch of schema)\n this.addSchema(sch, void 0, _meta, _validateSchema);\n return this;\n }\n let id;\n if (typeof schema === \"object\") {\n const { schemaId } = this.opts;\n id = schema[schemaId];\n if (id !== void 0 && typeof id != \"string\") {\n throw new Error(`schema ${schemaId} must be string`);\n }\n }\n key = (0, resolve_1.normalizeId)(key || id);\n this._checkUnique(key);\n this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true);\n return this;\n }\n // Add schema that will be used to validate other schemas\n // options in META_IGNORE_OPTIONS are alway set to false\n addMetaSchema(schema, key, _validateSchema = this.opts.validateSchema) {\n this.addSchema(schema, key, true, _validateSchema);\n return this;\n }\n // Validate schema against its meta-schema\n validateSchema(schema, throwOrLogError) {\n if (typeof schema == \"boolean\")\n return true;\n let $schema;\n $schema = schema.$schema;\n if ($schema !== void 0 && typeof $schema != \"string\") {\n throw new Error(\"$schema must be a string\");\n }\n $schema = $schema || this.opts.defaultMeta || this.defaultMeta();\n if (!$schema) {\n this.logger.warn(\"meta-schema not available\");\n this.errors = null;\n return true;\n }\n const valid = this.validate($schema, schema);\n if (!valid && throwOrLogError) {\n const message2 = \"schema is invalid: \" + this.errorsText();\n if (this.opts.validateSchema === \"log\")\n this.logger.error(message2);\n else\n throw new Error(message2);\n }\n return valid;\n }\n // Get compiled schema by `key` or `ref`.\n // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)\n getSchema(keyRef) {\n let sch;\n while (typeof (sch = getSchEnv.call(this, keyRef)) == \"string\")\n keyRef = sch;\n if (sch === void 0) {\n const { schemaId } = this.opts;\n const root = new compile_1.SchemaEnv({ schema: {}, schemaId });\n sch = compile_1.resolveSchema.call(this, root, keyRef);\n if (!sch)\n return;\n this.refs[keyRef] = sch;\n }\n return sch.validate || this._compileSchemaEnv(sch);\n }\n // Remove cached schema(s).\n // If no parameter is passed all schemas but meta-schemas are removed.\n // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.\n // Even if schema is referenced by other schemas it still can be removed as other schemas have local references.\n removeSchema(schemaKeyRef) {\n if (schemaKeyRef instanceof RegExp) {\n this._removeAllSchemas(this.schemas, schemaKeyRef);\n this._removeAllSchemas(this.refs, schemaKeyRef);\n return this;\n }\n switch (typeof schemaKeyRef) {\n case \"undefined\":\n this._removeAllSchemas(this.schemas);\n this._removeAllSchemas(this.refs);\n this._cache.clear();\n return this;\n case \"string\": {\n const sch = getSchEnv.call(this, schemaKeyRef);\n if (typeof sch == \"object\")\n this._cache.delete(sch.schema);\n delete this.schemas[schemaKeyRef];\n delete this.refs[schemaKeyRef];\n return this;\n }\n case \"object\": {\n const cacheKey2 = schemaKeyRef;\n this._cache.delete(cacheKey2);\n let id = schemaKeyRef[this.opts.schemaId];\n if (id) {\n id = (0, resolve_1.normalizeId)(id);\n delete this.schemas[id];\n delete this.refs[id];\n }\n return this;\n }\n default:\n throw new Error(\"ajv.removeSchema: invalid parameter\");\n }\n }\n // add \"vocabulary\" - a collection of keywords\n addVocabulary(definitions) {\n for (const def of definitions)\n this.addKeyword(def);\n return this;\n }\n addKeyword(kwdOrDef, def) {\n let keyword;\n if (typeof kwdOrDef == \"string\") {\n keyword = kwdOrDef;\n if (typeof def == \"object\") {\n this.logger.warn(\"these parameters are deprecated, see docs for addKeyword\");\n def.keyword = keyword;\n }\n } else if (typeof kwdOrDef == \"object\" && def === void 0) {\n def = kwdOrDef;\n keyword = def.keyword;\n if (Array.isArray(keyword) && !keyword.length) {\n throw new Error(\"addKeywords: keyword must be string or non-empty array\");\n }\n } else {\n throw new Error(\"invalid addKeywords parameters\");\n }\n checkKeyword.call(this, keyword, def);\n if (!def) {\n (0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd));\n return this;\n }\n keywordMetaschema.call(this, def);\n const definition = {\n ...def,\n type: (0, dataType_1.getJSONTypes)(def.type),\n schemaType: (0, dataType_1.getJSONTypes)(def.schemaType)\n };\n (0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k4) => addRule.call(this, k4, definition) : (k4) => definition.type.forEach((t3) => addRule.call(this, k4, definition, t3)));\n return this;\n }\n getKeyword(keyword) {\n const rule = this.RULES.all[keyword];\n return typeof rule == \"object\" ? rule.definition : !!rule;\n }\n // Remove keyword\n removeKeyword(keyword) {\n const { RULES } = this;\n delete RULES.keywords[keyword];\n delete RULES.all[keyword];\n for (const group of RULES.rules) {\n const i3 = group.rules.findIndex((rule) => rule.keyword === keyword);\n if (i3 >= 0)\n group.rules.splice(i3, 1);\n }\n return this;\n }\n // Add format\n addFormat(name, format) {\n if (typeof format == \"string\")\n format = new RegExp(format);\n this.formats[name] = format;\n return this;\n }\n errorsText(errors = this.errors, { separator = \", \", dataVar = \"data\" } = {}) {\n if (!errors || errors.length === 0)\n return \"No errors\";\n return errors.map((e2) => `${dataVar}${e2.instancePath} ${e2.message}`).reduce((text, msg) => text + separator + msg);\n }\n $dataMetaSchema(metaSchema, keywordsJsonPointers) {\n const rules = this.RULES.all;\n metaSchema = JSON.parse(JSON.stringify(metaSchema));\n for (const jsonPointer of keywordsJsonPointers) {\n const segments = jsonPointer.split(\"/\").slice(1);\n let keywords = metaSchema;\n for (const seg of segments)\n keywords = keywords[seg];\n for (const key in rules) {\n const rule = rules[key];\n if (typeof rule != \"object\")\n continue;\n const { $data } = rule.definition;\n const schema = keywords[key];\n if ($data && schema)\n keywords[key] = schemaOrData(schema);\n }\n }\n return metaSchema;\n }\n _removeAllSchemas(schemas, regex) {\n for (const keyRef in schemas) {\n const sch = schemas[keyRef];\n if (!regex || regex.test(keyRef)) {\n if (typeof sch == \"string\") {\n delete schemas[keyRef];\n } else if (sch && !sch.meta) {\n this._cache.delete(sch.schema);\n delete schemas[keyRef];\n }\n }\n }\n }\n _addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {\n let id;\n const { schemaId } = this.opts;\n if (typeof schema == \"object\") {\n id = schema[schemaId];\n } else {\n if (this.opts.jtd)\n throw new Error(\"schema must be object\");\n else if (typeof schema != \"boolean\")\n throw new Error(\"schema must be object or boolean\");\n }\n let sch = this._cache.get(schema);\n if (sch !== void 0)\n return sch;\n baseId = (0, resolve_1.normalizeId)(id || baseId);\n const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId);\n sch = new compile_1.SchemaEnv({ schema, schemaId, meta, baseId, localRefs });\n this._cache.set(sch.schema, sch);\n if (addSchema && !baseId.startsWith(\"#\")) {\n if (baseId)\n this._checkUnique(baseId);\n this.refs[baseId] = sch;\n }\n if (validateSchema)\n this.validateSchema(schema, true);\n return sch;\n }\n _checkUnique(id) {\n if (this.schemas[id] || this.refs[id]) {\n throw new Error(`schema with key or id \"${id}\" already exists`);\n }\n }\n _compileSchemaEnv(sch) {\n if (sch.meta)\n this._compileMetaSchema(sch);\n else\n compile_1.compileSchema.call(this, sch);\n if (!sch.validate)\n throw new Error(\"ajv implementation error\");\n return sch.validate;\n }\n _compileMetaSchema(sch) {\n const currentOpts = this.opts;\n this.opts = this._metaOpts;\n try {\n compile_1.compileSchema.call(this, sch);\n } finally {\n this.opts = currentOpts;\n }\n }\n };\n Ajv.ValidationError = validation_error_1.default;\n Ajv.MissingRefError = ref_error_1.default;\n exports3.default = Ajv;\n function checkOptions(checkOpts2, options, msg, log = \"error\") {\n for (const key in checkOpts2) {\n const opt = key;\n if (opt in options)\n this.logger[log](`${msg}: option ${key}. ${checkOpts2[opt]}`);\n }\n }\n function getSchEnv(keyRef) {\n keyRef = (0, resolve_1.normalizeId)(keyRef);\n return this.schemas[keyRef] || this.refs[keyRef];\n }\n function addInitialSchemas() {\n const optsSchemas = this.opts.schemas;\n if (!optsSchemas)\n return;\n if (Array.isArray(optsSchemas))\n this.addSchema(optsSchemas);\n else\n for (const key in optsSchemas)\n this.addSchema(optsSchemas[key], key);\n }\n function addInitialFormats() {\n for (const name in this.opts.formats) {\n const format = this.opts.formats[name];\n if (format)\n this.addFormat(name, format);\n }\n }\n function addInitialKeywords(defs) {\n if (Array.isArray(defs)) {\n this.addVocabulary(defs);\n return;\n }\n this.logger.warn(\"keywords option as map is deprecated, pass array\");\n for (const keyword in defs) {\n const def = defs[keyword];\n if (!def.keyword)\n def.keyword = keyword;\n this.addKeyword(def);\n }\n }\n function getMetaSchemaOptions() {\n const metaOpts = { ...this.opts };\n for (const opt of META_IGNORE_OPTIONS)\n delete metaOpts[opt];\n return metaOpts;\n }\n var noLogs = { log() {\n }, warn() {\n }, error() {\n } };\n function getLogger(logger) {\n if (logger === false)\n return noLogs;\n if (logger === void 0)\n return console;\n if (logger.log && logger.warn && logger.error)\n return logger;\n throw new Error(\"logger must implement log, warn and error methods\");\n }\n var KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;\n function checkKeyword(keyword, def) {\n const { RULES } = this;\n (0, util_1.eachItem)(keyword, (kwd) => {\n if (RULES.keywords[kwd])\n throw new Error(`Keyword ${kwd} is already defined`);\n if (!KEYWORD_NAME.test(kwd))\n throw new Error(`Keyword ${kwd} has invalid name`);\n });\n if (!def)\n return;\n if (def.$data && !(\"code\" in def || \"validate\" in def)) {\n throw new Error('$data keyword must have \"code\" or \"validate\" function');\n }\n }\n function addRule(keyword, definition, dataType) {\n var _a;\n const post = definition === null || definition === void 0 ? void 0 : definition.post;\n if (dataType && post)\n throw new Error('keyword with \"post\" flag cannot have \"type\"');\n const { RULES } = this;\n let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t3 }) => t3 === dataType);\n if (!ruleGroup) {\n ruleGroup = { type: dataType, rules: [] };\n RULES.rules.push(ruleGroup);\n }\n RULES.keywords[keyword] = true;\n if (!definition)\n return;\n const rule = {\n keyword,\n definition: {\n ...definition,\n type: (0, dataType_1.getJSONTypes)(definition.type),\n schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType)\n }\n };\n if (definition.before)\n addBeforeRule.call(this, ruleGroup, rule, definition.before);\n else\n ruleGroup.rules.push(rule);\n RULES.all[keyword] = rule;\n (_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd));\n }\n function addBeforeRule(ruleGroup, rule, before) {\n const i3 = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);\n if (i3 >= 0) {\n ruleGroup.rules.splice(i3, 0, rule);\n } else {\n ruleGroup.rules.push(rule);\n this.logger.warn(`rule ${before} is not defined`);\n }\n }\n function keywordMetaschema(def) {\n let { metaSchema } = def;\n if (metaSchema === void 0)\n return;\n if (def.$data && this.opts.$data)\n metaSchema = schemaOrData(metaSchema);\n def.validateSchema = this.compile(metaSchema, true);\n }\n var $dataRef = {\n $ref: \"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#\"\n };\n function schemaOrData(schema) {\n return { anyOf: [schema, $dataRef] };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/core/id.js\n var require_id2 = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/core/id.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var def = {\n keyword: \"id\",\n code() {\n throw new Error('NOT SUPPORTED: keyword \"id\", use \"$id\" for schema ID');\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/core/ref.js\n var require_ref = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/core/ref.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.callRef = exports3.getValidate = void 0;\n var ref_error_1 = require_ref_error();\n var code_1 = require_code2();\n var codegen_1 = require_codegen();\n var names_1 = require_names();\n var compile_1 = require_compile();\n var util_1 = require_util2();\n var def = {\n keyword: \"$ref\",\n schemaType: \"string\",\n code(cxt) {\n const { gen: gen2, schema: $ref, it } = cxt;\n const { baseId, schemaEnv: env2, validateName, opts, self: self2 } = it;\n const { root } = env2;\n if (($ref === \"#\" || $ref === \"#/\") && baseId === root.baseId)\n return callRootRef();\n const schOrEnv = compile_1.resolveRef.call(self2, root, baseId, $ref);\n if (schOrEnv === void 0)\n throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);\n if (schOrEnv instanceof compile_1.SchemaEnv)\n return callValidate(schOrEnv);\n return inlineRefSchema(schOrEnv);\n function callRootRef() {\n if (env2 === root)\n return callRef(cxt, validateName, env2, env2.$async);\n const rootName = gen2.scopeValue(\"root\", { ref: root });\n return callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root, root.$async);\n }\n function callValidate(sch) {\n const v2 = getValidate(cxt, sch);\n callRef(cxt, v2, sch, sch.$async);\n }\n function inlineRefSchema(sch) {\n const schName = gen2.scopeValue(\"schema\", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch });\n const valid = gen2.name(\"valid\");\n const schCxt = cxt.subschema({\n schema: sch,\n dataTypes: [],\n schemaPath: codegen_1.nil,\n topSchemaRef: schName,\n errSchemaPath: $ref\n }, valid);\n cxt.mergeEvaluated(schCxt);\n cxt.ok(valid);\n }\n }\n };\n function getValidate(cxt, sch) {\n const { gen: gen2 } = cxt;\n return sch.validate ? gen2.scopeValue(\"validate\", { ref: sch.validate }) : (0, codegen_1._)`${gen2.scopeValue(\"wrapper\", { ref: sch })}.validate`;\n }\n exports3.getValidate = getValidate;\n function callRef(cxt, v2, sch, $async) {\n const { gen: gen2, it } = cxt;\n const { allErrors, schemaEnv: env2, opts } = it;\n const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;\n if ($async)\n callAsyncRef();\n else\n callSyncRef();\n function callAsyncRef() {\n if (!env2.$async)\n throw new Error(\"async schema referenced by sync schema\");\n const valid = gen2.let(\"valid\");\n gen2.try(() => {\n gen2.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v2, passCxt)}`);\n addEvaluatedFrom(v2);\n if (!allErrors)\n gen2.assign(valid, true);\n }, (e2) => {\n gen2.if((0, codegen_1._)`!(${e2} instanceof ${it.ValidationError})`, () => gen2.throw(e2));\n addErrorsFrom(e2);\n if (!allErrors)\n gen2.assign(valid, false);\n });\n cxt.ok(valid);\n }\n function callSyncRef() {\n cxt.result((0, code_1.callValidateCode)(cxt, v2, passCxt), () => addEvaluatedFrom(v2), () => addErrorsFrom(v2));\n }\n function addErrorsFrom(source) {\n const errs = (0, codegen_1._)`${source}.errors`;\n gen2.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`);\n gen2.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);\n }\n function addEvaluatedFrom(source) {\n var _a;\n if (!it.opts.unevaluated)\n return;\n const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;\n if (it.props !== true) {\n if (schEvaluated && !schEvaluated.dynamicProps) {\n if (schEvaluated.props !== void 0) {\n it.props = util_1.mergeEvaluated.props(gen2, schEvaluated.props, it.props);\n }\n } else {\n const props = gen2.var(\"props\", (0, codegen_1._)`${source}.evaluated.props`);\n it.props = util_1.mergeEvaluated.props(gen2, props, it.props, codegen_1.Name);\n }\n }\n if (it.items !== true) {\n if (schEvaluated && !schEvaluated.dynamicItems) {\n if (schEvaluated.items !== void 0) {\n it.items = util_1.mergeEvaluated.items(gen2, schEvaluated.items, it.items);\n }\n } else {\n const items = gen2.var(\"items\", (0, codegen_1._)`${source}.evaluated.items`);\n it.items = util_1.mergeEvaluated.items(gen2, items, it.items, codegen_1.Name);\n }\n }\n }\n }\n exports3.callRef = callRef;\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/core/index.js\n var require_core2 = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/core/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var id_1 = require_id2();\n var ref_1 = require_ref();\n var core = [\n \"$schema\",\n \"$id\",\n \"$defs\",\n \"$vocabulary\",\n { keyword: \"$comment\" },\n \"definitions\",\n id_1.default,\n ref_1.default\n ];\n exports3.default = core;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitNumber.js\n var require_limitNumber = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitNumber.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var codegen_1 = require_codegen();\n var ops = codegen_1.operators;\n var KWDs = {\n maximum: { okStr: \"<=\", ok: ops.LTE, fail: ops.GT },\n minimum: { okStr: \">=\", ok: ops.GTE, fail: ops.LT },\n exclusiveMaximum: { okStr: \"<\", ok: ops.LT, fail: ops.GTE },\n exclusiveMinimum: { okStr: \">\", ok: ops.GT, fail: ops.LTE }\n };\n var error = {\n message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`,\n params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`\n };\n var def = {\n keyword: Object.keys(KWDs),\n type: \"number\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode } = cxt;\n cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/multipleOf.js\n var require_multipleOf = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/multipleOf.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var codegen_1 = require_codegen();\n var error = {\n message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,\n params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}`\n };\n var def = {\n keyword: \"multipleOf\",\n type: \"number\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { gen: gen2, data, schemaCode, it } = cxt;\n const prec = it.opts.multipleOfPrecision;\n const res = gen2.let(\"res\");\n const invalid = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`;\n cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`);\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/ucs2length.js\n var require_ucs2length = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/ucs2length.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n function ucs2length(str) {\n const len = str.length;\n let length = 0;\n let pos = 0;\n let value;\n while (pos < len) {\n length++;\n value = str.charCodeAt(pos++);\n if (value >= 55296 && value <= 56319 && pos < len) {\n value = str.charCodeAt(pos);\n if ((value & 64512) === 56320)\n pos++;\n }\n }\n return length;\n }\n exports3.default = ucs2length;\n ucs2length.code = 'require(\"ajv/dist/runtime/ucs2length\").default';\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitLength.js\n var require_limitLength = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitLength.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n var ucs2length_1 = require_ucs2length();\n var error = {\n message({ keyword, schemaCode }) {\n const comp = keyword === \"maxLength\" ? \"more\" : \"fewer\";\n return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`;\n },\n params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`\n };\n var def = {\n keyword: [\"maxLength\", \"minLength\"],\n type: \"string\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode, it } = cxt;\n const op = keyword === \"maxLength\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n const len = it.opts.unicode === false ? (0, codegen_1._)`${data}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`;\n cxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`);\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/pattern.js\n var require_pattern = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/pattern.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var code_1 = require_code2();\n var codegen_1 = require_codegen();\n var error = {\n message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern \"${schemaCode}\"`,\n params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}`\n };\n var def = {\n keyword: \"pattern\",\n type: \"string\",\n schemaType: \"string\",\n $data: true,\n error,\n code(cxt) {\n const { data, $data, schema, schemaCode, it } = cxt;\n const u2 = it.opts.unicodeRegExp ? \"u\" : \"\";\n const regExp = $data ? (0, codegen_1._)`(new RegExp(${schemaCode}, ${u2}))` : (0, code_1.usePattern)(cxt, schema);\n cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitProperties.js\n var require_limitProperties = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitProperties.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var codegen_1 = require_codegen();\n var error = {\n message({ keyword, schemaCode }) {\n const comp = keyword === \"maxProperties\" ? \"more\" : \"fewer\";\n return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`;\n },\n params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`\n };\n var def = {\n keyword: [\"maxProperties\", \"minProperties\"],\n type: \"object\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode } = cxt;\n const op = keyword === \"maxProperties\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n cxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`);\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/required.js\n var require_required = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/required.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var code_1 = require_code2();\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n var error = {\n message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`,\n params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}`\n };\n var def = {\n keyword: \"required\",\n type: \"object\",\n schemaType: \"array\",\n $data: true,\n error,\n code(cxt) {\n const { gen: gen2, schema, schemaCode, data, $data, it } = cxt;\n const { opts } = it;\n if (!$data && schema.length === 0)\n return;\n const useLoop = schema.length >= opts.loopRequired;\n if (it.allErrors)\n allErrorsMode();\n else\n exitOnErrorMode();\n if (opts.strictRequired) {\n const props = cxt.parentSchema.properties;\n const { definedProperties } = cxt.it;\n for (const requiredKey of schema) {\n if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) {\n const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;\n const msg = `required property \"${requiredKey}\" is not defined at \"${schemaPath}\" (strictRequired)`;\n (0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired);\n }\n }\n }\n function allErrorsMode() {\n if (useLoop || $data) {\n cxt.block$data(codegen_1.nil, loopAllRequired);\n } else {\n for (const prop of schema) {\n (0, code_1.checkReportMissingProp)(cxt, prop);\n }\n }\n }\n function exitOnErrorMode() {\n const missing = gen2.let(\"missing\");\n if (useLoop || $data) {\n const valid = gen2.let(\"valid\", true);\n cxt.block$data(valid, () => loopUntilMissing(missing, valid));\n cxt.ok(valid);\n } else {\n gen2.if((0, code_1.checkMissingProp)(cxt, schema, missing));\n (0, code_1.reportMissingProp)(cxt, missing);\n gen2.else();\n }\n }\n function loopAllRequired() {\n gen2.forOf(\"prop\", schemaCode, (prop) => {\n cxt.setParams({ missingProperty: prop });\n gen2.if((0, code_1.noPropertyInData)(gen2, data, prop, opts.ownProperties), () => cxt.error());\n });\n }\n function loopUntilMissing(missing, valid) {\n cxt.setParams({ missingProperty: missing });\n gen2.forOf(missing, schemaCode, () => {\n gen2.assign(valid, (0, code_1.propertyInData)(gen2, data, missing, opts.ownProperties));\n gen2.if((0, codegen_1.not)(valid), () => {\n cxt.error();\n gen2.break();\n });\n }, codegen_1.nil);\n }\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitItems.js\n var require_limitItems = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/limitItems.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var codegen_1 = require_codegen();\n var error = {\n message({ keyword, schemaCode }) {\n const comp = keyword === \"maxItems\" ? \"more\" : \"fewer\";\n return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`;\n },\n params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`\n };\n var def = {\n keyword: [\"maxItems\", \"minItems\"],\n type: \"array\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode } = cxt;\n const op = keyword === \"maxItems\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n cxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`);\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/equal.js\n var require_equal = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/runtime/equal.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var equal = require_fast_deep_equal();\n equal.code = 'require(\"ajv/dist/runtime/equal\").default';\n exports3.default = equal;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js\n var require_uniqueItems = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var dataType_1 = require_dataType();\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n var equal_1 = require_equal();\n var error = {\n message: ({ params: { i: i3, j: j2 } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j2} and ${i3} are identical)`,\n params: ({ params: { i: i3, j: j2 } }) => (0, codegen_1._)`{i: ${i3}, j: ${j2}}`\n };\n var def = {\n keyword: \"uniqueItems\",\n type: \"array\",\n schemaType: \"boolean\",\n $data: true,\n error,\n code(cxt) {\n const { gen: gen2, data, $data, schema, parentSchema, schemaCode, it } = cxt;\n if (!$data && !schema)\n return;\n const valid = gen2.let(\"valid\");\n const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : [];\n cxt.block$data(valid, validateUniqueItems, (0, codegen_1._)`${schemaCode} === false`);\n cxt.ok(valid);\n function validateUniqueItems() {\n const i3 = gen2.let(\"i\", (0, codegen_1._)`${data}.length`);\n const j2 = gen2.let(\"j\");\n cxt.setParams({ i: i3, j: j2 });\n gen2.assign(valid, true);\n gen2.if((0, codegen_1._)`${i3} > 1`, () => (canOptimize() ? loopN : loopN2)(i3, j2));\n }\n function canOptimize() {\n return itemTypes.length > 0 && !itemTypes.some((t3) => t3 === \"object\" || t3 === \"array\");\n }\n function loopN(i3, j2) {\n const item = gen2.name(\"item\");\n const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong);\n const indices = gen2.const(\"indices\", (0, codegen_1._)`{}`);\n gen2.for((0, codegen_1._)`;${i3}--;`, () => {\n gen2.let(item, (0, codegen_1._)`${data}[${i3}]`);\n gen2.if(wrongType, (0, codegen_1._)`continue`);\n if (itemTypes.length > 1)\n gen2.if((0, codegen_1._)`typeof ${item} == \"string\"`, (0, codegen_1._)`${item} += \"_\"`);\n gen2.if((0, codegen_1._)`typeof ${indices}[${item}] == \"number\"`, () => {\n gen2.assign(j2, (0, codegen_1._)`${indices}[${item}]`);\n cxt.error();\n gen2.assign(valid, false).break();\n }).code((0, codegen_1._)`${indices}[${item}] = ${i3}`);\n });\n }\n function loopN2(i3, j2) {\n const eql = (0, util_1.useFunc)(gen2, equal_1.default);\n const outer = gen2.name(\"outer\");\n gen2.label(outer).for((0, codegen_1._)`;${i3}--;`, () => gen2.for((0, codegen_1._)`${j2} = ${i3}; ${j2}--;`, () => gen2.if((0, codegen_1._)`${eql}(${data}[${i3}], ${data}[${j2}])`, () => {\n cxt.error();\n gen2.assign(valid, false).break(outer);\n })));\n }\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/const.js\n var require_const = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/const.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n var equal_1 = require_equal();\n var error = {\n message: \"must be equal to constant\",\n params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}`\n };\n var def = {\n keyword: \"const\",\n $data: true,\n error,\n code(cxt) {\n const { gen: gen2, data, $data, schemaCode, schema } = cxt;\n if ($data || schema && typeof schema == \"object\") {\n cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen2, equal_1.default)}(${data}, ${schemaCode})`);\n } else {\n cxt.fail((0, codegen_1._)`${schema} !== ${data}`);\n }\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/enum.js\n var require_enum = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/enum.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n var equal_1 = require_equal();\n var error = {\n message: \"must be equal to one of the allowed values\",\n params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`\n };\n var def = {\n keyword: \"enum\",\n schemaType: \"array\",\n $data: true,\n error,\n code(cxt) {\n const { gen: gen2, data, $data, schema, schemaCode, it } = cxt;\n if (!$data && schema.length === 0)\n throw new Error(\"enum must have non-empty array\");\n const useLoop = schema.length >= it.opts.loopEnum;\n let eql;\n const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen2, equal_1.default);\n let valid;\n if (useLoop || $data) {\n valid = gen2.let(\"valid\");\n cxt.block$data(valid, loopEnum);\n } else {\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n const vSchema = gen2.const(\"vSchema\", schemaCode);\n valid = (0, codegen_1.or)(...schema.map((_x, i3) => equalCode(vSchema, i3)));\n }\n cxt.pass(valid);\n function loopEnum() {\n gen2.assign(valid, false);\n gen2.forOf(\"v\", schemaCode, (v2) => gen2.if((0, codegen_1._)`${getEql()}(${data}, ${v2})`, () => gen2.assign(valid, true).break()));\n }\n function equalCode(vSchema, i3) {\n const sch = schema[i3];\n return typeof sch === \"object\" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i3}])` : (0, codegen_1._)`${data} === ${sch}`;\n }\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/index.js\n var require_validation = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/validation/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var limitNumber_1 = require_limitNumber();\n var multipleOf_1 = require_multipleOf();\n var limitLength_1 = require_limitLength();\n var pattern_1 = require_pattern();\n var limitProperties_1 = require_limitProperties();\n var required_1 = require_required();\n var limitItems_1 = require_limitItems();\n var uniqueItems_1 = require_uniqueItems();\n var const_1 = require_const();\n var enum_1 = require_enum();\n var validation = [\n // number\n limitNumber_1.default,\n multipleOf_1.default,\n // string\n limitLength_1.default,\n pattern_1.default,\n // object\n limitProperties_1.default,\n required_1.default,\n // array\n limitItems_1.default,\n uniqueItems_1.default,\n // any\n { keyword: \"type\", schemaType: [\"string\", \"array\"] },\n { keyword: \"nullable\", schemaType: \"boolean\" },\n const_1.default,\n enum_1.default\n ];\n exports3.default = validation;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js\n var require_additionalItems = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.validateAdditionalItems = void 0;\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n var error = {\n message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,\n params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`\n };\n var def = {\n keyword: \"additionalItems\",\n type: \"array\",\n schemaType: [\"boolean\", \"object\"],\n before: \"uniqueItems\",\n error,\n code(cxt) {\n const { parentSchema, it } = cxt;\n const { items } = parentSchema;\n if (!Array.isArray(items)) {\n (0, util_1.checkStrictMode)(it, '\"additionalItems\" is ignored when \"items\" is not an array of schemas');\n return;\n }\n validateAdditionalItems(cxt, items);\n }\n };\n function validateAdditionalItems(cxt, items) {\n const { gen: gen2, schema, data, keyword, it } = cxt;\n it.items = true;\n const len = gen2.const(\"len\", (0, codegen_1._)`${data}.length`);\n if (schema === false) {\n cxt.setParams({ len: items.length });\n cxt.pass((0, codegen_1._)`${len} <= ${items.length}`);\n } else if (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n const valid = gen2.var(\"valid\", (0, codegen_1._)`${len} <= ${items.length}`);\n gen2.if((0, codegen_1.not)(valid), () => validateItems(valid));\n cxt.ok(valid);\n }\n function validateItems(valid) {\n gen2.forRange(\"i\", items.length, len, (i3) => {\n cxt.subschema({ keyword, dataProp: i3, dataPropType: util_1.Type.Num }, valid);\n if (!it.allErrors)\n gen2.if((0, codegen_1.not)(valid), () => gen2.break());\n });\n }\n }\n exports3.validateAdditionalItems = validateAdditionalItems;\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/items.js\n var require_items = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/items.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.validateTuple = void 0;\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n var code_1 = require_code2();\n var def = {\n keyword: \"items\",\n type: \"array\",\n schemaType: [\"object\", \"array\", \"boolean\"],\n before: \"uniqueItems\",\n code(cxt) {\n const { schema, it } = cxt;\n if (Array.isArray(schema))\n return validateTuple(cxt, \"additionalItems\", schema);\n it.items = true;\n if ((0, util_1.alwaysValidSchema)(it, schema))\n return;\n cxt.ok((0, code_1.validateArray)(cxt));\n }\n };\n function validateTuple(cxt, extraItems, schArr = cxt.schema) {\n const { gen: gen2, parentSchema, data, keyword, it } = cxt;\n checkStrictTuple(parentSchema);\n if (it.opts.unevaluated && schArr.length && it.items !== true) {\n it.items = util_1.mergeEvaluated.items(gen2, schArr.length, it.items);\n }\n const valid = gen2.name(\"valid\");\n const len = gen2.const(\"len\", (0, codegen_1._)`${data}.length`);\n schArr.forEach((sch, i3) => {\n if ((0, util_1.alwaysValidSchema)(it, sch))\n return;\n gen2.if((0, codegen_1._)`${len} > ${i3}`, () => cxt.subschema({\n keyword,\n schemaProp: i3,\n dataProp: i3\n }, valid));\n cxt.ok(valid);\n });\n function checkStrictTuple(sch) {\n const { opts, errSchemaPath } = it;\n const l6 = schArr.length;\n const fullTuple = l6 === sch.minItems && (l6 === sch.maxItems || sch[extraItems] === false);\n if (opts.strictTuples && !fullTuple) {\n const msg = `\"${keyword}\" is ${l6}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path \"${errSchemaPath}\"`;\n (0, util_1.checkStrictMode)(it, msg, opts.strictTuples);\n }\n }\n }\n exports3.validateTuple = validateTuple;\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js\n var require_prefixItems = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var items_1 = require_items();\n var def = {\n keyword: \"prefixItems\",\n type: \"array\",\n schemaType: [\"array\"],\n before: \"uniqueItems\",\n code: (cxt) => (0, items_1.validateTuple)(cxt, \"items\")\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/items2020.js\n var require_items2020 = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/items2020.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n var code_1 = require_code2();\n var additionalItems_1 = require_additionalItems();\n var error = {\n message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,\n params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`\n };\n var def = {\n keyword: \"items\",\n type: \"array\",\n schemaType: [\"object\", \"boolean\"],\n before: \"uniqueItems\",\n error,\n code(cxt) {\n const { schema, parentSchema, it } = cxt;\n const { prefixItems } = parentSchema;\n it.items = true;\n if ((0, util_1.alwaysValidSchema)(it, schema))\n return;\n if (prefixItems)\n (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems);\n else\n cxt.ok((0, code_1.validateArray)(cxt));\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/contains.js\n var require_contains = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/contains.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n var error = {\n message: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`,\n params: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}`\n };\n var def = {\n keyword: \"contains\",\n type: \"array\",\n schemaType: [\"object\", \"boolean\"],\n before: \"uniqueItems\",\n trackErrors: true,\n error,\n code(cxt) {\n const { gen: gen2, schema, parentSchema, data, it } = cxt;\n let min;\n let max;\n const { minContains, maxContains } = parentSchema;\n if (it.opts.next) {\n min = minContains === void 0 ? 1 : minContains;\n max = maxContains;\n } else {\n min = 1;\n }\n const len = gen2.const(\"len\", (0, codegen_1._)`${data}.length`);\n cxt.setParams({ min, max });\n if (max === void 0 && min === 0) {\n (0, util_1.checkStrictMode)(it, `\"minContains\" == 0 without \"maxContains\": \"contains\" keyword ignored`);\n return;\n }\n if (max !== void 0 && min > max) {\n (0, util_1.checkStrictMode)(it, `\"minContains\" > \"maxContains\" is always invalid`);\n cxt.fail();\n return;\n }\n if ((0, util_1.alwaysValidSchema)(it, schema)) {\n let cond = (0, codegen_1._)`${len} >= ${min}`;\n if (max !== void 0)\n cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`;\n cxt.pass(cond);\n return;\n }\n it.items = true;\n const valid = gen2.name(\"valid\");\n if (max === void 0 && min === 1) {\n validateItems(valid, () => gen2.if(valid, () => gen2.break()));\n } else if (min === 0) {\n gen2.let(valid, true);\n if (max !== void 0)\n gen2.if((0, codegen_1._)`${data}.length > 0`, validateItemsWithCount);\n } else {\n gen2.let(valid, false);\n validateItemsWithCount();\n }\n cxt.result(valid, () => cxt.reset());\n function validateItemsWithCount() {\n const schValid = gen2.name(\"_valid\");\n const count = gen2.let(\"count\", 0);\n validateItems(schValid, () => gen2.if(schValid, () => checkLimits(count)));\n }\n function validateItems(_valid, block) {\n gen2.forRange(\"i\", 0, len, (i3) => {\n cxt.subschema({\n keyword: \"contains\",\n dataProp: i3,\n dataPropType: util_1.Type.Num,\n compositeRule: true\n }, _valid);\n block();\n });\n }\n function checkLimits(count) {\n gen2.code((0, codegen_1._)`${count}++`);\n if (max === void 0) {\n gen2.if((0, codegen_1._)`${count} >= ${min}`, () => gen2.assign(valid, true).break());\n } else {\n gen2.if((0, codegen_1._)`${count} > ${max}`, () => gen2.assign(valid, false).break());\n if (min === 1)\n gen2.assign(valid, true);\n else\n gen2.if((0, codegen_1._)`${count} >= ${min}`, () => gen2.assign(valid, true));\n }\n }\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/dependencies.js\n var require_dependencies = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/dependencies.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.validateSchemaDeps = exports3.validatePropertyDeps = exports3.error = void 0;\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n var code_1 = require_code2();\n exports3.error = {\n message: ({ params: { property, depsCount, deps } }) => {\n const property_ies = depsCount === 1 ? \"property\" : \"properties\";\n return (0, codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`;\n },\n params: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._)`{property: ${property},\n missingProperty: ${missingProperty},\n depsCount: ${depsCount},\n deps: ${deps}}`\n // TODO change to reference\n };\n var def = {\n keyword: \"dependencies\",\n type: \"object\",\n schemaType: \"object\",\n error: exports3.error,\n code(cxt) {\n const [propDeps, schDeps] = splitDependencies(cxt);\n validatePropertyDeps(cxt, propDeps);\n validateSchemaDeps(cxt, schDeps);\n }\n };\n function splitDependencies({ schema }) {\n const propertyDeps = {};\n const schemaDeps = {};\n for (const key in schema) {\n if (key === \"__proto__\")\n continue;\n const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps;\n deps[key] = schema[key];\n }\n return [propertyDeps, schemaDeps];\n }\n function validatePropertyDeps(cxt, propertyDeps = cxt.schema) {\n const { gen: gen2, data, it } = cxt;\n if (Object.keys(propertyDeps).length === 0)\n return;\n const missing = gen2.let(\"missing\");\n for (const prop in propertyDeps) {\n const deps = propertyDeps[prop];\n if (deps.length === 0)\n continue;\n const hasProperty = (0, code_1.propertyInData)(gen2, data, prop, it.opts.ownProperties);\n cxt.setParams({\n property: prop,\n depsCount: deps.length,\n deps: deps.join(\", \")\n });\n if (it.allErrors) {\n gen2.if(hasProperty, () => {\n for (const depProp of deps) {\n (0, code_1.checkReportMissingProp)(cxt, depProp);\n }\n });\n } else {\n gen2.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`);\n (0, code_1.reportMissingProp)(cxt, missing);\n gen2.else();\n }\n }\n }\n exports3.validatePropertyDeps = validatePropertyDeps;\n function validateSchemaDeps(cxt, schemaDeps = cxt.schema) {\n const { gen: gen2, data, keyword, it } = cxt;\n const valid = gen2.name(\"valid\");\n for (const prop in schemaDeps) {\n if ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop]))\n continue;\n gen2.if(\n (0, code_1.propertyInData)(gen2, data, prop, it.opts.ownProperties),\n () => {\n const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid);\n cxt.mergeValidEvaluated(schCxt, valid);\n },\n () => gen2.var(valid, true)\n // TODO var\n );\n cxt.ok(valid);\n }\n }\n exports3.validateSchemaDeps = validateSchemaDeps;\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js\n var require_propertyNames = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n var error = {\n message: \"property name must be valid\",\n params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}`\n };\n var def = {\n keyword: \"propertyNames\",\n type: \"object\",\n schemaType: [\"object\", \"boolean\"],\n error,\n code(cxt) {\n const { gen: gen2, schema, data, it } = cxt;\n if ((0, util_1.alwaysValidSchema)(it, schema))\n return;\n const valid = gen2.name(\"valid\");\n gen2.forIn(\"key\", data, (key) => {\n cxt.setParams({ propertyName: key });\n cxt.subschema({\n keyword: \"propertyNames\",\n data: key,\n dataTypes: [\"string\"],\n propertyName: key,\n compositeRule: true\n }, valid);\n gen2.if((0, codegen_1.not)(valid), () => {\n cxt.error(true);\n if (!it.allErrors)\n gen2.break();\n });\n });\n cxt.ok(valid);\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js\n var require_additionalProperties = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var code_1 = require_code2();\n var codegen_1 = require_codegen();\n var names_1 = require_names();\n var util_1 = require_util2();\n var error = {\n message: \"must NOT have additional properties\",\n params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}`\n };\n var def = {\n keyword: \"additionalProperties\",\n type: [\"object\"],\n schemaType: [\"boolean\", \"object\"],\n allowUndefined: true,\n trackErrors: true,\n error,\n code(cxt) {\n const { gen: gen2, schema, parentSchema, data, errsCount, it } = cxt;\n if (!errsCount)\n throw new Error(\"ajv implementation error\");\n const { allErrors, opts } = it;\n it.props = true;\n if (opts.removeAdditional !== \"all\" && (0, util_1.alwaysValidSchema)(it, schema))\n return;\n const props = (0, code_1.allSchemaProperties)(parentSchema.properties);\n const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties);\n checkAdditionalProperties();\n cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);\n function checkAdditionalProperties() {\n gen2.forIn(\"key\", data, (key) => {\n if (!props.length && !patProps.length)\n additionalPropertyCode(key);\n else\n gen2.if(isAdditional(key), () => additionalPropertyCode(key));\n });\n }\n function isAdditional(key) {\n let definedProp;\n if (props.length > 8) {\n const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, \"properties\");\n definedProp = (0, code_1.isOwnProperty)(gen2, propsSchema, key);\n } else if (props.length) {\n definedProp = (0, codegen_1.or)(...props.map((p4) => (0, codegen_1._)`${key} === ${p4}`));\n } else {\n definedProp = codegen_1.nil;\n }\n if (patProps.length) {\n definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p4) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p4)}.test(${key})`));\n }\n return (0, codegen_1.not)(definedProp);\n }\n function deleteAdditional(key) {\n gen2.code((0, codegen_1._)`delete ${data}[${key}]`);\n }\n function additionalPropertyCode(key) {\n if (opts.removeAdditional === \"all\" || opts.removeAdditional && schema === false) {\n deleteAdditional(key);\n return;\n }\n if (schema === false) {\n cxt.setParams({ additionalProperty: key });\n cxt.error();\n if (!allErrors)\n gen2.break();\n return;\n }\n if (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n const valid = gen2.name(\"valid\");\n if (opts.removeAdditional === \"failing\") {\n applyAdditionalSchema(key, valid, false);\n gen2.if((0, codegen_1.not)(valid), () => {\n cxt.reset();\n deleteAdditional(key);\n });\n } else {\n applyAdditionalSchema(key, valid);\n if (!allErrors)\n gen2.if((0, codegen_1.not)(valid), () => gen2.break());\n }\n }\n }\n function applyAdditionalSchema(key, valid, errors) {\n const subschema = {\n keyword: \"additionalProperties\",\n dataProp: key,\n dataPropType: util_1.Type.Str\n };\n if (errors === false) {\n Object.assign(subschema, {\n compositeRule: true,\n createErrors: false,\n allErrors: false\n });\n }\n cxt.subschema(subschema, valid);\n }\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/properties.js\n var require_properties = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/properties.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var validate_1 = require_validate();\n var code_1 = require_code2();\n var util_1 = require_util2();\n var additionalProperties_1 = require_additionalProperties();\n var def = {\n keyword: \"properties\",\n type: \"object\",\n schemaType: \"object\",\n code(cxt) {\n const { gen: gen2, schema, parentSchema, data, it } = cxt;\n if (it.opts.removeAdditional === \"all\" && parentSchema.additionalProperties === void 0) {\n additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, \"additionalProperties\"));\n }\n const allProps = (0, code_1.allSchemaProperties)(schema);\n for (const prop of allProps) {\n it.definedProperties.add(prop);\n }\n if (it.opts.unevaluated && allProps.length && it.props !== true) {\n it.props = util_1.mergeEvaluated.props(gen2, (0, util_1.toHash)(allProps), it.props);\n }\n const properties = allProps.filter((p4) => !(0, util_1.alwaysValidSchema)(it, schema[p4]));\n if (properties.length === 0)\n return;\n const valid = gen2.name(\"valid\");\n for (const prop of properties) {\n if (hasDefault(prop)) {\n applyPropertySchema(prop);\n } else {\n gen2.if((0, code_1.propertyInData)(gen2, data, prop, it.opts.ownProperties));\n applyPropertySchema(prop);\n if (!it.allErrors)\n gen2.else().var(valid, true);\n gen2.endIf();\n }\n cxt.it.definedProperties.add(prop);\n cxt.ok(valid);\n }\n function hasDefault(prop) {\n return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== void 0;\n }\n function applyPropertySchema(prop) {\n cxt.subschema({\n keyword: \"properties\",\n schemaProp: prop,\n dataProp: prop\n }, valid);\n }\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js\n var require_patternProperties = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var code_1 = require_code2();\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n var util_2 = require_util2();\n var def = {\n keyword: \"patternProperties\",\n type: \"object\",\n schemaType: \"object\",\n code(cxt) {\n const { gen: gen2, schema, data, parentSchema, it } = cxt;\n const { opts } = it;\n const patterns = (0, code_1.allSchemaProperties)(schema);\n const alwaysValidPatterns = patterns.filter((p4) => (0, util_1.alwaysValidSchema)(it, schema[p4]));\n if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) {\n return;\n }\n const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties;\n const valid = gen2.name(\"valid\");\n if (it.props !== true && !(it.props instanceof codegen_1.Name)) {\n it.props = (0, util_2.evaluatedPropsToName)(gen2, it.props);\n }\n const { props } = it;\n validatePatternProperties();\n function validatePatternProperties() {\n for (const pat of patterns) {\n if (checkProperties)\n checkMatchingProperties(pat);\n if (it.allErrors) {\n validateProperties(pat);\n } else {\n gen2.var(valid, true);\n validateProperties(pat);\n gen2.if(valid);\n }\n }\n }\n function checkMatchingProperties(pat) {\n for (const prop in checkProperties) {\n if (new RegExp(pat).test(prop)) {\n (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`);\n }\n }\n }\n function validateProperties(pat) {\n gen2.forIn(\"key\", data, (key) => {\n gen2.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => {\n const alwaysValid = alwaysValidPatterns.includes(pat);\n if (!alwaysValid) {\n cxt.subschema({\n keyword: \"patternProperties\",\n schemaProp: pat,\n dataProp: key,\n dataPropType: util_2.Type.Str\n }, valid);\n }\n if (it.opts.unevaluated && props !== true) {\n gen2.assign((0, codegen_1._)`${props}[${key}]`, true);\n } else if (!alwaysValid && !it.allErrors) {\n gen2.if((0, codegen_1.not)(valid), () => gen2.break());\n }\n });\n });\n }\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/not.js\n var require_not = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/not.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var util_1 = require_util2();\n var def = {\n keyword: \"not\",\n schemaType: [\"object\", \"boolean\"],\n trackErrors: true,\n code(cxt) {\n const { gen: gen2, schema, it } = cxt;\n if ((0, util_1.alwaysValidSchema)(it, schema)) {\n cxt.fail();\n return;\n }\n const valid = gen2.name(\"valid\");\n cxt.subschema({\n keyword: \"not\",\n compositeRule: true,\n createErrors: false,\n allErrors: false\n }, valid);\n cxt.failResult(valid, () => cxt.reset(), () => cxt.error());\n },\n error: { message: \"must NOT be valid\" }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/anyOf.js\n var require_anyOf = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/anyOf.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var code_1 = require_code2();\n var def = {\n keyword: \"anyOf\",\n schemaType: \"array\",\n trackErrors: true,\n code: code_1.validateUnion,\n error: { message: \"must match a schema in anyOf\" }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/oneOf.js\n var require_oneOf = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/oneOf.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n var error = {\n message: \"must match exactly one schema in oneOf\",\n params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}`\n };\n var def = {\n keyword: \"oneOf\",\n schemaType: \"array\",\n trackErrors: true,\n error,\n code(cxt) {\n const { gen: gen2, schema, parentSchema, it } = cxt;\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n if (it.opts.discriminator && parentSchema.discriminator)\n return;\n const schArr = schema;\n const valid = gen2.let(\"valid\", false);\n const passing = gen2.let(\"passing\", null);\n const schValid = gen2.name(\"_valid\");\n cxt.setParams({ passing });\n gen2.block(validateOneOf);\n cxt.result(valid, () => cxt.reset(), () => cxt.error(true));\n function validateOneOf() {\n schArr.forEach((sch, i3) => {\n let schCxt;\n if ((0, util_1.alwaysValidSchema)(it, sch)) {\n gen2.var(schValid, true);\n } else {\n schCxt = cxt.subschema({\n keyword: \"oneOf\",\n schemaProp: i3,\n compositeRule: true\n }, schValid);\n }\n if (i3 > 0) {\n gen2.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1._)`[${passing}, ${i3}]`).else();\n }\n gen2.if(schValid, () => {\n gen2.assign(valid, true);\n gen2.assign(passing, i3);\n if (schCxt)\n cxt.mergeEvaluated(schCxt, codegen_1.Name);\n });\n });\n }\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/allOf.js\n var require_allOf = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/allOf.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var util_1 = require_util2();\n var def = {\n keyword: \"allOf\",\n schemaType: \"array\",\n code(cxt) {\n const { gen: gen2, schema, it } = cxt;\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n const valid = gen2.name(\"valid\");\n schema.forEach((sch, i3) => {\n if ((0, util_1.alwaysValidSchema)(it, sch))\n return;\n const schCxt = cxt.subschema({ keyword: \"allOf\", schemaProp: i3 }, valid);\n cxt.ok(valid);\n cxt.mergeEvaluated(schCxt);\n });\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/if.js\n var require_if = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/if.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var codegen_1 = require_codegen();\n var util_1 = require_util2();\n var error = {\n message: ({ params }) => (0, codegen_1.str)`must match \"${params.ifClause}\" schema`,\n params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}`\n };\n var def = {\n keyword: \"if\",\n schemaType: [\"object\", \"boolean\"],\n trackErrors: true,\n error,\n code(cxt) {\n const { gen: gen2, parentSchema, it } = cxt;\n if (parentSchema.then === void 0 && parentSchema.else === void 0) {\n (0, util_1.checkStrictMode)(it, '\"if\" without \"then\" and \"else\" is ignored');\n }\n const hasThen = hasSchema(it, \"then\");\n const hasElse = hasSchema(it, \"else\");\n if (!hasThen && !hasElse)\n return;\n const valid = gen2.let(\"valid\", true);\n const schValid = gen2.name(\"_valid\");\n validateIf();\n cxt.reset();\n if (hasThen && hasElse) {\n const ifClause = gen2.let(\"ifClause\");\n cxt.setParams({ ifClause });\n gen2.if(schValid, validateClause(\"then\", ifClause), validateClause(\"else\", ifClause));\n } else if (hasThen) {\n gen2.if(schValid, validateClause(\"then\"));\n } else {\n gen2.if((0, codegen_1.not)(schValid), validateClause(\"else\"));\n }\n cxt.pass(valid, () => cxt.error(true));\n function validateIf() {\n const schCxt = cxt.subschema({\n keyword: \"if\",\n compositeRule: true,\n createErrors: false,\n allErrors: false\n }, schValid);\n cxt.mergeEvaluated(schCxt);\n }\n function validateClause(keyword, ifClause) {\n return () => {\n const schCxt = cxt.subschema({ keyword }, schValid);\n gen2.assign(valid, schValid);\n cxt.mergeValidEvaluated(schCxt, valid);\n if (ifClause)\n gen2.assign(ifClause, (0, codegen_1._)`${keyword}`);\n else\n cxt.setParams({ ifClause: keyword });\n };\n }\n }\n };\n function hasSchema(it, keyword) {\n const schema = it.schema[keyword];\n return schema !== void 0 && !(0, util_1.alwaysValidSchema)(it, schema);\n }\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/thenElse.js\n var require_thenElse = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/thenElse.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var util_1 = require_util2();\n var def = {\n keyword: [\"then\", \"else\"],\n schemaType: [\"object\", \"boolean\"],\n code({ keyword, parentSchema, it }) {\n if (parentSchema.if === void 0)\n (0, util_1.checkStrictMode)(it, `\"${keyword}\" without \"if\" is ignored`);\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/index.js\n var require_applicator = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/applicator/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var additionalItems_1 = require_additionalItems();\n var prefixItems_1 = require_prefixItems();\n var items_1 = require_items();\n var items2020_1 = require_items2020();\n var contains_1 = require_contains();\n var dependencies_1 = require_dependencies();\n var propertyNames_1 = require_propertyNames();\n var additionalProperties_1 = require_additionalProperties();\n var properties_1 = require_properties();\n var patternProperties_1 = require_patternProperties();\n var not_1 = require_not();\n var anyOf_1 = require_anyOf();\n var oneOf_1 = require_oneOf();\n var allOf_1 = require_allOf();\n var if_1 = require_if();\n var thenElse_1 = require_thenElse();\n function getApplicator(draft2020 = false) {\n const applicator = [\n // any\n not_1.default,\n anyOf_1.default,\n oneOf_1.default,\n allOf_1.default,\n if_1.default,\n thenElse_1.default,\n // object\n propertyNames_1.default,\n additionalProperties_1.default,\n dependencies_1.default,\n properties_1.default,\n patternProperties_1.default\n ];\n if (draft2020)\n applicator.push(prefixItems_1.default, items2020_1.default);\n else\n applicator.push(additionalItems_1.default, items_1.default);\n applicator.push(contains_1.default);\n return applicator;\n }\n exports3.default = getApplicator;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/format/format.js\n var require_format = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/format/format.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var codegen_1 = require_codegen();\n var error = {\n message: ({ schemaCode }) => (0, codegen_1.str)`must match format \"${schemaCode}\"`,\n params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}`\n };\n var def = {\n keyword: \"format\",\n type: [\"number\", \"string\"],\n schemaType: \"string\",\n $data: true,\n error,\n code(cxt, ruleType) {\n const { gen: gen2, data, $data, schema, schemaCode, it } = cxt;\n const { opts, errSchemaPath, schemaEnv, self: self2 } = it;\n if (!opts.validateFormats)\n return;\n if ($data)\n validate$DataFormat();\n else\n validateFormat();\n function validate$DataFormat() {\n const fmts = gen2.scopeValue(\"formats\", {\n ref: self2.formats,\n code: opts.code.formats\n });\n const fDef = gen2.const(\"fDef\", (0, codegen_1._)`${fmts}[${schemaCode}]`);\n const fType = gen2.let(\"fType\");\n const format = gen2.let(\"format\");\n gen2.if((0, codegen_1._)`typeof ${fDef} == \"object\" && !(${fDef} instanceof RegExp)`, () => gen2.assign(fType, (0, codegen_1._)`${fDef}.type || \"string\"`).assign(format, (0, codegen_1._)`${fDef}.validate`), () => gen2.assign(fType, (0, codegen_1._)`\"string\"`).assign(format, fDef));\n cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt()));\n function unknownFmt() {\n if (opts.strictSchema === false)\n return codegen_1.nil;\n return (0, codegen_1._)`${schemaCode} && !${format}`;\n }\n function invalidFmt() {\n const callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` : (0, codegen_1._)`${format}(${data})`;\n const validData = (0, codegen_1._)`(typeof ${format} == \"function\" ? ${callFormat} : ${format}.test(${data}))`;\n return (0, codegen_1._)`${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`;\n }\n }\n function validateFormat() {\n const formatDef = self2.formats[schema];\n if (!formatDef) {\n unknownFormat();\n return;\n }\n if (formatDef === true)\n return;\n const [fmtType, format, fmtRef] = getFormat(formatDef);\n if (fmtType === ruleType)\n cxt.pass(validCondition());\n function unknownFormat() {\n if (opts.strictSchema === false) {\n self2.logger.warn(unknownMsg());\n return;\n }\n throw new Error(unknownMsg());\n function unknownMsg() {\n return `unknown format \"${schema}\" ignored in schema at path \"${errSchemaPath}\"`;\n }\n }\n function getFormat(fmtDef) {\n const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` : void 0;\n const fmt = gen2.scopeValue(\"formats\", { key: schema, ref: fmtDef, code });\n if (typeof fmtDef == \"object\" && !(fmtDef instanceof RegExp)) {\n return [fmtDef.type || \"string\", fmtDef.validate, (0, codegen_1._)`${fmt}.validate`];\n }\n return [\"string\", fmtDef, fmt];\n }\n function validCondition() {\n if (typeof formatDef == \"object\" && !(formatDef instanceof RegExp) && formatDef.async) {\n if (!schemaEnv.$async)\n throw new Error(\"async format in sync schema\");\n return (0, codegen_1._)`await ${fmtRef}(${data})`;\n }\n return typeof format == \"function\" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`;\n }\n }\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/format/index.js\n var require_format2 = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/format/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var format_1 = require_format();\n var format = [format_1.default];\n exports3.default = format;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/metadata.js\n var require_metadata = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/metadata.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.contentVocabulary = exports3.metadataVocabulary = void 0;\n exports3.metadataVocabulary = [\n \"title\",\n \"description\",\n \"default\",\n \"deprecated\",\n \"readOnly\",\n \"writeOnly\",\n \"examples\"\n ];\n exports3.contentVocabulary = [\n \"contentMediaType\",\n \"contentEncoding\",\n \"contentSchema\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/draft7.js\n var require_draft7 = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/draft7.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var core_1 = require_core2();\n var validation_1 = require_validation();\n var applicator_1 = require_applicator();\n var format_1 = require_format2();\n var metadata_1 = require_metadata();\n var draft7Vocabularies = [\n core_1.default,\n validation_1.default,\n (0, applicator_1.default)(),\n format_1.default,\n metadata_1.metadataVocabulary,\n metadata_1.contentVocabulary\n ];\n exports3.default = draft7Vocabularies;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/discriminator/types.js\n var require_types4 = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/discriminator/types.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.DiscrError = void 0;\n var DiscrError;\n (function(DiscrError2) {\n DiscrError2[\"Tag\"] = \"tag\";\n DiscrError2[\"Mapping\"] = \"mapping\";\n })(DiscrError || (exports3.DiscrError = DiscrError = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/discriminator/index.js\n var require_discriminator = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/vocabularies/discriminator/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var codegen_1 = require_codegen();\n var types_1 = require_types4();\n var compile_1 = require_compile();\n var ref_error_1 = require_ref_error();\n var util_1 = require_util2();\n var error = {\n message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag \"${tagName}\" must be string` : `value of tag \"${tagName}\" must be in oneOf`,\n params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`\n };\n var def = {\n keyword: \"discriminator\",\n type: \"object\",\n schemaType: \"object\",\n error,\n code(cxt) {\n const { gen: gen2, data, schema, parentSchema, it } = cxt;\n const { oneOf } = parentSchema;\n if (!it.opts.discriminator) {\n throw new Error(\"discriminator: requires discriminator option\");\n }\n const tagName = schema.propertyName;\n if (typeof tagName != \"string\")\n throw new Error(\"discriminator: requires propertyName\");\n if (schema.mapping)\n throw new Error(\"discriminator: mapping is not supported\");\n if (!oneOf)\n throw new Error(\"discriminator: requires oneOf keyword\");\n const valid = gen2.let(\"valid\", false);\n const tag = gen2.const(\"tag\", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(tagName)}`);\n gen2.if((0, codegen_1._)`typeof ${tag} == \"string\"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName }));\n cxt.ok(valid);\n function validateMapping() {\n const mapping = getMapping();\n gen2.if(false);\n for (const tagValue in mapping) {\n gen2.elseIf((0, codegen_1._)`${tag} === ${tagValue}`);\n gen2.assign(valid, applyTagSchema(mapping[tagValue]));\n }\n gen2.else();\n cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName });\n gen2.endIf();\n }\n function applyTagSchema(schemaProp) {\n const _valid = gen2.name(\"valid\");\n const schCxt = cxt.subschema({ keyword: \"oneOf\", schemaProp }, _valid);\n cxt.mergeEvaluated(schCxt, codegen_1.Name);\n return _valid;\n }\n function getMapping() {\n var _a;\n const oneOfMapping = {};\n const topRequired = hasRequired(parentSchema);\n let tagRequired = true;\n for (let i3 = 0; i3 < oneOf.length; i3++) {\n let sch = oneOf[i3];\n if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {\n const ref = sch.$ref;\n sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);\n if (sch instanceof compile_1.SchemaEnv)\n sch = sch.schema;\n if (sch === void 0)\n throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);\n }\n const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];\n if (typeof propSch != \"object\") {\n throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have \"properties/${tagName}\"`);\n }\n tagRequired = tagRequired && (topRequired || hasRequired(sch));\n addMappings(propSch, i3);\n }\n if (!tagRequired)\n throw new Error(`discriminator: \"${tagName}\" must be required`);\n return oneOfMapping;\n function hasRequired({ required }) {\n return Array.isArray(required) && required.includes(tagName);\n }\n function addMappings(sch, i3) {\n if (sch.const) {\n addMapping(sch.const, i3);\n } else if (sch.enum) {\n for (const tagValue of sch.enum) {\n addMapping(tagValue, i3);\n }\n } else {\n throw new Error(`discriminator: \"properties/${tagName}\" must have \"const\" or \"enum\"`);\n }\n }\n function addMapping(tagValue, i3) {\n if (typeof tagValue != \"string\" || tagValue in oneOfMapping) {\n throw new Error(`discriminator: \"${tagName}\" values must be unique strings`);\n }\n oneOfMapping[tagValue] = i3;\n }\n }\n }\n };\n exports3.default = def;\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/refs/json-schema-draft-07.json\n var require_json_schema_draft_07 = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/refs/json-schema-draft-07.json\"(exports3, module) {\n module.exports = {\n $schema: \"http://json-schema.org/draft-07/schema#\",\n $id: \"http://json-schema.org/draft-07/schema#\",\n title: \"Core schema meta-schema\",\n definitions: {\n schemaArray: {\n type: \"array\",\n minItems: 1,\n items: { $ref: \"#\" }\n },\n nonNegativeInteger: {\n type: \"integer\",\n minimum: 0\n },\n nonNegativeIntegerDefault0: {\n allOf: [{ $ref: \"#/definitions/nonNegativeInteger\" }, { default: 0 }]\n },\n simpleTypes: {\n enum: [\"array\", \"boolean\", \"integer\", \"null\", \"number\", \"object\", \"string\"]\n },\n stringArray: {\n type: \"array\",\n items: { type: \"string\" },\n uniqueItems: true,\n default: []\n }\n },\n type: [\"object\", \"boolean\"],\n properties: {\n $id: {\n type: \"string\",\n format: \"uri-reference\"\n },\n $schema: {\n type: \"string\",\n format: \"uri\"\n },\n $ref: {\n type: \"string\",\n format: \"uri-reference\"\n },\n $comment: {\n type: \"string\"\n },\n title: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n default: true,\n readOnly: {\n type: \"boolean\",\n default: false\n },\n examples: {\n type: \"array\",\n items: true\n },\n multipleOf: {\n type: \"number\",\n exclusiveMinimum: 0\n },\n maximum: {\n type: \"number\"\n },\n exclusiveMaximum: {\n type: \"number\"\n },\n minimum: {\n type: \"number\"\n },\n exclusiveMinimum: {\n type: \"number\"\n },\n maxLength: { $ref: \"#/definitions/nonNegativeInteger\" },\n minLength: { $ref: \"#/definitions/nonNegativeIntegerDefault0\" },\n pattern: {\n type: \"string\",\n format: \"regex\"\n },\n additionalItems: { $ref: \"#\" },\n items: {\n anyOf: [{ $ref: \"#\" }, { $ref: \"#/definitions/schemaArray\" }],\n default: true\n },\n maxItems: { $ref: \"#/definitions/nonNegativeInteger\" },\n minItems: { $ref: \"#/definitions/nonNegativeIntegerDefault0\" },\n uniqueItems: {\n type: \"boolean\",\n default: false\n },\n contains: { $ref: \"#\" },\n maxProperties: { $ref: \"#/definitions/nonNegativeInteger\" },\n minProperties: { $ref: \"#/definitions/nonNegativeIntegerDefault0\" },\n required: { $ref: \"#/definitions/stringArray\" },\n additionalProperties: { $ref: \"#\" },\n definitions: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: {}\n },\n properties: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: {}\n },\n patternProperties: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n propertyNames: { format: \"regex\" },\n default: {}\n },\n dependencies: {\n type: \"object\",\n additionalProperties: {\n anyOf: [{ $ref: \"#\" }, { $ref: \"#/definitions/stringArray\" }]\n }\n },\n propertyNames: { $ref: \"#\" },\n const: true,\n enum: {\n type: \"array\",\n items: true,\n minItems: 1,\n uniqueItems: true\n },\n type: {\n anyOf: [\n { $ref: \"#/definitions/simpleTypes\" },\n {\n type: \"array\",\n items: { $ref: \"#/definitions/simpleTypes\" },\n minItems: 1,\n uniqueItems: true\n }\n ]\n },\n format: { type: \"string\" },\n contentMediaType: { type: \"string\" },\n contentEncoding: { type: \"string\" },\n if: { $ref: \"#\" },\n then: { $ref: \"#\" },\n else: { $ref: \"#\" },\n allOf: { $ref: \"#/definitions/schemaArray\" },\n anyOf: { $ref: \"#/definitions/schemaArray\" },\n oneOf: { $ref: \"#/definitions/schemaArray\" },\n not: { $ref: \"#\" }\n },\n default: true\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/ajv.js\n var require_ajv = __commonJS({\n \"../../../node_modules/.pnpm/ajv@8.17.1/node_modules/ajv/dist/ajv.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.MissingRefError = exports3.ValidationError = exports3.CodeGen = exports3.Name = exports3.nil = exports3.stringify = exports3.str = exports3._ = exports3.KeywordCxt = exports3.Ajv = void 0;\n var core_1 = require_core();\n var draft7_1 = require_draft7();\n var discriminator_1 = require_discriminator();\n var draft7MetaSchema = require_json_schema_draft_07();\n var META_SUPPORT_DATA = [\"/properties\"];\n var META_SCHEMA_ID = \"http://json-schema.org/draft-07/schema\";\n var Ajv = class extends core_1.default {\n _addVocabularies() {\n super._addVocabularies();\n draft7_1.default.forEach((v2) => this.addVocabulary(v2));\n if (this.opts.discriminator)\n this.addKeyword(discriminator_1.default);\n }\n _addDefaultMetaSchema() {\n super._addDefaultMetaSchema();\n if (!this.opts.meta)\n return;\n const metaSchema = this.opts.$data ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA) : draft7MetaSchema;\n this.addMetaSchema(metaSchema, META_SCHEMA_ID, false);\n this.refs[\"http://json-schema.org/schema\"] = META_SCHEMA_ID;\n }\n defaultMeta() {\n return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);\n }\n };\n exports3.Ajv = Ajv;\n module.exports = exports3 = Ajv;\n module.exports.Ajv = Ajv;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.default = Ajv;\n var validate_1 = require_validate();\n Object.defineProperty(exports3, \"KeywordCxt\", { enumerable: true, get: function() {\n return validate_1.KeywordCxt;\n } });\n var codegen_1 = require_codegen();\n Object.defineProperty(exports3, \"_\", { enumerable: true, get: function() {\n return codegen_1._;\n } });\n Object.defineProperty(exports3, \"str\", { enumerable: true, get: function() {\n return codegen_1.str;\n } });\n Object.defineProperty(exports3, \"stringify\", { enumerable: true, get: function() {\n return codegen_1.stringify;\n } });\n Object.defineProperty(exports3, \"nil\", { enumerable: true, get: function() {\n return codegen_1.nil;\n } });\n Object.defineProperty(exports3, \"Name\", { enumerable: true, get: function() {\n return codegen_1.Name;\n } });\n Object.defineProperty(exports3, \"CodeGen\", { enumerable: true, get: function() {\n return codegen_1.CodeGen;\n } });\n var validation_error_1 = require_validation_error();\n Object.defineProperty(exports3, \"ValidationError\", { enumerable: true, get: function() {\n return validation_error_1.default;\n } });\n var ref_error_1 = require_ref_error();\n Object.defineProperty(exports3, \"MissingRefError\", { enumerable: true, get: function() {\n return ref_error_1.default;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+logger@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/logger/src/lib/logger.js\n var require_logger = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+logger@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/logger/src/lib/logger.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LogManager = exports3.Logger = exports3.LogLevel = exports3.LOG_LEVEL = void 0;\n var constants_1 = require_src2();\n Object.defineProperty(exports3, \"LOG_LEVEL\", { enumerable: true, get: function() {\n return constants_1.LOG_LEVEL;\n } });\n var utils_1 = require_utils6();\n var LogLevel2;\n (function(LogLevel3) {\n LogLevel3[LogLevel3[\"OFF\"] = -1] = \"OFF\";\n LogLevel3[LogLevel3[\"ERROR\"] = 0] = \"ERROR\";\n LogLevel3[LogLevel3[\"INFO\"] = 1] = \"INFO\";\n LogLevel3[LogLevel3[\"DEBUG\"] = 2] = \"DEBUG\";\n LogLevel3[LogLevel3[\"WARN\"] = 3] = \"WARN\";\n LogLevel3[LogLevel3[\"FATAL\"] = 4] = \"FATAL\";\n LogLevel3[LogLevel3[\"TIMING_START\"] = 5] = \"TIMING_START\";\n LogLevel3[LogLevel3[\"TIMING_END\"] = 6] = \"TIMING_END\";\n })(LogLevel2 || (exports3.LogLevel = LogLevel2 = {}));\n var colours = {\n reset: \"\\x1B[0m\",\n bright: \"\\x1B[1m\",\n dim: \"\\x1B[2m\",\n underscore: \"\\x1B[4m\",\n blink: \"\\x1B[5m\",\n reverse: \"\\x1B[7m\",\n hidden: \"\\x1B[8m\",\n fg: {\n black: \"\\x1B[30m\",\n red: \"\\x1B[31m\",\n green: \"\\x1B[32m\",\n yellow: \"\\x1B[33m\",\n blue: \"\\x1B[34m\",\n magenta: \"\\x1B[35m\",\n cyan: \"\\x1B[36m\",\n white: \"\\x1B[37m\",\n gray: \"\\x1B[90m\",\n crimson: \"\\x1B[38m\"\n // Scarlet\n },\n bg: {\n black: \"\\x1B[40m\",\n red: \"\\x1B[41m\",\n green: \"\\x1B[42m\",\n yellow: \"\\x1B[43m\",\n blue: \"\\x1B[44m\",\n magenta: \"\\x1B[45m\",\n cyan: \"\\x1B[46m\",\n white: \"\\x1B[47m\",\n gray: \"\\x1B[100m\",\n crimson: \"\\x1B[48m\"\n }\n };\n function _convertLoggingLevel(level) {\n switch (level) {\n case constants_1.LOG_LEVEL.INFO:\n return `${colours.fg.green}[INFO]${colours.reset}`;\n case constants_1.LOG_LEVEL.DEBUG:\n return `${colours.fg.cyan}[DEBUG]${colours.reset}`;\n case constants_1.LOG_LEVEL.WARN:\n return `${colours.fg.yellow}[WARN]${colours.reset}`;\n case constants_1.LOG_LEVEL.ERROR:\n return `${colours.fg.red}[ERROR]${colours.reset}`;\n case constants_1.LOG_LEVEL.FATAL:\n return `${colours.fg.red}[FATAL]${colours.reset}`;\n case constants_1.LOG_LEVEL.TIMING_START:\n return `${colours.fg.green}[TIME_START]${colours.reset}`;\n case constants_1.LOG_LEVEL.TIMING_END:\n return `${colours.fg.green}[TIME_END]${colours.reset}`;\n }\n return \"[UNKNOWN]\";\n }\n function _resolveLoggingHandler(level) {\n switch (level) {\n case constants_1.LOG_LEVEL.DEBUG:\n return console.debug;\n case constants_1.LOG_LEVEL.INFO:\n return console.info;\n case constants_1.LOG_LEVEL.ERROR:\n return console.error;\n case constants_1.LOG_LEVEL.WARN:\n return console.warn;\n case constants_1.LOG_LEVEL.FATAL:\n return console.error;\n case constants_1.LOG_LEVEL.TIMING_END:\n return console.timeLog;\n case constants_1.LOG_LEVEL.TIMING_START:\n return console.time;\n }\n }\n function _safeStringify(obj, indent = 2) {\n let cache = [];\n const retVal = JSON.stringify(obj, (_key, value) => typeof value === \"object\" && value !== null ? cache?.includes(value) ? void 0 : cache?.push(value) && value : value, indent);\n cache = null;\n return retVal;\n }\n var Log = class {\n constructor(timestamp, message2, args, id, category, level) {\n this.timestamp = timestamp;\n this.message = message2;\n this.args = args;\n this.id = id;\n this.category = category;\n this.level = level;\n }\n toString() {\n let fmtStr = `[Lit-JS-SDK v${constants_1.version}]${_convertLoggingLevel(this.level)} [${this.category}] [id: ${this.id}] ${this.message}`;\n for (let i3 = 0; i3 < this.args.length; i3++) {\n if (typeof this.args[i3] === \"object\") {\n fmtStr = `${fmtStr} ${_safeStringify(this.args[i3])}`;\n } else {\n fmtStr = `${fmtStr} ${this.args[i3]}`;\n }\n }\n return fmtStr;\n }\n toArray() {\n const args = [];\n args.push(`[Lit-JS-SDK v${constants_1.version}]`);\n args.push(`[${this.timestamp}]`);\n args.push(_convertLoggingLevel(this.level));\n args.push(`[${this.category}]`);\n this.id && args.push(`${colours.fg.cyan}[id: ${this.id}]${colours.reset}`);\n this.message && args.push(this.message);\n for (let i3 = 0; i3 < this.args.length; i3++) {\n args.push(this.args[i3]);\n }\n return args;\n }\n toJSON() {\n return {\n timestamp: this.timestamp,\n message: this.message,\n args: this.args,\n id: this.id,\n category: this.category,\n level: this.level\n };\n }\n };\n var Logger2 = class _Logger {\n static createLogger(category, level, id, isParent, config2) {\n return new _Logger(category, level, id, isParent, config2);\n }\n constructor(category, level, id, isParent, config2) {\n this._logs = [];\n this._logHashes = /* @__PURE__ */ new Map();\n this._logFormat = \"text\";\n this._serviceName = \"lit-sdk\";\n this._category = category;\n this._level = level;\n this._id = id;\n this._consoleHandler = _resolveLoggingHandler(this._level);\n this._config = config2;\n this._children = /* @__PURE__ */ new Map();\n this._isParent = isParent;\n this._timestamp = Date.now();\n }\n get id() {\n return this._id;\n }\n get category() {\n return this._category;\n }\n get timestamp() {\n return this._timestamp;\n }\n get Logs() {\n return this._logs;\n }\n set Config(value) {\n this._config = value;\n }\n get Config() {\n return this._config;\n }\n get Children() {\n return this._children;\n }\n setLevel(level) {\n this._level = level;\n }\n setHandler(handler) {\n this._handler = handler;\n }\n info(message2 = \"\", ...args) {\n this._log(constants_1.LOG_LEVEL.INFO, message2, ...args);\n }\n debug(message2 = \"\", ...args) {\n this._log(constants_1.LOG_LEVEL.DEBUG, message2, ...args);\n }\n warn(message2 = \"\", ...args) {\n this._log(constants_1.LOG_LEVEL.WARN, message2, args);\n }\n error(message2 = \"\", ...args) {\n this._log(constants_1.LOG_LEVEL.ERROR, message2, ...args);\n }\n fatal(message2 = \"\", ...args) {\n this._log(constants_1.LOG_LEVEL.FATAL, message2, ...args);\n }\n trace(message2 = \"\", ...args) {\n this._log(constants_1.LOG_LEVEL.FATAL, message2, ...args);\n }\n timeStart(message2 = \"\", ...args) {\n this._log(constants_1.LOG_LEVEL.TIMING_START, message2, ...args);\n }\n timeEnd(message2 = \"\", ...args) {\n this._level < constants_1.LOG_LEVEL.OFF && this._log(constants_1.LOG_LEVEL.TIMING_END, message2, ...args);\n }\n _log(level, message2 = \"\", ...args) {\n const log = new Log((/* @__PURE__ */ new Date()).toISOString(), message2, args, this._id, this._category, level);\n const shouldLog = !this._config?.[\"condenseLogs\"] || !this._checkHash(log);\n const levelCheck = this._level >= level || level === constants_1.LOG_LEVEL.ERROR || level === LogLevel2.ERROR;\n if (shouldLog && levelCheck) {\n if (this._logFormat === \"json\" || this._logFormat === \"datadog\") {\n const jsonLog = this._formatJsonLog(log);\n console.log(JSON.stringify(jsonLog));\n } else {\n const arrayLog = log.toArray();\n this._consoleHandler && this._consoleHandler(...arrayLog);\n }\n this._handler && this._handler(log);\n this._addLog(log);\n }\n }\n _checkHash(log) {\n const strippedMessage = this._cleanString(log.message);\n const digest2 = (0, utils_1.hashMessage)(strippedMessage);\n const hash3 = digest2.toString();\n const item = this._logHashes.get(hash3);\n if (item) {\n return true;\n } else {\n this._logHashes.set(hash3, true);\n return false;\n }\n }\n _addLog(log) {\n this._logs.push(log);\n }\n _addToLocalStorage(log) {\n if (globalThis.localStorage) {\n let bucket = globalThis.localStorage.getItem(log.category);\n if (bucket) {\n bucket = JSON.parse(bucket);\n if (!bucket[log.id]) {\n bucket[log.id] = [];\n }\n bucket[log.id].push(log.toString());\n globalThis.localStorage.setItem(log.category, _safeStringify(bucket));\n } else {\n const bucket2 = {};\n bucket2[log.id] = [log.toString()];\n globalThis.localStorage.setItem(log.category, _safeStringify(bucket2));\n }\n }\n }\n /**\n *\n * @param input string which will be cleaned of non utf-8 characters\n * @returns {string} input cleaned of non utf-8 characters\n */\n _cleanString(input) {\n let output = \"\";\n for (let i3 = 0; i3 < input.length; i3++) {\n if (input.charCodeAt(i3) <= 127) {\n output += input.charAt(i3);\n }\n }\n return output;\n }\n _formatJsonLog(log) {\n const baseLog = {\n timestamp: log.timestamp,\n message: log.message,\n category: log.category,\n id: log.id,\n version: constants_1.version\n };\n if (this._logFormat === \"datadog\") {\n return {\n ...baseLog,\n level: this._mapToDataDogSeverity(log.level),\n service: this._serviceName,\n metadata: {\n args: log.args,\n sdk_version: constants_1.version\n }\n };\n } else {\n return {\n ...baseLog,\n level: this._getLogLevelName(log.level),\n args: log.args\n };\n }\n }\n _mapToDataDogSeverity(level) {\n switch (level) {\n case constants_1.LOG_LEVEL.DEBUG:\n return \"debug\";\n case constants_1.LOG_LEVEL.INFO:\n return \"info\";\n case constants_1.LOG_LEVEL.WARN:\n return \"warning\";\n case constants_1.LOG_LEVEL.ERROR:\n return \"error\";\n case constants_1.LOG_LEVEL.FATAL:\n return \"critical\";\n case constants_1.LOG_LEVEL.TIMING_START:\n case constants_1.LOG_LEVEL.TIMING_END:\n return \"debug\";\n default:\n return \"info\";\n }\n }\n _getLogLevelName(level) {\n switch (level) {\n case constants_1.LOG_LEVEL.DEBUG:\n return \"DEBUG\";\n case constants_1.LOG_LEVEL.INFO:\n return \"INFO\";\n case constants_1.LOG_LEVEL.WARN:\n return \"WARN\";\n case constants_1.LOG_LEVEL.ERROR:\n return \"ERROR\";\n case constants_1.LOG_LEVEL.FATAL:\n return \"FATAL\";\n case constants_1.LOG_LEVEL.TIMING_START:\n return \"TIMING_START\";\n case constants_1.LOG_LEVEL.TIMING_END:\n return \"TIMING_END\";\n default:\n return \"UNKNOWN\";\n }\n }\n setLogFormat(format) {\n this._logFormat = format;\n }\n setServiceName(serviceName) {\n this._serviceName = serviceName;\n }\n };\n exports3.Logger = Logger2;\n var LogManager = class _LogManager {\n static get Instance() {\n if (!_LogManager._instance) {\n _LogManager._instance = new _LogManager();\n }\n return _LogManager._instance;\n }\n static clearInstance() {\n _LogManager._instance = void 0;\n }\n constructor() {\n this._level = constants_1.LOG_LEVEL.DEBUG;\n this._logFormat = \"text\";\n this._serviceName = \"lit-sdk\";\n this._loggers = /* @__PURE__ */ new Map();\n }\n withConfig(config2) {\n this._config = config2;\n for (const logger of this._loggers) {\n logger[1].Config = config2;\n }\n }\n setLevel(level) {\n this._level = level;\n for (const logger of this._loggers) {\n logger[1].setLevel(level);\n }\n }\n setHandler(handler) {\n for (const logger of this._loggers) {\n logger[1].setHandler(handler);\n }\n }\n setLogFormat(format) {\n this._logFormat = format;\n for (const logger of this._loggers) {\n logger[1].setLogFormat(format);\n for (const child of logger[1].Children) {\n child[1].setLogFormat(format);\n }\n }\n }\n setServiceName(serviceName) {\n this._serviceName = serviceName;\n for (const logger of this._loggers) {\n logger[1].setServiceName(serviceName);\n for (const child of logger[1].Children) {\n child[1].setServiceName(serviceName);\n }\n }\n }\n get LoggerIds() {\n const keys = [];\n for (const category of this._loggers.entries()) {\n for (const child of category[1].Children) {\n keys.push([child[0], child[1].timestamp]);\n }\n }\n return keys.sort((a3, b4) => {\n return a3[1] - b4[1];\n }).map((value) => {\n return value[0];\n });\n }\n // if a logger is given an id it will persist logs under its logger instance\n get(category, id) {\n let instance = this._loggers.get(category);\n if (!instance && !id) {\n this._loggers.set(category, Logger2.createLogger(category, this._level ?? constants_1.LOG_LEVEL.INFO, \"\", true));\n instance = this._loggers.get(category);\n instance.Config = this._config;\n instance.setLogFormat(this._logFormat);\n instance.setServiceName(this._serviceName);\n return instance;\n }\n if (id) {\n if (!instance) {\n this._loggers.set(category, Logger2.createLogger(category, this._level ?? constants_1.LOG_LEVEL.INFO, \"\", true));\n instance = this._loggers.get(category);\n instance.Config = this._config;\n instance.setLogFormat(this._logFormat);\n instance.setServiceName(this._serviceName);\n }\n const children = instance?.Children;\n let child = children?.get(id);\n if (child) {\n return child;\n }\n children?.set(id, Logger2.createLogger(category, this._level ?? constants_1.LOG_LEVEL.INFO, id ?? \"\", true));\n child = children?.get(id);\n child.Config = this._config;\n child.setLogFormat(this._logFormat);\n child.setServiceName(this._serviceName);\n return children?.get(id);\n } else if (!instance) {\n this._loggers.set(category, Logger2.createLogger(category, this._level ?? constants_1.LOG_LEVEL.INFO, \"\", true));\n instance = this._loggers.get(category);\n instance.Config = this._config;\n instance.setLogFormat(this._logFormat);\n instance.setServiceName(this._serviceName);\n }\n return instance;\n }\n getById(id) {\n let logStrs = [];\n for (const category of this._loggers.entries()) {\n const logger = category[1].Children.get(id);\n if (logger) {\n const logStr = [];\n for (const log of logger.Logs) {\n logStr.push(log.toString());\n }\n logStrs = logStrs.concat(logStr);\n }\n }\n return logStrs;\n }\n getLogsForId(id) {\n let logsForRequest = this.getById(id);\n if (logsForRequest.length < 1 && globalThis.localStorage) {\n for (const category of this._loggers.keys()) {\n const bucketStr = globalThis.localStorage.getItem(category);\n const bucket = JSON.parse(bucketStr);\n if (bucket && bucket[id]) {\n const logsForId = bucket[id].filter((log) => log.includes(id));\n logsForRequest = logsForId.concat(logsForRequest);\n }\n }\n }\n return logsForRequest;\n }\n };\n exports3.LogManager = LogManager;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+logger@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/logger/src/index.js\n var require_src3 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+logger@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/logger/src/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));\n tslib_1.__exportStar(require_logger(), exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+misc@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/misc/src/lib/misc.js\n var require_misc = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+misc@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/misc/src/lib/misc.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.removeHexPrefix = exports3.hexPrefixed = exports3.defaultMintClaimCallback = exports3.genRandomPath = exports3.decimalPlaces = exports3.isBrowser = exports3.isNode = exports3.is = exports3.numberToHex = exports3.sortedObject = exports3.checkIfAuthSigRequiresChainParam = exports3.checkSchema = exports3.checkType = exports3.getVarType = exports3.logError = exports3.logErrorWithRequestId = exports3.logWithRequestId = exports3.log = exports3.getLoggerbyId = exports3.bootstrapLogManager = exports3.throwRemovedFunctionError = exports3.findMostCommonResponse = exports3.mostCommonString = exports3.printError = exports3.setMiscLitConfig = void 0;\n exports3.isSupportedLitNetwork = isSupportedLitNetwork;\n exports3.getEnv = getEnv;\n exports3.sendRequest = sendRequest;\n exports3.normalizeAndStringify = normalizeAndStringify;\n exports3.getIpAddress = getIpAddress;\n var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));\n var contracts_1 = require_lib34();\n var providers_1 = require_lib35();\n var ajv_1 = tslib_1.__importDefault(require_ajv());\n var constants_1 = require_src2();\n var logger_1 = require_src3();\n var logBuffer = [];\n var ajv = new ajv_1.default();\n var litConfig;\n var setMiscLitConfig = (config2) => {\n litConfig = config2;\n };\n exports3.setMiscLitConfig = setMiscLitConfig;\n var printError = (e2) => {\n console.log(\"Error Stack\", e2.stack);\n console.log(\"Error Name\", e2.name);\n console.log(\"Error Message\", e2.message);\n };\n exports3.printError = printError;\n var mostCommonString = (arr) => {\n return arr.sort((a3, b4) => arr.filter((v2) => v2 === a3).length - arr.filter((v2) => v2 === b4).length).pop();\n };\n exports3.mostCommonString = mostCommonString;\n var findMostCommonResponse = (responses) => {\n const result = {};\n const keys = new Set(responses.flatMap(Object.keys));\n for (const key of keys) {\n const values = responses.map((response) => response[key]);\n const filteredValues = values.filter((value) => value !== void 0 && value !== \"\");\n if (filteredValues.length === 0) {\n result[key] = void 0;\n } else if (typeof filteredValues[0] === \"object\" && !Array.isArray(filteredValues[0])) {\n result[key] = (0, exports3.findMostCommonResponse)(filteredValues);\n } else {\n result[key] = (0, exports3.mostCommonString)(filteredValues);\n }\n }\n return result;\n };\n exports3.findMostCommonResponse = findMostCommonResponse;\n var throwRemovedFunctionError = (functionName) => {\n throw new constants_1.RemovedFunctionError({\n info: {\n functionName\n }\n }, `This function \"${functionName}\" has been removed. Please use the old SDK.`);\n };\n exports3.throwRemovedFunctionError = throwRemovedFunctionError;\n var bootstrapLogManager = (id, level = constants_1.LOG_LEVEL.DEBUG, logFormat = \"text\", serviceName = \"lit-sdk\") => {\n if (!globalThis.logManager) {\n globalThis.logManager = logger_1.LogManager.Instance;\n globalThis.logManager.withConfig({\n condenseLogs: true\n });\n globalThis.logManager.setLevel(level);\n globalThis.logManager.setLogFormat(logFormat);\n globalThis.logManager.setServiceName(serviceName);\n }\n globalThis.logger = globalThis.logManager.get(id);\n };\n exports3.bootstrapLogManager = bootstrapLogManager;\n var getLoggerbyId = (id) => {\n return globalThis.logManager.get(id);\n };\n exports3.getLoggerbyId = getLoggerbyId;\n var log = (...args) => {\n if (!globalThis) {\n console.log(...args);\n return;\n }\n if (!litConfig) {\n logBuffer.push(args);\n return;\n }\n while (logBuffer.length > 0) {\n const log2 = logBuffer.shift() ?? \"\";\n globalThis?.logger && globalThis?.logger.debug(...log2);\n }\n globalThis?.logger && globalThis?.logger.debug(...args);\n };\n exports3.log = log;\n var logWithRequestId = (id, ...args) => {\n if (!globalThis) {\n console.log(...args);\n return;\n }\n if (!litConfig) {\n logBuffer.push(args);\n return;\n }\n while (logBuffer.length > 0) {\n const log2 = logBuffer.shift() ?? \"\";\n globalThis?.logger && globalThis.logManager.get(globalThis.logger.category, id).debug(...log2);\n }\n globalThis?.logger && globalThis.logManager.get(globalThis.logger.category, id).debug(...args);\n };\n exports3.logWithRequestId = logWithRequestId;\n var logErrorWithRequestId = (id, ...args) => {\n if (!globalThis) {\n console.log(...args);\n return;\n }\n if (!litConfig) {\n logBuffer.push(args);\n return;\n }\n while (logBuffer.length > 0) {\n const log2 = logBuffer.shift() ?? \"\";\n globalThis?.logger && globalThis.logManager.get(globalThis.logger.category, id).error(...log2);\n }\n globalThis?.logger && globalThis.logManager.get(globalThis.logger.category, id).error(...args);\n };\n exports3.logErrorWithRequestId = logErrorWithRequestId;\n var logError = (...args) => {\n if (!globalThis) {\n console.log(...args);\n return;\n }\n if (!litConfig) {\n logBuffer.push(args);\n return;\n }\n while (logBuffer.length > 0) {\n const log2 = logBuffer.shift() ?? \"\";\n globalThis?.logger && globalThis.logManager.get(globalThis.logger.category).error(...log2);\n }\n globalThis?.logger && globalThis.logManager.get(globalThis.logger.category).error(...args);\n };\n exports3.logError = logError;\n var getVarType = (value) => {\n return Object.prototype.toString.call(value).slice(8, -1);\n };\n exports3.getVarType = getVarType;\n var checkType = ({ value, allowedTypes, paramName, functionName, throwOnError = true }) => {\n if (!allowedTypes.includes((0, exports3.getVarType)(value))) {\n const message2 = `Expecting ${allowedTypes.join(\" or \")} type for parameter named ${paramName} in Lit-JS-SDK function ${functionName}(), but received \"${(0, exports3.getVarType)(value)}\" type instead. value: ${value instanceof Object ? JSON.stringify(value) : value}`;\n if (throwOnError) {\n throw new constants_1.InvalidParamType({\n info: {\n allowedTypes,\n value,\n paramName,\n functionName\n }\n }, message2);\n }\n return false;\n }\n return true;\n };\n exports3.checkType = checkType;\n var checkSchema = (value, schema, paramName, functionName, throwOnError = true) => {\n let validate7 = schema.$id ? ajv.getSchema(schema.$id) : void 0;\n if (!validate7) {\n validate7 = ajv.compile(schema);\n }\n const validates = validate7(value);\n const message2 = `FAILED schema validation for parameter named ${paramName} in Lit-JS-SDK function ${functionName}(). Value: ${value instanceof Object ? JSON.stringify(value) : value}. Errors: ${JSON.stringify(validate7.errors)}`;\n if (!validates) {\n if (throwOnError) {\n throw new constants_1.InvalidParamType({\n info: {\n value,\n paramName,\n functionName\n }\n }, message2);\n }\n return false;\n }\n return true;\n };\n exports3.checkSchema = checkSchema;\n var checkIfAuthSigRequiresChainParam = (authSig, chain2, functionName) => {\n (0, exports3.log)(\"checkIfAuthSigRequiresChainParam\");\n for (const key of constants_1.LIT_AUTH_SIG_CHAIN_KEYS) {\n if (key in authSig) {\n return true;\n }\n }\n if (!(0, exports3.checkType)({\n value: chain2,\n allowedTypes: [\"String\"],\n paramName: \"chain\",\n functionName\n })) {\n return false;\n }\n return true;\n };\n exports3.checkIfAuthSigRequiresChainParam = checkIfAuthSigRequiresChainParam;\n var sortedObject = (obj) => {\n if (typeof obj !== \"object\" || obj === null) {\n return obj;\n }\n if (Array.isArray(obj)) {\n return obj.map(exports3.sortedObject);\n }\n const sortedKeys = Object.keys(obj).sort();\n const result = {};\n sortedKeys.forEach((key) => {\n result[key] = (0, exports3.sortedObject)(obj[key]);\n });\n return result;\n };\n exports3.sortedObject = sortedObject;\n var numberToHex2 = (v2) => {\n return \"0x\" + v2.toString(16);\n };\n exports3.numberToHex = numberToHex2;\n var is = (value, type, paramName, functionName, throwOnError = true) => {\n if ((0, exports3.getVarType)(value) !== type) {\n const message2 = `Expecting \"${type}\" type for parameter named ${paramName} in Lit-JS-SDK function ${functionName}(), but received \"${(0, exports3.getVarType)(value)}\" type instead. value: ${value instanceof Object ? JSON.stringify(value) : value}`;\n if (throwOnError) {\n throw new constants_1.InvalidParamType({\n info: {\n value,\n paramName,\n functionName\n }\n }, message2);\n }\n return false;\n }\n return true;\n };\n exports3.is = is;\n var isNode = () => {\n let isNode2 = false;\n if (typeof process_exports === \"object\") {\n if (typeof process_exports.versions === \"object\") {\n if (typeof process_exports.versions.node !== \"undefined\") {\n isNode2 = true;\n }\n }\n }\n return isNode2;\n };\n exports3.isNode = isNode;\n var isBrowser = () => {\n return (0, exports3.isNode)() === false;\n };\n exports3.isBrowser = isBrowser;\n var decimalPlaces = async ({ contractAddress, chain: chain2 }) => {\n const rpcUrl = constants_1.LIT_CHAINS[chain2].rpcUrls[0];\n const web3 = new providers_1.JsonRpcProvider({\n url: rpcUrl,\n skipFetchSetup: true\n });\n const contract = new contracts_1.Contract(contractAddress, constants_1.ABI_ERC20.abi, web3);\n return await contract[\"decimals\"]();\n };\n exports3.decimalPlaces = decimalPlaces;\n var genRandomPath = () => {\n return \"/\" + Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);\n };\n exports3.genRandomPath = genRandomPath;\n function isSupportedLitNetwork(litNetwork) {\n const supportedNetworks = Object.values(constants_1.LIT_NETWORK);\n if (!supportedNetworks.includes(litNetwork)) {\n throw new constants_1.WrongNetworkException({\n info: {\n litNetwork,\n supportedNetworks\n }\n }, `Unsupported LitNetwork! (${supportedNetworks.join(\"|\")}) are supported.`);\n }\n }\n var defaultMintClaimCallback = async (params, network = constants_1.LIT_NETWORK.DatilDev) => {\n isSupportedLitNetwork(network);\n const AUTH_CLAIM_PATH = \"/auth/claim\";\n const relayUrl = params.relayUrl || constants_1.RELAYER_URL_BY_NETWORK[network];\n if (!relayUrl) {\n throw new constants_1.InvalidArgumentException({\n info: {\n network,\n relayUrl\n }\n }, \"No relayUrl provided and no default relayUrl found for network\");\n }\n const relayUrlWithPath = relayUrl + AUTH_CLAIM_PATH;\n const response = await fetch(relayUrlWithPath, {\n method: \"POST\",\n body: JSON.stringify(params),\n headers: {\n \"api-key\": params.relayApiKey ? params.relayApiKey : \"67e55044-10b1-426f-9247-bb680e5fe0c8_relayer\",\n \"Content-Type\": \"application/json\"\n }\n });\n if (response.status < 200 || response.status >= 400) {\n const errResp = await response.json() ?? \"\";\n const errStmt = `An error occurred requesting \"/auth/claim\" endpoint ${JSON.stringify(errResp)}`;\n console.warn(errStmt);\n throw new constants_1.NetworkError({\n info: {\n response,\n errResp\n }\n }, `An error occurred requesting \"/auth/claim\" endpoint`);\n }\n const body = await response.json();\n return body.requestId;\n };\n exports3.defaultMintClaimCallback = defaultMintClaimCallback;\n var hexPrefixed = (str) => {\n if (str.startsWith(\"0x\")) {\n return str;\n }\n return \"0x\" + str;\n };\n exports3.hexPrefixed = hexPrefixed;\n var removeHexPrefix = (str) => {\n if (str.startsWith(\"0x\")) {\n return str.slice(2);\n }\n return str;\n };\n exports3.removeHexPrefix = removeHexPrefix;\n function getEnv({ nodeEnvVar = \"DEBUG\", urlQueryParam = \"dev\", urlQueryValue = \"debug=true\", defaultValue = false } = {}) {\n if ((0, exports3.isNode)()) {\n return process_exports.env[nodeEnvVar] === \"true\";\n } else if ((0, exports3.isBrowser)()) {\n const urlParams = new URLSearchParams(window.location.search);\n return urlParams.get(urlQueryParam) === urlQueryValue;\n }\n return defaultValue;\n }\n function sendRequest(url, req, requestId) {\n return fetch(url, req).then(async (response) => {\n const isJson = response.headers.get(\"content-type\")?.includes(\"application/json\");\n const data = isJson ? await response.json() : null;\n if (!response.ok) {\n const error = data || response.status;\n return Promise.reject(error);\n }\n return data;\n }).catch((error) => {\n (0, exports3.logErrorWithRequestId)(requestId, `Something went wrong, internal id for request: lit_${requestId}. Please provide this identifier with any support requests. ${error?.message || error?.details ? `Error is ${error.message} - ${error.details}` : \"\"}`);\n return Promise.reject(error);\n });\n }\n function normalizeAndStringify(input) {\n try {\n if (!input.startsWith(\"{\") && !input.startsWith(\"[\")) {\n return input;\n }\n const parsed = JSON.parse(input);\n return JSON.stringify(parsed);\n } catch (error) {\n const unescaped = input.replace(/\\\\(.)/g, \"$1\");\n if (input === unescaped) {\n return input;\n }\n return normalizeAndStringify(unescaped);\n }\n }\n async function getIpAddress(domain2) {\n const apiURL = `https://dns.google/resolve?name=${domain2}&type=A`;\n try {\n const response = await fetch(apiURL);\n const data = await response.json();\n if (data.Answer && data.Answer.length > 0) {\n return data.Answer[0].data;\n } else {\n throw new constants_1.UnknownError({\n info: {\n domain: domain2,\n apiURL\n }\n }, \"No IP Address found or bad domain name\");\n }\n } catch (error) {\n throw new constants_1.UnknownError({\n info: {\n domain: domain2,\n apiURL\n },\n cause: error\n }, \"message\" in error ? error.message : String(error));\n }\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+misc@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/misc/src/lib/utils.js\n var require_utils11 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+misc@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/misc/src/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.isTokenOperator = isTokenOperator;\n exports3.isValidBooleanExpression = isValidBooleanExpression;\n function isTokenOperator(token) {\n const OPERATORS = [\"and\", \"or\"];\n return token.hasOwnProperty(\"operator\") && OPERATORS.includes(token.operator);\n }\n function isValidBooleanExpression(expression) {\n const STATES = {\n START: \"start\",\n CONDITION: \"condition\",\n OPERATOR: \"operator\"\n };\n let currentState = STATES.START;\n for (const token of expression) {\n switch (currentState) {\n case STATES.START:\n case STATES.OPERATOR:\n if (isTokenOperator(token)) {\n return false;\n }\n if (Array.isArray(token) && !isValidBooleanExpression(token)) {\n return false;\n }\n currentState = STATES.CONDITION;\n break;\n default:\n if (!isTokenOperator(token)) {\n return false;\n }\n currentState = STATES.OPERATOR;\n }\n }\n return currentState === STATES.CONDITION;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+misc@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/misc/src/lib/params-validators.js\n var require_params_validators = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+misc@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/misc/src/lib/params-validators.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.paramsValidators = exports3.safeParams = void 0;\n var utils_1 = require_utils6();\n var constants_1 = require_src2();\n var misc_1 = require_misc();\n var utils_2 = require_utils11();\n var safeParams = ({ functionName, params }) => {\n if (!exports3.paramsValidators[functionName]) {\n (0, misc_1.log)(`This function ${functionName} is skipping params safe guarding.`);\n return (0, constants_1.ERight)(void 0);\n }\n const paramValidators = exports3.paramsValidators[functionName](params);\n for (const validator of paramValidators) {\n const validationResponse = validator.validate();\n if (validationResponse.type === constants_1.EITHER_TYPE.ERROR) {\n return validationResponse;\n }\n }\n return (0, constants_1.ERight)(void 0);\n };\n exports3.safeParams = safeParams;\n exports3.paramsValidators = {\n // ========== NO AUTH MATERIAL NEEDED FOR CLIENT SIDE ENCRYPTION ==========\n encrypt: (params) => [\n new AccessControlConditionsValidator(\"encrypt\", params)\n ],\n encryptUint8Array: (params) => [\n new AccessControlConditionsValidator(\"encryptUint8Array\", params),\n new Uint8ArrayValidator(\"encryptUint8Array\", params.dataToEncrypt)\n ],\n encryptFile: (params) => [\n new AccessControlConditionsValidator(\"encryptFile\", params),\n new FileValidator(\"encryptFile\", params.file)\n ],\n encryptString: (params) => [\n new AccessControlConditionsValidator(\"encryptString\", params),\n new StringValidator(\"encryptString\", params.dataToEncrypt, \"dataToEncrypt\")\n ],\n encryptToJson: (params) => [\n new AccessControlConditionsValidator(\"encryptToJson\", params),\n new EncryptToJsonValidator(\"encryptToJson\", params)\n ],\n // ========== REQUIRED AUTH MATERIAL VALIDATORS ==========\n executeJs: (params) => [\n new AuthMaterialValidator(\"executeJs\", params),\n new ExecuteJsValidator(\"executeJs\", params)\n ],\n decrypt: (params) => [\n new AccessControlConditionsValidator(\"decrypt\", params),\n new AuthMaterialValidator(\"decrypt\", params, true),\n new StringValidator(\"decrypt\", params.ciphertext, \"ciphertext\")\n ],\n decryptFromJson: (params) => [\n new AuthMaterialValidator(\"decryptFromJson\", params),\n new DecryptFromJsonValidator(\"decryptFromJson\", params.parsedJsonData)\n ]\n };\n var EncryptToJsonValidator = class {\n constructor(fnName, params) {\n this.fnName = fnName;\n this.params = params;\n }\n validate() {\n const { file, string } = this.params;\n if (string === void 0 && file === void 0)\n return (0, constants_1.ELeft)(new constants_1.InvalidParamType({\n info: {\n param: \"string\",\n value: string,\n functionName: this.fnName\n }\n }, \"Either string or file must be provided\"));\n if (string !== void 0 && file !== void 0)\n return (0, constants_1.ELeft)(new constants_1.InvalidParamType({\n info: {\n param: \"string\",\n value: string,\n functionName: this.fnName\n }\n }, 'Provide only a \"string\" or \"file\" to encrypt; you cannot provide both'));\n return (0, constants_1.ERight)(void 0);\n }\n };\n var DecryptFromJsonValidator = class {\n constructor(fnName, params) {\n this.fnName = fnName;\n this.params = params;\n }\n validate() {\n const validators = [new StringValidator(this.fnName, this.params.dataType)];\n for (const validator of validators) {\n const validationResponse = validator.validate();\n if (validationResponse.type === constants_1.EITHER_TYPE.ERROR) {\n return validationResponse;\n }\n }\n const { dataType } = this.params;\n if (dataType !== \"string\" && dataType !== \"file\")\n return (0, constants_1.ELeft)(new constants_1.InvalidArgumentException({\n info: {\n functionName: this.fnName,\n dataType\n }\n }, `dataType of %s is not valid. Must be 'string' or 'file'.`, dataType));\n return (0, constants_1.ERight)(void 0);\n }\n };\n var Uint8ArrayValidator = class {\n constructor(fnName, uint8array, paramName = \"uint8array\") {\n this.fnName = fnName;\n this.paramName = paramName;\n this.uint8array = uint8array;\n }\n validate() {\n if (!this.uint8array) {\n return (0, constants_1.ELeft)(new constants_1.InvalidParamType({}, \"uint8array is undefined\"));\n }\n if (!(0, misc_1.checkType)({\n value: this.uint8array,\n allowedTypes: [\"Uint8Array\"],\n paramName: this.paramName,\n functionName: this.fnName\n }))\n return (0, constants_1.ELeft)(new constants_1.InvalidParamType({\n info: {\n param: this.paramName,\n value: this.uint8array,\n functionName: this.fnName\n }\n }, \"%s is not a Uint8Array\", this.paramName));\n return (0, constants_1.ERight)(void 0);\n }\n };\n var StringValidator = class {\n constructor(fnName, str, paramName = \"string\", checkIsHex = false) {\n this.fnName = fnName;\n this.paramName = paramName;\n this.checkIsHex = checkIsHex;\n this.str = str;\n }\n validate() {\n if (!this.str) {\n return (0, constants_1.ELeft)(new constants_1.InvalidParamType({}, \"str is undefined\"));\n }\n if (!(0, misc_1.checkType)({\n value: this.str,\n allowedTypes: [\"String\"],\n paramName: this.paramName,\n functionName: this.fnName\n }))\n return (0, constants_1.ELeft)(new constants_1.InvalidParamType({\n info: {\n param: this.paramName,\n value: this.str,\n functionName: this.fnName\n }\n }, \"%s is not a string\", this.paramName));\n if (this.checkIsHex && !(0, utils_1.isHexString)(this.str)) {\n return (0, constants_1.ELeft)(new constants_1.InvalidParamType({\n info: {\n param: this.paramName,\n value: this.str,\n functionName: this.fnName\n }\n }, \"%s is not a valid hex string\", this.paramName));\n }\n return (0, constants_1.ERight)(void 0);\n }\n };\n var ExecuteJsValidator = class {\n constructor(fnName, params) {\n this.fnName = fnName;\n this.params = params;\n }\n validate() {\n const { code, ipfsId } = this.params;\n if (!code && !ipfsId) {\n return (0, constants_1.ELeft)(new constants_1.ParamsMissingError({\n info: {\n functionName: this.fnName,\n params: this.params\n }\n }, \"You must pass either code or ipfsId\"));\n }\n if (code && ipfsId) {\n return (0, constants_1.ELeft)(new constants_1.ParamsMissingError({\n info: {\n functionName: this.fnName,\n params: this.params\n }\n }, \"You cannot have both 'code' and 'ipfs' at the same time\"));\n }\n return (0, constants_1.ERight)(void 0);\n }\n };\n var FileValidator = class {\n constructor(fnName, file) {\n this.fnName = fnName;\n this.file = file;\n }\n validate() {\n if (!this.file) {\n return (0, constants_1.ELeft)(new constants_1.InvalidArgumentException({\n info: {\n functionName: this.fnName,\n file: this.file\n }\n }, \"You must pass file param\"));\n }\n const allowedTypes = [\"Blob\", \"File\", \"Uint8Array\"];\n if (!(0, misc_1.checkType)({\n value: this.file,\n allowedTypes,\n paramName: \"file\",\n functionName: this.fnName\n }))\n return (0, constants_1.ELeft)(new constants_1.InvalidArgumentException({\n info: {\n functionName: this.fnName,\n file: this.file,\n allowedTypes\n }\n }, \"File param is not a valid Blob or File object\"));\n return (0, constants_1.ERight)(void 0);\n }\n };\n var AuthMaterialValidator = class {\n constructor(fnName, params, checkIfAuthSigRequiresChainParam = false) {\n this.fnName = fnName;\n this.authMaterial = params;\n this.checkIfAuthSigRequiresChainParam = checkIfAuthSigRequiresChainParam;\n }\n validate() {\n const { authSig, sessionSigs } = this.authMaterial;\n if (authSig && !(0, misc_1.is)(authSig, \"Object\", \"authSig\", this.fnName))\n return (0, constants_1.ELeft)(new constants_1.InvalidParamType({\n info: {\n param: \"authSig\",\n value: authSig,\n functionName: this.fnName\n }\n }, \"authSig is not an object\"));\n if (this.checkIfAuthSigRequiresChainParam) {\n if (!this.authMaterial.chain)\n return (0, constants_1.ELeft)(new constants_1.InvalidArgumentException({\n info: {\n functionName: this.fnName,\n chain: this.authMaterial.chain\n }\n }, \"You must pass chain param\"));\n if (authSig && !(0, misc_1.checkIfAuthSigRequiresChainParam)(authSig, this.authMaterial.chain, this.fnName))\n return (0, constants_1.ELeft)(new constants_1.InvalidParamType({\n info: {\n param: \"authSig\",\n value: authSig,\n functionName: this.fnName\n }\n }, \"authSig is not valid\"));\n }\n if (sessionSigs && !(0, misc_1.is)(sessionSigs, \"Object\", \"sessionSigs\", this.fnName))\n return (0, constants_1.ELeft)(new constants_1.InvalidParamType({\n info: {\n param: \"sessionSigs\",\n value: sessionSigs,\n functionName: this.fnName\n }\n }, \"sessionSigs is not an object\"));\n if (!sessionSigs && !authSig)\n return (0, constants_1.ELeft)(new constants_1.InvalidArgumentException({\n info: {\n functionName: this.fnName,\n sessionSigs,\n authSig\n }\n }, \"You must pass either authSig or sessionSigs\"));\n if (sessionSigs && authSig)\n return (0, constants_1.ELeft)(new constants_1.InvalidArgumentException({\n info: {\n functionName: this.fnName,\n sessionSigs,\n authSig\n }\n }, \"You cannot have both authSig and sessionSigs\"));\n return (0, constants_1.ERight)(void 0);\n }\n };\n var AccessControlConditionsValidator = class {\n constructor(fnName, params) {\n this.fnName = fnName;\n this.conditions = params;\n }\n validate() {\n const { accessControlConditions, evmContractConditions, solRpcConditions, unifiedAccessControlConditions } = this.conditions;\n if (accessControlConditions && !(0, misc_1.is)(accessControlConditions, \"Array\", \"accessControlConditions\", this.fnName))\n return (0, constants_1.ELeft)(new constants_1.InvalidParamType({\n info: {\n param: \"accessControlConditions\",\n value: accessControlConditions,\n functionName: this.fnName\n }\n }, \"%s is not an array\", \"accessControlConditions\"));\n if (evmContractConditions && !(0, misc_1.is)(evmContractConditions, \"Array\", \"evmContractConditions\", this.fnName))\n return (0, constants_1.ELeft)(new constants_1.InvalidParamType({\n info: {\n param: \"evmContractConditions\",\n value: evmContractConditions,\n functionName: this.fnName\n }\n }, \"%s is not an array\", \"evmContractConditions\"));\n if (solRpcConditions && !(0, misc_1.is)(solRpcConditions, \"Array\", \"solRpcConditions\", this.fnName))\n return (0, constants_1.ELeft)(new constants_1.InvalidParamType({\n info: {\n param: \"solRpcConditions\",\n value: solRpcConditions,\n functionName: this.fnName\n }\n }, \"%s is not an array\", \"solRpcConditions\"));\n if (unifiedAccessControlConditions && !(0, misc_1.is)(unifiedAccessControlConditions, \"Array\", \"unifiedAccessControlConditions\", this.fnName))\n return (0, constants_1.ELeft)(new constants_1.InvalidParamType({\n info: {\n param: \"unifiedAccessControlConditions\",\n value: unifiedAccessControlConditions,\n functionName: this.fnName\n }\n }, \"%s is not an array\", \"unifiedAccessControlConditions\"));\n if (!accessControlConditions && !evmContractConditions && !solRpcConditions && !unifiedAccessControlConditions)\n return (0, constants_1.ELeft)(new constants_1.InvalidArgumentException({\n info: {\n functionName: this.fnName,\n conditions: this.conditions\n }\n }, \"You must pass either accessControlConditions, evmContractConditions, solRpcConditions or unifiedAccessControlConditions\"));\n if (accessControlConditions && !(0, utils_2.isValidBooleanExpression)(accessControlConditions))\n return (0, constants_1.ELeft)(new constants_1.InvalidBooleanException({\n info: {\n functionName: this.fnName,\n accessControlConditions\n }\n }, \"Invalid boolean Access Control Conditions\"));\n if (evmContractConditions && !(0, utils_2.isValidBooleanExpression)(evmContractConditions))\n return (0, constants_1.ELeft)(new constants_1.InvalidBooleanException({\n info: {\n functionName: this.fnName,\n evmContractConditions\n }\n }, \"Invalid boolean EVM Access Control Conditions\"));\n if (solRpcConditions && !(0, utils_2.isValidBooleanExpression)(solRpcConditions))\n return (0, constants_1.ELeft)(new constants_1.InvalidBooleanException({\n info: {\n functionName: this.fnName,\n solRpcConditions\n }\n }, \"Invalid boolean Solana Access Control Conditions\"));\n if (unifiedAccessControlConditions && !(0, utils_2.isValidBooleanExpression)(unifiedAccessControlConditions))\n return (0, constants_1.ELeft)(new constants_1.InvalidBooleanException({\n info: {\n functionName: this.fnName,\n unifiedAccessControlConditions\n }\n }, \"Invalid boolean Unified Access Control Conditions\"));\n return (0, constants_1.ERight)(void 0);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+misc@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/misc/src/lib/helper/session-sigs-validator.js\n var require_session_sigs_validator = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+misc@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/misc/src/lib/helper/session-sigs-validator.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.parseSignedMessage = parseSignedMessage;\n exports3.validateSessionSig = validateSessionSig;\n exports3.validateSessionSigs = validateSessionSigs;\n function parseSignedMessage(signedMessage) {\n const lines = signedMessage.split(\"\\n\");\n const parsedData = {};\n let currentKey = null;\n let currentValue = \"\";\n lines.forEach((line) => {\n const keyValueMatch = line.match(/^([^:]+):\\s*(.*)$/);\n if (keyValueMatch) {\n if (currentKey !== null) {\n parsedData[currentKey.trim()] = currentValue.trim();\n }\n currentKey = keyValueMatch[1];\n currentValue = keyValueMatch[2];\n } else if (line.startsWith(\"- \")) {\n const item = line.substring(2).trim();\n if (!parsedData[currentKey]) {\n parsedData[currentKey] = [];\n }\n parsedData[currentKey].push(item);\n } else if (line.trim() === \"\") {\n } else {\n currentValue += \"\\n\" + line;\n }\n });\n if (currentKey !== null) {\n parsedData[currentKey.trim()] = currentValue.trim();\n }\n return parsedData;\n }\n function validateExpiration(expirationTimeStr, context2) {\n const errors = [];\n const expirationTime = new Date(expirationTimeStr);\n const currentTime = /* @__PURE__ */ new Date();\n if (isNaN(expirationTime.getTime())) {\n errors.push(`Invalid Expiration Time format in ${context2}: ${expirationTimeStr}`);\n } else if (expirationTime < currentTime) {\n errors.push(`Expired ${context2}. Expiration Time: ${expirationTime.toISOString()}`);\n }\n return {\n isValid: errors.length === 0,\n errors\n };\n }\n function parseCapabilities(capabilities) {\n const errors = [];\n capabilities.forEach((capability, index2) => {\n const { signedMessage } = capability;\n const parsedCapabilityMessage = parseSignedMessage(signedMessage);\n capability.parsedSignedMessage = parsedCapabilityMessage;\n const expirationTimeStr = parsedCapabilityMessage[\"Expiration Time\"];\n if (expirationTimeStr) {\n const validationResult = validateExpiration(expirationTimeStr, `capability ${index2}`);\n if (!validationResult.isValid) {\n errors.push(...validationResult.errors);\n }\n } else {\n errors.push(`Expiration Time not found in capability ${index2}'s signedMessage.`);\n }\n });\n return {\n isValid: errors.length === 0,\n errors\n };\n }\n function validateSessionSig(sessionSig) {\n const errors = [];\n let parsedSignedMessage;\n try {\n parsedSignedMessage = JSON.parse(sessionSig.signedMessage);\n } catch (error) {\n errors.push(\"Main signedMessage is not valid JSON.\");\n return { isValid: false, errors };\n }\n const capabilities = parsedSignedMessage.capabilities;\n if (!capabilities) {\n errors.push(\"Capabilities not found in main signedMessage.\");\n } else if (capabilities.length === 0) {\n errors.push(\"No capabilities found in main signedMessage.\");\n } else {\n const capabilitiesValidationResult = parseCapabilities(capabilities);\n if (!capabilitiesValidationResult.isValid) {\n errors.push(...capabilitiesValidationResult.errors);\n }\n }\n const outerExpirationTimeStr = parsedSignedMessage[\"expiration\"];\n if (outerExpirationTimeStr) {\n const validationResult = validateExpiration(outerExpirationTimeStr, \"main signedMessage\");\n if (!validationResult.isValid) {\n errors.push(...validationResult.errors);\n }\n } else {\n errors.push(\"Expiration Time not found in outer signedMessage.\");\n }\n return {\n isValid: errors.length === 0,\n errors\n };\n }\n function validateSessionSigs(sessionSigs) {\n const errors = [];\n Object.entries(sessionSigs).forEach(([key, sessionSig]) => {\n const validationResult = validateSessionSig(sessionSig);\n if (!validationResult.isValid) {\n errors.push(`Session Sig '${key}': ${validationResult.errors.join(\", \")}`);\n }\n });\n return {\n isValid: errors.length === 0,\n errors\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+misc@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/misc/src/lib/helper/session-sigs-reader.js\n var require_session_sigs_reader = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+misc@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/misc/src/lib/helper/session-sigs-reader.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.formatSessionSigs = formatSessionSigs;\n var session_sigs_validator_1 = require_session_sigs_validator();\n function formatDuration(start, end) {\n const diff = end.getTime() - start.getTime();\n const days = Math.floor(diff / (1e3 * 60 * 60 * 24));\n const hours = Math.floor(diff % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60));\n const minutes = Math.floor(diff % (1e3 * 60 * 60) / (1e3 * 60));\n const seconds = (diff % (1e3 * 60) / 1e3).toFixed(3);\n let elapsedTime;\n if (days > 0) {\n elapsedTime = `${days} days`;\n } else if (hours > 0) {\n elapsedTime = `${hours} hours, ${minutes} minutes, ${seconds} seconds`;\n } else {\n elapsedTime = `${minutes} minutes, ${seconds} seconds`;\n }\n return elapsedTime;\n }\n function formatStatus(expirationDate, currentDate) {\n if (expirationDate > currentDate) {\n const timeLeft = formatDuration(currentDate, expirationDate);\n return `\\u2705 Not expired (valid for ${timeLeft})`;\n } else {\n const timeAgo = formatDuration(expirationDate, currentDate);\n return `\\u274C Expired (expired ${timeAgo} ago)`;\n }\n }\n function humanReadableAtt(obj, indentLevel = 0) {\n const indent = \" \".repeat(indentLevel * 2);\n let result = \"\";\n for (const key in obj) {\n result += `${indent}* ${key}\n`;\n if (typeof obj[key] === \"object\" && !Array.isArray(obj[key])) {\n result += humanReadableAtt(obj[key], indentLevel + 1);\n } else if (Array.isArray(obj[key])) {\n obj[key].forEach((item) => {\n if (typeof item === \"object\") {\n result += humanReadableAtt(item, indentLevel + 1);\n } else {\n result += `${indent} * ${item}\n`;\n }\n });\n } else {\n result += `${indent} * ${obj[key]}\n`;\n }\n }\n return result;\n }\n function formatSessionSigs(sessionSigs, currentTime = /* @__PURE__ */ new Date()) {\n const parsedSigs = JSON.parse(sessionSigs);\n const firstNodeKey = Object.keys(parsedSigs)[0];\n const firstNode = parsedSigs[firstNodeKey];\n let signedMessage;\n try {\n signedMessage = JSON.parse(firstNode.signedMessage);\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : \"Unknown error\";\n throw new Error(`Invalid JSON format for signedMessage: ${errorMessage}`);\n }\n const currentDate = new Date(currentTime);\n let result = `The request time is at: ${currentDate.toISOString()}\n`;\n let issuedAt, expiration;\n try {\n issuedAt = new Date(signedMessage.issuedAt);\n expiration = new Date(signedMessage.expiration);\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : \"Unknown error\";\n throw new Error(`Error parsing issuedAt or expiration: ${errorMessage}`);\n }\n result += \"* Outer expiration:\\n\";\n result += ` * Issued at: ${issuedAt.toISOString()}\n`;\n result += ` * Expiration: ${expiration.toISOString()}\n`;\n result += ` * Duration: ${formatDuration(issuedAt, expiration)}\n`;\n result += ` * Status: ${formatStatus(expiration, currentDate)}\n`;\n result += \"* Capabilities:\\n\";\n signedMessage.capabilities.forEach((cap, index2) => {\n const capType = cap.derivedVia;\n const parsedCapMessage = (0, session_sigs_validator_1.parseSignedMessage)(cap.signedMessage);\n let attenuation = \"\";\n try {\n const encodedRecap = parsedCapMessage[\"- urn\"]?.split(\":\")[1];\n const decodedRecap = atob(encodedRecap);\n const jsonRecap = JSON.parse(decodedRecap);\n attenuation = humanReadableAtt(jsonRecap.att, 6);\n } catch (e2) {\n console.log(\"Error parsing attenuation::\", e2);\n }\n const capIssuedAt = new Date(parsedCapMessage[\"Issued At\"] || \"\");\n const capExpiration = new Date(parsedCapMessage[\"Expiration Time\"] || \"\");\n result += ` * Capability ${index2 + 1} (${capType}):\n`;\n result += ` * Issued at: ${capIssuedAt.toISOString()}\n`;\n result += ` * Expiration: ${capExpiration.toISOString()}\n`;\n result += ` * Duration: ${formatDuration(capIssuedAt, capExpiration)}\n`;\n result += ` * Status: ${formatStatus(capExpiration, currentDate)}\n`;\n result += ` * Attenuation:\n`;\n result += attenuation;\n });\n return result;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+misc@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/misc/src/index.js\n var require_src4 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+misc@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/misc/src/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.formatSessionSigs = exports3.validateSessionSigs = exports3.validateSessionSig = void 0;\n var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));\n tslib_1.__exportStar(require_addresses2(), exports3);\n tslib_1.__exportStar(require_misc(), exports3);\n tslib_1.__exportStar(require_params_validators(), exports3);\n tslib_1.__exportStar(require_utils11(), exports3);\n var session_sigs_validator_1 = require_session_sigs_validator();\n Object.defineProperty(exports3, \"validateSessionSig\", { enumerable: true, get: function() {\n return session_sigs_validator_1.validateSessionSig;\n } });\n Object.defineProperty(exports3, \"validateSessionSigs\", { enumerable: true, get: function() {\n return session_sigs_validator_1.validateSessionSigs;\n } });\n var session_sigs_reader_1 = require_session_sigs_reader();\n Object.defineProperty(exports3, \"formatSessionSigs\", { enumerable: true, get: function() {\n return session_sigs_reader_1.formatSessionSigs;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/lib/hex2dec.js\n var require_hex2dec = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/lib/hex2dec.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.intToIP = void 0;\n exports3.add = add2;\n exports3.multiplyByNumber = multiplyByNumber;\n exports3.parseToDigitsArray = parseToDigitsArray;\n exports3.convertBase = convertBase;\n exports3.decToHex = decToHex;\n exports3.hexToDec = hexToDec;\n function add2(x4, y6, base4) {\n var z2 = [];\n var n2 = Math.max(x4.length, y6.length);\n var carry = 0;\n var i3 = 0;\n while (i3 < n2 || carry) {\n var xi = i3 < x4.length ? x4[i3] : 0;\n var yi = i3 < y6.length ? y6[i3] : 0;\n var zi = carry + xi + yi;\n z2.push(zi % base4);\n carry = Math.floor(zi / base4);\n i3++;\n }\n return z2;\n }\n function multiplyByNumber(num2, x4, base4) {\n if (num2 < 0)\n return null;\n if (num2 == 0)\n return [];\n var result = [];\n var power = x4;\n while (true) {\n if (num2 & 1) {\n result = add2(result, power, base4);\n }\n num2 = num2 >> 1;\n if (num2 === 0)\n break;\n power = add2(power, power, base4);\n }\n return result;\n }\n function parseToDigitsArray(str, base4) {\n var digits = str.split(\"\");\n var ary = [];\n for (var i3 = digits.length - 1; i3 >= 0; i3--) {\n var n2 = parseInt(digits[i3], base4);\n if (isNaN(n2))\n return null;\n ary.push(n2);\n }\n return ary;\n }\n function convertBase(str, fromBase, toBase) {\n var digits = parseToDigitsArray(str, fromBase);\n if (digits === null)\n return null;\n var outArray = [];\n var power = [1];\n for (var i3 = 0; i3 < digits.length; i3++) {\n if (digits[i3]) {\n outArray = add2(outArray, multiplyByNumber(digits[i3], power, toBase), toBase);\n }\n power = multiplyByNumber(fromBase, power, toBase);\n }\n var out = \"\";\n for (var i3 = outArray.length - 1; i3 >= 0; i3--) {\n out += outArray[i3].toString(toBase);\n }\n if (out === \"\") {\n out = \"0\";\n }\n return out;\n }\n function decToHex(decStr, opts) {\n var hidePrefix = opts && opts.prefix === false;\n var hex = convertBase(decStr, 10, 16);\n return hex ? hidePrefix ? hex : \"0x\" + hex : null;\n }\n function hexToDec(hexStr) {\n if (hexStr.substring(0, 2) === \"0x\")\n hexStr = hexStr.substring(2);\n hexStr = hexStr.toLowerCase();\n return convertBase(hexStr, 16, 10);\n }\n var intToIP = (ip) => {\n const binaryString = ip.toString(2).padStart(32, \"0\");\n const ipArray = [];\n for (let i3 = 0; i3 < 32; i3 += 8) {\n ipArray.push(parseInt(binaryString.substring(i3, i3 + 8), 2));\n }\n return ipArray.join(\".\");\n };\n exports3.intToIP = intToIP;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/Allowlist.sol/AllowlistData.js\n var require_AllowlistData = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/Allowlist.sol/AllowlistData.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AllowlistData = void 0;\n exports3.AllowlistData = {\n date: \"2023-11-14T15:45:41Z\",\n address: \"0xfc7Bebd150b36921549595A776D7723fBC4Bb2D9\",\n contractName: \"Allowlist\",\n abi: [\n {\n inputs: [],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"newAdmin\",\n type: \"address\"\n }\n ],\n name: \"AdminAdded\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"newAdmin\",\n type: \"address\"\n }\n ],\n name: \"AdminRemoved\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\"\n }\n ],\n name: \"ItemAllowed\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\"\n }\n ],\n name: \"ItemNotAllowed\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"previousOwner\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\"\n }\n ],\n name: \"OwnershipTransferred\",\n type: \"event\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newAdmin\",\n type: \"address\"\n }\n ],\n name: \"addAdmin\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"allowAll\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n name: \"allowedItems\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\"\n }\n ],\n name: \"isAllowed\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"owner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newAdmin\",\n type: \"address\"\n }\n ],\n name: \"removeAdmin\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"renounceOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"_allowAll\",\n type: \"bool\"\n }\n ],\n name: \"setAllowAll\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\"\n }\n ],\n name: \"setAllowed\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\"\n }\n ],\n name: \"setNotAllowed\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\"\n }\n ],\n name: \"transferOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/LITToken.sol/LITTokenData.js\n var require_LITTokenData = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/LITToken.sol/LITTokenData.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LITTokenData = void 0;\n exports3.LITTokenData = {\n date: \"2023-10-02T18:22:38.000Z\",\n address: \"0x53695556f8a1a064EdFf91767f15652BbfaFaD04\",\n contractName: \"LITToken\",\n abi: [\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"cap\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n inputs: [],\n name: \"InvalidShortString\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"str\",\n type: \"string\"\n }\n ],\n name: \"StringTooLong\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\"\n }\n ],\n name: \"Approval\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"delegator\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"fromDelegate\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"toDelegate\",\n type: \"address\"\n }\n ],\n name: \"DelegateChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"delegate\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"previousBalance\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newBalance\",\n type: \"uint256\"\n }\n ],\n name: \"DelegateVotesChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [],\n name: \"EIP712DomainChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"Paused\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"previousAdminRole\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"newAdminRole\",\n type: \"bytes32\"\n }\n ],\n name: \"RoleAdminChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n }\n ],\n name: \"RoleGranted\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n }\n ],\n name: \"RoleRevoked\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\"\n }\n ],\n name: \"Transfer\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"Unpaused\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"ADMIN_ROLE\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"CLOCK_MODE\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"DEFAULT_ADMIN_ROLE\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"MINTER_ROLE\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"PAUSER_ROLE\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\"\n }\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"burn\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"burnFrom\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"cap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n internalType: \"uint32\",\n name: \"pos\",\n type: \"uint32\"\n }\n ],\n name: \"checkpoints\",\n outputs: [\n {\n components: [\n {\n internalType: \"uint32\",\n name: \"fromBlock\",\n type: \"uint32\"\n },\n {\n internalType: \"uint224\",\n name: \"votes\",\n type: \"uint224\"\n }\n ],\n internalType: \"struct ERC20Votes.Checkpoint\",\n name: \"\",\n type: \"tuple\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"clock\",\n outputs: [\n {\n internalType: \"uint48\",\n name: \"\",\n type: \"uint48\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"subtractedValue\",\n type: \"uint256\"\n }\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"delegatee\",\n type: \"address\"\n }\n ],\n name: \"delegate\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"delegatee\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"expiry\",\n type: \"uint256\"\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\"\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\"\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\"\n }\n ],\n name: \"delegateBySig\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"delegates\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"eip712Domain\",\n outputs: [\n {\n internalType: \"bytes1\",\n name: \"fields\",\n type: \"bytes1\"\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\"\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\"\n },\n {\n internalType: \"uint256\",\n name: \"chainId\",\n type: \"uint256\"\n },\n {\n internalType: \"address\",\n name: \"verifyingContract\",\n type: \"address\"\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint256[]\",\n name: \"extensions\",\n type: \"uint256[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"timepoint\",\n type: \"uint256\"\n }\n ],\n name: \"getPastTotalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"timepoint\",\n type: \"uint256\"\n }\n ],\n name: \"getPastVotes\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n }\n ],\n name: \"getRoleAdmin\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"getVotes\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"grantRole\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"hasRole\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\"\n }\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_recipient\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"_amount\",\n type: \"uint256\"\n }\n ],\n name: \"mint\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n }\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"numCheckpoints\",\n outputs: [\n {\n internalType: \"uint32\",\n name: \"\",\n type: \"uint32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"paused\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\"\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\"\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\"\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\"\n }\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"renounceRole\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"revokeRole\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"interfaceId\",\n type: \"bytes4\"\n }\n ],\n name: \"supportsInterface\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/Multisender.sol/MultisenderData.js\n var require_MultisenderData = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/Multisender.sol/MultisenderData.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.MultisenderData = void 0;\n exports3.MultisenderData = {\n date: \"2023-11-14T15:45:41Z\",\n address: \"0xD4e3D27d21D6D6d596b6524610C486F8A9c70958\",\n contractName: \"Multisender\",\n abi: [\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"previousOwner\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\"\n }\n ],\n name: \"OwnershipTransferred\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"owner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"renounceOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"_recipients\",\n type: \"address[]\"\n }\n ],\n name: \"sendEth\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"_recipients\",\n type: \"address[]\"\n },\n {\n internalType: \"address\",\n name: \"tokenContract\",\n type: \"address\"\n }\n ],\n name: \"sendTokens\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\"\n }\n ],\n name: \"transferOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"withdraw\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"tokenContract\",\n type: \"address\"\n }\n ],\n name: \"withdrawTokens\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/PKPHelper.sol/PKPHelperData.js\n var require_PKPHelperData = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/PKPHelper.sol/PKPHelperData.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PKPHelperData = void 0;\n exports3.PKPHelperData = {\n date: \"2023-11-14T15:45:41Z\",\n address: \"0xF02b6D6b0970DB3810963300a6Ad38D8429c4cdb\",\n contractName: \"PKPHelper\",\n abi: [\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_resolver\",\n type: \"address\"\n },\n {\n internalType: \"enum ContractResolver.Env\",\n name: \"_env\",\n type: \"uint8\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"newResolverAddress\",\n type: \"address\"\n }\n ],\n name: \"ContractResolverAddressSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"previousOwner\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\"\n }\n ],\n name: \"OwnershipTransferred\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"previousAdminRole\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"newAdminRole\",\n type: \"bytes32\"\n }\n ],\n name: \"RoleAdminChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n }\n ],\n name: \"RoleGranted\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n }\n ],\n name: \"RoleRevoked\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"DEFAULT_ADMIN_ROLE\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"keyType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes32\",\n name: \"derivedKeyId\",\n type: \"bytes32\"\n },\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\"\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\"\n }\n ],\n internalType: \"struct IPubkeyRouter.Signature[]\",\n name: \"signatures\",\n type: \"tuple[]\"\n }\n ],\n internalType: \"struct LibPKPNFTStorage.ClaimMaterial\",\n name: \"claimMaterial\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"keyType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes[]\",\n name: \"permittedIpfsCIDs\",\n type: \"bytes[]\"\n },\n {\n internalType: \"uint256[][]\",\n name: \"permittedIpfsCIDScopes\",\n type: \"uint256[][]\"\n },\n {\n internalType: \"address[]\",\n name: \"permittedAddresses\",\n type: \"address[]\"\n },\n {\n internalType: \"uint256[][]\",\n name: \"permittedAddressScopes\",\n type: \"uint256[][]\"\n },\n {\n internalType: \"uint256[]\",\n name: \"permittedAuthMethodTypes\",\n type: \"uint256[]\"\n },\n {\n internalType: \"bytes[]\",\n name: \"permittedAuthMethodIds\",\n type: \"bytes[]\"\n },\n {\n internalType: \"bytes[]\",\n name: \"permittedAuthMethodPubkeys\",\n type: \"bytes[]\"\n },\n {\n internalType: \"uint256[][]\",\n name: \"permittedAuthMethodScopes\",\n type: \"uint256[][]\"\n },\n {\n internalType: \"bool\",\n name: \"addPkpEthAddressAsPermittedAddress\",\n type: \"bool\"\n },\n {\n internalType: \"bool\",\n name: \"sendPkpToItself\",\n type: \"bool\"\n }\n ],\n internalType: \"struct PKPHelper.AuthMethodData\",\n name: \"authMethodData\",\n type: \"tuple\"\n }\n ],\n name: \"claimAndMintNextAndAddAuthMethods\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"keyType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes32\",\n name: \"derivedKeyId\",\n type: \"bytes32\"\n },\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\"\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\"\n }\n ],\n internalType: \"struct IPubkeyRouter.Signature[]\",\n name: \"signatures\",\n type: \"tuple[]\"\n }\n ],\n internalType: \"struct LibPKPNFTStorage.ClaimMaterial\",\n name: \"claimMaterial\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"keyType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes[]\",\n name: \"permittedIpfsCIDs\",\n type: \"bytes[]\"\n },\n {\n internalType: \"uint256[][]\",\n name: \"permittedIpfsCIDScopes\",\n type: \"uint256[][]\"\n },\n {\n internalType: \"address[]\",\n name: \"permittedAddresses\",\n type: \"address[]\"\n },\n {\n internalType: \"uint256[][]\",\n name: \"permittedAddressScopes\",\n type: \"uint256[][]\"\n },\n {\n internalType: \"uint256[]\",\n name: \"permittedAuthMethodTypes\",\n type: \"uint256[]\"\n },\n {\n internalType: \"bytes[]\",\n name: \"permittedAuthMethodIds\",\n type: \"bytes[]\"\n },\n {\n internalType: \"bytes[]\",\n name: \"permittedAuthMethodPubkeys\",\n type: \"bytes[]\"\n },\n {\n internalType: \"uint256[][]\",\n name: \"permittedAuthMethodScopes\",\n type: \"uint256[][]\"\n },\n {\n internalType: \"bool\",\n name: \"addPkpEthAddressAsPermittedAddress\",\n type: \"bool\"\n },\n {\n internalType: \"bool\",\n name: \"sendPkpToItself\",\n type: \"bool\"\n }\n ],\n internalType: \"struct PKPHelper.AuthMethodData\",\n name: \"authMethodData\",\n type: \"tuple\"\n }\n ],\n name: \"claimAndMintNextAndAddAuthMethodsWithTypes\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"contractResolver\",\n outputs: [\n {\n internalType: \"contract ContractResolver\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"env\",\n outputs: [\n {\n internalType: \"enum ContractResolver.Env\",\n name: \"\",\n type: \"uint8\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getDomainWalletRegistry\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getPKPNftMetdataAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getPkpNftAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getPkpPermissionsAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n }\n ],\n name: \"getRoleAdmin\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"grantRole\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"hasRole\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"keyType\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256[]\",\n name: \"permittedAuthMethodTypes\",\n type: \"uint256[]\"\n },\n {\n internalType: \"bytes[]\",\n name: \"permittedAuthMethodIds\",\n type: \"bytes[]\"\n },\n {\n internalType: \"bytes[]\",\n name: \"permittedAuthMethodPubkeys\",\n type: \"bytes[]\"\n },\n {\n internalType: \"uint256[][]\",\n name: \"permittedAuthMethodScopes\",\n type: \"uint256[][]\"\n },\n {\n internalType: \"bool\",\n name: \"addPkpEthAddressAsPermittedAddress\",\n type: \"bool\"\n },\n {\n internalType: \"bool\",\n name: \"sendPkpToItself\",\n type: \"bool\"\n }\n ],\n name: \"mintNextAndAddAuthMethods\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"keyType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes[]\",\n name: \"permittedIpfsCIDs\",\n type: \"bytes[]\"\n },\n {\n internalType: \"uint256[][]\",\n name: \"permittedIpfsCIDScopes\",\n type: \"uint256[][]\"\n },\n {\n internalType: \"address[]\",\n name: \"permittedAddresses\",\n type: \"address[]\"\n },\n {\n internalType: \"uint256[][]\",\n name: \"permittedAddressScopes\",\n type: \"uint256[][]\"\n },\n {\n internalType: \"uint256[]\",\n name: \"permittedAuthMethodTypes\",\n type: \"uint256[]\"\n },\n {\n internalType: \"bytes[]\",\n name: \"permittedAuthMethodIds\",\n type: \"bytes[]\"\n },\n {\n internalType: \"bytes[]\",\n name: \"permittedAuthMethodPubkeys\",\n type: \"bytes[]\"\n },\n {\n internalType: \"uint256[][]\",\n name: \"permittedAuthMethodScopes\",\n type: \"uint256[][]\"\n },\n {\n internalType: \"bool\",\n name: \"addPkpEthAddressAsPermittedAddress\",\n type: \"bool\"\n },\n {\n internalType: \"bool\",\n name: \"sendPkpToItself\",\n type: \"bool\"\n }\n ],\n name: \"mintNextAndAddAuthMethodsWithTypes\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"keyType\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256[]\",\n name: \"permittedAuthMethodTypes\",\n type: \"uint256[]\"\n },\n {\n internalType: \"bytes[]\",\n name: \"permittedAuthMethodIds\",\n type: \"bytes[]\"\n },\n {\n internalType: \"bytes[]\",\n name: \"permittedAuthMethodPubkeys\",\n type: \"bytes[]\"\n },\n {\n internalType: \"uint256[][]\",\n name: \"permittedAuthMethodScopes\",\n type: \"uint256[][]\"\n },\n {\n internalType: \"string[]\",\n name: \"nftMetadata\",\n type: \"string[]\"\n },\n {\n internalType: \"bool\",\n name: \"addPkpEthAddressAsPermittedAddress\",\n type: \"bool\"\n },\n {\n internalType: \"bool\",\n name: \"sendPkpToItself\",\n type: \"bool\"\n }\n ],\n name: \"mintNextAndAddDomainWalletMetadata\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\"\n }\n ],\n name: \"onERC721Received\",\n outputs: [\n {\n internalType: \"bytes4\",\n name: \"\",\n type: \"bytes4\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"owner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"removePkpMetadata\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"renounceOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"renounceRole\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"revokeRole\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newResolverAddress\",\n type: \"address\"\n }\n ],\n name: \"setContractResolver\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"string[]\",\n name: \"nftMetadata\",\n type: \"string[]\"\n }\n ],\n name: \"setPkpMetadata\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"interfaceId\",\n type: \"bytes4\"\n }\n ],\n name: \"supportsInterface\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\"\n }\n ],\n name: \"transferOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/PKPNFT.sol/PKPNFTData.js\n var require_PKPNFTData = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/PKPNFT.sol/PKPNFTData.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PKPNFTData = void 0;\n exports3.PKPNFTData = {\n date: \"2023-11-14T15:45:41Z\",\n address: \"0x58582b93d978F30b4c4E812A16a7b31C035A69f7\",\n contractName: \"PKPNFT\",\n abi: [\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotAddFunctionToDiamondThatAlreadyExists\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4[]\",\n name: \"_selectors\",\n type: \"bytes4[]\"\n }\n ],\n name: \"CannotAddSelectorsToZeroAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotRemoveFunctionThatDoesNotExist\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotRemoveImmutableFunction\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotReplaceFunctionThatDoesNotExists\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4[]\",\n name: \"_selectors\",\n type: \"bytes4[]\"\n }\n ],\n name: \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotReplaceImmutableFunction\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint8\",\n name: \"_action\",\n type: \"uint8\"\n }\n ],\n name: \"IncorrectFacetCutAction\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_initializationContractAddress\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"_calldata\",\n type: \"bytes\"\n }\n ],\n name: \"InitializationFunctionReverted\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_contractAddress\",\n type: \"address\"\n },\n {\n internalType: \"string\",\n name: \"_message\",\n type: \"string\"\n }\n ],\n name: \"NoBytecodeAtAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_facetAddress\",\n type: \"address\"\n }\n ],\n name: \"NoSelectorsProvidedForFacetForCut\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_user\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"_contractOwner\",\n type: \"address\"\n }\n ],\n name: \"NotContractOwner\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_facetAddress\",\n type: \"address\"\n }\n ],\n name: \"RemoveFacetAddressMustBeZeroAddress\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"facetAddress\",\n type: \"address\"\n },\n {\n internalType: \"enum IDiamond.FacetCutAction\",\n name: \"action\",\n type: \"uint8\"\n },\n {\n internalType: \"bytes4[]\",\n name: \"functionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n indexed: false,\n internalType: \"struct IDiamond.FacetCut[]\",\n name: \"_diamondCut\",\n type: \"tuple[]\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"_init\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"_calldata\",\n type: \"bytes\"\n }\n ],\n name: \"DiamondCut\",\n type: \"event\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"facetAddress\",\n type: \"address\"\n },\n {\n internalType: \"enum IDiamond.FacetCutAction\",\n name: \"action\",\n type: \"uint8\"\n },\n {\n internalType: \"bytes4[]\",\n name: \"functionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n internalType: \"struct IDiamond.FacetCut[]\",\n name: \"_diamondCut\",\n type: \"tuple[]\"\n },\n {\n internalType: \"address\",\n name: \"_init\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"_calldata\",\n type: \"bytes\"\n }\n ],\n name: \"diamondCut\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_functionSelector\",\n type: \"bytes4\"\n }\n ],\n name: \"facetAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"facetAddress_\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"facetAddresses\",\n outputs: [\n {\n internalType: \"address[]\",\n name: \"facetAddresses_\",\n type: \"address[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_facet\",\n type: \"address\"\n }\n ],\n name: \"facetFunctionSelectors\",\n outputs: [\n {\n internalType: \"bytes4[]\",\n name: \"_facetFunctionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"facets\",\n outputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"facetAddress\",\n type: \"address\"\n },\n {\n internalType: \"bytes4[]\",\n name: \"functionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n internalType: \"struct IDiamondLoupe.Facet[]\",\n name: \"facets_\",\n type: \"tuple[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"previousOwner\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\"\n }\n ],\n name: \"OwnershipTransferred\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"owner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"owner_\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_newOwner\",\n type: \"address\"\n }\n ],\n name: \"transferOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"CallerNotOwner\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"approved\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"Approval\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"operator\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\"\n }\n ],\n name: \"ApprovalForAll\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"newResolverAddress\",\n type: \"address\"\n }\n ],\n name: \"ContractResolverAddressSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"newFreeMintSigner\",\n type: \"address\"\n }\n ],\n name: \"FreeMintSignerSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint8\",\n name: \"version\",\n type: \"uint8\"\n }\n ],\n name: \"Initialized\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newMintCost\",\n type: \"uint256\"\n }\n ],\n name: \"MintCostSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"pubkey\",\n type: \"bytes\"\n }\n ],\n name: \"PKPMinted\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"Transfer\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"Withdrew\",\n type: \"event\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"approve\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n }\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"burn\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"keyType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes32\",\n name: \"derivedKeyId\",\n type: \"bytes32\"\n },\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\"\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\"\n }\n ],\n internalType: \"struct IPubkeyRouter.Signature[]\",\n name: \"signatures\",\n type: \"tuple[]\"\n }\n ],\n name: \"claimAndMint\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"exists\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"freeMintSigner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"getApproved\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"getEthAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getNextDerivedKeyId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getPkpNftMetadataAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getPkpPermissionsAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"getPubkey\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getRouterAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getStakingAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"operator\",\n type: \"address\"\n }\n ],\n name: \"isApprovedForAll\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"mintCost\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"keyType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"ipfsCID\",\n type: \"bytes\"\n }\n ],\n name: \"mintGrantAndBurnNext\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"keyType\",\n type: \"uint256\"\n }\n ],\n name: \"mintNext\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"ownerOf\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"hash\",\n type: \"bytes32\"\n }\n ],\n name: \"prefixed\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"redeemedFreeMintIds\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"safeTransferFrom\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\"\n }\n ],\n name: \"safeTransferFrom\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"operator\",\n type: \"address\"\n },\n {\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\"\n }\n ],\n name: \"setApprovalForAll\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newResolverAddress\",\n type: \"address\"\n }\n ],\n name: \"setContractResolver\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newFreeMintSigner\",\n type: \"address\"\n }\n ],\n name: \"setFreeMintSigner\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newMintCost\",\n type: \"uint256\"\n }\n ],\n name: \"setMintCost\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"interfaceId\",\n type: \"bytes4\"\n }\n ],\n name: \"supportsInterface\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"index\",\n type: \"uint256\"\n }\n ],\n name: \"tokenByIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"index\",\n type: \"uint256\"\n }\n ],\n name: \"tokenOfOwnerByIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"tokenURI\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"transferFrom\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"withdraw\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/PKPNFTMetadata.sol/PKPNFTMetadataData.js\n var require_PKPNFTMetadataData = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/PKPNFTMetadata.sol/PKPNFTMetadataData.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PKPNFTMetadataData = void 0;\n exports3.PKPNFTMetadataData = {\n date: \"2023-11-14T15:45:41Z\",\n address: \"0xeD46dDcbFF662ad89b0987E0DFE2949901498Da6\",\n contractName: \"PKPNFTMetadata\",\n abi: [\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_resolver\",\n type: \"address\"\n },\n {\n internalType: \"enum ContractResolver.Env\",\n name: \"_env\",\n type: \"uint8\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"previousAdminRole\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"newAdminRole\",\n type: \"bytes32\"\n }\n ],\n name: \"RoleAdminChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n }\n ],\n name: \"RoleGranted\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n }\n ],\n name: \"RoleRevoked\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"ADMIN_ROLE\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"DEFAULT_ADMIN_ROLE\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"WRITER_ROLE\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes\",\n name: \"buffer\",\n type: \"bytes\"\n }\n ],\n name: \"bytesToHex\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"contractResolver\",\n outputs: [\n {\n internalType: \"contract ContractResolver\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"env\",\n outputs: [\n {\n internalType: \"enum ContractResolver.Env\",\n name: \"\",\n type: \"uint8\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n }\n ],\n name: \"getRoleAdmin\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"grantRole\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"hasRole\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"removeProfileForPkp\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"removeUrlForPKP\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"renounceRole\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\"\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"revokeRole\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pkpHelperWriterAddress\",\n type: \"address\"\n }\n ],\n name: \"setPKPHelperWriterAddress\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"string\",\n name: \"imgUrl\",\n type: \"string\"\n }\n ],\n name: \"setProfileForPKP\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"string\",\n name: \"url\",\n type: \"string\"\n }\n ],\n name: \"setUrlForPKP\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"interfaceId\",\n type: \"bytes4\"\n }\n ],\n name: \"supportsInterface\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"pubKey\",\n type: \"bytes\"\n },\n {\n internalType: \"address\",\n name: \"ethAddress\",\n type: \"address\"\n }\n ],\n name: \"tokenURI\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/PKPPermissions.sol/PKPPermissionsData.js\n var require_PKPPermissionsData = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/PKPPermissions.sol/PKPPermissionsData.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PKPPermissionsData = void 0;\n exports3.PKPPermissionsData = {\n date: \"2023-11-14T15:45:41Z\",\n address: \"0xD01c9C30f8F6fa443721629775e1CC7DD9c9e209\",\n contractName: \"PKPPermissions\",\n abi: [\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotAddFunctionToDiamondThatAlreadyExists\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4[]\",\n name: \"_selectors\",\n type: \"bytes4[]\"\n }\n ],\n name: \"CannotAddSelectorsToZeroAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotRemoveFunctionThatDoesNotExist\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotRemoveImmutableFunction\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotReplaceFunctionThatDoesNotExists\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4[]\",\n name: \"_selectors\",\n type: \"bytes4[]\"\n }\n ],\n name: \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotReplaceImmutableFunction\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint8\",\n name: \"_action\",\n type: \"uint8\"\n }\n ],\n name: \"IncorrectFacetCutAction\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_initializationContractAddress\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"_calldata\",\n type: \"bytes\"\n }\n ],\n name: \"InitializationFunctionReverted\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_contractAddress\",\n type: \"address\"\n },\n {\n internalType: \"string\",\n name: \"_message\",\n type: \"string\"\n }\n ],\n name: \"NoBytecodeAtAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_facetAddress\",\n type: \"address\"\n }\n ],\n name: \"NoSelectorsProvidedForFacetForCut\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_user\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"_contractOwner\",\n type: \"address\"\n }\n ],\n name: \"NotContractOwner\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_facetAddress\",\n type: \"address\"\n }\n ],\n name: \"RemoveFacetAddressMustBeZeroAddress\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"facetAddress\",\n type: \"address\"\n },\n {\n internalType: \"enum IDiamond.FacetCutAction\",\n name: \"action\",\n type: \"uint8\"\n },\n {\n internalType: \"bytes4[]\",\n name: \"functionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n indexed: false,\n internalType: \"struct IDiamond.FacetCut[]\",\n name: \"_diamondCut\",\n type: \"tuple[]\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"_init\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"_calldata\",\n type: \"bytes\"\n }\n ],\n name: \"DiamondCut\",\n type: \"event\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"facetAddress\",\n type: \"address\"\n },\n {\n internalType: \"enum IDiamond.FacetCutAction\",\n name: \"action\",\n type: \"uint8\"\n },\n {\n internalType: \"bytes4[]\",\n name: \"functionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n internalType: \"struct IDiamond.FacetCut[]\",\n name: \"_diamondCut\",\n type: \"tuple[]\"\n },\n {\n internalType: \"address\",\n name: \"_init\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"_calldata\",\n type: \"bytes\"\n }\n ],\n name: \"diamondCut\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_functionSelector\",\n type: \"bytes4\"\n }\n ],\n name: \"facetAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"facetAddress_\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"facetAddresses\",\n outputs: [\n {\n internalType: \"address[]\",\n name: \"facetAddresses_\",\n type: \"address[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_facet\",\n type: \"address\"\n }\n ],\n name: \"facetFunctionSelectors\",\n outputs: [\n {\n internalType: \"bytes4[]\",\n name: \"_facetFunctionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"facets\",\n outputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"facetAddress\",\n type: \"address\"\n },\n {\n internalType: \"bytes4[]\",\n name: \"functionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n internalType: \"struct IDiamondLoupe.Facet[]\",\n name: \"facets_\",\n type: \"tuple[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_interfaceId\",\n type: \"bytes4\"\n }\n ],\n name: \"supportsInterface\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"previousOwner\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\"\n }\n ],\n name: \"OwnershipTransferred\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"owner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"owner_\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_newOwner\",\n type: \"address\"\n }\n ],\n name: \"transferOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"CallerNotOwner\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"newResolverAddress\",\n type: \"address\"\n }\n ],\n name: \"ContractResolverAddressSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"authMethodType\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"id\",\n type: \"bytes\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"userPubkey\",\n type: \"bytes\"\n }\n ],\n name: \"PermittedAuthMethodAdded\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"authMethodType\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"id\",\n type: \"bytes\"\n }\n ],\n name: \"PermittedAuthMethodRemoved\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"authMethodType\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"id\",\n type: \"bytes\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"scopeId\",\n type: \"uint256\"\n }\n ],\n name: \"PermittedAuthMethodScopeAdded\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"authMethodType\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"id\",\n type: \"bytes\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"scopeId\",\n type: \"uint256\"\n }\n ],\n name: \"PermittedAuthMethodScopeRemoved\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"group\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"root\",\n type: \"bytes32\"\n }\n ],\n name: \"RootHashUpdated\",\n type: \"event\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"ipfsCID\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256[]\",\n name: \"scopes\",\n type: \"uint256[]\"\n }\n ],\n name: \"addPermittedAction\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\"\n },\n {\n internalType: \"uint256[]\",\n name: \"scopes\",\n type: \"uint256[]\"\n }\n ],\n name: \"addPermittedAddress\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"authMethodType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"id\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"userPubkey\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct LibPKPPermissionsStorage.AuthMethod\",\n name: \"authMethod\",\n type: \"tuple\"\n },\n {\n internalType: \"uint256[]\",\n name: \"scopes\",\n type: \"uint256[]\"\n }\n ],\n name: \"addPermittedAuthMethod\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"authMethodType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"id\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"scopeId\",\n type: \"uint256\"\n }\n ],\n name: \"addPermittedAuthMethodScope\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256[]\",\n name: \"permittedAuthMethodTypesToAdd\",\n type: \"uint256[]\"\n },\n {\n internalType: \"bytes[]\",\n name: \"permittedAuthMethodIdsToAdd\",\n type: \"bytes[]\"\n },\n {\n internalType: \"bytes[]\",\n name: \"permittedAuthMethodPubkeysToAdd\",\n type: \"bytes[]\"\n },\n {\n internalType: \"uint256[][]\",\n name: \"permittedAuthMethodScopesToAdd\",\n type: \"uint256[][]\"\n },\n {\n internalType: \"uint256[]\",\n name: \"permittedAuthMethodTypesToRemove\",\n type: \"uint256[]\"\n },\n {\n internalType: \"bytes[]\",\n name: \"permittedAuthMethodIdsToRemove\",\n type: \"bytes[]\"\n }\n ],\n name: \"batchAddRemoveAuthMethods\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"authMethodType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"id\",\n type: \"bytes\"\n }\n ],\n name: \"getAuthMethodId\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"getEthAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"getPermittedActions\",\n outputs: [\n {\n internalType: \"bytes[]\",\n name: \"\",\n type: \"bytes[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"getPermittedAddresses\",\n outputs: [\n {\n internalType: \"address[]\",\n name: \"\",\n type: \"address[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"authMethodType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"id\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"maxScopeId\",\n type: \"uint256\"\n }\n ],\n name: \"getPermittedAuthMethodScopes\",\n outputs: [\n {\n internalType: \"bool[]\",\n name: \"\",\n type: \"bool[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"getPermittedAuthMethods\",\n outputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"authMethodType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"id\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"userPubkey\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct LibPKPPermissionsStorage.AuthMethod[]\",\n name: \"\",\n type: \"tuple[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getPkpNftAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"getPubkey\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getRouterAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"authMethodType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"id\",\n type: \"bytes\"\n }\n ],\n name: \"getTokenIdsForAuthMethod\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"authMethodType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"id\",\n type: \"bytes\"\n }\n ],\n name: \"getUserPubkeyForAuthMethod\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"ipfsCID\",\n type: \"bytes\"\n }\n ],\n name: \"isPermittedAction\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\"\n }\n ],\n name: \"isPermittedAddress\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"authMethodType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"id\",\n type: \"bytes\"\n }\n ],\n name: \"isPermittedAuthMethod\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"authMethodType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"id\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"scopeId\",\n type: \"uint256\"\n }\n ],\n name: \"isPermittedAuthMethodScopePresent\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"ipfsCID\",\n type: \"bytes\"\n }\n ],\n name: \"removePermittedAction\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\"\n }\n ],\n name: \"removePermittedAddress\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"authMethodType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"id\",\n type: \"bytes\"\n }\n ],\n name: \"removePermittedAuthMethod\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"authMethodType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"id\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"scopeId\",\n type: \"uint256\"\n }\n ],\n name: \"removePermittedAuthMethodScope\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newResolverAddress\",\n type: \"address\"\n }\n ],\n name: \"setContractResolver\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"group\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes32\",\n name: \"root\",\n type: \"bytes32\"\n }\n ],\n name: \"setRootHash\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"group\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes32[]\",\n name: \"proof\",\n type: \"bytes32[]\"\n },\n {\n internalType: \"bytes32\",\n name: \"leaf\",\n type: \"bytes32\"\n }\n ],\n name: \"verifyState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"group\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes32[]\",\n name: \"proof\",\n type: \"bytes32[]\"\n },\n {\n internalType: \"bool[]\",\n name: \"proofFlags\",\n type: \"bool[]\"\n },\n {\n internalType: \"bytes32[]\",\n name: \"leaves\",\n type: \"bytes32[]\"\n }\n ],\n name: \"verifyStates\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/PubkeyRouter.sol/PubkeyRouterData.js\n var require_PubkeyRouterData = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/PubkeyRouter.sol/PubkeyRouterData.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PubkeyRouterData = void 0;\n exports3.PubkeyRouterData = {\n date: \"2023-11-14T15:45:41Z\",\n address: \"0x4B5E97F2D811520e031A8F924e698B329ad83E29\",\n contractName: \"PubkeyRouter\",\n abi: [\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotAddFunctionToDiamondThatAlreadyExists\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4[]\",\n name: \"_selectors\",\n type: \"bytes4[]\"\n }\n ],\n name: \"CannotAddSelectorsToZeroAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotRemoveFunctionThatDoesNotExist\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotRemoveImmutableFunction\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotReplaceFunctionThatDoesNotExists\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4[]\",\n name: \"_selectors\",\n type: \"bytes4[]\"\n }\n ],\n name: \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotReplaceImmutableFunction\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint8\",\n name: \"_action\",\n type: \"uint8\"\n }\n ],\n name: \"IncorrectFacetCutAction\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_initializationContractAddress\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"_calldata\",\n type: \"bytes\"\n }\n ],\n name: \"InitializationFunctionReverted\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_contractAddress\",\n type: \"address\"\n },\n {\n internalType: \"string\",\n name: \"_message\",\n type: \"string\"\n }\n ],\n name: \"NoBytecodeAtAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_facetAddress\",\n type: \"address\"\n }\n ],\n name: \"NoSelectorsProvidedForFacetForCut\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_user\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"_contractOwner\",\n type: \"address\"\n }\n ],\n name: \"NotContractOwner\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_facetAddress\",\n type: \"address\"\n }\n ],\n name: \"RemoveFacetAddressMustBeZeroAddress\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"facetAddress\",\n type: \"address\"\n },\n {\n internalType: \"enum IDiamond.FacetCutAction\",\n name: \"action\",\n type: \"uint8\"\n },\n {\n internalType: \"bytes4[]\",\n name: \"functionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n indexed: false,\n internalType: \"struct IDiamond.FacetCut[]\",\n name: \"_diamondCut\",\n type: \"tuple[]\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"_init\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"_calldata\",\n type: \"bytes\"\n }\n ],\n name: \"DiamondCut\",\n type: \"event\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"facetAddress\",\n type: \"address\"\n },\n {\n internalType: \"enum IDiamond.FacetCutAction\",\n name: \"action\",\n type: \"uint8\"\n },\n {\n internalType: \"bytes4[]\",\n name: \"functionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n internalType: \"struct IDiamond.FacetCut[]\",\n name: \"_diamondCut\",\n type: \"tuple[]\"\n },\n {\n internalType: \"address\",\n name: \"_init\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"_calldata\",\n type: \"bytes\"\n }\n ],\n name: \"diamondCut\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_functionSelector\",\n type: \"bytes4\"\n }\n ],\n name: \"facetAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"facetAddress_\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"facetAddresses\",\n outputs: [\n {\n internalType: \"address[]\",\n name: \"facetAddresses_\",\n type: \"address[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_facet\",\n type: \"address\"\n }\n ],\n name: \"facetFunctionSelectors\",\n outputs: [\n {\n internalType: \"bytes4[]\",\n name: \"_facetFunctionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"facets\",\n outputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"facetAddress\",\n type: \"address\"\n },\n {\n internalType: \"bytes4[]\",\n name: \"functionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n internalType: \"struct IDiamondLoupe.Facet[]\",\n name: \"facets_\",\n type: \"tuple[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_interfaceId\",\n type: \"bytes4\"\n }\n ],\n name: \"supportsInterface\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"previousOwner\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\"\n }\n ],\n name: \"OwnershipTransferred\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"owner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"owner_\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_newOwner\",\n type: \"address\"\n }\n ],\n name: \"transferOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"CallerNotOwner\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"newResolverAddress\",\n type: \"address\"\n }\n ],\n name: \"ContractResolverAddressSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"pubkey\",\n type: \"bytes\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"stakingContract\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"keyType\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"derivedKeyId\",\n type: \"bytes32\"\n }\n ],\n name: \"PubkeyRoutingDataSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"stakingContract\",\n type: \"address\"\n },\n {\n components: [\n {\n internalType: \"bytes\",\n name: \"pubkey\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"keyType\",\n type: \"uint256\"\n }\n ],\n indexed: false,\n internalType: \"struct IPubkeyRouter.RootKey\",\n name: \"rootKey\",\n type: \"tuple\"\n }\n ],\n name: \"RootKeySet\",\n type: \"event\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\"\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\"\n }\n ],\n internalType: \"struct IPubkeyRouter.Signature[]\",\n name: \"signatures\",\n type: \"tuple[]\"\n },\n {\n internalType: \"bytes\",\n name: \"signedMessage\",\n type: \"bytes\"\n },\n {\n internalType: \"address\",\n name: \"stakingContractAddress\",\n type: \"address\"\n }\n ],\n name: \"checkNodeSignatures\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes\",\n name: \"pubkey\",\n type: \"bytes\"\n }\n ],\n name: \"deriveEthAddressFromPubkey\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"ethAddress\",\n type: \"address\"\n }\n ],\n name: \"ethAddressToPkpId\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"stakingContract\",\n type: \"address\"\n },\n {\n internalType: \"bytes32\",\n name: \"derivedKeyId\",\n type: \"bytes32\"\n }\n ],\n name: \"getDerivedPubkey\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"getEthAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getPkpNftAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"getPubkey\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"stakingContract\",\n type: \"address\"\n }\n ],\n name: \"getRootKeys\",\n outputs: [\n {\n components: [\n {\n internalType: \"bytes\",\n name: \"pubkey\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"keyType\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IPubkeyRouter.RootKey[]\",\n name: \"\",\n type: \"tuple[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"getRoutingData\",\n outputs: [\n {\n components: [\n {\n internalType: \"bytes\",\n name: \"pubkey\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"keyType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes32\",\n name: \"derivedKeyId\",\n type: \"bytes32\"\n }\n ],\n internalType: \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n name: \"\",\n type: \"tuple\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"isRouted\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"pubkeys\",\n outputs: [\n {\n components: [\n {\n internalType: \"bytes\",\n name: \"pubkey\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"keyType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes32\",\n name: \"derivedKeyId\",\n type: \"bytes32\"\n }\n ],\n internalType: \"struct LibPubkeyRouterStorage.PubkeyRoutingData\",\n name: \"\",\n type: \"tuple\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newResolverAddress\",\n type: \"address\"\n }\n ],\n name: \"setContractResolver\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"pubkey\",\n type: \"bytes\"\n },\n {\n internalType: \"address\",\n name: \"stakingContractAddress\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"keyType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes32\",\n name: \"derivedKeyId\",\n type: \"bytes32\"\n }\n ],\n name: \"setRoutingData\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"pubkey\",\n type: \"bytes\"\n },\n {\n internalType: \"address\",\n name: \"stakingContract\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"keyType\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes32\",\n name: \"derivedKeyId\",\n type: \"bytes32\"\n }\n ],\n name: \"setRoutingDataAsAdmin\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"stakingContractAddress\",\n type: \"address\"\n },\n {\n components: [\n {\n internalType: \"bytes\",\n name: \"pubkey\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"keyType\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IPubkeyRouter.RootKey[]\",\n name: \"newRootKeys\",\n type: \"tuple[]\"\n }\n ],\n name: \"voteForRootKeys\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/RateLimitNFT.sol/RateLimitNFTData.js\n var require_RateLimitNFTData = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/RateLimitNFT.sol/RateLimitNFTData.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.RateLimitNFTData = void 0;\n exports3.RateLimitNFTData = {\n date: \"2023-11-14T15:45:41Z\",\n address: \"0x19593CbBC56Ddd339Fde26278A544a25166C2388\",\n contractName: \"RateLimitNFT\",\n abi: [\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotAddFunctionToDiamondThatAlreadyExists\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4[]\",\n name: \"_selectors\",\n type: \"bytes4[]\"\n }\n ],\n name: \"CannotAddSelectorsToZeroAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotRemoveFunctionThatDoesNotExist\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotRemoveImmutableFunction\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotReplaceFunctionThatDoesNotExists\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4[]\",\n name: \"_selectors\",\n type: \"bytes4[]\"\n }\n ],\n name: \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotReplaceImmutableFunction\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint8\",\n name: \"_action\",\n type: \"uint8\"\n }\n ],\n name: \"IncorrectFacetCutAction\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_initializationContractAddress\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"_calldata\",\n type: \"bytes\"\n }\n ],\n name: \"InitializationFunctionReverted\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_contractAddress\",\n type: \"address\"\n },\n {\n internalType: \"string\",\n name: \"_message\",\n type: \"string\"\n }\n ],\n name: \"NoBytecodeAtAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_facetAddress\",\n type: \"address\"\n }\n ],\n name: \"NoSelectorsProvidedForFacetForCut\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_user\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"_contractOwner\",\n type: \"address\"\n }\n ],\n name: \"NotContractOwner\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_facetAddress\",\n type: \"address\"\n }\n ],\n name: \"RemoveFacetAddressMustBeZeroAddress\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"facetAddress\",\n type: \"address\"\n },\n {\n internalType: \"enum IDiamond.FacetCutAction\",\n name: \"action\",\n type: \"uint8\"\n },\n {\n internalType: \"bytes4[]\",\n name: \"functionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n indexed: false,\n internalType: \"struct IDiamond.FacetCut[]\",\n name: \"_diamondCut\",\n type: \"tuple[]\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"_init\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"_calldata\",\n type: \"bytes\"\n }\n ],\n name: \"DiamondCut\",\n type: \"event\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"facetAddress\",\n type: \"address\"\n },\n {\n internalType: \"enum IDiamond.FacetCutAction\",\n name: \"action\",\n type: \"uint8\"\n },\n {\n internalType: \"bytes4[]\",\n name: \"functionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n internalType: \"struct IDiamond.FacetCut[]\",\n name: \"_diamondCut\",\n type: \"tuple[]\"\n },\n {\n internalType: \"address\",\n name: \"_init\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"_calldata\",\n type: \"bytes\"\n }\n ],\n name: \"diamondCut\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_functionSelector\",\n type: \"bytes4\"\n }\n ],\n name: \"facetAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"facetAddress_\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"facetAddresses\",\n outputs: [\n {\n internalType: \"address[]\",\n name: \"facetAddresses_\",\n type: \"address[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_facet\",\n type: \"address\"\n }\n ],\n name: \"facetFunctionSelectors\",\n outputs: [\n {\n internalType: \"bytes4[]\",\n name: \"_facetFunctionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"facets\",\n outputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"facetAddress\",\n type: \"address\"\n },\n {\n internalType: \"bytes4[]\",\n name: \"functionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n internalType: \"struct IDiamondLoupe.Facet[]\",\n name: \"facets_\",\n type: \"tuple[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"previousOwner\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\"\n }\n ],\n name: \"OwnershipTransferred\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"owner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"owner_\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_newOwner\",\n type: \"address\"\n }\n ],\n name: \"transferOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"CallerNotOwner\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newAdditionalRequestsPerKilosecondCost\",\n type: \"uint256\"\n }\n ],\n name: \"AdditionalRequestsPerKilosecondCostSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"approved\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"Approval\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"operator\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\"\n }\n ],\n name: \"ApprovalForAll\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"newFreeMintSigner\",\n type: \"address\"\n }\n ],\n name: \"FreeMintSignerSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newFreeRequestsPerRateLimitWindow\",\n type: \"uint256\"\n }\n ],\n name: \"FreeRequestsPerRateLimitWindowSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint8\",\n name: \"version\",\n type: \"uint8\"\n }\n ],\n name: \"Initialized\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newRLIHolderRateLimitWindowSeconds\",\n type: \"uint256\"\n }\n ],\n name: \"RLIHolderRateLimitWindowSecondsSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newRateLimitWindowSeconds\",\n type: \"uint256\"\n }\n ],\n name: \"RateLimitWindowSecondsSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"Transfer\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"Withdrew\",\n type: \"event\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"approve\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n }\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"burn\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"expiresAt\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"requestsPerKilosecond\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes32\",\n name: \"msgHash\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\"\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\"\n },\n {\n internalType: \"bytes32\",\n name: \"sVal\",\n type: \"bytes32\"\n }\n ],\n name: \"freeMint\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"getApproved\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"operator\",\n type: \"address\"\n }\n ],\n name: \"isApprovedForAll\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"expiresAt\",\n type: \"uint256\"\n }\n ],\n name: \"mint\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"ownerOf\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"safeTransferFrom\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\"\n }\n ],\n name: \"safeTransferFrom\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newAdditionalRequestsPerKilosecondCost\",\n type: \"uint256\"\n }\n ],\n name: \"setAdditionalRequestsPerKilosecondCost\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"operator\",\n type: \"address\"\n },\n {\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\"\n }\n ],\n name: \"setApprovalForAll\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newFreeMintSigner\",\n type: \"address\"\n }\n ],\n name: \"setFreeMintSigner\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newFreeRequestsPerRateLimitWindow\",\n type: \"uint256\"\n }\n ],\n name: \"setFreeRequestsPerRateLimitWindow\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newMaxExpirationSeconds\",\n type: \"uint256\"\n }\n ],\n name: \"setMaxExpirationSeconds\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newMaxRequestsPerKilosecond\",\n type: \"uint256\"\n }\n ],\n name: \"setMaxRequestsPerKilosecond\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newRLIHolderRateLimitWindowSeconds\",\n type: \"uint256\"\n }\n ],\n name: \"setRLIHolderRateLimitWindowSeconds\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newRateLimitWindowSeconds\",\n type: \"uint256\"\n }\n ],\n name: \"setRateLimitWindowSeconds\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"interfaceId\",\n type: \"bytes4\"\n }\n ],\n name: \"supportsInterface\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"index\",\n type: \"uint256\"\n }\n ],\n name: \"tokenByIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"index\",\n type: \"uint256\"\n }\n ],\n name: \"tokenOfOwnerByIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"tokenURI\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"transferFrom\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"withdraw\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"RLIHolderRateLimitWindowSeconds\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"additionalRequestsPerKilosecondCost\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"requestsPerKilosecond\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"expiresAt\",\n type: \"uint256\"\n }\n ],\n name: \"calculateCost\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"payingAmount\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"expiresAt\",\n type: \"uint256\"\n }\n ],\n name: \"calculateRequestsPerKilosecond\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"capacity\",\n outputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"requestsPerKilosecond\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"expiresAt\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct LibRateLimitNFTStorage.RateLimit\",\n name: \"\",\n type: \"tuple\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"requestedRequestsPerKilosecond\",\n type: \"uint256\"\n }\n ],\n name: \"checkBelowMaxRequestsPerKilosecond\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"currentSoldRequestsPerKilosecond\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"defaultRateLimitWindowSeconds\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"expiresAt\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"requestsPerKilosecond\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes32\",\n name: \"msgHash\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\"\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\"\n },\n {\n internalType: \"bytes32\",\n name: \"sVal\",\n type: \"bytes32\"\n }\n ],\n name: \"freeMintSigTest\",\n outputs: [],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"freeMintSigner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"freeRequestsPerRateLimitWindow\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"isExpired\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"maxExpirationSeconds\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"maxRequestsPerKilosecond\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"hash\",\n type: \"bytes32\"\n }\n ],\n name: \"prefixed\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"msgHash\",\n type: \"bytes32\"\n }\n ],\n name: \"redeemedFreeMints\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"tokenIdCounter\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n name: \"tokenSVG\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"expiresAt\",\n type: \"uint256\"\n }\n ],\n name: \"totalSoldRequestsPerKilosecondByExpirationTime\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/Staking.sol/StakingData.js\n var require_StakingData = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/Staking.sol/StakingData.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.StakingData = void 0;\n exports3.StakingData = {\n date: \"2023-11-14T15:45:41Z\",\n address: \"0x5bFa704aF947b3b0f966e4248DED7bfa6edeF952\",\n contractName: \"Staking\",\n abi: [\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotAddFunctionToDiamondThatAlreadyExists\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4[]\",\n name: \"_selectors\",\n type: \"bytes4[]\"\n }\n ],\n name: \"CannotAddSelectorsToZeroAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotRemoveFunctionThatDoesNotExist\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotRemoveImmutableFunction\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotReplaceFunctionThatDoesNotExists\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4[]\",\n name: \"_selectors\",\n type: \"bytes4[]\"\n }\n ],\n name: \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotReplaceImmutableFunction\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint8\",\n name: \"_action\",\n type: \"uint8\"\n }\n ],\n name: \"IncorrectFacetCutAction\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_initializationContractAddress\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"_calldata\",\n type: \"bytes\"\n }\n ],\n name: \"InitializationFunctionReverted\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_contractAddress\",\n type: \"address\"\n },\n {\n internalType: \"string\",\n name: \"_message\",\n type: \"string\"\n }\n ],\n name: \"NoBytecodeAtAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_facetAddress\",\n type: \"address\"\n }\n ],\n name: \"NoSelectorsProvidedForFacetForCut\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_user\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"_contractOwner\",\n type: \"address\"\n }\n ],\n name: \"NotContractOwner\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_facetAddress\",\n type: \"address\"\n }\n ],\n name: \"RemoveFacetAddressMustBeZeroAddress\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"facetAddress\",\n type: \"address\"\n },\n {\n internalType: \"enum IDiamond.FacetCutAction\",\n name: \"action\",\n type: \"uint8\"\n },\n {\n internalType: \"bytes4[]\",\n name: \"functionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n indexed: false,\n internalType: \"struct IDiamond.FacetCut[]\",\n name: \"_diamondCut\",\n type: \"tuple[]\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"_init\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"_calldata\",\n type: \"bytes\"\n }\n ],\n name: \"DiamondCut\",\n type: \"event\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"facetAddress\",\n type: \"address\"\n },\n {\n internalType: \"enum IDiamond.FacetCutAction\",\n name: \"action\",\n type: \"uint8\"\n },\n {\n internalType: \"bytes4[]\",\n name: \"functionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n internalType: \"struct IDiamond.FacetCut[]\",\n name: \"_diamondCut\",\n type: \"tuple[]\"\n },\n {\n internalType: \"address\",\n name: \"_init\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"_calldata\",\n type: \"bytes\"\n }\n ],\n name: \"diamondCut\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_functionSelector\",\n type: \"bytes4\"\n }\n ],\n name: \"facetAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"facetAddress_\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"facetAddresses\",\n outputs: [\n {\n internalType: \"address[]\",\n name: \"facetAddresses_\",\n type: \"address[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_facet\",\n type: \"address\"\n }\n ],\n name: \"facetFunctionSelectors\",\n outputs: [\n {\n internalType: \"bytes4[]\",\n name: \"_facetFunctionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"facets\",\n outputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"facetAddress\",\n type: \"address\"\n },\n {\n internalType: \"bytes4[]\",\n name: \"functionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n internalType: \"struct IDiamondLoupe.Facet[]\",\n name: \"facets_\",\n type: \"tuple[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_interfaceId\",\n type: \"bytes4\"\n }\n ],\n name: \"supportsInterface\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"previousOwner\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\"\n }\n ],\n name: \"OwnershipTransferred\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"owner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"owner_\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_newOwner\",\n type: \"address\"\n }\n ],\n name: \"transferOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"ActiveValidatorsCannotLeave\",\n type: \"error\"\n },\n {\n inputs: [],\n name: \"CallerNotOwner\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"stakingAddress\",\n type: \"address\"\n }\n ],\n name: \"CannotRejoinUntilNextEpochBecauseKicked\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"senderPubKey\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"receiverPubKey\",\n type: \"uint256\"\n }\n ],\n name: \"CannotReuseCommsKeys\",\n type: \"error\"\n },\n {\n inputs: [],\n name: \"CannotStakeZero\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"stakerAddress\",\n type: \"address\"\n }\n ],\n name: \"CannotVoteTwice\",\n type: \"error\"\n },\n {\n inputs: [],\n name: \"CannotWithdrawZero\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"nodeAddress\",\n type: \"address\"\n }\n ],\n name: \"CouldNotMapNodeAddressToStakerAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"enum LibStakingStorage.States\",\n name: \"state\",\n type: \"uint8\"\n }\n ],\n name: \"MustBeInActiveOrUnlockedOrPausedState\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"enum LibStakingStorage.States\",\n name: \"state\",\n type: \"uint8\"\n }\n ],\n name: \"MustBeInActiveOrUnlockedState\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"enum LibStakingStorage.States\",\n name: \"state\",\n type: \"uint8\"\n }\n ],\n name: \"MustBeInNextValidatorSetLockedOrReadyForNextEpochOrRestoreState\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"enum LibStakingStorage.States\",\n name: \"state\",\n type: \"uint8\"\n }\n ],\n name: \"MustBeInNextValidatorSetLockedState\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"enum LibStakingStorage.States\",\n name: \"state\",\n type: \"uint8\"\n }\n ],\n name: \"MustBeInReadyForNextEpochState\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"stakerAddress\",\n type: \"address\"\n }\n ],\n name: \"MustBeValidatorInNextEpochToKick\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"currentTimestamp\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"epochEndTime\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"timeout\",\n type: \"uint256\"\n }\n ],\n name: \"NotEnoughTimeElapsedForTimeoutSinceLastEpoch\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"currentTimestamp\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"epochEndTime\",\n type: \"uint256\"\n }\n ],\n name: \"NotEnoughTimeElapsedSinceLastEpoch\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"validatorCount\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"minimumValidatorCount\",\n type: \"uint256\"\n }\n ],\n name: \"NotEnoughValidatorsInNextEpoch\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"currentReadyValidatorCount\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"nextReadyValidatorCount\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"minimumValidatorCountToBeReady\",\n type: \"uint256\"\n }\n ],\n name: \"NotEnoughValidatorsReadyForNextEpoch\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"currentEpochNumber\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"receivedEpochNumber\",\n type: \"uint256\"\n }\n ],\n name: \"SignaledReadyForWrongEpochNumber\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"stakerAddress\",\n type: \"address\"\n }\n ],\n name: \"StakerNotPermitted\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"yourBalance\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"requestedWithdrawlAmount\",\n type: \"uint256\"\n }\n ],\n name: \"TryingToWithdrawMoreThanStaked\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"validator\",\n type: \"address\"\n },\n {\n internalType: \"address[]\",\n name: \"validatorsInNextEpoch\",\n type: \"address[]\"\n }\n ],\n name: \"ValidatorIsNotInNextEpoch\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newTokenRewardPerTokenPerEpoch\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newComplaintTolerance\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newComplaintIntervalSecs\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"newKeyTypes\",\n type: \"uint256[]\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newMinimumValidatorCount\",\n type: \"uint256\"\n }\n ],\n name: \"ConfigSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newEpochEndTime\",\n type: \"uint256\"\n }\n ],\n name: \"EpochEndTimeSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newEpochLength\",\n type: \"uint256\"\n }\n ],\n name: \"EpochLengthSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newEpochTimeout\",\n type: \"uint256\"\n }\n ],\n name: \"EpochTimeoutSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"reason\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newKickPenaltyPercent\",\n type: \"uint256\"\n }\n ],\n name: \"KickPenaltyPercentSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"epochNumber\",\n type: \"uint256\"\n }\n ],\n name: \"ReadyForNextEpoch\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"token\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"Recovered\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n }\n ],\n name: \"RequestToJoin\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n }\n ],\n name: \"RequestToLeave\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"newResolverContractAddress\",\n type: \"address\"\n }\n ],\n name: \"ResolverContractAddressSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newDuration\",\n type: \"uint256\"\n }\n ],\n name: \"RewardsDurationUpdated\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"newStakingTokenAddress\",\n type: \"address\"\n }\n ],\n name: \"StakingTokenSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"enum LibStakingStorage.States\",\n name: \"newState\",\n type: \"uint8\"\n }\n ],\n name: \"StateChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amountBurned\",\n type: \"uint256\"\n }\n ],\n name: \"ValidatorKickedFromNextEpoch\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n }\n ],\n name: \"ValidatorRejoinedNextEpoch\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"reporter\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"validatorStakerAddress\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"reason\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\"\n }\n ],\n name: \"VotedToKickValidatorInNextEpoch\",\n type: \"event\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"validatorStakerAddress\",\n type: \"address\"\n }\n ],\n name: \"adminKickValidatorInNextEpoch\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n }\n ],\n name: \"adminRejoinValidator\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"validatorStakerAddress\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"amountToPenalize\",\n type: \"uint256\"\n }\n ],\n name: \"adminSlashValidator\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"advanceEpoch\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"exit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getReward\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"validatorStakerAddress\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"reason\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\"\n }\n ],\n name: \"kickValidatorInNextEpoch\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"lockValidatorsForNextEpoch\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint32\",\n name: \"ip\",\n type: \"uint32\"\n },\n {\n internalType: \"uint128\",\n name: \"ipv6\",\n type: \"uint128\"\n },\n {\n internalType: \"uint32\",\n name: \"port\",\n type: \"uint32\"\n },\n {\n internalType: \"address\",\n name: \"nodeAddress\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"senderPubKey\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"receiverPubKey\",\n type: \"uint256\"\n }\n ],\n name: \"requestToJoin\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"requestToLeave\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newTokenRewardPerTokenPerEpoch\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"newComplaintTolerance\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"newComplaintIntervalSecs\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256[]\",\n name: \"newKeyTypes\",\n type: \"uint256[]\"\n },\n {\n internalType: \"uint256\",\n name: \"newMinimumValidatorCount\",\n type: \"uint256\"\n }\n ],\n name: \"setConfig\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newResolverAddress\",\n type: \"address\"\n }\n ],\n name: \"setContractResolver\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newEpochEndTime\",\n type: \"uint256\"\n }\n ],\n name: \"setEpochEndTime\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newEpochLength\",\n type: \"uint256\"\n }\n ],\n name: \"setEpochLength\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"enum LibStakingStorage.States\",\n name: \"newState\",\n type: \"uint8\"\n }\n ],\n name: \"setEpochState\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newEpochTimeout\",\n type: \"uint256\"\n }\n ],\n name: \"setEpochTimeout\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint32\",\n name: \"ip\",\n type: \"uint32\"\n },\n {\n internalType: \"uint128\",\n name: \"ipv6\",\n type: \"uint128\"\n },\n {\n internalType: \"uint32\",\n name: \"port\",\n type: \"uint32\"\n },\n {\n internalType: \"address\",\n name: \"nodeAddress\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"senderPubKey\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"receiverPubKey\",\n type: \"uint256\"\n }\n ],\n name: \"setIpPortNodeAddressAndCommunicationPubKeys\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"reason\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"newKickPenaltyPercent\",\n type: \"uint256\"\n }\n ],\n name: \"setKickPenaltyPercent\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"epochNumber\",\n type: \"uint256\"\n }\n ],\n name: \"signalReadyForNextEpoch\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"stake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n },\n {\n internalType: \"uint32\",\n name: \"ip\",\n type: \"uint32\"\n },\n {\n internalType: \"uint128\",\n name: \"ipv6\",\n type: \"uint128\"\n },\n {\n internalType: \"uint32\",\n name: \"port\",\n type: \"uint32\"\n },\n {\n internalType: \"address\",\n name: \"nodeAddress\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"senderPubKey\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"receiverPubKey\",\n type: \"uint256\"\n }\n ],\n name: \"stakeAndJoin\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"unlockValidatorsForNextEpoch\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"withdraw\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"major\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"minor\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"patch\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct LibStakingStorage.Version\",\n name: \"version\",\n type: \"tuple\"\n }\n ],\n name: \"checkVersion\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getMaxVersion\",\n outputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"major\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"minor\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"patch\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct LibStakingStorage.Version\",\n name: \"\",\n type: \"tuple\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getMaxVersionString\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getMinVersion\",\n outputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"major\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"minor\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"patch\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct LibStakingStorage.Version\",\n name: \"\",\n type: \"tuple\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getMinVersionString\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"major\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"minor\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"patch\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct LibStakingStorage.Version\",\n name: \"version\",\n type: \"tuple\"\n }\n ],\n name: \"setMaxVersion\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"major\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"minor\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"patch\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct LibStakingStorage.Version\",\n name: \"version\",\n type: \"tuple\"\n }\n ],\n name: \"setMinVersion\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"config\",\n outputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"tokenRewardPerTokenPerEpoch\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"complaintTolerance\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"complaintIntervalSecs\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256[]\",\n name: \"keyTypes\",\n type: \"uint256[]\"\n },\n {\n internalType: \"uint256\",\n name: \"minimumValidatorCount\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct LibStakingStorage.Config\",\n name: \"\",\n type: \"tuple\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"contractResolver\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"countOfCurrentValidatorsReadyForNextEpoch\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"countOfNextValidatorsReadyForNextEpoch\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"currentValidatorCountForConsensus\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"epoch\",\n outputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"epochLength\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"number\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"endTime\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"retries\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"timeout\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct LibStakingStorage.Epoch\",\n name: \"\",\n type: \"tuple\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getKeyTypes\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getKickedValidators\",\n outputs: [\n {\n internalType: \"address[]\",\n name: \"\",\n type: \"address[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"addresses\",\n type: \"address[]\"\n }\n ],\n name: \"getNodeStakerAddressMappings\",\n outputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"nodeAddress\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"stakerAddress\",\n type: \"address\"\n }\n ],\n internalType: \"struct LibStakingStorage.AddressMapping[]\",\n name: \"\",\n type: \"tuple[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getStakingBalancesAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getTokenAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getValidatorsInCurrentEpoch\",\n outputs: [\n {\n internalType: \"address[]\",\n name: \"\",\n type: \"address[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getValidatorsInCurrentEpochLength\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getValidatorsInNextEpoch\",\n outputs: [\n {\n internalType: \"address[]\",\n name: \"\",\n type: \"address[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"addresses\",\n type: \"address[]\"\n }\n ],\n name: \"getValidatorsStructs\",\n outputs: [\n {\n components: [\n {\n internalType: \"uint32\",\n name: \"ip\",\n type: \"uint32\"\n },\n {\n internalType: \"uint128\",\n name: \"ipv6\",\n type: \"uint128\"\n },\n {\n internalType: \"uint32\",\n name: \"port\",\n type: \"uint32\"\n },\n {\n internalType: \"address\",\n name: \"nodeAddress\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"reward\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"senderPubKey\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"receiverPubKey\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct LibStakingStorage.Validator[]\",\n name: \"\",\n type: \"tuple[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getValidatorsStructsInCurrentEpoch\",\n outputs: [\n {\n components: [\n {\n internalType: \"uint32\",\n name: \"ip\",\n type: \"uint32\"\n },\n {\n internalType: \"uint128\",\n name: \"ipv6\",\n type: \"uint128\"\n },\n {\n internalType: \"uint32\",\n name: \"port\",\n type: \"uint32\"\n },\n {\n internalType: \"address\",\n name: \"nodeAddress\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"reward\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"senderPubKey\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"receiverPubKey\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct LibStakingStorage.Validator[]\",\n name: \"\",\n type: \"tuple[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getValidatorsStructsInNextEpoch\",\n outputs: [\n {\n components: [\n {\n internalType: \"uint32\",\n name: \"ip\",\n type: \"uint32\"\n },\n {\n internalType: \"uint128\",\n name: \"ipv6\",\n type: \"uint128\"\n },\n {\n internalType: \"uint32\",\n name: \"port\",\n type: \"uint32\"\n },\n {\n internalType: \"address\",\n name: \"nodeAddress\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"reward\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"senderPubKey\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"receiverPubKey\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct LibStakingStorage.Validator[]\",\n name: \"\",\n type: \"tuple[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"epochNumber\",\n type: \"uint256\"\n },\n {\n internalType: \"address\",\n name: \"validatorStakerAddress\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"voterStakerAddress\",\n type: \"address\"\n }\n ],\n name: \"getVotingStatusToKickValidator\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n },\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"isActiveValidator\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"isActiveValidatorByNodeAddress\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"isReadyForNextEpoch\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"reason\",\n type: \"uint256\"\n }\n ],\n name: \"kickPenaltyPercentByReason\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"nextValidatorCountForConsensus\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"nodeAddress\",\n type: \"address\"\n }\n ],\n name: \"nodeAddressToStakerAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"stakerAddress\",\n type: \"address\"\n }\n ],\n name: \"readyForNextEpoch\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"stakerAddress\",\n type: \"address\"\n }\n ],\n name: \"shouldKickValidator\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"state\",\n outputs: [\n {\n internalType: \"enum LibStakingStorage.States\",\n name: \"\",\n type: \"uint8\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"stakerAddress\",\n type: \"address\"\n }\n ],\n name: \"validators\",\n outputs: [\n {\n components: [\n {\n internalType: \"uint32\",\n name: \"ip\",\n type: \"uint32\"\n },\n {\n internalType: \"uint128\",\n name: \"ipv6\",\n type: \"uint128\"\n },\n {\n internalType: \"uint32\",\n name: \"port\",\n type: \"uint32\"\n },\n {\n internalType: \"address\",\n name: \"nodeAddress\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"reward\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"senderPubKey\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"receiverPubKey\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct LibStakingStorage.Validator\",\n name: \"\",\n type: \"tuple\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/StakingBalances.sol/StakingBalancesData.js\n var require_StakingBalancesData = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/abis/StakingBalances.sol/StakingBalancesData.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.StakingBalancesData = void 0;\n exports3.StakingBalancesData = {\n date: \"2023-11-14T15:45:41Z\",\n address: \"0x095251de2aD2A78aDe96F2a11F7feAA7CF93e6B5\",\n contractName: \"StakingBalances\",\n abi: [\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotAddFunctionToDiamondThatAlreadyExists\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4[]\",\n name: \"_selectors\",\n type: \"bytes4[]\"\n }\n ],\n name: \"CannotAddSelectorsToZeroAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotRemoveFunctionThatDoesNotExist\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotRemoveImmutableFunction\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotReplaceFunctionThatDoesNotExists\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4[]\",\n name: \"_selectors\",\n type: \"bytes4[]\"\n }\n ],\n name: \"CannotReplaceFunctionsFromFacetWithZeroAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_selector\",\n type: \"bytes4\"\n }\n ],\n name: \"CannotReplaceImmutableFunction\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint8\",\n name: \"_action\",\n type: \"uint8\"\n }\n ],\n name: \"IncorrectFacetCutAction\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_initializationContractAddress\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"_calldata\",\n type: \"bytes\"\n }\n ],\n name: \"InitializationFunctionReverted\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_contractAddress\",\n type: \"address\"\n },\n {\n internalType: \"string\",\n name: \"_message\",\n type: \"string\"\n }\n ],\n name: \"NoBytecodeAtAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_facetAddress\",\n type: \"address\"\n }\n ],\n name: \"NoSelectorsProvidedForFacetForCut\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_user\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"_contractOwner\",\n type: \"address\"\n }\n ],\n name: \"NotContractOwner\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_facetAddress\",\n type: \"address\"\n }\n ],\n name: \"RemoveFacetAddressMustBeZeroAddress\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"facetAddress\",\n type: \"address\"\n },\n {\n internalType: \"enum IDiamond.FacetCutAction\",\n name: \"action\",\n type: \"uint8\"\n },\n {\n internalType: \"bytes4[]\",\n name: \"functionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n indexed: false,\n internalType: \"struct IDiamond.FacetCut[]\",\n name: \"_diamondCut\",\n type: \"tuple[]\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"_init\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"_calldata\",\n type: \"bytes\"\n }\n ],\n name: \"DiamondCut\",\n type: \"event\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"facetAddress\",\n type: \"address\"\n },\n {\n internalType: \"enum IDiamond.FacetCutAction\",\n name: \"action\",\n type: \"uint8\"\n },\n {\n internalType: \"bytes4[]\",\n name: \"functionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n internalType: \"struct IDiamond.FacetCut[]\",\n name: \"_diamondCut\",\n type: \"tuple[]\"\n },\n {\n internalType: \"address\",\n name: \"_init\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"_calldata\",\n type: \"bytes\"\n }\n ],\n name: \"diamondCut\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_functionSelector\",\n type: \"bytes4\"\n }\n ],\n name: \"facetAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"facetAddress_\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"facetAddresses\",\n outputs: [\n {\n internalType: \"address[]\",\n name: \"facetAddresses_\",\n type: \"address[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_facet\",\n type: \"address\"\n }\n ],\n name: \"facetFunctionSelectors\",\n outputs: [\n {\n internalType: \"bytes4[]\",\n name: \"_facetFunctionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"facets\",\n outputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"facetAddress\",\n type: \"address\"\n },\n {\n internalType: \"bytes4[]\",\n name: \"functionSelectors\",\n type: \"bytes4[]\"\n }\n ],\n internalType: \"struct IDiamondLoupe.Facet[]\",\n name: \"facets_\",\n type: \"tuple[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"_interfaceId\",\n type: \"bytes4\"\n }\n ],\n name: \"supportsInterface\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"previousOwner\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\"\n }\n ],\n name: \"OwnershipTransferred\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"owner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"owner_\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_newOwner\",\n type: \"address\"\n }\n ],\n name: \"transferOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"ActiveValidatorsCannotLeave\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"aliasAccount\",\n type: \"address\"\n },\n {\n internalType: \"address\",\n name: \"stakerAddress\",\n type: \"address\"\n }\n ],\n name: \"AliasNotOwnedBySender\",\n type: \"error\"\n },\n {\n inputs: [],\n name: \"CallerNotOwner\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"aliasAccount\",\n type: \"address\"\n }\n ],\n name: \"CannotRemoveAliasOfActiveValidator\",\n type: \"error\"\n },\n {\n inputs: [],\n name: \"CannotStakeZero\",\n type: \"error\"\n },\n {\n inputs: [],\n name: \"CannotWithdrawZero\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"aliasCount\",\n type: \"uint256\"\n }\n ],\n name: \"MaxAliasCountReached\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n }\n ],\n name: \"OnlyStakingContract\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"amountStaked\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"minimumStake\",\n type: \"uint256\"\n }\n ],\n name: \"StakeMustBeGreaterThanMinimumStake\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"amountStaked\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maximumStake\",\n type: \"uint256\"\n }\n ],\n name: \"StakeMustBeLessThanMaximumStake\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"stakerAddress\",\n type: \"address\"\n }\n ],\n name: \"StakerNotPermitted\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"yourBalance\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"requestedWithdrawlAmount\",\n type: \"uint256\"\n }\n ],\n name: \"TryingToWithdrawMoreThanStaked\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"aliasAccount\",\n type: \"address\"\n }\n ],\n name: \"AliasAdded\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"aliasAccount\",\n type: \"address\"\n }\n ],\n name: \"AliasRemoved\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newMaxAliasCount\",\n type: \"uint256\"\n }\n ],\n name: \"MaxAliasCountSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newMaximumStake\",\n type: \"uint256\"\n }\n ],\n name: \"MaximumStakeSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newMinimumStake\",\n type: \"uint256\"\n }\n ],\n name: \"MinimumStakeSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n }\n ],\n name: \"PermittedStakerAdded\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n }\n ],\n name: \"PermittedStakerRemoved\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"permittedStakersOn\",\n type: \"bool\"\n }\n ],\n name: \"PermittedStakersOnChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"newResolverAddress\",\n type: \"address\"\n }\n ],\n name: \"ResolverContractAddressSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"reward\",\n type: \"uint256\"\n }\n ],\n name: \"RewardPaid\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"Staked\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newTokenRewardPerTokenPerEpoch\",\n type: \"uint256\"\n }\n ],\n name: \"TokenRewardPerTokenPerEpochSet\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"aliasAccount\",\n type: \"address\"\n }\n ],\n name: \"ValidatorNotRewardedBecauseAlias\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"ValidatorRewarded\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"ValidatorTokensPenalized\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"Withdrawn\",\n type: \"event\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"aliasAccount\",\n type: \"address\"\n }\n ],\n name: \"addAlias\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n }\n ],\n name: \"addPermittedStaker\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"stakers\",\n type: \"address[]\"\n }\n ],\n name: \"addPermittedStakers\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"checkStakingAmounts\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"getReward\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getStakingAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getTokenAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n }\n ],\n name: \"isPermittedStaker\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"maximumStake\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"minimumStake\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"penalizeTokens\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"permittedStakersOn\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"aliasAccount\",\n type: \"address\"\n }\n ],\n name: \"removeAlias\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n }\n ],\n name: \"removePermittedStaker\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"staker\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"balance\",\n type: \"uint256\"\n }\n ],\n name: \"restakePenaltyTokens\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"rewardOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"rewardValidator\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newResolverAddress\",\n type: \"address\"\n }\n ],\n name: \"setContractResolver\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newMaxAliasCount\",\n type: \"uint256\"\n }\n ],\n name: \"setMaxAliasCount\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newMaximumStake\",\n type: \"uint256\"\n }\n ],\n name: \"setMaximumStake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newMinimumStake\",\n type: \"uint256\"\n }\n ],\n name: \"setMinimumStake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"permitted\",\n type: \"bool\"\n }\n ],\n name: \"setPermittedStakersOn\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"stake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"totalStaked\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"balance\",\n type: \"uint256\"\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\"\n }\n ],\n name: \"transferPenaltyTokens\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"withdraw\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"withdraw\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"balance\",\n type: \"uint256\"\n }\n ],\n name: \"withdrawPenaltyTokens\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/webcrypto.js\n var webcrypto_default, isCryptoKey;\n var init_webcrypto = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/webcrypto.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n webcrypto_default = crypto;\n isCryptoKey = (key) => key instanceof CryptoKey;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/digest.js\n var digest, digest_default;\n var init_digest = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/digest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_webcrypto();\n digest = async (algorithm, data) => {\n const subtleDigest = `SHA-${algorithm.slice(-3)}`;\n return new Uint8Array(await webcrypto_default.subtle.digest(subtleDigest, data));\n };\n digest_default = digest;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/buffer_utils.js\n function concat(...buffers) {\n const size6 = buffers.reduce((acc, { length }) => acc + length, 0);\n const buf = new Uint8Array(size6);\n let i3 = 0;\n buffers.forEach((buffer2) => {\n buf.set(buffer2, i3);\n i3 += buffer2.length;\n });\n return buf;\n }\n function p2s(alg, p2sInput) {\n return concat(encoder.encode(alg), new Uint8Array([0]), p2sInput);\n }\n function writeUInt32BE(buf, value, offset) {\n if (value < 0 || value >= MAX_INT32) {\n throw new RangeError(`value must be >= 0 and <= ${MAX_INT32 - 1}. Received ${value}`);\n }\n buf.set([value >>> 24, value >>> 16, value >>> 8, value & 255], offset);\n }\n function uint64be(value) {\n const high = Math.floor(value / MAX_INT32);\n const low = value % MAX_INT32;\n const buf = new Uint8Array(8);\n writeUInt32BE(buf, high, 0);\n writeUInt32BE(buf, low, 4);\n return buf;\n }\n function uint32be(value) {\n const buf = new Uint8Array(4);\n writeUInt32BE(buf, value);\n return buf;\n }\n function lengthAndInput(input) {\n return concat(uint32be(input.length), input);\n }\n async function concatKdf(secret, bits, value) {\n const iterations = Math.ceil((bits >> 3) / 32);\n const res = new Uint8Array(iterations * 32);\n for (let iter = 0; iter < iterations; iter++) {\n const buf = new Uint8Array(4 + secret.length + value.length);\n buf.set(uint32be(iter + 1));\n buf.set(secret, 4);\n buf.set(value, 4 + secret.length);\n res.set(await digest_default(\"sha256\", buf), iter * 32);\n }\n return res.slice(0, bits >> 3);\n }\n var encoder, decoder, MAX_INT32;\n var init_buffer_utils = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/buffer_utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_digest();\n encoder = new TextEncoder();\n decoder = new TextDecoder();\n MAX_INT32 = 2 ** 32;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/base64url.js\n var encodeBase64, encode, decodeBase64, decode;\n var init_base64url = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/base64url.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_buffer_utils();\n encodeBase64 = (input) => {\n let unencoded = input;\n if (typeof unencoded === \"string\") {\n unencoded = encoder.encode(unencoded);\n }\n const CHUNK_SIZE = 32768;\n const arr = [];\n for (let i3 = 0; i3 < unencoded.length; i3 += CHUNK_SIZE) {\n arr.push(String.fromCharCode.apply(null, unencoded.subarray(i3, i3 + CHUNK_SIZE)));\n }\n return btoa(arr.join(\"\"));\n };\n encode = (input) => {\n return encodeBase64(input).replace(/=/g, \"\").replace(/\\+/g, \"-\").replace(/\\//g, \"_\");\n };\n decodeBase64 = (encoded) => {\n const binary = atob(encoded);\n const bytes = new Uint8Array(binary.length);\n for (let i3 = 0; i3 < binary.length; i3++) {\n bytes[i3] = binary.charCodeAt(i3);\n }\n return bytes;\n };\n decode = (input) => {\n let encoded = input;\n if (encoded instanceof Uint8Array) {\n encoded = decoder.decode(encoded);\n }\n encoded = encoded.replace(/-/g, \"+\").replace(/_/g, \"/\").replace(/\\s/g, \"\");\n try {\n return decodeBase64(encoded);\n } catch (_a) {\n throw new TypeError(\"The input to be decoded is not correctly encoded.\");\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/util/errors.js\n var errors_exports = {};\n __export(errors_exports, {\n JOSEAlgNotAllowed: () => JOSEAlgNotAllowed,\n JOSEError: () => JOSEError,\n JOSENotSupported: () => JOSENotSupported,\n JWEDecompressionFailed: () => JWEDecompressionFailed,\n JWEDecryptionFailed: () => JWEDecryptionFailed,\n JWEInvalid: () => JWEInvalid,\n JWKInvalid: () => JWKInvalid,\n JWKSInvalid: () => JWKSInvalid,\n JWKSMultipleMatchingKeys: () => JWKSMultipleMatchingKeys,\n JWKSNoMatchingKey: () => JWKSNoMatchingKey,\n JWKSTimeout: () => JWKSTimeout,\n JWSInvalid: () => JWSInvalid,\n JWSSignatureVerificationFailed: () => JWSSignatureVerificationFailed,\n JWTClaimValidationFailed: () => JWTClaimValidationFailed,\n JWTExpired: () => JWTExpired,\n JWTInvalid: () => JWTInvalid\n });\n var JOSEError, JWTClaimValidationFailed, JWTExpired, JOSEAlgNotAllowed, JOSENotSupported, JWEDecryptionFailed, JWEDecompressionFailed, JWEInvalid, JWSInvalid, JWTInvalid, JWKInvalid, JWKSInvalid, JWKSNoMatchingKey, JWKSMultipleMatchingKeys, JWKSTimeout, JWSSignatureVerificationFailed;\n var init_errors2 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/util/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n JOSEError = class extends Error {\n static get code() {\n return \"ERR_JOSE_GENERIC\";\n }\n constructor(message2) {\n var _a;\n super(message2);\n this.code = \"ERR_JOSE_GENERIC\";\n this.name = this.constructor.name;\n (_a = Error.captureStackTrace) === null || _a === void 0 ? void 0 : _a.call(Error, this, this.constructor);\n }\n };\n JWTClaimValidationFailed = class extends JOSEError {\n static get code() {\n return \"ERR_JWT_CLAIM_VALIDATION_FAILED\";\n }\n constructor(message2, claim = \"unspecified\", reason = \"unspecified\") {\n super(message2);\n this.code = \"ERR_JWT_CLAIM_VALIDATION_FAILED\";\n this.claim = claim;\n this.reason = reason;\n }\n };\n JWTExpired = class extends JOSEError {\n static get code() {\n return \"ERR_JWT_EXPIRED\";\n }\n constructor(message2, claim = \"unspecified\", reason = \"unspecified\") {\n super(message2);\n this.code = \"ERR_JWT_EXPIRED\";\n this.claim = claim;\n this.reason = reason;\n }\n };\n JOSEAlgNotAllowed = class extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = \"ERR_JOSE_ALG_NOT_ALLOWED\";\n }\n static get code() {\n return \"ERR_JOSE_ALG_NOT_ALLOWED\";\n }\n };\n JOSENotSupported = class extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = \"ERR_JOSE_NOT_SUPPORTED\";\n }\n static get code() {\n return \"ERR_JOSE_NOT_SUPPORTED\";\n }\n };\n JWEDecryptionFailed = class extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = \"ERR_JWE_DECRYPTION_FAILED\";\n this.message = \"decryption operation failed\";\n }\n static get code() {\n return \"ERR_JWE_DECRYPTION_FAILED\";\n }\n };\n JWEDecompressionFailed = class extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = \"ERR_JWE_DECOMPRESSION_FAILED\";\n this.message = \"decompression operation failed\";\n }\n static get code() {\n return \"ERR_JWE_DECOMPRESSION_FAILED\";\n }\n };\n JWEInvalid = class extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = \"ERR_JWE_INVALID\";\n }\n static get code() {\n return \"ERR_JWE_INVALID\";\n }\n };\n JWSInvalid = class extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = \"ERR_JWS_INVALID\";\n }\n static get code() {\n return \"ERR_JWS_INVALID\";\n }\n };\n JWTInvalid = class extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = \"ERR_JWT_INVALID\";\n }\n static get code() {\n return \"ERR_JWT_INVALID\";\n }\n };\n JWKInvalid = class extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = \"ERR_JWK_INVALID\";\n }\n static get code() {\n return \"ERR_JWK_INVALID\";\n }\n };\n JWKSInvalid = class extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = \"ERR_JWKS_INVALID\";\n }\n static get code() {\n return \"ERR_JWKS_INVALID\";\n }\n };\n JWKSNoMatchingKey = class extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = \"ERR_JWKS_NO_MATCHING_KEY\";\n this.message = \"no applicable key found in the JSON Web Key Set\";\n }\n static get code() {\n return \"ERR_JWKS_NO_MATCHING_KEY\";\n }\n };\n JWKSMultipleMatchingKeys = class extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = \"ERR_JWKS_MULTIPLE_MATCHING_KEYS\";\n this.message = \"multiple matching keys found in the JSON Web Key Set\";\n }\n static get code() {\n return \"ERR_JWKS_MULTIPLE_MATCHING_KEYS\";\n }\n };\n JWKSTimeout = class extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = \"ERR_JWKS_TIMEOUT\";\n this.message = \"request timed out\";\n }\n static get code() {\n return \"ERR_JWKS_TIMEOUT\";\n }\n };\n JWSSignatureVerificationFailed = class extends JOSEError {\n constructor() {\n super(...arguments);\n this.code = \"ERR_JWS_SIGNATURE_VERIFICATION_FAILED\";\n this.message = \"signature verification failed\";\n }\n static get code() {\n return \"ERR_JWS_SIGNATURE_VERIFICATION_FAILED\";\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/random.js\n var random_default;\n var init_random = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/random.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_webcrypto();\n random_default = webcrypto_default.getRandomValues.bind(webcrypto_default);\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/iv.js\n function bitLength(alg) {\n switch (alg) {\n case \"A128GCM\":\n case \"A128GCMKW\":\n case \"A192GCM\":\n case \"A192GCMKW\":\n case \"A256GCM\":\n case \"A256GCMKW\":\n return 96;\n case \"A128CBC-HS256\":\n case \"A192CBC-HS384\":\n case \"A256CBC-HS512\":\n return 128;\n default:\n throw new JOSENotSupported(`Unsupported JWE Algorithm: ${alg}`);\n }\n }\n var iv_default;\n var init_iv = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/iv.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n init_random();\n iv_default = (alg) => random_default(new Uint8Array(bitLength(alg) >> 3));\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/check_iv_length.js\n var checkIvLength, check_iv_length_default;\n var init_check_iv_length = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/check_iv_length.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n init_iv();\n checkIvLength = (enc, iv) => {\n if (iv.length << 3 !== bitLength(enc)) {\n throw new JWEInvalid(\"Invalid Initialization Vector length\");\n }\n };\n check_iv_length_default = checkIvLength;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/check_cek_length.js\n var checkCekLength, check_cek_length_default;\n var init_check_cek_length = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/check_cek_length.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n checkCekLength = (cek, expected) => {\n const actual = cek.byteLength << 3;\n if (actual !== expected) {\n throw new JWEInvalid(`Invalid Content Encryption Key length. Expected ${expected} bits, got ${actual} bits`);\n }\n };\n check_cek_length_default = checkCekLength;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/timing_safe_equal.js\n var timingSafeEqual, timing_safe_equal_default;\n var init_timing_safe_equal = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/timing_safe_equal.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n timingSafeEqual = (a3, b4) => {\n if (!(a3 instanceof Uint8Array)) {\n throw new TypeError(\"First argument must be a buffer\");\n }\n if (!(b4 instanceof Uint8Array)) {\n throw new TypeError(\"Second argument must be a buffer\");\n }\n if (a3.length !== b4.length) {\n throw new TypeError(\"Input buffers must have the same length\");\n }\n const len = a3.length;\n let out = 0;\n let i3 = -1;\n while (++i3 < len) {\n out |= a3[i3] ^ b4[i3];\n }\n return out === 0;\n };\n timing_safe_equal_default = timingSafeEqual;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/crypto_key.js\n function unusable(name, prop = \"algorithm.name\") {\n return new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`);\n }\n function isAlgorithm(algorithm, name) {\n return algorithm.name === name;\n }\n function getHashLength(hash3) {\n return parseInt(hash3.name.slice(4), 10);\n }\n function getNamedCurve(alg) {\n switch (alg) {\n case \"ES256\":\n return \"P-256\";\n case \"ES384\":\n return \"P-384\";\n case \"ES512\":\n return \"P-521\";\n default:\n throw new Error(\"unreachable\");\n }\n }\n function checkUsage(key, usages) {\n if (usages.length && !usages.some((expected) => key.usages.includes(expected))) {\n let msg = \"CryptoKey does not support this operation, its usages must include \";\n if (usages.length > 2) {\n const last = usages.pop();\n msg += `one of ${usages.join(\", \")}, or ${last}.`;\n } else if (usages.length === 2) {\n msg += `one of ${usages[0]} or ${usages[1]}.`;\n } else {\n msg += `${usages[0]}.`;\n }\n throw new TypeError(msg);\n }\n }\n function checkSigCryptoKey(key, alg, ...usages) {\n switch (alg) {\n case \"HS256\":\n case \"HS384\":\n case \"HS512\": {\n if (!isAlgorithm(key.algorithm, \"HMAC\"))\n throw unusable(\"HMAC\");\n const expected = parseInt(alg.slice(2), 10);\n const actual = getHashLength(key.algorithm.hash);\n if (actual !== expected)\n throw unusable(`SHA-${expected}`, \"algorithm.hash\");\n break;\n }\n case \"RS256\":\n case \"RS384\":\n case \"RS512\": {\n if (!isAlgorithm(key.algorithm, \"RSASSA-PKCS1-v1_5\"))\n throw unusable(\"RSASSA-PKCS1-v1_5\");\n const expected = parseInt(alg.slice(2), 10);\n const actual = getHashLength(key.algorithm.hash);\n if (actual !== expected)\n throw unusable(`SHA-${expected}`, \"algorithm.hash\");\n break;\n }\n case \"PS256\":\n case \"PS384\":\n case \"PS512\": {\n if (!isAlgorithm(key.algorithm, \"RSA-PSS\"))\n throw unusable(\"RSA-PSS\");\n const expected = parseInt(alg.slice(2), 10);\n const actual = getHashLength(key.algorithm.hash);\n if (actual !== expected)\n throw unusable(`SHA-${expected}`, \"algorithm.hash\");\n break;\n }\n case \"EdDSA\": {\n if (key.algorithm.name !== \"Ed25519\" && key.algorithm.name !== \"Ed448\") {\n throw unusable(\"Ed25519 or Ed448\");\n }\n break;\n }\n case \"ES256\":\n case \"ES384\":\n case \"ES512\": {\n if (!isAlgorithm(key.algorithm, \"ECDSA\"))\n throw unusable(\"ECDSA\");\n const expected = getNamedCurve(alg);\n const actual = key.algorithm.namedCurve;\n if (actual !== expected)\n throw unusable(expected, \"algorithm.namedCurve\");\n break;\n }\n default:\n throw new TypeError(\"CryptoKey does not support this operation\");\n }\n checkUsage(key, usages);\n }\n function checkEncCryptoKey(key, alg, ...usages) {\n switch (alg) {\n case \"A128GCM\":\n case \"A192GCM\":\n case \"A256GCM\": {\n if (!isAlgorithm(key.algorithm, \"AES-GCM\"))\n throw unusable(\"AES-GCM\");\n const expected = parseInt(alg.slice(1, 4), 10);\n const actual = key.algorithm.length;\n if (actual !== expected)\n throw unusable(expected, \"algorithm.length\");\n break;\n }\n case \"A128KW\":\n case \"A192KW\":\n case \"A256KW\": {\n if (!isAlgorithm(key.algorithm, \"AES-KW\"))\n throw unusable(\"AES-KW\");\n const expected = parseInt(alg.slice(1, 4), 10);\n const actual = key.algorithm.length;\n if (actual !== expected)\n throw unusable(expected, \"algorithm.length\");\n break;\n }\n case \"ECDH\": {\n switch (key.algorithm.name) {\n case \"ECDH\":\n case \"X25519\":\n case \"X448\":\n break;\n default:\n throw unusable(\"ECDH, X25519, or X448\");\n }\n break;\n }\n case \"PBES2-HS256+A128KW\":\n case \"PBES2-HS384+A192KW\":\n case \"PBES2-HS512+A256KW\":\n if (!isAlgorithm(key.algorithm, \"PBKDF2\"))\n throw unusable(\"PBKDF2\");\n break;\n case \"RSA-OAEP\":\n case \"RSA-OAEP-256\":\n case \"RSA-OAEP-384\":\n case \"RSA-OAEP-512\": {\n if (!isAlgorithm(key.algorithm, \"RSA-OAEP\"))\n throw unusable(\"RSA-OAEP\");\n const expected = parseInt(alg.slice(9), 10) || 1;\n const actual = getHashLength(key.algorithm.hash);\n if (actual !== expected)\n throw unusable(`SHA-${expected}`, \"algorithm.hash\");\n break;\n }\n default:\n throw new TypeError(\"CryptoKey does not support this operation\");\n }\n checkUsage(key, usages);\n }\n var init_crypto_key = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/crypto_key.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/invalid_key_input.js\n function message(msg, actual, ...types2) {\n if (types2.length > 2) {\n const last = types2.pop();\n msg += `one of type ${types2.join(\", \")}, or ${last}.`;\n } else if (types2.length === 2) {\n msg += `one of type ${types2[0]} or ${types2[1]}.`;\n } else {\n msg += `of type ${types2[0]}.`;\n }\n if (actual == null) {\n msg += ` Received ${actual}`;\n } else if (typeof actual === \"function\" && actual.name) {\n msg += ` Received function ${actual.name}`;\n } else if (typeof actual === \"object\" && actual != null) {\n if (actual.constructor && actual.constructor.name) {\n msg += ` Received an instance of ${actual.constructor.name}`;\n }\n }\n return msg;\n }\n function withAlg(alg, actual, ...types2) {\n return message(`Key for the ${alg} algorithm must be `, actual, ...types2);\n }\n var invalid_key_input_default;\n var init_invalid_key_input = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/invalid_key_input.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n invalid_key_input_default = (actual, ...types2) => {\n return message(\"Key must be \", actual, ...types2);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/is_key_like.js\n var is_key_like_default, types;\n var init_is_key_like = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/is_key_like.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_webcrypto();\n is_key_like_default = (key) => {\n return isCryptoKey(key);\n };\n types = [\"CryptoKey\"];\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/decrypt.js\n async function cbcDecrypt(enc, cek, ciphertext, iv, tag, aad) {\n if (!(cek instanceof Uint8Array)) {\n throw new TypeError(invalid_key_input_default(cek, \"Uint8Array\"));\n }\n const keySize = parseInt(enc.slice(1, 4), 10);\n const encKey = await webcrypto_default.subtle.importKey(\"raw\", cek.subarray(keySize >> 3), \"AES-CBC\", false, [\"decrypt\"]);\n const macKey = await webcrypto_default.subtle.importKey(\"raw\", cek.subarray(0, keySize >> 3), {\n hash: `SHA-${keySize << 1}`,\n name: \"HMAC\"\n }, false, [\"sign\"]);\n const macData = concat(aad, iv, ciphertext, uint64be(aad.length << 3));\n const expectedTag = new Uint8Array((await webcrypto_default.subtle.sign(\"HMAC\", macKey, macData)).slice(0, keySize >> 3));\n let macCheckPassed;\n try {\n macCheckPassed = timing_safe_equal_default(tag, expectedTag);\n } catch (_a) {\n }\n if (!macCheckPassed) {\n throw new JWEDecryptionFailed();\n }\n let plaintext;\n try {\n plaintext = new Uint8Array(await webcrypto_default.subtle.decrypt({ iv, name: \"AES-CBC\" }, encKey, ciphertext));\n } catch (_b) {\n }\n if (!plaintext) {\n throw new JWEDecryptionFailed();\n }\n return plaintext;\n }\n async function gcmDecrypt(enc, cek, ciphertext, iv, tag, aad) {\n let encKey;\n if (cek instanceof Uint8Array) {\n encKey = await webcrypto_default.subtle.importKey(\"raw\", cek, \"AES-GCM\", false, [\"decrypt\"]);\n } else {\n checkEncCryptoKey(cek, enc, \"decrypt\");\n encKey = cek;\n }\n try {\n return new Uint8Array(await webcrypto_default.subtle.decrypt({\n additionalData: aad,\n iv,\n name: \"AES-GCM\",\n tagLength: 128\n }, encKey, concat(ciphertext, tag)));\n } catch (_a) {\n throw new JWEDecryptionFailed();\n }\n }\n var decrypt, decrypt_default;\n var init_decrypt = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/decrypt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_buffer_utils();\n init_check_iv_length();\n init_check_cek_length();\n init_timing_safe_equal();\n init_errors2();\n init_webcrypto();\n init_crypto_key();\n init_invalid_key_input();\n init_is_key_like();\n decrypt = async (enc, cek, ciphertext, iv, tag, aad) => {\n if (!isCryptoKey(cek) && !(cek instanceof Uint8Array)) {\n throw new TypeError(invalid_key_input_default(cek, ...types, \"Uint8Array\"));\n }\n check_iv_length_default(enc, iv);\n switch (enc) {\n case \"A128CBC-HS256\":\n case \"A192CBC-HS384\":\n case \"A256CBC-HS512\":\n if (cek instanceof Uint8Array)\n check_cek_length_default(cek, parseInt(enc.slice(-3), 10));\n return cbcDecrypt(enc, cek, ciphertext, iv, tag, aad);\n case \"A128GCM\":\n case \"A192GCM\":\n case \"A256GCM\":\n if (cek instanceof Uint8Array)\n check_cek_length_default(cek, parseInt(enc.slice(1, 4), 10));\n return gcmDecrypt(enc, cek, ciphertext, iv, tag, aad);\n default:\n throw new JOSENotSupported(\"Unsupported JWE Content Encryption Algorithm\");\n }\n };\n decrypt_default = decrypt;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/zlib.js\n var inflate, deflate;\n var init_zlib = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/zlib.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n inflate = async () => {\n throw new JOSENotSupported('JWE \"zip\" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `inflateRaw` decrypt option to provide Inflate Raw implementation.');\n };\n deflate = async () => {\n throw new JOSENotSupported('JWE \"zip\" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `deflateRaw` encrypt option to provide Deflate Raw implementation.');\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/is_disjoint.js\n var isDisjoint, is_disjoint_default;\n var init_is_disjoint = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/is_disjoint.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n isDisjoint = (...headers) => {\n const sources = headers.filter(Boolean);\n if (sources.length === 0 || sources.length === 1) {\n return true;\n }\n let acc;\n for (const header of sources) {\n const parameters = Object.keys(header);\n if (!acc || acc.size === 0) {\n acc = new Set(parameters);\n continue;\n }\n for (const parameter of parameters) {\n if (acc.has(parameter)) {\n return false;\n }\n acc.add(parameter);\n }\n }\n return true;\n };\n is_disjoint_default = isDisjoint;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/is_object.js\n function isObjectLike(value) {\n return typeof value === \"object\" && value !== null;\n }\n function isObject(input) {\n if (!isObjectLike(input) || Object.prototype.toString.call(input) !== \"[object Object]\") {\n return false;\n }\n if (Object.getPrototypeOf(input) === null) {\n return true;\n }\n let proto = input;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(input) === proto;\n }\n var init_is_object = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/is_object.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/bogus.js\n var bogusWebCrypto, bogus_default;\n var init_bogus = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/bogus.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n bogusWebCrypto = [\n { hash: \"SHA-256\", name: \"HMAC\" },\n true,\n [\"sign\"]\n ];\n bogus_default = bogusWebCrypto;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/aeskw.js\n function checkKeySize(key, alg) {\n if (key.algorithm.length !== parseInt(alg.slice(1, 4), 10)) {\n throw new TypeError(`Invalid key size for alg: ${alg}`);\n }\n }\n function getCryptoKey(key, alg, usage) {\n if (isCryptoKey(key)) {\n checkEncCryptoKey(key, alg, usage);\n return key;\n }\n if (key instanceof Uint8Array) {\n return webcrypto_default.subtle.importKey(\"raw\", key, \"AES-KW\", true, [usage]);\n }\n throw new TypeError(invalid_key_input_default(key, ...types, \"Uint8Array\"));\n }\n var wrap, unwrap;\n var init_aeskw = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/aeskw.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_bogus();\n init_webcrypto();\n init_crypto_key();\n init_invalid_key_input();\n init_is_key_like();\n wrap = async (alg, key, cek) => {\n const cryptoKey = await getCryptoKey(key, alg, \"wrapKey\");\n checkKeySize(cryptoKey, alg);\n const cryptoKeyCek = await webcrypto_default.subtle.importKey(\"raw\", cek, ...bogus_default);\n return new Uint8Array(await webcrypto_default.subtle.wrapKey(\"raw\", cryptoKeyCek, cryptoKey, \"AES-KW\"));\n };\n unwrap = async (alg, key, encryptedKey) => {\n const cryptoKey = await getCryptoKey(key, alg, \"unwrapKey\");\n checkKeySize(cryptoKey, alg);\n const cryptoKeyCek = await webcrypto_default.subtle.unwrapKey(\"raw\", encryptedKey, cryptoKey, \"AES-KW\", ...bogus_default);\n return new Uint8Array(await webcrypto_default.subtle.exportKey(\"raw\", cryptoKeyCek));\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/ecdhes.js\n async function deriveKey(publicKey, privateKey, algorithm, keyLength, apu = new Uint8Array(0), apv = new Uint8Array(0)) {\n if (!isCryptoKey(publicKey)) {\n throw new TypeError(invalid_key_input_default(publicKey, ...types));\n }\n checkEncCryptoKey(publicKey, \"ECDH\");\n if (!isCryptoKey(privateKey)) {\n throw new TypeError(invalid_key_input_default(privateKey, ...types));\n }\n checkEncCryptoKey(privateKey, \"ECDH\", \"deriveBits\");\n const value = concat(lengthAndInput(encoder.encode(algorithm)), lengthAndInput(apu), lengthAndInput(apv), uint32be(keyLength));\n let length;\n if (publicKey.algorithm.name === \"X25519\") {\n length = 256;\n } else if (publicKey.algorithm.name === \"X448\") {\n length = 448;\n } else {\n length = Math.ceil(parseInt(publicKey.algorithm.namedCurve.substr(-3), 10) / 8) << 3;\n }\n const sharedSecret = new Uint8Array(await webcrypto_default.subtle.deriveBits({\n name: publicKey.algorithm.name,\n public: publicKey\n }, privateKey, length));\n return concatKdf(sharedSecret, keyLength, value);\n }\n async function generateEpk(key) {\n if (!isCryptoKey(key)) {\n throw new TypeError(invalid_key_input_default(key, ...types));\n }\n return webcrypto_default.subtle.generateKey(key.algorithm, true, [\"deriveBits\"]);\n }\n function ecdhAllowed(key) {\n if (!isCryptoKey(key)) {\n throw new TypeError(invalid_key_input_default(key, ...types));\n }\n return [\"P-256\", \"P-384\", \"P-521\"].includes(key.algorithm.namedCurve) || key.algorithm.name === \"X25519\" || key.algorithm.name === \"X448\";\n }\n var init_ecdhes = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/ecdhes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_buffer_utils();\n init_webcrypto();\n init_crypto_key();\n init_invalid_key_input();\n init_is_key_like();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/check_p2s.js\n function checkP2s(p2s2) {\n if (!(p2s2 instanceof Uint8Array) || p2s2.length < 8) {\n throw new JWEInvalid(\"PBES2 Salt Input must be 8 or more octets\");\n }\n }\n var init_check_p2s = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/check_p2s.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/pbes2kw.js\n function getCryptoKey2(key, alg) {\n if (key instanceof Uint8Array) {\n return webcrypto_default.subtle.importKey(\"raw\", key, \"PBKDF2\", false, [\"deriveBits\"]);\n }\n if (isCryptoKey(key)) {\n checkEncCryptoKey(key, alg, \"deriveBits\", \"deriveKey\");\n return key;\n }\n throw new TypeError(invalid_key_input_default(key, ...types, \"Uint8Array\"));\n }\n async function deriveKey2(p2s2, alg, p2c, key) {\n checkP2s(p2s2);\n const salt = p2s(alg, p2s2);\n const keylen = parseInt(alg.slice(13, 16), 10);\n const subtleAlg = {\n hash: `SHA-${alg.slice(8, 11)}`,\n iterations: p2c,\n name: \"PBKDF2\",\n salt\n };\n const wrapAlg = {\n length: keylen,\n name: \"AES-KW\"\n };\n const cryptoKey = await getCryptoKey2(key, alg);\n if (cryptoKey.usages.includes(\"deriveBits\")) {\n return new Uint8Array(await webcrypto_default.subtle.deriveBits(subtleAlg, cryptoKey, keylen));\n }\n if (cryptoKey.usages.includes(\"deriveKey\")) {\n return webcrypto_default.subtle.deriveKey(subtleAlg, cryptoKey, wrapAlg, false, [\"wrapKey\", \"unwrapKey\"]);\n }\n throw new TypeError('PBKDF2 key \"usages\" must include \"deriveBits\" or \"deriveKey\"');\n }\n var encrypt, decrypt2;\n var init_pbes2kw = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/pbes2kw.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_random();\n init_buffer_utils();\n init_base64url();\n init_aeskw();\n init_check_p2s();\n init_webcrypto();\n init_crypto_key();\n init_invalid_key_input();\n init_is_key_like();\n encrypt = async (alg, key, cek, p2c = 2048, p2s2 = random_default(new Uint8Array(16))) => {\n const derived = await deriveKey2(p2s2, alg, p2c, key);\n const encryptedKey = await wrap(alg.slice(-6), derived, cek);\n return { encryptedKey, p2c, p2s: encode(p2s2) };\n };\n decrypt2 = async (alg, key, encryptedKey, p2c, p2s2) => {\n const derived = await deriveKey2(p2s2, alg, p2c, key);\n return unwrap(alg.slice(-6), derived, encryptedKey);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/subtle_rsaes.js\n function subtleRsaEs(alg) {\n switch (alg) {\n case \"RSA-OAEP\":\n case \"RSA-OAEP-256\":\n case \"RSA-OAEP-384\":\n case \"RSA-OAEP-512\":\n return \"RSA-OAEP\";\n default:\n throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);\n }\n }\n var init_subtle_rsaes = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/subtle_rsaes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/check_key_length.js\n var check_key_length_default;\n var init_check_key_length = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/check_key_length.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n check_key_length_default = (alg, key) => {\n if (alg.startsWith(\"RS\") || alg.startsWith(\"PS\")) {\n const { modulusLength } = key.algorithm;\n if (typeof modulusLength !== \"number\" || modulusLength < 2048) {\n throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`);\n }\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/rsaes.js\n var encrypt2, decrypt3;\n var init_rsaes = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/rsaes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_subtle_rsaes();\n init_bogus();\n init_webcrypto();\n init_crypto_key();\n init_check_key_length();\n init_invalid_key_input();\n init_is_key_like();\n encrypt2 = async (alg, key, cek) => {\n if (!isCryptoKey(key)) {\n throw new TypeError(invalid_key_input_default(key, ...types));\n }\n checkEncCryptoKey(key, alg, \"encrypt\", \"wrapKey\");\n check_key_length_default(alg, key);\n if (key.usages.includes(\"encrypt\")) {\n return new Uint8Array(await webcrypto_default.subtle.encrypt(subtleRsaEs(alg), key, cek));\n }\n if (key.usages.includes(\"wrapKey\")) {\n const cryptoKeyCek = await webcrypto_default.subtle.importKey(\"raw\", cek, ...bogus_default);\n return new Uint8Array(await webcrypto_default.subtle.wrapKey(\"raw\", cryptoKeyCek, key, subtleRsaEs(alg)));\n }\n throw new TypeError('RSA-OAEP key \"usages\" must include \"encrypt\" or \"wrapKey\" for this operation');\n };\n decrypt3 = async (alg, key, encryptedKey) => {\n if (!isCryptoKey(key)) {\n throw new TypeError(invalid_key_input_default(key, ...types));\n }\n checkEncCryptoKey(key, alg, \"decrypt\", \"unwrapKey\");\n check_key_length_default(alg, key);\n if (key.usages.includes(\"decrypt\")) {\n return new Uint8Array(await webcrypto_default.subtle.decrypt(subtleRsaEs(alg), key, encryptedKey));\n }\n if (key.usages.includes(\"unwrapKey\")) {\n const cryptoKeyCek = await webcrypto_default.subtle.unwrapKey(\"raw\", encryptedKey, key, subtleRsaEs(alg), ...bogus_default);\n return new Uint8Array(await webcrypto_default.subtle.exportKey(\"raw\", cryptoKeyCek));\n }\n throw new TypeError('RSA-OAEP key \"usages\" must include \"decrypt\" or \"unwrapKey\" for this operation');\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/cek.js\n function bitLength2(alg) {\n switch (alg) {\n case \"A128GCM\":\n return 128;\n case \"A192GCM\":\n return 192;\n case \"A256GCM\":\n case \"A128CBC-HS256\":\n return 256;\n case \"A192CBC-HS384\":\n return 384;\n case \"A256CBC-HS512\":\n return 512;\n default:\n throw new JOSENotSupported(`Unsupported JWE Algorithm: ${alg}`);\n }\n }\n var cek_default;\n var init_cek = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/cek.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n init_random();\n cek_default = (alg) => random_default(new Uint8Array(bitLength2(alg) >> 3));\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/format_pem.js\n var format_pem_default;\n var init_format_pem = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/format_pem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n format_pem_default = (b64, descriptor) => {\n const newlined = (b64.match(/.{1,64}/g) || []).join(\"\\n\");\n return `-----BEGIN ${descriptor}-----\n${newlined}\n-----END ${descriptor}-----`;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/asn1.js\n function getElement(seq) {\n let result = [];\n let next = 0;\n while (next < seq.length) {\n let nextPart = parseElement(seq.subarray(next));\n result.push(nextPart);\n next += nextPart.byteLength;\n }\n return result;\n }\n function parseElement(bytes) {\n let position = 0;\n let tag = bytes[0] & 31;\n position++;\n if (tag === 31) {\n tag = 0;\n while (bytes[position] >= 128) {\n tag = tag * 128 + bytes[position] - 128;\n position++;\n }\n tag = tag * 128 + bytes[position] - 128;\n position++;\n }\n let length = 0;\n if (bytes[position] < 128) {\n length = bytes[position];\n position++;\n } else if (length === 128) {\n length = 0;\n while (bytes[position + length] !== 0 || bytes[position + length + 1] !== 0) {\n if (length > bytes.byteLength) {\n throw new TypeError(\"invalid indefinite form length\");\n }\n length++;\n }\n const byteLength2 = position + length + 2;\n return {\n byteLength: byteLength2,\n contents: bytes.subarray(position, position + length),\n raw: bytes.subarray(0, byteLength2)\n };\n } else {\n let numberOfDigits = bytes[position] & 127;\n position++;\n length = 0;\n for (let i3 = 0; i3 < numberOfDigits; i3++) {\n length = length * 256 + bytes[position];\n position++;\n }\n }\n const byteLength = position + length;\n return {\n byteLength,\n contents: bytes.subarray(position, byteLength),\n raw: bytes.subarray(0, byteLength)\n };\n }\n function spkiFromX509(buf) {\n const tbsCertificate = getElement(getElement(parseElement(buf).contents)[0].contents);\n return encodeBase64(tbsCertificate[tbsCertificate[0].raw[0] === 160 ? 6 : 5].raw);\n }\n function getSPKI(x509) {\n const pem = x509.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\\s)/g, \"\");\n const raw = decodeBase64(pem);\n return format_pem_default(spkiFromX509(raw), \"PUBLIC KEY\");\n }\n var genericExport, toSPKI, toPKCS8, findOid, getNamedCurve2, genericImport, fromPKCS8, fromSPKI, fromX509;\n var init_asn1 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/asn1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_webcrypto();\n init_invalid_key_input();\n init_base64url();\n init_format_pem();\n init_errors2();\n init_is_key_like();\n genericExport = async (keyType, keyFormat, key) => {\n if (!isCryptoKey(key)) {\n throw new TypeError(invalid_key_input_default(key, ...types));\n }\n if (!key.extractable) {\n throw new TypeError(\"CryptoKey is not extractable\");\n }\n if (key.type !== keyType) {\n throw new TypeError(`key is not a ${keyType} key`);\n }\n return format_pem_default(encodeBase64(new Uint8Array(await webcrypto_default.subtle.exportKey(keyFormat, key))), `${keyType.toUpperCase()} KEY`);\n };\n toSPKI = (key) => {\n return genericExport(\"public\", \"spki\", key);\n };\n toPKCS8 = (key) => {\n return genericExport(\"private\", \"pkcs8\", key);\n };\n findOid = (keyData, oid, from14 = 0) => {\n if (from14 === 0) {\n oid.unshift(oid.length);\n oid.unshift(6);\n }\n let i3 = keyData.indexOf(oid[0], from14);\n if (i3 === -1)\n return false;\n const sub = keyData.subarray(i3, i3 + oid.length);\n if (sub.length !== oid.length)\n return false;\n return sub.every((value, index2) => value === oid[index2]) || findOid(keyData, oid, i3 + 1);\n };\n getNamedCurve2 = (keyData) => {\n switch (true) {\n case findOid(keyData, [42, 134, 72, 206, 61, 3, 1, 7]):\n return \"P-256\";\n case findOid(keyData, [43, 129, 4, 0, 34]):\n return \"P-384\";\n case findOid(keyData, [43, 129, 4, 0, 35]):\n return \"P-521\";\n case findOid(keyData, [43, 101, 110]):\n return \"X25519\";\n case findOid(keyData, [43, 101, 111]):\n return \"X448\";\n case findOid(keyData, [43, 101, 112]):\n return \"Ed25519\";\n case findOid(keyData, [43, 101, 113]):\n return \"Ed448\";\n default:\n throw new JOSENotSupported(\"Invalid or unsupported EC Key Curve or OKP Key Sub Type\");\n }\n };\n genericImport = async (replace, keyFormat, pem, alg, options) => {\n var _a;\n let algorithm;\n let keyUsages;\n const keyData = new Uint8Array(atob(pem.replace(replace, \"\")).split(\"\").map((c4) => c4.charCodeAt(0)));\n const isPublic = keyFormat === \"spki\";\n switch (alg) {\n case \"PS256\":\n case \"PS384\":\n case \"PS512\":\n algorithm = { name: \"RSA-PSS\", hash: `SHA-${alg.slice(-3)}` };\n keyUsages = isPublic ? [\"verify\"] : [\"sign\"];\n break;\n case \"RS256\":\n case \"RS384\":\n case \"RS512\":\n algorithm = { name: \"RSASSA-PKCS1-v1_5\", hash: `SHA-${alg.slice(-3)}` };\n keyUsages = isPublic ? [\"verify\"] : [\"sign\"];\n break;\n case \"RSA-OAEP\":\n case \"RSA-OAEP-256\":\n case \"RSA-OAEP-384\":\n case \"RSA-OAEP-512\":\n algorithm = {\n name: \"RSA-OAEP\",\n hash: `SHA-${parseInt(alg.slice(-3), 10) || 1}`\n };\n keyUsages = isPublic ? [\"encrypt\", \"wrapKey\"] : [\"decrypt\", \"unwrapKey\"];\n break;\n case \"ES256\":\n algorithm = { name: \"ECDSA\", namedCurve: \"P-256\" };\n keyUsages = isPublic ? [\"verify\"] : [\"sign\"];\n break;\n case \"ES384\":\n algorithm = { name: \"ECDSA\", namedCurve: \"P-384\" };\n keyUsages = isPublic ? [\"verify\"] : [\"sign\"];\n break;\n case \"ES512\":\n algorithm = { name: \"ECDSA\", namedCurve: \"P-521\" };\n keyUsages = isPublic ? [\"verify\"] : [\"sign\"];\n break;\n case \"ECDH-ES\":\n case \"ECDH-ES+A128KW\":\n case \"ECDH-ES+A192KW\":\n case \"ECDH-ES+A256KW\": {\n const namedCurve = getNamedCurve2(keyData);\n algorithm = namedCurve.startsWith(\"P-\") ? { name: \"ECDH\", namedCurve } : { name: namedCurve };\n keyUsages = isPublic ? [] : [\"deriveBits\"];\n break;\n }\n case \"EdDSA\":\n algorithm = { name: getNamedCurve2(keyData) };\n keyUsages = isPublic ? [\"verify\"] : [\"sign\"];\n break;\n default:\n throw new JOSENotSupported('Invalid or unsupported \"alg\" (Algorithm) value');\n }\n return webcrypto_default.subtle.importKey(keyFormat, keyData, algorithm, (_a = options === null || options === void 0 ? void 0 : options.extractable) !== null && _a !== void 0 ? _a : false, keyUsages);\n };\n fromPKCS8 = (pem, alg, options) => {\n return genericImport(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\\s)/g, \"pkcs8\", pem, alg, options);\n };\n fromSPKI = (pem, alg, options) => {\n return genericImport(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\\s)/g, \"spki\", pem, alg, options);\n };\n fromX509 = (pem, alg, options) => {\n let spki;\n try {\n spki = getSPKI(pem);\n } catch (cause) {\n throw new TypeError(\"Failed to parse the X.509 certificate\", { cause });\n }\n return fromSPKI(spki, alg, options);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/jwk_to_key.js\n function subtleMapping(jwk) {\n let algorithm;\n let keyUsages;\n switch (jwk.kty) {\n case \"oct\": {\n switch (jwk.alg) {\n case \"HS256\":\n case \"HS384\":\n case \"HS512\":\n algorithm = { name: \"HMAC\", hash: `SHA-${jwk.alg.slice(-3)}` };\n keyUsages = [\"sign\", \"verify\"];\n break;\n case \"A128CBC-HS256\":\n case \"A192CBC-HS384\":\n case \"A256CBC-HS512\":\n throw new JOSENotSupported(`${jwk.alg} keys cannot be imported as CryptoKey instances`);\n case \"A128GCM\":\n case \"A192GCM\":\n case \"A256GCM\":\n case \"A128GCMKW\":\n case \"A192GCMKW\":\n case \"A256GCMKW\":\n algorithm = { name: \"AES-GCM\" };\n keyUsages = [\"encrypt\", \"decrypt\"];\n break;\n case \"A128KW\":\n case \"A192KW\":\n case \"A256KW\":\n algorithm = { name: \"AES-KW\" };\n keyUsages = [\"wrapKey\", \"unwrapKey\"];\n break;\n case \"PBES2-HS256+A128KW\":\n case \"PBES2-HS384+A192KW\":\n case \"PBES2-HS512+A256KW\":\n algorithm = { name: \"PBKDF2\" };\n keyUsages = [\"deriveBits\"];\n break;\n default:\n throw new JOSENotSupported('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value');\n }\n break;\n }\n case \"RSA\": {\n switch (jwk.alg) {\n case \"PS256\":\n case \"PS384\":\n case \"PS512\":\n algorithm = { name: \"RSA-PSS\", hash: `SHA-${jwk.alg.slice(-3)}` };\n keyUsages = jwk.d ? [\"sign\"] : [\"verify\"];\n break;\n case \"RS256\":\n case \"RS384\":\n case \"RS512\":\n algorithm = { name: \"RSASSA-PKCS1-v1_5\", hash: `SHA-${jwk.alg.slice(-3)}` };\n keyUsages = jwk.d ? [\"sign\"] : [\"verify\"];\n break;\n case \"RSA-OAEP\":\n case \"RSA-OAEP-256\":\n case \"RSA-OAEP-384\":\n case \"RSA-OAEP-512\":\n algorithm = {\n name: \"RSA-OAEP\",\n hash: `SHA-${parseInt(jwk.alg.slice(-3), 10) || 1}`\n };\n keyUsages = jwk.d ? [\"decrypt\", \"unwrapKey\"] : [\"encrypt\", \"wrapKey\"];\n break;\n default:\n throw new JOSENotSupported('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value');\n }\n break;\n }\n case \"EC\": {\n switch (jwk.alg) {\n case \"ES256\":\n algorithm = { name: \"ECDSA\", namedCurve: \"P-256\" };\n keyUsages = jwk.d ? [\"sign\"] : [\"verify\"];\n break;\n case \"ES384\":\n algorithm = { name: \"ECDSA\", namedCurve: \"P-384\" };\n keyUsages = jwk.d ? [\"sign\"] : [\"verify\"];\n break;\n case \"ES512\":\n algorithm = { name: \"ECDSA\", namedCurve: \"P-521\" };\n keyUsages = jwk.d ? [\"sign\"] : [\"verify\"];\n break;\n case \"ECDH-ES\":\n case \"ECDH-ES+A128KW\":\n case \"ECDH-ES+A192KW\":\n case \"ECDH-ES+A256KW\":\n algorithm = { name: \"ECDH\", namedCurve: jwk.crv };\n keyUsages = jwk.d ? [\"deriveBits\"] : [];\n break;\n default:\n throw new JOSENotSupported('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value');\n }\n break;\n }\n case \"OKP\": {\n switch (jwk.alg) {\n case \"EdDSA\":\n algorithm = { name: jwk.crv };\n keyUsages = jwk.d ? [\"sign\"] : [\"verify\"];\n break;\n case \"ECDH-ES\":\n case \"ECDH-ES+A128KW\":\n case \"ECDH-ES+A192KW\":\n case \"ECDH-ES+A256KW\":\n algorithm = { name: jwk.crv };\n keyUsages = jwk.d ? [\"deriveBits\"] : [];\n break;\n default:\n throw new JOSENotSupported('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value');\n }\n break;\n }\n default:\n throw new JOSENotSupported('Invalid or unsupported JWK \"kty\" (Key Type) Parameter value');\n }\n return { algorithm, keyUsages };\n }\n var parse, jwk_to_key_default;\n var init_jwk_to_key = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/jwk_to_key.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_webcrypto();\n init_errors2();\n init_base64url();\n parse = async (jwk) => {\n var _a, _b;\n if (!jwk.alg) {\n throw new TypeError('\"alg\" argument is required when \"jwk.alg\" is not present');\n }\n const { algorithm, keyUsages } = subtleMapping(jwk);\n const rest = [\n algorithm,\n (_a = jwk.ext) !== null && _a !== void 0 ? _a : false,\n (_b = jwk.key_ops) !== null && _b !== void 0 ? _b : keyUsages\n ];\n if (algorithm.name === \"PBKDF2\") {\n return webcrypto_default.subtle.importKey(\"raw\", decode(jwk.k), ...rest);\n }\n const keyData = { ...jwk };\n delete keyData.alg;\n delete keyData.use;\n return webcrypto_default.subtle.importKey(\"jwk\", keyData, ...rest);\n };\n jwk_to_key_default = parse;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/key/import.js\n async function importSPKI(spki, alg, options) {\n if (typeof spki !== \"string\" || spki.indexOf(\"-----BEGIN PUBLIC KEY-----\") !== 0) {\n throw new TypeError('\"spki\" must be SPKI formatted string');\n }\n return fromSPKI(spki, alg, options);\n }\n async function importX509(x509, alg, options) {\n if (typeof x509 !== \"string\" || x509.indexOf(\"-----BEGIN CERTIFICATE-----\") !== 0) {\n throw new TypeError('\"x509\" must be X.509 formatted string');\n }\n return fromX509(x509, alg, options);\n }\n async function importPKCS8(pkcs8, alg, options) {\n if (typeof pkcs8 !== \"string\" || pkcs8.indexOf(\"-----BEGIN PRIVATE KEY-----\") !== 0) {\n throw new TypeError('\"pkcs8\" must be PKCS#8 formatted string');\n }\n return fromPKCS8(pkcs8, alg, options);\n }\n async function importJWK(jwk, alg, octAsKeyObject) {\n var _a;\n if (!isObject(jwk)) {\n throw new TypeError(\"JWK must be an object\");\n }\n alg || (alg = jwk.alg);\n switch (jwk.kty) {\n case \"oct\":\n if (typeof jwk.k !== \"string\" || !jwk.k) {\n throw new TypeError('missing \"k\" (Key Value) Parameter value');\n }\n octAsKeyObject !== null && octAsKeyObject !== void 0 ? octAsKeyObject : octAsKeyObject = jwk.ext !== true;\n if (octAsKeyObject) {\n return jwk_to_key_default({ ...jwk, alg, ext: (_a = jwk.ext) !== null && _a !== void 0 ? _a : false });\n }\n return decode(jwk.k);\n case \"RSA\":\n if (jwk.oth !== void 0) {\n throw new JOSENotSupported('RSA JWK \"oth\" (Other Primes Info) Parameter value is not supported');\n }\n case \"EC\":\n case \"OKP\":\n return jwk_to_key_default({ ...jwk, alg });\n default:\n throw new JOSENotSupported('Unsupported \"kty\" (Key Type) Parameter value');\n }\n }\n var init_import = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/key/import.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base64url();\n init_asn1();\n init_jwk_to_key();\n init_errors2();\n init_is_object();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/check_key_type.js\n var symmetricTypeCheck, asymmetricTypeCheck, checkKeyType, check_key_type_default;\n var init_check_key_type = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/check_key_type.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_invalid_key_input();\n init_is_key_like();\n symmetricTypeCheck = (alg, key) => {\n if (key instanceof Uint8Array)\n return;\n if (!is_key_like_default(key)) {\n throw new TypeError(withAlg(alg, key, ...types, \"Uint8Array\"));\n }\n if (key.type !== \"secret\") {\n throw new TypeError(`${types.join(\" or \")} instances for symmetric algorithms must be of type \"secret\"`);\n }\n };\n asymmetricTypeCheck = (alg, key, usage) => {\n if (!is_key_like_default(key)) {\n throw new TypeError(withAlg(alg, key, ...types));\n }\n if (key.type === \"secret\") {\n throw new TypeError(`${types.join(\" or \")} instances for asymmetric algorithms must not be of type \"secret\"`);\n }\n if (usage === \"sign\" && key.type === \"public\") {\n throw new TypeError(`${types.join(\" or \")} instances for asymmetric algorithm signing must be of type \"private\"`);\n }\n if (usage === \"decrypt\" && key.type === \"public\") {\n throw new TypeError(`${types.join(\" or \")} instances for asymmetric algorithm decryption must be of type \"private\"`);\n }\n if (key.algorithm && usage === \"verify\" && key.type === \"private\") {\n throw new TypeError(`${types.join(\" or \")} instances for asymmetric algorithm verifying must be of type \"public\"`);\n }\n if (key.algorithm && usage === \"encrypt\" && key.type === \"private\") {\n throw new TypeError(`${types.join(\" or \")} instances for asymmetric algorithm encryption must be of type \"public\"`);\n }\n };\n checkKeyType = (alg, key, usage) => {\n const symmetric = alg.startsWith(\"HS\") || alg === \"dir\" || alg.startsWith(\"PBES2\") || /^A\\d{3}(?:GCM)?KW$/.test(alg);\n if (symmetric) {\n symmetricTypeCheck(alg, key);\n } else {\n asymmetricTypeCheck(alg, key, usage);\n }\n };\n check_key_type_default = checkKeyType;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/encrypt.js\n async function cbcEncrypt(enc, plaintext, cek, iv, aad) {\n if (!(cek instanceof Uint8Array)) {\n throw new TypeError(invalid_key_input_default(cek, \"Uint8Array\"));\n }\n const keySize = parseInt(enc.slice(1, 4), 10);\n const encKey = await webcrypto_default.subtle.importKey(\"raw\", cek.subarray(keySize >> 3), \"AES-CBC\", false, [\"encrypt\"]);\n const macKey = await webcrypto_default.subtle.importKey(\"raw\", cek.subarray(0, keySize >> 3), {\n hash: `SHA-${keySize << 1}`,\n name: \"HMAC\"\n }, false, [\"sign\"]);\n const ciphertext = new Uint8Array(await webcrypto_default.subtle.encrypt({\n iv,\n name: \"AES-CBC\"\n }, encKey, plaintext));\n const macData = concat(aad, iv, ciphertext, uint64be(aad.length << 3));\n const tag = new Uint8Array((await webcrypto_default.subtle.sign(\"HMAC\", macKey, macData)).slice(0, keySize >> 3));\n return { ciphertext, tag };\n }\n async function gcmEncrypt(enc, plaintext, cek, iv, aad) {\n let encKey;\n if (cek instanceof Uint8Array) {\n encKey = await webcrypto_default.subtle.importKey(\"raw\", cek, \"AES-GCM\", false, [\"encrypt\"]);\n } else {\n checkEncCryptoKey(cek, enc, \"encrypt\");\n encKey = cek;\n }\n const encrypted = new Uint8Array(await webcrypto_default.subtle.encrypt({\n additionalData: aad,\n iv,\n name: \"AES-GCM\",\n tagLength: 128\n }, encKey, plaintext));\n const tag = encrypted.slice(-16);\n const ciphertext = encrypted.slice(0, -16);\n return { ciphertext, tag };\n }\n var encrypt3, encrypt_default;\n var init_encrypt = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/encrypt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_buffer_utils();\n init_check_iv_length();\n init_check_cek_length();\n init_webcrypto();\n init_crypto_key();\n init_invalid_key_input();\n init_errors2();\n init_is_key_like();\n encrypt3 = async (enc, plaintext, cek, iv, aad) => {\n if (!isCryptoKey(cek) && !(cek instanceof Uint8Array)) {\n throw new TypeError(invalid_key_input_default(cek, ...types, \"Uint8Array\"));\n }\n check_iv_length_default(enc, iv);\n switch (enc) {\n case \"A128CBC-HS256\":\n case \"A192CBC-HS384\":\n case \"A256CBC-HS512\":\n if (cek instanceof Uint8Array)\n check_cek_length_default(cek, parseInt(enc.slice(-3), 10));\n return cbcEncrypt(enc, plaintext, cek, iv, aad);\n case \"A128GCM\":\n case \"A192GCM\":\n case \"A256GCM\":\n if (cek instanceof Uint8Array)\n check_cek_length_default(cek, parseInt(enc.slice(1, 4), 10));\n return gcmEncrypt(enc, plaintext, cek, iv, aad);\n default:\n throw new JOSENotSupported(\"Unsupported JWE Content Encryption Algorithm\");\n }\n };\n encrypt_default = encrypt3;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/aesgcmkw.js\n async function wrap2(alg, key, cek, iv) {\n const jweAlgorithm = alg.slice(0, 7);\n iv || (iv = iv_default(jweAlgorithm));\n const { ciphertext: encryptedKey, tag } = await encrypt_default(jweAlgorithm, cek, key, iv, new Uint8Array(0));\n return { encryptedKey, iv: encode(iv), tag: encode(tag) };\n }\n async function unwrap2(alg, key, encryptedKey, iv, tag) {\n const jweAlgorithm = alg.slice(0, 7);\n return decrypt_default(jweAlgorithm, key, encryptedKey, iv, tag, new Uint8Array(0));\n }\n var init_aesgcmkw = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/aesgcmkw.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encrypt();\n init_decrypt();\n init_iv();\n init_base64url();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/decrypt_key_management.js\n async function decryptKeyManagement(alg, key, encryptedKey, joseHeader, options) {\n check_key_type_default(alg, key, \"decrypt\");\n switch (alg) {\n case \"dir\": {\n if (encryptedKey !== void 0)\n throw new JWEInvalid(\"Encountered unexpected JWE Encrypted Key\");\n return key;\n }\n case \"ECDH-ES\":\n if (encryptedKey !== void 0)\n throw new JWEInvalid(\"Encountered unexpected JWE Encrypted Key\");\n case \"ECDH-ES+A128KW\":\n case \"ECDH-ES+A192KW\":\n case \"ECDH-ES+A256KW\": {\n if (!isObject(joseHeader.epk))\n throw new JWEInvalid(`JOSE Header \"epk\" (Ephemeral Public Key) missing or invalid`);\n if (!ecdhAllowed(key))\n throw new JOSENotSupported(\"ECDH with the provided key is not allowed or not supported by your javascript runtime\");\n const epk = await importJWK(joseHeader.epk, alg);\n let partyUInfo;\n let partyVInfo;\n if (joseHeader.apu !== void 0) {\n if (typeof joseHeader.apu !== \"string\")\n throw new JWEInvalid(`JOSE Header \"apu\" (Agreement PartyUInfo) invalid`);\n try {\n partyUInfo = decode(joseHeader.apu);\n } catch (_a) {\n throw new JWEInvalid(\"Failed to base64url decode the apu\");\n }\n }\n if (joseHeader.apv !== void 0) {\n if (typeof joseHeader.apv !== \"string\")\n throw new JWEInvalid(`JOSE Header \"apv\" (Agreement PartyVInfo) invalid`);\n try {\n partyVInfo = decode(joseHeader.apv);\n } catch (_b) {\n throw new JWEInvalid(\"Failed to base64url decode the apv\");\n }\n }\n const sharedSecret = await deriveKey(epk, key, alg === \"ECDH-ES\" ? joseHeader.enc : alg, alg === \"ECDH-ES\" ? bitLength2(joseHeader.enc) : parseInt(alg.slice(-5, -2), 10), partyUInfo, partyVInfo);\n if (alg === \"ECDH-ES\")\n return sharedSecret;\n if (encryptedKey === void 0)\n throw new JWEInvalid(\"JWE Encrypted Key missing\");\n return unwrap(alg.slice(-6), sharedSecret, encryptedKey);\n }\n case \"RSA1_5\":\n case \"RSA-OAEP\":\n case \"RSA-OAEP-256\":\n case \"RSA-OAEP-384\":\n case \"RSA-OAEP-512\": {\n if (encryptedKey === void 0)\n throw new JWEInvalid(\"JWE Encrypted Key missing\");\n return decrypt3(alg, key, encryptedKey);\n }\n case \"PBES2-HS256+A128KW\":\n case \"PBES2-HS384+A192KW\":\n case \"PBES2-HS512+A256KW\": {\n if (encryptedKey === void 0)\n throw new JWEInvalid(\"JWE Encrypted Key missing\");\n if (typeof joseHeader.p2c !== \"number\")\n throw new JWEInvalid(`JOSE Header \"p2c\" (PBES2 Count) missing or invalid`);\n const p2cLimit = (options === null || options === void 0 ? void 0 : options.maxPBES2Count) || 1e4;\n if (joseHeader.p2c > p2cLimit)\n throw new JWEInvalid(`JOSE Header \"p2c\" (PBES2 Count) out is of acceptable bounds`);\n if (typeof joseHeader.p2s !== \"string\")\n throw new JWEInvalid(`JOSE Header \"p2s\" (PBES2 Salt) missing or invalid`);\n let p2s2;\n try {\n p2s2 = decode(joseHeader.p2s);\n } catch (_c) {\n throw new JWEInvalid(\"Failed to base64url decode the p2s\");\n }\n return decrypt2(alg, key, encryptedKey, joseHeader.p2c, p2s2);\n }\n case \"A128KW\":\n case \"A192KW\":\n case \"A256KW\": {\n if (encryptedKey === void 0)\n throw new JWEInvalid(\"JWE Encrypted Key missing\");\n return unwrap(alg, key, encryptedKey);\n }\n case \"A128GCMKW\":\n case \"A192GCMKW\":\n case \"A256GCMKW\": {\n if (encryptedKey === void 0)\n throw new JWEInvalid(\"JWE Encrypted Key missing\");\n if (typeof joseHeader.iv !== \"string\")\n throw new JWEInvalid(`JOSE Header \"iv\" (Initialization Vector) missing or invalid`);\n if (typeof joseHeader.tag !== \"string\")\n throw new JWEInvalid(`JOSE Header \"tag\" (Authentication Tag) missing or invalid`);\n let iv;\n try {\n iv = decode(joseHeader.iv);\n } catch (_d) {\n throw new JWEInvalid(\"Failed to base64url decode the iv\");\n }\n let tag;\n try {\n tag = decode(joseHeader.tag);\n } catch (_e) {\n throw new JWEInvalid(\"Failed to base64url decode the tag\");\n }\n return unwrap2(alg, key, encryptedKey, iv, tag);\n }\n default: {\n throw new JOSENotSupported('Invalid or unsupported \"alg\" (JWE Algorithm) header value');\n }\n }\n }\n var decrypt_key_management_default;\n var init_decrypt_key_management = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/decrypt_key_management.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_aeskw();\n init_ecdhes();\n init_pbes2kw();\n init_rsaes();\n init_base64url();\n init_errors2();\n init_cek();\n init_import();\n init_check_key_type();\n init_is_object();\n init_aesgcmkw();\n decrypt_key_management_default = decryptKeyManagement;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/validate_crit.js\n function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) {\n if (joseHeader.crit !== void 0 && protectedHeader.crit === void 0) {\n throw new Err('\"crit\" (Critical) Header Parameter MUST be integrity protected');\n }\n if (!protectedHeader || protectedHeader.crit === void 0) {\n return /* @__PURE__ */ new Set();\n }\n if (!Array.isArray(protectedHeader.crit) || protectedHeader.crit.length === 0 || protectedHeader.crit.some((input) => typeof input !== \"string\" || input.length === 0)) {\n throw new Err('\"crit\" (Critical) Header Parameter MUST be an array of non-empty strings when present');\n }\n let recognized;\n if (recognizedOption !== void 0) {\n recognized = new Map([...Object.entries(recognizedOption), ...recognizedDefault.entries()]);\n } else {\n recognized = recognizedDefault;\n }\n for (const parameter of protectedHeader.crit) {\n if (!recognized.has(parameter)) {\n throw new JOSENotSupported(`Extension Header Parameter \"${parameter}\" is not recognized`);\n }\n if (joseHeader[parameter] === void 0) {\n throw new Err(`Extension Header Parameter \"${parameter}\" is missing`);\n } else if (recognized.get(parameter) && protectedHeader[parameter] === void 0) {\n throw new Err(`Extension Header Parameter \"${parameter}\" MUST be integrity protected`);\n }\n }\n return new Set(protectedHeader.crit);\n }\n var validate_crit_default;\n var init_validate_crit = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/validate_crit.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n validate_crit_default = validateCrit;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/validate_algorithms.js\n var validateAlgorithms, validate_algorithms_default;\n var init_validate_algorithms = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/validate_algorithms.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n validateAlgorithms = (option, algorithms) => {\n if (algorithms !== void 0 && (!Array.isArray(algorithms) || algorithms.some((s4) => typeof s4 !== \"string\"))) {\n throw new TypeError(`\"${option}\" option must be an array of strings`);\n }\n if (!algorithms) {\n return void 0;\n }\n return new Set(algorithms);\n };\n validate_algorithms_default = validateAlgorithms;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwe/flattened/decrypt.js\n async function flattenedDecrypt(jwe, key, options) {\n var _a;\n if (!isObject(jwe)) {\n throw new JWEInvalid(\"Flattened JWE must be an object\");\n }\n if (jwe.protected === void 0 && jwe.header === void 0 && jwe.unprotected === void 0) {\n throw new JWEInvalid(\"JOSE Header missing\");\n }\n if (typeof jwe.iv !== \"string\") {\n throw new JWEInvalid(\"JWE Initialization Vector missing or incorrect type\");\n }\n if (typeof jwe.ciphertext !== \"string\") {\n throw new JWEInvalid(\"JWE Ciphertext missing or incorrect type\");\n }\n if (typeof jwe.tag !== \"string\") {\n throw new JWEInvalid(\"JWE Authentication Tag missing or incorrect type\");\n }\n if (jwe.protected !== void 0 && typeof jwe.protected !== \"string\") {\n throw new JWEInvalid(\"JWE Protected Header incorrect type\");\n }\n if (jwe.encrypted_key !== void 0 && typeof jwe.encrypted_key !== \"string\") {\n throw new JWEInvalid(\"JWE Encrypted Key incorrect type\");\n }\n if (jwe.aad !== void 0 && typeof jwe.aad !== \"string\") {\n throw new JWEInvalid(\"JWE AAD incorrect type\");\n }\n if (jwe.header !== void 0 && !isObject(jwe.header)) {\n throw new JWEInvalid(\"JWE Shared Unprotected Header incorrect type\");\n }\n if (jwe.unprotected !== void 0 && !isObject(jwe.unprotected)) {\n throw new JWEInvalid(\"JWE Per-Recipient Unprotected Header incorrect type\");\n }\n let parsedProt;\n if (jwe.protected) {\n try {\n const protectedHeader2 = decode(jwe.protected);\n parsedProt = JSON.parse(decoder.decode(protectedHeader2));\n } catch (_b) {\n throw new JWEInvalid(\"JWE Protected Header is invalid\");\n }\n }\n if (!is_disjoint_default(parsedProt, jwe.header, jwe.unprotected)) {\n throw new JWEInvalid(\"JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint\");\n }\n const joseHeader = {\n ...parsedProt,\n ...jwe.header,\n ...jwe.unprotected\n };\n validate_crit_default(JWEInvalid, /* @__PURE__ */ new Map(), options === null || options === void 0 ? void 0 : options.crit, parsedProt, joseHeader);\n if (joseHeader.zip !== void 0) {\n if (!parsedProt || !parsedProt.zip) {\n throw new JWEInvalid('JWE \"zip\" (Compression Algorithm) Header MUST be integrity protected');\n }\n if (joseHeader.zip !== \"DEF\") {\n throw new JOSENotSupported('Unsupported JWE \"zip\" (Compression Algorithm) Header Parameter value');\n }\n }\n const { alg, enc } = joseHeader;\n if (typeof alg !== \"string\" || !alg) {\n throw new JWEInvalid(\"missing JWE Algorithm (alg) in JWE Header\");\n }\n if (typeof enc !== \"string\" || !enc) {\n throw new JWEInvalid(\"missing JWE Encryption Algorithm (enc) in JWE Header\");\n }\n const keyManagementAlgorithms = options && validate_algorithms_default(\"keyManagementAlgorithms\", options.keyManagementAlgorithms);\n const contentEncryptionAlgorithms = options && validate_algorithms_default(\"contentEncryptionAlgorithms\", options.contentEncryptionAlgorithms);\n if (keyManagementAlgorithms && !keyManagementAlgorithms.has(alg)) {\n throw new JOSEAlgNotAllowed('\"alg\" (Algorithm) Header Parameter not allowed');\n }\n if (contentEncryptionAlgorithms && !contentEncryptionAlgorithms.has(enc)) {\n throw new JOSEAlgNotAllowed('\"enc\" (Encryption Algorithm) Header Parameter not allowed');\n }\n let encryptedKey;\n if (jwe.encrypted_key !== void 0) {\n try {\n encryptedKey = decode(jwe.encrypted_key);\n } catch (_c) {\n throw new JWEInvalid(\"Failed to base64url decode the encrypted_key\");\n }\n }\n let resolvedKey = false;\n if (typeof key === \"function\") {\n key = await key(parsedProt, jwe);\n resolvedKey = true;\n }\n let cek;\n try {\n cek = await decrypt_key_management_default(alg, key, encryptedKey, joseHeader, options);\n } catch (err) {\n if (err instanceof TypeError || err instanceof JWEInvalid || err instanceof JOSENotSupported) {\n throw err;\n }\n cek = cek_default(enc);\n }\n let iv;\n let tag;\n try {\n iv = decode(jwe.iv);\n } catch (_d) {\n throw new JWEInvalid(\"Failed to base64url decode the iv\");\n }\n try {\n tag = decode(jwe.tag);\n } catch (_e) {\n throw new JWEInvalid(\"Failed to base64url decode the tag\");\n }\n const protectedHeader = encoder.encode((_a = jwe.protected) !== null && _a !== void 0 ? _a : \"\");\n let additionalData;\n if (jwe.aad !== void 0) {\n additionalData = concat(protectedHeader, encoder.encode(\".\"), encoder.encode(jwe.aad));\n } else {\n additionalData = protectedHeader;\n }\n let ciphertext;\n try {\n ciphertext = decode(jwe.ciphertext);\n } catch (_f) {\n throw new JWEInvalid(\"Failed to base64url decode the ciphertext\");\n }\n let plaintext = await decrypt_default(enc, cek, ciphertext, iv, tag, additionalData);\n if (joseHeader.zip === \"DEF\") {\n plaintext = await ((options === null || options === void 0 ? void 0 : options.inflateRaw) || inflate)(plaintext);\n }\n const result = { plaintext };\n if (jwe.protected !== void 0) {\n result.protectedHeader = parsedProt;\n }\n if (jwe.aad !== void 0) {\n try {\n result.additionalAuthenticatedData = decode(jwe.aad);\n } catch (_g) {\n throw new JWEInvalid(\"Failed to base64url decode the aad\");\n }\n }\n if (jwe.unprotected !== void 0) {\n result.sharedUnprotectedHeader = jwe.unprotected;\n }\n if (jwe.header !== void 0) {\n result.unprotectedHeader = jwe.header;\n }\n if (resolvedKey) {\n return { ...result, key };\n }\n return result;\n }\n var init_decrypt2 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwe/flattened/decrypt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base64url();\n init_decrypt();\n init_zlib();\n init_errors2();\n init_is_disjoint();\n init_is_object();\n init_decrypt_key_management();\n init_buffer_utils();\n init_cek();\n init_validate_crit();\n init_validate_algorithms();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwe/compact/decrypt.js\n async function compactDecrypt(jwe, key, options) {\n if (jwe instanceof Uint8Array) {\n jwe = decoder.decode(jwe);\n }\n if (typeof jwe !== \"string\") {\n throw new JWEInvalid(\"Compact JWE must be a string or Uint8Array\");\n }\n const { 0: protectedHeader, 1: encryptedKey, 2: iv, 3: ciphertext, 4: tag, length } = jwe.split(\".\");\n if (length !== 5) {\n throw new JWEInvalid(\"Invalid Compact JWE\");\n }\n const decrypted = await flattenedDecrypt({\n ciphertext,\n iv: iv || void 0,\n protected: protectedHeader || void 0,\n tag: tag || void 0,\n encrypted_key: encryptedKey || void 0\n }, key, options);\n const result = { plaintext: decrypted.plaintext, protectedHeader: decrypted.protectedHeader };\n if (typeof key === \"function\") {\n return { ...result, key: decrypted.key };\n }\n return result;\n }\n var init_decrypt3 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwe/compact/decrypt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_decrypt2();\n init_errors2();\n init_buffer_utils();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwe/general/decrypt.js\n async function generalDecrypt(jwe, key, options) {\n if (!isObject(jwe)) {\n throw new JWEInvalid(\"General JWE must be an object\");\n }\n if (!Array.isArray(jwe.recipients) || !jwe.recipients.every(isObject)) {\n throw new JWEInvalid(\"JWE Recipients missing or incorrect type\");\n }\n if (!jwe.recipients.length) {\n throw new JWEInvalid(\"JWE Recipients has no members\");\n }\n for (const recipient of jwe.recipients) {\n try {\n return await flattenedDecrypt({\n aad: jwe.aad,\n ciphertext: jwe.ciphertext,\n encrypted_key: recipient.encrypted_key,\n header: recipient.header,\n iv: jwe.iv,\n protected: jwe.protected,\n tag: jwe.tag,\n unprotected: jwe.unprotected\n }, key, options);\n } catch (_a) {\n }\n }\n throw new JWEDecryptionFailed();\n }\n var init_decrypt4 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwe/general/decrypt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_decrypt2();\n init_errors2();\n init_is_object();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/key_to_jwk.js\n var keyToJWK, key_to_jwk_default;\n var init_key_to_jwk = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/key_to_jwk.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_webcrypto();\n init_invalid_key_input();\n init_base64url();\n init_is_key_like();\n keyToJWK = async (key) => {\n if (key instanceof Uint8Array) {\n return {\n kty: \"oct\",\n k: encode(key)\n };\n }\n if (!isCryptoKey(key)) {\n throw new TypeError(invalid_key_input_default(key, ...types, \"Uint8Array\"));\n }\n if (!key.extractable) {\n throw new TypeError(\"non-extractable CryptoKey cannot be exported as a JWK\");\n }\n const { ext, key_ops, alg, use, ...jwk } = await webcrypto_default.subtle.exportKey(\"jwk\", key);\n return jwk;\n };\n key_to_jwk_default = keyToJWK;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/key/export.js\n async function exportSPKI(key) {\n return toSPKI(key);\n }\n async function exportPKCS8(key) {\n return toPKCS8(key);\n }\n async function exportJWK(key) {\n return key_to_jwk_default(key);\n }\n var init_export = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/key/export.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_asn1();\n init_asn1();\n init_key_to_jwk();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/encrypt_key_management.js\n async function encryptKeyManagement(alg, enc, key, providedCek, providedParameters = {}) {\n let encryptedKey;\n let parameters;\n let cek;\n check_key_type_default(alg, key, \"encrypt\");\n switch (alg) {\n case \"dir\": {\n cek = key;\n break;\n }\n case \"ECDH-ES\":\n case \"ECDH-ES+A128KW\":\n case \"ECDH-ES+A192KW\":\n case \"ECDH-ES+A256KW\": {\n if (!ecdhAllowed(key)) {\n throw new JOSENotSupported(\"ECDH with the provided key is not allowed or not supported by your javascript runtime\");\n }\n const { apu, apv } = providedParameters;\n let { epk: ephemeralKey } = providedParameters;\n ephemeralKey || (ephemeralKey = (await generateEpk(key)).privateKey);\n const { x: x4, y: y6, crv, kty } = await exportJWK(ephemeralKey);\n const sharedSecret = await deriveKey(key, ephemeralKey, alg === \"ECDH-ES\" ? enc : alg, alg === \"ECDH-ES\" ? bitLength2(enc) : parseInt(alg.slice(-5, -2), 10), apu, apv);\n parameters = { epk: { x: x4, crv, kty } };\n if (kty === \"EC\")\n parameters.epk.y = y6;\n if (apu)\n parameters.apu = encode(apu);\n if (apv)\n parameters.apv = encode(apv);\n if (alg === \"ECDH-ES\") {\n cek = sharedSecret;\n break;\n }\n cek = providedCek || cek_default(enc);\n const kwAlg = alg.slice(-6);\n encryptedKey = await wrap(kwAlg, sharedSecret, cek);\n break;\n }\n case \"RSA1_5\":\n case \"RSA-OAEP\":\n case \"RSA-OAEP-256\":\n case \"RSA-OAEP-384\":\n case \"RSA-OAEP-512\": {\n cek = providedCek || cek_default(enc);\n encryptedKey = await encrypt2(alg, key, cek);\n break;\n }\n case \"PBES2-HS256+A128KW\":\n case \"PBES2-HS384+A192KW\":\n case \"PBES2-HS512+A256KW\": {\n cek = providedCek || cek_default(enc);\n const { p2c, p2s: p2s2 } = providedParameters;\n ({ encryptedKey, ...parameters } = await encrypt(alg, key, cek, p2c, p2s2));\n break;\n }\n case \"A128KW\":\n case \"A192KW\":\n case \"A256KW\": {\n cek = providedCek || cek_default(enc);\n encryptedKey = await wrap(alg, key, cek);\n break;\n }\n case \"A128GCMKW\":\n case \"A192GCMKW\":\n case \"A256GCMKW\": {\n cek = providedCek || cek_default(enc);\n const { iv } = providedParameters;\n ({ encryptedKey, ...parameters } = await wrap2(alg, key, cek, iv));\n break;\n }\n default: {\n throw new JOSENotSupported('Invalid or unsupported \"alg\" (JWE Algorithm) header value');\n }\n }\n return { cek, encryptedKey, parameters };\n }\n var encrypt_key_management_default;\n var init_encrypt_key_management = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/encrypt_key_management.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_aeskw();\n init_ecdhes();\n init_pbes2kw();\n init_rsaes();\n init_base64url();\n init_cek();\n init_errors2();\n init_export();\n init_check_key_type();\n init_aesgcmkw();\n encrypt_key_management_default = encryptKeyManagement;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwe/flattened/encrypt.js\n var unprotected, FlattenedEncrypt;\n var init_encrypt2 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwe/flattened/encrypt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base64url();\n init_encrypt();\n init_zlib();\n init_iv();\n init_encrypt_key_management();\n init_errors2();\n init_is_disjoint();\n init_buffer_utils();\n init_validate_crit();\n unprotected = Symbol();\n FlattenedEncrypt = class {\n constructor(plaintext) {\n if (!(plaintext instanceof Uint8Array)) {\n throw new TypeError(\"plaintext must be an instance of Uint8Array\");\n }\n this._plaintext = plaintext;\n }\n setKeyManagementParameters(parameters) {\n if (this._keyManagementParameters) {\n throw new TypeError(\"setKeyManagementParameters can only be called once\");\n }\n this._keyManagementParameters = parameters;\n return this;\n }\n setProtectedHeader(protectedHeader) {\n if (this._protectedHeader) {\n throw new TypeError(\"setProtectedHeader can only be called once\");\n }\n this._protectedHeader = protectedHeader;\n return this;\n }\n setSharedUnprotectedHeader(sharedUnprotectedHeader) {\n if (this._sharedUnprotectedHeader) {\n throw new TypeError(\"setSharedUnprotectedHeader can only be called once\");\n }\n this._sharedUnprotectedHeader = sharedUnprotectedHeader;\n return this;\n }\n setUnprotectedHeader(unprotectedHeader) {\n if (this._unprotectedHeader) {\n throw new TypeError(\"setUnprotectedHeader can only be called once\");\n }\n this._unprotectedHeader = unprotectedHeader;\n return this;\n }\n setAdditionalAuthenticatedData(aad) {\n this._aad = aad;\n return this;\n }\n setContentEncryptionKey(cek) {\n if (this._cek) {\n throw new TypeError(\"setContentEncryptionKey can only be called once\");\n }\n this._cek = cek;\n return this;\n }\n setInitializationVector(iv) {\n if (this._iv) {\n throw new TypeError(\"setInitializationVector can only be called once\");\n }\n this._iv = iv;\n return this;\n }\n async encrypt(key, options) {\n if (!this._protectedHeader && !this._unprotectedHeader && !this._sharedUnprotectedHeader) {\n throw new JWEInvalid(\"either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()\");\n }\n if (!is_disjoint_default(this._protectedHeader, this._unprotectedHeader, this._sharedUnprotectedHeader)) {\n throw new JWEInvalid(\"JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint\");\n }\n const joseHeader = {\n ...this._protectedHeader,\n ...this._unprotectedHeader,\n ...this._sharedUnprotectedHeader\n };\n validate_crit_default(JWEInvalid, /* @__PURE__ */ new Map(), options === null || options === void 0 ? void 0 : options.crit, this._protectedHeader, joseHeader);\n if (joseHeader.zip !== void 0) {\n if (!this._protectedHeader || !this._protectedHeader.zip) {\n throw new JWEInvalid('JWE \"zip\" (Compression Algorithm) Header MUST be integrity protected');\n }\n if (joseHeader.zip !== \"DEF\") {\n throw new JOSENotSupported('Unsupported JWE \"zip\" (Compression Algorithm) Header Parameter value');\n }\n }\n const { alg, enc } = joseHeader;\n if (typeof alg !== \"string\" || !alg) {\n throw new JWEInvalid('JWE \"alg\" (Algorithm) Header Parameter missing or invalid');\n }\n if (typeof enc !== \"string\" || !enc) {\n throw new JWEInvalid('JWE \"enc\" (Encryption Algorithm) Header Parameter missing or invalid');\n }\n let encryptedKey;\n if (alg === \"dir\") {\n if (this._cek) {\n throw new TypeError(\"setContentEncryptionKey cannot be called when using Direct Encryption\");\n }\n } else if (alg === \"ECDH-ES\") {\n if (this._cek) {\n throw new TypeError(\"setContentEncryptionKey cannot be called when using Direct Key Agreement\");\n }\n }\n let cek;\n {\n let parameters;\n ({ cek, encryptedKey, parameters } = await encrypt_key_management_default(alg, enc, key, this._cek, this._keyManagementParameters));\n if (parameters) {\n if (options && unprotected in options) {\n if (!this._unprotectedHeader) {\n this.setUnprotectedHeader(parameters);\n } else {\n this._unprotectedHeader = { ...this._unprotectedHeader, ...parameters };\n }\n } else {\n if (!this._protectedHeader) {\n this.setProtectedHeader(parameters);\n } else {\n this._protectedHeader = { ...this._protectedHeader, ...parameters };\n }\n }\n }\n }\n this._iv || (this._iv = iv_default(enc));\n let additionalData;\n let protectedHeader;\n let aadMember;\n if (this._protectedHeader) {\n protectedHeader = encoder.encode(encode(JSON.stringify(this._protectedHeader)));\n } else {\n protectedHeader = encoder.encode(\"\");\n }\n if (this._aad) {\n aadMember = encode(this._aad);\n additionalData = concat(protectedHeader, encoder.encode(\".\"), encoder.encode(aadMember));\n } else {\n additionalData = protectedHeader;\n }\n let ciphertext;\n let tag;\n if (joseHeader.zip === \"DEF\") {\n const deflated = await ((options === null || options === void 0 ? void 0 : options.deflateRaw) || deflate)(this._plaintext);\n ({ ciphertext, tag } = await encrypt_default(enc, deflated, cek, this._iv, additionalData));\n } else {\n ;\n ({ ciphertext, tag } = await encrypt_default(enc, this._plaintext, cek, this._iv, additionalData));\n }\n const jwe = {\n ciphertext: encode(ciphertext),\n iv: encode(this._iv),\n tag: encode(tag)\n };\n if (encryptedKey) {\n jwe.encrypted_key = encode(encryptedKey);\n }\n if (aadMember) {\n jwe.aad = aadMember;\n }\n if (this._protectedHeader) {\n jwe.protected = decoder.decode(protectedHeader);\n }\n if (this._sharedUnprotectedHeader) {\n jwe.unprotected = this._sharedUnprotectedHeader;\n }\n if (this._unprotectedHeader) {\n jwe.header = this._unprotectedHeader;\n }\n return jwe;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwe/general/encrypt.js\n var IndividualRecipient, GeneralEncrypt;\n var init_encrypt3 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwe/general/encrypt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encrypt2();\n init_errors2();\n init_cek();\n init_is_disjoint();\n init_encrypt_key_management();\n init_base64url();\n init_validate_crit();\n IndividualRecipient = class {\n constructor(enc, key, options) {\n this.parent = enc;\n this.key = key;\n this.options = options;\n }\n setUnprotectedHeader(unprotectedHeader) {\n if (this.unprotectedHeader) {\n throw new TypeError(\"setUnprotectedHeader can only be called once\");\n }\n this.unprotectedHeader = unprotectedHeader;\n return this;\n }\n addRecipient(...args) {\n return this.parent.addRecipient(...args);\n }\n encrypt(...args) {\n return this.parent.encrypt(...args);\n }\n done() {\n return this.parent;\n }\n };\n GeneralEncrypt = class {\n constructor(plaintext) {\n this._recipients = [];\n this._plaintext = plaintext;\n }\n addRecipient(key, options) {\n const recipient = new IndividualRecipient(this, key, { crit: options === null || options === void 0 ? void 0 : options.crit });\n this._recipients.push(recipient);\n return recipient;\n }\n setProtectedHeader(protectedHeader) {\n if (this._protectedHeader) {\n throw new TypeError(\"setProtectedHeader can only be called once\");\n }\n this._protectedHeader = protectedHeader;\n return this;\n }\n setSharedUnprotectedHeader(sharedUnprotectedHeader) {\n if (this._unprotectedHeader) {\n throw new TypeError(\"setSharedUnprotectedHeader can only be called once\");\n }\n this._unprotectedHeader = sharedUnprotectedHeader;\n return this;\n }\n setAdditionalAuthenticatedData(aad) {\n this._aad = aad;\n return this;\n }\n async encrypt(options) {\n var _a, _b, _c;\n if (!this._recipients.length) {\n throw new JWEInvalid(\"at least one recipient must be added\");\n }\n options = { deflateRaw: options === null || options === void 0 ? void 0 : options.deflateRaw };\n if (this._recipients.length === 1) {\n const [recipient] = this._recipients;\n const flattened = await new FlattenedEncrypt(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(recipient.unprotectedHeader).encrypt(recipient.key, { ...recipient.options, ...options });\n let jwe2 = {\n ciphertext: flattened.ciphertext,\n iv: flattened.iv,\n recipients: [{}],\n tag: flattened.tag\n };\n if (flattened.aad)\n jwe2.aad = flattened.aad;\n if (flattened.protected)\n jwe2.protected = flattened.protected;\n if (flattened.unprotected)\n jwe2.unprotected = flattened.unprotected;\n if (flattened.encrypted_key)\n jwe2.recipients[0].encrypted_key = flattened.encrypted_key;\n if (flattened.header)\n jwe2.recipients[0].header = flattened.header;\n return jwe2;\n }\n let enc;\n for (let i3 = 0; i3 < this._recipients.length; i3++) {\n const recipient = this._recipients[i3];\n if (!is_disjoint_default(this._protectedHeader, this._unprotectedHeader, recipient.unprotectedHeader)) {\n throw new JWEInvalid(\"JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint\");\n }\n const joseHeader = {\n ...this._protectedHeader,\n ...this._unprotectedHeader,\n ...recipient.unprotectedHeader\n };\n const { alg } = joseHeader;\n if (typeof alg !== \"string\" || !alg) {\n throw new JWEInvalid('JWE \"alg\" (Algorithm) Header Parameter missing or invalid');\n }\n if (alg === \"dir\" || alg === \"ECDH-ES\") {\n throw new JWEInvalid('\"dir\" and \"ECDH-ES\" alg may only be used with a single recipient');\n }\n if (typeof joseHeader.enc !== \"string\" || !joseHeader.enc) {\n throw new JWEInvalid('JWE \"enc\" (Encryption Algorithm) Header Parameter missing or invalid');\n }\n if (!enc) {\n enc = joseHeader.enc;\n } else if (enc !== joseHeader.enc) {\n throw new JWEInvalid('JWE \"enc\" (Encryption Algorithm) Header Parameter must be the same for all recipients');\n }\n validate_crit_default(JWEInvalid, /* @__PURE__ */ new Map(), recipient.options.crit, this._protectedHeader, joseHeader);\n if (joseHeader.zip !== void 0) {\n if (!this._protectedHeader || !this._protectedHeader.zip) {\n throw new JWEInvalid('JWE \"zip\" (Compression Algorithm) Header MUST be integrity protected');\n }\n }\n }\n const cek = cek_default(enc);\n let jwe = {\n ciphertext: \"\",\n iv: \"\",\n recipients: [],\n tag: \"\"\n };\n for (let i3 = 0; i3 < this._recipients.length; i3++) {\n const recipient = this._recipients[i3];\n const target = {};\n jwe.recipients.push(target);\n const joseHeader = {\n ...this._protectedHeader,\n ...this._unprotectedHeader,\n ...recipient.unprotectedHeader\n };\n const p2c = joseHeader.alg.startsWith(\"PBES2\") ? 2048 + i3 : void 0;\n if (i3 === 0) {\n const flattened = await new FlattenedEncrypt(this._plaintext).setAdditionalAuthenticatedData(this._aad).setContentEncryptionKey(cek).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(recipient.unprotectedHeader).setKeyManagementParameters({ p2c }).encrypt(recipient.key, {\n ...recipient.options,\n ...options,\n [unprotected]: true\n });\n jwe.ciphertext = flattened.ciphertext;\n jwe.iv = flattened.iv;\n jwe.tag = flattened.tag;\n if (flattened.aad)\n jwe.aad = flattened.aad;\n if (flattened.protected)\n jwe.protected = flattened.protected;\n if (flattened.unprotected)\n jwe.unprotected = flattened.unprotected;\n target.encrypted_key = flattened.encrypted_key;\n if (flattened.header)\n target.header = flattened.header;\n continue;\n }\n const { encryptedKey, parameters } = await encrypt_key_management_default(((_a = recipient.unprotectedHeader) === null || _a === void 0 ? void 0 : _a.alg) || ((_b = this._protectedHeader) === null || _b === void 0 ? void 0 : _b.alg) || ((_c = this._unprotectedHeader) === null || _c === void 0 ? void 0 : _c.alg), enc, recipient.key, cek, { p2c });\n target.encrypted_key = encode(encryptedKey);\n if (recipient.unprotectedHeader || parameters)\n target.header = { ...recipient.unprotectedHeader, ...parameters };\n }\n return jwe;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/subtle_dsa.js\n function subtleDsa(alg, algorithm) {\n const hash3 = `SHA-${alg.slice(-3)}`;\n switch (alg) {\n case \"HS256\":\n case \"HS384\":\n case \"HS512\":\n return { hash: hash3, name: \"HMAC\" };\n case \"PS256\":\n case \"PS384\":\n case \"PS512\":\n return { hash: hash3, name: \"RSA-PSS\", saltLength: alg.slice(-3) >> 3 };\n case \"RS256\":\n case \"RS384\":\n case \"RS512\":\n return { hash: hash3, name: \"RSASSA-PKCS1-v1_5\" };\n case \"ES256\":\n case \"ES384\":\n case \"ES512\":\n return { hash: hash3, name: \"ECDSA\", namedCurve: algorithm.namedCurve };\n case \"EdDSA\":\n return { name: algorithm.name };\n default:\n throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);\n }\n }\n var init_subtle_dsa = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/subtle_dsa.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/get_sign_verify_key.js\n function getCryptoKey3(alg, key, usage) {\n if (isCryptoKey(key)) {\n checkSigCryptoKey(key, alg, usage);\n return key;\n }\n if (key instanceof Uint8Array) {\n if (!alg.startsWith(\"HS\")) {\n throw new TypeError(invalid_key_input_default(key, ...types));\n }\n return webcrypto_default.subtle.importKey(\"raw\", key, { hash: `SHA-${alg.slice(-3)}`, name: \"HMAC\" }, false, [usage]);\n }\n throw new TypeError(invalid_key_input_default(key, ...types, \"Uint8Array\"));\n }\n var init_get_sign_verify_key = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/get_sign_verify_key.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_webcrypto();\n init_crypto_key();\n init_invalid_key_input();\n init_is_key_like();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/verify.js\n var verify, verify_default;\n var init_verify = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/verify.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_subtle_dsa();\n init_webcrypto();\n init_check_key_length();\n init_get_sign_verify_key();\n verify = async (alg, key, signature, data) => {\n const cryptoKey = await getCryptoKey3(alg, key, \"verify\");\n check_key_length_default(alg, cryptoKey);\n const algorithm = subtleDsa(alg, cryptoKey.algorithm);\n try {\n return await webcrypto_default.subtle.verify(algorithm, cryptoKey, signature, data);\n } catch (_a) {\n return false;\n }\n };\n verify_default = verify;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jws/flattened/verify.js\n async function flattenedVerify(jws, key, options) {\n var _a;\n if (!isObject(jws)) {\n throw new JWSInvalid(\"Flattened JWS must be an object\");\n }\n if (jws.protected === void 0 && jws.header === void 0) {\n throw new JWSInvalid('Flattened JWS must have either of the \"protected\" or \"header\" members');\n }\n if (jws.protected !== void 0 && typeof jws.protected !== \"string\") {\n throw new JWSInvalid(\"JWS Protected Header incorrect type\");\n }\n if (jws.payload === void 0) {\n throw new JWSInvalid(\"JWS Payload missing\");\n }\n if (typeof jws.signature !== \"string\") {\n throw new JWSInvalid(\"JWS Signature missing or incorrect type\");\n }\n if (jws.header !== void 0 && !isObject(jws.header)) {\n throw new JWSInvalid(\"JWS Unprotected Header incorrect type\");\n }\n let parsedProt = {};\n if (jws.protected) {\n try {\n const protectedHeader = decode(jws.protected);\n parsedProt = JSON.parse(decoder.decode(protectedHeader));\n } catch (_b) {\n throw new JWSInvalid(\"JWS Protected Header is invalid\");\n }\n }\n if (!is_disjoint_default(parsedProt, jws.header)) {\n throw new JWSInvalid(\"JWS Protected and JWS Unprotected Header Parameter names must be disjoint\");\n }\n const joseHeader = {\n ...parsedProt,\n ...jws.header\n };\n const extensions = validate_crit_default(JWSInvalid, /* @__PURE__ */ new Map([[\"b64\", true]]), options === null || options === void 0 ? void 0 : options.crit, parsedProt, joseHeader);\n let b64 = true;\n if (extensions.has(\"b64\")) {\n b64 = parsedProt.b64;\n if (typeof b64 !== \"boolean\") {\n throw new JWSInvalid('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean');\n }\n }\n const { alg } = joseHeader;\n if (typeof alg !== \"string\" || !alg) {\n throw new JWSInvalid('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');\n }\n const algorithms = options && validate_algorithms_default(\"algorithms\", options.algorithms);\n if (algorithms && !algorithms.has(alg)) {\n throw new JOSEAlgNotAllowed('\"alg\" (Algorithm) Header Parameter not allowed');\n }\n if (b64) {\n if (typeof jws.payload !== \"string\") {\n throw new JWSInvalid(\"JWS Payload must be a string\");\n }\n } else if (typeof jws.payload !== \"string\" && !(jws.payload instanceof Uint8Array)) {\n throw new JWSInvalid(\"JWS Payload must be a string or an Uint8Array instance\");\n }\n let resolvedKey = false;\n if (typeof key === \"function\") {\n key = await key(parsedProt, jws);\n resolvedKey = true;\n }\n check_key_type_default(alg, key, \"verify\");\n const data = concat(encoder.encode((_a = jws.protected) !== null && _a !== void 0 ? _a : \"\"), encoder.encode(\".\"), typeof jws.payload === \"string\" ? encoder.encode(jws.payload) : jws.payload);\n let signature;\n try {\n signature = decode(jws.signature);\n } catch (_c) {\n throw new JWSInvalid(\"Failed to base64url decode the signature\");\n }\n const verified = await verify_default(alg, key, signature, data);\n if (!verified) {\n throw new JWSSignatureVerificationFailed();\n }\n let payload;\n if (b64) {\n try {\n payload = decode(jws.payload);\n } catch (_d) {\n throw new JWSInvalid(\"Failed to base64url decode the payload\");\n }\n } else if (typeof jws.payload === \"string\") {\n payload = encoder.encode(jws.payload);\n } else {\n payload = jws.payload;\n }\n const result = { payload };\n if (jws.protected !== void 0) {\n result.protectedHeader = parsedProt;\n }\n if (jws.header !== void 0) {\n result.unprotectedHeader = jws.header;\n }\n if (resolvedKey) {\n return { ...result, key };\n }\n return result;\n }\n var init_verify2 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jws/flattened/verify.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base64url();\n init_verify();\n init_errors2();\n init_buffer_utils();\n init_is_disjoint();\n init_is_object();\n init_check_key_type();\n init_validate_crit();\n init_validate_algorithms();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jws/compact/verify.js\n async function compactVerify(jws, key, options) {\n if (jws instanceof Uint8Array) {\n jws = decoder.decode(jws);\n }\n if (typeof jws !== \"string\") {\n throw new JWSInvalid(\"Compact JWS must be a string or Uint8Array\");\n }\n const { 0: protectedHeader, 1: payload, 2: signature, length } = jws.split(\".\");\n if (length !== 3) {\n throw new JWSInvalid(\"Invalid Compact JWS\");\n }\n const verified = await flattenedVerify({ payload, protected: protectedHeader, signature }, key, options);\n const result = { payload: verified.payload, protectedHeader: verified.protectedHeader };\n if (typeof key === \"function\") {\n return { ...result, key: verified.key };\n }\n return result;\n }\n var init_verify3 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jws/compact/verify.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_verify2();\n init_errors2();\n init_buffer_utils();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jws/general/verify.js\n async function generalVerify(jws, key, options) {\n if (!isObject(jws)) {\n throw new JWSInvalid(\"General JWS must be an object\");\n }\n if (!Array.isArray(jws.signatures) || !jws.signatures.every(isObject)) {\n throw new JWSInvalid(\"JWS Signatures missing or incorrect type\");\n }\n for (const signature of jws.signatures) {\n try {\n return await flattenedVerify({\n header: signature.header,\n payload: jws.payload,\n protected: signature.protected,\n signature: signature.signature\n }, key, options);\n } catch (_a) {\n }\n }\n throw new JWSSignatureVerificationFailed();\n }\n var init_verify4 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jws/general/verify.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_verify2();\n init_errors2();\n init_is_object();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/epoch.js\n var epoch_default;\n var init_epoch = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/epoch.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n epoch_default = (date) => Math.floor(date.getTime() / 1e3);\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/secs.js\n var minute, hour, day, week, year, REGEX, secs_default;\n var init_secs = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/secs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n minute = 60;\n hour = minute * 60;\n day = hour * 24;\n week = day * 7;\n year = day * 365.25;\n REGEX = /^(\\d+|\\d+\\.\\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i;\n secs_default = (str) => {\n const matched = REGEX.exec(str);\n if (!matched) {\n throw new TypeError(\"Invalid time period format\");\n }\n const value = parseFloat(matched[1]);\n const unit = matched[2].toLowerCase();\n switch (unit) {\n case \"sec\":\n case \"secs\":\n case \"second\":\n case \"seconds\":\n case \"s\":\n return Math.round(value);\n case \"minute\":\n case \"minutes\":\n case \"min\":\n case \"mins\":\n case \"m\":\n return Math.round(value * minute);\n case \"hour\":\n case \"hours\":\n case \"hr\":\n case \"hrs\":\n case \"h\":\n return Math.round(value * hour);\n case \"day\":\n case \"days\":\n case \"d\":\n return Math.round(value * day);\n case \"week\":\n case \"weeks\":\n case \"w\":\n return Math.round(value * week);\n default:\n return Math.round(value * year);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/jwt_claims_set.js\n var normalizeTyp, checkAudiencePresence, jwt_claims_set_default;\n var init_jwt_claims_set = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/lib/jwt_claims_set.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n init_buffer_utils();\n init_epoch();\n init_secs();\n init_is_object();\n normalizeTyp = (value) => value.toLowerCase().replace(/^application\\//, \"\");\n checkAudiencePresence = (audPayload, audOption) => {\n if (typeof audPayload === \"string\") {\n return audOption.includes(audPayload);\n }\n if (Array.isArray(audPayload)) {\n return audOption.some(Set.prototype.has.bind(new Set(audPayload)));\n }\n return false;\n };\n jwt_claims_set_default = (protectedHeader, encodedPayload, options = {}) => {\n const { typ } = options;\n if (typ && (typeof protectedHeader.typ !== \"string\" || normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ))) {\n throw new JWTClaimValidationFailed('unexpected \"typ\" JWT header value', \"typ\", \"check_failed\");\n }\n let payload;\n try {\n payload = JSON.parse(decoder.decode(encodedPayload));\n } catch (_a) {\n }\n if (!isObject(payload)) {\n throw new JWTInvalid(\"JWT Claims Set must be a top-level JSON object\");\n }\n const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options;\n if (maxTokenAge !== void 0)\n requiredClaims.push(\"iat\");\n if (audience !== void 0)\n requiredClaims.push(\"aud\");\n if (subject !== void 0)\n requiredClaims.push(\"sub\");\n if (issuer !== void 0)\n requiredClaims.push(\"iss\");\n for (const claim of new Set(requiredClaims.reverse())) {\n if (!(claim in payload)) {\n throw new JWTClaimValidationFailed(`missing required \"${claim}\" claim`, claim, \"missing\");\n }\n }\n if (issuer && !(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss)) {\n throw new JWTClaimValidationFailed('unexpected \"iss\" claim value', \"iss\", \"check_failed\");\n }\n if (subject && payload.sub !== subject) {\n throw new JWTClaimValidationFailed('unexpected \"sub\" claim value', \"sub\", \"check_failed\");\n }\n if (audience && !checkAudiencePresence(payload.aud, typeof audience === \"string\" ? [audience] : audience)) {\n throw new JWTClaimValidationFailed('unexpected \"aud\" claim value', \"aud\", \"check_failed\");\n }\n let tolerance;\n switch (typeof options.clockTolerance) {\n case \"string\":\n tolerance = secs_default(options.clockTolerance);\n break;\n case \"number\":\n tolerance = options.clockTolerance;\n break;\n case \"undefined\":\n tolerance = 0;\n break;\n default:\n throw new TypeError(\"Invalid clockTolerance option type\");\n }\n const { currentDate } = options;\n const now = epoch_default(currentDate || /* @__PURE__ */ new Date());\n if ((payload.iat !== void 0 || maxTokenAge) && typeof payload.iat !== \"number\") {\n throw new JWTClaimValidationFailed('\"iat\" claim must be a number', \"iat\", \"invalid\");\n }\n if (payload.nbf !== void 0) {\n if (typeof payload.nbf !== \"number\") {\n throw new JWTClaimValidationFailed('\"nbf\" claim must be a number', \"nbf\", \"invalid\");\n }\n if (payload.nbf > now + tolerance) {\n throw new JWTClaimValidationFailed('\"nbf\" claim timestamp check failed', \"nbf\", \"check_failed\");\n }\n }\n if (payload.exp !== void 0) {\n if (typeof payload.exp !== \"number\") {\n throw new JWTClaimValidationFailed('\"exp\" claim must be a number', \"exp\", \"invalid\");\n }\n if (payload.exp <= now - tolerance) {\n throw new JWTExpired('\"exp\" claim timestamp check failed', \"exp\", \"check_failed\");\n }\n }\n if (maxTokenAge) {\n const age = now - payload.iat;\n const max = typeof maxTokenAge === \"number\" ? maxTokenAge : secs_default(maxTokenAge);\n if (age - tolerance > max) {\n throw new JWTExpired('\"iat\" claim timestamp check failed (too far in the past)', \"iat\", \"check_failed\");\n }\n if (age < 0 - tolerance) {\n throw new JWTClaimValidationFailed('\"iat\" claim timestamp check failed (it should be in the past)', \"iat\", \"check_failed\");\n }\n }\n return payload;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwt/verify.js\n async function jwtVerify(jwt, key, options) {\n var _a;\n const verified = await compactVerify(jwt, key, options);\n if (((_a = verified.protectedHeader.crit) === null || _a === void 0 ? void 0 : _a.includes(\"b64\")) && verified.protectedHeader.b64 === false) {\n throw new JWTInvalid(\"JWTs MUST NOT use unencoded payload\");\n }\n const payload = jwt_claims_set_default(verified.protectedHeader, verified.payload, options);\n const result = { payload, protectedHeader: verified.protectedHeader };\n if (typeof key === \"function\") {\n return { ...result, key: verified.key };\n }\n return result;\n }\n var init_verify5 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwt/verify.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_verify3();\n init_jwt_claims_set();\n init_errors2();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwt/decrypt.js\n async function jwtDecrypt(jwt, key, options) {\n const decrypted = await compactDecrypt(jwt, key, options);\n const payload = jwt_claims_set_default(decrypted.protectedHeader, decrypted.plaintext, options);\n const { protectedHeader } = decrypted;\n if (protectedHeader.iss !== void 0 && protectedHeader.iss !== payload.iss) {\n throw new JWTClaimValidationFailed('replicated \"iss\" claim header parameter mismatch', \"iss\", \"mismatch\");\n }\n if (protectedHeader.sub !== void 0 && protectedHeader.sub !== payload.sub) {\n throw new JWTClaimValidationFailed('replicated \"sub\" claim header parameter mismatch', \"sub\", \"mismatch\");\n }\n if (protectedHeader.aud !== void 0 && JSON.stringify(protectedHeader.aud) !== JSON.stringify(payload.aud)) {\n throw new JWTClaimValidationFailed('replicated \"aud\" claim header parameter mismatch', \"aud\", \"mismatch\");\n }\n const result = { payload, protectedHeader };\n if (typeof key === \"function\") {\n return { ...result, key: decrypted.key };\n }\n return result;\n }\n var init_decrypt5 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwt/decrypt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_decrypt3();\n init_jwt_claims_set();\n init_errors2();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwe/compact/encrypt.js\n var CompactEncrypt;\n var init_encrypt4 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwe/compact/encrypt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encrypt2();\n CompactEncrypt = class {\n constructor(plaintext) {\n this._flattened = new FlattenedEncrypt(plaintext);\n }\n setContentEncryptionKey(cek) {\n this._flattened.setContentEncryptionKey(cek);\n return this;\n }\n setInitializationVector(iv) {\n this._flattened.setInitializationVector(iv);\n return this;\n }\n setProtectedHeader(protectedHeader) {\n this._flattened.setProtectedHeader(protectedHeader);\n return this;\n }\n setKeyManagementParameters(parameters) {\n this._flattened.setKeyManagementParameters(parameters);\n return this;\n }\n async encrypt(key, options) {\n const jwe = await this._flattened.encrypt(key, options);\n return [jwe.protected, jwe.encrypted_key, jwe.iv, jwe.ciphertext, jwe.tag].join(\".\");\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/sign.js\n var sign, sign_default;\n var init_sign = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/sign.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_subtle_dsa();\n init_webcrypto();\n init_check_key_length();\n init_get_sign_verify_key();\n sign = async (alg, key, data) => {\n const cryptoKey = await getCryptoKey3(alg, key, \"sign\");\n check_key_length_default(alg, cryptoKey);\n const signature = await webcrypto_default.subtle.sign(subtleDsa(alg, cryptoKey.algorithm), cryptoKey, data);\n return new Uint8Array(signature);\n };\n sign_default = sign;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jws/flattened/sign.js\n var FlattenedSign;\n var init_sign2 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jws/flattened/sign.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base64url();\n init_sign();\n init_is_disjoint();\n init_errors2();\n init_buffer_utils();\n init_check_key_type();\n init_validate_crit();\n FlattenedSign = class {\n constructor(payload) {\n if (!(payload instanceof Uint8Array)) {\n throw new TypeError(\"payload must be an instance of Uint8Array\");\n }\n this._payload = payload;\n }\n setProtectedHeader(protectedHeader) {\n if (this._protectedHeader) {\n throw new TypeError(\"setProtectedHeader can only be called once\");\n }\n this._protectedHeader = protectedHeader;\n return this;\n }\n setUnprotectedHeader(unprotectedHeader) {\n if (this._unprotectedHeader) {\n throw new TypeError(\"setUnprotectedHeader can only be called once\");\n }\n this._unprotectedHeader = unprotectedHeader;\n return this;\n }\n async sign(key, options) {\n if (!this._protectedHeader && !this._unprotectedHeader) {\n throw new JWSInvalid(\"either setProtectedHeader or setUnprotectedHeader must be called before #sign()\");\n }\n if (!is_disjoint_default(this._protectedHeader, this._unprotectedHeader)) {\n throw new JWSInvalid(\"JWS Protected and JWS Unprotected Header Parameter names must be disjoint\");\n }\n const joseHeader = {\n ...this._protectedHeader,\n ...this._unprotectedHeader\n };\n const extensions = validate_crit_default(JWSInvalid, /* @__PURE__ */ new Map([[\"b64\", true]]), options === null || options === void 0 ? void 0 : options.crit, this._protectedHeader, joseHeader);\n let b64 = true;\n if (extensions.has(\"b64\")) {\n b64 = this._protectedHeader.b64;\n if (typeof b64 !== \"boolean\") {\n throw new JWSInvalid('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean');\n }\n }\n const { alg } = joseHeader;\n if (typeof alg !== \"string\" || !alg) {\n throw new JWSInvalid('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');\n }\n check_key_type_default(alg, key, \"sign\");\n let payload = this._payload;\n if (b64) {\n payload = encoder.encode(encode(payload));\n }\n let protectedHeader;\n if (this._protectedHeader) {\n protectedHeader = encoder.encode(encode(JSON.stringify(this._protectedHeader)));\n } else {\n protectedHeader = encoder.encode(\"\");\n }\n const data = concat(protectedHeader, encoder.encode(\".\"), payload);\n const signature = await sign_default(alg, key, data);\n const jws = {\n signature: encode(signature),\n payload: \"\"\n };\n if (b64) {\n jws.payload = decoder.decode(payload);\n }\n if (this._unprotectedHeader) {\n jws.header = this._unprotectedHeader;\n }\n if (this._protectedHeader) {\n jws.protected = decoder.decode(protectedHeader);\n }\n return jws;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jws/compact/sign.js\n var CompactSign;\n var init_sign3 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jws/compact/sign.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sign2();\n CompactSign = class {\n constructor(payload) {\n this._flattened = new FlattenedSign(payload);\n }\n setProtectedHeader(protectedHeader) {\n this._flattened.setProtectedHeader(protectedHeader);\n return this;\n }\n async sign(key, options) {\n const jws = await this._flattened.sign(key, options);\n if (jws.payload === void 0) {\n throw new TypeError(\"use the flattened module for creating JWS with b64: false\");\n }\n return `${jws.protected}.${jws.payload}.${jws.signature}`;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jws/general/sign.js\n var IndividualSignature, GeneralSign;\n var init_sign4 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jws/general/sign.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sign2();\n init_errors2();\n IndividualSignature = class {\n constructor(sig, key, options) {\n this.parent = sig;\n this.key = key;\n this.options = options;\n }\n setProtectedHeader(protectedHeader) {\n if (this.protectedHeader) {\n throw new TypeError(\"setProtectedHeader can only be called once\");\n }\n this.protectedHeader = protectedHeader;\n return this;\n }\n setUnprotectedHeader(unprotectedHeader) {\n if (this.unprotectedHeader) {\n throw new TypeError(\"setUnprotectedHeader can only be called once\");\n }\n this.unprotectedHeader = unprotectedHeader;\n return this;\n }\n addSignature(...args) {\n return this.parent.addSignature(...args);\n }\n sign(...args) {\n return this.parent.sign(...args);\n }\n done() {\n return this.parent;\n }\n };\n GeneralSign = class {\n constructor(payload) {\n this._signatures = [];\n this._payload = payload;\n }\n addSignature(key, options) {\n const signature = new IndividualSignature(this, key, options);\n this._signatures.push(signature);\n return signature;\n }\n async sign() {\n if (!this._signatures.length) {\n throw new JWSInvalid(\"at least one signature must be added\");\n }\n const jws = {\n signatures: [],\n payload: \"\"\n };\n for (let i3 = 0; i3 < this._signatures.length; i3++) {\n const signature = this._signatures[i3];\n const flattened = new FlattenedSign(this._payload);\n flattened.setProtectedHeader(signature.protectedHeader);\n flattened.setUnprotectedHeader(signature.unprotectedHeader);\n const { payload, ...rest } = await flattened.sign(signature.key, signature.options);\n if (i3 === 0) {\n jws.payload = payload;\n } else if (jws.payload !== payload) {\n throw new JWSInvalid(\"inconsistent use of JWS Unencoded Payload (RFC7797)\");\n }\n jws.signatures.push(rest);\n }\n return jws;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwt/produce.js\n var ProduceJWT;\n var init_produce = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwt/produce.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_epoch();\n init_is_object();\n init_secs();\n ProduceJWT = class {\n constructor(payload) {\n if (!isObject(payload)) {\n throw new TypeError(\"JWT Claims Set MUST be an object\");\n }\n this._payload = payload;\n }\n setIssuer(issuer) {\n this._payload = { ...this._payload, iss: issuer };\n return this;\n }\n setSubject(subject) {\n this._payload = { ...this._payload, sub: subject };\n return this;\n }\n setAudience(audience) {\n this._payload = { ...this._payload, aud: audience };\n return this;\n }\n setJti(jwtId) {\n this._payload = { ...this._payload, jti: jwtId };\n return this;\n }\n setNotBefore(input) {\n if (typeof input === \"number\") {\n this._payload = { ...this._payload, nbf: input };\n } else {\n this._payload = { ...this._payload, nbf: epoch_default(/* @__PURE__ */ new Date()) + secs_default(input) };\n }\n return this;\n }\n setExpirationTime(input) {\n if (typeof input === \"number\") {\n this._payload = { ...this._payload, exp: input };\n } else {\n this._payload = { ...this._payload, exp: epoch_default(/* @__PURE__ */ new Date()) + secs_default(input) };\n }\n return this;\n }\n setIssuedAt(input) {\n if (typeof input === \"undefined\") {\n this._payload = { ...this._payload, iat: epoch_default(/* @__PURE__ */ new Date()) };\n } else {\n this._payload = { ...this._payload, iat: input };\n }\n return this;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwt/sign.js\n var SignJWT;\n var init_sign5 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwt/sign.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sign3();\n init_errors2();\n init_buffer_utils();\n init_produce();\n SignJWT = class extends ProduceJWT {\n setProtectedHeader(protectedHeader) {\n this._protectedHeader = protectedHeader;\n return this;\n }\n async sign(key, options) {\n var _a;\n const sig = new CompactSign(encoder.encode(JSON.stringify(this._payload)));\n sig.setProtectedHeader(this._protectedHeader);\n if (Array.isArray((_a = this._protectedHeader) === null || _a === void 0 ? void 0 : _a.crit) && this._protectedHeader.crit.includes(\"b64\") && this._protectedHeader.b64 === false) {\n throw new JWTInvalid(\"JWTs MUST NOT use unencoded payload\");\n }\n return sig.sign(key, options);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwt/encrypt.js\n var EncryptJWT;\n var init_encrypt5 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwt/encrypt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encrypt4();\n init_buffer_utils();\n init_produce();\n EncryptJWT = class extends ProduceJWT {\n setProtectedHeader(protectedHeader) {\n if (this._protectedHeader) {\n throw new TypeError(\"setProtectedHeader can only be called once\");\n }\n this._protectedHeader = protectedHeader;\n return this;\n }\n setKeyManagementParameters(parameters) {\n if (this._keyManagementParameters) {\n throw new TypeError(\"setKeyManagementParameters can only be called once\");\n }\n this._keyManagementParameters = parameters;\n return this;\n }\n setContentEncryptionKey(cek) {\n if (this._cek) {\n throw new TypeError(\"setContentEncryptionKey can only be called once\");\n }\n this._cek = cek;\n return this;\n }\n setInitializationVector(iv) {\n if (this._iv) {\n throw new TypeError(\"setInitializationVector can only be called once\");\n }\n this._iv = iv;\n return this;\n }\n replicateIssuerAsHeader() {\n this._replicateIssuerAsHeader = true;\n return this;\n }\n replicateSubjectAsHeader() {\n this._replicateSubjectAsHeader = true;\n return this;\n }\n replicateAudienceAsHeader() {\n this._replicateAudienceAsHeader = true;\n return this;\n }\n async encrypt(key, options) {\n const enc = new CompactEncrypt(encoder.encode(JSON.stringify(this._payload)));\n if (this._replicateIssuerAsHeader) {\n this._protectedHeader = { ...this._protectedHeader, iss: this._payload.iss };\n }\n if (this._replicateSubjectAsHeader) {\n this._protectedHeader = { ...this._protectedHeader, sub: this._payload.sub };\n }\n if (this._replicateAudienceAsHeader) {\n this._protectedHeader = { ...this._protectedHeader, aud: this._payload.aud };\n }\n enc.setProtectedHeader(this._protectedHeader);\n if (this._iv) {\n enc.setInitializationVector(this._iv);\n }\n if (this._cek) {\n enc.setContentEncryptionKey(this._cek);\n }\n if (this._keyManagementParameters) {\n enc.setKeyManagementParameters(this._keyManagementParameters);\n }\n return enc.encrypt(key, options);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwk/thumbprint.js\n async function calculateJwkThumbprint(jwk, digestAlgorithm) {\n if (!isObject(jwk)) {\n throw new TypeError(\"JWK must be an object\");\n }\n digestAlgorithm !== null && digestAlgorithm !== void 0 ? digestAlgorithm : digestAlgorithm = \"sha256\";\n if (digestAlgorithm !== \"sha256\" && digestAlgorithm !== \"sha384\" && digestAlgorithm !== \"sha512\") {\n throw new TypeError('digestAlgorithm must one of \"sha256\", \"sha384\", or \"sha512\"');\n }\n let components;\n switch (jwk.kty) {\n case \"EC\":\n check(jwk.crv, '\"crv\" (Curve) Parameter');\n check(jwk.x, '\"x\" (X Coordinate) Parameter');\n check(jwk.y, '\"y\" (Y Coordinate) Parameter');\n components = { crv: jwk.crv, kty: jwk.kty, x: jwk.x, y: jwk.y };\n break;\n case \"OKP\":\n check(jwk.crv, '\"crv\" (Subtype of Key Pair) Parameter');\n check(jwk.x, '\"x\" (Public Key) Parameter');\n components = { crv: jwk.crv, kty: jwk.kty, x: jwk.x };\n break;\n case \"RSA\":\n check(jwk.e, '\"e\" (Exponent) Parameter');\n check(jwk.n, '\"n\" (Modulus) Parameter');\n components = { e: jwk.e, kty: jwk.kty, n: jwk.n };\n break;\n case \"oct\":\n check(jwk.k, '\"k\" (Key Value) Parameter');\n components = { k: jwk.k, kty: jwk.kty };\n break;\n default:\n throw new JOSENotSupported('\"kty\" (Key Type) Parameter missing or unsupported');\n }\n const data = encoder.encode(JSON.stringify(components));\n return encode(await digest_default(digestAlgorithm, data));\n }\n async function calculateJwkThumbprintUri(jwk, digestAlgorithm) {\n digestAlgorithm !== null && digestAlgorithm !== void 0 ? digestAlgorithm : digestAlgorithm = \"sha256\";\n const thumbprint = await calculateJwkThumbprint(jwk, digestAlgorithm);\n return `urn:ietf:params:oauth:jwk-thumbprint:sha-${digestAlgorithm.slice(-3)}:${thumbprint}`;\n }\n var check;\n var init_thumbprint = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwk/thumbprint.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_digest();\n init_base64url();\n init_errors2();\n init_buffer_utils();\n init_is_object();\n check = (value, description) => {\n if (typeof value !== \"string\" || !value) {\n throw new JWKInvalid(`${description} missing or invalid`);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwk/embedded.js\n async function EmbeddedJWK(protectedHeader, token) {\n const joseHeader = {\n ...protectedHeader,\n ...token === null || token === void 0 ? void 0 : token.header\n };\n if (!isObject(joseHeader.jwk)) {\n throw new JWSInvalid('\"jwk\" (JSON Web Key) Header Parameter must be a JSON object');\n }\n const key = await importJWK({ ...joseHeader.jwk, ext: true }, joseHeader.alg, true);\n if (key instanceof Uint8Array || key.type !== \"public\") {\n throw new JWSInvalid('\"jwk\" (JSON Web Key) Header Parameter must be a public key');\n }\n return key;\n }\n var init_embedded = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwk/embedded.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_import();\n init_is_object();\n init_errors2();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwks/local.js\n function getKtyFromAlg(alg) {\n switch (typeof alg === \"string\" && alg.slice(0, 2)) {\n case \"RS\":\n case \"PS\":\n return \"RSA\";\n case \"ES\":\n return \"EC\";\n case \"Ed\":\n return \"OKP\";\n default:\n throw new JOSENotSupported('Unsupported \"alg\" value for a JSON Web Key Set');\n }\n }\n function isJWKSLike(jwks) {\n return jwks && typeof jwks === \"object\" && Array.isArray(jwks.keys) && jwks.keys.every(isJWKLike);\n }\n function isJWKLike(key) {\n return isObject(key);\n }\n function clone(obj) {\n if (typeof structuredClone === \"function\") {\n return structuredClone(obj);\n }\n return JSON.parse(JSON.stringify(obj));\n }\n async function importWithAlgCache(cache, jwk, alg) {\n const cached = cache.get(jwk) || cache.set(jwk, {}).get(jwk);\n if (cached[alg] === void 0) {\n const key = await importJWK({ ...jwk, ext: true }, alg);\n if (key instanceof Uint8Array || key.type !== \"public\") {\n throw new JWKSInvalid(\"JSON Web Key Set members must be public keys\");\n }\n cached[alg] = key;\n }\n return cached[alg];\n }\n function createLocalJWKSet(jwks) {\n const set = new LocalJWKSet(jwks);\n return async function(protectedHeader, token) {\n return set.getKey(protectedHeader, token);\n };\n }\n var LocalJWKSet;\n var init_local = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwks/local.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_import();\n init_errors2();\n init_is_object();\n LocalJWKSet = class {\n constructor(jwks) {\n this._cached = /* @__PURE__ */ new WeakMap();\n if (!isJWKSLike(jwks)) {\n throw new JWKSInvalid(\"JSON Web Key Set malformed\");\n }\n this._jwks = clone(jwks);\n }\n async getKey(protectedHeader, token) {\n const { alg, kid } = { ...protectedHeader, ...token === null || token === void 0 ? void 0 : token.header };\n const kty = getKtyFromAlg(alg);\n const candidates = this._jwks.keys.filter((jwk2) => {\n let candidate = kty === jwk2.kty;\n if (candidate && typeof kid === \"string\") {\n candidate = kid === jwk2.kid;\n }\n if (candidate && typeof jwk2.alg === \"string\") {\n candidate = alg === jwk2.alg;\n }\n if (candidate && typeof jwk2.use === \"string\") {\n candidate = jwk2.use === \"sig\";\n }\n if (candidate && Array.isArray(jwk2.key_ops)) {\n candidate = jwk2.key_ops.includes(\"verify\");\n }\n if (candidate && alg === \"EdDSA\") {\n candidate = jwk2.crv === \"Ed25519\" || jwk2.crv === \"Ed448\";\n }\n if (candidate) {\n switch (alg) {\n case \"ES256\":\n candidate = jwk2.crv === \"P-256\";\n break;\n case \"ES256K\":\n candidate = jwk2.crv === \"secp256k1\";\n break;\n case \"ES384\":\n candidate = jwk2.crv === \"P-384\";\n break;\n case \"ES512\":\n candidate = jwk2.crv === \"P-521\";\n break;\n }\n }\n return candidate;\n });\n const { 0: jwk, length } = candidates;\n if (length === 0) {\n throw new JWKSNoMatchingKey();\n } else if (length !== 1) {\n const error = new JWKSMultipleMatchingKeys();\n const { _cached } = this;\n error[Symbol.asyncIterator] = async function* () {\n for (const jwk2 of candidates) {\n try {\n yield await importWithAlgCache(_cached, jwk2, alg);\n } catch (_a) {\n continue;\n }\n }\n };\n throw error;\n }\n return importWithAlgCache(this._cached, jwk, alg);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/fetch_jwks.js\n var fetchJwks, fetch_jwks_default;\n var init_fetch_jwks = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/fetch_jwks.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors2();\n fetchJwks = async (url, timeout, options) => {\n let controller;\n let id;\n let timedOut = false;\n if (typeof AbortController === \"function\") {\n controller = new AbortController();\n id = setTimeout(() => {\n timedOut = true;\n controller.abort();\n }, timeout);\n }\n const response = await fetch(url.href, {\n signal: controller ? controller.signal : void 0,\n redirect: \"manual\",\n headers: options.headers\n }).catch((err) => {\n if (timedOut)\n throw new JWKSTimeout();\n throw err;\n });\n if (id !== void 0)\n clearTimeout(id);\n if (response.status !== 200) {\n throw new JOSEError(\"Expected 200 OK from the JSON Web Key Set HTTP response\");\n }\n try {\n return await response.json();\n } catch (_a) {\n throw new JOSEError(\"Failed to parse the JSON Web Key Set HTTP response as JSON\");\n }\n };\n fetch_jwks_default = fetchJwks;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwks/remote.js\n function isCloudflareWorkers() {\n return typeof WebSocketPair !== \"undefined\" || typeof navigator !== \"undefined\" && navigator.userAgent === \"Cloudflare-Workers\" || typeof EdgeRuntime !== \"undefined\" && EdgeRuntime === \"vercel\";\n }\n function createRemoteJWKSet(url, options) {\n const set = new RemoteJWKSet(url, options);\n return async function(protectedHeader, token) {\n return set.getKey(protectedHeader, token);\n };\n }\n var RemoteJWKSet;\n var init_remote = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwks/remote.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fetch_jwks();\n init_errors2();\n init_local();\n RemoteJWKSet = class extends LocalJWKSet {\n constructor(url, options) {\n super({ keys: [] });\n this._jwks = void 0;\n if (!(url instanceof URL)) {\n throw new TypeError(\"url must be an instance of URL\");\n }\n this._url = new URL(url.href);\n this._options = { agent: options === null || options === void 0 ? void 0 : options.agent, headers: options === null || options === void 0 ? void 0 : options.headers };\n this._timeoutDuration = typeof (options === null || options === void 0 ? void 0 : options.timeoutDuration) === \"number\" ? options === null || options === void 0 ? void 0 : options.timeoutDuration : 5e3;\n this._cooldownDuration = typeof (options === null || options === void 0 ? void 0 : options.cooldownDuration) === \"number\" ? options === null || options === void 0 ? void 0 : options.cooldownDuration : 3e4;\n this._cacheMaxAge = typeof (options === null || options === void 0 ? void 0 : options.cacheMaxAge) === \"number\" ? options === null || options === void 0 ? void 0 : options.cacheMaxAge : 6e5;\n }\n coolingDown() {\n return typeof this._jwksTimestamp === \"number\" ? Date.now() < this._jwksTimestamp + this._cooldownDuration : false;\n }\n fresh() {\n return typeof this._jwksTimestamp === \"number\" ? Date.now() < this._jwksTimestamp + this._cacheMaxAge : false;\n }\n async getKey(protectedHeader, token) {\n if (!this._jwks || !this.fresh()) {\n await this.reload();\n }\n try {\n return await super.getKey(protectedHeader, token);\n } catch (err) {\n if (err instanceof JWKSNoMatchingKey) {\n if (this.coolingDown() === false) {\n await this.reload();\n return super.getKey(protectedHeader, token);\n }\n }\n throw err;\n }\n }\n async reload() {\n if (this._pendingFetch && isCloudflareWorkers()) {\n this._pendingFetch = void 0;\n }\n this._pendingFetch || (this._pendingFetch = fetch_jwks_default(this._url, this._timeoutDuration, this._options).then((json) => {\n if (!isJWKSLike(json)) {\n throw new JWKSInvalid(\"JSON Web Key Set malformed\");\n }\n this._jwks = { keys: json.keys };\n this._jwksTimestamp = Date.now();\n this._pendingFetch = void 0;\n }).catch((err) => {\n this._pendingFetch = void 0;\n throw err;\n }));\n await this._pendingFetch;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwt/unsecured.js\n var UnsecuredJWT;\n var init_unsecured = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/jwt/unsecured.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base64url();\n init_buffer_utils();\n init_errors2();\n init_jwt_claims_set();\n init_produce();\n UnsecuredJWT = class extends ProduceJWT {\n encode() {\n const header = encode(JSON.stringify({ alg: \"none\" }));\n const payload = encode(JSON.stringify(this._payload));\n return `${header}.${payload}.`;\n }\n static decode(jwt, options) {\n if (typeof jwt !== \"string\") {\n throw new JWTInvalid(\"Unsecured JWT must be a string\");\n }\n const { 0: encodedHeader, 1: encodedPayload, 2: signature, length } = jwt.split(\".\");\n if (length !== 3 || signature !== \"\") {\n throw new JWTInvalid(\"Invalid Unsecured JWT\");\n }\n let header;\n try {\n header = JSON.parse(decoder.decode(decode(encodedHeader)));\n if (header.alg !== \"none\")\n throw new Error();\n } catch (_a) {\n throw new JWTInvalid(\"Invalid Unsecured JWT\");\n }\n const payload = jwt_claims_set_default(header, decode(encodedPayload), options);\n return { payload, header };\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/util/base64url.js\n var base64url_exports2 = {};\n __export(base64url_exports2, {\n decode: () => decode2,\n encode: () => encode2\n });\n var encode2, decode2;\n var init_base64url2 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/util/base64url.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base64url();\n encode2 = encode;\n decode2 = decode;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/util/decode_protected_header.js\n function decodeProtectedHeader(token) {\n let protectedB64u;\n if (typeof token === \"string\") {\n const parts = token.split(\".\");\n if (parts.length === 3 || parts.length === 5) {\n ;\n [protectedB64u] = parts;\n }\n } else if (typeof token === \"object\" && token) {\n if (\"protected\" in token) {\n protectedB64u = token.protected;\n } else {\n throw new TypeError(\"Token does not contain a Protected Header\");\n }\n }\n try {\n if (typeof protectedB64u !== \"string\" || !protectedB64u) {\n throw new Error();\n }\n const result = JSON.parse(decoder.decode(decode2(protectedB64u)));\n if (!isObject(result)) {\n throw new Error();\n }\n return result;\n } catch (_a) {\n throw new TypeError(\"Invalid Token or Protected Header formatting\");\n }\n }\n var init_decode_protected_header = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/util/decode_protected_header.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base64url2();\n init_buffer_utils();\n init_is_object();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/util/decode_jwt.js\n function decodeJwt(jwt) {\n if (typeof jwt !== \"string\")\n throw new JWTInvalid(\"JWTs must use Compact JWS serialization, JWT must be a string\");\n const { 1: payload, length } = jwt.split(\".\");\n if (length === 5)\n throw new JWTInvalid(\"Only JWTs using Compact JWS serialization can be decoded\");\n if (length !== 3)\n throw new JWTInvalid(\"Invalid JWT\");\n if (!payload)\n throw new JWTInvalid(\"JWTs must contain a payload\");\n let decoded;\n try {\n decoded = decode2(payload);\n } catch (_a) {\n throw new JWTInvalid(\"Failed to base64url decode the payload\");\n }\n let result;\n try {\n result = JSON.parse(decoder.decode(decoded));\n } catch (_b) {\n throw new JWTInvalid(\"Failed to parse the decoded payload as JSON\");\n }\n if (!isObject(result))\n throw new JWTInvalid(\"Invalid JWT Claims Set\");\n return result;\n }\n var init_decode_jwt = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/util/decode_jwt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base64url2();\n init_buffer_utils();\n init_is_object();\n init_errors2();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/generate.js\n async function generateSecret(alg, options) {\n var _a;\n let length;\n let algorithm;\n let keyUsages;\n switch (alg) {\n case \"HS256\":\n case \"HS384\":\n case \"HS512\":\n length = parseInt(alg.slice(-3), 10);\n algorithm = { name: \"HMAC\", hash: `SHA-${length}`, length };\n keyUsages = [\"sign\", \"verify\"];\n break;\n case \"A128CBC-HS256\":\n case \"A192CBC-HS384\":\n case \"A256CBC-HS512\":\n length = parseInt(alg.slice(-3), 10);\n return random_default(new Uint8Array(length >> 3));\n case \"A128KW\":\n case \"A192KW\":\n case \"A256KW\":\n length = parseInt(alg.slice(1, 4), 10);\n algorithm = { name: \"AES-KW\", length };\n keyUsages = [\"wrapKey\", \"unwrapKey\"];\n break;\n case \"A128GCMKW\":\n case \"A192GCMKW\":\n case \"A256GCMKW\":\n case \"A128GCM\":\n case \"A192GCM\":\n case \"A256GCM\":\n length = parseInt(alg.slice(1, 4), 10);\n algorithm = { name: \"AES-GCM\", length };\n keyUsages = [\"encrypt\", \"decrypt\"];\n break;\n default:\n throw new JOSENotSupported('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value');\n }\n return webcrypto_default.subtle.generateKey(algorithm, (_a = options === null || options === void 0 ? void 0 : options.extractable) !== null && _a !== void 0 ? _a : false, keyUsages);\n }\n function getModulusLengthOption(options) {\n var _a;\n const modulusLength = (_a = options === null || options === void 0 ? void 0 : options.modulusLength) !== null && _a !== void 0 ? _a : 2048;\n if (typeof modulusLength !== \"number\" || modulusLength < 2048) {\n throw new JOSENotSupported(\"Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used\");\n }\n return modulusLength;\n }\n async function generateKeyPair(alg, options) {\n var _a, _b, _c;\n let algorithm;\n let keyUsages;\n switch (alg) {\n case \"PS256\":\n case \"PS384\":\n case \"PS512\":\n algorithm = {\n name: \"RSA-PSS\",\n hash: `SHA-${alg.slice(-3)}`,\n publicExponent: new Uint8Array([1, 0, 1]),\n modulusLength: getModulusLengthOption(options)\n };\n keyUsages = [\"sign\", \"verify\"];\n break;\n case \"RS256\":\n case \"RS384\":\n case \"RS512\":\n algorithm = {\n name: \"RSASSA-PKCS1-v1_5\",\n hash: `SHA-${alg.slice(-3)}`,\n publicExponent: new Uint8Array([1, 0, 1]),\n modulusLength: getModulusLengthOption(options)\n };\n keyUsages = [\"sign\", \"verify\"];\n break;\n case \"RSA-OAEP\":\n case \"RSA-OAEP-256\":\n case \"RSA-OAEP-384\":\n case \"RSA-OAEP-512\":\n algorithm = {\n name: \"RSA-OAEP\",\n hash: `SHA-${parseInt(alg.slice(-3), 10) || 1}`,\n publicExponent: new Uint8Array([1, 0, 1]),\n modulusLength: getModulusLengthOption(options)\n };\n keyUsages = [\"decrypt\", \"unwrapKey\", \"encrypt\", \"wrapKey\"];\n break;\n case \"ES256\":\n algorithm = { name: \"ECDSA\", namedCurve: \"P-256\" };\n keyUsages = [\"sign\", \"verify\"];\n break;\n case \"ES384\":\n algorithm = { name: \"ECDSA\", namedCurve: \"P-384\" };\n keyUsages = [\"sign\", \"verify\"];\n break;\n case \"ES512\":\n algorithm = { name: \"ECDSA\", namedCurve: \"P-521\" };\n keyUsages = [\"sign\", \"verify\"];\n break;\n case \"EdDSA\":\n keyUsages = [\"sign\", \"verify\"];\n const crv = (_a = options === null || options === void 0 ? void 0 : options.crv) !== null && _a !== void 0 ? _a : \"Ed25519\";\n switch (crv) {\n case \"Ed25519\":\n case \"Ed448\":\n algorithm = { name: crv };\n break;\n default:\n throw new JOSENotSupported(\"Invalid or unsupported crv option provided\");\n }\n break;\n case \"ECDH-ES\":\n case \"ECDH-ES+A128KW\":\n case \"ECDH-ES+A192KW\":\n case \"ECDH-ES+A256KW\": {\n keyUsages = [\"deriveKey\", \"deriveBits\"];\n const crv2 = (_b = options === null || options === void 0 ? void 0 : options.crv) !== null && _b !== void 0 ? _b : \"P-256\";\n switch (crv2) {\n case \"P-256\":\n case \"P-384\":\n case \"P-521\": {\n algorithm = { name: \"ECDH\", namedCurve: crv2 };\n break;\n }\n case \"X25519\":\n case \"X448\":\n algorithm = { name: crv2 };\n break;\n default:\n throw new JOSENotSupported(\"Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448\");\n }\n break;\n }\n default:\n throw new JOSENotSupported('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value');\n }\n return webcrypto_default.subtle.generateKey(algorithm, (_c = options === null || options === void 0 ? void 0 : options.extractable) !== null && _c !== void 0 ? _c : false, keyUsages);\n }\n var init_generate = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/generate.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_webcrypto();\n init_errors2();\n init_random();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/key/generate_key_pair.js\n async function generateKeyPair2(alg, options) {\n return generateKeyPair(alg, options);\n }\n var init_generate_key_pair = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/key/generate_key_pair.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_generate();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/key/generate_secret.js\n async function generateSecret2(alg, options) {\n return generateSecret(alg, options);\n }\n var init_generate_secret = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/key/generate_secret.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_generate();\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/runtime.js\n var runtime_default;\n var init_runtime = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/runtime/runtime.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n runtime_default = \"WebCryptoAPI\";\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/util/runtime.js\n var runtime_default2;\n var init_runtime2 = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/util/runtime.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_runtime();\n runtime_default2 = runtime_default;\n }\n });\n\n // ../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/index.js\n var browser_exports = {};\n __export(browser_exports, {\n CompactEncrypt: () => CompactEncrypt,\n CompactSign: () => CompactSign,\n EmbeddedJWK: () => EmbeddedJWK,\n EncryptJWT: () => EncryptJWT,\n FlattenedEncrypt: () => FlattenedEncrypt,\n FlattenedSign: () => FlattenedSign,\n GeneralEncrypt: () => GeneralEncrypt,\n GeneralSign: () => GeneralSign,\n SignJWT: () => SignJWT,\n UnsecuredJWT: () => UnsecuredJWT,\n base64url: () => base64url_exports2,\n calculateJwkThumbprint: () => calculateJwkThumbprint,\n calculateJwkThumbprintUri: () => calculateJwkThumbprintUri,\n compactDecrypt: () => compactDecrypt,\n compactVerify: () => compactVerify,\n createLocalJWKSet: () => createLocalJWKSet,\n createRemoteJWKSet: () => createRemoteJWKSet,\n cryptoRuntime: () => runtime_default2,\n decodeJwt: () => decodeJwt,\n decodeProtectedHeader: () => decodeProtectedHeader,\n errors: () => errors_exports,\n exportJWK: () => exportJWK,\n exportPKCS8: () => exportPKCS8,\n exportSPKI: () => exportSPKI,\n flattenedDecrypt: () => flattenedDecrypt,\n flattenedVerify: () => flattenedVerify,\n generalDecrypt: () => generalDecrypt,\n generalVerify: () => generalVerify,\n generateKeyPair: () => generateKeyPair2,\n generateSecret: () => generateSecret2,\n importJWK: () => importJWK,\n importPKCS8: () => importPKCS8,\n importSPKI: () => importSPKI,\n importX509: () => importX509,\n jwtDecrypt: () => jwtDecrypt,\n jwtVerify: () => jwtVerify\n });\n var init_browser = __esm({\n \"../../../node_modules/.pnpm/jose@4.15.9/node_modules/jose/dist/browser/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_decrypt3();\n init_decrypt2();\n init_decrypt4();\n init_encrypt3();\n init_verify3();\n init_verify2();\n init_verify4();\n init_verify5();\n init_decrypt5();\n init_encrypt4();\n init_encrypt2();\n init_sign3();\n init_sign2();\n init_sign4();\n init_sign5();\n init_encrypt5();\n init_thumbprint();\n init_embedded();\n init_local();\n init_remote();\n init_unsecured();\n init_export();\n init_import();\n init_decode_protected_header();\n init_decode_jwt();\n init_errors2();\n init_generate_key_pair();\n init_generate_secret();\n init_base64url2();\n init_runtime2();\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/lib/auth-utils.js\n var require_auth_utils = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/lib/auth-utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.stringToArrayify = exports3.totpAuthFactorParser = exports3.whatsAppOtpAuthFactorParser = exports3.smsOtpAuthFactorParser = exports3.emailOtpAuthFactorParser = void 0;\n exports3.getAuthIdByAuthMethod = getAuthIdByAuthMethod;\n exports3.getEthAuthMethodId = getEthAuthMethodId;\n var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));\n var constants_1 = require_src2();\n var ethers_1 = require_lib32();\n var jose = tslib_1.__importStar((init_browser(), __toCommonJS(browser_exports)));\n async function getAuthIdByAuthMethod(authMethod) {\n let authMethodId;\n switch (authMethod.authMethodType) {\n case 1:\n authMethodId = getEthAuthMethodId(authMethod);\n break;\n case 4:\n authMethodId = await getDiscordAuthId(authMethod);\n break;\n case 3:\n authMethodId = await getWebauthnAuthId(authMethod);\n break;\n case 6:\n authMethodId = await getGoogleJwtAuthId(authMethod);\n break;\n case 9:\n authMethodId = await getStytchAuthId(authMethod);\n break;\n case 10:\n case 11:\n case 12:\n case 13:\n authMethodId = await getStytchFactorAuthMethodId(authMethod);\n break;\n default:\n throw new constants_1.InvalidArgumentException({\n info: {\n authMethod\n }\n }, `Unsupported auth method type: ${authMethod.authMethodType}`);\n }\n return authMethodId;\n }\n function getEthAuthMethodId(authMethod) {\n let accessToken;\n try {\n accessToken = JSON.parse(authMethod.accessToken);\n } catch (err) {\n throw new constants_1.InvalidArgumentException({\n info: {\n authMethod\n },\n cause: err\n }, \"Unable to parse access token as JSON object\");\n }\n const address = accessToken.address;\n if (!address) {\n throw new constants_1.NoWalletException({\n info: {\n authMethod\n }\n }, \"No address found in access token\");\n }\n return ethers_1.ethers.utils.keccak256(ethers_1.ethers.utils.toUtf8Bytes(`${address}:lit`));\n }\n async function getDiscordAuthId(authMethod) {\n const _clientId = \"1052874239658692668\";\n let userId;\n const meResponse = await fetch(\"https://discord.com/api/users/@me\", {\n method: \"GET\",\n headers: {\n authorization: `Bearer ${authMethod.accessToken}`\n }\n });\n if (meResponse.ok) {\n const user = await meResponse.json();\n userId = user.id;\n } else {\n throw new constants_1.NetworkError({\n info: {\n authMethod\n }\n }, \"Unable to verify Discord account\");\n }\n const authMethodId = ethers_1.ethers.utils.keccak256(ethers_1.ethers.utils.toUtf8Bytes(`${userId}:${_clientId}`));\n return authMethodId;\n }\n async function getWebauthnAuthId(authMethod) {\n let credentialId;\n const rpNameToUse = \"lit\";\n try {\n credentialId = JSON.parse(authMethod.accessToken).rawId;\n } catch (err) {\n throw new constants_1.InvalidArgumentException({\n info: {\n authMethod\n },\n cause: err\n }, `Error when parsing auth method to generate auth method ID for WebAuthn`);\n }\n const authMethodId = ethers_1.ethers.utils.keccak256(ethers_1.ethers.utils.toUtf8Bytes(`${credentialId}:${rpNameToUse}`));\n return authMethodId;\n }\n async function getStytchAuthId(authMethod) {\n try {\n const tokenBody = _parseJWT(authMethod.accessToken);\n const userId = tokenBody[\"sub\"];\n const orgId = tokenBody[\"aud\"][0];\n const authMethodId = ethers_1.ethers.utils.keccak256(ethers_1.ethers.utils.toUtf8Bytes(`${userId.toLowerCase()}:${orgId.toLowerCase()}`));\n return authMethodId;\n } catch (err) {\n throw new constants_1.InvalidArgumentException({\n info: {\n authMethod\n },\n cause: err\n }, `Error while parsing auth method to generate auth method id for Stytch OTP`);\n }\n }\n function getStytchFactorAuthMethodId(authMethod) {\n return new Promise((resolve, reject) => {\n const accessToken = authMethod.accessToken;\n const parsedToken = _parseJWT(accessToken);\n let factor = \"email\";\n switch (authMethod.authMethodType) {\n case 10:\n factor = \"email\";\n break;\n case 11:\n factor = \"sms\";\n break;\n case 12:\n factor = \"whatsApp\";\n break;\n case 13:\n factor = \"totp\";\n break;\n default:\n throw new constants_1.InvalidArgumentException({\n info: {\n authMethod\n }\n }, `Unsupport stytch auth type`);\n }\n const factorParser = _resolveAuthFactor(factor).parser;\n try {\n resolve(factorParser(parsedToken, \"https://stytch.com/session\"));\n } catch (e2) {\n reject(e2);\n }\n });\n }\n async function getGoogleJwtAuthId(authMethod) {\n const tokenPayload = jose.decodeJwt(authMethod.accessToken);\n const userId = tokenPayload[\"sub\"];\n const audience = tokenPayload[\"aud\"];\n const authMethodId = ethers_1.ethers.utils.keccak256(ethers_1.ethers.utils.toUtf8Bytes(`${userId}:${audience}`));\n return authMethodId;\n }\n function _parseJWT(jwt) {\n const parts = jwt.split(\".\");\n if (parts.length !== 3) {\n throw new constants_1.WrongParamFormat({\n info: {\n jwt\n }\n }, \"Invalid token length\");\n }\n const body = Buffer2.from(parts[1], \"base64\");\n const parsedBody = JSON.parse(body.toString(\"ascii\"));\n console.log(\"JWT body: \", parsedBody);\n return parsedBody;\n }\n var emailOtpAuthFactorParser = (parsedToken, provider) => {\n const session = parsedToken[provider];\n const authFactors = session[\"authentication_factors\"];\n const authFactor = authFactors.find((value, _index, _obj) => {\n if (value.email_factor)\n return value;\n });\n if (!authFactor) {\n throw new constants_1.InvalidArgumentException({\n info: {\n parsedToken,\n provider\n }\n }, \"Could not find email authentication info in session\");\n }\n const audience = parsedToken[\"aud\"][0];\n if (!audience) {\n throw new constants_1.InvalidArgumentException({\n info: {\n parsedToken,\n provider\n }\n }, \"Token does not contain an audience (project identifier), aborting\");\n }\n const userId = authFactor.email_factor.email_address;\n const authMethodId = ethers_1.ethers.utils.keccak256(ethers_1.ethers.utils.toUtf8Bytes(`${userId.toLowerCase()}:${audience.toLowerCase()}`));\n return authMethodId;\n };\n exports3.emailOtpAuthFactorParser = emailOtpAuthFactorParser;\n var smsOtpAuthFactorParser = (parsedToken, provider) => {\n const session = parsedToken[provider];\n const authFactors = session[\"authentication_factors\"];\n let authFactor = authFactors.find((value, _index, _obj) => {\n if (value.phone_number_factor)\n return value;\n });\n if (!authFactor) {\n throw new constants_1.InvalidArgumentException({\n info: {\n parsedToken,\n provider\n }\n }, \"Could not find email authentication info in session\");\n }\n const audience = parsedToken[\"aud\"][0];\n if (!audience) {\n throw new constants_1.InvalidArgumentException({\n info: {\n parsedToken,\n provider\n }\n }, \"Token does not contain an audience (project identifier), aborting\");\n }\n const userId = authFactor.phone_number_factor.phone_number;\n const authMethodId = ethers_1.ethers.utils.keccak256(ethers_1.ethers.utils.toUtf8Bytes(`${userId.toLowerCase()}:${audience.toLowerCase()}`));\n return authMethodId;\n };\n exports3.smsOtpAuthFactorParser = smsOtpAuthFactorParser;\n var whatsAppOtpAuthFactorParser = (parsedToken, provider) => {\n const session = parsedToken[provider];\n const authFactors = session[\"authentication_factors\"];\n let authFactor = authFactors.find((value, _index, _obj) => {\n if (value.phone_number_factor)\n return value;\n });\n if (!authFactor) {\n throw new constants_1.InvalidArgumentException({\n info: {\n parsedToken,\n provider\n }\n }, \"Could not find email authentication info in session\");\n }\n const audience = parsedToken[\"aud\"][0];\n if (!audience) {\n throw new constants_1.InvalidArgumentException({\n info: {\n parsedToken,\n provider\n }\n }, \"Token does not contain an audience (project identifier), aborting\");\n }\n const userId = authFactor.phone_number_factor.phone_number;\n const authMethodId = ethers_1.ethers.utils.keccak256(ethers_1.ethers.utils.toUtf8Bytes(`${userId.toLowerCase()}:${audience.toLowerCase()}`));\n return authMethodId;\n };\n exports3.whatsAppOtpAuthFactorParser = whatsAppOtpAuthFactorParser;\n var totpAuthFactorParser = (parsedToken, provider) => {\n const session = parsedToken[provider];\n const authFactors = session[\"authentication_factors\"];\n let authFactor = authFactors.find((value, _index, _obj) => {\n if (value.phone_number_factor)\n return value;\n });\n if (!authFactor) {\n throw new constants_1.InvalidArgumentException({\n info: {\n parsedToken,\n provider\n }\n }, \"Could not find email authentication info in session\");\n }\n const audience = parsedToken[\"aud\"][0];\n if (!audience) {\n throw new constants_1.InvalidArgumentException({\n info: {\n parsedToken,\n provider\n }\n }, \"Token does not contain an audience (project identifier), aborting\");\n }\n const userId = authFactor.authenticator_app_factor.totp_id;\n const authMethodId = ethers_1.ethers.utils.keccak256(ethers_1.ethers.utils.toUtf8Bytes(`${userId.toLowerCase()}:${audience.toLowerCase()}`));\n return authMethodId;\n };\n exports3.totpAuthFactorParser = totpAuthFactorParser;\n function _resolveAuthFactor(factor) {\n switch (factor) {\n case \"email\":\n return {\n parser: exports3.emailOtpAuthFactorParser,\n authMethodType: 10\n };\n case \"sms\":\n return {\n parser: exports3.smsOtpAuthFactorParser,\n authMethodType: 11\n };\n case \"whatsApp\":\n return {\n parser: exports3.whatsAppOtpAuthFactorParser,\n authMethodType: 12\n };\n case \"totp\":\n return {\n parser: exports3.totpAuthFactorParser,\n authMethodType: 13\n };\n }\n throw new constants_1.InvalidArgumentException({\n info: {\n factor\n }\n }, `Error could not find auth with factor ${factor}`);\n }\n var stringToArrayify = (str) => {\n try {\n const encoder7 = new TextEncoder();\n return encoder7.encode(str);\n } catch (e2) {\n throw new constants_1.InvalidParamType({\n info: {\n str\n }\n }, `Error converting string to arrayify`);\n }\n };\n exports3.stringToArrayify = stringToArrayify;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/lib/helpers/getBytes32FromMultihash.js\n var require_getBytes32FromMultihash = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/lib/helpers/getBytes32FromMultihash.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getBytes32FromMultihash = void 0;\n var constants_1 = require_src2();\n var getBytes32FromMultihash = (ipfsId, CID) => {\n if (!CID) {\n throw new constants_1.ParamsMissingError({\n info: {\n ipfsId,\n CID\n }\n }, 'CID is required. Please import from \"multiformats/cid\" package, and pass the CID object to the function.');\n }\n if (!ipfsId) {\n throw new constants_1.ParamsMissingError({\n info: {\n ipfsId\n }\n }, \"ipfsId is required\");\n }\n let cid;\n try {\n cid = CID.parse(ipfsId);\n } catch (e2) {\n throw new constants_1.InvalidArgumentException({\n info: {\n ipfsId,\n CID\n }\n }, \"Error parsing CID\");\n }\n const hashFunction = cid.multihash.code;\n const size6 = cid.multihash.size;\n const digest2 = \"0x\" + Buffer2.from(cid.multihash.digest).toString(\"hex\");\n const ipfsHash = {\n digest: digest2,\n hashFunction,\n size: size6\n };\n return ipfsHash;\n };\n exports3.getBytes32FromMultihash = getBytes32FromMultihash;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/lib/utils.js\n var require_utils12 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.convertRequestsPerDayToPerSecond = convertRequestsPerDayToPerSecond;\n exports3.calculateUTCMidnightExpiration = calculateUTCMidnightExpiration;\n exports3.requestsToKilosecond = requestsToKilosecond;\n exports3.requestsToDay = requestsToDay;\n exports3.requestsToSecond = requestsToSecond;\n var constants_1 = require_src2();\n function convertRequestsPerDayToPerSecond(requestsPerDay) {\n const secondsInADay = 86400;\n return requestsPerDay / secondsInADay;\n }\n function calculateUTCMidnightExpiration(daysFromNow) {\n const now = /* @__PURE__ */ new Date();\n const utcNow = Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate());\n const futureDate = new Date(utcNow);\n futureDate.setUTCDate(futureDate.getUTCDate() + daysFromNow);\n futureDate.setUTCHours(0, 0, 0, 0);\n return Math.floor(futureDate.getTime() / 1e3);\n }\n function requestsToKilosecond({ period, requests }) {\n const secondsPerDay = 86400;\n const kilosecondsPerDay = secondsPerDay / 1e3;\n switch (period) {\n case \"day\":\n return Math.round(requests / kilosecondsPerDay);\n case \"second\":\n return Math.round(requests * 1e3);\n default:\n throw new constants_1.InvalidArgumentException({\n info: {\n period,\n requests\n }\n }, \"Invalid period\");\n }\n }\n function requestsToDay({ period, requests }) {\n const secondsPerDay = 86400;\n switch (period) {\n case \"second\":\n return Math.round(requests * secondsPerDay);\n case \"kilosecond\":\n return Math.round(requests * 86);\n default:\n throw new constants_1.InvalidArgumentException({\n info: {\n period,\n requests\n }\n }, \"Invalid period\");\n }\n }\n function requestsToSecond({ period, requests }) {\n const secondsPerDay = 86400;\n switch (period) {\n case \"day\":\n return Math.round(requests / secondsPerDay);\n case \"kilosecond\":\n return Math.round(requests * 1e3);\n default:\n throw new constants_1.InvalidArgumentException({\n info: {\n period,\n requests\n }\n }, \"Invalid period\");\n }\n }\n }\n });\n\n // ../../../node_modules/.pnpm/date-and-time@2.4.3/node_modules/date-and-time/date-and-time.js\n var require_date_and_time = __commonJS({\n \"../../../node_modules/.pnpm/date-and-time@2.4.3/node_modules/date-and-time/date-and-time.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(global2, factory) {\n typeof exports3 === \"object\" && typeof module !== \"undefined\" ? module.exports = factory() : typeof define === \"function\" && define.amd ? define(factory) : (global2 = typeof globalThis !== \"undefined\" ? globalThis : global2 || self, global2.date = factory());\n })(exports3, function() {\n \"use strict\";\n var locales = {}, plugins = {}, lang = \"en\", _res = {\n MMMM: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n MMM: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n dddd: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n ddd: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n dd: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n A: [\"AM\", \"PM\"]\n }, _formatter = {\n YYYY: function(d5) {\n return (\"000\" + d5.getFullYear()).slice(-4);\n },\n YY: function(d5) {\n return (\"0\" + d5.getFullYear()).slice(-2);\n },\n Y: function(d5) {\n return \"\" + d5.getFullYear();\n },\n MMMM: function(d5) {\n return this.res.MMMM[d5.getMonth()];\n },\n MMM: function(d5) {\n return this.res.MMM[d5.getMonth()];\n },\n MM: function(d5) {\n return (\"0\" + (d5.getMonth() + 1)).slice(-2);\n },\n M: function(d5) {\n return \"\" + (d5.getMonth() + 1);\n },\n DD: function(d5) {\n return (\"0\" + d5.getDate()).slice(-2);\n },\n D: function(d5) {\n return \"\" + d5.getDate();\n },\n HH: function(d5) {\n return (\"0\" + d5.getHours()).slice(-2);\n },\n H: function(d5) {\n return \"\" + d5.getHours();\n },\n A: function(d5) {\n return this.res.A[d5.getHours() > 11 | 0];\n },\n hh: function(d5) {\n return (\"0\" + (d5.getHours() % 12 || 12)).slice(-2);\n },\n h: function(d5) {\n return \"\" + (d5.getHours() % 12 || 12);\n },\n mm: function(d5) {\n return (\"0\" + d5.getMinutes()).slice(-2);\n },\n m: function(d5) {\n return \"\" + d5.getMinutes();\n },\n ss: function(d5) {\n return (\"0\" + d5.getSeconds()).slice(-2);\n },\n s: function(d5) {\n return \"\" + d5.getSeconds();\n },\n SSS: function(d5) {\n return (\"00\" + d5.getMilliseconds()).slice(-3);\n },\n SS: function(d5) {\n return (\"0\" + (d5.getMilliseconds() / 10 | 0)).slice(-2);\n },\n S: function(d5) {\n return \"\" + (d5.getMilliseconds() / 100 | 0);\n },\n dddd: function(d5) {\n return this.res.dddd[d5.getDay()];\n },\n ddd: function(d5) {\n return this.res.ddd[d5.getDay()];\n },\n dd: function(d5) {\n return this.res.dd[d5.getDay()];\n },\n Z: function(d5) {\n var offset = d5.getTimezoneOffset() / 0.6 | 0;\n return (offset > 0 ? \"-\" : \"+\") + (\"000\" + Math.abs(offset - (offset % 100 * 0.4 | 0))).slice(-4);\n },\n ZZ: function(d5) {\n var offset = d5.getTimezoneOffset();\n var mod3 = Math.abs(offset);\n return (offset > 0 ? \"-\" : \"+\") + (\"0\" + (mod3 / 60 | 0)).slice(-2) + \":\" + (\"0\" + mod3 % 60).slice(-2);\n },\n post: function(str) {\n return str;\n },\n res: _res\n }, _parser = {\n YYYY: function(str) {\n return this.exec(/^\\d{4}/, str);\n },\n Y: function(str) {\n return this.exec(/^\\d{1,4}/, str);\n },\n MMMM: function(str) {\n var result = this.find(this.res.MMMM, str);\n result.value++;\n return result;\n },\n MMM: function(str) {\n var result = this.find(this.res.MMM, str);\n result.value++;\n return result;\n },\n MM: function(str) {\n return this.exec(/^\\d\\d/, str);\n },\n M: function(str) {\n return this.exec(/^\\d\\d?/, str);\n },\n DD: function(str) {\n return this.exec(/^\\d\\d/, str);\n },\n D: function(str) {\n return this.exec(/^\\d\\d?/, str);\n },\n HH: function(str) {\n return this.exec(/^\\d\\d/, str);\n },\n H: function(str) {\n return this.exec(/^\\d\\d?/, str);\n },\n A: function(str) {\n return this.find(this.res.A, str);\n },\n hh: function(str) {\n return this.exec(/^\\d\\d/, str);\n },\n h: function(str) {\n return this.exec(/^\\d\\d?/, str);\n },\n mm: function(str) {\n return this.exec(/^\\d\\d/, str);\n },\n m: function(str) {\n return this.exec(/^\\d\\d?/, str);\n },\n ss: function(str) {\n return this.exec(/^\\d\\d/, str);\n },\n s: function(str) {\n return this.exec(/^\\d\\d?/, str);\n },\n SSS: function(str) {\n return this.exec(/^\\d{1,3}/, str);\n },\n SS: function(str) {\n var result = this.exec(/^\\d\\d?/, str);\n result.value *= 10;\n return result;\n },\n S: function(str) {\n var result = this.exec(/^\\d/, str);\n result.value *= 100;\n return result;\n },\n Z: function(str) {\n var result = this.exec(/^[\\+-]\\d{2}[0-5]\\d/, str);\n result.value = (result.value / 100 | 0) * -60 - result.value % 100;\n return result;\n },\n ZZ: function(str) {\n var arr = /^([\\+-])(\\d{2}):([0-5]\\d)/.exec(str) || [\"\", \"\", \"\", \"\"];\n return { value: 0 - ((arr[1] + arr[2] | 0) * 60 + (arr[1] + arr[3] | 0)), length: arr[0].length };\n },\n h12: function(h4, a3) {\n return (h4 === 12 ? 0 : h4) + a3 * 12;\n },\n exec: function(re, str) {\n var result = (re.exec(str) || [\"\"])[0];\n return { value: result | 0, length: result.length };\n },\n find: function(array, str) {\n var index2 = -1, length = 0;\n for (var i3 = 0, len = array.length, item; i3 < len; i3++) {\n item = array[i3];\n if (!str.indexOf(item) && item.length > length) {\n index2 = i3;\n length = item.length;\n }\n }\n return { value: index2, length };\n },\n pre: function(str) {\n return str;\n },\n res: _res\n }, extend = function(base4, props, override, res) {\n var obj = {}, key;\n for (key in base4) {\n obj[key] = base4[key];\n }\n for (key in props || {}) {\n if (!(!!override ^ !!obj[key])) {\n obj[key] = props[key];\n }\n }\n if (res) {\n obj.res = res;\n }\n return obj;\n }, proto = {\n _formatter,\n _parser\n }, localized_proto, date;\n proto.compile = function(formatString) {\n var re = /\\[([^\\[\\]]|\\[[^\\[\\]]*])*]|([A-Za-z])\\2+|\\.{3}|./g, keys, pattern = [formatString];\n while (keys = re.exec(formatString)) {\n pattern[pattern.length] = keys[0];\n }\n return pattern;\n };\n proto.format = function(dateObj, arg, utc) {\n var ctx = this || date, pattern = typeof arg === \"string\" ? ctx.compile(arg) : arg, offset = dateObj.getTimezoneOffset(), d5 = ctx.addMinutes(dateObj, utc ? offset : 0), formatter = ctx._formatter, str = \"\";\n d5.getTimezoneOffset = function() {\n return utc ? 0 : offset;\n };\n for (var i3 = 1, len = pattern.length, token; i3 < len; i3++) {\n token = pattern[i3];\n str += formatter[token] ? formatter.post(formatter[token](d5, pattern[0])) : token.replace(/\\[(.*)]/, \"$1\");\n }\n return str;\n };\n proto.preparse = function(dateString, arg) {\n var ctx = this || date, pattern = typeof arg === \"string\" ? ctx.compile(arg) : arg, dt = { Y: 1970, M: 1, D: 1, H: 0, A: 0, h: 0, m: 0, s: 0, S: 0, Z: 0, _index: 0, _length: 0, _match: 0 }, comment = /\\[(.*)]/, parser = ctx._parser, offset = 0;\n dateString = parser.pre(dateString);\n for (var i3 = 1, len = pattern.length, token, result; i3 < len; i3++) {\n token = pattern[i3];\n if (parser[token]) {\n result = parser[token](dateString.slice(offset), pattern[0]);\n if (!result.length) {\n break;\n }\n offset += result.length;\n dt[result.token || token.charAt(0)] = result.value;\n dt._match++;\n } else if (token === dateString.charAt(offset) || token === \" \") {\n offset++;\n } else if (comment.test(token) && !dateString.slice(offset).indexOf(comment.exec(token)[1])) {\n offset += token.length - 2;\n } else if (token === \"...\") {\n offset = dateString.length;\n break;\n } else {\n break;\n }\n }\n dt.H = dt.H || parser.h12(dt.h, dt.A);\n dt._index = offset;\n dt._length = dateString.length;\n return dt;\n };\n proto.parse = function(dateString, arg, utc) {\n var ctx = this || date, pattern = typeof arg === \"string\" ? ctx.compile(arg) : arg, dt = ctx.preparse(dateString, pattern);\n if (ctx.isValid(dt)) {\n dt.M -= dt.Y < 100 ? 22801 : 1;\n if (utc || ~ctx._parser.find(pattern, \"ZZ\").value) {\n return new Date(Date.UTC(dt.Y, dt.M, dt.D, dt.H, dt.m + dt.Z, dt.s, dt.S));\n }\n return new Date(dt.Y, dt.M, dt.D, dt.H, dt.m, dt.s, dt.S);\n }\n return /* @__PURE__ */ new Date(NaN);\n };\n proto.isValid = function(arg1, arg2) {\n var ctx = this || date, dt = typeof arg1 === \"string\" ? ctx.preparse(arg1, arg2) : arg1, last = [31, 28 + ctx.isLeapYear(dt.Y) | 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][dt.M - 1];\n return !(dt._index < 1 || dt._length < 1 || dt._index - dt._length || dt._match < 1 || dt.Y < 1 || dt.Y > 9999 || dt.M < 1 || dt.M > 12 || dt.D < 1 || dt.D > last || dt.H < 0 || dt.H > 23 || dt.m < 0 || dt.m > 59 || dt.s < 0 || dt.s > 59 || dt.S < 0 || dt.S > 999 || dt.Z < -840 || dt.Z > 720);\n };\n proto.transform = function(dateString, arg1, arg2, utc) {\n const ctx = this || date;\n return ctx.format(ctx.parse(dateString, arg1), arg2, utc);\n };\n proto.addYears = function(dateObj, years) {\n return (this || date).addMonths(dateObj, years * 12);\n };\n proto.addMonths = function(dateObj, months) {\n var d5 = new Date(dateObj.getTime());\n d5.setUTCMonth(d5.getUTCMonth() + months);\n return d5;\n };\n proto.addDays = function(dateObj, days) {\n var d5 = new Date(dateObj.getTime());\n d5.setUTCDate(d5.getUTCDate() + days);\n return d5;\n };\n proto.addHours = function(dateObj, hours) {\n return (this || date).addMinutes(dateObj, hours * 60);\n };\n proto.addMinutes = function(dateObj, minutes) {\n return (this || date).addSeconds(dateObj, minutes * 60);\n };\n proto.addSeconds = function(dateObj, seconds) {\n return (this || date).addMilliseconds(dateObj, seconds * 1e3);\n };\n proto.addMilliseconds = function(dateObj, milliseconds) {\n return new Date(dateObj.getTime() + milliseconds);\n };\n proto.subtract = function(date1, date2) {\n var delta = date1.getTime() - date2.getTime();\n return {\n toMilliseconds: function() {\n return delta;\n },\n toSeconds: function() {\n return delta / 1e3;\n },\n toMinutes: function() {\n return delta / 6e4;\n },\n toHours: function() {\n return delta / 36e5;\n },\n toDays: function() {\n return delta / 864e5;\n }\n };\n };\n proto.isLeapYear = function(y6) {\n return !(y6 % 4) && !!(y6 % 100) || !(y6 % 400);\n };\n proto.isSameDay = function(date1, date2) {\n return date1.toDateString() === date2.toDateString();\n };\n proto.locale = function(code, locale) {\n if (!locales[code]) {\n locales[code] = locale;\n }\n };\n proto.plugin = function(name, plugin) {\n if (!plugins[name]) {\n plugins[name] = plugin;\n }\n };\n localized_proto = extend(proto);\n date = extend(proto);\n date.locale = function(locale) {\n var install = typeof locale === \"function\" ? locale : date.locale[locale];\n if (!install) {\n return lang;\n }\n lang = install(proto);\n var extension = locales[lang] || {};\n var res = extend(_res, extension.res, true);\n var formatter = extend(_formatter, extension.formatter, true, res);\n var parser = extend(_parser, extension.parser, true, res);\n date._formatter = localized_proto._formatter = formatter;\n date._parser = localized_proto._parser = parser;\n for (var plugin in plugins) {\n date.extend(plugins[plugin]);\n }\n return lang;\n };\n date.extend = function(extension) {\n var res = extend(date._parser.res, extension.res);\n var extender = extension.extender || {};\n date._formatter = extend(date._formatter, extension.formatter, false, res);\n date._parser = extend(date._parser, extension.parser, false, res);\n for (var key in extender) {\n if (!date[key]) {\n date[key] = extender[key];\n }\n }\n };\n date.plugin = function(plugin) {\n var install = typeof plugin === \"function\" ? plugin : date.plugin[plugin];\n if (install) {\n date.extend(plugins[install(proto, localized_proto)] || {});\n }\n };\n var date$1 = date;\n return date$1;\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/lib/contracts-sdk.js\n var require_contracts_sdk = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/lib/contracts-sdk.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var _a;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LitContracts = exports3.asyncForEachReturn = void 0;\n var misc_1 = require_src4();\n var ethers_1 = require_lib32();\n var hex2dec_1 = require_hex2dec();\n var AllowlistData_1 = require_AllowlistData();\n var LITTokenData_1 = require_LITTokenData();\n var MultisenderData_1 = require_MultisenderData();\n var PKPHelperData_1 = require_PKPHelperData();\n var PKPNFTData_1 = require_PKPNFTData();\n var PKPNFTMetadataData_1 = require_PKPNFTMetadataData();\n var PKPPermissionsData_1 = require_PKPPermissionsData();\n var PubkeyRouterData_1 = require_PubkeyRouterData();\n var RateLimitNFTData_1 = require_RateLimitNFTData();\n var StakingData_1 = require_StakingData();\n var StakingBalancesData_1 = require_StakingBalancesData();\n var constants_1 = require_src2();\n var logger_1 = require_src3();\n var misc_2 = require_src4();\n var utils_1 = require_utils6();\n var auth_utils_1 = require_auth_utils();\n var getBytes32FromMultihash_1 = require_getBytes32FromMultihash();\n var utils_2 = require_utils12();\n var asyncForEachReturn = async (array, callback) => {\n const list = [];\n for (let index2 = 0; index2 < array.length; index2++) {\n const item = await callback(array[index2], index2, array);\n list.push(item);\n }\n return list;\n };\n exports3.asyncForEachReturn = asyncForEachReturn;\n var GAS_LIMIT_INCREASE_PERCENTAGE = 10;\n var GAS_LIMIT_ADJUSTMENT = ethers_1.ethers.BigNumber.from(100).add(GAS_LIMIT_INCREASE_PERCENTAGE);\n var LitContracts = class {\n // ----- autogen:declares:end -----\n // make the constructor args optional\n constructor(args) {\n this.randomPrivateKey = false;\n this.connected = false;\n this.isPKP = false;\n this.debug = false;\n this.log = (...args2) => {\n if (this.debug) {\n _a.logger.debug(...args2);\n }\n };\n this.connect = async () => {\n let wallet;\n let SETUP_DONE = false;\n if (this.provider) {\n this.log(\"Using provided provider\");\n } else if ((0, misc_1.isBrowser)() && !this.signer) {\n let _decimalToHex = function(decimal) {\n return \"0x\" + decimal.toString(16);\n };\n this.log(\"----- We're in the browser! -----\");\n const web3Provider = window.ethereum;\n if (!web3Provider) {\n const msg = \"No web3 provider found. Please install Brave, MetaMask or another web3 provider.\";\n alert(msg);\n throw new constants_1.InitError({\n info: {\n web3Provider\n }\n }, msg);\n }\n const chainInfo = constants_1.METAMASK_CHAIN_INFO_BY_NETWORK[this.network];\n const metamaskChainInfo = {\n ...chainInfo,\n chainId: _decimalToHex(chainInfo.chainId)\n };\n try {\n await web3Provider.send(\"wallet_switchEthereumChain\", [\n { chainId: metamaskChainInfo.chainId }\n ]);\n } catch (e2) {\n await web3Provider.request({\n method: \"wallet_addEthereumChain\",\n params: [metamaskChainInfo]\n });\n }\n wallet = new ethers_1.ethers.providers.Web3Provider(web3Provider);\n await wallet.send(\"eth_requestAccounts\", []);\n this.provider = wallet;\n } else if ((0, misc_1.isNode)()) {\n this.log(\"----- We're in node! -----\");\n this.provider = new ethers_1.ethers.providers.StaticJsonRpcProvider({\n url: this.rpc,\n skipFetchSetup: true\n });\n }\n if (this.privateKey) {\n this.log(\"Using your own private key\");\n this.signer = new ethers_1.ethers.Wallet(this.privateKey, this.provider);\n this.provider = this.signer.provider;\n SETUP_DONE = true;\n }\n if (!this.privateKey && this.randomPrivateKey || this.options?.storeOrUseStorageKey) {\n this.log(\"THIS.SIGNER:\", this.signer);\n const STORAGE_KEY = \"lit-contracts-sdk-private-key\";\n this.log(\"Let's see if you have a private key in your local storage!\");\n let storagePrivateKey;\n try {\n storagePrivateKey = localStorage.getItem(STORAGE_KEY);\n } catch (e2) {\n }\n if (!storagePrivateKey) {\n this.log(\"Not a problem, we will generate a random private key\");\n storagePrivateKey = ethers_1.ethers.utils.hexlify(ethers_1.ethers.utils.randomBytes(32));\n } else {\n this.log(\"Found your private key in local storage. Let's use it!\");\n }\n this.signer = new ethers_1.ethers.Wallet(storagePrivateKey, this.provider);\n this.log(\"- Your private key:\", storagePrivateKey);\n this.log(\"- Your address:\", await this.signer.getAddress());\n this.log(\"- this.signer:\", this.signer);\n this.log(\"- this.provider.getSigner():\", this.provider.getSigner());\n if (this.options?.storeOrUseStorageKey) {\n this.log(\"You've set the option to store your private key in local storage.\");\n localStorage.setItem(STORAGE_KEY, storagePrivateKey);\n }\n } else {\n if ((0, misc_1.isBrowser)() && wallet && !SETUP_DONE) {\n this.log(\"this.signer:\", this.signer);\n this.signer = wallet.getSigner();\n }\n }\n if (this.signer !== void 0 && this.signer !== null) {\n if (\"litNodeClient\" in this.signer && \"rpcProvider\" in this.signer) {\n this.log(`\n // ***********************************************************************************************\n // THIS IS A PKP WALLET, USING IT AS A SIGNER AND ITS RPC PROVIDER AS PROVIDER\n // ***********************************************************************************************\n `);\n this.provider = this.signer.rpcProvider;\n this.isPKP = true;\n }\n }\n this.log(\"Your Signer:\", this.signer);\n this.log(\"Your Provider:\", this.provider?.connection);\n if (!this.provider) {\n this.log(\"No provider found. Will try to use the one from the signer.\");\n this.provider = this.signer.provider;\n this.log(\"Your Provider(from signer):\", this.provider?.connection);\n }\n const addresses4 = await _a.getContractAddresses(this.network, this.customContext?.provider ?? this.provider, this.customContext);\n const logAddresses = Object.entries(addresses4).reduce((output, [key, val]) => {\n output[key] = val.address;\n return output;\n }, {});\n this.log(\"resolved contract addresses for: \", this.network, logAddresses);\n if (addresses4.Allowlist.abi) {\n this.allowlistContract = {\n read: new ethers_1.ethers.Contract(addresses4.Allowlist.address, addresses4.Allowlist.abi, this.provider),\n write: new ethers_1.ethers.Contract(addresses4.Allowlist.address, addresses4.Allowlist.abi, this.signer)\n };\n }\n if (addresses4.LITToken.abi) {\n this.litTokenContract = {\n read: new ethers_1.ethers.Contract(addresses4.LITToken.address, addresses4.LITToken.abi, this.provider),\n write: new ethers_1.ethers.Contract(addresses4.LITToken.address, addresses4.LITToken.abi, this.signer)\n };\n }\n if (addresses4.Multisender.abi) {\n this.multisenderContract = {\n read: new ethers_1.ethers.Contract(addresses4.Multisender.address, addresses4.Multisender.abi, this.provider),\n write: new ethers_1.ethers.Contract(addresses4.Multisender.address, addresses4.Multisender.abi, this.signer)\n };\n }\n if (addresses4.PKPHelper.abi) {\n this.pkpHelperContract = {\n read: new ethers_1.ethers.Contract(addresses4.PKPHelper.address, addresses4.PKPHelper.abi, this.provider),\n write: new ethers_1.ethers.Contract(addresses4.PKPHelper.address, addresses4.PKPHelper.abi, this.signer)\n };\n }\n if (addresses4.PKPNFT.abi) {\n this.pkpNftContract = {\n read: new ethers_1.ethers.Contract(addresses4.PKPNFT.address, addresses4.PKPNFT.abi, this.provider),\n write: new ethers_1.ethers.Contract(addresses4.PKPNFT.address, addresses4.PKPNFT.abi, this.signer)\n };\n }\n if (addresses4.PKPNFTMetadata.abi) {\n this.pkpNftMetadataContract = {\n read: new ethers_1.ethers.Contract(addresses4.PKPNFTMetadata.address, addresses4.PKPNFTMetadata.abi, this.provider),\n write: new ethers_1.ethers.Contract(addresses4.PKPNFTMetadata.address, addresses4.PKPNFTMetadata.abi, this.signer)\n };\n }\n if (addresses4.PKPPermissions.abi) {\n this.pkpPermissionsContract = {\n read: new ethers_1.ethers.Contract(addresses4.PKPPermissions.address, addresses4.PKPPermissions.abi, this.provider),\n write: new ethers_1.ethers.Contract(addresses4.PKPPermissions.address, addresses4.PKPPermissions.abi, this.signer)\n };\n }\n if (addresses4.PubkeyRouter.abi) {\n this.pubkeyRouterContract = {\n read: new ethers_1.ethers.Contract(addresses4.PubkeyRouter.address, addresses4.PubkeyRouter.abi, this.provider),\n write: new ethers_1.ethers.Contract(addresses4.PubkeyRouter.address, addresses4.PubkeyRouter.abi, this.signer)\n };\n }\n if (addresses4.RateLimitNFT.abi) {\n this.rateLimitNftContract = {\n read: new ethers_1.ethers.Contract(addresses4.RateLimitNFT.address, addresses4.RateLimitNFT.abi, this.provider),\n write: new ethers_1.ethers.Contract(addresses4.RateLimitNFT.address, addresses4.RateLimitNFT.abi, this.signer)\n };\n }\n if (addresses4.Staking.abi) {\n this.stakingContract = {\n read: new ethers_1.ethers.Contract(addresses4.Staking.address, addresses4.Staking.abi, this.provider),\n write: new ethers_1.ethers.Contract(addresses4.Staking.address, addresses4.Staking.abi, this.signer)\n };\n }\n if (addresses4.StakingBalances.abi) {\n this.stakingBalancesContract = {\n read: new ethers_1.ethers.Contract(addresses4.StakingBalances.address, addresses4.StakingBalances.abi, this.provider),\n write: new ethers_1.ethers.Contract(addresses4.StakingBalances.address, addresses4.StakingBalances.abi, this.signer)\n };\n }\n this.connected = true;\n };\n this.mintWithAuth = async ({ authMethod, scopes, pubkey, authMethodId, gasLimit }) => {\n if (!this.connected) {\n throw new constants_1.InitError({\n info: {\n connected: this.connected\n }\n }, \"Contracts are not connected. Please call connect() first\");\n }\n if (!this.pkpNftContract) {\n throw new constants_1.InitError({\n info: {\n pkpNftContract: this.pkpNftContract\n }\n }, \"Contract is not available\");\n }\n if (authMethod && !authMethod?.authMethodType) {\n throw new constants_1.ParamsMissingError({\n info: {\n authMethod\n }\n }, \"authMethodType is required\");\n }\n if (authMethod && !authMethod?.accessToken && authMethod?.accessToken !== \"custom-auth\") {\n throw new constants_1.ParamsMissingError({\n info: {\n authMethod\n }\n }, \"accessToken is required\");\n }\n if (scopes.length <= 0) {\n throw new constants_1.InvalidArgumentException({\n info: {\n scopes\n }\n }, `\\u274C Permission scopes are required!\n[0] No Permissions\n[1] Sign Anything\n[2] Only Sign Messages\nRead more here:\nhttps://developer.litprotocol.com/v3/sdk/wallets/auth-methods/#auth-method-scopes\n `);\n }\n const _pubkey = pubkey ?? \"0x\";\n const _scopes = scopes.map((scope) => {\n if (typeof scope === \"string\") {\n return ethers_1.ethers.BigNumber.from(scope);\n }\n if (typeof scope === \"number\") {\n return ethers_1.ethers.BigNumber.from(scope.toString());\n }\n return scope;\n });\n const _authMethodId = authMethodId ?? await (0, auth_utils_1.getAuthIdByAuthMethod)(authMethod);\n const mintCost = await this.pkpNftContract.read.mintCost();\n const tx = await this._callWithAdjustedOverrides(this.pkpHelperContract.write, \"mintNextAndAddAuthMethods\", [\n 2,\n // key type\n [authMethod.authMethodType],\n [_authMethodId],\n [_pubkey],\n [[..._scopes]],\n true,\n true\n ], { value: mintCost, gasLimit });\n const receipt = await tx.wait();\n const events = \"events\" in receipt ? receipt.events : receipt.logs;\n if (!events || events.length <= 0) {\n throw new constants_1.TransactionError({\n info: {\n events,\n receipt\n }\n }, \"No events found in receipt\");\n }\n if (!events[0].topics || events[0].topics.length < 1) {\n throw new constants_1.TransactionError({\n info: {\n events,\n receipt\n }\n }, `No topics found in events, cannot derive pkp information. Transaction hash: ${receipt.transactionHash} If you are using your own contracts please use ethers directly`);\n }\n const tokenId = events[0].topics[1];\n this.log(\"tokenId:\", tokenId);\n let tries = 0;\n const maxAttempts = 10;\n let publicKey = \"\";\n while (tries < maxAttempts) {\n publicKey = await this.pkpNftContract.read.getPubkey(tokenId);\n this.log(\"pkp pub key: \", publicKey);\n if (publicKey !== \"0x\") {\n break;\n }\n tries++;\n await new Promise((resolve) => {\n setTimeout(resolve, 1e4);\n });\n }\n if (publicKey.startsWith(\"0x\")) {\n publicKey = publicKey.slice(2);\n }\n const pubkeyBuffer = Buffer2.from(publicKey, \"hex\");\n const ethAddress2 = (0, utils_1.computeAddress)(pubkeyBuffer);\n return {\n pkp: {\n tokenId,\n publicKey,\n ethAddress: ethAddress2\n },\n tx: receipt\n };\n };\n this.mintWithCustomAuth = async (params) => {\n const authMethodId = typeof params.authMethodId === \"string\" ? (0, auth_utils_1.stringToArrayify)(params.authMethodId) : params.authMethodId;\n return this.mintWithAuth({\n ...params,\n authMethodId,\n authMethod: {\n authMethodType: params.authMethodType,\n accessToken: \"custom-auth\"\n }\n });\n };\n this.addPermittedAuthMethod = async ({ pkpTokenId, authMethodType, authMethodId, authMethodScopes, webAuthnPubkey }) => {\n const _authMethodId = typeof authMethodId === \"string\" ? (0, auth_utils_1.stringToArrayify)(authMethodId) : authMethodId;\n const _webAuthnPubkey = webAuthnPubkey ?? \"0x\";\n try {\n const res = await this._callWithAdjustedOverrides(this.pkpPermissionsContract.write, \"addPermittedAuthMethod\", [\n pkpTokenId,\n {\n authMethodType,\n id: _authMethodId,\n userPubkey: _webAuthnPubkey\n },\n authMethodScopes\n ]);\n const receipt = await res.wait();\n return receipt;\n } catch (e2) {\n throw new constants_1.TransactionError({\n info: {\n pkpTokenId,\n authMethodType,\n authMethodId,\n authMethodScopes,\n webAuthnPubkey\n },\n cause: e2\n }, \"Adding permitted action failed\");\n }\n };\n this.addPermittedAction = async ({ ipfsId, pkpTokenId, authMethodScopes }) => {\n const ipfsIdBytes = this.utils.getBytesFromMultihash(ipfsId);\n const scopes = authMethodScopes ?? [];\n try {\n const res = await this._callWithAdjustedOverrides(this.pkpPermissionsContract.write, \"addPermittedAction\", [pkpTokenId, ipfsIdBytes, scopes]);\n const receipt = await res.wait();\n return receipt;\n } catch (e2) {\n throw new constants_1.TransactionError({\n info: {\n pkpTokenId,\n ipfsIdBytes,\n scopes\n },\n cause: e2\n }, \"Adding permitted action failed\");\n }\n };\n this.mintCapacityCreditsNFT = async ({ requestsPerDay, requestsPerSecond, requestsPerKilosecond, daysUntilUTCMidnightExpiration, gasLimit }) => {\n this.log(\"Minting Capacity Credits NFT...\");\n if ((requestsPerDay === null || requestsPerDay === void 0 || requestsPerDay <= 0) && (requestsPerSecond === null || requestsPerSecond === void 0 || requestsPerSecond <= 0) && (requestsPerKilosecond === null || requestsPerKilosecond === void 0 || requestsPerKilosecond <= 0)) {\n throw new constants_1.InvalidArgumentException({\n info: {\n requestsPerDay,\n requestsPerSecond,\n requestsPerKilosecond\n }\n }, `At least one of requestsPerDay, requestsPerSecond, or requestsPerKilosecond is required and must be more than 0`);\n }\n let effectiveRequestsPerKilosecond;\n if (requestsPerDay !== void 0) {\n effectiveRequestsPerKilosecond = (0, utils_2.requestsToKilosecond)({\n period: \"day\",\n requests: requestsPerDay\n });\n } else if (requestsPerSecond !== void 0) {\n effectiveRequestsPerKilosecond = (0, utils_2.requestsToKilosecond)({\n period: \"second\",\n requests: requestsPerSecond\n });\n } else if (requestsPerKilosecond !== void 0) {\n effectiveRequestsPerKilosecond = requestsPerKilosecond;\n }\n if (effectiveRequestsPerKilosecond === void 0 || effectiveRequestsPerKilosecond <= 0) {\n throw new constants_1.InvalidArgumentException({\n info: {\n effectiveRequestsPerKilosecond\n }\n }, `Effective requests per kilosecond is required and must be more than 0`);\n }\n const expiresAt = (0, utils_2.calculateUTCMidnightExpiration)(daysUntilUTCMidnightExpiration);\n let mintCost;\n try {\n mintCost = await this.rateLimitNftContract.read.calculateCost(effectiveRequestsPerKilosecond, expiresAt);\n } catch (e2) {\n this.log(\"Error calculating mint cost:\", e2);\n throw e2;\n }\n this.log(\"Capacity Credits NFT mint cost:\", mintCost.toString());\n if (requestsPerDay)\n this.log(\"Requests per day:\", requestsPerDay);\n if (requestsPerSecond)\n this.log(\"Requests per second:\", requestsPerSecond);\n this.log(\"Effective requests per kilosecond:\", effectiveRequestsPerKilosecond);\n this.log(`Expires at (Unix Timestamp): ${expiresAt}`);\n const expirationDate = new Date(expiresAt * 1e3);\n this.log(\"Expiration Date (UTC):\", expirationDate.toUTCString());\n try {\n const res = await this._callWithAdjustedOverrides(this.rateLimitNftContract.write, \"mint\", [expiresAt], { value: mintCost, gasLimit });\n const txHash = res.hash;\n const tx = await res.wait();\n this.log(\"xx Transaction:\", tx);\n const tokenId = ethers_1.ethers.BigNumber.from(tx.logs[0].topics[3]);\n return {\n rliTxHash: txHash,\n capacityTokenId: tokenId,\n capacityTokenIdStr: tokenId.toString()\n };\n } catch (e2) {\n throw new constants_1.TransactionError({\n info: {\n requestsPerDay,\n requestsPerSecond,\n requestsPerKilosecond,\n expiresAt\n },\n cause: e2\n }, \"Minting capacity credits NFT failed\");\n }\n };\n this.utils = {\n hexToDec: hex2dec_1.hexToDec,\n decToHex: hex2dec_1.decToHex,\n /**\n * Partition multihash string into object representing multihash\n *\n * @param {string} multihash A base58 encoded multihash string\n * @returns {string}\n */\n getBytesFromMultihash: (multihash) => {\n const decoded = ethers_1.ethers.utils.base58.decode(multihash);\n return `0x${Buffer2.from(decoded).toString(\"hex\")}`;\n },\n /**\n *\n * Convert bytes32 to IPFS ID\n * @param { string } byte32 0x1220baa0d1e91f2a22fef53659418ddc3ac92da2a76d994041b86ed62c0c999de477\n * @returns { string } QmZKLGf3vgYsboM7WVUS9X56cJSdLzQVacNp841wmEDRkW\n */\n getMultihashFromBytes: (byte32) => {\n const text = byte32.replace(\"0x\", \"\");\n const digestSize = parseInt(text.slice(2, 4), 16);\n const digest2 = text.slice(4, 4 + digestSize * 2);\n const multihash = ethers_1.ethers.utils.base58.encode(Buffer2.from(`1220${digest2}`, \"hex\"));\n return multihash;\n },\n /**\n * NOTE: This function requires the \"multiformats/cid\" package in order to work\n *\n * Partition multihash string into object representing multihash\n *\n * @param {string} ipfsId A base58 encoded multihash string\n * @param {CIDParser} CID The CID object from the \"multiformats/cid\" package\n *\n * @example\n * const CID = require('multiformats/cid')\n * const ipfsId = 'QmZKLGf3vgYsboM7WVUS9X56cJSdLzQVacNp841wmEDRkW'\n * const bytes32 = getBytes32FromMultihash(ipfsId, CID)\n * console.log(bytes32)\n *\n * @returns {IPFSHash}\n */\n getBytes32FromMultihash: (ipfsId, CID) => {\n return (0, getBytes32FromMultihash_1.getBytes32FromMultihash)(ipfsId, CID);\n },\n // convert timestamp to YYYY/MM/DD format\n timestamp2Date: (timestamp) => {\n const date = require_date_and_time();\n const format = \"YYYY/MM/DD HH:mm:ss\";\n const timestampFormatted = new Date(parseInt(timestamp) * 1e3);\n return date.format(timestampFormatted, format);\n }\n };\n this.pkpNftContractUtils = {\n read: {\n /**\n * (IERC721Enumerable)\n *\n * Get all PKPs by a given address\n *\n * @param { string } ownerAddress\n * @retu\n * */\n getTokensByAddress: async (ownerAddress) => {\n if (!this.connected) {\n throw new constants_1.InitError({\n info: {\n connected: this.connected\n }\n }, \"Contracts are not connected. Please call connect() first\");\n }\n if (!this.pkpNftContract) {\n throw new constants_1.InitError({\n info: {\n pkpNftContract: this.pkpNftContract\n }\n }, \"Contract is not available\");\n }\n if (!ethers_1.ethers.utils.isAddress(ownerAddress)) {\n throw new constants_1.InvalidArgumentException({\n info: {\n ownerAddress\n }\n }, `Given string is not a valid address \"${ownerAddress}\"`);\n }\n const tokens = [];\n for (let i3 = 0; ; i3++) {\n let token;\n try {\n token = await this.pkpNftContract.read.tokenOfOwnerByIndex(ownerAddress, i3);\n token = this.utils.hexToDec(token.toHexString());\n tokens.push(token);\n } catch (e2) {\n this.log(`[getTokensByAddress] Ended search on index: ${i3}`);\n break;\n }\n }\n return tokens;\n },\n /**\n * (IERC721Enumerable)\n *\n * Get the x latest number of tokens\n *\n * @param { number } latestNumberOfTokens\n *\n * @returns { Array } a list of PKP NFTs\n *\n */\n getTokens: async (latestNumberOfTokens) => {\n if (!this.connected) {\n throw new constants_1.InitError({\n info: {\n connected: this.connected\n }\n }, \"Contracts are not connected. Please call connect() first\");\n }\n if (!this.pkpNftContract) {\n throw new constants_1.InitError({\n info: {\n pkpNftContract: this.pkpNftContract\n }\n }, \"Contract is not available\");\n }\n const tokens = [];\n for (let i3 = 0; ; i3++) {\n if (i3 >= latestNumberOfTokens) {\n break;\n }\n let token;\n try {\n token = await this.pkpNftContract.read.tokenByIndex(i3);\n token = this.utils.hexToDec(token.toHexString());\n tokens.push(token);\n } catch (e2) {\n this.log(`[getTokensByAddress] Ended search on index: ${i3}`);\n break;\n }\n }\n return tokens;\n },\n /**\n * Get info of all PKPs by a given address\n */\n getTokensInfoByAddress: async (ownerAddress) => {\n const tokenIds = await this.pkpNftContractUtils.read.getTokensByAddress(ownerAddress);\n const arr = [];\n for (let i3 = 0; i3 < tokenIds.length; i3++) {\n const tokenId = tokenIds[i3];\n const pubKey = await this.pkpNftContract.read.getPubkey(tokenId);\n const addrs = await (0, misc_2.derivedAddresses)({\n publicKey: pubKey\n });\n if (!addrs.tokenId) {\n addrs.tokenId = tokenId;\n }\n arr.push(addrs);\n }\n return arr;\n }\n },\n write: {\n mint: async (param) => {\n if (!this.connected) {\n throw new constants_1.InitError({\n info: {\n connected: this.connected\n }\n }, \"Contracts are not connected. Please call connect() first\");\n }\n if (!this.pkpNftContract) {\n throw new constants_1.InitError({\n info: {\n pkpNftContract: this.pkpNftContract\n }\n }, \"Contract is not available\");\n }\n let mintCost;\n try {\n mintCost = await this.pkpNftContract.read.mintCost();\n } catch (e2) {\n throw new constants_1.TransactionError({\n info: {\n mintCost\n },\n cause: e2\n }, \"Could not get mint cost\");\n }\n if (this.isPKP) {\n this.log(\"This is a PKP wallet, so we'll use the PKP wallet to sign the tx\");\n }\n this.log(\"...signing and sending tx\");\n const sentTx = await this._callWithAdjustedOverrides(this.pkpNftContract.write, \"mintNext\", [2], { value: mintCost, ...param });\n this.log(\"sentTx:\", sentTx);\n const res = await sentTx.wait();\n this.log(\"res:\", res);\n const events = \"events\" in res ? res.events : res.logs;\n const tokenIdFromEvent = events[0].topics[1];\n this.log(\"tokenIdFromEvent:\", tokenIdFromEvent);\n let tries = 0;\n const maxAttempts = 10;\n let publicKey = \"\";\n while (tries < maxAttempts) {\n publicKey = await this.pkpNftContract.read.getPubkey(tokenIdFromEvent);\n this.log(\"pkp pub key: \", publicKey);\n if (publicKey !== \"0x\") {\n break;\n }\n tries++;\n await new Promise((resolve) => {\n setTimeout(resolve, 1e4);\n });\n }\n this.log(\"public key from token id\", publicKey);\n if (publicKey.startsWith(\"0x\")) {\n publicKey = publicKey.slice(2);\n }\n const pubkeyBuffer = Buffer2.from(publicKey, \"hex\");\n const ethAddress2 = (0, utils_1.computeAddress)(pubkeyBuffer);\n return {\n pkp: {\n tokenId: tokenIdFromEvent,\n publicKey,\n ethAddress: ethAddress2\n },\n tx: sentTx,\n tokenId: tokenIdFromEvent,\n res\n };\n },\n claimAndMint: async (derivedKeyId, signatures, txOpts = {}) => {\n try {\n const tx = await this._callWithAdjustedOverrides(this.pkpNftContract.write, \"claimAndMint\", [2, derivedKeyId, signatures], {\n ...txOpts,\n value: txOpts.value ?? await this.pkpNftContract.read.mintCost()\n });\n const txRec = await tx.wait();\n const events = \"events\" in txRec ? txRec.events : txRec.logs;\n const tokenId = events[1].topics[1];\n return { tx, res: txRec, tokenId };\n } catch (e2) {\n this.log(`[claimAndMint] error: ${e2.message}`);\n throw new constants_1.TransactionError({\n info: {\n derivedKeyId,\n signatures,\n txOpts\n },\n cause: e2\n }, \"claimAndMint failed\");\n }\n }\n }\n };\n this.pkpPermissionsContractUtils = {\n read: {\n /**\n *\n * Check if an address is permitted\n *\n * @param { string } tokenId\n * @param { string } address\n *\n * @returns { Promise }\n */\n isPermittedAddress: async (tokenId, address) => {\n if (!this.connected) {\n throw new constants_1.InitError({\n info: {\n connected: this.connected\n }\n }, \"Contracts are not connected. Please call connect() first\");\n }\n if (!this.pkpPermissionsContract) {\n throw new constants_1.InitError({\n info: {\n pkpPermissionsContract: this.pkpPermissionsContract\n }\n }, \"Contract is not available\");\n }\n const pkpIdHex = this.utils.decToHex(tokenId, null);\n const bool = await this.pkpPermissionsContract.read.isPermittedAddress(pkpIdHex, address);\n return bool;\n },\n /**\n * Get permitted addresses\n *\n * @param { string } tokenId\n *\n * @returns { Promise> }\n *\n */\n getPermittedAddresses: async (tokenId) => {\n if (!this.connected) {\n throw new constants_1.InitError({\n info: {\n connected: this.connected\n }\n }, \"Contracts are not connected. Please call connect() first\");\n }\n if (!this.pkpPermissionsContract) {\n throw new constants_1.InitError({\n info: {\n pkpPermissionsContract: this.pkpPermissionsContract\n }\n }, \"Contract is not available\");\n }\n this.log(\"[getPermittedAddresses] input:\", tokenId);\n let addresses4 = [];\n const maxTries = 5;\n let tries = 0;\n while (tries < maxTries) {\n try {\n addresses4 = await this.pkpPermissionsContract.read.getPermittedAddresses(tokenId);\n if (addresses4.length <= 0) {\n await new Promise((resolve) => setTimeout(resolve, 1e3));\n tries++;\n continue;\n } else {\n break;\n }\n } catch (e2) {\n this.log(`[getPermittedAddresses] error:`, e2.message);\n tries++;\n }\n }\n return addresses4;\n },\n /**\n *\n * Get permitted action\n *\n * @param { any } tokenId\n *\n * @returns { Promise> }\n *\n */\n getPermittedActions: async (tokenId) => {\n if (!this.connected) {\n throw new constants_1.InitError({\n info: {\n connected: this.connected\n }\n }, \"Contracts are not connected. Please call connect() first\");\n }\n if (!this.pkpPermissionsContract) {\n throw new constants_1.InitError({\n info: {\n pkpPermissionsContract: this.pkpPermissionsContract\n }\n }, \"Contract is not available\");\n }\n let actions = [];\n const maxTries = 5;\n let tries = 0;\n while (tries < maxTries) {\n try {\n actions = await this.pkpPermissionsContract.read.getPermittedActions(tokenId);\n if (actions.length <= 0) {\n await new Promise((resolve) => setTimeout(resolve, 1e3));\n tries++;\n continue;\n } else {\n break;\n }\n } catch (e2) {\n this.log(`[getPermittedActions] error:`, e2.message);\n tries++;\n }\n }\n return actions;\n },\n /**\n *\n * Check if an action is permitted given the pkpid and ipfsId\n *\n * @param { string } pkpId 103309008291725705563022469659474510532358692659842796086905702509072063991354\n * @param { string } ipfsId QmZKLGf3vgYsboM7WVUS9X56cJSdLzQVacNp841wmEDRkW\n *\n * @return { object } transaction\n */\n isPermittedAction: async (pkpId, ipfsId) => {\n if (!this.connected) {\n throw new constants_1.InitError({\n info: {\n connected: this.connected\n }\n }, \"Contracts are not connected. Please call connect() first\");\n }\n if (!this.pkpPermissionsContract) {\n throw new constants_1.InitError({\n info: {\n pkpPermissionsContract: this.pkpPermissionsContract\n }\n }, \"Contract is not available\");\n }\n this.log(\"[isPermittedAction] input:\", pkpId);\n this.log(\"[isPermittedAction] input:\", ipfsId);\n const ipfsHash = this.utils.getBytesFromMultihash(ipfsId);\n this.log(\"[isPermittedAction] converted:\", ipfsHash);\n const bool = await this.pkpPermissionsContract.read.isPermittedAction(pkpId, ipfsHash);\n return bool;\n }\n },\n write: {\n /**\n *\n * Add permitted action to a given PKP id & ipfsId\n *\n * @param { string } pkpId 103309008291725705563022469659474510532358692659842796086905702509072063991354\n * @param { string } ipfsId QmZKLGf3vgYsboM7WVUS9X56cJSdLzQVacNp841wmEDRkW\n *\n * @return { object } transaction\n */\n addPermittedAction: async (pkpId, ipfsId) => {\n if (!this.connected) {\n throw new constants_1.InitError({\n info: {\n connected: this.connected\n }\n }, \"Contracts are not connected. Please call connect() first\");\n }\n if (!this.pkpPermissionsContract || !this.pubkeyRouterContract) {\n throw new constants_1.InitError({\n info: {\n pkpPermissionsContract: this.pkpPermissionsContract,\n pubkeyRouterContract: this.pubkeyRouterContract\n }\n }, \"Contract is not available\");\n }\n this.log(\"[addPermittedAction] input:\", pkpId);\n const pubKey = await this.pubkeyRouterContract.read.getPubkey(pkpId);\n this.log(\"[addPermittedAction] converted:\", pubKey);\n const pubKeyHash = ethers_1.ethers.utils.keccak256(pubKey);\n this.log(\"[addPermittedAction] converted:\", pubKeyHash);\n const tokenId = ethers_1.ethers.BigNumber.from(pubKeyHash);\n this.log(\"[addPermittedAction] converted:\", tokenId);\n this.log(\"[addPermittedAction] input:\", ipfsId);\n const ipfsIdBytes = this.utils.getBytesFromMultihash(ipfsId);\n this.log(\"[addPermittedAction] converted:\", ipfsIdBytes);\n const tx = await this._callWithAdjustedOverrides(this.pkpPermissionsContract.write, \"addPermittedAction\", [tokenId, ipfsIdBytes, [1]]);\n this.log(\"[addPermittedAction] output:\", tx);\n return tx;\n },\n /**\n * TODO: add transaction type\n * Add permitted action to a given PKP id & ipfsId\n *\n * @param { string } pkpId 103309008291725705563022469659474510532358692659842796086905702509072063991354\n * @param { string } ownerAddress 0x3B5dD2605.....22aDC499A1\n *\n * @return { object } transaction\n */\n addPermittedAddress: async (pkpId, ownerAddress) => {\n if (!this.connected) {\n throw new constants_1.InitError({\n info: {\n connected: this.connected\n }\n }, \"Contracts are not connected. Please call connect() first\");\n }\n if (!this.pkpPermissionsContract) {\n throw new constants_1.InitError({\n info: {\n pkpPermissionsContract: this.pkpPermissionsContract\n }\n }, \"Contract is not available\");\n }\n this.log(\"[addPermittedAddress] input:\", pkpId);\n this.log(\"[addPermittedAddress] input:\", ownerAddress);\n this.log(\"[addPermittedAddress] input:\", pkpId);\n const tx = await this._callWithAdjustedOverrides(this.pkpPermissionsContract.write, \"addPermittedAddress\", [pkpId, ownerAddress, [1]]);\n this.log(\"[addPermittedAddress] output:\", tx);\n return tx;\n },\n /**\n * Revoke permitted action of a given PKP id & ipfsId\n *\n * @param { string } pkpId 103309008291725705563022469659474510532358692659842796086905702509072063991354\n * @param { string } ipfsId QmZKLGf3vgYsboM7WVUS9X56cJSdLzQVacNp841wmEDRkW\n *\n * @return { object } transaction\n */\n revokePermittedAction: async (pkpId, ipfsId) => {\n if (!this.connected) {\n throw new constants_1.InitError({\n info: {\n connected: this.connected\n }\n }, \"Contracts are not connected. Please call connect() first\");\n }\n if (!this.pkpPermissionsContract) {\n throw new constants_1.InitError({\n info: {\n pkpPermissionsContract: this.pkpPermissionsContract\n }\n }, \"Contract is not available\");\n }\n this.log(\"[revokePermittedAction] input:\", pkpId);\n this.log(\"[revokePermittedAction] input:\", ipfsId);\n const ipfsHash = this.utils.getBytesFromMultihash(ipfsId);\n this.log(\"[revokePermittedAction] converted:\", ipfsHash);\n const tx = await this._callWithAdjustedOverrides(this.pkpPermissionsContract.write, \"removePermittedAction\", [pkpId, ipfsHash]);\n this.log(\"[revokePermittedAction] output:\", tx);\n return tx;\n }\n }\n };\n this.rateLimitNftContractUtils = {\n read: {\n /**\n * getCapacityByIndex: async (index: number): Promise => {\n *\n * This function takes a token index as a parameter and returns the capacity of the token\n * with the given index. The capacity is an object that contains the number of requests\n * per millisecond that the token allows, and an object with the expiration timestamp and\n * formatted expiration date of the token.\n *\n * @param {number} index - The index of the token.\n * @returns {Promise} - A promise that resolves to the capacity of the token.\n *\n * Example:\n *\n * const capacity = await getCapacityByIndex(1);\n * this.log(capacity);\n * // Output: {\n * // requestsPerMillisecond: 100,\n * // expiresAt: {\n * // timestamp: 1623472800,\n * // formatted: '2022-12-31',\n * // },\n * // }\n *\n * }\n */\n getCapacityByIndex: async (index2) => {\n if (!this.connected) {\n throw new constants_1.InitError({\n info: {\n connected: this.connected\n }\n }, \"Contracts are not connected. Please call connect() first\");\n }\n if (!this.rateLimitNftContract) {\n throw new constants_1.InitError({\n info: {\n rateLimitNftContract: this.rateLimitNftContract\n }\n }, \"Contract is not available\");\n }\n const capacity = await this.rateLimitNftContract.read.capacity(index2);\n return {\n requestsPerMillisecond: parseInt(capacity[0].toString()),\n expiresAt: {\n timestamp: parseInt(capacity[1].toString()),\n formatted: this.utils.timestamp2Date(capacity[1].toString())\n }\n };\n },\n /**\n * getTokenURIByIndex: async (index: number): Promise => {\n *\n * This function takes a token index as a parameter and returns the URI of the token\n * with the given index.\n *\n * @param {number} index - The index of the token.\n * @returns {Promise} - A promise that resolves to the URI of the token.\n *\n * Example:\n *\n * const URI = await getTokenURIByIndex(1);\n * this.log(URI);\n * // Output: 'https://tokens.com/1'\n *\n * }\n */\n getTokenURIByIndex: async (index2) => {\n if (!this.connected) {\n throw new constants_1.InitError({\n info: {\n connected: this.connected\n }\n }, \"Contracts are not connected. Please call connect() first\");\n }\n if (!this.rateLimitNftContract) {\n throw new constants_1.InitError({\n info: {\n rateLimitNftContract: this.rateLimitNftContract\n }\n }, \"Contract is not available\");\n }\n const base64 = await this.rateLimitNftContract.read.tokenURI(index2);\n const data = base64.split(\"data:application/json;base64,\")[1];\n const dataToString = Buffer2.from(data, \"base64\").toString(\"binary\");\n return JSON.parse(dataToString);\n },\n /**\n * getTokensByOwnerAddress: async (ownerAddress: string): Promise => {\n *\n * This function takes an owner address as a parameter and returns an array of tokens\n * that are owned by the given address.\n *\n * @param {string} ownerAddress - The address of the owner.\n * @returns {Promise} - A promise that resolves to an array of token objects.\n *\n * Example:\n *\n * const tokens = await getTokensByOwnerAddress('0x1234...5678');\n * this.log(tokens);\n * // Output: [\n * // {\n * // tokenId: 1,\n * // URI: 'https://tokens.com/1',\n * // capacity: 100,\n * // isExpired: false,\n * // },\n * // {\n * // tokenId: 2,\n * // URI: 'https://tokens.com/2',\n * // capacity: 200,\n * // isExpired: true,\n * // },\n * // ...\n * // ]\n *\n * }\n */\n getTokensByOwnerAddress: async (ownerAddress) => {\n if (!this.connected) {\n throw new constants_1.InitError({\n info: {\n connected: this.connected\n }\n }, \"Contracts are not connected. Please call connect() first\");\n }\n if (!this.rateLimitNftContract) {\n throw new constants_1.InitError({\n info: {\n rateLimitNftContract: this.rateLimitNftContract\n }\n }, \"Contract is not available\");\n }\n if (!ethers_1.ethers.utils.isAddress(ownerAddress)) {\n throw Error(`Given string is not a valid address \"${ownerAddress}\"`);\n }\n let total = await this.rateLimitNftContract.read.balanceOf(ownerAddress);\n total = parseInt(total.toString());\n const tokens = await (0, exports3.asyncForEachReturn)([...new Array(total)], async (_2, i3) => {\n if (!this.rateLimitNftContract) {\n throw new constants_1.InitError({\n info: {\n rateLimitNftContract: this.rateLimitNftContract\n }\n }, \"Contract is not available\");\n }\n const token = await this.rateLimitNftContract.read.tokenOfOwnerByIndex(ownerAddress, i3);\n const tokenIndex = parseInt(token.toString());\n const URI = await this.rateLimitNftContractUtils.read.getTokenURIByIndex(tokenIndex);\n const capacity = await this.rateLimitNftContractUtils.read.getCapacityByIndex(tokenIndex);\n const isExpired = await this.rateLimitNftContract.read.isExpired(tokenIndex);\n return {\n tokenId: parseInt(token.toString()),\n URI,\n capacity,\n isExpired\n };\n });\n return tokens;\n },\n /**\n * getTokens: async (): Promise => {\n *\n * This function returns an array of all tokens that have been minted.\n *\n * @returns {Promise} - A promise that resolves to an array of token objects.\n *\n * Example:\n *\n * const tokens = await getTokens();\n * this.log(tokens);\n * // Output: [\n * // {\n * // tokenId: 1,\n * // URI: 'https://tokens.com/1',\n * // capacity: 100,\n * // isExpired: false,\n * // },\n * // {\n * // tokenId: 2,\n * // URI: 'https://tokens.com/2',\n * // capacity: 200,\n * // isExpired: true,\n * // },\n * // ...\n * // ]\n *\n * }\n */\n getTokens: async () => {\n if (!this.connected) {\n throw new constants_1.InitError({\n info: {\n connected: this.connected\n }\n }, \"Contracts are not connected. Please call connect() first\");\n }\n if (!this.rateLimitNftContract) {\n throw new constants_1.InitError({\n info: {\n rateLimitNftContract: this.rateLimitNftContract\n }\n }, \"Contract is not available\");\n }\n const bigTotal = await this.rateLimitNftContract.read.totalSupply();\n const total = parseInt(bigTotal.toString());\n const tokens = await (0, exports3.asyncForEachReturn)([...new Array(total)], async (_2, i3) => {\n if (!this.rateLimitNftContract) {\n throw new constants_1.InitError({\n info: {\n rateLimitNftContract: this.rateLimitNftContract\n }\n }, \"Contract is not available\");\n }\n const token = await this.rateLimitNftContract.read.tokenByIndex(i3);\n const tokenIndex = parseInt(token.toString());\n const URI = await this.rateLimitNftContractUtils.read.getTokenURIByIndex(tokenIndex);\n const capacity = await this.rateLimitNftContractUtils.read.getCapacityByIndex(tokenIndex);\n const isExpired = await this.rateLimitNftContract.read.isExpired(tokenIndex);\n return {\n tokenId: parseInt(token.toString()),\n URI,\n capacity,\n isExpired\n };\n });\n return tokens;\n }\n },\n write: {\n mint: async ({ txOpts, timestamp }) => {\n if (!this.connected) {\n throw new constants_1.InitError({\n info: {\n connected: this.connected\n }\n }, \"Contracts are not connected. Please call connect() first\");\n }\n if (!this.rateLimitNftContract) {\n throw new constants_1.InitError({\n info: {\n rateLimitNftContract: this.rateLimitNftContract\n }\n }, \"Contract is not available\");\n }\n const tx = await this._callWithAdjustedOverrides(this.rateLimitNftContract.write, \"mint\", [timestamp], txOpts);\n const res = await tx.wait();\n const tokenIdFromEvent = res.events?.[0].topics[1];\n return { tx, tokenId: tokenIdFromEvent };\n },\n /**\n * Transfer RLI token from one address to another\n *\n * @property { string } fromAddress\n * @property { string } toAddress\n * @property { string } RLITokenAddress\n *\n * @return { > } void\n */\n transfer: async ({ fromAddress, toAddress, RLITokenAddress }) => {\n if (!this.connected) {\n throw new constants_1.InitError({\n info: {\n connected: this.connected\n }\n }, \"Contracts are not connected. Please call connect() first\");\n }\n if (!this.rateLimitNftContract) {\n throw new constants_1.InitError({\n info: {\n rateLimitNftContract: this.rateLimitNftContract\n }\n }, \"Contract is not available\");\n }\n const tx = await this._callWithAdjustedOverrides(this.rateLimitNftContract.write, \"transferFrom\", [fromAddress, toAddress, RLITokenAddress]);\n this.log(\"tx:\", tx);\n return tx;\n },\n /**\n * Prune expired Capacity Credits NFT (RLI) tokens for a specified owner address.\n * This function burns all expired RLI tokens owned by the target address, helping to clean up the blockchain.\n * Anyone can call this function to prune expired tokens for any address.\n *\n * @param {string} ownerAddress - The address of the owner to prune expired tokens for.\n * @returns {Promise} - A promise that resolves to the pruning response with transaction details.\n * @throws {Error} - If the input parameters are invalid or an error occurs during the pruning process.\n */\n pruneExpired: async (ownerAddress) => {\n this.log(\"Pruning expired Capacity Credits NFTs...\");\n if (!ownerAddress || !ethers_1.ethers.utils.isAddress(ownerAddress)) {\n throw new constants_1.InvalidArgumentException({\n info: {\n ownerAddress\n }\n }, `A valid owner address is required to prune expired tokens`);\n }\n this.log(`Target owner address: ${ownerAddress}`);\n try {\n const pruneExpiredABI = [\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n }\n ],\n name: \"pruneExpired\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n }\n ];\n const contractAddress = this.rateLimitNftContract.read.address;\n const contract = new ethers_1.ethers.Contract(contractAddress, pruneExpiredABI, this.signer);\n const res = await contract[\"pruneExpired\"](ownerAddress);\n const txHash = res.hash;\n this.log(`Prune transaction submitted: ${txHash}`);\n const tx = await res.wait();\n this.log(\"Prune transaction confirmed:\", tx);\n const burnEvents = tx.logs.filter((log) => {\n try {\n const parsedLog = this.rateLimitNftContract.read.interface.parseLog(log);\n return parsedLog.name === \"Transfer\" && parsedLog.args[\"to\"] === ethers_1.ethers.constants.AddressZero;\n } catch {\n return false;\n }\n });\n const actualTokensBurned = burnEvents.length;\n this.log(`Successfully burned ${actualTokensBurned} expired tokens`);\n this.log(`Gas used: ${tx.gasUsed.toString()}`);\n return {\n txHash,\n actualTokensBurned\n };\n } catch (e2) {\n throw new constants_1.TransactionError({\n info: {\n ownerAddress\n },\n cause: e2\n }, \"Pruning expired capacity credits NFTs failed\");\n }\n }\n }\n };\n this.routerContractUtils = {\n read: {\n /**\n *\n * Convert IPFS response from Solidity to IPFS ID\n * From: \"0xb4200a696794b8742fab705a8c065ea6788a76bc6d270c0bc9ad900b6ed74ebc\"\n * To: \"QmUnwHVcaymJWiYGQ6uAHvebGtmZ8S1r9E6BVmJMtuK5WY\"\n *\n * @param { string } solidityIpfsId\n *\n * @return { Promise }\n */\n // getIpfsIds: async (solidityIpfsId: string): Promise => {\n // this.log('[getIpfsIds] input:', solidityIpfsId);\n // const ipfsId = this.utils.getMultihashFromBytes(solidityIpfsId);\n // this.log('[getIpfsIds] output:', ipfsId);\n // return ipfsId;\n // },\n },\n write: {}\n };\n this.pkpHelperContractUtil = {\n read: {},\n write: {\n /**\n *\n * @param param0\n * @returns\n */\n mintNextAndAddAuthMethods: async ({ keyType, permittedAuthMethodTypes, permittedAuthMethodIds, permittedAuthMethodPubkeys, permittedAuthMethodScopes, addPkpEthAddressAsPermittedAddress, sendPkpToItself, gasLimit }) => {\n const mintCost = await this.pkpNftContract.read.mintCost();\n const tx = await this._callWithAdjustedOverrides(this.pkpHelperContract.write, \"mintNextAndAddAuthMethods\", [\n keyType,\n permittedAuthMethodTypes,\n permittedAuthMethodIds,\n permittedAuthMethodPubkeys,\n permittedAuthMethodScopes,\n addPkpEthAddressAsPermittedAddress,\n sendPkpToItself\n ], { value: mintCost, gasLimit });\n return tx;\n }\n // claimAndMintNextAndAddAuthMethods: async (\n // keyType: number,\n // derivedKeyId: string,\n // signatures: pkpHelperContract.IPubkeyRouter.SignatureStruct[],\n // permittedAuthMethodTypes: string[],\n // permittedAuthMethodIds: string[],\n // permittedAuthMethodPubkeys: string[],\n // permittedAuthMethodScopes: string[][],\n // addPkpEthAddressAsPermittedAddress: boolean,\n // sendPkpToItself: boolean\n // ): Promise => {\n // const mintCost = await this.pkpNftContract.read.mintCost();\n // this.pkpHelperContract.write.claimAndMintNextAndAddAuthMethods(\n // keyType,\n // `0x${derivedKeyId}` as BytesLike,\n // signatures,\n // permittedAuthMethodTypes,\n // permittedAuthMethodIds as BytesLike[],\n // permittedAuthMethodPubkeys as BytesLike[],\n // permittedAuthMethodScopes,\n // addPkpEthAddressAsPermittedAddress,\n // sendPkpToItself,\n // { value: mintCost }\n // );\n // },\n }\n };\n this._getAdjustedGasLimit = async (contract, method, args2, overrides = {}, gasLimitAdjustment = GAS_LIMIT_ADJUSTMENT) => {\n const gasLimit = await contract.estimateGas[method](...args2, overrides);\n return gasLimit.mul(gasLimitAdjustment).div(100);\n };\n this.customContext = args?.customContext;\n this.rpc = args?.rpc;\n this.rpcs = args?.rpcs;\n this.signer = args?.signer;\n this.privateKey = args?.privateKey;\n this.provider = args?.provider;\n this.randomPrivateKey = args?.randomPrivatekey ?? false;\n this.options = args?.options;\n this.debug = args?.debug ?? false;\n this.network = args?.network || constants_1.LIT_NETWORK.DatilDev;\n if (!this.rpc) {\n this.rpc = constants_1.RPC_URL_BY_NETWORK[this.network];\n }\n if (!this.rpcs) {\n this.rpcs = [this.rpc];\n }\n this.allowlistContract = {};\n this.litTokenContract = {};\n this.multisenderContract = {};\n this.pkpHelperContract = {};\n this.pkpNftContract = {};\n this.pkpNftMetadataContract = {};\n this.pkpPermissionsContract = {};\n this.pubkeyRouterContract = {};\n this.rateLimitNftContract = {};\n this.stakingContract = {};\n this.stakingBalancesContract = {};\n }\n /**\n * Retrieves the Staking contract instance based on the provided network, context, and RPC URL.\n * If a context is provided, it determines if a contract resolver is used for bootstrapping contracts.\n * If a resolver address is present in the context, it retrieves the Staking contract from the contract resolver instance.\n * Otherwise, it retrieves the Staking contract using the contract address and ABI from the contract context.\n * Throws an error if required contract data is missing or if the Staking contract cannot be obtained.\n *\n * @param network - The network key.\n * @param context - The contract context or contract resolver context.\n * @param rpcUrl - The RPC URL.\n * @returns The Staking contract instance.\n * @throws Error if required contract data is missing or if the Staking contract cannot be obtained.\n */\n static async getStakingContract(network, context2, rpcUrl) {\n let provider;\n const _rpcUrl = rpcUrl || constants_1.RPC_URL_BY_NETWORK[network];\n if (context2 && \"provider\" in context2) {\n provider = context2.provider;\n } else {\n provider = new ethers_1.ethers.providers.StaticJsonRpcProvider({\n url: _rpcUrl,\n skipFetchSetup: true\n });\n }\n if (!context2) {\n const contractData = await _a._resolveContractContext(\n network\n //context\n );\n const stakingContract = contractData.find((item) => item.name === \"Staking\");\n const { address, abi: abi2 } = stakingContract;\n if (!address || !abi2) {\n throw new constants_1.InitError({\n info: {\n address,\n abi: abi2,\n network\n }\n }, \"\\u274C Required contract data is missing\");\n }\n return new ethers_1.ethers.Contract(address, abi2, provider);\n } else {\n if (!context2.resolverAddress) {\n const stakingContract = context2.Staking;\n if (!stakingContract.address) {\n throw new constants_1.InitError({\n info: {\n stakingContract,\n context: context2\n }\n }, \"\\u274C Could not get staking contract address from contract context\");\n }\n return new ethers_1.ethers.Contract(stakingContract.address, stakingContract.abi ?? StakingData_1.StakingData.abi, provider);\n } else {\n const contractContext = await _a._getContractsFromResolver(context2, provider, [\"Staking\"]);\n if (!contractContext.Staking.address) {\n throw new constants_1.InitError({\n info: {\n contractContext,\n context: context2\n }\n }, \"\\u274C Could not get Staking Contract from contract resolver instance\");\n }\n const stakingABI = constants_1.NETWORK_CONTEXT_BY_NETWORK[network].data.find((data) => {\n return data.name === \"Staking\";\n });\n return new ethers_1.ethers.Contract(contractContext.Staking.address, contractContext.Staking.abi ?? stakingABI?.contracts[0].ABI, provider);\n }\n }\n }\n static async _getContractsFromResolver(context2, provider, contractNames) {\n const resolverContract = new ethers_1.ethers.Contract(context2.resolverAddress, context2.abi, provider);\n const getContract2 = async function(contract, environment) {\n let address = \"\";\n switch (contract) {\n case \"Allowlist\":\n case \"AllowList\":\n address = await resolverContract[\"getContract\"](await resolverContract[\"ALLOWLIST_CONTRACT\"](), environment);\n break;\n case \"LITToken\":\n address = await resolverContract[\"getContract\"](await resolverContract[\"LIT_TOKEN_CONTRACT\"](), environment);\n break;\n case \"Multisender\":\n address = await resolverContract[\"getContract\"](await resolverContract[\"MULTI_SENDER_CONTRACT\"](), environment);\n break;\n case \"PKPNFT\":\n address = await resolverContract[\"getContract\"](await resolverContract[\"PKP_NFT_CONTRACT\"](), environment);\n break;\n case \"PKPNFTMetadata\":\n address = await resolverContract[\"getContract\"](await resolverContract[\"PKP_NFT_METADATA_CONTRACT\"](), environment);\n break;\n case \"PKPPermissions\":\n address = await resolverContract[\"getContract\"](await resolverContract[\"PKP_PERMISSIONS_CONTRACT\"](), environment);\n break;\n case \"PKPHelper\":\n address = await resolverContract[\"getContract\"](await resolverContract[\"PKP_HELPER_CONTRACT\"](), environment);\n break;\n case \"PubkeyRouter\":\n address = await resolverContract[\"getContract\"](await resolverContract[\"PUB_KEY_ROUTER_CONTRACT\"](), environment);\n break;\n case \"RateLimitNFT\":\n address = await resolverContract[\"getContract\"](await resolverContract[\"RATE_LIMIT_NFT_CONTRACT\"](), environment);\n break;\n case \"Staking\":\n address = await resolverContract[\"getContract\"](await resolverContract[\"STAKING_CONTRACT\"](), environment);\n break;\n case \"StakingBalances\":\n address = await resolverContract[\"getContract\"](await resolverContract[\"STAKING_BALANCES_CONTRACT\"](), environment);\n break;\n }\n return address;\n };\n const names = contractNames ?? _a.contractNames;\n const contractContext = {};\n await Promise.all(names.map(async (contractName) => {\n const contracts2 = context2?.contractContext;\n contractContext[contractName] = {\n address: await getContract2(contractName, context2.environment),\n abi: contracts2?.[contractName]?.abi ?? void 0\n };\n }));\n return contractContext;\n }\n static async getContractAddresses(network, provider, context2) {\n let contractData;\n if (context2) {\n if (context2?.resolverAddress) {\n context2 = await _a._getContractsFromResolver(context2, provider);\n }\n const flatten = [];\n const keys = Object.keys(context2);\n for (const key of keys) {\n context2[key].name = key;\n flatten.push(context2[key]);\n }\n contractData = flatten;\n } else {\n contractData = await _a._resolveContractContext(network);\n }\n const addresses4 = {};\n for (const contract of contractData) {\n switch (contract.name) {\n case \"Allowlist\":\n addresses4.Allowlist = {};\n addresses4.Allowlist.address = contract.address;\n addresses4.Allowlist.abi = contract.abi ?? AllowlistData_1.AllowlistData.abi;\n break;\n case \"PKPHelper\":\n addresses4.PKPHelper = {};\n addresses4.PKPHelper.address = contract.address;\n addresses4.PKPHelper.abi = contract?.abi ?? PKPHelperData_1.PKPHelperData.abi;\n break;\n case \"PKPNFT\":\n addresses4.PKPNFT = {};\n addresses4.PKPNFT.address = contract.address;\n addresses4.PKPNFT.abi = contract?.abi ?? PKPNFTData_1.PKPNFTData.abi;\n break;\n case \"Staking\":\n addresses4.Staking = {};\n addresses4.Staking.address = contract.address;\n addresses4.Staking.abi = contract.abi ?? StakingData_1.StakingData.abi;\n break;\n case \"RateLimitNFT\":\n addresses4.RateLimitNFT = {};\n addresses4.RateLimitNFT.address = contract.address;\n addresses4.RateLimitNFT.abi = contract.abi ?? RateLimitNFTData_1.RateLimitNFTData.abi;\n break;\n case \"PKPPermissions\":\n addresses4.PKPPermissions = {};\n addresses4.PKPPermissions.address = contract.address;\n addresses4.PKPPermissions.abi = contract.abi ?? PKPPermissionsData_1.PKPPermissionsData.abi;\n break;\n case \"PKPNFTMetadata\":\n addresses4.PKPNFTMetadata = {};\n addresses4.PKPNFTMetadata.address = contract.address;\n addresses4.PKPNFTMetadata.abi = contract.abi ?? PKPNFTMetadataData_1.PKPNFTMetadataData.abi;\n break;\n case \"PubkeyRouter\":\n addresses4.PubkeyRouter = {};\n addresses4.PubkeyRouter.address = contract.address;\n addresses4.PubkeyRouter.abi = contract?.abi ?? PubkeyRouterData_1.PubkeyRouterData.abi;\n break;\n case \"LITToken\":\n addresses4.LITToken = {};\n addresses4.LITToken.address = contract.address;\n addresses4.LITToken.abi = contract?.abi ?? LITTokenData_1.LITTokenData.abi;\n break;\n case \"StakingBalances\":\n addresses4.StakingBalances = {};\n addresses4.StakingBalances.address = contract.address;\n addresses4.StakingBalances.abi = contract.abi ?? StakingBalancesData_1.StakingBalancesData.abi;\n break;\n case \"Multisender\":\n addresses4.Multisender = {};\n addresses4.Multisender.address = contract.address;\n addresses4.Multisender.abi = contract?.abi ?? MultisenderData_1.MultisenderData.abi;\n break;\n }\n }\n if (Object.keys(addresses4).length < 5) {\n throw new constants_1.InitError({\n info: {\n network,\n addresses: addresses4,\n context: context2\n }\n }, \"\\u274C Required contract data is missing\");\n }\n return addresses4;\n }\n static async _resolveContractContext(network) {\n if (!constants_1.NETWORK_CONTEXT_BY_NETWORK[network]) {\n throw new constants_1.WrongNetworkException({\n info: {\n network\n }\n }, `[_resolveContractContext] Unsupported network: ${network}`);\n }\n const data = constants_1.NETWORK_CONTEXT_BY_NETWORK[network];\n if (!data) {\n throw new constants_1.WrongNetworkException({\n info: {\n network\n }\n }, \"[_resolveContractContext] No data found\");\n }\n return data.data.map((c4) => ({\n address: c4.contracts[0].address_hash,\n abi: c4.contracts[0].ABI,\n name: c4.name\n }));\n }\n async _callWithAdjustedOverrides(contract, method, args, overrides = {}, gasLimitAdjustment = GAS_LIMIT_ADJUSTMENT) {\n if (!(method in contract.functions)) {\n throw new Error(`Method ${String(method)} does not exist on the contract`);\n }\n const gasLimit = overrides.gasLimit ?? await this._getAdjustedGasLimit(contract, method, args, overrides, gasLimitAdjustment);\n return contract.functions[method](...args, {\n ...overrides,\n gasLimit\n });\n }\n };\n exports3.LitContracts = LitContracts;\n _a = LitContracts;\n LitContracts.contractNames = [\n \"Allowlist\",\n \"Staking\",\n \"RateLimitNFT\",\n \"PubkeyRouter\",\n \"PKPHelper\",\n \"PKPPermissions\",\n \"PKPNFTMetadata\",\n \"PKPNFT\",\n \"Multisender\",\n \"LITToken\",\n \"StakingBalances\"\n ];\n LitContracts.logger = logger_1.LogManager.Instance.get(\"contract-sdk\");\n LitContracts.getMinNodeCount = async (network, context2, rpcUrl) => {\n const contract = await _a.getStakingContract(network, context2, rpcUrl);\n const minNodeCount = await contract[\"currentValidatorCountForConsensus\"]();\n if (!minNodeCount) {\n throw new constants_1.InitError({\n info: {\n minNodeCount\n }\n }, \"\\u274C Minimum validator count is not set\");\n }\n return minNodeCount;\n };\n LitContracts.getValidators = async (network, context2, rpcUrl, nodeProtocol) => {\n const contract = await _a.getStakingContract(network, context2, rpcUrl);\n const [activeValidators, currentValidatorsCount, kickedValidators] = await Promise.all([\n contract[\"getValidatorsInCurrentEpoch\"](),\n contract[\"currentValidatorCountForConsensus\"](),\n contract[\"getKickedValidators\"]()\n ]);\n const validators = [];\n if (activeValidators.length - kickedValidators.length >= currentValidatorsCount) {\n for (const validator of activeValidators) {\n validators.push(validator);\n }\n } else {\n _a.logger.error(\"\\u274C Active validator set does not meet the threshold\");\n }\n const cleanedActiveValidators = activeValidators.filter((av) => !kickedValidators.some((kv) => kv === av));\n const activeValidatorStructs = (await contract[\"getValidatorsStructs\"](cleanedActiveValidators)).map((item) => {\n return {\n ip: item[0],\n ipv6: item[1],\n port: item[2],\n nodeAddress: item[3],\n reward: item[4],\n seconderPubkey: item[5],\n receiverPubkey: item[6]\n };\n });\n const networks = activeValidatorStructs.map((item) => {\n const centralisation = constants_1.CENTRALISATION_BY_NETWORK[network];\n const ip = (0, hex2dec_1.intToIP)(item.ip);\n const port = item.port;\n const protocol = (\n // If nodeProtocol is defined, use it\n nodeProtocol || // If port is 443, use HTTPS, otherwise use network-specific HTTP\n (port === 443 ? constants_1.HTTPS : constants_1.HTTP_BY_NETWORK[network]) || // Fallback to HTTP if no other conditions are met\n constants_1.HTTP\n );\n const url = `${protocol}${ip}:${port}`;\n _a.logger.debug(\"Validator's URL:\", url);\n return url;\n });\n return networks;\n };\n LitContracts.getConnectionInfo = async ({ litNetwork, networkContext, rpcUrl, nodeProtocol }) => {\n const stakingContract = await _a.getStakingContract(litNetwork, networkContext, rpcUrl);\n const [epochInfo, minNodeCount, activeUnkickedValidatorStructs] = await stakingContract[\"getActiveUnkickedValidatorStructsAndCounts\"]();\n const typedEpochInfo = {\n epochLength: ethers_1.ethers.BigNumber.from(epochInfo[0]).toNumber(),\n number: ethers_1.ethers.BigNumber.from(epochInfo[1]).toNumber(),\n endTime: ethers_1.ethers.BigNumber.from(epochInfo[2]).toNumber(),\n retries: ethers_1.ethers.BigNumber.from(epochInfo[3]).toNumber(),\n timeout: ethers_1.ethers.BigNumber.from(epochInfo[4]).toNumber()\n };\n const minNodeCountInt = ethers_1.ethers.BigNumber.from(minNodeCount).toNumber();\n if (!minNodeCountInt) {\n throw new Error(\"\\u274C Minimum validator count is not set\");\n }\n if (activeUnkickedValidatorStructs.length < minNodeCountInt) {\n throw new Error(`\\u274C Active validator set does not meet the threshold. Required: ${minNodeCountInt} but got: ${activeUnkickedValidatorStructs.length}`);\n }\n const activeValidatorStructs = activeUnkickedValidatorStructs.map((item) => {\n return {\n ip: item[0],\n ipv6: item[1],\n port: item[2],\n nodeAddress: item[3],\n reward: item[4],\n seconderPubkey: item[5],\n receiverPubkey: item[6]\n };\n });\n const networks = activeValidatorStructs.map((item) => {\n const centralisation = constants_1.CENTRALISATION_BY_NETWORK[litNetwork];\n const ip = (0, hex2dec_1.intToIP)(item.ip);\n const port = item.port;\n const protocol = (\n // If nodeProtocol is defined, use it\n nodeProtocol || // If port is 443, use HTTPS, otherwise use network-specific HTTP\n (port === 443 ? constants_1.HTTPS : constants_1.HTTP_BY_NETWORK[litNetwork]) || // Fallback to HTTP if no other conditions are met\n constants_1.HTTP\n );\n const url = `${protocol}${ip}:${port}`;\n _a.logger.debug(\"Validator's URL:\", url);\n return url;\n });\n return {\n stakingContract,\n epochInfo: typedEpochInfo,\n minNodeCount: minNodeCountInt,\n bootstrapUrls: networks\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/index.js\n var require_src5 = __commonJS({\n \"../../../node_modules/.pnpm/@lit-protocol+contracts-sdk@7.3.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@lit-protocol/contracts-sdk/src/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));\n tslib_1.__exportStar(require_contracts_sdk(), exports3);\n tslib_1.__exportStar(require_utils12(), exports3);\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/internal/wrapped-keys/getVincentWrappedKeysAccs.js\n var require_getVincentWrappedKeysAccs = __commonJS({\n \"../../libs/contracts-sdk/dist/src/internal/wrapped-keys/getVincentWrappedKeysAccs.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getVincentWrappedKeysAccs = getVincentWrappedKeysAccs;\n var ethers_1 = require_lib32();\n var constants_1 = require_src();\n var contracts_sdk_1 = require_src5();\n var constants_2 = require_constants3();\n var pkpInfo_1 = require_pkpInfo();\n var CHAIN_YELLOWSTONE = \"yellowstone\";\n async function getVincentWrappedKeysAccs({ delegatorAddress }) {\n if (!ethers_1.ethers.utils.isAddress(delegatorAddress)) {\n throw new Error(`delegatorAddress is not a valid Ethereum Address: ${delegatorAddress}`);\n }\n const delegatorPkpTokenId = (await (0, pkpInfo_1.getPkpTokenId)({\n pkpEthAddress: delegatorAddress,\n signer: ethers_1.ethers.Wallet.createRandom().connect(new ethers_1.ethers.providers.StaticJsonRpcProvider(constants_1.LIT_RPC.CHRONICLE_YELLOWSTONE))\n // Read only; signer identity is irrelevant in this code path :),\n })).toString();\n return Promise.all([\n getDelegateeAccessControlConditions({\n delegatorPkpTokenId\n }),\n Promise.resolve({ operator: \"or\" }),\n getPlatformUserAccessControlConditions({\n delegatorPkpTokenId\n })\n ]);\n }\n async function getDelegateeAccessControlConditions({ delegatorPkpTokenId }) {\n const contractInterface = new ethers_1.ethers.utils.Interface(constants_2.COMBINED_ABI.fragments);\n const fragment = contractInterface.getFunction(\"isDelegateePermitted\");\n const functionAbi = {\n type: \"function\",\n name: fragment.name,\n inputs: fragment.inputs.map((input) => ({\n name: input.name,\n type: input.type\n })),\n outputs: fragment.outputs?.map((output) => ({\n name: output.name,\n type: output.type\n })),\n stateMutability: fragment.stateMutability\n };\n return {\n contractAddress: constants_2.VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD,\n chain: CHAIN_YELLOWSTONE,\n functionAbi,\n functionName: \"isDelegateePermitted\",\n functionParams: [\":userAddress\", delegatorPkpTokenId, \":currentActionIpfsId\"],\n returnValueTest: {\n key: \"isPermitted\",\n comparator: \"=\",\n value: \"true\"\n }\n };\n }\n async function getPlatformUserAccessControlConditions({ delegatorPkpTokenId }) {\n const contractAddresses = await contracts_sdk_1.LitContracts.getContractAddresses(constants_1.LIT_NETWORK.Datil, new ethers_1.ethers.providers.StaticJsonRpcProvider(constants_1.LIT_RPC.CHRONICLE_YELLOWSTONE));\n const pkpNftContractInfo = contractAddresses.PKPNFT;\n if (!pkpNftContractInfo) {\n throw new Error(\"PKP NFT contract address not found for Datil network\");\n }\n return {\n contractAddress: pkpNftContractInfo.address,\n chain: CHAIN_YELLOWSTONE,\n functionAbi: {\n type: \"function\",\n name: \"ownerOf\",\n inputs: [\n {\n name: \"tokenId\",\n type: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n functionName: \"ownerOf\",\n functionParams: [delegatorPkpTokenId],\n returnValueTest: {\n key: \"\",\n comparator: \"=\",\n value: \":userAddress\"\n }\n };\n }\n }\n });\n\n // ../../libs/contracts-sdk/dist/src/index.js\n var require_src6 = __commonJS({\n \"../../libs/contracts-sdk/dist/src/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getVincentWrappedKeysAccs = exports3.createContract = exports3.getClient = exports3.clientFromContract = exports3.getTestClient = void 0;\n var contractClient_1 = require_contractClient();\n Object.defineProperty(exports3, \"getTestClient\", { enumerable: true, get: function() {\n return contractClient_1.getTestClient;\n } });\n Object.defineProperty(exports3, \"clientFromContract\", { enumerable: true, get: function() {\n return contractClient_1.clientFromContract;\n } });\n Object.defineProperty(exports3, \"getClient\", { enumerable: true, get: function() {\n return contractClient_1.getClient;\n } });\n var utils_1 = require_utils7();\n Object.defineProperty(exports3, \"createContract\", { enumerable: true, get: function() {\n return utils_1.createContract;\n } });\n var getVincentWrappedKeysAccs_1 = require_getVincentWrappedKeysAccs();\n Object.defineProperty(exports3, \"getVincentWrappedKeysAccs\", { enumerable: true, get: function() {\n return getVincentWrappedKeysAccs_1.getVincentWrappedKeysAccs;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/policyParameters/getOnchainPolicyParams.js\n var require_getOnchainPolicyParams = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/policyParameters/getOnchainPolicyParams.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getPoliciesAndAppVersion = exports3.getDecodedPolicyParams = void 0;\n var ethers_1 = require_lib32();\n var vincent_contracts_sdk_1 = require_src6();\n var utils_1 = require_utils();\n var getDecodedPolicyParams = async ({ decodedPolicies, policyIpfsCid }) => {\n console.log(\"All on-chain policy params:\", JSON.stringify(decodedPolicies, utils_1.bigintReplacer));\n const policyParams = decodedPolicies[policyIpfsCid];\n if (policyParams) {\n return policyParams;\n }\n console.log(\"Found no on-chain parameters for policy IPFS CID:\", policyIpfsCid);\n return void 0;\n };\n exports3.getDecodedPolicyParams = getDecodedPolicyParams;\n var getPoliciesAndAppVersion = async ({ delegationRpcUrl, appDelegateeAddress, agentWalletPkpEthAddress, abilityIpfsCid }) => {\n console.log(\"getPoliciesAndAppVersion\", {\n delegationRpcUrl,\n appDelegateeAddress,\n agentWalletPkpEthAddress,\n abilityIpfsCid\n });\n try {\n const signer = ethers_1.ethers.Wallet.createRandom().connect(new ethers_1.ethers.providers.StaticJsonRpcProvider(delegationRpcUrl));\n const contractClient = (0, vincent_contracts_sdk_1.getClient)({\n signer\n });\n const validationResult = await contractClient.validateAbilityExecutionAndGetPolicies({\n delegateeAddress: appDelegateeAddress,\n pkpEthAddress: agentWalletPkpEthAddress,\n abilityIpfsCid\n });\n if (!validationResult.isPermitted) {\n throw new Error(`App Delegatee: ${appDelegateeAddress} is not permitted to execute Vincent Ability: ${abilityIpfsCid} for App ID: ${validationResult.appId} App Version: ${validationResult.appVersion} using Agent Wallet PKP Address: ${agentWalletPkpEthAddress}`);\n }\n return {\n appId: ethers_1.ethers.BigNumber.from(validationResult.appId),\n appVersion: ethers_1.ethers.BigNumber.from(validationResult.appVersion),\n decodedPolicies: validationResult.decodedPolicies\n };\n } catch (error) {\n throw new Error(`Error getting on-chain policy parameters from Vincent contract using App Delegatee: ${appDelegateeAddress} and Agent Wallet PKP Address: ${agentWalletPkpEthAddress} and Vincent Ability: ${abilityIpfsCid}: ${error instanceof Error ? error.message : String(error)}`);\n }\n };\n exports3.getPoliciesAndAppVersion = getPoliciesAndAppVersion;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/handlers/constants.js\n var require_constants6 = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/handlers/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LIT_DATIL_PUBKEY_ROUTER_ADDRESS = void 0;\n exports3.LIT_DATIL_PUBKEY_ROUTER_ADDRESS = \"0xF182d6bEf16Ba77e69372dD096D8B70Bc3d5B475\";\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/handlers/vincentPolicyHandler.js\n var require_vincentPolicyHandler = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/handlers/vincentPolicyHandler.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.vincentPolicyHandler = vincentPolicyHandler;\n var ethers_1 = require_lib32();\n var helpers_1 = require_helpers2();\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n var helpers_2 = require_helpers();\n var getOnchainPolicyParams_1 = require_getOnchainPolicyParams();\n var utils_1 = require_utils();\n var constants_1 = require_constants6();\n async function vincentPolicyHandler({ vincentPolicy, context: context2, abilityParams: abilityParams2 }) {\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion);\n const { delegatorPkpEthAddress, abilityIpfsCid } = context2;\n console.log(\"actionIpfsIds:\", LitAuth.actionIpfsIds.join(\",\"));\n const policyIpfsCid = LitAuth.actionIpfsIds[0];\n console.log(\"context:\", JSON.stringify(context2, utils_1.bigintReplacer));\n try {\n const delegationRpcUrl = await Lit.Actions.getRpcUrl({\n chain: \"yellowstone\"\n });\n const userPkpInfo = await (0, helpers_1.getPkpInfo)({\n litPubkeyRouterAddress: constants_1.LIT_DATIL_PUBKEY_ROUTER_ADDRESS,\n yellowstoneRpcUrl: delegationRpcUrl,\n pkpEthAddress: delegatorPkpEthAddress\n });\n const appDelegateeAddress = ethers_1.ethers.utils.getAddress(LitAuth.authSigAddress);\n console.log(\"appDelegateeAddress\", appDelegateeAddress);\n const { decodedPolicies, appId, appVersion } = await (0, getOnchainPolicyParams_1.getPoliciesAndAppVersion)({\n delegationRpcUrl,\n appDelegateeAddress,\n agentWalletPkpEthAddress: delegatorPkpEthAddress,\n abilityIpfsCid\n });\n const baseContext = {\n delegation: {\n delegateeAddress: appDelegateeAddress,\n delegatorPkpInfo: userPkpInfo\n },\n abilityIpfsCid,\n appId: appId.toNumber(),\n appVersion: appVersion.toNumber()\n };\n const onChainPolicyParams = await (0, getOnchainPolicyParams_1.getDecodedPolicyParams)({\n decodedPolicies,\n policyIpfsCid\n });\n console.log(\"onChainPolicyParams:\", JSON.stringify(onChainPolicyParams, utils_1.bigintReplacer));\n const evaluateResult = await vincentPolicy.evaluate({\n abilityParams: abilityParams2,\n userParams: onChainPolicyParams\n }, baseContext);\n console.log(\"evaluateResult:\", JSON.stringify(evaluateResult, utils_1.bigintReplacer));\n Lit.Actions.setResponse({\n response: JSON.stringify({\n ...evaluateResult\n })\n });\n } catch (error) {\n console.log(\"Policy evaluation failed:\", error.message, error.stack);\n Lit.Actions.setResponse({\n response: JSON.stringify((0, helpers_2.createDenyResult)({\n runtimeError: error instanceof Error ? error.message : String(error)\n }))\n });\n }\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/validatePolicies.js\n var require_validatePolicies = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/helpers/validatePolicies.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.validatePolicies = validatePolicies;\n var getMappedAbilityPolicyParams_1 = require_getMappedAbilityPolicyParams();\n async function validatePolicies({ decodedPolicies, vincentAbility: vincentAbility2, abilityIpfsCid, parsedAbilityParams }) {\n const validatedPolicies = [];\n for (const policyIpfsCid of Object.keys(decodedPolicies)) {\n const abilityPolicy = vincentAbility2.supportedPolicies.policyByIpfsCid[policyIpfsCid];\n console.log(\"vincentAbility.supportedPolicies\", Object.keys(vincentAbility2.supportedPolicies.policyByIpfsCid));\n if (!abilityPolicy) {\n throw new Error(`Policy with IPFS CID ${policyIpfsCid} is registered on-chain but not supported by this ability. Vincent Ability: ${abilityIpfsCid}`);\n }\n const policyPackageName = abilityPolicy.vincentPolicy.packageName;\n if (!abilityPolicy.abilityParameterMappings) {\n throw new Error(\"abilityParameterMappings missing on policy\");\n }\n console.log(\"abilityPolicy.abilityParameterMappings\", JSON.stringify(abilityPolicy.abilityParameterMappings));\n const abilityPolicyParams = (0, getMappedAbilityPolicyParams_1.getMappedAbilityPolicyParams)({\n abilityParameterMappings: abilityPolicy.abilityParameterMappings,\n parsedAbilityParams\n });\n validatedPolicies.push({\n parameters: decodedPolicies[policyIpfsCid] || {},\n policyPackageName,\n abilityPolicyParams\n });\n }\n return validatedPolicies;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/handlers/evaluatePolicies.js\n var require_evaluatePolicies = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/handlers/evaluatePolicies.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.evaluatePolicies = evaluatePolicies;\n var zod_1 = require_cjs();\n var helpers_1 = require_helpers();\n var resultCreators_1 = require_resultCreators();\n async function evaluatePolicies({ vincentAbility: vincentAbility2, context: context2, validatedPolicies, vincentAbilityApiVersion: vincentAbilityApiVersion2 }) {\n const evaluatedPolicies = [];\n let policyDeniedResult = void 0;\n const rawAllowedPolicies = {};\n for (const { policyPackageName, abilityPolicyParams } of validatedPolicies) {\n evaluatedPolicies.push(policyPackageName);\n const policy = vincentAbility2.supportedPolicies.policyByPackageName[policyPackageName];\n try {\n const litActionResponse = await Lit.Actions.call({\n ipfsId: policy.ipfsCid,\n params: {\n abilityParams: abilityPolicyParams,\n context: {\n abilityIpfsCid: context2.abilityIpfsCid,\n delegatorPkpEthAddress: context2.delegation.delegatorPkpInfo.ethAddress\n },\n vincentAbilityApiVersion: vincentAbilityApiVersion2\n }\n });\n console.log(`evaluated ${String(policyPackageName)} policy, result is:`, JSON.stringify(litActionResponse));\n const result = parseAndValidateEvaluateResult({\n litActionResponse,\n vincentPolicy: policy.vincentPolicy\n });\n if ((0, helpers_1.isPolicyDenyResponse)(result)) {\n policyDeniedResult = {\n ...result,\n packageName: policyPackageName\n };\n } else {\n rawAllowedPolicies[policyPackageName] = {\n result: result.result\n };\n }\n } catch (err) {\n const denyResult = (0, helpers_1.createDenyResult)({\n runtimeError: err instanceof Error ? err.message : \"Unknown error\"\n });\n policyDeniedResult = { ...denyResult, packageName: policyPackageName };\n }\n }\n if (policyDeniedResult) {\n return (0, resultCreators_1.createDenyEvaluationResult)({\n allowedPolicies: rawAllowedPolicies,\n evaluatedPolicies,\n deniedPolicy: policyDeniedResult\n });\n }\n return (0, resultCreators_1.createAllowEvaluationResult)({\n evaluatedPolicies,\n allowedPolicies: rawAllowedPolicies\n });\n }\n function parseAndValidateEvaluateResult({ litActionResponse, vincentPolicy }) {\n let parsedLitActionResponse;\n try {\n parsedLitActionResponse = JSON.parse(litActionResponse);\n } catch (error) {\n console.log(\"rawLitActionResponse (parsePolicyExecutionResult)\", litActionResponse);\n throw new Error(`Failed to JSON parse Lit Action Response: ${error instanceof Error ? error.message : String(error)}. rawLitActionResponse in request logs (parsePolicyExecutionResult)`);\n }\n try {\n console.log(\"parseAndValidateEvaluateResult\", JSON.stringify(parsedLitActionResponse));\n if ((0, helpers_1.isPolicyDenyResponse)(parsedLitActionResponse) && (parsedLitActionResponse.schemaValidationError || parsedLitActionResponse.runtimeError)) {\n console.log(\"parsedLitActionResponse is a deny response with a runtime error or schema validation error; skipping schema validation\");\n return parsedLitActionResponse;\n }\n if (!(0, helpers_1.isPolicyResponse)(parsedLitActionResponse)) {\n throw new Error(`Invalid response from policy: ${JSON.stringify(parsedLitActionResponse)}`);\n }\n const { schemaToUse, parsedType } = (0, helpers_1.getSchemaForPolicyResponseResult)({\n value: parsedLitActionResponse,\n denyResultSchema: vincentPolicy.evalDenyResultSchema || zod_1.z.undefined(),\n allowResultSchema: vincentPolicy.evalAllowResultSchema || zod_1.z.undefined()\n });\n console.log(\"parsedType\", parsedType);\n const parsedResult = (0, helpers_1.validateOrDeny)(parsedLitActionResponse.result, schemaToUse, \"evaluate\", \"output\");\n if ((0, helpers_1.isPolicyDenyResponse)(parsedResult)) {\n return parsedResult;\n }\n if ((0, helpers_1.isPolicyDenyResponse)(parsedLitActionResponse)) {\n return (0, helpers_1.createDenyResult)({\n runtimeError: parsedLitActionResponse.runtimeError,\n schemaValidationError: parsedLitActionResponse.schemaValidationError,\n result: parsedResult\n });\n }\n return (0, resultCreators_1.createAllowResult)({\n result: parsedResult\n });\n } catch (err) {\n console.log(\"parseAndValidateEvaluateResult error; returning noResultDeny\", err.message, err.stack);\n return (0, resultCreators_1.returnNoResultDeny)(err instanceof Error ? err.message : \"Unknown error\");\n }\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/handlers/vincentAbilityHandler.js\n var require_vincentAbilityHandler = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/handlers/vincentAbilityHandler.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.vincentAbilityHandler = void 0;\n exports3.createAbilityExecutionContext = createAbilityExecutionContext;\n var ethers_1 = require_lib32();\n var helpers_1 = require_helpers2();\n var typeGuards_1 = require_typeGuards2();\n var validatePolicies_1 = require_validatePolicies();\n var zod_1 = require_zod2();\n var assertSupportedAbilityVersion_1 = require_assertSupportedAbilityVersion();\n var getOnchainPolicyParams_1 = require_getOnchainPolicyParams();\n var utils_1 = require_utils();\n var constants_1 = require_constants6();\n var evaluatePolicies_1 = require_evaluatePolicies();\n function createAbilityExecutionContext({ vincentAbility: vincentAbility2, policyEvaluationResults, baseContext }) {\n if (!policyEvaluationResults.allow) {\n throw new Error(\"Received denied policies to createAbilityExecutionContext()\");\n }\n const newContext = {\n allow: true,\n evaluatedPolicies: policyEvaluationResults.evaluatedPolicies,\n allowedPolicies: {}\n };\n const policyByPackageName = vincentAbility2.supportedPolicies.policyByPackageName;\n const allowedKeys = Object.keys(policyEvaluationResults.allowedPolicies);\n for (const packageName of allowedKeys) {\n const entry = policyEvaluationResults.allowedPolicies[packageName];\n const policy = policyByPackageName[packageName];\n const vincentPolicy = policy.vincentPolicy;\n if (!entry) {\n throw new Error(`Missing entry on allowedPolicies for policy: ${packageName}`);\n }\n const resultWrapper = {\n result: entry.result\n };\n if (vincentPolicy.commit) {\n const commitFn = vincentPolicy.commit;\n resultWrapper.commit = (commitParams) => {\n return commitFn(commitParams, baseContext);\n };\n }\n newContext.allowedPolicies[packageName] = resultWrapper;\n }\n return newContext;\n }\n var vincentAbilityHandler2 = ({ vincentAbility: vincentAbility2, abilityParams: abilityParams2, context: context2 }) => {\n return async () => {\n (0, assertSupportedAbilityVersion_1.assertSupportedAbilityVersion)(vincentAbilityApiVersion);\n let policyEvalResults = void 0;\n const abilityIpfsCid = LitAuth.actionIpfsIds[0];\n const appDelegateeAddress = ethers_1.ethers.utils.getAddress(LitAuth.authSigAddress);\n const baseContext = {\n delegation: {\n delegateeAddress: appDelegateeAddress\n // delegatorPkpInfo: null,\n },\n abilityIpfsCid\n // appId: undefined,\n // appVersion: undefined,\n };\n try {\n const delegationRpcUrl = await Lit.Actions.getRpcUrl({ chain: \"yellowstone\" });\n const parsedOrFail = (0, zod_1.validateOrFail)(abilityParams2, vincentAbility2.abilityParamsSchema, \"execute\", \"input\");\n if ((0, typeGuards_1.isAbilityFailureResult)(parsedOrFail)) {\n Lit.Actions.setResponse({\n response: JSON.stringify({\n abilityExecutionResult: parsedOrFail\n })\n });\n return;\n }\n const userPkpInfo = await (0, helpers_1.getPkpInfo)({\n litPubkeyRouterAddress: constants_1.LIT_DATIL_PUBKEY_ROUTER_ADDRESS,\n yellowstoneRpcUrl: delegationRpcUrl,\n pkpEthAddress: context2.delegatorPkpEthAddress\n });\n baseContext.delegation.delegatorPkpInfo = userPkpInfo;\n const { decodedPolicies, appId, appVersion } = await (0, getOnchainPolicyParams_1.getPoliciesAndAppVersion)({\n delegationRpcUrl,\n appDelegateeAddress,\n agentWalletPkpEthAddress: context2.delegatorPkpEthAddress,\n abilityIpfsCid\n });\n baseContext.appId = appId.toNumber();\n baseContext.appVersion = appVersion.toNumber();\n const validatedPolicies = await (0, validatePolicies_1.validatePolicies)({\n decodedPolicies,\n vincentAbility: vincentAbility2,\n parsedAbilityParams: parsedOrFail,\n abilityIpfsCid\n });\n console.log(\"validatedPolicies\", JSON.stringify(validatedPolicies, utils_1.bigintReplacer));\n const policyEvaluationResults = await (0, evaluatePolicies_1.evaluatePolicies)({\n validatedPolicies,\n vincentAbility: vincentAbility2,\n context: baseContext,\n vincentAbilityApiVersion\n });\n console.log(\"policyEvaluationResults\", JSON.stringify(policyEvaluationResults, utils_1.bigintReplacer));\n policyEvalResults = policyEvaluationResults;\n if (!policyEvalResults.allow) {\n Lit.Actions.setResponse({\n response: JSON.stringify({\n abilityContext: {\n ...baseContext,\n policiesContext: policyEvaluationResults\n },\n abilityExecutionResult: {\n success: false\n }\n })\n });\n return;\n }\n const executeContext = createAbilityExecutionContext({\n vincentAbility: vincentAbility2,\n policyEvaluationResults,\n baseContext\n });\n const abilityExecutionResult = await vincentAbility2.execute({\n abilityParams: parsedOrFail\n }, {\n ...baseContext,\n policiesContext: executeContext\n });\n console.log(\"abilityExecutionResult\", JSON.stringify(abilityExecutionResult, utils_1.bigintReplacer));\n Lit.Actions.setResponse({\n response: JSON.stringify({\n abilityExecutionResult,\n abilityContext: {\n ...baseContext,\n policiesContext: policyEvaluationResults\n }\n })\n });\n } catch (err) {\n Lit.Actions.setResponse({\n response: JSON.stringify({\n abilityContext: {\n ...baseContext,\n policiesContext: policyEvalResults\n },\n abilityExecutionResult: {\n success: false,\n runtimeError: err instanceof Error ? err.message : String(err)\n }\n })\n });\n }\n };\n };\n exports3.vincentAbilityHandler = vincentAbilityHandler2;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityCore/bundledAbility/bundledAbility.js\n var require_bundledAbility = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityCore/bundledAbility/bundledAbility.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.asBundledVincentAbility = asBundledVincentAbility;\n var constants_1 = require_constants2();\n function asBundledVincentAbility(vincentAbility2, ipfsCid) {\n const bundledAbility = {\n ipfsCid,\n vincentAbility: vincentAbility2\n };\n Object.defineProperty(bundledAbility, \"vincentAbilityApiVersion\", {\n value: constants_1.VINCENT_TOOL_API_VERSION,\n writable: false,\n enumerable: true,\n configurable: false\n });\n return bundledAbility;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/policyCore/bundledPolicy/bundledPolicy.js\n var require_bundledPolicy = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/policyCore/bundledPolicy/bundledPolicy.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.asBundledVincentPolicy = asBundledVincentPolicy;\n var constants_1 = require_constants2();\n function asBundledVincentPolicy(vincentPolicy, ipfsCid) {\n const bundledPolicy = {\n ipfsCid,\n vincentPolicy\n };\n Object.defineProperty(bundledPolicy, \"vincentAbilityApiVersion\", {\n value: constants_1.VINCENT_TOOL_API_VERSION,\n writable: false,\n enumerable: true,\n configurable: false\n });\n return bundledPolicy;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/tslib@2.7.0/node_modules/tslib/tslib.es6.mjs\n var tslib_es6_exports3 = {};\n __export(tslib_es6_exports3, {\n __addDisposableResource: () => __addDisposableResource2,\n __assign: () => __assign3,\n __asyncDelegator: () => __asyncDelegator3,\n __asyncGenerator: () => __asyncGenerator3,\n __asyncValues: () => __asyncValues3,\n __await: () => __await3,\n __awaiter: () => __awaiter3,\n __classPrivateFieldGet: () => __classPrivateFieldGet3,\n __classPrivateFieldIn: () => __classPrivateFieldIn2,\n __classPrivateFieldSet: () => __classPrivateFieldSet3,\n __createBinding: () => __createBinding3,\n __decorate: () => __decorate3,\n __disposeResources: () => __disposeResources2,\n __esDecorate: () => __esDecorate2,\n __exportStar: () => __exportStar3,\n __extends: () => __extends3,\n __generator: () => __generator3,\n __importDefault: () => __importDefault3,\n __importStar: () => __importStar3,\n __makeTemplateObject: () => __makeTemplateObject3,\n __metadata: () => __metadata3,\n __param: () => __param3,\n __propKey: () => __propKey2,\n __read: () => __read3,\n __rest: () => __rest3,\n __runInitializers: () => __runInitializers2,\n __setFunctionName: () => __setFunctionName2,\n __spread: () => __spread3,\n __spreadArray: () => __spreadArray2,\n __spreadArrays: () => __spreadArrays3,\n __values: () => __values3,\n default: () => tslib_es6_default2\n });\n function __extends3(d5, b4) {\n if (typeof b4 !== \"function\" && b4 !== null)\n throw new TypeError(\"Class extends value \" + String(b4) + \" is not a constructor or null\");\n extendStatics3(d5, b4);\n function __() {\n this.constructor = d5;\n }\n d5.prototype = b4 === null ? Object.create(b4) : (__.prototype = b4.prototype, new __());\n }\n function __rest3(s4, e2) {\n var t3 = {};\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4) && e2.indexOf(p4) < 0)\n t3[p4] = s4[p4];\n if (s4 != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i3 = 0, p4 = Object.getOwnPropertySymbols(s4); i3 < p4.length; i3++) {\n if (e2.indexOf(p4[i3]) < 0 && Object.prototype.propertyIsEnumerable.call(s4, p4[i3]))\n t3[p4[i3]] = s4[p4[i3]];\n }\n return t3;\n }\n function __decorate3(decorators, target, key, desc) {\n var c4 = arguments.length, r2 = c4 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d5;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r2 = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i3 = decorators.length - 1; i3 >= 0; i3--)\n if (d5 = decorators[i3])\n r2 = (c4 < 3 ? d5(r2) : c4 > 3 ? d5(target, key, r2) : d5(target, key)) || r2;\n return c4 > 3 && r2 && Object.defineProperty(target, key, r2), r2;\n }\n function __param3(paramIndex, decorator) {\n return function(target, key) {\n decorator(target, key, paramIndex);\n };\n }\n function __esDecorate2(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f7) {\n if (f7 !== void 0 && typeof f7 !== \"function\")\n throw new TypeError(\"Function expected\");\n return f7;\n }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _2, done = false;\n for (var i3 = decorators.length - 1; i3 >= 0; i3--) {\n var context2 = {};\n for (var p4 in contextIn)\n context2[p4] = p4 === \"access\" ? {} : contextIn[p4];\n for (var p4 in contextIn.access)\n context2.access[p4] = contextIn.access[p4];\n context2.addInitializer = function(f7) {\n if (done)\n throw new TypeError(\"Cannot add initializers after decoration has completed\");\n extraInitializers.push(accept(f7 || null));\n };\n var result = (0, decorators[i3])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);\n if (kind === \"accessor\") {\n if (result === void 0)\n continue;\n if (result === null || typeof result !== \"object\")\n throw new TypeError(\"Object expected\");\n if (_2 = accept(result.get))\n descriptor.get = _2;\n if (_2 = accept(result.set))\n descriptor.set = _2;\n if (_2 = accept(result.init))\n initializers.unshift(_2);\n } else if (_2 = accept(result)) {\n if (kind === \"field\")\n initializers.unshift(_2);\n else\n descriptor[key] = _2;\n }\n }\n if (target)\n Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n }\n function __runInitializers2(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i3 = 0; i3 < initializers.length; i3++) {\n value = useValue ? initializers[i3].call(thisArg, value) : initializers[i3].call(thisArg);\n }\n return useValue ? value : void 0;\n }\n function __propKey2(x4) {\n return typeof x4 === \"symbol\" ? x4 : \"\".concat(x4);\n }\n function __setFunctionName2(f7, name, prefix) {\n if (typeof name === \"symbol\")\n name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f7, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n }\n function __metadata3(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\")\n return Reflect.metadata(metadataKey, metadataValue);\n }\n function __awaiter3(thisArg, _arguments, P2, generator) {\n function adopt(value) {\n return value instanceof P2 ? value : new P2(function(resolve) {\n resolve(value);\n });\n }\n return new (P2 || (P2 = Promise))(function(resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e2) {\n reject(e2);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e2) {\n reject(e2);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n }\n function __generator3(thisArg, body) {\n var _2 = { label: 0, sent: function() {\n if (t3[0] & 1)\n throw t3[1];\n return t3[1];\n }, trys: [], ops: [] }, f7, y6, t3, g4 = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g4.next = verb(0), g4[\"throw\"] = verb(1), g4[\"return\"] = verb(2), typeof Symbol === \"function\" && (g4[Symbol.iterator] = function() {\n return this;\n }), g4;\n function verb(n2) {\n return function(v2) {\n return step([n2, v2]);\n };\n }\n function step(op) {\n if (f7)\n throw new TypeError(\"Generator is already executing.\");\n while (g4 && (g4 = 0, op[0] && (_2 = 0)), _2)\n try {\n if (f7 = 1, y6 && (t3 = op[0] & 2 ? y6[\"return\"] : op[0] ? y6[\"throw\"] || ((t3 = y6[\"return\"]) && t3.call(y6), 0) : y6.next) && !(t3 = t3.call(y6, op[1])).done)\n return t3;\n if (y6 = 0, t3)\n op = [op[0] & 2, t3.value];\n switch (op[0]) {\n case 0:\n case 1:\n t3 = op;\n break;\n case 4:\n _2.label++;\n return { value: op[1], done: false };\n case 5:\n _2.label++;\n y6 = op[1];\n op = [0];\n continue;\n case 7:\n op = _2.ops.pop();\n _2.trys.pop();\n continue;\n default:\n if (!(t3 = _2.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _2 = 0;\n continue;\n }\n if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) {\n _2.label = op[1];\n break;\n }\n if (op[0] === 6 && _2.label < t3[1]) {\n _2.label = t3[1];\n t3 = op;\n break;\n }\n if (t3 && _2.label < t3[2]) {\n _2.label = t3[2];\n _2.ops.push(op);\n break;\n }\n if (t3[2])\n _2.ops.pop();\n _2.trys.pop();\n continue;\n }\n op = body.call(thisArg, _2);\n } catch (e2) {\n op = [6, e2];\n y6 = 0;\n } finally {\n f7 = t3 = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n }\n function __exportStar3(m2, o5) {\n for (var p4 in m2)\n if (p4 !== \"default\" && !Object.prototype.hasOwnProperty.call(o5, p4))\n __createBinding3(o5, m2, p4);\n }\n function __values3(o5) {\n var s4 = typeof Symbol === \"function\" && Symbol.iterator, m2 = s4 && o5[s4], i3 = 0;\n if (m2)\n return m2.call(o5);\n if (o5 && typeof o5.length === \"number\")\n return {\n next: function() {\n if (o5 && i3 >= o5.length)\n o5 = void 0;\n return { value: o5 && o5[i3++], done: !o5 };\n }\n };\n throw new TypeError(s4 ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n }\n function __read3(o5, n2) {\n var m2 = typeof Symbol === \"function\" && o5[Symbol.iterator];\n if (!m2)\n return o5;\n var i3 = m2.call(o5), r2, ar = [], e2;\n try {\n while ((n2 === void 0 || n2-- > 0) && !(r2 = i3.next()).done)\n ar.push(r2.value);\n } catch (error) {\n e2 = { error };\n } finally {\n try {\n if (r2 && !r2.done && (m2 = i3[\"return\"]))\n m2.call(i3);\n } finally {\n if (e2)\n throw e2.error;\n }\n }\n return ar;\n }\n function __spread3() {\n for (var ar = [], i3 = 0; i3 < arguments.length; i3++)\n ar = ar.concat(__read3(arguments[i3]));\n return ar;\n }\n function __spreadArrays3() {\n for (var s4 = 0, i3 = 0, il = arguments.length; i3 < il; i3++)\n s4 += arguments[i3].length;\n for (var r2 = Array(s4), k4 = 0, i3 = 0; i3 < il; i3++)\n for (var a3 = arguments[i3], j2 = 0, jl = a3.length; j2 < jl; j2++, k4++)\n r2[k4] = a3[j2];\n return r2;\n }\n function __spreadArray2(to, from14, pack) {\n if (pack || arguments.length === 2)\n for (var i3 = 0, l6 = from14.length, ar; i3 < l6; i3++) {\n if (ar || !(i3 in from14)) {\n if (!ar)\n ar = Array.prototype.slice.call(from14, 0, i3);\n ar[i3] = from14[i3];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from14));\n }\n function __await3(v2) {\n return this instanceof __await3 ? (this.v = v2, this) : new __await3(v2);\n }\n function __asyncGenerator3(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g4 = generator.apply(thisArg, _arguments || []), i3, q3 = [];\n return i3 = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3;\n function awaitReturn(f7) {\n return function(v2) {\n return Promise.resolve(v2).then(f7, reject);\n };\n }\n function verb(n2, f7) {\n if (g4[n2]) {\n i3[n2] = function(v2) {\n return new Promise(function(a3, b4) {\n q3.push([n2, v2, a3, b4]) > 1 || resume(n2, v2);\n });\n };\n if (f7)\n i3[n2] = f7(i3[n2]);\n }\n }\n function resume(n2, v2) {\n try {\n step(g4[n2](v2));\n } catch (e2) {\n settle(q3[0][3], e2);\n }\n }\n function step(r2) {\n r2.value instanceof __await3 ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle(q3[0][2], r2);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f7, v2) {\n if (f7(v2), q3.shift(), q3.length)\n resume(q3[0][0], q3[0][1]);\n }\n }\n function __asyncDelegator3(o5) {\n var i3, p4;\n return i3 = {}, verb(\"next\"), verb(\"throw\", function(e2) {\n throw e2;\n }), verb(\"return\"), i3[Symbol.iterator] = function() {\n return this;\n }, i3;\n function verb(n2, f7) {\n i3[n2] = o5[n2] ? function(v2) {\n return (p4 = !p4) ? { value: __await3(o5[n2](v2)), done: false } : f7 ? f7(v2) : v2;\n } : f7;\n }\n }\n function __asyncValues3(o5) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m2 = o5[Symbol.asyncIterator], i3;\n return m2 ? m2.call(o5) : (o5 = typeof __values3 === \"function\" ? __values3(o5) : o5[Symbol.iterator](), i3 = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i3[Symbol.asyncIterator] = function() {\n return this;\n }, i3);\n function verb(n2) {\n i3[n2] = o5[n2] && function(v2) {\n return new Promise(function(resolve, reject) {\n v2 = o5[n2](v2), settle(resolve, reject, v2.done, v2.value);\n });\n };\n }\n function settle(resolve, reject, d5, v2) {\n Promise.resolve(v2).then(function(v6) {\n resolve({ value: v6, done: d5 });\n }, reject);\n }\n }\n function __makeTemplateObject3(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", { value: raw });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n }\n function __importStar3(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.prototype.hasOwnProperty.call(mod3, k4))\n __createBinding3(result, mod3, k4);\n }\n __setModuleDefault2(result, mod3);\n return result;\n }\n function __importDefault3(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { default: mod3 };\n }\n function __classPrivateFieldGet3(receiver, state, kind, f7) {\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f7 : kind === \"a\" ? f7.call(receiver) : f7 ? f7.value : state.get(receiver);\n }\n function __classPrivateFieldSet3(receiver, state, value, kind, f7) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f7.call(receiver, value) : f7 ? f7.value = value : state.set(receiver, value), value;\n }\n function __classPrivateFieldIn2(state, receiver) {\n if (receiver === null || typeof receiver !== \"object\" && typeof receiver !== \"function\")\n throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n }\n function __addDisposableResource2(env2, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\")\n throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose)\n throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose)\n throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async)\n inner = dispose;\n }\n if (typeof dispose !== \"function\")\n throw new TypeError(\"Object not disposable.\");\n if (inner)\n dispose = function() {\n try {\n inner.call(this);\n } catch (e2) {\n return Promise.reject(e2);\n }\n };\n env2.stack.push({ value, dispose, async });\n } else if (async) {\n env2.stack.push({ async: true });\n }\n return value;\n }\n function __disposeResources2(env2) {\n function fail(e2) {\n env2.error = env2.hasError ? new _SuppressedError2(e2, env2.error, \"An error was suppressed during disposal.\") : e2;\n env2.hasError = true;\n }\n var r2, s4 = 0;\n function next() {\n while (r2 = env2.stack.pop()) {\n try {\n if (!r2.async && s4 === 1)\n return s4 = 0, env2.stack.push(r2), Promise.resolve().then(next);\n if (r2.dispose) {\n var result = r2.dispose.call(r2.value);\n if (r2.async)\n return s4 |= 2, Promise.resolve(result).then(next, function(e2) {\n fail(e2);\n return next();\n });\n } else\n s4 |= 1;\n } catch (e2) {\n fail(e2);\n }\n }\n if (s4 === 1)\n return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();\n if (env2.hasError)\n throw env2.error;\n }\n return next();\n }\n var extendStatics3, __assign3, __createBinding3, __setModuleDefault2, _SuppressedError2, tslib_es6_default2;\n var init_tslib_es63 = __esm({\n \"../../../node_modules/.pnpm/tslib@2.7.0/node_modules/tslib/tslib.es6.mjs\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n extendStatics3 = function(d5, b4) {\n extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d6, b5) {\n d6.__proto__ = b5;\n } || function(d6, b5) {\n for (var p4 in b5)\n if (Object.prototype.hasOwnProperty.call(b5, p4))\n d6[p4] = b5[p4];\n };\n return extendStatics3(d5, b4);\n };\n __assign3 = function() {\n __assign3 = Object.assign || function __assign4(t3) {\n for (var s4, i3 = 1, n2 = arguments.length; i3 < n2; i3++) {\n s4 = arguments[i3];\n for (var p4 in s4)\n if (Object.prototype.hasOwnProperty.call(s4, p4))\n t3[p4] = s4[p4];\n }\n return t3;\n };\n return __assign3.apply(this, arguments);\n };\n __createBinding3 = Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n var desc = Object.getOwnPropertyDescriptor(m2, k4);\n if (!desc || (\"get\" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() {\n return m2[k4];\n } };\n }\n Object.defineProperty(o5, k22, desc);\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n };\n __setModuleDefault2 = Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n };\n _SuppressedError2 = typeof SuppressedError === \"function\" ? SuppressedError : function(error, suppressed, message2) {\n var e2 = new Error(message2);\n return e2.name = \"SuppressedError\", e2.error = error, e2.suppressed = suppressed, e2;\n };\n tslib_es6_default2 = {\n __extends: __extends3,\n __assign: __assign3,\n __rest: __rest3,\n __decorate: __decorate3,\n __param: __param3,\n __metadata: __metadata3,\n __awaiter: __awaiter3,\n __generator: __generator3,\n __createBinding: __createBinding3,\n __exportStar: __exportStar3,\n __values: __values3,\n __read: __read3,\n __spread: __spread3,\n __spreadArrays: __spreadArrays3,\n __spreadArray: __spreadArray2,\n __await: __await3,\n __asyncGenerator: __asyncGenerator3,\n __asyncDelegator: __asyncDelegator3,\n __asyncValues: __asyncValues3,\n __makeTemplateObject: __makeTemplateObject3,\n __importStar: __importStar3,\n __importDefault: __importDefault3,\n __classPrivateFieldGet: __classPrivateFieldGet3,\n __classPrivateFieldSet: __classPrivateFieldSet3,\n __classPrivateFieldIn: __classPrivateFieldIn2,\n __addDisposableResource: __addDisposableResource2,\n __disposeResources: __disposeResources2\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/_version.js\n var require_version32 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/_version.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.version = void 0;\n exports3.version = \"6.15.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/properties.js\n var require_properties2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/properties.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.defineProperties = exports3.resolveProperties = void 0;\n function checkType(value, type, name) {\n const types2 = type.split(\"|\").map((t3) => t3.trim());\n for (let i3 = 0; i3 < types2.length; i3++) {\n switch (type) {\n case \"any\":\n return;\n case \"bigint\":\n case \"boolean\":\n case \"number\":\n case \"string\":\n if (typeof value === type) {\n return;\n }\n }\n }\n const error = new Error(`invalid value for type ${type}`);\n error.code = \"INVALID_ARGUMENT\";\n error.argument = `value.${name}`;\n error.value = value;\n throw error;\n }\n async function resolveProperties2(value) {\n const keys = Object.keys(value);\n const results = await Promise.all(keys.map((k4) => Promise.resolve(value[k4])));\n return results.reduce((accum, v2, index2) => {\n accum[keys[index2]] = v2;\n return accum;\n }, {});\n }\n exports3.resolveProperties = resolveProperties2;\n function defineProperties(target, values, types2) {\n for (let key in values) {\n let value = values[key];\n const type = types2 ? types2[key] : null;\n if (type) {\n checkType(value, type, key);\n }\n Object.defineProperty(target, key, { enumerable: true, value, writable: false });\n }\n }\n exports3.defineProperties = defineProperties;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/errors.js\n var require_errors5 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/errors.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.assertPrivate = exports3.assertNormalize = exports3.assertArgumentCount = exports3.assertArgument = exports3.assert = exports3.makeError = exports3.isCallException = exports3.isError = void 0;\n var _version_js_1 = require_version32();\n var properties_js_1 = require_properties2();\n function stringify4(value, seen) {\n if (value == null) {\n return \"null\";\n }\n if (seen == null) {\n seen = /* @__PURE__ */ new Set();\n }\n if (typeof value === \"object\") {\n if (seen.has(value)) {\n return \"[Circular]\";\n }\n seen.add(value);\n }\n if (Array.isArray(value)) {\n return \"[ \" + value.map((v2) => stringify4(v2, seen)).join(\", \") + \" ]\";\n }\n if (value instanceof Uint8Array) {\n const HEX = \"0123456789abcdef\";\n let result = \"0x\";\n for (let i3 = 0; i3 < value.length; i3++) {\n result += HEX[value[i3] >> 4];\n result += HEX[value[i3] & 15];\n }\n return result;\n }\n if (typeof value === \"object\" && typeof value.toJSON === \"function\") {\n return stringify4(value.toJSON(), seen);\n }\n switch (typeof value) {\n case \"boolean\":\n case \"number\":\n case \"symbol\":\n return value.toString();\n case \"bigint\":\n return BigInt(value).toString();\n case \"string\":\n return JSON.stringify(value);\n case \"object\": {\n const keys = Object.keys(value);\n keys.sort();\n return \"{ \" + keys.map((k4) => `${stringify4(k4, seen)}: ${stringify4(value[k4], seen)}`).join(\", \") + \" }\";\n }\n }\n return `[ COULD NOT SERIALIZE ]`;\n }\n function isError(error, code) {\n return error && error.code === code;\n }\n exports3.isError = isError;\n function isCallException(error) {\n return isError(error, \"CALL_EXCEPTION\");\n }\n exports3.isCallException = isCallException;\n function makeError(message2, code, info) {\n let shortMessage = message2;\n {\n const details = [];\n if (info) {\n if (\"message\" in info || \"code\" in info || \"name\" in info) {\n throw new Error(`value will overwrite populated values: ${stringify4(info)}`);\n }\n for (const key in info) {\n if (key === \"shortMessage\") {\n continue;\n }\n const value = info[key];\n details.push(key + \"=\" + stringify4(value));\n }\n }\n details.push(`code=${code}`);\n details.push(`version=${_version_js_1.version}`);\n if (details.length) {\n message2 += \" (\" + details.join(\", \") + \")\";\n }\n }\n let error;\n switch (code) {\n case \"INVALID_ARGUMENT\":\n error = new TypeError(message2);\n break;\n case \"NUMERIC_FAULT\":\n case \"BUFFER_OVERRUN\":\n error = new RangeError(message2);\n break;\n default:\n error = new Error(message2);\n }\n (0, properties_js_1.defineProperties)(error, { code });\n if (info) {\n Object.assign(error, info);\n }\n if (error.shortMessage == null) {\n (0, properties_js_1.defineProperties)(error, { shortMessage });\n }\n return error;\n }\n exports3.makeError = makeError;\n function assert9(check2, message2, code, info) {\n if (!check2) {\n throw makeError(message2, code, info);\n }\n }\n exports3.assert = assert9;\n function assertArgument(check2, message2, name, value) {\n assert9(check2, message2, \"INVALID_ARGUMENT\", { argument: name, value });\n }\n exports3.assertArgument = assertArgument;\n function assertArgumentCount(count, expectedCount, message2) {\n if (message2 == null) {\n message2 = \"\";\n }\n if (message2) {\n message2 = \": \" + message2;\n }\n assert9(count >= expectedCount, \"missing argument\" + message2, \"MISSING_ARGUMENT\", {\n count,\n expectedCount\n });\n assert9(count <= expectedCount, \"too many arguments\" + message2, \"UNEXPECTED_ARGUMENT\", {\n count,\n expectedCount\n });\n }\n exports3.assertArgumentCount = assertArgumentCount;\n var _normalizeForms = [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].reduce((accum, form) => {\n try {\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad\");\n }\n ;\n if (form === \"NFD\") {\n const check2 = String.fromCharCode(233).normalize(\"NFD\");\n const expected = String.fromCharCode(101, 769);\n if (check2 !== expected) {\n throw new Error(\"broken\");\n }\n }\n accum.push(form);\n } catch (error) {\n }\n return accum;\n }, []);\n function assertNormalize(form) {\n assert9(_normalizeForms.indexOf(form) >= 0, \"platform missing String.prototype.normalize\", \"UNSUPPORTED_OPERATION\", {\n operation: \"String.prototype.normalize\",\n info: { form }\n });\n }\n exports3.assertNormalize = assertNormalize;\n function assertPrivate(givenGuard, guard, className) {\n if (className == null) {\n className = \"\";\n }\n if (givenGuard !== guard) {\n let method = className, operation = \"new\";\n if (className) {\n method += \".\";\n operation += \" \" + className;\n }\n assert9(false, `private constructor; use ${method}from* methods`, \"UNSUPPORTED_OPERATION\", {\n operation\n });\n }\n }\n exports3.assertPrivate = assertPrivate;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/data.js\n var require_data2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/data.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.zeroPadBytes = exports3.zeroPadValue = exports3.stripZerosLeft = exports3.dataSlice = exports3.dataLength = exports3.concat = exports3.hexlify = exports3.isBytesLike = exports3.isHexString = exports3.getBytesCopy = exports3.getBytes = void 0;\n var errors_js_1 = require_errors5();\n function _getBytes(value, name, copy) {\n if (value instanceof Uint8Array) {\n if (copy) {\n return new Uint8Array(value);\n }\n return value;\n }\n if (typeof value === \"string\" && value.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)) {\n const result = new Uint8Array((value.length - 2) / 2);\n let offset = 2;\n for (let i3 = 0; i3 < result.length; i3++) {\n result[i3] = parseInt(value.substring(offset, offset + 2), 16);\n offset += 2;\n }\n return result;\n }\n (0, errors_js_1.assertArgument)(false, \"invalid BytesLike value\", name || \"value\", value);\n }\n function getBytes(value, name) {\n return _getBytes(value, name, false);\n }\n exports3.getBytes = getBytes;\n function getBytesCopy(value, name) {\n return _getBytes(value, name, true);\n }\n exports3.getBytesCopy = getBytesCopy;\n function isHexString(value, length) {\n if (typeof value !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false;\n }\n if (typeof length === \"number\" && value.length !== 2 + 2 * length) {\n return false;\n }\n if (length === true && value.length % 2 !== 0) {\n return false;\n }\n return true;\n }\n exports3.isHexString = isHexString;\n function isBytesLike(value) {\n return isHexString(value, true) || value instanceof Uint8Array;\n }\n exports3.isBytesLike = isBytesLike;\n var HexCharacters = \"0123456789abcdef\";\n function hexlify(data) {\n const bytes = getBytes(data);\n let result = \"0x\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n const v2 = bytes[i3];\n result += HexCharacters[(v2 & 240) >> 4] + HexCharacters[v2 & 15];\n }\n return result;\n }\n exports3.hexlify = hexlify;\n function concat6(datas) {\n return \"0x\" + datas.map((d5) => hexlify(d5).substring(2)).join(\"\");\n }\n exports3.concat = concat6;\n function dataLength(data) {\n if (isHexString(data, true)) {\n return (data.length - 2) / 2;\n }\n return getBytes(data).length;\n }\n exports3.dataLength = dataLength;\n function dataSlice(data, start, end) {\n const bytes = getBytes(data);\n if (end != null && end > bytes.length) {\n (0, errors_js_1.assert)(false, \"cannot slice beyond data bounds\", \"BUFFER_OVERRUN\", {\n buffer: bytes,\n length: bytes.length,\n offset: end\n });\n }\n return hexlify(bytes.slice(start == null ? 0 : start, end == null ? bytes.length : end));\n }\n exports3.dataSlice = dataSlice;\n function stripZerosLeft(data) {\n let bytes = hexlify(data).substring(2);\n while (bytes.startsWith(\"00\")) {\n bytes = bytes.substring(2);\n }\n return \"0x\" + bytes;\n }\n exports3.stripZerosLeft = stripZerosLeft;\n function zeroPad(data, length, left) {\n const bytes = getBytes(data);\n (0, errors_js_1.assert)(length >= bytes.length, \"padding exceeds data length\", \"BUFFER_OVERRUN\", {\n buffer: new Uint8Array(bytes),\n length,\n offset: length + 1\n });\n const result = new Uint8Array(length);\n result.fill(0);\n if (left) {\n result.set(bytes, length - bytes.length);\n } else {\n result.set(bytes, 0);\n }\n return hexlify(result);\n }\n function zeroPadValue(data, length) {\n return zeroPad(data, length, true);\n }\n exports3.zeroPadValue = zeroPadValue;\n function zeroPadBytes(data, length) {\n return zeroPad(data, length, false);\n }\n exports3.zeroPadBytes = zeroPadBytes;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/maths.js\n var require_maths = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/maths.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toQuantity = exports3.toBeArray = exports3.toBeHex = exports3.toNumber = exports3.getNumber = exports3.toBigInt = exports3.getUint = exports3.getBigInt = exports3.mask = exports3.toTwos = exports3.fromTwos = void 0;\n var data_js_1 = require_data2();\n var errors_js_1 = require_errors5();\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var maxValue = 9007199254740991;\n function fromTwos(_value, _width) {\n const value = getUint(_value, \"value\");\n const width = BigInt(getNumber(_width, \"width\"));\n (0, errors_js_1.assert)(value >> width === BN_0, \"overflow\", \"NUMERIC_FAULT\", {\n operation: \"fromTwos\",\n fault: \"overflow\",\n value: _value\n });\n if (value >> width - BN_1) {\n const mask2 = (BN_1 << width) - BN_1;\n return -((~value & mask2) + BN_1);\n }\n return value;\n }\n exports3.fromTwos = fromTwos;\n function toTwos(_value, _width) {\n let value = getBigInt(_value, \"value\");\n const width = BigInt(getNumber(_width, \"width\"));\n const limit = BN_1 << width - BN_1;\n if (value < BN_0) {\n value = -value;\n (0, errors_js_1.assert)(value <= limit, \"too low\", \"NUMERIC_FAULT\", {\n operation: \"toTwos\",\n fault: \"overflow\",\n value: _value\n });\n const mask2 = (BN_1 << width) - BN_1;\n return (~value & mask2) + BN_1;\n } else {\n (0, errors_js_1.assert)(value < limit, \"too high\", \"NUMERIC_FAULT\", {\n operation: \"toTwos\",\n fault: \"overflow\",\n value: _value\n });\n }\n return value;\n }\n exports3.toTwos = toTwos;\n function mask(_value, _bits) {\n const value = getUint(_value, \"value\");\n const bits = BigInt(getNumber(_bits, \"bits\"));\n return value & (BN_1 << bits) - BN_1;\n }\n exports3.mask = mask;\n function getBigInt(value, name) {\n switch (typeof value) {\n case \"bigint\":\n return value;\n case \"number\":\n (0, errors_js_1.assertArgument)(Number.isInteger(value), \"underflow\", name || \"value\", value);\n (0, errors_js_1.assertArgument)(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return BigInt(value);\n case \"string\":\n try {\n if (value === \"\") {\n throw new Error(\"empty string\");\n }\n if (value[0] === \"-\" && value[1] !== \"-\") {\n return -BigInt(value.substring(1));\n }\n return BigInt(value);\n } catch (e2) {\n (0, errors_js_1.assertArgument)(false, `invalid BigNumberish string: ${e2.message}`, name || \"value\", value);\n }\n }\n (0, errors_js_1.assertArgument)(false, \"invalid BigNumberish value\", name || \"value\", value);\n }\n exports3.getBigInt = getBigInt;\n function getUint(value, name) {\n const result = getBigInt(value, name);\n (0, errors_js_1.assert)(result >= BN_0, \"unsigned value cannot be negative\", \"NUMERIC_FAULT\", {\n fault: \"overflow\",\n operation: \"getUint\",\n value\n });\n return result;\n }\n exports3.getUint = getUint;\n var Nibbles = \"0123456789abcdef\";\n function toBigInt4(value) {\n if (value instanceof Uint8Array) {\n let result = \"0x0\";\n for (const v2 of value) {\n result += Nibbles[v2 >> 4];\n result += Nibbles[v2 & 15];\n }\n return BigInt(result);\n }\n return getBigInt(value);\n }\n exports3.toBigInt = toBigInt4;\n function getNumber(value, name) {\n switch (typeof value) {\n case \"bigint\":\n (0, errors_js_1.assertArgument)(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return Number(value);\n case \"number\":\n (0, errors_js_1.assertArgument)(Number.isInteger(value), \"underflow\", name || \"value\", value);\n (0, errors_js_1.assertArgument)(value >= -maxValue && value <= maxValue, \"overflow\", name || \"value\", value);\n return value;\n case \"string\":\n try {\n if (value === \"\") {\n throw new Error(\"empty string\");\n }\n return getNumber(BigInt(value), name);\n } catch (e2) {\n (0, errors_js_1.assertArgument)(false, `invalid numeric string: ${e2.message}`, name || \"value\", value);\n }\n }\n (0, errors_js_1.assertArgument)(false, \"invalid numeric value\", name || \"value\", value);\n }\n exports3.getNumber = getNumber;\n function toNumber4(value) {\n return getNumber(toBigInt4(value));\n }\n exports3.toNumber = toNumber4;\n function toBeHex(_value, _width) {\n const value = getUint(_value, \"value\");\n let result = value.toString(16);\n if (_width == null) {\n if (result.length % 2) {\n result = \"0\" + result;\n }\n } else {\n const width = getNumber(_width, \"width\");\n (0, errors_js_1.assert)(width * 2 >= result.length, `value exceeds width (${width} bytes)`, \"NUMERIC_FAULT\", {\n operation: \"toBeHex\",\n fault: \"overflow\",\n value: _value\n });\n while (result.length < width * 2) {\n result = \"0\" + result;\n }\n }\n return \"0x\" + result;\n }\n exports3.toBeHex = toBeHex;\n function toBeArray(_value) {\n const value = getUint(_value, \"value\");\n if (value === BN_0) {\n return new Uint8Array([]);\n }\n let hex = value.toString(16);\n if (hex.length % 2) {\n hex = \"0\" + hex;\n }\n const result = new Uint8Array(hex.length / 2);\n for (let i3 = 0; i3 < result.length; i3++) {\n const offset = i3 * 2;\n result[i3] = parseInt(hex.substring(offset, offset + 2), 16);\n }\n return result;\n }\n exports3.toBeArray = toBeArray;\n function toQuantity(value) {\n let result = (0, data_js_1.hexlify)((0, data_js_1.isBytesLike)(value) ? value : toBeArray(value)).substring(2);\n while (result.startsWith(\"0\")) {\n result = result.substring(1);\n }\n if (result === \"\") {\n result = \"0\";\n }\n return \"0x\" + result;\n }\n exports3.toQuantity = toQuantity;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/base58.js\n var require_base58 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/base58.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeBase58 = exports3.encodeBase58 = void 0;\n var data_js_1 = require_data2();\n var errors_js_1 = require_errors5();\n var maths_js_1 = require_maths();\n var Alphabet = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n var Lookup = null;\n function getAlpha(letter) {\n if (Lookup == null) {\n Lookup = {};\n for (let i3 = 0; i3 < Alphabet.length; i3++) {\n Lookup[Alphabet[i3]] = BigInt(i3);\n }\n }\n const result = Lookup[letter];\n (0, errors_js_1.assertArgument)(result != null, `invalid base58 value`, \"letter\", letter);\n return result;\n }\n var BN_0 = BigInt(0);\n var BN_58 = BigInt(58);\n function encodeBase58(_value) {\n const bytes = (0, data_js_1.getBytes)(_value);\n let value = (0, maths_js_1.toBigInt)(bytes);\n let result = \"\";\n while (value) {\n result = Alphabet[Number(value % BN_58)] + result;\n value /= BN_58;\n }\n for (let i3 = 0; i3 < bytes.length; i3++) {\n if (bytes[i3]) {\n break;\n }\n result = Alphabet[0] + result;\n }\n return result;\n }\n exports3.encodeBase58 = encodeBase58;\n function decodeBase58(value) {\n let result = BN_0;\n for (let i3 = 0; i3 < value.length; i3++) {\n result *= BN_58;\n result += getAlpha(value[i3]);\n }\n return result;\n }\n exports3.decodeBase58 = decodeBase58;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/base64-browser.js\n var require_base64_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/base64-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encodeBase64 = exports3.decodeBase64 = void 0;\n var data_js_1 = require_data2();\n function decodeBase642(textData) {\n textData = atob(textData);\n const data = new Uint8Array(textData.length);\n for (let i3 = 0; i3 < textData.length; i3++) {\n data[i3] = textData.charCodeAt(i3);\n }\n return (0, data_js_1.getBytes)(data);\n }\n exports3.decodeBase64 = decodeBase642;\n function encodeBase642(_data) {\n const data = (0, data_js_1.getBytes)(_data);\n let textData = \"\";\n for (let i3 = 0; i3 < data.length; i3++) {\n textData += String.fromCharCode(data[i3]);\n }\n return btoa(textData);\n }\n exports3.encodeBase64 = encodeBase642;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/events.js\n var require_events = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/events.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EventPayload = void 0;\n var properties_js_1 = require_properties2();\n var EventPayload = class {\n /**\n * The event filter.\n */\n filter;\n /**\n * The **EventEmitterable**.\n */\n emitter;\n #listener;\n /**\n * Create a new **EventPayload** for %%emitter%% with\n * the %%listener%% and for %%filter%%.\n */\n constructor(emitter, listener, filter) {\n this.#listener = listener;\n (0, properties_js_1.defineProperties)(this, { emitter, filter });\n }\n /**\n * Unregister the triggered listener for future events.\n */\n async removeListener() {\n if (this.#listener == null) {\n return;\n }\n await this.emitter.off(this.filter, this.#listener);\n }\n };\n exports3.EventPayload = EventPayload;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/utf8.js\n var require_utf82 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/utf8.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toUtf8CodePoints = exports3.toUtf8String = exports3.toUtf8Bytes = exports3.Utf8ErrorFuncs = void 0;\n var data_js_1 = require_data2();\n var errors_js_1 = require_errors5();\n function errorFunc(reason, offset, bytes, output, badCodepoint) {\n (0, errors_js_1.assertArgument)(false, `invalid codepoint at offset ${offset}; ${reason}`, \"bytes\", bytes);\n }\n function ignoreFunc(reason, offset, bytes, output, badCodepoint) {\n if (reason === \"BAD_PREFIX\" || reason === \"UNEXPECTED_CONTINUE\") {\n let i3 = 0;\n for (let o5 = offset + 1; o5 < bytes.length; o5++) {\n if (bytes[o5] >> 6 !== 2) {\n break;\n }\n i3++;\n }\n return i3;\n }\n if (reason === \"OVERRUN\") {\n return bytes.length - offset - 1;\n }\n return 0;\n }\n function replaceFunc(reason, offset, bytes, output, badCodepoint) {\n if (reason === \"OVERLONG\") {\n (0, errors_js_1.assertArgument)(typeof badCodepoint === \"number\", \"invalid bad code point for replacement\", \"badCodepoint\", badCodepoint);\n output.push(badCodepoint);\n return 0;\n }\n output.push(65533);\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n }\n exports3.Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n });\n function getUtf8CodePoints(_bytes, onError) {\n if (onError == null) {\n onError = exports3.Utf8ErrorFuncs.error;\n }\n const bytes = (0, data_js_1.getBytes)(_bytes, \"bytes\");\n const result = [];\n let i3 = 0;\n while (i3 < bytes.length) {\n const c4 = bytes[i3++];\n if (c4 >> 7 === 0) {\n result.push(c4);\n continue;\n }\n let extraLength = null;\n let overlongMask = null;\n if ((c4 & 224) === 192) {\n extraLength = 1;\n overlongMask = 127;\n } else if ((c4 & 240) === 224) {\n extraLength = 2;\n overlongMask = 2047;\n } else if ((c4 & 248) === 240) {\n extraLength = 3;\n overlongMask = 65535;\n } else {\n if ((c4 & 192) === 128) {\n i3 += onError(\"UNEXPECTED_CONTINUE\", i3 - 1, bytes, result);\n } else {\n i3 += onError(\"BAD_PREFIX\", i3 - 1, bytes, result);\n }\n continue;\n }\n if (i3 - 1 + extraLength >= bytes.length) {\n i3 += onError(\"OVERRUN\", i3 - 1, bytes, result);\n continue;\n }\n let res = c4 & (1 << 8 - extraLength - 1) - 1;\n for (let j2 = 0; j2 < extraLength; j2++) {\n let nextChar = bytes[i3];\n if ((nextChar & 192) != 128) {\n i3 += onError(\"MISSING_CONTINUE\", i3, bytes, result);\n res = null;\n break;\n }\n ;\n res = res << 6 | nextChar & 63;\n i3++;\n }\n if (res === null) {\n continue;\n }\n if (res > 1114111) {\n i3 += onError(\"OUT_OF_RANGE\", i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res >= 55296 && res <= 57343) {\n i3 += onError(\"UTF16_SURROGATE\", i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n if (res <= overlongMask) {\n i3 += onError(\"OVERLONG\", i3 - 1 - extraLength, bytes, result, res);\n continue;\n }\n result.push(res);\n }\n return result;\n }\n function toUtf8Bytes(str, form) {\n (0, errors_js_1.assertArgument)(typeof str === \"string\", \"invalid string value\", \"str\", str);\n if (form != null) {\n (0, errors_js_1.assertNormalize)(form);\n str = str.normalize(form);\n }\n let result = [];\n for (let i3 = 0; i3 < str.length; i3++) {\n const c4 = str.charCodeAt(i3);\n if (c4 < 128) {\n result.push(c4);\n } else if (c4 < 2048) {\n result.push(c4 >> 6 | 192);\n result.push(c4 & 63 | 128);\n } else if ((c4 & 64512) == 55296) {\n i3++;\n const c22 = str.charCodeAt(i3);\n (0, errors_js_1.assertArgument)(i3 < str.length && (c22 & 64512) === 56320, \"invalid surrogate pair\", \"str\", str);\n const pair = 65536 + ((c4 & 1023) << 10) + (c22 & 1023);\n result.push(pair >> 18 | 240);\n result.push(pair >> 12 & 63 | 128);\n result.push(pair >> 6 & 63 | 128);\n result.push(pair & 63 | 128);\n } else {\n result.push(c4 >> 12 | 224);\n result.push(c4 >> 6 & 63 | 128);\n result.push(c4 & 63 | 128);\n }\n }\n return new Uint8Array(result);\n }\n exports3.toUtf8Bytes = toUtf8Bytes;\n function _toUtf8String(codePoints) {\n return codePoints.map((codePoint) => {\n if (codePoint <= 65535) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 65536;\n return String.fromCharCode((codePoint >> 10 & 1023) + 55296, (codePoint & 1023) + 56320);\n }).join(\"\");\n }\n function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n }\n exports3.toUtf8String = toUtf8String;\n function toUtf8CodePoints(str, form) {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n }\n exports3.toUtf8CodePoints = toUtf8CodePoints;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/geturl-browser.js\n var require_geturl_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/geturl-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getUrl = exports3.createGetUrl = void 0;\n var errors_js_1 = require_errors5();\n function createGetUrl(options) {\n async function getUrl3(req, _signal) {\n (0, errors_js_1.assert)(_signal == null || !_signal.cancelled, \"request cancelled before sending\", \"CANCELLED\");\n const protocol = req.url.split(\":\")[0].toLowerCase();\n (0, errors_js_1.assert)(protocol === \"http\" || protocol === \"https\", `unsupported protocol ${protocol}`, \"UNSUPPORTED_OPERATION\", {\n info: { protocol },\n operation: \"request\"\n });\n (0, errors_js_1.assert)(protocol === \"https\" || !req.credentials || req.allowInsecureAuthentication, \"insecure authorized connections unsupported\", \"UNSUPPORTED_OPERATION\", {\n operation: \"request\"\n });\n let error = null;\n const controller = new AbortController();\n const timer = setTimeout(() => {\n error = (0, errors_js_1.makeError)(\"request timeout\", \"TIMEOUT\");\n controller.abort();\n }, req.timeout);\n if (_signal) {\n _signal.addListener(() => {\n error = (0, errors_js_1.makeError)(\"request cancelled\", \"CANCELLED\");\n controller.abort();\n });\n }\n const init = Object.assign({}, options, {\n method: req.method,\n headers: new Headers(Array.from(req)),\n body: req.body || void 0,\n signal: controller.signal\n });\n let resp;\n try {\n resp = await fetch(req.url, init);\n } catch (_error) {\n clearTimeout(timer);\n if (error) {\n throw error;\n }\n throw _error;\n }\n clearTimeout(timer);\n const headers = {};\n resp.headers.forEach((value, key) => {\n headers[key.toLowerCase()] = value;\n });\n const respBody = await resp.arrayBuffer();\n const body = respBody == null ? null : new Uint8Array(respBody);\n return {\n statusCode: resp.status,\n statusMessage: resp.statusText,\n headers,\n body\n };\n }\n return getUrl3;\n }\n exports3.createGetUrl = createGetUrl;\n var defaultGetUrl = createGetUrl({});\n async function getUrl2(req, _signal) {\n return defaultGetUrl(req, _signal);\n }\n exports3.getUrl = getUrl2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/fetch.js\n var require_fetch = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/fetch.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FetchResponse = exports3.FetchRequest = exports3.FetchCancelSignal = void 0;\n var base64_js_1 = require_base64_browser();\n var data_js_1 = require_data2();\n var errors_js_1 = require_errors5();\n var properties_js_1 = require_properties2();\n var utf8_js_1 = require_utf82();\n var geturl_js_1 = require_geturl_browser();\n var MAX_ATTEMPTS = 12;\n var SLOT_INTERVAL = 250;\n var defaultGetUrlFunc = (0, geturl_js_1.createGetUrl)();\n var reData = new RegExp(\"^data:([^;:]*)?(;base64)?,(.*)$\", \"i\");\n var reIpfs = new RegExp(\"^ipfs://(ipfs/)?(.*)$\", \"i\");\n var locked = false;\n async function dataGatewayFunc(url, signal) {\n try {\n const match = url.match(reData);\n if (!match) {\n throw new Error(\"invalid data\");\n }\n return new FetchResponse(200, \"OK\", {\n \"content-type\": match[1] || \"text/plain\"\n }, match[2] ? (0, base64_js_1.decodeBase64)(match[3]) : unpercent(match[3]));\n } catch (error) {\n return new FetchResponse(599, \"BAD REQUEST (invalid data: URI)\", {}, null, new FetchRequest(url));\n }\n }\n function getIpfsGatewayFunc(baseUrl) {\n async function gatewayIpfs(url, signal) {\n try {\n const match = url.match(reIpfs);\n if (!match) {\n throw new Error(\"invalid link\");\n }\n return new FetchRequest(`${baseUrl}${match[2]}`);\n } catch (error) {\n return new FetchResponse(599, \"BAD REQUEST (invalid IPFS URI)\", {}, null, new FetchRequest(url));\n }\n }\n return gatewayIpfs;\n }\n var Gateways = {\n \"data\": dataGatewayFunc,\n \"ipfs\": getIpfsGatewayFunc(\"https://gateway.ipfs.io/ipfs/\")\n };\n var fetchSignals = /* @__PURE__ */ new WeakMap();\n var FetchCancelSignal = class {\n #listeners;\n #cancelled;\n constructor(request) {\n this.#listeners = [];\n this.#cancelled = false;\n fetchSignals.set(request, () => {\n if (this.#cancelled) {\n return;\n }\n this.#cancelled = true;\n for (const listener of this.#listeners) {\n setTimeout(() => {\n listener();\n }, 0);\n }\n this.#listeners = [];\n });\n }\n addListener(listener) {\n (0, errors_js_1.assert)(!this.#cancelled, \"singal already cancelled\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fetchCancelSignal.addCancelListener\"\n });\n this.#listeners.push(listener);\n }\n get cancelled() {\n return this.#cancelled;\n }\n checkSignal() {\n (0, errors_js_1.assert)(!this.cancelled, \"cancelled\", \"CANCELLED\", {});\n }\n };\n exports3.FetchCancelSignal = FetchCancelSignal;\n function checkSignal(signal) {\n if (signal == null) {\n throw new Error(\"missing signal; should not happen\");\n }\n signal.checkSignal();\n return signal;\n }\n var FetchRequest = class _FetchRequest {\n #allowInsecure;\n #gzip;\n #headers;\n #method;\n #timeout;\n #url;\n #body;\n #bodyType;\n #creds;\n // Hooks\n #preflight;\n #process;\n #retry;\n #signal;\n #throttle;\n #getUrlFunc;\n /**\n * The fetch URL to request.\n */\n get url() {\n return this.#url;\n }\n set url(url) {\n this.#url = String(url);\n }\n /**\n * The fetch body, if any, to send as the request body. //(default: null)//\n *\n * When setting a body, the intrinsic ``Content-Type`` is automatically\n * set and will be used if **not overridden** by setting a custom\n * header.\n *\n * If %%body%% is null, the body is cleared (along with the\n * intrinsic ``Content-Type``).\n *\n * If %%body%% is a string, the intrinsic ``Content-Type`` is set to\n * ``text/plain``.\n *\n * If %%body%% is a Uint8Array, the intrinsic ``Content-Type`` is set to\n * ``application/octet-stream``.\n *\n * If %%body%% is any other object, the intrinsic ``Content-Type`` is\n * set to ``application/json``.\n */\n get body() {\n if (this.#body == null) {\n return null;\n }\n return new Uint8Array(this.#body);\n }\n set body(body) {\n if (body == null) {\n this.#body = void 0;\n this.#bodyType = void 0;\n } else if (typeof body === \"string\") {\n this.#body = (0, utf8_js_1.toUtf8Bytes)(body);\n this.#bodyType = \"text/plain\";\n } else if (body instanceof Uint8Array) {\n this.#body = body;\n this.#bodyType = \"application/octet-stream\";\n } else if (typeof body === \"object\") {\n this.#body = (0, utf8_js_1.toUtf8Bytes)(JSON.stringify(body));\n this.#bodyType = \"application/json\";\n } else {\n throw new Error(\"invalid body\");\n }\n }\n /**\n * Returns true if the request has a body.\n */\n hasBody() {\n return this.#body != null;\n }\n /**\n * The HTTP method to use when requesting the URI. If no method\n * has been explicitly set, then ``GET`` is used if the body is\n * null and ``POST`` otherwise.\n */\n get method() {\n if (this.#method) {\n return this.#method;\n }\n if (this.hasBody()) {\n return \"POST\";\n }\n return \"GET\";\n }\n set method(method) {\n if (method == null) {\n method = \"\";\n }\n this.#method = String(method).toUpperCase();\n }\n /**\n * The headers that will be used when requesting the URI. All\n * keys are lower-case.\n *\n * This object is a copy, so any changes will **NOT** be reflected\n * in the ``FetchRequest``.\n *\n * To set a header entry, use the ``setHeader`` method.\n */\n get headers() {\n const headers = Object.assign({}, this.#headers);\n if (this.#creds) {\n headers[\"authorization\"] = `Basic ${(0, base64_js_1.encodeBase64)((0, utf8_js_1.toUtf8Bytes)(this.#creds))}`;\n }\n ;\n if (this.allowGzip) {\n headers[\"accept-encoding\"] = \"gzip\";\n }\n if (headers[\"content-type\"] == null && this.#bodyType) {\n headers[\"content-type\"] = this.#bodyType;\n }\n if (this.body) {\n headers[\"content-length\"] = String(this.body.length);\n }\n return headers;\n }\n /**\n * Get the header for %%key%%, ignoring case.\n */\n getHeader(key) {\n return this.headers[key.toLowerCase()];\n }\n /**\n * Set the header for %%key%% to %%value%%. All values are coerced\n * to a string.\n */\n setHeader(key, value) {\n this.#headers[String(key).toLowerCase()] = String(value);\n }\n /**\n * Clear all headers, resetting all intrinsic headers.\n */\n clearHeaders() {\n this.#headers = {};\n }\n [Symbol.iterator]() {\n const headers = this.headers;\n const keys = Object.keys(headers);\n let index2 = 0;\n return {\n next: () => {\n if (index2 < keys.length) {\n const key = keys[index2++];\n return {\n value: [key, headers[key]],\n done: false\n };\n }\n return { value: void 0, done: true };\n }\n };\n }\n /**\n * The value that will be sent for the ``Authorization`` header.\n *\n * To set the credentials, use the ``setCredentials`` method.\n */\n get credentials() {\n return this.#creds || null;\n }\n /**\n * Sets an ``Authorization`` for %%username%% with %%password%%.\n */\n setCredentials(username, password) {\n (0, errors_js_1.assertArgument)(!username.match(/:/), \"invalid basic authentication username\", \"username\", \"[REDACTED]\");\n this.#creds = `${username}:${password}`;\n }\n /**\n * Enable and request gzip-encoded responses. The response will\n * automatically be decompressed. //(default: true)//\n */\n get allowGzip() {\n return this.#gzip;\n }\n set allowGzip(value) {\n this.#gzip = !!value;\n }\n /**\n * Allow ``Authentication`` credentials to be sent over insecure\n * channels. //(default: false)//\n */\n get allowInsecureAuthentication() {\n return !!this.#allowInsecure;\n }\n set allowInsecureAuthentication(value) {\n this.#allowInsecure = !!value;\n }\n /**\n * The timeout (in milliseconds) to wait for a complete response.\n * //(default: 5 minutes)//\n */\n get timeout() {\n return this.#timeout;\n }\n set timeout(timeout) {\n (0, errors_js_1.assertArgument)(timeout >= 0, \"timeout must be non-zero\", \"timeout\", timeout);\n this.#timeout = timeout;\n }\n /**\n * This function is called prior to each request, for example\n * during a redirection or retry in case of server throttling.\n *\n * This offers an opportunity to populate headers or update\n * content before sending a request.\n */\n get preflightFunc() {\n return this.#preflight || null;\n }\n set preflightFunc(preflight) {\n this.#preflight = preflight;\n }\n /**\n * This function is called after each response, offering an\n * opportunity to provide client-level throttling or updating\n * response data.\n *\n * Any error thrown in this causes the ``send()`` to throw.\n *\n * To schedule a retry attempt (assuming the maximum retry limit\n * has not been reached), use [[response.throwThrottleError]].\n */\n get processFunc() {\n return this.#process || null;\n }\n set processFunc(process2) {\n this.#process = process2;\n }\n /**\n * This function is called on each retry attempt.\n */\n get retryFunc() {\n return this.#retry || null;\n }\n set retryFunc(retry) {\n this.#retry = retry;\n }\n /**\n * This function is called to fetch content from HTTP and\n * HTTPS URLs and is platform specific (e.g. nodejs vs\n * browsers).\n *\n * This is by default the currently registered global getUrl\n * function, which can be changed using [[registerGetUrl]].\n * If this has been set, setting is to ``null`` will cause\n * this FetchRequest (and any future clones) to revert back to\n * using the currently registered global getUrl function.\n *\n * Setting this is generally not necessary, but may be useful\n * for developers that wish to intercept requests or to\n * configurege a proxy or other agent.\n */\n get getUrlFunc() {\n return this.#getUrlFunc || defaultGetUrlFunc;\n }\n set getUrlFunc(value) {\n this.#getUrlFunc = value;\n }\n /**\n * Create a new FetchRequest instance with default values.\n *\n * Once created, each property may be set before issuing a\n * ``.send()`` to make the request.\n */\n constructor(url) {\n this.#url = String(url);\n this.#allowInsecure = false;\n this.#gzip = true;\n this.#headers = {};\n this.#method = \"\";\n this.#timeout = 3e5;\n this.#throttle = {\n slotInterval: SLOT_INTERVAL,\n maxAttempts: MAX_ATTEMPTS\n };\n this.#getUrlFunc = null;\n }\n toString() {\n return ``;\n }\n /**\n * Update the throttle parameters used to determine maximum\n * attempts and exponential-backoff properties.\n */\n setThrottleParams(params) {\n if (params.slotInterval != null) {\n this.#throttle.slotInterval = params.slotInterval;\n }\n if (params.maxAttempts != null) {\n this.#throttle.maxAttempts = params.maxAttempts;\n }\n }\n async #send(attempt, expires, delay, _request, _response) {\n if (attempt >= this.#throttle.maxAttempts) {\n return _response.makeServerError(\"exceeded maximum retry limit\");\n }\n (0, errors_js_1.assert)(getTime() <= expires, \"timeout\", \"TIMEOUT\", {\n operation: \"request.send\",\n reason: \"timeout\",\n request: _request\n });\n if (delay > 0) {\n await wait2(delay);\n }\n let req = this.clone();\n const scheme = (req.url.split(\":\")[0] || \"\").toLowerCase();\n if (scheme in Gateways) {\n const result = await Gateways[scheme](req.url, checkSignal(_request.#signal));\n if (result instanceof FetchResponse) {\n let response2 = result;\n if (this.processFunc) {\n checkSignal(_request.#signal);\n try {\n response2 = await this.processFunc(req, response2);\n } catch (error) {\n if (error.throttle == null || typeof error.stall !== \"number\") {\n response2.makeServerError(\"error in post-processing function\", error).assertOk();\n }\n }\n }\n return response2;\n }\n req = result;\n }\n if (this.preflightFunc) {\n req = await this.preflightFunc(req);\n }\n const resp = await this.getUrlFunc(req, checkSignal(_request.#signal));\n let response = new FetchResponse(resp.statusCode, resp.statusMessage, resp.headers, resp.body, _request);\n if (response.statusCode === 301 || response.statusCode === 302) {\n try {\n const location = response.headers.location || \"\";\n return req.redirect(location).#send(attempt + 1, expires, 0, _request, response);\n } catch (error) {\n }\n return response;\n } else if (response.statusCode === 429) {\n if (this.retryFunc == null || await this.retryFunc(req, response, attempt)) {\n const retryAfter = response.headers[\"retry-after\"];\n let delay2 = this.#throttle.slotInterval * Math.trunc(Math.random() * Math.pow(2, attempt));\n if (typeof retryAfter === \"string\" && retryAfter.match(/^[1-9][0-9]*$/)) {\n delay2 = parseInt(retryAfter);\n }\n return req.clone().#send(attempt + 1, expires, delay2, _request, response);\n }\n }\n if (this.processFunc) {\n checkSignal(_request.#signal);\n try {\n response = await this.processFunc(req, response);\n } catch (error) {\n if (error.throttle == null || typeof error.stall !== \"number\") {\n response.makeServerError(\"error in post-processing function\", error).assertOk();\n }\n let delay2 = this.#throttle.slotInterval * Math.trunc(Math.random() * Math.pow(2, attempt));\n ;\n if (error.stall >= 0) {\n delay2 = error.stall;\n }\n return req.clone().#send(attempt + 1, expires, delay2, _request, response);\n }\n }\n return response;\n }\n /**\n * Resolves to the response by sending the request.\n */\n send() {\n (0, errors_js_1.assert)(this.#signal == null, \"request already sent\", \"UNSUPPORTED_OPERATION\", { operation: \"fetchRequest.send\" });\n this.#signal = new FetchCancelSignal(this);\n return this.#send(0, getTime() + this.timeout, 0, this, new FetchResponse(0, \"\", {}, null, this));\n }\n /**\n * Cancels the inflight response, causing a ``CANCELLED``\n * error to be rejected from the [[send]].\n */\n cancel() {\n (0, errors_js_1.assert)(this.#signal != null, \"request has not been sent\", \"UNSUPPORTED_OPERATION\", { operation: \"fetchRequest.cancel\" });\n const signal = fetchSignals.get(this);\n if (!signal) {\n throw new Error(\"missing signal; should not happen\");\n }\n signal();\n }\n /**\n * Returns a new [[FetchRequest]] that represents the redirection\n * to %%location%%.\n */\n redirect(location) {\n const current = this.url.split(\":\")[0].toLowerCase();\n const target = location.split(\":\")[0].toLowerCase();\n (0, errors_js_1.assert)(this.method === \"GET\" && (current !== \"https\" || target !== \"http\") && location.match(/^https?:/), `unsupported redirect`, \"UNSUPPORTED_OPERATION\", {\n operation: `redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(location)})`\n });\n const req = new _FetchRequest(location);\n req.method = \"GET\";\n req.allowGzip = this.allowGzip;\n req.timeout = this.timeout;\n req.#headers = Object.assign({}, this.#headers);\n if (this.#body) {\n req.#body = new Uint8Array(this.#body);\n }\n req.#bodyType = this.#bodyType;\n return req;\n }\n /**\n * Create a new copy of this request.\n */\n clone() {\n const clone2 = new _FetchRequest(this.url);\n clone2.#method = this.#method;\n if (this.#body) {\n clone2.#body = this.#body;\n }\n clone2.#bodyType = this.#bodyType;\n clone2.#headers = Object.assign({}, this.#headers);\n clone2.#creds = this.#creds;\n if (this.allowGzip) {\n clone2.allowGzip = true;\n }\n clone2.timeout = this.timeout;\n if (this.allowInsecureAuthentication) {\n clone2.allowInsecureAuthentication = true;\n }\n clone2.#preflight = this.#preflight;\n clone2.#process = this.#process;\n clone2.#retry = this.#retry;\n clone2.#throttle = Object.assign({}, this.#throttle);\n clone2.#getUrlFunc = this.#getUrlFunc;\n return clone2;\n }\n /**\n * Locks all static configuration for gateways and FetchGetUrlFunc\n * registration.\n */\n static lockConfig() {\n locked = true;\n }\n /**\n * Get the current Gateway function for %%scheme%%.\n */\n static getGateway(scheme) {\n return Gateways[scheme.toLowerCase()] || null;\n }\n /**\n * Use the %%func%% when fetching URIs using %%scheme%%.\n *\n * This method affects all requests globally.\n *\n * If [[lockConfig]] has been called, no change is made and this\n * throws.\n */\n static registerGateway(scheme, func) {\n scheme = scheme.toLowerCase();\n if (scheme === \"http\" || scheme === \"https\") {\n throw new Error(`cannot intercept ${scheme}; use registerGetUrl`);\n }\n if (locked) {\n throw new Error(\"gateways locked\");\n }\n Gateways[scheme] = func;\n }\n /**\n * Use %%getUrl%% when fetching URIs over HTTP and HTTPS requests.\n *\n * This method affects all requests globally.\n *\n * If [[lockConfig]] has been called, no change is made and this\n * throws.\n */\n static registerGetUrl(getUrl2) {\n if (locked) {\n throw new Error(\"gateways locked\");\n }\n defaultGetUrlFunc = getUrl2;\n }\n /**\n * Creates a getUrl function that fetches content from HTTP and\n * HTTPS URLs.\n *\n * The available %%options%% are dependent on the platform\n * implementation of the default getUrl function.\n *\n * This is not generally something that is needed, but is useful\n * when trying to customize simple behaviour when fetching HTTP\n * content.\n */\n static createGetUrlFunc(options) {\n return (0, geturl_js_1.createGetUrl)(options);\n }\n /**\n * Creates a function that can \"fetch\" data URIs.\n *\n * Note that this is automatically done internally to support\n * data URIs, so it is not necessary to register it.\n *\n * This is not generally something that is needed, but may\n * be useful in a wrapper to perfom custom data URI functionality.\n */\n static createDataGateway() {\n return dataGatewayFunc;\n }\n /**\n * Creates a function that will fetch IPFS (unvalidated) from\n * a custom gateway baseUrl.\n *\n * The default IPFS gateway used internally is\n * ``\"https:/\\/gateway.ipfs.io/ipfs/\"``.\n */\n static createIpfsGatewayFunc(baseUrl) {\n return getIpfsGatewayFunc(baseUrl);\n }\n };\n exports3.FetchRequest = FetchRequest;\n var FetchResponse = class _FetchResponse {\n #statusCode;\n #statusMessage;\n #headers;\n #body;\n #request;\n #error;\n toString() {\n return ``;\n }\n /**\n * The response status code.\n */\n get statusCode() {\n return this.#statusCode;\n }\n /**\n * The response status message.\n */\n get statusMessage() {\n return this.#statusMessage;\n }\n /**\n * The response headers. All keys are lower-case.\n */\n get headers() {\n return Object.assign({}, this.#headers);\n }\n /**\n * The response body, or ``null`` if there was no body.\n */\n get body() {\n return this.#body == null ? null : new Uint8Array(this.#body);\n }\n /**\n * The response body as a UTF-8 encoded string, or the empty\n * string (i.e. ``\"\"``) if there was no body.\n *\n * An error is thrown if the body is invalid UTF-8 data.\n */\n get bodyText() {\n try {\n return this.#body == null ? \"\" : (0, utf8_js_1.toUtf8String)(this.#body);\n } catch (error) {\n (0, errors_js_1.assert)(false, \"response body is not valid UTF-8 data\", \"UNSUPPORTED_OPERATION\", {\n operation: \"bodyText\",\n info: { response: this }\n });\n }\n }\n /**\n * The response body, decoded as JSON.\n *\n * An error is thrown if the body is invalid JSON-encoded data\n * or if there was no body.\n */\n get bodyJson() {\n try {\n return JSON.parse(this.bodyText);\n } catch (error) {\n (0, errors_js_1.assert)(false, \"response body is not valid JSON\", \"UNSUPPORTED_OPERATION\", {\n operation: \"bodyJson\",\n info: { response: this }\n });\n }\n }\n [Symbol.iterator]() {\n const headers = this.headers;\n const keys = Object.keys(headers);\n let index2 = 0;\n return {\n next: () => {\n if (index2 < keys.length) {\n const key = keys[index2++];\n return {\n value: [key, headers[key]],\n done: false\n };\n }\n return { value: void 0, done: true };\n }\n };\n }\n constructor(statusCode, statusMessage, headers, body, request) {\n this.#statusCode = statusCode;\n this.#statusMessage = statusMessage;\n this.#headers = Object.keys(headers).reduce((accum, k4) => {\n accum[k4.toLowerCase()] = String(headers[k4]);\n return accum;\n }, {});\n this.#body = body == null ? null : new Uint8Array(body);\n this.#request = request || null;\n this.#error = { message: \"\" };\n }\n /**\n * Return a Response with matching headers and body, but with\n * an error status code (i.e. 599) and %%message%% with an\n * optional %%error%%.\n */\n makeServerError(message2, error) {\n let statusMessage;\n if (!message2) {\n message2 = `${this.statusCode} ${this.statusMessage}`;\n statusMessage = `CLIENT ESCALATED SERVER ERROR (${message2})`;\n } else {\n statusMessage = `CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${message2})`;\n }\n const response = new _FetchResponse(599, statusMessage, this.headers, this.body, this.#request || void 0);\n response.#error = { message: message2, error };\n return response;\n }\n /**\n * If called within a [request.processFunc](FetchRequest-processFunc)\n * call, causes the request to retry as if throttled for %%stall%%\n * milliseconds.\n */\n throwThrottleError(message2, stall) {\n if (stall == null) {\n stall = -1;\n } else {\n (0, errors_js_1.assertArgument)(Number.isInteger(stall) && stall >= 0, \"invalid stall timeout\", \"stall\", stall);\n }\n const error = new Error(message2 || \"throttling requests\");\n (0, properties_js_1.defineProperties)(error, { stall, throttle: true });\n throw error;\n }\n /**\n * Get the header value for %%key%%, ignoring case.\n */\n getHeader(key) {\n return this.headers[key.toLowerCase()];\n }\n /**\n * Returns true if the response has a body.\n */\n hasBody() {\n return this.#body != null;\n }\n /**\n * The request made for this response.\n */\n get request() {\n return this.#request;\n }\n /**\n * Returns true if this response was a success statusCode.\n */\n ok() {\n return this.#error.message === \"\" && this.statusCode >= 200 && this.statusCode < 300;\n }\n /**\n * Throws a ``SERVER_ERROR`` if this response is not ok.\n */\n assertOk() {\n if (this.ok()) {\n return;\n }\n let { message: message2, error } = this.#error;\n if (message2 === \"\") {\n message2 = `server response ${this.statusCode} ${this.statusMessage}`;\n }\n let requestUrl = null;\n if (this.request) {\n requestUrl = this.request.url;\n }\n let responseBody = null;\n try {\n if (this.#body) {\n responseBody = (0, utf8_js_1.toUtf8String)(this.#body);\n }\n } catch (e2) {\n }\n (0, errors_js_1.assert)(false, message2, \"SERVER_ERROR\", {\n request: this.request || \"unknown request\",\n response: this,\n error,\n info: {\n requestUrl,\n responseBody,\n responseStatus: `${this.statusCode} ${this.statusMessage}`\n }\n });\n }\n };\n exports3.FetchResponse = FetchResponse;\n function getTime() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n function unpercent(value) {\n return (0, utf8_js_1.toUtf8Bytes)(value.replace(/%([0-9a-f][0-9a-f])/gi, (all, code) => {\n return String.fromCharCode(parseInt(code, 16));\n }));\n }\n function wait2(delay) {\n return new Promise((resolve) => setTimeout(resolve, delay));\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/fixednumber.js\n var require_fixednumber2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/fixednumber.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FixedNumber = void 0;\n var data_js_1 = require_data2();\n var errors_js_1 = require_errors5();\n var maths_js_1 = require_maths();\n var properties_js_1 = require_properties2();\n var BN_N1 = BigInt(-1);\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var BN_5 = BigInt(5);\n var _guard = {};\n var Zeros = \"0000\";\n while (Zeros.length < 80) {\n Zeros += Zeros;\n }\n function getTens(decimals) {\n let result = Zeros;\n while (result.length < decimals) {\n result += result;\n }\n return BigInt(\"1\" + result.substring(0, decimals));\n }\n function checkValue(val, format, safeOp) {\n const width = BigInt(format.width);\n if (format.signed) {\n const limit = BN_1 << width - BN_1;\n (0, errors_js_1.assert)(safeOp == null || val >= -limit && val < limit, \"overflow\", \"NUMERIC_FAULT\", {\n operation: safeOp,\n fault: \"overflow\",\n value: val\n });\n if (val > BN_0) {\n val = (0, maths_js_1.fromTwos)((0, maths_js_1.mask)(val, width), width);\n } else {\n val = -(0, maths_js_1.fromTwos)((0, maths_js_1.mask)(-val, width), width);\n }\n } else {\n const limit = BN_1 << width;\n (0, errors_js_1.assert)(safeOp == null || val >= 0 && val < limit, \"overflow\", \"NUMERIC_FAULT\", {\n operation: safeOp,\n fault: \"overflow\",\n value: val\n });\n val = (val % limit + limit) % limit & limit - BN_1;\n }\n return val;\n }\n function getFormat(value) {\n if (typeof value === \"number\") {\n value = `fixed128x${value}`;\n }\n let signed = true;\n let width = 128;\n let decimals = 18;\n if (typeof value === \"string\") {\n if (value === \"fixed\") {\n } else if (value === \"ufixed\") {\n signed = false;\n } else {\n const match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);\n (0, errors_js_1.assertArgument)(match, \"invalid fixed format\", \"format\", value);\n signed = match[1] !== \"u\";\n width = parseInt(match[2]);\n decimals = parseInt(match[3]);\n }\n } else if (value) {\n const v2 = value;\n const check2 = (key, type, defaultValue) => {\n if (v2[key] == null) {\n return defaultValue;\n }\n (0, errors_js_1.assertArgument)(typeof v2[key] === type, \"invalid fixed format (\" + key + \" not \" + type + \")\", \"format.\" + key, v2[key]);\n return v2[key];\n };\n signed = check2(\"signed\", \"boolean\", signed);\n width = check2(\"width\", \"number\", width);\n decimals = check2(\"decimals\", \"number\", decimals);\n }\n (0, errors_js_1.assertArgument)(width % 8 === 0, \"invalid FixedNumber width (not byte aligned)\", \"format.width\", width);\n (0, errors_js_1.assertArgument)(decimals <= 80, \"invalid FixedNumber decimals (too large)\", \"format.decimals\", decimals);\n const name = (signed ? \"\" : \"u\") + \"fixed\" + String(width) + \"x\" + String(decimals);\n return { signed, width, decimals, name };\n }\n function toString2(val, decimals) {\n let negative = \"\";\n if (val < BN_0) {\n negative = \"-\";\n val *= BN_N1;\n }\n let str = val.toString();\n if (decimals === 0) {\n return negative + str;\n }\n while (str.length <= decimals) {\n str = Zeros + str;\n }\n const index2 = str.length - decimals;\n str = str.substring(0, index2) + \".\" + str.substring(index2);\n while (str[0] === \"0\" && str[1] !== \".\") {\n str = str.substring(1);\n }\n while (str[str.length - 1] === \"0\" && str[str.length - 2] !== \".\") {\n str = str.substring(0, str.length - 1);\n }\n return negative + str;\n }\n var FixedNumber = class _FixedNumber {\n /**\n * The specific fixed-point arithmetic field for this value.\n */\n format;\n #format;\n // The actual value (accounting for decimals)\n #val;\n // A base-10 value to multiple values by to maintain the magnitude\n #tens;\n /**\n * This is a property so console.log shows a human-meaningful value.\n *\n * @private\n */\n _value;\n // Use this when changing this file to get some typing info,\n // but then switch to any to mask the internal type\n //constructor(guard: any, value: bigint, format: _FixedFormat) {\n /**\n * @private\n */\n constructor(guard, value, format) {\n (0, errors_js_1.assertPrivate)(guard, _guard, \"FixedNumber\");\n this.#val = value;\n this.#format = format;\n const _value = toString2(value, format.decimals);\n (0, properties_js_1.defineProperties)(this, { format: format.name, _value });\n this.#tens = getTens(format.decimals);\n }\n /**\n * If true, negative values are permitted, otherwise only\n * positive values and zero are allowed.\n */\n get signed() {\n return this.#format.signed;\n }\n /**\n * The number of bits available to store the value.\n */\n get width() {\n return this.#format.width;\n }\n /**\n * The number of decimal places in the fixed-point arithment field.\n */\n get decimals() {\n return this.#format.decimals;\n }\n /**\n * The value as an integer, based on the smallest unit the\n * [[decimals]] allow.\n */\n get value() {\n return this.#val;\n }\n #checkFormat(other) {\n (0, errors_js_1.assertArgument)(this.format === other.format, \"incompatible format; use fixedNumber.toFormat\", \"other\", other);\n }\n #checkValue(val, safeOp) {\n val = checkValue(val, this.#format, safeOp);\n return new _FixedNumber(_guard, val, this.#format);\n }\n #add(o5, safeOp) {\n this.#checkFormat(o5);\n return this.#checkValue(this.#val + o5.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% added\n * to %%other%%, ignoring overflow.\n */\n addUnsafe(other) {\n return this.#add(other);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% added\n * to %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n add(other) {\n return this.#add(other, \"add\");\n }\n #sub(o5, safeOp) {\n this.#checkFormat(o5);\n return this.#checkValue(this.#val - o5.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%other%% subtracted\n * from %%this%%, ignoring overflow.\n */\n subUnsafe(other) {\n return this.#sub(other);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%other%% subtracted\n * from %%this%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n sub(other) {\n return this.#sub(other, \"sub\");\n }\n #mul(o5, safeOp) {\n this.#checkFormat(o5);\n return this.#checkValue(this.#val * o5.#val / this.#tens, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%, ignoring overflow and underflow (precision loss).\n */\n mulUnsafe(other) {\n return this.#mul(other);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs.\n */\n mul(other) {\n return this.#mul(other, \"mul\");\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% multiplied\n * by %%other%%. A [[NumericFaultError]] is thrown if overflow\n * occurs or if underflow (precision loss) occurs.\n */\n mulSignal(other) {\n this.#checkFormat(other);\n const value = this.#val * other.#val;\n (0, errors_js_1.assert)(value % this.#tens === BN_0, \"precision lost during signalling mul\", \"NUMERIC_FAULT\", {\n operation: \"mulSignal\",\n fault: \"underflow\",\n value: this\n });\n return this.#checkValue(value / this.#tens, \"mulSignal\");\n }\n #div(o5, safeOp) {\n (0, errors_js_1.assert)(o5.#val !== BN_0, \"division by zero\", \"NUMERIC_FAULT\", {\n operation: \"div\",\n fault: \"divide-by-zero\",\n value: this\n });\n this.#checkFormat(o5);\n return this.#checkValue(this.#val * this.#tens / o5.#val, safeOp);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%, ignoring underflow (precision loss). A\n * [[NumericFaultError]] is thrown if overflow occurs.\n */\n divUnsafe(other) {\n return this.#div(other);\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%, ignoring underflow (precision loss). A\n * [[NumericFaultError]] is thrown if overflow occurs.\n */\n div(other) {\n return this.#div(other, \"div\");\n }\n /**\n * Returns a new [[FixedNumber]] with the result of %%this%% divided\n * by %%other%%. A [[NumericFaultError]] is thrown if underflow\n * (precision loss) occurs.\n */\n divSignal(other) {\n (0, errors_js_1.assert)(other.#val !== BN_0, \"division by zero\", \"NUMERIC_FAULT\", {\n operation: \"div\",\n fault: \"divide-by-zero\",\n value: this\n });\n this.#checkFormat(other);\n const value = this.#val * this.#tens;\n (0, errors_js_1.assert)(value % other.#val === BN_0, \"precision lost during signalling div\", \"NUMERIC_FAULT\", {\n operation: \"divSignal\",\n fault: \"underflow\",\n value: this\n });\n return this.#checkValue(value / other.#val, \"divSignal\");\n }\n /**\n * Returns a comparison result between %%this%% and %%other%%.\n *\n * This is suitable for use in sorting, where ``-1`` implies %%this%%\n * is smaller, ``1`` implies %%this%% is larger and ``0`` implies\n * both are equal.\n */\n cmp(other) {\n let a3 = this.value, b4 = other.value;\n const delta = this.decimals - other.decimals;\n if (delta > 0) {\n b4 *= getTens(delta);\n } else if (delta < 0) {\n a3 *= getTens(-delta);\n }\n if (a3 < b4) {\n return -1;\n }\n if (a3 > b4) {\n return 1;\n }\n return 0;\n }\n /**\n * Returns true if %%other%% is equal to %%this%%.\n */\n eq(other) {\n return this.cmp(other) === 0;\n }\n /**\n * Returns true if %%other%% is less than to %%this%%.\n */\n lt(other) {\n return this.cmp(other) < 0;\n }\n /**\n * Returns true if %%other%% is less than or equal to %%this%%.\n */\n lte(other) {\n return this.cmp(other) <= 0;\n }\n /**\n * Returns true if %%other%% is greater than to %%this%%.\n */\n gt(other) {\n return this.cmp(other) > 0;\n }\n /**\n * Returns true if %%other%% is greater than or equal to %%this%%.\n */\n gte(other) {\n return this.cmp(other) >= 0;\n }\n /**\n * Returns a new [[FixedNumber]] which is the largest **integer**\n * that is less than or equal to %%this%%.\n *\n * The decimal component of the result will always be ``0``.\n */\n floor() {\n let val = this.#val;\n if (this.#val < BN_0) {\n val -= this.#tens - BN_1;\n }\n val = this.#val / this.#tens * this.#tens;\n return this.#checkValue(val, \"floor\");\n }\n /**\n * Returns a new [[FixedNumber]] which is the smallest **integer**\n * that is greater than or equal to %%this%%.\n *\n * The decimal component of the result will always be ``0``.\n */\n ceiling() {\n let val = this.#val;\n if (this.#val > BN_0) {\n val += this.#tens - BN_1;\n }\n val = this.#val / this.#tens * this.#tens;\n return this.#checkValue(val, \"ceiling\");\n }\n /**\n * Returns a new [[FixedNumber]] with the decimal component\n * rounded up on ties at %%decimals%% places.\n */\n round(decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n if (decimals >= this.decimals) {\n return this;\n }\n const delta = this.decimals - decimals;\n const bump = BN_5 * getTens(delta - 1);\n let value = this.value + bump;\n const tens = getTens(delta);\n value = value / tens * tens;\n checkValue(value, this.#format, \"round\");\n return new _FixedNumber(_guard, value, this.#format);\n }\n /**\n * Returns true if %%this%% is equal to ``0``.\n */\n isZero() {\n return this.#val === BN_0;\n }\n /**\n * Returns true if %%this%% is less than ``0``.\n */\n isNegative() {\n return this.#val < BN_0;\n }\n /**\n * Returns the string representation of %%this%%.\n */\n toString() {\n return this._value;\n }\n /**\n * Returns a float approximation.\n *\n * Due to IEEE 754 precission (or lack thereof), this function\n * can only return an approximation and most values will contain\n * rounding errors.\n */\n toUnsafeFloat() {\n return parseFloat(this.toString());\n }\n /**\n * Return a new [[FixedNumber]] with the same value but has had\n * its field set to %%format%%.\n *\n * This will throw if the value cannot fit into %%format%%.\n */\n toFormat(format) {\n return _FixedNumber.fromString(this.toString(), format);\n }\n /**\n * Creates a new [[FixedNumber]] for %%value%% divided by\n * %%decimal%% places with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% (once adjusted\n * for %%decimals%%) cannot fit in %%format%%, either due to overflow\n * or underflow (precision loss).\n */\n static fromValue(_value, _decimals, _format) {\n const decimals = _decimals == null ? 0 : (0, maths_js_1.getNumber)(_decimals);\n const format = getFormat(_format);\n let value = (0, maths_js_1.getBigInt)(_value, \"value\");\n const delta = decimals - format.decimals;\n if (delta > 0) {\n const tens = getTens(delta);\n (0, errors_js_1.assert)(value % tens === BN_0, \"value loses precision for format\", \"NUMERIC_FAULT\", {\n operation: \"fromValue\",\n fault: \"underflow\",\n value: _value\n });\n value /= tens;\n } else if (delta < 0) {\n value *= getTens(-delta);\n }\n checkValue(value, format, \"fromValue\");\n return new _FixedNumber(_guard, value, format);\n }\n /**\n * Creates a new [[FixedNumber]] for %%value%% with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% cannot fit\n * in %%format%%, either due to overflow or underflow (precision loss).\n */\n static fromString(_value, _format) {\n const match = _value.match(/^(-?)([0-9]*)\\.?([0-9]*)$/);\n (0, errors_js_1.assertArgument)(match && match[2].length + match[3].length > 0, \"invalid FixedNumber string value\", \"value\", _value);\n const format = getFormat(_format);\n let whole = match[2] || \"0\", decimal = match[3] || \"\";\n while (decimal.length < format.decimals) {\n decimal += Zeros;\n }\n (0, errors_js_1.assert)(decimal.substring(format.decimals).match(/^0*$/), \"too many decimals for format\", \"NUMERIC_FAULT\", {\n operation: \"fromString\",\n fault: \"underflow\",\n value: _value\n });\n decimal = decimal.substring(0, format.decimals);\n const value = BigInt(match[1] + whole + decimal);\n checkValue(value, format, \"fromString\");\n return new _FixedNumber(_guard, value, format);\n }\n /**\n * Creates a new [[FixedNumber]] with the big-endian representation\n * %%value%% with %%format%%.\n *\n * This will throw a [[NumericFaultError]] if %%value%% cannot fit\n * in %%format%% due to overflow.\n */\n static fromBytes(_value, _format) {\n let value = (0, maths_js_1.toBigInt)((0, data_js_1.getBytes)(_value, \"value\"));\n const format = getFormat(_format);\n if (format.signed) {\n value = (0, maths_js_1.fromTwos)(value, format.width);\n }\n checkValue(value, format, \"fromBytes\");\n return new _FixedNumber(_guard, value, format);\n }\n };\n exports3.FixedNumber = FixedNumber;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/rlp-decode.js\n var require_rlp_decode = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/rlp-decode.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeRlp = void 0;\n var data_js_1 = require_data2();\n var errors_js_1 = require_errors5();\n var data_js_2 = require_data2();\n function hexlifyByte(value) {\n let result = value.toString(16);\n while (result.length < 2) {\n result = \"0\" + result;\n }\n return \"0x\" + result;\n }\n function unarrayifyInteger(data, offset, length) {\n let result = 0;\n for (let i3 = 0; i3 < length; i3++) {\n result = result * 256 + data[offset + i3];\n }\n return result;\n }\n function _decodeChildren(data, offset, childOffset, length) {\n const result = [];\n while (childOffset < offset + 1 + length) {\n const decoded = _decode(data, childOffset);\n result.push(decoded.result);\n childOffset += decoded.consumed;\n (0, errors_js_1.assert)(childOffset <= offset + 1 + length, \"child data too short\", \"BUFFER_OVERRUN\", {\n buffer: data,\n length,\n offset\n });\n }\n return { consumed: 1 + length, result };\n }\n function _decode(data, offset) {\n (0, errors_js_1.assert)(data.length !== 0, \"data too short\", \"BUFFER_OVERRUN\", {\n buffer: data,\n length: 0,\n offset: 1\n });\n const checkOffset = (offset2) => {\n (0, errors_js_1.assert)(offset2 <= data.length, \"data short segment too short\", \"BUFFER_OVERRUN\", {\n buffer: data,\n length: data.length,\n offset: offset2\n });\n };\n if (data[offset] >= 248) {\n const lengthLength = data[offset] - 247;\n checkOffset(offset + 1 + lengthLength);\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n checkOffset(offset + 1 + lengthLength + length);\n return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length);\n } else if (data[offset] >= 192) {\n const length = data[offset] - 192;\n checkOffset(offset + 1 + length);\n return _decodeChildren(data, offset, offset + 1, length);\n } else if (data[offset] >= 184) {\n const lengthLength = data[offset] - 183;\n checkOffset(offset + 1 + lengthLength);\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n checkOffset(offset + 1 + lengthLength + length);\n const result = (0, data_js_1.hexlify)(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length));\n return { consumed: 1 + lengthLength + length, result };\n } else if (data[offset] >= 128) {\n const length = data[offset] - 128;\n checkOffset(offset + 1 + length);\n const result = (0, data_js_1.hexlify)(data.slice(offset + 1, offset + 1 + length));\n return { consumed: 1 + length, result };\n }\n return { consumed: 1, result: hexlifyByte(data[offset]) };\n }\n function decodeRlp(_data) {\n const data = (0, data_js_2.getBytes)(_data, \"data\");\n const decoded = _decode(data, 0);\n (0, errors_js_1.assertArgument)(decoded.consumed === data.length, \"unexpected junk after rlp payload\", \"data\", _data);\n return decoded.result;\n }\n exports3.decodeRlp = decodeRlp;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/rlp-encode.js\n var require_rlp_encode = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/rlp-encode.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encodeRlp = void 0;\n var data_js_1 = require_data2();\n function arrayifyInteger(value) {\n const result = [];\n while (value) {\n result.unshift(value & 255);\n value >>= 8;\n }\n return result;\n }\n function _encode(object) {\n if (Array.isArray(object)) {\n let payload = [];\n object.forEach(function(child) {\n payload = payload.concat(_encode(child));\n });\n if (payload.length <= 55) {\n payload.unshift(192 + payload.length);\n return payload;\n }\n const length2 = arrayifyInteger(payload.length);\n length2.unshift(247 + length2.length);\n return length2.concat(payload);\n }\n const data = Array.prototype.slice.call((0, data_js_1.getBytes)(object, \"object\"));\n if (data.length === 1 && data[0] <= 127) {\n return data;\n } else if (data.length <= 55) {\n data.unshift(128 + data.length);\n return data;\n }\n const length = arrayifyInteger(data.length);\n length.unshift(183 + length.length);\n return length.concat(data);\n }\n var nibbles = \"0123456789abcdef\";\n function encodeRlp(object) {\n let result = \"0x\";\n for (const v2 of _encode(object)) {\n result += nibbles[v2 >> 4];\n result += nibbles[v2 & 15];\n }\n return result;\n }\n exports3.encodeRlp = encodeRlp;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/units.js\n var require_units = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/units.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.parseEther = exports3.formatEther = exports3.parseUnits = exports3.formatUnits = void 0;\n var errors_js_1 = require_errors5();\n var fixednumber_js_1 = require_fixednumber2();\n var maths_js_1 = require_maths();\n var names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\"\n ];\n function formatUnits2(value, unit) {\n let decimals = 18;\n if (typeof unit === \"string\") {\n const index2 = names.indexOf(unit);\n (0, errors_js_1.assertArgument)(index2 >= 0, \"invalid unit\", \"unit\", unit);\n decimals = 3 * index2;\n } else if (unit != null) {\n decimals = (0, maths_js_1.getNumber)(unit, \"unit\");\n }\n return fixednumber_js_1.FixedNumber.fromValue(value, decimals, { decimals, width: 512 }).toString();\n }\n exports3.formatUnits = formatUnits2;\n function parseUnits(value, unit) {\n (0, errors_js_1.assertArgument)(typeof value === \"string\", \"value must be a string\", \"value\", value);\n let decimals = 18;\n if (typeof unit === \"string\") {\n const index2 = names.indexOf(unit);\n (0, errors_js_1.assertArgument)(index2 >= 0, \"invalid unit\", \"unit\", unit);\n decimals = 3 * index2;\n } else if (unit != null) {\n decimals = (0, maths_js_1.getNumber)(unit, \"unit\");\n }\n return fixednumber_js_1.FixedNumber.fromString(value, { decimals, width: 512 }).value;\n }\n exports3.parseUnits = parseUnits;\n function formatEther2(wei) {\n return formatUnits2(wei, 18);\n }\n exports3.formatEther = formatEther2;\n function parseEther(ether) {\n return parseUnits(ether, 18);\n }\n exports3.parseEther = parseEther;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/uuid.js\n var require_uuid = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/uuid.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.uuidV4 = void 0;\n var data_js_1 = require_data2();\n function uuidV4(randomBytes2) {\n const bytes = (0, data_js_1.getBytes)(randomBytes2, \"randomBytes\");\n bytes[6] = bytes[6] & 15 | 64;\n bytes[8] = bytes[8] & 63 | 128;\n const value = (0, data_js_1.hexlify)(bytes);\n return [\n value.substring(2, 10),\n value.substring(10, 14),\n value.substring(14, 18),\n value.substring(18, 22),\n value.substring(22, 34)\n ].join(\"-\");\n }\n exports3.uuidV4 = uuidV4;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/index.js\n var require_utils13 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/utils/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toUtf8String = exports3.toUtf8CodePoints = exports3.toUtf8Bytes = exports3.parseUnits = exports3.formatUnits = exports3.parseEther = exports3.formatEther = exports3.encodeRlp = exports3.decodeRlp = exports3.defineProperties = exports3.resolveProperties = exports3.toQuantity = exports3.toBeArray = exports3.toBeHex = exports3.toNumber = exports3.toBigInt = exports3.getUint = exports3.getNumber = exports3.getBigInt = exports3.mask = exports3.toTwos = exports3.fromTwos = exports3.FixedNumber = exports3.FetchCancelSignal = exports3.FetchResponse = exports3.FetchRequest = exports3.EventPayload = exports3.makeError = exports3.assertNormalize = exports3.assertPrivate = exports3.assertArgumentCount = exports3.assertArgument = exports3.assert = exports3.isError = exports3.isCallException = exports3.zeroPadBytes = exports3.zeroPadValue = exports3.stripZerosLeft = exports3.dataSlice = exports3.dataLength = exports3.concat = exports3.hexlify = exports3.isBytesLike = exports3.isHexString = exports3.getBytesCopy = exports3.getBytes = exports3.encodeBase64 = exports3.decodeBase64 = exports3.encodeBase58 = exports3.decodeBase58 = void 0;\n exports3.uuidV4 = exports3.Utf8ErrorFuncs = void 0;\n var base58_js_1 = require_base58();\n Object.defineProperty(exports3, \"decodeBase58\", { enumerable: true, get: function() {\n return base58_js_1.decodeBase58;\n } });\n Object.defineProperty(exports3, \"encodeBase58\", { enumerable: true, get: function() {\n return base58_js_1.encodeBase58;\n } });\n var base64_js_1 = require_base64_browser();\n Object.defineProperty(exports3, \"decodeBase64\", { enumerable: true, get: function() {\n return base64_js_1.decodeBase64;\n } });\n Object.defineProperty(exports3, \"encodeBase64\", { enumerable: true, get: function() {\n return base64_js_1.encodeBase64;\n } });\n var data_js_1 = require_data2();\n Object.defineProperty(exports3, \"getBytes\", { enumerable: true, get: function() {\n return data_js_1.getBytes;\n } });\n Object.defineProperty(exports3, \"getBytesCopy\", { enumerable: true, get: function() {\n return data_js_1.getBytesCopy;\n } });\n Object.defineProperty(exports3, \"isHexString\", { enumerable: true, get: function() {\n return data_js_1.isHexString;\n } });\n Object.defineProperty(exports3, \"isBytesLike\", { enumerable: true, get: function() {\n return data_js_1.isBytesLike;\n } });\n Object.defineProperty(exports3, \"hexlify\", { enumerable: true, get: function() {\n return data_js_1.hexlify;\n } });\n Object.defineProperty(exports3, \"concat\", { enumerable: true, get: function() {\n return data_js_1.concat;\n } });\n Object.defineProperty(exports3, \"dataLength\", { enumerable: true, get: function() {\n return data_js_1.dataLength;\n } });\n Object.defineProperty(exports3, \"dataSlice\", { enumerable: true, get: function() {\n return data_js_1.dataSlice;\n } });\n Object.defineProperty(exports3, \"stripZerosLeft\", { enumerable: true, get: function() {\n return data_js_1.stripZerosLeft;\n } });\n Object.defineProperty(exports3, \"zeroPadValue\", { enumerable: true, get: function() {\n return data_js_1.zeroPadValue;\n } });\n Object.defineProperty(exports3, \"zeroPadBytes\", { enumerable: true, get: function() {\n return data_js_1.zeroPadBytes;\n } });\n var errors_js_1 = require_errors5();\n Object.defineProperty(exports3, \"isCallException\", { enumerable: true, get: function() {\n return errors_js_1.isCallException;\n } });\n Object.defineProperty(exports3, \"isError\", { enumerable: true, get: function() {\n return errors_js_1.isError;\n } });\n Object.defineProperty(exports3, \"assert\", { enumerable: true, get: function() {\n return errors_js_1.assert;\n } });\n Object.defineProperty(exports3, \"assertArgument\", { enumerable: true, get: function() {\n return errors_js_1.assertArgument;\n } });\n Object.defineProperty(exports3, \"assertArgumentCount\", { enumerable: true, get: function() {\n return errors_js_1.assertArgumentCount;\n } });\n Object.defineProperty(exports3, \"assertPrivate\", { enumerable: true, get: function() {\n return errors_js_1.assertPrivate;\n } });\n Object.defineProperty(exports3, \"assertNormalize\", { enumerable: true, get: function() {\n return errors_js_1.assertNormalize;\n } });\n Object.defineProperty(exports3, \"makeError\", { enumerable: true, get: function() {\n return errors_js_1.makeError;\n } });\n var events_js_1 = require_events();\n Object.defineProperty(exports3, \"EventPayload\", { enumerable: true, get: function() {\n return events_js_1.EventPayload;\n } });\n var fetch_js_1 = require_fetch();\n Object.defineProperty(exports3, \"FetchRequest\", { enumerable: true, get: function() {\n return fetch_js_1.FetchRequest;\n } });\n Object.defineProperty(exports3, \"FetchResponse\", { enumerable: true, get: function() {\n return fetch_js_1.FetchResponse;\n } });\n Object.defineProperty(exports3, \"FetchCancelSignal\", { enumerable: true, get: function() {\n return fetch_js_1.FetchCancelSignal;\n } });\n var fixednumber_js_1 = require_fixednumber2();\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return fixednumber_js_1.FixedNumber;\n } });\n var maths_js_1 = require_maths();\n Object.defineProperty(exports3, \"fromTwos\", { enumerable: true, get: function() {\n return maths_js_1.fromTwos;\n } });\n Object.defineProperty(exports3, \"toTwos\", { enumerable: true, get: function() {\n return maths_js_1.toTwos;\n } });\n Object.defineProperty(exports3, \"mask\", { enumerable: true, get: function() {\n return maths_js_1.mask;\n } });\n Object.defineProperty(exports3, \"getBigInt\", { enumerable: true, get: function() {\n return maths_js_1.getBigInt;\n } });\n Object.defineProperty(exports3, \"getNumber\", { enumerable: true, get: function() {\n return maths_js_1.getNumber;\n } });\n Object.defineProperty(exports3, \"getUint\", { enumerable: true, get: function() {\n return maths_js_1.getUint;\n } });\n Object.defineProperty(exports3, \"toBigInt\", { enumerable: true, get: function() {\n return maths_js_1.toBigInt;\n } });\n Object.defineProperty(exports3, \"toNumber\", { enumerable: true, get: function() {\n return maths_js_1.toNumber;\n } });\n Object.defineProperty(exports3, \"toBeHex\", { enumerable: true, get: function() {\n return maths_js_1.toBeHex;\n } });\n Object.defineProperty(exports3, \"toBeArray\", { enumerable: true, get: function() {\n return maths_js_1.toBeArray;\n } });\n Object.defineProperty(exports3, \"toQuantity\", { enumerable: true, get: function() {\n return maths_js_1.toQuantity;\n } });\n var properties_js_1 = require_properties2();\n Object.defineProperty(exports3, \"resolveProperties\", { enumerable: true, get: function() {\n return properties_js_1.resolveProperties;\n } });\n Object.defineProperty(exports3, \"defineProperties\", { enumerable: true, get: function() {\n return properties_js_1.defineProperties;\n } });\n var rlp_decode_js_1 = require_rlp_decode();\n Object.defineProperty(exports3, \"decodeRlp\", { enumerable: true, get: function() {\n return rlp_decode_js_1.decodeRlp;\n } });\n var rlp_encode_js_1 = require_rlp_encode();\n Object.defineProperty(exports3, \"encodeRlp\", { enumerable: true, get: function() {\n return rlp_encode_js_1.encodeRlp;\n } });\n var units_js_1 = require_units();\n Object.defineProperty(exports3, \"formatEther\", { enumerable: true, get: function() {\n return units_js_1.formatEther;\n } });\n Object.defineProperty(exports3, \"parseEther\", { enumerable: true, get: function() {\n return units_js_1.parseEther;\n } });\n Object.defineProperty(exports3, \"formatUnits\", { enumerable: true, get: function() {\n return units_js_1.formatUnits;\n } });\n Object.defineProperty(exports3, \"parseUnits\", { enumerable: true, get: function() {\n return units_js_1.parseUnits;\n } });\n var utf8_js_1 = require_utf82();\n Object.defineProperty(exports3, \"toUtf8Bytes\", { enumerable: true, get: function() {\n return utf8_js_1.toUtf8Bytes;\n } });\n Object.defineProperty(exports3, \"toUtf8CodePoints\", { enumerable: true, get: function() {\n return utf8_js_1.toUtf8CodePoints;\n } });\n Object.defineProperty(exports3, \"toUtf8String\", { enumerable: true, get: function() {\n return utf8_js_1.toUtf8String;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorFuncs\", { enumerable: true, get: function() {\n return utf8_js_1.Utf8ErrorFuncs;\n } });\n var uuid_js_1 = require_uuid();\n Object.defineProperty(exports3, \"uuidV4\", { enumerable: true, get: function() {\n return uuid_js_1.uuidV4;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/abstract-coder.js\n var require_abstract_coder2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/abstract-coder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Reader = exports3.Writer = exports3.Coder = exports3.checkResultErrors = exports3.Result = exports3.WordSize = void 0;\n var index_js_1 = require_utils13();\n exports3.WordSize = 32;\n var Padding = new Uint8Array(exports3.WordSize);\n var passProperties = [\"then\"];\n var _guard = {};\n var resultNames = /* @__PURE__ */ new WeakMap();\n function getNames(result) {\n return resultNames.get(result);\n }\n function setNames(result, names) {\n resultNames.set(result, names);\n }\n function throwError(name, error) {\n const wrapped = new Error(`deferred error during ABI decoding triggered accessing ${name}`);\n wrapped.error = error;\n throw wrapped;\n }\n function toObject(names, items, deep) {\n if (names.indexOf(null) >= 0) {\n return items.map((item, index2) => {\n if (item instanceof Result) {\n return toObject(getNames(item), item, deep);\n }\n return item;\n });\n }\n return names.reduce((accum, name, index2) => {\n let item = items.getValue(name);\n if (!(name in accum)) {\n if (deep && item instanceof Result) {\n item = toObject(getNames(item), item, deep);\n }\n accum[name] = item;\n }\n return accum;\n }, {});\n }\n var Result = class _Result extends Array {\n // No longer used; but cannot be removed as it will remove the\n // #private field from the .d.ts which may break backwards\n // compatibility\n #names;\n /**\n * @private\n */\n constructor(...args) {\n const guard = args[0];\n let items = args[1];\n let names = (args[2] || []).slice();\n let wrap5 = true;\n if (guard !== _guard) {\n items = args;\n names = [];\n wrap5 = false;\n }\n super(items.length);\n items.forEach((item, index2) => {\n this[index2] = item;\n });\n const nameCounts = names.reduce((accum, name) => {\n if (typeof name === \"string\") {\n accum.set(name, (accum.get(name) || 0) + 1);\n }\n return accum;\n }, /* @__PURE__ */ new Map());\n setNames(this, Object.freeze(items.map((item, index2) => {\n const name = names[index2];\n if (name != null && nameCounts.get(name) === 1) {\n return name;\n }\n return null;\n })));\n this.#names = [];\n if (this.#names == null) {\n void this.#names;\n }\n if (!wrap5) {\n return;\n }\n Object.freeze(this);\n const proxy = new Proxy(this, {\n get: (target, prop, receiver) => {\n if (typeof prop === \"string\") {\n if (prop.match(/^[0-9]+$/)) {\n const index2 = (0, index_js_1.getNumber)(prop, \"%index\");\n if (index2 < 0 || index2 >= this.length) {\n throw new RangeError(\"out of result range\");\n }\n const item = target[index2];\n if (item instanceof Error) {\n throwError(`index ${index2}`, item);\n }\n return item;\n }\n if (passProperties.indexOf(prop) >= 0) {\n return Reflect.get(target, prop, receiver);\n }\n const value = target[prop];\n if (value instanceof Function) {\n return function(...args2) {\n return value.apply(this === receiver ? target : this, args2);\n };\n } else if (!(prop in target)) {\n return target.getValue.apply(this === receiver ? target : this, [prop]);\n }\n }\n return Reflect.get(target, prop, receiver);\n }\n });\n setNames(proxy, getNames(this));\n return proxy;\n }\n /**\n * Returns the Result as a normal Array. If %%deep%%, any children\n * which are Result objects are also converted to a normal Array.\n *\n * This will throw if there are any outstanding deferred\n * errors.\n */\n toArray(deep) {\n const result = [];\n this.forEach((item, index2) => {\n if (item instanceof Error) {\n throwError(`index ${index2}`, item);\n }\n if (deep && item instanceof _Result) {\n item = item.toArray(deep);\n }\n result.push(item);\n });\n return result;\n }\n /**\n * Returns the Result as an Object with each name-value pair. If\n * %%deep%%, any children which are Result objects are also\n * converted to an Object.\n *\n * This will throw if any value is unnamed, or if there are\n * any outstanding deferred errors.\n */\n toObject(deep) {\n const names = getNames(this);\n return names.reduce((accum, name, index2) => {\n (0, index_js_1.assert)(name != null, `value at index ${index2} unnamed`, \"UNSUPPORTED_OPERATION\", {\n operation: \"toObject()\"\n });\n return toObject(names, this, deep);\n }, {});\n }\n /**\n * @_ignore\n */\n slice(start, end) {\n if (start == null) {\n start = 0;\n }\n if (start < 0) {\n start += this.length;\n if (start < 0) {\n start = 0;\n }\n }\n if (end == null) {\n end = this.length;\n }\n if (end < 0) {\n end += this.length;\n if (end < 0) {\n end = 0;\n }\n }\n if (end > this.length) {\n end = this.length;\n }\n const _names = getNames(this);\n const result = [], names = [];\n for (let i3 = start; i3 < end; i3++) {\n result.push(this[i3]);\n names.push(_names[i3]);\n }\n return new _Result(_guard, result, names);\n }\n /**\n * @_ignore\n */\n filter(callback, thisArg) {\n const _names = getNames(this);\n const result = [], names = [];\n for (let i3 = 0; i3 < this.length; i3++) {\n const item = this[i3];\n if (item instanceof Error) {\n throwError(`index ${i3}`, item);\n }\n if (callback.call(thisArg, item, i3, this)) {\n result.push(item);\n names.push(_names[i3]);\n }\n }\n return new _Result(_guard, result, names);\n }\n /**\n * @_ignore\n */\n map(callback, thisArg) {\n const result = [];\n for (let i3 = 0; i3 < this.length; i3++) {\n const item = this[i3];\n if (item instanceof Error) {\n throwError(`index ${i3}`, item);\n }\n result.push(callback.call(thisArg, item, i3, this));\n }\n return result;\n }\n /**\n * Returns the value for %%name%%.\n *\n * Since it is possible to have a key whose name conflicts with\n * a method on a [[Result]] or its superclass Array, or any\n * JavaScript keyword, this ensures all named values are still\n * accessible by name.\n */\n getValue(name) {\n const index2 = getNames(this).indexOf(name);\n if (index2 === -1) {\n return void 0;\n }\n const value = this[index2];\n if (value instanceof Error) {\n throwError(`property ${JSON.stringify(name)}`, value.error);\n }\n return value;\n }\n /**\n * Creates a new [[Result]] for %%items%% with each entry\n * also accessible by its corresponding name in %%keys%%.\n */\n static fromItems(items, keys) {\n return new _Result(_guard, items, keys);\n }\n };\n exports3.Result = Result;\n function checkResultErrors(result) {\n const errors = [];\n const checkErrors = function(path, object) {\n if (!Array.isArray(object)) {\n return;\n }\n for (let key in object) {\n const childPath = path.slice();\n childPath.push(key);\n try {\n checkErrors(childPath, object[key]);\n } catch (error) {\n errors.push({ path: childPath, error });\n }\n }\n };\n checkErrors([], result);\n return errors;\n }\n exports3.checkResultErrors = checkResultErrors;\n function getValue(value) {\n let bytes = (0, index_js_1.toBeArray)(value);\n (0, index_js_1.assert)(bytes.length <= exports3.WordSize, \"value out-of-bounds\", \"BUFFER_OVERRUN\", { buffer: bytes, length: exports3.WordSize, offset: bytes.length });\n if (bytes.length !== exports3.WordSize) {\n bytes = (0, index_js_1.getBytesCopy)((0, index_js_1.concat)([Padding.slice(bytes.length % exports3.WordSize), bytes]));\n }\n return bytes;\n }\n var Coder = class {\n // The coder name:\n // - address, uint256, tuple, array, etc.\n name;\n // The fully expanded type, including composite types:\n // - address, uint256, tuple(address,bytes), uint256[3][4][], etc.\n type;\n // The localName bound in the signature, in this example it is \"baz\":\n // - tuple(address foo, uint bar) baz\n localName;\n // Whether this type is dynamic:\n // - Dynamic: bytes, string, address[], tuple(boolean[]), etc.\n // - Not Dynamic: address, uint256, boolean[3], tuple(address, uint8)\n dynamic;\n constructor(name, type, localName, dynamic) {\n (0, index_js_1.defineProperties)(this, { name, type, localName, dynamic }, {\n name: \"string\",\n type: \"string\",\n localName: \"string\",\n dynamic: \"boolean\"\n });\n }\n _throwError(message2, value) {\n (0, index_js_1.assertArgument)(false, message2, this.localName, value);\n }\n };\n exports3.Coder = Coder;\n var Writer = class {\n // An array of WordSize lengthed objects to concatenation\n #data;\n #dataLength;\n constructor() {\n this.#data = [];\n this.#dataLength = 0;\n }\n get data() {\n return (0, index_js_1.concat)(this.#data);\n }\n get length() {\n return this.#dataLength;\n }\n #writeData(data) {\n this.#data.push(data);\n this.#dataLength += data.length;\n return data.length;\n }\n appendWriter(writer) {\n return this.#writeData((0, index_js_1.getBytesCopy)(writer.data));\n }\n // Arrayish item; pad on the right to *nearest* WordSize\n writeBytes(value) {\n let bytes = (0, index_js_1.getBytesCopy)(value);\n const paddingOffset = bytes.length % exports3.WordSize;\n if (paddingOffset) {\n bytes = (0, index_js_1.getBytesCopy)((0, index_js_1.concat)([bytes, Padding.slice(paddingOffset)]));\n }\n return this.#writeData(bytes);\n }\n // Numeric item; pad on the left *to* WordSize\n writeValue(value) {\n return this.#writeData(getValue(value));\n }\n // Inserts a numeric place-holder, returning a callback that can\n // be used to asjust the value later\n writeUpdatableValue() {\n const offset = this.#data.length;\n this.#data.push(Padding);\n this.#dataLength += exports3.WordSize;\n return (value) => {\n this.#data[offset] = getValue(value);\n };\n }\n };\n exports3.Writer = Writer;\n var Reader = class _Reader {\n // Allows incomplete unpadded data to be read; otherwise an error\n // is raised if attempting to overrun the buffer. This is required\n // to deal with an old Solidity bug, in which event data for\n // external (not public thoguh) was tightly packed.\n allowLoose;\n #data;\n #offset;\n #bytesRead;\n #parent;\n #maxInflation;\n constructor(data, allowLoose, maxInflation) {\n (0, index_js_1.defineProperties)(this, { allowLoose: !!allowLoose });\n this.#data = (0, index_js_1.getBytesCopy)(data);\n this.#bytesRead = 0;\n this.#parent = null;\n this.#maxInflation = maxInflation != null ? maxInflation : 1024;\n this.#offset = 0;\n }\n get data() {\n return (0, index_js_1.hexlify)(this.#data);\n }\n get dataLength() {\n return this.#data.length;\n }\n get consumed() {\n return this.#offset;\n }\n get bytes() {\n return new Uint8Array(this.#data);\n }\n #incrementBytesRead(count) {\n if (this.#parent) {\n return this.#parent.#incrementBytesRead(count);\n }\n this.#bytesRead += count;\n (0, index_js_1.assert)(this.#maxInflation < 1 || this.#bytesRead <= this.#maxInflation * this.dataLength, `compressed ABI data exceeds inflation ratio of ${this.#maxInflation} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`, \"BUFFER_OVERRUN\", {\n buffer: (0, index_js_1.getBytesCopy)(this.#data),\n offset: this.#offset,\n length: count,\n info: {\n bytesRead: this.#bytesRead,\n dataLength: this.dataLength\n }\n });\n }\n #peekBytes(offset, length, loose) {\n let alignedLength = Math.ceil(length / exports3.WordSize) * exports3.WordSize;\n if (this.#offset + alignedLength > this.#data.length) {\n if (this.allowLoose && loose && this.#offset + length <= this.#data.length) {\n alignedLength = length;\n } else {\n (0, index_js_1.assert)(false, \"data out-of-bounds\", \"BUFFER_OVERRUN\", {\n buffer: (0, index_js_1.getBytesCopy)(this.#data),\n length: this.#data.length,\n offset: this.#offset + alignedLength\n });\n }\n }\n return this.#data.slice(this.#offset, this.#offset + alignedLength);\n }\n // Create a sub-reader with the same underlying data, but offset\n subReader(offset) {\n const reader = new _Reader(this.#data.slice(this.#offset + offset), this.allowLoose, this.#maxInflation);\n reader.#parent = this;\n return reader;\n }\n // Read bytes\n readBytes(length, loose) {\n let bytes = this.#peekBytes(0, length, !!loose);\n this.#incrementBytesRead(length);\n this.#offset += bytes.length;\n return bytes.slice(0, length);\n }\n // Read a numeric values\n readValue() {\n return (0, index_js_1.toBigInt)(this.readBytes(exports3.WordSize));\n }\n readIndex() {\n return (0, index_js_1.toNumber)(this.readBytes(exports3.WordSize));\n }\n };\n exports3.Reader = Reader;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_assert.js\n var require_assert = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_assert.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.output = exports3.exists = exports3.hash = exports3.bytes = exports3.bool = exports3.number = void 0;\n function number(n2) {\n if (!Number.isSafeInteger(n2) || n2 < 0)\n throw new Error(`Wrong positive integer: ${n2}`);\n }\n exports3.number = number;\n function bool(b4) {\n if (typeof b4 !== \"boolean\")\n throw new Error(`Expected boolean, not ${b4}`);\n }\n exports3.bool = bool;\n function bytes(b4, ...lengths) {\n if (!(b4 instanceof Uint8Array))\n throw new Error(\"Expected Uint8Array\");\n if (lengths.length > 0 && !lengths.includes(b4.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b4.length}`);\n }\n exports3.bytes = bytes;\n function hash3(hash4) {\n if (typeof hash4 !== \"function\" || typeof hash4.create !== \"function\")\n throw new Error(\"Hash should be wrapped by utils.wrapConstructor\");\n number(hash4.outputLen);\n number(hash4.blockLen);\n }\n exports3.hash = hash3;\n function exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error(\"Hash instance has been destroyed\");\n if (checkFinished && instance.finished)\n throw new Error(\"Hash#digest() has already been called\");\n }\n exports3.exists = exists;\n function output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n }\n exports3.output = output;\n var assert9 = { number, bool, bytes, hash: hash3, exists, output };\n exports3.default = assert9;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/crypto.js\n var require_crypto = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/crypto.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.crypto = void 0;\n exports3.crypto = typeof globalThis === \"object\" && \"crypto\" in globalThis ? globalThis.crypto : void 0;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/utils.js\n var require_utils14 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.randomBytes = exports3.wrapXOFConstructorWithOpts = exports3.wrapConstructorWithOpts = exports3.wrapConstructor = exports3.checkOpts = exports3.Hash = exports3.concatBytes = exports3.toBytes = exports3.utf8ToBytes = exports3.asyncLoop = exports3.nextTick = exports3.hexToBytes = exports3.bytesToHex = exports3.isLE = exports3.rotr = exports3.createView = exports3.u32 = exports3.u8 = void 0;\n var crypto_1 = require_crypto();\n var u8a = (a3) => a3 instanceof Uint8Array;\n var u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\n exports3.u8 = u8;\n var u322 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n exports3.u32 = u322;\n var createView2 = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n exports3.createView = createView2;\n var rotr2 = (word, shift) => word << 32 - shift | word >>> shift;\n exports3.rotr = rotr2;\n exports3.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;\n if (!exports3.isLE)\n throw new Error(\"Non little-endian hardware is not supported\");\n var hexes6 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n function bytesToHex5(bytes) {\n if (!u8a(bytes))\n throw new Error(\"Uint8Array expected\");\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes6[bytes[i3]];\n }\n return hex;\n }\n exports3.bytesToHex = bytesToHex5;\n function hexToBytes5(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error(\"padded hex string expected, got unpadded hex of length \" + len);\n const array = new Uint8Array(len / 2);\n for (let i3 = 0; i3 < array.length; i3++) {\n const j2 = i3 * 2;\n const hexByte = hex.slice(j2, j2 + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error(\"Invalid byte sequence\");\n array[i3] = byte;\n }\n return array;\n }\n exports3.hexToBytes = hexToBytes5;\n var nextTick2 = async () => {\n };\n exports3.nextTick = nextTick2;\n async function asyncLoop2(iters, tick, cb) {\n let ts = Date.now();\n for (let i3 = 0; i3 < iters; i3++) {\n cb(i3);\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await (0, exports3.nextTick)();\n ts += diff;\n }\n }\n exports3.asyncLoop = asyncLoop2;\n function utf8ToBytes3(str) {\n if (typeof str !== \"string\")\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str));\n }\n exports3.utf8ToBytes = utf8ToBytes3;\n function toBytes5(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes3(data);\n if (!u8a(data))\n throw new Error(`expected Uint8Array, got ${typeof data}`);\n return data;\n }\n exports3.toBytes = toBytes5;\n function concatBytes4(...arrays) {\n const r2 = new Uint8Array(arrays.reduce((sum, a3) => sum + a3.length, 0));\n let pad6 = 0;\n arrays.forEach((a3) => {\n if (!u8a(a3))\n throw new Error(\"Uint8Array expected\");\n r2.set(a3, pad6);\n pad6 += a3.length;\n });\n return r2;\n }\n exports3.concatBytes = concatBytes4;\n var Hash2 = class {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n };\n exports3.Hash = Hash2;\n var toStr = {}.toString;\n function checkOpts2(defaults, opts) {\n if (opts !== void 0 && toStr.call(opts) !== \"[object Object]\")\n throw new Error(\"Options should be object or undefined\");\n const merged = Object.assign(defaults, opts);\n return merged;\n }\n exports3.checkOpts = checkOpts2;\n function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes5(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n }\n exports3.wrapConstructor = wrapConstructor;\n function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes5(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n }\n exports3.wrapConstructorWithOpts = wrapConstructorWithOpts;\n function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes5(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n }\n exports3.wrapXOFConstructorWithOpts = wrapXOFConstructorWithOpts;\n function randomBytes2(bytesLength = 32) {\n if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === \"function\") {\n return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error(\"crypto.getRandomValues must be defined\");\n }\n exports3.randomBytes = randomBytes2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/hmac.js\n var require_hmac2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/hmac.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.hmac = exports3.HMAC = void 0;\n var _assert_js_1 = require_assert();\n var utils_js_1 = require_utils14();\n var HMAC2 = class extends utils_js_1.Hash {\n constructor(hash3, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n (0, _assert_js_1.hash)(hash3);\n const key = (0, utils_js_1.toBytes)(_key);\n this.iHash = hash3.create();\n if (typeof this.iHash.update !== \"function\")\n throw new Error(\"Expected instance of class which extends utils.Hash\");\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad6 = new Uint8Array(blockLen);\n pad6.set(key.length > blockLen ? hash3.create().update(key).digest() : key);\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54;\n this.iHash.update(pad6);\n this.oHash = hash3.create();\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54 ^ 92;\n this.oHash.update(pad6);\n pad6.fill(0);\n }\n update(buf) {\n (0, _assert_js_1.exists)(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n (0, _assert_js_1.exists)(this);\n (0, _assert_js_1.bytes)(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n };\n exports3.HMAC = HMAC2;\n var hmac2 = (hash3, key, message2) => new HMAC2(hash3, key).update(message2).digest();\n exports3.hmac = hmac2;\n exports3.hmac.create = (hash3, key) => new HMAC2(hash3, key);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/pbkdf2.js\n var require_pbkdf2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/pbkdf2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pbkdf2Async = exports3.pbkdf2 = void 0;\n var _assert_js_1 = require_assert();\n var hmac_js_1 = require_hmac2();\n var utils_js_1 = require_utils14();\n function pbkdf2Init2(hash3, _password, _salt, _opts) {\n (0, _assert_js_1.hash)(hash3);\n const opts = (0, utils_js_1.checkOpts)({ dkLen: 32, asyncTick: 10 }, _opts);\n const { c: c4, dkLen, asyncTick } = opts;\n (0, _assert_js_1.number)(c4);\n (0, _assert_js_1.number)(dkLen);\n (0, _assert_js_1.number)(asyncTick);\n if (c4 < 1)\n throw new Error(\"PBKDF2: iterations (c) should be >= 1\");\n const password = (0, utils_js_1.toBytes)(_password);\n const salt = (0, utils_js_1.toBytes)(_salt);\n const DK = new Uint8Array(dkLen);\n const PRF = hmac_js_1.hmac.create(hash3, password);\n const PRFSalt = PRF._cloneInto().update(salt);\n return { c: c4, dkLen, asyncTick, DK, PRF, PRFSalt };\n }\n function pbkdf2Output2(PRF, PRFSalt, DK, prfW, u2) {\n PRF.destroy();\n PRFSalt.destroy();\n if (prfW)\n prfW.destroy();\n u2.fill(0);\n return DK;\n }\n function pbkdf22(hash3, password, salt, opts) {\n const { c: c4, dkLen, DK, PRF, PRFSalt } = pbkdf2Init2(hash3, password, salt, opts);\n let prfW;\n const arr = new Uint8Array(4);\n const view = (0, utils_js_1.createView)(arr);\n const u2 = new Uint8Array(PRF.outputLen);\n for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n const Ti = DK.subarray(pos, pos + PRF.outputLen);\n view.setInt32(0, ti, false);\n (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u2);\n Ti.set(u2.subarray(0, Ti.length));\n for (let ui = 1; ui < c4; ui++) {\n PRF._cloneInto(prfW).update(u2).digestInto(u2);\n for (let i3 = 0; i3 < Ti.length; i3++)\n Ti[i3] ^= u2[i3];\n }\n }\n return pbkdf2Output2(PRF, PRFSalt, DK, prfW, u2);\n }\n exports3.pbkdf2 = pbkdf22;\n async function pbkdf2Async2(hash3, password, salt, opts) {\n const { c: c4, dkLen, asyncTick, DK, PRF, PRFSalt } = pbkdf2Init2(hash3, password, salt, opts);\n let prfW;\n const arr = new Uint8Array(4);\n const view = (0, utils_js_1.createView)(arr);\n const u2 = new Uint8Array(PRF.outputLen);\n for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n const Ti = DK.subarray(pos, pos + PRF.outputLen);\n view.setInt32(0, ti, false);\n (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u2);\n Ti.set(u2.subarray(0, Ti.length));\n await (0, utils_js_1.asyncLoop)(c4 - 1, asyncTick, () => {\n PRF._cloneInto(prfW).update(u2).digestInto(u2);\n for (let i3 = 0; i3 < Ti.length; i3++)\n Ti[i3] ^= u2[i3];\n });\n }\n return pbkdf2Output2(PRF, PRFSalt, DK, prfW, u2);\n }\n exports3.pbkdf2Async = pbkdf2Async2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_sha2.js\n var require_sha2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_sha2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SHA2 = void 0;\n var _assert_js_1 = require_assert();\n var utils_js_1 = require_utils14();\n function setBigUint642(view, byteOffset, value, isLE2) {\n if (typeof view.setBigUint64 === \"function\")\n return view.setBigUint64(byteOffset, value, isLE2);\n const _32n2 = BigInt(32);\n const _u32_max = BigInt(4294967295);\n const wh = Number(value >> _32n2 & _u32_max);\n const wl = Number(value & _u32_max);\n const h4 = isLE2 ? 4 : 0;\n const l6 = isLE2 ? 0 : 4;\n view.setUint32(byteOffset + h4, wh, isLE2);\n view.setUint32(byteOffset + l6, wl, isLE2);\n }\n var SHA2 = class extends utils_js_1.Hash {\n constructor(blockLen, outputLen, padOffset, isLE2) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE2;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = (0, utils_js_1.createView)(this.buffer);\n }\n update(data) {\n (0, _assert_js_1.exists)(this);\n const { view, buffer: buffer2, blockLen } = this;\n data = (0, utils_js_1.toBytes)(data);\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n if (take === blockLen) {\n const dataView = (0, utils_js_1.createView)(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer2.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n (0, _assert_js_1.exists)(this);\n (0, _assert_js_1.output)(out, this);\n this.finished = true;\n const { buffer: buffer2, view, blockLen, isLE: isLE2 } = this;\n let { pos } = this;\n buffer2[pos++] = 128;\n this.buffer.subarray(pos).fill(0);\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n for (let i3 = pos; i3 < blockLen; i3++)\n buffer2[i3] = 0;\n setBigUint642(view, blockLen - 8, BigInt(this.length * 8), isLE2);\n this.process(view, 0);\n const oview = (0, utils_js_1.createView)(out);\n const len = this.outputLen;\n if (len % 4)\n throw new Error(\"_sha2: outputLen should be aligned to 32bit\");\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error(\"_sha2: outputLen bigger than state\");\n for (let i3 = 0; i3 < outLen; i3++)\n oview.setUint32(4 * i3, state[i3], isLE2);\n }\n digest() {\n const { buffer: buffer2, outputLen } = this;\n this.digestInto(buffer2);\n const res = buffer2.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer: buffer2, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer2);\n return to;\n }\n };\n exports3.SHA2 = SHA2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha256.js\n var require_sha256 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha256.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha224 = exports3.sha256 = void 0;\n var _sha2_js_1 = require_sha2();\n var utils_js_1 = require_utils14();\n var Chi2 = (a3, b4, c4) => a3 & b4 ^ ~a3 & c4;\n var Maj2 = (a3, b4, c4) => a3 & b4 ^ a3 & c4 ^ b4 & c4;\n var SHA256_K2 = /* @__PURE__ */ new Uint32Array([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n var IV = /* @__PURE__ */ new Uint32Array([\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ]);\n var SHA256_W2 = /* @__PURE__ */ new Uint32Array(64);\n var SHA2562 = class extends _sha2_js_1.SHA2 {\n constructor() {\n super(64, 32, 8, false);\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n return [A4, B2, C, D2, E2, F2, G, H3];\n }\n // prettier-ignore\n set(A4, B2, C, D2, E2, F2, G, H3) {\n this.A = A4 | 0;\n this.B = B2 | 0;\n this.C = C | 0;\n this.D = D2 | 0;\n this.E = E2 | 0;\n this.F = F2 | 0;\n this.G = G | 0;\n this.H = H3 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n SHA256_W2[i3] = view.getUint32(offset, false);\n for (let i3 = 16; i3 < 64; i3++) {\n const W15 = SHA256_W2[i3 - 15];\n const W2 = SHA256_W2[i3 - 2];\n const s0 = (0, utils_js_1.rotr)(W15, 7) ^ (0, utils_js_1.rotr)(W15, 18) ^ W15 >>> 3;\n const s1 = (0, utils_js_1.rotr)(W2, 17) ^ (0, utils_js_1.rotr)(W2, 19) ^ W2 >>> 10;\n SHA256_W2[i3] = s1 + SHA256_W2[i3 - 7] + s0 + SHA256_W2[i3 - 16] | 0;\n }\n let { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n for (let i3 = 0; i3 < 64; i3++) {\n const sigma1 = (0, utils_js_1.rotr)(E2, 6) ^ (0, utils_js_1.rotr)(E2, 11) ^ (0, utils_js_1.rotr)(E2, 25);\n const T1 = H3 + sigma1 + Chi2(E2, F2, G) + SHA256_K2[i3] + SHA256_W2[i3] | 0;\n const sigma0 = (0, utils_js_1.rotr)(A4, 2) ^ (0, utils_js_1.rotr)(A4, 13) ^ (0, utils_js_1.rotr)(A4, 22);\n const T22 = sigma0 + Maj2(A4, B2, C) | 0;\n H3 = G;\n G = F2;\n F2 = E2;\n E2 = D2 + T1 | 0;\n D2 = C;\n C = B2;\n B2 = A4;\n A4 = T1 + T22 | 0;\n }\n A4 = A4 + this.A | 0;\n B2 = B2 + this.B | 0;\n C = C + this.C | 0;\n D2 = D2 + this.D | 0;\n E2 = E2 + this.E | 0;\n F2 = F2 + this.F | 0;\n G = G + this.G | 0;\n H3 = H3 + this.H | 0;\n this.set(A4, B2, C, D2, E2, F2, G, H3);\n }\n roundClean() {\n SHA256_W2.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n };\n var SHA2242 = class extends SHA2562 {\n constructor() {\n super();\n this.A = 3238371032 | 0;\n this.B = 914150663 | 0;\n this.C = 812702999 | 0;\n this.D = 4144912697 | 0;\n this.E = 4290775857 | 0;\n this.F = 1750603025 | 0;\n this.G = 1694076839 | 0;\n this.H = 3204075428 | 0;\n this.outputLen = 28;\n }\n };\n exports3.sha256 = (0, utils_js_1.wrapConstructor)(() => new SHA2562());\n exports3.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA2242());\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_u64.js\n var require_u64 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/_u64.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.add5L = exports3.add5H = exports3.add4H = exports3.add4L = exports3.add3H = exports3.add3L = exports3.add = exports3.rotlBL = exports3.rotlBH = exports3.rotlSL = exports3.rotlSH = exports3.rotr32L = exports3.rotr32H = exports3.rotrBL = exports3.rotrBH = exports3.rotrSL = exports3.rotrSH = exports3.shrSL = exports3.shrSH = exports3.toBig = exports3.split = exports3.fromBig = void 0;\n var U32_MASK642 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\n var _32n2 = /* @__PURE__ */ BigInt(32);\n function fromBig2(n2, le = false) {\n if (le)\n return { h: Number(n2 & U32_MASK642), l: Number(n2 >> _32n2 & U32_MASK642) };\n return { h: Number(n2 >> _32n2 & U32_MASK642) | 0, l: Number(n2 & U32_MASK642) | 0 };\n }\n exports3.fromBig = fromBig2;\n function split3(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i3 = 0; i3 < lst.length; i3++) {\n const { h: h4, l: l6 } = fromBig2(lst[i3], le);\n [Ah[i3], Al[i3]] = [h4, l6];\n }\n return [Ah, Al];\n }\n exports3.split = split3;\n var toBig = (h4, l6) => BigInt(h4 >>> 0) << _32n2 | BigInt(l6 >>> 0);\n exports3.toBig = toBig;\n var shrSH2 = (h4, _l, s4) => h4 >>> s4;\n exports3.shrSH = shrSH2;\n var shrSL2 = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n exports3.shrSL = shrSL2;\n var rotrSH2 = (h4, l6, s4) => h4 >>> s4 | l6 << 32 - s4;\n exports3.rotrSH = rotrSH2;\n var rotrSL2 = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n exports3.rotrSL = rotrSL2;\n var rotrBH2 = (h4, l6, s4) => h4 << 64 - s4 | l6 >>> s4 - 32;\n exports3.rotrBH = rotrBH2;\n var rotrBL2 = (h4, l6, s4) => h4 >>> s4 - 32 | l6 << 64 - s4;\n exports3.rotrBL = rotrBL2;\n var rotr32H = (_h, l6) => l6;\n exports3.rotr32H = rotr32H;\n var rotr32L = (h4, _l) => h4;\n exports3.rotr32L = rotr32L;\n var rotlSH2 = (h4, l6, s4) => h4 << s4 | l6 >>> 32 - s4;\n exports3.rotlSH = rotlSH2;\n var rotlSL2 = (h4, l6, s4) => l6 << s4 | h4 >>> 32 - s4;\n exports3.rotlSL = rotlSL2;\n var rotlBH2 = (h4, l6, s4) => l6 << s4 - 32 | h4 >>> 64 - s4;\n exports3.rotlBH = rotlBH2;\n var rotlBL2 = (h4, l6, s4) => h4 << s4 - 32 | l6 >>> 64 - s4;\n exports3.rotlBL = rotlBL2;\n function add2(Ah, Al, Bh, Bl) {\n const l6 = (Al >>> 0) + (Bl >>> 0);\n return { h: Ah + Bh + (l6 / 2 ** 32 | 0) | 0, l: l6 | 0 };\n }\n exports3.add = add2;\n var add3L2 = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\n exports3.add3L = add3L2;\n var add3H2 = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;\n exports3.add3H = add3H2;\n var add4L2 = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\n exports3.add4L = add4L2;\n var add4H2 = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;\n exports3.add4H = add4H2;\n var add5L2 = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\n exports3.add5L = add5L2;\n var add5H2 = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;\n exports3.add5H = add5H2;\n var u64 = {\n fromBig: fromBig2,\n split: split3,\n toBig,\n shrSH: shrSH2,\n shrSL: shrSL2,\n rotrSH: rotrSH2,\n rotrSL: rotrSL2,\n rotrBH: rotrBH2,\n rotrBL: rotrBL2,\n rotr32H,\n rotr32L,\n rotlSH: rotlSH2,\n rotlSL: rotlSL2,\n rotlBH: rotlBH2,\n rotlBL: rotlBL2,\n add: add2,\n add3L: add3L2,\n add3H: add3H2,\n add4L: add4L2,\n add4H: add4H2,\n add5H: add5H2,\n add5L: add5L2\n };\n exports3.default = u64;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha512.js\n var require_sha512 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha512.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha384 = exports3.sha512_256 = exports3.sha512_224 = exports3.sha512 = exports3.SHA512 = void 0;\n var _sha2_js_1 = require_sha2();\n var _u64_js_1 = require_u64();\n var utils_js_1 = require_utils14();\n var [SHA512_Kh2, SHA512_Kl2] = /* @__PURE__ */ (() => _u64_js_1.default.split([\n \"0x428a2f98d728ae22\",\n \"0x7137449123ef65cd\",\n \"0xb5c0fbcfec4d3b2f\",\n \"0xe9b5dba58189dbbc\",\n \"0x3956c25bf348b538\",\n \"0x59f111f1b605d019\",\n \"0x923f82a4af194f9b\",\n \"0xab1c5ed5da6d8118\",\n \"0xd807aa98a3030242\",\n \"0x12835b0145706fbe\",\n \"0x243185be4ee4b28c\",\n \"0x550c7dc3d5ffb4e2\",\n \"0x72be5d74f27b896f\",\n \"0x80deb1fe3b1696b1\",\n \"0x9bdc06a725c71235\",\n \"0xc19bf174cf692694\",\n \"0xe49b69c19ef14ad2\",\n \"0xefbe4786384f25e3\",\n \"0x0fc19dc68b8cd5b5\",\n \"0x240ca1cc77ac9c65\",\n \"0x2de92c6f592b0275\",\n \"0x4a7484aa6ea6e483\",\n \"0x5cb0a9dcbd41fbd4\",\n \"0x76f988da831153b5\",\n \"0x983e5152ee66dfab\",\n \"0xa831c66d2db43210\",\n \"0xb00327c898fb213f\",\n \"0xbf597fc7beef0ee4\",\n \"0xc6e00bf33da88fc2\",\n \"0xd5a79147930aa725\",\n \"0x06ca6351e003826f\",\n \"0x142929670a0e6e70\",\n \"0x27b70a8546d22ffc\",\n \"0x2e1b21385c26c926\",\n \"0x4d2c6dfc5ac42aed\",\n \"0x53380d139d95b3df\",\n \"0x650a73548baf63de\",\n \"0x766a0abb3c77b2a8\",\n \"0x81c2c92e47edaee6\",\n \"0x92722c851482353b\",\n \"0xa2bfe8a14cf10364\",\n \"0xa81a664bbc423001\",\n \"0xc24b8b70d0f89791\",\n \"0xc76c51a30654be30\",\n \"0xd192e819d6ef5218\",\n \"0xd69906245565a910\",\n \"0xf40e35855771202a\",\n \"0x106aa07032bbd1b8\",\n \"0x19a4c116b8d2d0c8\",\n \"0x1e376c085141ab53\",\n \"0x2748774cdf8eeb99\",\n \"0x34b0bcb5e19b48a8\",\n \"0x391c0cb3c5c95a63\",\n \"0x4ed8aa4ae3418acb\",\n \"0x5b9cca4f7763e373\",\n \"0x682e6ff3d6b2b8a3\",\n \"0x748f82ee5defb2fc\",\n \"0x78a5636f43172f60\",\n \"0x84c87814a1f0ab72\",\n \"0x8cc702081a6439ec\",\n \"0x90befffa23631e28\",\n \"0xa4506cebde82bde9\",\n \"0xbef9a3f7b2c67915\",\n \"0xc67178f2e372532b\",\n \"0xca273eceea26619c\",\n \"0xd186b8c721c0c207\",\n \"0xeada7dd6cde0eb1e\",\n \"0xf57d4f7fee6ed178\",\n \"0x06f067aa72176fba\",\n \"0x0a637dc5a2c898a6\",\n \"0x113f9804bef90dae\",\n \"0x1b710b35131c471b\",\n \"0x28db77f523047d84\",\n \"0x32caab7b40c72493\",\n \"0x3c9ebe0a15c9bebc\",\n \"0x431d67c49c100d4c\",\n \"0x4cc5d4becb3e42b6\",\n \"0x597f299cfc657e2a\",\n \"0x5fcb6fab3ad6faec\",\n \"0x6c44198c4a475817\"\n ].map((n2) => BigInt(n2))))();\n var SHA512_W_H2 = /* @__PURE__ */ new Uint32Array(80);\n var SHA512_W_L2 = /* @__PURE__ */ new Uint32Array(80);\n var SHA5122 = class extends _sha2_js_1.SHA2 {\n constructor() {\n super(128, 64, 16, false);\n this.Ah = 1779033703 | 0;\n this.Al = 4089235720 | 0;\n this.Bh = 3144134277 | 0;\n this.Bl = 2227873595 | 0;\n this.Ch = 1013904242 | 0;\n this.Cl = 4271175723 | 0;\n this.Dh = 2773480762 | 0;\n this.Dl = 1595750129 | 0;\n this.Eh = 1359893119 | 0;\n this.El = 2917565137 | 0;\n this.Fh = 2600822924 | 0;\n this.Fl = 725511199 | 0;\n this.Gh = 528734635 | 0;\n this.Gl = 4215389547 | 0;\n this.Hh = 1541459225 | 0;\n this.Hl = 327033209 | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4) {\n SHA512_W_H2[i3] = view.getUint32(offset);\n SHA512_W_L2[i3] = view.getUint32(offset += 4);\n }\n for (let i3 = 16; i3 < 80; i3++) {\n const W15h = SHA512_W_H2[i3 - 15] | 0;\n const W15l = SHA512_W_L2[i3 - 15] | 0;\n const s0h = _u64_js_1.default.rotrSH(W15h, W15l, 1) ^ _u64_js_1.default.rotrSH(W15h, W15l, 8) ^ _u64_js_1.default.shrSH(W15h, W15l, 7);\n const s0l = _u64_js_1.default.rotrSL(W15h, W15l, 1) ^ _u64_js_1.default.rotrSL(W15h, W15l, 8) ^ _u64_js_1.default.shrSL(W15h, W15l, 7);\n const W2h = SHA512_W_H2[i3 - 2] | 0;\n const W2l = SHA512_W_L2[i3 - 2] | 0;\n const s1h = _u64_js_1.default.rotrSH(W2h, W2l, 19) ^ _u64_js_1.default.rotrBH(W2h, W2l, 61) ^ _u64_js_1.default.shrSH(W2h, W2l, 6);\n const s1l = _u64_js_1.default.rotrSL(W2h, W2l, 19) ^ _u64_js_1.default.rotrBL(W2h, W2l, 61) ^ _u64_js_1.default.shrSL(W2h, W2l, 6);\n const SUMl = _u64_js_1.default.add4L(s0l, s1l, SHA512_W_L2[i3 - 7], SHA512_W_L2[i3 - 16]);\n const SUMh = _u64_js_1.default.add4H(SUMl, s0h, s1h, SHA512_W_H2[i3 - 7], SHA512_W_H2[i3 - 16]);\n SHA512_W_H2[i3] = SUMh | 0;\n SHA512_W_L2[i3] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n for (let i3 = 0; i3 < 80; i3++) {\n const sigma1h = _u64_js_1.default.rotrSH(Eh, El, 14) ^ _u64_js_1.default.rotrSH(Eh, El, 18) ^ _u64_js_1.default.rotrBH(Eh, El, 41);\n const sigma1l = _u64_js_1.default.rotrSL(Eh, El, 14) ^ _u64_js_1.default.rotrSL(Eh, El, 18) ^ _u64_js_1.default.rotrBL(Eh, El, 41);\n const CHIh = Eh & Fh ^ ~Eh & Gh;\n const CHIl = El & Fl ^ ~El & Gl;\n const T1ll = _u64_js_1.default.add5L(Hl, sigma1l, CHIl, SHA512_Kl2[i3], SHA512_W_L2[i3]);\n const T1h = _u64_js_1.default.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh2[i3], SHA512_W_H2[i3]);\n const T1l = T1ll | 0;\n const sigma0h = _u64_js_1.default.rotrSH(Ah, Al, 28) ^ _u64_js_1.default.rotrBH(Ah, Al, 34) ^ _u64_js_1.default.rotrBH(Ah, Al, 39);\n const sigma0l = _u64_js_1.default.rotrSL(Ah, Al, 28) ^ _u64_js_1.default.rotrBL(Ah, Al, 34) ^ _u64_js_1.default.rotrBL(Ah, Al, 39);\n const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;\n const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = _u64_js_1.default.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = _u64_js_1.default.add3L(T1l, sigma0l, MAJl);\n Ah = _u64_js_1.default.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n ({ h: Ah, l: Al } = _u64_js_1.default.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = _u64_js_1.default.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = _u64_js_1.default.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = _u64_js_1.default.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = _u64_js_1.default.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = _u64_js_1.default.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = _u64_js_1.default.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = _u64_js_1.default.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n SHA512_W_H2.fill(0);\n SHA512_W_L2.fill(0);\n }\n destroy() {\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n };\n exports3.SHA512 = SHA5122;\n var SHA512_224 = class extends SHA5122 {\n constructor() {\n super();\n this.Ah = 2352822216 | 0;\n this.Al = 424955298 | 0;\n this.Bh = 1944164710 | 0;\n this.Bl = 2312950998 | 0;\n this.Ch = 502970286 | 0;\n this.Cl = 855612546 | 0;\n this.Dh = 1738396948 | 0;\n this.Dl = 1479516111 | 0;\n this.Eh = 258812777 | 0;\n this.El = 2077511080 | 0;\n this.Fh = 2011393907 | 0;\n this.Fl = 79989058 | 0;\n this.Gh = 1067287976 | 0;\n this.Gl = 1780299464 | 0;\n this.Hh = 286451373 | 0;\n this.Hl = 2446758561 | 0;\n this.outputLen = 28;\n }\n };\n var SHA512_256 = class extends SHA5122 {\n constructor() {\n super();\n this.Ah = 573645204 | 0;\n this.Al = 4230739756 | 0;\n this.Bh = 2673172387 | 0;\n this.Bl = 3360449730 | 0;\n this.Ch = 596883563 | 0;\n this.Cl = 1867755857 | 0;\n this.Dh = 2520282905 | 0;\n this.Dl = 1497426621 | 0;\n this.Eh = 2519219938 | 0;\n this.El = 2827943907 | 0;\n this.Fh = 3193839141 | 0;\n this.Fl = 1401305490 | 0;\n this.Gh = 721525244 | 0;\n this.Gl = 746961066 | 0;\n this.Hh = 246885852 | 0;\n this.Hl = 2177182882 | 0;\n this.outputLen = 32;\n }\n };\n var SHA3842 = class extends SHA5122 {\n constructor() {\n super();\n this.Ah = 3418070365 | 0;\n this.Al = 3238371032 | 0;\n this.Bh = 1654270250 | 0;\n this.Bl = 914150663 | 0;\n this.Ch = 2438529370 | 0;\n this.Cl = 812702999 | 0;\n this.Dh = 355462360 | 0;\n this.Dl = 4144912697 | 0;\n this.Eh = 1731405415 | 0;\n this.El = 4290775857 | 0;\n this.Fh = 2394180231 | 0;\n this.Fl = 1750603025 | 0;\n this.Gh = 3675008525 | 0;\n this.Gl = 1694076839 | 0;\n this.Hh = 1203062813 | 0;\n this.Hl = 3204075428 | 0;\n this.outputLen = 48;\n }\n };\n exports3.sha512 = (0, utils_js_1.wrapConstructor)(() => new SHA5122());\n exports3.sha512_224 = (0, utils_js_1.wrapConstructor)(() => new SHA512_224());\n exports3.sha512_256 = (0, utils_js_1.wrapConstructor)(() => new SHA512_256());\n exports3.sha384 = (0, utils_js_1.wrapConstructor)(() => new SHA3842());\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/crypto-browser.js\n var require_crypto_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/crypto-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.randomBytes = exports3.pbkdf2Sync = exports3.createHmac = exports3.createHash = void 0;\n var hmac_1 = require_hmac2();\n var pbkdf2_1 = require_pbkdf2();\n var sha256_1 = require_sha256();\n var sha512_1 = require_sha512();\n var index_js_1 = require_utils13();\n function getGlobal() {\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw new Error(\"unable to locate global object\");\n }\n var anyGlobal = getGlobal();\n var crypto3 = anyGlobal.crypto || anyGlobal.msCrypto;\n function createHash(algo) {\n switch (algo) {\n case \"sha256\":\n return sha256_1.sha256.create();\n case \"sha512\":\n return sha512_1.sha512.create();\n }\n (0, index_js_1.assertArgument)(false, \"invalid hashing algorithm name\", \"algorithm\", algo);\n }\n exports3.createHash = createHash;\n function createHmac(_algo, key) {\n const algo = { sha256: sha256_1.sha256, sha512: sha512_1.sha512 }[_algo];\n (0, index_js_1.assertArgument)(algo != null, \"invalid hmac algorithm\", \"algorithm\", _algo);\n return hmac_1.hmac.create(algo, key);\n }\n exports3.createHmac = createHmac;\n function pbkdf2Sync(password, salt, iterations, keylen, _algo) {\n const algo = { sha256: sha256_1.sha256, sha512: sha512_1.sha512 }[_algo];\n (0, index_js_1.assertArgument)(algo != null, \"invalid pbkdf2 algorithm\", \"algorithm\", _algo);\n return (0, pbkdf2_1.pbkdf2)(algo, password, salt, { c: iterations, dkLen: keylen });\n }\n exports3.pbkdf2Sync = pbkdf2Sync;\n function randomBytes2(length) {\n (0, index_js_1.assert)(crypto3 != null, \"platform does not support secure random numbers\", \"UNSUPPORTED_OPERATION\", {\n operation: \"randomBytes\"\n });\n (0, index_js_1.assertArgument)(Number.isInteger(length) && length > 0 && length <= 1024, \"invalid length\", \"length\", length);\n const result = new Uint8Array(length);\n crypto3.getRandomValues(result);\n return result;\n }\n exports3.randomBytes = randomBytes2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/hmac.js\n var require_hmac3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/hmac.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.computeHmac = void 0;\n var crypto_js_1 = require_crypto_browser();\n var index_js_1 = require_utils13();\n var locked = false;\n var _computeHmac = function(algorithm, key, data) {\n return (0, crypto_js_1.createHmac)(algorithm, key).update(data).digest();\n };\n var __computeHmac = _computeHmac;\n function computeHmac(algorithm, _key, _data) {\n const key = (0, index_js_1.getBytes)(_key, \"key\");\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__computeHmac(algorithm, key, data));\n }\n exports3.computeHmac = computeHmac;\n computeHmac._ = _computeHmac;\n computeHmac.lock = function() {\n locked = true;\n };\n computeHmac.register = function(func) {\n if (locked) {\n throw new Error(\"computeHmac is locked\");\n }\n __computeHmac = func;\n };\n Object.freeze(computeHmac);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha3.js\n var require_sha32 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/sha3.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.shake256 = exports3.shake128 = exports3.keccak_512 = exports3.keccak_384 = exports3.keccak_256 = exports3.keccak_224 = exports3.sha3_512 = exports3.sha3_384 = exports3.sha3_256 = exports3.sha3_224 = exports3.Keccak = exports3.keccakP = void 0;\n var _assert_js_1 = require_assert();\n var _u64_js_1 = require_u64();\n var utils_js_1 = require_utils14();\n var [SHA3_PI2, SHA3_ROTL2, _SHA3_IOTA2] = [[], [], []];\n var _0n11 = /* @__PURE__ */ BigInt(0);\n var _1n11 = /* @__PURE__ */ BigInt(1);\n var _2n8 = /* @__PURE__ */ BigInt(2);\n var _7n3 = /* @__PURE__ */ BigInt(7);\n var _256n2 = /* @__PURE__ */ BigInt(256);\n var _0x71n2 = /* @__PURE__ */ BigInt(113);\n for (let round = 0, R3 = _1n11, x4 = 1, y6 = 0; round < 24; round++) {\n [x4, y6] = [y6, (2 * x4 + 3 * y6) % 5];\n SHA3_PI2.push(2 * (5 * y6 + x4));\n SHA3_ROTL2.push((round + 1) * (round + 2) / 2 % 64);\n let t3 = _0n11;\n for (let j2 = 0; j2 < 7; j2++) {\n R3 = (R3 << _1n11 ^ (R3 >> _7n3) * _0x71n2) % _256n2;\n if (R3 & _2n8)\n t3 ^= _1n11 << (_1n11 << /* @__PURE__ */ BigInt(j2)) - _1n11;\n }\n _SHA3_IOTA2.push(t3);\n }\n var [SHA3_IOTA_H2, SHA3_IOTA_L2] = /* @__PURE__ */ (0, _u64_js_1.split)(_SHA3_IOTA2, true);\n var rotlH2 = (h4, l6, s4) => s4 > 32 ? (0, _u64_js_1.rotlBH)(h4, l6, s4) : (0, _u64_js_1.rotlSH)(h4, l6, s4);\n var rotlL2 = (h4, l6, s4) => s4 > 32 ? (0, _u64_js_1.rotlBL)(h4, l6, s4) : (0, _u64_js_1.rotlSL)(h4, l6, s4);\n function keccakP2(s4, rounds = 24) {\n const B2 = new Uint32Array(5 * 2);\n for (let round = 24 - rounds; round < 24; round++) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[x4] ^ s4[x4 + 10] ^ s4[x4 + 20] ^ s4[x4 + 30] ^ s4[x4 + 40];\n for (let x4 = 0; x4 < 10; x4 += 2) {\n const idx1 = (x4 + 8) % 10;\n const idx0 = (x4 + 2) % 10;\n const B0 = B2[idx0];\n const B1 = B2[idx0 + 1];\n const Th = rotlH2(B0, B1, 1) ^ B2[idx1];\n const Tl = rotlL2(B0, B1, 1) ^ B2[idx1 + 1];\n for (let y6 = 0; y6 < 50; y6 += 10) {\n s4[x4 + y6] ^= Th;\n s4[x4 + y6 + 1] ^= Tl;\n }\n }\n let curH = s4[2];\n let curL = s4[3];\n for (let t3 = 0; t3 < 24; t3++) {\n const shift = SHA3_ROTL2[t3];\n const Th = rotlH2(curH, curL, shift);\n const Tl = rotlL2(curH, curL, shift);\n const PI = SHA3_PI2[t3];\n curH = s4[PI];\n curL = s4[PI + 1];\n s4[PI] = Th;\n s4[PI + 1] = Tl;\n }\n for (let y6 = 0; y6 < 50; y6 += 10) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[y6 + x4];\n for (let x4 = 0; x4 < 10; x4++)\n s4[y6 + x4] ^= ~B2[(x4 + 2) % 10] & B2[(x4 + 4) % 10];\n }\n s4[0] ^= SHA3_IOTA_H2[round];\n s4[1] ^= SHA3_IOTA_L2[round];\n }\n B2.fill(0);\n }\n exports3.keccakP = keccakP2;\n var Keccak2 = class _Keccak extends utils_js_1.Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n (0, _assert_js_1.number)(outputLen);\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error(\"Sha3 supports only keccak-f1600 function\");\n this.state = new Uint8Array(200);\n this.state32 = (0, utils_js_1.u32)(this.state);\n }\n keccak() {\n keccakP2(this.state32, this.rounds);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n (0, _assert_js_1.exists)(this);\n const { blockLen, state } = this;\n data = (0, utils_js_1.toBytes)(data);\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i3 = 0; i3 < take; i3++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n state[pos] ^= suffix;\n if ((suffix & 128) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 128;\n this.keccak();\n }\n writeInto(out) {\n (0, _assert_js_1.exists)(this, false);\n (0, _assert_js_1.bytes)(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len; ) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n if (!this.enableXOF)\n throw new Error(\"XOF is not possible for this instance\");\n return this.writeInto(out);\n }\n xof(bytes) {\n (0, _assert_js_1.number)(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n (0, _assert_js_1.output)(out, this);\n if (this.finished)\n throw new Error(\"digest() was already called\");\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n };\n exports3.Keccak = Keccak2;\n var gen2 = (suffix, blockLen, outputLen) => (0, utils_js_1.wrapConstructor)(() => new Keccak2(blockLen, suffix, outputLen));\n exports3.sha3_224 = gen2(6, 144, 224 / 8);\n exports3.sha3_256 = gen2(6, 136, 256 / 8);\n exports3.sha3_384 = gen2(6, 104, 384 / 8);\n exports3.sha3_512 = gen2(6, 72, 512 / 8);\n exports3.keccak_224 = gen2(1, 144, 224 / 8);\n exports3.keccak_256 = gen2(1, 136, 256 / 8);\n exports3.keccak_384 = gen2(1, 104, 384 / 8);\n exports3.keccak_512 = gen2(1, 72, 512 / 8);\n var genShake = (suffix, blockLen, outputLen) => (0, utils_js_1.wrapXOFConstructorWithOpts)((opts = {}) => new Keccak2(blockLen, suffix, opts.dkLen === void 0 ? outputLen : opts.dkLen, true));\n exports3.shake128 = genShake(31, 168, 128 / 8);\n exports3.shake256 = genShake(31, 136, 256 / 8);\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/keccak.js\n var require_keccak = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/keccak.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.keccak256 = void 0;\n var sha3_1 = require_sha32();\n var index_js_1 = require_utils13();\n var locked = false;\n var _keccak256 = function(data) {\n return (0, sha3_1.keccak_256)(data);\n };\n var __keccak256 = _keccak256;\n function keccak2563(_data) {\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__keccak256(data));\n }\n exports3.keccak256 = keccak2563;\n keccak2563._ = _keccak256;\n keccak2563.lock = function() {\n locked = true;\n };\n keccak2563.register = function(func) {\n if (locked) {\n throw new TypeError(\"keccak256 is locked\");\n }\n __keccak256 = func;\n };\n Object.freeze(keccak2563);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/ripemd160.js\n var require_ripemd160 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/ripemd160.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ripemd160 = exports3.RIPEMD160 = void 0;\n var _sha2_js_1 = require_sha2();\n var utils_js_1 = require_utils14();\n var Rho = /* @__PURE__ */ new Uint8Array([7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8]);\n var Id = /* @__PURE__ */ Uint8Array.from({ length: 16 }, (_2, i3) => i3);\n var Pi = /* @__PURE__ */ Id.map((i3) => (9 * i3 + 5) % 16);\n var idxL2 = [Id];\n var idxR2 = [Pi];\n for (let i3 = 0; i3 < 4; i3++)\n for (let j2 of [idxL2, idxR2])\n j2.push(j2[i3].map((k4) => Rho[k4]));\n var shifts = /* @__PURE__ */ [\n [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],\n [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],\n [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],\n [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],\n [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]\n ].map((i3) => new Uint8Array(i3));\n var shiftsL = /* @__PURE__ */ idxL2.map((idx, i3) => idx.map((j2) => shifts[i3][j2]));\n var shiftsR = /* @__PURE__ */ idxR2.map((idx, i3) => idx.map((j2) => shifts[i3][j2]));\n var Kl = /* @__PURE__ */ new Uint32Array([\n 0,\n 1518500249,\n 1859775393,\n 2400959708,\n 2840853838\n ]);\n var Kr = /* @__PURE__ */ new Uint32Array([\n 1352829926,\n 1548603684,\n 1836072691,\n 2053994217,\n 0\n ]);\n var rotl2 = (word, shift) => word << shift | word >>> 32 - shift;\n function f7(group, x4, y6, z2) {\n if (group === 0)\n return x4 ^ y6 ^ z2;\n else if (group === 1)\n return x4 & y6 | ~x4 & z2;\n else if (group === 2)\n return (x4 | ~y6) ^ z2;\n else if (group === 3)\n return x4 & z2 | y6 & ~z2;\n else\n return x4 ^ (y6 | ~z2);\n }\n var BUF = /* @__PURE__ */ new Uint32Array(16);\n var RIPEMD1602 = class extends _sha2_js_1.SHA2 {\n constructor() {\n super(64, 20, 8, true);\n this.h0 = 1732584193 | 0;\n this.h1 = 4023233417 | 0;\n this.h2 = 2562383102 | 0;\n this.h3 = 271733878 | 0;\n this.h4 = 3285377520 | 0;\n }\n get() {\n const { h0, h1, h2: h22, h3: h32, h4 } = this;\n return [h0, h1, h22, h32, h4];\n }\n set(h0, h1, h22, h32, h4) {\n this.h0 = h0 | 0;\n this.h1 = h1 | 0;\n this.h2 = h22 | 0;\n this.h3 = h32 | 0;\n this.h4 = h4 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n BUF[i3] = view.getUint32(offset, true);\n let al = this.h0 | 0, ar = al, bl = this.h1 | 0, br = bl, cl = this.h2 | 0, cr = cl, dl = this.h3 | 0, dr = dl, el = this.h4 | 0, er = el;\n for (let group = 0; group < 5; group++) {\n const rGroup = 4 - group;\n const hbl = Kl[group], hbr = Kr[group];\n const rl = idxL2[group], rr = idxR2[group];\n const sl = shiftsL[group], sr = shiftsR[group];\n for (let i3 = 0; i3 < 16; i3++) {\n const tl = rotl2(al + f7(group, bl, cl, dl) + BUF[rl[i3]] + hbl, sl[i3]) + el | 0;\n al = el, el = dl, dl = rotl2(cl, 10) | 0, cl = bl, bl = tl;\n }\n for (let i3 = 0; i3 < 16; i3++) {\n const tr = rotl2(ar + f7(rGroup, br, cr, dr) + BUF[rr[i3]] + hbr, sr[i3]) + er | 0;\n ar = er, er = dr, dr = rotl2(cr, 10) | 0, cr = br, br = tr;\n }\n }\n this.set(this.h1 + cl + dr | 0, this.h2 + dl + er | 0, this.h3 + el + ar | 0, this.h4 + al + br | 0, this.h0 + bl + cr | 0);\n }\n roundClean() {\n BUF.fill(0);\n }\n destroy() {\n this.destroyed = true;\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0);\n }\n };\n exports3.RIPEMD160 = RIPEMD1602;\n exports3.ripemd160 = (0, utils_js_1.wrapConstructor)(() => new RIPEMD1602());\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/ripemd160.js\n var require_ripemd1602 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/ripemd160.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ripemd160 = void 0;\n var ripemd160_1 = require_ripemd160();\n var index_js_1 = require_utils13();\n var locked = false;\n var _ripemd160 = function(data) {\n return (0, ripemd160_1.ripemd160)(data);\n };\n var __ripemd160 = _ripemd160;\n function ripemd1602(_data) {\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__ripemd160(data));\n }\n exports3.ripemd160 = ripemd1602;\n ripemd1602._ = _ripemd160;\n ripemd1602.lock = function() {\n locked = true;\n };\n ripemd1602.register = function(func) {\n if (locked) {\n throw new TypeError(\"ripemd160 is locked\");\n }\n __ripemd160 = func;\n };\n Object.freeze(ripemd1602);\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/pbkdf2.js\n var require_pbkdf22 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/pbkdf2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pbkdf2 = void 0;\n var crypto_js_1 = require_crypto_browser();\n var index_js_1 = require_utils13();\n var locked = false;\n var _pbkdf2 = function(password, salt, iterations, keylen, algo) {\n return (0, crypto_js_1.pbkdf2Sync)(password, salt, iterations, keylen, algo);\n };\n var __pbkdf2 = _pbkdf2;\n function pbkdf22(_password, _salt, iterations, keylen, algo) {\n const password = (0, index_js_1.getBytes)(_password, \"password\");\n const salt = (0, index_js_1.getBytes)(_salt, \"salt\");\n return (0, index_js_1.hexlify)(__pbkdf2(password, salt, iterations, keylen, algo));\n }\n exports3.pbkdf2 = pbkdf22;\n pbkdf22._ = _pbkdf2;\n pbkdf22.lock = function() {\n locked = true;\n };\n pbkdf22.register = function(func) {\n if (locked) {\n throw new Error(\"pbkdf2 is locked\");\n }\n __pbkdf2 = func;\n };\n Object.freeze(pbkdf22);\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/random.js\n var require_random = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/random.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.randomBytes = void 0;\n var crypto_js_1 = require_crypto_browser();\n var locked = false;\n var _randomBytes = function(length) {\n return new Uint8Array((0, crypto_js_1.randomBytes)(length));\n };\n var __randomBytes = _randomBytes;\n function randomBytes2(length) {\n return __randomBytes(length);\n }\n exports3.randomBytes = randomBytes2;\n randomBytes2._ = _randomBytes;\n randomBytes2.lock = function() {\n locked = true;\n };\n randomBytes2.register = function(func) {\n if (locked) {\n throw new Error(\"randomBytes is locked\");\n }\n __randomBytes = func;\n };\n Object.freeze(randomBytes2);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/scrypt.js\n var require_scrypt2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/scrypt.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.scryptAsync = exports3.scrypt = void 0;\n var _assert_js_1 = require_assert();\n var sha256_js_1 = require_sha256();\n var pbkdf2_js_1 = require_pbkdf2();\n var utils_js_1 = require_utils14();\n var rotl2 = (a3, b4) => a3 << b4 | a3 >>> 32 - b4;\n function XorAndSalsa(prev, pi, input, ii, out, oi) {\n let y00 = prev[pi++] ^ input[ii++], y01 = prev[pi++] ^ input[ii++];\n let y02 = prev[pi++] ^ input[ii++], y03 = prev[pi++] ^ input[ii++];\n let y04 = prev[pi++] ^ input[ii++], y05 = prev[pi++] ^ input[ii++];\n let y06 = prev[pi++] ^ input[ii++], y07 = prev[pi++] ^ input[ii++];\n let y08 = prev[pi++] ^ input[ii++], y09 = prev[pi++] ^ input[ii++];\n let y10 = prev[pi++] ^ input[ii++], y11 = prev[pi++] ^ input[ii++];\n let y12 = prev[pi++] ^ input[ii++], y13 = prev[pi++] ^ input[ii++];\n let y14 = prev[pi++] ^ input[ii++], y15 = prev[pi++] ^ input[ii++];\n let x00 = y00, x01 = y01, x02 = y02, x03 = y03, x04 = y04, x05 = y05, x06 = y06, x07 = y07, x08 = y08, x09 = y09, x10 = y10, x11 = y11, x12 = y12, x13 = y13, x14 = y14, x15 = y15;\n for (let i3 = 0; i3 < 8; i3 += 2) {\n x04 ^= rotl2(x00 + x12 | 0, 7);\n x08 ^= rotl2(x04 + x00 | 0, 9);\n x12 ^= rotl2(x08 + x04 | 0, 13);\n x00 ^= rotl2(x12 + x08 | 0, 18);\n x09 ^= rotl2(x05 + x01 | 0, 7);\n x13 ^= rotl2(x09 + x05 | 0, 9);\n x01 ^= rotl2(x13 + x09 | 0, 13);\n x05 ^= rotl2(x01 + x13 | 0, 18);\n x14 ^= rotl2(x10 + x06 | 0, 7);\n x02 ^= rotl2(x14 + x10 | 0, 9);\n x06 ^= rotl2(x02 + x14 | 0, 13);\n x10 ^= rotl2(x06 + x02 | 0, 18);\n x03 ^= rotl2(x15 + x11 | 0, 7);\n x07 ^= rotl2(x03 + x15 | 0, 9);\n x11 ^= rotl2(x07 + x03 | 0, 13);\n x15 ^= rotl2(x11 + x07 | 0, 18);\n x01 ^= rotl2(x00 + x03 | 0, 7);\n x02 ^= rotl2(x01 + x00 | 0, 9);\n x03 ^= rotl2(x02 + x01 | 0, 13);\n x00 ^= rotl2(x03 + x02 | 0, 18);\n x06 ^= rotl2(x05 + x04 | 0, 7);\n x07 ^= rotl2(x06 + x05 | 0, 9);\n x04 ^= rotl2(x07 + x06 | 0, 13);\n x05 ^= rotl2(x04 + x07 | 0, 18);\n x11 ^= rotl2(x10 + x09 | 0, 7);\n x08 ^= rotl2(x11 + x10 | 0, 9);\n x09 ^= rotl2(x08 + x11 | 0, 13);\n x10 ^= rotl2(x09 + x08 | 0, 18);\n x12 ^= rotl2(x15 + x14 | 0, 7);\n x13 ^= rotl2(x12 + x15 | 0, 9);\n x14 ^= rotl2(x13 + x12 | 0, 13);\n x15 ^= rotl2(x14 + x13 | 0, 18);\n }\n out[oi++] = y00 + x00 | 0;\n out[oi++] = y01 + x01 | 0;\n out[oi++] = y02 + x02 | 0;\n out[oi++] = y03 + x03 | 0;\n out[oi++] = y04 + x04 | 0;\n out[oi++] = y05 + x05 | 0;\n out[oi++] = y06 + x06 | 0;\n out[oi++] = y07 + x07 | 0;\n out[oi++] = y08 + x08 | 0;\n out[oi++] = y09 + x09 | 0;\n out[oi++] = y10 + x10 | 0;\n out[oi++] = y11 + x11 | 0;\n out[oi++] = y12 + x12 | 0;\n out[oi++] = y13 + x13 | 0;\n out[oi++] = y14 + x14 | 0;\n out[oi++] = y15 + x15 | 0;\n }\n function BlockMix(input, ii, out, oi, r2) {\n let head = oi + 0;\n let tail = oi + 16 * r2;\n for (let i3 = 0; i3 < 16; i3++)\n out[tail + i3] = input[ii + (2 * r2 - 1) * 16 + i3];\n for (let i3 = 0; i3 < r2; i3++, head += 16, ii += 16) {\n XorAndSalsa(out, tail, input, ii, out, head);\n if (i3 > 0)\n tail += 16;\n XorAndSalsa(out, head, input, ii += 16, out, tail);\n }\n }\n function scryptInit(password, salt, _opts) {\n const opts = (0, utils_js_1.checkOpts)({\n dkLen: 32,\n asyncTick: 10,\n maxmem: 1024 ** 3 + 1024\n }, _opts);\n const { N: N4, r: r2, p: p4, dkLen, asyncTick, maxmem, onProgress } = opts;\n (0, _assert_js_1.number)(N4);\n (0, _assert_js_1.number)(r2);\n (0, _assert_js_1.number)(p4);\n (0, _assert_js_1.number)(dkLen);\n (0, _assert_js_1.number)(asyncTick);\n (0, _assert_js_1.number)(maxmem);\n if (onProgress !== void 0 && typeof onProgress !== \"function\")\n throw new Error(\"progressCb should be function\");\n const blockSize = 128 * r2;\n const blockSize32 = blockSize / 4;\n if (N4 <= 1 || (N4 & N4 - 1) !== 0 || N4 >= 2 ** (blockSize / 8) || N4 > 2 ** 32) {\n throw new Error(\"Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32\");\n }\n if (p4 < 0 || p4 > (2 ** 32 - 1) * 32 / blockSize) {\n throw new Error(\"Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)\");\n }\n if (dkLen < 0 || dkLen > (2 ** 32 - 1) * 32) {\n throw new Error(\"Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32\");\n }\n const memUsed = blockSize * (N4 + p4);\n if (memUsed > maxmem) {\n throw new Error(`Scrypt: parameters too large, ${memUsed} (128 * r * (N + p)) > ${maxmem} (maxmem)`);\n }\n const B2 = (0, pbkdf2_js_1.pbkdf2)(sha256_js_1.sha256, password, salt, { c: 1, dkLen: blockSize * p4 });\n const B32 = (0, utils_js_1.u32)(B2);\n const V2 = (0, utils_js_1.u32)(new Uint8Array(blockSize * N4));\n const tmp = (0, utils_js_1.u32)(new Uint8Array(blockSize));\n let blockMixCb = () => {\n };\n if (onProgress) {\n const totalBlockMix = 2 * N4 * p4;\n const callbackPer = Math.max(Math.floor(totalBlockMix / 1e4), 1);\n let blockMixCnt = 0;\n blockMixCb = () => {\n blockMixCnt++;\n if (onProgress && (!(blockMixCnt % callbackPer) || blockMixCnt === totalBlockMix))\n onProgress(blockMixCnt / totalBlockMix);\n };\n }\n return { N: N4, r: r2, p: p4, dkLen, blockSize32, V: V2, B32, B: B2, tmp, blockMixCb, asyncTick };\n }\n function scryptOutput(password, dkLen, B2, V2, tmp) {\n const res = (0, pbkdf2_js_1.pbkdf2)(sha256_js_1.sha256, password, B2, { c: 1, dkLen });\n B2.fill(0);\n V2.fill(0);\n tmp.fill(0);\n return res;\n }\n function scrypt(password, salt, opts) {\n const { N: N4, r: r2, p: p4, dkLen, blockSize32, V: V2, B32, B: B2, tmp, blockMixCb } = scryptInit(password, salt, opts);\n for (let pi = 0; pi < p4; pi++) {\n const Pi = blockSize32 * pi;\n for (let i3 = 0; i3 < blockSize32; i3++)\n V2[i3] = B32[Pi + i3];\n for (let i3 = 0, pos = 0; i3 < N4 - 1; i3++) {\n BlockMix(V2, pos, V2, pos += blockSize32, r2);\n blockMixCb();\n }\n BlockMix(V2, (N4 - 1) * blockSize32, B32, Pi, r2);\n blockMixCb();\n for (let i3 = 0; i3 < N4; i3++) {\n const j2 = B32[Pi + blockSize32 - 16] % N4;\n for (let k4 = 0; k4 < blockSize32; k4++)\n tmp[k4] = B32[Pi + k4] ^ V2[j2 * blockSize32 + k4];\n BlockMix(tmp, 0, B32, Pi, r2);\n blockMixCb();\n }\n }\n return scryptOutput(password, dkLen, B2, V2, tmp);\n }\n exports3.scrypt = scrypt;\n async function scryptAsync(password, salt, opts) {\n const { N: N4, r: r2, p: p4, dkLen, blockSize32, V: V2, B32, B: B2, tmp, blockMixCb, asyncTick } = scryptInit(password, salt, opts);\n for (let pi = 0; pi < p4; pi++) {\n const Pi = blockSize32 * pi;\n for (let i3 = 0; i3 < blockSize32; i3++)\n V2[i3] = B32[Pi + i3];\n let pos = 0;\n await (0, utils_js_1.asyncLoop)(N4 - 1, asyncTick, () => {\n BlockMix(V2, pos, V2, pos += blockSize32, r2);\n blockMixCb();\n });\n BlockMix(V2, (N4 - 1) * blockSize32, B32, Pi, r2);\n blockMixCb();\n await (0, utils_js_1.asyncLoop)(N4, asyncTick, () => {\n const j2 = B32[Pi + blockSize32 - 16] % N4;\n for (let k4 = 0; k4 < blockSize32; k4++)\n tmp[k4] = B32[Pi + k4] ^ V2[j2 * blockSize32 + k4];\n BlockMix(tmp, 0, B32, Pi, r2);\n blockMixCb();\n });\n }\n return scryptOutput(password, dkLen, B2, V2, tmp);\n }\n exports3.scryptAsync = scryptAsync;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/scrypt.js\n var require_scrypt3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/scrypt.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.scryptSync = exports3.scrypt = void 0;\n var scrypt_1 = require_scrypt2();\n var index_js_1 = require_utils13();\n var lockedSync = false;\n var lockedAsync = false;\n var _scryptAsync = async function(passwd, salt, N4, r2, p4, dkLen, onProgress) {\n return await (0, scrypt_1.scryptAsync)(passwd, salt, { N: N4, r: r2, p: p4, dkLen, onProgress });\n };\n var _scryptSync = function(passwd, salt, N4, r2, p4, dkLen) {\n return (0, scrypt_1.scrypt)(passwd, salt, { N: N4, r: r2, p: p4, dkLen });\n };\n var __scryptAsync = _scryptAsync;\n var __scryptSync = _scryptSync;\n async function scrypt(_passwd, _salt, N4, r2, p4, dkLen, progress) {\n const passwd = (0, index_js_1.getBytes)(_passwd, \"passwd\");\n const salt = (0, index_js_1.getBytes)(_salt, \"salt\");\n return (0, index_js_1.hexlify)(await __scryptAsync(passwd, salt, N4, r2, p4, dkLen, progress));\n }\n exports3.scrypt = scrypt;\n scrypt._ = _scryptAsync;\n scrypt.lock = function() {\n lockedAsync = true;\n };\n scrypt.register = function(func) {\n if (lockedAsync) {\n throw new Error(\"scrypt is locked\");\n }\n __scryptAsync = func;\n };\n Object.freeze(scrypt);\n function scryptSync(_passwd, _salt, N4, r2, p4, dkLen) {\n const passwd = (0, index_js_1.getBytes)(_passwd, \"passwd\");\n const salt = (0, index_js_1.getBytes)(_salt, \"salt\");\n return (0, index_js_1.hexlify)(__scryptSync(passwd, salt, N4, r2, p4, dkLen));\n }\n exports3.scryptSync = scryptSync;\n scryptSync._ = _scryptSync;\n scryptSync.lock = function() {\n lockedSync = true;\n };\n scryptSync.register = function(func) {\n if (lockedSync) {\n throw new Error(\"scryptSync is locked\");\n }\n __scryptSync = func;\n };\n Object.freeze(scryptSync);\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/sha2.js\n var require_sha22 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/sha2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha512 = exports3.sha256 = void 0;\n var crypto_js_1 = require_crypto_browser();\n var index_js_1 = require_utils13();\n var _sha256 = function(data) {\n return (0, crypto_js_1.createHash)(\"sha256\").update(data).digest();\n };\n var _sha512 = function(data) {\n return (0, crypto_js_1.createHash)(\"sha512\").update(data).digest();\n };\n var __sha256 = _sha256;\n var __sha512 = _sha512;\n var locked256 = false;\n var locked512 = false;\n function sha2564(_data) {\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__sha256(data));\n }\n exports3.sha256 = sha2564;\n sha2564._ = _sha256;\n sha2564.lock = function() {\n locked256 = true;\n };\n sha2564.register = function(func) {\n if (locked256) {\n throw new Error(\"sha256 is locked\");\n }\n __sha256 = func;\n };\n Object.freeze(sha2564);\n function sha5122(_data) {\n const data = (0, index_js_1.getBytes)(_data, \"data\");\n return (0, index_js_1.hexlify)(__sha512(data));\n }\n exports3.sha512 = sha5122;\n sha5122._ = _sha512;\n sha5122.lock = function() {\n locked512 = true;\n };\n sha5122.register = function(func) {\n if (locked512) {\n throw new Error(\"sha512 is locked\");\n }\n __sha512 = func;\n };\n Object.freeze(sha2564);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/utils.js\n var require_utils15 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.validateObject = exports3.createHmacDrbg = exports3.bitMask = exports3.bitSet = exports3.bitGet = exports3.bitLen = exports3.utf8ToBytes = exports3.equalBytes = exports3.concatBytes = exports3.ensureBytes = exports3.numberToVarBytesBE = exports3.numberToBytesLE = exports3.numberToBytesBE = exports3.bytesToNumberLE = exports3.bytesToNumberBE = exports3.hexToBytes = exports3.hexToNumber = exports3.numberToHexUnpadded = exports3.bytesToHex = void 0;\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n var u8a = (a3) => a3 instanceof Uint8Array;\n var hexes6 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n function bytesToHex5(bytes) {\n if (!u8a(bytes))\n throw new Error(\"Uint8Array expected\");\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes6[bytes[i3]];\n }\n return hex;\n }\n exports3.bytesToHex = bytesToHex5;\n function numberToHexUnpadded3(num2) {\n const hex = num2.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n }\n exports3.numberToHexUnpadded = numberToHexUnpadded3;\n function hexToNumber4(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n return BigInt(hex === \"\" ? \"0\" : `0x${hex}`);\n }\n exports3.hexToNumber = hexToNumber4;\n function hexToBytes5(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error(\"padded hex string expected, got unpadded hex of length \" + len);\n const array = new Uint8Array(len / 2);\n for (let i3 = 0; i3 < array.length; i3++) {\n const j2 = i3 * 2;\n const hexByte = hex.slice(j2, j2 + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error(\"Invalid byte sequence\");\n array[i3] = byte;\n }\n return array;\n }\n exports3.hexToBytes = hexToBytes5;\n function bytesToNumberBE3(bytes) {\n return hexToNumber4(bytesToHex5(bytes));\n }\n exports3.bytesToNumberBE = bytesToNumberBE3;\n function bytesToNumberLE3(bytes) {\n if (!u8a(bytes))\n throw new Error(\"Uint8Array expected\");\n return hexToNumber4(bytesToHex5(Uint8Array.from(bytes).reverse()));\n }\n exports3.bytesToNumberLE = bytesToNumberLE3;\n function numberToBytesBE3(n2, len) {\n return hexToBytes5(n2.toString(16).padStart(len * 2, \"0\"));\n }\n exports3.numberToBytesBE = numberToBytesBE3;\n function numberToBytesLE3(n2, len) {\n return numberToBytesBE3(n2, len).reverse();\n }\n exports3.numberToBytesLE = numberToBytesLE3;\n function numberToVarBytesBE(n2) {\n return hexToBytes5(numberToHexUnpadded3(n2));\n }\n exports3.numberToVarBytesBE = numberToVarBytesBE;\n function ensureBytes3(title2, hex, expectedLength) {\n let res;\n if (typeof hex === \"string\") {\n try {\n res = hexToBytes5(hex);\n } catch (e2) {\n throw new Error(`${title2} must be valid hex string, got \"${hex}\". Cause: ${e2}`);\n }\n } else if (u8a(hex)) {\n res = Uint8Array.from(hex);\n } else {\n throw new Error(`${title2} must be hex string or Uint8Array`);\n }\n const len = res.length;\n if (typeof expectedLength === \"number\" && len !== expectedLength)\n throw new Error(`${title2} expected ${expectedLength} bytes, got ${len}`);\n return res;\n }\n exports3.ensureBytes = ensureBytes3;\n function concatBytes4(...arrays) {\n const r2 = new Uint8Array(arrays.reduce((sum, a3) => sum + a3.length, 0));\n let pad6 = 0;\n arrays.forEach((a3) => {\n if (!u8a(a3))\n throw new Error(\"Uint8Array expected\");\n r2.set(a3, pad6);\n pad6 += a3.length;\n });\n return r2;\n }\n exports3.concatBytes = concatBytes4;\n function equalBytes(b1, b22) {\n if (b1.length !== b22.length)\n return false;\n for (let i3 = 0; i3 < b1.length; i3++)\n if (b1[i3] !== b22[i3])\n return false;\n return true;\n }\n exports3.equalBytes = equalBytes;\n function utf8ToBytes3(str) {\n if (typeof str !== \"string\")\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str));\n }\n exports3.utf8ToBytes = utf8ToBytes3;\n function bitLen3(n2) {\n let len;\n for (len = 0; n2 > _0n11; n2 >>= _1n11, len += 1)\n ;\n return len;\n }\n exports3.bitLen = bitLen3;\n function bitGet(n2, pos) {\n return n2 >> BigInt(pos) & _1n11;\n }\n exports3.bitGet = bitGet;\n var bitSet = (n2, pos, value) => {\n return n2 | (value ? _1n11 : _0n11) << BigInt(pos);\n };\n exports3.bitSet = bitSet;\n var bitMask3 = (n2) => (_2n8 << BigInt(n2 - 1)) - _1n11;\n exports3.bitMask = bitMask3;\n var u8n2 = (data) => new Uint8Array(data);\n var u8fr2 = (arr) => Uint8Array.from(arr);\n function createHmacDrbg3(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== \"number\" || hashLen < 2)\n throw new Error(\"hashLen must be a number\");\n if (typeof qByteLen !== \"number\" || qByteLen < 2)\n throw new Error(\"qByteLen must be a number\");\n if (typeof hmacFn !== \"function\")\n throw new Error(\"hmacFn must be a function\");\n let v2 = u8n2(hashLen);\n let k4 = u8n2(hashLen);\n let i3 = 0;\n const reset = () => {\n v2.fill(1);\n k4.fill(0);\n i3 = 0;\n };\n const h4 = (...b4) => hmacFn(k4, v2, ...b4);\n const reseed = (seed = u8n2()) => {\n k4 = h4(u8fr2([0]), seed);\n v2 = h4();\n if (seed.length === 0)\n return;\n k4 = h4(u8fr2([1]), seed);\n v2 = h4();\n };\n const gen2 = () => {\n if (i3++ >= 1e3)\n throw new Error(\"drbg: tried 1000 values\");\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v2 = h4();\n const sl = v2.slice();\n out.push(sl);\n len += v2.length;\n }\n return concatBytes4(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed);\n let res = void 0;\n while (!(res = pred(gen2())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n }\n exports3.createHmacDrbg = createHmacDrbg3;\n var validatorFns2 = {\n bigint: (val) => typeof val === \"bigint\",\n function: (val) => typeof val === \"function\",\n boolean: (val) => typeof val === \"boolean\",\n string: (val) => typeof val === \"string\",\n stringOrUint8Array: (val) => typeof val === \"string\" || val instanceof Uint8Array,\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === \"function\" && Number.isSafeInteger(val.outputLen)\n };\n function validateObject3(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns2[type];\n if (typeof checkVal !== \"function\")\n throw new Error(`Invalid validator \"${type}\", expected function`);\n const val = object[fieldName];\n if (isOptional && val === void 0)\n return;\n if (!checkVal(val, object)) {\n throw new Error(`Invalid param ${String(fieldName)}=${val} (${typeof val}), expected ${type}`);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n }\n exports3.validateObject = validateObject3;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/modular.js\n var require_modular = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/modular.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.mapHashToField = exports3.getMinHashLength = exports3.getFieldBytesLength = exports3.hashToPrivateScalar = exports3.FpSqrtEven = exports3.FpSqrtOdd = exports3.Field = exports3.nLength = exports3.FpIsSquare = exports3.FpDiv = exports3.FpInvertBatch = exports3.FpPow = exports3.validateField = exports3.isNegativeLE = exports3.FpSqrt = exports3.tonelliShanks = exports3.invert = exports3.pow2 = exports3.pow = exports3.mod = void 0;\n var utils_js_1 = require_utils15();\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n var _3n5 = BigInt(3);\n var _4n5 = BigInt(4);\n var _5n3 = BigInt(5);\n var _8n3 = BigInt(8);\n var _9n2 = BigInt(9);\n var _16n2 = BigInt(16);\n function mod3(a3, b4) {\n const result = a3 % b4;\n return result >= _0n11 ? result : b4 + result;\n }\n exports3.mod = mod3;\n function pow(num2, power, modulo) {\n if (modulo <= _0n11 || power < _0n11)\n throw new Error(\"Expected power/modulo > 0\");\n if (modulo === _1n11)\n return _0n11;\n let res = _1n11;\n while (power > _0n11) {\n if (power & _1n11)\n res = res * num2 % modulo;\n num2 = num2 * num2 % modulo;\n power >>= _1n11;\n }\n return res;\n }\n exports3.pow = pow;\n function pow23(x4, power, modulo) {\n let res = x4;\n while (power-- > _0n11) {\n res *= res;\n res %= modulo;\n }\n return res;\n }\n exports3.pow2 = pow23;\n function invert3(number, modulo) {\n if (number === _0n11 || modulo <= _0n11) {\n throw new Error(`invert: expected positive integers, got n=${number} mod=${modulo}`);\n }\n let a3 = mod3(number, modulo);\n let b4 = modulo;\n let x4 = _0n11, y6 = _1n11, u2 = _1n11, v2 = _0n11;\n while (a3 !== _0n11) {\n const q3 = b4 / a3;\n const r2 = b4 % a3;\n const m2 = x4 - u2 * q3;\n const n2 = y6 - v2 * q3;\n b4 = a3, a3 = r2, x4 = u2, y6 = v2, u2 = m2, v2 = n2;\n }\n const gcd = b4;\n if (gcd !== _1n11)\n throw new Error(\"invert: does not exist\");\n return mod3(x4, modulo);\n }\n exports3.invert = invert3;\n function tonelliShanks3(P2) {\n const legendreC = (P2 - _1n11) / _2n8;\n let Q2, S3, Z2;\n for (Q2 = P2 - _1n11, S3 = 0; Q2 % _2n8 === _0n11; Q2 /= _2n8, S3++)\n ;\n for (Z2 = _2n8; Z2 < P2 && pow(Z2, legendreC, P2) !== P2 - _1n11; Z2++)\n ;\n if (S3 === 1) {\n const p1div4 = (P2 + _1n11) / _4n5;\n return function tonelliFast(Fp, n2) {\n const root = Fp.pow(n2, p1div4);\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n };\n }\n const Q1div2 = (Q2 + _1n11) / _2n8;\n return function tonelliSlow(Fp, n2) {\n if (Fp.pow(n2, legendreC) === Fp.neg(Fp.ONE))\n throw new Error(\"Cannot find square root\");\n let r2 = S3;\n let g4 = Fp.pow(Fp.mul(Fp.ONE, Z2), Q2);\n let x4 = Fp.pow(n2, Q1div2);\n let b4 = Fp.pow(n2, Q2);\n while (!Fp.eql(b4, Fp.ONE)) {\n if (Fp.eql(b4, Fp.ZERO))\n return Fp.ZERO;\n let m2 = 1;\n for (let t22 = Fp.sqr(b4); m2 < r2; m2++) {\n if (Fp.eql(t22, Fp.ONE))\n break;\n t22 = Fp.sqr(t22);\n }\n const ge = Fp.pow(g4, _1n11 << BigInt(r2 - m2 - 1));\n g4 = Fp.sqr(ge);\n x4 = Fp.mul(x4, ge);\n b4 = Fp.mul(b4, g4);\n r2 = m2;\n }\n return x4;\n };\n }\n exports3.tonelliShanks = tonelliShanks3;\n function FpSqrt3(P2) {\n if (P2 % _4n5 === _3n5) {\n const p1div4 = (P2 + _1n11) / _4n5;\n return function sqrt3mod43(Fp, n2) {\n const root = Fp.pow(n2, p1div4);\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n };\n }\n if (P2 % _8n3 === _5n3) {\n const c1 = (P2 - _5n3) / _8n3;\n return function sqrt5mod83(Fp, n2) {\n const n22 = Fp.mul(n2, _2n8);\n const v2 = Fp.pow(n22, c1);\n const nv = Fp.mul(n2, v2);\n const i3 = Fp.mul(Fp.mul(nv, _2n8), v2);\n const root = Fp.mul(nv, Fp.sub(i3, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n };\n }\n if (P2 % _16n2 === _9n2) {\n }\n return tonelliShanks3(P2);\n }\n exports3.FpSqrt = FpSqrt3;\n var isNegativeLE = (num2, modulo) => (mod3(num2, modulo) & _1n11) === _1n11;\n exports3.isNegativeLE = isNegativeLE;\n var FIELD_FIELDS3 = [\n \"create\",\n \"isValid\",\n \"is0\",\n \"neg\",\n \"inv\",\n \"sqrt\",\n \"sqr\",\n \"eql\",\n \"add\",\n \"sub\",\n \"mul\",\n \"pow\",\n \"div\",\n \"addN\",\n \"subN\",\n \"mulN\",\n \"sqrN\"\n ];\n function validateField3(field) {\n const initial = {\n ORDER: \"bigint\",\n MASK: \"bigint\",\n BYTES: \"isSafeInteger\",\n BITS: \"isSafeInteger\"\n };\n const opts = FIELD_FIELDS3.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n return (0, utils_js_1.validateObject)(field, opts);\n }\n exports3.validateField = validateField3;\n function FpPow3(f7, num2, power) {\n if (power < _0n11)\n throw new Error(\"Expected power > 0\");\n if (power === _0n11)\n return f7.ONE;\n if (power === _1n11)\n return num2;\n let p4 = f7.ONE;\n let d5 = num2;\n while (power > _0n11) {\n if (power & _1n11)\n p4 = f7.mul(p4, d5);\n d5 = f7.sqr(d5);\n power >>= _1n11;\n }\n return p4;\n }\n exports3.FpPow = FpPow3;\n function FpInvertBatch3(f7, nums) {\n const tmp = new Array(nums.length);\n const lastMultiplied = nums.reduce((acc, num2, i3) => {\n if (f7.is0(num2))\n return acc;\n tmp[i3] = acc;\n return f7.mul(acc, num2);\n }, f7.ONE);\n const inverted = f7.inv(lastMultiplied);\n nums.reduceRight((acc, num2, i3) => {\n if (f7.is0(num2))\n return acc;\n tmp[i3] = f7.mul(acc, tmp[i3]);\n return f7.mul(acc, num2);\n }, inverted);\n return tmp;\n }\n exports3.FpInvertBatch = FpInvertBatch3;\n function FpDiv(f7, lhs, rhs) {\n return f7.mul(lhs, typeof rhs === \"bigint\" ? invert3(rhs, f7.ORDER) : f7.inv(rhs));\n }\n exports3.FpDiv = FpDiv;\n function FpIsSquare(f7) {\n const legendreConst = (f7.ORDER - _1n11) / _2n8;\n return (x4) => {\n const p4 = f7.pow(x4, legendreConst);\n return f7.eql(p4, f7.ZERO) || f7.eql(p4, f7.ONE);\n };\n }\n exports3.FpIsSquare = FpIsSquare;\n function nLength3(n2, nBitLength) {\n const _nBitLength = nBitLength !== void 0 ? nBitLength : n2.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n }\n exports3.nLength = nLength3;\n function Field3(ORDER, bitLen3, isLE2 = false, redef = {}) {\n if (ORDER <= _0n11)\n throw new Error(`Expected Field ORDER > 0, got ${ORDER}`);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength3(ORDER, bitLen3);\n if (BYTES > 2048)\n throw new Error(\"Field lengths over 2048 bytes are not supported\");\n const sqrtP = FpSqrt3(ORDER);\n const f7 = Object.freeze({\n ORDER,\n BITS,\n BYTES,\n MASK: (0, utils_js_1.bitMask)(BITS),\n ZERO: _0n11,\n ONE: _1n11,\n create: (num2) => mod3(num2, ORDER),\n isValid: (num2) => {\n if (typeof num2 !== \"bigint\")\n throw new Error(`Invalid field element: expected bigint, got ${typeof num2}`);\n return _0n11 <= num2 && num2 < ORDER;\n },\n is0: (num2) => num2 === _0n11,\n isOdd: (num2) => (num2 & _1n11) === _1n11,\n neg: (num2) => mod3(-num2, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num2) => mod3(num2 * num2, ORDER),\n add: (lhs, rhs) => mod3(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod3(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod3(lhs * rhs, ORDER),\n pow: (num2, power) => FpPow3(f7, num2, power),\n div: (lhs, rhs) => mod3(lhs * invert3(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num2) => num2 * num2,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num2) => invert3(num2, ORDER),\n sqrt: redef.sqrt || ((n2) => sqrtP(f7, n2)),\n invertBatch: (lst) => FpInvertBatch3(f7, lst),\n // TODO: do we really need constant cmov?\n // We don't have const-time bigints anyway, so probably will be not very useful\n cmov: (a3, b4, c4) => c4 ? b4 : a3,\n toBytes: (num2) => isLE2 ? (0, utils_js_1.numberToBytesLE)(num2, BYTES) : (0, utils_js_1.numberToBytesBE)(num2, BYTES),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes.length}`);\n return isLE2 ? (0, utils_js_1.bytesToNumberLE)(bytes) : (0, utils_js_1.bytesToNumberBE)(bytes);\n }\n });\n return Object.freeze(f7);\n }\n exports3.Field = Field3;\n function FpSqrtOdd(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? root : Fp.neg(root);\n }\n exports3.FpSqrtOdd = FpSqrtOdd;\n function FpSqrtEven(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? Fp.neg(root) : root;\n }\n exports3.FpSqrtEven = FpSqrtEven;\n function hashToPrivateScalar(hash3, groupOrder, isLE2 = false) {\n hash3 = (0, utils_js_1.ensureBytes)(\"privateHash\", hash3);\n const hashLen = hash3.length;\n const minLen = nLength3(groupOrder).nByteLength + 8;\n if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n throw new Error(`hashToPrivateScalar: expected ${minLen}-1024 bytes of input, got ${hashLen}`);\n const num2 = isLE2 ? (0, utils_js_1.bytesToNumberLE)(hash3) : (0, utils_js_1.bytesToNumberBE)(hash3);\n return mod3(num2, groupOrder - _1n11) + _1n11;\n }\n exports3.hashToPrivateScalar = hashToPrivateScalar;\n function getFieldBytesLength3(fieldOrder) {\n if (typeof fieldOrder !== \"bigint\")\n throw new Error(\"field order must be bigint\");\n const bitLength3 = fieldOrder.toString(2).length;\n return Math.ceil(bitLength3 / 8);\n }\n exports3.getFieldBytesLength = getFieldBytesLength3;\n function getMinHashLength3(fieldOrder) {\n const length = getFieldBytesLength3(fieldOrder);\n return length + Math.ceil(length / 2);\n }\n exports3.getMinHashLength = getMinHashLength3;\n function mapHashToField3(key, fieldOrder, isLE2 = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength3(fieldOrder);\n const minLen = getMinHashLength3(fieldOrder);\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(`expected ${minLen}-1024 bytes of input, got ${len}`);\n const num2 = isLE2 ? (0, utils_js_1.bytesToNumberBE)(key) : (0, utils_js_1.bytesToNumberLE)(key);\n const reduced = mod3(num2, fieldOrder - _1n11) + _1n11;\n return isLE2 ? (0, utils_js_1.numberToBytesLE)(reduced, fieldLen) : (0, utils_js_1.numberToBytesBE)(reduced, fieldLen);\n }\n exports3.mapHashToField = mapHashToField3;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/curve.js\n var require_curve2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/curve.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.validateBasic = exports3.wNAF = void 0;\n var modular_js_1 = require_modular();\n var utils_js_1 = require_utils15();\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n function wNAF3(c4, bits) {\n const constTimeNegate2 = (condition, item) => {\n const neg = item.negate();\n return condition ? neg : item;\n };\n const opts = (W) => {\n const windows = Math.ceil(bits / W) + 1;\n const windowSize = 2 ** (W - 1);\n return { windows, windowSize };\n };\n return {\n constTimeNegate: constTimeNegate2,\n // non-const time multiplication ladder\n unsafeLadder(elm, n2) {\n let p4 = c4.ZERO;\n let d5 = elm;\n while (n2 > _0n11) {\n if (n2 & _1n11)\n p4 = p4.add(d5);\n d5 = d5.double();\n n2 >>= _1n11;\n }\n return p4;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = opts(W);\n const points = [];\n let p4 = elm;\n let base4 = p4;\n for (let window2 = 0; window2 < windows; window2++) {\n base4 = p4;\n points.push(base4);\n for (let i3 = 1; i3 < windowSize; i3++) {\n base4 = base4.add(p4);\n points.push(base4);\n }\n p4 = base4.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n2) {\n const { windows, windowSize } = opts(W);\n let p4 = c4.ZERO;\n let f7 = c4.BASE;\n const mask = BigInt(2 ** W - 1);\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window2 = 0; window2 < windows; window2++) {\n const offset = window2 * windowSize;\n let wbits = Number(n2 & mask);\n n2 >>= shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n2 += _1n11;\n }\n const offset1 = offset;\n const offset2 = offset + Math.abs(wbits) - 1;\n const cond1 = window2 % 2 !== 0;\n const cond2 = wbits < 0;\n if (wbits === 0) {\n f7 = f7.add(constTimeNegate2(cond1, precomputes[offset1]));\n } else {\n p4 = p4.add(constTimeNegate2(cond2, precomputes[offset2]));\n }\n }\n return { p: p4, f: f7 };\n },\n wNAFCached(P2, precomputesMap, n2, transform) {\n const W = P2._WINDOW_SIZE || 1;\n let comp = precomputesMap.get(P2);\n if (!comp) {\n comp = this.precomputeWindow(P2, W);\n if (W !== 1) {\n precomputesMap.set(P2, transform(comp));\n }\n }\n return this.wNAF(W, comp, n2);\n }\n };\n }\n exports3.wNAF = wNAF3;\n function validateBasic2(curve) {\n (0, modular_js_1.validateField)(curve.Fp);\n (0, utils_js_1.validateObject)(curve, {\n n: \"bigint\",\n h: \"bigint\",\n Gx: \"field\",\n Gy: \"field\"\n }, {\n nBitLength: \"isSafeInteger\",\n nByteLength: \"isSafeInteger\"\n });\n return Object.freeze({\n ...(0, modular_js_1.nLength)(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER }\n });\n }\n exports3.validateBasic = validateBasic2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/weierstrass.js\n var require_weierstrass = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/weierstrass.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.mapToCurveSimpleSWU = exports3.SWUFpSqrtRatio = exports3.weierstrass = exports3.weierstrassPoints = exports3.DER = void 0;\n var mod3 = require_modular();\n var ut = require_utils15();\n var utils_js_1 = require_utils15();\n var curve_js_1 = require_curve2();\n function validatePointOpts2(curve) {\n const opts = (0, curve_js_1.validateBasic)(curve);\n ut.validateObject(opts, {\n a: \"field\",\n b: \"field\"\n }, {\n allowedPrivateKeyLengths: \"array\",\n wrapPrivateKey: \"boolean\",\n isTorsionFree: \"function\",\n clearCofactor: \"function\",\n allowInfinityPoint: \"boolean\",\n fromBytes: \"function\",\n toBytes: \"function\"\n });\n const { endo, Fp, a: a3 } = opts;\n if (endo) {\n if (!Fp.eql(a3, Fp.ZERO)) {\n throw new Error(\"Endomorphism can only be defined for Koblitz curves that have a=0\");\n }\n if (typeof endo !== \"object\" || typeof endo.beta !== \"bigint\" || typeof endo.splitScalar !== \"function\") {\n throw new Error(\"Expected endomorphism with beta: bigint and splitScalar: function\");\n }\n }\n return Object.freeze({ ...opts });\n }\n var { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;\n exports3.DER = {\n // asn.1 DER encoding utils\n Err: class DERErr extends Error {\n constructor(m2 = \"\") {\n super(m2);\n }\n },\n _parseInt(data) {\n const { Err: E2 } = exports3.DER;\n if (data.length < 2 || data[0] !== 2)\n throw new E2(\"Invalid signature integer tag\");\n const len = data[1];\n const res = data.subarray(2, len + 2);\n if (!len || res.length !== len)\n throw new E2(\"Invalid signature integer: wrong length\");\n if (res[0] & 128)\n throw new E2(\"Invalid signature integer: negative\");\n if (res[0] === 0 && !(res[1] & 128))\n throw new E2(\"Invalid signature integer: unnecessary leading zero\");\n return { d: b2n(res), l: data.subarray(len + 2) };\n },\n toSig(hex) {\n const { Err: E2 } = exports3.DER;\n const data = typeof hex === \"string\" ? h2b(hex) : hex;\n if (!(data instanceof Uint8Array))\n throw new Error(\"ui8a expected\");\n let l6 = data.length;\n if (l6 < 2 || data[0] != 48)\n throw new E2(\"Invalid signature tag\");\n if (data[1] !== l6 - 2)\n throw new E2(\"Invalid signature: incorrect length\");\n const { d: r2, l: sBytes } = exports3.DER._parseInt(data.subarray(2));\n const { d: s4, l: rBytesLeft } = exports3.DER._parseInt(sBytes);\n if (rBytesLeft.length)\n throw new E2(\"Invalid signature: left bytes after parsing\");\n return { r: r2, s: s4 };\n },\n hexFromSig(sig) {\n const slice4 = (s5) => Number.parseInt(s5[0], 16) & 8 ? \"00\" + s5 : s5;\n const h4 = (num2) => {\n const hex = num2.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n };\n const s4 = slice4(h4(sig.s));\n const r2 = slice4(h4(sig.r));\n const shl = s4.length / 2;\n const rhl = r2.length / 2;\n const sl = h4(shl);\n const rl = h4(rhl);\n return `30${h4(rhl + shl + 4)}02${rl}${r2}02${sl}${s4}`;\n }\n };\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n var _3n5 = BigInt(3);\n var _4n5 = BigInt(4);\n function weierstrassPoints2(opts) {\n const CURVE = validatePointOpts2(opts);\n const { Fp } = CURVE;\n const toBytes5 = CURVE.toBytes || ((_c, point, _isCompressed) => {\n const a3 = point.toAffine();\n return ut.concatBytes(Uint8Array.from([4]), Fp.toBytes(a3.x), Fp.toBytes(a3.y));\n });\n const fromBytes5 = CURVE.fromBytes || ((bytes) => {\n const tail = bytes.subarray(1);\n const x4 = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y6 = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x: x4, y: y6 };\n });\n function weierstrassEquation(x4) {\n const { a: a3, b: b4 } = CURVE;\n const x22 = Fp.sqr(x4);\n const x32 = Fp.mul(x22, x4);\n return Fp.add(Fp.add(x32, Fp.mul(x4, a3)), b4);\n }\n if (!Fp.eql(Fp.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))\n throw new Error(\"bad generator point: equation left != right\");\n function isWithinCurveOrder(num2) {\n return typeof num2 === \"bigint\" && _0n11 < num2 && num2 < CURVE.n;\n }\n function assertGE(num2) {\n if (!isWithinCurveOrder(num2))\n throw new Error(\"Expected valid bigint: 0 < bigint < curve.n\");\n }\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n: n2 } = CURVE;\n if (lengths && typeof key !== \"bigint\") {\n if (key instanceof Uint8Array)\n key = ut.bytesToHex(key);\n if (typeof key !== \"string\" || !lengths.includes(key.length))\n throw new Error(\"Invalid key\");\n key = key.padStart(nByteLength * 2, \"0\");\n }\n let num2;\n try {\n num2 = typeof key === \"bigint\" ? key : ut.bytesToNumberBE((0, utils_js_1.ensureBytes)(\"private key\", key, nByteLength));\n } catch (error) {\n throw new Error(`private key must be ${nByteLength} bytes, hex or bigint, not ${typeof key}`);\n }\n if (wrapPrivateKey)\n num2 = mod3.mod(num2, n2);\n assertGE(num2);\n return num2;\n }\n const pointPrecomputes3 = /* @__PURE__ */ new Map();\n function assertPrjPoint(other) {\n if (!(other instanceof Point3))\n throw new Error(\"ProjectivePoint expected\");\n }\n class Point3 {\n constructor(px, py, pz) {\n this.px = px;\n this.py = py;\n this.pz = pz;\n if (px == null || !Fp.isValid(px))\n throw new Error(\"x required\");\n if (py == null || !Fp.isValid(py))\n throw new Error(\"y required\");\n if (pz == null || !Fp.isValid(pz))\n throw new Error(\"z required\");\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p4) {\n const { x: x4, y: y6 } = p4 || {};\n if (!p4 || !Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"invalid affine point\");\n if (p4 instanceof Point3)\n throw new Error(\"projective point not allowed\");\n const is0 = (i3) => Fp.eql(i3, Fp.ZERO);\n if (is0(x4) && is0(y6))\n return Point3.ZERO;\n return new Point3(x4, y6, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p4) => p4.pz));\n return points.map((p4, i3) => p4.toAffine(toInv[i3])).map(Point3.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P2 = Point3.fromAffine(fromBytes5((0, utils_js_1.ensureBytes)(\"pointHex\", hex)));\n P2.assertValidity();\n return P2;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point3.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes3.delete(this);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n if (this.is0()) {\n if (CURVE.allowInfinityPoint && !Fp.is0(this.py))\n return;\n throw new Error(\"bad point: ZERO\");\n }\n const { x: x4, y: y6 } = this.toAffine();\n if (!Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"bad point: x or y not FE\");\n const left = Fp.sqr(y6);\n const right = weierstrassEquation(x4);\n if (!Fp.eql(left, right))\n throw new Error(\"bad point: equation left != right\");\n if (!this.isTorsionFree())\n throw new Error(\"bad point: not in prime-order subgroup\");\n }\n hasEvenY() {\n const { y: y6 } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y6);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U22 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U22;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point3(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a: a3, b: b4 } = CURVE;\n const b32 = Fp.mul(b4, _3n5);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n let t0 = Fp.mul(X1, X1);\n let t1 = Fp.mul(Y1, Y1);\n let t22 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3);\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a3, Z3);\n Y3 = Fp.mul(b32, t22);\n Y3 = Fp.add(X3, Y3);\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b32, Z3);\n t22 = Fp.mul(a3, t22);\n t3 = Fp.sub(t0, t22);\n t3 = Fp.mul(a3, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0);\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t22);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t22 = Fp.mul(Y1, Z1);\n t22 = Fp.add(t22, t22);\n t0 = Fp.mul(t22, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t22, t1);\n Z3 = Fp.add(Z3, Z3);\n Z3 = Fp.add(Z3, Z3);\n return new Point3(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n const a3 = CURVE.a;\n const b32 = Fp.mul(CURVE.b, _3n5);\n let t0 = Fp.mul(X1, X2);\n let t1 = Fp.mul(Y1, Y2);\n let t22 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2);\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2);\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t22);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2);\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t22);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a3, t4);\n X3 = Fp.mul(b32, t22);\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0);\n t1 = Fp.add(t1, t0);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.mul(b32, t4);\n t1 = Fp.add(t1, t22);\n t22 = Fp.sub(t0, t22);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.add(t4, t22);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4);\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0);\n return new Point3(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point3.ZERO);\n }\n wNAF(n2) {\n return wnaf.wNAFCached(this, pointPrecomputes3, n2, (comp) => {\n const toInv = Fp.invertBatch(comp.map((p4) => p4.pz));\n return comp.map((p4, i3) => p4.toAffine(toInv[i3])).map(Point3.fromAffine);\n });\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(n2) {\n const I2 = Point3.ZERO;\n if (n2 === _0n11)\n return I2;\n assertGE(n2);\n if (n2 === _1n11)\n return this;\n const { endo } = CURVE;\n if (!endo)\n return wnaf.unsafeLadder(this, n2);\n let { k1neg, k1, k2neg, k2: k22 } = endo.splitScalar(n2);\n let k1p = I2;\n let k2p = I2;\n let d5 = this;\n while (k1 > _0n11 || k22 > _0n11) {\n if (k1 & _1n11)\n k1p = k1p.add(d5);\n if (k22 & _1n11)\n k2p = k2p.add(d5);\n d5 = d5.double();\n k1 >>= _1n11;\n k22 >>= _1n11;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point3(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n assertGE(scalar);\n let n2 = scalar;\n let point, fake;\n const { endo } = CURVE;\n if (endo) {\n const { k1neg, k1, k2neg, k2: k22 } = endo.splitScalar(n2);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k22);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point3(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n } else {\n const { p: p4, f: f7 } = this.wNAF(n2);\n point = p4;\n fake = f7;\n }\n return Point3.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q2, a3, b4) {\n const G = Point3.BASE;\n const mul = (P2, a4) => a4 === _0n11 || a4 === _1n11 || !P2.equals(G) ? P2.multiplyUnsafe(a4) : P2.multiply(a4);\n const sum = mul(this, a3).add(mul(Q2, b4));\n return sum.is0() ? void 0 : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n const { px: x4, py: y6, pz: z2 } = this;\n const is0 = this.is0();\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z2);\n const ax = Fp.mul(x4, iz);\n const ay = Fp.mul(y6, iz);\n const zz = Fp.mul(z2, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error(\"invZ was invalid\");\n return { x: ax, y: ay };\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n11)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point3, this);\n throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\");\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n11)\n return this;\n if (clearCofactor)\n return clearCofactor(Point3, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n this.assertValidity();\n return toBytes5(Point3, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return ut.bytesToHex(this.toRawBytes(isCompressed));\n }\n }\n Point3.BASE = new Point3(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point3.ZERO = new Point3(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const _bits = CURVE.nBitLength;\n const wnaf = (0, curve_js_1.wNAF)(Point3, CURVE.endo ? Math.ceil(_bits / 2) : _bits);\n return {\n CURVE,\n ProjectivePoint: Point3,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder\n };\n }\n exports3.weierstrassPoints = weierstrassPoints2;\n function validateOpts2(curve) {\n const opts = (0, curve_js_1.validateBasic)(curve);\n ut.validateObject(opts, {\n hash: \"hash\",\n hmac: \"function\",\n randomBytes: \"function\"\n }, {\n bits2int: \"function\",\n bits2int_modN: \"function\",\n lowS: \"boolean\"\n });\n return Object.freeze({ lowS: true, ...opts });\n }\n function weierstrass3(curveDef) {\n const CURVE = validateOpts2(curveDef);\n const { Fp, n: CURVE_ORDER } = CURVE;\n const compressedLen = Fp.BYTES + 1;\n const uncompressedLen = 2 * Fp.BYTES + 1;\n function isValidFieldElement(num2) {\n return _0n11 < num2 && num2 < Fp.ORDER;\n }\n function modN2(a3) {\n return mod3.mod(a3, CURVE_ORDER);\n }\n function invN(a3) {\n return mod3.invert(a3, CURVE_ORDER);\n }\n const { ProjectivePoint: Point3, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder } = weierstrassPoints2({\n ...CURVE,\n toBytes(_c, point, isCompressed) {\n const a3 = point.toAffine();\n const x4 = Fp.toBytes(a3.x);\n const cat = ut.concatBytes;\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 2 : 3]), x4);\n } else {\n return cat(Uint8Array.from([4]), x4, Fp.toBytes(a3.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (len === compressedLen && (head === 2 || head === 3)) {\n const x4 = ut.bytesToNumberBE(tail);\n if (!isValidFieldElement(x4))\n throw new Error(\"Point is not on curve\");\n const y22 = weierstrassEquation(x4);\n let y6 = Fp.sqrt(y22);\n const isYOdd = (y6 & _1n11) === _1n11;\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y6 = Fp.neg(y6);\n return { x: x4, y: y6 };\n } else if (len === uncompressedLen && head === 4) {\n const x4 = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y6 = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x: x4, y: y6 };\n } else {\n throw new Error(`Point of length ${len} was invalid. Expected ${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes`);\n }\n }\n });\n const numToNByteStr = (num2) => ut.bytesToHex(ut.numberToBytesBE(num2, CURVE.nByteLength));\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n11;\n return number > HALF;\n }\n function normalizeS(s4) {\n return isBiggerThanHalfOrder(s4) ? modN2(-s4) : s4;\n }\n const slcNum = (b4, from14, to) => ut.bytesToNumberBE(b4.slice(from14, to));\n class Signature {\n constructor(r2, s4, recovery) {\n this.r = r2;\n this.s = s4;\n this.recovery = recovery;\n this.assertValidity();\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l6 = CURVE.nByteLength;\n hex = (0, utils_js_1.ensureBytes)(\"compactSignature\", hex, l6 * 2);\n return new Signature(slcNum(hex, 0, l6), slcNum(hex, l6, 2 * l6));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r: r2, s: s4 } = exports3.DER.toSig((0, utils_js_1.ensureBytes)(\"DER\", hex));\n return new Signature(r2, s4);\n }\n assertValidity() {\n if (!isWithinCurveOrder(this.r))\n throw new Error(\"r must be 0 < r < CURVE.n\");\n if (!isWithinCurveOrder(this.s))\n throw new Error(\"s must be 0 < s < CURVE.n\");\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r: r2, s: s4, recovery: rec } = this;\n const h4 = bits2int_modN((0, utils_js_1.ensureBytes)(\"msgHash\", msgHash));\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error(\"recovery id invalid\");\n const radj = rec === 2 || rec === 3 ? r2 + CURVE.n : r2;\n if (radj >= Fp.ORDER)\n throw new Error(\"recovery id 2 or 3 invalid\");\n const prefix = (rec & 1) === 0 ? \"02\" : \"03\";\n const R3 = Point3.fromHex(prefix + numToNByteStr(radj));\n const ir = invN(radj);\n const u1 = modN2(-h4 * ir);\n const u2 = modN2(s4 * ir);\n const Q2 = Point3.BASE.multiplyAndAddUnsafe(R3, u1, u2);\n if (!Q2)\n throw new Error(\"point at infinify\");\n Q2.assertValidity();\n return Q2;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, modN2(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return ut.hexToBytes(this.toDERHex());\n }\n toDERHex() {\n return exports3.DER.hexFromSig({ r: this.r, s: this.s });\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return ut.hexToBytes(this.toCompactHex());\n }\n toCompactHex() {\n return numToNByteStr(this.r) + numToNByteStr(this.s);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n } catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size\n * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.\n */\n randomPrivateKey: () => {\n const length = mod3.getMinHashLength(CURVE.n);\n return mod3.mapHashToField(CURVE.randomBytes(length), CURVE.n);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point3.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3));\n return point;\n }\n };\n function getPublicKey(privateKey, isCompressed = true) {\n return Point3.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n function isProbPub(item) {\n const arr = item instanceof Uint8Array;\n const str = typeof item === \"string\";\n const len = (arr || str) && item.length;\n if (arr)\n return len === compressedLen || len === uncompressedLen;\n if (str)\n return len === 2 * compressedLen || len === 2 * uncompressedLen;\n if (item instanceof Point3)\n return true;\n return false;\n }\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA))\n throw new Error(\"first arg must be private key\");\n if (!isProbPub(publicB))\n throw new Error(\"second arg must be public key\");\n const b4 = Point3.fromHex(publicB);\n return b4.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n const bits2int = CURVE.bits2int || function(bytes) {\n const num2 = ut.bytesToNumberBE(bytes);\n const delta = bytes.length * 8 - CURVE.nBitLength;\n return delta > 0 ? num2 >> BigInt(delta) : num2;\n };\n const bits2int_modN = CURVE.bits2int_modN || function(bytes) {\n return modN2(bits2int(bytes));\n };\n const ORDER_MASK = ut.bitMask(CURVE.nBitLength);\n function int2octets(num2) {\n if (typeof num2 !== \"bigint\")\n throw new Error(\"bigint expected\");\n if (!(_0n11 <= num2 && num2 < ORDER_MASK))\n throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);\n return ut.numberToBytesBE(num2, CURVE.nByteLength);\n }\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if ([\"recovered\", \"canonical\"].some((k4) => k4 in opts))\n throw new Error(\"sign() legacy options not supported\");\n const { hash: hash3, randomBytes: randomBytes2 } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts;\n if (lowS == null)\n lowS = true;\n msgHash = (0, utils_js_1.ensureBytes)(\"msgHash\", msgHash);\n if (prehash)\n msgHash = (0, utils_js_1.ensureBytes)(\"prehashed msgHash\", hash3(msgHash));\n const h1int = bits2int_modN(msgHash);\n const d5 = normPrivateKeyToScalar(privateKey);\n const seedArgs = [int2octets(d5), int2octets(h1int)];\n if (ent != null) {\n const e2 = ent === true ? randomBytes2(Fp.BYTES) : ent;\n seedArgs.push((0, utils_js_1.ensureBytes)(\"extraEntropy\", e2));\n }\n const seed = ut.concatBytes(...seedArgs);\n const m2 = h1int;\n function k2sig(kBytes) {\n const k4 = bits2int(kBytes);\n if (!isWithinCurveOrder(k4))\n return;\n const ik = invN(k4);\n const q3 = Point3.BASE.multiply(k4).toAffine();\n const r2 = modN2(q3.x);\n if (r2 === _0n11)\n return;\n const s4 = modN2(ik * modN2(m2 + r2 * d5));\n if (s4 === _0n11)\n return;\n let recovery = (q3.x === r2 ? 0 : 2) | Number(q3.y & _1n11);\n let normS = s4;\n if (lowS && isBiggerThanHalfOrder(s4)) {\n normS = normalizeS(s4);\n recovery ^= 1;\n }\n return new Signature(r2, normS, recovery);\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n function sign4(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts);\n const C = CURVE;\n const drbg = ut.createHmacDrbg(C.hash.outputLen, C.nByteLength, C.hmac);\n return drbg(seed, k2sig);\n }\n Point3.BASE._setWindowSize(8);\n function verify2(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = (0, utils_js_1.ensureBytes)(\"msgHash\", msgHash);\n publicKey = (0, utils_js_1.ensureBytes)(\"publicKey\", publicKey);\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n const { lowS, prehash } = opts;\n let _sig = void 0;\n let P2;\n try {\n if (typeof sg === \"string\" || sg instanceof Uint8Array) {\n try {\n _sig = Signature.fromDER(sg);\n } catch (derError) {\n if (!(derError instanceof exports3.DER.Err))\n throw derError;\n _sig = Signature.fromCompact(sg);\n }\n } else if (typeof sg === \"object\" && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\") {\n const { r: r3, s: s5 } = sg;\n _sig = new Signature(r3, s5);\n } else {\n throw new Error(\"PARSE\");\n }\n P2 = Point3.fromHex(publicKey);\n } catch (error) {\n if (error.message === \"PARSE\")\n throw new Error(`signature must be Signature instance, Uint8Array or hex string`);\n return false;\n }\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r: r2, s: s4 } = _sig;\n const h4 = bits2int_modN(msgHash);\n const is = invN(s4);\n const u1 = modN2(h4 * is);\n const u2 = modN2(r2 * is);\n const R3 = Point3.BASE.multiplyAndAddUnsafe(P2, u1, u2)?.toAffine();\n if (!R3)\n return false;\n const v2 = modN2(R3.x);\n return v2 === r2;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign: sign4,\n verify: verify2,\n ProjectivePoint: Point3,\n Signature,\n utils\n };\n }\n exports3.weierstrass = weierstrass3;\n function SWUFpSqrtRatio2(Fp, Z2) {\n const q3 = Fp.ORDER;\n let l6 = _0n11;\n for (let o5 = q3 - _1n11; o5 % _2n8 === _0n11; o5 /= _2n8)\n l6 += _1n11;\n const c1 = l6;\n const _2n_pow_c1_1 = _2n8 << c1 - _1n11 - _1n11;\n const _2n_pow_c1 = _2n_pow_c1_1 * _2n8;\n const c22 = (q3 - _1n11) / _2n_pow_c1;\n const c32 = (c22 - _1n11) / _2n8;\n const c4 = _2n_pow_c1 - _1n11;\n const c5 = _2n_pow_c1_1;\n const c6 = Fp.pow(Z2, c22);\n const c7 = Fp.pow(Z2, (c22 + _1n11) / _2n8);\n let sqrtRatio = (u2, v2) => {\n let tv1 = c6;\n let tv2 = Fp.pow(v2, c4);\n let tv3 = Fp.sqr(tv2);\n tv3 = Fp.mul(tv3, v2);\n let tv5 = Fp.mul(u2, tv3);\n tv5 = Fp.pow(tv5, c32);\n tv5 = Fp.mul(tv5, tv2);\n tv2 = Fp.mul(tv5, v2);\n tv3 = Fp.mul(tv5, u2);\n let tv4 = Fp.mul(tv3, tv2);\n tv5 = Fp.pow(tv4, c5);\n let isQR = Fp.eql(tv5, Fp.ONE);\n tv2 = Fp.mul(tv3, c7);\n tv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, isQR);\n tv4 = Fp.cmov(tv5, tv4, isQR);\n for (let i3 = c1; i3 > _1n11; i3--) {\n let tv52 = i3 - _2n8;\n tv52 = _2n8 << tv52 - _1n11;\n let tvv5 = Fp.pow(tv4, tv52);\n const e1 = Fp.eql(tvv5, Fp.ONE);\n tv2 = Fp.mul(tv3, tv1);\n tv1 = Fp.mul(tv1, tv1);\n tvv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, e1);\n tv4 = Fp.cmov(tvv5, tv4, e1);\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n5 === _3n5) {\n const c12 = (Fp.ORDER - _3n5) / _4n5;\n const c23 = Fp.sqrt(Fp.neg(Z2));\n sqrtRatio = (u2, v2) => {\n let tv1 = Fp.sqr(v2);\n const tv2 = Fp.mul(u2, v2);\n tv1 = Fp.mul(tv1, tv2);\n let y1 = Fp.pow(tv1, c12);\n y1 = Fp.mul(y1, tv2);\n const y22 = Fp.mul(y1, c23);\n const tv3 = Fp.mul(Fp.sqr(y1), v2);\n const isQR = Fp.eql(tv3, u2);\n let y6 = Fp.cmov(y22, y1, isQR);\n return { isValid: isQR, value: y6 };\n };\n }\n return sqrtRatio;\n }\n exports3.SWUFpSqrtRatio = SWUFpSqrtRatio2;\n function mapToCurveSimpleSWU2(Fp, opts) {\n mod3.validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error(\"mapToCurveSimpleSWU: invalid opts\");\n const sqrtRatio = SWUFpSqrtRatio2(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error(\"Fp.isOdd is not implemented!\");\n return (u2) => {\n let tv1, tv2, tv3, tv4, tv5, tv6, x4, y6;\n tv1 = Fp.sqr(u2);\n tv1 = Fp.mul(tv1, opts.Z);\n tv2 = Fp.sqr(tv1);\n tv2 = Fp.add(tv2, tv1);\n tv3 = Fp.add(tv2, Fp.ONE);\n tv3 = Fp.mul(tv3, opts.B);\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO));\n tv4 = Fp.mul(tv4, opts.A);\n tv2 = Fp.sqr(tv3);\n tv6 = Fp.sqr(tv4);\n tv5 = Fp.mul(tv6, opts.A);\n tv2 = Fp.add(tv2, tv5);\n tv2 = Fp.mul(tv2, tv3);\n tv6 = Fp.mul(tv6, tv4);\n tv5 = Fp.mul(tv6, opts.B);\n tv2 = Fp.add(tv2, tv5);\n x4 = Fp.mul(tv1, tv3);\n const { isValid: isValid2, value } = sqrtRatio(tv2, tv6);\n y6 = Fp.mul(tv1, u2);\n y6 = Fp.mul(y6, value);\n x4 = Fp.cmov(x4, tv3, isValid2);\n y6 = Fp.cmov(y6, value, isValid2);\n const e1 = Fp.isOdd(u2) === Fp.isOdd(y6);\n y6 = Fp.cmov(Fp.neg(y6), y6, e1);\n x4 = Fp.div(x4, tv4);\n return { x: x4, y: y6 };\n };\n }\n exports3.mapToCurveSimpleSWU = mapToCurveSimpleSWU2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/hash-to-curve.js\n var require_hash_to_curve = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/abstract/hash-to-curve.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createHasher = exports3.isogenyMap = exports3.hash_to_field = exports3.expand_message_xof = exports3.expand_message_xmd = void 0;\n var modular_js_1 = require_modular();\n var utils_js_1 = require_utils15();\n function validateDST(dst) {\n if (dst instanceof Uint8Array)\n return dst;\n if (typeof dst === \"string\")\n return (0, utils_js_1.utf8ToBytes)(dst);\n throw new Error(\"DST must be Uint8Array or string\");\n }\n var os2ip2 = utils_js_1.bytesToNumberBE;\n function i2osp2(value, length) {\n if (value < 0 || value >= 1 << 8 * length) {\n throw new Error(`bad I2OSP call: value=${value} length=${length}`);\n }\n const res = Array.from({ length }).fill(0);\n for (let i3 = length - 1; i3 >= 0; i3--) {\n res[i3] = value & 255;\n value >>>= 8;\n }\n return new Uint8Array(res);\n }\n function strxor2(a3, b4) {\n const arr = new Uint8Array(a3.length);\n for (let i3 = 0; i3 < a3.length; i3++) {\n arr[i3] = a3[i3] ^ b4[i3];\n }\n return arr;\n }\n function isBytes5(item) {\n if (!(item instanceof Uint8Array))\n throw new Error(\"Uint8Array expected\");\n }\n function isNum(item) {\n if (!Number.isSafeInteger(item))\n throw new Error(\"number expected\");\n }\n function expand_message_xmd2(msg, DST, lenInBytes, H3) {\n isBytes5(msg);\n isBytes5(DST);\n isNum(lenInBytes);\n if (DST.length > 255)\n DST = H3((0, utils_js_1.concatBytes)((0, utils_js_1.utf8ToBytes)(\"H2C-OVERSIZE-DST-\"), DST));\n const { outputLen: b_in_bytes, blockLen: r_in_bytes } = H3;\n const ell = Math.ceil(lenInBytes / b_in_bytes);\n if (ell > 255)\n throw new Error(\"Invalid xmd length\");\n const DST_prime = (0, utils_js_1.concatBytes)(DST, i2osp2(DST.length, 1));\n const Z_pad = i2osp2(0, r_in_bytes);\n const l_i_b_str = i2osp2(lenInBytes, 2);\n const b4 = new Array(ell);\n const b_0 = H3((0, utils_js_1.concatBytes)(Z_pad, msg, l_i_b_str, i2osp2(0, 1), DST_prime));\n b4[0] = H3((0, utils_js_1.concatBytes)(b_0, i2osp2(1, 1), DST_prime));\n for (let i3 = 1; i3 <= ell; i3++) {\n const args = [strxor2(b_0, b4[i3 - 1]), i2osp2(i3 + 1, 1), DST_prime];\n b4[i3] = H3((0, utils_js_1.concatBytes)(...args));\n }\n const pseudo_random_bytes = (0, utils_js_1.concatBytes)(...b4);\n return pseudo_random_bytes.slice(0, lenInBytes);\n }\n exports3.expand_message_xmd = expand_message_xmd2;\n function expand_message_xof2(msg, DST, lenInBytes, k4, H3) {\n isBytes5(msg);\n isBytes5(DST);\n isNum(lenInBytes);\n if (DST.length > 255) {\n const dkLen = Math.ceil(2 * k4 / 8);\n DST = H3.create({ dkLen }).update((0, utils_js_1.utf8ToBytes)(\"H2C-OVERSIZE-DST-\")).update(DST).digest();\n }\n if (lenInBytes > 65535 || DST.length > 255)\n throw new Error(\"expand_message_xof: invalid lenInBytes\");\n return H3.create({ dkLen: lenInBytes }).update(msg).update(i2osp2(lenInBytes, 2)).update(DST).update(i2osp2(DST.length, 1)).digest();\n }\n exports3.expand_message_xof = expand_message_xof2;\n function hash_to_field2(msg, count, options) {\n (0, utils_js_1.validateObject)(options, {\n DST: \"stringOrUint8Array\",\n p: \"bigint\",\n m: \"isSafeInteger\",\n k: \"isSafeInteger\",\n hash: \"hash\"\n });\n const { p: p4, k: k4, m: m2, hash: hash3, expand, DST: _DST } = options;\n isBytes5(msg);\n isNum(count);\n const DST = validateDST(_DST);\n const log2p = p4.toString(2).length;\n const L2 = Math.ceil((log2p + k4) / 8);\n const len_in_bytes = count * m2 * L2;\n let prb;\n if (expand === \"xmd\") {\n prb = expand_message_xmd2(msg, DST, len_in_bytes, hash3);\n } else if (expand === \"xof\") {\n prb = expand_message_xof2(msg, DST, len_in_bytes, k4, hash3);\n } else if (expand === \"_internal_pass\") {\n prb = msg;\n } else {\n throw new Error('expand must be \"xmd\" or \"xof\"');\n }\n const u2 = new Array(count);\n for (let i3 = 0; i3 < count; i3++) {\n const e2 = new Array(m2);\n for (let j2 = 0; j2 < m2; j2++) {\n const elm_offset = L2 * (j2 + i3 * m2);\n const tv = prb.subarray(elm_offset, elm_offset + L2);\n e2[j2] = (0, modular_js_1.mod)(os2ip2(tv), p4);\n }\n u2[i3] = e2;\n }\n return u2;\n }\n exports3.hash_to_field = hash_to_field2;\n function isogenyMap2(field, map) {\n const COEFF = map.map((i3) => Array.from(i3).reverse());\n return (x4, y6) => {\n const [xNum, xDen, yNum, yDen] = COEFF.map((val) => val.reduce((acc, i3) => field.add(field.mul(acc, x4), i3)));\n x4 = field.div(xNum, xDen);\n y6 = field.mul(y6, field.div(yNum, yDen));\n return { x: x4, y: y6 };\n };\n }\n exports3.isogenyMap = isogenyMap2;\n function createHasher3(Point3, mapToCurve, def) {\n if (typeof mapToCurve !== \"function\")\n throw new Error(\"mapToCurve() must be defined\");\n return {\n // Encodes byte string to elliptic curve.\n // hash_to_curve from https://www.rfc-editor.org/rfc/rfc9380#section-3\n hashToCurve(msg, options) {\n const u2 = hash_to_field2(msg, 2, { ...def, DST: def.DST, ...options });\n const u0 = Point3.fromAffine(mapToCurve(u2[0]));\n const u1 = Point3.fromAffine(mapToCurve(u2[1]));\n const P2 = u0.add(u1).clearCofactor();\n P2.assertValidity();\n return P2;\n },\n // Encodes byte string to elliptic curve.\n // encode_to_curve from https://www.rfc-editor.org/rfc/rfc9380#section-3\n encodeToCurve(msg, options) {\n const u2 = hash_to_field2(msg, 1, { ...def, DST: def.encodeDST, ...options });\n const P2 = Point3.fromAffine(mapToCurve(u2[0])).clearCofactor();\n P2.assertValidity();\n return P2;\n }\n };\n }\n exports3.createHasher = createHasher3;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/_shortw_utils.js\n var require_shortw_utils = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/_shortw_utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.createCurve = exports3.getHash = void 0;\n var hmac_1 = require_hmac2();\n var utils_1 = require_utils14();\n var weierstrass_js_1 = require_weierstrass();\n function getHash2(hash3) {\n return {\n hash: hash3,\n hmac: (key, ...msgs) => (0, hmac_1.hmac)(hash3, key, (0, utils_1.concatBytes)(...msgs)),\n randomBytes: utils_1.randomBytes\n };\n }\n exports3.getHash = getHash2;\n function createCurve3(curveDef, defHash) {\n const create2 = (hash3) => (0, weierstrass_js_1.weierstrass)({ ...curveDef, ...getHash2(hash3) });\n return Object.freeze({ ...create2(defHash), create: create2 });\n }\n exports3.createCurve = createCurve3;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/secp256k1.js\n var require_secp256k12 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/secp256k1.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encodeToCurve = exports3.hashToCurve = exports3.schnorr = exports3.secp256k1 = void 0;\n var sha256_1 = require_sha256();\n var utils_1 = require_utils14();\n var modular_js_1 = require_modular();\n var weierstrass_js_1 = require_weierstrass();\n var utils_js_1 = require_utils15();\n var hash_to_curve_js_1 = require_hash_to_curve();\n var _shortw_utils_js_1 = require_shortw_utils();\n var secp256k1P2 = BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\");\n var secp256k1N2 = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n var divNearest3 = (a3, b4) => (a3 + b4 / _2n8) / b4;\n function sqrtMod3(y6) {\n const P2 = secp256k1P2;\n const _3n5 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b22 = y6 * y6 * y6 % P2;\n const b32 = b22 * b22 * y6 % P2;\n const b6 = (0, modular_js_1.pow2)(b32, _3n5, P2) * b32 % P2;\n const b9 = (0, modular_js_1.pow2)(b6, _3n5, P2) * b32 % P2;\n const b11 = (0, modular_js_1.pow2)(b9, _2n8, P2) * b22 % P2;\n const b222 = (0, modular_js_1.pow2)(b11, _11n, P2) * b11 % P2;\n const b44 = (0, modular_js_1.pow2)(b222, _22n, P2) * b222 % P2;\n const b88 = (0, modular_js_1.pow2)(b44, _44n, P2) * b44 % P2;\n const b176 = (0, modular_js_1.pow2)(b88, _88n, P2) * b88 % P2;\n const b220 = (0, modular_js_1.pow2)(b176, _44n, P2) * b44 % P2;\n const b223 = (0, modular_js_1.pow2)(b220, _3n5, P2) * b32 % P2;\n const t1 = (0, modular_js_1.pow2)(b223, _23n, P2) * b222 % P2;\n const t22 = (0, modular_js_1.pow2)(t1, _6n, P2) * b22 % P2;\n const root = (0, modular_js_1.pow2)(t22, _2n8, P2);\n if (!Fp.eql(Fp.sqr(root), y6))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n var Fp = (0, modular_js_1.Field)(secp256k1P2, void 0, void 0, { sqrt: sqrtMod3 });\n exports3.secp256k1 = (0, _shortw_utils_js_1.createCurve)({\n a: BigInt(0),\n b: BigInt(7),\n Fp,\n n: secp256k1N2,\n // Base point (x, y) aka generator point\n Gx: BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),\n Gy: BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),\n h: BigInt(1),\n lowS: true,\n /**\n * secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.\n * Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.\n * For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.\n * Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066\n */\n endo: {\n beta: BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),\n splitScalar: (k4) => {\n const n2 = secp256k1N2;\n const a1 = BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\");\n const b1 = -_1n11 * BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\");\n const a22 = BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\");\n const b22 = a1;\n const POW_2_128 = BigInt(\"0x100000000000000000000000000000000\");\n const c1 = divNearest3(b22 * k4, n2);\n const c22 = divNearest3(-b1 * k4, n2);\n let k1 = (0, modular_js_1.mod)(k4 - c1 * a1 - c22 * a22, n2);\n let k22 = (0, modular_js_1.mod)(-c1 * b1 - c22 * b22, n2);\n const k1neg = k1 > POW_2_128;\n const k2neg = k22 > POW_2_128;\n if (k1neg)\n k1 = n2 - k1;\n if (k2neg)\n k22 = n2 - k22;\n if (k1 > POW_2_128 || k22 > POW_2_128) {\n throw new Error(\"splitScalar: Endomorphism failed, k=\" + k4);\n }\n return { k1neg, k1, k2neg, k2: k22 };\n }\n }\n }, sha256_1.sha256);\n var _0n11 = BigInt(0);\n var fe = (x4) => typeof x4 === \"bigint\" && _0n11 < x4 && x4 < secp256k1P2;\n var ge = (x4) => typeof x4 === \"bigint\" && _0n11 < x4 && x4 < secp256k1N2;\n var TAGGED_HASH_PREFIXES2 = {};\n function taggedHash2(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES2[tag];\n if (tagP === void 0) {\n const tagH = (0, sha256_1.sha256)(Uint8Array.from(tag, (c4) => c4.charCodeAt(0)));\n tagP = (0, utils_js_1.concatBytes)(tagH, tagH);\n TAGGED_HASH_PREFIXES2[tag] = tagP;\n }\n return (0, sha256_1.sha256)((0, utils_js_1.concatBytes)(tagP, ...messages));\n }\n var pointToBytes2 = (point) => point.toRawBytes(true).slice(1);\n var numTo32b2 = (n2) => (0, utils_js_1.numberToBytesBE)(n2, 32);\n var modP2 = (x4) => (0, modular_js_1.mod)(x4, secp256k1P2);\n var modN2 = (x4) => (0, modular_js_1.mod)(x4, secp256k1N2);\n var Point3 = exports3.secp256k1.ProjectivePoint;\n var GmulAdd2 = (Q2, a3, b4) => Point3.BASE.multiplyAndAddUnsafe(Q2, a3, b4);\n function schnorrGetExtPubKey2(priv) {\n let d_ = exports3.secp256k1.utils.normPrivateKeyToScalar(priv);\n let p4 = Point3.fromPrivateKey(d_);\n const scalar = p4.hasEvenY() ? d_ : modN2(-d_);\n return { scalar, bytes: pointToBytes2(p4) };\n }\n function lift_x2(x4) {\n if (!fe(x4))\n throw new Error(\"bad x: need 0 < x < p\");\n const xx = modP2(x4 * x4);\n const c4 = modP2(xx * x4 + BigInt(7));\n let y6 = sqrtMod3(c4);\n if (y6 % _2n8 !== _0n11)\n y6 = modP2(-y6);\n const p4 = new Point3(x4, y6, _1n11);\n p4.assertValidity();\n return p4;\n }\n function challenge2(...args) {\n return modN2((0, utils_js_1.bytesToNumberBE)(taggedHash2(\"BIP0340/challenge\", ...args)));\n }\n function schnorrGetPublicKey2(privateKey) {\n return schnorrGetExtPubKey2(privateKey).bytes;\n }\n function schnorrSign2(message2, privateKey, auxRand = (0, utils_1.randomBytes)(32)) {\n const m2 = (0, utils_js_1.ensureBytes)(\"message\", message2);\n const { bytes: px, scalar: d5 } = schnorrGetExtPubKey2(privateKey);\n const a3 = (0, utils_js_1.ensureBytes)(\"auxRand\", auxRand, 32);\n const t3 = numTo32b2(d5 ^ (0, utils_js_1.bytesToNumberBE)(taggedHash2(\"BIP0340/aux\", a3)));\n const rand = taggedHash2(\"BIP0340/nonce\", t3, px, m2);\n const k_ = modN2((0, utils_js_1.bytesToNumberBE)(rand));\n if (k_ === _0n11)\n throw new Error(\"sign failed: k is zero\");\n const { bytes: rx, scalar: k4 } = schnorrGetExtPubKey2(k_);\n const e2 = challenge2(rx, px, m2);\n const sig = new Uint8Array(64);\n sig.set(rx, 0);\n sig.set(numTo32b2(modN2(k4 + e2 * d5)), 32);\n if (!schnorrVerify2(sig, m2, px))\n throw new Error(\"sign: Invalid signature produced\");\n return sig;\n }\n function schnorrVerify2(signature, message2, publicKey) {\n const sig = (0, utils_js_1.ensureBytes)(\"signature\", signature, 64);\n const m2 = (0, utils_js_1.ensureBytes)(\"message\", message2);\n const pub = (0, utils_js_1.ensureBytes)(\"publicKey\", publicKey, 32);\n try {\n const P2 = lift_x2((0, utils_js_1.bytesToNumberBE)(pub));\n const r2 = (0, utils_js_1.bytesToNumberBE)(sig.subarray(0, 32));\n if (!fe(r2))\n return false;\n const s4 = (0, utils_js_1.bytesToNumberBE)(sig.subarray(32, 64));\n if (!ge(s4))\n return false;\n const e2 = challenge2(numTo32b2(r2), pointToBytes2(P2), m2);\n const R3 = GmulAdd2(P2, s4, modN2(-e2));\n if (!R3 || !R3.hasEvenY() || R3.toAffine().x !== r2)\n return false;\n return true;\n } catch (error) {\n return false;\n }\n }\n exports3.schnorr = (() => ({\n getPublicKey: schnorrGetPublicKey2,\n sign: schnorrSign2,\n verify: schnorrVerify2,\n utils: {\n randomPrivateKey: exports3.secp256k1.utils.randomPrivateKey,\n lift_x: lift_x2,\n pointToBytes: pointToBytes2,\n numberToBytesBE: utils_js_1.numberToBytesBE,\n bytesToNumberBE: utils_js_1.bytesToNumberBE,\n taggedHash: taggedHash2,\n mod: modular_js_1.mod\n }\n }))();\n var isoMap2 = /* @__PURE__ */ (() => (0, hash_to_curve_js_1.isogenyMap)(Fp, [\n // xNum\n [\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7\",\n \"0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581\",\n \"0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262\",\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c\"\n ],\n // xDen\n [\n \"0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b\",\n \"0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ],\n // yNum\n [\n \"0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c\",\n \"0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3\",\n \"0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931\",\n \"0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84\"\n ],\n // yDen\n [\n \"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b\",\n \"0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573\",\n \"0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ]\n ].map((i3) => i3.map((j2) => BigInt(j2)))))();\n var mapSWU2 = /* @__PURE__ */ (() => (0, weierstrass_js_1.mapToCurveSimpleSWU)(Fp, {\n A: BigInt(\"0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533\"),\n B: BigInt(\"1771\"),\n Z: Fp.create(BigInt(\"-11\"))\n }))();\n var htf = /* @__PURE__ */ (() => (0, hash_to_curve_js_1.createHasher)(exports3.secp256k1.ProjectivePoint, (scalars) => {\n const { x: x4, y: y6 } = mapSWU2(Fp.create(scalars[0]));\n return isoMap2(x4, y6);\n }, {\n DST: \"secp256k1_XMD:SHA-256_SSWU_RO_\",\n encodeDST: \"secp256k1_XMD:SHA-256_SSWU_NU_\",\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: \"xmd\",\n hash: sha256_1.sha256\n }))();\n exports3.hashToCurve = (() => htf.hashToCurve)();\n exports3.encodeToCurve = (() => htf.encodeToCurve)();\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/addresses.js\n var require_addresses3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/addresses.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ZeroAddress = void 0;\n exports3.ZeroAddress = \"0x0000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/hashes.js\n var require_hashes2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/hashes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ZeroHash = void 0;\n exports3.ZeroHash = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/numbers.js\n var require_numbers = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/numbers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.N = void 0;\n exports3.N = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n exports3.WeiPerEther = BigInt(\"1000000000000000000\");\n exports3.MaxUint256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n exports3.MinInt256 = BigInt(\"0x8000000000000000000000000000000000000000000000000000000000000000\") * BigInt(-1);\n exports3.MaxInt256 = BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/strings.js\n var require_strings2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/strings.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.MessagePrefix = exports3.EtherSymbol = void 0;\n exports3.EtherSymbol = \"\\u039E\";\n exports3.MessagePrefix = \"\u0019Ethereum Signed Message:\\n\";\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/index.js\n var require_constants7 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/constants/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.MessagePrefix = exports3.EtherSymbol = exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.N = exports3.ZeroHash = exports3.ZeroAddress = void 0;\n var addresses_js_1 = require_addresses3();\n Object.defineProperty(exports3, \"ZeroAddress\", { enumerable: true, get: function() {\n return addresses_js_1.ZeroAddress;\n } });\n var hashes_js_1 = require_hashes2();\n Object.defineProperty(exports3, \"ZeroHash\", { enumerable: true, get: function() {\n return hashes_js_1.ZeroHash;\n } });\n var numbers_js_1 = require_numbers();\n Object.defineProperty(exports3, \"N\", { enumerable: true, get: function() {\n return numbers_js_1.N;\n } });\n Object.defineProperty(exports3, \"WeiPerEther\", { enumerable: true, get: function() {\n return numbers_js_1.WeiPerEther;\n } });\n Object.defineProperty(exports3, \"MaxUint256\", { enumerable: true, get: function() {\n return numbers_js_1.MaxUint256;\n } });\n Object.defineProperty(exports3, \"MinInt256\", { enumerable: true, get: function() {\n return numbers_js_1.MinInt256;\n } });\n Object.defineProperty(exports3, \"MaxInt256\", { enumerable: true, get: function() {\n return numbers_js_1.MaxInt256;\n } });\n var strings_js_1 = require_strings2();\n Object.defineProperty(exports3, \"EtherSymbol\", { enumerable: true, get: function() {\n return strings_js_1.EtherSymbol;\n } });\n Object.defineProperty(exports3, \"MessagePrefix\", { enumerable: true, get: function() {\n return strings_js_1.MessagePrefix;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/signature.js\n var require_signature3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/signature.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Signature = void 0;\n var index_js_1 = require_constants7();\n var index_js_2 = require_utils13();\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var BN_2 = BigInt(2);\n var BN_27 = BigInt(27);\n var BN_28 = BigInt(28);\n var BN_35 = BigInt(35);\n var _guard = {};\n function toUint256(value) {\n return (0, index_js_2.zeroPadValue)((0, index_js_2.toBeArray)(value), 32);\n }\n var Signature = class _Signature {\n #r;\n #s;\n #v;\n #networkV;\n /**\n * The ``r`` value for a signature.\n *\n * This represents the ``x`` coordinate of a \"reference\" or\n * challenge point, from which the ``y`` can be computed.\n */\n get r() {\n return this.#r;\n }\n set r(value) {\n (0, index_js_2.assertArgument)((0, index_js_2.dataLength)(value) === 32, \"invalid r\", \"value\", value);\n this.#r = (0, index_js_2.hexlify)(value);\n }\n /**\n * The ``s`` value for a signature.\n */\n get s() {\n (0, index_js_2.assertArgument)(parseInt(this.#s.substring(0, 3)) < 8, \"non-canonical s; use ._s\", \"s\", this.#s);\n return this.#s;\n }\n set s(_value) {\n (0, index_js_2.assertArgument)((0, index_js_2.dataLength)(_value) === 32, \"invalid s\", \"value\", _value);\n this.#s = (0, index_js_2.hexlify)(_value);\n }\n /**\n * Return the s value, unchecked for EIP-2 compliance.\n *\n * This should generally not be used and is for situations where\n * a non-canonical S value might be relevant, such as Frontier blocks\n * that were mined prior to EIP-2 or invalid Authorization List\n * signatures.\n */\n get _s() {\n return this.#s;\n }\n /**\n * Returns true if the Signature is valid for [[link-eip-2]] signatures.\n */\n isValid() {\n return parseInt(this.#s.substring(0, 3)) < 8;\n }\n /**\n * The ``v`` value for a signature.\n *\n * Since a given ``x`` value for ``r`` has two possible values for\n * its correspondin ``y``, the ``v`` indicates which of the two ``y``\n * values to use.\n *\n * It is normalized to the values ``27`` or ``28`` for legacy\n * purposes.\n */\n get v() {\n return this.#v;\n }\n set v(value) {\n const v2 = (0, index_js_2.getNumber)(value, \"value\");\n (0, index_js_2.assertArgument)(v2 === 27 || v2 === 28, \"invalid v\", \"v\", value);\n this.#v = v2;\n }\n /**\n * The EIP-155 ``v`` for legacy transactions. For non-legacy\n * transactions, this value is ``null``.\n */\n get networkV() {\n return this.#networkV;\n }\n /**\n * The chain ID for EIP-155 legacy transactions. For non-legacy\n * transactions, this value is ``null``.\n */\n get legacyChainId() {\n const v2 = this.networkV;\n if (v2 == null) {\n return null;\n }\n return _Signature.getChainId(v2);\n }\n /**\n * The ``yParity`` for the signature.\n *\n * See ``v`` for more details on how this value is used.\n */\n get yParity() {\n return this.v === 27 ? 0 : 1;\n }\n /**\n * The [[link-eip-2098]] compact representation of the ``yParity``\n * and ``s`` compacted into a single ``bytes32``.\n */\n get yParityAndS() {\n const yParityAndS = (0, index_js_2.getBytes)(this.s);\n if (this.yParity) {\n yParityAndS[0] |= 128;\n }\n return (0, index_js_2.hexlify)(yParityAndS);\n }\n /**\n * The [[link-eip-2098]] compact representation.\n */\n get compactSerialized() {\n return (0, index_js_2.concat)([this.r, this.yParityAndS]);\n }\n /**\n * The serialized representation.\n */\n get serialized() {\n return (0, index_js_2.concat)([this.r, this.s, this.yParity ? \"0x1c\" : \"0x1b\"]);\n }\n /**\n * @private\n */\n constructor(guard, r2, s4, v2) {\n (0, index_js_2.assertPrivate)(guard, _guard, \"Signature\");\n this.#r = r2;\n this.#s = s4;\n this.#v = v2;\n this.#networkV = null;\n }\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n return `Signature { r: \"${this.r}\", s: \"${this._s}\"${this.isValid() ? \"\" : ', valid: \"false\"'}, yParity: ${this.yParity}, networkV: ${this.networkV} }`;\n }\n /**\n * Returns a new identical [[Signature]].\n */\n clone() {\n const clone2 = new _Signature(_guard, this.r, this._s, this.v);\n if (this.networkV) {\n clone2.#networkV = this.networkV;\n }\n return clone2;\n }\n /**\n * Returns a representation that is compatible with ``JSON.stringify``.\n */\n toJSON() {\n const networkV = this.networkV;\n return {\n _type: \"signature\",\n networkV: networkV != null ? networkV.toString() : null,\n r: this.r,\n s: this._s,\n v: this.v\n };\n }\n /**\n * Compute the chain ID from the ``v`` in a legacy EIP-155 transactions.\n *\n * @example:\n * Signature.getChainId(45)\n * //_result:\n *\n * Signature.getChainId(46)\n * //_result:\n */\n static getChainId(v2) {\n const bv = (0, index_js_2.getBigInt)(v2, \"v\");\n if (bv == BN_27 || bv == BN_28) {\n return BN_0;\n }\n (0, index_js_2.assertArgument)(bv >= BN_35, \"invalid EIP-155 v\", \"v\", v2);\n return (bv - BN_35) / BN_2;\n }\n /**\n * Compute the ``v`` for a chain ID for a legacy EIP-155 transactions.\n *\n * Legacy transactions which use [[link-eip-155]] hijack the ``v``\n * property to include the chain ID.\n *\n * @example:\n * Signature.getChainIdV(5, 27)\n * //_result:\n *\n * Signature.getChainIdV(5, 28)\n * //_result:\n *\n */\n static getChainIdV(chainId, v2) {\n return (0, index_js_2.getBigInt)(chainId) * BN_2 + BigInt(35 + v2 - 27);\n }\n /**\n * Compute the normalized legacy transaction ``v`` from a ``yParirty``,\n * a legacy transaction ``v`` or a legacy [[link-eip-155]] transaction.\n *\n * @example:\n * // The values 0 and 1 imply v is actually yParity\n * Signature.getNormalizedV(0)\n * //_result:\n *\n * // Legacy non-EIP-1559 transaction (i.e. 27 or 28)\n * Signature.getNormalizedV(27)\n * //_result:\n *\n * // Legacy EIP-155 transaction (i.e. >= 35)\n * Signature.getNormalizedV(46)\n * //_result:\n *\n * // Invalid values throw\n * Signature.getNormalizedV(5)\n * //_error:\n */\n static getNormalizedV(v2) {\n const bv = (0, index_js_2.getBigInt)(v2);\n if (bv === BN_0 || bv === BN_27) {\n return 27;\n }\n if (bv === BN_1 || bv === BN_28) {\n return 28;\n }\n (0, index_js_2.assertArgument)(bv >= BN_35, \"invalid v\", \"v\", v2);\n return bv & BN_1 ? 27 : 28;\n }\n /**\n * Creates a new [[Signature]].\n *\n * If no %%sig%% is provided, a new [[Signature]] is created\n * with default values.\n *\n * If %%sig%% is a string, it is parsed.\n */\n static from(sig) {\n function assertError(check2, message2) {\n (0, index_js_2.assertArgument)(check2, message2, \"signature\", sig);\n }\n ;\n if (sig == null) {\n return new _Signature(_guard, index_js_1.ZeroHash, index_js_1.ZeroHash, 27);\n }\n if (typeof sig === \"string\") {\n const bytes = (0, index_js_2.getBytes)(sig, \"signature\");\n if (bytes.length === 64) {\n const r3 = (0, index_js_2.hexlify)(bytes.slice(0, 32));\n const s5 = bytes.slice(32, 64);\n const v6 = s5[0] & 128 ? 28 : 27;\n s5[0] &= 127;\n return new _Signature(_guard, r3, (0, index_js_2.hexlify)(s5), v6);\n }\n if (bytes.length === 65) {\n const r3 = (0, index_js_2.hexlify)(bytes.slice(0, 32));\n const s5 = (0, index_js_2.hexlify)(bytes.slice(32, 64));\n const v6 = _Signature.getNormalizedV(bytes[64]);\n return new _Signature(_guard, r3, s5, v6);\n }\n assertError(false, \"invalid raw signature length\");\n }\n if (sig instanceof _Signature) {\n return sig.clone();\n }\n const _r = sig.r;\n assertError(_r != null, \"missing r\");\n const r2 = toUint256(_r);\n const s4 = function(s5, yParityAndS) {\n if (s5 != null) {\n return toUint256(s5);\n }\n if (yParityAndS != null) {\n assertError((0, index_js_2.isHexString)(yParityAndS, 32), \"invalid yParityAndS\");\n const bytes = (0, index_js_2.getBytes)(yParityAndS);\n bytes[0] &= 127;\n return (0, index_js_2.hexlify)(bytes);\n }\n assertError(false, \"missing s\");\n }(sig.s, sig.yParityAndS);\n const { networkV, v: v2 } = function(_v, yParityAndS, yParity) {\n if (_v != null) {\n const v6 = (0, index_js_2.getBigInt)(_v);\n return {\n networkV: v6 >= BN_35 ? v6 : void 0,\n v: _Signature.getNormalizedV(v6)\n };\n }\n if (yParityAndS != null) {\n assertError((0, index_js_2.isHexString)(yParityAndS, 32), \"invalid yParityAndS\");\n return { v: (0, index_js_2.getBytes)(yParityAndS)[0] & 128 ? 28 : 27 };\n }\n if (yParity != null) {\n switch ((0, index_js_2.getNumber)(yParity, \"sig.yParity\")) {\n case 0:\n return { v: 27 };\n case 1:\n return { v: 28 };\n }\n assertError(false, \"invalid yParity\");\n }\n assertError(false, \"missing v\");\n }(sig.v, sig.yParityAndS, sig.yParity);\n const result = new _Signature(_guard, r2, s4, v2);\n if (networkV) {\n result.#networkV = networkV;\n }\n assertError(sig.yParity == null || (0, index_js_2.getNumber)(sig.yParity, \"sig.yParity\") === result.yParity, \"yParity mismatch\");\n assertError(sig.yParityAndS == null || sig.yParityAndS === result.yParityAndS, \"yParityAndS mismatch\");\n return result;\n }\n };\n exports3.Signature = Signature;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/signing-key.js\n var require_signing_key = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/signing-key.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SigningKey = void 0;\n var secp256k1_1 = require_secp256k12();\n var index_js_1 = require_utils13();\n var signature_js_1 = require_signature3();\n var SigningKey = class _SigningKey {\n #privateKey;\n /**\n * Creates a new **SigningKey** for %%privateKey%%.\n */\n constructor(privateKey) {\n (0, index_js_1.assertArgument)((0, index_js_1.dataLength)(privateKey) === 32, \"invalid private key\", \"privateKey\", \"[REDACTED]\");\n this.#privateKey = (0, index_js_1.hexlify)(privateKey);\n }\n /**\n * The private key.\n */\n get privateKey() {\n return this.#privateKey;\n }\n /**\n * The uncompressed public key.\n *\n * This will always begin with the prefix ``0x04`` and be 132\n * characters long (the ``0x`` prefix and 130 hexadecimal nibbles).\n */\n get publicKey() {\n return _SigningKey.computePublicKey(this.#privateKey);\n }\n /**\n * The compressed public key.\n *\n * This will always begin with either the prefix ``0x02`` or ``0x03``\n * and be 68 characters long (the ``0x`` prefix and 33 hexadecimal\n * nibbles)\n */\n get compressedPublicKey() {\n return _SigningKey.computePublicKey(this.#privateKey, true);\n }\n /**\n * Return the signature of the signed %%digest%%.\n */\n sign(digest2) {\n (0, index_js_1.assertArgument)((0, index_js_1.dataLength)(digest2) === 32, \"invalid digest length\", \"digest\", digest2);\n const sig = secp256k1_1.secp256k1.sign((0, index_js_1.getBytesCopy)(digest2), (0, index_js_1.getBytesCopy)(this.#privateKey), {\n lowS: true\n });\n return signature_js_1.Signature.from({\n r: (0, index_js_1.toBeHex)(sig.r, 32),\n s: (0, index_js_1.toBeHex)(sig.s, 32),\n v: sig.recovery ? 28 : 27\n });\n }\n /**\n * Returns the [[link-wiki-ecdh]] shared secret between this\n * private key and the %%other%% key.\n *\n * The %%other%% key may be any type of key, a raw public key,\n * a compressed/uncompressed pubic key or aprivate key.\n *\n * Best practice is usually to use a cryptographic hash on the\n * returned value before using it as a symetric secret.\n *\n * @example:\n * sign1 = new SigningKey(id(\"some-secret-1\"))\n * sign2 = new SigningKey(id(\"some-secret-2\"))\n *\n * // Notice that privA.computeSharedSecret(pubB)...\n * sign1.computeSharedSecret(sign2.publicKey)\n * //_result:\n *\n * // ...is equal to privB.computeSharedSecret(pubA).\n * sign2.computeSharedSecret(sign1.publicKey)\n * //_result:\n */\n computeSharedSecret(other) {\n const pubKey = _SigningKey.computePublicKey(other);\n return (0, index_js_1.hexlify)(secp256k1_1.secp256k1.getSharedSecret((0, index_js_1.getBytesCopy)(this.#privateKey), (0, index_js_1.getBytes)(pubKey), false));\n }\n /**\n * Compute the public key for %%key%%, optionally %%compressed%%.\n *\n * The %%key%% may be any type of key, a raw public key, a\n * compressed/uncompressed public key or private key.\n *\n * @example:\n * sign = new SigningKey(id(\"some-secret\"));\n *\n * // Compute the uncompressed public key for a private key\n * SigningKey.computePublicKey(sign.privateKey)\n * //_result:\n *\n * // Compute the compressed public key for a private key\n * SigningKey.computePublicKey(sign.privateKey, true)\n * //_result:\n *\n * // Compute the uncompressed public key\n * SigningKey.computePublicKey(sign.publicKey, false);\n * //_result:\n *\n * // Compute the Compressed a public key\n * SigningKey.computePublicKey(sign.publicKey, true);\n * //_result:\n */\n static computePublicKey(key, compressed) {\n let bytes = (0, index_js_1.getBytes)(key, \"key\");\n if (bytes.length === 32) {\n const pubKey = secp256k1_1.secp256k1.getPublicKey(bytes, !!compressed);\n return (0, index_js_1.hexlify)(pubKey);\n }\n if (bytes.length === 64) {\n const pub = new Uint8Array(65);\n pub[0] = 4;\n pub.set(bytes, 1);\n bytes = pub;\n }\n const point = secp256k1_1.secp256k1.ProjectivePoint.fromHex(bytes);\n return (0, index_js_1.hexlify)(point.toRawBytes(compressed));\n }\n /**\n * Returns the public key for the private key which produced the\n * %%signature%% for the given %%digest%%.\n *\n * @example:\n * key = new SigningKey(id(\"some-secret\"))\n * digest = id(\"hello world\")\n * sig = key.sign(digest)\n *\n * // Notice the signer public key...\n * key.publicKey\n * //_result:\n *\n * // ...is equal to the recovered public key\n * SigningKey.recoverPublicKey(digest, sig)\n * //_result:\n *\n */\n static recoverPublicKey(digest2, signature) {\n (0, index_js_1.assertArgument)((0, index_js_1.dataLength)(digest2) === 32, \"invalid digest length\", \"digest\", digest2);\n const sig = signature_js_1.Signature.from(signature);\n let secpSig = secp256k1_1.secp256k1.Signature.fromCompact((0, index_js_1.getBytesCopy)((0, index_js_1.concat)([sig.r, sig.s])));\n secpSig = secpSig.addRecoveryBit(sig.yParity);\n const pubKey = secpSig.recoverPublicKey((0, index_js_1.getBytesCopy)(digest2));\n (0, index_js_1.assertArgument)(pubKey != null, \"invalid signature for digest\", \"signature\", signature);\n return \"0x\" + pubKey.toHex(false);\n }\n /**\n * Returns the point resulting from adding the ellipic curve points\n * %%p0%% and %%p1%%.\n *\n * This is not a common function most developers should require, but\n * can be useful for certain privacy-specific techniques.\n *\n * For example, it is used by [[HDNodeWallet]] to compute child\n * addresses from parent public keys and chain codes.\n */\n static addPoints(p0, p1, compressed) {\n const pub0 = secp256k1_1.secp256k1.ProjectivePoint.fromHex(_SigningKey.computePublicKey(p0).substring(2));\n const pub1 = secp256k1_1.secp256k1.ProjectivePoint.fromHex(_SigningKey.computePublicKey(p1).substring(2));\n return \"0x\" + pub0.add(pub1).toHex(!!compressed);\n }\n };\n exports3.SigningKey = SigningKey;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/index.js\n var require_crypto2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/crypto/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.lock = exports3.Signature = exports3.SigningKey = exports3.scryptSync = exports3.scrypt = exports3.pbkdf2 = exports3.sha512 = exports3.sha256 = exports3.ripemd160 = exports3.keccak256 = exports3.randomBytes = exports3.computeHmac = void 0;\n var hmac_js_1 = require_hmac3();\n Object.defineProperty(exports3, \"computeHmac\", { enumerable: true, get: function() {\n return hmac_js_1.computeHmac;\n } });\n var keccak_js_1 = require_keccak();\n Object.defineProperty(exports3, \"keccak256\", { enumerable: true, get: function() {\n return keccak_js_1.keccak256;\n } });\n var ripemd160_js_1 = require_ripemd1602();\n Object.defineProperty(exports3, \"ripemd160\", { enumerable: true, get: function() {\n return ripemd160_js_1.ripemd160;\n } });\n var pbkdf2_js_1 = require_pbkdf22();\n Object.defineProperty(exports3, \"pbkdf2\", { enumerable: true, get: function() {\n return pbkdf2_js_1.pbkdf2;\n } });\n var random_js_1 = require_random();\n Object.defineProperty(exports3, \"randomBytes\", { enumerable: true, get: function() {\n return random_js_1.randomBytes;\n } });\n var scrypt_js_1 = require_scrypt3();\n Object.defineProperty(exports3, \"scrypt\", { enumerable: true, get: function() {\n return scrypt_js_1.scrypt;\n } });\n Object.defineProperty(exports3, \"scryptSync\", { enumerable: true, get: function() {\n return scrypt_js_1.scryptSync;\n } });\n var sha2_js_1 = require_sha22();\n Object.defineProperty(exports3, \"sha256\", { enumerable: true, get: function() {\n return sha2_js_1.sha256;\n } });\n Object.defineProperty(exports3, \"sha512\", { enumerable: true, get: function() {\n return sha2_js_1.sha512;\n } });\n var signing_key_js_1 = require_signing_key();\n Object.defineProperty(exports3, \"SigningKey\", { enumerable: true, get: function() {\n return signing_key_js_1.SigningKey;\n } });\n var signature_js_1 = require_signature3();\n Object.defineProperty(exports3, \"Signature\", { enumerable: true, get: function() {\n return signature_js_1.Signature;\n } });\n function lock() {\n hmac_js_1.computeHmac.lock();\n keccak_js_1.keccak256.lock();\n pbkdf2_js_1.pbkdf2.lock();\n random_js_1.randomBytes.lock();\n ripemd160_js_1.ripemd160.lock();\n scrypt_js_1.scrypt.lock();\n scrypt_js_1.scryptSync.lock();\n sha2_js_1.sha256.lock();\n sha2_js_1.sha512.lock();\n random_js_1.randomBytes.lock();\n }\n exports3.lock = lock;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/address.js\n var require_address2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getIcapAddress = exports3.getAddress = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils13();\n var BN_0 = BigInt(0);\n var BN_36 = BigInt(36);\n function getChecksumAddress(address) {\n address = address.toLowerCase();\n const chars = address.substring(2).split(\"\");\n const expanded = new Uint8Array(40);\n for (let i3 = 0; i3 < 40; i3++) {\n expanded[i3] = chars[i3].charCodeAt(0);\n }\n const hashed = (0, index_js_2.getBytes)((0, index_js_1.keccak256)(expanded));\n for (let i3 = 0; i3 < 40; i3 += 2) {\n if (hashed[i3 >> 1] >> 4 >= 8) {\n chars[i3] = chars[i3].toUpperCase();\n }\n if ((hashed[i3 >> 1] & 15) >= 8) {\n chars[i3 + 1] = chars[i3 + 1].toUpperCase();\n }\n }\n return \"0x\" + chars.join(\"\");\n }\n var ibanLookup = {};\n for (let i3 = 0; i3 < 10; i3++) {\n ibanLookup[String(i3)] = String(i3);\n }\n for (let i3 = 0; i3 < 26; i3++) {\n ibanLookup[String.fromCharCode(65 + i3)] = String(10 + i3);\n }\n var safeDigits = 15;\n function ibanChecksum(address) {\n address = address.toUpperCase();\n address = address.substring(4) + address.substring(0, 2) + \"00\";\n let expanded = address.split(\"\").map((c4) => {\n return ibanLookup[c4];\n }).join(\"\");\n while (expanded.length >= safeDigits) {\n let block = expanded.substring(0, safeDigits);\n expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);\n }\n let checksum4 = String(98 - parseInt(expanded, 10) % 97);\n while (checksum4.length < 2) {\n checksum4 = \"0\" + checksum4;\n }\n return checksum4;\n }\n var Base36 = function() {\n ;\n const result = {};\n for (let i3 = 0; i3 < 36; i3++) {\n const key = \"0123456789abcdefghijklmnopqrstuvwxyz\"[i3];\n result[key] = BigInt(i3);\n }\n return result;\n }();\n function fromBase36(value) {\n value = value.toLowerCase();\n let result = BN_0;\n for (let i3 = 0; i3 < value.length; i3++) {\n result = result * BN_36 + Base36[value[i3]];\n }\n return result;\n }\n function getAddress3(address) {\n (0, index_js_2.assertArgument)(typeof address === \"string\", \"invalid address\", \"address\", address);\n if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {\n if (!address.startsWith(\"0x\")) {\n address = \"0x\" + address;\n }\n const result = getChecksumAddress(address);\n (0, index_js_2.assertArgument)(!address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) || result === address, \"bad address checksum\", \"address\", address);\n return result;\n }\n if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {\n (0, index_js_2.assertArgument)(address.substring(2, 4) === ibanChecksum(address), \"bad icap checksum\", \"address\", address);\n let result = fromBase36(address.substring(4)).toString(16);\n while (result.length < 40) {\n result = \"0\" + result;\n }\n return getChecksumAddress(\"0x\" + result);\n }\n (0, index_js_2.assertArgument)(false, \"invalid address\", \"address\", address);\n }\n exports3.getAddress = getAddress3;\n function getIcapAddress(address) {\n let base36 = BigInt(getAddress3(address)).toString(36).toUpperCase();\n while (base36.length < 30) {\n base36 = \"0\" + base36;\n }\n return \"XE\" + ibanChecksum(\"XE00\" + base36) + base36;\n }\n exports3.getIcapAddress = getIcapAddress;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/contract-address.js\n var require_contract_address = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/contract-address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getCreate2Address = exports3.getCreateAddress = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils13();\n var address_js_1 = require_address2();\n function getCreateAddress2(tx) {\n const from14 = (0, address_js_1.getAddress)(tx.from);\n const nonce = (0, index_js_2.getBigInt)(tx.nonce, \"tx.nonce\");\n let nonceHex = nonce.toString(16);\n if (nonceHex === \"0\") {\n nonceHex = \"0x\";\n } else if (nonceHex.length % 2) {\n nonceHex = \"0x0\" + nonceHex;\n } else {\n nonceHex = \"0x\" + nonceHex;\n }\n return (0, address_js_1.getAddress)((0, index_js_2.dataSlice)((0, index_js_1.keccak256)((0, index_js_2.encodeRlp)([from14, nonceHex])), 12));\n }\n exports3.getCreateAddress = getCreateAddress2;\n function getCreate2Address2(_from, _salt, _initCodeHash) {\n const from14 = (0, address_js_1.getAddress)(_from);\n const salt = (0, index_js_2.getBytes)(_salt, \"salt\");\n const initCodeHash = (0, index_js_2.getBytes)(_initCodeHash, \"initCodeHash\");\n (0, index_js_2.assertArgument)(salt.length === 32, \"salt must be 32 bytes\", \"salt\", _salt);\n (0, index_js_2.assertArgument)(initCodeHash.length === 32, \"initCodeHash must be 32 bytes\", \"initCodeHash\", _initCodeHash);\n return (0, address_js_1.getAddress)((0, index_js_2.dataSlice)((0, index_js_1.keccak256)((0, index_js_2.concat)([\"0xff\", from14, salt, initCodeHash])), 12));\n }\n exports3.getCreate2Address = getCreate2Address2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/checks.js\n var require_checks = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/checks.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.resolveAddress = exports3.isAddress = exports3.isAddressable = void 0;\n var index_js_1 = require_utils13();\n var address_js_1 = require_address2();\n function isAddressable(value) {\n return value && typeof value.getAddress === \"function\";\n }\n exports3.isAddressable = isAddressable;\n function isAddress2(value) {\n try {\n (0, address_js_1.getAddress)(value);\n return true;\n } catch (error) {\n }\n return false;\n }\n exports3.isAddress = isAddress2;\n async function checkAddress(target, promise) {\n const result = await promise;\n if (result == null || result === \"0x0000000000000000000000000000000000000000\") {\n (0, index_js_1.assert)(typeof target !== \"string\", \"unconfigured name\", \"UNCONFIGURED_NAME\", { value: target });\n (0, index_js_1.assertArgument)(false, \"invalid AddressLike value; did not resolve to a value address\", \"target\", target);\n }\n return (0, address_js_1.getAddress)(result);\n }\n function resolveAddress(target, resolver) {\n if (typeof target === \"string\") {\n if (target.match(/^0x[0-9a-f]{40}$/i)) {\n return (0, address_js_1.getAddress)(target);\n }\n (0, index_js_1.assert)(resolver != null, \"ENS resolution requires a provider\", \"UNSUPPORTED_OPERATION\", { operation: \"resolveName\" });\n return checkAddress(target, resolver.resolveName(target));\n } else if (isAddressable(target)) {\n return checkAddress(target, target.getAddress());\n } else if (target && typeof target.then === \"function\") {\n return checkAddress(target, target);\n }\n (0, index_js_1.assertArgument)(false, \"unsupported addressable value\", \"target\", target);\n }\n exports3.resolveAddress = resolveAddress;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/index.js\n var require_address3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/address/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.resolveAddress = exports3.isAddress = exports3.isAddressable = exports3.getCreate2Address = exports3.getCreateAddress = exports3.getIcapAddress = exports3.getAddress = void 0;\n var address_js_1 = require_address2();\n Object.defineProperty(exports3, \"getAddress\", { enumerable: true, get: function() {\n return address_js_1.getAddress;\n } });\n Object.defineProperty(exports3, \"getIcapAddress\", { enumerable: true, get: function() {\n return address_js_1.getIcapAddress;\n } });\n var contract_address_js_1 = require_contract_address();\n Object.defineProperty(exports3, \"getCreateAddress\", { enumerable: true, get: function() {\n return contract_address_js_1.getCreateAddress;\n } });\n Object.defineProperty(exports3, \"getCreate2Address\", { enumerable: true, get: function() {\n return contract_address_js_1.getCreate2Address;\n } });\n var checks_js_1 = require_checks();\n Object.defineProperty(exports3, \"isAddressable\", { enumerable: true, get: function() {\n return checks_js_1.isAddressable;\n } });\n Object.defineProperty(exports3, \"isAddress\", { enumerable: true, get: function() {\n return checks_js_1.isAddress;\n } });\n Object.defineProperty(exports3, \"resolveAddress\", { enumerable: true, get: function() {\n return checks_js_1.resolveAddress;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/typed.js\n var require_typed = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/typed.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Typed = void 0;\n var index_js_1 = require_utils13();\n var _gaurd = {};\n function n2(value, width) {\n let signed = false;\n if (width < 0) {\n signed = true;\n width *= -1;\n }\n return new Typed(_gaurd, `${signed ? \"\" : \"u\"}int${width}`, value, { signed, width });\n }\n function b4(value, size6) {\n return new Typed(_gaurd, `bytes${size6 ? size6 : \"\"}`, value, { size: size6 });\n }\n var _typedSymbol = Symbol.for(\"_ethers_typed\");\n var Typed = class _Typed {\n /**\n * The type, as a Solidity-compatible type.\n */\n type;\n /**\n * The actual value.\n */\n value;\n #options;\n /**\n * @_ignore:\n */\n _typedSymbol;\n /**\n * @_ignore:\n */\n constructor(gaurd, type, value, options) {\n if (options == null) {\n options = null;\n }\n (0, index_js_1.assertPrivate)(_gaurd, gaurd, \"Typed\");\n (0, index_js_1.defineProperties)(this, { _typedSymbol, type, value });\n this.#options = options;\n this.format();\n }\n /**\n * Format the type as a Human-Readable type.\n */\n format() {\n if (this.type === \"array\") {\n throw new Error(\"\");\n } else if (this.type === \"dynamicArray\") {\n throw new Error(\"\");\n } else if (this.type === \"tuple\") {\n return `tuple(${this.value.map((v2) => v2.format()).join(\",\")})`;\n }\n return this.type;\n }\n /**\n * The default value returned by this type.\n */\n defaultValue() {\n return 0;\n }\n /**\n * The minimum value for numeric types.\n */\n minValue() {\n return 0;\n }\n /**\n * The maximum value for numeric types.\n */\n maxValue() {\n return 0;\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedBigInt]].\n */\n isBigInt() {\n return !!this.type.match(/^u?int[0-9]+$/);\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedData]].\n */\n isData() {\n return this.type.startsWith(\"bytes\");\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedString]].\n */\n isString() {\n return this.type === \"string\";\n }\n /**\n * Returns the tuple name, if this is a tuple. Throws otherwise.\n */\n get tupleName() {\n if (this.type !== \"tuple\") {\n throw TypeError(\"not a tuple\");\n }\n return this.#options;\n }\n // Returns the length of this type as an array\n // - `null` indicates the length is unforced, it could be dynamic\n // - `-1` indicates the length is dynamic\n // - any other value indicates it is a static array and is its length\n /**\n * Returns the length of the array type or ``-1`` if it is dynamic.\n *\n * Throws if the type is not an array.\n */\n get arrayLength() {\n if (this.type !== \"array\") {\n throw TypeError(\"not an array\");\n }\n if (this.#options === true) {\n return -1;\n }\n if (this.#options === false) {\n return this.value.length;\n }\n return null;\n }\n /**\n * Returns a new **Typed** of %%type%% with the %%value%%.\n */\n static from(type, value) {\n return new _Typed(_gaurd, type, value);\n }\n /**\n * Return a new ``uint8`` type for %%v%%.\n */\n static uint8(v2) {\n return n2(v2, 8);\n }\n /**\n * Return a new ``uint16`` type for %%v%%.\n */\n static uint16(v2) {\n return n2(v2, 16);\n }\n /**\n * Return a new ``uint24`` type for %%v%%.\n */\n static uint24(v2) {\n return n2(v2, 24);\n }\n /**\n * Return a new ``uint32`` type for %%v%%.\n */\n static uint32(v2) {\n return n2(v2, 32);\n }\n /**\n * Return a new ``uint40`` type for %%v%%.\n */\n static uint40(v2) {\n return n2(v2, 40);\n }\n /**\n * Return a new ``uint48`` type for %%v%%.\n */\n static uint48(v2) {\n return n2(v2, 48);\n }\n /**\n * Return a new ``uint56`` type for %%v%%.\n */\n static uint56(v2) {\n return n2(v2, 56);\n }\n /**\n * Return a new ``uint64`` type for %%v%%.\n */\n static uint64(v2) {\n return n2(v2, 64);\n }\n /**\n * Return a new ``uint72`` type for %%v%%.\n */\n static uint72(v2) {\n return n2(v2, 72);\n }\n /**\n * Return a new ``uint80`` type for %%v%%.\n */\n static uint80(v2) {\n return n2(v2, 80);\n }\n /**\n * Return a new ``uint88`` type for %%v%%.\n */\n static uint88(v2) {\n return n2(v2, 88);\n }\n /**\n * Return a new ``uint96`` type for %%v%%.\n */\n static uint96(v2) {\n return n2(v2, 96);\n }\n /**\n * Return a new ``uint104`` type for %%v%%.\n */\n static uint104(v2) {\n return n2(v2, 104);\n }\n /**\n * Return a new ``uint112`` type for %%v%%.\n */\n static uint112(v2) {\n return n2(v2, 112);\n }\n /**\n * Return a new ``uint120`` type for %%v%%.\n */\n static uint120(v2) {\n return n2(v2, 120);\n }\n /**\n * Return a new ``uint128`` type for %%v%%.\n */\n static uint128(v2) {\n return n2(v2, 128);\n }\n /**\n * Return a new ``uint136`` type for %%v%%.\n */\n static uint136(v2) {\n return n2(v2, 136);\n }\n /**\n * Return a new ``uint144`` type for %%v%%.\n */\n static uint144(v2) {\n return n2(v2, 144);\n }\n /**\n * Return a new ``uint152`` type for %%v%%.\n */\n static uint152(v2) {\n return n2(v2, 152);\n }\n /**\n * Return a new ``uint160`` type for %%v%%.\n */\n static uint160(v2) {\n return n2(v2, 160);\n }\n /**\n * Return a new ``uint168`` type for %%v%%.\n */\n static uint168(v2) {\n return n2(v2, 168);\n }\n /**\n * Return a new ``uint176`` type for %%v%%.\n */\n static uint176(v2) {\n return n2(v2, 176);\n }\n /**\n * Return a new ``uint184`` type for %%v%%.\n */\n static uint184(v2) {\n return n2(v2, 184);\n }\n /**\n * Return a new ``uint192`` type for %%v%%.\n */\n static uint192(v2) {\n return n2(v2, 192);\n }\n /**\n * Return a new ``uint200`` type for %%v%%.\n */\n static uint200(v2) {\n return n2(v2, 200);\n }\n /**\n * Return a new ``uint208`` type for %%v%%.\n */\n static uint208(v2) {\n return n2(v2, 208);\n }\n /**\n * Return a new ``uint216`` type for %%v%%.\n */\n static uint216(v2) {\n return n2(v2, 216);\n }\n /**\n * Return a new ``uint224`` type for %%v%%.\n */\n static uint224(v2) {\n return n2(v2, 224);\n }\n /**\n * Return a new ``uint232`` type for %%v%%.\n */\n static uint232(v2) {\n return n2(v2, 232);\n }\n /**\n * Return a new ``uint240`` type for %%v%%.\n */\n static uint240(v2) {\n return n2(v2, 240);\n }\n /**\n * Return a new ``uint248`` type for %%v%%.\n */\n static uint248(v2) {\n return n2(v2, 248);\n }\n /**\n * Return a new ``uint256`` type for %%v%%.\n */\n static uint256(v2) {\n return n2(v2, 256);\n }\n /**\n * Return a new ``uint256`` type for %%v%%.\n */\n static uint(v2) {\n return n2(v2, 256);\n }\n /**\n * Return a new ``int8`` type for %%v%%.\n */\n static int8(v2) {\n return n2(v2, -8);\n }\n /**\n * Return a new ``int16`` type for %%v%%.\n */\n static int16(v2) {\n return n2(v2, -16);\n }\n /**\n * Return a new ``int24`` type for %%v%%.\n */\n static int24(v2) {\n return n2(v2, -24);\n }\n /**\n * Return a new ``int32`` type for %%v%%.\n */\n static int32(v2) {\n return n2(v2, -32);\n }\n /**\n * Return a new ``int40`` type for %%v%%.\n */\n static int40(v2) {\n return n2(v2, -40);\n }\n /**\n * Return a new ``int48`` type for %%v%%.\n */\n static int48(v2) {\n return n2(v2, -48);\n }\n /**\n * Return a new ``int56`` type for %%v%%.\n */\n static int56(v2) {\n return n2(v2, -56);\n }\n /**\n * Return a new ``int64`` type for %%v%%.\n */\n static int64(v2) {\n return n2(v2, -64);\n }\n /**\n * Return a new ``int72`` type for %%v%%.\n */\n static int72(v2) {\n return n2(v2, -72);\n }\n /**\n * Return a new ``int80`` type for %%v%%.\n */\n static int80(v2) {\n return n2(v2, -80);\n }\n /**\n * Return a new ``int88`` type for %%v%%.\n */\n static int88(v2) {\n return n2(v2, -88);\n }\n /**\n * Return a new ``int96`` type for %%v%%.\n */\n static int96(v2) {\n return n2(v2, -96);\n }\n /**\n * Return a new ``int104`` type for %%v%%.\n */\n static int104(v2) {\n return n2(v2, -104);\n }\n /**\n * Return a new ``int112`` type for %%v%%.\n */\n static int112(v2) {\n return n2(v2, -112);\n }\n /**\n * Return a new ``int120`` type for %%v%%.\n */\n static int120(v2) {\n return n2(v2, -120);\n }\n /**\n * Return a new ``int128`` type for %%v%%.\n */\n static int128(v2) {\n return n2(v2, -128);\n }\n /**\n * Return a new ``int136`` type for %%v%%.\n */\n static int136(v2) {\n return n2(v2, -136);\n }\n /**\n * Return a new ``int144`` type for %%v%%.\n */\n static int144(v2) {\n return n2(v2, -144);\n }\n /**\n * Return a new ``int52`` type for %%v%%.\n */\n static int152(v2) {\n return n2(v2, -152);\n }\n /**\n * Return a new ``int160`` type for %%v%%.\n */\n static int160(v2) {\n return n2(v2, -160);\n }\n /**\n * Return a new ``int168`` type for %%v%%.\n */\n static int168(v2) {\n return n2(v2, -168);\n }\n /**\n * Return a new ``int176`` type for %%v%%.\n */\n static int176(v2) {\n return n2(v2, -176);\n }\n /**\n * Return a new ``int184`` type for %%v%%.\n */\n static int184(v2) {\n return n2(v2, -184);\n }\n /**\n * Return a new ``int92`` type for %%v%%.\n */\n static int192(v2) {\n return n2(v2, -192);\n }\n /**\n * Return a new ``int200`` type for %%v%%.\n */\n static int200(v2) {\n return n2(v2, -200);\n }\n /**\n * Return a new ``int208`` type for %%v%%.\n */\n static int208(v2) {\n return n2(v2, -208);\n }\n /**\n * Return a new ``int216`` type for %%v%%.\n */\n static int216(v2) {\n return n2(v2, -216);\n }\n /**\n * Return a new ``int224`` type for %%v%%.\n */\n static int224(v2) {\n return n2(v2, -224);\n }\n /**\n * Return a new ``int232`` type for %%v%%.\n */\n static int232(v2) {\n return n2(v2, -232);\n }\n /**\n * Return a new ``int240`` type for %%v%%.\n */\n static int240(v2) {\n return n2(v2, -240);\n }\n /**\n * Return a new ``int248`` type for %%v%%.\n */\n static int248(v2) {\n return n2(v2, -248);\n }\n /**\n * Return a new ``int256`` type for %%v%%.\n */\n static int256(v2) {\n return n2(v2, -256);\n }\n /**\n * Return a new ``int256`` type for %%v%%.\n */\n static int(v2) {\n return n2(v2, -256);\n }\n /**\n * Return a new ``bytes1`` type for %%v%%.\n */\n static bytes1(v2) {\n return b4(v2, 1);\n }\n /**\n * Return a new ``bytes2`` type for %%v%%.\n */\n static bytes2(v2) {\n return b4(v2, 2);\n }\n /**\n * Return a new ``bytes3`` type for %%v%%.\n */\n static bytes3(v2) {\n return b4(v2, 3);\n }\n /**\n * Return a new ``bytes4`` type for %%v%%.\n */\n static bytes4(v2) {\n return b4(v2, 4);\n }\n /**\n * Return a new ``bytes5`` type for %%v%%.\n */\n static bytes5(v2) {\n return b4(v2, 5);\n }\n /**\n * Return a new ``bytes6`` type for %%v%%.\n */\n static bytes6(v2) {\n return b4(v2, 6);\n }\n /**\n * Return a new ``bytes7`` type for %%v%%.\n */\n static bytes7(v2) {\n return b4(v2, 7);\n }\n /**\n * Return a new ``bytes8`` type for %%v%%.\n */\n static bytes8(v2) {\n return b4(v2, 8);\n }\n /**\n * Return a new ``bytes9`` type for %%v%%.\n */\n static bytes9(v2) {\n return b4(v2, 9);\n }\n /**\n * Return a new ``bytes10`` type for %%v%%.\n */\n static bytes10(v2) {\n return b4(v2, 10);\n }\n /**\n * Return a new ``bytes11`` type for %%v%%.\n */\n static bytes11(v2) {\n return b4(v2, 11);\n }\n /**\n * Return a new ``bytes12`` type for %%v%%.\n */\n static bytes12(v2) {\n return b4(v2, 12);\n }\n /**\n * Return a new ``bytes13`` type for %%v%%.\n */\n static bytes13(v2) {\n return b4(v2, 13);\n }\n /**\n * Return a new ``bytes14`` type for %%v%%.\n */\n static bytes14(v2) {\n return b4(v2, 14);\n }\n /**\n * Return a new ``bytes15`` type for %%v%%.\n */\n static bytes15(v2) {\n return b4(v2, 15);\n }\n /**\n * Return a new ``bytes16`` type for %%v%%.\n */\n static bytes16(v2) {\n return b4(v2, 16);\n }\n /**\n * Return a new ``bytes17`` type for %%v%%.\n */\n static bytes17(v2) {\n return b4(v2, 17);\n }\n /**\n * Return a new ``bytes18`` type for %%v%%.\n */\n static bytes18(v2) {\n return b4(v2, 18);\n }\n /**\n * Return a new ``bytes19`` type for %%v%%.\n */\n static bytes19(v2) {\n return b4(v2, 19);\n }\n /**\n * Return a new ``bytes20`` type for %%v%%.\n */\n static bytes20(v2) {\n return b4(v2, 20);\n }\n /**\n * Return a new ``bytes21`` type for %%v%%.\n */\n static bytes21(v2) {\n return b4(v2, 21);\n }\n /**\n * Return a new ``bytes22`` type for %%v%%.\n */\n static bytes22(v2) {\n return b4(v2, 22);\n }\n /**\n * Return a new ``bytes23`` type for %%v%%.\n */\n static bytes23(v2) {\n return b4(v2, 23);\n }\n /**\n * Return a new ``bytes24`` type for %%v%%.\n */\n static bytes24(v2) {\n return b4(v2, 24);\n }\n /**\n * Return a new ``bytes25`` type for %%v%%.\n */\n static bytes25(v2) {\n return b4(v2, 25);\n }\n /**\n * Return a new ``bytes26`` type for %%v%%.\n */\n static bytes26(v2) {\n return b4(v2, 26);\n }\n /**\n * Return a new ``bytes27`` type for %%v%%.\n */\n static bytes27(v2) {\n return b4(v2, 27);\n }\n /**\n * Return a new ``bytes28`` type for %%v%%.\n */\n static bytes28(v2) {\n return b4(v2, 28);\n }\n /**\n * Return a new ``bytes29`` type for %%v%%.\n */\n static bytes29(v2) {\n return b4(v2, 29);\n }\n /**\n * Return a new ``bytes30`` type for %%v%%.\n */\n static bytes30(v2) {\n return b4(v2, 30);\n }\n /**\n * Return a new ``bytes31`` type for %%v%%.\n */\n static bytes31(v2) {\n return b4(v2, 31);\n }\n /**\n * Return a new ``bytes32`` type for %%v%%.\n */\n static bytes32(v2) {\n return b4(v2, 32);\n }\n /**\n * Return a new ``address`` type for %%v%%.\n */\n static address(v2) {\n return new _Typed(_gaurd, \"address\", v2);\n }\n /**\n * Return a new ``bool`` type for %%v%%.\n */\n static bool(v2) {\n return new _Typed(_gaurd, \"bool\", !!v2);\n }\n /**\n * Return a new ``bytes`` type for %%v%%.\n */\n static bytes(v2) {\n return new _Typed(_gaurd, \"bytes\", v2);\n }\n /**\n * Return a new ``string`` type for %%v%%.\n */\n static string(v2) {\n return new _Typed(_gaurd, \"string\", v2);\n }\n /**\n * Return a new ``array`` type for %%v%%, allowing %%dynamic%% length.\n */\n static array(v2, dynamic) {\n throw new Error(\"not implemented yet\");\n return new _Typed(_gaurd, \"array\", v2, dynamic);\n }\n /**\n * Return a new ``tuple`` type for %%v%%, with the optional %%name%%.\n */\n static tuple(v2, name) {\n throw new Error(\"not implemented yet\");\n return new _Typed(_gaurd, \"tuple\", v2, name);\n }\n /**\n * Return a new ``uint8`` type for %%v%%.\n */\n static overrides(v2) {\n return new _Typed(_gaurd, \"overrides\", Object.assign({}, v2));\n }\n /**\n * Returns true only if %%value%% is a [[Typed]] instance.\n */\n static isTyped(value) {\n return value && typeof value === \"object\" && \"_typedSymbol\" in value && value._typedSymbol === _typedSymbol;\n }\n /**\n * If the value is a [[Typed]] instance, validates the underlying value\n * and returns it, otherwise returns value directly.\n *\n * This is useful for functions that with to accept either a [[Typed]]\n * object or values.\n */\n static dereference(value, type) {\n if (_Typed.isTyped(value)) {\n if (value.type !== type) {\n throw new Error(`invalid type: expecetd ${type}, got ${value.type}`);\n }\n return value.value;\n }\n return value;\n }\n };\n exports3.Typed = Typed;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/address.js\n var require_address4 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AddressCoder = void 0;\n var index_js_1 = require_address3();\n var maths_js_1 = require_maths();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var AddressCoder = class extends abstract_coder_js_1.Coder {\n constructor(localName) {\n super(\"address\", \"address\", localName, false);\n }\n defaultValue() {\n return \"0x0000000000000000000000000000000000000000\";\n }\n encode(writer, _value) {\n let value = typed_js_1.Typed.dereference(_value, \"string\");\n try {\n value = (0, index_js_1.getAddress)(value);\n } catch (error) {\n return this._throwError(error.message, _value);\n }\n return writer.writeValue(value);\n }\n decode(reader) {\n return (0, index_js_1.getAddress)((0, maths_js_1.toBeHex)(reader.readValue(), 20));\n }\n };\n exports3.AddressCoder = AddressCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/anonymous.js\n var require_anonymous2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/anonymous.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AnonymousCoder = void 0;\n var abstract_coder_js_1 = require_abstract_coder2();\n var AnonymousCoder = class extends abstract_coder_js_1.Coder {\n coder;\n constructor(coder) {\n super(coder.name, coder.type, \"_\", coder.dynamic);\n this.coder = coder;\n }\n defaultValue() {\n return this.coder.defaultValue();\n }\n encode(writer, value) {\n return this.coder.encode(writer, value);\n }\n decode(reader) {\n return this.coder.decode(reader);\n }\n };\n exports3.AnonymousCoder = AnonymousCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/array.js\n var require_array2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/array.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ArrayCoder = exports3.unpack = exports3.pack = void 0;\n var index_js_1 = require_utils13();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var anonymous_js_1 = require_anonymous2();\n function pack(writer, coders, values) {\n let arrayValues = [];\n if (Array.isArray(values)) {\n arrayValues = values;\n } else if (values && typeof values === \"object\") {\n let unique = {};\n arrayValues = coders.map((coder) => {\n const name = coder.localName;\n (0, index_js_1.assert)(name, \"cannot encode object for signature with missing names\", \"INVALID_ARGUMENT\", { argument: \"values\", info: { coder }, value: values });\n (0, index_js_1.assert)(!unique[name], \"cannot encode object for signature with duplicate names\", \"INVALID_ARGUMENT\", { argument: \"values\", info: { coder }, value: values });\n unique[name] = true;\n return values[name];\n });\n } else {\n (0, index_js_1.assertArgument)(false, \"invalid tuple value\", \"tuple\", values);\n }\n (0, index_js_1.assertArgument)(coders.length === arrayValues.length, \"types/value length mismatch\", \"tuple\", values);\n let staticWriter = new abstract_coder_js_1.Writer();\n let dynamicWriter = new abstract_coder_js_1.Writer();\n let updateFuncs = [];\n coders.forEach((coder, index2) => {\n let value = arrayValues[index2];\n if (coder.dynamic) {\n let dynamicOffset = dynamicWriter.length;\n coder.encode(dynamicWriter, value);\n let updateFunc = staticWriter.writeUpdatableValue();\n updateFuncs.push((baseOffset) => {\n updateFunc(baseOffset + dynamicOffset);\n });\n } else {\n coder.encode(staticWriter, value);\n }\n });\n updateFuncs.forEach((func) => {\n func(staticWriter.length);\n });\n let length = writer.appendWriter(staticWriter);\n length += writer.appendWriter(dynamicWriter);\n return length;\n }\n exports3.pack = pack;\n function unpack(reader, coders) {\n let values = [];\n let keys = [];\n let baseReader = reader.subReader(0);\n coders.forEach((coder) => {\n let value = null;\n if (coder.dynamic) {\n let offset = reader.readIndex();\n let offsetReader = baseReader.subReader(offset);\n try {\n value = coder.decode(offsetReader);\n } catch (error) {\n if ((0, index_js_1.isError)(error, \"BUFFER_OVERRUN\")) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n } else {\n try {\n value = coder.decode(reader);\n } catch (error) {\n if ((0, index_js_1.isError)(error, \"BUFFER_OVERRUN\")) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n }\n if (value == void 0) {\n throw new Error(\"investigate\");\n }\n values.push(value);\n keys.push(coder.localName || null);\n });\n return abstract_coder_js_1.Result.fromItems(values, keys);\n }\n exports3.unpack = unpack;\n var ArrayCoder = class extends abstract_coder_js_1.Coder {\n coder;\n length;\n constructor(coder, length, localName) {\n const type = coder.type + \"[\" + (length >= 0 ? length : \"\") + \"]\";\n const dynamic = length === -1 || coder.dynamic;\n super(\"array\", type, localName, dynamic);\n (0, index_js_1.defineProperties)(this, { coder, length });\n }\n defaultValue() {\n const defaultChild = this.coder.defaultValue();\n const result = [];\n for (let i3 = 0; i3 < this.length; i3++) {\n result.push(defaultChild);\n }\n return result;\n }\n encode(writer, _value) {\n const value = typed_js_1.Typed.dereference(_value, \"array\");\n if (!Array.isArray(value)) {\n this._throwError(\"expected array value\", value);\n }\n let count = this.length;\n if (count === -1) {\n count = value.length;\n writer.writeValue(value.length);\n }\n (0, index_js_1.assertArgumentCount)(value.length, count, \"coder array\" + (this.localName ? \" \" + this.localName : \"\"));\n let coders = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n coders.push(this.coder);\n }\n return pack(writer, coders, value);\n }\n decode(reader) {\n let count = this.length;\n if (count === -1) {\n count = reader.readIndex();\n (0, index_js_1.assert)(count * abstract_coder_js_1.WordSize <= reader.dataLength, \"insufficient data length\", \"BUFFER_OVERRUN\", { buffer: reader.bytes, offset: count * abstract_coder_js_1.WordSize, length: reader.dataLength });\n }\n let coders = [];\n for (let i3 = 0; i3 < count; i3++) {\n coders.push(new anonymous_js_1.AnonymousCoder(this.coder));\n }\n return unpack(reader, coders);\n }\n };\n exports3.ArrayCoder = ArrayCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/boolean.js\n var require_boolean2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/boolean.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BooleanCoder = void 0;\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var BooleanCoder = class extends abstract_coder_js_1.Coder {\n constructor(localName) {\n super(\"bool\", \"bool\", localName, false);\n }\n defaultValue() {\n return false;\n }\n encode(writer, _value) {\n const value = typed_js_1.Typed.dereference(_value, \"bool\");\n return writer.writeValue(value ? 1 : 0);\n }\n decode(reader) {\n return !!reader.readValue();\n }\n };\n exports3.BooleanCoder = BooleanCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/bytes.js\n var require_bytes2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/bytes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BytesCoder = exports3.DynamicBytesCoder = void 0;\n var index_js_1 = require_utils13();\n var abstract_coder_js_1 = require_abstract_coder2();\n var DynamicBytesCoder = class extends abstract_coder_js_1.Coder {\n constructor(type, localName) {\n super(type, type, localName, true);\n }\n defaultValue() {\n return \"0x\";\n }\n encode(writer, value) {\n value = (0, index_js_1.getBytesCopy)(value);\n let length = writer.writeValue(value.length);\n length += writer.writeBytes(value);\n return length;\n }\n decode(reader) {\n return reader.readBytes(reader.readIndex(), true);\n }\n };\n exports3.DynamicBytesCoder = DynamicBytesCoder;\n var BytesCoder = class extends DynamicBytesCoder {\n constructor(localName) {\n super(\"bytes\", localName);\n }\n decode(reader) {\n return (0, index_js_1.hexlify)(super.decode(reader));\n }\n };\n exports3.BytesCoder = BytesCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/fixed-bytes.js\n var require_fixed_bytes2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/fixed-bytes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FixedBytesCoder = void 0;\n var index_js_1 = require_utils13();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var FixedBytesCoder = class extends abstract_coder_js_1.Coder {\n size;\n constructor(size6, localName) {\n let name = \"bytes\" + String(size6);\n super(name, name, localName, false);\n (0, index_js_1.defineProperties)(this, { size: size6 }, { size: \"number\" });\n }\n defaultValue() {\n return \"0x0000000000000000000000000000000000000000000000000000000000000000\".substring(0, 2 + this.size * 2);\n }\n encode(writer, _value) {\n let data = (0, index_js_1.getBytesCopy)(typed_js_1.Typed.dereference(_value, this.type));\n if (data.length !== this.size) {\n this._throwError(\"incorrect data length\", _value);\n }\n return writer.writeBytes(data);\n }\n decode(reader) {\n return (0, index_js_1.hexlify)(reader.readBytes(this.size));\n }\n };\n exports3.FixedBytesCoder = FixedBytesCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/null.js\n var require_null2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/null.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NullCoder = void 0;\n var abstract_coder_js_1 = require_abstract_coder2();\n var Empty = new Uint8Array([]);\n var NullCoder = class extends abstract_coder_js_1.Coder {\n constructor(localName) {\n super(\"null\", \"\", localName, false);\n }\n defaultValue() {\n return null;\n }\n encode(writer, value) {\n if (value != null) {\n this._throwError(\"not null\", value);\n }\n return writer.writeBytes(Empty);\n }\n decode(reader) {\n reader.readBytes(0);\n return null;\n }\n };\n exports3.NullCoder = NullCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/number.js\n var require_number2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/number.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NumberCoder = void 0;\n var index_js_1 = require_utils13();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var BN_MAX_UINT256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n var NumberCoder = class extends abstract_coder_js_1.Coder {\n size;\n signed;\n constructor(size6, signed, localName) {\n const name = (signed ? \"int\" : \"uint\") + size6 * 8;\n super(name, name, localName, false);\n (0, index_js_1.defineProperties)(this, { size: size6, signed }, { size: \"number\", signed: \"boolean\" });\n }\n defaultValue() {\n return 0;\n }\n encode(writer, _value) {\n let value = (0, index_js_1.getBigInt)(typed_js_1.Typed.dereference(_value, this.type));\n let maxUintValue = (0, index_js_1.mask)(BN_MAX_UINT256, abstract_coder_js_1.WordSize * 8);\n if (this.signed) {\n let bounds = (0, index_js_1.mask)(maxUintValue, this.size * 8 - 1);\n if (value > bounds || value < -(bounds + BN_1)) {\n this._throwError(\"value out-of-bounds\", _value);\n }\n value = (0, index_js_1.toTwos)(value, 8 * abstract_coder_js_1.WordSize);\n } else if (value < BN_0 || value > (0, index_js_1.mask)(maxUintValue, this.size * 8)) {\n this._throwError(\"value out-of-bounds\", _value);\n }\n return writer.writeValue(value);\n }\n decode(reader) {\n let value = (0, index_js_1.mask)(reader.readValue(), this.size * 8);\n if (this.signed) {\n value = (0, index_js_1.fromTwos)(value, this.size * 8);\n }\n return value;\n }\n };\n exports3.NumberCoder = NumberCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/string.js\n var require_string2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/string.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.StringCoder = void 0;\n var utf8_js_1 = require_utf82();\n var typed_js_1 = require_typed();\n var bytes_js_1 = require_bytes2();\n var StringCoder = class extends bytes_js_1.DynamicBytesCoder {\n constructor(localName) {\n super(\"string\", localName);\n }\n defaultValue() {\n return \"\";\n }\n encode(writer, _value) {\n return super.encode(writer, (0, utf8_js_1.toUtf8Bytes)(typed_js_1.Typed.dereference(_value, \"string\")));\n }\n decode(reader) {\n return (0, utf8_js_1.toUtf8String)(super.decode(reader));\n }\n };\n exports3.StringCoder = StringCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/tuple.js\n var require_tuple2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/coders/tuple.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TupleCoder = void 0;\n var properties_js_1 = require_properties2();\n var typed_js_1 = require_typed();\n var abstract_coder_js_1 = require_abstract_coder2();\n var array_js_1 = require_array2();\n var TupleCoder = class extends abstract_coder_js_1.Coder {\n coders;\n constructor(coders, localName) {\n let dynamic = false;\n const types2 = [];\n coders.forEach((coder) => {\n if (coder.dynamic) {\n dynamic = true;\n }\n types2.push(coder.type);\n });\n const type = \"tuple(\" + types2.join(\",\") + \")\";\n super(\"tuple\", type, localName, dynamic);\n (0, properties_js_1.defineProperties)(this, { coders: Object.freeze(coders.slice()) });\n }\n defaultValue() {\n const values = [];\n this.coders.forEach((coder) => {\n values.push(coder.defaultValue());\n });\n const uniqueNames = this.coders.reduce((accum, coder) => {\n const name = coder.localName;\n if (name) {\n if (!accum[name]) {\n accum[name] = 0;\n }\n accum[name]++;\n }\n return accum;\n }, {});\n this.coders.forEach((coder, index2) => {\n let name = coder.localName;\n if (!name || uniqueNames[name] !== 1) {\n return;\n }\n if (name === \"length\") {\n name = \"_length\";\n }\n if (values[name] != null) {\n return;\n }\n values[name] = values[index2];\n });\n return Object.freeze(values);\n }\n encode(writer, _value) {\n const value = typed_js_1.Typed.dereference(_value, \"tuple\");\n return (0, array_js_1.pack)(writer, this.coders, value);\n }\n decode(reader) {\n return (0, array_js_1.unpack)(reader, this.coders);\n }\n };\n exports3.TupleCoder = TupleCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/accesslist.js\n var require_accesslist = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/accesslist.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.accessListify = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_utils13();\n function accessSetify(addr, storageKeys) {\n return {\n address: (0, index_js_1.getAddress)(addr),\n storageKeys: storageKeys.map((storageKey, index2) => {\n (0, index_js_2.assertArgument)((0, index_js_2.isHexString)(storageKey, 32), \"invalid slot\", `storageKeys[${index2}]`, storageKey);\n return storageKey.toLowerCase();\n })\n };\n }\n function accessListify(value) {\n if (Array.isArray(value)) {\n return value.map((set, index2) => {\n if (Array.isArray(set)) {\n (0, index_js_2.assertArgument)(set.length === 2, \"invalid slot set\", `value[${index2}]`, set);\n return accessSetify(set[0], set[1]);\n }\n (0, index_js_2.assertArgument)(set != null && typeof set === \"object\", \"invalid address-slot set\", \"value\", value);\n return accessSetify(set.address, set.storageKeys);\n });\n }\n (0, index_js_2.assertArgument)(value != null && typeof value === \"object\", \"invalid access list\", \"value\", value);\n const result = Object.keys(value).map((addr) => {\n const storageKeys = value[addr].reduce((accum, storageKey) => {\n accum[storageKey] = true;\n return accum;\n }, {});\n return accessSetify(addr, Object.keys(storageKeys).sort());\n });\n result.sort((a3, b4) => a3.address.localeCompare(b4.address));\n return result;\n }\n exports3.accessListify = accessListify;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/authorization.js\n var require_authorization = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/authorization.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.authorizationify = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_utils13();\n function authorizationify(auth) {\n return {\n address: (0, index_js_1.getAddress)(auth.address),\n nonce: (0, index_js_3.getBigInt)(auth.nonce != null ? auth.nonce : 0),\n chainId: (0, index_js_3.getBigInt)(auth.chainId != null ? auth.chainId : 0),\n signature: index_js_2.Signature.from(auth.signature)\n };\n }\n exports3.authorizationify = authorizationify;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/address.js\n var require_address5 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/address.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.recoverAddress = exports3.computeAddress = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n function computeAddress(key) {\n let pubkey;\n if (typeof key === \"string\") {\n pubkey = index_js_2.SigningKey.computePublicKey(key, false);\n } else {\n pubkey = key.publicKey;\n }\n return (0, index_js_1.getAddress)((0, index_js_2.keccak256)(\"0x\" + pubkey.substring(4)).substring(26));\n }\n exports3.computeAddress = computeAddress;\n function recoverAddress3(digest2, signature) {\n return computeAddress(index_js_2.SigningKey.recoverPublicKey(digest2, signature));\n }\n exports3.recoverAddress = recoverAddress3;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/transaction.js\n var require_transaction = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/transaction.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Transaction = void 0;\n var index_js_1 = require_address3();\n var addresses_js_1 = require_addresses3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_utils13();\n var accesslist_js_1 = require_accesslist();\n var authorization_js_1 = require_authorization();\n var address_js_1 = require_address5();\n var BN_0 = BigInt(0);\n var BN_2 = BigInt(2);\n var BN_27 = BigInt(27);\n var BN_28 = BigInt(28);\n var BN_35 = BigInt(35);\n var BN_MAX_UINT = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n var BLOB_SIZE = 4096 * 32;\n function getKzgLibrary(kzg) {\n const blobToKzgCommitment = (blob) => {\n if (\"computeBlobProof\" in kzg) {\n if (\"blobToKzgCommitment\" in kzg && typeof kzg.blobToKzgCommitment === \"function\") {\n return (0, index_js_3.getBytes)(kzg.blobToKzgCommitment((0, index_js_3.hexlify)(blob)));\n }\n } else if (\"blobToKzgCommitment\" in kzg && typeof kzg.blobToKzgCommitment === \"function\") {\n return (0, index_js_3.getBytes)(kzg.blobToKzgCommitment(blob));\n }\n if (\"blobToKZGCommitment\" in kzg && typeof kzg.blobToKZGCommitment === \"function\") {\n return (0, index_js_3.getBytes)(kzg.blobToKZGCommitment((0, index_js_3.hexlify)(blob)));\n }\n (0, index_js_3.assertArgument)(false, \"unsupported KZG library\", \"kzg\", kzg);\n };\n const computeBlobKzgProof = (blob, commitment) => {\n if (\"computeBlobProof\" in kzg && typeof kzg.computeBlobProof === \"function\") {\n return (0, index_js_3.getBytes)(kzg.computeBlobProof((0, index_js_3.hexlify)(blob), (0, index_js_3.hexlify)(commitment)));\n }\n if (\"computeBlobKzgProof\" in kzg && typeof kzg.computeBlobKzgProof === \"function\") {\n return kzg.computeBlobKzgProof(blob, commitment);\n }\n if (\"computeBlobKZGProof\" in kzg && typeof kzg.computeBlobKZGProof === \"function\") {\n return (0, index_js_3.getBytes)(kzg.computeBlobKZGProof((0, index_js_3.hexlify)(blob), (0, index_js_3.hexlify)(commitment)));\n }\n (0, index_js_3.assertArgument)(false, \"unsupported KZG library\", \"kzg\", kzg);\n };\n return { blobToKzgCommitment, computeBlobKzgProof };\n }\n function getVersionedHash(version7, hash3) {\n let versioned = version7.toString(16);\n while (versioned.length < 2) {\n versioned = \"0\" + versioned;\n }\n versioned += (0, index_js_2.sha256)(hash3).substring(4);\n return \"0x\" + versioned;\n }\n function handleAddress(value) {\n if (value === \"0x\") {\n return null;\n }\n return (0, index_js_1.getAddress)(value);\n }\n function handleAccessList(value, param) {\n try {\n return (0, accesslist_js_1.accessListify)(value);\n } catch (error) {\n (0, index_js_3.assertArgument)(false, error.message, param, value);\n }\n }\n function handleAuthorizationList(value, param) {\n try {\n if (!Array.isArray(value)) {\n throw new Error(\"authorizationList: invalid array\");\n }\n const result = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n const auth = value[i3];\n if (!Array.isArray(auth)) {\n throw new Error(`authorization[${i3}]: invalid array`);\n }\n if (auth.length !== 6) {\n throw new Error(`authorization[${i3}]: wrong length`);\n }\n if (!auth[1]) {\n throw new Error(`authorization[${i3}]: null address`);\n }\n result.push({\n address: handleAddress(auth[1]),\n nonce: handleUint(auth[2], \"nonce\"),\n chainId: handleUint(auth[0], \"chainId\"),\n signature: index_js_2.Signature.from({\n yParity: handleNumber(auth[3], \"yParity\"),\n r: (0, index_js_3.zeroPadValue)(auth[4], 32),\n s: (0, index_js_3.zeroPadValue)(auth[5], 32)\n })\n });\n }\n return result;\n } catch (error) {\n (0, index_js_3.assertArgument)(false, error.message, param, value);\n }\n }\n function handleNumber(_value, param) {\n if (_value === \"0x\") {\n return 0;\n }\n return (0, index_js_3.getNumber)(_value, param);\n }\n function handleUint(_value, param) {\n if (_value === \"0x\") {\n return BN_0;\n }\n const value = (0, index_js_3.getBigInt)(_value, param);\n (0, index_js_3.assertArgument)(value <= BN_MAX_UINT, \"value exceeds uint size\", param, value);\n return value;\n }\n function formatNumber(_value, name) {\n const value = (0, index_js_3.getBigInt)(_value, \"value\");\n const result = (0, index_js_3.toBeArray)(value);\n (0, index_js_3.assertArgument)(result.length <= 32, `value too large`, `tx.${name}`, value);\n return result;\n }\n function formatAccessList(value) {\n return (0, accesslist_js_1.accessListify)(value).map((set) => [set.address, set.storageKeys]);\n }\n function formatAuthorizationList3(value) {\n return value.map((a3) => {\n return [\n formatNumber(a3.chainId, \"chainId\"),\n a3.address,\n formatNumber(a3.nonce, \"nonce\"),\n formatNumber(a3.signature.yParity, \"yParity\"),\n (0, index_js_3.toBeArray)(a3.signature.r),\n (0, index_js_3.toBeArray)(a3.signature.s)\n ];\n });\n }\n function formatHashes(value, param) {\n (0, index_js_3.assertArgument)(Array.isArray(value), `invalid ${param}`, \"value\", value);\n for (let i3 = 0; i3 < value.length; i3++) {\n (0, index_js_3.assertArgument)((0, index_js_3.isHexString)(value[i3], 32), \"invalid ${ param } hash\", `value[${i3}]`, value[i3]);\n }\n return value;\n }\n function _parseLegacy(data) {\n const fields = (0, index_js_3.decodeRlp)(data);\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 9 || fields.length === 6), \"invalid field count for legacy transaction\", \"data\", data);\n const tx = {\n type: 0,\n nonce: handleNumber(fields[0], \"nonce\"),\n gasPrice: handleUint(fields[1], \"gasPrice\"),\n gasLimit: handleUint(fields[2], \"gasLimit\"),\n to: handleAddress(fields[3]),\n value: handleUint(fields[4], \"value\"),\n data: (0, index_js_3.hexlify)(fields[5]),\n chainId: BN_0\n };\n if (fields.length === 6) {\n return tx;\n }\n const v2 = handleUint(fields[6], \"v\");\n const r2 = handleUint(fields[7], \"r\");\n const s4 = handleUint(fields[8], \"s\");\n if (r2 === BN_0 && s4 === BN_0) {\n tx.chainId = v2;\n } else {\n let chainId = (v2 - BN_35) / BN_2;\n if (chainId < BN_0) {\n chainId = BN_0;\n }\n tx.chainId = chainId;\n (0, index_js_3.assertArgument)(chainId !== BN_0 || (v2 === BN_27 || v2 === BN_28), \"non-canonical legacy v\", \"v\", fields[6]);\n tx.signature = index_js_2.Signature.from({\n r: (0, index_js_3.zeroPadValue)(fields[7], 32),\n s: (0, index_js_3.zeroPadValue)(fields[8], 32),\n v: v2\n });\n }\n return tx;\n }\n function _serializeLegacy(tx, sig) {\n const fields = [\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.gasPrice || 0, \"gasPrice\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || \"0x\",\n formatNumber(tx.value, \"value\"),\n tx.data\n ];\n let chainId = BN_0;\n if (tx.chainId != BN_0) {\n chainId = (0, index_js_3.getBigInt)(tx.chainId, \"tx.chainId\");\n (0, index_js_3.assertArgument)(!sig || sig.networkV == null || sig.legacyChainId === chainId, \"tx.chainId/sig.v mismatch\", \"sig\", sig);\n } else if (tx.signature) {\n const legacy = tx.signature.legacyChainId;\n if (legacy != null) {\n chainId = legacy;\n }\n }\n if (!sig) {\n if (chainId !== BN_0) {\n fields.push((0, index_js_3.toBeArray)(chainId));\n fields.push(\"0x\");\n fields.push(\"0x\");\n }\n return (0, index_js_3.encodeRlp)(fields);\n }\n let v2 = BigInt(27 + sig.yParity);\n if (chainId !== BN_0) {\n v2 = index_js_2.Signature.getChainIdV(chainId, sig.v);\n } else if (BigInt(sig.v) !== v2) {\n (0, index_js_3.assertArgument)(false, \"tx.chainId/sig.v mismatch\", \"sig\", sig);\n }\n fields.push((0, index_js_3.toBeArray)(v2));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n return (0, index_js_3.encodeRlp)(fields);\n }\n function _parseEipSignature(tx, fields) {\n let yParity;\n try {\n yParity = handleNumber(fields[0], \"yParity\");\n if (yParity !== 0 && yParity !== 1) {\n throw new Error(\"bad yParity\");\n }\n } catch (error) {\n (0, index_js_3.assertArgument)(false, \"invalid yParity\", \"yParity\", fields[0]);\n }\n const r2 = (0, index_js_3.zeroPadValue)(fields[1], 32);\n const s4 = (0, index_js_3.zeroPadValue)(fields[2], 32);\n const signature = index_js_2.Signature.from({ r: r2, s: s4, yParity });\n tx.signature = signature;\n }\n function _parseEip1559(data) {\n const fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 9 || fields.length === 12), \"invalid field count for transaction type: 2\", \"data\", (0, index_js_3.hexlify)(data));\n const tx = {\n type: 2,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n maxPriorityFeePerGas: handleUint(fields[2], \"maxPriorityFeePerGas\"),\n maxFeePerGas: handleUint(fields[3], \"maxFeePerGas\"),\n gasPrice: null,\n gasLimit: handleUint(fields[4], \"gasLimit\"),\n to: handleAddress(fields[5]),\n value: handleUint(fields[6], \"value\"),\n data: (0, index_js_3.hexlify)(fields[7]),\n accessList: handleAccessList(fields[8], \"accessList\")\n };\n if (fields.length === 9) {\n return tx;\n }\n _parseEipSignature(tx, fields.slice(9));\n return tx;\n }\n function _serializeEip1559(tx, sig) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(tx.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || \"0x\",\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || [])\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"yParity\"));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n }\n return (0, index_js_3.concat)([\"0x02\", (0, index_js_3.encodeRlp)(fields)]);\n }\n function _parseEip2930(data) {\n const fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 8 || fields.length === 11), \"invalid field count for transaction type: 1\", \"data\", (0, index_js_3.hexlify)(data));\n const tx = {\n type: 1,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n gasPrice: handleUint(fields[2], \"gasPrice\"),\n gasLimit: handleUint(fields[3], \"gasLimit\"),\n to: handleAddress(fields[4]),\n value: handleUint(fields[5], \"value\"),\n data: (0, index_js_3.hexlify)(fields[6]),\n accessList: handleAccessList(fields[7], \"accessList\")\n };\n if (fields.length === 8) {\n return tx;\n }\n _parseEipSignature(tx, fields.slice(8));\n return tx;\n }\n function _serializeEip2930(tx, sig) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.gasPrice || 0, \"gasPrice\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || \"0x\",\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || [])\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"recoveryParam\"));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n }\n return (0, index_js_3.concat)([\"0x01\", (0, index_js_3.encodeRlp)(fields)]);\n }\n function _parseEip4844(data) {\n let fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));\n let typeName = \"3\";\n let blobs = null;\n if (fields.length === 4 && Array.isArray(fields[0])) {\n typeName = \"3 (network format)\";\n const fBlobs = fields[1], fCommits = fields[2], fProofs = fields[3];\n (0, index_js_3.assertArgument)(Array.isArray(fBlobs), \"invalid network format: blobs not an array\", \"fields[1]\", fBlobs);\n (0, index_js_3.assertArgument)(Array.isArray(fCommits), \"invalid network format: commitments not an array\", \"fields[2]\", fCommits);\n (0, index_js_3.assertArgument)(Array.isArray(fProofs), \"invalid network format: proofs not an array\", \"fields[3]\", fProofs);\n (0, index_js_3.assertArgument)(fBlobs.length === fCommits.length, \"invalid network format: blobs/commitments length mismatch\", \"fields\", fields);\n (0, index_js_3.assertArgument)(fBlobs.length === fProofs.length, \"invalid network format: blobs/proofs length mismatch\", \"fields\", fields);\n blobs = [];\n for (let i3 = 0; i3 < fields[1].length; i3++) {\n blobs.push({\n data: fBlobs[i3],\n commitment: fCommits[i3],\n proof: fProofs[i3]\n });\n }\n fields = fields[0];\n }\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 11 || fields.length === 14), `invalid field count for transaction type: ${typeName}`, \"data\", (0, index_js_3.hexlify)(data));\n const tx = {\n type: 3,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n maxPriorityFeePerGas: handleUint(fields[2], \"maxPriorityFeePerGas\"),\n maxFeePerGas: handleUint(fields[3], \"maxFeePerGas\"),\n gasPrice: null,\n gasLimit: handleUint(fields[4], \"gasLimit\"),\n to: handleAddress(fields[5]),\n value: handleUint(fields[6], \"value\"),\n data: (0, index_js_3.hexlify)(fields[7]),\n accessList: handleAccessList(fields[8], \"accessList\"),\n maxFeePerBlobGas: handleUint(fields[9], \"maxFeePerBlobGas\"),\n blobVersionedHashes: fields[10]\n };\n if (blobs) {\n tx.blobs = blobs;\n }\n (0, index_js_3.assertArgument)(tx.to != null, `invalid address for transaction type: ${typeName}`, \"data\", data);\n (0, index_js_3.assertArgument)(Array.isArray(tx.blobVersionedHashes), \"invalid blobVersionedHashes: must be an array\", \"data\", data);\n for (let i3 = 0; i3 < tx.blobVersionedHashes.length; i3++) {\n (0, index_js_3.assertArgument)((0, index_js_3.isHexString)(tx.blobVersionedHashes[i3], 32), `invalid blobVersionedHash at index ${i3}: must be length 32`, \"data\", data);\n }\n if (fields.length === 11) {\n return tx;\n }\n _parseEipSignature(tx, fields.slice(11));\n return tx;\n }\n function _serializeEip4844(tx, sig, blobs) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(tx.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || addresses_js_1.ZeroAddress,\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || []),\n formatNumber(tx.maxFeePerBlobGas || 0, \"maxFeePerBlobGas\"),\n formatHashes(tx.blobVersionedHashes || [], \"blobVersionedHashes\")\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"yParity\"));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n if (blobs) {\n return (0, index_js_3.concat)([\n \"0x03\",\n (0, index_js_3.encodeRlp)([\n fields,\n blobs.map((b4) => b4.data),\n blobs.map((b4) => b4.commitment),\n blobs.map((b4) => b4.proof)\n ])\n ]);\n }\n }\n return (0, index_js_3.concat)([\"0x03\", (0, index_js_3.encodeRlp)(fields)]);\n }\n function _parseEip7702(data) {\n const fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));\n (0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 10 || fields.length === 13), \"invalid field count for transaction type: 4\", \"data\", (0, index_js_3.hexlify)(data));\n const tx = {\n type: 4,\n chainId: handleUint(fields[0], \"chainId\"),\n nonce: handleNumber(fields[1], \"nonce\"),\n maxPriorityFeePerGas: handleUint(fields[2], \"maxPriorityFeePerGas\"),\n maxFeePerGas: handleUint(fields[3], \"maxFeePerGas\"),\n gasPrice: null,\n gasLimit: handleUint(fields[4], \"gasLimit\"),\n to: handleAddress(fields[5]),\n value: handleUint(fields[6], \"value\"),\n data: (0, index_js_3.hexlify)(fields[7]),\n accessList: handleAccessList(fields[8], \"accessList\"),\n authorizationList: handleAuthorizationList(fields[9], \"authorizationList\")\n };\n if (fields.length === 10) {\n return tx;\n }\n _parseEipSignature(tx, fields.slice(10));\n return tx;\n }\n function _serializeEip7702(tx, sig) {\n const fields = [\n formatNumber(tx.chainId, \"chainId\"),\n formatNumber(tx.nonce, \"nonce\"),\n formatNumber(tx.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(tx.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(tx.gasLimit, \"gasLimit\"),\n tx.to || \"0x\",\n formatNumber(tx.value, \"value\"),\n tx.data,\n formatAccessList(tx.accessList || []),\n formatAuthorizationList3(tx.authorizationList || [])\n ];\n if (sig) {\n fields.push(formatNumber(sig.yParity, \"yParity\"));\n fields.push((0, index_js_3.toBeArray)(sig.r));\n fields.push((0, index_js_3.toBeArray)(sig.s));\n }\n return (0, index_js_3.concat)([\"0x04\", (0, index_js_3.encodeRlp)(fields)]);\n }\n var Transaction5 = class _Transaction {\n #type;\n #to;\n #data;\n #nonce;\n #gasLimit;\n #gasPrice;\n #maxPriorityFeePerGas;\n #maxFeePerGas;\n #value;\n #chainId;\n #sig;\n #accessList;\n #maxFeePerBlobGas;\n #blobVersionedHashes;\n #kzg;\n #blobs;\n #auths;\n /**\n * The transaction type.\n *\n * If null, the type will be automatically inferred based on\n * explicit properties.\n */\n get type() {\n return this.#type;\n }\n set type(value) {\n switch (value) {\n case null:\n this.#type = null;\n break;\n case 0:\n case \"legacy\":\n this.#type = 0;\n break;\n case 1:\n case \"berlin\":\n case \"eip-2930\":\n this.#type = 1;\n break;\n case 2:\n case \"london\":\n case \"eip-1559\":\n this.#type = 2;\n break;\n case 3:\n case \"cancun\":\n case \"eip-4844\":\n this.#type = 3;\n break;\n case 4:\n case \"pectra\":\n case \"eip-7702\":\n this.#type = 4;\n break;\n default:\n (0, index_js_3.assertArgument)(false, \"unsupported transaction type\", \"type\", value);\n }\n }\n /**\n * The name of the transaction type.\n */\n get typeName() {\n switch (this.type) {\n case 0:\n return \"legacy\";\n case 1:\n return \"eip-2930\";\n case 2:\n return \"eip-1559\";\n case 3:\n return \"eip-4844\";\n case 4:\n return \"eip-7702\";\n }\n return null;\n }\n /**\n * The ``to`` address for the transaction or ``null`` if the\n * transaction is an ``init`` transaction.\n */\n get to() {\n const value = this.#to;\n if (value == null && this.type === 3) {\n return addresses_js_1.ZeroAddress;\n }\n return value;\n }\n set to(value) {\n this.#to = value == null ? null : (0, index_js_1.getAddress)(value);\n }\n /**\n * The transaction nonce.\n */\n get nonce() {\n return this.#nonce;\n }\n set nonce(value) {\n this.#nonce = (0, index_js_3.getNumber)(value, \"value\");\n }\n /**\n * The gas limit.\n */\n get gasLimit() {\n return this.#gasLimit;\n }\n set gasLimit(value) {\n this.#gasLimit = (0, index_js_3.getBigInt)(value);\n }\n /**\n * The gas price.\n *\n * On legacy networks this defines the fee that will be paid. On\n * EIP-1559 networks, this should be ``null``.\n */\n get gasPrice() {\n const value = this.#gasPrice;\n if (value == null && (this.type === 0 || this.type === 1)) {\n return BN_0;\n }\n return value;\n }\n set gasPrice(value) {\n this.#gasPrice = value == null ? null : (0, index_js_3.getBigInt)(value, \"gasPrice\");\n }\n /**\n * The maximum priority fee per unit of gas to pay. On legacy\n * networks this should be ``null``.\n */\n get maxPriorityFeePerGas() {\n const value = this.#maxPriorityFeePerGas;\n if (value == null) {\n if (this.type === 2 || this.type === 3) {\n return BN_0;\n }\n return null;\n }\n return value;\n }\n set maxPriorityFeePerGas(value) {\n this.#maxPriorityFeePerGas = value == null ? null : (0, index_js_3.getBigInt)(value, \"maxPriorityFeePerGas\");\n }\n /**\n * The maximum total fee per unit of gas to pay. On legacy\n * networks this should be ``null``.\n */\n get maxFeePerGas() {\n const value = this.#maxFeePerGas;\n if (value == null) {\n if (this.type === 2 || this.type === 3) {\n return BN_0;\n }\n return null;\n }\n return value;\n }\n set maxFeePerGas(value) {\n this.#maxFeePerGas = value == null ? null : (0, index_js_3.getBigInt)(value, \"maxFeePerGas\");\n }\n /**\n * The transaction data. For ``init`` transactions this is the\n * deployment code.\n */\n get data() {\n return this.#data;\n }\n set data(value) {\n this.#data = (0, index_js_3.hexlify)(value);\n }\n /**\n * The amount of ether (in wei) to send in this transactions.\n */\n get value() {\n return this.#value;\n }\n set value(value) {\n this.#value = (0, index_js_3.getBigInt)(value, \"value\");\n }\n /**\n * The chain ID this transaction is valid on.\n */\n get chainId() {\n return this.#chainId;\n }\n set chainId(value) {\n this.#chainId = (0, index_js_3.getBigInt)(value);\n }\n /**\n * If signed, the signature for this transaction.\n */\n get signature() {\n return this.#sig || null;\n }\n set signature(value) {\n this.#sig = value == null ? null : index_js_2.Signature.from(value);\n }\n /**\n * The access list.\n *\n * An access list permits discounted (but pre-paid) access to\n * bytecode and state variable access within contract execution.\n */\n get accessList() {\n const value = this.#accessList || null;\n if (value == null) {\n if (this.type === 1 || this.type === 2 || this.type === 3) {\n return [];\n }\n return null;\n }\n return value;\n }\n set accessList(value) {\n this.#accessList = value == null ? null : (0, accesslist_js_1.accessListify)(value);\n }\n get authorizationList() {\n const value = this.#auths || null;\n if (value == null) {\n if (this.type === 4) {\n return [];\n }\n }\n return value;\n }\n set authorizationList(auths) {\n this.#auths = auths == null ? null : auths.map((a3) => (0, authorization_js_1.authorizationify)(a3));\n }\n /**\n * The max fee per blob gas for Cancun transactions.\n */\n get maxFeePerBlobGas() {\n const value = this.#maxFeePerBlobGas;\n if (value == null && this.type === 3) {\n return BN_0;\n }\n return value;\n }\n set maxFeePerBlobGas(value) {\n this.#maxFeePerBlobGas = value == null ? null : (0, index_js_3.getBigInt)(value, \"maxFeePerBlobGas\");\n }\n /**\n * The BLOb versioned hashes for Cancun transactions.\n */\n get blobVersionedHashes() {\n let value = this.#blobVersionedHashes;\n if (value == null && this.type === 3) {\n return [];\n }\n return value;\n }\n set blobVersionedHashes(value) {\n if (value != null) {\n (0, index_js_3.assertArgument)(Array.isArray(value), \"blobVersionedHashes must be an Array\", \"value\", value);\n value = value.slice();\n for (let i3 = 0; i3 < value.length; i3++) {\n (0, index_js_3.assertArgument)((0, index_js_3.isHexString)(value[i3], 32), \"invalid blobVersionedHash\", `value[${i3}]`, value[i3]);\n }\n }\n this.#blobVersionedHashes = value;\n }\n /**\n * The BLObs for the Transaction, if any.\n *\n * If ``blobs`` is non-``null``, then the [[seriailized]]\n * will return the network formatted sidecar, otherwise it\n * will return the standard [[link-eip-2718]] payload. The\n * [[unsignedSerialized]] is unaffected regardless.\n *\n * When setting ``blobs``, either fully valid [[Blob]] objects\n * may be specified (i.e. correctly padded, with correct\n * committments and proofs) or a raw [[BytesLike]] may\n * be provided.\n *\n * If raw [[BytesLike]] are provided, the [[kzg]] property **must**\n * be already set. The blob will be correctly padded and the\n * [[KzgLibrary]] will be used to compute the committment and\n * proof for the blob.\n *\n * A BLOb is a sequence of field elements, each of which must\n * be within the BLS field modulo, so some additional processing\n * may be required to encode arbitrary data to ensure each 32 byte\n * field is within the valid range.\n *\n * Setting this automatically populates [[blobVersionedHashes]],\n * overwriting any existing values. Setting this to ``null``\n * does **not** remove the [[blobVersionedHashes]], leaving them\n * present.\n */\n get blobs() {\n if (this.#blobs == null) {\n return null;\n }\n return this.#blobs.map((b4) => Object.assign({}, b4));\n }\n set blobs(_blobs) {\n if (_blobs == null) {\n this.#blobs = null;\n return;\n }\n const blobs = [];\n const versionedHashes = [];\n for (let i3 = 0; i3 < _blobs.length; i3++) {\n const blob = _blobs[i3];\n if ((0, index_js_3.isBytesLike)(blob)) {\n (0, index_js_3.assert)(this.#kzg, \"adding a raw blob requires a KZG library\", \"UNSUPPORTED_OPERATION\", {\n operation: \"set blobs()\"\n });\n let data = (0, index_js_3.getBytes)(blob);\n (0, index_js_3.assertArgument)(data.length <= BLOB_SIZE, \"blob is too large\", `blobs[${i3}]`, blob);\n if (data.length !== BLOB_SIZE) {\n const padded = new Uint8Array(BLOB_SIZE);\n padded.set(data);\n data = padded;\n }\n const commit = this.#kzg.blobToKzgCommitment(data);\n const proof = (0, index_js_3.hexlify)(this.#kzg.computeBlobKzgProof(data, commit));\n blobs.push({\n data: (0, index_js_3.hexlify)(data),\n commitment: (0, index_js_3.hexlify)(commit),\n proof\n });\n versionedHashes.push(getVersionedHash(1, commit));\n } else {\n const commit = (0, index_js_3.hexlify)(blob.commitment);\n blobs.push({\n data: (0, index_js_3.hexlify)(blob.data),\n commitment: commit,\n proof: (0, index_js_3.hexlify)(blob.proof)\n });\n versionedHashes.push(getVersionedHash(1, commit));\n }\n }\n this.#blobs = blobs;\n this.#blobVersionedHashes = versionedHashes;\n }\n get kzg() {\n return this.#kzg;\n }\n set kzg(kzg) {\n if (kzg == null) {\n this.#kzg = null;\n } else {\n this.#kzg = getKzgLibrary(kzg);\n }\n }\n /**\n * Creates a new Transaction with default values.\n */\n constructor() {\n this.#type = null;\n this.#to = null;\n this.#nonce = 0;\n this.#gasLimit = BN_0;\n this.#gasPrice = null;\n this.#maxPriorityFeePerGas = null;\n this.#maxFeePerGas = null;\n this.#data = \"0x\";\n this.#value = BN_0;\n this.#chainId = BN_0;\n this.#sig = null;\n this.#accessList = null;\n this.#maxFeePerBlobGas = null;\n this.#blobVersionedHashes = null;\n this.#kzg = null;\n this.#blobs = null;\n this.#auths = null;\n }\n /**\n * The transaction hash, if signed. Otherwise, ``null``.\n */\n get hash() {\n if (this.signature == null) {\n return null;\n }\n return (0, index_js_2.keccak256)(this.#getSerialized(true, false));\n }\n /**\n * The pre-image hash of this transaction.\n *\n * This is the digest that a [[Signer]] must sign to authorize\n * this transaction.\n */\n get unsignedHash() {\n return (0, index_js_2.keccak256)(this.unsignedSerialized);\n }\n /**\n * The sending address, if signed. Otherwise, ``null``.\n */\n get from() {\n if (this.signature == null) {\n return null;\n }\n return (0, address_js_1.recoverAddress)(this.unsignedHash, this.signature);\n }\n /**\n * The public key of the sender, if signed. Otherwise, ``null``.\n */\n get fromPublicKey() {\n if (this.signature == null) {\n return null;\n }\n return index_js_2.SigningKey.recoverPublicKey(this.unsignedHash, this.signature);\n }\n /**\n * Returns true if signed.\n *\n * This provides a Type Guard that properties requiring a signed\n * transaction are non-null.\n */\n isSigned() {\n return this.signature != null;\n }\n #getSerialized(signed, sidecar) {\n (0, index_js_3.assert)(!signed || this.signature != null, \"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized\", \"UNSUPPORTED_OPERATION\", { operation: \".serialized\" });\n const sig = signed ? this.signature : null;\n switch (this.inferType()) {\n case 0:\n return _serializeLegacy(this, sig);\n case 1:\n return _serializeEip2930(this, sig);\n case 2:\n return _serializeEip1559(this, sig);\n case 3:\n return _serializeEip4844(this, sig, sidecar ? this.blobs : null);\n case 4:\n return _serializeEip7702(this, sig);\n }\n (0, index_js_3.assert)(false, \"unsupported transaction type\", \"UNSUPPORTED_OPERATION\", { operation: \".serialized\" });\n }\n /**\n * The serialized transaction.\n *\n * This throws if the transaction is unsigned. For the pre-image,\n * use [[unsignedSerialized]].\n */\n get serialized() {\n return this.#getSerialized(true, true);\n }\n /**\n * The transaction pre-image.\n *\n * The hash of this is the digest which needs to be signed to\n * authorize this transaction.\n */\n get unsignedSerialized() {\n return this.#getSerialized(false, false);\n }\n /**\n * Return the most \"likely\" type; currently the highest\n * supported transaction type.\n */\n inferType() {\n const types2 = this.inferTypes();\n if (types2.indexOf(2) >= 0) {\n return 2;\n }\n return types2.pop();\n }\n /**\n * Validates the explicit properties and returns a list of compatible\n * transaction types.\n */\n inferTypes() {\n const hasGasPrice = this.gasPrice != null;\n const hasFee = this.maxFeePerGas != null || this.maxPriorityFeePerGas != null;\n const hasAccessList = this.accessList != null;\n const hasBlob = this.#maxFeePerBlobGas != null || this.#blobVersionedHashes;\n if (this.maxFeePerGas != null && this.maxPriorityFeePerGas != null) {\n (0, index_js_3.assert)(this.maxFeePerGas >= this.maxPriorityFeePerGas, \"priorityFee cannot be more than maxFee\", \"BAD_DATA\", { value: this });\n }\n (0, index_js_3.assert)(!hasFee || this.type !== 0 && this.type !== 1, \"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas\", \"BAD_DATA\", { value: this });\n (0, index_js_3.assert)(this.type !== 0 || !hasAccessList, \"legacy transaction cannot have accessList\", \"BAD_DATA\", { value: this });\n const types2 = [];\n if (this.type != null) {\n types2.push(this.type);\n } else {\n if (this.authorizationList && this.authorizationList.length) {\n types2.push(4);\n } else if (hasFee) {\n types2.push(2);\n } else if (hasGasPrice) {\n types2.push(1);\n if (!hasAccessList) {\n types2.push(0);\n }\n } else if (hasAccessList) {\n types2.push(1);\n types2.push(2);\n } else if (hasBlob && this.to) {\n types2.push(3);\n } else {\n types2.push(0);\n types2.push(1);\n types2.push(2);\n types2.push(3);\n }\n }\n types2.sort();\n return types2;\n }\n /**\n * Returns true if this transaction is a legacy transaction (i.e.\n * ``type === 0``).\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isLegacy() {\n return this.type === 0;\n }\n /**\n * Returns true if this transaction is berlin hardform transaction (i.e.\n * ``type === 1``).\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isBerlin() {\n return this.type === 1;\n }\n /**\n * Returns true if this transaction is london hardform transaction (i.e.\n * ``type === 2``).\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isLondon() {\n return this.type === 2;\n }\n /**\n * Returns true if this transaction is an [[link-eip-4844]] BLOB\n * transaction.\n *\n * This provides a Type Guard that the related properties are\n * non-null.\n */\n isCancun() {\n return this.type === 3;\n }\n /**\n * Create a copy of this transaciton.\n */\n clone() {\n return _Transaction.from(this);\n }\n /**\n * Return a JSON-friendly object.\n */\n toJSON() {\n const s4 = (v2) => {\n if (v2 == null) {\n return null;\n }\n return v2.toString();\n };\n return {\n type: this.type,\n to: this.to,\n // from: this.from,\n data: this.data,\n nonce: this.nonce,\n gasLimit: s4(this.gasLimit),\n gasPrice: s4(this.gasPrice),\n maxPriorityFeePerGas: s4(this.maxPriorityFeePerGas),\n maxFeePerGas: s4(this.maxFeePerGas),\n value: s4(this.value),\n chainId: s4(this.chainId),\n sig: this.signature ? this.signature.toJSON() : null,\n accessList: this.accessList\n };\n }\n /**\n * Create a **Transaction** from a serialized transaction or a\n * Transaction-like object.\n */\n static from(tx) {\n if (tx == null) {\n return new _Transaction();\n }\n if (typeof tx === \"string\") {\n const payload = (0, index_js_3.getBytes)(tx);\n if (payload[0] >= 127) {\n return _Transaction.from(_parseLegacy(payload));\n }\n switch (payload[0]) {\n case 1:\n return _Transaction.from(_parseEip2930(payload));\n case 2:\n return _Transaction.from(_parseEip1559(payload));\n case 3:\n return _Transaction.from(_parseEip4844(payload));\n case 4:\n return _Transaction.from(_parseEip7702(payload));\n }\n (0, index_js_3.assert)(false, \"unsupported transaction type\", \"UNSUPPORTED_OPERATION\", { operation: \"from\" });\n }\n const result = new _Transaction();\n if (tx.type != null) {\n result.type = tx.type;\n }\n if (tx.to != null) {\n result.to = tx.to;\n }\n if (tx.nonce != null) {\n result.nonce = tx.nonce;\n }\n if (tx.gasLimit != null) {\n result.gasLimit = tx.gasLimit;\n }\n if (tx.gasPrice != null) {\n result.gasPrice = tx.gasPrice;\n }\n if (tx.maxPriorityFeePerGas != null) {\n result.maxPriorityFeePerGas = tx.maxPriorityFeePerGas;\n }\n if (tx.maxFeePerGas != null) {\n result.maxFeePerGas = tx.maxFeePerGas;\n }\n if (tx.maxFeePerBlobGas != null) {\n result.maxFeePerBlobGas = tx.maxFeePerBlobGas;\n }\n if (tx.data != null) {\n result.data = tx.data;\n }\n if (tx.value != null) {\n result.value = tx.value;\n }\n if (tx.chainId != null) {\n result.chainId = tx.chainId;\n }\n if (tx.signature != null) {\n result.signature = index_js_2.Signature.from(tx.signature);\n }\n if (tx.accessList != null) {\n result.accessList = tx.accessList;\n }\n if (tx.authorizationList != null) {\n result.authorizationList = tx.authorizationList;\n }\n if (tx.blobVersionedHashes != null) {\n result.blobVersionedHashes = tx.blobVersionedHashes;\n }\n if (tx.kzg != null) {\n result.kzg = tx.kzg;\n }\n if (tx.blobs != null) {\n result.blobs = tx.blobs;\n }\n if (tx.hash != null) {\n (0, index_js_3.assertArgument)(result.isSigned(), \"unsigned transaction cannot define '.hash'\", \"tx\", tx);\n (0, index_js_3.assertArgument)(result.hash === tx.hash, \"hash mismatch\", \"tx\", tx);\n }\n if (tx.from != null) {\n (0, index_js_3.assertArgument)(result.isSigned(), \"unsigned transaction cannot define '.from'\", \"tx\", tx);\n (0, index_js_3.assertArgument)(result.from.toLowerCase() === (tx.from || \"\").toLowerCase(), \"from mismatch\", \"tx\", tx);\n }\n return result;\n }\n };\n exports3.Transaction = Transaction5;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/index.js\n var require_transaction2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/transaction/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Transaction = exports3.recoverAddress = exports3.computeAddress = exports3.authorizationify = exports3.accessListify = void 0;\n var accesslist_js_1 = require_accesslist();\n Object.defineProperty(exports3, \"accessListify\", { enumerable: true, get: function() {\n return accesslist_js_1.accessListify;\n } });\n var authorization_js_1 = require_authorization();\n Object.defineProperty(exports3, \"authorizationify\", { enumerable: true, get: function() {\n return authorization_js_1.authorizationify;\n } });\n var address_js_1 = require_address5();\n Object.defineProperty(exports3, \"computeAddress\", { enumerable: true, get: function() {\n return address_js_1.computeAddress;\n } });\n Object.defineProperty(exports3, \"recoverAddress\", { enumerable: true, get: function() {\n return address_js_1.recoverAddress;\n } });\n var transaction_js_1 = require_transaction();\n Object.defineProperty(exports3, \"Transaction\", { enumerable: true, get: function() {\n return transaction_js_1.Transaction;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/authorization.js\n var require_authorization2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/authorization.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyAuthorization = exports3.hashAuthorization = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils13();\n function hashAuthorization2(auth) {\n (0, index_js_4.assertArgument)(typeof auth.address === \"string\", \"invalid address for hashAuthorization\", \"auth.address\", auth);\n return (0, index_js_2.keccak256)((0, index_js_4.concat)([\n \"0x05\",\n (0, index_js_4.encodeRlp)([\n auth.chainId != null ? (0, index_js_4.toBeArray)(auth.chainId) : \"0x\",\n (0, index_js_1.getAddress)(auth.address),\n auth.nonce != null ? (0, index_js_4.toBeArray)(auth.nonce) : \"0x\"\n ])\n ]));\n }\n exports3.hashAuthorization = hashAuthorization2;\n function verifyAuthorization2(auth, sig) {\n return (0, index_js_3.recoverAddress)(hashAuthorization2(auth), sig);\n }\n exports3.verifyAuthorization = verifyAuthorization2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/id.js\n var require_id3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/id.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.id = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils13();\n function id(value) {\n return (0, index_js_1.keccak256)((0, index_js_2.toUtf8Bytes)(value));\n }\n exports3.id = id;\n }\n });\n\n // ../../../node_modules/.pnpm/@adraffy+ens-normalize@1.10.1/node_modules/@adraffy/ens-normalize/dist/index.cjs\n var require_dist4 = __commonJS({\n \"../../../node_modules/.pnpm/@adraffy+ens-normalize@1.10.1/node_modules/@adraffy/ens-normalize/dist/index.cjs\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var COMPRESSED$1 = \"AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI\";\n var FENCED = /* @__PURE__ */ new Map([[8217, \"apostrophe\"], [8260, \"fraction slash\"], [12539, \"middle dot\"]]);\n var NSM_MAX = 4;\n function decode_arithmetic(bytes) {\n let pos = 0;\n function u16() {\n return bytes[pos++] << 8 | bytes[pos++];\n }\n let symbol_count = u16();\n let total = 1;\n let acc = [0, 1];\n for (let i3 = 1; i3 < symbol_count; i3++) {\n acc.push(total += u16());\n }\n let skip = u16();\n let pos_payload = pos;\n pos += skip;\n let read_width = 0;\n let read_buffer = 0;\n function read_bit() {\n if (read_width == 0) {\n read_buffer = read_buffer << 8 | bytes[pos++];\n read_width = 8;\n }\n return read_buffer >> --read_width & 1;\n }\n const N4 = 31;\n const FULL = 2 ** N4;\n const HALF = FULL >>> 1;\n const QRTR = HALF >> 1;\n const MASK = FULL - 1;\n let register = 0;\n for (let i3 = 0; i3 < N4; i3++)\n register = register << 1 | read_bit();\n let symbols = [];\n let low = 0;\n let range = FULL;\n while (true) {\n let value = Math.floor(((register - low + 1) * total - 1) / range);\n let start = 0;\n let end = symbol_count;\n while (end - start > 1) {\n let mid = start + end >>> 1;\n if (value < acc[mid]) {\n end = mid;\n } else {\n start = mid;\n }\n }\n if (start == 0)\n break;\n symbols.push(start);\n let a3 = low + Math.floor(range * acc[start] / total);\n let b4 = low + Math.floor(range * acc[start + 1] / total) - 1;\n while (((a3 ^ b4) & HALF) == 0) {\n register = register << 1 & MASK | read_bit();\n a3 = a3 << 1 & MASK;\n b4 = b4 << 1 & MASK | 1;\n }\n while (a3 & ~b4 & QRTR) {\n register = register & HALF | register << 1 & MASK >>> 1 | read_bit();\n a3 = a3 << 1 ^ HALF;\n b4 = (b4 ^ HALF) << 1 | HALF | 1;\n }\n low = a3;\n range = 1 + b4 - a3;\n }\n let offset = symbol_count - 4;\n return symbols.map((x4) => {\n switch (x4 - offset) {\n case 3:\n return offset + 65792 + (bytes[pos_payload++] << 16 | bytes[pos_payload++] << 8 | bytes[pos_payload++]);\n case 2:\n return offset + 256 + (bytes[pos_payload++] << 8 | bytes[pos_payload++]);\n case 1:\n return offset + bytes[pos_payload++];\n default:\n return x4 - 1;\n }\n });\n }\n function read_payload(v2) {\n let pos = 0;\n return () => v2[pos++];\n }\n function read_compressed_payload(s4) {\n return read_payload(decode_arithmetic(unsafe_atob(s4)));\n }\n function unsafe_atob(s4) {\n let lookup = [];\n [...\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"].forEach((c4, i3) => lookup[c4.charCodeAt(0)] = i3);\n let n2 = s4.length;\n let ret = new Uint8Array(6 * n2 >> 3);\n for (let i3 = 0, pos = 0, width = 0, carry = 0; i3 < n2; i3++) {\n carry = carry << 6 | lookup[s4.charCodeAt(i3)];\n width += 6;\n if (width >= 8) {\n ret[pos++] = carry >> (width -= 8);\n }\n }\n return ret;\n }\n function signed(i3) {\n return i3 & 1 ? ~i3 >> 1 : i3 >> 1;\n }\n function read_deltas(n2, next) {\n let v2 = Array(n2);\n for (let i3 = 0, x4 = 0; i3 < n2; i3++)\n v2[i3] = x4 += signed(next());\n return v2;\n }\n function read_sorted(next, prev = 0) {\n let ret = [];\n while (true) {\n let x4 = next();\n let n2 = next();\n if (!n2)\n break;\n prev += x4;\n for (let i3 = 0; i3 < n2; i3++) {\n ret.push(prev + i3);\n }\n prev += n2 + 1;\n }\n return ret;\n }\n function read_sorted_arrays(next) {\n return read_array_while(() => {\n let v2 = read_sorted(next);\n if (v2.length)\n return v2;\n });\n }\n function read_mapped(next) {\n let ret = [];\n while (true) {\n let w3 = next();\n if (w3 == 0)\n break;\n ret.push(read_linear_table(w3, next));\n }\n while (true) {\n let w3 = next() - 1;\n if (w3 < 0)\n break;\n ret.push(read_replacement_table(w3, next));\n }\n return ret.flat();\n }\n function read_array_while(next) {\n let v2 = [];\n while (true) {\n let x4 = next(v2.length);\n if (!x4)\n break;\n v2.push(x4);\n }\n return v2;\n }\n function read_transposed(n2, w3, next) {\n let m2 = Array(n2).fill().map(() => []);\n for (let i3 = 0; i3 < w3; i3++) {\n read_deltas(n2, next).forEach((x4, j2) => m2[j2].push(x4));\n }\n return m2;\n }\n function read_linear_table(w3, next) {\n let dx = 1 + next();\n let dy = next();\n let vN = read_array_while(next);\n let m2 = read_transposed(vN.length, 1 + w3, next);\n return m2.flatMap((v2, i3) => {\n let [x4, ...ys] = v2;\n return Array(vN[i3]).fill().map((_2, j2) => {\n let j_dy = j2 * dy;\n return [x4 + j2 * dx, ys.map((y6) => y6 + j_dy)];\n });\n });\n }\n function read_replacement_table(w3, next) {\n let n2 = 1 + next();\n let m2 = read_transposed(n2, 1 + w3, next);\n return m2.map((v2) => [v2[0], v2.slice(1)]);\n }\n function read_trie(next) {\n let ret = [];\n let sorted = read_sorted(next);\n expand(decode4([]), []);\n return ret;\n function decode4(Q2) {\n let S3 = next();\n let B2 = read_array_while(() => {\n let cps = read_sorted(next).map((i3) => sorted[i3]);\n if (cps.length)\n return decode4(cps);\n });\n return { S: S3, B: B2, Q: Q2 };\n }\n function expand({ S: S3, B: B2 }, cps, saved) {\n if (S3 & 4 && saved === cps[cps.length - 1])\n return;\n if (S3 & 2)\n saved = cps[cps.length - 1];\n if (S3 & 1)\n ret.push(cps);\n for (let br of B2) {\n for (let cp of br.Q) {\n expand(br, [...cps, cp], saved);\n }\n }\n }\n }\n function hex_cp(cp) {\n return cp.toString(16).toUpperCase().padStart(2, \"0\");\n }\n function quote_cp(cp) {\n return `{${hex_cp(cp)}}`;\n }\n function explode_cp(s4) {\n let cps = [];\n for (let pos = 0, len = s4.length; pos < len; ) {\n let cp = s4.codePointAt(pos);\n pos += cp < 65536 ? 1 : 2;\n cps.push(cp);\n }\n return cps;\n }\n function str_from_cps(cps) {\n const chunk = 4096;\n let len = cps.length;\n if (len < chunk)\n return String.fromCodePoint(...cps);\n let buf = [];\n for (let i3 = 0; i3 < len; ) {\n buf.push(String.fromCodePoint(...cps.slice(i3, i3 += chunk)));\n }\n return buf.join(\"\");\n }\n function compare_arrays(a3, b4) {\n let n2 = a3.length;\n let c4 = n2 - b4.length;\n for (let i3 = 0; c4 == 0 && i3 < n2; i3++)\n c4 = a3[i3] - b4[i3];\n return c4;\n }\n var COMPRESSED = \"AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g\";\n var S0 = 44032;\n var L0 = 4352;\n var V0 = 4449;\n var T0 = 4519;\n var L_COUNT = 19;\n var V_COUNT = 21;\n var T_COUNT = 28;\n var N_COUNT = V_COUNT * T_COUNT;\n var S_COUNT = L_COUNT * N_COUNT;\n var S1 = S0 + S_COUNT;\n var L1 = L0 + L_COUNT;\n var V1 = V0 + V_COUNT;\n var T1 = T0 + T_COUNT;\n function unpack_cc(packed) {\n return packed >> 24 & 255;\n }\n function unpack_cp(packed) {\n return packed & 16777215;\n }\n var SHIFTED_RANK;\n var EXCLUSIONS;\n var DECOMP;\n var RECOMP;\n function init$1() {\n let r2 = read_compressed_payload(COMPRESSED);\n SHIFTED_RANK = new Map(read_sorted_arrays(r2).flatMap((v2, i3) => v2.map((x4) => [x4, i3 + 1 << 24])));\n EXCLUSIONS = new Set(read_sorted(r2));\n DECOMP = /* @__PURE__ */ new Map();\n RECOMP = /* @__PURE__ */ new Map();\n for (let [cp, cps] of read_mapped(r2)) {\n if (!EXCLUSIONS.has(cp) && cps.length == 2) {\n let [a3, b4] = cps;\n let bucket = RECOMP.get(a3);\n if (!bucket) {\n bucket = /* @__PURE__ */ new Map();\n RECOMP.set(a3, bucket);\n }\n bucket.set(b4, cp);\n }\n DECOMP.set(cp, cps.reverse());\n }\n }\n function is_hangul(cp) {\n return cp >= S0 && cp < S1;\n }\n function compose_pair(a3, b4) {\n if (a3 >= L0 && a3 < L1 && b4 >= V0 && b4 < V1) {\n return S0 + (a3 - L0) * N_COUNT + (b4 - V0) * T_COUNT;\n } else if (is_hangul(a3) && b4 > T0 && b4 < T1 && (a3 - S0) % T_COUNT == 0) {\n return a3 + (b4 - T0);\n } else {\n let recomp = RECOMP.get(a3);\n if (recomp) {\n recomp = recomp.get(b4);\n if (recomp) {\n return recomp;\n }\n }\n return -1;\n }\n }\n function decomposed(cps) {\n if (!SHIFTED_RANK)\n init$1();\n let ret = [];\n let buf = [];\n let check_order = false;\n function add2(cp) {\n let cc = SHIFTED_RANK.get(cp);\n if (cc) {\n check_order = true;\n cp |= cc;\n }\n ret.push(cp);\n }\n for (let cp of cps) {\n while (true) {\n if (cp < 128) {\n ret.push(cp);\n } else if (is_hangul(cp)) {\n let s_index = cp - S0;\n let l_index = s_index / N_COUNT | 0;\n let v_index = s_index % N_COUNT / T_COUNT | 0;\n let t_index = s_index % T_COUNT;\n add2(L0 + l_index);\n add2(V0 + v_index);\n if (t_index > 0)\n add2(T0 + t_index);\n } else {\n let mapped = DECOMP.get(cp);\n if (mapped) {\n buf.push(...mapped);\n } else {\n add2(cp);\n }\n }\n if (!buf.length)\n break;\n cp = buf.pop();\n }\n }\n if (check_order && ret.length > 1) {\n let prev_cc = unpack_cc(ret[0]);\n for (let i3 = 1; i3 < ret.length; i3++) {\n let cc = unpack_cc(ret[i3]);\n if (cc == 0 || prev_cc <= cc) {\n prev_cc = cc;\n continue;\n }\n let j2 = i3 - 1;\n while (true) {\n let tmp = ret[j2 + 1];\n ret[j2 + 1] = ret[j2];\n ret[j2] = tmp;\n if (!j2)\n break;\n prev_cc = unpack_cc(ret[--j2]);\n if (prev_cc <= cc)\n break;\n }\n prev_cc = unpack_cc(ret[i3]);\n }\n }\n return ret;\n }\n function composed_from_decomposed(v2) {\n let ret = [];\n let stack = [];\n let prev_cp = -1;\n let prev_cc = 0;\n for (let packed of v2) {\n let cc = unpack_cc(packed);\n let cp = unpack_cp(packed);\n if (prev_cp == -1) {\n if (cc == 0) {\n prev_cp = cp;\n } else {\n ret.push(cp);\n }\n } else if (prev_cc > 0 && prev_cc >= cc) {\n if (cc == 0) {\n ret.push(prev_cp, ...stack);\n stack.length = 0;\n prev_cp = cp;\n } else {\n stack.push(cp);\n }\n prev_cc = cc;\n } else {\n let composed = compose_pair(prev_cp, cp);\n if (composed >= 0) {\n prev_cp = composed;\n } else if (prev_cc == 0 && cc == 0) {\n ret.push(prev_cp);\n prev_cp = cp;\n } else {\n stack.push(cp);\n prev_cc = cc;\n }\n }\n }\n if (prev_cp >= 0) {\n ret.push(prev_cp, ...stack);\n }\n return ret;\n }\n function nfd(cps) {\n return decomposed(cps).map(unpack_cp);\n }\n function nfc(cps) {\n return composed_from_decomposed(decomposed(cps));\n }\n var HYPHEN = 45;\n var STOP = 46;\n var STOP_CH = \".\";\n var FE0F = 65039;\n var UNIQUE_PH = 1;\n var Array_from = (x4) => Array.from(x4);\n function group_has_cp(g4, cp) {\n return g4.P.has(cp) || g4.Q.has(cp);\n }\n var Emoji = class extends Array {\n get is_emoji() {\n return true;\n }\n // free tagging system\n };\n var MAPPED;\n var IGNORED;\n var CM;\n var NSM;\n var ESCAPE;\n var NFC_CHECK;\n var GROUPS;\n var WHOLE_VALID;\n var WHOLE_MAP;\n var VALID;\n var EMOJI_LIST;\n var EMOJI_ROOT;\n function init() {\n if (MAPPED)\n return;\n let r2 = read_compressed_payload(COMPRESSED$1);\n const read_sorted_array = () => read_sorted(r2);\n const read_sorted_set = () => new Set(read_sorted_array());\n const set_add_many = (set, v2) => v2.forEach((x4) => set.add(x4));\n MAPPED = new Map(read_mapped(r2));\n IGNORED = read_sorted_set();\n CM = read_sorted_array();\n NSM = new Set(read_sorted_array().map((i3) => CM[i3]));\n CM = new Set(CM);\n ESCAPE = read_sorted_set();\n NFC_CHECK = read_sorted_set();\n let chunks = read_sorted_arrays(r2);\n let unrestricted = r2();\n const read_chunked = () => {\n let set = /* @__PURE__ */ new Set();\n read_sorted_array().forEach((i3) => set_add_many(set, chunks[i3]));\n set_add_many(set, read_sorted_array());\n return set;\n };\n GROUPS = read_array_while((i3) => {\n let N4 = read_array_while(r2).map((x4) => x4 + 96);\n if (N4.length) {\n let R3 = i3 >= unrestricted;\n N4[0] -= 32;\n N4 = str_from_cps(N4);\n if (R3)\n N4 = `Restricted[${N4}]`;\n let P2 = read_chunked();\n let Q2 = read_chunked();\n let M2 = !r2();\n return { N: N4, P: P2, Q: Q2, M: M2, R: R3 };\n }\n });\n WHOLE_VALID = read_sorted_set();\n WHOLE_MAP = /* @__PURE__ */ new Map();\n let wholes = read_sorted_array().concat(Array_from(WHOLE_VALID)).sort((a3, b4) => a3 - b4);\n wholes.forEach((cp, i3) => {\n let d5 = r2();\n let w3 = wholes[i3] = d5 ? wholes[i3 - d5] : { V: [], M: /* @__PURE__ */ new Map() };\n w3.V.push(cp);\n if (!WHOLE_VALID.has(cp)) {\n WHOLE_MAP.set(cp, w3);\n }\n });\n for (let { V: V2, M: M2 } of new Set(WHOLE_MAP.values())) {\n let recs = [];\n for (let cp of V2) {\n let gs = GROUPS.filter((g4) => group_has_cp(g4, cp));\n let rec = recs.find(({ G }) => gs.some((g4) => G.has(g4)));\n if (!rec) {\n rec = { G: /* @__PURE__ */ new Set(), V: [] };\n recs.push(rec);\n }\n rec.V.push(cp);\n set_add_many(rec.G, gs);\n }\n let union = recs.flatMap((x4) => Array_from(x4.G));\n for (let { G, V: V3 } of recs) {\n let complement = new Set(union.filter((g4) => !G.has(g4)));\n for (let cp of V3) {\n M2.set(cp, complement);\n }\n }\n }\n VALID = /* @__PURE__ */ new Set();\n let multi = /* @__PURE__ */ new Set();\n const add_to_union = (cp) => VALID.has(cp) ? multi.add(cp) : VALID.add(cp);\n for (let g4 of GROUPS) {\n for (let cp of g4.P)\n add_to_union(cp);\n for (let cp of g4.Q)\n add_to_union(cp);\n }\n for (let cp of VALID) {\n if (!WHOLE_MAP.has(cp) && !multi.has(cp)) {\n WHOLE_MAP.set(cp, UNIQUE_PH);\n }\n }\n set_add_many(VALID, nfd(VALID));\n EMOJI_LIST = read_trie(r2).map((v2) => Emoji.from(v2)).sort(compare_arrays);\n EMOJI_ROOT = /* @__PURE__ */ new Map();\n for (let cps of EMOJI_LIST) {\n let prev = [EMOJI_ROOT];\n for (let cp of cps) {\n let next = prev.map((node) => {\n let child = node.get(cp);\n if (!child) {\n child = /* @__PURE__ */ new Map();\n node.set(cp, child);\n }\n return child;\n });\n if (cp === FE0F) {\n prev.push(...next);\n } else {\n prev = next;\n }\n }\n for (let x4 of prev) {\n x4.V = cps;\n }\n }\n }\n function quoted_cp(cp) {\n return (should_escape(cp) ? \"\" : `${bidi_qq(safe_str_from_cps([cp]))} `) + quote_cp(cp);\n }\n function bidi_qq(s4) {\n return `\"${s4}\"\\u200E`;\n }\n function check_label_extension(cps) {\n if (cps.length >= 4 && cps[2] == HYPHEN && cps[3] == HYPHEN) {\n throw new Error(`invalid label extension: \"${str_from_cps(cps.slice(0, 4))}\"`);\n }\n }\n function check_leading_underscore(cps) {\n const UNDERSCORE = 95;\n for (let i3 = cps.lastIndexOf(UNDERSCORE); i3 > 0; ) {\n if (cps[--i3] !== UNDERSCORE) {\n throw new Error(\"underscore allowed only at start\");\n }\n }\n }\n function check_fenced(cps) {\n let cp = cps[0];\n let prev = FENCED.get(cp);\n if (prev)\n throw error_placement(`leading ${prev}`);\n let n2 = cps.length;\n let last = -1;\n for (let i3 = 1; i3 < n2; i3++) {\n cp = cps[i3];\n let match = FENCED.get(cp);\n if (match) {\n if (last == i3)\n throw error_placement(`${prev} + ${match}`);\n last = i3 + 1;\n prev = match;\n }\n }\n if (last == n2)\n throw error_placement(`trailing ${prev}`);\n }\n function safe_str_from_cps(cps, max = Infinity, quoter = quote_cp) {\n let buf = [];\n if (is_combining_mark(cps[0]))\n buf.push(\"\\u25CC\");\n if (cps.length > max) {\n max >>= 1;\n cps = [...cps.slice(0, max), 8230, ...cps.slice(-max)];\n }\n let prev = 0;\n let n2 = cps.length;\n for (let i3 = 0; i3 < n2; i3++) {\n let cp = cps[i3];\n if (should_escape(cp)) {\n buf.push(str_from_cps(cps.slice(prev, i3)));\n buf.push(quoter(cp));\n prev = i3 + 1;\n }\n }\n buf.push(str_from_cps(cps.slice(prev, n2)));\n return buf.join(\"\");\n }\n function is_combining_mark(cp) {\n init();\n return CM.has(cp);\n }\n function should_escape(cp) {\n init();\n return ESCAPE.has(cp);\n }\n function ens_emoji() {\n init();\n return EMOJI_LIST.map((x4) => x4.slice());\n }\n function ens_normalize_fragment(frag, decompose) {\n init();\n let nf = decompose ? nfd : nfc;\n return frag.split(STOP_CH).map((label) => str_from_cps(tokens_from_str(explode_cp(label), nf, filter_fe0f).flat())).join(STOP_CH);\n }\n function ens_normalize(name) {\n return flatten(split3(name, nfc, filter_fe0f));\n }\n function ens_beautify(name) {\n let labels = split3(name, nfc, (x4) => x4);\n for (let { type, output, error } of labels) {\n if (error)\n break;\n if (type !== \"Greek\")\n array_replace(output, 958, 926);\n }\n return flatten(labels);\n }\n function array_replace(v2, a3, b4) {\n let prev = 0;\n while (true) {\n let next = v2.indexOf(a3, prev);\n if (next < 0)\n break;\n v2[next] = b4;\n prev = next + 1;\n }\n }\n function ens_split(name, preserve_emoji) {\n return split3(name, nfc, preserve_emoji ? (x4) => x4.slice() : filter_fe0f);\n }\n function split3(name, nf, ef) {\n if (!name)\n return [];\n init();\n let offset = 0;\n return name.split(STOP_CH).map((label) => {\n let input = explode_cp(label);\n let info = {\n input,\n offset\n // codepoint, not substring!\n };\n offset += input.length + 1;\n try {\n let tokens = info.tokens = tokens_from_str(input, nf, ef);\n let token_count = tokens.length;\n let type;\n if (!token_count) {\n throw new Error(`empty label`);\n }\n let norm = info.output = tokens.flat();\n check_leading_underscore(norm);\n let emoji = info.emoji = token_count > 1 || tokens[0].is_emoji;\n if (!emoji && norm.every((cp) => cp < 128)) {\n check_label_extension(norm);\n type = \"ASCII\";\n } else {\n let chars = tokens.flatMap((x4) => x4.is_emoji ? [] : x4);\n if (!chars.length) {\n type = \"Emoji\";\n } else {\n if (CM.has(norm[0]))\n throw error_placement(\"leading combining mark\");\n for (let i3 = 1; i3 < token_count; i3++) {\n let cps = tokens[i3];\n if (!cps.is_emoji && CM.has(cps[0])) {\n throw error_placement(`emoji + combining mark: \"${str_from_cps(tokens[i3 - 1])} + ${safe_str_from_cps([cps[0]])}\"`);\n }\n }\n check_fenced(norm);\n let unique = Array_from(new Set(chars));\n let [g4] = determine_group(unique);\n check_group(g4, chars);\n check_whole(g4, unique);\n type = g4.N;\n }\n }\n info.type = type;\n } catch (err) {\n info.error = err;\n }\n return info;\n });\n }\n function check_whole(group, unique) {\n let maker;\n let shared = [];\n for (let cp of unique) {\n let whole = WHOLE_MAP.get(cp);\n if (whole === UNIQUE_PH)\n return;\n if (whole) {\n let set = whole.M.get(cp);\n maker = maker ? maker.filter((g4) => set.has(g4)) : Array_from(set);\n if (!maker.length)\n return;\n } else {\n shared.push(cp);\n }\n }\n if (maker) {\n for (let g4 of maker) {\n if (shared.every((cp) => group_has_cp(g4, cp))) {\n throw new Error(`whole-script confusable: ${group.N}/${g4.N}`);\n }\n }\n }\n }\n function determine_group(unique) {\n let groups = GROUPS;\n for (let cp of unique) {\n let gs = groups.filter((g4) => group_has_cp(g4, cp));\n if (!gs.length) {\n if (!GROUPS.some((g4) => group_has_cp(g4, cp))) {\n throw error_disallowed(cp);\n } else {\n throw error_group_member(groups[0], cp);\n }\n }\n groups = gs;\n if (gs.length == 1)\n break;\n }\n return groups;\n }\n function flatten(split4) {\n return split4.map(({ input, error, output }) => {\n if (error) {\n let msg = error.message;\n throw new Error(split4.length == 1 ? msg : `Invalid label ${bidi_qq(safe_str_from_cps(input, 63))}: ${msg}`);\n }\n return str_from_cps(output);\n }).join(STOP_CH);\n }\n function error_disallowed(cp) {\n return new Error(`disallowed character: ${quoted_cp(cp)}`);\n }\n function error_group_member(g4, cp) {\n let quoted = quoted_cp(cp);\n let gg = GROUPS.find((g5) => g5.P.has(cp));\n if (gg) {\n quoted = `${gg.N} ${quoted}`;\n }\n return new Error(`illegal mixture: ${g4.N} + ${quoted}`);\n }\n function error_placement(where) {\n return new Error(`illegal placement: ${where}`);\n }\n function check_group(g4, cps) {\n for (let cp of cps) {\n if (!group_has_cp(g4, cp)) {\n throw error_group_member(g4, cp);\n }\n }\n if (g4.M) {\n let decomposed2 = nfd(cps);\n for (let i3 = 1, e2 = decomposed2.length; i3 < e2; i3++) {\n if (NSM.has(decomposed2[i3])) {\n let j2 = i3 + 1;\n for (let cp; j2 < e2 && NSM.has(cp = decomposed2[j2]); j2++) {\n for (let k4 = i3; k4 < j2; k4++) {\n if (decomposed2[k4] == cp) {\n throw new Error(`duplicate non-spacing marks: ${quoted_cp(cp)}`);\n }\n }\n }\n if (j2 - i3 > NSM_MAX) {\n throw new Error(`excessive non-spacing marks: ${bidi_qq(safe_str_from_cps(decomposed2.slice(i3 - 1, j2)))} (${j2 - i3}/${NSM_MAX})`);\n }\n i3 = j2;\n }\n }\n }\n }\n function tokens_from_str(input, nf, ef) {\n let ret = [];\n let chars = [];\n input = input.slice().reverse();\n while (input.length) {\n let emoji = consume_emoji_reversed(input);\n if (emoji) {\n if (chars.length) {\n ret.push(nf(chars));\n chars = [];\n }\n ret.push(ef(emoji));\n } else {\n let cp = input.pop();\n if (VALID.has(cp)) {\n chars.push(cp);\n } else {\n let cps = MAPPED.get(cp);\n if (cps) {\n chars.push(...cps);\n } else if (!IGNORED.has(cp)) {\n throw error_disallowed(cp);\n }\n }\n }\n }\n if (chars.length) {\n ret.push(nf(chars));\n }\n return ret;\n }\n function filter_fe0f(cps) {\n return cps.filter((cp) => cp != FE0F);\n }\n function consume_emoji_reversed(cps, eaten) {\n let node = EMOJI_ROOT;\n let emoji;\n let pos = cps.length;\n while (pos) {\n node = node.get(cps[--pos]);\n if (!node)\n break;\n let { V: V2 } = node;\n if (V2) {\n emoji = V2;\n if (eaten)\n eaten.push(...cps.slice(pos).reverse());\n cps.length = pos;\n }\n }\n return emoji;\n }\n var TY_VALID = \"valid\";\n var TY_MAPPED = \"mapped\";\n var TY_IGNORED = \"ignored\";\n var TY_DISALLOWED = \"disallowed\";\n var TY_EMOJI = \"emoji\";\n var TY_NFC = \"nfc\";\n var TY_STOP = \"stop\";\n function ens_tokenize(name, {\n nf = true\n // collapse unnormalized runs into a single token\n } = {}) {\n init();\n let input = explode_cp(name).reverse();\n let eaten = [];\n let tokens = [];\n while (input.length) {\n let emoji = consume_emoji_reversed(input, eaten);\n if (emoji) {\n tokens.push({\n type: TY_EMOJI,\n emoji: emoji.slice(),\n // copy emoji\n input: eaten,\n cps: filter_fe0f(emoji)\n });\n eaten = [];\n } else {\n let cp = input.pop();\n if (cp == STOP) {\n tokens.push({ type: TY_STOP, cp });\n } else if (VALID.has(cp)) {\n tokens.push({ type: TY_VALID, cps: [cp] });\n } else if (IGNORED.has(cp)) {\n tokens.push({ type: TY_IGNORED, cp });\n } else {\n let cps = MAPPED.get(cp);\n if (cps) {\n tokens.push({ type: TY_MAPPED, cp, cps: cps.slice() });\n } else {\n tokens.push({ type: TY_DISALLOWED, cp });\n }\n }\n }\n }\n if (nf) {\n for (let i3 = 0, start = -1; i3 < tokens.length; i3++) {\n let token = tokens[i3];\n if (is_valid_or_mapped(token.type)) {\n if (requires_check(token.cps)) {\n let end = i3 + 1;\n for (let pos = end; pos < tokens.length; pos++) {\n let { type, cps: cps2 } = tokens[pos];\n if (is_valid_or_mapped(type)) {\n if (!requires_check(cps2))\n break;\n end = pos + 1;\n } else if (type !== TY_IGNORED) {\n break;\n }\n }\n if (start < 0)\n start = i3;\n let slice4 = tokens.slice(start, end);\n let cps0 = slice4.flatMap((x4) => is_valid_or_mapped(x4.type) ? x4.cps : []);\n let cps = nfc(cps0);\n if (compare_arrays(cps, cps0)) {\n tokens.splice(start, end - start, {\n type: TY_NFC,\n input: cps0,\n // there are 3 states: tokens0 ==(process)=> input ==(nfc)=> tokens/cps\n cps,\n tokens0: collapse_valid_tokens(slice4),\n tokens: ens_tokenize(str_from_cps(cps), { nf: false })\n });\n i3 = start;\n } else {\n i3 = end - 1;\n }\n start = -1;\n } else {\n start = i3;\n }\n } else if (token.type !== TY_IGNORED) {\n start = -1;\n }\n }\n }\n return collapse_valid_tokens(tokens);\n }\n function is_valid_or_mapped(type) {\n return type == TY_VALID || type == TY_MAPPED;\n }\n function requires_check(cps) {\n return cps.some((cp) => NFC_CHECK.has(cp));\n }\n function collapse_valid_tokens(tokens) {\n for (let i3 = 0; i3 < tokens.length; i3++) {\n if (tokens[i3].type == TY_VALID) {\n let j2 = i3 + 1;\n while (j2 < tokens.length && tokens[j2].type == TY_VALID)\n j2++;\n tokens.splice(i3, j2 - i3, { type: TY_VALID, cps: tokens.slice(i3, j2).flatMap((x4) => x4.cps) });\n }\n }\n return tokens;\n }\n exports3.ens_beautify = ens_beautify;\n exports3.ens_emoji = ens_emoji;\n exports3.ens_normalize = ens_normalize;\n exports3.ens_normalize_fragment = ens_normalize_fragment;\n exports3.ens_split = ens_split;\n exports3.ens_tokenize = ens_tokenize;\n exports3.is_combining_mark = is_combining_mark;\n exports3.nfc = nfc;\n exports3.nfd = nfd;\n exports3.safe_str_from_cps = safe_str_from_cps;\n exports3.should_escape = should_escape;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/namehash.js\n var require_namehash2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/namehash.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.dnsEncode = exports3.namehash = exports3.isValidName = exports3.ensNormalize = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils13();\n var ens_normalize_1 = require_dist4();\n var Zeros = new Uint8Array(32);\n Zeros.fill(0);\n function checkComponent(comp) {\n (0, index_js_2.assertArgument)(comp.length !== 0, \"invalid ENS name; empty component\", \"comp\", comp);\n return comp;\n }\n function ensNameSplit(name) {\n const bytes = (0, index_js_2.toUtf8Bytes)(ensNormalize(name));\n const comps = [];\n if (name.length === 0) {\n return comps;\n }\n let last = 0;\n for (let i3 = 0; i3 < bytes.length; i3++) {\n const d5 = bytes[i3];\n if (d5 === 46) {\n comps.push(checkComponent(bytes.slice(last, i3)));\n last = i3 + 1;\n }\n }\n (0, index_js_2.assertArgument)(last < bytes.length, \"invalid ENS name; empty component\", \"name\", name);\n comps.push(checkComponent(bytes.slice(last)));\n return comps;\n }\n function ensNormalize(name) {\n try {\n if (name.length === 0) {\n throw new Error(\"empty label\");\n }\n return (0, ens_normalize_1.ens_normalize)(name);\n } catch (error) {\n (0, index_js_2.assertArgument)(false, `invalid ENS name (${error.message})`, \"name\", name);\n }\n }\n exports3.ensNormalize = ensNormalize;\n function isValidName(name) {\n try {\n return ensNameSplit(name).length !== 0;\n } catch (error) {\n }\n return false;\n }\n exports3.isValidName = isValidName;\n function namehash2(name) {\n (0, index_js_2.assertArgument)(typeof name === \"string\", \"invalid ENS name; not a string\", \"name\", name);\n (0, index_js_2.assertArgument)(name.length, `invalid ENS name (empty label)`, \"name\", name);\n let result = Zeros;\n const comps = ensNameSplit(name);\n while (comps.length) {\n result = (0, index_js_1.keccak256)((0, index_js_2.concat)([result, (0, index_js_1.keccak256)(comps.pop())]));\n }\n return (0, index_js_2.hexlify)(result);\n }\n exports3.namehash = namehash2;\n function dnsEncode(name, _maxLength) {\n const length = _maxLength != null ? _maxLength : 63;\n (0, index_js_2.assertArgument)(length <= 255, \"DNS encoded label cannot exceed 255\", \"length\", length);\n return (0, index_js_2.hexlify)((0, index_js_2.concat)(ensNameSplit(name).map((comp) => {\n (0, index_js_2.assertArgument)(comp.length <= length, `label ${JSON.stringify(name)} exceeds ${length} bytes`, \"name\", name);\n const bytes = new Uint8Array(comp.length + 1);\n bytes.set(comp, 1);\n bytes[0] = bytes.length - 1;\n return bytes;\n }))) + \"00\";\n }\n exports3.dnsEncode = dnsEncode;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/message.js\n var require_message2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/message.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyMessage = exports3.hashMessage = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_constants7();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils13();\n function hashMessage2(message2) {\n if (typeof message2 === \"string\") {\n message2 = (0, index_js_4.toUtf8Bytes)(message2);\n }\n return (0, index_js_1.keccak256)((0, index_js_4.concat)([\n (0, index_js_4.toUtf8Bytes)(index_js_2.MessagePrefix),\n (0, index_js_4.toUtf8Bytes)(String(message2.length)),\n message2\n ]));\n }\n exports3.hashMessage = hashMessage2;\n function verifyMessage2(message2, sig) {\n const digest2 = hashMessage2(message2);\n return (0, index_js_3.recoverAddress)(digest2, sig);\n }\n exports3.verifyMessage = verifyMessage2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/solidity.js\n var require_solidity = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/solidity.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.solidityPackedSha256 = exports3.solidityPackedKeccak256 = exports3.solidityPacked = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_utils13();\n var regexBytes = new RegExp(\"^bytes([0-9]+)$\");\n var regexNumber = new RegExp(\"^(u?int)([0-9]*)$\");\n var regexArray = new RegExp(\"^(.*)\\\\[([0-9]*)\\\\]$\");\n function _pack(type, value, isArray) {\n switch (type) {\n case \"address\":\n if (isArray) {\n return (0, index_js_3.getBytes)((0, index_js_3.zeroPadValue)(value, 32));\n }\n return (0, index_js_3.getBytes)((0, index_js_1.getAddress)(value));\n case \"string\":\n return (0, index_js_3.toUtf8Bytes)(value);\n case \"bytes\":\n return (0, index_js_3.getBytes)(value);\n case \"bool\":\n value = !!value ? \"0x01\" : \"0x00\";\n if (isArray) {\n return (0, index_js_3.getBytes)((0, index_js_3.zeroPadValue)(value, 32));\n }\n return (0, index_js_3.getBytes)(value);\n }\n let match = type.match(regexNumber);\n if (match) {\n let signed = match[1] === \"int\";\n let size6 = parseInt(match[2] || \"256\");\n (0, index_js_3.assertArgument)((!match[2] || match[2] === String(size6)) && size6 % 8 === 0 && size6 !== 0 && size6 <= 256, \"invalid number type\", \"type\", type);\n if (isArray) {\n size6 = 256;\n }\n if (signed) {\n value = (0, index_js_3.toTwos)(value, size6);\n }\n return (0, index_js_3.getBytes)((0, index_js_3.zeroPadValue)((0, index_js_3.toBeArray)(value), size6 / 8));\n }\n match = type.match(regexBytes);\n if (match) {\n const size6 = parseInt(match[1]);\n (0, index_js_3.assertArgument)(String(size6) === match[1] && size6 !== 0 && size6 <= 32, \"invalid bytes type\", \"type\", type);\n (0, index_js_3.assertArgument)((0, index_js_3.dataLength)(value) === size6, `invalid value for ${type}`, \"value\", value);\n if (isArray) {\n return (0, index_js_3.getBytes)((0, index_js_3.zeroPadBytes)(value, 32));\n }\n return value;\n }\n match = type.match(regexArray);\n if (match && Array.isArray(value)) {\n const baseType = match[1];\n const count = parseInt(match[2] || String(value.length));\n (0, index_js_3.assertArgument)(count === value.length, `invalid array length for ${type}`, \"value\", value);\n const result = [];\n value.forEach(function(value2) {\n result.push(_pack(baseType, value2, true));\n });\n return (0, index_js_3.getBytes)((0, index_js_3.concat)(result));\n }\n (0, index_js_3.assertArgument)(false, \"invalid type\", \"type\", type);\n }\n function solidityPacked(types2, values) {\n (0, index_js_3.assertArgument)(types2.length === values.length, \"wrong number of values; expected ${ types.length }\", \"values\", values);\n const tight = [];\n types2.forEach(function(type, index2) {\n tight.push(_pack(type, values[index2]));\n });\n return (0, index_js_3.hexlify)((0, index_js_3.concat)(tight));\n }\n exports3.solidityPacked = solidityPacked;\n function solidityPackedKeccak256(types2, values) {\n return (0, index_js_2.keccak256)(solidityPacked(types2, values));\n }\n exports3.solidityPackedKeccak256 = solidityPackedKeccak256;\n function solidityPackedSha256(types2, values) {\n return (0, index_js_2.sha256)(solidityPacked(types2, values));\n }\n exports3.solidityPackedSha256 = solidityPackedSha256;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/typed-data.js\n var require_typed_data2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/typed-data.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyTypedData = exports3.TypedDataEncoder = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils13();\n var id_js_1 = require_id3();\n var padding = new Uint8Array(32);\n padding.fill(0);\n var BN__1 = BigInt(-1);\n var BN_0 = BigInt(0);\n var BN_1 = BigInt(1);\n var BN_MAX_UINT256 = BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n function hexPadRight(value) {\n const bytes = (0, index_js_4.getBytes)(value);\n const padOffset = bytes.length % 32;\n if (padOffset) {\n return (0, index_js_4.concat)([bytes, padding.slice(padOffset)]);\n }\n return (0, index_js_4.hexlify)(bytes);\n }\n var hexTrue = (0, index_js_4.toBeHex)(BN_1, 32);\n var hexFalse = (0, index_js_4.toBeHex)(BN_0, 32);\n var domainFieldTypes = {\n name: \"string\",\n version: \"string\",\n chainId: \"uint256\",\n verifyingContract: \"address\",\n salt: \"bytes32\"\n };\n var domainFieldNames = [\n \"name\",\n \"version\",\n \"chainId\",\n \"verifyingContract\",\n \"salt\"\n ];\n function checkString(key) {\n return function(value) {\n (0, index_js_4.assertArgument)(typeof value === \"string\", `invalid domain value for ${JSON.stringify(key)}`, `domain.${key}`, value);\n return value;\n };\n }\n var domainChecks = {\n name: checkString(\"name\"),\n version: checkString(\"version\"),\n chainId: function(_value) {\n const value = (0, index_js_4.getBigInt)(_value, \"domain.chainId\");\n (0, index_js_4.assertArgument)(value >= 0, \"invalid chain ID\", \"domain.chainId\", _value);\n if (Number.isSafeInteger(value)) {\n return Number(value);\n }\n return (0, index_js_4.toQuantity)(value);\n },\n verifyingContract: function(value) {\n try {\n return (0, index_js_1.getAddress)(value).toLowerCase();\n } catch (error) {\n }\n (0, index_js_4.assertArgument)(false, `invalid domain value \"verifyingContract\"`, \"domain.verifyingContract\", value);\n },\n salt: function(value) {\n const bytes = (0, index_js_4.getBytes)(value, \"domain.salt\");\n (0, index_js_4.assertArgument)(bytes.length === 32, `invalid domain value \"salt\"`, \"domain.salt\", value);\n return (0, index_js_4.hexlify)(bytes);\n }\n };\n function getBaseEncoder(type) {\n {\n const match = type.match(/^(u?)int(\\d+)$/);\n if (match) {\n const signed = match[1] === \"\";\n const width = parseInt(match[2]);\n (0, index_js_4.assertArgument)(width % 8 === 0 && width !== 0 && width <= 256 && match[2] === String(width), \"invalid numeric width\", \"type\", type);\n const boundsUpper = (0, index_js_4.mask)(BN_MAX_UINT256, signed ? width - 1 : width);\n const boundsLower = signed ? (boundsUpper + BN_1) * BN__1 : BN_0;\n return function(_value) {\n const value = (0, index_js_4.getBigInt)(_value, \"value\");\n (0, index_js_4.assertArgument)(value >= boundsLower && value <= boundsUpper, `value out-of-bounds for ${type}`, \"value\", value);\n return (0, index_js_4.toBeHex)(signed ? (0, index_js_4.toTwos)(value, 256) : value, 32);\n };\n }\n }\n {\n const match = type.match(/^bytes(\\d+)$/);\n if (match) {\n const width = parseInt(match[1]);\n (0, index_js_4.assertArgument)(width !== 0 && width <= 32 && match[1] === String(width), \"invalid bytes width\", \"type\", type);\n return function(value) {\n const bytes = (0, index_js_4.getBytes)(value);\n (0, index_js_4.assertArgument)(bytes.length === width, `invalid length for ${type}`, \"value\", value);\n return hexPadRight(value);\n };\n }\n }\n switch (type) {\n case \"address\":\n return function(value) {\n return (0, index_js_4.zeroPadValue)((0, index_js_1.getAddress)(value), 32);\n };\n case \"bool\":\n return function(value) {\n return !value ? hexFalse : hexTrue;\n };\n case \"bytes\":\n return function(value) {\n return (0, index_js_2.keccak256)(value);\n };\n case \"string\":\n return function(value) {\n return (0, id_js_1.id)(value);\n };\n }\n return null;\n }\n function encodeType2(name, fields) {\n return `${name}(${fields.map(({ name: name2, type }) => type + \" \" + name2).join(\",\")})`;\n }\n function splitArray(type) {\n const match = type.match(/^([^\\x5b]*)((\\x5b\\d*\\x5d)*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n return {\n base: match[1],\n index: match[2] + match[4],\n array: {\n base: match[1],\n prefix: match[1] + match[2],\n count: match[5] ? parseInt(match[5]) : -1\n }\n };\n }\n return { base: type };\n }\n var TypedDataEncoder = class _TypedDataEncoder {\n /**\n * The primary type for the structured [[types]].\n *\n * This is derived automatically from the [[types]], since no\n * recursion is possible, once the DAG for the types is consturcted\n * internally, the primary type must be the only remaining type with\n * no parent nodes.\n */\n primaryType;\n #types;\n /**\n * The types.\n */\n get types() {\n return JSON.parse(this.#types);\n }\n #fullTypes;\n #encoderCache;\n /**\n * Create a new **TypedDataEncoder** for %%types%%.\n *\n * This performs all necessary checking that types are valid and\n * do not violate the [[link-eip-712]] structural constraints as\n * well as computes the [[primaryType]].\n */\n constructor(_types) {\n this.#fullTypes = /* @__PURE__ */ new Map();\n this.#encoderCache = /* @__PURE__ */ new Map();\n const links = /* @__PURE__ */ new Map();\n const parents = /* @__PURE__ */ new Map();\n const subtypes = /* @__PURE__ */ new Map();\n const types2 = {};\n Object.keys(_types).forEach((type) => {\n types2[type] = _types[type].map(({ name, type: type2 }) => {\n let { base: base4, index: index2 } = splitArray(type2);\n if (base4 === \"int\" && !_types[\"int\"]) {\n base4 = \"int256\";\n }\n if (base4 === \"uint\" && !_types[\"uint\"]) {\n base4 = \"uint256\";\n }\n return { name, type: base4 + (index2 || \"\") };\n });\n links.set(type, /* @__PURE__ */ new Set());\n parents.set(type, []);\n subtypes.set(type, /* @__PURE__ */ new Set());\n });\n this.#types = JSON.stringify(types2);\n for (const name in types2) {\n const uniqueNames = /* @__PURE__ */ new Set();\n for (const field of types2[name]) {\n (0, index_js_4.assertArgument)(!uniqueNames.has(field.name), `duplicate variable name ${JSON.stringify(field.name)} in ${JSON.stringify(name)}`, \"types\", _types);\n uniqueNames.add(field.name);\n const baseType = splitArray(field.type).base;\n (0, index_js_4.assertArgument)(baseType !== name, `circular type reference to ${JSON.stringify(baseType)}`, \"types\", _types);\n const encoder7 = getBaseEncoder(baseType);\n if (encoder7) {\n continue;\n }\n (0, index_js_4.assertArgument)(parents.has(baseType), `unknown type ${JSON.stringify(baseType)}`, \"types\", _types);\n parents.get(baseType).push(name);\n links.get(name).add(baseType);\n }\n }\n const primaryTypes = Array.from(parents.keys()).filter((n2) => parents.get(n2).length === 0);\n (0, index_js_4.assertArgument)(primaryTypes.length !== 0, \"missing primary type\", \"types\", _types);\n (0, index_js_4.assertArgument)(primaryTypes.length === 1, `ambiguous primary types or unused types: ${primaryTypes.map((t3) => JSON.stringify(t3)).join(\", \")}`, \"types\", _types);\n (0, index_js_4.defineProperties)(this, { primaryType: primaryTypes[0] });\n function checkCircular(type, found) {\n (0, index_js_4.assertArgument)(!found.has(type), `circular type reference to ${JSON.stringify(type)}`, \"types\", _types);\n found.add(type);\n for (const child of links.get(type)) {\n if (!parents.has(child)) {\n continue;\n }\n checkCircular(child, found);\n for (const subtype of found) {\n subtypes.get(subtype).add(child);\n }\n }\n found.delete(type);\n }\n checkCircular(this.primaryType, /* @__PURE__ */ new Set());\n for (const [name, set] of subtypes) {\n const st = Array.from(set);\n st.sort();\n this.#fullTypes.set(name, encodeType2(name, types2[name]) + st.map((t3) => encodeType2(t3, types2[t3])).join(\"\"));\n }\n }\n /**\n * Returnthe encoder for the specific %%type%%.\n */\n getEncoder(type) {\n let encoder7 = this.#encoderCache.get(type);\n if (!encoder7) {\n encoder7 = this.#getEncoder(type);\n this.#encoderCache.set(type, encoder7);\n }\n return encoder7;\n }\n #getEncoder(type) {\n {\n const encoder7 = getBaseEncoder(type);\n if (encoder7) {\n return encoder7;\n }\n }\n const array = splitArray(type).array;\n if (array) {\n const subtype = array.prefix;\n const subEncoder = this.getEncoder(subtype);\n return (value) => {\n (0, index_js_4.assertArgument)(array.count === -1 || array.count === value.length, `array length mismatch; expected length ${array.count}`, \"value\", value);\n let result = value.map(subEncoder);\n if (this.#fullTypes.has(subtype)) {\n result = result.map(index_js_2.keccak256);\n }\n return (0, index_js_2.keccak256)((0, index_js_4.concat)(result));\n };\n }\n const fields = this.types[type];\n if (fields) {\n const encodedType = (0, id_js_1.id)(this.#fullTypes.get(type));\n return (value) => {\n const values = fields.map(({ name, type: type2 }) => {\n const result = this.getEncoder(type2)(value[name]);\n if (this.#fullTypes.has(type2)) {\n return (0, index_js_2.keccak256)(result);\n }\n return result;\n });\n values.unshift(encodedType);\n return (0, index_js_4.concat)(values);\n };\n }\n (0, index_js_4.assertArgument)(false, `unknown type: ${type}`, \"type\", type);\n }\n /**\n * Return the full type for %%name%%.\n */\n encodeType(name) {\n const result = this.#fullTypes.get(name);\n (0, index_js_4.assertArgument)(result, `unknown type: ${JSON.stringify(name)}`, \"name\", name);\n return result;\n }\n /**\n * Return the encoded %%value%% for the %%type%%.\n */\n encodeData(type, value) {\n return this.getEncoder(type)(value);\n }\n /**\n * Returns the hash of %%value%% for the type of %%name%%.\n */\n hashStruct(name, value) {\n return (0, index_js_2.keccak256)(this.encodeData(name, value));\n }\n /**\n * Return the fulled encoded %%value%% for the [[types]].\n */\n encode(value) {\n return this.encodeData(this.primaryType, value);\n }\n /**\n * Return the hash of the fully encoded %%value%% for the [[types]].\n */\n hash(value) {\n return this.hashStruct(this.primaryType, value);\n }\n /**\n * @_ignore:\n */\n _visit(type, value, callback) {\n {\n const encoder7 = getBaseEncoder(type);\n if (encoder7) {\n return callback(type, value);\n }\n }\n const array = splitArray(type).array;\n if (array) {\n (0, index_js_4.assertArgument)(array.count === -1 || array.count === value.length, `array length mismatch; expected length ${array.count}`, \"value\", value);\n return value.map((v2) => this._visit(array.prefix, v2, callback));\n }\n const fields = this.types[type];\n if (fields) {\n return fields.reduce((accum, { name, type: type2 }) => {\n accum[name] = this._visit(type2, value[name], callback);\n return accum;\n }, {});\n }\n (0, index_js_4.assertArgument)(false, `unknown type: ${type}`, \"type\", type);\n }\n /**\n * Call %%calback%% for each value in %%value%%, passing the type and\n * component within %%value%%.\n *\n * This is useful for replacing addresses or other transformation that\n * may be desired on each component, based on its type.\n */\n visit(value, callback) {\n return this._visit(this.primaryType, value, callback);\n }\n /**\n * Create a new **TypedDataEncoder** for %%types%%.\n */\n static from(types2) {\n return new _TypedDataEncoder(types2);\n }\n /**\n * Return the primary type for %%types%%.\n */\n static getPrimaryType(types2) {\n return _TypedDataEncoder.from(types2).primaryType;\n }\n /**\n * Return the hashed struct for %%value%% using %%types%% and %%name%%.\n */\n static hashStruct(name, types2, value) {\n return _TypedDataEncoder.from(types2).hashStruct(name, value);\n }\n /**\n * Return the domain hash for %%domain%%.\n */\n static hashDomain(domain2) {\n const domainFields = [];\n for (const name in domain2) {\n if (domain2[name] == null) {\n continue;\n }\n const type = domainFieldTypes[name];\n (0, index_js_4.assertArgument)(type, `invalid typed-data domain key: ${JSON.stringify(name)}`, \"domain\", domain2);\n domainFields.push({ name, type });\n }\n domainFields.sort((a3, b4) => {\n return domainFieldNames.indexOf(a3.name) - domainFieldNames.indexOf(b4.name);\n });\n return _TypedDataEncoder.hashStruct(\"EIP712Domain\", { EIP712Domain: domainFields }, domain2);\n }\n /**\n * Return the fully encoded [[link-eip-712]] %%value%% for %%types%% with %%domain%%.\n */\n static encode(domain2, types2, value) {\n return (0, index_js_4.concat)([\n \"0x1901\",\n _TypedDataEncoder.hashDomain(domain2),\n _TypedDataEncoder.from(types2).hash(value)\n ]);\n }\n /**\n * Return the hash of the fully encoded [[link-eip-712]] %%value%% for %%types%% with %%domain%%.\n */\n static hash(domain2, types2, value) {\n return (0, index_js_2.keccak256)(_TypedDataEncoder.encode(domain2, types2, value));\n }\n // Replaces all address types with ENS names with their looked up address\n /**\n * Resolves to the value from resolving all addresses in %%value%% for\n * %%types%% and the %%domain%%.\n */\n static async resolveNames(domain2, types2, value, resolveName) {\n domain2 = Object.assign({}, domain2);\n for (const key in domain2) {\n if (domain2[key] == null) {\n delete domain2[key];\n }\n }\n const ensCache = {};\n if (domain2.verifyingContract && !(0, index_js_4.isHexString)(domain2.verifyingContract, 20)) {\n ensCache[domain2.verifyingContract] = \"0x\";\n }\n const encoder7 = _TypedDataEncoder.from(types2);\n encoder7.visit(value, (type, value2) => {\n if (type === \"address\" && !(0, index_js_4.isHexString)(value2, 20)) {\n ensCache[value2] = \"0x\";\n }\n return value2;\n });\n for (const name in ensCache) {\n ensCache[name] = await resolveName(name);\n }\n if (domain2.verifyingContract && ensCache[domain2.verifyingContract]) {\n domain2.verifyingContract = ensCache[domain2.verifyingContract];\n }\n value = encoder7.visit(value, (type, value2) => {\n if (type === \"address\" && ensCache[value2]) {\n return ensCache[value2];\n }\n return value2;\n });\n return { domain: domain2, value };\n }\n /**\n * Returns the JSON-encoded payload expected by nodes which implement\n * the JSON-RPC [[link-eip-712]] method.\n */\n static getPayload(domain2, types2, value) {\n _TypedDataEncoder.hashDomain(domain2);\n const domainValues = {};\n const domainTypes = [];\n domainFieldNames.forEach((name) => {\n const value2 = domain2[name];\n if (value2 == null) {\n return;\n }\n domainValues[name] = domainChecks[name](value2);\n domainTypes.push({ name, type: domainFieldTypes[name] });\n });\n const encoder7 = _TypedDataEncoder.from(types2);\n types2 = encoder7.types;\n const typesWithDomain = Object.assign({}, types2);\n (0, index_js_4.assertArgument)(typesWithDomain.EIP712Domain == null, \"types must not contain EIP712Domain type\", \"types.EIP712Domain\", types2);\n typesWithDomain.EIP712Domain = domainTypes;\n encoder7.encode(value);\n return {\n types: typesWithDomain,\n domain: domainValues,\n primaryType: encoder7.primaryType,\n message: encoder7.visit(value, (type, value2) => {\n if (type.match(/^bytes(\\d*)/)) {\n return (0, index_js_4.hexlify)((0, index_js_4.getBytes)(value2));\n }\n if (type.match(/^u?int/)) {\n return (0, index_js_4.getBigInt)(value2).toString();\n }\n switch (type) {\n case \"address\":\n return value2.toLowerCase();\n case \"bool\":\n return !!value2;\n case \"string\":\n (0, index_js_4.assertArgument)(typeof value2 === \"string\", \"invalid string\", \"value\", value2);\n return value2;\n }\n (0, index_js_4.assertArgument)(false, \"unsupported type\", \"type\", type);\n })\n };\n }\n };\n exports3.TypedDataEncoder = TypedDataEncoder;\n function verifyTypedData2(domain2, types2, value, signature) {\n return (0, index_js_3.recoverAddress)(TypedDataEncoder.hash(domain2, types2, value), signature);\n }\n exports3.verifyTypedData = verifyTypedData2;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/index.js\n var require_hash2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/hash/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.verifyTypedData = exports3.TypedDataEncoder = exports3.solidityPackedSha256 = exports3.solidityPackedKeccak256 = exports3.solidityPacked = exports3.verifyMessage = exports3.hashMessage = exports3.dnsEncode = exports3.namehash = exports3.isValidName = exports3.ensNormalize = exports3.id = exports3.verifyAuthorization = exports3.hashAuthorization = void 0;\n var authorization_js_1 = require_authorization2();\n Object.defineProperty(exports3, \"hashAuthorization\", { enumerable: true, get: function() {\n return authorization_js_1.hashAuthorization;\n } });\n Object.defineProperty(exports3, \"verifyAuthorization\", { enumerable: true, get: function() {\n return authorization_js_1.verifyAuthorization;\n } });\n var id_js_1 = require_id3();\n Object.defineProperty(exports3, \"id\", { enumerable: true, get: function() {\n return id_js_1.id;\n } });\n var namehash_js_1 = require_namehash2();\n Object.defineProperty(exports3, \"ensNormalize\", { enumerable: true, get: function() {\n return namehash_js_1.ensNormalize;\n } });\n Object.defineProperty(exports3, \"isValidName\", { enumerable: true, get: function() {\n return namehash_js_1.isValidName;\n } });\n Object.defineProperty(exports3, \"namehash\", { enumerable: true, get: function() {\n return namehash_js_1.namehash;\n } });\n Object.defineProperty(exports3, \"dnsEncode\", { enumerable: true, get: function() {\n return namehash_js_1.dnsEncode;\n } });\n var message_js_1 = require_message2();\n Object.defineProperty(exports3, \"hashMessage\", { enumerable: true, get: function() {\n return message_js_1.hashMessage;\n } });\n Object.defineProperty(exports3, \"verifyMessage\", { enumerable: true, get: function() {\n return message_js_1.verifyMessage;\n } });\n var solidity_js_1 = require_solidity();\n Object.defineProperty(exports3, \"solidityPacked\", { enumerable: true, get: function() {\n return solidity_js_1.solidityPacked;\n } });\n Object.defineProperty(exports3, \"solidityPackedKeccak256\", { enumerable: true, get: function() {\n return solidity_js_1.solidityPackedKeccak256;\n } });\n Object.defineProperty(exports3, \"solidityPackedSha256\", { enumerable: true, get: function() {\n return solidity_js_1.solidityPackedSha256;\n } });\n var typed_data_js_1 = require_typed_data2();\n Object.defineProperty(exports3, \"TypedDataEncoder\", { enumerable: true, get: function() {\n return typed_data_js_1.TypedDataEncoder;\n } });\n Object.defineProperty(exports3, \"verifyTypedData\", { enumerable: true, get: function() {\n return typed_data_js_1.verifyTypedData;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/fragments.js\n var require_fragments2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/fragments.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.StructFragment = exports3.FunctionFragment = exports3.FallbackFragment = exports3.ConstructorFragment = exports3.EventFragment = exports3.ErrorFragment = exports3.NamedFragment = exports3.Fragment = exports3.ParamType = void 0;\n var index_js_1 = require_utils13();\n var index_js_2 = require_hash2();\n function setify(items) {\n const result = /* @__PURE__ */ new Set();\n items.forEach((k4) => result.add(k4));\n return Object.freeze(result);\n }\n var _kwVisibDeploy = \"external public payable override\";\n var KwVisibDeploy = setify(_kwVisibDeploy.split(\" \"));\n var _kwVisib = \"constant external internal payable private public pure view override\";\n var KwVisib = setify(_kwVisib.split(\" \"));\n var _kwTypes = \"constructor error event fallback function receive struct\";\n var KwTypes = setify(_kwTypes.split(\" \"));\n var _kwModifiers = \"calldata memory storage payable indexed\";\n var KwModifiers = setify(_kwModifiers.split(\" \"));\n var _kwOther = \"tuple returns\";\n var _keywords = [_kwTypes, _kwModifiers, _kwOther, _kwVisib].join(\" \");\n var Keywords = setify(_keywords.split(\" \"));\n var SimpleTokens = {\n \"(\": \"OPEN_PAREN\",\n \")\": \"CLOSE_PAREN\",\n \"[\": \"OPEN_BRACKET\",\n \"]\": \"CLOSE_BRACKET\",\n \",\": \"COMMA\",\n \"@\": \"AT\"\n };\n var regexWhitespacePrefix = new RegExp(\"^(\\\\s*)\");\n var regexNumberPrefix = new RegExp(\"^([0-9]+)\");\n var regexIdPrefix = new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)\");\n var regexId = new RegExp(\"^([a-zA-Z$_][a-zA-Z0-9$_]*)$\");\n var regexType = new RegExp(\"^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$\");\n var TokenString = class _TokenString {\n #offset;\n #tokens;\n get offset() {\n return this.#offset;\n }\n get length() {\n return this.#tokens.length - this.#offset;\n }\n constructor(tokens) {\n this.#offset = 0;\n this.#tokens = tokens.slice();\n }\n clone() {\n return new _TokenString(this.#tokens);\n }\n reset() {\n this.#offset = 0;\n }\n #subTokenString(from14 = 0, to = 0) {\n return new _TokenString(this.#tokens.slice(from14, to).map((t3) => {\n return Object.freeze(Object.assign({}, t3, {\n match: t3.match - from14,\n linkBack: t3.linkBack - from14,\n linkNext: t3.linkNext - from14\n }));\n }));\n }\n // Pops and returns the value of the next token, if it is a keyword in allowed; throws if out of tokens\n popKeyword(allowed) {\n const top = this.peek();\n if (top.type !== \"KEYWORD\" || !allowed.has(top.text)) {\n throw new Error(`expected keyword ${top.text}`);\n }\n return this.pop().text;\n }\n // Pops and returns the value of the next token if it is `type`; throws if out of tokens\n popType(type) {\n if (this.peek().type !== type) {\n const top = this.peek();\n throw new Error(`expected ${type}; got ${top.type} ${JSON.stringify(top.text)}`);\n }\n return this.pop().text;\n }\n // Pops and returns a \"(\" TOKENS \")\"\n popParen() {\n const top = this.peek();\n if (top.type !== \"OPEN_PAREN\") {\n throw new Error(\"bad start\");\n }\n const result = this.#subTokenString(this.#offset + 1, top.match + 1);\n this.#offset = top.match + 1;\n return result;\n }\n // Pops and returns the items within \"(\" ITEM1 \",\" ITEM2 \",\" ... \")\"\n popParams() {\n const top = this.peek();\n if (top.type !== \"OPEN_PAREN\") {\n throw new Error(\"bad start\");\n }\n const result = [];\n while (this.#offset < top.match - 1) {\n const link = this.peek().linkNext;\n result.push(this.#subTokenString(this.#offset + 1, link));\n this.#offset = link;\n }\n this.#offset = top.match + 1;\n return result;\n }\n // Returns the top Token, throwing if out of tokens\n peek() {\n if (this.#offset >= this.#tokens.length) {\n throw new Error(\"out-of-bounds\");\n }\n return this.#tokens[this.#offset];\n }\n // Returns the next value, if it is a keyword in `allowed`\n peekKeyword(allowed) {\n const top = this.peekType(\"KEYWORD\");\n return top != null && allowed.has(top) ? top : null;\n }\n // Returns the value of the next token if it is `type`\n peekType(type) {\n if (this.length === 0) {\n return null;\n }\n const top = this.peek();\n return top.type === type ? top.text : null;\n }\n // Returns the next token; throws if out of tokens\n pop() {\n const result = this.peek();\n this.#offset++;\n return result;\n }\n toString() {\n const tokens = [];\n for (let i3 = this.#offset; i3 < this.#tokens.length; i3++) {\n const token = this.#tokens[i3];\n tokens.push(`${token.type}:${token.text}`);\n }\n return ``;\n }\n };\n function lex(text) {\n const tokens = [];\n const throwError = (message2) => {\n const token = offset < text.length ? JSON.stringify(text[offset]) : \"$EOI\";\n throw new Error(`invalid token ${token} at ${offset}: ${message2}`);\n };\n let brackets = [];\n let commas = [];\n let offset = 0;\n while (offset < text.length) {\n let cur = text.substring(offset);\n let match = cur.match(regexWhitespacePrefix);\n if (match) {\n offset += match[1].length;\n cur = text.substring(offset);\n }\n const token = { depth: brackets.length, linkBack: -1, linkNext: -1, match: -1, type: \"\", text: \"\", offset, value: -1 };\n tokens.push(token);\n let type = SimpleTokens[cur[0]] || \"\";\n if (type) {\n token.type = type;\n token.text = cur[0];\n offset++;\n if (type === \"OPEN_PAREN\") {\n brackets.push(tokens.length - 1);\n commas.push(tokens.length - 1);\n } else if (type == \"CLOSE_PAREN\") {\n if (brackets.length === 0) {\n throwError(\"no matching open bracket\");\n }\n token.match = brackets.pop();\n tokens[token.match].match = tokens.length - 1;\n token.depth--;\n token.linkBack = commas.pop();\n tokens[token.linkBack].linkNext = tokens.length - 1;\n } else if (type === \"COMMA\") {\n token.linkBack = commas.pop();\n tokens[token.linkBack].linkNext = tokens.length - 1;\n commas.push(tokens.length - 1);\n } else if (type === \"OPEN_BRACKET\") {\n token.type = \"BRACKET\";\n } else if (type === \"CLOSE_BRACKET\") {\n let suffix = tokens.pop().text;\n if (tokens.length > 0 && tokens[tokens.length - 1].type === \"NUMBER\") {\n const value = tokens.pop().text;\n suffix = value + suffix;\n tokens[tokens.length - 1].value = (0, index_js_1.getNumber)(value);\n }\n if (tokens.length === 0 || tokens[tokens.length - 1].type !== \"BRACKET\") {\n throw new Error(\"missing opening bracket\");\n }\n tokens[tokens.length - 1].text += suffix;\n }\n continue;\n }\n match = cur.match(regexIdPrefix);\n if (match) {\n token.text = match[1];\n offset += token.text.length;\n if (Keywords.has(token.text)) {\n token.type = \"KEYWORD\";\n continue;\n }\n if (token.text.match(regexType)) {\n token.type = \"TYPE\";\n continue;\n }\n token.type = \"ID\";\n continue;\n }\n match = cur.match(regexNumberPrefix);\n if (match) {\n token.text = match[1];\n token.type = \"NUMBER\";\n offset += token.text.length;\n continue;\n }\n throw new Error(`unexpected token ${JSON.stringify(cur[0])} at position ${offset}`);\n }\n return new TokenString(tokens.map((t3) => Object.freeze(t3)));\n }\n function allowSingle(set, allowed) {\n let included = [];\n for (const key in allowed.keys()) {\n if (set.has(key)) {\n included.push(key);\n }\n }\n if (included.length > 1) {\n throw new Error(`conflicting types: ${included.join(\", \")}`);\n }\n }\n function consumeName(type, tokens) {\n if (tokens.peekKeyword(KwTypes)) {\n const keyword = tokens.pop().text;\n if (keyword !== type) {\n throw new Error(`expected ${type}, got ${keyword}`);\n }\n }\n return tokens.popType(\"ID\");\n }\n function consumeKeywords(tokens, allowed) {\n const keywords = /* @__PURE__ */ new Set();\n while (true) {\n const keyword = tokens.peekType(\"KEYWORD\");\n if (keyword == null || allowed && !allowed.has(keyword)) {\n break;\n }\n tokens.pop();\n if (keywords.has(keyword)) {\n throw new Error(`duplicate keywords: ${JSON.stringify(keyword)}`);\n }\n keywords.add(keyword);\n }\n return Object.freeze(keywords);\n }\n function consumeMutability(tokens) {\n let modifiers2 = consumeKeywords(tokens, KwVisib);\n allowSingle(modifiers2, setify(\"constant payable nonpayable\".split(\" \")));\n allowSingle(modifiers2, setify(\"pure view payable nonpayable\".split(\" \")));\n if (modifiers2.has(\"view\")) {\n return \"view\";\n }\n if (modifiers2.has(\"pure\")) {\n return \"pure\";\n }\n if (modifiers2.has(\"payable\")) {\n return \"payable\";\n }\n if (modifiers2.has(\"nonpayable\")) {\n return \"nonpayable\";\n }\n if (modifiers2.has(\"constant\")) {\n return \"view\";\n }\n return \"nonpayable\";\n }\n function consumeParams(tokens, allowIndexed) {\n return tokens.popParams().map((t3) => ParamType.from(t3, allowIndexed));\n }\n function consumeGas(tokens) {\n if (tokens.peekType(\"AT\")) {\n tokens.pop();\n if (tokens.peekType(\"NUMBER\")) {\n return (0, index_js_1.getBigInt)(tokens.pop().text);\n }\n throw new Error(\"invalid gas\");\n }\n return null;\n }\n function consumeEoi(tokens) {\n if (tokens.length) {\n throw new Error(`unexpected tokens at offset ${tokens.offset}: ${tokens.toString()}`);\n }\n }\n var regexArrayType = new RegExp(/^(.*)\\[([0-9]*)\\]$/);\n function verifyBasicType(type) {\n const match = type.match(regexType);\n (0, index_js_1.assertArgument)(match, \"invalid type\", \"type\", type);\n if (type === \"uint\") {\n return \"uint256\";\n }\n if (type === \"int\") {\n return \"int256\";\n }\n if (match[2]) {\n const length = parseInt(match[2]);\n (0, index_js_1.assertArgument)(length !== 0 && length <= 32, \"invalid bytes length\", \"type\", type);\n } else if (match[3]) {\n const size6 = parseInt(match[3]);\n (0, index_js_1.assertArgument)(size6 !== 0 && size6 <= 256 && size6 % 8 === 0, \"invalid numeric width\", \"type\", type);\n }\n return type;\n }\n var _guard = {};\n var internal = Symbol.for(\"_ethers_internal\");\n var ParamTypeInternal = \"_ParamTypeInternal\";\n var ErrorFragmentInternal = \"_ErrorInternal\";\n var EventFragmentInternal = \"_EventInternal\";\n var ConstructorFragmentInternal = \"_ConstructorInternal\";\n var FallbackFragmentInternal = \"_FallbackInternal\";\n var FunctionFragmentInternal = \"_FunctionInternal\";\n var StructFragmentInternal = \"_StructInternal\";\n var ParamType = class _ParamType {\n /**\n * The local name of the parameter (or ``\"\"`` if unbound)\n */\n name;\n /**\n * The fully qualified type (e.g. ``\"address\"``, ``\"tuple(address)\"``,\n * ``\"uint256[3][]\"``)\n */\n type;\n /**\n * The base type (e.g. ``\"address\"``, ``\"tuple\"``, ``\"array\"``)\n */\n baseType;\n /**\n * True if the parameters is indexed.\n *\n * For non-indexable types this is ``null``.\n */\n indexed;\n /**\n * The components for the tuple.\n *\n * For non-tuple types this is ``null``.\n */\n components;\n /**\n * The array length, or ``-1`` for dynamic-lengthed arrays.\n *\n * For non-array types this is ``null``.\n */\n arrayLength;\n /**\n * The type of each child in the array.\n *\n * For non-array types this is ``null``.\n */\n arrayChildren;\n /**\n * @private\n */\n constructor(guard, name, type, baseType, indexed, components, arrayLength, arrayChildren) {\n (0, index_js_1.assertPrivate)(guard, _guard, \"ParamType\");\n Object.defineProperty(this, internal, { value: ParamTypeInternal });\n if (components) {\n components = Object.freeze(components.slice());\n }\n if (baseType === \"array\") {\n if (arrayLength == null || arrayChildren == null) {\n throw new Error(\"\");\n }\n } else if (arrayLength != null || arrayChildren != null) {\n throw new Error(\"\");\n }\n if (baseType === \"tuple\") {\n if (components == null) {\n throw new Error(\"\");\n }\n } else if (components != null) {\n throw new Error(\"\");\n }\n (0, index_js_1.defineProperties)(this, {\n name,\n type,\n baseType,\n indexed,\n components,\n arrayLength,\n arrayChildren\n });\n }\n /**\n * Return a string representation of this type.\n *\n * For example,\n *\n * ``sighash\" => \"(uint256,address)\"``\n *\n * ``\"minimal\" => \"tuple(uint256,address) indexed\"``\n *\n * ``\"full\" => \"tuple(uint256 foo, address bar) indexed baz\"``\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n const name = this.name || \"\";\n if (this.isArray()) {\n const result3 = JSON.parse(this.arrayChildren.format(\"json\"));\n result3.name = name;\n result3.type += `[${this.arrayLength < 0 ? \"\" : String(this.arrayLength)}]`;\n return JSON.stringify(result3);\n }\n const result2 = {\n type: this.baseType === \"tuple\" ? \"tuple\" : this.type,\n name\n };\n if (typeof this.indexed === \"boolean\") {\n result2.indexed = this.indexed;\n }\n if (this.isTuple()) {\n result2.components = this.components.map((c4) => JSON.parse(c4.format(format)));\n }\n return JSON.stringify(result2);\n }\n let result = \"\";\n if (this.isArray()) {\n result += this.arrayChildren.format(format);\n result += `[${this.arrayLength < 0 ? \"\" : String(this.arrayLength)}]`;\n } else {\n if (this.isTuple()) {\n result += \"(\" + this.components.map((comp) => comp.format(format)).join(format === \"full\" ? \", \" : \",\") + \")\";\n } else {\n result += this.type;\n }\n }\n if (format !== \"sighash\") {\n if (this.indexed === true) {\n result += \" indexed\";\n }\n if (format === \"full\" && this.name) {\n result += \" \" + this.name;\n }\n }\n return result;\n }\n /**\n * Returns true if %%this%% is an Array type.\n *\n * This provides a type gaurd ensuring that [[arrayChildren]]\n * and [[arrayLength]] are non-null.\n */\n isArray() {\n return this.baseType === \"array\";\n }\n /**\n * Returns true if %%this%% is a Tuple type.\n *\n * This provides a type gaurd ensuring that [[components]]\n * is non-null.\n */\n isTuple() {\n return this.baseType === \"tuple\";\n }\n /**\n * Returns true if %%this%% is an Indexable type.\n *\n * This provides a type gaurd ensuring that [[indexed]]\n * is non-null.\n */\n isIndexable() {\n return this.indexed != null;\n }\n /**\n * Walks the **ParamType** with %%value%%, calling %%process%%\n * on each type, destructing the %%value%% recursively.\n */\n walk(value, process2) {\n if (this.isArray()) {\n if (!Array.isArray(value)) {\n throw new Error(\"invalid array value\");\n }\n if (this.arrayLength !== -1 && value.length !== this.arrayLength) {\n throw new Error(\"array is wrong length\");\n }\n const _this = this;\n return value.map((v2) => _this.arrayChildren.walk(v2, process2));\n }\n if (this.isTuple()) {\n if (!Array.isArray(value)) {\n throw new Error(\"invalid tuple value\");\n }\n if (value.length !== this.components.length) {\n throw new Error(\"array is wrong length\");\n }\n const _this = this;\n return value.map((v2, i3) => _this.components[i3].walk(v2, process2));\n }\n return process2(this.type, value);\n }\n #walkAsync(promises, value, process2, setValue) {\n if (this.isArray()) {\n if (!Array.isArray(value)) {\n throw new Error(\"invalid array value\");\n }\n if (this.arrayLength !== -1 && value.length !== this.arrayLength) {\n throw new Error(\"array is wrong length\");\n }\n const childType = this.arrayChildren;\n const result2 = value.slice();\n result2.forEach((value2, index2) => {\n childType.#walkAsync(promises, value2, process2, (value3) => {\n result2[index2] = value3;\n });\n });\n setValue(result2);\n return;\n }\n if (this.isTuple()) {\n const components = this.components;\n let result2;\n if (Array.isArray(value)) {\n result2 = value.slice();\n } else {\n if (value == null || typeof value !== \"object\") {\n throw new Error(\"invalid tuple value\");\n }\n result2 = components.map((param) => {\n if (!param.name) {\n throw new Error(\"cannot use object value with unnamed components\");\n }\n if (!(param.name in value)) {\n throw new Error(`missing value for component ${param.name}`);\n }\n return value[param.name];\n });\n }\n if (result2.length !== this.components.length) {\n throw new Error(\"array is wrong length\");\n }\n result2.forEach((value2, index2) => {\n components[index2].#walkAsync(promises, value2, process2, (value3) => {\n result2[index2] = value3;\n });\n });\n setValue(result2);\n return;\n }\n const result = process2(this.type, value);\n if (result.then) {\n promises.push(async function() {\n setValue(await result);\n }());\n } else {\n setValue(result);\n }\n }\n /**\n * Walks the **ParamType** with %%value%%, asynchronously calling\n * %%process%% on each type, destructing the %%value%% recursively.\n *\n * This can be used to resolve ENS names by walking and resolving each\n * ``\"address\"`` type.\n */\n async walkAsync(value, process2) {\n const promises = [];\n const result = [value];\n this.#walkAsync(promises, value, process2, (value2) => {\n result[0] = value2;\n });\n if (promises.length) {\n await Promise.all(promises);\n }\n return result[0];\n }\n /**\n * Creates a new **ParamType** for %%obj%%.\n *\n * If %%allowIndexed%% then the ``indexed`` keyword is permitted,\n * otherwise the ``indexed`` keyword will throw an error.\n */\n static from(obj, allowIndexed) {\n if (_ParamType.isParamType(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _ParamType.from(lex(obj), allowIndexed);\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid param type\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n let type2 = \"\", baseType = \"\";\n let comps = null;\n if (consumeKeywords(obj, setify([\"tuple\"])).has(\"tuple\") || obj.peekType(\"OPEN_PAREN\")) {\n baseType = \"tuple\";\n comps = obj.popParams().map((t3) => _ParamType.from(t3));\n type2 = `tuple(${comps.map((c4) => c4.format()).join(\",\")})`;\n } else {\n type2 = verifyBasicType(obj.popType(\"TYPE\"));\n baseType = type2;\n }\n let arrayChildren = null;\n let arrayLength = null;\n while (obj.length && obj.peekType(\"BRACKET\")) {\n const bracket = obj.pop();\n arrayChildren = new _ParamType(_guard, \"\", type2, baseType, null, comps, arrayLength, arrayChildren);\n arrayLength = bracket.value;\n type2 += bracket.text;\n baseType = \"array\";\n comps = null;\n }\n let indexed2 = null;\n const keywords = consumeKeywords(obj, KwModifiers);\n if (keywords.has(\"indexed\")) {\n if (!allowIndexed) {\n throw new Error(\"\");\n }\n indexed2 = true;\n }\n const name2 = obj.peekType(\"ID\") ? obj.pop().text : \"\";\n if (obj.length) {\n throw new Error(\"leftover tokens\");\n }\n return new _ParamType(_guard, name2, type2, baseType, indexed2, comps, arrayLength, arrayChildren);\n }\n const name = obj.name;\n (0, index_js_1.assertArgument)(!name || typeof name === \"string\" && name.match(regexId), \"invalid name\", \"obj.name\", name);\n let indexed = obj.indexed;\n if (indexed != null) {\n (0, index_js_1.assertArgument)(allowIndexed, \"parameter cannot be indexed\", \"obj.indexed\", obj.indexed);\n indexed = !!indexed;\n }\n let type = obj.type;\n let arrayMatch = type.match(regexArrayType);\n if (arrayMatch) {\n const arrayLength = parseInt(arrayMatch[2] || \"-1\");\n const arrayChildren = _ParamType.from({\n type: arrayMatch[1],\n components: obj.components\n });\n return new _ParamType(_guard, name || \"\", type, \"array\", indexed, null, arrayLength, arrayChildren);\n }\n if (type === \"tuple\" || type.startsWith(\n \"tuple(\"\n /* fix: ) */\n ) || type.startsWith(\n \"(\"\n /* fix: ) */\n )) {\n const comps = obj.components != null ? obj.components.map((c4) => _ParamType.from(c4)) : null;\n const tuple = new _ParamType(_guard, name || \"\", type, \"tuple\", indexed, comps, null, null);\n return tuple;\n }\n type = verifyBasicType(obj.type);\n return new _ParamType(_guard, name || \"\", type, type, indexed, null, null, null);\n }\n /**\n * Returns true if %%value%% is a **ParamType**.\n */\n static isParamType(value) {\n return value && value[internal] === ParamTypeInternal;\n }\n };\n exports3.ParamType = ParamType;\n var Fragment = class _Fragment {\n /**\n * The type of the fragment.\n */\n type;\n /**\n * The inputs for the fragment.\n */\n inputs;\n /**\n * @private\n */\n constructor(guard, type, inputs) {\n (0, index_js_1.assertPrivate)(guard, _guard, \"Fragment\");\n inputs = Object.freeze(inputs.slice());\n (0, index_js_1.defineProperties)(this, { type, inputs });\n }\n /**\n * Creates a new **Fragment** for %%obj%%, wich can be any supported\n * ABI frgament type.\n */\n static from(obj) {\n if (typeof obj === \"string\") {\n try {\n _Fragment.from(JSON.parse(obj));\n } catch (e2) {\n }\n return _Fragment.from(lex(obj));\n }\n if (obj instanceof TokenString) {\n const type = obj.peekKeyword(KwTypes);\n switch (type) {\n case \"constructor\":\n return ConstructorFragment.from(obj);\n case \"error\":\n return ErrorFragment.from(obj);\n case \"event\":\n return EventFragment.from(obj);\n case \"fallback\":\n case \"receive\":\n return FallbackFragment.from(obj);\n case \"function\":\n return FunctionFragment.from(obj);\n case \"struct\":\n return StructFragment.from(obj);\n }\n } else if (typeof obj === \"object\") {\n switch (obj.type) {\n case \"constructor\":\n return ConstructorFragment.from(obj);\n case \"error\":\n return ErrorFragment.from(obj);\n case \"event\":\n return EventFragment.from(obj);\n case \"fallback\":\n case \"receive\":\n return FallbackFragment.from(obj);\n case \"function\":\n return FunctionFragment.from(obj);\n case \"struct\":\n return StructFragment.from(obj);\n }\n (0, index_js_1.assert)(false, `unsupported type: ${obj.type}`, \"UNSUPPORTED_OPERATION\", {\n operation: \"Fragment.from\"\n });\n }\n (0, index_js_1.assertArgument)(false, \"unsupported frgament object\", \"obj\", obj);\n }\n /**\n * Returns true if %%value%% is a [[ConstructorFragment]].\n */\n static isConstructor(value) {\n return ConstructorFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is an [[ErrorFragment]].\n */\n static isError(value) {\n return ErrorFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is an [[EventFragment]].\n */\n static isEvent(value) {\n return EventFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is a [[FunctionFragment]].\n */\n static isFunction(value) {\n return FunctionFragment.isFragment(value);\n }\n /**\n * Returns true if %%value%% is a [[StructFragment]].\n */\n static isStruct(value) {\n return StructFragment.isFragment(value);\n }\n };\n exports3.Fragment = Fragment;\n var NamedFragment = class extends Fragment {\n /**\n * The name of the fragment.\n */\n name;\n /**\n * @private\n */\n constructor(guard, type, name, inputs) {\n super(guard, type, inputs);\n (0, index_js_1.assertArgument)(typeof name === \"string\" && name.match(regexId), \"invalid identifier\", \"name\", name);\n inputs = Object.freeze(inputs.slice());\n (0, index_js_1.defineProperties)(this, { name });\n }\n };\n exports3.NamedFragment = NamedFragment;\n function joinParams(format, params) {\n return \"(\" + params.map((p4) => p4.format(format)).join(format === \"full\" ? \", \" : \",\") + \")\";\n }\n var ErrorFragment = class _ErrorFragment extends NamedFragment {\n /**\n * @private\n */\n constructor(guard, name, inputs) {\n super(guard, \"error\", name, inputs);\n Object.defineProperty(this, internal, { value: ErrorFragmentInternal });\n }\n /**\n * The Custom Error selector.\n */\n get selector() {\n return (0, index_js_2.id)(this.format(\"sighash\")).substring(0, 10);\n }\n /**\n * Returns a string representation of this fragment as %%format%%.\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n return JSON.stringify({\n type: \"error\",\n name: this.name,\n inputs: this.inputs.map((input) => JSON.parse(input.format(format)))\n });\n }\n const result = [];\n if (format !== \"sighash\") {\n result.push(\"error\");\n }\n result.push(this.name + joinParams(format, this.inputs));\n return result.join(\" \");\n }\n /**\n * Returns a new **ErrorFragment** for %%obj%%.\n */\n static from(obj) {\n if (_ErrorFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n return _ErrorFragment.from(lex(obj));\n } else if (obj instanceof TokenString) {\n const name = consumeName(\"error\", obj);\n const inputs = consumeParams(obj);\n consumeEoi(obj);\n return new _ErrorFragment(_guard, name, inputs);\n }\n return new _ErrorFragment(_guard, obj.name, obj.inputs ? obj.inputs.map(ParamType.from) : []);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is an\n * **ErrorFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === ErrorFragmentInternal;\n }\n };\n exports3.ErrorFragment = ErrorFragment;\n var EventFragment = class _EventFragment extends NamedFragment {\n /**\n * Whether this event is anonymous.\n */\n anonymous;\n /**\n * @private\n */\n constructor(guard, name, inputs, anonymous) {\n super(guard, \"event\", name, inputs);\n Object.defineProperty(this, internal, { value: EventFragmentInternal });\n (0, index_js_1.defineProperties)(this, { anonymous });\n }\n /**\n * The Event topic hash.\n */\n get topicHash() {\n return (0, index_js_2.id)(this.format(\"sighash\"));\n }\n /**\n * Returns a string representation of this event as %%format%%.\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n return JSON.stringify({\n type: \"event\",\n anonymous: this.anonymous,\n name: this.name,\n inputs: this.inputs.map((i3) => JSON.parse(i3.format(format)))\n });\n }\n const result = [];\n if (format !== \"sighash\") {\n result.push(\"event\");\n }\n result.push(this.name + joinParams(format, this.inputs));\n if (format !== \"sighash\" && this.anonymous) {\n result.push(\"anonymous\");\n }\n return result.join(\" \");\n }\n /**\n * Return the topic hash for an event with %%name%% and %%params%%.\n */\n static getTopicHash(name, params) {\n params = (params || []).map((p4) => ParamType.from(p4));\n const fragment = new _EventFragment(_guard, name, params, false);\n return fragment.topicHash;\n }\n /**\n * Returns a new **EventFragment** for %%obj%%.\n */\n static from(obj) {\n if (_EventFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _EventFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid event fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n const name = consumeName(\"event\", obj);\n const inputs = consumeParams(obj, true);\n const anonymous = !!consumeKeywords(obj, setify([\"anonymous\"])).has(\"anonymous\");\n consumeEoi(obj);\n return new _EventFragment(_guard, name, inputs, anonymous);\n }\n return new _EventFragment(_guard, obj.name, obj.inputs ? obj.inputs.map((p4) => ParamType.from(p4, true)) : [], !!obj.anonymous);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is an\n * **EventFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === EventFragmentInternal;\n }\n };\n exports3.EventFragment = EventFragment;\n var ConstructorFragment = class _ConstructorFragment extends Fragment {\n /**\n * Whether the constructor can receive an endowment.\n */\n payable;\n /**\n * The recommended gas limit for deployment or ``null``.\n */\n gas;\n /**\n * @private\n */\n constructor(guard, type, inputs, payable, gas) {\n super(guard, type, inputs);\n Object.defineProperty(this, internal, { value: ConstructorFragmentInternal });\n (0, index_js_1.defineProperties)(this, { payable, gas });\n }\n /**\n * Returns a string representation of this constructor as %%format%%.\n */\n format(format) {\n (0, index_js_1.assert)(format != null && format !== \"sighash\", \"cannot format a constructor for sighash\", \"UNSUPPORTED_OPERATION\", { operation: \"format(sighash)\" });\n if (format === \"json\") {\n return JSON.stringify({\n type: \"constructor\",\n stateMutability: this.payable ? \"payable\" : \"undefined\",\n payable: this.payable,\n gas: this.gas != null ? this.gas : void 0,\n inputs: this.inputs.map((i3) => JSON.parse(i3.format(format)))\n });\n }\n const result = [`constructor${joinParams(format, this.inputs)}`];\n if (this.payable) {\n result.push(\"payable\");\n }\n if (this.gas != null) {\n result.push(`@${this.gas.toString()}`);\n }\n return result.join(\" \");\n }\n /**\n * Returns a new **ConstructorFragment** for %%obj%%.\n */\n static from(obj) {\n if (_ConstructorFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _ConstructorFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid constuctor fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n consumeKeywords(obj, setify([\"constructor\"]));\n const inputs = consumeParams(obj);\n const payable = !!consumeKeywords(obj, KwVisibDeploy).has(\"payable\");\n const gas = consumeGas(obj);\n consumeEoi(obj);\n return new _ConstructorFragment(_guard, \"constructor\", inputs, payable, gas);\n }\n return new _ConstructorFragment(_guard, \"constructor\", obj.inputs ? obj.inputs.map(ParamType.from) : [], !!obj.payable, obj.gas != null ? obj.gas : null);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **ConstructorFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === ConstructorFragmentInternal;\n }\n };\n exports3.ConstructorFragment = ConstructorFragment;\n var FallbackFragment = class _FallbackFragment extends Fragment {\n /**\n * If the function can be sent value during invocation.\n */\n payable;\n constructor(guard, inputs, payable) {\n super(guard, \"fallback\", inputs);\n Object.defineProperty(this, internal, { value: FallbackFragmentInternal });\n (0, index_js_1.defineProperties)(this, { payable });\n }\n /**\n * Returns a string representation of this fallback as %%format%%.\n */\n format(format) {\n const type = this.inputs.length === 0 ? \"receive\" : \"fallback\";\n if (format === \"json\") {\n const stateMutability = this.payable ? \"payable\" : \"nonpayable\";\n return JSON.stringify({ type, stateMutability });\n }\n return `${type}()${this.payable ? \" payable\" : \"\"}`;\n }\n /**\n * Returns a new **FallbackFragment** for %%obj%%.\n */\n static from(obj) {\n if (_FallbackFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _FallbackFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid fallback fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n const errorObj = obj.toString();\n const topIsValid = obj.peekKeyword(setify([\"fallback\", \"receive\"]));\n (0, index_js_1.assertArgument)(topIsValid, \"type must be fallback or receive\", \"obj\", errorObj);\n const type = obj.popKeyword(setify([\"fallback\", \"receive\"]));\n if (type === \"receive\") {\n const inputs2 = consumeParams(obj);\n (0, index_js_1.assertArgument)(inputs2.length === 0, `receive cannot have arguments`, \"obj.inputs\", inputs2);\n consumeKeywords(obj, setify([\"payable\"]));\n consumeEoi(obj);\n return new _FallbackFragment(_guard, [], true);\n }\n let inputs = consumeParams(obj);\n if (inputs.length) {\n (0, index_js_1.assertArgument)(inputs.length === 1 && inputs[0].type === \"bytes\", \"invalid fallback inputs\", \"obj.inputs\", inputs.map((i3) => i3.format(\"minimal\")).join(\", \"));\n } else {\n inputs = [ParamType.from(\"bytes\")];\n }\n const mutability = consumeMutability(obj);\n (0, index_js_1.assertArgument)(mutability === \"nonpayable\" || mutability === \"payable\", \"fallback cannot be constants\", \"obj.stateMutability\", mutability);\n if (consumeKeywords(obj, setify([\"returns\"])).has(\"returns\")) {\n const outputs = consumeParams(obj);\n (0, index_js_1.assertArgument)(outputs.length === 1 && outputs[0].type === \"bytes\", \"invalid fallback outputs\", \"obj.outputs\", outputs.map((i3) => i3.format(\"minimal\")).join(\", \"));\n }\n consumeEoi(obj);\n return new _FallbackFragment(_guard, inputs, mutability === \"payable\");\n }\n if (obj.type === \"receive\") {\n return new _FallbackFragment(_guard, [], true);\n }\n if (obj.type === \"fallback\") {\n const inputs = [ParamType.from(\"bytes\")];\n const payable = obj.stateMutability === \"payable\";\n return new _FallbackFragment(_guard, inputs, payable);\n }\n (0, index_js_1.assertArgument)(false, \"invalid fallback description\", \"obj\", obj);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **FallbackFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === FallbackFragmentInternal;\n }\n };\n exports3.FallbackFragment = FallbackFragment;\n var FunctionFragment = class _FunctionFragment extends NamedFragment {\n /**\n * If the function is constant (e.g. ``pure`` or ``view`` functions).\n */\n constant;\n /**\n * The returned types for the result of calling this function.\n */\n outputs;\n /**\n * The state mutability (e.g. ``payable``, ``nonpayable``, ``view``\n * or ``pure``)\n */\n stateMutability;\n /**\n * If the function can be sent value during invocation.\n */\n payable;\n /**\n * The recommended gas limit to send when calling this function.\n */\n gas;\n /**\n * @private\n */\n constructor(guard, name, stateMutability, inputs, outputs, gas) {\n super(guard, \"function\", name, inputs);\n Object.defineProperty(this, internal, { value: FunctionFragmentInternal });\n outputs = Object.freeze(outputs.slice());\n const constant = stateMutability === \"view\" || stateMutability === \"pure\";\n const payable = stateMutability === \"payable\";\n (0, index_js_1.defineProperties)(this, { constant, gas, outputs, payable, stateMutability });\n }\n /**\n * The Function selector.\n */\n get selector() {\n return (0, index_js_2.id)(this.format(\"sighash\")).substring(0, 10);\n }\n /**\n * Returns a string representation of this function as %%format%%.\n */\n format(format) {\n if (format == null) {\n format = \"sighash\";\n }\n if (format === \"json\") {\n return JSON.stringify({\n type: \"function\",\n name: this.name,\n constant: this.constant,\n stateMutability: this.stateMutability !== \"nonpayable\" ? this.stateMutability : void 0,\n payable: this.payable,\n gas: this.gas != null ? this.gas : void 0,\n inputs: this.inputs.map((i3) => JSON.parse(i3.format(format))),\n outputs: this.outputs.map((o5) => JSON.parse(o5.format(format)))\n });\n }\n const result = [];\n if (format !== \"sighash\") {\n result.push(\"function\");\n }\n result.push(this.name + joinParams(format, this.inputs));\n if (format !== \"sighash\") {\n if (this.stateMutability !== \"nonpayable\") {\n result.push(this.stateMutability);\n }\n if (this.outputs && this.outputs.length) {\n result.push(\"returns\");\n result.push(joinParams(format, this.outputs));\n }\n if (this.gas != null) {\n result.push(`@${this.gas.toString()}`);\n }\n }\n return result.join(\" \");\n }\n /**\n * Return the selector for a function with %%name%% and %%params%%.\n */\n static getSelector(name, params) {\n params = (params || []).map((p4) => ParamType.from(p4));\n const fragment = new _FunctionFragment(_guard, name, \"view\", params, [], null);\n return fragment.selector;\n }\n /**\n * Returns a new **FunctionFragment** for %%obj%%.\n */\n static from(obj) {\n if (_FunctionFragment.isFragment(obj)) {\n return obj;\n }\n if (typeof obj === \"string\") {\n try {\n return _FunctionFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid function fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n const name = consumeName(\"function\", obj);\n const inputs = consumeParams(obj);\n const mutability = consumeMutability(obj);\n let outputs = [];\n if (consumeKeywords(obj, setify([\"returns\"])).has(\"returns\")) {\n outputs = consumeParams(obj);\n }\n const gas = consumeGas(obj);\n consumeEoi(obj);\n return new _FunctionFragment(_guard, name, mutability, inputs, outputs, gas);\n }\n let stateMutability = obj.stateMutability;\n if (stateMutability == null) {\n stateMutability = \"payable\";\n if (typeof obj.constant === \"boolean\") {\n stateMutability = \"view\";\n if (!obj.constant) {\n stateMutability = \"payable\";\n if (typeof obj.payable === \"boolean\" && !obj.payable) {\n stateMutability = \"nonpayable\";\n }\n }\n } else if (typeof obj.payable === \"boolean\" && !obj.payable) {\n stateMutability = \"nonpayable\";\n }\n }\n return new _FunctionFragment(_guard, obj.name, stateMutability, obj.inputs ? obj.inputs.map(ParamType.from) : [], obj.outputs ? obj.outputs.map(ParamType.from) : [], obj.gas != null ? obj.gas : null);\n }\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **FunctionFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === FunctionFragmentInternal;\n }\n };\n exports3.FunctionFragment = FunctionFragment;\n var StructFragment = class _StructFragment extends NamedFragment {\n /**\n * @private\n */\n constructor(guard, name, inputs) {\n super(guard, \"struct\", name, inputs);\n Object.defineProperty(this, internal, { value: StructFragmentInternal });\n }\n /**\n * Returns a string representation of this struct as %%format%%.\n */\n format() {\n throw new Error(\"@TODO\");\n }\n /**\n * Returns a new **StructFragment** for %%obj%%.\n */\n static from(obj) {\n if (typeof obj === \"string\") {\n try {\n return _StructFragment.from(lex(obj));\n } catch (error) {\n (0, index_js_1.assertArgument)(false, \"invalid struct fragment\", \"obj\", obj);\n }\n } else if (obj instanceof TokenString) {\n const name = consumeName(\"struct\", obj);\n const inputs = consumeParams(obj);\n consumeEoi(obj);\n return new _StructFragment(_guard, name, inputs);\n }\n return new _StructFragment(_guard, obj.name, obj.inputs ? obj.inputs.map(ParamType.from) : []);\n }\n // @TODO: fix this return type\n /**\n * Returns ``true`` and provides a type guard if %%value%% is a\n * **StructFragment**.\n */\n static isFragment(value) {\n return value && value[internal] === StructFragmentInternal;\n }\n };\n exports3.StructFragment = StructFragment;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/abi-coder.js\n var require_abi_coder2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/abi-coder.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AbiCoder = void 0;\n var index_js_1 = require_utils13();\n var abstract_coder_js_1 = require_abstract_coder2();\n var address_js_1 = require_address4();\n var array_js_1 = require_array2();\n var boolean_js_1 = require_boolean2();\n var bytes_js_1 = require_bytes2();\n var fixed_bytes_js_1 = require_fixed_bytes2();\n var null_js_1 = require_null2();\n var number_js_1 = require_number2();\n var string_js_1 = require_string2();\n var tuple_js_1 = require_tuple2();\n var fragments_js_1 = require_fragments2();\n var index_js_2 = require_address3();\n var index_js_3 = require_utils13();\n var PanicReasons = /* @__PURE__ */ new Map();\n PanicReasons.set(0, \"GENERIC_PANIC\");\n PanicReasons.set(1, \"ASSERT_FALSE\");\n PanicReasons.set(17, \"OVERFLOW\");\n PanicReasons.set(18, \"DIVIDE_BY_ZERO\");\n PanicReasons.set(33, \"ENUM_RANGE_ERROR\");\n PanicReasons.set(34, \"BAD_STORAGE_DATA\");\n PanicReasons.set(49, \"STACK_UNDERFLOW\");\n PanicReasons.set(50, \"ARRAY_RANGE_ERROR\");\n PanicReasons.set(65, \"OUT_OF_MEMORY\");\n PanicReasons.set(81, \"UNINITIALIZED_FUNCTION_CALL\");\n var paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);\n var paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);\n var defaultCoder = null;\n var defaultMaxInflation = 1024;\n function getBuiltinCallException(action, tx, data, abiCoder) {\n let message2 = \"missing revert data\";\n let reason = null;\n const invocation = null;\n let revert = null;\n if (data) {\n message2 = \"execution reverted\";\n const bytes = (0, index_js_3.getBytes)(data);\n data = (0, index_js_3.hexlify)(data);\n if (bytes.length === 0) {\n message2 += \" (no data present; likely require(false) occurred\";\n reason = \"require(false)\";\n } else if (bytes.length % 32 !== 4) {\n message2 += \" (could not decode reason; invalid data length)\";\n } else if ((0, index_js_3.hexlify)(bytes.slice(0, 4)) === \"0x08c379a0\") {\n try {\n reason = abiCoder.decode([\"string\"], bytes.slice(4))[0];\n revert = {\n signature: \"Error(string)\",\n name: \"Error\",\n args: [reason]\n };\n message2 += `: ${JSON.stringify(reason)}`;\n } catch (error) {\n message2 += \" (could not decode reason; invalid string data)\";\n }\n } else if ((0, index_js_3.hexlify)(bytes.slice(0, 4)) === \"0x4e487b71\") {\n try {\n const code = Number(abiCoder.decode([\"uint256\"], bytes.slice(4))[0]);\n revert = {\n signature: \"Panic(uint256)\",\n name: \"Panic\",\n args: [code]\n };\n reason = `Panic due to ${PanicReasons.get(code) || \"UNKNOWN\"}(${code})`;\n message2 += `: ${reason}`;\n } catch (error) {\n message2 += \" (could not decode panic code)\";\n }\n } else {\n message2 += \" (unknown custom error)\";\n }\n }\n const transaction = {\n to: tx.to ? (0, index_js_2.getAddress)(tx.to) : null,\n data: tx.data || \"0x\"\n };\n if (tx.from) {\n transaction.from = (0, index_js_2.getAddress)(tx.from);\n }\n return (0, index_js_3.makeError)(message2, \"CALL_EXCEPTION\", {\n action,\n data,\n reason,\n transaction,\n invocation,\n revert\n });\n }\n var AbiCoder = class _AbiCoder {\n #getCoder(param) {\n if (param.isArray()) {\n return new array_js_1.ArrayCoder(this.#getCoder(param.arrayChildren), param.arrayLength, param.name);\n }\n if (param.isTuple()) {\n return new tuple_js_1.TupleCoder(param.components.map((c4) => this.#getCoder(c4)), param.name);\n }\n switch (param.baseType) {\n case \"address\":\n return new address_js_1.AddressCoder(param.name);\n case \"bool\":\n return new boolean_js_1.BooleanCoder(param.name);\n case \"string\":\n return new string_js_1.StringCoder(param.name);\n case \"bytes\":\n return new bytes_js_1.BytesCoder(param.name);\n case \"\":\n return new null_js_1.NullCoder(param.name);\n }\n let match = param.type.match(paramTypeNumber);\n if (match) {\n let size6 = parseInt(match[2] || \"256\");\n (0, index_js_1.assertArgument)(size6 !== 0 && size6 <= 256 && size6 % 8 === 0, \"invalid \" + match[1] + \" bit length\", \"param\", param);\n return new number_js_1.NumberCoder(size6 / 8, match[1] === \"int\", param.name);\n }\n match = param.type.match(paramTypeBytes);\n if (match) {\n let size6 = parseInt(match[1]);\n (0, index_js_1.assertArgument)(size6 !== 0 && size6 <= 32, \"invalid bytes length\", \"param\", param);\n return new fixed_bytes_js_1.FixedBytesCoder(size6, param.name);\n }\n (0, index_js_1.assertArgument)(false, \"invalid type\", \"type\", param.type);\n }\n /**\n * Get the default values for the given %%types%%.\n *\n * For example, a ``uint`` is by default ``0`` and ``bool``\n * is by default ``false``.\n */\n getDefaultValue(types2) {\n const coders = types2.map((type) => this.#getCoder(fragments_js_1.ParamType.from(type)));\n const coder = new tuple_js_1.TupleCoder(coders, \"_\");\n return coder.defaultValue();\n }\n /**\n * Encode the %%values%% as the %%types%% into ABI data.\n *\n * @returns DataHexstring\n */\n encode(types2, values) {\n (0, index_js_1.assertArgumentCount)(values.length, types2.length, \"types/values length mismatch\");\n const coders = types2.map((type) => this.#getCoder(fragments_js_1.ParamType.from(type)));\n const coder = new tuple_js_1.TupleCoder(coders, \"_\");\n const writer = new abstract_coder_js_1.Writer();\n coder.encode(writer, values);\n return writer.data;\n }\n /**\n * Decode the ABI %%data%% as the %%types%% into values.\n *\n * If %%loose%% decoding is enabled, then strict padding is\n * not enforced. Some older versions of Solidity incorrectly\n * padded event data emitted from ``external`` functions.\n */\n decode(types2, data, loose) {\n const coders = types2.map((type) => this.#getCoder(fragments_js_1.ParamType.from(type)));\n const coder = new tuple_js_1.TupleCoder(coders, \"_\");\n return coder.decode(new abstract_coder_js_1.Reader(data, loose, defaultMaxInflation));\n }\n static _setDefaultMaxInflation(value) {\n (0, index_js_1.assertArgument)(typeof value === \"number\" && Number.isInteger(value), \"invalid defaultMaxInflation factor\", \"value\", value);\n defaultMaxInflation = value;\n }\n /**\n * Returns the shared singleton instance of a default [[AbiCoder]].\n *\n * On the first call, the instance is created internally.\n */\n static defaultAbiCoder() {\n if (defaultCoder == null) {\n defaultCoder = new _AbiCoder();\n }\n return defaultCoder;\n }\n /**\n * Returns an ethers-compatible [[CallExceptionError]] Error for the given\n * result %%data%% for the [[CallExceptionAction]] %%action%% against\n * the Transaction %%tx%%.\n */\n static getBuiltinCallException(action, tx, data) {\n return getBuiltinCallException(action, tx, data, _AbiCoder.defaultAbiCoder());\n }\n };\n exports3.AbiCoder = AbiCoder;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/bytes32.js\n var require_bytes322 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/bytes32.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeBytes32String = exports3.encodeBytes32String = void 0;\n var index_js_1 = require_utils13();\n function encodeBytes32String(text) {\n const bytes = (0, index_js_1.toUtf8Bytes)(text);\n if (bytes.length > 31) {\n throw new Error(\"bytes32 string must be less than 32 bytes\");\n }\n return (0, index_js_1.zeroPadBytes)(bytes, 32);\n }\n exports3.encodeBytes32String = encodeBytes32String;\n function decodeBytes32String(_bytes) {\n const data = (0, index_js_1.getBytes)(_bytes, \"bytes\");\n if (data.length !== 32) {\n throw new Error(\"invalid bytes32 - not 32 bytes long\");\n }\n if (data[31] !== 0) {\n throw new Error(\"invalid bytes32 string - no null terminator\");\n }\n let length = 31;\n while (data[length - 1] === 0) {\n length--;\n }\n return (0, index_js_1.toUtf8String)(data.slice(0, length));\n }\n exports3.decodeBytes32String = decodeBytes32String;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/interface.js\n var require_interface2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/interface.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Interface = exports3.Indexed = exports3.ErrorDescription = exports3.TransactionDescription = exports3.LogDescription = exports3.Result = exports3.checkResultErrors = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_hash2();\n var index_js_3 = require_utils13();\n var abi_coder_js_1 = require_abi_coder2();\n var abstract_coder_js_1 = require_abstract_coder2();\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return abstract_coder_js_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"Result\", { enumerable: true, get: function() {\n return abstract_coder_js_1.Result;\n } });\n var fragments_js_1 = require_fragments2();\n var typed_js_1 = require_typed();\n var LogDescription = class {\n /**\n * The matching fragment for the ``topic0``.\n */\n fragment;\n /**\n * The name of the Event.\n */\n name;\n /**\n * The full Event signature.\n */\n signature;\n /**\n * The topic hash for the Event.\n */\n topic;\n /**\n * The arguments passed into the Event with ``emit``.\n */\n args;\n /**\n * @_ignore:\n */\n constructor(fragment, topic, args) {\n const name = fragment.name, signature = fragment.format();\n (0, index_js_3.defineProperties)(this, {\n fragment,\n name,\n signature,\n topic,\n args\n });\n }\n };\n exports3.LogDescription = LogDescription;\n var TransactionDescription = class {\n /**\n * The matching fragment from the transaction ``data``.\n */\n fragment;\n /**\n * The name of the Function from the transaction ``data``.\n */\n name;\n /**\n * The arguments passed to the Function from the transaction ``data``.\n */\n args;\n /**\n * The full Function signature from the transaction ``data``.\n */\n signature;\n /**\n * The selector for the Function from the transaction ``data``.\n */\n selector;\n /**\n * The ``value`` (in wei) from the transaction.\n */\n value;\n /**\n * @_ignore:\n */\n constructor(fragment, selector, args, value) {\n const name = fragment.name, signature = fragment.format();\n (0, index_js_3.defineProperties)(this, {\n fragment,\n name,\n args,\n signature,\n selector,\n value\n });\n }\n };\n exports3.TransactionDescription = TransactionDescription;\n var ErrorDescription = class {\n /**\n * The matching fragment.\n */\n fragment;\n /**\n * The name of the Error.\n */\n name;\n /**\n * The arguments passed to the Error with ``revert``.\n */\n args;\n /**\n * The full Error signature.\n */\n signature;\n /**\n * The selector for the Error.\n */\n selector;\n /**\n * @_ignore:\n */\n constructor(fragment, selector, args) {\n const name = fragment.name, signature = fragment.format();\n (0, index_js_3.defineProperties)(this, {\n fragment,\n name,\n args,\n signature,\n selector\n });\n }\n };\n exports3.ErrorDescription = ErrorDescription;\n var Indexed = class {\n /**\n * The ``keccak256`` of the value logged.\n */\n hash;\n /**\n * @_ignore:\n */\n _isIndexed;\n /**\n * Returns ``true`` if %%value%% is an **Indexed**.\n *\n * This provides a Type Guard for property access.\n */\n static isIndexed(value) {\n return !!(value && value._isIndexed);\n }\n /**\n * @_ignore:\n */\n constructor(hash3) {\n (0, index_js_3.defineProperties)(this, { hash: hash3, _isIndexed: true });\n }\n };\n exports3.Indexed = Indexed;\n var PanicReasons = {\n \"0\": \"generic panic\",\n \"1\": \"assert(false)\",\n \"17\": \"arithmetic overflow\",\n \"18\": \"division or modulo by zero\",\n \"33\": \"enum overflow\",\n \"34\": \"invalid encoded storage byte array accessed\",\n \"49\": \"out-of-bounds array access; popping on an empty array\",\n \"50\": \"out-of-bounds access of an array or bytesN\",\n \"65\": \"out of memory\",\n \"81\": \"uninitialized function\"\n };\n var BuiltinErrors = {\n \"0x08c379a0\": {\n signature: \"Error(string)\",\n name: \"Error\",\n inputs: [\"string\"],\n reason: (message2) => {\n return `reverted with reason string ${JSON.stringify(message2)}`;\n }\n },\n \"0x4e487b71\": {\n signature: \"Panic(uint256)\",\n name: \"Panic\",\n inputs: [\"uint256\"],\n reason: (code) => {\n let reason = \"unknown panic code\";\n if (code >= 0 && code <= 255 && PanicReasons[code.toString()]) {\n reason = PanicReasons[code.toString()];\n }\n return `reverted with panic code 0x${code.toString(16)} (${reason})`;\n }\n }\n };\n var Interface = class _Interface {\n /**\n * All the Contract ABI members (i.e. methods, events, errors, etc).\n */\n fragments;\n /**\n * The Contract constructor.\n */\n deploy;\n /**\n * The Fallback method, if any.\n */\n fallback;\n /**\n * If receiving ether is supported.\n */\n receive;\n #errors;\n #events;\n #functions;\n // #structs: Map;\n #abiCoder;\n /**\n * Create a new Interface for the %%fragments%%.\n */\n constructor(fragments) {\n let abi2 = [];\n if (typeof fragments === \"string\") {\n abi2 = JSON.parse(fragments);\n } else {\n abi2 = fragments;\n }\n this.#functions = /* @__PURE__ */ new Map();\n this.#errors = /* @__PURE__ */ new Map();\n this.#events = /* @__PURE__ */ new Map();\n const frags = [];\n for (const a3 of abi2) {\n try {\n frags.push(fragments_js_1.Fragment.from(a3));\n } catch (error) {\n console.log(`[Warning] Invalid Fragment ${JSON.stringify(a3)}:`, error.message);\n }\n }\n (0, index_js_3.defineProperties)(this, {\n fragments: Object.freeze(frags)\n });\n let fallback = null;\n let receive = false;\n this.#abiCoder = this.getAbiCoder();\n this.fragments.forEach((fragment, index2) => {\n let bucket;\n switch (fragment.type) {\n case \"constructor\":\n if (this.deploy) {\n console.log(\"duplicate definition - constructor\");\n return;\n }\n (0, index_js_3.defineProperties)(this, { deploy: fragment });\n return;\n case \"fallback\":\n if (fragment.inputs.length === 0) {\n receive = true;\n } else {\n (0, index_js_3.assertArgument)(!fallback || fragment.payable !== fallback.payable, \"conflicting fallback fragments\", `fragments[${index2}]`, fragment);\n fallback = fragment;\n receive = fallback.payable;\n }\n return;\n case \"function\":\n bucket = this.#functions;\n break;\n case \"event\":\n bucket = this.#events;\n break;\n case \"error\":\n bucket = this.#errors;\n break;\n default:\n return;\n }\n const signature = fragment.format();\n if (bucket.has(signature)) {\n return;\n }\n bucket.set(signature, fragment);\n });\n if (!this.deploy) {\n (0, index_js_3.defineProperties)(this, {\n deploy: fragments_js_1.ConstructorFragment.from(\"constructor()\")\n });\n }\n (0, index_js_3.defineProperties)(this, { fallback, receive });\n }\n /**\n * Returns the entire Human-Readable ABI, as an array of\n * signatures, optionally as %%minimal%% strings, which\n * removes parameter names and unneceesary spaces.\n */\n format(minimal) {\n const format = minimal ? \"minimal\" : \"full\";\n const abi2 = this.fragments.map((f7) => f7.format(format));\n return abi2;\n }\n /**\n * Return the JSON-encoded ABI. This is the format Solidiy\n * returns.\n */\n formatJson() {\n const abi2 = this.fragments.map((f7) => f7.format(\"json\"));\n return JSON.stringify(abi2.map((j2) => JSON.parse(j2)));\n }\n /**\n * The ABI coder that will be used to encode and decode binary\n * data.\n */\n getAbiCoder() {\n return abi_coder_js_1.AbiCoder.defaultAbiCoder();\n }\n // Find a function definition by any means necessary (unless it is ambiguous)\n #getFunction(key, values, forceUnique) {\n if ((0, index_js_3.isHexString)(key)) {\n const selector = key.toLowerCase();\n for (const fragment of this.#functions.values()) {\n if (selector === fragment.selector) {\n return fragment;\n }\n }\n return null;\n }\n if (key.indexOf(\"(\") === -1) {\n const matching = [];\n for (const [name, fragment] of this.#functions) {\n if (name.split(\n \"(\"\n /* fix:) */\n )[0] === key) {\n matching.push(fragment);\n }\n }\n if (values) {\n const lastValue = values.length > 0 ? values[values.length - 1] : null;\n let valueLength = values.length;\n let allowOptions = true;\n if (typed_js_1.Typed.isTyped(lastValue) && lastValue.type === \"overrides\") {\n allowOptions = false;\n valueLength--;\n }\n for (let i3 = matching.length - 1; i3 >= 0; i3--) {\n const inputs = matching[i3].inputs.length;\n if (inputs !== valueLength && (!allowOptions || inputs !== valueLength - 1)) {\n matching.splice(i3, 1);\n }\n }\n for (let i3 = matching.length - 1; i3 >= 0; i3--) {\n const inputs = matching[i3].inputs;\n for (let j2 = 0; j2 < values.length; j2++) {\n if (!typed_js_1.Typed.isTyped(values[j2])) {\n continue;\n }\n if (j2 >= inputs.length) {\n if (values[j2].type === \"overrides\") {\n continue;\n }\n matching.splice(i3, 1);\n break;\n }\n if (values[j2].type !== inputs[j2].baseType) {\n matching.splice(i3, 1);\n break;\n }\n }\n }\n }\n if (matching.length === 1 && values && values.length !== matching[0].inputs.length) {\n const lastArg = values[values.length - 1];\n if (lastArg == null || Array.isArray(lastArg) || typeof lastArg !== \"object\") {\n matching.splice(0, 1);\n }\n }\n if (matching.length === 0) {\n return null;\n }\n if (matching.length > 1 && forceUnique) {\n const matchStr = matching.map((m2) => JSON.stringify(m2.format())).join(\", \");\n (0, index_js_3.assertArgument)(false, `ambiguous function description (i.e. matches ${matchStr})`, \"key\", key);\n }\n return matching[0];\n }\n const result = this.#functions.get(fragments_js_1.FunctionFragment.from(key).format());\n if (result) {\n return result;\n }\n return null;\n }\n /**\n * Get the function name for %%key%%, which may be a function selector,\n * function name or function signature that belongs to the ABI.\n */\n getFunctionName(key) {\n const fragment = this.#getFunction(key, null, false);\n (0, index_js_3.assertArgument)(fragment, \"no matching function\", \"key\", key);\n return fragment.name;\n }\n /**\n * Returns true if %%key%% (a function selector, function name or\n * function signature) is present in the ABI.\n *\n * In the case of a function name, the name may be ambiguous, so\n * accessing the [[FunctionFragment]] may require refinement.\n */\n hasFunction(key) {\n return !!this.#getFunction(key, null, false);\n }\n /**\n * Get the [[FunctionFragment]] for %%key%%, which may be a function\n * selector, function name or function signature that belongs to the ABI.\n *\n * If %%values%% is provided, it will use the Typed API to handle\n * ambiguous cases where multiple functions match by name.\n *\n * If the %%key%% and %%values%% do not refine to a single function in\n * the ABI, this will throw.\n */\n getFunction(key, values) {\n return this.#getFunction(key, values || null, true);\n }\n /**\n * Iterate over all functions, calling %%callback%%, sorted by their name.\n */\n forEachFunction(callback) {\n const names = Array.from(this.#functions.keys());\n names.sort((a3, b4) => a3.localeCompare(b4));\n for (let i3 = 0; i3 < names.length; i3++) {\n const name = names[i3];\n callback(this.#functions.get(name), i3);\n }\n }\n // Find an event definition by any means necessary (unless it is ambiguous)\n #getEvent(key, values, forceUnique) {\n if ((0, index_js_3.isHexString)(key)) {\n const eventTopic = key.toLowerCase();\n for (const fragment of this.#events.values()) {\n if (eventTopic === fragment.topicHash) {\n return fragment;\n }\n }\n return null;\n }\n if (key.indexOf(\"(\") === -1) {\n const matching = [];\n for (const [name, fragment] of this.#events) {\n if (name.split(\n \"(\"\n /* fix:) */\n )[0] === key) {\n matching.push(fragment);\n }\n }\n if (values) {\n for (let i3 = matching.length - 1; i3 >= 0; i3--) {\n if (matching[i3].inputs.length < values.length) {\n matching.splice(i3, 1);\n }\n }\n for (let i3 = matching.length - 1; i3 >= 0; i3--) {\n const inputs = matching[i3].inputs;\n for (let j2 = 0; j2 < values.length; j2++) {\n if (!typed_js_1.Typed.isTyped(values[j2])) {\n continue;\n }\n if (values[j2].type !== inputs[j2].baseType) {\n matching.splice(i3, 1);\n break;\n }\n }\n }\n }\n if (matching.length === 0) {\n return null;\n }\n if (matching.length > 1 && forceUnique) {\n const matchStr = matching.map((m2) => JSON.stringify(m2.format())).join(\", \");\n (0, index_js_3.assertArgument)(false, `ambiguous event description (i.e. matches ${matchStr})`, \"key\", key);\n }\n return matching[0];\n }\n const result = this.#events.get(fragments_js_1.EventFragment.from(key).format());\n if (result) {\n return result;\n }\n return null;\n }\n /**\n * Get the event name for %%key%%, which may be a topic hash,\n * event name or event signature that belongs to the ABI.\n */\n getEventName(key) {\n const fragment = this.#getEvent(key, null, false);\n (0, index_js_3.assertArgument)(fragment, \"no matching event\", \"key\", key);\n return fragment.name;\n }\n /**\n * Returns true if %%key%% (an event topic hash, event name or\n * event signature) is present in the ABI.\n *\n * In the case of an event name, the name may be ambiguous, so\n * accessing the [[EventFragment]] may require refinement.\n */\n hasEvent(key) {\n return !!this.#getEvent(key, null, false);\n }\n /**\n * Get the [[EventFragment]] for %%key%%, which may be a topic hash,\n * event name or event signature that belongs to the ABI.\n *\n * If %%values%% is provided, it will use the Typed API to handle\n * ambiguous cases where multiple events match by name.\n *\n * If the %%key%% and %%values%% do not refine to a single event in\n * the ABI, this will throw.\n */\n getEvent(key, values) {\n return this.#getEvent(key, values || null, true);\n }\n /**\n * Iterate over all events, calling %%callback%%, sorted by their name.\n */\n forEachEvent(callback) {\n const names = Array.from(this.#events.keys());\n names.sort((a3, b4) => a3.localeCompare(b4));\n for (let i3 = 0; i3 < names.length; i3++) {\n const name = names[i3];\n callback(this.#events.get(name), i3);\n }\n }\n /**\n * Get the [[ErrorFragment]] for %%key%%, which may be an error\n * selector, error name or error signature that belongs to the ABI.\n *\n * If %%values%% is provided, it will use the Typed API to handle\n * ambiguous cases where multiple errors match by name.\n *\n * If the %%key%% and %%values%% do not refine to a single error in\n * the ABI, this will throw.\n */\n getError(key, values) {\n if ((0, index_js_3.isHexString)(key)) {\n const selector = key.toLowerCase();\n if (BuiltinErrors[selector]) {\n return fragments_js_1.ErrorFragment.from(BuiltinErrors[selector].signature);\n }\n for (const fragment of this.#errors.values()) {\n if (selector === fragment.selector) {\n return fragment;\n }\n }\n return null;\n }\n if (key.indexOf(\"(\") === -1) {\n const matching = [];\n for (const [name, fragment] of this.#errors) {\n if (name.split(\n \"(\"\n /* fix:) */\n )[0] === key) {\n matching.push(fragment);\n }\n }\n if (matching.length === 0) {\n if (key === \"Error\") {\n return fragments_js_1.ErrorFragment.from(\"error Error(string)\");\n }\n if (key === \"Panic\") {\n return fragments_js_1.ErrorFragment.from(\"error Panic(uint256)\");\n }\n return null;\n } else if (matching.length > 1) {\n const matchStr = matching.map((m2) => JSON.stringify(m2.format())).join(\", \");\n (0, index_js_3.assertArgument)(false, `ambiguous error description (i.e. ${matchStr})`, \"name\", key);\n }\n return matching[0];\n }\n key = fragments_js_1.ErrorFragment.from(key).format();\n if (key === \"Error(string)\") {\n return fragments_js_1.ErrorFragment.from(\"error Error(string)\");\n }\n if (key === \"Panic(uint256)\") {\n return fragments_js_1.ErrorFragment.from(\"error Panic(uint256)\");\n }\n const result = this.#errors.get(key);\n if (result) {\n return result;\n }\n return null;\n }\n /**\n * Iterate over all errors, calling %%callback%%, sorted by their name.\n */\n forEachError(callback) {\n const names = Array.from(this.#errors.keys());\n names.sort((a3, b4) => a3.localeCompare(b4));\n for (let i3 = 0; i3 < names.length; i3++) {\n const name = names[i3];\n callback(this.#errors.get(name), i3);\n }\n }\n // Get the 4-byte selector used by Solidity to identify a function\n /*\n getSelector(fragment: ErrorFragment | FunctionFragment): string {\n if (typeof(fragment) === \"string\") {\n const matches: Array = [ ];\n \n try { matches.push(this.getFunction(fragment)); } catch (error) { }\n try { matches.push(this.getError(fragment)); } catch (_) { }\n \n if (matches.length === 0) {\n logger.throwArgumentError(\"unknown fragment\", \"key\", fragment);\n } else if (matches.length > 1) {\n logger.throwArgumentError(\"ambiguous fragment matches function and error\", \"key\", fragment);\n }\n \n fragment = matches[0];\n }\n \n return dataSlice(id(fragment.format()), 0, 4);\n }\n */\n // Get the 32-byte topic hash used by Solidity to identify an event\n /*\n getEventTopic(fragment: EventFragment): string {\n //if (typeof(fragment) === \"string\") { fragment = this.getEvent(eventFragment); }\n return id(fragment.format());\n }\n */\n _decodeParams(params, data) {\n return this.#abiCoder.decode(params, data);\n }\n _encodeParams(params, values) {\n return this.#abiCoder.encode(params, values);\n }\n /**\n * Encodes a ``tx.data`` object for deploying the Contract with\n * the %%values%% as the constructor arguments.\n */\n encodeDeploy(values) {\n return this._encodeParams(this.deploy.inputs, values || []);\n }\n /**\n * Decodes the result %%data%% (e.g. from an ``eth_call``) for the\n * specified error (see [[getError]] for valid values for\n * %%key%%).\n *\n * Most developers should prefer the [[parseCallResult]] method instead,\n * which will automatically detect a ``CALL_EXCEPTION`` and throw the\n * corresponding error.\n */\n decodeErrorResult(fragment, data) {\n if (typeof fragment === \"string\") {\n const f7 = this.getError(fragment);\n (0, index_js_3.assertArgument)(f7, \"unknown error\", \"fragment\", fragment);\n fragment = f7;\n }\n (0, index_js_3.assertArgument)((0, index_js_3.dataSlice)(data, 0, 4) === fragment.selector, `data signature does not match error ${fragment.name}.`, \"data\", data);\n return this._decodeParams(fragment.inputs, (0, index_js_3.dataSlice)(data, 4));\n }\n /**\n * Encodes the transaction revert data for a call result that\n * reverted from the the Contract with the sepcified %%error%%\n * (see [[getError]] for valid values for %%fragment%%) with the %%values%%.\n *\n * This is generally not used by most developers, unless trying to mock\n * a result from a Contract.\n */\n encodeErrorResult(fragment, values) {\n if (typeof fragment === \"string\") {\n const f7 = this.getError(fragment);\n (0, index_js_3.assertArgument)(f7, \"unknown error\", \"fragment\", fragment);\n fragment = f7;\n }\n return (0, index_js_3.concat)([\n fragment.selector,\n this._encodeParams(fragment.inputs, values || [])\n ]);\n }\n /**\n * Decodes the %%data%% from a transaction ``tx.data`` for\n * the function specified (see [[getFunction]] for valid values\n * for %%fragment%%).\n *\n * Most developers should prefer the [[parseTransaction]] method\n * instead, which will automatically detect the fragment.\n */\n decodeFunctionData(fragment, data) {\n if (typeof fragment === \"string\") {\n const f7 = this.getFunction(fragment);\n (0, index_js_3.assertArgument)(f7, \"unknown function\", \"fragment\", fragment);\n fragment = f7;\n }\n (0, index_js_3.assertArgument)((0, index_js_3.dataSlice)(data, 0, 4) === fragment.selector, `data signature does not match function ${fragment.name}.`, \"data\", data);\n return this._decodeParams(fragment.inputs, (0, index_js_3.dataSlice)(data, 4));\n }\n /**\n * Encodes the ``tx.data`` for a transaction that calls the function\n * specified (see [[getFunction]] for valid values for %%fragment%%) with\n * the %%values%%.\n */\n encodeFunctionData(fragment, values) {\n if (typeof fragment === \"string\") {\n const f7 = this.getFunction(fragment);\n (0, index_js_3.assertArgument)(f7, \"unknown function\", \"fragment\", fragment);\n fragment = f7;\n }\n return (0, index_js_3.concat)([\n fragment.selector,\n this._encodeParams(fragment.inputs, values || [])\n ]);\n }\n /**\n * Decodes the result %%data%% (e.g. from an ``eth_call``) for the\n * specified function (see [[getFunction]] for valid values for\n * %%key%%).\n *\n * Most developers should prefer the [[parseCallResult]] method instead,\n * which will automatically detect a ``CALL_EXCEPTION`` and throw the\n * corresponding error.\n */\n decodeFunctionResult(fragment, data) {\n if (typeof fragment === \"string\") {\n const f7 = this.getFunction(fragment);\n (0, index_js_3.assertArgument)(f7, \"unknown function\", \"fragment\", fragment);\n fragment = f7;\n }\n let message2 = \"invalid length for result data\";\n const bytes = (0, index_js_3.getBytesCopy)(data);\n if (bytes.length % 32 === 0) {\n try {\n return this.#abiCoder.decode(fragment.outputs, bytes);\n } catch (error) {\n message2 = \"could not decode result data\";\n }\n }\n (0, index_js_3.assert)(false, message2, \"BAD_DATA\", {\n value: (0, index_js_3.hexlify)(bytes),\n info: { method: fragment.name, signature: fragment.format() }\n });\n }\n makeError(_data, tx) {\n const data = (0, index_js_3.getBytes)(_data, \"data\");\n const error = abi_coder_js_1.AbiCoder.getBuiltinCallException(\"call\", tx, data);\n const customPrefix = \"execution reverted (unknown custom error)\";\n if (error.message.startsWith(customPrefix)) {\n const selector = (0, index_js_3.hexlify)(data.slice(0, 4));\n const ef = this.getError(selector);\n if (ef) {\n try {\n const args = this.#abiCoder.decode(ef.inputs, data.slice(4));\n error.revert = {\n name: ef.name,\n signature: ef.format(),\n args\n };\n error.reason = error.revert.signature;\n error.message = `execution reverted: ${error.reason}`;\n } catch (e2) {\n error.message = `execution reverted (coult not decode custom error)`;\n }\n }\n }\n const parsed = this.parseTransaction(tx);\n if (parsed) {\n error.invocation = {\n method: parsed.name,\n signature: parsed.signature,\n args: parsed.args\n };\n }\n return error;\n }\n /**\n * Encodes the result data (e.g. from an ``eth_call``) for the\n * specified function (see [[getFunction]] for valid values\n * for %%fragment%%) with %%values%%.\n *\n * This is generally not used by most developers, unless trying to mock\n * a result from a Contract.\n */\n encodeFunctionResult(fragment, values) {\n if (typeof fragment === \"string\") {\n const f7 = this.getFunction(fragment);\n (0, index_js_3.assertArgument)(f7, \"unknown function\", \"fragment\", fragment);\n fragment = f7;\n }\n return (0, index_js_3.hexlify)(this.#abiCoder.encode(fragment.outputs, values || []));\n }\n /*\n spelunk(inputs: Array, values: ReadonlyArray, processfunc: (type: string, value: any) => Promise): Promise> {\n const promises: Array> = [ ];\n const process = function(type: ParamType, value: any): any {\n if (type.baseType === \"array\") {\n return descend(type.child\n }\n if (type. === \"address\") {\n }\n };\n \n const descend = function (inputs: Array, values: ReadonlyArray) {\n if (inputs.length !== values.length) { throw new Error(\"length mismatch\"); }\n \n };\n \n const result: Array = [ ];\n values.forEach((value, index) => {\n if (value == null) {\n topics.push(null);\n } else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n logger.throwArgumentError(\"filtering with tuples or arrays not supported\", (\"contract.\" + param.name), value);\n } else if (Array.isArray(value)) {\n topics.push(value.map((value) => encodeTopic(param, value)));\n } else {\n topics.push(encodeTopic(param, value));\n }\n });\n }\n */\n // Create the filter for the event with search criteria (e.g. for eth_filterLog)\n encodeFilterTopics(fragment, values) {\n if (typeof fragment === \"string\") {\n const f7 = this.getEvent(fragment);\n (0, index_js_3.assertArgument)(f7, \"unknown event\", \"eventFragment\", fragment);\n fragment = f7;\n }\n (0, index_js_3.assert)(values.length <= fragment.inputs.length, `too many arguments for ${fragment.format()}`, \"UNEXPECTED_ARGUMENT\", { count: values.length, expectedCount: fragment.inputs.length });\n const topics = [];\n if (!fragment.anonymous) {\n topics.push(fragment.topicHash);\n }\n const encodeTopic = (param, value) => {\n if (param.type === \"string\") {\n return (0, index_js_2.id)(value);\n } else if (param.type === \"bytes\") {\n return (0, index_js_1.keccak256)((0, index_js_3.hexlify)(value));\n }\n if (param.type === \"bool\" && typeof value === \"boolean\") {\n value = value ? \"0x01\" : \"0x00\";\n } else if (param.type.match(/^u?int/)) {\n value = (0, index_js_3.toBeHex)(value);\n } else if (param.type.match(/^bytes/)) {\n value = (0, index_js_3.zeroPadBytes)(value, 32);\n } else if (param.type === \"address\") {\n this.#abiCoder.encode([\"address\"], [value]);\n }\n return (0, index_js_3.zeroPadValue)((0, index_js_3.hexlify)(value), 32);\n };\n values.forEach((value, index2) => {\n const param = fragment.inputs[index2];\n if (!param.indexed) {\n (0, index_js_3.assertArgument)(value == null, \"cannot filter non-indexed parameters; must be null\", \"contract.\" + param.name, value);\n return;\n }\n if (value == null) {\n topics.push(null);\n } else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n (0, index_js_3.assertArgument)(false, \"filtering with tuples or arrays not supported\", \"contract.\" + param.name, value);\n } else if (Array.isArray(value)) {\n topics.push(value.map((value2) => encodeTopic(param, value2)));\n } else {\n topics.push(encodeTopic(param, value));\n }\n });\n while (topics.length && topics[topics.length - 1] === null) {\n topics.pop();\n }\n return topics;\n }\n encodeEventLog(fragment, values) {\n if (typeof fragment === \"string\") {\n const f7 = this.getEvent(fragment);\n (0, index_js_3.assertArgument)(f7, \"unknown event\", \"eventFragment\", fragment);\n fragment = f7;\n }\n const topics = [];\n const dataTypes = [];\n const dataValues = [];\n if (!fragment.anonymous) {\n topics.push(fragment.topicHash);\n }\n (0, index_js_3.assertArgument)(values.length === fragment.inputs.length, \"event arguments/values mismatch\", \"values\", values);\n fragment.inputs.forEach((param, index2) => {\n const value = values[index2];\n if (param.indexed) {\n if (param.type === \"string\") {\n topics.push((0, index_js_2.id)(value));\n } else if (param.type === \"bytes\") {\n topics.push((0, index_js_1.keccak256)(value));\n } else if (param.baseType === \"tuple\" || param.baseType === \"array\") {\n throw new Error(\"not implemented\");\n } else {\n topics.push(this.#abiCoder.encode([param.type], [value]));\n }\n } else {\n dataTypes.push(param);\n dataValues.push(value);\n }\n });\n return {\n data: this.#abiCoder.encode(dataTypes, dataValues),\n topics\n };\n }\n // Decode a filter for the event and the search criteria\n decodeEventLog(fragment, data, topics) {\n if (typeof fragment === \"string\") {\n const f7 = this.getEvent(fragment);\n (0, index_js_3.assertArgument)(f7, \"unknown event\", \"eventFragment\", fragment);\n fragment = f7;\n }\n if (topics != null && !fragment.anonymous) {\n const eventTopic = fragment.topicHash;\n (0, index_js_3.assertArgument)((0, index_js_3.isHexString)(topics[0], 32) && topics[0].toLowerCase() === eventTopic, \"fragment/topic mismatch\", \"topics[0]\", topics[0]);\n topics = topics.slice(1);\n }\n const indexed = [];\n const nonIndexed = [];\n const dynamic = [];\n fragment.inputs.forEach((param, index2) => {\n if (param.indexed) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.baseType === \"tuple\" || param.baseType === \"array\") {\n indexed.push(fragments_js_1.ParamType.from({ type: \"bytes32\", name: param.name }));\n dynamic.push(true);\n } else {\n indexed.push(param);\n dynamic.push(false);\n }\n } else {\n nonIndexed.push(param);\n dynamic.push(false);\n }\n });\n const resultIndexed = topics != null ? this.#abiCoder.decode(indexed, (0, index_js_3.concat)(topics)) : null;\n const resultNonIndexed = this.#abiCoder.decode(nonIndexed, data, true);\n const values = [];\n const keys = [];\n let nonIndexedIndex = 0, indexedIndex = 0;\n fragment.inputs.forEach((param, index2) => {\n let value = null;\n if (param.indexed) {\n if (resultIndexed == null) {\n value = new Indexed(null);\n } else if (dynamic[index2]) {\n value = new Indexed(resultIndexed[indexedIndex++]);\n } else {\n try {\n value = resultIndexed[indexedIndex++];\n } catch (error) {\n value = error;\n }\n }\n } else {\n try {\n value = resultNonIndexed[nonIndexedIndex++];\n } catch (error) {\n value = error;\n }\n }\n values.push(value);\n keys.push(param.name || null);\n });\n return abstract_coder_js_1.Result.fromItems(values, keys);\n }\n /**\n * Parses a transaction, finding the matching function and extracts\n * the parameter values along with other useful function details.\n *\n * If the matching function cannot be found, return null.\n */\n parseTransaction(tx) {\n const data = (0, index_js_3.getBytes)(tx.data, \"tx.data\");\n const value = (0, index_js_3.getBigInt)(tx.value != null ? tx.value : 0, \"tx.value\");\n const fragment = this.getFunction((0, index_js_3.hexlify)(data.slice(0, 4)));\n if (!fragment) {\n return null;\n }\n const args = this.#abiCoder.decode(fragment.inputs, data.slice(4));\n return new TransactionDescription(fragment, fragment.selector, args, value);\n }\n parseCallResult(data) {\n throw new Error(\"@TODO\");\n }\n /**\n * Parses a receipt log, finding the matching event and extracts\n * the parameter values along with other useful event details.\n *\n * If the matching event cannot be found, returns null.\n */\n parseLog(log) {\n const fragment = this.getEvent(log.topics[0]);\n if (!fragment || fragment.anonymous) {\n return null;\n }\n return new LogDescription(fragment, fragment.topicHash, this.decodeEventLog(fragment, log.data, log.topics));\n }\n /**\n * Parses a revert data, finding the matching error and extracts\n * the parameter values along with other useful error details.\n *\n * If the matching error cannot be found, returns null.\n */\n parseError(data) {\n const hexData = (0, index_js_3.hexlify)(data);\n const fragment = this.getError((0, index_js_3.dataSlice)(hexData, 0, 4));\n if (!fragment) {\n return null;\n }\n const args = this.#abiCoder.decode(fragment.inputs, (0, index_js_3.dataSlice)(hexData, 4));\n return new ErrorDescription(fragment, fragment.selector, args);\n }\n /**\n * Creates a new [[Interface]] from the ABI %%value%%.\n *\n * The %%value%% may be provided as an existing [[Interface]] object,\n * a JSON-encoded ABI or any Human-Readable ABI format.\n */\n static from(value) {\n if (value instanceof _Interface) {\n return value;\n }\n if (typeof value === \"string\") {\n return new _Interface(JSON.parse(value));\n }\n if (typeof value.formatJson === \"function\") {\n return new _Interface(value.formatJson());\n }\n if (typeof value.format === \"function\") {\n return new _Interface(value.format(\"json\"));\n }\n return new _Interface(value);\n }\n };\n exports3.Interface = Interface;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/index.js\n var require_abi = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/abi/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Typed = exports3.Result = exports3.TransactionDescription = exports3.LogDescription = exports3.ErrorDescription = exports3.Interface = exports3.Indexed = exports3.checkResultErrors = exports3.StructFragment = exports3.ParamType = exports3.NamedFragment = exports3.FunctionFragment = exports3.Fragment = exports3.FallbackFragment = exports3.EventFragment = exports3.ErrorFragment = exports3.ConstructorFragment = exports3.encodeBytes32String = exports3.decodeBytes32String = exports3.AbiCoder = void 0;\n var abi_coder_js_1 = require_abi_coder2();\n Object.defineProperty(exports3, \"AbiCoder\", { enumerable: true, get: function() {\n return abi_coder_js_1.AbiCoder;\n } });\n var bytes32_js_1 = require_bytes322();\n Object.defineProperty(exports3, \"decodeBytes32String\", { enumerable: true, get: function() {\n return bytes32_js_1.decodeBytes32String;\n } });\n Object.defineProperty(exports3, \"encodeBytes32String\", { enumerable: true, get: function() {\n return bytes32_js_1.encodeBytes32String;\n } });\n var fragments_js_1 = require_fragments2();\n Object.defineProperty(exports3, \"ConstructorFragment\", { enumerable: true, get: function() {\n return fragments_js_1.ConstructorFragment;\n } });\n Object.defineProperty(exports3, \"ErrorFragment\", { enumerable: true, get: function() {\n return fragments_js_1.ErrorFragment;\n } });\n Object.defineProperty(exports3, \"EventFragment\", { enumerable: true, get: function() {\n return fragments_js_1.EventFragment;\n } });\n Object.defineProperty(exports3, \"FallbackFragment\", { enumerable: true, get: function() {\n return fragments_js_1.FallbackFragment;\n } });\n Object.defineProperty(exports3, \"Fragment\", { enumerable: true, get: function() {\n return fragments_js_1.Fragment;\n } });\n Object.defineProperty(exports3, \"FunctionFragment\", { enumerable: true, get: function() {\n return fragments_js_1.FunctionFragment;\n } });\n Object.defineProperty(exports3, \"NamedFragment\", { enumerable: true, get: function() {\n return fragments_js_1.NamedFragment;\n } });\n Object.defineProperty(exports3, \"ParamType\", { enumerable: true, get: function() {\n return fragments_js_1.ParamType;\n } });\n Object.defineProperty(exports3, \"StructFragment\", { enumerable: true, get: function() {\n return fragments_js_1.StructFragment;\n } });\n var interface_js_1 = require_interface2();\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return interface_js_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"Indexed\", { enumerable: true, get: function() {\n return interface_js_1.Indexed;\n } });\n Object.defineProperty(exports3, \"Interface\", { enumerable: true, get: function() {\n return interface_js_1.Interface;\n } });\n Object.defineProperty(exports3, \"ErrorDescription\", { enumerable: true, get: function() {\n return interface_js_1.ErrorDescription;\n } });\n Object.defineProperty(exports3, \"LogDescription\", { enumerable: true, get: function() {\n return interface_js_1.LogDescription;\n } });\n Object.defineProperty(exports3, \"TransactionDescription\", { enumerable: true, get: function() {\n return interface_js_1.TransactionDescription;\n } });\n Object.defineProperty(exports3, \"Result\", { enumerable: true, get: function() {\n return interface_js_1.Result;\n } });\n var typed_js_1 = require_typed();\n Object.defineProperty(exports3, \"Typed\", { enumerable: true, get: function() {\n return typed_js_1.Typed;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider.js\n var require_provider = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.TransactionResponse = exports3.TransactionReceipt = exports3.Log = exports3.Block = exports3.copyRequest = exports3.FeeData = void 0;\n var index_js_1 = require_utils13();\n var index_js_2 = require_transaction2();\n var BN_0 = BigInt(0);\n function getValue(value) {\n if (value == null) {\n return null;\n }\n return value;\n }\n function toJson(value) {\n if (value == null) {\n return null;\n }\n return value.toString();\n }\n var FeeData = class {\n /**\n * The gas price for legacy networks.\n */\n gasPrice;\n /**\n * The maximum fee to pay per gas.\n *\n * The base fee per gas is defined by the network and based on\n * congestion, increasing the cost during times of heavy load\n * and lowering when less busy.\n *\n * The actual fee per gas will be the base fee for the block\n * and the priority fee, up to the max fee per gas.\n *\n * This will be ``null`` on legacy networks (i.e. [pre-EIP-1559](link-eip-1559))\n */\n maxFeePerGas;\n /**\n * The additional amout to pay per gas to encourage a validator\n * to include the transaction.\n *\n * The purpose of this is to compensate the validator for the\n * adjusted risk for including a given transaction.\n *\n * This will be ``null`` on legacy networks (i.e. [pre-EIP-1559](link-eip-1559))\n */\n maxPriorityFeePerGas;\n /**\n * Creates a new FeeData for %%gasPrice%%, %%maxFeePerGas%% and\n * %%maxPriorityFeePerGas%%.\n */\n constructor(gasPrice, maxFeePerGas, maxPriorityFeePerGas) {\n (0, index_js_1.defineProperties)(this, {\n gasPrice: getValue(gasPrice),\n maxFeePerGas: getValue(maxFeePerGas),\n maxPriorityFeePerGas: getValue(maxPriorityFeePerGas)\n });\n }\n /**\n * Returns a JSON-friendly value.\n */\n toJSON() {\n const { gasPrice, maxFeePerGas, maxPriorityFeePerGas } = this;\n return {\n _type: \"FeeData\",\n gasPrice: toJson(gasPrice),\n maxFeePerGas: toJson(maxFeePerGas),\n maxPriorityFeePerGas: toJson(maxPriorityFeePerGas)\n };\n }\n };\n exports3.FeeData = FeeData;\n function copyRequest(req) {\n const result = {};\n if (req.to) {\n result.to = req.to;\n }\n if (req.from) {\n result.from = req.from;\n }\n if (req.data) {\n result.data = (0, index_js_1.hexlify)(req.data);\n }\n const bigIntKeys = \"chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value\".split(/,/);\n for (const key of bigIntKeys) {\n if (!(key in req) || req[key] == null) {\n continue;\n }\n result[key] = (0, index_js_1.getBigInt)(req[key], `request.${key}`);\n }\n const numberKeys = \"type,nonce\".split(/,/);\n for (const key of numberKeys) {\n if (!(key in req) || req[key] == null) {\n continue;\n }\n result[key] = (0, index_js_1.getNumber)(req[key], `request.${key}`);\n }\n if (req.accessList) {\n result.accessList = (0, index_js_2.accessListify)(req.accessList);\n }\n if (req.authorizationList) {\n result.authorizationList = req.authorizationList.slice();\n }\n if (\"blockTag\" in req) {\n result.blockTag = req.blockTag;\n }\n if (\"enableCcipRead\" in req) {\n result.enableCcipRead = !!req.enableCcipRead;\n }\n if (\"customData\" in req) {\n result.customData = req.customData;\n }\n if (\"blobVersionedHashes\" in req && req.blobVersionedHashes) {\n result.blobVersionedHashes = req.blobVersionedHashes.slice();\n }\n if (\"kzg\" in req) {\n result.kzg = req.kzg;\n }\n if (\"blobs\" in req && req.blobs) {\n result.blobs = req.blobs.map((b4) => {\n if ((0, index_js_1.isBytesLike)(b4)) {\n return (0, index_js_1.hexlify)(b4);\n }\n return Object.assign({}, b4);\n });\n }\n return result;\n }\n exports3.copyRequest = copyRequest;\n var Block = class {\n /**\n * The provider connected to the block used to fetch additional details\n * if necessary.\n */\n provider;\n /**\n * The block number, sometimes called the block height. This is a\n * sequential number that is one higher than the parent block.\n */\n number;\n /**\n * The block hash.\n *\n * This hash includes all properties, so can be safely used to identify\n * an exact set of block properties.\n */\n hash;\n /**\n * The timestamp for this block, which is the number of seconds since\n * epoch that this block was included.\n */\n timestamp;\n /**\n * The block hash of the parent block.\n */\n parentHash;\n /**\n * The hash tree root of the parent beacon block for the given\n * execution block. See [[link-eip-4788]].\n */\n parentBeaconBlockRoot;\n /**\n * The nonce.\n *\n * On legacy networks, this is the random number inserted which\n * permitted the difficulty target to be reached.\n */\n nonce;\n /**\n * The difficulty target.\n *\n * On legacy networks, this is the proof-of-work target required\n * for a block to meet the protocol rules to be included.\n *\n * On modern networks, this is a random number arrived at using\n * randao. @TODO: Find links?\n */\n difficulty;\n /**\n * The total gas limit for this block.\n */\n gasLimit;\n /**\n * The total gas used in this block.\n */\n gasUsed;\n /**\n * The root hash for the global state after applying changes\n * in this block.\n */\n stateRoot;\n /**\n * The hash of the transaction receipts trie.\n */\n receiptsRoot;\n /**\n * The total amount of blob gas consumed by the transactions\n * within the block. See [[link-eip-4844]].\n */\n blobGasUsed;\n /**\n * The running total of blob gas consumed in excess of the\n * target, prior to the block. See [[link-eip-4844]].\n */\n excessBlobGas;\n /**\n * The miner coinbase address, wihch receives any subsidies for\n * including this block.\n */\n miner;\n /**\n * The latest RANDAO mix of the post beacon state of\n * the previous block.\n */\n prevRandao;\n /**\n * Any extra data the validator wished to include.\n */\n extraData;\n /**\n * The base fee per gas that all transactions in this block were\n * charged.\n *\n * This adjusts after each block, depending on how congested the network\n * is.\n */\n baseFeePerGas;\n #transactions;\n /**\n * Create a new **Block** object.\n *\n * This should generally not be necessary as the unless implementing a\n * low-level library.\n */\n constructor(block, provider) {\n this.#transactions = block.transactions.map((tx) => {\n if (typeof tx !== \"string\") {\n return new TransactionResponse(tx, provider);\n }\n return tx;\n });\n (0, index_js_1.defineProperties)(this, {\n provider,\n hash: getValue(block.hash),\n number: block.number,\n timestamp: block.timestamp,\n parentHash: block.parentHash,\n parentBeaconBlockRoot: block.parentBeaconBlockRoot,\n nonce: block.nonce,\n difficulty: block.difficulty,\n gasLimit: block.gasLimit,\n gasUsed: block.gasUsed,\n blobGasUsed: block.blobGasUsed,\n excessBlobGas: block.excessBlobGas,\n miner: block.miner,\n prevRandao: getValue(block.prevRandao),\n extraData: block.extraData,\n baseFeePerGas: getValue(block.baseFeePerGas),\n stateRoot: block.stateRoot,\n receiptsRoot: block.receiptsRoot\n });\n }\n /**\n * Returns the list of transaction hashes, in the order\n * they were executed within the block.\n */\n get transactions() {\n return this.#transactions.map((tx) => {\n if (typeof tx === \"string\") {\n return tx;\n }\n return tx.hash;\n });\n }\n /**\n * Returns the complete transactions, in the order they\n * were executed within the block.\n *\n * This is only available for blocks which prefetched\n * transactions, by passing ``true`` to %%prefetchTxs%%\n * into [[Provider-getBlock]].\n */\n get prefetchedTransactions() {\n const txs = this.#transactions.slice();\n if (txs.length === 0) {\n return [];\n }\n (0, index_js_1.assert)(typeof txs[0] === \"object\", \"transactions were not prefetched with block request\", \"UNSUPPORTED_OPERATION\", {\n operation: \"transactionResponses()\"\n });\n return txs;\n }\n /**\n * Returns a JSON-friendly value.\n */\n toJSON() {\n const { baseFeePerGas, difficulty, extraData, gasLimit, gasUsed, hash: hash3, miner, prevRandao, nonce, number, parentHash, parentBeaconBlockRoot, stateRoot, receiptsRoot, timestamp, transactions } = this;\n return {\n _type: \"Block\",\n baseFeePerGas: toJson(baseFeePerGas),\n difficulty: toJson(difficulty),\n extraData,\n gasLimit: toJson(gasLimit),\n gasUsed: toJson(gasUsed),\n blobGasUsed: toJson(this.blobGasUsed),\n excessBlobGas: toJson(this.excessBlobGas),\n hash: hash3,\n miner,\n prevRandao,\n nonce,\n number,\n parentHash,\n timestamp,\n parentBeaconBlockRoot,\n stateRoot,\n receiptsRoot,\n transactions\n };\n }\n [Symbol.iterator]() {\n let index2 = 0;\n const txs = this.transactions;\n return {\n next: () => {\n if (index2 < this.length) {\n return {\n value: txs[index2++],\n done: false\n };\n }\n return { value: void 0, done: true };\n }\n };\n }\n /**\n * The number of transactions in this block.\n */\n get length() {\n return this.#transactions.length;\n }\n /**\n * The [[link-js-date]] this block was included at.\n */\n get date() {\n if (this.timestamp == null) {\n return null;\n }\n return new Date(this.timestamp * 1e3);\n }\n /**\n * Get the transaction at %%indexe%% within this block.\n */\n async getTransaction(indexOrHash) {\n let tx = void 0;\n if (typeof indexOrHash === \"number\") {\n tx = this.#transactions[indexOrHash];\n } else {\n const hash3 = indexOrHash.toLowerCase();\n for (const v2 of this.#transactions) {\n if (typeof v2 === \"string\") {\n if (v2 !== hash3) {\n continue;\n }\n tx = v2;\n break;\n } else {\n if (v2.hash !== hash3) {\n continue;\n }\n tx = v2;\n break;\n }\n }\n }\n if (tx == null) {\n throw new Error(\"no such tx\");\n }\n if (typeof tx === \"string\") {\n return await this.provider.getTransaction(tx);\n } else {\n return tx;\n }\n }\n /**\n * If a **Block** was fetched with a request to include the transactions\n * this will allow synchronous access to those transactions.\n *\n * If the transactions were not prefetched, this will throw.\n */\n getPrefetchedTransaction(indexOrHash) {\n const txs = this.prefetchedTransactions;\n if (typeof indexOrHash === \"number\") {\n return txs[indexOrHash];\n }\n indexOrHash = indexOrHash.toLowerCase();\n for (const tx of txs) {\n if (tx.hash === indexOrHash) {\n return tx;\n }\n }\n (0, index_js_1.assertArgument)(false, \"no matching transaction\", \"indexOrHash\", indexOrHash);\n }\n /**\n * Returns true if this block been mined. This provides a type guard\n * for all properties on a [[MinedBlock]].\n */\n isMined() {\n return !!this.hash;\n }\n /**\n * Returns true if this block is an [[link-eip-2930]] block.\n */\n isLondon() {\n return !!this.baseFeePerGas;\n }\n /**\n * @_ignore:\n */\n orphanedEvent() {\n if (!this.isMined()) {\n throw new Error(\"\");\n }\n return createOrphanedBlockFilter(this);\n }\n };\n exports3.Block = Block;\n var Log = class {\n /**\n * The provider connected to the log used to fetch additional details\n * if necessary.\n */\n provider;\n /**\n * The transaction hash of the transaction this log occurred in. Use the\n * [[Log-getTransaction]] to get the [[TransactionResponse]].\n */\n transactionHash;\n /**\n * The block hash of the block this log occurred in. Use the\n * [[Log-getBlock]] to get the [[Block]].\n */\n blockHash;\n /**\n * The block number of the block this log occurred in. It is preferred\n * to use the [[Block-hash]] when fetching the related [[Block]],\n * since in the case of an orphaned block, the block at that height may\n * have changed.\n */\n blockNumber;\n /**\n * If the **Log** represents a block that was removed due to an orphaned\n * block, this will be true.\n *\n * This can only happen within an orphan event listener.\n */\n removed;\n /**\n * The address of the contract that emitted this log.\n */\n address;\n /**\n * The data included in this log when it was emitted.\n */\n data;\n /**\n * The indexed topics included in this log when it was emitted.\n *\n * All topics are included in the bloom filters, so they can be\n * efficiently filtered using the [[Provider-getLogs]] method.\n */\n topics;\n /**\n * The index within the block this log occurred at. This is generally\n * not useful to developers, but can be used with the various roots\n * to proof inclusion within a block.\n */\n index;\n /**\n * The index within the transaction of this log.\n */\n transactionIndex;\n /**\n * @_ignore:\n */\n constructor(log, provider) {\n this.provider = provider;\n const topics = Object.freeze(log.topics.slice());\n (0, index_js_1.defineProperties)(this, {\n transactionHash: log.transactionHash,\n blockHash: log.blockHash,\n blockNumber: log.blockNumber,\n removed: log.removed,\n address: log.address,\n data: log.data,\n topics,\n index: log.index,\n transactionIndex: log.transactionIndex\n });\n }\n /**\n * Returns a JSON-compatible object.\n */\n toJSON() {\n const { address, blockHash, blockNumber, data, index: index2, removed, topics, transactionHash, transactionIndex } = this;\n return {\n _type: \"log\",\n address,\n blockHash,\n blockNumber,\n data,\n index: index2,\n removed,\n topics,\n transactionHash,\n transactionIndex\n };\n }\n /**\n * Returns the block that this log occurred in.\n */\n async getBlock() {\n const block = await this.provider.getBlock(this.blockHash);\n (0, index_js_1.assert)(!!block, \"failed to find transaction\", \"UNKNOWN_ERROR\", {});\n return block;\n }\n /**\n * Returns the transaction that this log occurred in.\n */\n async getTransaction() {\n const tx = await this.provider.getTransaction(this.transactionHash);\n (0, index_js_1.assert)(!!tx, \"failed to find transaction\", \"UNKNOWN_ERROR\", {});\n return tx;\n }\n /**\n * Returns the transaction receipt fot the transaction that this\n * log occurred in.\n */\n async getTransactionReceipt() {\n const receipt = await this.provider.getTransactionReceipt(this.transactionHash);\n (0, index_js_1.assert)(!!receipt, \"failed to find transaction receipt\", \"UNKNOWN_ERROR\", {});\n return receipt;\n }\n /**\n * @_ignore:\n */\n removedEvent() {\n return createRemovedLogFilter(this);\n }\n };\n exports3.Log = Log;\n var TransactionReceipt = class {\n /**\n * The provider connected to the log used to fetch additional details\n * if necessary.\n */\n provider;\n /**\n * The address the transaction was sent to.\n */\n to;\n /**\n * The sender of the transaction.\n */\n from;\n /**\n * The address of the contract if the transaction was directly\n * responsible for deploying one.\n *\n * This is non-null **only** if the ``to`` is empty and the ``data``\n * was successfully executed as initcode.\n */\n contractAddress;\n /**\n * The transaction hash.\n */\n hash;\n /**\n * The index of this transaction within the block transactions.\n */\n index;\n /**\n * The block hash of the [[Block]] this transaction was included in.\n */\n blockHash;\n /**\n * The block number of the [[Block]] this transaction was included in.\n */\n blockNumber;\n /**\n * The bloom filter bytes that represent all logs that occurred within\n * this transaction. This is generally not useful for most developers,\n * but can be used to validate the included logs.\n */\n logsBloom;\n /**\n * The actual amount of gas used by this transaction.\n *\n * When creating a transaction, the amount of gas that will be used can\n * only be approximated, but the sender must pay the gas fee for the\n * entire gas limit. After the transaction, the difference is refunded.\n */\n gasUsed;\n /**\n * The gas used for BLObs. See [[link-eip-4844]].\n */\n blobGasUsed;\n /**\n * The amount of gas used by all transactions within the block for this\n * and all transactions with a lower ``index``.\n *\n * This is generally not useful for developers but can be used to\n * validate certain aspects of execution.\n */\n cumulativeGasUsed;\n /**\n * The actual gas price used during execution.\n *\n * Due to the complexity of [[link-eip-1559]] this value can only\n * be caluclated after the transaction has been mined, snce the base\n * fee is protocol-enforced.\n */\n gasPrice;\n /**\n * The price paid per BLOB in gas. See [[link-eip-4844]].\n */\n blobGasPrice;\n /**\n * The [[link-eip-2718]] transaction type.\n */\n type;\n //readonly byzantium!: boolean;\n /**\n * The status of this transaction, indicating success (i.e. ``1``) or\n * a revert (i.e. ``0``).\n *\n * This is available in post-byzantium blocks, but some backends may\n * backfill this value.\n */\n status;\n /**\n * The root hash of this transaction.\n *\n * This is no present and was only included in pre-byzantium blocks, but\n * could be used to validate certain parts of the receipt.\n */\n root;\n #logs;\n /**\n * @_ignore:\n */\n constructor(tx, provider) {\n this.#logs = Object.freeze(tx.logs.map((log) => {\n return new Log(log, provider);\n }));\n let gasPrice = BN_0;\n if (tx.effectiveGasPrice != null) {\n gasPrice = tx.effectiveGasPrice;\n } else if (tx.gasPrice != null) {\n gasPrice = tx.gasPrice;\n }\n (0, index_js_1.defineProperties)(this, {\n provider,\n to: tx.to,\n from: tx.from,\n contractAddress: tx.contractAddress,\n hash: tx.hash,\n index: tx.index,\n blockHash: tx.blockHash,\n blockNumber: tx.blockNumber,\n logsBloom: tx.logsBloom,\n gasUsed: tx.gasUsed,\n cumulativeGasUsed: tx.cumulativeGasUsed,\n blobGasUsed: tx.blobGasUsed,\n gasPrice,\n blobGasPrice: tx.blobGasPrice,\n type: tx.type,\n //byzantium: tx.byzantium,\n status: tx.status,\n root: tx.root\n });\n }\n /**\n * The logs for this transaction.\n */\n get logs() {\n return this.#logs;\n }\n /**\n * Returns a JSON-compatible representation.\n */\n toJSON() {\n const {\n to,\n from: from14,\n contractAddress,\n hash: hash3,\n index: index2,\n blockHash,\n blockNumber,\n logsBloom,\n logs,\n //byzantium, \n status,\n root\n } = this;\n return {\n _type: \"TransactionReceipt\",\n blockHash,\n blockNumber,\n //byzantium, \n contractAddress,\n cumulativeGasUsed: toJson(this.cumulativeGasUsed),\n from: from14,\n gasPrice: toJson(this.gasPrice),\n blobGasUsed: toJson(this.blobGasUsed),\n blobGasPrice: toJson(this.blobGasPrice),\n gasUsed: toJson(this.gasUsed),\n hash: hash3,\n index: index2,\n logs,\n logsBloom,\n root,\n status,\n to\n };\n }\n /**\n * @_ignore:\n */\n get length() {\n return this.logs.length;\n }\n [Symbol.iterator]() {\n let index2 = 0;\n return {\n next: () => {\n if (index2 < this.length) {\n return { value: this.logs[index2++], done: false };\n }\n return { value: void 0, done: true };\n }\n };\n }\n /**\n * The total fee for this transaction, in wei.\n */\n get fee() {\n return this.gasUsed * this.gasPrice;\n }\n /**\n * Resolves to the block this transaction occurred in.\n */\n async getBlock() {\n const block = await this.provider.getBlock(this.blockHash);\n if (block == null) {\n throw new Error(\"TODO\");\n }\n return block;\n }\n /**\n * Resolves to the transaction this transaction occurred in.\n */\n async getTransaction() {\n const tx = await this.provider.getTransaction(this.hash);\n if (tx == null) {\n throw new Error(\"TODO\");\n }\n return tx;\n }\n /**\n * Resolves to the return value of the execution of this transaction.\n *\n * Support for this feature is limited, as it requires an archive node\n * with the ``debug_`` or ``trace_`` API enabled.\n */\n async getResult() {\n return await this.provider.getTransactionResult(this.hash);\n }\n /**\n * Resolves to the number of confirmations this transaction has.\n */\n async confirmations() {\n return await this.provider.getBlockNumber() - this.blockNumber + 1;\n }\n /**\n * @_ignore:\n */\n removedEvent() {\n return createRemovedTransactionFilter(this);\n }\n /**\n * @_ignore:\n */\n reorderedEvent(other) {\n (0, index_js_1.assert)(!other || other.isMined(), \"unmined 'other' transction cannot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"reorderedEvent(other)\" });\n return createReorderedTransactionFilter(this, other);\n }\n };\n exports3.TransactionReceipt = TransactionReceipt;\n var TransactionResponse = class _TransactionResponse {\n /**\n * The provider this is connected to, which will influence how its\n * methods will resolve its async inspection methods.\n */\n provider;\n /**\n * The block number of the block that this transaction was included in.\n *\n * This is ``null`` for pending transactions.\n */\n blockNumber;\n /**\n * The blockHash of the block that this transaction was included in.\n *\n * This is ``null`` for pending transactions.\n */\n blockHash;\n /**\n * The index within the block that this transaction resides at.\n */\n index;\n /**\n * The transaction hash.\n */\n hash;\n /**\n * The [[link-eip-2718]] transaction envelope type. This is\n * ``0`` for legacy transactions types.\n */\n type;\n /**\n * The receiver of this transaction.\n *\n * If ``null``, then the transaction is an initcode transaction.\n * This means the result of executing the [[data]] will be deployed\n * as a new contract on chain (assuming it does not revert) and the\n * address may be computed using [[getCreateAddress]].\n */\n to;\n /**\n * The sender of this transaction. It is implicitly computed\n * from the transaction pre-image hash (as the digest) and the\n * [[signature]] using ecrecover.\n */\n from;\n /**\n * The nonce, which is used to prevent replay attacks and offer\n * a method to ensure transactions from a given sender are explicitly\n * ordered.\n *\n * When sending a transaction, this must be equal to the number of\n * transactions ever sent by [[from]].\n */\n nonce;\n /**\n * The maximum units of gas this transaction can consume. If execution\n * exceeds this, the entries transaction is reverted and the sender\n * is charged for the full amount, despite not state changes being made.\n */\n gasLimit;\n /**\n * The gas price can have various values, depending on the network.\n *\n * In modern networks, for transactions that are included this is\n * the //effective gas price// (the fee per gas that was actually\n * charged), while for transactions that have not been included yet\n * is the [[maxFeePerGas]].\n *\n * For legacy transactions, or transactions on legacy networks, this\n * is the fee that will be charged per unit of gas the transaction\n * consumes.\n */\n gasPrice;\n /**\n * The maximum priority fee (per unit of gas) to allow a\n * validator to charge the sender. This is inclusive of the\n * [[maxFeeFeePerGas]].\n */\n maxPriorityFeePerGas;\n /**\n * The maximum fee (per unit of gas) to allow this transaction\n * to charge the sender.\n */\n maxFeePerGas;\n /**\n * The [[link-eip-4844]] max fee per BLOb gas.\n */\n maxFeePerBlobGas;\n /**\n * The data.\n */\n data;\n /**\n * The value, in wei. Use [[formatEther]] to format this value\n * as ether.\n */\n value;\n /**\n * The chain ID.\n */\n chainId;\n /**\n * The signature.\n */\n signature;\n /**\n * The [[link-eip-2930]] access list for transaction types that\n * support it, otherwise ``null``.\n */\n accessList;\n /**\n * The [[link-eip-4844]] BLOb versioned hashes.\n */\n blobVersionedHashes;\n /**\n * The [[link-eip-7702]] authorizations (if any).\n */\n authorizationList;\n #startBlock;\n /**\n * @_ignore:\n */\n constructor(tx, provider) {\n this.provider = provider;\n this.blockNumber = tx.blockNumber != null ? tx.blockNumber : null;\n this.blockHash = tx.blockHash != null ? tx.blockHash : null;\n this.hash = tx.hash;\n this.index = tx.index;\n this.type = tx.type;\n this.from = tx.from;\n this.to = tx.to || null;\n this.gasLimit = tx.gasLimit;\n this.nonce = tx.nonce;\n this.data = tx.data;\n this.value = tx.value;\n this.gasPrice = tx.gasPrice;\n this.maxPriorityFeePerGas = tx.maxPriorityFeePerGas != null ? tx.maxPriorityFeePerGas : null;\n this.maxFeePerGas = tx.maxFeePerGas != null ? tx.maxFeePerGas : null;\n this.maxFeePerBlobGas = tx.maxFeePerBlobGas != null ? tx.maxFeePerBlobGas : null;\n this.chainId = tx.chainId;\n this.signature = tx.signature;\n this.accessList = tx.accessList != null ? tx.accessList : null;\n this.blobVersionedHashes = tx.blobVersionedHashes != null ? tx.blobVersionedHashes : null;\n this.authorizationList = tx.authorizationList != null ? tx.authorizationList : null;\n this.#startBlock = -1;\n }\n /**\n * Returns a JSON-compatible representation of this transaction.\n */\n toJSON() {\n const { blockNumber, blockHash, index: index2, hash: hash3, type, to, from: from14, nonce, data, signature, accessList, blobVersionedHashes } = this;\n return {\n _type: \"TransactionResponse\",\n accessList,\n blockNumber,\n blockHash,\n blobVersionedHashes,\n chainId: toJson(this.chainId),\n data,\n from: from14,\n gasLimit: toJson(this.gasLimit),\n gasPrice: toJson(this.gasPrice),\n hash: hash3,\n maxFeePerGas: toJson(this.maxFeePerGas),\n maxPriorityFeePerGas: toJson(this.maxPriorityFeePerGas),\n maxFeePerBlobGas: toJson(this.maxFeePerBlobGas),\n nonce,\n signature,\n to,\n index: index2,\n type,\n value: toJson(this.value)\n };\n }\n /**\n * Resolves to the Block that this transaction was included in.\n *\n * This will return null if the transaction has not been included yet.\n */\n async getBlock() {\n let blockNumber = this.blockNumber;\n if (blockNumber == null) {\n const tx = await this.getTransaction();\n if (tx) {\n blockNumber = tx.blockNumber;\n }\n }\n if (blockNumber == null) {\n return null;\n }\n const block = this.provider.getBlock(blockNumber);\n if (block == null) {\n throw new Error(\"TODO\");\n }\n return block;\n }\n /**\n * Resolves to this transaction being re-requested from the\n * provider. This can be used if you have an unmined transaction\n * and wish to get an up-to-date populated instance.\n */\n async getTransaction() {\n return this.provider.getTransaction(this.hash);\n }\n /**\n * Resolve to the number of confirmations this transaction has.\n */\n async confirmations() {\n if (this.blockNumber == null) {\n const { tx, blockNumber: blockNumber2 } = await (0, index_js_1.resolveProperties)({\n tx: this.getTransaction(),\n blockNumber: this.provider.getBlockNumber()\n });\n if (tx == null || tx.blockNumber == null) {\n return 0;\n }\n return blockNumber2 - tx.blockNumber + 1;\n }\n const blockNumber = await this.provider.getBlockNumber();\n return blockNumber - this.blockNumber + 1;\n }\n /**\n * Resolves once this transaction has been mined and has\n * %%confirms%% blocks including it (default: ``1``) with an\n * optional %%timeout%%.\n *\n * This can resolve to ``null`` only if %%confirms%% is ``0``\n * and the transaction has not been mined, otherwise this will\n * wait until enough confirmations have completed.\n */\n async wait(_confirms, _timeout) {\n const confirms = _confirms == null ? 1 : _confirms;\n const timeout = _timeout == null ? 0 : _timeout;\n let startBlock = this.#startBlock;\n let nextScan = -1;\n let stopScanning = startBlock === -1 ? true : false;\n const checkReplacement = async () => {\n if (stopScanning) {\n return null;\n }\n const { blockNumber, nonce } = await (0, index_js_1.resolveProperties)({\n blockNumber: this.provider.getBlockNumber(),\n nonce: this.provider.getTransactionCount(this.from)\n });\n if (nonce < this.nonce) {\n startBlock = blockNumber;\n return;\n }\n if (stopScanning) {\n return null;\n }\n const mined = await this.getTransaction();\n if (mined && mined.blockNumber != null) {\n return;\n }\n if (nextScan === -1) {\n nextScan = startBlock - 3;\n if (nextScan < this.#startBlock) {\n nextScan = this.#startBlock;\n }\n }\n while (nextScan <= blockNumber) {\n if (stopScanning) {\n return null;\n }\n const block = await this.provider.getBlock(nextScan, true);\n if (block == null) {\n return;\n }\n for (const hash3 of block) {\n if (hash3 === this.hash) {\n return;\n }\n }\n for (let i3 = 0; i3 < block.length; i3++) {\n const tx = await block.getTransaction(i3);\n if (tx.from === this.from && tx.nonce === this.nonce) {\n if (stopScanning) {\n return null;\n }\n const receipt2 = await this.provider.getTransactionReceipt(tx.hash);\n if (receipt2 == null) {\n return;\n }\n if (blockNumber - receipt2.blockNumber + 1 < confirms) {\n return;\n }\n let reason = \"replaced\";\n if (tx.data === this.data && tx.to === this.to && tx.value === this.value) {\n reason = \"repriced\";\n } else if (tx.data === \"0x\" && tx.from === tx.to && tx.value === BN_0) {\n reason = \"cancelled\";\n }\n (0, index_js_1.assert)(false, \"transaction was replaced\", \"TRANSACTION_REPLACED\", {\n cancelled: reason === \"replaced\" || reason === \"cancelled\",\n reason,\n replacement: tx.replaceableTransaction(startBlock),\n hash: tx.hash,\n receipt: receipt2\n });\n }\n }\n nextScan++;\n }\n return;\n };\n const checkReceipt = (receipt2) => {\n if (receipt2 == null || receipt2.status !== 0) {\n return receipt2;\n }\n (0, index_js_1.assert)(false, \"transaction execution reverted\", \"CALL_EXCEPTION\", {\n action: \"sendTransaction\",\n data: null,\n reason: null,\n invocation: null,\n revert: null,\n transaction: {\n to: receipt2.to,\n from: receipt2.from,\n data: \"\"\n // @TODO: in v7, split out sendTransaction properties\n },\n receipt: receipt2\n });\n };\n const receipt = await this.provider.getTransactionReceipt(this.hash);\n if (confirms === 0) {\n return checkReceipt(receipt);\n }\n if (receipt) {\n if (confirms === 1 || await receipt.confirmations() >= confirms) {\n return checkReceipt(receipt);\n }\n } else {\n await checkReplacement();\n if (confirms === 0) {\n return null;\n }\n }\n const waiter = new Promise((resolve, reject) => {\n const cancellers = [];\n const cancel = () => {\n cancellers.forEach((c4) => c4());\n };\n cancellers.push(() => {\n stopScanning = true;\n });\n if (timeout > 0) {\n const timer = setTimeout(() => {\n cancel();\n reject((0, index_js_1.makeError)(\"wait for transaction timeout\", \"TIMEOUT\"));\n }, timeout);\n cancellers.push(() => {\n clearTimeout(timer);\n });\n }\n const txListener = async (receipt2) => {\n if (await receipt2.confirmations() >= confirms) {\n cancel();\n try {\n resolve(checkReceipt(receipt2));\n } catch (error) {\n reject(error);\n }\n }\n };\n cancellers.push(() => {\n this.provider.off(this.hash, txListener);\n });\n this.provider.on(this.hash, txListener);\n if (startBlock >= 0) {\n const replaceListener = async () => {\n try {\n await checkReplacement();\n } catch (error) {\n if ((0, index_js_1.isError)(error, \"TRANSACTION_REPLACED\")) {\n cancel();\n reject(error);\n return;\n }\n }\n if (!stopScanning) {\n this.provider.once(\"block\", replaceListener);\n }\n };\n cancellers.push(() => {\n this.provider.off(\"block\", replaceListener);\n });\n this.provider.once(\"block\", replaceListener);\n }\n });\n return await waiter;\n }\n /**\n * Returns ``true`` if this transaction has been included.\n *\n * This is effective only as of the time the TransactionResponse\n * was instantiated. To get up-to-date information, use\n * [[getTransaction]].\n *\n * This provides a Type Guard that this transaction will have\n * non-null property values for properties that are null for\n * unmined transactions.\n */\n isMined() {\n return this.blockHash != null;\n }\n /**\n * Returns true if the transaction is a legacy (i.e. ``type == 0``)\n * transaction.\n *\n * This provides a Type Guard that this transaction will have\n * the ``null``-ness for hardfork-specific properties set correctly.\n */\n isLegacy() {\n return this.type === 0;\n }\n /**\n * Returns true if the transaction is a Berlin (i.e. ``type == 1``)\n * transaction. See [[link-eip-2070]].\n *\n * This provides a Type Guard that this transaction will have\n * the ``null``-ness for hardfork-specific properties set correctly.\n */\n isBerlin() {\n return this.type === 1;\n }\n /**\n * Returns true if the transaction is a London (i.e. ``type == 2``)\n * transaction. See [[link-eip-1559]].\n *\n * This provides a Type Guard that this transaction will have\n * the ``null``-ness for hardfork-specific properties set correctly.\n */\n isLondon() {\n return this.type === 2;\n }\n /**\n * Returns true if hte transaction is a Cancun (i.e. ``type == 3``)\n * transaction. See [[link-eip-4844]].\n */\n isCancun() {\n return this.type === 3;\n }\n /**\n * Returns a filter which can be used to listen for orphan events\n * that evict this transaction.\n */\n removedEvent() {\n (0, index_js_1.assert)(this.isMined(), \"unmined transaction canot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"removeEvent()\" });\n return createRemovedTransactionFilter(this);\n }\n /**\n * Returns a filter which can be used to listen for orphan events\n * that re-order this event against %%other%%.\n */\n reorderedEvent(other) {\n (0, index_js_1.assert)(this.isMined(), \"unmined transaction canot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"removeEvent()\" });\n (0, index_js_1.assert)(!other || other.isMined(), \"unmined 'other' transaction canot be orphaned\", \"UNSUPPORTED_OPERATION\", { operation: \"removeEvent()\" });\n return createReorderedTransactionFilter(this, other);\n }\n /**\n * Returns a new TransactionResponse instance which has the ability to\n * detect (and throw an error) if the transaction is replaced, which\n * will begin scanning at %%startBlock%%.\n *\n * This should generally not be used by developers and is intended\n * primarily for internal use. Setting an incorrect %%startBlock%% can\n * have devastating performance consequences if used incorrectly.\n */\n replaceableTransaction(startBlock) {\n (0, index_js_1.assertArgument)(Number.isInteger(startBlock) && startBlock >= 0, \"invalid startBlock\", \"startBlock\", startBlock);\n const tx = new _TransactionResponse(this, this.provider);\n tx.#startBlock = startBlock;\n return tx;\n }\n };\n exports3.TransactionResponse = TransactionResponse;\n function createOrphanedBlockFilter(block) {\n return { orphan: \"drop-block\", hash: block.hash, number: block.number };\n }\n function createReorderedTransactionFilter(tx, other) {\n return { orphan: \"reorder-transaction\", tx, other };\n }\n function createRemovedTransactionFilter(tx) {\n return { orphan: \"drop-transaction\", tx };\n }\n function createRemovedLogFilter(log) {\n return { orphan: \"drop-log\", log: {\n transactionHash: log.transactionHash,\n blockHash: log.blockHash,\n blockNumber: log.blockNumber,\n address: log.address,\n data: log.data,\n topics: Object.freeze(log.topics.slice()),\n index: log.index\n } };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/wrappers.js\n var require_wrappers = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/wrappers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ContractEventPayload = exports3.ContractUnknownEventPayload = exports3.ContractTransactionResponse = exports3.ContractTransactionReceipt = exports3.UndecodedEventLog = exports3.EventLog = void 0;\n var provider_js_1 = require_provider();\n var index_js_1 = require_utils13();\n var EventLog = class extends provider_js_1.Log {\n /**\n * The Contract Interface.\n */\n interface;\n /**\n * The matching event.\n */\n fragment;\n /**\n * The parsed arguments passed to the event by ``emit``.\n */\n args;\n /**\n * @_ignore:\n */\n constructor(log, iface, fragment) {\n super(log, log.provider);\n const args = iface.decodeEventLog(fragment, log.data, log.topics);\n (0, index_js_1.defineProperties)(this, { args, fragment, interface: iface });\n }\n /**\n * The name of the event.\n */\n get eventName() {\n return this.fragment.name;\n }\n /**\n * The signature of the event.\n */\n get eventSignature() {\n return this.fragment.format();\n }\n };\n exports3.EventLog = EventLog;\n var UndecodedEventLog = class extends provider_js_1.Log {\n /**\n * The error encounted when trying to decode the log.\n */\n error;\n /**\n * @_ignore:\n */\n constructor(log, error) {\n super(log, log.provider);\n (0, index_js_1.defineProperties)(this, { error });\n }\n };\n exports3.UndecodedEventLog = UndecodedEventLog;\n var ContractTransactionReceipt = class extends provider_js_1.TransactionReceipt {\n #iface;\n /**\n * @_ignore:\n */\n constructor(iface, provider, tx) {\n super(tx, provider);\n this.#iface = iface;\n }\n /**\n * The parsed logs for any [[Log]] which has a matching event in the\n * Contract ABI.\n */\n get logs() {\n return super.logs.map((log) => {\n const fragment = log.topics.length ? this.#iface.getEvent(log.topics[0]) : null;\n if (fragment) {\n try {\n return new EventLog(log, this.#iface, fragment);\n } catch (error) {\n return new UndecodedEventLog(log, error);\n }\n }\n return log;\n });\n }\n };\n exports3.ContractTransactionReceipt = ContractTransactionReceipt;\n var ContractTransactionResponse = class extends provider_js_1.TransactionResponse {\n #iface;\n /**\n * @_ignore:\n */\n constructor(iface, provider, tx) {\n super(tx, provider);\n this.#iface = iface;\n }\n /**\n * Resolves once this transaction has been mined and has\n * %%confirms%% blocks including it (default: ``1``) with an\n * optional %%timeout%%.\n *\n * This can resolve to ``null`` only if %%confirms%% is ``0``\n * and the transaction has not been mined, otherwise this will\n * wait until enough confirmations have completed.\n */\n async wait(confirms, timeout) {\n const receipt = await super.wait(confirms, timeout);\n if (receipt == null) {\n return null;\n }\n return new ContractTransactionReceipt(this.#iface, this.provider, receipt);\n }\n };\n exports3.ContractTransactionResponse = ContractTransactionResponse;\n var ContractUnknownEventPayload = class extends index_js_1.EventPayload {\n /**\n * The log with no matching events.\n */\n log;\n /**\n * @_event:\n */\n constructor(contract, listener, filter, log) {\n super(contract, listener, filter);\n (0, index_js_1.defineProperties)(this, { log });\n }\n /**\n * Resolves to the block the event occured in.\n */\n async getBlock() {\n return await this.log.getBlock();\n }\n /**\n * Resolves to the transaction the event occured in.\n */\n async getTransaction() {\n return await this.log.getTransaction();\n }\n /**\n * Resolves to the transaction receipt the event occured in.\n */\n async getTransactionReceipt() {\n return await this.log.getTransactionReceipt();\n }\n };\n exports3.ContractUnknownEventPayload = ContractUnknownEventPayload;\n var ContractEventPayload = class extends ContractUnknownEventPayload {\n /**\n * @_ignore:\n */\n constructor(contract, listener, filter, fragment, _log) {\n super(contract, listener, filter, new EventLog(_log, contract.interface, fragment));\n const args = contract.interface.decodeEventLog(fragment, this.log.data, this.log.topics);\n (0, index_js_1.defineProperties)(this, { args, fragment });\n }\n /**\n * The event name.\n */\n get eventName() {\n return this.fragment.name;\n }\n /**\n * The event signature.\n */\n get eventSignature() {\n return this.fragment.format();\n }\n };\n exports3.ContractEventPayload = ContractEventPayload;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/contract.js\n var require_contract = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/contract.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Contract = exports3.BaseContract = exports3.resolveArgs = exports3.copyOverrides = void 0;\n var index_js_1 = require_abi();\n var index_js_2 = require_address3();\n var provider_js_1 = require_provider();\n var index_js_3 = require_utils13();\n var wrappers_js_1 = require_wrappers();\n var BN_0 = BigInt(0);\n function canCall(value) {\n return value && typeof value.call === \"function\";\n }\n function canEstimate(value) {\n return value && typeof value.estimateGas === \"function\";\n }\n function canResolve(value) {\n return value && typeof value.resolveName === \"function\";\n }\n function canSend(value) {\n return value && typeof value.sendTransaction === \"function\";\n }\n function getResolver(value) {\n if (value != null) {\n if (canResolve(value)) {\n return value;\n }\n if (value.provider) {\n return value.provider;\n }\n }\n return void 0;\n }\n var PreparedTopicFilter = class {\n #filter;\n fragment;\n constructor(contract, fragment, args) {\n (0, index_js_3.defineProperties)(this, { fragment });\n if (fragment.inputs.length < args.length) {\n throw new Error(\"too many arguments\");\n }\n const runner = getRunner(contract.runner, \"resolveName\");\n const resolver = canResolve(runner) ? runner : null;\n this.#filter = async function() {\n const resolvedArgs = await Promise.all(fragment.inputs.map((param, index2) => {\n const arg = args[index2];\n if (arg == null) {\n return null;\n }\n return param.walkAsync(args[index2], (type, value) => {\n if (type === \"address\") {\n if (Array.isArray(value)) {\n return Promise.all(value.map((v2) => (0, index_js_2.resolveAddress)(v2, resolver)));\n }\n return (0, index_js_2.resolveAddress)(value, resolver);\n }\n return value;\n });\n }));\n return contract.interface.encodeFilterTopics(fragment, resolvedArgs);\n }();\n }\n getTopicFilter() {\n return this.#filter;\n }\n };\n function getRunner(value, feature) {\n if (value == null) {\n return null;\n }\n if (typeof value[feature] === \"function\") {\n return value;\n }\n if (value.provider && typeof value.provider[feature] === \"function\") {\n return value.provider;\n }\n return null;\n }\n function getProvider(value) {\n if (value == null) {\n return null;\n }\n return value.provider || null;\n }\n async function copyOverrides(arg, allowed) {\n const _overrides = index_js_1.Typed.dereference(arg, \"overrides\");\n (0, index_js_3.assertArgument)(typeof _overrides === \"object\", \"invalid overrides parameter\", \"overrides\", arg);\n const overrides = (0, provider_js_1.copyRequest)(_overrides);\n (0, index_js_3.assertArgument)(overrides.to == null || (allowed || []).indexOf(\"to\") >= 0, \"cannot override to\", \"overrides.to\", overrides.to);\n (0, index_js_3.assertArgument)(overrides.data == null || (allowed || []).indexOf(\"data\") >= 0, \"cannot override data\", \"overrides.data\", overrides.data);\n if (overrides.from) {\n overrides.from = overrides.from;\n }\n return overrides;\n }\n exports3.copyOverrides = copyOverrides;\n async function resolveArgs(_runner, inputs, args) {\n const runner = getRunner(_runner, \"resolveName\");\n const resolver = canResolve(runner) ? runner : null;\n return await Promise.all(inputs.map((param, index2) => {\n return param.walkAsync(args[index2], (type, value) => {\n value = index_js_1.Typed.dereference(value, type);\n if (type === \"address\") {\n return (0, index_js_2.resolveAddress)(value, resolver);\n }\n return value;\n });\n }));\n }\n exports3.resolveArgs = resolveArgs;\n function buildWrappedFallback(contract) {\n const populateTransaction = async function(overrides) {\n const tx = await copyOverrides(overrides, [\"data\"]);\n tx.to = await contract.getAddress();\n if (tx.from) {\n tx.from = await (0, index_js_2.resolveAddress)(tx.from, getResolver(contract.runner));\n }\n const iface = contract.interface;\n const noValue = (0, index_js_3.getBigInt)(tx.value || BN_0, \"overrides.value\") === BN_0;\n const noData = (tx.data || \"0x\") === \"0x\";\n if (iface.fallback && !iface.fallback.payable && iface.receive && !noData && !noValue) {\n (0, index_js_3.assertArgument)(false, \"cannot send data to receive or send value to non-payable fallback\", \"overrides\", overrides);\n }\n (0, index_js_3.assertArgument)(iface.fallback || noData, \"cannot send data to receive-only contract\", \"overrides.data\", tx.data);\n const payable = iface.receive || iface.fallback && iface.fallback.payable;\n (0, index_js_3.assertArgument)(payable || noValue, \"cannot send value to non-payable fallback\", \"overrides.value\", tx.value);\n (0, index_js_3.assertArgument)(iface.fallback || noData, \"cannot send data to receive-only contract\", \"overrides.data\", tx.data);\n return tx;\n };\n const staticCall = async function(overrides) {\n const runner = getRunner(contract.runner, \"call\");\n (0, index_js_3.assert)(canCall(runner), \"contract runner does not support calling\", \"UNSUPPORTED_OPERATION\", { operation: \"call\" });\n const tx = await populateTransaction(overrides);\n try {\n return await runner.call(tx);\n } catch (error) {\n if ((0, index_js_3.isCallException)(error) && error.data) {\n throw contract.interface.makeError(error.data, tx);\n }\n throw error;\n }\n };\n const send = async function(overrides) {\n const runner = contract.runner;\n (0, index_js_3.assert)(canSend(runner), \"contract runner does not support sending transactions\", \"UNSUPPORTED_OPERATION\", { operation: \"sendTransaction\" });\n const tx = await runner.sendTransaction(await populateTransaction(overrides));\n const provider = getProvider(contract.runner);\n return new wrappers_js_1.ContractTransactionResponse(contract.interface, provider, tx);\n };\n const estimateGas2 = async function(overrides) {\n const runner = getRunner(contract.runner, \"estimateGas\");\n (0, index_js_3.assert)(canEstimate(runner), \"contract runner does not support gas estimation\", \"UNSUPPORTED_OPERATION\", { operation: \"estimateGas\" });\n return await runner.estimateGas(await populateTransaction(overrides));\n };\n const method = async (overrides) => {\n return await send(overrides);\n };\n (0, index_js_3.defineProperties)(method, {\n _contract: contract,\n estimateGas: estimateGas2,\n populateTransaction,\n send,\n staticCall\n });\n return method;\n }\n function buildWrappedMethod(contract, key) {\n const getFragment = function(...args) {\n const fragment = contract.interface.getFunction(key, args);\n (0, index_js_3.assert)(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key, args }\n });\n return fragment;\n };\n const populateTransaction = async function(...args) {\n const fragment = getFragment(...args);\n let overrides = {};\n if (fragment.inputs.length + 1 === args.length) {\n overrides = await copyOverrides(args.pop());\n if (overrides.from) {\n overrides.from = await (0, index_js_2.resolveAddress)(overrides.from, getResolver(contract.runner));\n }\n }\n if (fragment.inputs.length !== args.length) {\n throw new Error(\"internal error: fragment inputs doesn't match arguments; should not happen\");\n }\n const resolvedArgs = await resolveArgs(contract.runner, fragment.inputs, args);\n return Object.assign({}, overrides, await (0, index_js_3.resolveProperties)({\n to: contract.getAddress(),\n data: contract.interface.encodeFunctionData(fragment, resolvedArgs)\n }));\n };\n const staticCall = async function(...args) {\n const result = await staticCallResult(...args);\n if (result.length === 1) {\n return result[0];\n }\n return result;\n };\n const send = async function(...args) {\n const runner = contract.runner;\n (0, index_js_3.assert)(canSend(runner), \"contract runner does not support sending transactions\", \"UNSUPPORTED_OPERATION\", { operation: \"sendTransaction\" });\n const tx = await runner.sendTransaction(await populateTransaction(...args));\n const provider = getProvider(contract.runner);\n return new wrappers_js_1.ContractTransactionResponse(contract.interface, provider, tx);\n };\n const estimateGas2 = async function(...args) {\n const runner = getRunner(contract.runner, \"estimateGas\");\n (0, index_js_3.assert)(canEstimate(runner), \"contract runner does not support gas estimation\", \"UNSUPPORTED_OPERATION\", { operation: \"estimateGas\" });\n return await runner.estimateGas(await populateTransaction(...args));\n };\n const staticCallResult = async function(...args) {\n const runner = getRunner(contract.runner, \"call\");\n (0, index_js_3.assert)(canCall(runner), \"contract runner does not support calling\", \"UNSUPPORTED_OPERATION\", { operation: \"call\" });\n const tx = await populateTransaction(...args);\n let result = \"0x\";\n try {\n result = await runner.call(tx);\n } catch (error) {\n if ((0, index_js_3.isCallException)(error) && error.data) {\n throw contract.interface.makeError(error.data, tx);\n }\n throw error;\n }\n const fragment = getFragment(...args);\n return contract.interface.decodeFunctionResult(fragment, result);\n };\n const method = async (...args) => {\n const fragment = getFragment(...args);\n if (fragment.constant) {\n return await staticCall(...args);\n }\n return await send(...args);\n };\n (0, index_js_3.defineProperties)(method, {\n name: contract.interface.getFunctionName(key),\n _contract: contract,\n _key: key,\n getFragment,\n estimateGas: estimateGas2,\n populateTransaction,\n send,\n staticCall,\n staticCallResult\n });\n Object.defineProperty(method, \"fragment\", {\n configurable: false,\n enumerable: true,\n get: () => {\n const fragment = contract.interface.getFunction(key);\n (0, index_js_3.assert)(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key }\n });\n return fragment;\n }\n });\n return method;\n }\n function buildWrappedEvent(contract, key) {\n const getFragment = function(...args) {\n const fragment = contract.interface.getEvent(key, args);\n (0, index_js_3.assert)(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key, args }\n });\n return fragment;\n };\n const method = function(...args) {\n return new PreparedTopicFilter(contract, getFragment(...args), args);\n };\n (0, index_js_3.defineProperties)(method, {\n name: contract.interface.getEventName(key),\n _contract: contract,\n _key: key,\n getFragment\n });\n Object.defineProperty(method, \"fragment\", {\n configurable: false,\n enumerable: true,\n get: () => {\n const fragment = contract.interface.getEvent(key);\n (0, index_js_3.assert)(fragment, \"no matching fragment\", \"UNSUPPORTED_OPERATION\", {\n operation: \"fragment\",\n info: { key }\n });\n return fragment;\n }\n });\n return method;\n }\n var internal = Symbol.for(\"_ethersInternal_contract\");\n var internalValues = /* @__PURE__ */ new WeakMap();\n function setInternal(contract, values) {\n internalValues.set(contract[internal], values);\n }\n function getInternal(contract) {\n return internalValues.get(contract[internal]);\n }\n function isDeferred(value) {\n return value && typeof value === \"object\" && \"getTopicFilter\" in value && typeof value.getTopicFilter === \"function\" && value.fragment;\n }\n async function getSubInfo(contract, event) {\n let topics;\n let fragment = null;\n if (Array.isArray(event)) {\n const topicHashify = function(name) {\n if ((0, index_js_3.isHexString)(name, 32)) {\n return name;\n }\n const fragment2 = contract.interface.getEvent(name);\n (0, index_js_3.assertArgument)(fragment2, \"unknown fragment\", \"name\", name);\n return fragment2.topicHash;\n };\n topics = event.map((e2) => {\n if (e2 == null) {\n return null;\n }\n if (Array.isArray(e2)) {\n return e2.map(topicHashify);\n }\n return topicHashify(e2);\n });\n } else if (event === \"*\") {\n topics = [null];\n } else if (typeof event === \"string\") {\n if ((0, index_js_3.isHexString)(event, 32)) {\n topics = [event];\n } else {\n fragment = contract.interface.getEvent(event);\n (0, index_js_3.assertArgument)(fragment, \"unknown fragment\", \"event\", event);\n topics = [fragment.topicHash];\n }\n } else if (isDeferred(event)) {\n topics = await event.getTopicFilter();\n } else if (\"fragment\" in event) {\n fragment = event.fragment;\n topics = [fragment.topicHash];\n } else {\n (0, index_js_3.assertArgument)(false, \"unknown event name\", \"event\", event);\n }\n topics = topics.map((t3) => {\n if (t3 == null) {\n return null;\n }\n if (Array.isArray(t3)) {\n const items = Array.from(new Set(t3.map((t4) => t4.toLowerCase())).values());\n if (items.length === 1) {\n return items[0];\n }\n items.sort();\n return items;\n }\n return t3.toLowerCase();\n });\n const tag = topics.map((t3) => {\n if (t3 == null) {\n return \"null\";\n }\n if (Array.isArray(t3)) {\n return t3.join(\"|\");\n }\n return t3;\n }).join(\"&\");\n return { fragment, tag, topics };\n }\n async function hasSub(contract, event) {\n const { subs } = getInternal(contract);\n return subs.get((await getSubInfo(contract, event)).tag) || null;\n }\n async function getSub(contract, operation, event) {\n const provider = getProvider(contract.runner);\n (0, index_js_3.assert)(provider, \"contract runner does not support subscribing\", \"UNSUPPORTED_OPERATION\", { operation });\n const { fragment, tag, topics } = await getSubInfo(contract, event);\n const { addr, subs } = getInternal(contract);\n let sub = subs.get(tag);\n if (!sub) {\n const address = addr ? addr : contract;\n const filter = { address, topics };\n const listener = (log) => {\n let foundFragment = fragment;\n if (foundFragment == null) {\n try {\n foundFragment = contract.interface.getEvent(log.topics[0]);\n } catch (error) {\n }\n }\n if (foundFragment) {\n const _foundFragment = foundFragment;\n const args = fragment ? contract.interface.decodeEventLog(fragment, log.data, log.topics) : [];\n emit2(contract, event, args, (listener2) => {\n return new wrappers_js_1.ContractEventPayload(contract, listener2, event, _foundFragment, log);\n });\n } else {\n emit2(contract, event, [], (listener2) => {\n return new wrappers_js_1.ContractUnknownEventPayload(contract, listener2, event, log);\n });\n }\n };\n let starting = [];\n const start = () => {\n if (starting.length) {\n return;\n }\n starting.push(provider.on(filter, listener));\n };\n const stop = async () => {\n if (starting.length == 0) {\n return;\n }\n let started = starting;\n starting = [];\n await Promise.all(started);\n provider.off(filter, listener);\n };\n sub = { tag, listeners: [], start, stop };\n subs.set(tag, sub);\n }\n return sub;\n }\n var lastEmit = Promise.resolve();\n async function _emit(contract, event, args, payloadFunc) {\n await lastEmit;\n const sub = await hasSub(contract, event);\n if (!sub) {\n return false;\n }\n const count = sub.listeners.length;\n sub.listeners = sub.listeners.filter(({ listener, once: once2 }) => {\n const passArgs = Array.from(args);\n if (payloadFunc) {\n passArgs.push(payloadFunc(once2 ? null : listener));\n }\n try {\n listener.call(contract, ...passArgs);\n } catch (error) {\n }\n return !once2;\n });\n if (sub.listeners.length === 0) {\n sub.stop();\n getInternal(contract).subs.delete(sub.tag);\n }\n return count > 0;\n }\n async function emit2(contract, event, args, payloadFunc) {\n try {\n await lastEmit;\n } catch (error) {\n }\n const resultPromise = _emit(contract, event, args, payloadFunc);\n lastEmit = resultPromise;\n return await resultPromise;\n }\n var passProperties = [\"then\"];\n var BaseContract = class _BaseContract {\n /**\n * The target to connect to.\n *\n * This can be an address, ENS name or any [[Addressable]], such as\n * another contract. To get the resovled address, use the ``getAddress``\n * method.\n */\n target;\n /**\n * The contract Interface.\n */\n interface;\n /**\n * The connected runner. This is generally a [[Provider]] or a\n * [[Signer]], which dictates what operations are supported.\n *\n * For example, a **Contract** connected to a [[Provider]] may\n * only execute read-only operations.\n */\n runner;\n /**\n * All the Events available on this contract.\n */\n filters;\n /**\n * @_ignore:\n */\n [internal];\n /**\n * The fallback or receive function if any.\n */\n fallback;\n /**\n * Creates a new contract connected to %%target%% with the %%abi%% and\n * optionally connected to a %%runner%% to perform operations on behalf\n * of.\n */\n constructor(target, abi2, runner, _deployTx) {\n (0, index_js_3.assertArgument)(typeof target === \"string\" || (0, index_js_2.isAddressable)(target), \"invalid value for Contract target\", \"target\", target);\n if (runner == null) {\n runner = null;\n }\n const iface = index_js_1.Interface.from(abi2);\n (0, index_js_3.defineProperties)(this, { target, runner, interface: iface });\n Object.defineProperty(this, internal, { value: {} });\n let addrPromise;\n let addr = null;\n let deployTx = null;\n if (_deployTx) {\n const provider = getProvider(runner);\n deployTx = new wrappers_js_1.ContractTransactionResponse(this.interface, provider, _deployTx);\n }\n let subs = /* @__PURE__ */ new Map();\n if (typeof target === \"string\") {\n if ((0, index_js_3.isHexString)(target)) {\n addr = target;\n addrPromise = Promise.resolve(target);\n } else {\n const resolver = getRunner(runner, \"resolveName\");\n if (!canResolve(resolver)) {\n throw (0, index_js_3.makeError)(\"contract runner does not support name resolution\", \"UNSUPPORTED_OPERATION\", {\n operation: \"resolveName\"\n });\n }\n addrPromise = resolver.resolveName(target).then((addr2) => {\n if (addr2 == null) {\n throw (0, index_js_3.makeError)(\"an ENS name used for a contract target must be correctly configured\", \"UNCONFIGURED_NAME\", {\n value: target\n });\n }\n getInternal(this).addr = addr2;\n return addr2;\n });\n }\n } else {\n addrPromise = target.getAddress().then((addr2) => {\n if (addr2 == null) {\n throw new Error(\"TODO\");\n }\n getInternal(this).addr = addr2;\n return addr2;\n });\n }\n setInternal(this, { addrPromise, addr, deployTx, subs });\n const filters = new Proxy({}, {\n get: (target2, prop, receiver) => {\n if (typeof prop === \"symbol\" || passProperties.indexOf(prop) >= 0) {\n return Reflect.get(target2, prop, receiver);\n }\n try {\n return this.getEvent(prop);\n } catch (error) {\n if (!(0, index_js_3.isError)(error, \"INVALID_ARGUMENT\") || error.argument !== \"key\") {\n throw error;\n }\n }\n return void 0;\n },\n has: (target2, prop) => {\n if (passProperties.indexOf(prop) >= 0) {\n return Reflect.has(target2, prop);\n }\n return Reflect.has(target2, prop) || this.interface.hasEvent(String(prop));\n }\n });\n (0, index_js_3.defineProperties)(this, { filters });\n (0, index_js_3.defineProperties)(this, {\n fallback: iface.receive || iface.fallback ? buildWrappedFallback(this) : null\n });\n return new Proxy(this, {\n get: (target2, prop, receiver) => {\n if (typeof prop === \"symbol\" || prop in target2 || passProperties.indexOf(prop) >= 0) {\n return Reflect.get(target2, prop, receiver);\n }\n try {\n return target2.getFunction(prop);\n } catch (error) {\n if (!(0, index_js_3.isError)(error, \"INVALID_ARGUMENT\") || error.argument !== \"key\") {\n throw error;\n }\n }\n return void 0;\n },\n has: (target2, prop) => {\n if (typeof prop === \"symbol\" || prop in target2 || passProperties.indexOf(prop) >= 0) {\n return Reflect.has(target2, prop);\n }\n return target2.interface.hasFunction(prop);\n }\n });\n }\n /**\n * Return a new Contract instance with the same target and ABI, but\n * a different %%runner%%.\n */\n connect(runner) {\n return new _BaseContract(this.target, this.interface, runner);\n }\n /**\n * Return a new Contract instance with the same ABI and runner, but\n * a different %%target%%.\n */\n attach(target) {\n return new _BaseContract(target, this.interface, this.runner);\n }\n /**\n * Return the resolved address of this Contract.\n */\n async getAddress() {\n return await getInternal(this).addrPromise;\n }\n /**\n * Return the deployed bytecode or null if no bytecode is found.\n */\n async getDeployedCode() {\n const provider = getProvider(this.runner);\n (0, index_js_3.assert)(provider, \"runner does not support .provider\", \"UNSUPPORTED_OPERATION\", { operation: \"getDeployedCode\" });\n const code = await provider.getCode(await this.getAddress());\n if (code === \"0x\") {\n return null;\n }\n return code;\n }\n /**\n * Resolve to this Contract once the bytecode has been deployed, or\n * resolve immediately if already deployed.\n */\n async waitForDeployment() {\n const deployTx = this.deploymentTransaction();\n if (deployTx) {\n await deployTx.wait();\n return this;\n }\n const code = await this.getDeployedCode();\n if (code != null) {\n return this;\n }\n const provider = getProvider(this.runner);\n (0, index_js_3.assert)(provider != null, \"contract runner does not support .provider\", \"UNSUPPORTED_OPERATION\", { operation: \"waitForDeployment\" });\n return new Promise((resolve, reject) => {\n const checkCode = async () => {\n try {\n const code2 = await this.getDeployedCode();\n if (code2 != null) {\n return resolve(this);\n }\n provider.once(\"block\", checkCode);\n } catch (error) {\n reject(error);\n }\n };\n checkCode();\n });\n }\n /**\n * Return the transaction used to deploy this contract.\n *\n * This is only available if this instance was returned from a\n * [[ContractFactory]].\n */\n deploymentTransaction() {\n return getInternal(this).deployTx;\n }\n /**\n * Return the function for a given name. This is useful when a contract\n * method name conflicts with a JavaScript name such as ``prototype`` or\n * when using a Contract programatically.\n */\n getFunction(key) {\n if (typeof key !== \"string\") {\n key = key.format();\n }\n const func = buildWrappedMethod(this, key);\n return func;\n }\n /**\n * Return the event for a given name. This is useful when a contract\n * event name conflicts with a JavaScript name such as ``prototype`` or\n * when using a Contract programatically.\n */\n getEvent(key) {\n if (typeof key !== \"string\") {\n key = key.format();\n }\n return buildWrappedEvent(this, key);\n }\n /**\n * @_ignore:\n */\n async queryTransaction(hash3) {\n throw new Error(\"@TODO\");\n }\n /*\n // @TODO: this is a non-backwards compatible change, but will be added\n // in v7 and in a potential SmartContract class in an upcoming\n // v6 release\n async getTransactionReceipt(hash: string): Promise {\n const provider = getProvider(this.runner);\n assert(provider, \"contract runner does not have a provider\",\n \"UNSUPPORTED_OPERATION\", { operation: \"queryTransaction\" });\n \n const receipt = await provider.getTransactionReceipt(hash);\n if (receipt == null) { return null; }\n \n return new ContractTransactionReceipt(this.interface, provider, receipt);\n }\n */\n /**\n * Provide historic access to event data for %%event%% in the range\n * %%fromBlock%% (default: ``0``) to %%toBlock%% (default: ``\"latest\"``)\n * inclusive.\n */\n async queryFilter(event, fromBlock, toBlock) {\n if (fromBlock == null) {\n fromBlock = 0;\n }\n if (toBlock == null) {\n toBlock = \"latest\";\n }\n const { addr, addrPromise } = getInternal(this);\n const address = addr ? addr : await addrPromise;\n const { fragment, topics } = await getSubInfo(this, event);\n const filter = { address, topics, fromBlock, toBlock };\n const provider = getProvider(this.runner);\n (0, index_js_3.assert)(provider, \"contract runner does not have a provider\", \"UNSUPPORTED_OPERATION\", { operation: \"queryFilter\" });\n return (await provider.getLogs(filter)).map((log) => {\n let foundFragment = fragment;\n if (foundFragment == null) {\n try {\n foundFragment = this.interface.getEvent(log.topics[0]);\n } catch (error) {\n }\n }\n if (foundFragment) {\n try {\n return new wrappers_js_1.EventLog(log, this.interface, foundFragment);\n } catch (error) {\n return new wrappers_js_1.UndecodedEventLog(log, error);\n }\n }\n return new provider_js_1.Log(log, provider);\n });\n }\n /**\n * Add an event %%listener%% for the %%event%%.\n */\n async on(event, listener) {\n const sub = await getSub(this, \"on\", event);\n sub.listeners.push({ listener, once: false });\n sub.start();\n return this;\n }\n /**\n * Add an event %%listener%% for the %%event%%, but remove the listener\n * after it is fired once.\n */\n async once(event, listener) {\n const sub = await getSub(this, \"once\", event);\n sub.listeners.push({ listener, once: true });\n sub.start();\n return this;\n }\n /**\n * Emit an %%event%% calling all listeners with %%args%%.\n *\n * Resolves to ``true`` if any listeners were called.\n */\n async emit(event, ...args) {\n return await emit2(this, event, args, null);\n }\n /**\n * Resolves to the number of listeners of %%event%% or the total number\n * of listeners if unspecified.\n */\n async listenerCount(event) {\n if (event) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return 0;\n }\n return sub.listeners.length;\n }\n const { subs } = getInternal(this);\n let total = 0;\n for (const { listeners: listeners2 } of subs.values()) {\n total += listeners2.length;\n }\n return total;\n }\n /**\n * Resolves to the listeners subscribed to %%event%% or all listeners\n * if unspecified.\n */\n async listeners(event) {\n if (event) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return [];\n }\n return sub.listeners.map(({ listener }) => listener);\n }\n const { subs } = getInternal(this);\n let result = [];\n for (const { listeners: listeners2 } of subs.values()) {\n result = result.concat(listeners2.map(({ listener }) => listener));\n }\n return result;\n }\n /**\n * Remove the %%listener%% from the listeners for %%event%% or remove\n * all listeners if unspecified.\n */\n async off(event, listener) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return this;\n }\n if (listener) {\n const index2 = sub.listeners.map(({ listener: listener2 }) => listener2).indexOf(listener);\n if (index2 >= 0) {\n sub.listeners.splice(index2, 1);\n }\n }\n if (listener == null || sub.listeners.length === 0) {\n sub.stop();\n getInternal(this).subs.delete(sub.tag);\n }\n return this;\n }\n /**\n * Remove all the listeners for %%event%% or remove all listeners if\n * unspecified.\n */\n async removeAllListeners(event) {\n if (event) {\n const sub = await hasSub(this, event);\n if (!sub) {\n return this;\n }\n sub.stop();\n getInternal(this).subs.delete(sub.tag);\n } else {\n const { subs } = getInternal(this);\n for (const { tag, stop } of subs.values()) {\n stop();\n subs.delete(tag);\n }\n }\n return this;\n }\n /**\n * Alias for [on].\n */\n async addListener(event, listener) {\n return await this.on(event, listener);\n }\n /**\n * Alias for [off].\n */\n async removeListener(event, listener) {\n return await this.off(event, listener);\n }\n /**\n * Create a new Class for the %%abi%%.\n */\n static buildClass(abi2) {\n class CustomContract extends _BaseContract {\n constructor(address, runner = null) {\n super(address, abi2, runner);\n }\n }\n return CustomContract;\n }\n /**\n * Create a new BaseContract with a specified Interface.\n */\n static from(target, abi2, runner) {\n if (runner == null) {\n runner = null;\n }\n const contract = new this(target, abi2, runner);\n return contract;\n }\n };\n exports3.BaseContract = BaseContract;\n function _ContractBase() {\n return BaseContract;\n }\n var Contract = class extends _ContractBase() {\n };\n exports3.Contract = Contract;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/factory.js\n var require_factory = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/factory.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ContractFactory = void 0;\n var index_js_1 = require_abi();\n var index_js_2 = require_address3();\n var index_js_3 = require_utils13();\n var contract_js_1 = require_contract();\n var ContractFactory = class _ContractFactory {\n /**\n * The Contract Interface.\n */\n interface;\n /**\n * The Contract deployment bytecode. Often called the initcode.\n */\n bytecode;\n /**\n * The ContractRunner to deploy the Contract as.\n */\n runner;\n /**\n * Create a new **ContractFactory** with %%abi%% and %%bytecode%%,\n * optionally connected to %%runner%%.\n *\n * The %%bytecode%% may be the ``bytecode`` property within the\n * standard Solidity JSON output.\n */\n constructor(abi2, bytecode, runner) {\n const iface = index_js_1.Interface.from(abi2);\n if (bytecode instanceof Uint8Array) {\n bytecode = (0, index_js_3.hexlify)((0, index_js_3.getBytes)(bytecode));\n } else {\n if (typeof bytecode === \"object\") {\n bytecode = bytecode.object;\n }\n if (!bytecode.startsWith(\"0x\")) {\n bytecode = \"0x\" + bytecode;\n }\n bytecode = (0, index_js_3.hexlify)((0, index_js_3.getBytes)(bytecode));\n }\n (0, index_js_3.defineProperties)(this, {\n bytecode,\n interface: iface,\n runner: runner || null\n });\n }\n attach(target) {\n return new contract_js_1.BaseContract(target, this.interface, this.runner);\n }\n /**\n * Resolves to the transaction to deploy the contract, passing %%args%%\n * into the constructor.\n */\n async getDeployTransaction(...args) {\n let overrides = {};\n const fragment = this.interface.deploy;\n if (fragment.inputs.length + 1 === args.length) {\n overrides = await (0, contract_js_1.copyOverrides)(args.pop());\n }\n if (fragment.inputs.length !== args.length) {\n throw new Error(\"incorrect number of arguments to constructor\");\n }\n const resolvedArgs = await (0, contract_js_1.resolveArgs)(this.runner, fragment.inputs, args);\n const data = (0, index_js_3.concat)([this.bytecode, this.interface.encodeDeploy(resolvedArgs)]);\n return Object.assign({}, overrides, { data });\n }\n /**\n * Resolves to the Contract deployed by passing %%args%% into the\n * constructor.\n *\n * This will resolve to the Contract before it has been deployed to the\n * network, so the [[BaseContract-waitForDeployment]] should be used before\n * sending any transactions to it.\n */\n async deploy(...args) {\n const tx = await this.getDeployTransaction(...args);\n (0, index_js_3.assert)(this.runner && typeof this.runner.sendTransaction === \"function\", \"factory runner does not support sending transactions\", \"UNSUPPORTED_OPERATION\", {\n operation: \"sendTransaction\"\n });\n const sentTx = await this.runner.sendTransaction(tx);\n const address = (0, index_js_2.getCreateAddress)(sentTx);\n return new contract_js_1.BaseContract(address, this.interface, this.runner, sentTx);\n }\n /**\n * Return a new **ContractFactory** with the same ABI and bytecode,\n * but connected to %%runner%%.\n */\n connect(runner) {\n return new _ContractFactory(this.interface, this.bytecode, runner);\n }\n /**\n * Create a new **ContractFactory** from the standard Solidity JSON output.\n */\n static fromSolidity(output, runner) {\n (0, index_js_3.assertArgument)(output != null, \"bad compiler output\", \"output\", output);\n if (typeof output === \"string\") {\n output = JSON.parse(output);\n }\n const abi2 = output.abi;\n let bytecode = \"\";\n if (output.bytecode) {\n bytecode = output.bytecode;\n } else if (output.evm && output.evm.bytecode) {\n bytecode = output.evm.bytecode;\n }\n return new this(abi2, bytecode, runner);\n }\n };\n exports3.ContractFactory = ContractFactory;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/index.js\n var require_contract2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/contract/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.UndecodedEventLog = exports3.EventLog = exports3.ContractTransactionResponse = exports3.ContractTransactionReceipt = exports3.ContractUnknownEventPayload = exports3.ContractEventPayload = exports3.ContractFactory = exports3.Contract = exports3.BaseContract = void 0;\n var contract_js_1 = require_contract();\n Object.defineProperty(exports3, \"BaseContract\", { enumerable: true, get: function() {\n return contract_js_1.BaseContract;\n } });\n Object.defineProperty(exports3, \"Contract\", { enumerable: true, get: function() {\n return contract_js_1.Contract;\n } });\n var factory_js_1 = require_factory();\n Object.defineProperty(exports3, \"ContractFactory\", { enumerable: true, get: function() {\n return factory_js_1.ContractFactory;\n } });\n var wrappers_js_1 = require_wrappers();\n Object.defineProperty(exports3, \"ContractEventPayload\", { enumerable: true, get: function() {\n return wrappers_js_1.ContractEventPayload;\n } });\n Object.defineProperty(exports3, \"ContractUnknownEventPayload\", { enumerable: true, get: function() {\n return wrappers_js_1.ContractUnknownEventPayload;\n } });\n Object.defineProperty(exports3, \"ContractTransactionReceipt\", { enumerable: true, get: function() {\n return wrappers_js_1.ContractTransactionReceipt;\n } });\n Object.defineProperty(exports3, \"ContractTransactionResponse\", { enumerable: true, get: function() {\n return wrappers_js_1.ContractTransactionResponse;\n } });\n Object.defineProperty(exports3, \"EventLog\", { enumerable: true, get: function() {\n return wrappers_js_1.EventLog;\n } });\n Object.defineProperty(exports3, \"UndecodedEventLog\", { enumerable: true, get: function() {\n return wrappers_js_1.UndecodedEventLog;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/ens-resolver.js\n var require_ens_resolver = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/ens-resolver.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EnsResolver = exports3.BasicMulticoinProviderPlugin = exports3.MulticoinProviderPlugin = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_constants7();\n var index_js_3 = require_contract2();\n var index_js_4 = require_hash2();\n var index_js_5 = require_utils13();\n function getIpfsLink(link) {\n if (link.match(/^ipfs:\\/\\/ipfs\\//i)) {\n link = link.substring(12);\n } else if (link.match(/^ipfs:\\/\\//i)) {\n link = link.substring(7);\n } else {\n (0, index_js_5.assertArgument)(false, \"unsupported IPFS format\", \"link\", link);\n }\n return `https://gateway.ipfs.io/ipfs/${link}`;\n }\n var MulticoinProviderPlugin = class {\n /**\n * The name.\n */\n name;\n /**\n * Creates a new **MulticoinProviderPluing** for %%name%%.\n */\n constructor(name) {\n (0, index_js_5.defineProperties)(this, { name });\n }\n connect(proivder) {\n return this;\n }\n /**\n * Returns ``true`` if %%coinType%% is supported by this plugin.\n */\n supportsCoinType(coinType) {\n return false;\n }\n /**\n * Resolves to the encoded %%address%% for %%coinType%%.\n */\n async encodeAddress(coinType, address) {\n throw new Error(\"unsupported coin\");\n }\n /**\n * Resolves to the decoded %%data%% for %%coinType%%.\n */\n async decodeAddress(coinType, data) {\n throw new Error(\"unsupported coin\");\n }\n };\n exports3.MulticoinProviderPlugin = MulticoinProviderPlugin;\n var BasicMulticoinPluginId = \"org.ethers.plugins.provider.BasicMulticoin\";\n var BasicMulticoinProviderPlugin = class extends MulticoinProviderPlugin {\n /**\n * Creates a new **BasicMulticoinProviderPlugin**.\n */\n constructor() {\n super(BasicMulticoinPluginId);\n }\n };\n exports3.BasicMulticoinProviderPlugin = BasicMulticoinProviderPlugin;\n var matcherIpfs = new RegExp(\"^(ipfs)://(.*)$\", \"i\");\n var matchers = [\n new RegExp(\"^(https)://(.*)$\", \"i\"),\n new RegExp(\"^(data):(.*)$\", \"i\"),\n matcherIpfs,\n new RegExp(\"^eip155:[0-9]+/(erc[0-9]+):(.*)$\", \"i\")\n ];\n var EnsResolver = class _EnsResolver {\n /**\n * The connected provider.\n */\n provider;\n /**\n * The address of the resolver.\n */\n address;\n /**\n * The name this resolver was resolved against.\n */\n name;\n // For EIP-2544 names, the ancestor that provided the resolver\n #supports2544;\n #resolver;\n constructor(provider, address, name) {\n (0, index_js_5.defineProperties)(this, { provider, address, name });\n this.#supports2544 = null;\n this.#resolver = new index_js_3.Contract(address, [\n \"function supportsInterface(bytes4) view returns (bool)\",\n \"function resolve(bytes, bytes) view returns (bytes)\",\n \"function addr(bytes32) view returns (address)\",\n \"function addr(bytes32, uint) view returns (bytes)\",\n \"function text(bytes32, string) view returns (string)\",\n \"function contenthash(bytes32) view returns (bytes)\"\n ], provider);\n }\n /**\n * Resolves to true if the resolver supports wildcard resolution.\n */\n async supportsWildcard() {\n if (this.#supports2544 == null) {\n this.#supports2544 = (async () => {\n try {\n return await this.#resolver.supportsInterface(\"0x9061b923\");\n } catch (error) {\n if ((0, index_js_5.isError)(error, \"CALL_EXCEPTION\")) {\n return false;\n }\n this.#supports2544 = null;\n throw error;\n }\n })();\n }\n return await this.#supports2544;\n }\n async #fetch(funcName, params) {\n params = (params || []).slice();\n const iface = this.#resolver.interface;\n params.unshift((0, index_js_4.namehash)(this.name));\n let fragment = null;\n if (await this.supportsWildcard()) {\n fragment = iface.getFunction(funcName);\n (0, index_js_5.assert)(fragment, \"missing fragment\", \"UNKNOWN_ERROR\", {\n info: { funcName }\n });\n params = [\n (0, index_js_4.dnsEncode)(this.name, 255),\n iface.encodeFunctionData(fragment, params)\n ];\n funcName = \"resolve(bytes,bytes)\";\n }\n params.push({\n enableCcipRead: true\n });\n try {\n const result = await this.#resolver[funcName](...params);\n if (fragment) {\n return iface.decodeFunctionResult(fragment, result)[0];\n }\n return result;\n } catch (error) {\n if (!(0, index_js_5.isError)(error, \"CALL_EXCEPTION\")) {\n throw error;\n }\n }\n return null;\n }\n /**\n * Resolves to the address for %%coinType%% or null if the\n * provided %%coinType%% has not been configured.\n */\n async getAddress(coinType) {\n if (coinType == null) {\n coinType = 60;\n }\n if (coinType === 60) {\n try {\n const result = await this.#fetch(\"addr(bytes32)\");\n if (result == null || result === index_js_2.ZeroAddress) {\n return null;\n }\n return result;\n } catch (error) {\n if ((0, index_js_5.isError)(error, \"CALL_EXCEPTION\")) {\n return null;\n }\n throw error;\n }\n }\n if (coinType >= 0 && coinType < 2147483648) {\n let ethCoinType = coinType + 2147483648;\n const data2 = await this.#fetch(\"addr(bytes32,uint)\", [ethCoinType]);\n if ((0, index_js_5.isHexString)(data2, 20)) {\n return (0, index_js_1.getAddress)(data2);\n }\n }\n let coinPlugin = null;\n for (const plugin of this.provider.plugins) {\n if (!(plugin instanceof MulticoinProviderPlugin)) {\n continue;\n }\n if (plugin.supportsCoinType(coinType)) {\n coinPlugin = plugin;\n break;\n }\n }\n if (coinPlugin == null) {\n return null;\n }\n const data = await this.#fetch(\"addr(bytes32,uint)\", [coinType]);\n if (data == null || data === \"0x\") {\n return null;\n }\n const address = await coinPlugin.decodeAddress(coinType, data);\n if (address != null) {\n return address;\n }\n (0, index_js_5.assert)(false, `invalid coin data`, \"UNSUPPORTED_OPERATION\", {\n operation: `getAddress(${coinType})`,\n info: { coinType, data }\n });\n }\n /**\n * Resolves to the EIP-634 text record for %%key%%, or ``null``\n * if unconfigured.\n */\n async getText(key) {\n const data = await this.#fetch(\"text(bytes32,string)\", [key]);\n if (data == null || data === \"0x\") {\n return null;\n }\n return data;\n }\n /**\n * Rsolves to the content-hash or ``null`` if unconfigured.\n */\n async getContentHash() {\n const data = await this.#fetch(\"contenthash(bytes32)\");\n if (data == null || data === \"0x\") {\n return null;\n }\n const ipfs = data.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipfs) {\n const scheme = ipfs[1] === \"e3010170\" ? \"ipfs\" : \"ipns\";\n const length = parseInt(ipfs[4], 16);\n if (ipfs[5].length === length * 2) {\n return `${scheme}://${(0, index_js_5.encodeBase58)(\"0x\" + ipfs[2])}`;\n }\n }\n const swarm = data.match(/^0xe40101fa011b20([0-9a-f]*)$/);\n if (swarm && swarm[1].length === 64) {\n return `bzz://${swarm[1]}`;\n }\n (0, index_js_5.assert)(false, `invalid or unsupported content hash data`, \"UNSUPPORTED_OPERATION\", {\n operation: \"getContentHash()\",\n info: { data }\n });\n }\n /**\n * Resolves to the avatar url or ``null`` if the avatar is either\n * unconfigured or incorrectly configured (e.g. references an NFT\n * not owned by the address).\n *\n * If diagnosing issues with configurations, the [[_getAvatar]]\n * method may be useful.\n */\n async getAvatar() {\n const avatar = await this._getAvatar();\n return avatar.url;\n }\n /**\n * When resolving an avatar, there are many steps involved, such\n * fetching metadata and possibly validating ownership of an\n * NFT.\n *\n * This method can be used to examine each step and the value it\n * was working from.\n */\n async _getAvatar() {\n const linkage = [{ type: \"name\", value: this.name }];\n try {\n const avatar = await this.getText(\"avatar\");\n if (avatar == null) {\n linkage.push({ type: \"!avatar\", value: \"\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"avatar\", value: avatar });\n for (let i3 = 0; i3 < matchers.length; i3++) {\n const match = avatar.match(matchers[i3]);\n if (match == null) {\n continue;\n }\n const scheme = match[1].toLowerCase();\n switch (scheme) {\n case \"https\":\n case \"data\":\n linkage.push({ type: \"url\", value: avatar });\n return { linkage, url: avatar };\n case \"ipfs\": {\n const url = getIpfsLink(avatar);\n linkage.push({ type: \"ipfs\", value: avatar });\n linkage.push({ type: \"url\", value: url });\n return { linkage, url };\n }\n case \"erc721\":\n case \"erc1155\": {\n const selector = scheme === \"erc721\" ? \"tokenURI(uint256)\" : \"uri(uint256)\";\n linkage.push({ type: scheme, value: avatar });\n const owner = await this.getAddress();\n if (owner == null) {\n linkage.push({ type: \"!owner\", value: \"\" });\n return { url: null, linkage };\n }\n const comps = (match[2] || \"\").split(\"/\");\n if (comps.length !== 2) {\n linkage.push({ type: `!${scheme}caip`, value: match[2] || \"\" });\n return { url: null, linkage };\n }\n const tokenId = comps[1];\n const contract = new index_js_3.Contract(comps[0], [\n // ERC-721\n \"function tokenURI(uint) view returns (string)\",\n \"function ownerOf(uint) view returns (address)\",\n // ERC-1155\n \"function uri(uint) view returns (string)\",\n \"function balanceOf(address, uint256) view returns (uint)\"\n ], this.provider);\n if (scheme === \"erc721\") {\n const tokenOwner = await contract.ownerOf(tokenId);\n if (owner !== tokenOwner) {\n linkage.push({ type: \"!owner\", value: tokenOwner });\n return { url: null, linkage };\n }\n linkage.push({ type: \"owner\", value: tokenOwner });\n } else if (scheme === \"erc1155\") {\n const balance = await contract.balanceOf(owner, tokenId);\n if (!balance) {\n linkage.push({ type: \"!balance\", value: \"0\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"balance\", value: balance.toString() });\n }\n let metadataUrl = await contract[selector](tokenId);\n if (metadataUrl == null || metadataUrl === \"0x\") {\n linkage.push({ type: \"!metadata-url\", value: \"\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"metadata-url-base\", value: metadataUrl });\n if (scheme === \"erc1155\") {\n metadataUrl = metadataUrl.replace(\"{id}\", (0, index_js_5.toBeHex)(tokenId, 32).substring(2));\n linkage.push({ type: \"metadata-url-expanded\", value: metadataUrl });\n }\n if (metadataUrl.match(/^ipfs:/i)) {\n metadataUrl = getIpfsLink(metadataUrl);\n }\n linkage.push({ type: \"metadata-url\", value: metadataUrl });\n let metadata = {};\n const response = await new index_js_5.FetchRequest(metadataUrl).send();\n response.assertOk();\n try {\n metadata = response.bodyJson;\n } catch (error) {\n try {\n linkage.push({ type: \"!metadata\", value: response.bodyText });\n } catch (error2) {\n const bytes = response.body;\n if (bytes) {\n linkage.push({ type: \"!metadata\", value: (0, index_js_5.hexlify)(bytes) });\n }\n return { url: null, linkage };\n }\n return { url: null, linkage };\n }\n if (!metadata) {\n linkage.push({ type: \"!metadata\", value: \"\" });\n return { url: null, linkage };\n }\n linkage.push({ type: \"metadata\", value: JSON.stringify(metadata) });\n let imageUrl = metadata.image;\n if (typeof imageUrl !== \"string\") {\n linkage.push({ type: \"!imageUrl\", value: \"\" });\n return { url: null, linkage };\n }\n if (imageUrl.match(/^(https:\\/\\/|data:)/i)) {\n } else {\n const ipfs = imageUrl.match(matcherIpfs);\n if (ipfs == null) {\n linkage.push({ type: \"!imageUrl-ipfs\", value: imageUrl });\n return { url: null, linkage };\n }\n linkage.push({ type: \"imageUrl-ipfs\", value: imageUrl });\n imageUrl = getIpfsLink(imageUrl);\n }\n linkage.push({ type: \"url\", value: imageUrl });\n return { linkage, url: imageUrl };\n }\n }\n }\n } catch (error) {\n }\n return { linkage, url: null };\n }\n static async getEnsAddress(provider) {\n const network = await provider.getNetwork();\n const ensPlugin = network.getPlugin(\"org.ethers.plugins.network.Ens\");\n (0, index_js_5.assert)(ensPlugin, \"network does not support ENS\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getEnsAddress\",\n info: { network }\n });\n return ensPlugin.address;\n }\n static async #getResolver(provider, name) {\n const ensAddr = await _EnsResolver.getEnsAddress(provider);\n try {\n const contract = new index_js_3.Contract(ensAddr, [\n \"function resolver(bytes32) view returns (address)\"\n ], provider);\n const addr = await contract.resolver((0, index_js_4.namehash)(name), {\n enableCcipRead: true\n });\n if (addr === index_js_2.ZeroAddress) {\n return null;\n }\n return addr;\n } catch (error) {\n throw error;\n }\n return null;\n }\n /**\n * Resolve to the ENS resolver for %%name%% using %%provider%% or\n * ``null`` if unconfigured.\n */\n static async fromName(provider, name) {\n let currentName = name;\n while (true) {\n if (currentName === \"\" || currentName === \".\") {\n return null;\n }\n if (name !== \"eth\" && currentName === \"eth\") {\n return null;\n }\n const addr = await _EnsResolver.#getResolver(provider, currentName);\n if (addr != null) {\n const resolver = new _EnsResolver(provider, addr, name);\n if (currentName !== name && !await resolver.supportsWildcard()) {\n return null;\n }\n return resolver;\n }\n currentName = currentName.split(\".\").slice(1).join(\".\");\n }\n }\n };\n exports3.EnsResolver = EnsResolver;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/format.js\n var require_format3 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/format.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.formatTransactionResponse = exports3.formatTransactionReceipt = exports3.formatReceiptLog = exports3.formatBlock = exports3.formatLog = exports3.formatUint256 = exports3.formatHash = exports3.formatData = exports3.formatBoolean = exports3.object = exports3.arrayOf = exports3.allowNull = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils13();\n var BN_0 = BigInt(0);\n function allowNull(format, nullValue) {\n return function(value) {\n if (value == null) {\n return nullValue;\n }\n return format(value);\n };\n }\n exports3.allowNull = allowNull;\n function arrayOf(format, allowNull2) {\n return (array) => {\n if (allowNull2 && array == null) {\n return null;\n }\n if (!Array.isArray(array)) {\n throw new Error(\"not an array\");\n }\n return array.map((i3) => format(i3));\n };\n }\n exports3.arrayOf = arrayOf;\n function object(format, altNames) {\n return (value) => {\n const result = {};\n for (const key in format) {\n let srcKey = key;\n if (altNames && key in altNames && !(srcKey in value)) {\n for (const altKey of altNames[key]) {\n if (altKey in value) {\n srcKey = altKey;\n break;\n }\n }\n }\n try {\n const nv = format[key](value[srcKey]);\n if (nv !== void 0) {\n result[key] = nv;\n }\n } catch (error) {\n const message2 = error instanceof Error ? error.message : \"not-an-error\";\n (0, index_js_4.assert)(false, `invalid value for value.${key} (${message2})`, \"BAD_DATA\", { value });\n }\n }\n return result;\n };\n }\n exports3.object = object;\n function formatBoolean(value) {\n switch (value) {\n case true:\n case \"true\":\n return true;\n case false:\n case \"false\":\n return false;\n }\n (0, index_js_4.assertArgument)(false, `invalid boolean; ${JSON.stringify(value)}`, \"value\", value);\n }\n exports3.formatBoolean = formatBoolean;\n function formatData(value) {\n (0, index_js_4.assertArgument)((0, index_js_4.isHexString)(value, true), \"invalid data\", \"value\", value);\n return value;\n }\n exports3.formatData = formatData;\n function formatHash(value) {\n (0, index_js_4.assertArgument)((0, index_js_4.isHexString)(value, 32), \"invalid hash\", \"value\", value);\n return value;\n }\n exports3.formatHash = formatHash;\n function formatUint256(value) {\n if (!(0, index_js_4.isHexString)(value)) {\n throw new Error(\"invalid uint256\");\n }\n return (0, index_js_4.zeroPadValue)(value, 32);\n }\n exports3.formatUint256 = formatUint256;\n var _formatLog = object({\n address: index_js_1.getAddress,\n blockHash: formatHash,\n blockNumber: index_js_4.getNumber,\n data: formatData,\n index: index_js_4.getNumber,\n removed: allowNull(formatBoolean, false),\n topics: arrayOf(formatHash),\n transactionHash: formatHash,\n transactionIndex: index_js_4.getNumber\n }, {\n index: [\"logIndex\"]\n });\n function formatLog2(value) {\n return _formatLog(value);\n }\n exports3.formatLog = formatLog2;\n var _formatBlock = object({\n hash: allowNull(formatHash),\n parentHash: formatHash,\n parentBeaconBlockRoot: allowNull(formatHash, null),\n number: index_js_4.getNumber,\n timestamp: index_js_4.getNumber,\n nonce: allowNull(formatData),\n difficulty: index_js_4.getBigInt,\n gasLimit: index_js_4.getBigInt,\n gasUsed: index_js_4.getBigInt,\n stateRoot: allowNull(formatHash, null),\n receiptsRoot: allowNull(formatHash, null),\n blobGasUsed: allowNull(index_js_4.getBigInt, null),\n excessBlobGas: allowNull(index_js_4.getBigInt, null),\n miner: allowNull(index_js_1.getAddress),\n prevRandao: allowNull(formatHash, null),\n extraData: formatData,\n baseFeePerGas: allowNull(index_js_4.getBigInt)\n }, {\n prevRandao: [\"mixHash\"]\n });\n function formatBlock2(value) {\n const result = _formatBlock(value);\n result.transactions = value.transactions.map((tx) => {\n if (typeof tx === \"string\") {\n return tx;\n }\n return formatTransactionResponse(tx);\n });\n return result;\n }\n exports3.formatBlock = formatBlock2;\n var _formatReceiptLog = object({\n transactionIndex: index_js_4.getNumber,\n blockNumber: index_js_4.getNumber,\n transactionHash: formatHash,\n address: index_js_1.getAddress,\n topics: arrayOf(formatHash),\n data: formatData,\n index: index_js_4.getNumber,\n blockHash: formatHash\n }, {\n index: [\"logIndex\"]\n });\n function formatReceiptLog(value) {\n return _formatReceiptLog(value);\n }\n exports3.formatReceiptLog = formatReceiptLog;\n var _formatTransactionReceipt = object({\n to: allowNull(index_js_1.getAddress, null),\n from: allowNull(index_js_1.getAddress, null),\n contractAddress: allowNull(index_js_1.getAddress, null),\n // should be allowNull(hash), but broken-EIP-658 support is handled in receipt\n index: index_js_4.getNumber,\n root: allowNull(index_js_4.hexlify),\n gasUsed: index_js_4.getBigInt,\n blobGasUsed: allowNull(index_js_4.getBigInt, null),\n logsBloom: allowNull(formatData),\n blockHash: formatHash,\n hash: formatHash,\n logs: arrayOf(formatReceiptLog),\n blockNumber: index_js_4.getNumber,\n //confirmations: allowNull(getNumber, null),\n cumulativeGasUsed: index_js_4.getBigInt,\n effectiveGasPrice: allowNull(index_js_4.getBigInt),\n blobGasPrice: allowNull(index_js_4.getBigInt, null),\n status: allowNull(index_js_4.getNumber),\n type: allowNull(index_js_4.getNumber, 0)\n }, {\n effectiveGasPrice: [\"gasPrice\"],\n hash: [\"transactionHash\"],\n index: [\"transactionIndex\"]\n });\n function formatTransactionReceipt2(value) {\n return _formatTransactionReceipt(value);\n }\n exports3.formatTransactionReceipt = formatTransactionReceipt2;\n function formatTransactionResponse(value) {\n if (value.to && (0, index_js_4.getBigInt)(value.to) === BN_0) {\n value.to = \"0x0000000000000000000000000000000000000000\";\n }\n const result = object({\n hash: formatHash,\n // Some nodes do not return this, usually test nodes (like Ganache)\n index: allowNull(index_js_4.getNumber, void 0),\n type: (value2) => {\n if (value2 === \"0x\" || value2 == null) {\n return 0;\n }\n return (0, index_js_4.getNumber)(value2);\n },\n accessList: allowNull(index_js_3.accessListify, null),\n blobVersionedHashes: allowNull(arrayOf(formatHash, true), null),\n authorizationList: allowNull(arrayOf((v2) => {\n let sig;\n if (v2.signature) {\n sig = v2.signature;\n } else {\n let yParity = v2.yParity;\n if (yParity === \"0x1b\") {\n yParity = 0;\n } else if (yParity === \"0x1c\") {\n yParity = 1;\n }\n sig = Object.assign({}, v2, { yParity });\n }\n return {\n address: (0, index_js_1.getAddress)(v2.address),\n chainId: (0, index_js_4.getBigInt)(v2.chainId),\n nonce: (0, index_js_4.getBigInt)(v2.nonce),\n signature: index_js_2.Signature.from(sig)\n };\n }, false), null),\n blockHash: allowNull(formatHash, null),\n blockNumber: allowNull(index_js_4.getNumber, null),\n transactionIndex: allowNull(index_js_4.getNumber, null),\n from: index_js_1.getAddress,\n // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas) must be set\n gasPrice: allowNull(index_js_4.getBigInt),\n maxPriorityFeePerGas: allowNull(index_js_4.getBigInt),\n maxFeePerGas: allowNull(index_js_4.getBigInt),\n maxFeePerBlobGas: allowNull(index_js_4.getBigInt, null),\n gasLimit: index_js_4.getBigInt,\n to: allowNull(index_js_1.getAddress, null),\n value: index_js_4.getBigInt,\n nonce: index_js_4.getNumber,\n data: formatData,\n creates: allowNull(index_js_1.getAddress, null),\n chainId: allowNull(index_js_4.getBigInt, null)\n }, {\n data: [\"input\"],\n gasLimit: [\"gas\"],\n index: [\"transactionIndex\"]\n })(value);\n if (result.to == null && result.creates == null) {\n result.creates = (0, index_js_1.getCreateAddress)(result);\n }\n if ((value.type === 1 || value.type === 2) && value.accessList == null) {\n result.accessList = [];\n }\n if (value.signature) {\n result.signature = index_js_2.Signature.from(value.signature);\n } else {\n result.signature = index_js_2.Signature.from(value);\n }\n if (result.chainId == null) {\n const chainId = result.signature.legacyChainId;\n if (chainId != null) {\n result.chainId = chainId;\n }\n }\n if (result.blockHash && (0, index_js_4.getBigInt)(result.blockHash) === BN_0) {\n result.blockHash = null;\n }\n return result;\n }\n exports3.formatTransactionResponse = formatTransactionResponse;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/plugins-network.js\n var require_plugins_network = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/plugins-network.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FetchUrlFeeDataNetworkPlugin = exports3.FeeDataNetworkPlugin = exports3.EnsPlugin = exports3.GasCostPlugin = exports3.NetworkPlugin = void 0;\n var properties_js_1 = require_properties2();\n var index_js_1 = require_utils13();\n var EnsAddress = \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\";\n var NetworkPlugin = class _NetworkPlugin {\n /**\n * The name of the plugin.\n *\n * It is recommended to use reverse-domain-notation, which permits\n * unique names with a known authority as well as hierarchal entries.\n */\n name;\n /**\n * Creates a new **NetworkPlugin**.\n */\n constructor(name) {\n (0, properties_js_1.defineProperties)(this, { name });\n }\n /**\n * Creates a copy of this plugin.\n */\n clone() {\n return new _NetworkPlugin(this.name);\n }\n };\n exports3.NetworkPlugin = NetworkPlugin;\n var GasCostPlugin = class _GasCostPlugin extends NetworkPlugin {\n /**\n * The block number to treat these values as valid from.\n *\n * This allows a hardfork to have updated values included as well as\n * mulutiple hardforks to be supported.\n */\n effectiveBlock;\n /**\n * The transactions base fee.\n */\n txBase;\n /**\n * The fee for creating a new account.\n */\n txCreate;\n /**\n * The fee per zero-byte in the data.\n */\n txDataZero;\n /**\n * The fee per non-zero-byte in the data.\n */\n txDataNonzero;\n /**\n * The fee per storage key in the [[link-eip-2930]] access list.\n */\n txAccessListStorageKey;\n /**\n * The fee per address in the [[link-eip-2930]] access list.\n */\n txAccessListAddress;\n /**\n * Creates a new GasCostPlugin from %%effectiveBlock%% until the\n * latest block or another GasCostPlugin supercedes that block number,\n * with the associated %%costs%%.\n */\n constructor(effectiveBlock, costs) {\n if (effectiveBlock == null) {\n effectiveBlock = 0;\n }\n super(`org.ethers.network.plugins.GasCost#${effectiveBlock || 0}`);\n const props = { effectiveBlock };\n function set(name, nullish) {\n let value = (costs || {})[name];\n if (value == null) {\n value = nullish;\n }\n (0, index_js_1.assertArgument)(typeof value === \"number\", `invalud value for ${name}`, \"costs\", costs);\n props[name] = value;\n }\n set(\"txBase\", 21e3);\n set(\"txCreate\", 32e3);\n set(\"txDataZero\", 4);\n set(\"txDataNonzero\", 16);\n set(\"txAccessListStorageKey\", 1900);\n set(\"txAccessListAddress\", 2400);\n (0, properties_js_1.defineProperties)(this, props);\n }\n clone() {\n return new _GasCostPlugin(this.effectiveBlock, this);\n }\n };\n exports3.GasCostPlugin = GasCostPlugin;\n var EnsPlugin = class _EnsPlugin extends NetworkPlugin {\n /**\n * The ENS Registrty Contract address.\n */\n address;\n /**\n * The chain ID that the ENS contract lives on.\n */\n targetNetwork;\n /**\n * Creates a new **EnsPlugin** connected to %%address%% on the\n * %%targetNetwork%%. The default ENS address and mainnet is used\n * if unspecified.\n */\n constructor(address, targetNetwork) {\n super(\"org.ethers.plugins.network.Ens\");\n (0, properties_js_1.defineProperties)(this, {\n address: address || EnsAddress,\n targetNetwork: targetNetwork == null ? 1 : targetNetwork\n });\n }\n clone() {\n return new _EnsPlugin(this.address, this.targetNetwork);\n }\n };\n exports3.EnsPlugin = EnsPlugin;\n var FeeDataNetworkPlugin = class _FeeDataNetworkPlugin extends NetworkPlugin {\n #feeDataFunc;\n /**\n * The fee data function provided to the constructor.\n */\n get feeDataFunc() {\n return this.#feeDataFunc;\n }\n /**\n * Creates a new **FeeDataNetworkPlugin**.\n */\n constructor(feeDataFunc) {\n super(\"org.ethers.plugins.network.FeeData\");\n this.#feeDataFunc = feeDataFunc;\n }\n /**\n * Resolves to the fee data.\n */\n async getFeeData(provider) {\n return await this.#feeDataFunc(provider);\n }\n clone() {\n return new _FeeDataNetworkPlugin(this.#feeDataFunc);\n }\n };\n exports3.FeeDataNetworkPlugin = FeeDataNetworkPlugin;\n var FetchUrlFeeDataNetworkPlugin = class extends NetworkPlugin {\n #url;\n #processFunc;\n /**\n * The URL to initialize the FetchRequest with in %%processFunc%%.\n */\n get url() {\n return this.#url;\n }\n /**\n * The callback to use when computing the FeeData.\n */\n get processFunc() {\n return this.#processFunc;\n }\n /**\n * Creates a new **FetchUrlFeeDataNetworkPlugin** which will\n * be used when computing the fee data for the network.\n */\n constructor(url, processFunc) {\n super(\"org.ethers.plugins.network.FetchUrlFeeDataPlugin\");\n this.#url = url;\n this.#processFunc = processFunc;\n }\n // We are immutable, so we can serve as our own clone\n clone() {\n return this;\n }\n };\n exports3.FetchUrlFeeDataNetworkPlugin = FetchUrlFeeDataNetworkPlugin;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/network.js\n var require_network = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/network.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Network = void 0;\n var index_js_1 = require_transaction2();\n var index_js_2 = require_utils13();\n var plugins_network_js_1 = require_plugins_network();\n var Networks = /* @__PURE__ */ new Map();\n var Network = class _Network {\n #name;\n #chainId;\n #plugins;\n /**\n * Creates a new **Network** for %%name%% and %%chainId%%.\n */\n constructor(name, chainId) {\n this.#name = name;\n this.#chainId = (0, index_js_2.getBigInt)(chainId);\n this.#plugins = /* @__PURE__ */ new Map();\n }\n /**\n * Returns a JSON-compatible representation of a Network.\n */\n toJSON() {\n return { name: this.name, chainId: String(this.chainId) };\n }\n /**\n * The network common name.\n *\n * This is the canonical name, as networks migh have multiple\n * names.\n */\n get name() {\n return this.#name;\n }\n set name(value) {\n this.#name = value;\n }\n /**\n * The network chain ID.\n */\n get chainId() {\n return this.#chainId;\n }\n set chainId(value) {\n this.#chainId = (0, index_js_2.getBigInt)(value, \"chainId\");\n }\n /**\n * Returns true if %%other%% matches this network. Any chain ID\n * must match, and if no chain ID is present, the name must match.\n *\n * This method does not currently check for additional properties,\n * such as ENS address or plug-in compatibility.\n */\n matches(other) {\n if (other == null) {\n return false;\n }\n if (typeof other === \"string\") {\n try {\n return this.chainId === (0, index_js_2.getBigInt)(other);\n } catch (error) {\n }\n return this.name === other;\n }\n if (typeof other === \"number\" || typeof other === \"bigint\") {\n try {\n return this.chainId === (0, index_js_2.getBigInt)(other);\n } catch (error) {\n }\n return false;\n }\n if (typeof other === \"object\") {\n if (other.chainId != null) {\n try {\n return this.chainId === (0, index_js_2.getBigInt)(other.chainId);\n } catch (error) {\n }\n return false;\n }\n if (other.name != null) {\n return this.name === other.name;\n }\n return false;\n }\n return false;\n }\n /**\n * Returns the list of plugins currently attached to this Network.\n */\n get plugins() {\n return Array.from(this.#plugins.values());\n }\n /**\n * Attach a new %%plugin%% to this Network. The network name\n * must be unique, excluding any fragment.\n */\n attachPlugin(plugin) {\n if (this.#plugins.get(plugin.name)) {\n throw new Error(`cannot replace existing plugin: ${plugin.name} `);\n }\n this.#plugins.set(plugin.name, plugin.clone());\n return this;\n }\n /**\n * Return the plugin, if any, matching %%name%% exactly. Plugins\n * with fragments will not be returned unless %%name%% includes\n * a fragment.\n */\n getPlugin(name) {\n return this.#plugins.get(name) || null;\n }\n /**\n * Gets a list of all plugins that match %%name%%, with otr without\n * a fragment.\n */\n getPlugins(basename) {\n return this.plugins.filter((p4) => p4.name.split(\"#\")[0] === basename);\n }\n /**\n * Create a copy of this Network.\n */\n clone() {\n const clone2 = new _Network(this.name, this.chainId);\n this.plugins.forEach((plugin) => {\n clone2.attachPlugin(plugin.clone());\n });\n return clone2;\n }\n /**\n * Compute the intrinsic gas required for a transaction.\n *\n * A GasCostPlugin can be attached to override the default\n * values.\n */\n computeIntrinsicGas(tx) {\n const costs = this.getPlugin(\"org.ethers.plugins.network.GasCost\") || new plugins_network_js_1.GasCostPlugin();\n let gas = costs.txBase;\n if (tx.to == null) {\n gas += costs.txCreate;\n }\n if (tx.data) {\n for (let i3 = 2; i3 < tx.data.length; i3 += 2) {\n if (tx.data.substring(i3, i3 + 2) === \"00\") {\n gas += costs.txDataZero;\n } else {\n gas += costs.txDataNonzero;\n }\n }\n }\n if (tx.accessList) {\n const accessList = (0, index_js_1.accessListify)(tx.accessList);\n for (const addr in accessList) {\n gas += costs.txAccessListAddress + costs.txAccessListStorageKey * accessList[addr].storageKeys.length;\n }\n }\n return gas;\n }\n /**\n * Returns a new Network for the %%network%% name or chainId.\n */\n static from(network) {\n injectCommonNetworks();\n if (network == null) {\n return _Network.from(\"mainnet\");\n }\n if (typeof network === \"number\") {\n network = BigInt(network);\n }\n if (typeof network === \"string\" || typeof network === \"bigint\") {\n const networkFunc = Networks.get(network);\n if (networkFunc) {\n return networkFunc();\n }\n if (typeof network === \"bigint\") {\n return new _Network(\"unknown\", network);\n }\n (0, index_js_2.assertArgument)(false, \"unknown network\", \"network\", network);\n }\n if (typeof network.clone === \"function\") {\n const clone2 = network.clone();\n return clone2;\n }\n if (typeof network === \"object\") {\n (0, index_js_2.assertArgument)(typeof network.name === \"string\" && typeof network.chainId === \"number\", \"invalid network object name or chainId\", \"network\", network);\n const custom3 = new _Network(network.name, network.chainId);\n if (network.ensAddress || network.ensNetwork != null) {\n custom3.attachPlugin(new plugins_network_js_1.EnsPlugin(network.ensAddress, network.ensNetwork));\n }\n return custom3;\n }\n (0, index_js_2.assertArgument)(false, \"invalid network\", \"network\", network);\n }\n /**\n * Register %%nameOrChainId%% with a function which returns\n * an instance of a Network representing that chain.\n */\n static register(nameOrChainId, networkFunc) {\n if (typeof nameOrChainId === \"number\") {\n nameOrChainId = BigInt(nameOrChainId);\n }\n const existing = Networks.get(nameOrChainId);\n if (existing) {\n (0, index_js_2.assertArgument)(false, `conflicting network for ${JSON.stringify(existing.name)}`, \"nameOrChainId\", nameOrChainId);\n }\n Networks.set(nameOrChainId, networkFunc);\n }\n };\n exports3.Network = Network;\n function parseUnits(_value, decimals) {\n const value = String(_value);\n if (!value.match(/^[0-9.]+$/)) {\n throw new Error(`invalid gwei value: ${_value}`);\n }\n const comps = value.split(\".\");\n if (comps.length === 1) {\n comps.push(\"\");\n }\n if (comps.length !== 2) {\n throw new Error(`invalid gwei value: ${_value}`);\n }\n while (comps[1].length < decimals) {\n comps[1] += \"0\";\n }\n if (comps[1].length > 9) {\n let frac = BigInt(comps[1].substring(0, 9));\n if (!comps[1].substring(9).match(/^0+$/)) {\n frac++;\n }\n comps[1] = frac.toString();\n }\n return BigInt(comps[0] + comps[1]);\n }\n function getGasStationPlugin(url) {\n return new plugins_network_js_1.FetchUrlFeeDataNetworkPlugin(url, async (fetchFeeData, provider, request) => {\n request.setHeader(\"User-Agent\", \"ethers\");\n let response;\n try {\n const [_response, _feeData] = await Promise.all([\n request.send(),\n fetchFeeData()\n ]);\n response = _response;\n const payload = response.bodyJson.standard;\n const feeData = {\n gasPrice: _feeData.gasPrice,\n maxFeePerGas: parseUnits(payload.maxFee, 9),\n maxPriorityFeePerGas: parseUnits(payload.maxPriorityFee, 9)\n };\n return feeData;\n } catch (error) {\n (0, index_js_2.assert)(false, `error encountered with polygon gas station (${JSON.stringify(request.url)})`, \"SERVER_ERROR\", { request, response, error });\n }\n });\n }\n var injected = false;\n function injectCommonNetworks() {\n if (injected) {\n return;\n }\n injected = true;\n function registerEth(name, chainId, options) {\n const func = function() {\n const network = new Network(name, chainId);\n if (options.ensNetwork != null) {\n network.attachPlugin(new plugins_network_js_1.EnsPlugin(null, options.ensNetwork));\n }\n network.attachPlugin(new plugins_network_js_1.GasCostPlugin());\n (options.plugins || []).forEach((plugin) => {\n network.attachPlugin(plugin);\n });\n return network;\n };\n Network.register(name, func);\n Network.register(chainId, func);\n if (options.altNames) {\n options.altNames.forEach((name2) => {\n Network.register(name2, func);\n });\n }\n }\n registerEth(\"mainnet\", 1, { ensNetwork: 1, altNames: [\"homestead\"] });\n registerEth(\"ropsten\", 3, { ensNetwork: 3 });\n registerEth(\"rinkeby\", 4, { ensNetwork: 4 });\n registerEth(\"goerli\", 5, { ensNetwork: 5 });\n registerEth(\"kovan\", 42, { ensNetwork: 42 });\n registerEth(\"sepolia\", 11155111, { ensNetwork: 11155111 });\n registerEth(\"holesky\", 17e3, { ensNetwork: 17e3 });\n registerEth(\"classic\", 61, {});\n registerEth(\"classicKotti\", 6, {});\n registerEth(\"arbitrum\", 42161, {\n ensNetwork: 1\n });\n registerEth(\"arbitrum-goerli\", 421613, {});\n registerEth(\"arbitrum-sepolia\", 421614, {});\n registerEth(\"base\", 8453, { ensNetwork: 1 });\n registerEth(\"base-goerli\", 84531, {});\n registerEth(\"base-sepolia\", 84532, {});\n registerEth(\"bnb\", 56, { ensNetwork: 1 });\n registerEth(\"bnbt\", 97, {});\n registerEth(\"linea\", 59144, { ensNetwork: 1 });\n registerEth(\"linea-goerli\", 59140, {});\n registerEth(\"linea-sepolia\", 59141, {});\n registerEth(\"matic\", 137, {\n ensNetwork: 1,\n plugins: [\n getGasStationPlugin(\"https://gasstation.polygon.technology/v2\")\n ]\n });\n registerEth(\"matic-amoy\", 80002, {});\n registerEth(\"matic-mumbai\", 80001, {\n altNames: [\"maticMumbai\", \"maticmum\"],\n plugins: [\n getGasStationPlugin(\"https://gasstation-testnet.polygon.technology/v2\")\n ]\n });\n registerEth(\"optimism\", 10, {\n ensNetwork: 1,\n plugins: []\n });\n registerEth(\"optimism-goerli\", 420, {});\n registerEth(\"optimism-sepolia\", 11155420, {});\n registerEth(\"xdai\", 100, { ensNetwork: 1 });\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/subscriber-polling.js\n var require_subscriber_polling = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/subscriber-polling.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PollingEventSubscriber = exports3.PollingTransactionSubscriber = exports3.PollingOrphanSubscriber = exports3.PollingBlockTagSubscriber = exports3.OnBlockSubscriber = exports3.PollingBlockSubscriber = exports3.getPollingSubscriber = void 0;\n var index_js_1 = require_utils13();\n function copy(obj) {\n return JSON.parse(JSON.stringify(obj));\n }\n function getPollingSubscriber(provider, event) {\n if (event === \"block\") {\n return new PollingBlockSubscriber(provider);\n }\n if ((0, index_js_1.isHexString)(event, 32)) {\n return new PollingTransactionSubscriber(provider, event);\n }\n (0, index_js_1.assert)(false, \"unsupported polling event\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getPollingSubscriber\",\n info: { event }\n });\n }\n exports3.getPollingSubscriber = getPollingSubscriber;\n var PollingBlockSubscriber = class {\n #provider;\n #poller;\n #interval;\n // The most recent block we have scanned for events. The value -2\n // indicates we still need to fetch an initial block number\n #blockNumber;\n /**\n * Create a new **PollingBlockSubscriber** attached to %%provider%%.\n */\n constructor(provider) {\n this.#provider = provider;\n this.#poller = null;\n this.#interval = 4e3;\n this.#blockNumber = -2;\n }\n /**\n * The polling interval.\n */\n get pollingInterval() {\n return this.#interval;\n }\n set pollingInterval(value) {\n this.#interval = value;\n }\n async #poll() {\n try {\n const blockNumber = await this.#provider.getBlockNumber();\n if (this.#blockNumber === -2) {\n this.#blockNumber = blockNumber;\n return;\n }\n if (blockNumber !== this.#blockNumber) {\n for (let b4 = this.#blockNumber + 1; b4 <= blockNumber; b4++) {\n if (this.#poller == null) {\n return;\n }\n await this.#provider.emit(\"block\", b4);\n }\n this.#blockNumber = blockNumber;\n }\n } catch (error) {\n }\n if (this.#poller == null) {\n return;\n }\n this.#poller = this.#provider._setTimeout(this.#poll.bind(this), this.#interval);\n }\n start() {\n if (this.#poller) {\n return;\n }\n this.#poller = this.#provider._setTimeout(this.#poll.bind(this), this.#interval);\n this.#poll();\n }\n stop() {\n if (!this.#poller) {\n return;\n }\n this.#provider._clearTimeout(this.#poller);\n this.#poller = null;\n }\n pause(dropWhilePaused) {\n this.stop();\n if (dropWhilePaused) {\n this.#blockNumber = -2;\n }\n }\n resume() {\n this.start();\n }\n };\n exports3.PollingBlockSubscriber = PollingBlockSubscriber;\n var OnBlockSubscriber = class {\n #provider;\n #poll;\n #running;\n /**\n * Create a new **OnBlockSubscriber** attached to %%provider%%.\n */\n constructor(provider) {\n this.#provider = provider;\n this.#running = false;\n this.#poll = (blockNumber) => {\n this._poll(blockNumber, this.#provider);\n };\n }\n /**\n * Called on every new block.\n */\n async _poll(blockNumber, provider) {\n throw new Error(\"sub-classes must override this\");\n }\n start() {\n if (this.#running) {\n return;\n }\n this.#running = true;\n this.#poll(-2);\n this.#provider.on(\"block\", this.#poll);\n }\n stop() {\n if (!this.#running) {\n return;\n }\n this.#running = false;\n this.#provider.off(\"block\", this.#poll);\n }\n pause(dropWhilePaused) {\n this.stop();\n }\n resume() {\n this.start();\n }\n };\n exports3.OnBlockSubscriber = OnBlockSubscriber;\n var PollingBlockTagSubscriber = class extends OnBlockSubscriber {\n #tag;\n #lastBlock;\n constructor(provider, tag) {\n super(provider);\n this.#tag = tag;\n this.#lastBlock = -2;\n }\n pause(dropWhilePaused) {\n if (dropWhilePaused) {\n this.#lastBlock = -2;\n }\n super.pause(dropWhilePaused);\n }\n async _poll(blockNumber, provider) {\n const block = await provider.getBlock(this.#tag);\n if (block == null) {\n return;\n }\n if (this.#lastBlock === -2) {\n this.#lastBlock = block.number;\n } else if (block.number > this.#lastBlock) {\n provider.emit(this.#tag, block.number);\n this.#lastBlock = block.number;\n }\n }\n };\n exports3.PollingBlockTagSubscriber = PollingBlockTagSubscriber;\n var PollingOrphanSubscriber = class extends OnBlockSubscriber {\n #filter;\n constructor(provider, filter) {\n super(provider);\n this.#filter = copy(filter);\n }\n async _poll(blockNumber, provider) {\n throw new Error(\"@TODO\");\n console.log(this.#filter);\n }\n };\n exports3.PollingOrphanSubscriber = PollingOrphanSubscriber;\n var PollingTransactionSubscriber = class extends OnBlockSubscriber {\n #hash;\n /**\n * Create a new **PollingTransactionSubscriber** attached to\n * %%provider%%, listening for %%hash%%.\n */\n constructor(provider, hash3) {\n super(provider);\n this.#hash = hash3;\n }\n async _poll(blockNumber, provider) {\n const tx = await provider.getTransactionReceipt(this.#hash);\n if (tx) {\n provider.emit(this.#hash, tx);\n }\n }\n };\n exports3.PollingTransactionSubscriber = PollingTransactionSubscriber;\n var PollingEventSubscriber = class {\n #provider;\n #filter;\n #poller;\n #running;\n // The most recent block we have scanned for events. The value -2\n // indicates we still need to fetch an initial block number\n #blockNumber;\n /**\n * Create a new **PollingTransactionSubscriber** attached to\n * %%provider%%, listening for %%filter%%.\n */\n constructor(provider, filter) {\n this.#provider = provider;\n this.#filter = copy(filter);\n this.#poller = this.#poll.bind(this);\n this.#running = false;\n this.#blockNumber = -2;\n }\n async #poll(blockNumber) {\n if (this.#blockNumber === -2) {\n return;\n }\n const filter = copy(this.#filter);\n filter.fromBlock = this.#blockNumber + 1;\n filter.toBlock = blockNumber;\n const logs = await this.#provider.getLogs(filter);\n if (logs.length === 0) {\n if (this.#blockNumber < blockNumber - 60) {\n this.#blockNumber = blockNumber - 60;\n }\n return;\n }\n for (const log of logs) {\n this.#provider.emit(this.#filter, log);\n this.#blockNumber = log.blockNumber;\n }\n }\n start() {\n if (this.#running) {\n return;\n }\n this.#running = true;\n if (this.#blockNumber === -2) {\n this.#provider.getBlockNumber().then((blockNumber) => {\n this.#blockNumber = blockNumber;\n });\n }\n this.#provider.on(\"block\", this.#poller);\n }\n stop() {\n if (!this.#running) {\n return;\n }\n this.#running = false;\n this.#provider.off(\"block\", this.#poller);\n }\n pause(dropWhilePaused) {\n this.stop();\n if (dropWhilePaused) {\n this.#blockNumber = -2;\n }\n }\n resume() {\n this.start();\n }\n };\n exports3.PollingEventSubscriber = PollingEventSubscriber;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/abstract-provider.js\n var require_abstract_provider = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/abstract-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AbstractProvider = exports3.UnmanagedSubscriber = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_constants7();\n var index_js_3 = require_contract2();\n var index_js_4 = require_hash2();\n var index_js_5 = require_transaction2();\n var index_js_6 = require_utils13();\n var ens_resolver_js_1 = require_ens_resolver();\n var format_js_1 = require_format3();\n var network_js_1 = require_network();\n var provider_js_1 = require_provider();\n var subscriber_polling_js_1 = require_subscriber_polling();\n var BN_2 = BigInt(2);\n var MAX_CCIP_REDIRECTS = 10;\n function isPromise(value) {\n return value && typeof value.then === \"function\";\n }\n function getTag(prefix, value) {\n return prefix + \":\" + JSON.stringify(value, (k4, v2) => {\n if (v2 == null) {\n return \"null\";\n }\n if (typeof v2 === \"bigint\") {\n return `bigint:${v2.toString()}`;\n }\n if (typeof v2 === \"string\") {\n return v2.toLowerCase();\n }\n if (typeof v2 === \"object\" && !Array.isArray(v2)) {\n const keys = Object.keys(v2);\n keys.sort();\n return keys.reduce((accum, key) => {\n accum[key] = v2[key];\n return accum;\n }, {});\n }\n return v2;\n });\n }\n var UnmanagedSubscriber = class {\n /**\n * The name fof the event.\n */\n name;\n /**\n * Create a new UnmanagedSubscriber with %%name%%.\n */\n constructor(name) {\n (0, index_js_6.defineProperties)(this, { name });\n }\n start() {\n }\n stop() {\n }\n pause(dropWhilePaused) {\n }\n resume() {\n }\n };\n exports3.UnmanagedSubscriber = UnmanagedSubscriber;\n function copy(value) {\n return JSON.parse(JSON.stringify(value));\n }\n function concisify(items) {\n items = Array.from(new Set(items).values());\n items.sort();\n return items;\n }\n async function getSubscription(_event, provider) {\n if (_event == null) {\n throw new Error(\"invalid event\");\n }\n if (Array.isArray(_event)) {\n _event = { topics: _event };\n }\n if (typeof _event === \"string\") {\n switch (_event) {\n case \"block\":\n case \"debug\":\n case \"error\":\n case \"finalized\":\n case \"network\":\n case \"pending\":\n case \"safe\": {\n return { type: _event, tag: _event };\n }\n }\n }\n if ((0, index_js_6.isHexString)(_event, 32)) {\n const hash3 = _event.toLowerCase();\n return { type: \"transaction\", tag: getTag(\"tx\", { hash: hash3 }), hash: hash3 };\n }\n if (_event.orphan) {\n const event = _event;\n return { type: \"orphan\", tag: getTag(\"orphan\", event), filter: copy(event) };\n }\n if (_event.address || _event.topics) {\n const event = _event;\n const filter = {\n topics: (event.topics || []).map((t3) => {\n if (t3 == null) {\n return null;\n }\n if (Array.isArray(t3)) {\n return concisify(t3.map((t4) => t4.toLowerCase()));\n }\n return t3.toLowerCase();\n })\n };\n if (event.address) {\n const addresses4 = [];\n const promises = [];\n const addAddress = (addr) => {\n if ((0, index_js_6.isHexString)(addr)) {\n addresses4.push(addr);\n } else {\n promises.push((async () => {\n addresses4.push(await (0, index_js_1.resolveAddress)(addr, provider));\n })());\n }\n };\n if (Array.isArray(event.address)) {\n event.address.forEach(addAddress);\n } else {\n addAddress(event.address);\n }\n if (promises.length) {\n await Promise.all(promises);\n }\n filter.address = concisify(addresses4.map((a3) => a3.toLowerCase()));\n }\n return { filter, tag: getTag(\"event\", filter), type: \"event\" };\n }\n (0, index_js_6.assertArgument)(false, \"unknown ProviderEvent\", \"event\", _event);\n }\n function getTime() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n var defaultOptions = {\n cacheTimeout: 250,\n pollingInterval: 4e3\n };\n var AbstractProvider = class {\n #subs;\n #plugins;\n // null=unpaused, true=paused+dropWhilePaused, false=paused\n #pausedState;\n #destroyed;\n #networkPromise;\n #anyNetwork;\n #performCache;\n // The most recent block number if running an event or -1 if no \"block\" event\n #lastBlockNumber;\n #nextTimer;\n #timers;\n #disableCcipRead;\n #options;\n /**\n * Create a new **AbstractProvider** connected to %%network%%, or\n * use the various network detection capabilities to discover the\n * [[Network]] if necessary.\n */\n constructor(_network, options) {\n this.#options = Object.assign({}, defaultOptions, options || {});\n if (_network === \"any\") {\n this.#anyNetwork = true;\n this.#networkPromise = null;\n } else if (_network) {\n const network = network_js_1.Network.from(_network);\n this.#anyNetwork = false;\n this.#networkPromise = Promise.resolve(network);\n setTimeout(() => {\n this.emit(\"network\", network, null);\n }, 0);\n } else {\n this.#anyNetwork = false;\n this.#networkPromise = null;\n }\n this.#lastBlockNumber = -1;\n this.#performCache = /* @__PURE__ */ new Map();\n this.#subs = /* @__PURE__ */ new Map();\n this.#plugins = /* @__PURE__ */ new Map();\n this.#pausedState = null;\n this.#destroyed = false;\n this.#nextTimer = 1;\n this.#timers = /* @__PURE__ */ new Map();\n this.#disableCcipRead = false;\n }\n get pollingInterval() {\n return this.#options.pollingInterval;\n }\n /**\n * Returns ``this``, to allow an **AbstractProvider** to implement\n * the [[ContractRunner]] interface.\n */\n get provider() {\n return this;\n }\n /**\n * Returns all the registered plug-ins.\n */\n get plugins() {\n return Array.from(this.#plugins.values());\n }\n /**\n * Attach a new plug-in.\n */\n attachPlugin(plugin) {\n if (this.#plugins.get(plugin.name)) {\n throw new Error(`cannot replace existing plugin: ${plugin.name} `);\n }\n this.#plugins.set(plugin.name, plugin.connect(this));\n return this;\n }\n /**\n * Get a plugin by name.\n */\n getPlugin(name) {\n return this.#plugins.get(name) || null;\n }\n /**\n * Prevent any CCIP-read operation, regardless of whether requested\n * in a [[call]] using ``enableCcipRead``.\n */\n get disableCcipRead() {\n return this.#disableCcipRead;\n }\n set disableCcipRead(value) {\n this.#disableCcipRead = !!value;\n }\n // Shares multiple identical requests made during the same 250ms\n async #perform(req) {\n const timeout = this.#options.cacheTimeout;\n if (timeout < 0) {\n return await this._perform(req);\n }\n const tag = getTag(req.method, req);\n let perform = this.#performCache.get(tag);\n if (!perform) {\n perform = this._perform(req);\n this.#performCache.set(tag, perform);\n setTimeout(() => {\n if (this.#performCache.get(tag) === perform) {\n this.#performCache.delete(tag);\n }\n }, timeout);\n }\n return await perform;\n }\n /**\n * Resolves to the data for executing the CCIP-read operations.\n */\n async ccipReadFetch(tx, calldata, urls) {\n if (this.disableCcipRead || urls.length === 0 || tx.to == null) {\n return null;\n }\n const sender = tx.to.toLowerCase();\n const data = calldata.toLowerCase();\n const errorMessages = [];\n for (let i3 = 0; i3 < urls.length; i3++) {\n const url = urls[i3];\n const href = url.replace(\"{sender}\", sender).replace(\"{data}\", data);\n const request = new index_js_6.FetchRequest(href);\n if (url.indexOf(\"{data}\") === -1) {\n request.body = { data, sender };\n }\n this.emit(\"debug\", { action: \"sendCcipReadFetchRequest\", request, index: i3, urls });\n let errorMessage = \"unknown error\";\n let resp;\n try {\n resp = await request.send();\n } catch (error) {\n errorMessages.push(error.message);\n this.emit(\"debug\", { action: \"receiveCcipReadFetchError\", request, result: { error } });\n continue;\n }\n try {\n const result = resp.bodyJson;\n if (result.data) {\n this.emit(\"debug\", { action: \"receiveCcipReadFetchResult\", request, result });\n return result.data;\n }\n if (result.message) {\n errorMessage = result.message;\n }\n this.emit(\"debug\", { action: \"receiveCcipReadFetchError\", request, result });\n } catch (error) {\n }\n (0, index_js_6.assert)(resp.statusCode < 400 || resp.statusCode >= 500, `response not found during CCIP fetch: ${errorMessage}`, \"OFFCHAIN_FAULT\", { reason: \"404_MISSING_RESOURCE\", transaction: tx, info: { url, errorMessage } });\n errorMessages.push(errorMessage);\n }\n (0, index_js_6.assert)(false, `error encountered during CCIP fetch: ${errorMessages.map((m2) => JSON.stringify(m2)).join(\", \")}`, \"OFFCHAIN_FAULT\", {\n reason: \"500_SERVER_ERROR\",\n transaction: tx,\n info: { urls, errorMessages }\n });\n }\n /**\n * Provides the opportunity for a sub-class to wrap a block before\n * returning it, to add additional properties or an alternate\n * sub-class of [[Block]].\n */\n _wrapBlock(value, network) {\n return new provider_js_1.Block((0, format_js_1.formatBlock)(value), this);\n }\n /**\n * Provides the opportunity for a sub-class to wrap a log before\n * returning it, to add additional properties or an alternate\n * sub-class of [[Log]].\n */\n _wrapLog(value, network) {\n return new provider_js_1.Log((0, format_js_1.formatLog)(value), this);\n }\n /**\n * Provides the opportunity for a sub-class to wrap a transaction\n * receipt before returning it, to add additional properties or an\n * alternate sub-class of [[TransactionReceipt]].\n */\n _wrapTransactionReceipt(value, network) {\n return new provider_js_1.TransactionReceipt((0, format_js_1.formatTransactionReceipt)(value), this);\n }\n /**\n * Provides the opportunity for a sub-class to wrap a transaction\n * response before returning it, to add additional properties or an\n * alternate sub-class of [[TransactionResponse]].\n */\n _wrapTransactionResponse(tx, network) {\n return new provider_js_1.TransactionResponse((0, format_js_1.formatTransactionResponse)(tx), this);\n }\n /**\n * Resolves to the Network, forcing a network detection using whatever\n * technique the sub-class requires.\n *\n * Sub-classes **must** override this.\n */\n _detectNetwork() {\n (0, index_js_6.assert)(false, \"sub-classes must implement this\", \"UNSUPPORTED_OPERATION\", {\n operation: \"_detectNetwork\"\n });\n }\n /**\n * Sub-classes should use this to perform all built-in operations. All\n * methods sanitizes and normalizes the values passed into this.\n *\n * Sub-classes **must** override this.\n */\n async _perform(req) {\n (0, index_js_6.assert)(false, `unsupported method: ${req.method}`, \"UNSUPPORTED_OPERATION\", {\n operation: req.method,\n info: req\n });\n }\n // State\n async getBlockNumber() {\n const blockNumber = (0, index_js_6.getNumber)(await this.#perform({ method: \"getBlockNumber\" }), \"%response\");\n if (this.#lastBlockNumber >= 0) {\n this.#lastBlockNumber = blockNumber;\n }\n return blockNumber;\n }\n /**\n * Returns or resolves to the address for %%address%%, resolving ENS\n * names and [[Addressable]] objects and returning if already an\n * address.\n */\n _getAddress(address) {\n return (0, index_js_1.resolveAddress)(address, this);\n }\n /**\n * Returns or resolves to a valid block tag for %%blockTag%%, resolving\n * negative values and returning if already a valid block tag.\n */\n _getBlockTag(blockTag) {\n if (blockTag == null) {\n return \"latest\";\n }\n switch (blockTag) {\n case \"earliest\":\n return \"0x0\";\n case \"finalized\":\n case \"latest\":\n case \"pending\":\n case \"safe\":\n return blockTag;\n }\n if ((0, index_js_6.isHexString)(blockTag)) {\n if ((0, index_js_6.isHexString)(blockTag, 32)) {\n return blockTag;\n }\n return (0, index_js_6.toQuantity)(blockTag);\n }\n if (typeof blockTag === \"bigint\") {\n blockTag = (0, index_js_6.getNumber)(blockTag, \"blockTag\");\n }\n if (typeof blockTag === \"number\") {\n if (blockTag >= 0) {\n return (0, index_js_6.toQuantity)(blockTag);\n }\n if (this.#lastBlockNumber >= 0) {\n return (0, index_js_6.toQuantity)(this.#lastBlockNumber + blockTag);\n }\n return this.getBlockNumber().then((b4) => (0, index_js_6.toQuantity)(b4 + blockTag));\n }\n (0, index_js_6.assertArgument)(false, \"invalid blockTag\", \"blockTag\", blockTag);\n }\n /**\n * Returns or resolves to a filter for %%filter%%, resolving any ENS\n * names or [[Addressable]] object and returning if already a valid\n * filter.\n */\n _getFilter(filter) {\n const topics = (filter.topics || []).map((t3) => {\n if (t3 == null) {\n return null;\n }\n if (Array.isArray(t3)) {\n return concisify(t3.map((t4) => t4.toLowerCase()));\n }\n return t3.toLowerCase();\n });\n const blockHash = \"blockHash\" in filter ? filter.blockHash : void 0;\n const resolve = (_address, fromBlock2, toBlock2) => {\n let address2 = void 0;\n switch (_address.length) {\n case 0:\n break;\n case 1:\n address2 = _address[0];\n break;\n default:\n _address.sort();\n address2 = _address;\n }\n if (blockHash) {\n if (fromBlock2 != null || toBlock2 != null) {\n throw new Error(\"invalid filter\");\n }\n }\n const filter2 = {};\n if (address2) {\n filter2.address = address2;\n }\n if (topics.length) {\n filter2.topics = topics;\n }\n if (fromBlock2) {\n filter2.fromBlock = fromBlock2;\n }\n if (toBlock2) {\n filter2.toBlock = toBlock2;\n }\n if (blockHash) {\n filter2.blockHash = blockHash;\n }\n return filter2;\n };\n let address = [];\n if (filter.address) {\n if (Array.isArray(filter.address)) {\n for (const addr of filter.address) {\n address.push(this._getAddress(addr));\n }\n } else {\n address.push(this._getAddress(filter.address));\n }\n }\n let fromBlock = void 0;\n if (\"fromBlock\" in filter) {\n fromBlock = this._getBlockTag(filter.fromBlock);\n }\n let toBlock = void 0;\n if (\"toBlock\" in filter) {\n toBlock = this._getBlockTag(filter.toBlock);\n }\n if (address.filter((a3) => typeof a3 !== \"string\").length || fromBlock != null && typeof fromBlock !== \"string\" || toBlock != null && typeof toBlock !== \"string\") {\n return Promise.all([Promise.all(address), fromBlock, toBlock]).then((result) => {\n return resolve(result[0], result[1], result[2]);\n });\n }\n return resolve(address, fromBlock, toBlock);\n }\n /**\n * Returns or resolves to a transaction for %%request%%, resolving\n * any ENS names or [[Addressable]] and returning if already a valid\n * transaction.\n */\n _getTransactionRequest(_request) {\n const request = (0, provider_js_1.copyRequest)(_request);\n const promises = [];\n [\"to\", \"from\"].forEach((key) => {\n if (request[key] == null) {\n return;\n }\n const addr = (0, index_js_1.resolveAddress)(request[key], this);\n if (isPromise(addr)) {\n promises.push(async function() {\n request[key] = await addr;\n }());\n } else {\n request[key] = addr;\n }\n });\n if (request.blockTag != null) {\n const blockTag = this._getBlockTag(request.blockTag);\n if (isPromise(blockTag)) {\n promises.push(async function() {\n request.blockTag = await blockTag;\n }());\n } else {\n request.blockTag = blockTag;\n }\n }\n if (promises.length) {\n return async function() {\n await Promise.all(promises);\n return request;\n }();\n }\n return request;\n }\n async getNetwork() {\n if (this.#networkPromise == null) {\n const detectNetwork = (async () => {\n try {\n const network = await this._detectNetwork();\n this.emit(\"network\", network, null);\n return network;\n } catch (error) {\n if (this.#networkPromise === detectNetwork) {\n this.#networkPromise = null;\n }\n throw error;\n }\n })();\n this.#networkPromise = detectNetwork;\n return (await detectNetwork).clone();\n }\n const networkPromise = this.#networkPromise;\n const [expected, actual] = await Promise.all([\n networkPromise,\n this._detectNetwork()\n // The actual connected network\n ]);\n if (expected.chainId !== actual.chainId) {\n if (this.#anyNetwork) {\n this.emit(\"network\", actual, expected);\n if (this.#networkPromise === networkPromise) {\n this.#networkPromise = Promise.resolve(actual);\n }\n } else {\n (0, index_js_6.assert)(false, `network changed: ${expected.chainId} => ${actual.chainId} `, \"NETWORK_ERROR\", {\n event: \"changed\"\n });\n }\n }\n return expected.clone();\n }\n async getFeeData() {\n const network = await this.getNetwork();\n const getFeeDataFunc = async () => {\n const { _block, gasPrice, priorityFee } = await (0, index_js_6.resolveProperties)({\n _block: this.#getBlock(\"latest\", false),\n gasPrice: (async () => {\n try {\n const value = await this.#perform({ method: \"getGasPrice\" });\n return (0, index_js_6.getBigInt)(value, \"%response\");\n } catch (error) {\n }\n return null;\n })(),\n priorityFee: (async () => {\n try {\n const value = await this.#perform({ method: \"getPriorityFee\" });\n return (0, index_js_6.getBigInt)(value, \"%response\");\n } catch (error) {\n }\n return null;\n })()\n });\n let maxFeePerGas = null;\n let maxPriorityFeePerGas = null;\n const block = this._wrapBlock(_block, network);\n if (block && block.baseFeePerGas) {\n maxPriorityFeePerGas = priorityFee != null ? priorityFee : BigInt(\"1000000000\");\n maxFeePerGas = block.baseFeePerGas * BN_2 + maxPriorityFeePerGas;\n }\n return new provider_js_1.FeeData(gasPrice, maxFeePerGas, maxPriorityFeePerGas);\n };\n const plugin = network.getPlugin(\"org.ethers.plugins.network.FetchUrlFeeDataPlugin\");\n if (plugin) {\n const req = new index_js_6.FetchRequest(plugin.url);\n const feeData = await plugin.processFunc(getFeeDataFunc, this, req);\n return new provider_js_1.FeeData(feeData.gasPrice, feeData.maxFeePerGas, feeData.maxPriorityFeePerGas);\n }\n return await getFeeDataFunc();\n }\n async estimateGas(_tx) {\n let tx = this._getTransactionRequest(_tx);\n if (isPromise(tx)) {\n tx = await tx;\n }\n return (0, index_js_6.getBigInt)(await this.#perform({\n method: \"estimateGas\",\n transaction: tx\n }), \"%response\");\n }\n async #call(tx, blockTag, attempt) {\n (0, index_js_6.assert)(attempt < MAX_CCIP_REDIRECTS, \"CCIP read exceeded maximum redirections\", \"OFFCHAIN_FAULT\", {\n reason: \"TOO_MANY_REDIRECTS\",\n transaction: Object.assign({}, tx, { blockTag, enableCcipRead: true })\n });\n const transaction = (0, provider_js_1.copyRequest)(tx);\n try {\n return (0, index_js_6.hexlify)(await this._perform({ method: \"call\", transaction, blockTag }));\n } catch (error) {\n if (!this.disableCcipRead && (0, index_js_6.isCallException)(error) && error.data && attempt >= 0 && blockTag === \"latest\" && transaction.to != null && (0, index_js_6.dataSlice)(error.data, 0, 4) === \"0x556f1830\") {\n const data = error.data;\n const txSender = await (0, index_js_1.resolveAddress)(transaction.to, this);\n let ccipArgs;\n try {\n ccipArgs = parseOffchainLookup((0, index_js_6.dataSlice)(error.data, 4));\n } catch (error2) {\n (0, index_js_6.assert)(false, error2.message, \"OFFCHAIN_FAULT\", {\n reason: \"BAD_DATA\",\n transaction,\n info: { data }\n });\n }\n (0, index_js_6.assert)(ccipArgs.sender.toLowerCase() === txSender.toLowerCase(), \"CCIP Read sender mismatch\", \"CALL_EXCEPTION\", {\n action: \"call\",\n data,\n reason: \"OffchainLookup\",\n transaction,\n invocation: null,\n revert: {\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n name: \"OffchainLookup\",\n args: ccipArgs.errorArgs\n }\n });\n const ccipResult = await this.ccipReadFetch(transaction, ccipArgs.calldata, ccipArgs.urls);\n (0, index_js_6.assert)(ccipResult != null, \"CCIP Read failed to fetch data\", \"OFFCHAIN_FAULT\", {\n reason: \"FETCH_FAILED\",\n transaction,\n info: { data: error.data, errorArgs: ccipArgs.errorArgs }\n });\n const tx2 = {\n to: txSender,\n data: (0, index_js_6.concat)([ccipArgs.selector, encodeBytes3([ccipResult, ccipArgs.extraData])])\n };\n this.emit(\"debug\", { action: \"sendCcipReadCall\", transaction: tx2 });\n try {\n const result = await this.#call(tx2, blockTag, attempt + 1);\n this.emit(\"debug\", { action: \"receiveCcipReadCallResult\", transaction: Object.assign({}, tx2), result });\n return result;\n } catch (error2) {\n this.emit(\"debug\", { action: \"receiveCcipReadCallError\", transaction: Object.assign({}, tx2), error: error2 });\n throw error2;\n }\n }\n throw error;\n }\n }\n async #checkNetwork(promise) {\n const { value } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n value: promise\n });\n return value;\n }\n async call(_tx) {\n const { tx, blockTag } = await (0, index_js_6.resolveProperties)({\n tx: this._getTransactionRequest(_tx),\n blockTag: this._getBlockTag(_tx.blockTag)\n });\n return await this.#checkNetwork(this.#call(tx, blockTag, _tx.enableCcipRead ? 0 : -1));\n }\n // Account\n async #getAccountValue(request, _address, _blockTag) {\n let address = this._getAddress(_address);\n let blockTag = this._getBlockTag(_blockTag);\n if (typeof address !== \"string\" || typeof blockTag !== \"string\") {\n [address, blockTag] = await Promise.all([address, blockTag]);\n }\n return await this.#checkNetwork(this.#perform(Object.assign(request, { address, blockTag })));\n }\n async getBalance(address, blockTag) {\n return (0, index_js_6.getBigInt)(await this.#getAccountValue({ method: \"getBalance\" }, address, blockTag), \"%response\");\n }\n async getTransactionCount(address, blockTag) {\n return (0, index_js_6.getNumber)(await this.#getAccountValue({ method: \"getTransactionCount\" }, address, blockTag), \"%response\");\n }\n async getCode(address, blockTag) {\n return (0, index_js_6.hexlify)(await this.#getAccountValue({ method: \"getCode\" }, address, blockTag));\n }\n async getStorage(address, _position, blockTag) {\n const position = (0, index_js_6.getBigInt)(_position, \"position\");\n return (0, index_js_6.hexlify)(await this.#getAccountValue({ method: \"getStorage\", position }, address, blockTag));\n }\n // Write\n async broadcastTransaction(signedTx) {\n const { blockNumber, hash: hash3, network } = await (0, index_js_6.resolveProperties)({\n blockNumber: this.getBlockNumber(),\n hash: this._perform({\n method: \"broadcastTransaction\",\n signedTransaction: signedTx\n }),\n network: this.getNetwork()\n });\n const tx = index_js_5.Transaction.from(signedTx);\n if (tx.hash !== hash3) {\n throw new Error(\"@TODO: the returned hash did not match\");\n }\n return this._wrapTransactionResponse(tx, network).replaceableTransaction(blockNumber);\n }\n async #getBlock(block, includeTransactions) {\n if ((0, index_js_6.isHexString)(block, 32)) {\n return await this.#perform({\n method: \"getBlock\",\n blockHash: block,\n includeTransactions\n });\n }\n let blockTag = this._getBlockTag(block);\n if (typeof blockTag !== \"string\") {\n blockTag = await blockTag;\n }\n return await this.#perform({\n method: \"getBlock\",\n blockTag,\n includeTransactions\n });\n }\n // Queries\n async getBlock(block, prefetchTxs) {\n const { network, params } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n params: this.#getBlock(block, !!prefetchTxs)\n });\n if (params == null) {\n return null;\n }\n return this._wrapBlock(params, network);\n }\n async getTransaction(hash3) {\n const { network, params } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n params: this.#perform({ method: \"getTransaction\", hash: hash3 })\n });\n if (params == null) {\n return null;\n }\n return this._wrapTransactionResponse(params, network);\n }\n async getTransactionReceipt(hash3) {\n const { network, params } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n params: this.#perform({ method: \"getTransactionReceipt\", hash: hash3 })\n });\n if (params == null) {\n return null;\n }\n if (params.gasPrice == null && params.effectiveGasPrice == null) {\n const tx = await this.#perform({ method: \"getTransaction\", hash: hash3 });\n if (tx == null) {\n throw new Error(\"report this; could not find tx or effectiveGasPrice\");\n }\n params.effectiveGasPrice = tx.gasPrice;\n }\n return this._wrapTransactionReceipt(params, network);\n }\n async getTransactionResult(hash3) {\n const { result } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n result: this.#perform({ method: \"getTransactionResult\", hash: hash3 })\n });\n if (result == null) {\n return null;\n }\n return (0, index_js_6.hexlify)(result);\n }\n // Bloom-filter Queries\n async getLogs(_filter) {\n let filter = this._getFilter(_filter);\n if (isPromise(filter)) {\n filter = await filter;\n }\n const { network, params } = await (0, index_js_6.resolveProperties)({\n network: this.getNetwork(),\n params: this.#perform({ method: \"getLogs\", filter })\n });\n return params.map((p4) => this._wrapLog(p4, network));\n }\n // ENS\n _getProvider(chainId) {\n (0, index_js_6.assert)(false, \"provider cannot connect to target network\", \"UNSUPPORTED_OPERATION\", {\n operation: \"_getProvider()\"\n });\n }\n async getResolver(name) {\n return await ens_resolver_js_1.EnsResolver.fromName(this, name);\n }\n async getAvatar(name) {\n const resolver = await this.getResolver(name);\n if (resolver) {\n return await resolver.getAvatar();\n }\n return null;\n }\n async resolveName(name) {\n const resolver = await this.getResolver(name);\n if (resolver) {\n return await resolver.getAddress();\n }\n return null;\n }\n async lookupAddress(address) {\n address = (0, index_js_1.getAddress)(address);\n const node = (0, index_js_4.namehash)(address.substring(2).toLowerCase() + \".addr.reverse\");\n try {\n const ensAddr = await ens_resolver_js_1.EnsResolver.getEnsAddress(this);\n const ensContract = new index_js_3.Contract(ensAddr, [\n \"function resolver(bytes32) view returns (address)\"\n ], this);\n const resolver = await ensContract.resolver(node);\n if (resolver == null || resolver === index_js_2.ZeroAddress) {\n return null;\n }\n const resolverContract = new index_js_3.Contract(resolver, [\n \"function name(bytes32) view returns (string)\"\n ], this);\n const name = await resolverContract.name(node);\n const check2 = await this.resolveName(name);\n if (check2 !== address) {\n return null;\n }\n return name;\n } catch (error) {\n if ((0, index_js_6.isError)(error, \"BAD_DATA\") && error.value === \"0x\") {\n return null;\n }\n if ((0, index_js_6.isError)(error, \"CALL_EXCEPTION\")) {\n return null;\n }\n throw error;\n }\n return null;\n }\n async waitForTransaction(hash3, _confirms, timeout) {\n const confirms = _confirms != null ? _confirms : 1;\n if (confirms === 0) {\n return this.getTransactionReceipt(hash3);\n }\n return new Promise(async (resolve, reject) => {\n let timer = null;\n const listener = async (blockNumber) => {\n try {\n const receipt = await this.getTransactionReceipt(hash3);\n if (receipt != null) {\n if (blockNumber - receipt.blockNumber + 1 >= confirms) {\n resolve(receipt);\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n return;\n }\n }\n } catch (error) {\n console.log(\"EEE\", error);\n }\n this.once(\"block\", listener);\n };\n if (timeout != null) {\n timer = setTimeout(() => {\n if (timer == null) {\n return;\n }\n timer = null;\n this.off(\"block\", listener);\n reject((0, index_js_6.makeError)(\"timeout\", \"TIMEOUT\", { reason: \"timeout\" }));\n }, timeout);\n }\n listener(await this.getBlockNumber());\n });\n }\n async waitForBlock(blockTag) {\n (0, index_js_6.assert)(false, \"not implemented yet\", \"NOT_IMPLEMENTED\", {\n operation: \"waitForBlock\"\n });\n }\n /**\n * Clear a timer created using the [[_setTimeout]] method.\n */\n _clearTimeout(timerId) {\n const timer = this.#timers.get(timerId);\n if (!timer) {\n return;\n }\n if (timer.timer) {\n clearTimeout(timer.timer);\n }\n this.#timers.delete(timerId);\n }\n /**\n * Create a timer that will execute %%func%% after at least %%timeout%%\n * (in ms). If %%timeout%% is unspecified, then %%func%% will execute\n * in the next event loop.\n *\n * [Pausing](AbstractProvider-paused) the provider will pause any\n * associated timers.\n */\n _setTimeout(_func, timeout) {\n if (timeout == null) {\n timeout = 0;\n }\n const timerId = this.#nextTimer++;\n const func = () => {\n this.#timers.delete(timerId);\n _func();\n };\n if (this.paused) {\n this.#timers.set(timerId, { timer: null, func, time: timeout });\n } else {\n const timer = setTimeout(func, timeout);\n this.#timers.set(timerId, { timer, func, time: getTime() });\n }\n return timerId;\n }\n /**\n * Perform %%func%% on each subscriber.\n */\n _forEachSubscriber(func) {\n for (const sub of this.#subs.values()) {\n func(sub.subscriber);\n }\n }\n /**\n * Sub-classes may override this to customize subscription\n * implementations.\n */\n _getSubscriber(sub) {\n switch (sub.type) {\n case \"debug\":\n case \"error\":\n case \"network\":\n return new UnmanagedSubscriber(sub.type);\n case \"block\": {\n const subscriber = new subscriber_polling_js_1.PollingBlockSubscriber(this);\n subscriber.pollingInterval = this.pollingInterval;\n return subscriber;\n }\n case \"safe\":\n case \"finalized\":\n return new subscriber_polling_js_1.PollingBlockTagSubscriber(this, sub.type);\n case \"event\":\n return new subscriber_polling_js_1.PollingEventSubscriber(this, sub.filter);\n case \"transaction\":\n return new subscriber_polling_js_1.PollingTransactionSubscriber(this, sub.hash);\n case \"orphan\":\n return new subscriber_polling_js_1.PollingOrphanSubscriber(this, sub.filter);\n }\n throw new Error(`unsupported event: ${sub.type}`);\n }\n /**\n * If a [[Subscriber]] fails and needs to replace itself, this\n * method may be used.\n *\n * For example, this is used for providers when using the\n * ``eth_getFilterChanges`` method, which can return null if state\n * filters are not supported by the backend, allowing the Subscriber\n * to swap in a [[PollingEventSubscriber]].\n */\n _recoverSubscriber(oldSub, newSub) {\n for (const sub of this.#subs.values()) {\n if (sub.subscriber === oldSub) {\n if (sub.started) {\n sub.subscriber.stop();\n }\n sub.subscriber = newSub;\n if (sub.started) {\n newSub.start();\n }\n if (this.#pausedState != null) {\n newSub.pause(this.#pausedState);\n }\n break;\n }\n }\n }\n async #hasSub(event, emitArgs) {\n let sub = await getSubscription(event, this);\n if (sub.type === \"event\" && emitArgs && emitArgs.length > 0 && emitArgs[0].removed === true) {\n sub = await getSubscription({ orphan: \"drop-log\", log: emitArgs[0] }, this);\n }\n return this.#subs.get(sub.tag) || null;\n }\n async #getSub(event) {\n const subscription = await getSubscription(event, this);\n const tag = subscription.tag;\n let sub = this.#subs.get(tag);\n if (!sub) {\n const subscriber = this._getSubscriber(subscription);\n const addressableMap = /* @__PURE__ */ new WeakMap();\n const nameMap = /* @__PURE__ */ new Map();\n sub = { subscriber, tag, addressableMap, nameMap, started: false, listeners: [] };\n this.#subs.set(tag, sub);\n }\n return sub;\n }\n async on(event, listener) {\n const sub = await this.#getSub(event);\n sub.listeners.push({ listener, once: false });\n if (!sub.started) {\n sub.subscriber.start();\n sub.started = true;\n if (this.#pausedState != null) {\n sub.subscriber.pause(this.#pausedState);\n }\n }\n return this;\n }\n async once(event, listener) {\n const sub = await this.#getSub(event);\n sub.listeners.push({ listener, once: true });\n if (!sub.started) {\n sub.subscriber.start();\n sub.started = true;\n if (this.#pausedState != null) {\n sub.subscriber.pause(this.#pausedState);\n }\n }\n return this;\n }\n async emit(event, ...args) {\n const sub = await this.#hasSub(event, args);\n if (!sub || sub.listeners.length === 0) {\n return false;\n }\n ;\n const count = sub.listeners.length;\n sub.listeners = sub.listeners.filter(({ listener, once: once2 }) => {\n const payload = new index_js_6.EventPayload(this, once2 ? null : listener, event);\n try {\n listener.call(this, ...args, payload);\n } catch (error) {\n }\n return !once2;\n });\n if (sub.listeners.length === 0) {\n if (sub.started) {\n sub.subscriber.stop();\n }\n this.#subs.delete(sub.tag);\n }\n return count > 0;\n }\n async listenerCount(event) {\n if (event) {\n const sub = await this.#hasSub(event);\n if (!sub) {\n return 0;\n }\n return sub.listeners.length;\n }\n let total = 0;\n for (const { listeners: listeners2 } of this.#subs.values()) {\n total += listeners2.length;\n }\n return total;\n }\n async listeners(event) {\n if (event) {\n const sub = await this.#hasSub(event);\n if (!sub) {\n return [];\n }\n return sub.listeners.map(({ listener }) => listener);\n }\n let result = [];\n for (const { listeners: listeners2 } of this.#subs.values()) {\n result = result.concat(listeners2.map(({ listener }) => listener));\n }\n return result;\n }\n async off(event, listener) {\n const sub = await this.#hasSub(event);\n if (!sub) {\n return this;\n }\n if (listener) {\n const index2 = sub.listeners.map(({ listener: listener2 }) => listener2).indexOf(listener);\n if (index2 >= 0) {\n sub.listeners.splice(index2, 1);\n }\n }\n if (!listener || sub.listeners.length === 0) {\n if (sub.started) {\n sub.subscriber.stop();\n }\n this.#subs.delete(sub.tag);\n }\n return this;\n }\n async removeAllListeners(event) {\n if (event) {\n const { tag, started, subscriber } = await this.#getSub(event);\n if (started) {\n subscriber.stop();\n }\n this.#subs.delete(tag);\n } else {\n for (const [tag, { started, subscriber }] of this.#subs) {\n if (started) {\n subscriber.stop();\n }\n this.#subs.delete(tag);\n }\n }\n return this;\n }\n // Alias for \"on\"\n async addListener(event, listener) {\n return await this.on(event, listener);\n }\n // Alias for \"off\"\n async removeListener(event, listener) {\n return this.off(event, listener);\n }\n /**\n * If this provider has been destroyed using the [[destroy]] method.\n *\n * Once destroyed, all resources are reclaimed, internal event loops\n * and timers are cleaned up and no further requests may be sent to\n * the provider.\n */\n get destroyed() {\n return this.#destroyed;\n }\n /**\n * Sub-classes may use this to shutdown any sockets or release their\n * resources and reject any pending requests.\n *\n * Sub-classes **must** call ``super.destroy()``.\n */\n destroy() {\n this.removeAllListeners();\n for (const timerId of this.#timers.keys()) {\n this._clearTimeout(timerId);\n }\n this.#destroyed = true;\n }\n /**\n * Whether the provider is currently paused.\n *\n * A paused provider will not emit any events, and generally should\n * not make any requests to the network, but that is up to sub-classes\n * to manage.\n *\n * Setting ``paused = true`` is identical to calling ``.pause(false)``,\n * which will buffer any events that occur while paused until the\n * provider is unpaused.\n */\n get paused() {\n return this.#pausedState != null;\n }\n set paused(pause) {\n if (!!pause === this.paused) {\n return;\n }\n if (this.paused) {\n this.resume();\n } else {\n this.pause(false);\n }\n }\n /**\n * Pause the provider. If %%dropWhilePaused%%, any events that occur\n * while paused are dropped, otherwise all events will be emitted once\n * the provider is unpaused.\n */\n pause(dropWhilePaused) {\n this.#lastBlockNumber = -1;\n if (this.#pausedState != null) {\n if (this.#pausedState == !!dropWhilePaused) {\n return;\n }\n (0, index_js_6.assert)(false, \"cannot change pause type; resume first\", \"UNSUPPORTED_OPERATION\", {\n operation: \"pause\"\n });\n }\n this._forEachSubscriber((s4) => s4.pause(dropWhilePaused));\n this.#pausedState = !!dropWhilePaused;\n for (const timer of this.#timers.values()) {\n if (timer.timer) {\n clearTimeout(timer.timer);\n }\n timer.time = getTime() - timer.time;\n }\n }\n /**\n * Resume the provider.\n */\n resume() {\n if (this.#pausedState == null) {\n return;\n }\n this._forEachSubscriber((s4) => s4.resume());\n this.#pausedState = null;\n for (const timer of this.#timers.values()) {\n let timeout = timer.time;\n if (timeout < 0) {\n timeout = 0;\n }\n timer.time = getTime();\n setTimeout(timer.func, timeout);\n }\n }\n };\n exports3.AbstractProvider = AbstractProvider;\n function _parseString(result, start) {\n try {\n const bytes = _parseBytes(result, start);\n if (bytes) {\n return (0, index_js_6.toUtf8String)(bytes);\n }\n } catch (error) {\n }\n return null;\n }\n function _parseBytes(result, start) {\n if (result === \"0x\") {\n return null;\n }\n try {\n const offset = (0, index_js_6.getNumber)((0, index_js_6.dataSlice)(result, start, start + 32));\n const length = (0, index_js_6.getNumber)((0, index_js_6.dataSlice)(result, offset, offset + 32));\n return (0, index_js_6.dataSlice)(result, offset + 32, offset + 32 + length);\n } catch (error) {\n }\n return null;\n }\n function numPad(value) {\n const result = (0, index_js_6.toBeArray)(value);\n if (result.length > 32) {\n throw new Error(\"internal; should not happen\");\n }\n const padded = new Uint8Array(32);\n padded.set(result, 32 - result.length);\n return padded;\n }\n function bytesPad(value) {\n if (value.length % 32 === 0) {\n return value;\n }\n const result = new Uint8Array(Math.ceil(value.length / 32) * 32);\n result.set(value);\n return result;\n }\n var empty = new Uint8Array([]);\n function encodeBytes3(datas) {\n const result = [];\n let byteCount = 0;\n for (let i3 = 0; i3 < datas.length; i3++) {\n result.push(empty);\n byteCount += 32;\n }\n for (let i3 = 0; i3 < datas.length; i3++) {\n const data = (0, index_js_6.getBytes)(datas[i3]);\n result[i3] = numPad(byteCount);\n result.push(numPad(data.length));\n result.push(bytesPad(data));\n byteCount += 32 + Math.ceil(data.length / 32) * 32;\n }\n return (0, index_js_6.concat)(result);\n }\n var zeros = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n function parseOffchainLookup(data) {\n const result = {\n sender: \"\",\n urls: [],\n calldata: \"\",\n selector: \"\",\n extraData: \"\",\n errorArgs: []\n };\n (0, index_js_6.assert)((0, index_js_6.dataLength)(data) >= 5 * 32, \"insufficient OffchainLookup data\", \"OFFCHAIN_FAULT\", {\n reason: \"insufficient OffchainLookup data\"\n });\n const sender = (0, index_js_6.dataSlice)(data, 0, 32);\n (0, index_js_6.assert)((0, index_js_6.dataSlice)(sender, 0, 12) === (0, index_js_6.dataSlice)(zeros, 0, 12), \"corrupt OffchainLookup sender\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup sender\"\n });\n result.sender = (0, index_js_6.dataSlice)(sender, 12);\n try {\n const urls = [];\n const urlsOffset = (0, index_js_6.getNumber)((0, index_js_6.dataSlice)(data, 32, 64));\n const urlsLength = (0, index_js_6.getNumber)((0, index_js_6.dataSlice)(data, urlsOffset, urlsOffset + 32));\n const urlsData = (0, index_js_6.dataSlice)(data, urlsOffset + 32);\n for (let u2 = 0; u2 < urlsLength; u2++) {\n const url = _parseString(urlsData, u2 * 32);\n if (url == null) {\n throw new Error(\"abort\");\n }\n urls.push(url);\n }\n result.urls = urls;\n } catch (error) {\n (0, index_js_6.assert)(false, \"corrupt OffchainLookup urls\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup urls\"\n });\n }\n try {\n const calldata = _parseBytes(data, 64);\n if (calldata == null) {\n throw new Error(\"abort\");\n }\n result.calldata = calldata;\n } catch (error) {\n (0, index_js_6.assert)(false, \"corrupt OffchainLookup calldata\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup calldata\"\n });\n }\n (0, index_js_6.assert)((0, index_js_6.dataSlice)(data, 100, 128) === (0, index_js_6.dataSlice)(zeros, 0, 28), \"corrupt OffchainLookup callbaackSelector\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup callbaackSelector\"\n });\n result.selector = (0, index_js_6.dataSlice)(data, 96, 100);\n try {\n const extraData = _parseBytes(data, 128);\n if (extraData == null) {\n throw new Error(\"abort\");\n }\n result.extraData = extraData;\n } catch (error) {\n (0, index_js_6.assert)(false, \"corrupt OffchainLookup extraData\", \"OFFCHAIN_FAULT\", {\n reason: \"corrupt OffchainLookup extraData\"\n });\n }\n result.errorArgs = \"sender,urls,calldata,selector,extraData\".split(/,/).map((k4) => result[k4]);\n return result;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/abstract-signer.js\n var require_abstract_signer = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/abstract-signer.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.VoidSigner = exports3.AbstractSigner = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_transaction2();\n var index_js_3 = require_utils13();\n var provider_js_1 = require_provider();\n function checkProvider(signer, operation) {\n if (signer.provider) {\n return signer.provider;\n }\n (0, index_js_3.assert)(false, \"missing provider\", \"UNSUPPORTED_OPERATION\", { operation });\n }\n async function populate(signer, tx) {\n let pop = (0, provider_js_1.copyRequest)(tx);\n if (pop.to != null) {\n pop.to = (0, index_js_1.resolveAddress)(pop.to, signer);\n }\n if (pop.from != null) {\n const from14 = pop.from;\n pop.from = Promise.all([\n signer.getAddress(),\n (0, index_js_1.resolveAddress)(from14, signer)\n ]).then(([address, from15]) => {\n (0, index_js_3.assertArgument)(address.toLowerCase() === from15.toLowerCase(), \"transaction from mismatch\", \"tx.from\", from15);\n return address;\n });\n } else {\n pop.from = signer.getAddress();\n }\n return await (0, index_js_3.resolveProperties)(pop);\n }\n var AbstractSigner = class {\n /**\n * The provider this signer is connected to.\n */\n provider;\n /**\n * Creates a new Signer connected to %%provider%%.\n */\n constructor(provider) {\n (0, index_js_3.defineProperties)(this, { provider: provider || null });\n }\n async getNonce(blockTag) {\n return checkProvider(this, \"getTransactionCount\").getTransactionCount(await this.getAddress(), blockTag);\n }\n async populateCall(tx) {\n const pop = await populate(this, tx);\n return pop;\n }\n async populateTransaction(tx) {\n const provider = checkProvider(this, \"populateTransaction\");\n const pop = await populate(this, tx);\n if (pop.nonce == null) {\n pop.nonce = await this.getNonce(\"pending\");\n }\n if (pop.gasLimit == null) {\n pop.gasLimit = await this.estimateGas(pop);\n }\n const network = await this.provider.getNetwork();\n if (pop.chainId != null) {\n const chainId = (0, index_js_3.getBigInt)(pop.chainId);\n (0, index_js_3.assertArgument)(chainId === network.chainId, \"transaction chainId mismatch\", \"tx.chainId\", tx.chainId);\n } else {\n pop.chainId = network.chainId;\n }\n const hasEip1559 = pop.maxFeePerGas != null || pop.maxPriorityFeePerGas != null;\n if (pop.gasPrice != null && (pop.type === 2 || hasEip1559)) {\n (0, index_js_3.assertArgument)(false, \"eip-1559 transaction do not support gasPrice\", \"tx\", tx);\n } else if ((pop.type === 0 || pop.type === 1) && hasEip1559) {\n (0, index_js_3.assertArgument)(false, \"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas\", \"tx\", tx);\n }\n if ((pop.type === 2 || pop.type == null) && (pop.maxFeePerGas != null && pop.maxPriorityFeePerGas != null)) {\n pop.type = 2;\n } else if (pop.type === 0 || pop.type === 1) {\n const feeData = await provider.getFeeData();\n (0, index_js_3.assert)(feeData.gasPrice != null, \"network does not support gasPrice\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getGasPrice\"\n });\n if (pop.gasPrice == null) {\n pop.gasPrice = feeData.gasPrice;\n }\n } else {\n const feeData = await provider.getFeeData();\n if (pop.type == null) {\n if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) {\n if (pop.authorizationList && pop.authorizationList.length) {\n pop.type = 4;\n } else {\n pop.type = 2;\n }\n if (pop.gasPrice != null) {\n const gasPrice = pop.gasPrice;\n delete pop.gasPrice;\n pop.maxFeePerGas = gasPrice;\n pop.maxPriorityFeePerGas = gasPrice;\n } else {\n if (pop.maxFeePerGas == null) {\n pop.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (pop.maxPriorityFeePerGas == null) {\n pop.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n } else if (feeData.gasPrice != null) {\n (0, index_js_3.assert)(!hasEip1559, \"network does not support EIP-1559\", \"UNSUPPORTED_OPERATION\", {\n operation: \"populateTransaction\"\n });\n if (pop.gasPrice == null) {\n pop.gasPrice = feeData.gasPrice;\n }\n pop.type = 0;\n } else {\n (0, index_js_3.assert)(false, \"failed to get consistent fee data\", \"UNSUPPORTED_OPERATION\", {\n operation: \"signer.getFeeData\"\n });\n }\n } else if (pop.type === 2 || pop.type === 3 || pop.type === 4) {\n if (pop.maxFeePerGas == null) {\n pop.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (pop.maxPriorityFeePerGas == null) {\n pop.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n }\n return await (0, index_js_3.resolveProperties)(pop);\n }\n async populateAuthorization(_auth) {\n const auth = Object.assign({}, _auth);\n if (auth.chainId == null) {\n auth.chainId = (await checkProvider(this, \"getNetwork\").getNetwork()).chainId;\n }\n if (auth.nonce == null) {\n auth.nonce = await this.getNonce();\n }\n return auth;\n }\n async estimateGas(tx) {\n return checkProvider(this, \"estimateGas\").estimateGas(await this.populateCall(tx));\n }\n async call(tx) {\n return checkProvider(this, \"call\").call(await this.populateCall(tx));\n }\n async resolveName(name) {\n const provider = checkProvider(this, \"resolveName\");\n return await provider.resolveName(name);\n }\n async sendTransaction(tx) {\n const provider = checkProvider(this, \"sendTransaction\");\n const pop = await this.populateTransaction(tx);\n delete pop.from;\n const txObj = index_js_2.Transaction.from(pop);\n return await provider.broadcastTransaction(await this.signTransaction(txObj));\n }\n // @TODO: in v7 move this to be abstract\n authorize(authorization) {\n (0, index_js_3.assert)(false, \"authorization not implemented for this signer\", \"UNSUPPORTED_OPERATION\", { operation: \"authorize\" });\n }\n };\n exports3.AbstractSigner = AbstractSigner;\n var VoidSigner = class _VoidSigner extends AbstractSigner {\n /**\n * The signer address.\n */\n address;\n /**\n * Creates a new **VoidSigner** with %%address%% attached to\n * %%provider%%.\n */\n constructor(address, provider) {\n super(provider);\n (0, index_js_3.defineProperties)(this, { address });\n }\n async getAddress() {\n return this.address;\n }\n connect(provider) {\n return new _VoidSigner(this.address, provider);\n }\n #throwUnsupported(suffix, operation) {\n (0, index_js_3.assert)(false, `VoidSigner cannot sign ${suffix}`, \"UNSUPPORTED_OPERATION\", { operation });\n }\n async signTransaction(tx) {\n this.#throwUnsupported(\"transactions\", \"signTransaction\");\n }\n async signMessage(message2) {\n this.#throwUnsupported(\"messages\", \"signMessage\");\n }\n async signTypedData(domain2, types2, value) {\n this.#throwUnsupported(\"typed-data\", \"signTypedData\");\n }\n };\n exports3.VoidSigner = VoidSigner;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/community.js\n var require_community = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/community.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.showThrottleMessage = void 0;\n var shown = /* @__PURE__ */ new Set();\n function showThrottleMessage(service) {\n if (shown.has(service)) {\n return;\n }\n shown.add(service);\n console.log(\"========= NOTICE =========\");\n console.log(`Request-Rate Exceeded for ${service} (this message will not be repeated)`);\n console.log(\"\");\n console.log(\"The default API keys for each service are provided as a highly-throttled,\");\n console.log(\"community resource for low-traffic projects and early prototyping.\");\n console.log(\"\");\n console.log(\"While your application will continue to function, we highly recommended\");\n console.log(\"signing up for your own API keys to improve performance, increase your\");\n console.log(\"request rate/limit and enable other perks, such as metrics and advanced APIs.\");\n console.log(\"\");\n console.log(\"For more details: https://docs.ethers.org/api-keys/\");\n console.log(\"==========================\");\n }\n exports3.showThrottleMessage = showThrottleMessage;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/subscriber-filterid.js\n var require_subscriber_filterid = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/subscriber-filterid.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FilterIdPendingSubscriber = exports3.FilterIdEventSubscriber = exports3.FilterIdSubscriber = void 0;\n var index_js_1 = require_utils13();\n var subscriber_polling_js_1 = require_subscriber_polling();\n function copy(obj) {\n return JSON.parse(JSON.stringify(obj));\n }\n var FilterIdSubscriber = class {\n #provider;\n #filterIdPromise;\n #poller;\n #running;\n #network;\n #hault;\n /**\n * Creates a new **FilterIdSubscriber** which will used [[_subscribe]]\n * and [[_emitResults]] to setup the subscription and provide the event\n * to the %%provider%%.\n */\n constructor(provider) {\n this.#provider = provider;\n this.#filterIdPromise = null;\n this.#poller = this.#poll.bind(this);\n this.#running = false;\n this.#network = null;\n this.#hault = false;\n }\n /**\n * Sub-classes **must** override this to begin the subscription.\n */\n _subscribe(provider) {\n throw new Error(\"subclasses must override this\");\n }\n /**\n * Sub-classes **must** override this handle the events.\n */\n _emitResults(provider, result) {\n throw new Error(\"subclasses must override this\");\n }\n /**\n * Sub-classes **must** override this handle recovery on errors.\n */\n _recover(provider) {\n throw new Error(\"subclasses must override this\");\n }\n async #poll(blockNumber) {\n try {\n if (this.#filterIdPromise == null) {\n this.#filterIdPromise = this._subscribe(this.#provider);\n }\n let filterId = null;\n try {\n filterId = await this.#filterIdPromise;\n } catch (error) {\n if (!(0, index_js_1.isError)(error, \"UNSUPPORTED_OPERATION\") || error.operation !== \"eth_newFilter\") {\n throw error;\n }\n }\n if (filterId == null) {\n this.#filterIdPromise = null;\n this.#provider._recoverSubscriber(this, this._recover(this.#provider));\n return;\n }\n const network = await this.#provider.getNetwork();\n if (!this.#network) {\n this.#network = network;\n }\n if (this.#network.chainId !== network.chainId) {\n throw new Error(\"chaid changed\");\n }\n if (this.#hault) {\n return;\n }\n const result = await this.#provider.send(\"eth_getFilterChanges\", [filterId]);\n await this._emitResults(this.#provider, result);\n } catch (error) {\n console.log(\"@TODO\", error);\n }\n this.#provider.once(\"block\", this.#poller);\n }\n #teardown() {\n const filterIdPromise = this.#filterIdPromise;\n if (filterIdPromise) {\n this.#filterIdPromise = null;\n filterIdPromise.then((filterId) => {\n if (this.#provider.destroyed) {\n return;\n }\n this.#provider.send(\"eth_uninstallFilter\", [filterId]);\n });\n }\n }\n start() {\n if (this.#running) {\n return;\n }\n this.#running = true;\n this.#poll(-2);\n }\n stop() {\n if (!this.#running) {\n return;\n }\n this.#running = false;\n this.#hault = true;\n this.#teardown();\n this.#provider.off(\"block\", this.#poller);\n }\n pause(dropWhilePaused) {\n if (dropWhilePaused) {\n this.#teardown();\n }\n this.#provider.off(\"block\", this.#poller);\n }\n resume() {\n this.start();\n }\n };\n exports3.FilterIdSubscriber = FilterIdSubscriber;\n var FilterIdEventSubscriber = class extends FilterIdSubscriber {\n #event;\n /**\n * Creates a new **FilterIdEventSubscriber** attached to %%provider%%\n * listening for %%filter%%.\n */\n constructor(provider, filter) {\n super(provider);\n this.#event = copy(filter);\n }\n _recover(provider) {\n return new subscriber_polling_js_1.PollingEventSubscriber(provider, this.#event);\n }\n async _subscribe(provider) {\n const filterId = await provider.send(\"eth_newFilter\", [this.#event]);\n return filterId;\n }\n async _emitResults(provider, results) {\n for (const result of results) {\n provider.emit(this.#event, provider._wrapLog(result, provider._network));\n }\n }\n };\n exports3.FilterIdEventSubscriber = FilterIdEventSubscriber;\n var FilterIdPendingSubscriber = class extends FilterIdSubscriber {\n async _subscribe(provider) {\n return await provider.send(\"eth_newPendingTransactionFilter\", []);\n }\n async _emitResults(provider, results) {\n for (const result of results) {\n provider.emit(\"pending\", result);\n }\n }\n };\n exports3.FilterIdPendingSubscriber = FilterIdPendingSubscriber;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js\n var require_provider_jsonrpc = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.JsonRpcProvider = exports3.JsonRpcApiPollingProvider = exports3.JsonRpcApiProvider = exports3.JsonRpcSigner = void 0;\n var index_js_1 = require_abi();\n var index_js_2 = require_address3();\n var index_js_3 = require_hash2();\n var index_js_4 = require_transaction2();\n var index_js_5 = require_utils13();\n var abstract_provider_js_1 = require_abstract_provider();\n var abstract_signer_js_1 = require_abstract_signer();\n var network_js_1 = require_network();\n var subscriber_filterid_js_1 = require_subscriber_filterid();\n var subscriber_polling_js_1 = require_subscriber_polling();\n var Primitive = \"bigint,boolean,function,number,string,symbol\".split(/,/g);\n function deepCopy(value) {\n if (value == null || Primitive.indexOf(typeof value) >= 0) {\n return value;\n }\n if (typeof value.getAddress === \"function\") {\n return value;\n }\n if (Array.isArray(value)) {\n return value.map(deepCopy);\n }\n if (typeof value === \"object\") {\n return Object.keys(value).reduce((accum, key) => {\n accum[key] = value[key];\n return accum;\n }, {});\n }\n throw new Error(`should not happen: ${value} (${typeof value})`);\n }\n function stall(duration) {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n }\n function getLowerCase(value) {\n if (value) {\n return value.toLowerCase();\n }\n return value;\n }\n function isPollable(value) {\n return value && typeof value.pollingInterval === \"number\";\n }\n var defaultOptions = {\n polling: false,\n staticNetwork: null,\n batchStallTime: 10,\n batchMaxSize: 1 << 20,\n batchMaxCount: 100,\n cacheTimeout: 250,\n pollingInterval: 4e3\n };\n var JsonRpcSigner = class extends abstract_signer_js_1.AbstractSigner {\n address;\n constructor(provider, address) {\n super(provider);\n address = (0, index_js_2.getAddress)(address);\n (0, index_js_5.defineProperties)(this, { address });\n }\n connect(provider) {\n (0, index_js_5.assert)(false, \"cannot reconnect JsonRpcSigner\", \"UNSUPPORTED_OPERATION\", {\n operation: \"signer.connect\"\n });\n }\n async getAddress() {\n return this.address;\n }\n // JSON-RPC will automatially fill in nonce, etc. so we just check from\n async populateTransaction(tx) {\n return await this.populateCall(tx);\n }\n // Returns just the hash of the transaction after sent, which is what\n // the bare JSON-RPC API does;\n async sendUncheckedTransaction(_tx) {\n const tx = deepCopy(_tx);\n const promises = [];\n if (tx.from) {\n const _from = tx.from;\n promises.push((async () => {\n const from14 = await (0, index_js_2.resolveAddress)(_from, this.provider);\n (0, index_js_5.assertArgument)(from14 != null && from14.toLowerCase() === this.address.toLowerCase(), \"from address mismatch\", \"transaction\", _tx);\n tx.from = from14;\n })());\n } else {\n tx.from = this.address;\n }\n if (tx.gasLimit == null) {\n promises.push((async () => {\n tx.gasLimit = await this.provider.estimateGas({ ...tx, from: this.address });\n })());\n }\n if (tx.to != null) {\n const _to = tx.to;\n promises.push((async () => {\n tx.to = await (0, index_js_2.resolveAddress)(_to, this.provider);\n })());\n }\n if (promises.length) {\n await Promise.all(promises);\n }\n const hexTx = this.provider.getRpcTransaction(tx);\n return this.provider.send(\"eth_sendTransaction\", [hexTx]);\n }\n async sendTransaction(tx) {\n const blockNumber = await this.provider.getBlockNumber();\n const hash3 = await this.sendUncheckedTransaction(tx);\n return await new Promise((resolve, reject) => {\n const timeouts = [1e3, 100];\n let invalids = 0;\n const checkTx = async () => {\n try {\n const tx2 = await this.provider.getTransaction(hash3);\n if (tx2 != null) {\n resolve(tx2.replaceableTransaction(blockNumber));\n return;\n }\n } catch (error) {\n if ((0, index_js_5.isError)(error, \"CANCELLED\") || (0, index_js_5.isError)(error, \"BAD_DATA\") || (0, index_js_5.isError)(error, \"NETWORK_ERROR\") || (0, index_js_5.isError)(error, \"UNSUPPORTED_OPERATION\")) {\n if (error.info == null) {\n error.info = {};\n }\n error.info.sendTransactionHash = hash3;\n reject(error);\n return;\n }\n if ((0, index_js_5.isError)(error, \"INVALID_ARGUMENT\")) {\n invalids++;\n if (error.info == null) {\n error.info = {};\n }\n error.info.sendTransactionHash = hash3;\n if (invalids > 10) {\n reject(error);\n return;\n }\n }\n this.provider.emit(\"error\", (0, index_js_5.makeError)(\"failed to fetch transation after sending (will try again)\", \"UNKNOWN_ERROR\", { error }));\n }\n this.provider._setTimeout(() => {\n checkTx();\n }, timeouts.pop() || 4e3);\n };\n checkTx();\n });\n }\n async signTransaction(_tx) {\n const tx = deepCopy(_tx);\n if (tx.from) {\n const from14 = await (0, index_js_2.resolveAddress)(tx.from, this.provider);\n (0, index_js_5.assertArgument)(from14 != null && from14.toLowerCase() === this.address.toLowerCase(), \"from address mismatch\", \"transaction\", _tx);\n tx.from = from14;\n } else {\n tx.from = this.address;\n }\n const hexTx = this.provider.getRpcTransaction(tx);\n return await this.provider.send(\"eth_signTransaction\", [hexTx]);\n }\n async signMessage(_message) {\n const message2 = typeof _message === \"string\" ? (0, index_js_5.toUtf8Bytes)(_message) : _message;\n return await this.provider.send(\"personal_sign\", [\n (0, index_js_5.hexlify)(message2),\n this.address.toLowerCase()\n ]);\n }\n async signTypedData(domain2, types2, _value) {\n const value = deepCopy(_value);\n const populated = await index_js_3.TypedDataEncoder.resolveNames(domain2, types2, value, async (value2) => {\n const address = await (0, index_js_2.resolveAddress)(value2);\n (0, index_js_5.assertArgument)(address != null, \"TypedData does not support null address\", \"value\", value2);\n return address;\n });\n return await this.provider.send(\"eth_signTypedData_v4\", [\n this.address.toLowerCase(),\n JSON.stringify(index_js_3.TypedDataEncoder.getPayload(populated.domain, types2, populated.value))\n ]);\n }\n async unlock(password) {\n return this.provider.send(\"personal_unlockAccount\", [\n this.address.toLowerCase(),\n password,\n null\n ]);\n }\n // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign\n async _legacySignMessage(_message) {\n const message2 = typeof _message === \"string\" ? (0, index_js_5.toUtf8Bytes)(_message) : _message;\n return await this.provider.send(\"eth_sign\", [\n this.address.toLowerCase(),\n (0, index_js_5.hexlify)(message2)\n ]);\n }\n };\n exports3.JsonRpcSigner = JsonRpcSigner;\n var JsonRpcApiProvider = class extends abstract_provider_js_1.AbstractProvider {\n #options;\n // The next ID to use for the JSON-RPC ID field\n #nextId;\n // Payloads are queued and triggered in batches using the drainTimer\n #payloads;\n #drainTimer;\n #notReady;\n #network;\n #pendingDetectNetwork;\n #scheduleDrain() {\n if (this.#drainTimer) {\n return;\n }\n const stallTime = this._getOption(\"batchMaxCount\") === 1 ? 0 : this._getOption(\"batchStallTime\");\n this.#drainTimer = setTimeout(() => {\n this.#drainTimer = null;\n const payloads = this.#payloads;\n this.#payloads = [];\n while (payloads.length) {\n const batch = [payloads.shift()];\n while (payloads.length) {\n if (batch.length === this.#options.batchMaxCount) {\n break;\n }\n batch.push(payloads.shift());\n const bytes = JSON.stringify(batch.map((p4) => p4.payload));\n if (bytes.length > this.#options.batchMaxSize) {\n payloads.unshift(batch.pop());\n break;\n }\n }\n (async () => {\n const payload = batch.length === 1 ? batch[0].payload : batch.map((p4) => p4.payload);\n this.emit(\"debug\", { action: \"sendRpcPayload\", payload });\n try {\n const result = await this._send(payload);\n this.emit(\"debug\", { action: \"receiveRpcResult\", result });\n for (const { resolve, reject, payload: payload2 } of batch) {\n if (this.destroyed) {\n reject((0, index_js_5.makeError)(\"provider destroyed; cancelled request\", \"UNSUPPORTED_OPERATION\", { operation: payload2.method }));\n continue;\n }\n const resp = result.filter((r2) => r2.id === payload2.id)[0];\n if (resp == null) {\n const error = (0, index_js_5.makeError)(\"missing response for request\", \"BAD_DATA\", {\n value: result,\n info: { payload: payload2 }\n });\n this.emit(\"error\", error);\n reject(error);\n continue;\n }\n if (\"error\" in resp) {\n reject(this.getRpcError(payload2, resp));\n continue;\n }\n resolve(resp.result);\n }\n } catch (error) {\n this.emit(\"debug\", { action: \"receiveRpcError\", error });\n for (const { reject } of batch) {\n reject(error);\n }\n }\n })();\n }\n }, stallTime);\n }\n constructor(network, options) {\n super(network, options);\n this.#nextId = 1;\n this.#options = Object.assign({}, defaultOptions, options || {});\n this.#payloads = [];\n this.#drainTimer = null;\n this.#network = null;\n this.#pendingDetectNetwork = null;\n {\n let resolve = null;\n const promise = new Promise((_resolve) => {\n resolve = _resolve;\n });\n this.#notReady = { promise, resolve };\n }\n const staticNetwork = this._getOption(\"staticNetwork\");\n if (typeof staticNetwork === \"boolean\") {\n (0, index_js_5.assertArgument)(!staticNetwork || network !== \"any\", \"staticNetwork cannot be used on special network 'any'\", \"options\", options);\n if (staticNetwork && network != null) {\n this.#network = network_js_1.Network.from(network);\n }\n } else if (staticNetwork) {\n (0, index_js_5.assertArgument)(network == null || staticNetwork.matches(network), \"staticNetwork MUST match network object\", \"options\", options);\n this.#network = staticNetwork;\n }\n }\n /**\n * Returns the value associated with the option %%key%%.\n *\n * Sub-classes can use this to inquire about configuration options.\n */\n _getOption(key) {\n return this.#options[key];\n }\n /**\n * Gets the [[Network]] this provider has committed to. On each call, the network\n * is detected, and if it has changed, the call will reject.\n */\n get _network() {\n (0, index_js_5.assert)(this.#network, \"network is not available yet\", \"NETWORK_ERROR\");\n return this.#network;\n }\n /**\n * Resolves to the non-normalized value by performing %%req%%.\n *\n * Sub-classes may override this to modify behavior of actions,\n * and should generally call ``super._perform`` as a fallback.\n */\n async _perform(req) {\n if (req.method === \"call\" || req.method === \"estimateGas\") {\n let tx = req.transaction;\n if (tx && tx.type != null && (0, index_js_5.getBigInt)(tx.type)) {\n if (tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null) {\n const feeData = await this.getFeeData();\n if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {\n req = Object.assign({}, req, {\n transaction: Object.assign({}, tx, { type: void 0 })\n });\n }\n }\n }\n }\n const request = this.getRpcRequest(req);\n if (request != null) {\n return await this.send(request.method, request.args);\n }\n return super._perform(req);\n }\n /**\n * Sub-classes may override this; it detects the *actual* network that\n * we are **currently** connected to.\n *\n * Keep in mind that [[send]] may only be used once [[ready]], otherwise the\n * _send primitive must be used instead.\n */\n async _detectNetwork() {\n const network = this._getOption(\"staticNetwork\");\n if (network) {\n if (network === true) {\n if (this.#network) {\n return this.#network;\n }\n } else {\n return network;\n }\n }\n if (this.#pendingDetectNetwork) {\n return await this.#pendingDetectNetwork;\n }\n if (this.ready) {\n this.#pendingDetectNetwork = (async () => {\n try {\n const result = network_js_1.Network.from((0, index_js_5.getBigInt)(await this.send(\"eth_chainId\", [])));\n this.#pendingDetectNetwork = null;\n return result;\n } catch (error) {\n this.#pendingDetectNetwork = null;\n throw error;\n }\n })();\n return await this.#pendingDetectNetwork;\n }\n this.#pendingDetectNetwork = (async () => {\n const payload = {\n id: this.#nextId++,\n method: \"eth_chainId\",\n params: [],\n jsonrpc: \"2.0\"\n };\n this.emit(\"debug\", { action: \"sendRpcPayload\", payload });\n let result;\n try {\n result = (await this._send(payload))[0];\n this.#pendingDetectNetwork = null;\n } catch (error) {\n this.#pendingDetectNetwork = null;\n this.emit(\"debug\", { action: \"receiveRpcError\", error });\n throw error;\n }\n this.emit(\"debug\", { action: \"receiveRpcResult\", result });\n if (\"result\" in result) {\n return network_js_1.Network.from((0, index_js_5.getBigInt)(result.result));\n }\n throw this.getRpcError(payload, result);\n })();\n return await this.#pendingDetectNetwork;\n }\n /**\n * Sub-classes **MUST** call this. Until [[_start]] has been called, no calls\n * will be passed to [[_send]] from [[send]]. If it is overridden, then\n * ``super._start()`` **MUST** be called.\n *\n * Calling it multiple times is safe and has no effect.\n */\n _start() {\n if (this.#notReady == null || this.#notReady.resolve == null) {\n return;\n }\n this.#notReady.resolve();\n this.#notReady = null;\n (async () => {\n while (this.#network == null && !this.destroyed) {\n try {\n this.#network = await this._detectNetwork();\n } catch (error) {\n if (this.destroyed) {\n break;\n }\n console.log(\"JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)\");\n this.emit(\"error\", (0, index_js_5.makeError)(\"failed to bootstrap network detection\", \"NETWORK_ERROR\", { event: \"initial-network-discovery\", info: { error } }));\n await stall(1e3);\n }\n }\n this.#scheduleDrain();\n })();\n }\n /**\n * Resolves once the [[_start]] has been called. This can be used in\n * sub-classes to defer sending data until the connection has been\n * established.\n */\n async _waitUntilReady() {\n if (this.#notReady == null) {\n return;\n }\n return await this.#notReady.promise;\n }\n /**\n * Return a Subscriber that will manage the %%sub%%.\n *\n * Sub-classes may override this to modify the behavior of\n * subscription management.\n */\n _getSubscriber(sub) {\n if (sub.type === \"pending\") {\n return new subscriber_filterid_js_1.FilterIdPendingSubscriber(this);\n }\n if (sub.type === \"event\") {\n if (this._getOption(\"polling\")) {\n return new subscriber_polling_js_1.PollingEventSubscriber(this, sub.filter);\n }\n return new subscriber_filterid_js_1.FilterIdEventSubscriber(this, sub.filter);\n }\n if (sub.type === \"orphan\" && sub.filter.orphan === \"drop-log\") {\n return new abstract_provider_js_1.UnmanagedSubscriber(\"orphan\");\n }\n return super._getSubscriber(sub);\n }\n /**\n * Returns true only if the [[_start]] has been called.\n */\n get ready() {\n return this.#notReady == null;\n }\n /**\n * Returns %%tx%% as a normalized JSON-RPC transaction request,\n * which has all values hexlified and any numeric values converted\n * to Quantity values.\n */\n getRpcTransaction(tx) {\n const result = {};\n [\"chainId\", \"gasLimit\", \"gasPrice\", \"type\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"value\"].forEach((key) => {\n if (tx[key] == null) {\n return;\n }\n let dstKey = key;\n if (key === \"gasLimit\") {\n dstKey = \"gas\";\n }\n result[dstKey] = (0, index_js_5.toQuantity)((0, index_js_5.getBigInt)(tx[key], `tx.${key}`));\n });\n [\"from\", \"to\", \"data\"].forEach((key) => {\n if (tx[key] == null) {\n return;\n }\n result[key] = (0, index_js_5.hexlify)(tx[key]);\n });\n if (tx.accessList) {\n result[\"accessList\"] = (0, index_js_4.accessListify)(tx.accessList);\n }\n if (tx.blobVersionedHashes) {\n result[\"blobVersionedHashes\"] = tx.blobVersionedHashes.map((h4) => h4.toLowerCase());\n }\n if (tx.authorizationList) {\n result[\"authorizationList\"] = tx.authorizationList.map((_a) => {\n const a3 = (0, index_js_4.authorizationify)(_a);\n return {\n address: a3.address,\n nonce: (0, index_js_5.toQuantity)(a3.nonce),\n chainId: (0, index_js_5.toQuantity)(a3.chainId),\n yParity: (0, index_js_5.toQuantity)(a3.signature.yParity),\n r: (0, index_js_5.toQuantity)(a3.signature.r),\n s: (0, index_js_5.toQuantity)(a3.signature.s)\n };\n });\n }\n return result;\n }\n /**\n * Returns the request method and arguments required to perform\n * %%req%%.\n */\n getRpcRequest(req) {\n switch (req.method) {\n case \"chainId\":\n return { method: \"eth_chainId\", args: [] };\n case \"getBlockNumber\":\n return { method: \"eth_blockNumber\", args: [] };\n case \"getGasPrice\":\n return { method: \"eth_gasPrice\", args: [] };\n case \"getPriorityFee\":\n return { method: \"eth_maxPriorityFeePerGas\", args: [] };\n case \"getBalance\":\n return {\n method: \"eth_getBalance\",\n args: [getLowerCase(req.address), req.blockTag]\n };\n case \"getTransactionCount\":\n return {\n method: \"eth_getTransactionCount\",\n args: [getLowerCase(req.address), req.blockTag]\n };\n case \"getCode\":\n return {\n method: \"eth_getCode\",\n args: [getLowerCase(req.address), req.blockTag]\n };\n case \"getStorage\":\n return {\n method: \"eth_getStorageAt\",\n args: [\n getLowerCase(req.address),\n \"0x\" + req.position.toString(16),\n req.blockTag\n ]\n };\n case \"broadcastTransaction\":\n return {\n method: \"eth_sendRawTransaction\",\n args: [req.signedTransaction]\n };\n case \"getBlock\":\n if (\"blockTag\" in req) {\n return {\n method: \"eth_getBlockByNumber\",\n args: [req.blockTag, !!req.includeTransactions]\n };\n } else if (\"blockHash\" in req) {\n return {\n method: \"eth_getBlockByHash\",\n args: [req.blockHash, !!req.includeTransactions]\n };\n }\n break;\n case \"getTransaction\":\n return {\n method: \"eth_getTransactionByHash\",\n args: [req.hash]\n };\n case \"getTransactionReceipt\":\n return {\n method: \"eth_getTransactionReceipt\",\n args: [req.hash]\n };\n case \"call\":\n return {\n method: \"eth_call\",\n args: [this.getRpcTransaction(req.transaction), req.blockTag]\n };\n case \"estimateGas\": {\n return {\n method: \"eth_estimateGas\",\n args: [this.getRpcTransaction(req.transaction)]\n };\n }\n case \"getLogs\":\n if (req.filter && req.filter.address != null) {\n if (Array.isArray(req.filter.address)) {\n req.filter.address = req.filter.address.map(getLowerCase);\n } else {\n req.filter.address = getLowerCase(req.filter.address);\n }\n }\n return { method: \"eth_getLogs\", args: [req.filter] };\n }\n return null;\n }\n /**\n * Returns an ethers-style Error for the given JSON-RPC error\n * %%payload%%, coalescing the various strings and error shapes\n * that different nodes return, coercing them into a machine-readable\n * standardized error.\n */\n getRpcError(payload, _error) {\n const { method } = payload;\n const { error } = _error;\n if (method === \"eth_estimateGas\" && error.message) {\n const msg = error.message;\n if (!msg.match(/revert/i) && msg.match(/insufficient funds/i)) {\n return (0, index_js_5.makeError)(\"insufficient funds\", \"INSUFFICIENT_FUNDS\", {\n transaction: payload.params[0],\n info: { payload, error }\n });\n } else if (msg.match(/nonce/i) && msg.match(/too low/i)) {\n return (0, index_js_5.makeError)(\"nonce has already been used\", \"NONCE_EXPIRED\", {\n transaction: payload.params[0],\n info: { payload, error }\n });\n }\n }\n if (method === \"eth_call\" || method === \"eth_estimateGas\") {\n const result = spelunkData(error);\n const e2 = index_js_1.AbiCoder.getBuiltinCallException(method === \"eth_call\" ? \"call\" : \"estimateGas\", payload.params[0], result ? result.data : null);\n e2.info = { error, payload };\n return e2;\n }\n const message2 = JSON.stringify(spelunkMessage(error));\n if (typeof error.message === \"string\" && error.message.match(/user denied|ethers-user-denied/i)) {\n const actionMap = {\n eth_sign: \"signMessage\",\n personal_sign: \"signMessage\",\n eth_signTypedData_v4: \"signTypedData\",\n eth_signTransaction: \"signTransaction\",\n eth_sendTransaction: \"sendTransaction\",\n eth_requestAccounts: \"requestAccess\",\n wallet_requestAccounts: \"requestAccess\"\n };\n return (0, index_js_5.makeError)(`user rejected action`, \"ACTION_REJECTED\", {\n action: actionMap[method] || \"unknown\",\n reason: \"rejected\",\n info: { payload, error }\n });\n }\n if (method === \"eth_sendRawTransaction\" || method === \"eth_sendTransaction\") {\n const transaction = payload.params[0];\n if (message2.match(/insufficient funds|base fee exceeds gas limit/i)) {\n return (0, index_js_5.makeError)(\"insufficient funds for intrinsic transaction cost\", \"INSUFFICIENT_FUNDS\", {\n transaction,\n info: { error }\n });\n }\n if (message2.match(/nonce/i) && message2.match(/too low/i)) {\n return (0, index_js_5.makeError)(\"nonce has already been used\", \"NONCE_EXPIRED\", { transaction, info: { error } });\n }\n if (message2.match(/replacement transaction/i) && message2.match(/underpriced/i)) {\n return (0, index_js_5.makeError)(\"replacement fee too low\", \"REPLACEMENT_UNDERPRICED\", { transaction, info: { error } });\n }\n if (message2.match(/only replay-protected/i)) {\n return (0, index_js_5.makeError)(\"legacy pre-eip-155 transactions not supported\", \"UNSUPPORTED_OPERATION\", {\n operation: method,\n info: { transaction, info: { error } }\n });\n }\n }\n let unsupported = !!message2.match(/the method .* does not exist/i);\n if (!unsupported) {\n if (error && error.details && error.details.startsWith(\"Unauthorized method:\")) {\n unsupported = true;\n }\n }\n if (unsupported) {\n return (0, index_js_5.makeError)(\"unsupported operation\", \"UNSUPPORTED_OPERATION\", {\n operation: payload.method,\n info: { error, payload }\n });\n }\n return (0, index_js_5.makeError)(\"could not coalesce error\", \"UNKNOWN_ERROR\", { error, payload });\n }\n /**\n * Requests the %%method%% with %%params%% via the JSON-RPC protocol\n * over the underlying channel. This can be used to call methods\n * on the backend that do not have a high-level API within the Provider\n * API.\n *\n * This method queues requests according to the batch constraints\n * in the options, assigns the request a unique ID.\n *\n * **Do NOT override** this method in sub-classes; instead\n * override [[_send]] or force the options values in the\n * call to the constructor to modify this method's behavior.\n */\n send(method, params) {\n if (this.destroyed) {\n return Promise.reject((0, index_js_5.makeError)(\"provider destroyed; cancelled request\", \"UNSUPPORTED_OPERATION\", { operation: method }));\n }\n const id = this.#nextId++;\n const promise = new Promise((resolve, reject) => {\n this.#payloads.push({\n resolve,\n reject,\n payload: { method, params, id, jsonrpc: \"2.0\" }\n });\n });\n this.#scheduleDrain();\n return promise;\n }\n /**\n * Resolves to the [[Signer]] account for %%address%% managed by\n * the client.\n *\n * If the %%address%% is a number, it is used as an index in the\n * the accounts from [[listAccounts]].\n *\n * This can only be used on clients which manage accounts (such as\n * Geth with imported account or MetaMask).\n *\n * Throws if the account doesn't exist.\n */\n async getSigner(address) {\n if (address == null) {\n address = 0;\n }\n const accountsPromise = this.send(\"eth_accounts\", []);\n if (typeof address === \"number\") {\n const accounts2 = await accountsPromise;\n if (address >= accounts2.length) {\n throw new Error(\"no such account\");\n }\n return new JsonRpcSigner(this, accounts2[address]);\n }\n const { accounts } = await (0, index_js_5.resolveProperties)({\n network: this.getNetwork(),\n accounts: accountsPromise\n });\n address = (0, index_js_2.getAddress)(address);\n for (const account of accounts) {\n if ((0, index_js_2.getAddress)(account) === address) {\n return new JsonRpcSigner(this, address);\n }\n }\n throw new Error(\"invalid account\");\n }\n async listAccounts() {\n const accounts = await this.send(\"eth_accounts\", []);\n return accounts.map((a3) => new JsonRpcSigner(this, a3));\n }\n destroy() {\n if (this.#drainTimer) {\n clearTimeout(this.#drainTimer);\n this.#drainTimer = null;\n }\n for (const { payload, reject } of this.#payloads) {\n reject((0, index_js_5.makeError)(\"provider destroyed; cancelled request\", \"UNSUPPORTED_OPERATION\", { operation: payload.method }));\n }\n this.#payloads = [];\n super.destroy();\n }\n };\n exports3.JsonRpcApiProvider = JsonRpcApiProvider;\n var JsonRpcApiPollingProvider = class extends JsonRpcApiProvider {\n #pollingInterval;\n constructor(network, options) {\n super(network, options);\n let pollingInterval = this._getOption(\"pollingInterval\");\n if (pollingInterval == null) {\n pollingInterval = defaultOptions.pollingInterval;\n }\n this.#pollingInterval = pollingInterval;\n }\n _getSubscriber(sub) {\n const subscriber = super._getSubscriber(sub);\n if (isPollable(subscriber)) {\n subscriber.pollingInterval = this.#pollingInterval;\n }\n return subscriber;\n }\n /**\n * The polling interval (default: 4000 ms)\n */\n get pollingInterval() {\n return this.#pollingInterval;\n }\n set pollingInterval(value) {\n if (!Number.isInteger(value) || value < 0) {\n throw new Error(\"invalid interval\");\n }\n this.#pollingInterval = value;\n this._forEachSubscriber((sub) => {\n if (isPollable(sub)) {\n sub.pollingInterval = this.#pollingInterval;\n }\n });\n }\n };\n exports3.JsonRpcApiPollingProvider = JsonRpcApiPollingProvider;\n var JsonRpcProvider = class extends JsonRpcApiPollingProvider {\n #connect;\n constructor(url, network, options) {\n if (url == null) {\n url = \"http://localhost:8545\";\n }\n super(network, options);\n if (typeof url === \"string\") {\n this.#connect = new index_js_5.FetchRequest(url);\n } else {\n this.#connect = url.clone();\n }\n }\n _getConnection() {\n return this.#connect.clone();\n }\n async send(method, params) {\n await this._start();\n return await super.send(method, params);\n }\n async _send(payload) {\n const request = this._getConnection();\n request.body = JSON.stringify(payload);\n request.setHeader(\"content-type\", \"application/json\");\n const response = await request.send();\n response.assertOk();\n let resp = response.bodyJson;\n if (!Array.isArray(resp)) {\n resp = [resp];\n }\n return resp;\n }\n };\n exports3.JsonRpcProvider = JsonRpcProvider;\n function spelunkData(value) {\n if (value == null) {\n return null;\n }\n if (typeof value.message === \"string\" && value.message.match(/revert/i) && (0, index_js_5.isHexString)(value.data)) {\n return { message: value.message, data: value.data };\n }\n if (typeof value === \"object\") {\n for (const key in value) {\n const result = spelunkData(value[key]);\n if (result) {\n return result;\n }\n }\n return null;\n }\n if (typeof value === \"string\") {\n try {\n return spelunkData(JSON.parse(value));\n } catch (error) {\n }\n }\n return null;\n }\n function _spelunkMessage(value, result) {\n if (value == null) {\n return;\n }\n if (typeof value.message === \"string\") {\n result.push(value.message);\n }\n if (typeof value === \"object\") {\n for (const key in value) {\n _spelunkMessage(value[key], result);\n }\n }\n if (typeof value === \"string\") {\n try {\n return _spelunkMessage(JSON.parse(value), result);\n } catch (error) {\n }\n }\n }\n function spelunkMessage(value) {\n const result = [];\n _spelunkMessage(value, result);\n return result;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-ankr.js\n var require_provider_ankr = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-ankr.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AnkrProvider = void 0;\n var index_js_1 = require_utils13();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var defaultApiKey = \"9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"rpc.ankr.com/eth\";\n case \"goerli\":\n return \"rpc.ankr.com/eth_goerli\";\n case \"sepolia\":\n return \"rpc.ankr.com/eth_sepolia\";\n case \"arbitrum\":\n return \"rpc.ankr.com/arbitrum\";\n case \"base\":\n return \"rpc.ankr.com/base\";\n case \"base-goerli\":\n return \"rpc.ankr.com/base_goerli\";\n case \"base-sepolia\":\n return \"rpc.ankr.com/base_sepolia\";\n case \"bnb\":\n return \"rpc.ankr.com/bsc\";\n case \"bnbt\":\n return \"rpc.ankr.com/bsc_testnet_chapel\";\n case \"matic\":\n return \"rpc.ankr.com/polygon\";\n case \"matic-mumbai\":\n return \"rpc.ankr.com/polygon_mumbai\";\n case \"optimism\":\n return \"rpc.ankr.com/optimism\";\n case \"optimism-goerli\":\n return \"rpc.ankr.com/optimism_testnet\";\n case \"optimism-sepolia\":\n return \"rpc.ankr.com/optimism_sepolia\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var AnkrProvider = class _AnkrProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The API key for the Ankr connection.\n */\n apiKey;\n /**\n * Create a new **AnkrProvider**.\n *\n * By default connecting to ``mainnet`` with a highly throttled\n * API key.\n */\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const options = { polling: true, staticNetwork: network };\n const request = _AnkrProvider.getRequest(network, apiKey);\n super(request, network, options);\n (0, index_js_1.defineProperties)(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new _AnkrProvider(chainId, this.apiKey);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n /**\n * Returns a prepared request for connecting to %%network%% with\n * %%apiKey%%.\n */\n static getRequest(network, apiKey) {\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/${apiKey}`);\n request.allowGzip = true;\n if (apiKey === defaultApiKey) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"AnkrProvider\");\n return true;\n };\n }\n return request;\n }\n getRpcError(payload, error) {\n if (payload.method === \"eth_sendRawTransaction\") {\n if (error && error.error && error.error.message === \"INTERNAL_ERROR: could not replace existing tx\") {\n error.error.message = \"replacement transaction underpriced\";\n }\n }\n return super.getRpcError(payload, error);\n }\n isCommunityResource() {\n return this.apiKey === defaultApiKey;\n }\n };\n exports3.AnkrProvider = AnkrProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-alchemy.js\n var require_provider_alchemy = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-alchemy.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AlchemyProvider = void 0;\n var index_js_1 = require_utils13();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var defaultApiKey = \"_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"eth-mainnet.alchemyapi.io\";\n case \"goerli\":\n return \"eth-goerli.g.alchemy.com\";\n case \"sepolia\":\n return \"eth-sepolia.g.alchemy.com\";\n case \"arbitrum\":\n return \"arb-mainnet.g.alchemy.com\";\n case \"arbitrum-goerli\":\n return \"arb-goerli.g.alchemy.com\";\n case \"arbitrum-sepolia\":\n return \"arb-sepolia.g.alchemy.com\";\n case \"base\":\n return \"base-mainnet.g.alchemy.com\";\n case \"base-goerli\":\n return \"base-goerli.g.alchemy.com\";\n case \"base-sepolia\":\n return \"base-sepolia.g.alchemy.com\";\n case \"matic\":\n return \"polygon-mainnet.g.alchemy.com\";\n case \"matic-amoy\":\n return \"polygon-amoy.g.alchemy.com\";\n case \"matic-mumbai\":\n return \"polygon-mumbai.g.alchemy.com\";\n case \"optimism\":\n return \"opt-mainnet.g.alchemy.com\";\n case \"optimism-goerli\":\n return \"opt-goerli.g.alchemy.com\";\n case \"optimism-sepolia\":\n return \"opt-sepolia.g.alchemy.com\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var AlchemyProvider = class _AlchemyProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n apiKey;\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const request = _AlchemyProvider.getRequest(network, apiKey);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new _AlchemyProvider(chainId, this.apiKey);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n async _perform(req) {\n if (req.method === \"getTransactionResult\") {\n const { trace, tx } = await (0, index_js_1.resolveProperties)({\n trace: this.send(\"trace_transaction\", [req.hash]),\n tx: this.getTransaction(req.hash)\n });\n if (trace == null || tx == null) {\n return null;\n }\n let data;\n let error = false;\n try {\n data = trace[0].result.output;\n error = trace[0].error === \"Reverted\";\n } catch (error2) {\n }\n if (data) {\n (0, index_js_1.assert)(!error, \"an error occurred during transaction executions\", \"CALL_EXCEPTION\", {\n action: \"getTransactionResult\",\n data,\n reason: null,\n transaction: tx,\n invocation: null,\n revert: null\n // @TODO\n });\n return data;\n }\n (0, index_js_1.assert)(false, \"could not parse trace result\", \"BAD_DATA\", { value: trace });\n }\n return await super._perform(req);\n }\n isCommunityResource() {\n return this.apiKey === defaultApiKey;\n }\n static getRequest(network, apiKey) {\n if (apiKey == null) {\n apiKey = defaultApiKey;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/v2/${apiKey}`);\n request.allowGzip = true;\n if (apiKey === defaultApiKey) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"alchemy\");\n return true;\n };\n }\n return request;\n }\n };\n exports3.AlchemyProvider = AlchemyProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-chainstack.js\n var require_provider_chainstack = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-chainstack.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ChainstackProvider = void 0;\n var index_js_1 = require_utils13();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n function getApiKey(name) {\n switch (name) {\n case \"mainnet\":\n return \"39f1d67cedf8b7831010a665328c9197\";\n case \"arbitrum\":\n return \"0550c209db33c3abf4cc927e1e18cea1\";\n case \"bnb\":\n return \"98b5a77e531614387366f6fc5da097f8\";\n case \"matic\":\n return \"cd9d4d70377471aa7c142ec4a4205249\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"ethereum-mainnet.core.chainstack.com\";\n case \"arbitrum\":\n return \"arbitrum-mainnet.core.chainstack.com\";\n case \"bnb\":\n return \"bsc-mainnet.core.chainstack.com\";\n case \"matic\":\n return \"polygon-mainnet.core.chainstack.com\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var ChainstackProvider = class _ChainstackProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The API key for the Chainstack connection.\n */\n apiKey;\n /**\n * Creates a new **ChainstackProvider**.\n */\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (apiKey == null) {\n apiKey = getApiKey(network.name);\n }\n const request = _ChainstackProvider.getRequest(network, apiKey);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new _ChainstackProvider(chainId, this.apiKey);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return this.apiKey === getApiKey(this._network.name);\n }\n /**\n * Returns a prepared request for connecting to %%network%%\n * with %%apiKey%% and %%projectSecret%%.\n */\n static getRequest(network, apiKey) {\n if (apiKey == null) {\n apiKey = getApiKey(network.name);\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/${apiKey}`);\n request.allowGzip = true;\n if (apiKey === getApiKey(network.name)) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"ChainstackProvider\");\n return true;\n };\n }\n return request;\n }\n };\n exports3.ChainstackProvider = ChainstackProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-cloudflare.js\n var require_provider_cloudflare = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-cloudflare.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CloudflareProvider = void 0;\n var index_js_1 = require_utils13();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var CloudflareProvider = class extends provider_jsonrpc_js_1.JsonRpcProvider {\n constructor(_network) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n (0, index_js_1.assertArgument)(network.name === \"mainnet\", \"unsupported network\", \"network\", _network);\n super(\"https://cloudflare-eth.com/\", network, { staticNetwork: network });\n }\n };\n exports3.CloudflareProvider = CloudflareProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-etherscan.js\n var require_provider_etherscan = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-etherscan.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.EtherscanProvider = exports3.EtherscanPlugin = void 0;\n var index_js_1 = require_abi();\n var index_js_2 = require_contract2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils13();\n var abstract_provider_js_1 = require_abstract_provider();\n var network_js_1 = require_network();\n var plugins_network_js_1 = require_plugins_network();\n var community_js_1 = require_community();\n var THROTTLE = 2e3;\n function isPromise(value) {\n return value && typeof value.then === \"function\";\n }\n var EtherscanPluginId = \"org.ethers.plugins.provider.Etherscan\";\n var EtherscanPlugin = class _EtherscanPlugin extends plugins_network_js_1.NetworkPlugin {\n /**\n * The Etherscan API base URL.\n */\n baseUrl;\n /**\n * Creates a new **EtherscanProvider** which will use\n * %%baseUrl%%.\n */\n constructor(baseUrl) {\n super(EtherscanPluginId);\n (0, index_js_4.defineProperties)(this, { baseUrl });\n }\n clone() {\n return new _EtherscanPlugin(this.baseUrl);\n }\n };\n exports3.EtherscanPlugin = EtherscanPlugin;\n var skipKeys = [\"enableCcipRead\"];\n var nextId = 1;\n var EtherscanProvider = class extends abstract_provider_js_1.AbstractProvider {\n /**\n * The connected network.\n */\n network;\n /**\n * The API key or null if using the community provided bandwidth.\n */\n apiKey;\n #plugin;\n /**\n * Creates a new **EtherscanBaseProvider**.\n */\n constructor(_network, _apiKey) {\n const apiKey = _apiKey != null ? _apiKey : null;\n super();\n const network = network_js_1.Network.from(_network);\n this.#plugin = network.getPlugin(EtherscanPluginId);\n (0, index_js_4.defineProperties)(this, { apiKey, network });\n }\n /**\n * Returns the base URL.\n *\n * If an [[EtherscanPlugin]] is configured on the\n * [[EtherscanBaseProvider_network]], returns the plugin's\n * baseUrl.\n *\n * Deprecated; for Etherscan v2 the base is no longer a simply\n * host, but instead a URL including a chainId parameter. Changing\n * this to return a URL prefix could break some libraries, so it\n * is left intact but will be removed in the future as it is unused.\n */\n getBaseUrl() {\n if (this.#plugin) {\n return this.#plugin.baseUrl;\n }\n switch (this.network.name) {\n case \"mainnet\":\n return \"https://api.etherscan.io\";\n case \"goerli\":\n return \"https://api-goerli.etherscan.io\";\n case \"sepolia\":\n return \"https://api-sepolia.etherscan.io\";\n case \"holesky\":\n return \"https://api-holesky.etherscan.io\";\n case \"arbitrum\":\n return \"https://api.arbiscan.io\";\n case \"arbitrum-goerli\":\n return \"https://api-goerli.arbiscan.io\";\n case \"base\":\n return \"https://api.basescan.org\";\n case \"base-sepolia\":\n return \"https://api-sepolia.basescan.org\";\n case \"bnb\":\n return \"https://api.bscscan.com\";\n case \"bnbt\":\n return \"https://api-testnet.bscscan.com\";\n case \"matic\":\n return \"https://api.polygonscan.com\";\n case \"matic-amoy\":\n return \"https://api-amoy.polygonscan.com\";\n case \"matic-mumbai\":\n return \"https://api-testnet.polygonscan.com\";\n case \"optimism\":\n return \"https://api-optimistic.etherscan.io\";\n case \"optimism-goerli\":\n return \"https://api-goerli-optimistic.etherscan.io\";\n default:\n }\n (0, index_js_4.assertArgument)(false, \"unsupported network\", \"network\", this.network);\n }\n /**\n * Returns the URL for the %%module%% and %%params%%.\n */\n getUrl(module2, params) {\n let query = Object.keys(params).reduce((accum, key) => {\n const value = params[key];\n if (value != null) {\n accum += `&${key}=${value}`;\n }\n return accum;\n }, \"\");\n if (this.apiKey) {\n query += `&apikey=${this.apiKey}`;\n }\n return `https://api.etherscan.io/v2/api?chainid=${this.network.chainId}&module=${module2}${query}`;\n }\n /**\n * Returns the URL for using POST requests.\n */\n getPostUrl() {\n return `https://api.etherscan.io/v2/api?chainid=${this.network.chainId}`;\n }\n /**\n * Returns the parameters for using POST requests.\n */\n getPostData(module2, params) {\n params.module = module2;\n params.apikey = this.apiKey;\n params.chainid = this.network.chainId;\n return params;\n }\n async detectNetwork() {\n return this.network;\n }\n /**\n * Resolves to the result of calling %%module%% with %%params%%.\n *\n * If %%post%%, the request is made as a POST request.\n */\n async fetch(module2, params, post) {\n const id = nextId++;\n const url = post ? this.getPostUrl() : this.getUrl(module2, params);\n const payload = post ? this.getPostData(module2, params) : null;\n this.emit(\"debug\", { action: \"sendRequest\", id, url, payload });\n const request = new index_js_4.FetchRequest(url);\n request.setThrottleParams({ slotInterval: 1e3 });\n request.retryFunc = (req, resp, attempt) => {\n if (this.isCommunityResource()) {\n (0, community_js_1.showThrottleMessage)(\"Etherscan\");\n }\n return Promise.resolve(true);\n };\n request.processFunc = async (request2, response2) => {\n const result2 = response2.hasBody() ? JSON.parse((0, index_js_4.toUtf8String)(response2.body)) : {};\n const throttle = (typeof result2.result === \"string\" ? result2.result : \"\").toLowerCase().indexOf(\"rate limit\") >= 0;\n if (module2 === \"proxy\") {\n if (result2 && result2.status == 0 && result2.message == \"NOTOK\" && throttle) {\n this.emit(\"debug\", { action: \"receiveError\", id, reason: \"proxy-NOTOK\", error: result2 });\n response2.throwThrottleError(result2.result, THROTTLE);\n }\n } else {\n if (throttle) {\n this.emit(\"debug\", { action: \"receiveError\", id, reason: \"null result\", error: result2.result });\n response2.throwThrottleError(result2.result, THROTTLE);\n }\n }\n return response2;\n };\n if (payload) {\n request.setHeader(\"content-type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n request.body = Object.keys(payload).map((k4) => `${k4}=${payload[k4]}`).join(\"&\");\n }\n const response = await request.send();\n try {\n response.assertOk();\n } catch (error) {\n this.emit(\"debug\", { action: \"receiveError\", id, error, reason: \"assertOk\" });\n (0, index_js_4.assert)(false, \"response error\", \"SERVER_ERROR\", { request, response });\n }\n if (!response.hasBody()) {\n this.emit(\"debug\", { action: \"receiveError\", id, error: \"missing body\", reason: \"null body\" });\n (0, index_js_4.assert)(false, \"missing response\", \"SERVER_ERROR\", { request, response });\n }\n const result = JSON.parse((0, index_js_4.toUtf8String)(response.body));\n if (module2 === \"proxy\") {\n if (result.jsonrpc != \"2.0\") {\n this.emit(\"debug\", { action: \"receiveError\", id, result, reason: \"invalid JSON-RPC\" });\n (0, index_js_4.assert)(false, \"invalid JSON-RPC response (missing jsonrpc='2.0')\", \"SERVER_ERROR\", { request, response, info: { result } });\n }\n if (result.error) {\n this.emit(\"debug\", { action: \"receiveError\", id, result, reason: \"JSON-RPC error\" });\n (0, index_js_4.assert)(false, \"error response\", \"SERVER_ERROR\", { request, response, info: { result } });\n }\n this.emit(\"debug\", { action: \"receiveRequest\", id, result });\n return result.result;\n } else {\n if (result.status == 0 && (result.message === \"No records found\" || result.message === \"No transactions found\")) {\n this.emit(\"debug\", { action: \"receiveRequest\", id, result });\n return result.result;\n }\n if (result.status != 1 || typeof result.message === \"string\" && !result.message.match(/^OK/)) {\n this.emit(\"debug\", { action: \"receiveError\", id, result });\n (0, index_js_4.assert)(false, \"error response\", \"SERVER_ERROR\", { request, response, info: { result } });\n }\n this.emit(\"debug\", { action: \"receiveRequest\", id, result });\n return result.result;\n }\n }\n /**\n * Returns %%transaction%% normalized for the Etherscan API.\n */\n _getTransactionPostData(transaction) {\n const result = {};\n for (let key in transaction) {\n if (skipKeys.indexOf(key) >= 0) {\n continue;\n }\n if (transaction[key] == null) {\n continue;\n }\n let value = transaction[key];\n if (key === \"type\" && value === 0) {\n continue;\n }\n if (key === \"blockTag\" && value === \"latest\") {\n continue;\n }\n if ({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true }[key]) {\n value = (0, index_js_4.toQuantity)(value);\n } else if (key === \"accessList\") {\n value = \"[\" + (0, index_js_3.accessListify)(value).map((set) => {\n return `{address:\"${set.address}\",storageKeys:[\"${set.storageKeys.join('\",\"')}\"]}`;\n }).join(\",\") + \"]\";\n } else if (key === \"blobVersionedHashes\") {\n if (value.length === 0) {\n continue;\n }\n (0, index_js_4.assert)(false, \"Etherscan API does not support blobVersionedHashes\", \"UNSUPPORTED_OPERATION\", {\n operation: \"_getTransactionPostData\",\n info: { transaction }\n });\n } else {\n value = (0, index_js_4.hexlify)(value);\n }\n result[key] = value;\n }\n return result;\n }\n /**\n * Throws the normalized Etherscan error.\n */\n _checkError(req, error, transaction) {\n let message2 = \"\";\n if ((0, index_js_4.isError)(error, \"SERVER_ERROR\")) {\n try {\n message2 = error.info.result.error.message;\n } catch (e2) {\n }\n if (!message2) {\n try {\n message2 = error.info.message;\n } catch (e2) {\n }\n }\n }\n if (req.method === \"estimateGas\") {\n if (!message2.match(/revert/i) && message2.match(/insufficient funds/i)) {\n (0, index_js_4.assert)(false, \"insufficient funds\", \"INSUFFICIENT_FUNDS\", {\n transaction: req.transaction\n });\n }\n }\n if (req.method === \"call\" || req.method === \"estimateGas\") {\n if (message2.match(/execution reverted/i)) {\n let data = \"\";\n try {\n data = error.info.result.error.data;\n } catch (error2) {\n }\n const e2 = index_js_1.AbiCoder.getBuiltinCallException(req.method, req.transaction, data);\n e2.info = { request: req, error };\n throw e2;\n }\n }\n if (message2) {\n if (req.method === \"broadcastTransaction\") {\n const transaction2 = index_js_3.Transaction.from(req.signedTransaction);\n if (message2.match(/replacement/i) && message2.match(/underpriced/i)) {\n (0, index_js_4.assert)(false, \"replacement fee too low\", \"REPLACEMENT_UNDERPRICED\", {\n transaction: transaction2\n });\n }\n if (message2.match(/insufficient funds/)) {\n (0, index_js_4.assert)(false, \"insufficient funds for intrinsic transaction cost\", \"INSUFFICIENT_FUNDS\", {\n transaction: transaction2\n });\n }\n if (message2.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) {\n (0, index_js_4.assert)(false, \"nonce has already been used\", \"NONCE_EXPIRED\", {\n transaction: transaction2\n });\n }\n }\n }\n throw error;\n }\n async _detectNetwork() {\n return this.network;\n }\n async _perform(req) {\n switch (req.method) {\n case \"chainId\":\n return this.network.chainId;\n case \"getBlockNumber\":\n return this.fetch(\"proxy\", { action: \"eth_blockNumber\" });\n case \"getGasPrice\":\n return this.fetch(\"proxy\", { action: \"eth_gasPrice\" });\n case \"getPriorityFee\":\n if (this.network.name === \"mainnet\") {\n return \"1000000000\";\n } else if (this.network.name === \"optimism\") {\n return \"1000000\";\n } else {\n throw new Error(\"fallback onto the AbstractProvider default\");\n }\n case \"getBalance\":\n return this.fetch(\"account\", {\n action: \"balance\",\n address: req.address,\n tag: req.blockTag\n });\n case \"getTransactionCount\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionCount\",\n address: req.address,\n tag: req.blockTag\n });\n case \"getCode\":\n return this.fetch(\"proxy\", {\n action: \"eth_getCode\",\n address: req.address,\n tag: req.blockTag\n });\n case \"getStorage\":\n return this.fetch(\"proxy\", {\n action: \"eth_getStorageAt\",\n address: req.address,\n position: req.position,\n tag: req.blockTag\n });\n case \"broadcastTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_sendRawTransaction\",\n hex: req.signedTransaction\n }, true).catch((error) => {\n return this._checkError(req, error, req.signedTransaction);\n });\n case \"getBlock\":\n if (\"blockTag\" in req) {\n return this.fetch(\"proxy\", {\n action: \"eth_getBlockByNumber\",\n tag: req.blockTag,\n boolean: req.includeTransactions ? \"true\" : \"false\"\n });\n }\n (0, index_js_4.assert)(false, \"getBlock by blockHash not supported by Etherscan\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getBlock(blockHash)\"\n });\n case \"getTransaction\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionByHash\",\n txhash: req.hash\n });\n case \"getTransactionReceipt\":\n return this.fetch(\"proxy\", {\n action: \"eth_getTransactionReceipt\",\n txhash: req.hash\n });\n case \"call\": {\n if (req.blockTag !== \"latest\") {\n throw new Error(\"EtherscanProvider does not support blockTag for call\");\n }\n const postData = this._getTransactionPostData(req.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_call\";\n try {\n return await this.fetch(\"proxy\", postData, true);\n } catch (error) {\n return this._checkError(req, error, req.transaction);\n }\n }\n case \"estimateGas\": {\n const postData = this._getTransactionPostData(req.transaction);\n postData.module = \"proxy\";\n postData.action = \"eth_estimateGas\";\n try {\n return await this.fetch(\"proxy\", postData, true);\n } catch (error) {\n return this._checkError(req, error, req.transaction);\n }\n }\n default:\n break;\n }\n return super._perform(req);\n }\n async getNetwork() {\n return this.network;\n }\n /**\n * Resolves to the current price of ether.\n *\n * This returns ``0`` on any network other than ``mainnet``.\n */\n async getEtherPrice() {\n if (this.network.name !== \"mainnet\") {\n return 0;\n }\n return parseFloat((await this.fetch(\"stats\", { action: \"ethprice\" })).ethusd);\n }\n /**\n * Resolves to a [Contract]] for %%address%%, using the\n * Etherscan API to retreive the Contract ABI.\n */\n async getContract(_address) {\n let address = this._getAddress(_address);\n if (isPromise(address)) {\n address = await address;\n }\n try {\n const resp = await this.fetch(\"contract\", {\n action: \"getabi\",\n address\n });\n const abi2 = JSON.parse(resp);\n return new index_js_2.Contract(address, abi2, this);\n } catch (error) {\n return null;\n }\n }\n isCommunityResource() {\n return this.apiKey == null;\n }\n };\n exports3.EtherscanProvider = EtherscanProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/ws-browser.js\n var require_ws_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/ws-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WebSocket = void 0;\n function getGlobal() {\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw new Error(\"unable to locate global object\");\n }\n var _WebSocket = getGlobal().WebSocket;\n exports3.WebSocket = _WebSocket;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-socket.js\n var require_provider_socket = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-socket.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SocketProvider = exports3.SocketEventSubscriber = exports3.SocketPendingSubscriber = exports3.SocketBlockSubscriber = exports3.SocketSubscriber = void 0;\n var abstract_provider_js_1 = require_abstract_provider();\n var index_js_1 = require_utils13();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var SocketSubscriber = class {\n #provider;\n #filter;\n /**\n * The filter.\n */\n get filter() {\n return JSON.parse(this.#filter);\n }\n #filterId;\n #paused;\n #emitPromise;\n /**\n * Creates a new **SocketSubscriber** attached to %%provider%% listening\n * to %%filter%%.\n */\n constructor(provider, filter) {\n this.#provider = provider;\n this.#filter = JSON.stringify(filter);\n this.#filterId = null;\n this.#paused = null;\n this.#emitPromise = null;\n }\n start() {\n this.#filterId = this.#provider.send(\"eth_subscribe\", this.filter).then((filterId) => {\n ;\n this.#provider._register(filterId, this);\n return filterId;\n });\n }\n stop() {\n this.#filterId.then((filterId) => {\n if (this.#provider.destroyed) {\n return;\n }\n this.#provider.send(\"eth_unsubscribe\", [filterId]);\n });\n this.#filterId = null;\n }\n // @TODO: pause should trap the current blockNumber, unsub, and on resume use getLogs\n // and resume\n pause(dropWhilePaused) {\n (0, index_js_1.assert)(dropWhilePaused, \"preserve logs while paused not supported by SocketSubscriber yet\", \"UNSUPPORTED_OPERATION\", { operation: \"pause(false)\" });\n this.#paused = !!dropWhilePaused;\n }\n resume() {\n this.#paused = null;\n }\n /**\n * @_ignore:\n */\n _handleMessage(message2) {\n if (this.#filterId == null) {\n return;\n }\n if (this.#paused === null) {\n let emitPromise = this.#emitPromise;\n if (emitPromise == null) {\n emitPromise = this._emit(this.#provider, message2);\n } else {\n emitPromise = emitPromise.then(async () => {\n await this._emit(this.#provider, message2);\n });\n }\n this.#emitPromise = emitPromise.then(() => {\n if (this.#emitPromise === emitPromise) {\n this.#emitPromise = null;\n }\n });\n }\n }\n /**\n * Sub-classes **must** override this to emit the events on the\n * provider.\n */\n async _emit(provider, message2) {\n throw new Error(\"sub-classes must implemente this; _emit\");\n }\n };\n exports3.SocketSubscriber = SocketSubscriber;\n var SocketBlockSubscriber = class extends SocketSubscriber {\n /**\n * @_ignore:\n */\n constructor(provider) {\n super(provider, [\"newHeads\"]);\n }\n async _emit(provider, message2) {\n provider.emit(\"block\", parseInt(message2.number));\n }\n };\n exports3.SocketBlockSubscriber = SocketBlockSubscriber;\n var SocketPendingSubscriber = class extends SocketSubscriber {\n /**\n * @_ignore:\n */\n constructor(provider) {\n super(provider, [\"newPendingTransactions\"]);\n }\n async _emit(provider, message2) {\n provider.emit(\"pending\", message2);\n }\n };\n exports3.SocketPendingSubscriber = SocketPendingSubscriber;\n var SocketEventSubscriber = class extends SocketSubscriber {\n #logFilter;\n /**\n * The filter.\n */\n get logFilter() {\n return JSON.parse(this.#logFilter);\n }\n /**\n * @_ignore:\n */\n constructor(provider, filter) {\n super(provider, [\"logs\", filter]);\n this.#logFilter = JSON.stringify(filter);\n }\n async _emit(provider, message2) {\n provider.emit(this.logFilter, provider._wrapLog(message2, provider._network));\n }\n };\n exports3.SocketEventSubscriber = SocketEventSubscriber;\n var SocketProvider = class extends provider_jsonrpc_js_1.JsonRpcApiProvider {\n #callbacks;\n // Maps each filterId to its subscriber\n #subs;\n // If any events come in before a subscriber has finished\n // registering, queue them\n #pending;\n /**\n * Creates a new **SocketProvider** connected to %%network%%.\n *\n * If unspecified, the network will be discovered.\n */\n constructor(network, _options) {\n const options = Object.assign({}, _options != null ? _options : {});\n (0, index_js_1.assertArgument)(options.batchMaxCount == null || options.batchMaxCount === 1, \"sockets-based providers do not support batches\", \"options.batchMaxCount\", _options);\n options.batchMaxCount = 1;\n if (options.staticNetwork == null) {\n options.staticNetwork = true;\n }\n super(network, options);\n this.#callbacks = /* @__PURE__ */ new Map();\n this.#subs = /* @__PURE__ */ new Map();\n this.#pending = /* @__PURE__ */ new Map();\n }\n // This value is only valid after _start has been called\n /*\n get _network(): Network {\n if (this.#network == null) {\n throw new Error(\"this shouldn't happen\");\n }\n return this.#network.clone();\n }\n */\n _getSubscriber(sub) {\n switch (sub.type) {\n case \"close\":\n return new abstract_provider_js_1.UnmanagedSubscriber(\"close\");\n case \"block\":\n return new SocketBlockSubscriber(this);\n case \"pending\":\n return new SocketPendingSubscriber(this);\n case \"event\":\n return new SocketEventSubscriber(this, sub.filter);\n case \"orphan\":\n if (sub.filter.orphan === \"drop-log\") {\n return new abstract_provider_js_1.UnmanagedSubscriber(\"drop-log\");\n }\n }\n return super._getSubscriber(sub);\n }\n /**\n * Register a new subscriber. This is used internalled by Subscribers\n * and generally is unecessary unless extending capabilities.\n */\n _register(filterId, subscriber) {\n this.#subs.set(filterId, subscriber);\n const pending = this.#pending.get(filterId);\n if (pending) {\n for (const message2 of pending) {\n subscriber._handleMessage(message2);\n }\n this.#pending.delete(filterId);\n }\n }\n async _send(payload) {\n (0, index_js_1.assertArgument)(!Array.isArray(payload), \"WebSocket does not support batch send\", \"payload\", payload);\n const promise = new Promise((resolve, reject) => {\n this.#callbacks.set(payload.id, { payload, resolve, reject });\n });\n await this._waitUntilReady();\n await this._write(JSON.stringify(payload));\n return [await promise];\n }\n // Sub-classes must call this once they are connected\n /*\n async _start(): Promise {\n if (this.#ready) { return; }\n \n for (const { payload } of this.#callbacks.values()) {\n await this._write(JSON.stringify(payload));\n }\n \n this.#ready = (async function() {\n await super._start();\n })();\n }\n */\n /**\n * Sub-classes **must** call this with messages received over their\n * transport to be processed and dispatched.\n */\n async _processMessage(message2) {\n const result = JSON.parse(message2);\n if (result && typeof result === \"object\" && \"id\" in result) {\n const callback = this.#callbacks.get(result.id);\n if (callback == null) {\n this.emit(\"error\", (0, index_js_1.makeError)(\"received result for unknown id\", \"UNKNOWN_ERROR\", {\n reasonCode: \"UNKNOWN_ID\",\n result\n }));\n return;\n }\n this.#callbacks.delete(result.id);\n callback.resolve(result);\n } else if (result && result.method === \"eth_subscription\") {\n const filterId = result.params.subscription;\n const subscriber = this.#subs.get(filterId);\n if (subscriber) {\n subscriber._handleMessage(result.params.result);\n } else {\n let pending = this.#pending.get(filterId);\n if (pending == null) {\n pending = [];\n this.#pending.set(filterId, pending);\n }\n pending.push(result.params.result);\n }\n } else {\n this.emit(\"error\", (0, index_js_1.makeError)(\"received unexpected message\", \"UNKNOWN_ERROR\", {\n reasonCode: \"UNEXPECTED_MESSAGE\",\n result\n }));\n return;\n }\n }\n /**\n * Sub-classes **must** override this to send %%message%% over their\n * transport.\n */\n async _write(message2) {\n throw new Error(\"sub-classes must override this\");\n }\n };\n exports3.SocketProvider = SocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-websocket.js\n var require_provider_websocket = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-websocket.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WebSocketProvider = void 0;\n var ws_js_1 = require_ws_browser();\n var provider_socket_js_1 = require_provider_socket();\n var WebSocketProvider = class extends provider_socket_js_1.SocketProvider {\n #connect;\n #websocket;\n get websocket() {\n if (this.#websocket == null) {\n throw new Error(\"websocket closed\");\n }\n return this.#websocket;\n }\n constructor(url, network, options) {\n super(network, options);\n if (typeof url === \"string\") {\n this.#connect = () => {\n return new ws_js_1.WebSocket(url);\n };\n this.#websocket = this.#connect();\n } else if (typeof url === \"function\") {\n this.#connect = url;\n this.#websocket = url();\n } else {\n this.#connect = null;\n this.#websocket = url;\n }\n this.websocket.onopen = async () => {\n try {\n await this._start();\n this.resume();\n } catch (error) {\n console.log(\"failed to start WebsocketProvider\", error);\n }\n };\n this.websocket.onmessage = (message2) => {\n this._processMessage(message2.data);\n };\n }\n async _write(message2) {\n this.websocket.send(message2);\n }\n async destroy() {\n if (this.#websocket != null) {\n this.#websocket.close();\n this.#websocket = null;\n }\n super.destroy();\n }\n };\n exports3.WebSocketProvider = WebSocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-infura.js\n var require_provider_infura = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-infura.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.InfuraProvider = exports3.InfuraWebSocketProvider = void 0;\n var index_js_1 = require_utils13();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var provider_websocket_js_1 = require_provider_websocket();\n var defaultProjectId = \"84842078b09946638c03157f83405213\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"mainnet.infura.io\";\n case \"goerli\":\n return \"goerli.infura.io\";\n case \"sepolia\":\n return \"sepolia.infura.io\";\n case \"arbitrum\":\n return \"arbitrum-mainnet.infura.io\";\n case \"arbitrum-goerli\":\n return \"arbitrum-goerli.infura.io\";\n case \"arbitrum-sepolia\":\n return \"arbitrum-sepolia.infura.io\";\n case \"base\":\n return \"base-mainnet.infura.io\";\n case \"base-goerlia\":\n case \"base-goerli\":\n return \"base-goerli.infura.io\";\n case \"base-sepolia\":\n return \"base-sepolia.infura.io\";\n case \"bnb\":\n return \"bsc-mainnet.infura.io\";\n case \"bnbt\":\n return \"bsc-testnet.infura.io\";\n case \"linea\":\n return \"linea-mainnet.infura.io\";\n case \"linea-goerli\":\n return \"linea-goerli.infura.io\";\n case \"linea-sepolia\":\n return \"linea-sepolia.infura.io\";\n case \"matic\":\n return \"polygon-mainnet.infura.io\";\n case \"matic-amoy\":\n return \"polygon-amoy.infura.io\";\n case \"matic-mumbai\":\n return \"polygon-mumbai.infura.io\";\n case \"optimism\":\n return \"optimism-mainnet.infura.io\";\n case \"optimism-goerli\":\n return \"optimism-goerli.infura.io\";\n case \"optimism-sepolia\":\n return \"optimism-sepolia.infura.io\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var InfuraWebSocketProvider = class extends provider_websocket_js_1.WebSocketProvider {\n /**\n * The Project ID for the INFURA connection.\n */\n projectId;\n /**\n * The Project Secret.\n *\n * If null, no authenticated requests are made. This should not\n * be used outside of private contexts.\n */\n projectSecret;\n /**\n * Creates a new **InfuraWebSocketProvider**.\n */\n constructor(network, projectId) {\n const provider = new InfuraProvider(network, projectId);\n const req = provider._getConnection();\n (0, index_js_1.assert)(!req.credentials, \"INFURA WebSocket project secrets unsupported\", \"UNSUPPORTED_OPERATION\", { operation: \"InfuraProvider.getWebSocketProvider()\" });\n const url = req.url.replace(/^http/i, \"ws\").replace(\"/v3/\", \"/ws/v3/\");\n super(url, provider._network);\n (0, index_js_1.defineProperties)(this, {\n projectId: provider.projectId,\n projectSecret: provider.projectSecret\n });\n }\n isCommunityResource() {\n return this.projectId === defaultProjectId;\n }\n };\n exports3.InfuraWebSocketProvider = InfuraWebSocketProvider;\n var InfuraProvider = class _InfuraProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The Project ID for the INFURA connection.\n */\n projectId;\n /**\n * The Project Secret.\n *\n * If null, no authenticated requests are made. This should not\n * be used outside of private contexts.\n */\n projectSecret;\n /**\n * Creates a new **InfuraProvider**.\n */\n constructor(_network, projectId, projectSecret) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (projectId == null) {\n projectId = defaultProjectId;\n }\n if (projectSecret == null) {\n projectSecret = null;\n }\n const request = _InfuraProvider.getRequest(network, projectId, projectSecret);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { projectId, projectSecret });\n }\n _getProvider(chainId) {\n try {\n return new _InfuraProvider(chainId, this.projectId, this.projectSecret);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return this.projectId === defaultProjectId;\n }\n /**\n * Creates a new **InfuraWebSocketProvider**.\n */\n static getWebSocketProvider(network, projectId) {\n return new InfuraWebSocketProvider(network, projectId);\n }\n /**\n * Returns a prepared request for connecting to %%network%%\n * with %%projectId%% and %%projectSecret%%.\n */\n static getRequest(network, projectId, projectSecret) {\n if (projectId == null) {\n projectId = defaultProjectId;\n }\n if (projectSecret == null) {\n projectSecret = null;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/v3/${projectId}`);\n request.allowGzip = true;\n if (projectSecret) {\n request.setCredentials(\"\", projectSecret);\n }\n if (projectId === defaultProjectId) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"InfuraProvider\");\n return true;\n };\n }\n return request;\n }\n };\n exports3.InfuraProvider = InfuraProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-quicknode.js\n var require_provider_quicknode = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-quicknode.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.QuickNodeProvider = void 0;\n var index_js_1 = require_utils13();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var defaultToken = \"919b412a057b5e9c9b6dce193c5a60242d6efadb\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"ethers.quiknode.pro\";\n case \"goerli\":\n return \"ethers.ethereum-goerli.quiknode.pro\";\n case \"sepolia\":\n return \"ethers.ethereum-sepolia.quiknode.pro\";\n case \"holesky\":\n return \"ethers.ethereum-holesky.quiknode.pro\";\n case \"arbitrum\":\n return \"ethers.arbitrum-mainnet.quiknode.pro\";\n case \"arbitrum-goerli\":\n return \"ethers.arbitrum-goerli.quiknode.pro\";\n case \"arbitrum-sepolia\":\n return \"ethers.arbitrum-sepolia.quiknode.pro\";\n case \"base\":\n return \"ethers.base-mainnet.quiknode.pro\";\n case \"base-goerli\":\n return \"ethers.base-goerli.quiknode.pro\";\n case \"base-spolia\":\n return \"ethers.base-sepolia.quiknode.pro\";\n case \"bnb\":\n return \"ethers.bsc.quiknode.pro\";\n case \"bnbt\":\n return \"ethers.bsc-testnet.quiknode.pro\";\n case \"matic\":\n return \"ethers.matic.quiknode.pro\";\n case \"matic-mumbai\":\n return \"ethers.matic-testnet.quiknode.pro\";\n case \"optimism\":\n return \"ethers.optimism.quiknode.pro\";\n case \"optimism-goerli\":\n return \"ethers.optimism-goerli.quiknode.pro\";\n case \"optimism-sepolia\":\n return \"ethers.optimism-sepolia.quiknode.pro\";\n case \"xdai\":\n return \"ethers.xdai.quiknode.pro\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var QuickNodeProvider = class _QuickNodeProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The API token.\n */\n token;\n /**\n * Creates a new **QuickNodeProvider**.\n */\n constructor(_network, token) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (token == null) {\n token = defaultToken;\n }\n const request = _QuickNodeProvider.getRequest(network, token);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { token });\n }\n _getProvider(chainId) {\n try {\n return new _QuickNodeProvider(chainId, this.token);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return this.token === defaultToken;\n }\n /**\n * Returns a new request prepared for %%network%% and the\n * %%token%%.\n */\n static getRequest(network, token) {\n if (token == null) {\n token = defaultToken;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/${token}`);\n request.allowGzip = true;\n if (token === defaultToken) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"QuickNodeProvider\");\n return true;\n };\n }\n return request;\n }\n };\n exports3.QuickNodeProvider = QuickNodeProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-fallback.js\n var require_provider_fallback = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-fallback.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.FallbackProvider = void 0;\n var index_js_1 = require_utils13();\n var abstract_provider_js_1 = require_abstract_provider();\n var network_js_1 = require_network();\n var BN_1 = BigInt(\"1\");\n var BN_2 = BigInt(\"2\");\n function shuffle(array) {\n for (let i3 = array.length - 1; i3 > 0; i3--) {\n const j2 = Math.floor(Math.random() * (i3 + 1));\n const tmp = array[i3];\n array[i3] = array[j2];\n array[j2] = tmp;\n }\n }\n function stall(duration) {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n }\n function getTime() {\n return (/* @__PURE__ */ new Date()).getTime();\n }\n function stringify4(value) {\n return JSON.stringify(value, (key, value2) => {\n if (typeof value2 === \"bigint\") {\n return { type: \"bigint\", value: value2.toString() };\n }\n return value2;\n });\n }\n var defaultConfig = { stallTimeout: 400, priority: 1, weight: 1 };\n var defaultState = {\n blockNumber: -2,\n requests: 0,\n lateResponses: 0,\n errorResponses: 0,\n outOfSync: -1,\n unsupportedEvents: 0,\n rollingDuration: 0,\n score: 0,\n _network: null,\n _updateNumber: null,\n _totalTime: 0,\n _lastFatalError: null,\n _lastFatalErrorTimestamp: 0\n };\n async function waitForSync(config2, blockNumber) {\n while (config2.blockNumber < 0 || config2.blockNumber < blockNumber) {\n if (!config2._updateNumber) {\n config2._updateNumber = (async () => {\n try {\n const blockNumber2 = await config2.provider.getBlockNumber();\n if (blockNumber2 > config2.blockNumber) {\n config2.blockNumber = blockNumber2;\n }\n } catch (error) {\n config2.blockNumber = -2;\n config2._lastFatalError = error;\n config2._lastFatalErrorTimestamp = getTime();\n }\n config2._updateNumber = null;\n })();\n }\n await config2._updateNumber;\n config2.outOfSync++;\n if (config2._lastFatalError) {\n break;\n }\n }\n }\n function _normalize(value) {\n if (value == null) {\n return \"null\";\n }\n if (Array.isArray(value)) {\n return \"[\" + value.map(_normalize).join(\",\") + \"]\";\n }\n if (typeof value === \"object\" && typeof value.toJSON === \"function\") {\n return _normalize(value.toJSON());\n }\n switch (typeof value) {\n case \"boolean\":\n case \"symbol\":\n return value.toString();\n case \"bigint\":\n case \"number\":\n return BigInt(value).toString();\n case \"string\":\n return JSON.stringify(value);\n case \"object\": {\n const keys = Object.keys(value);\n keys.sort();\n return \"{\" + keys.map((k4) => `${JSON.stringify(k4)}:${_normalize(value[k4])}`).join(\",\") + \"}\";\n }\n }\n console.log(\"Could not serialize\", value);\n throw new Error(\"Hmm...\");\n }\n function normalizeResult(method, value) {\n if (\"error\" in value) {\n const error = value.error;\n let tag;\n if ((0, index_js_1.isError)(error, \"CALL_EXCEPTION\")) {\n tag = _normalize(Object.assign({}, error, {\n shortMessage: void 0,\n reason: void 0,\n info: void 0\n }));\n } else {\n tag = _normalize(error);\n }\n return { tag, value: error };\n }\n const result = value.result;\n return { tag: _normalize(result), value: result };\n }\n function checkQuorum(quorum, results) {\n const tally = /* @__PURE__ */ new Map();\n for (const { value, tag, weight } of results) {\n const t3 = tally.get(tag) || { value, weight: 0 };\n t3.weight += weight;\n tally.set(tag, t3);\n }\n let best = null;\n for (const r2 of tally.values()) {\n if (r2.weight >= quorum && (!best || r2.weight > best.weight)) {\n best = r2;\n }\n }\n if (best) {\n return best.value;\n }\n return void 0;\n }\n function getMedian(quorum, results) {\n let resultWeight = 0;\n const errorMap2 = /* @__PURE__ */ new Map();\n let bestError = null;\n const values = [];\n for (const { value, tag, weight } of results) {\n if (value instanceof Error) {\n const e2 = errorMap2.get(tag) || { value, weight: 0 };\n e2.weight += weight;\n errorMap2.set(tag, e2);\n if (bestError == null || e2.weight > bestError.weight) {\n bestError = e2;\n }\n } else {\n values.push(BigInt(value));\n resultWeight += weight;\n }\n }\n if (resultWeight < quorum) {\n if (bestError && bestError.weight >= quorum) {\n return bestError.value;\n }\n return void 0;\n }\n values.sort((a3, b4) => a3 < b4 ? -1 : b4 > a3 ? 1 : 0);\n const mid = Math.floor(values.length / 2);\n if (values.length % 2) {\n return values[mid];\n }\n return (values[mid - 1] + values[mid] + BN_1) / BN_2;\n }\n function getAnyResult(quorum, results) {\n const result = checkQuorum(quorum, results);\n if (result !== void 0) {\n return result;\n }\n for (const r2 of results) {\n if (r2.value) {\n return r2.value;\n }\n }\n return void 0;\n }\n function getFuzzyMode(quorum, results) {\n if (quorum === 1) {\n return (0, index_js_1.getNumber)(getMedian(quorum, results), \"%internal\");\n }\n const tally = /* @__PURE__ */ new Map();\n const add2 = (result, weight) => {\n const t3 = tally.get(result) || { result, weight: 0 };\n t3.weight += weight;\n tally.set(result, t3);\n };\n for (const { weight, value } of results) {\n const r2 = (0, index_js_1.getNumber)(value);\n add2(r2 - 1, weight);\n add2(r2, weight);\n add2(r2 + 1, weight);\n }\n let bestWeight = 0;\n let bestResult = void 0;\n for (const { weight, result } of tally.values()) {\n if (weight >= quorum && (weight > bestWeight || bestResult != null && weight === bestWeight && result > bestResult)) {\n bestWeight = weight;\n bestResult = result;\n }\n }\n return bestResult;\n }\n var FallbackProvider = class extends abstract_provider_js_1.AbstractProvider {\n /**\n * The number of backends that must agree on a value before it is\n * accpeted.\n */\n quorum;\n /**\n * @_ignore:\n */\n eventQuorum;\n /**\n * @_ignore:\n */\n eventWorkers;\n #configs;\n #height;\n #initialSyncPromise;\n /**\n * Creates a new **FallbackProvider** with %%providers%% connected to\n * %%network%%.\n *\n * If a [[Provider]] is included in %%providers%%, defaults are used\n * for the configuration.\n */\n constructor(providers, network, options) {\n super(network, options);\n this.#configs = providers.map((p4) => {\n if (p4 instanceof abstract_provider_js_1.AbstractProvider) {\n return Object.assign({ provider: p4 }, defaultConfig, defaultState);\n } else {\n return Object.assign({}, defaultConfig, p4, defaultState);\n }\n });\n this.#height = -2;\n this.#initialSyncPromise = null;\n if (options && options.quorum != null) {\n this.quorum = options.quorum;\n } else {\n this.quorum = Math.ceil(this.#configs.reduce((accum, config2) => {\n accum += config2.weight;\n return accum;\n }, 0) / 2);\n }\n this.eventQuorum = 1;\n this.eventWorkers = 1;\n (0, index_js_1.assertArgument)(this.quorum <= this.#configs.reduce((a3, c4) => a3 + c4.weight, 0), \"quorum exceed provider weight\", \"quorum\", this.quorum);\n }\n get providerConfigs() {\n return this.#configs.map((c4) => {\n const result = Object.assign({}, c4);\n for (const key in result) {\n if (key[0] === \"_\") {\n delete result[key];\n }\n }\n return result;\n });\n }\n async _detectNetwork() {\n return network_js_1.Network.from((0, index_js_1.getBigInt)(await this._perform({ method: \"chainId\" })));\n }\n // @TODO: Add support to select providers to be the event subscriber\n //_getSubscriber(sub: Subscription): Subscriber {\n // throw new Error(\"@TODO\");\n //}\n /**\n * Transforms a %%req%% into the correct method call on %%provider%%.\n */\n async _translatePerform(provider, req) {\n switch (req.method) {\n case \"broadcastTransaction\":\n return await provider.broadcastTransaction(req.signedTransaction);\n case \"call\":\n return await provider.call(Object.assign({}, req.transaction, { blockTag: req.blockTag }));\n case \"chainId\":\n return (await provider.getNetwork()).chainId;\n case \"estimateGas\":\n return await provider.estimateGas(req.transaction);\n case \"getBalance\":\n return await provider.getBalance(req.address, req.blockTag);\n case \"getBlock\": {\n const block = \"blockHash\" in req ? req.blockHash : req.blockTag;\n return await provider.getBlock(block, req.includeTransactions);\n }\n case \"getBlockNumber\":\n return await provider.getBlockNumber();\n case \"getCode\":\n return await provider.getCode(req.address, req.blockTag);\n case \"getGasPrice\":\n return (await provider.getFeeData()).gasPrice;\n case \"getPriorityFee\":\n return (await provider.getFeeData()).maxPriorityFeePerGas;\n case \"getLogs\":\n return await provider.getLogs(req.filter);\n case \"getStorage\":\n return await provider.getStorage(req.address, req.position, req.blockTag);\n case \"getTransaction\":\n return await provider.getTransaction(req.hash);\n case \"getTransactionCount\":\n return await provider.getTransactionCount(req.address, req.blockTag);\n case \"getTransactionReceipt\":\n return await provider.getTransactionReceipt(req.hash);\n case \"getTransactionResult\":\n return await provider.getTransactionResult(req.hash);\n }\n }\n // Grab the next (random) config that is not already part of\n // the running set\n #getNextConfig(running) {\n const configs = Array.from(running).map((r2) => r2.config);\n const allConfigs = this.#configs.slice();\n shuffle(allConfigs);\n allConfigs.sort((a3, b4) => a3.priority - b4.priority);\n for (const config2 of allConfigs) {\n if (config2._lastFatalError) {\n continue;\n }\n if (configs.indexOf(config2) === -1) {\n return config2;\n }\n }\n return null;\n }\n // Adds a new runner (if available) to running.\n #addRunner(running, req) {\n const config2 = this.#getNextConfig(running);\n if (config2 == null) {\n return null;\n }\n const runner = {\n config: config2,\n result: null,\n didBump: false,\n perform: null,\n staller: null\n };\n const now = getTime();\n runner.perform = (async () => {\n try {\n config2.requests++;\n const result = await this._translatePerform(config2.provider, req);\n runner.result = { result };\n } catch (error) {\n config2.errorResponses++;\n runner.result = { error };\n }\n const dt = getTime() - now;\n config2._totalTime += dt;\n config2.rollingDuration = 0.95 * config2.rollingDuration + 0.05 * dt;\n runner.perform = null;\n })();\n runner.staller = (async () => {\n await stall(config2.stallTimeout);\n runner.staller = null;\n })();\n running.add(runner);\n return runner;\n }\n // Initializes the blockNumber and network for each runner and\n // blocks until initialized\n async #initialSync() {\n let initialSync = this.#initialSyncPromise;\n if (!initialSync) {\n const promises = [];\n this.#configs.forEach((config2) => {\n promises.push((async () => {\n await waitForSync(config2, 0);\n if (!config2._lastFatalError) {\n config2._network = await config2.provider.getNetwork();\n }\n })());\n });\n this.#initialSyncPromise = initialSync = (async () => {\n await Promise.all(promises);\n let chainId = null;\n for (const config2 of this.#configs) {\n if (config2._lastFatalError) {\n continue;\n }\n const network = config2._network;\n if (chainId == null) {\n chainId = network.chainId;\n } else if (network.chainId !== chainId) {\n (0, index_js_1.assert)(false, \"cannot mix providers on different networks\", \"UNSUPPORTED_OPERATION\", {\n operation: \"new FallbackProvider\"\n });\n }\n }\n })();\n }\n await initialSync;\n }\n async #checkQuorum(running, req) {\n const results = [];\n for (const runner of running) {\n if (runner.result != null) {\n const { tag, value } = normalizeResult(req.method, runner.result);\n results.push({ tag, value, weight: runner.config.weight });\n }\n }\n if (results.reduce((a3, r2) => a3 + r2.weight, 0) < this.quorum) {\n return void 0;\n }\n switch (req.method) {\n case \"getBlockNumber\": {\n if (this.#height === -2) {\n this.#height = Math.ceil((0, index_js_1.getNumber)(getMedian(this.quorum, this.#configs.filter((c4) => !c4._lastFatalError).map((c4) => ({\n value: c4.blockNumber,\n tag: (0, index_js_1.getNumber)(c4.blockNumber).toString(),\n weight: c4.weight\n })))));\n }\n const mode = getFuzzyMode(this.quorum, results);\n if (mode === void 0) {\n return void 0;\n }\n if (mode > this.#height) {\n this.#height = mode;\n }\n return this.#height;\n }\n case \"getGasPrice\":\n case \"getPriorityFee\":\n case \"estimateGas\":\n return getMedian(this.quorum, results);\n case \"getBlock\":\n if (\"blockTag\" in req && req.blockTag === \"pending\") {\n return getAnyResult(this.quorum, results);\n }\n return checkQuorum(this.quorum, results);\n case \"call\":\n case \"chainId\":\n case \"getBalance\":\n case \"getTransactionCount\":\n case \"getCode\":\n case \"getStorage\":\n case \"getTransaction\":\n case \"getTransactionReceipt\":\n case \"getLogs\":\n return checkQuorum(this.quorum, results);\n case \"broadcastTransaction\":\n return getAnyResult(this.quorum, results);\n }\n (0, index_js_1.assert)(false, \"unsupported method\", \"UNSUPPORTED_OPERATION\", {\n operation: `_perform(${stringify4(req.method)})`\n });\n }\n async #waitForQuorum(running, req) {\n if (running.size === 0) {\n throw new Error(\"no runners?!\");\n }\n const interesting = [];\n let newRunners = 0;\n for (const runner of running) {\n if (runner.perform) {\n interesting.push(runner.perform);\n }\n if (runner.staller) {\n interesting.push(runner.staller);\n continue;\n }\n if (runner.didBump) {\n continue;\n }\n runner.didBump = true;\n newRunners++;\n }\n const value = await this.#checkQuorum(running, req);\n if (value !== void 0) {\n if (value instanceof Error) {\n throw value;\n }\n return value;\n }\n for (let i3 = 0; i3 < newRunners; i3++) {\n this.#addRunner(running, req);\n }\n (0, index_js_1.assert)(interesting.length > 0, \"quorum not met\", \"SERVER_ERROR\", {\n request: \"%sub-requests\",\n info: { request: req, results: Array.from(running).map((r2) => stringify4(r2.result)) }\n });\n await Promise.race(interesting);\n return await this.#waitForQuorum(running, req);\n }\n async _perform(req) {\n if (req.method === \"broadcastTransaction\") {\n const results = this.#configs.map((c4) => null);\n const broadcasts = this.#configs.map(async ({ provider, weight }, index2) => {\n try {\n const result3 = await provider._perform(req);\n results[index2] = Object.assign(normalizeResult(req.method, { result: result3 }), { weight });\n } catch (error) {\n results[index2] = Object.assign(normalizeResult(req.method, { error }), { weight });\n }\n });\n while (true) {\n const done = results.filter((r2) => r2 != null);\n for (const { value } of done) {\n if (!(value instanceof Error)) {\n return value;\n }\n }\n const result3 = checkQuorum(this.quorum, results.filter((r2) => r2 != null));\n if ((0, index_js_1.isError)(result3, \"INSUFFICIENT_FUNDS\")) {\n throw result3;\n }\n const waiting = broadcasts.filter((b4, i3) => results[i3] == null);\n if (waiting.length === 0) {\n break;\n }\n await Promise.race(waiting);\n }\n const result2 = getAnyResult(this.quorum, results);\n (0, index_js_1.assert)(result2 !== void 0, \"problem multi-broadcasting\", \"SERVER_ERROR\", {\n request: \"%sub-requests\",\n info: { request: req, results: results.map(stringify4) }\n });\n if (result2 instanceof Error) {\n throw result2;\n }\n return result2;\n }\n await this.#initialSync();\n const running = /* @__PURE__ */ new Set();\n let inflightQuorum = 0;\n while (true) {\n const runner = this.#addRunner(running, req);\n if (runner == null) {\n break;\n }\n inflightQuorum += runner.config.weight;\n if (inflightQuorum >= this.quorum) {\n break;\n }\n }\n const result = await this.#waitForQuorum(running, req);\n for (const runner of running) {\n if (runner.perform && runner.result == null) {\n runner.config.lateResponses++;\n }\n }\n return result;\n }\n async destroy() {\n for (const { provider } of this.#configs) {\n provider.destroy();\n }\n super.destroy();\n }\n };\n exports3.FallbackProvider = FallbackProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/default-provider.js\n var require_default_provider = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/default-provider.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getDefaultProvider = void 0;\n var index_js_1 = require_utils13();\n var provider_ankr_js_1 = require_provider_ankr();\n var provider_alchemy_js_1 = require_provider_alchemy();\n var provider_chainstack_js_1 = require_provider_chainstack();\n var provider_cloudflare_js_1 = require_provider_cloudflare();\n var provider_etherscan_js_1 = require_provider_etherscan();\n var provider_infura_js_1 = require_provider_infura();\n var provider_quicknode_js_1 = require_provider_quicknode();\n var provider_fallback_js_1 = require_provider_fallback();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var network_js_1 = require_network();\n var provider_websocket_js_1 = require_provider_websocket();\n function isWebSocketLike(value) {\n return value && typeof value.send === \"function\" && typeof value.close === \"function\";\n }\n var Testnets = \"goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt\".split(\" \");\n function getDefaultProvider(network, options) {\n if (options == null) {\n options = {};\n }\n const allowService = (name) => {\n if (options[name] === \"-\") {\n return false;\n }\n if (typeof options.exclusive === \"string\") {\n return name === options.exclusive;\n }\n if (Array.isArray(options.exclusive)) {\n return options.exclusive.indexOf(name) !== -1;\n }\n return true;\n };\n if (typeof network === \"string\" && network.match(/^https?:/)) {\n return new provider_jsonrpc_js_1.JsonRpcProvider(network);\n }\n if (typeof network === \"string\" && network.match(/^wss?:/) || isWebSocketLike(network)) {\n return new provider_websocket_js_1.WebSocketProvider(network);\n }\n let staticNetwork = null;\n try {\n staticNetwork = network_js_1.Network.from(network);\n } catch (error) {\n }\n const providers = [];\n if (allowService(\"publicPolygon\") && staticNetwork) {\n if (staticNetwork.name === \"matic\") {\n providers.push(new provider_jsonrpc_js_1.JsonRpcProvider(\"https://polygon-rpc.com/\", staticNetwork, { staticNetwork }));\n } else if (staticNetwork.name === \"matic-amoy\") {\n providers.push(new provider_jsonrpc_js_1.JsonRpcProvider(\"https://rpc-amoy.polygon.technology/\", staticNetwork, { staticNetwork }));\n }\n }\n if (allowService(\"alchemy\")) {\n try {\n providers.push(new provider_alchemy_js_1.AlchemyProvider(network, options.alchemy));\n } catch (error) {\n }\n }\n if (allowService(\"ankr\") && options.ankr != null) {\n try {\n providers.push(new provider_ankr_js_1.AnkrProvider(network, options.ankr));\n } catch (error) {\n }\n }\n if (allowService(\"chainstack\")) {\n try {\n providers.push(new provider_chainstack_js_1.ChainstackProvider(network, options.chainstack));\n } catch (error) {\n }\n }\n if (allowService(\"cloudflare\")) {\n try {\n providers.push(new provider_cloudflare_js_1.CloudflareProvider(network));\n } catch (error) {\n }\n }\n if (allowService(\"etherscan\")) {\n try {\n providers.push(new provider_etherscan_js_1.EtherscanProvider(network, options.etherscan));\n } catch (error) {\n }\n }\n if (allowService(\"infura\")) {\n try {\n let projectId = options.infura;\n let projectSecret = void 0;\n if (typeof projectId === \"object\") {\n projectSecret = projectId.projectSecret;\n projectId = projectId.projectId;\n }\n providers.push(new provider_infura_js_1.InfuraProvider(network, projectId, projectSecret));\n } catch (error) {\n }\n }\n if (allowService(\"quicknode\")) {\n try {\n let token = options.quicknode;\n providers.push(new provider_quicknode_js_1.QuickNodeProvider(network, token));\n } catch (error) {\n }\n }\n (0, index_js_1.assert)(providers.length, \"unsupported default network\", \"UNSUPPORTED_OPERATION\", {\n operation: \"getDefaultProvider\"\n });\n if (providers.length === 1) {\n return providers[0];\n }\n let quorum = Math.floor(providers.length / 2);\n if (quorum > 2) {\n quorum = 2;\n }\n if (staticNetwork && Testnets.indexOf(staticNetwork.name) !== -1) {\n quorum = 1;\n }\n if (options && options.quorum) {\n quorum = options.quorum;\n }\n return new provider_fallback_js_1.FallbackProvider(providers, void 0, { quorum });\n }\n exports3.getDefaultProvider = getDefaultProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/signer-noncemanager.js\n var require_signer_noncemanager = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/signer-noncemanager.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.NonceManager = void 0;\n var index_js_1 = require_utils13();\n var abstract_signer_js_1 = require_abstract_signer();\n var NonceManager = class _NonceManager extends abstract_signer_js_1.AbstractSigner {\n /**\n * The Signer being managed.\n */\n signer;\n #noncePromise;\n #delta;\n /**\n * Creates a new **NonceManager** to manage %%signer%%.\n */\n constructor(signer) {\n super(signer.provider);\n (0, index_js_1.defineProperties)(this, { signer });\n this.#noncePromise = null;\n this.#delta = 0;\n }\n async getAddress() {\n return this.signer.getAddress();\n }\n connect(provider) {\n return new _NonceManager(this.signer.connect(provider));\n }\n async getNonce(blockTag) {\n if (blockTag === \"pending\") {\n if (this.#noncePromise == null) {\n this.#noncePromise = super.getNonce(\"pending\");\n }\n const delta = this.#delta;\n return await this.#noncePromise + delta;\n }\n return super.getNonce(blockTag);\n }\n /**\n * Manually increment the nonce. This may be useful when managng\n * offline transactions.\n */\n increment() {\n this.#delta++;\n }\n /**\n * Resets the nonce, causing the **NonceManager** to reload the current\n * nonce from the blockchain on the next transaction.\n */\n reset() {\n this.#delta = 0;\n this.#noncePromise = null;\n }\n async sendTransaction(tx) {\n const noncePromise = this.getNonce(\"pending\");\n this.increment();\n tx = await this.signer.populateTransaction(tx);\n tx.nonce = await noncePromise;\n return await this.signer.sendTransaction(tx);\n }\n signTransaction(tx) {\n return this.signer.signTransaction(tx);\n }\n signMessage(message2) {\n return this.signer.signMessage(message2);\n }\n signTypedData(domain2, types2, value) {\n return this.signer.signTypedData(domain2, types2, value);\n }\n };\n exports3.NonceManager = NonceManager;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-browser.js\n var require_provider_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BrowserProvider = void 0;\n var index_js_1 = require_utils13();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var BrowserProvider = class _BrowserProvider extends provider_jsonrpc_js_1.JsonRpcApiPollingProvider {\n #request;\n #providerInfo;\n /**\n * Connect to the %%ethereum%% provider, optionally forcing the\n * %%network%%.\n */\n constructor(ethereum, network, _options) {\n const options = Object.assign({}, _options != null ? _options : {}, { batchMaxCount: 1 });\n (0, index_js_1.assertArgument)(ethereum && ethereum.request, \"invalid EIP-1193 provider\", \"ethereum\", ethereum);\n super(network, options);\n this.#providerInfo = null;\n if (_options && _options.providerInfo) {\n this.#providerInfo = _options.providerInfo;\n }\n this.#request = async (method, params) => {\n const payload = { method, params };\n this.emit(\"debug\", { action: \"sendEip1193Request\", payload });\n try {\n const result = await ethereum.request(payload);\n this.emit(\"debug\", { action: \"receiveEip1193Result\", result });\n return result;\n } catch (e2) {\n const error = new Error(e2.message);\n error.code = e2.code;\n error.data = e2.data;\n error.payload = payload;\n this.emit(\"debug\", { action: \"receiveEip1193Error\", error });\n throw error;\n }\n };\n }\n get providerInfo() {\n return this.#providerInfo;\n }\n async send(method, params) {\n await this._start();\n return await super.send(method, params);\n }\n async _send(payload) {\n (0, index_js_1.assertArgument)(!Array.isArray(payload), \"EIP-1193 does not support batch request\", \"payload\", payload);\n try {\n const result = await this.#request(payload.method, payload.params || []);\n return [{ id: payload.id, result }];\n } catch (e2) {\n return [{\n id: payload.id,\n error: { code: e2.code, data: e2.data, message: e2.message }\n }];\n }\n }\n getRpcError(payload, error) {\n error = JSON.parse(JSON.stringify(error));\n switch (error.error.code || -1) {\n case 4001:\n error.error.message = `ethers-user-denied: ${error.error.message}`;\n break;\n case 4200:\n error.error.message = `ethers-unsupported: ${error.error.message}`;\n break;\n }\n return super.getRpcError(payload, error);\n }\n /**\n * Resolves to ``true`` if the provider manages the %%address%%.\n */\n async hasSigner(address) {\n if (address == null) {\n address = 0;\n }\n const accounts = await this.send(\"eth_accounts\", []);\n if (typeof address === \"number\") {\n return accounts.length > address;\n }\n address = address.toLowerCase();\n return accounts.filter((a3) => a3.toLowerCase() === address).length !== 0;\n }\n async getSigner(address) {\n if (address == null) {\n address = 0;\n }\n if (!await this.hasSigner(address)) {\n try {\n await this.#request(\"eth_requestAccounts\", []);\n } catch (error) {\n const payload = error.payload;\n throw this.getRpcError(payload, { id: payload.id, error });\n }\n }\n return await super.getSigner(address);\n }\n /**\n * Discover and connect to a Provider in the Browser using the\n * [[link-eip-6963]] discovery mechanism. If no providers are\n * present, ``null`` is resolved.\n */\n static async discover(options) {\n if (options == null) {\n options = {};\n }\n if (options.provider) {\n return new _BrowserProvider(options.provider);\n }\n const context2 = options.window ? options.window : typeof window !== \"undefined\" ? window : null;\n if (context2 == null) {\n return null;\n }\n const anyProvider = options.anyProvider;\n if (anyProvider && context2.ethereum) {\n return new _BrowserProvider(context2.ethereum);\n }\n if (!(\"addEventListener\" in context2 && \"dispatchEvent\" in context2 && \"removeEventListener\" in context2)) {\n return null;\n }\n const timeout = options.timeout ? options.timeout : 300;\n if (timeout === 0) {\n return null;\n }\n return await new Promise((resolve, reject) => {\n let found = [];\n const addProvider = (event) => {\n found.push(event.detail);\n if (anyProvider) {\n finalize();\n }\n };\n const finalize = () => {\n clearTimeout(timer);\n if (found.length) {\n if (options && options.filter) {\n const filtered = options.filter(found.map((i3) => Object.assign({}, i3.info)));\n if (filtered == null) {\n resolve(null);\n } else if (filtered instanceof _BrowserProvider) {\n resolve(filtered);\n } else {\n let match = null;\n if (filtered.uuid) {\n const matches = found.filter((f7) => filtered.uuid === f7.info.uuid);\n match = matches[0];\n }\n if (match) {\n const { provider, info } = match;\n resolve(new _BrowserProvider(provider, void 0, {\n providerInfo: info\n }));\n } else {\n reject((0, index_js_1.makeError)(\"filter returned unknown info\", \"UNSUPPORTED_OPERATION\", {\n value: filtered\n }));\n }\n }\n } else {\n const { provider, info } = found[0];\n resolve(new _BrowserProvider(provider, void 0, {\n providerInfo: info\n }));\n }\n } else {\n resolve(null);\n }\n context2.removeEventListener(\"eip6963:announceProvider\", addProvider);\n };\n const timer = setTimeout(() => {\n finalize();\n }, timeout);\n context2.addEventListener(\"eip6963:announceProvider\", addProvider);\n context2.dispatchEvent(new Event(\"eip6963:requestProvider\"));\n });\n }\n };\n exports3.BrowserProvider = BrowserProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-blockscout.js\n var require_provider_blockscout = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-blockscout.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BlockscoutProvider = void 0;\n var index_js_1 = require_utils13();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n function getUrl2(name) {\n switch (name) {\n case \"mainnet\":\n return \"https://eth.blockscout.com/api/eth-rpc\";\n case \"sepolia\":\n return \"https://eth-sepolia.blockscout.com/api/eth-rpc\";\n case \"holesky\":\n return \"https://eth-holesky.blockscout.com/api/eth-rpc\";\n case \"classic\":\n return \"https://etc.blockscout.com/api/eth-rpc\";\n case \"arbitrum\":\n return \"https://arbitrum.blockscout.com/api/eth-rpc\";\n case \"base\":\n return \"https://base.blockscout.com/api/eth-rpc\";\n case \"base-sepolia\":\n return \"https://base-sepolia.blockscout.com/api/eth-rpc\";\n case \"matic\":\n return \"https://polygon.blockscout.com/api/eth-rpc\";\n case \"optimism\":\n return \"https://optimism.blockscout.com/api/eth-rpc\";\n case \"optimism-sepolia\":\n return \"https://optimism-sepolia.blockscout.com/api/eth-rpc\";\n case \"xdai\":\n return \"https://gnosis.blockscout.com/api/eth-rpc\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var BlockscoutProvider = class _BlockscoutProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The API key.\n */\n apiKey;\n /**\n * Creates a new **BlockscoutProvider**.\n */\n constructor(_network, apiKey) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (apiKey == null) {\n apiKey = null;\n }\n const request = _BlockscoutProvider.getRequest(network);\n super(request, network, { staticNetwork: network });\n (0, index_js_1.defineProperties)(this, { apiKey });\n }\n _getProvider(chainId) {\n try {\n return new _BlockscoutProvider(chainId, this.apiKey);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n isCommunityResource() {\n return this.apiKey === null;\n }\n getRpcRequest(req) {\n const resp = super.getRpcRequest(req);\n if (resp && resp.method === \"eth_estimateGas\" && resp.args.length == 1) {\n resp.args = resp.args.slice();\n resp.args.push(\"latest\");\n }\n return resp;\n }\n getRpcError(payload, _error) {\n const error = _error ? _error.error : null;\n if (error && error.code === -32015 && !(0, index_js_1.isHexString)(error.data || \"\", true)) {\n const panicCodes = {\n \"assert(false)\": \"01\",\n \"arithmetic underflow or overflow\": \"11\",\n \"division or modulo by zero\": \"12\",\n \"out-of-bounds array access; popping on an empty array\": \"31\",\n \"out-of-bounds access of an array or bytesN\": \"32\"\n };\n let panicCode = \"\";\n if (error.message === \"VM execution error.\") {\n panicCode = panicCodes[error.data] || \"\";\n } else if (panicCodes[error.message || \"\"]) {\n panicCode = panicCodes[error.message || \"\"];\n }\n if (panicCode) {\n error.message += ` (reverted: ${error.data})`;\n error.data = \"0x4e487b7100000000000000000000000000000000000000000000000000000000000000\" + panicCode;\n }\n } else if (error && error.code === -32e3) {\n if (error.message === \"wrong transaction nonce\") {\n error.message += \" (nonce too low)\";\n }\n }\n return super.getRpcError(payload, _error);\n }\n /**\n * Returns a prepared request for connecting to %%network%%\n * with %%apiKey%%.\n */\n static getRequest(network) {\n const request = new index_js_1.FetchRequest(getUrl2(network.name));\n request.allowGzip = true;\n return request;\n }\n };\n exports3.BlockscoutProvider = BlockscoutProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-pocket.js\n var require_provider_pocket = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-pocket.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PocketProvider = void 0;\n var index_js_1 = require_utils13();\n var community_js_1 = require_community();\n var network_js_1 = require_network();\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n var defaultApplicationId = \"62e1ad51b37b8e00394bda3b\";\n function getHost(name) {\n switch (name) {\n case \"mainnet\":\n return \"eth-mainnet.gateway.pokt.network\";\n case \"goerli\":\n return \"eth-goerli.gateway.pokt.network\";\n case \"matic\":\n return \"poly-mainnet.gateway.pokt.network\";\n case \"matic-mumbai\":\n return \"polygon-mumbai-rpc.gateway.pokt.network\";\n }\n (0, index_js_1.assertArgument)(false, \"unsupported network\", \"network\", name);\n }\n var PocketProvider = class _PocketProvider extends provider_jsonrpc_js_1.JsonRpcProvider {\n /**\n * The Application ID for the Pocket connection.\n */\n applicationId;\n /**\n * The Application Secret for making authenticated requests\n * to the Pocket connection.\n */\n applicationSecret;\n /**\n * Create a new **PocketProvider**.\n *\n * By default connecting to ``mainnet`` with a highly throttled\n * API key.\n */\n constructor(_network, applicationId, applicationSecret) {\n if (_network == null) {\n _network = \"mainnet\";\n }\n const network = network_js_1.Network.from(_network);\n if (applicationId == null) {\n applicationId = defaultApplicationId;\n }\n if (applicationSecret == null) {\n applicationSecret = null;\n }\n const options = { staticNetwork: network };\n const request = _PocketProvider.getRequest(network, applicationId, applicationSecret);\n super(request, network, options);\n (0, index_js_1.defineProperties)(this, { applicationId, applicationSecret });\n }\n _getProvider(chainId) {\n try {\n return new _PocketProvider(chainId, this.applicationId, this.applicationSecret);\n } catch (error) {\n }\n return super._getProvider(chainId);\n }\n /**\n * Returns a prepared request for connecting to %%network%% with\n * %%applicationId%%.\n */\n static getRequest(network, applicationId, applicationSecret) {\n if (applicationId == null) {\n applicationId = defaultApplicationId;\n }\n const request = new index_js_1.FetchRequest(`https://${getHost(network.name)}/v1/lb/${applicationId}`);\n request.allowGzip = true;\n if (applicationSecret) {\n request.setCredentials(\"\", applicationSecret);\n }\n if (applicationId === defaultApplicationId) {\n request.retryFunc = async (request2, response, attempt) => {\n (0, community_js_1.showThrottleMessage)(\"PocketProvider\");\n return true;\n };\n }\n return request;\n }\n isCommunityResource() {\n return this.applicationId === defaultApplicationId;\n }\n };\n exports3.PocketProvider = PocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-ipcsocket-browser.js\n var require_provider_ipcsocket_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/provider-ipcsocket-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.IpcSocketProvider = void 0;\n var IpcSocketProvider = void 0;\n exports3.IpcSocketProvider = IpcSocketProvider;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/index.js\n var require_providers = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/providers/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SocketEventSubscriber = exports3.SocketPendingSubscriber = exports3.SocketBlockSubscriber = exports3.SocketSubscriber = exports3.WebSocketProvider = exports3.SocketProvider = exports3.IpcSocketProvider = exports3.QuickNodeProvider = exports3.PocketProvider = exports3.InfuraWebSocketProvider = exports3.InfuraProvider = exports3.EtherscanPlugin = exports3.EtherscanProvider = exports3.ChainstackProvider = exports3.CloudflareProvider = exports3.AnkrProvider = exports3.BlockscoutProvider = exports3.AlchemyProvider = exports3.BrowserProvider = exports3.JsonRpcSigner = exports3.JsonRpcProvider = exports3.JsonRpcApiProvider = exports3.FallbackProvider = exports3.copyRequest = exports3.TransactionResponse = exports3.TransactionReceipt = exports3.Log = exports3.FeeData = exports3.Block = exports3.FetchUrlFeeDataNetworkPlugin = exports3.FeeDataNetworkPlugin = exports3.EnsPlugin = exports3.GasCostPlugin = exports3.NetworkPlugin = exports3.NonceManager = exports3.Network = exports3.MulticoinProviderPlugin = exports3.EnsResolver = exports3.getDefaultProvider = exports3.showThrottleMessage = exports3.VoidSigner = exports3.AbstractSigner = exports3.UnmanagedSubscriber = exports3.AbstractProvider = void 0;\n var abstract_provider_js_1 = require_abstract_provider();\n Object.defineProperty(exports3, \"AbstractProvider\", { enumerable: true, get: function() {\n return abstract_provider_js_1.AbstractProvider;\n } });\n Object.defineProperty(exports3, \"UnmanagedSubscriber\", { enumerable: true, get: function() {\n return abstract_provider_js_1.UnmanagedSubscriber;\n } });\n var abstract_signer_js_1 = require_abstract_signer();\n Object.defineProperty(exports3, \"AbstractSigner\", { enumerable: true, get: function() {\n return abstract_signer_js_1.AbstractSigner;\n } });\n Object.defineProperty(exports3, \"VoidSigner\", { enumerable: true, get: function() {\n return abstract_signer_js_1.VoidSigner;\n } });\n var community_js_1 = require_community();\n Object.defineProperty(exports3, \"showThrottleMessage\", { enumerable: true, get: function() {\n return community_js_1.showThrottleMessage;\n } });\n var default_provider_js_1 = require_default_provider();\n Object.defineProperty(exports3, \"getDefaultProvider\", { enumerable: true, get: function() {\n return default_provider_js_1.getDefaultProvider;\n } });\n var ens_resolver_js_1 = require_ens_resolver();\n Object.defineProperty(exports3, \"EnsResolver\", { enumerable: true, get: function() {\n return ens_resolver_js_1.EnsResolver;\n } });\n Object.defineProperty(exports3, \"MulticoinProviderPlugin\", { enumerable: true, get: function() {\n return ens_resolver_js_1.MulticoinProviderPlugin;\n } });\n var network_js_1 = require_network();\n Object.defineProperty(exports3, \"Network\", { enumerable: true, get: function() {\n return network_js_1.Network;\n } });\n var signer_noncemanager_js_1 = require_signer_noncemanager();\n Object.defineProperty(exports3, \"NonceManager\", { enumerable: true, get: function() {\n return signer_noncemanager_js_1.NonceManager;\n } });\n var plugins_network_js_1 = require_plugins_network();\n Object.defineProperty(exports3, \"NetworkPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.NetworkPlugin;\n } });\n Object.defineProperty(exports3, \"GasCostPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.GasCostPlugin;\n } });\n Object.defineProperty(exports3, \"EnsPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.EnsPlugin;\n } });\n Object.defineProperty(exports3, \"FeeDataNetworkPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.FeeDataNetworkPlugin;\n } });\n Object.defineProperty(exports3, \"FetchUrlFeeDataNetworkPlugin\", { enumerable: true, get: function() {\n return plugins_network_js_1.FetchUrlFeeDataNetworkPlugin;\n } });\n var provider_js_1 = require_provider();\n Object.defineProperty(exports3, \"Block\", { enumerable: true, get: function() {\n return provider_js_1.Block;\n } });\n Object.defineProperty(exports3, \"FeeData\", { enumerable: true, get: function() {\n return provider_js_1.FeeData;\n } });\n Object.defineProperty(exports3, \"Log\", { enumerable: true, get: function() {\n return provider_js_1.Log;\n } });\n Object.defineProperty(exports3, \"TransactionReceipt\", { enumerable: true, get: function() {\n return provider_js_1.TransactionReceipt;\n } });\n Object.defineProperty(exports3, \"TransactionResponse\", { enumerable: true, get: function() {\n return provider_js_1.TransactionResponse;\n } });\n Object.defineProperty(exports3, \"copyRequest\", { enumerable: true, get: function() {\n return provider_js_1.copyRequest;\n } });\n var provider_fallback_js_1 = require_provider_fallback();\n Object.defineProperty(exports3, \"FallbackProvider\", { enumerable: true, get: function() {\n return provider_fallback_js_1.FallbackProvider;\n } });\n var provider_jsonrpc_js_1 = require_provider_jsonrpc();\n Object.defineProperty(exports3, \"JsonRpcApiProvider\", { enumerable: true, get: function() {\n return provider_jsonrpc_js_1.JsonRpcApiProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcProvider\", { enumerable: true, get: function() {\n return provider_jsonrpc_js_1.JsonRpcProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcSigner\", { enumerable: true, get: function() {\n return provider_jsonrpc_js_1.JsonRpcSigner;\n } });\n var provider_browser_js_1 = require_provider_browser();\n Object.defineProperty(exports3, \"BrowserProvider\", { enumerable: true, get: function() {\n return provider_browser_js_1.BrowserProvider;\n } });\n var provider_alchemy_js_1 = require_provider_alchemy();\n Object.defineProperty(exports3, \"AlchemyProvider\", { enumerable: true, get: function() {\n return provider_alchemy_js_1.AlchemyProvider;\n } });\n var provider_blockscout_js_1 = require_provider_blockscout();\n Object.defineProperty(exports3, \"BlockscoutProvider\", { enumerable: true, get: function() {\n return provider_blockscout_js_1.BlockscoutProvider;\n } });\n var provider_ankr_js_1 = require_provider_ankr();\n Object.defineProperty(exports3, \"AnkrProvider\", { enumerable: true, get: function() {\n return provider_ankr_js_1.AnkrProvider;\n } });\n var provider_cloudflare_js_1 = require_provider_cloudflare();\n Object.defineProperty(exports3, \"CloudflareProvider\", { enumerable: true, get: function() {\n return provider_cloudflare_js_1.CloudflareProvider;\n } });\n var provider_chainstack_js_1 = require_provider_chainstack();\n Object.defineProperty(exports3, \"ChainstackProvider\", { enumerable: true, get: function() {\n return provider_chainstack_js_1.ChainstackProvider;\n } });\n var provider_etherscan_js_1 = require_provider_etherscan();\n Object.defineProperty(exports3, \"EtherscanProvider\", { enumerable: true, get: function() {\n return provider_etherscan_js_1.EtherscanProvider;\n } });\n Object.defineProperty(exports3, \"EtherscanPlugin\", { enumerable: true, get: function() {\n return provider_etherscan_js_1.EtherscanPlugin;\n } });\n var provider_infura_js_1 = require_provider_infura();\n Object.defineProperty(exports3, \"InfuraProvider\", { enumerable: true, get: function() {\n return provider_infura_js_1.InfuraProvider;\n } });\n Object.defineProperty(exports3, \"InfuraWebSocketProvider\", { enumerable: true, get: function() {\n return provider_infura_js_1.InfuraWebSocketProvider;\n } });\n var provider_pocket_js_1 = require_provider_pocket();\n Object.defineProperty(exports3, \"PocketProvider\", { enumerable: true, get: function() {\n return provider_pocket_js_1.PocketProvider;\n } });\n var provider_quicknode_js_1 = require_provider_quicknode();\n Object.defineProperty(exports3, \"QuickNodeProvider\", { enumerable: true, get: function() {\n return provider_quicknode_js_1.QuickNodeProvider;\n } });\n var provider_ipcsocket_js_1 = require_provider_ipcsocket_browser();\n Object.defineProperty(exports3, \"IpcSocketProvider\", { enumerable: true, get: function() {\n return provider_ipcsocket_js_1.IpcSocketProvider;\n } });\n var provider_socket_js_1 = require_provider_socket();\n Object.defineProperty(exports3, \"SocketProvider\", { enumerable: true, get: function() {\n return provider_socket_js_1.SocketProvider;\n } });\n var provider_websocket_js_1 = require_provider_websocket();\n Object.defineProperty(exports3, \"WebSocketProvider\", { enumerable: true, get: function() {\n return provider_websocket_js_1.WebSocketProvider;\n } });\n var provider_socket_js_2 = require_provider_socket();\n Object.defineProperty(exports3, \"SocketSubscriber\", { enumerable: true, get: function() {\n return provider_socket_js_2.SocketSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketBlockSubscriber\", { enumerable: true, get: function() {\n return provider_socket_js_2.SocketBlockSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketPendingSubscriber\", { enumerable: true, get: function() {\n return provider_socket_js_2.SocketPendingSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketEventSubscriber\", { enumerable: true, get: function() {\n return provider_socket_js_2.SocketEventSubscriber;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/base-wallet.js\n var require_base_wallet = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/base-wallet.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.BaseWallet = void 0;\n var index_js_1 = require_address3();\n var index_js_2 = require_hash2();\n var index_js_3 = require_providers();\n var index_js_4 = require_transaction2();\n var index_js_5 = require_utils13();\n var BaseWallet = class _BaseWallet extends index_js_3.AbstractSigner {\n /**\n * The wallet address.\n */\n address;\n #signingKey;\n /**\n * Creates a new BaseWallet for %%privateKey%%, optionally\n * connected to %%provider%%.\n *\n * If %%provider%% is not specified, only offline methods can\n * be used.\n */\n constructor(privateKey, provider) {\n super(provider);\n (0, index_js_5.assertArgument)(privateKey && typeof privateKey.sign === \"function\", \"invalid private key\", \"privateKey\", \"[ REDACTED ]\");\n this.#signingKey = privateKey;\n const address = (0, index_js_4.computeAddress)(this.signingKey.publicKey);\n (0, index_js_5.defineProperties)(this, { address });\n }\n // Store private values behind getters to reduce visibility\n // in console.log\n /**\n * The [[SigningKey]] used for signing payloads.\n */\n get signingKey() {\n return this.#signingKey;\n }\n /**\n * The private key for this wallet.\n */\n get privateKey() {\n return this.signingKey.privateKey;\n }\n async getAddress() {\n return this.address;\n }\n connect(provider) {\n return new _BaseWallet(this.#signingKey, provider);\n }\n async signTransaction(tx) {\n tx = (0, index_js_3.copyRequest)(tx);\n const { to, from: from14 } = await (0, index_js_5.resolveProperties)({\n to: tx.to ? (0, index_js_1.resolveAddress)(tx.to, this) : void 0,\n from: tx.from ? (0, index_js_1.resolveAddress)(tx.from, this) : void 0\n });\n if (to != null) {\n tx.to = to;\n }\n if (from14 != null) {\n tx.from = from14;\n }\n if (tx.from != null) {\n (0, index_js_5.assertArgument)((0, index_js_1.getAddress)(tx.from) === this.address, \"transaction from address mismatch\", \"tx.from\", tx.from);\n delete tx.from;\n }\n const btx = index_js_4.Transaction.from(tx);\n btx.signature = this.signingKey.sign(btx.unsignedHash);\n return btx.serialized;\n }\n async signMessage(message2) {\n return this.signMessageSync(message2);\n }\n // @TODO: Add a secialized signTx and signTyped sync that enforces\n // all parameters are known?\n /**\n * Returns the signature for %%message%% signed with this wallet.\n */\n signMessageSync(message2) {\n return this.signingKey.sign((0, index_js_2.hashMessage)(message2)).serialized;\n }\n /**\n * Returns the Authorization for %%auth%%.\n */\n authorizeSync(auth) {\n (0, index_js_5.assertArgument)(typeof auth.address === \"string\", \"invalid address for authorizeSync\", \"auth.address\", auth);\n const signature = this.signingKey.sign((0, index_js_2.hashAuthorization)(auth));\n return Object.assign({}, {\n address: (0, index_js_1.getAddress)(auth.address),\n nonce: (0, index_js_5.getBigInt)(auth.nonce || 0),\n chainId: (0, index_js_5.getBigInt)(auth.chainId || 0)\n }, { signature });\n }\n /**\n * Resolves to the Authorization for %%auth%%.\n */\n async authorize(auth) {\n auth = Object.assign({}, auth, {\n address: await (0, index_js_1.resolveAddress)(auth.address, this)\n });\n return this.authorizeSync(await this.populateAuthorization(auth));\n }\n async signTypedData(domain2, types2, value) {\n const populated = await index_js_2.TypedDataEncoder.resolveNames(domain2, types2, value, async (name) => {\n (0, index_js_5.assert)(this.provider != null, \"cannot resolve ENS names without a provider\", \"UNSUPPORTED_OPERATION\", {\n operation: \"resolveName\",\n info: { name }\n });\n const address = await this.provider.resolveName(name);\n (0, index_js_5.assert)(address != null, \"unconfigured ENS name\", \"UNCONFIGURED_NAME\", {\n value: name\n });\n return address;\n });\n return this.signingKey.sign(index_js_2.TypedDataEncoder.hash(populated.domain, types2, populated.value)).serialized;\n }\n };\n exports3.BaseWallet = BaseWallet;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/decode-owl.js\n var require_decode_owl = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/decode-owl.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeOwl = exports3.decode = void 0;\n var index_js_1 = require_utils13();\n var subsChrs = \" !#$%&'()*+,-./<=>?@[]^_`{|}~\";\n var Word = /^[a-z]*$/i;\n function unfold(words, sep) {\n let initial = 97;\n return words.reduce((accum, word) => {\n if (word === sep) {\n initial++;\n } else if (word.match(Word)) {\n accum.push(String.fromCharCode(initial) + word);\n } else {\n initial = 97;\n accum.push(word);\n }\n return accum;\n }, []);\n }\n function decode4(data, subs) {\n for (let i3 = subsChrs.length - 1; i3 >= 0; i3--) {\n data = data.split(subsChrs[i3]).join(subs.substring(2 * i3, 2 * i3 + 2));\n }\n const clumps = [];\n const leftover = data.replace(/(:|([0-9])|([A-Z][a-z]*))/g, (all, item, semi, word) => {\n if (semi) {\n for (let i3 = parseInt(semi); i3 >= 0; i3--) {\n clumps.push(\";\");\n }\n } else {\n clumps.push(item.toLowerCase());\n }\n return \"\";\n });\n if (leftover) {\n throw new Error(`leftovers: ${JSON.stringify(leftover)}`);\n }\n return unfold(unfold(clumps, \";\"), \":\");\n }\n exports3.decode = decode4;\n function decodeOwl(data) {\n (0, index_js_1.assertArgument)(data[0] === \"0\", \"unsupported auwl data\", \"data\", data);\n return decode4(data.substring(1 + 2 * subsChrs.length), data.substring(1, 1 + 2 * subsChrs.length));\n }\n exports3.decodeOwl = decodeOwl;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist.js\n var require_wordlist2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wordlist = void 0;\n var index_js_1 = require_utils13();\n var Wordlist = class {\n locale;\n /**\n * Creates a new Wordlist instance.\n *\n * Sub-classes MUST call this if they provide their own constructor,\n * passing in the locale string of the language.\n *\n * Generally there is no need to create instances of a Wordlist,\n * since each language-specific Wordlist creates an instance and\n * there is no state kept internally, so they are safe to share.\n */\n constructor(locale) {\n (0, index_js_1.defineProperties)(this, { locale });\n }\n /**\n * Sub-classes may override this to provide a language-specific\n * method for spliting %%phrase%% into individual words.\n *\n * By default, %%phrase%% is split using any sequences of\n * white-space as defined by regular expressions (i.e. ``/\\s+/``).\n */\n split(phrase) {\n return phrase.toLowerCase().split(/\\s+/g);\n }\n /**\n * Sub-classes may override this to provider a language-specific\n * method for joining %%words%% into a phrase.\n *\n * By default, %%words%% are joined by a single space.\n */\n join(words) {\n return words.join(\" \");\n }\n };\n exports3.Wordlist = Wordlist;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist-owl.js\n var require_wordlist_owl = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist-owl.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WordlistOwl = void 0;\n var index_js_1 = require_hash2();\n var index_js_2 = require_utils13();\n var decode_owl_js_1 = require_decode_owl();\n var wordlist_js_1 = require_wordlist2();\n var WordlistOwl = class extends wordlist_js_1.Wordlist {\n #data;\n #checksum;\n /**\n * Creates a new Wordlist for %%locale%% using the OWL %%data%%\n * and validated against the %%checksum%%.\n */\n constructor(locale, data, checksum4) {\n super(locale);\n this.#data = data;\n this.#checksum = checksum4;\n this.#words = null;\n }\n /**\n * The OWL-encoded data.\n */\n get _data() {\n return this.#data;\n }\n /**\n * Decode all the words for the wordlist.\n */\n _decodeWords() {\n return (0, decode_owl_js_1.decodeOwl)(this.#data);\n }\n #words;\n #loadWords() {\n if (this.#words == null) {\n const words = this._decodeWords();\n const checksum4 = (0, index_js_1.id)(words.join(\"\\n\") + \"\\n\");\n if (checksum4 !== this.#checksum) {\n throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);\n }\n this.#words = words;\n }\n return this.#words;\n }\n getWord(index2) {\n const words = this.#loadWords();\n (0, index_js_2.assertArgument)(index2 >= 0 && index2 < words.length, `invalid word index: ${index2}`, \"index\", index2);\n return words[index2];\n }\n getWordIndex(word) {\n return this.#loadWords().indexOf(word);\n }\n };\n exports3.WordlistOwl = WordlistOwl;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/lang-en.js\n var require_lang_en2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/lang-en.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LangEn = void 0;\n var wordlist_owl_js_1 = require_wordlist_owl();\n var words = \"0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-EgSe0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-PM&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryFN Noc|PutQuirySSue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurEAyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOgAyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NNGradeHoldOnP Set1BOng::Rd3Ar~ow9UUngU`:3BraRo9NeO\";\n var checksum4 = \"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60\";\n var wordlist = null;\n var LangEn = class _LangEn extends wordlist_owl_js_1.WordlistOwl {\n /**\n * Creates a new instance of the English language Wordlist.\n *\n * This should be unnecessary most of the time as the exported\n * [[langEn]] should suffice.\n *\n * @_ignore:\n */\n constructor() {\n super(\"en\", words, checksum4);\n }\n /**\n * Returns a singleton instance of a ``LangEn``, creating it\n * if this is the first time being called.\n */\n static wordlist() {\n if (wordlist == null) {\n wordlist = new _LangEn();\n }\n return wordlist;\n }\n };\n exports3.LangEn = LangEn;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/mnemonic.js\n var require_mnemonic = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/mnemonic.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Mnemonic = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils13();\n var lang_en_js_1 = require_lang_en2();\n function getUpperMask(bits) {\n return (1 << bits) - 1 << 8 - bits & 255;\n }\n function getLowerMask(bits) {\n return (1 << bits) - 1 & 255;\n }\n function mnemonicToEntropy(mnemonic, wordlist) {\n (0, index_js_2.assertNormalize)(\"NFKD\");\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n const words = wordlist.split(mnemonic);\n (0, index_js_2.assertArgument)(words.length % 3 === 0 && words.length >= 12 && words.length <= 24, \"invalid mnemonic length\", \"mnemonic\", \"[ REDACTED ]\");\n const entropy = new Uint8Array(Math.ceil(11 * words.length / 8));\n let offset = 0;\n for (let i3 = 0; i3 < words.length; i3++) {\n let index2 = wordlist.getWordIndex(words[i3].normalize(\"NFKD\"));\n (0, index_js_2.assertArgument)(index2 >= 0, `invalid mnemonic word at index ${i3}`, \"mnemonic\", \"[ REDACTED ]\");\n for (let bit = 0; bit < 11; bit++) {\n if (index2 & 1 << 10 - bit) {\n entropy[offset >> 3] |= 1 << 7 - offset % 8;\n }\n offset++;\n }\n }\n const entropyBits = 32 * words.length / 3;\n const checksumBits = words.length / 3;\n const checksumMask = getUpperMask(checksumBits);\n const checksum4 = (0, index_js_2.getBytes)((0, index_js_1.sha256)(entropy.slice(0, entropyBits / 8)))[0] & checksumMask;\n (0, index_js_2.assertArgument)(checksum4 === (entropy[entropy.length - 1] & checksumMask), \"invalid mnemonic checksum\", \"mnemonic\", \"[ REDACTED ]\");\n return (0, index_js_2.hexlify)(entropy.slice(0, entropyBits / 8));\n }\n function entropyToMnemonic(entropy, wordlist) {\n (0, index_js_2.assertArgument)(entropy.length % 4 === 0 && entropy.length >= 16 && entropy.length <= 32, \"invalid entropy size\", \"entropy\", \"[ REDACTED ]\");\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n const indices = [0];\n let remainingBits = 11;\n for (let i3 = 0; i3 < entropy.length; i3++) {\n if (remainingBits > 8) {\n indices[indices.length - 1] <<= 8;\n indices[indices.length - 1] |= entropy[i3];\n remainingBits -= 8;\n } else {\n indices[indices.length - 1] <<= remainingBits;\n indices[indices.length - 1] |= entropy[i3] >> 8 - remainingBits;\n indices.push(entropy[i3] & getLowerMask(8 - remainingBits));\n remainingBits += 3;\n }\n }\n const checksumBits = entropy.length / 4;\n const checksum4 = parseInt((0, index_js_1.sha256)(entropy).substring(2, 4), 16) & getUpperMask(checksumBits);\n indices[indices.length - 1] <<= checksumBits;\n indices[indices.length - 1] |= checksum4 >> 8 - checksumBits;\n return wordlist.join(indices.map((index2) => wordlist.getWord(index2)));\n }\n var _guard = {};\n var Mnemonic = class _Mnemonic {\n /**\n * The mnemonic phrase of 12, 15, 18, 21 or 24 words.\n *\n * Use the [[wordlist]] ``split`` method to get the individual words.\n */\n phrase;\n /**\n * The password used for this mnemonic. If no password is used this\n * is the empty string (i.e. ``\"\"``) as per the specification.\n */\n password;\n /**\n * The wordlist for this mnemonic.\n */\n wordlist;\n /**\n * The underlying entropy which the mnemonic encodes.\n */\n entropy;\n /**\n * @private\n */\n constructor(guard, entropy, phrase, password, wordlist) {\n if (password == null) {\n password = \"\";\n }\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n (0, index_js_2.assertPrivate)(guard, _guard, \"Mnemonic\");\n (0, index_js_2.defineProperties)(this, { phrase, password, wordlist, entropy });\n }\n /**\n * Returns the seed for the mnemonic.\n */\n computeSeed() {\n const salt = (0, index_js_2.toUtf8Bytes)(\"mnemonic\" + this.password, \"NFKD\");\n return (0, index_js_1.pbkdf2)((0, index_js_2.toUtf8Bytes)(this.phrase, \"NFKD\"), salt, 2048, 64, \"sha512\");\n }\n /**\n * Creates a new Mnemonic for the %%phrase%%.\n *\n * The default %%password%% is the empty string and the default\n * wordlist is the [English wordlists](LangEn).\n */\n static fromPhrase(phrase, password, wordlist) {\n const entropy = mnemonicToEntropy(phrase, wordlist);\n phrase = entropyToMnemonic((0, index_js_2.getBytes)(entropy), wordlist);\n return new _Mnemonic(_guard, entropy, phrase, password, wordlist);\n }\n /**\n * Create a new **Mnemonic** from the %%entropy%%.\n *\n * The default %%password%% is the empty string and the default\n * wordlist is the [English wordlists](LangEn).\n */\n static fromEntropy(_entropy, password, wordlist) {\n const entropy = (0, index_js_2.getBytes)(_entropy, \"entropy\");\n const phrase = entropyToMnemonic(entropy, wordlist);\n return new _Mnemonic(_guard, (0, index_js_2.hexlify)(entropy), phrase, password, wordlist);\n }\n /**\n * Returns the phrase for %%mnemonic%%.\n */\n static entropyToPhrase(_entropy, wordlist) {\n const entropy = (0, index_js_2.getBytes)(_entropy, \"entropy\");\n return entropyToMnemonic(entropy, wordlist);\n }\n /**\n * Returns the entropy for %%phrase%%.\n */\n static phraseToEntropy(phrase, wordlist) {\n return mnemonicToEntropy(phrase, wordlist);\n }\n /**\n * Returns true if %%phrase%% is a valid [[link-bip-39]] phrase.\n *\n * This checks all the provided words belong to the %%wordlist%%,\n * that the length is valid and the checksum is correct.\n */\n static isValidMnemonic(phrase, wordlist) {\n try {\n mnemonicToEntropy(phrase, wordlist);\n return true;\n } catch (error) {\n }\n return false;\n }\n };\n exports3.Mnemonic = Mnemonic;\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/aes.js\n var require_aes = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/aes.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldGet4 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f7) {\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f7 : kind === \"a\" ? f7.call(receiver) : f7 ? f7.value : state.get(receiver);\n };\n var __classPrivateFieldSet4 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f7) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f7.call(receiver, value) : f7 ? f7.value = value : state.set(receiver, value), value;\n };\n var _AES_key;\n var _AES_Kd;\n var _AES_Ke;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.AES = void 0;\n var numberOfRounds = { 16: 10, 24: 12, 32: 14 };\n var rcon = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145];\n var S3 = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22];\n var Si = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125];\n var T1 = [3328402341, 4168907908, 4000806809, 4135287693, 4294111757, 3597364157, 3731845041, 2445657428, 1613770832, 33620227, 3462883241, 1445669757, 3892248089, 3050821474, 1303096294, 3967186586, 2412431941, 528646813, 2311702848, 4202528135, 4026202645, 2992200171, 2387036105, 4226871307, 1101901292, 3017069671, 1604494077, 1169141738, 597466303, 1403299063, 3832705686, 2613100635, 1974974402, 3791519004, 1033081774, 1277568618, 1815492186, 2118074177, 4126668546, 2211236943, 1748251740, 1369810420, 3521504564, 4193382664, 3799085459, 2883115123, 1647391059, 706024767, 134480908, 2512897874, 1176707941, 2646852446, 806885416, 932615841, 168101135, 798661301, 235341577, 605164086, 461406363, 3756188221, 3454790438, 1311188841, 2142417613, 3933566367, 302582043, 495158174, 1479289972, 874125870, 907746093, 3698224818, 3025820398, 1537253627, 2756858614, 1983593293, 3084310113, 2108928974, 1378429307, 3722699582, 1580150641, 327451799, 2790478837, 3117535592, 0, 3253595436, 1075847264, 3825007647, 2041688520, 3059440621, 3563743934, 2378943302, 1740553945, 1916352843, 2487896798, 2555137236, 2958579944, 2244988746, 3151024235, 3320835882, 1336584933, 3992714006, 2252555205, 2588757463, 1714631509, 293963156, 2319795663, 3925473552, 67240454, 4269768577, 2689618160, 2017213508, 631218106, 1269344483, 2723238387, 1571005438, 2151694528, 93294474, 1066570413, 563977660, 1882732616, 4059428100, 1673313503, 2008463041, 2950355573, 1109467491, 537923632, 3858759450, 4260623118, 3218264685, 2177748300, 403442708, 638784309, 3287084079, 3193921505, 899127202, 2286175436, 773265209, 2479146071, 1437050866, 4236148354, 2050833735, 3362022572, 3126681063, 840505643, 3866325909, 3227541664, 427917720, 2655997905, 2749160575, 1143087718, 1412049534, 999329963, 193497219, 2353415882, 3354324521, 1807268051, 672404540, 2816401017, 3160301282, 369822493, 2916866934, 3688947771, 1681011286, 1949973070, 336202270, 2454276571, 201721354, 1210328172, 3093060836, 2680341085, 3184776046, 1135389935, 3294782118, 965841320, 831886756, 3554993207, 4068047243, 3588745010, 2345191491, 1849112409, 3664604599, 26054028, 2983581028, 2622377682, 1235855840, 3630984372, 2891339514, 4092916743, 3488279077, 3395642799, 4101667470, 1202630377, 268961816, 1874508501, 4034427016, 1243948399, 1546530418, 941366308, 1470539505, 1941222599, 2546386513, 3421038627, 2715671932, 3899946140, 1042226977, 2521517021, 1639824860, 227249030, 260737669, 3765465232, 2084453954, 1907733956, 3429263018, 2420656344, 100860677, 4160157185, 470683154, 3261161891, 1781871967, 2924959737, 1773779408, 394692241, 2579611992, 974986535, 664706745, 3655459128, 3958962195, 731420851, 571543859, 3530123707, 2849626480, 126783113, 865375399, 765172662, 1008606754, 361203602, 3387549984, 2278477385, 2857719295, 1344809080, 2782912378, 59542671, 1503764984, 160008576, 437062935, 1707065306, 3622233649, 2218934982, 3496503480, 2185314755, 697932208, 1512910199, 504303377, 2075177163, 2824099068, 1841019862, 739644986];\n var T22 = [2781242211, 2230877308, 2582542199, 2381740923, 234877682, 3184946027, 2984144751, 1418839493, 1348481072, 50462977, 2848876391, 2102799147, 434634494, 1656084439, 3863849899, 2599188086, 1167051466, 2636087938, 1082771913, 2281340285, 368048890, 3954334041, 3381544775, 201060592, 3963727277, 1739838676, 4250903202, 3930435503, 3206782108, 4149453988, 2531553906, 1536934080, 3262494647, 484572669, 2923271059, 1783375398, 1517041206, 1098792767, 49674231, 1334037708, 1550332980, 4098991525, 886171109, 150598129, 2481090929, 1940642008, 1398944049, 1059722517, 201851908, 1385547719, 1699095331, 1587397571, 674240536, 2704774806, 252314885, 3039795866, 151914247, 908333586, 2602270848, 1038082786, 651029483, 1766729511, 3447698098, 2682942837, 454166793, 2652734339, 1951935532, 775166490, 758520603, 3000790638, 4004797018, 4217086112, 4137964114, 1299594043, 1639438038, 3464344499, 2068982057, 1054729187, 1901997871, 2534638724, 4121318227, 1757008337, 0, 750906861, 1614815264, 535035132, 3363418545, 3988151131, 3201591914, 1183697867, 3647454910, 1265776953, 3734260298, 3566750796, 3903871064, 1250283471, 1807470800, 717615087, 3847203498, 384695291, 3313910595, 3617213773, 1432761139, 2484176261, 3481945413, 283769337, 100925954, 2180939647, 4037038160, 1148730428, 3123027871, 3813386408, 4087501137, 4267549603, 3229630528, 2315620239, 2906624658, 3156319645, 1215313976, 82966005, 3747855548, 3245848246, 1974459098, 1665278241, 807407632, 451280895, 251524083, 1841287890, 1283575245, 337120268, 891687699, 801369324, 3787349855, 2721421207, 3431482436, 959321879, 1469301956, 4065699751, 2197585534, 1199193405, 2898814052, 3887750493, 724703513, 2514908019, 2696962144, 2551808385, 3516813135, 2141445340, 1715741218, 2119445034, 2872807568, 2198571144, 3398190662, 700968686, 3547052216, 1009259540, 2041044702, 3803995742, 487983883, 1991105499, 1004265696, 1449407026, 1316239930, 504629770, 3683797321, 168560134, 1816667172, 3837287516, 1570751170, 1857934291, 4014189740, 2797888098, 2822345105, 2754712981, 936633572, 2347923833, 852879335, 1133234376, 1500395319, 3084545389, 2348912013, 1689376213, 3533459022, 3762923945, 3034082412, 4205598294, 133428468, 634383082, 2949277029, 2398386810, 3913789102, 403703816, 3580869306, 2297460856, 1867130149, 1918643758, 607656988, 4049053350, 3346248884, 1368901318, 600565992, 2090982877, 2632479860, 557719327, 3717614411, 3697393085, 2249034635, 2232388234, 2430627952, 1115438654, 3295786421, 2865522278, 3633334344, 84280067, 33027830, 303828494, 2747425121, 1600795957, 4188952407, 3496589753, 2434238086, 1486471617, 658119965, 3106381470, 953803233, 334231800, 3005978776, 857870609, 3151128937, 1890179545, 2298973838, 2805175444, 3056442267, 574365214, 2450884487, 550103529, 1233637070, 4289353045, 2018519080, 2057691103, 2399374476, 4166623649, 2148108681, 387583245, 3664101311, 836232934, 3330556482, 3100665960, 3280093505, 2955516313, 2002398509, 287182607, 3413881008, 4238890068, 3597515707, 975967766];\n var T32 = [1671808611, 2089089148, 2006576759, 2072901243, 4061003762, 1807603307, 1873927791, 3310653893, 810573872, 16974337, 1739181671, 729634347, 4263110654, 3613570519, 2883997099, 1989864566, 3393556426, 2191335298, 3376449993, 2106063485, 4195741690, 1508618841, 1204391495, 4027317232, 2917941677, 3563566036, 2734514082, 2951366063, 2629772188, 2767672228, 1922491506, 3227229120, 3082974647, 4246528509, 2477669779, 644500518, 911895606, 1061256767, 4144166391, 3427763148, 878471220, 2784252325, 3845444069, 4043897329, 1905517169, 3631459288, 827548209, 356461077, 67897348, 3344078279, 593839651, 3277757891, 405286936, 2527147926, 84871685, 2595565466, 118033927, 305538066, 2157648768, 3795705826, 3945188843, 661212711, 2999812018, 1973414517, 152769033, 2208177539, 745822252, 439235610, 455947803, 1857215598, 1525593178, 2700827552, 1391895634, 994932283, 3596728278, 3016654259, 695947817, 3812548067, 795958831, 2224493444, 1408607827, 3513301457, 0, 3979133421, 543178784, 4229948412, 2982705585, 1542305371, 1790891114, 3410398667, 3201918910, 961245753, 1256100938, 1289001036, 1491644504, 3477767631, 3496721360, 4012557807, 2867154858, 4212583931, 1137018435, 1305975373, 861234739, 2241073541, 1171229253, 4178635257, 33948674, 2139225727, 1357946960, 1011120188, 2679776671, 2833468328, 1374921297, 2751356323, 1086357568, 2408187279, 2460827538, 2646352285, 944271416, 4110742005, 3168756668, 3066132406, 3665145818, 560153121, 271589392, 4279952895, 4077846003, 3530407890, 3444343245, 202643468, 322250259, 3962553324, 1608629855, 2543990167, 1154254916, 389623319, 3294073796, 2817676711, 2122513534, 1028094525, 1689045092, 1575467613, 422261273, 1939203699, 1621147744, 2174228865, 1339137615, 3699352540, 577127458, 712922154, 2427141008, 2290289544, 1187679302, 3995715566, 3100863416, 339486740, 3732514782, 1591917662, 186455563, 3681988059, 3762019296, 844522546, 978220090, 169743370, 1239126601, 101321734, 611076132, 1558493276, 3260915650, 3547250131, 2901361580, 1655096418, 2443721105, 2510565781, 3828863972, 2039214713, 3878868455, 3359869896, 928607799, 1840765549, 2374762893, 3580146133, 1322425422, 2850048425, 1823791212, 1459268694, 4094161908, 3928346602, 1706019429, 2056189050, 2934523822, 135794696, 3134549946, 2022240376, 628050469, 779246638, 472135708, 2800834470, 3032970164, 3327236038, 3894660072, 3715932637, 1956440180, 522272287, 1272813131, 3185336765, 2340818315, 2323976074, 1888542832, 1044544574, 3049550261, 1722469478, 1222152264, 50660867, 4127324150, 236067854, 1638122081, 895445557, 1475980887, 3117443513, 2257655686, 3243809217, 489110045, 2662934430, 3778599393, 4162055160, 2561878936, 288563729, 1773916777, 3648039385, 2391345038, 2493985684, 2612407707, 505560094, 2274497927, 3911240169, 3460925390, 1442818645, 678973480, 3749357023, 2358182796, 2717407649, 2306869641, 219617805, 3218761151, 3862026214, 1120306242, 1756942440, 1103331905, 2578459033, 762796589, 252780047, 2966125488, 1425844308, 3151392187, 372911126];\n var T4 = [1667474886, 2088535288, 2004326894, 2071694838, 4075949567, 1802223062, 1869591006, 3318043793, 808472672, 16843522, 1734846926, 724270422, 4278065639, 3621216949, 2880169549, 1987484396, 3402253711, 2189597983, 3385409673, 2105378810, 4210693615, 1499065266, 1195886990, 4042263547, 2913856577, 3570689971, 2728590687, 2947541573, 2627518243, 2762274643, 1920112356, 3233831835, 3082273397, 4261223649, 2475929149, 640051788, 909531756, 1061110142, 4160160501, 3435941763, 875846760, 2779116625, 3857003729, 4059105529, 1903268834, 3638064043, 825316194, 353713962, 67374088, 3351728789, 589522246, 3284360861, 404236336, 2526454071, 84217610, 2593830191, 117901582, 303183396, 2155911963, 3806477791, 3958056653, 656894286, 2998062463, 1970642922, 151591698, 2206440989, 741110872, 437923380, 454765878, 1852748508, 1515908788, 2694904667, 1381168804, 993742198, 3604373943, 3014905469, 690584402, 3823320797, 791638366, 2223281939, 1398011302, 3520161977, 0, 3991743681, 538992704, 4244381667, 2981218425, 1532751286, 1785380564, 3419096717, 3200178535, 960056178, 1246420628, 1280103576, 1482221744, 3486468741, 3503319995, 4025428677, 2863326543, 4227536621, 1128514950, 1296947098, 859002214, 2240123921, 1162203018, 4193849577, 33687044, 2139062782, 1347481760, 1010582648, 2678045221, 2829640523, 1364325282, 2745433693, 1077985408, 2408548869, 2459086143, 2644360225, 943212656, 4126475505, 3166494563, 3065430391, 3671750063, 555836226, 269496352, 4294908645, 4092792573, 3537006015, 3452783745, 202118168, 320025894, 3974901699, 1600119230, 2543297077, 1145359496, 387397934, 3301201811, 2812801621, 2122220284, 1027426170, 1684319432, 1566435258, 421079858, 1936954854, 1616945344, 2172753945, 1330631070, 3705438115, 572679748, 707427924, 2425400123, 2290647819, 1179044492, 4008585671, 3099120491, 336870440, 3739122087, 1583276732, 185277718, 3688593069, 3772791771, 842159716, 976899700, 168435220, 1229577106, 101059084, 606366792, 1549591736, 3267517855, 3553849021, 2897014595, 1650632388, 2442242105, 2509612081, 3840161747, 2038008818, 3890688725, 3368567691, 926374254, 1835907034, 2374863873, 3587531953, 1313788572, 2846482505, 1819063512, 1448540844, 4109633523, 3941213647, 1701162954, 2054852340, 2930698567, 134748176, 3132806511, 2021165296, 623210314, 774795868, 471606328, 2795958615, 3031746419, 3334885783, 3907527627, 3722280097, 1953799400, 522133822, 1263263126, 3183336545, 2341176845, 2324333839, 1886425312, 1044267644, 3048588401, 1718004428, 1212733584, 50529542, 4143317495, 235803164, 1633788866, 892690282, 1465383342, 3115962473, 2256965911, 3250673817, 488449850, 2661202215, 3789633753, 4177007595, 2560144171, 286339874, 1768537042, 3654906025, 2391705863, 2492770099, 2610673197, 505291324, 2273808917, 3924369609, 3469625735, 1431699370, 673740880, 3755965093, 2358021891, 2711746649, 2307489801, 218961690, 3217021541, 3873845719, 1111672452, 1751693520, 1094828930, 2576986153, 757954394, 252645662, 2964376443, 1414855848, 3149649517, 370555436];\n var T5 = [1374988112, 2118214995, 437757123, 975658646, 1001089995, 530400753, 2902087851, 1273168787, 540080725, 2910219766, 2295101073, 4110568485, 1340463100, 3307916247, 641025152, 3043140495, 3736164937, 632953703, 1172967064, 1576976609, 3274667266, 2169303058, 2370213795, 1809054150, 59727847, 361929877, 3211623147, 2505202138, 3569255213, 1484005843, 1239443753, 2395588676, 1975683434, 4102977912, 2572697195, 666464733, 3202437046, 4035489047, 3374361702, 2110667444, 1675577880, 3843699074, 2538681184, 1649639237, 2976151520, 3144396420, 4269907996, 4178062228, 1883793496, 2403728665, 2497604743, 1383856311, 2876494627, 1917518562, 3810496343, 1716890410, 3001755655, 800440835, 2261089178, 3543599269, 807962610, 599762354, 33778362, 3977675356, 2328828971, 2809771154, 4077384432, 1315562145, 1708848333, 101039829, 3509871135, 3299278474, 875451293, 2733856160, 92987698, 2767645557, 193195065, 1080094634, 1584504582, 3178106961, 1042385657, 2531067453, 3711829422, 1306967366, 2438237621, 1908694277, 67556463, 1615861247, 429456164, 3602770327, 2302690252, 1742315127, 2968011453, 126454664, 3877198648, 2043211483, 2709260871, 2084704233, 4169408201, 0, 159417987, 841739592, 504459436, 1817866830, 4245618683, 260388950, 1034867998, 908933415, 168810852, 1750902305, 2606453969, 607530554, 202008497, 2472011535, 3035535058, 463180190, 2160117071, 1641816226, 1517767529, 470948374, 3801332234, 3231722213, 1008918595, 303765277, 235474187, 4069246893, 766945465, 337553864, 1475418501, 2943682380, 4003061179, 2743034109, 4144047775, 1551037884, 1147550661, 1543208500, 2336434550, 3408119516, 3069049960, 3102011747, 3610369226, 1113818384, 328671808, 2227573024, 2236228733, 3535486456, 2935566865, 3341394285, 496906059, 3702665459, 226906860, 2009195472, 733156972, 2842737049, 294930682, 1206477858, 2835123396, 2700099354, 1451044056, 573804783, 2269728455, 3644379585, 2362090238, 2564033334, 2801107407, 2776292904, 3669462566, 1068351396, 742039012, 1350078989, 1784663195, 1417561698, 4136440770, 2430122216, 775550814, 2193862645, 2673705150, 1775276924, 1876241833, 3475313331, 3366754619, 270040487, 3902563182, 3678124923, 3441850377, 1851332852, 3969562369, 2203032232, 3868552805, 2868897406, 566021896, 4011190502, 3135740889, 1248802510, 3936291284, 699432150, 832877231, 708780849, 3332740144, 899835584, 1951317047, 4236429990, 3767586992, 866637845, 4043610186, 1106041591, 2144161806, 395441711, 1984812685, 1139781709, 3433712980, 3835036895, 2664543715, 1282050075, 3240894392, 1181045119, 2640243204, 25965917, 4203181171, 4211818798, 3009879386, 2463879762, 3910161971, 1842759443, 2597806476, 933301370, 1509430414, 3943906441, 3467192302, 3076639029, 3776767469, 2051518780, 2631065433, 1441952575, 404016761, 1942435775, 1408749034, 1610459739, 3745345300, 2017778566, 3400528769, 3110650942, 941896748, 3265478751, 371049330, 3168937228, 675039627, 4279080257, 967311729, 135050206, 3635733660, 1683407248, 2076935265, 3576870512, 1215061108, 3501741890];\n var T6 = [1347548327, 1400783205, 3273267108, 2520393566, 3409685355, 4045380933, 2880240216, 2471224067, 1428173050, 4138563181, 2441661558, 636813900, 4233094615, 3620022987, 2149987652, 2411029155, 1239331162, 1730525723, 2554718734, 3781033664, 46346101, 310463728, 2743944855, 3328955385, 3875770207, 2501218972, 3955191162, 3667219033, 768917123, 3545789473, 692707433, 1150208456, 1786102409, 2029293177, 1805211710, 3710368113, 3065962831, 401639597, 1724457132, 3028143674, 409198410, 2196052529, 1620529459, 1164071807, 3769721975, 2226875310, 486441376, 2499348523, 1483753576, 428819965, 2274680428, 3075636216, 598438867, 3799141122, 1474502543, 711349675, 129166120, 53458370, 2592523643, 2782082824, 4063242375, 2988687269, 3120694122, 1559041666, 730517276, 2460449204, 4042459122, 2706270690, 3446004468, 3573941694, 533804130, 2328143614, 2637442643, 2695033685, 839224033, 1973745387, 957055980, 2856345839, 106852767, 1371368976, 4181598602, 1033297158, 2933734917, 1179510461, 3046200461, 91341917, 1862534868, 4284502037, 605657339, 2547432937, 3431546947, 2003294622, 3182487618, 2282195339, 954669403, 3682191598, 1201765386, 3917234703, 3388507166, 0, 2198438022, 1211247597, 2887651696, 1315723890, 4227665663, 1443857720, 507358933, 657861945, 1678381017, 560487590, 3516619604, 975451694, 2970356327, 261314535, 3535072918, 2652609425, 1333838021, 2724322336, 1767536459, 370938394, 182621114, 3854606378, 1128014560, 487725847, 185469197, 2918353863, 3106780840, 3356761769, 2237133081, 1286567175, 3152976349, 4255350624, 2683765030, 3160175349, 3309594171, 878443390, 1988838185, 3704300486, 1756818940, 1673061617, 3403100636, 272786309, 1075025698, 545572369, 2105887268, 4174560061, 296679730, 1841768865, 1260232239, 4091327024, 3960309330, 3497509347, 1814803222, 2578018489, 4195456072, 575138148, 3299409036, 446754879, 3629546796, 4011996048, 3347532110, 3252238545, 4270639778, 915985419, 3483825537, 681933534, 651868046, 2755636671, 3828103837, 223377554, 2607439820, 1649704518, 3270937875, 3901806776, 1580087799, 4118987695, 3198115200, 2087309459, 2842678573, 3016697106, 1003007129, 2802849917, 1860738147, 2077965243, 164439672, 4100872472, 32283319, 2827177882, 1709610350, 2125135846, 136428751, 3874428392, 3652904859, 3460984630, 3572145929, 3593056380, 2939266226, 824852259, 818324884, 3224740454, 930369212, 2801566410, 2967507152, 355706840, 1257309336, 4148292826, 243256656, 790073846, 2373340630, 1296297904, 1422699085, 3756299780, 3818836405, 457992840, 3099667487, 2135319889, 77422314, 1560382517, 1945798516, 788204353, 1521706781, 1385356242, 870912086, 325965383, 2358957921, 2050466060, 2388260884, 2313884476, 4006521127, 901210569, 3990953189, 1014646705, 1503449823, 1062597235, 2031621326, 3212035895, 3931371469, 1533017514, 350174575, 2256028891, 2177544179, 1052338372, 741876788, 1606591296, 1914052035, 213705253, 2334669897, 1107234197, 1899603969, 3725069491, 2631447780, 2422494913, 1635502980, 1893020342, 1950903388, 1120974935];\n var T7 = [2807058932, 1699970625, 2764249623, 1586903591, 1808481195, 1173430173, 1487645946, 59984867, 4199882800, 1844882806, 1989249228, 1277555970, 3623636965, 3419915562, 1149249077, 2744104290, 1514790577, 459744698, 244860394, 3235995134, 1963115311, 4027744588, 2544078150, 4190530515, 1608975247, 2627016082, 2062270317, 1507497298, 2200818878, 567498868, 1764313568, 3359936201, 2305455554, 2037970062, 1047239e3, 1910319033, 1337376481, 2904027272, 2892417312, 984907214, 1243112415, 830661914, 861968209, 2135253587, 2011214180, 2927934315, 2686254721, 731183368, 1750626376, 4246310725, 1820824798, 4172763771, 3542330227, 48394827, 2404901663, 2871682645, 671593195, 3254988725, 2073724613, 145085239, 2280796200, 2779915199, 1790575107, 2187128086, 472615631, 3029510009, 4075877127, 3802222185, 4107101658, 3201631749, 1646252340, 4270507174, 1402811438, 1436590835, 3778151818, 3950355702, 3963161475, 4020912224, 2667994737, 273792366, 2331590177, 104699613, 95345982, 3175501286, 2377486676, 1560637892, 3564045318, 369057872, 4213447064, 3919042237, 1137477952, 2658625497, 1119727848, 2340947849, 1530455833, 4007360968, 172466556, 266959938, 516552836, 0, 2256734592, 3980931627, 1890328081, 1917742170, 4294704398, 945164165, 3575528878, 958871085, 3647212047, 2787207260, 1423022939, 775562294, 1739656202, 3876557655, 2530391278, 2443058075, 3310321856, 547512796, 1265195639, 437656594, 3121275539, 719700128, 3762502690, 387781147, 218828297, 3350065803, 2830708150, 2848461854, 428169201, 122466165, 3720081049, 1627235199, 648017665, 4122762354, 1002783846, 2117360635, 695634755, 3336358691, 4234721005, 4049844452, 3704280881, 2232435299, 574624663, 287343814, 612205898, 1039717051, 840019705, 2708326185, 793451934, 821288114, 1391201670, 3822090177, 376187827, 3113855344, 1224348052, 1679968233, 2361698556, 1058709744, 752375421, 2431590963, 1321699145, 3519142200, 2734591178, 188127444, 2177869557, 3727205754, 2384911031, 3215212461, 2648976442, 2450346104, 3432737375, 1180849278, 331544205, 3102249176, 4150144569, 2952102595, 2159976285, 2474404304, 766078933, 313773861, 2570832044, 2108100632, 1668212892, 3145456443, 2013908262, 418672217, 3070356634, 2594734927, 1852171925, 3867060991, 3473416636, 3907448597, 2614737639, 919489135, 164948639, 2094410160, 2997825956, 590424639, 2486224549, 1723872674, 3157750862, 3399941250, 3501252752, 3625268135, 2555048196, 3673637356, 1343127501, 4130281361, 3599595085, 2957853679, 1297403050, 81781910, 3051593425, 2283490410, 532201772, 1367295589, 3926170974, 895287692, 1953757831, 1093597963, 492483431, 3528626907, 1446242576, 1192455638, 1636604631, 209336225, 344873464, 1015671571, 669961897, 3375740769, 3857572124, 2973530695, 3747192018, 1933530610, 3464042516, 935293895, 3454686199, 2858115069, 1863638845, 3683022916, 4085369519, 3292445032, 875313188, 1080017571, 3279033885, 621591778, 1233856572, 2504130317, 24197544, 3017672716, 3835484340, 3247465558, 2220981195, 3060847922, 1551124588, 1463996600];\n var T8 = [4104605777, 1097159550, 396673818, 660510266, 2875968315, 2638606623, 4200115116, 3808662347, 821712160, 1986918061, 3430322568, 38544885, 3856137295, 718002117, 893681702, 1654886325, 2975484382, 3122358053, 3926825029, 4274053469, 796197571, 1290801793, 1184342925, 3556361835, 2405426947, 2459735317, 1836772287, 1381620373, 3196267988, 1948373848, 3764988233, 3385345166, 3263785589, 2390325492, 1480485785, 3111247143, 3780097726, 2293045232, 548169417, 3459953789, 3746175075, 439452389, 1362321559, 1400849762, 1685577905, 1806599355, 2174754046, 137073913, 1214797936, 1174215055, 3731654548, 2079897426, 1943217067, 1258480242, 529487843, 1437280870, 3945269170, 3049390895, 3313212038, 923313619, 679998e3, 3215307299, 57326082, 377642221, 3474729866, 2041877159, 133361907, 1776460110, 3673476453, 96392454, 878845905, 2801699524, 777231668, 4082475170, 2330014213, 4142626212, 2213296395, 1626319424, 1906247262, 1846563261, 562755902, 3708173718, 1040559837, 3871163981, 1418573201, 3294430577, 114585348, 1343618912, 2566595609, 3186202582, 1078185097, 3651041127, 3896688048, 2307622919, 425408743, 3371096953, 2081048481, 1108339068, 2216610296, 0, 2156299017, 736970802, 292596766, 1517440620, 251657213, 2235061775, 2933202493, 758720310, 265905162, 1554391400, 1532285339, 908999204, 174567692, 1474760595, 4002861748, 2610011675, 3234156416, 3693126241, 2001430874, 303699484, 2478443234, 2687165888, 585122620, 454499602, 151849742, 2345119218, 3064510765, 514443284, 4044981591, 1963412655, 2581445614, 2137062819, 19308535, 1928707164, 1715193156, 4219352155, 1126790795, 600235211, 3992742070, 3841024952, 836553431, 1669664834, 2535604243, 3323011204, 1243905413, 3141400786, 4180808110, 698445255, 2653899549, 2989552604, 2253581325, 3252932727, 3004591147, 1891211689, 2487810577, 3915653703, 4237083816, 4030667424, 2100090966, 865136418, 1229899655, 953270745, 3399679628, 3557504664, 4118925222, 2061379749, 3079546586, 2915017791, 983426092, 2022837584, 1607244650, 2118541908, 2366882550, 3635996816, 972512814, 3283088770, 1568718495, 3499326569, 3576539503, 621982671, 2895723464, 410887952, 2623762152, 1002142683, 645401037, 1494807662, 2595684844, 1335535747, 2507040230, 4293295786, 3167684641, 367585007, 3885750714, 1865862730, 2668221674, 2960971305, 2763173681, 1059270954, 2777952454, 2724642869, 1320957812, 2194319100, 2429595872, 2815956275, 77089521, 3973773121, 3444575871, 2448830231, 1305906550, 4021308739, 2857194700, 2516901860, 3518358430, 1787304780, 740276417, 1699839814, 1592394909, 2352307457, 2272556026, 188821243, 1729977011, 3687994002, 274084841, 3594982253, 3613494426, 2701949495, 4162096729, 322734571, 2837966542, 1640576439, 484830689, 1202797690, 3537852828, 4067639125, 349075736, 3342319475, 4157467219, 4255800159, 1030690015, 1155237496, 2951971274, 1757691577, 607398968, 2738905026, 499347990, 3794078908, 1011452712, 227885567, 2818666809, 213114376, 3034881240, 1455525988, 3414450555, 850817237, 1817998408, 3092726480];\n var U1 = [0, 235474187, 470948374, 303765277, 941896748, 908933415, 607530554, 708780849, 1883793496, 2118214995, 1817866830, 1649639237, 1215061108, 1181045119, 1417561698, 1517767529, 3767586992, 4003061179, 4236429990, 4069246893, 3635733660, 3602770327, 3299278474, 3400528769, 2430122216, 2664543715, 2362090238, 2193862645, 2835123396, 2801107407, 3035535058, 3135740889, 3678124923, 3576870512, 3341394285, 3374361702, 3810496343, 3977675356, 4279080257, 4043610186, 2876494627, 2776292904, 3076639029, 3110650942, 2472011535, 2640243204, 2403728665, 2169303058, 1001089995, 899835584, 666464733, 699432150, 59727847, 226906860, 530400753, 294930682, 1273168787, 1172967064, 1475418501, 1509430414, 1942435775, 2110667444, 1876241833, 1641816226, 2910219766, 2743034109, 2976151520, 3211623147, 2505202138, 2606453969, 2302690252, 2269728455, 3711829422, 3543599269, 3240894392, 3475313331, 3843699074, 3943906441, 4178062228, 4144047775, 1306967366, 1139781709, 1374988112, 1610459739, 1975683434, 2076935265, 1775276924, 1742315127, 1034867998, 866637845, 566021896, 800440835, 92987698, 193195065, 429456164, 395441711, 1984812685, 2017778566, 1784663195, 1683407248, 1315562145, 1080094634, 1383856311, 1551037884, 101039829, 135050206, 437757123, 337553864, 1042385657, 807962610, 573804783, 742039012, 2531067453, 2564033334, 2328828971, 2227573024, 2935566865, 2700099354, 3001755655, 3168937228, 3868552805, 3902563182, 4203181171, 4102977912, 3736164937, 3501741890, 3265478751, 3433712980, 1106041591, 1340463100, 1576976609, 1408749034, 2043211483, 2009195472, 1708848333, 1809054150, 832877231, 1068351396, 766945465, 599762354, 159417987, 126454664, 361929877, 463180190, 2709260871, 2943682380, 3178106961, 3009879386, 2572697195, 2538681184, 2236228733, 2336434550, 3509871135, 3745345300, 3441850377, 3274667266, 3910161971, 3877198648, 4110568485, 4211818798, 2597806476, 2497604743, 2261089178, 2295101073, 2733856160, 2902087851, 3202437046, 2968011453, 3936291284, 3835036895, 4136440770, 4169408201, 3535486456, 3702665459, 3467192302, 3231722213, 2051518780, 1951317047, 1716890410, 1750902305, 1113818384, 1282050075, 1584504582, 1350078989, 168810852, 67556463, 371049330, 404016761, 841739592, 1008918595, 775550814, 540080725, 3969562369, 3801332234, 4035489047, 4269907996, 3569255213, 3669462566, 3366754619, 3332740144, 2631065433, 2463879762, 2160117071, 2395588676, 2767645557, 2868897406, 3102011747, 3069049960, 202008497, 33778362, 270040487, 504459436, 875451293, 975658646, 675039627, 641025152, 2084704233, 1917518562, 1615861247, 1851332852, 1147550661, 1248802510, 1484005843, 1451044056, 933301370, 967311729, 733156972, 632953703, 260388950, 25965917, 328671808, 496906059, 1206477858, 1239443753, 1543208500, 1441952575, 2144161806, 1908694277, 1675577880, 1842759443, 3610369226, 3644379585, 3408119516, 3307916247, 4011190502, 3776767469, 4077384432, 4245618683, 2809771154, 2842737049, 3144396420, 3043140495, 2673705150, 2438237621, 2203032232, 2370213795];\n var U22 = [0, 185469197, 370938394, 487725847, 741876788, 657861945, 975451694, 824852259, 1483753576, 1400783205, 1315723890, 1164071807, 1950903388, 2135319889, 1649704518, 1767536459, 2967507152, 3152976349, 2801566410, 2918353863, 2631447780, 2547432937, 2328143614, 2177544179, 3901806776, 3818836405, 4270639778, 4118987695, 3299409036, 3483825537, 3535072918, 3652904859, 2077965243, 1893020342, 1841768865, 1724457132, 1474502543, 1559041666, 1107234197, 1257309336, 598438867, 681933534, 901210569, 1052338372, 261314535, 77422314, 428819965, 310463728, 3409685355, 3224740454, 3710368113, 3593056380, 3875770207, 3960309330, 4045380933, 4195456072, 2471224067, 2554718734, 2237133081, 2388260884, 3212035895, 3028143674, 2842678573, 2724322336, 4138563181, 4255350624, 3769721975, 3955191162, 3667219033, 3516619604, 3431546947, 3347532110, 2933734917, 2782082824, 3099667487, 3016697106, 2196052529, 2313884476, 2499348523, 2683765030, 1179510461, 1296297904, 1347548327, 1533017514, 1786102409, 1635502980, 2087309459, 2003294622, 507358933, 355706840, 136428751, 53458370, 839224033, 957055980, 605657339, 790073846, 2373340630, 2256028891, 2607439820, 2422494913, 2706270690, 2856345839, 3075636216, 3160175349, 3573941694, 3725069491, 3273267108, 3356761769, 4181598602, 4063242375, 4011996048, 3828103837, 1033297158, 915985419, 730517276, 545572369, 296679730, 446754879, 129166120, 213705253, 1709610350, 1860738147, 1945798516, 2029293177, 1239331162, 1120974935, 1606591296, 1422699085, 4148292826, 4233094615, 3781033664, 3931371469, 3682191598, 3497509347, 3446004468, 3328955385, 2939266226, 2755636671, 3106780840, 2988687269, 2198438022, 2282195339, 2501218972, 2652609425, 1201765386, 1286567175, 1371368976, 1521706781, 1805211710, 1620529459, 2105887268, 1988838185, 533804130, 350174575, 164439672, 46346101, 870912086, 954669403, 636813900, 788204353, 2358957921, 2274680428, 2592523643, 2441661558, 2695033685, 2880240216, 3065962831, 3182487618, 3572145929, 3756299780, 3270937875, 3388507166, 4174560061, 4091327024, 4006521127, 3854606378, 1014646705, 930369212, 711349675, 560487590, 272786309, 457992840, 106852767, 223377554, 1678381017, 1862534868, 1914052035, 2031621326, 1211247597, 1128014560, 1580087799, 1428173050, 32283319, 182621114, 401639597, 486441376, 768917123, 651868046, 1003007129, 818324884, 1503449823, 1385356242, 1333838021, 1150208456, 1973745387, 2125135846, 1673061617, 1756818940, 2970356327, 3120694122, 2802849917, 2887651696, 2637442643, 2520393566, 2334669897, 2149987652, 3917234703, 3799141122, 4284502037, 4100872472, 3309594171, 3460984630, 3545789473, 3629546796, 2050466060, 1899603969, 1814803222, 1730525723, 1443857720, 1560382517, 1075025698, 1260232239, 575138148, 692707433, 878443390, 1062597235, 243256656, 91341917, 409198410, 325965383, 3403100636, 3252238545, 3704300486, 3620022987, 3874428392, 3990953189, 4042459122, 4227665663, 2460449204, 2578018489, 2226875310, 2411029155, 3198115200, 3046200461, 2827177882, 2743944855];\n var U32 = [0, 218828297, 437656594, 387781147, 875313188, 958871085, 775562294, 590424639, 1750626376, 1699970625, 1917742170, 2135253587, 1551124588, 1367295589, 1180849278, 1265195639, 3501252752, 3720081049, 3399941250, 3350065803, 3835484340, 3919042237, 4270507174, 4085369519, 3102249176, 3051593425, 2734591178, 2952102595, 2361698556, 2177869557, 2530391278, 2614737639, 3145456443, 3060847922, 2708326185, 2892417312, 2404901663, 2187128086, 2504130317, 2555048196, 3542330227, 3727205754, 3375740769, 3292445032, 3876557655, 3926170974, 4246310725, 4027744588, 1808481195, 1723872674, 1910319033, 2094410160, 1608975247, 1391201670, 1173430173, 1224348052, 59984867, 244860394, 428169201, 344873464, 935293895, 984907214, 766078933, 547512796, 1844882806, 1627235199, 2011214180, 2062270317, 1507497298, 1423022939, 1137477952, 1321699145, 95345982, 145085239, 532201772, 313773861, 830661914, 1015671571, 731183368, 648017665, 3175501286, 2957853679, 2807058932, 2858115069, 2305455554, 2220981195, 2474404304, 2658625497, 3575528878, 3625268135, 3473416636, 3254988725, 3778151818, 3963161475, 4213447064, 4130281361, 3599595085, 3683022916, 3432737375, 3247465558, 3802222185, 4020912224, 4172763771, 4122762354, 3201631749, 3017672716, 2764249623, 2848461854, 2331590177, 2280796200, 2431590963, 2648976442, 104699613, 188127444, 472615631, 287343814, 840019705, 1058709744, 671593195, 621591778, 1852171925, 1668212892, 1953757831, 2037970062, 1514790577, 1463996600, 1080017571, 1297403050, 3673637356, 3623636965, 3235995134, 3454686199, 4007360968, 3822090177, 4107101658, 4190530515, 2997825956, 3215212461, 2830708150, 2779915199, 2256734592, 2340947849, 2627016082, 2443058075, 172466556, 122466165, 273792366, 492483431, 1047239e3, 861968209, 612205898, 695634755, 1646252340, 1863638845, 2013908262, 1963115311, 1446242576, 1530455833, 1277555970, 1093597963, 1636604631, 1820824798, 2073724613, 1989249228, 1436590835, 1487645946, 1337376481, 1119727848, 164948639, 81781910, 331544205, 516552836, 1039717051, 821288114, 669961897, 719700128, 2973530695, 3157750862, 2871682645, 2787207260, 2232435299, 2283490410, 2667994737, 2450346104, 3647212047, 3564045318, 3279033885, 3464042516, 3980931627, 3762502690, 4150144569, 4199882800, 3070356634, 3121275539, 2904027272, 2686254721, 2200818878, 2384911031, 2570832044, 2486224549, 3747192018, 3528626907, 3310321856, 3359936201, 3950355702, 3867060991, 4049844452, 4234721005, 1739656202, 1790575107, 2108100632, 1890328081, 1402811438, 1586903591, 1233856572, 1149249077, 266959938, 48394827, 369057872, 418672217, 1002783846, 919489135, 567498868, 752375421, 209336225, 24197544, 376187827, 459744698, 945164165, 895287692, 574624663, 793451934, 1679968233, 1764313568, 2117360635, 1933530610, 1343127501, 1560637892, 1243112415, 1192455638, 3704280881, 3519142200, 3336358691, 3419915562, 3907448597, 3857572124, 4075877127, 4294704398, 3029510009, 3113855344, 2927934315, 2744104290, 2159976285, 2377486676, 2594734927, 2544078150];\n var U4 = [0, 151849742, 303699484, 454499602, 607398968, 758720310, 908999204, 1059270954, 1214797936, 1097159550, 1517440620, 1400849762, 1817998408, 1699839814, 2118541908, 2001430874, 2429595872, 2581445614, 2194319100, 2345119218, 3034881240, 3186202582, 2801699524, 2951971274, 3635996816, 3518358430, 3399679628, 3283088770, 4237083816, 4118925222, 4002861748, 3885750714, 1002142683, 850817237, 698445255, 548169417, 529487843, 377642221, 227885567, 77089521, 1943217067, 2061379749, 1640576439, 1757691577, 1474760595, 1592394909, 1174215055, 1290801793, 2875968315, 2724642869, 3111247143, 2960971305, 2405426947, 2253581325, 2638606623, 2487810577, 3808662347, 3926825029, 4044981591, 4162096729, 3342319475, 3459953789, 3576539503, 3693126241, 1986918061, 2137062819, 1685577905, 1836772287, 1381620373, 1532285339, 1078185097, 1229899655, 1040559837, 923313619, 740276417, 621982671, 439452389, 322734571, 137073913, 19308535, 3871163981, 4021308739, 4104605777, 4255800159, 3263785589, 3414450555, 3499326569, 3651041127, 2933202493, 2815956275, 3167684641, 3049390895, 2330014213, 2213296395, 2566595609, 2448830231, 1305906550, 1155237496, 1607244650, 1455525988, 1776460110, 1626319424, 2079897426, 1928707164, 96392454, 213114376, 396673818, 514443284, 562755902, 679998e3, 865136418, 983426092, 3708173718, 3557504664, 3474729866, 3323011204, 4180808110, 4030667424, 3945269170, 3794078908, 2507040230, 2623762152, 2272556026, 2390325492, 2975484382, 3092726480, 2738905026, 2857194700, 3973773121, 3856137295, 4274053469, 4157467219, 3371096953, 3252932727, 3673476453, 3556361835, 2763173681, 2915017791, 3064510765, 3215307299, 2156299017, 2307622919, 2459735317, 2610011675, 2081048481, 1963412655, 1846563261, 1729977011, 1480485785, 1362321559, 1243905413, 1126790795, 878845905, 1030690015, 645401037, 796197571, 274084841, 425408743, 38544885, 188821243, 3613494426, 3731654548, 3313212038, 3430322568, 4082475170, 4200115116, 3780097726, 3896688048, 2668221674, 2516901860, 2366882550, 2216610296, 3141400786, 2989552604, 2837966542, 2687165888, 1202797690, 1320957812, 1437280870, 1554391400, 1669664834, 1787304780, 1906247262, 2022837584, 265905162, 114585348, 499347990, 349075736, 736970802, 585122620, 972512814, 821712160, 2595684844, 2478443234, 2293045232, 2174754046, 3196267988, 3079546586, 2895723464, 2777952454, 3537852828, 3687994002, 3234156416, 3385345166, 4142626212, 4293295786, 3841024952, 3992742070, 174567692, 57326082, 410887952, 292596766, 777231668, 660510266, 1011452712, 893681702, 1108339068, 1258480242, 1343618912, 1494807662, 1715193156, 1865862730, 1948373848, 2100090966, 2701949495, 2818666809, 3004591147, 3122358053, 2235061775, 2352307457, 2535604243, 2653899549, 3915653703, 3764988233, 4219352155, 4067639125, 3444575871, 3294430577, 3746175075, 3594982253, 836553431, 953270745, 600235211, 718002117, 367585007, 484830689, 133361907, 251657213, 2041877159, 1891211689, 1806599355, 1654886325, 1568718495, 1418573201, 1335535747, 1184342925];\n function convertToInt32(bytes) {\n const result = [];\n for (let i3 = 0; i3 < bytes.length; i3 += 4) {\n result.push(bytes[i3] << 24 | bytes[i3 + 1] << 16 | bytes[i3 + 2] << 8 | bytes[i3 + 3]);\n }\n return result;\n }\n var AES = class _AES {\n get key() {\n return __classPrivateFieldGet4(this, _AES_key, \"f\").slice();\n }\n constructor(key) {\n _AES_key.set(this, void 0);\n _AES_Kd.set(this, void 0);\n _AES_Ke.set(this, void 0);\n if (!(this instanceof _AES)) {\n throw Error(\"AES must be instanitated with `new`\");\n }\n __classPrivateFieldSet4(this, _AES_key, new Uint8Array(key), \"f\");\n const rounds = numberOfRounds[this.key.length];\n if (rounds == null) {\n throw new TypeError(\"invalid key size (must be 16, 24 or 32 bytes)\");\n }\n __classPrivateFieldSet4(this, _AES_Ke, [], \"f\");\n __classPrivateFieldSet4(this, _AES_Kd, [], \"f\");\n for (let i3 = 0; i3 <= rounds; i3++) {\n __classPrivateFieldGet4(this, _AES_Ke, \"f\").push([0, 0, 0, 0]);\n __classPrivateFieldGet4(this, _AES_Kd, \"f\").push([0, 0, 0, 0]);\n }\n const roundKeyCount = (rounds + 1) * 4;\n const KC = this.key.length / 4;\n const tk = convertToInt32(this.key);\n let index2;\n for (let i3 = 0; i3 < KC; i3++) {\n index2 = i3 >> 2;\n __classPrivateFieldGet4(this, _AES_Ke, \"f\")[index2][i3 % 4] = tk[i3];\n __classPrivateFieldGet4(this, _AES_Kd, \"f\")[rounds - index2][i3 % 4] = tk[i3];\n }\n let rconpointer = 0;\n let t3 = KC, tt;\n while (t3 < roundKeyCount) {\n tt = tk[KC - 1];\n tk[0] ^= S3[tt >> 16 & 255] << 24 ^ S3[tt >> 8 & 255] << 16 ^ S3[tt & 255] << 8 ^ S3[tt >> 24 & 255] ^ rcon[rconpointer] << 24;\n rconpointer += 1;\n if (KC != 8) {\n for (let i4 = 1; i4 < KC; i4++) {\n tk[i4] ^= tk[i4 - 1];\n }\n } else {\n for (let i4 = 1; i4 < KC / 2; i4++) {\n tk[i4] ^= tk[i4 - 1];\n }\n tt = tk[KC / 2 - 1];\n tk[KC / 2] ^= S3[tt & 255] ^ S3[tt >> 8 & 255] << 8 ^ S3[tt >> 16 & 255] << 16 ^ S3[tt >> 24 & 255] << 24;\n for (let i4 = KC / 2 + 1; i4 < KC; i4++) {\n tk[i4] ^= tk[i4 - 1];\n }\n }\n let i3 = 0, r2, c4;\n while (i3 < KC && t3 < roundKeyCount) {\n r2 = t3 >> 2;\n c4 = t3 % 4;\n __classPrivateFieldGet4(this, _AES_Ke, \"f\")[r2][c4] = tk[i3];\n __classPrivateFieldGet4(this, _AES_Kd, \"f\")[rounds - r2][c4] = tk[i3++];\n t3++;\n }\n }\n for (let r2 = 1; r2 < rounds; r2++) {\n for (let c4 = 0; c4 < 4; c4++) {\n tt = __classPrivateFieldGet4(this, _AES_Kd, \"f\")[r2][c4];\n __classPrivateFieldGet4(this, _AES_Kd, \"f\")[r2][c4] = U1[tt >> 24 & 255] ^ U22[tt >> 16 & 255] ^ U32[tt >> 8 & 255] ^ U4[tt & 255];\n }\n }\n }\n encrypt(plaintext) {\n if (plaintext.length != 16) {\n throw new TypeError(\"invalid plaintext size (must be 16 bytes)\");\n }\n const rounds = __classPrivateFieldGet4(this, _AES_Ke, \"f\").length - 1;\n const a3 = [0, 0, 0, 0];\n let t3 = convertToInt32(plaintext);\n for (let i3 = 0; i3 < 4; i3++) {\n t3[i3] ^= __classPrivateFieldGet4(this, _AES_Ke, \"f\")[0][i3];\n }\n for (let r2 = 1; r2 < rounds; r2++) {\n for (let i3 = 0; i3 < 4; i3++) {\n a3[i3] = T1[t3[i3] >> 24 & 255] ^ T22[t3[(i3 + 1) % 4] >> 16 & 255] ^ T32[t3[(i3 + 2) % 4] >> 8 & 255] ^ T4[t3[(i3 + 3) % 4] & 255] ^ __classPrivateFieldGet4(this, _AES_Ke, \"f\")[r2][i3];\n }\n t3 = a3.slice();\n }\n const result = new Uint8Array(16);\n let tt = 0;\n for (let i3 = 0; i3 < 4; i3++) {\n tt = __classPrivateFieldGet4(this, _AES_Ke, \"f\")[rounds][i3];\n result[4 * i3] = (S3[t3[i3] >> 24 & 255] ^ tt >> 24) & 255;\n result[4 * i3 + 1] = (S3[t3[(i3 + 1) % 4] >> 16 & 255] ^ tt >> 16) & 255;\n result[4 * i3 + 2] = (S3[t3[(i3 + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255;\n result[4 * i3 + 3] = (S3[t3[(i3 + 3) % 4] & 255] ^ tt) & 255;\n }\n return result;\n }\n decrypt(ciphertext) {\n if (ciphertext.length != 16) {\n throw new TypeError(\"invalid ciphertext size (must be 16 bytes)\");\n }\n const rounds = __classPrivateFieldGet4(this, _AES_Kd, \"f\").length - 1;\n const a3 = [0, 0, 0, 0];\n let t3 = convertToInt32(ciphertext);\n for (let i3 = 0; i3 < 4; i3++) {\n t3[i3] ^= __classPrivateFieldGet4(this, _AES_Kd, \"f\")[0][i3];\n }\n for (let r2 = 1; r2 < rounds; r2++) {\n for (let i3 = 0; i3 < 4; i3++) {\n a3[i3] = T5[t3[i3] >> 24 & 255] ^ T6[t3[(i3 + 3) % 4] >> 16 & 255] ^ T7[t3[(i3 + 2) % 4] >> 8 & 255] ^ T8[t3[(i3 + 1) % 4] & 255] ^ __classPrivateFieldGet4(this, _AES_Kd, \"f\")[r2][i3];\n }\n t3 = a3.slice();\n }\n const result = new Uint8Array(16);\n let tt = 0;\n for (let i3 = 0; i3 < 4; i3++) {\n tt = __classPrivateFieldGet4(this, _AES_Kd, \"f\")[rounds][i3];\n result[4 * i3] = (Si[t3[i3] >> 24 & 255] ^ tt >> 24) & 255;\n result[4 * i3 + 1] = (Si[t3[(i3 + 3) % 4] >> 16 & 255] ^ tt >> 16) & 255;\n result[4 * i3 + 2] = (Si[t3[(i3 + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255;\n result[4 * i3 + 3] = (Si[t3[(i3 + 1) % 4] & 255] ^ tt) & 255;\n }\n return result;\n }\n };\n exports3.AES = AES;\n _AES_key = /* @__PURE__ */ new WeakMap(), _AES_Kd = /* @__PURE__ */ new WeakMap(), _AES_Ke = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode.js\n var require_mode = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ModeOfOperation = void 0;\n var aes_js_1 = require_aes();\n var ModeOfOperation = class {\n constructor(name, key, cls) {\n if (cls && !(this instanceof cls)) {\n throw new Error(`${name} must be instantiated with \"new\"`);\n }\n Object.defineProperties(this, {\n aes: { enumerable: true, value: new aes_js_1.AES(key) },\n name: { enumerable: true, value: name }\n });\n }\n };\n exports3.ModeOfOperation = ModeOfOperation;\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-cbc.js\n var require_mode_cbc = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-cbc.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldSet4 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f7) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f7.call(receiver, value) : f7 ? f7.value = value : state.set(receiver, value), value;\n };\n var __classPrivateFieldGet4 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f7) {\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f7 : kind === \"a\" ? f7.call(receiver) : f7 ? f7.value : state.get(receiver);\n };\n var _CBC_iv;\n var _CBC_lastBlock;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CBC = void 0;\n var mode_js_1 = require_mode();\n var CBC = class _CBC extends mode_js_1.ModeOfOperation {\n constructor(key, iv) {\n super(\"ECC\", key, _CBC);\n _CBC_iv.set(this, void 0);\n _CBC_lastBlock.set(this, void 0);\n if (iv) {\n if (iv.length % 16) {\n throw new TypeError(\"invalid iv size (must be 16 bytes)\");\n }\n __classPrivateFieldSet4(this, _CBC_iv, new Uint8Array(iv), \"f\");\n } else {\n __classPrivateFieldSet4(this, _CBC_iv, new Uint8Array(16), \"f\");\n }\n __classPrivateFieldSet4(this, _CBC_lastBlock, this.iv, \"f\");\n }\n get iv() {\n return new Uint8Array(__classPrivateFieldGet4(this, _CBC_iv, \"f\"));\n }\n encrypt(plaintext) {\n if (plaintext.length % 16) {\n throw new TypeError(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n const ciphertext = new Uint8Array(plaintext.length);\n for (let i3 = 0; i3 < plaintext.length; i3 += 16) {\n for (let j2 = 0; j2 < 16; j2++) {\n __classPrivateFieldGet4(this, _CBC_lastBlock, \"f\")[j2] ^= plaintext[i3 + j2];\n }\n __classPrivateFieldSet4(this, _CBC_lastBlock, this.aes.encrypt(__classPrivateFieldGet4(this, _CBC_lastBlock, \"f\")), \"f\");\n ciphertext.set(__classPrivateFieldGet4(this, _CBC_lastBlock, \"f\"), i3);\n }\n return ciphertext;\n }\n decrypt(ciphertext) {\n if (ciphertext.length % 16) {\n throw new TypeError(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n const plaintext = new Uint8Array(ciphertext.length);\n for (let i3 = 0; i3 < ciphertext.length; i3 += 16) {\n const block = this.aes.decrypt(ciphertext.subarray(i3, i3 + 16));\n for (let j2 = 0; j2 < 16; j2++) {\n plaintext[i3 + j2] = block[j2] ^ __classPrivateFieldGet4(this, _CBC_lastBlock, \"f\")[j2];\n __classPrivateFieldGet4(this, _CBC_lastBlock, \"f\")[j2] = ciphertext[i3 + j2];\n }\n }\n return plaintext;\n }\n };\n exports3.CBC = CBC;\n _CBC_iv = /* @__PURE__ */ new WeakMap(), _CBC_lastBlock = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-cfb.js\n var require_mode_cfb = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-cfb.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldSet4 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f7) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f7.call(receiver, value) : f7 ? f7.value = value : state.set(receiver, value), value;\n };\n var __classPrivateFieldGet4 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f7) {\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f7 : kind === \"a\" ? f7.call(receiver) : f7 ? f7.value : state.get(receiver);\n };\n var _CFB_instances;\n var _CFB_iv;\n var _CFB_shiftRegister;\n var _CFB_shift;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CFB = void 0;\n var mode_js_1 = require_mode();\n var CFB = class _CFB extends mode_js_1.ModeOfOperation {\n constructor(key, iv, segmentSize = 8) {\n super(\"CFB\", key, _CFB);\n _CFB_instances.add(this);\n _CFB_iv.set(this, void 0);\n _CFB_shiftRegister.set(this, void 0);\n if (!Number.isInteger(segmentSize) || segmentSize % 8) {\n throw new TypeError(\"invalid segmentSize\");\n }\n Object.defineProperties(this, {\n segmentSize: { enumerable: true, value: segmentSize }\n });\n if (iv) {\n if (iv.length % 16) {\n throw new TypeError(\"invalid iv size (must be 16 bytes)\");\n }\n __classPrivateFieldSet4(this, _CFB_iv, new Uint8Array(iv), \"f\");\n } else {\n __classPrivateFieldSet4(this, _CFB_iv, new Uint8Array(16), \"f\");\n }\n __classPrivateFieldSet4(this, _CFB_shiftRegister, this.iv, \"f\");\n }\n get iv() {\n return new Uint8Array(__classPrivateFieldGet4(this, _CFB_iv, \"f\"));\n }\n encrypt(plaintext) {\n if (8 * plaintext.length % this.segmentSize) {\n throw new TypeError(\"invalid plaintext size (must be multiple of segmentSize bytes)\");\n }\n const segmentSize = this.segmentSize / 8;\n const ciphertext = new Uint8Array(plaintext);\n for (let i3 = 0; i3 < ciphertext.length; i3 += segmentSize) {\n const xorSegment = this.aes.encrypt(__classPrivateFieldGet4(this, _CFB_shiftRegister, \"f\"));\n for (let j2 = 0; j2 < segmentSize; j2++) {\n ciphertext[i3 + j2] ^= xorSegment[j2];\n }\n __classPrivateFieldGet4(this, _CFB_instances, \"m\", _CFB_shift).call(this, ciphertext.subarray(i3));\n }\n return ciphertext;\n }\n decrypt(ciphertext) {\n if (8 * ciphertext.length % this.segmentSize) {\n throw new TypeError(\"invalid ciphertext size (must be multiple of segmentSize bytes)\");\n }\n const segmentSize = this.segmentSize / 8;\n const plaintext = new Uint8Array(ciphertext);\n for (let i3 = 0; i3 < plaintext.length; i3 += segmentSize) {\n const xorSegment = this.aes.encrypt(__classPrivateFieldGet4(this, _CFB_shiftRegister, \"f\"));\n for (let j2 = 0; j2 < segmentSize; j2++) {\n plaintext[i3 + j2] ^= xorSegment[j2];\n }\n __classPrivateFieldGet4(this, _CFB_instances, \"m\", _CFB_shift).call(this, ciphertext.subarray(i3));\n }\n return plaintext;\n }\n };\n exports3.CFB = CFB;\n _CFB_iv = /* @__PURE__ */ new WeakMap(), _CFB_shiftRegister = /* @__PURE__ */ new WeakMap(), _CFB_instances = /* @__PURE__ */ new WeakSet(), _CFB_shift = function _CFB_shift2(data) {\n const segmentSize = this.segmentSize / 8;\n __classPrivateFieldGet4(this, _CFB_shiftRegister, \"f\").set(__classPrivateFieldGet4(this, _CFB_shiftRegister, \"f\").subarray(segmentSize));\n __classPrivateFieldGet4(this, _CFB_shiftRegister, \"f\").set(data.subarray(0, segmentSize), 16 - segmentSize);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ctr.js\n var require_mode_ctr = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ctr.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldSet4 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f7) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f7.call(receiver, value) : f7 ? f7.value = value : state.set(receiver, value), value;\n };\n var __classPrivateFieldGet4 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f7) {\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f7 : kind === \"a\" ? f7.call(receiver) : f7 ? f7.value : state.get(receiver);\n };\n var _CTR_remaining;\n var _CTR_remainingIndex;\n var _CTR_counter;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.CTR = void 0;\n var mode_js_1 = require_mode();\n var CTR = class _CTR extends mode_js_1.ModeOfOperation {\n constructor(key, initialValue) {\n super(\"CTR\", key, _CTR);\n _CTR_remaining.set(this, void 0);\n _CTR_remainingIndex.set(this, void 0);\n _CTR_counter.set(this, void 0);\n __classPrivateFieldSet4(this, _CTR_counter, new Uint8Array(16), \"f\");\n __classPrivateFieldGet4(this, _CTR_counter, \"f\").fill(0);\n __classPrivateFieldSet4(this, _CTR_remaining, __classPrivateFieldGet4(this, _CTR_counter, \"f\"), \"f\");\n __classPrivateFieldSet4(this, _CTR_remainingIndex, 16, \"f\");\n if (initialValue == null) {\n initialValue = 1;\n }\n if (typeof initialValue === \"number\") {\n this.setCounterValue(initialValue);\n } else {\n this.setCounterBytes(initialValue);\n }\n }\n get counter() {\n return new Uint8Array(__classPrivateFieldGet4(this, _CTR_counter, \"f\"));\n }\n setCounterValue(value) {\n if (!Number.isInteger(value) || value < 0 || value > Number.MAX_SAFE_INTEGER) {\n throw new TypeError(\"invalid counter initial integer value\");\n }\n for (let index2 = 15; index2 >= 0; --index2) {\n __classPrivateFieldGet4(this, _CTR_counter, \"f\")[index2] = value % 256;\n value = Math.floor(value / 256);\n }\n }\n setCounterBytes(value) {\n if (value.length !== 16) {\n throw new TypeError(\"invalid counter initial Uint8Array value length\");\n }\n __classPrivateFieldGet4(this, _CTR_counter, \"f\").set(value);\n }\n increment() {\n for (let i3 = 15; i3 >= 0; i3--) {\n if (__classPrivateFieldGet4(this, _CTR_counter, \"f\")[i3] === 255) {\n __classPrivateFieldGet4(this, _CTR_counter, \"f\")[i3] = 0;\n } else {\n __classPrivateFieldGet4(this, _CTR_counter, \"f\")[i3]++;\n break;\n }\n }\n }\n encrypt(plaintext) {\n var _a, _b;\n const crypttext = new Uint8Array(plaintext);\n for (let i3 = 0; i3 < crypttext.length; i3++) {\n if (__classPrivateFieldGet4(this, _CTR_remainingIndex, \"f\") === 16) {\n __classPrivateFieldSet4(this, _CTR_remaining, this.aes.encrypt(__classPrivateFieldGet4(this, _CTR_counter, \"f\")), \"f\");\n __classPrivateFieldSet4(this, _CTR_remainingIndex, 0, \"f\");\n this.increment();\n }\n crypttext[i3] ^= __classPrivateFieldGet4(this, _CTR_remaining, \"f\")[__classPrivateFieldSet4(this, _CTR_remainingIndex, (_b = __classPrivateFieldGet4(this, _CTR_remainingIndex, \"f\"), _a = _b++, _b), \"f\"), _a];\n }\n return crypttext;\n }\n decrypt(ciphertext) {\n return this.encrypt(ciphertext);\n }\n };\n exports3.CTR = CTR;\n _CTR_remaining = /* @__PURE__ */ new WeakMap(), _CTR_remainingIndex = /* @__PURE__ */ new WeakMap(), _CTR_counter = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ecb.js\n var require_mode_ecb = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ecb.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ECB = void 0;\n var mode_js_1 = require_mode();\n var ECB = class _ECB extends mode_js_1.ModeOfOperation {\n constructor(key) {\n super(\"ECB\", key, _ECB);\n }\n encrypt(plaintext) {\n if (plaintext.length % 16) {\n throw new TypeError(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n const crypttext = new Uint8Array(plaintext.length);\n for (let i3 = 0; i3 < plaintext.length; i3 += 16) {\n crypttext.set(this.aes.encrypt(plaintext.subarray(i3, i3 + 16)), i3);\n }\n return crypttext;\n }\n decrypt(crypttext) {\n if (crypttext.length % 16) {\n throw new TypeError(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n const plaintext = new Uint8Array(crypttext.length);\n for (let i3 = 0; i3 < crypttext.length; i3 += 16) {\n plaintext.set(this.aes.decrypt(crypttext.subarray(i3, i3 + 16)), i3);\n }\n return plaintext;\n }\n };\n exports3.ECB = ECB;\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ofb.js\n var require_mode_ofb = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/mode-ofb.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __classPrivateFieldSet4 = exports3 && exports3.__classPrivateFieldSet || function(receiver, state, value, kind, f7) {\n if (kind === \"m\")\n throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f7.call(receiver, value) : f7 ? f7.value = value : state.set(receiver, value), value;\n };\n var __classPrivateFieldGet4 = exports3 && exports3.__classPrivateFieldGet || function(receiver, state, kind, f7) {\n if (kind === \"a\" && !f7)\n throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f7 : !state.has(receiver))\n throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f7 : kind === \"a\" ? f7.call(receiver) : f7 ? f7.value : state.get(receiver);\n };\n var _OFB_iv;\n var _OFB_lastPrecipher;\n var _OFB_lastPrecipherIndex;\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.OFB = void 0;\n var mode_js_1 = require_mode();\n var OFB = class _OFB extends mode_js_1.ModeOfOperation {\n constructor(key, iv) {\n super(\"OFB\", key, _OFB);\n _OFB_iv.set(this, void 0);\n _OFB_lastPrecipher.set(this, void 0);\n _OFB_lastPrecipherIndex.set(this, void 0);\n if (iv) {\n if (iv.length % 16) {\n throw new TypeError(\"invalid iv size (must be 16 bytes)\");\n }\n __classPrivateFieldSet4(this, _OFB_iv, new Uint8Array(iv), \"f\");\n } else {\n __classPrivateFieldSet4(this, _OFB_iv, new Uint8Array(16), \"f\");\n }\n __classPrivateFieldSet4(this, _OFB_lastPrecipher, this.iv, \"f\");\n __classPrivateFieldSet4(this, _OFB_lastPrecipherIndex, 16, \"f\");\n }\n get iv() {\n return new Uint8Array(__classPrivateFieldGet4(this, _OFB_iv, \"f\"));\n }\n encrypt(plaintext) {\n var _a, _b;\n if (plaintext.length % 16) {\n throw new TypeError(\"invalid plaintext size (must be multiple of 16 bytes)\");\n }\n const ciphertext = new Uint8Array(plaintext);\n for (let i3 = 0; i3 < ciphertext.length; i3++) {\n if (__classPrivateFieldGet4(this, _OFB_lastPrecipherIndex, \"f\") === 16) {\n __classPrivateFieldSet4(this, _OFB_lastPrecipher, this.aes.encrypt(__classPrivateFieldGet4(this, _OFB_lastPrecipher, \"f\")), \"f\");\n __classPrivateFieldSet4(this, _OFB_lastPrecipherIndex, 0, \"f\");\n }\n ciphertext[i3] ^= __classPrivateFieldGet4(this, _OFB_lastPrecipher, \"f\")[__classPrivateFieldSet4(this, _OFB_lastPrecipherIndex, (_b = __classPrivateFieldGet4(this, _OFB_lastPrecipherIndex, \"f\"), _a = _b++, _b), \"f\"), _a];\n }\n return ciphertext;\n }\n decrypt(ciphertext) {\n if (ciphertext.length % 16) {\n throw new TypeError(\"invalid ciphertext size (must be multiple of 16 bytes)\");\n }\n return this.encrypt(ciphertext);\n }\n };\n exports3.OFB = OFB;\n _OFB_iv = /* @__PURE__ */ new WeakMap(), _OFB_lastPrecipher = /* @__PURE__ */ new WeakMap(), _OFB_lastPrecipherIndex = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/padding.js\n var require_padding = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/padding.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pkcs7Strip = exports3.pkcs7Pad = void 0;\n function pkcs7Pad(data) {\n const padder = 16 - data.length % 16;\n const result = new Uint8Array(data.length + padder);\n result.set(data);\n for (let i3 = data.length; i3 < result.length; i3++) {\n result[i3] = padder;\n }\n return result;\n }\n exports3.pkcs7Pad = pkcs7Pad;\n function pkcs7Strip(data) {\n if (data.length < 16) {\n throw new TypeError(\"PKCS#7 invalid length\");\n }\n const padder = data[data.length - 1];\n if (padder > 16) {\n throw new TypeError(\"PKCS#7 padding byte out of range\");\n }\n const length = data.length - padder;\n for (let i3 = 0; i3 < padder; i3++) {\n if (data[length + i3] !== padder) {\n throw new TypeError(\"PKCS#7 invalid padding byte\");\n }\n }\n return new Uint8Array(data.subarray(0, length));\n }\n exports3.pkcs7Strip = pkcs7Strip;\n }\n });\n\n // ../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/index.js\n var require_lib36 = __commonJS({\n \"../../../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/lib.commonjs/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.pkcs7Strip = exports3.pkcs7Pad = exports3.OFB = exports3.ECB = exports3.CTR = exports3.CFB = exports3.CBC = exports3.ModeOfOperation = exports3.AES = void 0;\n var aes_js_1 = require_aes();\n Object.defineProperty(exports3, \"AES\", { enumerable: true, get: function() {\n return aes_js_1.AES;\n } });\n var mode_js_1 = require_mode();\n Object.defineProperty(exports3, \"ModeOfOperation\", { enumerable: true, get: function() {\n return mode_js_1.ModeOfOperation;\n } });\n var mode_cbc_js_1 = require_mode_cbc();\n Object.defineProperty(exports3, \"CBC\", { enumerable: true, get: function() {\n return mode_cbc_js_1.CBC;\n } });\n var mode_cfb_js_1 = require_mode_cfb();\n Object.defineProperty(exports3, \"CFB\", { enumerable: true, get: function() {\n return mode_cfb_js_1.CFB;\n } });\n var mode_ctr_js_1 = require_mode_ctr();\n Object.defineProperty(exports3, \"CTR\", { enumerable: true, get: function() {\n return mode_ctr_js_1.CTR;\n } });\n var mode_ecb_js_1 = require_mode_ecb();\n Object.defineProperty(exports3, \"ECB\", { enumerable: true, get: function() {\n return mode_ecb_js_1.ECB;\n } });\n var mode_ofb_js_1 = require_mode_ofb();\n Object.defineProperty(exports3, \"OFB\", { enumerable: true, get: function() {\n return mode_ofb_js_1.OFB;\n } });\n var padding_js_1 = require_padding();\n Object.defineProperty(exports3, \"pkcs7Pad\", { enumerable: true, get: function() {\n return padding_js_1.pkcs7Pad;\n } });\n Object.defineProperty(exports3, \"pkcs7Strip\", { enumerable: true, get: function() {\n return padding_js_1.pkcs7Strip;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/utils.js\n var require_utils16 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.spelunk = exports3.getPassword = exports3.zpad = exports3.looseArrayify = void 0;\n var index_js_1 = require_utils13();\n function looseArrayify(hexString) {\n if (typeof hexString === \"string\" && !hexString.startsWith(\"0x\")) {\n hexString = \"0x\" + hexString;\n }\n return (0, index_js_1.getBytesCopy)(hexString);\n }\n exports3.looseArrayify = looseArrayify;\n function zpad(value, length) {\n value = String(value);\n while (value.length < length) {\n value = \"0\" + value;\n }\n return value;\n }\n exports3.zpad = zpad;\n function getPassword(password) {\n if (typeof password === \"string\") {\n return (0, index_js_1.toUtf8Bytes)(password, \"NFKC\");\n }\n return (0, index_js_1.getBytesCopy)(password);\n }\n exports3.getPassword = getPassword;\n function spelunk(object, _path) {\n const match = _path.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i);\n (0, index_js_1.assertArgument)(match != null, \"invalid path\", \"path\", _path);\n const path = match[1];\n const type = match[3];\n const reqd = match[4] === \"!\";\n let cur = object;\n for (const comp of path.toLowerCase().split(\".\")) {\n if (Array.isArray(cur)) {\n if (!comp.match(/^[0-9]+$/)) {\n break;\n }\n cur = cur[parseInt(comp)];\n } else if (typeof cur === \"object\") {\n let found = null;\n for (const key in cur) {\n if (key.toLowerCase() === comp) {\n found = cur[key];\n break;\n }\n }\n cur = found;\n } else {\n cur = null;\n }\n if (cur == null) {\n break;\n }\n }\n (0, index_js_1.assertArgument)(!reqd || cur != null, \"missing required value\", \"path\", path);\n if (type && cur != null) {\n if (type === \"int\") {\n if (typeof cur === \"string\" && cur.match(/^-?[0-9]+$/)) {\n return parseInt(cur);\n } else if (Number.isSafeInteger(cur)) {\n return cur;\n }\n }\n if (type === \"number\") {\n if (typeof cur === \"string\" && cur.match(/^-?[0-9.]*$/)) {\n return parseFloat(cur);\n }\n }\n if (type === \"data\") {\n if (typeof cur === \"string\") {\n return looseArrayify(cur);\n }\n }\n if (type === \"array\" && Array.isArray(cur)) {\n return cur;\n }\n if (type === typeof cur) {\n return cur;\n }\n (0, index_js_1.assertArgument)(false, `wrong type found for ${type} `, \"path\", path);\n }\n return cur;\n }\n exports3.spelunk = spelunk;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/json-keystore.js\n var require_json_keystore = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/json-keystore.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encryptKeystoreJson = exports3.encryptKeystoreJsonSync = exports3.decryptKeystoreJson = exports3.decryptKeystoreJsonSync = exports3.isKeystoreJson = void 0;\n var aes_js_1 = require_lib36();\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils13();\n var utils_js_1 = require_utils16();\n var _version_js_1 = require_version32();\n var defaultPath = \"m/44'/60'/0'/0/0\";\n function isKeystoreJson(json) {\n try {\n const data = JSON.parse(json);\n const version7 = data.version != null ? parseInt(data.version) : 0;\n if (version7 === 3) {\n return true;\n }\n } catch (error) {\n }\n return false;\n }\n exports3.isKeystoreJson = isKeystoreJson;\n function decrypt4(data, key, ciphertext) {\n const cipher = (0, utils_js_1.spelunk)(data, \"crypto.cipher:string\");\n if (cipher === \"aes-128-ctr\") {\n const iv = (0, utils_js_1.spelunk)(data, \"crypto.cipherparams.iv:data!\");\n const aesCtr = new aes_js_1.CTR(key, iv);\n return (0, index_js_4.hexlify)(aesCtr.decrypt(ciphertext));\n }\n (0, index_js_4.assert)(false, \"unsupported cipher\", \"UNSUPPORTED_OPERATION\", {\n operation: \"decrypt\"\n });\n }\n function getAccount(data, _key) {\n const key = (0, index_js_4.getBytes)(_key);\n const ciphertext = (0, utils_js_1.spelunk)(data, \"crypto.ciphertext:data!\");\n const computedMAC = (0, index_js_4.hexlify)((0, index_js_2.keccak256)((0, index_js_4.concat)([key.slice(16, 32), ciphertext]))).substring(2);\n (0, index_js_4.assertArgument)(computedMAC === (0, utils_js_1.spelunk)(data, \"crypto.mac:string!\").toLowerCase(), \"incorrect password\", \"password\", \"[ REDACTED ]\");\n const privateKey = decrypt4(data, key.slice(0, 16), ciphertext);\n const address = (0, index_js_3.computeAddress)(privateKey);\n if (data.address) {\n let check2 = data.address.toLowerCase();\n if (!check2.startsWith(\"0x\")) {\n check2 = \"0x\" + check2;\n }\n (0, index_js_4.assertArgument)((0, index_js_1.getAddress)(check2) === address, \"keystore address/privateKey mismatch\", \"address\", data.address);\n }\n const account = { address, privateKey };\n const version7 = (0, utils_js_1.spelunk)(data, \"x-ethers.version:string\");\n if (version7 === \"0.1\") {\n const mnemonicKey = key.slice(32, 64);\n const mnemonicCiphertext = (0, utils_js_1.spelunk)(data, \"x-ethers.mnemonicCiphertext:data!\");\n const mnemonicIv = (0, utils_js_1.spelunk)(data, \"x-ethers.mnemonicCounter:data!\");\n const mnemonicAesCtr = new aes_js_1.CTR(mnemonicKey, mnemonicIv);\n account.mnemonic = {\n path: (0, utils_js_1.spelunk)(data, \"x-ethers.path:string\") || defaultPath,\n locale: (0, utils_js_1.spelunk)(data, \"x-ethers.locale:string\") || \"en\",\n entropy: (0, index_js_4.hexlify)((0, index_js_4.getBytes)(mnemonicAesCtr.decrypt(mnemonicCiphertext)))\n };\n }\n return account;\n }\n function getDecryptKdfParams(data) {\n const kdf = (0, utils_js_1.spelunk)(data, \"crypto.kdf:string\");\n if (kdf && typeof kdf === \"string\") {\n if (kdf.toLowerCase() === \"scrypt\") {\n const salt = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.salt:data!\");\n const N4 = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.n:int!\");\n const r2 = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.r:int!\");\n const p4 = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.p:int!\");\n (0, index_js_4.assertArgument)(N4 > 0 && (N4 & N4 - 1) === 0, \"invalid kdf.N\", \"kdf.N\", N4);\n (0, index_js_4.assertArgument)(r2 > 0 && p4 > 0, \"invalid kdf\", \"kdf\", kdf);\n const dkLen = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.dklen:int!\");\n (0, index_js_4.assertArgument)(dkLen === 32, \"invalid kdf.dklen\", \"kdf.dflen\", dkLen);\n return { name: \"scrypt\", salt, N: N4, r: r2, p: p4, dkLen: 64 };\n } else if (kdf.toLowerCase() === \"pbkdf2\") {\n const salt = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.salt:data!\");\n const prf = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.prf:string!\");\n const algorithm = prf.split(\"-\").pop();\n (0, index_js_4.assertArgument)(algorithm === \"sha256\" || algorithm === \"sha512\", \"invalid kdf.pdf\", \"kdf.pdf\", prf);\n const count = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.c:int!\");\n const dkLen = (0, utils_js_1.spelunk)(data, \"crypto.kdfparams.dklen:int!\");\n (0, index_js_4.assertArgument)(dkLen === 32, \"invalid kdf.dklen\", \"kdf.dklen\", dkLen);\n return { name: \"pbkdf2\", salt, count, dkLen, algorithm };\n }\n }\n (0, index_js_4.assertArgument)(false, \"unsupported key-derivation function\", \"kdf\", kdf);\n }\n function decryptKeystoreJsonSync(json, _password) {\n const data = JSON.parse(json);\n const password = (0, utils_js_1.getPassword)(_password);\n const params = getDecryptKdfParams(data);\n if (params.name === \"pbkdf2\") {\n const { salt: salt2, count, dkLen: dkLen2, algorithm } = params;\n const key2 = (0, index_js_2.pbkdf2)(password, salt2, count, dkLen2, algorithm);\n return getAccount(data, key2);\n }\n (0, index_js_4.assert)(params.name === \"scrypt\", \"cannot be reached\", \"UNKNOWN_ERROR\", { params });\n const { salt, N: N4, r: r2, p: p4, dkLen } = params;\n const key = (0, index_js_2.scryptSync)(password, salt, N4, r2, p4, dkLen);\n return getAccount(data, key);\n }\n exports3.decryptKeystoreJsonSync = decryptKeystoreJsonSync;\n function stall(duration) {\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve();\n }, duration);\n });\n }\n async function decryptKeystoreJson(json, _password, progress) {\n const data = JSON.parse(json);\n const password = (0, utils_js_1.getPassword)(_password);\n const params = getDecryptKdfParams(data);\n if (params.name === \"pbkdf2\") {\n if (progress) {\n progress(0);\n await stall(0);\n }\n const { salt: salt2, count, dkLen: dkLen2, algorithm } = params;\n const key2 = (0, index_js_2.pbkdf2)(password, salt2, count, dkLen2, algorithm);\n if (progress) {\n progress(1);\n await stall(0);\n }\n return getAccount(data, key2);\n }\n (0, index_js_4.assert)(params.name === \"scrypt\", \"cannot be reached\", \"UNKNOWN_ERROR\", { params });\n const { salt, N: N4, r: r2, p: p4, dkLen } = params;\n const key = await (0, index_js_2.scrypt)(password, salt, N4, r2, p4, dkLen, progress);\n return getAccount(data, key);\n }\n exports3.decryptKeystoreJson = decryptKeystoreJson;\n function getEncryptKdfParams(options) {\n const salt = options.salt != null ? (0, index_js_4.getBytes)(options.salt, \"options.salt\") : (0, index_js_2.randomBytes)(32);\n let N4 = 1 << 17, r2 = 8, p4 = 1;\n if (options.scrypt) {\n if (options.scrypt.N) {\n N4 = options.scrypt.N;\n }\n if (options.scrypt.r) {\n r2 = options.scrypt.r;\n }\n if (options.scrypt.p) {\n p4 = options.scrypt.p;\n }\n }\n (0, index_js_4.assertArgument)(typeof N4 === \"number\" && N4 > 0 && Number.isSafeInteger(N4) && (BigInt(N4) & BigInt(N4 - 1)) === BigInt(0), \"invalid scrypt N parameter\", \"options.N\", N4);\n (0, index_js_4.assertArgument)(typeof r2 === \"number\" && r2 > 0 && Number.isSafeInteger(r2), \"invalid scrypt r parameter\", \"options.r\", r2);\n (0, index_js_4.assertArgument)(typeof p4 === \"number\" && p4 > 0 && Number.isSafeInteger(p4), \"invalid scrypt p parameter\", \"options.p\", p4);\n return { name: \"scrypt\", dkLen: 32, salt, N: N4, r: r2, p: p4 };\n }\n function _encryptKeystore(key, kdf, account, options) {\n const privateKey = (0, index_js_4.getBytes)(account.privateKey, \"privateKey\");\n const iv = options.iv != null ? (0, index_js_4.getBytes)(options.iv, \"options.iv\") : (0, index_js_2.randomBytes)(16);\n (0, index_js_4.assertArgument)(iv.length === 16, \"invalid options.iv length\", \"options.iv\", options.iv);\n const uuidRandom = options.uuid != null ? (0, index_js_4.getBytes)(options.uuid, \"options.uuid\") : (0, index_js_2.randomBytes)(16);\n (0, index_js_4.assertArgument)(uuidRandom.length === 16, \"invalid options.uuid length\", \"options.uuid\", options.iv);\n const derivedKey = key.slice(0, 16);\n const macPrefix = key.slice(16, 32);\n const aesCtr = new aes_js_1.CTR(derivedKey, iv);\n const ciphertext = (0, index_js_4.getBytes)(aesCtr.encrypt(privateKey));\n const mac = (0, index_js_2.keccak256)((0, index_js_4.concat)([macPrefix, ciphertext]));\n const data = {\n address: account.address.substring(2).toLowerCase(),\n id: (0, index_js_4.uuidV4)(uuidRandom),\n version: 3,\n Crypto: {\n cipher: \"aes-128-ctr\",\n cipherparams: {\n iv: (0, index_js_4.hexlify)(iv).substring(2)\n },\n ciphertext: (0, index_js_4.hexlify)(ciphertext).substring(2),\n kdf: \"scrypt\",\n kdfparams: {\n salt: (0, index_js_4.hexlify)(kdf.salt).substring(2),\n n: kdf.N,\n dklen: 32,\n p: kdf.p,\n r: kdf.r\n },\n mac: mac.substring(2)\n }\n };\n if (account.mnemonic) {\n const client = options.client != null ? options.client : `ethers/${_version_js_1.version}`;\n const path = account.mnemonic.path || defaultPath;\n const locale = account.mnemonic.locale || \"en\";\n const mnemonicKey = key.slice(32, 64);\n const entropy = (0, index_js_4.getBytes)(account.mnemonic.entropy, \"account.mnemonic.entropy\");\n const mnemonicIv = (0, index_js_2.randomBytes)(16);\n const mnemonicAesCtr = new aes_js_1.CTR(mnemonicKey, mnemonicIv);\n const mnemonicCiphertext = (0, index_js_4.getBytes)(mnemonicAesCtr.encrypt(entropy));\n const now = /* @__PURE__ */ new Date();\n const timestamp = now.getUTCFullYear() + \"-\" + (0, utils_js_1.zpad)(now.getUTCMonth() + 1, 2) + \"-\" + (0, utils_js_1.zpad)(now.getUTCDate(), 2) + \"T\" + (0, utils_js_1.zpad)(now.getUTCHours(), 2) + \"-\" + (0, utils_js_1.zpad)(now.getUTCMinutes(), 2) + \"-\" + (0, utils_js_1.zpad)(now.getUTCSeconds(), 2) + \".0Z\";\n const gethFilename = \"UTC--\" + timestamp + \"--\" + data.address;\n data[\"x-ethers\"] = {\n client,\n gethFilename,\n path,\n locale,\n mnemonicCounter: (0, index_js_4.hexlify)(mnemonicIv).substring(2),\n mnemonicCiphertext: (0, index_js_4.hexlify)(mnemonicCiphertext).substring(2),\n version: \"0.1\"\n };\n }\n return JSON.stringify(data);\n }\n function encryptKeystoreJsonSync(account, password, options) {\n if (options == null) {\n options = {};\n }\n const passwordBytes = (0, utils_js_1.getPassword)(password);\n const kdf = getEncryptKdfParams(options);\n const key = (0, index_js_2.scryptSync)(passwordBytes, kdf.salt, kdf.N, kdf.r, kdf.p, 64);\n return _encryptKeystore((0, index_js_4.getBytes)(key), kdf, account, options);\n }\n exports3.encryptKeystoreJsonSync = encryptKeystoreJsonSync;\n async function encryptKeystoreJson(account, password, options) {\n if (options == null) {\n options = {};\n }\n const passwordBytes = (0, utils_js_1.getPassword)(password);\n const kdf = getEncryptKdfParams(options);\n const key = await (0, index_js_2.scrypt)(passwordBytes, kdf.salt, kdf.N, kdf.r, kdf.p, 64, options.progressCallback);\n return _encryptKeystore((0, index_js_4.getBytes)(key), kdf, account, options);\n }\n exports3.encryptKeystoreJson = encryptKeystoreJson;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/hdwallet.js\n var require_hdwallet = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/hdwallet.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getIndexedAccountPath = exports3.getAccountPath = exports3.HDNodeVoidWallet = exports3.HDNodeWallet = exports3.defaultPath = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_providers();\n var index_js_3 = require_transaction2();\n var index_js_4 = require_utils13();\n var lang_en_js_1 = require_lang_en2();\n var base_wallet_js_1 = require_base_wallet();\n var mnemonic_js_1 = require_mnemonic();\n var json_keystore_js_1 = require_json_keystore();\n exports3.defaultPath = \"m/44'/60'/0'/0/0\";\n var MasterSecret = new Uint8Array([66, 105, 116, 99, 111, 105, 110, 32, 115, 101, 101, 100]);\n var HardenedBit = 2147483648;\n var N4 = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n var Nibbles = \"0123456789abcdef\";\n function zpad(value, length) {\n let result = \"\";\n while (value) {\n result = Nibbles[value % 16] + result;\n value = Math.trunc(value / 16);\n }\n while (result.length < length * 2) {\n result = \"0\" + result;\n }\n return \"0x\" + result;\n }\n function encodeBase58Check(_value) {\n const value = (0, index_js_4.getBytes)(_value);\n const check2 = (0, index_js_4.dataSlice)((0, index_js_1.sha256)((0, index_js_1.sha256)(value)), 0, 4);\n const bytes = (0, index_js_4.concat)([value, check2]);\n return (0, index_js_4.encodeBase58)(bytes);\n }\n var _guard = {};\n function ser_I(index2, chainCode, publicKey, privateKey) {\n const data = new Uint8Array(37);\n if (index2 & HardenedBit) {\n (0, index_js_4.assert)(privateKey != null, \"cannot derive child of neutered node\", \"UNSUPPORTED_OPERATION\", {\n operation: \"deriveChild\"\n });\n data.set((0, index_js_4.getBytes)(privateKey), 1);\n } else {\n data.set((0, index_js_4.getBytes)(publicKey));\n }\n for (let i3 = 24; i3 >= 0; i3 -= 8) {\n data[33 + (i3 >> 3)] = index2 >> 24 - i3 & 255;\n }\n const I2 = (0, index_js_4.getBytes)((0, index_js_1.computeHmac)(\"sha512\", chainCode, data));\n return { IL: I2.slice(0, 32), IR: I2.slice(32) };\n }\n function derivePath(node, path) {\n const components = path.split(\"/\");\n (0, index_js_4.assertArgument)(components.length > 0, \"invalid path\", \"path\", path);\n if (components[0] === \"m\") {\n (0, index_js_4.assertArgument)(node.depth === 0, `cannot derive root path (i.e. path starting with \"m/\") for a node at non-zero depth ${node.depth}`, \"path\", path);\n components.shift();\n }\n let result = node;\n for (let i3 = 0; i3 < components.length; i3++) {\n const component = components[i3];\n if (component.match(/^[0-9]+'$/)) {\n const index2 = parseInt(component.substring(0, component.length - 1));\n (0, index_js_4.assertArgument)(index2 < HardenedBit, \"invalid path index\", `path[${i3}]`, component);\n result = result.deriveChild(HardenedBit + index2);\n } else if (component.match(/^[0-9]+$/)) {\n const index2 = parseInt(component);\n (0, index_js_4.assertArgument)(index2 < HardenedBit, \"invalid path index\", `path[${i3}]`, component);\n result = result.deriveChild(index2);\n } else {\n (0, index_js_4.assertArgument)(false, \"invalid path component\", `path[${i3}]`, component);\n }\n }\n return result;\n }\n var HDNodeWallet = class _HDNodeWallet extends base_wallet_js_1.BaseWallet {\n /**\n * The compressed public key.\n */\n publicKey;\n /**\n * The fingerprint.\n *\n * A fingerprint allows quick qay to detect parent and child nodes,\n * but developers should be prepared to deal with collisions as it\n * is only 4 bytes.\n */\n fingerprint;\n /**\n * The parent fingerprint.\n */\n parentFingerprint;\n /**\n * The mnemonic used to create this HD Node, if available.\n *\n * Sources such as extended keys do not encode the mnemonic, in\n * which case this will be ``null``.\n */\n mnemonic;\n /**\n * The chaincode, which is effectively a public key used\n * to derive children.\n */\n chainCode;\n /**\n * The derivation path of this wallet.\n *\n * Since extended keys do not provide full path details, this\n * may be ``null``, if instantiated from a source that does not\n * encode it.\n */\n path;\n /**\n * The child index of this wallet. Values over ``2 *\\* 31`` indicate\n * the node is hardened.\n */\n index;\n /**\n * The depth of this wallet, which is the number of components\n * in its path.\n */\n depth;\n /**\n * @private\n */\n constructor(guard, signingKey, parentFingerprint, chainCode, path, index2, depth, mnemonic, provider) {\n super(signingKey, provider);\n (0, index_js_4.assertPrivate)(guard, _guard, \"HDNodeWallet\");\n (0, index_js_4.defineProperties)(this, { publicKey: signingKey.compressedPublicKey });\n const fingerprint = (0, index_js_4.dataSlice)((0, index_js_1.ripemd160)((0, index_js_1.sha256)(this.publicKey)), 0, 4);\n (0, index_js_4.defineProperties)(this, {\n parentFingerprint,\n fingerprint,\n chainCode,\n path,\n index: index2,\n depth\n });\n (0, index_js_4.defineProperties)(this, { mnemonic });\n }\n connect(provider) {\n return new _HDNodeWallet(_guard, this.signingKey, this.parentFingerprint, this.chainCode, this.path, this.index, this.depth, this.mnemonic, provider);\n }\n #account() {\n const account = { address: this.address, privateKey: this.privateKey };\n const m2 = this.mnemonic;\n if (this.path && m2 && m2.wordlist.locale === \"en\" && m2.password === \"\") {\n account.mnemonic = {\n path: this.path,\n locale: \"en\",\n entropy: m2.entropy\n };\n }\n return account;\n }\n /**\n * Resolves to a [JSON Keystore Wallet](json-wallets) encrypted with\n * %%password%%.\n *\n * If %%progressCallback%% is specified, it will receive periodic\n * updates as the encryption process progreses.\n */\n async encrypt(password, progressCallback) {\n return await (0, json_keystore_js_1.encryptKeystoreJson)(this.#account(), password, { progressCallback });\n }\n /**\n * Returns a [JSON Keystore Wallet](json-wallets) encryped with\n * %%password%%.\n *\n * It is preferred to use the [async version](encrypt) instead,\n * which allows a [[ProgressCallback]] to keep the user informed.\n *\n * This method will block the event loop (freezing all UI) until\n * it is complete, which may be a non-trivial duration.\n */\n encryptSync(password) {\n return (0, json_keystore_js_1.encryptKeystoreJsonSync)(this.#account(), password);\n }\n /**\n * The extended key.\n *\n * This key will begin with the prefix ``xpriv`` and can be used to\n * reconstruct this HD Node to derive its children.\n */\n get extendedKey() {\n (0, index_js_4.assert)(this.depth < 256, \"Depth too deep\", \"UNSUPPORTED_OPERATION\", { operation: \"extendedKey\" });\n return encodeBase58Check((0, index_js_4.concat)([\n \"0x0488ADE4\",\n zpad(this.depth, 1),\n this.parentFingerprint,\n zpad(this.index, 4),\n this.chainCode,\n (0, index_js_4.concat)([\"0x00\", this.privateKey])\n ]));\n }\n /**\n * Returns true if this wallet has a path, providing a Type Guard\n * that the path is non-null.\n */\n hasPath() {\n return this.path != null;\n }\n /**\n * Returns a neutered HD Node, which removes the private details\n * of an HD Node.\n *\n * A neutered node has no private key, but can be used to derive\n * child addresses and other public data about the HD Node.\n */\n neuter() {\n return new HDNodeVoidWallet(_guard, this.address, this.publicKey, this.parentFingerprint, this.chainCode, this.path, this.index, this.depth, this.provider);\n }\n /**\n * Return the child for %%index%%.\n */\n deriveChild(_index) {\n const index2 = (0, index_js_4.getNumber)(_index, \"index\");\n (0, index_js_4.assertArgument)(index2 <= 4294967295, \"invalid index\", \"index\", index2);\n let path = this.path;\n if (path) {\n path += \"/\" + (index2 & ~HardenedBit);\n if (index2 & HardenedBit) {\n path += \"'\";\n }\n }\n const { IR, IL } = ser_I(index2, this.chainCode, this.publicKey, this.privateKey);\n const ki = new index_js_1.SigningKey((0, index_js_4.toBeHex)(((0, index_js_4.toBigInt)(IL) + BigInt(this.privateKey)) % N4, 32));\n return new _HDNodeWallet(_guard, ki, this.fingerprint, (0, index_js_4.hexlify)(IR), path, index2, this.depth + 1, this.mnemonic, this.provider);\n }\n /**\n * Return the HDNode for %%path%% from this node.\n */\n derivePath(path) {\n return derivePath(this, path);\n }\n static #fromSeed(_seed, mnemonic) {\n (0, index_js_4.assertArgument)((0, index_js_4.isBytesLike)(_seed), \"invalid seed\", \"seed\", \"[REDACTED]\");\n const seed = (0, index_js_4.getBytes)(_seed, \"seed\");\n (0, index_js_4.assertArgument)(seed.length >= 16 && seed.length <= 64, \"invalid seed\", \"seed\", \"[REDACTED]\");\n const I2 = (0, index_js_4.getBytes)((0, index_js_1.computeHmac)(\"sha512\", MasterSecret, seed));\n const signingKey = new index_js_1.SigningKey((0, index_js_4.hexlify)(I2.slice(0, 32)));\n return new _HDNodeWallet(_guard, signingKey, \"0x00000000\", (0, index_js_4.hexlify)(I2.slice(32)), \"m\", 0, 0, mnemonic, null);\n }\n /**\n * Creates a new HD Node from %%extendedKey%%.\n *\n * If the %%extendedKey%% will either have a prefix or ``xpub`` or\n * ``xpriv``, returning a neutered HD Node ([[HDNodeVoidWallet]])\n * or full HD Node ([[HDNodeWallet) respectively.\n */\n static fromExtendedKey(extendedKey) {\n const bytes = (0, index_js_4.toBeArray)((0, index_js_4.decodeBase58)(extendedKey));\n (0, index_js_4.assertArgument)(bytes.length === 82 || encodeBase58Check(bytes.slice(0, 78)) === extendedKey, \"invalid extended key\", \"extendedKey\", \"[ REDACTED ]\");\n const depth = bytes[4];\n const parentFingerprint = (0, index_js_4.hexlify)(bytes.slice(5, 9));\n const index2 = parseInt((0, index_js_4.hexlify)(bytes.slice(9, 13)).substring(2), 16);\n const chainCode = (0, index_js_4.hexlify)(bytes.slice(13, 45));\n const key = bytes.slice(45, 78);\n switch ((0, index_js_4.hexlify)(bytes.slice(0, 4))) {\n case \"0x0488b21e\":\n case \"0x043587cf\": {\n const publicKey = (0, index_js_4.hexlify)(key);\n return new HDNodeVoidWallet(_guard, (0, index_js_3.computeAddress)(publicKey), publicKey, parentFingerprint, chainCode, null, index2, depth, null);\n }\n case \"0x0488ade4\":\n case \"0x04358394 \":\n if (key[0] !== 0) {\n break;\n }\n return new _HDNodeWallet(_guard, new index_js_1.SigningKey(key.slice(1)), parentFingerprint, chainCode, null, index2, depth, null, null);\n }\n (0, index_js_4.assertArgument)(false, \"invalid extended key prefix\", \"extendedKey\", \"[ REDACTED ]\");\n }\n /**\n * Creates a new random HDNode.\n */\n static createRandom(password, path, wordlist) {\n if (password == null) {\n password = \"\";\n }\n if (path == null) {\n path = exports3.defaultPath;\n }\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n const mnemonic = mnemonic_js_1.Mnemonic.fromEntropy((0, index_js_1.randomBytes)(16), password, wordlist);\n return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path);\n }\n /**\n * Create an HD Node from %%mnemonic%%.\n */\n static fromMnemonic(mnemonic, path) {\n if (!path) {\n path = exports3.defaultPath;\n }\n return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path);\n }\n /**\n * Creates an HD Node from a mnemonic %%phrase%%.\n */\n static fromPhrase(phrase, password, path, wordlist) {\n if (password == null) {\n password = \"\";\n }\n if (path == null) {\n path = exports3.defaultPath;\n }\n if (wordlist == null) {\n wordlist = lang_en_js_1.LangEn.wordlist();\n }\n const mnemonic = mnemonic_js_1.Mnemonic.fromPhrase(phrase, password, wordlist);\n return _HDNodeWallet.#fromSeed(mnemonic.computeSeed(), mnemonic).derivePath(path);\n }\n /**\n * Creates an HD Node from a %%seed%%.\n */\n static fromSeed(seed) {\n return _HDNodeWallet.#fromSeed(seed, null);\n }\n };\n exports3.HDNodeWallet = HDNodeWallet;\n var HDNodeVoidWallet = class _HDNodeVoidWallet extends index_js_2.VoidSigner {\n /**\n * The compressed public key.\n */\n publicKey;\n /**\n * The fingerprint.\n *\n * A fingerprint allows quick qay to detect parent and child nodes,\n * but developers should be prepared to deal with collisions as it\n * is only 4 bytes.\n */\n fingerprint;\n /**\n * The parent node fingerprint.\n */\n parentFingerprint;\n /**\n * The chaincode, which is effectively a public key used\n * to derive children.\n */\n chainCode;\n /**\n * The derivation path of this wallet.\n *\n * Since extended keys do not provider full path details, this\n * may be ``null``, if instantiated from a source that does not\n * enocde it.\n */\n path;\n /**\n * The child index of this wallet. Values over ``2 *\\* 31`` indicate\n * the node is hardened.\n */\n index;\n /**\n * The depth of this wallet, which is the number of components\n * in its path.\n */\n depth;\n /**\n * @private\n */\n constructor(guard, address, publicKey, parentFingerprint, chainCode, path, index2, depth, provider) {\n super(address, provider);\n (0, index_js_4.assertPrivate)(guard, _guard, \"HDNodeVoidWallet\");\n (0, index_js_4.defineProperties)(this, { publicKey });\n const fingerprint = (0, index_js_4.dataSlice)((0, index_js_1.ripemd160)((0, index_js_1.sha256)(publicKey)), 0, 4);\n (0, index_js_4.defineProperties)(this, {\n publicKey,\n fingerprint,\n parentFingerprint,\n chainCode,\n path,\n index: index2,\n depth\n });\n }\n connect(provider) {\n return new _HDNodeVoidWallet(_guard, this.address, this.publicKey, this.parentFingerprint, this.chainCode, this.path, this.index, this.depth, provider);\n }\n /**\n * The extended key.\n *\n * This key will begin with the prefix ``xpub`` and can be used to\n * reconstruct this neutered key to derive its children addresses.\n */\n get extendedKey() {\n (0, index_js_4.assert)(this.depth < 256, \"Depth too deep\", \"UNSUPPORTED_OPERATION\", { operation: \"extendedKey\" });\n return encodeBase58Check((0, index_js_4.concat)([\n \"0x0488B21E\",\n zpad(this.depth, 1),\n this.parentFingerprint,\n zpad(this.index, 4),\n this.chainCode,\n this.publicKey\n ]));\n }\n /**\n * Returns true if this wallet has a path, providing a Type Guard\n * that the path is non-null.\n */\n hasPath() {\n return this.path != null;\n }\n /**\n * Return the child for %%index%%.\n */\n deriveChild(_index) {\n const index2 = (0, index_js_4.getNumber)(_index, \"index\");\n (0, index_js_4.assertArgument)(index2 <= 4294967295, \"invalid index\", \"index\", index2);\n let path = this.path;\n if (path) {\n path += \"/\" + (index2 & ~HardenedBit);\n if (index2 & HardenedBit) {\n path += \"'\";\n }\n }\n const { IR, IL } = ser_I(index2, this.chainCode, this.publicKey, null);\n const Ki = index_js_1.SigningKey.addPoints(IL, this.publicKey, true);\n const address = (0, index_js_3.computeAddress)(Ki);\n return new _HDNodeVoidWallet(_guard, address, Ki, this.fingerprint, (0, index_js_4.hexlify)(IR), path, index2, this.depth + 1, this.provider);\n }\n /**\n * Return the signer for %%path%% from this node.\n */\n derivePath(path) {\n return derivePath(this, path);\n }\n };\n exports3.HDNodeVoidWallet = HDNodeVoidWallet;\n function getAccountPath(_index) {\n const index2 = (0, index_js_4.getNumber)(_index, \"index\");\n (0, index_js_4.assertArgument)(index2 >= 0 && index2 < HardenedBit, \"invalid account index\", \"index\", index2);\n return `m/44'/60'/${index2}'/0/0`;\n }\n exports3.getAccountPath = getAccountPath;\n function getIndexedAccountPath(_index) {\n const index2 = (0, index_js_4.getNumber)(_index, \"index\");\n (0, index_js_4.assertArgument)(index2 >= 0 && index2 < HardenedBit, \"invalid account index\", \"index\", index2);\n return `m/44'/60'/0'/0/${index2}`;\n }\n exports3.getIndexedAccountPath = getIndexedAccountPath;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/json-crowdsale.js\n var require_json_crowdsale = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/json-crowdsale.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decryptCrowdsaleJson = exports3.isCrowdsaleJson = void 0;\n var aes_js_1 = require_lib36();\n var index_js_1 = require_address3();\n var index_js_2 = require_crypto2();\n var index_js_3 = require_hash2();\n var index_js_4 = require_utils13();\n var utils_js_1 = require_utils16();\n function isCrowdsaleJson(json) {\n try {\n const data = JSON.parse(json);\n if (data.encseed) {\n return true;\n }\n } catch (error) {\n }\n return false;\n }\n exports3.isCrowdsaleJson = isCrowdsaleJson;\n function decryptCrowdsaleJson(json, _password) {\n const data = JSON.parse(json);\n const password = (0, utils_js_1.getPassword)(_password);\n const address = (0, index_js_1.getAddress)((0, utils_js_1.spelunk)(data, \"ethaddr:string!\"));\n const encseed = (0, utils_js_1.looseArrayify)((0, utils_js_1.spelunk)(data, \"encseed:string!\"));\n (0, index_js_4.assertArgument)(encseed && encseed.length % 16 === 0, \"invalid encseed\", \"json\", json);\n const key = (0, index_js_4.getBytes)((0, index_js_2.pbkdf2)(password, password, 2e3, 32, \"sha256\")).slice(0, 16);\n const iv = encseed.slice(0, 16);\n const encryptedSeed = encseed.slice(16);\n const aesCbc = new aes_js_1.CBC(key, iv);\n const seed = (0, aes_js_1.pkcs7Strip)((0, index_js_4.getBytes)(aesCbc.decrypt(encryptedSeed)));\n let seedHex = \"\";\n for (let i3 = 0; i3 < seed.length; i3++) {\n seedHex += String.fromCharCode(seed[i3]);\n }\n return { address, privateKey: (0, index_js_3.id)(seedHex) };\n }\n exports3.decryptCrowdsaleJson = decryptCrowdsaleJson;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/wallet.js\n var require_wallet = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/wallet.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wallet = void 0;\n var index_js_1 = require_crypto2();\n var index_js_2 = require_utils13();\n var base_wallet_js_1 = require_base_wallet();\n var hdwallet_js_1 = require_hdwallet();\n var json_crowdsale_js_1 = require_json_crowdsale();\n var json_keystore_js_1 = require_json_keystore();\n var mnemonic_js_1 = require_mnemonic();\n function stall(duration) {\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve();\n }, duration);\n });\n }\n var Wallet = class _Wallet extends base_wallet_js_1.BaseWallet {\n /**\n * Create a new wallet for the private %%key%%, optionally connected\n * to %%provider%%.\n */\n constructor(key, provider) {\n if (typeof key === \"string\" && !key.startsWith(\"0x\")) {\n key = \"0x\" + key;\n }\n let signingKey = typeof key === \"string\" ? new index_js_1.SigningKey(key) : key;\n super(signingKey, provider);\n }\n connect(provider) {\n return new _Wallet(this.signingKey, provider);\n }\n /**\n * Resolves to a [JSON Keystore Wallet](json-wallets) encrypted with\n * %%password%%.\n *\n * If %%progressCallback%% is specified, it will receive periodic\n * updates as the encryption process progreses.\n */\n async encrypt(password, progressCallback) {\n const account = { address: this.address, privateKey: this.privateKey };\n return await (0, json_keystore_js_1.encryptKeystoreJson)(account, password, { progressCallback });\n }\n /**\n * Returns a [JSON Keystore Wallet](json-wallets) encryped with\n * %%password%%.\n *\n * It is preferred to use the [async version](encrypt) instead,\n * which allows a [[ProgressCallback]] to keep the user informed.\n *\n * This method will block the event loop (freezing all UI) until\n * it is complete, which may be a non-trivial duration.\n */\n encryptSync(password) {\n const account = { address: this.address, privateKey: this.privateKey };\n return (0, json_keystore_js_1.encryptKeystoreJsonSync)(account, password);\n }\n static #fromAccount(account) {\n (0, index_js_2.assertArgument)(account, \"invalid JSON wallet\", \"json\", \"[ REDACTED ]\");\n if (\"mnemonic\" in account && account.mnemonic && account.mnemonic.locale === \"en\") {\n const mnemonic = mnemonic_js_1.Mnemonic.fromEntropy(account.mnemonic.entropy);\n const wallet2 = hdwallet_js_1.HDNodeWallet.fromMnemonic(mnemonic, account.mnemonic.path);\n if (wallet2.address === account.address && wallet2.privateKey === account.privateKey) {\n return wallet2;\n }\n console.log(\"WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key\");\n }\n const wallet = new _Wallet(account.privateKey);\n (0, index_js_2.assertArgument)(wallet.address === account.address, \"address/privateKey mismatch\", \"json\", \"[ REDACTED ]\");\n return wallet;\n }\n /**\n * Creates (asynchronously) a **Wallet** by decrypting the %%json%%\n * with %%password%%.\n *\n * If %%progress%% is provided, it is called periodically during\n * decryption so that any UI can be updated.\n */\n static async fromEncryptedJson(json, password, progress) {\n let account = null;\n if ((0, json_keystore_js_1.isKeystoreJson)(json)) {\n account = await (0, json_keystore_js_1.decryptKeystoreJson)(json, password, progress);\n } else if ((0, json_crowdsale_js_1.isCrowdsaleJson)(json)) {\n if (progress) {\n progress(0);\n await stall(0);\n }\n account = (0, json_crowdsale_js_1.decryptCrowdsaleJson)(json, password);\n if (progress) {\n progress(1);\n await stall(0);\n }\n }\n return _Wallet.#fromAccount(account);\n }\n /**\n * Creates a **Wallet** by decrypting the %%json%% with %%password%%.\n *\n * The [[fromEncryptedJson]] method is preferred, as this method\n * will lock up and freeze the UI during decryption, which may take\n * some time.\n */\n static fromEncryptedJsonSync(json, password) {\n let account = null;\n if ((0, json_keystore_js_1.isKeystoreJson)(json)) {\n account = (0, json_keystore_js_1.decryptKeystoreJsonSync)(json, password);\n } else if ((0, json_crowdsale_js_1.isCrowdsaleJson)(json)) {\n account = (0, json_crowdsale_js_1.decryptCrowdsaleJson)(json, password);\n } else {\n (0, index_js_2.assertArgument)(false, \"invalid JSON wallet\", \"json\", \"[ REDACTED ]\");\n }\n return _Wallet.#fromAccount(account);\n }\n /**\n * Creates a new random [[HDNodeWallet]] using the available\n * [cryptographic random source](randomBytes).\n *\n * If there is no crytographic random source, this will throw.\n */\n static createRandom(provider) {\n const wallet = hdwallet_js_1.HDNodeWallet.createRandom();\n if (provider) {\n return wallet.connect(provider);\n }\n return wallet;\n }\n /**\n * Creates a [[HDNodeWallet]] for %%phrase%%.\n */\n static fromPhrase(phrase, provider) {\n const wallet = hdwallet_js_1.HDNodeWallet.fromPhrase(phrase);\n if (provider) {\n return wallet.connect(provider);\n }\n return wallet;\n }\n };\n exports3.Wallet = Wallet;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/index.js\n var require_wallet2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wallet/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.Wallet = exports3.Mnemonic = exports3.encryptKeystoreJsonSync = exports3.encryptKeystoreJson = exports3.decryptKeystoreJson = exports3.decryptKeystoreJsonSync = exports3.isKeystoreJson = exports3.decryptCrowdsaleJson = exports3.isCrowdsaleJson = exports3.HDNodeVoidWallet = exports3.HDNodeWallet = exports3.getIndexedAccountPath = exports3.getAccountPath = exports3.defaultPath = exports3.BaseWallet = void 0;\n var base_wallet_js_1 = require_base_wallet();\n Object.defineProperty(exports3, \"BaseWallet\", { enumerable: true, get: function() {\n return base_wallet_js_1.BaseWallet;\n } });\n var hdwallet_js_1 = require_hdwallet();\n Object.defineProperty(exports3, \"defaultPath\", { enumerable: true, get: function() {\n return hdwallet_js_1.defaultPath;\n } });\n Object.defineProperty(exports3, \"getAccountPath\", { enumerable: true, get: function() {\n return hdwallet_js_1.getAccountPath;\n } });\n Object.defineProperty(exports3, \"getIndexedAccountPath\", { enumerable: true, get: function() {\n return hdwallet_js_1.getIndexedAccountPath;\n } });\n Object.defineProperty(exports3, \"HDNodeWallet\", { enumerable: true, get: function() {\n return hdwallet_js_1.HDNodeWallet;\n } });\n Object.defineProperty(exports3, \"HDNodeVoidWallet\", { enumerable: true, get: function() {\n return hdwallet_js_1.HDNodeVoidWallet;\n } });\n var json_crowdsale_js_1 = require_json_crowdsale();\n Object.defineProperty(exports3, \"isCrowdsaleJson\", { enumerable: true, get: function() {\n return json_crowdsale_js_1.isCrowdsaleJson;\n } });\n Object.defineProperty(exports3, \"decryptCrowdsaleJson\", { enumerable: true, get: function() {\n return json_crowdsale_js_1.decryptCrowdsaleJson;\n } });\n var json_keystore_js_1 = require_json_keystore();\n Object.defineProperty(exports3, \"isKeystoreJson\", { enumerable: true, get: function() {\n return json_keystore_js_1.isKeystoreJson;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreJsonSync\", { enumerable: true, get: function() {\n return json_keystore_js_1.decryptKeystoreJsonSync;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreJson\", { enumerable: true, get: function() {\n return json_keystore_js_1.decryptKeystoreJson;\n } });\n Object.defineProperty(exports3, \"encryptKeystoreJson\", { enumerable: true, get: function() {\n return json_keystore_js_1.encryptKeystoreJson;\n } });\n Object.defineProperty(exports3, \"encryptKeystoreJsonSync\", { enumerable: true, get: function() {\n return json_keystore_js_1.encryptKeystoreJsonSync;\n } });\n var mnemonic_js_1 = require_mnemonic();\n Object.defineProperty(exports3, \"Mnemonic\", { enumerable: true, get: function() {\n return mnemonic_js_1.Mnemonic;\n } });\n var wallet_js_1 = require_wallet();\n Object.defineProperty(exports3, \"Wallet\", { enumerable: true, get: function() {\n return wallet_js_1.Wallet;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/bit-reader.js\n var require_bit_reader = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/bit-reader.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeBits = void 0;\n var Base64 = \")!@#$%^&*(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_\";\n function decodeBits(width, data) {\n const maxValue = (1 << width) - 1;\n const result = [];\n let accum = 0, bits = 0, flood = 0;\n for (let i3 = 0; i3 < data.length; i3++) {\n accum = accum << 6 | Base64.indexOf(data[i3]);\n bits += 6;\n while (bits >= width) {\n const value = accum >> bits - width;\n accum &= (1 << bits - width) - 1;\n bits -= width;\n if (value === 0) {\n flood += maxValue;\n } else {\n result.push(value + flood);\n flood = 0;\n }\n }\n }\n return result;\n }\n exports3.decodeBits = decodeBits;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/decode-owla.js\n var require_decode_owla = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/decode-owla.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.decodeOwlA = void 0;\n var index_js_1 = require_utils13();\n var bit_reader_js_1 = require_bit_reader();\n var decode_owl_js_1 = require_decode_owl();\n function decodeOwlA(data, accents) {\n let words = (0, decode_owl_js_1.decodeOwl)(data).join(\",\");\n accents.split(/,/g).forEach((accent) => {\n const match = accent.match(/^([a-z]*)([0-9]+)([0-9])(.*)$/);\n (0, index_js_1.assertArgument)(match !== null, \"internal error parsing accents\", \"accents\", accents);\n let posOffset = 0;\n const positions = (0, bit_reader_js_1.decodeBits)(parseInt(match[3]), match[4]);\n const charCode = parseInt(match[2]);\n const regex = new RegExp(`([${match[1]}])`, \"g\");\n words = words.replace(regex, (all, letter) => {\n const rem = --positions[posOffset];\n if (rem === 0) {\n letter = String.fromCharCode(letter.charCodeAt(0), charCode);\n posOffset++;\n }\n return letter;\n });\n });\n return words.split(\",\");\n }\n exports3.decodeOwlA = decodeOwlA;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist-owla.js\n var require_wordlist_owla = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlist-owla.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.WordlistOwlA = void 0;\n var wordlist_owl_js_1 = require_wordlist_owl();\n var decode_owla_js_1 = require_decode_owla();\n var WordlistOwlA = class extends wordlist_owl_js_1.WordlistOwl {\n #accent;\n /**\n * Creates a new Wordlist for %%locale%% using the OWLA %%data%%\n * and %%accent%% data and validated against the %%checksum%%.\n */\n constructor(locale, data, accent, checksum4) {\n super(locale, data, checksum4);\n this.#accent = accent;\n }\n /**\n * The OWLA-encoded accent data.\n */\n get _accent() {\n return this.#accent;\n }\n /**\n * Decode all the words for the wordlist.\n */\n _decodeWords() {\n return (0, decode_owla_js_1.decodeOwlA)(this._data, this._accent);\n }\n };\n exports3.WordlistOwlA = WordlistOwlA;\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlists-browser.js\n var require_wordlists_browser = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/wordlists-browser.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wordlists = void 0;\n var lang_en_js_1 = require_lang_en2();\n exports3.wordlists = {\n en: lang_en_js_1.LangEn.wordlist()\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/index.js\n var require_wordlists2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/wordlists/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wordlists = exports3.WordlistOwlA = exports3.WordlistOwl = exports3.LangEn = exports3.Wordlist = void 0;\n var wordlist_js_1 = require_wordlist2();\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return wordlist_js_1.Wordlist;\n } });\n var lang_en_js_1 = require_lang_en2();\n Object.defineProperty(exports3, \"LangEn\", { enumerable: true, get: function() {\n return lang_en_js_1.LangEn;\n } });\n var wordlist_owl_js_1 = require_wordlist_owl();\n Object.defineProperty(exports3, \"WordlistOwl\", { enumerable: true, get: function() {\n return wordlist_owl_js_1.WordlistOwl;\n } });\n var wordlist_owla_js_1 = require_wordlist_owla();\n Object.defineProperty(exports3, \"WordlistOwlA\", { enumerable: true, get: function() {\n return wordlist_owla_js_1.WordlistOwlA;\n } });\n var wordlists_js_1 = require_wordlists_browser();\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return wordlists_js_1.wordlists;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/ethers.js\n var require_ethers2 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/ethers.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ripemd160 = exports3.keccak256 = exports3.randomBytes = exports3.computeHmac = exports3.UndecodedEventLog = exports3.EventLog = exports3.ContractUnknownEventPayload = exports3.ContractTransactionResponse = exports3.ContractTransactionReceipt = exports3.ContractEventPayload = exports3.ContractFactory = exports3.Contract = exports3.BaseContract = exports3.MessagePrefix = exports3.EtherSymbol = exports3.ZeroHash = exports3.N = exports3.MaxInt256 = exports3.MinInt256 = exports3.MaxUint256 = exports3.WeiPerEther = exports3.ZeroAddress = exports3.resolveAddress = exports3.isAddress = exports3.isAddressable = exports3.getCreate2Address = exports3.getCreateAddress = exports3.getIcapAddress = exports3.getAddress = exports3.Typed = exports3.TransactionDescription = exports3.Result = exports3.LogDescription = exports3.Interface = exports3.Indexed = exports3.ErrorDescription = exports3.checkResultErrors = exports3.StructFragment = exports3.ParamType = exports3.NamedFragment = exports3.FunctionFragment = exports3.FallbackFragment = exports3.Fragment = exports3.EventFragment = exports3.ErrorFragment = exports3.ConstructorFragment = exports3.AbiCoder = exports3.encodeBytes32String = exports3.decodeBytes32String = exports3.version = void 0;\n exports3.WebSocketProvider = exports3.SocketProvider = exports3.IpcSocketProvider = exports3.QuickNodeProvider = exports3.PocketProvider = exports3.InfuraWebSocketProvider = exports3.InfuraProvider = exports3.EtherscanProvider = exports3.CloudflareProvider = exports3.ChainstackProvider = exports3.BlockscoutProvider = exports3.AnkrProvider = exports3.AlchemyProvider = exports3.BrowserProvider = exports3.JsonRpcSigner = exports3.JsonRpcProvider = exports3.JsonRpcApiProvider = exports3.FallbackProvider = exports3.AbstractProvider = exports3.VoidSigner = exports3.NonceManager = exports3.AbstractSigner = exports3.TransactionResponse = exports3.TransactionReceipt = exports3.Log = exports3.FeeData = exports3.Block = exports3.getDefaultProvider = exports3.verifyTypedData = exports3.TypedDataEncoder = exports3.solidityPackedSha256 = exports3.solidityPackedKeccak256 = exports3.solidityPacked = exports3.verifyMessage = exports3.hashMessage = exports3.verifyAuthorization = exports3.hashAuthorization = exports3.dnsEncode = exports3.namehash = exports3.isValidName = exports3.ensNormalize = exports3.id = exports3.SigningKey = exports3.Signature = exports3.lock = exports3.scryptSync = exports3.scrypt = exports3.pbkdf2 = exports3.sha512 = exports3.sha256 = void 0;\n exports3.FetchCancelSignal = exports3.FetchResponse = exports3.FetchRequest = exports3.EventPayload = exports3.isError = exports3.isCallException = exports3.makeError = exports3.assertPrivate = exports3.assertNormalize = exports3.assertArgumentCount = exports3.assertArgument = exports3.assert = exports3.resolveProperties = exports3.defineProperties = exports3.zeroPadValue = exports3.zeroPadBytes = exports3.stripZerosLeft = exports3.isBytesLike = exports3.isHexString = exports3.hexlify = exports3.getBytesCopy = exports3.getBytes = exports3.dataSlice = exports3.dataLength = exports3.concat = exports3.encodeBase64 = exports3.decodeBase64 = exports3.encodeBase58 = exports3.decodeBase58 = exports3.Transaction = exports3.recoverAddress = exports3.computeAddress = exports3.authorizationify = exports3.accessListify = exports3.showThrottleMessage = exports3.copyRequest = exports3.UnmanagedSubscriber = exports3.SocketSubscriber = exports3.SocketPendingSubscriber = exports3.SocketEventSubscriber = exports3.SocketBlockSubscriber = exports3.MulticoinProviderPlugin = exports3.NetworkPlugin = exports3.GasCostPlugin = exports3.FetchUrlFeeDataNetworkPlugin = exports3.FeeDataNetworkPlugin = exports3.EtherscanPlugin = exports3.EnsPlugin = exports3.Network = exports3.EnsResolver = void 0;\n exports3.wordlists = exports3.WordlistOwlA = exports3.WordlistOwl = exports3.LangEn = exports3.Wordlist = exports3.encryptKeystoreJsonSync = exports3.encryptKeystoreJson = exports3.decryptKeystoreJson = exports3.decryptKeystoreJsonSync = exports3.decryptCrowdsaleJson = exports3.isKeystoreJson = exports3.isCrowdsaleJson = exports3.getIndexedAccountPath = exports3.getAccountPath = exports3.defaultPath = exports3.Wallet = exports3.HDNodeVoidWallet = exports3.HDNodeWallet = exports3.BaseWallet = exports3.Mnemonic = exports3.uuidV4 = exports3.encodeRlp = exports3.decodeRlp = exports3.Utf8ErrorFuncs = exports3.toUtf8String = exports3.toUtf8CodePoints = exports3.toUtf8Bytes = exports3.parseUnits = exports3.formatUnits = exports3.parseEther = exports3.formatEther = exports3.mask = exports3.toTwos = exports3.fromTwos = exports3.toQuantity = exports3.toNumber = exports3.toBeHex = exports3.toBigInt = exports3.toBeArray = exports3.getUint = exports3.getNumber = exports3.getBigInt = exports3.FixedNumber = void 0;\n var _version_js_1 = require_version32();\n Object.defineProperty(exports3, \"version\", { enumerable: true, get: function() {\n return _version_js_1.version;\n } });\n var index_js_1 = require_abi();\n Object.defineProperty(exports3, \"decodeBytes32String\", { enumerable: true, get: function() {\n return index_js_1.decodeBytes32String;\n } });\n Object.defineProperty(exports3, \"encodeBytes32String\", { enumerable: true, get: function() {\n return index_js_1.encodeBytes32String;\n } });\n Object.defineProperty(exports3, \"AbiCoder\", { enumerable: true, get: function() {\n return index_js_1.AbiCoder;\n } });\n Object.defineProperty(exports3, \"ConstructorFragment\", { enumerable: true, get: function() {\n return index_js_1.ConstructorFragment;\n } });\n Object.defineProperty(exports3, \"ErrorFragment\", { enumerable: true, get: function() {\n return index_js_1.ErrorFragment;\n } });\n Object.defineProperty(exports3, \"EventFragment\", { enumerable: true, get: function() {\n return index_js_1.EventFragment;\n } });\n Object.defineProperty(exports3, \"Fragment\", { enumerable: true, get: function() {\n return index_js_1.Fragment;\n } });\n Object.defineProperty(exports3, \"FallbackFragment\", { enumerable: true, get: function() {\n return index_js_1.FallbackFragment;\n } });\n Object.defineProperty(exports3, \"FunctionFragment\", { enumerable: true, get: function() {\n return index_js_1.FunctionFragment;\n } });\n Object.defineProperty(exports3, \"NamedFragment\", { enumerable: true, get: function() {\n return index_js_1.NamedFragment;\n } });\n Object.defineProperty(exports3, \"ParamType\", { enumerable: true, get: function() {\n return index_js_1.ParamType;\n } });\n Object.defineProperty(exports3, \"StructFragment\", { enumerable: true, get: function() {\n return index_js_1.StructFragment;\n } });\n Object.defineProperty(exports3, \"checkResultErrors\", { enumerable: true, get: function() {\n return index_js_1.checkResultErrors;\n } });\n Object.defineProperty(exports3, \"ErrorDescription\", { enumerable: true, get: function() {\n return index_js_1.ErrorDescription;\n } });\n Object.defineProperty(exports3, \"Indexed\", { enumerable: true, get: function() {\n return index_js_1.Indexed;\n } });\n Object.defineProperty(exports3, \"Interface\", { enumerable: true, get: function() {\n return index_js_1.Interface;\n } });\n Object.defineProperty(exports3, \"LogDescription\", { enumerable: true, get: function() {\n return index_js_1.LogDescription;\n } });\n Object.defineProperty(exports3, \"Result\", { enumerable: true, get: function() {\n return index_js_1.Result;\n } });\n Object.defineProperty(exports3, \"TransactionDescription\", { enumerable: true, get: function() {\n return index_js_1.TransactionDescription;\n } });\n Object.defineProperty(exports3, \"Typed\", { enumerable: true, get: function() {\n return index_js_1.Typed;\n } });\n var index_js_2 = require_address3();\n Object.defineProperty(exports3, \"getAddress\", { enumerable: true, get: function() {\n return index_js_2.getAddress;\n } });\n Object.defineProperty(exports3, \"getIcapAddress\", { enumerable: true, get: function() {\n return index_js_2.getIcapAddress;\n } });\n Object.defineProperty(exports3, \"getCreateAddress\", { enumerable: true, get: function() {\n return index_js_2.getCreateAddress;\n } });\n Object.defineProperty(exports3, \"getCreate2Address\", { enumerable: true, get: function() {\n return index_js_2.getCreate2Address;\n } });\n Object.defineProperty(exports3, \"isAddressable\", { enumerable: true, get: function() {\n return index_js_2.isAddressable;\n } });\n Object.defineProperty(exports3, \"isAddress\", { enumerable: true, get: function() {\n return index_js_2.isAddress;\n } });\n Object.defineProperty(exports3, \"resolveAddress\", { enumerable: true, get: function() {\n return index_js_2.resolveAddress;\n } });\n var index_js_3 = require_constants7();\n Object.defineProperty(exports3, \"ZeroAddress\", { enumerable: true, get: function() {\n return index_js_3.ZeroAddress;\n } });\n Object.defineProperty(exports3, \"WeiPerEther\", { enumerable: true, get: function() {\n return index_js_3.WeiPerEther;\n } });\n Object.defineProperty(exports3, \"MaxUint256\", { enumerable: true, get: function() {\n return index_js_3.MaxUint256;\n } });\n Object.defineProperty(exports3, \"MinInt256\", { enumerable: true, get: function() {\n return index_js_3.MinInt256;\n } });\n Object.defineProperty(exports3, \"MaxInt256\", { enumerable: true, get: function() {\n return index_js_3.MaxInt256;\n } });\n Object.defineProperty(exports3, \"N\", { enumerable: true, get: function() {\n return index_js_3.N;\n } });\n Object.defineProperty(exports3, \"ZeroHash\", { enumerable: true, get: function() {\n return index_js_3.ZeroHash;\n } });\n Object.defineProperty(exports3, \"EtherSymbol\", { enumerable: true, get: function() {\n return index_js_3.EtherSymbol;\n } });\n Object.defineProperty(exports3, \"MessagePrefix\", { enumerable: true, get: function() {\n return index_js_3.MessagePrefix;\n } });\n var index_js_4 = require_contract2();\n Object.defineProperty(exports3, \"BaseContract\", { enumerable: true, get: function() {\n return index_js_4.BaseContract;\n } });\n Object.defineProperty(exports3, \"Contract\", { enumerable: true, get: function() {\n return index_js_4.Contract;\n } });\n Object.defineProperty(exports3, \"ContractFactory\", { enumerable: true, get: function() {\n return index_js_4.ContractFactory;\n } });\n Object.defineProperty(exports3, \"ContractEventPayload\", { enumerable: true, get: function() {\n return index_js_4.ContractEventPayload;\n } });\n Object.defineProperty(exports3, \"ContractTransactionReceipt\", { enumerable: true, get: function() {\n return index_js_4.ContractTransactionReceipt;\n } });\n Object.defineProperty(exports3, \"ContractTransactionResponse\", { enumerable: true, get: function() {\n return index_js_4.ContractTransactionResponse;\n } });\n Object.defineProperty(exports3, \"ContractUnknownEventPayload\", { enumerable: true, get: function() {\n return index_js_4.ContractUnknownEventPayload;\n } });\n Object.defineProperty(exports3, \"EventLog\", { enumerable: true, get: function() {\n return index_js_4.EventLog;\n } });\n Object.defineProperty(exports3, \"UndecodedEventLog\", { enumerable: true, get: function() {\n return index_js_4.UndecodedEventLog;\n } });\n var index_js_5 = require_crypto2();\n Object.defineProperty(exports3, \"computeHmac\", { enumerable: true, get: function() {\n return index_js_5.computeHmac;\n } });\n Object.defineProperty(exports3, \"randomBytes\", { enumerable: true, get: function() {\n return index_js_5.randomBytes;\n } });\n Object.defineProperty(exports3, \"keccak256\", { enumerable: true, get: function() {\n return index_js_5.keccak256;\n } });\n Object.defineProperty(exports3, \"ripemd160\", { enumerable: true, get: function() {\n return index_js_5.ripemd160;\n } });\n Object.defineProperty(exports3, \"sha256\", { enumerable: true, get: function() {\n return index_js_5.sha256;\n } });\n Object.defineProperty(exports3, \"sha512\", { enumerable: true, get: function() {\n return index_js_5.sha512;\n } });\n Object.defineProperty(exports3, \"pbkdf2\", { enumerable: true, get: function() {\n return index_js_5.pbkdf2;\n } });\n Object.defineProperty(exports3, \"scrypt\", { enumerable: true, get: function() {\n return index_js_5.scrypt;\n } });\n Object.defineProperty(exports3, \"scryptSync\", { enumerable: true, get: function() {\n return index_js_5.scryptSync;\n } });\n Object.defineProperty(exports3, \"lock\", { enumerable: true, get: function() {\n return index_js_5.lock;\n } });\n Object.defineProperty(exports3, \"Signature\", { enumerable: true, get: function() {\n return index_js_5.Signature;\n } });\n Object.defineProperty(exports3, \"SigningKey\", { enumerable: true, get: function() {\n return index_js_5.SigningKey;\n } });\n var index_js_6 = require_hash2();\n Object.defineProperty(exports3, \"id\", { enumerable: true, get: function() {\n return index_js_6.id;\n } });\n Object.defineProperty(exports3, \"ensNormalize\", { enumerable: true, get: function() {\n return index_js_6.ensNormalize;\n } });\n Object.defineProperty(exports3, \"isValidName\", { enumerable: true, get: function() {\n return index_js_6.isValidName;\n } });\n Object.defineProperty(exports3, \"namehash\", { enumerable: true, get: function() {\n return index_js_6.namehash;\n } });\n Object.defineProperty(exports3, \"dnsEncode\", { enumerable: true, get: function() {\n return index_js_6.dnsEncode;\n } });\n Object.defineProperty(exports3, \"hashAuthorization\", { enumerable: true, get: function() {\n return index_js_6.hashAuthorization;\n } });\n Object.defineProperty(exports3, \"verifyAuthorization\", { enumerable: true, get: function() {\n return index_js_6.verifyAuthorization;\n } });\n Object.defineProperty(exports3, \"hashMessage\", { enumerable: true, get: function() {\n return index_js_6.hashMessage;\n } });\n Object.defineProperty(exports3, \"verifyMessage\", { enumerable: true, get: function() {\n return index_js_6.verifyMessage;\n } });\n Object.defineProperty(exports3, \"solidityPacked\", { enumerable: true, get: function() {\n return index_js_6.solidityPacked;\n } });\n Object.defineProperty(exports3, \"solidityPackedKeccak256\", { enumerable: true, get: function() {\n return index_js_6.solidityPackedKeccak256;\n } });\n Object.defineProperty(exports3, \"solidityPackedSha256\", { enumerable: true, get: function() {\n return index_js_6.solidityPackedSha256;\n } });\n Object.defineProperty(exports3, \"TypedDataEncoder\", { enumerable: true, get: function() {\n return index_js_6.TypedDataEncoder;\n } });\n Object.defineProperty(exports3, \"verifyTypedData\", { enumerable: true, get: function() {\n return index_js_6.verifyTypedData;\n } });\n var index_js_7 = require_providers();\n Object.defineProperty(exports3, \"getDefaultProvider\", { enumerable: true, get: function() {\n return index_js_7.getDefaultProvider;\n } });\n Object.defineProperty(exports3, \"Block\", { enumerable: true, get: function() {\n return index_js_7.Block;\n } });\n Object.defineProperty(exports3, \"FeeData\", { enumerable: true, get: function() {\n return index_js_7.FeeData;\n } });\n Object.defineProperty(exports3, \"Log\", { enumerable: true, get: function() {\n return index_js_7.Log;\n } });\n Object.defineProperty(exports3, \"TransactionReceipt\", { enumerable: true, get: function() {\n return index_js_7.TransactionReceipt;\n } });\n Object.defineProperty(exports3, \"TransactionResponse\", { enumerable: true, get: function() {\n return index_js_7.TransactionResponse;\n } });\n Object.defineProperty(exports3, \"AbstractSigner\", { enumerable: true, get: function() {\n return index_js_7.AbstractSigner;\n } });\n Object.defineProperty(exports3, \"NonceManager\", { enumerable: true, get: function() {\n return index_js_7.NonceManager;\n } });\n Object.defineProperty(exports3, \"VoidSigner\", { enumerable: true, get: function() {\n return index_js_7.VoidSigner;\n } });\n Object.defineProperty(exports3, \"AbstractProvider\", { enumerable: true, get: function() {\n return index_js_7.AbstractProvider;\n } });\n Object.defineProperty(exports3, \"FallbackProvider\", { enumerable: true, get: function() {\n return index_js_7.FallbackProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcApiProvider\", { enumerable: true, get: function() {\n return index_js_7.JsonRpcApiProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcProvider\", { enumerable: true, get: function() {\n return index_js_7.JsonRpcProvider;\n } });\n Object.defineProperty(exports3, \"JsonRpcSigner\", { enumerable: true, get: function() {\n return index_js_7.JsonRpcSigner;\n } });\n Object.defineProperty(exports3, \"BrowserProvider\", { enumerable: true, get: function() {\n return index_js_7.BrowserProvider;\n } });\n Object.defineProperty(exports3, \"AlchemyProvider\", { enumerable: true, get: function() {\n return index_js_7.AlchemyProvider;\n } });\n Object.defineProperty(exports3, \"AnkrProvider\", { enumerable: true, get: function() {\n return index_js_7.AnkrProvider;\n } });\n Object.defineProperty(exports3, \"BlockscoutProvider\", { enumerable: true, get: function() {\n return index_js_7.BlockscoutProvider;\n } });\n Object.defineProperty(exports3, \"ChainstackProvider\", { enumerable: true, get: function() {\n return index_js_7.ChainstackProvider;\n } });\n Object.defineProperty(exports3, \"CloudflareProvider\", { enumerable: true, get: function() {\n return index_js_7.CloudflareProvider;\n } });\n Object.defineProperty(exports3, \"EtherscanProvider\", { enumerable: true, get: function() {\n return index_js_7.EtherscanProvider;\n } });\n Object.defineProperty(exports3, \"InfuraProvider\", { enumerable: true, get: function() {\n return index_js_7.InfuraProvider;\n } });\n Object.defineProperty(exports3, \"InfuraWebSocketProvider\", { enumerable: true, get: function() {\n return index_js_7.InfuraWebSocketProvider;\n } });\n Object.defineProperty(exports3, \"PocketProvider\", { enumerable: true, get: function() {\n return index_js_7.PocketProvider;\n } });\n Object.defineProperty(exports3, \"QuickNodeProvider\", { enumerable: true, get: function() {\n return index_js_7.QuickNodeProvider;\n } });\n Object.defineProperty(exports3, \"IpcSocketProvider\", { enumerable: true, get: function() {\n return index_js_7.IpcSocketProvider;\n } });\n Object.defineProperty(exports3, \"SocketProvider\", { enumerable: true, get: function() {\n return index_js_7.SocketProvider;\n } });\n Object.defineProperty(exports3, \"WebSocketProvider\", { enumerable: true, get: function() {\n return index_js_7.WebSocketProvider;\n } });\n Object.defineProperty(exports3, \"EnsResolver\", { enumerable: true, get: function() {\n return index_js_7.EnsResolver;\n } });\n Object.defineProperty(exports3, \"Network\", { enumerable: true, get: function() {\n return index_js_7.Network;\n } });\n Object.defineProperty(exports3, \"EnsPlugin\", { enumerable: true, get: function() {\n return index_js_7.EnsPlugin;\n } });\n Object.defineProperty(exports3, \"EtherscanPlugin\", { enumerable: true, get: function() {\n return index_js_7.EtherscanPlugin;\n } });\n Object.defineProperty(exports3, \"FeeDataNetworkPlugin\", { enumerable: true, get: function() {\n return index_js_7.FeeDataNetworkPlugin;\n } });\n Object.defineProperty(exports3, \"FetchUrlFeeDataNetworkPlugin\", { enumerable: true, get: function() {\n return index_js_7.FetchUrlFeeDataNetworkPlugin;\n } });\n Object.defineProperty(exports3, \"GasCostPlugin\", { enumerable: true, get: function() {\n return index_js_7.GasCostPlugin;\n } });\n Object.defineProperty(exports3, \"NetworkPlugin\", { enumerable: true, get: function() {\n return index_js_7.NetworkPlugin;\n } });\n Object.defineProperty(exports3, \"MulticoinProviderPlugin\", { enumerable: true, get: function() {\n return index_js_7.MulticoinProviderPlugin;\n } });\n Object.defineProperty(exports3, \"SocketBlockSubscriber\", { enumerable: true, get: function() {\n return index_js_7.SocketBlockSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketEventSubscriber\", { enumerable: true, get: function() {\n return index_js_7.SocketEventSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketPendingSubscriber\", { enumerable: true, get: function() {\n return index_js_7.SocketPendingSubscriber;\n } });\n Object.defineProperty(exports3, \"SocketSubscriber\", { enumerable: true, get: function() {\n return index_js_7.SocketSubscriber;\n } });\n Object.defineProperty(exports3, \"UnmanagedSubscriber\", { enumerable: true, get: function() {\n return index_js_7.UnmanagedSubscriber;\n } });\n Object.defineProperty(exports3, \"copyRequest\", { enumerable: true, get: function() {\n return index_js_7.copyRequest;\n } });\n Object.defineProperty(exports3, \"showThrottleMessage\", { enumerable: true, get: function() {\n return index_js_7.showThrottleMessage;\n } });\n var index_js_8 = require_transaction2();\n Object.defineProperty(exports3, \"accessListify\", { enumerable: true, get: function() {\n return index_js_8.accessListify;\n } });\n Object.defineProperty(exports3, \"authorizationify\", { enumerable: true, get: function() {\n return index_js_8.authorizationify;\n } });\n Object.defineProperty(exports3, \"computeAddress\", { enumerable: true, get: function() {\n return index_js_8.computeAddress;\n } });\n Object.defineProperty(exports3, \"recoverAddress\", { enumerable: true, get: function() {\n return index_js_8.recoverAddress;\n } });\n Object.defineProperty(exports3, \"Transaction\", { enumerable: true, get: function() {\n return index_js_8.Transaction;\n } });\n var index_js_9 = require_utils13();\n Object.defineProperty(exports3, \"decodeBase58\", { enumerable: true, get: function() {\n return index_js_9.decodeBase58;\n } });\n Object.defineProperty(exports3, \"encodeBase58\", { enumerable: true, get: function() {\n return index_js_9.encodeBase58;\n } });\n Object.defineProperty(exports3, \"decodeBase64\", { enumerable: true, get: function() {\n return index_js_9.decodeBase64;\n } });\n Object.defineProperty(exports3, \"encodeBase64\", { enumerable: true, get: function() {\n return index_js_9.encodeBase64;\n } });\n Object.defineProperty(exports3, \"concat\", { enumerable: true, get: function() {\n return index_js_9.concat;\n } });\n Object.defineProperty(exports3, \"dataLength\", { enumerable: true, get: function() {\n return index_js_9.dataLength;\n } });\n Object.defineProperty(exports3, \"dataSlice\", { enumerable: true, get: function() {\n return index_js_9.dataSlice;\n } });\n Object.defineProperty(exports3, \"getBytes\", { enumerable: true, get: function() {\n return index_js_9.getBytes;\n } });\n Object.defineProperty(exports3, \"getBytesCopy\", { enumerable: true, get: function() {\n return index_js_9.getBytesCopy;\n } });\n Object.defineProperty(exports3, \"hexlify\", { enumerable: true, get: function() {\n return index_js_9.hexlify;\n } });\n Object.defineProperty(exports3, \"isHexString\", { enumerable: true, get: function() {\n return index_js_9.isHexString;\n } });\n Object.defineProperty(exports3, \"isBytesLike\", { enumerable: true, get: function() {\n return index_js_9.isBytesLike;\n } });\n Object.defineProperty(exports3, \"stripZerosLeft\", { enumerable: true, get: function() {\n return index_js_9.stripZerosLeft;\n } });\n Object.defineProperty(exports3, \"zeroPadBytes\", { enumerable: true, get: function() {\n return index_js_9.zeroPadBytes;\n } });\n Object.defineProperty(exports3, \"zeroPadValue\", { enumerable: true, get: function() {\n return index_js_9.zeroPadValue;\n } });\n Object.defineProperty(exports3, \"defineProperties\", { enumerable: true, get: function() {\n return index_js_9.defineProperties;\n } });\n Object.defineProperty(exports3, \"resolveProperties\", { enumerable: true, get: function() {\n return index_js_9.resolveProperties;\n } });\n Object.defineProperty(exports3, \"assert\", { enumerable: true, get: function() {\n return index_js_9.assert;\n } });\n Object.defineProperty(exports3, \"assertArgument\", { enumerable: true, get: function() {\n return index_js_9.assertArgument;\n } });\n Object.defineProperty(exports3, \"assertArgumentCount\", { enumerable: true, get: function() {\n return index_js_9.assertArgumentCount;\n } });\n Object.defineProperty(exports3, \"assertNormalize\", { enumerable: true, get: function() {\n return index_js_9.assertNormalize;\n } });\n Object.defineProperty(exports3, \"assertPrivate\", { enumerable: true, get: function() {\n return index_js_9.assertPrivate;\n } });\n Object.defineProperty(exports3, \"makeError\", { enumerable: true, get: function() {\n return index_js_9.makeError;\n } });\n Object.defineProperty(exports3, \"isCallException\", { enumerable: true, get: function() {\n return index_js_9.isCallException;\n } });\n Object.defineProperty(exports3, \"isError\", { enumerable: true, get: function() {\n return index_js_9.isError;\n } });\n Object.defineProperty(exports3, \"EventPayload\", { enumerable: true, get: function() {\n return index_js_9.EventPayload;\n } });\n Object.defineProperty(exports3, \"FetchRequest\", { enumerable: true, get: function() {\n return index_js_9.FetchRequest;\n } });\n Object.defineProperty(exports3, \"FetchResponse\", { enumerable: true, get: function() {\n return index_js_9.FetchResponse;\n } });\n Object.defineProperty(exports3, \"FetchCancelSignal\", { enumerable: true, get: function() {\n return index_js_9.FetchCancelSignal;\n } });\n Object.defineProperty(exports3, \"FixedNumber\", { enumerable: true, get: function() {\n return index_js_9.FixedNumber;\n } });\n Object.defineProperty(exports3, \"getBigInt\", { enumerable: true, get: function() {\n return index_js_9.getBigInt;\n } });\n Object.defineProperty(exports3, \"getNumber\", { enumerable: true, get: function() {\n return index_js_9.getNumber;\n } });\n Object.defineProperty(exports3, \"getUint\", { enumerable: true, get: function() {\n return index_js_9.getUint;\n } });\n Object.defineProperty(exports3, \"toBeArray\", { enumerable: true, get: function() {\n return index_js_9.toBeArray;\n } });\n Object.defineProperty(exports3, \"toBigInt\", { enumerable: true, get: function() {\n return index_js_9.toBigInt;\n } });\n Object.defineProperty(exports3, \"toBeHex\", { enumerable: true, get: function() {\n return index_js_9.toBeHex;\n } });\n Object.defineProperty(exports3, \"toNumber\", { enumerable: true, get: function() {\n return index_js_9.toNumber;\n } });\n Object.defineProperty(exports3, \"toQuantity\", { enumerable: true, get: function() {\n return index_js_9.toQuantity;\n } });\n Object.defineProperty(exports3, \"fromTwos\", { enumerable: true, get: function() {\n return index_js_9.fromTwos;\n } });\n Object.defineProperty(exports3, \"toTwos\", { enumerable: true, get: function() {\n return index_js_9.toTwos;\n } });\n Object.defineProperty(exports3, \"mask\", { enumerable: true, get: function() {\n return index_js_9.mask;\n } });\n Object.defineProperty(exports3, \"formatEther\", { enumerable: true, get: function() {\n return index_js_9.formatEther;\n } });\n Object.defineProperty(exports3, \"parseEther\", { enumerable: true, get: function() {\n return index_js_9.parseEther;\n } });\n Object.defineProperty(exports3, \"formatUnits\", { enumerable: true, get: function() {\n return index_js_9.formatUnits;\n } });\n Object.defineProperty(exports3, \"parseUnits\", { enumerable: true, get: function() {\n return index_js_9.parseUnits;\n } });\n Object.defineProperty(exports3, \"toUtf8Bytes\", { enumerable: true, get: function() {\n return index_js_9.toUtf8Bytes;\n } });\n Object.defineProperty(exports3, \"toUtf8CodePoints\", { enumerable: true, get: function() {\n return index_js_9.toUtf8CodePoints;\n } });\n Object.defineProperty(exports3, \"toUtf8String\", { enumerable: true, get: function() {\n return index_js_9.toUtf8String;\n } });\n Object.defineProperty(exports3, \"Utf8ErrorFuncs\", { enumerable: true, get: function() {\n return index_js_9.Utf8ErrorFuncs;\n } });\n Object.defineProperty(exports3, \"decodeRlp\", { enumerable: true, get: function() {\n return index_js_9.decodeRlp;\n } });\n Object.defineProperty(exports3, \"encodeRlp\", { enumerable: true, get: function() {\n return index_js_9.encodeRlp;\n } });\n Object.defineProperty(exports3, \"uuidV4\", { enumerable: true, get: function() {\n return index_js_9.uuidV4;\n } });\n var index_js_10 = require_wallet2();\n Object.defineProperty(exports3, \"Mnemonic\", { enumerable: true, get: function() {\n return index_js_10.Mnemonic;\n } });\n Object.defineProperty(exports3, \"BaseWallet\", { enumerable: true, get: function() {\n return index_js_10.BaseWallet;\n } });\n Object.defineProperty(exports3, \"HDNodeWallet\", { enumerable: true, get: function() {\n return index_js_10.HDNodeWallet;\n } });\n Object.defineProperty(exports3, \"HDNodeVoidWallet\", { enumerable: true, get: function() {\n return index_js_10.HDNodeVoidWallet;\n } });\n Object.defineProperty(exports3, \"Wallet\", { enumerable: true, get: function() {\n return index_js_10.Wallet;\n } });\n Object.defineProperty(exports3, \"defaultPath\", { enumerable: true, get: function() {\n return index_js_10.defaultPath;\n } });\n Object.defineProperty(exports3, \"getAccountPath\", { enumerable: true, get: function() {\n return index_js_10.getAccountPath;\n } });\n Object.defineProperty(exports3, \"getIndexedAccountPath\", { enumerable: true, get: function() {\n return index_js_10.getIndexedAccountPath;\n } });\n Object.defineProperty(exports3, \"isCrowdsaleJson\", { enumerable: true, get: function() {\n return index_js_10.isCrowdsaleJson;\n } });\n Object.defineProperty(exports3, \"isKeystoreJson\", { enumerable: true, get: function() {\n return index_js_10.isKeystoreJson;\n } });\n Object.defineProperty(exports3, \"decryptCrowdsaleJson\", { enumerable: true, get: function() {\n return index_js_10.decryptCrowdsaleJson;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreJsonSync\", { enumerable: true, get: function() {\n return index_js_10.decryptKeystoreJsonSync;\n } });\n Object.defineProperty(exports3, \"decryptKeystoreJson\", { enumerable: true, get: function() {\n return index_js_10.decryptKeystoreJson;\n } });\n Object.defineProperty(exports3, \"encryptKeystoreJson\", { enumerable: true, get: function() {\n return index_js_10.encryptKeystoreJson;\n } });\n Object.defineProperty(exports3, \"encryptKeystoreJsonSync\", { enumerable: true, get: function() {\n return index_js_10.encryptKeystoreJsonSync;\n } });\n var index_js_11 = require_wordlists2();\n Object.defineProperty(exports3, \"Wordlist\", { enumerable: true, get: function() {\n return index_js_11.Wordlist;\n } });\n Object.defineProperty(exports3, \"LangEn\", { enumerable: true, get: function() {\n return index_js_11.LangEn;\n } });\n Object.defineProperty(exports3, \"WordlistOwl\", { enumerable: true, get: function() {\n return index_js_11.WordlistOwl;\n } });\n Object.defineProperty(exports3, \"WordlistOwlA\", { enumerable: true, get: function() {\n return index_js_11.WordlistOwlA;\n } });\n Object.defineProperty(exports3, \"wordlists\", { enumerable: true, get: function() {\n return index_js_11.wordlists;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/index.js\n var require_lib37 = __commonJS({\n \"../../../node_modules/.pnpm/ethers@6.15.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/lib.commonjs/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ethers = void 0;\n var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3));\n var ethers3 = tslib_1.__importStar(require_ethers2());\n exports3.ethers = ethers3;\n tslib_1.__exportStar(require_ethers2(), exports3);\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/populateTransaction.js\n var require_populateTransaction = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/populateTransaction.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.populateTransaction = void 0;\n var ethers_v6_1 = require_lib37();\n var populateTransaction = async ({ to, from: from14, data, value, rpcUrl, chainId, gasBufferPercentage, baseFeePerGasBufferPercentage }) => {\n if (gasBufferPercentage !== void 0 && !Number.isInteger(gasBufferPercentage)) {\n throw new Error(\"[populateTransaction] gasBufferPercentage must be an integer\");\n }\n if (baseFeePerGasBufferPercentage !== void 0 && !Number.isInteger(baseFeePerGasBufferPercentage)) {\n throw new Error(\"[populateTransaction] baseFeePerGasBufferPercentage must be an integer\");\n }\n const provider = new ethers_v6_1.JsonRpcProvider(rpcUrl);\n const signer = new ethers_v6_1.VoidSigner(from14, provider);\n const populatedTx = await signer.populateTransaction({\n to,\n from: from14,\n data,\n value,\n chainId\n });\n if (!populatedTx.gasLimit) {\n throw new Error(`[estimateGas] Unable to estimate gas for transaction: ${JSON.stringify({\n to,\n from: from14,\n data,\n value\n })}`);\n }\n if (gasBufferPercentage !== void 0) {\n populatedTx.gasLimit = BigInt(populatedTx.gasLimit) * BigInt(100 + gasBufferPercentage) / 100n;\n }\n const partialUnsignedTx = {\n to: populatedTx.to ?? void 0,\n nonce: populatedTx.nonce ?? void 0,\n gasLimit: (0, ethers_v6_1.toQuantity)(populatedTx.gasLimit),\n data: populatedTx.data ?? void 0,\n value: populatedTx.value ? (0, ethers_v6_1.toQuantity)(populatedTx.value) : \"0x0\",\n chainId: populatedTx.chainId ? (0, ethers_v6_1.toNumber)(populatedTx.chainId) : void 0,\n // Typed-Transaction features\n type: populatedTx.type ?? void 0,\n // EIP-2930; Type 1 & EIP-1559; Type 2\n accessList: populatedTx.accessList ?? void 0\n };\n if (populatedTx.gasPrice != null) {\n return {\n ...partialUnsignedTx,\n gasPrice: (0, ethers_v6_1.toQuantity)(populatedTx.gasPrice)\n };\n }\n if (populatedTx.maxFeePerGas == null) {\n throw new Error(\"[estimateGas] maxFeePerGas is missing from populated transaction\");\n }\n if (populatedTx.maxPriorityFeePerGas == null) {\n throw new Error(\"[estimateGas] maxPriorityFeePerGas is missing from populated transaction\");\n }\n if (baseFeePerGasBufferPercentage !== void 0) {\n populatedTx.maxFeePerGas = BigInt(populatedTx.maxFeePerGas) * BigInt(100 + baseFeePerGasBufferPercentage) / 100n;\n }\n return {\n ...partialUnsignedTx,\n maxFeePerGas: (0, ethers_v6_1.toQuantity)(populatedTx.maxFeePerGas),\n maxPriorityFeePerGas: (0, ethers_v6_1.toQuantity)(populatedTx.maxPriorityFeePerGas)\n };\n };\n exports3.populateTransaction = populateTransaction;\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/abis/EntryPointAbi_v6.js\n var EntryPointAbi_v6;\n var init_EntryPointAbi_v6 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/abis/EntryPointAbi_v6.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n EntryPointAbi_v6 = [\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"preOpGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"paid\",\n type: \"uint256\"\n },\n {\n internalType: \"uint48\",\n name: \"validAfter\",\n type: \"uint48\"\n },\n {\n internalType: \"uint48\",\n name: \"validUntil\",\n type: \"uint48\"\n },\n {\n internalType: \"bool\",\n name: \"targetSuccess\",\n type: \"bool\"\n },\n {\n internalType: \"bytes\",\n name: \"targetResult\",\n type: \"bytes\"\n }\n ],\n name: \"ExecutionResult\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"opIndex\",\n type: \"uint256\"\n },\n {\n internalType: \"string\",\n name: \"reason\",\n type: \"string\"\n }\n ],\n name: \"FailedOp\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n }\n ],\n name: \"SenderAddressResult\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"aggregator\",\n type: \"address\"\n }\n ],\n name: \"SignatureValidationFailed\",\n type: \"error\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"preOpGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"prefund\",\n type: \"uint256\"\n },\n {\n internalType: \"bool\",\n name: \"sigFailed\",\n type: \"bool\"\n },\n {\n internalType: \"uint48\",\n name: \"validAfter\",\n type: \"uint48\"\n },\n {\n internalType: \"uint48\",\n name: \"validUntil\",\n type: \"uint48\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterContext\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct IEntryPoint.ReturnInfo\",\n name: \"returnInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"senderInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"factoryInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"paymasterInfo\",\n type: \"tuple\"\n }\n ],\n name: \"ValidationResult\",\n type: \"error\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"preOpGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"prefund\",\n type: \"uint256\"\n },\n {\n internalType: \"bool\",\n name: \"sigFailed\",\n type: \"bool\"\n },\n {\n internalType: \"uint48\",\n name: \"validAfter\",\n type: \"uint48\"\n },\n {\n internalType: \"uint48\",\n name: \"validUntil\",\n type: \"uint48\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterContext\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct IEntryPoint.ReturnInfo\",\n name: \"returnInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"senderInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"factoryInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"paymasterInfo\",\n type: \"tuple\"\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"aggregator\",\n type: \"address\"\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"stake\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct IStakeManager.StakeInfo\",\n name: \"stakeInfo\",\n type: \"tuple\"\n }\n ],\n internalType: \"struct IEntryPoint.AggregatorStakeInfo\",\n name: \"aggregatorInfo\",\n type: \"tuple\"\n }\n ],\n name: \"ValidationResultWithAggregation\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"factory\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n }\n ],\n name: \"AccountDeployed\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [],\n name: \"BeforeExecution\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"totalDeposit\",\n type: \"uint256\"\n }\n ],\n name: \"Deposited\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"aggregator\",\n type: \"address\"\n }\n ],\n name: \"SignatureAggregatorChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"totalStaked\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n name: \"StakeLocked\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"withdrawTime\",\n type: \"uint256\"\n }\n ],\n name: \"StakeUnlocked\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"StakeWithdrawn\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"actualGasCost\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"actualGasUsed\",\n type: \"uint256\"\n }\n ],\n name: \"UserOperationEvent\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"revertReason\",\n type: \"bytes\"\n }\n ],\n name: \"UserOperationRevertReason\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"Withdrawn\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"SIG_VALIDATION_FAILED\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n }\n ],\n name: \"_validateSenderAndPaymaster\",\n outputs: [],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint32\",\n name: \"unstakeDelaySec\",\n type: \"uint32\"\n }\n ],\n name: \"addStake\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"depositTo\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n name: \"deposits\",\n outputs: [\n {\n internalType: \"uint112\",\n name: \"deposit\",\n type: \"uint112\"\n },\n {\n internalType: \"bool\",\n name: \"staked\",\n type: \"bool\"\n },\n {\n internalType: \"uint112\",\n name: \"stake\",\n type: \"uint112\"\n },\n {\n internalType: \"uint32\",\n name: \"unstakeDelaySec\",\n type: \"uint32\"\n },\n {\n internalType: \"uint48\",\n name: \"withdrawTime\",\n type: \"uint48\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n }\n ],\n name: \"getDepositInfo\",\n outputs: [\n {\n components: [\n {\n internalType: \"uint112\",\n name: \"deposit\",\n type: \"uint112\"\n },\n {\n internalType: \"bool\",\n name: \"staked\",\n type: \"bool\"\n },\n {\n internalType: \"uint112\",\n name: \"stake\",\n type: \"uint112\"\n },\n {\n internalType: \"uint32\",\n name: \"unstakeDelaySec\",\n type: \"uint32\"\n },\n {\n internalType: \"uint48\",\n name: \"withdrawTime\",\n type: \"uint48\"\n }\n ],\n internalType: \"struct IStakeManager.DepositInfo\",\n name: \"info\",\n type: \"tuple\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint192\",\n name: \"key\",\n type: \"uint192\"\n }\n ],\n name: \"getNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n }\n ],\n name: \"getSenderAddress\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation\",\n name: \"userOp\",\n type: \"tuple\"\n }\n ],\n name: \"getUserOpHash\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation[]\",\n name: \"userOps\",\n type: \"tuple[]\"\n },\n {\n internalType: \"contract IAggregator\",\n name: \"aggregator\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct IEntryPoint.UserOpsPerAggregator[]\",\n name: \"opsPerAggregator\",\n type: \"tuple[]\"\n },\n {\n internalType: \"address payable\",\n name: \"beneficiary\",\n type: \"address\"\n }\n ],\n name: \"handleAggregatedOps\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation[]\",\n name: \"ops\",\n type: \"tuple[]\"\n },\n {\n internalType: \"address payable\",\n name: \"beneficiary\",\n type: \"address\"\n }\n ],\n name: \"handleOps\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"uint192\",\n name: \"key\",\n type: \"uint192\"\n }\n ],\n name: \"incrementNonce\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n components: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct EntryPoint.MemoryUserOp\",\n name: \"mUserOp\",\n type: \"tuple\"\n },\n {\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint256\",\n name: \"prefund\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"contextOffset\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preOpGas\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct EntryPoint.UserOpInfo\",\n name: \"opInfo\",\n type: \"tuple\"\n },\n {\n internalType: \"bytes\",\n name: \"context\",\n type: \"bytes\"\n }\n ],\n name: \"innerHandleOp\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"actualGasCost\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n },\n {\n internalType: \"uint192\",\n name: \"\",\n type: \"uint192\"\n }\n ],\n name: \"nonceSequenceNumber\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation\",\n name: \"op\",\n type: \"tuple\"\n },\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\"\n },\n {\n internalType: \"bytes\",\n name: \"targetCallData\",\n type: \"bytes\"\n }\n ],\n name: \"simulateHandleOp\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\"\n }\n ],\n internalType: \"struct UserOperation\",\n name: \"userOp\",\n type: \"tuple\"\n }\n ],\n name: \"simulateValidation\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"unlockStake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n }\n ],\n name: \"withdrawStake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"withdrawAmount\",\n type: \"uint256\"\n }\n ],\n name: \"withdrawTo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n stateMutability: \"payable\",\n type: \"receive\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/abis/EntryPointAbi_v7.js\n var EntryPointAbi_v7;\n var init_EntryPointAbi_v7 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/abis/EntryPointAbi_v7.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n EntryPointAbi_v7 = [\n {\n inputs: [\n { internalType: \"bool\", name: \"success\", type: \"bool\" },\n { internalType: \"bytes\", name: \"ret\", type: \"bytes\" }\n ],\n name: \"DelegateAndRevert\",\n type: \"error\"\n },\n {\n inputs: [\n { internalType: \"uint256\", name: \"opIndex\", type: \"uint256\" },\n { internalType: \"string\", name: \"reason\", type: \"string\" }\n ],\n name: \"FailedOp\",\n type: \"error\"\n },\n {\n inputs: [\n { internalType: \"uint256\", name: \"opIndex\", type: \"uint256\" },\n { internalType: \"string\", name: \"reason\", type: \"string\" },\n { internalType: \"bytes\", name: \"inner\", type: \"bytes\" }\n ],\n name: \"FailedOpWithRevert\",\n type: \"error\"\n },\n {\n inputs: [{ internalType: \"bytes\", name: \"returnData\", type: \"bytes\" }],\n name: \"PostOpReverted\",\n type: \"error\"\n },\n { inputs: [], name: \"ReentrancyGuardReentrantCall\", type: \"error\" },\n {\n inputs: [{ internalType: \"address\", name: \"sender\", type: \"address\" }],\n name: \"SenderAddressResult\",\n type: \"error\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"aggregator\", type: \"address\" }],\n name: \"SignatureValidationFailed\",\n type: \"error\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"factory\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n }\n ],\n name: \"AccountDeployed\",\n type: \"event\"\n },\n { anonymous: false, inputs: [], name: \"BeforeExecution\", type: \"event\" },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"totalDeposit\",\n type: \"uint256\"\n }\n ],\n name: \"Deposited\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"revertReason\",\n type: \"bytes\"\n }\n ],\n name: \"PostOpRevertReason\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"aggregator\",\n type: \"address\"\n }\n ],\n name: \"SignatureAggregatorChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"totalStaked\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"unstakeDelaySec\",\n type: \"uint256\"\n }\n ],\n name: \"StakeLocked\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"withdrawTime\",\n type: \"uint256\"\n }\n ],\n name: \"StakeUnlocked\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"StakeWithdrawn\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"paymaster\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n { indexed: false, internalType: \"bool\", name: \"success\", type: \"bool\" },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"actualGasCost\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"actualGasUsed\",\n type: \"uint256\"\n }\n ],\n name: \"UserOperationEvent\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n }\n ],\n name: \"UserOperationPrefundTooLow\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"userOpHash\",\n type: \"bytes32\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\"\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"revertReason\",\n type: \"bytes\"\n }\n ],\n name: \"UserOperationRevertReason\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\"\n }\n ],\n name: \"Withdrawn\",\n type: \"event\"\n },\n {\n inputs: [\n { internalType: \"uint32\", name: \"unstakeDelaySec\", type: \"uint32\" }\n ],\n name: \"addStake\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"account\", type: \"address\" }],\n name: \"balanceOf\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"target\", type: \"address\" },\n { internalType: \"bytes\", name: \"data\", type: \"bytes\" }\n ],\n name: \"delegateAndRevert\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"account\", type: \"address\" }],\n name: \"depositTo\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"\", type: \"address\" }],\n name: \"deposits\",\n outputs: [\n { internalType: \"uint256\", name: \"deposit\", type: \"uint256\" },\n { internalType: \"bool\", name: \"staked\", type: \"bool\" },\n { internalType: \"uint112\", name: \"stake\", type: \"uint112\" },\n { internalType: \"uint32\", name: \"unstakeDelaySec\", type: \"uint32\" },\n { internalType: \"uint48\", name: \"withdrawTime\", type: \"uint48\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"account\", type: \"address\" }],\n name: \"getDepositInfo\",\n outputs: [\n {\n components: [\n { internalType: \"uint256\", name: \"deposit\", type: \"uint256\" },\n { internalType: \"bool\", name: \"staked\", type: \"bool\" },\n { internalType: \"uint112\", name: \"stake\", type: \"uint112\" },\n { internalType: \"uint32\", name: \"unstakeDelaySec\", type: \"uint32\" },\n { internalType: \"uint48\", name: \"withdrawTime\", type: \"uint48\" }\n ],\n internalType: \"struct IStakeManager.DepositInfo\",\n name: \"info\",\n type: \"tuple\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint192\", name: \"key\", type: \"uint192\" }\n ],\n name: \"getNonce\",\n outputs: [{ internalType: \"uint256\", name: \"nonce\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes\", name: \"initCode\", type: \"bytes\" }],\n name: \"getSenderAddress\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"initCode\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n {\n internalType: \"bytes32\",\n name: \"accountGasLimits\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"bytes32\", name: \"gasFees\", type: \"bytes32\" },\n { internalType: \"bytes\", name: \"paymasterAndData\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct PackedUserOperation\",\n name: \"userOp\",\n type: \"tuple\"\n }\n ],\n name: \"getUserOpHash\",\n outputs: [{ internalType: \"bytes32\", name: \"\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"initCode\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n {\n internalType: \"bytes32\",\n name: \"accountGasLimits\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"bytes32\", name: \"gasFees\", type: \"bytes32\" },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\"\n },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct PackedUserOperation[]\",\n name: \"userOps\",\n type: \"tuple[]\"\n },\n {\n internalType: \"contract IAggregator\",\n name: \"aggregator\",\n type: \"address\"\n },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct IEntryPoint.UserOpsPerAggregator[]\",\n name: \"opsPerAggregator\",\n type: \"tuple[]\"\n },\n { internalType: \"address payable\", name: \"beneficiary\", type: \"address\" }\n ],\n name: \"handleAggregatedOps\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"initCode\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n {\n internalType: \"bytes32\",\n name: \"accountGasLimits\",\n type: \"bytes32\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"bytes32\", name: \"gasFees\", type: \"bytes32\" },\n { internalType: \"bytes\", name: \"paymasterAndData\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct PackedUserOperation[]\",\n name: \"ops\",\n type: \"tuple[]\"\n },\n { internalType: \"address payable\", name: \"beneficiary\", type: \"address\" }\n ],\n name: \"handleOps\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"uint192\", name: \"key\", type: \"uint192\" }],\n name: \"incrementNonce\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n {\n components: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"callGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"paymasterVerificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"paymasterPostOpGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"address\", name: \"paymaster\", type: \"address\" },\n {\n internalType: \"uint256\",\n name: \"maxFeePerGas\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n }\n ],\n internalType: \"struct EntryPoint.MemoryUserOp\",\n name: \"mUserOp\",\n type: \"tuple\"\n },\n { internalType: \"bytes32\", name: \"userOpHash\", type: \"bytes32\" },\n { internalType: \"uint256\", name: \"prefund\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"contextOffset\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"preOpGas\", type: \"uint256\" }\n ],\n internalType: \"struct EntryPoint.UserOpInfo\",\n name: \"opInfo\",\n type: \"tuple\"\n },\n { internalType: \"bytes\", name: \"context\", type: \"bytes\" }\n ],\n name: \"innerHandleOp\",\n outputs: [\n { internalType: \"uint256\", name: \"actualGasCost\", type: \"uint256\" }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint192\", name: \"\", type: \"uint192\" }\n ],\n name: \"nonceSequenceNumber\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes4\", name: \"interfaceId\", type: \"bytes4\" }],\n name: \"supportsInterface\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"unlockStake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n }\n ],\n name: \"withdrawStake\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n { internalType: \"uint256\", name: \"withdrawAmount\", type: \"uint256\" }\n ],\n name: \"withdrawTo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n { stateMutability: \"payable\", type: \"receive\" }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/version.js\n var version2;\n var init_version2 = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n version2 = \"1.1.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/errors.js\n var BaseError;\n var init_errors3 = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_version2();\n BaseError = class _BaseError extends Error {\n constructor(shortMessage, args = {}) {\n const details = args.cause instanceof _BaseError ? args.cause.details : args.cause?.message ? args.cause.message : args.details;\n const docsPath8 = args.cause instanceof _BaseError ? args.cause.docsPath || args.docsPath : args.docsPath;\n const message2 = [\n shortMessage || \"An error occurred.\",\n \"\",\n ...args.metaMessages ? [...args.metaMessages, \"\"] : [],\n ...docsPath8 ? [`Docs: https://abitype.dev${docsPath8}`] : [],\n ...details ? [`Details: ${details}`] : [],\n `Version: abitype@${version2}`\n ].join(\"\\n\");\n super(message2);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiTypeError\"\n });\n if (args.cause)\n this.cause = args.cause;\n this.details = details;\n this.docsPath = docsPath8;\n this.metaMessages = args.metaMessages;\n this.shortMessage = shortMessage;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/regex.js\n function execTyped(regex, string) {\n const match = regex.exec(string);\n return match?.groups;\n }\n var bytesRegex, integerRegex, isTupleRegex;\n var init_regex = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/regex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n integerRegex = /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\n isTupleRegex = /^\\(.+?\\).*?$/;\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js\n function formatAbiParameter(abiParameter) {\n let type = abiParameter.type;\n if (tupleRegex.test(abiParameter.type) && \"components\" in abiParameter) {\n type = \"(\";\n const length = abiParameter.components.length;\n for (let i3 = 0; i3 < length; i3++) {\n const component = abiParameter.components[i3];\n type += formatAbiParameter(component);\n if (i3 < length - 1)\n type += \", \";\n }\n const result = execTyped(tupleRegex, abiParameter.type);\n type += `)${result?.array ?? \"\"}`;\n return formatAbiParameter({\n ...abiParameter,\n type\n });\n }\n if (\"indexed\" in abiParameter && abiParameter.indexed)\n type = `${type} indexed`;\n if (abiParameter.name)\n return `${type} ${abiParameter.name}`;\n return type;\n }\n var tupleRegex;\n var init_formatAbiParameter = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n tupleRegex = /^tuple(?(\\[(\\d*)\\])*)$/;\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js\n function formatAbiParameters(abiParameters) {\n let params = \"\";\n const length = abiParameters.length;\n for (let i3 = 0; i3 < length; i3++) {\n const abiParameter = abiParameters[i3];\n params += formatAbiParameter(abiParameter);\n if (i3 !== length - 1)\n params += \", \";\n }\n return params;\n }\n var init_formatAbiParameters = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatAbiParameter();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js\n function formatAbiItem(abiItem) {\n if (abiItem.type === \"function\")\n return `function ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability && abiItem.stateMutability !== \"nonpayable\" ? ` ${abiItem.stateMutability}` : \"\"}${abiItem.outputs?.length ? ` returns (${formatAbiParameters(abiItem.outputs)})` : \"\"}`;\n if (abiItem.type === \"event\")\n return `event ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;\n if (abiItem.type === \"error\")\n return `error ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;\n if (abiItem.type === \"constructor\")\n return `constructor(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability === \"payable\" ? \" payable\" : \"\"}`;\n if (abiItem.type === \"fallback\")\n return `fallback() external${abiItem.stateMutability === \"payable\" ? \" payable\" : \"\"}`;\n return \"receive() external payable\";\n }\n var init_formatAbiItem = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatAbiParameters();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js\n function isErrorSignature(signature) {\n return errorSignatureRegex.test(signature);\n }\n function execErrorSignature(signature) {\n return execTyped(errorSignatureRegex, signature);\n }\n function isEventSignature(signature) {\n return eventSignatureRegex.test(signature);\n }\n function execEventSignature(signature) {\n return execTyped(eventSignatureRegex, signature);\n }\n function isFunctionSignature(signature) {\n return functionSignatureRegex.test(signature);\n }\n function execFunctionSignature(signature) {\n return execTyped(functionSignatureRegex, signature);\n }\n function isStructSignature(signature) {\n return structSignatureRegex.test(signature);\n }\n function execStructSignature(signature) {\n return execTyped(structSignatureRegex, signature);\n }\n function isConstructorSignature(signature) {\n return constructorSignatureRegex.test(signature);\n }\n function execConstructorSignature(signature) {\n return execTyped(constructorSignatureRegex, signature);\n }\n function isFallbackSignature(signature) {\n return fallbackSignatureRegex.test(signature);\n }\n function execFallbackSignature(signature) {\n return execTyped(fallbackSignatureRegex, signature);\n }\n function isReceiveSignature(signature) {\n return receiveSignatureRegex.test(signature);\n }\n var errorSignatureRegex, eventSignatureRegex, functionSignatureRegex, structSignatureRegex, constructorSignatureRegex, fallbackSignatureRegex, receiveSignatureRegex, modifiers, eventModifiers, functionModifiers;\n var init_signatures = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n errorSignatureRegex = /^error (?[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?.*?)\\)$/;\n eventSignatureRegex = /^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?.*?)\\)$/;\n functionSignatureRegex = /^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?.*?)\\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\\s?\\((?.*?)\\))?$/;\n structSignatureRegex = /^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \\{(?.*?)\\}$/;\n constructorSignatureRegex = /^constructor\\((?.*?)\\)(?:\\s(?payable{1}))?$/;\n fallbackSignatureRegex = /^fallback\\(\\) external(?:\\s(?payable{1}))?$/;\n receiveSignatureRegex = /^receive\\(\\) external payable$/;\n modifiers = /* @__PURE__ */ new Set([\n \"memory\",\n \"indexed\",\n \"storage\",\n \"calldata\"\n ]);\n eventModifiers = /* @__PURE__ */ new Set([\"indexed\"]);\n functionModifiers = /* @__PURE__ */ new Set([\n \"calldata\",\n \"memory\",\n \"storage\"\n ]);\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js\n var InvalidAbiItemError, UnknownTypeError, UnknownSolidityTypeError;\n var init_abiItem = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors3();\n InvalidAbiItemError = class extends BaseError {\n constructor({ signature }) {\n super(\"Failed to parse ABI item.\", {\n details: `parseAbiItem(${JSON.stringify(signature, null, 2)})`,\n docsPath: \"/api/human#parseabiitem-1\"\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidAbiItemError\"\n });\n }\n };\n UnknownTypeError = class extends BaseError {\n constructor({ type }) {\n super(\"Unknown type.\", {\n metaMessages: [\n `Type \"${type}\" is not a valid ABI type. Perhaps you forgot to include a struct signature?`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"UnknownTypeError\"\n });\n }\n };\n UnknownSolidityTypeError = class extends BaseError {\n constructor({ type }) {\n super(\"Unknown type.\", {\n metaMessages: [`Type \"${type}\" is not a valid ABI type.`]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"UnknownSolidityTypeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js\n var InvalidAbiParametersError, InvalidParameterError, SolidityProtectedKeywordError, InvalidModifierError, InvalidFunctionModifierError, InvalidAbiTypeParameterError;\n var init_abiParameter = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors3();\n InvalidAbiParametersError = class extends BaseError {\n constructor({ params }) {\n super(\"Failed to parse ABI parameters.\", {\n details: `parseAbiParameters(${JSON.stringify(params, null, 2)})`,\n docsPath: \"/api/human#parseabiparameters-1\"\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidAbiParametersError\"\n });\n }\n };\n InvalidParameterError = class extends BaseError {\n constructor({ param }) {\n super(\"Invalid ABI parameter.\", {\n details: param\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidParameterError\"\n });\n }\n };\n SolidityProtectedKeywordError = class extends BaseError {\n constructor({ param, name }) {\n super(\"Invalid ABI parameter.\", {\n details: param,\n metaMessages: [\n `\"${name}\" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SolidityProtectedKeywordError\"\n });\n }\n };\n InvalidModifierError = class extends BaseError {\n constructor({ param, type, modifier }) {\n super(\"Invalid ABI parameter.\", {\n details: param,\n metaMessages: [\n `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : \"\"}.`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidModifierError\"\n });\n }\n };\n InvalidFunctionModifierError = class extends BaseError {\n constructor({ param, type, modifier }) {\n super(\"Invalid ABI parameter.\", {\n details: param,\n metaMessages: [\n `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : \"\"}.`,\n `Data location can only be specified for array, struct, or mapping types, but \"${modifier}\" was given.`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidFunctionModifierError\"\n });\n }\n };\n InvalidAbiTypeParameterError = class extends BaseError {\n constructor({ abiParameter }) {\n super(\"Invalid ABI parameter.\", {\n details: JSON.stringify(abiParameter, null, 2),\n metaMessages: [\"ABI parameter type is invalid.\"]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidAbiTypeParameterError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/signature.js\n var InvalidSignatureError, UnknownSignatureError, InvalidStructSignatureError;\n var init_signature = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/signature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors3();\n InvalidSignatureError = class extends BaseError {\n constructor({ signature, type }) {\n super(`Invalid ${type} signature.`, {\n details: signature\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidSignatureError\"\n });\n }\n };\n UnknownSignatureError = class extends BaseError {\n constructor({ signature }) {\n super(\"Unknown signature.\", {\n details: signature\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"UnknownSignatureError\"\n });\n }\n };\n InvalidStructSignatureError = class extends BaseError {\n constructor({ signature }) {\n super(\"Invalid struct signature.\", {\n details: signature,\n metaMessages: [\"No properties exist.\"]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidStructSignatureError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/struct.js\n var CircularReferenceError;\n var init_struct = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/struct.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors3();\n CircularReferenceError = class extends BaseError {\n constructor({ type }) {\n super(\"Circular reference detected.\", {\n metaMessages: [`Struct \"${type}\" is a circular reference.`]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"CircularReferenceError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js\n var InvalidParenthesisError;\n var init_splitParameters = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors3();\n InvalidParenthesisError = class extends BaseError {\n constructor({ current, depth }) {\n super(\"Unbalanced parentheses.\", {\n metaMessages: [\n `\"${current.trim()}\" has too many ${depth > 0 ? \"opening\" : \"closing\"} parentheses.`\n ],\n details: `Depth \"${depth}\"`\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidParenthesisError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/cache.js\n function getParameterCacheKey(param, type, structs) {\n let structKey = \"\";\n if (structs)\n for (const struct of Object.entries(structs)) {\n if (!struct)\n continue;\n let propertyKey = \"\";\n for (const property of struct[1]) {\n propertyKey += `[${property.type}${property.name ? `:${property.name}` : \"\"}]`;\n }\n structKey += `(${struct[0]}{${propertyKey}})`;\n }\n if (type)\n return `${type}:${param}${structKey}`;\n return param;\n }\n var parameterCache;\n var init_cache = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/cache.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n parameterCache = /* @__PURE__ */ new Map([\n // Unnamed\n [\"address\", { type: \"address\" }],\n [\"bool\", { type: \"bool\" }],\n [\"bytes\", { type: \"bytes\" }],\n [\"bytes32\", { type: \"bytes32\" }],\n [\"int\", { type: \"int256\" }],\n [\"int256\", { type: \"int256\" }],\n [\"string\", { type: \"string\" }],\n [\"uint\", { type: \"uint256\" }],\n [\"uint8\", { type: \"uint8\" }],\n [\"uint16\", { type: \"uint16\" }],\n [\"uint24\", { type: \"uint24\" }],\n [\"uint32\", { type: \"uint32\" }],\n [\"uint64\", { type: \"uint64\" }],\n [\"uint96\", { type: \"uint96\" }],\n [\"uint112\", { type: \"uint112\" }],\n [\"uint160\", { type: \"uint160\" }],\n [\"uint192\", { type: \"uint192\" }],\n [\"uint256\", { type: \"uint256\" }],\n // Named\n [\"address owner\", { type: \"address\", name: \"owner\" }],\n [\"address to\", { type: \"address\", name: \"to\" }],\n [\"bool approved\", { type: \"bool\", name: \"approved\" }],\n [\"bytes _data\", { type: \"bytes\", name: \"_data\" }],\n [\"bytes data\", { type: \"bytes\", name: \"data\" }],\n [\"bytes signature\", { type: \"bytes\", name: \"signature\" }],\n [\"bytes32 hash\", { type: \"bytes32\", name: \"hash\" }],\n [\"bytes32 r\", { type: \"bytes32\", name: \"r\" }],\n [\"bytes32 root\", { type: \"bytes32\", name: \"root\" }],\n [\"bytes32 s\", { type: \"bytes32\", name: \"s\" }],\n [\"string name\", { type: \"string\", name: \"name\" }],\n [\"string symbol\", { type: \"string\", name: \"symbol\" }],\n [\"string tokenURI\", { type: \"string\", name: \"tokenURI\" }],\n [\"uint tokenId\", { type: \"uint256\", name: \"tokenId\" }],\n [\"uint8 v\", { type: \"uint8\", name: \"v\" }],\n [\"uint256 balance\", { type: \"uint256\", name: \"balance\" }],\n [\"uint256 tokenId\", { type: \"uint256\", name: \"tokenId\" }],\n [\"uint256 value\", { type: \"uint256\", name: \"value\" }],\n // Indexed\n [\n \"event:address indexed from\",\n { type: \"address\", name: \"from\", indexed: true }\n ],\n [\"event:address indexed to\", { type: \"address\", name: \"to\", indexed: true }],\n [\n \"event:uint indexed tokenId\",\n { type: \"uint256\", name: \"tokenId\", indexed: true }\n ],\n [\n \"event:uint256 indexed tokenId\",\n { type: \"uint256\", name: \"tokenId\", indexed: true }\n ]\n ]);\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/utils.js\n function parseSignature(signature, structs = {}) {\n if (isFunctionSignature(signature))\n return parseFunctionSignature(signature, structs);\n if (isEventSignature(signature))\n return parseEventSignature(signature, structs);\n if (isErrorSignature(signature))\n return parseErrorSignature(signature, structs);\n if (isConstructorSignature(signature))\n return parseConstructorSignature(signature, structs);\n if (isFallbackSignature(signature))\n return parseFallbackSignature(signature);\n if (isReceiveSignature(signature))\n return {\n type: \"receive\",\n stateMutability: \"payable\"\n };\n throw new UnknownSignatureError({ signature });\n }\n function parseFunctionSignature(signature, structs = {}) {\n const match = execFunctionSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"function\" });\n const inputParams = splitParameters(match.parameters);\n const inputs = [];\n const inputLength = inputParams.length;\n for (let i3 = 0; i3 < inputLength; i3++) {\n inputs.push(parseAbiParameter(inputParams[i3], {\n modifiers: functionModifiers,\n structs,\n type: \"function\"\n }));\n }\n const outputs = [];\n if (match.returns) {\n const outputParams = splitParameters(match.returns);\n const outputLength = outputParams.length;\n for (let i3 = 0; i3 < outputLength; i3++) {\n outputs.push(parseAbiParameter(outputParams[i3], {\n modifiers: functionModifiers,\n structs,\n type: \"function\"\n }));\n }\n }\n return {\n name: match.name,\n type: \"function\",\n stateMutability: match.stateMutability ?? \"nonpayable\",\n inputs,\n outputs\n };\n }\n function parseEventSignature(signature, structs = {}) {\n const match = execEventSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"event\" });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i3 = 0; i3 < length; i3++)\n abiParameters.push(parseAbiParameter(params[i3], {\n modifiers: eventModifiers,\n structs,\n type: \"event\"\n }));\n return { name: match.name, type: \"event\", inputs: abiParameters };\n }\n function parseErrorSignature(signature, structs = {}) {\n const match = execErrorSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"error\" });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i3 = 0; i3 < length; i3++)\n abiParameters.push(parseAbiParameter(params[i3], { structs, type: \"error\" }));\n return { name: match.name, type: \"error\", inputs: abiParameters };\n }\n function parseConstructorSignature(signature, structs = {}) {\n const match = execConstructorSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"constructor\" });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i3 = 0; i3 < length; i3++)\n abiParameters.push(parseAbiParameter(params[i3], { structs, type: \"constructor\" }));\n return {\n type: \"constructor\",\n stateMutability: match.stateMutability ?? \"nonpayable\",\n inputs: abiParameters\n };\n }\n function parseFallbackSignature(signature) {\n const match = execFallbackSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"fallback\" });\n return {\n type: \"fallback\",\n stateMutability: match.stateMutability ?? \"nonpayable\"\n };\n }\n function parseAbiParameter(param, options) {\n const parameterCacheKey = getParameterCacheKey(param, options?.type, options?.structs);\n if (parameterCache.has(parameterCacheKey))\n return parameterCache.get(parameterCacheKey);\n const isTuple = isTupleRegex.test(param);\n const match = execTyped(isTuple ? abiParameterWithTupleRegex : abiParameterWithoutTupleRegex, param);\n if (!match)\n throw new InvalidParameterError({ param });\n if (match.name && isSolidityKeyword(match.name))\n throw new SolidityProtectedKeywordError({ param, name: match.name });\n const name = match.name ? { name: match.name } : {};\n const indexed = match.modifier === \"indexed\" ? { indexed: true } : {};\n const structs = options?.structs ?? {};\n let type;\n let components = {};\n if (isTuple) {\n type = \"tuple\";\n const params = splitParameters(match.type);\n const components_ = [];\n const length = params.length;\n for (let i3 = 0; i3 < length; i3++) {\n components_.push(parseAbiParameter(params[i3], { structs }));\n }\n components = { components: components_ };\n } else if (match.type in structs) {\n type = \"tuple\";\n components = { components: structs[match.type] };\n } else if (dynamicIntegerRegex.test(match.type)) {\n type = `${match.type}256`;\n } else if (match.type === \"address payable\") {\n type = \"address\";\n } else {\n type = match.type;\n if (!(options?.type === \"struct\") && !isSolidityType(type))\n throw new UnknownSolidityTypeError({ type });\n }\n if (match.modifier) {\n if (!options?.modifiers?.has?.(match.modifier))\n throw new InvalidModifierError({\n param,\n type: options?.type,\n modifier: match.modifier\n });\n if (functionModifiers.has(match.modifier) && !isValidDataLocation(type, !!match.array))\n throw new InvalidFunctionModifierError({\n param,\n type: options?.type,\n modifier: match.modifier\n });\n }\n const abiParameter = {\n type: `${type}${match.array ?? \"\"}`,\n ...name,\n ...indexed,\n ...components\n };\n parameterCache.set(parameterCacheKey, abiParameter);\n return abiParameter;\n }\n function splitParameters(params, result = [], current = \"\", depth = 0) {\n const length = params.trim().length;\n for (let i3 = 0; i3 < length; i3++) {\n const char = params[i3];\n const tail = params.slice(i3 + 1);\n switch (char) {\n case \",\":\n return depth === 0 ? splitParameters(tail, [...result, current.trim()]) : splitParameters(tail, result, `${current}${char}`, depth);\n case \"(\":\n return splitParameters(tail, result, `${current}${char}`, depth + 1);\n case \")\":\n return splitParameters(tail, result, `${current}${char}`, depth - 1);\n default:\n return splitParameters(tail, result, `${current}${char}`, depth);\n }\n }\n if (current === \"\")\n return result;\n if (depth !== 0)\n throw new InvalidParenthesisError({ current, depth });\n result.push(current.trim());\n return result;\n }\n function isSolidityType(type) {\n return type === \"address\" || type === \"bool\" || type === \"function\" || type === \"string\" || bytesRegex.test(type) || integerRegex.test(type);\n }\n function isSolidityKeyword(name) {\n return name === \"address\" || name === \"bool\" || name === \"function\" || name === \"string\" || name === \"tuple\" || bytesRegex.test(name) || integerRegex.test(name) || protectedKeywordsRegex.test(name);\n }\n function isValidDataLocation(type, isArray) {\n return isArray || type === \"bytes\" || type === \"string\" || type === \"tuple\";\n }\n var abiParameterWithoutTupleRegex, abiParameterWithTupleRegex, dynamicIntegerRegex, protectedKeywordsRegex;\n var init_utils2 = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n init_abiItem();\n init_abiParameter();\n init_signature();\n init_splitParameters();\n init_cache();\n init_signatures();\n abiParameterWithoutTupleRegex = /^(?[a-zA-Z$_][a-zA-Z0-9$_]*(?:\\spayable)?)(?(?:\\[\\d*?\\])+?)?(?:\\s(?calldata|indexed|memory|storage{1}))?(?:\\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\n abiParameterWithTupleRegex = /^\\((?.+?)\\)(?(?:\\[\\d*?\\])+?)?(?:\\s(?calldata|indexed|memory|storage{1}))?(?:\\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\n dynamicIntegerRegex = /^u?int$/;\n protectedKeywordsRegex = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/structs.js\n function parseStructs(signatures) {\n const shallowStructs = {};\n const signaturesLength = signatures.length;\n for (let i3 = 0; i3 < signaturesLength; i3++) {\n const signature = signatures[i3];\n if (!isStructSignature(signature))\n continue;\n const match = execStructSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: \"struct\" });\n const properties = match.properties.split(\";\");\n const components = [];\n const propertiesLength = properties.length;\n for (let k4 = 0; k4 < propertiesLength; k4++) {\n const property = properties[k4];\n const trimmed = property.trim();\n if (!trimmed)\n continue;\n const abiParameter = parseAbiParameter(trimmed, {\n type: \"struct\"\n });\n components.push(abiParameter);\n }\n if (!components.length)\n throw new InvalidStructSignatureError({ signature });\n shallowStructs[match.name] = components;\n }\n const resolvedStructs = {};\n const entries = Object.entries(shallowStructs);\n const entriesLength = entries.length;\n for (let i3 = 0; i3 < entriesLength; i3++) {\n const [name, parameters] = entries[i3];\n resolvedStructs[name] = resolveStructs(parameters, shallowStructs);\n }\n return resolvedStructs;\n }\n function resolveStructs(abiParameters, structs, ancestors = /* @__PURE__ */ new Set()) {\n const components = [];\n const length = abiParameters.length;\n for (let i3 = 0; i3 < length; i3++) {\n const abiParameter = abiParameters[i3];\n const isTuple = isTupleRegex.test(abiParameter.type);\n if (isTuple)\n components.push(abiParameter);\n else {\n const match = execTyped(typeWithoutTupleRegex, abiParameter.type);\n if (!match?.type)\n throw new InvalidAbiTypeParameterError({ abiParameter });\n const { array, type } = match;\n if (type in structs) {\n if (ancestors.has(type))\n throw new CircularReferenceError({ type });\n components.push({\n ...abiParameter,\n type: `tuple${array ?? \"\"}`,\n components: resolveStructs(structs[type] ?? [], structs, /* @__PURE__ */ new Set([...ancestors, type]))\n });\n } else {\n if (isSolidityType(type))\n components.push(abiParameter);\n else\n throw new UnknownTypeError({ type });\n }\n }\n }\n return components;\n }\n var typeWithoutTupleRegex;\n var init_structs = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/runtime/structs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n init_abiItem();\n init_abiParameter();\n init_signature();\n init_struct();\n init_signatures();\n init_utils2();\n typeWithoutTupleRegex = /^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\\[\\d*?\\])+?)?$/;\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbi.js\n function parseAbi(signatures) {\n const structs = parseStructs(signatures);\n const abi2 = [];\n const length = signatures.length;\n for (let i3 = 0; i3 < length; i3++) {\n const signature = signatures[i3];\n if (isStructSignature(signature))\n continue;\n abi2.push(parseSignature(signature, structs));\n }\n return abi2;\n }\n var init_parseAbi = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_signatures();\n init_structs();\n init_utils2();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbiItem.js\n function parseAbiItem(signature) {\n let abiItem;\n if (typeof signature === \"string\")\n abiItem = parseSignature(signature);\n else {\n const structs = parseStructs(signature);\n const length = signature.length;\n for (let i3 = 0; i3 < length; i3++) {\n const signature_ = signature[i3];\n if (isStructSignature(signature_))\n continue;\n abiItem = parseSignature(signature_, structs);\n break;\n }\n }\n if (!abiItem)\n throw new InvalidAbiItemError({ signature });\n return abiItem;\n }\n var init_parseAbiItem = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abiItem();\n init_signatures();\n init_structs();\n init_utils2();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js\n function parseAbiParameters(params) {\n const abiParameters = [];\n if (typeof params === \"string\") {\n const parameters = splitParameters(params);\n const length = parameters.length;\n for (let i3 = 0; i3 < length; i3++) {\n abiParameters.push(parseAbiParameter(parameters[i3], { modifiers }));\n }\n } else {\n const structs = parseStructs(params);\n const length = params.length;\n for (let i3 = 0; i3 < length; i3++) {\n const signature = params[i3];\n if (isStructSignature(signature))\n continue;\n const parameters = splitParameters(signature);\n const length2 = parameters.length;\n for (let k4 = 0; k4 < length2; k4++) {\n abiParameters.push(parseAbiParameter(parameters[k4], { modifiers, structs }));\n }\n }\n }\n if (abiParameters.length === 0)\n throw new InvalidAbiParametersError({ params });\n return abiParameters;\n }\n var init_parseAbiParameters = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abiParameter();\n init_signatures();\n init_structs();\n init_utils2();\n init_utils2();\n }\n });\n\n // ../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/exports/index.js\n var init_exports = __esm({\n \"../../../node_modules/.pnpm/abitype@1.1.0_typescript@5.8.3_zod@3.25.64/node_modules/abitype/dist/esm/exports/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatAbiItem();\n init_formatAbiParameters();\n init_parseAbi();\n init_parseAbiItem();\n init_parseAbiParameters();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/getAction.js\n function getAction(client, actionFn, name) {\n const action_implicit = client[actionFn.name];\n if (typeof action_implicit === \"function\")\n return action_implicit;\n const action_explicit = client[name];\n if (typeof action_explicit === \"function\")\n return action_explicit;\n return (params) => actionFn(client, params);\n }\n var init_getAction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/getAction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/formatAbiItem.js\n function formatAbiItem2(abiItem, { includeName = false } = {}) {\n if (abiItem.type !== \"function\" && abiItem.type !== \"event\" && abiItem.type !== \"error\")\n throw new InvalidDefinitionTypeError(abiItem.type);\n return `${abiItem.name}(${formatAbiParams(abiItem.inputs, { includeName })})`;\n }\n function formatAbiParams(params, { includeName = false } = {}) {\n if (!params)\n return \"\";\n return params.map((param) => formatAbiParam(param, { includeName })).join(includeName ? \", \" : \",\");\n }\n function formatAbiParam(param, { includeName }) {\n if (param.type.startsWith(\"tuple\")) {\n return `(${formatAbiParams(param.components, { includeName })})${param.type.slice(\"tuple\".length)}`;\n }\n return param.type + (includeName && param.name ? ` ${param.name}` : \"\");\n }\n var init_formatAbiItem2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/formatAbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/isHex.js\n function isHex(value, { strict = true } = {}) {\n if (!value)\n return false;\n if (typeof value !== \"string\")\n return false;\n return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith(\"0x\");\n }\n var init_isHex = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/isHex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/size.js\n function size(value) {\n if (isHex(value, { strict: false }))\n return Math.ceil((value.length - 2) / 2);\n return value.length;\n }\n var init_size = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/size.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/version.js\n var version3;\n var init_version3 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n version3 = \"2.38.4\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/base.js\n function walk(err, fn) {\n if (fn?.(err))\n return err;\n if (err && typeof err === \"object\" && \"cause\" in err && err.cause !== void 0)\n return walk(err.cause, fn);\n return fn ? null : err;\n }\n var errorConfig, BaseError2;\n var init_base = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_version3();\n errorConfig = {\n getDocsUrl: ({ docsBaseUrl, docsPath: docsPath8 = \"\", docsSlug }) => docsPath8 ? `${docsBaseUrl ?? \"https://viem.sh\"}${docsPath8}${docsSlug ? `#${docsSlug}` : \"\"}` : void 0,\n version: `viem@${version3}`\n };\n BaseError2 = class _BaseError extends Error {\n constructor(shortMessage, args = {}) {\n const details = (() => {\n if (args.cause instanceof _BaseError)\n return args.cause.details;\n if (args.cause?.message)\n return args.cause.message;\n return args.details;\n })();\n const docsPath8 = (() => {\n if (args.cause instanceof _BaseError)\n return args.cause.docsPath || args.docsPath;\n return args.docsPath;\n })();\n const docsUrl = errorConfig.getDocsUrl?.({ ...args, docsPath: docsPath8 });\n const message2 = [\n shortMessage || \"An error occurred.\",\n \"\",\n ...args.metaMessages ? [...args.metaMessages, \"\"] : [],\n ...docsUrl ? [`Docs: ${docsUrl}`] : [],\n ...details ? [`Details: ${details}`] : [],\n ...errorConfig.version ? [`Version: ${errorConfig.version}`] : []\n ].join(\"\\n\");\n super(message2, args.cause ? { cause: args.cause } : void 0);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"BaseError\"\n });\n this.details = details;\n this.docsPath = docsPath8;\n this.metaMessages = args.metaMessages;\n this.name = args.name ?? this.name;\n this.shortMessage = shortMessage;\n this.version = version3;\n }\n walk(fn) {\n return walk(this, fn);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/abi.js\n var AbiConstructorNotFoundError, AbiConstructorParamsNotFoundError, AbiDecodingDataSizeTooSmallError, AbiDecodingZeroDataError, AbiEncodingArrayLengthMismatchError, AbiEncodingBytesSizeMismatchError, AbiEncodingLengthMismatchError, AbiErrorInputsNotFoundError, AbiErrorNotFoundError, AbiErrorSignatureNotFoundError, AbiEventSignatureEmptyTopicsError, AbiEventSignatureNotFoundError, AbiEventNotFoundError, AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, AbiFunctionSignatureNotFoundError, AbiItemAmbiguityError, BytesSizeMismatchError, DecodeLogDataMismatch, DecodeLogTopicsMismatch, InvalidAbiEncodingTypeError, InvalidAbiDecodingTypeError, InvalidArrayError, InvalidDefinitionTypeError, UnsupportedPackedAbiType;\n var init_abi = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/abi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatAbiItem2();\n init_size();\n init_base();\n AbiConstructorNotFoundError = class extends BaseError2 {\n constructor({ docsPath: docsPath8 }) {\n super([\n \"A constructor was not found on the ABI.\",\n \"Make sure you are using the correct ABI and that the constructor exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiConstructorNotFoundError\"\n });\n }\n };\n AbiConstructorParamsNotFoundError = class extends BaseError2 {\n constructor({ docsPath: docsPath8 }) {\n super([\n \"Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.\",\n \"Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiConstructorParamsNotFoundError\"\n });\n }\n };\n AbiDecodingDataSizeTooSmallError = class extends BaseError2 {\n constructor({ data, params, size: size6 }) {\n super([`Data size of ${size6} bytes is too small for given parameters.`].join(\"\\n\"), {\n metaMessages: [\n `Params: (${formatAbiParams(params, { includeName: true })})`,\n `Data: ${data} (${size6} bytes)`\n ],\n name: \"AbiDecodingDataSizeTooSmallError\"\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"params\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"size\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = data;\n this.params = params;\n this.size = size6;\n }\n };\n AbiDecodingZeroDataError = class extends BaseError2 {\n constructor() {\n super('Cannot decode zero data (\"0x\") with ABI parameters.', {\n name: \"AbiDecodingZeroDataError\"\n });\n }\n };\n AbiEncodingArrayLengthMismatchError = class extends BaseError2 {\n constructor({ expectedLength, givenLength, type }) {\n super([\n `ABI encoding array length mismatch for type ${type}.`,\n `Expected length: ${expectedLength}`,\n `Given length: ${givenLength}`\n ].join(\"\\n\"), { name: \"AbiEncodingArrayLengthMismatchError\" });\n }\n };\n AbiEncodingBytesSizeMismatchError = class extends BaseError2 {\n constructor({ expectedSize, value }) {\n super(`Size of bytes \"${value}\" (bytes${size(value)}) does not match expected size (bytes${expectedSize}).`, { name: \"AbiEncodingBytesSizeMismatchError\" });\n }\n };\n AbiEncodingLengthMismatchError = class extends BaseError2 {\n constructor({ expectedLength, givenLength }) {\n super([\n \"ABI encoding params/values length mismatch.\",\n `Expected length (params): ${expectedLength}`,\n `Given length (values): ${givenLength}`\n ].join(\"\\n\"), { name: \"AbiEncodingLengthMismatchError\" });\n }\n };\n AbiErrorInputsNotFoundError = class extends BaseError2 {\n constructor(errorName, { docsPath: docsPath8 }) {\n super([\n `Arguments (\\`args\\`) were provided to \"${errorName}\", but \"${errorName}\" on the ABI does not contain any parameters (\\`inputs\\`).`,\n \"Cannot encode error result without knowing what the parameter types are.\",\n \"Make sure you are using the correct ABI and that the inputs exist on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiErrorInputsNotFoundError\"\n });\n }\n };\n AbiErrorNotFoundError = class extends BaseError2 {\n constructor(errorName, { docsPath: docsPath8 } = {}) {\n super([\n `Error ${errorName ? `\"${errorName}\" ` : \"\"}not found on ABI.`,\n \"Make sure you are using the correct ABI and that the error exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiErrorNotFoundError\"\n });\n }\n };\n AbiErrorSignatureNotFoundError = class extends BaseError2 {\n constructor(signature, { docsPath: docsPath8 }) {\n super([\n `Encoded error signature \"${signature}\" not found on ABI.`,\n \"Make sure you are using the correct ABI and that the error exists on it.\",\n `You can look up the decoded signature here: https://openchain.xyz/signatures?query=${signature}.`\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiErrorSignatureNotFoundError\"\n });\n Object.defineProperty(this, \"signature\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.signature = signature;\n }\n };\n AbiEventSignatureEmptyTopicsError = class extends BaseError2 {\n constructor({ docsPath: docsPath8 }) {\n super(\"Cannot extract event signature from empty topics.\", {\n docsPath: docsPath8,\n name: \"AbiEventSignatureEmptyTopicsError\"\n });\n }\n };\n AbiEventSignatureNotFoundError = class extends BaseError2 {\n constructor(signature, { docsPath: docsPath8 }) {\n super([\n `Encoded event signature \"${signature}\" not found on ABI.`,\n \"Make sure you are using the correct ABI and that the event exists on it.\",\n `You can look up the signature here: https://openchain.xyz/signatures?query=${signature}.`\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiEventSignatureNotFoundError\"\n });\n }\n };\n AbiEventNotFoundError = class extends BaseError2 {\n constructor(eventName, { docsPath: docsPath8 } = {}) {\n super([\n `Event ${eventName ? `\"${eventName}\" ` : \"\"}not found on ABI.`,\n \"Make sure you are using the correct ABI and that the event exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiEventNotFoundError\"\n });\n }\n };\n AbiFunctionNotFoundError = class extends BaseError2 {\n constructor(functionName, { docsPath: docsPath8 } = {}) {\n super([\n `Function ${functionName ? `\"${functionName}\" ` : \"\"}not found on ABI.`,\n \"Make sure you are using the correct ABI and that the function exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiFunctionNotFoundError\"\n });\n }\n };\n AbiFunctionOutputsNotFoundError = class extends BaseError2 {\n constructor(functionName, { docsPath: docsPath8 }) {\n super([\n `Function \"${functionName}\" does not contain any \\`outputs\\` on ABI.`,\n \"Cannot decode function result without knowing what the parameter types are.\",\n \"Make sure you are using the correct ABI and that the function exists on it.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiFunctionOutputsNotFoundError\"\n });\n }\n };\n AbiFunctionSignatureNotFoundError = class extends BaseError2 {\n constructor(signature, { docsPath: docsPath8 }) {\n super([\n `Encoded function signature \"${signature}\" not found on ABI.`,\n \"Make sure you are using the correct ABI and that the function exists on it.\",\n `You can look up the signature here: https://openchain.xyz/signatures?query=${signature}.`\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n name: \"AbiFunctionSignatureNotFoundError\"\n });\n }\n };\n AbiItemAmbiguityError = class extends BaseError2 {\n constructor(x4, y6) {\n super(\"Found ambiguous types in overloaded ABI items.\", {\n metaMessages: [\n `\\`${x4.type}\\` in \\`${formatAbiItem2(x4.abiItem)}\\`, and`,\n `\\`${y6.type}\\` in \\`${formatAbiItem2(y6.abiItem)}\\``,\n \"\",\n \"These types encode differently and cannot be distinguished at runtime.\",\n \"Remove one of the ambiguous items in the ABI.\"\n ],\n name: \"AbiItemAmbiguityError\"\n });\n }\n };\n BytesSizeMismatchError = class extends BaseError2 {\n constructor({ expectedSize, givenSize }) {\n super(`Expected bytes${expectedSize}, got bytes${givenSize}.`, {\n name: \"BytesSizeMismatchError\"\n });\n }\n };\n DecodeLogDataMismatch = class extends BaseError2 {\n constructor({ abiItem, data, params, size: size6 }) {\n super([\n `Data size of ${size6} bytes is too small for non-indexed event parameters.`\n ].join(\"\\n\"), {\n metaMessages: [\n `Params: (${formatAbiParams(params, { includeName: true })})`,\n `Data: ${data} (${size6} bytes)`\n ],\n name: \"DecodeLogDataMismatch\"\n });\n Object.defineProperty(this, \"abiItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"params\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"size\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abiItem = abiItem;\n this.data = data;\n this.params = params;\n this.size = size6;\n }\n };\n DecodeLogTopicsMismatch = class extends BaseError2 {\n constructor({ abiItem, param }) {\n super([\n `Expected a topic for indexed event parameter${param.name ? ` \"${param.name}\"` : \"\"} on event \"${formatAbiItem2(abiItem, { includeName: true })}\".`\n ].join(\"\\n\"), { name: \"DecodeLogTopicsMismatch\" });\n Object.defineProperty(this, \"abiItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abiItem = abiItem;\n }\n };\n InvalidAbiEncodingTypeError = class extends BaseError2 {\n constructor(type, { docsPath: docsPath8 }) {\n super([\n `Type \"${type}\" is not a valid encoding type.`,\n \"Please provide a valid ABI type.\"\n ].join(\"\\n\"), { docsPath: docsPath8, name: \"InvalidAbiEncodingType\" });\n }\n };\n InvalidAbiDecodingTypeError = class extends BaseError2 {\n constructor(type, { docsPath: docsPath8 }) {\n super([\n `Type \"${type}\" is not a valid decoding type.`,\n \"Please provide a valid ABI type.\"\n ].join(\"\\n\"), { docsPath: docsPath8, name: \"InvalidAbiDecodingType\" });\n }\n };\n InvalidArrayError = class extends BaseError2 {\n constructor(value) {\n super([`Value \"${value}\" is not a valid array.`].join(\"\\n\"), {\n name: \"InvalidArrayError\"\n });\n }\n };\n InvalidDefinitionTypeError = class extends BaseError2 {\n constructor(type) {\n super([\n `\"${type}\" is not a valid definition type.`,\n 'Valid types: \"function\", \"event\", \"error\"'\n ].join(\"\\n\"), { name: \"InvalidDefinitionTypeError\" });\n }\n };\n UnsupportedPackedAbiType = class extends BaseError2 {\n constructor(type) {\n super(`Type \"${type}\" is not supported for packed encoding.`, {\n name: \"UnsupportedPackedAbiType\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/log.js\n var FilterTypeNotSupportedError;\n var init_log = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/log.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n FilterTypeNotSupportedError = class extends BaseError2 {\n constructor(type) {\n super(`Filter type \"${type}\" is not supported.`, {\n name: \"FilterTypeNotSupportedError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/data.js\n var SliceOffsetOutOfBoundsError, SizeExceedsPaddingSizeError, InvalidBytesLengthError;\n var init_data = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/data.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n SliceOffsetOutOfBoundsError = class extends BaseError2 {\n constructor({ offset, position, size: size6 }) {\n super(`Slice ${position === \"start\" ? \"starting\" : \"ending\"} at offset \"${offset}\" is out-of-bounds (size: ${size6}).`, { name: \"SliceOffsetOutOfBoundsError\" });\n }\n };\n SizeExceedsPaddingSizeError = class extends BaseError2 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (${size6}) exceeds padding size (${targetSize}).`, { name: \"SizeExceedsPaddingSizeError\" });\n }\n };\n InvalidBytesLengthError = class extends BaseError2 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} is expected to be ${targetSize} ${type} long, but is ${size6} ${type} long.`, { name: \"InvalidBytesLengthError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/pad.js\n function pad(hexOrBytes, { dir, size: size6 = 32 } = {}) {\n if (typeof hexOrBytes === \"string\")\n return padHex(hexOrBytes, { dir, size: size6 });\n return padBytes(hexOrBytes, { dir, size: size6 });\n }\n function padHex(hex_, { dir, size: size6 = 32 } = {}) {\n if (size6 === null)\n return hex_;\n const hex = hex_.replace(\"0x\", \"\");\n if (hex.length > size6 * 2)\n throw new SizeExceedsPaddingSizeError({\n size: Math.ceil(hex.length / 2),\n targetSize: size6,\n type: \"hex\"\n });\n return `0x${hex[dir === \"right\" ? \"padEnd\" : \"padStart\"](size6 * 2, \"0\")}`;\n }\n function padBytes(bytes, { dir, size: size6 = 32 } = {}) {\n if (size6 === null)\n return bytes;\n if (bytes.length > size6)\n throw new SizeExceedsPaddingSizeError({\n size: bytes.length,\n targetSize: size6,\n type: \"bytes\"\n });\n const paddedBytes = new Uint8Array(size6);\n for (let i3 = 0; i3 < size6; i3++) {\n const padEnd = dir === \"right\";\n paddedBytes[padEnd ? i3 : size6 - i3 - 1] = bytes[padEnd ? i3 : bytes.length - i3 - 1];\n }\n return paddedBytes;\n }\n var init_pad = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/pad.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_data();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/encoding.js\n var IntegerOutOfRangeError, InvalidBytesBooleanError, InvalidHexBooleanError, SizeOverflowError;\n var init_encoding = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/encoding.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n IntegerOutOfRangeError = class extends BaseError2 {\n constructor({ max, min, signed, size: size6, value }) {\n super(`Number \"${value}\" is not in safe ${size6 ? `${size6 * 8}-bit ${signed ? \"signed\" : \"unsigned\"} ` : \"\"}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, { name: \"IntegerOutOfRangeError\" });\n }\n };\n InvalidBytesBooleanError = class extends BaseError2 {\n constructor(bytes) {\n super(`Bytes value \"${bytes}\" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {\n name: \"InvalidBytesBooleanError\"\n });\n }\n };\n InvalidHexBooleanError = class extends BaseError2 {\n constructor(hex) {\n super(`Hex value \"${hex}\" is not a valid boolean. The hex value must be \"0x0\" (false) or \"0x1\" (true).`, { name: \"InvalidHexBooleanError\" });\n }\n };\n SizeOverflowError = class extends BaseError2 {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed ${maxSize} bytes. Given size: ${givenSize} bytes.`, { name: \"SizeOverflowError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/trim.js\n function trim(hexOrBytes, { dir = \"left\" } = {}) {\n let data = typeof hexOrBytes === \"string\" ? hexOrBytes.replace(\"0x\", \"\") : hexOrBytes;\n let sliceLength = 0;\n for (let i3 = 0; i3 < data.length - 1; i3++) {\n if (data[dir === \"left\" ? i3 : data.length - i3 - 1].toString() === \"0\")\n sliceLength++;\n else\n break;\n }\n data = dir === \"left\" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);\n if (typeof hexOrBytes === \"string\") {\n if (data.length === 1 && dir === \"right\")\n data = `${data}0`;\n return `0x${data.length % 2 === 1 ? `0${data}` : data}`;\n }\n return data;\n }\n var init_trim = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/trim.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/fromHex.js\n function assertSize(hexOrBytes, { size: size6 }) {\n if (size(hexOrBytes) > size6)\n throw new SizeOverflowError({\n givenSize: size(hexOrBytes),\n maxSize: size6\n });\n }\n function fromHex(hex, toOrOpts) {\n const opts = typeof toOrOpts === \"string\" ? { to: toOrOpts } : toOrOpts;\n const to = opts.to;\n if (to === \"number\")\n return hexToNumber(hex, opts);\n if (to === \"bigint\")\n return hexToBigInt(hex, opts);\n if (to === \"string\")\n return hexToString(hex, opts);\n if (to === \"boolean\")\n return hexToBool(hex, opts);\n return hexToBytes(hex, opts);\n }\n function hexToBigInt(hex, opts = {}) {\n const { signed } = opts;\n if (opts.size)\n assertSize(hex, { size: opts.size });\n const value = BigInt(hex);\n if (!signed)\n return value;\n const size6 = (hex.length - 2) / 2;\n const max = (1n << BigInt(size6) * 8n - 1n) - 1n;\n if (value <= max)\n return value;\n return value - BigInt(`0x${\"f\".padStart(size6 * 2, \"f\")}`) - 1n;\n }\n function hexToBool(hex_, opts = {}) {\n let hex = hex_;\n if (opts.size) {\n assertSize(hex, { size: opts.size });\n hex = trim(hex);\n }\n if (trim(hex) === \"0x00\")\n return false;\n if (trim(hex) === \"0x01\")\n return true;\n throw new InvalidHexBooleanError(hex);\n }\n function hexToNumber(hex, opts = {}) {\n return Number(hexToBigInt(hex, opts));\n }\n function hexToString(hex, opts = {}) {\n let bytes = hexToBytes(hex);\n if (opts.size) {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes, { dir: \"right\" });\n }\n return new TextDecoder().decode(bytes);\n }\n var init_fromHex = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/fromHex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encoding();\n init_size();\n init_trim();\n init_toBytes();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toHex.js\n function toHex(value, opts = {}) {\n if (typeof value === \"number\" || typeof value === \"bigint\")\n return numberToHex(value, opts);\n if (typeof value === \"string\") {\n return stringToHex(value, opts);\n }\n if (typeof value === \"boolean\")\n return boolToHex(value, opts);\n return bytesToHex(value, opts);\n }\n function boolToHex(value, opts = {}) {\n const hex = `0x${Number(value)}`;\n if (typeof opts.size === \"number\") {\n assertSize(hex, { size: opts.size });\n return pad(hex, { size: opts.size });\n }\n return hex;\n }\n function bytesToHex(value, opts = {}) {\n let string = \"\";\n for (let i3 = 0; i3 < value.length; i3++) {\n string += hexes[value[i3]];\n }\n const hex = `0x${string}`;\n if (typeof opts.size === \"number\") {\n assertSize(hex, { size: opts.size });\n return pad(hex, { dir: \"right\", size: opts.size });\n }\n return hex;\n }\n function numberToHex(value_, opts = {}) {\n const { signed, size: size6 } = opts;\n const value = BigInt(value_);\n let maxValue;\n if (size6) {\n if (signed)\n maxValue = (1n << BigInt(size6) * 8n - 1n) - 1n;\n else\n maxValue = 2n ** (BigInt(size6) * 8n) - 1n;\n } else if (typeof value_ === \"number\") {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n }\n const minValue = typeof maxValue === \"bigint\" && signed ? -maxValue - 1n : 0;\n if (maxValue && value > maxValue || value < minValue) {\n const suffix = typeof value_ === \"bigint\" ? \"n\" : \"\";\n throw new IntegerOutOfRangeError({\n max: maxValue ? `${maxValue}${suffix}` : void 0,\n min: `${minValue}${suffix}`,\n signed,\n size: size6,\n value: `${value_}${suffix}`\n });\n }\n const hex = `0x${(signed && value < 0 ? (1n << BigInt(size6 * 8)) + BigInt(value) : value).toString(16)}`;\n if (size6)\n return pad(hex, { size: size6 });\n return hex;\n }\n function stringToHex(value_, opts = {}) {\n const value = encoder2.encode(value_);\n return bytesToHex(value, opts);\n }\n var hexes, encoder2;\n var init_toHex = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toHex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encoding();\n init_pad();\n init_fromHex();\n hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i3) => i3.toString(16).padStart(2, \"0\"));\n encoder2 = /* @__PURE__ */ new TextEncoder();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toBytes.js\n function toBytes(value, opts = {}) {\n if (typeof value === \"number\" || typeof value === \"bigint\")\n return numberToBytes(value, opts);\n if (typeof value === \"boolean\")\n return boolToBytes(value, opts);\n if (isHex(value))\n return hexToBytes(value, opts);\n return stringToBytes(value, opts);\n }\n function boolToBytes(value, opts = {}) {\n const bytes = new Uint8Array(1);\n bytes[0] = Number(value);\n if (typeof opts.size === \"number\") {\n assertSize(bytes, { size: opts.size });\n return pad(bytes, { size: opts.size });\n }\n return bytes;\n }\n function charCodeToBase16(char) {\n if (char >= charCodeMap.zero && char <= charCodeMap.nine)\n return char - charCodeMap.zero;\n if (char >= charCodeMap.A && char <= charCodeMap.F)\n return char - (charCodeMap.A - 10);\n if (char >= charCodeMap.a && char <= charCodeMap.f)\n return char - (charCodeMap.a - 10);\n return void 0;\n }\n function hexToBytes(hex_, opts = {}) {\n let hex = hex_;\n if (opts.size) {\n assertSize(hex, { size: opts.size });\n hex = pad(hex, { dir: \"right\", size: opts.size });\n }\n let hexString = hex.slice(2);\n if (hexString.length % 2)\n hexString = `0${hexString}`;\n const length = hexString.length / 2;\n const bytes = new Uint8Array(length);\n for (let index2 = 0, j2 = 0; index2 < length; index2++) {\n const nibbleLeft = charCodeToBase16(hexString.charCodeAt(j2++));\n const nibbleRight = charCodeToBase16(hexString.charCodeAt(j2++));\n if (nibbleLeft === void 0 || nibbleRight === void 0) {\n throw new BaseError2(`Invalid byte sequence (\"${hexString[j2 - 2]}${hexString[j2 - 1]}\" in \"${hexString}\").`);\n }\n bytes[index2] = nibbleLeft * 16 + nibbleRight;\n }\n return bytes;\n }\n function numberToBytes(value, opts) {\n const hex = numberToHex(value, opts);\n return hexToBytes(hex);\n }\n function stringToBytes(value, opts = {}) {\n const bytes = encoder3.encode(value);\n if (typeof opts.size === \"number\") {\n assertSize(bytes, { size: opts.size });\n return pad(bytes, { dir: \"right\", size: opts.size });\n }\n return bytes;\n }\n var encoder3, charCodeMap;\n var init_toBytes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toBytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_isHex();\n init_pad();\n init_fromHex();\n init_toHex();\n encoder3 = /* @__PURE__ */ new TextEncoder();\n charCodeMap = {\n zero: 48,\n nine: 57,\n A: 65,\n F: 70,\n a: 97,\n f: 102\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js\n function fromBig(n2, le = false) {\n if (le)\n return { h: Number(n2 & U32_MASK64), l: Number(n2 >> _32n & U32_MASK64) };\n return { h: Number(n2 >> _32n & U32_MASK64) | 0, l: Number(n2 & U32_MASK64) | 0 };\n }\n function split(lst, le = false) {\n const len = lst.length;\n let Ah = new Uint32Array(len);\n let Al = new Uint32Array(len);\n for (let i3 = 0; i3 < len; i3++) {\n const { h: h4, l: l6 } = fromBig(lst[i3], le);\n [Ah[i3], Al[i3]] = [h4, l6];\n }\n return [Ah, Al];\n }\n function add(Ah, Al, Bh, Bl) {\n const l6 = (Al >>> 0) + (Bl >>> 0);\n return { h: Ah + Bh + (l6 / 2 ** 32 | 0) | 0, l: l6 | 0 };\n }\n var U32_MASK64, _32n, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotlSH, rotlSL, rotlBH, rotlBL, add3L, add3H, add4L, add4H, add5L, add5H;\n var init_u64 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\n _32n = /* @__PURE__ */ BigInt(32);\n shrSH = (h4, _l, s4) => h4 >>> s4;\n shrSL = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n rotrSH = (h4, l6, s4) => h4 >>> s4 | l6 << 32 - s4;\n rotrSL = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n rotrBH = (h4, l6, s4) => h4 << 64 - s4 | l6 >>> s4 - 32;\n rotrBL = (h4, l6, s4) => h4 >>> s4 - 32 | l6 << 64 - s4;\n rotlSH = (h4, l6, s4) => h4 << s4 | l6 >>> 32 - s4;\n rotlSL = (h4, l6, s4) => l6 << s4 | h4 >>> 32 - s4;\n rotlBH = (h4, l6, s4) => l6 << s4 - 32 | h4 >>> 64 - s4;\n rotlBL = (h4, l6, s4) => h4 << s4 - 32 | l6 >>> 64 - s4;\n add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\n add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;\n add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\n add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;\n add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\n add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/crypto.js\n var crypto2;\n var init_crypto = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/crypto.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n crypto2 = typeof globalThis === \"object\" && \"crypto\" in globalThis ? globalThis.crypto : void 0;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js\n function isBytes(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function anumber(n2) {\n if (!Number.isSafeInteger(n2) || n2 < 0)\n throw new Error(\"positive integer expected, got \" + n2);\n }\n function abytes(b4, ...lengths) {\n if (!isBytes(b4))\n throw new Error(\"Uint8Array expected\");\n if (lengths.length > 0 && !lengths.includes(b4.length))\n throw new Error(\"Uint8Array expected of length \" + lengths + \", got length=\" + b4.length);\n }\n function ahash(h4) {\n if (typeof h4 !== \"function\" || typeof h4.create !== \"function\")\n throw new Error(\"Hash should be wrapped by utils.createHasher\");\n anumber(h4.outputLen);\n anumber(h4.blockLen);\n }\n function aexists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error(\"Hash instance has been destroyed\");\n if (checkFinished && instance.finished)\n throw new Error(\"Hash#digest() has already been called\");\n }\n function aoutput(out, instance) {\n abytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(\"digestInto() expects output buffer of length at least \" + min);\n }\n }\n function u32(arr) {\n return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n }\n function clean(...arrays) {\n for (let i3 = 0; i3 < arrays.length; i3++) {\n arrays[i3].fill(0);\n }\n }\n function createView(arr) {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n }\n function rotr(word, shift) {\n return word << 32 - shift | word >>> shift;\n }\n function rotl(word, shift) {\n return word << shift | word >>> 32 - shift >>> 0;\n }\n function byteSwap(word) {\n return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;\n }\n function byteSwap32(arr) {\n for (let i3 = 0; i3 < arr.length; i3++) {\n arr[i3] = byteSwap(arr[i3]);\n }\n return arr;\n }\n function bytesToHex2(bytes) {\n abytes(bytes);\n if (hasHexBuiltin)\n return bytes.toHex();\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes2[bytes[i3]];\n }\n return hex;\n }\n function asciiToBase16(ch) {\n if (ch >= asciis._0 && ch <= asciis._9)\n return ch - asciis._0;\n if (ch >= asciis.A && ch <= asciis.F)\n return ch - (asciis.A - 10);\n if (ch >= asciis.a && ch <= asciis.f)\n return ch - (asciis.a - 10);\n return;\n }\n function hexToBytes2(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n if (hasHexBuiltin)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error(\"hex string expected, got unpadded hex of length \" + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === void 0 || n2 === void 0) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n }\n function utf8ToBytes(str) {\n if (typeof str !== \"string\")\n throw new Error(\"string expected\");\n return new Uint8Array(new TextEncoder().encode(str));\n }\n function toBytes2(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes(data);\n abytes(data);\n return data;\n }\n function kdfInputToBytes(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes(data);\n abytes(data);\n return data;\n }\n function concatBytes(...arrays) {\n let sum = 0;\n for (let i3 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n abytes(a3);\n sum += a3.length;\n }\n const res = new Uint8Array(sum);\n for (let i3 = 0, pad6 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n res.set(a3, pad6);\n pad6 += a3.length;\n }\n return res;\n }\n function checkOpts(defaults, opts) {\n if (opts !== void 0 && {}.toString.call(opts) !== \"[object Object]\")\n throw new Error(\"options should be object or undefined\");\n const merged = Object.assign(defaults, opts);\n return merged;\n }\n function createHasher(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes2(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n }\n function randomBytes(bytesLength = 32) {\n if (crypto2 && typeof crypto2.getRandomValues === \"function\") {\n return crypto2.getRandomValues(new Uint8Array(bytesLength));\n }\n if (crypto2 && typeof crypto2.randomBytes === \"function\") {\n return Uint8Array.from(crypto2.randomBytes(bytesLength));\n }\n throw new Error(\"crypto.getRandomValues must be defined\");\n }\n var isLE, swap32IfBE, hasHexBuiltin, hexes2, asciis, Hash;\n var init_utils3 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_crypto();\n isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();\n swap32IfBE = isLE ? (u2) => u2 : byteSwap32;\n hasHexBuiltin = /* @__PURE__ */ (() => (\n // @ts-ignore\n typeof Uint8Array.from([]).toHex === \"function\" && typeof Uint8Array.fromHex === \"function\"\n ))();\n hexes2 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\n Hash = class {\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha3.js\n function keccakP(s4, rounds = 24) {\n const B2 = new Uint32Array(5 * 2);\n for (let round = 24 - rounds; round < 24; round++) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[x4] ^ s4[x4 + 10] ^ s4[x4 + 20] ^ s4[x4 + 30] ^ s4[x4 + 40];\n for (let x4 = 0; x4 < 10; x4 += 2) {\n const idx1 = (x4 + 8) % 10;\n const idx0 = (x4 + 2) % 10;\n const B0 = B2[idx0];\n const B1 = B2[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B2[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B2[idx1 + 1];\n for (let y6 = 0; y6 < 50; y6 += 10) {\n s4[x4 + y6] ^= Th;\n s4[x4 + y6 + 1] ^= Tl;\n }\n }\n let curH = s4[2];\n let curL = s4[3];\n for (let t3 = 0; t3 < 24; t3++) {\n const shift = SHA3_ROTL[t3];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t3];\n curH = s4[PI];\n curL = s4[PI + 1];\n s4[PI] = Th;\n s4[PI + 1] = Tl;\n }\n for (let y6 = 0; y6 < 50; y6 += 10) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[y6 + x4];\n for (let x4 = 0; x4 < 10; x4++)\n s4[y6 + x4] ^= ~B2[(x4 + 2) % 10] & B2[(x4 + 4) % 10];\n }\n s4[0] ^= SHA3_IOTA_H[round];\n s4[1] ^= SHA3_IOTA_L[round];\n }\n clean(B2);\n }\n var _0n, _1n, _2n, _7n, _256n, _0x71n, SHA3_PI, SHA3_ROTL, _SHA3_IOTA, IOTAS, SHA3_IOTA_H, SHA3_IOTA_L, rotlH, rotlL, Keccak, gen, keccak_256;\n var init_sha3 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha3.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_u64();\n init_utils3();\n _0n = BigInt(0);\n _1n = BigInt(1);\n _2n = BigInt(2);\n _7n = BigInt(7);\n _256n = BigInt(256);\n _0x71n = BigInt(113);\n SHA3_PI = [];\n SHA3_ROTL = [];\n _SHA3_IOTA = [];\n for (let round = 0, R3 = _1n, x4 = 1, y6 = 0; round < 24; round++) {\n [x4, y6] = [y6, (2 * x4 + 3 * y6) % 5];\n SHA3_PI.push(2 * (5 * y6 + x4));\n SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);\n let t3 = _0n;\n for (let j2 = 0; j2 < 7; j2++) {\n R3 = (R3 << _1n ^ (R3 >> _7n) * _0x71n) % _256n;\n if (R3 & _2n)\n t3 ^= _1n << (_1n << /* @__PURE__ */ BigInt(j2)) - _1n;\n }\n _SHA3_IOTA.push(t3);\n }\n IOTAS = split(_SHA3_IOTA, true);\n SHA3_IOTA_H = IOTAS[0];\n SHA3_IOTA_L = IOTAS[1];\n rotlH = (h4, l6, s4) => s4 > 32 ? rotlBH(h4, l6, s4) : rotlSH(h4, l6, s4);\n rotlL = (h4, l6, s4) => s4 > 32 ? rotlBL(h4, l6, s4) : rotlSL(h4, l6, s4);\n Keccak = class _Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n this.enableXOF = false;\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n anumber(outputLen);\n if (!(0 < blockLen && blockLen < 200))\n throw new Error(\"only keccak-f1600 function is supported\");\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n clone() {\n return this._cloneInto();\n }\n keccak() {\n swap32IfBE(this.state32);\n keccakP(this.state32, this.rounds);\n swap32IfBE(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n aexists(this);\n data = toBytes2(data);\n abytes(data);\n const { blockLen, state } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i3 = 0; i3 < take; i3++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n state[pos] ^= suffix;\n if ((suffix & 128) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 128;\n this.keccak();\n }\n writeInto(out) {\n aexists(this, false);\n abytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len; ) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n if (!this.enableXOF)\n throw new Error(\"XOF is not possible for this instance\");\n return this.writeInto(out);\n }\n xof(bytes) {\n anumber(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n aoutput(out, this);\n if (this.finished)\n throw new Error(\"digest() was already called\");\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n clean(this.state);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n };\n gen = (suffix, blockLen, outputLen) => createHasher(() => new Keccak(blockLen, suffix, outputLen));\n keccak_256 = /* @__PURE__ */ (() => gen(1, 136, 256 / 8))();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/keccak256.js\n function keccak256(value, to_) {\n const to = to_ || \"hex\";\n const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);\n if (to === \"bytes\")\n return bytes;\n return toHex(bytes);\n }\n var init_keccak256 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/keccak256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha3();\n init_isHex();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/hashSignature.js\n function hashSignature(sig) {\n return hash(sig);\n }\n var hash;\n var init_hashSignature = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/hashSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_keccak256();\n hash = (value) => keccak256(toBytes(value));\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/normalizeSignature.js\n function normalizeSignature(signature) {\n let active = true;\n let current = \"\";\n let level = 0;\n let result = \"\";\n let valid = false;\n for (let i3 = 0; i3 < signature.length; i3++) {\n const char = signature[i3];\n if ([\"(\", \")\", \",\"].includes(char))\n active = true;\n if (char === \"(\")\n level++;\n if (char === \")\")\n level--;\n if (!active)\n continue;\n if (level === 0) {\n if (char === \" \" && [\"event\", \"function\", \"\"].includes(result))\n result = \"\";\n else {\n result += char;\n if (char === \")\") {\n valid = true;\n break;\n }\n }\n continue;\n }\n if (char === \" \") {\n if (signature[i3 - 1] !== \",\" && current !== \",\" && current !== \",(\") {\n current = \"\";\n active = false;\n }\n continue;\n }\n result += char;\n current += char;\n }\n if (!valid)\n throw new BaseError2(\"Unable to normalize signature.\");\n return result;\n }\n var init_normalizeSignature = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/normalizeSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toSignature.js\n var toSignature;\n var init_toSignature = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_normalizeSignature();\n toSignature = (def) => {\n const def_ = (() => {\n if (typeof def === \"string\")\n return def;\n return formatAbiItem(def);\n })();\n return normalizeSignature(def_);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toSignatureHash.js\n function toSignatureHash(fn) {\n return hashSignature(toSignature(fn));\n }\n var init_toSignatureHash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toSignatureHash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashSignature();\n init_toSignature();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toEventSelector.js\n var toEventSelector;\n var init_toEventSelector = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toEventSelector.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toSignatureHash();\n toEventSelector = toSignatureHash;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/address.js\n var InvalidAddressError;\n var init_address = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/address.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n InvalidAddressError = class extends BaseError2 {\n constructor({ address }) {\n super(`Address \"${address}\" is invalid.`, {\n metaMessages: [\n \"- Address must be a hex value of 20 bytes (40 hex characters).\",\n \"- Address must match its checksum counterpart.\"\n ],\n name: \"InvalidAddressError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/lru.js\n var LruMap;\n var init_lru = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/lru.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LruMap = class extends Map {\n constructor(size6) {\n super();\n Object.defineProperty(this, \"maxSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.maxSize = size6;\n }\n get(key) {\n const value = super.get(key);\n if (super.has(key) && value !== void 0) {\n this.delete(key);\n super.set(key, value);\n }\n return value;\n }\n set(key, value) {\n super.set(key, value);\n if (this.maxSize && this.size > this.maxSize) {\n const firstKey = this.keys().next().value;\n if (firstKey)\n this.delete(firstKey);\n }\n return this;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/getAddress.js\n function checksumAddress(address_, chainId) {\n if (checksumAddressCache.has(`${address_}.${chainId}`))\n return checksumAddressCache.get(`${address_}.${chainId}`);\n const hexAddress = chainId ? `${chainId}${address_.toLowerCase()}` : address_.substring(2).toLowerCase();\n const hash3 = keccak256(stringToBytes(hexAddress), \"bytes\");\n const address = (chainId ? hexAddress.substring(`${chainId}0x`.length) : hexAddress).split(\"\");\n for (let i3 = 0; i3 < 40; i3 += 2) {\n if (hash3[i3 >> 1] >> 4 >= 8 && address[i3]) {\n address[i3] = address[i3].toUpperCase();\n }\n if ((hash3[i3 >> 1] & 15) >= 8 && address[i3 + 1]) {\n address[i3 + 1] = address[i3 + 1].toUpperCase();\n }\n }\n const result = `0x${address.join(\"\")}`;\n checksumAddressCache.set(`${address_}.${chainId}`, result);\n return result;\n }\n function getAddress(address, chainId) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n return checksumAddress(address, chainId);\n }\n var checksumAddressCache;\n var init_getAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/getAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_toBytes();\n init_keccak256();\n init_lru();\n init_isAddress();\n checksumAddressCache = /* @__PURE__ */ new LruMap(8192);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/isAddress.js\n function isAddress(address, options) {\n const { strict = true } = options ?? {};\n const cacheKey2 = `${address}.${strict}`;\n if (isAddressCache.has(cacheKey2))\n return isAddressCache.get(cacheKey2);\n const result = (() => {\n if (!addressRegex.test(address))\n return false;\n if (address.toLowerCase() === address)\n return true;\n if (strict)\n return checksumAddress(address) === address;\n return true;\n })();\n isAddressCache.set(cacheKey2, result);\n return result;\n }\n var addressRegex, isAddressCache;\n var init_isAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/isAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_lru();\n init_getAddress();\n addressRegex = /^0x[a-fA-F0-9]{40}$/;\n isAddressCache = /* @__PURE__ */ new LruMap(8192);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/concat.js\n function concat2(values) {\n if (typeof values[0] === \"string\")\n return concatHex(values);\n return concatBytes2(values);\n }\n function concatBytes2(values) {\n let length = 0;\n for (const arr of values) {\n length += arr.length;\n }\n const result = new Uint8Array(length);\n let offset = 0;\n for (const arr of values) {\n result.set(arr, offset);\n offset += arr.length;\n }\n return result;\n }\n function concatHex(values) {\n return `0x${values.reduce((acc, x4) => acc + x4.replace(\"0x\", \"\"), \"\")}`;\n }\n var init_concat = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/concat.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/slice.js\n function slice(value, start, end, { strict } = {}) {\n if (isHex(value, { strict: false }))\n return sliceHex(value, start, end, {\n strict\n });\n return sliceBytes(value, start, end, {\n strict\n });\n }\n function assertStartOffset(value, start) {\n if (typeof start === \"number\" && start > 0 && start > size(value) - 1)\n throw new SliceOffsetOutOfBoundsError({\n offset: start,\n position: \"start\",\n size: size(value)\n });\n }\n function assertEndOffset(value, start, end) {\n if (typeof start === \"number\" && typeof end === \"number\" && size(value) !== end - start) {\n throw new SliceOffsetOutOfBoundsError({\n offset: end,\n position: \"end\",\n size: size(value)\n });\n }\n }\n function sliceBytes(value_, start, end, { strict } = {}) {\n assertStartOffset(value_, start);\n const value = value_.slice(start, end);\n if (strict)\n assertEndOffset(value, start, end);\n return value;\n }\n function sliceHex(value_, start, end, { strict } = {}) {\n assertStartOffset(value_, start);\n const value = `0x${value_.replace(\"0x\", \"\").slice((start ?? 0) * 2, (end ?? value_.length) * 2)}`;\n if (strict)\n assertEndOffset(value, start, end);\n return value;\n }\n var init_slice = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/slice.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_data();\n init_isHex();\n init_size();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/regex.js\n var arrayRegex, bytesRegex2, integerRegex2;\n var init_regex2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/regex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n arrayRegex = /^(.*)\\[([0-9]*)\\]$/;\n bytesRegex2 = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n integerRegex2 = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js\n function encodeAbiParameters(params, values) {\n if (params.length !== values.length)\n throw new AbiEncodingLengthMismatchError({\n expectedLength: params.length,\n givenLength: values.length\n });\n const preparedParams = prepareParams({\n params,\n values\n });\n const data = encodeParams(preparedParams);\n if (data.length === 0)\n return \"0x\";\n return data;\n }\n function prepareParams({ params, values }) {\n const preparedParams = [];\n for (let i3 = 0; i3 < params.length; i3++) {\n preparedParams.push(prepareParam({ param: params[i3], value: values[i3] }));\n }\n return preparedParams;\n }\n function prepareParam({ param, value }) {\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents) {\n const [length, type] = arrayComponents;\n return encodeArray(value, { length, param: { ...param, type } });\n }\n if (param.type === \"tuple\") {\n return encodeTuple(value, {\n param\n });\n }\n if (param.type === \"address\") {\n return encodeAddress(value);\n }\n if (param.type === \"bool\") {\n return encodeBool(value);\n }\n if (param.type.startsWith(\"uint\") || param.type.startsWith(\"int\")) {\n const signed = param.type.startsWith(\"int\");\n const [, , size6 = \"256\"] = integerRegex2.exec(param.type) ?? [];\n return encodeNumber(value, {\n signed,\n size: Number(size6)\n });\n }\n if (param.type.startsWith(\"bytes\")) {\n return encodeBytes(value, { param });\n }\n if (param.type === \"string\") {\n return encodeString(value);\n }\n throw new InvalidAbiEncodingTypeError(param.type, {\n docsPath: \"/docs/contract/encodeAbiParameters\"\n });\n }\n function encodeParams(preparedParams) {\n let staticSize = 0;\n for (let i3 = 0; i3 < preparedParams.length; i3++) {\n const { dynamic, encoded } = preparedParams[i3];\n if (dynamic)\n staticSize += 32;\n else\n staticSize += size(encoded);\n }\n const staticParams = [];\n const dynamicParams = [];\n let dynamicSize = 0;\n for (let i3 = 0; i3 < preparedParams.length; i3++) {\n const { dynamic, encoded } = preparedParams[i3];\n if (dynamic) {\n staticParams.push(numberToHex(staticSize + dynamicSize, { size: 32 }));\n dynamicParams.push(encoded);\n dynamicSize += size(encoded);\n } else {\n staticParams.push(encoded);\n }\n }\n return concat2([...staticParams, ...dynamicParams]);\n }\n function encodeAddress(value) {\n if (!isAddress(value))\n throw new InvalidAddressError({ address: value });\n return { dynamic: false, encoded: padHex(value.toLowerCase()) };\n }\n function encodeArray(value, { length, param }) {\n const dynamic = length === null;\n if (!Array.isArray(value))\n throw new InvalidArrayError(value);\n if (!dynamic && value.length !== length)\n throw new AbiEncodingArrayLengthMismatchError({\n expectedLength: length,\n givenLength: value.length,\n type: `${param.type}[${length}]`\n });\n let dynamicChild = false;\n const preparedParams = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n const preparedParam = prepareParam({ param, value: value[i3] });\n if (preparedParam.dynamic)\n dynamicChild = true;\n preparedParams.push(preparedParam);\n }\n if (dynamic || dynamicChild) {\n const data = encodeParams(preparedParams);\n if (dynamic) {\n const length2 = numberToHex(preparedParams.length, { size: 32 });\n return {\n dynamic: true,\n encoded: preparedParams.length > 0 ? concat2([length2, data]) : length2\n };\n }\n if (dynamicChild)\n return { dynamic: true, encoded: data };\n }\n return {\n dynamic: false,\n encoded: concat2(preparedParams.map(({ encoded }) => encoded))\n };\n }\n function encodeBytes(value, { param }) {\n const [, paramSize] = param.type.split(\"bytes\");\n const bytesSize = size(value);\n if (!paramSize) {\n let value_ = value;\n if (bytesSize % 32 !== 0)\n value_ = padHex(value_, {\n dir: \"right\",\n size: Math.ceil((value.length - 2) / 2 / 32) * 32\n });\n return {\n dynamic: true,\n encoded: concat2([padHex(numberToHex(bytesSize, { size: 32 })), value_])\n };\n }\n if (bytesSize !== Number.parseInt(paramSize, 10))\n throw new AbiEncodingBytesSizeMismatchError({\n expectedSize: Number.parseInt(paramSize, 10),\n value\n });\n return { dynamic: false, encoded: padHex(value, { dir: \"right\" }) };\n }\n function encodeBool(value) {\n if (typeof value !== \"boolean\")\n throw new BaseError2(`Invalid boolean value: \"${value}\" (type: ${typeof value}). Expected: \\`true\\` or \\`false\\`.`);\n return { dynamic: false, encoded: padHex(boolToHex(value)) };\n }\n function encodeNumber(value, { signed, size: size6 = 256 }) {\n if (typeof size6 === \"number\") {\n const max = 2n ** (BigInt(size6) - (signed ? 1n : 0n)) - 1n;\n const min = signed ? -max - 1n : 0n;\n if (value > max || value < min)\n throw new IntegerOutOfRangeError({\n max: max.toString(),\n min: min.toString(),\n signed,\n size: size6 / 8,\n value: value.toString()\n });\n }\n return {\n dynamic: false,\n encoded: numberToHex(value, {\n size: 32,\n signed\n })\n };\n }\n function encodeString(value) {\n const hexValue = stringToHex(value);\n const partsLength = Math.ceil(size(hexValue) / 32);\n const parts = [];\n for (let i3 = 0; i3 < partsLength; i3++) {\n parts.push(padHex(slice(hexValue, i3 * 32, (i3 + 1) * 32), {\n dir: \"right\"\n }));\n }\n return {\n dynamic: true,\n encoded: concat2([\n padHex(numberToHex(size(hexValue), { size: 32 })),\n ...parts\n ])\n };\n }\n function encodeTuple(value, { param }) {\n let dynamic = false;\n const preparedParams = [];\n for (let i3 = 0; i3 < param.components.length; i3++) {\n const param_ = param.components[i3];\n const index2 = Array.isArray(value) ? i3 : param_.name;\n const preparedParam = prepareParam({\n param: param_,\n value: value[index2]\n });\n preparedParams.push(preparedParam);\n if (preparedParam.dynamic)\n dynamic = true;\n }\n return {\n dynamic,\n encoded: dynamic ? encodeParams(preparedParams) : concat2(preparedParams.map(({ encoded }) => encoded))\n };\n }\n function getArrayComponents(type) {\n const matches = type.match(/^(.*)\\[(\\d+)?\\]$/);\n return matches ? (\n // Return `null` if the array is dynamic.\n [matches[2] ? Number(matches[2]) : null, matches[1]]\n ) : void 0;\n }\n var init_encodeAbiParameters = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_address();\n init_base();\n init_encoding();\n init_isAddress();\n init_concat();\n init_pad();\n init_size();\n init_slice();\n init_toHex();\n init_regex2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toFunctionSelector.js\n var toFunctionSelector;\n var init_toFunctionSelector = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/toFunctionSelector.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_slice();\n init_toSignatureHash();\n toFunctionSelector = (fn) => slice(toSignatureHash(fn), 0, 4);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/getAbiItem.js\n function getAbiItem(parameters) {\n const { abi: abi2, args = [], name } = parameters;\n const isSelector = isHex(name, { strict: false });\n const abiItems = abi2.filter((abiItem) => {\n if (isSelector) {\n if (abiItem.type === \"function\")\n return toFunctionSelector(abiItem) === name;\n if (abiItem.type === \"event\")\n return toEventSelector(abiItem) === name;\n return false;\n }\n return \"name\" in abiItem && abiItem.name === name;\n });\n if (abiItems.length === 0)\n return void 0;\n if (abiItems.length === 1)\n return abiItems[0];\n let matchedAbiItem;\n for (const abiItem of abiItems) {\n if (!(\"inputs\" in abiItem))\n continue;\n if (!args || args.length === 0) {\n if (!abiItem.inputs || abiItem.inputs.length === 0)\n return abiItem;\n continue;\n }\n if (!abiItem.inputs)\n continue;\n if (abiItem.inputs.length === 0)\n continue;\n if (abiItem.inputs.length !== args.length)\n continue;\n const matched = args.every((arg, index2) => {\n const abiParameter = \"inputs\" in abiItem && abiItem.inputs[index2];\n if (!abiParameter)\n return false;\n return isArgOfType(arg, abiParameter);\n });\n if (matched) {\n if (matchedAbiItem && \"inputs\" in matchedAbiItem && matchedAbiItem.inputs) {\n const ambiguousTypes = getAmbiguousTypes(abiItem.inputs, matchedAbiItem.inputs, args);\n if (ambiguousTypes)\n throw new AbiItemAmbiguityError({\n abiItem,\n type: ambiguousTypes[0]\n }, {\n abiItem: matchedAbiItem,\n type: ambiguousTypes[1]\n });\n }\n matchedAbiItem = abiItem;\n }\n }\n if (matchedAbiItem)\n return matchedAbiItem;\n return abiItems[0];\n }\n function isArgOfType(arg, abiParameter) {\n const argType = typeof arg;\n const abiParameterType = abiParameter.type;\n switch (abiParameterType) {\n case \"address\":\n return isAddress(arg, { strict: false });\n case \"bool\":\n return argType === \"boolean\";\n case \"function\":\n return argType === \"string\";\n case \"string\":\n return argType === \"string\";\n default: {\n if (abiParameterType === \"tuple\" && \"components\" in abiParameter)\n return Object.values(abiParameter.components).every((component, index2) => {\n return isArgOfType(Object.values(arg)[index2], component);\n });\n if (/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(abiParameterType))\n return argType === \"number\" || argType === \"bigint\";\n if (/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(abiParameterType))\n return argType === \"string\" || arg instanceof Uint8Array;\n if (/[a-z]+[1-9]{0,3}(\\[[0-9]{0,}\\])+$/.test(abiParameterType)) {\n return Array.isArray(arg) && arg.every((x4) => isArgOfType(x4, {\n ...abiParameter,\n // Pop off `[]` or `[M]` from end of type\n type: abiParameterType.replace(/(\\[[0-9]{0,}\\])$/, \"\")\n }));\n }\n return false;\n }\n }\n }\n function getAmbiguousTypes(sourceParameters, targetParameters, args) {\n for (const parameterIndex in sourceParameters) {\n const sourceParameter = sourceParameters[parameterIndex];\n const targetParameter = targetParameters[parameterIndex];\n if (sourceParameter.type === \"tuple\" && targetParameter.type === \"tuple\" && \"components\" in sourceParameter && \"components\" in targetParameter)\n return getAmbiguousTypes(sourceParameter.components, targetParameter.components, args[parameterIndex]);\n const types2 = [sourceParameter.type, targetParameter.type];\n const ambiguous = (() => {\n if (types2.includes(\"address\") && types2.includes(\"bytes20\"))\n return true;\n if (types2.includes(\"address\") && types2.includes(\"string\"))\n return isAddress(args[parameterIndex], { strict: false });\n if (types2.includes(\"address\") && types2.includes(\"bytes\"))\n return isAddress(args[parameterIndex], { strict: false });\n return false;\n })();\n if (ambiguous)\n return types2;\n }\n return;\n }\n var init_getAbiItem = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/getAbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_isHex();\n init_isAddress();\n init_toEventSelector();\n init_toFunctionSelector();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeEventTopics.js\n function encodeEventTopics(parameters) {\n const { abi: abi2, eventName, args } = parameters;\n let abiItem = abi2[0];\n if (eventName) {\n const item = getAbiItem({ abi: abi2, name: eventName });\n if (!item)\n throw new AbiEventNotFoundError(eventName, { docsPath });\n abiItem = item;\n }\n if (abiItem.type !== \"event\")\n throw new AbiEventNotFoundError(void 0, { docsPath });\n const definition = formatAbiItem2(abiItem);\n const signature = toEventSelector(definition);\n let topics = [];\n if (args && \"inputs\" in abiItem) {\n const indexedInputs = abiItem.inputs?.filter((param) => \"indexed\" in param && param.indexed);\n const args_ = Array.isArray(args) ? args : Object.values(args).length > 0 ? indexedInputs?.map((x4) => args[x4.name]) ?? [] : [];\n if (args_.length > 0) {\n topics = indexedInputs?.map((param, i3) => {\n if (Array.isArray(args_[i3]))\n return args_[i3].map((_2, j2) => encodeArg({ param, value: args_[i3][j2] }));\n return typeof args_[i3] !== \"undefined\" && args_[i3] !== null ? encodeArg({ param, value: args_[i3] }) : null;\n }) ?? [];\n }\n }\n return [signature, ...topics];\n }\n function encodeArg({ param, value }) {\n if (param.type === \"string\" || param.type === \"bytes\")\n return keccak256(toBytes(value));\n if (param.type === \"tuple\" || param.type.match(/^(.*)\\[(\\d+)?\\]$/))\n throw new FilterTypeNotSupportedError(param.type);\n return encodeAbiParameters([param], [value]);\n }\n var docsPath;\n var init_encodeEventTopics = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeEventTopics.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_log();\n init_toBytes();\n init_keccak256();\n init_toEventSelector();\n init_encodeAbiParameters();\n init_formatAbiItem2();\n init_getAbiItem();\n docsPath = \"/docs/contract/encodeEventTopics\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/filters/createFilterRequestScope.js\n function createFilterRequestScope(client, { method }) {\n const requestMap = {};\n if (client.transport.type === \"fallback\")\n client.transport.onResponse?.(({ method: method_, response: id, status, transport }) => {\n if (status === \"success\" && method === method_)\n requestMap[id] = transport.request;\n });\n return (id) => requestMap[id] || client.request;\n }\n var init_createFilterRequestScope = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/filters/createFilterRequestScope.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createContractEventFilter.js\n async function createContractEventFilter(client, parameters) {\n const { address, abi: abi2, args, eventName, fromBlock, strict, toBlock } = parameters;\n const getRequest = createFilterRequestScope(client, {\n method: \"eth_newFilter\"\n });\n const topics = eventName ? encodeEventTopics({\n abi: abi2,\n args,\n eventName\n }) : void 0;\n const id = await client.request({\n method: \"eth_newFilter\",\n params: [\n {\n address,\n fromBlock: typeof fromBlock === \"bigint\" ? numberToHex(fromBlock) : fromBlock,\n toBlock: typeof toBlock === \"bigint\" ? numberToHex(toBlock) : toBlock,\n topics\n }\n ]\n });\n return {\n abi: abi2,\n args,\n eventName,\n id,\n request: getRequest(id),\n strict: Boolean(strict),\n type: \"event\"\n };\n }\n var init_createContractEventFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createContractEventFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encodeEventTopics();\n init_toHex();\n init_createFilterRequestScope();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/parseAccount.js\n function parseAccount(account) {\n if (typeof account === \"string\")\n return { address: account, type: \"json-rpc\" };\n return account;\n }\n var init_parseAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/parseAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js\n function prepareEncodeFunctionData(parameters) {\n const { abi: abi2, args, functionName } = parameters;\n let abiItem = abi2[0];\n if (functionName) {\n const item = getAbiItem({\n abi: abi2,\n args,\n name: functionName\n });\n if (!item)\n throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath2 });\n abiItem = item;\n }\n if (abiItem.type !== \"function\")\n throw new AbiFunctionNotFoundError(void 0, { docsPath: docsPath2 });\n return {\n abi: [abiItem],\n functionName: toFunctionSelector(formatAbiItem2(abiItem))\n };\n }\n var docsPath2;\n var init_prepareEncodeFunctionData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_toFunctionSelector();\n init_formatAbiItem2();\n init_getAbiItem();\n docsPath2 = \"/docs/contract/encodeFunctionData\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeFunctionData.js\n function encodeFunctionData(parameters) {\n const { args } = parameters;\n const { abi: abi2, functionName } = (() => {\n if (parameters.abi.length === 1 && parameters.functionName?.startsWith(\"0x\"))\n return parameters;\n return prepareEncodeFunctionData(parameters);\n })();\n const abiItem = abi2[0];\n const signature = functionName;\n const data = \"inputs\" in abiItem && abiItem.inputs ? encodeAbiParameters(abiItem.inputs, args ?? []) : void 0;\n return concatHex([signature, data ?? \"0x\"]);\n }\n var init_encodeFunctionData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeFunctionData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_concat();\n init_encodeAbiParameters();\n init_prepareEncodeFunctionData();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/solidity.js\n var panicReasons, solidityError, solidityPanic;\n var init_solidity = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/solidity.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n panicReasons = {\n 1: \"An `assert` condition failed.\",\n 17: \"Arithmetic operation resulted in underflow or overflow.\",\n 18: \"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).\",\n 33: \"Attempted to convert to an invalid type.\",\n 34: \"Attempted to access a storage byte array that is incorrectly encoded.\",\n 49: \"Performed `.pop()` on an empty array\",\n 50: \"Array index is out of bounds.\",\n 65: \"Allocated too much memory or created an array which is too large.\",\n 81: \"Attempted to call a zero-initialized variable of internal function type.\"\n };\n solidityError = {\n inputs: [\n {\n name: \"message\",\n type: \"string\"\n }\n ],\n name: \"Error\",\n type: \"error\"\n };\n solidityPanic = {\n inputs: [\n {\n name: \"reason\",\n type: \"uint256\"\n }\n ],\n name: \"Panic\",\n type: \"error\"\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/cursor.js\n var NegativeOffsetError, PositionOutOfBoundsError, RecursiveReadLimitExceededError;\n var init_cursor = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/cursor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n NegativeOffsetError = class extends BaseError2 {\n constructor({ offset }) {\n super(`Offset \\`${offset}\\` cannot be negative.`, {\n name: \"NegativeOffsetError\"\n });\n }\n };\n PositionOutOfBoundsError = class extends BaseError2 {\n constructor({ length, position }) {\n super(`Position \\`${position}\\` is out of bounds (\\`0 < position < ${length}\\`).`, { name: \"PositionOutOfBoundsError\" });\n }\n };\n RecursiveReadLimitExceededError = class extends BaseError2 {\n constructor({ count, limit }) {\n super(`Recursive read limit of \\`${limit}\\` exceeded (recursive read count: \\`${count}\\`).`, { name: \"RecursiveReadLimitExceededError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/cursor.js\n function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {\n const cursor = Object.create(staticCursor);\n cursor.bytes = bytes;\n cursor.dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n cursor.positionReadCount = /* @__PURE__ */ new Map();\n cursor.recursiveReadLimit = recursiveReadLimit;\n return cursor;\n }\n var staticCursor;\n var init_cursor2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/cursor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_cursor();\n staticCursor = {\n bytes: new Uint8Array(),\n dataView: new DataView(new ArrayBuffer(0)),\n position: 0,\n positionReadCount: /* @__PURE__ */ new Map(),\n recursiveReadCount: 0,\n recursiveReadLimit: Number.POSITIVE_INFINITY,\n assertReadLimit() {\n if (this.recursiveReadCount >= this.recursiveReadLimit)\n throw new RecursiveReadLimitExceededError({\n count: this.recursiveReadCount + 1,\n limit: this.recursiveReadLimit\n });\n },\n assertPosition(position) {\n if (position < 0 || position > this.bytes.length - 1)\n throw new PositionOutOfBoundsError({\n length: this.bytes.length,\n position\n });\n },\n decrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError({ offset });\n const position = this.position - offset;\n this.assertPosition(position);\n this.position = position;\n },\n getReadCount(position) {\n return this.positionReadCount.get(position || this.position) || 0;\n },\n incrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError({ offset });\n const position = this.position + offset;\n this.assertPosition(position);\n this.position = position;\n },\n inspectByte(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectBytes(length, position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + length - 1);\n return this.bytes.subarray(position, position + length);\n },\n inspectUint8(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectUint16(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 1);\n return this.dataView.getUint16(position);\n },\n inspectUint24(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 2);\n return (this.dataView.getUint16(position) << 8) + this.dataView.getUint8(position + 2);\n },\n inspectUint32(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 3);\n return this.dataView.getUint32(position);\n },\n pushByte(byte) {\n this.assertPosition(this.position);\n this.bytes[this.position] = byte;\n this.position++;\n },\n pushBytes(bytes) {\n this.assertPosition(this.position + bytes.length - 1);\n this.bytes.set(bytes, this.position);\n this.position += bytes.length;\n },\n pushUint8(value) {\n this.assertPosition(this.position);\n this.bytes[this.position] = value;\n this.position++;\n },\n pushUint16(value) {\n this.assertPosition(this.position + 1);\n this.dataView.setUint16(this.position, value);\n this.position += 2;\n },\n pushUint24(value) {\n this.assertPosition(this.position + 2);\n this.dataView.setUint16(this.position, value >> 8);\n this.dataView.setUint8(this.position + 2, value & ~4294967040);\n this.position += 3;\n },\n pushUint32(value) {\n this.assertPosition(this.position + 3);\n this.dataView.setUint32(this.position, value);\n this.position += 4;\n },\n readByte() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectByte();\n this.position++;\n return value;\n },\n readBytes(length, size6) {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectBytes(length);\n this.position += size6 ?? length;\n return value;\n },\n readUint8() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint8();\n this.position += 1;\n return value;\n },\n readUint16() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint16();\n this.position += 2;\n return value;\n },\n readUint24() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint24();\n this.position += 3;\n return value;\n },\n readUint32() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint32();\n this.position += 4;\n return value;\n },\n get remaining() {\n return this.bytes.length - this.position;\n },\n setPosition(position) {\n const oldPosition = this.position;\n this.assertPosition(position);\n this.position = position;\n return () => this.position = oldPosition;\n },\n _touch() {\n if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)\n return;\n const count = this.getReadCount();\n this.positionReadCount.set(this.position, count + 1);\n if (count > 0)\n this.recursiveReadCount++;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/fromBytes.js\n function bytesToBigInt(bytes, opts = {}) {\n if (typeof opts.size !== \"undefined\")\n assertSize(bytes, { size: opts.size });\n const hex = bytesToHex(bytes, opts);\n return hexToBigInt(hex, opts);\n }\n function bytesToBool(bytes_, opts = {}) {\n let bytes = bytes_;\n if (typeof opts.size !== \"undefined\") {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes);\n }\n if (bytes.length > 1 || bytes[0] > 1)\n throw new InvalidBytesBooleanError(bytes);\n return Boolean(bytes[0]);\n }\n function bytesToNumber(bytes, opts = {}) {\n if (typeof opts.size !== \"undefined\")\n assertSize(bytes, { size: opts.size });\n const hex = bytesToHex(bytes, opts);\n return hexToNumber(hex, opts);\n }\n function bytesToString(bytes_, opts = {}) {\n let bytes = bytes_;\n if (typeof opts.size !== \"undefined\") {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes, { dir: \"right\" });\n }\n return new TextDecoder().decode(bytes);\n }\n var init_fromBytes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/fromBytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encoding();\n init_trim();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js\n function decodeAbiParameters(params, data) {\n const bytes = typeof data === \"string\" ? hexToBytes(data) : data;\n const cursor = createCursor(bytes);\n if (size(bytes) === 0 && params.length > 0)\n throw new AbiDecodingZeroDataError();\n if (size(data) && size(data) < 32)\n throw new AbiDecodingDataSizeTooSmallError({\n data: typeof data === \"string\" ? data : bytesToHex(data),\n params,\n size: size(data)\n });\n let consumed = 0;\n const values = [];\n for (let i3 = 0; i3 < params.length; ++i3) {\n const param = params[i3];\n cursor.setPosition(consumed);\n const [data2, consumed_] = decodeParameter(cursor, param, {\n staticPosition: 0\n });\n consumed += consumed_;\n values.push(data2);\n }\n return values;\n }\n function decodeParameter(cursor, param, { staticPosition }) {\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents) {\n const [length, type] = arrayComponents;\n return decodeArray(cursor, { ...param, type }, { length, staticPosition });\n }\n if (param.type === \"tuple\")\n return decodeTuple(cursor, param, { staticPosition });\n if (param.type === \"address\")\n return decodeAddress(cursor);\n if (param.type === \"bool\")\n return decodeBool(cursor);\n if (param.type.startsWith(\"bytes\"))\n return decodeBytes(cursor, param, { staticPosition });\n if (param.type.startsWith(\"uint\") || param.type.startsWith(\"int\"))\n return decodeNumber(cursor, param);\n if (param.type === \"string\")\n return decodeString(cursor, { staticPosition });\n throw new InvalidAbiDecodingTypeError(param.type, {\n docsPath: \"/docs/contract/decodeAbiParameters\"\n });\n }\n function decodeAddress(cursor) {\n const value = cursor.readBytes(32);\n return [checksumAddress(bytesToHex(sliceBytes(value, -20))), 32];\n }\n function decodeArray(cursor, param, { length, staticPosition }) {\n if (!length) {\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n const start = staticPosition + offset;\n const startOfData = start + sizeOfLength;\n cursor.setPosition(start);\n const length2 = bytesToNumber(cursor.readBytes(sizeOfLength));\n const dynamicChild = hasDynamicChild(param);\n let consumed2 = 0;\n const value2 = [];\n for (let i3 = 0; i3 < length2; ++i3) {\n cursor.setPosition(startOfData + (dynamicChild ? i3 * 32 : consumed2));\n const [data, consumed_] = decodeParameter(cursor, param, {\n staticPosition: startOfData\n });\n consumed2 += consumed_;\n value2.push(data);\n }\n cursor.setPosition(staticPosition + 32);\n return [value2, 32];\n }\n if (hasDynamicChild(param)) {\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n const start = staticPosition + offset;\n const value2 = [];\n for (let i3 = 0; i3 < length; ++i3) {\n cursor.setPosition(start + i3 * 32);\n const [data] = decodeParameter(cursor, param, {\n staticPosition: start\n });\n value2.push(data);\n }\n cursor.setPosition(staticPosition + 32);\n return [value2, 32];\n }\n let consumed = 0;\n const value = [];\n for (let i3 = 0; i3 < length; ++i3) {\n const [data, consumed_] = decodeParameter(cursor, param, {\n staticPosition: staticPosition + consumed\n });\n consumed += consumed_;\n value.push(data);\n }\n return [value, consumed];\n }\n function decodeBool(cursor) {\n return [bytesToBool(cursor.readBytes(32), { size: 32 }), 32];\n }\n function decodeBytes(cursor, param, { staticPosition }) {\n const [_2, size6] = param.type.split(\"bytes\");\n if (!size6) {\n const offset = bytesToNumber(cursor.readBytes(32));\n cursor.setPosition(staticPosition + offset);\n const length = bytesToNumber(cursor.readBytes(32));\n if (length === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"0x\", 32];\n }\n const data = cursor.readBytes(length);\n cursor.setPosition(staticPosition + 32);\n return [bytesToHex(data), 32];\n }\n const value = bytesToHex(cursor.readBytes(Number.parseInt(size6, 10), 32));\n return [value, 32];\n }\n function decodeNumber(cursor, param) {\n const signed = param.type.startsWith(\"int\");\n const size6 = Number.parseInt(param.type.split(\"int\")[1] || \"256\", 10);\n const value = cursor.readBytes(32);\n return [\n size6 > 48 ? bytesToBigInt(value, { signed }) : bytesToNumber(value, { signed }),\n 32\n ];\n }\n function decodeTuple(cursor, param, { staticPosition }) {\n const hasUnnamedChild = param.components.length === 0 || param.components.some(({ name }) => !name);\n const value = hasUnnamedChild ? [] : {};\n let consumed = 0;\n if (hasDynamicChild(param)) {\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n const start = staticPosition + offset;\n for (let i3 = 0; i3 < param.components.length; ++i3) {\n const component = param.components[i3];\n cursor.setPosition(start + consumed);\n const [data, consumed_] = decodeParameter(cursor, component, {\n staticPosition: start\n });\n consumed += consumed_;\n value[hasUnnamedChild ? i3 : component?.name] = data;\n }\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n for (let i3 = 0; i3 < param.components.length; ++i3) {\n const component = param.components[i3];\n const [data, consumed_] = decodeParameter(cursor, component, {\n staticPosition\n });\n value[hasUnnamedChild ? i3 : component?.name] = data;\n consumed += consumed_;\n }\n return [value, consumed];\n }\n function decodeString(cursor, { staticPosition }) {\n const offset = bytesToNumber(cursor.readBytes(32));\n const start = staticPosition + offset;\n cursor.setPosition(start);\n const length = bytesToNumber(cursor.readBytes(32));\n if (length === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"\", 32];\n }\n const data = cursor.readBytes(length, 32);\n const value = bytesToString(trim(data));\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n function hasDynamicChild(param) {\n const { type } = param;\n if (type === \"string\")\n return true;\n if (type === \"bytes\")\n return true;\n if (type.endsWith(\"[]\"))\n return true;\n if (type === \"tuple\")\n return param.components?.some(hasDynamicChild);\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents && hasDynamicChild({ ...param, type: arrayComponents[1] }))\n return true;\n return false;\n }\n var sizeOfLength, sizeOfOffset;\n var init_decodeAbiParameters = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeAbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_getAddress();\n init_cursor2();\n init_size();\n init_slice();\n init_trim();\n init_fromBytes();\n init_toBytes();\n init_toHex();\n init_encodeAbiParameters();\n sizeOfLength = 32;\n sizeOfOffset = 32;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeErrorResult.js\n function decodeErrorResult(parameters) {\n const { abi: abi2, data } = parameters;\n const signature = slice(data, 0, 4);\n if (signature === \"0x\")\n throw new AbiDecodingZeroDataError();\n const abi_ = [...abi2 || [], solidityError, solidityPanic];\n const abiItem = abi_.find((x4) => x4.type === \"error\" && signature === toFunctionSelector(formatAbiItem2(x4)));\n if (!abiItem)\n throw new AbiErrorSignatureNotFoundError(signature, {\n docsPath: \"/docs/contract/decodeErrorResult\"\n });\n return {\n abiItem,\n args: \"inputs\" in abiItem && abiItem.inputs && abiItem.inputs.length > 0 ? decodeAbiParameters(abiItem.inputs, slice(data, 4)) : void 0,\n errorName: abiItem.name\n };\n }\n var init_decodeErrorResult = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeErrorResult.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_solidity();\n init_abi();\n init_slice();\n init_toFunctionSelector();\n init_decodeAbiParameters();\n init_formatAbiItem2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/stringify.js\n var stringify;\n var init_stringify = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/stringify.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n stringify = (value, replacer, space) => JSON.stringify(value, (key, value_) => {\n const value2 = typeof value_ === \"bigint\" ? value_.toString() : value_;\n return typeof replacer === \"function\" ? replacer(key, value2) : value2;\n }, space);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js\n function formatAbiItemWithArgs({ abiItem, args, includeFunctionName = true, includeName = false }) {\n if (!(\"name\" in abiItem))\n return;\n if (!(\"inputs\" in abiItem))\n return;\n if (!abiItem.inputs)\n return;\n return `${includeFunctionName ? abiItem.name : \"\"}(${abiItem.inputs.map((input, i3) => `${includeName && input.name ? `${input.name}: ` : \"\"}${typeof args[i3] === \"object\" ? stringify(args[i3]) : args[i3]}`).join(\", \")})`;\n }\n var init_formatAbiItemWithArgs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/unit.js\n var etherUnits, gweiUnits;\n var init_unit = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/unit.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n etherUnits = {\n gwei: 9,\n wei: 18\n };\n gweiUnits = {\n ether: -9,\n wei: 9\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatUnits.js\n function formatUnits(value, decimals) {\n let display = value.toString();\n const negative = display.startsWith(\"-\");\n if (negative)\n display = display.slice(1);\n display = display.padStart(decimals, \"0\");\n let [integer, fraction] = [\n display.slice(0, display.length - decimals),\n display.slice(display.length - decimals)\n ];\n fraction = fraction.replace(/(0+)$/, \"\");\n return `${negative ? \"-\" : \"\"}${integer || \"0\"}${fraction ? `.${fraction}` : \"\"}`;\n }\n var init_formatUnits = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatUnits.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatEther.js\n function formatEther(wei, unit = \"wei\") {\n return formatUnits(wei, etherUnits[unit]);\n }\n var init_formatEther = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatEther.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_unit();\n init_formatUnits();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatGwei.js\n function formatGwei(wei, unit = \"wei\") {\n return formatUnits(wei, gweiUnits[unit]);\n }\n var init_formatGwei = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/unit/formatGwei.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_unit();\n init_formatUnits();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/stateOverride.js\n function prettyStateMapping(stateMapping) {\n return stateMapping.reduce((pretty, { slot, value }) => {\n return `${pretty} ${slot}: ${value}\n`;\n }, \"\");\n }\n function prettyStateOverride(stateOverride) {\n return stateOverride.reduce((pretty, { address, ...state }) => {\n let val = `${pretty} ${address}:\n`;\n if (state.nonce)\n val += ` nonce: ${state.nonce}\n`;\n if (state.balance)\n val += ` balance: ${state.balance}\n`;\n if (state.code)\n val += ` code: ${state.code}\n`;\n if (state.state) {\n val += \" state:\\n\";\n val += prettyStateMapping(state.state);\n }\n if (state.stateDiff) {\n val += \" stateDiff:\\n\";\n val += prettyStateMapping(state.stateDiff);\n }\n return val;\n }, \" State Override:\\n\").slice(0, -1);\n }\n var AccountStateConflictError, StateAssignmentConflictError;\n var init_stateOverride = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/stateOverride.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n AccountStateConflictError = class extends BaseError2 {\n constructor({ address }) {\n super(`State for account \"${address}\" is set multiple times.`, {\n name: \"AccountStateConflictError\"\n });\n }\n };\n StateAssignmentConflictError = class extends BaseError2 {\n constructor() {\n super(\"state and stateDiff are set on the same account.\", {\n name: \"StateAssignmentConflictError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/transaction.js\n function prettyPrint(args) {\n const entries = Object.entries(args).map(([key, value]) => {\n if (value === void 0 || value === false)\n return null;\n return [key, value];\n }).filter(Boolean);\n const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0);\n return entries.map(([key, value]) => ` ${`${key}:`.padEnd(maxLength + 1)} ${value}`).join(\"\\n\");\n }\n var FeeConflictError, InvalidLegacyVError, InvalidSerializableTransactionError, InvalidStorageKeySizeError, TransactionExecutionError, TransactionNotFoundError, TransactionReceiptNotFoundError, TransactionReceiptRevertedError, WaitForTransactionReceiptTimeoutError;\n var init_transaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/transaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatEther();\n init_formatGwei();\n init_base();\n FeeConflictError = class extends BaseError2 {\n constructor() {\n super([\n \"Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.\",\n \"Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.\"\n ].join(\"\\n\"), { name: \"FeeConflictError\" });\n }\n };\n InvalidLegacyVError = class extends BaseError2 {\n constructor({ v: v2 }) {\n super(`Invalid \\`v\\` value \"${v2}\". Expected 27 or 28.`, {\n name: \"InvalidLegacyVError\"\n });\n }\n };\n InvalidSerializableTransactionError = class extends BaseError2 {\n constructor({ transaction }) {\n super(\"Cannot infer a transaction type from provided transaction.\", {\n metaMessages: [\n \"Provided Transaction:\",\n \"{\",\n prettyPrint(transaction),\n \"}\",\n \"\",\n \"To infer the type, either provide:\",\n \"- a `type` to the Transaction, or\",\n \"- an EIP-1559 Transaction with `maxFeePerGas`, or\",\n \"- an EIP-2930 Transaction with `gasPrice` & `accessList`, or\",\n \"- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or\",\n \"- an EIP-7702 Transaction with `authorizationList`, or\",\n \"- a Legacy Transaction with `gasPrice`\"\n ],\n name: \"InvalidSerializableTransactionError\"\n });\n }\n };\n InvalidStorageKeySizeError = class extends BaseError2 {\n constructor({ storageKey }) {\n super(`Size for storage key \"${storageKey}\" is invalid. Expected 32 bytes. Got ${Math.floor((storageKey.length - 2) / 2)} bytes.`, { name: \"InvalidStorageKeySizeError\" });\n }\n };\n TransactionExecutionError = class extends BaseError2 {\n constructor(cause, { account, docsPath: docsPath8, chain: chain2, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value }) {\n const prettyArgs = prettyPrint({\n chain: chain2 && `${chain2?.name} (id: ${chain2?.id})`,\n from: account?.address,\n to,\n value: typeof value !== \"undefined\" && `${formatEther(value)} ${chain2?.nativeCurrency?.symbol || \"ETH\"}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== \"undefined\" && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== \"undefined\" && `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== \"undefined\" && `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce\n });\n super(cause.shortMessage, {\n cause,\n docsPath: docsPath8,\n metaMessages: [\n ...cause.metaMessages ? [...cause.metaMessages, \" \"] : [],\n \"Request Arguments:\",\n prettyArgs\n ].filter(Boolean),\n name: \"TransactionExecutionError\"\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n };\n TransactionNotFoundError = class extends BaseError2 {\n constructor({ blockHash, blockNumber, blockTag, hash: hash3, index: index2 }) {\n let identifier = \"Transaction\";\n if (blockTag && index2 !== void 0)\n identifier = `Transaction at block time \"${blockTag}\" at index \"${index2}\"`;\n if (blockHash && index2 !== void 0)\n identifier = `Transaction at block hash \"${blockHash}\" at index \"${index2}\"`;\n if (blockNumber && index2 !== void 0)\n identifier = `Transaction at block number \"${blockNumber}\" at index \"${index2}\"`;\n if (hash3)\n identifier = `Transaction with hash \"${hash3}\"`;\n super(`${identifier} could not be found.`, {\n name: \"TransactionNotFoundError\"\n });\n }\n };\n TransactionReceiptNotFoundError = class extends BaseError2 {\n constructor({ hash: hash3 }) {\n super(`Transaction receipt with hash \"${hash3}\" could not be found. The Transaction may not be processed on a block yet.`, {\n name: \"TransactionReceiptNotFoundError\"\n });\n }\n };\n TransactionReceiptRevertedError = class extends BaseError2 {\n constructor({ receipt }) {\n super(`Transaction with hash \"${receipt.transactionHash}\" reverted.`, {\n metaMessages: [\n 'The receipt marked the transaction as \"reverted\". This could mean that the function on the contract you are trying to call threw an error.',\n \" \",\n \"You can attempt to extract the revert reason by:\",\n \"- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract\",\n \"- using the `call` Action with raw `data`\"\n ],\n name: \"TransactionReceiptRevertedError\"\n });\n Object.defineProperty(this, \"receipt\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.receipt = receipt;\n }\n };\n WaitForTransactionReceiptTimeoutError = class extends BaseError2 {\n constructor({ hash: hash3 }) {\n super(`Timed out while waiting for transaction with hash \"${hash3}\" to be confirmed.`, { name: \"WaitForTransactionReceiptTimeoutError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/utils.js\n var getContractAddress, getUrl;\n var init_utils4 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n getContractAddress = (address) => address;\n getUrl = (url) => url;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/contract.js\n var CallExecutionError, ContractFunctionExecutionError, ContractFunctionRevertedError, ContractFunctionZeroDataError, CounterfactualDeploymentFailedError, RawContractError;\n var init_contract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/contract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_solidity();\n init_decodeErrorResult();\n init_formatAbiItem2();\n init_formatAbiItemWithArgs();\n init_getAbiItem();\n init_formatEther();\n init_formatGwei();\n init_abi();\n init_base();\n init_stateOverride();\n init_transaction();\n init_utils4();\n CallExecutionError = class extends BaseError2 {\n constructor(cause, { account: account_, docsPath: docsPath8, chain: chain2, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride }) {\n const account = account_ ? parseAccount(account_) : void 0;\n let prettyArgs = prettyPrint({\n from: account?.address,\n to,\n value: typeof value !== \"undefined\" && `${formatEther(value)} ${chain2?.nativeCurrency?.symbol || \"ETH\"}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== \"undefined\" && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== \"undefined\" && `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== \"undefined\" && `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce\n });\n if (stateOverride) {\n prettyArgs += `\n${prettyStateOverride(stateOverride)}`;\n }\n super(cause.shortMessage, {\n cause,\n docsPath: docsPath8,\n metaMessages: [\n ...cause.metaMessages ? [...cause.metaMessages, \" \"] : [],\n \"Raw Call Arguments:\",\n prettyArgs\n ].filter(Boolean),\n name: \"CallExecutionError\"\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n };\n ContractFunctionExecutionError = class extends BaseError2 {\n constructor(cause, { abi: abi2, args, contractAddress, docsPath: docsPath8, functionName, sender }) {\n const abiItem = getAbiItem({ abi: abi2, args, name: functionName });\n const formattedArgs = abiItem ? formatAbiItemWithArgs({\n abiItem,\n args,\n includeFunctionName: false,\n includeName: false\n }) : void 0;\n const functionWithParams = abiItem ? formatAbiItem2(abiItem, { includeName: true }) : void 0;\n const prettyArgs = prettyPrint({\n address: contractAddress && getContractAddress(contractAddress),\n function: functionWithParams,\n args: formattedArgs && formattedArgs !== \"()\" && `${[...Array(functionName?.length ?? 0).keys()].map(() => \" \").join(\"\")}${formattedArgs}`,\n sender\n });\n super(cause.shortMessage || `An unknown error occurred while executing the contract function \"${functionName}\".`, {\n cause,\n docsPath: docsPath8,\n metaMessages: [\n ...cause.metaMessages ? [...cause.metaMessages, \" \"] : [],\n prettyArgs && \"Contract Call:\",\n prettyArgs\n ].filter(Boolean),\n name: \"ContractFunctionExecutionError\"\n });\n Object.defineProperty(this, \"abi\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"args\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"contractAddress\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"formattedArgs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"functionName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"sender\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abi = abi2;\n this.args = args;\n this.cause = cause;\n this.contractAddress = contractAddress;\n this.functionName = functionName;\n this.sender = sender;\n }\n };\n ContractFunctionRevertedError = class extends BaseError2 {\n constructor({ abi: abi2, data, functionName, message: message2 }) {\n let cause;\n let decodedData;\n let metaMessages;\n let reason;\n if (data && data !== \"0x\") {\n try {\n decodedData = decodeErrorResult({ abi: abi2, data });\n const { abiItem, errorName, args: errorArgs } = decodedData;\n if (errorName === \"Error\") {\n reason = errorArgs[0];\n } else if (errorName === \"Panic\") {\n const [firstArg] = errorArgs;\n reason = panicReasons[firstArg];\n } else {\n const errorWithParams = abiItem ? formatAbiItem2(abiItem, { includeName: true }) : void 0;\n const formattedArgs = abiItem && errorArgs ? formatAbiItemWithArgs({\n abiItem,\n args: errorArgs,\n includeFunctionName: false,\n includeName: false\n }) : void 0;\n metaMessages = [\n errorWithParams ? `Error: ${errorWithParams}` : \"\",\n formattedArgs && formattedArgs !== \"()\" ? ` ${[...Array(errorName?.length ?? 0).keys()].map(() => \" \").join(\"\")}${formattedArgs}` : \"\"\n ];\n }\n } catch (err) {\n cause = err;\n }\n } else if (message2)\n reason = message2;\n let signature;\n if (cause instanceof AbiErrorSignatureNotFoundError) {\n signature = cause.signature;\n metaMessages = [\n `Unable to decode signature \"${signature}\" as it was not found on the provided ABI.`,\n \"Make sure you are using the correct ABI and that the error exists on it.\",\n `You can look up the decoded signature here: https://openchain.xyz/signatures?query=${signature}.`\n ];\n }\n super(reason && reason !== \"execution reverted\" || signature ? [\n `The contract function \"${functionName}\" reverted with the following ${signature ? \"signature\" : \"reason\"}:`,\n reason || signature\n ].join(\"\\n\") : `The contract function \"${functionName}\" reverted.`, {\n cause,\n metaMessages,\n name: \"ContractFunctionRevertedError\"\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"raw\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"reason\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"signature\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = decodedData;\n this.raw = data;\n this.reason = reason;\n this.signature = signature;\n }\n };\n ContractFunctionZeroDataError = class extends BaseError2 {\n constructor({ functionName }) {\n super(`The contract function \"${functionName}\" returned no data (\"0x\").`, {\n metaMessages: [\n \"This could be due to any of the following:\",\n ` - The contract does not have the function \"${functionName}\",`,\n \" - The parameters passed to the contract function may be invalid, or\",\n \" - The address is not a contract.\"\n ],\n name: \"ContractFunctionZeroDataError\"\n });\n }\n };\n CounterfactualDeploymentFailedError = class extends BaseError2 {\n constructor({ factory }) {\n super(`Deployment for counterfactual contract call failed${factory ? ` for factory \"${factory}\".` : \"\"}`, {\n metaMessages: [\n \"Please ensure:\",\n \"- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).\",\n \"- The `factoryData` is a valid encoded function call for contract deployment function on the factory.\"\n ],\n name: \"CounterfactualDeploymentFailedError\"\n });\n }\n };\n RawContractError = class extends BaseError2 {\n constructor({ data, message: message2 }) {\n super(message2 || \"\", { name: \"RawContractError\" });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 3\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = data;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/request.js\n var HttpRequestError, RpcRequestError, TimeoutError;\n var init_request = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/request.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n init_base();\n init_utils4();\n HttpRequestError = class extends BaseError2 {\n constructor({ body, cause, details, headers, status, url }) {\n super(\"HTTP request failed.\", {\n cause,\n details,\n metaMessages: [\n status && `Status: ${status}`,\n `URL: ${getUrl(url)}`,\n body && `Request body: ${stringify(body)}`\n ].filter(Boolean),\n name: \"HttpRequestError\"\n });\n Object.defineProperty(this, \"body\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"headers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"status\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"url\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.body = body;\n this.headers = headers;\n this.status = status;\n this.url = url;\n }\n };\n RpcRequestError = class extends BaseError2 {\n constructor({ body, error, url }) {\n super(\"RPC Request failed.\", {\n cause: error,\n details: error.message,\n metaMessages: [`URL: ${getUrl(url)}`, `Request body: ${stringify(body)}`],\n name: \"RpcRequestError\"\n });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.code = error.code;\n this.data = error.data;\n }\n };\n TimeoutError = class extends BaseError2 {\n constructor({ body, url }) {\n super(\"The request took too long to respond.\", {\n details: \"The request timed out.\",\n metaMessages: [`URL: ${getUrl(url)}`, `Request body: ${stringify(body)}`],\n name: \"TimeoutError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/rpc.js\n var unknownErrorCode, RpcError, ProviderRpcError, ParseRpcError, InvalidRequestRpcError, MethodNotFoundRpcError, InvalidParamsRpcError, InternalRpcError, InvalidInputRpcError, ResourceNotFoundRpcError, ResourceUnavailableRpcError, TransactionRejectedRpcError, MethodNotSupportedRpcError, LimitExceededRpcError, JsonRpcVersionUnsupportedError, UserRejectedRequestError, UnauthorizedProviderError, UnsupportedProviderMethodError, ProviderDisconnectedError, ChainDisconnectedError, SwitchChainError, UnsupportedNonOptionalCapabilityError, UnsupportedChainIdError, DuplicateIdError, UnknownBundleIdError, BundleTooLargeError, AtomicReadyWalletRejectedUpgradeError, AtomicityNotSupportedError, UnknownRpcError;\n var init_rpc = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/rpc.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_request();\n unknownErrorCode = -1;\n RpcError = class extends BaseError2 {\n constructor(cause, { code, docsPath: docsPath8, metaMessages, name, shortMessage }) {\n super(shortMessage, {\n cause,\n docsPath: docsPath8,\n metaMessages: metaMessages || cause?.metaMessages,\n name: name || \"RpcError\"\n });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.name = name || cause.name;\n this.code = cause instanceof RpcRequestError ? cause.code : code ?? unknownErrorCode;\n }\n };\n ProviderRpcError = class extends RpcError {\n constructor(cause, options) {\n super(cause, options);\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = options.data;\n }\n };\n ParseRpcError = class _ParseRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _ParseRpcError.code,\n name: \"ParseRpcError\",\n shortMessage: \"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.\"\n });\n }\n };\n Object.defineProperty(ParseRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32700\n });\n InvalidRequestRpcError = class _InvalidRequestRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _InvalidRequestRpcError.code,\n name: \"InvalidRequestRpcError\",\n shortMessage: \"JSON is not a valid request object.\"\n });\n }\n };\n Object.defineProperty(InvalidRequestRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32600\n });\n MethodNotFoundRpcError = class _MethodNotFoundRpcError extends RpcError {\n constructor(cause, { method } = {}) {\n super(cause, {\n code: _MethodNotFoundRpcError.code,\n name: \"MethodNotFoundRpcError\",\n shortMessage: `The method${method ? ` \"${method}\"` : \"\"} does not exist / is not available.`\n });\n }\n };\n Object.defineProperty(MethodNotFoundRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32601\n });\n InvalidParamsRpcError = class _InvalidParamsRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _InvalidParamsRpcError.code,\n name: \"InvalidParamsRpcError\",\n shortMessage: [\n \"Invalid parameters were provided to the RPC method.\",\n \"Double check you have provided the correct parameters.\"\n ].join(\"\\n\")\n });\n }\n };\n Object.defineProperty(InvalidParamsRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32602\n });\n InternalRpcError = class _InternalRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _InternalRpcError.code,\n name: \"InternalRpcError\",\n shortMessage: \"An internal error was received.\"\n });\n }\n };\n Object.defineProperty(InternalRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32603\n });\n InvalidInputRpcError = class _InvalidInputRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _InvalidInputRpcError.code,\n name: \"InvalidInputRpcError\",\n shortMessage: [\n \"Missing or invalid parameters.\",\n \"Double check you have provided the correct parameters.\"\n ].join(\"\\n\")\n });\n }\n };\n Object.defineProperty(InvalidInputRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32e3\n });\n ResourceNotFoundRpcError = class _ResourceNotFoundRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _ResourceNotFoundRpcError.code,\n name: \"ResourceNotFoundRpcError\",\n shortMessage: \"Requested resource not found.\"\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"ResourceNotFoundRpcError\"\n });\n }\n };\n Object.defineProperty(ResourceNotFoundRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32001\n });\n ResourceUnavailableRpcError = class _ResourceUnavailableRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _ResourceUnavailableRpcError.code,\n name: \"ResourceUnavailableRpcError\",\n shortMessage: \"Requested resource not available.\"\n });\n }\n };\n Object.defineProperty(ResourceUnavailableRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32002\n });\n TransactionRejectedRpcError = class _TransactionRejectedRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _TransactionRejectedRpcError.code,\n name: \"TransactionRejectedRpcError\",\n shortMessage: \"Transaction creation failed.\"\n });\n }\n };\n Object.defineProperty(TransactionRejectedRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32003\n });\n MethodNotSupportedRpcError = class _MethodNotSupportedRpcError extends RpcError {\n constructor(cause, { method } = {}) {\n super(cause, {\n code: _MethodNotSupportedRpcError.code,\n name: \"MethodNotSupportedRpcError\",\n shortMessage: `Method${method ? ` \"${method}\"` : \"\"} is not supported.`\n });\n }\n };\n Object.defineProperty(MethodNotSupportedRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32004\n });\n LimitExceededRpcError = class _LimitExceededRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _LimitExceededRpcError.code,\n name: \"LimitExceededRpcError\",\n shortMessage: \"Request exceeds defined limit.\"\n });\n }\n };\n Object.defineProperty(LimitExceededRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32005\n });\n JsonRpcVersionUnsupportedError = class _JsonRpcVersionUnsupportedError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: _JsonRpcVersionUnsupportedError.code,\n name: \"JsonRpcVersionUnsupportedError\",\n shortMessage: \"Version of JSON-RPC protocol is not supported.\"\n });\n }\n };\n Object.defineProperty(JsonRpcVersionUnsupportedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32006\n });\n UserRejectedRequestError = class _UserRejectedRequestError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UserRejectedRequestError.code,\n name: \"UserRejectedRequestError\",\n shortMessage: \"User rejected the request.\"\n });\n }\n };\n Object.defineProperty(UserRejectedRequestError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4001\n });\n UnauthorizedProviderError = class _UnauthorizedProviderError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UnauthorizedProviderError.code,\n name: \"UnauthorizedProviderError\",\n shortMessage: \"The requested method and/or account has not been authorized by the user.\"\n });\n }\n };\n Object.defineProperty(UnauthorizedProviderError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4100\n });\n UnsupportedProviderMethodError = class _UnsupportedProviderMethodError extends ProviderRpcError {\n constructor(cause, { method } = {}) {\n super(cause, {\n code: _UnsupportedProviderMethodError.code,\n name: \"UnsupportedProviderMethodError\",\n shortMessage: `The Provider does not support the requested method${method ? ` \" ${method}\"` : \"\"}.`\n });\n }\n };\n Object.defineProperty(UnsupportedProviderMethodError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4200\n });\n ProviderDisconnectedError = class _ProviderDisconnectedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _ProviderDisconnectedError.code,\n name: \"ProviderDisconnectedError\",\n shortMessage: \"The Provider is disconnected from all chains.\"\n });\n }\n };\n Object.defineProperty(ProviderDisconnectedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4900\n });\n ChainDisconnectedError = class _ChainDisconnectedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _ChainDisconnectedError.code,\n name: \"ChainDisconnectedError\",\n shortMessage: \"The Provider is not connected to the requested chain.\"\n });\n }\n };\n Object.defineProperty(ChainDisconnectedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4901\n });\n SwitchChainError = class _SwitchChainError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _SwitchChainError.code,\n name: \"SwitchChainError\",\n shortMessage: \"An error occurred when attempting to switch chain.\"\n });\n }\n };\n Object.defineProperty(SwitchChainError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4902\n });\n UnsupportedNonOptionalCapabilityError = class _UnsupportedNonOptionalCapabilityError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UnsupportedNonOptionalCapabilityError.code,\n name: \"UnsupportedNonOptionalCapabilityError\",\n shortMessage: \"This Wallet does not support a capability that was not marked as optional.\"\n });\n }\n };\n Object.defineProperty(UnsupportedNonOptionalCapabilityError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5700\n });\n UnsupportedChainIdError = class _UnsupportedChainIdError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UnsupportedChainIdError.code,\n name: \"UnsupportedChainIdError\",\n shortMessage: \"This Wallet does not support the requested chain ID.\"\n });\n }\n };\n Object.defineProperty(UnsupportedChainIdError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5710\n });\n DuplicateIdError = class _DuplicateIdError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _DuplicateIdError.code,\n name: \"DuplicateIdError\",\n shortMessage: \"There is already a bundle submitted with this ID.\"\n });\n }\n };\n Object.defineProperty(DuplicateIdError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5720\n });\n UnknownBundleIdError = class _UnknownBundleIdError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _UnknownBundleIdError.code,\n name: \"UnknownBundleIdError\",\n shortMessage: \"This bundle id is unknown / has not been submitted\"\n });\n }\n };\n Object.defineProperty(UnknownBundleIdError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5730\n });\n BundleTooLargeError = class _BundleTooLargeError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _BundleTooLargeError.code,\n name: \"BundleTooLargeError\",\n shortMessage: \"The call bundle is too large for the Wallet to process.\"\n });\n }\n };\n Object.defineProperty(BundleTooLargeError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5740\n });\n AtomicReadyWalletRejectedUpgradeError = class _AtomicReadyWalletRejectedUpgradeError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _AtomicReadyWalletRejectedUpgradeError.code,\n name: \"AtomicReadyWalletRejectedUpgradeError\",\n shortMessage: \"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade.\"\n });\n }\n };\n Object.defineProperty(AtomicReadyWalletRejectedUpgradeError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5750\n });\n AtomicityNotSupportedError = class _AtomicityNotSupportedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: _AtomicityNotSupportedError.code,\n name: \"AtomicityNotSupportedError\",\n shortMessage: \"The wallet does not support atomic execution but the request requires it.\"\n });\n }\n };\n Object.defineProperty(AtomicityNotSupportedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5760\n });\n UnknownRpcError = class extends RpcError {\n constructor(cause) {\n super(cause, {\n name: \"UnknownRpcError\",\n shortMessage: \"An unknown RPC error occurred.\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getContractError.js\n function getContractError(err, { abi: abi2, address, args, docsPath: docsPath8, functionName, sender }) {\n const error = err instanceof RawContractError ? err : err instanceof BaseError2 ? err.walk((err2) => \"data\" in err2) || err.walk() : {};\n const { code, data, details, message: message2, shortMessage } = error;\n const cause = (() => {\n if (err instanceof AbiDecodingZeroDataError)\n return new ContractFunctionZeroDataError({ functionName });\n if ([EXECUTION_REVERTED_ERROR_CODE, InternalRpcError.code].includes(code) && (data || details || message2 || shortMessage)) {\n return new ContractFunctionRevertedError({\n abi: abi2,\n data: typeof data === \"object\" ? data.data : data,\n functionName,\n message: error instanceof RpcRequestError ? details : shortMessage ?? message2\n });\n }\n return err;\n })();\n return new ContractFunctionExecutionError(cause, {\n abi: abi2,\n args,\n contractAddress: address,\n docsPath: docsPath8,\n functionName,\n sender\n });\n }\n var EXECUTION_REVERTED_ERROR_CODE;\n var init_getContractError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getContractError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_base();\n init_contract();\n init_request();\n init_rpc();\n EXECUTION_REVERTED_ERROR_CODE = 3;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js\n function publicKeyToAddress(publicKey) {\n const address = keccak256(`0x${publicKey.substring(4)}`).substring(26);\n return checksumAddress(`0x${address}`);\n }\n var init_publicKeyToAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAddress();\n init_keccak256();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js\n function setBigUint64(view, byteOffset, value, isLE2) {\n if (typeof view.setBigUint64 === \"function\")\n return view.setBigUint64(byteOffset, value, isLE2);\n const _32n2 = BigInt(32);\n const _u32_max = BigInt(4294967295);\n const wh = Number(value >> _32n2 & _u32_max);\n const wl = Number(value & _u32_max);\n const h4 = isLE2 ? 4 : 0;\n const l6 = isLE2 ? 0 : 4;\n view.setUint32(byteOffset + h4, wh, isLE2);\n view.setUint32(byteOffset + l6, wl, isLE2);\n }\n function Chi(a3, b4, c4) {\n return a3 & b4 ^ ~a3 & c4;\n }\n function Maj(a3, b4, c4) {\n return a3 & b4 ^ a3 & c4 ^ b4 & c4;\n }\n var HashMD, SHA256_IV, SHA384_IV, SHA512_IV;\n var init_md = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n HashMD = class extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE2) {\n super();\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE2;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n aexists(this);\n data = toBytes2(data);\n abytes(data);\n const { view, buffer: buffer2, blockLen } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer2.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n aexists(this);\n aoutput(out, this);\n this.finished = true;\n const { buffer: buffer2, view, blockLen, isLE: isLE2 } = this;\n let { pos } = this;\n buffer2[pos++] = 128;\n clean(this.buffer.subarray(pos));\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n for (let i3 = pos; i3 < blockLen; i3++)\n buffer2[i3] = 0;\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE2);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n if (len % 4)\n throw new Error(\"_sha2: outputLen should be aligned to 32bit\");\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error(\"_sha2: outputLen bigger than state\");\n for (let i3 = 0; i3 < outLen; i3++)\n oview.setUint32(4 * i3, state[i3], isLE2);\n }\n digest() {\n const { buffer: buffer2, outputLen } = this;\n this.digestInto(buffer2);\n const res = buffer2.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer: buffer2, length, finished, destroyed, pos } = this;\n to.destroyed = destroyed;\n to.finished = finished;\n to.length = length;\n to.pos = pos;\n if (length % blockLen)\n to.buffer.set(buffer2);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n };\n SHA256_IV = /* @__PURE__ */ Uint32Array.from([\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ]);\n SHA384_IV = /* @__PURE__ */ Uint32Array.from([\n 3418070365,\n 3238371032,\n 1654270250,\n 914150663,\n 2438529370,\n 812702999,\n 355462360,\n 4144912697,\n 1731405415,\n 4290775857,\n 2394180231,\n 1750603025,\n 3675008525,\n 1694076839,\n 1203062813,\n 3204075428\n ]);\n SHA512_IV = /* @__PURE__ */ Uint32Array.from([\n 1779033703,\n 4089235720,\n 3144134277,\n 2227873595,\n 1013904242,\n 4271175723,\n 2773480762,\n 1595750129,\n 1359893119,\n 2917565137,\n 2600822924,\n 725511199,\n 528734635,\n 4215389547,\n 1541459225,\n 327033209\n ]);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js\n var SHA256_K, SHA256_W, SHA256, K512, SHA512_Kh, SHA512_Kl, SHA512_W_H, SHA512_W_L, SHA512, SHA384, sha256, sha512, sha384;\n var init_sha2 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_md();\n init_u64();\n init_utils3();\n SHA256_K = /* @__PURE__ */ Uint32Array.from([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n SHA256_W = /* @__PURE__ */ new Uint32Array(64);\n SHA256 = class extends HashMD {\n constructor(outputLen = 32) {\n super(64, outputLen, 8, false);\n this.A = SHA256_IV[0] | 0;\n this.B = SHA256_IV[1] | 0;\n this.C = SHA256_IV[2] | 0;\n this.D = SHA256_IV[3] | 0;\n this.E = SHA256_IV[4] | 0;\n this.F = SHA256_IV[5] | 0;\n this.G = SHA256_IV[6] | 0;\n this.H = SHA256_IV[7] | 0;\n }\n get() {\n const { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n return [A4, B2, C, D2, E2, F2, G, H3];\n }\n // prettier-ignore\n set(A4, B2, C, D2, E2, F2, G, H3) {\n this.A = A4 | 0;\n this.B = B2 | 0;\n this.C = C | 0;\n this.D = D2 | 0;\n this.E = E2 | 0;\n this.F = F2 | 0;\n this.G = G | 0;\n this.H = H3 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n SHA256_W[i3] = view.getUint32(offset, false);\n for (let i3 = 16; i3 < 64; i3++) {\n const W15 = SHA256_W[i3 - 15];\n const W2 = SHA256_W[i3 - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ W15 >>> 3;\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ W2 >>> 10;\n SHA256_W[i3] = s1 + SHA256_W[i3 - 7] + s0 + SHA256_W[i3 - 16] | 0;\n }\n let { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n for (let i3 = 0; i3 < 64; i3++) {\n const sigma1 = rotr(E2, 6) ^ rotr(E2, 11) ^ rotr(E2, 25);\n const T1 = H3 + sigma1 + Chi(E2, F2, G) + SHA256_K[i3] + SHA256_W[i3] | 0;\n const sigma0 = rotr(A4, 2) ^ rotr(A4, 13) ^ rotr(A4, 22);\n const T22 = sigma0 + Maj(A4, B2, C) | 0;\n H3 = G;\n G = F2;\n F2 = E2;\n E2 = D2 + T1 | 0;\n D2 = C;\n C = B2;\n B2 = A4;\n A4 = T1 + T22 | 0;\n }\n A4 = A4 + this.A | 0;\n B2 = B2 + this.B | 0;\n C = C + this.C | 0;\n D2 = D2 + this.D | 0;\n E2 = E2 + this.E | 0;\n F2 = F2 + this.F | 0;\n G = G + this.G | 0;\n H3 = H3 + this.H | 0;\n this.set(A4, B2, C, D2, E2, F2, G, H3);\n }\n roundClean() {\n clean(SHA256_W);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n clean(this.buffer);\n }\n };\n K512 = /* @__PURE__ */ (() => split([\n \"0x428a2f98d728ae22\",\n \"0x7137449123ef65cd\",\n \"0xb5c0fbcfec4d3b2f\",\n \"0xe9b5dba58189dbbc\",\n \"0x3956c25bf348b538\",\n \"0x59f111f1b605d019\",\n \"0x923f82a4af194f9b\",\n \"0xab1c5ed5da6d8118\",\n \"0xd807aa98a3030242\",\n \"0x12835b0145706fbe\",\n \"0x243185be4ee4b28c\",\n \"0x550c7dc3d5ffb4e2\",\n \"0x72be5d74f27b896f\",\n \"0x80deb1fe3b1696b1\",\n \"0x9bdc06a725c71235\",\n \"0xc19bf174cf692694\",\n \"0xe49b69c19ef14ad2\",\n \"0xefbe4786384f25e3\",\n \"0x0fc19dc68b8cd5b5\",\n \"0x240ca1cc77ac9c65\",\n \"0x2de92c6f592b0275\",\n \"0x4a7484aa6ea6e483\",\n \"0x5cb0a9dcbd41fbd4\",\n \"0x76f988da831153b5\",\n \"0x983e5152ee66dfab\",\n \"0xa831c66d2db43210\",\n \"0xb00327c898fb213f\",\n \"0xbf597fc7beef0ee4\",\n \"0xc6e00bf33da88fc2\",\n \"0xd5a79147930aa725\",\n \"0x06ca6351e003826f\",\n \"0x142929670a0e6e70\",\n \"0x27b70a8546d22ffc\",\n \"0x2e1b21385c26c926\",\n \"0x4d2c6dfc5ac42aed\",\n \"0x53380d139d95b3df\",\n \"0x650a73548baf63de\",\n \"0x766a0abb3c77b2a8\",\n \"0x81c2c92e47edaee6\",\n \"0x92722c851482353b\",\n \"0xa2bfe8a14cf10364\",\n \"0xa81a664bbc423001\",\n \"0xc24b8b70d0f89791\",\n \"0xc76c51a30654be30\",\n \"0xd192e819d6ef5218\",\n \"0xd69906245565a910\",\n \"0xf40e35855771202a\",\n \"0x106aa07032bbd1b8\",\n \"0x19a4c116b8d2d0c8\",\n \"0x1e376c085141ab53\",\n \"0x2748774cdf8eeb99\",\n \"0x34b0bcb5e19b48a8\",\n \"0x391c0cb3c5c95a63\",\n \"0x4ed8aa4ae3418acb\",\n \"0x5b9cca4f7763e373\",\n \"0x682e6ff3d6b2b8a3\",\n \"0x748f82ee5defb2fc\",\n \"0x78a5636f43172f60\",\n \"0x84c87814a1f0ab72\",\n \"0x8cc702081a6439ec\",\n \"0x90befffa23631e28\",\n \"0xa4506cebde82bde9\",\n \"0xbef9a3f7b2c67915\",\n \"0xc67178f2e372532b\",\n \"0xca273eceea26619c\",\n \"0xd186b8c721c0c207\",\n \"0xeada7dd6cde0eb1e\",\n \"0xf57d4f7fee6ed178\",\n \"0x06f067aa72176fba\",\n \"0x0a637dc5a2c898a6\",\n \"0x113f9804bef90dae\",\n \"0x1b710b35131c471b\",\n \"0x28db77f523047d84\",\n \"0x32caab7b40c72493\",\n \"0x3c9ebe0a15c9bebc\",\n \"0x431d67c49c100d4c\",\n \"0x4cc5d4becb3e42b6\",\n \"0x597f299cfc657e2a\",\n \"0x5fcb6fab3ad6faec\",\n \"0x6c44198c4a475817\"\n ].map((n2) => BigInt(n2))))();\n SHA512_Kh = /* @__PURE__ */ (() => K512[0])();\n SHA512_Kl = /* @__PURE__ */ (() => K512[1])();\n SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);\n SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);\n SHA512 = class extends HashMD {\n constructor(outputLen = 64) {\n super(128, outputLen, 16, false);\n this.Ah = SHA512_IV[0] | 0;\n this.Al = SHA512_IV[1] | 0;\n this.Bh = SHA512_IV[2] | 0;\n this.Bl = SHA512_IV[3] | 0;\n this.Ch = SHA512_IV[4] | 0;\n this.Cl = SHA512_IV[5] | 0;\n this.Dh = SHA512_IV[6] | 0;\n this.Dl = SHA512_IV[7] | 0;\n this.Eh = SHA512_IV[8] | 0;\n this.El = SHA512_IV[9] | 0;\n this.Fh = SHA512_IV[10] | 0;\n this.Fl = SHA512_IV[11] | 0;\n this.Gh = SHA512_IV[12] | 0;\n this.Gl = SHA512_IV[13] | 0;\n this.Hh = SHA512_IV[14] | 0;\n this.Hl = SHA512_IV[15] | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4) {\n SHA512_W_H[i3] = view.getUint32(offset);\n SHA512_W_L[i3] = view.getUint32(offset += 4);\n }\n for (let i3 = 16; i3 < 80; i3++) {\n const W15h = SHA512_W_H[i3 - 15] | 0;\n const W15l = SHA512_W_L[i3 - 15] | 0;\n const s0h = rotrSH(W15h, W15l, 1) ^ rotrSH(W15h, W15l, 8) ^ shrSH(W15h, W15l, 7);\n const s0l = rotrSL(W15h, W15l, 1) ^ rotrSL(W15h, W15l, 8) ^ shrSL(W15h, W15l, 7);\n const W2h = SHA512_W_H[i3 - 2] | 0;\n const W2l = SHA512_W_L[i3 - 2] | 0;\n const s1h = rotrSH(W2h, W2l, 19) ^ rotrBH(W2h, W2l, 61) ^ shrSH(W2h, W2l, 6);\n const s1l = rotrSL(W2h, W2l, 19) ^ rotrBL(W2h, W2l, 61) ^ shrSL(W2h, W2l, 6);\n const SUMl = add4L(s0l, s1l, SHA512_W_L[i3 - 7], SHA512_W_L[i3 - 16]);\n const SUMh = add4H(SUMl, s0h, s1h, SHA512_W_H[i3 - 7], SHA512_W_H[i3 - 16]);\n SHA512_W_H[i3] = SUMh | 0;\n SHA512_W_L[i3] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n for (let i3 = 0; i3 < 80; i3++) {\n const sigma1h = rotrSH(Eh, El, 14) ^ rotrSH(Eh, El, 18) ^ rotrBH(Eh, El, 41);\n const sigma1l = rotrSL(Eh, El, 14) ^ rotrSL(Eh, El, 18) ^ rotrBL(Eh, El, 41);\n const CHIh = Eh & Fh ^ ~Eh & Gh;\n const CHIl = El & Fl ^ ~El & Gl;\n const T1ll = add5L(Hl, sigma1l, CHIl, SHA512_Kl[i3], SHA512_W_L[i3]);\n const T1h = add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i3], SHA512_W_H[i3]);\n const T1l = T1ll | 0;\n const sigma0h = rotrSH(Ah, Al, 28) ^ rotrBH(Ah, Al, 34) ^ rotrBH(Ah, Al, 39);\n const sigma0l = rotrSL(Ah, Al, 28) ^ rotrBL(Ah, Al, 34) ^ rotrBL(Ah, Al, 39);\n const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;\n const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = add3L(T1l, sigma0l, MAJl);\n Ah = add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n ({ h: Ah, l: Al } = add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n clean(SHA512_W_H, SHA512_W_L);\n }\n destroy() {\n clean(this.buffer);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n };\n SHA384 = class extends SHA512 {\n constructor() {\n super(48);\n this.Ah = SHA384_IV[0] | 0;\n this.Al = SHA384_IV[1] | 0;\n this.Bh = SHA384_IV[2] | 0;\n this.Bl = SHA384_IV[3] | 0;\n this.Ch = SHA384_IV[4] | 0;\n this.Cl = SHA384_IV[5] | 0;\n this.Dh = SHA384_IV[6] | 0;\n this.Dl = SHA384_IV[7] | 0;\n this.Eh = SHA384_IV[8] | 0;\n this.El = SHA384_IV[9] | 0;\n this.Fh = SHA384_IV[10] | 0;\n this.Fl = SHA384_IV[11] | 0;\n this.Gh = SHA384_IV[12] | 0;\n this.Gl = SHA384_IV[13] | 0;\n this.Hh = SHA384_IV[14] | 0;\n this.Hl = SHA384_IV[15] | 0;\n }\n };\n sha256 = /* @__PURE__ */ createHasher(() => new SHA256());\n sha512 = /* @__PURE__ */ createHasher(() => new SHA512());\n sha384 = /* @__PURE__ */ createHasher(() => new SHA384());\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js\n var HMAC, hmac;\n var init_hmac = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n HMAC = class extends Hash {\n constructor(hash3, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n ahash(hash3);\n const key = toBytes2(_key);\n this.iHash = hash3.create();\n if (typeof this.iHash.update !== \"function\")\n throw new Error(\"Expected instance of class which extends utils.Hash\");\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad6 = new Uint8Array(blockLen);\n pad6.set(key.length > blockLen ? hash3.create().update(key).digest() : key);\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54;\n this.iHash.update(pad6);\n this.oHash = hash3.create();\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54 ^ 92;\n this.oHash.update(pad6);\n clean(pad6);\n }\n update(buf) {\n aexists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n aexists(this);\n abytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n };\n hmac = (hash3, key, message2) => new HMAC(hash3, key).update(message2).digest();\n hmac.create = (hash3, key) => new HMAC(hash3, key);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/utils.js\n function isBytes2(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function abytes2(item) {\n if (!isBytes2(item))\n throw new Error(\"Uint8Array expected\");\n }\n function abool(title2, value) {\n if (typeof value !== \"boolean\")\n throw new Error(title2 + \" boolean expected, got \" + value);\n }\n function numberToHexUnpadded(num2) {\n const hex = num2.toString(16);\n return hex.length & 1 ? \"0\" + hex : hex;\n }\n function hexToNumber2(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n return hex === \"\" ? _0n2 : BigInt(\"0x\" + hex);\n }\n function bytesToHex3(bytes) {\n abytes2(bytes);\n if (hasHexBuiltin2)\n return bytes.toHex();\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes3[bytes[i3]];\n }\n return hex;\n }\n function asciiToBase162(ch) {\n if (ch >= asciis2._0 && ch <= asciis2._9)\n return ch - asciis2._0;\n if (ch >= asciis2.A && ch <= asciis2.F)\n return ch - (asciis2.A - 10);\n if (ch >= asciis2.a && ch <= asciis2.f)\n return ch - (asciis2.a - 10);\n return;\n }\n function hexToBytes3(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n if (hasHexBuiltin2)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error(\"hex string expected, got unpadded hex of length \" + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase162(hex.charCodeAt(hi));\n const n2 = asciiToBase162(hex.charCodeAt(hi + 1));\n if (n1 === void 0 || n2 === void 0) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n }\n function bytesToNumberBE(bytes) {\n return hexToNumber2(bytesToHex3(bytes));\n }\n function bytesToNumberLE(bytes) {\n abytes2(bytes);\n return hexToNumber2(bytesToHex3(Uint8Array.from(bytes).reverse()));\n }\n function numberToBytesBE(n2, len) {\n return hexToBytes3(n2.toString(16).padStart(len * 2, \"0\"));\n }\n function numberToBytesLE(n2, len) {\n return numberToBytesBE(n2, len).reverse();\n }\n function ensureBytes(title2, hex, expectedLength) {\n let res;\n if (typeof hex === \"string\") {\n try {\n res = hexToBytes3(hex);\n } catch (e2) {\n throw new Error(title2 + \" must be hex string or Uint8Array, cause: \" + e2);\n }\n } else if (isBytes2(hex)) {\n res = Uint8Array.from(hex);\n } else {\n throw new Error(title2 + \" must be hex string or Uint8Array\");\n }\n const len = res.length;\n if (typeof expectedLength === \"number\" && len !== expectedLength)\n throw new Error(title2 + \" of length \" + expectedLength + \" expected, got \" + len);\n return res;\n }\n function concatBytes3(...arrays) {\n let sum = 0;\n for (let i3 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n abytes2(a3);\n sum += a3.length;\n }\n const res = new Uint8Array(sum);\n for (let i3 = 0, pad6 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n res.set(a3, pad6);\n pad6 += a3.length;\n }\n return res;\n }\n function utf8ToBytes2(str) {\n if (typeof str !== \"string\")\n throw new Error(\"string expected\");\n return new Uint8Array(new TextEncoder().encode(str));\n }\n function inRange(n2, min, max) {\n return isPosBig(n2) && isPosBig(min) && isPosBig(max) && min <= n2 && n2 < max;\n }\n function aInRange(title2, n2, min, max) {\n if (!inRange(n2, min, max))\n throw new Error(\"expected valid \" + title2 + \": \" + min + \" <= n < \" + max + \", got \" + n2);\n }\n function bitLen(n2) {\n let len;\n for (len = 0; n2 > _0n2; n2 >>= _1n2, len += 1)\n ;\n return len;\n }\n function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== \"number\" || hashLen < 2)\n throw new Error(\"hashLen must be a number\");\n if (typeof qByteLen !== \"number\" || qByteLen < 2)\n throw new Error(\"qByteLen must be a number\");\n if (typeof hmacFn !== \"function\")\n throw new Error(\"hmacFn must be a function\");\n let v2 = u8n(hashLen);\n let k4 = u8n(hashLen);\n let i3 = 0;\n const reset = () => {\n v2.fill(1);\n k4.fill(0);\n i3 = 0;\n };\n const h4 = (...b4) => hmacFn(k4, v2, ...b4);\n const reseed = (seed = u8n(0)) => {\n k4 = h4(u8fr([0]), seed);\n v2 = h4();\n if (seed.length === 0)\n return;\n k4 = h4(u8fr([1]), seed);\n v2 = h4();\n };\n const gen2 = () => {\n if (i3++ >= 1e3)\n throw new Error(\"drbg: tried 1000 values\");\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v2 = h4();\n const sl = v2.slice();\n out.push(sl);\n len += v2.length;\n }\n return concatBytes3(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed);\n let res = void 0;\n while (!(res = pred(gen2())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n }\n function validateObject(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns[type];\n if (typeof checkVal !== \"function\")\n throw new Error(\"invalid validator function\");\n const val = object[fieldName];\n if (isOptional && val === void 0)\n return;\n if (!checkVal(val, object)) {\n throw new Error(\"param \" + String(fieldName) + \" is invalid. Expected \" + type + \", got \" + val);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n }\n function memoized(fn) {\n const map = /* @__PURE__ */ new WeakMap();\n return (arg, ...args) => {\n const val = map.get(arg);\n if (val !== void 0)\n return val;\n const computed = fn(arg, ...args);\n map.set(arg, computed);\n return computed;\n };\n }\n var _0n2, _1n2, hasHexBuiltin2, hexes3, asciis2, isPosBig, bitMask, u8n, u8fr, validatorFns;\n var init_utils5 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n _0n2 = /* @__PURE__ */ BigInt(0);\n _1n2 = /* @__PURE__ */ BigInt(1);\n hasHexBuiltin2 = // @ts-ignore\n typeof Uint8Array.from([]).toHex === \"function\" && typeof Uint8Array.fromHex === \"function\";\n hexes3 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n asciis2 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\n isPosBig = (n2) => typeof n2 === \"bigint\" && _0n2 <= n2;\n bitMask = (n2) => (_1n2 << BigInt(n2)) - _1n2;\n u8n = (len) => new Uint8Array(len);\n u8fr = (arr) => Uint8Array.from(arr);\n validatorFns = {\n bigint: (val) => typeof val === \"bigint\",\n function: (val) => typeof val === \"function\",\n boolean: (val) => typeof val === \"boolean\",\n string: (val) => typeof val === \"string\",\n stringOrUint8Array: (val) => typeof val === \"string\" || isBytes2(val),\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === \"function\" && Number.isSafeInteger(val.outputLen)\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/modular.js\n function mod(a3, b4) {\n const result = a3 % b4;\n return result >= _0n3 ? result : b4 + result;\n }\n function pow2(x4, power, modulo) {\n let res = x4;\n while (power-- > _0n3) {\n res *= res;\n res %= modulo;\n }\n return res;\n }\n function invert(number, modulo) {\n if (number === _0n3)\n throw new Error(\"invert: expected non-zero number\");\n if (modulo <= _0n3)\n throw new Error(\"invert: expected positive modulus, got \" + modulo);\n let a3 = mod(number, modulo);\n let b4 = modulo;\n let x4 = _0n3, y6 = _1n3, u2 = _1n3, v2 = _0n3;\n while (a3 !== _0n3) {\n const q3 = b4 / a3;\n const r2 = b4 % a3;\n const m2 = x4 - u2 * q3;\n const n2 = y6 - v2 * q3;\n b4 = a3, a3 = r2, x4 = u2, y6 = v2, u2 = m2, v2 = n2;\n }\n const gcd = b4;\n if (gcd !== _1n3)\n throw new Error(\"invert: does not exist\");\n return mod(x4, modulo);\n }\n function sqrt3mod4(Fp, n2) {\n const p1div4 = (Fp.ORDER + _1n3) / _4n;\n const root = Fp.pow(n2, p1div4);\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n function sqrt5mod8(Fp, n2) {\n const p5div8 = (Fp.ORDER - _5n) / _8n;\n const n22 = Fp.mul(n2, _2n2);\n const v2 = Fp.pow(n22, p5div8);\n const nv = Fp.mul(n2, v2);\n const i3 = Fp.mul(Fp.mul(nv, _2n2), v2);\n const root = Fp.mul(nv, Fp.sub(i3, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n function tonelliShanks(P2) {\n if (P2 < BigInt(3))\n throw new Error(\"sqrt is not defined for small field\");\n let Q2 = P2 - _1n3;\n let S3 = 0;\n while (Q2 % _2n2 === _0n3) {\n Q2 /= _2n2;\n S3++;\n }\n let Z2 = _2n2;\n const _Fp = Field(P2);\n while (FpLegendre(_Fp, Z2) === 1) {\n if (Z2++ > 1e3)\n throw new Error(\"Cannot find square root: probably non-prime P\");\n }\n if (S3 === 1)\n return sqrt3mod4;\n let cc = _Fp.pow(Z2, Q2);\n const Q1div2 = (Q2 + _1n3) / _2n2;\n return function tonelliSlow(Fp, n2) {\n if (Fp.is0(n2))\n return n2;\n if (FpLegendre(Fp, n2) !== 1)\n throw new Error(\"Cannot find square root\");\n let M2 = S3;\n let c4 = Fp.mul(Fp.ONE, cc);\n let t3 = Fp.pow(n2, Q2);\n let R3 = Fp.pow(n2, Q1div2);\n while (!Fp.eql(t3, Fp.ONE)) {\n if (Fp.is0(t3))\n return Fp.ZERO;\n let i3 = 1;\n let t_tmp = Fp.sqr(t3);\n while (!Fp.eql(t_tmp, Fp.ONE)) {\n i3++;\n t_tmp = Fp.sqr(t_tmp);\n if (i3 === M2)\n throw new Error(\"Cannot find square root\");\n }\n const exponent = _1n3 << BigInt(M2 - i3 - 1);\n const b4 = Fp.pow(c4, exponent);\n M2 = i3;\n c4 = Fp.sqr(b4);\n t3 = Fp.mul(t3, c4);\n R3 = Fp.mul(R3, b4);\n }\n return R3;\n };\n }\n function FpSqrt(P2) {\n if (P2 % _4n === _3n)\n return sqrt3mod4;\n if (P2 % _8n === _5n)\n return sqrt5mod8;\n return tonelliShanks(P2);\n }\n function validateField(field) {\n const initial = {\n ORDER: \"bigint\",\n MASK: \"bigint\",\n BYTES: \"isSafeInteger\",\n BITS: \"isSafeInteger\"\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n return validateObject(field, opts);\n }\n function FpPow(Fp, num2, power) {\n if (power < _0n3)\n throw new Error(\"invalid exponent, negatives unsupported\");\n if (power === _0n3)\n return Fp.ONE;\n if (power === _1n3)\n return num2;\n let p4 = Fp.ONE;\n let d5 = num2;\n while (power > _0n3) {\n if (power & _1n3)\n p4 = Fp.mul(p4, d5);\n d5 = Fp.sqr(d5);\n power >>= _1n3;\n }\n return p4;\n }\n function FpInvertBatch(Fp, nums, passZero = false) {\n const inverted = new Array(nums.length).fill(passZero ? Fp.ZERO : void 0);\n const multipliedAcc = nums.reduce((acc, num2, i3) => {\n if (Fp.is0(num2))\n return acc;\n inverted[i3] = acc;\n return Fp.mul(acc, num2);\n }, Fp.ONE);\n const invertedAcc = Fp.inv(multipliedAcc);\n nums.reduceRight((acc, num2, i3) => {\n if (Fp.is0(num2))\n return acc;\n inverted[i3] = Fp.mul(acc, inverted[i3]);\n return Fp.mul(acc, num2);\n }, invertedAcc);\n return inverted;\n }\n function FpLegendre(Fp, n2) {\n const p1mod2 = (Fp.ORDER - _1n3) / _2n2;\n const powered = Fp.pow(n2, p1mod2);\n const yes = Fp.eql(powered, Fp.ONE);\n const zero = Fp.eql(powered, Fp.ZERO);\n const no = Fp.eql(powered, Fp.neg(Fp.ONE));\n if (!yes && !zero && !no)\n throw new Error(\"invalid Legendre symbol result\");\n return yes ? 1 : zero ? 0 : -1;\n }\n function nLength(n2, nBitLength) {\n if (nBitLength !== void 0)\n anumber(nBitLength);\n const _nBitLength = nBitLength !== void 0 ? nBitLength : n2.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n }\n function Field(ORDER, bitLen3, isLE2 = false, redef = {}) {\n if (ORDER <= _0n3)\n throw new Error(\"invalid field: expected ORDER > 0, got \" + ORDER);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen3);\n if (BYTES > 2048)\n throw new Error(\"invalid field: expected ORDER of <= 2048 bytes\");\n let sqrtP;\n const f7 = Object.freeze({\n ORDER,\n isLE: isLE2,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: _0n3,\n ONE: _1n3,\n create: (num2) => mod(num2, ORDER),\n isValid: (num2) => {\n if (typeof num2 !== \"bigint\")\n throw new Error(\"invalid field element: expected bigint, got \" + typeof num2);\n return _0n3 <= num2 && num2 < ORDER;\n },\n is0: (num2) => num2 === _0n3,\n isOdd: (num2) => (num2 & _1n3) === _1n3,\n neg: (num2) => mod(-num2, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num2) => mod(num2 * num2, ORDER),\n add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n pow: (num2, power) => FpPow(f7, num2, power),\n div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num2) => num2 * num2,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num2) => invert(num2, ORDER),\n sqrt: redef.sqrt || ((n2) => {\n if (!sqrtP)\n sqrtP = FpSqrt(ORDER);\n return sqrtP(f7, n2);\n }),\n toBytes: (num2) => isLE2 ? numberToBytesLE(num2, BYTES) : numberToBytesBE(num2, BYTES),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(\"Field.fromBytes: expected \" + BYTES + \" bytes, got \" + bytes.length);\n return isLE2 ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n },\n // TODO: we don't need it here, move out to separate fn\n invertBatch: (lst) => FpInvertBatch(f7, lst),\n // We can't move this out because Fp6, Fp12 implement it\n // and it's unclear what to return in there.\n cmov: (a3, b4, c4) => c4 ? b4 : a3\n });\n return Object.freeze(f7);\n }\n function getFieldBytesLength(fieldOrder) {\n if (typeof fieldOrder !== \"bigint\")\n throw new Error(\"field order must be bigint\");\n const bitLength3 = fieldOrder.toString(2).length;\n return Math.ceil(bitLength3 / 8);\n }\n function getMinHashLength(fieldOrder) {\n const length = getFieldBytesLength(fieldOrder);\n return length + Math.ceil(length / 2);\n }\n function mapHashToField(key, fieldOrder, isLE2 = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength(fieldOrder);\n const minLen = getMinHashLength(fieldOrder);\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(\"expected \" + minLen + \"-1024 bytes of input, got \" + len);\n const num2 = isLE2 ? bytesToNumberLE(key) : bytesToNumberBE(key);\n const reduced = mod(num2, fieldOrder - _1n3) + _1n3;\n return isLE2 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);\n }\n var _0n3, _1n3, _2n2, _3n, _4n, _5n, _8n, FIELD_FIELDS;\n var init_modular = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/modular.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n init_utils5();\n _0n3 = BigInt(0);\n _1n3 = BigInt(1);\n _2n2 = /* @__PURE__ */ BigInt(2);\n _3n = /* @__PURE__ */ BigInt(3);\n _4n = /* @__PURE__ */ BigInt(4);\n _5n = /* @__PURE__ */ BigInt(5);\n _8n = /* @__PURE__ */ BigInt(8);\n FIELD_FIELDS = [\n \"create\",\n \"isValid\",\n \"is0\",\n \"neg\",\n \"inv\",\n \"sqrt\",\n \"sqr\",\n \"eql\",\n \"add\",\n \"sub\",\n \"mul\",\n \"pow\",\n \"div\",\n \"addN\",\n \"subN\",\n \"mulN\",\n \"sqrN\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/curve.js\n function constTimeNegate(condition, item) {\n const neg = item.negate();\n return condition ? neg : item;\n }\n function validateW(W, bits) {\n if (!Number.isSafeInteger(W) || W <= 0 || W > bits)\n throw new Error(\"invalid window size, expected [1..\" + bits + \"], got W=\" + W);\n }\n function calcWOpts(W, scalarBits) {\n validateW(W, scalarBits);\n const windows = Math.ceil(scalarBits / W) + 1;\n const windowSize = 2 ** (W - 1);\n const maxNumber = 2 ** W;\n const mask = bitMask(W);\n const shiftBy = BigInt(W);\n return { windows, windowSize, mask, maxNumber, shiftBy };\n }\n function calcOffsets(n2, window2, wOpts) {\n const { windowSize, mask, maxNumber, shiftBy } = wOpts;\n let wbits = Number(n2 & mask);\n let nextN = n2 >> shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n nextN += _1n4;\n }\n const offsetStart = window2 * windowSize;\n const offset = offsetStart + Math.abs(wbits) - 1;\n const isZero = wbits === 0;\n const isNeg = wbits < 0;\n const isNegF = window2 % 2 !== 0;\n const offsetF = offsetStart;\n return { nextN, offset, isZero, isNeg, isNegF, offsetF };\n }\n function validateMSMPoints(points, c4) {\n if (!Array.isArray(points))\n throw new Error(\"array expected\");\n points.forEach((p4, i3) => {\n if (!(p4 instanceof c4))\n throw new Error(\"invalid point at index \" + i3);\n });\n }\n function validateMSMScalars(scalars, field) {\n if (!Array.isArray(scalars))\n throw new Error(\"array of scalars expected\");\n scalars.forEach((s4, i3) => {\n if (!field.isValid(s4))\n throw new Error(\"invalid scalar at index \" + i3);\n });\n }\n function getW(P2) {\n return pointWindowSizes.get(P2) || 1;\n }\n function wNAF(c4, bits) {\n return {\n constTimeNegate,\n hasPrecomputes(elm) {\n return getW(elm) !== 1;\n },\n // non-const time multiplication ladder\n unsafeLadder(elm, n2, p4 = c4.ZERO) {\n let d5 = elm;\n while (n2 > _0n4) {\n if (n2 & _1n4)\n p4 = p4.add(d5);\n d5 = d5.double();\n n2 >>= _1n4;\n }\n return p4;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @param elm Point instance\n * @param W window size\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = calcWOpts(W, bits);\n const points = [];\n let p4 = elm;\n let base4 = p4;\n for (let window2 = 0; window2 < windows; window2++) {\n base4 = p4;\n points.push(base4);\n for (let i3 = 1; i3 < windowSize; i3++) {\n base4 = base4.add(p4);\n points.push(base4);\n }\n p4 = base4.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n2) {\n let p4 = c4.ZERO;\n let f7 = c4.BASE;\n const wo = calcWOpts(W, bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n const { nextN, offset, isZero, isNeg, isNegF, offsetF } = calcOffsets(n2, window2, wo);\n n2 = nextN;\n if (isZero) {\n f7 = f7.add(constTimeNegate(isNegF, precomputes[offsetF]));\n } else {\n p4 = p4.add(constTimeNegate(isNeg, precomputes[offset]));\n }\n }\n return { p: p4, f: f7 };\n },\n /**\n * Implements ec unsafe (non const-time) multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @param acc accumulator point to add result of multiplication\n * @returns point\n */\n wNAFUnsafe(W, precomputes, n2, acc = c4.ZERO) {\n const wo = calcWOpts(W, bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n if (n2 === _0n4)\n break;\n const { nextN, offset, isZero, isNeg } = calcOffsets(n2, window2, wo);\n n2 = nextN;\n if (isZero) {\n continue;\n } else {\n const item = precomputes[offset];\n acc = acc.add(isNeg ? item.negate() : item);\n }\n }\n return acc;\n },\n getPrecomputes(W, P2, transform) {\n let comp = pointPrecomputes.get(P2);\n if (!comp) {\n comp = this.precomputeWindow(P2, W);\n if (W !== 1)\n pointPrecomputes.set(P2, transform(comp));\n }\n return comp;\n },\n wNAFCached(P2, n2, transform) {\n const W = getW(P2);\n return this.wNAF(W, this.getPrecomputes(W, P2, transform), n2);\n },\n wNAFCachedUnsafe(P2, n2, transform, prev) {\n const W = getW(P2);\n if (W === 1)\n return this.unsafeLadder(P2, n2, prev);\n return this.wNAFUnsafe(W, this.getPrecomputes(W, P2, transform), n2, prev);\n },\n // We calculate precomputes for elliptic curve point multiplication\n // using windowed method. This specifies window size and\n // stores precomputed values. Usually only base point would be precomputed.\n setWindowSize(P2, W) {\n validateW(W, bits);\n pointWindowSizes.set(P2, W);\n pointPrecomputes.delete(P2);\n }\n };\n }\n function pippenger(c4, fieldN, points, scalars) {\n validateMSMPoints(points, c4);\n validateMSMScalars(scalars, fieldN);\n const plength = points.length;\n const slength = scalars.length;\n if (plength !== slength)\n throw new Error(\"arrays of points and scalars must have equal length\");\n const zero = c4.ZERO;\n const wbits = bitLen(BigInt(plength));\n let windowSize = 1;\n if (wbits > 12)\n windowSize = wbits - 3;\n else if (wbits > 4)\n windowSize = wbits - 2;\n else if (wbits > 0)\n windowSize = 2;\n const MASK = bitMask(windowSize);\n const buckets = new Array(Number(MASK) + 1).fill(zero);\n const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;\n let sum = zero;\n for (let i3 = lastBits; i3 >= 0; i3 -= windowSize) {\n buckets.fill(zero);\n for (let j2 = 0; j2 < slength; j2++) {\n const scalar = scalars[j2];\n const wbits2 = Number(scalar >> BigInt(i3) & MASK);\n buckets[wbits2] = buckets[wbits2].add(points[j2]);\n }\n let resI = zero;\n for (let j2 = buckets.length - 1, sumI = zero; j2 > 0; j2--) {\n sumI = sumI.add(buckets[j2]);\n resI = resI.add(sumI);\n }\n sum = sum.add(resI);\n if (i3 !== 0)\n for (let j2 = 0; j2 < windowSize; j2++)\n sum = sum.double();\n }\n return sum;\n }\n function validateBasic(curve) {\n validateField(curve.Fp);\n validateObject(curve, {\n n: \"bigint\",\n h: \"bigint\",\n Gx: \"field\",\n Gy: \"field\"\n }, {\n nBitLength: \"isSafeInteger\",\n nByteLength: \"isSafeInteger\"\n });\n return Object.freeze({\n ...nLength(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER }\n });\n }\n var _0n4, _1n4, pointPrecomputes, pointWindowSizes;\n var init_curve = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/curve.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_modular();\n init_utils5();\n _0n4 = BigInt(0);\n _1n4 = BigInt(1);\n pointPrecomputes = /* @__PURE__ */ new WeakMap();\n pointWindowSizes = /* @__PURE__ */ new WeakMap();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/weierstrass.js\n function validateSigVerOpts(opts) {\n if (opts.lowS !== void 0)\n abool(\"lowS\", opts.lowS);\n if (opts.prehash !== void 0)\n abool(\"prehash\", opts.prehash);\n }\n function validatePointOpts(curve) {\n const opts = validateBasic(curve);\n validateObject(opts, {\n a: \"field\",\n b: \"field\"\n }, {\n allowInfinityPoint: \"boolean\",\n allowedPrivateKeyLengths: \"array\",\n clearCofactor: \"function\",\n fromBytes: \"function\",\n isTorsionFree: \"function\",\n toBytes: \"function\",\n wrapPrivateKey: \"boolean\"\n });\n const { endo, Fp, a: a3 } = opts;\n if (endo) {\n if (!Fp.eql(a3, Fp.ZERO)) {\n throw new Error(\"invalid endo: CURVE.a must be 0\");\n }\n if (typeof endo !== \"object\" || typeof endo.beta !== \"bigint\" || typeof endo.splitScalar !== \"function\") {\n throw new Error('invalid endo: expected \"beta\": bigint and \"splitScalar\": function');\n }\n }\n return Object.freeze({ ...opts });\n }\n function numToSizedHex(num2, size6) {\n return bytesToHex3(numberToBytesBE(num2, size6));\n }\n function weierstrassPoints(opts) {\n const CURVE = validatePointOpts(opts);\n const { Fp } = CURVE;\n const Fn = Field(CURVE.n, CURVE.nBitLength);\n const toBytes5 = CURVE.toBytes || ((_c, point, _isCompressed) => {\n const a3 = point.toAffine();\n return concatBytes3(Uint8Array.from([4]), Fp.toBytes(a3.x), Fp.toBytes(a3.y));\n });\n const fromBytes5 = CURVE.fromBytes || ((bytes) => {\n const tail = bytes.subarray(1);\n const x4 = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y6 = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x: x4, y: y6 };\n });\n function weierstrassEquation(x4) {\n const { a: a3, b: b4 } = CURVE;\n const x22 = Fp.sqr(x4);\n const x32 = Fp.mul(x22, x4);\n return Fp.add(Fp.add(x32, Fp.mul(x4, a3)), b4);\n }\n function isValidXY(x4, y6) {\n const left = Fp.sqr(y6);\n const right = weierstrassEquation(x4);\n return Fp.eql(left, right);\n }\n if (!isValidXY(CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n const _4a3 = Fp.mul(Fp.pow(CURVE.a, _3n2), _4n2);\n const _27b2 = Fp.mul(Fp.sqr(CURVE.b), BigInt(27));\n if (Fp.is0(Fp.add(_4a3, _27b2)))\n throw new Error(\"bad curve params: a or b\");\n function isWithinCurveOrder(num2) {\n return inRange(num2, _1n5, CURVE.n);\n }\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n: N4 } = CURVE;\n if (lengths && typeof key !== \"bigint\") {\n if (isBytes2(key))\n key = bytesToHex3(key);\n if (typeof key !== \"string\" || !lengths.includes(key.length))\n throw new Error(\"invalid private key\");\n key = key.padStart(nByteLength * 2, \"0\");\n }\n let num2;\n try {\n num2 = typeof key === \"bigint\" ? key : bytesToNumberBE(ensureBytes(\"private key\", key, nByteLength));\n } catch (error) {\n throw new Error(\"invalid private key, expected hex or \" + nByteLength + \" bytes, got \" + typeof key);\n }\n if (wrapPrivateKey)\n num2 = mod(num2, N4);\n aInRange(\"private key\", num2, _1n5, N4);\n return num2;\n }\n function aprjpoint(other) {\n if (!(other instanceof Point3))\n throw new Error(\"ProjectivePoint expected\");\n }\n const toAffineMemo = memoized((p4, iz) => {\n const { px: x4, py: y6, pz: z2 } = p4;\n if (Fp.eql(z2, Fp.ONE))\n return { x: x4, y: y6 };\n const is0 = p4.is0();\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z2);\n const ax = Fp.mul(x4, iz);\n const ay = Fp.mul(y6, iz);\n const zz = Fp.mul(z2, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error(\"invZ was invalid\");\n return { x: ax, y: ay };\n });\n const assertValidMemo = memoized((p4) => {\n if (p4.is0()) {\n if (CURVE.allowInfinityPoint && !Fp.is0(p4.py))\n return;\n throw new Error(\"bad point: ZERO\");\n }\n const { x: x4, y: y6 } = p4.toAffine();\n if (!Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"bad point: x or y not FE\");\n if (!isValidXY(x4, y6))\n throw new Error(\"bad point: equation left != right\");\n if (!p4.isTorsionFree())\n throw new Error(\"bad point: not in prime-order subgroup\");\n return true;\n });\n class Point3 {\n constructor(px, py, pz) {\n if (px == null || !Fp.isValid(px))\n throw new Error(\"x required\");\n if (py == null || !Fp.isValid(py) || Fp.is0(py))\n throw new Error(\"y required\");\n if (pz == null || !Fp.isValid(pz))\n throw new Error(\"z required\");\n this.px = px;\n this.py = py;\n this.pz = pz;\n Object.freeze(this);\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p4) {\n const { x: x4, y: y6 } = p4 || {};\n if (!p4 || !Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"invalid affine point\");\n if (p4 instanceof Point3)\n throw new Error(\"projective point not allowed\");\n const is0 = (i3) => Fp.eql(i3, Fp.ZERO);\n if (is0(x4) && is0(y6))\n return Point3.ZERO;\n return new Point3(x4, y6, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = FpInvertBatch(Fp, points.map((p4) => p4.pz));\n return points.map((p4, i3) => p4.toAffine(toInv[i3])).map(Point3.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P2 = Point3.fromAffine(fromBytes5(ensureBytes(\"pointHex\", hex)));\n P2.assertValidity();\n return P2;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point3.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // Multiscalar Multiplication\n static msm(points, scalars) {\n return pippenger(Point3, Fn, points, scalars);\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n wnaf.setWindowSize(this, windowSize);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n assertValidMemo(this);\n }\n hasEvenY() {\n const { y: y6 } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y6);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n aprjpoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U22 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U22;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point3(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a: a3, b: b4 } = CURVE;\n const b32 = Fp.mul(b4, _3n2);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n let t0 = Fp.mul(X1, X1);\n let t1 = Fp.mul(Y1, Y1);\n let t22 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3);\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a3, Z3);\n Y3 = Fp.mul(b32, t22);\n Y3 = Fp.add(X3, Y3);\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b32, Z3);\n t22 = Fp.mul(a3, t22);\n t3 = Fp.sub(t0, t22);\n t3 = Fp.mul(a3, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0);\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t22);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t22 = Fp.mul(Y1, Z1);\n t22 = Fp.add(t22, t22);\n t0 = Fp.mul(t22, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t22, t1);\n Z3 = Fp.add(Z3, Z3);\n Z3 = Fp.add(Z3, Z3);\n return new Point3(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n aprjpoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n const a3 = CURVE.a;\n const b32 = Fp.mul(CURVE.b, _3n2);\n let t0 = Fp.mul(X1, X2);\n let t1 = Fp.mul(Y1, Y2);\n let t22 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2);\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2);\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t22);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2);\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t22);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a3, t4);\n X3 = Fp.mul(b32, t22);\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0);\n t1 = Fp.add(t1, t0);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.mul(b32, t4);\n t1 = Fp.add(t1, t22);\n t22 = Fp.sub(t0, t22);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.add(t4, t22);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4);\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0);\n return new Point3(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point3.ZERO);\n }\n wNAF(n2) {\n return wnaf.wNAFCached(this, n2, Point3.normalizeZ);\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(sc) {\n const { endo: endo2, n: N4 } = CURVE;\n aInRange(\"scalar\", sc, _0n5, N4);\n const I2 = Point3.ZERO;\n if (sc === _0n5)\n return I2;\n if (this.is0() || sc === _1n5)\n return this;\n if (!endo2 || wnaf.hasPrecomputes(this))\n return wnaf.wNAFCachedUnsafe(this, sc, Point3.normalizeZ);\n let { k1neg, k1, k2neg, k2: k22 } = endo2.splitScalar(sc);\n let k1p = I2;\n let k2p = I2;\n let d5 = this;\n while (k1 > _0n5 || k22 > _0n5) {\n if (k1 & _1n5)\n k1p = k1p.add(d5);\n if (k22 & _1n5)\n k2p = k2p.add(d5);\n d5 = d5.double();\n k1 >>= _1n5;\n k22 >>= _1n5;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point3(Fp.mul(k2p.px, endo2.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n const { endo: endo2, n: N4 } = CURVE;\n aInRange(\"scalar\", scalar, _1n5, N4);\n let point, fake;\n if (endo2) {\n const { k1neg, k1, k2neg, k2: k22 } = endo2.splitScalar(scalar);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k22);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point3(Fp.mul(k2p.px, endo2.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n } else {\n const { p: p4, f: f7 } = this.wNAF(scalar);\n point = p4;\n fake = f7;\n }\n return Point3.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q2, a3, b4) {\n const G = Point3.BASE;\n const mul = (P2, a4) => a4 === _0n5 || a4 === _1n5 || !P2.equals(G) ? P2.multiplyUnsafe(a4) : P2.multiply(a4);\n const sum = mul(this, a3).add(mul(Q2, b4));\n return sum.is0() ? void 0 : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n return toAffineMemo(this, iz);\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n5)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point3, this);\n throw new Error(\"isTorsionFree() has not been declared for the elliptic curve\");\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n5)\n return this;\n if (clearCofactor)\n return clearCofactor(Point3, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n abool(\"isCompressed\", isCompressed);\n this.assertValidity();\n return toBytes5(Point3, this, isCompressed);\n }\n toHex(isCompressed = true) {\n abool(\"isCompressed\", isCompressed);\n return bytesToHex3(this.toRawBytes(isCompressed));\n }\n }\n Point3.BASE = new Point3(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point3.ZERO = new Point3(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const { endo, nBitLength } = CURVE;\n const wnaf = wNAF(Point3, endo ? Math.ceil(nBitLength / 2) : nBitLength);\n return {\n CURVE,\n ProjectivePoint: Point3,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder\n };\n }\n function validateOpts(curve) {\n const opts = validateBasic(curve);\n validateObject(opts, {\n hash: \"hash\",\n hmac: \"function\",\n randomBytes: \"function\"\n }, {\n bits2int: \"function\",\n bits2int_modN: \"function\",\n lowS: \"boolean\"\n });\n return Object.freeze({ lowS: true, ...opts });\n }\n function weierstrass(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER, nByteLength, nBitLength } = CURVE;\n const compressedLen = Fp.BYTES + 1;\n const uncompressedLen = 2 * Fp.BYTES + 1;\n function modN2(a3) {\n return mod(a3, CURVE_ORDER);\n }\n function invN(a3) {\n return invert(a3, CURVE_ORDER);\n }\n const { ProjectivePoint: Point3, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder } = weierstrassPoints({\n ...CURVE,\n toBytes(_c, point, isCompressed) {\n const a3 = point.toAffine();\n const x4 = Fp.toBytes(a3.x);\n const cat = concatBytes3;\n abool(\"isCompressed\", isCompressed);\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 2 : 3]), x4);\n } else {\n return cat(Uint8Array.from([4]), x4, Fp.toBytes(a3.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (len === compressedLen && (head === 2 || head === 3)) {\n const x4 = bytesToNumberBE(tail);\n if (!inRange(x4, _1n5, Fp.ORDER))\n throw new Error(\"Point is not on curve\");\n const y22 = weierstrassEquation(x4);\n let y6;\n try {\n y6 = Fp.sqrt(y22);\n } catch (sqrtError) {\n const suffix = sqrtError instanceof Error ? \": \" + sqrtError.message : \"\";\n throw new Error(\"Point is not on curve\" + suffix);\n }\n const isYOdd = (y6 & _1n5) === _1n5;\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y6 = Fp.neg(y6);\n return { x: x4, y: y6 };\n } else if (len === uncompressedLen && head === 4) {\n const x4 = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y6 = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x: x4, y: y6 };\n } else {\n const cl = compressedLen;\n const ul = uncompressedLen;\n throw new Error(\"invalid Point, expected length of \" + cl + \", or uncompressed \" + ul + \", got \" + len);\n }\n }\n });\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n5;\n return number > HALF;\n }\n function normalizeS(s4) {\n return isBiggerThanHalfOrder(s4) ? modN2(-s4) : s4;\n }\n const slcNum = (b4, from14, to) => bytesToNumberBE(b4.slice(from14, to));\n class Signature {\n constructor(r2, s4, recovery) {\n aInRange(\"r\", r2, _1n5, CURVE_ORDER);\n aInRange(\"s\", s4, _1n5, CURVE_ORDER);\n this.r = r2;\n this.s = s4;\n if (recovery != null)\n this.recovery = recovery;\n Object.freeze(this);\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l6 = nByteLength;\n hex = ensureBytes(\"compactSignature\", hex, l6 * 2);\n return new Signature(slcNum(hex, 0, l6), slcNum(hex, l6, 2 * l6));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r: r2, s: s4 } = DER.toSig(ensureBytes(\"DER\", hex));\n return new Signature(r2, s4);\n }\n /**\n * @todo remove\n * @deprecated\n */\n assertValidity() {\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r: r2, s: s4, recovery: rec } = this;\n const h4 = bits2int_modN(ensureBytes(\"msgHash\", msgHash));\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error(\"recovery id invalid\");\n const radj = rec === 2 || rec === 3 ? r2 + CURVE.n : r2;\n if (radj >= Fp.ORDER)\n throw new Error(\"recovery id 2 or 3 invalid\");\n const prefix = (rec & 1) === 0 ? \"02\" : \"03\";\n const R3 = Point3.fromHex(prefix + numToSizedHex(radj, Fp.BYTES));\n const ir = invN(radj);\n const u1 = modN2(-h4 * ir);\n const u2 = modN2(s4 * ir);\n const Q2 = Point3.BASE.multiplyAndAddUnsafe(R3, u1, u2);\n if (!Q2)\n throw new Error(\"point at infinify\");\n Q2.assertValidity();\n return Q2;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, modN2(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return hexToBytes3(this.toDERHex());\n }\n toDERHex() {\n return DER.hexFromSig(this);\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return hexToBytes3(this.toCompactHex());\n }\n toCompactHex() {\n const l6 = nByteLength;\n return numToSizedHex(this.r, l6) + numToSizedHex(this.s, l6);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n } catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size\n * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.\n */\n randomPrivateKey: () => {\n const length = getMinHashLength(CURVE.n);\n return mapHashToField(CURVE.randomBytes(length), CURVE.n);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point3.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3));\n return point;\n }\n };\n function getPublicKey(privateKey, isCompressed = true) {\n return Point3.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n function isProbPub(item) {\n if (typeof item === \"bigint\")\n return false;\n if (item instanceof Point3)\n return true;\n const arr = ensureBytes(\"key\", item);\n const len = arr.length;\n const fpl = Fp.BYTES;\n const compLen = fpl + 1;\n const uncompLen = 2 * fpl + 1;\n if (CURVE.allowedPrivateKeyLengths || nByteLength === compLen) {\n return void 0;\n } else {\n return len === compLen || len === uncompLen;\n }\n }\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA) === true)\n throw new Error(\"first arg must be private key\");\n if (isProbPub(publicB) === false)\n throw new Error(\"second arg must be public key\");\n const b4 = Point3.fromHex(publicB);\n return b4.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n const bits2int = CURVE.bits2int || function(bytes) {\n if (bytes.length > 8192)\n throw new Error(\"input is too large\");\n const num2 = bytesToNumberBE(bytes);\n const delta = bytes.length * 8 - nBitLength;\n return delta > 0 ? num2 >> BigInt(delta) : num2;\n };\n const bits2int_modN = CURVE.bits2int_modN || function(bytes) {\n return modN2(bits2int(bytes));\n };\n const ORDER_MASK = bitMask(nBitLength);\n function int2octets(num2) {\n aInRange(\"num < 2^\" + nBitLength, num2, _0n5, ORDER_MASK);\n return numberToBytesBE(num2, nByteLength);\n }\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if ([\"recovered\", \"canonical\"].some((k4) => k4 in opts))\n throw new Error(\"sign() legacy options not supported\");\n const { hash: hash3, randomBytes: randomBytes2 } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts;\n if (lowS == null)\n lowS = true;\n msgHash = ensureBytes(\"msgHash\", msgHash);\n validateSigVerOpts(opts);\n if (prehash)\n msgHash = ensureBytes(\"prehashed msgHash\", hash3(msgHash));\n const h1int = bits2int_modN(msgHash);\n const d5 = normPrivateKeyToScalar(privateKey);\n const seedArgs = [int2octets(d5), int2octets(h1int)];\n if (ent != null && ent !== false) {\n const e2 = ent === true ? randomBytes2(Fp.BYTES) : ent;\n seedArgs.push(ensureBytes(\"extraEntropy\", e2));\n }\n const seed = concatBytes3(...seedArgs);\n const m2 = h1int;\n function k2sig(kBytes) {\n const k4 = bits2int(kBytes);\n if (!isWithinCurveOrder(k4))\n return;\n const ik = invN(k4);\n const q3 = Point3.BASE.multiply(k4).toAffine();\n const r2 = modN2(q3.x);\n if (r2 === _0n5)\n return;\n const s4 = modN2(ik * modN2(m2 + r2 * d5));\n if (s4 === _0n5)\n return;\n let recovery = (q3.x === r2 ? 0 : 2) | Number(q3.y & _1n5);\n let normS = s4;\n if (lowS && isBiggerThanHalfOrder(s4)) {\n normS = normalizeS(s4);\n recovery ^= 1;\n }\n return new Signature(r2, normS, recovery);\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n function sign4(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts);\n const C = CURVE;\n const drbg = createHmacDrbg(C.hash.outputLen, C.nByteLength, C.hmac);\n return drbg(seed, k2sig);\n }\n Point3.BASE._setWindowSize(8);\n function verify2(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = ensureBytes(\"msgHash\", msgHash);\n publicKey = ensureBytes(\"publicKey\", publicKey);\n const { lowS, prehash, format } = opts;\n validateSigVerOpts(opts);\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n if (format !== void 0 && format !== \"compact\" && format !== \"der\")\n throw new Error(\"format must be compact or der\");\n const isHex2 = typeof sg === \"string\" || isBytes2(sg);\n const isObj = !isHex2 && !format && typeof sg === \"object\" && sg !== null && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\";\n if (!isHex2 && !isObj)\n throw new Error(\"invalid signature, expected Uint8Array, hex string or Signature instance\");\n let _sig = void 0;\n let P2;\n try {\n if (isObj)\n _sig = new Signature(sg.r, sg.s);\n if (isHex2) {\n try {\n if (format !== \"compact\")\n _sig = Signature.fromDER(sg);\n } catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n }\n if (!_sig && format !== \"der\")\n _sig = Signature.fromCompact(sg);\n }\n P2 = Point3.fromHex(publicKey);\n } catch (error) {\n return false;\n }\n if (!_sig)\n return false;\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r: r2, s: s4 } = _sig;\n const h4 = bits2int_modN(msgHash);\n const is = invN(s4);\n const u1 = modN2(h4 * is);\n const u2 = modN2(r2 * is);\n const R3 = Point3.BASE.multiplyAndAddUnsafe(P2, u1, u2)?.toAffine();\n if (!R3)\n return false;\n const v2 = modN2(R3.x);\n return v2 === r2;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign: sign4,\n verify: verify2,\n ProjectivePoint: Point3,\n Signature,\n utils\n };\n }\n function SWUFpSqrtRatio(Fp, Z2) {\n const q3 = Fp.ORDER;\n let l6 = _0n5;\n for (let o5 = q3 - _1n5; o5 % _2n3 === _0n5; o5 /= _2n3)\n l6 += _1n5;\n const c1 = l6;\n const _2n_pow_c1_1 = _2n3 << c1 - _1n5 - _1n5;\n const _2n_pow_c1 = _2n_pow_c1_1 * _2n3;\n const c22 = (q3 - _1n5) / _2n_pow_c1;\n const c32 = (c22 - _1n5) / _2n3;\n const c4 = _2n_pow_c1 - _1n5;\n const c5 = _2n_pow_c1_1;\n const c6 = Fp.pow(Z2, c22);\n const c7 = Fp.pow(Z2, (c22 + _1n5) / _2n3);\n let sqrtRatio = (u2, v2) => {\n let tv1 = c6;\n let tv2 = Fp.pow(v2, c4);\n let tv3 = Fp.sqr(tv2);\n tv3 = Fp.mul(tv3, v2);\n let tv5 = Fp.mul(u2, tv3);\n tv5 = Fp.pow(tv5, c32);\n tv5 = Fp.mul(tv5, tv2);\n tv2 = Fp.mul(tv5, v2);\n tv3 = Fp.mul(tv5, u2);\n let tv4 = Fp.mul(tv3, tv2);\n tv5 = Fp.pow(tv4, c5);\n let isQR = Fp.eql(tv5, Fp.ONE);\n tv2 = Fp.mul(tv3, c7);\n tv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, isQR);\n tv4 = Fp.cmov(tv5, tv4, isQR);\n for (let i3 = c1; i3 > _1n5; i3--) {\n let tv52 = i3 - _2n3;\n tv52 = _2n3 << tv52 - _1n5;\n let tvv5 = Fp.pow(tv4, tv52);\n const e1 = Fp.eql(tvv5, Fp.ONE);\n tv2 = Fp.mul(tv3, tv1);\n tv1 = Fp.mul(tv1, tv1);\n tvv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, e1);\n tv4 = Fp.cmov(tvv5, tv4, e1);\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n2 === _3n2) {\n const c12 = (Fp.ORDER - _3n2) / _4n2;\n const c23 = Fp.sqrt(Fp.neg(Z2));\n sqrtRatio = (u2, v2) => {\n let tv1 = Fp.sqr(v2);\n const tv2 = Fp.mul(u2, v2);\n tv1 = Fp.mul(tv1, tv2);\n let y1 = Fp.pow(tv1, c12);\n y1 = Fp.mul(y1, tv2);\n const y22 = Fp.mul(y1, c23);\n const tv3 = Fp.mul(Fp.sqr(y1), v2);\n const isQR = Fp.eql(tv3, u2);\n let y6 = Fp.cmov(y22, y1, isQR);\n return { isValid: isQR, value: y6 };\n };\n }\n return sqrtRatio;\n }\n function mapToCurveSimpleSWU(Fp, opts) {\n validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error(\"mapToCurveSimpleSWU: invalid opts\");\n const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error(\"Fp.isOdd is not implemented!\");\n return (u2) => {\n let tv1, tv2, tv3, tv4, tv5, tv6, x4, y6;\n tv1 = Fp.sqr(u2);\n tv1 = Fp.mul(tv1, opts.Z);\n tv2 = Fp.sqr(tv1);\n tv2 = Fp.add(tv2, tv1);\n tv3 = Fp.add(tv2, Fp.ONE);\n tv3 = Fp.mul(tv3, opts.B);\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO));\n tv4 = Fp.mul(tv4, opts.A);\n tv2 = Fp.sqr(tv3);\n tv6 = Fp.sqr(tv4);\n tv5 = Fp.mul(tv6, opts.A);\n tv2 = Fp.add(tv2, tv5);\n tv2 = Fp.mul(tv2, tv3);\n tv6 = Fp.mul(tv6, tv4);\n tv5 = Fp.mul(tv6, opts.B);\n tv2 = Fp.add(tv2, tv5);\n x4 = Fp.mul(tv1, tv3);\n const { isValid: isValid2, value } = sqrtRatio(tv2, tv6);\n y6 = Fp.mul(tv1, u2);\n y6 = Fp.mul(y6, value);\n x4 = Fp.cmov(x4, tv3, isValid2);\n y6 = Fp.cmov(y6, value, isValid2);\n const e1 = Fp.isOdd(u2) === Fp.isOdd(y6);\n y6 = Fp.cmov(Fp.neg(y6), y6, e1);\n const tv4_inv = FpInvertBatch(Fp, [tv4], true)[0];\n x4 = Fp.mul(x4, tv4_inv);\n return { x: x4, y: y6 };\n };\n }\n var DERErr, DER, _0n5, _1n5, _2n3, _3n2, _4n2;\n var init_weierstrass = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/weierstrass.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_curve();\n init_modular();\n init_utils5();\n DERErr = class extends Error {\n constructor(m2 = \"\") {\n super(m2);\n }\n };\n DER = {\n // asn.1 DER encoding utils\n Err: DERErr,\n // Basic building block is TLV (Tag-Length-Value)\n _tlv: {\n encode: (tag, data) => {\n const { Err: E2 } = DER;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length & 1)\n throw new E2(\"tlv.encode: unpadded data\");\n const dataLen = data.length / 2;\n const len = numberToHexUnpadded(dataLen);\n if (len.length / 2 & 128)\n throw new E2(\"tlv.encode: long form length too big\");\n const lenLen = dataLen > 127 ? numberToHexUnpadded(len.length / 2 | 128) : \"\";\n const t3 = numberToHexUnpadded(tag);\n return t3 + lenLen + len + data;\n },\n // v - value, l - left bytes (unparsed)\n decode(tag, data) {\n const { Err: E2 } = DER;\n let pos = 0;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length < 2 || data[pos++] !== tag)\n throw new E2(\"tlv.decode: wrong tlv\");\n const first = data[pos++];\n const isLong = !!(first & 128);\n let length = 0;\n if (!isLong)\n length = first;\n else {\n const lenLen = first & 127;\n if (!lenLen)\n throw new E2(\"tlv.decode(long): indefinite length not supported\");\n if (lenLen > 4)\n throw new E2(\"tlv.decode(long): byte length is too big\");\n const lengthBytes = data.subarray(pos, pos + lenLen);\n if (lengthBytes.length !== lenLen)\n throw new E2(\"tlv.decode: length bytes not complete\");\n if (lengthBytes[0] === 0)\n throw new E2(\"tlv.decode(long): zero leftmost byte\");\n for (const b4 of lengthBytes)\n length = length << 8 | b4;\n pos += lenLen;\n if (length < 128)\n throw new E2(\"tlv.decode(long): not minimal encoding\");\n }\n const v2 = data.subarray(pos, pos + length);\n if (v2.length !== length)\n throw new E2(\"tlv.decode: wrong value length\");\n return { v: v2, l: data.subarray(pos + length) };\n }\n },\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n _int: {\n encode(num2) {\n const { Err: E2 } = DER;\n if (num2 < _0n5)\n throw new E2(\"integer: negative integers are not allowed\");\n let hex = numberToHexUnpadded(num2);\n if (Number.parseInt(hex[0], 16) & 8)\n hex = \"00\" + hex;\n if (hex.length & 1)\n throw new E2(\"unexpected DER parsing assertion: unpadded hex\");\n return hex;\n },\n decode(data) {\n const { Err: E2 } = DER;\n if (data[0] & 128)\n throw new E2(\"invalid signature integer: negative\");\n if (data[0] === 0 && !(data[1] & 128))\n throw new E2(\"invalid signature integer: unnecessary leading zero\");\n return bytesToNumberBE(data);\n }\n },\n toSig(hex) {\n const { Err: E2, _int: int, _tlv: tlv } = DER;\n const data = ensureBytes(\"signature\", hex);\n const { v: seqBytes, l: seqLeftBytes } = tlv.decode(48, data);\n if (seqLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n const { v: rBytes, l: rLeftBytes } = tlv.decode(2, seqBytes);\n const { v: sBytes, l: sLeftBytes } = tlv.decode(2, rLeftBytes);\n if (sLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n return { r: int.decode(rBytes), s: int.decode(sBytes) };\n },\n hexFromSig(sig) {\n const { _tlv: tlv, _int: int } = DER;\n const rs = tlv.encode(2, int.encode(sig.r));\n const ss = tlv.encode(2, int.encode(sig.s));\n const seq = rs + ss;\n return tlv.encode(48, seq);\n }\n };\n _0n5 = BigInt(0);\n _1n5 = BigInt(1);\n _2n3 = BigInt(2);\n _3n2 = BigInt(3);\n _4n2 = BigInt(4);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/_shortw_utils.js\n function getHash(hash3) {\n return {\n hash: hash3,\n hmac: (key, ...msgs) => hmac(hash3, key, concatBytes(...msgs)),\n randomBytes\n };\n }\n function createCurve(curveDef, defHash) {\n const create2 = (hash3) => weierstrass({ ...curveDef, ...getHash(hash3) });\n return { ...create2(defHash), create: create2 };\n }\n var init_shortw_utils = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/_shortw_utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hmac();\n init_utils3();\n init_weierstrass();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/hash-to-curve.js\n function i2osp(value, length) {\n anum(value);\n anum(length);\n if (value < 0 || value >= 1 << 8 * length)\n throw new Error(\"invalid I2OSP input: \" + value);\n const res = Array.from({ length }).fill(0);\n for (let i3 = length - 1; i3 >= 0; i3--) {\n res[i3] = value & 255;\n value >>>= 8;\n }\n return new Uint8Array(res);\n }\n function strxor(a3, b4) {\n const arr = new Uint8Array(a3.length);\n for (let i3 = 0; i3 < a3.length; i3++) {\n arr[i3] = a3[i3] ^ b4[i3];\n }\n return arr;\n }\n function anum(item) {\n if (!Number.isSafeInteger(item))\n throw new Error(\"number expected\");\n }\n function expand_message_xmd(msg, DST, lenInBytes, H3) {\n abytes2(msg);\n abytes2(DST);\n anum(lenInBytes);\n if (DST.length > 255)\n DST = H3(concatBytes3(utf8ToBytes2(\"H2C-OVERSIZE-DST-\"), DST));\n const { outputLen: b_in_bytes, blockLen: r_in_bytes } = H3;\n const ell = Math.ceil(lenInBytes / b_in_bytes);\n if (lenInBytes > 65535 || ell > 255)\n throw new Error(\"expand_message_xmd: invalid lenInBytes\");\n const DST_prime = concatBytes3(DST, i2osp(DST.length, 1));\n const Z_pad = i2osp(0, r_in_bytes);\n const l_i_b_str = i2osp(lenInBytes, 2);\n const b4 = new Array(ell);\n const b_0 = H3(concatBytes3(Z_pad, msg, l_i_b_str, i2osp(0, 1), DST_prime));\n b4[0] = H3(concatBytes3(b_0, i2osp(1, 1), DST_prime));\n for (let i3 = 1; i3 <= ell; i3++) {\n const args = [strxor(b_0, b4[i3 - 1]), i2osp(i3 + 1, 1), DST_prime];\n b4[i3] = H3(concatBytes3(...args));\n }\n const pseudo_random_bytes = concatBytes3(...b4);\n return pseudo_random_bytes.slice(0, lenInBytes);\n }\n function expand_message_xof(msg, DST, lenInBytes, k4, H3) {\n abytes2(msg);\n abytes2(DST);\n anum(lenInBytes);\n if (DST.length > 255) {\n const dkLen = Math.ceil(2 * k4 / 8);\n DST = H3.create({ dkLen }).update(utf8ToBytes2(\"H2C-OVERSIZE-DST-\")).update(DST).digest();\n }\n if (lenInBytes > 65535 || DST.length > 255)\n throw new Error(\"expand_message_xof: invalid lenInBytes\");\n return H3.create({ dkLen: lenInBytes }).update(msg).update(i2osp(lenInBytes, 2)).update(DST).update(i2osp(DST.length, 1)).digest();\n }\n function hash_to_field(msg, count, options) {\n validateObject(options, {\n DST: \"stringOrUint8Array\",\n p: \"bigint\",\n m: \"isSafeInteger\",\n k: \"isSafeInteger\",\n hash: \"hash\"\n });\n const { p: p4, k: k4, m: m2, hash: hash3, expand, DST: _DST } = options;\n abytes2(msg);\n anum(count);\n const DST = typeof _DST === \"string\" ? utf8ToBytes2(_DST) : _DST;\n const log2p = p4.toString(2).length;\n const L2 = Math.ceil((log2p + k4) / 8);\n const len_in_bytes = count * m2 * L2;\n let prb;\n if (expand === \"xmd\") {\n prb = expand_message_xmd(msg, DST, len_in_bytes, hash3);\n } else if (expand === \"xof\") {\n prb = expand_message_xof(msg, DST, len_in_bytes, k4, hash3);\n } else if (expand === \"_internal_pass\") {\n prb = msg;\n } else {\n throw new Error('expand must be \"xmd\" or \"xof\"');\n }\n const u2 = new Array(count);\n for (let i3 = 0; i3 < count; i3++) {\n const e2 = new Array(m2);\n for (let j2 = 0; j2 < m2; j2++) {\n const elm_offset = L2 * (j2 + i3 * m2);\n const tv = prb.subarray(elm_offset, elm_offset + L2);\n e2[j2] = mod(os2ip(tv), p4);\n }\n u2[i3] = e2;\n }\n return u2;\n }\n function isogenyMap(field, map) {\n const coeff = map.map((i3) => Array.from(i3).reverse());\n return (x4, y6) => {\n const [xn, xd, yn, yd] = coeff.map((val) => val.reduce((acc, i3) => field.add(field.mul(acc, x4), i3)));\n const [xd_inv, yd_inv] = FpInvertBatch(field, [xd, yd], true);\n x4 = field.mul(xn, xd_inv);\n y6 = field.mul(y6, field.mul(yn, yd_inv));\n return { x: x4, y: y6 };\n };\n }\n function createHasher2(Point3, mapToCurve, defaults) {\n if (typeof mapToCurve !== \"function\")\n throw new Error(\"mapToCurve() must be defined\");\n function map(num2) {\n return Point3.fromAffine(mapToCurve(num2));\n }\n function clear(initial) {\n const P2 = initial.clearCofactor();\n if (P2.equals(Point3.ZERO))\n return Point3.ZERO;\n P2.assertValidity();\n return P2;\n }\n return {\n defaults,\n // Encodes byte string to elliptic curve.\n // hash_to_curve from https://www.rfc-editor.org/rfc/rfc9380#section-3\n hashToCurve(msg, options) {\n const u2 = hash_to_field(msg, 2, { ...defaults, DST: defaults.DST, ...options });\n const u0 = map(u2[0]);\n const u1 = map(u2[1]);\n return clear(u0.add(u1));\n },\n // Encodes byte string to elliptic curve.\n // encode_to_curve from https://www.rfc-editor.org/rfc/rfc9380#section-3\n encodeToCurve(msg, options) {\n const u2 = hash_to_field(msg, 1, { ...defaults, DST: defaults.encodeDST, ...options });\n return clear(map(u2[0]));\n },\n // Same as encodeToCurve, but without hash\n mapToCurve(scalars) {\n if (!Array.isArray(scalars))\n throw new Error(\"expected array of bigints\");\n for (const i3 of scalars)\n if (typeof i3 !== \"bigint\")\n throw new Error(\"expected array of bigints\");\n return clear(map(scalars));\n }\n };\n }\n var os2ip;\n var init_hash_to_curve = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/hash-to-curve.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_modular();\n init_utils5();\n os2ip = bytesToNumberBE;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/secp256k1.js\n var secp256k1_exports = {};\n __export(secp256k1_exports, {\n encodeToCurve: () => encodeToCurve,\n hashToCurve: () => hashToCurve,\n schnorr: () => schnorr,\n secp256k1: () => secp256k1,\n secp256k1_hasher: () => secp256k1_hasher\n });\n function sqrtMod(y6) {\n const P2 = secp256k1P;\n const _3n5 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b22 = y6 * y6 * y6 % P2;\n const b32 = b22 * b22 * y6 % P2;\n const b6 = pow2(b32, _3n5, P2) * b32 % P2;\n const b9 = pow2(b6, _3n5, P2) * b32 % P2;\n const b11 = pow2(b9, _2n4, P2) * b22 % P2;\n const b222 = pow2(b11, _11n, P2) * b11 % P2;\n const b44 = pow2(b222, _22n, P2) * b222 % P2;\n const b88 = pow2(b44, _44n, P2) * b44 % P2;\n const b176 = pow2(b88, _88n, P2) * b88 % P2;\n const b220 = pow2(b176, _44n, P2) * b44 % P2;\n const b223 = pow2(b220, _3n5, P2) * b32 % P2;\n const t1 = pow2(b223, _23n, P2) * b222 % P2;\n const t22 = pow2(t1, _6n, P2) * b22 % P2;\n const root = pow2(t22, _2n4, P2);\n if (!Fpk1.eql(Fpk1.sqr(root), y6))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n function taggedHash(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === void 0) {\n const tagH = sha256(Uint8Array.from(tag, (c4) => c4.charCodeAt(0)));\n tagP = concatBytes3(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes3(tagP, ...messages));\n }\n function schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv);\n let p4 = Point.fromPrivateKey(d_);\n const scalar = p4.hasEvenY() ? d_ : modN(-d_);\n return { scalar, bytes: pointToBytes(p4) };\n }\n function lift_x(x4) {\n aInRange(\"x\", x4, _1n6, secp256k1P);\n const xx = modP(x4 * x4);\n const c4 = modP(xx * x4 + BigInt(7));\n let y6 = sqrtMod(c4);\n if (y6 % _2n4 !== _0n6)\n y6 = modP(-y6);\n const p4 = new Point(x4, y6, _1n6);\n p4.assertValidity();\n return p4;\n }\n function challenge(...args) {\n return modN(num(taggedHash(\"BIP0340/challenge\", ...args)));\n }\n function schnorrGetPublicKey(privateKey) {\n return schnorrGetExtPubKey(privateKey).bytes;\n }\n function schnorrSign(message2, privateKey, auxRand = randomBytes(32)) {\n const m2 = ensureBytes(\"message\", message2);\n const { bytes: px, scalar: d5 } = schnorrGetExtPubKey(privateKey);\n const a3 = ensureBytes(\"auxRand\", auxRand, 32);\n const t3 = numTo32b(d5 ^ num(taggedHash(\"BIP0340/aux\", a3)));\n const rand = taggedHash(\"BIP0340/nonce\", t3, px, m2);\n const k_ = modN(num(rand));\n if (k_ === _0n6)\n throw new Error(\"sign failed: k is zero\");\n const { bytes: rx, scalar: k4 } = schnorrGetExtPubKey(k_);\n const e2 = challenge(rx, px, m2);\n const sig = new Uint8Array(64);\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k4 + e2 * d5)), 32);\n if (!schnorrVerify(sig, m2, px))\n throw new Error(\"sign: Invalid signature produced\");\n return sig;\n }\n function schnorrVerify(signature, message2, publicKey) {\n const sig = ensureBytes(\"signature\", signature, 64);\n const m2 = ensureBytes(\"message\", message2);\n const pub = ensureBytes(\"publicKey\", publicKey, 32);\n try {\n const P2 = lift_x(num(pub));\n const r2 = num(sig.subarray(0, 32));\n if (!inRange(r2, _1n6, secp256k1P))\n return false;\n const s4 = num(sig.subarray(32, 64));\n if (!inRange(s4, _1n6, secp256k1N))\n return false;\n const e2 = challenge(numTo32b(r2), pointToBytes(P2), m2);\n const R3 = GmulAdd(P2, s4, modN(-e2));\n if (!R3 || !R3.hasEvenY() || R3.toAffine().x !== r2)\n return false;\n return true;\n } catch (error) {\n return false;\n }\n }\n var secp256k1P, secp256k1N, _0n6, _1n6, _2n4, divNearest, Fpk1, secp256k1, TAGGED_HASH_PREFIXES, pointToBytes, numTo32b, modP, modN, Point, GmulAdd, num, schnorr, isoMap, mapSWU, secp256k1_hasher, hashToCurve, encodeToCurve;\n var init_secp256k1 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/secp256k1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha2();\n init_utils3();\n init_shortw_utils();\n init_hash_to_curve();\n init_modular();\n init_utils5();\n init_weierstrass();\n secp256k1P = BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\");\n secp256k1N = BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n _0n6 = BigInt(0);\n _1n6 = BigInt(1);\n _2n4 = BigInt(2);\n divNearest = (a3, b4) => (a3 + b4 / _2n4) / b4;\n Fpk1 = Field(secp256k1P, void 0, void 0, { sqrt: sqrtMod });\n secp256k1 = createCurve({\n a: _0n6,\n b: BigInt(7),\n Fp: Fpk1,\n n: secp256k1N,\n Gx: BigInt(\"55066263022277343669578718895168534326250603453777594175500187360389116729240\"),\n Gy: BigInt(\"32670510020758816978083085130507043184471273380659243275938904335757337482424\"),\n h: BigInt(1),\n lowS: true,\n // Allow only low-S signatures by default in sign() and verify()\n endo: {\n // Endomorphism, see above\n beta: BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),\n splitScalar: (k4) => {\n const n2 = secp256k1N;\n const a1 = BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\");\n const b1 = -_1n6 * BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\");\n const a22 = BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\");\n const b22 = a1;\n const POW_2_128 = BigInt(\"0x100000000000000000000000000000000\");\n const c1 = divNearest(b22 * k4, n2);\n const c22 = divNearest(-b1 * k4, n2);\n let k1 = mod(k4 - c1 * a1 - c22 * a22, n2);\n let k22 = mod(-c1 * b1 - c22 * b22, n2);\n const k1neg = k1 > POW_2_128;\n const k2neg = k22 > POW_2_128;\n if (k1neg)\n k1 = n2 - k1;\n if (k2neg)\n k22 = n2 - k22;\n if (k1 > POW_2_128 || k22 > POW_2_128) {\n throw new Error(\"splitScalar: Endomorphism failed, k=\" + k4);\n }\n return { k1neg, k1, k2neg, k2: k22 };\n }\n }\n }, sha256);\n TAGGED_HASH_PREFIXES = {};\n pointToBytes = (point) => point.toRawBytes(true).slice(1);\n numTo32b = (n2) => numberToBytesBE(n2, 32);\n modP = (x4) => mod(x4, secp256k1P);\n modN = (x4) => mod(x4, secp256k1N);\n Point = /* @__PURE__ */ (() => secp256k1.ProjectivePoint)();\n GmulAdd = (Q2, a3, b4) => Point.BASE.multiplyAndAddUnsafe(Q2, a3, b4);\n num = bytesToNumberBE;\n schnorr = /* @__PURE__ */ (() => ({\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n utils: {\n randomPrivateKey: secp256k1.utils.randomPrivateKey,\n lift_x,\n pointToBytes,\n numberToBytesBE,\n bytesToNumberBE,\n taggedHash,\n mod\n }\n }))();\n isoMap = /* @__PURE__ */ (() => isogenyMap(Fpk1, [\n // xNum\n [\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7\",\n \"0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581\",\n \"0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262\",\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c\"\n ],\n // xDen\n [\n \"0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b\",\n \"0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ],\n // yNum\n [\n \"0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c\",\n \"0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3\",\n \"0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931\",\n \"0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84\"\n ],\n // yDen\n [\n \"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b\",\n \"0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573\",\n \"0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ]\n ].map((i3) => i3.map((j2) => BigInt(j2)))))();\n mapSWU = /* @__PURE__ */ (() => mapToCurveSimpleSWU(Fpk1, {\n A: BigInt(\"0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533\"),\n B: BigInt(\"1771\"),\n Z: Fpk1.create(BigInt(\"-11\"))\n }))();\n secp256k1_hasher = /* @__PURE__ */ (() => createHasher2(secp256k1.ProjectivePoint, (scalars) => {\n const { x: x4, y: y6 } = mapSWU(Fpk1.create(scalars[0]));\n return isoMap(x4, y6);\n }, {\n DST: \"secp256k1_XMD:SHA-256_SSWU_RO_\",\n encodeDST: \"secp256k1_XMD:SHA-256_SSWU_NU_\",\n p: Fpk1.ORDER,\n m: 1,\n k: 128,\n expand: \"xmd\",\n hash: sha256\n }))();\n hashToCurve = /* @__PURE__ */ (() => secp256k1_hasher.hashToCurve)();\n encodeToCurve = /* @__PURE__ */ (() => secp256k1_hasher.encodeToCurve)();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/recoverPublicKey.js\n async function recoverPublicKey({ hash: hash3, signature }) {\n const hashHex = isHex(hash3) ? hash3 : toHex(hash3);\n const { secp256k1: secp256k13 } = await Promise.resolve().then(() => (init_secp256k1(), secp256k1_exports));\n const signature_ = (() => {\n if (typeof signature === \"object\" && \"r\" in signature && \"s\" in signature) {\n const { r: r2, s: s4, v: v2, yParity } = signature;\n const yParityOrV2 = Number(yParity ?? v2);\n const recoveryBit2 = toRecoveryBit(yParityOrV2);\n return new secp256k13.Signature(hexToBigInt(r2), hexToBigInt(s4)).addRecoveryBit(recoveryBit2);\n }\n const signatureHex = isHex(signature) ? signature : toHex(signature);\n if (size(signatureHex) !== 65)\n throw new Error(\"invalid signature length\");\n const yParityOrV = hexToNumber(`0x${signatureHex.slice(130)}`);\n const recoveryBit = toRecoveryBit(yParityOrV);\n return secp256k13.Signature.fromCompact(signatureHex.substring(2, 130)).addRecoveryBit(recoveryBit);\n })();\n const publicKey = signature_.recoverPublicKey(hashHex.substring(2)).toHex(false);\n return `0x${publicKey}`;\n }\n function toRecoveryBit(yParityOrV) {\n if (yParityOrV === 0 || yParityOrV === 1)\n return yParityOrV;\n if (yParityOrV === 27)\n return 0;\n if (yParityOrV === 28)\n return 1;\n throw new Error(\"Invalid yParityOrV value\");\n }\n var init_recoverPublicKey = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/recoverPublicKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isHex();\n init_size();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/recoverAddress.js\n async function recoverAddress({ hash: hash3, signature }) {\n return publicKeyToAddress(await recoverPublicKey({ hash: hash3, signature }));\n }\n var init_recoverAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/recoverAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_publicKeyToAddress();\n init_recoverPublicKey();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toRlp.js\n function toRlp(bytes, to = \"hex\") {\n const encodable = getEncodable(bytes);\n const cursor = createCursor(new Uint8Array(encodable.length));\n encodable.encode(cursor);\n if (to === \"hex\")\n return bytesToHex(cursor.bytes);\n return cursor.bytes;\n }\n function getEncodable(bytes) {\n if (Array.isArray(bytes))\n return getEncodableList(bytes.map((x4) => getEncodable(x4)));\n return getEncodableBytes(bytes);\n }\n function getEncodableList(list) {\n const bodyLength = list.reduce((acc, x4) => acc + x4.length, 0);\n const sizeOfBodyLength = getSizeOfLength(bodyLength);\n const length = (() => {\n if (bodyLength <= 55)\n return 1 + bodyLength;\n return 1 + sizeOfBodyLength + bodyLength;\n })();\n return {\n length,\n encode(cursor) {\n if (bodyLength <= 55) {\n cursor.pushByte(192 + bodyLength);\n } else {\n cursor.pushByte(192 + 55 + sizeOfBodyLength);\n if (sizeOfBodyLength === 1)\n cursor.pushUint8(bodyLength);\n else if (sizeOfBodyLength === 2)\n cursor.pushUint16(bodyLength);\n else if (sizeOfBodyLength === 3)\n cursor.pushUint24(bodyLength);\n else\n cursor.pushUint32(bodyLength);\n }\n for (const { encode: encode7 } of list) {\n encode7(cursor);\n }\n }\n };\n }\n function getEncodableBytes(bytesOrHex) {\n const bytes = typeof bytesOrHex === \"string\" ? hexToBytes(bytesOrHex) : bytesOrHex;\n const sizeOfBytesLength = getSizeOfLength(bytes.length);\n const length = (() => {\n if (bytes.length === 1 && bytes[0] < 128)\n return 1;\n if (bytes.length <= 55)\n return 1 + bytes.length;\n return 1 + sizeOfBytesLength + bytes.length;\n })();\n return {\n length,\n encode(cursor) {\n if (bytes.length === 1 && bytes[0] < 128) {\n cursor.pushBytes(bytes);\n } else if (bytes.length <= 55) {\n cursor.pushByte(128 + bytes.length);\n cursor.pushBytes(bytes);\n } else {\n cursor.pushByte(128 + 55 + sizeOfBytesLength);\n if (sizeOfBytesLength === 1)\n cursor.pushUint8(bytes.length);\n else if (sizeOfBytesLength === 2)\n cursor.pushUint16(bytes.length);\n else if (sizeOfBytesLength === 3)\n cursor.pushUint24(bytes.length);\n else\n cursor.pushUint32(bytes.length);\n cursor.pushBytes(bytes);\n }\n }\n };\n }\n function getSizeOfLength(length) {\n if (length < 2 ** 8)\n return 1;\n if (length < 2 ** 16)\n return 2;\n if (length < 2 ** 24)\n return 3;\n if (length < 2 ** 32)\n return 4;\n throw new BaseError2(\"Length is too large.\");\n }\n var init_toRlp = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/encoding/toRlp.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_cursor2();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/hashAuthorization.js\n function hashAuthorization(parameters) {\n const { chainId, nonce, to } = parameters;\n const address = parameters.contractAddress ?? parameters.address;\n const hash3 = keccak256(concatHex([\n \"0x05\",\n toRlp([\n chainId ? numberToHex(chainId) : \"0x\",\n address,\n nonce ? numberToHex(nonce) : \"0x\"\n ])\n ]));\n if (to === \"bytes\")\n return hexToBytes(hash3);\n return hash3;\n }\n var init_hashAuthorization = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/hashAuthorization.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_concat();\n init_toBytes();\n init_toHex();\n init_toRlp();\n init_keccak256();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/recoverAuthorizationAddress.js\n async function recoverAuthorizationAddress(parameters) {\n const { authorization, signature } = parameters;\n return recoverAddress({\n hash: hashAuthorization(authorization),\n signature: signature ?? authorization\n });\n }\n var init_recoverAuthorizationAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/recoverAuthorizationAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_recoverAddress();\n init_hashAuthorization();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/estimateGas.js\n var EstimateGasExecutionError;\n var init_estimateGas = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/estimateGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatEther();\n init_formatGwei();\n init_base();\n init_transaction();\n EstimateGasExecutionError = class extends BaseError2 {\n constructor(cause, { account, docsPath: docsPath8, chain: chain2, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value }) {\n const prettyArgs = prettyPrint({\n from: account?.address,\n to,\n value: typeof value !== \"undefined\" && `${formatEther(value)} ${chain2?.nativeCurrency?.symbol || \"ETH\"}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== \"undefined\" && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== \"undefined\" && `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== \"undefined\" && `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce\n });\n super(cause.shortMessage, {\n cause,\n docsPath: docsPath8,\n metaMessages: [\n ...cause.metaMessages ? [...cause.metaMessages, \" \"] : [],\n \"Estimate Gas Arguments:\",\n prettyArgs\n ].filter(Boolean),\n name: \"EstimateGasExecutionError\"\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/node.js\n var ExecutionRevertedError, FeeCapTooHighError, FeeCapTooLowError, NonceTooHighError, NonceTooLowError, NonceMaxValueError, InsufficientFundsError, IntrinsicGasTooHighError, IntrinsicGasTooLowError, TransactionTypeNotSupportedError, TipAboveFeeCapError, UnknownNodeError;\n var init_node = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/node.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatGwei();\n init_base();\n ExecutionRevertedError = class extends BaseError2 {\n constructor({ cause, message: message2 } = {}) {\n const reason = message2?.replace(\"execution reverted: \", \"\")?.replace(\"execution reverted\", \"\");\n super(`Execution reverted ${reason ? `with reason: ${reason}` : \"for an unknown reason\"}.`, {\n cause,\n name: \"ExecutionRevertedError\"\n });\n }\n };\n Object.defineProperty(ExecutionRevertedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 3\n });\n Object.defineProperty(ExecutionRevertedError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /execution reverted/\n });\n FeeCapTooHighError = class extends BaseError2 {\n constructor({ cause, maxFeePerGas } = {}) {\n super(`The fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : \"\"}) cannot be higher than the maximum allowed value (2^256-1).`, {\n cause,\n name: \"FeeCapTooHighError\"\n });\n }\n };\n Object.defineProperty(FeeCapTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max fee per gas higher than 2\\^256-1|fee cap higher than 2\\^256-1/\n });\n FeeCapTooLowError = class extends BaseError2 {\n constructor({ cause, maxFeePerGas } = {}) {\n super(`The fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)}` : \"\"} gwei) cannot be lower than the block base fee.`, {\n cause,\n name: \"FeeCapTooLowError\"\n });\n }\n };\n Object.defineProperty(FeeCapTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/\n });\n NonceTooHighError = class extends BaseError2 {\n constructor({ cause, nonce } = {}) {\n super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : \"\"}is higher than the next one expected.`, { cause, name: \"NonceTooHighError\" });\n }\n };\n Object.defineProperty(NonceTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce too high/\n });\n NonceTooLowError = class extends BaseError2 {\n constructor({ cause, nonce } = {}) {\n super([\n `Nonce provided for the transaction ${nonce ? `(${nonce}) ` : \"\"}is lower than the current nonce of the account.`,\n \"Try increasing the nonce or find the latest nonce with `getTransactionCount`.\"\n ].join(\"\\n\"), { cause, name: \"NonceTooLowError\" });\n }\n };\n Object.defineProperty(NonceTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce too low|transaction already imported|already known/\n });\n NonceMaxValueError = class extends BaseError2 {\n constructor({ cause, nonce } = {}) {\n super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : \"\"}exceeds the maximum allowed nonce.`, { cause, name: \"NonceMaxValueError\" });\n }\n };\n Object.defineProperty(NonceMaxValueError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce has max value/\n });\n InsufficientFundsError = class extends BaseError2 {\n constructor({ cause } = {}) {\n super([\n \"The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.\"\n ].join(\"\\n\"), {\n cause,\n metaMessages: [\n \"This error could arise when the account does not have enough funds to:\",\n \" - pay for the total gas fee,\",\n \" - pay for the value to send.\",\n \" \",\n \"The cost of the transaction is calculated as `gas * gas fee + value`, where:\",\n \" - `gas` is the amount of gas needed for transaction to execute,\",\n \" - `gas fee` is the gas fee,\",\n \" - `value` is the amount of ether to send to the recipient.\"\n ],\n name: \"InsufficientFundsError\"\n });\n }\n };\n Object.defineProperty(InsufficientFundsError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /insufficient funds|exceeds transaction sender account balance/\n });\n IntrinsicGasTooHighError = class extends BaseError2 {\n constructor({ cause, gas } = {}) {\n super(`The amount of gas ${gas ? `(${gas}) ` : \"\"}provided for the transaction exceeds the limit allowed for the block.`, {\n cause,\n name: \"IntrinsicGasTooHighError\"\n });\n }\n };\n Object.defineProperty(IntrinsicGasTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /intrinsic gas too high|gas limit reached/\n });\n IntrinsicGasTooLowError = class extends BaseError2 {\n constructor({ cause, gas } = {}) {\n super(`The amount of gas ${gas ? `(${gas}) ` : \"\"}provided for the transaction is too low.`, {\n cause,\n name: \"IntrinsicGasTooLowError\"\n });\n }\n };\n Object.defineProperty(IntrinsicGasTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /intrinsic gas too low/\n });\n TransactionTypeNotSupportedError = class extends BaseError2 {\n constructor({ cause }) {\n super(\"The transaction type is not supported for this chain.\", {\n cause,\n name: \"TransactionTypeNotSupportedError\"\n });\n }\n };\n Object.defineProperty(TransactionTypeNotSupportedError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /transaction type not valid/\n });\n TipAboveFeeCapError = class extends BaseError2 {\n constructor({ cause, maxPriorityFeePerGas, maxFeePerGas } = {}) {\n super([\n `The provided tip (\\`maxPriorityFeePerGas\\`${maxPriorityFeePerGas ? ` = ${formatGwei(maxPriorityFeePerGas)} gwei` : \"\"}) cannot be higher than the fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : \"\"}).`\n ].join(\"\\n\"), {\n cause,\n name: \"TipAboveFeeCapError\"\n });\n }\n };\n Object.defineProperty(TipAboveFeeCapError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/\n });\n UnknownNodeError = class extends BaseError2 {\n constructor({ cause }) {\n super(`An error occurred while executing: ${cause?.shortMessage}`, {\n cause,\n name: \"UnknownNodeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getNodeError.js\n function getNodeError(err, args) {\n const message2 = (err.details || \"\").toLowerCase();\n const executionRevertedError = err instanceof BaseError2 ? err.walk((e2) => e2?.code === ExecutionRevertedError.code) : err;\n if (executionRevertedError instanceof BaseError2)\n return new ExecutionRevertedError({\n cause: err,\n message: executionRevertedError.details\n });\n if (ExecutionRevertedError.nodeMessage.test(message2))\n return new ExecutionRevertedError({\n cause: err,\n message: err.details\n });\n if (FeeCapTooHighError.nodeMessage.test(message2))\n return new FeeCapTooHighError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas\n });\n if (FeeCapTooLowError.nodeMessage.test(message2))\n return new FeeCapTooLowError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas\n });\n if (NonceTooHighError.nodeMessage.test(message2))\n return new NonceTooHighError({ cause: err, nonce: args?.nonce });\n if (NonceTooLowError.nodeMessage.test(message2))\n return new NonceTooLowError({ cause: err, nonce: args?.nonce });\n if (NonceMaxValueError.nodeMessage.test(message2))\n return new NonceMaxValueError({ cause: err, nonce: args?.nonce });\n if (InsufficientFundsError.nodeMessage.test(message2))\n return new InsufficientFundsError({ cause: err });\n if (IntrinsicGasTooHighError.nodeMessage.test(message2))\n return new IntrinsicGasTooHighError({ cause: err, gas: args?.gas });\n if (IntrinsicGasTooLowError.nodeMessage.test(message2))\n return new IntrinsicGasTooLowError({ cause: err, gas: args?.gas });\n if (TransactionTypeNotSupportedError.nodeMessage.test(message2))\n return new TransactionTypeNotSupportedError({ cause: err });\n if (TipAboveFeeCapError.nodeMessage.test(message2))\n return new TipAboveFeeCapError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n maxPriorityFeePerGas: args?.maxPriorityFeePerGas\n });\n return new UnknownNodeError({\n cause: err\n });\n }\n var init_getNodeError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getNodeError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_node();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getEstimateGasError.js\n function getEstimateGasError(err, { docsPath: docsPath8, ...args }) {\n const cause = (() => {\n const cause2 = getNodeError(err, args);\n if (cause2 instanceof UnknownNodeError)\n return err;\n return cause2;\n })();\n return new EstimateGasExecutionError(cause, {\n docsPath: docsPath8,\n ...args\n });\n }\n var init_getEstimateGasError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getEstimateGasError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_estimateGas();\n init_node();\n init_getNodeError();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/extract.js\n function extract(value_, { format }) {\n if (!format)\n return {};\n const value = {};\n function extract_(formatted2) {\n const keys = Object.keys(formatted2);\n for (const key of keys) {\n if (key in value_)\n value[key] = value_[key];\n if (formatted2[key] && typeof formatted2[key] === \"object\" && !Array.isArray(formatted2[key]))\n extract_(formatted2[key]);\n }\n }\n const formatted = format(value_ || {});\n extract_(formatted);\n return value;\n }\n var init_extract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/extract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/formatter.js\n function defineFormatter(type, format) {\n return ({ exclude, format: overrides }) => {\n return {\n exclude,\n format: (args, action) => {\n const formatted = format(args, action);\n if (exclude) {\n for (const key of exclude) {\n delete formatted[key];\n }\n }\n return {\n ...formatted,\n ...overrides(args, action)\n };\n },\n type\n };\n };\n }\n var init_formatter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/formatter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transactionRequest.js\n function formatTransactionRequest(request, _2) {\n const rpcRequest = {};\n if (typeof request.authorizationList !== \"undefined\")\n rpcRequest.authorizationList = formatAuthorizationList(request.authorizationList);\n if (typeof request.accessList !== \"undefined\")\n rpcRequest.accessList = request.accessList;\n if (typeof request.blobVersionedHashes !== \"undefined\")\n rpcRequest.blobVersionedHashes = request.blobVersionedHashes;\n if (typeof request.blobs !== \"undefined\") {\n if (typeof request.blobs[0] !== \"string\")\n rpcRequest.blobs = request.blobs.map((x4) => bytesToHex(x4));\n else\n rpcRequest.blobs = request.blobs;\n }\n if (typeof request.data !== \"undefined\")\n rpcRequest.data = request.data;\n if (request.account)\n rpcRequest.from = request.account.address;\n if (typeof request.from !== \"undefined\")\n rpcRequest.from = request.from;\n if (typeof request.gas !== \"undefined\")\n rpcRequest.gas = numberToHex(request.gas);\n if (typeof request.gasPrice !== \"undefined\")\n rpcRequest.gasPrice = numberToHex(request.gasPrice);\n if (typeof request.maxFeePerBlobGas !== \"undefined\")\n rpcRequest.maxFeePerBlobGas = numberToHex(request.maxFeePerBlobGas);\n if (typeof request.maxFeePerGas !== \"undefined\")\n rpcRequest.maxFeePerGas = numberToHex(request.maxFeePerGas);\n if (typeof request.maxPriorityFeePerGas !== \"undefined\")\n rpcRequest.maxPriorityFeePerGas = numberToHex(request.maxPriorityFeePerGas);\n if (typeof request.nonce !== \"undefined\")\n rpcRequest.nonce = numberToHex(request.nonce);\n if (typeof request.to !== \"undefined\")\n rpcRequest.to = request.to;\n if (typeof request.type !== \"undefined\")\n rpcRequest.type = rpcTransactionType[request.type];\n if (typeof request.value !== \"undefined\")\n rpcRequest.value = numberToHex(request.value);\n return rpcRequest;\n }\n function formatAuthorizationList(authorizationList) {\n return authorizationList.map((authorization) => ({\n address: authorization.address,\n r: authorization.r ? numberToHex(BigInt(authorization.r)) : authorization.r,\n s: authorization.s ? numberToHex(BigInt(authorization.s)) : authorization.s,\n chainId: numberToHex(authorization.chainId),\n nonce: numberToHex(authorization.nonce),\n ...typeof authorization.yParity !== \"undefined\" ? { yParity: numberToHex(authorization.yParity) } : {},\n ...typeof authorization.v !== \"undefined\" && typeof authorization.yParity === \"undefined\" ? { v: numberToHex(authorization.v) } : {}\n }));\n }\n var rpcTransactionType;\n var init_transactionRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transactionRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n rpcTransactionType = {\n legacy: \"0x0\",\n eip2930: \"0x1\",\n eip1559: \"0x2\",\n eip4844: \"0x3\",\n eip7702: \"0x4\"\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/stateOverride.js\n function serializeStateMapping(stateMapping) {\n if (!stateMapping || stateMapping.length === 0)\n return void 0;\n return stateMapping.reduce((acc, { slot, value }) => {\n if (slot.length !== 66)\n throw new InvalidBytesLengthError({\n size: slot.length,\n targetSize: 66,\n type: \"hex\"\n });\n if (value.length !== 66)\n throw new InvalidBytesLengthError({\n size: value.length,\n targetSize: 66,\n type: \"hex\"\n });\n acc[slot] = value;\n return acc;\n }, {});\n }\n function serializeAccountStateOverride(parameters) {\n const { balance, nonce, state, stateDiff, code } = parameters;\n const rpcAccountStateOverride = {};\n if (code !== void 0)\n rpcAccountStateOverride.code = code;\n if (balance !== void 0)\n rpcAccountStateOverride.balance = numberToHex(balance);\n if (nonce !== void 0)\n rpcAccountStateOverride.nonce = numberToHex(nonce);\n if (state !== void 0)\n rpcAccountStateOverride.state = serializeStateMapping(state);\n if (stateDiff !== void 0) {\n if (rpcAccountStateOverride.state)\n throw new StateAssignmentConflictError();\n rpcAccountStateOverride.stateDiff = serializeStateMapping(stateDiff);\n }\n return rpcAccountStateOverride;\n }\n function serializeStateOverride(parameters) {\n if (!parameters)\n return void 0;\n const rpcStateOverride = {};\n for (const { address, ...accountState } of parameters) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n if (rpcStateOverride[address])\n throw new AccountStateConflictError({ address });\n rpcStateOverride[address] = serializeAccountStateOverride(accountState);\n }\n return rpcStateOverride;\n }\n var init_stateOverride2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/stateOverride.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_data();\n init_stateOverride();\n init_isAddress();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/number.js\n var maxInt8, maxInt16, maxInt24, maxInt32, maxInt40, maxInt48, maxInt56, maxInt64, maxInt72, maxInt80, maxInt88, maxInt96, maxInt104, maxInt112, maxInt120, maxInt128, maxInt136, maxInt144, maxInt152, maxInt160, maxInt168, maxInt176, maxInt184, maxInt192, maxInt200, maxInt208, maxInt216, maxInt224, maxInt232, maxInt240, maxInt248, maxInt256, minInt8, minInt16, minInt24, minInt32, minInt40, minInt48, minInt56, minInt64, minInt72, minInt80, minInt88, minInt96, minInt104, minInt112, minInt120, minInt128, minInt136, minInt144, minInt152, minInt160, minInt168, minInt176, minInt184, minInt192, minInt200, minInt208, minInt216, minInt224, minInt232, minInt240, minInt248, minInt256, maxUint8, maxUint16, maxUint24, maxUint32, maxUint40, maxUint48, maxUint56, maxUint64, maxUint72, maxUint80, maxUint88, maxUint96, maxUint104, maxUint112, maxUint120, maxUint128, maxUint136, maxUint144, maxUint152, maxUint160, maxUint168, maxUint176, maxUint184, maxUint192, maxUint200, maxUint208, maxUint216, maxUint224, maxUint232, maxUint240, maxUint248, maxUint256;\n var init_number = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/number.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n maxInt8 = 2n ** (8n - 1n) - 1n;\n maxInt16 = 2n ** (16n - 1n) - 1n;\n maxInt24 = 2n ** (24n - 1n) - 1n;\n maxInt32 = 2n ** (32n - 1n) - 1n;\n maxInt40 = 2n ** (40n - 1n) - 1n;\n maxInt48 = 2n ** (48n - 1n) - 1n;\n maxInt56 = 2n ** (56n - 1n) - 1n;\n maxInt64 = 2n ** (64n - 1n) - 1n;\n maxInt72 = 2n ** (72n - 1n) - 1n;\n maxInt80 = 2n ** (80n - 1n) - 1n;\n maxInt88 = 2n ** (88n - 1n) - 1n;\n maxInt96 = 2n ** (96n - 1n) - 1n;\n maxInt104 = 2n ** (104n - 1n) - 1n;\n maxInt112 = 2n ** (112n - 1n) - 1n;\n maxInt120 = 2n ** (120n - 1n) - 1n;\n maxInt128 = 2n ** (128n - 1n) - 1n;\n maxInt136 = 2n ** (136n - 1n) - 1n;\n maxInt144 = 2n ** (144n - 1n) - 1n;\n maxInt152 = 2n ** (152n - 1n) - 1n;\n maxInt160 = 2n ** (160n - 1n) - 1n;\n maxInt168 = 2n ** (168n - 1n) - 1n;\n maxInt176 = 2n ** (176n - 1n) - 1n;\n maxInt184 = 2n ** (184n - 1n) - 1n;\n maxInt192 = 2n ** (192n - 1n) - 1n;\n maxInt200 = 2n ** (200n - 1n) - 1n;\n maxInt208 = 2n ** (208n - 1n) - 1n;\n maxInt216 = 2n ** (216n - 1n) - 1n;\n maxInt224 = 2n ** (224n - 1n) - 1n;\n maxInt232 = 2n ** (232n - 1n) - 1n;\n maxInt240 = 2n ** (240n - 1n) - 1n;\n maxInt248 = 2n ** (248n - 1n) - 1n;\n maxInt256 = 2n ** (256n - 1n) - 1n;\n minInt8 = -(2n ** (8n - 1n));\n minInt16 = -(2n ** (16n - 1n));\n minInt24 = -(2n ** (24n - 1n));\n minInt32 = -(2n ** (32n - 1n));\n minInt40 = -(2n ** (40n - 1n));\n minInt48 = -(2n ** (48n - 1n));\n minInt56 = -(2n ** (56n - 1n));\n minInt64 = -(2n ** (64n - 1n));\n minInt72 = -(2n ** (72n - 1n));\n minInt80 = -(2n ** (80n - 1n));\n minInt88 = -(2n ** (88n - 1n));\n minInt96 = -(2n ** (96n - 1n));\n minInt104 = -(2n ** (104n - 1n));\n minInt112 = -(2n ** (112n - 1n));\n minInt120 = -(2n ** (120n - 1n));\n minInt128 = -(2n ** (128n - 1n));\n minInt136 = -(2n ** (136n - 1n));\n minInt144 = -(2n ** (144n - 1n));\n minInt152 = -(2n ** (152n - 1n));\n minInt160 = -(2n ** (160n - 1n));\n minInt168 = -(2n ** (168n - 1n));\n minInt176 = -(2n ** (176n - 1n));\n minInt184 = -(2n ** (184n - 1n));\n minInt192 = -(2n ** (192n - 1n));\n minInt200 = -(2n ** (200n - 1n));\n minInt208 = -(2n ** (208n - 1n));\n minInt216 = -(2n ** (216n - 1n));\n minInt224 = -(2n ** (224n - 1n));\n minInt232 = -(2n ** (232n - 1n));\n minInt240 = -(2n ** (240n - 1n));\n minInt248 = -(2n ** (248n - 1n));\n minInt256 = -(2n ** (256n - 1n));\n maxUint8 = 2n ** 8n - 1n;\n maxUint16 = 2n ** 16n - 1n;\n maxUint24 = 2n ** 24n - 1n;\n maxUint32 = 2n ** 32n - 1n;\n maxUint40 = 2n ** 40n - 1n;\n maxUint48 = 2n ** 48n - 1n;\n maxUint56 = 2n ** 56n - 1n;\n maxUint64 = 2n ** 64n - 1n;\n maxUint72 = 2n ** 72n - 1n;\n maxUint80 = 2n ** 80n - 1n;\n maxUint88 = 2n ** 88n - 1n;\n maxUint96 = 2n ** 96n - 1n;\n maxUint104 = 2n ** 104n - 1n;\n maxUint112 = 2n ** 112n - 1n;\n maxUint120 = 2n ** 120n - 1n;\n maxUint128 = 2n ** 128n - 1n;\n maxUint136 = 2n ** 136n - 1n;\n maxUint144 = 2n ** 144n - 1n;\n maxUint152 = 2n ** 152n - 1n;\n maxUint160 = 2n ** 160n - 1n;\n maxUint168 = 2n ** 168n - 1n;\n maxUint176 = 2n ** 176n - 1n;\n maxUint184 = 2n ** 184n - 1n;\n maxUint192 = 2n ** 192n - 1n;\n maxUint200 = 2n ** 200n - 1n;\n maxUint208 = 2n ** 208n - 1n;\n maxUint216 = 2n ** 216n - 1n;\n maxUint224 = 2n ** 224n - 1n;\n maxUint232 = 2n ** 232n - 1n;\n maxUint240 = 2n ** 240n - 1n;\n maxUint248 = 2n ** 248n - 1n;\n maxUint256 = 2n ** 256n - 1n;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/assertRequest.js\n function assertRequest(args) {\n const { account: account_, gasPrice, maxFeePerGas, maxPriorityFeePerGas, to } = args;\n const account = account_ ? parseAccount(account_) : void 0;\n if (account && !isAddress(account.address))\n throw new InvalidAddressError({ address: account.address });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (typeof gasPrice !== \"undefined\" && (typeof maxFeePerGas !== \"undefined\" || typeof maxPriorityFeePerGas !== \"undefined\"))\n throw new FeeConflictError();\n if (maxFeePerGas && maxFeePerGas > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas });\n if (maxPriorityFeePerGas && maxFeePerGas && maxPriorityFeePerGas > maxFeePerGas)\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });\n }\n var init_assertRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/assertRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_number();\n init_address();\n init_node();\n init_transaction();\n init_isAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/fee.js\n var BaseFeeScalarError, Eip1559FeesNotSupportedError, MaxFeePerGasTooLowError;\n var init_fee = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/fee.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatGwei();\n init_base();\n BaseFeeScalarError = class extends BaseError2 {\n constructor() {\n super(\"`baseFeeMultiplier` must be greater than 1.\", {\n name: \"BaseFeeScalarError\"\n });\n }\n };\n Eip1559FeesNotSupportedError = class extends BaseError2 {\n constructor() {\n super(\"Chain does not support EIP-1559 fees.\", {\n name: \"Eip1559FeesNotSupportedError\"\n });\n }\n };\n MaxFeePerGasTooLowError = class extends BaseError2 {\n constructor({ maxPriorityFeePerGas }) {\n super(`\\`maxFeePerGas\\` cannot be less than the \\`maxPriorityFeePerGas\\` (${formatGwei(maxPriorityFeePerGas)} gwei).`, { name: \"MaxFeePerGasTooLowError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/block.js\n var BlockNotFoundError;\n var init_block = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/block.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n BlockNotFoundError = class extends BaseError2 {\n constructor({ blockHash, blockNumber }) {\n let identifier = \"Block\";\n if (blockHash)\n identifier = `Block at hash \"${blockHash}\"`;\n if (blockNumber)\n identifier = `Block at number \"${blockNumber}\"`;\n super(`${identifier} could not be found.`, { name: \"BlockNotFoundError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transaction.js\n function formatTransaction(transaction, _2) {\n const transaction_ = {\n ...transaction,\n blockHash: transaction.blockHash ? transaction.blockHash : null,\n blockNumber: transaction.blockNumber ? BigInt(transaction.blockNumber) : null,\n chainId: transaction.chainId ? hexToNumber(transaction.chainId) : void 0,\n gas: transaction.gas ? BigInt(transaction.gas) : void 0,\n gasPrice: transaction.gasPrice ? BigInt(transaction.gasPrice) : void 0,\n maxFeePerBlobGas: transaction.maxFeePerBlobGas ? BigInt(transaction.maxFeePerBlobGas) : void 0,\n maxFeePerGas: transaction.maxFeePerGas ? BigInt(transaction.maxFeePerGas) : void 0,\n maxPriorityFeePerGas: transaction.maxPriorityFeePerGas ? BigInt(transaction.maxPriorityFeePerGas) : void 0,\n nonce: transaction.nonce ? hexToNumber(transaction.nonce) : void 0,\n to: transaction.to ? transaction.to : null,\n transactionIndex: transaction.transactionIndex ? Number(transaction.transactionIndex) : null,\n type: transaction.type ? transactionType[transaction.type] : void 0,\n typeHex: transaction.type ? transaction.type : void 0,\n value: transaction.value ? BigInt(transaction.value) : void 0,\n v: transaction.v ? BigInt(transaction.v) : void 0\n };\n if (transaction.authorizationList)\n transaction_.authorizationList = formatAuthorizationList2(transaction.authorizationList);\n transaction_.yParity = (() => {\n if (transaction.yParity)\n return Number(transaction.yParity);\n if (typeof transaction_.v === \"bigint\") {\n if (transaction_.v === 0n || transaction_.v === 27n)\n return 0;\n if (transaction_.v === 1n || transaction_.v === 28n)\n return 1;\n if (transaction_.v >= 35n)\n return transaction_.v % 2n === 0n ? 1 : 0;\n }\n return void 0;\n })();\n if (transaction_.type === \"legacy\") {\n delete transaction_.accessList;\n delete transaction_.maxFeePerBlobGas;\n delete transaction_.maxFeePerGas;\n delete transaction_.maxPriorityFeePerGas;\n delete transaction_.yParity;\n }\n if (transaction_.type === \"eip2930\") {\n delete transaction_.maxFeePerBlobGas;\n delete transaction_.maxFeePerGas;\n delete transaction_.maxPriorityFeePerGas;\n }\n if (transaction_.type === \"eip1559\") {\n delete transaction_.maxFeePerBlobGas;\n }\n return transaction_;\n }\n function formatAuthorizationList2(authorizationList) {\n return authorizationList.map((authorization) => ({\n address: authorization.address,\n chainId: Number(authorization.chainId),\n nonce: Number(authorization.nonce),\n r: authorization.r,\n s: authorization.s,\n yParity: Number(authorization.yParity)\n }));\n }\n var transactionType, defineTransaction;\n var init_transaction2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_formatter();\n transactionType = {\n \"0x0\": \"legacy\",\n \"0x1\": \"eip2930\",\n \"0x2\": \"eip1559\",\n \"0x3\": \"eip4844\",\n \"0x4\": \"eip7702\"\n };\n defineTransaction = /* @__PURE__ */ defineFormatter(\"transaction\", formatTransaction);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/block.js\n function formatBlock(block, _2) {\n const transactions = (block.transactions ?? []).map((transaction) => {\n if (typeof transaction === \"string\")\n return transaction;\n return formatTransaction(transaction);\n });\n return {\n ...block,\n baseFeePerGas: block.baseFeePerGas ? BigInt(block.baseFeePerGas) : null,\n blobGasUsed: block.blobGasUsed ? BigInt(block.blobGasUsed) : void 0,\n difficulty: block.difficulty ? BigInt(block.difficulty) : void 0,\n excessBlobGas: block.excessBlobGas ? BigInt(block.excessBlobGas) : void 0,\n gasLimit: block.gasLimit ? BigInt(block.gasLimit) : void 0,\n gasUsed: block.gasUsed ? BigInt(block.gasUsed) : void 0,\n hash: block.hash ? block.hash : null,\n logsBloom: block.logsBloom ? block.logsBloom : null,\n nonce: block.nonce ? block.nonce : null,\n number: block.number ? BigInt(block.number) : null,\n size: block.size ? BigInt(block.size) : void 0,\n timestamp: block.timestamp ? BigInt(block.timestamp) : void 0,\n transactions,\n totalDifficulty: block.totalDifficulty ? BigInt(block.totalDifficulty) : null\n };\n }\n var defineBlock;\n var init_block2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/block.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_formatter();\n init_transaction2();\n defineBlock = /* @__PURE__ */ defineFormatter(\"block\", formatBlock);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlock.js\n async function getBlock(client, { blockHash, blockNumber, blockTag = client.experimental_blockTag ?? \"latest\", includeTransactions: includeTransactions_ } = {}) {\n const includeTransactions = includeTransactions_ ?? false;\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n let block = null;\n if (blockHash) {\n block = await client.request({\n method: \"eth_getBlockByHash\",\n params: [blockHash, includeTransactions]\n }, { dedupe: true });\n } else {\n block = await client.request({\n method: \"eth_getBlockByNumber\",\n params: [blockNumberHex || blockTag, includeTransactions]\n }, { dedupe: Boolean(blockNumberHex) });\n }\n if (!block)\n throw new BlockNotFoundError({ blockHash, blockNumber });\n const format = client.chain?.formatters?.block?.format || formatBlock;\n return format(block, \"getBlock\");\n }\n var init_getBlock = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlock.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_block();\n init_toHex();\n init_block2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getGasPrice.js\n async function getGasPrice(client) {\n const gasPrice = await client.request({\n method: \"eth_gasPrice\"\n });\n return BigInt(gasPrice);\n }\n var init_getGasPrice = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getGasPrice.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateMaxPriorityFeePerGas.js\n async function estimateMaxPriorityFeePerGas(client, args) {\n return internal_estimateMaxPriorityFeePerGas(client, args);\n }\n async function internal_estimateMaxPriorityFeePerGas(client, args) {\n const { block: block_, chain: chain2 = client.chain, request } = args || {};\n try {\n const maxPriorityFeePerGas = chain2?.fees?.maxPriorityFeePerGas ?? chain2?.fees?.defaultPriorityFee;\n if (typeof maxPriorityFeePerGas === \"function\") {\n const block = block_ || await getAction(client, getBlock, \"getBlock\")({});\n const maxPriorityFeePerGas_ = await maxPriorityFeePerGas({\n block,\n client,\n request\n });\n if (maxPriorityFeePerGas_ === null)\n throw new Error();\n return maxPriorityFeePerGas_;\n }\n if (typeof maxPriorityFeePerGas !== \"undefined\")\n return maxPriorityFeePerGas;\n const maxPriorityFeePerGasHex = await client.request({\n method: \"eth_maxPriorityFeePerGas\"\n });\n return hexToBigInt(maxPriorityFeePerGasHex);\n } catch {\n const [block, gasPrice] = await Promise.all([\n block_ ? Promise.resolve(block_) : getAction(client, getBlock, \"getBlock\")({}),\n getAction(client, getGasPrice, \"getGasPrice\")({})\n ]);\n if (typeof block.baseFeePerGas !== \"bigint\")\n throw new Eip1559FeesNotSupportedError();\n const maxPriorityFeePerGas = gasPrice - block.baseFeePerGas;\n if (maxPriorityFeePerGas < 0n)\n return 0n;\n return maxPriorityFeePerGas;\n }\n }\n var init_estimateMaxPriorityFeePerGas = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateMaxPriorityFeePerGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fee();\n init_fromHex();\n init_getAction();\n init_getBlock();\n init_getGasPrice();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateFeesPerGas.js\n async function estimateFeesPerGas(client, args) {\n return internal_estimateFeesPerGas(client, args);\n }\n async function internal_estimateFeesPerGas(client, args) {\n const { block: block_, chain: chain2 = client.chain, request, type = \"eip1559\" } = args || {};\n const baseFeeMultiplier = await (async () => {\n if (typeof chain2?.fees?.baseFeeMultiplier === \"function\")\n return chain2.fees.baseFeeMultiplier({\n block: block_,\n client,\n request\n });\n return chain2?.fees?.baseFeeMultiplier ?? 1.2;\n })();\n if (baseFeeMultiplier < 1)\n throw new BaseFeeScalarError();\n const decimals = baseFeeMultiplier.toString().split(\".\")[1]?.length ?? 0;\n const denominator = 10 ** decimals;\n const multiply = (base4) => base4 * BigInt(Math.ceil(baseFeeMultiplier * denominator)) / BigInt(denominator);\n const block = block_ ? block_ : await getAction(client, getBlock, \"getBlock\")({});\n if (typeof chain2?.fees?.estimateFeesPerGas === \"function\") {\n const fees = await chain2.fees.estimateFeesPerGas({\n block: block_,\n client,\n multiply,\n request,\n type\n });\n if (fees !== null)\n return fees;\n }\n if (type === \"eip1559\") {\n if (typeof block.baseFeePerGas !== \"bigint\")\n throw new Eip1559FeesNotSupportedError();\n const maxPriorityFeePerGas = typeof request?.maxPriorityFeePerGas === \"bigint\" ? request.maxPriorityFeePerGas : await internal_estimateMaxPriorityFeePerGas(client, {\n block,\n chain: chain2,\n request\n });\n const baseFeePerGas = multiply(block.baseFeePerGas);\n const maxFeePerGas = request?.maxFeePerGas ?? baseFeePerGas + maxPriorityFeePerGas;\n return {\n maxFeePerGas,\n maxPriorityFeePerGas\n };\n }\n const gasPrice = request?.gasPrice ?? multiply(await getAction(client, getGasPrice, \"getGasPrice\")({}));\n return {\n gasPrice\n };\n }\n var init_estimateFeesPerGas = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateFeesPerGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fee();\n init_getAction();\n init_estimateMaxPriorityFeePerGas();\n init_getBlock();\n init_getGasPrice();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionCount.js\n async function getTransactionCount(client, { address, blockTag = \"latest\", blockNumber }) {\n const count = await client.request({\n method: \"eth_getTransactionCount\",\n params: [\n address,\n typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : blockTag\n ]\n }, {\n dedupe: Boolean(blockNumber)\n });\n return hexToNumber(count);\n }\n var init_getTransactionCount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionCount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/blobsToCommitments.js\n function blobsToCommitments(parameters) {\n const { kzg } = parameters;\n const to = parameters.to ?? (typeof parameters.blobs[0] === \"string\" ? \"hex\" : \"bytes\");\n const blobs = typeof parameters.blobs[0] === \"string\" ? parameters.blobs.map((x4) => hexToBytes(x4)) : parameters.blobs;\n const commitments = [];\n for (const blob of blobs)\n commitments.push(Uint8Array.from(kzg.blobToKzgCommitment(blob)));\n return to === \"bytes\" ? commitments : commitments.map((x4) => bytesToHex(x4));\n }\n var init_blobsToCommitments = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/blobsToCommitments.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/blobsToProofs.js\n function blobsToProofs(parameters) {\n const { kzg } = parameters;\n const to = parameters.to ?? (typeof parameters.blobs[0] === \"string\" ? \"hex\" : \"bytes\");\n const blobs = typeof parameters.blobs[0] === \"string\" ? parameters.blobs.map((x4) => hexToBytes(x4)) : parameters.blobs;\n const commitments = typeof parameters.commitments[0] === \"string\" ? parameters.commitments.map((x4) => hexToBytes(x4)) : parameters.commitments;\n const proofs = [];\n for (let i3 = 0; i3 < blobs.length; i3++) {\n const blob = blobs[i3];\n const commitment = commitments[i3];\n proofs.push(Uint8Array.from(kzg.computeBlobKzgProof(blob, commitment)));\n }\n return to === \"bytes\" ? proofs : proofs.map((x4) => bytesToHex(x4));\n }\n var init_blobsToProofs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/blobsToProofs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js\n var sha2562;\n var init_sha256 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha2();\n sha2562 = sha256;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/sha256.js\n function sha2563(value, to_) {\n const to = to_ || \"hex\";\n const bytes = sha2562(isHex(value, { strict: false }) ? toBytes(value) : value);\n if (to === \"bytes\")\n return bytes;\n return toHex(bytes);\n }\n var init_sha2562 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/hash/sha256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha256();\n init_isHex();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js\n function commitmentToVersionedHash(parameters) {\n const { commitment, version: version7 = 1 } = parameters;\n const to = parameters.to ?? (typeof commitment === \"string\" ? \"hex\" : \"bytes\");\n const versionedHash = sha2563(commitment, \"bytes\");\n versionedHash.set([version7], 0);\n return to === \"bytes\" ? versionedHash : bytesToHex(versionedHash);\n }\n var init_commitmentToVersionedHash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_sha2562();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js\n function commitmentsToVersionedHashes(parameters) {\n const { commitments, version: version7 } = parameters;\n const to = parameters.to ?? (typeof commitments[0] === \"string\" ? \"hex\" : \"bytes\");\n const hashes = [];\n for (const commitment of commitments) {\n hashes.push(commitmentToVersionedHash({\n commitment,\n to,\n version: version7\n }));\n }\n return hashes;\n }\n var init_commitmentsToVersionedHashes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_commitmentToVersionedHash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/blob.js\n var blobsPerTransaction, bytesPerFieldElement, fieldElementsPerBlob, bytesPerBlob, maxBytesPerTransaction;\n var init_blob = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/blob.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n blobsPerTransaction = 6;\n bytesPerFieldElement = 32;\n fieldElementsPerBlob = 4096;\n bytesPerBlob = bytesPerFieldElement * fieldElementsPerBlob;\n maxBytesPerTransaction = bytesPerBlob * blobsPerTransaction - // terminator byte (0x80).\n 1 - // zero byte (0x00) appended to each field element.\n 1 * fieldElementsPerBlob * blobsPerTransaction;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/kzg.js\n var versionedHashVersionKzg;\n var init_kzg = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/kzg.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n versionedHashVersionKzg = 1;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/blob.js\n var BlobSizeTooLargeError, EmptyBlobError, InvalidVersionedHashSizeError, InvalidVersionedHashVersionError;\n var init_blob2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/blob.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_kzg();\n init_base();\n BlobSizeTooLargeError = class extends BaseError2 {\n constructor({ maxSize, size: size6 }) {\n super(\"Blob size is too large.\", {\n metaMessages: [`Max: ${maxSize} bytes`, `Given: ${size6} bytes`],\n name: \"BlobSizeTooLargeError\"\n });\n }\n };\n EmptyBlobError = class extends BaseError2 {\n constructor() {\n super(\"Blob data must not be empty.\", { name: \"EmptyBlobError\" });\n }\n };\n InvalidVersionedHashSizeError = class extends BaseError2 {\n constructor({ hash: hash3, size: size6 }) {\n super(`Versioned hash \"${hash3}\" size is invalid.`, {\n metaMessages: [\"Expected: 32\", `Received: ${size6}`],\n name: \"InvalidVersionedHashSizeError\"\n });\n }\n };\n InvalidVersionedHashVersionError = class extends BaseError2 {\n constructor({ hash: hash3, version: version7 }) {\n super(`Versioned hash \"${hash3}\" version is invalid.`, {\n metaMessages: [\n `Expected: ${versionedHashVersionKzg}`,\n `Received: ${version7}`\n ],\n name: \"InvalidVersionedHashVersionError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/toBlobs.js\n function toBlobs(parameters) {\n const to = parameters.to ?? (typeof parameters.data === \"string\" ? \"hex\" : \"bytes\");\n const data = typeof parameters.data === \"string\" ? hexToBytes(parameters.data) : parameters.data;\n const size_ = size(data);\n if (!size_)\n throw new EmptyBlobError();\n if (size_ > maxBytesPerTransaction)\n throw new BlobSizeTooLargeError({\n maxSize: maxBytesPerTransaction,\n size: size_\n });\n const blobs = [];\n let active = true;\n let position = 0;\n while (active) {\n const blob = createCursor(new Uint8Array(bytesPerBlob));\n let size6 = 0;\n while (size6 < fieldElementsPerBlob) {\n const bytes = data.slice(position, position + (bytesPerFieldElement - 1));\n blob.pushByte(0);\n blob.pushBytes(bytes);\n if (bytes.length < 31) {\n blob.pushByte(128);\n active = false;\n break;\n }\n size6++;\n position += 31;\n }\n blobs.push(blob);\n }\n return to === \"bytes\" ? blobs.map((x4) => x4.bytes) : blobs.map((x4) => bytesToHex(x4.bytes));\n }\n var init_toBlobs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/toBlobs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_blob();\n init_blob2();\n init_cursor2();\n init_size();\n init_toBytes();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/toBlobSidecars.js\n function toBlobSidecars(parameters) {\n const { data, kzg, to } = parameters;\n const blobs = parameters.blobs ?? toBlobs({ data, to });\n const commitments = parameters.commitments ?? blobsToCommitments({ blobs, kzg, to });\n const proofs = parameters.proofs ?? blobsToProofs({ blobs, commitments, kzg, to });\n const sidecars = [];\n for (let i3 = 0; i3 < blobs.length; i3++)\n sidecars.push({\n blob: blobs[i3],\n commitment: commitments[i3],\n proof: proofs[i3]\n });\n return sidecars;\n }\n var init_toBlobSidecars = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/blob/toBlobSidecars.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_blobsToCommitments();\n init_blobsToProofs();\n init_toBlobs();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/getTransactionType.js\n function getTransactionType(transaction) {\n if (transaction.type)\n return transaction.type;\n if (typeof transaction.authorizationList !== \"undefined\")\n return \"eip7702\";\n if (typeof transaction.blobs !== \"undefined\" || typeof transaction.blobVersionedHashes !== \"undefined\" || typeof transaction.maxFeePerBlobGas !== \"undefined\" || typeof transaction.sidecars !== \"undefined\")\n return \"eip4844\";\n if (typeof transaction.maxFeePerGas !== \"undefined\" || typeof transaction.maxPriorityFeePerGas !== \"undefined\") {\n return \"eip1559\";\n }\n if (typeof transaction.gasPrice !== \"undefined\") {\n if (typeof transaction.accessList !== \"undefined\")\n return \"eip2930\";\n return \"legacy\";\n }\n throw new InvalidSerializableTransactionError({ transaction });\n }\n var init_getTransactionType = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/getTransactionType.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getChainId.js\n async function getChainId(client) {\n const chainIdHex = await client.request({\n method: \"eth_chainId\"\n }, { dedupe: true });\n return hexToNumber(chainIdHex);\n }\n var init_getChainId = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getChainId.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/prepareTransactionRequest.js\n async function prepareTransactionRequest(client, args) {\n const { account: account_ = client.account, blobs, chain: chain2, gas, kzg, nonce, nonceManager, parameters = defaultParameters, type } = args;\n const account = account_ ? parseAccount(account_) : account_;\n const request = { ...args, ...account ? { from: account?.address } : {} };\n let block;\n async function getBlock2() {\n if (block)\n return block;\n block = await getAction(client, getBlock, \"getBlock\")({ blockTag: \"latest\" });\n return block;\n }\n let chainId;\n async function getChainId2() {\n if (chainId)\n return chainId;\n if (chain2)\n return chain2.id;\n if (typeof args.chainId !== \"undefined\")\n return args.chainId;\n const chainId_ = await getAction(client, getChainId, \"getChainId\")({});\n chainId = chainId_;\n return chainId;\n }\n if (parameters.includes(\"nonce\") && typeof nonce === \"undefined\" && account) {\n if (nonceManager) {\n const chainId2 = await getChainId2();\n request.nonce = await nonceManager.consume({\n address: account.address,\n chainId: chainId2,\n client\n });\n } else {\n request.nonce = await getAction(client, getTransactionCount, \"getTransactionCount\")({\n address: account.address,\n blockTag: \"pending\"\n });\n }\n }\n if ((parameters.includes(\"blobVersionedHashes\") || parameters.includes(\"sidecars\")) && blobs && kzg) {\n const commitments = blobsToCommitments({ blobs, kzg });\n if (parameters.includes(\"blobVersionedHashes\")) {\n const versionedHashes = commitmentsToVersionedHashes({\n commitments,\n to: \"hex\"\n });\n request.blobVersionedHashes = versionedHashes;\n }\n if (parameters.includes(\"sidecars\")) {\n const proofs = blobsToProofs({ blobs, commitments, kzg });\n const sidecars = toBlobSidecars({\n blobs,\n commitments,\n proofs,\n to: \"hex\"\n });\n request.sidecars = sidecars;\n }\n }\n if (parameters.includes(\"chainId\"))\n request.chainId = await getChainId2();\n if ((parameters.includes(\"fees\") || parameters.includes(\"type\")) && typeof type === \"undefined\") {\n try {\n request.type = getTransactionType(request);\n } catch {\n let isEip1559Network = eip1559NetworkCache.get(client.uid);\n if (typeof isEip1559Network === \"undefined\") {\n const block2 = await getBlock2();\n isEip1559Network = typeof block2?.baseFeePerGas === \"bigint\";\n eip1559NetworkCache.set(client.uid, isEip1559Network);\n }\n request.type = isEip1559Network ? \"eip1559\" : \"legacy\";\n }\n }\n if (parameters.includes(\"fees\")) {\n if (request.type !== \"legacy\" && request.type !== \"eip2930\") {\n if (typeof request.maxFeePerGas === \"undefined\" || typeof request.maxPriorityFeePerGas === \"undefined\") {\n const block2 = await getBlock2();\n const { maxFeePerGas, maxPriorityFeePerGas } = await internal_estimateFeesPerGas(client, {\n block: block2,\n chain: chain2,\n request\n });\n if (typeof args.maxPriorityFeePerGas === \"undefined\" && args.maxFeePerGas && args.maxFeePerGas < maxPriorityFeePerGas)\n throw new MaxFeePerGasTooLowError({\n maxPriorityFeePerGas\n });\n request.maxPriorityFeePerGas = maxPriorityFeePerGas;\n request.maxFeePerGas = maxFeePerGas;\n }\n } else {\n if (typeof args.maxFeePerGas !== \"undefined\" || typeof args.maxPriorityFeePerGas !== \"undefined\")\n throw new Eip1559FeesNotSupportedError();\n if (typeof args.gasPrice === \"undefined\") {\n const block2 = await getBlock2();\n const { gasPrice: gasPrice_ } = await internal_estimateFeesPerGas(client, {\n block: block2,\n chain: chain2,\n request,\n type: \"legacy\"\n });\n request.gasPrice = gasPrice_;\n }\n }\n }\n if (parameters.includes(\"gas\") && typeof gas === \"undefined\")\n request.gas = await getAction(client, estimateGas, \"estimateGas\")({\n ...request,\n account,\n prepare: account?.type === \"local\" ? [] : [\"blobVersionedHashes\"]\n });\n assertRequest(request);\n delete request.parameters;\n return request;\n }\n var defaultParameters, eip1559NetworkCache;\n var init_prepareTransactionRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/prepareTransactionRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_estimateFeesPerGas();\n init_estimateGas2();\n init_getBlock();\n init_getTransactionCount();\n init_fee();\n init_blobsToCommitments();\n init_blobsToProofs();\n init_commitmentsToVersionedHashes();\n init_toBlobSidecars();\n init_getAction();\n init_assertRequest();\n init_getTransactionType();\n init_getChainId();\n defaultParameters = [\n \"blobVersionedHashes\",\n \"chainId\",\n \"fees\",\n \"gas\",\n \"nonce\",\n \"type\"\n ];\n eip1559NetworkCache = /* @__PURE__ */ new Map();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateGas.js\n async function estimateGas(client, args) {\n const { account: account_ = client.account, prepare = true } = args;\n const account = account_ ? parseAccount(account_) : void 0;\n const parameters = (() => {\n if (Array.isArray(prepare))\n return prepare;\n if (account?.type !== \"local\")\n return [\"blobVersionedHashes\"];\n return void 0;\n })();\n try {\n const { accessList, authorizationList, blobs, blobVersionedHashes, blockNumber, blockTag, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, value, stateOverride, ...rest } = prepare ? await prepareTransactionRequest(client, {\n ...args,\n parameters\n }) : args;\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const rpcStateOverride = serializeStateOverride(stateOverride);\n const to = await (async () => {\n if (rest.to)\n return rest.to;\n if (authorizationList && authorizationList.length > 0)\n return await recoverAuthorizationAddress({\n authorization: authorizationList[0]\n }).catch(() => {\n throw new BaseError2(\"`to` is required. Could not infer from `authorizationList`\");\n });\n return void 0;\n })();\n assertRequest(args);\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n account,\n accessList,\n authorizationList,\n blobs,\n blobVersionedHashes,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n value\n }, \"estimateGas\");\n return BigInt(await client.request({\n method: \"eth_estimateGas\",\n params: rpcStateOverride ? [\n request,\n block ?? client.experimental_blockTag ?? \"latest\",\n rpcStateOverride\n ] : block ? [request, block] : [request]\n }));\n } catch (err) {\n throw getEstimateGasError(err, {\n ...args,\n account,\n chain: client.chain\n });\n }\n }\n var init_estimateGas2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_base();\n init_recoverAuthorizationAddress();\n init_toHex();\n init_getEstimateGasError();\n init_extract();\n init_transactionRequest();\n init_stateOverride2();\n init_assertRequest();\n init_prepareTransactionRequest();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateContractGas.js\n async function estimateContractGas(client, parameters) {\n const { abi: abi2, address, args, functionName, dataSuffix, ...request } = parameters;\n const data = encodeFunctionData({\n abi: abi2,\n args,\n functionName\n });\n try {\n const gas = await getAction(client, estimateGas, \"estimateGas\")({\n data: `${data}${dataSuffix ? dataSuffix.replace(\"0x\", \"\") : \"\"}`,\n to: address,\n ...request\n });\n return gas;\n } catch (error) {\n const account = request.account ? parseAccount(request.account) : void 0;\n throw getContractError(error, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/estimateContractGas\",\n functionName,\n sender: account?.address\n });\n }\n }\n var init_estimateContractGas = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/estimateContractGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_encodeFunctionData();\n init_getContractError();\n init_getAction();\n init_estimateGas2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/isAddressEqual.js\n function isAddressEqual(a3, b4) {\n if (!isAddress(a3, { strict: false }))\n throw new InvalidAddressError({ address: a3 });\n if (!isAddress(b4, { strict: false }))\n throw new InvalidAddressError({ address: b4 });\n return a3.toLowerCase() === b4.toLowerCase();\n }\n var init_isAddressEqual = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/isAddressEqual.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_isAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeEventLog.js\n function decodeEventLog(parameters) {\n const { abi: abi2, data, strict: strict_, topics } = parameters;\n const strict = strict_ ?? true;\n const [signature, ...argTopics] = topics;\n if (!signature)\n throw new AbiEventSignatureEmptyTopicsError({ docsPath: docsPath3 });\n const abiItem = abi2.find((x4) => x4.type === \"event\" && signature === toEventSelector(formatAbiItem2(x4)));\n if (!(abiItem && \"name\" in abiItem) || abiItem.type !== \"event\")\n throw new AbiEventSignatureNotFoundError(signature, { docsPath: docsPath3 });\n const { name, inputs } = abiItem;\n const isUnnamed = inputs?.some((x4) => !(\"name\" in x4 && x4.name));\n const args = isUnnamed ? [] : {};\n const indexedInputs = inputs.map((x4, i3) => [x4, i3]).filter(([x4]) => \"indexed\" in x4 && x4.indexed);\n for (let i3 = 0; i3 < indexedInputs.length; i3++) {\n const [param, argIndex] = indexedInputs[i3];\n const topic = argTopics[i3];\n if (!topic)\n throw new DecodeLogTopicsMismatch({\n abiItem,\n param\n });\n args[isUnnamed ? argIndex : param.name || argIndex] = decodeTopic({\n param,\n value: topic\n });\n }\n const nonIndexedInputs = inputs.filter((x4) => !(\"indexed\" in x4 && x4.indexed));\n if (nonIndexedInputs.length > 0) {\n if (data && data !== \"0x\") {\n try {\n const decodedData = decodeAbiParameters(nonIndexedInputs, data);\n if (decodedData) {\n if (isUnnamed)\n for (let i3 = 0; i3 < inputs.length; i3++)\n args[i3] = args[i3] ?? decodedData.shift();\n else\n for (let i3 = 0; i3 < nonIndexedInputs.length; i3++)\n args[nonIndexedInputs[i3].name] = decodedData[i3];\n }\n } catch (err) {\n if (strict) {\n if (err instanceof AbiDecodingDataSizeTooSmallError || err instanceof PositionOutOfBoundsError)\n throw new DecodeLogDataMismatch({\n abiItem,\n data,\n params: nonIndexedInputs,\n size: size(data)\n });\n throw err;\n }\n }\n } else if (strict) {\n throw new DecodeLogDataMismatch({\n abiItem,\n data: \"0x\",\n params: nonIndexedInputs,\n size: 0\n });\n }\n }\n return {\n eventName: name,\n args: Object.values(args).length > 0 ? args : void 0\n };\n }\n function decodeTopic({ param, value }) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.type === \"tuple\" || param.type.match(/^(.*)\\[(\\d+)?\\]$/))\n return value;\n const decodedArg = decodeAbiParameters([param], value) || [];\n return decodedArg[0];\n }\n var docsPath3;\n var init_decodeEventLog = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeEventLog.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_cursor();\n init_size();\n init_toEventSelector();\n init_decodeAbiParameters();\n init_formatAbiItem2();\n docsPath3 = \"/docs/contract/decodeEventLog\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/parseEventLogs.js\n function parseEventLogs(parameters) {\n const { abi: abi2, args, logs, strict = true } = parameters;\n const eventName = (() => {\n if (!parameters.eventName)\n return void 0;\n if (Array.isArray(parameters.eventName))\n return parameters.eventName;\n return [parameters.eventName];\n })();\n return logs.map((log) => {\n try {\n const abiItem = abi2.find((abiItem2) => abiItem2.type === \"event\" && log.topics[0] === toEventSelector(abiItem2));\n if (!abiItem)\n return null;\n const event = decodeEventLog({\n ...log,\n abi: [abiItem],\n strict\n });\n if (eventName && !eventName.includes(event.eventName))\n return null;\n if (!includesArgs({\n args: event.args,\n inputs: abiItem.inputs,\n matchArgs: args\n }))\n return null;\n return { ...event, ...log };\n } catch (err) {\n let eventName2;\n let isUnnamed;\n if (err instanceof AbiEventSignatureNotFoundError)\n return null;\n if (err instanceof DecodeLogDataMismatch || err instanceof DecodeLogTopicsMismatch) {\n if (strict)\n return null;\n eventName2 = err.abiItem.name;\n isUnnamed = err.abiItem.inputs?.some((x4) => !(\"name\" in x4 && x4.name));\n }\n return { ...log, args: isUnnamed ? [] : {}, eventName: eventName2 };\n }\n }).filter(Boolean);\n }\n function includesArgs(parameters) {\n const { args, inputs, matchArgs } = parameters;\n if (!matchArgs)\n return true;\n if (!args)\n return false;\n function isEqual2(input, value, arg) {\n try {\n if (input.type === \"address\")\n return isAddressEqual(value, arg);\n if (input.type === \"string\" || input.type === \"bytes\")\n return keccak256(toBytes(value)) === arg;\n return value === arg;\n } catch {\n return false;\n }\n }\n if (Array.isArray(args) && Array.isArray(matchArgs)) {\n return matchArgs.every((value, index2) => {\n if (value === null || value === void 0)\n return true;\n const input = inputs[index2];\n if (!input)\n return false;\n const value_ = Array.isArray(value) ? value : [value];\n return value_.some((value2) => isEqual2(input, value2, args[index2]));\n });\n }\n if (typeof args === \"object\" && !Array.isArray(args) && typeof matchArgs === \"object\" && !Array.isArray(matchArgs))\n return Object.entries(matchArgs).every(([key, value]) => {\n if (value === null || value === void 0)\n return true;\n const input = inputs.find((input2) => input2.name === key);\n if (!input)\n return false;\n const value_ = Array.isArray(value) ? value : [value];\n return value_.some((value2) => isEqual2(input, value2, args[key]));\n });\n return false;\n }\n var init_parseEventLogs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/parseEventLogs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_isAddressEqual();\n init_toBytes();\n init_keccak256();\n init_toEventSelector();\n init_decodeEventLog();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/log.js\n function formatLog(log, { args, eventName } = {}) {\n return {\n ...log,\n blockHash: log.blockHash ? log.blockHash : null,\n blockNumber: log.blockNumber ? BigInt(log.blockNumber) : null,\n logIndex: log.logIndex ? Number(log.logIndex) : null,\n transactionHash: log.transactionHash ? log.transactionHash : null,\n transactionIndex: log.transactionIndex ? Number(log.transactionIndex) : null,\n ...eventName ? { args, eventName } : {}\n };\n }\n var init_log2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/log.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getLogs.js\n async function getLogs(client, { address, blockHash, fromBlock, toBlock, event, events: events_, args, strict: strict_ } = {}) {\n const strict = strict_ ?? false;\n const events = events_ ?? (event ? [event] : void 0);\n let topics = [];\n if (events) {\n const encoded = events.flatMap((event2) => encodeEventTopics({\n abi: [event2],\n eventName: event2.name,\n args: events_ ? void 0 : args\n }));\n topics = [encoded];\n if (event)\n topics = topics[0];\n }\n let logs;\n if (blockHash) {\n logs = await client.request({\n method: \"eth_getLogs\",\n params: [{ address, topics, blockHash }]\n });\n } else {\n logs = await client.request({\n method: \"eth_getLogs\",\n params: [\n {\n address,\n topics,\n fromBlock: typeof fromBlock === \"bigint\" ? numberToHex(fromBlock) : fromBlock,\n toBlock: typeof toBlock === \"bigint\" ? numberToHex(toBlock) : toBlock\n }\n ]\n });\n }\n const formattedLogs = logs.map((log) => formatLog(log));\n if (!events)\n return formattedLogs;\n return parseEventLogs({\n abi: events,\n args,\n logs: formattedLogs,\n strict\n });\n }\n var init_getLogs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getLogs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encodeEventTopics();\n init_parseEventLogs();\n init_toHex();\n init_log2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getContractEvents.js\n async function getContractEvents(client, parameters) {\n const { abi: abi2, address, args, blockHash, eventName, fromBlock, toBlock, strict } = parameters;\n const event = eventName ? getAbiItem({ abi: abi2, name: eventName }) : void 0;\n const events = !event ? abi2.filter((x4) => x4.type === \"event\") : void 0;\n return getAction(client, getLogs, \"getLogs\")({\n address,\n args,\n blockHash,\n event,\n events,\n fromBlock,\n toBlock,\n strict\n });\n }\n var init_getContractEvents = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getContractEvents.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAbiItem();\n init_getAction();\n init_getLogs();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js\n function decodeFunctionResult(parameters) {\n const { abi: abi2, args, functionName, data } = parameters;\n let abiItem = abi2[0];\n if (functionName) {\n const item = getAbiItem({ abi: abi2, args, name: functionName });\n if (!item)\n throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath4 });\n abiItem = item;\n }\n if (abiItem.type !== \"function\")\n throw new AbiFunctionNotFoundError(void 0, { docsPath: docsPath4 });\n if (!abiItem.outputs)\n throw new AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath: docsPath4 });\n const values = decodeAbiParameters(abiItem.outputs, data);\n if (values && values.length > 1)\n return values;\n if (values && values.length === 1)\n return values[0];\n return void 0;\n }\n var docsPath4;\n var init_decodeFunctionResult = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeFunctionResult.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_decodeAbiParameters();\n init_getAbiItem();\n docsPath4 = \"/docs/contract/decodeFunctionResult\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/version.js\n var version4;\n var init_version4 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n version4 = \"0.1.1\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/errors.js\n function getVersion() {\n return version4;\n }\n var init_errors4 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_version4();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Errors.js\n function walk2(err, fn) {\n if (fn?.(err))\n return err;\n if (err && typeof err === \"object\" && \"cause\" in err && err.cause)\n return walk2(err.cause, fn);\n return fn ? null : err;\n }\n var BaseError3;\n var init_Errors = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors4();\n BaseError3 = class _BaseError extends Error {\n constructor(shortMessage, options = {}) {\n const details = (() => {\n if (options.cause instanceof _BaseError) {\n if (options.cause.details)\n return options.cause.details;\n if (options.cause.shortMessage)\n return options.cause.shortMessage;\n }\n if (options.cause && \"details\" in options.cause && typeof options.cause.details === \"string\")\n return options.cause.details;\n if (options.cause?.message)\n return options.cause.message;\n return options.details;\n })();\n const docsPath8 = (() => {\n if (options.cause instanceof _BaseError)\n return options.cause.docsPath || options.docsPath;\n return options.docsPath;\n })();\n const docsBaseUrl = \"https://oxlib.sh\";\n const docs = `${docsBaseUrl}${docsPath8 ?? \"\"}`;\n const message2 = [\n shortMessage || \"An error occurred.\",\n ...options.metaMessages ? [\"\", ...options.metaMessages] : [],\n ...details || docsPath8 ? [\n \"\",\n details ? `Details: ${details}` : void 0,\n docsPath8 ? `See: ${docs}` : void 0\n ] : []\n ].filter((x4) => typeof x4 === \"string\").join(\"\\n\");\n super(message2, options.cause ? { cause: options.cause } : void 0);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"BaseError\"\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: `ox@${getVersion()}`\n });\n this.cause = options.cause;\n this.details = details;\n this.docs = docs;\n this.docsPath = docsPath8;\n this.shortMessage = shortMessage;\n }\n walk(fn) {\n return walk2(this, fn);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/bytes.js\n function assertSize2(bytes, size_) {\n if (size2(bytes) > size_)\n throw new SizeOverflowError2({\n givenSize: size2(bytes),\n maxSize: size_\n });\n }\n function assertStartOffset2(value, start) {\n if (typeof start === \"number\" && start > 0 && start > size2(value) - 1)\n throw new SliceOffsetOutOfBoundsError2({\n offset: start,\n position: \"start\",\n size: size2(value)\n });\n }\n function assertEndOffset2(value, start, end) {\n if (typeof start === \"number\" && typeof end === \"number\" && size2(value) !== end - start) {\n throw new SliceOffsetOutOfBoundsError2({\n offset: end,\n position: \"end\",\n size: size2(value)\n });\n }\n }\n function charCodeToBase162(char) {\n if (char >= charCodeMap2.zero && char <= charCodeMap2.nine)\n return char - charCodeMap2.zero;\n if (char >= charCodeMap2.A && char <= charCodeMap2.F)\n return char - (charCodeMap2.A - 10);\n if (char >= charCodeMap2.a && char <= charCodeMap2.f)\n return char - (charCodeMap2.a - 10);\n return void 0;\n }\n function pad2(bytes, options = {}) {\n const { dir, size: size6 = 32 } = options;\n if (size6 === 0)\n return bytes;\n if (bytes.length > size6)\n throw new SizeExceedsPaddingSizeError2({\n size: bytes.length,\n targetSize: size6,\n type: \"Bytes\"\n });\n const paddedBytes = new Uint8Array(size6);\n for (let i3 = 0; i3 < size6; i3++) {\n const padEnd = dir === \"right\";\n paddedBytes[padEnd ? i3 : size6 - i3 - 1] = bytes[padEnd ? i3 : bytes.length - i3 - 1];\n }\n return paddedBytes;\n }\n function trim2(value, options = {}) {\n const { dir = \"left\" } = options;\n let data = value;\n let sliceLength = 0;\n for (let i3 = 0; i3 < data.length - 1; i3++) {\n if (data[dir === \"left\" ? i3 : data.length - i3 - 1].toString() === \"0\")\n sliceLength++;\n else\n break;\n }\n data = dir === \"left\" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);\n return data;\n }\n var charCodeMap2;\n var init_bytes = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Bytes();\n charCodeMap2 = {\n zero: 48,\n nine: 57,\n A: 65,\n F: 70,\n a: 97,\n f: 102\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/hex.js\n function assertSize3(hex, size_) {\n if (size3(hex) > size_)\n throw new SizeOverflowError3({\n givenSize: size3(hex),\n maxSize: size_\n });\n }\n function assertStartOffset3(value, start) {\n if (typeof start === \"number\" && start > 0 && start > size3(value) - 1)\n throw new SliceOffsetOutOfBoundsError3({\n offset: start,\n position: \"start\",\n size: size3(value)\n });\n }\n function assertEndOffset3(value, start, end) {\n if (typeof start === \"number\" && typeof end === \"number\" && size3(value) !== end - start) {\n throw new SliceOffsetOutOfBoundsError3({\n offset: end,\n position: \"end\",\n size: size3(value)\n });\n }\n }\n function pad3(hex_, options = {}) {\n const { dir, size: size6 = 32 } = options;\n if (size6 === 0)\n return hex_;\n const hex = hex_.replace(\"0x\", \"\");\n if (hex.length > size6 * 2)\n throw new SizeExceedsPaddingSizeError3({\n size: Math.ceil(hex.length / 2),\n targetSize: size6,\n type: \"Hex\"\n });\n return `0x${hex[dir === \"right\" ? \"padEnd\" : \"padStart\"](size6 * 2, \"0\")}`;\n }\n function trim3(value, options = {}) {\n const { dir = \"left\" } = options;\n let data = value.replace(\"0x\", \"\");\n let sliceLength = 0;\n for (let i3 = 0; i3 < data.length - 1; i3++) {\n if (data[dir === \"left\" ? i3 : data.length - i3 - 1].toString() === \"0\")\n sliceLength++;\n else\n break;\n }\n data = dir === \"left\" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);\n if (data === \"0\")\n return \"0x\";\n if (dir === \"right\" && data.length % 2 === 1)\n return `0x${data}0`;\n return `0x${data}`;\n }\n var init_hex = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/hex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Json.js\n function stringify2(value, replacer, space) {\n return JSON.stringify(value, (key, value2) => {\n if (typeof replacer === \"function\")\n return replacer(key, value2);\n if (typeof value2 === \"bigint\")\n return value2.toString() + bigIntSuffix;\n return value2;\n }, space);\n }\n var bigIntSuffix;\n var init_Json = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Json.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n bigIntSuffix = \"#__bigint\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Bytes.js\n function assert2(value) {\n if (value instanceof Uint8Array)\n return;\n if (!value)\n throw new InvalidBytesTypeError(value);\n if (typeof value !== \"object\")\n throw new InvalidBytesTypeError(value);\n if (!(\"BYTES_PER_ELEMENT\" in value))\n throw new InvalidBytesTypeError(value);\n if (value.BYTES_PER_ELEMENT !== 1 || value.constructor.name !== \"Uint8Array\")\n throw new InvalidBytesTypeError(value);\n }\n function from(value) {\n if (value instanceof Uint8Array)\n return value;\n if (typeof value === \"string\")\n return fromHex2(value);\n return fromArray(value);\n }\n function fromArray(value) {\n return value instanceof Uint8Array ? value : new Uint8Array(value);\n }\n function fromHex2(value, options = {}) {\n const { size: size6 } = options;\n let hex = value;\n if (size6) {\n assertSize3(value, size6);\n hex = padRight(value, size6);\n }\n let hexString = hex.slice(2);\n if (hexString.length % 2)\n hexString = `0${hexString}`;\n const length = hexString.length / 2;\n const bytes = new Uint8Array(length);\n for (let index2 = 0, j2 = 0; index2 < length; index2++) {\n const nibbleLeft = charCodeToBase162(hexString.charCodeAt(j2++));\n const nibbleRight = charCodeToBase162(hexString.charCodeAt(j2++));\n if (nibbleLeft === void 0 || nibbleRight === void 0) {\n throw new BaseError3(`Invalid byte sequence (\"${hexString[j2 - 2]}${hexString[j2 - 1]}\" in \"${hexString}\").`);\n }\n bytes[index2] = nibbleLeft * 16 + nibbleRight;\n }\n return bytes;\n }\n function fromString(value, options = {}) {\n const { size: size6 } = options;\n const bytes = encoder4.encode(value);\n if (typeof size6 === \"number\") {\n assertSize2(bytes, size6);\n return padRight2(bytes, size6);\n }\n return bytes;\n }\n function padRight2(value, size6) {\n return pad2(value, { dir: \"right\", size: size6 });\n }\n function size2(value) {\n return value.length;\n }\n function slice2(value, start, end, options = {}) {\n const { strict } = options;\n assertStartOffset2(value, start);\n const value_ = value.slice(start, end);\n if (strict)\n assertEndOffset2(value_, start, end);\n return value_;\n }\n function toBigInt2(bytes, options = {}) {\n const { size: size6 } = options;\n if (typeof size6 !== \"undefined\")\n assertSize2(bytes, size6);\n const hex = fromBytes(bytes, options);\n return toBigInt(hex, options);\n }\n function toBoolean(bytes, options = {}) {\n const { size: size6 } = options;\n let bytes_ = bytes;\n if (typeof size6 !== \"undefined\") {\n assertSize2(bytes_, size6);\n bytes_ = trimLeft(bytes_);\n }\n if (bytes_.length > 1 || bytes_[0] > 1)\n throw new InvalidBytesBooleanError2(bytes_);\n return Boolean(bytes_[0]);\n }\n function toNumber2(bytes, options = {}) {\n const { size: size6 } = options;\n if (typeof size6 !== \"undefined\")\n assertSize2(bytes, size6);\n const hex = fromBytes(bytes, options);\n return toNumber(hex, options);\n }\n function toString(bytes, options = {}) {\n const { size: size6 } = options;\n let bytes_ = bytes;\n if (typeof size6 !== \"undefined\") {\n assertSize2(bytes_, size6);\n bytes_ = trimRight(bytes_);\n }\n return decoder2.decode(bytes_);\n }\n function trimLeft(value) {\n return trim2(value, { dir: \"left\" });\n }\n function trimRight(value) {\n return trim2(value, { dir: \"right\" });\n }\n function validate(value) {\n try {\n assert2(value);\n return true;\n } catch {\n return false;\n }\n }\n var decoder2, encoder4, InvalidBytesBooleanError2, InvalidBytesTypeError, SizeOverflowError2, SliceOffsetOutOfBoundsError2, SizeExceedsPaddingSizeError2;\n var init_Bytes = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors();\n init_Hex();\n init_bytes();\n init_hex();\n init_Json();\n decoder2 = /* @__PURE__ */ new TextDecoder();\n encoder4 = /* @__PURE__ */ new TextEncoder();\n InvalidBytesBooleanError2 = class extends BaseError3 {\n constructor(bytes) {\n super(`Bytes value \\`${bytes}\\` is not a valid boolean.`, {\n metaMessages: [\n \"The bytes array must contain a single byte of either a `0` or `1` value.\"\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.InvalidBytesBooleanError\"\n });\n }\n };\n InvalidBytesTypeError = class extends BaseError3 {\n constructor(value) {\n super(`Value \\`${typeof value === \"object\" ? stringify2(value) : value}\\` of type \\`${typeof value}\\` is an invalid Bytes value.`, {\n metaMessages: [\"Bytes values must be of type `Bytes`.\"]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.InvalidBytesTypeError\"\n });\n }\n };\n SizeOverflowError2 = class extends BaseError3 {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed \\`${maxSize}\\` bytes. Given size: \\`${givenSize}\\` bytes.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.SizeOverflowError\"\n });\n }\n };\n SliceOffsetOutOfBoundsError2 = class extends BaseError3 {\n constructor({ offset, position, size: size6 }) {\n super(`Slice ${position === \"start\" ? \"starting\" : \"ending\"} at offset \\`${offset}\\` is out-of-bounds (size: \\`${size6}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.SliceOffsetOutOfBoundsError\"\n });\n }\n };\n SizeExceedsPaddingSizeError2 = class extends BaseError3 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\\`${size6}\\`) exceeds padding size (\\`${targetSize}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Bytes.SizeExceedsPaddingSizeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hex.js\n function assert3(value, options = {}) {\n const { strict = false } = options;\n if (!value)\n throw new InvalidHexTypeError(value);\n if (typeof value !== \"string\")\n throw new InvalidHexTypeError(value);\n if (strict) {\n if (!/^0x[0-9a-fA-F]*$/.test(value))\n throw new InvalidHexValueError(value);\n }\n if (!value.startsWith(\"0x\"))\n throw new InvalidHexValueError(value);\n }\n function concat3(...values) {\n return `0x${values.reduce((acc, x4) => acc + x4.replace(\"0x\", \"\"), \"\")}`;\n }\n function from2(value) {\n if (value instanceof Uint8Array)\n return fromBytes(value);\n if (Array.isArray(value))\n return fromBytes(new Uint8Array(value));\n return value;\n }\n function fromBoolean(value, options = {}) {\n const hex = `0x${Number(value)}`;\n if (typeof options.size === \"number\") {\n assertSize3(hex, options.size);\n return padLeft(hex, options.size);\n }\n return hex;\n }\n function fromBytes(value, options = {}) {\n let string = \"\";\n for (let i3 = 0; i3 < value.length; i3++)\n string += hexes4[value[i3]];\n const hex = `0x${string}`;\n if (typeof options.size === \"number\") {\n assertSize3(hex, options.size);\n return padRight(hex, options.size);\n }\n return hex;\n }\n function fromNumber(value, options = {}) {\n const { signed, size: size6 } = options;\n const value_ = BigInt(value);\n let maxValue;\n if (size6) {\n if (signed)\n maxValue = (1n << BigInt(size6) * 8n - 1n) - 1n;\n else\n maxValue = 2n ** (BigInt(size6) * 8n) - 1n;\n } else if (typeof value === \"number\") {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n }\n const minValue = typeof maxValue === \"bigint\" && signed ? -maxValue - 1n : 0;\n if (maxValue && value_ > maxValue || value_ < minValue) {\n const suffix = typeof value === \"bigint\" ? \"n\" : \"\";\n throw new IntegerOutOfRangeError2({\n max: maxValue ? `${maxValue}${suffix}` : void 0,\n min: `${minValue}${suffix}`,\n signed,\n size: size6,\n value: `${value}${suffix}`\n });\n }\n const stringValue = (signed && value_ < 0 ? (1n << BigInt(size6 * 8)) + BigInt(value_) : value_).toString(16);\n const hex = `0x${stringValue}`;\n if (size6)\n return padLeft(hex, size6);\n return hex;\n }\n function fromString2(value, options = {}) {\n return fromBytes(encoder5.encode(value), options);\n }\n function padLeft(value, size6) {\n return pad3(value, { dir: \"left\", size: size6 });\n }\n function padRight(value, size6) {\n return pad3(value, { dir: \"right\", size: size6 });\n }\n function slice3(value, start, end, options = {}) {\n const { strict } = options;\n assertStartOffset3(value, start);\n const value_ = `0x${value.replace(\"0x\", \"\").slice((start ?? 0) * 2, (end ?? value.length) * 2)}`;\n if (strict)\n assertEndOffset3(value_, start, end);\n return value_;\n }\n function size3(value) {\n return Math.ceil((value.length - 2) / 2);\n }\n function trimLeft2(value) {\n return trim3(value, { dir: \"left\" });\n }\n function toBigInt(hex, options = {}) {\n const { signed } = options;\n if (options.size)\n assertSize3(hex, options.size);\n const value = BigInt(hex);\n if (!signed)\n return value;\n const size6 = (hex.length - 2) / 2;\n const max_unsigned = (1n << BigInt(size6) * 8n) - 1n;\n const max_signed = max_unsigned >> 1n;\n if (value <= max_signed)\n return value;\n return value - max_unsigned - 1n;\n }\n function toNumber(hex, options = {}) {\n const { signed, size: size6 } = options;\n if (!signed && !size6)\n return Number(hex);\n return Number(toBigInt(hex, options));\n }\n function validate2(value, options = {}) {\n const { strict = false } = options;\n try {\n assert3(value, { strict });\n return true;\n } catch {\n return false;\n }\n }\n var encoder5, hexes4, IntegerOutOfRangeError2, InvalidHexTypeError, InvalidHexValueError, SizeOverflowError3, SliceOffsetOutOfBoundsError3, SizeExceedsPaddingSizeError3;\n var init_Hex = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors();\n init_hex();\n init_Json();\n encoder5 = /* @__PURE__ */ new TextEncoder();\n hexes4 = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i3) => i3.toString(16).padStart(2, \"0\"));\n IntegerOutOfRangeError2 = class extends BaseError3 {\n constructor({ max, min, signed, size: size6, value }) {\n super(`Number \\`${value}\\` is not in safe${size6 ? ` ${size6 * 8}-bit` : \"\"}${signed ? \" signed\" : \" unsigned\"} integer range ${max ? `(\\`${min}\\` to \\`${max}\\`)` : `(above \\`${min}\\`)`}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.IntegerOutOfRangeError\"\n });\n }\n };\n InvalidHexTypeError = class extends BaseError3 {\n constructor(value) {\n super(`Value \\`${typeof value === \"object\" ? stringify2(value) : value}\\` of type \\`${typeof value}\\` is an invalid hex type.`, {\n metaMessages: ['Hex types must be represented as `\"0x${string}\"`.']\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.InvalidHexTypeError\"\n });\n }\n };\n InvalidHexValueError = class extends BaseError3 {\n constructor(value) {\n super(`Value \\`${value}\\` is an invalid hex value.`, {\n metaMessages: [\n 'Hex values must start with `\"0x\"` and contain only hexadecimal characters (0-9, a-f, A-F).'\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.InvalidHexValueError\"\n });\n }\n };\n SizeOverflowError3 = class extends BaseError3 {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed \\`${maxSize}\\` bytes. Given size: \\`${givenSize}\\` bytes.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SizeOverflowError\"\n });\n }\n };\n SliceOffsetOutOfBoundsError3 = class extends BaseError3 {\n constructor({ offset, position, size: size6 }) {\n super(`Slice ${position === \"start\" ? \"starting\" : \"ending\"} at offset \\`${offset}\\` is out-of-bounds (size: \\`${size6}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SliceOffsetOutOfBoundsError\"\n });\n }\n };\n SizeExceedsPaddingSizeError3 = class extends BaseError3 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\\`${size6}\\`) exceeds padding size (\\`${targetSize}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SizeExceedsPaddingSizeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Withdrawal.js\n function toRpc(withdrawal) {\n return {\n address: withdrawal.address,\n amount: fromNumber(withdrawal.amount),\n index: fromNumber(withdrawal.index),\n validatorIndex: fromNumber(withdrawal.validatorIndex)\n };\n }\n var init_Withdrawal = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Withdrawal.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/BlockOverrides.js\n function toRpc2(blockOverrides) {\n return {\n ...typeof blockOverrides.baseFeePerGas === \"bigint\" && {\n baseFeePerGas: fromNumber(blockOverrides.baseFeePerGas)\n },\n ...typeof blockOverrides.blobBaseFee === \"bigint\" && {\n blobBaseFee: fromNumber(blockOverrides.blobBaseFee)\n },\n ...typeof blockOverrides.feeRecipient === \"string\" && {\n feeRecipient: blockOverrides.feeRecipient\n },\n ...typeof blockOverrides.gasLimit === \"bigint\" && {\n gasLimit: fromNumber(blockOverrides.gasLimit)\n },\n ...typeof blockOverrides.number === \"bigint\" && {\n number: fromNumber(blockOverrides.number)\n },\n ...typeof blockOverrides.prevRandao === \"bigint\" && {\n prevRandao: fromNumber(blockOverrides.prevRandao)\n },\n ...typeof blockOverrides.time === \"bigint\" && {\n time: fromNumber(blockOverrides.time)\n },\n ...blockOverrides.withdrawals && {\n withdrawals: blockOverrides.withdrawals.map(toRpc)\n }\n };\n }\n var init_BlockOverrides = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/BlockOverrides.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hex();\n init_Withdrawal();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/abis.js\n var multicall3Abi, batchGatewayAbi, universalResolverErrors, universalResolverResolveAbi, universalResolverReverseAbi, textResolverAbi, addressResolverAbi, erc1271Abi, erc6492SignatureValidatorAbi;\n var init_abis = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/abis.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n multicall3Abi = [\n {\n inputs: [\n {\n components: [\n {\n name: \"target\",\n type: \"address\"\n },\n {\n name: \"allowFailure\",\n type: \"bool\"\n },\n {\n name: \"callData\",\n type: \"bytes\"\n }\n ],\n name: \"calls\",\n type: \"tuple[]\"\n }\n ],\n name: \"aggregate3\",\n outputs: [\n {\n components: [\n {\n name: \"success\",\n type: \"bool\"\n },\n {\n name: \"returnData\",\n type: \"bytes\"\n }\n ],\n name: \"returnData\",\n type: \"tuple[]\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getCurrentBlockTimestamp\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"timestamp\",\n type: \"uint256\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ];\n batchGatewayAbi = [\n {\n name: \"query\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n {\n type: \"tuple[]\",\n name: \"queries\",\n components: [\n {\n type: \"address\",\n name: \"sender\"\n },\n {\n type: \"string[]\",\n name: \"urls\"\n },\n {\n type: \"bytes\",\n name: \"data\"\n }\n ]\n }\n ],\n outputs: [\n {\n type: \"bool[]\",\n name: \"failures\"\n },\n {\n type: \"bytes[]\",\n name: \"responses\"\n }\n ]\n },\n {\n name: \"HttpError\",\n type: \"error\",\n inputs: [\n {\n type: \"uint16\",\n name: \"status\"\n },\n {\n type: \"string\",\n name: \"message\"\n }\n ]\n }\n ];\n universalResolverErrors = [\n {\n inputs: [\n {\n name: \"dns\",\n type: \"bytes\"\n }\n ],\n name: \"DNSDecodingFailed\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"ens\",\n type: \"string\"\n }\n ],\n name: \"DNSEncodingFailed\",\n type: \"error\"\n },\n {\n inputs: [],\n name: \"EmptyAddress\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"status\",\n type: \"uint16\"\n },\n {\n name: \"message\",\n type: \"string\"\n }\n ],\n name: \"HttpError\",\n type: \"error\"\n },\n {\n inputs: [],\n name: \"InvalidBatchGatewayResponse\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"errorData\",\n type: \"bytes\"\n }\n ],\n name: \"ResolverError\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"name\",\n type: \"bytes\"\n },\n {\n name: \"resolver\",\n type: \"address\"\n }\n ],\n name: \"ResolverNotContract\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"name\",\n type: \"bytes\"\n }\n ],\n name: \"ResolverNotFound\",\n type: \"error\"\n },\n {\n inputs: [\n {\n name: \"primary\",\n type: \"string\"\n },\n {\n name: \"primaryAddress\",\n type: \"bytes\"\n }\n ],\n name: \"ReverseAddressMismatch\",\n type: \"error\"\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\"\n }\n ],\n name: \"UnsupportedResolverProfile\",\n type: \"error\"\n }\n ];\n universalResolverResolveAbi = [\n ...universalResolverErrors,\n {\n name: \"resolveWithGateways\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { name: \"name\", type: \"bytes\" },\n { name: \"data\", type: \"bytes\" },\n { name: \"gateways\", type: \"string[]\" }\n ],\n outputs: [\n { name: \"\", type: \"bytes\" },\n { name: \"address\", type: \"address\" }\n ]\n }\n ];\n universalResolverReverseAbi = [\n ...universalResolverErrors,\n {\n name: \"reverseWithGateways\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { type: \"bytes\", name: \"reverseName\" },\n { type: \"uint256\", name: \"coinType\" },\n { type: \"string[]\", name: \"gateways\" }\n ],\n outputs: [\n { type: \"string\", name: \"resolvedName\" },\n { type: \"address\", name: \"resolver\" },\n { type: \"address\", name: \"reverseResolver\" }\n ]\n }\n ];\n textResolverAbi = [\n {\n name: \"text\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { name: \"name\", type: \"bytes32\" },\n { name: \"key\", type: \"string\" }\n ],\n outputs: [{ name: \"\", type: \"string\" }]\n }\n ];\n addressResolverAbi = [\n {\n name: \"addr\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [{ name: \"name\", type: \"bytes32\" }],\n outputs: [{ name: \"\", type: \"address\" }]\n },\n {\n name: \"addr\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { name: \"name\", type: \"bytes32\" },\n { name: \"coinType\", type: \"uint256\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\" }]\n }\n ];\n erc1271Abi = [\n {\n name: \"isValidSignature\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [\n { name: \"hash\", type: \"bytes32\" },\n { name: \"signature\", type: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\" }]\n }\n ];\n erc6492SignatureValidatorAbi = [\n {\n inputs: [\n {\n name: \"_signer\",\n type: \"address\"\n },\n {\n name: \"_hash\",\n type: \"bytes32\"\n },\n {\n name: \"_signature\",\n type: \"bytes\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n inputs: [\n {\n name: \"_signer\",\n type: \"address\"\n },\n {\n name: \"_hash\",\n type: \"bytes32\"\n },\n {\n name: \"_signature\",\n type: \"bytes\"\n }\n ],\n outputs: [\n {\n type: \"bool\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"isValidSig\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/contract.js\n var aggregate3Signature;\n var init_contract2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/contract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n aggregate3Signature = \"0x82ad56cb\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/contracts.js\n var deploylessCallViaBytecodeBytecode, deploylessCallViaFactoryBytecode, erc6492SignatureValidatorByteCode, multicall3Bytecode;\n var init_contracts = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/contracts.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n deploylessCallViaBytecodeBytecode = \"0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe\";\n deploylessCallViaFactoryBytecode = \"0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe\";\n erc6492SignatureValidatorByteCode = \"0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572\";\n multicall3Bytecode = \"0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/chain.js\n var ChainDoesNotSupportContract, ChainMismatchError, ChainNotFoundError, ClientChainNotConfiguredError, InvalidChainIdError;\n var init_chain = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/chain.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n ChainDoesNotSupportContract = class extends BaseError2 {\n constructor({ blockNumber, chain: chain2, contract }) {\n super(`Chain \"${chain2.name}\" does not support contract \"${contract.name}\".`, {\n metaMessages: [\n \"This could be due to any of the following:\",\n ...blockNumber && contract.blockCreated && contract.blockCreated > blockNumber ? [\n `- The contract \"${contract.name}\" was not deployed until block ${contract.blockCreated} (current block ${blockNumber}).`\n ] : [\n `- The chain does not have the contract \"${contract.name}\" configured.`\n ]\n ],\n name: \"ChainDoesNotSupportContract\"\n });\n }\n };\n ChainMismatchError = class extends BaseError2 {\n constructor({ chain: chain2, currentChainId }) {\n super(`The current chain of the wallet (id: ${currentChainId}) does not match the target chain for the transaction (id: ${chain2.id} \\u2013 ${chain2.name}).`, {\n metaMessages: [\n `Current Chain ID: ${currentChainId}`,\n `Expected Chain ID: ${chain2.id} \\u2013 ${chain2.name}`\n ],\n name: \"ChainMismatchError\"\n });\n }\n };\n ChainNotFoundError = class extends BaseError2 {\n constructor() {\n super([\n \"No chain was provided to the request.\",\n \"Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.\"\n ].join(\"\\n\"), {\n name: \"ChainNotFoundError\"\n });\n }\n };\n ClientChainNotConfiguredError = class extends BaseError2 {\n constructor() {\n super(\"No chain was provided to the Client.\", {\n name: \"ClientChainNotConfiguredError\"\n });\n }\n };\n InvalidChainIdError = class extends BaseError2 {\n constructor({ chainId }) {\n super(typeof chainId === \"number\" ? `Chain ID \"${chainId}\" is invalid.` : \"Chain ID is invalid.\", { name: \"InvalidChainIdError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeDeployData.js\n function encodeDeployData(parameters) {\n const { abi: abi2, args, bytecode } = parameters;\n if (!args || args.length === 0)\n return bytecode;\n const description = abi2.find((x4) => \"type\" in x4 && x4.type === \"constructor\");\n if (!description)\n throw new AbiConstructorNotFoundError({ docsPath: docsPath5 });\n if (!(\"inputs\" in description))\n throw new AbiConstructorParamsNotFoundError({ docsPath: docsPath5 });\n if (!description.inputs || description.inputs.length === 0)\n throw new AbiConstructorParamsNotFoundError({ docsPath: docsPath5 });\n const data = encodeAbiParameters(description.inputs, args);\n return concatHex([bytecode, data]);\n }\n var docsPath5;\n var init_encodeDeployData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeDeployData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_concat();\n init_encodeAbiParameters();\n docsPath5 = \"/docs/contract/encodeDeployData\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/getChainContractAddress.js\n function getChainContractAddress({ blockNumber, chain: chain2, contract: name }) {\n const contract = chain2?.contracts?.[name];\n if (!contract)\n throw new ChainDoesNotSupportContract({\n chain: chain2,\n contract: { name }\n });\n if (blockNumber && contract.blockCreated && contract.blockCreated > blockNumber)\n throw new ChainDoesNotSupportContract({\n blockNumber,\n chain: chain2,\n contract: {\n name,\n blockCreated: contract.blockCreated\n }\n });\n return contract.address;\n }\n var init_getChainContractAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/getChainContractAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chain();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getCallError.js\n function getCallError(err, { docsPath: docsPath8, ...args }) {\n const cause = (() => {\n const cause2 = getNodeError(err, args);\n if (cause2 instanceof UnknownNodeError)\n return err;\n return cause2;\n })();\n return new CallExecutionError(cause, {\n docsPath: docsPath8,\n ...args\n });\n }\n var init_getCallError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getCallError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_contract();\n init_node();\n init_getNodeError();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withResolvers.js\n function withResolvers() {\n let resolve = () => void 0;\n let reject = () => void 0;\n const promise = new Promise((resolve_, reject_) => {\n resolve = resolve_;\n reject = reject_;\n });\n return { promise, resolve, reject };\n }\n var init_withResolvers = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withResolvers.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/createBatchScheduler.js\n function createBatchScheduler({ fn, id, shouldSplitBatch, wait: wait2 = 0, sort }) {\n const exec = async () => {\n const scheduler = getScheduler();\n flush();\n const args = scheduler.map(({ args: args2 }) => args2);\n if (args.length === 0)\n return;\n fn(args).then((data) => {\n if (sort && Array.isArray(data))\n data.sort(sort);\n for (let i3 = 0; i3 < scheduler.length; i3++) {\n const { resolve } = scheduler[i3];\n resolve?.([data[i3], data]);\n }\n }).catch((err) => {\n for (let i3 = 0; i3 < scheduler.length; i3++) {\n const { reject } = scheduler[i3];\n reject?.(err);\n }\n });\n };\n const flush = () => schedulerCache.delete(id);\n const getBatchedArgs = () => getScheduler().map(({ args }) => args);\n const getScheduler = () => schedulerCache.get(id) || [];\n const setScheduler = (item) => schedulerCache.set(id, [...getScheduler(), item]);\n return {\n flush,\n async schedule(args) {\n const { promise, resolve, reject } = withResolvers();\n const split3 = shouldSplitBatch?.([...getBatchedArgs(), args]);\n if (split3)\n exec();\n const hasActiveScheduler = getScheduler().length > 0;\n if (hasActiveScheduler) {\n setScheduler({ args, resolve, reject });\n return promise;\n }\n setScheduler({ args, resolve, reject });\n setTimeout(exec, wait2);\n return promise;\n }\n };\n }\n var schedulerCache;\n var init_createBatchScheduler = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/createBatchScheduler.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_withResolvers();\n schedulerCache = /* @__PURE__ */ new Map();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/ccip.js\n var OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError;\n var init_ccip = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/ccip.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n init_base();\n init_utils4();\n OffchainLookupError = class extends BaseError2 {\n constructor({ callbackSelector, cause, data, extraData, sender, urls }) {\n super(cause.shortMessage || \"An error occurred while fetching for an offchain result.\", {\n cause,\n metaMessages: [\n ...cause.metaMessages || [],\n cause.metaMessages?.length ? \"\" : [],\n \"Offchain Gateway Call:\",\n urls && [\n \" Gateway URL(s):\",\n ...urls.map((url) => ` ${getUrl(url)}`)\n ],\n ` Sender: ${sender}`,\n ` Data: ${data}`,\n ` Callback selector: ${callbackSelector}`,\n ` Extra data: ${extraData}`\n ].flat(),\n name: \"OffchainLookupError\"\n });\n }\n };\n OffchainLookupResponseMalformedError = class extends BaseError2 {\n constructor({ result, url }) {\n super(\"Offchain gateway response is malformed. Response data must be a hex value.\", {\n metaMessages: [\n `Gateway URL: ${getUrl(url)}`,\n `Response: ${stringify(result)}`\n ],\n name: \"OffchainLookupResponseMalformedError\"\n });\n }\n };\n OffchainLookupSenderMismatchError = class extends BaseError2 {\n constructor({ sender, to }) {\n super(\"Reverted sender address does not match target contract address (`to`).\", {\n metaMessages: [\n `Contract address: ${to}`,\n `OffchainLookup sender address: ${sender}`\n ],\n name: \"OffchainLookupSenderMismatchError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeFunctionData.js\n function decodeFunctionData(parameters) {\n const { abi: abi2, data } = parameters;\n const signature = slice(data, 0, 4);\n const description = abi2.find((x4) => x4.type === \"function\" && signature === toFunctionSelector(formatAbiItem2(x4)));\n if (!description)\n throw new AbiFunctionSignatureNotFoundError(signature, {\n docsPath: \"/docs/contract/decodeFunctionData\"\n });\n return {\n functionName: description.name,\n args: \"inputs\" in description && description.inputs && description.inputs.length > 0 ? decodeAbiParameters(description.inputs, slice(data, 4)) : void 0\n };\n }\n var init_decodeFunctionData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/decodeFunctionData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_slice();\n init_toFunctionSelector();\n init_decodeAbiParameters();\n init_formatAbiItem2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeErrorResult.js\n function encodeErrorResult(parameters) {\n const { abi: abi2, errorName, args } = parameters;\n let abiItem = abi2[0];\n if (errorName) {\n const item = getAbiItem({ abi: abi2, args, name: errorName });\n if (!item)\n throw new AbiErrorNotFoundError(errorName, { docsPath: docsPath6 });\n abiItem = item;\n }\n if (abiItem.type !== \"error\")\n throw new AbiErrorNotFoundError(void 0, { docsPath: docsPath6 });\n const definition = formatAbiItem2(abiItem);\n const signature = toFunctionSelector(definition);\n let data = \"0x\";\n if (args && args.length > 0) {\n if (!abiItem.inputs)\n throw new AbiErrorInputsNotFoundError(abiItem.name, { docsPath: docsPath6 });\n data = encodeAbiParameters(abiItem.inputs, args);\n }\n return concatHex([signature, data]);\n }\n var docsPath6;\n var init_encodeErrorResult = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeErrorResult.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_concat();\n init_toFunctionSelector();\n init_encodeAbiParameters();\n init_formatAbiItem2();\n init_getAbiItem();\n docsPath6 = \"/docs/contract/encodeErrorResult\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeFunctionResult.js\n function encodeFunctionResult(parameters) {\n const { abi: abi2, functionName, result } = parameters;\n let abiItem = abi2[0];\n if (functionName) {\n const item = getAbiItem({ abi: abi2, name: functionName });\n if (!item)\n throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath7 });\n abiItem = item;\n }\n if (abiItem.type !== \"function\")\n throw new AbiFunctionNotFoundError(void 0, { docsPath: docsPath7 });\n if (!abiItem.outputs)\n throw new AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath: docsPath7 });\n const values = (() => {\n if (abiItem.outputs.length === 0)\n return [];\n if (abiItem.outputs.length === 1)\n return [result];\n if (Array.isArray(result))\n return result;\n throw new InvalidArrayError(result);\n })();\n return encodeAbiParameters(abiItem.outputs, values);\n }\n var docsPath7;\n var init_encodeFunctionResult = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodeFunctionResult.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_encodeAbiParameters();\n init_getAbiItem();\n docsPath7 = \"/docs/contract/encodeFunctionResult\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js\n async function localBatchGatewayRequest(parameters) {\n const { data, ccipRequest: ccipRequest2 } = parameters;\n const { args: [queries] } = decodeFunctionData({ abi: batchGatewayAbi, data });\n const failures = [];\n const responses = [];\n await Promise.all(queries.map(async (query, i3) => {\n try {\n responses[i3] = query.urls.includes(localBatchGatewayUrl) ? await localBatchGatewayRequest({ data: query.data, ccipRequest: ccipRequest2 }) : await ccipRequest2(query);\n failures[i3] = false;\n } catch (err) {\n failures[i3] = true;\n responses[i3] = encodeError(err);\n }\n }));\n return encodeFunctionResult({\n abi: batchGatewayAbi,\n functionName: \"query\",\n result: [failures, responses]\n });\n }\n function encodeError(error) {\n if (error.name === \"HttpRequestError\" && error.status)\n return encodeErrorResult({\n abi: batchGatewayAbi,\n errorName: \"HttpError\",\n args: [error.status, error.shortMessage]\n });\n return encodeErrorResult({\n abi: [solidityError],\n errorName: \"Error\",\n args: [\"shortMessage\" in error ? error.shortMessage : error.message]\n });\n }\n var localBatchGatewayUrl;\n var init_localBatchGatewayRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_solidity();\n init_decodeFunctionData();\n init_encodeErrorResult();\n init_encodeFunctionResult();\n localBatchGatewayUrl = \"x-batch-gateway:true\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ccip.js\n var ccip_exports = {};\n __export(ccip_exports, {\n ccipRequest: () => ccipRequest,\n offchainLookup: () => offchainLookup,\n offchainLookupAbiItem: () => offchainLookupAbiItem,\n offchainLookupSignature: () => offchainLookupSignature\n });\n async function offchainLookup(client, { blockNumber, blockTag, data, to }) {\n const { args } = decodeErrorResult({\n data,\n abi: [offchainLookupAbiItem]\n });\n const [sender, urls, callData, callbackSelector, extraData] = args;\n const { ccipRead } = client;\n const ccipRequest_ = ccipRead && typeof ccipRead?.request === \"function\" ? ccipRead.request : ccipRequest;\n try {\n if (!isAddressEqual(to, sender))\n throw new OffchainLookupSenderMismatchError({ sender, to });\n const result = urls.includes(localBatchGatewayUrl) ? await localBatchGatewayRequest({\n data: callData,\n ccipRequest: ccipRequest_\n }) : await ccipRequest_({ data: callData, sender, urls });\n const { data: data_ } = await call(client, {\n blockNumber,\n blockTag,\n data: concat2([\n callbackSelector,\n encodeAbiParameters([{ type: \"bytes\" }, { type: \"bytes\" }], [result, extraData])\n ]),\n to\n });\n return data_;\n } catch (err) {\n throw new OffchainLookupError({\n callbackSelector,\n cause: err,\n data,\n extraData,\n sender,\n urls\n });\n }\n }\n async function ccipRequest({ data, sender, urls }) {\n let error = new Error(\"An unknown error occurred.\");\n for (let i3 = 0; i3 < urls.length; i3++) {\n const url = urls[i3];\n const method = url.includes(\"{data}\") ? \"GET\" : \"POST\";\n const body = method === \"POST\" ? { data, sender } : void 0;\n const headers = method === \"POST\" ? { \"Content-Type\": \"application/json\" } : {};\n try {\n const response = await fetch(url.replace(\"{sender}\", sender.toLowerCase()).replace(\"{data}\", data), {\n body: JSON.stringify(body),\n headers,\n method\n });\n let result;\n if (response.headers.get(\"Content-Type\")?.startsWith(\"application/json\")) {\n result = (await response.json()).data;\n } else {\n result = await response.text();\n }\n if (!response.ok) {\n error = new HttpRequestError({\n body,\n details: result?.error ? stringify(result.error) : response.statusText,\n headers: response.headers,\n status: response.status,\n url\n });\n continue;\n }\n if (!isHex(result)) {\n error = new OffchainLookupResponseMalformedError({\n result,\n url\n });\n continue;\n }\n return result;\n } catch (err) {\n error = new HttpRequestError({\n body,\n details: err.message,\n url\n });\n }\n }\n throw error;\n }\n var offchainLookupSignature, offchainLookupAbiItem;\n var init_ccip2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ccip.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_call();\n init_ccip();\n init_request();\n init_decodeErrorResult();\n init_encodeAbiParameters();\n init_isAddressEqual();\n init_concat();\n init_isHex();\n init_localBatchGatewayRequest();\n init_stringify();\n offchainLookupSignature = \"0x556f1830\";\n offchainLookupAbiItem = {\n name: \"OffchainLookup\",\n type: \"error\",\n inputs: [\n {\n name: \"sender\",\n type: \"address\"\n },\n {\n name: \"urls\",\n type: \"string[]\"\n },\n {\n name: \"callData\",\n type: \"bytes\"\n },\n {\n name: \"callbackFunction\",\n type: \"bytes4\"\n },\n {\n name: \"extraData\",\n type: \"bytes\"\n }\n ]\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/call.js\n async function call(client, args) {\n const { account: account_ = client.account, authorizationList, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = client.experimental_blockTag ?? \"latest\", accessList, blobs, blockOverrides, code, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride, ...rest } = args;\n const account = account_ ? parseAccount(account_) : void 0;\n if (code && (factory || factoryData))\n throw new BaseError2(\"Cannot provide both `code` & `factory`/`factoryData` as parameters.\");\n if (code && to)\n throw new BaseError2(\"Cannot provide both `code` & `to` as parameters.\");\n const deploylessCallViaBytecode = code && data_;\n const deploylessCallViaFactory = factory && factoryData && to && data_;\n const deploylessCall = deploylessCallViaBytecode || deploylessCallViaFactory;\n const data = (() => {\n if (deploylessCallViaBytecode)\n return toDeploylessCallViaBytecodeData({\n code,\n data: data_\n });\n if (deploylessCallViaFactory)\n return toDeploylessCallViaFactoryData({\n data: data_,\n factory,\n factoryData,\n to\n });\n return data_;\n })();\n try {\n assertRequest(args);\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const rpcBlockOverrides = blockOverrides ? toRpc2(blockOverrides) : void 0;\n const rpcStateOverride = serializeStateOverride(stateOverride);\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n accessList,\n account,\n authorizationList,\n blobs,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to: deploylessCall ? void 0 : to,\n value\n }, \"call\");\n if (batch && shouldPerformMulticall({ request }) && !rpcStateOverride && !rpcBlockOverrides) {\n try {\n return await scheduleMulticall(client, {\n ...request,\n blockNumber,\n blockTag\n });\n } catch (err) {\n if (!(err instanceof ClientChainNotConfiguredError) && !(err instanceof ChainDoesNotSupportContract))\n throw err;\n }\n }\n const params = (() => {\n const base4 = [\n request,\n block\n ];\n if (rpcStateOverride && rpcBlockOverrides)\n return [...base4, rpcStateOverride, rpcBlockOverrides];\n if (rpcStateOverride)\n return [...base4, rpcStateOverride];\n if (rpcBlockOverrides)\n return [...base4, {}, rpcBlockOverrides];\n return base4;\n })();\n const response = await client.request({\n method: \"eth_call\",\n params\n });\n if (response === \"0x\")\n return { data: void 0 };\n return { data: response };\n } catch (err) {\n const data2 = getRevertErrorData(err);\n const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await Promise.resolve().then(() => (init_ccip2(), ccip_exports));\n if (client.ccipRead !== false && data2?.slice(0, 10) === offchainLookupSignature2 && to)\n return { data: await offchainLookup2(client, { data: data2, to }) };\n if (deploylessCall && data2?.slice(0, 10) === \"0x101bb98d\")\n throw new CounterfactualDeploymentFailedError({ factory });\n throw getCallError(err, {\n ...args,\n account,\n chain: client.chain\n });\n }\n }\n function shouldPerformMulticall({ request }) {\n const { data, to, ...request_ } = request;\n if (!data)\n return false;\n if (data.startsWith(aggregate3Signature))\n return false;\n if (!to)\n return false;\n if (Object.values(request_).filter((x4) => typeof x4 !== \"undefined\").length > 0)\n return false;\n return true;\n }\n async function scheduleMulticall(client, args) {\n const { batchSize = 1024, deployless = false, wait: wait2 = 0 } = typeof client.batch?.multicall === \"object\" ? client.batch.multicall : {};\n const { blockNumber, blockTag = client.experimental_blockTag ?? \"latest\", data, to } = args;\n const multicallAddress = (() => {\n if (deployless)\n return null;\n if (args.multicallAddress)\n return args.multicallAddress;\n if (client.chain) {\n return getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: \"multicall3\"\n });\n }\n throw new ClientChainNotConfiguredError();\n })();\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const { schedule } = createBatchScheduler({\n id: `${client.uid}.${block}`,\n wait: wait2,\n shouldSplitBatch(args2) {\n const size6 = args2.reduce((size7, { data: data2 }) => size7 + (data2.length - 2), 0);\n return size6 > batchSize * 2;\n },\n fn: async (requests) => {\n const calls = requests.map((request) => ({\n allowFailure: true,\n callData: request.data,\n target: request.to\n }));\n const calldata = encodeFunctionData({\n abi: multicall3Abi,\n args: [calls],\n functionName: \"aggregate3\"\n });\n const data2 = await client.request({\n method: \"eth_call\",\n params: [\n {\n ...multicallAddress === null ? {\n data: toDeploylessCallViaBytecodeData({\n code: multicall3Bytecode,\n data: calldata\n })\n } : { to: multicallAddress, data: calldata }\n },\n block\n ]\n });\n return decodeFunctionResult({\n abi: multicall3Abi,\n args: [calls],\n functionName: \"aggregate3\",\n data: data2 || \"0x\"\n });\n }\n });\n const [{ returnData, success }] = await schedule({ data, to });\n if (!success)\n throw new RawContractError({ data: returnData });\n if (returnData === \"0x\")\n return { data: void 0 };\n return { data: returnData };\n }\n function toDeploylessCallViaBytecodeData(parameters) {\n const { code, data } = parameters;\n return encodeDeployData({\n abi: parseAbi([\"constructor(bytes, bytes)\"]),\n bytecode: deploylessCallViaBytecodeBytecode,\n args: [code, data]\n });\n }\n function toDeploylessCallViaFactoryData(parameters) {\n const { data, factory, factoryData, to } = parameters;\n return encodeDeployData({\n abi: parseAbi([\"constructor(address, bytes, address, bytes)\"]),\n bytecode: deploylessCallViaFactoryBytecode,\n args: [to, data, factory, factoryData]\n });\n }\n function getRevertErrorData(err) {\n if (!(err instanceof BaseError2))\n return void 0;\n const error = err.walk();\n return typeof error?.data === \"object\" ? error.data?.data : error.data;\n }\n var init_call = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/call.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_BlockOverrides();\n init_parseAccount();\n init_abis();\n init_contract2();\n init_contracts();\n init_base();\n init_chain();\n init_contract();\n init_decodeFunctionResult();\n init_encodeDeployData();\n init_encodeFunctionData();\n init_getChainContractAddress();\n init_toHex();\n init_getCallError();\n init_extract();\n init_transactionRequest();\n init_createBatchScheduler();\n init_stateOverride2();\n init_assertRequest();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/readContract.js\n async function readContract(client, parameters) {\n const { abi: abi2, address, args, functionName, ...rest } = parameters;\n const calldata = encodeFunctionData({\n abi: abi2,\n args,\n functionName\n });\n try {\n const { data } = await getAction(client, call, \"call\")({\n ...rest,\n data: calldata,\n to: address\n });\n return decodeFunctionResult({\n abi: abi2,\n args,\n functionName,\n data: data || \"0x\"\n });\n } catch (error) {\n throw getContractError(error, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/readContract\",\n functionName\n });\n }\n }\n var init_readContract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/readContract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getContractError();\n init_getAction();\n init_call();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateContract.js\n async function simulateContract(client, parameters) {\n const { abi: abi2, address, args, dataSuffix, functionName, ...callRequest } = parameters;\n const account = callRequest.account ? parseAccount(callRequest.account) : client.account;\n const calldata = encodeFunctionData({ abi: abi2, args, functionName });\n try {\n const { data } = await getAction(client, call, \"call\")({\n batch: false,\n data: `${calldata}${dataSuffix ? dataSuffix.replace(\"0x\", \"\") : \"\"}`,\n to: address,\n ...callRequest,\n account\n });\n const result = decodeFunctionResult({\n abi: abi2,\n args,\n functionName,\n data: data || \"0x\"\n });\n const minimizedAbi = abi2.filter((abiItem) => \"name\" in abiItem && abiItem.name === parameters.functionName);\n return {\n result,\n request: {\n abi: minimizedAbi,\n address,\n args,\n dataSuffix,\n functionName,\n ...callRequest,\n account\n }\n };\n } catch (error) {\n throw getContractError(error, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/simulateContract\",\n functionName,\n sender: account?.address\n });\n }\n }\n var init_simulateContract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateContract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getContractError();\n init_getAction();\n init_call();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/observe.js\n function observe(observerId, callbacks, fn) {\n const callbackId = ++callbackCount;\n const getListeners = () => listenersCache.get(observerId) || [];\n const unsubscribe = () => {\n const listeners3 = getListeners();\n listenersCache.set(observerId, listeners3.filter((cb) => cb.id !== callbackId));\n };\n const unwatch = () => {\n const listeners3 = getListeners();\n if (!listeners3.some((cb) => cb.id === callbackId))\n return;\n const cleanup2 = cleanupCache.get(observerId);\n if (listeners3.length === 1 && cleanup2) {\n const p4 = cleanup2();\n if (p4 instanceof Promise)\n p4.catch(() => {\n });\n }\n unsubscribe();\n };\n const listeners2 = getListeners();\n listenersCache.set(observerId, [\n ...listeners2,\n { id: callbackId, fns: callbacks }\n ]);\n if (listeners2 && listeners2.length > 0)\n return unwatch;\n const emit2 = {};\n for (const key in callbacks) {\n emit2[key] = (...args) => {\n const listeners3 = getListeners();\n if (listeners3.length === 0)\n return;\n for (const listener of listeners3)\n listener.fns[key]?.(...args);\n };\n }\n const cleanup = fn(emit2);\n if (typeof cleanup === \"function\")\n cleanupCache.set(observerId, cleanup);\n return unwatch;\n }\n var listenersCache, cleanupCache, callbackCount;\n var init_observe = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/observe.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n listenersCache = /* @__PURE__ */ new Map();\n cleanupCache = /* @__PURE__ */ new Map();\n callbackCount = 0;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/wait.js\n async function wait(time) {\n return new Promise((res) => setTimeout(res, time));\n }\n var init_wait = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/wait.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/poll.js\n function poll(fn, { emitOnBegin, initialWaitTime, interval }) {\n let active = true;\n const unwatch = () => active = false;\n const watch = async () => {\n let data;\n if (emitOnBegin)\n data = await fn({ unpoll: unwatch });\n const initialWait = await initialWaitTime?.(data) ?? interval;\n await wait(initialWait);\n const poll2 = async () => {\n if (!active)\n return;\n await fn({ unpoll: unwatch });\n await wait(interval);\n poll2();\n };\n poll2();\n };\n watch();\n return unwatch;\n }\n var init_poll = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/poll.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_wait();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withCache.js\n function getCache(cacheKey2) {\n const buildCache = (cacheKey3, cache) => ({\n clear: () => cache.delete(cacheKey3),\n get: () => cache.get(cacheKey3),\n set: (data) => cache.set(cacheKey3, data)\n });\n const promise = buildCache(cacheKey2, promiseCache);\n const response = buildCache(cacheKey2, responseCache);\n return {\n clear: () => {\n promise.clear();\n response.clear();\n },\n promise,\n response\n };\n }\n async function withCache(fn, { cacheKey: cacheKey2, cacheTime = Number.POSITIVE_INFINITY }) {\n const cache = getCache(cacheKey2);\n const response = cache.response.get();\n if (response && cacheTime > 0) {\n const age = Date.now() - response.created.getTime();\n if (age < cacheTime)\n return response.data;\n }\n let promise = cache.promise.get();\n if (!promise) {\n promise = fn();\n cache.promise.set(promise);\n }\n try {\n const data = await promise;\n cache.response.set({ created: /* @__PURE__ */ new Date(), data });\n return data;\n } finally {\n cache.promise.clear();\n }\n }\n var promiseCache, responseCache;\n var init_withCache = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withCache.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n promiseCache = /* @__PURE__ */ new Map();\n responseCache = /* @__PURE__ */ new Map();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlockNumber.js\n async function getBlockNumber(client, { cacheTime = client.cacheTime } = {}) {\n const blockNumberHex = await withCache(() => client.request({\n method: \"eth_blockNumber\"\n }), { cacheKey: cacheKey(client.uid), cacheTime });\n return BigInt(blockNumberHex);\n }\n var cacheKey;\n var init_getBlockNumber = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlockNumber.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_withCache();\n cacheKey = (id) => `blockNumber.${id}`;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFilterChanges.js\n async function getFilterChanges(_client, { filter }) {\n const strict = \"strict\" in filter && filter.strict;\n const logs = await filter.request({\n method: \"eth_getFilterChanges\",\n params: [filter.id]\n });\n if (typeof logs[0] === \"string\")\n return logs;\n const formattedLogs = logs.map((log) => formatLog(log));\n if (!(\"abi\" in filter) || !filter.abi)\n return formattedLogs;\n return parseEventLogs({\n abi: filter.abi,\n logs: formattedLogs,\n strict\n });\n }\n var init_getFilterChanges = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFilterChanges.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseEventLogs();\n init_log2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/uninstallFilter.js\n async function uninstallFilter(_client, { filter }) {\n return filter.request({\n method: \"eth_uninstallFilter\",\n params: [filter.id]\n });\n }\n var init_uninstallFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/uninstallFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchContractEvent.js\n function watchContractEvent(client, parameters) {\n const { abi: abi2, address, args, batch = true, eventName, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ } = parameters;\n const enablePolling = (() => {\n if (typeof poll_ !== \"undefined\")\n return poll_;\n if (typeof fromBlock === \"bigint\")\n return true;\n if (client.transport.type === \"webSocket\" || client.transport.type === \"ipc\")\n return false;\n if (client.transport.type === \"fallback\" && (client.transport.transports[0].config.type === \"webSocket\" || client.transport.transports[0].config.type === \"ipc\"))\n return false;\n return true;\n })();\n const pollContractEvent = () => {\n const strict = strict_ ?? false;\n const observerId = stringify([\n \"watchContractEvent\",\n address,\n args,\n batch,\n client.uid,\n eventName,\n pollingInterval,\n strict,\n fromBlock\n ]);\n return observe(observerId, { onLogs, onError }, (emit2) => {\n let previousBlockNumber;\n if (fromBlock !== void 0)\n previousBlockNumber = fromBlock - 1n;\n let filter;\n let initialized = false;\n const unwatch = poll(async () => {\n if (!initialized) {\n try {\n filter = await getAction(client, createContractEventFilter, \"createContractEventFilter\")({\n abi: abi2,\n address,\n args,\n eventName,\n strict,\n fromBlock\n });\n } catch {\n }\n initialized = true;\n return;\n }\n try {\n let logs;\n if (filter) {\n logs = await getAction(client, getFilterChanges, \"getFilterChanges\")({ filter });\n } else {\n const blockNumber = await getAction(client, getBlockNumber, \"getBlockNumber\")({});\n if (previousBlockNumber && previousBlockNumber < blockNumber) {\n logs = await getAction(client, getContractEvents, \"getContractEvents\")({\n abi: abi2,\n address,\n args,\n eventName,\n fromBlock: previousBlockNumber + 1n,\n toBlock: blockNumber,\n strict\n });\n } else {\n logs = [];\n }\n previousBlockNumber = blockNumber;\n }\n if (logs.length === 0)\n return;\n if (batch)\n emit2.onLogs(logs);\n else\n for (const log of logs)\n emit2.onLogs([log]);\n } catch (err) {\n if (filter && err instanceof InvalidInputRpcError)\n initialized = false;\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval\n });\n return async () => {\n if (filter)\n await getAction(client, uninstallFilter, \"uninstallFilter\")({ filter });\n unwatch();\n };\n });\n };\n const subscribeContractEvent = () => {\n const strict = strict_ ?? false;\n const observerId = stringify([\n \"watchContractEvent\",\n address,\n args,\n batch,\n client.uid,\n eventName,\n pollingInterval,\n strict\n ]);\n let active = true;\n let unsubscribe = () => active = false;\n return observe(observerId, { onLogs, onError }, (emit2) => {\n ;\n (async () => {\n try {\n const transport = (() => {\n if (client.transport.type === \"fallback\") {\n const transport2 = client.transport.transports.find((transport3) => transport3.config.type === \"webSocket\" || transport3.config.type === \"ipc\");\n if (!transport2)\n return client.transport;\n return transport2.value;\n }\n return client.transport;\n })();\n const topics = eventName ? encodeEventTopics({\n abi: abi2,\n eventName,\n args\n }) : [];\n const { unsubscribe: unsubscribe_ } = await transport.subscribe({\n params: [\"logs\", { address, topics }],\n onData(data) {\n if (!active)\n return;\n const log = data.result;\n try {\n const { eventName: eventName2, args: args2 } = decodeEventLog({\n abi: abi2,\n data: log.data,\n topics: log.topics,\n strict: strict_\n });\n const formatted = formatLog(log, {\n args: args2,\n eventName: eventName2\n });\n emit2.onLogs([formatted]);\n } catch (err) {\n let eventName2;\n let isUnnamed;\n if (err instanceof DecodeLogDataMismatch || err instanceof DecodeLogTopicsMismatch) {\n if (strict_)\n return;\n eventName2 = err.abiItem.name;\n isUnnamed = err.abiItem.inputs?.some((x4) => !(\"name\" in x4 && x4.name));\n }\n const formatted = formatLog(log, {\n args: isUnnamed ? [] : {},\n eventName: eventName2\n });\n emit2.onLogs([formatted]);\n }\n },\n onError(error) {\n emit2.onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n });\n };\n return enablePolling ? pollContractEvent() : subscribeContractEvent();\n }\n var init_watchContractEvent = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchContractEvent.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_rpc();\n init_decodeEventLog();\n init_encodeEventTopics();\n init_log2();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_createContractEventFilter();\n init_getBlockNumber();\n init_getContractEvents();\n init_getFilterChanges();\n init_uninstallFilter();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/account.js\n var AccountNotFoundError, AccountTypeNotSupportedError;\n var init_account = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/account.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n AccountNotFoundError = class extends BaseError2 {\n constructor({ docsPath: docsPath8 } = {}) {\n super([\n \"Could not find an Account to execute with this Action.\",\n \"Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.\"\n ].join(\"\\n\"), {\n docsPath: docsPath8,\n docsSlug: \"account\",\n name: \"AccountNotFoundError\"\n });\n }\n };\n AccountTypeNotSupportedError = class extends BaseError2 {\n constructor({ docsPath: docsPath8, metaMessages, type }) {\n super(`Account type \"${type}\" is not supported.`, {\n docsPath: docsPath8,\n metaMessages,\n name: \"AccountTypeNotSupportedError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/assertCurrentChain.js\n function assertCurrentChain({ chain: chain2, currentChainId }) {\n if (!chain2)\n throw new ChainNotFoundError();\n if (currentChainId !== chain2.id)\n throw new ChainMismatchError({ chain: chain2, currentChainId });\n }\n var init_assertCurrentChain = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/assertCurrentChain.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chain();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getTransactionError.js\n function getTransactionError(err, { docsPath: docsPath8, ...args }) {\n const cause = (() => {\n const cause2 = getNodeError(err, args);\n if (cause2 instanceof UnknownNodeError)\n return err;\n return cause2;\n })();\n return new TransactionExecutionError(cause, {\n docsPath: docsPath8,\n ...args\n });\n }\n var init_getTransactionError = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/errors/getTransactionError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_node();\n init_transaction();\n init_getNodeError();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendRawTransaction.js\n async function sendRawTransaction(client, { serializedTransaction }) {\n return client.request({\n method: \"eth_sendRawTransaction\",\n params: [serializedTransaction]\n }, { retryCount: 0 });\n }\n var init_sendRawTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendRawTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendTransaction.js\n async function sendTransaction(client, parameters) {\n const { account: account_ = client.account, chain: chain2 = client.chain, accessList, authorizationList, blobs, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, type, value, ...rest } = parameters;\n if (typeof account_ === \"undefined\")\n throw new AccountNotFoundError({\n docsPath: \"/docs/actions/wallet/sendTransaction\"\n });\n const account = account_ ? parseAccount(account_) : null;\n try {\n assertRequest(parameters);\n const to = await (async () => {\n if (parameters.to)\n return parameters.to;\n if (parameters.to === null)\n return void 0;\n if (authorizationList && authorizationList.length > 0)\n return await recoverAuthorizationAddress({\n authorization: authorizationList[0]\n }).catch(() => {\n throw new BaseError2(\"`to` is required. Could not infer from `authorizationList`.\");\n });\n return void 0;\n })();\n if (account?.type === \"json-rpc\" || account === null) {\n let chainId;\n if (chain2 !== null) {\n chainId = await getAction(client, getChainId, \"getChainId\")({});\n assertCurrentChain({\n currentChainId: chainId,\n chain: chain2\n });\n }\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n accessList,\n account,\n authorizationList,\n blobs,\n chainId,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n type,\n value\n }, \"sendTransaction\");\n const isWalletNamespaceSupported = supportsWalletNamespace.get(client.uid);\n const method = isWalletNamespaceSupported ? \"wallet_sendTransaction\" : \"eth_sendTransaction\";\n try {\n return await client.request({\n method,\n params: [request]\n }, { retryCount: 0 });\n } catch (e2) {\n if (isWalletNamespaceSupported === false)\n throw e2;\n const error = e2;\n if (error.name === \"InvalidInputRpcError\" || error.name === \"InvalidParamsRpcError\" || error.name === \"MethodNotFoundRpcError\" || error.name === \"MethodNotSupportedRpcError\") {\n return await client.request({\n method: \"wallet_sendTransaction\",\n params: [request]\n }, { retryCount: 0 }).then((hash3) => {\n supportsWalletNamespace.set(client.uid, true);\n return hash3;\n }).catch((e3) => {\n const walletNamespaceError = e3;\n if (walletNamespaceError.name === \"MethodNotFoundRpcError\" || walletNamespaceError.name === \"MethodNotSupportedRpcError\") {\n supportsWalletNamespace.set(client.uid, false);\n throw error;\n }\n throw walletNamespaceError;\n });\n }\n throw error;\n }\n }\n if (account?.type === \"local\") {\n const request = await getAction(client, prepareTransactionRequest, \"prepareTransactionRequest\")({\n account,\n accessList,\n authorizationList,\n blobs,\n chain: chain2,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n nonceManager: account.nonceManager,\n parameters: [...defaultParameters, \"sidecars\"],\n type,\n value,\n ...rest,\n to\n });\n const serializer = chain2?.serializers?.transaction;\n const serializedTransaction = await account.signTransaction(request, {\n serializer\n });\n return await getAction(client, sendRawTransaction, \"sendRawTransaction\")({\n serializedTransaction\n });\n }\n if (account?.type === \"smart\")\n throw new AccountTypeNotSupportedError({\n metaMessages: [\n \"Consider using the `sendUserOperation` Action instead.\"\n ],\n docsPath: \"/docs/actions/bundler/sendUserOperation\",\n type: \"smart\"\n });\n throw new AccountTypeNotSupportedError({\n docsPath: \"/docs/actions/wallet/sendTransaction\",\n type: account?.type\n });\n } catch (err) {\n if (err instanceof AccountTypeNotSupportedError)\n throw err;\n throw getTransactionError(err, {\n ...parameters,\n account,\n chain: parameters.chain || void 0\n });\n }\n }\n var supportsWalletNamespace;\n var init_sendTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_account();\n init_base();\n init_recoverAuthorizationAddress();\n init_assertCurrentChain();\n init_getTransactionError();\n init_extract();\n init_transactionRequest();\n init_getAction();\n init_lru();\n init_assertRequest();\n init_getChainId();\n init_prepareTransactionRequest();\n init_sendRawTransaction();\n supportsWalletNamespace = new LruMap(128);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/writeContract.js\n async function writeContract(client, parameters) {\n return writeContract.internal(client, sendTransaction, \"sendTransaction\", parameters);\n }\n var init_writeContract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/writeContract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_account();\n init_encodeFunctionData();\n init_getContractError();\n init_getAction();\n init_sendTransaction();\n (function(writeContract2) {\n async function internal(client, actionFn, name, parameters) {\n const { abi: abi2, account: account_ = client.account, address, args, dataSuffix, functionName, ...request } = parameters;\n if (typeof account_ === \"undefined\")\n throw new AccountNotFoundError({\n docsPath: \"/docs/contract/writeContract\"\n });\n const account = account_ ? parseAccount(account_) : null;\n const data = encodeFunctionData({\n abi: abi2,\n args,\n functionName\n });\n try {\n return await getAction(client, actionFn, name)({\n data: `${data}${dataSuffix ? dataSuffix.replace(\"0x\", \"\") : \"\"}`,\n to: address,\n account,\n ...request\n });\n } catch (error) {\n throw getContractError(error, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/writeContract\",\n functionName,\n sender: account?.address\n });\n }\n }\n writeContract2.internal = internal;\n })(writeContract || (writeContract = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/getContract.js\n function getContract({ abi: abi2, address, client: client_ }) {\n const client = client_;\n const [publicClient, walletClient] = (() => {\n if (!client)\n return [void 0, void 0];\n if (\"public\" in client && \"wallet\" in client)\n return [client.public, client.wallet];\n if (\"public\" in client)\n return [client.public, void 0];\n if (\"wallet\" in client)\n return [void 0, client.wallet];\n return [client, client];\n })();\n const hasPublicClient = publicClient !== void 0 && publicClient !== null;\n const hasWalletClient = walletClient !== void 0 && walletClient !== null;\n const contract = {};\n let hasReadFunction = false;\n let hasWriteFunction = false;\n let hasEvent = false;\n for (const item of abi2) {\n if (item.type === \"function\")\n if (item.stateMutability === \"view\" || item.stateMutability === \"pure\")\n hasReadFunction = true;\n else\n hasWriteFunction = true;\n else if (item.type === \"event\")\n hasEvent = true;\n if (hasReadFunction && hasWriteFunction && hasEvent)\n break;\n }\n if (hasPublicClient) {\n if (hasReadFunction)\n contract.read = new Proxy({}, {\n get(_2, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n return getAction(publicClient, readContract, \"readContract\")({\n abi: abi2,\n address,\n functionName,\n args,\n ...options\n });\n };\n }\n });\n if (hasWriteFunction)\n contract.simulate = new Proxy({}, {\n get(_2, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n return getAction(publicClient, simulateContract, \"simulateContract\")({\n abi: abi2,\n address,\n functionName,\n args,\n ...options\n });\n };\n }\n });\n if (hasEvent) {\n contract.createEventFilter = new Proxy({}, {\n get(_2, eventName) {\n return (...parameters) => {\n const abiEvent = abi2.find((x4) => x4.type === \"event\" && x4.name === eventName);\n const { args, options } = getEventParameters(parameters, abiEvent);\n return getAction(publicClient, createContractEventFilter, \"createContractEventFilter\")({\n abi: abi2,\n address,\n eventName,\n args,\n ...options\n });\n };\n }\n });\n contract.getEvents = new Proxy({}, {\n get(_2, eventName) {\n return (...parameters) => {\n const abiEvent = abi2.find((x4) => x4.type === \"event\" && x4.name === eventName);\n const { args, options } = getEventParameters(parameters, abiEvent);\n return getAction(publicClient, getContractEvents, \"getContractEvents\")({\n abi: abi2,\n address,\n eventName,\n args,\n ...options\n });\n };\n }\n });\n contract.watchEvent = new Proxy({}, {\n get(_2, eventName) {\n return (...parameters) => {\n const abiEvent = abi2.find((x4) => x4.type === \"event\" && x4.name === eventName);\n const { args, options } = getEventParameters(parameters, abiEvent);\n return getAction(publicClient, watchContractEvent, \"watchContractEvent\")({\n abi: abi2,\n address,\n eventName,\n args,\n ...options\n });\n };\n }\n });\n }\n }\n if (hasWalletClient) {\n if (hasWriteFunction)\n contract.write = new Proxy({}, {\n get(_2, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n return getAction(walletClient, writeContract, \"writeContract\")({\n abi: abi2,\n address,\n functionName,\n args,\n ...options\n });\n };\n }\n });\n }\n if (hasPublicClient || hasWalletClient) {\n if (hasWriteFunction)\n contract.estimateGas = new Proxy({}, {\n get(_2, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n const client2 = publicClient ?? walletClient;\n return getAction(client2, estimateContractGas, \"estimateContractGas\")({\n abi: abi2,\n address,\n functionName,\n args,\n ...options,\n account: options.account ?? walletClient.account\n });\n };\n }\n });\n }\n contract.address = address;\n contract.abi = abi2;\n return contract;\n }\n function getFunctionParameters(values) {\n const hasArgs = values.length && Array.isArray(values[0]);\n const args = hasArgs ? values[0] : [];\n const options = (hasArgs ? values[1] : values[0]) ?? {};\n return { args, options };\n }\n function getEventParameters(values, abiEvent) {\n let hasArgs = false;\n if (Array.isArray(values[0]))\n hasArgs = true;\n else if (values.length === 1) {\n hasArgs = abiEvent.inputs.some((x4) => x4.indexed);\n } else if (values.length === 2) {\n hasArgs = true;\n }\n const args = hasArgs ? values[0] : void 0;\n const options = (hasArgs ? values[1] : values[0]) ?? {};\n return { args, options };\n }\n var init_getContract = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/getContract.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAction();\n init_createContractEventFilter();\n init_estimateContractGas();\n init_getContractEvents();\n init_readContract();\n init_simulateContract();\n init_watchContractEvent();\n init_writeContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withRetry.js\n function withRetry(fn, { delay: delay_ = 100, retryCount = 2, shouldRetry: shouldRetry2 = () => true } = {}) {\n return new Promise((resolve, reject) => {\n const attemptRetry = async ({ count = 0 } = {}) => {\n const retry = async ({ error }) => {\n const delay = typeof delay_ === \"function\" ? delay_({ count, error }) : delay_;\n if (delay)\n await wait(delay);\n attemptRetry({ count: count + 1 });\n };\n try {\n const data = await fn();\n resolve(data);\n } catch (err) {\n if (count < retryCount && await shouldRetry2({ count, error: err }))\n return retry({ error: err });\n reject(err);\n }\n };\n attemptRetry();\n });\n }\n var init_withRetry = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withRetry.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_wait();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transactionReceipt.js\n function formatTransactionReceipt(transactionReceipt, _2) {\n const receipt = {\n ...transactionReceipt,\n blockNumber: transactionReceipt.blockNumber ? BigInt(transactionReceipt.blockNumber) : null,\n contractAddress: transactionReceipt.contractAddress ? transactionReceipt.contractAddress : null,\n cumulativeGasUsed: transactionReceipt.cumulativeGasUsed ? BigInt(transactionReceipt.cumulativeGasUsed) : null,\n effectiveGasPrice: transactionReceipt.effectiveGasPrice ? BigInt(transactionReceipt.effectiveGasPrice) : null,\n gasUsed: transactionReceipt.gasUsed ? BigInt(transactionReceipt.gasUsed) : null,\n logs: transactionReceipt.logs ? transactionReceipt.logs.map((log) => formatLog(log)) : null,\n to: transactionReceipt.to ? transactionReceipt.to : null,\n transactionIndex: transactionReceipt.transactionIndex ? hexToNumber(transactionReceipt.transactionIndex) : null,\n status: transactionReceipt.status ? receiptStatuses[transactionReceipt.status] : null,\n type: transactionReceipt.type ? transactionType[transactionReceipt.type] || transactionReceipt.type : null\n };\n if (transactionReceipt.blobGasPrice)\n receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice);\n if (transactionReceipt.blobGasUsed)\n receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed);\n return receipt;\n }\n var receiptStatuses, defineTransactionReceipt;\n var init_transactionReceipt = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/transactionReceipt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_formatter();\n init_log2();\n init_transaction2();\n receiptStatuses = {\n \"0x0\": \"reverted\",\n \"0x1\": \"success\"\n };\n defineTransactionReceipt = /* @__PURE__ */ defineFormatter(\"transactionReceipt\", formatTransactionReceipt);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/uid.js\n function uid(length = 11) {\n if (!buffer || index + length > size4 * 2) {\n buffer = \"\";\n index = 0;\n for (let i3 = 0; i3 < size4; i3++) {\n buffer += (256 + Math.random() * 256 | 0).toString(16).substring(1);\n }\n }\n return buffer.substring(index, index++ + length);\n }\n var size4, index, buffer;\n var init_uid = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/uid.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n size4 = 256;\n index = size4;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/createClient.js\n function createClient(parameters) {\n const { batch, chain: chain2, ccipRead, key = \"base\", name = \"Base Client\", type = \"base\" } = parameters;\n const experimental_blockTag = parameters.experimental_blockTag ?? (typeof chain2?.experimental_preconfirmationTime === \"number\" ? \"pending\" : void 0);\n const blockTime = chain2?.blockTime ?? 12e3;\n const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4e3);\n const pollingInterval = parameters.pollingInterval ?? defaultPollingInterval;\n const cacheTime = parameters.cacheTime ?? pollingInterval;\n const account = parameters.account ? parseAccount(parameters.account) : void 0;\n const { config: config2, request, value } = parameters.transport({\n chain: chain2,\n pollingInterval\n });\n const transport = { ...config2, ...value };\n const client = {\n account,\n batch,\n cacheTime,\n ccipRead,\n chain: chain2,\n key,\n name,\n pollingInterval,\n request,\n transport,\n type,\n uid: uid(),\n ...experimental_blockTag ? { experimental_blockTag } : {}\n };\n function extend(base4) {\n return (extendFn) => {\n const extended = extendFn(base4);\n for (const key2 in client)\n delete extended[key2];\n const combined = { ...base4, ...extended };\n return Object.assign(combined, { extend: extend(combined) });\n };\n }\n return Object.assign(client, { extend: extend(client) });\n }\n var init_createClient = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/createClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_uid();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/errors.js\n function isNullUniversalResolverError(err) {\n if (!(err instanceof BaseError2))\n return false;\n const cause = err.walk((e2) => e2 instanceof ContractFunctionRevertedError);\n if (!(cause instanceof ContractFunctionRevertedError))\n return false;\n if (cause.data?.errorName === \"HttpError\")\n return true;\n if (cause.data?.errorName === \"ResolverError\")\n return true;\n if (cause.data?.errorName === \"ResolverNotContract\")\n return true;\n if (cause.data?.errorName === \"ResolverNotFound\")\n return true;\n if (cause.data?.errorName === \"ReverseAddressMismatch\")\n return true;\n if (cause.data?.errorName === \"UnsupportedResolverProfile\")\n return true;\n return false;\n }\n var init_errors5 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_contract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/encodedLabelToLabelhash.js\n function encodedLabelToLabelhash(label) {\n if (label.length !== 66)\n return null;\n if (label.indexOf(\"[\") !== 0)\n return null;\n if (label.indexOf(\"]\") !== 65)\n return null;\n const hash3 = `0x${label.slice(1, 65)}`;\n if (!isHex(hash3))\n return null;\n return hash3;\n }\n var init_encodedLabelToLabelhash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/encodedLabelToLabelhash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/namehash.js\n function namehash(name) {\n let result = new Uint8Array(32).fill(0);\n if (!name)\n return bytesToHex(result);\n const labels = name.split(\".\");\n for (let i3 = labels.length - 1; i3 >= 0; i3 -= 1) {\n const hashFromEncodedLabel = encodedLabelToLabelhash(labels[i3]);\n const hashed = hashFromEncodedLabel ? toBytes(hashFromEncodedLabel) : keccak256(stringToBytes(labels[i3]), \"bytes\");\n result = keccak256(concat2([result, hashed]), \"bytes\");\n }\n return bytesToHex(result);\n }\n var init_namehash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/namehash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_concat();\n init_toBytes();\n init_toHex();\n init_keccak256();\n init_encodedLabelToLabelhash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/encodeLabelhash.js\n function encodeLabelhash(hash3) {\n return `[${hash3.slice(2)}]`;\n }\n var init_encodeLabelhash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/encodeLabelhash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/labelhash.js\n function labelhash(label) {\n const result = new Uint8Array(32).fill(0);\n if (!label)\n return bytesToHex(result);\n return encodedLabelToLabelhash(label) || keccak256(stringToBytes(label));\n }\n var init_labelhash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/labelhash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_toHex();\n init_keccak256();\n init_encodedLabelToLabelhash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/packetToBytes.js\n function packetToBytes(packet) {\n const value = packet.replace(/^\\.|\\.$/gm, \"\");\n if (value.length === 0)\n return new Uint8Array(1);\n const bytes = new Uint8Array(stringToBytes(value).byteLength + 2);\n let offset = 0;\n const list = value.split(\".\");\n for (let i3 = 0; i3 < list.length; i3++) {\n let encoded = stringToBytes(list[i3]);\n if (encoded.byteLength > 255)\n encoded = stringToBytes(encodeLabelhash(labelhash(list[i3])));\n bytes[offset] = encoded.length;\n bytes.set(encoded, offset + 1);\n offset += encoded.length + 1;\n }\n if (bytes.byteLength !== offset + 1)\n return bytes.slice(0, offset + 1);\n return bytes;\n }\n var init_packetToBytes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/packetToBytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toBytes();\n init_encodeLabelhash();\n init_labelhash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsAddress.js\n async function getEnsAddress(client, parameters) {\n const { blockNumber, blockTag, coinType, name, gatewayUrls, strict } = parameters;\n const { chain: chain2 } = client;\n const universalResolverAddress = (() => {\n if (parameters.universalResolverAddress)\n return parameters.universalResolverAddress;\n if (!chain2)\n throw new Error(\"client chain not configured. universalResolverAddress is required.\");\n return getChainContractAddress({\n blockNumber,\n chain: chain2,\n contract: \"ensUniversalResolver\"\n });\n })();\n const tlds = chain2?.ensTlds;\n if (tlds && !tlds.some((tld) => name.endsWith(tld)))\n return null;\n const args = (() => {\n if (coinType != null)\n return [namehash(name), BigInt(coinType)];\n return [namehash(name)];\n })();\n try {\n const functionData = encodeFunctionData({\n abi: addressResolverAbi,\n functionName: \"addr\",\n args\n });\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverResolveAbi,\n functionName: \"resolveWithGateways\",\n args: [\n toHex(packetToBytes(name)),\n functionData,\n gatewayUrls ?? [localBatchGatewayUrl]\n ],\n blockNumber,\n blockTag\n };\n const readContractAction = getAction(client, readContract, \"readContract\");\n const res = await readContractAction(readContractParameters);\n if (res[0] === \"0x\")\n return null;\n const address = decodeFunctionResult({\n abi: addressResolverAbi,\n args,\n functionName: \"addr\",\n data: res[0]\n });\n if (address === \"0x\")\n return null;\n if (trim(address) === \"0x00\")\n return null;\n return address;\n } catch (err) {\n if (strict)\n throw err;\n if (isNullUniversalResolverError(err))\n return null;\n throw err;\n }\n }\n var init_getEnsAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getChainContractAddress();\n init_trim();\n init_toHex();\n init_errors5();\n init_localBatchGatewayRequest();\n init_namehash();\n init_packetToBytes();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/ens.js\n var EnsAvatarInvalidMetadataError, EnsAvatarInvalidNftUriError, EnsAvatarUriResolutionError, EnsAvatarUnsupportedNamespaceError;\n var init_ens = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/ens.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n EnsAvatarInvalidMetadataError = class extends BaseError2 {\n constructor({ data }) {\n super(\"Unable to extract image from metadata. The metadata may be malformed or invalid.\", {\n metaMessages: [\n \"- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.\",\n \"\",\n `Provided data: ${JSON.stringify(data)}`\n ],\n name: \"EnsAvatarInvalidMetadataError\"\n });\n }\n };\n EnsAvatarInvalidNftUriError = class extends BaseError2 {\n constructor({ reason }) {\n super(`ENS NFT avatar URI is invalid. ${reason}`, {\n name: \"EnsAvatarInvalidNftUriError\"\n });\n }\n };\n EnsAvatarUriResolutionError = class extends BaseError2 {\n constructor({ uri }) {\n super(`Unable to resolve ENS avatar URI \"${uri}\". The URI may be malformed, invalid, or does not respond with a valid image.`, { name: \"EnsAvatarUriResolutionError\" });\n }\n };\n EnsAvatarUnsupportedNamespaceError = class extends BaseError2 {\n constructor({ namespace }) {\n super(`ENS NFT avatar namespace \"${namespace}\" is not supported. Must be \"erc721\" or \"erc1155\".`, { name: \"EnsAvatarUnsupportedNamespaceError\" });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/avatar/utils.js\n async function isImageUri(uri) {\n try {\n const res = await fetch(uri, { method: \"HEAD\" });\n if (res.status === 200) {\n const contentType = res.headers.get(\"content-type\");\n return contentType?.startsWith(\"image/\");\n }\n return false;\n } catch (error) {\n if (typeof error === \"object\" && typeof error.response !== \"undefined\") {\n return false;\n }\n if (!Object.hasOwn(globalThis, \"Image\"))\n return false;\n return new Promise((resolve) => {\n const img = new Image();\n img.onload = () => {\n resolve(true);\n };\n img.onerror = () => {\n resolve(false);\n };\n img.src = uri;\n });\n }\n }\n function getGateway(custom3, defaultGateway) {\n if (!custom3)\n return defaultGateway;\n if (custom3.endsWith(\"/\"))\n return custom3.slice(0, -1);\n return custom3;\n }\n function resolveAvatarUri({ uri, gatewayUrls }) {\n const isEncoded = base64Regex.test(uri);\n if (isEncoded)\n return { uri, isOnChain: true, isEncoded };\n const ipfsGateway = getGateway(gatewayUrls?.ipfs, \"https://ipfs.io\");\n const arweaveGateway = getGateway(gatewayUrls?.arweave, \"https://arweave.net\");\n const networkRegexMatch = uri.match(networkRegex);\n const { protocol, subpath, target, subtarget = \"\" } = networkRegexMatch?.groups || {};\n const isIPNS = protocol === \"ipns:/\" || subpath === \"ipns/\";\n const isIPFS = protocol === \"ipfs:/\" || subpath === \"ipfs/\" || ipfsHashRegex.test(uri);\n if (uri.startsWith(\"http\") && !isIPNS && !isIPFS) {\n let replacedUri = uri;\n if (gatewayUrls?.arweave)\n replacedUri = uri.replace(/https:\\/\\/arweave.net/g, gatewayUrls?.arweave);\n return { uri: replacedUri, isOnChain: false, isEncoded: false };\n }\n if ((isIPNS || isIPFS) && target) {\n return {\n uri: `${ipfsGateway}/${isIPNS ? \"ipns\" : \"ipfs\"}/${target}${subtarget}`,\n isOnChain: false,\n isEncoded: false\n };\n }\n if (protocol === \"ar:/\" && target) {\n return {\n uri: `${arweaveGateway}/${target}${subtarget || \"\"}`,\n isOnChain: false,\n isEncoded: false\n };\n }\n let parsedUri = uri.replace(dataURIRegex, \"\");\n if (parsedUri.startsWith(\" res2.json());\n const image = await parseAvatarUri({\n gatewayUrls,\n uri: getJsonImage(res)\n });\n return image;\n } catch {\n throw new EnsAvatarUriResolutionError({ uri });\n }\n }\n async function parseAvatarUri({ gatewayUrls, uri }) {\n const { uri: resolvedURI, isOnChain } = resolveAvatarUri({ uri, gatewayUrls });\n if (isOnChain)\n return resolvedURI;\n const isImage = await isImageUri(resolvedURI);\n if (isImage)\n return resolvedURI;\n throw new EnsAvatarUriResolutionError({ uri });\n }\n function parseNftUri(uri_) {\n let uri = uri_;\n if (uri.startsWith(\"did:nft:\")) {\n uri = uri.replace(\"did:nft:\", \"\").replace(/_/g, \"/\");\n }\n const [reference, asset_namespace, tokenID] = uri.split(\"/\");\n const [eip_namespace, chainID] = reference.split(\":\");\n const [erc_namespace, contractAddress] = asset_namespace.split(\":\");\n if (!eip_namespace || eip_namespace.toLowerCase() !== \"eip155\")\n throw new EnsAvatarInvalidNftUriError({ reason: \"Only EIP-155 supported\" });\n if (!chainID)\n throw new EnsAvatarInvalidNftUriError({ reason: \"Chain ID not found\" });\n if (!contractAddress)\n throw new EnsAvatarInvalidNftUriError({\n reason: \"Contract address not found\"\n });\n if (!tokenID)\n throw new EnsAvatarInvalidNftUriError({ reason: \"Token ID not found\" });\n if (!erc_namespace)\n throw new EnsAvatarInvalidNftUriError({ reason: \"ERC namespace not found\" });\n return {\n chainID: Number.parseInt(chainID, 10),\n namespace: erc_namespace.toLowerCase(),\n contractAddress,\n tokenID\n };\n }\n async function getNftTokenUri(client, { nft }) {\n if (nft.namespace === \"erc721\") {\n return readContract(client, {\n address: nft.contractAddress,\n abi: [\n {\n name: \"tokenURI\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [{ name: \"tokenId\", type: \"uint256\" }],\n outputs: [{ name: \"\", type: \"string\" }]\n }\n ],\n functionName: \"tokenURI\",\n args: [BigInt(nft.tokenID)]\n });\n }\n if (nft.namespace === \"erc1155\") {\n return readContract(client, {\n address: nft.contractAddress,\n abi: [\n {\n name: \"uri\",\n type: \"function\",\n stateMutability: \"view\",\n inputs: [{ name: \"_id\", type: \"uint256\" }],\n outputs: [{ name: \"\", type: \"string\" }]\n }\n ],\n functionName: \"uri\",\n args: [BigInt(nft.tokenID)]\n });\n }\n throw new EnsAvatarUnsupportedNamespaceError({ namespace: nft.namespace });\n }\n var networkRegex, ipfsHashRegex, base64Regex, dataURIRegex;\n var init_utils6 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/avatar/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_readContract();\n init_ens();\n networkRegex = /(?https?:\\/\\/[^/]*|ipfs:\\/|ipns:\\/|ar:\\/)?(?\\/)?(?ipfs\\/|ipns\\/)?(?[\\w\\-.]+)(?\\/.*)?/;\n ipfsHashRegex = /^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\\/(?[\\w\\-.]+))?(?\\/.*)?$/;\n base64Regex = /^data:([a-zA-Z\\-/+]*);base64,([^\"].*)/;\n dataURIRegex = /^data:([a-zA-Z\\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/avatar/parseAvatarRecord.js\n async function parseAvatarRecord(client, { gatewayUrls, record }) {\n if (/eip155:/i.test(record))\n return parseNftAvatarUri(client, { gatewayUrls, record });\n return parseAvatarUri({ uri: record, gatewayUrls });\n }\n async function parseNftAvatarUri(client, { gatewayUrls, record }) {\n const nft = parseNftUri(record);\n const nftUri = await getNftTokenUri(client, { nft });\n const { uri: resolvedNftUri, isOnChain, isEncoded } = resolveAvatarUri({ uri: nftUri, gatewayUrls });\n if (isOnChain && (resolvedNftUri.includes(\"data:application/json;base64,\") || resolvedNftUri.startsWith(\"{\"))) {\n const encodedJson = isEncoded ? (\n // if it is encoded, decode it\n atob(resolvedNftUri.replace(\"data:application/json;base64,\", \"\"))\n ) : (\n // if it isn't encoded assume it is a JSON string, but it could be anything (it will error if it is)\n resolvedNftUri\n );\n const decoded = JSON.parse(encodedJson);\n return parseAvatarUri({ uri: getJsonImage(decoded), gatewayUrls });\n }\n let uriTokenId = nft.tokenID;\n if (nft.namespace === \"erc1155\")\n uriTokenId = uriTokenId.replace(\"0x\", \"\").padStart(64, \"0\");\n return getMetadataAvatarUri({\n gatewayUrls,\n uri: resolvedNftUri.replace(/(?:0x)?{id}/, uriTokenId)\n });\n }\n var init_parseAvatarRecord = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/ens/avatar/parseAvatarRecord.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils6();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsText.js\n async function getEnsText(client, parameters) {\n const { blockNumber, blockTag, key, name, gatewayUrls, strict } = parameters;\n const { chain: chain2 } = client;\n const universalResolverAddress = (() => {\n if (parameters.universalResolverAddress)\n return parameters.universalResolverAddress;\n if (!chain2)\n throw new Error(\"client chain not configured. universalResolverAddress is required.\");\n return getChainContractAddress({\n blockNumber,\n chain: chain2,\n contract: \"ensUniversalResolver\"\n });\n })();\n const tlds = chain2?.ensTlds;\n if (tlds && !tlds.some((tld) => name.endsWith(tld)))\n return null;\n try {\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverResolveAbi,\n args: [\n toHex(packetToBytes(name)),\n encodeFunctionData({\n abi: textResolverAbi,\n functionName: \"text\",\n args: [namehash(name), key]\n }),\n gatewayUrls ?? [localBatchGatewayUrl]\n ],\n functionName: \"resolveWithGateways\",\n blockNumber,\n blockTag\n };\n const readContractAction = getAction(client, readContract, \"readContract\");\n const res = await readContractAction(readContractParameters);\n if (res[0] === \"0x\")\n return null;\n const record = decodeFunctionResult({\n abi: textResolverAbi,\n functionName: \"text\",\n data: res[0]\n });\n return record === \"\" ? null : record;\n } catch (err) {\n if (strict)\n throw err;\n if (isNullUniversalResolverError(err))\n return null;\n throw err;\n }\n }\n var init_getEnsText = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsText.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getChainContractAddress();\n init_toHex();\n init_errors5();\n init_localBatchGatewayRequest();\n init_namehash();\n init_packetToBytes();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsAvatar.js\n async function getEnsAvatar(client, { blockNumber, blockTag, assetGatewayUrls, name, gatewayUrls, strict, universalResolverAddress }) {\n const record = await getAction(client, getEnsText, \"getEnsText\")({\n blockNumber,\n blockTag,\n key: \"avatar\",\n name,\n universalResolverAddress,\n gatewayUrls,\n strict\n });\n if (!record)\n return null;\n try {\n return await parseAvatarRecord(client, {\n record,\n gatewayUrls: assetGatewayUrls\n });\n } catch {\n return null;\n }\n }\n var init_getEnsAvatar = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsAvatar.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAvatarRecord();\n init_getAction();\n init_getEnsText();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsName.js\n async function getEnsName(client, parameters) {\n const { address, blockNumber, blockTag, coinType = 60n, gatewayUrls, strict } = parameters;\n const { chain: chain2 } = client;\n const universalResolverAddress = (() => {\n if (parameters.universalResolverAddress)\n return parameters.universalResolverAddress;\n if (!chain2)\n throw new Error(\"client chain not configured. universalResolverAddress is required.\");\n return getChainContractAddress({\n blockNumber,\n chain: chain2,\n contract: \"ensUniversalResolver\"\n });\n })();\n try {\n const readContractParameters = {\n address: universalResolverAddress,\n abi: universalResolverReverseAbi,\n args: [address, coinType, gatewayUrls ?? [localBatchGatewayUrl]],\n functionName: \"reverseWithGateways\",\n blockNumber,\n blockTag\n };\n const readContractAction = getAction(client, readContract, \"readContract\");\n const [name] = await readContractAction(readContractParameters);\n return name || null;\n } catch (err) {\n if (strict)\n throw err;\n if (isNullUniversalResolverError(err))\n return null;\n throw err;\n }\n }\n var init_getEnsName = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsName.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_getChainContractAddress();\n init_errors5();\n init_localBatchGatewayRequest();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsResolver.js\n async function getEnsResolver(client, parameters) {\n const { blockNumber, blockTag, name } = parameters;\n const { chain: chain2 } = client;\n const universalResolverAddress = (() => {\n if (parameters.universalResolverAddress)\n return parameters.universalResolverAddress;\n if (!chain2)\n throw new Error(\"client chain not configured. universalResolverAddress is required.\");\n return getChainContractAddress({\n blockNumber,\n chain: chain2,\n contract: \"ensUniversalResolver\"\n });\n })();\n const tlds = chain2?.ensTlds;\n if (tlds && !tlds.some((tld) => name.endsWith(tld)))\n throw new Error(`${name} is not a valid ENS TLD (${tlds?.join(\", \")}) for chain \"${chain2.name}\" (id: ${chain2.id}).`);\n const [resolverAddress] = await getAction(client, readContract, \"readContract\")({\n address: universalResolverAddress,\n abi: [\n {\n inputs: [{ type: \"bytes\" }],\n name: \"findResolver\",\n outputs: [\n { type: \"address\" },\n { type: \"bytes32\" },\n { type: \"uint256\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ],\n functionName: \"findResolver\",\n args: [toHex(packetToBytes(name))],\n blockNumber,\n blockTag\n });\n return resolverAddress;\n }\n var init_getEnsResolver = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/ens/getEnsResolver.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getChainContractAddress();\n init_toHex();\n init_packetToBytes();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createAccessList.js\n async function createAccessList(client, args) {\n const { account: account_ = client.account, blockNumber, blockTag = \"latest\", blobs, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, to, value, ...rest } = args;\n const account = account_ ? parseAccount(account_) : void 0;\n try {\n assertRequest(args);\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n account,\n blobs,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n to,\n value\n }, \"createAccessList\");\n const response = await client.request({\n method: \"eth_createAccessList\",\n params: [request, block]\n });\n return {\n accessList: response.accessList,\n gasUsed: BigInt(response.gasUsed)\n };\n } catch (err) {\n throw getCallError(err, {\n ...args,\n account,\n chain: client.chain\n });\n }\n }\n var init_createAccessList = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createAccessList.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseAccount();\n init_toHex();\n init_getCallError();\n init_extract();\n init_transactionRequest();\n init_assertRequest();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createBlockFilter.js\n async function createBlockFilter(client) {\n const getRequest = createFilterRequestScope(client, {\n method: \"eth_newBlockFilter\"\n });\n const id = await client.request({\n method: \"eth_newBlockFilter\"\n });\n return { id, request: getRequest(id), type: \"block\" };\n }\n var init_createBlockFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createBlockFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_createFilterRequestScope();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createEventFilter.js\n async function createEventFilter(client, { address, args, event, events: events_, fromBlock, strict, toBlock } = {}) {\n const events = events_ ?? (event ? [event] : void 0);\n const getRequest = createFilterRequestScope(client, {\n method: \"eth_newFilter\"\n });\n let topics = [];\n if (events) {\n const encoded = events.flatMap((event2) => encodeEventTopics({\n abi: [event2],\n eventName: event2.name,\n args\n }));\n topics = [encoded];\n if (event)\n topics = topics[0];\n }\n const id = await client.request({\n method: \"eth_newFilter\",\n params: [\n {\n address,\n fromBlock: typeof fromBlock === \"bigint\" ? numberToHex(fromBlock) : fromBlock,\n toBlock: typeof toBlock === \"bigint\" ? numberToHex(toBlock) : toBlock,\n ...topics.length ? { topics } : {}\n }\n ]\n });\n return {\n abi: events,\n args,\n eventName: event ? event.name : void 0,\n fromBlock,\n id,\n request: getRequest(id),\n strict: Boolean(strict),\n toBlock,\n type: \"event\"\n };\n }\n var init_createEventFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createEventFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encodeEventTopics();\n init_toHex();\n init_createFilterRequestScope();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createPendingTransactionFilter.js\n async function createPendingTransactionFilter(client) {\n const getRequest = createFilterRequestScope(client, {\n method: \"eth_newPendingTransactionFilter\"\n });\n const id = await client.request({\n method: \"eth_newPendingTransactionFilter\"\n });\n return { id, request: getRequest(id), type: \"transaction\" };\n }\n var init_createPendingTransactionFilter = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/createPendingTransactionFilter.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_createFilterRequestScope();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBalance.js\n async function getBalance(client, { address, blockNumber, blockTag = client.experimental_blockTag ?? \"latest\" }) {\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const balance = await client.request({\n method: \"eth_getBalance\",\n params: [address, blockNumberHex || blockTag]\n });\n return BigInt(balance);\n }\n var init_getBalance = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBalance.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlobBaseFee.js\n async function getBlobBaseFee(client) {\n const baseFee = await client.request({\n method: \"eth_blobBaseFee\"\n });\n return BigInt(baseFee);\n }\n var init_getBlobBaseFee = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlobBaseFee.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlockTransactionCount.js\n async function getBlockTransactionCount(client, { blockHash, blockNumber, blockTag = \"latest\" } = {}) {\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n let count;\n if (blockHash) {\n count = await client.request({\n method: \"eth_getBlockTransactionCountByHash\",\n params: [blockHash]\n }, { dedupe: true });\n } else {\n count = await client.request({\n method: \"eth_getBlockTransactionCountByNumber\",\n params: [blockNumberHex || blockTag]\n }, { dedupe: Boolean(blockNumberHex) });\n }\n return hexToNumber(count);\n }\n var init_getBlockTransactionCount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getBlockTransactionCount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getCode.js\n async function getCode(client, { address, blockNumber, blockTag = \"latest\" }) {\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n const hex = await client.request({\n method: \"eth_getCode\",\n params: [address, blockNumberHex || blockTag]\n }, { dedupe: Boolean(blockNumberHex) });\n if (hex === \"0x\")\n return void 0;\n return hex;\n }\n var init_getCode = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getCode.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/eip712.js\n var Eip712DomainNotFoundError;\n var init_eip712 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/eip712.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n Eip712DomainNotFoundError = class extends BaseError2 {\n constructor({ address }) {\n super(`No EIP-712 domain found on contract \"${address}\".`, {\n metaMessages: [\n \"Ensure that:\",\n `- The contract is deployed at the address \"${address}\".`,\n \"- `eip712Domain()` function exists on the contract.\",\n \"- `eip712Domain()` function matches signature to ERC-5267 specification.\"\n ],\n name: \"Eip712DomainNotFoundError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getEip712Domain.js\n async function getEip712Domain(client, parameters) {\n const { address, factory, factoryData } = parameters;\n try {\n const [fields, name, version7, chainId, verifyingContract, salt, extensions] = await getAction(client, readContract, \"readContract\")({\n abi,\n address,\n functionName: \"eip712Domain\",\n factory,\n factoryData\n });\n return {\n domain: {\n name,\n version: version7,\n chainId: Number(chainId),\n verifyingContract,\n salt\n },\n extensions,\n fields\n };\n } catch (e2) {\n const error = e2;\n if (error.name === \"ContractFunctionExecutionError\" && error.cause.name === \"ContractFunctionZeroDataError\") {\n throw new Eip712DomainNotFoundError({ address });\n }\n throw error;\n }\n }\n var abi;\n var init_getEip712Domain = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getEip712Domain.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_eip712();\n init_getAction();\n init_readContract();\n abi = [\n {\n inputs: [],\n name: \"eip712Domain\",\n outputs: [\n { name: \"fields\", type: \"bytes1\" },\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" },\n { name: \"salt\", type: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/feeHistory.js\n function formatFeeHistory(feeHistory) {\n return {\n baseFeePerGas: feeHistory.baseFeePerGas.map((value) => BigInt(value)),\n gasUsedRatio: feeHistory.gasUsedRatio,\n oldestBlock: BigInt(feeHistory.oldestBlock),\n reward: feeHistory.reward?.map((reward) => reward.map((value) => BigInt(value)))\n };\n }\n var init_feeHistory = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/feeHistory.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFeeHistory.js\n async function getFeeHistory(client, { blockCount, blockNumber, blockTag = \"latest\", rewardPercentiles }) {\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const feeHistory = await client.request({\n method: \"eth_feeHistory\",\n params: [\n numberToHex(blockCount),\n blockNumberHex || blockTag,\n rewardPercentiles\n ]\n }, { dedupe: Boolean(blockNumberHex) });\n return formatFeeHistory(feeHistory);\n }\n var init_getFeeHistory = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFeeHistory.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_feeHistory();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFilterLogs.js\n async function getFilterLogs(_client, { filter }) {\n const strict = filter.strict ?? false;\n const logs = await filter.request({\n method: \"eth_getFilterLogs\",\n params: [filter.id]\n });\n const formattedLogs = logs.map((log) => formatLog(log));\n if (!filter.abi)\n return formattedLogs;\n return parseEventLogs({\n abi: filter.abi,\n logs: formattedLogs,\n strict\n });\n }\n var init_getFilterLogs = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getFilterLogs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_parseEventLogs();\n init_log2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodePacked.js\n function encodePacked(types2, values) {\n if (types2.length !== values.length)\n throw new AbiEncodingLengthMismatchError({\n expectedLength: types2.length,\n givenLength: values.length\n });\n const data = [];\n for (let i3 = 0; i3 < types2.length; i3++) {\n const type = types2[i3];\n const value = values[i3];\n data.push(encode3(type, value));\n }\n return concatHex(data);\n }\n function encode3(type, value, isArray = false) {\n if (type === \"address\") {\n const address = value;\n if (!isAddress(address))\n throw new InvalidAddressError({ address });\n return pad(address.toLowerCase(), {\n size: isArray ? 32 : null\n });\n }\n if (type === \"string\")\n return stringToHex(value);\n if (type === \"bytes\")\n return value;\n if (type === \"bool\")\n return pad(boolToHex(value), { size: isArray ? 32 : 1 });\n const intMatch = type.match(integerRegex2);\n if (intMatch) {\n const [_type, baseType, bits = \"256\"] = intMatch;\n const size6 = Number.parseInt(bits, 10) / 8;\n return numberToHex(value, {\n size: isArray ? 32 : size6,\n signed: baseType === \"int\"\n });\n }\n const bytesMatch = type.match(bytesRegex2);\n if (bytesMatch) {\n const [_type, size6] = bytesMatch;\n if (Number.parseInt(size6, 10) !== (value.length - 2) / 2)\n throw new BytesSizeMismatchError({\n expectedSize: Number.parseInt(size6, 10),\n givenSize: (value.length - 2) / 2\n });\n return pad(value, { dir: \"right\", size: isArray ? 32 : null });\n }\n const arrayMatch = type.match(arrayRegex);\n if (arrayMatch && Array.isArray(value)) {\n const [_type, childType] = arrayMatch;\n const data = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n data.push(encode3(childType, value[i3], true));\n }\n if (data.length === 0)\n return \"0x\";\n return concatHex(data);\n }\n throw new UnsupportedPackedAbiType(type);\n }\n var init_encodePacked = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/abi/encodePacked.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_address();\n init_isAddress();\n init_concat();\n init_pad();\n init_toHex();\n init_regex2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/isBytes.js\n function isBytes3(value) {\n if (!value)\n return false;\n if (typeof value !== \"object\")\n return false;\n if (!(\"BYTES_PER_ELEMENT\" in value))\n return false;\n return value.BYTES_PER_ELEMENT === 1 && value.constructor.name === \"Uint8Array\";\n }\n var init_isBytes = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/data/isBytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/getContractAddress.js\n function getContractAddress2(opts) {\n if (opts.opcode === \"CREATE2\")\n return getCreate2Address(opts);\n return getCreateAddress(opts);\n }\n function getCreateAddress(opts) {\n const from14 = toBytes(getAddress(opts.from));\n let nonce = toBytes(opts.nonce);\n if (nonce[0] === 0)\n nonce = new Uint8Array([]);\n return getAddress(`0x${keccak256(toRlp([from14, nonce], \"bytes\")).slice(26)}`);\n }\n function getCreate2Address(opts) {\n const from14 = toBytes(getAddress(opts.from));\n const salt = pad(isBytes3(opts.salt) ? opts.salt : toBytes(opts.salt), {\n size: 32\n });\n const bytecodeHash = (() => {\n if (\"bytecodeHash\" in opts) {\n if (isBytes3(opts.bytecodeHash))\n return opts.bytecodeHash;\n return toBytes(opts.bytecodeHash);\n }\n return keccak256(opts.bytecode, \"bytes\");\n })();\n return getAddress(slice(keccak256(concat2([toBytes(\"0xff\"), from14, salt, bytecodeHash])), 12));\n }\n var init_getContractAddress = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/address/getContractAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_concat();\n init_isBytes();\n init_pad();\n init_slice();\n init_toBytes();\n init_toRlp();\n init_keccak256();\n init_getAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/assertTransaction.js\n function assertTransactionEIP7702(transaction) {\n const { authorizationList } = transaction;\n if (authorizationList) {\n for (const authorization of authorizationList) {\n const { chainId } = authorization;\n const address = authorization.address;\n if (!isAddress(address))\n throw new InvalidAddressError({ address });\n if (chainId < 0)\n throw new InvalidChainIdError({ chainId });\n }\n }\n assertTransactionEIP1559(transaction);\n }\n function assertTransactionEIP4844(transaction) {\n const { blobVersionedHashes } = transaction;\n if (blobVersionedHashes) {\n if (blobVersionedHashes.length === 0)\n throw new EmptyBlobError();\n for (const hash3 of blobVersionedHashes) {\n const size_ = size(hash3);\n const version7 = hexToNumber(slice(hash3, 0, 1));\n if (size_ !== 32)\n throw new InvalidVersionedHashSizeError({ hash: hash3, size: size_ });\n if (version7 !== versionedHashVersionKzg)\n throw new InvalidVersionedHashVersionError({\n hash: hash3,\n version: version7\n });\n }\n }\n assertTransactionEIP1559(transaction);\n }\n function assertTransactionEIP1559(transaction) {\n const { chainId, maxPriorityFeePerGas, maxFeePerGas, to } = transaction;\n if (chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (maxFeePerGas && maxFeePerGas > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas });\n if (maxPriorityFeePerGas && maxFeePerGas && maxPriorityFeePerGas > maxFeePerGas)\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });\n }\n function assertTransactionEIP2930(transaction) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } = transaction;\n if (chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (maxPriorityFeePerGas || maxFeePerGas)\n throw new BaseError2(\"`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.\");\n if (gasPrice && gasPrice > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });\n }\n function assertTransactionLegacy(transaction) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } = transaction;\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (typeof chainId !== \"undefined\" && chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (maxPriorityFeePerGas || maxFeePerGas)\n throw new BaseError2(\"`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.\");\n if (gasPrice && gasPrice > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });\n }\n var init_assertTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/assertTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_kzg();\n init_number();\n init_address();\n init_base();\n init_blob2();\n init_chain();\n init_node();\n init_isAddress();\n init_size();\n init_slice();\n init_fromHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/serializeAccessList.js\n function serializeAccessList(accessList) {\n if (!accessList || accessList.length === 0)\n return [];\n const serializedAccessList = [];\n for (let i3 = 0; i3 < accessList.length; i3++) {\n const { address, storageKeys } = accessList[i3];\n for (let j2 = 0; j2 < storageKeys.length; j2++) {\n if (storageKeys[j2].length - 2 !== 64) {\n throw new InvalidStorageKeySizeError({ storageKey: storageKeys[j2] });\n }\n }\n if (!isAddress(address, { strict: false })) {\n throw new InvalidAddressError({ address });\n }\n serializedAccessList.push([address, storageKeys]);\n }\n return serializedAccessList;\n }\n var init_serializeAccessList = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/serializeAccessList.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_transaction();\n init_isAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/serializeTransaction.js\n function serializeTransaction(transaction, signature) {\n const type = getTransactionType(transaction);\n if (type === \"eip1559\")\n return serializeTransactionEIP1559(transaction, signature);\n if (type === \"eip2930\")\n return serializeTransactionEIP2930(transaction, signature);\n if (type === \"eip4844\")\n return serializeTransactionEIP4844(transaction, signature);\n if (type === \"eip7702\")\n return serializeTransactionEIP7702(transaction, signature);\n return serializeTransactionLegacy(transaction, signature);\n }\n function serializeTransactionEIP7702(transaction, signature) {\n const { authorizationList, chainId, gas, nonce, to, value, maxFeePerGas, maxPriorityFeePerGas, accessList, data } = transaction;\n assertTransactionEIP7702(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedAuthorizationList = serializeAuthorizationList(authorizationList);\n return concatHex([\n \"0x04\",\n toRlp([\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : \"0x\",\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : \"0x\",\n maxFeePerGas ? numberToHex(maxFeePerGas) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\",\n serializedAccessList,\n serializedAuthorizationList,\n ...toYParitySignatureArray(transaction, signature)\n ])\n ]);\n }\n function serializeTransactionEIP4844(transaction, signature) {\n const { chainId, gas, nonce, to, value, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, accessList, data } = transaction;\n assertTransactionEIP4844(transaction);\n let blobVersionedHashes = transaction.blobVersionedHashes;\n let sidecars = transaction.sidecars;\n if (transaction.blobs && (typeof blobVersionedHashes === \"undefined\" || typeof sidecars === \"undefined\")) {\n const blobs2 = typeof transaction.blobs[0] === \"string\" ? transaction.blobs : transaction.blobs.map((x4) => bytesToHex(x4));\n const kzg = transaction.kzg;\n const commitments2 = blobsToCommitments({\n blobs: blobs2,\n kzg\n });\n if (typeof blobVersionedHashes === \"undefined\")\n blobVersionedHashes = commitmentsToVersionedHashes({\n commitments: commitments2\n });\n if (typeof sidecars === \"undefined\") {\n const proofs2 = blobsToProofs({ blobs: blobs2, commitments: commitments2, kzg });\n sidecars = toBlobSidecars({ blobs: blobs2, commitments: commitments2, proofs: proofs2 });\n }\n }\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : \"0x\",\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : \"0x\",\n maxFeePerGas ? numberToHex(maxFeePerGas) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\",\n serializedAccessList,\n maxFeePerBlobGas ? numberToHex(maxFeePerBlobGas) : \"0x\",\n blobVersionedHashes ?? [],\n ...toYParitySignatureArray(transaction, signature)\n ];\n const blobs = [];\n const commitments = [];\n const proofs = [];\n if (sidecars)\n for (let i3 = 0; i3 < sidecars.length; i3++) {\n const { blob, commitment, proof } = sidecars[i3];\n blobs.push(blob);\n commitments.push(commitment);\n proofs.push(proof);\n }\n return concatHex([\n \"0x03\",\n sidecars ? (\n // If sidecars are enabled, envelope turns into a \"wrapper\":\n toRlp([serializedTransaction, blobs, commitments, proofs])\n ) : (\n // If sidecars are disabled, standard envelope is used:\n toRlp(serializedTransaction)\n )\n ]);\n }\n function serializeTransactionEIP1559(transaction, signature) {\n const { chainId, gas, nonce, to, value, maxFeePerGas, maxPriorityFeePerGas, accessList, data } = transaction;\n assertTransactionEIP1559(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : \"0x\",\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : \"0x\",\n maxFeePerGas ? numberToHex(maxFeePerGas) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\",\n serializedAccessList,\n ...toYParitySignatureArray(transaction, signature)\n ];\n return concatHex([\n \"0x02\",\n toRlp(serializedTransaction)\n ]);\n }\n function serializeTransactionEIP2930(transaction, signature) {\n const { chainId, gas, data, nonce, to, value, accessList, gasPrice } = transaction;\n assertTransactionEIP2930(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : \"0x\",\n gasPrice ? numberToHex(gasPrice) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\",\n serializedAccessList,\n ...toYParitySignatureArray(transaction, signature)\n ];\n return concatHex([\n \"0x01\",\n toRlp(serializedTransaction)\n ]);\n }\n function serializeTransactionLegacy(transaction, signature) {\n const { chainId = 0, gas, data, nonce, to, value, gasPrice } = transaction;\n assertTransactionLegacy(transaction);\n let serializedTransaction = [\n nonce ? numberToHex(nonce) : \"0x\",\n gasPrice ? numberToHex(gasPrice) : \"0x\",\n gas ? numberToHex(gas) : \"0x\",\n to ?? \"0x\",\n value ? numberToHex(value) : \"0x\",\n data ?? \"0x\"\n ];\n if (signature) {\n const v2 = (() => {\n if (signature.v >= 35n) {\n const inferredChainId = (signature.v - 35n) / 2n;\n if (inferredChainId > 0)\n return signature.v;\n return 27n + (signature.v === 35n ? 0n : 1n);\n }\n if (chainId > 0)\n return BigInt(chainId * 2) + BigInt(35n + signature.v - 27n);\n const v6 = 27n + (signature.v === 27n ? 0n : 1n);\n if (signature.v !== v6)\n throw new InvalidLegacyVError({ v: signature.v });\n return v6;\n })();\n const r2 = trim(signature.r);\n const s4 = trim(signature.s);\n serializedTransaction = [\n ...serializedTransaction,\n numberToHex(v2),\n r2 === \"0x00\" ? \"0x\" : r2,\n s4 === \"0x00\" ? \"0x\" : s4\n ];\n } else if (chainId > 0) {\n serializedTransaction = [\n ...serializedTransaction,\n numberToHex(chainId),\n \"0x\",\n \"0x\"\n ];\n }\n return toRlp(serializedTransaction);\n }\n function toYParitySignatureArray(transaction, signature_) {\n const signature = signature_ ?? transaction;\n const { v: v2, yParity } = signature;\n if (typeof signature.r === \"undefined\")\n return [];\n if (typeof signature.s === \"undefined\")\n return [];\n if (typeof v2 === \"undefined\" && typeof yParity === \"undefined\")\n return [];\n const r2 = trim(signature.r);\n const s4 = trim(signature.s);\n const yParity_ = (() => {\n if (typeof yParity === \"number\")\n return yParity ? numberToHex(1) : \"0x\";\n if (v2 === 0n)\n return \"0x\";\n if (v2 === 1n)\n return numberToHex(1);\n return v2 === 27n ? \"0x\" : numberToHex(1);\n })();\n return [yParity_, r2 === \"0x00\" ? \"0x\" : r2, s4 === \"0x00\" ? \"0x\" : s4];\n }\n var init_serializeTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/transaction/serializeTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n init_serializeAuthorizationList();\n init_blobsToCommitments();\n init_blobsToProofs();\n init_commitmentsToVersionedHashes();\n init_toBlobSidecars();\n init_concat();\n init_trim();\n init_toHex();\n init_toRlp();\n init_assertTransaction();\n init_getTransactionType();\n init_serializeAccessList();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js\n function serializeAuthorizationList(authorizationList) {\n if (!authorizationList || authorizationList.length === 0)\n return [];\n const serializedAuthorizationList = [];\n for (const authorization of authorizationList) {\n const { chainId, nonce, ...signature } = authorization;\n const contractAddress = authorization.address;\n serializedAuthorizationList.push([\n chainId ? toHex(chainId) : \"0x\",\n contractAddress,\n nonce ? toHex(nonce) : \"0x\",\n ...toYParitySignatureArray({}, signature)\n ]);\n }\n return serializedAuthorizationList;\n }\n var init_serializeAuthorizationList = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_serializeTransaction();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/verifyAuthorization.js\n async function verifyAuthorization({ address, authorization, signature }) {\n return isAddressEqual(getAddress(address), await recoverAuthorizationAddress({\n authorization,\n signature\n }));\n }\n var init_verifyAuthorization = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/authorization/verifyAuthorization.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAddress();\n init_isAddressEqual();\n init_recoverAuthorizationAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withDedupe.js\n function withDedupe(fn, { enabled = true, id }) {\n if (!enabled || !id)\n return fn();\n if (promiseCache2.get(id))\n return promiseCache2.get(id);\n const promise = fn().finally(() => promiseCache2.delete(id));\n promiseCache2.set(id, promise);\n return promise;\n }\n var promiseCache2;\n var init_withDedupe = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withDedupe.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_lru();\n promiseCache2 = /* @__PURE__ */ new LruMap(8192);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/buildRequest.js\n function buildRequest(request, options = {}) {\n return async (args, overrideOptions = {}) => {\n const { dedupe = false, methods, retryDelay = 150, retryCount = 3, uid: uid2 } = {\n ...options,\n ...overrideOptions\n };\n const { method } = args;\n if (methods?.exclude?.includes(method))\n throw new MethodNotSupportedRpcError(new Error(\"method not supported\"), {\n method\n });\n if (methods?.include && !methods.include.includes(method))\n throw new MethodNotSupportedRpcError(new Error(\"method not supported\"), {\n method\n });\n const requestId = dedupe ? stringToHex(`${uid2}.${stringify(args)}`) : void 0;\n return withDedupe(() => withRetry(async () => {\n try {\n return await request(args);\n } catch (err_) {\n const err = err_;\n switch (err.code) {\n case ParseRpcError.code:\n throw new ParseRpcError(err);\n case InvalidRequestRpcError.code:\n throw new InvalidRequestRpcError(err);\n case MethodNotFoundRpcError.code:\n throw new MethodNotFoundRpcError(err, { method: args.method });\n case InvalidParamsRpcError.code:\n throw new InvalidParamsRpcError(err);\n case InternalRpcError.code:\n throw new InternalRpcError(err);\n case InvalidInputRpcError.code:\n throw new InvalidInputRpcError(err);\n case ResourceNotFoundRpcError.code:\n throw new ResourceNotFoundRpcError(err);\n case ResourceUnavailableRpcError.code:\n throw new ResourceUnavailableRpcError(err);\n case TransactionRejectedRpcError.code:\n throw new TransactionRejectedRpcError(err);\n case MethodNotSupportedRpcError.code:\n throw new MethodNotSupportedRpcError(err, {\n method: args.method\n });\n case LimitExceededRpcError.code:\n throw new LimitExceededRpcError(err);\n case JsonRpcVersionUnsupportedError.code:\n throw new JsonRpcVersionUnsupportedError(err);\n case UserRejectedRequestError.code:\n throw new UserRejectedRequestError(err);\n case UnauthorizedProviderError.code:\n throw new UnauthorizedProviderError(err);\n case UnsupportedProviderMethodError.code:\n throw new UnsupportedProviderMethodError(err);\n case ProviderDisconnectedError.code:\n throw new ProviderDisconnectedError(err);\n case ChainDisconnectedError.code:\n throw new ChainDisconnectedError(err);\n case SwitchChainError.code:\n throw new SwitchChainError(err);\n case UnsupportedNonOptionalCapabilityError.code:\n throw new UnsupportedNonOptionalCapabilityError(err);\n case UnsupportedChainIdError.code:\n throw new UnsupportedChainIdError(err);\n case DuplicateIdError.code:\n throw new DuplicateIdError(err);\n case UnknownBundleIdError.code:\n throw new UnknownBundleIdError(err);\n case BundleTooLargeError.code:\n throw new BundleTooLargeError(err);\n case AtomicReadyWalletRejectedUpgradeError.code:\n throw new AtomicReadyWalletRejectedUpgradeError(err);\n case AtomicityNotSupportedError.code:\n throw new AtomicityNotSupportedError(err);\n case 5e3:\n throw new UserRejectedRequestError(err);\n default:\n if (err_ instanceof BaseError2)\n throw err_;\n throw new UnknownRpcError(err);\n }\n }\n }, {\n delay: ({ count, error }) => {\n if (error && error instanceof HttpRequestError) {\n const retryAfter = error?.headers?.get(\"Retry-After\");\n if (retryAfter?.match(/\\d/))\n return Number.parseInt(retryAfter, 10) * 1e3;\n }\n return ~~(1 << count) * retryDelay;\n },\n retryCount,\n shouldRetry: ({ error }) => shouldRetry(error)\n }), { enabled: dedupe, id: requestId });\n };\n }\n function shouldRetry(error) {\n if (\"code\" in error && typeof error.code === \"number\") {\n if (error.code === -1)\n return true;\n if (error.code === LimitExceededRpcError.code)\n return true;\n if (error.code === InternalRpcError.code)\n return true;\n return false;\n }\n if (error instanceof HttpRequestError && error.status) {\n if (error.status === 403)\n return true;\n if (error.status === 408)\n return true;\n if (error.status === 413)\n return true;\n if (error.status === 429)\n return true;\n if (error.status === 500)\n return true;\n if (error.status === 502)\n return true;\n if (error.status === 503)\n return true;\n if (error.status === 504)\n return true;\n return false;\n }\n return true;\n }\n var init_buildRequest = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/buildRequest.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n init_request();\n init_rpc();\n init_toHex();\n init_withDedupe();\n init_withRetry();\n init_stringify();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/defineChain.js\n function defineChain(chain2) {\n return {\n formatters: void 0,\n fees: void 0,\n serializers: void 0,\n ...chain2\n };\n }\n var init_defineChain = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/chain/defineChain.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/legacy.js\n function ripemd_f(group, x4, y6, z2) {\n if (group === 0)\n return x4 ^ y6 ^ z2;\n if (group === 1)\n return x4 & y6 | ~x4 & z2;\n if (group === 2)\n return (x4 | ~y6) ^ z2;\n if (group === 3)\n return x4 & z2 | y6 & ~z2;\n return x4 ^ (y6 | ~z2);\n }\n var Rho160, Id160, Pi160, idxLR, idxL, idxR, shifts160, shiftsL160, shiftsR160, Kl160, Kr160, BUF_160, RIPEMD160, ripemd160;\n var init_legacy = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/legacy.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_md();\n init_utils3();\n Rho160 = /* @__PURE__ */ Uint8Array.from([\n 7,\n 4,\n 13,\n 1,\n 10,\n 6,\n 15,\n 3,\n 12,\n 0,\n 9,\n 5,\n 2,\n 14,\n 11,\n 8\n ]);\n Id160 = /* @__PURE__ */ (() => Uint8Array.from(new Array(16).fill(0).map((_2, i3) => i3)))();\n Pi160 = /* @__PURE__ */ (() => Id160.map((i3) => (9 * i3 + 5) % 16))();\n idxLR = /* @__PURE__ */ (() => {\n const L2 = [Id160];\n const R3 = [Pi160];\n const res = [L2, R3];\n for (let i3 = 0; i3 < 4; i3++)\n for (let j2 of res)\n j2.push(j2[i3].map((k4) => Rho160[k4]));\n return res;\n })();\n idxL = /* @__PURE__ */ (() => idxLR[0])();\n idxR = /* @__PURE__ */ (() => idxLR[1])();\n shifts160 = /* @__PURE__ */ [\n [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],\n [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],\n [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],\n [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],\n [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]\n ].map((i3) => Uint8Array.from(i3));\n shiftsL160 = /* @__PURE__ */ idxL.map((idx, i3) => idx.map((j2) => shifts160[i3][j2]));\n shiftsR160 = /* @__PURE__ */ idxR.map((idx, i3) => idx.map((j2) => shifts160[i3][j2]));\n Kl160 = /* @__PURE__ */ Uint32Array.from([\n 0,\n 1518500249,\n 1859775393,\n 2400959708,\n 2840853838\n ]);\n Kr160 = /* @__PURE__ */ Uint32Array.from([\n 1352829926,\n 1548603684,\n 1836072691,\n 2053994217,\n 0\n ]);\n BUF_160 = /* @__PURE__ */ new Uint32Array(16);\n RIPEMD160 = class extends HashMD {\n constructor() {\n super(64, 20, 8, true);\n this.h0 = 1732584193 | 0;\n this.h1 = 4023233417 | 0;\n this.h2 = 2562383102 | 0;\n this.h3 = 271733878 | 0;\n this.h4 = 3285377520 | 0;\n }\n get() {\n const { h0, h1, h2: h22, h3: h32, h4 } = this;\n return [h0, h1, h22, h32, h4];\n }\n set(h0, h1, h22, h32, h4) {\n this.h0 = h0 | 0;\n this.h1 = h1 | 0;\n this.h2 = h22 | 0;\n this.h3 = h32 | 0;\n this.h4 = h4 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n BUF_160[i3] = view.getUint32(offset, true);\n let al = this.h0 | 0, ar = al, bl = this.h1 | 0, br = bl, cl = this.h2 | 0, cr = cl, dl = this.h3 | 0, dr = dl, el = this.h4 | 0, er = el;\n for (let group = 0; group < 5; group++) {\n const rGroup = 4 - group;\n const hbl = Kl160[group], hbr = Kr160[group];\n const rl = idxL[group], rr = idxR[group];\n const sl = shiftsL160[group], sr = shiftsR160[group];\n for (let i3 = 0; i3 < 16; i3++) {\n const tl = rotl(al + ripemd_f(group, bl, cl, dl) + BUF_160[rl[i3]] + hbl, sl[i3]) + el | 0;\n al = el, el = dl, dl = rotl(cl, 10) | 0, cl = bl, bl = tl;\n }\n for (let i3 = 0; i3 < 16; i3++) {\n const tr = rotl(ar + ripemd_f(rGroup, br, cr, dr) + BUF_160[rr[i3]] + hbr, sr[i3]) + er | 0;\n ar = er, er = dr, dr = rotl(cr, 10) | 0, cr = br, br = tr;\n }\n }\n this.set(this.h1 + cl + dr | 0, this.h2 + dl + er | 0, this.h3 + el + ar | 0, this.h4 + al + br | 0, this.h0 + bl + cr | 0);\n }\n roundClean() {\n clean(BUF_160);\n }\n destroy() {\n this.destroyed = true;\n clean(this.buffer);\n this.set(0, 0, 0, 0, 0);\n }\n };\n ripemd160 = /* @__PURE__ */ createHasher(() => new RIPEMD160());\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withTimeout.js\n function withTimeout(fn, { errorInstance = new Error(\"timed out\"), timeout, signal }) {\n return new Promise((resolve, reject) => {\n ;\n (async () => {\n let timeoutId;\n try {\n const controller = new AbortController();\n if (timeout > 0) {\n timeoutId = setTimeout(() => {\n if (signal) {\n controller.abort();\n } else {\n reject(errorInstance);\n }\n }, timeout);\n }\n resolve(await fn({ signal: controller?.signal || null }));\n } catch (err) {\n if (err?.name === \"AbortError\")\n reject(errorInstance);\n reject(err);\n } finally {\n clearTimeout(timeoutId);\n }\n })();\n });\n }\n var init_withTimeout = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/promise/withTimeout.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/rpc/id.js\n function createIdStore() {\n return {\n current: 0,\n take() {\n return this.current++;\n },\n reset() {\n this.current = 0;\n }\n };\n }\n var idCache;\n var init_id = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/rpc/id.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n idCache = /* @__PURE__ */ createIdStore();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/rpc/http.js\n function getHttpRpcClient(url, options = {}) {\n return {\n async request(params) {\n const { body, fetchFn = options.fetchFn ?? fetch, onRequest = options.onRequest, onResponse = options.onResponse, timeout = options.timeout ?? 1e4 } = params;\n const fetchOptions = {\n ...options.fetchOptions ?? {},\n ...params.fetchOptions ?? {}\n };\n const { headers, method, signal: signal_ } = fetchOptions;\n try {\n const response = await withTimeout(async ({ signal }) => {\n const init = {\n ...fetchOptions,\n body: Array.isArray(body) ? stringify(body.map((body2) => ({\n jsonrpc: \"2.0\",\n id: body2.id ?? idCache.take(),\n ...body2\n }))) : stringify({\n jsonrpc: \"2.0\",\n id: body.id ?? idCache.take(),\n ...body\n }),\n headers: {\n \"Content-Type\": \"application/json\",\n ...headers\n },\n method: method || \"POST\",\n signal: signal_ || (timeout > 0 ? signal : null)\n };\n const request = new Request(url, init);\n const args = await onRequest?.(request, init) ?? { ...init, url };\n const response2 = await fetchFn(args.url ?? url, args);\n return response2;\n }, {\n errorInstance: new TimeoutError({ body, url }),\n timeout,\n signal: true\n });\n if (onResponse)\n await onResponse(response);\n let data;\n if (response.headers.get(\"Content-Type\")?.startsWith(\"application/json\"))\n data = await response.json();\n else {\n data = await response.text();\n try {\n data = JSON.parse(data || \"{}\");\n } catch (err) {\n if (response.ok)\n throw err;\n data = { error: data };\n }\n }\n if (!response.ok) {\n throw new HttpRequestError({\n body,\n details: stringify(data.error) || response.statusText,\n headers: response.headers,\n status: response.status,\n url\n });\n }\n return data;\n } catch (err) {\n if (err instanceof HttpRequestError)\n throw err;\n if (err instanceof TimeoutError)\n throw err;\n throw new HttpRequestError({\n body,\n cause: err,\n url\n });\n }\n }\n };\n }\n var init_http = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/rpc/http.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_request();\n init_withTimeout();\n init_stringify();\n init_id();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/strings.js\n var presignMessagePrefix;\n var init_strings = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/strings.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n presignMessagePrefix = \"\u0019Ethereum Signed Message:\\n\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js\n function toPrefixedMessage(message_) {\n const message2 = (() => {\n if (typeof message_ === \"string\")\n return stringToHex(message_);\n if (typeof message_.raw === \"string\")\n return message_.raw;\n return bytesToHex(message_.raw);\n })();\n const prefix = stringToHex(`${presignMessagePrefix}${size(message2)}`);\n return concat2([prefix, message2]);\n }\n var init_toPrefixedMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_strings();\n init_concat();\n init_size();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/hashMessage.js\n function hashMessage(message2, to_) {\n return keccak256(toPrefixedMessage(message2), to_);\n }\n var init_hashMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/hashMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_keccak256();\n init_toPrefixedMessage();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/typedData.js\n var InvalidDomainError, InvalidPrimaryTypeError, InvalidStructTypeError;\n var init_typedData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/typedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n init_base();\n InvalidDomainError = class extends BaseError2 {\n constructor({ domain: domain2 }) {\n super(`Invalid domain \"${stringify(domain2)}\".`, {\n metaMessages: [\"Must be a valid EIP-712 domain.\"]\n });\n }\n };\n InvalidPrimaryTypeError = class extends BaseError2 {\n constructor({ primaryType, types: types2 }) {\n super(`Invalid primary type \\`${primaryType}\\` must be one of \\`${JSON.stringify(Object.keys(types2))}\\`.`, {\n docsPath: \"/api/glossary/Errors#typeddatainvalidprimarytypeerror\",\n metaMessages: [\"Check that the primary type is a key in `types`.\"]\n });\n }\n };\n InvalidStructTypeError = class extends BaseError2 {\n constructor({ type }) {\n super(`Struct type \"${type}\" is invalid.`, {\n metaMessages: [\"Struct type must not be a Solidity type.\"],\n name: \"InvalidStructTypeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/typedData.js\n function validateTypedData(parameters) {\n const { domain: domain2, message: message2, primaryType, types: types2 } = parameters;\n const validateData = (struct, data) => {\n for (const param of struct) {\n const { name, type } = param;\n const value = data[name];\n const integerMatch = type.match(integerRegex2);\n if (integerMatch && (typeof value === \"number\" || typeof value === \"bigint\")) {\n const [_type, base4, size_] = integerMatch;\n numberToHex(value, {\n signed: base4 === \"int\",\n size: Number.parseInt(size_, 10) / 8\n });\n }\n if (type === \"address\" && typeof value === \"string\" && !isAddress(value))\n throw new InvalidAddressError({ address: value });\n const bytesMatch = type.match(bytesRegex2);\n if (bytesMatch) {\n const [_type, size_] = bytesMatch;\n if (size_ && size(value) !== Number.parseInt(size_, 10))\n throw new BytesSizeMismatchError({\n expectedSize: Number.parseInt(size_, 10),\n givenSize: size(value)\n });\n }\n const struct2 = types2[type];\n if (struct2) {\n validateReference(type);\n validateData(struct2, value);\n }\n }\n };\n if (types2.EIP712Domain && domain2) {\n if (typeof domain2 !== \"object\")\n throw new InvalidDomainError({ domain: domain2 });\n validateData(types2.EIP712Domain, domain2);\n }\n if (primaryType !== \"EIP712Domain\") {\n if (types2[primaryType])\n validateData(types2[primaryType], message2);\n else\n throw new InvalidPrimaryTypeError({ primaryType, types: types2 });\n }\n }\n function getTypesForEIP712Domain({ domain: domain2 }) {\n return [\n typeof domain2?.name === \"string\" && { name: \"name\", type: \"string\" },\n domain2?.version && { name: \"version\", type: \"string\" },\n (typeof domain2?.chainId === \"number\" || typeof domain2?.chainId === \"bigint\") && {\n name: \"chainId\",\n type: \"uint256\"\n },\n domain2?.verifyingContract && {\n name: \"verifyingContract\",\n type: \"address\"\n },\n domain2?.salt && { name: \"salt\", type: \"bytes32\" }\n ].filter(Boolean);\n }\n function validateReference(type) {\n if (type === \"address\" || type === \"bool\" || type === \"string\" || type.startsWith(\"bytes\") || type.startsWith(\"uint\") || type.startsWith(\"int\"))\n throw new InvalidStructTypeError({ type });\n }\n var init_typedData2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/typedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_address();\n init_typedData();\n init_isAddress();\n init_size();\n init_toHex();\n init_regex2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/hashTypedData.js\n function hashTypedData(parameters) {\n const { domain: domain2 = {}, message: message2, primaryType } = parameters;\n const types2 = {\n EIP712Domain: getTypesForEIP712Domain({ domain: domain2 }),\n ...parameters.types\n };\n validateTypedData({\n domain: domain2,\n message: message2,\n primaryType,\n types: types2\n });\n const parts = [\"0x1901\"];\n if (domain2)\n parts.push(hashDomain({\n domain: domain2,\n types: types2\n }));\n if (primaryType !== \"EIP712Domain\")\n parts.push(hashStruct({\n data: message2,\n primaryType,\n types: types2\n }));\n return keccak256(concat2(parts));\n }\n function hashDomain({ domain: domain2, types: types2 }) {\n return hashStruct({\n data: domain2,\n primaryType: \"EIP712Domain\",\n types: types2\n });\n }\n function hashStruct({ data, primaryType, types: types2 }) {\n const encoded = encodeData({\n data,\n primaryType,\n types: types2\n });\n return keccak256(encoded);\n }\n function encodeData({ data, primaryType, types: types2 }) {\n const encodedTypes = [{ type: \"bytes32\" }];\n const encodedValues = [hashType({ primaryType, types: types2 })];\n for (const field of types2[primaryType]) {\n const [type, value] = encodeField({\n types: types2,\n name: field.name,\n type: field.type,\n value: data[field.name]\n });\n encodedTypes.push(type);\n encodedValues.push(value);\n }\n return encodeAbiParameters(encodedTypes, encodedValues);\n }\n function hashType({ primaryType, types: types2 }) {\n const encodedHashType = toHex(encodeType({ primaryType, types: types2 }));\n return keccak256(encodedHashType);\n }\n function encodeType({ primaryType, types: types2 }) {\n let result = \"\";\n const unsortedDeps = findTypeDependencies({ primaryType, types: types2 });\n unsortedDeps.delete(primaryType);\n const deps = [primaryType, ...Array.from(unsortedDeps).sort()];\n for (const type of deps) {\n result += `${type}(${types2[type].map(({ name, type: t3 }) => `${t3} ${name}`).join(\",\")})`;\n }\n return result;\n }\n function findTypeDependencies({ primaryType: primaryType_, types: types2 }, results = /* @__PURE__ */ new Set()) {\n const match = primaryType_.match(/^\\w*/u);\n const primaryType = match?.[0];\n if (results.has(primaryType) || types2[primaryType] === void 0) {\n return results;\n }\n results.add(primaryType);\n for (const field of types2[primaryType]) {\n findTypeDependencies({ primaryType: field.type, types: types2 }, results);\n }\n return results;\n }\n function encodeField({ types: types2, name, type, value }) {\n if (types2[type] !== void 0) {\n return [\n { type: \"bytes32\" },\n keccak256(encodeData({ data: value, primaryType: type, types: types2 }))\n ];\n }\n if (type === \"bytes\") {\n const prepend = value.length % 2 ? \"0\" : \"\";\n value = `0x${prepend + value.slice(2)}`;\n return [{ type: \"bytes32\" }, keccak256(value)];\n }\n if (type === \"string\")\n return [{ type: \"bytes32\" }, keccak256(toHex(value))];\n if (type.lastIndexOf(\"]\") === type.length - 1) {\n const parsedType = type.slice(0, type.lastIndexOf(\"[\"));\n const typeValuePairs = value.map((item) => encodeField({\n name,\n type: parsedType,\n types: types2,\n value: item\n }));\n return [\n { type: \"bytes32\" },\n keccak256(encodeAbiParameters(typeValuePairs.map(([t3]) => t3), typeValuePairs.map(([, v2]) => v2)))\n ];\n }\n return [{ type }, value];\n }\n var init_hashTypedData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/hashTypedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_encodeAbiParameters();\n init_concat();\n init_toHex();\n init_keccak256();\n init_typedData2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/bytes.js\n var zeroHash;\n var init_bytes2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n zeroHash = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/lru.js\n var LruMap2;\n var init_lru2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/lru.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LruMap2 = class extends Map {\n constructor(size6) {\n super();\n Object.defineProperty(this, \"maxSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.maxSize = size6;\n }\n get(key) {\n const value = super.get(key);\n if (super.has(key) && value !== void 0) {\n this.delete(key);\n super.set(key, value);\n }\n return value;\n }\n set(key, value) {\n super.set(key, value);\n if (this.maxSize && this.size > this.maxSize) {\n const firstKey = this.keys().next().value;\n if (firstKey)\n this.delete(firstKey);\n }\n return this;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Caches.js\n var caches, checksum;\n var init_Caches = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Caches.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_lru2();\n caches = {\n checksum: /* @__PURE__ */ new LruMap2(8192)\n };\n checksum = caches.checksum;\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hash.js\n function keccak2562(value, options = {}) {\n const { as = typeof value === \"string\" ? \"Hex\" : \"Bytes\" } = options;\n const bytes = keccak_256(from(value));\n if (as === \"Bytes\")\n return bytes;\n return fromBytes(bytes);\n }\n var init_Hash = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha3();\n init_Bytes();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/PublicKey.js\n function assert4(publicKey, options = {}) {\n const { compressed } = options;\n const { prefix, x: x4, y: y6 } = publicKey;\n if (compressed === false || typeof x4 === \"bigint\" && typeof y6 === \"bigint\") {\n if (prefix !== 4)\n throw new InvalidPrefixError({\n prefix,\n cause: new InvalidUncompressedPrefixError()\n });\n return;\n }\n if (compressed === true || typeof x4 === \"bigint\" && typeof y6 === \"undefined\") {\n if (prefix !== 3 && prefix !== 2)\n throw new InvalidPrefixError({\n prefix,\n cause: new InvalidCompressedPrefixError()\n });\n return;\n }\n throw new InvalidError({ publicKey });\n }\n function from3(value) {\n const publicKey = (() => {\n if (validate2(value))\n return fromHex3(value);\n if (validate(value))\n return fromBytes2(value);\n const { prefix, x: x4, y: y6 } = value;\n if (typeof x4 === \"bigint\" && typeof y6 === \"bigint\")\n return { prefix: prefix ?? 4, x: x4, y: y6 };\n return { prefix, x: x4 };\n })();\n assert4(publicKey);\n return publicKey;\n }\n function fromBytes2(publicKey) {\n return fromHex3(fromBytes(publicKey));\n }\n function fromHex3(publicKey) {\n if (publicKey.length !== 132 && publicKey.length !== 130 && publicKey.length !== 68)\n throw new InvalidSerializedSizeError({ publicKey });\n if (publicKey.length === 130) {\n const x5 = BigInt(slice3(publicKey, 0, 32));\n const y6 = BigInt(slice3(publicKey, 32, 64));\n return {\n prefix: 4,\n x: x5,\n y: y6\n };\n }\n if (publicKey.length === 132) {\n const prefix2 = Number(slice3(publicKey, 0, 1));\n const x5 = BigInt(slice3(publicKey, 1, 33));\n const y6 = BigInt(slice3(publicKey, 33, 65));\n return {\n prefix: prefix2,\n x: x5,\n y: y6\n };\n }\n const prefix = Number(slice3(publicKey, 0, 1));\n const x4 = BigInt(slice3(publicKey, 1, 33));\n return {\n prefix,\n x: x4\n };\n }\n function toHex2(publicKey, options = {}) {\n assert4(publicKey);\n const { prefix, x: x4, y: y6 } = publicKey;\n const { includePrefix = true } = options;\n const publicKey_ = concat3(\n includePrefix ? fromNumber(prefix, { size: 1 }) : \"0x\",\n fromNumber(x4, { size: 32 }),\n // If the public key is not compressed, add the y coordinate.\n typeof y6 === \"bigint\" ? fromNumber(y6, { size: 32 }) : \"0x\"\n );\n return publicKey_;\n }\n var InvalidError, InvalidPrefixError, InvalidCompressedPrefixError, InvalidUncompressedPrefixError, InvalidSerializedSizeError;\n var init_PublicKey = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/PublicKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Bytes();\n init_Errors();\n init_Hex();\n init_Json();\n InvalidError = class extends BaseError3 {\n constructor({ publicKey }) {\n super(`Value \\`${stringify2(publicKey)}\\` is not a valid public key.`, {\n metaMessages: [\n \"Public key must contain:\",\n \"- an `x` and `prefix` value (compressed)\",\n \"- an `x`, `y`, and `prefix` value (uncompressed)\"\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidError\"\n });\n }\n };\n InvalidPrefixError = class extends BaseError3 {\n constructor({ prefix, cause }) {\n super(`Prefix \"${prefix}\" is invalid.`, {\n cause\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidPrefixError\"\n });\n }\n };\n InvalidCompressedPrefixError = class extends BaseError3 {\n constructor() {\n super(\"Prefix must be 2 or 3 for compressed public keys.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidCompressedPrefixError\"\n });\n }\n };\n InvalidUncompressedPrefixError = class extends BaseError3 {\n constructor() {\n super(\"Prefix must be 4 for uncompressed public keys.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidUncompressedPrefixError\"\n });\n }\n };\n InvalidSerializedSizeError = class extends BaseError3 {\n constructor({ publicKey }) {\n super(`Value \\`${publicKey}\\` is an invalid public key size.`, {\n metaMessages: [\n \"Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).\",\n `Received ${size3(from2(publicKey))} bytes.`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"PublicKey.InvalidSerializedSizeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Address.js\n function assert5(value, options = {}) {\n const { strict = true } = options;\n if (!addressRegex2.test(value))\n throw new InvalidAddressError2({\n address: value,\n cause: new InvalidInputError()\n });\n if (strict) {\n if (value.toLowerCase() === value)\n return;\n if (checksum2(value) !== value)\n throw new InvalidAddressError2({\n address: value,\n cause: new InvalidChecksumError()\n });\n }\n }\n function checksum2(address) {\n if (checksum.has(address))\n return checksum.get(address);\n assert5(address, { strict: false });\n const hexAddress = address.substring(2).toLowerCase();\n const hash3 = keccak2562(fromString(hexAddress), { as: \"Bytes\" });\n const characters = hexAddress.split(\"\");\n for (let i3 = 0; i3 < 40; i3 += 2) {\n if (hash3[i3 >> 1] >> 4 >= 8 && characters[i3]) {\n characters[i3] = characters[i3].toUpperCase();\n }\n if ((hash3[i3 >> 1] & 15) >= 8 && characters[i3 + 1]) {\n characters[i3 + 1] = characters[i3 + 1].toUpperCase();\n }\n }\n const result = `0x${characters.join(\"\")}`;\n checksum.set(address, result);\n return result;\n }\n function from4(address, options = {}) {\n const { checksum: checksumVal = false } = options;\n assert5(address);\n if (checksumVal)\n return checksum2(address);\n return address;\n }\n function fromPublicKey(publicKey, options = {}) {\n const address = keccak2562(`0x${toHex2(publicKey).slice(4)}`).substring(26);\n return from4(`0x${address}`, options);\n }\n function validate3(address, options = {}) {\n const { strict = true } = options ?? {};\n try {\n assert5(address, { strict });\n return true;\n } catch {\n return false;\n }\n }\n var addressRegex2, InvalidAddressError2, InvalidInputError, InvalidChecksumError;\n var init_Address = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Address.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Bytes();\n init_Caches();\n init_Errors();\n init_Hash();\n init_PublicKey();\n addressRegex2 = /^0x[a-fA-F0-9]{40}$/;\n InvalidAddressError2 = class extends BaseError3 {\n constructor({ address, cause }) {\n super(`Address \"${address}\" is invalid.`, {\n cause\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Address.InvalidAddressError\"\n });\n }\n };\n InvalidInputError = class extends BaseError3 {\n constructor() {\n super(\"Address is not a 20 byte (40 hexadecimal character) value.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Address.InvalidInputError\"\n });\n }\n };\n InvalidChecksumError = class extends BaseError3 {\n constructor() {\n super(\"Address does not match its checksum counterpart.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Address.InvalidChecksumError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Solidity.js\n var arrayRegex2, bytesRegex3, integerRegex3, maxInt82, maxInt162, maxInt242, maxInt322, maxInt402, maxInt482, maxInt562, maxInt642, maxInt722, maxInt802, maxInt882, maxInt962, maxInt1042, maxInt1122, maxInt1202, maxInt1282, maxInt1362, maxInt1442, maxInt1522, maxInt1602, maxInt1682, maxInt1762, maxInt1842, maxInt1922, maxInt2002, maxInt2082, maxInt2162, maxInt2242, maxInt2322, maxInt2402, maxInt2482, maxInt2562, minInt82, minInt162, minInt242, minInt322, minInt402, minInt482, minInt562, minInt642, minInt722, minInt802, minInt882, minInt962, minInt1042, minInt1122, minInt1202, minInt1282, minInt1362, minInt1442, minInt1522, minInt1602, minInt1682, minInt1762, minInt1842, minInt1922, minInt2002, minInt2082, minInt2162, minInt2242, minInt2322, minInt2402, minInt2482, minInt2562, maxUint82, maxUint162, maxUint242, maxUint322, maxUint402, maxUint482, maxUint562, maxUint642, maxUint722, maxUint802, maxUint882, maxUint962, maxUint1042, maxUint1122, maxUint1202, maxUint1282, maxUint1362, maxUint1442, maxUint1522, maxUint1602, maxUint1682, maxUint1762, maxUint1842, maxUint1922, maxUint2002, maxUint2082, maxUint2162, maxUint2242, maxUint2322, maxUint2402, maxUint2482, maxUint2562;\n var init_Solidity = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Solidity.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n arrayRegex2 = /^(.*)\\[([0-9]*)\\]$/;\n bytesRegex3 = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n integerRegex3 = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\n maxInt82 = 2n ** (8n - 1n) - 1n;\n maxInt162 = 2n ** (16n - 1n) - 1n;\n maxInt242 = 2n ** (24n - 1n) - 1n;\n maxInt322 = 2n ** (32n - 1n) - 1n;\n maxInt402 = 2n ** (40n - 1n) - 1n;\n maxInt482 = 2n ** (48n - 1n) - 1n;\n maxInt562 = 2n ** (56n - 1n) - 1n;\n maxInt642 = 2n ** (64n - 1n) - 1n;\n maxInt722 = 2n ** (72n - 1n) - 1n;\n maxInt802 = 2n ** (80n - 1n) - 1n;\n maxInt882 = 2n ** (88n - 1n) - 1n;\n maxInt962 = 2n ** (96n - 1n) - 1n;\n maxInt1042 = 2n ** (104n - 1n) - 1n;\n maxInt1122 = 2n ** (112n - 1n) - 1n;\n maxInt1202 = 2n ** (120n - 1n) - 1n;\n maxInt1282 = 2n ** (128n - 1n) - 1n;\n maxInt1362 = 2n ** (136n - 1n) - 1n;\n maxInt1442 = 2n ** (144n - 1n) - 1n;\n maxInt1522 = 2n ** (152n - 1n) - 1n;\n maxInt1602 = 2n ** (160n - 1n) - 1n;\n maxInt1682 = 2n ** (168n - 1n) - 1n;\n maxInt1762 = 2n ** (176n - 1n) - 1n;\n maxInt1842 = 2n ** (184n - 1n) - 1n;\n maxInt1922 = 2n ** (192n - 1n) - 1n;\n maxInt2002 = 2n ** (200n - 1n) - 1n;\n maxInt2082 = 2n ** (208n - 1n) - 1n;\n maxInt2162 = 2n ** (216n - 1n) - 1n;\n maxInt2242 = 2n ** (224n - 1n) - 1n;\n maxInt2322 = 2n ** (232n - 1n) - 1n;\n maxInt2402 = 2n ** (240n - 1n) - 1n;\n maxInt2482 = 2n ** (248n - 1n) - 1n;\n maxInt2562 = 2n ** (256n - 1n) - 1n;\n minInt82 = -(2n ** (8n - 1n));\n minInt162 = -(2n ** (16n - 1n));\n minInt242 = -(2n ** (24n - 1n));\n minInt322 = -(2n ** (32n - 1n));\n minInt402 = -(2n ** (40n - 1n));\n minInt482 = -(2n ** (48n - 1n));\n minInt562 = -(2n ** (56n - 1n));\n minInt642 = -(2n ** (64n - 1n));\n minInt722 = -(2n ** (72n - 1n));\n minInt802 = -(2n ** (80n - 1n));\n minInt882 = -(2n ** (88n - 1n));\n minInt962 = -(2n ** (96n - 1n));\n minInt1042 = -(2n ** (104n - 1n));\n minInt1122 = -(2n ** (112n - 1n));\n minInt1202 = -(2n ** (120n - 1n));\n minInt1282 = -(2n ** (128n - 1n));\n minInt1362 = -(2n ** (136n - 1n));\n minInt1442 = -(2n ** (144n - 1n));\n minInt1522 = -(2n ** (152n - 1n));\n minInt1602 = -(2n ** (160n - 1n));\n minInt1682 = -(2n ** (168n - 1n));\n minInt1762 = -(2n ** (176n - 1n));\n minInt1842 = -(2n ** (184n - 1n));\n minInt1922 = -(2n ** (192n - 1n));\n minInt2002 = -(2n ** (200n - 1n));\n minInt2082 = -(2n ** (208n - 1n));\n minInt2162 = -(2n ** (216n - 1n));\n minInt2242 = -(2n ** (224n - 1n));\n minInt2322 = -(2n ** (232n - 1n));\n minInt2402 = -(2n ** (240n - 1n));\n minInt2482 = -(2n ** (248n - 1n));\n minInt2562 = -(2n ** (256n - 1n));\n maxUint82 = 2n ** 8n - 1n;\n maxUint162 = 2n ** 16n - 1n;\n maxUint242 = 2n ** 24n - 1n;\n maxUint322 = 2n ** 32n - 1n;\n maxUint402 = 2n ** 40n - 1n;\n maxUint482 = 2n ** 48n - 1n;\n maxUint562 = 2n ** 56n - 1n;\n maxUint642 = 2n ** 64n - 1n;\n maxUint722 = 2n ** 72n - 1n;\n maxUint802 = 2n ** 80n - 1n;\n maxUint882 = 2n ** 88n - 1n;\n maxUint962 = 2n ** 96n - 1n;\n maxUint1042 = 2n ** 104n - 1n;\n maxUint1122 = 2n ** 112n - 1n;\n maxUint1202 = 2n ** 120n - 1n;\n maxUint1282 = 2n ** 128n - 1n;\n maxUint1362 = 2n ** 136n - 1n;\n maxUint1442 = 2n ** 144n - 1n;\n maxUint1522 = 2n ** 152n - 1n;\n maxUint1602 = 2n ** 160n - 1n;\n maxUint1682 = 2n ** 168n - 1n;\n maxUint1762 = 2n ** 176n - 1n;\n maxUint1842 = 2n ** 184n - 1n;\n maxUint1922 = 2n ** 192n - 1n;\n maxUint2002 = 2n ** 200n - 1n;\n maxUint2082 = 2n ** 208n - 1n;\n maxUint2162 = 2n ** 216n - 1n;\n maxUint2242 = 2n ** 224n - 1n;\n maxUint2322 = 2n ** 232n - 1n;\n maxUint2402 = 2n ** 240n - 1n;\n maxUint2482 = 2n ** 248n - 1n;\n maxUint2562 = 2n ** 256n - 1n;\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/abiParameters.js\n function decodeParameter2(cursor, param, options) {\n const { checksumAddress: checksumAddress2, staticPosition } = options;\n const arrayComponents = getArrayComponents2(param.type);\n if (arrayComponents) {\n const [length, type] = arrayComponents;\n return decodeArray2(cursor, { ...param, type }, { checksumAddress: checksumAddress2, length, staticPosition });\n }\n if (param.type === \"tuple\")\n return decodeTuple2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition\n });\n if (param.type === \"address\")\n return decodeAddress2(cursor, { checksum: checksumAddress2 });\n if (param.type === \"bool\")\n return decodeBool2(cursor);\n if (param.type.startsWith(\"bytes\"))\n return decodeBytes2(cursor, param, { staticPosition });\n if (param.type.startsWith(\"uint\") || param.type.startsWith(\"int\"))\n return decodeNumber2(cursor, param);\n if (param.type === \"string\")\n return decodeString2(cursor, { staticPosition });\n throw new InvalidTypeError(param.type);\n }\n function decodeAddress2(cursor, options = {}) {\n const { checksum: checksum4 = false } = options;\n const value = cursor.readBytes(32);\n const wrap5 = (address) => checksum4 ? checksum2(address) : address;\n return [wrap5(fromBytes(slice2(value, -20))), 32];\n }\n function decodeArray2(cursor, param, options) {\n const { checksumAddress: checksumAddress2, length, staticPosition } = options;\n if (!length) {\n const offset = toNumber2(cursor.readBytes(sizeOfOffset2));\n const start = staticPosition + offset;\n const startOfData = start + sizeOfLength2;\n cursor.setPosition(start);\n const length2 = toNumber2(cursor.readBytes(sizeOfLength2));\n const dynamicChild = hasDynamicChild2(param);\n let consumed2 = 0;\n const value2 = [];\n for (let i3 = 0; i3 < length2; ++i3) {\n cursor.setPosition(startOfData + (dynamicChild ? i3 * 32 : consumed2));\n const [data, consumed_] = decodeParameter2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition: startOfData\n });\n consumed2 += consumed_;\n value2.push(data);\n }\n cursor.setPosition(staticPosition + 32);\n return [value2, 32];\n }\n if (hasDynamicChild2(param)) {\n const offset = toNumber2(cursor.readBytes(sizeOfOffset2));\n const start = staticPosition + offset;\n const value2 = [];\n for (let i3 = 0; i3 < length; ++i3) {\n cursor.setPosition(start + i3 * 32);\n const [data] = decodeParameter2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition: start\n });\n value2.push(data);\n }\n cursor.setPosition(staticPosition + 32);\n return [value2, 32];\n }\n let consumed = 0;\n const value = [];\n for (let i3 = 0; i3 < length; ++i3) {\n const [data, consumed_] = decodeParameter2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition: staticPosition + consumed\n });\n consumed += consumed_;\n value.push(data);\n }\n return [value, consumed];\n }\n function decodeBool2(cursor) {\n return [toBoolean(cursor.readBytes(32), { size: 32 }), 32];\n }\n function decodeBytes2(cursor, param, { staticPosition }) {\n const [_2, size6] = param.type.split(\"bytes\");\n if (!size6) {\n const offset = toNumber2(cursor.readBytes(32));\n cursor.setPosition(staticPosition + offset);\n const length = toNumber2(cursor.readBytes(32));\n if (length === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"0x\", 32];\n }\n const data = cursor.readBytes(length);\n cursor.setPosition(staticPosition + 32);\n return [fromBytes(data), 32];\n }\n const value = fromBytes(cursor.readBytes(Number.parseInt(size6, 10), 32));\n return [value, 32];\n }\n function decodeNumber2(cursor, param) {\n const signed = param.type.startsWith(\"int\");\n const size6 = Number.parseInt(param.type.split(\"int\")[1] || \"256\", 10);\n const value = cursor.readBytes(32);\n return [\n size6 > 48 ? toBigInt2(value, { signed }) : toNumber2(value, { signed }),\n 32\n ];\n }\n function decodeTuple2(cursor, param, options) {\n const { checksumAddress: checksumAddress2, staticPosition } = options;\n const hasUnnamedChild = param.components.length === 0 || param.components.some(({ name }) => !name);\n const value = hasUnnamedChild ? [] : {};\n let consumed = 0;\n if (hasDynamicChild2(param)) {\n const offset = toNumber2(cursor.readBytes(sizeOfOffset2));\n const start = staticPosition + offset;\n for (let i3 = 0; i3 < param.components.length; ++i3) {\n const component = param.components[i3];\n cursor.setPosition(start + consumed);\n const [data, consumed_] = decodeParameter2(cursor, component, {\n checksumAddress: checksumAddress2,\n staticPosition: start\n });\n consumed += consumed_;\n value[hasUnnamedChild ? i3 : component?.name] = data;\n }\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n for (let i3 = 0; i3 < param.components.length; ++i3) {\n const component = param.components[i3];\n const [data, consumed_] = decodeParameter2(cursor, component, {\n checksumAddress: checksumAddress2,\n staticPosition\n });\n value[hasUnnamedChild ? i3 : component?.name] = data;\n consumed += consumed_;\n }\n return [value, consumed];\n }\n function decodeString2(cursor, { staticPosition }) {\n const offset = toNumber2(cursor.readBytes(32));\n const start = staticPosition + offset;\n cursor.setPosition(start);\n const length = toNumber2(cursor.readBytes(32));\n if (length === 0) {\n cursor.setPosition(staticPosition + 32);\n return [\"\", 32];\n }\n const data = cursor.readBytes(length, 32);\n const value = toString(trimLeft(data));\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n function prepareParameters({ checksumAddress: checksumAddress2, parameters, values }) {\n const preparedParameters = [];\n for (let i3 = 0; i3 < parameters.length; i3++) {\n preparedParameters.push(prepareParameter({\n checksumAddress: checksumAddress2,\n parameter: parameters[i3],\n value: values[i3]\n }));\n }\n return preparedParameters;\n }\n function prepareParameter({ checksumAddress: checksumAddress2 = false, parameter: parameter_, value }) {\n const parameter = parameter_;\n const arrayComponents = getArrayComponents2(parameter.type);\n if (arrayComponents) {\n const [length, type] = arrayComponents;\n return encodeArray2(value, {\n checksumAddress: checksumAddress2,\n length,\n parameter: {\n ...parameter,\n type\n }\n });\n }\n if (parameter.type === \"tuple\") {\n return encodeTuple2(value, {\n checksumAddress: checksumAddress2,\n parameter\n });\n }\n if (parameter.type === \"address\") {\n return encodeAddress2(value, {\n checksum: checksumAddress2\n });\n }\n if (parameter.type === \"bool\") {\n return encodeBoolean(value);\n }\n if (parameter.type.startsWith(\"uint\") || parameter.type.startsWith(\"int\")) {\n const signed = parameter.type.startsWith(\"int\");\n const [, , size6 = \"256\"] = integerRegex3.exec(parameter.type) ?? [];\n return encodeNumber2(value, {\n signed,\n size: Number(size6)\n });\n }\n if (parameter.type.startsWith(\"bytes\")) {\n return encodeBytes2(value, { type: parameter.type });\n }\n if (parameter.type === \"string\") {\n return encodeString2(value);\n }\n throw new InvalidTypeError(parameter.type);\n }\n function encode4(preparedParameters) {\n let staticSize = 0;\n for (let i3 = 0; i3 < preparedParameters.length; i3++) {\n const { dynamic, encoded } = preparedParameters[i3];\n if (dynamic)\n staticSize += 32;\n else\n staticSize += size3(encoded);\n }\n const staticParameters = [];\n const dynamicParameters = [];\n let dynamicSize = 0;\n for (let i3 = 0; i3 < preparedParameters.length; i3++) {\n const { dynamic, encoded } = preparedParameters[i3];\n if (dynamic) {\n staticParameters.push(fromNumber(staticSize + dynamicSize, { size: 32 }));\n dynamicParameters.push(encoded);\n dynamicSize += size3(encoded);\n } else {\n staticParameters.push(encoded);\n }\n }\n return concat3(...staticParameters, ...dynamicParameters);\n }\n function encodeAddress2(value, options) {\n const { checksum: checksum4 = false } = options;\n assert5(value, { strict: checksum4 });\n return {\n dynamic: false,\n encoded: padLeft(value.toLowerCase())\n };\n }\n function encodeArray2(value, options) {\n const { checksumAddress: checksumAddress2, length, parameter } = options;\n const dynamic = length === null;\n if (!Array.isArray(value))\n throw new InvalidArrayError2(value);\n if (!dynamic && value.length !== length)\n throw new ArrayLengthMismatchError({\n expectedLength: length,\n givenLength: value.length,\n type: `${parameter.type}[${length}]`\n });\n let dynamicChild = false;\n const preparedParameters = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n const preparedParam = prepareParameter({\n checksumAddress: checksumAddress2,\n parameter,\n value: value[i3]\n });\n if (preparedParam.dynamic)\n dynamicChild = true;\n preparedParameters.push(preparedParam);\n }\n if (dynamic || dynamicChild) {\n const data = encode4(preparedParameters);\n if (dynamic) {\n const length2 = fromNumber(preparedParameters.length, { size: 32 });\n return {\n dynamic: true,\n encoded: preparedParameters.length > 0 ? concat3(length2, data) : length2\n };\n }\n if (dynamicChild)\n return { dynamic: true, encoded: data };\n }\n return {\n dynamic: false,\n encoded: concat3(...preparedParameters.map(({ encoded }) => encoded))\n };\n }\n function encodeBytes2(value, { type }) {\n const [, parametersize] = type.split(\"bytes\");\n const bytesSize = size3(value);\n if (!parametersize) {\n let value_ = value;\n if (bytesSize % 32 !== 0)\n value_ = padRight(value_, Math.ceil((value.length - 2) / 2 / 32) * 32);\n return {\n dynamic: true,\n encoded: concat3(padLeft(fromNumber(bytesSize, { size: 32 })), value_)\n };\n }\n if (bytesSize !== Number.parseInt(parametersize, 10))\n throw new BytesSizeMismatchError2({\n expectedSize: Number.parseInt(parametersize, 10),\n value\n });\n return { dynamic: false, encoded: padRight(value) };\n }\n function encodeBoolean(value) {\n if (typeof value !== \"boolean\")\n throw new BaseError3(`Invalid boolean value: \"${value}\" (type: ${typeof value}). Expected: \\`true\\` or \\`false\\`.`);\n return { dynamic: false, encoded: padLeft(fromBoolean(value)) };\n }\n function encodeNumber2(value, { signed, size: size6 }) {\n if (typeof size6 === \"number\") {\n const max = 2n ** (BigInt(size6) - (signed ? 1n : 0n)) - 1n;\n const min = signed ? -max - 1n : 0n;\n if (value > max || value < min)\n throw new IntegerOutOfRangeError2({\n max: max.toString(),\n min: min.toString(),\n signed,\n size: size6 / 8,\n value: value.toString()\n });\n }\n return {\n dynamic: false,\n encoded: fromNumber(value, {\n size: 32,\n signed\n })\n };\n }\n function encodeString2(value) {\n const hexValue = fromString2(value);\n const partsLength = Math.ceil(size3(hexValue) / 32);\n const parts = [];\n for (let i3 = 0; i3 < partsLength; i3++) {\n parts.push(padRight(slice3(hexValue, i3 * 32, (i3 + 1) * 32)));\n }\n return {\n dynamic: true,\n encoded: concat3(padRight(fromNumber(size3(hexValue), { size: 32 })), ...parts)\n };\n }\n function encodeTuple2(value, options) {\n const { checksumAddress: checksumAddress2, parameter } = options;\n let dynamic = false;\n const preparedParameters = [];\n for (let i3 = 0; i3 < parameter.components.length; i3++) {\n const param_ = parameter.components[i3];\n const index2 = Array.isArray(value) ? i3 : param_.name;\n const preparedParam = prepareParameter({\n checksumAddress: checksumAddress2,\n parameter: param_,\n value: value[index2]\n });\n preparedParameters.push(preparedParam);\n if (preparedParam.dynamic)\n dynamic = true;\n }\n return {\n dynamic,\n encoded: dynamic ? encode4(preparedParameters) : concat3(...preparedParameters.map(({ encoded }) => encoded))\n };\n }\n function getArrayComponents2(type) {\n const matches = type.match(/^(.*)\\[(\\d+)?\\]$/);\n return matches ? (\n // Return `null` if the array is dynamic.\n [matches[2] ? Number(matches[2]) : null, matches[1]]\n ) : void 0;\n }\n function hasDynamicChild2(param) {\n const { type } = param;\n if (type === \"string\")\n return true;\n if (type === \"bytes\")\n return true;\n if (type.endsWith(\"[]\"))\n return true;\n if (type === \"tuple\")\n return param.components?.some(hasDynamicChild2);\n const arrayComponents = getArrayComponents2(param.type);\n if (arrayComponents && hasDynamicChild2({\n ...param,\n type: arrayComponents[1]\n }))\n return true;\n return false;\n }\n var sizeOfLength2, sizeOfOffset2;\n var init_abiParameters = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/abiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiParameters();\n init_Address();\n init_Bytes();\n init_Errors();\n init_Hex();\n init_Solidity();\n sizeOfLength2 = 32;\n sizeOfOffset2 = 32;\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/cursor.js\n function create(bytes, { recursiveReadLimit = 8192 } = {}) {\n const cursor = Object.create(staticCursor2);\n cursor.bytes = bytes;\n cursor.dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n cursor.positionReadCount = /* @__PURE__ */ new Map();\n cursor.recursiveReadLimit = recursiveReadLimit;\n return cursor;\n }\n var staticCursor2, NegativeOffsetError2, PositionOutOfBoundsError2, RecursiveReadLimitExceededError2;\n var init_cursor3 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/cursor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors();\n staticCursor2 = {\n bytes: new Uint8Array(),\n dataView: new DataView(new ArrayBuffer(0)),\n position: 0,\n positionReadCount: /* @__PURE__ */ new Map(),\n recursiveReadCount: 0,\n recursiveReadLimit: Number.POSITIVE_INFINITY,\n assertReadLimit() {\n if (this.recursiveReadCount >= this.recursiveReadLimit)\n throw new RecursiveReadLimitExceededError2({\n count: this.recursiveReadCount + 1,\n limit: this.recursiveReadLimit\n });\n },\n assertPosition(position) {\n if (position < 0 || position > this.bytes.length - 1)\n throw new PositionOutOfBoundsError2({\n length: this.bytes.length,\n position\n });\n },\n decrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError2({ offset });\n const position = this.position - offset;\n this.assertPosition(position);\n this.position = position;\n },\n getReadCount(position) {\n return this.positionReadCount.get(position || this.position) || 0;\n },\n incrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError2({ offset });\n const position = this.position + offset;\n this.assertPosition(position);\n this.position = position;\n },\n inspectByte(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectBytes(length, position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + length - 1);\n return this.bytes.subarray(position, position + length);\n },\n inspectUint8(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectUint16(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 1);\n return this.dataView.getUint16(position);\n },\n inspectUint24(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 2);\n return (this.dataView.getUint16(position) << 8) + this.dataView.getUint8(position + 2);\n },\n inspectUint32(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 3);\n return this.dataView.getUint32(position);\n },\n pushByte(byte) {\n this.assertPosition(this.position);\n this.bytes[this.position] = byte;\n this.position++;\n },\n pushBytes(bytes) {\n this.assertPosition(this.position + bytes.length - 1);\n this.bytes.set(bytes, this.position);\n this.position += bytes.length;\n },\n pushUint8(value) {\n this.assertPosition(this.position);\n this.bytes[this.position] = value;\n this.position++;\n },\n pushUint16(value) {\n this.assertPosition(this.position + 1);\n this.dataView.setUint16(this.position, value);\n this.position += 2;\n },\n pushUint24(value) {\n this.assertPosition(this.position + 2);\n this.dataView.setUint16(this.position, value >> 8);\n this.dataView.setUint8(this.position + 2, value & ~4294967040);\n this.position += 3;\n },\n pushUint32(value) {\n this.assertPosition(this.position + 3);\n this.dataView.setUint32(this.position, value);\n this.position += 4;\n },\n readByte() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectByte();\n this.position++;\n return value;\n },\n readBytes(length, size6) {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectBytes(length);\n this.position += size6 ?? length;\n return value;\n },\n readUint8() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint8();\n this.position += 1;\n return value;\n },\n readUint16() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint16();\n this.position += 2;\n return value;\n },\n readUint24() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint24();\n this.position += 3;\n return value;\n },\n readUint32() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint32();\n this.position += 4;\n return value;\n },\n get remaining() {\n return this.bytes.length - this.position;\n },\n setPosition(position) {\n const oldPosition = this.position;\n this.assertPosition(position);\n this.position = position;\n return () => this.position = oldPosition;\n },\n _touch() {\n if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)\n return;\n const count = this.getReadCount();\n this.positionReadCount.set(this.position, count + 1);\n if (count > 0)\n this.recursiveReadCount++;\n }\n };\n NegativeOffsetError2 = class extends BaseError3 {\n constructor({ offset }) {\n super(`Offset \\`${offset}\\` cannot be negative.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Cursor.NegativeOffsetError\"\n });\n }\n };\n PositionOutOfBoundsError2 = class extends BaseError3 {\n constructor({ length, position }) {\n super(`Position \\`${position}\\` is out of bounds (\\`0 < position < ${length}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Cursor.PositionOutOfBoundsError\"\n });\n }\n };\n RecursiveReadLimitExceededError2 = class extends BaseError3 {\n constructor({ count, limit }) {\n super(`Recursive read limit of \\`${limit}\\` exceeded (recursive read count: \\`${count}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Cursor.RecursiveReadLimitExceededError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiParameters.js\n function decode3(parameters, data, options = {}) {\n const { as = \"Array\", checksumAddress: checksumAddress2 = false } = options;\n const bytes = typeof data === \"string\" ? fromHex2(data) : data;\n const cursor = create(bytes);\n if (size2(bytes) === 0 && parameters.length > 0)\n throw new ZeroDataError();\n if (size2(bytes) && size2(bytes) < 32)\n throw new DataSizeTooSmallError({\n data: typeof data === \"string\" ? data : fromBytes(data),\n parameters,\n size: size2(bytes)\n });\n let consumed = 0;\n const values = as === \"Array\" ? [] : {};\n for (let i3 = 0; i3 < parameters.length; ++i3) {\n const param = parameters[i3];\n cursor.setPosition(consumed);\n const [data2, consumed_] = decodeParameter2(cursor, param, {\n checksumAddress: checksumAddress2,\n staticPosition: 0\n });\n consumed += consumed_;\n if (as === \"Array\")\n values.push(data2);\n else\n values[param.name ?? i3] = data2;\n }\n return values;\n }\n function encode5(parameters, values, options) {\n const { checksumAddress: checksumAddress2 = false } = options ?? {};\n if (parameters.length !== values.length)\n throw new LengthMismatchError({\n expectedLength: parameters.length,\n givenLength: values.length\n });\n const preparedParameters = prepareParameters({\n checksumAddress: checksumAddress2,\n parameters,\n values\n });\n const data = encode4(preparedParameters);\n if (data.length === 0)\n return \"0x\";\n return data;\n }\n function encodePacked2(types2, values) {\n if (types2.length !== values.length)\n throw new LengthMismatchError({\n expectedLength: types2.length,\n givenLength: values.length\n });\n const data = [];\n for (let i3 = 0; i3 < types2.length; i3++) {\n const type = types2[i3];\n const value = values[i3];\n data.push(encodePacked2.encode(type, value));\n }\n return concat3(...data);\n }\n function from5(parameters) {\n if (Array.isArray(parameters) && typeof parameters[0] === \"string\")\n return parseAbiParameters(parameters);\n if (typeof parameters === \"string\")\n return parseAbiParameters(parameters);\n return parameters;\n }\n var DataSizeTooSmallError, ZeroDataError, ArrayLengthMismatchError, BytesSizeMismatchError2, LengthMismatchError, InvalidArrayError2, InvalidTypeError;\n var init_AbiParameters = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiParameters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_Address();\n init_Bytes();\n init_Errors();\n init_Hex();\n init_abiParameters();\n init_cursor3();\n init_Solidity();\n (function(encodePacked3) {\n function encode7(type, value, isArray = false) {\n if (type === \"address\") {\n const address = value;\n assert5(address);\n return padLeft(address.toLowerCase(), isArray ? 32 : 0);\n }\n if (type === \"string\")\n return fromString2(value);\n if (type === \"bytes\")\n return value;\n if (type === \"bool\")\n return padLeft(fromBoolean(value), isArray ? 32 : 1);\n const intMatch = type.match(integerRegex3);\n if (intMatch) {\n const [_type, baseType, bits = \"256\"] = intMatch;\n const size6 = Number.parseInt(bits, 10) / 8;\n return fromNumber(value, {\n size: isArray ? 32 : size6,\n signed: baseType === \"int\"\n });\n }\n const bytesMatch = type.match(bytesRegex3);\n if (bytesMatch) {\n const [_type, size6] = bytesMatch;\n if (Number.parseInt(size6, 10) !== (value.length - 2) / 2)\n throw new BytesSizeMismatchError2({\n expectedSize: Number.parseInt(size6, 10),\n value\n });\n return padRight(value, isArray ? 32 : 0);\n }\n const arrayMatch = type.match(arrayRegex2);\n if (arrayMatch && Array.isArray(value)) {\n const [_type, childType] = arrayMatch;\n const data = [];\n for (let i3 = 0; i3 < value.length; i3++) {\n data.push(encode7(childType, value[i3], true));\n }\n if (data.length === 0)\n return \"0x\";\n return concat3(...data);\n }\n throw new InvalidTypeError(type);\n }\n encodePacked3.encode = encode7;\n })(encodePacked2 || (encodePacked2 = {}));\n DataSizeTooSmallError = class extends BaseError3 {\n constructor({ data, parameters, size: size6 }) {\n super(`Data size of ${size6} bytes is too small for given parameters.`, {\n metaMessages: [\n `Params: (${formatAbiParameters(parameters)})`,\n `Data: ${data} (${size6} bytes)`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.DataSizeTooSmallError\"\n });\n }\n };\n ZeroDataError = class extends BaseError3 {\n constructor() {\n super('Cannot decode zero data (\"0x\") with ABI parameters.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.ZeroDataError\"\n });\n }\n };\n ArrayLengthMismatchError = class extends BaseError3 {\n constructor({ expectedLength, givenLength, type }) {\n super(`Array length mismatch for type \\`${type}\\`. Expected: \\`${expectedLength}\\`. Given: \\`${givenLength}\\`.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.ArrayLengthMismatchError\"\n });\n }\n };\n BytesSizeMismatchError2 = class extends BaseError3 {\n constructor({ expectedSize, value }) {\n super(`Size of bytes \"${value}\" (bytes${size3(value)}) does not match expected size (bytes${expectedSize}).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.BytesSizeMismatchError\"\n });\n }\n };\n LengthMismatchError = class extends BaseError3 {\n constructor({ expectedLength, givenLength }) {\n super([\n \"ABI encoding parameters/values length mismatch.\",\n `Expected length (parameters): ${expectedLength}`,\n `Given length (values): ${givenLength}`\n ].join(\"\\n\"));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.LengthMismatchError\"\n });\n }\n };\n InvalidArrayError2 = class extends BaseError3 {\n constructor(value) {\n super(`Value \\`${value}\\` is not a valid array.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.InvalidArrayError\"\n });\n }\n };\n InvalidTypeError = class extends BaseError3 {\n constructor(type) {\n super(`Type \\`${type}\\` is not a valid ABI Type.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiParameters.InvalidTypeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Rlp.js\n function from6(value, options) {\n const { as } = options;\n const encodable = getEncodable2(value);\n const cursor = create(new Uint8Array(encodable.length));\n encodable.encode(cursor);\n if (as === \"Hex\")\n return fromBytes(cursor.bytes);\n return cursor.bytes;\n }\n function fromHex4(hex, options = {}) {\n const { as = \"Hex\" } = options;\n return from6(hex, { as });\n }\n function getEncodable2(bytes) {\n if (Array.isArray(bytes))\n return getEncodableList2(bytes.map((x4) => getEncodable2(x4)));\n return getEncodableBytes2(bytes);\n }\n function getEncodableList2(list) {\n const bodyLength = list.reduce((acc, x4) => acc + x4.length, 0);\n const sizeOfBodyLength = getSizeOfLength2(bodyLength);\n const length = (() => {\n if (bodyLength <= 55)\n return 1 + bodyLength;\n return 1 + sizeOfBodyLength + bodyLength;\n })();\n return {\n length,\n encode(cursor) {\n if (bodyLength <= 55) {\n cursor.pushByte(192 + bodyLength);\n } else {\n cursor.pushByte(192 + 55 + sizeOfBodyLength);\n if (sizeOfBodyLength === 1)\n cursor.pushUint8(bodyLength);\n else if (sizeOfBodyLength === 2)\n cursor.pushUint16(bodyLength);\n else if (sizeOfBodyLength === 3)\n cursor.pushUint24(bodyLength);\n else\n cursor.pushUint32(bodyLength);\n }\n for (const { encode: encode7 } of list) {\n encode7(cursor);\n }\n }\n };\n }\n function getEncodableBytes2(bytesOrHex) {\n const bytes = typeof bytesOrHex === \"string\" ? fromHex2(bytesOrHex) : bytesOrHex;\n const sizeOfBytesLength = getSizeOfLength2(bytes.length);\n const length = (() => {\n if (bytes.length === 1 && bytes[0] < 128)\n return 1;\n if (bytes.length <= 55)\n return 1 + bytes.length;\n return 1 + sizeOfBytesLength + bytes.length;\n })();\n return {\n length,\n encode(cursor) {\n if (bytes.length === 1 && bytes[0] < 128) {\n cursor.pushBytes(bytes);\n } else if (bytes.length <= 55) {\n cursor.pushByte(128 + bytes.length);\n cursor.pushBytes(bytes);\n } else {\n cursor.pushByte(128 + 55 + sizeOfBytesLength);\n if (sizeOfBytesLength === 1)\n cursor.pushUint8(bytes.length);\n else if (sizeOfBytesLength === 2)\n cursor.pushUint16(bytes.length);\n else if (sizeOfBytesLength === 3)\n cursor.pushUint24(bytes.length);\n else\n cursor.pushUint32(bytes.length);\n cursor.pushBytes(bytes);\n }\n }\n };\n }\n function getSizeOfLength2(length) {\n if (length < 2 ** 8)\n return 1;\n if (length < 2 ** 16)\n return 2;\n if (length < 2 ** 24)\n return 3;\n if (length < 2 ** 32)\n return 4;\n throw new BaseError3(\"Length is too large.\");\n }\n var init_Rlp = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Rlp.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Bytes();\n init_Errors();\n init_Hex();\n init_cursor3();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Signature.js\n function assert6(signature, options = {}) {\n const { recovered } = options;\n if (typeof signature.r === \"undefined\")\n throw new MissingPropertiesError({ signature });\n if (typeof signature.s === \"undefined\")\n throw new MissingPropertiesError({ signature });\n if (recovered && typeof signature.yParity === \"undefined\")\n throw new MissingPropertiesError({ signature });\n if (signature.r < 0n || signature.r > maxUint2562)\n throw new InvalidRError({ value: signature.r });\n if (signature.s < 0n || signature.s > maxUint2562)\n throw new InvalidSError({ value: signature.s });\n if (typeof signature.yParity === \"number\" && signature.yParity !== 0 && signature.yParity !== 1)\n throw new InvalidYParityError({ value: signature.yParity });\n }\n function fromBytes3(signature) {\n return fromHex5(fromBytes(signature));\n }\n function fromHex5(signature) {\n if (signature.length !== 130 && signature.length !== 132)\n throw new InvalidSerializedSizeError2({ signature });\n const r2 = BigInt(slice3(signature, 0, 32));\n const s4 = BigInt(slice3(signature, 32, 64));\n const yParity = (() => {\n const yParity2 = Number(`0x${signature.slice(130)}`);\n if (Number.isNaN(yParity2))\n return void 0;\n try {\n return vToYParity(yParity2);\n } catch {\n throw new InvalidYParityError({ value: yParity2 });\n }\n })();\n if (typeof yParity === \"undefined\")\n return {\n r: r2,\n s: s4\n };\n return {\n r: r2,\n s: s4,\n yParity\n };\n }\n function extract2(value) {\n if (typeof value.r === \"undefined\")\n return void 0;\n if (typeof value.s === \"undefined\")\n return void 0;\n return from7(value);\n }\n function from7(signature) {\n const signature_ = (() => {\n if (typeof signature === \"string\")\n return fromHex5(signature);\n if (signature instanceof Uint8Array)\n return fromBytes3(signature);\n if (typeof signature.r === \"string\")\n return fromRpc2(signature);\n if (signature.v)\n return fromLegacy(signature);\n return {\n r: signature.r,\n s: signature.s,\n ...typeof signature.yParity !== \"undefined\" ? { yParity: signature.yParity } : {}\n };\n })();\n assert6(signature_);\n return signature_;\n }\n function fromLegacy(signature) {\n return {\n r: signature.r,\n s: signature.s,\n yParity: vToYParity(signature.v)\n };\n }\n function fromRpc2(signature) {\n const yParity = (() => {\n const v2 = signature.v ? Number(signature.v) : void 0;\n let yParity2 = signature.yParity ? Number(signature.yParity) : void 0;\n if (typeof v2 === \"number\" && typeof yParity2 !== \"number\")\n yParity2 = vToYParity(v2);\n if (typeof yParity2 !== \"number\")\n throw new InvalidYParityError({ value: signature.yParity });\n return yParity2;\n })();\n return {\n r: BigInt(signature.r),\n s: BigInt(signature.s),\n yParity\n };\n }\n function toTuple(signature) {\n const { r: r2, s: s4, yParity } = signature;\n return [\n yParity ? \"0x01\" : \"0x\",\n r2 === 0n ? \"0x\" : trimLeft2(fromNumber(r2)),\n s4 === 0n ? \"0x\" : trimLeft2(fromNumber(s4))\n ];\n }\n function vToYParity(v2) {\n if (v2 === 0 || v2 === 27)\n return 0;\n if (v2 === 1 || v2 === 28)\n return 1;\n if (v2 >= 35)\n return v2 % 2 === 0 ? 1 : 0;\n throw new InvalidVError({ value: v2 });\n }\n var InvalidSerializedSizeError2, MissingPropertiesError, InvalidRError, InvalidSError, InvalidYParityError, InvalidVError;\n var init_Signature = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Signature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors();\n init_Hex();\n init_Json();\n init_Solidity();\n InvalidSerializedSizeError2 = class extends BaseError3 {\n constructor({ signature }) {\n super(`Value \\`${signature}\\` is an invalid signature size.`, {\n metaMessages: [\n \"Expected: 64 bytes or 65 bytes.\",\n `Received ${size3(from2(signature))} bytes.`\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidSerializedSizeError\"\n });\n }\n };\n MissingPropertiesError = class extends BaseError3 {\n constructor({ signature }) {\n super(`Signature \\`${stringify2(signature)}\\` is missing either an \\`r\\`, \\`s\\`, or \\`yParity\\` property.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.MissingPropertiesError\"\n });\n }\n };\n InvalidRError = class extends BaseError3 {\n constructor({ value }) {\n super(`Value \\`${value}\\` is an invalid r value. r must be a positive integer less than 2^256.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidRError\"\n });\n }\n };\n InvalidSError = class extends BaseError3 {\n constructor({ value }) {\n super(`Value \\`${value}\\` is an invalid s value. s must be a positive integer less than 2^256.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidSError\"\n });\n }\n };\n InvalidYParityError = class extends BaseError3 {\n constructor({ value }) {\n super(`Value \\`${value}\\` is an invalid y-parity value. Y-parity must be 0 or 1.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidYParityError\"\n });\n }\n };\n InvalidVError = class extends BaseError3 {\n constructor({ value }) {\n super(`Value \\`${value}\\` is an invalid v value. v must be 27, 28 or >=35.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Signature.InvalidVError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Authorization.js\n function from8(authorization, options = {}) {\n if (typeof authorization.chainId === \"string\")\n return fromRpc3(authorization);\n return { ...authorization, ...options.signature };\n }\n function fromRpc3(authorization) {\n const { address, chainId, nonce } = authorization;\n const signature = extract2(authorization);\n return {\n address,\n chainId: Number(chainId),\n nonce: BigInt(nonce),\n ...signature\n };\n }\n function getSignPayload(authorization) {\n return hash2(authorization, { presign: true });\n }\n function hash2(authorization, options = {}) {\n const { presign } = options;\n return keccak2562(concat3(\"0x05\", fromHex4(toTuple2(presign ? {\n address: authorization.address,\n chainId: authorization.chainId,\n nonce: authorization.nonce\n } : authorization))));\n }\n function toTuple2(authorization) {\n const { address, chainId, nonce } = authorization;\n const signature = extract2(authorization);\n return [\n chainId ? fromNumber(chainId) : \"0x\",\n address,\n nonce ? fromNumber(nonce) : \"0x\",\n ...signature ? toTuple(signature) : []\n ];\n }\n var init_Authorization = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Authorization.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hash();\n init_Hex();\n init_Rlp();\n init_Signature();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Secp256k1.js\n function recoverAddress2(options) {\n return fromPublicKey(recoverPublicKey2(options));\n }\n function recoverPublicKey2(options) {\n const { payload, signature } = options;\n const { r: r2, s: s4, yParity } = signature;\n const signature_ = new secp256k1.Signature(BigInt(r2), BigInt(s4)).addRecoveryBit(yParity);\n const point = signature_.recoverPublicKey(from2(payload).substring(2));\n return from3(point);\n }\n var init_Secp256k1 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Secp256k1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_Address();\n init_Hex();\n init_PublicKey();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc8010/SignatureErc8010.js\n var SignatureErc8010_exports = {};\n __export(SignatureErc8010_exports, {\n InvalidWrappedSignatureError: () => InvalidWrappedSignatureError,\n assert: () => assert7,\n from: () => from9,\n magicBytes: () => magicBytes,\n suffixParameters: () => suffixParameters,\n unwrap: () => unwrap3,\n validate: () => validate4,\n wrap: () => wrap3\n });\n function assert7(value) {\n if (typeof value === \"string\") {\n if (slice3(value, -32) !== magicBytes)\n throw new InvalidWrappedSignatureError(value);\n } else\n assert6(value.authorization);\n }\n function from9(value) {\n if (typeof value === \"string\")\n return unwrap3(value);\n return value;\n }\n function unwrap3(wrapped) {\n assert7(wrapped);\n const suffixLength = toNumber(slice3(wrapped, -64, -32));\n const suffix = slice3(wrapped, -suffixLength - 64, -64);\n const signature = slice3(wrapped, 0, -suffixLength - 64);\n const [auth, to, data] = decode3(suffixParameters, suffix);\n const authorization = from8({\n address: auth.delegation,\n chainId: Number(auth.chainId),\n nonce: auth.nonce,\n yParity: auth.yParity,\n r: auth.r,\n s: auth.s\n });\n return {\n authorization,\n signature,\n ...data && data !== \"0x\" ? { data, to } : {}\n };\n }\n function wrap3(value) {\n const { data, signature } = value;\n assert7(value);\n const self2 = recoverAddress2({\n payload: getSignPayload(value.authorization),\n signature: from7(value.authorization)\n });\n const suffix = encode5(suffixParameters, [\n {\n ...value.authorization,\n delegation: value.authorization.address,\n chainId: BigInt(value.authorization.chainId)\n },\n value.to ?? self2,\n data ?? \"0x\"\n ]);\n const suffixLength = fromNumber(size3(suffix), { size: 32 });\n return concat3(signature, suffix, suffixLength, magicBytes);\n }\n function validate4(value) {\n try {\n assert7(value);\n return true;\n } catch {\n return false;\n }\n }\n var magicBytes, suffixParameters, InvalidWrappedSignatureError;\n var init_SignatureErc8010 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc8010/SignatureErc8010.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiParameters();\n init_Authorization();\n init_Errors();\n init_Hex();\n init_Secp256k1();\n init_Signature();\n magicBytes = \"0x8010801080108010801080108010801080108010801080108010801080108010\";\n suffixParameters = from5(\"(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data\");\n InvalidWrappedSignatureError = class extends BaseError3 {\n constructor(wrapped) {\n super(`Value \\`${wrapped}\\` is an invalid ERC-8010 wrapped signature.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignatureErc8010.InvalidWrappedSignatureError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc8010/index.js\n var init_erc8010 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc8010/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_SignatureErc8010();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/index.js\n var init_utils7 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/proof.js\n function formatStorageProof(storageProof) {\n return storageProof.map((proof) => ({\n ...proof,\n value: BigInt(proof.value)\n }));\n }\n function formatProof(proof) {\n return {\n ...proof,\n balance: proof.balance ? BigInt(proof.balance) : void 0,\n nonce: proof.nonce ? hexToNumber(proof.nonce) : void 0,\n storageProof: proof.storageProof ? formatStorageProof(proof.storageProof) : void 0\n };\n }\n var init_proof = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/formatters/proof.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils7();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getProof.js\n async function getProof(client, { address, blockNumber, blockTag: blockTag_, storageKeys }) {\n const blockTag = blockTag_ ?? \"latest\";\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n const proof = await client.request({\n method: \"eth_getProof\",\n params: [address, storageKeys, blockNumberHex || blockTag]\n });\n return formatProof(proof);\n }\n var init_getProof = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getProof.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_proof();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getStorageAt.js\n async function getStorageAt(client, { address, blockNumber, blockTag = \"latest\", slot }) {\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n const data = await client.request({\n method: \"eth_getStorageAt\",\n params: [address, slot, blockNumberHex || blockTag]\n });\n return data;\n }\n var init_getStorageAt = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getStorageAt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransaction.js\n async function getTransaction(client, { blockHash, blockNumber, blockTag: blockTag_, hash: hash3, index: index2 }) {\n const blockTag = blockTag_ || \"latest\";\n const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;\n let transaction = null;\n if (hash3) {\n transaction = await client.request({\n method: \"eth_getTransactionByHash\",\n params: [hash3]\n }, { dedupe: true });\n } else if (blockHash) {\n transaction = await client.request({\n method: \"eth_getTransactionByBlockHashAndIndex\",\n params: [blockHash, numberToHex(index2)]\n }, { dedupe: true });\n } else if (blockNumberHex || blockTag) {\n transaction = await client.request({\n method: \"eth_getTransactionByBlockNumberAndIndex\",\n params: [blockNumberHex || blockTag, numberToHex(index2)]\n }, { dedupe: Boolean(blockNumberHex) });\n }\n if (!transaction)\n throw new TransactionNotFoundError({\n blockHash,\n blockNumber,\n blockTag,\n hash: hash3,\n index: index2\n });\n const format = client.chain?.formatters?.transaction?.format || formatTransaction;\n return format(transaction, \"getTransaction\");\n }\n var init_getTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n init_toHex();\n init_transaction2();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionConfirmations.js\n async function getTransactionConfirmations(client, { hash: hash3, transactionReceipt }) {\n const [blockNumber, transaction] = await Promise.all([\n getAction(client, getBlockNumber, \"getBlockNumber\")({}),\n hash3 ? getAction(client, getTransaction, \"getTransaction\")({ hash: hash3 }) : void 0\n ]);\n const transactionBlockNumber = transactionReceipt?.blockNumber || transaction?.blockNumber;\n if (!transactionBlockNumber)\n return 0n;\n return blockNumber - transactionBlockNumber + 1n;\n }\n var init_getTransactionConfirmations = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionConfirmations.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAction();\n init_getBlockNumber();\n init_getTransaction();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionReceipt.js\n async function getTransactionReceipt(client, { hash: hash3 }) {\n const receipt = await client.request({\n method: \"eth_getTransactionReceipt\",\n params: [hash3]\n }, { dedupe: true });\n if (!receipt)\n throw new TransactionReceiptNotFoundError({ hash: hash3 });\n const format = client.chain?.formatters?.transactionReceipt?.format || formatTransactionReceipt;\n return format(receipt, \"getTransactionReceipt\");\n }\n var init_getTransactionReceipt = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/getTransactionReceipt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n init_transactionReceipt();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/multicall.js\n async function multicall(client, parameters) {\n const { account, authorizationList, allowFailure = true, blockNumber, blockOverrides, blockTag, stateOverride } = parameters;\n const contracts2 = parameters.contracts;\n const { batchSize = parameters.batchSize ?? 1024, deployless = parameters.deployless ?? false } = typeof client.batch?.multicall === \"object\" ? client.batch.multicall : {};\n const multicallAddress = (() => {\n if (parameters.multicallAddress)\n return parameters.multicallAddress;\n if (deployless)\n return null;\n if (client.chain) {\n return getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: \"multicall3\"\n });\n }\n throw new Error(\"client chain not configured. multicallAddress is required.\");\n })();\n const chunkedCalls = [[]];\n let currentChunk = 0;\n let currentChunkSize = 0;\n for (let i3 = 0; i3 < contracts2.length; i3++) {\n const { abi: abi2, address, args, functionName } = contracts2[i3];\n try {\n const callData = encodeFunctionData({ abi: abi2, args, functionName });\n currentChunkSize += (callData.length - 2) / 2;\n if (\n // Check if batching is enabled.\n batchSize > 0 && // Check if the current size of the batch exceeds the size limit.\n currentChunkSize > batchSize && // Check if the current chunk is not already empty.\n chunkedCalls[currentChunk].length > 0\n ) {\n currentChunk++;\n currentChunkSize = (callData.length - 2) / 2;\n chunkedCalls[currentChunk] = [];\n }\n chunkedCalls[currentChunk] = [\n ...chunkedCalls[currentChunk],\n {\n allowFailure: true,\n callData,\n target: address\n }\n ];\n } catch (err) {\n const error = getContractError(err, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/multicall\",\n functionName,\n sender: account\n });\n if (!allowFailure)\n throw error;\n chunkedCalls[currentChunk] = [\n ...chunkedCalls[currentChunk],\n {\n allowFailure: true,\n callData: \"0x\",\n target: address\n }\n ];\n }\n }\n const aggregate3Results = await Promise.allSettled(chunkedCalls.map((calls) => getAction(client, readContract, \"readContract\")({\n ...multicallAddress === null ? { code: multicall3Bytecode } : { address: multicallAddress },\n abi: multicall3Abi,\n account,\n args: [calls],\n authorizationList,\n blockNumber,\n blockOverrides,\n blockTag,\n functionName: \"aggregate3\",\n stateOverride\n })));\n const results = [];\n for (let i3 = 0; i3 < aggregate3Results.length; i3++) {\n const result = aggregate3Results[i3];\n if (result.status === \"rejected\") {\n if (!allowFailure)\n throw result.reason;\n for (let j2 = 0; j2 < chunkedCalls[i3].length; j2++) {\n results.push({\n status: \"failure\",\n error: result.reason,\n result: void 0\n });\n }\n continue;\n }\n const aggregate3Result = result.value;\n for (let j2 = 0; j2 < aggregate3Result.length; j2++) {\n const { returnData, success } = aggregate3Result[j2];\n const { callData } = chunkedCalls[i3][j2];\n const { abi: abi2, address, functionName, args } = contracts2[results.length];\n try {\n if (callData === \"0x\")\n throw new AbiDecodingZeroDataError();\n if (!success)\n throw new RawContractError({ data: returnData });\n const result2 = decodeFunctionResult({\n abi: abi2,\n args,\n data: returnData,\n functionName\n });\n results.push(allowFailure ? { result: result2, status: \"success\" } : result2);\n } catch (err) {\n const error = getContractError(err, {\n abi: abi2,\n address,\n args,\n docsPath: \"/docs/contract/multicall\",\n functionName\n });\n if (!allowFailure)\n throw error;\n results.push({ error, result: void 0, status: \"failure\" });\n }\n }\n }\n if (results.length !== contracts2.length)\n throw new BaseError2(\"multicall results mismatch\");\n return results;\n }\n var init_multicall = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/multicall.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abis();\n init_contracts();\n init_abi();\n init_base();\n init_contract();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_getChainContractAddress();\n init_getContractError();\n init_getAction();\n init_readContract();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateBlocks.js\n async function simulateBlocks(client, parameters) {\n const { blockNumber, blockTag = client.experimental_blockTag ?? \"latest\", blocks, returnFullTransactions, traceTransfers, validation } = parameters;\n try {\n const blockStateCalls = [];\n for (const block2 of blocks) {\n const blockOverrides = block2.blockOverrides ? toRpc2(block2.blockOverrides) : void 0;\n const calls = block2.calls.map((call_) => {\n const call2 = call_;\n const account = call2.account ? parseAccount(call2.account) : void 0;\n const data = call2.abi ? encodeFunctionData(call2) : call2.data;\n const request = {\n ...call2,\n account,\n data: call2.dataSuffix ? concat2([data || \"0x\", call2.dataSuffix]) : data,\n from: call2.from ?? account?.address\n };\n assertRequest(request);\n return formatTransactionRequest(request);\n });\n const stateOverrides = block2.stateOverrides ? serializeStateOverride(block2.stateOverrides) : void 0;\n blockStateCalls.push({\n blockOverrides,\n calls,\n stateOverrides\n });\n }\n const blockNumberHex = typeof blockNumber === \"bigint\" ? numberToHex(blockNumber) : void 0;\n const block = blockNumberHex || blockTag;\n const result = await client.request({\n method: \"eth_simulateV1\",\n params: [\n { blockStateCalls, returnFullTransactions, traceTransfers, validation },\n block\n ]\n });\n return result.map((block2, i3) => ({\n ...formatBlock(block2),\n calls: block2.calls.map((call2, j2) => {\n const { abi: abi2, args, functionName, to } = blocks[i3].calls[j2];\n const data = call2.error?.data ?? call2.returnData;\n const gasUsed = BigInt(call2.gasUsed);\n const logs = call2.logs?.map((log) => formatLog(log));\n const status = call2.status === \"0x1\" ? \"success\" : \"failure\";\n const result2 = abi2 && status === \"success\" && data !== \"0x\" ? decodeFunctionResult({\n abi: abi2,\n data,\n functionName\n }) : null;\n const error = (() => {\n if (status === \"success\")\n return void 0;\n let error2;\n if (call2.error?.data === \"0x\")\n error2 = new AbiDecodingZeroDataError();\n else if (call2.error)\n error2 = new RawContractError(call2.error);\n if (!error2)\n return void 0;\n return getContractError(error2, {\n abi: abi2 ?? [],\n address: to ?? \"0x\",\n args,\n functionName: functionName ?? \"\"\n });\n })();\n return {\n data,\n gasUsed,\n logs,\n status,\n ...status === \"success\" ? {\n result: result2\n } : {\n error\n }\n };\n })\n }));\n } catch (e2) {\n const cause = e2;\n const error = getNodeError(cause, {});\n if (error instanceof UnknownNodeError)\n throw cause;\n throw error;\n }\n }\n var init_simulateBlocks = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateBlocks.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_BlockOverrides();\n init_parseAccount();\n init_abi();\n init_contract();\n init_node();\n init_decodeFunctionResult();\n init_encodeFunctionData();\n init_concat();\n init_toHex();\n init_getContractError();\n init_getNodeError();\n init_block2();\n init_log2();\n init_transactionRequest();\n init_stateOverride2();\n init_assertRequest();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/abiItem.js\n function normalizeSignature2(signature) {\n let active = true;\n let current = \"\";\n let level = 0;\n let result = \"\";\n let valid = false;\n for (let i3 = 0; i3 < signature.length; i3++) {\n const char = signature[i3];\n if ([\"(\", \")\", \",\"].includes(char))\n active = true;\n if (char === \"(\")\n level++;\n if (char === \")\")\n level--;\n if (!active)\n continue;\n if (level === 0) {\n if (char === \" \" && [\"event\", \"function\", \"error\", \"\"].includes(result))\n result = \"\";\n else {\n result += char;\n if (char === \")\") {\n valid = true;\n break;\n }\n }\n continue;\n }\n if (char === \" \") {\n if (signature[i3 - 1] !== \",\" && current !== \",\" && current !== \",(\") {\n current = \"\";\n active = false;\n }\n continue;\n }\n result += char;\n current += char;\n }\n if (!valid)\n throw new BaseError3(\"Unable to normalize signature.\");\n return result;\n }\n function isArgOfType2(arg, abiParameter) {\n const argType = typeof arg;\n const abiParameterType = abiParameter.type;\n switch (abiParameterType) {\n case \"address\":\n return validate3(arg, { strict: false });\n case \"bool\":\n return argType === \"boolean\";\n case \"function\":\n return argType === \"string\";\n case \"string\":\n return argType === \"string\";\n default: {\n if (abiParameterType === \"tuple\" && \"components\" in abiParameter)\n return Object.values(abiParameter.components).every((component, index2) => {\n return isArgOfType2(Object.values(arg)[index2], component);\n });\n if (/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(abiParameterType))\n return argType === \"number\" || argType === \"bigint\";\n if (/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(abiParameterType))\n return argType === \"string\" || arg instanceof Uint8Array;\n if (/[a-z]+[1-9]{0,3}(\\[[0-9]{0,}\\])+$/.test(abiParameterType)) {\n return Array.isArray(arg) && arg.every((x4) => isArgOfType2(x4, {\n ...abiParameter,\n // Pop off `[]` or `[M]` from end of type\n type: abiParameterType.replace(/(\\[[0-9]{0,}\\])$/, \"\")\n }));\n }\n return false;\n }\n }\n }\n function getAmbiguousTypes2(sourceParameters, targetParameters, args) {\n for (const parameterIndex in sourceParameters) {\n const sourceParameter = sourceParameters[parameterIndex];\n const targetParameter = targetParameters[parameterIndex];\n if (sourceParameter.type === \"tuple\" && targetParameter.type === \"tuple\" && \"components\" in sourceParameter && \"components\" in targetParameter)\n return getAmbiguousTypes2(sourceParameter.components, targetParameter.components, args[parameterIndex]);\n const types2 = [sourceParameter.type, targetParameter.type];\n const ambiguous = (() => {\n if (types2.includes(\"address\") && types2.includes(\"bytes20\"))\n return true;\n if (types2.includes(\"address\") && types2.includes(\"string\"))\n return validate3(args[parameterIndex], {\n strict: false\n });\n if (types2.includes(\"address\") && types2.includes(\"bytes\"))\n return validate3(args[parameterIndex], {\n strict: false\n });\n return false;\n })();\n if (ambiguous)\n return types2;\n }\n return;\n }\n var init_abiItem2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/abiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Address();\n init_Errors();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiItem.js\n function from10(abiItem, options = {}) {\n const { prepare = true } = options;\n const item = (() => {\n if (Array.isArray(abiItem))\n return parseAbiItem(abiItem);\n if (typeof abiItem === \"string\")\n return parseAbiItem(abiItem);\n return abiItem;\n })();\n return {\n ...item,\n ...prepare ? { hash: getSignatureHash(item) } : {}\n };\n }\n function fromAbi(abi2, name, options) {\n const { args = [], prepare = true } = options ?? {};\n const isSelector = validate2(name, { strict: false });\n const abiItems = abi2.filter((abiItem2) => {\n if (isSelector) {\n if (abiItem2.type === \"function\" || abiItem2.type === \"error\")\n return getSelector(abiItem2) === slice3(name, 0, 4);\n if (abiItem2.type === \"event\")\n return getSignatureHash(abiItem2) === name;\n return false;\n }\n return \"name\" in abiItem2 && abiItem2.name === name;\n });\n if (abiItems.length === 0)\n throw new NotFoundError({ name });\n if (abiItems.length === 1)\n return {\n ...abiItems[0],\n ...prepare ? { hash: getSignatureHash(abiItems[0]) } : {}\n };\n let matchedAbiItem;\n for (const abiItem2 of abiItems) {\n if (!(\"inputs\" in abiItem2))\n continue;\n if (!args || args.length === 0) {\n if (!abiItem2.inputs || abiItem2.inputs.length === 0)\n return {\n ...abiItem2,\n ...prepare ? { hash: getSignatureHash(abiItem2) } : {}\n };\n continue;\n }\n if (!abiItem2.inputs)\n continue;\n if (abiItem2.inputs.length === 0)\n continue;\n if (abiItem2.inputs.length !== args.length)\n continue;\n const matched = args.every((arg, index2) => {\n const abiParameter = \"inputs\" in abiItem2 && abiItem2.inputs[index2];\n if (!abiParameter)\n return false;\n return isArgOfType2(arg, abiParameter);\n });\n if (matched) {\n if (matchedAbiItem && \"inputs\" in matchedAbiItem && matchedAbiItem.inputs) {\n const ambiguousTypes = getAmbiguousTypes2(abiItem2.inputs, matchedAbiItem.inputs, args);\n if (ambiguousTypes)\n throw new AmbiguityError({\n abiItem: abiItem2,\n type: ambiguousTypes[0]\n }, {\n abiItem: matchedAbiItem,\n type: ambiguousTypes[1]\n });\n }\n matchedAbiItem = abiItem2;\n }\n }\n const abiItem = (() => {\n if (matchedAbiItem)\n return matchedAbiItem;\n const [abiItem2, ...overloads] = abiItems;\n return { ...abiItem2, overloads };\n })();\n if (!abiItem)\n throw new NotFoundError({ name });\n return {\n ...abiItem,\n ...prepare ? { hash: getSignatureHash(abiItem) } : {}\n };\n }\n function getSelector(...parameters) {\n const abiItem = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, name] = parameters;\n return fromAbi(abi2, name);\n }\n return parameters[0];\n })();\n return slice3(getSignatureHash(abiItem), 0, 4);\n }\n function getSignature(...parameters) {\n const abiItem = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, name] = parameters;\n return fromAbi(abi2, name);\n }\n return parameters[0];\n })();\n const signature = (() => {\n if (typeof abiItem === \"string\")\n return abiItem;\n return formatAbiItem(abiItem);\n })();\n return normalizeSignature2(signature);\n }\n function getSignatureHash(...parameters) {\n const abiItem = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, name] = parameters;\n return fromAbi(abi2, name);\n }\n return parameters[0];\n })();\n if (typeof abiItem !== \"string\" && \"hash\" in abiItem && abiItem.hash)\n return abiItem.hash;\n return keccak2562(fromString2(getSignature(abiItem)));\n }\n var AmbiguityError, NotFoundError;\n var init_AbiItem = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiItem.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_Errors();\n init_Hash();\n init_Hex();\n init_abiItem2();\n AmbiguityError = class extends BaseError3 {\n constructor(x4, y6) {\n super(\"Found ambiguous types in overloaded ABI Items.\", {\n metaMessages: [\n // TODO: abitype to add support for signature-formatted ABI items.\n `\\`${x4.type}\\` in \\`${normalizeSignature2(formatAbiItem(x4.abiItem))}\\`, and`,\n `\\`${y6.type}\\` in \\`${normalizeSignature2(formatAbiItem(y6.abiItem))}\\``,\n \"\",\n \"These types encode differently and cannot be distinguished at runtime.\",\n \"Remove one of the ambiguous items in the ABI.\"\n ]\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiItem.AmbiguityError\"\n });\n }\n };\n NotFoundError = class extends BaseError3 {\n constructor({ name, data, type = \"item\" }) {\n const selector = (() => {\n if (name)\n return ` with name \"${name}\"`;\n if (data)\n return ` with data \"${data}\"`;\n return \"\";\n })();\n super(`ABI ${type}${selector} not found.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AbiItem.NotFoundError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiConstructor.js\n function encode6(...parameters) {\n const [abiConstructor, options] = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, options2] = parameters;\n return [fromAbi2(abi2), options2];\n }\n return parameters;\n })();\n const { bytecode, args } = options;\n return concat3(bytecode, abiConstructor.inputs?.length && args?.length ? encode5(abiConstructor.inputs, args) : \"0x\");\n }\n function from11(abiConstructor) {\n return from10(abiConstructor);\n }\n function fromAbi2(abi2) {\n const item = abi2.find((item2) => item2.type === \"constructor\");\n if (!item)\n throw new NotFoundError({ name: \"constructor\" });\n return item;\n }\n var init_AbiConstructor = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiConstructor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiItem();\n init_AbiParameters();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiFunction.js\n function encodeData2(...parameters) {\n const [abiFunction, args = []] = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi2, name, args3] = parameters;\n return [fromAbi3(abi2, name, { args: args3 }), args3];\n }\n const [abiFunction2, args2] = parameters;\n return [abiFunction2, args2];\n })();\n const { overloads } = abiFunction;\n const item = overloads ? fromAbi3([abiFunction, ...overloads], abiFunction.name, {\n args\n }) : abiFunction;\n const selector = getSelector2(item);\n const data = args.length > 0 ? encode5(item.inputs, args) : void 0;\n return data ? concat3(selector, data) : selector;\n }\n function from12(abiFunction, options = {}) {\n return from10(abiFunction, options);\n }\n function fromAbi3(abi2, name, options) {\n const item = fromAbi(abi2, name, options);\n if (item.type !== \"function\")\n throw new NotFoundError({ name, type: \"function\" });\n return item;\n }\n function getSelector2(abiItem) {\n return getSelector(abiItem);\n }\n var init_AbiFunction = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/AbiFunction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiItem();\n init_AbiParameters();\n init_Hex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/address.js\n var ethAddress, zeroAddress;\n var init_address2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/constants/address.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n ethAddress = \"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\";\n zeroAddress = \"0x0000000000000000000000000000000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateCalls.js\n async function simulateCalls(client, parameters) {\n const { blockNumber, blockTag, calls, stateOverrides, traceAssetChanges, traceTransfers, validation } = parameters;\n const account = parameters.account ? parseAccount(parameters.account) : void 0;\n if (traceAssetChanges && !account)\n throw new BaseError2(\"`account` is required when `traceAssetChanges` is true\");\n const getBalanceData = account ? encode6(from11(\"constructor(bytes, bytes)\"), {\n bytecode: deploylessCallViaBytecodeBytecode,\n args: [\n getBalanceCode,\n encodeData2(from12(\"function getBalance(address)\"), [account.address])\n ]\n }) : void 0;\n const assetAddresses = traceAssetChanges ? await Promise.all(parameters.calls.map(async (call2) => {\n if (!call2.data && !call2.abi)\n return;\n const { accessList } = await createAccessList(client, {\n account: account.address,\n ...call2,\n data: call2.abi ? encodeFunctionData(call2) : call2.data\n });\n return accessList.map(({ address, storageKeys }) => storageKeys.length > 0 ? address : null);\n })).then((x4) => x4.flat().filter(Boolean)) : [];\n const blocks = await simulateBlocks(client, {\n blockNumber,\n blockTag,\n blocks: [\n ...traceAssetChanges ? [\n // ETH pre balances\n {\n calls: [{ data: getBalanceData }],\n stateOverrides\n },\n // Asset pre balances\n {\n calls: assetAddresses.map((address, i3) => ({\n abi: [\n from12(\"function balanceOf(address) returns (uint256)\")\n ],\n functionName: \"balanceOf\",\n args: [account.address],\n to: address,\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n }\n ] : [],\n {\n calls: [...calls, {}].map((call2) => ({\n ...call2,\n from: account?.address\n })),\n stateOverrides\n },\n ...traceAssetChanges ? [\n // ETH post balances\n {\n calls: [{ data: getBalanceData }]\n },\n // Asset post balances\n {\n calls: assetAddresses.map((address, i3) => ({\n abi: [\n from12(\"function balanceOf(address) returns (uint256)\")\n ],\n functionName: \"balanceOf\",\n args: [account.address],\n to: address,\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n },\n // Decimals\n {\n calls: assetAddresses.map((address, i3) => ({\n to: address,\n abi: [\n from12(\"function decimals() returns (uint256)\")\n ],\n functionName: \"decimals\",\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n },\n // Token URI\n {\n calls: assetAddresses.map((address, i3) => ({\n to: address,\n abi: [\n from12(\"function tokenURI(uint256) returns (string)\")\n ],\n functionName: \"tokenURI\",\n args: [0n],\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n },\n // Symbols\n {\n calls: assetAddresses.map((address, i3) => ({\n to: address,\n abi: [from12(\"function symbol() returns (string)\")],\n functionName: \"symbol\",\n from: zeroAddress,\n nonce: i3\n })),\n stateOverrides: [\n {\n address: zeroAddress,\n nonce: 0\n }\n ]\n }\n ] : []\n ],\n traceTransfers,\n validation\n });\n const block_results = traceAssetChanges ? blocks[2] : blocks[0];\n const [block_ethPre, block_assetsPre, , block_ethPost, block_assetsPost, block_decimals, block_tokenURI, block_symbols] = traceAssetChanges ? blocks : [];\n const { calls: block_calls, ...block } = block_results;\n const results = block_calls.slice(0, -1) ?? [];\n const ethPre = block_ethPre?.calls ?? [];\n const assetsPre = block_assetsPre?.calls ?? [];\n const balancesPre = [...ethPre, ...assetsPre].map((call2) => call2.status === \"success\" ? hexToBigInt(call2.data) : null);\n const ethPost = block_ethPost?.calls ?? [];\n const assetsPost = block_assetsPost?.calls ?? [];\n const balancesPost = [...ethPost, ...assetsPost].map((call2) => call2.status === \"success\" ? hexToBigInt(call2.data) : null);\n const decimals = (block_decimals?.calls ?? []).map((x4) => x4.status === \"success\" ? x4.result : null);\n const symbols = (block_symbols?.calls ?? []).map((x4) => x4.status === \"success\" ? x4.result : null);\n const tokenURI = (block_tokenURI?.calls ?? []).map((x4) => x4.status === \"success\" ? x4.result : null);\n const changes = [];\n for (const [i3, balancePost] of balancesPost.entries()) {\n const balancePre = balancesPre[i3];\n if (typeof balancePost !== \"bigint\")\n continue;\n if (typeof balancePre !== \"bigint\")\n continue;\n const decimals_ = decimals[i3 - 1];\n const symbol_ = symbols[i3 - 1];\n const tokenURI_ = tokenURI[i3 - 1];\n const token = (() => {\n if (i3 === 0)\n return {\n address: ethAddress,\n decimals: 18,\n symbol: \"ETH\"\n };\n return {\n address: assetAddresses[i3 - 1],\n decimals: tokenURI_ || decimals_ ? Number(decimals_ ?? 1) : void 0,\n symbol: symbol_ ?? void 0\n };\n })();\n if (changes.some((change) => change.token.address === token.address))\n continue;\n changes.push({\n token,\n value: {\n pre: balancePre,\n post: balancePost,\n diff: balancePost - balancePre\n }\n });\n }\n return {\n assetChanges: changes,\n block,\n results\n };\n }\n var getBalanceCode;\n var init_simulateCalls = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/simulateCalls.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiConstructor();\n init_AbiFunction();\n init_parseAccount();\n init_address2();\n init_contracts();\n init_base();\n init_encodeFunctionData();\n init_utils7();\n init_createAccessList();\n init_simulateBlocks();\n getBalanceCode = \"0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc6492/SignatureErc6492.js\n var SignatureErc6492_exports = {};\n __export(SignatureErc6492_exports, {\n InvalidWrappedSignatureError: () => InvalidWrappedSignatureError2,\n assert: () => assert8,\n from: () => from13,\n magicBytes: () => magicBytes2,\n universalSignatureValidatorAbi: () => universalSignatureValidatorAbi,\n universalSignatureValidatorBytecode: () => universalSignatureValidatorBytecode,\n unwrap: () => unwrap4,\n validate: () => validate5,\n wrap: () => wrap4\n });\n function assert8(wrapped) {\n if (slice3(wrapped, -32) !== magicBytes2)\n throw new InvalidWrappedSignatureError2(wrapped);\n }\n function from13(wrapped) {\n if (typeof wrapped === \"string\")\n return unwrap4(wrapped);\n return wrapped;\n }\n function unwrap4(wrapped) {\n assert8(wrapped);\n const [to, data, signature] = decode3(from5(\"address, bytes, bytes\"), wrapped);\n return { data, signature, to };\n }\n function wrap4(value) {\n const { data, signature, to } = value;\n return concat3(encode5(from5(\"address, bytes, bytes\"), [\n to,\n data,\n signature\n ]), magicBytes2);\n }\n function validate5(wrapped) {\n try {\n assert8(wrapped);\n return true;\n } catch {\n return false;\n }\n }\n var magicBytes2, universalSignatureValidatorBytecode, universalSignatureValidatorAbi, InvalidWrappedSignatureError2;\n var init_SignatureErc6492 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc6492/SignatureErc6492.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_AbiParameters();\n init_Errors();\n init_Hex();\n magicBytes2 = \"0x6492649264926492649264926492649264926492649264926492649264926492\";\n universalSignatureValidatorBytecode = \"0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572\";\n universalSignatureValidatorAbi = [\n {\n inputs: [\n {\n name: \"_signer\",\n type: \"address\"\n },\n {\n name: \"_hash\",\n type: \"bytes32\"\n },\n {\n name: \"_signature\",\n type: \"bytes\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n inputs: [\n {\n name: \"_signer\",\n type: \"address\"\n },\n {\n name: \"_hash\",\n type: \"bytes32\"\n },\n {\n name: \"_signature\",\n type: \"bytes\"\n }\n ],\n outputs: [\n {\n type: \"bool\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"isValidSig\"\n }\n ];\n InvalidWrappedSignatureError2 = class extends BaseError3 {\n constructor(wrapped) {\n super(`Value \\`${wrapped}\\` is an invalid ERC-6492 wrapped signature.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignatureErc6492.InvalidWrappedSignatureError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc6492/index.js\n var init_erc6492 = __esm({\n \"../../../node_modules/.pnpm/ox@0.9.6_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/erc6492/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_SignatureErc6492();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/serializeSignature.js\n function serializeSignature({ r: r2, s: s4, to = \"hex\", v: v2, yParity }) {\n const yParity_ = (() => {\n if (yParity === 0 || yParity === 1)\n return yParity;\n if (v2 && (v2 === 27n || v2 === 28n || v2 >= 35n))\n return v2 % 2n === 0n ? 1 : 0;\n throw new Error(\"Invalid `v` or `yParity` value\");\n })();\n const signature = `0x${new secp256k1.Signature(hexToBigInt(r2), hexToBigInt(s4)).toCompactHex()}${yParity_ === 0 ? \"1b\" : \"1c\"}`;\n if (to === \"hex\")\n return signature;\n return hexToBytes(signature);\n }\n var init_serializeSignature = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/signature/serializeSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_fromHex();\n init_toBytes();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyHash.js\n async function verifyHash(client, parameters) {\n const { address, hash: hash3, erc6492VerifierAddress: verifierAddress = parameters.universalSignatureVerifierAddress ?? client.chain?.contracts?.erc6492Verifier?.address, multicallAddress = parameters.multicallAddress ?? client.chain?.contracts?.multicall3?.address } = parameters;\n const signature = (() => {\n const signature2 = parameters.signature;\n if (isHex(signature2))\n return signature2;\n if (typeof signature2 === \"object\" && \"r\" in signature2 && \"s\" in signature2)\n return serializeSignature(signature2);\n return bytesToHex(signature2);\n })();\n try {\n if (SignatureErc8010_exports.validate(signature))\n return await verifyErc8010(client, {\n ...parameters,\n multicallAddress,\n signature\n });\n return await verifyErc6492(client, {\n ...parameters,\n verifierAddress,\n signature\n });\n } catch (error) {\n try {\n const verified = isAddressEqual(getAddress(address), await recoverAddress({ hash: hash3, signature }));\n if (verified)\n return true;\n } catch {\n }\n if (error instanceof VerificationError) {\n return false;\n }\n throw error;\n }\n }\n async function verifyErc8010(client, parameters) {\n const { address, blockNumber, blockTag, hash: hash3, multicallAddress } = parameters;\n const { authorization: authorization_ox, data: initData, signature, to } = SignatureErc8010_exports.unwrap(parameters.signature);\n const code = await getCode(client, {\n address,\n blockNumber,\n blockTag\n });\n if (code === concatHex([\"0xef0100\", authorization_ox.address]))\n return await verifyErc1271(client, {\n address,\n blockNumber,\n blockTag,\n hash: hash3,\n signature\n });\n const authorization = {\n address: authorization_ox.address,\n chainId: Number(authorization_ox.chainId),\n nonce: Number(authorization_ox.nonce),\n r: numberToHex(authorization_ox.r, { size: 32 }),\n s: numberToHex(authorization_ox.s, { size: 32 }),\n yParity: authorization_ox.yParity\n };\n const valid = await verifyAuthorization({\n address,\n authorization\n });\n if (!valid)\n throw new VerificationError();\n const results = await getAction(client, readContract, \"readContract\")({\n ...multicallAddress ? { address: multicallAddress } : { code: multicall3Bytecode },\n authorizationList: [authorization],\n abi: multicall3Abi,\n blockNumber,\n blockTag: \"pending\",\n functionName: \"aggregate3\",\n args: [\n [\n ...initData ? [\n {\n allowFailure: true,\n target: to ?? address,\n callData: initData\n }\n ] : [],\n {\n allowFailure: true,\n target: address,\n callData: encodeFunctionData({\n abi: erc1271Abi,\n functionName: \"isValidSignature\",\n args: [hash3, signature]\n })\n }\n ]\n ]\n });\n const data = results[results.length - 1]?.returnData;\n if (data?.startsWith(\"0x1626ba7e\"))\n return true;\n throw new VerificationError();\n }\n async function verifyErc6492(client, parameters) {\n const { address, factory, factoryData, hash: hash3, signature, verifierAddress, ...rest } = parameters;\n const wrappedSignature = await (async () => {\n if (!factory && !factoryData)\n return signature;\n if (SignatureErc6492_exports.validate(signature))\n return signature;\n return SignatureErc6492_exports.wrap({\n data: factoryData,\n signature,\n to: factory\n });\n })();\n const args = verifierAddress ? {\n to: verifierAddress,\n data: encodeFunctionData({\n abi: erc6492SignatureValidatorAbi,\n functionName: \"isValidSig\",\n args: [address, hash3, wrappedSignature]\n }),\n ...rest\n } : {\n data: encodeDeployData({\n abi: erc6492SignatureValidatorAbi,\n args: [address, hash3, wrappedSignature],\n bytecode: erc6492SignatureValidatorByteCode\n }),\n ...rest\n };\n const { data } = await getAction(client, call, \"call\")(args).catch((error) => {\n if (error instanceof CallExecutionError)\n throw new VerificationError();\n throw error;\n });\n if (hexToBool(data ?? \"0x0\"))\n return true;\n throw new VerificationError();\n }\n async function verifyErc1271(client, parameters) {\n const { address, blockNumber, blockTag, hash: hash3, signature } = parameters;\n const result = await getAction(client, readContract, \"readContract\")({\n address,\n abi: erc1271Abi,\n args: [hash3, signature],\n blockNumber,\n blockTag,\n functionName: \"isValidSignature\"\n }).catch((error) => {\n if (error instanceof ContractFunctionExecutionError)\n throw new VerificationError();\n throw error;\n });\n if (result.startsWith(\"0x1626ba7e\"))\n return true;\n throw new VerificationError();\n }\n var VerificationError;\n var init_verifyHash = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyHash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_erc6492();\n init_erc8010();\n init_abis();\n init_contracts();\n init_contract();\n init_encodeDeployData();\n init_encodeFunctionData();\n init_getAddress();\n init_isAddressEqual();\n init_verifyAuthorization();\n init_concat();\n init_isHex();\n init_fromHex();\n init_toHex();\n init_getAction();\n init_recoverAddress();\n init_serializeSignature();\n init_call();\n init_getCode();\n init_readContract();\n VerificationError = class extends Error {\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyMessage.js\n async function verifyMessage(client, { address, message: message2, factory, factoryData, signature, ...callRequest }) {\n const hash3 = hashMessage(message2);\n return verifyHash(client, {\n address,\n factory,\n factoryData,\n hash: hash3,\n signature,\n ...callRequest\n });\n }\n var init_verifyMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashMessage();\n init_verifyHash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyTypedData.js\n async function verifyTypedData(client, parameters) {\n const { address, factory, factoryData, signature, message: message2, primaryType, types: types2, domain: domain2, ...callRequest } = parameters;\n const hash3 = hashTypedData({ message: message2, primaryType, types: types2, domain: domain2 });\n return verifyHash(client, {\n address,\n factory,\n factoryData,\n hash: hash3,\n signature,\n ...callRequest\n });\n }\n var init_verifyTypedData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/verifyTypedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashTypedData();\n init_verifyHash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchBlockNumber.js\n function watchBlockNumber(client, { emitOnBegin = false, emitMissed = false, onBlockNumber, onError, poll: poll_, pollingInterval = client.pollingInterval }) {\n const enablePolling = (() => {\n if (typeof poll_ !== \"undefined\")\n return poll_;\n if (client.transport.type === \"webSocket\" || client.transport.type === \"ipc\")\n return false;\n if (client.transport.type === \"fallback\" && (client.transport.transports[0].config.type === \"webSocket\" || client.transport.transports[0].config.type === \"ipc\"))\n return false;\n return true;\n })();\n let prevBlockNumber;\n const pollBlockNumber = () => {\n const observerId = stringify([\n \"watchBlockNumber\",\n client.uid,\n emitOnBegin,\n emitMissed,\n pollingInterval\n ]);\n return observe(observerId, { onBlockNumber, onError }, (emit2) => poll(async () => {\n try {\n const blockNumber = await getAction(client, getBlockNumber, \"getBlockNumber\")({ cacheTime: 0 });\n if (prevBlockNumber !== void 0) {\n if (blockNumber === prevBlockNumber)\n return;\n if (blockNumber - prevBlockNumber > 1 && emitMissed) {\n for (let i3 = prevBlockNumber + 1n; i3 < blockNumber; i3++) {\n emit2.onBlockNumber(i3, prevBlockNumber);\n prevBlockNumber = i3;\n }\n }\n }\n if (prevBlockNumber === void 0 || blockNumber > prevBlockNumber) {\n emit2.onBlockNumber(blockNumber, prevBlockNumber);\n prevBlockNumber = blockNumber;\n }\n } catch (err) {\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin,\n interval: pollingInterval\n }));\n };\n const subscribeBlockNumber = () => {\n const observerId = stringify([\n \"watchBlockNumber\",\n client.uid,\n emitOnBegin,\n emitMissed\n ]);\n return observe(observerId, { onBlockNumber, onError }, (emit2) => {\n let active = true;\n let unsubscribe = () => active = false;\n (async () => {\n try {\n const transport = (() => {\n if (client.transport.type === \"fallback\") {\n const transport2 = client.transport.transports.find((transport3) => transport3.config.type === \"webSocket\" || transport3.config.type === \"ipc\");\n if (!transport2)\n return client.transport;\n return transport2.value;\n }\n return client.transport;\n })();\n const { unsubscribe: unsubscribe_ } = await transport.subscribe({\n params: [\"newHeads\"],\n onData(data) {\n if (!active)\n return;\n const blockNumber = hexToBigInt(data.result?.number);\n emit2.onBlockNumber(blockNumber, prevBlockNumber);\n prevBlockNumber = blockNumber;\n },\n onError(error) {\n emit2.onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n });\n };\n return enablePolling ? pollBlockNumber() : subscribeBlockNumber();\n }\n var init_watchBlockNumber = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchBlockNumber.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_getBlockNumber();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/waitForTransactionReceipt.js\n async function waitForTransactionReceipt(client, parameters) {\n const {\n checkReplacement = true,\n confirmations = 1,\n hash: hash3,\n onReplaced,\n retryCount = 6,\n retryDelay = ({ count }) => ~~(1 << count) * 200,\n // exponential backoff\n timeout = 18e4\n } = parameters;\n const observerId = stringify([\"waitForTransactionReceipt\", client.uid, hash3]);\n const pollingInterval = (() => {\n if (parameters.pollingInterval)\n return parameters.pollingInterval;\n if (client.chain?.experimental_preconfirmationTime)\n return client.chain.experimental_preconfirmationTime;\n return client.pollingInterval;\n })();\n let transaction;\n let replacedTransaction;\n let receipt;\n let retrying = false;\n let _unobserve;\n let _unwatch;\n const { promise, resolve, reject } = withResolvers();\n const timer = timeout ? setTimeout(() => {\n _unwatch?.();\n _unobserve?.();\n reject(new WaitForTransactionReceiptTimeoutError({ hash: hash3 }));\n }, timeout) : void 0;\n _unobserve = observe(observerId, { onReplaced, resolve, reject }, async (emit2) => {\n receipt = await getAction(client, getTransactionReceipt, \"getTransactionReceipt\")({ hash: hash3 }).catch(() => void 0);\n if (receipt && confirmations <= 1) {\n clearTimeout(timer);\n emit2.resolve(receipt);\n _unobserve?.();\n return;\n }\n _unwatch = getAction(client, watchBlockNumber, \"watchBlockNumber\")({\n emitMissed: true,\n emitOnBegin: true,\n poll: true,\n pollingInterval,\n async onBlockNumber(blockNumber_) {\n const done = (fn) => {\n clearTimeout(timer);\n _unwatch?.();\n fn();\n _unobserve?.();\n };\n let blockNumber = blockNumber_;\n if (retrying)\n return;\n try {\n if (receipt) {\n if (confirmations > 1 && (!receipt.blockNumber || blockNumber - receipt.blockNumber + 1n < confirmations))\n return;\n done(() => emit2.resolve(receipt));\n return;\n }\n if (checkReplacement && !transaction) {\n retrying = true;\n await withRetry(async () => {\n transaction = await getAction(client, getTransaction, \"getTransaction\")({ hash: hash3 });\n if (transaction.blockNumber)\n blockNumber = transaction.blockNumber;\n }, {\n delay: retryDelay,\n retryCount\n });\n retrying = false;\n }\n receipt = await getAction(client, getTransactionReceipt, \"getTransactionReceipt\")({ hash: hash3 });\n if (confirmations > 1 && (!receipt.blockNumber || blockNumber - receipt.blockNumber + 1n < confirmations))\n return;\n done(() => emit2.resolve(receipt));\n } catch (err) {\n if (err instanceof TransactionNotFoundError || err instanceof TransactionReceiptNotFoundError) {\n if (!transaction) {\n retrying = false;\n return;\n }\n try {\n replacedTransaction = transaction;\n retrying = true;\n const block = await withRetry(() => getAction(client, getBlock, \"getBlock\")({\n blockNumber,\n includeTransactions: true\n }), {\n delay: retryDelay,\n retryCount,\n shouldRetry: ({ error }) => error instanceof BlockNotFoundError\n });\n retrying = false;\n const replacementTransaction = block.transactions.find(({ from: from14, nonce }) => from14 === replacedTransaction.from && nonce === replacedTransaction.nonce);\n if (!replacementTransaction)\n return;\n receipt = await getAction(client, getTransactionReceipt, \"getTransactionReceipt\")({\n hash: replacementTransaction.hash\n });\n if (confirmations > 1 && (!receipt.blockNumber || blockNumber - receipt.blockNumber + 1n < confirmations))\n return;\n let reason = \"replaced\";\n if (replacementTransaction.to === replacedTransaction.to && replacementTransaction.value === replacedTransaction.value && replacementTransaction.input === replacedTransaction.input) {\n reason = \"repriced\";\n } else if (replacementTransaction.from === replacementTransaction.to && replacementTransaction.value === 0n) {\n reason = \"cancelled\";\n }\n done(() => {\n emit2.onReplaced?.({\n reason,\n replacedTransaction,\n transaction: replacementTransaction,\n transactionReceipt: receipt\n });\n emit2.resolve(receipt);\n });\n } catch (err_) {\n done(() => emit2.reject(err_));\n }\n } else {\n done(() => emit2.reject(err));\n }\n }\n }\n });\n });\n return promise;\n }\n var init_waitForTransactionReceipt = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/waitForTransactionReceipt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_block();\n init_transaction();\n init_getAction();\n init_observe();\n init_withResolvers();\n init_withRetry();\n init_stringify();\n init_getBlock();\n init_getTransaction();\n init_getTransactionReceipt();\n init_watchBlockNumber();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchBlocks.js\n function watchBlocks(client, { blockTag = client.experimental_blockTag ?? \"latest\", emitMissed = false, emitOnBegin = false, onBlock, onError, includeTransactions: includeTransactions_, poll: poll_, pollingInterval = client.pollingInterval }) {\n const enablePolling = (() => {\n if (typeof poll_ !== \"undefined\")\n return poll_;\n if (client.transport.type === \"webSocket\" || client.transport.type === \"ipc\")\n return false;\n if (client.transport.type === \"fallback\" && (client.transport.transports[0].config.type === \"webSocket\" || client.transport.transports[0].config.type === \"ipc\"))\n return false;\n return true;\n })();\n const includeTransactions = includeTransactions_ ?? false;\n let prevBlock;\n const pollBlocks = () => {\n const observerId = stringify([\n \"watchBlocks\",\n client.uid,\n blockTag,\n emitMissed,\n emitOnBegin,\n includeTransactions,\n pollingInterval\n ]);\n return observe(observerId, { onBlock, onError }, (emit2) => poll(async () => {\n try {\n const block = await getAction(client, getBlock, \"getBlock\")({\n blockTag,\n includeTransactions\n });\n if (block.number !== null && prevBlock?.number != null) {\n if (block.number === prevBlock.number)\n return;\n if (block.number - prevBlock.number > 1 && emitMissed) {\n for (let i3 = prevBlock?.number + 1n; i3 < block.number; i3++) {\n const block2 = await getAction(client, getBlock, \"getBlock\")({\n blockNumber: i3,\n includeTransactions\n });\n emit2.onBlock(block2, prevBlock);\n prevBlock = block2;\n }\n }\n }\n if (\n // If no previous block exists, emit.\n prevBlock?.number == null || // If the block tag is \"pending\" with no block number, emit.\n blockTag === \"pending\" && block?.number == null || // If the next block number is greater than the previous block number, emit.\n // We don't want to emit blocks in the past.\n block.number !== null && block.number > prevBlock.number\n ) {\n emit2.onBlock(block, prevBlock);\n prevBlock = block;\n }\n } catch (err) {\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin,\n interval: pollingInterval\n }));\n };\n const subscribeBlocks = () => {\n let active = true;\n let emitFetched = true;\n let unsubscribe = () => active = false;\n (async () => {\n try {\n if (emitOnBegin) {\n getAction(client, getBlock, \"getBlock\")({\n blockTag,\n includeTransactions\n }).then((block) => {\n if (!active)\n return;\n if (!emitFetched)\n return;\n onBlock(block, void 0);\n emitFetched = false;\n }).catch(onError);\n }\n const transport = (() => {\n if (client.transport.type === \"fallback\") {\n const transport2 = client.transport.transports.find((transport3) => transport3.config.type === \"webSocket\" || transport3.config.type === \"ipc\");\n if (!transport2)\n return client.transport;\n return transport2.value;\n }\n return client.transport;\n })();\n const { unsubscribe: unsubscribe_ } = await transport.subscribe({\n params: [\"newHeads\"],\n async onData(data) {\n if (!active)\n return;\n const block = await getAction(client, getBlock, \"getBlock\")({\n blockNumber: data.result?.number,\n includeTransactions\n }).catch(() => {\n });\n if (!active)\n return;\n onBlock(block, prevBlock);\n emitFetched = false;\n prevBlock = block;\n },\n onError(error) {\n onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n };\n return enablePolling ? pollBlocks() : subscribeBlocks();\n }\n var init_watchBlocks = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchBlocks.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_getBlock();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchEvent.js\n function watchEvent(client, { address, args, batch = true, event, events, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ }) {\n const enablePolling = (() => {\n if (typeof poll_ !== \"undefined\")\n return poll_;\n if (typeof fromBlock === \"bigint\")\n return true;\n if (client.transport.type === \"webSocket\" || client.transport.type === \"ipc\")\n return false;\n if (client.transport.type === \"fallback\" && (client.transport.transports[0].config.type === \"webSocket\" || client.transport.transports[0].config.type === \"ipc\"))\n return false;\n return true;\n })();\n const strict = strict_ ?? false;\n const pollEvent = () => {\n const observerId = stringify([\n \"watchEvent\",\n address,\n args,\n batch,\n client.uid,\n event,\n pollingInterval,\n fromBlock\n ]);\n return observe(observerId, { onLogs, onError }, (emit2) => {\n let previousBlockNumber;\n if (fromBlock !== void 0)\n previousBlockNumber = fromBlock - 1n;\n let filter;\n let initialized = false;\n const unwatch = poll(async () => {\n if (!initialized) {\n try {\n filter = await getAction(client, createEventFilter, \"createEventFilter\")({\n address,\n args,\n event,\n events,\n strict,\n fromBlock\n });\n } catch {\n }\n initialized = true;\n return;\n }\n try {\n let logs;\n if (filter) {\n logs = await getAction(client, getFilterChanges, \"getFilterChanges\")({ filter });\n } else {\n const blockNumber = await getAction(client, getBlockNumber, \"getBlockNumber\")({});\n if (previousBlockNumber && previousBlockNumber !== blockNumber) {\n logs = await getAction(client, getLogs, \"getLogs\")({\n address,\n args,\n event,\n events,\n fromBlock: previousBlockNumber + 1n,\n toBlock: blockNumber\n });\n } else {\n logs = [];\n }\n previousBlockNumber = blockNumber;\n }\n if (logs.length === 0)\n return;\n if (batch)\n emit2.onLogs(logs);\n else\n for (const log of logs)\n emit2.onLogs([log]);\n } catch (err) {\n if (filter && err instanceof InvalidInputRpcError)\n initialized = false;\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval\n });\n return async () => {\n if (filter)\n await getAction(client, uninstallFilter, \"uninstallFilter\")({ filter });\n unwatch();\n };\n });\n };\n const subscribeEvent = () => {\n let active = true;\n let unsubscribe = () => active = false;\n (async () => {\n try {\n const transport = (() => {\n if (client.transport.type === \"fallback\") {\n const transport2 = client.transport.transports.find((transport3) => transport3.config.type === \"webSocket\" || transport3.config.type === \"ipc\");\n if (!transport2)\n return client.transport;\n return transport2.value;\n }\n return client.transport;\n })();\n const events_ = events ?? (event ? [event] : void 0);\n let topics = [];\n if (events_) {\n const encoded = events_.flatMap((event2) => encodeEventTopics({\n abi: [event2],\n eventName: event2.name,\n args\n }));\n topics = [encoded];\n if (event)\n topics = topics[0];\n }\n const { unsubscribe: unsubscribe_ } = await transport.subscribe({\n params: [\"logs\", { address, topics }],\n onData(data) {\n if (!active)\n return;\n const log = data.result;\n try {\n const { eventName, args: args2 } = decodeEventLog({\n abi: events_ ?? [],\n data: log.data,\n topics: log.topics,\n strict\n });\n const formatted = formatLog(log, { args: args2, eventName });\n onLogs([formatted]);\n } catch (err) {\n let eventName;\n let isUnnamed;\n if (err instanceof DecodeLogDataMismatch || err instanceof DecodeLogTopicsMismatch) {\n if (strict_)\n return;\n eventName = err.abiItem.name;\n isUnnamed = err.abiItem.inputs?.some((x4) => !(\"name\" in x4 && x4.name));\n }\n const formatted = formatLog(log, {\n args: isUnnamed ? [] : {},\n eventName\n });\n onLogs([formatted]);\n }\n },\n onError(error) {\n onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n };\n return enablePolling ? pollEvent() : subscribeEvent();\n }\n var init_watchEvent = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchEvent.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_abi();\n init_rpc();\n init_decodeEventLog();\n init_encodeEventTopics();\n init_log2();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_createEventFilter();\n init_getBlockNumber();\n init_getFilterChanges();\n init_getLogs();\n init_uninstallFilter();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchPendingTransactions.js\n function watchPendingTransactions(client, { batch = true, onError, onTransactions, poll: poll_, pollingInterval = client.pollingInterval }) {\n const enablePolling = typeof poll_ !== \"undefined\" ? poll_ : client.transport.type !== \"webSocket\" && client.transport.type !== \"ipc\";\n const pollPendingTransactions = () => {\n const observerId = stringify([\n \"watchPendingTransactions\",\n client.uid,\n batch,\n pollingInterval\n ]);\n return observe(observerId, { onTransactions, onError }, (emit2) => {\n let filter;\n const unwatch = poll(async () => {\n try {\n if (!filter) {\n try {\n filter = await getAction(client, createPendingTransactionFilter, \"createPendingTransactionFilter\")({});\n return;\n } catch (err) {\n unwatch();\n throw err;\n }\n }\n const hashes = await getAction(client, getFilterChanges, \"getFilterChanges\")({ filter });\n if (hashes.length === 0)\n return;\n if (batch)\n emit2.onTransactions(hashes);\n else\n for (const hash3 of hashes)\n emit2.onTransactions([hash3]);\n } catch (err) {\n emit2.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval\n });\n return async () => {\n if (filter)\n await getAction(client, uninstallFilter, \"uninstallFilter\")({ filter });\n unwatch();\n };\n });\n };\n const subscribePendingTransactions = () => {\n let active = true;\n let unsubscribe = () => active = false;\n (async () => {\n try {\n const { unsubscribe: unsubscribe_ } = await client.transport.subscribe({\n params: [\"newPendingTransactions\"],\n onData(data) {\n if (!active)\n return;\n const transaction = data.result;\n onTransactions([transaction]);\n },\n onError(error) {\n onError?.(error);\n }\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n } catch (err) {\n onError?.(err);\n }\n })();\n return () => unsubscribe();\n };\n return enablePolling ? pollPendingTransactions() : subscribePendingTransactions();\n }\n var init_watchPendingTransactions = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/public/watchPendingTransactions.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getAction();\n init_observe();\n init_poll();\n init_stringify();\n init_createPendingTransactionFilter();\n init_getFilterChanges();\n init_uninstallFilter();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/siwe/parseSiweMessage.js\n function parseSiweMessage(message2) {\n const { scheme, statement, ...prefix } = message2.match(prefixRegex)?.groups ?? {};\n const { chainId, expirationTime, issuedAt, notBefore, requestId, ...suffix } = message2.match(suffixRegex)?.groups ?? {};\n const resources = message2.split(\"Resources:\")[1]?.split(\"\\n- \").slice(1);\n return {\n ...prefix,\n ...suffix,\n ...chainId ? { chainId: Number(chainId) } : {},\n ...expirationTime ? { expirationTime: new Date(expirationTime) } : {},\n ...issuedAt ? { issuedAt: new Date(issuedAt) } : {},\n ...notBefore ? { notBefore: new Date(notBefore) } : {},\n ...requestId ? { requestId } : {},\n ...resources ? { resources } : {},\n ...scheme ? { scheme } : {},\n ...statement ? { statement } : {}\n };\n }\n var prefixRegex, suffixRegex;\n var init_parseSiweMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/siwe/parseSiweMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n prefixRegex = /^(?:(?[a-zA-Z][a-zA-Z0-9+-.]*):\\/\\/)?(?[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\\n)(?
0x[a-fA-F0-9]{40})\\n\\n(?:(?.*)\\n\\n)?/;\n suffixRegex = /(?:URI: (?.+))\\n(?:Version: (?.+))\\n(?:Chain ID: (?\\d+))\\n(?:Nonce: (?[a-zA-Z0-9]+))\\n(?:Issued At: (?.+))(?:\\nExpiration Time: (?.+))?(?:\\nNot Before: (?.+))?(?:\\nRequest ID: (?.+))?/;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/siwe/validateSiweMessage.js\n function validateSiweMessage(parameters) {\n const { address, domain: domain2, message: message2, nonce, scheme, time = /* @__PURE__ */ new Date() } = parameters;\n if (domain2 && message2.domain !== domain2)\n return false;\n if (nonce && message2.nonce !== nonce)\n return false;\n if (scheme && message2.scheme !== scheme)\n return false;\n if (message2.expirationTime && time >= message2.expirationTime)\n return false;\n if (message2.notBefore && time < message2.notBefore)\n return false;\n try {\n if (!message2.address)\n return false;\n if (!isAddress(message2.address, { strict: false }))\n return false;\n if (address && !isAddressEqual(message2.address, address))\n return false;\n } catch {\n return false;\n }\n return true;\n }\n var init_validateSiweMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/utils/siwe/validateSiweMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isAddress();\n init_isAddressEqual();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/siwe/verifySiweMessage.js\n async function verifySiweMessage(client, parameters) {\n const { address, domain: domain2, message: message2, nonce, scheme, signature, time = /* @__PURE__ */ new Date(), ...callRequest } = parameters;\n const parsed = parseSiweMessage(message2);\n if (!parsed.address)\n return false;\n const isValid2 = validateSiweMessage({\n address,\n domain: domain2,\n message: parsed,\n nonce,\n scheme,\n time\n });\n if (!isValid2)\n return false;\n const hash3 = hashMessage(message2);\n return verifyHash(client, {\n address: parsed.address,\n hash: hash3,\n signature,\n ...callRequest\n });\n }\n var init_verifySiweMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/siwe/verifySiweMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashMessage();\n init_parseSiweMessage();\n init_validateSiweMessage();\n init_verifyHash();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendRawTransactionSync.js\n async function sendRawTransactionSync(client, { serializedTransaction, throwOnReceiptRevert, timeout }) {\n const receipt = await client.request({\n method: \"eth_sendRawTransactionSync\",\n params: timeout ? [serializedTransaction, numberToHex(timeout)] : [serializedTransaction]\n }, { retryCount: 0 });\n const format = client.chain?.formatters?.transactionReceipt?.format || formatTransactionReceipt;\n const formatted = format(receipt);\n if (formatted.status === \"reverted\" && throwOnReceiptRevert)\n throw new TransactionReceiptRevertedError({ receipt: formatted });\n return formatted;\n }\n var init_sendRawTransactionSync = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/actions/wallet/sendRawTransactionSync.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transaction();\n init_transactionReceipt();\n init_utils7();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/decorators/public.js\n function publicActions(client) {\n return {\n call: (args) => call(client, args),\n createAccessList: (args) => createAccessList(client, args),\n createBlockFilter: () => createBlockFilter(client),\n createContractEventFilter: (args) => createContractEventFilter(client, args),\n createEventFilter: (args) => createEventFilter(client, args),\n createPendingTransactionFilter: () => createPendingTransactionFilter(client),\n estimateContractGas: (args) => estimateContractGas(client, args),\n estimateGas: (args) => estimateGas(client, args),\n getBalance: (args) => getBalance(client, args),\n getBlobBaseFee: () => getBlobBaseFee(client),\n getBlock: (args) => getBlock(client, args),\n getBlockNumber: (args) => getBlockNumber(client, args),\n getBlockTransactionCount: (args) => getBlockTransactionCount(client, args),\n getBytecode: (args) => getCode(client, args),\n getChainId: () => getChainId(client),\n getCode: (args) => getCode(client, args),\n getContractEvents: (args) => getContractEvents(client, args),\n getEip712Domain: (args) => getEip712Domain(client, args),\n getEnsAddress: (args) => getEnsAddress(client, args),\n getEnsAvatar: (args) => getEnsAvatar(client, args),\n getEnsName: (args) => getEnsName(client, args),\n getEnsResolver: (args) => getEnsResolver(client, args),\n getEnsText: (args) => getEnsText(client, args),\n getFeeHistory: (args) => getFeeHistory(client, args),\n estimateFeesPerGas: (args) => estimateFeesPerGas(client, args),\n getFilterChanges: (args) => getFilterChanges(client, args),\n getFilterLogs: (args) => getFilterLogs(client, args),\n getGasPrice: () => getGasPrice(client),\n getLogs: (args) => getLogs(client, args),\n getProof: (args) => getProof(client, args),\n estimateMaxPriorityFeePerGas: (args) => estimateMaxPriorityFeePerGas(client, args),\n getStorageAt: (args) => getStorageAt(client, args),\n getTransaction: (args) => getTransaction(client, args),\n getTransactionConfirmations: (args) => getTransactionConfirmations(client, args),\n getTransactionCount: (args) => getTransactionCount(client, args),\n getTransactionReceipt: (args) => getTransactionReceipt(client, args),\n multicall: (args) => multicall(client, args),\n prepareTransactionRequest: (args) => prepareTransactionRequest(client, args),\n readContract: (args) => readContract(client, args),\n sendRawTransaction: (args) => sendRawTransaction(client, args),\n sendRawTransactionSync: (args) => sendRawTransactionSync(client, args),\n simulate: (args) => simulateBlocks(client, args),\n simulateBlocks: (args) => simulateBlocks(client, args),\n simulateCalls: (args) => simulateCalls(client, args),\n simulateContract: (args) => simulateContract(client, args),\n verifyHash: (args) => verifyHash(client, args),\n verifyMessage: (args) => verifyMessage(client, args),\n verifySiweMessage: (args) => verifySiweMessage(client, args),\n verifyTypedData: (args) => verifyTypedData(client, args),\n uninstallFilter: (args) => uninstallFilter(client, args),\n waitForTransactionReceipt: (args) => waitForTransactionReceipt(client, args),\n watchBlocks: (args) => watchBlocks(client, args),\n watchBlockNumber: (args) => watchBlockNumber(client, args),\n watchContractEvent: (args) => watchContractEvent(client, args),\n watchEvent: (args) => watchEvent(client, args),\n watchPendingTransactions: (args) => watchPendingTransactions(client, args)\n };\n }\n var init_public = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/decorators/public.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getEnsAddress();\n init_getEnsAvatar();\n init_getEnsName();\n init_getEnsResolver();\n init_getEnsText();\n init_call();\n init_createAccessList();\n init_createBlockFilter();\n init_createContractEventFilter();\n init_createEventFilter();\n init_createPendingTransactionFilter();\n init_estimateContractGas();\n init_estimateFeesPerGas();\n init_estimateGas2();\n init_estimateMaxPriorityFeePerGas();\n init_getBalance();\n init_getBlobBaseFee();\n init_getBlock();\n init_getBlockNumber();\n init_getBlockTransactionCount();\n init_getChainId();\n init_getCode();\n init_getContractEvents();\n init_getEip712Domain();\n init_getFeeHistory();\n init_getFilterChanges();\n init_getFilterLogs();\n init_getGasPrice();\n init_getLogs();\n init_getProof();\n init_getStorageAt();\n init_getTransaction();\n init_getTransactionConfirmations();\n init_getTransactionCount();\n init_getTransactionReceipt();\n init_multicall();\n init_readContract();\n init_simulateBlocks();\n init_simulateCalls();\n init_simulateContract();\n init_uninstallFilter();\n init_verifyHash();\n init_verifyMessage();\n init_verifyTypedData();\n init_waitForTransactionReceipt();\n init_watchBlockNumber();\n init_watchBlocks();\n init_watchContractEvent();\n init_watchEvent();\n init_watchPendingTransactions();\n init_verifySiweMessage();\n init_prepareTransactionRequest();\n init_sendRawTransaction();\n init_sendRawTransactionSync();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/createTransport.js\n function createTransport({ key, methods, name, request, retryCount = 3, retryDelay = 150, timeout, type }, value) {\n const uid2 = uid();\n return {\n config: {\n key,\n methods,\n name,\n request,\n retryCount,\n retryDelay,\n timeout,\n type\n },\n request: buildRequest(request, { methods, retryCount, retryDelay, uid: uid2 }),\n value\n };\n }\n var init_createTransport = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/createTransport.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_buildRequest();\n init_uid();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/custom.js\n function custom(provider, config2 = {}) {\n const { key = \"custom\", methods, name = \"Custom Provider\", retryDelay } = config2;\n return ({ retryCount: defaultRetryCount }) => createTransport({\n key,\n methods,\n name,\n request: provider.request.bind(provider),\n retryCount: config2.retryCount ?? defaultRetryCount,\n retryDelay,\n type: \"custom\"\n });\n }\n var init_custom = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/custom.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_createTransport();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/transport.js\n var UrlRequiredError;\n var init_transport = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/errors/transport.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base();\n UrlRequiredError = class extends BaseError2 {\n constructor() {\n super(\"No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.\", {\n docsPath: \"/docs/clients/intro\",\n name: \"UrlRequiredError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/http.js\n function http(url, config2 = {}) {\n const { batch, fetchFn, fetchOptions, key = \"http\", methods, name = \"HTTP JSON-RPC\", onFetchRequest, onFetchResponse, retryDelay, raw } = config2;\n return ({ chain: chain2, retryCount: retryCount_, timeout: timeout_ }) => {\n const { batchSize = 1e3, wait: wait2 = 0 } = typeof batch === \"object\" ? batch : {};\n const retryCount = config2.retryCount ?? retryCount_;\n const timeout = timeout_ ?? config2.timeout ?? 1e4;\n const url_ = url || chain2?.rpcUrls.default.http[0];\n if (!url_)\n throw new UrlRequiredError();\n const rpcClient = getHttpRpcClient(url_, {\n fetchFn,\n fetchOptions,\n onRequest: onFetchRequest,\n onResponse: onFetchResponse,\n timeout\n });\n return createTransport({\n key,\n methods,\n name,\n async request({ method, params }) {\n const body = { method, params };\n const { schedule } = createBatchScheduler({\n id: url_,\n wait: wait2,\n shouldSplitBatch(requests) {\n return requests.length > batchSize;\n },\n fn: (body2) => rpcClient.request({\n body: body2\n }),\n sort: (a3, b4) => a3.id - b4.id\n });\n const fn = async (body2) => batch ? schedule(body2) : [\n await rpcClient.request({\n body: body2\n })\n ];\n const [{ error, result }] = await fn(body);\n if (raw)\n return { error, result };\n if (error)\n throw new RpcRequestError({\n body,\n error,\n url: url_\n });\n return result;\n },\n retryCount,\n retryDelay,\n timeout,\n type: \"http\"\n }, {\n fetchOptions,\n url: url_\n });\n };\n }\n var init_http2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/clients/transports/http.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_request();\n init_transport();\n init_createBatchScheduler();\n init_http();\n init_createTransport();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/index.js\n var init_esm = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports();\n init_getContract();\n init_createClient();\n init_public();\n init_createTransport();\n init_custom();\n init_http2();\n init_address2();\n init_bytes2();\n init_number();\n init_address();\n init_base();\n init_stateOverride();\n init_decodeErrorResult();\n init_encodeAbiParameters();\n init_encodeDeployData();\n init_encodeFunctionData();\n init_encodeFunctionResult();\n init_encodePacked();\n init_getContractAddress();\n init_isAddress();\n init_defineChain();\n init_concat();\n init_isHex();\n init_pad();\n init_size();\n init_trim();\n init_fromHex();\n init_toBytes();\n init_toHex();\n init_keccak256();\n init_hashMessage();\n init_hashTypedData();\n init_recoverAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/utils.js\n function _abool2(value, title2 = \"\") {\n if (typeof value !== \"boolean\") {\n const prefix = title2 && `\"${title2}\"`;\n throw new Error(prefix + \"expected boolean, got type=\" + typeof value);\n }\n return value;\n }\n function _abytes2(value, length, title2 = \"\") {\n const bytes = isBytes(value);\n const len = value?.length;\n const needsLen = length !== void 0;\n if (!bytes || needsLen && len !== length) {\n const prefix = title2 && `\"${title2}\" `;\n const ofLen = needsLen ? ` of length ${length}` : \"\";\n const got = bytes ? `length=${len}` : `type=${typeof value}`;\n throw new Error(prefix + \"expected Uint8Array\" + ofLen + \", got \" + got);\n }\n return value;\n }\n function numberToHexUnpadded2(num2) {\n const hex = num2.toString(16);\n return hex.length & 1 ? \"0\" + hex : hex;\n }\n function hexToNumber3(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n return hex === \"\" ? _0n7 : BigInt(\"0x\" + hex);\n }\n function bytesToNumberBE2(bytes) {\n return hexToNumber3(bytesToHex2(bytes));\n }\n function bytesToNumberLE2(bytes) {\n abytes(bytes);\n return hexToNumber3(bytesToHex2(Uint8Array.from(bytes).reverse()));\n }\n function numberToBytesBE2(n2, len) {\n return hexToBytes2(n2.toString(16).padStart(len * 2, \"0\"));\n }\n function numberToBytesLE2(n2, len) {\n return numberToBytesBE2(n2, len).reverse();\n }\n function ensureBytes2(title2, hex, expectedLength) {\n let res;\n if (typeof hex === \"string\") {\n try {\n res = hexToBytes2(hex);\n } catch (e2) {\n throw new Error(title2 + \" must be hex string or Uint8Array, cause: \" + e2);\n }\n } else if (isBytes(hex)) {\n res = Uint8Array.from(hex);\n } else {\n throw new Error(title2 + \" must be hex string or Uint8Array\");\n }\n const len = res.length;\n if (typeof expectedLength === \"number\" && len !== expectedLength)\n throw new Error(title2 + \" of length \" + expectedLength + \" expected, got \" + len);\n return res;\n }\n function inRange2(n2, min, max) {\n return isPosBig2(n2) && isPosBig2(min) && isPosBig2(max) && min <= n2 && n2 < max;\n }\n function aInRange2(title2, n2, min, max) {\n if (!inRange2(n2, min, max))\n throw new Error(\"expected valid \" + title2 + \": \" + min + \" <= n < \" + max + \", got \" + n2);\n }\n function bitLen2(n2) {\n let len;\n for (len = 0; n2 > _0n7; n2 >>= _1n7, len += 1)\n ;\n return len;\n }\n function createHmacDrbg2(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== \"number\" || hashLen < 2)\n throw new Error(\"hashLen must be a number\");\n if (typeof qByteLen !== \"number\" || qByteLen < 2)\n throw new Error(\"qByteLen must be a number\");\n if (typeof hmacFn !== \"function\")\n throw new Error(\"hmacFn must be a function\");\n const u8n2 = (len) => new Uint8Array(len);\n const u8of = (byte) => Uint8Array.of(byte);\n let v2 = u8n2(hashLen);\n let k4 = u8n2(hashLen);\n let i3 = 0;\n const reset = () => {\n v2.fill(1);\n k4.fill(0);\n i3 = 0;\n };\n const h4 = (...b4) => hmacFn(k4, v2, ...b4);\n const reseed = (seed = u8n2(0)) => {\n k4 = h4(u8of(0), seed);\n v2 = h4();\n if (seed.length === 0)\n return;\n k4 = h4(u8of(1), seed);\n v2 = h4();\n };\n const gen2 = () => {\n if (i3++ >= 1e3)\n throw new Error(\"drbg: tried 1000 values\");\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v2 = h4();\n const sl = v2.slice();\n out.push(sl);\n len += v2.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed);\n let res = void 0;\n while (!(res = pred(gen2())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n }\n function _validateObject(object, fields, optFields = {}) {\n if (!object || typeof object !== \"object\")\n throw new Error(\"expected valid options object\");\n function checkField(fieldName, expectedType, isOpt) {\n const val = object[fieldName];\n if (isOpt && val === void 0)\n return;\n const current = typeof val;\n if (current !== expectedType || val === null)\n throw new Error(`param \"${fieldName}\" is invalid: expected ${expectedType}, got ${current}`);\n }\n Object.entries(fields).forEach(([k4, v2]) => checkField(k4, v2, false));\n Object.entries(optFields).forEach(([k4, v2]) => checkField(k4, v2, true));\n }\n function memoized2(fn) {\n const map = /* @__PURE__ */ new WeakMap();\n return (arg, ...args) => {\n const val = map.get(arg);\n if (val !== void 0)\n return val;\n const computed = fn(arg, ...args);\n map.set(arg, computed);\n return computed;\n };\n }\n var _0n7, _1n7, isPosBig2, bitMask2;\n var init_utils8 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n init_utils3();\n _0n7 = /* @__PURE__ */ BigInt(0);\n _1n7 = /* @__PURE__ */ BigInt(1);\n isPosBig2 = (n2) => typeof n2 === \"bigint\" && _0n7 <= n2;\n bitMask2 = (n2) => (_1n7 << BigInt(n2)) - _1n7;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/modular.js\n function mod2(a3, b4) {\n const result = a3 % b4;\n return result >= _0n8 ? result : b4 + result;\n }\n function pow22(x4, power, modulo) {\n let res = x4;\n while (power-- > _0n8) {\n res *= res;\n res %= modulo;\n }\n return res;\n }\n function invert2(number, modulo) {\n if (number === _0n8)\n throw new Error(\"invert: expected non-zero number\");\n if (modulo <= _0n8)\n throw new Error(\"invert: expected positive modulus, got \" + modulo);\n let a3 = mod2(number, modulo);\n let b4 = modulo;\n let x4 = _0n8, y6 = _1n8, u2 = _1n8, v2 = _0n8;\n while (a3 !== _0n8) {\n const q3 = b4 / a3;\n const r2 = b4 % a3;\n const m2 = x4 - u2 * q3;\n const n2 = y6 - v2 * q3;\n b4 = a3, a3 = r2, x4 = u2, y6 = v2, u2 = m2, v2 = n2;\n }\n const gcd = b4;\n if (gcd !== _1n8)\n throw new Error(\"invert: does not exist\");\n return mod2(x4, modulo);\n }\n function assertIsSquare(Fp, root, n2) {\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n }\n function sqrt3mod42(Fp, n2) {\n const p1div4 = (Fp.ORDER + _1n8) / _4n3;\n const root = Fp.pow(n2, p1div4);\n assertIsSquare(Fp, root, n2);\n return root;\n }\n function sqrt5mod82(Fp, n2) {\n const p5div8 = (Fp.ORDER - _5n2) / _8n2;\n const n22 = Fp.mul(n2, _2n5);\n const v2 = Fp.pow(n22, p5div8);\n const nv = Fp.mul(n2, v2);\n const i3 = Fp.mul(Fp.mul(nv, _2n5), v2);\n const root = Fp.mul(nv, Fp.sub(i3, Fp.ONE));\n assertIsSquare(Fp, root, n2);\n return root;\n }\n function sqrt9mod16(P2) {\n const Fp_ = Field2(P2);\n const tn = tonelliShanks2(P2);\n const c1 = tn(Fp_, Fp_.neg(Fp_.ONE));\n const c22 = tn(Fp_, c1);\n const c32 = tn(Fp_, Fp_.neg(c1));\n const c4 = (P2 + _7n2) / _16n;\n return (Fp, n2) => {\n let tv1 = Fp.pow(n2, c4);\n let tv2 = Fp.mul(tv1, c1);\n const tv3 = Fp.mul(tv1, c22);\n const tv4 = Fp.mul(tv1, c32);\n const e1 = Fp.eql(Fp.sqr(tv2), n2);\n const e2 = Fp.eql(Fp.sqr(tv3), n2);\n tv1 = Fp.cmov(tv1, tv2, e1);\n tv2 = Fp.cmov(tv4, tv3, e2);\n const e3 = Fp.eql(Fp.sqr(tv2), n2);\n const root = Fp.cmov(tv1, tv2, e3);\n assertIsSquare(Fp, root, n2);\n return root;\n };\n }\n function tonelliShanks2(P2) {\n if (P2 < _3n3)\n throw new Error(\"sqrt is not defined for small field\");\n let Q2 = P2 - _1n8;\n let S3 = 0;\n while (Q2 % _2n5 === _0n8) {\n Q2 /= _2n5;\n S3++;\n }\n let Z2 = _2n5;\n const _Fp = Field2(P2);\n while (FpLegendre2(_Fp, Z2) === 1) {\n if (Z2++ > 1e3)\n throw new Error(\"Cannot find square root: probably non-prime P\");\n }\n if (S3 === 1)\n return sqrt3mod42;\n let cc = _Fp.pow(Z2, Q2);\n const Q1div2 = (Q2 + _1n8) / _2n5;\n return function tonelliSlow(Fp, n2) {\n if (Fp.is0(n2))\n return n2;\n if (FpLegendre2(Fp, n2) !== 1)\n throw new Error(\"Cannot find square root\");\n let M2 = S3;\n let c4 = Fp.mul(Fp.ONE, cc);\n let t3 = Fp.pow(n2, Q2);\n let R3 = Fp.pow(n2, Q1div2);\n while (!Fp.eql(t3, Fp.ONE)) {\n if (Fp.is0(t3))\n return Fp.ZERO;\n let i3 = 1;\n let t_tmp = Fp.sqr(t3);\n while (!Fp.eql(t_tmp, Fp.ONE)) {\n i3++;\n t_tmp = Fp.sqr(t_tmp);\n if (i3 === M2)\n throw new Error(\"Cannot find square root\");\n }\n const exponent = _1n8 << BigInt(M2 - i3 - 1);\n const b4 = Fp.pow(c4, exponent);\n M2 = i3;\n c4 = Fp.sqr(b4);\n t3 = Fp.mul(t3, c4);\n R3 = Fp.mul(R3, b4);\n }\n return R3;\n };\n }\n function FpSqrt2(P2) {\n if (P2 % _4n3 === _3n3)\n return sqrt3mod42;\n if (P2 % _8n2 === _5n2)\n return sqrt5mod82;\n if (P2 % _16n === _9n)\n return sqrt9mod16(P2);\n return tonelliShanks2(P2);\n }\n function validateField2(field) {\n const initial = {\n ORDER: \"bigint\",\n MASK: \"bigint\",\n BYTES: \"number\",\n BITS: \"number\"\n };\n const opts = FIELD_FIELDS2.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n _validateObject(field, opts);\n return field;\n }\n function FpPow2(Fp, num2, power) {\n if (power < _0n8)\n throw new Error(\"invalid exponent, negatives unsupported\");\n if (power === _0n8)\n return Fp.ONE;\n if (power === _1n8)\n return num2;\n let p4 = Fp.ONE;\n let d5 = num2;\n while (power > _0n8) {\n if (power & _1n8)\n p4 = Fp.mul(p4, d5);\n d5 = Fp.sqr(d5);\n power >>= _1n8;\n }\n return p4;\n }\n function FpInvertBatch2(Fp, nums, passZero = false) {\n const inverted = new Array(nums.length).fill(passZero ? Fp.ZERO : void 0);\n const multipliedAcc = nums.reduce((acc, num2, i3) => {\n if (Fp.is0(num2))\n return acc;\n inverted[i3] = acc;\n return Fp.mul(acc, num2);\n }, Fp.ONE);\n const invertedAcc = Fp.inv(multipliedAcc);\n nums.reduceRight((acc, num2, i3) => {\n if (Fp.is0(num2))\n return acc;\n inverted[i3] = Fp.mul(acc, inverted[i3]);\n return Fp.mul(acc, num2);\n }, invertedAcc);\n return inverted;\n }\n function FpLegendre2(Fp, n2) {\n const p1mod2 = (Fp.ORDER - _1n8) / _2n5;\n const powered = Fp.pow(n2, p1mod2);\n const yes = Fp.eql(powered, Fp.ONE);\n const zero = Fp.eql(powered, Fp.ZERO);\n const no = Fp.eql(powered, Fp.neg(Fp.ONE));\n if (!yes && !zero && !no)\n throw new Error(\"invalid Legendre symbol result\");\n return yes ? 1 : zero ? 0 : -1;\n }\n function nLength2(n2, nBitLength) {\n if (nBitLength !== void 0)\n anumber(nBitLength);\n const _nBitLength = nBitLength !== void 0 ? nBitLength : n2.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n }\n function Field2(ORDER, bitLenOrOpts, isLE2 = false, opts = {}) {\n if (ORDER <= _0n8)\n throw new Error(\"invalid field: expected ORDER > 0, got \" + ORDER);\n let _nbitLength = void 0;\n let _sqrt = void 0;\n let modFromBytes = false;\n let allowedLengths = void 0;\n if (typeof bitLenOrOpts === \"object\" && bitLenOrOpts != null) {\n if (opts.sqrt || isLE2)\n throw new Error(\"cannot specify opts in two arguments\");\n const _opts = bitLenOrOpts;\n if (_opts.BITS)\n _nbitLength = _opts.BITS;\n if (_opts.sqrt)\n _sqrt = _opts.sqrt;\n if (typeof _opts.isLE === \"boolean\")\n isLE2 = _opts.isLE;\n if (typeof _opts.modFromBytes === \"boolean\")\n modFromBytes = _opts.modFromBytes;\n allowedLengths = _opts.allowedLengths;\n } else {\n if (typeof bitLenOrOpts === \"number\")\n _nbitLength = bitLenOrOpts;\n if (opts.sqrt)\n _sqrt = opts.sqrt;\n }\n const { nBitLength: BITS, nByteLength: BYTES } = nLength2(ORDER, _nbitLength);\n if (BYTES > 2048)\n throw new Error(\"invalid field: expected ORDER of <= 2048 bytes\");\n let sqrtP;\n const f7 = Object.freeze({\n ORDER,\n isLE: isLE2,\n BITS,\n BYTES,\n MASK: bitMask2(BITS),\n ZERO: _0n8,\n ONE: _1n8,\n allowedLengths,\n create: (num2) => mod2(num2, ORDER),\n isValid: (num2) => {\n if (typeof num2 !== \"bigint\")\n throw new Error(\"invalid field element: expected bigint, got \" + typeof num2);\n return _0n8 <= num2 && num2 < ORDER;\n },\n is0: (num2) => num2 === _0n8,\n // is valid and invertible\n isValidNot0: (num2) => !f7.is0(num2) && f7.isValid(num2),\n isOdd: (num2) => (num2 & _1n8) === _1n8,\n neg: (num2) => mod2(-num2, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num2) => mod2(num2 * num2, ORDER),\n add: (lhs, rhs) => mod2(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod2(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod2(lhs * rhs, ORDER),\n pow: (num2, power) => FpPow2(f7, num2, power),\n div: (lhs, rhs) => mod2(lhs * invert2(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num2) => num2 * num2,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num2) => invert2(num2, ORDER),\n sqrt: _sqrt || ((n2) => {\n if (!sqrtP)\n sqrtP = FpSqrt2(ORDER);\n return sqrtP(f7, n2);\n }),\n toBytes: (num2) => isLE2 ? numberToBytesLE2(num2, BYTES) : numberToBytesBE2(num2, BYTES),\n fromBytes: (bytes, skipValidation = true) => {\n if (allowedLengths) {\n if (!allowedLengths.includes(bytes.length) || bytes.length > BYTES) {\n throw new Error(\"Field.fromBytes: expected \" + allowedLengths + \" bytes, got \" + bytes.length);\n }\n const padded = new Uint8Array(BYTES);\n padded.set(bytes, isLE2 ? 0 : padded.length - bytes.length);\n bytes = padded;\n }\n if (bytes.length !== BYTES)\n throw new Error(\"Field.fromBytes: expected \" + BYTES + \" bytes, got \" + bytes.length);\n let scalar = isLE2 ? bytesToNumberLE2(bytes) : bytesToNumberBE2(bytes);\n if (modFromBytes)\n scalar = mod2(scalar, ORDER);\n if (!skipValidation) {\n if (!f7.isValid(scalar))\n throw new Error(\"invalid field element: outside of range 0..ORDER\");\n }\n return scalar;\n },\n // TODO: we don't need it here, move out to separate fn\n invertBatch: (lst) => FpInvertBatch2(f7, lst),\n // We can't move this out because Fp6, Fp12 implement it\n // and it's unclear what to return in there.\n cmov: (a3, b4, c4) => c4 ? b4 : a3\n });\n return Object.freeze(f7);\n }\n function getFieldBytesLength2(fieldOrder) {\n if (typeof fieldOrder !== \"bigint\")\n throw new Error(\"field order must be bigint\");\n const bitLength3 = fieldOrder.toString(2).length;\n return Math.ceil(bitLength3 / 8);\n }\n function getMinHashLength2(fieldOrder) {\n const length = getFieldBytesLength2(fieldOrder);\n return length + Math.ceil(length / 2);\n }\n function mapHashToField2(key, fieldOrder, isLE2 = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength2(fieldOrder);\n const minLen = getMinHashLength2(fieldOrder);\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(\"expected \" + minLen + \"-1024 bytes of input, got \" + len);\n const num2 = isLE2 ? bytesToNumberLE2(key) : bytesToNumberBE2(key);\n const reduced = mod2(num2, fieldOrder - _1n8) + _1n8;\n return isLE2 ? numberToBytesLE2(reduced, fieldLen) : numberToBytesBE2(reduced, fieldLen);\n }\n var _0n8, _1n8, _2n5, _3n3, _4n3, _5n2, _7n2, _8n2, _9n, _16n, FIELD_FIELDS2;\n var init_modular2 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/modular.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils8();\n _0n8 = BigInt(0);\n _1n8 = BigInt(1);\n _2n5 = /* @__PURE__ */ BigInt(2);\n _3n3 = /* @__PURE__ */ BigInt(3);\n _4n3 = /* @__PURE__ */ BigInt(4);\n _5n2 = /* @__PURE__ */ BigInt(5);\n _7n2 = /* @__PURE__ */ BigInt(7);\n _8n2 = /* @__PURE__ */ BigInt(8);\n _9n = /* @__PURE__ */ BigInt(9);\n _16n = /* @__PURE__ */ BigInt(16);\n FIELD_FIELDS2 = [\n \"create\",\n \"isValid\",\n \"is0\",\n \"neg\",\n \"inv\",\n \"sqrt\",\n \"sqr\",\n \"eql\",\n \"add\",\n \"sub\",\n \"mul\",\n \"pow\",\n \"div\",\n \"addN\",\n \"subN\",\n \"mulN\",\n \"sqrN\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/curve.js\n function negateCt(condition, item) {\n const neg = item.negate();\n return condition ? neg : item;\n }\n function normalizeZ(c4, points) {\n const invertedZs = FpInvertBatch2(c4.Fp, points.map((p4) => p4.Z));\n return points.map((p4, i3) => c4.fromAffine(p4.toAffine(invertedZs[i3])));\n }\n function validateW2(W, bits) {\n if (!Number.isSafeInteger(W) || W <= 0 || W > bits)\n throw new Error(\"invalid window size, expected [1..\" + bits + \"], got W=\" + W);\n }\n function calcWOpts2(W, scalarBits) {\n validateW2(W, scalarBits);\n const windows = Math.ceil(scalarBits / W) + 1;\n const windowSize = 2 ** (W - 1);\n const maxNumber = 2 ** W;\n const mask = bitMask2(W);\n const shiftBy = BigInt(W);\n return { windows, windowSize, mask, maxNumber, shiftBy };\n }\n function calcOffsets2(n2, window2, wOpts) {\n const { windowSize, mask, maxNumber, shiftBy } = wOpts;\n let wbits = Number(n2 & mask);\n let nextN = n2 >> shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n nextN += _1n9;\n }\n const offsetStart = window2 * windowSize;\n const offset = offsetStart + Math.abs(wbits) - 1;\n const isZero = wbits === 0;\n const isNeg = wbits < 0;\n const isNegF = window2 % 2 !== 0;\n const offsetF = offsetStart;\n return { nextN, offset, isZero, isNeg, isNegF, offsetF };\n }\n function validateMSMPoints2(points, c4) {\n if (!Array.isArray(points))\n throw new Error(\"array expected\");\n points.forEach((p4, i3) => {\n if (!(p4 instanceof c4))\n throw new Error(\"invalid point at index \" + i3);\n });\n }\n function validateMSMScalars2(scalars, field) {\n if (!Array.isArray(scalars))\n throw new Error(\"array of scalars expected\");\n scalars.forEach((s4, i3) => {\n if (!field.isValid(s4))\n throw new Error(\"invalid scalar at index \" + i3);\n });\n }\n function getW2(P2) {\n return pointWindowSizes2.get(P2) || 1;\n }\n function assert0(n2) {\n if (n2 !== _0n9)\n throw new Error(\"invalid wNAF\");\n }\n function mulEndoUnsafe(Point3, point, k1, k22) {\n let acc = point;\n let p1 = Point3.ZERO;\n let p22 = Point3.ZERO;\n while (k1 > _0n9 || k22 > _0n9) {\n if (k1 & _1n9)\n p1 = p1.add(acc);\n if (k22 & _1n9)\n p22 = p22.add(acc);\n acc = acc.double();\n k1 >>= _1n9;\n k22 >>= _1n9;\n }\n return { p1, p2: p22 };\n }\n function pippenger2(c4, fieldN, points, scalars) {\n validateMSMPoints2(points, c4);\n validateMSMScalars2(scalars, fieldN);\n const plength = points.length;\n const slength = scalars.length;\n if (plength !== slength)\n throw new Error(\"arrays of points and scalars must have equal length\");\n const zero = c4.ZERO;\n const wbits = bitLen2(BigInt(plength));\n let windowSize = 1;\n if (wbits > 12)\n windowSize = wbits - 3;\n else if (wbits > 4)\n windowSize = wbits - 2;\n else if (wbits > 0)\n windowSize = 2;\n const MASK = bitMask2(windowSize);\n const buckets = new Array(Number(MASK) + 1).fill(zero);\n const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;\n let sum = zero;\n for (let i3 = lastBits; i3 >= 0; i3 -= windowSize) {\n buckets.fill(zero);\n for (let j2 = 0; j2 < slength; j2++) {\n const scalar = scalars[j2];\n const wbits2 = Number(scalar >> BigInt(i3) & MASK);\n buckets[wbits2] = buckets[wbits2].add(points[j2]);\n }\n let resI = zero;\n for (let j2 = buckets.length - 1, sumI = zero; j2 > 0; j2--) {\n sumI = sumI.add(buckets[j2]);\n resI = resI.add(sumI);\n }\n sum = sum.add(resI);\n if (i3 !== 0)\n for (let j2 = 0; j2 < windowSize; j2++)\n sum = sum.double();\n }\n return sum;\n }\n function createField(order, field, isLE2) {\n if (field) {\n if (field.ORDER !== order)\n throw new Error(\"Field.ORDER must match order: Fp == p, Fn == n\");\n validateField2(field);\n return field;\n } else {\n return Field2(order, { isLE: isLE2 });\n }\n }\n function _createCurveFields(type, CURVE, curveOpts = {}, FpFnLE) {\n if (FpFnLE === void 0)\n FpFnLE = type === \"edwards\";\n if (!CURVE || typeof CURVE !== \"object\")\n throw new Error(`expected valid ${type} CURVE object`);\n for (const p4 of [\"p\", \"n\", \"h\"]) {\n const val = CURVE[p4];\n if (!(typeof val === \"bigint\" && val > _0n9))\n throw new Error(`CURVE.${p4} must be positive bigint`);\n }\n const Fp = createField(CURVE.p, curveOpts.Fp, FpFnLE);\n const Fn = createField(CURVE.n, curveOpts.Fn, FpFnLE);\n const _b = type === \"weierstrass\" ? \"b\" : \"d\";\n const params = [\"Gx\", \"Gy\", \"a\", _b];\n for (const p4 of params) {\n if (!Fp.isValid(CURVE[p4]))\n throw new Error(`CURVE.${p4} must be valid field element of CURVE.Fp`);\n }\n CURVE = Object.freeze(Object.assign({}, CURVE));\n return { CURVE, Fp, Fn };\n }\n var _0n9, _1n9, pointPrecomputes2, pointWindowSizes2, wNAF2;\n var init_curve2 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/curve.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils8();\n init_modular2();\n _0n9 = BigInt(0);\n _1n9 = BigInt(1);\n pointPrecomputes2 = /* @__PURE__ */ new WeakMap();\n pointWindowSizes2 = /* @__PURE__ */ new WeakMap();\n wNAF2 = class {\n // Parametrized with a given Point class (not individual point)\n constructor(Point3, bits) {\n this.BASE = Point3.BASE;\n this.ZERO = Point3.ZERO;\n this.Fn = Point3.Fn;\n this.bits = bits;\n }\n // non-const time multiplication ladder\n _unsafeLadder(elm, n2, p4 = this.ZERO) {\n let d5 = elm;\n while (n2 > _0n9) {\n if (n2 & _1n9)\n p4 = p4.add(d5);\n d5 = d5.double();\n n2 >>= _1n9;\n }\n return p4;\n }\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @param point Point instance\n * @param W window size\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(point, W) {\n const { windows, windowSize } = calcWOpts2(W, this.bits);\n const points = [];\n let p4 = point;\n let base4 = p4;\n for (let window2 = 0; window2 < windows; window2++) {\n base4 = p4;\n points.push(base4);\n for (let i3 = 1; i3 < windowSize; i3++) {\n base4 = base4.add(p4);\n points.push(base4);\n }\n p4 = base4.double();\n }\n return points;\n }\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * More compact implementation:\n * https://github.com/paulmillr/noble-secp256k1/blob/47cb1669b6e506ad66b35fe7d76132ae97465da2/index.ts#L502-L541\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n2) {\n if (!this.Fn.isValid(n2))\n throw new Error(\"invalid scalar\");\n let p4 = this.ZERO;\n let f7 = this.BASE;\n const wo = calcWOpts2(W, this.bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n const { nextN, offset, isZero, isNeg, isNegF, offsetF } = calcOffsets2(n2, window2, wo);\n n2 = nextN;\n if (isZero) {\n f7 = f7.add(negateCt(isNegF, precomputes[offsetF]));\n } else {\n p4 = p4.add(negateCt(isNeg, precomputes[offset]));\n }\n }\n assert0(n2);\n return { p: p4, f: f7 };\n }\n /**\n * Implements ec unsafe (non const-time) multiplication using precomputed tables and w-ary non-adjacent form.\n * @param acc accumulator point to add result of multiplication\n * @returns point\n */\n wNAFUnsafe(W, precomputes, n2, acc = this.ZERO) {\n const wo = calcWOpts2(W, this.bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n if (n2 === _0n9)\n break;\n const { nextN, offset, isZero, isNeg } = calcOffsets2(n2, window2, wo);\n n2 = nextN;\n if (isZero) {\n continue;\n } else {\n const item = precomputes[offset];\n acc = acc.add(isNeg ? item.negate() : item);\n }\n }\n assert0(n2);\n return acc;\n }\n getPrecomputes(W, point, transform) {\n let comp = pointPrecomputes2.get(point);\n if (!comp) {\n comp = this.precomputeWindow(point, W);\n if (W !== 1) {\n if (typeof transform === \"function\")\n comp = transform(comp);\n pointPrecomputes2.set(point, comp);\n }\n }\n return comp;\n }\n cached(point, scalar, transform) {\n const W = getW2(point);\n return this.wNAF(W, this.getPrecomputes(W, point, transform), scalar);\n }\n unsafe(point, scalar, transform, prev) {\n const W = getW2(point);\n if (W === 1)\n return this._unsafeLadder(point, scalar, prev);\n return this.wNAFUnsafe(W, this.getPrecomputes(W, point, transform), scalar, prev);\n }\n // We calculate precomputes for elliptic curve point multiplication\n // using windowed method. This specifies window size and\n // stores precomputed values. Usually only base point would be precomputed.\n createCache(P2, W) {\n validateW2(W, this.bits);\n pointWindowSizes2.set(P2, W);\n pointPrecomputes2.delete(P2);\n }\n hasCache(elm) {\n return getW2(elm) !== 1;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/weierstrass.js\n function _splitEndoScalar(k4, basis, n2) {\n const [[a1, b1], [a22, b22]] = basis;\n const c1 = divNearest2(b22 * k4, n2);\n const c22 = divNearest2(-b1 * k4, n2);\n let k1 = k4 - c1 * a1 - c22 * a22;\n let k22 = -c1 * b1 - c22 * b22;\n const k1neg = k1 < _0n10;\n const k2neg = k22 < _0n10;\n if (k1neg)\n k1 = -k1;\n if (k2neg)\n k22 = -k22;\n const MAX_NUM = bitMask2(Math.ceil(bitLen2(n2) / 2)) + _1n10;\n if (k1 < _0n10 || k1 >= MAX_NUM || k22 < _0n10 || k22 >= MAX_NUM) {\n throw new Error(\"splitScalar (endomorphism): failed, k=\" + k4);\n }\n return { k1neg, k1, k2neg, k2: k22 };\n }\n function validateSigFormat(format) {\n if (![\"compact\", \"recovered\", \"der\"].includes(format))\n throw new Error('Signature format must be \"compact\", \"recovered\", or \"der\"');\n return format;\n }\n function validateSigOpts(opts, def) {\n const optsn = {};\n for (let optName of Object.keys(def)) {\n optsn[optName] = opts[optName] === void 0 ? def[optName] : opts[optName];\n }\n _abool2(optsn.lowS, \"lowS\");\n _abool2(optsn.prehash, \"prehash\");\n if (optsn.format !== void 0)\n validateSigFormat(optsn.format);\n return optsn;\n }\n function _normFnElement(Fn, key) {\n const { BYTES: expected } = Fn;\n let num2;\n if (typeof key === \"bigint\") {\n num2 = key;\n } else {\n let bytes = ensureBytes2(\"private key\", key);\n try {\n num2 = Fn.fromBytes(bytes);\n } catch (error) {\n throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof key}`);\n }\n }\n if (!Fn.isValidNot0(num2))\n throw new Error(\"invalid private key: out of range [1..N-1]\");\n return num2;\n }\n function weierstrassN(params, extraOpts = {}) {\n const validated = _createCurveFields(\"weierstrass\", params, extraOpts);\n const { Fp, Fn } = validated;\n let CURVE = validated.CURVE;\n const { h: cofactor, n: CURVE_ORDER } = CURVE;\n _validateObject(extraOpts, {}, {\n allowInfinityPoint: \"boolean\",\n clearCofactor: \"function\",\n isTorsionFree: \"function\",\n fromBytes: \"function\",\n toBytes: \"function\",\n endo: \"object\",\n wrapPrivateKey: \"boolean\"\n });\n const { endo } = extraOpts;\n if (endo) {\n if (!Fp.is0(CURVE.a) || typeof endo.beta !== \"bigint\" || !Array.isArray(endo.basises)) {\n throw new Error('invalid endo: expected \"beta\": bigint and \"basises\": array');\n }\n }\n const lengths = getWLengths(Fp, Fn);\n function assertCompressionIsSupported() {\n if (!Fp.isOdd)\n throw new Error(\"compression is not supported: Field does not have .isOdd()\");\n }\n function pointToBytes2(_c, point, isCompressed) {\n const { x: x4, y: y6 } = point.toAffine();\n const bx = Fp.toBytes(x4);\n _abool2(isCompressed, \"isCompressed\");\n if (isCompressed) {\n assertCompressionIsSupported();\n const hasEvenY = !Fp.isOdd(y6);\n return concatBytes(pprefix(hasEvenY), bx);\n } else {\n return concatBytes(Uint8Array.of(4), bx, Fp.toBytes(y6));\n }\n }\n function pointFromBytes(bytes) {\n _abytes2(bytes, void 0, \"Point\");\n const { publicKey: comp, publicKeyUncompressed: uncomp } = lengths;\n const length = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (length === comp && (head === 2 || head === 3)) {\n const x4 = Fp.fromBytes(tail);\n if (!Fp.isValid(x4))\n throw new Error(\"bad point: is not on curve, wrong x\");\n const y22 = weierstrassEquation(x4);\n let y6;\n try {\n y6 = Fp.sqrt(y22);\n } catch (sqrtError) {\n const err = sqrtError instanceof Error ? \": \" + sqrtError.message : \"\";\n throw new Error(\"bad point: is not on curve, sqrt error\" + err);\n }\n assertCompressionIsSupported();\n const isYOdd = Fp.isOdd(y6);\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y6 = Fp.neg(y6);\n return { x: x4, y: y6 };\n } else if (length === uncomp && head === 4) {\n const L2 = Fp.BYTES;\n const x4 = Fp.fromBytes(tail.subarray(0, L2));\n const y6 = Fp.fromBytes(tail.subarray(L2, L2 * 2));\n if (!isValidXY(x4, y6))\n throw new Error(\"bad point: is not on curve\");\n return { x: x4, y: y6 };\n } else {\n throw new Error(`bad point: got length ${length}, expected compressed=${comp} or uncompressed=${uncomp}`);\n }\n }\n const encodePoint = extraOpts.toBytes || pointToBytes2;\n const decodePoint = extraOpts.fromBytes || pointFromBytes;\n function weierstrassEquation(x4) {\n const x22 = Fp.sqr(x4);\n const x32 = Fp.mul(x22, x4);\n return Fp.add(Fp.add(x32, Fp.mul(x4, CURVE.a)), CURVE.b);\n }\n function isValidXY(x4, y6) {\n const left = Fp.sqr(y6);\n const right = weierstrassEquation(x4);\n return Fp.eql(left, right);\n }\n if (!isValidXY(CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n const _4a3 = Fp.mul(Fp.pow(CURVE.a, _3n4), _4n4);\n const _27b2 = Fp.mul(Fp.sqr(CURVE.b), BigInt(27));\n if (Fp.is0(Fp.add(_4a3, _27b2)))\n throw new Error(\"bad curve params: a or b\");\n function acoord(title2, n2, banZero = false) {\n if (!Fp.isValid(n2) || banZero && Fp.is0(n2))\n throw new Error(`bad point coordinate ${title2}`);\n return n2;\n }\n function aprjpoint(other) {\n if (!(other instanceof Point3))\n throw new Error(\"ProjectivePoint expected\");\n }\n function splitEndoScalarN(k4) {\n if (!endo || !endo.basises)\n throw new Error(\"no endo\");\n return _splitEndoScalar(k4, endo.basises, Fn.ORDER);\n }\n const toAffineMemo = memoized2((p4, iz) => {\n const { X: X2, Y: Y2, Z: Z2 } = p4;\n if (Fp.eql(Z2, Fp.ONE))\n return { x: X2, y: Y2 };\n const is0 = p4.is0();\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(Z2);\n const x4 = Fp.mul(X2, iz);\n const y6 = Fp.mul(Y2, iz);\n const zz = Fp.mul(Z2, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error(\"invZ was invalid\");\n return { x: x4, y: y6 };\n });\n const assertValidMemo = memoized2((p4) => {\n if (p4.is0()) {\n if (extraOpts.allowInfinityPoint && !Fp.is0(p4.Y))\n return;\n throw new Error(\"bad point: ZERO\");\n }\n const { x: x4, y: y6 } = p4.toAffine();\n if (!Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"bad point: x or y not field elements\");\n if (!isValidXY(x4, y6))\n throw new Error(\"bad point: equation left != right\");\n if (!p4.isTorsionFree())\n throw new Error(\"bad point: not in prime-order subgroup\");\n return true;\n });\n function finishEndo(endoBeta, k1p, k2p, k1neg, k2neg) {\n k2p = new Point3(Fp.mul(k2p.X, endoBeta), k2p.Y, k2p.Z);\n k1p = negateCt(k1neg, k1p);\n k2p = negateCt(k2neg, k2p);\n return k1p.add(k2p);\n }\n class Point3 {\n /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n constructor(X2, Y2, Z2) {\n this.X = acoord(\"x\", X2);\n this.Y = acoord(\"y\", Y2, true);\n this.Z = acoord(\"z\", Z2);\n Object.freeze(this);\n }\n static CURVE() {\n return CURVE;\n }\n /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n static fromAffine(p4) {\n const { x: x4, y: y6 } = p4 || {};\n if (!p4 || !Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"invalid affine point\");\n if (p4 instanceof Point3)\n throw new Error(\"projective point not allowed\");\n if (Fp.is0(x4) && Fp.is0(y6))\n return Point3.ZERO;\n return new Point3(x4, y6, Fp.ONE);\n }\n static fromBytes(bytes) {\n const P2 = Point3.fromAffine(decodePoint(_abytes2(bytes, void 0, \"point\")));\n P2.assertValidity();\n return P2;\n }\n static fromHex(hex) {\n return Point3.fromBytes(ensureBytes2(\"pointHex\", hex));\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n *\n * @param windowSize\n * @param isLazy true will defer table computation until the first multiplication\n * @returns\n */\n precompute(windowSize = 8, isLazy = true) {\n wnaf.createCache(this, windowSize);\n if (!isLazy)\n this.multiply(_3n4);\n return this;\n }\n // TODO: return `this`\n /** A point on curve is valid if it conforms to equation. */\n assertValidity() {\n assertValidMemo(this);\n }\n hasEvenY() {\n const { y: y6 } = this.toAffine();\n if (!Fp.isOdd)\n throw new Error(\"Field doesn't support isOdd\");\n return !Fp.isOdd(y6);\n }\n /** Compare one point to another. */\n equals(other) {\n aprjpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U22 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U22;\n }\n /** Flips point to one corresponding to (x, -y) in Affine coordinates. */\n negate() {\n return new Point3(this.X, Fp.neg(this.Y), this.Z);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a: a3, b: b4 } = CURVE;\n const b32 = Fp.mul(b4, _3n4);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n let t0 = Fp.mul(X1, X1);\n let t1 = Fp.mul(Y1, Y1);\n let t22 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3);\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a3, Z3);\n Y3 = Fp.mul(b32, t22);\n Y3 = Fp.add(X3, Y3);\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b32, Z3);\n t22 = Fp.mul(a3, t22);\n t3 = Fp.sub(t0, t22);\n t3 = Fp.mul(a3, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0);\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t22);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t22 = Fp.mul(Y1, Z1);\n t22 = Fp.add(t22, t22);\n t0 = Fp.mul(t22, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t22, t1);\n Z3 = Fp.add(Z3, Z3);\n Z3 = Fp.add(Z3, Z3);\n return new Point3(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n aprjpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n const a3 = CURVE.a;\n const b32 = Fp.mul(CURVE.b, _3n4);\n let t0 = Fp.mul(X1, X2);\n let t1 = Fp.mul(Y1, Y2);\n let t22 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2);\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2);\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t22);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2);\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t22);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a3, t4);\n X3 = Fp.mul(b32, t22);\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0);\n t1 = Fp.add(t1, t0);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.mul(b32, t4);\n t1 = Fp.add(t1, t22);\n t22 = Fp.sub(t0, t22);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.add(t4, t22);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4);\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0);\n return new Point3(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point3.ZERO);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n const { endo: endo2 } = extraOpts;\n if (!Fn.isValidNot0(scalar))\n throw new Error(\"invalid scalar: out of range\");\n let point, fake;\n const mul = (n2) => wnaf.cached(this, n2, (p4) => normalizeZ(Point3, p4));\n if (endo2) {\n const { k1neg, k1, k2neg, k2: k22 } = splitEndoScalarN(scalar);\n const { p: k1p, f: k1f } = mul(k1);\n const { p: k2p, f: k2f } = mul(k22);\n fake = k1f.add(k2f);\n point = finishEndo(endo2.beta, k1p, k2p, k1neg, k2neg);\n } else {\n const { p: p4, f: f7 } = mul(scalar);\n point = p4;\n fake = f7;\n }\n return normalizeZ(Point3, [point, fake])[0];\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed secret key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(sc) {\n const { endo: endo2 } = extraOpts;\n const p4 = this;\n if (!Fn.isValid(sc))\n throw new Error(\"invalid scalar: out of range\");\n if (sc === _0n10 || p4.is0())\n return Point3.ZERO;\n if (sc === _1n10)\n return p4;\n if (wnaf.hasCache(this))\n return this.multiply(sc);\n if (endo2) {\n const { k1neg, k1, k2neg, k2: k22 } = splitEndoScalarN(sc);\n const { p1, p2: p22 } = mulEndoUnsafe(Point3, p4, k1, k22);\n return finishEndo(endo2.beta, p1, p22, k1neg, k2neg);\n } else {\n return wnaf.unsafe(p4, sc);\n }\n }\n multiplyAndAddUnsafe(Q2, a3, b4) {\n const sum = this.multiplyUnsafe(a3).add(Q2.multiplyUnsafe(b4));\n return sum.is0() ? void 0 : sum;\n }\n /**\n * Converts Projective point to affine (x, y) coordinates.\n * @param invertedZ Z^-1 (inverted zero) - optional, precomputation is useful for invertBatch\n */\n toAffine(invertedZ) {\n return toAffineMemo(this, invertedZ);\n }\n /**\n * Checks whether Point is free of torsion elements (is in prime subgroup).\n * Always torsion-free for cofactor=1 curves.\n */\n isTorsionFree() {\n const { isTorsionFree } = extraOpts;\n if (cofactor === _1n10)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point3, this);\n return wnaf.unsafe(this, CURVE_ORDER).is0();\n }\n clearCofactor() {\n const { clearCofactor } = extraOpts;\n if (cofactor === _1n10)\n return this;\n if (clearCofactor)\n return clearCofactor(Point3, this);\n return this.multiplyUnsafe(cofactor);\n }\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n toBytes(isCompressed = true) {\n _abool2(isCompressed, \"isCompressed\");\n this.assertValidity();\n return encodePoint(Point3, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return bytesToHex2(this.toBytes(isCompressed));\n }\n toString() {\n return ``;\n }\n // TODO: remove\n get px() {\n return this.X;\n }\n get py() {\n return this.X;\n }\n get pz() {\n return this.Z;\n }\n toRawBytes(isCompressed = true) {\n return this.toBytes(isCompressed);\n }\n _setWindowSize(windowSize) {\n this.precompute(windowSize);\n }\n static normalizeZ(points) {\n return normalizeZ(Point3, points);\n }\n static msm(points, scalars) {\n return pippenger2(Point3, Fn, points, scalars);\n }\n static fromPrivateKey(privateKey) {\n return Point3.BASE.multiply(_normFnElement(Fn, privateKey));\n }\n }\n Point3.BASE = new Point3(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point3.ZERO = new Point3(Fp.ZERO, Fp.ONE, Fp.ZERO);\n Point3.Fp = Fp;\n Point3.Fn = Fn;\n const bits = Fn.BITS;\n const wnaf = new wNAF2(Point3, extraOpts.endo ? Math.ceil(bits / 2) : bits);\n Point3.BASE.precompute(8);\n return Point3;\n }\n function pprefix(hasEvenY) {\n return Uint8Array.of(hasEvenY ? 2 : 3);\n }\n function getWLengths(Fp, Fn) {\n return {\n secretKey: Fn.BYTES,\n publicKey: 1 + Fp.BYTES,\n publicKeyUncompressed: 1 + 2 * Fp.BYTES,\n publicKeyHasPrefix: true,\n signature: 2 * Fn.BYTES\n };\n }\n function ecdh(Point3, ecdhOpts = {}) {\n const { Fn } = Point3;\n const randomBytes_ = ecdhOpts.randomBytes || randomBytes;\n const lengths = Object.assign(getWLengths(Point3.Fp, Fn), { seed: getMinHashLength2(Fn.ORDER) });\n function isValidSecretKey(secretKey) {\n try {\n return !!_normFnElement(Fn, secretKey);\n } catch (error) {\n return false;\n }\n }\n function isValidPublicKey(publicKey, isCompressed) {\n const { publicKey: comp, publicKeyUncompressed } = lengths;\n try {\n const l6 = publicKey.length;\n if (isCompressed === true && l6 !== comp)\n return false;\n if (isCompressed === false && l6 !== publicKeyUncompressed)\n return false;\n return !!Point3.fromBytes(publicKey);\n } catch (error) {\n return false;\n }\n }\n function randomSecretKey(seed = randomBytes_(lengths.seed)) {\n return mapHashToField2(_abytes2(seed, lengths.seed, \"seed\"), Fn.ORDER);\n }\n function getPublicKey(secretKey, isCompressed = true) {\n return Point3.BASE.multiply(_normFnElement(Fn, secretKey)).toBytes(isCompressed);\n }\n function keygen(seed) {\n const secretKey = randomSecretKey(seed);\n return { secretKey, publicKey: getPublicKey(secretKey) };\n }\n function isProbPub(item) {\n if (typeof item === \"bigint\")\n return false;\n if (item instanceof Point3)\n return true;\n const { secretKey, publicKey, publicKeyUncompressed } = lengths;\n if (Fn.allowedLengths || secretKey === publicKey)\n return void 0;\n const l6 = ensureBytes2(\"key\", item).length;\n return l6 === publicKey || l6 === publicKeyUncompressed;\n }\n function getSharedSecret(secretKeyA, publicKeyB, isCompressed = true) {\n if (isProbPub(secretKeyA) === true)\n throw new Error(\"first arg must be private key\");\n if (isProbPub(publicKeyB) === false)\n throw new Error(\"second arg must be public key\");\n const s4 = _normFnElement(Fn, secretKeyA);\n const b4 = Point3.fromHex(publicKeyB);\n return b4.multiply(s4).toBytes(isCompressed);\n }\n const utils = {\n isValidSecretKey,\n isValidPublicKey,\n randomSecretKey,\n // TODO: remove\n isValidPrivateKey: isValidSecretKey,\n randomPrivateKey: randomSecretKey,\n normPrivateKeyToScalar: (key) => _normFnElement(Fn, key),\n precompute(windowSize = 8, point = Point3.BASE) {\n return point.precompute(windowSize, false);\n }\n };\n return Object.freeze({ getPublicKey, getSharedSecret, keygen, Point: Point3, utils, lengths });\n }\n function ecdsa(Point3, hash3, ecdsaOpts = {}) {\n ahash(hash3);\n _validateObject(ecdsaOpts, {}, {\n hmac: \"function\",\n lowS: \"boolean\",\n randomBytes: \"function\",\n bits2int: \"function\",\n bits2int_modN: \"function\"\n });\n const randomBytes2 = ecdsaOpts.randomBytes || randomBytes;\n const hmac2 = ecdsaOpts.hmac || ((key, ...msgs) => hmac(hash3, key, concatBytes(...msgs)));\n const { Fp, Fn } = Point3;\n const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn;\n const { keygen, getPublicKey, getSharedSecret, utils, lengths } = ecdh(Point3, ecdsaOpts);\n const defaultSigOpts = {\n prehash: false,\n lowS: typeof ecdsaOpts.lowS === \"boolean\" ? ecdsaOpts.lowS : false,\n format: void 0,\n //'compact' as ECDSASigFormat,\n extraEntropy: false\n };\n const defaultSigOpts_format = \"compact\";\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n10;\n return number > HALF;\n }\n function validateRS(title2, num2) {\n if (!Fn.isValidNot0(num2))\n throw new Error(`invalid signature ${title2}: out of range 1..Point.Fn.ORDER`);\n return num2;\n }\n function validateSigLength(bytes, format) {\n validateSigFormat(format);\n const size6 = lengths.signature;\n const sizer = format === \"compact\" ? size6 : format === \"recovered\" ? size6 + 1 : void 0;\n return _abytes2(bytes, sizer, `${format} signature`);\n }\n class Signature {\n constructor(r2, s4, recovery) {\n this.r = validateRS(\"r\", r2);\n this.s = validateRS(\"s\", s4);\n if (recovery != null)\n this.recovery = recovery;\n Object.freeze(this);\n }\n static fromBytes(bytes, format = defaultSigOpts_format) {\n validateSigLength(bytes, format);\n let recid;\n if (format === \"der\") {\n const { r: r3, s: s5 } = DER2.toSig(_abytes2(bytes));\n return new Signature(r3, s5);\n }\n if (format === \"recovered\") {\n recid = bytes[0];\n format = \"compact\";\n bytes = bytes.subarray(1);\n }\n const L2 = Fn.BYTES;\n const r2 = bytes.subarray(0, L2);\n const s4 = bytes.subarray(L2, L2 * 2);\n return new Signature(Fn.fromBytes(r2), Fn.fromBytes(s4), recid);\n }\n static fromHex(hex, format) {\n return this.fromBytes(hexToBytes2(hex), format);\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(messageHash) {\n const FIELD_ORDER = Fp.ORDER;\n const { r: r2, s: s4, recovery: rec } = this;\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error(\"recovery id invalid\");\n const hasCofactor = CURVE_ORDER * _2n6 < FIELD_ORDER;\n if (hasCofactor && rec > 1)\n throw new Error(\"recovery id is ambiguous for h>1 curve\");\n const radj = rec === 2 || rec === 3 ? r2 + CURVE_ORDER : r2;\n if (!Fp.isValid(radj))\n throw new Error(\"recovery id 2 or 3 invalid\");\n const x4 = Fp.toBytes(radj);\n const R3 = Point3.fromBytes(concatBytes(pprefix((rec & 1) === 0), x4));\n const ir = Fn.inv(radj);\n const h4 = bits2int_modN(ensureBytes2(\"msgHash\", messageHash));\n const u1 = Fn.create(-h4 * ir);\n const u2 = Fn.create(s4 * ir);\n const Q2 = Point3.BASE.multiplyUnsafe(u1).add(R3.multiplyUnsafe(u2));\n if (Q2.is0())\n throw new Error(\"point at infinify\");\n Q2.assertValidity();\n return Q2;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n toBytes(format = defaultSigOpts_format) {\n validateSigFormat(format);\n if (format === \"der\")\n return hexToBytes2(DER2.hexFromSig(this));\n const r2 = Fn.toBytes(this.r);\n const s4 = Fn.toBytes(this.s);\n if (format === \"recovered\") {\n if (this.recovery == null)\n throw new Error(\"recovery bit must be present\");\n return concatBytes(Uint8Array.of(this.recovery), r2, s4);\n }\n return concatBytes(r2, s4);\n }\n toHex(format) {\n return bytesToHex2(this.toBytes(format));\n }\n // TODO: remove\n assertValidity() {\n }\n static fromCompact(hex) {\n return Signature.fromBytes(ensureBytes2(\"sig\", hex), \"compact\");\n }\n static fromDER(hex) {\n return Signature.fromBytes(ensureBytes2(\"sig\", hex), \"der\");\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, Fn.neg(this.s), this.recovery) : this;\n }\n toDERRawBytes() {\n return this.toBytes(\"der\");\n }\n toDERHex() {\n return bytesToHex2(this.toBytes(\"der\"));\n }\n toCompactRawBytes() {\n return this.toBytes(\"compact\");\n }\n toCompactHex() {\n return bytesToHex2(this.toBytes(\"compact\"));\n }\n }\n const bits2int = ecdsaOpts.bits2int || function bits2int_def(bytes) {\n if (bytes.length > 8192)\n throw new Error(\"input is too large\");\n const num2 = bytesToNumberBE2(bytes);\n const delta = bytes.length * 8 - fnBits;\n return delta > 0 ? num2 >> BigInt(delta) : num2;\n };\n const bits2int_modN = ecdsaOpts.bits2int_modN || function bits2int_modN_def(bytes) {\n return Fn.create(bits2int(bytes));\n };\n const ORDER_MASK = bitMask2(fnBits);\n function int2octets(num2) {\n aInRange2(\"num < 2^\" + fnBits, num2, _0n10, ORDER_MASK);\n return Fn.toBytes(num2);\n }\n function validateMsgAndHash(message2, prehash) {\n _abytes2(message2, void 0, \"message\");\n return prehash ? _abytes2(hash3(message2), void 0, \"prehashed message\") : message2;\n }\n function prepSig(message2, privateKey, opts) {\n if ([\"recovered\", \"canonical\"].some((k4) => k4 in opts))\n throw new Error(\"sign() legacy options not supported\");\n const { lowS, prehash, extraEntropy: extraEntropy2 } = validateSigOpts(opts, defaultSigOpts);\n message2 = validateMsgAndHash(message2, prehash);\n const h1int = bits2int_modN(message2);\n const d5 = _normFnElement(Fn, privateKey);\n const seedArgs = [int2octets(d5), int2octets(h1int)];\n if (extraEntropy2 != null && extraEntropy2 !== false) {\n const e2 = extraEntropy2 === true ? randomBytes2(lengths.secretKey) : extraEntropy2;\n seedArgs.push(ensureBytes2(\"extraEntropy\", e2));\n }\n const seed = concatBytes(...seedArgs);\n const m2 = h1int;\n function k2sig(kBytes) {\n const k4 = bits2int(kBytes);\n if (!Fn.isValidNot0(k4))\n return;\n const ik = Fn.inv(k4);\n const q3 = Point3.BASE.multiply(k4).toAffine();\n const r2 = Fn.create(q3.x);\n if (r2 === _0n10)\n return;\n const s4 = Fn.create(ik * Fn.create(m2 + r2 * d5));\n if (s4 === _0n10)\n return;\n let recovery = (q3.x === r2 ? 0 : 2) | Number(q3.y & _1n10);\n let normS = s4;\n if (lowS && isBiggerThanHalfOrder(s4)) {\n normS = Fn.neg(s4);\n recovery ^= 1;\n }\n return new Signature(r2, normS, recovery);\n }\n return { seed, k2sig };\n }\n function sign4(message2, secretKey, opts = {}) {\n message2 = ensureBytes2(\"message\", message2);\n const { seed, k2sig } = prepSig(message2, secretKey, opts);\n const drbg = createHmacDrbg2(hash3.outputLen, Fn.BYTES, hmac2);\n const sig = drbg(seed, k2sig);\n return sig;\n }\n function tryParsingSig(sg) {\n let sig = void 0;\n const isHex2 = typeof sg === \"string\" || isBytes(sg);\n const isObj = !isHex2 && sg !== null && typeof sg === \"object\" && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\";\n if (!isHex2 && !isObj)\n throw new Error(\"invalid signature, expected Uint8Array, hex string or Signature instance\");\n if (isObj) {\n sig = new Signature(sg.r, sg.s);\n } else if (isHex2) {\n try {\n sig = Signature.fromBytes(ensureBytes2(\"sig\", sg), \"der\");\n } catch (derError) {\n if (!(derError instanceof DER2.Err))\n throw derError;\n }\n if (!sig) {\n try {\n sig = Signature.fromBytes(ensureBytes2(\"sig\", sg), \"compact\");\n } catch (error) {\n return false;\n }\n }\n }\n if (!sig)\n return false;\n return sig;\n }\n function verify2(signature, message2, publicKey, opts = {}) {\n const { lowS, prehash, format } = validateSigOpts(opts, defaultSigOpts);\n publicKey = ensureBytes2(\"publicKey\", publicKey);\n message2 = validateMsgAndHash(ensureBytes2(\"message\", message2), prehash);\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n const sig = format === void 0 ? tryParsingSig(signature) : Signature.fromBytes(ensureBytes2(\"sig\", signature), format);\n if (sig === false)\n return false;\n try {\n const P2 = Point3.fromBytes(publicKey);\n if (lowS && sig.hasHighS())\n return false;\n const { r: r2, s: s4 } = sig;\n const h4 = bits2int_modN(message2);\n const is = Fn.inv(s4);\n const u1 = Fn.create(h4 * is);\n const u2 = Fn.create(r2 * is);\n const R3 = Point3.BASE.multiplyUnsafe(u1).add(P2.multiplyUnsafe(u2));\n if (R3.is0())\n return false;\n const v2 = Fn.create(R3.x);\n return v2 === r2;\n } catch (e2) {\n return false;\n }\n }\n function recoverPublicKey3(signature, message2, opts = {}) {\n const { prehash } = validateSigOpts(opts, defaultSigOpts);\n message2 = validateMsgAndHash(message2, prehash);\n return Signature.fromBytes(signature, \"recovered\").recoverPublicKey(message2).toBytes();\n }\n return Object.freeze({\n keygen,\n getPublicKey,\n getSharedSecret,\n utils,\n lengths,\n Point: Point3,\n sign: sign4,\n verify: verify2,\n recoverPublicKey: recoverPublicKey3,\n Signature,\n hash: hash3\n });\n }\n function _weierstrass_legacy_opts_to_new(c4) {\n const CURVE = {\n a: c4.a,\n b: c4.b,\n p: c4.Fp.ORDER,\n n: c4.n,\n h: c4.h,\n Gx: c4.Gx,\n Gy: c4.Gy\n };\n const Fp = c4.Fp;\n let allowedLengths = c4.allowedPrivateKeyLengths ? Array.from(new Set(c4.allowedPrivateKeyLengths.map((l6) => Math.ceil(l6 / 2)))) : void 0;\n const Fn = Field2(CURVE.n, {\n BITS: c4.nBitLength,\n allowedLengths,\n modFromBytes: c4.wrapPrivateKey\n });\n const curveOpts = {\n Fp,\n Fn,\n allowInfinityPoint: c4.allowInfinityPoint,\n endo: c4.endo,\n isTorsionFree: c4.isTorsionFree,\n clearCofactor: c4.clearCofactor,\n fromBytes: c4.fromBytes,\n toBytes: c4.toBytes\n };\n return { CURVE, curveOpts };\n }\n function _ecdsa_legacy_opts_to_new(c4) {\n const { CURVE, curveOpts } = _weierstrass_legacy_opts_to_new(c4);\n const ecdsaOpts = {\n hmac: c4.hmac,\n randomBytes: c4.randomBytes,\n lowS: c4.lowS,\n bits2int: c4.bits2int,\n bits2int_modN: c4.bits2int_modN\n };\n return { CURVE, curveOpts, hash: c4.hash, ecdsaOpts };\n }\n function _ecdsa_new_output_to_legacy(c4, _ecdsa) {\n const Point3 = _ecdsa.Point;\n return Object.assign({}, _ecdsa, {\n ProjectivePoint: Point3,\n CURVE: Object.assign({}, c4, nLength2(Point3.Fn.ORDER, Point3.Fn.BITS))\n });\n }\n function weierstrass2(c4) {\n const { CURVE, curveOpts, hash: hash3, ecdsaOpts } = _ecdsa_legacy_opts_to_new(c4);\n const Point3 = weierstrassN(CURVE, curveOpts);\n const signs = ecdsa(Point3, hash3, ecdsaOpts);\n return _ecdsa_new_output_to_legacy(c4, signs);\n }\n var divNearest2, DERErr2, DER2, _0n10, _1n10, _2n6, _3n4, _4n4;\n var init_weierstrass2 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/weierstrass.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hmac();\n init_utils3();\n init_utils8();\n init_curve2();\n init_modular2();\n divNearest2 = (num2, den) => (num2 + (num2 >= 0 ? den : -den) / _2n6) / den;\n DERErr2 = class extends Error {\n constructor(m2 = \"\") {\n super(m2);\n }\n };\n DER2 = {\n // asn.1 DER encoding utils\n Err: DERErr2,\n // Basic building block is TLV (Tag-Length-Value)\n _tlv: {\n encode: (tag, data) => {\n const { Err: E2 } = DER2;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length & 1)\n throw new E2(\"tlv.encode: unpadded data\");\n const dataLen = data.length / 2;\n const len = numberToHexUnpadded2(dataLen);\n if (len.length / 2 & 128)\n throw new E2(\"tlv.encode: long form length too big\");\n const lenLen = dataLen > 127 ? numberToHexUnpadded2(len.length / 2 | 128) : \"\";\n const t3 = numberToHexUnpadded2(tag);\n return t3 + lenLen + len + data;\n },\n // v - value, l - left bytes (unparsed)\n decode(tag, data) {\n const { Err: E2 } = DER2;\n let pos = 0;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length < 2 || data[pos++] !== tag)\n throw new E2(\"tlv.decode: wrong tlv\");\n const first = data[pos++];\n const isLong = !!(first & 128);\n let length = 0;\n if (!isLong)\n length = first;\n else {\n const lenLen = first & 127;\n if (!lenLen)\n throw new E2(\"tlv.decode(long): indefinite length not supported\");\n if (lenLen > 4)\n throw new E2(\"tlv.decode(long): byte length is too big\");\n const lengthBytes = data.subarray(pos, pos + lenLen);\n if (lengthBytes.length !== lenLen)\n throw new E2(\"tlv.decode: length bytes not complete\");\n if (lengthBytes[0] === 0)\n throw new E2(\"tlv.decode(long): zero leftmost byte\");\n for (const b4 of lengthBytes)\n length = length << 8 | b4;\n pos += lenLen;\n if (length < 128)\n throw new E2(\"tlv.decode(long): not minimal encoding\");\n }\n const v2 = data.subarray(pos, pos + length);\n if (v2.length !== length)\n throw new E2(\"tlv.decode: wrong value length\");\n return { v: v2, l: data.subarray(pos + length) };\n }\n },\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n _int: {\n encode(num2) {\n const { Err: E2 } = DER2;\n if (num2 < _0n10)\n throw new E2(\"integer: negative integers are not allowed\");\n let hex = numberToHexUnpadded2(num2);\n if (Number.parseInt(hex[0], 16) & 8)\n hex = \"00\" + hex;\n if (hex.length & 1)\n throw new E2(\"unexpected DER parsing assertion: unpadded hex\");\n return hex;\n },\n decode(data) {\n const { Err: E2 } = DER2;\n if (data[0] & 128)\n throw new E2(\"invalid signature integer: negative\");\n if (data[0] === 0 && !(data[1] & 128))\n throw new E2(\"invalid signature integer: unnecessary leading zero\");\n return bytesToNumberBE2(data);\n }\n },\n toSig(hex) {\n const { Err: E2, _int: int, _tlv: tlv } = DER2;\n const data = ensureBytes2(\"signature\", hex);\n const { v: seqBytes, l: seqLeftBytes } = tlv.decode(48, data);\n if (seqLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n const { v: rBytes, l: rLeftBytes } = tlv.decode(2, seqBytes);\n const { v: sBytes, l: sLeftBytes } = tlv.decode(2, rLeftBytes);\n if (sLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n return { r: int.decode(rBytes), s: int.decode(sBytes) };\n },\n hexFromSig(sig) {\n const { _tlv: tlv, _int: int } = DER2;\n const rs = tlv.encode(2, int.encode(sig.r));\n const ss = tlv.encode(2, int.encode(sig.s));\n const seq = rs + ss;\n return tlv.encode(48, seq);\n }\n };\n _0n10 = BigInt(0);\n _1n10 = BigInt(1);\n _2n6 = BigInt(2);\n _3n4 = BigInt(3);\n _4n4 = BigInt(4);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/_shortw_utils.js\n function createCurve2(curveDef, defHash) {\n const create2 = (hash3) => weierstrass2({ ...curveDef, hash: hash3 });\n return { ...create2(defHash), create: create2 };\n }\n var init_shortw_utils2 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/_shortw_utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_weierstrass2();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/secp256k1.js\n function sqrtMod2(y6) {\n const P2 = secp256k1_CURVE.p;\n const _3n5 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b22 = y6 * y6 * y6 % P2;\n const b32 = b22 * b22 * y6 % P2;\n const b6 = pow22(b32, _3n5, P2) * b32 % P2;\n const b9 = pow22(b6, _3n5, P2) * b32 % P2;\n const b11 = pow22(b9, _2n7, P2) * b22 % P2;\n const b222 = pow22(b11, _11n, P2) * b11 % P2;\n const b44 = pow22(b222, _22n, P2) * b222 % P2;\n const b88 = pow22(b44, _44n, P2) * b44 % P2;\n const b176 = pow22(b88, _88n, P2) * b88 % P2;\n const b220 = pow22(b176, _44n, P2) * b44 % P2;\n const b223 = pow22(b220, _3n5, P2) * b32 % P2;\n const t1 = pow22(b223, _23n, P2) * b222 % P2;\n const t22 = pow22(t1, _6n, P2) * b22 % P2;\n const root = pow22(t22, _2n7, P2);\n if (!Fpk12.eql(Fpk12.sqr(root), y6))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n var secp256k1_CURVE, secp256k1_ENDO, _2n7, Fpk12, secp256k12;\n var init_secp256k12 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/secp256k1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha2();\n init_shortw_utils2();\n init_modular2();\n secp256k1_CURVE = {\n p: BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),\n n: BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),\n h: BigInt(1),\n a: BigInt(0),\n b: BigInt(7),\n Gx: BigInt(\"0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\"),\n Gy: BigInt(\"0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\")\n };\n secp256k1_ENDO = {\n beta: BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),\n basises: [\n [BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"), -BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\")],\n [BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"), BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\")]\n ]\n };\n _2n7 = /* @__PURE__ */ BigInt(2);\n Fpk12 = Field2(secp256k1_CURVE.p, { sqrt: sqrtMod2 });\n secp256k12 = createCurve2({ ...secp256k1_CURVE, Fp: Fpk12, lowS: true, endo: secp256k1_ENDO }, sha256);\n }\n });\n\n // ../../../node_modules/.pnpm/@scure+base@1.2.6/node_modules/@scure/base/lib/esm/index.js\n function isBytes4(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function isArrayOf(isString, arr) {\n if (!Array.isArray(arr))\n return false;\n if (arr.length === 0)\n return true;\n if (isString) {\n return arr.every((item) => typeof item === \"string\");\n } else {\n return arr.every((item) => Number.isSafeInteger(item));\n }\n }\n function afn(input) {\n if (typeof input !== \"function\")\n throw new Error(\"function expected\");\n return true;\n }\n function astr(label, input) {\n if (typeof input !== \"string\")\n throw new Error(`${label}: string expected`);\n return true;\n }\n function anumber2(n2) {\n if (!Number.isSafeInteger(n2))\n throw new Error(`invalid integer: ${n2}`);\n }\n function aArr(input) {\n if (!Array.isArray(input))\n throw new Error(\"array expected\");\n }\n function astrArr(label, input) {\n if (!isArrayOf(true, input))\n throw new Error(`${label}: array of strings expected`);\n }\n function anumArr(label, input) {\n if (!isArrayOf(false, input))\n throw new Error(`${label}: array of numbers expected`);\n }\n // @__NO_SIDE_EFFECTS__\n function chain(...args) {\n const id = (a3) => a3;\n const wrap5 = (a3, b4) => (c4) => a3(b4(c4));\n const encode7 = args.map((x4) => x4.encode).reduceRight(wrap5, id);\n const decode4 = args.map((x4) => x4.decode).reduce(wrap5, id);\n return { encode: encode7, decode: decode4 };\n }\n // @__NO_SIDE_EFFECTS__\n function alphabet(letters) {\n const lettersA = typeof letters === \"string\" ? letters.split(\"\") : letters;\n const len = lettersA.length;\n astrArr(\"alphabet\", lettersA);\n const indexes = new Map(lettersA.map((l6, i3) => [l6, i3]));\n return {\n encode: (digits) => {\n aArr(digits);\n return digits.map((i3) => {\n if (!Number.isSafeInteger(i3) || i3 < 0 || i3 >= len)\n throw new Error(`alphabet.encode: digit index outside alphabet \"${i3}\". Allowed: ${letters}`);\n return lettersA[i3];\n });\n },\n decode: (input) => {\n aArr(input);\n return input.map((letter) => {\n astr(\"alphabet.decode\", letter);\n const i3 = indexes.get(letter);\n if (i3 === void 0)\n throw new Error(`Unknown letter: \"${letter}\". Allowed: ${letters}`);\n return i3;\n });\n }\n };\n }\n // @__NO_SIDE_EFFECTS__\n function join(separator = \"\") {\n astr(\"join\", separator);\n return {\n encode: (from14) => {\n astrArr(\"join.decode\", from14);\n return from14.join(separator);\n },\n decode: (to) => {\n astr(\"join.decode\", to);\n return to.split(separator);\n }\n };\n }\n function convertRadix(data, from14, to) {\n if (from14 < 2)\n throw new Error(`convertRadix: invalid from=${from14}, base cannot be less than 2`);\n if (to < 2)\n throw new Error(`convertRadix: invalid to=${to}, base cannot be less than 2`);\n aArr(data);\n if (!data.length)\n return [];\n let pos = 0;\n const res = [];\n const digits = Array.from(data, (d5) => {\n anumber2(d5);\n if (d5 < 0 || d5 >= from14)\n throw new Error(`invalid integer: ${d5}`);\n return d5;\n });\n const dlen = digits.length;\n while (true) {\n let carry = 0;\n let done = true;\n for (let i3 = pos; i3 < dlen; i3++) {\n const digit = digits[i3];\n const fromCarry = from14 * carry;\n const digitBase = fromCarry + digit;\n if (!Number.isSafeInteger(digitBase) || fromCarry / from14 !== carry || digitBase - digit !== fromCarry) {\n throw new Error(\"convertRadix: carry overflow\");\n }\n const div = digitBase / to;\n carry = digitBase % to;\n const rounded = Math.floor(div);\n digits[i3] = rounded;\n if (!Number.isSafeInteger(rounded) || rounded * to + carry !== digitBase)\n throw new Error(\"convertRadix: carry overflow\");\n if (!done)\n continue;\n else if (!rounded)\n pos = i3;\n else\n done = false;\n }\n res.push(carry);\n if (done)\n break;\n }\n for (let i3 = 0; i3 < data.length - 1 && data[i3] === 0; i3++)\n res.push(0);\n return res.reverse();\n }\n // @__NO_SIDE_EFFECTS__\n function radix(num2) {\n anumber2(num2);\n const _256 = 2 ** 8;\n return {\n encode: (bytes) => {\n if (!isBytes4(bytes))\n throw new Error(\"radix.encode input should be Uint8Array\");\n return convertRadix(Array.from(bytes), _256, num2);\n },\n decode: (digits) => {\n anumArr(\"radix.decode\", digits);\n return Uint8Array.from(convertRadix(digits, num2, _256));\n }\n };\n }\n function checksum3(len, fn) {\n anumber2(len);\n afn(fn);\n return {\n encode(data) {\n if (!isBytes4(data))\n throw new Error(\"checksum.encode: input should be Uint8Array\");\n const sum = fn(data).slice(0, len);\n const res = new Uint8Array(data.length + len);\n res.set(data);\n res.set(sum, data.length);\n return res;\n },\n decode(data) {\n if (!isBytes4(data))\n throw new Error(\"checksum.decode: input should be Uint8Array\");\n const payload = data.slice(0, -len);\n const oldChecksum = data.slice(-len);\n const newChecksum = fn(payload).slice(0, len);\n for (let i3 = 0; i3 < len; i3++)\n if (newChecksum[i3] !== oldChecksum[i3])\n throw new Error(\"Invalid checksum\");\n return payload;\n }\n };\n }\n var genBase58, base58, createBase58check;\n var init_esm2 = __esm({\n \"../../../node_modules/.pnpm/@scure+base@1.2.6/node_modules/@scure/base/lib/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n genBase58 = /* @__NO_SIDE_EFFECTS__ */ (abc) => /* @__PURE__ */ chain(/* @__PURE__ */ radix(58), /* @__PURE__ */ alphabet(abc), /* @__PURE__ */ join(\"\"));\n base58 = /* @__PURE__ */ genBase58(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\");\n createBase58check = (sha2564) => /* @__PURE__ */ chain(checksum3(4, (data) => sha2564(sha2564(data))), base58);\n }\n });\n\n // ../../../node_modules/.pnpm/@scure+bip32@1.7.0/node_modules/@scure/bip32/lib/esm/index.js\n function bytesToNumber2(bytes) {\n abytes(bytes);\n const h4 = bytes.length === 0 ? \"0\" : bytesToHex2(bytes);\n return BigInt(\"0x\" + h4);\n }\n function numberToBytes2(num2) {\n if (typeof num2 !== \"bigint\")\n throw new Error(\"bigint expected\");\n return hexToBytes2(num2.toString(16).padStart(64, \"0\"));\n }\n var Point2, base58check, MASTER_SECRET, BITCOIN_VERSIONS, HARDENED_OFFSET, hash160, fromU32, toU32, HDKey;\n var init_esm3 = __esm({\n \"../../../node_modules/.pnpm/@scure+bip32@1.7.0/node_modules/@scure/bip32/lib/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_modular2();\n init_secp256k12();\n init_hmac();\n init_legacy();\n init_sha2();\n init_utils3();\n init_esm2();\n Point2 = secp256k12.ProjectivePoint;\n base58check = createBase58check(sha256);\n MASTER_SECRET = utf8ToBytes(\"Bitcoin seed\");\n BITCOIN_VERSIONS = { private: 76066276, public: 76067358 };\n HARDENED_OFFSET = 2147483648;\n hash160 = (data) => ripemd160(sha256(data));\n fromU32 = (data) => createView(data).getUint32(0, false);\n toU32 = (n2) => {\n if (!Number.isSafeInteger(n2) || n2 < 0 || n2 > 2 ** 32 - 1) {\n throw new Error(\"invalid number, should be from 0 to 2**32-1, got \" + n2);\n }\n const buf = new Uint8Array(4);\n createView(buf).setUint32(0, n2, false);\n return buf;\n };\n HDKey = class _HDKey {\n get fingerprint() {\n if (!this.pubHash) {\n throw new Error(\"No publicKey set!\");\n }\n return fromU32(this.pubHash);\n }\n get identifier() {\n return this.pubHash;\n }\n get pubKeyHash() {\n return this.pubHash;\n }\n get privateKey() {\n return this.privKeyBytes || null;\n }\n get publicKey() {\n return this.pubKey || null;\n }\n get privateExtendedKey() {\n const priv = this.privateKey;\n if (!priv) {\n throw new Error(\"No private key\");\n }\n return base58check.encode(this.serialize(this.versions.private, concatBytes(new Uint8Array([0]), priv)));\n }\n get publicExtendedKey() {\n if (!this.pubKey) {\n throw new Error(\"No public key\");\n }\n return base58check.encode(this.serialize(this.versions.public, this.pubKey));\n }\n static fromMasterSeed(seed, versions2 = BITCOIN_VERSIONS) {\n abytes(seed);\n if (8 * seed.length < 128 || 8 * seed.length > 512) {\n throw new Error(\"HDKey: seed length must be between 128 and 512 bits; 256 bits is advised, got \" + seed.length);\n }\n const I2 = hmac(sha512, MASTER_SECRET, seed);\n return new _HDKey({\n versions: versions2,\n chainCode: I2.slice(32),\n privateKey: I2.slice(0, 32)\n });\n }\n static fromExtendedKey(base58key, versions2 = BITCOIN_VERSIONS) {\n const keyBuffer = base58check.decode(base58key);\n const keyView = createView(keyBuffer);\n const version7 = keyView.getUint32(0, false);\n const opt = {\n versions: versions2,\n depth: keyBuffer[4],\n parentFingerprint: keyView.getUint32(5, false),\n index: keyView.getUint32(9, false),\n chainCode: keyBuffer.slice(13, 45)\n };\n const key = keyBuffer.slice(45);\n const isPriv = key[0] === 0;\n if (version7 !== versions2[isPriv ? \"private\" : \"public\"]) {\n throw new Error(\"Version mismatch\");\n }\n if (isPriv) {\n return new _HDKey({ ...opt, privateKey: key.slice(1) });\n } else {\n return new _HDKey({ ...opt, publicKey: key });\n }\n }\n static fromJSON(json) {\n return _HDKey.fromExtendedKey(json.xpriv);\n }\n constructor(opt) {\n this.depth = 0;\n this.index = 0;\n this.chainCode = null;\n this.parentFingerprint = 0;\n if (!opt || typeof opt !== \"object\") {\n throw new Error(\"HDKey.constructor must not be called directly\");\n }\n this.versions = opt.versions || BITCOIN_VERSIONS;\n this.depth = opt.depth || 0;\n this.chainCode = opt.chainCode || null;\n this.index = opt.index || 0;\n this.parentFingerprint = opt.parentFingerprint || 0;\n if (!this.depth) {\n if (this.parentFingerprint || this.index) {\n throw new Error(\"HDKey: zero depth with non-zero index/parent fingerprint\");\n }\n }\n if (opt.publicKey && opt.privateKey) {\n throw new Error(\"HDKey: publicKey and privateKey at same time.\");\n }\n if (opt.privateKey) {\n if (!secp256k12.utils.isValidPrivateKey(opt.privateKey)) {\n throw new Error(\"Invalid private key\");\n }\n this.privKey = typeof opt.privateKey === \"bigint\" ? opt.privateKey : bytesToNumber2(opt.privateKey);\n this.privKeyBytes = numberToBytes2(this.privKey);\n this.pubKey = secp256k12.getPublicKey(opt.privateKey, true);\n } else if (opt.publicKey) {\n this.pubKey = Point2.fromHex(opt.publicKey).toRawBytes(true);\n } else {\n throw new Error(\"HDKey: no public or private key provided\");\n }\n this.pubHash = hash160(this.pubKey);\n }\n derive(path) {\n if (!/^[mM]'?/.test(path)) {\n throw new Error('Path must start with \"m\" or \"M\"');\n }\n if (/^[mM]'?$/.test(path)) {\n return this;\n }\n const parts = path.replace(/^[mM]'?\\//, \"\").split(\"/\");\n let child = this;\n for (const c4 of parts) {\n const m2 = /^(\\d+)('?)$/.exec(c4);\n const m1 = m2 && m2[1];\n if (!m2 || m2.length !== 3 || typeof m1 !== \"string\")\n throw new Error(\"invalid child index: \" + c4);\n let idx = +m1;\n if (!Number.isSafeInteger(idx) || idx >= HARDENED_OFFSET) {\n throw new Error(\"Invalid index\");\n }\n if (m2[2] === \"'\") {\n idx += HARDENED_OFFSET;\n }\n child = child.deriveChild(idx);\n }\n return child;\n }\n deriveChild(index2) {\n if (!this.pubKey || !this.chainCode) {\n throw new Error(\"No publicKey or chainCode set\");\n }\n let data = toU32(index2);\n if (index2 >= HARDENED_OFFSET) {\n const priv = this.privateKey;\n if (!priv) {\n throw new Error(\"Could not derive hardened child key\");\n }\n data = concatBytes(new Uint8Array([0]), priv, data);\n } else {\n data = concatBytes(this.pubKey, data);\n }\n const I2 = hmac(sha512, this.chainCode, data);\n const childTweak = bytesToNumber2(I2.slice(0, 32));\n const chainCode = I2.slice(32);\n if (!secp256k12.utils.isValidPrivateKey(childTweak)) {\n throw new Error(\"Tweak bigger than curve order\");\n }\n const opt = {\n versions: this.versions,\n chainCode,\n depth: this.depth + 1,\n parentFingerprint: this.fingerprint,\n index: index2\n };\n try {\n if (this.privateKey) {\n const added = mod2(this.privKey + childTweak, secp256k12.CURVE.n);\n if (!secp256k12.utils.isValidPrivateKey(added)) {\n throw new Error(\"The tweak was out of range or the resulted private key is invalid\");\n }\n opt.privateKey = added;\n } else {\n const added = Point2.fromHex(this.pubKey).add(Point2.fromPrivateKey(childTweak));\n if (added.equals(Point2.ZERO)) {\n throw new Error(\"The tweak was equal to negative P, which made the result key invalid\");\n }\n opt.publicKey = added.toRawBytes(true);\n }\n return new _HDKey(opt);\n } catch (err) {\n return this.deriveChild(index2 + 1);\n }\n }\n sign(hash3) {\n if (!this.privateKey) {\n throw new Error(\"No privateKey set!\");\n }\n abytes(hash3, 32);\n return secp256k12.sign(hash3, this.privKey).toCompactRawBytes();\n }\n verify(hash3, signature) {\n abytes(hash3, 32);\n abytes(signature, 64);\n if (!this.publicKey) {\n throw new Error(\"No publicKey set!\");\n }\n let sig;\n try {\n sig = secp256k12.Signature.fromCompact(signature);\n } catch (error) {\n return false;\n }\n return secp256k12.verify(sig, hash3, this.publicKey);\n }\n wipePrivateData() {\n this.privKey = void 0;\n if (this.privKeyBytes) {\n this.privKeyBytes.fill(0);\n this.privKeyBytes = void 0;\n }\n return this;\n }\n toJSON() {\n return {\n xpriv: this.privateExtendedKey,\n xpub: this.publicExtendedKey\n };\n }\n serialize(version7, key) {\n if (!this.chainCode) {\n throw new Error(\"No chainCode set\");\n }\n abytes(key, 33);\n return concatBytes(toU32(version7), new Uint8Array([this.depth]), toU32(this.parentFingerprint), toU32(this.index), this.chainCode, key);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/pbkdf2.js\n function pbkdf2Init(hash3, _password, _salt, _opts) {\n ahash(hash3);\n const opts = checkOpts({ dkLen: 32, asyncTick: 10 }, _opts);\n const { c: c4, dkLen, asyncTick } = opts;\n anumber(c4);\n anumber(dkLen);\n anumber(asyncTick);\n if (c4 < 1)\n throw new Error(\"iterations (c) should be >= 1\");\n const password = kdfInputToBytes(_password);\n const salt = kdfInputToBytes(_salt);\n const DK = new Uint8Array(dkLen);\n const PRF = hmac.create(hash3, password);\n const PRFSalt = PRF._cloneInto().update(salt);\n return { c: c4, dkLen, asyncTick, DK, PRF, PRFSalt };\n }\n function pbkdf2Output(PRF, PRFSalt, DK, prfW, u2) {\n PRF.destroy();\n PRFSalt.destroy();\n if (prfW)\n prfW.destroy();\n clean(u2);\n return DK;\n }\n function pbkdf2(hash3, password, salt, opts) {\n const { c: c4, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash3, password, salt, opts);\n let prfW;\n const arr = new Uint8Array(4);\n const view = createView(arr);\n const u2 = new Uint8Array(PRF.outputLen);\n for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n const Ti = DK.subarray(pos, pos + PRF.outputLen);\n view.setInt32(0, ti, false);\n (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u2);\n Ti.set(u2.subarray(0, Ti.length));\n for (let ui = 1; ui < c4; ui++) {\n PRF._cloneInto(prfW).update(u2).digestInto(u2);\n for (let i3 = 0; i3 < Ti.length; i3++)\n Ti[i3] ^= u2[i3];\n }\n }\n return pbkdf2Output(PRF, PRFSalt, DK, prfW, u2);\n }\n var init_pbkdf2 = __esm({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/pbkdf2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hmac();\n init_utils3();\n }\n });\n\n // ../../../node_modules/.pnpm/@scure+bip39@1.6.0/node_modules/@scure/bip39/esm/index.js\n function nfkd(str) {\n if (typeof str !== \"string\")\n throw new TypeError(\"invalid mnemonic type: \" + typeof str);\n return str.normalize(\"NFKD\");\n }\n function normalize(str) {\n const norm = nfkd(str);\n const words = norm.split(\" \");\n if (![12, 15, 18, 21, 24].includes(words.length))\n throw new Error(\"Invalid mnemonic\");\n return { nfkd: norm, words };\n }\n function mnemonicToSeedSync(mnemonic, passphrase = \"\") {\n return pbkdf2(sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 });\n }\n var psalt;\n var init_esm4 = __esm({\n \"../../../node_modules/.pnpm/@scure+bip39@1.6.0/node_modules/@scure/bip39/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_pbkdf2();\n init_sha2();\n psalt = (passphrase) => nfkd(\"mnemonic\" + passphrase);\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/generatePrivateKey.js\n function generatePrivateKey() {\n return toHex(secp256k1.utils.randomPrivateKey());\n }\n var init_generatePrivateKey = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/generatePrivateKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_toHex();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/toAccount.js\n function toAccount(source) {\n if (typeof source === \"string\") {\n if (!isAddress(source, { strict: false }))\n throw new InvalidAddressError({ address: source });\n return {\n address: source,\n type: \"json-rpc\"\n };\n }\n if (!isAddress(source.address, { strict: false }))\n throw new InvalidAddressError({ address: source.address });\n return {\n address: source.address,\n nonceManager: source.nonceManager,\n sign: source.sign,\n signAuthorization: source.signAuthorization,\n signMessage: source.signMessage,\n signTransaction: source.signTransaction,\n signTypedData: source.signTypedData,\n source: \"custom\",\n type: \"local\"\n };\n }\n var init_toAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/toAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_isAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/sign.js\n async function sign2({ hash: hash3, privateKey, to = \"object\" }) {\n const { r: r2, s: s4, recovery } = secp256k1.sign(hash3.slice(2), privateKey.slice(2), {\n lowS: true,\n extraEntropy: isHex(extraEntropy, { strict: false }) ? hexToBytes(extraEntropy) : extraEntropy\n });\n const signature = {\n r: numberToHex(r2, { size: 32 }),\n s: numberToHex(s4, { size: 32 }),\n v: recovery ? 28n : 27n,\n yParity: recovery\n };\n return (() => {\n if (to === \"bytes\" || to === \"hex\")\n return serializeSignature({ ...signature, to });\n return signature;\n })();\n }\n var extraEntropy;\n var init_sign6 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/sign.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_isHex();\n init_toBytes();\n init_toHex();\n init_serializeSignature();\n extraEntropy = false;\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signAuthorization.js\n async function signAuthorization(parameters) {\n const { chainId, nonce, privateKey, to = \"object\" } = parameters;\n const address = parameters.contractAddress ?? parameters.address;\n const signature = await sign2({\n hash: hashAuthorization({ address, chainId, nonce }),\n privateKey,\n to\n });\n if (to === \"object\")\n return {\n address,\n chainId,\n nonce,\n ...signature\n };\n return signature;\n }\n var init_signAuthorization = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signAuthorization.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashAuthorization();\n init_sign6();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signMessage.js\n async function signMessage({ message: message2, privateKey }) {\n return await sign2({ hash: hashMessage(message2), privateKey, to: \"hex\" });\n }\n var init_signMessage = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashMessage();\n init_sign6();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signTransaction.js\n async function signTransaction(parameters) {\n const { privateKey, transaction, serializer = serializeTransaction } = parameters;\n const signableTransaction = (() => {\n if (transaction.type === \"eip4844\")\n return {\n ...transaction,\n sidecars: false\n };\n return transaction;\n })();\n const signature = await sign2({\n hash: keccak256(await serializer(signableTransaction)),\n privateKey\n });\n return await serializer(transaction, signature);\n }\n var init_signTransaction = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_keccak256();\n init_serializeTransaction();\n init_sign6();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signTypedData.js\n async function signTypedData(parameters) {\n const { privateKey, ...typedData } = parameters;\n return await sign2({\n hash: hashTypedData(typedData),\n privateKey,\n to: \"hex\"\n });\n }\n var init_signTypedData = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/utils/signTypedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_hashTypedData();\n init_sign6();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/privateKeyToAccount.js\n function privateKeyToAccount(privateKey, options = {}) {\n const { nonceManager } = options;\n const publicKey = toHex(secp256k1.getPublicKey(privateKey.slice(2), false));\n const address = publicKeyToAddress(publicKey);\n const account = toAccount({\n address,\n nonceManager,\n async sign({ hash: hash3 }) {\n return sign2({ hash: hash3, privateKey, to: \"hex\" });\n },\n async signAuthorization(authorization) {\n return signAuthorization({ ...authorization, privateKey });\n },\n async signMessage({ message: message2 }) {\n return signMessage({ message: message2, privateKey });\n },\n async signTransaction(transaction, { serializer } = {}) {\n return signTransaction({ privateKey, transaction, serializer });\n },\n async signTypedData(typedData) {\n return signTypedData({ ...typedData, privateKey });\n }\n });\n return {\n ...account,\n publicKey,\n source: \"privateKey\"\n };\n }\n var init_privateKeyToAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/privateKeyToAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_secp256k1();\n init_toHex();\n init_toAccount();\n init_publicKeyToAddress();\n init_sign6();\n init_signAuthorization();\n init_signMessage();\n init_signTransaction();\n init_signTypedData();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/hdKeyToAccount.js\n function hdKeyToAccount(hdKey_, { accountIndex = 0, addressIndex = 0, changeIndex = 0, path, ...options } = {}) {\n const hdKey = hdKey_.derive(path || `m/44'/60'/${accountIndex}'/${changeIndex}/${addressIndex}`);\n const account = privateKeyToAccount(toHex(hdKey.privateKey), options);\n return {\n ...account,\n getHdKey: () => hdKey,\n source: \"hd\"\n };\n }\n var init_hdKeyToAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/hdKeyToAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_toHex();\n init_privateKeyToAccount();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/mnemonicToAccount.js\n function mnemonicToAccount(mnemonic, opts = {}) {\n const seed = mnemonicToSeedSync(mnemonic);\n return hdKeyToAccount(HDKey.fromMasterSeed(seed), opts);\n }\n var init_mnemonicToAccount = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/mnemonicToAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm3();\n init_esm4();\n init_hdKeyToAccount();\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/index.js\n var init_accounts = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/accounts/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_generatePrivateKey();\n init_mnemonicToAccount();\n init_privateKeyToAccount();\n init_toAccount();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/version.js\n var VERSION;\n var init_version5 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n VERSION = \"4.62.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/base.js\n var BaseError4;\n var init_base2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_version5();\n BaseError4 = class _BaseError extends BaseError2 {\n constructor(shortMessage, args = {}) {\n super(shortMessage, args);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AASDKError\"\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: VERSION\n });\n const docsPath8 = args.cause instanceof _BaseError ? args.cause.docsPath || args.docsPath : args.docsPath;\n this.message = [\n shortMessage || \"An error occurred.\",\n \"\",\n ...args.metaMessages ? [...args.metaMessages, \"\"] : [],\n ...docsPath8 ? [\n `Docs: https://www.alchemy.com/docs/wallets${docsPath8}${args.docsSlug ? `#${args.docsSlug}` : \"\"}`\n ] : [],\n ...this.details ? [`Details: ${this.details}`] : [],\n `Version: ${this.version}`\n ].join(\"\\n\");\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/client.js\n var IncompatibleClientError, InvalidRpcUrlError, ChainNotFoundError2, InvalidEntityIdError, InvalidNonceKeyError, EntityIdOverrideError, InvalidModularAccountV2Mode, InvalidDeferredActionNonce;\n var init_client = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/client.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n IncompatibleClientError = class extends BaseError4 {\n /**\n * Throws an error when the client type does not match the expected client type.\n *\n * @param {string} expectedClient The expected type of the client.\n * @param {string} method The method that was called.\n * @param {Client} client The client instance.\n */\n constructor(expectedClient, method, client) {\n super([\n `Client of type (${client.type}) is not a ${expectedClient}.`,\n `Create one with \\`createSmartAccountClient\\` first before using \\`${method}\\``\n ].join(\"\\n\"));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"IncompatibleClientError\"\n });\n }\n };\n InvalidRpcUrlError = class extends BaseError4 {\n /**\n * Creates an instance of an error with a message indicating an invalid RPC URL.\n *\n * @param {string} [rpcUrl] The invalid RPC URL that caused the error\n */\n constructor(rpcUrl) {\n super(`Invalid RPC URL ${rpcUrl}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidRpcUrlError\"\n });\n }\n };\n ChainNotFoundError2 = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that no chain was supplied to the client.\n */\n constructor() {\n super(\"No chain supplied to the client\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"ChainNotFoundError\"\n });\n }\n };\n InvalidEntityIdError = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the entity id is invalid because it's too large.\n *\n * @param {number} entityId the invalid entityId used\n */\n constructor(entityId) {\n super(`Entity ID used is ${entityId}, but must be less than or equal to uint32.max`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidEntityIdError\"\n });\n }\n };\n InvalidNonceKeyError = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the nonce key is invalid.\n *\n * @param {bigint} nonceKey the invalid nonceKey used\n */\n constructor(nonceKey) {\n super(`Nonce key is ${nonceKey} but has to be less than or equal to 2**152`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidNonceKeyError\"\n });\n }\n };\n EntityIdOverrideError = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the nonce key is invalid.\n */\n constructor() {\n super(`EntityId of 0 is reserved for the owner and cannot be used`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"EntityIdOverrideError\"\n });\n }\n };\n InvalidModularAccountV2Mode = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the provided ma v2 account mode is invalid.\n */\n constructor() {\n super(`The provided account mode is invalid for ModularAccount V2`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidModularAccountV2Mode\"\n });\n }\n };\n InvalidDeferredActionNonce = class extends BaseError4 {\n /**\n * Initializes a new instance of the error message with a default message indicating that the provided deferred action nonce is invalid.\n */\n constructor() {\n super(`The provided deferred action nonce is invalid`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidDeferredActionNonce\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/stateOverride.js\n function serializeStateMapping2(stateMapping) {\n if (!stateMapping || stateMapping.length === 0)\n return void 0;\n return stateMapping.reduce((acc, { slot, value }) => {\n validateBytes32HexLength(slot);\n validateBytes32HexLength(value);\n acc[slot] = value;\n return acc;\n }, {});\n }\n function validateBytes32HexLength(value) {\n if (value.length !== 66) {\n throw new Error(`Hex is expected to be 66 hex long, but is ${value.length} hex long.`);\n }\n }\n function serializeAccountStateOverride2(parameters) {\n const { balance, nonce, state, stateDiff, code } = parameters;\n const rpcAccountStateOverride = {};\n if (code !== void 0)\n rpcAccountStateOverride.code = code;\n if (balance !== void 0)\n rpcAccountStateOverride.balance = numberToHex(balance);\n if (nonce !== void 0)\n rpcAccountStateOverride.nonce = numberToHex(nonce);\n if (state !== void 0)\n rpcAccountStateOverride.state = serializeStateMapping2(state);\n if (stateDiff !== void 0) {\n if (rpcAccountStateOverride.state)\n throw new StateAssignmentConflictError();\n rpcAccountStateOverride.stateDiff = serializeStateMapping2(stateDiff);\n }\n return rpcAccountStateOverride;\n }\n function serializeStateOverride2(parameters) {\n if (!parameters)\n return void 0;\n const rpcStateOverride = {};\n for (const { address, ...accountState } of parameters) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n if (rpcStateOverride[address])\n throw new AccountStateConflictError({ address });\n rpcStateOverride[address] = serializeAccountStateOverride2(accountState);\n }\n return rpcStateOverride;\n }\n var init_stateOverride3 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/stateOverride.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/estimateUserOperationGas.js\n var estimateUserOperationGas;\n var init_estimateUserOperationGas = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/estimateUserOperationGas.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stateOverride3();\n estimateUserOperationGas = async (client, args) => {\n return client.request({\n method: \"eth_estimateUserOperationGas\",\n params: args.stateOverride != null ? [\n args.request,\n args.entryPoint,\n serializeStateOverride2(args.stateOverride)\n ] : [args.request, args.entryPoint]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getSupportedEntryPoints.js\n var getSupportedEntryPoints;\n var init_getSupportedEntryPoints = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getSupportedEntryPoints.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n getSupportedEntryPoints = async (client) => {\n return client.request({\n method: \"eth_supportedEntryPoints\",\n params: []\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getUserOperationByHash.js\n var getUserOperationByHash;\n var init_getUserOperationByHash = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getUserOperationByHash.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n getUserOperationByHash = async (client, args) => {\n return client.request({\n method: \"eth_getUserOperationByHash\",\n params: [args.hash]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getUserOperationReceipt.js\n var getUserOperationReceipt;\n var init_getUserOperationReceipt = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/getUserOperationReceipt.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n getUserOperationReceipt = async (client, args) => {\n if (args.tag === void 0) {\n return client.request({\n method: \"eth_getUserOperationReceipt\",\n params: [args.hash]\n });\n }\n return client.request({\n method: \"eth_getUserOperationReceipt\",\n params: [args.hash, args.tag]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/sendRawUserOperation.js\n var sendRawUserOperation;\n var init_sendRawUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/bundler/sendRawUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n sendRawUserOperation = async (client, args) => {\n return client.request({\n method: \"eth_sendUserOperation\",\n params: [args.request, args.entryPoint]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/decorators/bundlerClient.js\n var bundlerActions;\n var init_bundlerClient = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/decorators/bundlerClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_estimateUserOperationGas();\n init_getSupportedEntryPoints();\n init_getUserOperationByHash();\n init_getUserOperationReceipt();\n init_sendRawUserOperation();\n bundlerActions = (client) => ({\n estimateUserOperationGas: async (request, entryPoint, stateOverride) => estimateUserOperationGas(client, { request, entryPoint, stateOverride }),\n sendRawUserOperation: async (request, entryPoint) => sendRawUserOperation(client, { request, entryPoint }),\n getUserOperationByHash: async (hash3) => getUserOperationByHash(client, { hash: hash3 }),\n getSupportedEntryPoints: async () => getSupportedEntryPoints(client),\n getUserOperationReceipt: async (hash3, tag) => getUserOperationReceipt(client, {\n hash: hash3,\n tag\n })\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/bundlerClient.js\n function createBundlerClient(args) {\n if (!args.chain) {\n throw new ChainNotFoundError2();\n }\n const { key = \"bundler-public\", name = \"Public Bundler Client\", type = \"bundlerClient\" } = args;\n const { transport, ...opts } = args;\n const resolvedTransport = transport({\n chain: args.chain,\n pollingInterval: opts.pollingInterval\n });\n const baseParameters = {\n ...args,\n key,\n name,\n type\n };\n const client = (() => {\n if (resolvedTransport.config.type === \"http\") {\n const { url, fetchOptions: fetchOptions_ } = resolvedTransport.value;\n const fetchOptions = fetchOptions_ ?? {};\n if (url.toLowerCase().indexOf(\"alchemy\") > -1) {\n fetchOptions.headers = {\n ...fetchOptions.headers,\n \"Alchemy-AA-Sdk-Version\": VERSION\n };\n }\n return createClient({\n ...baseParameters,\n transport: http(url, {\n ...resolvedTransport.config,\n fetchOptions\n })\n });\n }\n return createClient(baseParameters);\n })();\n return client.extend(publicActions).extend(bundlerActions);\n }\n var init_bundlerClient2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/bundlerClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_client();\n init_version5();\n init_bundlerClient();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/account.js\n var AccountNotFoundError2, GetCounterFactualAddressError, UpgradesNotSupportedError, SignTransactionNotSupportedError, FailedToGetStorageSlotError, BatchExecutionNotSupportedError, SmartAccountWithSignerRequiredError;\n var init_account2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/account.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n AccountNotFoundError2 = class extends BaseError4 {\n // TODO: extend this further using docs path as well\n /**\n * Constructor for initializing an error message indicating that an account could not be found to execute the specified action.\n */\n constructor() {\n super(\"Could not find an Account to execute with this Action.\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"AccountNotFoundError\"\n });\n }\n };\n GetCounterFactualAddressError = class extends BaseError4 {\n /**\n * Constructor for initializing an error message indicating the failure of fetching the counter-factual address.\n */\n constructor() {\n super(\"getCounterFactualAddress failed\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"GetCounterFactualAddressError\"\n });\n }\n };\n UpgradesNotSupportedError = class extends BaseError4 {\n /**\n * Error constructor for indicating that upgrades are not supported by the given account type.\n *\n * @param {string} accountType The type of account that does not support upgrades\n */\n constructor(accountType) {\n super(`Upgrades are not supported by ${accountType}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"UpgradesNotSupported\"\n });\n }\n };\n SignTransactionNotSupportedError = class extends BaseError4 {\n /**\n * Throws an error indicating that signing a transaction is not supported by smart contracts.\n *\n \n */\n constructor() {\n super(`SignTransaction is not supported by smart contracts`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignTransactionNotSupported\"\n });\n }\n };\n FailedToGetStorageSlotError = class extends BaseError4 {\n /**\n * Custom error message constructor for failing to get a specific storage slot.\n *\n * @param {string} slot The storage slot that failed to be accessed or retrieved\n * @param {string} slotDescriptor A description of the storage slot, for additional context in the error message\n */\n constructor(slot, slotDescriptor) {\n super(`Failed to get storage slot ${slot} (${slotDescriptor})`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"FailedToGetStorageSlotError\"\n });\n }\n };\n BatchExecutionNotSupportedError = class extends BaseError4 {\n /**\n * Constructs an error message indicating that batch execution is not supported by the specified account type.\n *\n * @param {string} accountType the type of account that does not support batch execution\n */\n constructor(accountType) {\n super(`Batch execution is not supported by ${accountType}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"BatchExecutionNotSupportedError\"\n });\n }\n };\n SmartAccountWithSignerRequiredError = class extends BaseError4 {\n /**\n * Initializes a new instance of the error class with a predefined error message indicating that a smart account requires a signer.\n */\n constructor() {\n super(\"Smart account requires a signer\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SmartAccountWithSignerRequiredError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/entrypoint.js\n var EntryPointNotFoundError, InvalidEntryPointError;\n var init_entrypoint = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/entrypoint.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n EntryPointNotFoundError = class extends BaseError4 {\n /**\n * Constructs an error message indicating that no default entry point exists for the given chain and entry point version.\n *\n * @param {Chain} chain The blockchain network for which the entry point is being queried\n * @param {any} entryPointVersion The version of the entry point for which no default exists\n */\n constructor(chain2, entryPointVersion) {\n super([\n `No default entry point v${entryPointVersion} exists for ${chain2.name}.`,\n `Supply an override.`\n ].join(\"\\n\"));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"EntryPointNotFoundError\"\n });\n }\n };\n InvalidEntryPointError = class extends BaseError4 {\n /**\n * Constructs an error indicating an invalid entry point version for a specific chain.\n *\n * @param {Chain} chain The chain object containing information about the blockchain\n * @param {any} entryPointVersion The entry point version that is invalid\n */\n constructor(chain2, entryPointVersion) {\n super(`Invalid entry point: unexpected version ${entryPointVersion} for ${chain2.name}.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidEntryPointError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/logger.js\n var LogLevel, Logger;\n var init_logger = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/logger.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(LogLevel2) {\n LogLevel2[LogLevel2[\"VERBOSE\"] = 5] = \"VERBOSE\";\n LogLevel2[LogLevel2[\"DEBUG\"] = 4] = \"DEBUG\";\n LogLevel2[LogLevel2[\"INFO\"] = 3] = \"INFO\";\n LogLevel2[LogLevel2[\"WARN\"] = 2] = \"WARN\";\n LogLevel2[LogLevel2[\"ERROR\"] = 1] = \"ERROR\";\n LogLevel2[LogLevel2[\"NONE\"] = 0] = \"NONE\";\n })(LogLevel || (LogLevel = {}));\n Logger = class {\n /**\n * Sets the log level for logging purposes.\n *\n * @example\n * ```ts\n * import { Logger, LogLevel } from \"@aa-sdk/core\";\n * Logger.setLogLevel(LogLevel.DEBUG);\n * ```\n *\n * @param {LogLevel} logLevel The desired log level\n */\n static setLogLevel(logLevel) {\n this.logLevel = logLevel;\n }\n /**\n * Sets the log filter pattern.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.setLogFilter(\"error\");\n * ```\n *\n * @param {string} pattern The pattern to set as the log filter\n */\n static setLogFilter(pattern) {\n this.logFilter = pattern;\n }\n /**\n * Logs an error message to the console if the logging condition is met.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.error(\"An error occurred while processing the request\");\n * ```\n *\n * @param {string} msg The primary error message to be logged\n * @param {...any[]} args Additional arguments to be logged along with the error message\n */\n static error(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.ERROR))\n return;\n console.error(msg, ...args);\n }\n /**\n * Logs a warning message if the logging conditions are met.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.warn(\"Careful...\");\n * ```\n *\n * @param {string} msg The message to log as a warning\n * @param {...any[]} args Additional parameters to log along with the message\n */\n static warn(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.WARN))\n return;\n console.warn(msg, ...args);\n }\n /**\n * Logs a debug message to the console if the log level allows it.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.debug(\"Something is happening\");\n * ```\n *\n * @param {string} msg The message to log\n * @param {...any[]} args Additional arguments to pass to the console.debug method\n */\n static debug(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.DEBUG))\n return;\n console.debug(msg, ...args);\n }\n /**\n * Logs an informational message to the console if the logging level is set to INFO.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.info(\"Something is happening\");\n * ```\n *\n * @param {string} msg the message to log\n * @param {...any[]} args additional arguments to log alongside the message\n */\n static info(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.INFO))\n return;\n console.info(msg, ...args);\n }\n /**\n * Logs a message with additional arguments if the logging level permits it.\n *\n * @example\n * ```ts\n * import { Logger } from \"@aa-sdk/core\";\n *\n * Logger.verbose(\"Something is happening\");\n * ```\n *\n * @param {string} msg The message to log\n * @param {...any[]} args Additional arguments to be logged\n */\n static verbose(msg, ...args) {\n if (!this.shouldLog(msg, LogLevel.VERBOSE))\n return;\n console.log(msg, ...args);\n }\n static shouldLog(msg, level) {\n if (this.logLevel < level)\n return false;\n if (this.logFilter && !msg.includes(this.logFilter))\n return false;\n return true;\n }\n };\n Object.defineProperty(Logger, \"logLevel\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: LogLevel.INFO\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/signer/utils.js\n var wrapSignatureWith6492;\n var init_utils9 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/signer/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n wrapSignatureWith6492 = ({ factoryAddress, factoryCalldata, signature }) => {\n return concat2([\n encodeAbiParameters(parseAbiParameters(\"address, bytes, bytes\"), [\n factoryAddress,\n factoryCalldata,\n signature\n ]),\n \"0x6492649264926492649264926492649264926492649264926492649264926492\"\n ]);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/account/smartContractAccount.js\n async function toSmartContractAccount(params) {\n const { transport, chain: chain2, entryPoint, source, accountAddress, getAccountInitCode, signMessage: signMessage3, signTypedData: signTypedData3, encodeExecute, encodeBatchExecute, getNonce, getDummySignature, signUserOperationHash, encodeUpgradeToAndCall, getImplementationAddress, prepareSign: prepareSign_, formatSign: formatSign_ } = params;\n const client = createBundlerClient({\n // we set the retry count to 0 so that viem doesn't retry during\n // getting the address. That call always reverts and without this\n // viem will retry 3 times, making this call very slow\n transport: (opts) => transport({ ...opts, chain: chain2, retryCount: 0 }),\n chain: chain2\n });\n const entryPointContract = getContract({\n address: entryPoint.address,\n abi: entryPoint.abi,\n client\n });\n const accountAddress_ = await getAccountAddress({\n client,\n entryPoint,\n accountAddress,\n getAccountInitCode\n });\n let deploymentState = DeploymentState.UNDEFINED;\n const getInitCode = async () => {\n if (deploymentState === DeploymentState.DEPLOYED) {\n return \"0x\";\n }\n const contractCode = await client.getCode({\n address: accountAddress_\n });\n if ((contractCode?.length ?? 0) > 2) {\n deploymentState = DeploymentState.DEPLOYED;\n return \"0x\";\n } else {\n deploymentState = DeploymentState.NOT_DEPLOYED;\n }\n return getAccountInitCode();\n };\n const signUserOperationHash_ = signUserOperationHash ?? (async (uoHash) => {\n return signMessage3({ message: { raw: hexToBytes(uoHash) } });\n });\n const getFactoryAddress = async () => parseFactoryAddressFromAccountInitCode(await getAccountInitCode())[0];\n const getFactoryData = async () => parseFactoryAddressFromAccountInitCode(await getAccountInitCode())[1];\n const encodeUpgradeToAndCall_ = encodeUpgradeToAndCall ?? (() => {\n throw new UpgradesNotSupportedError(source);\n });\n const isAccountDeployed = async () => {\n const initCode = await getInitCode();\n return initCode === \"0x\";\n };\n const getNonce_ = getNonce ?? (async (nonceKey = 0n) => {\n return entryPointContract.read.getNonce([\n accountAddress_,\n nonceKey\n ]);\n });\n const account = toAccount({\n address: accountAddress_,\n signMessage: signMessage3,\n signTypedData: signTypedData3,\n signTransaction: () => {\n throw new SignTransactionNotSupportedError();\n }\n });\n const create6492Signature = async (isDeployed, signature) => {\n if (isDeployed) {\n return signature;\n }\n const [factoryAddress, factoryCalldata] = parseFactoryAddressFromAccountInitCode(await getAccountInitCode());\n return wrapSignatureWith6492({\n factoryAddress,\n factoryCalldata,\n signature\n });\n };\n const signMessageWith6492 = async (message2) => {\n const [isDeployed, signature] = await Promise.all([\n isAccountDeployed(),\n account.signMessage(message2)\n ]);\n return create6492Signature(isDeployed, signature);\n };\n const signTypedDataWith6492 = async (typedDataDefinition) => {\n const [isDeployed, signature] = await Promise.all([\n isAccountDeployed(),\n account.signTypedData(typedDataDefinition)\n ]);\n return create6492Signature(isDeployed, signature);\n };\n const getImplementationAddress_ = getImplementationAddress ?? (async () => {\n const storage = await client.getStorageAt({\n address: account.address,\n // This is the default slot for the implementation address for Proxies\n slot: \"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\"\n });\n if (storage == null) {\n throw new FailedToGetStorageSlotError(\"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\", \"Proxy Implementation Address\");\n }\n return `0x${storage.slice(26)}`;\n });\n if (entryPoint.version !== \"0.6.0\" && entryPoint.version !== \"0.7.0\") {\n throw new InvalidEntryPointError(chain2, entryPoint.version);\n }\n if (prepareSign_ && !formatSign_ || !prepareSign_ && formatSign_) {\n throw new Error(\"Must implement both prepareSign and formatSign or neither\");\n }\n const prepareSign = prepareSign_ ?? (() => {\n throw new Error(\"prepareSign not implemented\");\n });\n const formatSign = formatSign_ ?? (() => {\n throw new Error(\"formatSign not implemented\");\n });\n return {\n ...account,\n source,\n // TODO: I think this should probably be signUserOperation instead\n // and allow for generating the UO hash based on the EP version\n signUserOperationHash: signUserOperationHash_,\n getFactoryAddress,\n getFactoryData,\n encodeBatchExecute: encodeBatchExecute ?? (() => {\n throw new BatchExecutionNotSupportedError(source);\n }),\n encodeExecute,\n getDummySignature,\n getInitCode,\n encodeUpgradeToAndCall: encodeUpgradeToAndCall_,\n getEntryPoint: () => entryPoint,\n isAccountDeployed,\n getAccountNonce: getNonce_,\n signMessageWith6492,\n signTypedDataWith6492,\n getImplementationAddress: getImplementationAddress_,\n prepareSign,\n formatSign\n };\n }\n var DeploymentState, isSmartAccountWithSigner, parseFactoryAddressFromAccountInitCode, getAccountAddress;\n var init_smartContractAccount = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/account/smartContractAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_accounts();\n init_bundlerClient2();\n init_account2();\n init_client();\n init_entrypoint();\n init_logger();\n init_utils9();\n (function(DeploymentState2) {\n DeploymentState2[\"UNDEFINED\"] = \"0x0\";\n DeploymentState2[\"NOT_DEPLOYED\"] = \"0x1\";\n DeploymentState2[\"DEPLOYED\"] = \"0x2\";\n })(DeploymentState || (DeploymentState = {}));\n isSmartAccountWithSigner = (account) => {\n return \"getSigner\" in account;\n };\n parseFactoryAddressFromAccountInitCode = (initCode) => {\n const factoryAddress = `0x${initCode.substring(2, 42)}`;\n const factoryCalldata = `0x${initCode.substring(42)}`;\n return [factoryAddress, factoryCalldata];\n };\n getAccountAddress = async ({ client, entryPoint, accountAddress, getAccountInitCode }) => {\n if (accountAddress)\n return accountAddress;\n const entryPointContract = getContract({\n address: entryPoint.address,\n abi: entryPoint.abi,\n client\n });\n const initCode = await getAccountInitCode();\n Logger.verbose(\"[BaseSmartContractAccount](getAddress) initCode: \", initCode);\n try {\n await entryPointContract.simulate.getSenderAddress([initCode]);\n } catch (err) {\n Logger.verbose(\"[BaseSmartContractAccount](getAddress) getSenderAddress err: \", err);\n if (err.cause?.data?.errorName === \"SenderAddressResult\") {\n Logger.verbose(\"[BaseSmartContractAccount](getAddress) entryPoint.getSenderAddress result:\", err.cause.data.args[0]);\n return err.cause.data.args[0];\n }\n if (err.details === \"Invalid URL\") {\n throw new InvalidRpcUrlError();\n }\n }\n throw new GetCounterFactualAddressError();\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/transaction.js\n var TransactionMissingToParamError, FailedToFindTransactionError;\n var init_transaction3 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/transaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n TransactionMissingToParamError = class extends BaseError4 {\n /**\n * Throws an error indicating that a transaction is missing the `to` address in the request.\n */\n constructor() {\n super(\"Transaction is missing `to` address set on request\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"TransactionMissingToParamError\"\n });\n }\n };\n FailedToFindTransactionError = class extends BaseError4 {\n /**\n * Constructs a new error message indicating a failure to find the transaction for the specified user operation hash.\n *\n * @param {Hex} hash The hexadecimal value representing the user operation hash.\n */\n constructor(hash3) {\n super(`Failed to find transaction for user operation ${hash3}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"FailedToFindTransactionError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperationFromTx.js\n async function buildUserOperationFromTx(client_, args, overrides, context2) {\n const client = clientHeaderTrack(client_, \"buildUserOperationFromTx\");\n const { account = client.account, ...request } = args;\n if (!account || typeof account === \"string\") {\n throw new AccountNotFoundError2();\n }\n if (!request.to) {\n throw new TransactionMissingToParamError();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"buildUserOperationFromTx\", client);\n }\n const _overrides = {\n ...overrides,\n maxFeePerGas: request.maxFeePerGas ? request.maxFeePerGas : void 0,\n maxPriorityFeePerGas: request.maxPriorityFeePerGas ? request.maxPriorityFeePerGas : void 0\n };\n return buildUserOperation(client, {\n uo: {\n target: request.to,\n data: request.data ?? \"0x\",\n value: request.value ? request.value : 0n\n },\n account,\n context: context2,\n overrides: _overrides\n });\n }\n var init_buildUserOperationFromTx = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperationFromTx.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_transaction3();\n init_buildUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/util.js\n var util, objectUtil, ZodParsedType, getParsedType;\n var init_util = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/util.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(util2) {\n util2.assertEqual = (_2) => {\n };\n function assertIs(_arg) {\n }\n util2.assertIs = assertIs;\n function assertNever2(_x) {\n throw new Error();\n }\n util2.assertNever = assertNever2;\n util2.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util2.getValidEnumValues = (obj) => {\n const validKeys = util2.objectKeys(obj).filter((k4) => typeof obj[obj[k4]] !== \"number\");\n const filtered = {};\n for (const k4 of validKeys) {\n filtered[k4] = obj[k4];\n }\n return util2.objectValues(filtered);\n };\n util2.objectValues = (obj) => {\n return util2.objectKeys(obj).map(function(e2) {\n return obj[e2];\n });\n };\n util2.objectKeys = typeof Object.keys === \"function\" ? (obj) => Object.keys(obj) : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util2.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return void 0;\n };\n util2.isInteger = typeof Number.isInteger === \"function\" ? (val) => Number.isInteger(val) : (val) => typeof val === \"number\" && Number.isFinite(val) && Math.floor(val) === val;\n function joinValues(array, separator = \" | \") {\n return array.map((val) => typeof val === \"string\" ? `'${val}'` : val).join(separator);\n }\n util2.joinValues = joinValues;\n util2.jsonStringifyReplacer = (_2, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n })(util || (util = {}));\n (function(objectUtil2) {\n objectUtil2.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second\n // second overwrites first\n };\n };\n })(objectUtil || (objectUtil = {}));\n ZodParsedType = util.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\"\n ]);\n getParsedType = (data) => {\n const t3 = typeof data;\n switch (t3) {\n case \"undefined\":\n return ZodParsedType.undefined;\n case \"string\":\n return ZodParsedType.string;\n case \"number\":\n return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;\n case \"boolean\":\n return ZodParsedType.boolean;\n case \"function\":\n return ZodParsedType.function;\n case \"bigint\":\n return ZodParsedType.bigint;\n case \"symbol\":\n return ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return ZodParsedType.array;\n }\n if (data === null) {\n return ZodParsedType.null;\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return ZodParsedType.date;\n }\n return ZodParsedType.object;\n default:\n return ZodParsedType.unknown;\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/ZodError.js\n var ZodIssueCode, quotelessJson, ZodError;\n var init_ZodError = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/ZodError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_util();\n ZodIssueCode = util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\"\n ]);\n quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n };\n ZodError = class _ZodError extends Error {\n get errors() {\n return this.issues;\n }\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(this, actualProto);\n } else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n format(_mapper) {\n const mapper = _mapper || function(issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n } else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n } else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n } else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n } else {\n let curr = fieldErrors;\n let i3 = 0;\n while (i3 < issue.path.length) {\n const el = issue.path[i3];\n const terminal = i3 === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n } else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i3++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n static assert(value) {\n if (!(value instanceof _ZodError)) {\n throw new Error(`Not a ZodError: ${value}`);\n }\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n } else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n };\n ZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/locales/en.js\n var errorMap, en_default;\n var init_en = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/locales/en.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_ZodError();\n init_util();\n errorMap = (issue, _ctx) => {\n let message2;\n switch (issue.code) {\n case ZodIssueCode.invalid_type:\n if (issue.received === ZodParsedType.undefined) {\n message2 = \"Required\";\n } else {\n message2 = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodIssueCode.invalid_literal:\n message2 = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n break;\n case ZodIssueCode.unrecognized_keys:\n message2 = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodIssueCode.invalid_union:\n message2 = `Invalid input`;\n break;\n case ZodIssueCode.invalid_union_discriminator:\n message2 = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n break;\n case ZodIssueCode.invalid_enum_value:\n message2 = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodIssueCode.invalid_arguments:\n message2 = `Invalid function arguments`;\n break;\n case ZodIssueCode.invalid_return_type:\n message2 = `Invalid function return type`;\n break;\n case ZodIssueCode.invalid_date:\n message2 = `Invalid date`;\n break;\n case ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message2 = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message2 = `${message2} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n } else if (\"startsWith\" in issue.validation) {\n message2 = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n } else if (\"endsWith\" in issue.validation) {\n message2 = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n } else {\n util.assertNever(issue.validation);\n }\n } else if (issue.validation !== \"regex\") {\n message2 = `Invalid ${issue.validation}`;\n } else {\n message2 = \"Invalid\";\n }\n break;\n case ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message2 = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message2 = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message2 = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message2 = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message2 = \"Invalid input\";\n break;\n case ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message2 = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message2 = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message2 = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message2 = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message2 = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message2 = \"Invalid input\";\n break;\n case ZodIssueCode.custom:\n message2 = `Invalid input`;\n break;\n case ZodIssueCode.invalid_intersection_types:\n message2 = `Intersection results could not be merged`;\n break;\n case ZodIssueCode.not_multiple_of:\n message2 = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodIssueCode.not_finite:\n message2 = \"Number must be finite\";\n break;\n default:\n message2 = _ctx.defaultError;\n util.assertNever(issue);\n }\n return { message: message2 };\n };\n en_default = errorMap;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/errors.js\n function setErrorMap(map) {\n overrideErrorMap = map;\n }\n function getErrorMap() {\n return overrideErrorMap;\n }\n var overrideErrorMap;\n var init_errors6 = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_en();\n overrideErrorMap = en_default;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/parseUtil.js\n function addIssueToContext(ctx, issueData) {\n const overrideMap = getErrorMap();\n const issue = makeIssue({\n issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n // contextual error map is first priority\n ctx.schemaErrorMap,\n // then schema-bound map if available\n overrideMap,\n // then global override map\n overrideMap === en_default ? void 0 : en_default\n // then global default map\n ].filter((x4) => !!x4)\n });\n ctx.common.issues.push(issue);\n }\n var makeIssue, EMPTY_PATH, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync;\n var init_parseUtil = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/parseUtil.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors6();\n init_en();\n makeIssue = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...issueData.path || []];\n const fullIssue = {\n ...issueData,\n path: fullPath\n };\n if (issueData.message !== void 0) {\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message\n };\n }\n let errorMessage = \"\";\n const maps = errorMaps.filter((m2) => !!m2).slice().reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: errorMessage\n };\n };\n EMPTY_PATH = [];\n ParseStatus = class _ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s4 of results) {\n if (s4.status === \"aborted\")\n return INVALID;\n if (s4.status === \"dirty\")\n status.dirty();\n arrayValue.push(s4.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value\n });\n }\n return _ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return INVALID;\n if (value.status === \"aborted\")\n return INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" && (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n };\n INVALID = Object.freeze({\n status: \"aborted\"\n });\n DIRTY = (value) => ({ status: \"dirty\", value });\n OK = (value) => ({ status: \"valid\", value });\n isAborted = (x4) => x4.status === \"aborted\";\n isDirty = (x4) => x4.status === \"dirty\";\n isValid = (x4) => x4.status === \"valid\";\n isAsync = (x4) => typeof Promise !== \"undefined\" && x4 instanceof Promise;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/typeAliases.js\n var init_typeAliases = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/typeAliases.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/errorUtil.js\n var errorUtil;\n var init_errorUtil = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/helpers/errorUtil.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(errorUtil2) {\n errorUtil2.errToObj = (message2) => typeof message2 === \"string\" ? { message: message2 } : message2 || {};\n errorUtil2.toString = (message2) => typeof message2 === \"string\" ? message2 : message2?.message;\n })(errorUtil || (errorUtil = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/types.js\n function processCreateParams(params) {\n if (!params)\n return {};\n const { errorMap: errorMap2, invalid_type_error, required_error, description } = params;\n if (errorMap2 && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap2)\n return { errorMap: errorMap2, description };\n const customMap = (iss, ctx) => {\n const { message: message2 } = params;\n if (iss.code === \"invalid_enum_value\") {\n return { message: message2 ?? ctx.defaultError };\n }\n if (typeof ctx.data === \"undefined\") {\n return { message: message2 ?? required_error ?? ctx.defaultError };\n }\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n return { message: message2 ?? invalid_type_error ?? ctx.defaultError };\n };\n return { errorMap: customMap, description };\n }\n function timeRegexSource(args) {\n let secondsRegexSource = `[0-5]\\\\d`;\n if (args.precision) {\n secondsRegexSource = `${secondsRegexSource}\\\\.\\\\d{${args.precision}}`;\n } else if (args.precision == null) {\n secondsRegexSource = `${secondsRegexSource}(\\\\.\\\\d+)?`;\n }\n const secondsQuantifier = args.precision ? \"+\" : \"?\";\n return `([01]\\\\d|2[0-3]):[0-5]\\\\d(:${secondsRegexSource})${secondsQuantifier}`;\n }\n function timeRegex(args) {\n return new RegExp(`^${timeRegexSource(args)}$`);\n }\n function datetimeRegex(args) {\n let regex = `${dateRegexSource}T${timeRegexSource(args)}`;\n const opts = [];\n opts.push(args.local ? `Z?` : `Z`);\n if (args.offset)\n opts.push(`([+-]\\\\d{2}:?\\\\d{2})`);\n regex = `${regex}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex}$`);\n }\n function isValidIP(ip, version7) {\n if ((version7 === \"v4\" || !version7) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version7 === \"v6\" || !version7) && ipv6Regex.test(ip)) {\n return true;\n }\n return false;\n }\n function isValidJWT(jwt, alg) {\n if (!jwtRegex.test(jwt))\n return false;\n try {\n const [header] = jwt.split(\".\");\n const base64 = header.replace(/-/g, \"+\").replace(/_/g, \"/\").padEnd(header.length + (4 - header.length % 4) % 4, \"=\");\n const decoded = JSON.parse(atob(base64));\n if (typeof decoded !== \"object\" || decoded === null)\n return false;\n if (\"typ\" in decoded && decoded?.typ !== \"JWT\")\n return false;\n if (!decoded.alg)\n return false;\n if (alg && decoded.alg !== alg)\n return false;\n return true;\n } catch {\n return false;\n }\n }\n function isValidCidr(ip, version7) {\n if ((version7 === \"v4\" || !version7) && ipv4CidrRegex.test(ip)) {\n return true;\n }\n if ((version7 === \"v6\" || !version7) && ipv6CidrRegex.test(ip)) {\n return true;\n }\n return false;\n }\n function floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return valInt % stepInt / 10 ** decCount;\n }\n function deepPartialify(schema) {\n if (schema instanceof ZodObject) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n }\n return new ZodObject({\n ...schema._def,\n shape: () => newShape\n });\n } else if (schema instanceof ZodArray) {\n return new ZodArray({\n ...schema._def,\n type: deepPartialify(schema.element)\n });\n } else if (schema instanceof ZodOptional) {\n return ZodOptional.create(deepPartialify(schema.unwrap()));\n } else if (schema instanceof ZodNullable) {\n return ZodNullable.create(deepPartialify(schema.unwrap()));\n } else if (schema instanceof ZodTuple) {\n return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n } else {\n return schema;\n }\n }\n function mergeValues(a3, b4) {\n const aType = getParsedType(a3);\n const bType = getParsedType(b4);\n if (a3 === b4) {\n return { valid: true, data: a3 };\n } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {\n const bKeys = util.objectKeys(b4);\n const sharedKeys = util.objectKeys(a3).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a3, ...b4 };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a3[key], b4[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {\n if (a3.length !== b4.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index2 = 0; index2 < a3.length; index2++) {\n const itemA = a3[index2];\n const itemB = b4[index2];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a3 === +b4) {\n return { valid: true, data: a3 };\n } else {\n return { valid: false };\n }\n }\n function createZodEnum(values, params) {\n return new ZodEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodEnum,\n ...processCreateParams(params)\n });\n }\n function cleanParams(params, data) {\n const p4 = typeof params === \"function\" ? params(data) : typeof params === \"string\" ? { message: params } : params;\n const p22 = typeof p4 === \"string\" ? { message: p4 } : p4;\n return p22;\n }\n function custom2(check2, _params = {}, fatal) {\n if (check2)\n return ZodAny.create().superRefine((data, ctx) => {\n const r2 = check2(data);\n if (r2 instanceof Promise) {\n return r2.then((r3) => {\n if (!r3) {\n const params = cleanParams(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n });\n }\n if (!r2) {\n const params = cleanParams(_params, data);\n const _fatal = params.fatal ?? fatal ?? true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n return;\n });\n return ZodAny.create();\n }\n var ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex2, base64urlRegex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, instanceOfType, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, ostring, onumber, oboolean, coerce, NEVER;\n var init_types2 = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/types.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_ZodError();\n init_errors6();\n init_errorUtil();\n init_parseUtil();\n init_util();\n ParseInputLazyPath = class {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (Array.isArray(this._key)) {\n this._cachedPath.push(...this._path, ...this._key);\n } else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n };\n handleResult = (ctx, result) => {\n if (isValid(result)) {\n return { success: true, data: result.value };\n } else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n }\n };\n }\n };\n ZodType = class {\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return getParsedType(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent\n };\n }\n _processInputParams(input) {\n return {\n status: new ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent\n }\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if (isAsync(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n const ctx = {\n common: {\n issues: [],\n async: params?.async ?? false,\n contextualErrorMap: params?.errorMap\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data)\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult(ctx, result);\n }\n \"~validate\"(data) {\n const ctx = {\n common: {\n issues: [],\n async: !!this[\"~standard\"].async\n },\n path: [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data)\n };\n if (!this[\"~standard\"].async) {\n try {\n const result = this._parseSync({ data, path: [], parent: ctx });\n return isValid(result) ? {\n value: result.value\n } : {\n issues: ctx.common.issues\n };\n } catch (err) {\n if (err?.message?.toLowerCase()?.includes(\"encountered\")) {\n this[\"~standard\"].async = true;\n }\n ctx.common = {\n issues: [],\n async: true\n };\n }\n }\n return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result) ? {\n value: result.value\n } : {\n issues: ctx.common.issues\n });\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params?.errorMap,\n async: true\n },\n path: params?.path || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data)\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));\n return handleResult(ctx, result);\n }\n refine(check2, message2) {\n const getIssueProperties = (val) => {\n if (typeof message2 === \"string\" || typeof message2 === \"undefined\") {\n return { message: message2 };\n } else if (typeof message2 === \"function\") {\n return message2(val);\n } else {\n return message2;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check2(val);\n const setError = () => ctx.addIssue({\n code: ZodIssueCode.custom,\n ...getIssueProperties(val)\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n } else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n } else {\n return true;\n }\n });\n }\n refinement(check2, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check2(val)) {\n ctx.addIssue(typeof refinementData === \"function\" ? refinementData(val, ctx) : refinementData);\n return false;\n } else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects({\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"refinement\", refinement }\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n constructor(def) {\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n this[\"~standard\"] = {\n version: 1,\n vendor: \"zod\",\n validate: (data) => this[\"~validate\"](data)\n };\n }\n optional() {\n return ZodOptional.create(this, this._def);\n }\n nullable() {\n return ZodNullable.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray.create(this);\n }\n promise() {\n return ZodPromise.create(this, this._def);\n }\n or(option) {\n return ZodUnion.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection.create(this, incoming, this._def);\n }\n transform(transform) {\n return new ZodEffects({\n ...processCreateParams(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"transform\", transform }\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault({\n ...processCreateParams(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodDefault\n });\n }\n brand() {\n return new ZodBranded({\n typeName: ZodFirstPartyTypeKind.ZodBranded,\n type: this,\n ...processCreateParams(this._def)\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch({\n ...processCreateParams(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodCatch\n });\n }\n describe(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description\n });\n }\n pipe(target) {\n return ZodPipeline.create(this, target);\n }\n readonly() {\n return ZodReadonly.create(this);\n }\n isOptional() {\n return this.safeParse(void 0).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n };\n cuidRegex = /^c[^\\s-]{8,}$/i;\n cuid2Regex = /^[0-9a-z]+$/;\n ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;\n uuidRegex = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\n nanoidRegex = /^[a-z0-9_-]{21}$/i;\n jwtRegex = /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/;\n durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n emailRegex = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n _emojiRegex = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\n ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\n ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/(3[0-2]|[12]?[0-9])$/;\n ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;\n ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n base64Regex2 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;\n base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;\n dateRegexSource = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\n dateRegex = new RegExp(`^${dateRegexSource}$`);\n ZodString = class _ZodString extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.string) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.string,\n received: ctx2.parsedType\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = void 0;\n for (const check2 of this._def.checks) {\n if (check2.kind === \"min\") {\n if (input.data.length < check2.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check2.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"max\") {\n if (input.data.length > check2.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check2.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"length\") {\n const tooBig = input.data.length > check2.value;\n const tooSmall = input.data.length < check2.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check2.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check2.message\n });\n } else if (tooSmall) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check2.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check2.message\n });\n }\n status.dirty();\n }\n } else if (check2.kind === \"email\") {\n if (!emailRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"email\",\n code: ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"emoji\") {\n if (!emojiRegex) {\n emojiRegex = new RegExp(_emojiRegex, \"u\");\n }\n if (!emojiRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"emoji\",\n code: ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"uuid\") {\n if (!uuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"uuid\",\n code: ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"nanoid\") {\n if (!nanoidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"nanoid\",\n code: ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"cuid\") {\n if (!cuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid\",\n code: ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"cuid2\") {\n if (!cuid2Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid2\",\n code: ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"ulid\") {\n if (!ulidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ulid\",\n code: ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"url\") {\n try {\n new URL(input.data);\n } catch {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"url\",\n code: ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"regex\") {\n check2.regex.lastIndex = 0;\n const testResult = check2.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"regex\",\n code: ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"trim\") {\n input.data = input.data.trim();\n } else if (check2.kind === \"includes\") {\n if (!input.data.includes(check2.value, check2.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { includes: check2.value, position: check2.position },\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n } else if (check2.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n } else if (check2.kind === \"startsWith\") {\n if (!input.data.startsWith(check2.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { startsWith: check2.value },\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"endsWith\") {\n if (!input.data.endsWith(check2.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { endsWith: check2.value },\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"datetime\") {\n const regex = datetimeRegex(check2);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"date\") {\n const regex = dateRegex;\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"date\",\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"time\") {\n const regex = timeRegex(check2);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"time\",\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"duration\") {\n if (!durationRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"duration\",\n code: ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"ip\") {\n if (!isValidIP(input.data, check2.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ip\",\n code: ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"jwt\") {\n if (!isValidJWT(input.data, check2.alg)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"jwt\",\n code: ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"cidr\") {\n if (!isValidCidr(input.data, check2.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cidr\",\n code: ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"base64\") {\n if (!base64Regex2.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"base64\",\n code: ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"base64url\") {\n if (!base64urlRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"base64url\",\n code: ZodIssueCode.invalid_string,\n message: check2.message\n });\n status.dirty();\n }\n } else {\n util.assertNever(check2);\n }\n }\n return { status: status.value, value: input.data };\n }\n _regex(regex, validation, message2) {\n return this.refinement((data) => regex.test(data), {\n validation,\n code: ZodIssueCode.invalid_string,\n ...errorUtil.errToObj(message2)\n });\n }\n _addCheck(check2) {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, check2]\n });\n }\n email(message2) {\n return this._addCheck({ kind: \"email\", ...errorUtil.errToObj(message2) });\n }\n url(message2) {\n return this._addCheck({ kind: \"url\", ...errorUtil.errToObj(message2) });\n }\n emoji(message2) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil.errToObj(message2) });\n }\n uuid(message2) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil.errToObj(message2) });\n }\n nanoid(message2) {\n return this._addCheck({ kind: \"nanoid\", ...errorUtil.errToObj(message2) });\n }\n cuid(message2) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil.errToObj(message2) });\n }\n cuid2(message2) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil.errToObj(message2) });\n }\n ulid(message2) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil.errToObj(message2) });\n }\n base64(message2) {\n return this._addCheck({ kind: \"base64\", ...errorUtil.errToObj(message2) });\n }\n base64url(message2) {\n return this._addCheck({\n kind: \"base64url\",\n ...errorUtil.errToObj(message2)\n });\n }\n jwt(options) {\n return this._addCheck({ kind: \"jwt\", ...errorUtil.errToObj(options) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil.errToObj(options) });\n }\n cidr(options) {\n return this._addCheck({ kind: \"cidr\", ...errorUtil.errToObj(options) });\n }\n datetime(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n local: false,\n message: options\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n offset: options?.offset ?? false,\n local: options?.local ?? false,\n ...errorUtil.errToObj(options?.message)\n });\n }\n date(message2) {\n return this._addCheck({ kind: \"date\", message: message2 });\n }\n time(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"time\",\n precision: null,\n message: options\n });\n }\n return this._addCheck({\n kind: \"time\",\n precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n ...errorUtil.errToObj(options?.message)\n });\n }\n duration(message2) {\n return this._addCheck({ kind: \"duration\", ...errorUtil.errToObj(message2) });\n }\n regex(regex, message2) {\n return this._addCheck({\n kind: \"regex\",\n regex,\n ...errorUtil.errToObj(message2)\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value,\n position: options?.position,\n ...errorUtil.errToObj(options?.message)\n });\n }\n startsWith(value, message2) {\n return this._addCheck({\n kind: \"startsWith\",\n value,\n ...errorUtil.errToObj(message2)\n });\n }\n endsWith(value, message2) {\n return this._addCheck({\n kind: \"endsWith\",\n value,\n ...errorUtil.errToObj(message2)\n });\n }\n min(minLength, message2) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\n ...errorUtil.errToObj(message2)\n });\n }\n max(maxLength, message2) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil.errToObj(message2)\n });\n }\n length(len, message2) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil.errToObj(message2)\n });\n }\n /**\n * Equivalent to `.min(1)`\n */\n nonempty(message2) {\n return this.min(1, errorUtil.errToObj(message2));\n }\n trim() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }]\n });\n }\n toLowerCase() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }]\n });\n }\n toUpperCase() {\n return new _ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }]\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isDate() {\n return !!this._def.checks.find((ch) => ch.kind === \"date\");\n }\n get isTime() {\n return !!this._def.checks.find((ch) => ch.kind === \"time\");\n }\n get isDuration() {\n return !!this._def.checks.find((ch) => ch.kind === \"duration\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isNANOID() {\n return !!this._def.checks.find((ch) => ch.kind === \"nanoid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get isCIDR() {\n return !!this._def.checks.find((ch) => ch.kind === \"cidr\");\n }\n get isBase64() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64\");\n }\n get isBase64url() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64url\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n };\n ZodString.create = (params) => {\n return new ZodString({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodString,\n coerce: params?.coerce ?? false,\n ...processCreateParams(params)\n });\n };\n ZodNumber = class _ZodNumber extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.number) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.number,\n received: ctx2.parsedType\n });\n return INVALID;\n }\n let ctx = void 0;\n const status = new ParseStatus();\n for (const check2 of this._def.checks) {\n if (check2.kind === \"int\") {\n if (!util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"min\") {\n const tooSmall = check2.inclusive ? input.data < check2.value : input.data <= check2.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check2.value,\n type: \"number\",\n inclusive: check2.inclusive,\n exact: false,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"max\") {\n const tooBig = check2.inclusive ? input.data > check2.value : input.data >= check2.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check2.value,\n type: \"number\",\n inclusive: check2.inclusive,\n exact: false,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"multipleOf\") {\n if (floatSafeRemainder(input.data, check2.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check2.value,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_finite,\n message: check2.message\n });\n status.dirty();\n }\n } else {\n util.assertNever(check2);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message2) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message2));\n }\n gt(value, message2) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message2));\n }\n lte(value, message2) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message2));\n }\n lt(value, message2) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message2));\n }\n setLimit(kind, value, inclusive, message2) {\n return new _ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message2)\n }\n ]\n });\n }\n _addCheck(check2) {\n return new _ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check2]\n });\n }\n int(message2) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil.toString(message2)\n });\n }\n positive(message2) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message2)\n });\n }\n negative(message2) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message2)\n });\n }\n nonpositive(message2) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message2)\n });\n }\n nonnegative(message2) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message2)\n });\n }\n multipleOf(value, message2) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil.toString(message2)\n });\n }\n finite(message2) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil.toString(message2)\n });\n }\n safe(message2) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil.toString(message2)\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil.toString(message2)\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" || ch.kind === \"multipleOf\" && util.isInteger(ch.value));\n }\n get isFinite() {\n let max = null;\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" || ch.kind === \"int\" || ch.kind === \"multipleOf\") {\n return true;\n } else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n } else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n };\n ZodNumber.create = (params) => {\n return new ZodNumber({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodNumber,\n coerce: params?.coerce || false,\n ...processCreateParams(params)\n });\n };\n ZodBigInt = class _ZodBigInt extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n try {\n input.data = BigInt(input.data);\n } catch {\n return this._getInvalidInput(input);\n }\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.bigint) {\n return this._getInvalidInput(input);\n }\n let ctx = void 0;\n const status = new ParseStatus();\n for (const check2 of this._def.checks) {\n if (check2.kind === \"min\") {\n const tooSmall = check2.inclusive ? input.data < check2.value : input.data <= check2.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check2.value,\n inclusive: check2.inclusive,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"max\") {\n const tooBig = check2.inclusive ? input.data > check2.value : input.data >= check2.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check2.value,\n inclusive: check2.inclusive,\n message: check2.message\n });\n status.dirty();\n }\n } else if (check2.kind === \"multipleOf\") {\n if (input.data % check2.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check2.value,\n message: check2.message\n });\n status.dirty();\n }\n } else {\n util.assertNever(check2);\n }\n }\n return { status: status.value, value: input.data };\n }\n _getInvalidInput(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.bigint,\n received: ctx.parsedType\n });\n return INVALID;\n }\n gte(value, message2) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message2));\n }\n gt(value, message2) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message2));\n }\n lte(value, message2) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message2));\n }\n lt(value, message2) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message2));\n }\n setLimit(kind, value, inclusive, message2) {\n return new _ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message2)\n }\n ]\n });\n }\n _addCheck(check2) {\n return new _ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check2]\n });\n }\n positive(message2) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message2)\n });\n }\n negative(message2) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message2)\n });\n }\n nonpositive(message2) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message2)\n });\n }\n nonnegative(message2) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message2)\n });\n }\n multipleOf(value, message2) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil.toString(message2)\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n };\n ZodBigInt.create = (params) => {\n return new ZodBigInt({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodBigInt,\n coerce: params?.coerce ?? false,\n ...processCreateParams(params)\n });\n };\n ZodBoolean = class extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.boolean,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodBoolean.create = (params) => {\n return new ZodBoolean({\n typeName: ZodFirstPartyTypeKind.ZodBoolean,\n coerce: params?.coerce || false,\n ...processCreateParams(params)\n });\n };\n ZodDate = class _ZodDate extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.date) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.date,\n received: ctx2.parsedType\n });\n return INVALID;\n }\n if (Number.isNaN(input.data.getTime())) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_date\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = void 0;\n for (const check2 of this._def.checks) {\n if (check2.kind === \"min\") {\n if (input.data.getTime() < check2.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n message: check2.message,\n inclusive: true,\n exact: false,\n minimum: check2.value,\n type: \"date\"\n });\n status.dirty();\n }\n } else if (check2.kind === \"max\") {\n if (input.data.getTime() > check2.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n message: check2.message,\n inclusive: true,\n exact: false,\n maximum: check2.value,\n type: \"date\"\n });\n status.dirty();\n }\n } else {\n util.assertNever(check2);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime())\n };\n }\n _addCheck(check2) {\n return new _ZodDate({\n ...this._def,\n checks: [...this._def.checks, check2]\n });\n }\n min(minDate, message2) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil.toString(message2)\n });\n }\n max(maxDate, message2) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil.toString(message2)\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n };\n ZodDate.create = (params) => {\n return new ZodDate({\n checks: [],\n coerce: params?.coerce || false,\n typeName: ZodFirstPartyTypeKind.ZodDate,\n ...processCreateParams(params)\n });\n };\n ZodSymbol = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.symbol,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodSymbol.create = (params) => {\n return new ZodSymbol({\n typeName: ZodFirstPartyTypeKind.ZodSymbol,\n ...processCreateParams(params)\n });\n };\n ZodUndefined = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.undefined,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodUndefined.create = (params) => {\n return new ZodUndefined({\n typeName: ZodFirstPartyTypeKind.ZodUndefined,\n ...processCreateParams(params)\n });\n };\n ZodNull = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.null,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodNull.create = (params) => {\n return new ZodNull({\n typeName: ZodFirstPartyTypeKind.ZodNull,\n ...processCreateParams(params)\n });\n };\n ZodAny = class extends ZodType {\n constructor() {\n super(...arguments);\n this._any = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n };\n ZodAny.create = (params) => {\n return new ZodAny({\n typeName: ZodFirstPartyTypeKind.ZodAny,\n ...processCreateParams(params)\n });\n };\n ZodUnknown = class extends ZodType {\n constructor() {\n super(...arguments);\n this._unknown = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n };\n ZodUnknown.create = (params) => {\n return new ZodUnknown({\n typeName: ZodFirstPartyTypeKind.ZodUnknown,\n ...processCreateParams(params)\n });\n };\n ZodNever = class extends ZodType {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.never,\n received: ctx.parsedType\n });\n return INVALID;\n }\n };\n ZodNever.create = (params) => {\n return new ZodNever({\n typeName: ZodFirstPartyTypeKind.ZodNever,\n ...processCreateParams(params)\n });\n };\n ZodVoid = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.void,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return OK(input.data);\n }\n };\n ZodVoid.create = (params) => {\n return new ZodVoid({\n typeName: ZodFirstPartyTypeKind.ZodVoid,\n ...processCreateParams(params)\n });\n };\n ZodArray = class _ZodArray extends ZodType {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType\n });\n return INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n addIssueToContext(ctx, {\n code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,\n minimum: tooSmall ? def.exactLength.value : void 0,\n maximum: tooBig ? def.exactLength.value : void 0,\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i3) => {\n return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i3));\n })).then((result2) => {\n return ParseStatus.mergeArray(status, result2);\n });\n }\n const result = [...ctx.data].map((item, i3) => {\n return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i3));\n });\n return ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength, message2) {\n return new _ZodArray({\n ...this._def,\n minLength: { value: minLength, message: errorUtil.toString(message2) }\n });\n }\n max(maxLength, message2) {\n return new _ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil.toString(message2) }\n });\n }\n length(len, message2) {\n return new _ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil.toString(message2) }\n });\n }\n nonempty(message2) {\n return this.min(1, message2);\n }\n };\n ZodArray.create = (schema, params) => {\n return new ZodArray({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind.ZodArray,\n ...processCreateParams(params)\n });\n };\n ZodObject = class _ZodObject extends ZodType {\n constructor() {\n super(...arguments);\n this._cached = null;\n this.nonstrict = this.passthrough;\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape3 = this._def.shape();\n const keys = util.objectKeys(shape3);\n this._cached = { shape: shape3, keys };\n return this._cached;\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.object) {\n const ctx2 = this._getOrReturnCtx(input);\n addIssueToContext(ctx2, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx2.parsedType\n });\n return INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape: shape3, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape3[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data\n });\n }\n if (this._def.catchall instanceof ZodNever) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] }\n });\n }\n } else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.unrecognized_keys,\n keys: extraKeys\n });\n status.dirty();\n }\n } else if (unknownKeys === \"strip\") {\n } else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n } else {\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(\n new ParseInputLazyPath(ctx, value, ctx.path, key)\n //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve().then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n alwaysSet: pair.alwaysSet\n });\n }\n return syncPairs;\n }).then((syncPairs) => {\n return ParseStatus.mergeObjectSync(status, syncPairs);\n });\n } else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message2) {\n errorUtil.errToObj;\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...message2 !== void 0 ? {\n errorMap: (issue, ctx) => {\n const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: errorUtil.errToObj(message2).message ?? defaultError\n };\n return {\n message: defaultError\n };\n }\n } : {}\n });\n }\n strip() {\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"strip\"\n });\n }\n passthrough() {\n return new _ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\"\n });\n }\n // const AugmentFactory =\n // (def: Def) =>\n // (\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new _ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation\n })\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new _ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape()\n }),\n typeName: ZodFirstPartyTypeKind.ZodObject\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge(\n // merging: Incoming\n // ): //ZodObject = (merging) => {\n // ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index2) {\n return new _ZodObject({\n ...this._def,\n catchall: index2\n });\n }\n pick(mask) {\n const shape3 = {};\n for (const key of util.objectKeys(mask)) {\n if (mask[key] && this.shape[key]) {\n shape3[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape3\n });\n }\n omit(mask) {\n const shape3 = {};\n for (const key of util.objectKeys(this.shape)) {\n if (!mask[key]) {\n shape3[key] = this.shape[key];\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => shape3\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify(this);\n }\n partial(mask) {\n const newShape = {};\n for (const key of util.objectKeys(this.shape)) {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n } else {\n newShape[key] = fieldSchema.optional();\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => newShape\n });\n }\n required(mask) {\n const newShape = {};\n for (const key of util.objectKeys(this.shape)) {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n } else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n }\n return new _ZodObject({\n ...this._def,\n shape: () => newShape\n });\n }\n keyof() {\n return createZodEnum(util.objectKeys(this.shape));\n }\n };\n ZodObject.create = (shape3, params) => {\n return new ZodObject({\n shape: () => shape3,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params)\n });\n };\n ZodObject.strictCreate = (shape3, params) => {\n return new ZodObject({\n shape: () => shape3,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params)\n });\n };\n ZodObject.lazycreate = (shape3, params) => {\n return new ZodObject({\n shape: shape3,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params)\n });\n };\n ZodUnion = class extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n },\n parent: null\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx\n }),\n ctx: childCtx\n };\n })).then(handleResults);\n } else {\n let dirty = void 0;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n },\n parent: null\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx\n });\n if (result.status === \"valid\") {\n return result;\n } else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues2) => new ZodError(issues2));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors\n });\n return INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n };\n ZodUnion.create = (types2, params) => {\n return new ZodUnion({\n options: types2,\n typeName: ZodFirstPartyTypeKind.ZodUnion,\n ...processCreateParams(params)\n });\n };\n getDiscriminator = (type) => {\n if (type instanceof ZodLazy) {\n return getDiscriminator(type.schema);\n } else if (type instanceof ZodEffects) {\n return getDiscriminator(type.innerType());\n } else if (type instanceof ZodLiteral) {\n return [type.value];\n } else if (type instanceof ZodEnum) {\n return type.options;\n } else if (type instanceof ZodNativeEnum) {\n return util.objectValues(type.enum);\n } else if (type instanceof ZodDefault) {\n return getDiscriminator(type._def.innerType);\n } else if (type instanceof ZodUndefined) {\n return [void 0];\n } else if (type instanceof ZodNull) {\n return [null];\n } else if (type instanceof ZodOptional) {\n return [void 0, ...getDiscriminator(type.unwrap())];\n } else if (type instanceof ZodNullable) {\n return [null, ...getDiscriminator(type.unwrap())];\n } else if (type instanceof ZodBranded) {\n return getDiscriminator(type.unwrap());\n } else if (type instanceof ZodReadonly) {\n return getDiscriminator(type.unwrap());\n } else if (type instanceof ZodCatch) {\n return getDiscriminator(type._def.innerType);\n } else {\n return [];\n }\n };\n ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator]\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n } else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n const optionsMap = /* @__PURE__ */ new Map();\n for (const type of options) {\n const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n if (!discriminatorValues.length) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new _ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams(params)\n });\n }\n };\n ZodIntersection = class extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if (isAborted(parsedLeft) || isAborted(parsedRight)) {\n return INVALID;\n }\n const merged = mergeValues(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_intersection_types\n });\n return INVALID;\n }\n if (isDirty(parsedLeft) || isDirty(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n })\n ]).then(([left, right]) => handleParsed(left, right));\n } else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n }));\n }\n }\n };\n ZodIntersection.create = (left, right, params) => {\n return new ZodIntersection({\n left,\n right,\n typeName: ZodFirstPartyTypeKind.ZodIntersection,\n ...processCreateParams(params)\n });\n };\n ZodTuple = class _ZodTuple extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType\n });\n return INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\"\n });\n return INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\"\n });\n status.dirty();\n }\n const items = [...ctx.data].map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n }).filter((x4) => !!x4);\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return ParseStatus.mergeArray(status, results);\n });\n } else {\n return ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new _ZodTuple({\n ...this._def,\n rest\n });\n }\n };\n ZodTuple.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple({\n items: schemas,\n typeName: ZodFirstPartyTypeKind.ZodTuple,\n rest: null,\n ...processCreateParams(params)\n });\n };\n ZodRecord = class _ZodRecord extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n alwaysSet: key in ctx.data\n });\n }\n if (ctx.common.async) {\n return ParseStatus.mergeObjectAsync(status, pairs);\n } else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType) {\n return new _ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(third)\n });\n }\n return new _ZodRecord({\n keyType: ZodString.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(second)\n });\n }\n };\n ZodMap = class extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.map) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.map,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index2) => {\n return {\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index2, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index2, \"value\"]))\n };\n });\n if (ctx.common.async) {\n const finalMap = /* @__PURE__ */ new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n } else {\n const finalMap = /* @__PURE__ */ new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n };\n ZodMap.create = (keyType, valueType, params) => {\n return new ZodMap({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind.ZodMap,\n ...processCreateParams(params)\n });\n };\n ZodSet = class _ZodSet extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.set) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.set,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements2) {\n const parsedSet = /* @__PURE__ */ new Set();\n for (const element of elements2) {\n if (element.status === \"aborted\")\n return INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i3) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i3)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements2) => finalizeSet(elements2));\n } else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message2) {\n return new _ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil.toString(message2) }\n });\n }\n max(maxSize, message2) {\n return new _ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil.toString(message2) }\n });\n }\n size(size6, message2) {\n return this.min(size6, message2).max(size6, message2);\n }\n nonempty(message2) {\n return this.min(1, message2);\n }\n };\n ZodSet.create = (valueType, params) => {\n return new ZodSet({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind.ZodSet,\n ...processCreateParams(params)\n });\n };\n ZodFunction = class _ZodFunction extends ZodType {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.function) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.function,\n received: ctx.parsedType\n });\n return INVALID;\n }\n function makeArgsIssue(args, error) {\n return makeIssue({\n data: args,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x4) => !!x4),\n issueData: {\n code: ZodIssueCode.invalid_arguments,\n argumentsError: error\n }\n });\n }\n function makeReturnsIssue(returns, error) {\n return makeIssue({\n data: returns,\n path: ctx.path,\n errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x4) => !!x4),\n issueData: {\n code: ZodIssueCode.invalid_return_type,\n returnTypeError: error\n }\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise) {\n const me = this;\n return OK(async function(...args) {\n const error = new ZodError([]);\n const parsedArgs = await me._def.args.parseAsync(args, params).catch((e2) => {\n error.addIssue(makeArgsIssue(args, e2));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e2) => {\n error.addIssue(makeReturnsIssue(result, e2));\n throw error;\n });\n return parsedReturns;\n });\n } else {\n const me = this;\n return OK(function(...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new _ZodFunction({\n ...this._def,\n args: ZodTuple.create(items).rest(ZodUnknown.create())\n });\n }\n returns(returnType) {\n return new _ZodFunction({\n ...this._def,\n returns: returnType\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new _ZodFunction({\n args: args ? args : ZodTuple.create([]).rest(ZodUnknown.create()),\n returns: returns || ZodUnknown.create(),\n typeName: ZodFirstPartyTypeKind.ZodFunction,\n ...processCreateParams(params)\n });\n }\n };\n ZodLazy = class extends ZodType {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n };\n ZodLazy.create = (getter, params) => {\n return new ZodLazy({\n getter,\n typeName: ZodFirstPartyTypeKind.ZodLazy,\n ...processCreateParams(params)\n });\n };\n ZodLiteral = class extends ZodType {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_literal,\n expected: this._def.value\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n };\n ZodLiteral.create = (value, params) => {\n return new ZodLiteral({\n value,\n typeName: ZodFirstPartyTypeKind.ZodLiteral,\n ...processCreateParams(params)\n });\n };\n ZodEnum = class _ZodEnum extends ZodType {\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type\n });\n return INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(this._def.values);\n }\n if (!this._cache.has(input.data)) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values, newDef = this._def) {\n return _ZodEnum.create(values, {\n ...this._def,\n ...newDef\n });\n }\n exclude(values, newDef = this._def) {\n return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {\n ...this._def,\n ...newDef\n });\n }\n };\n ZodEnum.create = createZodEnum;\n ZodNativeEnum = class extends ZodType {\n _parse(input) {\n const nativeEnumValues = util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type\n });\n return INVALID;\n }\n if (!this._cache) {\n this._cache = new Set(util.getValidEnumValues(this._def.values));\n }\n if (!this._cache.has(input.data)) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get enum() {\n return this._def.values;\n }\n };\n ZodNativeEnum.create = (values, params) => {\n return new ZodNativeEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n ...processCreateParams(params)\n });\n };\n ZodPromise = class extends ZodType {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.promise,\n received: ctx.parsedType\n });\n return INVALID;\n }\n const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);\n return OK(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap\n });\n }));\n }\n };\n ZodPromise.create = (schema, params) => {\n return new ZodPromise({\n type: schema,\n typeName: ZodFirstPartyTypeKind.ZodPromise,\n ...processCreateParams(params)\n });\n };\n ZodEffects = class extends ZodType {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects ? this._def.schema.sourceType() : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n addIssueToContext(ctx, arg);\n if (arg.fatal) {\n status.abort();\n } else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n }\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(processed).then(async (processed2) => {\n if (status.value === \"aborted\")\n return INVALID;\n const result = await this._def.schema._parseAsync({\n data: processed2,\n path: ctx.path,\n parent: ctx\n });\n if (result.status === \"aborted\")\n return INVALID;\n if (result.status === \"dirty\")\n return DIRTY(result.value);\n if (status.value === \"dirty\")\n return DIRTY(result.value);\n return result;\n });\n } else {\n if (status.value === \"aborted\")\n return INVALID;\n const result = this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx\n });\n if (result.status === \"aborted\")\n return INVALID;\n if (result.status === \"dirty\")\n return DIRTY(result.value);\n if (status.value === \"dirty\")\n return DIRTY(result.value);\n return result;\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n } else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => {\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base4 = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (!isValid(base4))\n return INVALID;\n const result = effect.transform(base4.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n } else {\n return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base4) => {\n if (!isValid(base4))\n return INVALID;\n return Promise.resolve(effect.transform(base4.value, checkCtx)).then((result) => ({\n status: status.value,\n value: result\n }));\n });\n }\n }\n util.assertNever(effect);\n }\n };\n ZodEffects.create = (schema, effect, params) => {\n return new ZodEffects({\n schema,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect,\n ...processCreateParams(params)\n });\n };\n ZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n ...processCreateParams(params)\n });\n };\n ZodOptional = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.undefined) {\n return OK(void 0);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n ZodOptional.create = (type, params) => {\n return new ZodOptional({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodOptional,\n ...processCreateParams(params)\n });\n };\n ZodNullable = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.null) {\n return OK(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n ZodNullable.create = (type, params) => {\n return new ZodNullable({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodNullable,\n ...processCreateParams(params)\n });\n };\n ZodDefault = class extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n };\n ZodDefault.create = (type, params) => {\n return new ZodDefault({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n defaultValue: typeof params.default === \"function\" ? params.default : () => params.default,\n ...processCreateParams(params)\n });\n };\n ZodCatch = class extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: []\n }\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx\n }\n });\n if (isAsync(result)) {\n return result.then((result2) => {\n return {\n status: \"valid\",\n value: result2.status === \"valid\" ? result2.value : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data\n })\n };\n });\n } else {\n return {\n status: \"valid\",\n value: result.status === \"valid\" ? result.value : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data\n })\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n };\n ZodCatch.create = (type, params) => {\n return new ZodCatch({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams(params)\n });\n };\n ZodNaN = class extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.nan,\n received: ctx.parsedType\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n };\n ZodNaN.create = (params) => {\n return new ZodNaN({\n typeName: ZodFirstPartyTypeKind.ZodNaN,\n ...processCreateParams(params)\n });\n };\n BRAND = Symbol(\"zod_brand\");\n ZodBranded = class extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx\n });\n }\n unwrap() {\n return this._def.type;\n }\n };\n ZodPipeline = class _ZodPipeline extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return DIRTY(inResult.value);\n } else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx\n });\n }\n };\n return handleAsync();\n } else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value\n };\n } else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx\n });\n }\n }\n }\n static create(a3, b4) {\n return new _ZodPipeline({\n in: a3,\n out: b4,\n typeName: ZodFirstPartyTypeKind.ZodPipeline\n });\n }\n };\n ZodReadonly = class extends ZodType {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n const freeze = (data) => {\n if (isValid(data)) {\n data.value = Object.freeze(data.value);\n }\n return data;\n };\n return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);\n }\n unwrap() {\n return this._def.innerType;\n }\n };\n ZodReadonly.create = (type, params) => {\n return new ZodReadonly({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodReadonly,\n ...processCreateParams(params)\n });\n };\n late = {\n object: ZodObject.lazycreate\n };\n (function(ZodFirstPartyTypeKind2) {\n ZodFirstPartyTypeKind2[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind2[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind2[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind2[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind2[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind2[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind2[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind2[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind2[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind2[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind2[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind2[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind2[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind2[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind2[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind2[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind2[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind2[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind2[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind2[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind2[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind2[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind2[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind2[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind2[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind2[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind2[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind2[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind2[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind2[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind2[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind2[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind2[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind2[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind2[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind2[\"ZodReadonly\"] = \"ZodReadonly\";\n })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\n instanceOfType = (cls, params = {\n message: `Input not instance of ${cls.name}`\n }) => custom2((data) => data instanceof cls, params);\n stringType = ZodString.create;\n numberType = ZodNumber.create;\n nanType = ZodNaN.create;\n bigIntType = ZodBigInt.create;\n booleanType = ZodBoolean.create;\n dateType = ZodDate.create;\n symbolType = ZodSymbol.create;\n undefinedType = ZodUndefined.create;\n nullType = ZodNull.create;\n anyType = ZodAny.create;\n unknownType = ZodUnknown.create;\n neverType = ZodNever.create;\n voidType = ZodVoid.create;\n arrayType = ZodArray.create;\n objectType = ZodObject.create;\n strictObjectType = ZodObject.strictCreate;\n unionType = ZodUnion.create;\n discriminatedUnionType = ZodDiscriminatedUnion.create;\n intersectionType = ZodIntersection.create;\n tupleType = ZodTuple.create;\n recordType = ZodRecord.create;\n mapType = ZodMap.create;\n setType = ZodSet.create;\n functionType = ZodFunction.create;\n lazyType = ZodLazy.create;\n literalType = ZodLiteral.create;\n enumType = ZodEnum.create;\n nativeEnumType = ZodNativeEnum.create;\n promiseType = ZodPromise.create;\n effectsType = ZodEffects.create;\n optionalType = ZodOptional.create;\n nullableType = ZodNullable.create;\n preprocessType = ZodEffects.createWithPreprocess;\n pipelineType = ZodPipeline.create;\n ostring = () => stringType().optional();\n onumber = () => numberType().optional();\n oboolean = () => booleanType().optional();\n coerce = {\n string: (arg) => ZodString.create({ ...arg, coerce: true }),\n number: (arg) => ZodNumber.create({ ...arg, coerce: true }),\n boolean: (arg) => ZodBoolean.create({\n ...arg,\n coerce: true\n }),\n bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),\n date: (arg) => ZodDate.create({ ...arg, coerce: true })\n };\n NEVER = INVALID;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/external.js\n var external_exports = {};\n __export(external_exports, {\n BRAND: () => BRAND,\n DIRTY: () => DIRTY,\n EMPTY_PATH: () => EMPTY_PATH,\n INVALID: () => INVALID,\n NEVER: () => NEVER,\n OK: () => OK,\n ParseStatus: () => ParseStatus,\n Schema: () => ZodType,\n ZodAny: () => ZodAny,\n ZodArray: () => ZodArray,\n ZodBigInt: () => ZodBigInt,\n ZodBoolean: () => ZodBoolean,\n ZodBranded: () => ZodBranded,\n ZodCatch: () => ZodCatch,\n ZodDate: () => ZodDate,\n ZodDefault: () => ZodDefault,\n ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,\n ZodEffects: () => ZodEffects,\n ZodEnum: () => ZodEnum,\n ZodError: () => ZodError,\n ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,\n ZodFunction: () => ZodFunction,\n ZodIntersection: () => ZodIntersection,\n ZodIssueCode: () => ZodIssueCode,\n ZodLazy: () => ZodLazy,\n ZodLiteral: () => ZodLiteral,\n ZodMap: () => ZodMap,\n ZodNaN: () => ZodNaN,\n ZodNativeEnum: () => ZodNativeEnum,\n ZodNever: () => ZodNever,\n ZodNull: () => ZodNull,\n ZodNullable: () => ZodNullable,\n ZodNumber: () => ZodNumber,\n ZodObject: () => ZodObject,\n ZodOptional: () => ZodOptional,\n ZodParsedType: () => ZodParsedType,\n ZodPipeline: () => ZodPipeline,\n ZodPromise: () => ZodPromise,\n ZodReadonly: () => ZodReadonly,\n ZodRecord: () => ZodRecord,\n ZodSchema: () => ZodType,\n ZodSet: () => ZodSet,\n ZodString: () => ZodString,\n ZodSymbol: () => ZodSymbol,\n ZodTransformer: () => ZodEffects,\n ZodTuple: () => ZodTuple,\n ZodType: () => ZodType,\n ZodUndefined: () => ZodUndefined,\n ZodUnion: () => ZodUnion,\n ZodUnknown: () => ZodUnknown,\n ZodVoid: () => ZodVoid,\n addIssueToContext: () => addIssueToContext,\n any: () => anyType,\n array: () => arrayType,\n bigint: () => bigIntType,\n boolean: () => booleanType,\n coerce: () => coerce,\n custom: () => custom2,\n date: () => dateType,\n datetimeRegex: () => datetimeRegex,\n defaultErrorMap: () => en_default,\n discriminatedUnion: () => discriminatedUnionType,\n effect: () => effectsType,\n enum: () => enumType,\n function: () => functionType,\n getErrorMap: () => getErrorMap,\n getParsedType: () => getParsedType,\n instanceof: () => instanceOfType,\n intersection: () => intersectionType,\n isAborted: () => isAborted,\n isAsync: () => isAsync,\n isDirty: () => isDirty,\n isValid: () => isValid,\n late: () => late,\n lazy: () => lazyType,\n literal: () => literalType,\n makeIssue: () => makeIssue,\n map: () => mapType,\n nan: () => nanType,\n nativeEnum: () => nativeEnumType,\n never: () => neverType,\n null: () => nullType,\n nullable: () => nullableType,\n number: () => numberType,\n object: () => objectType,\n objectUtil: () => objectUtil,\n oboolean: () => oboolean,\n onumber: () => onumber,\n optional: () => optionalType,\n ostring: () => ostring,\n pipeline: () => pipelineType,\n preprocess: () => preprocessType,\n promise: () => promiseType,\n quotelessJson: () => quotelessJson,\n record: () => recordType,\n set: () => setType,\n setErrorMap: () => setErrorMap,\n strictObject: () => strictObjectType,\n string: () => stringType,\n symbol: () => symbolType,\n transformer: () => effectsType,\n tuple: () => tupleType,\n undefined: () => undefinedType,\n union: () => unionType,\n unknown: () => unknownType,\n util: () => util,\n void: () => voidType\n });\n var init_external = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/external.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors6();\n init_parseUtil();\n init_typeAliases();\n init_util();\n init_types2();\n init_ZodError();\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/index.js\n var v3_default;\n var init_v3 = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/v3/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_external();\n init_external();\n v3_default = external_exports;\n }\n });\n\n // ../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/index.js\n var esm_default;\n var init_esm5 = __esm({\n \"../../../node_modules/.pnpm/zod@3.25.64/node_modules/zod/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v3();\n init_v3();\n esm_default = v3_default;\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/schema.js\n function isBigNumberish(x4) {\n return x4 != null && BigNumberishSchema.safeParse(x4).success;\n }\n function isMultiplier(x4) {\n return x4 != null && MultiplierSchema.safeParse(x4).success;\n }\n var ChainSchema, HexSchema, BigNumberishSchema, BigNumberishRangeSchema, MultiplierSchema;\n var init_schema = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/schema.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm5();\n ChainSchema = external_exports.custom((chain2) => chain2 != null && typeof chain2 === \"object\" && \"id\" in chain2 && typeof chain2.id === \"number\");\n HexSchema = external_exports.custom((val) => {\n return isHex(val, { strict: true });\n });\n BigNumberishSchema = external_exports.union([HexSchema, external_exports.number(), external_exports.bigint()]);\n BigNumberishRangeSchema = external_exports.object({\n min: BigNumberishSchema.optional(),\n max: BigNumberishSchema.optional()\n }).strict();\n MultiplierSchema = external_exports.object({\n /**\n * Multiplier value with max precision of 4 decimal places\n */\n multiplier: external_exports.number().refine((n2) => {\n return (n2.toString().split(\".\")[1]?.length ?? 0) <= 4;\n }, { message: \"Max precision is 4 decimal places\" })\n }).strict();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/bigint.js\n var bigIntMax, bigIntClamp, RoundingMode, bigIntMultiply;\n var init_bigint = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/bigint.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_schema();\n bigIntMax = (...args) => {\n if (!args.length) {\n throw new Error(\"bigIntMax requires at least one argument\");\n }\n return args.reduce((m2, c4) => m2 > c4 ? m2 : c4);\n };\n bigIntClamp = (value, lower, upper) => {\n lower = lower != null ? BigInt(lower) : null;\n upper = upper != null ? BigInt(upper) : null;\n if (upper != null && lower != null && upper < lower) {\n throw new Error(`invalid range: upper bound ${upper} is less than lower bound ${lower}`);\n }\n let ret = BigInt(value);\n if (lower != null && lower > ret) {\n ret = lower;\n }\n if (upper != null && upper < ret) {\n ret = upper;\n }\n return ret;\n };\n (function(RoundingMode2) {\n RoundingMode2[RoundingMode2[\"ROUND_DOWN\"] = 0] = \"ROUND_DOWN\";\n RoundingMode2[RoundingMode2[\"ROUND_UP\"] = 1] = \"ROUND_UP\";\n })(RoundingMode || (RoundingMode = {}));\n bigIntMultiply = (base4, multiplier, roundingMode = RoundingMode.ROUND_UP) => {\n if (!isMultiplier({ multiplier })) {\n throw new Error(\"bigIntMultiply requires a multiplier validated number as the second argument\");\n }\n const decimalPlaces = multiplier.toString().split(\".\")[1]?.length ?? 0;\n const val = roundingMode === RoundingMode.ROUND_UP ? BigInt(base4) * BigInt(Math.round(multiplier * 10 ** decimalPlaces)) + BigInt(10 ** decimalPlaces - 1) : BigInt(base4) * BigInt(Math.round(multiplier * 10 ** decimalPlaces));\n return val / BigInt(10 ** decimalPlaces);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/bytes.js\n var takeBytes;\n var init_bytes3 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n takeBytes = (bytes, opts = {}) => {\n const { offset, count } = opts;\n const start = (offset ? offset * 2 : 0) + 2;\n const end = count ? start + count * 2 : void 0;\n return `0x${bytes.slice(start, end)}`;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/contracts.js\n var contracts;\n var init_contracts2 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/contracts.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n contracts = {\n gasPriceOracle: { address: \"0x420000000000000000000000000000000000000F\" },\n l1Block: { address: \"0x4200000000000000000000000000000000000015\" },\n l2CrossDomainMessenger: {\n address: \"0x4200000000000000000000000000000000000007\"\n },\n l2Erc721Bridge: { address: \"0x4200000000000000000000000000000000000014\" },\n l2StandardBridge: { address: \"0x4200000000000000000000000000000000000010\" },\n l2ToL1MessagePasser: {\n address: \"0x4200000000000000000000000000000000000016\"\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/formatters.js\n var formatters;\n var init_formatters = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/formatters.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_fromHex();\n init_block2();\n init_transaction2();\n init_transactionReceipt();\n formatters = {\n block: /* @__PURE__ */ defineBlock({\n format(args) {\n const transactions = args.transactions?.map((transaction) => {\n if (typeof transaction === \"string\")\n return transaction;\n const formatted = formatTransaction(transaction);\n if (formatted.typeHex === \"0x7e\") {\n formatted.isSystemTx = transaction.isSystemTx;\n formatted.mint = transaction.mint ? hexToBigInt(transaction.mint) : void 0;\n formatted.sourceHash = transaction.sourceHash;\n formatted.type = \"deposit\";\n }\n return formatted;\n });\n return {\n transactions,\n stateRoot: args.stateRoot\n };\n }\n }),\n transaction: /* @__PURE__ */ defineTransaction({\n format(args) {\n const transaction = {};\n if (args.type === \"0x7e\") {\n transaction.isSystemTx = args.isSystemTx;\n transaction.mint = args.mint ? hexToBigInt(args.mint) : void 0;\n transaction.sourceHash = args.sourceHash;\n transaction.type = \"deposit\";\n }\n return transaction;\n }\n }),\n transactionReceipt: /* @__PURE__ */ defineTransactionReceipt({\n format(args) {\n return {\n l1GasPrice: args.l1GasPrice ? hexToBigInt(args.l1GasPrice) : null,\n l1GasUsed: args.l1GasUsed ? hexToBigInt(args.l1GasUsed) : null,\n l1Fee: args.l1Fee ? hexToBigInt(args.l1Fee) : null,\n l1FeeScalar: args.l1FeeScalar ? Number(args.l1FeeScalar) : null\n };\n }\n })\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/serializers.js\n function serializeTransaction2(transaction, signature) {\n if (isDeposit(transaction))\n return serializeTransactionDeposit(transaction);\n return serializeTransaction(transaction, signature);\n }\n function serializeTransactionDeposit(transaction) {\n assertTransactionDeposit(transaction);\n const { sourceHash, data, from: from14, gas, isSystemTx, mint, to, value } = transaction;\n const serializedTransaction = [\n sourceHash,\n from14,\n to ?? \"0x\",\n mint ? toHex(mint) : \"0x\",\n value ? toHex(value) : \"0x\",\n gas ? toHex(gas) : \"0x\",\n isSystemTx ? \"0x1\" : \"0x\",\n data ?? \"0x\"\n ];\n return concatHex([\n \"0x7e\",\n toRlp(serializedTransaction)\n ]);\n }\n function isDeposit(transaction) {\n if (transaction.type === \"deposit\")\n return true;\n if (typeof transaction.sourceHash !== \"undefined\")\n return true;\n return false;\n }\n function assertTransactionDeposit(transaction) {\n const { from: from14, to } = transaction;\n if (from14 && !isAddress(from14))\n throw new InvalidAddressError({ address: from14 });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n }\n var serializers;\n var init_serializers = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/serializers.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_address();\n init_isAddress();\n init_concat();\n init_toHex();\n init_toRlp();\n init_serializeTransaction();\n serializers = {\n transaction: serializeTransaction2\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/chainConfig.js\n var chainConfig;\n var init_chainConfig = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/op-stack/chainConfig.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_contracts2();\n init_formatters();\n init_serializers();\n chainConfig = {\n blockTime: 2e3,\n contracts,\n formatters,\n serializers\n };\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrum.js\n var arbitrum;\n var init_arbitrum = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrum.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n arbitrum = /* @__PURE__ */ defineChain({\n id: 42161,\n name: \"Arbitrum One\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n blockTime: 250,\n rpcUrls: {\n default: {\n http: [\"https://arb1.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Arbiscan\",\n url: \"https://arbiscan.io\",\n apiUrl: \"https://api.arbiscan.io/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 7654707\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumGoerli.js\n var arbitrumGoerli;\n var init_arbitrumGoerli = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumGoerli.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n arbitrumGoerli = /* @__PURE__ */ defineChain({\n id: 421613,\n name: \"Arbitrum Goerli\",\n nativeCurrency: {\n name: \"Arbitrum Goerli Ether\",\n symbol: \"ETH\",\n decimals: 18\n },\n rpcUrls: {\n default: {\n http: [\"https://goerli-rollup.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Arbiscan\",\n url: \"https://goerli.arbiscan.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 88114\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumNova.js\n var arbitrumNova;\n var init_arbitrumNova = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumNova.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n arbitrumNova = /* @__PURE__ */ defineChain({\n id: 42170,\n name: \"Arbitrum Nova\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://nova.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Arbiscan\",\n url: \"https://nova.arbiscan.io\",\n apiUrl: \"https://api-nova.arbiscan.io/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1746963\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumSepolia.js\n var arbitrumSepolia;\n var init_arbitrumSepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/arbitrumSepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n arbitrumSepolia = /* @__PURE__ */ defineChain({\n id: 421614,\n name: \"Arbitrum Sepolia\",\n blockTime: 250,\n nativeCurrency: {\n name: \"Arbitrum Sepolia Ether\",\n symbol: \"ETH\",\n decimals: 18\n },\n rpcUrls: {\n default: {\n http: [\"https://sepolia-rollup.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Arbiscan\",\n url: \"https://sepolia.arbiscan.io\",\n apiUrl: \"https://api-sepolia.arbiscan.io/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 81930\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/base.js\n var sourceId, base, basePreconf;\n var init_base3 = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId = 1;\n base = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 8453,\n name: \"Base\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.base.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Basescan\",\n url: \"https://basescan.org\",\n apiUrl: \"https://api.basescan.org/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId]: {\n address: \"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e\"\n }\n },\n l2OutputOracle: {\n [sourceId]: {\n address: \"0x56315b90c40730925ec5485cf004d835058518A0\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 5022\n },\n portal: {\n [sourceId]: {\n address: \"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e\",\n blockCreated: 17482143\n }\n },\n l1StandardBridge: {\n [sourceId]: {\n address: \"0x3154Cf16ccdb4C6d922629664174b904d80F2C35\",\n blockCreated: 17482143\n }\n }\n },\n sourceId\n });\n basePreconf = /* @__PURE__ */ defineChain({\n ...base,\n experimental_preconfirmationTime: 200,\n rpcUrls: {\n default: {\n http: [\"https://mainnet-preconf.base.org\"]\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/baseGoerli.js\n var sourceId2, baseGoerli;\n var init_baseGoerli = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/baseGoerli.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId2 = 5;\n baseGoerli = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 84531,\n name: \"Base Goerli\",\n nativeCurrency: { name: \"Goerli Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: { http: [\"https://goerli.base.org\"] }\n },\n blockExplorers: {\n default: {\n name: \"Basescan\",\n url: \"https://goerli.basescan.org\",\n apiUrl: \"https://goerli.basescan.org/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId2]: {\n address: \"0x2A35891ff30313CcFa6CE88dcf3858bb075A2298\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1376988\n },\n portal: {\n [sourceId2]: {\n address: \"0xe93c8cD0D409341205A592f8c4Ac1A5fe5585cfA\"\n }\n },\n l1StandardBridge: {\n [sourceId2]: {\n address: \"0xfA6D8Ee5BE770F84FC001D098C4bD604Fe01284a\"\n }\n }\n },\n testnet: true,\n sourceId: sourceId2\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/baseSepolia.js\n var sourceId3, baseSepolia, baseSepoliaPreconf;\n var init_baseSepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/baseSepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId3 = 11155111;\n baseSepolia = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 84532,\n network: \"base-sepolia\",\n name: \"Base Sepolia\",\n nativeCurrency: { name: \"Sepolia Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://sepolia.base.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Basescan\",\n url: \"https://sepolia.basescan.org\",\n apiUrl: \"https://api-sepolia.basescan.org/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId3]: {\n address: \"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1\"\n }\n },\n l2OutputOracle: {\n [sourceId3]: {\n address: \"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254\"\n }\n },\n portal: {\n [sourceId3]: {\n address: \"0x49f53e41452c74589e85ca1677426ba426459e85\",\n blockCreated: 4446677\n }\n },\n l1StandardBridge: {\n [sourceId3]: {\n address: \"0xfd0Bf71F60660E2f608ed56e1659C450eB113120\",\n blockCreated: 4446677\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1059647\n }\n },\n testnet: true,\n sourceId: sourceId3\n });\n baseSepoliaPreconf = /* @__PURE__ */ defineChain({\n ...baseSepolia,\n experimental_preconfirmationTime: 200,\n rpcUrls: {\n default: {\n http: [\"https://sepolia-preconf.base.org\"]\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/fraxtal.js\n var sourceId4, fraxtal;\n var init_fraxtal = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/fraxtal.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId4 = 1;\n fraxtal = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 252,\n name: \"Fraxtal\",\n nativeCurrency: { name: \"Frax\", symbol: \"FRAX\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.frax.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"fraxscan\",\n url: \"https://fraxscan.com\",\n apiUrl: \"https://api.fraxscan.com/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId4]: {\n address: \"0x66CC916Ed5C6C2FA97014f7D1cD141528Ae171e4\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\"\n },\n portal: {\n [sourceId4]: {\n address: \"0x36cb65c1967A0Fb0EEE11569C51C2f2aA1Ca6f6D\",\n blockCreated: 19135323\n }\n },\n l1StandardBridge: {\n [sourceId4]: {\n address: \"0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2\",\n blockCreated: 19135323\n }\n }\n },\n sourceId: sourceId4\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/goerli.js\n var goerli;\n var init_goerli = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/goerli.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n goerli = /* @__PURE__ */ defineChain({\n id: 5,\n name: \"Goerli\",\n nativeCurrency: { name: \"Goerli Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://5.rpc.thirdweb.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Etherscan\",\n url: \"https://goerli.etherscan.io\",\n apiUrl: \"https://api-goerli.etherscan.io/api\"\n }\n },\n contracts: {\n ensRegistry: {\n address: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\"\n },\n ensUniversalResolver: {\n address: \"0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1\",\n blockCreated: 10339206\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 6507670\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/mainnet.js\n var mainnet;\n var init_mainnet = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/mainnet.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n mainnet = /* @__PURE__ */ defineChain({\n id: 1,\n name: \"Ethereum\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n blockTime: 12e3,\n rpcUrls: {\n default: {\n http: [\"https://eth.merkle.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Etherscan\",\n url: \"https://etherscan.io\",\n apiUrl: \"https://api.etherscan.io/api\"\n }\n },\n contracts: {\n ensUniversalResolver: {\n address: \"0xeeeeeeee14d718c2b47d9923deab1335e144eeee\",\n blockCreated: 23085558\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 14353601\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimism.js\n var sourceId5, optimism;\n var init_optimism = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimism.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId5 = 1;\n optimism = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 10,\n name: \"OP Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.optimism.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Optimism Explorer\",\n url: \"https://optimistic.etherscan.io\",\n apiUrl: \"https://api-optimistic.etherscan.io/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId5]: {\n address: \"0xe5965Ab5962eDc7477C8520243A95517CD252fA9\"\n }\n },\n l2OutputOracle: {\n [sourceId5]: {\n address: \"0xdfe97868233d1aa22e815a266982f2cf17685a27\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 4286263\n },\n portal: {\n [sourceId5]: {\n address: \"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed\"\n }\n },\n l1StandardBridge: {\n [sourceId5]: {\n address: \"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1\"\n }\n }\n },\n sourceId: sourceId5\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimismGoerli.js\n var sourceId6, optimismGoerli;\n var init_optimismGoerli = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimismGoerli.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId6 = 5;\n optimismGoerli = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 420,\n name: \"Optimism Goerli\",\n nativeCurrency: { name: \"Goerli Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://goerli.optimism.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Etherscan\",\n url: \"https://goerli-optimism.etherscan.io\",\n apiUrl: \"https://goerli-optimism.etherscan.io/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId6]: {\n address: \"0xE6Dfba0953616Bacab0c9A8ecb3a9BBa77FC15c0\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 49461\n },\n portal: {\n [sourceId6]: {\n address: \"0x5b47E1A08Ea6d985D6649300584e6722Ec4B1383\"\n }\n },\n l1StandardBridge: {\n [sourceId6]: {\n address: \"0x636Af16bf2f682dD3109e60102b8E1A089FedAa8\"\n }\n }\n },\n testnet: true,\n sourceId: sourceId6\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimismSepolia.js\n var sourceId7, optimismSepolia;\n var init_optimismSepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/optimismSepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId7 = 11155111;\n optimismSepolia = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 11155420,\n name: \"OP Sepolia\",\n nativeCurrency: { name: \"Sepolia Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://sepolia.optimism.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Blockscout\",\n url: \"https://optimism-sepolia.blockscout.com\",\n apiUrl: \"https://optimism-sepolia.blockscout.com/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n disputeGameFactory: {\n [sourceId7]: {\n address: \"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1\"\n }\n },\n l2OutputOracle: {\n [sourceId7]: {\n address: \"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F\"\n }\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1620204\n },\n portal: {\n [sourceId7]: {\n address: \"0x16Fc5058F25648194471939df75CF27A2fdC48BC\"\n }\n },\n l1StandardBridge: {\n [sourceId7]: {\n address: \"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1\"\n }\n }\n },\n testnet: true,\n sourceId: sourceId7\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygon.js\n var polygon;\n var init_polygon = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygon.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n polygon = /* @__PURE__ */ defineChain({\n id: 137,\n name: \"Polygon\",\n blockTime: 2e3,\n nativeCurrency: { name: \"POL\", symbol: \"POL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://polygon-rpc.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"PolygonScan\",\n url: \"https://polygonscan.com\",\n apiUrl: \"https://api.polygonscan.com/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 25770160\n }\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygonAmoy.js\n var polygonAmoy;\n var init_polygonAmoy = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygonAmoy.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n polygonAmoy = /* @__PURE__ */ defineChain({\n id: 80002,\n name: \"Polygon Amoy\",\n nativeCurrency: { name: \"POL\", symbol: \"POL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc-amoy.polygon.technology\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"PolygonScan\",\n url: \"https://amoy.polygonscan.com\",\n apiUrl: \"https://api-amoy.polygonscan.com/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 3127388\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygonMumbai.js\n var polygonMumbai;\n var init_polygonMumbai = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/polygonMumbai.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n polygonMumbai = /* @__PURE__ */ defineChain({\n id: 80001,\n name: \"Polygon Mumbai\",\n nativeCurrency: { name: \"MATIC\", symbol: \"MATIC\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://80001.rpc.thirdweb.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"PolygonScan\",\n url: \"https://mumbai.polygonscan.com\",\n apiUrl: \"https://api-testnet.polygonscan.com/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 25770160\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/sepolia.js\n var sepolia;\n var init_sepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/sepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_defineChain();\n sepolia = /* @__PURE__ */ defineChain({\n id: 11155111,\n name: \"Sepolia\",\n nativeCurrency: { name: \"Sepolia Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://11155111.rpc.thirdweb.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Etherscan\",\n url: \"https://sepolia.etherscan.io\",\n apiUrl: \"https://api-sepolia.etherscan.io/api\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 751532\n },\n ensUniversalResolver: {\n address: \"0xeeeeeeee14d718c2b47d9923deab1335e144eeee\",\n blockCreated: 8928790\n }\n },\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/zora.js\n var sourceId8, zora;\n var init_zora = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/zora.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId8 = 1;\n zora = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 7777777,\n name: \"Zora\",\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.zora.energy\"],\n webSocket: [\"wss://rpc.zora.energy\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Explorer\",\n url: \"https://explorer.zora.energy\",\n apiUrl: \"https://explorer.zora.energy/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId8]: {\n address: \"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c\"\n }\n },\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 5882\n },\n portal: {\n [sourceId8]: {\n address: \"0x1a0ad011913A150f69f6A19DF447A0CfD9551054\"\n }\n },\n l1StandardBridge: {\n [sourceId8]: {\n address: \"0x3e2Ea9B92B7E48A52296fD261dc26fd995284631\"\n }\n }\n },\n sourceId: sourceId8\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/zoraSepolia.js\n var sourceId9, zoraSepolia;\n var init_zoraSepolia = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/definitions/zoraSepolia.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chainConfig();\n init_defineChain();\n sourceId9 = 11155111;\n zoraSepolia = /* @__PURE__ */ defineChain({\n ...chainConfig,\n id: 999999999,\n name: \"Zora Sepolia\",\n network: \"zora-sepolia\",\n nativeCurrency: {\n decimals: 18,\n name: \"Zora Sepolia\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: {\n http: [\"https://sepolia.rpc.zora.energy\"],\n webSocket: [\"wss://sepolia.rpc.zora.energy\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Zora Sepolia Explorer\",\n url: \"https://sepolia.explorer.zora.energy/\",\n apiUrl: \"https://sepolia.explorer.zora.energy/api\"\n }\n },\n contracts: {\n ...chainConfig.contracts,\n l2OutputOracle: {\n [sourceId9]: {\n address: \"0x2615B481Bd3E5A1C0C7Ca3Da1bdc663E8615Ade9\"\n }\n },\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 83160\n },\n portal: {\n [sourceId9]: {\n address: \"0xeffE2C6cA9Ab797D418f0D91eA60807713f3536f\"\n }\n },\n l1StandardBridge: {\n [sourceId9]: {\n address: \"0x5376f1D543dcbB5BD416c56C189e4cB7399fCcCB\"\n }\n }\n },\n sourceId: sourceId9,\n testnet: true\n });\n }\n });\n\n // ../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/index.js\n var init_chains = __esm({\n \"../../../node_modules/.pnpm/viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64/node_modules/viem/_esm/chains/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_arbitrum();\n init_arbitrumGoerli();\n init_arbitrumNova();\n init_arbitrumSepolia();\n init_base3();\n init_baseGoerli();\n init_baseSepolia();\n init_fraxtal();\n init_goerli();\n init_mainnet();\n init_optimism();\n init_optimismGoerli();\n init_optimismSepolia();\n init_polygon();\n init_polygonAmoy();\n init_polygonMumbai();\n init_sepolia();\n init_zora();\n init_zoraSepolia();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/defaults.js\n var minPriorityFeePerBidDefaults;\n var init_defaults = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/defaults.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains();\n minPriorityFeePerBidDefaults = /* @__PURE__ */ new Map([\n [arbitrum.id, 10000000n],\n [arbitrumGoerli.id, 10000000n],\n [arbitrumSepolia.id, 10000000n]\n ]);\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/userop.js\n function isValidRequest(request) {\n return request.callGasLimit != null && request.preVerificationGas != null && request.verificationGasLimit != null && request.maxFeePerGas != null && request.maxPriorityFeePerGas != null && isValidPaymasterAndData(request) && isValidFactoryAndData(request);\n }\n function isValidPaymasterAndData(request) {\n if (\"paymasterAndData\" in request) {\n return request.paymasterAndData != null;\n }\n return allEqual(request.paymaster == null, request.paymasterData == null, request.paymasterPostOpGasLimit == null, request.paymasterVerificationGasLimit == null);\n }\n function isValidFactoryAndData(request) {\n if (\"initCode\" in request) {\n const { initCode } = request;\n return initCode != null;\n }\n return allEqual(request.factory == null, request.factoryData == null);\n }\n function applyUserOpOverride(value, override) {\n if (override == null) {\n return value;\n }\n if (isBigNumberish(override)) {\n return override;\n } else {\n return value != null ? bigIntMultiply(value, override.multiplier) : value;\n }\n }\n function applyUserOpFeeOption(value, feeOption) {\n if (feeOption == null) {\n return value;\n }\n return value != null ? bigIntClamp(feeOption.multiplier ? bigIntMultiply(value, feeOption.multiplier) : value, feeOption.min, feeOption.max) : feeOption.min ?? 0n;\n }\n function applyUserOpOverrideOrFeeOption(value, override, feeOption) {\n return value != null && override != null ? applyUserOpOverride(value, override) : applyUserOpFeeOption(value, feeOption);\n }\n var bypassPaymasterAndData;\n var init_userop = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/userop.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_bigint();\n init_utils10();\n bypassPaymasterAndData = (overrides) => !!overrides && (\"paymasterAndData\" in overrides || \"paymasterData\" in overrides);\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/index.js\n async function resolveProperties(object) {\n const promises = Object.keys(object).map((key) => {\n const value = object[key];\n return Promise.resolve(value).then((v2) => ({ key, value: v2 }));\n });\n const results = await Promise.all(promises);\n return filterUndefined(results.reduce((accum, curr) => {\n accum[curr.key] = curr.value;\n return accum;\n }, {}));\n }\n function deepHexlify(obj) {\n if (typeof obj === \"function\") {\n return void 0;\n }\n if (obj == null || typeof obj === \"string\" || typeof obj === \"boolean\") {\n return obj;\n } else if (typeof obj === \"bigint\") {\n return toHex(obj);\n } else if (obj._isBigNumber != null || typeof obj !== \"object\") {\n return toHex(obj).replace(/^0x0/, \"0x\");\n }\n if (Array.isArray(obj)) {\n return obj.map((member) => deepHexlify(member));\n }\n return Object.keys(obj).reduce((set, key) => ({\n ...set,\n [key]: deepHexlify(obj[key])\n }), {});\n }\n function filterUndefined(obj) {\n for (const key in obj) {\n if (obj[key] == null) {\n delete obj[key];\n }\n }\n return obj;\n }\n var allEqual, conditionalReturn;\n var init_utils10 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_bigint();\n init_bytes3();\n init_defaults();\n init_schema();\n init_userop();\n allEqual = (...params) => {\n if (params.length === 0) {\n throw new Error(\"no values passed in\");\n }\n return params.every((v2) => v2 === params[0]);\n };\n conditionalReturn = (condition, value) => condition.then((t3) => t3 ? value() : void 0);\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js\n async function buildUserOperationFromTxs(client_, args) {\n const client = clientHeaderTrack(client_, \"buildUserOperationFromTxs\");\n const { account = client.account, requests, overrides, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"buildUserOperationFromTxs\", client);\n }\n const batch = requests.map((request) => {\n if (!request.to) {\n throw new TransactionMissingToParamError();\n }\n return {\n target: request.to,\n data: request.data ?? \"0x\",\n value: request.value ? fromHex(request.value, \"bigint\") : 0n\n };\n });\n const mfpgOverridesInTx = () => requests.filter((x4) => x4.maxFeePerGas != null).map((x4) => fromHex(x4.maxFeePerGas, \"bigint\"));\n const maxFeePerGas = overrides?.maxFeePerGas != null ? overrides?.maxFeePerGas : mfpgOverridesInTx().length > 0 ? bigIntMax(...mfpgOverridesInTx()) : void 0;\n const mpfpgOverridesInTx = () => requests.filter((x4) => x4.maxPriorityFeePerGas != null).map((x4) => fromHex(x4.maxPriorityFeePerGas, \"bigint\"));\n const maxPriorityFeePerGas = overrides?.maxPriorityFeePerGas != null ? overrides?.maxPriorityFeePerGas : mpfpgOverridesInTx().length > 0 ? bigIntMax(...mpfpgOverridesInTx()) : void 0;\n const _overrides = {\n maxFeePerGas,\n maxPriorityFeePerGas\n };\n const uoStruct = await buildUserOperation(client, {\n uo: batch,\n account,\n context: context2,\n overrides: _overrides\n });\n return {\n uoStruct,\n // TODO: in v4 major version update, remove these as below parameters are not needed\n batch,\n overrides: _overrides\n };\n }\n var init_buildUserOperationFromTxs = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_transaction3();\n init_utils10();\n init_buildUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js\n function checkGasSponsorshipEligibility(client_, args) {\n const client = clientHeaderTrack(client_, \"checkGasSponsorshipEligibility\");\n const { account = client.account, overrides, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"checkGasSponsorshipEligibility\", client);\n }\n return buildUserOperation(client, {\n uo: args.uo,\n account,\n overrides,\n context: context2\n }).then((userOperationStruct) => ({\n eligible: account.getEntryPoint().version === \"0.6.0\" ? userOperationStruct.paymasterAndData !== \"0x\" && userOperationStruct.paymasterAndData !== null : userOperationStruct.paymasterData !== \"0x\" && userOperationStruct.paymasterData !== null,\n request: userOperationStruct\n })).catch(() => ({\n eligible: false\n }));\n }\n var init_checkGasSponsorshipEligibility = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_buildUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/noopMiddleware.js\n var noopMiddleware;\n var init_noopMiddleware = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/noopMiddleware.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n noopMiddleware = async (args) => {\n return args;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js\n async function _runMiddlewareStack(client, args) {\n const { uo, overrides, account = client.account, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const { dummyPaymasterAndData, paymasterAndData } = bypassPaymasterAndData(overrides) ? {\n dummyPaymasterAndData: async (uo2, { overrides: overrides2 }) => {\n return {\n ...uo2,\n ...\"paymasterAndData\" in overrides2 ? { paymasterAndData: overrides2.paymasterAndData } : \"paymasterData\" in overrides2 && \"paymaster\" in overrides2 && overrides2.paymasterData !== \"0x\" ? {\n paymasterData: overrides2.paymasterData,\n paymaster: overrides2.paymaster\n } : (\n // At this point, nothing has run so no fields are set\n // for 0.7 when not using a paymaster, all fields should be undefined\n void 0\n )\n };\n },\n paymasterAndData: noopMiddleware\n } : {\n dummyPaymasterAndData: client.middleware.dummyPaymasterAndData,\n paymasterAndData: client.middleware.paymasterAndData\n };\n const result = await asyncPipe(dummyPaymasterAndData, client.middleware.feeEstimator, client.middleware.gasEstimator, client.middleware.customMiddleware, paymasterAndData, client.middleware.userOperationSimulator)(uo, { overrides, feeOptions: client.feeOptions, account, client, context: context2 });\n return resolveProperties(result);\n }\n var asyncPipe;\n var init_runMiddlewareStack = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_noopMiddleware();\n init_utils10();\n asyncPipe = (...fns) => async (s4, opts) => {\n let result = s4;\n for (const fn of fns) {\n result = await fn(result, opts);\n }\n return result;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signUserOperation.js\n async function signUserOperation(client, args) {\n const { account = client.account, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"signUserOperation\", client);\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n return await client.middleware.signUserOperation(args.uoStruct, {\n ...args,\n account,\n client,\n context: context2\n }).then(resolveProperties).then(deepHexlify);\n }\n var init_signUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_utils10();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/0.7.js\n function packAccountGasLimits(data) {\n return concat2(Object.values(data).map((v2) => pad(v2, { size: 16 })));\n }\n function packPaymasterData({ paymaster, paymasterVerificationGasLimit, paymasterPostOpGasLimit, paymasterData }) {\n if (!paymaster || !paymasterVerificationGasLimit || !paymasterPostOpGasLimit || !paymasterData) {\n return \"0x\";\n }\n return concat2([\n paymaster,\n pad(paymasterVerificationGasLimit, { size: 16 }),\n pad(paymasterPostOpGasLimit, { size: 16 }),\n paymasterData\n ]);\n }\n var packUserOperation, __default;\n var init__ = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/0.7.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_EntryPointAbi_v7();\n packUserOperation = (request) => {\n const initCode = request.factory && request.factoryData ? concat2([request.factory, request.factoryData]) : \"0x\";\n const accountGasLimits = packAccountGasLimits({\n verificationGasLimit: request.verificationGasLimit,\n callGasLimit: request.callGasLimit\n });\n const gasFees = packAccountGasLimits({\n maxPriorityFeePerGas: request.maxPriorityFeePerGas,\n maxFeePerGas: request.maxFeePerGas\n });\n const paymasterAndData = request.paymaster && isAddress(request.paymaster) ? packPaymasterData({\n paymaster: request.paymaster,\n paymasterVerificationGasLimit: request.paymasterVerificationGasLimit,\n paymasterPostOpGasLimit: request.paymasterPostOpGasLimit,\n paymasterData: request.paymasterData\n }) : \"0x\";\n return encodeAbiParameters([\n { type: \"address\" },\n { type: \"uint256\" },\n { type: \"bytes32\" },\n { type: \"bytes32\" },\n { type: \"bytes32\" },\n { type: \"uint256\" },\n { type: \"bytes32\" },\n { type: \"bytes32\" }\n ], [\n request.sender,\n hexToBigInt(request.nonce),\n keccak256(initCode),\n keccak256(request.callData),\n accountGasLimits,\n hexToBigInt(request.preVerificationGas),\n gasFees,\n keccak256(paymasterAndData)\n ]);\n };\n __default = {\n version: \"0.7.0\",\n address: {\n default: \"0x0000000071727De22E5E9d8BAf0edAc6f37da032\"\n },\n abi: EntryPointAbi_v7,\n getUserOperationHash: (request, entryPointAddress, chainId) => {\n const encoded = encodeAbiParameters([{ type: \"bytes32\" }, { type: \"address\" }, { type: \"uint256\" }], [\n keccak256(packUserOperation(request)),\n entryPointAddress,\n BigInt(chainId)\n ]);\n return keccak256(encoded);\n },\n packUserOperation\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/getUserOperationError.js\n async function getUserOperationError(client, request, entryPoint) {\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n const uo = deepHexlify(request);\n try {\n switch (entryPoint.version) {\n case \"0.6.0\":\n break;\n case \"0.7.0\":\n await client.simulateContract({\n address: entryPoint.address,\n abi: entryPoint.abi,\n functionName: \"handleOps\",\n args: [\n [\n {\n sender: client.account.address,\n nonce: fromHex(uo.nonce, \"bigint\"),\n initCode: uo.factory && uo.factoryData ? concat2([uo.factory, uo.factoryData]) : \"0x\",\n callData: uo.callData,\n accountGasLimits: packAccountGasLimits({\n verificationGasLimit: uo.verificationGasLimit,\n callGasLimit: uo.callGasLimit\n }),\n preVerificationGas: fromHex(uo.preVerificationGas, \"bigint\"),\n gasFees: packAccountGasLimits({\n maxPriorityFeePerGas: uo.maxPriorityFeePerGas,\n maxFeePerGas: uo.maxFeePerGas\n }),\n paymasterAndData: uo.paymaster && isAddress(uo.paymaster) ? packPaymasterData({\n paymaster: uo.paymaster,\n paymasterVerificationGasLimit: uo.paymasterVerificationGasLimit,\n paymasterPostOpGasLimit: uo.paymasterPostOpGasLimit,\n paymasterData: uo.paymasterData\n }) : \"0x\",\n signature: uo.signature\n }\n ],\n client.account.address\n ]\n });\n }\n } catch (err) {\n if (err?.cause && err?.cause?.raw) {\n try {\n const { errorName, args } = decodeErrorResult({\n abi: entryPoint.abi,\n data: err.cause.raw\n });\n console.error(`Failed with '${errorName}':`);\n switch (errorName) {\n case \"FailedOpWithRevert\":\n case \"FailedOp\":\n const argsIdx = errorName === \"FailedOp\" ? 1 : 2;\n console.error(args && args[argsIdx] ? `Smart contract account reverted with error: ${args[argsIdx]}` : \"No revert data from smart contract account\");\n break;\n default:\n args && args.forEach((arg) => console.error(`\n${arg}`));\n }\n return;\n } catch (err2) {\n }\n }\n console.error(\"Entrypoint reverted with error: \");\n console.error(err);\n }\n }\n var init_getUserOperationError = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/getUserOperationError.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_account2();\n init_utils10();\n init__();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/sendUserOperation.js\n async function _sendUserOperation(client, args) {\n const { account = client.account, uoStruct, context: context2, overrides } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const entryPoint = account.getEntryPoint();\n const request = await signUserOperation(client, {\n uoStruct,\n account,\n context: context2,\n overrides\n });\n try {\n return {\n hash: await client.sendRawUserOperation(request, entryPoint.address),\n request\n };\n } catch (err) {\n getUserOperationError(client, request, entryPoint);\n throw err;\n }\n }\n var init_sendUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/sendUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_client();\n init_signUserOperation();\n init_getUserOperationError();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js\n async function dropAndReplaceUserOperation(client_, args) {\n const client = clientHeaderTrack(client_, \"dropAndReplaceUserOperation\");\n const { account = client.account, uoToDrop, overrides, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"dropAndReplaceUserOperation\", client);\n }\n const entryPoint = account.getEntryPoint();\n const uoToSubmit = entryPoint.version === \"0.6.0\" ? {\n initCode: uoToDrop.initCode,\n sender: uoToDrop.sender,\n nonce: uoToDrop.nonce,\n callData: uoToDrop.callData,\n signature: await account.getDummySignature()\n } : {\n ...uoToDrop.factory && uoToDrop.factoryData ? {\n factory: uoToDrop.factory,\n factoryData: uoToDrop.factoryData\n } : {},\n sender: uoToDrop.sender,\n nonce: uoToDrop.nonce,\n callData: uoToDrop.callData,\n signature: await account.getDummySignature()\n };\n const { maxFeePerGas, maxPriorityFeePerGas } = await resolveProperties(await client.middleware.feeEstimator(uoToSubmit, { account, client }));\n const _overrides = {\n ...overrides,\n maxFeePerGas: bigIntMax(BigInt(maxFeePerGas ?? 0n), bigIntMultiply(uoToDrop.maxFeePerGas, 1.1)),\n maxPriorityFeePerGas: bigIntMax(BigInt(maxPriorityFeePerGas ?? 0n), bigIntMultiply(uoToDrop.maxPriorityFeePerGas, 1.1))\n };\n const uoToSend = await _runMiddlewareStack(client, {\n uo: uoToSubmit,\n overrides: _overrides,\n account\n });\n return _sendUserOperation(client, {\n uoStruct: uoToSend,\n account,\n context: context2,\n overrides: _overrides\n });\n }\n var init_dropAndReplaceUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_utils10();\n init_runMiddlewareStack();\n init_sendUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/getAddress.js\n var getAddress2;\n var init_getAddress2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/getAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n getAddress2 = (client, args) => {\n const { account } = args ?? { account: client.account };\n if (!account) {\n throw new AccountNotFoundError2();\n }\n return account.address;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/useroperation.js\n var InvalidUserOperationError, WaitForUserOperationError;\n var init_useroperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/errors/useroperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base2();\n InvalidUserOperationError = class extends BaseError4 {\n /**\n * Creates an instance of InvalidUserOperationError.\n *\n * InvalidUserOperationError constructor\n *\n * @param {UserOperationStruct} uo the invalid user operation struct\n */\n constructor(uo) {\n super(`Request is missing parameters. All properties on UserOperationStruct must be set. uo: ${JSON.stringify(uo, (_key, value) => typeof value === \"bigint\" ? {\n type: \"bigint\",\n value: value.toString()\n } : value, 2)}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidUserOperationError\"\n });\n }\n };\n WaitForUserOperationError = class extends BaseError4 {\n /**\n * @param {UserOperationRequest} request the user operation request that failed\n * @param {Error} error the underlying error that caused the failure\n */\n constructor(request, error) {\n super(`Failed to find User Operation: ${error.message}`);\n Object.defineProperty(this, \"request\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: request\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js\n var waitForUserOperationTransaction;\n var init_waitForUserOperationTransacation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_client();\n init_transaction3();\n init_logger();\n init_esm6();\n waitForUserOperationTransaction = async (client_, args) => {\n const client = clientHeaderTrack(client_, \"waitForUserOperationTransaction\");\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"waitForUserOperationTransaction\", client);\n }\n const { hash: hash3, retries = {\n maxRetries: client.txMaxRetries,\n intervalMs: client.txRetryIntervalMs,\n multiplier: client.txRetryMultiplier\n } } = args;\n for (let i3 = 0; i3 < retries.maxRetries; i3++) {\n const txRetryIntervalWithJitterMs = retries.intervalMs * Math.pow(retries.multiplier, i3) + Math.random() * 100;\n await new Promise((resolve) => setTimeout(resolve, txRetryIntervalWithJitterMs));\n const receipt = await client.getUserOperationReceipt(hash3, args.tag).catch((e2) => {\n Logger.error(`[SmartAccountProvider] waitForUserOperationTransaction error fetching receipt for ${hash3}: ${e2}`);\n });\n if (receipt) {\n return receipt?.receipt.transactionHash;\n }\n }\n throw new FailedToFindTransactionError(hash3);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendTransaction.js\n async function sendTransaction2(client_, args, overrides, context2) {\n const client = clientHeaderTrack(client_, \"estimateUserOperationGas\");\n const { account = client.account } = args;\n if (!account || typeof account === \"string\") {\n throw new AccountNotFoundError2();\n }\n if (!args.to) {\n throw new TransactionMissingToParamError();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"sendTransaction\", client);\n }\n const uoStruct = await buildUserOperationFromTx(client, args, overrides, context2);\n const { hash: hash3, request } = await _sendUserOperation(client, {\n account,\n uoStruct,\n context: context2,\n overrides\n });\n return waitForUserOperationTransaction(client, { hash: hash3 }).catch((e2) => {\n throw new WaitForUserOperationError(request, e2);\n });\n }\n var init_sendTransaction2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendTransaction.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_transaction3();\n init_useroperation();\n init_buildUserOperationFromTx();\n init_sendUserOperation();\n init_waitForUserOperationTransacation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendTransactions.js\n async function sendTransactions(client_, args) {\n const client = clientHeaderTrack(client_, \"estimateUserOperationGas\");\n const { requests, overrides, account = client.account, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"sendTransactions\", client);\n }\n const { uoStruct } = await buildUserOperationFromTxs(client, {\n requests,\n overrides,\n account,\n context: context2\n });\n const { hash: hash3, request } = await _sendUserOperation(client, {\n account,\n uoStruct,\n context: context2,\n overrides\n });\n return waitForUserOperationTransaction(client, { hash: hash3 }).catch((e2) => {\n throw new WaitForUserOperationError(request, e2);\n });\n }\n var init_sendTransactions = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendTransactions.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_useroperation();\n init_buildUserOperationFromTxs();\n init_sendUserOperation();\n init_waitForUserOperationTransacation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendUserOperation.js\n async function sendUserOperation(client_, args) {\n const client = clientHeaderTrack(client_, \"sendUserOperation\");\n const { account = client.account, context: context2, overrides } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"sendUserOperation\", client);\n }\n const uoStruct = await buildUserOperation(client, {\n uo: args.uo,\n account,\n context: context2,\n overrides\n });\n return _sendUserOperation(client, {\n account,\n uoStruct,\n context: context2,\n overrides\n });\n }\n var init_sendUserOperation2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/sendUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_buildUserOperation();\n init_sendUserOperation();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signMessage.js\n var signMessage2;\n var init_signMessage2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signMessage.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n signMessage2 = async (client, { account = client.account, message: message2 }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n return account.signMessageWith6492({ message: message2 });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signTypedData.js\n var signTypedData2;\n var init_signTypedData2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/signTypedData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n signTypedData2 = async (client, { account = client.account, typedData }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n return account.signTypedDataWith6492(typedData);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/upgradeAccount.js\n var upgradeAccount;\n var init_upgradeAccount = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/upgradeAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_sendUserOperation2();\n init_waitForUserOperationTransacation();\n init_esm6();\n upgradeAccount = async (client_, args) => {\n const client = clientHeaderTrack(client_, \"upgradeAccount\");\n const { account = client.account, upgradeTo, overrides, waitForTx, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", \"upgradeAccount\", client);\n }\n const { implAddress: accountImplAddress, initializationData } = upgradeTo;\n const encodeUpgradeData = await account.encodeUpgradeToAndCall({\n upgradeToAddress: accountImplAddress,\n upgradeToInitData: initializationData\n });\n const result = await sendUserOperation(client, {\n uo: {\n target: account.address,\n data: encodeUpgradeData\n },\n account,\n overrides,\n context: context2\n });\n let hash3 = result.hash;\n if (waitForTx) {\n hash3 = await waitForUserOperationTransaction(client, result);\n }\n return hash3;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/decorators/smartAccountClient.js\n var smartAccountClientActions, smartAccountClientMethodKeys;\n var init_smartAccountClient = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/decorators/smartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_buildUserOperation();\n init_buildUserOperationFromTx();\n init_buildUserOperationFromTxs();\n init_checkGasSponsorshipEligibility();\n init_dropAndReplaceUserOperation();\n init_getAddress2();\n init_sendTransaction2();\n init_sendTransactions();\n init_sendUserOperation2();\n init_signMessage2();\n init_signTypedData2();\n init_signUserOperation();\n init_upgradeAccount();\n init_waitForUserOperationTransacation();\n smartAccountClientActions = (client) => ({\n buildUserOperation: (args) => buildUserOperation(client, args),\n buildUserOperationFromTx: (args, overrides, context2) => buildUserOperationFromTx(client, args, overrides, context2),\n buildUserOperationFromTxs: (args) => buildUserOperationFromTxs(client, args),\n checkGasSponsorshipEligibility: (args) => checkGasSponsorshipEligibility(client, args),\n signUserOperation: (args) => signUserOperation(client, args),\n dropAndReplaceUserOperation: (args) => dropAndReplaceUserOperation(client, args),\n sendTransaction: (args, overrides, context2) => sendTransaction2(client, args, overrides, context2),\n sendTransactions: (args) => sendTransactions(client, args),\n sendUserOperation: (args) => sendUserOperation(client, args),\n waitForUserOperationTransaction: (args) => waitForUserOperationTransaction.bind(client)(client, args),\n upgradeAccount: (args) => upgradeAccount(client, args),\n getAddress: (args) => getAddress2(client, args),\n signMessage: (args) => signMessage2(client, args),\n signTypedData: (args) => signTypedData2(client, args)\n });\n smartAccountClientMethodKeys = Object.keys(\n // @ts-expect-error we just want to get the keys\n smartAccountClientActions(void 0)\n ).reduce((accum, curr) => {\n accum.add(curr);\n return accum;\n }, /* @__PURE__ */ new Set());\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/isSmartAccountClient.js\n function isSmartAccountClient(client) {\n for (const key of smartAccountClientMethodKeys) {\n if (!(key in client)) {\n return false;\n }\n }\n return client && \"middleware\" in client;\n }\n function isBaseSmartAccountClient(client) {\n return client && \"middleware\" in client;\n }\n var init_isSmartAccountClient = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/isSmartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_smartAccountClient();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/initUserOperation.js\n async function _initUserOperation(client, args) {\n const { account = client.account, uo, overrides } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const entryPoint = account.getEntryPoint();\n const callData = Array.isArray(uo) ? account.encodeBatchExecute(uo) : typeof uo === \"string\" ? uo : account.encodeExecute(uo);\n const signature = account.getDummySignature();\n const nonce = overrides?.nonce ?? account.getAccountNonce(overrides?.nonceKey);\n const struct = entryPoint.version === \"0.6.0\" ? {\n initCode: account.getInitCode(),\n sender: account.address,\n nonce,\n callData,\n signature\n } : {\n factory: conditionalReturn(account.isAccountDeployed().then((deployed) => !deployed), account.getFactoryAddress),\n factoryData: conditionalReturn(account.isAccountDeployed().then((deployed) => !deployed), account.getFactoryData),\n sender: account.address,\n nonce,\n callData,\n signature\n };\n return struct;\n }\n var init_initUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/internal/initUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_client();\n init_utils10();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/addBreadcrumb.js\n function hasAddBreadcrumb(a3) {\n return ADD_BREADCRUMB in a3;\n }\n function clientHeaderTrack(client, crumb) {\n if (hasAddBreadcrumb(client)) {\n return client[ADD_BREADCRUMB](crumb);\n }\n return client;\n }\n var ADD_BREADCRUMB;\n var init_addBreadcrumb = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/addBreadcrumb.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n ADD_BREADCRUMB = Symbol(\"addBreadcrumb\");\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperation.js\n async function buildUserOperation(client_, args) {\n const client = clientHeaderTrack(client_, USER_OPERATION_METHOD);\n const { account = client.account, overrides, context: context2 } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"BaseSmartAccountClient\", USER_OPERATION_METHOD, client);\n }\n return _initUserOperation(client, args).then((_uo) => _runMiddlewareStack(client, {\n uo: _uo,\n overrides,\n account,\n context: context2\n }));\n }\n var USER_OPERATION_METHOD;\n var init_buildUserOperation = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/actions/smartAccount/buildUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_isSmartAccountClient();\n init_account2();\n init_client();\n init_initUserOperation();\n init_runMiddlewareStack();\n init_addBreadcrumb();\n USER_OPERATION_METHOD = \"buildUserOperation\";\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/schema.js\n var ConnectionConfigSchema, UserOperationFeeOptionsFieldSchema, UserOperationFeeOptionsSchema_v6, UserOperationFeeOptionsSchema_v7, UserOperationFeeOptionsSchema, SmartAccountClientOptsSchema;\n var init_schema2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/schema.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm5();\n init_utils10();\n ConnectionConfigSchema = external_exports.intersection(external_exports.union([\n external_exports.object({\n rpcUrl: external_exports.never().optional(),\n apiKey: external_exports.string(),\n jwt: external_exports.never().optional()\n }),\n external_exports.object({\n rpcUrl: external_exports.never().optional(),\n apiKey: external_exports.never().optional(),\n jwt: external_exports.string()\n }),\n external_exports.object({\n rpcUrl: external_exports.string(),\n apiKey: external_exports.never().optional(),\n jwt: external_exports.never().optional()\n }),\n external_exports.object({\n rpcUrl: external_exports.string(),\n apiKey: external_exports.never().optional(),\n jwt: external_exports.string()\n })\n ]), external_exports.object({\n chainAgnosticUrl: external_exports.string().optional()\n }));\n UserOperationFeeOptionsFieldSchema = BigNumberishRangeSchema.merge(MultiplierSchema).partial();\n UserOperationFeeOptionsSchema_v6 = external_exports.object({\n maxFeePerGas: UserOperationFeeOptionsFieldSchema,\n maxPriorityFeePerGas: UserOperationFeeOptionsFieldSchema,\n callGasLimit: UserOperationFeeOptionsFieldSchema,\n verificationGasLimit: UserOperationFeeOptionsFieldSchema,\n preVerificationGas: UserOperationFeeOptionsFieldSchema\n }).partial().strict();\n UserOperationFeeOptionsSchema_v7 = UserOperationFeeOptionsSchema_v6.extend({\n paymasterVerificationGasLimit: UserOperationFeeOptionsFieldSchema,\n paymasterPostOpGasLimit: UserOperationFeeOptionsFieldSchema\n }).partial().strict();\n UserOperationFeeOptionsSchema = UserOperationFeeOptionsSchema_v7;\n SmartAccountClientOptsSchema = external_exports.object({\n /**\n * The maximum number of times to try fetching a transaction receipt before giving up (default: 5)\n */\n txMaxRetries: external_exports.number().min(0).optional().default(5),\n /**\n * The interval in milliseconds to wait between retries while waiting for tx receipts (default: 2_000)\n */\n txRetryIntervalMs: external_exports.number().min(0).optional().default(2e3),\n /**\n * The multiplier on interval length to wait between retries while waiting for tx receipts (default: 1.5)\n */\n txRetryMultiplier: external_exports.number().min(0).optional().default(1.5),\n /**\n * Optional user operation fee options to be set globally at the provider level\n */\n feeOptions: UserOperationFeeOptionsSchema.optional()\n }).strict();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/feeEstimator.js\n function defaultFeeEstimator(client) {\n return async (struct, { overrides, feeOptions }) => {\n const feeData = await client.estimateFeesPerGas();\n if (!feeData.maxFeePerGas || feeData.maxPriorityFeePerGas == null) {\n throw new Error(\"feeData is missing maxFeePerGas or maxPriorityFeePerGas\");\n }\n let maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas();\n maxPriorityFeePerGas = applyUserOpOverrideOrFeeOption(maxPriorityFeePerGas, overrides?.maxPriorityFeePerGas, feeOptions?.maxPriorityFeePerGas);\n let maxFeePerGas = feeData.maxFeePerGas - feeData.maxPriorityFeePerGas + BigInt(maxPriorityFeePerGas);\n maxFeePerGas = applyUserOpOverrideOrFeeOption(maxFeePerGas, overrides?.maxFeePerGas, feeOptions?.maxFeePerGas);\n struct.maxFeePerGas = maxFeePerGas;\n struct.maxPriorityFeePerGas = maxPriorityFeePerGas;\n return struct;\n };\n }\n var init_feeEstimator = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/feeEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils10();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/gasEstimator.js\n var defaultGasEstimator;\n var init_gasEstimator = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/gasEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils10();\n init_userop();\n defaultGasEstimator = (client) => async (struct, { account, overrides, feeOptions }) => {\n const request = deepHexlify(await resolveProperties(struct));\n const estimates = await client.estimateUserOperationGas(request, account.getEntryPoint().address, overrides?.stateOverride);\n const callGasLimit = applyUserOpOverrideOrFeeOption(estimates.callGasLimit, overrides?.callGasLimit, feeOptions?.callGasLimit);\n const verificationGasLimit = applyUserOpOverrideOrFeeOption(estimates.verificationGasLimit, overrides?.verificationGasLimit, feeOptions?.verificationGasLimit);\n const preVerificationGas = applyUserOpOverrideOrFeeOption(estimates.preVerificationGas, overrides?.preVerificationGas, feeOptions?.preVerificationGas);\n struct.callGasLimit = callGasLimit;\n struct.verificationGasLimit = verificationGasLimit;\n struct.preVerificationGas = preVerificationGas;\n const entryPoint = account.getEntryPoint();\n if (entryPoint.version === \"0.7.0\") {\n const paymasterVerificationGasLimit = applyUserOpOverrideOrFeeOption(estimates.paymasterVerificationGasLimit, overrides?.paymasterVerificationGasLimit, feeOptions?.paymasterVerificationGasLimit);\n const uo_v7 = struct;\n uo_v7.paymasterVerificationGasLimit = paymasterVerificationGasLimit;\n uo_v7.paymasterPostOpGasLimit = uo_v7.paymasterPostOpGasLimit ?? (uo_v7.paymaster ? \"0x0\" : void 0);\n }\n return struct;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/paymasterAndData.js\n var defaultPaymasterAndData;\n var init_paymasterAndData = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/paymasterAndData.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n defaultPaymasterAndData = async (struct, { account }) => {\n const entryPoint = account.getEntryPoint();\n if (entryPoint.version === \"0.6.0\") {\n struct.paymasterAndData = \"0x\";\n }\n return struct;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/userOpSigner.js\n var defaultUserOpSigner;\n var init_userOpSigner = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/userOpSigner.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_client();\n init_useroperation();\n init_utils10();\n defaultUserOpSigner = async (struct, { client, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!client?.chain) {\n throw new ChainNotFoundError2();\n }\n const resolvedStruct = await resolveProperties(struct);\n const request = deepHexlify(resolvedStruct);\n if (!isValidRequest(request)) {\n throw new InvalidUserOperationError(resolvedStruct);\n }\n return {\n ...resolvedStruct,\n signature: await account.signUserOperationHash(account.getEntryPoint().getUserOperationHash(request))\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/actions.js\n var middlewareActions;\n var init_actions = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/actions.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_feeEstimator();\n init_gasEstimator();\n init_paymasterAndData();\n init_userOpSigner();\n init_noopMiddleware();\n middlewareActions = (overrides) => (client) => ({\n middleware: {\n customMiddleware: overrides.customMiddleware ?? noopMiddleware,\n dummyPaymasterAndData: overrides.dummyPaymasterAndData ?? defaultPaymasterAndData,\n feeEstimator: overrides.feeEstimator ?? defaultFeeEstimator(client),\n gasEstimator: overrides.gasEstimator ?? defaultGasEstimator(client),\n paymasterAndData: overrides.paymasterAndData ?? defaultPaymasterAndData,\n userOperationSimulator: overrides.userOperationSimulator ?? noopMiddleware,\n signUserOperation: overrides.signUserOperation ?? defaultUserOpSigner\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/smartAccountClient.js\n function createSmartAccountClient(config2) {\n const { key = \"account\", name = \"account provider\", transport, type = \"SmartAccountClient\", addBreadCrumb, ...params } = config2;\n const client = createBundlerClient({\n ...params,\n key,\n name,\n // we start out with this because the base methods for a SmartAccountClient\n // require a smart account client, but once we have completed building everything\n // we want to override this value with the one passed in by the extender\n type: \"SmartAccountClient\",\n // TODO: this needs to be tested\n transport: (opts) => {\n const rpcTransport = transport(opts);\n return custom(\n {\n name: \"SmartAccountClientTransport\",\n async request({ method, params: params2 }) {\n switch (method) {\n case \"eth_accounts\": {\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n return [client.account.address];\n }\n case \"eth_sendTransaction\":\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const [tx] = params2;\n return client.sendTransaction({\n ...tx,\n account: client.account,\n chain: client.chain\n });\n case \"eth_sign\":\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n const [address, data] = params2;\n if (address?.toLowerCase() !== client.account.address.toLowerCase()) {\n throw new Error(\"cannot sign for address that is not the current account\");\n }\n return client.signMessage({\n message: data,\n account: client.account\n });\n case \"personal_sign\": {\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n const [data2, address2] = params2;\n if (address2?.toLowerCase() !== client.account.address.toLowerCase()) {\n throw new Error(\"cannot sign for address that is not the current account\");\n }\n return client.signMessage({\n message: data2,\n account: client.account\n });\n }\n case \"eth_signTypedData_v4\": {\n if (!client.account) {\n throw new AccountNotFoundError2();\n }\n const [address2, dataParams] = params2;\n if (address2?.toLowerCase() !== client.account.address.toLowerCase()) {\n throw new Error(\"cannot sign for address that is not the current account\");\n }\n try {\n return client.signTypedData({\n account: client.account,\n typedData: typeof dataParams === \"string\" ? JSON.parse(dataParams) : dataParams\n });\n } catch {\n throw new Error(\"invalid JSON data params\");\n }\n }\n case \"eth_chainId\":\n if (!opts.chain) {\n throw new ChainNotFoundError2();\n }\n return opts.chain.id;\n default:\n return rpcTransport.request(\n { method, params: params2 },\n // Retry count must be 0 here in order to respect the retry\n // count that is already specified on the underlying transport.\n { retryCount: 0 }\n );\n }\n }\n },\n // Retry count must be 0 here in order to respect the retry\n // count that is already specified on the underlying transport.\n { retryCount: 0 }\n )(opts);\n }\n }).extend(() => {\n const addBreadCrumbs = addBreadCrumb ? {\n [ADD_BREADCRUMB]: addBreadCrumb\n } : {};\n return {\n ...SmartAccountClientOptsSchema.parse(config2.opts ?? {}),\n ...addBreadCrumbs\n };\n }).extend(middlewareActions(config2)).extend(smartAccountClientActions);\n return { ...client, type };\n }\n var init_smartAccountClient2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/client/smartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm5();\n init_account2();\n init_client();\n init_actions();\n init_bundlerClient2();\n init_smartAccountClient();\n init_schema2();\n init_addBreadcrumb();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/0.6.js\n var packUserOperation2, __default2;\n var init__2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/0.6.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_EntryPointAbi_v6();\n packUserOperation2 = (request) => {\n const hashedInitCode = keccak256(request.initCode);\n const hashedCallData = keccak256(request.callData);\n const hashedPaymasterAndData = keccak256(request.paymasterAndData);\n return encodeAbiParameters([\n { type: \"address\" },\n { type: \"uint256\" },\n { type: \"bytes32\" },\n { type: \"bytes32\" },\n { type: \"uint256\" },\n { type: \"uint256\" },\n { type: \"uint256\" },\n { type: \"uint256\" },\n { type: \"uint256\" },\n { type: \"bytes32\" }\n ], [\n request.sender,\n hexToBigInt(request.nonce),\n hashedInitCode,\n hashedCallData,\n hexToBigInt(request.callGasLimit),\n hexToBigInt(request.verificationGasLimit),\n hexToBigInt(request.preVerificationGas),\n hexToBigInt(request.maxFeePerGas),\n hexToBigInt(request.maxPriorityFeePerGas),\n hashedPaymasterAndData\n ]);\n };\n __default2 = {\n version: \"0.6.0\",\n address: {\n default: \"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789\"\n },\n abi: EntryPointAbi_v6,\n getUserOperationHash: (request, entryPointAddress, chainId) => {\n const encoded = encodeAbiParameters([{ type: \"bytes32\" }, { type: \"address\" }, { type: \"uint256\" }], [\n keccak256(packUserOperation2(request)),\n entryPointAddress,\n BigInt(chainId)\n ]);\n return keccak256(encoded);\n },\n packUserOperation: packUserOperation2\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/index.js\n function getEntryPoint(chain2, options) {\n const { version: version7 = defaultEntryPointVersion, addressOverride } = options ?? {\n version: defaultEntryPointVersion\n };\n const entryPoint = entryPointRegistry[version7 ?? defaultEntryPointVersion];\n const address = addressOverride ?? entryPoint.address[chain2.id] ?? entryPoint.address.default;\n if (!address) {\n throw new EntryPointNotFoundError(chain2, version7);\n }\n if (entryPoint.version === \"0.6.0\") {\n return {\n version: entryPoint.version,\n address,\n chain: chain2,\n abi: entryPoint.abi,\n getUserOperationHash: (r2) => entryPoint.getUserOperationHash(r2, address, chain2.id),\n packUserOperation: entryPoint.packUserOperation\n };\n } else if (entryPoint.version === \"0.7.0\") {\n return {\n version: entryPoint.version,\n address,\n chain: chain2,\n abi: entryPoint.abi,\n getUserOperationHash: (r2) => entryPoint.getUserOperationHash(r2, address, chain2.id),\n packUserOperation: entryPoint.packUserOperation\n };\n }\n throw new EntryPointNotFoundError(chain2, version7);\n }\n var defaultEntryPointVersion, entryPointRegistry;\n var init_entrypoint2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/entrypoint/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_entrypoint();\n init__2();\n init__();\n defaultEntryPointVersion = \"0.6.0\";\n entryPointRegistry = {\n \"0.6.0\": __default2,\n \"0.7.0\": __default\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/7702signer.js\n var default7702UserOpSigner;\n var init_signer = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/7702signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_smartContractAccount();\n init_account2();\n init_client();\n init_userOpSigner();\n default7702UserOpSigner = (userOpSigner) => async (struct, params) => {\n const userOpSigner_ = userOpSigner ?? defaultUserOpSigner;\n const uo = await userOpSigner_({\n ...struct,\n // Strip out the dummy eip7702 fields.\n eip7702Auth: void 0\n }, params);\n const account = params.account ?? params.client.account;\n const { client } = params;\n if (!account || !isSmartAccountWithSigner(account)) {\n throw new AccountNotFoundError2();\n }\n const signer = account.getSigner();\n if (!signer.signAuthorization) {\n return uo;\n }\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const code = await client.getCode({ address: account.address }) ?? \"0x\";\n const implAddress = await account.getImplementationAddress();\n const expectedCode = \"0xef0100\" + implAddress.slice(2);\n if (code.toLowerCase() === expectedCode.toLowerCase()) {\n return uo;\n }\n const accountNonce = await params.client.getTransactionCount({\n address: account.address\n });\n const authSignature = await signer.signAuthorization({\n chainId: client.chain.id,\n contractAddress: implAddress,\n nonce: accountNonce\n });\n const { r: r2, s: s4 } = authSignature;\n const yParity = authSignature.yParity ?? authSignature.v - 27n;\n return {\n ...uo,\n eip7702Auth: {\n // deepHexlify doesn't encode number(0) correctly, it returns \"0x\"\n chainId: toHex(client.chain.id),\n nonce: toHex(accountNonce),\n address: implAddress,\n r: r2,\n s: s4,\n yParity: toHex(yParity)\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/7702gasEstimator.js\n var default7702GasEstimator;\n var init_gasEstimator2 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/7702gasEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_account2();\n init_gasEstimator();\n default7702GasEstimator = (gasEstimator) => async (struct, params) => {\n const gasEstimator_ = gasEstimator ?? defaultGasEstimator(params.client);\n const account = params.account ?? params.client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const entryPoint = account.getEntryPoint();\n if (entryPoint.version !== \"0.7.0\") {\n throw new Error(\"This middleware is only compatible with EntryPoint v0.7.0\");\n }\n const [implementationAddress, code = \"0x\"] = await Promise.all([\n account.getImplementationAddress(),\n params.client.getCode({ address: params.account.address })\n ]);\n const isAlreadyDelegated = code.toLowerCase() === concatHex([\"0xef0100\", implementationAddress]);\n if (!isAlreadyDelegated) {\n struct.eip7702Auth = {\n chainId: numberToHex(params.client.chain?.id ?? 0),\n nonce: numberToHex(await params.client.getTransactionCount({\n address: params.account.address\n })),\n address: implementationAddress,\n r: zeroHash,\n // aka `bytes32(0)`\n s: zeroHash,\n yParity: \"0x0\"\n };\n }\n return gasEstimator_(struct, params);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/webauthnGasEstimator.js\n var rip7212CheckBytecode, webauthnGasEstimator;\n var init_webauthnGasEstimator = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/defaults/webauthnGasEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account2();\n init_gasEstimator();\n rip7212CheckBytecode = \"0x60806040526040517f532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25815260056020820152600160408201527f4a03ef9f92eb268cafa601072489a56380fa0dc43171d7712813b3a19a1eb5e560608201527f3e213e28a608ce9a2f4a17fd830c6654018a79b3e0263d91a8ba90622df6f2f0608082015260208160a0836101005afa503d5f823e3d81f3fe\";\n webauthnGasEstimator = (gasEstimator) => async (struct, params) => {\n const gasEstimator_ = gasEstimator ?? defaultGasEstimator(params.client);\n const account = params.account ?? params.client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const entryPoint = account.getEntryPoint();\n if (entryPoint.version !== \"0.7.0\") {\n throw new Error(\"This middleware is only compatible with EntryPoint v0.7.0\");\n }\n const uo = await gasEstimator_(struct, params);\n const pvg = uo.verificationGasLimit instanceof Promise ? await uo.verificationGasLimit : uo?.verificationGasLimit ?? 0n;\n if (!pvg) {\n throw new Error(\"WebauthnGasEstimator: verificationGasLimit is 0 or not defined\");\n }\n const { data } = await params.client.call({ data: rip7212CheckBytecode });\n const chainHas7212 = data ? BigInt(data) === 1n : false;\n return {\n ...uo,\n verificationGasLimit: BigInt(typeof pvg === \"string\" ? BigInt(pvg) : pvg) + (chainHas7212 ? 10000n : 300000n)\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/erc7677middleware.js\n function erc7677Middleware(params) {\n const dummyPaymasterAndData = async (uo, { client, account, feeOptions, overrides }) => {\n const userOp = deepHexlify(await resolveProperties(uo));\n userOp.maxFeePerGas = \"0x0\";\n userOp.maxPriorityFeePerGas = \"0x0\";\n userOp.callGasLimit = \"0x0\";\n userOp.verificationGasLimit = \"0x0\";\n userOp.preVerificationGas = \"0x0\";\n const entrypoint = account.getEntryPoint();\n if (entrypoint.version === \"0.7.0\") {\n userOp.paymasterVerificationGasLimit = \"0x0\";\n userOp.paymasterPostOpGasLimit = \"0x0\";\n }\n const context2 = (typeof params?.context === \"function\" ? await params?.context(userOp, { overrides, feeOptions }) : params?.context) ?? {};\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const erc7677client = client;\n const { paymaster, paymasterAndData: paymasterAndData2, paymasterData, paymasterPostOpGasLimit, paymasterVerificationGasLimit } = await erc7677client.request({\n method: \"pm_getPaymasterStubData\",\n params: [userOp, entrypoint.address, toHex(client.chain.id), context2]\n });\n if (entrypoint.version === \"0.6.0\") {\n return {\n ...uo,\n paymasterAndData: paymasterAndData2\n };\n }\n return {\n ...uo,\n paymaster,\n paymasterData,\n // these values are currently not override-able, so can be set here directly\n paymasterVerificationGasLimit,\n paymasterPostOpGasLimit\n };\n };\n const paymasterAndData = async (uo, { client, account, feeOptions, overrides }) => {\n const userOp = deepHexlify(await resolveProperties(uo));\n const context2 = (typeof params?.context === \"function\" ? await params?.context(userOp, { overrides, feeOptions }) : params?.context) ?? {};\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const erc7677client = client;\n const entrypoint = account.getEntryPoint();\n const { paymaster, paymasterAndData: paymasterAndData2, paymasterData, paymasterPostOpGasLimit, paymasterVerificationGasLimit } = await erc7677client.request({\n method: \"pm_getPaymasterData\",\n params: [userOp, entrypoint.address, toHex(client.chain.id), context2]\n });\n if (entrypoint.version === \"0.6.0\") {\n return {\n ...uo,\n paymasterAndData: paymasterAndData2\n };\n }\n return {\n ...uo,\n paymaster,\n paymasterData,\n // if these fields are returned they should override the ones set by user operation gas estimation,\n // otherwise they shouldn't modify\n ...paymasterVerificationGasLimit ? { paymasterVerificationGasLimit } : {},\n ...paymasterPostOpGasLimit ? { paymasterPostOpGasLimit } : {}\n };\n };\n return {\n dummyPaymasterAndData,\n paymasterAndData\n };\n }\n var init_erc7677middleware = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/middleware/erc7677middleware.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_client();\n init_utils10();\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/signer/local-account.js\n var LocalAccountSigner;\n var init_local_account = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/signer/local-account.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_accounts();\n LocalAccountSigner = class _LocalAccountSigner {\n /**\n * A function to initialize an object with an inner parameter and derive a signerType from it.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { privateKeyToAccount, generatePrivateKey } from \"viem\";\n *\n * const signer = new LocalAccountSigner(\n * privateKeyToAccount(generatePrivateKey()),\n * );\n * ```\n *\n * @param {T} inner The inner parameter containing the necessary data\n */\n constructor(inner) {\n Object.defineProperty(this, \"inner\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"signerType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"signMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (message2) => {\n return this.inner.signMessage({ message: message2 });\n }\n });\n Object.defineProperty(this, \"signTypedData\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async (params) => {\n return this.inner.signTypedData(params);\n }\n });\n Object.defineProperty(this, \"getAddress\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async () => {\n return this.inner.address;\n }\n });\n this.inner = inner;\n this.signerType = inner.type;\n }\n /**\n * Signs an unsigned authorization using the provided private key account.\n *\n * @example\n * ```ts twoslash\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem/accounts\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * const signedAuthorization = await signer.signAuthorization({\n * contractAddress: \"0x1234123412341234123412341234123412341234\",\n * chainId: 1,\n * nonce: 3,\n * });\n * ```\n *\n * @param {AuthorizationRequest} unsignedAuthorization - The unsigned authorization to be signed.\n * @returns {Promise>} A promise that resolves to the signed authorization.\n */\n signAuthorization(unsignedAuthorization) {\n return this.inner.signAuthorization(unsignedAuthorization);\n }\n /**\n * Creates a LocalAccountSigner using the provided mnemonic key and optional HD options.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generateMnemonic } from \"viem\";\n *\n * const signer = LocalAccountSigner.mnemonicToAccountSigner(generateMnemonic());\n * ```\n *\n * @param {string} key The mnemonic key to derive the account from.\n * @param {HDOptions} [opts] Optional HD options for deriving the account.\n * @returns {LocalAccountSigner} A LocalAccountSigner object for the derived account.\n */\n static mnemonicToAccountSigner(key, opts) {\n const signer = mnemonicToAccount(key, opts);\n return new _LocalAccountSigner(signer);\n }\n /**\n * Creates a `LocalAccountSigner` instance using the provided private key.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * ```\n *\n * @param {Hex} key The private key in hexadecimal format\n * @returns {LocalAccountSigner} An instance of `LocalAccountSigner` initialized with the provided private key\n */\n static privateKeyToAccountSigner(key) {\n const signer = privateKeyToAccount(key);\n return new _LocalAccountSigner(signer);\n }\n /**\n * Generates a new private key and creates a `LocalAccountSigner` for a `PrivateKeyAccount`.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n *\n * const signer = LocalAccountSigner.generatePrivateKeySigner();\n * ```\n *\n * @returns {LocalAccountSigner} A `LocalAccountSigner` instance initialized with the generated private key account\n */\n static generatePrivateKeySigner() {\n const signer = privateKeyToAccount(generatePrivateKey());\n return new _LocalAccountSigner(signer);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/transport/split.js\n var split2;\n var init_split = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/transport/split.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n split2 = (params) => {\n const overrideMap = params.overrides.reduce((accum, curr) => {\n curr.methods.forEach((method) => {\n if (accum.has(method) && accum.get(method) !== curr.transport) {\n throw new Error(\"A method cannot be handled by more than one transport\");\n }\n accum.set(method, curr.transport);\n });\n return accum;\n }, /* @__PURE__ */ new Map());\n return (opts) => custom({\n request: async (args) => {\n const transportOverride = overrideMap.get(args.method);\n if (transportOverride != null) {\n return transportOverride(opts).request(args);\n }\n return params.fallback(opts).request(args);\n }\n })(opts);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/traceHeader.js\n function generateRandomHexString(numBytes) {\n const hexPairs = new Array(numBytes).fill(0).map(() => Math.floor(Math.random() * 16).toString(16).padStart(2, \"0\"));\n return hexPairs.join(\"\");\n }\n var TRACE_HEADER_NAME, TRACE_HEADER_STATE, clientTraceId, TraceHeader;\n var init_traceHeader = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/utils/traceHeader.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n TRACE_HEADER_NAME = \"traceparent\";\n TRACE_HEADER_STATE = \"tracestate\";\n clientTraceId = generateRandomHexString(16);\n TraceHeader = class _TraceHeader {\n /**\n * Initializes a new instance with the provided trace identifiers and state information.\n *\n * @param {string} traceId The unique identifier for the trace\n * @param {string} parentId The identifier of the parent trace\n * @param {string} traceFlags Flags containing trace-related options\n * @param {TraceHeader[\"traceState\"]} traceState The trace state information for additional trace context\n */\n constructor(traceId, parentId, traceFlags, traceState) {\n Object.defineProperty(this, \"traceId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"parentId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"traceFlags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"traceState\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.traceId = traceId;\n this.parentId = parentId;\n this.traceFlags = traceFlags;\n this.traceState = traceState;\n }\n /**\n * Creating a default trace id that is a random setup for both trace id and parent id\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers) || TraceHeader.default();\n * ```\n *\n * @returns {TraceHeader} A default trace header\n */\n static default() {\n return new _TraceHeader(\n clientTraceId,\n generateRandomHexString(8),\n \"00\",\n //Means no flag have been set, and no sampled state https://www.w3.org/TR/trace-context/#trace-flags\n {}\n );\n }\n /**\n * Should be able to consume a trace header from the headers of an http request\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers);\n * ```\n *\n * @param {Record} headers The headers from the http request\n * @returns {TraceHeader | undefined} The trace header object, or nothing if not found\n */\n static fromTraceHeader(headers) {\n if (!headers[TRACE_HEADER_NAME]) {\n return void 0;\n }\n const [version7, traceId, parentId, traceFlags] = headers[TRACE_HEADER_NAME]?.split(\"-\");\n const traceState = headers[TRACE_HEADER_STATE]?.split(\",\").reduce((acc, curr) => {\n const [key, value] = curr.split(\"=\");\n acc[key] = value;\n return acc;\n }, {}) || {};\n if (version7 !== \"00\") {\n console.debug(new Error(`Invalid version for traceheader: ${headers[TRACE_HEADER_NAME]}`));\n return void 0;\n }\n return new _TraceHeader(traceId, parentId, traceFlags, traceState);\n }\n /**\n * Should be able to convert the trace header to the format that is used in the headers of an http request\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers) || TraceHeader.default();\n * const headers = traceHeader.toTraceHeader();\n * ```\n *\n * @returns {{traceparent: string, tracestate: string}} The trace header in the format of a record, used in our http client\n */\n toTraceHeader() {\n return {\n [TRACE_HEADER_NAME]: `00-${this.traceId}-${this.parentId}-${this.traceFlags}`,\n [TRACE_HEADER_STATE]: Object.entries(this.traceState).map(([key, value]) => `${key}=${value}`).join(\",\")\n };\n }\n /**\n * Should be able to create a new trace header with a new event in the trace state,\n * as the key of the eventName as breadcrumbs appending onto previous breadcrumbs with the - infix if exists. And the\n * trace parent gets updated as according to the docs\n *\n * @example ```ts\n * const traceHeader = TraceHeader.fromTraceHeader(headers) || TraceHeader.default();\n * const newTraceHeader = traceHeader.withEvent(\"newEvent\");\n * ```\n *\n * @param {string} eventName The key of the new event\n * @returns {TraceHeader} The new trace header\n */\n withEvent(eventName) {\n const breadcrumbs = this.traceState.breadcrumbs ? `${this.traceState.breadcrumbs}-${eventName}` : eventName;\n return new _TraceHeader(this.traceId, this.parentId, this.traceFlags, {\n ...this.traceState,\n breadcrumbs\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/index.js\n var init_esm6 = __esm({\n \"../../../node_modules/.pnpm/@aa-sdk+core@4.62.0_typescript@5.8.3_viem@2.38.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.25.64_/node_modules/@aa-sdk/core/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_smartContractAccount();\n init_sendTransaction2();\n init_sendTransactions();\n init_sendUserOperation2();\n init_bundlerClient2();\n init_smartAccountClient();\n init_isSmartAccountClient();\n init_schema2();\n init_smartAccountClient2();\n init_entrypoint2();\n init_account2();\n init_base2();\n init_client();\n init_useroperation();\n init_addBreadcrumb();\n init_signer();\n init_gasEstimator2();\n init_webauthnGasEstimator();\n init_gasEstimator();\n init_erc7677middleware();\n init_noopMiddleware();\n init_local_account();\n init_split();\n init_traceHeader();\n init_utils10();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/isAlchemySmartAccountClient.js\n function isAlchemySmartAccountClient(client) {\n return client.transport.type === \"alchemy\";\n }\n var init_isAlchemySmartAccountClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/isAlchemySmartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/actions/simulateUserOperationChanges.js\n var simulateUserOperationChanges;\n var init_simulateUserOperationChanges = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/actions/simulateUserOperationChanges.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_isAlchemySmartAccountClient();\n simulateUserOperationChanges = async (client, { account = client.account, overrides, ...params }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isAlchemySmartAccountClient(client)) {\n throw new IncompatibleClientError(\"AlchemySmartAccountClient\", \"SimulateUserOperationAssetChanges\", client);\n }\n const uoStruct = deepHexlify(await client.buildUserOperation({\n ...params,\n account,\n overrides\n }));\n return client.request({\n method: \"alchemy_simulateUserOperationAssetChanges\",\n params: [uoStruct, account.getEntryPoint().address]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/alchemyTrackerHeaders.js\n function mutateRemoveTrackingHeaders(x4) {\n if (!x4)\n return;\n if (Array.isArray(x4))\n return;\n if (typeof x4 !== \"object\")\n return;\n TRACKER_HEADER in x4 && delete x4[TRACKER_HEADER];\n TRACKER_BREADCRUMB in x4 && delete x4[TRACKER_BREADCRUMB];\n TRACE_HEADER_NAME in x4 && delete x4[TRACE_HEADER_NAME];\n TRACE_HEADER_STATE in x4 && delete x4[TRACE_HEADER_STATE];\n }\n function addCrumb(previous, crumb) {\n if (!previous)\n return crumb;\n return `${previous} > ${crumb}`;\n }\n function headersUpdate(crumb) {\n const headerUpdate_ = (x4) => {\n const traceHeader = (TraceHeader.fromTraceHeader(x4) || TraceHeader.default()).withEvent(crumb);\n return {\n [TRACKER_HEADER]: traceHeader.parentId,\n ...x4,\n [TRACKER_BREADCRUMB]: addCrumb(x4[TRACKER_BREADCRUMB], crumb),\n ...traceHeader.toTraceHeader()\n };\n };\n return headerUpdate_;\n }\n var TRACKER_HEADER, TRACKER_BREADCRUMB;\n var init_alchemyTrackerHeaders = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/alchemyTrackerHeaders.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm6();\n init_esm6();\n TRACKER_HEADER = \"X-Alchemy-Client-Trace-Id\";\n TRACKER_BREADCRUMB = \"X-Alchemy-Client-Breadcrumb\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/schema.js\n var AlchemyChainSchema;\n var init_schema3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/schema.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm5();\n AlchemyChainSchema = esm_default.custom((chain2) => {\n const chain_ = ChainSchema.parse(chain2);\n return chain_.rpcUrls.alchemy != null;\n }, \"chain must include an alchemy rpc url. See `defineAlchemyChain` or import a chain from `@account-kit/infra`.\");\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/version.js\n var VERSION2;\n var init_version6 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n VERSION2 = \"4.62.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/alchemyTransport.js\n function isAlchemyTransport(transport, chain2) {\n return transport({ chain: chain2 }).config.type === \"alchemy\";\n }\n function alchemy(config2) {\n const { retryDelay, retryCount = 0 } = config2;\n const fetchOptions = { ...config2.fetchOptions };\n const connectionConfig = ConnectionConfigSchema.parse(config2.alchemyConnection ?? config2);\n const headersAsObject = convertHeadersToObject(fetchOptions.headers);\n fetchOptions.headers = {\n ...headersAsObject,\n \"Alchemy-AA-Sdk-Version\": VERSION2\n };\n if (connectionConfig.jwt != null || connectionConfig.apiKey != null) {\n fetchOptions.headers = {\n ...fetchOptions.headers,\n Authorization: `Bearer ${connectionConfig.jwt ?? connectionConfig.apiKey}`\n };\n }\n const transport = (opts) => {\n const { chain: chain_ } = opts;\n if (!chain_) {\n throw new ChainNotFoundError2();\n }\n const chain2 = AlchemyChainSchema.parse(chain_);\n const rpcUrl = connectionConfig.rpcUrl == null ? chain2.rpcUrls.alchemy.http[0] : connectionConfig.rpcUrl;\n const chainAgnosticRpcUrl = connectionConfig.rpcUrl == null ? \"https://api.g.alchemy.com/v2\" : connectionConfig.chainAgnosticUrl ?? connectionConfig.rpcUrl;\n const innerTransport = (() => {\n mutateRemoveTrackingHeaders(config2?.fetchOptions?.headers);\n if (config2.alchemyConnection && config2.nodeRpcUrl) {\n return split2({\n overrides: [\n {\n methods: alchemyMethods,\n transport: http(rpcUrl, { fetchOptions, retryCount })\n },\n {\n methods: chainAgnosticMethods,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay\n })\n }\n ],\n fallback: http(config2.nodeRpcUrl, {\n fetchOptions: config2.fetchOptions,\n retryCount,\n retryDelay\n })\n });\n }\n return split2({\n overrides: [\n {\n methods: chainAgnosticMethods,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay\n })\n }\n ],\n fallback: http(rpcUrl, { fetchOptions, retryCount, retryDelay })\n });\n })();\n return createTransport({\n key: \"alchemy\",\n name: \"Alchemy Transport\",\n request: innerTransport({\n ...opts,\n // Retries are already handled above within the split transport,\n // so `retryCount` must be 0 here for the expected behavior.\n retryCount: 0\n }).request,\n // Retries are already handled above within the split transport,\n // so `retryCount` must be 0 here too for the expected behavior.\n retryCount: 0,\n retryDelay,\n type: \"alchemy\"\n }, { alchemyRpcUrl: rpcUrl, fetchOptions });\n };\n return Object.assign(transport, {\n dynamicFetchOptions: fetchOptions,\n updateHeaders(newHeaders_) {\n const newHeaders = convertHeadersToObject(newHeaders_);\n fetchOptions.headers = {\n ...fetchOptions.headers,\n ...newHeaders\n };\n },\n config: config2\n });\n }\n var alchemyMethods, chainAgnosticMethods, convertHeadersToObject;\n var init_alchemyTransport = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/alchemyTransport.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_alchemyTrackerHeaders();\n init_schema3();\n init_version6();\n alchemyMethods = [\n \"eth_sendUserOperation\",\n \"eth_estimateUserOperationGas\",\n \"eth_getUserOperationReceipt\",\n \"eth_getUserOperationByHash\",\n \"eth_supportedEntryPoints\",\n \"rundler_maxPriorityFeePerGas\",\n \"pm_getPaymasterData\",\n \"pm_getPaymasterStubData\",\n \"alchemy_requestGasAndPaymasterAndData\"\n ];\n chainAgnosticMethods = [\n \"wallet_prepareCalls\",\n \"wallet_sendPreparedCalls\",\n \"wallet_requestAccount\",\n \"wallet_createAccount\",\n \"wallet_listAccounts\",\n \"wallet_createSession\",\n \"wallet_getCallsStatus\"\n ];\n convertHeadersToObject = (headers) => {\n if (!headers) {\n return {};\n }\n if (headers instanceof Headers) {\n const headersObject = {};\n headers.forEach((value, key) => {\n headersObject[key] = value;\n });\n return headersObject;\n }\n if (Array.isArray(headers)) {\n return headers.reduce((acc, header) => {\n acc[header[0]] = header[1];\n return acc;\n }, {});\n }\n return headers;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/chains.js\n var defineAlchemyChain, arbitrum2, arbitrumGoerli2, arbitrumSepolia2, goerli2, mainnet2, optimism2, optimismGoerli2, optimismSepolia2, sepolia2, base2, baseGoerli2, baseSepolia2, polygonMumbai2, polygonAmoy2, polygon2, fraxtal2, fraxtalSepolia, zora2, zoraSepolia2, worldChainSepolia, worldChain, shapeSepolia, shape, unichainMainnet, unichainSepolia, soneiumMinato, soneiumMainnet, opbnbTestnet, opbnbMainnet, beraChainBartio, inkMainnet, inkSepolia, arbitrumNova2, monadTestnet, mekong, openlootSepolia, gensynTestnet, riseTestnet, storyMainnet, storyAeneid, celoAlfajores, celoMainnet, teaSepolia, bobaSepolia, bobaMainnet;\n var init_chains2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/chains.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_chains();\n defineAlchemyChain = ({ chain: chain2, rpcBaseUrl }) => {\n return {\n ...chain2,\n rpcUrls: {\n ...chain2.rpcUrls,\n alchemy: {\n http: [rpcBaseUrl]\n }\n }\n };\n };\n arbitrum2 = {\n ...arbitrum,\n rpcUrls: {\n ...arbitrum.rpcUrls,\n alchemy: {\n http: [\"https://arb-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n arbitrumGoerli2 = {\n ...arbitrumGoerli,\n rpcUrls: {\n ...arbitrumGoerli.rpcUrls,\n alchemy: {\n http: [\"https://arb-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n arbitrumSepolia2 = {\n ...arbitrumSepolia,\n rpcUrls: {\n ...arbitrumSepolia.rpcUrls,\n alchemy: {\n http: [\"https://arb-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n goerli2 = {\n ...goerli,\n rpcUrls: {\n ...goerli.rpcUrls,\n alchemy: {\n http: [\"https://eth-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n mainnet2 = {\n ...mainnet,\n rpcUrls: {\n ...mainnet.rpcUrls,\n alchemy: {\n http: [\"https://eth-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n optimism2 = {\n ...optimism,\n rpcUrls: {\n ...optimism.rpcUrls,\n alchemy: {\n http: [\"https://opt-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n optimismGoerli2 = {\n ...optimismGoerli,\n rpcUrls: {\n ...optimismGoerli.rpcUrls,\n alchemy: {\n http: [\"https://opt-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n optimismSepolia2 = {\n ...optimismSepolia,\n rpcUrls: {\n ...optimismSepolia.rpcUrls,\n alchemy: {\n http: [\"https://opt-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n sepolia2 = {\n ...sepolia,\n rpcUrls: {\n ...sepolia.rpcUrls,\n alchemy: {\n http: [\"https://eth-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n base2 = {\n ...base,\n rpcUrls: {\n ...base.rpcUrls,\n alchemy: {\n http: [\"https://base-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n baseGoerli2 = {\n ...baseGoerli,\n rpcUrls: {\n ...baseGoerli.rpcUrls,\n alchemy: {\n http: [\"https://base-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n baseSepolia2 = {\n ...baseSepolia,\n rpcUrls: {\n ...baseSepolia.rpcUrls,\n alchemy: {\n http: [\"https://base-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n polygonMumbai2 = {\n ...polygonMumbai,\n rpcUrls: {\n ...polygonMumbai.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mumbai.g.alchemy.com/v2\"]\n }\n }\n };\n polygonAmoy2 = {\n ...polygonAmoy,\n rpcUrls: {\n ...polygonAmoy.rpcUrls,\n alchemy: {\n http: [\"https://polygon-amoy.g.alchemy.com/v2\"]\n }\n }\n };\n polygon2 = {\n ...polygon,\n rpcUrls: {\n ...polygon.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n fraxtal2 = {\n ...fraxtal,\n rpcUrls: {\n ...fraxtal.rpcUrls\n }\n };\n fraxtalSepolia = defineChain({\n id: 2523,\n name: \"Fraxtal Sepolia\",\n nativeCurrency: { name: \"Frax Ether\", symbol: \"frxETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.testnet-sepolia.frax.com\"]\n }\n }\n });\n zora2 = {\n ...zora,\n rpcUrls: {\n ...zora.rpcUrls\n }\n };\n zoraSepolia2 = {\n ...zoraSepolia,\n rpcUrls: {\n ...zoraSepolia.rpcUrls\n }\n };\n worldChainSepolia = defineChain({\n id: 4801,\n name: \"World Chain Sepolia\",\n network: \"World Chain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n worldChain = defineChain({\n id: 480,\n name: \"World Chain\",\n network: \"World Chain\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n shapeSepolia = defineChain({\n id: 11011,\n name: \"Shape Sepolia\",\n network: \"Shape Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n shape = defineChain({\n id: 360,\n name: \"Shape\",\n network: \"Shape\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n unichainMainnet = defineChain({\n id: 130,\n name: \"Unichain Mainnet\",\n network: \"Unichain Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n unichainSepolia = defineChain({\n id: 1301,\n name: \"Unichain Sepolia\",\n network: \"Unichain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n soneiumMinato = defineChain({\n id: 1946,\n name: \"Soneium Minato\",\n network: \"Soneium Minato\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n }\n }\n });\n soneiumMainnet = defineChain({\n id: 1868,\n name: \"Soneium Mainnet\",\n network: \"Soneium Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n opbnbTestnet = defineChain({\n id: 5611,\n name: \"OPBNB Testnet\",\n network: \"OPBNB Testnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n }\n }\n });\n opbnbMainnet = defineChain({\n id: 204,\n name: \"OPBNB Mainnet\",\n network: \"OPBNB Mainnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n beraChainBartio = defineChain({\n id: 80084,\n name: \"BeraChain Bartio\",\n network: \"BeraChain Bartio\",\n nativeCurrency: { name: \"Bera\", symbol: \"BERA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n }\n }\n });\n inkMainnet = defineChain({\n id: 57073,\n name: \"Ink Mainnet\",\n network: \"Ink Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n inkSepolia = defineChain({\n id: 763373,\n name: \"Ink Sepolia\",\n network: \"Ink Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n arbitrumNova2 = {\n ...arbitrumNova,\n rpcUrls: {\n ...arbitrumNova.rpcUrls\n }\n };\n monadTestnet = defineChain({\n id: 10143,\n name: \"Monad Testnet\",\n nativeCurrency: { name: \"Monad\", symbol: \"MON\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://testnet.monadexplorer.com\"\n }\n },\n testnet: true\n });\n mekong = defineChain({\n id: 7078815900,\n name: \"Mekong Pectra Devnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.mekong.ethpandaops.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.mekong.ethpandaops.io\"\n }\n },\n testnet: true\n });\n openlootSepolia = defineChain({\n id: 905905,\n name: \"Openloot Sepolia\",\n nativeCurrency: { name: \"Openloot\", symbol: \"OL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://openloot-sepolia.explorer.alchemy.com\"\n }\n },\n testnet: true\n });\n gensynTestnet = defineChain({\n id: 685685,\n name: \"Gensyn Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://gensyn-testnet.explorer.alchemy.com\"\n }\n },\n testnet: true\n });\n riseTestnet = defineChain({\n id: 11155931,\n name: \"Rise Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.testnet.riselabs.xyz\"\n }\n },\n testnet: true\n });\n storyMainnet = defineChain({\n id: 1514,\n name: \"Story Mainnet\",\n nativeCurrency: { name: \"IP\", symbol: \"IP\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://www.storyscan.io\"\n }\n },\n testnet: false\n });\n storyAeneid = defineChain({\n id: 1315,\n name: \"Story Aeneid\",\n nativeCurrency: { name: \"IP\", symbol: \"IP\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://aeneid.storyscan.io\"\n }\n },\n testnet: true\n });\n celoAlfajores = defineChain({\n id: 44787,\n name: \"Celo Alfajores\",\n nativeCurrency: { name: \"Celo native asset\", symbol: \"CELO\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://celo-alfajores.blockscout.com/\"\n }\n },\n testnet: true\n });\n celoMainnet = defineChain({\n id: 42220,\n name: \"Celo Mainnet\",\n nativeCurrency: { name: \"Celo native asset\", symbol: \"CELO\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://celo.blockscout.com/\"\n }\n },\n testnet: false\n });\n teaSepolia = defineChain({\n id: 10218,\n name: \"Tea Sepolia\",\n nativeCurrency: { name: \"TEA\", symbol: \"TEA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://sepolia.tea.xyz/\"\n }\n },\n testnet: true\n });\n bobaSepolia = defineChain({\n id: 28882,\n name: \"Boba Sepolia\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://sepolia.testnet.bobascan.com/\"\n }\n },\n testnet: true\n });\n bobaMainnet = defineChain({\n id: 288,\n name: \"Boba Mainnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://bobascan.com/\"\n }\n },\n testnet: false\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.62.0/node_modules/@account-kit/logging/dist/esm/noop.js\n var noopLogger;\n var init_noop = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.62.0/node_modules/@account-kit/logging/dist/esm/noop.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n noopLogger = {\n trackEvent: async () => {\n },\n _internal: {\n ready: Promise.resolve(),\n anonId: \"\"\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+logging@4.62.0/node_modules/@account-kit/logging/dist/esm/index.js\n function createLogger(_context) {\n const innerLogger = noopLogger;\n const logger = {\n ...innerLogger,\n profiled(name, func) {\n return function(...args) {\n const start = Date.now();\n const result = func.apply(this, args);\n if (result instanceof Promise) {\n return result.then((res) => {\n innerLogger.trackEvent({\n name: \"performance\",\n data: {\n executionTimeMs: Date.now() - start,\n functionName: name\n }\n });\n return res;\n });\n }\n innerLogger.trackEvent({\n name: \"performance\",\n data: {\n executionTimeMs: Date.now() - start,\n functionName: name\n }\n });\n return result;\n };\n }\n };\n return logger;\n }\n var init_esm7 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+logging@4.62.0/node_modules/@account-kit/logging/dist/esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_noop();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/metrics.js\n var InfraLogger;\n var init_metrics = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/metrics.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm7();\n init_version6();\n InfraLogger = createLogger({\n package: \"@account-kit/infra\",\n version: VERSION2\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/decorators/smartAccount.js\n function logSendUoEvent(chainId, account) {\n const signerType = isSmartAccountWithSigner(account) ? account.getSigner().signerType : \"unknown\";\n InfraLogger.trackEvent({\n name: \"client_send_uo\",\n data: {\n chainId,\n signerType,\n entryPoint: account.getEntryPoint().address\n }\n });\n }\n var alchemyActions;\n var init_smartAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/decorators/smartAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_simulateUserOperationChanges();\n init_metrics();\n alchemyActions = (client_) => ({\n simulateUserOperation: async (args) => {\n const client = clientHeaderTrack(client_, \"simulateUserOperation\");\n return simulateUserOperationChanges(client, args);\n },\n async sendUserOperation(args) {\n const client = clientHeaderTrack(client_, \"infraSendUserOperation\");\n const { account = client.account } = args;\n const result = sendUserOperation(client, args);\n logSendUoEvent(client.chain.id, account);\n return result;\n },\n sendTransaction: async (args, overrides, context2) => {\n const client = clientHeaderTrack(client_, \"sendTransaction\");\n const { account = client.account } = args;\n const result = await sendTransaction2(client, args, overrides, context2);\n logSendUoEvent(client.chain.id, account);\n return result;\n },\n async sendTransactions(args) {\n const client = clientHeaderTrack(client_, \"sendTransactions\");\n const { account = client.account } = args;\n const result = sendTransactions(client, args);\n logSendUoEvent(client.chain.id, account);\n return result;\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/rpcClient.js\n var createAlchemyPublicRpcClient;\n var init_rpcClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/rpcClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n createAlchemyPublicRpcClient = ({ transport, chain: chain2 }) => {\n return createBundlerClient({\n chain: chain2,\n transport\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/defaults.js\n var getDefaultUserOperationFeeOptions2;\n var init_defaults2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/defaults.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains2();\n getDefaultUserOperationFeeOptions2 = (chain2) => {\n const feeOptions = {\n maxFeePerGas: { multiplier: 1.5 },\n maxPriorityFeePerGas: { multiplier: 1.05 }\n };\n if ((/* @__PURE__ */ new Set([\n arbitrum2.id,\n arbitrumGoerli2.id,\n arbitrumSepolia2.id,\n optimism2.id,\n optimismGoerli2.id,\n optimismSepolia2.id\n ])).has(chain2.id)) {\n feeOptions.preVerificationGas = { multiplier: 1.05 };\n }\n return feeOptions;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/feeEstimator.js\n var alchemyFeeEstimator;\n var init_feeEstimator2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/feeEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n alchemyFeeEstimator = (transport) => async (struct, { overrides, feeOptions, client: client_ }) => {\n const client = clientHeaderTrack(client_, \"alchemyFeeEstimator\");\n const transport_ = transport({ chain: client.chain });\n let [block, maxPriorityFeePerGasEstimate] = await Promise.all([\n client.getBlock({ blockTag: \"latest\" }),\n // it is a fair assumption that if someone is using this Alchemy Middleware, then they are using Alchemy RPC\n transport_.request({\n method: \"rundler_maxPriorityFeePerGas\",\n params: []\n })\n ]);\n const baseFeePerGas = block.baseFeePerGas;\n if (baseFeePerGas == null) {\n throw new Error(\"baseFeePerGas is null\");\n }\n const maxPriorityFeePerGas = applyUserOpOverrideOrFeeOption(maxPriorityFeePerGasEstimate, overrides?.maxPriorityFeePerGas, feeOptions?.maxPriorityFeePerGas);\n const maxFeePerGas = applyUserOpOverrideOrFeeOption(bigIntMultiply(baseFeePerGas, 1.5) + BigInt(maxPriorityFeePerGas), overrides?.maxFeePerGas, feeOptions?.maxFeePerGas);\n return {\n ...struct,\n maxPriorityFeePerGas,\n maxFeePerGas\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/gas-manager.js\n var AlchemyPaymasterAddressV06Unify, AlchemyPaymasterAddressV07Unify, AlchemyPaymasterAddressV4, AlchemyPaymasterAddressV3, AlchemyPaymasterAddressV2, ArbSepoliaPaymasterAddress, AlchemyPaymasterAddressV1, AlchemyPaymasterAddressV07V2, AlchemyPaymasterAddressV07V1, getAlchemyPaymasterAddress, PermitTypes, ERC20Abis, EIP7597Abis;\n var init_gas_manager = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/gas-manager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains2();\n AlchemyPaymasterAddressV06Unify = \"0x0000000000ce04e2359130e7d0204A5249958921\";\n AlchemyPaymasterAddressV07Unify = \"0x00000000000667F27D4DB42334ec11a25db7EBb4\";\n AlchemyPaymasterAddressV4 = \"0xEaf0Cde110a5d503f2dD69B3a49E031e29b3F9D2\";\n AlchemyPaymasterAddressV3 = \"0x4f84a207A80c39E9e8BaE717c1F25bA7AD1fB08F\";\n AlchemyPaymasterAddressV2 = \"0x4Fd9098af9ddcB41DA48A1d78F91F1398965addc\";\n ArbSepoliaPaymasterAddress = \"0x0804Afe6EEFb73ce7F93CD0d5e7079a5a8068592\";\n AlchemyPaymasterAddressV1 = \"0xc03aac639bb21233e0139381970328db8bceeb67\";\n AlchemyPaymasterAddressV07V2 = \"0x2cc0c7981D846b9F2a16276556f6e8cb52BfB633\";\n AlchemyPaymasterAddressV07V1 = \"0xEF725Aa22d43Ea69FB22bE2EBe6ECa205a6BCf5B\";\n getAlchemyPaymasterAddress = (chain2, version7) => {\n switch (version7) {\n case \"0.6.0\":\n switch (chain2.id) {\n case fraxtalSepolia.id:\n case worldChainSepolia.id:\n case shapeSepolia.id:\n case unichainSepolia.id:\n case opbnbTestnet.id:\n case inkSepolia.id:\n case monadTestnet.id:\n case openlootSepolia.id:\n case gensynTestnet.id:\n case riseTestnet.id:\n case storyAeneid.id:\n case teaSepolia.id:\n case arbitrumGoerli2.id:\n case goerli2.id:\n case optimismGoerli2.id:\n case baseGoerli2.id:\n case polygonMumbai2.id:\n case worldChain.id:\n case shape.id:\n case unichainMainnet.id:\n case soneiumMinato.id:\n case soneiumMainnet.id:\n case opbnbMainnet.id:\n case beraChainBartio.id:\n case inkMainnet.id:\n case arbitrumNova2.id:\n case storyMainnet.id:\n case celoAlfajores.id:\n case celoMainnet.id:\n return AlchemyPaymasterAddressV4;\n case polygonAmoy2.id:\n case optimismSepolia2.id:\n case baseSepolia2.id:\n case zora2.id:\n case zoraSepolia2.id:\n case fraxtal2.id:\n return AlchemyPaymasterAddressV3;\n case mainnet2.id:\n case arbitrum2.id:\n case optimism2.id:\n case polygon2.id:\n case base2.id:\n return AlchemyPaymasterAddressV2;\n case arbitrumSepolia2.id:\n return ArbSepoliaPaymasterAddress;\n case sepolia2.id:\n return AlchemyPaymasterAddressV1;\n default:\n return AlchemyPaymasterAddressV06Unify;\n }\n case \"0.7.0\":\n switch (chain2.id) {\n case arbitrumNova2.id:\n case celoAlfajores.id:\n case celoMainnet.id:\n case gensynTestnet.id:\n case inkMainnet.id:\n case inkSepolia.id:\n case monadTestnet.id:\n case opbnbMainnet.id:\n case opbnbTestnet.id:\n case openlootSepolia.id:\n case riseTestnet.id:\n case shape.id:\n case shapeSepolia.id:\n case soneiumMainnet.id:\n case soneiumMinato.id:\n case storyAeneid.id:\n case storyMainnet.id:\n case teaSepolia.id:\n case unichainMainnet.id:\n case unichainSepolia.id:\n case worldChain.id:\n case worldChainSepolia.id:\n return AlchemyPaymasterAddressV07V1;\n case arbitrum2.id:\n case arbitrumGoerli2.id:\n case arbitrumSepolia2.id:\n case base2.id:\n case baseGoerli2.id:\n case baseSepolia2.id:\n case beraChainBartio.id:\n case fraxtal2.id:\n case fraxtalSepolia.id:\n case goerli2.id:\n case mainnet2.id:\n case optimism2.id:\n case optimismGoerli2.id:\n case optimismSepolia2.id:\n case polygon2.id:\n case polygonAmoy2.id:\n case polygonMumbai2.id:\n case sepolia2.id:\n case zora2.id:\n case zoraSepolia2.id:\n return AlchemyPaymasterAddressV07V2;\n default:\n return AlchemyPaymasterAddressV07Unify;\n }\n default:\n throw new Error(`Unsupported EntryPointVersion: ${version7}`);\n }\n };\n PermitTypes = {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" }\n ],\n Permit: [\n { name: \"owner\", type: \"address\" },\n { name: \"spender\", type: \"address\" },\n { name: \"value\", type: \"uint256\" },\n { name: \"nonce\", type: \"uint256\" },\n { name: \"deadline\", type: \"uint256\" }\n ]\n };\n ERC20Abis = [\n \"function decimals() public view returns (uint8)\",\n \"function balanceOf(address owner) external view returns (uint256)\",\n \"function allowance(address owner, address spender) external view returns (uint256)\",\n \"function approve(address spender, uint256 amount) external returns (bool)\"\n ];\n EIP7597Abis = [\n \"function nonces(address owner) external view returns (uint)\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/errors/base.js\n var BaseError5;\n var init_base4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/errors/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_version6();\n BaseError5 = class extends BaseError4 {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: VERSION2\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/errors/invalidSignedPermit.js\n var InvalidSignedPermit;\n var init_invalidSignedPermit = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/errors/invalidSignedPermit.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base4();\n InvalidSignedPermit = class extends BaseError5 {\n constructor(reason) {\n super([\"Invalid signed permit\"].join(\"\\n\"), {\n details: [reason, \"Please provide a valid signed permit\"].join(\"\\n\")\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidSignedPermit\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/gasManager.js\n function alchemyGasManagerMiddleware(policyId, policyToken) {\n const buildContext = async (args) => {\n const context2 = { policyId };\n const { account, client } = args;\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n if (policyToken !== void 0) {\n context2.erc20Context = {\n tokenAddress: policyToken.address,\n maxTokenAmount: policyToken.maxTokenAmount\n };\n if (policyToken.permit !== void 0) {\n const permit = await generateSignedPermit(client, account, policyToken);\n if (permit !== void 0) {\n context2.erc20Context.permit = permit;\n }\n } else if (args.context !== void 0) {\n context2.erc20Context.permit = extractSignedPermitFromContext(args.context);\n }\n }\n return context2;\n };\n return {\n dummyPaymasterAndData: async (uo, args) => {\n const context2 = await buildContext(args);\n const baseMiddleware = erc7677Middleware({ context: context2 });\n return baseMiddleware.dummyPaymasterAndData(uo, args);\n },\n paymasterAndData: async (uo, args) => {\n const context2 = await buildContext(args);\n const baseMiddleware = erc7677Middleware({ context: context2 });\n return baseMiddleware.paymasterAndData(uo, args);\n }\n };\n }\n function alchemyGasAndPaymasterAndDataMiddleware(params) {\n const { policyId, policyToken, transport, gasEstimatorOverride, feeEstimatorOverride } = params;\n return {\n dummyPaymasterAndData: async (uo, args) => {\n if (\n // No reason to generate dummy data if we are bypassing the paymaster.\n bypassPaymasterAndData(args.overrides) || // When using alchemy_requestGasAndPaymasterAndData, there is generally no reason to generate dummy\n // data. However, if the gas/feeEstimator is overriden, then this option should be enabled.\n !(gasEstimatorOverride || feeEstimatorOverride)\n ) {\n return noopMiddleware(uo, args);\n }\n return alchemyGasManagerMiddleware(policyId, policyToken).dummyPaymasterAndData(uo, args);\n },\n feeEstimator: (uo, args) => {\n return feeEstimatorOverride ? feeEstimatorOverride(uo, args) : bypassPaymasterAndData(args.overrides) ? alchemyFeeEstimator(transport)(uo, args) : noopMiddleware(uo, args);\n },\n gasEstimator: (uo, args) => {\n return gasEstimatorOverride ? gasEstimatorOverride(uo, args) : bypassPaymasterAndData(args.overrides) ? defaultGasEstimator(args.client)(uo, args) : noopMiddleware(uo, args);\n },\n paymasterAndData: async (uo, { account, client: client_, feeOptions, overrides: overrides_, context: uoContext }) => {\n const client = clientHeaderTrack(client_, \"alchemyFeeEstimator\");\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const userOp = deepHexlify(await resolveProperties(uo));\n const overrides = filterUndefined({\n maxFeePerGas: overrideField(\"maxFeePerGas\", overrides_, feeOptions, userOp),\n maxPriorityFeePerGas: overrideField(\"maxPriorityFeePerGas\", overrides_, feeOptions, userOp),\n callGasLimit: overrideField(\"callGasLimit\", overrides_, feeOptions, userOp),\n verificationGasLimit: overrideField(\"verificationGasLimit\", overrides_, feeOptions, userOp),\n preVerificationGas: overrideField(\"preVerificationGas\", overrides_, feeOptions, userOp),\n ...account.getEntryPoint().version === \"0.7.0\" ? {\n paymasterVerificationGasLimit: overrideField(\"paymasterVerificationGasLimit\", overrides_, feeOptions, userOp),\n paymasterPostOpGasLimit: overrideField(\"paymasterPostOpGasLimit\", overrides_, feeOptions, userOp)\n } : {}\n });\n let erc20Context = void 0;\n if (policyToken !== void 0) {\n erc20Context = {\n tokenAddress: policyToken.address,\n maxTokenAmount: policyToken.maxTokenAmount\n };\n if (policyToken.permit !== void 0) {\n const permit = await generateSignedPermit(client, account, policyToken);\n if (permit !== void 0) {\n erc20Context.permit = permit;\n }\n } else if (uoContext !== void 0) {\n erc20Context.permit = extractSignedPermitFromContext(uoContext);\n }\n }\n const result = await client.request({\n method: \"alchemy_requestGasAndPaymasterAndData\",\n params: [\n {\n policyId,\n entryPoint: account.getEntryPoint().address,\n userOperation: userOp,\n dummySignature: await account.getDummySignature(),\n overrides,\n ...erc20Context ? {\n erc20Context\n } : {}\n }\n ]\n });\n return {\n ...uo,\n ...result\n };\n }\n };\n }\n function extractSignedPermitFromContext(context2) {\n if (context2.signedPermit === void 0) {\n return void 0;\n }\n if (typeof context2.signedPermit !== \"object\") {\n throw new InvalidSignedPermit(\"signedPermit is not an object\");\n }\n if (typeof context2.signedPermit.value !== \"bigint\") {\n throw new InvalidSignedPermit(\"signedPermit.value is not a bigint\");\n }\n if (typeof context2.signedPermit.deadline !== \"bigint\") {\n throw new InvalidSignedPermit(\"signedPermit.deadline is not a bigint\");\n }\n if (!isHex(context2.signedPermit.signature)) {\n throw new InvalidSignedPermit(\"signedPermit.signature is not a hex string\");\n }\n return encodeSignedPermit(context2.signedPermit.value, context2.signedPermit.deadline, context2.signedPermit.signature);\n }\n function encodeSignedPermit(value, deadline, signedPermit) {\n return encodeAbiParameters([{ type: \"uint256\" }, { type: \"uint256\" }, { type: \"bytes\" }], [value, deadline, signedPermit]);\n }\n var overrideField, generateSignedPermit;\n var init_gasManager = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/gasManager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_feeEstimator2();\n init_gas_manager();\n init_invalidSignedPermit();\n overrideField = (field, overrides, feeOptions, userOperation) => {\n let _field = field;\n if (overrides?.[_field] != null) {\n if (isBigNumberish(overrides[_field])) {\n return deepHexlify(overrides[_field]);\n } else {\n return {\n multiplier: Number(overrides[_field].multiplier)\n };\n }\n }\n if (isMultiplier(feeOptions?.[field])) {\n return {\n multiplier: Number(feeOptions[field].multiplier)\n };\n }\n const userOpField = userOperation[field];\n if (isHex(userOpField) && fromHex(userOpField, \"bigint\") > 0n) {\n return userOpField;\n }\n return void 0;\n };\n generateSignedPermit = async (client, account, policyToken) => {\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n if (!policyToken.permit) {\n throw new Error(\"permit is missing\");\n }\n if (!policyToken.permit?.erc20Name || !policyToken.permit?.version) {\n throw new Error(\"erc20Name or version is missing\");\n }\n const paymasterAddress = policyToken.permit.paymasterAddress ?? getAlchemyPaymasterAddress(client.chain, account.getEntryPoint().version);\n if (paymasterAddress === void 0 || paymasterAddress === \"0x\") {\n throw new Error(\"no paymaster contract address available\");\n }\n let allowanceFuture = client.call({\n to: policyToken.address,\n data: encodeFunctionData({\n abi: parseAbi(ERC20Abis),\n functionName: \"allowance\",\n args: [account.address, paymasterAddress]\n })\n });\n let nonceFuture = client.call({\n to: policyToken.address,\n data: encodeFunctionData({\n abi: parseAbi(EIP7597Abis),\n functionName: \"nonces\",\n args: [account.address]\n })\n });\n const [allowanceResponse, nonceResponse] = await Promise.all([\n allowanceFuture,\n nonceFuture\n ]);\n if (!allowanceResponse.data) {\n throw new Error(\"No allowance returned from erc20 contract call\");\n }\n if (!nonceResponse.data) {\n throw new Error(\"No nonces returned from erc20 contract call\");\n }\n const permitLimit = policyToken.permit.autoPermitApproveTo;\n const currentAllowance = BigInt(allowanceResponse.data);\n if (currentAllowance > policyToken.permit.autoPermitBelow) {\n return void 0;\n }\n const nonce = BigInt(nonceResponse.data);\n const deadline = BigInt(Math.floor(Date.now() / 1e3) + 60 * 10);\n const typedPermitData = {\n types: PermitTypes,\n primaryType: \"Permit\",\n domain: {\n name: policyToken.permit.erc20Name ?? \"\",\n version: policyToken.permit.version ?? \"\",\n chainId: BigInt(client.chain.id),\n verifyingContract: policyToken.address\n },\n message: {\n owner: account.address,\n spender: paymasterAddress,\n value: permitLimit,\n nonce,\n deadline\n }\n };\n const signedPermit = await account.signTypedData(typedPermitData);\n return encodeSignedPermit(permitLimit, deadline, signedPermit);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/userOperationSimulator.js\n function alchemyUserOperationSimulator(transport) {\n return async (struct, { account, client }) => {\n const uoSimResult = await transport({ chain: client.chain }).request({\n method: \"alchemy_simulateUserOperationAssetChanges\",\n params: [\n deepHexlify(await resolveProperties(struct)),\n account.getEntryPoint().address\n ]\n });\n if (uoSimResult.error) {\n throw new Error(uoSimResult.error.message);\n }\n return struct;\n };\n }\n var init_userOperationSimulator = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/middleware/userOperationSimulator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/smartAccountClient.js\n function getSignerTypeHeader(account) {\n return { \"Alchemy-Aa-Sdk-Signer\": account.getSigner().signerType };\n }\n function createAlchemySmartAccountClient(config2) {\n if (!config2.chain) {\n throw new ChainNotFoundError2();\n }\n const feeOptions = config2.opts?.feeOptions ?? getDefaultUserOperationFeeOptions2(config2.chain);\n const scaClient = createSmartAccountClient({\n account: config2.account,\n transport: config2.transport,\n chain: config2.chain,\n type: \"AlchemySmartAccountClient\",\n opts: {\n ...config2.opts,\n feeOptions\n },\n feeEstimator: config2.feeEstimator ?? alchemyFeeEstimator(config2.transport),\n gasEstimator: config2.gasEstimator,\n customMiddleware: async (struct, args) => {\n if (isSmartAccountWithSigner(args.account)) {\n config2.transport.updateHeaders(getSignerTypeHeader(args.account));\n }\n return config2.customMiddleware ? config2.customMiddleware(struct, args) : struct;\n },\n ...config2.policyId ? alchemyGasAndPaymasterAndDataMiddleware({\n policyId: config2.policyId,\n policyToken: config2.policyToken,\n transport: config2.transport,\n gasEstimatorOverride: config2.gasEstimator,\n feeEstimatorOverride: config2.feeEstimator\n }) : {},\n userOperationSimulator: config2.useSimulation ? alchemyUserOperationSimulator(config2.transport) : void 0,\n signUserOperation: config2.signUserOperation,\n addBreadCrumb(breadcrumb) {\n const oldConfig = config2.transport.config;\n const dynamicFetchOptions = config2.transport.dynamicFetchOptions;\n const newTransport = alchemy({ ...oldConfig });\n newTransport.updateHeaders(headersUpdate(breadcrumb)(convertHeadersToObject(dynamicFetchOptions?.headers)));\n return createAlchemySmartAccountClient({\n ...config2,\n transport: newTransport\n });\n }\n }).extend(alchemyActions).extend((client_) => ({\n addBreadcrumb(breadcrumb) {\n return clientHeaderTrack(client_, breadcrumb);\n }\n }));\n if (config2.account && isSmartAccountWithSigner(config2.account)) {\n config2.transport.updateHeaders(getSignerTypeHeader(config2.account));\n }\n return scaClient;\n }\n var init_smartAccountClient3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/client/smartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_alchemyTransport();\n init_defaults2();\n init_feeEstimator2();\n init_gasManager();\n init_userOperationSimulator();\n init_smartAccount();\n init_alchemyTrackerHeaders();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/exports/index.js\n var exports_exports2 = {};\n __export(exports_exports2, {\n alchemy: () => alchemy,\n alchemyActions: () => alchemyActions,\n alchemyFeeEstimator: () => alchemyFeeEstimator,\n alchemyGasAndPaymasterAndDataMiddleware: () => alchemyGasAndPaymasterAndDataMiddleware,\n alchemyGasManagerMiddleware: () => alchemyGasManagerMiddleware,\n alchemyUserOperationSimulator: () => alchemyUserOperationSimulator,\n arbitrum: () => arbitrum2,\n arbitrumGoerli: () => arbitrumGoerli2,\n arbitrumNova: () => arbitrumNova2,\n arbitrumSepolia: () => arbitrumSepolia2,\n base: () => base2,\n baseGoerli: () => baseGoerli2,\n baseSepolia: () => baseSepolia2,\n beraChainBartio: () => beraChainBartio,\n bobaMainnet: () => bobaMainnet,\n bobaSepolia: () => bobaSepolia,\n celoAlfajores: () => celoAlfajores,\n celoMainnet: () => celoMainnet,\n createAlchemyPublicRpcClient: () => createAlchemyPublicRpcClient,\n createAlchemySmartAccountClient: () => createAlchemySmartAccountClient,\n defineAlchemyChain: () => defineAlchemyChain,\n fraxtal: () => fraxtal2,\n fraxtalSepolia: () => fraxtalSepolia,\n gensynTestnet: () => gensynTestnet,\n getAlchemyPaymasterAddress: () => getAlchemyPaymasterAddress,\n getDefaultUserOperationFeeOptions: () => getDefaultUserOperationFeeOptions2,\n goerli: () => goerli2,\n headersUpdate: () => headersUpdate,\n inkMainnet: () => inkMainnet,\n inkSepolia: () => inkSepolia,\n isAlchemySmartAccountClient: () => isAlchemySmartAccountClient,\n isAlchemyTransport: () => isAlchemyTransport,\n mainnet: () => mainnet2,\n mekong: () => mekong,\n monadTestnet: () => monadTestnet,\n mutateRemoveTrackingHeaders: () => mutateRemoveTrackingHeaders,\n opbnbMainnet: () => opbnbMainnet,\n opbnbTestnet: () => opbnbTestnet,\n openlootSepolia: () => openlootSepolia,\n optimism: () => optimism2,\n optimismGoerli: () => optimismGoerli2,\n optimismSepolia: () => optimismSepolia2,\n polygon: () => polygon2,\n polygonAmoy: () => polygonAmoy2,\n polygonMumbai: () => polygonMumbai2,\n riseTestnet: () => riseTestnet,\n sepolia: () => sepolia2,\n shape: () => shape,\n shapeSepolia: () => shapeSepolia,\n simulateUserOperationChanges: () => simulateUserOperationChanges,\n soneiumMainnet: () => soneiumMainnet,\n soneiumMinato: () => soneiumMinato,\n storyAeneid: () => storyAeneid,\n storyMainnet: () => storyMainnet,\n teaSepolia: () => teaSepolia,\n unichainMainnet: () => unichainMainnet,\n unichainSepolia: () => unichainSepolia,\n worldChain: () => worldChain,\n worldChainSepolia: () => worldChainSepolia,\n zora: () => zora2,\n zoraSepolia: () => zoraSepolia2\n });\n var init_exports2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_debug@4.4.1_typescript@5.8.3_utf-8-validate@_91850b8a2849fb827e3616547e4ccff7/node_modules/@account-kit/infra/dist/esm/exports/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_simulateUserOperationChanges();\n init_alchemyTransport();\n init_chains2();\n init_smartAccount();\n init_isAlchemySmartAccountClient();\n init_rpcClient();\n init_smartAccountClient3();\n init_defaults2();\n init_gas_manager();\n init_feeEstimator2();\n init_alchemyTrackerHeaders();\n init_gasManager();\n init_userOperationSimulator();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountAbi_v1.js\n var LightAccountAbi_v1;\n var init_LightAccountAbi_v1 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountAbi_v1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LightAccountAbi_v1 = [\n {\n inputs: [\n {\n internalType: \"contract IEntryPoint\",\n name: \"anEntryPoint\",\n type: \"address\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n { inputs: [], name: \"ArrayLengthMismatch\", type: \"error\" },\n { inputs: [], name: \"InvalidInitialization\", type: \"error\" },\n {\n inputs: [{ internalType: \"address\", name: \"owner\", type: \"address\" }],\n name: \"InvalidOwner\",\n type: \"error\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"caller\", type: \"address\" }],\n name: \"NotAuthorized\",\n type: \"error\"\n },\n { inputs: [], name: \"NotInitializing\", type: \"error\" },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"previousAdmin\",\n type: \"address\"\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"newAdmin\",\n type: \"address\"\n }\n ],\n name: \"AdminChanged\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"beacon\",\n type: \"address\"\n }\n ],\n name: \"BeaconUpgraded\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint64\",\n name: \"version\",\n type: \"uint64\"\n }\n ],\n name: \"Initialized\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IEntryPoint\",\n name: \"entryPoint\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n }\n ],\n name: \"LightAccountInitialized\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"previousOwner\",\n type: \"address\"\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\"\n }\n ],\n name: \"OwnershipTransferred\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"implementation\",\n type: \"address\"\n }\n ],\n name: \"Upgraded\",\n type: \"event\"\n },\n {\n inputs: [],\n name: \"addDeposit\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"domainSeparator\",\n outputs: [{ internalType: \"bytes32\", name: \"\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes\", name: \"message\", type: \"bytes\" }],\n name: \"encodeMessageData\",\n outputs: [{ internalType: \"bytes\", name: \"\", type: \"bytes\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"entryPoint\",\n outputs: [\n { internalType: \"contract IEntryPoint\", name: \"\", type: \"address\" }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"dest\", type: \"address\" },\n { internalType: \"uint256\", name: \"value\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"func\", type: \"bytes\" }\n ],\n name: \"execute\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address[]\", name: \"dest\", type: \"address[]\" },\n { internalType: \"bytes[]\", name: \"func\", type: \"bytes[]\" }\n ],\n name: \"executeBatch\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address[]\", name: \"dest\", type: \"address[]\" },\n { internalType: \"uint256[]\", name: \"value\", type: \"uint256[]\" },\n { internalType: \"bytes[]\", name: \"func\", type: \"bytes[]\" }\n ],\n name: \"executeBatch\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getDeposit\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes\", name: \"message\", type: \"bytes\" }],\n name: \"getMessageHash\",\n outputs: [{ internalType: \"bytes32\", name: \"\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"getNonce\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"anOwner\", type: \"address\" }],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"bytes32\", name: \"digest\", type: \"bytes32\" },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n name: \"isValidSignature\",\n outputs: [{ internalType: \"bytes4\", name: \"\", type: \"bytes4\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint256[]\", name: \"\", type: \"uint256[]\" },\n { internalType: \"uint256[]\", name: \"\", type: \"uint256[]\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" }\n ],\n name: \"onERC1155BatchReceived\",\n outputs: [{ internalType: \"bytes4\", name: \"\", type: \"bytes4\" }],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint256\", name: \"\", type: \"uint256\" },\n { internalType: \"uint256\", name: \"\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" }\n ],\n name: \"onERC1155Received\",\n outputs: [{ internalType: \"bytes4\", name: \"\", type: \"bytes4\" }],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint256\", name: \"\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" }\n ],\n name: \"onERC721Received\",\n outputs: [{ internalType: \"bytes4\", name: \"\", type: \"bytes4\" }],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"owner\",\n outputs: [{ internalType: \"address\", name: \"\", type: \"address\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"proxiableUUID\",\n outputs: [{ internalType: \"bytes32\", name: \"\", type: \"bytes32\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"bytes4\", name: \"interfaceId\", type: \"bytes4\" }],\n name: \"supportsInterface\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"address\", name: \"\", type: \"address\" },\n { internalType: \"uint256\", name: \"\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"\", type: \"bytes\" }\n ],\n name: \"tokensReceived\",\n outputs: [],\n stateMutability: \"pure\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"newOwner\", type: \"address\" }],\n name: \"transferOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"newImplementation\", type: \"address\" }\n ],\n name: \"upgradeTo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"newImplementation\", type: \"address\" },\n { internalType: \"bytes\", name: \"data\", type: \"bytes\" }\n ],\n name: \"upgradeToAndCall\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n components: [\n { internalType: \"address\", name: \"sender\", type: \"address\" },\n { internalType: \"uint256\", name: \"nonce\", type: \"uint256\" },\n { internalType: \"bytes\", name: \"initCode\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"callData\", type: \"bytes\" },\n { internalType: \"uint256\", name: \"callGasLimit\", type: \"uint256\" },\n {\n internalType: \"uint256\",\n name: \"verificationGasLimit\",\n type: \"uint256\"\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\"\n },\n { internalType: \"uint256\", name: \"maxFeePerGas\", type: \"uint256\" },\n {\n internalType: \"uint256\",\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\"\n },\n { internalType: \"bytes\", name: \"paymasterAndData\", type: \"bytes\" },\n { internalType: \"bytes\", name: \"signature\", type: \"bytes\" }\n ],\n internalType: \"struct UserOperation\",\n name: \"userOp\",\n type: \"tuple\"\n },\n { internalType: \"bytes32\", name: \"userOpHash\", type: \"bytes32\" },\n { internalType: \"uint256\", name: \"missingAccountFunds\", type: \"uint256\" }\n ],\n name: \"validateUserOp\",\n outputs: [\n { internalType: \"uint256\", name: \"validationData\", type: \"uint256\" }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address payable\",\n name: \"withdrawAddress\",\n type: \"address\"\n },\n { internalType: \"uint256\", name: \"amount\", type: \"uint256\" }\n ],\n name: \"withdrawDepositTo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n { stateMutability: \"payable\", type: \"receive\" }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountAbi_v2.js\n var LightAccountAbi_v2;\n var init_LightAccountAbi_v2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountAbi_v2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LightAccountAbi_v2 = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint_\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"addDeposit\",\n inputs: [],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verifyingContract\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"extensions\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n { name: \"dest\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"func\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n { name: \"dest\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"func\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n { name: \"dest\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"value\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"func\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getDeposit\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getNonce\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initialize\",\n inputs: [{ name: \"owner_\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"hash\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"result\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [{ name: \"newOwner\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"gasFees\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawDepositTo\",\n inputs: [\n {\n name: \"withdrawAddress\",\n type: \"address\",\n internalType: \"address payable\"\n },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"LightAccountInitialized\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n indexed: true,\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"owner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"ArrayLengthMismatch\", inputs: [] },\n { type: \"error\", name: \"ECDSAInvalidSignature\", inputs: [] },\n {\n type: \"error\",\n name: \"ECDSAInvalidSignatureLength\",\n inputs: [{ name: \"length\", type: \"uint256\", internalType: \"uint256\" }]\n },\n {\n type: \"error\",\n name: \"ECDSAInvalidSignatureS\",\n inputs: [{ name: \"s\", type: \"bytes32\", internalType: \"bytes32\" }]\n },\n { type: \"error\", name: \"InvalidInitialization\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"InvalidSignatureType\", inputs: [] },\n {\n type: \"error\",\n name: \"NotAuthorized\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"NotInitializing\", inputs: [] },\n { type: \"error\", name: \"UnauthorizedCallContext\", inputs: [] },\n { type: \"error\", name: \"UpgradeFailed\", inputs: [] },\n { type: \"error\", name: \"ZeroAddressNotAllowed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountFactoryAbi_v1.js\n var LightAccountFactoryAbi_v1;\n var init_LightAccountFactoryAbi_v1 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountFactoryAbi_v1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LightAccountFactoryAbi_v1 = [\n {\n inputs: [\n {\n internalType: \"contract IEntryPoint\",\n name: \"_entryPoint\",\n type: \"address\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\"\n },\n {\n inputs: [],\n name: \"accountImplementation\",\n outputs: [\n {\n internalType: \"contract LightAccount\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"salt\",\n type: \"uint256\"\n }\n ],\n name: \"createAccount\",\n outputs: [\n {\n internalType: \"contract LightAccount\",\n name: \"ret\",\n type: \"address\"\n }\n ],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\"\n },\n {\n internalType: \"uint256\",\n name: \"salt\",\n type: \"uint256\"\n }\n ],\n name: \"getAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\"\n }\n ],\n stateMutability: \"view\",\n type: \"function\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountFactoryAbi_v2.js\n var LightAccountFactoryAbi_v2;\n var init_LightAccountFactoryAbi_v2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/LightAccountFactoryAbi_v2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n LightAccountFactoryAbi_v2 = [\n {\n type: \"constructor\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"ACCOUNT_IMPLEMENTATION\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract LightAccount\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"ENTRY_POINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n { name: \"unstakeDelay\", type: \"uint32\", internalType: \"uint32\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"contract LightAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [{ name: \"newOwner\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n { name: \"to\", type: \"address\", internalType: \"address payable\" },\n { name: \"token\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [{ name: \"to\", type: \"address\", internalType: \"address payable\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AddressEmptyCode\",\n inputs: [{ name: \"target\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"AddressInsufficientBalance\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"FailedInnerCall\", inputs: [] },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidEntryPoint\",\n inputs: [{ name: \"entryPoint\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"OwnableInvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"OwnableUnauthorizedAccount\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"SafeERC20FailedOperation\",\n inputs: [{ name: \"token\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"TransferFailed\", inputs: [] },\n { type: \"error\", name: \"ZeroAddressNotAllowed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/utils.js\n async function getLightAccountVersionForAccount(account, chain2) {\n const accountType = account.source;\n const factoryAddress = await account.getFactoryAddress();\n const implAddress = await account.getImplementationAddress();\n const implToVersion = new Map(Object.entries(AccountVersionRegistry[accountType]).map((pair) => {\n const [version8, def] = pair;\n if (def.addresses.overrides != null && chain2.id in def.addresses.overrides) {\n return [def.addresses.overrides[chain2.id].impl, version8];\n }\n return [def.addresses.default.impl, version8];\n }));\n const factoryToVersion = new Map(Object.entries(AccountVersionRegistry[accountType]).map((pair) => {\n const [version8, def] = pair;\n if (def.addresses.overrides != null && chain2.id in def.addresses.overrides) {\n return [def.addresses.overrides[chain2.id].factory, version8];\n }\n return [def.addresses.default.factory, version8];\n }));\n const version7 = fromHex(implAddress, \"bigint\") === 0n ? factoryToVersion.get(factoryAddress.toLowerCase()) : implToVersion.get(implAddress.toLowerCase());\n if (!version7) {\n throw new Error(`Could not determine ${account.source} version for chain ${chain2.id}`);\n }\n return AccountVersionRegistry[accountType][version7];\n }\n var AccountVersionRegistry, defaultLightAccountVersion, getDefaultLightAccountFactoryAddress, getDefaultMultiOwnerLightAccountFactoryAddress, LightAccountUnsupported1271Impls, LightAccountUnsupported1271Factories;\n var init_utils11 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n AccountVersionRegistry = {\n LightAccount: {\n \"v1.0.1\": {\n entryPointVersion: \"0.6.0\",\n addresses: {\n default: {\n factory: \"0x000000893A26168158fbeaDD9335Be5bC96592E2\".toLowerCase(),\n impl: \"0xc1b2fc4197c9187853243e6e4eb5a4af8879a1c0\".toLowerCase()\n }\n }\n },\n \"v1.0.2\": {\n entryPointVersion: \"0.6.0\",\n addresses: {\n default: {\n factory: \"0x00000055C0b4fA41dde26A74435ff03692292FBD\".toLowerCase(),\n impl: \"0x5467b1947F47d0646704EB801E075e72aeAe8113\".toLowerCase()\n }\n }\n },\n \"v1.1.0\": {\n entryPointVersion: \"0.6.0\",\n addresses: {\n default: {\n factory: \"0x00004EC70002a32400f8ae005A26081065620D20\".toLowerCase(),\n impl: \"0xae8c656ad28F2B59a196AB61815C16A0AE1c3cba\".toLowerCase()\n }\n }\n },\n \"v2.0.0\": {\n entryPointVersion: \"0.7.0\",\n addresses: {\n default: {\n factory: \"0x0000000000400CdFef5E2714E63d8040b700BC24\".toLowerCase(),\n impl: \"0x8E8e658E22B12ada97B402fF0b044D6A325013C7\".toLowerCase()\n }\n }\n }\n },\n MultiOwnerLightAccount: {\n \"v2.0.0\": {\n entryPointVersion: \"0.7.0\",\n addresses: {\n default: {\n factory: \"0x000000000019d2Ee9F2729A65AfE20bb0020AefC\".toLowerCase(),\n impl: \"0xd2c27F9eE8E4355f71915ffD5568cB3433b6823D\".toLowerCase()\n }\n }\n }\n }\n };\n defaultLightAccountVersion = () => \"v2.0.0\";\n getDefaultLightAccountFactoryAddress = (chain2, version7) => {\n return AccountVersionRegistry.LightAccount[version7].addresses.overrides?.[chain2.id]?.factory ?? AccountVersionRegistry.LightAccount[version7].addresses.default.factory;\n };\n getDefaultMultiOwnerLightAccountFactoryAddress = (chain2, version7) => {\n return AccountVersionRegistry.MultiOwnerLightAccount[version7].addresses.overrides?.[chain2.id]?.factory ?? AccountVersionRegistry.MultiOwnerLightAccount[version7].addresses.default.factory;\n };\n LightAccountUnsupported1271Impls = [\n AccountVersionRegistry.LightAccount[\"v1.0.1\"],\n AccountVersionRegistry.LightAccount[\"v1.0.2\"]\n ];\n LightAccountUnsupported1271Factories = new Set(LightAccountUnsupported1271Impls.map((x4) => [\n x4.addresses.default.factory,\n ...Object.values(x4.addresses.overrides ?? {}).map((z2) => z2.factory)\n ]).flat());\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/base.js\n async function createLightAccountBase({ transport, chain: chain2, signer, abi: abi2, version: version7, type, entryPoint, accountAddress, getAccountInitCode }) {\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const encodeUpgradeToAndCall = async ({ upgradeToAddress, upgradeToInitData }) => {\n const storage = await client.getStorageAt({\n address: accountAddress,\n // the slot at which impl addresses are stored by UUPS\n slot: \"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\"\n });\n if (storage == null) {\n throw new FailedToGetStorageSlotError(\"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\", \"Proxy Implementation Address\");\n }\n const implementationAddresses = Object.values(AccountVersionRegistry[type]).map((x4) => x4.addresses.overrides?.[chain2.id]?.impl ?? x4.addresses.default.impl);\n if (fromHex(storage, \"number\") !== 0 && !implementationAddresses.some((x4) => x4 === trim(storage))) {\n throw new Error(`could not determine if smart account implementation is ${type} ${String(version7)}`);\n }\n return encodeFunctionData({\n abi: abi2,\n functionName: \"upgradeToAndCall\",\n args: [upgradeToAddress, upgradeToInitData]\n });\n };\n const get1271Wrapper = (hashedMessage, version8) => {\n return {\n // EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\n // https://github.com/alchemyplatform/light-account/blob/main/src/LightAccount.sol#L236\n domain: {\n chainId: Number(client.chain.id),\n name: type,\n verifyingContract: accountAddress,\n version: version8\n },\n types: {\n LightAccountMessage: [{ name: \"message\", type: \"bytes\" }]\n },\n message: {\n message: hashedMessage\n },\n primaryType: \"LightAccountMessage\"\n };\n };\n const prepareSign = async (params) => {\n const messageHash = params.type === \"personal_sign\" ? hashMessage(params.data) : hashTypedData(params.data);\n switch (version7) {\n case \"v1.0.1\":\n return params;\n case \"v1.0.2\":\n throw new Error(`Version ${String(version7)} of LightAccount doesn't support 1271`);\n case \"v1.1.0\":\n return {\n type: \"eth_signTypedData_v4\",\n data: get1271Wrapper(messageHash, \"1\")\n };\n case \"v2.0.0\":\n return {\n type: \"eth_signTypedData_v4\",\n data: get1271Wrapper(messageHash, \"2\")\n };\n default:\n throw new Error(`Unknown version ${String(version7)} of LightAccount`);\n }\n };\n const formatSign = async (signature) => {\n return version7 === \"v2.0.0\" ? concat2([SignatureType.EOA, signature]) : signature;\n };\n const account = await toSmartContractAccount({\n transport,\n chain: chain2,\n entryPoint,\n accountAddress,\n source: type,\n getAccountInitCode,\n prepareSign,\n formatSign,\n encodeExecute: async ({ target, data, value }) => {\n return encodeFunctionData({\n abi: abi2,\n functionName: \"execute\",\n args: [target, value ?? 0n, data]\n });\n },\n encodeBatchExecute: async (txs) => {\n const [targets, values, datas] = txs.reduce((accum, curr) => {\n accum[0].push(curr.target);\n accum[1].push(curr.value ?? 0n);\n accum[2].push(curr.data);\n return accum;\n }, [[], [], []]);\n return encodeFunctionData({\n abi: abi2,\n functionName: \"executeBatch\",\n args: [targets, values, datas]\n });\n },\n signUserOperationHash: async (uoHash) => {\n const signature = await signer.signMessage({ raw: uoHash });\n switch (version7) {\n case \"v2.0.0\":\n return concat2([SignatureType.EOA, signature]);\n default:\n return signature;\n }\n },\n async signMessage({ message: message2 }) {\n const { type: type2, data } = await prepareSign({\n type: \"personal_sign\",\n data: message2\n });\n const sig = type2 === \"personal_sign\" ? await signer.signMessage(data) : await signer.signTypedData(data);\n return formatSign(sig);\n },\n async signTypedData(params) {\n const { type: type2, data } = await prepareSign({\n type: \"eth_signTypedData_v4\",\n data: params\n });\n const sig = type2 === \"personal_sign\" ? await signer.signMessage(data) : await signer.signTypedData(data);\n return formatSign(sig);\n },\n getDummySignature: () => {\n const signature = \"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\";\n switch (version7) {\n case \"v1.0.1\":\n case \"v1.0.2\":\n case \"v1.1.0\":\n return signature;\n case \"v2.0.0\":\n return concat2([SignatureType.EOA, signature]);\n default:\n throw new Error(`Unknown version ${type} of ${String(version7)}`);\n }\n },\n encodeUpgradeToAndCall\n });\n return {\n ...account,\n source: type,\n getLightAccountVersion: () => version7,\n getSigner: () => signer\n };\n }\n var SignatureType;\n var init_base5 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_utils11();\n (function(SignatureType3) {\n SignatureType3[\"EOA\"] = \"0x00\";\n SignatureType3[\"CONTRACT\"] = \"0x01\";\n SignatureType3[\"CONTRACT_WITH_ADDR\"] = \"0x02\";\n })(SignatureType || (SignatureType = {}));\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/OZ_ERC1967Proxy.js\n var OZ_ERC1967Proxy_ConstructorAbi;\n var init_OZ_ERC1967Proxy = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/OZ_ERC1967Proxy.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n OZ_ERC1967Proxy_ConstructorAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"_logic\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"_data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/predictAddress.js\n function predictLightAccountAddress({ factoryAddress, salt, ownerAddress, version: version7 }) {\n const implementationAddress = (\n // If we aren't using the default factory address, we compute the implementation address from the factory's `create` deployment.\n // This is accurate for both LA v1 and v2 factories. If we are using the default factory address, we use the implementation address from the registry.\n factoryAddress !== AccountVersionRegistry.LightAccount[version7].addresses.default.factory ? getContractAddress2({\n from: factoryAddress,\n nonce: 1n\n }) : AccountVersionRegistry.LightAccount[version7].addresses.default.impl\n );\n switch (version7) {\n case \"v1.0.1\":\n case \"v1.0.2\":\n case \"v1.1.0\":\n const LAv1_proxy_bytecode = \"0x60406080815261042c908138038061001681610218565b93843982019181818403126102135780516001600160a01b038116808203610213576020838101516001600160401b0394919391858211610213570186601f820112156102135780519061007161006c83610253565b610218565b918083528583019886828401011161021357888661008f930161026e565b813b156101b9577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916841790556000927fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8480a28051158015906101b2575b61010b575b855160e790816103458239f35b855194606086019081118682101761019e578697849283926101889952602788527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c87890152660819985a5b195960ca1b8a8901525190845af4913d15610194573d9061017a61006c83610253565b91825281943d92013e610291565b508038808080806100fe565b5060609250610291565b634e487b7160e01b84526041600452602484fd5b50826100f9565b855162461bcd60e51b815260048101859052602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b600080fd5b6040519190601f01601f191682016001600160401b0381118382101761023d57604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b03811161023d57601f01601f191660200190565b60005b8381106102815750506000910152565b8181015183820152602001610271565b919290156102f357508151156102a5575090565b3b156102ae5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156103065750805190602001fd5b6044604051809262461bcd60e51b825260206004830152610336815180928160248601526020868601910161026e565b601f01601f19168101030190fdfe60806040523615605f5773ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e15605b573d90f35b3d90fd5b73ffffffffffffffffffffffffffffffffffffffff7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54166000808092368280378136915af43d82803e15605b573d90f3fea26469706673582212205da2750cd2b0cadfd354d8a1ca4752ed7f22214c8069d852f7dc6b8e9e5ee66964736f6c63430008150033\";\n return getContractAddress2({\n from: factoryAddress,\n opcode: \"CREATE2\",\n salt: toHex(salt, { size: 32 }),\n bytecode: encodeDeployData({\n bytecode: LAv1_proxy_bytecode,\n abi: OZ_ERC1967Proxy_ConstructorAbi,\n args: [\n implementationAddress,\n encodeFunctionData({\n abi: LightAccountAbi_v1,\n functionName: \"initialize\",\n args: [ownerAddress]\n })\n ]\n })\n });\n case \"v2.0.0\":\n const combinedSalt = keccak256(encodeAbiParameters([{ type: \"address\" }, { type: \"uint256\" }], [ownerAddress, salt]));\n const initCode = getLAv2ProxyBytecode(implementationAddress);\n return getContractAddress2({\n from: factoryAddress,\n opcode: \"CREATE2\",\n salt: combinedSalt,\n bytecode: initCode\n });\n default:\n assertNeverLightAccountVersion(version7);\n }\n }\n function predictMultiOwnerLightAccountAddress({ factoryAddress, salt, ownerAddresses }) {\n const implementationAddress = (\n // If we aren't using the default factory address, we compute the implementation address from the factory's `create` deployment.\n // This is accurate for both LA v1 and v2 factories. If we are using the default factory address, we use the implementation address from the registry.\n factoryAddress !== AccountVersionRegistry.MultiOwnerLightAccount[\"v2.0.0\"].addresses.default.factory ? getContractAddress2({\n from: factoryAddress,\n nonce: 1n\n }) : AccountVersionRegistry.MultiOwnerLightAccount[\"v2.0.0\"].addresses.default.impl\n );\n const combinedSalt = keccak256(encodeAbiParameters([{ type: \"address[]\" }, { type: \"uint256\" }], [ownerAddresses, salt]));\n const initCode = getLAv2ProxyBytecode(implementationAddress);\n return getContractAddress2({\n from: factoryAddress,\n opcode: \"CREATE2\",\n salt: combinedSalt,\n bytecode: initCode\n });\n }\n function getLAv2ProxyBytecode(implementationAddress) {\n return `0x603d3d8160223d3973${implementationAddress.slice(2)}60095155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3`;\n }\n function assertNeverLightAccountVersion(version7) {\n throw new Error(`Unknown light account version: ${version7}`);\n }\n var init_predictAddress = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/predictAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_OZ_ERC1967Proxy();\n init_utils11();\n init_LightAccountAbi_v1();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/account.js\n async function createLightAccount({ transport, chain: chain2, signer, initCode, version: version7 = defaultLightAccountVersion(), entryPoint = getEntryPoint(chain2, {\n version: AccountVersionRegistry[\"LightAccount\"][version7].entryPointVersion\n }), accountAddress, factoryAddress = getDefaultLightAccountFactoryAddress(chain2, version7), salt: salt_ = 0n }) {\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const accountAbi = version7 === \"v2.0.0\" ? LightAccountAbi_v2 : LightAccountAbi_v1;\n const factoryAbi = version7 === \"v2.0.0\" ? LightAccountFactoryAbi_v1 : LightAccountFactoryAbi_v2;\n const signerAddress = await signer.getAddress();\n const salt = LightAccountUnsupported1271Factories.has(factoryAddress.toLowerCase()) ? 0n : salt_;\n const getAccountInitCode = async () => {\n if (initCode)\n return initCode;\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: factoryAbi,\n functionName: \"createAccount\",\n args: [signerAddress, salt]\n })\n ]);\n };\n const address = accountAddress ?? predictLightAccountAddress({\n factoryAddress,\n salt,\n ownerAddress: signerAddress,\n version: version7\n });\n const account = await createLightAccountBase({\n transport,\n chain: chain2,\n signer,\n abi: accountAbi,\n type: \"LightAccount\",\n version: version7,\n entryPoint,\n accountAddress: address,\n getAccountInitCode\n });\n return {\n ...account,\n encodeTransferOwnership: (newOwner) => {\n return encodeFunctionData({\n abi: accountAbi,\n functionName: \"transferOwnership\",\n args: [newOwner]\n });\n },\n async getOwnerAddress() {\n const callResult = await client.readContract({\n address,\n abi: accountAbi,\n functionName: \"owner\"\n });\n if (callResult == null) {\n throw new Error(\"could not get on-chain owner\");\n }\n return callResult;\n }\n };\n }\n var init_account3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/account.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_LightAccountAbi_v1();\n init_LightAccountAbi_v2();\n init_LightAccountFactoryAbi_v1();\n init_LightAccountFactoryAbi_v2();\n init_utils11();\n init_base5();\n init_predictAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/actions/transferOwnership.js\n var transferOwnership;\n var init_transferOwnership = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/actions/transferOwnership.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n transferOwnership = async (client, args) => {\n const { newOwner, waitForTxn, overrides, account = client.account } = args;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"transferOwnership\", client);\n }\n const data = account.encodeTransferOwnership(await newOwner.getAddress());\n const result = await client.sendUserOperation({\n uo: {\n target: account.address,\n data\n },\n account,\n overrides\n });\n if (waitForTxn) {\n return client.waitForUserOperationTransaction(result);\n }\n return result.hash;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/isAlchemySmartAccountClient.js\n function isAlchemySmartAccountClient2(client) {\n return client.transport.type === \"alchemy\";\n }\n var init_isAlchemySmartAccountClient2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/isAlchemySmartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/actions/simulateUserOperationChanges.js\n var simulateUserOperationChanges2;\n var init_simulateUserOperationChanges2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/actions/simulateUserOperationChanges.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_isAlchemySmartAccountClient2();\n simulateUserOperationChanges2 = async (client, { account = client.account, overrides, ...params }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isAlchemySmartAccountClient2(client)) {\n throw new IncompatibleClientError(\"AlchemySmartAccountClient\", \"SimulateUserOperationAssetChanges\", client);\n }\n const uoStruct = deepHexlify(await client.buildUserOperation({\n ...params,\n account,\n overrides\n }));\n return client.request({\n method: \"alchemy_simulateUserOperationAssetChanges\",\n params: [uoStruct, account.getEntryPoint().address]\n });\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/alchemyTrackerHeaders.js\n function mutateRemoveTrackingHeaders2(x4) {\n if (!x4)\n return;\n if (Array.isArray(x4))\n return;\n if (typeof x4 !== \"object\")\n return;\n TRACKER_HEADER2 in x4 && delete x4[TRACKER_HEADER2];\n TRACKER_BREADCRUMB2 in x4 && delete x4[TRACKER_BREADCRUMB2];\n TRACE_HEADER_NAME in x4 && delete x4[TRACE_HEADER_NAME];\n TRACE_HEADER_STATE in x4 && delete x4[TRACE_HEADER_STATE];\n }\n function addCrumb2(previous, crumb) {\n if (!previous)\n return crumb;\n return `${previous} > ${crumb}`;\n }\n function headersUpdate2(crumb) {\n const headerUpdate_ = (x4) => {\n const traceHeader = (TraceHeader.fromTraceHeader(x4) || TraceHeader.default()).withEvent(crumb);\n return {\n [TRACKER_HEADER2]: traceHeader.parentId,\n ...x4,\n [TRACKER_BREADCRUMB2]: addCrumb2(x4[TRACKER_BREADCRUMB2], crumb),\n ...traceHeader.toTraceHeader()\n };\n };\n return headerUpdate_;\n }\n var TRACKER_HEADER2, TRACKER_BREADCRUMB2;\n var init_alchemyTrackerHeaders2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/alchemyTrackerHeaders.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm6();\n init_esm6();\n TRACKER_HEADER2 = \"X-Alchemy-Client-Trace-Id\";\n TRACKER_BREADCRUMB2 = \"X-Alchemy-Client-Breadcrumb\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/schema.js\n var AlchemyChainSchema2;\n var init_schema4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/schema.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm5();\n AlchemyChainSchema2 = esm_default.custom((chain2) => {\n const chain_ = ChainSchema.parse(chain2);\n return chain_.rpcUrls.alchemy != null;\n }, \"chain must include an alchemy rpc url. See `defineAlchemyChain` or import a chain from `@account-kit/infra`.\");\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/version.js\n var VERSION3;\n var init_version7 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n VERSION3 = \"4.62.0\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/alchemyTransport.js\n function isAlchemyTransport2(transport, chain2) {\n return transport({ chain: chain2 }).config.type === \"alchemy\";\n }\n function alchemy2(config2) {\n const { retryDelay, retryCount = 0 } = config2;\n const fetchOptions = { ...config2.fetchOptions };\n const connectionConfig = ConnectionConfigSchema.parse(config2.alchemyConnection ?? config2);\n const headersAsObject = convertHeadersToObject2(fetchOptions.headers);\n fetchOptions.headers = {\n ...headersAsObject,\n \"Alchemy-AA-Sdk-Version\": VERSION3\n };\n if (connectionConfig.jwt != null || connectionConfig.apiKey != null) {\n fetchOptions.headers = {\n ...fetchOptions.headers,\n Authorization: `Bearer ${connectionConfig.jwt ?? connectionConfig.apiKey}`\n };\n }\n const transport = (opts) => {\n const { chain: chain_ } = opts;\n if (!chain_) {\n throw new ChainNotFoundError2();\n }\n const chain2 = AlchemyChainSchema2.parse(chain_);\n const rpcUrl = connectionConfig.rpcUrl == null ? chain2.rpcUrls.alchemy.http[0] : connectionConfig.rpcUrl;\n const chainAgnosticRpcUrl = connectionConfig.rpcUrl == null ? \"https://api.g.alchemy.com/v2\" : connectionConfig.chainAgnosticUrl ?? connectionConfig.rpcUrl;\n const innerTransport = (() => {\n mutateRemoveTrackingHeaders2(config2?.fetchOptions?.headers);\n if (config2.alchemyConnection && config2.nodeRpcUrl) {\n return split2({\n overrides: [\n {\n methods: alchemyMethods2,\n transport: http(rpcUrl, { fetchOptions, retryCount })\n },\n {\n methods: chainAgnosticMethods2,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay\n })\n }\n ],\n fallback: http(config2.nodeRpcUrl, {\n fetchOptions: config2.fetchOptions,\n retryCount,\n retryDelay\n })\n });\n }\n return split2({\n overrides: [\n {\n methods: chainAgnosticMethods2,\n transport: http(chainAgnosticRpcUrl, {\n fetchOptions,\n retryCount,\n retryDelay\n })\n }\n ],\n fallback: http(rpcUrl, { fetchOptions, retryCount, retryDelay })\n });\n })();\n return createTransport({\n key: \"alchemy\",\n name: \"Alchemy Transport\",\n request: innerTransport({\n ...opts,\n // Retries are already handled above within the split transport,\n // so `retryCount` must be 0 here for the expected behavior.\n retryCount: 0\n }).request,\n // Retries are already handled above within the split transport,\n // so `retryCount` must be 0 here too for the expected behavior.\n retryCount: 0,\n retryDelay,\n type: \"alchemy\"\n }, { alchemyRpcUrl: rpcUrl, fetchOptions });\n };\n return Object.assign(transport, {\n dynamicFetchOptions: fetchOptions,\n updateHeaders(newHeaders_) {\n const newHeaders = convertHeadersToObject2(newHeaders_);\n fetchOptions.headers = {\n ...fetchOptions.headers,\n ...newHeaders\n };\n },\n config: config2\n });\n }\n var alchemyMethods2, chainAgnosticMethods2, convertHeadersToObject2;\n var init_alchemyTransport2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/alchemyTransport.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_alchemyTrackerHeaders2();\n init_schema4();\n init_version7();\n alchemyMethods2 = [\n \"eth_sendUserOperation\",\n \"eth_estimateUserOperationGas\",\n \"eth_getUserOperationReceipt\",\n \"eth_getUserOperationByHash\",\n \"eth_supportedEntryPoints\",\n \"rundler_maxPriorityFeePerGas\",\n \"pm_getPaymasterData\",\n \"pm_getPaymasterStubData\",\n \"alchemy_requestGasAndPaymasterAndData\"\n ];\n chainAgnosticMethods2 = [\n \"wallet_prepareCalls\",\n \"wallet_sendPreparedCalls\",\n \"wallet_requestAccount\",\n \"wallet_createAccount\",\n \"wallet_listAccounts\",\n \"wallet_createSession\",\n \"wallet_getCallsStatus\"\n ];\n convertHeadersToObject2 = (headers) => {\n if (!headers) {\n return {};\n }\n if (headers instanceof Headers) {\n const headersObject = {};\n headers.forEach((value, key) => {\n headersObject[key] = value;\n });\n return headersObject;\n }\n if (Array.isArray(headers)) {\n return headers.reduce((acc, header) => {\n acc[header[0]] = header[1];\n return acc;\n }, {});\n }\n return headers;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/chains.js\n var arbitrum3, arbitrumGoerli3, arbitrumSepolia3, goerli3, mainnet3, optimism3, optimismGoerli3, optimismSepolia3, sepolia3, base3, baseGoerli3, baseSepolia3, polygonMumbai3, polygonAmoy3, polygon3, fraxtal3, fraxtalSepolia2, zora3, zoraSepolia3, worldChainSepolia2, worldChain2, shapeSepolia2, shape2, unichainMainnet2, unichainSepolia2, soneiumMinato2, soneiumMainnet2, opbnbTestnet2, opbnbMainnet2, beraChainBartio2, inkMainnet2, inkSepolia2, arbitrumNova3, monadTestnet2, mekong2, openlootSepolia2, gensynTestnet2, riseTestnet2, storyMainnet2, storyAeneid2, celoAlfajores2, celoMainnet2, teaSepolia2, bobaSepolia2, bobaMainnet2;\n var init_chains3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/chains.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_chains();\n arbitrum3 = {\n ...arbitrum,\n rpcUrls: {\n ...arbitrum.rpcUrls,\n alchemy: {\n http: [\"https://arb-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n arbitrumGoerli3 = {\n ...arbitrumGoerli,\n rpcUrls: {\n ...arbitrumGoerli.rpcUrls,\n alchemy: {\n http: [\"https://arb-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n arbitrumSepolia3 = {\n ...arbitrumSepolia,\n rpcUrls: {\n ...arbitrumSepolia.rpcUrls,\n alchemy: {\n http: [\"https://arb-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n goerli3 = {\n ...goerli,\n rpcUrls: {\n ...goerli.rpcUrls,\n alchemy: {\n http: [\"https://eth-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n mainnet3 = {\n ...mainnet,\n rpcUrls: {\n ...mainnet.rpcUrls,\n alchemy: {\n http: [\"https://eth-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n optimism3 = {\n ...optimism,\n rpcUrls: {\n ...optimism.rpcUrls,\n alchemy: {\n http: [\"https://opt-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n optimismGoerli3 = {\n ...optimismGoerli,\n rpcUrls: {\n ...optimismGoerli.rpcUrls,\n alchemy: {\n http: [\"https://opt-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n optimismSepolia3 = {\n ...optimismSepolia,\n rpcUrls: {\n ...optimismSepolia.rpcUrls,\n alchemy: {\n http: [\"https://opt-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n sepolia3 = {\n ...sepolia,\n rpcUrls: {\n ...sepolia.rpcUrls,\n alchemy: {\n http: [\"https://eth-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n base3 = {\n ...base,\n rpcUrls: {\n ...base.rpcUrls,\n alchemy: {\n http: [\"https://base-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n baseGoerli3 = {\n ...baseGoerli,\n rpcUrls: {\n ...baseGoerli.rpcUrls,\n alchemy: {\n http: [\"https://base-goerli.g.alchemy.com/v2\"]\n }\n }\n };\n baseSepolia3 = {\n ...baseSepolia,\n rpcUrls: {\n ...baseSepolia.rpcUrls,\n alchemy: {\n http: [\"https://base-sepolia.g.alchemy.com/v2\"]\n }\n }\n };\n polygonMumbai3 = {\n ...polygonMumbai,\n rpcUrls: {\n ...polygonMumbai.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mumbai.g.alchemy.com/v2\"]\n }\n }\n };\n polygonAmoy3 = {\n ...polygonAmoy,\n rpcUrls: {\n ...polygonAmoy.rpcUrls,\n alchemy: {\n http: [\"https://polygon-amoy.g.alchemy.com/v2\"]\n }\n }\n };\n polygon3 = {\n ...polygon,\n rpcUrls: {\n ...polygon.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mainnet.g.alchemy.com/v2\"]\n }\n }\n };\n fraxtal3 = {\n ...fraxtal,\n rpcUrls: {\n ...fraxtal.rpcUrls\n }\n };\n fraxtalSepolia2 = defineChain({\n id: 2523,\n name: \"Fraxtal Sepolia\",\n nativeCurrency: { name: \"Frax Ether\", symbol: \"frxETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.testnet-sepolia.frax.com\"]\n }\n }\n });\n zora3 = {\n ...zora,\n rpcUrls: {\n ...zora.rpcUrls\n }\n };\n zoraSepolia3 = {\n ...zoraSepolia,\n rpcUrls: {\n ...zoraSepolia.rpcUrls\n }\n };\n worldChainSepolia2 = defineChain({\n id: 4801,\n name: \"World Chain Sepolia\",\n network: \"World Chain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n worldChain2 = defineChain({\n id: 480,\n name: \"World Chain\",\n network: \"World Chain\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n shapeSepolia2 = defineChain({\n id: 11011,\n name: \"Shape Sepolia\",\n network: \"Shape Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n shape2 = defineChain({\n id: 360,\n name: \"Shape\",\n network: \"Shape\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n unichainMainnet2 = defineChain({\n id: 130,\n name: \"Unichain Mainnet\",\n network: \"Unichain Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n unichainSepolia2 = defineChain({\n id: 1301,\n name: \"Unichain Sepolia\",\n network: \"Unichain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n soneiumMinato2 = defineChain({\n id: 1946,\n name: \"Soneium Minato\",\n network: \"Soneium Minato\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"]\n }\n }\n });\n soneiumMainnet2 = defineChain({\n id: 1868,\n name: \"Soneium Mainnet\",\n network: \"Soneium Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n opbnbTestnet2 = defineChain({\n id: 5611,\n name: \"OPBNB Testnet\",\n network: \"OPBNB Testnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"]\n }\n }\n });\n opbnbMainnet2 = defineChain({\n id: 204,\n name: \"OPBNB Mainnet\",\n network: \"OPBNB Mainnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n beraChainBartio2 = defineChain({\n id: 80084,\n name: \"BeraChain Bartio\",\n network: \"BeraChain Bartio\",\n nativeCurrency: { name: \"Bera\", symbol: \"BERA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"]\n }\n }\n });\n inkMainnet2 = defineChain({\n id: 57073,\n name: \"Ink Mainnet\",\n network: \"Ink Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"]\n }\n }\n });\n inkSepolia2 = defineChain({\n id: 763373,\n name: \"Ink Sepolia\",\n network: \"Ink Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"]\n }\n }\n });\n arbitrumNova3 = {\n ...arbitrumNova,\n rpcUrls: {\n ...arbitrumNova.rpcUrls\n }\n };\n monadTestnet2 = defineChain({\n id: 10143,\n name: \"Monad Testnet\",\n nativeCurrency: { name: \"Monad\", symbol: \"MON\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://testnet.monadexplorer.com\"\n }\n },\n testnet: true\n });\n mekong2 = defineChain({\n id: 7078815900,\n name: \"Mekong Pectra Devnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.mekong.ethpandaops.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.mekong.ethpandaops.io\"\n }\n },\n testnet: true\n });\n openlootSepolia2 = defineChain({\n id: 905905,\n name: \"Openloot Sepolia\",\n nativeCurrency: { name: \"Openloot\", symbol: \"OL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://openloot-sepolia.explorer.alchemy.com\"\n }\n },\n testnet: true\n });\n gensynTestnet2 = defineChain({\n id: 685685,\n name: \"Gensyn Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://gensyn-testnet.explorer.alchemy.com\"\n }\n },\n testnet: true\n });\n riseTestnet2 = defineChain({\n id: 11155931,\n name: \"Rise Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.testnet.riselabs.xyz\"\n }\n },\n testnet: true\n });\n storyMainnet2 = defineChain({\n id: 1514,\n name: \"Story Mainnet\",\n nativeCurrency: { name: \"IP\", symbol: \"IP\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://www.storyscan.io\"\n }\n },\n testnet: false\n });\n storyAeneid2 = defineChain({\n id: 1315,\n name: \"Story Aeneid\",\n nativeCurrency: { name: \"IP\", symbol: \"IP\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://aeneid.storyscan.io\"\n }\n },\n testnet: true\n });\n celoAlfajores2 = defineChain({\n id: 44787,\n name: \"Celo Alfajores\",\n nativeCurrency: { name: \"Celo native asset\", symbol: \"CELO\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://celo-alfajores.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://celo-alfajores.blockscout.com/\"\n }\n },\n testnet: true\n });\n celoMainnet2 = defineChain({\n id: 42220,\n name: \"Celo Mainnet\",\n nativeCurrency: { name: \"Celo native asset\", symbol: \"CELO\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://celo-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://celo.blockscout.com/\"\n }\n },\n testnet: false\n });\n teaSepolia2 = defineChain({\n id: 10218,\n name: \"Tea Sepolia\",\n nativeCurrency: { name: \"TEA\", symbol: \"TEA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://tea-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://sepolia.tea.xyz/\"\n }\n },\n testnet: true\n });\n bobaSepolia2 = defineChain({\n id: 28882,\n name: \"Boba Sepolia\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://boba-sepolia.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://sepolia.testnet.bobascan.com/\"\n }\n },\n testnet: true\n });\n bobaMainnet2 = defineChain({\n id: 288,\n name: \"Boba Mainnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n },\n public: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n },\n alchemy: {\n http: [\"https://boba-mainnet.g.alchemy.com/v2\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://bobascan.com/\"\n }\n },\n testnet: false\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/metrics.js\n var InfraLogger2;\n var init_metrics2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/metrics.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm7();\n init_version7();\n InfraLogger2 = createLogger({\n package: \"@account-kit/infra\",\n version: VERSION3\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/decorators/smartAccount.js\n function logSendUoEvent2(chainId, account) {\n const signerType = isSmartAccountWithSigner(account) ? account.getSigner().signerType : \"unknown\";\n InfraLogger2.trackEvent({\n name: \"client_send_uo\",\n data: {\n chainId,\n signerType,\n entryPoint: account.getEntryPoint().address\n }\n });\n }\n var alchemyActions2;\n var init_smartAccount2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/decorators/smartAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_simulateUserOperationChanges2();\n init_metrics2();\n alchemyActions2 = (client_) => ({\n simulateUserOperation: async (args) => {\n const client = clientHeaderTrack(client_, \"simulateUserOperation\");\n return simulateUserOperationChanges2(client, args);\n },\n async sendUserOperation(args) {\n const client = clientHeaderTrack(client_, \"infraSendUserOperation\");\n const { account = client.account } = args;\n const result = sendUserOperation(client, args);\n logSendUoEvent2(client.chain.id, account);\n return result;\n },\n sendTransaction: async (args, overrides, context2) => {\n const client = clientHeaderTrack(client_, \"sendTransaction\");\n const { account = client.account } = args;\n const result = await sendTransaction2(client, args, overrides, context2);\n logSendUoEvent2(client.chain.id, account);\n return result;\n },\n async sendTransactions(args) {\n const client = clientHeaderTrack(client_, \"sendTransactions\");\n const { account = client.account } = args;\n const result = sendTransactions(client, args);\n logSendUoEvent2(client.chain.id, account);\n return result;\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/defaults.js\n var getDefaultUserOperationFeeOptions3;\n var init_defaults3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/defaults.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains3();\n getDefaultUserOperationFeeOptions3 = (chain2) => {\n const feeOptions = {\n maxFeePerGas: { multiplier: 1.5 },\n maxPriorityFeePerGas: { multiplier: 1.05 }\n };\n if ((/* @__PURE__ */ new Set([\n arbitrum3.id,\n arbitrumGoerli3.id,\n arbitrumSepolia3.id,\n optimism3.id,\n optimismGoerli3.id,\n optimismSepolia3.id\n ])).has(chain2.id)) {\n feeOptions.preVerificationGas = { multiplier: 1.05 };\n }\n return feeOptions;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/feeEstimator.js\n var alchemyFeeEstimator2;\n var init_feeEstimator3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/feeEstimator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n alchemyFeeEstimator2 = (transport) => async (struct, { overrides, feeOptions, client: client_ }) => {\n const client = clientHeaderTrack(client_, \"alchemyFeeEstimator\");\n const transport_ = transport({ chain: client.chain });\n let [block, maxPriorityFeePerGasEstimate] = await Promise.all([\n client.getBlock({ blockTag: \"latest\" }),\n // it is a fair assumption that if someone is using this Alchemy Middleware, then they are using Alchemy RPC\n transport_.request({\n method: \"rundler_maxPriorityFeePerGas\",\n params: []\n })\n ]);\n const baseFeePerGas = block.baseFeePerGas;\n if (baseFeePerGas == null) {\n throw new Error(\"baseFeePerGas is null\");\n }\n const maxPriorityFeePerGas = applyUserOpOverrideOrFeeOption(maxPriorityFeePerGasEstimate, overrides?.maxPriorityFeePerGas, feeOptions?.maxPriorityFeePerGas);\n const maxFeePerGas = applyUserOpOverrideOrFeeOption(bigIntMultiply(baseFeePerGas, 1.5) + BigInt(maxPriorityFeePerGas), overrides?.maxFeePerGas, feeOptions?.maxFeePerGas);\n return {\n ...struct,\n maxPriorityFeePerGas,\n maxFeePerGas\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/gas-manager.js\n var AlchemyPaymasterAddressV06Unify2, AlchemyPaymasterAddressV07Unify2, AlchemyPaymasterAddressV42, AlchemyPaymasterAddressV32, AlchemyPaymasterAddressV22, ArbSepoliaPaymasterAddress2, AlchemyPaymasterAddressV12, AlchemyPaymasterAddressV07V22, AlchemyPaymasterAddressV07V12, getAlchemyPaymasterAddress2, PermitTypes2, ERC20Abis2, EIP7597Abis2;\n var init_gas_manager2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/gas-manager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chains3();\n AlchemyPaymasterAddressV06Unify2 = \"0x0000000000ce04e2359130e7d0204A5249958921\";\n AlchemyPaymasterAddressV07Unify2 = \"0x00000000000667F27D4DB42334ec11a25db7EBb4\";\n AlchemyPaymasterAddressV42 = \"0xEaf0Cde110a5d503f2dD69B3a49E031e29b3F9D2\";\n AlchemyPaymasterAddressV32 = \"0x4f84a207A80c39E9e8BaE717c1F25bA7AD1fB08F\";\n AlchemyPaymasterAddressV22 = \"0x4Fd9098af9ddcB41DA48A1d78F91F1398965addc\";\n ArbSepoliaPaymasterAddress2 = \"0x0804Afe6EEFb73ce7F93CD0d5e7079a5a8068592\";\n AlchemyPaymasterAddressV12 = \"0xc03aac639bb21233e0139381970328db8bceeb67\";\n AlchemyPaymasterAddressV07V22 = \"0x2cc0c7981D846b9F2a16276556f6e8cb52BfB633\";\n AlchemyPaymasterAddressV07V12 = \"0xEF725Aa22d43Ea69FB22bE2EBe6ECa205a6BCf5B\";\n getAlchemyPaymasterAddress2 = (chain2, version7) => {\n switch (version7) {\n case \"0.6.0\":\n switch (chain2.id) {\n case fraxtalSepolia2.id:\n case worldChainSepolia2.id:\n case shapeSepolia2.id:\n case unichainSepolia2.id:\n case opbnbTestnet2.id:\n case inkSepolia2.id:\n case monadTestnet2.id:\n case openlootSepolia2.id:\n case gensynTestnet2.id:\n case riseTestnet2.id:\n case storyAeneid2.id:\n case teaSepolia2.id:\n case arbitrumGoerli3.id:\n case goerli3.id:\n case optimismGoerli3.id:\n case baseGoerli3.id:\n case polygonMumbai3.id:\n case worldChain2.id:\n case shape2.id:\n case unichainMainnet2.id:\n case soneiumMinato2.id:\n case soneiumMainnet2.id:\n case opbnbMainnet2.id:\n case beraChainBartio2.id:\n case inkMainnet2.id:\n case arbitrumNova3.id:\n case storyMainnet2.id:\n case celoAlfajores2.id:\n case celoMainnet2.id:\n return AlchemyPaymasterAddressV42;\n case polygonAmoy3.id:\n case optimismSepolia3.id:\n case baseSepolia3.id:\n case zora3.id:\n case zoraSepolia3.id:\n case fraxtal3.id:\n return AlchemyPaymasterAddressV32;\n case mainnet3.id:\n case arbitrum3.id:\n case optimism3.id:\n case polygon3.id:\n case base3.id:\n return AlchemyPaymasterAddressV22;\n case arbitrumSepolia3.id:\n return ArbSepoliaPaymasterAddress2;\n case sepolia3.id:\n return AlchemyPaymasterAddressV12;\n default:\n return AlchemyPaymasterAddressV06Unify2;\n }\n case \"0.7.0\":\n switch (chain2.id) {\n case arbitrumNova3.id:\n case celoAlfajores2.id:\n case celoMainnet2.id:\n case gensynTestnet2.id:\n case inkMainnet2.id:\n case inkSepolia2.id:\n case monadTestnet2.id:\n case opbnbMainnet2.id:\n case opbnbTestnet2.id:\n case openlootSepolia2.id:\n case riseTestnet2.id:\n case shape2.id:\n case shapeSepolia2.id:\n case soneiumMainnet2.id:\n case soneiumMinato2.id:\n case storyAeneid2.id:\n case storyMainnet2.id:\n case teaSepolia2.id:\n case unichainMainnet2.id:\n case unichainSepolia2.id:\n case worldChain2.id:\n case worldChainSepolia2.id:\n return AlchemyPaymasterAddressV07V12;\n case arbitrum3.id:\n case arbitrumGoerli3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n case baseGoerli3.id:\n case baseSepolia3.id:\n case beraChainBartio2.id:\n case fraxtal3.id:\n case fraxtalSepolia2.id:\n case goerli3.id:\n case mainnet3.id:\n case optimism3.id:\n case optimismGoerli3.id:\n case optimismSepolia3.id:\n case polygon3.id:\n case polygonAmoy3.id:\n case polygonMumbai3.id:\n case sepolia3.id:\n case zora3.id:\n case zoraSepolia3.id:\n return AlchemyPaymasterAddressV07V22;\n default:\n return AlchemyPaymasterAddressV07Unify2;\n }\n default:\n throw new Error(`Unsupported EntryPointVersion: ${version7}`);\n }\n };\n PermitTypes2 = {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" }\n ],\n Permit: [\n { name: \"owner\", type: \"address\" },\n { name: \"spender\", type: \"address\" },\n { name: \"value\", type: \"uint256\" },\n { name: \"nonce\", type: \"uint256\" },\n { name: \"deadline\", type: \"uint256\" }\n ]\n };\n ERC20Abis2 = [\n \"function decimals() public view returns (uint8)\",\n \"function balanceOf(address owner) external view returns (uint256)\",\n \"function allowance(address owner, address spender) external view returns (uint256)\",\n \"function approve(address spender, uint256 amount) external returns (bool)\"\n ];\n EIP7597Abis2 = [\n \"function nonces(address owner) external view returns (uint)\"\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/errors/base.js\n var BaseError6;\n var init_base6 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/errors/base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_version7();\n BaseError6 = class extends BaseError4 {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: VERSION3\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/errors/invalidSignedPermit.js\n var InvalidSignedPermit2;\n var init_invalidSignedPermit2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/errors/invalidSignedPermit.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_base6();\n InvalidSignedPermit2 = class extends BaseError6 {\n constructor(reason) {\n super([\"Invalid signed permit\"].join(\"\\n\"), {\n details: [reason, \"Please provide a valid signed permit\"].join(\"\\n\")\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidSignedPermit\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/gasManager.js\n function alchemyGasManagerMiddleware2(policyId, policyToken) {\n const buildContext = async (args) => {\n const context2 = { policyId };\n const { account, client } = args;\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n if (policyToken !== void 0) {\n context2.erc20Context = {\n tokenAddress: policyToken.address,\n maxTokenAmount: policyToken.maxTokenAmount\n };\n if (policyToken.permit !== void 0) {\n const permit = await generateSignedPermit2(client, account, policyToken);\n if (permit !== void 0) {\n context2.erc20Context.permit = permit;\n }\n } else if (args.context !== void 0) {\n context2.erc20Context.permit = extractSignedPermitFromContext2(args.context);\n }\n }\n return context2;\n };\n return {\n dummyPaymasterAndData: async (uo, args) => {\n const context2 = await buildContext(args);\n const baseMiddleware = erc7677Middleware({ context: context2 });\n return baseMiddleware.dummyPaymasterAndData(uo, args);\n },\n paymasterAndData: async (uo, args) => {\n const context2 = await buildContext(args);\n const baseMiddleware = erc7677Middleware({ context: context2 });\n return baseMiddleware.paymasterAndData(uo, args);\n }\n };\n }\n function alchemyGasAndPaymasterAndDataMiddleware2(params) {\n const { policyId, policyToken, transport, gasEstimatorOverride, feeEstimatorOverride } = params;\n return {\n dummyPaymasterAndData: async (uo, args) => {\n if (\n // No reason to generate dummy data if we are bypassing the paymaster.\n bypassPaymasterAndData(args.overrides) || // When using alchemy_requestGasAndPaymasterAndData, there is generally no reason to generate dummy\n // data. However, if the gas/feeEstimator is overriden, then this option should be enabled.\n !(gasEstimatorOverride || feeEstimatorOverride)\n ) {\n return noopMiddleware(uo, args);\n }\n return alchemyGasManagerMiddleware2(policyId, policyToken).dummyPaymasterAndData(uo, args);\n },\n feeEstimator: (uo, args) => {\n return feeEstimatorOverride ? feeEstimatorOverride(uo, args) : bypassPaymasterAndData(args.overrides) ? alchemyFeeEstimator2(transport)(uo, args) : noopMiddleware(uo, args);\n },\n gasEstimator: (uo, args) => {\n return gasEstimatorOverride ? gasEstimatorOverride(uo, args) : bypassPaymasterAndData(args.overrides) ? defaultGasEstimator(args.client)(uo, args) : noopMiddleware(uo, args);\n },\n paymasterAndData: async (uo, { account, client: client_, feeOptions, overrides: overrides_, context: uoContext }) => {\n const client = clientHeaderTrack(client_, \"alchemyFeeEstimator\");\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const userOp = deepHexlify(await resolveProperties(uo));\n const overrides = filterUndefined({\n maxFeePerGas: overrideField2(\"maxFeePerGas\", overrides_, feeOptions, userOp),\n maxPriorityFeePerGas: overrideField2(\"maxPriorityFeePerGas\", overrides_, feeOptions, userOp),\n callGasLimit: overrideField2(\"callGasLimit\", overrides_, feeOptions, userOp),\n verificationGasLimit: overrideField2(\"verificationGasLimit\", overrides_, feeOptions, userOp),\n preVerificationGas: overrideField2(\"preVerificationGas\", overrides_, feeOptions, userOp),\n ...account.getEntryPoint().version === \"0.7.0\" ? {\n paymasterVerificationGasLimit: overrideField2(\"paymasterVerificationGasLimit\", overrides_, feeOptions, userOp),\n paymasterPostOpGasLimit: overrideField2(\"paymasterPostOpGasLimit\", overrides_, feeOptions, userOp)\n } : {}\n });\n let erc20Context = void 0;\n if (policyToken !== void 0) {\n erc20Context = {\n tokenAddress: policyToken.address,\n maxTokenAmount: policyToken.maxTokenAmount\n };\n if (policyToken.permit !== void 0) {\n const permit = await generateSignedPermit2(client, account, policyToken);\n if (permit !== void 0) {\n erc20Context.permit = permit;\n }\n } else if (uoContext !== void 0) {\n erc20Context.permit = extractSignedPermitFromContext2(uoContext);\n }\n }\n const result = await client.request({\n method: \"alchemy_requestGasAndPaymasterAndData\",\n params: [\n {\n policyId,\n entryPoint: account.getEntryPoint().address,\n userOperation: userOp,\n dummySignature: await account.getDummySignature(),\n overrides,\n ...erc20Context ? {\n erc20Context\n } : {}\n }\n ]\n });\n return {\n ...uo,\n ...result\n };\n }\n };\n }\n function extractSignedPermitFromContext2(context2) {\n if (context2.signedPermit === void 0) {\n return void 0;\n }\n if (typeof context2.signedPermit !== \"object\") {\n throw new InvalidSignedPermit2(\"signedPermit is not an object\");\n }\n if (typeof context2.signedPermit.value !== \"bigint\") {\n throw new InvalidSignedPermit2(\"signedPermit.value is not a bigint\");\n }\n if (typeof context2.signedPermit.deadline !== \"bigint\") {\n throw new InvalidSignedPermit2(\"signedPermit.deadline is not a bigint\");\n }\n if (!isHex(context2.signedPermit.signature)) {\n throw new InvalidSignedPermit2(\"signedPermit.signature is not a hex string\");\n }\n return encodeSignedPermit2(context2.signedPermit.value, context2.signedPermit.deadline, context2.signedPermit.signature);\n }\n function encodeSignedPermit2(value, deadline, signedPermit) {\n return encodeAbiParameters([{ type: \"uint256\" }, { type: \"uint256\" }, { type: \"bytes\" }], [value, deadline, signedPermit]);\n }\n var overrideField2, generateSignedPermit2;\n var init_gasManager2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/gasManager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_feeEstimator3();\n init_gas_manager2();\n init_invalidSignedPermit2();\n overrideField2 = (field, overrides, feeOptions, userOperation) => {\n let _field = field;\n if (overrides?.[_field] != null) {\n if (isBigNumberish(overrides[_field])) {\n return deepHexlify(overrides[_field]);\n } else {\n return {\n multiplier: Number(overrides[_field].multiplier)\n };\n }\n }\n if (isMultiplier(feeOptions?.[field])) {\n return {\n multiplier: Number(feeOptions[field].multiplier)\n };\n }\n const userOpField = userOperation[field];\n if (isHex(userOpField) && fromHex(userOpField, \"bigint\") > 0n) {\n return userOpField;\n }\n return void 0;\n };\n generateSignedPermit2 = async (client, account, policyToken) => {\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n if (!policyToken.permit) {\n throw new Error(\"permit is missing\");\n }\n if (!policyToken.permit?.erc20Name || !policyToken.permit?.version) {\n throw new Error(\"erc20Name or version is missing\");\n }\n const paymasterAddress = policyToken.permit.paymasterAddress ?? getAlchemyPaymasterAddress2(client.chain, account.getEntryPoint().version);\n if (paymasterAddress === void 0 || paymasterAddress === \"0x\") {\n throw new Error(\"no paymaster contract address available\");\n }\n let allowanceFuture = client.call({\n to: policyToken.address,\n data: encodeFunctionData({\n abi: parseAbi(ERC20Abis2),\n functionName: \"allowance\",\n args: [account.address, paymasterAddress]\n })\n });\n let nonceFuture = client.call({\n to: policyToken.address,\n data: encodeFunctionData({\n abi: parseAbi(EIP7597Abis2),\n functionName: \"nonces\",\n args: [account.address]\n })\n });\n const [allowanceResponse, nonceResponse] = await Promise.all([\n allowanceFuture,\n nonceFuture\n ]);\n if (!allowanceResponse.data) {\n throw new Error(\"No allowance returned from erc20 contract call\");\n }\n if (!nonceResponse.data) {\n throw new Error(\"No nonces returned from erc20 contract call\");\n }\n const permitLimit = policyToken.permit.autoPermitApproveTo;\n const currentAllowance = BigInt(allowanceResponse.data);\n if (currentAllowance > policyToken.permit.autoPermitBelow) {\n return void 0;\n }\n const nonce = BigInt(nonceResponse.data);\n const deadline = BigInt(Math.floor(Date.now() / 1e3) + 60 * 10);\n const typedPermitData = {\n types: PermitTypes2,\n primaryType: \"Permit\",\n domain: {\n name: policyToken.permit.erc20Name ?? \"\",\n version: policyToken.permit.version ?? \"\",\n chainId: BigInt(client.chain.id),\n verifyingContract: policyToken.address\n },\n message: {\n owner: account.address,\n spender: paymasterAddress,\n value: permitLimit,\n nonce,\n deadline\n }\n };\n const signedPermit = await account.signTypedData(typedPermitData);\n return encodeSignedPermit2(permitLimit, deadline, signedPermit);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/userOperationSimulator.js\n function alchemyUserOperationSimulator2(transport) {\n return async (struct, { account, client }) => {\n const uoSimResult = await transport({ chain: client.chain }).request({\n method: \"alchemy_simulateUserOperationAssetChanges\",\n params: [\n deepHexlify(await resolveProperties(struct)),\n account.getEntryPoint().address\n ]\n });\n if (uoSimResult.error) {\n throw new Error(uoSimResult.error.message);\n }\n return struct;\n };\n }\n var init_userOperationSimulator2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/middleware/userOperationSimulator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/smartAccountClient.js\n function getSignerTypeHeader2(account) {\n return { \"Alchemy-Aa-Sdk-Signer\": account.getSigner().signerType };\n }\n function createAlchemySmartAccountClient2(config2) {\n if (!config2.chain) {\n throw new ChainNotFoundError2();\n }\n const feeOptions = config2.opts?.feeOptions ?? getDefaultUserOperationFeeOptions3(config2.chain);\n const scaClient = createSmartAccountClient({\n account: config2.account,\n transport: config2.transport,\n chain: config2.chain,\n type: \"AlchemySmartAccountClient\",\n opts: {\n ...config2.opts,\n feeOptions\n },\n feeEstimator: config2.feeEstimator ?? alchemyFeeEstimator2(config2.transport),\n gasEstimator: config2.gasEstimator,\n customMiddleware: async (struct, args) => {\n if (isSmartAccountWithSigner(args.account)) {\n config2.transport.updateHeaders(getSignerTypeHeader2(args.account));\n }\n return config2.customMiddleware ? config2.customMiddleware(struct, args) : struct;\n },\n ...config2.policyId ? alchemyGasAndPaymasterAndDataMiddleware2({\n policyId: config2.policyId,\n policyToken: config2.policyToken,\n transport: config2.transport,\n gasEstimatorOverride: config2.gasEstimator,\n feeEstimatorOverride: config2.feeEstimator\n }) : {},\n userOperationSimulator: config2.useSimulation ? alchemyUserOperationSimulator2(config2.transport) : void 0,\n signUserOperation: config2.signUserOperation,\n addBreadCrumb(breadcrumb) {\n const oldConfig = config2.transport.config;\n const dynamicFetchOptions = config2.transport.dynamicFetchOptions;\n const newTransport = alchemy2({ ...oldConfig });\n newTransport.updateHeaders(headersUpdate2(breadcrumb)(convertHeadersToObject2(dynamicFetchOptions?.headers)));\n return createAlchemySmartAccountClient2({\n ...config2,\n transport: newTransport\n });\n }\n }).extend(alchemyActions2).extend((client_) => ({\n addBreadcrumb(breadcrumb) {\n return clientHeaderTrack(client_, breadcrumb);\n }\n }));\n if (config2.account && isSmartAccountWithSigner(config2.account)) {\n config2.transport.updateHeaders(getSignerTypeHeader2(config2.account));\n }\n return scaClient;\n }\n var init_smartAccountClient4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/client/smartAccountClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_alchemyTransport2();\n init_defaults3();\n init_feeEstimator3();\n init_gasManager2();\n init_userOperationSimulator2();\n init_smartAccount2();\n init_alchemyTrackerHeaders2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/exports/index.js\n var init_exports3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+infra@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_viem@_d0fd590584a0b3dca5b842750d667454/node_modules/@account-kit/infra/dist/esm/exports/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_alchemyTransport2();\n init_chains3();\n init_smartAccountClient4();\n init_alchemyTrackerHeaders2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/alchemyClient.js\n async function createLightAccountAlchemyClient({ opts, transport, chain: chain2, ...config2 }) {\n return createLightAccountClient({\n opts,\n transport,\n chain: chain2,\n ...config2\n });\n }\n var init_alchemyClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/alchemyClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_src();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/decorators/lightAccount.js\n var lightAccountClientActions;\n var init_lightAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/decorators/lightAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_transferOwnership();\n lightAccountClientActions = (client) => ({\n transferOwnership: async (args) => transferOwnership(client, args)\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/client.js\n async function createLightAccountClient(params) {\n const { transport, chain: chain2 } = params;\n const lightAccount = await createLightAccount({\n ...params,\n transport,\n chain: chain2\n });\n if (isAlchemyTransport2(transport, chain2)) {\n return createAlchemySmartAccountClient2({\n ...params,\n transport,\n chain: chain2,\n account: lightAccount\n }).extend(lightAccountClientActions);\n }\n return createSmartAccountClient({\n ...params,\n transport,\n chain: chain2,\n account: lightAccount\n }).extend(lightAccountClientActions);\n }\n var init_client2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/client.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_src();\n init_lightAccount();\n init_exports3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/multiOwnerAlchemyClient.js\n async function createMultiOwnerLightAccountAlchemyClient({ opts, transport, chain: chain2, ...config2 }) {\n return createMultiOwnerLightAccountClient({\n opts,\n transport,\n chain: chain2,\n ...config2\n });\n }\n var init_multiOwnerAlchemyClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/multiOwnerAlchemyClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_src();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/MultiOwnerLightAccountAbi.js\n var MultiOwnerLightAccountAbi;\n var init_MultiOwnerLightAccountAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/MultiOwnerLightAccountAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n MultiOwnerLightAccountAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint_\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"addDeposit\",\n inputs: [],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verifyingContract\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"extensions\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n { name: \"dest\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"func\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n { name: \"dest\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"func\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n { name: \"dest\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"value\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"func\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getDeposit\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getNonce\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initialize\",\n inputs: [{ name: \"owners_\", type: \"address[]\", internalType: \"address[]\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"hash\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"result\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"owners\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address[]\", internalType: \"address[]\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"updateOwners\",\n inputs: [\n {\n name: \"ownersToAdd\",\n type: \"address[]\",\n internalType: \"address[]\"\n },\n {\n name: \"ownersToRemove\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"gasFees\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawDepositTo\",\n inputs: [\n {\n name: \"withdrawAddress\",\n type: \"address\",\n internalType: \"address payable\"\n },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"LightAccountInitialized\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n indexed: true,\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"owners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnersUpdated\",\n inputs: [\n {\n name: \"addedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n },\n {\n name: \"removedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"ArrayLengthMismatch\", inputs: [] },\n { type: \"error\", name: \"ECDSAInvalidSignature\", inputs: [] },\n {\n type: \"error\",\n name: \"ECDSAInvalidSignatureLength\",\n inputs: [{ name: \"length\", type: \"uint256\", internalType: \"uint256\" }]\n },\n {\n type: \"error\",\n name: \"ECDSAInvalidSignatureS\",\n inputs: [{ name: \"s\", type: \"bytes32\", internalType: \"bytes32\" }]\n },\n { type: \"error\", name: \"EmptyOwnersNotAllowed\", inputs: [] },\n { type: \"error\", name: \"InvalidInitialization\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"InvalidSignatureType\", inputs: [] },\n {\n type: \"error\",\n name: \"NotAuthorized\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"NotInitializing\", inputs: [] },\n {\n type: \"error\",\n name: \"OwnerDoesNotExist\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"UnauthorizedCallContext\", inputs: [] },\n { type: \"error\", name: \"UpgradeFailed\", inputs: [] },\n { type: \"error\", name: \"ZeroAddressNotAllowed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/MultiOwnerLightAccountFactoryAbi.js\n var MultiOwnerLightAccountFactoryAbi;\n var init_MultiOwnerLightAccountFactoryAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/abis/MultiOwnerLightAccountFactoryAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n MultiOwnerLightAccountFactoryAbi = [\n {\n type: \"constructor\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"ACCOUNT_IMPLEMENTATION\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract MultiOwnerLightAccount\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"ENTRY_POINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n { name: \"unstakeDelay\", type: \"uint32\", internalType: \"uint32\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n { name: \"owners\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"contract MultiOwnerLightAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"createAccountSingle\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"contract MultiOwnerLightAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n { name: \"owners\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [{ name: \"newOwner\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n { name: \"to\", type: \"address\", internalType: \"address payable\" },\n { name: \"token\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [{ name: \"to\", type: \"address\", internalType: \"address payable\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AddressEmptyCode\",\n inputs: [{ name: \"target\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"AddressInsufficientBalance\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"FailedInnerCall\", inputs: [] },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidEntryPoint\",\n inputs: [{ name: \"entryPoint\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"InvalidOwners\", inputs: [] },\n {\n type: \"error\",\n name: \"OwnableInvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"OwnableUnauthorizedAccount\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"OwnersArrayEmpty\", inputs: [] },\n { type: \"error\", name: \"OwnersLimitExceeded\", inputs: [] },\n {\n type: \"error\",\n name: \"SafeERC20FailedOperation\",\n inputs: [{ name: \"token\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"TransferFailed\", inputs: [] },\n { type: \"error\", name: \"ZeroAddressNotAllowed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/multiOwner.js\n async function createMultiOwnerLightAccount({ transport, chain: chain2, signer, initCode, version: version7 = defaultLightAccountVersion(), entryPoint = getEntryPoint(chain2, {\n version: \"0.7.0\"\n }), accountAddress, factoryAddress = getDefaultMultiOwnerLightAccountFactoryAddress(chain2, version7), salt: salt_ = 0n, owners = [] }) {\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const ownerAddress = await signer.getAddress();\n const owners_ = Array.from(/* @__PURE__ */ new Set([...owners, ownerAddress])).filter((x4) => hexToBigInt(x4) !== 0n).sort((a3, b4) => {\n const bigintA = hexToBigInt(a3);\n const bigintB = hexToBigInt(b4);\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n });\n const getAccountInitCode = async () => {\n if (initCode)\n return initCode;\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: MultiOwnerLightAccountFactoryAbi,\n functionName: \"createAccount\",\n args: [owners_, salt_]\n })\n ]);\n };\n const address = accountAddress ?? predictMultiOwnerLightAccountAddress({\n factoryAddress,\n salt: salt_,\n ownerAddresses: owners_\n });\n const account = await createLightAccountBase({\n transport,\n chain: chain2,\n signer,\n abi: MultiOwnerLightAccountAbi,\n version: version7,\n type: \"MultiOwnerLightAccount\",\n entryPoint,\n accountAddress: address,\n getAccountInitCode\n });\n return {\n ...account,\n encodeUpdateOwners: (ownersToAdd, ownersToRemove) => {\n return encodeFunctionData({\n abi: MultiOwnerLightAccountAbi,\n functionName: \"updateOwners\",\n args: [ownersToAdd, ownersToRemove]\n });\n },\n async getOwnerAddresses() {\n const callResult = await client.readContract({\n address,\n abi: MultiOwnerLightAccountAbi,\n functionName: \"owners\"\n });\n if (callResult == null) {\n throw new Error(\"could not get on-chain owners\");\n }\n if (!callResult.includes(await signer.getAddress())) {\n throw new Error(\"on-chain owners does not include the current signer\");\n }\n return callResult;\n }\n };\n }\n var init_multiOwner = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/accounts/multiOwner.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_MultiOwnerLightAccountAbi();\n init_MultiOwnerLightAccountFactoryAbi();\n init_utils11();\n init_base5();\n init_predictAddress();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/actions/updateOwners.js\n var updateOwners;\n var init_updateOwners = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/actions/updateOwners.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n updateOwners = async (client, { ownersToAdd, ownersToRemove, waitForTxn, overrides, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"updateOwners\", client);\n }\n const data = account.encodeUpdateOwners(ownersToAdd, ownersToRemove);\n const result = await client.sendUserOperation({\n uo: {\n target: account.address,\n data\n },\n account,\n overrides\n });\n if (waitForTxn) {\n return client.waitForUserOperationTransaction(result);\n }\n return result.hash;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/multiOwnerLightAccount.js\n async function createMultiOwnerLightAccountClient(params) {\n const { transport, chain: chain2 } = params;\n const lightAccount = await createMultiOwnerLightAccount({\n ...params,\n transport,\n chain: chain2\n });\n if (isAlchemyTransport2(transport, chain2)) {\n return createAlchemySmartAccountClient2({\n ...params,\n transport,\n chain: chain2,\n account: lightAccount\n }).extend(multiOwnerLightAccountClientActions);\n }\n return createSmartAccountClient({\n ...params,\n transport,\n chain: chain2,\n account: lightAccount\n }).extend(multiOwnerLightAccountClientActions);\n }\n var init_multiOwnerLightAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/clients/multiOwnerLightAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_src();\n init_exports3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/decorators/multiOwnerLightAccount.js\n var multiOwnerLightAccountClientActions;\n var init_multiOwnerLightAccount2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/light-account/decorators/multiOwnerLightAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_updateOwners();\n multiOwnerLightAccountClientActions = (client) => ({\n updateOwners: async (args) => updateOwners(client, args)\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IAccountLoupe.js\n var IAccountLoupeAbi;\n var init_IAccountLoupe = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IAccountLoupe.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n IAccountLoupeAbi = [\n {\n type: \"function\",\n name: \"getExecutionFunctionConfig\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IAccountLoupe.ExecutionFunctionConfig\",\n components: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n {\n name: \"userOpValidationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n },\n {\n name: \"runtimeValidationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getExecutionHooks\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct IAccountLoupe.ExecutionHooks[]\",\n components: [\n {\n name: \"preExecHook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n },\n {\n name: \"postExecHook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getInstalledPlugins\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address[]\", internalType: \"address[]\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getPreValidationHooks\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"preUserOpValidationHooks\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n }\n ],\n stateMutability: \"view\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IPlugin.js\n var IPluginAbi;\n var init_IPlugin = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IPlugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n IPluginAbi = [\n {\n type: \"function\",\n name: \"onInstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onUninstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"pluginManifest\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginManifest\",\n components: [\n { name: \"interfaceIds\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n {\n name: \"dependencyInterfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"executionFunctions\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permittedExecutionSelectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permitAnyExternalAddress\",\n type: \"bool\",\n internalType: \"bool\"\n },\n { name: \"canSpendNativeToken\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permittedExternalCalls\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExternalCallPermission[]\",\n components: [\n {\n name: \"externalAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"permitAnySelector\", type: \"bool\", internalType: \"bool\" },\n { name: \"selectors\", type: \"bytes4[]\", internalType: \"bytes4[]\" }\n ]\n },\n {\n name: \"userOpValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"runtimeValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preUserOpValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"preExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n name: \"postExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"pluginMetadata\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginMetadata\",\n components: [\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"author\", type: \"string\", internalType: \"string\" },\n {\n name: \"permissionDescriptors\",\n type: \"tuple[]\",\n internalType: \"struct SelectorPermission[]\",\n components: [\n {\n name: \"functionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"permissionDescription\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"postExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"preExecHookData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preRuntimeValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preUserOpValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"runtimeValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"userOpValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IPluginManager.js\n var IPluginManagerAbi;\n var init_IPluginManager = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IPluginManager.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n IPluginManagerAbi = [\n {\n type: \"function\",\n name: \"installPlugin\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"manifestHash\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"pluginInitData\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"dependencies\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallPlugin\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"config\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"pluginUninstallData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"PluginIgnoredHookUnapplyCallbackFailure\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"providingPlugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginIgnoredUninstallCallbackFailure\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginInstalled\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifestHash\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\"\n },\n {\n name: \"dependencies\",\n type: \"bytes21[]\",\n indexed: false,\n internalType: \"FunctionReference[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginUninstalled\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"callbacksSucceeded\",\n type: \"bool\",\n indexed: true,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IStandardExecutor.js\n var IStandardExecutorAbi;\n var init_IStandardExecutor = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/IStandardExecutor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n IStandardExecutorAbi = [\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n }\n ],\n outputs: [{ name: \"\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"payable\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/MultiOwnerModularAccountFactory.js\n var MultiOwnerModularAccountFactoryAbi;\n var init_MultiOwnerModularAccountFactory = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/MultiOwnerModularAccountFactory.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n MultiOwnerModularAccountFactoryAbi = [\n {\n type: \"constructor\",\n inputs: [\n { name: \"owner\", type: \"address\", internalType: \"address\" },\n {\n name: \"multiOwnerPlugin\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"implementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"multiOwnerPluginManifestHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"ENTRYPOINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"IMPL\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"MULTI_OWNER_PLUGIN\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n { name: \"unstakeDelay\", type: \"uint32\", internalType: \"uint32\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"owners\", type: \"address[]\", internalType: \"address[]\" }\n ],\n outputs: [{ name: \"addr\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n { name: \"salt\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"owners\", type: \"address[]\", internalType: \"address[]\" }\n ],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [{ name: \"newOwner\", type: \"address\", internalType: \"address\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n { name: \"to\", type: \"address\", internalType: \"address payable\" },\n { name: \"token\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [{ name: \"to\", type: \"address\", internalType: \"address payable\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n { type: \"error\", name: \"InvalidOwner\", inputs: [] },\n { type: \"error\", name: \"OwnersArrayEmpty\", inputs: [] },\n { type: \"error\", name: \"OwnersLimitExceeded\", inputs: [] },\n { type: \"error\", name: \"TransferFailed\", inputs: [] }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/MultisigModularAccountFactory.js\n var MultisigModularAccountFactoryAbi;\n var init_MultisigModularAccountFactory = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/MultisigModularAccountFactory.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n MultisigModularAccountFactoryAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"multisigPlugin\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"implementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"multisigPluginManifestHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"receive\",\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"ENTRYPOINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"IMPL\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"MULTISIG_PLUGIN\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n {\n name: \"unstakeDelay\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"amount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"owners\",\n type: \"address[]\",\n internalType: \"address[]\"\n },\n {\n name: \"threshold\",\n type: \"uint128\",\n internalType: \"uint128\"\n }\n ],\n outputs: [\n {\n name: \"addr\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"owners\",\n type: \"address[]\",\n internalType: \"address[]\"\n },\n {\n name: \"threshold\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [\n {\n name: \"newOwner\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n {\n name: \"to\",\n type: \"address\",\n internalType: \"address payable\"\n },\n {\n name: \"token\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"amount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [\n {\n name: \"to\",\n type: \"address\",\n internalType: \"address payable\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"InvalidAction\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidThreshold\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"OwnersArrayEmpty\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"OwnersLimitExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"TransferFailed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/UpgradeableModularAccount.js\n var UpgradeableModularAccountAbi;\n var init_UpgradeableModularAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/abis/UpgradeableModularAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n UpgradeableModularAccountAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"anEntryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n { type: \"fallback\", stateMutability: \"payable\" },\n { type: \"receive\", stateMutability: \"payable\" },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"result\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n }\n ],\n outputs: [{ name: \"results\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeFromPlugin\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [{ name: \"returnData\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeFromPluginExternal\",\n inputs: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"getExecutionFunctionConfig\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"config\",\n type: \"tuple\",\n internalType: \"struct IAccountLoupe.ExecutionFunctionConfig\",\n components: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n {\n name: \"userOpValidationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n },\n {\n name: \"runtimeValidationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getExecutionHooks\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"execHooks\",\n type: \"tuple[]\",\n internalType: \"struct IAccountLoupe.ExecutionHooks[]\",\n components: [\n {\n name: \"preExecHook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n },\n {\n name: \"postExecHook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getInstalledPlugins\",\n inputs: [],\n outputs: [\n {\n name: \"pluginAddresses\",\n type: \"address[]\",\n internalType: \"address[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getNonce\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getPreValidationHooks\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [\n {\n name: \"preUserOpValidationHooks\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initialize\",\n inputs: [\n { name: \"plugins\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"pluginInitData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installPlugin\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n {\n name: \"manifestHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"pluginInstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"dependencies\",\n type: \"bytes21[]\",\n internalType: \"FunctionReference[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n { name: \"operator\", type: \"address\", internalType: \"address\" },\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"ids\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"values\", type: \"uint256[]\", internalType: \"uint256[]\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n { name: \"operator\", type: \"address\", internalType: \"address\" },\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"id\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n { name: \"operator\", type: \"address\", internalType: \"address\" },\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"tokenId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"tokensReceived\",\n inputs: [\n { name: \"operator\", type: \"address\", internalType: \"address\" },\n { name: \"from\", type: \"address\", internalType: \"address\" },\n { name: \"to\", type: \"address\", internalType: \"address\" },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"userData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"operatorData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallPlugin\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"config\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"pluginUninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"callGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"maxFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ModularAccountInitialized\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n indexed: true,\n internalType: \"contract IEntryPoint\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginInstalled\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifestHash\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\"\n },\n {\n name: \"dependencies\",\n type: \"bytes21[]\",\n indexed: false,\n internalType: \"FunctionReference[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"PluginUninstalled\",\n inputs: [\n {\n name: \"plugin\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: true,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n { type: \"error\", name: \"AlreadyInitializing\", inputs: [] },\n { type: \"error\", name: \"AlwaysDenyRule\", inputs: [] },\n { type: \"error\", name: \"ArrayLengthMismatch\", inputs: [] },\n {\n type: \"error\",\n name: \"DuplicateHookLimitExceeded\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"hook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicatePreRuntimeValidationHookLimitExceeded\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"hook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"DuplicatePreUserOpValidationHookLimitExceeded\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"hook\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"Erc4337FunctionNotAllowed\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n {\n type: \"error\",\n name: \"ExecFromPluginExternalNotPermitted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"ExecFromPluginNotPermitted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }\n ]\n },\n {\n type: \"error\",\n name: \"ExecutionFunctionAlreadySet\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n {\n type: \"error\",\n name: \"IPluginFunctionNotAllowed\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n { type: \"error\", name: \"InterfaceNotAllowed\", inputs: [] },\n { type: \"error\", name: \"InvalidDependenciesProvided\", inputs: [] },\n { type: \"error\", name: \"InvalidPluginManifest\", inputs: [] },\n {\n type: \"error\",\n name: \"MissingPluginDependency\",\n inputs: [{ name: \"dependency\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"NativeFunctionNotAllowed\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n {\n type: \"error\",\n name: \"NativeTokenSpendingNotPermitted\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"NullFunctionReference\", inputs: [] },\n {\n type: \"error\",\n name: \"PluginAlreadyInstalled\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginCallDenied\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginDependencyViolation\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginInstallCallbackFailed\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"PluginInterfaceNotSupported\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginNotInstalled\",\n inputs: [{ name: \"plugin\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"PluginUninstallCallbackFailed\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"PostExecHookReverted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"PreExecHookReverted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"PreRuntimeValidationHookFailed\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n {\n type: \"error\",\n name: \"RuntimeValidationFunctionAlreadySet\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"validationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"RuntimeValidationFunctionMissing\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n {\n type: \"error\",\n name: \"RuntimeValidationFunctionReverted\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"revertReason\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { type: \"error\", name: \"UnauthorizedCallContext\", inputs: [] },\n {\n type: \"error\",\n name: \"UnexpectedAggregator\",\n inputs: [\n { name: \"plugin\", type: \"address\", internalType: \"address\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"aggregator\", type: \"address\", internalType: \"address\" }\n ]\n },\n {\n type: \"error\",\n name: \"UnrecognizedFunction\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n },\n { type: \"error\", name: \"UpgradeFailed\", inputs: [] },\n { type: \"error\", name: \"UserOpNotFromEntryPoint\", inputs: [] },\n {\n type: \"error\",\n name: \"UserOpValidationFunctionAlreadySet\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n {\n name: \"validationFunction\",\n type: \"bytes21\",\n internalType: \"FunctionReference\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UserOpValidationFunctionMissing\",\n inputs: [{ name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }]\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account-loupe/decorator.js\n var accountLoupeActions;\n var init_decorator = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account-loupe/decorator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_IAccountLoupe();\n accountLoupeActions = (client) => ({\n getExecutionFunctionConfig: async ({ selector, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"getExecutionFunctionConfig\", client);\n }\n return client.readContract({\n address: account.address,\n abi: IAccountLoupeAbi,\n functionName: \"getExecutionFunctionConfig\",\n args: [selector]\n });\n },\n getExecutionHooks: async ({ selector, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"getExecutionHooks\", client);\n }\n return client.readContract({\n address: account.address,\n abi: IAccountLoupeAbi,\n functionName: \"getExecutionHooks\",\n args: [selector]\n });\n },\n getPreValidationHooks: async ({ selector, account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"getPreValidationHooks\", client);\n }\n return client.readContract({\n address: account.address,\n abi: IAccountLoupeAbi,\n functionName: \"getPreValidationHooks\",\n args: [selector]\n });\n },\n getInstalledPlugins: async ({ account = client.account }) => {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"getInstalledPlugins\", client);\n }\n return client.readContract({\n address: account.address,\n abi: IAccountLoupeAbi,\n functionName: \"getInstalledPlugins\"\n }).catch(() => []);\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/plugin.js\n var addresses, MultiOwnerPlugin, multiOwnerPluginActions, MultiOwnerPluginExecutionFunctionAbi, MultiOwnerPluginAbi;\n var init_plugin = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/plugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm6();\n init_src();\n addresses = {\n 1: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 10: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 137: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 252: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 2523: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 8453: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 42161: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 80001: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 80002: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 84532: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 421614: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 7777777: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 11155111: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 11155420: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n 999999999: \"0xcE0000007B008F50d762D155002600004cD6c647\"\n };\n MultiOwnerPlugin = {\n meta: {\n name: \"Multi Owner Plugin\",\n version: \"1.0.0\",\n addresses\n },\n getContract: (client, address) => {\n if (!client.chain)\n throw new ChainNotFoundError2();\n return getContract({\n address: address || addresses[client.chain.id],\n abi: MultiOwnerPluginAbi,\n client\n });\n }\n };\n multiOwnerPluginActions = (client) => ({\n updateOwners({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"updateOwners\", client);\n }\n const uo = encodeFunctionData({\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"updateOwners\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n installMultiOwnerPlugin({ account = client.account, overrides, context: context2, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"installMultiOwnerPlugin\", client);\n }\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const dependencies = params.dependencyOverrides ?? [];\n const pluginAddress = params.pluginAddress ?? MultiOwnerPlugin.meta.addresses[chain2.id];\n if (!pluginAddress) {\n throw new Error(\"missing MultiOwnerPlugin address for chain \" + chain2.name);\n }\n return installPlugin(client, {\n pluginAddress,\n pluginInitData: encodeAbiParameters([{ type: \"address[]\" }], params.args),\n dependencies,\n overrides,\n account,\n context: context2\n });\n },\n encodeUpdateOwners({ args }) {\n return encodeFunctionData({\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"updateOwners\",\n args\n });\n },\n encodeEip712Domain() {\n return encodeFunctionData({\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\"\n });\n },\n async readEip712Domain({ account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"readEip712Domain\", client);\n }\n return client.readContract({\n address: account.address,\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\"\n });\n },\n encodeIsValidSignature({ args }) {\n return encodeFunctionData({\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args\n });\n },\n async readIsValidSignature({ args, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"readIsValidSignature\", client);\n }\n return client.readContract({\n address: account.address,\n abi: MultiOwnerPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args\n });\n }\n });\n MultiOwnerPluginExecutionFunctionAbi = [\n {\n type: \"function\",\n name: \"updateOwners\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n }\n ];\n MultiOwnerPluginAbi = [\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"encodeMessageData\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getMessageHash\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isOwnerOf\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"ownerToCheck\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onInstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onUninstall\",\n inputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"ownersOf\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"address[]\", internalType: \"address[]\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pluginManifest\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginManifest\",\n components: [\n { name: \"interfaceIds\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n {\n name: \"dependencyInterfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"executionFunctions\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permittedExecutionSelectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permitAnyExternalAddress\",\n type: \"bool\",\n internalType: \"bool\"\n },\n { name: \"canSpendNativeToken\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permittedExternalCalls\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExternalCallPermission[]\",\n components: [\n {\n name: \"externalAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"permitAnySelector\", type: \"bool\", internalType: \"bool\" },\n { name: \"selectors\", type: \"bytes4[]\", internalType: \"bytes4[]\" }\n ]\n },\n {\n name: \"userOpValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"runtimeValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preUserOpValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"preExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n name: \"postExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"pluginMetadata\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginMetadata\",\n components: [\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"author\", type: \"string\", internalType: \"string\" },\n {\n name: \"permissionDescriptors\",\n type: \"tuple[]\",\n internalType: \"struct SelectorPermission[]\",\n components: [\n {\n name: \"functionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"permissionDescription\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"postExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"preExecHookData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preRuntimeValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preUserOpValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"runtimeValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"updateOwners\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"userOpValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"event\",\n name: \"OwnerUpdated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"addedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n },\n {\n name: \"removedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n { type: \"error\", name: \"EmptyOwnersNotAllowed\", inputs: [] },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"NotAuthorized\", inputs: [] },\n {\n type: \"error\",\n name: \"NotContractCaller\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"NotImplemented\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" }\n ]\n },\n { type: \"error\", name: \"NotInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"OwnerDoesNotExist\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/signer.js\n var multiOwnerMessageSigner;\n var init_signer2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_plugin();\n multiOwnerMessageSigner = (client, accountAddress, signer, pluginAddress = MultiOwnerPlugin.meta.addresses[client.chain.id]) => {\n const get712Wrapper = async (msg) => {\n const [, name, version7, chainId, verifyingContract, salt] = await client.readContract({\n abi: MultiOwnerPluginAbi,\n address: pluginAddress,\n functionName: \"eip712Domain\",\n account: accountAddress\n });\n return {\n domain: {\n chainId: Number(chainId),\n name,\n salt,\n verifyingContract,\n version: version7\n },\n types: {\n AlchemyModularAccountMessage: [{ name: \"message\", type: \"bytes\" }]\n },\n message: {\n message: msg\n },\n primaryType: \"AlchemyModularAccountMessage\"\n };\n };\n const prepareSign = async (params) => {\n const data = await get712Wrapper(params.type === \"personal_sign\" ? hashMessage(params.data) : hashTypedData(params.data));\n return {\n type: \"eth_signTypedData_v4\",\n data\n };\n };\n const formatSign = async (signature) => {\n return signature;\n };\n return {\n prepareSign,\n formatSign,\n getDummySignature: () => {\n return \"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\";\n },\n signUserOperationHash: (uoHash) => {\n return signer().signMessage({ raw: uoHash });\n },\n async signMessage({ message: message2 }) {\n const { type, data } = await prepareSign({\n type: \"personal_sign\",\n data: message2\n });\n return type === \"personal_sign\" ? signer().signMessage(data) : signer().signTypedData(data);\n },\n signTypedData: async (typedDataDefinition) => {\n const { type, data } = await prepareSign({\n type: \"eth_signTypedData_v4\",\n data: typedDataDefinition\n });\n return type === \"personal_sign\" ? signer().signMessage(data) : signer().signTypedData(data);\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/utils.js\n async function getMSCAUpgradeToData(client, args) {\n const { account: account_ = client.account, multiOwnerPluginAddress } = args;\n if (!account_) {\n throw new AccountNotFoundError2();\n }\n const account = account_;\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const initData = await getMAInitializationData({\n client,\n multiOwnerPluginAddress,\n signerAddress: await account.getSigner().getAddress()\n });\n return {\n ...initData,\n createMAAccount: async () => createMultiOwnerModularAccount({\n transport: custom(client.transport),\n chain: chain2,\n signer: account.getSigner(),\n accountAddress: account.address\n })\n };\n }\n async function getMAInitializationData({ client, multiOwnerPluginAddress, signerAddress }) {\n if (!client.chain) {\n throw new ChainNotFoundError2();\n }\n const factoryAddress = getDefaultMultiOwnerModularAccountFactoryAddress(client.chain);\n const implAddress = await client.readContract({\n abi: MultiOwnerModularAccountFactoryAbi,\n address: factoryAddress,\n functionName: \"IMPL\"\n });\n const multiOwnerAddress = multiOwnerPluginAddress ?? MultiOwnerPlugin.meta.addresses[client.chain.id];\n if (!multiOwnerAddress) {\n throw new Error(\"could not get multi owner plugin address\");\n }\n const moPluginManifest = await client.readContract({\n abi: IPluginAbi,\n address: multiOwnerAddress,\n functionName: \"pluginManifest\"\n });\n const hashedMultiOwnerPluginManifest = keccak256(encodeFunctionResult({\n abi: IPluginAbi,\n functionName: \"pluginManifest\",\n result: moPluginManifest\n }));\n const encodedOwner = encodeAbiParameters(parseAbiParameters(\"address[]\"), Array.isArray(signerAddress) ? [signerAddress] : [[signerAddress]]);\n const encodedPluginInitData = encodeAbiParameters(parseAbiParameters(\"bytes32[], bytes[]\"), [[hashedMultiOwnerPluginManifest], [encodedOwner]]);\n const encodedMSCAInitializeData = encodeFunctionData({\n abi: UpgradeableModularAccountAbi,\n functionName: \"initialize\",\n args: [[multiOwnerAddress], encodedPluginInitData]\n });\n return {\n implAddress,\n initializationData: encodedMSCAInitializeData\n };\n }\n var getDefaultMultisigModularAccountFactoryAddress, getDefaultMultiOwnerModularAccountFactoryAddress;\n var init_utils12 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_exports3();\n init_esm();\n init_IPlugin();\n init_MultiOwnerModularAccountFactory();\n init_UpgradeableModularAccount();\n init_multiOwnerAccount();\n init_plugin();\n getDefaultMultisigModularAccountFactoryAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x000000000000204327E6669f00901a57CE15aE15\";\n }\n };\n getDefaultMultiOwnerModularAccountFactoryAddress = (chain2) => {\n switch (chain2.id) {\n default:\n return \"0x000000e92D78D90000007F0082006FDA09BD5f11\";\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/standardExecutor.js\n var standardExecutor;\n var init_standardExecutor = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/standardExecutor.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_IStandardExecutor();\n standardExecutor = {\n encodeExecute: async ({ target, data, value }) => {\n return encodeFunctionData({\n abi: IStandardExecutorAbi,\n functionName: \"execute\",\n args: [target, value ?? 0n, data]\n });\n },\n encodeBatchExecute: async (txs) => {\n return encodeFunctionData({\n abi: IStandardExecutorAbi,\n functionName: \"executeBatch\",\n args: [\n txs.map((tx) => ({\n target: tx.target,\n data: tx.data,\n value: tx.value ?? 0n\n }))\n ]\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/multiOwnerAccount.js\n async function createMultiOwnerModularAccount(config2) {\n const { transport, chain: chain2, signer, accountAddress, initCode, entryPoint = getEntryPoint(chain2, { version: \"0.6.0\" }), factoryAddress = getDefaultMultiOwnerModularAccountFactoryAddress(chain2), owners = [], salt = 0n } = config2;\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const getAccountInitCode = async () => {\n if (initCode) {\n return initCode;\n }\n const ownerAddress = await signer.getAddress();\n const owners_ = Array.from(/* @__PURE__ */ new Set([...owners, ownerAddress])).filter((x4) => hexToBigInt(x4) !== 0n).sort((a3, b4) => {\n const bigintA = hexToBigInt(a3);\n const bigintB = hexToBigInt(b4);\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n });\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: MultiOwnerModularAccountFactoryAbi,\n functionName: \"createAccount\",\n args: [salt, owners_]\n })\n ]);\n };\n const _accountAddress = await getAccountAddress({\n client,\n entryPoint,\n accountAddress,\n getAccountInitCode\n });\n const baseAccount = await toSmartContractAccount({\n transport,\n chain: chain2,\n entryPoint,\n accountAddress: _accountAddress,\n source: `MultiOwnerModularAccount`,\n getAccountInitCode,\n ...standardExecutor,\n ...multiOwnerMessageSigner(client, _accountAddress, () => signer)\n });\n return {\n ...baseAccount,\n publicKey: await signer.getAddress(),\n getSigner: () => signer\n };\n }\n var init_multiOwnerAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/multiOwnerAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_MultiOwnerModularAccountFactory();\n init_signer2();\n init_utils12();\n init_standardExecutor();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/plugin.js\n var addresses2, MultisigPlugin, multisigPluginActions, MultisigPluginExecutionFunctionAbi, MultisigPluginAbi;\n var init_plugin2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/plugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm6();\n init_src();\n addresses2 = {\n 1: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 10: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 137: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 252: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 1337: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 2523: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 8453: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 42161: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 80002: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 84532: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 421614: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 7777777: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 11155111: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 11155420: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n 999999999: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\"\n };\n MultisigPlugin = {\n meta: {\n name: \"Multisig Plugin\",\n version: \"1.0.0\",\n addresses: addresses2\n },\n getContract: (client, address) => {\n if (!client.chain)\n throw new ChainNotFoundError2();\n return getContract({\n address: address || addresses2[client.chain.id],\n abi: MultisigPluginAbi,\n client\n });\n }\n };\n multisigPluginActions = (client) => ({\n updateOwnership({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"updateOwnership\", client);\n }\n const uo = encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"updateOwnership\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n installMultisigPlugin({ account = client.account, overrides, context: context2, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"installMultisigPlugin\", client);\n }\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const dependencies = params.dependencyOverrides ?? [];\n const pluginAddress = params.pluginAddress ?? MultisigPlugin.meta.addresses[chain2.id];\n if (!pluginAddress) {\n throw new Error(\"missing MultisigPlugin address for chain \" + chain2.name);\n }\n return installPlugin(client, {\n pluginAddress,\n pluginInitData: encodeAbiParameters([{ type: \"address[]\" }, { type: \"uint256\" }], params.args),\n dependencies,\n overrides,\n account,\n context: context2\n });\n },\n encodeUpdateOwnership({ args }) {\n return encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"updateOwnership\",\n args\n });\n },\n encodeEip712Domain() {\n return encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\"\n });\n },\n async readEip712Domain({ account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"readEip712Domain\", client);\n }\n return client.readContract({\n address: account.address,\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\"\n });\n },\n encodeIsValidSignature({ args }) {\n return encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args\n });\n },\n async readIsValidSignature({ args, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"readIsValidSignature\", client);\n }\n return client.readContract({\n address: account.address,\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args\n });\n }\n });\n MultisigPluginExecutionFunctionAbi = [\n {\n type: \"function\",\n name: \"updateOwnership\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"newThreshold\", type: \"uint128\", internalType: \"uint128\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n }\n ];\n MultisigPluginAbi = [\n {\n type: \"constructor\",\n inputs: [{ name: \"entryPoint\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"ENTRYPOINT\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"checkNSignatures\",\n inputs: [\n { name: \"actualDigest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"upperLimitGasDigest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"signatures\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [\n { name: \"success\", type: \"bool\", internalType: \"bool\" },\n { name: \"firstFailure\", type: \"uint256\", internalType: \"uint256\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"encodeMessageData\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getMessageHash\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isOwnerOf\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"ownerToCheck\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onInstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onUninstall\",\n inputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"ownershipInfoOf\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }],\n outputs: [\n { name: \"\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pluginManifest\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginManifest\",\n components: [\n { name: \"interfaceIds\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n {\n name: \"dependencyInterfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"executionFunctions\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permittedExecutionSelectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permitAnyExternalAddress\",\n type: \"bool\",\n internalType: \"bool\"\n },\n { name: \"canSpendNativeToken\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permittedExternalCalls\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExternalCallPermission[]\",\n components: [\n {\n name: \"externalAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"permitAnySelector\", type: \"bool\", internalType: \"bool\" },\n { name: \"selectors\", type: \"bytes4[]\", internalType: \"bytes4[]\" }\n ]\n },\n {\n name: \"userOpValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"runtimeValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preUserOpValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"preExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n name: \"postExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"pluginMetadata\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginMetadata\",\n components: [\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"author\", type: \"string\", internalType: \"string\" },\n {\n name: \"permissionDescriptors\",\n type: \"tuple[]\",\n internalType: \"struct SelectorPermission[]\",\n components: [\n {\n name: \"functionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"permissionDescription\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"postExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"preExecHookData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preRuntimeValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preUserOpValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"runtimeValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"updateOwnership\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"newThreshold\", type: \"uint128\", internalType: \"uint128\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"userOpValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\"\n },\n {\n type: \"event\",\n name: \"OwnerUpdated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"addedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n },\n {\n name: \"removedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\"\n },\n {\n name: \"threshold\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n { type: \"error\", name: \"ECDSARecoverFailure\", inputs: [] },\n { type: \"error\", name: \"EmptyOwnersNotAllowed\", inputs: [] },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n { type: \"error\", name: \"InvalidAddress\", inputs: [] },\n { type: \"error\", name: \"InvalidMaxFeePerGas\", inputs: [] },\n { type: \"error\", name: \"InvalidMaxPriorityFeePerGas\", inputs: [] },\n { type: \"error\", name: \"InvalidNumSigsOnActualGas\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"InvalidPreVerificationGas\", inputs: [] },\n { type: \"error\", name: \"InvalidSigLength\", inputs: [] },\n { type: \"error\", name: \"InvalidSigOffset\", inputs: [] },\n { type: \"error\", name: \"InvalidThreshold\", inputs: [] },\n {\n type: \"error\",\n name: \"NotContractCaller\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"NotImplemented\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" }\n ]\n },\n { type: \"error\", name: \"NotInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"OwnerDoesNotExist\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }]\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/signer.js\n var multisigSignMethods;\n var init_signer3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_plugin2();\n multisigSignMethods = ({ client, accountAddress, signer, threshold, pluginAddress = MultisigPlugin.meta.addresses[client.chain.id] }) => {\n const get712Wrapper = async (msg) => {\n const [, name, version7, chainId, verifyingContract, salt] = await client.readContract({\n abi: MultisigPluginAbi,\n address: pluginAddress,\n functionName: \"eip712Domain\",\n account: accountAddress\n });\n return {\n domain: {\n chainId: Number(chainId),\n name,\n salt,\n verifyingContract,\n version: version7\n },\n types: {\n AlchemyMultisigMessage: [{ name: \"message\", type: \"bytes\" }]\n },\n message: {\n message: msg\n },\n primaryType: \"AlchemyMultisigMessage\"\n };\n };\n const prepareSign = async (params) => {\n const messageHash = params.type === \"personal_sign\" ? hashMessage(params.data) : hashTypedData(params.data);\n return {\n type: \"eth_signTypedData_v4\",\n data: await get712Wrapper(messageHash)\n };\n };\n const formatSign = async (signature) => {\n return signature;\n };\n return {\n prepareSign,\n formatSign,\n getDummySignature: async () => {\n const [, thresholdRead] = await client.readContract({\n abi: MultisigPluginAbi,\n address: pluginAddress,\n functionName: \"ownershipInfoOf\",\n args: [accountAddress]\n });\n const actualThreshold = thresholdRead === 0n ? threshold : thresholdRead;\n return \"0x\" + \"FF\".repeat(32 * 3) + \"fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa3c\" + \"fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\".repeat(Number(actualThreshold) - 1);\n },\n signUserOperationHash: (uoHash) => {\n return signer().signMessage({ raw: uoHash });\n },\n async signMessage({ message: message2 }) {\n const { type, data } = await prepareSign({\n type: \"personal_sign\",\n data: message2\n });\n return type === \"personal_sign\" ? signer().signMessage(data) : signer().signTypedData(data);\n },\n signTypedData: async (typedDataDefinition) => {\n const { type, data } = await prepareSign({\n type: \"eth_signTypedData_v4\",\n data: typedDataDefinition\n });\n return type === \"personal_sign\" ? signer().signMessage(data) : signer().signTypedData(data);\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/multisigAccount.js\n async function createMultisigModularAccount(config2) {\n const { transport, chain: chain2, signer, accountAddress: accountAddress_, initCode, entryPoint = getEntryPoint(chain2, { version: \"0.6.0\" }), factoryAddress = getDefaultMultisigModularAccountFactoryAddress(chain2), owners = [], salt = 0n, threshold } = config2;\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const getAccountInitCode = async () => {\n if (initCode) {\n return initCode;\n }\n const sigAddress = await signer.getAddress();\n const sigs_ = Array.from(/* @__PURE__ */ new Set([...owners, sigAddress])).filter((x4) => hexToBigInt(x4) !== 0n).sort((a3, b4) => {\n const bigintA = hexToBigInt(a3);\n const bigintB = hexToBigInt(b4);\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n });\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: MultisigModularAccountFactoryAbi,\n functionName: \"createAccount\",\n args: [salt, sigs_, threshold]\n })\n ]);\n };\n const accountAddress = await getAccountAddress({\n client,\n entryPoint,\n accountAddress: accountAddress_,\n getAccountInitCode\n });\n const baseAccount = await toSmartContractAccount({\n transport,\n chain: chain2,\n entryPoint,\n accountAddress,\n source: MULTISIG_ACCOUNT_SOURCE,\n getAccountInitCode,\n ...standardExecutor,\n ...multisigSignMethods({\n client,\n accountAddress,\n threshold,\n signer: () => signer\n })\n });\n return {\n ...baseAccount,\n getLocalThreshold: () => threshold,\n publicKey: await signer.getAddress(),\n getSigner: () => signer\n };\n }\n var MULTISIG_ACCOUNT_SOURCE, isMultisigModularAccount;\n var init_multisigAccount = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/account/multisigAccount.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_MultisigModularAccountFactory();\n init_signer3();\n init_utils12();\n init_standardExecutor();\n MULTISIG_ACCOUNT_SOURCE = \"MultisigModularAccount\";\n isMultisigModularAccount = (acct) => {\n return acct.source === MULTISIG_ACCOUNT_SOURCE;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/alchemyClient.js\n async function createModularAccountAlchemyClient(config2) {\n return createMultiOwnerModularAccountClient(config2);\n }\n var init_alchemyClient2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/alchemyClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_src();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/installPlugin.js\n async function installPlugin(client, { overrides, context: context2, account = client.account, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"installPlugin\", client);\n }\n const callData = await encodeInstallPluginUserOperation(client, params);\n return client.sendUserOperation({\n uo: callData,\n overrides,\n account,\n context: context2\n });\n }\n async function encodeInstallPluginUserOperation(client, params) {\n const pluginManifest = await client.readContract({\n abi: IPluginAbi,\n address: params.pluginAddress,\n functionName: \"pluginManifest\"\n });\n const manifestHash = params.manifestHash ?? keccak256(encodeFunctionResult({\n abi: IPluginAbi,\n functionName: \"pluginManifest\",\n result: pluginManifest\n }));\n return encodeFunctionData({\n abi: IPluginManagerAbi,\n functionName: \"installPlugin\",\n args: [\n params.pluginAddress,\n manifestHash,\n params.pluginInitData ?? \"0x\",\n params.dependencies ?? []\n ]\n });\n }\n var init_installPlugin = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/installPlugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_IPlugin();\n init_IPluginManager();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/uninstallPlugin.js\n async function uninstallPlugin(client, { overrides, account = client.account, context: context2, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"uninstallPlugin\", client);\n }\n const callData = await encodeUninstallPluginUserOperation(params);\n return client.sendUserOperation({\n uo: callData,\n overrides,\n account,\n context: context2\n });\n }\n async function encodeUninstallPluginUserOperation(params) {\n return encodeFunctionData({\n abi: IPluginManagerAbi,\n functionName: \"uninstallPlugin\",\n args: [\n params.pluginAddress,\n params.config ?? \"0x\",\n params.pluginUninstallData ?? \"0x\"\n ]\n });\n }\n var init_uninstallPlugin = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/uninstallPlugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_IPluginManager();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/decorator.js\n function pluginManagerActions(client) {\n return {\n installPlugin: async (params) => installPlugin(client, params),\n uninstallPlugin: async (params) => uninstallPlugin(client, params)\n };\n }\n var init_decorator2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugin-manager/decorator.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_installPlugin();\n init_uninstallPlugin();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/extension.js\n var multiOwnerPluginActions2;\n var init_extension = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/extension.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin();\n multiOwnerPluginActions2 = (client) => ({\n ...multiOwnerPluginActions(client),\n async readOwners(args) {\n const account = args?.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const contract = MultiOwnerPlugin.getContract(client, args?.pluginAddress);\n return contract.read.ownersOf([account.address]);\n },\n async isOwnerOf(args) {\n const account = args.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const contract = MultiOwnerPlugin.getContract(client, args.pluginAddress);\n return contract.read.isOwnerOf([account.address, args.address]);\n }\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/index.js\n var init_multi_owner = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multi-owner/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_extension();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/errors.js\n var InvalidAggregatedSignatureError, InvalidContextSignatureError, MultisigAccountExpectedError, MultisigMissingSignatureError;\n var init_errors7 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n InvalidAggregatedSignatureError = class extends BaseError4 {\n constructor() {\n super(\"Invalid aggregated signature\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidAggregatedSignatureError\"\n });\n }\n };\n InvalidContextSignatureError = class extends BaseError4 {\n constructor() {\n super(\"Expected context.signature to be a hex string\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"InvalidContextSignatureError\"\n });\n }\n };\n MultisigAccountExpectedError = class extends BaseError4 {\n constructor() {\n super(\"Expected account to be a multisig modular account\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"MultisigAccountExpectedError\"\n });\n }\n };\n MultisigMissingSignatureError = class extends BaseError4 {\n constructor() {\n super(\"UserOp must have at least one signature already\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"MultisigMissingSignatureError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/getThreshold.js\n async function getThreshold(client, args) {\n const account = args.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isMultisigModularAccount(account)) {\n throw new MultisigAccountExpectedError();\n }\n const [, threshold] = await MultisigPlugin.getContract(client, args.pluginAddress).read.ownershipInfoOf([account.address]);\n return threshold === 0n ? account.getLocalThreshold() : threshold;\n }\n var init_getThreshold = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/getThreshold.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_multisigAccount();\n init_plugin2();\n init_errors7();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/isOwnerOf.js\n async function isOwnerOf(client, args) {\n const account = args.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const contract = MultisigPlugin.getContract(client, args.pluginAddress);\n return await contract.read.isOwnerOf([account.address, args.address]);\n }\n var init_isOwnerOf = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/isOwnerOf.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/splitAggregatedSignature.js\n var splitAggregatedSignature;\n var init_splitAggregatedSignature = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/splitAggregatedSignature.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_errors7();\n splitAggregatedSignature = async (args) => {\n const { aggregatedSignature, threshold, account, request } = args;\n if (aggregatedSignature.length < 192 + (65 * threshold - 1)) {\n throw new InvalidAggregatedSignatureError();\n }\n const pvg = takeBytes(aggregatedSignature, { count: 32 });\n const maxFeePerGas = takeBytes(aggregatedSignature, {\n count: 32,\n offset: 32\n });\n const maxPriorityFeePerGas = takeBytes(aggregatedSignature, {\n count: 32,\n offset: 64\n });\n const signaturesAndData = takeBytes(aggregatedSignature, {\n offset: 96\n });\n const signatureHexes = (() => {\n const signatureStr = takeBytes(signaturesAndData, {\n count: 65 * threshold - 1\n });\n const signatures2 = [];\n for (let i3 = 0; i3 < threshold - 1; i3++) {\n signatures2.push(takeBytes(signatureStr, { count: 65, offset: i3 * 65 }));\n }\n return signatures2;\n })();\n const signatures = signatureHexes.map(async (signature) => {\n const v2 = BigInt(takeBytes(signature, { count: 1, offset: 64 }));\n const signerType = v2 === 0n ? \"CONTRACT\" : \"EOA\";\n if (signerType === \"EOA\") {\n const hash3 = hashMessage({\n raw: account.getEntryPoint().getUserOperationHash({\n ...request,\n preVerificationGas: pvg,\n maxFeePerGas,\n maxPriorityFeePerGas\n })\n });\n return {\n // the signer doesn't get used here for EOAs\n // TODO: nope. this needs to actually do an ec recover\n signer: await recoverAddress({ hash: hash3, signature }),\n signature,\n signerType,\n userOpSigType: \"UPPERLIMIT\"\n };\n }\n const signer = takeBytes(signature, { count: 20, offset: 12 });\n const offset = fromHex(takeBytes(signature, { count: 32, offset: 32 }), \"number\");\n const signatureLength = fromHex(takeBytes(signaturesAndData, { count: 32, offset }), \"number\");\n return {\n signer,\n signerType,\n userOpSigType: \"UPPERLIMIT\",\n signature: takeBytes(signaturesAndData, {\n count: signatureLength,\n offset: offset + 32\n })\n };\n });\n return {\n upperLimitPvg: pvg,\n upperLimitMaxFeePerGas: maxFeePerGas,\n upperLimitMaxPriorityFeePerGas: maxPriorityFeePerGas,\n signatures: await Promise.all(signatures)\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/proposeUserOperation.js\n async function proposeUserOperation(client, { uo, account = client.account, overrides: overrides_ }) {\n const overrides = {\n maxFeePerGas: { multiplier: 3 },\n maxPriorityFeePerGas: { multiplier: 2 },\n preVerificationGas: { multiplier: 1e3 },\n ...overrides_\n };\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"proposeUserOperation\", client);\n }\n if (!isSmartAccountWithSigner(account)) {\n throw new SmartAccountWithSignerRequiredError();\n }\n const builtUo = await client.buildUserOperation({\n account,\n uo,\n overrides\n });\n const request = await client.signUserOperation({\n uoStruct: builtUo,\n account,\n context: {\n userOpSignatureType: \"UPPERLIMIT\"\n }\n });\n const splitSignatures = await splitAggregatedSignature({\n request,\n aggregatedSignature: request.signature,\n account,\n // split works on the assumption that we have t - 1 signatures\n threshold: 2\n });\n return {\n request,\n signatureObj: splitSignatures.signatures[0],\n aggregatedSignature: request.signature\n };\n }\n var init_proposeUserOperation = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/proposeUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_splitAggregatedSignature();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/readOwners.js\n async function readOwners(client, args) {\n const account = args?.account ?? client.account;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n const [owners] = await MultisigPlugin.getContract(client, args?.pluginAddress).read.ownershipInfoOf([account.address]);\n return owners;\n }\n var init_readOwners = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/readOwners.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/formatSignatures.js\n var formatSignatures;\n var init_formatSignatures = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/formatSignatures.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n formatSignatures = (signatures, usingMaxValues = false) => {\n let eoaSigs = \"\";\n let contractSigs = \"\";\n let offset = BigInt(65 * signatures.length);\n signatures.sort((a3, b4) => {\n const bigintA = hexToBigInt(a3.signer);\n const bigintB = hexToBigInt(b4.signer);\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n }).forEach((sig) => {\n const addV = sig.userOpSigType === \"ACTUAL\" && !usingMaxValues ? 32 : 0;\n if (sig.signerType === \"EOA\") {\n let v2 = parseInt(takeBytes(sig.signature, { count: 1, offset: 64 })) + addV;\n eoaSigs += concat2([\n takeBytes(sig.signature, { count: 64 }),\n toHex(v2, { size: 1 })\n ]).slice(2);\n } else {\n const sigLen = BigInt(sig.signature.slice(2).length / 2);\n eoaSigs += concat2([\n pad(sig.signer),\n toHex(offset, { size: 32 }),\n toHex(addV, { size: 1 })\n ]).slice(2);\n contractSigs += concat2([\n toHex(sigLen, { size: 32 }),\n sig.signature\n ]).slice(2);\n offset += sigLen;\n }\n });\n return \"0x\" + eoaSigs + contractSigs;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/combineSignatures.js\n function combineSignatures({ signatures, upperLimitMaxFeePerGas, upperLimitMaxPriorityFeePerGas, upperLimitPvg, usingMaxValues }) {\n return concat2([\n pad(upperLimitPvg),\n pad(upperLimitMaxFeePerGas),\n pad(upperLimitMaxPriorityFeePerGas),\n formatSignatures(signatures, usingMaxValues)\n ]);\n }\n var init_combineSignatures = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/combineSignatures.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_formatSignatures();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/getSignerType.js\n var getSignerType;\n var init_getSignerType = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/getSignerType.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n getSignerType = async ({ client, signature, signer }) => {\n const signerAddress = await signer.getAddress();\n const byteCode = await client.getBytecode({ address: signerAddress });\n return (byteCode ?? \"0x\") === \"0x\" && size(signature) === 65 ? \"EOA\" : \"CONTRACT\";\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/index.js\n var init_utils13 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/utils/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_combineSignatures();\n init_formatSignatures();\n init_getSignerType();\n init_splitAggregatedSignature();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/signMultisigUserOperation.js\n async function signMultisigUserOperation(client, params) {\n const { account = client.account, signatures, userOperationRequest } = params;\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"signMultisigUserOperation\", client);\n }\n if (!isSmartAccountWithSigner(account)) {\n throw new SmartAccountWithSignerRequiredError();\n }\n if (!signatures.length) {\n throw new MultisigMissingSignatureError();\n }\n const signerAddress = await account.getSigner().getAddress();\n const signedRequest = await client.signUserOperation({\n account,\n uoStruct: userOperationRequest,\n context: {\n aggregatedSignature: combineSignatures({\n signatures,\n upperLimitMaxFeePerGas: userOperationRequest.maxFeePerGas,\n upperLimitMaxPriorityFeePerGas: userOperationRequest.maxPriorityFeePerGas,\n upperLimitPvg: userOperationRequest.preVerificationGas,\n usingMaxValues: false\n }),\n signatures,\n userOpSignatureType: \"UPPERLIMIT\"\n }\n });\n const splitSignatures = await splitAggregatedSignature({\n account,\n request: signedRequest,\n aggregatedSignature: signedRequest.signature,\n // split works on the assumption that we have t - 1 signatures\n // we have signatures.length + 1 signatures now, so we need sl + 1 + 1\n threshold: signatures.length + 2\n });\n const signatureObj = splitSignatures.signatures.find((x4) => x4.signer === signerAddress);\n if (!signatureObj) {\n throw new Error(\"INTERNAL ERROR: signature not found in split signatures, this is an internal bug please report\");\n }\n return {\n signatureObj,\n signature: signatureObj.signature,\n aggregatedSignature: signedRequest.signature\n };\n }\n var init_signMultisigUserOperation = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/actions/signMultisigUserOperation.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_errors7();\n init_utils13();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/extension.js\n var multisigPluginActions2;\n var init_extension2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/extension.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_getThreshold();\n init_isOwnerOf();\n init_proposeUserOperation();\n init_readOwners();\n init_signMultisigUserOperation();\n init_plugin2();\n multisigPluginActions2 = (client) => ({\n ...multisigPluginActions(client),\n readOwners: (args) => readOwners(client, args),\n isOwnerOf: (args) => isOwnerOf(client, args),\n getThreshold: (args) => getThreshold(client, args),\n proposeUserOperation: (args) => proposeUserOperation(client, args),\n signMultisigUserOperation: (params) => signMultisigUserOperation(client, params)\n });\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/middleware.js\n var multisigSignatureMiddleware, isUsingMaxValues;\n var init_middleware = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/middleware.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_multisigAccount();\n init_errors7();\n init_utils13();\n multisigSignatureMiddleware = async (struct, { account, client, context: context2 }) => {\n if (!context2) {\n throw new InvalidContextSignatureError();\n }\n if (!isSmartAccountWithSigner(account)) {\n throw new SmartAccountWithSignerRequiredError();\n }\n if (!isMultisigModularAccount(account)) {\n throw new MultisigAccountExpectedError();\n }\n const resolvedStruct = await resolveProperties(struct);\n const request = deepHexlify(resolvedStruct);\n if (!isValidRequest(request)) {\n throw new InvalidUserOperationError(resolvedStruct);\n }\n const signature = await account.signUserOperationHash(account.getEntryPoint().getUserOperationHash(request));\n const signerType = await getSignerType({\n client,\n signature,\n signer: account.getSigner()\n });\n if (context2?.signatures?.length == null && context2?.aggregatedSignature == null) {\n return {\n ...resolvedStruct,\n signature: combineSignatures({\n signatures: [\n {\n signature,\n signer: await account.getSigner().getAddress(),\n signerType,\n userOpSigType: context2.userOpSignatureType\n }\n ],\n upperLimitMaxFeePerGas: request.maxFeePerGas,\n upperLimitMaxPriorityFeePerGas: request.maxPriorityFeePerGas,\n upperLimitPvg: request.preVerificationGas,\n usingMaxValues: context2.userOpSignatureType === \"ACTUAL\"\n })\n };\n }\n if (context2.aggregatedSignature == null || context2.signatures == null) {\n throw new InvalidContextSignatureError();\n }\n const { upperLimitPvg, upperLimitMaxFeePerGas, upperLimitMaxPriorityFeePerGas } = await splitAggregatedSignature({\n aggregatedSignature: context2.aggregatedSignature,\n threshold: context2.signatures.length + 1,\n account,\n request\n });\n const finalSignature = combineSignatures({\n signatures: context2.signatures.concat({\n userOpSigType: context2.userOpSignatureType,\n signerType,\n signature,\n signer: await account.getSigner().getAddress()\n }),\n upperLimitPvg,\n upperLimitMaxFeePerGas,\n upperLimitMaxPriorityFeePerGas,\n usingMaxValues: isUsingMaxValues(request, {\n upperLimitPvg,\n upperLimitMaxFeePerGas,\n upperLimitMaxPriorityFeePerGas\n })\n });\n return {\n ...resolvedStruct,\n signature: finalSignature\n };\n };\n isUsingMaxValues = (request, upperLimits) => {\n if (BigInt(request.preVerificationGas) !== BigInt(upperLimits.upperLimitPvg)) {\n return false;\n }\n if (BigInt(request.maxFeePerGas) !== BigInt(upperLimits.upperLimitMaxFeePerGas)) {\n return false;\n }\n if (BigInt(request.maxPriorityFeePerGas) !== BigInt(upperLimits.upperLimitMaxPriorityFeePerGas)) {\n return false;\n }\n return true;\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/index.js\n var init_multisig = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/multisig/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_extension2();\n init_middleware();\n init_plugin2();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/client.js\n async function createMultiOwnerModularAccountClient({ transport, chain: chain2, ...params }) {\n const modularAccount = await createMultiOwnerModularAccount({\n ...params,\n transport,\n chain: chain2\n });\n if (isAlchemyTransport2(transport, chain2)) {\n const { opts } = params;\n return createAlchemySmartAccountClient2({\n ...params,\n account: modularAccount,\n transport,\n chain: chain2,\n opts\n }).extend(multiOwnerPluginActions2).extend(pluginManagerActions).extend(accountLoupeActions);\n }\n return createSmartAccountClient({\n ...params,\n transport,\n chain: chain2,\n account: modularAccount\n }).extend(pluginManagerActions).extend(multiOwnerPluginActions2).extend(accountLoupeActions);\n }\n async function createMultisigModularAccountClient({ transport, chain: chain2, ...params }) {\n const modularAccount = await createMultisigModularAccount({\n ...params,\n transport,\n chain: chain2\n });\n if (isAlchemyTransport2(transport, chain2)) {\n let config2 = {\n ...params,\n chain: chain2,\n transport\n };\n const { opts } = config2;\n return createAlchemySmartAccountClient2({\n ...config2,\n account: modularAccount,\n opts,\n signUserOperation: multisigSignatureMiddleware\n }).extend(smartAccountClientActions).extend(multisigPluginActions2).extend(pluginManagerActions).extend(accountLoupeActions);\n }\n const client = createSmartAccountClient({\n ...params,\n transport,\n chain: chain2,\n account: modularAccount,\n signUserOperation: multisigSignatureMiddleware\n }).extend(smartAccountClientActions).extend(pluginManagerActions).extend(multisigPluginActions2).extend(accountLoupeActions);\n return client;\n }\n var init_client3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/client.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_decorator();\n init_multiOwnerAccount();\n init_multisigAccount();\n init_decorator2();\n init_multi_owner();\n init_multisig();\n init_middleware();\n init_exports3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/multiSigAlchemyClient.js\n async function createMultisigAccountAlchemyClient(config2) {\n return createMultisigModularAccountClient(config2);\n }\n var init_multiSigAlchemyClient = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/client/multiSigAlchemyClient.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_src();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/plugin.js\n var addresses3, SessionKeyPlugin, sessionKeyPluginActions, SessionKeyPluginExecutionFunctionAbi, SessionKeyPluginAbi;\n var init_plugin3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/plugin.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_esm6();\n init_src();\n init_plugin();\n addresses3 = {\n 1: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 10: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 137: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 252: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 2523: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 8453: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 42161: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 80001: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 80002: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 84532: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 421614: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 7777777: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 11155111: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 11155420: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n 999999999: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\"\n };\n SessionKeyPlugin = {\n meta: {\n name: \"Session Key Plugin\",\n version: \"1.0.1\",\n addresses: addresses3\n },\n getContract: (client, address) => {\n if (!client.chain)\n throw new ChainNotFoundError2();\n return getContract({\n address: address || addresses3[client.chain.id],\n abi: SessionKeyPluginAbi,\n client\n });\n }\n };\n sessionKeyPluginActions = (client) => ({\n executeWithSessionKey({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"executeWithSessionKey\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"executeWithSessionKey\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n addSessionKey({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"addSessionKey\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"addSessionKey\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n removeSessionKey({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"removeSessionKey\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"removeSessionKey\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n rotateSessionKey({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"rotateSessionKey\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"rotateSessionKey\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n updateKeyPermissions({ args, overrides, context: context2, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"updateKeyPermissions\", client);\n }\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"updateKeyPermissions\",\n args\n });\n return client.sendUserOperation({ uo, overrides, account, context: context2 });\n },\n installSessionKeyPlugin({ account = client.account, overrides, context: context2, ...params }) {\n if (!account) {\n throw new AccountNotFoundError2();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\"SmartAccountClient\", \"installSessionKeyPlugin\", client);\n }\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const dependencies = params.dependencyOverrides ?? [\n (() => {\n const pluginAddress2 = MultiOwnerPlugin.meta.addresses[chain2.id];\n if (!pluginAddress2) {\n throw new Error(\"missing MultiOwnerPlugin address for chain \" + chain2.name);\n }\n return encodePacked([\"address\", \"uint8\"], [pluginAddress2, 0]);\n })(),\n (() => {\n const pluginAddress2 = MultiOwnerPlugin.meta.addresses[chain2.id];\n if (!pluginAddress2) {\n throw new Error(\"missing MultiOwnerPlugin address for chain \" + chain2.name);\n }\n return encodePacked([\"address\", \"uint8\"], [pluginAddress2, 1]);\n })()\n ];\n const pluginAddress = params.pluginAddress ?? SessionKeyPlugin.meta.addresses[chain2.id];\n if (!pluginAddress) {\n throw new Error(\"missing SessionKeyPlugin address for chain \" + chain2.name);\n }\n return installPlugin(client, {\n pluginAddress,\n pluginInitData: encodeAbiParameters([\n { type: \"address[]\", name: \"initialKeys\" },\n { type: \"bytes32[]\", name: \"tags\" },\n { type: \"bytes[][]\", name: \"initialPermissions\" }\n ], params.args),\n dependencies,\n overrides,\n account,\n context: context2\n });\n },\n encodeExecuteWithSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"executeWithSessionKey\",\n args\n });\n },\n encodeAddSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"addSessionKey\",\n args\n });\n },\n encodeRemoveSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"removeSessionKey\",\n args\n });\n },\n encodeRotateSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"rotateSessionKey\",\n args\n });\n },\n encodeUpdateKeyPermissions({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"updateKeyPermissions\",\n args\n });\n }\n });\n SessionKeyPluginExecutionFunctionAbi = [\n {\n type: \"function\",\n name: \"executeWithSessionKey\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"tag\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"permissionUpdates\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"removeSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"rotateSessionKey\",\n inputs: [\n { name: \"oldSessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"newSessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateKeyPermissions\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"updates\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n }\n ];\n SessionKeyPluginAbi = [\n {\n type: \"function\",\n name: \"addSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"tag\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"permissionUpdates\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeWithSessionKey\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"findPredecessor\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAccessControlEntry\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"contractAddress\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n { name: \"isOnList\", type: \"bool\", internalType: \"bool\" },\n { name: \"checkSelectors\", type: \"bool\", internalType: \"bool\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAccessControlType\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint8\",\n internalType: \"enum ISessionKeyPlugin.ContractAccessControlType\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getERC20SpendLimitInfo\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"token\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct ISessionKeyPlugin.SpendLimitInfo\",\n components: [\n { name: \"hasLimit\", type: \"bool\", internalType: \"bool\" },\n { name: \"limit\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"limitUsed\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"refreshInterval\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"lastUsedTime\", type: \"uint48\", internalType: \"uint48\" }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getGasSpendLimit\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n {\n name: \"info\",\n type: \"tuple\",\n internalType: \"struct ISessionKeyPlugin.SpendLimitInfo\",\n components: [\n { name: \"hasLimit\", type: \"bool\", internalType: \"bool\" },\n { name: \"limit\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"limitUsed\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"refreshInterval\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"lastUsedTime\", type: \"uint48\", internalType: \"uint48\" }\n ]\n },\n { name: \"shouldReset\", type: \"bool\", internalType: \"bool\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getKeyTimeRange\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n { name: \"validAfter\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"validUntil\", type: \"uint48\", internalType: \"uint48\" }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getNativeTokenSpendLimitInfo\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [\n {\n name: \"info\",\n type: \"tuple\",\n internalType: \"struct ISessionKeyPlugin.SpendLimitInfo\",\n components: [\n { name: \"hasLimit\", type: \"bool\", internalType: \"bool\" },\n { name: \"limit\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"limitUsed\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"refreshInterval\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"lastUsedTime\", type: \"uint48\", internalType: \"uint48\" }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getRequiredPaymaster\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isSelectorOnAccessControlList\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"contractAddress\", type: \"address\", internalType: \"address\" },\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" }\n ],\n outputs: [{ name: \"isOnList\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"isSessionKeyOf\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onInstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"onUninstall\",\n inputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"pluginManifest\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginManifest\",\n components: [\n { name: \"interfaceIds\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n {\n name: \"dependencyInterfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"executionFunctions\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permittedExecutionSelectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"permitAnyExternalAddress\",\n type: \"bool\",\n internalType: \"bool\"\n },\n { name: \"canSpendNativeToken\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permittedExternalCalls\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExternalCallPermission[]\",\n components: [\n {\n name: \"externalAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"permitAnySelector\", type: \"bool\", internalType: \"bool\" },\n { name: \"selectors\", type: \"bytes4[]\", internalType: \"bytes4[]\" }\n ]\n },\n {\n name: \"userOpValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"runtimeValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preUserOpValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"preExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n },\n {\n name: \"postExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\"\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"pluginMetadata\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginMetadata\",\n components: [\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"author\", type: \"string\", internalType: \"string\" },\n {\n name: \"permissionDescriptors\",\n type: \"tuple[]\",\n internalType: \"struct SelectorPermission[]\",\n components: [\n {\n name: \"functionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"permissionDescription\",\n type: \"string\",\n internalType: \"string\"\n }\n ]\n }\n ]\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"postExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"preExecHookData\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preRuntimeValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"preUserOpValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"removeSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"resetSessionKeyGasLimitTimestamp\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"rotateSessionKey\",\n inputs: [\n { name: \"oldSessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"newSessionKey\", type: \"address\", internalType: \"address\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"runtimeValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"sessionKeysOf\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"address[]\", internalType: \"address[]\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"updateKeyPermissions\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"updates\", type: \"bytes[]\", internalType: \"bytes[]\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"userOpValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" }\n ]\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" }\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"PermissionsUpdated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"sessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"updates\",\n type: \"bytes[]\",\n indexed: false,\n internalType: \"bytes[]\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"SessionKeyAdded\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"sessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n { name: \"tag\", type: \"bytes32\", indexed: true, internalType: \"bytes32\" }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"SessionKeyRemoved\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"sessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"SessionKeyRotated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"oldSessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newSessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"ERC20SpendLimitExceeded\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"token\", type: \"address\", internalType: \"address\" }\n ]\n },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidPermissionsUpdate\",\n inputs: [\n { name: \"updateSelector\", type: \"bytes4\", internalType: \"bytes4\" }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidSessionKey\",\n inputs: [{ name: \"sessionKey\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"InvalidSignature\",\n inputs: [{ name: \"sessionKey\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"InvalidToken\",\n inputs: [{ name: \"token\", type: \"address\", internalType: \"address\" }]\n },\n { type: \"error\", name: \"LengthMismatch\", inputs: [] },\n {\n type: \"error\",\n name: \"NativeTokenSpendLimitExceeded\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" }\n ]\n },\n {\n type: \"error\",\n name: \"NotContractCaller\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }]\n },\n {\n type: \"error\",\n name: \"NotImplemented\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" }\n ]\n },\n { type: \"error\", name: \"NotInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"SessionKeyNotFound\",\n inputs: [{ name: \"sessionKey\", type: \"address\", internalType: \"address\" }]\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/utils.js\n async function buildSessionKeysToRemoveStruct(client, args) {\n const { keys, pluginAddress, account = client.account } = args;\n if (!account)\n throw new AccountNotFoundError2();\n const contract = SessionKeyPlugin.getContract(client, pluginAddress);\n return (await Promise.all(keys.map(async (key) => {\n return [\n key,\n await contract.read.findPredecessor([account.address, key])\n ];\n }))).map(([key, predecessor]) => ({\n sessionKey: key,\n predecessor\n }));\n }\n var init_utils14 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/debug-session-key-bytecode.js\n var debug_session_key_bytecode_exports = {};\n __export(debug_session_key_bytecode_exports, {\n DEBUG_SESSION_KEY_BYTECODE: () => DEBUG_SESSION_KEY_BYTECODE\n });\n var DEBUG_SESSION_KEY_BYTECODE;\n var init_debug_session_key_bytecode = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/debug-session-key-bytecode.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n DEBUG_SESSION_KEY_BYTECODE = \"0x6040608081526004908136101561001557600080fd5b6000803560e01c806331d99c2c146100975763af8734831461003657600080fd5b34610090576003196060368201126100935783359160ff83168303610090576024359167ffffffffffffffff831161009357610160908336030112610090575092610089916020946044359201906106ed565b9051908152f35b80fd5b5080fd5b50823461009357826003193601126100935767ffffffffffffffff81358181116105255736602382011215610525578083013590828211610521576024926024820191602436918560051b01011161051d576001600160a01b0394602435868116810361051957604080516080810182526060808252336020830190815263068076b960e21b938301939093526001600160a01b039093169083015220548761016f8233606091826040516001600160a01b03602082019460808301604052838352168452630b5ff94b60e11b604082015201522090565b91895b87811061045d57505060ff825460781c16156103ef575b5080549060ff8260801c166103b6575b50506101a88497959894610584565b956101b58551978861054c565b8787526101c188610584565b98602098601f19809b01885b8181106103a7575050875b818110610256575050505050505080519380850191818652845180935281818701918460051b880101950193965b8388106102135786860387f35b9091929394838080600193603f198b820301875285601f8b5161024181518092818752878088019101610529565b01160101970193019701969093929193610206565b6102668183899e9b9d9a9e61059c565b803585811680910361039557908c8a928f898e610285838701876105d9565b9790935196879586947f38997b1100000000000000000000000000000000000000000000000000000000865285015201358a83015260606044830152866064830152866084938484013784838884010152601f80970116810103018183335af191821561039d578d9261031a575b505090600191610303828d610628565b5261030e818c610628565b50019a9699979a6101d8565b9091503d808e843e61032c818461054c565b8201918a818403126103915780519089821161039957019081018213156103955790818e92519161036861035f8461060c565b9451948561054c565b8284528b8383010111610391578291610389918c8060019796019101610529565b90918e6102f3565b8d80fd5b8c80fd5b8e80fd5b8e513d8f823e3d90fd5b60608b82018d01528b016101cd565b70ff00000000000000000000000000000000199091168155600101805465ffffffffffff19164265ffffffffffff161790558880610199565b6104029060068301906002840190611191565b1561040d5789610189565b610459828a5191829162461bcd60e51b8352820160609060208152601460208201527f5370656e64206c696d697420657863656564656400000000000000000000000060408201520190565b0390fd5b6104713661046c838b8b61059c565b610673565b926104826020918286015190611042565b938d6104928d83511686336110b0565b9160ff835460101c166104ac575b50505050600101610172565b6104ca92916104bc910151611146565b600160028301920190611191565b156104d757808d816104a0565b85601a8b8f93606494519362461bcd60e51b85528401528201527f4552433230207370656e64206c696d69742065786365656465640000000000006044820152fd5b8780fd5b8580fd5b8480fd5b8380fd5b60005b83811061053c5750506000910152565b818101518382015260200161052c565b90601f8019910116810190811067ffffffffffffffff82111761056e57604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff811161056e5760051b60200190565b91908110156105c35760051b81013590605e19813603018212156105be570190565b600080fd5b634e487b7160e01b600052603260045260246000fd5b903590601e19813603018212156105be570180359067ffffffffffffffff82116105be576020019181360383136105be57565b67ffffffffffffffff811161056e57601f01601f191660200190565b80518210156105c35760209160051b010190565b9291926106488261060c565b91610656604051938461054c565b8294818452818301116105be578281602093846000960137010152565b91906060838203126105be576040519067ffffffffffffffff606083018181118482101761056e57604052829480356001600160a01b03811681036105be5784526020810135602085015260408101359182116105be570181601f820112156105be576040918160206106e89335910161063c565b910152565b60ff161561073957606460405162461bcd60e51b815260206004820152602060248201527f57726f6e672066756e6374696f6e20696420666f722076616c69646174696f6e6044820152fd5b61074660608201826105d9565b806004949294116105be57830192604081850360031901126105be5767ffffffffffffffff9360048201358581116105be57820194816023870112156105be5760048601359561079587610584565b966107a3604051988961054c565b8088526024602089019160051b830101928484116105be5760248301915b84831061101b5750505050505060240135906001600160a01b03821682036105be577f19457468657265756d205369676e6564204d6573736167653a0a333200000000600052601c52610830603c60002061082a6108236101408601866105d9565b369161063c565b90611065565b600581101561100557610f9c5760806040513381527ff938c976000000000000000000000000000000000000000000000000000000006020820152600160408201526bffffffffffffffffffffffff198460601b166060820152205415610f5857604080516080810182526060808252336020830190815263068076b960e21b938301939093526001600160a01b03851691810191909152902054926109058433606091826040516001600160a01b03602082019460808301604052838352168452630b5ff94b60e11b604082015201522090565b9081549465ffffffffffff8660081c16966000918151918215610f145760005b838110610ed2575050505060ff8660781c1615610d50575b5060ff8560701c16610aa8575b60ff825460681c166109db575b50506001600160a01b039182169116036109a85765ffffffffffff60a01b7fffffffffffff00000000000000000000000000000000000000000000000000006000935b60d01b169160681b16171790565b65ffffffffffff60a01b7fffffffffffff000000000000000000000000000000000000000000000000000060019361099a565b806101206109ea9201906105d9565b6bffffffffffffffffffffffff199135918216929160148210610a6c575b505060036001600160a01b03910154169060601c03610a28573880610957565b606460405162461bcd60e51b815260206004820152601b60248201527f4d75737420757365207265717569726564207061796d617374657200000000006044820152fd5b6001600160a01b03929350906003916bffffffffffffffffffffffff19916bffffffffffffffffffffffff1990601403841b1b16169291610a08565b946001600160a01b038416602087013560401c03610cc057610ace6101208701876105d9565b159050610cab57610b11610b06610afb610af160ff60035b1660a08b013561109d565b60808a0135611042565b60c089013590611042565b60e08801359061109d565b9060009060018401546005850154906004860154908583810110610c675765ffffffffffff8160301c1615600014610ba6575081850111610b6157610b5b9301600585015561154f565b9461094a565b60405162461bcd60e51b815260206004820152601260248201527f476173206c696d697420657863656564656400000000000000000000000000006044820152606490fd5b92935093848282011115600014610bf657610b5b945001600585015560ff8760801c16600014610bee578065ffffffffffff80610be89360301c169116611177565b9061154f565b506000610be8565b809392949150111580610c59575b15610b6157610c248365ffffffffffff80610b5b9660301c169116611177565b9170010000000000000000000000000000000070ff00000000000000000000000000000000198916178555600585015561154f565b5060ff8760801c1615610c04565b606460405162461bcd60e51b815260206004820152601260248201527f476173206c696d6974206f766572666c6f7700000000000000000000000000006044820152fd5b610b11610b06610afb610af160ff6001610ae6565b60a460405162461bcd60e51b815260206004820152604f60248201527f4d757374207573652073657373696f6e206b6579206173206b657920706f727460448201527f696f6e206f66206e6f6e6365207768656e20676173206c696d6974206368656360648201527f6b696e6720697320656e61626c656400000000000000000000000000000000006084820152fd5b6000969196906002840154906007850154906006860154928183810110610e8e5765ffffffffffff8160301c1615600014610de157500111610d9c57610d959161154f565b943861093d565b60405162461bcd60e51b815260206004820152601460248201527f5370656e64206c696d69742065786365656465640000000000000000000000006044820152606490fd5b94928092820111610df9575b5050610d95925061154f565b91925010610e2457610e1c8265ffffffffffff80610d959560301c169116611177565b903880610ded565b608460405162461bcd60e51b815260206004820152603260248201527f5370656e64206c696d69742065786365656465642c206576656e20696e636c7560448201527f64696e67206e65787420696e74657276616c00000000000000000000000000006064820152fd5b606460405162461bcd60e51b815260206004820152601460248201527f5370656e64206c696d6974206f766572666c6f770000000000000000000000006044820152fd5b80610f0e8b610ef3610ee660019587610628565b519860208a015190611042565b978660ff60406001600160a01b0384511693015193166112bf565b01610925565b606460405162461bcd60e51b815260206004820152601b60248201527f4d7573742068617665206174206c65617374206f6e652063616c6c00000000006044820152fd5b606460405162461bcd60e51b815260206004820152601360248201527f556e6b6e6f776e2073657373696f6e206b6579000000000000000000000000006044820152fd5b608460405162461bcd60e51b8152602060048201526024808201527f5369676e617475726520646f6573206e6f74206d617463682073657373696f6e60448201527f206b6579000000000000000000000000000000000000000000000000000000006064820152fd5b634e487b7160e01b600052602160045260246000fd5b82358281116105be576020916110378860248594890101610673565b8152019201916107c1565b9190820180921161104f57565b634e487b7160e01b600052601160045260246000fd5b9060418151146000146110935761108f916020820151906060604084015193015160001a90611230565b9091565b5050600090600290565b8181029291811591840414171561104f57565b9061111192916040519260a08401604052608084526001600160a01b0380921660208501527f634c29f50000000000000000000000000000000000000000000000000000000060408501521690606083015260808201526020815191012090565b90565b90602082519201516001600160e01b031990818116936004811061113757505050565b60040360031b82901b16169150565b61115761115282611114565b61156c565b6111615750600090565b6044815110611171576044015190565b50600090565b91909165ffffffffffff8080941691160191821161104f57565b9181549165ffffffffffff90818460301c169160018454940194855493828115928315611218575b5050506000146111ee57505083019283109081156111e4575b506111dd5755600190565b5050600090565b90508211386111d2565b9391509391821161120f5755421665ffffffffffff19825416179055600190565b50505050600090565b611223935016611177565b81429116113882816111b9565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116112b35791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa156112a65781516001600160a01b038116156112a0579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b91926112ca90611114565b926112d68183336110b0565b926003811015611005578061147d5750825460ff8116156114395760081c60ff1615611433578361130a9160ff93336115cb565b5416156113c95760ff905b5460101c1690816113b8575b5061132857565b60a460405162461bcd60e51b815260206004820152604460248201527f46756e6374696f6e2073656c6563746f72206e6f7420616c6c6f77656420666f60448201527f7220455243323020636f6e74726163742077697468207370656e64696e67206c60648201527f696d6974000000000000000000000000000000000000000000000000000000006084820152fd5b6113c2915061156c565b1538611321565b608460405162461bcd60e51b815260206004820152602260248201527f46756e6374696f6e2073656c6563746f72206e6f74206f6e20616c6c6f776c6960448201527f73740000000000000000000000000000000000000000000000000000000000006064820152fd5b50505050565b606460405162461bcd60e51b815260206004820152601f60248201527f5461726765742061646472657373206e6f74206f6e20616c6c6f776c697374006044820152fd5b60011461148f575b505060ff90611315565b825460ff8116156115485760081c60ff161561150457836114b39160ff93336115cb565b54166114c0573880611485565b606460405162461bcd60e51b815260206004820152601d60248201527f46756e6374696f6e2073656c6563746f72206f6e2064656e796c6973740000006044820152fd5b606460405162461bcd60e51b815260206004820152601a60248201527f5461726765742061646472657373206f6e2064656e796c6973740000000000006044820152fd5b5050505050565b9065ffffffffffff8082169083161115611567575090565b905090565b6001600160e01b0319167fa9059cbb0000000000000000000000000000000000000000000000000000000081149081156115a4575090565b7f095ea7b30000000000000000000000000000000000000000000000000000000091501490565b926001600160e01b0319611111946040519460a08601604052608086526001600160a01b0380921660208701527fd50536f0000000000000000000000000000000000000000000000000000000006040870152169116179060608301526080820152602081519101209056fea26469706673582212201c78177154c86c4d5ed4f532b4017a1d665037d4831a7cd69e8e8bd8408ab3e764736f6c63430008160033\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/extension.js\n function getRpcErrorMessageFromViemError(error) {\n const details = error?.details;\n return typeof details === \"string\" ? details : void 0;\n }\n var sessionKeyPluginActions2, SessionKeyPermissionError;\n var init_extension3 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/extension.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_plugin3();\n init_utils14();\n sessionKeyPluginActions2 = (client) => {\n const { removeSessionKey, addSessionKey, rotateSessionKey, updateKeyPermissions, executeWithSessionKey, ...og } = sessionKeyPluginActions(client);\n const fixedExecuteWithSessionKey = async (...originalArgs) => {\n let initialError;\n try {\n return await executeWithSessionKey(...originalArgs);\n } catch (error) {\n initialError = error;\n }\n const details = getRpcErrorMessageFromViemError(initialError);\n if (!details?.includes(\"AA23 reverted (or OOG)\")) {\n throw initialError;\n }\n if (!isSmartAccountClient(client) || !client.chain) {\n throw initialError;\n }\n const { args, overrides, context: context2, account = client.account } = originalArgs[0];\n if (!account) {\n throw initialError;\n }\n const data = og.encodeExecuteWithSessionKey({ args });\n const sessionKeyPluginAddress = SessionKeyPlugin.meta.addresses[client.chain.id];\n const { DEBUG_SESSION_KEY_BYTECODE: DEBUG_SESSION_KEY_BYTECODE2 } = await Promise.resolve().then(() => (init_debug_session_key_bytecode(), debug_session_key_bytecode_exports));\n const updatedOverrides = {\n ...overrides,\n stateOverride: [\n ...overrides?.stateOverride ?? [],\n {\n address: sessionKeyPluginAddress,\n code: DEBUG_SESSION_KEY_BYTECODE2\n }\n ]\n };\n try {\n await client.buildUserOperation({\n uo: data,\n overrides: updatedOverrides,\n context: context2,\n account\n });\n throw initialError;\n } catch (improvedError) {\n const details2 = getRpcErrorMessageFromViemError(improvedError) ?? \"\";\n const reason = details2.match(/AA23 reverted: (.+)/)?.[1];\n if (!reason) {\n throw initialError;\n }\n throw new SessionKeyPermissionError(reason);\n }\n };\n return {\n ...og,\n executeWithSessionKey: fixedExecuteWithSessionKey,\n isAccountSessionKey: async ({ key, pluginAddress, account = client.account }) => {\n if (!account)\n throw new AccountNotFoundError2();\n const contract = SessionKeyPlugin.getContract(client, pluginAddress);\n return await contract.read.isSessionKeyOf([account.address, key]);\n },\n getAccountSessionKeys: async (args) => {\n const account = args?.account ?? client.account;\n if (!account)\n throw new AccountNotFoundError2();\n const contract = SessionKeyPlugin.getContract(client, args?.pluginAddress);\n return await contract.read.sessionKeysOf([account.address]);\n },\n removeSessionKey: async ({ key, overrides, account = client.account, pluginAddress }) => {\n if (!account)\n throw new AccountNotFoundError2();\n const sessionKeysToRemove = await buildSessionKeysToRemoveStruct(client, {\n keys: [key],\n account,\n pluginAddress\n });\n return removeSessionKey({\n args: [key, sessionKeysToRemove[0].predecessor],\n overrides,\n account\n });\n },\n addSessionKey: async ({ key, tag, permissions, overrides, pluginAddress, account = client.account }) => {\n if (!account)\n throw new AccountNotFoundError2();\n return addSessionKey({\n args: [key, tag, permissions],\n overrides,\n account,\n pluginAddress\n });\n },\n rotateSessionKey: async ({ newKey, oldKey, overrides, pluginAddress, account = client.account }) => {\n if (!account)\n throw new AccountNotFoundError2();\n const contract = SessionKeyPlugin.getContract(client, pluginAddress);\n const predecessor = await contract.read.findPredecessor([\n account.address,\n oldKey\n ]);\n return rotateSessionKey({\n args: [oldKey, predecessor, newKey],\n overrides,\n account,\n pluginAddress\n });\n },\n updateSessionKeyPermissions: async ({ key, permissions, overrides, pluginAddress, account = client.account }) => {\n if (!account)\n throw new AccountNotFoundError2();\n return updateKeyPermissions({\n args: [key, permissions],\n overrides,\n account,\n pluginAddress\n });\n }\n };\n };\n SessionKeyPermissionError = class extends Error {\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/SessionKeyPermissionsUpdatesAbi.js\n var SessionKeyPermissionsUpdatesAbi;\n var init_SessionKeyPermissionsUpdatesAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/SessionKeyPermissionsUpdatesAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n SessionKeyPermissionsUpdatesAbi = [\n {\n type: \"function\",\n name: \"setAccessListType\",\n inputs: [\n {\n name: \"contractAccessControlType\",\n type: \"uint8\",\n internalType: \"enum ISessionKeyPlugin.ContractAccessControlType\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setERC20SpendLimit\",\n inputs: [\n { name: \"token\", type: \"address\", internalType: \"address\" },\n { name: \"spendLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"refreshInterval\",\n type: \"uint48\",\n internalType: \"uint48\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setGasSpendLimit\",\n inputs: [\n { name: \"spendLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"refreshInterval\",\n type: \"uint48\",\n internalType: \"uint48\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setNativeTokenSpendLimit\",\n inputs: [\n { name: \"spendLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"refreshInterval\",\n type: \"uint48\",\n internalType: \"uint48\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"setRequiredPaymaster\",\n inputs: [\n {\n name: \"requiredPaymaster\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateAccessListAddressEntry\",\n inputs: [\n {\n name: \"contractAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"isOnList\", type: \"bool\", internalType: \"bool\" },\n { name: \"checkSelectors\", type: \"bool\", internalType: \"bool\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateAccessListFunctionEntry\",\n inputs: [\n {\n name: \"contractAddress\",\n type: \"address\",\n internalType: \"address\"\n },\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"isOnList\", type: \"bool\", internalType: \"bool\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateTimeRange\",\n inputs: [\n { name: \"validAfter\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"validUntil\", type: \"uint48\", internalType: \"uint48\" }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/permissions.js\n var SessionKeyAccessListType, SessionKeyPermissionsBuilder;\n var init_permissions = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/permissions.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_SessionKeyPermissionsUpdatesAbi();\n (function(SessionKeyAccessListType2) {\n SessionKeyAccessListType2[SessionKeyAccessListType2[\"ALLOWLIST\"] = 0] = \"ALLOWLIST\";\n SessionKeyAccessListType2[SessionKeyAccessListType2[\"DENYLIST\"] = 1] = \"DENYLIST\";\n SessionKeyAccessListType2[SessionKeyAccessListType2[\"ALLOW_ALL_ACCESS\"] = 2] = \"ALLOW_ALL_ACCESS\";\n })(SessionKeyAccessListType || (SessionKeyAccessListType = {}));\n SessionKeyPermissionsBuilder = class {\n constructor() {\n Object.defineProperty(this, \"_contractAccessControlType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: SessionKeyAccessListType.ALLOWLIST\n });\n Object.defineProperty(this, \"_contractAddressAccessEntrys\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object.defineProperty(this, \"_contractMethodAccessEntrys\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object.defineProperty(this, \"_timeRange\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_nativeTokenSpendLimit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_erc20TokenSpendLimits\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object.defineProperty(this, \"_gasSpendLimit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_requiredPaymaster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n }\n /**\n * Sets the access control type for the contract and returns the current instance for method chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setContractAccessControlType(SessionKeyAccessListType.ALLOWLIST);\n * ```\n *\n * @param {SessionKeyAccessListType} aclType The access control type for the session key\n * @returns {SessionKeyPermissionsBuilder} The current instance for method chaining\n */\n setContractAccessControlType(aclType) {\n this._contractAccessControlType = aclType;\n return this;\n }\n /**\n * Adds a contract access entry to the internal list of contract address access entries.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.addContractAddressAccessEntry({\n * contractAddress: \"0x1234\",\n * isOnList: true,\n * checkSelectors: true,\n * });\n * ```\n *\n * @param {ContractAccessEntry} entry the contract access entry to be added\n * @returns {SessionKeyPermissionsBuilder} the instance of the current class for chaining\n */\n addContractAddressAccessEntry(entry) {\n this._contractAddressAccessEntrys.push(entry);\n return this;\n }\n /**\n * Adds a contract method entry to the `_contractMethodAccessEntrys` array.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.addContractAddressAccessEntry({\n * contractAddress: \"0x1234\",\n * methodSelector: \"0x45678\",\n * isOnList: true,\n * });\n * ```\n *\n * @param {ContractMethodEntry} entry The contract method entry to be added\n * @returns {SessionKeyPermissionsBuilder} The instance of the class for method chaining\n */\n addContractFunctionAccessEntry(entry) {\n this._contractMethodAccessEntrys.push(entry);\n return this;\n }\n /**\n * Sets the time range for an object and returns the object itself for chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setTimeRange({\n * validFrom: Date.now(),\n * validUntil: Date.now() + (15 * 60 * 1000),\n * });\n * ```\n *\n * @param {TimeRange} timeRange The time range to be set\n * @returns {SessionKeyPermissionsBuilder} The current object for method chaining\n */\n setTimeRange(timeRange) {\n this._timeRange = timeRange;\n return this;\n }\n /**\n * Sets the native token spend limit and returns the instance for chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setNativeTokenSpendLimit({\n * spendLimit: 1000000000000000000n,\n * refreshInterval: 3600,\n * });\n * ```\n *\n * @param {NativeTokenLimit} limit The limit to set for native token spending\n * @returns {SessionKeyPermissionsBuilder} The instance for chaining\n */\n setNativeTokenSpendLimit(limit) {\n this._nativeTokenSpendLimit = limit;\n return this;\n }\n /**\n * Adds an ERC20 token spend limit to the list of limits and returns the updated object.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.addErc20TokenSpendLimit({\n * tokenAddress: \"0x1234\",\n * spendLimit: 1000000000000000000n,\n * refreshInterval: 3600,\n * });\n * ```\n *\n * @param {Erc20TokenLimit} limit The ERC20 token spend limit to be added\n * @returns {object} The updated object with the new ERC20 token spend limit\n */\n addErc20TokenSpendLimit(limit) {\n this._erc20TokenSpendLimits.push(limit);\n return this;\n }\n /**\n * Sets the gas spend limit and returns the current instance for method chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setGasSpendLimit({\n * spendLimit: 1000000000000000000n,\n * refreshInterval: 3600,\n * });\n * ```\n *\n * @param {GasSpendLimit} limit - The gas spend limit to be set\n * @returns {SessionKeyPermissionsBuilder} The current instance for chaining\n */\n setGasSpendLimit(limit) {\n this._gasSpendLimit = limit;\n return this;\n }\n /**\n * Sets the required paymaster address.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setRequiredPaymaster(\"0x1234\");\n * ```\n *\n * @param {Address} paymaster the address of the paymaster to be set\n * @returns {SessionKeyPermissionsBuilder} the current instance for method chaining\n */\n setRequiredPaymaster(paymaster) {\n this._requiredPaymaster = paymaster;\n return this;\n }\n /**\n * Encodes various function calls into an array of hexadecimal strings based on the provided permissions and limits.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setRequiredPaymaster(\"0x1234\");\n * const encoded = builder.encode();\n * ```\n *\n * @returns {Hex[]} An array of encoded hexadecimal strings representing the function calls for setting access control, permissions, and limits.\n */\n encode() {\n return [\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setAccessListType\",\n args: [this._contractAccessControlType]\n }),\n ...this._contractAddressAccessEntrys.map((entry) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"updateAccessListAddressEntry\",\n args: [entry.contractAddress, entry.isOnList, entry.checkSelectors]\n })),\n ...this._contractMethodAccessEntrys.map((entry) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"updateAccessListFunctionEntry\",\n args: [entry.contractAddress, entry.methodSelector, entry.isOnList]\n })),\n this.encodeIfDefined((timeRange) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"updateTimeRange\",\n args: [timeRange.validFrom, timeRange.validUntil]\n }), this._timeRange),\n this.encodeIfDefined((nativeSpendLimit) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setNativeTokenSpendLimit\",\n args: [\n nativeSpendLimit.spendLimit,\n nativeSpendLimit.refreshInterval ?? 0\n ]\n }), this._nativeTokenSpendLimit),\n ...this._erc20TokenSpendLimits.map((erc20SpendLimit) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setERC20SpendLimit\",\n args: [\n erc20SpendLimit.tokenAddress,\n erc20SpendLimit.spendLimit,\n erc20SpendLimit.refreshInterval ?? 0\n ]\n })),\n this.encodeIfDefined((spendLimit) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setGasSpendLimit\",\n args: [spendLimit.spendLimit, spendLimit.refreshInterval ?? 0]\n }), this._gasSpendLimit),\n this.encodeIfDefined((paymaster) => encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setRequiredPaymaster\",\n args: [paymaster]\n }), this._requiredPaymaster)\n ].filter((x4) => x4 !== \"0x\");\n }\n encodeIfDefined(encode7, param) {\n if (!param)\n return \"0x\";\n return encode7(param);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/signer.js\n var SessionKeySignerSchema, SESSION_KEY_SIGNER_TYPE_PFX, SessionKeySigner;\n var init_signer4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/msca/plugins/session-key/signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_accounts();\n init_esm5();\n SessionKeySignerSchema = external_exports.object({\n storageType: external_exports.union([external_exports.literal(\"local-storage\"), external_exports.literal(\"session-storage\")]).or(external_exports.custom()).default(\"local-storage\"),\n storageKey: external_exports.string().default(\"session-key-signer:session-key\")\n });\n SESSION_KEY_SIGNER_TYPE_PFX = \"alchemy:session-key\";\n SessionKeySigner = class {\n /**\n * Initializes a new instance of a session key signer with the provided configuration. This will set the `signerType`, `storageKey`, and `storageType`. It will also manage the session key, either fetching it from storage or generating a new one if it doesn't exist.\n *\n * @example\n * ```ts\n * import { SessionKeySigner } from \"@account-kit/smart-contracts\";\n *\n * const signer = new SessionKeySigner();\n * ```\n *\n * @param {SessionKeySignerConfig} config_ the configuration for initializing the session key signer\n */\n constructor(config_ = {}) {\n Object.defineProperty(this, \"signerType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"inner\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"storageType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"storageKey\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"getAddress\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async () => {\n return this.inner.getAddress();\n }\n });\n Object.defineProperty(this, \"signMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async (msg) => {\n return this.inner.signMessage(msg);\n }\n });\n Object.defineProperty(this, \"signTypedData\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async (params) => {\n return this.inner.signTypedData(params);\n }\n });\n Object.defineProperty(this, \"generateNewKey\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: () => {\n const storage = this.storageType === \"session-storage\" ? sessionStorage : localStorage;\n const newKey = generatePrivateKey();\n storage.setItem(this.storageKey, newKey);\n this.inner = LocalAccountSigner.privateKeyToAccountSigner(newKey);\n return this.inner.inner.address;\n }\n });\n const config2 = SessionKeySignerSchema.parse(config_);\n this.signerType = `${SESSION_KEY_SIGNER_TYPE_PFX}`;\n this.storageKey = config2.storageKey;\n this.storageType = config2.storageType;\n const sessionKey = (() => {\n const storage = typeof this.storageType !== \"string\" ? this.storageType : this.storageType === \"session-storage\" ? sessionStorage : localStorage;\n const key = storage.getItem(this.storageKey);\n if (key) {\n return key;\n } else {\n const newKey = generatePrivateKey();\n storage.setItem(this.storageKey, newKey);\n return newKey;\n }\n })();\n this.inner = LocalAccountSigner.privateKeyToAccountSigner(sessionKey);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/accountFactoryAbi.js\n var accountFactoryAbi;\n var init_accountFactoryAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/accountFactoryAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n accountFactoryAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"_entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"_accountImpl\",\n type: \"address\",\n internalType: \"contract ModularAccount\"\n },\n {\n name: \"_semiModularImpl\",\n type: \"address\",\n internalType: \"contract SemiModularAccountBytecode\"\n },\n {\n name: \"_singleSignerValidationModule\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"_webAuthnValidationModule\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"ACCOUNT_IMPL\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract ModularAccount\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"ENTRY_POINT\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"SEMI_MODULAR_ACCOUNT_IMPL\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract SemiModularAccountBytecode\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"SINGLE_SIGNER_VALIDATION_MODULE\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"WEBAUTHN_VALIDATION_MODULE\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"acceptOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"addStake\",\n inputs: [\n {\n name: \"unstakeDelay\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"createAccount\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract ModularAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"createSemiModularAccount\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract SemiModularAccountBytecode\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"createWebAuthnAccount\",\n inputs: [\n {\n name: \"ownerX\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"ownerY\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract ModularAccount\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"getAddress\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAddressSemiModular\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getAddressWebAuthn\",\n inputs: [\n {\n name: \"ownerX\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"ownerY\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getSalt\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"getSaltWebAuthn\",\n inputs: [\n {\n name: \"ownerX\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"ownerY\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"owner\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"pendingOwner\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"renounceOwnership\",\n inputs: [],\n outputs: [],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"transferOwnership\",\n inputs: [\n {\n name: \"newOwner\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"unlockStake\",\n inputs: [],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n {\n name: \"to\",\n type: \"address\",\n internalType: \"address payable\"\n },\n {\n name: \"token\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"amount\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"withdrawStake\",\n inputs: [\n {\n name: \"withdrawAddress\",\n type: \"address\",\n internalType: \"address payable\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ModularAccountDeployed\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"owner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferStarted\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"OwnershipTransferred\",\n inputs: [\n {\n name: \"previousOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"newOwner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"SemiModularAccountDeployed\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"owner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"WebAuthnModularAccountDeployed\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"ownerX\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"ownerY\",\n type: \"uint256\",\n indexed: true,\n internalType: \"uint256\"\n },\n {\n name: \"salt\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"AddressEmptyCode\",\n inputs: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"AddressInsufficientBalance\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"FailedInnerCall\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidAction\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"OwnableInvalidOwner\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"OwnableUnauthorizedAccount\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"SafeERC20FailedOperation\",\n inputs: [\n {\n name: \"token\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"TransferFailed\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/modularAccountAbi.js\n var modularAccountAbi;\n var init_modularAccountAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/modularAccountAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n modularAccountAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"executionInstallDelegate\",\n type: \"address\",\n internalType: \"contract ExecutionInstallDelegate\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"fallback\",\n stateMutability: \"payable\"\n },\n {\n type: \"receive\",\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"accountId\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"result\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeWithRuntimeValidation\",\n inputs: [\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"authorization\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"getExecutionData\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ExecutionDataView\",\n components: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getValidationData\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ValidationDataView\",\n components: [\n {\n name: \"validationFlags\",\n type: \"uint8\",\n internalType: \"ValidationFlags\"\n },\n {\n name: \"validationHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initializeWithValidation\",\n inputs: [\n {\n name: \"validationConfig\",\n type: \"bytes25\",\n internalType: \"ValidationConfig\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"installData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hooks\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleInstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installValidation\",\n inputs: [\n {\n name: \"validationConfig\",\n type: \"bytes25\",\n internalType: \"ValidationConfig\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"installData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hooks\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n {\n name: \"hash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"performCreate\",\n inputs: [\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"isCreate2\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"salt\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [\n {\n name: \"createdAddr\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [\n {\n name: \"interfaceId\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"uninstallExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleUninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallValidation\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"uninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hookUninstallData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"userOpHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ExecutionInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ExecutionUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"ArrayLengthMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"CreateFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredActionSignatureInvalid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredValidationHasValidationHooks\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ExecutionHookAlreadySet\",\n inputs: [\n {\n name: \"hookConfig\",\n type: \"bytes25\",\n internalType: \"HookConfig\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InterfaceNotSupported\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidInitialization\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ModuleInstallCallbackFailed\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"revertReason\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NonCanonicalEncoding\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"NotEntryPoint\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"PreValidationHookDuplicate\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"RequireUserOperationContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SegmentOutOfOrder\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SelfCallRecursionDepthExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SignatureValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnauthorizedCallContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UnexpectedAggregator\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"aggregator\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnrecognizedFunction\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UpgradeFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UserOpValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAlreadySet\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAssocHookLimitExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationEntityIdInUse\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationFunctionMissing\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationSignatureSegmentMissing\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/actions/common/utils.js\n function serializeModuleEntity(config2) {\n return concatHex([config2.moduleAddress, toHex(config2.entityId, { size: 4 })]);\n }\n var init_utils15 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/actions/common/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/utils.js\n var SignatureType2, getDefaultWebauthnValidationModuleAddress, getDefaultSingleSignerValidationModuleAddress;\n var init_utils16 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_exports3();\n (function(SignatureType3) {\n SignatureType3[\"EOA\"] = \"0x00\";\n SignatureType3[\"CONTRACT\"] = \"0x01\";\n })(SignatureType2 || (SignatureType2 = {}));\n getDefaultWebauthnValidationModuleAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x0000000000001D9d34E07D9834274dF9ae575217\";\n }\n };\n getDefaultSingleSignerValidationModuleAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x00000000000099DE0BF6fA90dEB851E2A2df7d83\";\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/single-signer-validation/signer.js\n var singleSignerMessageSigner;\n var init_signer5 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/single-signer-validation/signer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_utils16();\n init_utils17();\n singleSignerMessageSigner = (signer, chain2, accountAddress, entityId, deferredActionData) => {\n const signingMethods = {\n prepareSign: async (request) => {\n let hash3;\n switch (request.type) {\n case \"personal_sign\":\n hash3 = hashMessage(request.data);\n break;\n case \"eth_signTypedData_v4\":\n hash3 = await hashTypedData(request.data);\n break;\n default:\n assertNeverSignatureRequestType();\n }\n return {\n type: \"eth_signTypedData_v4\",\n data: {\n domain: {\n chainId: Number(chain2.id),\n verifyingContract: getDefaultSingleSignerValidationModuleAddress(chain2),\n salt: concatHex([`0x${\"00\".repeat(12)}`, accountAddress])\n },\n types: {\n ReplaySafeHash: [{ name: \"hash\", type: \"bytes32\" }]\n },\n message: {\n hash: hash3\n },\n primaryType: \"ReplaySafeHash\"\n }\n };\n },\n formatSign: async (signature) => {\n return pack1271Signature({\n validationSignature: signature,\n entityId\n });\n }\n };\n return {\n ...signingMethods,\n getDummySignature: () => {\n const sig = packUOSignature({\n // orderedHookData: [],\n validationSignature: \"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\"\n });\n return deferredActionData ? concatHex([deferredActionData, sig]) : sig;\n },\n signUserOperationHash: async (uoHash) => {\n let sig = await signer.signMessage({ raw: uoHash }).then((signature) => packUOSignature({\n // orderedHookData: [],\n validationSignature: signature\n }));\n if (deferredActionData) {\n sig = concatHex([deferredActionData, sig]);\n deferredActionData = void 0;\n }\n return sig;\n },\n // we apply the expected 1271 packing here since the account contract will expect it\n async signMessage({ message: message2 }) {\n const { type, data } = await signingMethods.prepareSign({\n type: \"personal_sign\",\n data: message2\n });\n if (type !== \"eth_signTypedData_v4\") {\n throw new Error(\"Invalid signature request type\");\n }\n const sig = await signer.signTypedData(data);\n return signingMethods.formatSign(sig);\n },\n // TODO: maybe move \"sign deferred actions\" to a separate function?\n // we don't apply the expected 1271 packing since deferred sigs use typed data sigs and don't expect the 1271 packing\n signTypedData: async (typedDataDefinition) => {\n const { type, data } = await signingMethods.prepareSign({\n type: \"eth_signTypedData_v4\",\n data: typedDataDefinition\n });\n if (type !== \"eth_signTypedData_v4\") {\n throw new Error(\"Invalid signature request type\");\n }\n const sig = await signer.signTypedData(data);\n const isDeferredAction = typedDataDefinition.primaryType === \"DeferredAction\" && typedDataDefinition.domain != null && // @ts-expect-error the domain type I think changed in viem, so this is not working correctly (TODO: fix this)\n \"verifyingContract\" in typedDataDefinition.domain && typedDataDefinition.domain.verifyingContract === accountAddress;\n return isDeferredAction ? concat2([SignatureType2.EOA, sig]) : signingMethods.formatSign(sig);\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/version.js\n var version5;\n var init_version8 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n version5 = \"0.1.1\";\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/errors.js\n function getVersion2() {\n return version5;\n }\n var init_errors8 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_version8();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Errors.js\n function walk3(err, fn) {\n if (fn?.(err))\n return err;\n if (err && typeof err === \"object\" && \"cause\" in err && err.cause)\n return walk3(err.cause, fn);\n return fn ? null : err;\n }\n var BaseError7;\n var init_Errors2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_errors8();\n BaseError7 = class _BaseError extends Error {\n constructor(shortMessage, options = {}) {\n const details = (() => {\n if (options.cause instanceof _BaseError) {\n if (options.cause.details)\n return options.cause.details;\n if (options.cause.shortMessage)\n return options.cause.shortMessage;\n }\n if (options.cause?.message)\n return options.cause.message;\n return options.details;\n })();\n const docsPath8 = (() => {\n if (options.cause instanceof _BaseError)\n return options.cause.docsPath || options.docsPath;\n return options.docsPath;\n })();\n const docsBaseUrl = \"https://oxlib.sh\";\n const docs = `${docsBaseUrl}${docsPath8 ?? \"\"}`;\n const message2 = [\n shortMessage || \"An error occurred.\",\n ...options.metaMessages ? [\"\", ...options.metaMessages] : [],\n ...details || docsPath8 ? [\n \"\",\n details ? `Details: ${details}` : void 0,\n docsPath8 ? `See: ${docs}` : void 0\n ] : []\n ].filter((x4) => typeof x4 === \"string\").join(\"\\n\");\n super(message2, options.cause ? { cause: options.cause } : void 0);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"BaseError\"\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: `ox@${getVersion2()}`\n });\n this.cause = options.cause;\n this.details = details;\n this.docs = docs;\n this.docsPath = docsPath8;\n this.shortMessage = shortMessage;\n }\n walk(fn) {\n return walk3(this, fn);\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/bytes.js\n function charCodeToBase163(char) {\n if (char >= charCodeMap3.zero && char <= charCodeMap3.nine)\n return char - charCodeMap3.zero;\n if (char >= charCodeMap3.A && char <= charCodeMap3.F)\n return char - (charCodeMap3.A - 10);\n if (char >= charCodeMap3.a && char <= charCodeMap3.f)\n return char - (charCodeMap3.a - 10);\n return void 0;\n }\n var charCodeMap3;\n var init_bytes4 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n charCodeMap3 = {\n zero: 48,\n nine: 57,\n A: 65,\n F: 70,\n a: 97,\n f: 102\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/hex.js\n function assertSize4(hex, size_) {\n if (size5(hex) > size_)\n throw new SizeOverflowError4({\n givenSize: size5(hex),\n maxSize: size_\n });\n }\n function pad4(hex_, options = {}) {\n const { dir, size: size6 = 32 } = options;\n if (size6 === 0)\n return hex_;\n const hex = hex_.replace(\"0x\", \"\");\n if (hex.length > size6 * 2)\n throw new SizeExceedsPaddingSizeError4({\n size: Math.ceil(hex.length / 2),\n targetSize: size6,\n type: \"Hex\"\n });\n return `0x${hex[dir === \"right\" ? \"padEnd\" : \"padStart\"](size6 * 2, \"0\")}`;\n }\n var init_hex2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/hex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Hex2();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hex.js\n function fromBytes4(value, options = {}) {\n let string = \"\";\n for (let i3 = 0; i3 < value.length; i3++)\n string += hexes5[value[i3]];\n const hex = `0x${string}`;\n if (typeof options.size === \"number\") {\n assertSize4(hex, options.size);\n return padRight3(hex, options.size);\n }\n return hex;\n }\n function padRight3(value, size6) {\n return pad4(value, { dir: \"right\", size: size6 });\n }\n function size5(value) {\n return Math.ceil((value.length - 2) / 2);\n }\n var hexes5, SizeOverflowError4, SizeExceedsPaddingSizeError4;\n var init_Hex2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Hex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors2();\n init_hex2();\n hexes5 = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i3) => i3.toString(16).padStart(2, \"0\"));\n SizeOverflowError4 = class extends BaseError7 {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed \\`${maxSize}\\` bytes. Given size: \\`${givenSize}\\` bytes.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SizeOverflowError\"\n });\n }\n };\n SizeExceedsPaddingSizeError4 = class extends BaseError7 {\n constructor({ size: size6, targetSize, type }) {\n super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\\`${size6}\\`) exceeds padding size (\\`${targetSize}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Hex.SizeExceedsPaddingSizeError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Bytes.js\n function fromHex6(value, options = {}) {\n const { size: size6 } = options;\n let hex = value;\n if (size6) {\n assertSize4(value, size6);\n hex = padRight3(value, size6);\n }\n let hexString = hex.slice(2);\n if (hexString.length % 2)\n hexString = `0${hexString}`;\n const length = hexString.length / 2;\n const bytes = new Uint8Array(length);\n for (let index2 = 0, j2 = 0; index2 < length; index2++) {\n const nibbleLeft = charCodeToBase163(hexString.charCodeAt(j2++));\n const nibbleRight = charCodeToBase163(hexString.charCodeAt(j2++));\n if (nibbleLeft === void 0 || nibbleRight === void 0) {\n throw new BaseError7(`Invalid byte sequence (\"${hexString[j2 - 2]}${hexString[j2 - 1]}\" in \"${hexString}\").`);\n }\n bytes[index2] = nibbleLeft * 16 + nibbleRight;\n }\n return bytes;\n }\n var init_Bytes2 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Bytes.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Errors2();\n init_Hex2();\n init_bytes4();\n init_hex2();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Base64.js\n function toBytes4(value) {\n const base64 = value.replace(/=+$/, \"\");\n const size6 = base64.length;\n const decoded = new Uint8Array(size6 + 3);\n encoder6.encodeInto(base64 + \"===\", decoded);\n for (let i3 = 0, j2 = 0; i3 < base64.length; i3 += 4, j2 += 3) {\n const x4 = (characterToInteger[decoded[i3]] << 18) + (characterToInteger[decoded[i3 + 1]] << 12) + (characterToInteger[decoded[i3 + 2]] << 6) + characterToInteger[decoded[i3 + 3]];\n decoded[j2] = x4 >> 16;\n decoded[j2 + 1] = x4 >> 8 & 255;\n decoded[j2 + 2] = x4 & 255;\n }\n const decodedSize = (size6 >> 2) * 3 + (size6 % 4 && size6 % 4 - 1);\n return new Uint8Array(decoded.buffer, 0, decodedSize);\n }\n var encoder6, integerToCharacter, characterToInteger;\n var init_Base64 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/Base64.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n encoder6 = /* @__PURE__ */ new TextEncoder();\n integerToCharacter = /* @__PURE__ */ Object.fromEntries(Array.from(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\").map((a3, i3) => [i3, a3.charCodeAt(0)]));\n characterToInteger = {\n ...Object.fromEntries(Array.from(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\").map((a3, i3) => [a3.charCodeAt(0), i3])),\n [\"=\".charCodeAt(0)]: 0,\n [\"-\".charCodeAt(0)]: 62,\n [\"_\".charCodeAt(0)]: 63\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/nist.js\n var p256_CURVE, p384_CURVE, p521_CURVE, Fp256, Fp384, Fp521, p256, p384, p521;\n var init_nist = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/nist.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_sha2();\n init_shortw_utils2();\n init_modular2();\n p256_CURVE = {\n p: BigInt(\"0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff\"),\n n: BigInt(\"0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551\"),\n h: BigInt(1),\n a: BigInt(\"0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc\"),\n b: BigInt(\"0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b\"),\n Gx: BigInt(\"0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296\"),\n Gy: BigInt(\"0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5\")\n };\n p384_CURVE = {\n p: BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff\"),\n n: BigInt(\"0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973\"),\n h: BigInt(1),\n a: BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc\"),\n b: BigInt(\"0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef\"),\n Gx: BigInt(\"0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7\"),\n Gy: BigInt(\"0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f\")\n };\n p521_CURVE = {\n p: BigInt(\"0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"),\n n: BigInt(\"0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409\"),\n h: BigInt(1),\n a: BigInt(\"0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc\"),\n b: BigInt(\"0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00\"),\n Gx: BigInt(\"0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66\"),\n Gy: BigInt(\"0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650\")\n };\n Fp256 = Field2(p256_CURVE.p);\n Fp384 = Field2(p384_CURVE.p);\n Fp521 = Field2(p521_CURVE.p);\n p256 = createCurve2({ ...p256_CURVE, Fp: Fp256, lowS: false }, sha256);\n p384 = createCurve2({ ...p384_CURVE, Fp: Fp384, lowS: false }, sha384);\n p521 = createCurve2({ ...p521_CURVE, Fp: Fp521, lowS: false, allowedPrivateKeyLengths: [130, 131, 132] }, sha512);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/p256.js\n var p2562;\n var init_p256 = __esm({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/p256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_nist();\n p2562 = p256;\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/webauthn.js\n function parseAsn1Signature(bytes) {\n const r_start = bytes[4] === 0 ? 5 : 4;\n const r_end = r_start + 32;\n const s_start = bytes[r_end + 2] === 0 ? r_end + 3 : r_end + 2;\n const r2 = BigInt(fromBytes4(bytes.slice(r_start, r_end)));\n const s4 = BigInt(fromBytes4(bytes.slice(s_start)));\n return {\n r: r2,\n s: s4 > p2562.CURVE.n / 2n ? p2562.CURVE.n - s4 : s4\n };\n }\n var init_webauthn = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/internal/webauthn.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_p256();\n init_Hex2();\n }\n });\n\n // ../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/WebAuthnP256.js\n function getCredentialRequestOptions(options) {\n const { credentialId, challenge: challenge2, rpId = window.location.hostname, userVerification = \"required\" } = options;\n return {\n publicKey: {\n ...credentialId ? {\n allowCredentials: [\n {\n id: toBytes4(credentialId),\n type: \"public-key\"\n }\n ]\n } : {},\n challenge: fromHex6(challenge2),\n rpId,\n userVerification\n }\n };\n }\n async function sign3(options) {\n const { getFn = window.navigator.credentials.get.bind(window.navigator.credentials), ...rest } = options;\n const requestOptions = getCredentialRequestOptions(rest);\n try {\n const credential = await getFn(requestOptions);\n if (!credential)\n throw new CredentialRequestFailedError();\n const response = credential.response;\n const clientDataJSON = String.fromCharCode(...new Uint8Array(response.clientDataJSON));\n const challengeIndex = clientDataJSON.indexOf('\"challenge\"');\n const typeIndex = clientDataJSON.indexOf('\"type\"');\n const signature = parseAsn1Signature(new Uint8Array(response.signature));\n return {\n metadata: {\n authenticatorData: fromBytes4(new Uint8Array(response.authenticatorData)),\n clientDataJSON,\n challengeIndex,\n typeIndex,\n userVerificationRequired: requestOptions.publicKey.userVerification === \"required\"\n },\n signature,\n raw: credential\n };\n } catch (error) {\n throw new CredentialRequestFailedError({\n cause: error\n });\n }\n }\n var createChallenge, CredentialRequestFailedError;\n var init_WebAuthnP256 = __esm({\n \"../../../node_modules/.pnpm/ox@0.4.4_typescript@5.8.3_zod@3.25.64/node_modules/ox/_esm/core/WebAuthnP256.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_Base64();\n init_Bytes2();\n init_Errors2();\n init_Hex2();\n init_webauthn();\n createChallenge = Uint8Array.from([\n 105,\n 171,\n 180,\n 181,\n 160,\n 222,\n 75,\n 198,\n 42,\n 42,\n 32,\n 31,\n 141,\n 37,\n 186,\n 233\n ]);\n CredentialRequestFailedError = class extends BaseError7 {\n constructor({ cause } = {}) {\n super(\"Failed to request credential.\", {\n cause\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"WebAuthnP256.CredentialRequestFailedError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/webauthn-validation/signingMethods.js\n var webauthnSigningFunctions;\n var init_signingMethods = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/modules/webauthn-validation/signingMethods.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_WebAuthnP256();\n init_esm();\n init_utils17();\n init_utils16();\n webauthnSigningFunctions = (credential, getFn, rpId, chain2, accountAddress, entityId, deferredActionData) => {\n const { id, publicKey } = credential;\n const sign4 = async ({ hash: hash3 }) => {\n const { metadata, signature } = await sign3({\n credentialId: id,\n getFn,\n challenge: hash3,\n rpId\n });\n return encodeAbiParameters([\n {\n name: \"params\",\n type: \"tuple\",\n components: [\n { name: \"authenticatorData\", type: \"bytes\" },\n { name: \"clientDataJSON\", type: \"string\" },\n { name: \"challengeIndex\", type: \"uint256\" },\n { name: \"typeIndex\", type: \"uint256\" },\n { name: \"r\", type: \"uint256\" },\n { name: \"s\", type: \"uint256\" }\n ]\n }\n ], [\n {\n authenticatorData: metadata.authenticatorData,\n clientDataJSON: metadata.clientDataJSON,\n challengeIndex: BigInt(metadata.challengeIndex),\n typeIndex: BigInt(metadata.typeIndex),\n r: signature.r,\n s: signature.s\n }\n ]);\n };\n return {\n id,\n publicKey,\n getDummySignature: () => \"0xff000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000170000000000000000000000000000000000000000000000000000000000000001949fc7c88032b9fcb5f6efc7a7b8c63668eae9871b765e23123bb473ff57aa831a7c0d9276168ebcc29f2875a0239cffdf2a9cd1c2007c5c77c071db9264df1d000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008a7b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a2273496a396e6164474850596759334b7156384f7a4a666c726275504b474f716d59576f4d57516869467773222c226f726967696e223a2268747470733a2f2f7369676e2e636f696e626173652e636f6d222c2263726f73734f726967696e223a66616c73657d00000000000000000000000000000000000000000000\",\n sign: sign4,\n signUserOperationHash: async (uoHash) => {\n let sig = await sign4({ hash: hashMessage({ raw: uoHash }) });\n if (deferredActionData) {\n sig = concatHex([deferredActionData, sig]);\n deferredActionData = void 0;\n }\n return concatHex([\"0xff\", sig]);\n },\n async signMessage({ message: message2 }) {\n const hash3 = hashTypedData({\n domain: {\n chainId: Number(chain2.id),\n verifyingContract: getDefaultWebauthnValidationModuleAddress(chain2),\n salt: concatHex([`0x${\"00\".repeat(12)}`, accountAddress])\n },\n types: {\n ReplaySafeHash: [{ name: \"hash\", type: \"bytes32\" }]\n },\n message: {\n hash: hashMessage(message2)\n },\n primaryType: \"ReplaySafeHash\"\n });\n return pack1271Signature({\n validationSignature: await sign4({ hash: hash3 }),\n entityId\n });\n },\n signTypedData: async (typedDataDefinition) => {\n const isDeferredAction = typedDataDefinition?.primaryType === \"DeferredAction\" && // @ts-expect-error the domain type I think changed in viem, so this is not working correctly (TODO: fix this)\n \"verifyingContract\" in typedDataDefinition.domain && typedDataDefinition.domain.verifyingContract === accountAddress;\n const hash3 = await hashTypedData({\n domain: {\n chainId: Number(chain2.id),\n verifyingContract: getDefaultWebauthnValidationModuleAddress(chain2),\n salt: concatHex([`0x${\"00\".repeat(12)}`, accountAddress])\n },\n types: {\n ReplaySafeHash: [{ name: \"hash\", type: \"bytes32\" }]\n },\n message: {\n hash: hashTypedData(typedDataDefinition)\n },\n primaryType: \"ReplaySafeHash\"\n });\n const validationSignature = await sign4({ hash: hash3 });\n return isDeferredAction ? pack1271Signature({ validationSignature, entityId }) : validationSignature;\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/nativeSMASigner.js\n var nativeSMASigner;\n var init_nativeSMASigner = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/nativeSMASigner.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_utils17();\n init_utils16();\n nativeSMASigner = (signer, chain2, accountAddress, deferredActionData) => {\n const signingMethods = {\n prepareSign: async (request) => {\n let hash3;\n switch (request.type) {\n case \"personal_sign\":\n hash3 = hashMessage(request.data);\n break;\n case \"eth_signTypedData_v4\":\n const isDeferredAction = request.data?.primaryType === \"DeferredAction\" && request.data?.domain?.verifyingContract === accountAddress;\n if (isDeferredAction) {\n return request;\n } else {\n hash3 = await hashTypedData(request.data);\n break;\n }\n default:\n assertNeverSignatureRequestType();\n }\n return {\n type: \"eth_signTypedData_v4\",\n data: {\n domain: {\n chainId: Number(chain2.id),\n verifyingContract: accountAddress\n },\n types: {\n ReplaySafeHash: [{ name: \"hash\", type: \"bytes32\" }]\n },\n message: {\n hash: hash3\n },\n primaryType: \"ReplaySafeHash\"\n }\n };\n },\n formatSign: async (signature) => {\n return pack1271Signature({\n validationSignature: signature,\n entityId: DEFAULT_OWNER_ENTITY_ID\n });\n }\n };\n return {\n ...signingMethods,\n getDummySignature: () => {\n const sig = packUOSignature({\n // orderedHookData: [],\n validationSignature: \"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\"\n });\n return deferredActionData ? concatHex([deferredActionData, sig]) : sig;\n },\n signUserOperationHash: async (uoHash) => {\n let sig = await signer.signMessage({ raw: uoHash }).then((signature) => packUOSignature({\n // orderedHookData: [],\n validationSignature: signature\n }));\n if (deferredActionData) {\n sig = concatHex([deferredActionData, sig]);\n deferredActionData = void 0;\n }\n return sig;\n },\n // we apply the expected 1271 packing here since the account contract will expect it\n async signMessage({ message: message2 }) {\n const { type, data } = await signingMethods.prepareSign({\n type: \"personal_sign\",\n data: message2\n });\n if (type !== \"eth_signTypedData_v4\") {\n throw new Error(\"Invalid signature request type\");\n }\n const sig = await signer.signTypedData(data);\n return signingMethods.formatSign(sig);\n },\n // TODO: maybe move \"sign deferred actions\" to a separate function?\n // we don't apply the expected 1271 packing since deferred sigs use typed data sigs and don't expect the 1271 packing\n signTypedData: async (typedDataDefinition) => {\n const { type, data } = await signingMethods.prepareSign({\n type: \"eth_signTypedData_v4\",\n data: typedDataDefinition\n });\n if (type !== \"eth_signTypedData_v4\") {\n throw new Error(\"Invalid signature request type\");\n }\n const sig = await signer.signTypedData(data);\n const isDeferredAction = typedDataDefinition.primaryType === \"DeferredAction\" && typedDataDefinition.domain != null && // @ts-expect-error the domain type I think changed in viem, so this is not working correctly (TODO: fix this)\n \"verifyingContract\" in typedDataDefinition.domain && typedDataDefinition.domain.verifyingContract === accountAddress;\n return isDeferredAction ? concat2([SignatureType2.EOA, sig]) : signingMethods.formatSign(sig);\n }\n };\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/common/modularAccountV2Base.js\n async function createMAv2Base(config2) {\n let { transport, chain: chain2, entryPoint = getEntryPoint(chain2, { version: \"0.7.0\" }), signerEntity = {\n isGlobalValidation: true,\n entityId: DEFAULT_OWNER_ENTITY_ID\n }, signerEntity: { isGlobalValidation = true, entityId = DEFAULT_OWNER_ENTITY_ID } = {}, accountAddress, deferredAction, ...remainingToSmartContractAccountParams } = config2;\n const signer = \"signer\" in config2 ? config2.signer : void 0;\n const credential = \"credential\" in config2 ? config2.credential : void 0;\n const getFn = \"getFn\" in config2 ? config2.getFn : void 0;\n const rpId = \"rpId\" in config2 ? config2.rpId : void 0;\n if (entityId > Number(maxUint32)) {\n throw new InvalidEntityIdError(entityId);\n }\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const entryPointContract = getContract({\n address: entryPoint.address,\n abi: entryPoint.abi,\n client\n });\n let nonce;\n let deferredActionData;\n let hasAssociatedExecHooks = false;\n if (deferredAction) {\n let deferredActionNonce = 0n;\n ({\n entityId,\n isGlobalValidation,\n nonce: deferredActionNonce\n } = parseDeferredAction(deferredAction));\n const nextNonceForDeferredAction = await entryPointContract.read.getNonce([\n accountAddress,\n deferredActionNonce >> 64n\n ]);\n if (deferredActionNonce === nextNonceForDeferredAction) {\n ({ nonce, deferredActionData, hasAssociatedExecHooks } = parseDeferredAction(deferredAction));\n } else if (deferredActionNonce > nextNonceForDeferredAction) {\n throw new InvalidDeferredActionNonce();\n }\n }\n const encodeExecute = async ({ target, data, value }) => await encodeCallData(encodeFunctionData({\n abi: modularAccountAbi,\n functionName: \"execute\",\n args: [target, value ?? 0n, data]\n }));\n const encodeBatchExecute = async (txs) => await encodeCallData(encodeFunctionData({\n abi: modularAccountAbi,\n functionName: \"executeBatch\",\n args: [\n txs.map((tx) => ({\n target: tx.target,\n data: tx.data,\n value: tx.value ?? 0n\n }))\n ]\n }));\n const isAccountDeployed = async () => !!await client.getCode({ address: accountAddress });\n const getNonce = async (nonceKey = 0n) => {\n if (nonce) {\n const tempNonce = nonce;\n nonce = void 0;\n return tempNonce;\n }\n if (nonceKey > maxUint152) {\n throw new InvalidNonceKeyError(nonceKey);\n }\n const fullNonceKey = (nonceKey << 40n) + (BigInt(entityId) << 8n) + (isGlobalValidation ? 1n : 0n);\n return entryPointContract.read.getNonce([\n accountAddress,\n fullNonceKey\n ]);\n };\n const accountContract = getContract({\n address: accountAddress,\n abi: modularAccountAbi,\n client\n });\n const getExecutionData = async (selector) => {\n if (!await isAccountDeployed()) {\n return {\n module: zeroAddress,\n skipRuntimeValidation: false,\n allowGlobalValidation: false,\n executionHooks: []\n };\n }\n return await accountContract.read.getExecutionData([selector]);\n };\n const getValidationData = async (args) => {\n if (!await isAccountDeployed()) {\n return {\n validationHooks: [],\n executionHooks: [],\n selectors: [],\n validationFlags: 0\n };\n }\n const { validationModuleAddress, entityId: entityId2 } = args;\n return await accountContract.read.getValidationData([\n serializeModuleEntity({\n moduleAddress: validationModuleAddress ?? zeroAddress,\n entityId: entityId2 ?? Number(maxUint32)\n })\n ]);\n };\n const encodeCallData = async (callData) => {\n const validationData = await getValidationData({\n entityId: Number(entityId)\n });\n if (hasAssociatedExecHooks) {\n hasAssociatedExecHooks = false;\n return concatHex([executeUserOpSelector, callData]);\n }\n if (validationData.executionHooks.length) {\n return concatHex([executeUserOpSelector, callData]);\n }\n return callData;\n };\n const baseAccount = await toSmartContractAccount({\n ...remainingToSmartContractAccountParams,\n transport,\n chain: chain2,\n entryPoint,\n accountAddress,\n encodeExecute,\n encodeBatchExecute,\n getNonce,\n ...signer ? entityId === DEFAULT_OWNER_ENTITY_ID ? nativeSMASigner(signer, chain2, accountAddress, deferredActionData) : singleSignerMessageSigner(signer, chain2, accountAddress, entityId, deferredActionData) : webauthnSigningFunctions(\n // credential required for webauthn mode is checked at modularAccountV2 creation level\n credential,\n getFn,\n rpId,\n chain2,\n accountAddress,\n entityId,\n deferredActionData\n )\n });\n if (!signer) {\n return {\n ...baseAccount,\n signerEntity,\n getExecutionData,\n getValidationData,\n encodeCallData\n };\n }\n return {\n ...baseAccount,\n getSigner: () => signer,\n signerEntity,\n getExecutionData,\n getValidationData,\n encodeCallData\n };\n }\n var executeUserOpSelector;\n var init_modularAccountV2Base = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/common/modularAccountV2Base.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_modularAccountAbi();\n init_utils15();\n init_signer5();\n init_signingMethods();\n init_utils17();\n init_nativeSMASigner();\n executeUserOpSelector = \"0x8DD7712F\";\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/semiModularAccountStorageAbi.js\n var semiModularAccountStorageAbi;\n var init_semiModularAccountStorageAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/semiModularAccountStorageAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n semiModularAccountStorageAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"executionInstallDelegate\",\n type: \"address\",\n internalType: \"contract ExecutionInstallDelegate\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"fallback\",\n stateMutability: \"payable\"\n },\n {\n type: \"receive\",\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"accountId\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"result\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeWithRuntimeValidation\",\n inputs: [\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"authorization\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"getExecutionData\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ExecutionDataView\",\n components: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getFallbackSignerData\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getValidationData\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ValidationDataView\",\n components: [\n {\n name: \"validationFlags\",\n type: \"uint8\",\n internalType: \"ValidationFlags\"\n },\n {\n name: \"validationHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"initialize\",\n inputs: [\n {\n name: \"initialSigner\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleInstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installValidation\",\n inputs: [\n {\n name: \"validationConfig\",\n type: \"bytes25\",\n internalType: \"ValidationConfig\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"installData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hooks\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n {\n name: \"hash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"performCreate\",\n inputs: [\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"isCreate2\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"salt\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [\n {\n name: \"createdAddr\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [\n {\n name: \"interfaceId\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"uninstallExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleUninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallValidation\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"uninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hookUninstallData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateFallbackSignerData\",\n inputs: [\n {\n name: \"fallbackSigner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"isDisabled\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"userOpHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ExecutionInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ExecutionUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"FallbackSignerUpdated\",\n inputs: [\n {\n name: \"newFallbackSigner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"isDisabled\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"ArrayLengthMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"CreateFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredActionSignatureInvalid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredValidationHasValidationHooks\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ExecutionHookAlreadySet\",\n inputs: [\n {\n name: \"hookConfig\",\n type: \"bytes25\",\n internalType: \"HookConfig\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"FallbackSignerDisabled\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"FallbackSignerMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"FallbackValidationInstallationNotAllowed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InterfaceNotSupported\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidInitialization\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidSignatureType\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ModuleInstallCallbackFailed\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"revertReason\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NonCanonicalEncoding\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"NotEntryPoint\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"PreValidationHookDuplicate\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"RequireUserOperationContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SegmentOutOfOrder\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SelfCallRecursionDepthExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SignatureValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnauthorizedCallContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UnexpectedAggregator\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"aggregator\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnrecognizedFunction\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UpgradeFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UserOpValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAlreadySet\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAssocHookLimitExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationEntityIdInUse\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationFunctionMissing\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationSignatureSegmentMissing\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/utils.js\n async function getMAV2UpgradeToData(client, args) {\n const { account: account_ = client.account } = args;\n if (!account_) {\n throw new AccountNotFoundError2();\n }\n const account = account_;\n const chain2 = client.chain;\n if (!chain2) {\n throw new ChainNotFoundError2();\n }\n const initData = encodeFunctionData({\n abi: semiModularAccountStorageAbi,\n functionName: \"initialize\",\n args: [await account.getSigner().getAddress()]\n });\n return {\n implAddress: getDefaultSMAV2StorageAddress(chain2),\n initializationData: initData,\n createModularAccountV2FromExisting: async () => createModularAccountV2({\n transport: custom(client.transport),\n chain: chain2,\n signer: account.getSigner(),\n accountAddress: account.address\n })\n };\n }\n var DEFAULT_OWNER_ENTITY_ID, packUOSignature, pack1271Signature, getDefaultWebAuthnMAV2FactoryAddress, getDefaultMAV2FactoryAddress, getDefaultSMAV2BytecodeAddress, getDefaultSMAV2StorageAddress, mintableERC20Abi, parseDeferredAction, assertNeverSignatureRequestType;\n var init_utils17 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n init_exports3();\n init_modularAccountV2();\n init_semiModularAccountStorageAbi();\n init_esm6();\n DEFAULT_OWNER_ENTITY_ID = 0;\n packUOSignature = ({\n // orderedHookData, TODO: integrate in next iteration of MAv2 sdk\n validationSignature\n }) => {\n return concat2([\"0xFF\", \"0x00\", validationSignature]);\n };\n pack1271Signature = ({ validationSignature, entityId }) => {\n return concat2([\n \"0x00\",\n toHex(entityId, { size: 4 }),\n \"0xFF\",\n \"0x00\",\n // EOA type signature\n validationSignature\n ]);\n };\n getDefaultWebAuthnMAV2FactoryAddress = () => {\n return \"0x55010E571dCf07e254994bfc88b9C1C8FAe31960\";\n };\n getDefaultMAV2FactoryAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x00000000000017c61b5bEe81050EC8eFc9c6fecd\";\n }\n };\n getDefaultSMAV2BytecodeAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x000000000000c5A9089039570Dd36455b5C07383\";\n }\n };\n getDefaultSMAV2StorageAddress = (chain2) => {\n switch (chain2.id) {\n case sepolia3.id:\n case baseSepolia3.id:\n case polygon3.id:\n case mainnet3.id:\n case polygonAmoy3.id:\n case optimism3.id:\n case optimismSepolia3.id:\n case arbitrum3.id:\n case arbitrumSepolia3.id:\n case base3.id:\n default:\n return \"0x0000000000006E2f9d80CaEc0Da6500f005EB25A\";\n }\n };\n mintableERC20Abi = parseAbi([\n \"function transfer(address to, uint256 amount) external\",\n \"function mint(address to, uint256 amount) external\",\n \"function balanceOf(address target) external returns (uint256)\"\n ]);\n parseDeferredAction = (deferredAction) => {\n return {\n entityId: hexToNumber(`0x${deferredAction.slice(42, 50)}`),\n isGlobalValidation: hexToNumber(`0x${deferredAction.slice(50, 52)}`) % 2 === 1,\n nonce: BigInt(`0x${deferredAction.slice(4, 68)}`),\n deferredActionData: `0x${deferredAction.slice(68)}`,\n hasAssociatedExecHooks: deferredAction[3] === \"1\"\n };\n };\n assertNeverSignatureRequestType = () => {\n throw new Error(\"Invalid signature request type \");\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/predictAddress.js\n function predictModularAccountV2Address(params) {\n const { factoryAddress, salt, implementationAddress } = params;\n let combinedSalt;\n let initcode;\n switch (params.type) {\n case \"SMA\":\n combinedSalt = getCombinedSaltK1(params.ownerAddress, salt, 4294967295);\n const immutableArgs = params.ownerAddress;\n initcode = getProxyBytecodeWithImmutableArgs(implementationAddress, immutableArgs);\n break;\n case \"MA\":\n combinedSalt = getCombinedSaltK1(params.ownerAddress, salt, params.entityId);\n initcode = getProxyBytecode(implementationAddress);\n break;\n case \"WebAuthn\":\n const { ownerPublicKey: { x: x4, y: y6 } } = params;\n combinedSalt = keccak256(encodePacked([\"uint256\", \"uint256\", \"uint256\", \"uint32\"], [x4, y6, salt, params.entityId]));\n initcode = getProxyBytecode(implementationAddress);\n break;\n default:\n return assertNeverModularAccountV2Type(params);\n }\n return getContractAddress2({\n from: factoryAddress,\n opcode: \"CREATE2\",\n salt: combinedSalt,\n bytecode: initcode\n });\n }\n function getCombinedSaltK1(ownerAddress, salt, entityId) {\n return keccak256(encodePacked([\"address\", \"uint256\", \"uint32\"], [ownerAddress, salt, entityId]));\n }\n function getProxyBytecode(implementationAddress) {\n return `0x603d3d8160223d3973${implementationAddress.slice(2)}60095155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3`;\n }\n function getProxyBytecodeWithImmutableArgs(implementationAddress, immutableArgs) {\n return `0x6100513d8160233d3973${implementationAddress.slice(2)}60095155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f3${immutableArgs.slice(2)}`;\n }\n function assertNeverModularAccountV2Type(_2) {\n throw new Error(\"Unknown modular account type in predictModularAccountV2Address\");\n }\n var init_predictAddress2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/predictAddress.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm();\n }\n });\n\n // ../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/utils.js\n function bytesToHex4(bytes) {\n return `0x${bytesToHex2(bytes)}`;\n }\n function hexToBytes4(value) {\n return hexToBytes2(value.slice(2));\n }\n var init_utils18 = __esm({\n \"../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/utils.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils3();\n }\n });\n\n // ../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/publicKey.js\n function parsePublicKey(publicKey) {\n const bytes = typeof publicKey === \"string\" ? hexToBytes4(publicKey) : publicKey;\n const offset = bytes.length === 65 ? 1 : 0;\n const x4 = bytes.slice(offset, 32 + offset);\n const y6 = bytes.slice(32 + offset, 64 + offset);\n return {\n prefix: bytes.length === 65 ? bytes[0] : void 0,\n x: BigInt(bytesToHex4(x4)),\n y: BigInt(bytesToHex4(y6))\n };\n }\n var init_publicKey = __esm({\n \"../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/publicKey.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_utils18();\n }\n });\n\n // ../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/index.js\n var init_esm8 = __esm({\n \"../../../node_modules/.pnpm/webauthn-p256@0.0.10/node_modules/webauthn-p256/_esm/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_publicKey();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/errors.js\n var WebauthnCredentialsRequiredError, SignerRequiredFor7702Error, SignerRequiredForDefaultError;\n var init_errors9 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/errors.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n WebauthnCredentialsRequiredError = class extends BaseError4 {\n constructor() {\n super(\"Webauthn credentials are required to create a Webauthn Modular Account V2\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"WebauthnCredentialsRequiredError\"\n });\n }\n };\n SignerRequiredFor7702Error = class extends BaseError4 {\n constructor() {\n super(\"A signer is required to create a 7702 Modular Account V2\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignerRequiredFor7702Error\"\n });\n }\n };\n SignerRequiredForDefaultError = class extends BaseError4 {\n constructor() {\n super(\"A signer is required to create a default Modular Account V2\");\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"SignerRequiredForDefaultError\"\n });\n }\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/modularAccountV2.js\n async function createModularAccountV2(config2) {\n const { transport, chain: chain2, accountAddress: _accountAddress, entryPoint = getEntryPoint(chain2, { version: \"0.7.0\" }), signerEntity = {\n isGlobalValidation: true,\n entityId: DEFAULT_OWNER_ENTITY_ID\n }, signerEntity: { entityId = DEFAULT_OWNER_ENTITY_ID } = {}, deferredAction } = config2;\n const signer = \"signer\" in config2 ? config2.signer : void 0;\n const credential = \"credential\" in config2 ? config2.credential : void 0;\n const getFn = \"getFn\" in config2 ? config2.getFn : void 0;\n const rpId = \"rpId\" in config2 ? config2.rpId : void 0;\n const client = createBundlerClient({\n transport,\n chain: chain2\n });\n const accountFunctions = await (async () => {\n switch (config2.mode) {\n case \"webauthn\": {\n if (!credential)\n throw new WebauthnCredentialsRequiredError();\n const publicKey = credential.publicKey;\n const { x: x4, y: y6 } = parsePublicKey(publicKey);\n const { salt = 0n, factoryAddress = getDefaultWebAuthnMAV2FactoryAddress(), initCode } = config2;\n const getAccountInitCode = async () => {\n if (initCode) {\n return initCode;\n }\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: accountFactoryAbi,\n functionName: \"createWebAuthnAccount\",\n args: [x4, y6, salt, entityId]\n })\n ]);\n };\n const accountAddress = await getAccountAddress({\n client,\n entryPoint,\n accountAddress: _accountAddress,\n getAccountInitCode\n });\n return {\n getAccountInitCode,\n accountAddress\n };\n }\n case \"7702\": {\n const getAccountInitCode = async () => {\n return \"0x\";\n };\n if (!signer)\n throw new SignerRequiredFor7702Error();\n const signerAddress = await signer.getAddress();\n const accountAddress = _accountAddress ?? signerAddress;\n if (entityId === DEFAULT_OWNER_ENTITY_ID && signerAddress !== accountAddress) {\n throw new EntityIdOverrideError();\n }\n const implementation = \"0x69007702764179f14F51cdce752f4f775d74E139\";\n const getImplementationAddress = async () => implementation;\n return {\n getAccountInitCode,\n accountAddress,\n getImplementationAddress\n };\n }\n case \"default\":\n case void 0: {\n if (!signer)\n throw new SignerRequiredForDefaultError();\n const { salt = 0n, factoryAddress = getDefaultMAV2FactoryAddress(chain2), implementationAddress = getDefaultSMAV2BytecodeAddress(chain2), initCode } = config2;\n const signerAddress = await signer.getAddress();\n const getAccountInitCode = async () => {\n if (initCode) {\n return initCode;\n }\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: accountFactoryAbi,\n functionName: \"createSemiModularAccount\",\n args: [await signer.getAddress(), salt]\n })\n ]);\n };\n const accountAddress = _accountAddress ?? predictModularAccountV2Address({\n factoryAddress,\n implementationAddress,\n salt,\n type: \"SMA\",\n ownerAddress: signerAddress\n });\n return {\n getAccountInitCode,\n accountAddress\n };\n }\n default:\n assertNever(config2);\n }\n })();\n if (!signer) {\n if (!credential)\n throw new WebauthnCredentialsRequiredError();\n return await createMAv2Base({\n source: \"ModularAccountV2\",\n // TO DO: remove need to pass in source?\n transport,\n chain: chain2,\n entryPoint,\n signerEntity,\n deferredAction,\n credential,\n getFn,\n rpId,\n ...accountFunctions\n });\n }\n return await createMAv2Base({\n source: \"ModularAccountV2\",\n // TO DO: remove need to pass in source?\n transport,\n chain: chain2,\n signer,\n entryPoint,\n signerEntity,\n deferredAction,\n ...accountFunctions\n });\n }\n function assertNever(_valid) {\n throw new InvalidModularAccountV2Mode();\n }\n var init_modularAccountV2 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/account/modularAccountV2.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_esm();\n init_accountFactoryAbi();\n init_utils17();\n init_modularAccountV2Base();\n init_utils17();\n init_predictAddress2();\n init_esm8();\n init_errors9();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/client/client.js\n async function createModularAccountV2Client(config2) {\n const { transport, chain: chain2 } = config2;\n let account;\n if (config2.mode === \"webauthn\") {\n account = await createModularAccountV2(config2);\n } else {\n account = await createModularAccountV2(config2);\n }\n const middlewareToAppend = await (async () => {\n switch (config2.mode) {\n case \"7702\":\n return {\n gasEstimator: default7702GasEstimator(config2.gasEstimator),\n signUserOperation: default7702UserOpSigner(config2.signUserOperation)\n };\n case \"webauthn\":\n return {\n gasEstimator: webauthnGasEstimator(config2.gasEstimator)\n };\n case \"default\":\n default:\n return {};\n }\n })();\n if (isAlchemyTransport2(transport, chain2)) {\n return createAlchemySmartAccountClient2({\n ...config2,\n transport,\n chain: chain2,\n account,\n ...middlewareToAppend\n });\n }\n return createSmartAccountClient({\n ...config2,\n account,\n ...middlewareToAppend\n });\n }\n var init_client4 = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/client/client.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm6();\n init_modularAccountV2();\n init_exports3();\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/semiModularAccountBytecodeAbi.js\n var semiModularAccountBytecodeAbi;\n var init_semiModularAccountBytecodeAbi = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/ma-v2/abis/semiModularAccountBytecodeAbi.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n semiModularAccountBytecodeAbi = [\n {\n type: \"constructor\",\n inputs: [\n {\n name: \"entryPoint\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n },\n {\n name: \"executionInstallDelegate\",\n type: \"address\",\n internalType: \"contract ExecutionInstallDelegate\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"fallback\",\n stateMutability: \"payable\"\n },\n {\n type: \"receive\",\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"accountId\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n internalType: \"string\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"entryPoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IEntryPoint\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"execute\",\n inputs: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"result\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeBatch\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n {\n name: \"target\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n }\n ],\n outputs: [\n {\n name: \"results\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"executeUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"executeWithRuntimeValidation\",\n inputs: [\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"authorization\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"getExecutionData\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ExecutionDataView\",\n components: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getFallbackSignerData\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"getValidationData\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ],\n outputs: [\n {\n name: \"data\",\n type: \"tuple\",\n internalType: \"struct ValidationDataView\",\n components: [\n {\n name: \"validationFlags\",\n type: \"uint8\",\n internalType: \"ValidationFlags\"\n },\n {\n name: \"validationHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"executionHooks\",\n type: \"bytes25[]\",\n internalType: \"HookConfig[]\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"installExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleInstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"installValidation\",\n inputs: [\n {\n name: \"validationConfig\",\n type: \"bytes25\",\n internalType: \"ValidationConfig\"\n },\n {\n name: \"selectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n },\n {\n name: \"installData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hooks\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n {\n name: \"hash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"onERC1155BatchReceived\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"uint256[]\",\n internalType: \"uint256[]\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC1155Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"onERC721Received\",\n inputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n stateMutability: \"pure\"\n },\n {\n type: \"function\",\n name: \"performCreate\",\n inputs: [\n {\n name: \"value\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"isCreate2\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"salt\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n outputs: [\n {\n name: \"createdAddr\",\n type: \"address\",\n internalType: \"address\"\n }\n ],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"proxiableUUID\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [\n {\n name: \"interfaceId\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n stateMutability: \"view\"\n },\n {\n type: \"function\",\n name: \"uninstallExecution\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n },\n {\n name: \"moduleUninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"uninstallValidation\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"uninstallData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"hookUninstallData\",\n type: \"bytes[]\",\n internalType: \"bytes[]\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"updateFallbackSignerData\",\n inputs: [\n {\n name: \"fallbackSigner\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"isDisabled\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ],\n outputs: [],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"function\",\n name: \"upgradeToAndCall\",\n inputs: [\n {\n name: \"newImplementation\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"data\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ],\n outputs: [],\n stateMutability: \"payable\"\n },\n {\n type: \"function\",\n name: \"validateUserOp\",\n inputs: [\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct PackedUserOperation\",\n components: [\n {\n name: \"sender\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"nonce\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"initCode\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"callData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"accountGasLimits\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\"\n },\n {\n name: \"gasFees\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"paymasterAndData\",\n type: \"bytes\",\n internalType: \"bytes\"\n },\n {\n name: \"signature\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n name: \"userOpHash\",\n type: \"bytes32\",\n internalType: \"bytes32\"\n },\n {\n name: \"missingAccountFunds\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n outputs: [\n {\n name: \"validationData\",\n type: \"uint256\",\n internalType: \"uint256\"\n }\n ],\n stateMutability: \"nonpayable\"\n },\n {\n type: \"event\",\n name: \"ExecutionInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ExecutionUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n },\n {\n name: \"manifest\",\n type: \"tuple\",\n indexed: false,\n internalType: \"struct ExecutionManifest\",\n components: [\n {\n name: \"executionFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"skipRuntimeValidation\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"allowGlobalValidation\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n internalType: \"uint32\"\n },\n {\n name: \"isPreHook\",\n type: \"bool\",\n internalType: \"bool\"\n },\n {\n name: \"isPostHook\",\n type: \"bool\",\n internalType: \"bool\"\n }\n ]\n },\n {\n name: \"interfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\"\n }\n ]\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"FallbackSignerUpdated\",\n inputs: [\n {\n name: \"newFallbackSigner\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"isDisabled\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Initialized\",\n inputs: [\n {\n name: \"version\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"Upgraded\",\n inputs: [\n {\n name: \"implementation\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationInstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n }\n ],\n anonymous: false\n },\n {\n type: \"event\",\n name: \"ValidationUninstalled\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n indexed: true,\n internalType: \"address\"\n },\n {\n name: \"entityId\",\n type: \"uint32\",\n indexed: true,\n internalType: \"uint32\"\n },\n {\n name: \"onUninstallSucceeded\",\n type: \"bool\",\n indexed: false,\n internalType: \"bool\"\n }\n ],\n anonymous: false\n },\n {\n type: \"error\",\n name: \"ArrayLengthMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"CreateFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredActionSignatureInvalid\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"DeferredValidationHasValidationHooks\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ExecutionHookAlreadySet\",\n inputs: [\n {\n name: \"hookConfig\",\n type: \"bytes25\",\n internalType: \"HookConfig\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"FallbackSignerDisabled\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"FallbackSignerMismatch\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"FallbackValidationInstallationNotAllowed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InterfaceNotSupported\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"InvalidInitialization\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"InvalidSignatureType\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ModuleInstallCallbackFailed\",\n inputs: [\n {\n name: \"module\",\n type: \"address\",\n internalType: \"address\"\n },\n {\n name: \"revertReason\",\n type: \"bytes\",\n internalType: \"bytes\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"NonCanonicalEncoding\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"NotEntryPoint\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"PreValidationHookDuplicate\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"RequireUserOperationContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SegmentOutOfOrder\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SelfCallRecursionDepthExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"SignatureValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnauthorizedCallContext\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UnexpectedAggregator\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n },\n {\n name: \"aggregator\",\n type: \"address\",\n internalType: \"address\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UnrecognizedFunction\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"UpgradeFailed\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"UserOpValidationInvalid\",\n inputs: [\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAlreadySet\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n },\n {\n name: \"validationFunction\",\n type: \"bytes24\",\n internalType: \"ModuleEntity\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationAssocHookLimitExceeded\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationEntityIdInUse\",\n inputs: []\n },\n {\n type: \"error\",\n name: \"ValidationFunctionMissing\",\n inputs: [\n {\n name: \"selector\",\n type: \"bytes4\",\n internalType: \"bytes4\"\n }\n ]\n },\n {\n type: \"error\",\n name: \"ValidationSignatureSegmentMissing\",\n inputs: []\n }\n ];\n }\n });\n\n // ../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/index.js\n var src_exports = {};\n __export(src_exports, {\n AccountVersionRegistry: () => AccountVersionRegistry,\n IAccountLoupeAbi: () => IAccountLoupeAbi,\n IPluginAbi: () => IPluginAbi,\n IPluginManagerAbi: () => IPluginManagerAbi,\n IStandardExecutorAbi: () => IStandardExecutorAbi,\n InvalidAggregatedSignatureError: () => InvalidAggregatedSignatureError,\n InvalidContextSignatureError: () => InvalidContextSignatureError,\n LightAccountUnsupported1271Factories: () => LightAccountUnsupported1271Factories,\n LightAccountUnsupported1271Impls: () => LightAccountUnsupported1271Impls,\n MultiOwnerModularAccountFactoryAbi: () => MultiOwnerModularAccountFactoryAbi,\n MultiOwnerPlugin: () => MultiOwnerPlugin,\n MultiOwnerPluginAbi: () => MultiOwnerPluginAbi,\n MultiOwnerPluginExecutionFunctionAbi: () => MultiOwnerPluginExecutionFunctionAbi,\n MultisigAccountExpectedError: () => MultisigAccountExpectedError,\n MultisigMissingSignatureError: () => MultisigMissingSignatureError,\n MultisigModularAccountFactoryAbi: () => MultisigModularAccountFactoryAbi,\n MultisigPlugin: () => MultisigPlugin,\n MultisigPluginAbi: () => MultisigPluginAbi,\n MultisigPluginExecutionFunctionAbi: () => MultisigPluginExecutionFunctionAbi,\n SessionKeyAccessListType: () => SessionKeyAccessListType,\n SessionKeyPermissionsBuilder: () => SessionKeyPermissionsBuilder,\n SessionKeyPlugin: () => SessionKeyPlugin,\n SessionKeyPluginAbi: () => SessionKeyPluginAbi,\n SessionKeyPluginExecutionFunctionAbi: () => SessionKeyPluginExecutionFunctionAbi,\n SessionKeySigner: () => SessionKeySigner,\n UpgradeableModularAccountAbi: () => UpgradeableModularAccountAbi,\n accountLoupeActions: () => accountLoupeActions,\n buildSessionKeysToRemoveStruct: () => buildSessionKeysToRemoveStruct,\n combineSignatures: () => combineSignatures,\n createLightAccount: () => createLightAccount,\n createLightAccountAlchemyClient: () => createLightAccountAlchemyClient,\n createLightAccountClient: () => createLightAccountClient,\n createModularAccountAlchemyClient: () => createModularAccountAlchemyClient,\n createModularAccountV2: () => createModularAccountV2,\n createModularAccountV2Client: () => createModularAccountV2Client,\n createMultiOwnerLightAccount: () => createMultiOwnerLightAccount,\n createMultiOwnerLightAccountAlchemyClient: () => createMultiOwnerLightAccountAlchemyClient,\n createMultiOwnerLightAccountClient: () => createMultiOwnerLightAccountClient,\n createMultiOwnerModularAccount: () => createMultiOwnerModularAccount,\n createMultiOwnerModularAccountClient: () => createMultiOwnerModularAccountClient,\n createMultisigAccountAlchemyClient: () => createMultisigAccountAlchemyClient,\n createMultisigModularAccount: () => createMultisigModularAccount,\n createMultisigModularAccountClient: () => createMultisigModularAccountClient,\n defaultLightAccountVersion: () => defaultLightAccountVersion,\n formatSignatures: () => formatSignatures,\n getDefaultLightAccountFactoryAddress: () => getDefaultLightAccountFactoryAddress,\n getDefaultMultiOwnerLightAccountFactoryAddress: () => getDefaultMultiOwnerLightAccountFactoryAddress,\n getDefaultMultiOwnerModularAccountFactoryAddress: () => getDefaultMultiOwnerModularAccountFactoryAddress,\n getDefaultMultisigModularAccountFactoryAddress: () => getDefaultMultisigModularAccountFactoryAddress,\n getLightAccountVersionForAccount: () => getLightAccountVersionForAccount,\n getMAInitializationData: () => getMAInitializationData,\n getMAV2UpgradeToData: () => getMAV2UpgradeToData,\n getMSCAUpgradeToData: () => getMSCAUpgradeToData,\n getSignerType: () => getSignerType,\n installPlugin: () => installPlugin,\n lightAccountClientActions: () => lightAccountClientActions,\n multiOwnerLightAccountClientActions: () => multiOwnerLightAccountClientActions,\n multiOwnerPluginActions: () => multiOwnerPluginActions2,\n multisigPluginActions: () => multisigPluginActions2,\n multisigSignatureMiddleware: () => multisigSignatureMiddleware,\n pluginManagerActions: () => pluginManagerActions,\n predictLightAccountAddress: () => predictLightAccountAddress,\n predictModularAccountV2Address: () => predictModularAccountV2Address,\n predictMultiOwnerLightAccountAddress: () => predictMultiOwnerLightAccountAddress,\n semiModularAccountBytecodeAbi: () => semiModularAccountBytecodeAbi,\n sessionKeyPluginActions: () => sessionKeyPluginActions2,\n splitAggregatedSignature: () => splitAggregatedSignature,\n standardExecutor: () => standardExecutor,\n transferLightAccountOwnership: () => transferOwnership,\n updateMultiOwnerLightAccountOwners: () => updateOwners\n });\n var init_src = __esm({\n \"../../../node_modules/.pnpm/@account-kit+smart-contracts@4.62.0_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5._65dee0153d50ca3a2d2c6830319271d9/node_modules/@account-kit/smart-contracts/dist/esm/src/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_account3();\n init_transferOwnership();\n init_alchemyClient();\n init_client2();\n init_multiOwnerAlchemyClient();\n init_lightAccount();\n init_predictAddress();\n init_predictAddress();\n init_utils11();\n init_multiOwner();\n init_updateOwners();\n init_multiOwnerLightAccount();\n init_multiOwnerLightAccount2();\n init_IAccountLoupe();\n init_IPlugin();\n init_IPluginManager();\n init_IStandardExecutor();\n init_MultiOwnerModularAccountFactory();\n init_MultisigModularAccountFactory();\n init_UpgradeableModularAccount();\n init_decorator();\n init_multiOwnerAccount();\n init_multisigAccount();\n init_standardExecutor();\n init_alchemyClient2();\n init_client3();\n init_multiSigAlchemyClient();\n init_errors7();\n init_decorator2();\n init_installPlugin();\n init_extension();\n init_plugin();\n init_multisig();\n init_utils13();\n init_extension3();\n init_permissions();\n init_plugin3();\n init_signer4();\n init_utils14();\n init_utils12();\n init_modularAccountV2();\n init_client4();\n init_utils17();\n init_predictAddress2();\n init_semiModularAccountBytecodeAbi();\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/get-alchemy-chain-config.js\n var require_get_alchemy_chain_config = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/get-alchemy-chain-config.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getAlchemyChainConfig = getAlchemyChainConfig;\n var infra_1 = (init_exports2(), __toCommonJS(exports_exports2));\n function getAlchemyChainConfig(chainId) {\n const supportedChains = [\n infra_1.arbitrum,\n infra_1.arbitrumGoerli,\n infra_1.arbitrumNova,\n infra_1.arbitrumSepolia,\n infra_1.base,\n infra_1.baseGoerli,\n infra_1.baseSepolia,\n infra_1.fraxtal,\n infra_1.fraxtalSepolia,\n infra_1.goerli,\n infra_1.mainnet,\n infra_1.optimism,\n infra_1.optimismGoerli,\n infra_1.optimismSepolia,\n infra_1.polygon,\n infra_1.polygonAmoy,\n infra_1.polygonMumbai,\n infra_1.sepolia,\n infra_1.shape,\n infra_1.shapeSepolia,\n infra_1.worldChain,\n infra_1.worldChainSepolia,\n infra_1.zora,\n infra_1.zoraSepolia,\n infra_1.beraChainBartio,\n infra_1.opbnbMainnet,\n infra_1.opbnbTestnet,\n infra_1.soneiumMinato,\n infra_1.soneiumMainnet,\n infra_1.unichainMainnet,\n infra_1.unichainSepolia,\n infra_1.inkMainnet,\n infra_1.inkSepolia,\n infra_1.mekong,\n infra_1.monadTestnet,\n infra_1.openlootSepolia,\n infra_1.gensynTestnet,\n infra_1.riseTestnet,\n infra_1.storyMainnet,\n infra_1.storyAeneid,\n infra_1.celoAlfajores,\n infra_1.celoMainnet,\n infra_1.teaSepolia,\n infra_1.bobaSepolia,\n infra_1.bobaMainnet\n ];\n const chain2 = supportedChains.find((c4) => c4.id === chainId);\n if (!chain2) {\n throw new Error(`Chain ID ${chainId} not supported by @account-kit/infra. Supported chain IDs: ${supportedChains.map((c4) => c4.id).join(\", \")}`);\n }\n return chain2;\n }\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/lit-actions-smart-signer.js\n var require_lit_actions_smart_signer = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/lit-actions-smart-signer.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.LitActionsSmartSigner = void 0;\n var LitActionsSmartSigner = class {\n signerType = \"lit-actions\";\n inner;\n pkpPublicKey;\n signerAddress;\n constructor(config2) {\n if (config2.pkpPublicKey.startsWith(\"0x\")) {\n config2.pkpPublicKey = config2.pkpPublicKey.slice(2);\n }\n this.pkpPublicKey = config2.pkpPublicKey;\n this.signerAddress = ethers.utils.computeAddress(\"0x\" + config2.pkpPublicKey);\n this.inner = {\n pkpPublicKey: config2.pkpPublicKey,\n chainId: config2.chainId\n };\n }\n async getAddress() {\n return this.signerAddress;\n }\n async signMessage(message2) {\n let messageToSign;\n if (typeof message2 === \"string\") {\n messageToSign = message2;\n } else {\n messageToSign = typeof message2.raw === \"string\" ? ethers.utils.arrayify(message2.raw) : message2.raw;\n }\n const messageHash = ethers.utils.hashMessage(messageToSign);\n const sig = await Lit.Actions.signAndCombineEcdsa({\n toSign: ethers.utils.arrayify(messageHash),\n publicKey: this.pkpPublicKey,\n sigName: `alchemyMessage`\n });\n const parsedSig = JSON.parse(sig);\n return ethers.utils.joinSignature({\n r: \"0x\" + parsedSig.r.substring(2),\n s: \"0x\" + parsedSig.s,\n v: parsedSig.v\n });\n }\n async signTypedData(params) {\n const hash3 = ethers.utils._TypedDataEncoder.hash(params.domain || {}, params.types || {}, params.message || {});\n const sig = await Lit.Actions.signAndCombineEcdsa({\n toSign: ethers.utils.arrayify(hash3),\n publicKey: this.pkpPublicKey,\n sigName: `alchemyTypedData`\n });\n const parsedSig = JSON.parse(sig);\n return ethers.utils.joinSignature({\n r: \"0x\" + parsedSig.r.substring(2),\n s: \"0x\" + parsedSig.s,\n v: parsedSig.v\n });\n }\n // reference implementation is from Viem SmartAccountSigner\n async signAuthorization(unsignedAuthorization) {\n const { contractAddress, chainId, nonce } = unsignedAuthorization;\n if (!contractAddress || !chainId) {\n throw new Error(\"Invalid authorization: contractAddress and chainId are required\");\n }\n const hash3 = ethers.utils.keccak256(ethers.utils.hexConcat([\n \"0x05\",\n ethers.utils.RLP.encode([\n ethers.utils.hexlify(chainId),\n contractAddress,\n nonce ? ethers.utils.hexlify(nonce) : \"0x\"\n ])\n ]));\n const sig = await Lit.Actions.signAndCombineEcdsa({\n toSign: ethers.utils.arrayify(hash3),\n publicKey: this.pkpPublicKey,\n sigName: `alchemyAuth7702`\n });\n const sigObj = JSON.parse(sig);\n return {\n address: unsignedAuthorization.address || contractAddress,\n chainId,\n nonce,\n r: \"0x\" + sigObj.r.substring(2),\n s: \"0x\" + sigObj.s,\n v: BigInt(sigObj.v),\n yParity: sigObj.v\n };\n }\n };\n exports3.LitActionsSmartSigner = LitActionsSmartSigner;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/sponsored-gas-raw-transaction.js\n var require_sponsored_gas_raw_transaction = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/sponsored-gas-raw-transaction.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sponsoredGasRawTransaction = void 0;\n var infra_1 = (init_exports2(), __toCommonJS(exports_exports2));\n var smart_contracts_1 = (init_src(), __toCommonJS(src_exports));\n var get_alchemy_chain_config_1 = require_get_alchemy_chain_config();\n var lit_actions_smart_signer_1 = require_lit_actions_smart_signer();\n var sponsoredGasRawTransaction = async ({ pkpPublicKey, to, value, data, chainId, eip7702AlchemyApiKey, eip7702AlchemyPolicyId }) => {\n if (!eip7702AlchemyApiKey || !eip7702AlchemyPolicyId) {\n throw new Error(\"EIP7702 Alchemy API key and policy ID are required when using Alchemy for gas sponsorship\");\n }\n if (!chainId) {\n throw new Error(\"Chain ID is required when using Alchemy for gas sponsorship\");\n }\n console.log(\"[sponsoredGasRawTransaction] Encoded data:\", data);\n const txValue = value ? BigInt(value.toString()) : 0n;\n const litSigner = new lit_actions_smart_signer_1.LitActionsSmartSigner({\n pkpPublicKey,\n chainId\n });\n const alchemyChain = (0, get_alchemy_chain_config_1.getAlchemyChainConfig)(chainId);\n const smartAccountClient = await (0, smart_contracts_1.createModularAccountV2Client)({\n mode: \"7702\",\n transport: (0, infra_1.alchemy)({ apiKey: eip7702AlchemyApiKey }),\n chain: alchemyChain,\n signer: litSigner,\n policyId: eip7702AlchemyPolicyId\n });\n console.log(\"[sponsoredGasRawTransaction] Smart account client created\");\n const userOperation = {\n target: to,\n value: txValue,\n data\n };\n console.log(\"[sponsoredGasRawTransaction] User operation prepared\", userOperation);\n const uoStructResponse = await Lit.Actions.runOnce({\n waitForResponse: true,\n name: \"buildUserOperation\"\n }, async () => {\n try {\n const uoStruct2 = await smartAccountClient.buildUserOperation({\n uo: userOperation,\n account: smartAccountClient.account\n });\n return JSON.stringify(uoStruct2, (_2, v2) => typeof v2 === \"bigint\" ? { type: \"BigInt\", value: v2.toString() } : v2);\n } catch (e2) {\n console.log(\"[sponsoredGasRawTransaction] Failed to build user operation, error below\");\n console.log(e2);\n console.log(e2.stack);\n return \"\";\n }\n });\n if (uoStructResponse === \"\") {\n throw new Error(\"[sponsoredGasRawTransaction] Failed to build user operation\");\n }\n const uoStruct = JSON.parse(uoStructResponse, (_2, v2) => {\n if (v2 && typeof v2 === \"object\" && v2.type === \"BigInt\" && typeof v2.value === \"string\") {\n return BigInt(v2.value);\n }\n return v2;\n });\n console.log(\"[sponsoredGasRawTransaction] User operation built, starting signing...\", uoStruct);\n const signedUserOperation = await smartAccountClient.signUserOperation({\n account: smartAccountClient.account,\n uoStruct\n });\n console.log(\"[sponsoredGasRawTransaction] User operation signed\", signedUserOperation);\n const entryPoint = smartAccountClient.account.getEntryPoint();\n const uoHash = await Lit.Actions.runOnce({\n waitForResponse: true,\n name: \"sendWithAlchemy\"\n }, async () => {\n try {\n const userOpResult = await smartAccountClient.sendRawUserOperation(signedUserOperation, entryPoint.address);\n console.log(`[sponsoredGasRawTransaction] User operation sent`, {\n userOpHash: userOpResult\n });\n return userOpResult;\n } catch (e2) {\n console.log(\"[sponsoredGasRawTransaction] Failed to send user operation, error below\");\n console.log(e2);\n console.log(e2.stack);\n return \"\";\n }\n });\n if (uoHash === \"\") {\n throw new Error(\"[sponsoredGasRawTransaction] Failed to send user operation\");\n }\n return uoHash;\n };\n exports3.sponsoredGasRawTransaction = sponsoredGasRawTransaction;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/sponsored-gas-contract-call.js\n var require_sponsored_gas_contract_call = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/sponsored-gas-contract-call.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sponsoredGasContractCall = void 0;\n var sponsored_gas_raw_transaction_1 = require_sponsored_gas_raw_transaction();\n var sponsoredGasContractCall = async ({ pkpPublicKey, abi: abi2, contractAddress, functionName, args, overrides = {}, chainId, eip7702AlchemyApiKey, eip7702AlchemyPolicyId }) => {\n const iface = new ethers.utils.Interface(abi2);\n const encodedData = iface.encodeFunctionData(functionName, args);\n console.log(\"Encoded data:\", encodedData);\n if (!eip7702AlchemyApiKey || !eip7702AlchemyPolicyId) {\n throw new Error(\"EIP7702 Alchemy API key and policy ID are required when using Alchemy for gas sponsorship\");\n }\n if (!chainId) {\n throw new Error(\"Chain ID is required when using Alchemy for gas sponsorship\");\n }\n const txValue = overrides.value ? BigInt(overrides.value.toString()) : 0n;\n return (0, sponsored_gas_raw_transaction_1.sponsoredGasRawTransaction)({\n pkpPublicKey,\n to: contractAddress,\n value: txValue.toString(),\n data: encodedData,\n chainId,\n eip7702AlchemyApiKey,\n eip7702AlchemyPolicyId\n });\n };\n exports3.sponsoredGasContractCall = sponsoredGasContractCall;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/index.js\n var require_gasSponsorship = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/gasSponsorship/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sponsoredGasContractCall = exports3.sponsoredGasRawTransaction = void 0;\n var sponsored_gas_raw_transaction_1 = require_sponsored_gas_raw_transaction();\n Object.defineProperty(exports3, \"sponsoredGasRawTransaction\", { enumerable: true, get: function() {\n return sponsored_gas_raw_transaction_1.sponsoredGasRawTransaction;\n } });\n var sponsored_gas_contract_call_1 = require_sponsored_gas_contract_call();\n Object.defineProperty(exports3, \"sponsoredGasContractCall\", { enumerable: true, get: function() {\n return sponsored_gas_contract_call_1.sponsoredGasContractCall;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/erc20-abi.js\n var require_erc20_abi = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/erc20-abi.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.ERC20_ABI = void 0;\n exports3.ERC20_ABI = [\n {\n inputs: [],\n name: \"name\",\n outputs: [{ internalType: \"string\", name: \"\", type: \"string\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [{ internalType: \"string\", name: \"\", type: \"string\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [{ internalType: \"uint8\", name: \"\", type: \"uint8\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [{ internalType: \"address\", name: \"account\", type: \"address\" }],\n name: \"balanceOf\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"to\", type: \"address\" },\n { internalType: \"uint256\", name: \"value\", type: \"uint256\" }\n ],\n name: \"transfer\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"owner\", type: \"address\" },\n { internalType: \"address\", name: \"spender\", type: \"address\" }\n ],\n name: \"allowance\",\n outputs: [{ internalType: \"uint256\", name: \"\", type: \"uint256\" }],\n stateMutability: \"view\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"spender\", type: \"address\" },\n { internalType: \"uint256\", name: \"value\", type: \"uint256\" }\n ],\n name: \"approve\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"from\", type: \"address\" },\n { internalType: \"address\", name: \"to\", type: \"address\" },\n { internalType: \"uint256\", name: \"value\", type: \"uint256\" }\n ],\n name: \"transferFrom\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"spender\", type: \"address\" },\n { internalType: \"uint256\", name: \"addedValue\", type: \"uint256\" }\n ],\n name: \"increaseAllowance\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n inputs: [\n { internalType: \"address\", name: \"spender\", type: \"address\" },\n { internalType: \"uint256\", name: \"subtractedValue\", type: \"uint256\" }\n ],\n name: \"decreaseAllowance\",\n outputs: [{ internalType: \"bool\", name: \"\", type: \"bool\" }],\n stateMutability: \"nonpayable\",\n type: \"function\"\n },\n {\n anonymous: false,\n inputs: [\n { indexed: true, internalType: \"address\", name: \"from\", type: \"address\" },\n { indexed: true, internalType: \"address\", name: \"to\", type: \"address\" },\n { indexed: false, internalType: \"uint256\", name: \"value\", type: \"uint256\" }\n ],\n name: \"Transfer\",\n type: \"event\"\n },\n {\n anonymous: false,\n inputs: [\n { indexed: true, internalType: \"address\", name: \"owner\", type: \"address\" },\n { indexed: true, internalType: \"address\", name: \"spender\", type: \"address\" },\n { indexed: false, internalType: \"uint256\", name: \"value\", type: \"uint256\" }\n ],\n name: \"Approval\",\n type: \"event\"\n }\n ];\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/bigint-replace.js\n var require_bigint_replace = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/bigint-replace.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.bigIntReplacer = void 0;\n var bigIntReplacer = (key, value) => {\n return typeof value === \"bigint\" ? value.toString() : value;\n };\n exports3.bigIntReplacer = bigIntReplacer;\n }\n });\n\n // ../../libs/ability-sdk/dist/src/lib/abilityHelpers/index.js\n var require_abilityHelpers = __commonJS({\n \"../../libs/ability-sdk/dist/src/lib/abilityHelpers/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.bigIntReplacer = exports3.ERC20_ABI = exports3.sponsoredGasContractCall = exports3.sponsoredGasRawTransaction = exports3.populateTransaction = void 0;\n var populateTransaction_1 = require_populateTransaction();\n Object.defineProperty(exports3, \"populateTransaction\", { enumerable: true, get: function() {\n return populateTransaction_1.populateTransaction;\n } });\n var gasSponsorship_1 = require_gasSponsorship();\n Object.defineProperty(exports3, \"sponsoredGasRawTransaction\", { enumerable: true, get: function() {\n return gasSponsorship_1.sponsoredGasRawTransaction;\n } });\n Object.defineProperty(exports3, \"sponsoredGasContractCall\", { enumerable: true, get: function() {\n return gasSponsorship_1.sponsoredGasContractCall;\n } });\n var erc20_abi_1 = require_erc20_abi();\n Object.defineProperty(exports3, \"ERC20_ABI\", { enumerable: true, get: function() {\n return erc20_abi_1.ERC20_ABI;\n } });\n var bigint_replace_1 = require_bigint_replace();\n Object.defineProperty(exports3, \"bigIntReplacer\", { enumerable: true, get: function() {\n return bigint_replace_1.bigIntReplacer;\n } });\n }\n });\n\n // ../../libs/ability-sdk/dist/src/index.js\n var require_src7 = __commonJS({\n \"../../libs/ability-sdk/dist/src/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.bigIntReplacer = exports3.ERC20_ABI = exports3.sponsoredGasContractCall = exports3.sponsoredGasRawTransaction = exports3.populateTransaction = exports3.supportedPoliciesForAbility = exports3.asBundledVincentPolicy = exports3.asBundledVincentAbility = exports3.vincentAbilityHandler = exports3.vincentPolicyHandler = exports3.VINCENT_TOOL_API_VERSION = exports3.createVincentAbility = exports3.createVincentAbilityPolicy = exports3.createVincentPolicy = void 0;\n var vincentPolicy_1 = require_vincentPolicy();\n Object.defineProperty(exports3, \"createVincentPolicy\", { enumerable: true, get: function() {\n return vincentPolicy_1.createVincentPolicy;\n } });\n Object.defineProperty(exports3, \"createVincentAbilityPolicy\", { enumerable: true, get: function() {\n return vincentPolicy_1.createVincentAbilityPolicy;\n } });\n var vincentAbility_1 = require_vincentAbility();\n Object.defineProperty(exports3, \"createVincentAbility\", { enumerable: true, get: function() {\n return vincentAbility_1.createVincentAbility;\n } });\n var constants_1 = require_constants2();\n Object.defineProperty(exports3, \"VINCENT_TOOL_API_VERSION\", { enumerable: true, get: function() {\n return constants_1.VINCENT_TOOL_API_VERSION;\n } });\n var vincentPolicyHandler_1 = require_vincentPolicyHandler();\n Object.defineProperty(exports3, \"vincentPolicyHandler\", { enumerable: true, get: function() {\n return vincentPolicyHandler_1.vincentPolicyHandler;\n } });\n var vincentAbilityHandler_1 = require_vincentAbilityHandler();\n Object.defineProperty(exports3, \"vincentAbilityHandler\", { enumerable: true, get: function() {\n return vincentAbilityHandler_1.vincentAbilityHandler;\n } });\n var bundledAbility_1 = require_bundledAbility();\n Object.defineProperty(exports3, \"asBundledVincentAbility\", { enumerable: true, get: function() {\n return bundledAbility_1.asBundledVincentAbility;\n } });\n var bundledPolicy_1 = require_bundledPolicy();\n Object.defineProperty(exports3, \"asBundledVincentPolicy\", { enumerable: true, get: function() {\n return bundledPolicy_1.asBundledVincentPolicy;\n } });\n var supportedPoliciesForAbility_1 = require_supportedPoliciesForAbility();\n Object.defineProperty(exports3, \"supportedPoliciesForAbility\", { enumerable: true, get: function() {\n return supportedPoliciesForAbility_1.supportedPoliciesForAbility;\n } });\n var abilityHelpers_1 = require_abilityHelpers();\n Object.defineProperty(exports3, \"populateTransaction\", { enumerable: true, get: function() {\n return abilityHelpers_1.populateTransaction;\n } });\n Object.defineProperty(exports3, \"sponsoredGasRawTransaction\", { enumerable: true, get: function() {\n return abilityHelpers_1.sponsoredGasRawTransaction;\n } });\n Object.defineProperty(exports3, \"sponsoredGasContractCall\", { enumerable: true, get: function() {\n return abilityHelpers_1.sponsoredGasContractCall;\n } });\n Object.defineProperty(exports3, \"ERC20_ABI\", { enumerable: true, get: function() {\n return abilityHelpers_1.ERC20_ABI;\n } });\n Object.defineProperty(exports3, \"bigIntReplacer\", { enumerable: true, get: function() {\n return abilityHelpers_1.bigIntReplacer;\n } });\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/crypto.js\n var require_crypto3 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/crypto.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.crypto = void 0;\n exports3.crypto = typeof globalThis === \"object\" && \"crypto\" in globalThis ? globalThis.crypto : void 0;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/utils.js\n var require_utils17 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wrapXOFConstructorWithOpts = exports3.wrapConstructorWithOpts = exports3.wrapConstructor = exports3.Hash = exports3.nextTick = exports3.swap32IfBE = exports3.byteSwapIfBE = exports3.swap8IfBE = exports3.isLE = void 0;\n exports3.isBytes = isBytes5;\n exports3.anumber = anumber3;\n exports3.abytes = abytes3;\n exports3.ahash = ahash2;\n exports3.aexists = aexists2;\n exports3.aoutput = aoutput2;\n exports3.u8 = u8;\n exports3.u32 = u322;\n exports3.clean = clean2;\n exports3.createView = createView2;\n exports3.rotr = rotr2;\n exports3.rotl = rotl2;\n exports3.byteSwap = byteSwap2;\n exports3.byteSwap32 = byteSwap322;\n exports3.bytesToHex = bytesToHex5;\n exports3.hexToBytes = hexToBytes5;\n exports3.asyncLoop = asyncLoop2;\n exports3.utf8ToBytes = utf8ToBytes3;\n exports3.bytesToUtf8 = bytesToUtf82;\n exports3.toBytes = toBytes5;\n exports3.kdfInputToBytes = kdfInputToBytes2;\n exports3.concatBytes = concatBytes4;\n exports3.checkOpts = checkOpts2;\n exports3.createHasher = createHasher3;\n exports3.createOptHasher = createOptHasher;\n exports3.createXOFer = createXOFer2;\n exports3.randomBytes = randomBytes2;\n var crypto_1 = require_crypto3();\n function isBytes5(a3) {\n return a3 instanceof Uint8Array || ArrayBuffer.isView(a3) && a3.constructor.name === \"Uint8Array\";\n }\n function anumber3(n2) {\n if (!Number.isSafeInteger(n2) || n2 < 0)\n throw new Error(\"positive integer expected, got \" + n2);\n }\n function abytes3(b4, ...lengths) {\n if (!isBytes5(b4))\n throw new Error(\"Uint8Array expected\");\n if (lengths.length > 0 && !lengths.includes(b4.length))\n throw new Error(\"Uint8Array expected of length \" + lengths + \", got length=\" + b4.length);\n }\n function ahash2(h4) {\n if (typeof h4 !== \"function\" || typeof h4.create !== \"function\")\n throw new Error(\"Hash should be wrapped by utils.createHasher\");\n anumber3(h4.outputLen);\n anumber3(h4.blockLen);\n }\n function aexists2(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error(\"Hash instance has been destroyed\");\n if (checkFinished && instance.finished)\n throw new Error(\"Hash#digest() has already been called\");\n }\n function aoutput2(out, instance) {\n abytes3(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(\"digestInto() expects output buffer of length at least \" + min);\n }\n }\n function u8(arr) {\n return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\n }\n function u322(arr) {\n return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n }\n function clean2(...arrays) {\n for (let i3 = 0; i3 < arrays.length; i3++) {\n arrays[i3].fill(0);\n }\n }\n function createView2(arr) {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n }\n function rotr2(word, shift) {\n return word << 32 - shift | word >>> shift;\n }\n function rotl2(word, shift) {\n return word << shift | word >>> 32 - shift >>> 0;\n }\n exports3.isLE = (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();\n function byteSwap2(word) {\n return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;\n }\n exports3.swap8IfBE = exports3.isLE ? (n2) => n2 : (n2) => byteSwap2(n2);\n exports3.byteSwapIfBE = exports3.swap8IfBE;\n function byteSwap322(arr) {\n for (let i3 = 0; i3 < arr.length; i3++) {\n arr[i3] = byteSwap2(arr[i3]);\n }\n return arr;\n }\n exports3.swap32IfBE = exports3.isLE ? (u2) => u2 : byteSwap322;\n var hasHexBuiltin3 = /* @__PURE__ */ (() => (\n // @ts-ignore\n typeof Uint8Array.from([]).toHex === \"function\" && typeof Uint8Array.fromHex === \"function\"\n ))();\n var hexes6 = /* @__PURE__ */ Array.from({ length: 256 }, (_2, i3) => i3.toString(16).padStart(2, \"0\"));\n function bytesToHex5(bytes) {\n abytes3(bytes);\n if (hasHexBuiltin3)\n return bytes.toHex();\n let hex = \"\";\n for (let i3 = 0; i3 < bytes.length; i3++) {\n hex += hexes6[bytes[i3]];\n }\n return hex;\n }\n var asciis3 = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\n function asciiToBase163(ch) {\n if (ch >= asciis3._0 && ch <= asciis3._9)\n return ch - asciis3._0;\n if (ch >= asciis3.A && ch <= asciis3.F)\n return ch - (asciis3.A - 10);\n if (ch >= asciis3.a && ch <= asciis3.f)\n return ch - (asciis3.a - 10);\n return;\n }\n function hexToBytes5(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n if (hasHexBuiltin3)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error(\"hex string expected, got unpadded hex of length \" + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase163(hex.charCodeAt(hi));\n const n2 = asciiToBase163(hex.charCodeAt(hi + 1));\n if (n1 === void 0 || n2 === void 0) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n }\n var nextTick2 = async () => {\n };\n exports3.nextTick = nextTick2;\n async function asyncLoop2(iters, tick, cb) {\n let ts = Date.now();\n for (let i3 = 0; i3 < iters; i3++) {\n cb(i3);\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await (0, exports3.nextTick)();\n ts += diff;\n }\n }\n function utf8ToBytes3(str) {\n if (typeof str !== \"string\")\n throw new Error(\"string expected\");\n return new Uint8Array(new TextEncoder().encode(str));\n }\n function bytesToUtf82(bytes) {\n return new TextDecoder().decode(bytes);\n }\n function toBytes5(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes3(data);\n abytes3(data);\n return data;\n }\n function kdfInputToBytes2(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes3(data);\n abytes3(data);\n return data;\n }\n function concatBytes4(...arrays) {\n let sum = 0;\n for (let i3 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n abytes3(a3);\n sum += a3.length;\n }\n const res = new Uint8Array(sum);\n for (let i3 = 0, pad6 = 0; i3 < arrays.length; i3++) {\n const a3 = arrays[i3];\n res.set(a3, pad6);\n pad6 += a3.length;\n }\n return res;\n }\n function checkOpts2(defaults, opts) {\n if (opts !== void 0 && {}.toString.call(opts) !== \"[object Object]\")\n throw new Error(\"options should be object or undefined\");\n const merged = Object.assign(defaults, opts);\n return merged;\n }\n var Hash2 = class {\n };\n exports3.Hash = Hash2;\n function createHasher3(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes5(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n }\n function createOptHasher(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes5(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n }\n function createXOFer2(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes5(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n }\n exports3.wrapConstructor = createHasher3;\n exports3.wrapConstructorWithOpts = createOptHasher;\n exports3.wrapXOFConstructorWithOpts = createXOFer2;\n function randomBytes2(bytesLength = 32) {\n if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === \"function\") {\n return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n if (crypto_1.crypto && typeof crypto_1.crypto.randomBytes === \"function\") {\n return Uint8Array.from(crypto_1.crypto.randomBytes(bytesLength));\n }\n throw new Error(\"crypto.getRandomValues must be defined\");\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/_md.js\n var require_md = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/_md.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.SHA512_IV = exports3.SHA384_IV = exports3.SHA224_IV = exports3.SHA256_IV = exports3.HashMD = void 0;\n exports3.setBigUint64 = setBigUint642;\n exports3.Chi = Chi2;\n exports3.Maj = Maj2;\n var utils_ts_1 = require_utils17();\n function setBigUint642(view, byteOffset, value, isLE2) {\n if (typeof view.setBigUint64 === \"function\")\n return view.setBigUint64(byteOffset, value, isLE2);\n const _32n2 = BigInt(32);\n const _u32_max = BigInt(4294967295);\n const wh = Number(value >> _32n2 & _u32_max);\n const wl = Number(value & _u32_max);\n const h4 = isLE2 ? 4 : 0;\n const l6 = isLE2 ? 0 : 4;\n view.setUint32(byteOffset + h4, wh, isLE2);\n view.setUint32(byteOffset + l6, wl, isLE2);\n }\n function Chi2(a3, b4, c4) {\n return a3 & b4 ^ ~a3 & c4;\n }\n function Maj2(a3, b4, c4) {\n return a3 & b4 ^ a3 & c4 ^ b4 & c4;\n }\n var HashMD2 = class extends utils_ts_1.Hash {\n constructor(blockLen, outputLen, padOffset, isLE2) {\n super();\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE2;\n this.buffer = new Uint8Array(blockLen);\n this.view = (0, utils_ts_1.createView)(this.buffer);\n }\n update(data) {\n (0, utils_ts_1.aexists)(this);\n data = (0, utils_ts_1.toBytes)(data);\n (0, utils_ts_1.abytes)(data);\n const { view, buffer: buffer2, blockLen } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n if (take === blockLen) {\n const dataView = (0, utils_ts_1.createView)(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer2.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n (0, utils_ts_1.aexists)(this);\n (0, utils_ts_1.aoutput)(out, this);\n this.finished = true;\n const { buffer: buffer2, view, blockLen, isLE: isLE2 } = this;\n let { pos } = this;\n buffer2[pos++] = 128;\n (0, utils_ts_1.clean)(this.buffer.subarray(pos));\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n for (let i3 = pos; i3 < blockLen; i3++)\n buffer2[i3] = 0;\n setBigUint642(view, blockLen - 8, BigInt(this.length * 8), isLE2);\n this.process(view, 0);\n const oview = (0, utils_ts_1.createView)(out);\n const len = this.outputLen;\n if (len % 4)\n throw new Error(\"_sha2: outputLen should be aligned to 32bit\");\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error(\"_sha2: outputLen bigger than state\");\n for (let i3 = 0; i3 < outLen; i3++)\n oview.setUint32(4 * i3, state[i3], isLE2);\n }\n digest() {\n const { buffer: buffer2, outputLen } = this;\n this.digestInto(buffer2);\n const res = buffer2.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer: buffer2, length, finished, destroyed, pos } = this;\n to.destroyed = destroyed;\n to.finished = finished;\n to.length = length;\n to.pos = pos;\n if (length % blockLen)\n to.buffer.set(buffer2);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n };\n exports3.HashMD = HashMD2;\n exports3.SHA256_IV = Uint32Array.from([\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ]);\n exports3.SHA224_IV = Uint32Array.from([\n 3238371032,\n 914150663,\n 812702999,\n 4144912697,\n 4290775857,\n 1750603025,\n 1694076839,\n 3204075428\n ]);\n exports3.SHA384_IV = Uint32Array.from([\n 3418070365,\n 3238371032,\n 1654270250,\n 914150663,\n 2438529370,\n 812702999,\n 355462360,\n 4144912697,\n 1731405415,\n 4290775857,\n 2394180231,\n 1750603025,\n 3675008525,\n 1694076839,\n 1203062813,\n 3204075428\n ]);\n exports3.SHA512_IV = Uint32Array.from([\n 1779033703,\n 4089235720,\n 3144134277,\n 2227873595,\n 1013904242,\n 4271175723,\n 2773480762,\n 1595750129,\n 1359893119,\n 2917565137,\n 2600822924,\n 725511199,\n 528734635,\n 4215389547,\n 1541459225,\n 327033209\n ]);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/_u64.js\n var require_u642 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/_u64.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.toBig = exports3.shrSL = exports3.shrSH = exports3.rotrSL = exports3.rotrSH = exports3.rotrBL = exports3.rotrBH = exports3.rotr32L = exports3.rotr32H = exports3.rotlSL = exports3.rotlSH = exports3.rotlBL = exports3.rotlBH = exports3.add5L = exports3.add5H = exports3.add4L = exports3.add4H = exports3.add3L = exports3.add3H = void 0;\n exports3.add = add2;\n exports3.fromBig = fromBig2;\n exports3.split = split3;\n var U32_MASK642 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\n var _32n2 = /* @__PURE__ */ BigInt(32);\n function fromBig2(n2, le = false) {\n if (le)\n return { h: Number(n2 & U32_MASK642), l: Number(n2 >> _32n2 & U32_MASK642) };\n return { h: Number(n2 >> _32n2 & U32_MASK642) | 0, l: Number(n2 & U32_MASK642) | 0 };\n }\n function split3(lst, le = false) {\n const len = lst.length;\n let Ah = new Uint32Array(len);\n let Al = new Uint32Array(len);\n for (let i3 = 0; i3 < len; i3++) {\n const { h: h4, l: l6 } = fromBig2(lst[i3], le);\n [Ah[i3], Al[i3]] = [h4, l6];\n }\n return [Ah, Al];\n }\n var toBig = (h4, l6) => BigInt(h4 >>> 0) << _32n2 | BigInt(l6 >>> 0);\n exports3.toBig = toBig;\n var shrSH2 = (h4, _l, s4) => h4 >>> s4;\n exports3.shrSH = shrSH2;\n var shrSL2 = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n exports3.shrSL = shrSL2;\n var rotrSH2 = (h4, l6, s4) => h4 >>> s4 | l6 << 32 - s4;\n exports3.rotrSH = rotrSH2;\n var rotrSL2 = (h4, l6, s4) => h4 << 32 - s4 | l6 >>> s4;\n exports3.rotrSL = rotrSL2;\n var rotrBH2 = (h4, l6, s4) => h4 << 64 - s4 | l6 >>> s4 - 32;\n exports3.rotrBH = rotrBH2;\n var rotrBL2 = (h4, l6, s4) => h4 >>> s4 - 32 | l6 << 64 - s4;\n exports3.rotrBL = rotrBL2;\n var rotr32H = (_h, l6) => l6;\n exports3.rotr32H = rotr32H;\n var rotr32L = (h4, _l) => h4;\n exports3.rotr32L = rotr32L;\n var rotlSH2 = (h4, l6, s4) => h4 << s4 | l6 >>> 32 - s4;\n exports3.rotlSH = rotlSH2;\n var rotlSL2 = (h4, l6, s4) => l6 << s4 | h4 >>> 32 - s4;\n exports3.rotlSL = rotlSL2;\n var rotlBH2 = (h4, l6, s4) => l6 << s4 - 32 | h4 >>> 64 - s4;\n exports3.rotlBH = rotlBH2;\n var rotlBL2 = (h4, l6, s4) => h4 << s4 - 32 | l6 >>> 64 - s4;\n exports3.rotlBL = rotlBL2;\n function add2(Ah, Al, Bh, Bl) {\n const l6 = (Al >>> 0) + (Bl >>> 0);\n return { h: Ah + Bh + (l6 / 2 ** 32 | 0) | 0, l: l6 | 0 };\n }\n var add3L2 = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\n exports3.add3L = add3L2;\n var add3H2 = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;\n exports3.add3H = add3H2;\n var add4L2 = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\n exports3.add4L = add4L2;\n var add4H2 = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;\n exports3.add4H = add4H2;\n var add5L2 = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\n exports3.add5L = add5L2;\n var add5H2 = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;\n exports3.add5H = add5H2;\n var u64 = {\n fromBig: fromBig2,\n split: split3,\n toBig,\n shrSH: shrSH2,\n shrSL: shrSL2,\n rotrSH: rotrSH2,\n rotrSL: rotrSL2,\n rotrBH: rotrBH2,\n rotrBL: rotrBL2,\n rotr32H,\n rotr32L,\n rotlSH: rotlSH2,\n rotlSL: rotlSL2,\n rotlBH: rotlBH2,\n rotlBL: rotlBL2,\n add: add2,\n add3L: add3L2,\n add3H: add3H2,\n add4L: add4L2,\n add4H: add4H2,\n add5H: add5H2,\n add5L: add5L2\n };\n exports3.default = u64;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha2.js\n var require_sha23 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha2.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha512_224 = exports3.sha512_256 = exports3.sha384 = exports3.sha512 = exports3.sha224 = exports3.sha256 = exports3.SHA512_256 = exports3.SHA512_224 = exports3.SHA384 = exports3.SHA512 = exports3.SHA224 = exports3.SHA256 = void 0;\n var _md_ts_1 = require_md();\n var u64 = require_u642();\n var utils_ts_1 = require_utils17();\n var SHA256_K2 = /* @__PURE__ */ Uint32Array.from([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n var SHA256_W2 = /* @__PURE__ */ new Uint32Array(64);\n var SHA2562 = class extends _md_ts_1.HashMD {\n constructor(outputLen = 32) {\n super(64, outputLen, 8, false);\n this.A = _md_ts_1.SHA256_IV[0] | 0;\n this.B = _md_ts_1.SHA256_IV[1] | 0;\n this.C = _md_ts_1.SHA256_IV[2] | 0;\n this.D = _md_ts_1.SHA256_IV[3] | 0;\n this.E = _md_ts_1.SHA256_IV[4] | 0;\n this.F = _md_ts_1.SHA256_IV[5] | 0;\n this.G = _md_ts_1.SHA256_IV[6] | 0;\n this.H = _md_ts_1.SHA256_IV[7] | 0;\n }\n get() {\n const { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n return [A4, B2, C, D2, E2, F2, G, H3];\n }\n // prettier-ignore\n set(A4, B2, C, D2, E2, F2, G, H3) {\n this.A = A4 | 0;\n this.B = B2 | 0;\n this.C = C | 0;\n this.D = D2 | 0;\n this.E = E2 | 0;\n this.F = F2 | 0;\n this.G = G | 0;\n this.H = H3 | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4)\n SHA256_W2[i3] = view.getUint32(offset, false);\n for (let i3 = 16; i3 < 64; i3++) {\n const W15 = SHA256_W2[i3 - 15];\n const W2 = SHA256_W2[i3 - 2];\n const s0 = (0, utils_ts_1.rotr)(W15, 7) ^ (0, utils_ts_1.rotr)(W15, 18) ^ W15 >>> 3;\n const s1 = (0, utils_ts_1.rotr)(W2, 17) ^ (0, utils_ts_1.rotr)(W2, 19) ^ W2 >>> 10;\n SHA256_W2[i3] = s1 + SHA256_W2[i3 - 7] + s0 + SHA256_W2[i3 - 16] | 0;\n }\n let { A: A4, B: B2, C, D: D2, E: E2, F: F2, G, H: H3 } = this;\n for (let i3 = 0; i3 < 64; i3++) {\n const sigma1 = (0, utils_ts_1.rotr)(E2, 6) ^ (0, utils_ts_1.rotr)(E2, 11) ^ (0, utils_ts_1.rotr)(E2, 25);\n const T1 = H3 + sigma1 + (0, _md_ts_1.Chi)(E2, F2, G) + SHA256_K2[i3] + SHA256_W2[i3] | 0;\n const sigma0 = (0, utils_ts_1.rotr)(A4, 2) ^ (0, utils_ts_1.rotr)(A4, 13) ^ (0, utils_ts_1.rotr)(A4, 22);\n const T22 = sigma0 + (0, _md_ts_1.Maj)(A4, B2, C) | 0;\n H3 = G;\n G = F2;\n F2 = E2;\n E2 = D2 + T1 | 0;\n D2 = C;\n C = B2;\n B2 = A4;\n A4 = T1 + T22 | 0;\n }\n A4 = A4 + this.A | 0;\n B2 = B2 + this.B | 0;\n C = C + this.C | 0;\n D2 = D2 + this.D | 0;\n E2 = E2 + this.E | 0;\n F2 = F2 + this.F | 0;\n G = G + this.G | 0;\n H3 = H3 + this.H | 0;\n this.set(A4, B2, C, D2, E2, F2, G, H3);\n }\n roundClean() {\n (0, utils_ts_1.clean)(SHA256_W2);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n (0, utils_ts_1.clean)(this.buffer);\n }\n };\n exports3.SHA256 = SHA2562;\n var SHA2242 = class extends SHA2562 {\n constructor() {\n super(28);\n this.A = _md_ts_1.SHA224_IV[0] | 0;\n this.B = _md_ts_1.SHA224_IV[1] | 0;\n this.C = _md_ts_1.SHA224_IV[2] | 0;\n this.D = _md_ts_1.SHA224_IV[3] | 0;\n this.E = _md_ts_1.SHA224_IV[4] | 0;\n this.F = _md_ts_1.SHA224_IV[5] | 0;\n this.G = _md_ts_1.SHA224_IV[6] | 0;\n this.H = _md_ts_1.SHA224_IV[7] | 0;\n }\n };\n exports3.SHA224 = SHA2242;\n var K5122 = /* @__PURE__ */ (() => u64.split([\n \"0x428a2f98d728ae22\",\n \"0x7137449123ef65cd\",\n \"0xb5c0fbcfec4d3b2f\",\n \"0xe9b5dba58189dbbc\",\n \"0x3956c25bf348b538\",\n \"0x59f111f1b605d019\",\n \"0x923f82a4af194f9b\",\n \"0xab1c5ed5da6d8118\",\n \"0xd807aa98a3030242\",\n \"0x12835b0145706fbe\",\n \"0x243185be4ee4b28c\",\n \"0x550c7dc3d5ffb4e2\",\n \"0x72be5d74f27b896f\",\n \"0x80deb1fe3b1696b1\",\n \"0x9bdc06a725c71235\",\n \"0xc19bf174cf692694\",\n \"0xe49b69c19ef14ad2\",\n \"0xefbe4786384f25e3\",\n \"0x0fc19dc68b8cd5b5\",\n \"0x240ca1cc77ac9c65\",\n \"0x2de92c6f592b0275\",\n \"0x4a7484aa6ea6e483\",\n \"0x5cb0a9dcbd41fbd4\",\n \"0x76f988da831153b5\",\n \"0x983e5152ee66dfab\",\n \"0xa831c66d2db43210\",\n \"0xb00327c898fb213f\",\n \"0xbf597fc7beef0ee4\",\n \"0xc6e00bf33da88fc2\",\n \"0xd5a79147930aa725\",\n \"0x06ca6351e003826f\",\n \"0x142929670a0e6e70\",\n \"0x27b70a8546d22ffc\",\n \"0x2e1b21385c26c926\",\n \"0x4d2c6dfc5ac42aed\",\n \"0x53380d139d95b3df\",\n \"0x650a73548baf63de\",\n \"0x766a0abb3c77b2a8\",\n \"0x81c2c92e47edaee6\",\n \"0x92722c851482353b\",\n \"0xa2bfe8a14cf10364\",\n \"0xa81a664bbc423001\",\n \"0xc24b8b70d0f89791\",\n \"0xc76c51a30654be30\",\n \"0xd192e819d6ef5218\",\n \"0xd69906245565a910\",\n \"0xf40e35855771202a\",\n \"0x106aa07032bbd1b8\",\n \"0x19a4c116b8d2d0c8\",\n \"0x1e376c085141ab53\",\n \"0x2748774cdf8eeb99\",\n \"0x34b0bcb5e19b48a8\",\n \"0x391c0cb3c5c95a63\",\n \"0x4ed8aa4ae3418acb\",\n \"0x5b9cca4f7763e373\",\n \"0x682e6ff3d6b2b8a3\",\n \"0x748f82ee5defb2fc\",\n \"0x78a5636f43172f60\",\n \"0x84c87814a1f0ab72\",\n \"0x8cc702081a6439ec\",\n \"0x90befffa23631e28\",\n \"0xa4506cebde82bde9\",\n \"0xbef9a3f7b2c67915\",\n \"0xc67178f2e372532b\",\n \"0xca273eceea26619c\",\n \"0xd186b8c721c0c207\",\n \"0xeada7dd6cde0eb1e\",\n \"0xf57d4f7fee6ed178\",\n \"0x06f067aa72176fba\",\n \"0x0a637dc5a2c898a6\",\n \"0x113f9804bef90dae\",\n \"0x1b710b35131c471b\",\n \"0x28db77f523047d84\",\n \"0x32caab7b40c72493\",\n \"0x3c9ebe0a15c9bebc\",\n \"0x431d67c49c100d4c\",\n \"0x4cc5d4becb3e42b6\",\n \"0x597f299cfc657e2a\",\n \"0x5fcb6fab3ad6faec\",\n \"0x6c44198c4a475817\"\n ].map((n2) => BigInt(n2))))();\n var SHA512_Kh2 = /* @__PURE__ */ (() => K5122[0])();\n var SHA512_Kl2 = /* @__PURE__ */ (() => K5122[1])();\n var SHA512_W_H2 = /* @__PURE__ */ new Uint32Array(80);\n var SHA512_W_L2 = /* @__PURE__ */ new Uint32Array(80);\n var SHA5122 = class extends _md_ts_1.HashMD {\n constructor(outputLen = 64) {\n super(128, outputLen, 16, false);\n this.Ah = _md_ts_1.SHA512_IV[0] | 0;\n this.Al = _md_ts_1.SHA512_IV[1] | 0;\n this.Bh = _md_ts_1.SHA512_IV[2] | 0;\n this.Bl = _md_ts_1.SHA512_IV[3] | 0;\n this.Ch = _md_ts_1.SHA512_IV[4] | 0;\n this.Cl = _md_ts_1.SHA512_IV[5] | 0;\n this.Dh = _md_ts_1.SHA512_IV[6] | 0;\n this.Dl = _md_ts_1.SHA512_IV[7] | 0;\n this.Eh = _md_ts_1.SHA512_IV[8] | 0;\n this.El = _md_ts_1.SHA512_IV[9] | 0;\n this.Fh = _md_ts_1.SHA512_IV[10] | 0;\n this.Fl = _md_ts_1.SHA512_IV[11] | 0;\n this.Gh = _md_ts_1.SHA512_IV[12] | 0;\n this.Gl = _md_ts_1.SHA512_IV[13] | 0;\n this.Hh = _md_ts_1.SHA512_IV[14] | 0;\n this.Hl = _md_ts_1.SHA512_IV[15] | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n for (let i3 = 0; i3 < 16; i3++, offset += 4) {\n SHA512_W_H2[i3] = view.getUint32(offset);\n SHA512_W_L2[i3] = view.getUint32(offset += 4);\n }\n for (let i3 = 16; i3 < 80; i3++) {\n const W15h = SHA512_W_H2[i3 - 15] | 0;\n const W15l = SHA512_W_L2[i3 - 15] | 0;\n const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);\n const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);\n const W2h = SHA512_W_H2[i3 - 2] | 0;\n const W2l = SHA512_W_L2[i3 - 2] | 0;\n const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);\n const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);\n const SUMl = u64.add4L(s0l, s1l, SHA512_W_L2[i3 - 7], SHA512_W_L2[i3 - 16]);\n const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H2[i3 - 7], SHA512_W_H2[i3 - 16]);\n SHA512_W_H2[i3] = SUMh | 0;\n SHA512_W_L2[i3] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n for (let i3 = 0; i3 < 80; i3++) {\n const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);\n const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);\n const CHIh = Eh & Fh ^ ~Eh & Gh;\n const CHIl = El & Fl ^ ~El & Gl;\n const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl2[i3], SHA512_W_L2[i3]);\n const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh2[i3], SHA512_W_H2[i3]);\n const T1l = T1ll | 0;\n const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);\n const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);\n const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;\n const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = u64.add3L(T1l, sigma0l, MAJl);\n Ah = u64.add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n ({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n (0, utils_ts_1.clean)(SHA512_W_H2, SHA512_W_L2);\n }\n destroy() {\n (0, utils_ts_1.clean)(this.buffer);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n };\n exports3.SHA512 = SHA5122;\n var SHA3842 = class extends SHA5122 {\n constructor() {\n super(48);\n this.Ah = _md_ts_1.SHA384_IV[0] | 0;\n this.Al = _md_ts_1.SHA384_IV[1] | 0;\n this.Bh = _md_ts_1.SHA384_IV[2] | 0;\n this.Bl = _md_ts_1.SHA384_IV[3] | 0;\n this.Ch = _md_ts_1.SHA384_IV[4] | 0;\n this.Cl = _md_ts_1.SHA384_IV[5] | 0;\n this.Dh = _md_ts_1.SHA384_IV[6] | 0;\n this.Dl = _md_ts_1.SHA384_IV[7] | 0;\n this.Eh = _md_ts_1.SHA384_IV[8] | 0;\n this.El = _md_ts_1.SHA384_IV[9] | 0;\n this.Fh = _md_ts_1.SHA384_IV[10] | 0;\n this.Fl = _md_ts_1.SHA384_IV[11] | 0;\n this.Gh = _md_ts_1.SHA384_IV[12] | 0;\n this.Gl = _md_ts_1.SHA384_IV[13] | 0;\n this.Hh = _md_ts_1.SHA384_IV[14] | 0;\n this.Hl = _md_ts_1.SHA384_IV[15] | 0;\n }\n };\n exports3.SHA384 = SHA3842;\n var T224_IV = /* @__PURE__ */ Uint32Array.from([\n 2352822216,\n 424955298,\n 1944164710,\n 2312950998,\n 502970286,\n 855612546,\n 1738396948,\n 1479516111,\n 258812777,\n 2077511080,\n 2011393907,\n 79989058,\n 1067287976,\n 1780299464,\n 286451373,\n 2446758561\n ]);\n var T256_IV = /* @__PURE__ */ Uint32Array.from([\n 573645204,\n 4230739756,\n 2673172387,\n 3360449730,\n 596883563,\n 1867755857,\n 2520282905,\n 1497426621,\n 2519219938,\n 2827943907,\n 3193839141,\n 1401305490,\n 721525244,\n 746961066,\n 246885852,\n 2177182882\n ]);\n var SHA512_224 = class extends SHA5122 {\n constructor() {\n super(28);\n this.Ah = T224_IV[0] | 0;\n this.Al = T224_IV[1] | 0;\n this.Bh = T224_IV[2] | 0;\n this.Bl = T224_IV[3] | 0;\n this.Ch = T224_IV[4] | 0;\n this.Cl = T224_IV[5] | 0;\n this.Dh = T224_IV[6] | 0;\n this.Dl = T224_IV[7] | 0;\n this.Eh = T224_IV[8] | 0;\n this.El = T224_IV[9] | 0;\n this.Fh = T224_IV[10] | 0;\n this.Fl = T224_IV[11] | 0;\n this.Gh = T224_IV[12] | 0;\n this.Gl = T224_IV[13] | 0;\n this.Hh = T224_IV[14] | 0;\n this.Hl = T224_IV[15] | 0;\n }\n };\n exports3.SHA512_224 = SHA512_224;\n var SHA512_256 = class extends SHA5122 {\n constructor() {\n super(32);\n this.Ah = T256_IV[0] | 0;\n this.Al = T256_IV[1] | 0;\n this.Bh = T256_IV[2] | 0;\n this.Bl = T256_IV[3] | 0;\n this.Ch = T256_IV[4] | 0;\n this.Cl = T256_IV[5] | 0;\n this.Dh = T256_IV[6] | 0;\n this.Dl = T256_IV[7] | 0;\n this.Eh = T256_IV[8] | 0;\n this.El = T256_IV[9] | 0;\n this.Fh = T256_IV[10] | 0;\n this.Fl = T256_IV[11] | 0;\n this.Gh = T256_IV[12] | 0;\n this.Gl = T256_IV[13] | 0;\n this.Hh = T256_IV[14] | 0;\n this.Hl = T256_IV[15] | 0;\n }\n };\n exports3.SHA512_256 = SHA512_256;\n exports3.sha256 = (0, utils_ts_1.createHasher)(() => new SHA2562());\n exports3.sha224 = (0, utils_ts_1.createHasher)(() => new SHA2242());\n exports3.sha512 = (0, utils_ts_1.createHasher)(() => new SHA5122());\n exports3.sha384 = (0, utils_ts_1.createHasher)(() => new SHA3842());\n exports3.sha512_256 = (0, utils_ts_1.createHasher)(() => new SHA512_256());\n exports3.sha512_224 = (0, utils_ts_1.createHasher)(() => new SHA512_224());\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/utils.js\n var require_utils18 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.notImplemented = exports3.bitMask = exports3.utf8ToBytes = exports3.randomBytes = exports3.isBytes = exports3.hexToBytes = exports3.concatBytes = exports3.bytesToUtf8 = exports3.bytesToHex = exports3.anumber = exports3.abytes = void 0;\n exports3.abool = abool2;\n exports3._abool2 = _abool22;\n exports3._abytes2 = _abytes22;\n exports3.numberToHexUnpadded = numberToHexUnpadded3;\n exports3.hexToNumber = hexToNumber4;\n exports3.bytesToNumberBE = bytesToNumberBE3;\n exports3.bytesToNumberLE = bytesToNumberLE3;\n exports3.numberToBytesBE = numberToBytesBE3;\n exports3.numberToBytesLE = numberToBytesLE3;\n exports3.numberToVarBytesBE = numberToVarBytesBE;\n exports3.ensureBytes = ensureBytes3;\n exports3.equalBytes = equalBytes;\n exports3.copyBytes = copyBytes;\n exports3.asciiToBytes = asciiToBytes;\n exports3.inRange = inRange3;\n exports3.aInRange = aInRange3;\n exports3.bitLen = bitLen3;\n exports3.bitGet = bitGet;\n exports3.bitSet = bitSet;\n exports3.createHmacDrbg = createHmacDrbg3;\n exports3.validateObject = validateObject3;\n exports3.isHash = isHash;\n exports3._validateObject = _validateObject2;\n exports3.memoized = memoized3;\n var utils_js_1 = require_utils17();\n var utils_js_2 = require_utils17();\n Object.defineProperty(exports3, \"abytes\", { enumerable: true, get: function() {\n return utils_js_2.abytes;\n } });\n Object.defineProperty(exports3, \"anumber\", { enumerable: true, get: function() {\n return utils_js_2.anumber;\n } });\n Object.defineProperty(exports3, \"bytesToHex\", { enumerable: true, get: function() {\n return utils_js_2.bytesToHex;\n } });\n Object.defineProperty(exports3, \"bytesToUtf8\", { enumerable: true, get: function() {\n return utils_js_2.bytesToUtf8;\n } });\n Object.defineProperty(exports3, \"concatBytes\", { enumerable: true, get: function() {\n return utils_js_2.concatBytes;\n } });\n Object.defineProperty(exports3, \"hexToBytes\", { enumerable: true, get: function() {\n return utils_js_2.hexToBytes;\n } });\n Object.defineProperty(exports3, \"isBytes\", { enumerable: true, get: function() {\n return utils_js_2.isBytes;\n } });\n Object.defineProperty(exports3, \"randomBytes\", { enumerable: true, get: function() {\n return utils_js_2.randomBytes;\n } });\n Object.defineProperty(exports3, \"utf8ToBytes\", { enumerable: true, get: function() {\n return utils_js_2.utf8ToBytes;\n } });\n var _0n11 = /* @__PURE__ */ BigInt(0);\n var _1n11 = /* @__PURE__ */ BigInt(1);\n function abool2(title2, value) {\n if (typeof value !== \"boolean\")\n throw new Error(title2 + \" boolean expected, got \" + value);\n }\n function _abool22(value, title2 = \"\") {\n if (typeof value !== \"boolean\") {\n const prefix = title2 && `\"${title2}\"`;\n throw new Error(prefix + \"expected boolean, got type=\" + typeof value);\n }\n return value;\n }\n function _abytes22(value, length, title2 = \"\") {\n const bytes = (0, utils_js_1.isBytes)(value);\n const len = value?.length;\n const needsLen = length !== void 0;\n if (!bytes || needsLen && len !== length) {\n const prefix = title2 && `\"${title2}\" `;\n const ofLen = needsLen ? ` of length ${length}` : \"\";\n const got = bytes ? `length=${len}` : `type=${typeof value}`;\n throw new Error(prefix + \"expected Uint8Array\" + ofLen + \", got \" + got);\n }\n return value;\n }\n function numberToHexUnpadded3(num2) {\n const hex = num2.toString(16);\n return hex.length & 1 ? \"0\" + hex : hex;\n }\n function hexToNumber4(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n return hex === \"\" ? _0n11 : BigInt(\"0x\" + hex);\n }\n function bytesToNumberBE3(bytes) {\n return hexToNumber4((0, utils_js_1.bytesToHex)(bytes));\n }\n function bytesToNumberLE3(bytes) {\n (0, utils_js_1.abytes)(bytes);\n return hexToNumber4((0, utils_js_1.bytesToHex)(Uint8Array.from(bytes).reverse()));\n }\n function numberToBytesBE3(n2, len) {\n return (0, utils_js_1.hexToBytes)(n2.toString(16).padStart(len * 2, \"0\"));\n }\n function numberToBytesLE3(n2, len) {\n return numberToBytesBE3(n2, len).reverse();\n }\n function numberToVarBytesBE(n2) {\n return (0, utils_js_1.hexToBytes)(numberToHexUnpadded3(n2));\n }\n function ensureBytes3(title2, hex, expectedLength) {\n let res;\n if (typeof hex === \"string\") {\n try {\n res = (0, utils_js_1.hexToBytes)(hex);\n } catch (e2) {\n throw new Error(title2 + \" must be hex string or Uint8Array, cause: \" + e2);\n }\n } else if ((0, utils_js_1.isBytes)(hex)) {\n res = Uint8Array.from(hex);\n } else {\n throw new Error(title2 + \" must be hex string or Uint8Array\");\n }\n const len = res.length;\n if (typeof expectedLength === \"number\" && len !== expectedLength)\n throw new Error(title2 + \" of length \" + expectedLength + \" expected, got \" + len);\n return res;\n }\n function equalBytes(a3, b4) {\n if (a3.length !== b4.length)\n return false;\n let diff = 0;\n for (let i3 = 0; i3 < a3.length; i3++)\n diff |= a3[i3] ^ b4[i3];\n return diff === 0;\n }\n function copyBytes(bytes) {\n return Uint8Array.from(bytes);\n }\n function asciiToBytes(ascii) {\n return Uint8Array.from(ascii, (c4, i3) => {\n const charCode = c4.charCodeAt(0);\n if (c4.length !== 1 || charCode > 127) {\n throw new Error(`string contains non-ASCII character \"${ascii[i3]}\" with code ${charCode} at position ${i3}`);\n }\n return charCode;\n });\n }\n var isPosBig3 = (n2) => typeof n2 === \"bigint\" && _0n11 <= n2;\n function inRange3(n2, min, max) {\n return isPosBig3(n2) && isPosBig3(min) && isPosBig3(max) && min <= n2 && n2 < max;\n }\n function aInRange3(title2, n2, min, max) {\n if (!inRange3(n2, min, max))\n throw new Error(\"expected valid \" + title2 + \": \" + min + \" <= n < \" + max + \", got \" + n2);\n }\n function bitLen3(n2) {\n let len;\n for (len = 0; n2 > _0n11; n2 >>= _1n11, len += 1)\n ;\n return len;\n }\n function bitGet(n2, pos) {\n return n2 >> BigInt(pos) & _1n11;\n }\n function bitSet(n2, pos, value) {\n return n2 | (value ? _1n11 : _0n11) << BigInt(pos);\n }\n var bitMask3 = (n2) => (_1n11 << BigInt(n2)) - _1n11;\n exports3.bitMask = bitMask3;\n function createHmacDrbg3(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== \"number\" || hashLen < 2)\n throw new Error(\"hashLen must be a number\");\n if (typeof qByteLen !== \"number\" || qByteLen < 2)\n throw new Error(\"qByteLen must be a number\");\n if (typeof hmacFn !== \"function\")\n throw new Error(\"hmacFn must be a function\");\n const u8n2 = (len) => new Uint8Array(len);\n const u8of = (byte) => Uint8Array.of(byte);\n let v2 = u8n2(hashLen);\n let k4 = u8n2(hashLen);\n let i3 = 0;\n const reset = () => {\n v2.fill(1);\n k4.fill(0);\n i3 = 0;\n };\n const h4 = (...b4) => hmacFn(k4, v2, ...b4);\n const reseed = (seed = u8n2(0)) => {\n k4 = h4(u8of(0), seed);\n v2 = h4();\n if (seed.length === 0)\n return;\n k4 = h4(u8of(1), seed);\n v2 = h4();\n };\n const gen2 = () => {\n if (i3++ >= 1e3)\n throw new Error(\"drbg: tried 1000 values\");\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v2 = h4();\n const sl = v2.slice();\n out.push(sl);\n len += v2.length;\n }\n return (0, utils_js_1.concatBytes)(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed);\n let res = void 0;\n while (!(res = pred(gen2())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n }\n var validatorFns2 = {\n bigint: (val) => typeof val === \"bigint\",\n function: (val) => typeof val === \"function\",\n boolean: (val) => typeof val === \"boolean\",\n string: (val) => typeof val === \"string\",\n stringOrUint8Array: (val) => typeof val === \"string\" || (0, utils_js_1.isBytes)(val),\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === \"function\" && Number.isSafeInteger(val.outputLen)\n };\n function validateObject3(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns2[type];\n if (typeof checkVal !== \"function\")\n throw new Error(\"invalid validator function\");\n const val = object[fieldName];\n if (isOptional && val === void 0)\n return;\n if (!checkVal(val, object)) {\n throw new Error(\"param \" + String(fieldName) + \" is invalid. Expected \" + type + \", got \" + val);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n }\n function isHash(val) {\n return typeof val === \"function\" && Number.isSafeInteger(val.outputLen);\n }\n function _validateObject2(object, fields, optFields = {}) {\n if (!object || typeof object !== \"object\")\n throw new Error(\"expected valid options object\");\n function checkField(fieldName, expectedType, isOpt) {\n const val = object[fieldName];\n if (isOpt && val === void 0)\n return;\n const current = typeof val;\n if (current !== expectedType || val === null)\n throw new Error(`param \"${fieldName}\" is invalid: expected ${expectedType}, got ${current}`);\n }\n Object.entries(fields).forEach(([k4, v2]) => checkField(k4, v2, false));\n Object.entries(optFields).forEach(([k4, v2]) => checkField(k4, v2, true));\n }\n var notImplemented = () => {\n throw new Error(\"not implemented\");\n };\n exports3.notImplemented = notImplemented;\n function memoized3(fn) {\n const map = /* @__PURE__ */ new WeakMap();\n return (arg, ...args) => {\n const val = map.get(arg);\n if (val !== void 0)\n return val;\n const computed = fn(arg, ...args);\n map.set(arg, computed);\n return computed;\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/modular.js\n var require_modular2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/modular.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.isNegativeLE = void 0;\n exports3.mod = mod3;\n exports3.pow = pow;\n exports3.pow2 = pow23;\n exports3.invert = invert3;\n exports3.tonelliShanks = tonelliShanks3;\n exports3.FpSqrt = FpSqrt3;\n exports3.validateField = validateField3;\n exports3.FpPow = FpPow3;\n exports3.FpInvertBatch = FpInvertBatch3;\n exports3.FpDiv = FpDiv;\n exports3.FpLegendre = FpLegendre3;\n exports3.FpIsSquare = FpIsSquare;\n exports3.nLength = nLength3;\n exports3.Field = Field3;\n exports3.FpSqrtOdd = FpSqrtOdd;\n exports3.FpSqrtEven = FpSqrtEven;\n exports3.hashToPrivateScalar = hashToPrivateScalar;\n exports3.getFieldBytesLength = getFieldBytesLength3;\n exports3.getMinHashLength = getMinHashLength3;\n exports3.mapHashToField = mapHashToField3;\n var utils_ts_1 = require_utils18();\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = /* @__PURE__ */ BigInt(2);\n var _3n5 = /* @__PURE__ */ BigInt(3);\n var _4n5 = /* @__PURE__ */ BigInt(4);\n var _5n3 = /* @__PURE__ */ BigInt(5);\n var _7n3 = /* @__PURE__ */ BigInt(7);\n var _8n3 = /* @__PURE__ */ BigInt(8);\n var _9n2 = /* @__PURE__ */ BigInt(9);\n var _16n2 = /* @__PURE__ */ BigInt(16);\n function mod3(a3, b4) {\n const result = a3 % b4;\n return result >= _0n11 ? result : b4 + result;\n }\n function pow(num2, power, modulo) {\n return FpPow3(Field3(modulo), num2, power);\n }\n function pow23(x4, power, modulo) {\n let res = x4;\n while (power-- > _0n11) {\n res *= res;\n res %= modulo;\n }\n return res;\n }\n function invert3(number, modulo) {\n if (number === _0n11)\n throw new Error(\"invert: expected non-zero number\");\n if (modulo <= _0n11)\n throw new Error(\"invert: expected positive modulus, got \" + modulo);\n let a3 = mod3(number, modulo);\n let b4 = modulo;\n let x4 = _0n11, y6 = _1n11, u2 = _1n11, v2 = _0n11;\n while (a3 !== _0n11) {\n const q3 = b4 / a3;\n const r2 = b4 % a3;\n const m2 = x4 - u2 * q3;\n const n2 = y6 - v2 * q3;\n b4 = a3, a3 = r2, x4 = u2, y6 = v2, u2 = m2, v2 = n2;\n }\n const gcd = b4;\n if (gcd !== _1n11)\n throw new Error(\"invert: does not exist\");\n return mod3(x4, modulo);\n }\n function assertIsSquare2(Fp, root, n2) {\n if (!Fp.eql(Fp.sqr(root), n2))\n throw new Error(\"Cannot find square root\");\n }\n function sqrt3mod43(Fp, n2) {\n const p1div4 = (Fp.ORDER + _1n11) / _4n5;\n const root = Fp.pow(n2, p1div4);\n assertIsSquare2(Fp, root, n2);\n return root;\n }\n function sqrt5mod83(Fp, n2) {\n const p5div8 = (Fp.ORDER - _5n3) / _8n3;\n const n22 = Fp.mul(n2, _2n8);\n const v2 = Fp.pow(n22, p5div8);\n const nv = Fp.mul(n2, v2);\n const i3 = Fp.mul(Fp.mul(nv, _2n8), v2);\n const root = Fp.mul(nv, Fp.sub(i3, Fp.ONE));\n assertIsSquare2(Fp, root, n2);\n return root;\n }\n function sqrt9mod162(P2) {\n const Fp_ = Field3(P2);\n const tn = tonelliShanks3(P2);\n const c1 = tn(Fp_, Fp_.neg(Fp_.ONE));\n const c22 = tn(Fp_, c1);\n const c32 = tn(Fp_, Fp_.neg(c1));\n const c4 = (P2 + _7n3) / _16n2;\n return (Fp, n2) => {\n let tv1 = Fp.pow(n2, c4);\n let tv2 = Fp.mul(tv1, c1);\n const tv3 = Fp.mul(tv1, c22);\n const tv4 = Fp.mul(tv1, c32);\n const e1 = Fp.eql(Fp.sqr(tv2), n2);\n const e2 = Fp.eql(Fp.sqr(tv3), n2);\n tv1 = Fp.cmov(tv1, tv2, e1);\n tv2 = Fp.cmov(tv4, tv3, e2);\n const e3 = Fp.eql(Fp.sqr(tv2), n2);\n const root = Fp.cmov(tv1, tv2, e3);\n assertIsSquare2(Fp, root, n2);\n return root;\n };\n }\n function tonelliShanks3(P2) {\n if (P2 < _3n5)\n throw new Error(\"sqrt is not defined for small field\");\n let Q2 = P2 - _1n11;\n let S3 = 0;\n while (Q2 % _2n8 === _0n11) {\n Q2 /= _2n8;\n S3++;\n }\n let Z2 = _2n8;\n const _Fp = Field3(P2);\n while (FpLegendre3(_Fp, Z2) === 1) {\n if (Z2++ > 1e3)\n throw new Error(\"Cannot find square root: probably non-prime P\");\n }\n if (S3 === 1)\n return sqrt3mod43;\n let cc = _Fp.pow(Z2, Q2);\n const Q1div2 = (Q2 + _1n11) / _2n8;\n return function tonelliSlow(Fp, n2) {\n if (Fp.is0(n2))\n return n2;\n if (FpLegendre3(Fp, n2) !== 1)\n throw new Error(\"Cannot find square root\");\n let M2 = S3;\n let c4 = Fp.mul(Fp.ONE, cc);\n let t3 = Fp.pow(n2, Q2);\n let R3 = Fp.pow(n2, Q1div2);\n while (!Fp.eql(t3, Fp.ONE)) {\n if (Fp.is0(t3))\n return Fp.ZERO;\n let i3 = 1;\n let t_tmp = Fp.sqr(t3);\n while (!Fp.eql(t_tmp, Fp.ONE)) {\n i3++;\n t_tmp = Fp.sqr(t_tmp);\n if (i3 === M2)\n throw new Error(\"Cannot find square root\");\n }\n const exponent = _1n11 << BigInt(M2 - i3 - 1);\n const b4 = Fp.pow(c4, exponent);\n M2 = i3;\n c4 = Fp.sqr(b4);\n t3 = Fp.mul(t3, c4);\n R3 = Fp.mul(R3, b4);\n }\n return R3;\n };\n }\n function FpSqrt3(P2) {\n if (P2 % _4n5 === _3n5)\n return sqrt3mod43;\n if (P2 % _8n3 === _5n3)\n return sqrt5mod83;\n if (P2 % _16n2 === _9n2)\n return sqrt9mod162(P2);\n return tonelliShanks3(P2);\n }\n var isNegativeLE = (num2, modulo) => (mod3(num2, modulo) & _1n11) === _1n11;\n exports3.isNegativeLE = isNegativeLE;\n var FIELD_FIELDS3 = [\n \"create\",\n \"isValid\",\n \"is0\",\n \"neg\",\n \"inv\",\n \"sqrt\",\n \"sqr\",\n \"eql\",\n \"add\",\n \"sub\",\n \"mul\",\n \"pow\",\n \"div\",\n \"addN\",\n \"subN\",\n \"mulN\",\n \"sqrN\"\n ];\n function validateField3(field) {\n const initial = {\n ORDER: \"bigint\",\n MASK: \"bigint\",\n BYTES: \"number\",\n BITS: \"number\"\n };\n const opts = FIELD_FIELDS3.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n (0, utils_ts_1._validateObject)(field, opts);\n return field;\n }\n function FpPow3(Fp, num2, power) {\n if (power < _0n11)\n throw new Error(\"invalid exponent, negatives unsupported\");\n if (power === _0n11)\n return Fp.ONE;\n if (power === _1n11)\n return num2;\n let p4 = Fp.ONE;\n let d5 = num2;\n while (power > _0n11) {\n if (power & _1n11)\n p4 = Fp.mul(p4, d5);\n d5 = Fp.sqr(d5);\n power >>= _1n11;\n }\n return p4;\n }\n function FpInvertBatch3(Fp, nums, passZero = false) {\n const inverted = new Array(nums.length).fill(passZero ? Fp.ZERO : void 0);\n const multipliedAcc = nums.reduce((acc, num2, i3) => {\n if (Fp.is0(num2))\n return acc;\n inverted[i3] = acc;\n return Fp.mul(acc, num2);\n }, Fp.ONE);\n const invertedAcc = Fp.inv(multipliedAcc);\n nums.reduceRight((acc, num2, i3) => {\n if (Fp.is0(num2))\n return acc;\n inverted[i3] = Fp.mul(acc, inverted[i3]);\n return Fp.mul(acc, num2);\n }, invertedAcc);\n return inverted;\n }\n function FpDiv(Fp, lhs, rhs) {\n return Fp.mul(lhs, typeof rhs === \"bigint\" ? invert3(rhs, Fp.ORDER) : Fp.inv(rhs));\n }\n function FpLegendre3(Fp, n2) {\n const p1mod2 = (Fp.ORDER - _1n11) / _2n8;\n const powered = Fp.pow(n2, p1mod2);\n const yes = Fp.eql(powered, Fp.ONE);\n const zero = Fp.eql(powered, Fp.ZERO);\n const no = Fp.eql(powered, Fp.neg(Fp.ONE));\n if (!yes && !zero && !no)\n throw new Error(\"invalid Legendre symbol result\");\n return yes ? 1 : zero ? 0 : -1;\n }\n function FpIsSquare(Fp, n2) {\n const l6 = FpLegendre3(Fp, n2);\n return l6 === 1;\n }\n function nLength3(n2, nBitLength) {\n if (nBitLength !== void 0)\n (0, utils_ts_1.anumber)(nBitLength);\n const _nBitLength = nBitLength !== void 0 ? nBitLength : n2.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n }\n function Field3(ORDER, bitLenOrOpts, isLE2 = false, opts = {}) {\n if (ORDER <= _0n11)\n throw new Error(\"invalid field: expected ORDER > 0, got \" + ORDER);\n let _nbitLength = void 0;\n let _sqrt = void 0;\n let modFromBytes = false;\n let allowedLengths = void 0;\n if (typeof bitLenOrOpts === \"object\" && bitLenOrOpts != null) {\n if (opts.sqrt || isLE2)\n throw new Error(\"cannot specify opts in two arguments\");\n const _opts = bitLenOrOpts;\n if (_opts.BITS)\n _nbitLength = _opts.BITS;\n if (_opts.sqrt)\n _sqrt = _opts.sqrt;\n if (typeof _opts.isLE === \"boolean\")\n isLE2 = _opts.isLE;\n if (typeof _opts.modFromBytes === \"boolean\")\n modFromBytes = _opts.modFromBytes;\n allowedLengths = _opts.allowedLengths;\n } else {\n if (typeof bitLenOrOpts === \"number\")\n _nbitLength = bitLenOrOpts;\n if (opts.sqrt)\n _sqrt = opts.sqrt;\n }\n const { nBitLength: BITS, nByteLength: BYTES } = nLength3(ORDER, _nbitLength);\n if (BYTES > 2048)\n throw new Error(\"invalid field: expected ORDER of <= 2048 bytes\");\n let sqrtP;\n const f7 = Object.freeze({\n ORDER,\n isLE: isLE2,\n BITS,\n BYTES,\n MASK: (0, utils_ts_1.bitMask)(BITS),\n ZERO: _0n11,\n ONE: _1n11,\n allowedLengths,\n create: (num2) => mod3(num2, ORDER),\n isValid: (num2) => {\n if (typeof num2 !== \"bigint\")\n throw new Error(\"invalid field element: expected bigint, got \" + typeof num2);\n return _0n11 <= num2 && num2 < ORDER;\n },\n is0: (num2) => num2 === _0n11,\n // is valid and invertible\n isValidNot0: (num2) => !f7.is0(num2) && f7.isValid(num2),\n isOdd: (num2) => (num2 & _1n11) === _1n11,\n neg: (num2) => mod3(-num2, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num2) => mod3(num2 * num2, ORDER),\n add: (lhs, rhs) => mod3(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod3(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod3(lhs * rhs, ORDER),\n pow: (num2, power) => FpPow3(f7, num2, power),\n div: (lhs, rhs) => mod3(lhs * invert3(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num2) => num2 * num2,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num2) => invert3(num2, ORDER),\n sqrt: _sqrt || ((n2) => {\n if (!sqrtP)\n sqrtP = FpSqrt3(ORDER);\n return sqrtP(f7, n2);\n }),\n toBytes: (num2) => isLE2 ? (0, utils_ts_1.numberToBytesLE)(num2, BYTES) : (0, utils_ts_1.numberToBytesBE)(num2, BYTES),\n fromBytes: (bytes, skipValidation = true) => {\n if (allowedLengths) {\n if (!allowedLengths.includes(bytes.length) || bytes.length > BYTES) {\n throw new Error(\"Field.fromBytes: expected \" + allowedLengths + \" bytes, got \" + bytes.length);\n }\n const padded = new Uint8Array(BYTES);\n padded.set(bytes, isLE2 ? 0 : padded.length - bytes.length);\n bytes = padded;\n }\n if (bytes.length !== BYTES)\n throw new Error(\"Field.fromBytes: expected \" + BYTES + \" bytes, got \" + bytes.length);\n let scalar = isLE2 ? (0, utils_ts_1.bytesToNumberLE)(bytes) : (0, utils_ts_1.bytesToNumberBE)(bytes);\n if (modFromBytes)\n scalar = mod3(scalar, ORDER);\n if (!skipValidation) {\n if (!f7.isValid(scalar))\n throw new Error(\"invalid field element: outside of range 0..ORDER\");\n }\n return scalar;\n },\n // TODO: we don't need it here, move out to separate fn\n invertBatch: (lst) => FpInvertBatch3(f7, lst),\n // We can't move this out because Fp6, Fp12 implement it\n // and it's unclear what to return in there.\n cmov: (a3, b4, c4) => c4 ? b4 : a3\n });\n return Object.freeze(f7);\n }\n function FpSqrtOdd(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(\"Field doesn't have isOdd\");\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? root : Fp.neg(root);\n }\n function FpSqrtEven(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(\"Field doesn't have isOdd\");\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? Fp.neg(root) : root;\n }\n function hashToPrivateScalar(hash3, groupOrder, isLE2 = false) {\n hash3 = (0, utils_ts_1.ensureBytes)(\"privateHash\", hash3);\n const hashLen = hash3.length;\n const minLen = nLength3(groupOrder).nByteLength + 8;\n if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n throw new Error(\"hashToPrivateScalar: expected \" + minLen + \"-1024 bytes of input, got \" + hashLen);\n const num2 = isLE2 ? (0, utils_ts_1.bytesToNumberLE)(hash3) : (0, utils_ts_1.bytesToNumberBE)(hash3);\n return mod3(num2, groupOrder - _1n11) + _1n11;\n }\n function getFieldBytesLength3(fieldOrder) {\n if (typeof fieldOrder !== \"bigint\")\n throw new Error(\"field order must be bigint\");\n const bitLength3 = fieldOrder.toString(2).length;\n return Math.ceil(bitLength3 / 8);\n }\n function getMinHashLength3(fieldOrder) {\n const length = getFieldBytesLength3(fieldOrder);\n return length + Math.ceil(length / 2);\n }\n function mapHashToField3(key, fieldOrder, isLE2 = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength3(fieldOrder);\n const minLen = getMinHashLength3(fieldOrder);\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(\"expected \" + minLen + \"-1024 bytes of input, got \" + len);\n const num2 = isLE2 ? (0, utils_ts_1.bytesToNumberLE)(key) : (0, utils_ts_1.bytesToNumberBE)(key);\n const reduced = mod3(num2, fieldOrder - _1n11) + _1n11;\n return isLE2 ? (0, utils_ts_1.numberToBytesLE)(reduced, fieldLen) : (0, utils_ts_1.numberToBytesBE)(reduced, fieldLen);\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/curve.js\n var require_curve3 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/curve.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.wNAF = void 0;\n exports3.negateCt = negateCt2;\n exports3.normalizeZ = normalizeZ2;\n exports3.mulEndoUnsafe = mulEndoUnsafe2;\n exports3.pippenger = pippenger3;\n exports3.precomputeMSMUnsafe = precomputeMSMUnsafe;\n exports3.validateBasic = validateBasic2;\n exports3._createCurveFields = _createCurveFields2;\n var utils_ts_1 = require_utils18();\n var modular_ts_1 = require_modular2();\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n function negateCt2(condition, item) {\n const neg = item.negate();\n return condition ? neg : item;\n }\n function normalizeZ2(c4, points) {\n const invertedZs = (0, modular_ts_1.FpInvertBatch)(c4.Fp, points.map((p4) => p4.Z));\n return points.map((p4, i3) => c4.fromAffine(p4.toAffine(invertedZs[i3])));\n }\n function validateW3(W, bits) {\n if (!Number.isSafeInteger(W) || W <= 0 || W > bits)\n throw new Error(\"invalid window size, expected [1..\" + bits + \"], got W=\" + W);\n }\n function calcWOpts3(W, scalarBits) {\n validateW3(W, scalarBits);\n const windows = Math.ceil(scalarBits / W) + 1;\n const windowSize = 2 ** (W - 1);\n const maxNumber = 2 ** W;\n const mask = (0, utils_ts_1.bitMask)(W);\n const shiftBy = BigInt(W);\n return { windows, windowSize, mask, maxNumber, shiftBy };\n }\n function calcOffsets3(n2, window2, wOpts) {\n const { windowSize, mask, maxNumber, shiftBy } = wOpts;\n let wbits = Number(n2 & mask);\n let nextN = n2 >> shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n nextN += _1n11;\n }\n const offsetStart = window2 * windowSize;\n const offset = offsetStart + Math.abs(wbits) - 1;\n const isZero = wbits === 0;\n const isNeg = wbits < 0;\n const isNegF = window2 % 2 !== 0;\n const offsetF = offsetStart;\n return { nextN, offset, isZero, isNeg, isNegF, offsetF };\n }\n function validateMSMPoints3(points, c4) {\n if (!Array.isArray(points))\n throw new Error(\"array expected\");\n points.forEach((p4, i3) => {\n if (!(p4 instanceof c4))\n throw new Error(\"invalid point at index \" + i3);\n });\n }\n function validateMSMScalars3(scalars, field) {\n if (!Array.isArray(scalars))\n throw new Error(\"array of scalars expected\");\n scalars.forEach((s4, i3) => {\n if (!field.isValid(s4))\n throw new Error(\"invalid scalar at index \" + i3);\n });\n }\n var pointPrecomputes3 = /* @__PURE__ */ new WeakMap();\n var pointWindowSizes3 = /* @__PURE__ */ new WeakMap();\n function getW3(P2) {\n return pointWindowSizes3.get(P2) || 1;\n }\n function assert02(n2) {\n if (n2 !== _0n11)\n throw new Error(\"invalid wNAF\");\n }\n var wNAF3 = class {\n // Parametrized with a given Point class (not individual point)\n constructor(Point3, bits) {\n this.BASE = Point3.BASE;\n this.ZERO = Point3.ZERO;\n this.Fn = Point3.Fn;\n this.bits = bits;\n }\n // non-const time multiplication ladder\n _unsafeLadder(elm, n2, p4 = this.ZERO) {\n let d5 = elm;\n while (n2 > _0n11) {\n if (n2 & _1n11)\n p4 = p4.add(d5);\n d5 = d5.double();\n n2 >>= _1n11;\n }\n return p4;\n }\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @param point Point instance\n * @param W window size\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(point, W) {\n const { windows, windowSize } = calcWOpts3(W, this.bits);\n const points = [];\n let p4 = point;\n let base4 = p4;\n for (let window2 = 0; window2 < windows; window2++) {\n base4 = p4;\n points.push(base4);\n for (let i3 = 1; i3 < windowSize; i3++) {\n base4 = base4.add(p4);\n points.push(base4);\n }\n p4 = base4.double();\n }\n return points;\n }\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * More compact implementation:\n * https://github.com/paulmillr/noble-secp256k1/blob/47cb1669b6e506ad66b35fe7d76132ae97465da2/index.ts#L502-L541\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n2) {\n if (!this.Fn.isValid(n2))\n throw new Error(\"invalid scalar\");\n let p4 = this.ZERO;\n let f7 = this.BASE;\n const wo = calcWOpts3(W, this.bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n const { nextN, offset, isZero, isNeg, isNegF, offsetF } = calcOffsets3(n2, window2, wo);\n n2 = nextN;\n if (isZero) {\n f7 = f7.add(negateCt2(isNegF, precomputes[offsetF]));\n } else {\n p4 = p4.add(negateCt2(isNeg, precomputes[offset]));\n }\n }\n assert02(n2);\n return { p: p4, f: f7 };\n }\n /**\n * Implements ec unsafe (non const-time) multiplication using precomputed tables and w-ary non-adjacent form.\n * @param acc accumulator point to add result of multiplication\n * @returns point\n */\n wNAFUnsafe(W, precomputes, n2, acc = this.ZERO) {\n const wo = calcWOpts3(W, this.bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n if (n2 === _0n11)\n break;\n const { nextN, offset, isZero, isNeg } = calcOffsets3(n2, window2, wo);\n n2 = nextN;\n if (isZero) {\n continue;\n } else {\n const item = precomputes[offset];\n acc = acc.add(isNeg ? item.negate() : item);\n }\n }\n assert02(n2);\n return acc;\n }\n getPrecomputes(W, point, transform) {\n let comp = pointPrecomputes3.get(point);\n if (!comp) {\n comp = this.precomputeWindow(point, W);\n if (W !== 1) {\n if (typeof transform === \"function\")\n comp = transform(comp);\n pointPrecomputes3.set(point, comp);\n }\n }\n return comp;\n }\n cached(point, scalar, transform) {\n const W = getW3(point);\n return this.wNAF(W, this.getPrecomputes(W, point, transform), scalar);\n }\n unsafe(point, scalar, transform, prev) {\n const W = getW3(point);\n if (W === 1)\n return this._unsafeLadder(point, scalar, prev);\n return this.wNAFUnsafe(W, this.getPrecomputes(W, point, transform), scalar, prev);\n }\n // We calculate precomputes for elliptic curve point multiplication\n // using windowed method. This specifies window size and\n // stores precomputed values. Usually only base point would be precomputed.\n createCache(P2, W) {\n validateW3(W, this.bits);\n pointWindowSizes3.set(P2, W);\n pointPrecomputes3.delete(P2);\n }\n hasCache(elm) {\n return getW3(elm) !== 1;\n }\n };\n exports3.wNAF = wNAF3;\n function mulEndoUnsafe2(Point3, point, k1, k22) {\n let acc = point;\n let p1 = Point3.ZERO;\n let p22 = Point3.ZERO;\n while (k1 > _0n11 || k22 > _0n11) {\n if (k1 & _1n11)\n p1 = p1.add(acc);\n if (k22 & _1n11)\n p22 = p22.add(acc);\n acc = acc.double();\n k1 >>= _1n11;\n k22 >>= _1n11;\n }\n return { p1, p2: p22 };\n }\n function pippenger3(c4, fieldN, points, scalars) {\n validateMSMPoints3(points, c4);\n validateMSMScalars3(scalars, fieldN);\n const plength = points.length;\n const slength = scalars.length;\n if (plength !== slength)\n throw new Error(\"arrays of points and scalars must have equal length\");\n const zero = c4.ZERO;\n const wbits = (0, utils_ts_1.bitLen)(BigInt(plength));\n let windowSize = 1;\n if (wbits > 12)\n windowSize = wbits - 3;\n else if (wbits > 4)\n windowSize = wbits - 2;\n else if (wbits > 0)\n windowSize = 2;\n const MASK = (0, utils_ts_1.bitMask)(windowSize);\n const buckets = new Array(Number(MASK) + 1).fill(zero);\n const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;\n let sum = zero;\n for (let i3 = lastBits; i3 >= 0; i3 -= windowSize) {\n buckets.fill(zero);\n for (let j2 = 0; j2 < slength; j2++) {\n const scalar = scalars[j2];\n const wbits2 = Number(scalar >> BigInt(i3) & MASK);\n buckets[wbits2] = buckets[wbits2].add(points[j2]);\n }\n let resI = zero;\n for (let j2 = buckets.length - 1, sumI = zero; j2 > 0; j2--) {\n sumI = sumI.add(buckets[j2]);\n resI = resI.add(sumI);\n }\n sum = sum.add(resI);\n if (i3 !== 0)\n for (let j2 = 0; j2 < windowSize; j2++)\n sum = sum.double();\n }\n return sum;\n }\n function precomputeMSMUnsafe(c4, fieldN, points, windowSize) {\n validateW3(windowSize, fieldN.BITS);\n validateMSMPoints3(points, c4);\n const zero = c4.ZERO;\n const tableSize = 2 ** windowSize - 1;\n const chunks = Math.ceil(fieldN.BITS / windowSize);\n const MASK = (0, utils_ts_1.bitMask)(windowSize);\n const tables = points.map((p4) => {\n const res = [];\n for (let i3 = 0, acc = p4; i3 < tableSize; i3++) {\n res.push(acc);\n acc = acc.add(p4);\n }\n return res;\n });\n return (scalars) => {\n validateMSMScalars3(scalars, fieldN);\n if (scalars.length > points.length)\n throw new Error(\"array of scalars must be smaller than array of points\");\n let res = zero;\n for (let i3 = 0; i3 < chunks; i3++) {\n if (res !== zero)\n for (let j2 = 0; j2 < windowSize; j2++)\n res = res.double();\n const shiftBy = BigInt(chunks * windowSize - (i3 + 1) * windowSize);\n for (let j2 = 0; j2 < scalars.length; j2++) {\n const n2 = scalars[j2];\n const curr = Number(n2 >> shiftBy & MASK);\n if (!curr)\n continue;\n res = res.add(tables[j2][curr - 1]);\n }\n }\n return res;\n };\n }\n function validateBasic2(curve) {\n (0, modular_ts_1.validateField)(curve.Fp);\n (0, utils_ts_1.validateObject)(curve, {\n n: \"bigint\",\n h: \"bigint\",\n Gx: \"field\",\n Gy: \"field\"\n }, {\n nBitLength: \"isSafeInteger\",\n nByteLength: \"isSafeInteger\"\n });\n return Object.freeze({\n ...(0, modular_ts_1.nLength)(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER }\n });\n }\n function createField2(order, field, isLE2) {\n if (field) {\n if (field.ORDER !== order)\n throw new Error(\"Field.ORDER must match order: Fp == p, Fn == n\");\n (0, modular_ts_1.validateField)(field);\n return field;\n } else {\n return (0, modular_ts_1.Field)(order, { isLE: isLE2 });\n }\n }\n function _createCurveFields2(type, CURVE, curveOpts = {}, FpFnLE) {\n if (FpFnLE === void 0)\n FpFnLE = type === \"edwards\";\n if (!CURVE || typeof CURVE !== \"object\")\n throw new Error(`expected valid ${type} CURVE object`);\n for (const p4 of [\"p\", \"n\", \"h\"]) {\n const val = CURVE[p4];\n if (!(typeof val === \"bigint\" && val > _0n11))\n throw new Error(`CURVE.${p4} must be positive bigint`);\n }\n const Fp = createField2(CURVE.p, curveOpts.Fp, FpFnLE);\n const Fn = createField2(CURVE.n, curveOpts.Fn, FpFnLE);\n const _b = type === \"weierstrass\" ? \"b\" : \"d\";\n const params = [\"Gx\", \"Gy\", \"a\", _b];\n for (const p4 of params) {\n if (!Fp.isValid(CURVE[p4]))\n throw new Error(`CURVE.${p4} must be valid field element of CURVE.Fp`);\n }\n CURVE = Object.freeze(Object.assign({}, CURVE));\n return { CURVE, Fp, Fn };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/edwards.js\n var require_edwards2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/edwards.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.PrimeEdwardsPoint = void 0;\n exports3.edwards = edwards;\n exports3.eddsa = eddsa;\n exports3.twistedEdwards = twistedEdwards;\n var utils_ts_1 = require_utils18();\n var curve_ts_1 = require_curve3();\n var modular_ts_1 = require_modular2();\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n var _8n3 = BigInt(8);\n function isEdValidXY(Fp, CURVE, x4, y6) {\n const x22 = Fp.sqr(x4);\n const y22 = Fp.sqr(y6);\n const left = Fp.add(Fp.mul(CURVE.a, x22), y22);\n const right = Fp.add(Fp.ONE, Fp.mul(CURVE.d, Fp.mul(x22, y22)));\n return Fp.eql(left, right);\n }\n function edwards(params, extraOpts = {}) {\n const validated = (0, curve_ts_1._createCurveFields)(\"edwards\", params, extraOpts, extraOpts.FpFnLE);\n const { Fp, Fn } = validated;\n let CURVE = validated.CURVE;\n const { h: cofactor } = CURVE;\n (0, utils_ts_1._validateObject)(extraOpts, {}, { uvRatio: \"function\" });\n const MASK = _2n8 << BigInt(Fn.BYTES * 8) - _1n11;\n const modP2 = (n2) => Fp.create(n2);\n const uvRatio = extraOpts.uvRatio || ((u2, v2) => {\n try {\n return { isValid: true, value: Fp.sqrt(Fp.div(u2, v2)) };\n } catch (e2) {\n return { isValid: false, value: _0n11 };\n }\n });\n if (!isEdValidXY(Fp, CURVE, CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n function acoord(title2, n2, banZero = false) {\n const min = banZero ? _1n11 : _0n11;\n (0, utils_ts_1.aInRange)(\"coordinate \" + title2, n2, min, MASK);\n return n2;\n }\n function aextpoint(other) {\n if (!(other instanceof Point3))\n throw new Error(\"ExtendedPoint expected\");\n }\n const toAffineMemo = (0, utils_ts_1.memoized)((p4, iz) => {\n const { X: X2, Y: Y2, Z: Z2 } = p4;\n const is0 = p4.is0();\n if (iz == null)\n iz = is0 ? _8n3 : Fp.inv(Z2);\n const x4 = modP2(X2 * iz);\n const y6 = modP2(Y2 * iz);\n const zz = Fp.mul(Z2, iz);\n if (is0)\n return { x: _0n11, y: _1n11 };\n if (zz !== _1n11)\n throw new Error(\"invZ was invalid\");\n return { x: x4, y: y6 };\n });\n const assertValidMemo = (0, utils_ts_1.memoized)((p4) => {\n const { a: a3, d: d5 } = CURVE;\n if (p4.is0())\n throw new Error(\"bad point: ZERO\");\n const { X: X2, Y: Y2, Z: Z2, T: T4 } = p4;\n const X22 = modP2(X2 * X2);\n const Y22 = modP2(Y2 * Y2);\n const Z22 = modP2(Z2 * Z2);\n const Z4 = modP2(Z22 * Z22);\n const aX2 = modP2(X22 * a3);\n const left = modP2(Z22 * modP2(aX2 + Y22));\n const right = modP2(Z4 + modP2(d5 * modP2(X22 * Y22)));\n if (left !== right)\n throw new Error(\"bad point: equation left != right (1)\");\n const XY = modP2(X2 * Y2);\n const ZT = modP2(Z2 * T4);\n if (XY !== ZT)\n throw new Error(\"bad point: equation left != right (2)\");\n return true;\n });\n class Point3 {\n constructor(X2, Y2, Z2, T4) {\n this.X = acoord(\"x\", X2);\n this.Y = acoord(\"y\", Y2);\n this.Z = acoord(\"z\", Z2, true);\n this.T = acoord(\"t\", T4);\n Object.freeze(this);\n }\n static CURVE() {\n return CURVE;\n }\n static fromAffine(p4) {\n if (p4 instanceof Point3)\n throw new Error(\"extended point not allowed\");\n const { x: x4, y: y6 } = p4 || {};\n acoord(\"x\", x4);\n acoord(\"y\", y6);\n return new Point3(x4, y6, _1n11, modP2(x4 * y6));\n }\n // Uses algo from RFC8032 5.1.3.\n static fromBytes(bytes, zip215 = false) {\n const len = Fp.BYTES;\n const { a: a3, d: d5 } = CURVE;\n bytes = (0, utils_ts_1.copyBytes)((0, utils_ts_1._abytes2)(bytes, len, \"point\"));\n (0, utils_ts_1._abool2)(zip215, \"zip215\");\n const normed = (0, utils_ts_1.copyBytes)(bytes);\n const lastByte = bytes[len - 1];\n normed[len - 1] = lastByte & ~128;\n const y6 = (0, utils_ts_1.bytesToNumberLE)(normed);\n const max = zip215 ? MASK : Fp.ORDER;\n (0, utils_ts_1.aInRange)(\"point.y\", y6, _0n11, max);\n const y22 = modP2(y6 * y6);\n const u2 = modP2(y22 - _1n11);\n const v2 = modP2(d5 * y22 - a3);\n let { isValid: isValid2, value: x4 } = uvRatio(u2, v2);\n if (!isValid2)\n throw new Error(\"bad point: invalid y coordinate\");\n const isXOdd = (x4 & _1n11) === _1n11;\n const isLastByteOdd = (lastByte & 128) !== 0;\n if (!zip215 && x4 === _0n11 && isLastByteOdd)\n throw new Error(\"bad point: x=0 and x_0=1\");\n if (isLastByteOdd !== isXOdd)\n x4 = modP2(-x4);\n return Point3.fromAffine({ x: x4, y: y6 });\n }\n static fromHex(bytes, zip215 = false) {\n return Point3.fromBytes((0, utils_ts_1.ensureBytes)(\"point\", bytes), zip215);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n precompute(windowSize = 8, isLazy = true) {\n wnaf.createCache(this, windowSize);\n if (!isLazy)\n this.multiply(_2n8);\n return this;\n }\n // Useful in fromAffine() - not for fromBytes(), which always created valid points.\n assertValidity() {\n assertValidMemo(this);\n }\n // Compare one point to another.\n equals(other) {\n aextpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n const X1Z2 = modP2(X1 * Z2);\n const X2Z1 = modP2(X2 * Z1);\n const Y1Z2 = modP2(Y1 * Z2);\n const Y2Z1 = modP2(Y2 * Z1);\n return X1Z2 === X2Z1 && Y1Z2 === Y2Z1;\n }\n is0() {\n return this.equals(Point3.ZERO);\n }\n negate() {\n return new Point3(modP2(-this.X), this.Y, this.Z, modP2(-this.T));\n }\n // Fast algo for doubling Extended Point.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd\n // Cost: 4M + 4S + 1*a + 6add + 1*2.\n double() {\n const { a: a3 } = CURVE;\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const A4 = modP2(X1 * X1);\n const B2 = modP2(Y1 * Y1);\n const C = modP2(_2n8 * modP2(Z1 * Z1));\n const D2 = modP2(a3 * A4);\n const x1y1 = X1 + Y1;\n const E2 = modP2(modP2(x1y1 * x1y1) - A4 - B2);\n const G = D2 + B2;\n const F2 = G - C;\n const H3 = D2 - B2;\n const X3 = modP2(E2 * F2);\n const Y3 = modP2(G * H3);\n const T32 = modP2(E2 * H3);\n const Z3 = modP2(F2 * G);\n return new Point3(X3, Y3, Z3, T32);\n }\n // Fast algo for adding 2 Extended Points.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#addition-add-2008-hwcd\n // Cost: 9M + 1*a + 1*d + 7add.\n add(other) {\n aextpoint(other);\n const { a: a3, d: d5 } = CURVE;\n const { X: X1, Y: Y1, Z: Z1, T: T1 } = this;\n const { X: X2, Y: Y2, Z: Z2, T: T22 } = other;\n const A4 = modP2(X1 * X2);\n const B2 = modP2(Y1 * Y2);\n const C = modP2(T1 * d5 * T22);\n const D2 = modP2(Z1 * Z2);\n const E2 = modP2((X1 + Y1) * (X2 + Y2) - A4 - B2);\n const F2 = D2 - C;\n const G = D2 + C;\n const H3 = modP2(B2 - a3 * A4);\n const X3 = modP2(E2 * F2);\n const Y3 = modP2(G * H3);\n const T32 = modP2(E2 * H3);\n const Z3 = modP2(F2 * G);\n return new Point3(X3, Y3, Z3, T32);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n // Constant-time multiplication.\n multiply(scalar) {\n if (!Fn.isValidNot0(scalar))\n throw new Error(\"invalid scalar: expected 1 <= sc < curve.n\");\n const { p: p4, f: f7 } = wnaf.cached(this, scalar, (p5) => (0, curve_ts_1.normalizeZ)(Point3, p5));\n return (0, curve_ts_1.normalizeZ)(Point3, [p4, f7])[0];\n }\n // Non-constant-time multiplication. Uses double-and-add algorithm.\n // It's faster, but should only be used when you don't care about\n // an exposed private key e.g. sig verification.\n // Does NOT allow scalars higher than CURVE.n.\n // Accepts optional accumulator to merge with multiply (important for sparse scalars)\n multiplyUnsafe(scalar, acc = Point3.ZERO) {\n if (!Fn.isValid(scalar))\n throw new Error(\"invalid scalar: expected 0 <= sc < curve.n\");\n if (scalar === _0n11)\n return Point3.ZERO;\n if (this.is0() || scalar === _1n11)\n return this;\n return wnaf.unsafe(this, scalar, (p4) => (0, curve_ts_1.normalizeZ)(Point3, p4), acc);\n }\n // Checks if point is of small order.\n // If you add something to small order point, you will have \"dirty\"\n // point with torsion component.\n // Multiplies point by cofactor and checks if the result is 0.\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n // Multiplies point by curve order and checks if the result is 0.\n // Returns `false` is the point is dirty.\n isTorsionFree() {\n return wnaf.unsafe(this, CURVE.n).is0();\n }\n // Converts Extended point to default (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n toAffine(invertedZ) {\n return toAffineMemo(this, invertedZ);\n }\n clearCofactor() {\n if (cofactor === _1n11)\n return this;\n return this.multiplyUnsafe(cofactor);\n }\n toBytes() {\n const { x: x4, y: y6 } = this.toAffine();\n const bytes = Fp.toBytes(y6);\n bytes[bytes.length - 1] |= x4 & _1n11 ? 128 : 0;\n return bytes;\n }\n toHex() {\n return (0, utils_ts_1.bytesToHex)(this.toBytes());\n }\n toString() {\n return ``;\n }\n // TODO: remove\n get ex() {\n return this.X;\n }\n get ey() {\n return this.Y;\n }\n get ez() {\n return this.Z;\n }\n get et() {\n return this.T;\n }\n static normalizeZ(points) {\n return (0, curve_ts_1.normalizeZ)(Point3, points);\n }\n static msm(points, scalars) {\n return (0, curve_ts_1.pippenger)(Point3, Fn, points, scalars);\n }\n _setWindowSize(windowSize) {\n this.precompute(windowSize);\n }\n toRawBytes() {\n return this.toBytes();\n }\n }\n Point3.BASE = new Point3(CURVE.Gx, CURVE.Gy, _1n11, modP2(CURVE.Gx * CURVE.Gy));\n Point3.ZERO = new Point3(_0n11, _1n11, _1n11, _0n11);\n Point3.Fp = Fp;\n Point3.Fn = Fn;\n const wnaf = new curve_ts_1.wNAF(Point3, Fn.BITS);\n Point3.BASE.precompute(8);\n return Point3;\n }\n var PrimeEdwardsPoint = class {\n constructor(ep) {\n this.ep = ep;\n }\n // Static methods that must be implemented by subclasses\n static fromBytes(_bytes) {\n (0, utils_ts_1.notImplemented)();\n }\n static fromHex(_hex) {\n (0, utils_ts_1.notImplemented)();\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n // Common implementations\n clearCofactor() {\n return this;\n }\n assertValidity() {\n this.ep.assertValidity();\n }\n toAffine(invertedZ) {\n return this.ep.toAffine(invertedZ);\n }\n toHex() {\n return (0, utils_ts_1.bytesToHex)(this.toBytes());\n }\n toString() {\n return this.toHex();\n }\n isTorsionFree() {\n return true;\n }\n isSmallOrder() {\n return false;\n }\n add(other) {\n this.assertSame(other);\n return this.init(this.ep.add(other.ep));\n }\n subtract(other) {\n this.assertSame(other);\n return this.init(this.ep.subtract(other.ep));\n }\n multiply(scalar) {\n return this.init(this.ep.multiply(scalar));\n }\n multiplyUnsafe(scalar) {\n return this.init(this.ep.multiplyUnsafe(scalar));\n }\n double() {\n return this.init(this.ep.double());\n }\n negate() {\n return this.init(this.ep.negate());\n }\n precompute(windowSize, isLazy) {\n return this.init(this.ep.precompute(windowSize, isLazy));\n }\n /** @deprecated use `toBytes` */\n toRawBytes() {\n return this.toBytes();\n }\n };\n exports3.PrimeEdwardsPoint = PrimeEdwardsPoint;\n function eddsa(Point3, cHash, eddsaOpts = {}) {\n if (typeof cHash !== \"function\")\n throw new Error('\"hash\" function param is required');\n (0, utils_ts_1._validateObject)(eddsaOpts, {}, {\n adjustScalarBytes: \"function\",\n randomBytes: \"function\",\n domain: \"function\",\n prehash: \"function\",\n mapToCurve: \"function\"\n });\n const { prehash } = eddsaOpts;\n const { BASE, Fp, Fn } = Point3;\n const randomBytes2 = eddsaOpts.randomBytes || utils_ts_1.randomBytes;\n const adjustScalarBytes = eddsaOpts.adjustScalarBytes || ((bytes) => bytes);\n const domain2 = eddsaOpts.domain || ((data, ctx, phflag) => {\n (0, utils_ts_1._abool2)(phflag, \"phflag\");\n if (ctx.length || phflag)\n throw new Error(\"Contexts/pre-hash are not supported\");\n return data;\n });\n function modN_LE(hash3) {\n return Fn.create((0, utils_ts_1.bytesToNumberLE)(hash3));\n }\n function getPrivateScalar(key) {\n const len = lengths.secretKey;\n key = (0, utils_ts_1.ensureBytes)(\"private key\", key, len);\n const hashed = (0, utils_ts_1.ensureBytes)(\"hashed private key\", cHash(key), 2 * len);\n const head = adjustScalarBytes(hashed.slice(0, len));\n const prefix = hashed.slice(len, 2 * len);\n const scalar = modN_LE(head);\n return { head, prefix, scalar };\n }\n function getExtendedPublicKey(secretKey) {\n const { head, prefix, scalar } = getPrivateScalar(secretKey);\n const point = BASE.multiply(scalar);\n const pointBytes = point.toBytes();\n return { head, prefix, scalar, point, pointBytes };\n }\n function getPublicKey(secretKey) {\n return getExtendedPublicKey(secretKey).pointBytes;\n }\n function hashDomainToScalar(context2 = Uint8Array.of(), ...msgs) {\n const msg = (0, utils_ts_1.concatBytes)(...msgs);\n return modN_LE(cHash(domain2(msg, (0, utils_ts_1.ensureBytes)(\"context\", context2), !!prehash)));\n }\n function sign4(msg, secretKey, options = {}) {\n msg = (0, utils_ts_1.ensureBytes)(\"message\", msg);\n if (prehash)\n msg = prehash(msg);\n const { prefix, scalar, pointBytes } = getExtendedPublicKey(secretKey);\n const r2 = hashDomainToScalar(options.context, prefix, msg);\n const R3 = BASE.multiply(r2).toBytes();\n const k4 = hashDomainToScalar(options.context, R3, pointBytes, msg);\n const s4 = Fn.create(r2 + k4 * scalar);\n if (!Fn.isValid(s4))\n throw new Error(\"sign failed: invalid s\");\n const rs = (0, utils_ts_1.concatBytes)(R3, Fn.toBytes(s4));\n return (0, utils_ts_1._abytes2)(rs, lengths.signature, \"result\");\n }\n const verifyOpts = { zip215: true };\n function verify2(sig, msg, publicKey, options = verifyOpts) {\n const { context: context2, zip215 } = options;\n const len = lengths.signature;\n sig = (0, utils_ts_1.ensureBytes)(\"signature\", sig, len);\n msg = (0, utils_ts_1.ensureBytes)(\"message\", msg);\n publicKey = (0, utils_ts_1.ensureBytes)(\"publicKey\", publicKey, lengths.publicKey);\n if (zip215 !== void 0)\n (0, utils_ts_1._abool2)(zip215, \"zip215\");\n if (prehash)\n msg = prehash(msg);\n const mid = len / 2;\n const r2 = sig.subarray(0, mid);\n const s4 = (0, utils_ts_1.bytesToNumberLE)(sig.subarray(mid, len));\n let A4, R3, SB;\n try {\n A4 = Point3.fromBytes(publicKey, zip215);\n R3 = Point3.fromBytes(r2, zip215);\n SB = BASE.multiplyUnsafe(s4);\n } catch (error) {\n return false;\n }\n if (!zip215 && A4.isSmallOrder())\n return false;\n const k4 = hashDomainToScalar(context2, R3.toBytes(), A4.toBytes(), msg);\n const RkA = R3.add(A4.multiplyUnsafe(k4));\n return RkA.subtract(SB).clearCofactor().is0();\n }\n const _size = Fp.BYTES;\n const lengths = {\n secretKey: _size,\n publicKey: _size,\n signature: 2 * _size,\n seed: _size\n };\n function randomSecretKey(seed = randomBytes2(lengths.seed)) {\n return (0, utils_ts_1._abytes2)(seed, lengths.seed, \"seed\");\n }\n function keygen(seed) {\n const secretKey = utils.randomSecretKey(seed);\n return { secretKey, publicKey: getPublicKey(secretKey) };\n }\n function isValidSecretKey(key) {\n return (0, utils_ts_1.isBytes)(key) && key.length === Fn.BYTES;\n }\n function isValidPublicKey(key, zip215) {\n try {\n return !!Point3.fromBytes(key, zip215);\n } catch (error) {\n return false;\n }\n }\n const utils = {\n getExtendedPublicKey,\n randomSecretKey,\n isValidSecretKey,\n isValidPublicKey,\n /**\n * Converts ed public key to x public key. Uses formula:\n * - ed25519:\n * - `(u, v) = ((1+y)/(1-y), sqrt(-486664)*u/x)`\n * - `(x, y) = (sqrt(-486664)*u/v, (u-1)/(u+1))`\n * - ed448:\n * - `(u, v) = ((y-1)/(y+1), sqrt(156324)*u/x)`\n * - `(x, y) = (sqrt(156324)*u/v, (1+u)/(1-u))`\n */\n toMontgomery(publicKey) {\n const { y: y6 } = Point3.fromBytes(publicKey);\n const size6 = lengths.publicKey;\n const is25519 = size6 === 32;\n if (!is25519 && size6 !== 57)\n throw new Error(\"only defined for 25519 and 448\");\n const u2 = is25519 ? Fp.div(_1n11 + y6, _1n11 - y6) : Fp.div(y6 - _1n11, y6 + _1n11);\n return Fp.toBytes(u2);\n },\n toMontgomerySecret(secretKey) {\n const size6 = lengths.secretKey;\n (0, utils_ts_1._abytes2)(secretKey, size6);\n const hashed = cHash(secretKey.subarray(0, size6));\n return adjustScalarBytes(hashed).subarray(0, size6);\n },\n /** @deprecated */\n randomPrivateKey: randomSecretKey,\n /** @deprecated */\n precompute(windowSize = 8, point = Point3.BASE) {\n return point.precompute(windowSize, false);\n }\n };\n return Object.freeze({\n keygen,\n getPublicKey,\n sign: sign4,\n verify: verify2,\n utils,\n Point: Point3,\n lengths\n });\n }\n function _eddsa_legacy_opts_to_new(c4) {\n const CURVE = {\n a: c4.a,\n d: c4.d,\n p: c4.Fp.ORDER,\n n: c4.n,\n h: c4.h,\n Gx: c4.Gx,\n Gy: c4.Gy\n };\n const Fp = c4.Fp;\n const Fn = (0, modular_ts_1.Field)(CURVE.n, c4.nBitLength, true);\n const curveOpts = { Fp, Fn, uvRatio: c4.uvRatio };\n const eddsaOpts = {\n randomBytes: c4.randomBytes,\n adjustScalarBytes: c4.adjustScalarBytes,\n domain: c4.domain,\n prehash: c4.prehash,\n mapToCurve: c4.mapToCurve\n };\n return { CURVE, curveOpts, hash: c4.hash, eddsaOpts };\n }\n function _eddsa_new_output_to_legacy(c4, eddsa2) {\n const Point3 = eddsa2.Point;\n const legacy = Object.assign({}, eddsa2, {\n ExtendedPoint: Point3,\n CURVE: c4,\n nBitLength: Point3.Fn.BITS,\n nByteLength: Point3.Fn.BYTES\n });\n return legacy;\n }\n function twistedEdwards(c4) {\n const { CURVE, curveOpts, hash: hash3, eddsaOpts } = _eddsa_legacy_opts_to_new(c4);\n const Point3 = edwards(CURVE, curveOpts);\n const EDDSA = eddsa(Point3, hash3, eddsaOpts);\n return _eddsa_new_output_to_legacy(c4, EDDSA);\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/hash-to-curve.js\n var require_hash_to_curve2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/hash-to-curve.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3._DST_scalar = void 0;\n exports3.expand_message_xmd = expand_message_xmd2;\n exports3.expand_message_xof = expand_message_xof2;\n exports3.hash_to_field = hash_to_field2;\n exports3.isogenyMap = isogenyMap2;\n exports3.createHasher = createHasher3;\n var utils_ts_1 = require_utils18();\n var modular_ts_1 = require_modular2();\n var os2ip2 = utils_ts_1.bytesToNumberBE;\n function i2osp2(value, length) {\n anum2(value);\n anum2(length);\n if (value < 0 || value >= 1 << 8 * length)\n throw new Error(\"invalid I2OSP input: \" + value);\n const res = Array.from({ length }).fill(0);\n for (let i3 = length - 1; i3 >= 0; i3--) {\n res[i3] = value & 255;\n value >>>= 8;\n }\n return new Uint8Array(res);\n }\n function strxor2(a3, b4) {\n const arr = new Uint8Array(a3.length);\n for (let i3 = 0; i3 < a3.length; i3++) {\n arr[i3] = a3[i3] ^ b4[i3];\n }\n return arr;\n }\n function anum2(item) {\n if (!Number.isSafeInteger(item))\n throw new Error(\"number expected\");\n }\n function normDST(DST) {\n if (!(0, utils_ts_1.isBytes)(DST) && typeof DST !== \"string\")\n throw new Error(\"DST must be Uint8Array or string\");\n return typeof DST === \"string\" ? (0, utils_ts_1.utf8ToBytes)(DST) : DST;\n }\n function expand_message_xmd2(msg, DST, lenInBytes, H3) {\n (0, utils_ts_1.abytes)(msg);\n anum2(lenInBytes);\n DST = normDST(DST);\n if (DST.length > 255)\n DST = H3((0, utils_ts_1.concatBytes)((0, utils_ts_1.utf8ToBytes)(\"H2C-OVERSIZE-DST-\"), DST));\n const { outputLen: b_in_bytes, blockLen: r_in_bytes } = H3;\n const ell = Math.ceil(lenInBytes / b_in_bytes);\n if (lenInBytes > 65535 || ell > 255)\n throw new Error(\"expand_message_xmd: invalid lenInBytes\");\n const DST_prime = (0, utils_ts_1.concatBytes)(DST, i2osp2(DST.length, 1));\n const Z_pad = i2osp2(0, r_in_bytes);\n const l_i_b_str = i2osp2(lenInBytes, 2);\n const b4 = new Array(ell);\n const b_0 = H3((0, utils_ts_1.concatBytes)(Z_pad, msg, l_i_b_str, i2osp2(0, 1), DST_prime));\n b4[0] = H3((0, utils_ts_1.concatBytes)(b_0, i2osp2(1, 1), DST_prime));\n for (let i3 = 1; i3 <= ell; i3++) {\n const args = [strxor2(b_0, b4[i3 - 1]), i2osp2(i3 + 1, 1), DST_prime];\n b4[i3] = H3((0, utils_ts_1.concatBytes)(...args));\n }\n const pseudo_random_bytes = (0, utils_ts_1.concatBytes)(...b4);\n return pseudo_random_bytes.slice(0, lenInBytes);\n }\n function expand_message_xof2(msg, DST, lenInBytes, k4, H3) {\n (0, utils_ts_1.abytes)(msg);\n anum2(lenInBytes);\n DST = normDST(DST);\n if (DST.length > 255) {\n const dkLen = Math.ceil(2 * k4 / 8);\n DST = H3.create({ dkLen }).update((0, utils_ts_1.utf8ToBytes)(\"H2C-OVERSIZE-DST-\")).update(DST).digest();\n }\n if (lenInBytes > 65535 || DST.length > 255)\n throw new Error(\"expand_message_xof: invalid lenInBytes\");\n return H3.create({ dkLen: lenInBytes }).update(msg).update(i2osp2(lenInBytes, 2)).update(DST).update(i2osp2(DST.length, 1)).digest();\n }\n function hash_to_field2(msg, count, options) {\n (0, utils_ts_1._validateObject)(options, {\n p: \"bigint\",\n m: \"number\",\n k: \"number\",\n hash: \"function\"\n });\n const { p: p4, k: k4, m: m2, hash: hash3, expand, DST } = options;\n if (!(0, utils_ts_1.isHash)(options.hash))\n throw new Error(\"expected valid hash\");\n (0, utils_ts_1.abytes)(msg);\n anum2(count);\n const log2p = p4.toString(2).length;\n const L2 = Math.ceil((log2p + k4) / 8);\n const len_in_bytes = count * m2 * L2;\n let prb;\n if (expand === \"xmd\") {\n prb = expand_message_xmd2(msg, DST, len_in_bytes, hash3);\n } else if (expand === \"xof\") {\n prb = expand_message_xof2(msg, DST, len_in_bytes, k4, hash3);\n } else if (expand === \"_internal_pass\") {\n prb = msg;\n } else {\n throw new Error('expand must be \"xmd\" or \"xof\"');\n }\n const u2 = new Array(count);\n for (let i3 = 0; i3 < count; i3++) {\n const e2 = new Array(m2);\n for (let j2 = 0; j2 < m2; j2++) {\n const elm_offset = L2 * (j2 + i3 * m2);\n const tv = prb.subarray(elm_offset, elm_offset + L2);\n e2[j2] = (0, modular_ts_1.mod)(os2ip2(tv), p4);\n }\n u2[i3] = e2;\n }\n return u2;\n }\n function isogenyMap2(field, map) {\n const coeff = map.map((i3) => Array.from(i3).reverse());\n return (x4, y6) => {\n const [xn, xd, yn, yd] = coeff.map((val) => val.reduce((acc, i3) => field.add(field.mul(acc, x4), i3)));\n const [xd_inv, yd_inv] = (0, modular_ts_1.FpInvertBatch)(field, [xd, yd], true);\n x4 = field.mul(xn, xd_inv);\n y6 = field.mul(y6, field.mul(yn, yd_inv));\n return { x: x4, y: y6 };\n };\n }\n exports3._DST_scalar = (0, utils_ts_1.utf8ToBytes)(\"HashToScalar-\");\n function createHasher3(Point3, mapToCurve, defaults) {\n if (typeof mapToCurve !== \"function\")\n throw new Error(\"mapToCurve() must be defined\");\n function map(num2) {\n return Point3.fromAffine(mapToCurve(num2));\n }\n function clear(initial) {\n const P2 = initial.clearCofactor();\n if (P2.equals(Point3.ZERO))\n return Point3.ZERO;\n P2.assertValidity();\n return P2;\n }\n return {\n defaults,\n hashToCurve(msg, options) {\n const opts = Object.assign({}, defaults, options);\n const u2 = hash_to_field2(msg, 2, opts);\n const u0 = map(u2[0]);\n const u1 = map(u2[1]);\n return clear(u0.add(u1));\n },\n encodeToCurve(msg, options) {\n const optsDst = defaults.encodeDST ? { DST: defaults.encodeDST } : {};\n const opts = Object.assign({}, defaults, optsDst, options);\n const u2 = hash_to_field2(msg, 1, opts);\n const u0 = map(u2[0]);\n return clear(u0);\n },\n /** See {@link H2CHasher} */\n mapToCurve(scalars) {\n if (!Array.isArray(scalars))\n throw new Error(\"expected array of bigints\");\n for (const i3 of scalars)\n if (typeof i3 !== \"bigint\")\n throw new Error(\"expected array of bigints\");\n return clear(map(scalars));\n },\n // hash_to_scalar can produce 0: https://www.rfc-editor.org/errata/eid8393\n // RFC 9380, draft-irtf-cfrg-bbs-signatures-08\n hashToScalar(msg, options) {\n const N4 = Point3.Fn.ORDER;\n const opts = Object.assign({}, defaults, { p: N4, m: 1, DST: exports3._DST_scalar }, options);\n return hash_to_field2(msg, 1, opts)[0][0];\n }\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/montgomery.js\n var require_montgomery = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/montgomery.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.montgomery = montgomery;\n var utils_ts_1 = require_utils18();\n var modular_ts_1 = require_modular2();\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n function validateOpts2(curve) {\n (0, utils_ts_1._validateObject)(curve, {\n adjustScalarBytes: \"function\",\n powPminus2: \"function\"\n });\n return Object.freeze({ ...curve });\n }\n function montgomery(curveDef) {\n const CURVE = validateOpts2(curveDef);\n const { P: P2, type, adjustScalarBytes, powPminus2, randomBytes: rand } = CURVE;\n const is25519 = type === \"x25519\";\n if (!is25519 && type !== \"x448\")\n throw new Error(\"invalid type\");\n const randomBytes_ = rand || utils_ts_1.randomBytes;\n const montgomeryBits = is25519 ? 255 : 448;\n const fieldLen = is25519 ? 32 : 56;\n const Gu = is25519 ? BigInt(9) : BigInt(5);\n const a24 = is25519 ? BigInt(121665) : BigInt(39081);\n const minScalar = is25519 ? _2n8 ** BigInt(254) : _2n8 ** BigInt(447);\n const maxAdded = is25519 ? BigInt(8) * _2n8 ** BigInt(251) - _1n11 : BigInt(4) * _2n8 ** BigInt(445) - _1n11;\n const maxScalar = minScalar + maxAdded + _1n11;\n const modP2 = (n2) => (0, modular_ts_1.mod)(n2, P2);\n const GuBytes = encodeU(Gu);\n function encodeU(u2) {\n return (0, utils_ts_1.numberToBytesLE)(modP2(u2), fieldLen);\n }\n function decodeU(u2) {\n const _u = (0, utils_ts_1.ensureBytes)(\"u coordinate\", u2, fieldLen);\n if (is25519)\n _u[31] &= 127;\n return modP2((0, utils_ts_1.bytesToNumberLE)(_u));\n }\n function decodeScalar(scalar) {\n return (0, utils_ts_1.bytesToNumberLE)(adjustScalarBytes((0, utils_ts_1.ensureBytes)(\"scalar\", scalar, fieldLen)));\n }\n function scalarMult(scalar, u2) {\n const pu = montgomeryLadder(decodeU(u2), decodeScalar(scalar));\n if (pu === _0n11)\n throw new Error(\"invalid private or public key received\");\n return encodeU(pu);\n }\n function scalarMultBase(scalar) {\n return scalarMult(scalar, GuBytes);\n }\n function cswap(swap, x_2, x_3) {\n const dummy = modP2(swap * (x_2 - x_3));\n x_2 = modP2(x_2 - dummy);\n x_3 = modP2(x_3 + dummy);\n return { x_2, x_3 };\n }\n function montgomeryLadder(u2, scalar) {\n (0, utils_ts_1.aInRange)(\"u\", u2, _0n11, P2);\n (0, utils_ts_1.aInRange)(\"scalar\", scalar, minScalar, maxScalar);\n const k4 = scalar;\n const x_1 = u2;\n let x_2 = _1n11;\n let z_2 = _0n11;\n let x_3 = u2;\n let z_3 = _1n11;\n let swap = _0n11;\n for (let t3 = BigInt(montgomeryBits - 1); t3 >= _0n11; t3--) {\n const k_t = k4 >> t3 & _1n11;\n swap ^= k_t;\n ({ x_2, x_3 } = cswap(swap, x_2, x_3));\n ({ x_2: z_2, x_3: z_3 } = cswap(swap, z_2, z_3));\n swap = k_t;\n const A4 = x_2 + z_2;\n const AA = modP2(A4 * A4);\n const B2 = x_2 - z_2;\n const BB = modP2(B2 * B2);\n const E2 = AA - BB;\n const C = x_3 + z_3;\n const D2 = x_3 - z_3;\n const DA = modP2(D2 * A4);\n const CB = modP2(C * B2);\n const dacb = DA + CB;\n const da_cb = DA - CB;\n x_3 = modP2(dacb * dacb);\n z_3 = modP2(x_1 * modP2(da_cb * da_cb));\n x_2 = modP2(AA * BB);\n z_2 = modP2(E2 * (AA + modP2(a24 * E2)));\n }\n ({ x_2, x_3 } = cswap(swap, x_2, x_3));\n ({ x_2: z_2, x_3: z_3 } = cswap(swap, z_2, z_3));\n const z2 = powPminus2(z_2);\n return modP2(x_2 * z2);\n }\n const lengths = {\n secretKey: fieldLen,\n publicKey: fieldLen,\n seed: fieldLen\n };\n const randomSecretKey = (seed = randomBytes_(fieldLen)) => {\n (0, utils_ts_1.abytes)(seed, lengths.seed);\n return seed;\n };\n function keygen(seed) {\n const secretKey = randomSecretKey(seed);\n return { secretKey, publicKey: scalarMultBase(secretKey) };\n }\n const utils = {\n randomSecretKey,\n randomPrivateKey: randomSecretKey\n };\n return {\n keygen,\n getSharedSecret: (secretKey, publicKey) => scalarMult(secretKey, publicKey),\n getPublicKey: (secretKey) => scalarMultBase(secretKey),\n scalarMult,\n scalarMultBase,\n utils,\n GuBytes: GuBytes.slice(),\n lengths\n };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/ed25519.js\n var require_ed25519 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/ed25519.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.hash_to_ristretto255 = exports3.hashToRistretto255 = exports3.encodeToCurve = exports3.hashToCurve = exports3.RistrettoPoint = exports3.edwardsToMontgomery = exports3.ED25519_TORSION_SUBGROUP = exports3.ristretto255_hasher = exports3.ristretto255 = exports3.ed25519_hasher = exports3.x25519 = exports3.ed25519ph = exports3.ed25519ctx = exports3.ed25519 = void 0;\n exports3.edwardsToMontgomeryPub = edwardsToMontgomeryPub;\n exports3.edwardsToMontgomeryPriv = edwardsToMontgomeryPriv;\n var sha2_js_1 = require_sha23();\n var utils_js_1 = require_utils17();\n var curve_ts_1 = require_curve3();\n var edwards_ts_1 = require_edwards2();\n var hash_to_curve_ts_1 = require_hash_to_curve2();\n var modular_ts_1 = require_modular2();\n var montgomery_ts_1 = require_montgomery();\n var utils_ts_1 = require_utils18();\n var _0n11 = /* @__PURE__ */ BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n var _3n5 = BigInt(3);\n var _5n3 = BigInt(5);\n var _8n3 = BigInt(8);\n var ed25519_CURVE_p = BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed\");\n var ed25519_CURVE = /* @__PURE__ */ (() => ({\n p: ed25519_CURVE_p,\n n: BigInt(\"0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed\"),\n h: _8n3,\n a: BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec\"),\n d: BigInt(\"0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3\"),\n Gx: BigInt(\"0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a\"),\n Gy: BigInt(\"0x6666666666666666666666666666666666666666666666666666666666666658\")\n }))();\n function ed25519_pow_2_252_3(x4) {\n const _10n = BigInt(10), _20n = BigInt(20), _40n = BigInt(40), _80n = BigInt(80);\n const P2 = ed25519_CURVE_p;\n const x22 = x4 * x4 % P2;\n const b22 = x22 * x4 % P2;\n const b4 = (0, modular_ts_1.pow2)(b22, _2n8, P2) * b22 % P2;\n const b5 = (0, modular_ts_1.pow2)(b4, _1n11, P2) * x4 % P2;\n const b10 = (0, modular_ts_1.pow2)(b5, _5n3, P2) * b5 % P2;\n const b20 = (0, modular_ts_1.pow2)(b10, _10n, P2) * b10 % P2;\n const b40 = (0, modular_ts_1.pow2)(b20, _20n, P2) * b20 % P2;\n const b80 = (0, modular_ts_1.pow2)(b40, _40n, P2) * b40 % P2;\n const b160 = (0, modular_ts_1.pow2)(b80, _80n, P2) * b80 % P2;\n const b240 = (0, modular_ts_1.pow2)(b160, _80n, P2) * b80 % P2;\n const b250 = (0, modular_ts_1.pow2)(b240, _10n, P2) * b10 % P2;\n const pow_p_5_8 = (0, modular_ts_1.pow2)(b250, _2n8, P2) * x4 % P2;\n return { pow_p_5_8, b2: b22 };\n }\n function adjustScalarBytes(bytes) {\n bytes[0] &= 248;\n bytes[31] &= 127;\n bytes[31] |= 64;\n return bytes;\n }\n var ED25519_SQRT_M1 = /* @__PURE__ */ BigInt(\"19681161376707505956807079304988542015446066515923890162744021073123829784752\");\n function uvRatio(u2, v2) {\n const P2 = ed25519_CURVE_p;\n const v32 = (0, modular_ts_1.mod)(v2 * v2 * v2, P2);\n const v7 = (0, modular_ts_1.mod)(v32 * v32 * v2, P2);\n const pow = ed25519_pow_2_252_3(u2 * v7).pow_p_5_8;\n let x4 = (0, modular_ts_1.mod)(u2 * v32 * pow, P2);\n const vx2 = (0, modular_ts_1.mod)(v2 * x4 * x4, P2);\n const root1 = x4;\n const root2 = (0, modular_ts_1.mod)(x4 * ED25519_SQRT_M1, P2);\n const useRoot1 = vx2 === u2;\n const useRoot2 = vx2 === (0, modular_ts_1.mod)(-u2, P2);\n const noRoot = vx2 === (0, modular_ts_1.mod)(-u2 * ED25519_SQRT_M1, P2);\n if (useRoot1)\n x4 = root1;\n if (useRoot2 || noRoot)\n x4 = root2;\n if ((0, modular_ts_1.isNegativeLE)(x4, P2))\n x4 = (0, modular_ts_1.mod)(-x4, P2);\n return { isValid: useRoot1 || useRoot2, value: x4 };\n }\n var Fp = /* @__PURE__ */ (() => (0, modular_ts_1.Field)(ed25519_CURVE.p, { isLE: true }))();\n var Fn = /* @__PURE__ */ (() => (0, modular_ts_1.Field)(ed25519_CURVE.n, { isLE: true }))();\n var ed25519Defaults = /* @__PURE__ */ (() => ({\n ...ed25519_CURVE,\n Fp,\n hash: sha2_js_1.sha512,\n adjustScalarBytes,\n // dom2\n // Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.\n // Constant-time, u/√v\n uvRatio\n }))();\n exports3.ed25519 = (() => (0, edwards_ts_1.twistedEdwards)(ed25519Defaults))();\n function ed25519_domain(data, ctx, phflag) {\n if (ctx.length > 255)\n throw new Error(\"Context is too big\");\n return (0, utils_js_1.concatBytes)((0, utils_js_1.utf8ToBytes)(\"SigEd25519 no Ed25519 collisions\"), new Uint8Array([phflag ? 1 : 0, ctx.length]), ctx, data);\n }\n exports3.ed25519ctx = (() => (0, edwards_ts_1.twistedEdwards)({\n ...ed25519Defaults,\n domain: ed25519_domain\n }))();\n exports3.ed25519ph = (() => (0, edwards_ts_1.twistedEdwards)(Object.assign({}, ed25519Defaults, {\n domain: ed25519_domain,\n prehash: sha2_js_1.sha512\n })))();\n exports3.x25519 = (() => {\n const P2 = Fp.ORDER;\n return (0, montgomery_ts_1.montgomery)({\n P: P2,\n type: \"x25519\",\n powPminus2: (x4) => {\n const { pow_p_5_8, b2: b22 } = ed25519_pow_2_252_3(x4);\n return (0, modular_ts_1.mod)((0, modular_ts_1.pow2)(pow_p_5_8, _3n5, P2) * b22, P2);\n },\n adjustScalarBytes\n });\n })();\n var ELL2_C1 = /* @__PURE__ */ (() => (ed25519_CURVE_p + _3n5) / _8n3)();\n var ELL2_C2 = /* @__PURE__ */ (() => Fp.pow(_2n8, ELL2_C1))();\n var ELL2_C3 = /* @__PURE__ */ (() => Fp.sqrt(Fp.neg(Fp.ONE)))();\n function map_to_curve_elligator2_curve25519(u2) {\n const ELL2_C4 = (ed25519_CURVE_p - _5n3) / _8n3;\n const ELL2_J = BigInt(486662);\n let tv1 = Fp.sqr(u2);\n tv1 = Fp.mul(tv1, _2n8);\n let xd = Fp.add(tv1, Fp.ONE);\n let x1n = Fp.neg(ELL2_J);\n let tv2 = Fp.sqr(xd);\n let gxd = Fp.mul(tv2, xd);\n let gx1 = Fp.mul(tv1, ELL2_J);\n gx1 = Fp.mul(gx1, x1n);\n gx1 = Fp.add(gx1, tv2);\n gx1 = Fp.mul(gx1, x1n);\n let tv3 = Fp.sqr(gxd);\n tv2 = Fp.sqr(tv3);\n tv3 = Fp.mul(tv3, gxd);\n tv3 = Fp.mul(tv3, gx1);\n tv2 = Fp.mul(tv2, tv3);\n let y11 = Fp.pow(tv2, ELL2_C4);\n y11 = Fp.mul(y11, tv3);\n let y12 = Fp.mul(y11, ELL2_C3);\n tv2 = Fp.sqr(y11);\n tv2 = Fp.mul(tv2, gxd);\n let e1 = Fp.eql(tv2, gx1);\n let y1 = Fp.cmov(y12, y11, e1);\n let x2n = Fp.mul(x1n, tv1);\n let y21 = Fp.mul(y11, u2);\n y21 = Fp.mul(y21, ELL2_C2);\n let y22 = Fp.mul(y21, ELL2_C3);\n let gx2 = Fp.mul(gx1, tv1);\n tv2 = Fp.sqr(y21);\n tv2 = Fp.mul(tv2, gxd);\n let e2 = Fp.eql(tv2, gx2);\n let y23 = Fp.cmov(y22, y21, e2);\n tv2 = Fp.sqr(y1);\n tv2 = Fp.mul(tv2, gxd);\n let e3 = Fp.eql(tv2, gx1);\n let xn = Fp.cmov(x2n, x1n, e3);\n let y6 = Fp.cmov(y23, y1, e3);\n let e4 = Fp.isOdd(y6);\n y6 = Fp.cmov(y6, Fp.neg(y6), e3 !== e4);\n return { xMn: xn, xMd: xd, yMn: y6, yMd: _1n11 };\n }\n var ELL2_C1_EDWARDS = /* @__PURE__ */ (() => (0, modular_ts_1.FpSqrtEven)(Fp, Fp.neg(BigInt(486664))))();\n function map_to_curve_elligator2_edwards25519(u2) {\n const { xMn, xMd, yMn, yMd } = map_to_curve_elligator2_curve25519(u2);\n let xn = Fp.mul(xMn, yMd);\n xn = Fp.mul(xn, ELL2_C1_EDWARDS);\n let xd = Fp.mul(xMd, yMn);\n let yn = Fp.sub(xMn, xMd);\n let yd = Fp.add(xMn, xMd);\n let tv1 = Fp.mul(xd, yd);\n let e2 = Fp.eql(tv1, Fp.ZERO);\n xn = Fp.cmov(xn, Fp.ZERO, e2);\n xd = Fp.cmov(xd, Fp.ONE, e2);\n yn = Fp.cmov(yn, Fp.ONE, e2);\n yd = Fp.cmov(yd, Fp.ONE, e2);\n const [xd_inv, yd_inv] = (0, modular_ts_1.FpInvertBatch)(Fp, [xd, yd], true);\n return { x: Fp.mul(xn, xd_inv), y: Fp.mul(yn, yd_inv) };\n }\n exports3.ed25519_hasher = (() => (0, hash_to_curve_ts_1.createHasher)(exports3.ed25519.Point, (scalars) => map_to_curve_elligator2_edwards25519(scalars[0]), {\n DST: \"edwards25519_XMD:SHA-512_ELL2_RO_\",\n encodeDST: \"edwards25519_XMD:SHA-512_ELL2_NU_\",\n p: ed25519_CURVE_p,\n m: 1,\n k: 128,\n expand: \"xmd\",\n hash: sha2_js_1.sha512\n }))();\n var SQRT_M1 = ED25519_SQRT_M1;\n var SQRT_AD_MINUS_ONE = /* @__PURE__ */ BigInt(\"25063068953384623474111414158702152701244531502492656460079210482610430750235\");\n var INVSQRT_A_MINUS_D = /* @__PURE__ */ BigInt(\"54469307008909316920995813868745141605393597292927456921205312896311721017578\");\n var ONE_MINUS_D_SQ = /* @__PURE__ */ BigInt(\"1159843021668779879193775521855586647937357759715417654439879720876111806838\");\n var D_MINUS_ONE_SQ = /* @__PURE__ */ BigInt(\"40440834346308536858101042469323190826248399146238708352240133220865137265952\");\n var invertSqrt = (number) => uvRatio(_1n11, number);\n var MAX_255B = /* @__PURE__ */ BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n var bytes255ToNumberLE = (bytes) => exports3.ed25519.Point.Fp.create((0, utils_ts_1.bytesToNumberLE)(bytes) & MAX_255B);\n function calcElligatorRistrettoMap(r0) {\n const { d: d5 } = ed25519_CURVE;\n const P2 = ed25519_CURVE_p;\n const mod3 = (n2) => Fp.create(n2);\n const r2 = mod3(SQRT_M1 * r0 * r0);\n const Ns = mod3((r2 + _1n11) * ONE_MINUS_D_SQ);\n let c4 = BigInt(-1);\n const D2 = mod3((c4 - d5 * r2) * mod3(r2 + d5));\n let { isValid: Ns_D_is_sq, value: s4 } = uvRatio(Ns, D2);\n let s_ = mod3(s4 * r0);\n if (!(0, modular_ts_1.isNegativeLE)(s_, P2))\n s_ = mod3(-s_);\n if (!Ns_D_is_sq)\n s4 = s_;\n if (!Ns_D_is_sq)\n c4 = r2;\n const Nt = mod3(c4 * (r2 - _1n11) * D_MINUS_ONE_SQ - D2);\n const s22 = s4 * s4;\n const W0 = mod3((s4 + s4) * D2);\n const W1 = mod3(Nt * SQRT_AD_MINUS_ONE);\n const W2 = mod3(_1n11 - s22);\n const W3 = mod3(_1n11 + s22);\n return new exports3.ed25519.Point(mod3(W0 * W3), mod3(W2 * W1), mod3(W1 * W3), mod3(W0 * W2));\n }\n function ristretto255_map(bytes) {\n (0, utils_js_1.abytes)(bytes, 64);\n const r1 = bytes255ToNumberLE(bytes.subarray(0, 32));\n const R1 = calcElligatorRistrettoMap(r1);\n const r2 = bytes255ToNumberLE(bytes.subarray(32, 64));\n const R22 = calcElligatorRistrettoMap(r2);\n return new _RistrettoPoint(R1.add(R22));\n }\n var _RistrettoPoint = class __RistrettoPoint extends edwards_ts_1.PrimeEdwardsPoint {\n constructor(ep) {\n super(ep);\n }\n static fromAffine(ap) {\n return new __RistrettoPoint(exports3.ed25519.Point.fromAffine(ap));\n }\n assertSame(other) {\n if (!(other instanceof __RistrettoPoint))\n throw new Error(\"RistrettoPoint expected\");\n }\n init(ep) {\n return new __RistrettoPoint(ep);\n }\n /** @deprecated use `import { ristretto255_hasher } from '@noble/curves/ed25519.js';` */\n static hashToCurve(hex) {\n return ristretto255_map((0, utils_ts_1.ensureBytes)(\"ristrettoHash\", hex, 64));\n }\n static fromBytes(bytes) {\n (0, utils_js_1.abytes)(bytes, 32);\n const { a: a3, d: d5 } = ed25519_CURVE;\n const P2 = ed25519_CURVE_p;\n const mod3 = (n2) => Fp.create(n2);\n const s4 = bytes255ToNumberLE(bytes);\n if (!(0, utils_ts_1.equalBytes)(Fp.toBytes(s4), bytes) || (0, modular_ts_1.isNegativeLE)(s4, P2))\n throw new Error(\"invalid ristretto255 encoding 1\");\n const s22 = mod3(s4 * s4);\n const u1 = mod3(_1n11 + a3 * s22);\n const u2 = mod3(_1n11 - a3 * s22);\n const u1_2 = mod3(u1 * u1);\n const u2_2 = mod3(u2 * u2);\n const v2 = mod3(a3 * d5 * u1_2 - u2_2);\n const { isValid: isValid2, value: I2 } = invertSqrt(mod3(v2 * u2_2));\n const Dx = mod3(I2 * u2);\n const Dy = mod3(I2 * Dx * v2);\n let x4 = mod3((s4 + s4) * Dx);\n if ((0, modular_ts_1.isNegativeLE)(x4, P2))\n x4 = mod3(-x4);\n const y6 = mod3(u1 * Dy);\n const t3 = mod3(x4 * y6);\n if (!isValid2 || (0, modular_ts_1.isNegativeLE)(t3, P2) || y6 === _0n11)\n throw new Error(\"invalid ristretto255 encoding 2\");\n return new __RistrettoPoint(new exports3.ed25519.Point(x4, y6, _1n11, t3));\n }\n /**\n * Converts ristretto-encoded string to ristretto point.\n * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-decode).\n * @param hex Ristretto-encoded 32 bytes. Not every 32-byte string is valid ristretto encoding\n */\n static fromHex(hex) {\n return __RistrettoPoint.fromBytes((0, utils_ts_1.ensureBytes)(\"ristrettoHex\", hex, 32));\n }\n static msm(points, scalars) {\n return (0, curve_ts_1.pippenger)(__RistrettoPoint, exports3.ed25519.Point.Fn, points, scalars);\n }\n /**\n * Encodes ristretto point to Uint8Array.\n * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-encode).\n */\n toBytes() {\n let { X: X2, Y: Y2, Z: Z2, T: T4 } = this.ep;\n const P2 = ed25519_CURVE_p;\n const mod3 = (n2) => Fp.create(n2);\n const u1 = mod3(mod3(Z2 + Y2) * mod3(Z2 - Y2));\n const u2 = mod3(X2 * Y2);\n const u2sq = mod3(u2 * u2);\n const { value: invsqrt } = invertSqrt(mod3(u1 * u2sq));\n const D1 = mod3(invsqrt * u1);\n const D2 = mod3(invsqrt * u2);\n const zInv = mod3(D1 * D2 * T4);\n let D3;\n if ((0, modular_ts_1.isNegativeLE)(T4 * zInv, P2)) {\n let _x = mod3(Y2 * SQRT_M1);\n let _y = mod3(X2 * SQRT_M1);\n X2 = _x;\n Y2 = _y;\n D3 = mod3(D1 * INVSQRT_A_MINUS_D);\n } else {\n D3 = D2;\n }\n if ((0, modular_ts_1.isNegativeLE)(X2 * zInv, P2))\n Y2 = mod3(-Y2);\n let s4 = mod3((Z2 - Y2) * D3);\n if ((0, modular_ts_1.isNegativeLE)(s4, P2))\n s4 = mod3(-s4);\n return Fp.toBytes(s4);\n }\n /**\n * Compares two Ristretto points.\n * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-equals).\n */\n equals(other) {\n this.assertSame(other);\n const { X: X1, Y: Y1 } = this.ep;\n const { X: X2, Y: Y2 } = other.ep;\n const mod3 = (n2) => Fp.create(n2);\n const one = mod3(X1 * Y2) === mod3(Y1 * X2);\n const two = mod3(Y1 * Y2) === mod3(X1 * X2);\n return one || two;\n }\n is0() {\n return this.equals(__RistrettoPoint.ZERO);\n }\n };\n _RistrettoPoint.BASE = /* @__PURE__ */ (() => new _RistrettoPoint(exports3.ed25519.Point.BASE))();\n _RistrettoPoint.ZERO = /* @__PURE__ */ (() => new _RistrettoPoint(exports3.ed25519.Point.ZERO))();\n _RistrettoPoint.Fp = /* @__PURE__ */ (() => Fp)();\n _RistrettoPoint.Fn = /* @__PURE__ */ (() => Fn)();\n exports3.ristretto255 = { Point: _RistrettoPoint };\n exports3.ristretto255_hasher = {\n hashToCurve(msg, options) {\n const DST = options?.DST || \"ristretto255_XMD:SHA-512_R255MAP_RO_\";\n const xmd = (0, hash_to_curve_ts_1.expand_message_xmd)(msg, DST, 64, sha2_js_1.sha512);\n return ristretto255_map(xmd);\n },\n hashToScalar(msg, options = { DST: hash_to_curve_ts_1._DST_scalar }) {\n const xmd = (0, hash_to_curve_ts_1.expand_message_xmd)(msg, options.DST, 64, sha2_js_1.sha512);\n return Fn.create((0, utils_ts_1.bytesToNumberLE)(xmd));\n }\n };\n exports3.ED25519_TORSION_SUBGROUP = [\n \"0100000000000000000000000000000000000000000000000000000000000000\",\n \"c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a\",\n \"0000000000000000000000000000000000000000000000000000000000000080\",\n \"26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05\",\n \"ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f\",\n \"26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85\",\n \"0000000000000000000000000000000000000000000000000000000000000000\",\n \"c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa\"\n ];\n function edwardsToMontgomeryPub(edwardsPub) {\n return exports3.ed25519.utils.toMontgomery((0, utils_ts_1.ensureBytes)(\"pub\", edwardsPub));\n }\n exports3.edwardsToMontgomery = edwardsToMontgomeryPub;\n function edwardsToMontgomeryPriv(edwardsPriv) {\n return exports3.ed25519.utils.toMontgomerySecret((0, utils_ts_1.ensureBytes)(\"pub\", edwardsPriv));\n }\n exports3.RistrettoPoint = _RistrettoPoint;\n exports3.hashToCurve = (() => exports3.ed25519_hasher.hashToCurve)();\n exports3.encodeToCurve = (() => exports3.ed25519_hasher.encodeToCurve)();\n exports3.hashToRistretto255 = (() => exports3.ristretto255_hasher.hashToCurve)();\n exports3.hash_to_ristretto255 = (() => exports3.ristretto255_hasher.hashToCurve)();\n }\n });\n\n // ../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js\n var require_safe_buffer = __commonJS({\n \"../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var buffer2 = (init_buffer(), __toCommonJS(buffer_exports));\n var Buffer3 = buffer2.Buffer;\n function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n }\n if (Buffer3.from && Buffer3.alloc && Buffer3.allocUnsafe && Buffer3.allocUnsafeSlow) {\n module.exports = buffer2;\n } else {\n copyProps(buffer2, exports3);\n exports3.Buffer = SafeBuffer;\n }\n function SafeBuffer(arg, encodingOrOffset, length) {\n return Buffer3(arg, encodingOrOffset, length);\n }\n SafeBuffer.prototype = Object.create(Buffer3.prototype);\n copyProps(Buffer3, SafeBuffer);\n SafeBuffer.from = function(arg, encodingOrOffset, length) {\n if (typeof arg === \"number\") {\n throw new TypeError(\"Argument must not be a number\");\n }\n return Buffer3(arg, encodingOrOffset, length);\n };\n SafeBuffer.alloc = function(size6, fill, encoding) {\n if (typeof size6 !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n var buf = Buffer3(size6);\n if (fill !== void 0) {\n if (typeof encoding === \"string\") {\n buf.fill(fill, encoding);\n } else {\n buf.fill(fill);\n }\n } else {\n buf.fill(0);\n }\n return buf;\n };\n SafeBuffer.allocUnsafe = function(size6) {\n if (typeof size6 !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n return Buffer3(size6);\n };\n SafeBuffer.allocUnsafeSlow = function(size6) {\n if (typeof size6 !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n return buffer2.SlowBuffer(size6);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/base-x@3.0.11/node_modules/base-x/src/index.js\n var require_src8 = __commonJS({\n \"../../../node_modules/.pnpm/base-x@3.0.11/node_modules/base-x/src/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var _Buffer = require_safe_buffer().Buffer;\n function base4(ALPHABET) {\n if (ALPHABET.length >= 255) {\n throw new TypeError(\"Alphabet too long\");\n }\n var BASE_MAP = new Uint8Array(256);\n for (var j2 = 0; j2 < BASE_MAP.length; j2++) {\n BASE_MAP[j2] = 255;\n }\n for (var i3 = 0; i3 < ALPHABET.length; i3++) {\n var x4 = ALPHABET.charAt(i3);\n var xc = x4.charCodeAt(0);\n if (BASE_MAP[xc] !== 255) {\n throw new TypeError(x4 + \" is ambiguous\");\n }\n BASE_MAP[xc] = i3;\n }\n var BASE = ALPHABET.length;\n var LEADER = ALPHABET.charAt(0);\n var FACTOR = Math.log(BASE) / Math.log(256);\n var iFACTOR = Math.log(256) / Math.log(BASE);\n function encode7(source) {\n if (Array.isArray(source) || source instanceof Uint8Array) {\n source = _Buffer.from(source);\n }\n if (!_Buffer.isBuffer(source)) {\n throw new TypeError(\"Expected Buffer\");\n }\n if (source.length === 0) {\n return \"\";\n }\n var zeroes = 0;\n var length = 0;\n var pbegin = 0;\n var pend = source.length;\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++;\n zeroes++;\n }\n var size6 = (pend - pbegin) * iFACTOR + 1 >>> 0;\n var b58 = new Uint8Array(size6);\n while (pbegin !== pend) {\n var carry = source[pbegin];\n var i4 = 0;\n for (var it1 = size6 - 1; (carry !== 0 || i4 < length) && it1 !== -1; it1--, i4++) {\n carry += 256 * b58[it1] >>> 0;\n b58[it1] = carry % BASE >>> 0;\n carry = carry / BASE >>> 0;\n }\n if (carry !== 0) {\n throw new Error(\"Non-zero carry\");\n }\n length = i4;\n pbegin++;\n }\n var it2 = size6 - length;\n while (it2 !== size6 && b58[it2] === 0) {\n it2++;\n }\n var str = LEADER.repeat(zeroes);\n for (; it2 < size6; ++it2) {\n str += ALPHABET.charAt(b58[it2]);\n }\n return str;\n }\n function decodeUnsafe(source) {\n if (typeof source !== \"string\") {\n throw new TypeError(\"Expected String\");\n }\n if (source.length === 0) {\n return _Buffer.alloc(0);\n }\n var psz = 0;\n var zeroes = 0;\n var length = 0;\n while (source[psz] === LEADER) {\n zeroes++;\n psz++;\n }\n var size6 = (source.length - psz) * FACTOR + 1 >>> 0;\n var b256 = new Uint8Array(size6);\n while (psz < source.length) {\n var charCode = source.charCodeAt(psz);\n if (charCode > 255) {\n return;\n }\n var carry = BASE_MAP[charCode];\n if (carry === 255) {\n return;\n }\n var i4 = 0;\n for (var it3 = size6 - 1; (carry !== 0 || i4 < length) && it3 !== -1; it3--, i4++) {\n carry += BASE * b256[it3] >>> 0;\n b256[it3] = carry % 256 >>> 0;\n carry = carry / 256 >>> 0;\n }\n if (carry !== 0) {\n throw new Error(\"Non-zero carry\");\n }\n length = i4;\n psz++;\n }\n var it4 = size6 - length;\n while (it4 !== size6 && b256[it4] === 0) {\n it4++;\n }\n var vch = _Buffer.allocUnsafe(zeroes + (size6 - it4));\n vch.fill(0, 0, zeroes);\n var j3 = zeroes;\n while (it4 !== size6) {\n vch[j3++] = b256[it4++];\n }\n return vch;\n }\n function decode4(string) {\n var buffer2 = decodeUnsafe(string);\n if (buffer2) {\n return buffer2;\n }\n throw new Error(\"Non-base\" + BASE + \" character\");\n }\n return {\n encode: encode7,\n decodeUnsafe,\n decode: decode4\n };\n }\n module.exports = base4;\n }\n });\n\n // ../../../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js\n var require_bs58 = __commonJS({\n \"../../../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var basex = require_src8();\n var ALPHABET = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n module.exports = basex(ALPHABET);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha256.js\n var require_sha2562 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha256.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.sha224 = exports3.SHA224 = exports3.sha256 = exports3.SHA256 = void 0;\n var sha2_ts_1 = require_sha23();\n exports3.SHA256 = sha2_ts_1.SHA256;\n exports3.sha256 = sha2_ts_1.sha256;\n exports3.SHA224 = sha2_ts_1.SHA224;\n exports3.sha224 = sha2_ts_1.sha224;\n }\n });\n\n // ../../../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js\n var require_encoding_lib = __commonJS({\n \"../../../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n function inRange3(a3, min, max) {\n return min <= a3 && a3 <= max;\n }\n function ToDictionary(o5) {\n if (o5 === void 0)\n return {};\n if (o5 === Object(o5))\n return o5;\n throw TypeError(\"Could not convert argument to dictionary\");\n }\n function stringToCodePoints(string) {\n var s4 = String(string);\n var n2 = s4.length;\n var i3 = 0;\n var u2 = [];\n while (i3 < n2) {\n var c4 = s4.charCodeAt(i3);\n if (c4 < 55296 || c4 > 57343) {\n u2.push(c4);\n } else if (56320 <= c4 && c4 <= 57343) {\n u2.push(65533);\n } else if (55296 <= c4 && c4 <= 56319) {\n if (i3 === n2 - 1) {\n u2.push(65533);\n } else {\n var d5 = string.charCodeAt(i3 + 1);\n if (56320 <= d5 && d5 <= 57343) {\n var a3 = c4 & 1023;\n var b4 = d5 & 1023;\n u2.push(65536 + (a3 << 10) + b4);\n i3 += 1;\n } else {\n u2.push(65533);\n }\n }\n }\n i3 += 1;\n }\n return u2;\n }\n function codePointsToString(code_points) {\n var s4 = \"\";\n for (var i3 = 0; i3 < code_points.length; ++i3) {\n var cp = code_points[i3];\n if (cp <= 65535) {\n s4 += String.fromCharCode(cp);\n } else {\n cp -= 65536;\n s4 += String.fromCharCode(\n (cp >> 10) + 55296,\n (cp & 1023) + 56320\n );\n }\n }\n return s4;\n }\n var end_of_stream = -1;\n function Stream(tokens) {\n this.tokens = [].slice.call(tokens);\n }\n Stream.prototype = {\n /**\n * @return {boolean} True if end-of-stream has been hit.\n */\n endOfStream: function() {\n return !this.tokens.length;\n },\n /**\n * When a token is read from a stream, the first token in the\n * stream must be returned and subsequently removed, and\n * end-of-stream must be returned otherwise.\n *\n * @return {number} Get the next token from the stream, or\n * end_of_stream.\n */\n read: function() {\n if (!this.tokens.length)\n return end_of_stream;\n return this.tokens.shift();\n },\n /**\n * When one or more tokens are prepended to a stream, those tokens\n * must be inserted, in given order, before the first token in the\n * stream.\n *\n * @param {(number|!Array.)} token The token(s) to prepend to the stream.\n */\n prepend: function(token) {\n if (Array.isArray(token)) {\n var tokens = (\n /**@type {!Array.}*/\n token\n );\n while (tokens.length)\n this.tokens.unshift(tokens.pop());\n } else {\n this.tokens.unshift(token);\n }\n },\n /**\n * When one or more tokens are pushed to a stream, those tokens\n * must be inserted, in given order, after the last token in the\n * stream.\n *\n * @param {(number|!Array.)} token The tokens(s) to prepend to the stream.\n */\n push: function(token) {\n if (Array.isArray(token)) {\n var tokens = (\n /**@type {!Array.}*/\n token\n );\n while (tokens.length)\n this.tokens.push(tokens.shift());\n } else {\n this.tokens.push(token);\n }\n }\n };\n var finished = -1;\n function decoderError(fatal, opt_code_point) {\n if (fatal)\n throw TypeError(\"Decoder error\");\n return opt_code_point || 65533;\n }\n var DEFAULT_ENCODING = \"utf-8\";\n function TextDecoder2(encoding, options) {\n if (!(this instanceof TextDecoder2)) {\n return new TextDecoder2(encoding, options);\n }\n encoding = encoding !== void 0 ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error(\"Encoding not supported. Only utf-8 is supported\");\n }\n options = ToDictionary(options);\n this._streaming = false;\n this._BOMseen = false;\n this._decoder = null;\n this._fatal = Boolean(options[\"fatal\"]);\n this._ignoreBOM = Boolean(options[\"ignoreBOM\"]);\n Object.defineProperty(this, \"encoding\", { value: \"utf-8\" });\n Object.defineProperty(this, \"fatal\", { value: this._fatal });\n Object.defineProperty(this, \"ignoreBOM\", { value: this._ignoreBOM });\n }\n TextDecoder2.prototype = {\n /**\n * @param {ArrayBufferView=} input The buffer of bytes to decode.\n * @param {Object=} options\n * @return {string} The decoded string.\n */\n decode: function decode4(input, options) {\n var bytes;\n if (typeof input === \"object\" && input instanceof ArrayBuffer) {\n bytes = new Uint8Array(input);\n } else if (typeof input === \"object\" && \"buffer\" in input && input.buffer instanceof ArrayBuffer) {\n bytes = new Uint8Array(\n input.buffer,\n input.byteOffset,\n input.byteLength\n );\n } else {\n bytes = new Uint8Array(0);\n }\n options = ToDictionary(options);\n if (!this._streaming) {\n this._decoder = new UTF8Decoder({ fatal: this._fatal });\n this._BOMseen = false;\n }\n this._streaming = Boolean(options[\"stream\"]);\n var input_stream = new Stream(bytes);\n var code_points = [];\n var result;\n while (!input_stream.endOfStream()) {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(\n code_points,\n /**@type {!Array.}*/\n result\n );\n else\n code_points.push(result);\n }\n if (!this._streaming) {\n do {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(\n code_points,\n /**@type {!Array.}*/\n result\n );\n else\n code_points.push(result);\n } while (!input_stream.endOfStream());\n this._decoder = null;\n }\n if (code_points.length) {\n if ([\"utf-8\"].indexOf(this.encoding) !== -1 && !this._ignoreBOM && !this._BOMseen) {\n if (code_points[0] === 65279) {\n this._BOMseen = true;\n code_points.shift();\n } else {\n this._BOMseen = true;\n }\n }\n }\n return codePointsToString(code_points);\n }\n };\n function TextEncoder2(encoding, options) {\n if (!(this instanceof TextEncoder2))\n return new TextEncoder2(encoding, options);\n encoding = encoding !== void 0 ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error(\"Encoding not supported. Only utf-8 is supported\");\n }\n options = ToDictionary(options);\n this._streaming = false;\n this._encoder = null;\n this._options = { fatal: Boolean(options[\"fatal\"]) };\n Object.defineProperty(this, \"encoding\", { value: \"utf-8\" });\n }\n TextEncoder2.prototype = {\n /**\n * @param {string=} opt_string The string to encode.\n * @param {Object=} options\n * @return {Uint8Array} Encoded bytes, as a Uint8Array.\n */\n encode: function encode7(opt_string, options) {\n opt_string = opt_string ? String(opt_string) : \"\";\n options = ToDictionary(options);\n if (!this._streaming)\n this._encoder = new UTF8Encoder(this._options);\n this._streaming = Boolean(options[\"stream\"]);\n var bytes = [];\n var input_stream = new Stream(stringToCodePoints(opt_string));\n var result;\n while (!input_stream.endOfStream()) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(\n bytes,\n /**@type {!Array.}*/\n result\n );\n else\n bytes.push(result);\n }\n if (!this._streaming) {\n while (true) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(\n bytes,\n /**@type {!Array.}*/\n result\n );\n else\n bytes.push(result);\n }\n this._encoder = null;\n }\n return new Uint8Array(bytes);\n }\n };\n function UTF8Decoder(options) {\n var fatal = options.fatal;\n var utf8_code_point = 0, utf8_bytes_seen = 0, utf8_bytes_needed = 0, utf8_lower_boundary = 128, utf8_upper_boundary = 191;\n this.handler = function(stream, bite) {\n if (bite === end_of_stream && utf8_bytes_needed !== 0) {\n utf8_bytes_needed = 0;\n return decoderError(fatal);\n }\n if (bite === end_of_stream)\n return finished;\n if (utf8_bytes_needed === 0) {\n if (inRange3(bite, 0, 127)) {\n return bite;\n }\n if (inRange3(bite, 194, 223)) {\n utf8_bytes_needed = 1;\n utf8_code_point = bite - 192;\n } else if (inRange3(bite, 224, 239)) {\n if (bite === 224)\n utf8_lower_boundary = 160;\n if (bite === 237)\n utf8_upper_boundary = 159;\n utf8_bytes_needed = 2;\n utf8_code_point = bite - 224;\n } else if (inRange3(bite, 240, 244)) {\n if (bite === 240)\n utf8_lower_boundary = 144;\n if (bite === 244)\n utf8_upper_boundary = 143;\n utf8_bytes_needed = 3;\n utf8_code_point = bite - 240;\n } else {\n return decoderError(fatal);\n }\n utf8_code_point = utf8_code_point << 6 * utf8_bytes_needed;\n return null;\n }\n if (!inRange3(bite, utf8_lower_boundary, utf8_upper_boundary)) {\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n utf8_lower_boundary = 128;\n utf8_upper_boundary = 191;\n stream.prepend(bite);\n return decoderError(fatal);\n }\n utf8_lower_boundary = 128;\n utf8_upper_boundary = 191;\n utf8_bytes_seen += 1;\n utf8_code_point += bite - 128 << 6 * (utf8_bytes_needed - utf8_bytes_seen);\n if (utf8_bytes_seen !== utf8_bytes_needed)\n return null;\n var code_point = utf8_code_point;\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n return code_point;\n };\n }\n function UTF8Encoder(options) {\n var fatal = options.fatal;\n this.handler = function(stream, code_point) {\n if (code_point === end_of_stream)\n return finished;\n if (inRange3(code_point, 0, 127))\n return code_point;\n var count, offset;\n if (inRange3(code_point, 128, 2047)) {\n count = 1;\n offset = 192;\n } else if (inRange3(code_point, 2048, 65535)) {\n count = 2;\n offset = 224;\n } else if (inRange3(code_point, 65536, 1114111)) {\n count = 3;\n offset = 240;\n }\n var bytes = [(code_point >> 6 * count) + offset];\n while (count > 0) {\n var temp = code_point >> 6 * (count - 1);\n bytes.push(128 | temp & 63);\n count -= 1;\n }\n return bytes;\n };\n }\n exports3.TextEncoder = TextEncoder2;\n exports3.TextDecoder = TextDecoder2;\n }\n });\n\n // ../../../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js\n var require_lib38 = __commonJS({\n \"../../../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding4 = exports3 && exports3.__createBinding || (Object.create ? function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n Object.defineProperty(o5, k22, { enumerable: true, get: function() {\n return m2[k4];\n } });\n } : function(o5, m2, k4, k22) {\n if (k22 === void 0)\n k22 = k4;\n o5[k22] = m2[k4];\n });\n var __setModuleDefault3 = exports3 && exports3.__setModuleDefault || (Object.create ? function(o5, v2) {\n Object.defineProperty(o5, \"default\", { enumerable: true, value: v2 });\n } : function(o5, v2) {\n o5[\"default\"] = v2;\n });\n var __decorate4 = exports3 && exports3.__decorate || function(decorators, target, key, desc) {\n var c4 = arguments.length, r2 = c4 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d5;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r2 = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i3 = decorators.length - 1; i3 >= 0; i3--)\n if (d5 = decorators[i3])\n r2 = (c4 < 3 ? d5(r2) : c4 > 3 ? d5(target, key, r2) : d5(target, key)) || r2;\n return c4 > 3 && r2 && Object.defineProperty(target, key, r2), r2;\n };\n var __importStar4 = exports3 && exports3.__importStar || function(mod3) {\n if (mod3 && mod3.__esModule)\n return mod3;\n var result = {};\n if (mod3 != null) {\n for (var k4 in mod3)\n if (k4 !== \"default\" && Object.hasOwnProperty.call(mod3, k4))\n __createBinding4(result, mod3, k4);\n }\n __setModuleDefault3(result, mod3);\n return result;\n };\n var __importDefault4 = exports3 && exports3.__importDefault || function(mod3) {\n return mod3 && mod3.__esModule ? mod3 : { \"default\": mod3 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.deserializeUnchecked = exports3.deserialize = exports3.serialize = exports3.BinaryReader = exports3.BinaryWriter = exports3.BorshError = exports3.baseDecode = exports3.baseEncode = void 0;\n var bn_js_1 = __importDefault4(require_bn());\n var bs58_1 = __importDefault4(require_bs58());\n var encoding = __importStar4(require_encoding_lib());\n var ResolvedTextDecoder = typeof TextDecoder !== \"function\" ? encoding.TextDecoder : TextDecoder;\n var textDecoder = new ResolvedTextDecoder(\"utf-8\", { fatal: true });\n function baseEncode(value) {\n if (typeof value === \"string\") {\n value = Buffer2.from(value, \"utf8\");\n }\n return bs58_1.default.encode(Buffer2.from(value));\n }\n exports3.baseEncode = baseEncode;\n function baseDecode(value) {\n return Buffer2.from(bs58_1.default.decode(value));\n }\n exports3.baseDecode = baseDecode;\n var INITIAL_LENGTH = 1024;\n var BorshError = class extends Error {\n constructor(message2) {\n super(message2);\n this.fieldPath = [];\n this.originalMessage = message2;\n }\n addToFieldPath(fieldName) {\n this.fieldPath.splice(0, 0, fieldName);\n this.message = this.originalMessage + \": \" + this.fieldPath.join(\".\");\n }\n };\n exports3.BorshError = BorshError;\n var BinaryWriter = class {\n constructor() {\n this.buf = Buffer2.alloc(INITIAL_LENGTH);\n this.length = 0;\n }\n maybeResize() {\n if (this.buf.length < 16 + this.length) {\n this.buf = Buffer2.concat([this.buf, Buffer2.alloc(INITIAL_LENGTH)]);\n }\n }\n writeU8(value) {\n this.maybeResize();\n this.buf.writeUInt8(value, this.length);\n this.length += 1;\n }\n writeU16(value) {\n this.maybeResize();\n this.buf.writeUInt16LE(value, this.length);\n this.length += 2;\n }\n writeU32(value) {\n this.maybeResize();\n this.buf.writeUInt32LE(value, this.length);\n this.length += 4;\n }\n writeU64(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 8)));\n }\n writeU128(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 16)));\n }\n writeU256(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 32)));\n }\n writeU512(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 64)));\n }\n writeBuffer(buffer2) {\n this.buf = Buffer2.concat([\n Buffer2.from(this.buf.subarray(0, this.length)),\n buffer2,\n Buffer2.alloc(INITIAL_LENGTH)\n ]);\n this.length += buffer2.length;\n }\n writeString(str) {\n this.maybeResize();\n const b4 = Buffer2.from(str, \"utf8\");\n this.writeU32(b4.length);\n this.writeBuffer(b4);\n }\n writeFixedArray(array) {\n this.writeBuffer(Buffer2.from(array));\n }\n writeArray(array, fn) {\n this.maybeResize();\n this.writeU32(array.length);\n for (const elem of array) {\n this.maybeResize();\n fn(elem);\n }\n }\n toArray() {\n return this.buf.subarray(0, this.length);\n }\n };\n exports3.BinaryWriter = BinaryWriter;\n function handlingRangeError(target, propertyKey, propertyDescriptor) {\n const originalMethod = propertyDescriptor.value;\n propertyDescriptor.value = function(...args) {\n try {\n return originalMethod.apply(this, args);\n } catch (e2) {\n if (e2 instanceof RangeError) {\n const code = e2.code;\n if ([\"ERR_BUFFER_OUT_OF_BOUNDS\", \"ERR_OUT_OF_RANGE\"].indexOf(code) >= 0) {\n throw new BorshError(\"Reached the end of buffer when deserializing\");\n }\n }\n throw e2;\n }\n };\n }\n var BinaryReader = class {\n constructor(buf) {\n this.buf = buf;\n this.offset = 0;\n }\n readU8() {\n const value = this.buf.readUInt8(this.offset);\n this.offset += 1;\n return value;\n }\n readU16() {\n const value = this.buf.readUInt16LE(this.offset);\n this.offset += 2;\n return value;\n }\n readU32() {\n const value = this.buf.readUInt32LE(this.offset);\n this.offset += 4;\n return value;\n }\n readU64() {\n const buf = this.readBuffer(8);\n return new bn_js_1.default(buf, \"le\");\n }\n readU128() {\n const buf = this.readBuffer(16);\n return new bn_js_1.default(buf, \"le\");\n }\n readU256() {\n const buf = this.readBuffer(32);\n return new bn_js_1.default(buf, \"le\");\n }\n readU512() {\n const buf = this.readBuffer(64);\n return new bn_js_1.default(buf, \"le\");\n }\n readBuffer(len) {\n if (this.offset + len > this.buf.length) {\n throw new BorshError(`Expected buffer length ${len} isn't within bounds`);\n }\n const result = this.buf.slice(this.offset, this.offset + len);\n this.offset += len;\n return result;\n }\n readString() {\n const len = this.readU32();\n const buf = this.readBuffer(len);\n try {\n return textDecoder.decode(buf);\n } catch (e2) {\n throw new BorshError(`Error decoding UTF-8 string: ${e2}`);\n }\n }\n readFixedArray(len) {\n return new Uint8Array(this.readBuffer(len));\n }\n readArray(fn) {\n const len = this.readU32();\n const result = Array();\n for (let i3 = 0; i3 < len; ++i3) {\n result.push(fn());\n }\n return result;\n }\n };\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readU8\", null);\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readU16\", null);\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readU32\", null);\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readU64\", null);\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readU128\", null);\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readU256\", null);\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readU512\", null);\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readString\", null);\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readFixedArray\", null);\n __decorate4([\n handlingRangeError\n ], BinaryReader.prototype, \"readArray\", null);\n exports3.BinaryReader = BinaryReader;\n function capitalizeFirstLetter(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n }\n function serializeField(schema, fieldName, value, fieldType, writer) {\n try {\n if (typeof fieldType === \"string\") {\n writer[`write${capitalizeFirstLetter(fieldType)}`](value);\n } else if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n if (value.length !== fieldType[0]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[0]}, but got ${value.length} bytes`);\n }\n writer.writeFixedArray(value);\n } else if (fieldType.length === 2 && typeof fieldType[1] === \"number\") {\n if (value.length !== fieldType[1]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[1]}, but got ${value.length} bytes`);\n }\n for (let i3 = 0; i3 < fieldType[1]; i3++) {\n serializeField(schema, null, value[i3], fieldType[0], writer);\n }\n } else {\n writer.writeArray(value, (item) => {\n serializeField(schema, fieldName, item, fieldType[0], writer);\n });\n }\n } else if (fieldType.kind !== void 0) {\n switch (fieldType.kind) {\n case \"option\": {\n if (value === null || value === void 0) {\n writer.writeU8(0);\n } else {\n writer.writeU8(1);\n serializeField(schema, fieldName, value, fieldType.type, writer);\n }\n break;\n }\n case \"map\": {\n writer.writeU32(value.size);\n value.forEach((val, key) => {\n serializeField(schema, fieldName, key, fieldType.key, writer);\n serializeField(schema, fieldName, val, fieldType.value, writer);\n });\n break;\n }\n default:\n throw new BorshError(`FieldType ${fieldType} unrecognized`);\n }\n } else {\n serializeStruct(schema, value, writer);\n }\n } catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n }\n function serializeStruct(schema, obj, writer) {\n if (typeof obj.borshSerialize === \"function\") {\n obj.borshSerialize(writer);\n return;\n }\n const structSchema = schema.get(obj.constructor);\n if (!structSchema) {\n throw new BorshError(`Class ${obj.constructor.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n structSchema.fields.map(([fieldName, fieldType]) => {\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n });\n } else if (structSchema.kind === \"enum\") {\n const name = obj[structSchema.field];\n for (let idx = 0; idx < structSchema.values.length; ++idx) {\n const [fieldName, fieldType] = structSchema.values[idx];\n if (fieldName === name) {\n writer.writeU8(idx);\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n break;\n }\n }\n } else {\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${obj.constructor.name}`);\n }\n }\n function serialize(schema, obj, Writer = BinaryWriter) {\n const writer = new Writer();\n serializeStruct(schema, obj, writer);\n return writer.toArray();\n }\n exports3.serialize = serialize;\n function deserializeField(schema, fieldName, fieldType, reader) {\n try {\n if (typeof fieldType === \"string\") {\n return reader[`read${capitalizeFirstLetter(fieldType)}`]();\n }\n if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n return reader.readFixedArray(fieldType[0]);\n } else if (typeof fieldType[1] === \"number\") {\n const arr = [];\n for (let i3 = 0; i3 < fieldType[1]; i3++) {\n arr.push(deserializeField(schema, null, fieldType[0], reader));\n }\n return arr;\n } else {\n return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader));\n }\n }\n if (fieldType.kind === \"option\") {\n const option = reader.readU8();\n if (option) {\n return deserializeField(schema, fieldName, fieldType.type, reader);\n }\n return void 0;\n }\n if (fieldType.kind === \"map\") {\n let map = /* @__PURE__ */ new Map();\n const length = reader.readU32();\n for (let i3 = 0; i3 < length; i3++) {\n const key = deserializeField(schema, fieldName, fieldType.key, reader);\n const val = deserializeField(schema, fieldName, fieldType.value, reader);\n map.set(key, val);\n }\n return map;\n }\n return deserializeStruct(schema, fieldType, reader);\n } catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n }\n function deserializeStruct(schema, classType, reader) {\n if (typeof classType.borshDeserialize === \"function\") {\n return classType.borshDeserialize(reader);\n }\n const structSchema = schema.get(classType);\n if (!structSchema) {\n throw new BorshError(`Class ${classType.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n const result = {};\n for (const [fieldName, fieldType] of schema.get(classType).fields) {\n result[fieldName] = deserializeField(schema, fieldName, fieldType, reader);\n }\n return new classType(result);\n }\n if (structSchema.kind === \"enum\") {\n const idx = reader.readU8();\n if (idx >= structSchema.values.length) {\n throw new BorshError(`Enum index: ${idx} is out of range`);\n }\n const [fieldName, fieldType] = structSchema.values[idx];\n const fieldValue = deserializeField(schema, fieldName, fieldType, reader);\n return new classType({ [fieldName]: fieldValue });\n }\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`);\n }\n function deserialize(schema, classType, buffer2, Reader = BinaryReader) {\n const reader = new Reader(buffer2);\n const result = deserializeStruct(schema, classType, reader);\n if (reader.offset < buffer2.length) {\n throw new BorshError(`Unexpected ${buffer2.length - reader.offset} bytes after deserialized data`);\n }\n return result;\n }\n exports3.deserialize = deserialize;\n function deserializeUnchecked(schema, classType, buffer2, Reader = BinaryReader) {\n const reader = new Reader(buffer2);\n return deserializeStruct(schema, classType, reader);\n }\n exports3.deserializeUnchecked = deserializeUnchecked;\n }\n });\n\n // ../../../node_modules/.pnpm/@solana+buffer-layout@4.0.1/node_modules/@solana/buffer-layout/lib/Layout.js\n var require_Layout = __commonJS({\n \"../../../node_modules/.pnpm/@solana+buffer-layout@4.0.1/node_modules/@solana/buffer-layout/lib/Layout.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.s16 = exports3.s8 = exports3.nu64be = exports3.u48be = exports3.u40be = exports3.u32be = exports3.u24be = exports3.u16be = exports3.nu64 = exports3.u48 = exports3.u40 = exports3.u32 = exports3.u24 = exports3.u16 = exports3.u8 = exports3.offset = exports3.greedy = exports3.Constant = exports3.UTF8 = exports3.CString = exports3.Blob = exports3.Boolean = exports3.BitField = exports3.BitStructure = exports3.VariantLayout = exports3.Union = exports3.UnionLayoutDiscriminator = exports3.UnionDiscriminator = exports3.Structure = exports3.Sequence = exports3.DoubleBE = exports3.Double = exports3.FloatBE = exports3.Float = exports3.NearInt64BE = exports3.NearInt64 = exports3.NearUInt64BE = exports3.NearUInt64 = exports3.IntBE = exports3.Int = exports3.UIntBE = exports3.UInt = exports3.OffsetLayout = exports3.GreedyCount = exports3.ExternalLayout = exports3.bindConstructorLayout = exports3.nameWithProperty = exports3.Layout = exports3.uint8ArrayToBuffer = exports3.checkUint8Array = void 0;\n exports3.constant = exports3.utf8 = exports3.cstr = exports3.blob = exports3.unionLayoutDiscriminator = exports3.union = exports3.seq = exports3.bits = exports3.struct = exports3.f64be = exports3.f64 = exports3.f32be = exports3.f32 = exports3.ns64be = exports3.s48be = exports3.s40be = exports3.s32be = exports3.s24be = exports3.s16be = exports3.ns64 = exports3.s48 = exports3.s40 = exports3.s32 = exports3.s24 = void 0;\n var buffer_1 = (init_buffer(), __toCommonJS(buffer_exports));\n function checkUint8Array(b4) {\n if (!(b4 instanceof Uint8Array)) {\n throw new TypeError(\"b must be a Uint8Array\");\n }\n }\n exports3.checkUint8Array = checkUint8Array;\n function uint8ArrayToBuffer(b4) {\n checkUint8Array(b4);\n return buffer_1.Buffer.from(b4.buffer, b4.byteOffset, b4.length);\n }\n exports3.uint8ArrayToBuffer = uint8ArrayToBuffer;\n var Layout = class {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError(\"span must be an integer\");\n }\n this.span = span;\n this.property = property;\n }\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Uint8Array} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b4, offset) {\n if (0 > this.span) {\n throw new RangeError(\"indeterminate span\");\n }\n return this.span;\n }\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return void 0;\n }\n };\n exports3.Layout = Layout;\n function nameWithProperty(name, lo) {\n if (lo.property) {\n return name + \"[\" + lo.property + \"]\";\n }\n return name;\n }\n exports3.nameWithProperty = nameWithProperty;\n function bindConstructorLayout(Class, layout) {\n if (\"function\" !== typeof Class) {\n throw new TypeError(\"Class must be constructor\");\n }\n if (Object.prototype.hasOwnProperty.call(Class, \"layout_\")) {\n throw new Error(\"Class is already bound to a layout\");\n }\n if (!(layout && layout instanceof Layout)) {\n throw new TypeError(\"layout must be a Layout\");\n }\n if (Object.prototype.hasOwnProperty.call(layout, \"boundConstructor_\")) {\n throw new Error(\"layout is already bound to a constructor\");\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = () => new Class();\n Object.defineProperty(Class.prototype, \"encode\", {\n value(b4, offset) {\n return layout.encode(this, b4, offset);\n },\n writable: true\n });\n Object.defineProperty(Class, \"decode\", {\n value(b4, offset) {\n return layout.decode(b4, offset);\n },\n writable: true\n });\n }\n exports3.bindConstructorLayout = bindConstructorLayout;\n var ExternalLayout = class extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error(\"ExternalLayout is abstract\");\n }\n };\n exports3.ExternalLayout = ExternalLayout;\n var GreedyCount = class extends ExternalLayout {\n constructor(elementSpan = 1, property) {\n if (!Number.isInteger(elementSpan) || 0 >= elementSpan) {\n throw new TypeError(\"elementSpan must be a (positive) integer\");\n }\n super(-1, property);\n this.elementSpan = elementSpan;\n }\n /** @override */\n isCount() {\n return true;\n }\n /** @override */\n decode(b4, offset = 0) {\n checkUint8Array(b4);\n const rem = b4.length - offset;\n return Math.floor(rem / this.elementSpan);\n }\n /** @override */\n encode(src, b4, offset) {\n return 0;\n }\n };\n exports3.GreedyCount = GreedyCount;\n var OffsetLayout = class extends ExternalLayout {\n constructor(layout, offset = 0, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError(\"layout must be a Layout\");\n }\n if (!Number.isInteger(offset)) {\n throw new TypeError(\"offset must be integer or undefined\");\n }\n super(layout.span, property || layout.property);\n this.layout = layout;\n this.offset = offset;\n }\n /** @override */\n isCount() {\n return this.layout instanceof UInt || this.layout instanceof UIntBE;\n }\n /** @override */\n decode(b4, offset = 0) {\n return this.layout.decode(b4, offset + this.offset);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n return this.layout.encode(src, b4, offset + this.offset);\n }\n };\n exports3.OffsetLayout = OffsetLayout;\n var UInt = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b4, offset = 0) {\n return uint8ArrayToBuffer(b4).readUIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n uint8ArrayToBuffer(b4).writeUIntLE(src, offset, this.span);\n return this.span;\n }\n };\n exports3.UInt = UInt;\n var UIntBE = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b4, offset = 0) {\n return uint8ArrayToBuffer(b4).readUIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n uint8ArrayToBuffer(b4).writeUIntBE(src, offset, this.span);\n return this.span;\n }\n };\n exports3.UIntBE = UIntBE;\n var Int = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b4, offset = 0) {\n return uint8ArrayToBuffer(b4).readIntLE(offset, this.span);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n uint8ArrayToBuffer(b4).writeIntLE(src, offset, this.span);\n return this.span;\n }\n };\n exports3.Int = Int;\n var IntBE = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b4, offset = 0) {\n return uint8ArrayToBuffer(b4).readIntBE(offset, this.span);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n uint8ArrayToBuffer(b4).writeIntBE(src, offset, this.span);\n return this.span;\n }\n };\n exports3.IntBE = IntBE;\n var V2E32 = Math.pow(2, 32);\n function divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - hi32 * V2E32;\n return { hi32, lo32 };\n }\n function roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n }\n var NearUInt64 = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b4, offset = 0) {\n const buffer2 = uint8ArrayToBuffer(b4);\n const lo32 = buffer2.readUInt32LE(offset);\n const hi32 = buffer2.readUInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n const split3 = divmodInt64(src);\n const buffer2 = uint8ArrayToBuffer(b4);\n buffer2.writeUInt32LE(split3.lo32, offset);\n buffer2.writeUInt32LE(split3.hi32, offset + 4);\n return 8;\n }\n };\n exports3.NearUInt64 = NearUInt64;\n var NearUInt64BE = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b4, offset = 0) {\n const buffer2 = uint8ArrayToBuffer(b4);\n const hi32 = buffer2.readUInt32BE(offset);\n const lo32 = buffer2.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n const split3 = divmodInt64(src);\n const buffer2 = uint8ArrayToBuffer(b4);\n buffer2.writeUInt32BE(split3.hi32, offset);\n buffer2.writeUInt32BE(split3.lo32, offset + 4);\n return 8;\n }\n };\n exports3.NearUInt64BE = NearUInt64BE;\n var NearInt64 = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b4, offset = 0) {\n const buffer2 = uint8ArrayToBuffer(b4);\n const lo32 = buffer2.readUInt32LE(offset);\n const hi32 = buffer2.readInt32LE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n const split3 = divmodInt64(src);\n const buffer2 = uint8ArrayToBuffer(b4);\n buffer2.writeUInt32LE(split3.lo32, offset);\n buffer2.writeInt32LE(split3.hi32, offset + 4);\n return 8;\n }\n };\n exports3.NearInt64 = NearInt64;\n var NearInt64BE = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b4, offset = 0) {\n const buffer2 = uint8ArrayToBuffer(b4);\n const hi32 = buffer2.readInt32BE(offset);\n const lo32 = buffer2.readUInt32BE(offset + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n const split3 = divmodInt64(src);\n const buffer2 = uint8ArrayToBuffer(b4);\n buffer2.writeInt32BE(split3.hi32, offset);\n buffer2.writeUInt32BE(split3.lo32, offset + 4);\n return 8;\n }\n };\n exports3.NearInt64BE = NearInt64BE;\n var Float = class extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b4, offset = 0) {\n return uint8ArrayToBuffer(b4).readFloatLE(offset);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n uint8ArrayToBuffer(b4).writeFloatLE(src, offset);\n return 4;\n }\n };\n exports3.Float = Float;\n var FloatBE = class extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b4, offset = 0) {\n return uint8ArrayToBuffer(b4).readFloatBE(offset);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n uint8ArrayToBuffer(b4).writeFloatBE(src, offset);\n return 4;\n }\n };\n exports3.FloatBE = FloatBE;\n var Double = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b4, offset = 0) {\n return uint8ArrayToBuffer(b4).readDoubleLE(offset);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n uint8ArrayToBuffer(b4).writeDoubleLE(src, offset);\n return 8;\n }\n };\n exports3.Double = Double;\n var DoubleBE = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b4, offset = 0) {\n return uint8ArrayToBuffer(b4).readDoubleBE(offset);\n }\n /** @override */\n encode(src, b4, offset = 0) {\n uint8ArrayToBuffer(b4).writeDoubleBE(src, offset);\n return 8;\n }\n };\n exports3.DoubleBE = DoubleBE;\n var Sequence = class extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError(\"elementLayout must be a Layout\");\n }\n if (!(count instanceof ExternalLayout && count.isCount() || Number.isInteger(count) && 0 <= count)) {\n throw new TypeError(\"count must be non-negative integer or an unsigned integer ExternalLayout\");\n }\n let span = -1;\n if (!(count instanceof ExternalLayout) && 0 < elementLayout.span) {\n span = count * elementLayout.span;\n }\n super(span, property);\n this.elementLayout = elementLayout;\n this.count = count;\n }\n /** @override */\n getSpan(b4, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b4, offset);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n } else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b4, offset + span);\n ++idx;\n }\n }\n return span;\n }\n /** @override */\n decode(b4, offset = 0) {\n const rv = [];\n let i3 = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b4, offset);\n }\n while (i3 < count) {\n rv.push(this.elementLayout.decode(b4, offset));\n offset += this.elementLayout.getSpan(b4, offset);\n i3 += 1;\n }\n return rv;\n }\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b4, offset = 0) {\n const elo = this.elementLayout;\n const span = src.reduce((span2, v2) => {\n return span2 + elo.encode(v2, b4, offset + span2);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b4, offset);\n }\n return span;\n }\n };\n exports3.Sequence = Sequence;\n var Structure = class extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields) && fields.reduce((acc, v2) => acc && v2 instanceof Layout, true))) {\n throw new TypeError(\"fields must be array of Layout instances\");\n }\n if (\"boolean\" === typeof property && void 0 === decodePrefixes) {\n decodePrefixes = property;\n property = void 0;\n }\n for (const fd of fields) {\n if (0 > fd.span && void 0 === fd.property) {\n throw new Error(\"fields cannot contain unnamed variable-length layout\");\n }\n }\n let span = -1;\n try {\n span = fields.reduce((span2, fd) => span2 + fd.getSpan(), 0);\n } catch (e2) {\n }\n super(span, property);\n this.fields = fields;\n this.decodePrefixes = !!decodePrefixes;\n }\n /** @override */\n getSpan(b4, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span2, fd) => {\n const fsp = fd.getSpan(b4, offset);\n offset += fsp;\n return span2 + fsp;\n }, 0);\n } catch (e2) {\n throw new RangeError(\"indeterminate span\");\n }\n return span;\n }\n /** @override */\n decode(b4, offset = 0) {\n checkUint8Array(b4);\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (void 0 !== fd.property) {\n dest[fd.property] = fd.decode(b4, offset);\n }\n offset += fd.getSpan(b4, offset);\n if (this.decodePrefixes && b4.length === offset) {\n break;\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b4, offset = 0) {\n const firstOffset = offset;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = 0 < span ? span : 0;\n if (void 0 !== fd.property) {\n const fv = src[fd.property];\n if (void 0 !== fv) {\n lastWrote = fd.encode(fv, b4, offset);\n if (0 > span) {\n span = fd.getSpan(b4, offset);\n }\n }\n }\n lastOffset = offset;\n offset += span;\n }\n return lastOffset + lastWrote - firstOffset;\n }\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (void 0 !== fd.property && 0 < values.length) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if (\"string\" !== typeof property) {\n throw new TypeError(\"property must be string\");\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return void 0;\n }\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if (\"string\" !== typeof property) {\n throw new TypeError(\"property must be string\");\n }\n let offset = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset;\n }\n if (0 > fd.span) {\n offset = -1;\n } else if (0 <= offset) {\n offset += fd.span;\n }\n }\n return void 0;\n }\n };\n exports3.Structure = Structure;\n var UnionDiscriminator = class {\n constructor(property) {\n this.property = property;\n }\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode(b4, offset) {\n throw new Error(\"UnionDiscriminator is abstract\");\n }\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode(src, b4, offset) {\n throw new Error(\"UnionDiscriminator is abstract\");\n }\n };\n exports3.UnionDiscriminator = UnionDiscriminator;\n var UnionLayoutDiscriminator = class extends UnionDiscriminator {\n constructor(layout, property) {\n if (!(layout instanceof ExternalLayout && layout.isCount())) {\n throw new TypeError(\"layout must be an unsigned integer ExternalLayout\");\n }\n super(property || layout.property || \"variant\");\n this.layout = layout;\n }\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b4, offset) {\n return this.layout.decode(b4, offset);\n }\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b4, offset) {\n return this.layout.encode(src, b4, offset);\n }\n };\n exports3.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\n var Union = class extends Layout {\n constructor(discr, defaultLayout, property) {\n let discriminator;\n if (discr instanceof UInt || discr instanceof UIntBE) {\n discriminator = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n } else if (discr instanceof ExternalLayout && discr.isCount()) {\n discriminator = new UnionLayoutDiscriminator(discr);\n } else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError(\"discr must be a UnionDiscriminator or an unsigned integer layout\");\n } else {\n discriminator = discr;\n }\n if (void 0 === defaultLayout) {\n defaultLayout = null;\n }\n if (!(null === defaultLayout || defaultLayout instanceof Layout)) {\n throw new TypeError(\"defaultLayout must be null or a Layout\");\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error(\"defaultLayout must have constant span\");\n }\n if (void 0 === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate(\"content\");\n }\n }\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if (0 <= span && (discr instanceof UInt || discr instanceof UIntBE)) {\n span += discriminator.layout.span;\n }\n }\n super(span, property);\n this.discriminator = discriminator;\n this.usesPrefixDiscriminator = discr instanceof UInt || discr instanceof UIntBE;\n this.defaultLayout = defaultLayout;\n this.registry = {};\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n this.getSourceVariant = function(src) {\n return boundGetSourceVariant(src);\n };\n this.configGetSourceVariant = function(gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n /** @override */\n getSpan(b4, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n const vlo = this.getVariant(b4, offset);\n if (!vlo) {\n throw new Error(\"unable to determine span for unrecognized variant\");\n }\n return vlo.getSpan(b4, offset);\n }\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisfied rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (Object.prototype.hasOwnProperty.call(src, this.discriminator.property)) {\n if (this.defaultLayout && this.defaultLayout.property && Object.prototype.hasOwnProperty.call(src, this.defaultLayout.property)) {\n return void 0;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo && (!vlo.layout || vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property))) {\n return vlo;\n }\n } else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error(\"unable to infer src variant\");\n }\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b4, offset = 0) {\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b4, offset);\n const clo = this.registry[discr];\n if (void 0 === clo) {\n const defaultLayout = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n dest[defaultLayout.property] = defaultLayout.decode(b4, offset + contentOffset);\n } else {\n dest = clo.decode(b4, offset);\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b4, offset = 0) {\n const vlo = this.getSourceVariant(src);\n if (void 0 === vlo) {\n const dlo = this.discriminator;\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b4, offset);\n return contentOffset + clo.encode(src[clo.property], b4, offset + contentOffset);\n }\n return vlo.encode(src, b4, offset);\n }\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Uint8Array)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Uint8Array}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset = 0) {\n let variant;\n if (vb instanceof Uint8Array) {\n variant = this.discriminator.decode(vb, offset);\n } else {\n variant = vb;\n }\n return this.registry[variant];\n }\n };\n exports3.Union = Union;\n var VariantLayout = class extends Layout {\n constructor(union, variant, layout, property) {\n if (!(union instanceof Union)) {\n throw new TypeError(\"union must be a Union\");\n }\n if (!Number.isInteger(variant) || 0 > variant) {\n throw new TypeError(\"variant must be a (non-negative) integer\");\n }\n if (\"string\" === typeof layout && void 0 === property) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError(\"layout must be a Layout\");\n }\n if (null !== union.defaultLayout && 0 <= layout.span && layout.span > union.defaultLayout.span) {\n throw new Error(\"variant span exceeds span of containing union\");\n }\n if (\"string\" !== typeof property) {\n throw new TypeError(\"variant must have a String property\");\n }\n }\n let span = union.span;\n if (0 > union.span) {\n span = layout ? layout.span : 0;\n if (0 <= span && union.usesPrefixDiscriminator) {\n span += union.discriminator.layout.span;\n }\n }\n super(span, property);\n this.union = union;\n this.variant = variant;\n this.layout = layout || null;\n }\n /** @override */\n getSpan(b4, offset = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n let span = 0;\n if (this.layout) {\n span = this.layout.getSpan(b4, offset + contentOffset);\n }\n return contentOffset + span;\n }\n /** @override */\n decode(b4, offset = 0) {\n const dest = this.makeDestinationObject();\n if (this !== this.union.getVariant(b4, offset)) {\n throw new Error(\"variant mismatch\");\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b4, offset + contentOffset);\n } else if (this.property) {\n dest[this.property] = true;\n } else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n /** @override */\n encode(src, b4, offset = 0) {\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout && !Object.prototype.hasOwnProperty.call(src, this.property)) {\n throw new TypeError(\"variant lacks property \" + this.property);\n }\n this.union.discriminator.encode(this.variant, b4, offset);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b4, offset + contentOffset);\n span += this.layout.getSpan(b4, offset + contentOffset);\n if (0 <= this.union.span && span > this.union.span) {\n throw new Error(\"encoded variant overruns containing union\");\n }\n }\n return span;\n }\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n return void 0;\n }\n };\n exports3.VariantLayout = VariantLayout;\n function fixBitwiseResult(v2) {\n if (0 > v2) {\n v2 += 4294967296;\n }\n return v2;\n }\n var BitStructure = class extends Layout {\n constructor(word, msb, property) {\n if (!(word instanceof UInt || word instanceof UIntBE)) {\n throw new TypeError(\"word must be a UInt or UIntBE layout\");\n }\n if (\"string\" === typeof msb && void 0 === property) {\n property = msb;\n msb = false;\n }\n if (4 < word.span) {\n throw new RangeError(\"word cannot exceed 32 bits\");\n }\n super(word.span, property);\n this.word = word;\n this.msb = !!msb;\n this.fields = [];\n let value = 0;\n this._packedSetValue = function(v2) {\n value = fixBitwiseResult(v2);\n return this;\n };\n this._packedGetValue = function() {\n return value;\n };\n }\n /** @override */\n decode(b4, offset = 0) {\n const dest = this.makeDestinationObject();\n const value = this.word.decode(b4, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (void 0 !== fd.property) {\n dest[fd.property] = fd.decode(b4);\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b4, offset = 0) {\n const value = this.word.decode(b4, offset);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (void 0 !== fd.property) {\n const fv = src[fd.property];\n if (void 0 !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b4, offset);\n }\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n // `Boolean` conflicts with the native primitive type\n // eslint-disable-next-line @typescript-eslint/ban-types\n addBoolean(property) {\n const bf = new Boolean2(this, property);\n this.fields.push(bf);\n return bf;\n }\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if (\"string\" !== typeof property) {\n throw new TypeError(\"property must be string\");\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return void 0;\n }\n };\n exports3.BitStructure = BitStructure;\n var BitField = class {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError(\"container must be a BitStructure\");\n }\n if (!Number.isInteger(bits) || 0 >= bits) {\n throw new TypeError(\"bits must be positive integer\");\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if (bits + usedBits > totalBits) {\n throw new Error(\"bits too long for span remainder (\" + (totalBits - usedBits) + \" of \" + totalBits + \" remain)\");\n }\n this.container = container;\n this.bits = bits;\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) {\n this.valueMask = 4294967295;\n }\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n this.property = property;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode(b4, offset) {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if (\"number\" !== typeof value || !Number.isInteger(value) || value !== fixBitwiseResult(value & this.valueMask)) {\n throw new TypeError(nameWithProperty(\"BitField.encode\", this) + \" value must be integer not exceeding \" + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask) | wordValue);\n }\n };\n exports3.BitField = BitField;\n var Boolean2 = class extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b4, offset) {\n return !!super.decode(b4, offset);\n }\n /** @override */\n encode(value) {\n if (\"boolean\" === typeof value) {\n value = +value;\n }\n super.encode(value);\n }\n };\n exports3.Boolean = Boolean2;\n var Blob = class extends Layout {\n constructor(length, property) {\n if (!(length instanceof ExternalLayout && length.isCount() || Number.isInteger(length) && 0 <= length)) {\n throw new TypeError(\"length must be positive integer or an unsigned integer ExternalLayout\");\n }\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n this.length = length;\n }\n /** @override */\n getSpan(b4, offset) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b4, offset);\n }\n return span;\n }\n /** @override */\n decode(b4, offset = 0) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b4, offset);\n }\n return uint8ArrayToBuffer(b4).slice(offset, offset + span);\n }\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b4, offset) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(src instanceof Uint8Array && span === src.length)) {\n throw new TypeError(nameWithProperty(\"Blob.encode\", this) + \" requires (length \" + span + \") Uint8Array as src\");\n }\n if (offset + span > b4.length) {\n throw new RangeError(\"encoding overruns Uint8Array\");\n }\n const srcBuffer = uint8ArrayToBuffer(src);\n uint8ArrayToBuffer(b4).write(srcBuffer.toString(\"hex\"), offset, span, \"hex\");\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b4, offset);\n }\n return span;\n }\n };\n exports3.Blob = Blob;\n var CString = class extends Layout {\n constructor(property) {\n super(-1, property);\n }\n /** @override */\n getSpan(b4, offset = 0) {\n checkUint8Array(b4);\n let idx = offset;\n while (idx < b4.length && 0 !== b4[idx]) {\n idx += 1;\n }\n return 1 + idx - offset;\n }\n /** @override */\n decode(b4, offset = 0) {\n const span = this.getSpan(b4, offset);\n return uint8ArrayToBuffer(b4).slice(offset, offset + span - 1).toString(\"utf-8\");\n }\n /** @override */\n encode(src, b4, offset = 0) {\n if (\"string\" !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, \"utf8\");\n const span = srcb.length;\n if (offset + span > b4.length) {\n throw new RangeError(\"encoding overruns Buffer\");\n }\n const buffer2 = uint8ArrayToBuffer(b4);\n srcb.copy(buffer2, offset);\n buffer2[offset + span] = 0;\n return span + 1;\n }\n };\n exports3.CString = CString;\n var UTF8 = class extends Layout {\n constructor(maxSpan, property) {\n if (\"string\" === typeof maxSpan && void 0 === property) {\n property = maxSpan;\n maxSpan = void 0;\n }\n if (void 0 === maxSpan) {\n maxSpan = -1;\n } else if (!Number.isInteger(maxSpan)) {\n throw new TypeError(\"maxSpan must be an integer\");\n }\n super(-1, property);\n this.maxSpan = maxSpan;\n }\n /** @override */\n getSpan(b4, offset = 0) {\n checkUint8Array(b4);\n return b4.length - offset;\n }\n /** @override */\n decode(b4, offset = 0) {\n const span = this.getSpan(b4, offset);\n if (0 <= this.maxSpan && this.maxSpan < span) {\n throw new RangeError(\"text length exceeds maxSpan\");\n }\n return uint8ArrayToBuffer(b4).slice(offset, offset + span).toString(\"utf-8\");\n }\n /** @override */\n encode(src, b4, offset = 0) {\n if (\"string\" !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, \"utf8\");\n const span = srcb.length;\n if (0 <= this.maxSpan && this.maxSpan < span) {\n throw new RangeError(\"text length exceeds maxSpan\");\n }\n if (offset + span > b4.length) {\n throw new RangeError(\"encoding overruns Buffer\");\n }\n srcb.copy(uint8ArrayToBuffer(b4), offset);\n return span;\n }\n };\n exports3.UTF8 = UTF8;\n var Constant = class extends Layout {\n constructor(value, property) {\n super(0, property);\n this.value = value;\n }\n /** @override */\n decode(b4, offset) {\n return this.value;\n }\n /** @override */\n encode(src, b4, offset) {\n return 0;\n }\n };\n exports3.Constant = Constant;\n exports3.greedy = (elementSpan, property) => new GreedyCount(elementSpan, property);\n exports3.offset = (layout, offset, property) => new OffsetLayout(layout, offset, property);\n exports3.u8 = (property) => new UInt(1, property);\n exports3.u16 = (property) => new UInt(2, property);\n exports3.u24 = (property) => new UInt(3, property);\n exports3.u32 = (property) => new UInt(4, property);\n exports3.u40 = (property) => new UInt(5, property);\n exports3.u48 = (property) => new UInt(6, property);\n exports3.nu64 = (property) => new NearUInt64(property);\n exports3.u16be = (property) => new UIntBE(2, property);\n exports3.u24be = (property) => new UIntBE(3, property);\n exports3.u32be = (property) => new UIntBE(4, property);\n exports3.u40be = (property) => new UIntBE(5, property);\n exports3.u48be = (property) => new UIntBE(6, property);\n exports3.nu64be = (property) => new NearUInt64BE(property);\n exports3.s8 = (property) => new Int(1, property);\n exports3.s16 = (property) => new Int(2, property);\n exports3.s24 = (property) => new Int(3, property);\n exports3.s32 = (property) => new Int(4, property);\n exports3.s40 = (property) => new Int(5, property);\n exports3.s48 = (property) => new Int(6, property);\n exports3.ns64 = (property) => new NearInt64(property);\n exports3.s16be = (property) => new IntBE(2, property);\n exports3.s24be = (property) => new IntBE(3, property);\n exports3.s32be = (property) => new IntBE(4, property);\n exports3.s40be = (property) => new IntBE(5, property);\n exports3.s48be = (property) => new IntBE(6, property);\n exports3.ns64be = (property) => new NearInt64BE(property);\n exports3.f32 = (property) => new Float(property);\n exports3.f32be = (property) => new FloatBE(property);\n exports3.f64 = (property) => new Double(property);\n exports3.f64be = (property) => new DoubleBE(property);\n exports3.struct = (fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes);\n exports3.bits = (word, msb, property) => new BitStructure(word, msb, property);\n exports3.seq = (elementLayout, count, property) => new Sequence(elementLayout, count, property);\n exports3.union = (discr, defaultLayout, property) => new Union(discr, defaultLayout, property);\n exports3.unionLayoutDiscriminator = (layout, property) => new UnionLayoutDiscriminator(layout, property);\n exports3.blob = (length, property) => new Blob(length, property);\n exports3.cstr = (property) => new CString(property);\n exports3.utf8 = (maxSpan, property) => new UTF8(maxSpan, property);\n exports3.constant = (value, property) => new Constant(value, property);\n }\n });\n\n // ../../../node_modules/.pnpm/@solana+errors@2.3.0_typescript@5.8.3/node_modules/@solana/errors/dist/index.browser.cjs\n var require_index_browser = __commonJS({\n \"../../../node_modules/.pnpm/@solana+errors@2.3.0_typescript@5.8.3/node_modules/@solana/errors/dist/index.browser.cjs\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED = 1;\n var SOLANA_ERROR__INVALID_NONCE = 2;\n var SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = 3;\n var SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE = 4;\n var SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH = 5;\n var SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE = 6;\n var SOLANA_ERROR__MALFORMED_BIGINT_STRING = 7;\n var SOLANA_ERROR__MALFORMED_NUMBER_STRING = 8;\n var SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE = 9;\n var SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR = 10;\n var SOLANA_ERROR__JSON_RPC__PARSE_ERROR = -32700;\n var SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR = -32603;\n var SOLANA_ERROR__JSON_RPC__INVALID_PARAMS = -32602;\n var SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND = -32601;\n var SOLANA_ERROR__JSON_RPC__INVALID_REQUEST = -32600;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED = -32016;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION = -32015;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET = -32014;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH = -32013;\n var SOLANA_ERROR__JSON_RPC__SCAN_ERROR = -32012;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE = -32011;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX = -32010;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED = -32009;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT = -32008;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED = -32007;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE = -32006;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY = -32005;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE = -32004;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE = -32003;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE = -32002;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP = -32001;\n var SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH = 28e5;\n var SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE = 2800001;\n var SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS = 2800002;\n var SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY = 2800003;\n var SOLANA_ERROR__ADDRESSES__MALFORMED_PDA = 2800004;\n var SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE = 2800005;\n var SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED = 2800006;\n var SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED = 2800007;\n var SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE = 2800008;\n var SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED = 2800009;\n var SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER = 2800010;\n var SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS = 2800011;\n var SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND = 323e4;\n var SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND = 32300001;\n var SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT = 3230002;\n var SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT = 3230003;\n var SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED = 3230004;\n var SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT = 361e4;\n var SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED = 3610001;\n var SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED = 3610002;\n var SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED = 3610003;\n var SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED = 3610004;\n var SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED = 3610005;\n var SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED = 3610006;\n var SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY = 3610007;\n var SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED = 3611e3;\n var SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH = 3704e3;\n var SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH = 3704001;\n var SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH = 3704002;\n var SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE = 3704003;\n var SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY = 3704004;\n var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS = 4128e3;\n var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA = 4128001;\n var SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH = 4128002;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN = 4615e3;\n var SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR = 4615001;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT = 4615002;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA = 4615003;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA = 4615004;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL = 4615005;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS = 4615006;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID = 4615007;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE = 4615008;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED = 4615009;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT = 4615010;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION = 4615011;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID = 4615012;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND = 4615013;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED = 4615014;\n var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE = 4615015;\n var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED = 4615016;\n var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX = 4615017;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED = 4615018;\n var SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED = 4615019;\n var SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS = 4615020;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED = 4615021;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE = 4615022;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED = 4615023;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = 4615024;\n var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC = 4615025;\n var SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM = 4615026;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR = 4615027;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED = 4615028;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE = 4615029;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT = 4615030;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID = 4615031;\n var SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH = 4615032;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT = 4615033;\n var SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED = 4615034;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED = 4615035;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS = 4615036;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC = 4615037;\n var SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED = 4615038;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION = 4615039;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE = 4615040;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE = 4615041;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE = 4615042;\n var SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE = 4615043;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY = 4615044;\n var SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR = 4615045;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT = 4615046;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER = 4615047;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW = 4615048;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR = 4615049;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER = 4615050;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED = 4615051;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED = 4615052;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED = 4615053;\n var SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS = 4615054;\n var SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS = 5508e3;\n var SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER = 5508001;\n var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER = 5508002;\n var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER = 5508003;\n var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER = 5508004;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER = 5508005;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER = 5508006;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER = 5508007;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER = 5508008;\n var SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS = 5508009;\n var SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING = 5508010;\n var SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED = 5508011;\n var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES = 5663e3;\n var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE = 5663001;\n var SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME = 5663002;\n var SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME = 5663003;\n var SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE = 5663004;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING = 5663005;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE = 5663006;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND = 5663007;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING = 5663008;\n var SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING = 5663009;\n var SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING = 5663010;\n var SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING = 5663011;\n var SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING = 5663012;\n var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING = 5663013;\n var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE = 5663014;\n var SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION = 5663015;\n var SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES = 5663016;\n var SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH = 5663017;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT = 5663018;\n var SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT = 5663019;\n var SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT = 5663020;\n var SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN = 705e4;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE = 7050001;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE = 7050002;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND = 7050003;\n var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND = 7050004;\n var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE = 7050005;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE = 7050006;\n var SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED = 7050007;\n var SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND = 7050008;\n var SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP = 7050009;\n var SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE = 7050010;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX = 7050011;\n var SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE = 7050012;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION = 7050013;\n var SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE = 7050014;\n var SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE = 7050015;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = 7050016;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT = 7050017;\n var SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION = 7050018;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT = 7050019;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT = 7050020;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT = 7050021;\n var SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS = 7050022;\n var SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND = 7050023;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER = 7050024;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA = 7050025;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX = 7050026;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT = 7050027;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT = 7050028;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT = 7050029;\n var SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION = 7050030;\n var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT = 7050031;\n var SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED = 7050032;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT = 7050033;\n var SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED = 7050034;\n var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED = 7050035;\n var SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION = 7050036;\n var SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY = 8078e3;\n var SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH = 8078001;\n var SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH = 8078002;\n var SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH = 8078003;\n var SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH = 8078004;\n var SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH = 8078005;\n var SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH = 8078006;\n var SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS = 8078007;\n var SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE = 8078008;\n var SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT = 8078009;\n var SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT = 8078010;\n var SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE = 8078011;\n var SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE = 8078012;\n var SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH = 8078013;\n var SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE = 8078014;\n var SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT = 8078015;\n var SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE = 8078016;\n var SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE = 8078017;\n var SOLANA_ERROR__CODECS__INVALID_CONSTANT = 8078018;\n var SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE = 8078019;\n var SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL = 8078020;\n var SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES = 8078021;\n var SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS = 8078022;\n var SOLANA_ERROR__RPC__INTEGER_OVERFLOW = 81e5;\n var SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN = 8100001;\n var SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR = 8100002;\n var SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD = 8100003;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN = 819e4;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID = 8190001;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED = 8190002;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED = 8190003;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT = 8190004;\n var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING = 99e5;\n var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE = 9900001;\n var SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING = 9900002;\n var SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE = 9900003;\n var SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED = 9900004;\n var SolanaErrorMessages = {\n [SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND]: \"Account not found at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED]: \"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.\",\n [SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT]: \"Expected decoded account at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT]: \"Failed to decode account data at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND]: \"Accounts not found at addresses: $addresses\",\n [SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED]: \"Unable to find a viable program address bump seed.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS]: \"$putativeAddress is not a base58-encoded address.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH]: \"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY]: \"The `CryptoKey` must be an `Ed25519` public key.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS]: \"$putativeOffCurveAddress is not a base58-encoded off-curve address.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE]: \"Invalid seeds; point must fall off the Ed25519 curve.\",\n [SOLANA_ERROR__ADDRESSES__MALFORMED_PDA]: \"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].\",\n [SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED]: \"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.\",\n [SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED]: \"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.\",\n [SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE]: \"Expected program derived address bump to be in the range [0, 255], got: $bump.\",\n [SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER]: \"Program address cannot end with PDA marker.\",\n [SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.\",\n [SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.\",\n [SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: \"The network has progressed past the last block for which this transaction could have been committed.\",\n [SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY]: \"Codec [$codecDescription] cannot decode empty byte arrays.\",\n [SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS]: \"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.\",\n [SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL]: \"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH]: \"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH]: \"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH]: \"Encoder and decoder must either both be fixed-size or variable-size.\",\n [SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE]: \"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.\",\n [SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH]: \"Expected a fixed-size codec, got a variable-size one.\",\n [SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH]: \"Codec [$codecDescription] expected a positive byte length, got $bytesLength.\",\n [SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH]: \"Expected a variable-size codec, got a fixed-size one.\",\n [SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE]: \"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].\",\n [SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH]: \"Codec [$codecDescription] expected $expected bytes, got $bytesLength.\",\n [SOLANA_ERROR__CODECS__INVALID_CONSTANT]: \"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].\",\n [SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT]: \"Invalid discriminated union variant. Expected one of [$variants], got $value.\",\n [SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT]: \"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.\",\n [SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT]: \"Invalid literal union variant. Expected one of [$variants], got $value.\",\n [SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS]: \"Expected [$codecDescription] to have $expected items, got $actual.\",\n [SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE]: \"Invalid value $value for base $base with alphabet $alphabet.\",\n [SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE]: \"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.\",\n [SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE]: \"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.\",\n [SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE]: \"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.\",\n [SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES]: \"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].\",\n [SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE]: \"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.\",\n [SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED]: \"No random values implementation could be found.\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED]: \"instruction requires an uninitialized account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED]: \"instruction tries to borrow reference for an account which is already borrowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING]: \"instruction left account with an outstanding borrowed reference\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED]: \"program other than the account's owner changed the size of the account data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL]: \"account data too small for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE]: \"instruction expected an executable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT]: \"An account does not have enough lamports to be rent-exempt\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW]: \"Program arithmetic overflowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR]: \"Failed to serialize or deserialize account data: $encodedData\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS]: \"Builtin programs must consume compute units\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH]: \"Cross-program invocation call depth too deep\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED]: \"Computational budget exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM]: \"custom program error: #$code\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX]: \"instruction contains duplicate accounts\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC]: \"instruction modifications of multiply-passed account differ\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT]: \"executable accounts must be rent exempt\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED]: \"instruction changed executable accounts data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE]: \"instruction changed the balance of an executable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED]: \"instruction changed executable bit of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED]: \"instruction modified data of an account it does not own\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND]: \"instruction spent from the balance of an account it does not own\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR]: \"generic instruction error\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER]: \"Provided owner is not allowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE]: \"Account is immutable\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY]: \"Incorrect authority provided\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID]: \"incorrect program id for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS]: \"insufficient funds for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA]: \"invalid account data for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER]: \"Invalid account owner\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT]: \"invalid program argument\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR]: \"program returned invalid error code\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA]: \"invalid instruction data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC]: \"Failed to reallocate account data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS]: \"Provided seeds do not result in a valid address\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED]: \"Accounts data allocations exceeded the maximum allowed per transaction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED]: \"Max accounts exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED]: \"Max instruction trace length exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED]: \"Length of the seed is too long for address generation\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT]: \"An account required by the instruction is missing\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE]: \"missing required signature for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID]: \"instruction illegally modified the program id of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS]: \"insufficient account keys for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION]: \"Cross-program invocation with unauthorized signer or writable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE]: \"Failed to create program execution environment\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE]: \"Program failed to compile\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE]: \"Program failed to complete\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED]: \"instruction modified data of a read-only account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE]: \"instruction changed the balance of a read-only account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED]: \"Cross-program invocation reentrancy not allowed for this instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED]: \"instruction modified rent epoch of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION]: \"sum of account balances before and after instruction do not match\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT]: \"instruction requires an initialized account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN]: \"\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID]: \"Unsupported program id\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR]: \"Unsupported sysvar\",\n [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS]: \"The instruction does not have any accounts.\",\n [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA]: \"The instruction does not have any data.\",\n [SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH]: \"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.\",\n [SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH]: \"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__INVALID_NONCE]: \"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING]: \"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED]: \"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE]: \"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING]: \"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE]: \"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR]: \"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__INVALID_PARAMS]: \"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__INVALID_REQUEST]: \"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND]: \"JSON-RPC error: The method does not exist / is not available ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__PARSE_ERROR]: \"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__SCAN_ERROR]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED]: \"Minimum context slot has not been reached\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY]: \"Node is unhealthy; behind by $numSlotsBehind slots\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT]: \"No snapshot\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE]: \"Transaction simulation failed\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE]: \"Transaction history is not available from this node\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH]: \"Transaction signature length mismatch\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE]: \"Transaction signature verification failure\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION]: \"$__serverMessage\",\n [SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH]: \"Key pair bytes must be of length 64, got $byteLength.\",\n [SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH]: \"Expected private key bytes with length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH]: \"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.\",\n [SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY]: \"The provided private key does not match the provided public key.\",\n [SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.\",\n [SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE]: \"Lamports value must be in the range [0, 2e64-1]\",\n [SOLANA_ERROR__MALFORMED_BIGINT_STRING]: \"`$value` cannot be parsed as a `BigInt`\",\n [SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR]: \"$message\",\n [SOLANA_ERROR__MALFORMED_NUMBER_STRING]: \"`$value` cannot be parsed as a `Number`\",\n [SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND]: \"No nonce account could be found at address `$nonceAccountAddress`\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN]: \"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED]: \"WebSocket was closed before payload could be added to the send buffer\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED]: \"WebSocket connection closed\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT]: \"WebSocket failed to connect\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID]: \"Failed to obtain a subscription id from the server\",\n [SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD]: \"Could not find an API plan for RPC method: `$method`\",\n [SOLANA_ERROR__RPC__INTEGER_OVERFLOW]: \"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.\",\n [SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR]: \"HTTP error ($statusCode): $message\",\n [SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN]: \"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.\",\n [SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS]: \"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.\",\n [SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER]: \"The provided value does not implement the `KeyPairSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER]: \"The provided value does not implement the `MessageModifyingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER]: \"The provided value does not implement the `MessagePartialSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER]: \"The provided value does not implement any of the `MessageSigner` interfaces\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER]: \"The provided value does not implement the `TransactionModifyingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER]: \"The provided value does not implement the `TransactionPartialSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER]: \"The provided value does not implement the `TransactionSendingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER]: \"The provided value does not implement any of the `TransactionSigner` interfaces\",\n [SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS]: \"More than one `TransactionSendingSigner` was identified.\",\n [SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING]: \"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.\",\n [SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED]: \"Wallet account signers do not support signing multiple messages/transactions in a single operation\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY]: \"Cannot export a non-extractable key.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED]: \"No digest implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT]: \"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED]: \"This runtime does not support the generation of Ed25519 key pairs.\\n\\nInstall @solana/webcrypto-ed25519-polyfill and call its `install` function before generating keys in environments that do not support Ed25519.\\n\\nFor a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED]: \"No signature verification implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED]: \"No key generation implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED]: \"No signing implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED]: \"No key export implementation could be found.\",\n [SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE]: \"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING]: \"Transaction processing left an account with an outstanding borrowed reference\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE]: \"Account in use\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE]: \"Account loaded twice\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND]: \"Attempt to debit an account but found no record of a prior credit.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND]: \"Transaction loads an address table account that doesn't exist\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED]: \"This transaction has already been processed\",\n [SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND]: \"Blockhash not found\",\n [SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP]: \"Loader call chain is too deep\",\n [SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE]: \"Transactions are currently disabled due to cluster maintenance\",\n [SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION]: \"Transaction contains a duplicate instruction ($index) that is not allowed\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE]: \"Insufficient funds for fee\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT]: \"Transaction results in an account ($accountIndex) with insufficient funds for rent\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE]: \"This account may not be used to pay transaction fees\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX]: \"Transaction contains an invalid account reference\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA]: \"Transaction loads an address table account with invalid data\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX]: \"Transaction address table lookup uses an invalid index\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER]: \"Transaction loads an address table account with an invalid owner\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT]: \"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION]: \"This program may not be used for executing instructions\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT]: \"Transaction leaves an account with a lower balance than rent-exempt minimum\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT]: \"Transaction loads a writable account that cannot be written\",\n [SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED]: \"Transaction exceeded max loaded accounts data size cap\",\n [SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE]: \"Transaction requires a fee but has no signature present\",\n [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND]: \"Attempt to load a program that does not exist\",\n [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED]: \"Execution of the program referenced by account at index $accountIndex is temporarily restricted.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED]: \"ResanitizationNeeded\",\n [SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE]: \"Transaction failed to sanitize accounts offsets correctly\",\n [SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE]: \"Transaction did not pass signature verification\",\n [SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS]: \"Transaction locked too many accounts\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION]: \"Sum of account balances before and after transaction do not match\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN]: \"The transaction failed with the error `$errorName`\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION]: \"Transaction version is unsupported\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT]: \"Transaction would exceed account data limit within the block\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT]: \"Transaction would exceed total account data limit\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT]: \"Transaction would exceed max account limit within the block\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT]: \"Transaction would exceed max Block Cost Limit\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT]: \"Transaction would exceed max Vote Cost Limit\",\n [SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION]: \"Attempted to sign a transaction with an address that is not a signer for it\",\n [SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING]: \"Transaction is missing an address at index: $index.\",\n [SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES]: \"Transaction has no expected signers therefore it cannot be encoded\",\n [SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT]: \"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes\",\n [SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME]: \"Transaction does not have a blockhash lifetime\",\n [SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME]: \"Transaction is not a durable nonce transaction\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING]: \"Contents of these address lookup tables unknown: $lookupTableAddresses\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE]: \"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING]: \"No fee payer set in CompiledTransaction\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND]: \"Could not find program address at index $index\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT]: \"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more\",\n [SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT]: \"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more\",\n [SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING]: \"Transaction is missing a fee payer.\",\n [SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING]: \"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.\",\n [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE]: \"Transaction first instruction is not advance nonce account instruction.\",\n [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING]: \"Transaction with no instructions cannot be durable nonce transaction.\",\n [SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES]: \"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees\",\n [SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE]: \"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable\",\n [SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH]: \"The transaction message expected the transaction to have $signerAddressesLength signatures, got $signaturesLength.\",\n [SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING]: \"Transaction is missing signatures for addresses: $addresses.\",\n [SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE]: \"Transaction version must be in the range [0, 127]. `$actualVersion` given\"\n };\n var START_INDEX = \"i\";\n var TYPE = \"t\";\n function getHumanReadableErrorMessage(code, context2 = {}) {\n const messageFormatString = SolanaErrorMessages[code];\n if (messageFormatString.length === 0) {\n return \"\";\n }\n let state;\n function commitStateUpTo(endIndex) {\n if (state[TYPE] === 2) {\n const variableName = messageFormatString.slice(state[START_INDEX] + 1, endIndex);\n fragments.push(\n variableName in context2 ? (\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n `${context2[variableName]}`\n ) : `$${variableName}`\n );\n } else if (state[TYPE] === 1) {\n fragments.push(messageFormatString.slice(state[START_INDEX], endIndex));\n }\n }\n const fragments = [];\n messageFormatString.split(\"\").forEach((char, ii) => {\n if (ii === 0) {\n state = {\n [START_INDEX]: 0,\n [TYPE]: messageFormatString[0] === \"\\\\\" ? 0 : messageFormatString[0] === \"$\" ? 2 : 1\n /* Text */\n };\n return;\n }\n let nextState;\n switch (state[TYPE]) {\n case 0:\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 1\n /* Text */\n };\n break;\n case 1:\n if (char === \"\\\\\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 0\n /* EscapeSequence */\n };\n } else if (char === \"$\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 2\n /* Variable */\n };\n }\n break;\n case 2:\n if (char === \"\\\\\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 0\n /* EscapeSequence */\n };\n } else if (char === \"$\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 2\n /* Variable */\n };\n } else if (!char.match(/\\w/)) {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 1\n /* Text */\n };\n }\n break;\n }\n if (nextState) {\n if (state !== nextState) {\n commitStateUpTo(ii);\n }\n state = nextState;\n }\n });\n commitStateUpTo();\n return fragments.join(\"\");\n }\n function getErrorMessage(code, context2 = {}) {\n if (true) {\n return getHumanReadableErrorMessage(code, context2);\n } else {\n let decodingAdviceMessage = `Solana error #${code}; Decode this error by running \\`npx @solana/errors decode -- ${code}`;\n if (Object.keys(context2).length) {\n decodingAdviceMessage += ` '${encodeContextObject(context2)}'`;\n }\n return `${decodingAdviceMessage}\\``;\n }\n }\n function isSolanaError(e2, code) {\n const isSolanaError2 = e2 instanceof Error && e2.name === \"SolanaError\";\n if (isSolanaError2) {\n if (code !== void 0) {\n return e2.context.__code === code;\n }\n return true;\n }\n return false;\n }\n var SolanaError = class extends Error {\n /**\n * Indicates the root cause of this {@link SolanaError}, if any.\n *\n * For example, a transaction error might have an instruction error as its root cause. In this\n * case, you will be able to access the instruction error on the transaction error as `cause`.\n */\n cause = this.cause;\n /**\n * Contains context that can assist in understanding or recovering from a {@link SolanaError}.\n */\n context;\n constructor(...[code, contextAndErrorOptions]) {\n let context2;\n let errorOptions;\n if (contextAndErrorOptions) {\n const { cause, ...contextRest } = contextAndErrorOptions;\n if (cause) {\n errorOptions = { cause };\n }\n if (Object.keys(contextRest).length > 0) {\n context2 = contextRest;\n }\n }\n const message2 = getErrorMessage(code, context2);\n super(message2, errorOptions);\n this.context = {\n __code: code,\n ...context2\n };\n this.name = \"SolanaError\";\n }\n };\n function safeCaptureStackTrace(...args) {\n if (\"captureStackTrace\" in Error && typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(...args);\n }\n }\n function getSolanaErrorFromRpcError({ errorCodeBaseOffset, getErrorContext, orderedErrorNames, rpcEnumError }, constructorOpt) {\n let rpcErrorName;\n let rpcErrorContext;\n if (typeof rpcEnumError === \"string\") {\n rpcErrorName = rpcEnumError;\n } else {\n rpcErrorName = Object.keys(rpcEnumError)[0];\n rpcErrorContext = rpcEnumError[rpcErrorName];\n }\n const codeOffset = orderedErrorNames.indexOf(rpcErrorName);\n const errorCode = errorCodeBaseOffset + codeOffset;\n const errorContext = getErrorContext(errorCode, rpcErrorName, rpcErrorContext);\n const err = new SolanaError(errorCode, errorContext);\n safeCaptureStackTrace(err, constructorOpt);\n return err;\n }\n var ORDERED_ERROR_NAMES = [\n // Keep synced with RPC source: https://github.com/anza-xyz/agave/blob/master/sdk/program/src/instruction.rs\n // If this list ever gets too large, consider implementing a compression strategy like this:\n // https://gist.github.com/steveluscher/aaa7cbbb5433b1197983908a40860c47\n \"GenericError\",\n \"InvalidArgument\",\n \"InvalidInstructionData\",\n \"InvalidAccountData\",\n \"AccountDataTooSmall\",\n \"InsufficientFunds\",\n \"IncorrectProgramId\",\n \"MissingRequiredSignature\",\n \"AccountAlreadyInitialized\",\n \"UninitializedAccount\",\n \"UnbalancedInstruction\",\n \"ModifiedProgramId\",\n \"ExternalAccountLamportSpend\",\n \"ExternalAccountDataModified\",\n \"ReadonlyLamportChange\",\n \"ReadonlyDataModified\",\n \"DuplicateAccountIndex\",\n \"ExecutableModified\",\n \"RentEpochModified\",\n \"NotEnoughAccountKeys\",\n \"AccountDataSizeChanged\",\n \"AccountNotExecutable\",\n \"AccountBorrowFailed\",\n \"AccountBorrowOutstanding\",\n \"DuplicateAccountOutOfSync\",\n \"Custom\",\n \"InvalidError\",\n \"ExecutableDataModified\",\n \"ExecutableLamportChange\",\n \"ExecutableAccountNotRentExempt\",\n \"UnsupportedProgramId\",\n \"CallDepth\",\n \"MissingAccount\",\n \"ReentrancyNotAllowed\",\n \"MaxSeedLengthExceeded\",\n \"InvalidSeeds\",\n \"InvalidRealloc\",\n \"ComputationalBudgetExceeded\",\n \"PrivilegeEscalation\",\n \"ProgramEnvironmentSetupFailure\",\n \"ProgramFailedToComplete\",\n \"ProgramFailedToCompile\",\n \"Immutable\",\n \"IncorrectAuthority\",\n \"BorshIoError\",\n \"AccountNotRentExempt\",\n \"InvalidAccountOwner\",\n \"ArithmeticOverflow\",\n \"UnsupportedSysvar\",\n \"IllegalOwner\",\n \"MaxAccountsDataAllocationsExceeded\",\n \"MaxAccountsExceeded\",\n \"MaxInstructionTraceLengthExceeded\",\n \"BuiltinProgramsMustConsumeComputeUnits\"\n ];\n function getSolanaErrorFromInstructionError(index2, instructionError) {\n const numberIndex = Number(index2);\n return getSolanaErrorFromRpcError(\n {\n errorCodeBaseOffset: 4615001,\n getErrorContext(errorCode, rpcErrorName, rpcErrorContext) {\n if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN) {\n return {\n errorName: rpcErrorName,\n index: numberIndex,\n ...rpcErrorContext !== void 0 ? { instructionErrorContext: rpcErrorContext } : null\n };\n } else if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM) {\n return {\n code: Number(rpcErrorContext),\n index: numberIndex\n };\n } else if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR) {\n return {\n encodedData: rpcErrorContext,\n index: numberIndex\n };\n }\n return { index: numberIndex };\n },\n orderedErrorNames: ORDERED_ERROR_NAMES,\n rpcEnumError: instructionError\n },\n getSolanaErrorFromInstructionError\n );\n }\n var ORDERED_ERROR_NAMES2 = [\n // Keep synced with RPC source: https://github.com/anza-xyz/agave/blob/master/sdk/src/transaction/error.rs\n // If this list ever gets too large, consider implementing a compression strategy like this:\n // https://gist.github.com/steveluscher/aaa7cbbb5433b1197983908a40860c47\n \"AccountInUse\",\n \"AccountLoadedTwice\",\n \"AccountNotFound\",\n \"ProgramAccountNotFound\",\n \"InsufficientFundsForFee\",\n \"InvalidAccountForFee\",\n \"AlreadyProcessed\",\n \"BlockhashNotFound\",\n // `InstructionError` intentionally omitted; delegated to `getSolanaErrorFromInstructionError`\n \"CallChainTooDeep\",\n \"MissingSignatureForFee\",\n \"InvalidAccountIndex\",\n \"SignatureFailure\",\n \"InvalidProgramForExecution\",\n \"SanitizeFailure\",\n \"ClusterMaintenance\",\n \"AccountBorrowOutstanding\",\n \"WouldExceedMaxBlockCostLimit\",\n \"UnsupportedVersion\",\n \"InvalidWritableAccount\",\n \"WouldExceedMaxAccountCostLimit\",\n \"WouldExceedAccountDataBlockLimit\",\n \"TooManyAccountLocks\",\n \"AddressLookupTableNotFound\",\n \"InvalidAddressLookupTableOwner\",\n \"InvalidAddressLookupTableData\",\n \"InvalidAddressLookupTableIndex\",\n \"InvalidRentPayingAccount\",\n \"WouldExceedMaxVoteCostLimit\",\n \"WouldExceedAccountDataTotalLimit\",\n \"DuplicateInstruction\",\n \"InsufficientFundsForRent\",\n \"MaxLoadedAccountsDataSizeExceeded\",\n \"InvalidLoadedAccountsDataSizeLimit\",\n \"ResanitizationNeeded\",\n \"ProgramExecutionTemporarilyRestricted\",\n \"UnbalancedTransaction\"\n ];\n function getSolanaErrorFromTransactionError(transactionError) {\n if (typeof transactionError === \"object\" && \"InstructionError\" in transactionError) {\n return getSolanaErrorFromInstructionError(\n ...transactionError.InstructionError\n );\n }\n return getSolanaErrorFromRpcError(\n {\n errorCodeBaseOffset: 7050001,\n getErrorContext(errorCode, rpcErrorName, rpcErrorContext) {\n if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN) {\n return {\n errorName: rpcErrorName,\n ...rpcErrorContext !== void 0 ? { transactionErrorContext: rpcErrorContext } : null\n };\n } else if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION) {\n return {\n index: Number(rpcErrorContext)\n };\n } else if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT || errorCode === SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED) {\n return {\n accountIndex: Number(rpcErrorContext.account_index)\n };\n }\n },\n orderedErrorNames: ORDERED_ERROR_NAMES2,\n rpcEnumError: transactionError\n },\n getSolanaErrorFromTransactionError\n );\n }\n function getSolanaErrorFromJsonRpcError(putativeErrorResponse) {\n let out;\n if (isRpcErrorResponse(putativeErrorResponse)) {\n const { code: rawCode, data, message: message2 } = putativeErrorResponse;\n const code = Number(rawCode);\n if (code === SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE) {\n const { err, ...preflightErrorContext } = data;\n const causeObject = err ? { cause: getSolanaErrorFromTransactionError(err) } : null;\n out = new SolanaError(SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE, {\n ...preflightErrorContext,\n ...causeObject\n });\n } else {\n let errorContext;\n switch (code) {\n case SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR:\n case SOLANA_ERROR__JSON_RPC__INVALID_PARAMS:\n case SOLANA_ERROR__JSON_RPC__INVALID_REQUEST:\n case SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND:\n case SOLANA_ERROR__JSON_RPC__PARSE_ERROR:\n case SOLANA_ERROR__JSON_RPC__SCAN_ERROR:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION:\n errorContext = { __serverMessage: message2 };\n break;\n default:\n if (typeof data === \"object\" && !Array.isArray(data)) {\n errorContext = data;\n }\n }\n out = new SolanaError(code, errorContext);\n }\n } else {\n const message2 = typeof putativeErrorResponse === \"object\" && putativeErrorResponse !== null && \"message\" in putativeErrorResponse && typeof putativeErrorResponse.message === \"string\" ? putativeErrorResponse.message : \"Malformed JSON-RPC error with no message attribute\";\n out = new SolanaError(SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR, { error: putativeErrorResponse, message: message2 });\n }\n safeCaptureStackTrace(out, getSolanaErrorFromJsonRpcError);\n return out;\n }\n function isRpcErrorResponse(value) {\n return typeof value === \"object\" && value !== null && \"code\" in value && \"message\" in value && (typeof value.code === \"number\" || typeof value.code === \"bigint\") && typeof value.message === \"string\";\n }\n exports3.SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND = SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND;\n exports3.SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED = SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED;\n exports3.SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT = SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT;\n exports3.SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT = SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT;\n exports3.SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND = SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND;\n exports3.SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED = SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED;\n exports3.SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS = SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS;\n exports3.SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH = SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH;\n exports3.SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY = SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY;\n exports3.SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS = SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS;\n exports3.SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE = SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE;\n exports3.SOLANA_ERROR__ADDRESSES__MALFORMED_PDA = SOLANA_ERROR__ADDRESSES__MALFORMED_PDA;\n exports3.SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED = SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED;\n exports3.SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED = SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED;\n exports3.SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE = SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER = SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER;\n exports3.SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE = SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE = SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED = SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED;\n exports3.SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY = SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY;\n exports3.SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS = SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS;\n exports3.SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL = SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL;\n exports3.SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH = SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH;\n exports3.SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH = SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH;\n exports3.SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH = SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH;\n exports3.SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE = SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH = SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH;\n exports3.SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH = SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH;\n exports3.SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH = SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH;\n exports3.SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE = SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE;\n exports3.SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH = SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH;\n exports3.SOLANA_ERROR__CODECS__INVALID_CONSTANT = SOLANA_ERROR__CODECS__INVALID_CONSTANT;\n exports3.SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT = SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT;\n exports3.SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT = SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT;\n exports3.SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT = SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT;\n exports3.SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS = SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS;\n exports3.SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE = SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE;\n exports3.SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE = SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE = SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE = SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES = SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES;\n exports3.SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE = SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED = SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED = SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED = SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED = SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL = SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE = SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT = SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW = SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR = SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS = SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH = SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED = SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM = SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX = SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC = SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT = SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED = SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE = SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED = SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED = SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND = SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR = SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER = SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE = SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY = SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID = SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS = SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA = SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER = SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT = SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR = SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA = SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC = SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS = SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED = SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED = SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED = SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED = SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT = SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE = SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID = SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS = SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION = SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE = SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE = SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE = SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED = SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE = SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED = SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED = SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION = SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT = SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN = SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID = SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID;\n exports3.SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR = SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR;\n exports3.SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS = SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS;\n exports3.SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA = SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA;\n exports3.SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH = SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH;\n exports3.SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH = SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH;\n exports3.SOLANA_ERROR__INVALID_NONCE = SOLANA_ERROR__INVALID_NONCE;\n exports3.SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING = SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING;\n exports3.SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED = SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED;\n exports3.SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE = SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE;\n exports3.SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING = SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING;\n exports3.SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE = SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE;\n exports3.SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR = SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR;\n exports3.SOLANA_ERROR__JSON_RPC__INVALID_PARAMS = SOLANA_ERROR__JSON_RPC__INVALID_PARAMS;\n exports3.SOLANA_ERROR__JSON_RPC__INVALID_REQUEST = SOLANA_ERROR__JSON_RPC__INVALID_REQUEST;\n exports3.SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND = SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND;\n exports3.SOLANA_ERROR__JSON_RPC__PARSE_ERROR = SOLANA_ERROR__JSON_RPC__PARSE_ERROR;\n exports3.SOLANA_ERROR__JSON_RPC__SCAN_ERROR = SOLANA_ERROR__JSON_RPC__SCAN_ERROR;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE;\n exports3.SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION = SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION;\n exports3.SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH = SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH;\n exports3.SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH = SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH;\n exports3.SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH = SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH;\n exports3.SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY = SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY;\n exports3.SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE = SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE = SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__MALFORMED_BIGINT_STRING = SOLANA_ERROR__MALFORMED_BIGINT_STRING;\n exports3.SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR = SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR;\n exports3.SOLANA_ERROR__MALFORMED_NUMBER_STRING = SOLANA_ERROR__MALFORMED_NUMBER_STRING;\n exports3.SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND;\n exports3.SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN = SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN;\n exports3.SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED = SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED;\n exports3.SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED = SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED;\n exports3.SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT = SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT;\n exports3.SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID = SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID;\n exports3.SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD = SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD;\n exports3.SOLANA_ERROR__RPC__INTEGER_OVERFLOW = SOLANA_ERROR__RPC__INTEGER_OVERFLOW;\n exports3.SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR = SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR;\n exports3.SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN = SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN;\n exports3.SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS = SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS;\n exports3.SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER = SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER;\n exports3.SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER = SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER;\n exports3.SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER = SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER;\n exports3.SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER = SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER;\n exports3.SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER = SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER;\n exports3.SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER = SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER;\n exports3.SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER = SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER;\n exports3.SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER = SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER;\n exports3.SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS = SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS;\n exports3.SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING = SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING;\n exports3.SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED = SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED;\n exports3.SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY = SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY;\n exports3.SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED = SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED;\n exports3.SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT = SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT;\n exports3.SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED = SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED;\n exports3.SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED = SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED;\n exports3.SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED = SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED;\n exports3.SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED = SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED;\n exports3.SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED = SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED;\n exports3.SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE = SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE = SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE = SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND = SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND = SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED = SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND = SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP = SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE = SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION = SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE = SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT = SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE = SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX = SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA = SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX = SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER = SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT = SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION = SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT = SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT = SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED = SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE = SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND = SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED = SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED = SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE = SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE = SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS = SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION = SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN = SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION = SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT = SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT = SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT = SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT = SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT;\n exports3.SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT = SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT;\n exports3.SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION = SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION;\n exports3.SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING = SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING;\n exports3.SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES = SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES;\n exports3.SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT = SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT;\n exports3.SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME = SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME;\n exports3.SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME = SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME;\n exports3.SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING = SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING;\n exports3.SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE = SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE;\n exports3.SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING = SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING;\n exports3.SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND = SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND;\n exports3.SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT = SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT;\n exports3.SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT = SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT;\n exports3.SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING = SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING;\n exports3.SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING = SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING;\n exports3.SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE = SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE;\n exports3.SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING = SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING;\n exports3.SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES = SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES;\n exports3.SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE = SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE;\n exports3.SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH = SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH;\n exports3.SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING = SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING;\n exports3.SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE = SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE;\n exports3.SolanaError = SolanaError;\n exports3.getSolanaErrorFromInstructionError = getSolanaErrorFromInstructionError;\n exports3.getSolanaErrorFromJsonRpcError = getSolanaErrorFromJsonRpcError;\n exports3.getSolanaErrorFromTransactionError = getSolanaErrorFromTransactionError;\n exports3.isSolanaError = isSolanaError;\n exports3.safeCaptureStackTrace = safeCaptureStackTrace;\n }\n });\n\n // ../../../node_modules/.pnpm/@solana+codecs-core@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-core/dist/index.browser.cjs\n var require_index_browser2 = __commonJS({\n \"../../../node_modules/.pnpm/@solana+codecs-core@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-core/dist/index.browser.cjs\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var errors = require_index_browser();\n var mergeBytes = (byteArrays) => {\n const nonEmptyByteArrays = byteArrays.filter((arr) => arr.length);\n if (nonEmptyByteArrays.length === 0) {\n return byteArrays.length ? byteArrays[0] : new Uint8Array();\n }\n if (nonEmptyByteArrays.length === 1) {\n return nonEmptyByteArrays[0];\n }\n const totalLength = nonEmptyByteArrays.reduce((total, arr) => total + arr.length, 0);\n const result = new Uint8Array(totalLength);\n let offset = 0;\n nonEmptyByteArrays.forEach((arr) => {\n result.set(arr, offset);\n offset += arr.length;\n });\n return result;\n };\n var padBytes2 = (bytes, length) => {\n if (bytes.length >= length)\n return bytes;\n const paddedBytes = new Uint8Array(length).fill(0);\n paddedBytes.set(bytes);\n return paddedBytes;\n };\n var fixBytes = (bytes, length) => padBytes2(bytes.length <= length ? bytes : bytes.slice(0, length), length);\n function containsBytes(data, bytes, offset) {\n const slice4 = offset === 0 && data.length === bytes.length ? data : data.slice(offset, offset + bytes.length);\n if (slice4.length !== bytes.length)\n return false;\n return bytes.every((b4, i3) => b4 === slice4[i3]);\n }\n function getEncodedSize(value, encoder7) {\n return \"fixedSize\" in encoder7 ? encoder7.fixedSize : encoder7.getSizeFromValue(value);\n }\n function createEncoder(encoder7) {\n return Object.freeze({\n ...encoder7,\n encode: (value) => {\n const bytes = new Uint8Array(getEncodedSize(value, encoder7));\n encoder7.write(value, bytes, 0);\n return bytes;\n }\n });\n }\n function createDecoder(decoder3) {\n return Object.freeze({\n ...decoder3,\n decode: (bytes, offset = 0) => decoder3.read(bytes, offset)[0]\n });\n }\n function createCodec(codec) {\n return Object.freeze({\n ...codec,\n decode: (bytes, offset = 0) => codec.read(bytes, offset)[0],\n encode: (value) => {\n const bytes = new Uint8Array(getEncodedSize(value, codec));\n codec.write(value, bytes, 0);\n return bytes;\n }\n });\n }\n function isFixedSize(codec) {\n return \"fixedSize\" in codec && typeof codec.fixedSize === \"number\";\n }\n function assertIsFixedSize(codec) {\n if (!isFixedSize(codec)) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH);\n }\n }\n function isVariableSize(codec) {\n return !isFixedSize(codec);\n }\n function assertIsVariableSize(codec) {\n if (!isVariableSize(codec)) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH);\n }\n }\n function combineCodec(encoder7, decoder3) {\n if (isFixedSize(encoder7) !== isFixedSize(decoder3)) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH);\n }\n if (isFixedSize(encoder7) && isFixedSize(decoder3) && encoder7.fixedSize !== decoder3.fixedSize) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH, {\n decoderFixedSize: decoder3.fixedSize,\n encoderFixedSize: encoder7.fixedSize\n });\n }\n if (!isFixedSize(encoder7) && !isFixedSize(decoder3) && encoder7.maxSize !== decoder3.maxSize) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH, {\n decoderMaxSize: decoder3.maxSize,\n encoderMaxSize: encoder7.maxSize\n });\n }\n return {\n ...decoder3,\n ...encoder7,\n decode: decoder3.decode,\n encode: encoder7.encode,\n read: decoder3.read,\n write: encoder7.write\n };\n }\n function addEncoderSentinel(encoder7, sentinel) {\n const write = (value, bytes, offset) => {\n const encoderBytes = encoder7.encode(value);\n if (findSentinelIndex(encoderBytes, sentinel) >= 0) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL, {\n encodedBytes: encoderBytes,\n hexEncodedBytes: hexBytes(encoderBytes),\n hexSentinel: hexBytes(sentinel),\n sentinel\n });\n }\n bytes.set(encoderBytes, offset);\n offset += encoderBytes.length;\n bytes.set(sentinel, offset);\n offset += sentinel.length;\n return offset;\n };\n if (isFixedSize(encoder7)) {\n return createEncoder({ ...encoder7, fixedSize: encoder7.fixedSize + sentinel.length, write });\n }\n return createEncoder({\n ...encoder7,\n ...encoder7.maxSize != null ? { maxSize: encoder7.maxSize + sentinel.length } : {},\n getSizeFromValue: (value) => encoder7.getSizeFromValue(value) + sentinel.length,\n write\n });\n }\n function addDecoderSentinel(decoder3, sentinel) {\n const read = (bytes, offset) => {\n const candidateBytes = offset === 0 ? bytes : bytes.slice(offset);\n const sentinelIndex = findSentinelIndex(candidateBytes, sentinel);\n if (sentinelIndex === -1) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES, {\n decodedBytes: candidateBytes,\n hexDecodedBytes: hexBytes(candidateBytes),\n hexSentinel: hexBytes(sentinel),\n sentinel\n });\n }\n const preSentinelBytes = candidateBytes.slice(0, sentinelIndex);\n return [decoder3.decode(preSentinelBytes), offset + preSentinelBytes.length + sentinel.length];\n };\n if (isFixedSize(decoder3)) {\n return createDecoder({ ...decoder3, fixedSize: decoder3.fixedSize + sentinel.length, read });\n }\n return createDecoder({\n ...decoder3,\n ...decoder3.maxSize != null ? { maxSize: decoder3.maxSize + sentinel.length } : {},\n read\n });\n }\n function addCodecSentinel(codec, sentinel) {\n return combineCodec(addEncoderSentinel(codec, sentinel), addDecoderSentinel(codec, sentinel));\n }\n function findSentinelIndex(bytes, sentinel) {\n return bytes.findIndex((byte, index2, arr) => {\n if (sentinel.length === 1)\n return byte === sentinel[0];\n return containsBytes(arr, sentinel, index2);\n });\n }\n function hexBytes(bytes) {\n return bytes.reduce((str, byte) => str + byte.toString(16).padStart(2, \"0\"), \"\");\n }\n function assertByteArrayIsNotEmptyForCodec(codecDescription, bytes, offset = 0) {\n if (bytes.length - offset <= 0) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY, {\n codecDescription\n });\n }\n }\n function assertByteArrayHasEnoughBytesForCodec(codecDescription, expected, bytes, offset = 0) {\n const bytesLength = bytes.length - offset;\n if (bytesLength < expected) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH, {\n bytesLength,\n codecDescription,\n expected\n });\n }\n }\n function assertByteArrayOffsetIsNotOutOfRange(codecDescription, offset, bytesLength) {\n if (offset < 0 || offset > bytesLength) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE, {\n bytesLength,\n codecDescription,\n offset\n });\n }\n }\n function addEncoderSizePrefix(encoder7, prefix) {\n const write = (value, bytes, offset) => {\n const encoderBytes = encoder7.encode(value);\n offset = prefix.write(encoderBytes.length, bytes, offset);\n bytes.set(encoderBytes, offset);\n return offset + encoderBytes.length;\n };\n if (isFixedSize(prefix) && isFixedSize(encoder7)) {\n return createEncoder({ ...encoder7, fixedSize: prefix.fixedSize + encoder7.fixedSize, write });\n }\n const prefixMaxSize = isFixedSize(prefix) ? prefix.fixedSize : prefix.maxSize ?? null;\n const encoderMaxSize = isFixedSize(encoder7) ? encoder7.fixedSize : encoder7.maxSize ?? null;\n const maxSize = prefixMaxSize !== null && encoderMaxSize !== null ? prefixMaxSize + encoderMaxSize : null;\n return createEncoder({\n ...encoder7,\n ...maxSize !== null ? { maxSize } : {},\n getSizeFromValue: (value) => {\n const encoderSize = getEncodedSize(value, encoder7);\n return getEncodedSize(encoderSize, prefix) + encoderSize;\n },\n write\n });\n }\n function addDecoderSizePrefix(decoder3, prefix) {\n const read = (bytes, offset) => {\n const [bigintSize, decoderOffset] = prefix.read(bytes, offset);\n const size6 = Number(bigintSize);\n offset = decoderOffset;\n if (offset > 0 || bytes.length > size6) {\n bytes = bytes.slice(offset, offset + size6);\n }\n assertByteArrayHasEnoughBytesForCodec(\"addDecoderSizePrefix\", size6, bytes);\n return [decoder3.decode(bytes), offset + size6];\n };\n if (isFixedSize(prefix) && isFixedSize(decoder3)) {\n return createDecoder({ ...decoder3, fixedSize: prefix.fixedSize + decoder3.fixedSize, read });\n }\n const prefixMaxSize = isFixedSize(prefix) ? prefix.fixedSize : prefix.maxSize ?? null;\n const decoderMaxSize = isFixedSize(decoder3) ? decoder3.fixedSize : decoder3.maxSize ?? null;\n const maxSize = prefixMaxSize !== null && decoderMaxSize !== null ? prefixMaxSize + decoderMaxSize : null;\n return createDecoder({ ...decoder3, ...maxSize !== null ? { maxSize } : {}, read });\n }\n function addCodecSizePrefix(codec, prefix) {\n return combineCodec(addEncoderSizePrefix(codec, prefix), addDecoderSizePrefix(codec, prefix));\n }\n function fixEncoderSize(encoder7, fixedBytes) {\n return createEncoder({\n fixedSize: fixedBytes,\n write: (value, bytes, offset) => {\n const variableByteArray = encoder7.encode(value);\n const fixedByteArray = variableByteArray.length > fixedBytes ? variableByteArray.slice(0, fixedBytes) : variableByteArray;\n bytes.set(fixedByteArray, offset);\n return offset + fixedBytes;\n }\n });\n }\n function fixDecoderSize(decoder3, fixedBytes) {\n return createDecoder({\n fixedSize: fixedBytes,\n read: (bytes, offset) => {\n assertByteArrayHasEnoughBytesForCodec(\"fixCodecSize\", fixedBytes, bytes, offset);\n if (offset > 0 || bytes.length > fixedBytes) {\n bytes = bytes.slice(offset, offset + fixedBytes);\n }\n if (isFixedSize(decoder3)) {\n bytes = fixBytes(bytes, decoder3.fixedSize);\n }\n const [value] = decoder3.read(bytes, 0);\n return [value, offset + fixedBytes];\n }\n });\n }\n function fixCodecSize(codec, fixedBytes) {\n return combineCodec(fixEncoderSize(codec, fixedBytes), fixDecoderSize(codec, fixedBytes));\n }\n function offsetEncoder(encoder7, config2) {\n return createEncoder({\n ...encoder7,\n write: (value, bytes, preOffset) => {\n const wrapBytes = (offset) => modulo(offset, bytes.length);\n const newPreOffset = config2.preOffset ? config2.preOffset({ bytes, preOffset, wrapBytes }) : preOffset;\n assertByteArrayOffsetIsNotOutOfRange(\"offsetEncoder\", newPreOffset, bytes.length);\n const postOffset = encoder7.write(value, bytes, newPreOffset);\n const newPostOffset = config2.postOffset ? config2.postOffset({ bytes, newPreOffset, postOffset, preOffset, wrapBytes }) : postOffset;\n assertByteArrayOffsetIsNotOutOfRange(\"offsetEncoder\", newPostOffset, bytes.length);\n return newPostOffset;\n }\n });\n }\n function offsetDecoder(decoder3, config2) {\n return createDecoder({\n ...decoder3,\n read: (bytes, preOffset) => {\n const wrapBytes = (offset) => modulo(offset, bytes.length);\n const newPreOffset = config2.preOffset ? config2.preOffset({ bytes, preOffset, wrapBytes }) : preOffset;\n assertByteArrayOffsetIsNotOutOfRange(\"offsetDecoder\", newPreOffset, bytes.length);\n const [value, postOffset] = decoder3.read(bytes, newPreOffset);\n const newPostOffset = config2.postOffset ? config2.postOffset({ bytes, newPreOffset, postOffset, preOffset, wrapBytes }) : postOffset;\n assertByteArrayOffsetIsNotOutOfRange(\"offsetDecoder\", newPostOffset, bytes.length);\n return [value, newPostOffset];\n }\n });\n }\n function offsetCodec(codec, config2) {\n return combineCodec(offsetEncoder(codec, config2), offsetDecoder(codec, config2));\n }\n function modulo(dividend, divisor) {\n if (divisor === 0)\n return 0;\n return (dividend % divisor + divisor) % divisor;\n }\n function resizeEncoder(encoder7, resize) {\n if (isFixedSize(encoder7)) {\n const fixedSize = resize(encoder7.fixedSize);\n if (fixedSize < 0) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH, {\n bytesLength: fixedSize,\n codecDescription: \"resizeEncoder\"\n });\n }\n return createEncoder({ ...encoder7, fixedSize });\n }\n return createEncoder({\n ...encoder7,\n getSizeFromValue: (value) => {\n const newSize = resize(encoder7.getSizeFromValue(value));\n if (newSize < 0) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH, {\n bytesLength: newSize,\n codecDescription: \"resizeEncoder\"\n });\n }\n return newSize;\n }\n });\n }\n function resizeDecoder(decoder3, resize) {\n if (isFixedSize(decoder3)) {\n const fixedSize = resize(decoder3.fixedSize);\n if (fixedSize < 0) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH, {\n bytesLength: fixedSize,\n codecDescription: \"resizeDecoder\"\n });\n }\n return createDecoder({ ...decoder3, fixedSize });\n }\n return decoder3;\n }\n function resizeCodec(codec, resize) {\n return combineCodec(resizeEncoder(codec, resize), resizeDecoder(codec, resize));\n }\n function padLeftEncoder(encoder7, offset) {\n return offsetEncoder(\n resizeEncoder(encoder7, (size6) => size6 + offset),\n { preOffset: ({ preOffset }) => preOffset + offset }\n );\n }\n function padRightEncoder(encoder7, offset) {\n return offsetEncoder(\n resizeEncoder(encoder7, (size6) => size6 + offset),\n { postOffset: ({ postOffset }) => postOffset + offset }\n );\n }\n function padLeftDecoder(decoder3, offset) {\n return offsetDecoder(\n resizeDecoder(decoder3, (size6) => size6 + offset),\n { preOffset: ({ preOffset }) => preOffset + offset }\n );\n }\n function padRightDecoder(decoder3, offset) {\n return offsetDecoder(\n resizeDecoder(decoder3, (size6) => size6 + offset),\n { postOffset: ({ postOffset }) => postOffset + offset }\n );\n }\n function padLeftCodec(codec, offset) {\n return combineCodec(padLeftEncoder(codec, offset), padLeftDecoder(codec, offset));\n }\n function padRightCodec(codec, offset) {\n return combineCodec(padRightEncoder(codec, offset), padRightDecoder(codec, offset));\n }\n function copySourceToTargetInReverse(source, target_WILL_MUTATE, sourceOffset, sourceLength, targetOffset = 0) {\n while (sourceOffset < --sourceLength) {\n const leftValue = source[sourceOffset];\n target_WILL_MUTATE[sourceOffset + targetOffset] = source[sourceLength];\n target_WILL_MUTATE[sourceLength + targetOffset] = leftValue;\n sourceOffset++;\n }\n if (sourceOffset === sourceLength) {\n target_WILL_MUTATE[sourceOffset + targetOffset] = source[sourceOffset];\n }\n }\n function reverseEncoder(encoder7) {\n assertIsFixedSize(encoder7);\n return createEncoder({\n ...encoder7,\n write: (value, bytes, offset) => {\n const newOffset = encoder7.write(value, bytes, offset);\n copySourceToTargetInReverse(\n bytes,\n bytes,\n offset,\n offset + encoder7.fixedSize\n );\n return newOffset;\n }\n });\n }\n function reverseDecoder(decoder3) {\n assertIsFixedSize(decoder3);\n return createDecoder({\n ...decoder3,\n read: (bytes, offset) => {\n const reversedBytes = bytes.slice();\n copySourceToTargetInReverse(\n bytes,\n reversedBytes,\n offset,\n offset + decoder3.fixedSize\n );\n return decoder3.read(reversedBytes, offset);\n }\n });\n }\n function reverseCodec(codec) {\n return combineCodec(reverseEncoder(codec), reverseDecoder(codec));\n }\n function transformEncoder(encoder7, unmap) {\n return createEncoder({\n ...isVariableSize(encoder7) ? { ...encoder7, getSizeFromValue: (value) => encoder7.getSizeFromValue(unmap(value)) } : encoder7,\n write: (value, bytes, offset) => encoder7.write(unmap(value), bytes, offset)\n });\n }\n function transformDecoder(decoder3, map) {\n return createDecoder({\n ...decoder3,\n read: (bytes, offset) => {\n const [value, newOffset] = decoder3.read(bytes, offset);\n return [map(value, bytes, offset), newOffset];\n }\n });\n }\n function transformCodec(codec, unmap, map) {\n return createCodec({\n ...transformEncoder(codec, unmap),\n read: map ? transformDecoder(codec, map).read : codec.read\n });\n }\n exports3.addCodecSentinel = addCodecSentinel;\n exports3.addCodecSizePrefix = addCodecSizePrefix;\n exports3.addDecoderSentinel = addDecoderSentinel;\n exports3.addDecoderSizePrefix = addDecoderSizePrefix;\n exports3.addEncoderSentinel = addEncoderSentinel;\n exports3.addEncoderSizePrefix = addEncoderSizePrefix;\n exports3.assertByteArrayHasEnoughBytesForCodec = assertByteArrayHasEnoughBytesForCodec;\n exports3.assertByteArrayIsNotEmptyForCodec = assertByteArrayIsNotEmptyForCodec;\n exports3.assertByteArrayOffsetIsNotOutOfRange = assertByteArrayOffsetIsNotOutOfRange;\n exports3.assertIsFixedSize = assertIsFixedSize;\n exports3.assertIsVariableSize = assertIsVariableSize;\n exports3.combineCodec = combineCodec;\n exports3.containsBytes = containsBytes;\n exports3.createCodec = createCodec;\n exports3.createDecoder = createDecoder;\n exports3.createEncoder = createEncoder;\n exports3.fixBytes = fixBytes;\n exports3.fixCodecSize = fixCodecSize;\n exports3.fixDecoderSize = fixDecoderSize;\n exports3.fixEncoderSize = fixEncoderSize;\n exports3.getEncodedSize = getEncodedSize;\n exports3.isFixedSize = isFixedSize;\n exports3.isVariableSize = isVariableSize;\n exports3.mergeBytes = mergeBytes;\n exports3.offsetCodec = offsetCodec;\n exports3.offsetDecoder = offsetDecoder;\n exports3.offsetEncoder = offsetEncoder;\n exports3.padBytes = padBytes2;\n exports3.padLeftCodec = padLeftCodec;\n exports3.padLeftDecoder = padLeftDecoder;\n exports3.padLeftEncoder = padLeftEncoder;\n exports3.padRightCodec = padRightCodec;\n exports3.padRightDecoder = padRightDecoder;\n exports3.padRightEncoder = padRightEncoder;\n exports3.resizeCodec = resizeCodec;\n exports3.resizeDecoder = resizeDecoder;\n exports3.resizeEncoder = resizeEncoder;\n exports3.reverseCodec = reverseCodec;\n exports3.reverseDecoder = reverseDecoder;\n exports3.reverseEncoder = reverseEncoder;\n exports3.transformCodec = transformCodec;\n exports3.transformDecoder = transformDecoder;\n exports3.transformEncoder = transformEncoder;\n }\n });\n\n // ../../../node_modules/.pnpm/@solana+codecs-numbers@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-numbers/dist/index.browser.cjs\n var require_index_browser3 = __commonJS({\n \"../../../node_modules/.pnpm/@solana+codecs-numbers@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-numbers/dist/index.browser.cjs\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var errors = require_index_browser();\n var codecsCore = require_index_browser2();\n function assertNumberIsBetweenForCodec(codecDescription, min, max, value) {\n if (value < min || value > max) {\n throw new errors.SolanaError(errors.SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE, {\n codecDescription,\n max,\n min,\n value\n });\n }\n }\n var Endian = /* @__PURE__ */ ((Endian2) => {\n Endian2[Endian2[\"Little\"] = 0] = \"Little\";\n Endian2[Endian2[\"Big\"] = 1] = \"Big\";\n return Endian2;\n })(Endian || {});\n function isLittleEndian(config2) {\n return config2?.endian === 1 ? false : true;\n }\n function numberEncoderFactory(input) {\n return codecsCore.createEncoder({\n fixedSize: input.size,\n write(value, bytes, offset) {\n if (input.range) {\n assertNumberIsBetweenForCodec(input.name, input.range[0], input.range[1], value);\n }\n const arrayBuffer = new ArrayBuffer(input.size);\n input.set(new DataView(arrayBuffer), value, isLittleEndian(input.config));\n bytes.set(new Uint8Array(arrayBuffer), offset);\n return offset + input.size;\n }\n });\n }\n function numberDecoderFactory(input) {\n return codecsCore.createDecoder({\n fixedSize: input.size,\n read(bytes, offset = 0) {\n codecsCore.assertByteArrayIsNotEmptyForCodec(input.name, bytes, offset);\n codecsCore.assertByteArrayHasEnoughBytesForCodec(input.name, input.size, bytes, offset);\n const view = new DataView(toArrayBuffer(bytes, offset, input.size));\n return [input.get(view, isLittleEndian(input.config)), offset + input.size];\n }\n });\n }\n function toArrayBuffer(bytes, offset, length) {\n const bytesOffset = bytes.byteOffset + (offset ?? 0);\n const bytesLength = length ?? bytes.byteLength;\n return bytes.buffer.slice(bytesOffset, bytesOffset + bytesLength);\n }\n var getF32Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"f32\",\n set: (view, value, le) => view.setFloat32(0, Number(value), le),\n size: 4\n });\n var getF32Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => view.getFloat32(0, le),\n name: \"f32\",\n size: 4\n });\n var getF32Codec = (config2 = {}) => codecsCore.combineCodec(getF32Encoder(config2), getF32Decoder(config2));\n var getF64Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"f64\",\n set: (view, value, le) => view.setFloat64(0, Number(value), le),\n size: 8\n });\n var getF64Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => view.getFloat64(0, le),\n name: \"f64\",\n size: 8\n });\n var getF64Codec = (config2 = {}) => codecsCore.combineCodec(getF64Encoder(config2), getF64Decoder(config2));\n var getI128Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"i128\",\n range: [-BigInt(\"0x7fffffffffffffffffffffffffffffff\") - 1n, BigInt(\"0x7fffffffffffffffffffffffffffffff\")],\n set: (view, value, le) => {\n const leftOffset = le ? 8 : 0;\n const rightOffset = le ? 0 : 8;\n const rightMask = 0xffffffffffffffffn;\n view.setBigInt64(leftOffset, BigInt(value) >> 64n, le);\n view.setBigUint64(rightOffset, BigInt(value) & rightMask, le);\n },\n size: 16\n });\n var getI128Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => {\n const leftOffset = le ? 8 : 0;\n const rightOffset = le ? 0 : 8;\n const left = view.getBigInt64(leftOffset, le);\n const right = view.getBigUint64(rightOffset, le);\n return (left << 64n) + right;\n },\n name: \"i128\",\n size: 16\n });\n var getI128Codec = (config2 = {}) => codecsCore.combineCodec(getI128Encoder(config2), getI128Decoder(config2));\n var getI16Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"i16\",\n range: [-Number(\"0x7fff\") - 1, Number(\"0x7fff\")],\n set: (view, value, le) => view.setInt16(0, Number(value), le),\n size: 2\n });\n var getI16Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => view.getInt16(0, le),\n name: \"i16\",\n size: 2\n });\n var getI16Codec = (config2 = {}) => codecsCore.combineCodec(getI16Encoder(config2), getI16Decoder(config2));\n var getI32Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"i32\",\n range: [-Number(\"0x7fffffff\") - 1, Number(\"0x7fffffff\")],\n set: (view, value, le) => view.setInt32(0, Number(value), le),\n size: 4\n });\n var getI32Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => view.getInt32(0, le),\n name: \"i32\",\n size: 4\n });\n var getI32Codec = (config2 = {}) => codecsCore.combineCodec(getI32Encoder(config2), getI32Decoder(config2));\n var getI64Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"i64\",\n range: [-BigInt(\"0x7fffffffffffffff\") - 1n, BigInt(\"0x7fffffffffffffff\")],\n set: (view, value, le) => view.setBigInt64(0, BigInt(value), le),\n size: 8\n });\n var getI64Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => view.getBigInt64(0, le),\n name: \"i64\",\n size: 8\n });\n var getI64Codec = (config2 = {}) => codecsCore.combineCodec(getI64Encoder(config2), getI64Decoder(config2));\n var getI8Encoder = () => numberEncoderFactory({\n name: \"i8\",\n range: [-Number(\"0x7f\") - 1, Number(\"0x7f\")],\n set: (view, value) => view.setInt8(0, Number(value)),\n size: 1\n });\n var getI8Decoder = () => numberDecoderFactory({\n get: (view) => view.getInt8(0),\n name: \"i8\",\n size: 1\n });\n var getI8Codec = () => codecsCore.combineCodec(getI8Encoder(), getI8Decoder());\n var getShortU16Encoder = () => codecsCore.createEncoder({\n getSizeFromValue: (value) => {\n if (value <= 127)\n return 1;\n if (value <= 16383)\n return 2;\n return 3;\n },\n maxSize: 3,\n write: (value, bytes, offset) => {\n assertNumberIsBetweenForCodec(\"shortU16\", 0, 65535, value);\n const shortU16Bytes = [0];\n for (let ii = 0; ; ii += 1) {\n const alignedValue = Number(value) >> ii * 7;\n if (alignedValue === 0) {\n break;\n }\n const nextSevenBits = 127 & alignedValue;\n shortU16Bytes[ii] = nextSevenBits;\n if (ii > 0) {\n shortU16Bytes[ii - 1] |= 128;\n }\n }\n bytes.set(shortU16Bytes, offset);\n return offset + shortU16Bytes.length;\n }\n });\n var getShortU16Decoder = () => codecsCore.createDecoder({\n maxSize: 3,\n read: (bytes, offset) => {\n let value = 0;\n let byteCount = 0;\n while (++byteCount) {\n const byteIndex = byteCount - 1;\n const currentByte = bytes[offset + byteIndex];\n const nextSevenBits = 127 & currentByte;\n value |= nextSevenBits << byteIndex * 7;\n if ((currentByte & 128) === 0) {\n break;\n }\n }\n return [value, offset + byteCount];\n }\n });\n var getShortU16Codec = () => codecsCore.combineCodec(getShortU16Encoder(), getShortU16Decoder());\n var getU128Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"u128\",\n range: [0n, BigInt(\"0xffffffffffffffffffffffffffffffff\")],\n set: (view, value, le) => {\n const leftOffset = le ? 8 : 0;\n const rightOffset = le ? 0 : 8;\n const rightMask = 0xffffffffffffffffn;\n view.setBigUint64(leftOffset, BigInt(value) >> 64n, le);\n view.setBigUint64(rightOffset, BigInt(value) & rightMask, le);\n },\n size: 16\n });\n var getU128Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => {\n const leftOffset = le ? 8 : 0;\n const rightOffset = le ? 0 : 8;\n const left = view.getBigUint64(leftOffset, le);\n const right = view.getBigUint64(rightOffset, le);\n return (left << 64n) + right;\n },\n name: \"u128\",\n size: 16\n });\n var getU128Codec = (config2 = {}) => codecsCore.combineCodec(getU128Encoder(config2), getU128Decoder(config2));\n var getU16Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"u16\",\n range: [0, Number(\"0xffff\")],\n set: (view, value, le) => view.setUint16(0, Number(value), le),\n size: 2\n });\n var getU16Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => view.getUint16(0, le),\n name: \"u16\",\n size: 2\n });\n var getU16Codec = (config2 = {}) => codecsCore.combineCodec(getU16Encoder(config2), getU16Decoder(config2));\n var getU32Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"u32\",\n range: [0, Number(\"0xffffffff\")],\n set: (view, value, le) => view.setUint32(0, Number(value), le),\n size: 4\n });\n var getU32Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => view.getUint32(0, le),\n name: \"u32\",\n size: 4\n });\n var getU32Codec = (config2 = {}) => codecsCore.combineCodec(getU32Encoder(config2), getU32Decoder(config2));\n var getU64Encoder = (config2 = {}) => numberEncoderFactory({\n config: config2,\n name: \"u64\",\n range: [0n, BigInt(\"0xffffffffffffffff\")],\n set: (view, value, le) => view.setBigUint64(0, BigInt(value), le),\n size: 8\n });\n var getU64Decoder = (config2 = {}) => numberDecoderFactory({\n config: config2,\n get: (view, le) => view.getBigUint64(0, le),\n name: \"u64\",\n size: 8\n });\n var getU64Codec = (config2 = {}) => codecsCore.combineCodec(getU64Encoder(config2), getU64Decoder(config2));\n var getU8Encoder = () => numberEncoderFactory({\n name: \"u8\",\n range: [0, Number(\"0xff\")],\n set: (view, value) => view.setUint8(0, Number(value)),\n size: 1\n });\n var getU8Decoder = () => numberDecoderFactory({\n get: (view) => view.getUint8(0),\n name: \"u8\",\n size: 1\n });\n var getU8Codec = () => codecsCore.combineCodec(getU8Encoder(), getU8Decoder());\n exports3.Endian = Endian;\n exports3.assertNumberIsBetweenForCodec = assertNumberIsBetweenForCodec;\n exports3.getF32Codec = getF32Codec;\n exports3.getF32Decoder = getF32Decoder;\n exports3.getF32Encoder = getF32Encoder;\n exports3.getF64Codec = getF64Codec;\n exports3.getF64Decoder = getF64Decoder;\n exports3.getF64Encoder = getF64Encoder;\n exports3.getI128Codec = getI128Codec;\n exports3.getI128Decoder = getI128Decoder;\n exports3.getI128Encoder = getI128Encoder;\n exports3.getI16Codec = getI16Codec;\n exports3.getI16Decoder = getI16Decoder;\n exports3.getI16Encoder = getI16Encoder;\n exports3.getI32Codec = getI32Codec;\n exports3.getI32Decoder = getI32Decoder;\n exports3.getI32Encoder = getI32Encoder;\n exports3.getI64Codec = getI64Codec;\n exports3.getI64Decoder = getI64Decoder;\n exports3.getI64Encoder = getI64Encoder;\n exports3.getI8Codec = getI8Codec;\n exports3.getI8Decoder = getI8Decoder;\n exports3.getI8Encoder = getI8Encoder;\n exports3.getShortU16Codec = getShortU16Codec;\n exports3.getShortU16Decoder = getShortU16Decoder;\n exports3.getShortU16Encoder = getShortU16Encoder;\n exports3.getU128Codec = getU128Codec;\n exports3.getU128Decoder = getU128Decoder;\n exports3.getU128Encoder = getU128Encoder;\n exports3.getU16Codec = getU16Codec;\n exports3.getU16Decoder = getU16Decoder;\n exports3.getU16Encoder = getU16Encoder;\n exports3.getU32Codec = getU32Codec;\n exports3.getU32Decoder = getU32Decoder;\n exports3.getU32Encoder = getU32Encoder;\n exports3.getU64Codec = getU64Codec;\n exports3.getU64Decoder = getU64Decoder;\n exports3.getU64Encoder = getU64Encoder;\n exports3.getU8Codec = getU8Codec;\n exports3.getU8Decoder = getU8Decoder;\n exports3.getU8Encoder = getU8Encoder;\n }\n });\n\n // ../../../node_modules/.pnpm/superstruct@2.0.2/node_modules/superstruct/dist/index.cjs\n var require_dist5 = __commonJS({\n \"../../../node_modules/.pnpm/superstruct@2.0.2/node_modules/superstruct/dist/index.cjs\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(global2, factory) {\n typeof exports3 === \"object\" && typeof module !== \"undefined\" ? factory(exports3) : typeof define === \"function\" && define.amd ? define([\"exports\"], factory) : (global2 = typeof globalThis !== \"undefined\" ? globalThis : global2 || self, factory(global2.Superstruct = {}));\n })(exports3, function(exports4) {\n \"use strict\";\n class StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const { message: message2, explanation, ...rest } = failure;\n const { path } = failure;\n const msg = path.length === 0 ? message2 : `At path: ${path.join(\".\")} -- ${message2}`;\n super(explanation ?? msg);\n if (explanation != null)\n this.cause = msg;\n Object.assign(this, rest);\n this.name = this.constructor.name;\n this.failures = () => {\n return cached ?? (cached = [failure, ...failures()]);\n };\n }\n }\n function isIterable(x4) {\n return isObject2(x4) && typeof x4[Symbol.iterator] === \"function\";\n }\n function isObject2(x4) {\n return typeof x4 === \"object\" && x4 != null;\n }\n function isNonArrayObject(x4) {\n return isObject2(x4) && !Array.isArray(x4);\n }\n function isPlainObject(x4) {\n if (Object.prototype.toString.call(x4) !== \"[object Object]\") {\n return false;\n }\n const prototype = Object.getPrototypeOf(x4);\n return prototype === null || prototype === Object.prototype;\n }\n function print(value) {\n if (typeof value === \"symbol\") {\n return value.toString();\n }\n return typeof value === \"string\" ? JSON.stringify(value) : `${value}`;\n }\n function shiftIterator(input) {\n const { done, value } = input.next();\n return done ? void 0 : value;\n }\n function toFailure(result, context2, struct2, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === \"string\") {\n result = { message: result };\n }\n const { path, branch } = context2;\n const { type: type2 } = struct2;\n const { refinement, message: message2 = `Expected a value of type \\`${type2}\\`${refinement ? ` with refinement \\`${refinement}\\`` : \"\"}, but received: \\`${print(value)}\\`` } = result;\n return {\n value,\n type: type2,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message: message2\n };\n }\n function* toFailures(result, context2, struct2, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n for (const r2 of result) {\n const failure = toFailure(r2, context2, struct2, value);\n if (failure) {\n yield failure;\n }\n }\n }\n function* run(value, struct2, options = {}) {\n const { path = [], branch = [value], coerce: coerce3 = false, mask: mask2 = false } = options;\n const ctx = { path, branch, mask: mask2 };\n if (coerce3) {\n value = struct2.coercer(value, ctx);\n }\n let status = \"valid\";\n for (const failure of struct2.validator(value, ctx)) {\n failure.explanation = options.message;\n status = \"not_valid\";\n yield [failure, void 0];\n }\n for (let [k4, v2, s4] of struct2.entries(value, ctx)) {\n const ts = run(v2, s4, {\n path: k4 === void 0 ? path : [...path, k4],\n branch: k4 === void 0 ? branch : [...branch, v2],\n coerce: coerce3,\n mask: mask2,\n message: options.message\n });\n for (const t3 of ts) {\n if (t3[0]) {\n status = t3[0].refinement != null ? \"not_refined\" : \"not_valid\";\n yield [t3[0], void 0];\n } else if (coerce3) {\n v2 = t3[1];\n if (k4 === void 0) {\n value = v2;\n } else if (value instanceof Map) {\n value.set(k4, v2);\n } else if (value instanceof Set) {\n value.add(v2);\n } else if (isObject2(value)) {\n if (v2 !== void 0 || k4 in value)\n value[k4] = v2;\n }\n }\n }\n }\n if (status !== \"not_valid\") {\n for (const failure of struct2.refiner(value, ctx)) {\n failure.explanation = options.message;\n status = \"not_refined\";\n yield [failure, void 0];\n }\n }\n if (status === \"valid\") {\n yield [void 0, value];\n }\n }\n class Struct {\n constructor(props) {\n const { type: type2, schema, validator, refiner, coercer = (value) => value, entries = function* () {\n } } = props;\n this.type = type2;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n if (validator) {\n this.validator = (value, context2) => {\n const result = validator(value, context2);\n return toFailures(result, context2, this, value);\n };\n } else {\n this.validator = () => [];\n }\n if (refiner) {\n this.refiner = (value, context2) => {\n const result = refiner(value, context2);\n return toFailures(result, context2, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n assert(value, message2) {\n return assert9(value, this, message2);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n create(value, message2) {\n return create2(value, this, message2);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema. Masking applies recursively to\n * props of `object` structs only.\n */\n mask(value, message2) {\n return mask(value, this, message2);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `coerce` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful. Also, `mask` will turn on\n * masking of the unknown `object` props recursively if passed.\n */\n validate(value, options = {}) {\n return validate7(value, this, options);\n }\n }\n function assert9(value, struct2, message2) {\n const result = validate7(value, struct2, { message: message2 });\n if (result[0]) {\n throw result[0];\n }\n }\n function create2(value, struct2, message2) {\n const result = validate7(value, struct2, { coerce: true, message: message2 });\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n }\n function mask(value, struct2, message2) {\n const result = validate7(value, struct2, { coerce: true, mask: true, message: message2 });\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n }\n function is(value, struct2) {\n const result = validate7(value, struct2);\n return !result[0];\n }\n function validate7(value, struct2, options = {}) {\n const tuples = run(value, struct2, options);\n const tuple2 = shiftIterator(tuples);\n if (tuple2[0]) {\n const error = new StructError(tuple2[0], function* () {\n for (const t3 of tuples) {\n if (t3[0]) {\n yield t3[0];\n }\n }\n });\n return [error, void 0];\n } else {\n const v2 = tuple2[1];\n return [void 0, v2];\n }\n }\n function assign(...Structs) {\n const isType = Structs[0].type === \"type\";\n const schemas = Structs.map((s4) => s4.schema);\n const schema = Object.assign({}, ...schemas);\n return isType ? type(schema) : object(schema);\n }\n function define2(name, validator) {\n return new Struct({ type: name, schema: null, validator });\n }\n function deprecated(struct2, log) {\n return new Struct({\n ...struct2,\n refiner: (value, ctx) => value === void 0 || struct2.refiner(value, ctx),\n validator(value, ctx) {\n if (value === void 0) {\n return true;\n } else {\n log(value, ctx);\n return struct2.validator(value, ctx);\n }\n }\n });\n }\n function dynamic(fn) {\n return new Struct({\n type: \"dynamic\",\n schema: null,\n *entries(value, ctx) {\n const struct2 = fn(value, ctx);\n yield* struct2.entries(value, ctx);\n },\n validator(value, ctx) {\n const struct2 = fn(value, ctx);\n return struct2.validator(value, ctx);\n },\n coercer(value, ctx) {\n const struct2 = fn(value, ctx);\n return struct2.coercer(value, ctx);\n },\n refiner(value, ctx) {\n const struct2 = fn(value, ctx);\n return struct2.refiner(value, ctx);\n }\n });\n }\n function lazy(fn) {\n let struct2;\n return new Struct({\n type: \"lazy\",\n schema: null,\n *entries(value, ctx) {\n struct2 ?? (struct2 = fn());\n yield* struct2.entries(value, ctx);\n },\n validator(value, ctx) {\n struct2 ?? (struct2 = fn());\n return struct2.validator(value, ctx);\n },\n coercer(value, ctx) {\n struct2 ?? (struct2 = fn());\n return struct2.coercer(value, ctx);\n },\n refiner(value, ctx) {\n struct2 ?? (struct2 = fn());\n return struct2.refiner(value, ctx);\n }\n });\n }\n function omit(struct2, keys) {\n const { schema } = struct2;\n const subschema = { ...schema };\n for (const key of keys) {\n delete subschema[key];\n }\n switch (struct2.type) {\n case \"type\":\n return type(subschema);\n default:\n return object(subschema);\n }\n }\n function partial(struct2) {\n const isStruct = struct2 instanceof Struct;\n const schema = isStruct ? { ...struct2.schema } : { ...struct2 };\n for (const key in schema) {\n schema[key] = optional(schema[key]);\n }\n if (isStruct && struct2.type === \"type\") {\n return type(schema);\n }\n return object(schema);\n }\n function pick2(struct2, keys) {\n const { schema } = struct2;\n const subschema = {};\n for (const key of keys) {\n subschema[key] = schema[key];\n }\n switch (struct2.type) {\n case \"type\":\n return type(subschema);\n default:\n return object(subschema);\n }\n }\n function struct(name, validator) {\n console.warn(\"superstruct@0.11 - The `struct` helper has been renamed to `define`.\");\n return define2(name, validator);\n }\n function any() {\n return define2(\"any\", () => true);\n }\n function array(Element) {\n return new Struct({\n type: \"array\",\n schema: Element,\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i3, v2] of value.entries()) {\n yield [i3, v2, Element];\n }\n }\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n validator(value) {\n return Array.isArray(value) || `Expected an array value, but received: ${print(value)}`;\n }\n });\n }\n function bigint() {\n return define2(\"bigint\", (value) => {\n return typeof value === \"bigint\";\n });\n }\n function boolean() {\n return define2(\"boolean\", (value) => {\n return typeof value === \"boolean\";\n });\n }\n function date() {\n return define2(\"date\", (value) => {\n return value instanceof Date && !isNaN(value.getTime()) || `Expected a valid \\`Date\\` object, but received: ${print(value)}`;\n });\n }\n function enums(values) {\n const schema = {};\n const description = values.map((v2) => print(v2)).join();\n for (const key of values) {\n schema[key] = key;\n }\n return new Struct({\n type: \"enums\",\n schema,\n validator(value) {\n return values.includes(value) || `Expected one of \\`${description}\\`, but received: ${print(value)}`;\n }\n });\n }\n function func() {\n return define2(\"func\", (value) => {\n return typeof value === \"function\" || `Expected a function, but received: ${print(value)}`;\n });\n }\n function instance(Class) {\n return define2(\"instance\", (value) => {\n return value instanceof Class || `Expected a \\`${Class.name}\\` instance, but received: ${print(value)}`;\n });\n }\n function integer() {\n return define2(\"integer\", (value) => {\n return typeof value === \"number\" && !isNaN(value) && Number.isInteger(value) || `Expected an integer, but received: ${print(value)}`;\n });\n }\n function intersection(Structs) {\n return new Struct({\n type: \"intersection\",\n schema: null,\n *entries(value, ctx) {\n for (const S3 of Structs) {\n yield* S3.entries(value, ctx);\n }\n },\n *validator(value, ctx) {\n for (const S3 of Structs) {\n yield* S3.validator(value, ctx);\n }\n },\n *refiner(value, ctx) {\n for (const S3 of Structs) {\n yield* S3.refiner(value, ctx);\n }\n }\n });\n }\n function literal(constant) {\n const description = print(constant);\n const t3 = typeof constant;\n return new Struct({\n type: \"literal\",\n schema: t3 === \"string\" || t3 === \"number\" || t3 === \"boolean\" ? constant : null,\n validator(value) {\n return value === constant || `Expected the literal \\`${description}\\`, but received: ${print(value)}`;\n }\n });\n }\n function map(Key, Value) {\n return new Struct({\n type: \"map\",\n schema: null,\n *entries(value) {\n if (Key && Value && value instanceof Map) {\n for (const [k4, v2] of value.entries()) {\n yield [k4, k4, Key];\n yield [k4, v2, Value];\n }\n }\n },\n coercer(value) {\n return value instanceof Map ? new Map(value) : value;\n },\n validator(value) {\n return value instanceof Map || `Expected a \\`Map\\` object, but received: ${print(value)}`;\n }\n });\n }\n function never() {\n return define2(\"never\", () => false);\n }\n function nullable(struct2) {\n return new Struct({\n ...struct2,\n validator: (value, ctx) => value === null || struct2.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct2.refiner(value, ctx)\n });\n }\n function number() {\n return define2(\"number\", (value) => {\n return typeof value === \"number\" && !isNaN(value) || `Expected a number, but received: ${print(value)}`;\n });\n }\n function object(schema) {\n const knowns = schema ? Object.keys(schema) : [];\n const Never = never();\n return new Struct({\n type: \"object\",\n schema: schema ? schema : null,\n *entries(value) {\n if (schema && isObject2(value)) {\n const unknowns = new Set(Object.keys(value));\n for (const key of knowns) {\n unknowns.delete(key);\n yield [key, value[key], schema[key]];\n }\n for (const key of unknowns) {\n yield [key, value[key], Never];\n }\n }\n },\n validator(value) {\n return isNonArrayObject(value) || `Expected an object, but received: ${print(value)}`;\n },\n coercer(value, ctx) {\n if (!isNonArrayObject(value)) {\n return value;\n }\n const coerced = { ...value };\n if (ctx.mask && schema) {\n for (const key in coerced) {\n if (schema[key] === void 0) {\n delete coerced[key];\n }\n }\n }\n return coerced;\n }\n });\n }\n function optional(struct2) {\n return new Struct({\n ...struct2,\n validator: (value, ctx) => value === void 0 || struct2.validator(value, ctx),\n refiner: (value, ctx) => value === void 0 || struct2.refiner(value, ctx)\n });\n }\n function record(Key, Value) {\n return new Struct({\n type: \"record\",\n schema: null,\n *entries(value) {\n if (isObject2(value)) {\n for (const k4 in value) {\n const v2 = value[k4];\n yield [k4, k4, Key];\n yield [k4, v2, Value];\n }\n }\n },\n validator(value) {\n return isNonArrayObject(value) || `Expected an object, but received: ${print(value)}`;\n },\n coercer(value) {\n return isNonArrayObject(value) ? { ...value } : value;\n }\n });\n }\n function regexp() {\n return define2(\"regexp\", (value) => {\n return value instanceof RegExp;\n });\n }\n function set(Element) {\n return new Struct({\n type: \"set\",\n schema: null,\n *entries(value) {\n if (Element && value instanceof Set) {\n for (const v2 of value) {\n yield [v2, v2, Element];\n }\n }\n },\n coercer(value) {\n return value instanceof Set ? new Set(value) : value;\n },\n validator(value) {\n return value instanceof Set || `Expected a \\`Set\\` object, but received: ${print(value)}`;\n }\n });\n }\n function string() {\n return define2(\"string\", (value) => {\n return typeof value === \"string\" || `Expected a string, but received: ${print(value)}`;\n });\n }\n function tuple(Structs) {\n const Never = never();\n return new Struct({\n type: \"tuple\",\n schema: null,\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Structs.length, value.length);\n for (let i3 = 0; i3 < length; i3++) {\n yield [i3, value[i3], Structs[i3] || Never];\n }\n }\n },\n validator(value) {\n return Array.isArray(value) || `Expected an array, but received: ${print(value)}`;\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n }\n });\n }\n function type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: \"type\",\n schema,\n *entries(value) {\n if (isObject2(value)) {\n for (const k4 of keys) {\n yield [k4, value[k4], schema[k4]];\n }\n }\n },\n validator(value) {\n return isNonArrayObject(value) || `Expected an object, but received: ${print(value)}`;\n },\n coercer(value) {\n return isNonArrayObject(value) ? { ...value } : value;\n }\n });\n }\n function union(Structs) {\n const description = Structs.map((s4) => s4.type).join(\" | \");\n return new Struct({\n type: \"union\",\n schema: null,\n coercer(value, ctx) {\n for (const S3 of Structs) {\n const [error, coerced] = S3.validate(value, {\n coerce: true,\n mask: ctx.mask\n });\n if (!error) {\n return coerced;\n }\n }\n return value;\n },\n validator(value, ctx) {\n const failures = [];\n for (const S3 of Structs) {\n const [...tuples] = run(value, S3, ctx);\n const [first] = tuples;\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n return [\n `Expected the value to satisfy a union of \\`${description}\\`, but received: ${print(value)}`,\n ...failures\n ];\n }\n });\n }\n function unknown() {\n return define2(\"unknown\", () => true);\n }\n function coerce2(struct2, condition, coercer) {\n return new Struct({\n ...struct2,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct2.coercer(coercer(value, ctx), ctx) : struct2.coercer(value, ctx);\n }\n });\n }\n function defaulted(struct2, fallback, options = {}) {\n return coerce2(struct2, unknown(), (x4) => {\n const f7 = typeof fallback === \"function\" ? fallback() : fallback;\n if (x4 === void 0) {\n return f7;\n }\n if (!options.strict && isPlainObject(x4) && isPlainObject(f7)) {\n const ret = { ...x4 };\n let changed = false;\n for (const key in f7) {\n if (ret[key] === void 0) {\n ret[key] = f7[key];\n changed = true;\n }\n }\n if (changed) {\n return ret;\n }\n }\n return x4;\n });\n }\n function trimmed(struct2) {\n return coerce2(struct2, string(), (x4) => x4.trim());\n }\n function empty(struct2) {\n return refine(struct2, \"empty\", (value) => {\n const size7 = getSize(value);\n return size7 === 0 || `Expected an empty ${struct2.type} but received one with a size of \\`${size7}\\``;\n });\n }\n function getSize(value) {\n if (value instanceof Map || value instanceof Set) {\n return value.size;\n } else {\n return value.length;\n }\n }\n function max(struct2, threshold, options = {}) {\n const { exclusive } = options;\n return refine(struct2, \"max\", (value) => {\n return exclusive ? value < threshold : value <= threshold || `Expected a ${struct2.type} less than ${exclusive ? \"\" : \"or equal to \"}${threshold} but received \\`${value}\\``;\n });\n }\n function min(struct2, threshold, options = {}) {\n const { exclusive } = options;\n return refine(struct2, \"min\", (value) => {\n return exclusive ? value > threshold : value >= threshold || `Expected a ${struct2.type} greater than ${exclusive ? \"\" : \"or equal to \"}${threshold} but received \\`${value}\\``;\n });\n }\n function nonempty(struct2) {\n return refine(struct2, \"nonempty\", (value) => {\n const size7 = getSize(value);\n return size7 > 0 || `Expected a nonempty ${struct2.type} but received an empty one`;\n });\n }\n function pattern(struct2, regexp2) {\n return refine(struct2, \"pattern\", (value) => {\n return regexp2.test(value) || `Expected a ${struct2.type} matching \\`/${regexp2.source}/\\` but received \"${value}\"`;\n });\n }\n function size6(struct2, min2, max2 = min2) {\n const expected = `Expected a ${struct2.type}`;\n const of = min2 === max2 ? `of \\`${min2}\\`` : `between \\`${min2}\\` and \\`${max2}\\``;\n return refine(struct2, \"size\", (value) => {\n if (typeof value === \"number\" || value instanceof Date) {\n return min2 <= value && value <= max2 || `${expected} ${of} but received \\`${value}\\``;\n } else if (value instanceof Map || value instanceof Set) {\n const { size: size7 } = value;\n return min2 <= size7 && size7 <= max2 || `${expected} with a size ${of} but received one with a size of \\`${size7}\\``;\n } else {\n const { length } = value;\n return min2 <= length && length <= max2 || `${expected} with a length ${of} but received one with a length of \\`${length}\\``;\n }\n });\n }\n function refine(struct2, name, refiner) {\n return new Struct({\n ...struct2,\n *refiner(value, ctx) {\n yield* struct2.refiner(value, ctx);\n const result = refiner(value, ctx);\n const failures = toFailures(result, ctx, struct2, value);\n for (const failure of failures) {\n yield { ...failure, refinement: name };\n }\n }\n });\n }\n exports4.Struct = Struct;\n exports4.StructError = StructError;\n exports4.any = any;\n exports4.array = array;\n exports4.assert = assert9;\n exports4.assign = assign;\n exports4.bigint = bigint;\n exports4.boolean = boolean;\n exports4.coerce = coerce2;\n exports4.create = create2;\n exports4.date = date;\n exports4.defaulted = defaulted;\n exports4.define = define2;\n exports4.deprecated = deprecated;\n exports4.dynamic = dynamic;\n exports4.empty = empty;\n exports4.enums = enums;\n exports4.func = func;\n exports4.instance = instance;\n exports4.integer = integer;\n exports4.intersection = intersection;\n exports4.is = is;\n exports4.lazy = lazy;\n exports4.literal = literal;\n exports4.map = map;\n exports4.mask = mask;\n exports4.max = max;\n exports4.min = min;\n exports4.never = never;\n exports4.nonempty = nonempty;\n exports4.nullable = nullable;\n exports4.number = number;\n exports4.object = object;\n exports4.omit = omit;\n exports4.optional = optional;\n exports4.partial = partial;\n exports4.pattern = pattern;\n exports4.pick = pick2;\n exports4.record = record;\n exports4.refine = refine;\n exports4.regexp = regexp;\n exports4.set = set;\n exports4.size = size6;\n exports4.string = string;\n exports4.struct = struct;\n exports4.trimmed = trimmed;\n exports4.tuple = tuple;\n exports4.type = type;\n exports4.union = union;\n exports4.unknown = unknown;\n exports4.validate = validate7;\n });\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js\n function rng() {\n if (!getRandomValues) {\n getRandomValues = typeof crypto !== \"undefined\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== \"undefined\" && typeof msCrypto.getRandomValues === \"function\" && msCrypto.getRandomValues.bind(msCrypto);\n if (!getRandomValues) {\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n }\n }\n return getRandomValues(rnds8);\n }\n var getRandomValues, rnds8;\n var init_rng = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n rnds8 = new Uint8Array(16);\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js\n var regex_default;\n var init_regex3 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js\n function validate6(uuid) {\n return typeof uuid === \"string\" && regex_default.test(uuid);\n }\n var validate_default;\n var init_validate = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex3();\n validate_default = validate6;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js\n function stringify3(arr) {\n var offset = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + \"-\" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + \"-\" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + \"-\" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + \"-\" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();\n if (!validate_default(uuid)) {\n throw TypeError(\"Stringified UUID is invalid\");\n }\n return uuid;\n }\n var byteToHex, i3, stringify_default;\n var init_stringify2 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_validate();\n byteToHex = [];\n for (i3 = 0; i3 < 256; ++i3) {\n byteToHex.push((i3 + 256).toString(16).substr(1));\n }\n stringify_default = stringify3;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js\n function v1(options, buf, offset) {\n var i3 = buf && offset || 0;\n var b4 = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq;\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n if (node == null) {\n node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n if (clockseq == null) {\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383;\n }\n }\n var msecs = options.msecs !== void 0 ? options.msecs : Date.now();\n var nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1;\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;\n if (dt < 0 && options.clockseq === void 0) {\n clockseq = clockseq + 1 & 16383;\n }\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) {\n nsecs = 0;\n }\n if (nsecs >= 1e4) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n msecs += 122192928e5;\n var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;\n b4[i3++] = tl >>> 24 & 255;\n b4[i3++] = tl >>> 16 & 255;\n b4[i3++] = tl >>> 8 & 255;\n b4[i3++] = tl & 255;\n var tmh = msecs / 4294967296 * 1e4 & 268435455;\n b4[i3++] = tmh >>> 8 & 255;\n b4[i3++] = tmh & 255;\n b4[i3++] = tmh >>> 24 & 15 | 16;\n b4[i3++] = tmh >>> 16 & 255;\n b4[i3++] = clockseq >>> 8 | 128;\n b4[i3++] = clockseq & 255;\n for (var n2 = 0; n2 < 6; ++n2) {\n b4[i3 + n2] = node[n2];\n }\n return buf || stringify_default(b4);\n }\n var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default;\n var init_v1 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_rng();\n init_stringify2();\n _lastMSecs = 0;\n _lastNSecs = 0;\n v1_default = v1;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js\n function parse2(uuid) {\n if (!validate_default(uuid)) {\n throw TypeError(\"Invalid UUID\");\n }\n var v2;\n var arr = new Uint8Array(16);\n arr[0] = (v2 = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v2 >>> 16 & 255;\n arr[2] = v2 >>> 8 & 255;\n arr[3] = v2 & 255;\n arr[4] = (v2 = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v2 & 255;\n arr[6] = (v2 = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v2 & 255;\n arr[8] = (v2 = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v2 & 255;\n arr[10] = (v2 = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255;\n arr[11] = v2 / 4294967296 & 255;\n arr[12] = v2 >>> 24 & 255;\n arr[13] = v2 >>> 16 & 255;\n arr[14] = v2 >>> 8 & 255;\n arr[15] = v2 & 255;\n return arr;\n }\n var parse_default;\n var init_parse = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_validate();\n parse_default = parse2;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js\n function stringToBytes2(str) {\n str = unescape(encodeURIComponent(str));\n var bytes = [];\n for (var i3 = 0; i3 < str.length; ++i3) {\n bytes.push(str.charCodeAt(i3));\n }\n return bytes;\n }\n function v35_default(name, version7, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === \"string\") {\n value = stringToBytes2(value);\n }\n if (typeof namespace === \"string\") {\n namespace = parse_default(namespace);\n }\n if (namespace.length !== 16) {\n throw TypeError(\"Namespace must be array-like (16 iterable integer values, 0-255)\");\n }\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 15 | version7;\n bytes[8] = bytes[8] & 63 | 128;\n if (buf) {\n offset = offset || 0;\n for (var i3 = 0; i3 < 16; ++i3) {\n buf[offset + i3] = bytes[i3];\n }\n return buf;\n }\n return stringify_default(bytes);\n }\n try {\n generateUUID.name = name;\n } catch (err) {\n }\n generateUUID.DNS = DNS;\n generateUUID.URL = URL2;\n return generateUUID;\n }\n var DNS, URL2;\n var init_v35 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify2();\n init_parse();\n DNS = \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\";\n URL2 = \"6ba7b811-9dad-11d1-80b4-00c04fd430c8\";\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js\n function md5(bytes) {\n if (typeof bytes === \"string\") {\n var msg = unescape(encodeURIComponent(bytes));\n bytes = new Uint8Array(msg.length);\n for (var i3 = 0; i3 < msg.length; ++i3) {\n bytes[i3] = msg.charCodeAt(i3);\n }\n }\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n }\n function md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = \"0123456789abcdef\";\n for (var i3 = 0; i3 < length32; i3 += 8) {\n var x4 = input[i3 >> 5] >>> i3 % 32 & 255;\n var hex = parseInt(hexTab.charAt(x4 >>> 4 & 15) + hexTab.charAt(x4 & 15), 16);\n output.push(hex);\n }\n return output;\n }\n function getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n }\n function wordsToMd5(x4, len) {\n x4[len >> 5] |= 128 << len % 32;\n x4[getOutputLength(len) - 1] = len;\n var a3 = 1732584193;\n var b4 = -271733879;\n var c4 = -1732584194;\n var d5 = 271733878;\n for (var i3 = 0; i3 < x4.length; i3 += 16) {\n var olda = a3;\n var oldb = b4;\n var oldc = c4;\n var oldd = d5;\n a3 = md5ff(a3, b4, c4, d5, x4[i3], 7, -680876936);\n d5 = md5ff(d5, a3, b4, c4, x4[i3 + 1], 12, -389564586);\n c4 = md5ff(c4, d5, a3, b4, x4[i3 + 2], 17, 606105819);\n b4 = md5ff(b4, c4, d5, a3, x4[i3 + 3], 22, -1044525330);\n a3 = md5ff(a3, b4, c4, d5, x4[i3 + 4], 7, -176418897);\n d5 = md5ff(d5, a3, b4, c4, x4[i3 + 5], 12, 1200080426);\n c4 = md5ff(c4, d5, a3, b4, x4[i3 + 6], 17, -1473231341);\n b4 = md5ff(b4, c4, d5, a3, x4[i3 + 7], 22, -45705983);\n a3 = md5ff(a3, b4, c4, d5, x4[i3 + 8], 7, 1770035416);\n d5 = md5ff(d5, a3, b4, c4, x4[i3 + 9], 12, -1958414417);\n c4 = md5ff(c4, d5, a3, b4, x4[i3 + 10], 17, -42063);\n b4 = md5ff(b4, c4, d5, a3, x4[i3 + 11], 22, -1990404162);\n a3 = md5ff(a3, b4, c4, d5, x4[i3 + 12], 7, 1804603682);\n d5 = md5ff(d5, a3, b4, c4, x4[i3 + 13], 12, -40341101);\n c4 = md5ff(c4, d5, a3, b4, x4[i3 + 14], 17, -1502002290);\n b4 = md5ff(b4, c4, d5, a3, x4[i3 + 15], 22, 1236535329);\n a3 = md5gg(a3, b4, c4, d5, x4[i3 + 1], 5, -165796510);\n d5 = md5gg(d5, a3, b4, c4, x4[i3 + 6], 9, -1069501632);\n c4 = md5gg(c4, d5, a3, b4, x4[i3 + 11], 14, 643717713);\n b4 = md5gg(b4, c4, d5, a3, x4[i3], 20, -373897302);\n a3 = md5gg(a3, b4, c4, d5, x4[i3 + 5], 5, -701558691);\n d5 = md5gg(d5, a3, b4, c4, x4[i3 + 10], 9, 38016083);\n c4 = md5gg(c4, d5, a3, b4, x4[i3 + 15], 14, -660478335);\n b4 = md5gg(b4, c4, d5, a3, x4[i3 + 4], 20, -405537848);\n a3 = md5gg(a3, b4, c4, d5, x4[i3 + 9], 5, 568446438);\n d5 = md5gg(d5, a3, b4, c4, x4[i3 + 14], 9, -1019803690);\n c4 = md5gg(c4, d5, a3, b4, x4[i3 + 3], 14, -187363961);\n b4 = md5gg(b4, c4, d5, a3, x4[i3 + 8], 20, 1163531501);\n a3 = md5gg(a3, b4, c4, d5, x4[i3 + 13], 5, -1444681467);\n d5 = md5gg(d5, a3, b4, c4, x4[i3 + 2], 9, -51403784);\n c4 = md5gg(c4, d5, a3, b4, x4[i3 + 7], 14, 1735328473);\n b4 = md5gg(b4, c4, d5, a3, x4[i3 + 12], 20, -1926607734);\n a3 = md5hh(a3, b4, c4, d5, x4[i3 + 5], 4, -378558);\n d5 = md5hh(d5, a3, b4, c4, x4[i3 + 8], 11, -2022574463);\n c4 = md5hh(c4, d5, a3, b4, x4[i3 + 11], 16, 1839030562);\n b4 = md5hh(b4, c4, d5, a3, x4[i3 + 14], 23, -35309556);\n a3 = md5hh(a3, b4, c4, d5, x4[i3 + 1], 4, -1530992060);\n d5 = md5hh(d5, a3, b4, c4, x4[i3 + 4], 11, 1272893353);\n c4 = md5hh(c4, d5, a3, b4, x4[i3 + 7], 16, -155497632);\n b4 = md5hh(b4, c4, d5, a3, x4[i3 + 10], 23, -1094730640);\n a3 = md5hh(a3, b4, c4, d5, x4[i3 + 13], 4, 681279174);\n d5 = md5hh(d5, a3, b4, c4, x4[i3], 11, -358537222);\n c4 = md5hh(c4, d5, a3, b4, x4[i3 + 3], 16, -722521979);\n b4 = md5hh(b4, c4, d5, a3, x4[i3 + 6], 23, 76029189);\n a3 = md5hh(a3, b4, c4, d5, x4[i3 + 9], 4, -640364487);\n d5 = md5hh(d5, a3, b4, c4, x4[i3 + 12], 11, -421815835);\n c4 = md5hh(c4, d5, a3, b4, x4[i3 + 15], 16, 530742520);\n b4 = md5hh(b4, c4, d5, a3, x4[i3 + 2], 23, -995338651);\n a3 = md5ii(a3, b4, c4, d5, x4[i3], 6, -198630844);\n d5 = md5ii(d5, a3, b4, c4, x4[i3 + 7], 10, 1126891415);\n c4 = md5ii(c4, d5, a3, b4, x4[i3 + 14], 15, -1416354905);\n b4 = md5ii(b4, c4, d5, a3, x4[i3 + 5], 21, -57434055);\n a3 = md5ii(a3, b4, c4, d5, x4[i3 + 12], 6, 1700485571);\n d5 = md5ii(d5, a3, b4, c4, x4[i3 + 3], 10, -1894986606);\n c4 = md5ii(c4, d5, a3, b4, x4[i3 + 10], 15, -1051523);\n b4 = md5ii(b4, c4, d5, a3, x4[i3 + 1], 21, -2054922799);\n a3 = md5ii(a3, b4, c4, d5, x4[i3 + 8], 6, 1873313359);\n d5 = md5ii(d5, a3, b4, c4, x4[i3 + 15], 10, -30611744);\n c4 = md5ii(c4, d5, a3, b4, x4[i3 + 6], 15, -1560198380);\n b4 = md5ii(b4, c4, d5, a3, x4[i3 + 13], 21, 1309151649);\n a3 = md5ii(a3, b4, c4, d5, x4[i3 + 4], 6, -145523070);\n d5 = md5ii(d5, a3, b4, c4, x4[i3 + 11], 10, -1120210379);\n c4 = md5ii(c4, d5, a3, b4, x4[i3 + 2], 15, 718787259);\n b4 = md5ii(b4, c4, d5, a3, x4[i3 + 9], 21, -343485551);\n a3 = safeAdd(a3, olda);\n b4 = safeAdd(b4, oldb);\n c4 = safeAdd(c4, oldc);\n d5 = safeAdd(d5, oldd);\n }\n return [a3, b4, c4, d5];\n }\n function bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n for (var i3 = 0; i3 < length8; i3 += 8) {\n output[i3 >> 5] |= (input[i3 / 8] & 255) << i3 % 32;\n }\n return output;\n }\n function safeAdd(x4, y6) {\n var lsw = (x4 & 65535) + (y6 & 65535);\n var msw = (x4 >> 16) + (y6 >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 65535;\n }\n function bitRotateLeft(num2, cnt) {\n return num2 << cnt | num2 >>> 32 - cnt;\n }\n function md5cmn(q3, a3, b4, x4, s4, t3) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a3, q3), safeAdd(x4, t3)), s4), b4);\n }\n function md5ff(a3, b4, c4, d5, x4, s4, t3) {\n return md5cmn(b4 & c4 | ~b4 & d5, a3, b4, x4, s4, t3);\n }\n function md5gg(a3, b4, c4, d5, x4, s4, t3) {\n return md5cmn(b4 & d5 | c4 & ~d5, a3, b4, x4, s4, t3);\n }\n function md5hh(a3, b4, c4, d5, x4, s4, t3) {\n return md5cmn(b4 ^ c4 ^ d5, a3, b4, x4, s4, t3);\n }\n function md5ii(a3, b4, c4, d5, x4, s4, t3) {\n return md5cmn(c4 ^ (b4 | ~d5), a3, b4, x4, s4, t3);\n }\n var md5_default;\n var init_md5 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n md5_default = md5;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js\n var v3, v3_default2;\n var init_v32 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v35();\n init_md5();\n v3 = v35_default(\"v3\", 48, md5_default);\n v3_default2 = v3;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js\n function v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)();\n rnds[6] = rnds[6] & 15 | 64;\n rnds[8] = rnds[8] & 63 | 128;\n if (buf) {\n offset = offset || 0;\n for (var i3 = 0; i3 < 16; ++i3) {\n buf[offset + i3] = rnds[i3];\n }\n return buf;\n }\n return stringify_default(rnds);\n }\n var v4_default;\n var init_v4 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_rng();\n init_stringify2();\n v4_default = v4;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js\n function f6(s4, x4, y6, z2) {\n switch (s4) {\n case 0:\n return x4 & y6 ^ ~x4 & z2;\n case 1:\n return x4 ^ y6 ^ z2;\n case 2:\n return x4 & y6 ^ x4 & z2 ^ y6 & z2;\n case 3:\n return x4 ^ y6 ^ z2;\n }\n }\n function ROTL(x4, n2) {\n return x4 << n2 | x4 >>> 32 - n2;\n }\n function sha1(bytes) {\n var K2 = [1518500249, 1859775393, 2400959708, 3395469782];\n var H3 = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];\n if (typeof bytes === \"string\") {\n var msg = unescape(encodeURIComponent(bytes));\n bytes = [];\n for (var i3 = 0; i3 < msg.length; ++i3) {\n bytes.push(msg.charCodeAt(i3));\n }\n } else if (!Array.isArray(bytes)) {\n bytes = Array.prototype.slice.call(bytes);\n }\n bytes.push(128);\n var l6 = bytes.length / 4 + 2;\n var N4 = Math.ceil(l6 / 16);\n var M2 = new Array(N4);\n for (var _i = 0; _i < N4; ++_i) {\n var arr = new Uint32Array(16);\n for (var j2 = 0; j2 < 16; ++j2) {\n arr[j2] = bytes[_i * 64 + j2 * 4] << 24 | bytes[_i * 64 + j2 * 4 + 1] << 16 | bytes[_i * 64 + j2 * 4 + 2] << 8 | bytes[_i * 64 + j2 * 4 + 3];\n }\n M2[_i] = arr;\n }\n M2[N4 - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M2[N4 - 1][14] = Math.floor(M2[N4 - 1][14]);\n M2[N4 - 1][15] = (bytes.length - 1) * 8 & 4294967295;\n for (var _i2 = 0; _i2 < N4; ++_i2) {\n var W = new Uint32Array(80);\n for (var t3 = 0; t3 < 16; ++t3) {\n W[t3] = M2[_i2][t3];\n }\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n var a3 = H3[0];\n var b4 = H3[1];\n var c4 = H3[2];\n var d5 = H3[3];\n var e2 = H3[4];\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s4 = Math.floor(_t2 / 20);\n var T4 = ROTL(a3, 5) + f6(s4, b4, c4, d5) + e2 + K2[s4] + W[_t2] >>> 0;\n e2 = d5;\n d5 = c4;\n c4 = ROTL(b4, 30) >>> 0;\n b4 = a3;\n a3 = T4;\n }\n H3[0] = H3[0] + a3 >>> 0;\n H3[1] = H3[1] + b4 >>> 0;\n H3[2] = H3[2] + c4 >>> 0;\n H3[3] = H3[3] + d5 >>> 0;\n H3[4] = H3[4] + e2 >>> 0;\n }\n return [H3[0] >> 24 & 255, H3[0] >> 16 & 255, H3[0] >> 8 & 255, H3[0] & 255, H3[1] >> 24 & 255, H3[1] >> 16 & 255, H3[1] >> 8 & 255, H3[1] & 255, H3[2] >> 24 & 255, H3[2] >> 16 & 255, H3[2] >> 8 & 255, H3[2] & 255, H3[3] >> 24 & 255, H3[3] >> 16 & 255, H3[3] >> 8 & 255, H3[3] & 255, H3[4] >> 24 & 255, H3[4] >> 16 & 255, H3[4] >> 8 & 255, H3[4] & 255];\n }\n var sha1_default;\n var init_sha1 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n sha1_default = sha1;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js\n var v5, v5_default;\n var init_v5 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v35();\n init_sha1();\n v5 = v35_default(\"v5\", 80, sha1_default);\n v5_default = v5;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js\n var nil_default;\n var init_nil = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n nil_default = \"00000000-0000-0000-0000-000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js\n function version6(uuid) {\n if (!validate_default(uuid)) {\n throw TypeError(\"Invalid UUID\");\n }\n return parseInt(uuid.substr(14, 1), 16);\n }\n var version_default;\n var init_version9 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_validate();\n version_default = version6;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/index.js\n var esm_browser_exports = {};\n __export(esm_browser_exports, {\n NIL: () => nil_default,\n parse: () => parse_default,\n stringify: () => stringify_default,\n v1: () => v1_default,\n v3: () => v3_default2,\n v4: () => v4_default,\n v5: () => v5_default,\n validate: () => validate_default,\n version: () => version_default\n });\n var init_esm_browser = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v1();\n init_v32();\n init_v4();\n init_v5();\n init_nil();\n init_version9();\n init_validate();\n init_stringify2();\n init_parse();\n }\n });\n\n // ../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/generateRequest.js\n var require_generateRequest = __commonJS({\n \"../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/generateRequest.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var uuid = (init_esm_browser(), __toCommonJS(esm_browser_exports)).v4;\n var generateRequest = function(method, params, id, options) {\n if (typeof method !== \"string\") {\n throw new TypeError(method + \" must be a string\");\n }\n options = options || {};\n const version7 = typeof options.version === \"number\" ? options.version : 2;\n if (version7 !== 1 && version7 !== 2) {\n throw new TypeError(version7 + \" must be 1 or 2\");\n }\n const request = {\n method\n };\n if (version7 === 2) {\n request.jsonrpc = \"2.0\";\n }\n if (params) {\n if (typeof params !== \"object\" && !Array.isArray(params)) {\n throw new TypeError(params + \" must be an object, array or omitted\");\n }\n request.params = params;\n }\n if (typeof id === \"undefined\") {\n const generator = typeof options.generator === \"function\" ? options.generator : function() {\n return uuid();\n };\n request.id = generator(request, options);\n } else if (version7 === 2 && id === null) {\n if (options.notificationIdNull) {\n request.id = null;\n }\n } else {\n request.id = id;\n }\n return request;\n };\n module.exports = generateRequest;\n }\n });\n\n // ../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/client/browser/index.js\n var require_browser2 = __commonJS({\n \"../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/client/browser/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var uuid = (init_esm_browser(), __toCommonJS(esm_browser_exports)).v4;\n var generateRequest = require_generateRequest();\n var ClientBrowser = function(callServer, options) {\n if (!(this instanceof ClientBrowser)) {\n return new ClientBrowser(callServer, options);\n }\n if (!options) {\n options = {};\n }\n this.options = {\n reviver: typeof options.reviver !== \"undefined\" ? options.reviver : null,\n replacer: typeof options.replacer !== \"undefined\" ? options.replacer : null,\n generator: typeof options.generator !== \"undefined\" ? options.generator : function() {\n return uuid();\n },\n version: typeof options.version !== \"undefined\" ? options.version : 2,\n notificationIdNull: typeof options.notificationIdNull === \"boolean\" ? options.notificationIdNull : false\n };\n this.callServer = callServer;\n };\n module.exports = ClientBrowser;\n ClientBrowser.prototype.request = function(method, params, id, callback) {\n const self2 = this;\n let request = null;\n const isBatch = Array.isArray(method) && typeof params === \"function\";\n if (this.options.version === 1 && isBatch) {\n throw new TypeError(\"JSON-RPC 1.0 does not support batching\");\n }\n const isRaw = !isBatch && method && typeof method === \"object\" && typeof params === \"function\";\n if (isBatch || isRaw) {\n callback = params;\n request = method;\n } else {\n if (typeof id === \"function\") {\n callback = id;\n id = void 0;\n }\n const hasCallback = typeof callback === \"function\";\n try {\n request = generateRequest(method, params, id, {\n generator: this.options.generator,\n version: this.options.version,\n notificationIdNull: this.options.notificationIdNull\n });\n } catch (err) {\n if (hasCallback) {\n return callback(err);\n }\n throw err;\n }\n if (!hasCallback) {\n return request;\n }\n }\n let message2;\n try {\n message2 = JSON.stringify(request, this.options.replacer);\n } catch (err) {\n return callback(err);\n }\n this.callServer(message2, function(err, response) {\n self2._parseResponse(err, response, callback);\n });\n return request;\n };\n ClientBrowser.prototype._parseResponse = function(err, responseText, callback) {\n if (err) {\n callback(err);\n return;\n }\n if (!responseText) {\n return callback();\n }\n let response;\n try {\n response = JSON.parse(responseText, this.options.reviver);\n } catch (err2) {\n return callback(err2);\n }\n if (callback.length === 3) {\n if (Array.isArray(response)) {\n const isError = function(res) {\n return typeof res.error !== \"undefined\";\n };\n const isNotError = function(res) {\n return !isError(res);\n };\n return callback(null, response.filter(isError), response.filter(isNotError));\n } else {\n return callback(null, response.error, response.result);\n }\n }\n callback(null, response);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js\n var require_eventemitter3 = __commonJS({\n \"../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var has = Object.prototype.hasOwnProperty;\n var prefix = \"~\";\n function Events() {\n }\n if (Object.create) {\n Events.prototype = /* @__PURE__ */ Object.create(null);\n if (!new Events().__proto__)\n prefix = false;\n }\n function EE(fn, context2, once2) {\n this.fn = fn;\n this.context = context2;\n this.once = once2 || false;\n }\n function addListener2(emitter, event, fn, context2, once2) {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"The listener must be a function\");\n }\n var listener = new EE(fn, context2 || emitter, once2), evt = prefix ? prefix + event : event;\n if (!emitter._events[evt])\n emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn)\n emitter._events[evt].push(listener);\n else\n emitter._events[evt] = [emitter._events[evt], listener];\n return emitter;\n }\n function clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0)\n emitter._events = new Events();\n else\n delete emitter._events[evt];\n }\n function EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n }\n EventEmitter.prototype.eventNames = function eventNames() {\n var names = [], events, name;\n if (this._eventsCount === 0)\n return names;\n for (name in events = this._events) {\n if (has.call(events, name))\n names.push(prefix ? name.slice(1) : name);\n }\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n return names;\n };\n EventEmitter.prototype.listeners = function listeners2(event) {\n var evt = prefix ? prefix + event : event, handlers = this._events[evt];\n if (!handlers)\n return [];\n if (handlers.fn)\n return [handlers.fn];\n for (var i3 = 0, l6 = handlers.length, ee = new Array(l6); i3 < l6; i3++) {\n ee[i3] = handlers[i3].fn;\n }\n return ee;\n };\n EventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event, listeners2 = this._events[evt];\n if (!listeners2)\n return 0;\n if (listeners2.fn)\n return 1;\n return listeners2.length;\n };\n EventEmitter.prototype.emit = function emit2(event, a1, a22, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n if (!this._events[evt])\n return false;\n var listeners2 = this._events[evt], len = arguments.length, args, i3;\n if (listeners2.fn) {\n if (listeners2.once)\n this.removeListener(event, listeners2.fn, void 0, true);\n switch (len) {\n case 1:\n return listeners2.fn.call(listeners2.context), true;\n case 2:\n return listeners2.fn.call(listeners2.context, a1), true;\n case 3:\n return listeners2.fn.call(listeners2.context, a1, a22), true;\n case 4:\n return listeners2.fn.call(listeners2.context, a1, a22, a3), true;\n case 5:\n return listeners2.fn.call(listeners2.context, a1, a22, a3, a4), true;\n case 6:\n return listeners2.fn.call(listeners2.context, a1, a22, a3, a4, a5), true;\n }\n for (i3 = 1, args = new Array(len - 1); i3 < len; i3++) {\n args[i3 - 1] = arguments[i3];\n }\n listeners2.fn.apply(listeners2.context, args);\n } else {\n var length = listeners2.length, j2;\n for (i3 = 0; i3 < length; i3++) {\n if (listeners2[i3].once)\n this.removeListener(event, listeners2[i3].fn, void 0, true);\n switch (len) {\n case 1:\n listeners2[i3].fn.call(listeners2[i3].context);\n break;\n case 2:\n listeners2[i3].fn.call(listeners2[i3].context, a1);\n break;\n case 3:\n listeners2[i3].fn.call(listeners2[i3].context, a1, a22);\n break;\n case 4:\n listeners2[i3].fn.call(listeners2[i3].context, a1, a22, a3);\n break;\n default:\n if (!args)\n for (j2 = 1, args = new Array(len - 1); j2 < len; j2++) {\n args[j2 - 1] = arguments[j2];\n }\n listeners2[i3].fn.apply(listeners2[i3].context, args);\n }\n }\n }\n return true;\n };\n EventEmitter.prototype.on = function on2(event, fn, context2) {\n return addListener2(this, event, fn, context2, false);\n };\n EventEmitter.prototype.once = function once2(event, fn, context2) {\n return addListener2(this, event, fn, context2, true);\n };\n EventEmitter.prototype.removeListener = function removeListener2(event, fn, context2, once2) {\n var evt = prefix ? prefix + event : event;\n if (!this._events[evt])\n return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n var listeners2 = this._events[evt];\n if (listeners2.fn) {\n if (listeners2.fn === fn && (!once2 || listeners2.once) && (!context2 || listeners2.context === context2)) {\n clearEvent(this, evt);\n }\n } else {\n for (var i3 = 0, events = [], length = listeners2.length; i3 < length; i3++) {\n if (listeners2[i3].fn !== fn || once2 && !listeners2[i3].once || context2 && listeners2[i3].context !== context2) {\n events.push(listeners2[i3]);\n }\n }\n if (events.length)\n this._events[evt] = events.length === 1 ? events[0] : events;\n else\n clearEvent(this, evt);\n }\n return this;\n };\n EventEmitter.prototype.removeAllListeners = function removeAllListeners2(event) {\n var evt;\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt])\n clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n return this;\n };\n EventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n EventEmitter.prototype.addListener = EventEmitter.prototype.on;\n EventEmitter.prefixed = prefix;\n EventEmitter.EventEmitter = EventEmitter;\n if (\"undefined\" !== typeof module) {\n module.exports = EventEmitter;\n }\n }\n });\n\n // ../../../node_modules/.pnpm/rpc-websockets@9.1.3/node_modules/rpc-websockets/dist/index.browser.cjs\n var require_index_browser4 = __commonJS({\n \"../../../node_modules/.pnpm/rpc-websockets@9.1.3/node_modules/rpc-websockets/dist/index.browser.cjs\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var buffer2 = (init_buffer(), __toCommonJS(buffer_exports));\n var eventemitter3 = require_eventemitter3();\n var WebSocketBrowserImpl = class extends eventemitter3.EventEmitter {\n socket;\n /** Instantiate a WebSocket class\n * @constructor\n * @param {String} address - url to a websocket server\n * @param {(Object)} options - websocket options\n * @param {(String|Array)} protocols - a list of protocols\n * @return {WebSocketBrowserImpl} - returns a WebSocket instance\n */\n constructor(address, options, protocols) {\n super();\n this.socket = new window.WebSocket(address, protocols);\n this.socket.onopen = () => this.emit(\"open\");\n this.socket.onmessage = (event) => this.emit(\"message\", event.data);\n this.socket.onerror = (error) => this.emit(\"error\", error);\n this.socket.onclose = (event) => {\n this.emit(\"close\", event.code, event.reason);\n };\n }\n /**\n * Sends data through a websocket connection\n * @method\n * @param {(String|Object)} data - data to be sent via websocket\n * @param {Object} optionsOrCallback - ws options\n * @param {Function} callback - a callback called once the data is sent\n * @return {Undefined}\n */\n send(data, optionsOrCallback, callback) {\n const cb = callback || optionsOrCallback;\n try {\n this.socket.send(data);\n cb();\n } catch (error) {\n cb(error);\n }\n }\n /**\n * Closes an underlying socket\n * @method\n * @param {Number} code - status code explaining why the connection is being closed\n * @param {String} reason - a description why the connection is closing\n * @return {Undefined}\n * @throws {Error}\n */\n close(code, reason) {\n this.socket.close(code, reason);\n }\n addEventListener(type, listener, options) {\n this.socket.addEventListener(type, listener, options);\n }\n };\n function WebSocket2(address, options) {\n return new WebSocketBrowserImpl(address, options);\n }\n var DefaultDataPack = class {\n encode(value) {\n return JSON.stringify(value);\n }\n decode(value) {\n return JSON.parse(value);\n }\n };\n var CommonClient = class extends eventemitter3.EventEmitter {\n address;\n rpc_id;\n queue;\n options;\n autoconnect;\n ready;\n reconnect;\n reconnect_timer_id;\n reconnect_interval;\n max_reconnects;\n rest_options;\n current_reconnects;\n generate_request_id;\n socket;\n webSocketFactory;\n dataPack;\n /**\n * Instantiate a Client class.\n * @constructor\n * @param {webSocketFactory} webSocketFactory - factory method for WebSocket\n * @param {String} address - url to a websocket server\n * @param {Object} options - ws options object with reconnect parameters\n * @param {Function} generate_request_id - custom generation request Id\n * @param {DataPack} dataPack - data pack contains encoder and decoder\n * @return {CommonClient}\n */\n constructor(webSocketFactory, address = \"ws://localhost:8080\", {\n autoconnect = true,\n reconnect = true,\n reconnect_interval = 1e3,\n max_reconnects = 5,\n ...rest_options\n } = {}, generate_request_id, dataPack) {\n super();\n this.webSocketFactory = webSocketFactory;\n this.queue = {};\n this.rpc_id = 0;\n this.address = address;\n this.autoconnect = autoconnect;\n this.ready = false;\n this.reconnect = reconnect;\n this.reconnect_timer_id = void 0;\n this.reconnect_interval = reconnect_interval;\n this.max_reconnects = max_reconnects;\n this.rest_options = rest_options;\n this.current_reconnects = 0;\n this.generate_request_id = generate_request_id || (() => typeof this.rpc_id === \"number\" ? ++this.rpc_id : Number(this.rpc_id) + 1);\n if (!dataPack)\n this.dataPack = new DefaultDataPack();\n else\n this.dataPack = dataPack;\n if (this.autoconnect)\n this._connect(this.address, {\n autoconnect: this.autoconnect,\n reconnect: this.reconnect,\n reconnect_interval: this.reconnect_interval,\n max_reconnects: this.max_reconnects,\n ...this.rest_options\n });\n }\n /**\n * Connects to a defined server if not connected already.\n * @method\n * @return {Undefined}\n */\n connect() {\n if (this.socket)\n return;\n this._connect(this.address, {\n autoconnect: this.autoconnect,\n reconnect: this.reconnect,\n reconnect_interval: this.reconnect_interval,\n max_reconnects: this.max_reconnects,\n ...this.rest_options\n });\n }\n /**\n * Calls a registered RPC method on server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object|Array} params - optional method parameters\n * @param {Number} timeout - RPC reply timeout value\n * @param {Object} ws_opts - options passed to ws\n * @return {Promise}\n */\n call(method, params, timeout, ws_opts) {\n if (!ws_opts && \"object\" === typeof timeout) {\n ws_opts = timeout;\n timeout = null;\n }\n return new Promise((resolve, reject) => {\n if (!this.ready)\n return reject(new Error(\"socket not ready\"));\n const rpc_id = this.generate_request_id(method, params);\n const message2 = {\n jsonrpc: \"2.0\",\n method,\n params: params || void 0,\n id: rpc_id\n };\n this.socket.send(this.dataPack.encode(message2), ws_opts, (error) => {\n if (error)\n return reject(error);\n this.queue[rpc_id] = { promise: [resolve, reject] };\n if (timeout) {\n this.queue[rpc_id].timeout = setTimeout(() => {\n delete this.queue[rpc_id];\n reject(new Error(\"reply timeout\"));\n }, timeout);\n }\n });\n });\n }\n /**\n * Logins with the other side of the connection.\n * @method\n * @param {Object} params - Login credentials object\n * @return {Promise}\n */\n async login(params) {\n const resp = await this.call(\"rpc.login\", params);\n if (!resp)\n throw new Error(\"authentication failed\");\n return resp;\n }\n /**\n * Fetches a list of client's methods registered on server.\n * @method\n * @return {Array}\n */\n async listMethods() {\n return await this.call(\"__listMethods\");\n }\n /**\n * Sends a JSON-RPC 2.0 notification to server.\n * @method\n * @param {String} method - RPC method name\n * @param {Object} params - optional method parameters\n * @return {Promise}\n */\n notify(method, params) {\n return new Promise((resolve, reject) => {\n if (!this.ready)\n return reject(new Error(\"socket not ready\"));\n const message2 = {\n jsonrpc: \"2.0\",\n method,\n params\n };\n this.socket.send(this.dataPack.encode(message2), (error) => {\n if (error)\n return reject(error);\n resolve();\n });\n });\n }\n /**\n * Subscribes for a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n async subscribe(event) {\n if (typeof event === \"string\")\n event = [event];\n const result = await this.call(\"rpc.on\", event);\n if (typeof event === \"string\" && result[event] !== \"ok\")\n throw new Error(\n \"Failed subscribing to an event '\" + event + \"' with: \" + result[event]\n );\n return result;\n }\n /**\n * Unsubscribes from a defined event.\n * @method\n * @param {String|Array} event - event name\n * @return {Undefined}\n * @throws {Error}\n */\n async unsubscribe(event) {\n if (typeof event === \"string\")\n event = [event];\n const result = await this.call(\"rpc.off\", event);\n if (typeof event === \"string\" && result[event] !== \"ok\")\n throw new Error(\"Failed unsubscribing from an event with: \" + result);\n return result;\n }\n /**\n * Closes a WebSocket connection gracefully.\n * @method\n * @param {Number} code - socket close code\n * @param {String} data - optional data to be sent before closing\n * @return {Undefined}\n */\n close(code, data) {\n this.socket.close(code || 1e3, data);\n }\n /**\n * Enable / disable automatic reconnection.\n * @method\n * @param {Boolean} reconnect - enable / disable reconnection\n * @return {Undefined}\n */\n setAutoReconnect(reconnect) {\n this.reconnect = reconnect;\n }\n /**\n * Set the interval between reconnection attempts.\n * @method\n * @param {Number} interval - reconnection interval in milliseconds\n * @return {Undefined}\n */\n setReconnectInterval(interval) {\n this.reconnect_interval = interval;\n }\n /**\n * Set the maximum number of reconnection attempts.\n * @method\n * @param {Number} max_reconnects - maximum reconnection attempts\n * @return {Undefined}\n */\n setMaxReconnects(max_reconnects) {\n this.max_reconnects = max_reconnects;\n }\n /**\n * Connection/Message handler.\n * @method\n * @private\n * @param {String} address - WebSocket API address\n * @param {Object} options - ws options object\n * @return {Undefined}\n */\n _connect(address, options) {\n clearTimeout(this.reconnect_timer_id);\n this.socket = this.webSocketFactory(address, options);\n this.socket.addEventListener(\"open\", () => {\n this.ready = true;\n this.emit(\"open\");\n this.current_reconnects = 0;\n });\n this.socket.addEventListener(\"message\", ({ data: message2 }) => {\n if (message2 instanceof ArrayBuffer)\n message2 = buffer2.Buffer.from(message2).toString();\n try {\n message2 = this.dataPack.decode(message2);\n } catch (error) {\n return;\n }\n if (message2.notification && this.listeners(message2.notification).length) {\n if (!Object.keys(message2.params).length)\n return this.emit(message2.notification);\n const args = [message2.notification];\n if (message2.params.constructor === Object)\n args.push(message2.params);\n else\n for (let i3 = 0; i3 < message2.params.length; i3++)\n args.push(message2.params[i3]);\n return Promise.resolve().then(() => {\n this.emit.apply(this, args);\n });\n }\n if (!this.queue[message2.id]) {\n if (message2.method) {\n return Promise.resolve().then(() => {\n this.emit(message2.method, message2?.params);\n });\n }\n return;\n }\n if (\"error\" in message2 === \"result\" in message2)\n this.queue[message2.id].promise[1](\n new Error(\n 'Server response malformed. Response must include either \"result\" or \"error\", but not both.'\n )\n );\n if (this.queue[message2.id].timeout)\n clearTimeout(this.queue[message2.id].timeout);\n if (message2.error)\n this.queue[message2.id].promise[1](message2.error);\n else\n this.queue[message2.id].promise[0](message2.result);\n delete this.queue[message2.id];\n });\n this.socket.addEventListener(\"error\", (error) => this.emit(\"error\", error));\n this.socket.addEventListener(\"close\", ({ code, reason }) => {\n if (this.ready)\n setTimeout(() => this.emit(\"close\", code, reason), 0);\n this.ready = false;\n this.socket = void 0;\n if (code === 1e3)\n return;\n this.current_reconnects++;\n if (this.reconnect && (this.max_reconnects > this.current_reconnects || this.max_reconnects === 0))\n this.reconnect_timer_id = setTimeout(\n () => this._connect(address, options),\n this.reconnect_interval\n );\n });\n }\n };\n var Client = class extends CommonClient {\n constructor(address = \"ws://localhost:8080\", {\n autoconnect = true,\n reconnect = true,\n reconnect_interval = 1e3,\n max_reconnects = 5\n } = {}, generate_request_id) {\n super(\n WebSocket2,\n address,\n {\n autoconnect,\n reconnect,\n reconnect_interval,\n max_reconnects\n },\n generate_request_id\n );\n }\n };\n exports3.Client = Client;\n exports3.CommonClient = CommonClient;\n exports3.DefaultDataPack = DefaultDataPack;\n exports3.WebSocket = WebSocket2;\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha3.js\n var require_sha33 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha3.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.shake256 = exports3.shake128 = exports3.keccak_512 = exports3.keccak_384 = exports3.keccak_256 = exports3.keccak_224 = exports3.sha3_512 = exports3.sha3_384 = exports3.sha3_256 = exports3.sha3_224 = exports3.Keccak = void 0;\n exports3.keccakP = keccakP2;\n var _u64_ts_1 = require_u642();\n var utils_ts_1 = require_utils17();\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n var _7n3 = BigInt(7);\n var _256n2 = BigInt(256);\n var _0x71n2 = BigInt(113);\n var SHA3_PI2 = [];\n var SHA3_ROTL2 = [];\n var _SHA3_IOTA2 = [];\n for (let round = 0, R3 = _1n11, x4 = 1, y6 = 0; round < 24; round++) {\n [x4, y6] = [y6, (2 * x4 + 3 * y6) % 5];\n SHA3_PI2.push(2 * (5 * y6 + x4));\n SHA3_ROTL2.push((round + 1) * (round + 2) / 2 % 64);\n let t3 = _0n11;\n for (let j2 = 0; j2 < 7; j2++) {\n R3 = (R3 << _1n11 ^ (R3 >> _7n3) * _0x71n2) % _256n2;\n if (R3 & _2n8)\n t3 ^= _1n11 << (_1n11 << /* @__PURE__ */ BigInt(j2)) - _1n11;\n }\n _SHA3_IOTA2.push(t3);\n }\n var IOTAS2 = (0, _u64_ts_1.split)(_SHA3_IOTA2, true);\n var SHA3_IOTA_H2 = IOTAS2[0];\n var SHA3_IOTA_L2 = IOTAS2[1];\n var rotlH2 = (h4, l6, s4) => s4 > 32 ? (0, _u64_ts_1.rotlBH)(h4, l6, s4) : (0, _u64_ts_1.rotlSH)(h4, l6, s4);\n var rotlL2 = (h4, l6, s4) => s4 > 32 ? (0, _u64_ts_1.rotlBL)(h4, l6, s4) : (0, _u64_ts_1.rotlSL)(h4, l6, s4);\n function keccakP2(s4, rounds = 24) {\n const B2 = new Uint32Array(5 * 2);\n for (let round = 24 - rounds; round < 24; round++) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[x4] ^ s4[x4 + 10] ^ s4[x4 + 20] ^ s4[x4 + 30] ^ s4[x4 + 40];\n for (let x4 = 0; x4 < 10; x4 += 2) {\n const idx1 = (x4 + 8) % 10;\n const idx0 = (x4 + 2) % 10;\n const B0 = B2[idx0];\n const B1 = B2[idx0 + 1];\n const Th = rotlH2(B0, B1, 1) ^ B2[idx1];\n const Tl = rotlL2(B0, B1, 1) ^ B2[idx1 + 1];\n for (let y6 = 0; y6 < 50; y6 += 10) {\n s4[x4 + y6] ^= Th;\n s4[x4 + y6 + 1] ^= Tl;\n }\n }\n let curH = s4[2];\n let curL = s4[3];\n for (let t3 = 0; t3 < 24; t3++) {\n const shift = SHA3_ROTL2[t3];\n const Th = rotlH2(curH, curL, shift);\n const Tl = rotlL2(curH, curL, shift);\n const PI = SHA3_PI2[t3];\n curH = s4[PI];\n curL = s4[PI + 1];\n s4[PI] = Th;\n s4[PI + 1] = Tl;\n }\n for (let y6 = 0; y6 < 50; y6 += 10) {\n for (let x4 = 0; x4 < 10; x4++)\n B2[x4] = s4[y6 + x4];\n for (let x4 = 0; x4 < 10; x4++)\n s4[y6 + x4] ^= ~B2[(x4 + 2) % 10] & B2[(x4 + 4) % 10];\n }\n s4[0] ^= SHA3_IOTA_H2[round];\n s4[1] ^= SHA3_IOTA_L2[round];\n }\n (0, utils_ts_1.clean)(B2);\n }\n var Keccak2 = class _Keccak extends utils_ts_1.Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n this.enableXOF = false;\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n (0, utils_ts_1.anumber)(outputLen);\n if (!(0 < blockLen && blockLen < 200))\n throw new Error(\"only keccak-f1600 function is supported\");\n this.state = new Uint8Array(200);\n this.state32 = (0, utils_ts_1.u32)(this.state);\n }\n clone() {\n return this._cloneInto();\n }\n keccak() {\n (0, utils_ts_1.swap32IfBE)(this.state32);\n keccakP2(this.state32, this.rounds);\n (0, utils_ts_1.swap32IfBE)(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n (0, utils_ts_1.aexists)(this);\n data = (0, utils_ts_1.toBytes)(data);\n (0, utils_ts_1.abytes)(data);\n const { blockLen, state } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i3 = 0; i3 < take; i3++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n state[pos] ^= suffix;\n if ((suffix & 128) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 128;\n this.keccak();\n }\n writeInto(out) {\n (0, utils_ts_1.aexists)(this, false);\n (0, utils_ts_1.abytes)(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len; ) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n if (!this.enableXOF)\n throw new Error(\"XOF is not possible for this instance\");\n return this.writeInto(out);\n }\n xof(bytes) {\n (0, utils_ts_1.anumber)(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n (0, utils_ts_1.aoutput)(out, this);\n if (this.finished)\n throw new Error(\"digest() was already called\");\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n (0, utils_ts_1.clean)(this.state);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n };\n exports3.Keccak = Keccak2;\n var gen2 = (suffix, blockLen, outputLen) => (0, utils_ts_1.createHasher)(() => new Keccak2(blockLen, suffix, outputLen));\n exports3.sha3_224 = (() => gen2(6, 144, 224 / 8))();\n exports3.sha3_256 = (() => gen2(6, 136, 256 / 8))();\n exports3.sha3_384 = (() => gen2(6, 104, 384 / 8))();\n exports3.sha3_512 = (() => gen2(6, 72, 512 / 8))();\n exports3.keccak_224 = (() => gen2(1, 144, 224 / 8))();\n exports3.keccak_256 = (() => gen2(1, 136, 256 / 8))();\n exports3.keccak_384 = (() => gen2(1, 104, 384 / 8))();\n exports3.keccak_512 = (() => gen2(1, 72, 512 / 8))();\n var genShake = (suffix, blockLen, outputLen) => (0, utils_ts_1.createXOFer)((opts = {}) => new Keccak2(blockLen, suffix, opts.dkLen === void 0 ? outputLen : opts.dkLen, true));\n exports3.shake128 = (() => genShake(31, 168, 128 / 8))();\n exports3.shake256 = (() => genShake(31, 136, 256 / 8))();\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/hmac.js\n var require_hmac4 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/hmac.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.hmac = exports3.HMAC = void 0;\n var utils_ts_1 = require_utils17();\n var HMAC2 = class extends utils_ts_1.Hash {\n constructor(hash3, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n (0, utils_ts_1.ahash)(hash3);\n const key = (0, utils_ts_1.toBytes)(_key);\n this.iHash = hash3.create();\n if (typeof this.iHash.update !== \"function\")\n throw new Error(\"Expected instance of class which extends utils.Hash\");\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad6 = new Uint8Array(blockLen);\n pad6.set(key.length > blockLen ? hash3.create().update(key).digest() : key);\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54;\n this.iHash.update(pad6);\n this.oHash = hash3.create();\n for (let i3 = 0; i3 < pad6.length; i3++)\n pad6[i3] ^= 54 ^ 92;\n this.oHash.update(pad6);\n (0, utils_ts_1.clean)(pad6);\n }\n update(buf) {\n (0, utils_ts_1.aexists)(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n (0, utils_ts_1.aexists)(this);\n (0, utils_ts_1.abytes)(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n };\n exports3.HMAC = HMAC2;\n var hmac2 = (hash3, key, message2) => new HMAC2(hash3, key).update(message2).digest();\n exports3.hmac = hmac2;\n exports3.hmac.create = (hash3, key) => new HMAC2(hash3, key);\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/weierstrass.js\n var require_weierstrass2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/abstract/weierstrass.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.DER = exports3.DERErr = void 0;\n exports3._splitEndoScalar = _splitEndoScalar2;\n exports3._normFnElement = _normFnElement2;\n exports3.weierstrassN = weierstrassN2;\n exports3.SWUFpSqrtRatio = SWUFpSqrtRatio2;\n exports3.mapToCurveSimpleSWU = mapToCurveSimpleSWU2;\n exports3.ecdh = ecdh2;\n exports3.ecdsa = ecdsa2;\n exports3.weierstrassPoints = weierstrassPoints2;\n exports3._legacyHelperEquat = _legacyHelperEquat;\n exports3.weierstrass = weierstrass3;\n var hmac_js_1 = require_hmac4();\n var utils_1 = require_utils17();\n var utils_ts_1 = require_utils18();\n var curve_ts_1 = require_curve3();\n var modular_ts_1 = require_modular2();\n var divNearest3 = (num2, den) => (num2 + (num2 >= 0 ? den : -den) / _2n8) / den;\n function _splitEndoScalar2(k4, basis, n2) {\n const [[a1, b1], [a22, b22]] = basis;\n const c1 = divNearest3(b22 * k4, n2);\n const c22 = divNearest3(-b1 * k4, n2);\n let k1 = k4 - c1 * a1 - c22 * a22;\n let k22 = -c1 * b1 - c22 * b22;\n const k1neg = k1 < _0n11;\n const k2neg = k22 < _0n11;\n if (k1neg)\n k1 = -k1;\n if (k2neg)\n k22 = -k22;\n const MAX_NUM = (0, utils_ts_1.bitMask)(Math.ceil((0, utils_ts_1.bitLen)(n2) / 2)) + _1n11;\n if (k1 < _0n11 || k1 >= MAX_NUM || k22 < _0n11 || k22 >= MAX_NUM) {\n throw new Error(\"splitScalar (endomorphism): failed, k=\" + k4);\n }\n return { k1neg, k1, k2neg, k2: k22 };\n }\n function validateSigFormat2(format) {\n if (![\"compact\", \"recovered\", \"der\"].includes(format))\n throw new Error('Signature format must be \"compact\", \"recovered\", or \"der\"');\n return format;\n }\n function validateSigOpts2(opts, def) {\n const optsn = {};\n for (let optName of Object.keys(def)) {\n optsn[optName] = opts[optName] === void 0 ? def[optName] : opts[optName];\n }\n (0, utils_ts_1._abool2)(optsn.lowS, \"lowS\");\n (0, utils_ts_1._abool2)(optsn.prehash, \"prehash\");\n if (optsn.format !== void 0)\n validateSigFormat2(optsn.format);\n return optsn;\n }\n var DERErr3 = class extends Error {\n constructor(m2 = \"\") {\n super(m2);\n }\n };\n exports3.DERErr = DERErr3;\n exports3.DER = {\n // asn.1 DER encoding utils\n Err: DERErr3,\n // Basic building block is TLV (Tag-Length-Value)\n _tlv: {\n encode: (tag, data) => {\n const { Err: E2 } = exports3.DER;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length & 1)\n throw new E2(\"tlv.encode: unpadded data\");\n const dataLen = data.length / 2;\n const len = (0, utils_ts_1.numberToHexUnpadded)(dataLen);\n if (len.length / 2 & 128)\n throw new E2(\"tlv.encode: long form length too big\");\n const lenLen = dataLen > 127 ? (0, utils_ts_1.numberToHexUnpadded)(len.length / 2 | 128) : \"\";\n const t3 = (0, utils_ts_1.numberToHexUnpadded)(tag);\n return t3 + lenLen + len + data;\n },\n // v - value, l - left bytes (unparsed)\n decode(tag, data) {\n const { Err: E2 } = exports3.DER;\n let pos = 0;\n if (tag < 0 || tag > 256)\n throw new E2(\"tlv.encode: wrong tag\");\n if (data.length < 2 || data[pos++] !== tag)\n throw new E2(\"tlv.decode: wrong tlv\");\n const first = data[pos++];\n const isLong = !!(first & 128);\n let length = 0;\n if (!isLong)\n length = first;\n else {\n const lenLen = first & 127;\n if (!lenLen)\n throw new E2(\"tlv.decode(long): indefinite length not supported\");\n if (lenLen > 4)\n throw new E2(\"tlv.decode(long): byte length is too big\");\n const lengthBytes = data.subarray(pos, pos + lenLen);\n if (lengthBytes.length !== lenLen)\n throw new E2(\"tlv.decode: length bytes not complete\");\n if (lengthBytes[0] === 0)\n throw new E2(\"tlv.decode(long): zero leftmost byte\");\n for (const b4 of lengthBytes)\n length = length << 8 | b4;\n pos += lenLen;\n if (length < 128)\n throw new E2(\"tlv.decode(long): not minimal encoding\");\n }\n const v2 = data.subarray(pos, pos + length);\n if (v2.length !== length)\n throw new E2(\"tlv.decode: wrong value length\");\n return { v: v2, l: data.subarray(pos + length) };\n }\n },\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n _int: {\n encode(num2) {\n const { Err: E2 } = exports3.DER;\n if (num2 < _0n11)\n throw new E2(\"integer: negative integers are not allowed\");\n let hex = (0, utils_ts_1.numberToHexUnpadded)(num2);\n if (Number.parseInt(hex[0], 16) & 8)\n hex = \"00\" + hex;\n if (hex.length & 1)\n throw new E2(\"unexpected DER parsing assertion: unpadded hex\");\n return hex;\n },\n decode(data) {\n const { Err: E2 } = exports3.DER;\n if (data[0] & 128)\n throw new E2(\"invalid signature integer: negative\");\n if (data[0] === 0 && !(data[1] & 128))\n throw new E2(\"invalid signature integer: unnecessary leading zero\");\n return (0, utils_ts_1.bytesToNumberBE)(data);\n }\n },\n toSig(hex) {\n const { Err: E2, _int: int, _tlv: tlv } = exports3.DER;\n const data = (0, utils_ts_1.ensureBytes)(\"signature\", hex);\n const { v: seqBytes, l: seqLeftBytes } = tlv.decode(48, data);\n if (seqLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n const { v: rBytes, l: rLeftBytes } = tlv.decode(2, seqBytes);\n const { v: sBytes, l: sLeftBytes } = tlv.decode(2, rLeftBytes);\n if (sLeftBytes.length)\n throw new E2(\"invalid signature: left bytes after parsing\");\n return { r: int.decode(rBytes), s: int.decode(sBytes) };\n },\n hexFromSig(sig) {\n const { _tlv: tlv, _int: int } = exports3.DER;\n const rs = tlv.encode(2, int.encode(sig.r));\n const ss = tlv.encode(2, int.encode(sig.s));\n const seq = rs + ss;\n return tlv.encode(48, seq);\n }\n };\n var _0n11 = BigInt(0);\n var _1n11 = BigInt(1);\n var _2n8 = BigInt(2);\n var _3n5 = BigInt(3);\n var _4n5 = BigInt(4);\n function _normFnElement2(Fn, key) {\n const { BYTES: expected } = Fn;\n let num2;\n if (typeof key === \"bigint\") {\n num2 = key;\n } else {\n let bytes = (0, utils_ts_1.ensureBytes)(\"private key\", key);\n try {\n num2 = Fn.fromBytes(bytes);\n } catch (error) {\n throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof key}`);\n }\n }\n if (!Fn.isValidNot0(num2))\n throw new Error(\"invalid private key: out of range [1..N-1]\");\n return num2;\n }\n function weierstrassN2(params, extraOpts = {}) {\n const validated = (0, curve_ts_1._createCurveFields)(\"weierstrass\", params, extraOpts);\n const { Fp, Fn } = validated;\n let CURVE = validated.CURVE;\n const { h: cofactor, n: CURVE_ORDER } = CURVE;\n (0, utils_ts_1._validateObject)(extraOpts, {}, {\n allowInfinityPoint: \"boolean\",\n clearCofactor: \"function\",\n isTorsionFree: \"function\",\n fromBytes: \"function\",\n toBytes: \"function\",\n endo: \"object\",\n wrapPrivateKey: \"boolean\"\n });\n const { endo } = extraOpts;\n if (endo) {\n if (!Fp.is0(CURVE.a) || typeof endo.beta !== \"bigint\" || !Array.isArray(endo.basises)) {\n throw new Error('invalid endo: expected \"beta\": bigint and \"basises\": array');\n }\n }\n const lengths = getWLengths2(Fp, Fn);\n function assertCompressionIsSupported() {\n if (!Fp.isOdd)\n throw new Error(\"compression is not supported: Field does not have .isOdd()\");\n }\n function pointToBytes2(_c, point, isCompressed) {\n const { x: x4, y: y6 } = point.toAffine();\n const bx = Fp.toBytes(x4);\n (0, utils_ts_1._abool2)(isCompressed, \"isCompressed\");\n if (isCompressed) {\n assertCompressionIsSupported();\n const hasEvenY = !Fp.isOdd(y6);\n return (0, utils_ts_1.concatBytes)(pprefix2(hasEvenY), bx);\n } else {\n return (0, utils_ts_1.concatBytes)(Uint8Array.of(4), bx, Fp.toBytes(y6));\n }\n }\n function pointFromBytes(bytes) {\n (0, utils_ts_1._abytes2)(bytes, void 0, \"Point\");\n const { publicKey: comp, publicKeyUncompressed: uncomp } = lengths;\n const length = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (length === comp && (head === 2 || head === 3)) {\n const x4 = Fp.fromBytes(tail);\n if (!Fp.isValid(x4))\n throw new Error(\"bad point: is not on curve, wrong x\");\n const y22 = weierstrassEquation(x4);\n let y6;\n try {\n y6 = Fp.sqrt(y22);\n } catch (sqrtError) {\n const err = sqrtError instanceof Error ? \": \" + sqrtError.message : \"\";\n throw new Error(\"bad point: is not on curve, sqrt error\" + err);\n }\n assertCompressionIsSupported();\n const isYOdd = Fp.isOdd(y6);\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y6 = Fp.neg(y6);\n return { x: x4, y: y6 };\n } else if (length === uncomp && head === 4) {\n const L2 = Fp.BYTES;\n const x4 = Fp.fromBytes(tail.subarray(0, L2));\n const y6 = Fp.fromBytes(tail.subarray(L2, L2 * 2));\n if (!isValidXY(x4, y6))\n throw new Error(\"bad point: is not on curve\");\n return { x: x4, y: y6 };\n } else {\n throw new Error(`bad point: got length ${length}, expected compressed=${comp} or uncompressed=${uncomp}`);\n }\n }\n const encodePoint = extraOpts.toBytes || pointToBytes2;\n const decodePoint = extraOpts.fromBytes || pointFromBytes;\n function weierstrassEquation(x4) {\n const x22 = Fp.sqr(x4);\n const x32 = Fp.mul(x22, x4);\n return Fp.add(Fp.add(x32, Fp.mul(x4, CURVE.a)), CURVE.b);\n }\n function isValidXY(x4, y6) {\n const left = Fp.sqr(y6);\n const right = weierstrassEquation(x4);\n return Fp.eql(left, right);\n }\n if (!isValidXY(CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n const _4a3 = Fp.mul(Fp.pow(CURVE.a, _3n5), _4n5);\n const _27b2 = Fp.mul(Fp.sqr(CURVE.b), BigInt(27));\n if (Fp.is0(Fp.add(_4a3, _27b2)))\n throw new Error(\"bad curve params: a or b\");\n function acoord(title2, n2, banZero = false) {\n if (!Fp.isValid(n2) || banZero && Fp.is0(n2))\n throw new Error(`bad point coordinate ${title2}`);\n return n2;\n }\n function aprjpoint(other) {\n if (!(other instanceof Point3))\n throw new Error(\"ProjectivePoint expected\");\n }\n function splitEndoScalarN(k4) {\n if (!endo || !endo.basises)\n throw new Error(\"no endo\");\n return _splitEndoScalar2(k4, endo.basises, Fn.ORDER);\n }\n const toAffineMemo = (0, utils_ts_1.memoized)((p4, iz) => {\n const { X: X2, Y: Y2, Z: Z2 } = p4;\n if (Fp.eql(Z2, Fp.ONE))\n return { x: X2, y: Y2 };\n const is0 = p4.is0();\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(Z2);\n const x4 = Fp.mul(X2, iz);\n const y6 = Fp.mul(Y2, iz);\n const zz = Fp.mul(Z2, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error(\"invZ was invalid\");\n return { x: x4, y: y6 };\n });\n const assertValidMemo = (0, utils_ts_1.memoized)((p4) => {\n if (p4.is0()) {\n if (extraOpts.allowInfinityPoint && !Fp.is0(p4.Y))\n return;\n throw new Error(\"bad point: ZERO\");\n }\n const { x: x4, y: y6 } = p4.toAffine();\n if (!Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"bad point: x or y not field elements\");\n if (!isValidXY(x4, y6))\n throw new Error(\"bad point: equation left != right\");\n if (!p4.isTorsionFree())\n throw new Error(\"bad point: not in prime-order subgroup\");\n return true;\n });\n function finishEndo(endoBeta, k1p, k2p, k1neg, k2neg) {\n k2p = new Point3(Fp.mul(k2p.X, endoBeta), k2p.Y, k2p.Z);\n k1p = (0, curve_ts_1.negateCt)(k1neg, k1p);\n k2p = (0, curve_ts_1.negateCt)(k2neg, k2p);\n return k1p.add(k2p);\n }\n class Point3 {\n /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n constructor(X2, Y2, Z2) {\n this.X = acoord(\"x\", X2);\n this.Y = acoord(\"y\", Y2, true);\n this.Z = acoord(\"z\", Z2);\n Object.freeze(this);\n }\n static CURVE() {\n return CURVE;\n }\n /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n static fromAffine(p4) {\n const { x: x4, y: y6 } = p4 || {};\n if (!p4 || !Fp.isValid(x4) || !Fp.isValid(y6))\n throw new Error(\"invalid affine point\");\n if (p4 instanceof Point3)\n throw new Error(\"projective point not allowed\");\n if (Fp.is0(x4) && Fp.is0(y6))\n return Point3.ZERO;\n return new Point3(x4, y6, Fp.ONE);\n }\n static fromBytes(bytes) {\n const P2 = Point3.fromAffine(decodePoint((0, utils_ts_1._abytes2)(bytes, void 0, \"point\")));\n P2.assertValidity();\n return P2;\n }\n static fromHex(hex) {\n return Point3.fromBytes((0, utils_ts_1.ensureBytes)(\"pointHex\", hex));\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n *\n * @param windowSize\n * @param isLazy true will defer table computation until the first multiplication\n * @returns\n */\n precompute(windowSize = 8, isLazy = true) {\n wnaf.createCache(this, windowSize);\n if (!isLazy)\n this.multiply(_3n5);\n return this;\n }\n // TODO: return `this`\n /** A point on curve is valid if it conforms to equation. */\n assertValidity() {\n assertValidMemo(this);\n }\n hasEvenY() {\n const { y: y6 } = this.toAffine();\n if (!Fp.isOdd)\n throw new Error(\"Field doesn't support isOdd\");\n return !Fp.isOdd(y6);\n }\n /** Compare one point to another. */\n equals(other) {\n aprjpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U22 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U22;\n }\n /** Flips point to one corresponding to (x, -y) in Affine coordinates. */\n negate() {\n return new Point3(this.X, Fp.neg(this.Y), this.Z);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a: a3, b: b4 } = CURVE;\n const b32 = Fp.mul(b4, _3n5);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n let t0 = Fp.mul(X1, X1);\n let t1 = Fp.mul(Y1, Y1);\n let t22 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3);\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a3, Z3);\n Y3 = Fp.mul(b32, t22);\n Y3 = Fp.add(X3, Y3);\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b32, Z3);\n t22 = Fp.mul(a3, t22);\n t3 = Fp.sub(t0, t22);\n t3 = Fp.mul(a3, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0);\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t22);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t22 = Fp.mul(Y1, Z1);\n t22 = Fp.add(t22, t22);\n t0 = Fp.mul(t22, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t22, t1);\n Z3 = Fp.add(Z3, Z3);\n Z3 = Fp.add(Z3, Z3);\n return new Point3(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n aprjpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO;\n const a3 = CURVE.a;\n const b32 = Fp.mul(CURVE.b, _3n5);\n let t0 = Fp.mul(X1, X2);\n let t1 = Fp.mul(Y1, Y2);\n let t22 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2);\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2);\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t22);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2);\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t22);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a3, t4);\n X3 = Fp.mul(b32, t22);\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0);\n t1 = Fp.add(t1, t0);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.mul(b32, t4);\n t1 = Fp.add(t1, t22);\n t22 = Fp.sub(t0, t22);\n t22 = Fp.mul(a3, t22);\n t4 = Fp.add(t4, t22);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4);\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0);\n return new Point3(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point3.ZERO);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n const { endo: endo2 } = extraOpts;\n if (!Fn.isValidNot0(scalar))\n throw new Error(\"invalid scalar: out of range\");\n let point, fake;\n const mul = (n2) => wnaf.cached(this, n2, (p4) => (0, curve_ts_1.normalizeZ)(Point3, p4));\n if (endo2) {\n const { k1neg, k1, k2neg, k2: k22 } = splitEndoScalarN(scalar);\n const { p: k1p, f: k1f } = mul(k1);\n const { p: k2p, f: k2f } = mul(k22);\n fake = k1f.add(k2f);\n point = finishEndo(endo2.beta, k1p, k2p, k1neg, k2neg);\n } else {\n const { p: p4, f: f7 } = mul(scalar);\n point = p4;\n fake = f7;\n }\n return (0, curve_ts_1.normalizeZ)(Point3, [point, fake])[0];\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed secret key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(sc) {\n const { endo: endo2 } = extraOpts;\n const p4 = this;\n if (!Fn.isValid(sc))\n throw new Error(\"invalid scalar: out of range\");\n if (sc === _0n11 || p4.is0())\n return Point3.ZERO;\n if (sc === _1n11)\n return p4;\n if (wnaf.hasCache(this))\n return this.multiply(sc);\n if (endo2) {\n const { k1neg, k1, k2neg, k2: k22 } = splitEndoScalarN(sc);\n const { p1, p2: p22 } = (0, curve_ts_1.mulEndoUnsafe)(Point3, p4, k1, k22);\n return finishEndo(endo2.beta, p1, p22, k1neg, k2neg);\n } else {\n return wnaf.unsafe(p4, sc);\n }\n }\n multiplyAndAddUnsafe(Q2, a3, b4) {\n const sum = this.multiplyUnsafe(a3).add(Q2.multiplyUnsafe(b4));\n return sum.is0() ? void 0 : sum;\n }\n /**\n * Converts Projective point to affine (x, y) coordinates.\n * @param invertedZ Z^-1 (inverted zero) - optional, precomputation is useful for invertBatch\n */\n toAffine(invertedZ) {\n return toAffineMemo(this, invertedZ);\n }\n /**\n * Checks whether Point is free of torsion elements (is in prime subgroup).\n * Always torsion-free for cofactor=1 curves.\n */\n isTorsionFree() {\n const { isTorsionFree } = extraOpts;\n if (cofactor === _1n11)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point3, this);\n return wnaf.unsafe(this, CURVE_ORDER).is0();\n }\n clearCofactor() {\n const { clearCofactor } = extraOpts;\n if (cofactor === _1n11)\n return this;\n if (clearCofactor)\n return clearCofactor(Point3, this);\n return this.multiplyUnsafe(cofactor);\n }\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n toBytes(isCompressed = true) {\n (0, utils_ts_1._abool2)(isCompressed, \"isCompressed\");\n this.assertValidity();\n return encodePoint(Point3, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return (0, utils_ts_1.bytesToHex)(this.toBytes(isCompressed));\n }\n toString() {\n return ``;\n }\n // TODO: remove\n get px() {\n return this.X;\n }\n get py() {\n return this.X;\n }\n get pz() {\n return this.Z;\n }\n toRawBytes(isCompressed = true) {\n return this.toBytes(isCompressed);\n }\n _setWindowSize(windowSize) {\n this.precompute(windowSize);\n }\n static normalizeZ(points) {\n return (0, curve_ts_1.normalizeZ)(Point3, points);\n }\n static msm(points, scalars) {\n return (0, curve_ts_1.pippenger)(Point3, Fn, points, scalars);\n }\n static fromPrivateKey(privateKey) {\n return Point3.BASE.multiply(_normFnElement2(Fn, privateKey));\n }\n }\n Point3.BASE = new Point3(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point3.ZERO = new Point3(Fp.ZERO, Fp.ONE, Fp.ZERO);\n Point3.Fp = Fp;\n Point3.Fn = Fn;\n const bits = Fn.BITS;\n const wnaf = new curve_ts_1.wNAF(Point3, extraOpts.endo ? Math.ceil(bits / 2) : bits);\n Point3.BASE.precompute(8);\n return Point3;\n }\n function pprefix2(hasEvenY) {\n return Uint8Array.of(hasEvenY ? 2 : 3);\n }\n function SWUFpSqrtRatio2(Fp, Z2) {\n const q3 = Fp.ORDER;\n let l6 = _0n11;\n for (let o5 = q3 - _1n11; o5 % _2n8 === _0n11; o5 /= _2n8)\n l6 += _1n11;\n const c1 = l6;\n const _2n_pow_c1_1 = _2n8 << c1 - _1n11 - _1n11;\n const _2n_pow_c1 = _2n_pow_c1_1 * _2n8;\n const c22 = (q3 - _1n11) / _2n_pow_c1;\n const c32 = (c22 - _1n11) / _2n8;\n const c4 = _2n_pow_c1 - _1n11;\n const c5 = _2n_pow_c1_1;\n const c6 = Fp.pow(Z2, c22);\n const c7 = Fp.pow(Z2, (c22 + _1n11) / _2n8);\n let sqrtRatio = (u2, v2) => {\n let tv1 = c6;\n let tv2 = Fp.pow(v2, c4);\n let tv3 = Fp.sqr(tv2);\n tv3 = Fp.mul(tv3, v2);\n let tv5 = Fp.mul(u2, tv3);\n tv5 = Fp.pow(tv5, c32);\n tv5 = Fp.mul(tv5, tv2);\n tv2 = Fp.mul(tv5, v2);\n tv3 = Fp.mul(tv5, u2);\n let tv4 = Fp.mul(tv3, tv2);\n tv5 = Fp.pow(tv4, c5);\n let isQR = Fp.eql(tv5, Fp.ONE);\n tv2 = Fp.mul(tv3, c7);\n tv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, isQR);\n tv4 = Fp.cmov(tv5, tv4, isQR);\n for (let i3 = c1; i3 > _1n11; i3--) {\n let tv52 = i3 - _2n8;\n tv52 = _2n8 << tv52 - _1n11;\n let tvv5 = Fp.pow(tv4, tv52);\n const e1 = Fp.eql(tvv5, Fp.ONE);\n tv2 = Fp.mul(tv3, tv1);\n tv1 = Fp.mul(tv1, tv1);\n tvv5 = Fp.mul(tv4, tv1);\n tv3 = Fp.cmov(tv2, tv3, e1);\n tv4 = Fp.cmov(tvv5, tv4, e1);\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n5 === _3n5) {\n const c12 = (Fp.ORDER - _3n5) / _4n5;\n const c23 = Fp.sqrt(Fp.neg(Z2));\n sqrtRatio = (u2, v2) => {\n let tv1 = Fp.sqr(v2);\n const tv2 = Fp.mul(u2, v2);\n tv1 = Fp.mul(tv1, tv2);\n let y1 = Fp.pow(tv1, c12);\n y1 = Fp.mul(y1, tv2);\n const y22 = Fp.mul(y1, c23);\n const tv3 = Fp.mul(Fp.sqr(y1), v2);\n const isQR = Fp.eql(tv3, u2);\n let y6 = Fp.cmov(y22, y1, isQR);\n return { isValid: isQR, value: y6 };\n };\n }\n return sqrtRatio;\n }\n function mapToCurveSimpleSWU2(Fp, opts) {\n (0, modular_ts_1.validateField)(Fp);\n const { A: A4, B: B2, Z: Z2 } = opts;\n if (!Fp.isValid(A4) || !Fp.isValid(B2) || !Fp.isValid(Z2))\n throw new Error(\"mapToCurveSimpleSWU: invalid opts\");\n const sqrtRatio = SWUFpSqrtRatio2(Fp, Z2);\n if (!Fp.isOdd)\n throw new Error(\"Field does not have .isOdd()\");\n return (u2) => {\n let tv1, tv2, tv3, tv4, tv5, tv6, x4, y6;\n tv1 = Fp.sqr(u2);\n tv1 = Fp.mul(tv1, Z2);\n tv2 = Fp.sqr(tv1);\n tv2 = Fp.add(tv2, tv1);\n tv3 = Fp.add(tv2, Fp.ONE);\n tv3 = Fp.mul(tv3, B2);\n tv4 = Fp.cmov(Z2, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO));\n tv4 = Fp.mul(tv4, A4);\n tv2 = Fp.sqr(tv3);\n tv6 = Fp.sqr(tv4);\n tv5 = Fp.mul(tv6, A4);\n tv2 = Fp.add(tv2, tv5);\n tv2 = Fp.mul(tv2, tv3);\n tv6 = Fp.mul(tv6, tv4);\n tv5 = Fp.mul(tv6, B2);\n tv2 = Fp.add(tv2, tv5);\n x4 = Fp.mul(tv1, tv3);\n const { isValid: isValid2, value } = sqrtRatio(tv2, tv6);\n y6 = Fp.mul(tv1, u2);\n y6 = Fp.mul(y6, value);\n x4 = Fp.cmov(x4, tv3, isValid2);\n y6 = Fp.cmov(y6, value, isValid2);\n const e1 = Fp.isOdd(u2) === Fp.isOdd(y6);\n y6 = Fp.cmov(Fp.neg(y6), y6, e1);\n const tv4_inv = (0, modular_ts_1.FpInvertBatch)(Fp, [tv4], true)[0];\n x4 = Fp.mul(x4, tv4_inv);\n return { x: x4, y: y6 };\n };\n }\n function getWLengths2(Fp, Fn) {\n return {\n secretKey: Fn.BYTES,\n publicKey: 1 + Fp.BYTES,\n publicKeyUncompressed: 1 + 2 * Fp.BYTES,\n publicKeyHasPrefix: true,\n signature: 2 * Fn.BYTES\n };\n }\n function ecdh2(Point3, ecdhOpts = {}) {\n const { Fn } = Point3;\n const randomBytes_ = ecdhOpts.randomBytes || utils_ts_1.randomBytes;\n const lengths = Object.assign(getWLengths2(Point3.Fp, Fn), { seed: (0, modular_ts_1.getMinHashLength)(Fn.ORDER) });\n function isValidSecretKey(secretKey) {\n try {\n return !!_normFnElement2(Fn, secretKey);\n } catch (error) {\n return false;\n }\n }\n function isValidPublicKey(publicKey, isCompressed) {\n const { publicKey: comp, publicKeyUncompressed } = lengths;\n try {\n const l6 = publicKey.length;\n if (isCompressed === true && l6 !== comp)\n return false;\n if (isCompressed === false && l6 !== publicKeyUncompressed)\n return false;\n return !!Point3.fromBytes(publicKey);\n } catch (error) {\n return false;\n }\n }\n function randomSecretKey(seed = randomBytes_(lengths.seed)) {\n return (0, modular_ts_1.mapHashToField)((0, utils_ts_1._abytes2)(seed, lengths.seed, \"seed\"), Fn.ORDER);\n }\n function getPublicKey(secretKey, isCompressed = true) {\n return Point3.BASE.multiply(_normFnElement2(Fn, secretKey)).toBytes(isCompressed);\n }\n function keygen(seed) {\n const secretKey = randomSecretKey(seed);\n return { secretKey, publicKey: getPublicKey(secretKey) };\n }\n function isProbPub(item) {\n if (typeof item === \"bigint\")\n return false;\n if (item instanceof Point3)\n return true;\n const { secretKey, publicKey, publicKeyUncompressed } = lengths;\n if (Fn.allowedLengths || secretKey === publicKey)\n return void 0;\n const l6 = (0, utils_ts_1.ensureBytes)(\"key\", item).length;\n return l6 === publicKey || l6 === publicKeyUncompressed;\n }\n function getSharedSecret(secretKeyA, publicKeyB, isCompressed = true) {\n if (isProbPub(secretKeyA) === true)\n throw new Error(\"first arg must be private key\");\n if (isProbPub(publicKeyB) === false)\n throw new Error(\"second arg must be public key\");\n const s4 = _normFnElement2(Fn, secretKeyA);\n const b4 = Point3.fromHex(publicKeyB);\n return b4.multiply(s4).toBytes(isCompressed);\n }\n const utils = {\n isValidSecretKey,\n isValidPublicKey,\n randomSecretKey,\n // TODO: remove\n isValidPrivateKey: isValidSecretKey,\n randomPrivateKey: randomSecretKey,\n normPrivateKeyToScalar: (key) => _normFnElement2(Fn, key),\n precompute(windowSize = 8, point = Point3.BASE) {\n return point.precompute(windowSize, false);\n }\n };\n return Object.freeze({ getPublicKey, getSharedSecret, keygen, Point: Point3, utils, lengths });\n }\n function ecdsa2(Point3, hash3, ecdsaOpts = {}) {\n (0, utils_1.ahash)(hash3);\n (0, utils_ts_1._validateObject)(ecdsaOpts, {}, {\n hmac: \"function\",\n lowS: \"boolean\",\n randomBytes: \"function\",\n bits2int: \"function\",\n bits2int_modN: \"function\"\n });\n const randomBytes2 = ecdsaOpts.randomBytes || utils_ts_1.randomBytes;\n const hmac2 = ecdsaOpts.hmac || ((key, ...msgs) => (0, hmac_js_1.hmac)(hash3, key, (0, utils_ts_1.concatBytes)(...msgs)));\n const { Fp, Fn } = Point3;\n const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn;\n const { keygen, getPublicKey, getSharedSecret, utils, lengths } = ecdh2(Point3, ecdsaOpts);\n const defaultSigOpts = {\n prehash: false,\n lowS: typeof ecdsaOpts.lowS === \"boolean\" ? ecdsaOpts.lowS : false,\n format: void 0,\n //'compact' as ECDSASigFormat,\n extraEntropy: false\n };\n const defaultSigOpts_format = \"compact\";\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n11;\n return number > HALF;\n }\n function validateRS(title2, num2) {\n if (!Fn.isValidNot0(num2))\n throw new Error(`invalid signature ${title2}: out of range 1..Point.Fn.ORDER`);\n return num2;\n }\n function validateSigLength(bytes, format) {\n validateSigFormat2(format);\n const size6 = lengths.signature;\n const sizer = format === \"compact\" ? size6 : format === \"recovered\" ? size6 + 1 : void 0;\n return (0, utils_ts_1._abytes2)(bytes, sizer, `${format} signature`);\n }\n class Signature {\n constructor(r2, s4, recovery) {\n this.r = validateRS(\"r\", r2);\n this.s = validateRS(\"s\", s4);\n if (recovery != null)\n this.recovery = recovery;\n Object.freeze(this);\n }\n static fromBytes(bytes, format = defaultSigOpts_format) {\n validateSigLength(bytes, format);\n let recid;\n if (format === \"der\") {\n const { r: r3, s: s5 } = exports3.DER.toSig((0, utils_ts_1._abytes2)(bytes));\n return new Signature(r3, s5);\n }\n if (format === \"recovered\") {\n recid = bytes[0];\n format = \"compact\";\n bytes = bytes.subarray(1);\n }\n const L2 = Fn.BYTES;\n const r2 = bytes.subarray(0, L2);\n const s4 = bytes.subarray(L2, L2 * 2);\n return new Signature(Fn.fromBytes(r2), Fn.fromBytes(s4), recid);\n }\n static fromHex(hex, format) {\n return this.fromBytes((0, utils_ts_1.hexToBytes)(hex), format);\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(messageHash) {\n const FIELD_ORDER = Fp.ORDER;\n const { r: r2, s: s4, recovery: rec } = this;\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error(\"recovery id invalid\");\n const hasCofactor = CURVE_ORDER * _2n8 < FIELD_ORDER;\n if (hasCofactor && rec > 1)\n throw new Error(\"recovery id is ambiguous for h>1 curve\");\n const radj = rec === 2 || rec === 3 ? r2 + CURVE_ORDER : r2;\n if (!Fp.isValid(radj))\n throw new Error(\"recovery id 2 or 3 invalid\");\n const x4 = Fp.toBytes(radj);\n const R3 = Point3.fromBytes((0, utils_ts_1.concatBytes)(pprefix2((rec & 1) === 0), x4));\n const ir = Fn.inv(radj);\n const h4 = bits2int_modN((0, utils_ts_1.ensureBytes)(\"msgHash\", messageHash));\n const u1 = Fn.create(-h4 * ir);\n const u2 = Fn.create(s4 * ir);\n const Q2 = Point3.BASE.multiplyUnsafe(u1).add(R3.multiplyUnsafe(u2));\n if (Q2.is0())\n throw new Error(\"point at infinify\");\n Q2.assertValidity();\n return Q2;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n toBytes(format = defaultSigOpts_format) {\n validateSigFormat2(format);\n if (format === \"der\")\n return (0, utils_ts_1.hexToBytes)(exports3.DER.hexFromSig(this));\n const r2 = Fn.toBytes(this.r);\n const s4 = Fn.toBytes(this.s);\n if (format === \"recovered\") {\n if (this.recovery == null)\n throw new Error(\"recovery bit must be present\");\n return (0, utils_ts_1.concatBytes)(Uint8Array.of(this.recovery), r2, s4);\n }\n return (0, utils_ts_1.concatBytes)(r2, s4);\n }\n toHex(format) {\n return (0, utils_ts_1.bytesToHex)(this.toBytes(format));\n }\n // TODO: remove\n assertValidity() {\n }\n static fromCompact(hex) {\n return Signature.fromBytes((0, utils_ts_1.ensureBytes)(\"sig\", hex), \"compact\");\n }\n static fromDER(hex) {\n return Signature.fromBytes((0, utils_ts_1.ensureBytes)(\"sig\", hex), \"der\");\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, Fn.neg(this.s), this.recovery) : this;\n }\n toDERRawBytes() {\n return this.toBytes(\"der\");\n }\n toDERHex() {\n return (0, utils_ts_1.bytesToHex)(this.toBytes(\"der\"));\n }\n toCompactRawBytes() {\n return this.toBytes(\"compact\");\n }\n toCompactHex() {\n return (0, utils_ts_1.bytesToHex)(this.toBytes(\"compact\"));\n }\n }\n const bits2int = ecdsaOpts.bits2int || function bits2int_def(bytes) {\n if (bytes.length > 8192)\n throw new Error(\"input is too large\");\n const num2 = (0, utils_ts_1.bytesToNumberBE)(bytes);\n const delta = bytes.length * 8 - fnBits;\n return delta > 0 ? num2 >> BigInt(delta) : num2;\n };\n const bits2int_modN = ecdsaOpts.bits2int_modN || function bits2int_modN_def(bytes) {\n return Fn.create(bits2int(bytes));\n };\n const ORDER_MASK = (0, utils_ts_1.bitMask)(fnBits);\n function int2octets(num2) {\n (0, utils_ts_1.aInRange)(\"num < 2^\" + fnBits, num2, _0n11, ORDER_MASK);\n return Fn.toBytes(num2);\n }\n function validateMsgAndHash(message2, prehash) {\n (0, utils_ts_1._abytes2)(message2, void 0, \"message\");\n return prehash ? (0, utils_ts_1._abytes2)(hash3(message2), void 0, \"prehashed message\") : message2;\n }\n function prepSig(message2, privateKey, opts) {\n if ([\"recovered\", \"canonical\"].some((k4) => k4 in opts))\n throw new Error(\"sign() legacy options not supported\");\n const { lowS, prehash, extraEntropy: extraEntropy2 } = validateSigOpts2(opts, defaultSigOpts);\n message2 = validateMsgAndHash(message2, prehash);\n const h1int = bits2int_modN(message2);\n const d5 = _normFnElement2(Fn, privateKey);\n const seedArgs = [int2octets(d5), int2octets(h1int)];\n if (extraEntropy2 != null && extraEntropy2 !== false) {\n const e2 = extraEntropy2 === true ? randomBytes2(lengths.secretKey) : extraEntropy2;\n seedArgs.push((0, utils_ts_1.ensureBytes)(\"extraEntropy\", e2));\n }\n const seed = (0, utils_ts_1.concatBytes)(...seedArgs);\n const m2 = h1int;\n function k2sig(kBytes) {\n const k4 = bits2int(kBytes);\n if (!Fn.isValidNot0(k4))\n return;\n const ik = Fn.inv(k4);\n const q3 = Point3.BASE.multiply(k4).toAffine();\n const r2 = Fn.create(q3.x);\n if (r2 === _0n11)\n return;\n const s4 = Fn.create(ik * Fn.create(m2 + r2 * d5));\n if (s4 === _0n11)\n return;\n let recovery = (q3.x === r2 ? 0 : 2) | Number(q3.y & _1n11);\n let normS = s4;\n if (lowS && isBiggerThanHalfOrder(s4)) {\n normS = Fn.neg(s4);\n recovery ^= 1;\n }\n return new Signature(r2, normS, recovery);\n }\n return { seed, k2sig };\n }\n function sign4(message2, secretKey, opts = {}) {\n message2 = (0, utils_ts_1.ensureBytes)(\"message\", message2);\n const { seed, k2sig } = prepSig(message2, secretKey, opts);\n const drbg = (0, utils_ts_1.createHmacDrbg)(hash3.outputLen, Fn.BYTES, hmac2);\n const sig = drbg(seed, k2sig);\n return sig;\n }\n function tryParsingSig(sg) {\n let sig = void 0;\n const isHex2 = typeof sg === \"string\" || (0, utils_ts_1.isBytes)(sg);\n const isObj = !isHex2 && sg !== null && typeof sg === \"object\" && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\";\n if (!isHex2 && !isObj)\n throw new Error(\"invalid signature, expected Uint8Array, hex string or Signature instance\");\n if (isObj) {\n sig = new Signature(sg.r, sg.s);\n } else if (isHex2) {\n try {\n sig = Signature.fromBytes((0, utils_ts_1.ensureBytes)(\"sig\", sg), \"der\");\n } catch (derError) {\n if (!(derError instanceof exports3.DER.Err))\n throw derError;\n }\n if (!sig) {\n try {\n sig = Signature.fromBytes((0, utils_ts_1.ensureBytes)(\"sig\", sg), \"compact\");\n } catch (error) {\n return false;\n }\n }\n }\n if (!sig)\n return false;\n return sig;\n }\n function verify2(signature, message2, publicKey, opts = {}) {\n const { lowS, prehash, format } = validateSigOpts2(opts, defaultSigOpts);\n publicKey = (0, utils_ts_1.ensureBytes)(\"publicKey\", publicKey);\n message2 = validateMsgAndHash((0, utils_ts_1.ensureBytes)(\"message\", message2), prehash);\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n const sig = format === void 0 ? tryParsingSig(signature) : Signature.fromBytes((0, utils_ts_1.ensureBytes)(\"sig\", signature), format);\n if (sig === false)\n return false;\n try {\n const P2 = Point3.fromBytes(publicKey);\n if (lowS && sig.hasHighS())\n return false;\n const { r: r2, s: s4 } = sig;\n const h4 = bits2int_modN(message2);\n const is = Fn.inv(s4);\n const u1 = Fn.create(h4 * is);\n const u2 = Fn.create(r2 * is);\n const R3 = Point3.BASE.multiplyUnsafe(u1).add(P2.multiplyUnsafe(u2));\n if (R3.is0())\n return false;\n const v2 = Fn.create(R3.x);\n return v2 === r2;\n } catch (e2) {\n return false;\n }\n }\n function recoverPublicKey3(signature, message2, opts = {}) {\n const { prehash } = validateSigOpts2(opts, defaultSigOpts);\n message2 = validateMsgAndHash(message2, prehash);\n return Signature.fromBytes(signature, \"recovered\").recoverPublicKey(message2).toBytes();\n }\n return Object.freeze({\n keygen,\n getPublicKey,\n getSharedSecret,\n utils,\n lengths,\n Point: Point3,\n sign: sign4,\n verify: verify2,\n recoverPublicKey: recoverPublicKey3,\n Signature,\n hash: hash3\n });\n }\n function weierstrassPoints2(c4) {\n const { CURVE, curveOpts } = _weierstrass_legacy_opts_to_new2(c4);\n const Point3 = weierstrassN2(CURVE, curveOpts);\n return _weierstrass_new_output_to_legacy(c4, Point3);\n }\n function _weierstrass_legacy_opts_to_new2(c4) {\n const CURVE = {\n a: c4.a,\n b: c4.b,\n p: c4.Fp.ORDER,\n n: c4.n,\n h: c4.h,\n Gx: c4.Gx,\n Gy: c4.Gy\n };\n const Fp = c4.Fp;\n let allowedLengths = c4.allowedPrivateKeyLengths ? Array.from(new Set(c4.allowedPrivateKeyLengths.map((l6) => Math.ceil(l6 / 2)))) : void 0;\n const Fn = (0, modular_ts_1.Field)(CURVE.n, {\n BITS: c4.nBitLength,\n allowedLengths,\n modFromBytes: c4.wrapPrivateKey\n });\n const curveOpts = {\n Fp,\n Fn,\n allowInfinityPoint: c4.allowInfinityPoint,\n endo: c4.endo,\n isTorsionFree: c4.isTorsionFree,\n clearCofactor: c4.clearCofactor,\n fromBytes: c4.fromBytes,\n toBytes: c4.toBytes\n };\n return { CURVE, curveOpts };\n }\n function _ecdsa_legacy_opts_to_new2(c4) {\n const { CURVE, curveOpts } = _weierstrass_legacy_opts_to_new2(c4);\n const ecdsaOpts = {\n hmac: c4.hmac,\n randomBytes: c4.randomBytes,\n lowS: c4.lowS,\n bits2int: c4.bits2int,\n bits2int_modN: c4.bits2int_modN\n };\n return { CURVE, curveOpts, hash: c4.hash, ecdsaOpts };\n }\n function _legacyHelperEquat(Fp, a3, b4) {\n function weierstrassEquation(x4) {\n const x22 = Fp.sqr(x4);\n const x32 = Fp.mul(x22, x4);\n return Fp.add(Fp.add(x32, Fp.mul(x4, a3)), b4);\n }\n return weierstrassEquation;\n }\n function _weierstrass_new_output_to_legacy(c4, Point3) {\n const { Fp, Fn } = Point3;\n function isWithinCurveOrder(num2) {\n return (0, utils_ts_1.inRange)(num2, _1n11, Fn.ORDER);\n }\n const weierstrassEquation = _legacyHelperEquat(Fp, c4.a, c4.b);\n return Object.assign({}, {\n CURVE: c4,\n Point: Point3,\n ProjectivePoint: Point3,\n normPrivateKeyToScalar: (key) => _normFnElement2(Fn, key),\n weierstrassEquation,\n isWithinCurveOrder\n });\n }\n function _ecdsa_new_output_to_legacy2(c4, _ecdsa) {\n const Point3 = _ecdsa.Point;\n return Object.assign({}, _ecdsa, {\n ProjectivePoint: Point3,\n CURVE: Object.assign({}, c4, (0, modular_ts_1.nLength)(Point3.Fn.ORDER, Point3.Fn.BITS))\n });\n }\n function weierstrass3(c4) {\n const { CURVE, curveOpts, hash: hash3, ecdsaOpts } = _ecdsa_legacy_opts_to_new2(c4);\n const Point3 = weierstrassN2(CURVE, curveOpts);\n const signs = ecdsa2(Point3, hash3, ecdsaOpts);\n return _ecdsa_new_output_to_legacy2(c4, signs);\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/_shortw_utils.js\n var require_shortw_utils2 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/_shortw_utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getHash = getHash2;\n exports3.createCurve = createCurve3;\n var weierstrass_ts_1 = require_weierstrass2();\n function getHash2(hash3) {\n return { hash: hash3 };\n }\n function createCurve3(curveDef, defHash) {\n const create2 = (hash3) => (0, weierstrass_ts_1.weierstrass)({ ...curveDef, hash: hash3 });\n return { ...create2(defHash), create: create2 };\n }\n }\n });\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/secp256k1.js\n var require_secp256k13 = __commonJS({\n \"../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/secp256k1.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.encodeToCurve = exports3.hashToCurve = exports3.secp256k1_hasher = exports3.schnorr = exports3.secp256k1 = void 0;\n var sha2_js_1 = require_sha23();\n var utils_js_1 = require_utils17();\n var _shortw_utils_ts_1 = require_shortw_utils2();\n var hash_to_curve_ts_1 = require_hash_to_curve2();\n var modular_ts_1 = require_modular2();\n var weierstrass_ts_1 = require_weierstrass2();\n var utils_ts_1 = require_utils18();\n var secp256k1_CURVE2 = {\n p: BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),\n n: BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),\n h: BigInt(1),\n a: BigInt(0),\n b: BigInt(7),\n Gx: BigInt(\"0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\"),\n Gy: BigInt(\"0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\")\n };\n var secp256k1_ENDO2 = {\n beta: BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),\n basises: [\n [BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"), -BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\")],\n [BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"), BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\")]\n ]\n };\n var _0n11 = /* @__PURE__ */ BigInt(0);\n var _1n11 = /* @__PURE__ */ BigInt(1);\n var _2n8 = /* @__PURE__ */ BigInt(2);\n function sqrtMod3(y6) {\n const P2 = secp256k1_CURVE2.p;\n const _3n5 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b22 = y6 * y6 * y6 % P2;\n const b32 = b22 * b22 * y6 % P2;\n const b6 = (0, modular_ts_1.pow2)(b32, _3n5, P2) * b32 % P2;\n const b9 = (0, modular_ts_1.pow2)(b6, _3n5, P2) * b32 % P2;\n const b11 = (0, modular_ts_1.pow2)(b9, _2n8, P2) * b22 % P2;\n const b222 = (0, modular_ts_1.pow2)(b11, _11n, P2) * b11 % P2;\n const b44 = (0, modular_ts_1.pow2)(b222, _22n, P2) * b222 % P2;\n const b88 = (0, modular_ts_1.pow2)(b44, _44n, P2) * b44 % P2;\n const b176 = (0, modular_ts_1.pow2)(b88, _88n, P2) * b88 % P2;\n const b220 = (0, modular_ts_1.pow2)(b176, _44n, P2) * b44 % P2;\n const b223 = (0, modular_ts_1.pow2)(b220, _3n5, P2) * b32 % P2;\n const t1 = (0, modular_ts_1.pow2)(b223, _23n, P2) * b222 % P2;\n const t22 = (0, modular_ts_1.pow2)(t1, _6n, P2) * b22 % P2;\n const root = (0, modular_ts_1.pow2)(t22, _2n8, P2);\n if (!Fpk13.eql(Fpk13.sqr(root), y6))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n var Fpk13 = (0, modular_ts_1.Field)(secp256k1_CURVE2.p, { sqrt: sqrtMod3 });\n exports3.secp256k1 = (0, _shortw_utils_ts_1.createCurve)({ ...secp256k1_CURVE2, Fp: Fpk13, lowS: true, endo: secp256k1_ENDO2 }, sha2_js_1.sha256);\n var TAGGED_HASH_PREFIXES2 = {};\n function taggedHash2(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES2[tag];\n if (tagP === void 0) {\n const tagH = (0, sha2_js_1.sha256)((0, utils_ts_1.utf8ToBytes)(tag));\n tagP = (0, utils_ts_1.concatBytes)(tagH, tagH);\n TAGGED_HASH_PREFIXES2[tag] = tagP;\n }\n return (0, sha2_js_1.sha256)((0, utils_ts_1.concatBytes)(tagP, ...messages));\n }\n var pointToBytes2 = (point) => point.toBytes(true).slice(1);\n var Pointk1 = /* @__PURE__ */ (() => exports3.secp256k1.Point)();\n var hasEven = (y6) => y6 % _2n8 === _0n11;\n function schnorrGetExtPubKey2(priv) {\n const { Fn, BASE } = Pointk1;\n const d_ = (0, weierstrass_ts_1._normFnElement)(Fn, priv);\n const p4 = BASE.multiply(d_);\n const scalar = hasEven(p4.y) ? d_ : Fn.neg(d_);\n return { scalar, bytes: pointToBytes2(p4) };\n }\n function lift_x2(x4) {\n const Fp = Fpk13;\n if (!Fp.isValidNot0(x4))\n throw new Error(\"invalid x: Fail if x \\u2265 p\");\n const xx = Fp.create(x4 * x4);\n const c4 = Fp.create(xx * x4 + BigInt(7));\n let y6 = Fp.sqrt(c4);\n if (!hasEven(y6))\n y6 = Fp.neg(y6);\n const p4 = Pointk1.fromAffine({ x: x4, y: y6 });\n p4.assertValidity();\n return p4;\n }\n var num2 = utils_ts_1.bytesToNumberBE;\n function challenge2(...args) {\n return Pointk1.Fn.create(num2(taggedHash2(\"BIP0340/challenge\", ...args)));\n }\n function schnorrGetPublicKey2(secretKey) {\n return schnorrGetExtPubKey2(secretKey).bytes;\n }\n function schnorrSign2(message2, secretKey, auxRand = (0, utils_js_1.randomBytes)(32)) {\n const { Fn } = Pointk1;\n const m2 = (0, utils_ts_1.ensureBytes)(\"message\", message2);\n const { bytes: px, scalar: d5 } = schnorrGetExtPubKey2(secretKey);\n const a3 = (0, utils_ts_1.ensureBytes)(\"auxRand\", auxRand, 32);\n const t3 = Fn.toBytes(d5 ^ num2(taggedHash2(\"BIP0340/aux\", a3)));\n const rand = taggedHash2(\"BIP0340/nonce\", t3, px, m2);\n const { bytes: rx, scalar: k4 } = schnorrGetExtPubKey2(rand);\n const e2 = challenge2(rx, px, m2);\n const sig = new Uint8Array(64);\n sig.set(rx, 0);\n sig.set(Fn.toBytes(Fn.create(k4 + e2 * d5)), 32);\n if (!schnorrVerify2(sig, m2, px))\n throw new Error(\"sign: Invalid signature produced\");\n return sig;\n }\n function schnorrVerify2(signature, message2, publicKey) {\n const { Fn, BASE } = Pointk1;\n const sig = (0, utils_ts_1.ensureBytes)(\"signature\", signature, 64);\n const m2 = (0, utils_ts_1.ensureBytes)(\"message\", message2);\n const pub = (0, utils_ts_1.ensureBytes)(\"publicKey\", publicKey, 32);\n try {\n const P2 = lift_x2(num2(pub));\n const r2 = num2(sig.subarray(0, 32));\n if (!(0, utils_ts_1.inRange)(r2, _1n11, secp256k1_CURVE2.p))\n return false;\n const s4 = num2(sig.subarray(32, 64));\n if (!(0, utils_ts_1.inRange)(s4, _1n11, secp256k1_CURVE2.n))\n return false;\n const e2 = challenge2(Fn.toBytes(r2), pointToBytes2(P2), m2);\n const R3 = BASE.multiplyUnsafe(s4).add(P2.multiplyUnsafe(Fn.neg(e2)));\n const { x: x4, y: y6 } = R3.toAffine();\n if (R3.is0() || !hasEven(y6) || x4 !== r2)\n return false;\n return true;\n } catch (error) {\n return false;\n }\n }\n exports3.schnorr = (() => {\n const size6 = 32;\n const seedLength = 48;\n const randomSecretKey = (seed = (0, utils_js_1.randomBytes)(seedLength)) => {\n return (0, modular_ts_1.mapHashToField)(seed, secp256k1_CURVE2.n);\n };\n exports3.secp256k1.utils.randomSecretKey;\n function keygen(seed) {\n const secretKey = randomSecretKey(seed);\n return { secretKey, publicKey: schnorrGetPublicKey2(secretKey) };\n }\n return {\n keygen,\n getPublicKey: schnorrGetPublicKey2,\n sign: schnorrSign2,\n verify: schnorrVerify2,\n Point: Pointk1,\n utils: {\n randomSecretKey,\n randomPrivateKey: randomSecretKey,\n taggedHash: taggedHash2,\n // TODO: remove\n lift_x: lift_x2,\n pointToBytes: pointToBytes2,\n numberToBytesBE: utils_ts_1.numberToBytesBE,\n bytesToNumberBE: utils_ts_1.bytesToNumberBE,\n mod: modular_ts_1.mod\n },\n lengths: {\n secretKey: size6,\n publicKey: size6,\n publicKeyHasPrefix: false,\n signature: size6 * 2,\n seed: seedLength\n }\n };\n })();\n var isoMap2 = /* @__PURE__ */ (() => (0, hash_to_curve_ts_1.isogenyMap)(Fpk13, [\n // xNum\n [\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7\",\n \"0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581\",\n \"0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262\",\n \"0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c\"\n ],\n // xDen\n [\n \"0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b\",\n \"0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ],\n // yNum\n [\n \"0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c\",\n \"0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3\",\n \"0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931\",\n \"0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84\"\n ],\n // yDen\n [\n \"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b\",\n \"0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573\",\n \"0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f\",\n \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n // LAST 1\n ]\n ].map((i3) => i3.map((j2) => BigInt(j2)))))();\n var mapSWU2 = /* @__PURE__ */ (() => (0, weierstrass_ts_1.mapToCurveSimpleSWU)(Fpk13, {\n A: BigInt(\"0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533\"),\n B: BigInt(\"1771\"),\n Z: Fpk13.create(BigInt(\"-11\"))\n }))();\n exports3.secp256k1_hasher = (() => (0, hash_to_curve_ts_1.createHasher)(exports3.secp256k1.Point, (scalars) => {\n const { x: x4, y: y6 } = mapSWU2(Fpk13.create(scalars[0]));\n return isoMap2(x4, y6);\n }, {\n DST: \"secp256k1_XMD:SHA-256_SSWU_RO_\",\n encodeDST: \"secp256k1_XMD:SHA-256_SSWU_NU_\",\n p: Fpk13.ORDER,\n m: 1,\n k: 128,\n expand: \"xmd\",\n hash: sha2_js_1.sha256\n }))();\n exports3.hashToCurve = (() => exports3.secp256k1_hasher.hashToCurve)();\n exports3.encodeToCurve = (() => exports3.secp256k1_hasher.encodeToCurve)();\n }\n });\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.cjs.js\n var require_index_browser_cjs = __commonJS({\n \"../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.cjs.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var buffer2 = (init_buffer(), __toCommonJS(buffer_exports));\n var ed25519 = require_ed25519();\n var BN = require_bn();\n var bs58 = require_bs58();\n var sha2564 = require_sha2562();\n var borsh = require_lib38();\n var BufferLayout = require_Layout();\n var codecsNumbers = require_index_browser3();\n var superstruct = require_dist5();\n var RpcClient = require_browser2();\n var rpcWebsockets = require_index_browser4();\n var sha3 = require_sha33();\n var secp256k13 = require_secp256k13();\n function _interopDefaultCompat(e2) {\n return e2 && typeof e2 === \"object\" && \"default\" in e2 ? e2 : { default: e2 };\n }\n function _interopNamespaceCompat(e2) {\n if (e2 && typeof e2 === \"object\" && \"default\" in e2)\n return e2;\n var n2 = /* @__PURE__ */ Object.create(null);\n if (e2) {\n Object.keys(e2).forEach(function(k4) {\n if (k4 !== \"default\") {\n var d5 = Object.getOwnPropertyDescriptor(e2, k4);\n Object.defineProperty(n2, k4, d5.get ? d5 : {\n enumerable: true,\n get: function() {\n return e2[k4];\n }\n });\n }\n });\n }\n n2.default = e2;\n return Object.freeze(n2);\n }\n var BN__default = /* @__PURE__ */ _interopDefaultCompat(BN);\n var bs58__default = /* @__PURE__ */ _interopDefaultCompat(bs58);\n var BufferLayout__namespace = /* @__PURE__ */ _interopNamespaceCompat(BufferLayout);\n var RpcClient__default = /* @__PURE__ */ _interopDefaultCompat(RpcClient);\n var generatePrivateKey2 = ed25519.ed25519.utils.randomPrivateKey;\n var generateKeypair = () => {\n const privateScalar = ed25519.ed25519.utils.randomPrivateKey();\n const publicKey2 = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey2, 32);\n return {\n publicKey: publicKey2,\n secretKey\n };\n };\n var getPublicKey = ed25519.ed25519.getPublicKey;\n function isOnCurve(publicKey2) {\n try {\n ed25519.ed25519.ExtendedPoint.fromHex(publicKey2);\n return true;\n } catch {\n return false;\n }\n }\n var sign4 = (message2, secretKey) => ed25519.ed25519.sign(message2, secretKey.slice(0, 32));\n var verify2 = ed25519.ed25519.verify;\n var toBuffer = (arr) => {\n if (buffer2.Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return buffer2.Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return buffer2.Buffer.from(arr);\n }\n };\n var Struct = class {\n constructor(properties) {\n Object.assign(this, properties);\n }\n encode() {\n return buffer2.Buffer.from(borsh.serialize(SOLANA_SCHEMA, this));\n }\n static decode(data) {\n return borsh.deserialize(SOLANA_SCHEMA, this, data);\n }\n static decodeUnchecked(data) {\n return borsh.deserializeUnchecked(SOLANA_SCHEMA, this, data);\n }\n };\n var Enum = class extends Struct {\n constructor(properties) {\n super(properties);\n this.enum = \"\";\n if (Object.keys(properties).length !== 1) {\n throw new Error(\"Enum can only take single value\");\n }\n Object.keys(properties).map((key) => {\n this.enum = key;\n });\n }\n };\n var SOLANA_SCHEMA = /* @__PURE__ */ new Map();\n var _PublicKey;\n var MAX_SEED_LENGTH = 32;\n var PUBLIC_KEY_LENGTH = 32;\n function isPublicKeyData(value) {\n return value._bn !== void 0;\n }\n var uniquePublicKeyCounter = 1;\n var PublicKey = class _PublicKey2 extends Struct {\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value) {\n super({});\n this._bn = void 0;\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === \"string\") {\n const decoded = bs58__default.default.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new BN__default.default(decoded);\n } else {\n this._bn = new BN__default.default(value);\n }\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique() {\n const key = new _PublicKey2(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new _PublicKey2(key.toBuffer());\n }\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey2) {\n return this._bn.eq(publicKey2._bn);\n }\n /**\n * Return the base-58 representation of the public key\n */\n toBase58() {\n return bs58__default.default.encode(this.toBytes());\n }\n toJSON() {\n return this.toBase58();\n }\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes() {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer() {\n const b4 = this._bn.toArrayLike(buffer2.Buffer);\n if (b4.length === PUBLIC_KEY_LENGTH) {\n return b4;\n }\n const zeroPad = buffer2.Buffer.alloc(32);\n b4.copy(zeroPad, 32 - b4.length);\n return zeroPad;\n }\n get [Symbol.toStringTag]() {\n return `PublicKey(${this.toString()})`;\n }\n /**\n * Return the base-58 representation of the public key\n */\n toString() {\n return this.toBase58();\n }\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(fromPublicKey2, seed, programId) {\n const buffer$1 = buffer2.Buffer.concat([fromPublicKey2.toBuffer(), buffer2.Buffer.from(seed), programId.toBuffer()]);\n const publicKeyBytes = sha2564.sha256(buffer$1);\n return new _PublicKey2(publicKeyBytes);\n }\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(seeds, programId) {\n let buffer$1 = buffer2.Buffer.alloc(0);\n seeds.forEach(function(seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer$1 = buffer2.Buffer.concat([buffer$1, toBuffer(seed)]);\n });\n buffer$1 = buffer2.Buffer.concat([buffer$1, programId.toBuffer(), buffer2.Buffer.from(\"ProgramDerivedAddress\")]);\n const publicKeyBytes = sha2564.sha256(buffer$1);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new _PublicKey2(publicKeyBytes);\n }\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(seeds, programId) {\n return this.createProgramAddressSync(seeds, programId);\n }\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(seeds, programId) {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(buffer2.Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(seeds, programId) {\n return this.findProgramAddressSync(seeds, programId);\n }\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData) {\n const pubkey = new _PublicKey2(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n };\n _PublicKey = PublicKey;\n PublicKey.default = new _PublicKey(\"11111111111111111111111111111111\");\n SOLANA_SCHEMA.set(PublicKey, {\n kind: \"struct\",\n fields: [[\"_bn\", \"u256\"]]\n });\n var Account = class {\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey) {\n this._publicKey = void 0;\n this._secretKey = void 0;\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error(\"bad secret key size\");\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey2());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n /**\n * The public key for this account\n */\n get publicKey() {\n return new PublicKey(this._publicKey);\n }\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey() {\n return buffer2.Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n };\n var BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\"BPFLoader1111111111111111111111111111111111\");\n var PACKET_DATA_SIZE = 1280 - 40 - 8;\n var VERSION_PREFIX_MASK = 127;\n var SIGNATURE_LENGTH_IN_BYTES = 64;\n var TransactionExpiredBlockheightExceededError = class extends Error {\n constructor(signature2) {\n super(`Signature ${signature2} has expired: block height exceeded.`);\n this.signature = void 0;\n this.signature = signature2;\n }\n };\n Object.defineProperty(TransactionExpiredBlockheightExceededError.prototype, \"name\", {\n value: \"TransactionExpiredBlockheightExceededError\"\n });\n var TransactionExpiredTimeoutError = class extends Error {\n constructor(signature2, timeoutSeconds) {\n super(`Transaction was not confirmed in ${timeoutSeconds.toFixed(2)} seconds. It is unknown if it succeeded or failed. Check signature ${signature2} using the Solana Explorer or CLI tools.`);\n this.signature = void 0;\n this.signature = signature2;\n }\n };\n Object.defineProperty(TransactionExpiredTimeoutError.prototype, \"name\", {\n value: \"TransactionExpiredTimeoutError\"\n });\n var TransactionExpiredNonceInvalidError = class extends Error {\n constructor(signature2) {\n super(`Signature ${signature2} has expired: the nonce is no longer valid.`);\n this.signature = void 0;\n this.signature = signature2;\n }\n };\n Object.defineProperty(TransactionExpiredNonceInvalidError.prototype, \"name\", {\n value: \"TransactionExpiredNonceInvalidError\"\n });\n var MessageAccountKeys = class {\n constructor(staticAccountKeys, accountKeysFromLookups) {\n this.staticAccountKeys = void 0;\n this.accountKeysFromLookups = void 0;\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n keySegments() {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n get(index2) {\n for (const keySegment of this.keySegments()) {\n if (index2 < keySegment.length) {\n return keySegment[index2];\n } else {\n index2 -= keySegment.length;\n }\n }\n return;\n }\n get length() {\n return this.keySegments().flat().length;\n }\n compileInstructions(instructions) {\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error(\"Account index overflow encountered during compilation\");\n }\n const keyIndexMap = /* @__PURE__ */ new Map();\n this.keySegments().flat().forEach((key, index2) => {\n keyIndexMap.set(key.toBase58(), index2);\n });\n const findKeyIndex = (key) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === void 0)\n throw new Error(\"Encountered an unknown instruction account key during compilation\");\n return keyIndex;\n };\n return instructions.map((instruction) => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map((meta) => findKeyIndex(meta.pubkey)),\n data: instruction.data\n };\n });\n }\n };\n var publicKey = (property = \"publicKey\") => {\n return BufferLayout__namespace.blob(32, property);\n };\n var signature = (property = \"signature\") => {\n return BufferLayout__namespace.blob(64, property);\n };\n var rustString = (property = \"string\") => {\n const rsl = BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"length\"), BufferLayout__namespace.u32(\"lengthPadding\"), BufferLayout__namespace.blob(BufferLayout__namespace.offset(BufferLayout__namespace.u32(), -8), \"chars\")], property);\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n const rslShim = rsl;\n rslShim.decode = (b4, offset) => {\n const data = _decode(b4, offset);\n return data[\"chars\"].toString();\n };\n rslShim.encode = (str, b4, offset) => {\n const data = {\n chars: buffer2.Buffer.from(str, \"utf8\")\n };\n return _encode(data, b4, offset);\n };\n rslShim.alloc = (str) => {\n return BufferLayout__namespace.u32().span + BufferLayout__namespace.u32().span + buffer2.Buffer.from(str, \"utf8\").length;\n };\n return rslShim;\n };\n var authorized = (property = \"authorized\") => {\n return BufferLayout__namespace.struct([publicKey(\"staker\"), publicKey(\"withdrawer\")], property);\n };\n var lockup = (property = \"lockup\") => {\n return BufferLayout__namespace.struct([BufferLayout__namespace.ns64(\"unixTimestamp\"), BufferLayout__namespace.ns64(\"epoch\"), publicKey(\"custodian\")], property);\n };\n var voteInit = (property = \"voteInit\") => {\n return BufferLayout__namespace.struct([publicKey(\"nodePubkey\"), publicKey(\"authorizedVoter\"), publicKey(\"authorizedWithdrawer\"), BufferLayout__namespace.u8(\"commission\")], property);\n };\n var voteAuthorizeWithSeedArgs = (property = \"voteAuthorizeWithSeedArgs\") => {\n return BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"voteAuthorizationType\"), publicKey(\"currentAuthorityDerivedKeyOwnerPubkey\"), rustString(\"currentAuthorityDerivedKeySeed\"), publicKey(\"newAuthorized\")], property);\n };\n function getAlloc(type, fields) {\n const getItemAlloc = (item) => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === \"function\") {\n return item.alloc(fields[item.property]);\n } else if (\"count\" in item && \"elementLayout\" in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if (\"fields\" in item) {\n return getAlloc({\n layout: item\n }, fields[item.property]);\n }\n return 0;\n };\n let alloc = 0;\n type.layout.fields.forEach((item) => {\n alloc += getItemAlloc(item);\n });\n return alloc;\n }\n function decodeLength(bytes) {\n let len = 0;\n let size6 = 0;\n for (; ; ) {\n let elem = bytes.shift();\n len |= (elem & 127) << size6 * 7;\n size6 += 1;\n if ((elem & 128) === 0) {\n break;\n }\n }\n return len;\n }\n function encodeLength(bytes, len) {\n let rem_len = len;\n for (; ; ) {\n let elem = rem_len & 127;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 128;\n bytes.push(elem);\n }\n }\n }\n function assert9(condition, message2) {\n if (!condition) {\n throw new Error(message2 || \"Assertion failed\");\n }\n }\n var CompiledKeys = class _CompiledKeys {\n constructor(payer, keyMetaMap) {\n this.payer = void 0;\n this.keyMetaMap = void 0;\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n static compile(instructions, payer) {\n const keyMetaMap = /* @__PURE__ */ new Map();\n const getOrInsertDefault = (pubkey) => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === void 0) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n return new _CompiledKeys(payer, keyMetaMap);\n }\n getMessageComponents() {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert9(mapEntries.length <= 256, \"Max static account keys length exceeded\");\n const writableSigners = mapEntries.filter(([, meta]) => meta.isSigner && meta.isWritable);\n const readonlySigners = mapEntries.filter(([, meta]) => meta.isSigner && !meta.isWritable);\n const writableNonSigners = mapEntries.filter(([, meta]) => !meta.isSigner && meta.isWritable);\n const readonlyNonSigners = mapEntries.filter(([, meta]) => !meta.isSigner && !meta.isWritable);\n const header = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length\n };\n {\n assert9(writableSigners.length > 0, \"Expected at least one writable signer key\");\n const [payerAddress] = writableSigners[0];\n assert9(payerAddress === this.payer.toBase58(), \"Expected first writable signer key to be the fee payer\");\n }\n const staticAccountKeys = [...writableSigners.map(([address]) => new PublicKey(address)), ...readonlySigners.map(([address]) => new PublicKey(address)), ...writableNonSigners.map(([address]) => new PublicKey(address)), ...readonlyNonSigners.map(([address]) => new PublicKey(address))];\n return [header, staticAccountKeys];\n }\n extractTableLookup(lookupTable) {\n const [writableIndexes, drainedWritableKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, (keyMeta) => !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable);\n const [readonlyIndexes, drainedReadonlyKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, (keyMeta) => !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable);\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n return [{\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes\n }, {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys\n }];\n }\n /** @internal */\n drainKeysFoundInLookupTable(lookupTableEntries, keyMetaFilter) {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex((entry) => entry.equals(key));\n if (lookupTableIndex >= 0) {\n assert9(lookupTableIndex < 256, \"Max lookup table index exceeded\");\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n return [lookupTableIndexes, drainedKeys];\n }\n };\n var END_OF_BUFFER_ERROR_MESSAGE = \"Reached end of buffer unexpectedly\";\n function guardedShift(byteArray) {\n if (byteArray.length === 0) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.shift();\n }\n function guardedSplice(byteArray, ...args) {\n const [start] = args;\n if (args.length === 2 ? start + (args[1] ?? 0) > byteArray.length : start >= byteArray.length) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.splice(...args);\n }\n var Message = class _Message {\n constructor(args) {\n this.header = void 0;\n this.accountKeys = void 0;\n this.recentBlockhash = void 0;\n this.instructions = void 0;\n this.indexToProgramIds = /* @__PURE__ */ new Map();\n this.header = args.header;\n this.accountKeys = args.accountKeys.map((account) => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach((ix) => this.indexToProgramIds.set(ix.programIdIndex, this.accountKeys[ix.programIdIndex]));\n }\n get version() {\n return \"legacy\";\n }\n get staticAccountKeys() {\n return this.accountKeys;\n }\n get compiledInstructions() {\n return this.instructions.map((ix) => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58__default.default.decode(ix.data)\n }));\n }\n get addressTableLookups() {\n return [];\n }\n getAccountKeys() {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n static compile(args) {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map((ix) => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58__default.default.encode(ix.data)\n }));\n return new _Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions\n });\n }\n isAccountSigner(index2) {\n return index2 < this.header.numRequiredSignatures;\n }\n isAccountWritable(index2) {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index2 >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index2 - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts = numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts = numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index2 < numWritableSignedAccounts;\n }\n }\n isProgramId(index2) {\n return this.indexToProgramIds.has(index2);\n }\n programIds() {\n return [...this.indexToProgramIds.values()];\n }\n nonProgramIds() {\n return this.accountKeys.filter((_2, index2) => !this.isProgramId(index2));\n }\n serialize() {\n const numKeys = this.accountKeys.length;\n let keyCount = [];\n encodeLength(keyCount, numKeys);\n const instructions = this.instructions.map((instruction) => {\n const {\n accounts,\n programIdIndex\n } = instruction;\n const data = Array.from(bs58__default.default.decode(instruction.data));\n let keyIndicesCount = [];\n encodeLength(keyIndicesCount, accounts.length);\n let dataCount = [];\n encodeLength(dataCount, data.length);\n return {\n programIdIndex,\n keyIndicesCount: buffer2.Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: buffer2.Buffer.from(dataCount),\n data\n };\n });\n let instructionCount = [];\n encodeLength(instructionCount, instructions.length);\n let instructionBuffer = buffer2.Buffer.alloc(PACKET_DATA_SIZE);\n buffer2.Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n instructions.forEach((instruction) => {\n const instructionLayout = BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"programIdIndex\"), BufferLayout__namespace.blob(instruction.keyIndicesCount.length, \"keyIndicesCount\"), BufferLayout__namespace.seq(BufferLayout__namespace.u8(\"keyIndex\"), instruction.keyIndices.length, \"keyIndices\"), BufferLayout__namespace.blob(instruction.dataLength.length, \"dataLength\"), BufferLayout__namespace.seq(BufferLayout__namespace.u8(\"userdatum\"), instruction.data.length, \"data\")]);\n const length2 = instructionLayout.encode(instruction, instructionBuffer, instructionBufferLength);\n instructionBufferLength += length2;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n const signDataLayout = BufferLayout__namespace.struct([BufferLayout__namespace.blob(1, \"numRequiredSignatures\"), BufferLayout__namespace.blob(1, \"numReadonlySignedAccounts\"), BufferLayout__namespace.blob(1, \"numReadonlyUnsignedAccounts\"), BufferLayout__namespace.blob(keyCount.length, \"keyCount\"), BufferLayout__namespace.seq(publicKey(\"key\"), numKeys, \"keys\"), publicKey(\"recentBlockhash\")]);\n const transaction = {\n numRequiredSignatures: buffer2.Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: buffer2.Buffer.from([this.header.numReadonlySignedAccounts]),\n numReadonlyUnsignedAccounts: buffer2.Buffer.from([this.header.numReadonlyUnsignedAccounts]),\n keyCount: buffer2.Buffer.from(keyCount),\n keys: this.accountKeys.map((key) => toBuffer(key.toBytes())),\n recentBlockhash: bs58__default.default.decode(this.recentBlockhash)\n };\n let signData = buffer2.Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer$1) {\n let byteArray = [...buffer$1];\n const numRequiredSignatures = guardedShift(byteArray);\n if (numRequiredSignatures !== (numRequiredSignatures & VERSION_PREFIX_MASK)) {\n throw new Error(\"Versioned messages must be deserialized with VersionedMessage.deserialize()\");\n }\n const numReadonlySignedAccounts = guardedShift(byteArray);\n const numReadonlyUnsignedAccounts = guardedShift(byteArray);\n const accountCount = decodeLength(byteArray);\n let accountKeys = [];\n for (let i3 = 0; i3 < accountCount; i3++) {\n const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(buffer2.Buffer.from(account)));\n }\n const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n const instructionCount = decodeLength(byteArray);\n let instructions = [];\n for (let i3 = 0; i3 < instructionCount; i3++) {\n const programIdIndex = guardedShift(byteArray);\n const accountCount2 = decodeLength(byteArray);\n const accounts = guardedSplice(byteArray, 0, accountCount2);\n const dataLength = decodeLength(byteArray);\n const dataSlice = guardedSplice(byteArray, 0, dataLength);\n const data = bs58__default.default.encode(buffer2.Buffer.from(dataSlice));\n instructions.push({\n programIdIndex,\n accounts,\n data\n });\n }\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n },\n recentBlockhash: bs58__default.default.encode(buffer2.Buffer.from(recentBlockhash)),\n accountKeys,\n instructions\n };\n return new _Message(messageArgs);\n }\n };\n var MessageV0 = class _MessageV0 {\n constructor(args) {\n this.header = void 0;\n this.staticAccountKeys = void 0;\n this.recentBlockhash = void 0;\n this.compiledInstructions = void 0;\n this.addressTableLookups = void 0;\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n get version() {\n return 0;\n }\n get numAccountKeysFromLookups() {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n getAccountKeys(args) {\n let accountKeysFromLookups;\n if (args && \"accountKeysFromLookups\" in args && args.accountKeysFromLookups) {\n if (this.numAccountKeysFromLookups != args.accountKeysFromLookups.writable.length + args.accountKeysFromLookups.readonly.length) {\n throw new Error(\"Failed to get account keys because of a mismatch in the number of account keys from lookups\");\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (args && \"addressLookupTableAccounts\" in args && args.addressLookupTableAccounts) {\n accountKeysFromLookups = this.resolveAddressTableLookups(args.addressLookupTableAccounts);\n } else if (this.addressTableLookups.length > 0) {\n throw new Error(\"Failed to get account keys because address table lookups were not resolved\");\n }\n return new MessageAccountKeys(this.staticAccountKeys, accountKeysFromLookups);\n }\n isAccountSigner(index2) {\n return index2 < this.header.numRequiredSignatures;\n }\n isAccountWritable(index2) {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index2 >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index2 - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce((count, lookup) => count + lookup.writableIndexes.length, 0);\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index2 >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index2 - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts = numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts = numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index2 < numWritableSignedAccounts;\n }\n }\n resolveAddressTableLookups(addressLookupTableAccounts) {\n const accountKeysFromLookups = {\n writable: [],\n readonly: []\n };\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find((account) => account.key.equals(tableLookup.accountKey));\n if (!tableAccount) {\n throw new Error(`Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`);\n }\n for (const index2 of tableLookup.writableIndexes) {\n if (index2 < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(tableAccount.state.addresses[index2]);\n } else {\n throw new Error(`Failed to find address for index ${index2} in address lookup table ${tableLookup.accountKey.toBase58()}`);\n }\n }\n for (const index2 of tableLookup.readonlyIndexes) {\n if (index2 < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(tableAccount.state.addresses[index2]);\n } else {\n throw new Error(`Failed to find address for index ${index2} in address lookup table ${tableLookup.accountKey.toBase58()}`);\n }\n }\n }\n return accountKeysFromLookups;\n }\n static compile(args) {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const addressTableLookups = new Array();\n const accountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array()\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== void 0) {\n const [addressTableLookup, {\n writable,\n readonly\n }] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys, accountKeysFromLookups);\n const compiledInstructions = accountKeys.compileInstructions(args.instructions);\n return new _MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups\n });\n }\n serialize() {\n const encodedStaticAccountKeysLength = Array();\n encodeLength(encodedStaticAccountKeysLength, this.staticAccountKeys.length);\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n encodeLength(encodedInstructionsLength, this.compiledInstructions.length);\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n encodeLength(encodedAddressTableLookupsLength, this.addressTableLookups.length);\n const messageLayout = BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"prefix\"), BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"numRequiredSignatures\"), BufferLayout__namespace.u8(\"numReadonlySignedAccounts\"), BufferLayout__namespace.u8(\"numReadonlyUnsignedAccounts\")], \"header\"), BufferLayout__namespace.blob(encodedStaticAccountKeysLength.length, \"staticAccountKeysLength\"), BufferLayout__namespace.seq(publicKey(), this.staticAccountKeys.length, \"staticAccountKeys\"), publicKey(\"recentBlockhash\"), BufferLayout__namespace.blob(encodedInstructionsLength.length, \"instructionsLength\"), BufferLayout__namespace.blob(serializedInstructions.length, \"serializedInstructions\"), BufferLayout__namespace.blob(encodedAddressTableLookupsLength.length, \"addressTableLookupsLength\"), BufferLayout__namespace.blob(serializedAddressTableLookups.length, \"serializedAddressTableLookups\")]);\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode({\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map((key) => key.toBytes()),\n recentBlockhash: bs58__default.default.decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(encodedAddressTableLookupsLength),\n serializedAddressTableLookups\n }, serializedMessage);\n return serializedMessage.slice(0, serializedMessageLength);\n }\n serializeInstructions() {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n encodeLength(encodedAccountKeyIndexesLength, instruction.accountKeyIndexes.length);\n const encodedDataLength = Array();\n encodeLength(encodedDataLength, instruction.data.length);\n const instructionLayout = BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"programIdIndex\"), BufferLayout__namespace.blob(encodedAccountKeyIndexesLength.length, \"encodedAccountKeyIndexesLength\"), BufferLayout__namespace.seq(BufferLayout__namespace.u8(), instruction.accountKeyIndexes.length, \"accountKeyIndexes\"), BufferLayout__namespace.blob(encodedDataLength.length, \"encodedDataLength\"), BufferLayout__namespace.blob(instruction.data.length, \"data\")]);\n serializedLength += instructionLayout.encode({\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(encodedAccountKeyIndexesLength),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data\n }, serializedInstructions, serializedLength);\n }\n return serializedInstructions.slice(0, serializedLength);\n }\n serializeAddressTableLookups() {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n encodeLength(encodedWritableIndexesLength, lookup.writableIndexes.length);\n const encodedReadonlyIndexesLength = Array();\n encodeLength(encodedReadonlyIndexesLength, lookup.readonlyIndexes.length);\n const addressTableLookupLayout = BufferLayout__namespace.struct([publicKey(\"accountKey\"), BufferLayout__namespace.blob(encodedWritableIndexesLength.length, \"encodedWritableIndexesLength\"), BufferLayout__namespace.seq(BufferLayout__namespace.u8(), lookup.writableIndexes.length, \"writableIndexes\"), BufferLayout__namespace.blob(encodedReadonlyIndexesLength.length, \"encodedReadonlyIndexesLength\"), BufferLayout__namespace.seq(BufferLayout__namespace.u8(), lookup.readonlyIndexes.length, \"readonlyIndexes\")]);\n serializedLength += addressTableLookupLayout.encode({\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(encodedWritableIndexesLength),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(encodedReadonlyIndexesLength),\n readonlyIndexes: lookup.readonlyIndexes\n }, serializedAddressTableLookups, serializedLength);\n }\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n static deserialize(serializedMessage) {\n let byteArray = [...serializedMessage];\n const prefix = guardedShift(byteArray);\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert9(prefix !== maskedPrefix, `Expected versioned message but received legacy message`);\n const version7 = maskedPrefix;\n assert9(version7 === 0, `Expected versioned message with version 0 but found version ${version7}`);\n const header = {\n numRequiredSignatures: guardedShift(byteArray),\n numReadonlySignedAccounts: guardedShift(byteArray),\n numReadonlyUnsignedAccounts: guardedShift(byteArray)\n };\n const staticAccountKeys = [];\n const staticAccountKeysLength = decodeLength(byteArray);\n for (let i3 = 0; i3 < staticAccountKeysLength; i3++) {\n staticAccountKeys.push(new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)));\n }\n const recentBlockhash = bs58__default.default.encode(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));\n const instructionCount = decodeLength(byteArray);\n const compiledInstructions = [];\n for (let i3 = 0; i3 < instructionCount; i3++) {\n const programIdIndex = guardedShift(byteArray);\n const accountKeyIndexesLength = decodeLength(byteArray);\n const accountKeyIndexes = guardedSplice(byteArray, 0, accountKeyIndexesLength);\n const dataLength = decodeLength(byteArray);\n const data = new Uint8Array(guardedSplice(byteArray, 0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data\n });\n }\n const addressTableLookupsCount = decodeLength(byteArray);\n const addressTableLookups = [];\n for (let i3 = 0; i3 < addressTableLookupsCount; i3++) {\n const accountKey = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));\n const writableIndexesLength = decodeLength(byteArray);\n const writableIndexes = guardedSplice(byteArray, 0, writableIndexesLength);\n const readonlyIndexesLength = decodeLength(byteArray);\n const readonlyIndexes = guardedSplice(byteArray, 0, readonlyIndexesLength);\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes\n });\n }\n return new _MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups\n });\n }\n };\n var VersionedMessage = {\n deserializeMessageVersion(serializedMessage) {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n if (maskedPrefix === prefix) {\n return \"legacy\";\n }\n return maskedPrefix;\n },\n deserialize: (serializedMessage) => {\n const version7 = VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version7 === \"legacy\") {\n return Message.from(serializedMessage);\n }\n if (version7 === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(`Transaction message version ${version7} deserialization is not supported`);\n }\n }\n };\n var TransactionStatus = /* @__PURE__ */ function(TransactionStatus2) {\n TransactionStatus2[TransactionStatus2[\"BLOCKHEIGHT_EXCEEDED\"] = 0] = \"BLOCKHEIGHT_EXCEEDED\";\n TransactionStatus2[TransactionStatus2[\"PROCESSED\"] = 1] = \"PROCESSED\";\n TransactionStatus2[TransactionStatus2[\"TIMED_OUT\"] = 2] = \"TIMED_OUT\";\n TransactionStatus2[TransactionStatus2[\"NONCE_INVALID\"] = 3] = \"NONCE_INVALID\";\n return TransactionStatus2;\n }({});\n var DEFAULT_SIGNATURE = buffer2.Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n var TransactionInstruction = class {\n constructor(opts) {\n this.keys = void 0;\n this.programId = void 0;\n this.data = buffer2.Buffer.alloc(0);\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n /**\n * @internal\n */\n toJSON() {\n return {\n keys: this.keys.map(({\n pubkey,\n isSigner,\n isWritable\n }) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable\n })),\n programId: this.programId.toJSON(),\n data: [...this.data]\n };\n }\n };\n var Transaction5 = class _Transaction {\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature() {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n /**\n * The transaction fee payer\n */\n // Construct a transaction with a blockhash and lastValidBlockHeight\n // Construct a transaction using a durable nonce\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n /**\n * Construct an empty Transaction\n */\n constructor(opts) {\n this.signatures = [];\n this.feePayer = void 0;\n this.instructions = [];\n this.recentBlockhash = void 0;\n this.lastValidBlockHeight = void 0;\n this.nonceInfo = void 0;\n this.minNonceContextSlot = void 0;\n this._message = void 0;\n this._json = void 0;\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, \"nonceInfo\")) {\n const {\n minContextSlot,\n nonceInfo\n } = opts;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (Object.prototype.hasOwnProperty.call(opts, \"lastValidBlockHeight\")) {\n const {\n blockhash,\n lastValidBlockHeight\n } = opts;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {\n recentBlockhash,\n nonceInfo\n } = opts;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n /**\n * @internal\n */\n toJSON() {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON()\n } : null,\n instructions: this.instructions.map((instruction) => instruction.toJSON()),\n signers: this.signatures.map(({\n publicKey: publicKey2\n }) => {\n return publicKey2.toJSON();\n })\n };\n }\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(...items) {\n if (items.length === 0) {\n throw new Error(\"No instructions\");\n }\n items.forEach((item) => {\n if (\"instructions\" in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if (\"data\" in item && \"programId\" in item && \"keys\" in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n /**\n * Compile transaction data\n */\n compileMessage() {\n if (this._message && JSON.stringify(this.toJSON()) === JSON.stringify(this._json)) {\n return this._message;\n }\n let recentBlockhash;\n let instructions;\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error(\"Transaction recentBlockhash required\");\n }\n if (instructions.length < 1) {\n console.warn(\"No instructions provided\");\n }\n let feePayer;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error(\"Transaction fee payer required\");\n }\n for (let i3 = 0; i3 < instructions.length; i3++) {\n if (instructions[i3].programId === void 0) {\n throw new Error(`Transaction instruction index ${i3} has undefined program id`);\n }\n }\n const programIds = [];\n const accountMetas = [];\n instructions.forEach((instruction) => {\n instruction.keys.forEach((accountMeta) => {\n accountMetas.push({\n ...accountMeta\n });\n });\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n programIds.forEach((programId) => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false\n });\n });\n const uniqueMetas = [];\n accountMetas.forEach((accountMeta) => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex((x4) => {\n return x4.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable = uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner = uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n uniqueMetas.sort(function(x4, y6) {\n if (x4.isSigner !== y6.isSigner) {\n return x4.isSigner ? -1 : 1;\n }\n if (x4.isWritable !== y6.isWritable) {\n return x4.isWritable ? -1 : 1;\n }\n const options = {\n localeMatcher: \"best fit\",\n usage: \"sort\",\n sensitivity: \"variant\",\n ignorePunctuation: false,\n numeric: false,\n caseFirst: \"lower\"\n };\n return x4.pubkey.toBase58().localeCompare(y6.pubkey.toBase58(), \"en\", options);\n });\n const feePayerIndex = uniqueMetas.findIndex((x4) => {\n return x4.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true\n });\n }\n for (const signature2 of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex((x4) => {\n return x4.pubkey.equals(signature2.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\"Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release.\");\n }\n } else {\n throw new Error(`unknown signer: ${signature2.publicKey.toString()}`);\n }\n }\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n const signedKeys = [];\n const unsignedKeys = [];\n uniqueMetas.forEach(({\n pubkey,\n isSigner,\n isWritable\n }) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions = instructions.map((instruction) => {\n const {\n data,\n programId\n } = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map((meta) => accountKeys.indexOf(meta.pubkey.toString())),\n data: bs58__default.default.encode(data)\n };\n });\n compiledInstructions.forEach((instruction) => {\n assert9(instruction.programIdIndex >= 0);\n instruction.accounts.forEach((keyIndex) => assert9(keyIndex >= 0));\n });\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions\n });\n }\n /**\n * @internal\n */\n _compile() {\n const message2 = this.compileMessage();\n const signedKeys = message2.accountKeys.slice(0, message2.header.numRequiredSignatures);\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index2) => {\n return signedKeys[index2].equals(pair.publicKey);\n });\n if (valid)\n return message2;\n }\n this.signatures = signedKeys.map((publicKey2) => ({\n signature: null,\n publicKey: publicKey2\n }));\n return message2;\n }\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage() {\n return this._compile().serialize();\n }\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection) {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers) {\n if (signers.length === 0) {\n throw new Error(\"No signers\");\n }\n const seen = /* @__PURE__ */ new Set();\n this.signatures = signers.filter((publicKey2) => {\n const key = publicKey2.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n }).map((publicKey2) => ({\n signature: null,\n publicKey: publicKey2\n }));\n }\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers) {\n if (signers.length === 0) {\n throw new Error(\"No signers\");\n }\n const seen = /* @__PURE__ */ new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n this.signatures = uniqueSigners.map((signer) => ({\n signature: null,\n publicKey: signer.publicKey\n }));\n const message2 = this._compile();\n this._partialSign(message2, ...uniqueSigners);\n }\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers) {\n if (signers.length === 0) {\n throw new Error(\"No signers\");\n }\n const seen = /* @__PURE__ */ new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n const message2 = this._compile();\n this._partialSign(message2, ...uniqueSigners);\n }\n /**\n * @internal\n */\n _partialSign(message2, ...signers) {\n const signData = message2.serialize();\n signers.forEach((signer) => {\n const signature2 = sign4(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature2));\n });\n }\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey, signature2) {\n this._compile();\n this._addSignature(pubkey, signature2);\n }\n /**\n * @internal\n */\n _addSignature(pubkey, signature2) {\n assert9(signature2.length === 64);\n const index2 = this.signatures.findIndex((sigpair) => pubkey.equals(sigpair.publicKey));\n if (index2 < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n this.signatures[index2].signature = buffer2.Buffer.from(signature2);\n }\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures = true) {\n const signatureErrors = this._getMessageSignednessErrors(this.serializeMessage(), requireAllSignatures);\n return !signatureErrors;\n }\n /**\n * @internal\n */\n _getMessageSignednessErrors(message2, requireAllSignatures) {\n const errors = {};\n for (const {\n signature: signature2,\n publicKey: publicKey2\n } of this.signatures) {\n if (signature2 === null) {\n if (requireAllSignatures) {\n (errors.missing ||= []).push(publicKey2);\n }\n } else {\n if (!verify2(signature2, message2, publicKey2.toBytes())) {\n (errors.invalid ||= []).push(publicKey2);\n }\n }\n }\n return errors.invalid || errors.missing ? errors : void 0;\n }\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config2) {\n const {\n requireAllSignatures,\n verifySignatures\n } = Object.assign({\n requireAllSignatures: true,\n verifySignatures: true\n }, config2);\n const signData = this.serializeMessage();\n if (verifySignatures) {\n const sigErrors = this._getMessageSignednessErrors(signData, requireAllSignatures);\n if (sigErrors) {\n let errorMessage = \"Signature verification failed.\";\n if (sigErrors.invalid) {\n errorMessage += `\nInvalid signature for public key${sigErrors.invalid.length === 1 ? \"\" : \"(s)\"} [\\`${sigErrors.invalid.map((p4) => p4.toBase58()).join(\"`, `\")}\\`].`;\n }\n if (sigErrors.missing) {\n errorMessage += `\nMissing signature for public key${sigErrors.missing.length === 1 ? \"\" : \"(s)\"} [\\`${sigErrors.missing.map((p4) => p4.toBase58()).join(\"`, `\")}\\`].`;\n }\n throw new Error(errorMessage);\n }\n }\n return this._serialize(signData);\n }\n /**\n * @internal\n */\n _serialize(signData) {\n const {\n signatures\n } = this;\n const signatureCount = [];\n encodeLength(signatureCount, signatures.length);\n const transactionLength = signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = buffer2.Buffer.alloc(transactionLength);\n assert9(signatures.length < 256);\n buffer2.Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({\n signature: signature2\n }, index2) => {\n if (signature2 !== null) {\n assert9(signature2.length === 64, `signature has invalid length`);\n buffer2.Buffer.from(signature2).copy(wireTransaction, signatureCount.length + index2 * 64);\n }\n });\n signData.copy(wireTransaction, signatureCount.length + signatures.length * 64);\n assert9(wireTransaction.length <= PACKET_DATA_SIZE, `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`);\n return wireTransaction;\n }\n /**\n * Deprecated method\n * @internal\n */\n get keys() {\n assert9(this.instructions.length === 1);\n return this.instructions[0].keys.map((keyObj) => keyObj.pubkey);\n }\n /**\n * Deprecated method\n * @internal\n */\n get programId() {\n assert9(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n /**\n * Deprecated method\n * @internal\n */\n get data() {\n assert9(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer$1) {\n let byteArray = [...buffer$1];\n const signatureCount = decodeLength(byteArray);\n let signatures = [];\n for (let i3 = 0; i3 < signatureCount; i3++) {\n const signature2 = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58__default.default.encode(buffer2.Buffer.from(signature2)));\n }\n return _Transaction.populate(Message.from(byteArray), signatures);\n }\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(message2, signatures = []) {\n const transaction = new _Transaction();\n transaction.recentBlockhash = message2.recentBlockhash;\n if (message2.header.numRequiredSignatures > 0) {\n transaction.feePayer = message2.accountKeys[0];\n }\n signatures.forEach((signature2, index2) => {\n const sigPubkeyPair = {\n signature: signature2 == bs58__default.default.encode(DEFAULT_SIGNATURE) ? null : bs58__default.default.decode(signature2),\n publicKey: message2.accountKeys[index2]\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n message2.instructions.forEach((instruction) => {\n const keys = instruction.accounts.map((account) => {\n const pubkey = message2.accountKeys[account];\n return {\n pubkey,\n isSigner: transaction.signatures.some((keyObj) => keyObj.publicKey.toString() === pubkey.toString()) || message2.isAccountSigner(account),\n isWritable: message2.isAccountWritable(account)\n };\n });\n transaction.instructions.push(new TransactionInstruction({\n keys,\n programId: message2.accountKeys[instruction.programIdIndex],\n data: bs58__default.default.decode(instruction.data)\n }));\n });\n transaction._message = message2;\n transaction._json = transaction.toJSON();\n return transaction;\n }\n };\n var TransactionMessage = class _TransactionMessage {\n constructor(args) {\n this.payerKey = void 0;\n this.instructions = void 0;\n this.recentBlockhash = void 0;\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n static decompile(message2, args) {\n const {\n header,\n compiledInstructions,\n recentBlockhash\n } = message2;\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n } = header;\n const numWritableSignedAccounts = numRequiredSignatures - numReadonlySignedAccounts;\n assert9(numWritableSignedAccounts > 0, \"Message header is invalid\");\n const numWritableUnsignedAccounts = message2.staticAccountKeys.length - numRequiredSignatures - numReadonlyUnsignedAccounts;\n assert9(numWritableUnsignedAccounts >= 0, \"Message header is invalid\");\n const accountKeys = message2.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === void 0) {\n throw new Error(\"Failed to decompile message because no account keys were found\");\n }\n const instructions = [];\n for (const compiledIx of compiledInstructions) {\n const keys = [];\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === void 0) {\n throw new Error(`Failed to find key for account key index ${keyIndex}`);\n }\n const isSigner = keyIndex < numRequiredSignatures;\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable = keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable = keyIndex - accountKeys.staticAccountKeys.length < // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups.writable.length;\n }\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable\n });\n }\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === void 0) {\n throw new Error(`Failed to find program id for program id index ${compiledIx.programIdIndex}`);\n }\n instructions.push(new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys\n }));\n }\n return new _TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash\n });\n }\n compileToLegacyMessage() {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions\n });\n }\n compileToV0Message(addressLookupTableAccounts) {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts\n });\n }\n };\n var VersionedTransaction4 = class _VersionedTransaction {\n get version() {\n return this.message.version;\n }\n constructor(message2, signatures) {\n this.signatures = void 0;\n this.message = void 0;\n if (signatures !== void 0) {\n assert9(signatures.length === message2.header.numRequiredSignatures, \"Expected signatures length to be equal to the number of required signatures\");\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i3 = 0; i3 < message2.header.numRequiredSignatures; i3++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message2;\n }\n serialize() {\n const serializedMessage = this.message.serialize();\n const encodedSignaturesLength = Array();\n encodeLength(encodedSignaturesLength, this.signatures.length);\n const transactionLayout = BufferLayout__namespace.struct([BufferLayout__namespace.blob(encodedSignaturesLength.length, \"encodedSignaturesLength\"), BufferLayout__namespace.seq(signature(), this.signatures.length, \"signatures\"), BufferLayout__namespace.blob(serializedMessage.length, \"serializedMessage\")]);\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode({\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage\n }, serializedTransaction);\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n static deserialize(serializedTransaction) {\n let byteArray = [...serializedTransaction];\n const signatures = [];\n const signaturesLength = decodeLength(byteArray);\n for (let i3 = 0; i3 < signaturesLength; i3++) {\n signatures.push(new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES)));\n }\n const message2 = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new _VersionedTransaction(message2, signatures);\n }\n sign(signers) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(0, this.message.header.numRequiredSignatures);\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex((pubkey) => pubkey.equals(signer.publicKey));\n assert9(signerIndex >= 0, `Cannot sign with non signer key ${signer.publicKey.toBase58()}`);\n this.signatures[signerIndex] = sign4(messageData, signer.secretKey);\n }\n }\n addSignature(publicKey2, signature2) {\n assert9(signature2.byteLength === 64, \"Signature must be 64 bytes long\");\n const signerPubkeys = this.message.staticAccountKeys.slice(0, this.message.header.numRequiredSignatures);\n const signerIndex = signerPubkeys.findIndex((pubkey) => pubkey.equals(publicKey2));\n assert9(signerIndex >= 0, `Can not add signature; \\`${publicKey2.toBase58()}\\` is not required to sign this transaction`);\n this.signatures[signerIndex] = signature2;\n }\n };\n var NUM_TICKS_PER_SECOND = 160;\n var DEFAULT_TICKS_PER_SLOT = 64;\n var NUM_SLOTS_PER_SECOND = NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n var MS_PER_SLOT = 1e3 / NUM_SLOTS_PER_SECOND;\n var SYSVAR_CLOCK_PUBKEY = new PublicKey(\"SysvarC1ock11111111111111111111111111111111\");\n var SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\"SysvarEpochSchedu1e111111111111111111111111\");\n var SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\"Sysvar1nstructions1111111111111111111111111\");\n var SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\"SysvarRecentB1ockHashes11111111111111111111\");\n var SYSVAR_RENT_PUBKEY = new PublicKey(\"SysvarRent111111111111111111111111111111111\");\n var SYSVAR_REWARDS_PUBKEY = new PublicKey(\"SysvarRewards111111111111111111111111111111\");\n var SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\"SysvarS1otHashes111111111111111111111111111\");\n var SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\"SysvarS1otHistory11111111111111111111111111\");\n var SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\"SysvarStakeHistory1111111111111111111111111\");\n var SendTransactionError = class extends Error {\n constructor({\n action,\n signature: signature2,\n transactionMessage,\n logs\n }) {\n const maybeLogsOutput = logs ? `Logs: \n${JSON.stringify(logs.slice(-10), null, 2)}. ` : \"\";\n const guideText = \"\\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.\";\n let message2;\n switch (action) {\n case \"send\":\n message2 = `Transaction ${signature2} resulted in an error. \n${transactionMessage}. ` + maybeLogsOutput + guideText;\n break;\n case \"simulate\":\n message2 = `Simulation failed. \nMessage: ${transactionMessage}. \n` + maybeLogsOutput + guideText;\n break;\n default: {\n message2 = `Unknown action '${/* @__PURE__ */ ((a3) => a3)(action)}'`;\n }\n }\n super(message2);\n this.signature = void 0;\n this.transactionMessage = void 0;\n this.transactionLogs = void 0;\n this.signature = signature2;\n this.transactionMessage = transactionMessage;\n this.transactionLogs = logs ? logs : void 0;\n }\n get transactionError() {\n return {\n message: this.transactionMessage,\n logs: Array.isArray(this.transactionLogs) ? this.transactionLogs : void 0\n };\n }\n /* @deprecated Use `await getLogs()` instead */\n get logs() {\n const cachedLogs = this.transactionLogs;\n if (cachedLogs != null && typeof cachedLogs === \"object\" && \"then\" in cachedLogs) {\n return void 0;\n }\n return cachedLogs;\n }\n async getLogs(connection) {\n if (!Array.isArray(this.transactionLogs)) {\n this.transactionLogs = new Promise((resolve, reject) => {\n connection.getTransaction(this.signature).then((tx) => {\n if (tx && tx.meta && tx.meta.logMessages) {\n const logs = tx.meta.logMessages;\n this.transactionLogs = logs;\n resolve(logs);\n } else {\n reject(new Error(\"Log messages not found\"));\n }\n }).catch(reject);\n });\n }\n return await this.transactionLogs;\n }\n };\n var SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016\n };\n var SolanaJSONRPCError = class extends Error {\n constructor({\n code,\n message: message2,\n data\n }, customMessage) {\n super(customMessage != null ? `${customMessage}: ${message2}` : message2);\n this.code = void 0;\n this.data = void 0;\n this.code = code;\n this.data = data;\n this.name = \"SolanaJSONRPCError\";\n }\n };\n async function sendAndConfirmTransaction(connection, transaction, signers, options) {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot\n };\n const signature2 = await connection.sendTransaction(transaction, signers, sendOptions);\n let status;\n if (transaction.recentBlockhash != null && transaction.lastValidBlockHeight != null) {\n status = (await connection.confirmTransaction({\n abortSignal: options?.abortSignal,\n signature: signature2,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight\n }, options && options.commitment)).value;\n } else if (transaction.minNonceContextSlot != null && transaction.nonceInfo != null) {\n const {\n nonceInstruction\n } = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (await connection.confirmTransaction({\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature: signature2\n }, options && options.commitment)).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\"sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.\");\n }\n status = (await connection.confirmTransaction(signature2, options && options.commitment)).value;\n }\n if (status.err) {\n if (signature2 != null) {\n throw new SendTransactionError({\n action: \"send\",\n signature: signature2,\n transactionMessage: `Status: (${JSON.stringify(status)})`\n });\n }\n throw new Error(`Transaction ${signature2} failed (${JSON.stringify(status)})`);\n }\n return signature2;\n }\n function sleep(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n function encodeData3(type, fields) {\n const allocLength = type.layout.span >= 0 ? type.layout.span : getAlloc(type, fields);\n const data = buffer2.Buffer.alloc(allocLength);\n const layoutFields = Object.assign({\n instruction: type.index\n }, fields);\n type.layout.encode(layoutFields, data);\n return data;\n }\n function decodeData$1(type, buffer3) {\n let data;\n try {\n data = type.layout.decode(buffer3);\n } catch (err) {\n throw new Error(\"invalid instruction; \" + err);\n }\n if (data.instruction !== type.index) {\n throw new Error(`invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`);\n }\n return data;\n }\n var FeeCalculatorLayout = BufferLayout__namespace.nu64(\"lamportsPerSignature\");\n var NonceAccountLayout = BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"version\"), BufferLayout__namespace.u32(\"state\"), publicKey(\"authorizedPubkey\"), publicKey(\"nonce\"), BufferLayout__namespace.struct([FeeCalculatorLayout], \"feeCalculator\")]);\n var NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n var NonceAccount = class _NonceAccount {\n /**\n * @internal\n */\n constructor(args) {\n this.authorizedPubkey = void 0;\n this.nonce = void 0;\n this.feeCalculator = void 0;\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(buffer3) {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer3), 0);\n return new _NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator\n });\n }\n };\n function u64(property) {\n const layout = BufferLayout.blob(8, property);\n const decode4 = layout.decode.bind(layout);\n const encode7 = layout.encode.bind(layout);\n const bigIntLayout = layout;\n const codec = codecsNumbers.getU64Codec();\n bigIntLayout.decode = (buffer3, offset) => {\n const src = decode4(buffer3, offset);\n return codec.decode(src);\n };\n bigIntLayout.encode = (bigInt, buffer3, offset) => {\n const src = codec.encode(bigInt);\n return encode7(src, buffer3, offset);\n };\n return bigIntLayout;\n }\n var SystemInstruction = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = BufferLayout__namespace.u32(\"instruction\");\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error(\"Instruction type incorrect; not a SystemInstruction\");\n }\n return type;\n }\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n lamports,\n space,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Create, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId)\n };\n }\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n lamports\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Transfer, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports\n };\n }\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n lamports,\n seed,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId)\n };\n }\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n space\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Allocate, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space\n };\n }\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n base: base4,\n seed,\n space,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base4),\n seed,\n space,\n programId: new PublicKey(programId)\n };\n }\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.Assign, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId)\n };\n }\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n const {\n base: base4,\n seed,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed, instruction.data);\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base4),\n seed,\n programId: new PublicKey(programId)\n };\n }\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n base: base4,\n seed,\n lamports,\n space,\n programId\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed, instruction.data);\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base4),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId)\n };\n }\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n authorized: authorized2\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized2)\n };\n }\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey\n };\n }\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {\n lamports\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports\n };\n }\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n authorized: authorized2\n } = decodeData$1(SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount, instruction.data);\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized2)\n };\n }\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error(\"invalid instruction; programId is not SystemProgram\");\n }\n }\n /**\n * @internal\n */\n static checkKeyLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n };\n var SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze({\n Create: {\n index: 0,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), BufferLayout__namespace.ns64(\"lamports\"), BufferLayout__namespace.ns64(\"space\"), publicKey(\"programId\")])\n },\n Assign: {\n index: 1,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), publicKey(\"programId\")])\n },\n Transfer: {\n index: 2,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), u64(\"lamports\")])\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), publicKey(\"base\"), rustString(\"seed\"), BufferLayout__namespace.ns64(\"lamports\"), BufferLayout__namespace.ns64(\"space\"), publicKey(\"programId\")])\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")])\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), BufferLayout__namespace.ns64(\"lamports\")])\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), publicKey(\"authorized\")])\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), publicKey(\"authorized\")])\n },\n Allocate: {\n index: 8,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), BufferLayout__namespace.ns64(\"space\")])\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), publicKey(\"base\"), rustString(\"seed\"), BufferLayout__namespace.ns64(\"space\"), publicKey(\"programId\")])\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), publicKey(\"base\"), rustString(\"seed\"), publicKey(\"programId\")])\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), u64(\"lamports\"), rustString(\"seed\"), publicKey(\"programId\")])\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")])\n }\n });\n var SystemProgram = class _SystemProgram {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the System program\n */\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData3(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.newAccountPubkey,\n isSigner: true,\n isWritable: true\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(params) {\n let data;\n let keys;\n if (\"basePubkey\" in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData3(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.fromPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData3(type, {\n lamports: BigInt(params.lamports)\n });\n keys = [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(params) {\n let data;\n let keys;\n if (\"basePubkey\" in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData3(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData3(type, {\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: true,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData3(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n let keys = [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.newAccountPubkey,\n isSigner: false,\n isWritable: true\n }];\n if (!params.basePubkey.equals(params.fromPubkey)) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(params) {\n const transaction = new Transaction5();\n if (\"basePubkey\" in params && \"seed\" in params) {\n transaction.add(_SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId\n }));\n } else {\n transaction.add(_SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId\n }));\n }\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey\n };\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData3(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer())\n });\n const instructionData = {\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData3(type);\n const instructionData = {\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData3(type, {\n lamports: params.lamports\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData3(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer())\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(params) {\n let data;\n let keys;\n if (\"basePubkey\" in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData3(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData3(type, {\n space: params.space\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: true,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n };\n SystemProgram.programId = new PublicKey(\"11111111111111111111111111111111\");\n var CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n var Loader = class _Loader {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Amount of program data placed in each load Transaction\n */\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength) {\n return 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / _Loader.chunkSize) + 1 + // Add one for Create transaction\n 1);\n }\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(connection, payer, program, programId, data) {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(data.length);\n const programInfo = await connection.getAccountInfo(program.publicKey, \"confirmed\");\n let transaction = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error(\"Program load failed, account is already executable\");\n return false;\n }\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction5();\n transaction.add(SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length\n }));\n }\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction5();\n transaction.add(SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId\n }));\n }\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction5();\n transaction.add(SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports\n }));\n }\n } else {\n transaction = new Transaction5().add(SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId\n }));\n }\n if (transaction !== null) {\n await sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: \"confirmed\"\n });\n }\n }\n const dataLayout = BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), BufferLayout__namespace.u32(\"offset\"), BufferLayout__namespace.u32(\"bytesLength\"), BufferLayout__namespace.u32(\"bytesLengthPadding\"), BufferLayout__namespace.seq(BufferLayout__namespace.u8(\"byte\"), BufferLayout__namespace.offset(BufferLayout__namespace.u32(), -8), \"bytes\")]);\n const chunkSize = _Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data2 = buffer2.Buffer.alloc(chunkSize + 16);\n dataLayout.encode({\n instruction: 0,\n // Load instruction\n offset,\n bytes,\n bytesLength: 0,\n bytesLengthPadding: 0\n }, data2);\n const transaction = new Transaction5().add({\n keys: [{\n pubkey: program.publicKey,\n isSigner: true,\n isWritable: true\n }],\n programId,\n data: data2\n });\n transactions.push(sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: \"confirmed\"\n }));\n if (connection._rpcEndpoint.includes(\"solana.com\")) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1e3 / REQUESTS_PER_SECOND);\n }\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n {\n const dataLayout2 = BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")]);\n const data2 = buffer2.Buffer.alloc(dataLayout2.span);\n dataLayout2.encode({\n instruction: 1\n // Finalize instruction\n }, data2);\n const transaction = new Transaction5().add({\n keys: [{\n pubkey: program.publicKey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId,\n data: data2\n });\n const deployCommitment = \"processed\";\n const finalizeSignature = await connection.sendTransaction(transaction, [payer, program], {\n preflightCommitment: deployCommitment\n });\n const {\n context: context2,\n value\n } = await connection.confirmTransaction({\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n blockhash: transaction.recentBlockhash\n }, deployCommitment);\n if (value.err) {\n throw new Error(`Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`);\n }\n while (true) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment\n });\n if (currentSlot > context2.slot) {\n break;\n }\n } catch {\n }\n await new Promise((resolve) => setTimeout(resolve, Math.round(MS_PER_SLOT / 2)));\n }\n }\n return true;\n }\n };\n Loader.chunkSize = CHUNK_SIZE;\n var BPF_LOADER_PROGRAM_ID = new PublicKey(\"BPFLoader2111111111111111111111111111111111\");\n var BpfLoader = class {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength) {\n return Loader.getMinNumSignatures(dataLength);\n }\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(connection, payer, program, elf, loaderProgramId) {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n };\n function getDefaultExportFromCjs(x4) {\n return x4 && x4.__esModule && Object.prototype.hasOwnProperty.call(x4, \"default\") ? x4[\"default\"] : x4;\n }\n var fastStableStringify$1;\n var hasRequiredFastStableStringify;\n function requireFastStableStringify() {\n if (hasRequiredFastStableStringify)\n return fastStableStringify$1;\n hasRequiredFastStableStringify = 1;\n var objToString = Object.prototype.toString;\n var objKeys = Object.keys || function(obj) {\n var keys = [];\n for (var name in obj) {\n keys.push(name);\n }\n return keys;\n };\n function stringify4(val, isArrayProp) {\n var i3, max, str, keys, key, propVal, toStr;\n if (val === true) {\n return \"true\";\n }\n if (val === false) {\n return \"false\";\n }\n switch (typeof val) {\n case \"object\":\n if (val === null) {\n return null;\n } else if (val.toJSON && typeof val.toJSON === \"function\") {\n return stringify4(val.toJSON(), isArrayProp);\n } else {\n toStr = objToString.call(val);\n if (toStr === \"[object Array]\") {\n str = \"[\";\n max = val.length - 1;\n for (i3 = 0; i3 < max; i3++) {\n str += stringify4(val[i3], true) + \",\";\n }\n if (max > -1) {\n str += stringify4(val[i3], true);\n }\n return str + \"]\";\n } else if (toStr === \"[object Object]\") {\n keys = objKeys(val).sort();\n max = keys.length;\n str = \"\";\n i3 = 0;\n while (i3 < max) {\n key = keys[i3];\n propVal = stringify4(val[key], false);\n if (propVal !== void 0) {\n if (str) {\n str += \",\";\n }\n str += JSON.stringify(key) + \":\" + propVal;\n }\n i3++;\n }\n return \"{\" + str + \"}\";\n } else {\n return JSON.stringify(val);\n }\n }\n case \"function\":\n case \"undefined\":\n return isArrayProp ? null : void 0;\n case \"string\":\n return JSON.stringify(val);\n default:\n return isFinite(val) ? val : null;\n }\n }\n fastStableStringify$1 = function(val) {\n var returnVal = stringify4(val, false);\n if (returnVal !== void 0) {\n return \"\" + returnVal;\n }\n };\n return fastStableStringify$1;\n }\n var fastStableStringifyExports = /* @__PURE__ */ requireFastStableStringify();\n var fastStableStringify = /* @__PURE__ */ getDefaultExportFromCjs(fastStableStringifyExports);\n var MINIMUM_SLOT_PER_EPOCH = 32;\n function trailingZeros(n2) {\n let trailingZeros2 = 0;\n while (n2 > 1) {\n n2 /= 2;\n trailingZeros2++;\n }\n return trailingZeros2;\n }\n function nextPowerOfTwo(n2) {\n if (n2 === 0)\n return 1;\n n2--;\n n2 |= n2 >> 1;\n n2 |= n2 >> 2;\n n2 |= n2 >> 4;\n n2 |= n2 >> 8;\n n2 |= n2 >> 16;\n n2 |= n2 >> 32;\n return n2 + 1;\n }\n var EpochSchedule = class {\n constructor(slotsPerEpoch, leaderScheduleSlotOffset, warmup, firstNormalEpoch, firstNormalSlot) {\n this.slotsPerEpoch = void 0;\n this.leaderScheduleSlotOffset = void 0;\n this.warmup = void 0;\n this.firstNormalEpoch = void 0;\n this.firstNormalSlot = void 0;\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n getEpoch(slot) {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n getEpochAndSlotIndex(slot) {\n if (slot < this.firstNormalSlot) {\n const epoch = trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) - trailingZeros(MINIMUM_SLOT_PER_EPOCH) - 1;\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n getFirstSlotInEpoch(epoch) {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (epoch - this.firstNormalEpoch) * this.slotsPerEpoch + this.firstNormalSlot;\n }\n }\n getLastSlotInEpoch(epoch) {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n getSlotsInEpoch(epoch) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n };\n var fetchImpl = globalThis.fetch;\n var RpcWebSocketClient = class extends rpcWebsockets.CommonClient {\n constructor(address, options, generate_request_id) {\n const webSocketFactory = (url) => {\n const rpc = rpcWebsockets.WebSocket(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1e3,\n ...options\n });\n if (\"socket\" in rpc) {\n this.underlyingSocket = rpc.socket;\n } else {\n this.underlyingSocket = rpc;\n }\n return rpc;\n };\n super(webSocketFactory, address, options, generate_request_id);\n this.underlyingSocket = void 0;\n }\n call(...args) {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1) {\n return super.call(...args);\n }\n return Promise.reject(new Error(\"Tried to call a JSON-RPC method `\" + args[0] + \"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was \" + readyState + \")\"));\n }\n notify(...args) {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1) {\n return super.notify(...args);\n }\n return Promise.reject(new Error(\"Tried to send a JSON-RPC notification `\" + args[0] + \"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was \" + readyState + \")\"));\n }\n };\n function decodeData(type, data) {\n let decoded;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error(\"invalid instruction; \" + err);\n }\n if (decoded.typeIndex !== type.index) {\n throw new Error(`invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`);\n }\n return decoded;\n }\n var LOOKUP_TABLE_META_SIZE = 56;\n var AddressLookupTableAccount = class {\n constructor(args) {\n this.key = void 0;\n this.state = void 0;\n this.key = args.key;\n this.state = args.state;\n }\n isActive() {\n const U64_MAX = BigInt(\"0xffffffffffffffff\");\n return this.state.deactivationSlot === U64_MAX;\n }\n static deserialize(accountData) {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert9(serializedAddressesLen >= 0, \"lookup table is invalid\");\n assert9(serializedAddressesLen % 32 === 0, \"lookup table is invalid\");\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {\n addresses: addresses4\n } = BufferLayout__namespace.struct([BufferLayout__namespace.seq(publicKey(), numSerializedAddresses, \"addresses\")]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority: meta.authority.length !== 0 ? new PublicKey(meta.authority[0]) : void 0,\n addresses: addresses4.map((address) => new PublicKey(address))\n };\n }\n };\n var LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout__namespace.struct([\n BufferLayout__namespace.u32(\"typeIndex\"),\n u64(\"deactivationSlot\"),\n BufferLayout__namespace.nu64(\"lastExtendedSlot\"),\n BufferLayout__namespace.u8(\"lastExtendedStartIndex\"),\n BufferLayout__namespace.u8(),\n // option\n BufferLayout__namespace.seq(publicKey(), BufferLayout__namespace.offset(BufferLayout__namespace.u8(), -1), \"authority\")\n ])\n };\n var URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\n function makeWebsocketUrl(endpoint2) {\n const matches = endpoint2.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint2}\\``);\n }\n const [\n _2,\n // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish,\n portWithColon,\n rest\n ] = matches;\n const protocol = endpoint2.startsWith(\"https:\") ? \"wss:\" : \"ws:\";\n const startPort = portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort = (\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explicitly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to agave-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? \"\" : `:${startPort + 1}`\n );\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n }\n var PublicKeyFromString = superstruct.coerce(superstruct.instance(PublicKey), superstruct.string(), (value) => new PublicKey(value));\n var RawAccountDataResult = superstruct.tuple([superstruct.string(), superstruct.literal(\"base64\")]);\n var BufferFromRawAccountData = superstruct.coerce(superstruct.instance(buffer2.Buffer), RawAccountDataResult, (value) => buffer2.Buffer.from(value[0], \"base64\"));\n var BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1e3;\n function assertEndpointUrl(putativeUrl) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError(\"Endpoint URL must start with `http:` or `https:`.\");\n }\n return putativeUrl;\n }\n function extractCommitmentFromConfig(commitmentOrConfig) {\n let commitment;\n let config2;\n if (typeof commitmentOrConfig === \"string\") {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {\n commitment: specifiedCommitment,\n ...specifiedConfig\n } = commitmentOrConfig;\n commitment = specifiedCommitment;\n config2 = specifiedConfig;\n }\n return {\n commitment,\n config: config2\n };\n }\n function applyDefaultMemcmpEncodingToFilters(filters) {\n return filters.map((filter) => \"memcmp\" in filter ? {\n ...filter,\n memcmp: {\n ...filter.memcmp,\n encoding: filter.memcmp.encoding ?? \"base58\"\n }\n } : filter);\n }\n function createRpcResult(result) {\n return superstruct.union([superstruct.type({\n jsonrpc: superstruct.literal(\"2.0\"),\n id: superstruct.string(),\n result\n }), superstruct.type({\n jsonrpc: superstruct.literal(\"2.0\"),\n id: superstruct.string(),\n error: superstruct.type({\n code: superstruct.unknown(),\n message: superstruct.string(),\n data: superstruct.optional(superstruct.any())\n })\n })]);\n }\n var UnknownRpcResult = createRpcResult(superstruct.unknown());\n function jsonRpcResult(schema) {\n return superstruct.coerce(createRpcResult(schema), UnknownRpcResult, (value) => {\n if (\"error\" in value) {\n return value;\n } else {\n return {\n ...value,\n result: superstruct.create(value.result, schema)\n };\n }\n });\n }\n function jsonRpcResultAndContext(value) {\n return jsonRpcResult(superstruct.type({\n context: superstruct.type({\n slot: superstruct.number()\n }),\n value\n }));\n }\n function notificationResultAndContext(value) {\n return superstruct.type({\n context: superstruct.type({\n slot: superstruct.number()\n }),\n value\n });\n }\n function versionedMessageFromResponse(version7, response) {\n if (version7 === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map((accountKey) => new PublicKey(accountKey)),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map((ix) => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58__default.default.decode(ix.data)\n })),\n addressTableLookups: response.addressTableLookups\n });\n } else {\n return new Message(response);\n }\n }\n var GetInflationGovernorResult = superstruct.type({\n foundation: superstruct.number(),\n foundationTerm: superstruct.number(),\n initial: superstruct.number(),\n taper: superstruct.number(),\n terminal: superstruct.number()\n });\n var GetInflationRewardResult = jsonRpcResult(superstruct.array(superstruct.nullable(superstruct.type({\n epoch: superstruct.number(),\n effectiveSlot: superstruct.number(),\n amount: superstruct.number(),\n postBalance: superstruct.number(),\n commission: superstruct.optional(superstruct.nullable(superstruct.number()))\n }))));\n var GetRecentPrioritizationFeesResult = superstruct.array(superstruct.type({\n slot: superstruct.number(),\n prioritizationFee: superstruct.number()\n }));\n var GetInflationRateResult = superstruct.type({\n total: superstruct.number(),\n validator: superstruct.number(),\n foundation: superstruct.number(),\n epoch: superstruct.number()\n });\n var GetEpochInfoResult = superstruct.type({\n epoch: superstruct.number(),\n slotIndex: superstruct.number(),\n slotsInEpoch: superstruct.number(),\n absoluteSlot: superstruct.number(),\n blockHeight: superstruct.optional(superstruct.number()),\n transactionCount: superstruct.optional(superstruct.number())\n });\n var GetEpochScheduleResult = superstruct.type({\n slotsPerEpoch: superstruct.number(),\n leaderScheduleSlotOffset: superstruct.number(),\n warmup: superstruct.boolean(),\n firstNormalEpoch: superstruct.number(),\n firstNormalSlot: superstruct.number()\n });\n var GetLeaderScheduleResult = superstruct.record(superstruct.string(), superstruct.array(superstruct.number()));\n var TransactionErrorResult = superstruct.nullable(superstruct.union([superstruct.type({}), superstruct.string()]));\n var SignatureStatusResult = superstruct.type({\n err: TransactionErrorResult\n });\n var SignatureReceivedResult = superstruct.literal(\"receivedSignature\");\n var VersionResult = superstruct.type({\n \"solana-core\": superstruct.string(),\n \"feature-set\": superstruct.optional(superstruct.number())\n });\n var ParsedInstructionStruct = superstruct.type({\n program: superstruct.string(),\n programId: PublicKeyFromString,\n parsed: superstruct.unknown()\n });\n var PartiallyDecodedInstructionStruct = superstruct.type({\n programId: PublicKeyFromString,\n accounts: superstruct.array(PublicKeyFromString),\n data: superstruct.string()\n });\n var SimulatedTransactionResponseStruct = jsonRpcResultAndContext(superstruct.type({\n err: superstruct.nullable(superstruct.union([superstruct.type({}), superstruct.string()])),\n logs: superstruct.nullable(superstruct.array(superstruct.string())),\n accounts: superstruct.optional(superstruct.nullable(superstruct.array(superstruct.nullable(superstruct.type({\n executable: superstruct.boolean(),\n owner: superstruct.string(),\n lamports: superstruct.number(),\n data: superstruct.array(superstruct.string()),\n rentEpoch: superstruct.optional(superstruct.number())\n }))))),\n unitsConsumed: superstruct.optional(superstruct.number()),\n returnData: superstruct.optional(superstruct.nullable(superstruct.type({\n programId: superstruct.string(),\n data: superstruct.tuple([superstruct.string(), superstruct.literal(\"base64\")])\n }))),\n innerInstructions: superstruct.optional(superstruct.nullable(superstruct.array(superstruct.type({\n index: superstruct.number(),\n instructions: superstruct.array(superstruct.union([ParsedInstructionStruct, PartiallyDecodedInstructionStruct]))\n }))))\n }));\n var BlockProductionResponseStruct = jsonRpcResultAndContext(superstruct.type({\n byIdentity: superstruct.record(superstruct.string(), superstruct.array(superstruct.number())),\n range: superstruct.type({\n firstSlot: superstruct.number(),\n lastSlot: superstruct.number()\n })\n }));\n function createRpcClient(url, httpHeaders, customFetch, fetchMiddleware, disableRetryOnRateLimit, httpAgent) {\n const fetch2 = customFetch ? customFetch : fetchImpl;\n let agent;\n {\n if (httpAgent != null) {\n console.warn(\"You have supplied an `httpAgent` when creating a `Connection` in a browser environment.It has been ignored; `httpAgent` is only used in Node environments.\");\n }\n }\n let fetchWithMiddleware;\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise((resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) => resolve([modifiedInfo, modifiedInit]));\n } catch (error) {\n reject(error);\n }\n });\n return await fetch2(...modifiedFetchArgs);\n };\n }\n const clientBrowser = new RpcClient__default.default(async (request, callback) => {\n const options = {\n method: \"POST\",\n body: request,\n agent,\n headers: Object.assign({\n \"Content-Type\": \"application/json\"\n }, httpHeaders || {}, COMMON_HTTP_HEADERS)\n };\n try {\n let too_many_requests_retries = 5;\n let res;\n let waitTime = 500;\n for (; ; ) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch2(url, options);\n }\n if (res.status !== 429) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.error(`Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`);\n await sleep(waitTime);\n waitTime *= 2;\n }\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error)\n callback(err);\n }\n }, {});\n return clientBrowser;\n }\n function createRpcRequest(client) {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err, response) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n }\n function createRpcBatchRequest(client) {\n return (requests) => {\n return new Promise((resolve, reject) => {\n if (requests.length === 0)\n resolve([]);\n const batch = requests.map((params) => {\n return client.request(params.methodName, params.args);\n });\n client.request(batch, (err, response) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n }\n var GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n var GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n var GetRecentPrioritizationFeesRpcResult = jsonRpcResult(GetRecentPrioritizationFeesResult);\n var GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n var GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n var GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n var SlotRpcResult = jsonRpcResult(superstruct.number());\n var GetSupplyRpcResult = jsonRpcResultAndContext(superstruct.type({\n total: superstruct.number(),\n circulating: superstruct.number(),\n nonCirculating: superstruct.number(),\n nonCirculatingAccounts: superstruct.array(PublicKeyFromString)\n }));\n var TokenAmountResult = superstruct.type({\n amount: superstruct.string(),\n uiAmount: superstruct.nullable(superstruct.number()),\n decimals: superstruct.number(),\n uiAmountString: superstruct.optional(superstruct.string())\n });\n var GetTokenLargestAccountsResult = jsonRpcResultAndContext(superstruct.array(superstruct.type({\n address: PublicKeyFromString,\n amount: superstruct.string(),\n uiAmount: superstruct.nullable(superstruct.number()),\n decimals: superstruct.number(),\n uiAmountString: superstruct.optional(superstruct.string())\n })));\n var GetTokenAccountsByOwner = jsonRpcResultAndContext(superstruct.array(superstruct.type({\n pubkey: PublicKeyFromString,\n account: superstruct.type({\n executable: superstruct.boolean(),\n owner: PublicKeyFromString,\n lamports: superstruct.number(),\n data: BufferFromRawAccountData,\n rentEpoch: superstruct.number()\n })\n })));\n var ParsedAccountDataResult = superstruct.type({\n program: superstruct.string(),\n parsed: superstruct.unknown(),\n space: superstruct.number()\n });\n var GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(superstruct.array(superstruct.type({\n pubkey: PublicKeyFromString,\n account: superstruct.type({\n executable: superstruct.boolean(),\n owner: PublicKeyFromString,\n lamports: superstruct.number(),\n data: ParsedAccountDataResult,\n rentEpoch: superstruct.number()\n })\n })));\n var GetLargestAccountsRpcResult = jsonRpcResultAndContext(superstruct.array(superstruct.type({\n lamports: superstruct.number(),\n address: PublicKeyFromString\n })));\n var AccountInfoResult = superstruct.type({\n executable: superstruct.boolean(),\n owner: PublicKeyFromString,\n lamports: superstruct.number(),\n data: BufferFromRawAccountData,\n rentEpoch: superstruct.number()\n });\n var KeyedAccountInfoResult = superstruct.type({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult\n });\n var ParsedOrRawAccountData = superstruct.coerce(superstruct.union([superstruct.instance(buffer2.Buffer), ParsedAccountDataResult]), superstruct.union([RawAccountDataResult, ParsedAccountDataResult]), (value) => {\n if (Array.isArray(value)) {\n return superstruct.create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n });\n var ParsedAccountInfoResult = superstruct.type({\n executable: superstruct.boolean(),\n owner: PublicKeyFromString,\n lamports: superstruct.number(),\n data: ParsedOrRawAccountData,\n rentEpoch: superstruct.number()\n });\n var KeyedParsedAccountInfoResult = superstruct.type({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult\n });\n var StakeActivationResult = superstruct.type({\n state: superstruct.union([superstruct.literal(\"active\"), superstruct.literal(\"inactive\"), superstruct.literal(\"activating\"), superstruct.literal(\"deactivating\")]),\n active: superstruct.number(),\n inactive: superstruct.number()\n });\n var GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(superstruct.array(superstruct.type({\n signature: superstruct.string(),\n slot: superstruct.number(),\n err: TransactionErrorResult,\n memo: superstruct.nullable(superstruct.string()),\n blockTime: superstruct.optional(superstruct.nullable(superstruct.number()))\n })));\n var GetSignaturesForAddressRpcResult = jsonRpcResult(superstruct.array(superstruct.type({\n signature: superstruct.string(),\n slot: superstruct.number(),\n err: TransactionErrorResult,\n memo: superstruct.nullable(superstruct.string()),\n blockTime: superstruct.optional(superstruct.nullable(superstruct.number()))\n })));\n var AccountNotificationResult = superstruct.type({\n subscription: superstruct.number(),\n result: notificationResultAndContext(AccountInfoResult)\n });\n var ProgramAccountInfoResult = superstruct.type({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult\n });\n var ProgramAccountNotificationResult = superstruct.type({\n subscription: superstruct.number(),\n result: notificationResultAndContext(ProgramAccountInfoResult)\n });\n var SlotInfoResult = superstruct.type({\n parent: superstruct.number(),\n slot: superstruct.number(),\n root: superstruct.number()\n });\n var SlotNotificationResult = superstruct.type({\n subscription: superstruct.number(),\n result: SlotInfoResult\n });\n var SlotUpdateResult = superstruct.union([superstruct.type({\n type: superstruct.union([superstruct.literal(\"firstShredReceived\"), superstruct.literal(\"completed\"), superstruct.literal(\"optimisticConfirmation\"), superstruct.literal(\"root\")]),\n slot: superstruct.number(),\n timestamp: superstruct.number()\n }), superstruct.type({\n type: superstruct.literal(\"createdBank\"),\n parent: superstruct.number(),\n slot: superstruct.number(),\n timestamp: superstruct.number()\n }), superstruct.type({\n type: superstruct.literal(\"frozen\"),\n slot: superstruct.number(),\n timestamp: superstruct.number(),\n stats: superstruct.type({\n numTransactionEntries: superstruct.number(),\n numSuccessfulTransactions: superstruct.number(),\n numFailedTransactions: superstruct.number(),\n maxTransactionsPerEntry: superstruct.number()\n })\n }), superstruct.type({\n type: superstruct.literal(\"dead\"),\n slot: superstruct.number(),\n timestamp: superstruct.number(),\n err: superstruct.string()\n })]);\n var SlotUpdateNotificationResult = superstruct.type({\n subscription: superstruct.number(),\n result: SlotUpdateResult\n });\n var SignatureNotificationResult = superstruct.type({\n subscription: superstruct.number(),\n result: notificationResultAndContext(superstruct.union([SignatureStatusResult, SignatureReceivedResult]))\n });\n var RootNotificationResult = superstruct.type({\n subscription: superstruct.number(),\n result: superstruct.number()\n });\n var ContactInfoResult = superstruct.type({\n pubkey: superstruct.string(),\n gossip: superstruct.nullable(superstruct.string()),\n tpu: superstruct.nullable(superstruct.string()),\n rpc: superstruct.nullable(superstruct.string()),\n version: superstruct.nullable(superstruct.string())\n });\n var VoteAccountInfoResult = superstruct.type({\n votePubkey: superstruct.string(),\n nodePubkey: superstruct.string(),\n activatedStake: superstruct.number(),\n epochVoteAccount: superstruct.boolean(),\n epochCredits: superstruct.array(superstruct.tuple([superstruct.number(), superstruct.number(), superstruct.number()])),\n commission: superstruct.number(),\n lastVote: superstruct.number(),\n rootSlot: superstruct.nullable(superstruct.number())\n });\n var GetVoteAccounts = jsonRpcResult(superstruct.type({\n current: superstruct.array(VoteAccountInfoResult),\n delinquent: superstruct.array(VoteAccountInfoResult)\n }));\n var ConfirmationStatus = superstruct.union([superstruct.literal(\"processed\"), superstruct.literal(\"confirmed\"), superstruct.literal(\"finalized\")]);\n var SignatureStatusResponse = superstruct.type({\n slot: superstruct.number(),\n confirmations: superstruct.nullable(superstruct.number()),\n err: TransactionErrorResult,\n confirmationStatus: superstruct.optional(ConfirmationStatus)\n });\n var GetSignatureStatusesRpcResult = jsonRpcResultAndContext(superstruct.array(superstruct.nullable(SignatureStatusResponse)));\n var GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(superstruct.number());\n var AddressTableLookupStruct = superstruct.type({\n accountKey: PublicKeyFromString,\n writableIndexes: superstruct.array(superstruct.number()),\n readonlyIndexes: superstruct.array(superstruct.number())\n });\n var ConfirmedTransactionResult = superstruct.type({\n signatures: superstruct.array(superstruct.string()),\n message: superstruct.type({\n accountKeys: superstruct.array(superstruct.string()),\n header: superstruct.type({\n numRequiredSignatures: superstruct.number(),\n numReadonlySignedAccounts: superstruct.number(),\n numReadonlyUnsignedAccounts: superstruct.number()\n }),\n instructions: superstruct.array(superstruct.type({\n accounts: superstruct.array(superstruct.number()),\n data: superstruct.string(),\n programIdIndex: superstruct.number()\n })),\n recentBlockhash: superstruct.string(),\n addressTableLookups: superstruct.optional(superstruct.array(AddressTableLookupStruct))\n })\n });\n var AnnotatedAccountKey = superstruct.type({\n pubkey: PublicKeyFromString,\n signer: superstruct.boolean(),\n writable: superstruct.boolean(),\n source: superstruct.optional(superstruct.union([superstruct.literal(\"transaction\"), superstruct.literal(\"lookupTable\")]))\n });\n var ConfirmedTransactionAccountsModeResult = superstruct.type({\n accountKeys: superstruct.array(AnnotatedAccountKey),\n signatures: superstruct.array(superstruct.string())\n });\n var ParsedInstructionResult = superstruct.type({\n parsed: superstruct.unknown(),\n program: superstruct.string(),\n programId: PublicKeyFromString\n });\n var RawInstructionResult = superstruct.type({\n accounts: superstruct.array(PublicKeyFromString),\n data: superstruct.string(),\n programId: PublicKeyFromString\n });\n var InstructionResult = superstruct.union([RawInstructionResult, ParsedInstructionResult]);\n var UnknownInstructionResult = superstruct.union([superstruct.type({\n parsed: superstruct.unknown(),\n program: superstruct.string(),\n programId: superstruct.string()\n }), superstruct.type({\n accounts: superstruct.array(superstruct.string()),\n data: superstruct.string(),\n programId: superstruct.string()\n })]);\n var ParsedOrRawInstruction = superstruct.coerce(InstructionResult, UnknownInstructionResult, (value) => {\n if (\"accounts\" in value) {\n return superstruct.create(value, RawInstructionResult);\n } else {\n return superstruct.create(value, ParsedInstructionResult);\n }\n });\n var ParsedConfirmedTransactionResult = superstruct.type({\n signatures: superstruct.array(superstruct.string()),\n message: superstruct.type({\n accountKeys: superstruct.array(AnnotatedAccountKey),\n instructions: superstruct.array(ParsedOrRawInstruction),\n recentBlockhash: superstruct.string(),\n addressTableLookups: superstruct.optional(superstruct.nullable(superstruct.array(AddressTableLookupStruct)))\n })\n });\n var TokenBalanceResult = superstruct.type({\n accountIndex: superstruct.number(),\n mint: superstruct.string(),\n owner: superstruct.optional(superstruct.string()),\n programId: superstruct.optional(superstruct.string()),\n uiTokenAmount: TokenAmountResult\n });\n var LoadedAddressesResult = superstruct.type({\n writable: superstruct.array(PublicKeyFromString),\n readonly: superstruct.array(PublicKeyFromString)\n });\n var ConfirmedTransactionMetaResult = superstruct.type({\n err: TransactionErrorResult,\n fee: superstruct.number(),\n innerInstructions: superstruct.optional(superstruct.nullable(superstruct.array(superstruct.type({\n index: superstruct.number(),\n instructions: superstruct.array(superstruct.type({\n accounts: superstruct.array(superstruct.number()),\n data: superstruct.string(),\n programIdIndex: superstruct.number()\n }))\n })))),\n preBalances: superstruct.array(superstruct.number()),\n postBalances: superstruct.array(superstruct.number()),\n logMessages: superstruct.optional(superstruct.nullable(superstruct.array(superstruct.string()))),\n preTokenBalances: superstruct.optional(superstruct.nullable(superstruct.array(TokenBalanceResult))),\n postTokenBalances: superstruct.optional(superstruct.nullable(superstruct.array(TokenBalanceResult))),\n loadedAddresses: superstruct.optional(LoadedAddressesResult),\n computeUnitsConsumed: superstruct.optional(superstruct.number()),\n costUnits: superstruct.optional(superstruct.number())\n });\n var ParsedConfirmedTransactionMetaResult = superstruct.type({\n err: TransactionErrorResult,\n fee: superstruct.number(),\n innerInstructions: superstruct.optional(superstruct.nullable(superstruct.array(superstruct.type({\n index: superstruct.number(),\n instructions: superstruct.array(ParsedOrRawInstruction)\n })))),\n preBalances: superstruct.array(superstruct.number()),\n postBalances: superstruct.array(superstruct.number()),\n logMessages: superstruct.optional(superstruct.nullable(superstruct.array(superstruct.string()))),\n preTokenBalances: superstruct.optional(superstruct.nullable(superstruct.array(TokenBalanceResult))),\n postTokenBalances: superstruct.optional(superstruct.nullable(superstruct.array(TokenBalanceResult))),\n loadedAddresses: superstruct.optional(LoadedAddressesResult),\n computeUnitsConsumed: superstruct.optional(superstruct.number()),\n costUnits: superstruct.optional(superstruct.number())\n });\n var TransactionVersionStruct = superstruct.union([superstruct.literal(0), superstruct.literal(\"legacy\")]);\n var RewardsResult = superstruct.type({\n pubkey: superstruct.string(),\n lamports: superstruct.number(),\n postBalance: superstruct.nullable(superstruct.number()),\n rewardType: superstruct.nullable(superstruct.string()),\n commission: superstruct.optional(superstruct.nullable(superstruct.number()))\n });\n var GetBlockRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n blockhash: superstruct.string(),\n previousBlockhash: superstruct.string(),\n parentSlot: superstruct.number(),\n transactions: superstruct.array(superstruct.type({\n transaction: ConfirmedTransactionResult,\n meta: superstruct.nullable(ConfirmedTransactionMetaResult),\n version: superstruct.optional(TransactionVersionStruct)\n })),\n rewards: superstruct.optional(superstruct.array(RewardsResult)),\n blockTime: superstruct.nullable(superstruct.number()),\n blockHeight: superstruct.nullable(superstruct.number())\n })));\n var GetNoneModeBlockRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n blockhash: superstruct.string(),\n previousBlockhash: superstruct.string(),\n parentSlot: superstruct.number(),\n rewards: superstruct.optional(superstruct.array(RewardsResult)),\n blockTime: superstruct.nullable(superstruct.number()),\n blockHeight: superstruct.nullable(superstruct.number())\n })));\n var GetAccountsModeBlockRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n blockhash: superstruct.string(),\n previousBlockhash: superstruct.string(),\n parentSlot: superstruct.number(),\n transactions: superstruct.array(superstruct.type({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: superstruct.nullable(ConfirmedTransactionMetaResult),\n version: superstruct.optional(TransactionVersionStruct)\n })),\n rewards: superstruct.optional(superstruct.array(RewardsResult)),\n blockTime: superstruct.nullable(superstruct.number()),\n blockHeight: superstruct.nullable(superstruct.number())\n })));\n var GetParsedBlockRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n blockhash: superstruct.string(),\n previousBlockhash: superstruct.string(),\n parentSlot: superstruct.number(),\n transactions: superstruct.array(superstruct.type({\n transaction: ParsedConfirmedTransactionResult,\n meta: superstruct.nullable(ParsedConfirmedTransactionMetaResult),\n version: superstruct.optional(TransactionVersionStruct)\n })),\n rewards: superstruct.optional(superstruct.array(RewardsResult)),\n blockTime: superstruct.nullable(superstruct.number()),\n blockHeight: superstruct.nullable(superstruct.number())\n })));\n var GetParsedAccountsModeBlockRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n blockhash: superstruct.string(),\n previousBlockhash: superstruct.string(),\n parentSlot: superstruct.number(),\n transactions: superstruct.array(superstruct.type({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: superstruct.nullable(ParsedConfirmedTransactionMetaResult),\n version: superstruct.optional(TransactionVersionStruct)\n })),\n rewards: superstruct.optional(superstruct.array(RewardsResult)),\n blockTime: superstruct.nullable(superstruct.number()),\n blockHeight: superstruct.nullable(superstruct.number())\n })));\n var GetParsedNoneModeBlockRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n blockhash: superstruct.string(),\n previousBlockhash: superstruct.string(),\n parentSlot: superstruct.number(),\n rewards: superstruct.optional(superstruct.array(RewardsResult)),\n blockTime: superstruct.nullable(superstruct.number()),\n blockHeight: superstruct.nullable(superstruct.number())\n })));\n var GetConfirmedBlockRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n blockhash: superstruct.string(),\n previousBlockhash: superstruct.string(),\n parentSlot: superstruct.number(),\n transactions: superstruct.array(superstruct.type({\n transaction: ConfirmedTransactionResult,\n meta: superstruct.nullable(ConfirmedTransactionMetaResult)\n })),\n rewards: superstruct.optional(superstruct.array(RewardsResult)),\n blockTime: superstruct.nullable(superstruct.number())\n })));\n var GetBlockSignaturesRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n blockhash: superstruct.string(),\n previousBlockhash: superstruct.string(),\n parentSlot: superstruct.number(),\n signatures: superstruct.array(superstruct.string()),\n blockTime: superstruct.nullable(superstruct.number())\n })));\n var GetTransactionRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n slot: superstruct.number(),\n meta: superstruct.nullable(ConfirmedTransactionMetaResult),\n blockTime: superstruct.optional(superstruct.nullable(superstruct.number())),\n transaction: ConfirmedTransactionResult,\n version: superstruct.optional(TransactionVersionStruct)\n })));\n var GetParsedTransactionRpcResult = jsonRpcResult(superstruct.nullable(superstruct.type({\n slot: superstruct.number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: superstruct.nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: superstruct.optional(superstruct.nullable(superstruct.number())),\n version: superstruct.optional(TransactionVersionStruct)\n })));\n var GetLatestBlockhashRpcResult = jsonRpcResultAndContext(superstruct.type({\n blockhash: superstruct.string(),\n lastValidBlockHeight: superstruct.number()\n }));\n var IsBlockhashValidRpcResult = jsonRpcResultAndContext(superstruct.boolean());\n var PerfSampleResult = superstruct.type({\n slot: superstruct.number(),\n numTransactions: superstruct.number(),\n numSlots: superstruct.number(),\n samplePeriodSecs: superstruct.number()\n });\n var GetRecentPerformanceSamplesRpcResult = jsonRpcResult(superstruct.array(PerfSampleResult));\n var GetFeeCalculatorRpcResult = jsonRpcResultAndContext(superstruct.nullable(superstruct.type({\n feeCalculator: superstruct.type({\n lamportsPerSignature: superstruct.number()\n })\n })));\n var RequestAirdropRpcResult = jsonRpcResult(superstruct.string());\n var SendTransactionRpcResult = jsonRpcResult(superstruct.string());\n var LogsResult = superstruct.type({\n err: TransactionErrorResult,\n logs: superstruct.array(superstruct.string()),\n signature: superstruct.string()\n });\n var LogsNotificationResult = superstruct.type({\n result: notificationResultAndContext(LogsResult),\n subscription: superstruct.number()\n });\n var COMMON_HTTP_HEADERS = {\n \"solana-client\": `js/${\"1.0.0-maintenance\"}`\n };\n var Connection2 = class {\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(endpoint2, _commitmentOrConfig) {\n this._commitment = void 0;\n this._confirmTransactionInitialTimeout = void 0;\n this._rpcEndpoint = void 0;\n this._rpcWsEndpoint = void 0;\n this._rpcClient = void 0;\n this._rpcRequest = void 0;\n this._rpcBatchRequest = void 0;\n this._rpcWebSocket = void 0;\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketHeartbeat = null;\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketGeneration = 0;\n this._disableBlockhashCaching = false;\n this._pollingBlockhash = false;\n this._blockhashInfo = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: []\n };\n this._nextClientSubscriptionId = 0;\n this._subscriptionDisposeFunctionsByClientSubscriptionId = {};\n this._subscriptionHashByClientSubscriptionId = {};\n this._subscriptionStateChangeCallbacksByHash = {};\n this._subscriptionCallbacksByServerSubscriptionId = {};\n this._subscriptionsByHash = {};\n this._subscriptionsAutoDisposedByRpc = /* @__PURE__ */ new Set();\n this.getBlockHeight = /* @__PURE__ */ (() => {\n const requestPromises = {};\n return async (commitmentOrConfig) => {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, void 0, config2);\n const requestHash = fastStableStringify(args);\n requestPromises[requestHash] = requestPromises[requestHash] ?? (async () => {\n try {\n const unsafeRes = await this._rpcRequest(\"getBlockHeight\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.number()));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get block height information\");\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n let wsEndpoint;\n let httpHeaders;\n let fetch2;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (_commitmentOrConfig && typeof _commitmentOrConfig === \"string\") {\n this._commitment = _commitmentOrConfig;\n } else if (_commitmentOrConfig) {\n this._commitment = _commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout = _commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = _commitmentOrConfig.wsEndpoint;\n httpHeaders = _commitmentOrConfig.httpHeaders;\n fetch2 = _commitmentOrConfig.fetch;\n fetchMiddleware = _commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = _commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = _commitmentOrConfig.httpAgent;\n }\n this._rpcEndpoint = assertEndpointUrl(endpoint2);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint2);\n this._rpcClient = createRpcClient(endpoint2, httpHeaders, fetch2, fetchMiddleware, disableRetryOnRateLimit, httpAgent);\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity\n });\n this._rpcWebSocket.on(\"open\", this._wsOnOpen.bind(this));\n this._rpcWebSocket.on(\"error\", this._wsOnError.bind(this));\n this._rpcWebSocket.on(\"close\", this._wsOnClose.bind(this));\n this._rpcWebSocket.on(\"accountNotification\", this._wsOnAccountNotification.bind(this));\n this._rpcWebSocket.on(\"programNotification\", this._wsOnProgramAccountNotification.bind(this));\n this._rpcWebSocket.on(\"slotNotification\", this._wsOnSlotNotification.bind(this));\n this._rpcWebSocket.on(\"slotsUpdatesNotification\", this._wsOnSlotUpdatesNotification.bind(this));\n this._rpcWebSocket.on(\"signatureNotification\", this._wsOnSignatureNotification.bind(this));\n this._rpcWebSocket.on(\"rootNotification\", this._wsOnRootNotification.bind(this));\n this._rpcWebSocket.on(\"logsNotification\", this._wsOnLogsNotification.bind(this));\n }\n /**\n * The default commitment used for requests\n */\n get commitment() {\n return this._commitment;\n }\n /**\n * The RPC endpoint\n */\n get rpcEndpoint() {\n return this._rpcEndpoint;\n }\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(publicKey2, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey2.toBase58()], commitment, void 0, config2);\n const unsafeRes = await this._rpcRequest(\"getBalance\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(superstruct.number()));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get balance for ${publicKey2.toBase58()}`);\n }\n return res.result;\n }\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(publicKey2, commitmentOrConfig) {\n return await this.getBalanceAndContext(publicKey2, commitmentOrConfig).then((x4) => x4.value).catch((e2) => {\n throw new Error(\"failed to get balance of account \" + publicKey2.toBase58() + \": \" + e2);\n });\n }\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot) {\n const unsafeRes = await this._rpcRequest(\"getBlockTime\", [slot]);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.nullable(superstruct.number())));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get block time for slot ${slot}`);\n }\n return res.result;\n }\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot() {\n const unsafeRes = await this._rpcRequest(\"minimumLedgerSlot\", []);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.number()));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get minimum ledger slot\");\n }\n return res.result;\n }\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock() {\n const unsafeRes = await this._rpcRequest(\"getFirstAvailableBlock\", []);\n const res = superstruct.create(unsafeRes, SlotRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get first available block\");\n }\n return res.result;\n }\n /**\n * Fetch information about the current supply\n */\n async getSupply(config2) {\n let configArg = {};\n if (typeof config2 === \"string\") {\n configArg = {\n commitment: config2\n };\n } else if (config2) {\n configArg = {\n ...config2,\n commitment: config2 && config2.commitment || this.commitment\n };\n } else {\n configArg = {\n commitment: this.commitment\n };\n }\n const unsafeRes = await this._rpcRequest(\"getSupply\", [configArg]);\n const res = superstruct.create(unsafeRes, GetSupplyRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get supply\");\n }\n return res.result;\n }\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(tokenMintAddress, commitment) {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest(\"getTokenSupply\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get token supply\");\n }\n return res.result;\n }\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(tokenAddress, commitment) {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest(\"getTokenAccountBalance\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get token account balance\");\n }\n return res.result;\n }\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(ownerAddress, filter, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n let _args = [ownerAddress.toBase58()];\n if (\"mint\" in filter) {\n _args.push({\n mint: filter.mint.toBase58()\n });\n } else {\n _args.push({\n programId: filter.programId.toBase58()\n });\n }\n const args = this._buildArgs(_args, commitment, \"base64\", config2);\n const unsafeRes = await this._rpcRequest(\"getTokenAccountsByOwner\", args);\n const res = superstruct.create(unsafeRes, GetTokenAccountsByOwner);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get token accounts owned by account ${ownerAddress.toBase58()}`);\n }\n return res.result;\n }\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(ownerAddress, filter, commitment) {\n let _args = [ownerAddress.toBase58()];\n if (\"mint\" in filter) {\n _args.push({\n mint: filter.mint.toBase58()\n });\n } else {\n _args.push({\n programId: filter.programId.toBase58()\n });\n }\n const args = this._buildArgs(_args, commitment, \"jsonParsed\");\n const unsafeRes = await this._rpcRequest(\"getTokenAccountsByOwner\", args);\n const res = superstruct.create(unsafeRes, GetParsedTokenAccountsByOwner);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get token accounts owned by account ${ownerAddress.toBase58()}`);\n }\n return res.result;\n }\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(config2) {\n const arg = {\n ...config2,\n commitment: config2 && config2.commitment || this.commitment\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest(\"getLargestAccounts\", args);\n const res = superstruct.create(unsafeRes, GetLargestAccountsRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get largest accounts\");\n }\n return res.result;\n }\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(mintAddress, commitment) {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest(\"getTokenLargestAccounts\", args);\n const res = superstruct.create(unsafeRes, GetTokenLargestAccountsResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get token largest accounts\");\n }\n return res.result;\n }\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(publicKey2, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey2.toBase58()], commitment, \"base64\", config2);\n const unsafeRes = await this._rpcRequest(\"getAccountInfo\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(superstruct.nullable(AccountInfoResult)));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info about account ${publicKey2.toBase58()}`);\n }\n return res.result;\n }\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(publicKey2, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey2.toBase58()], commitment, \"jsonParsed\", config2);\n const unsafeRes = await this._rpcRequest(\"getAccountInfo\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(superstruct.nullable(ParsedAccountInfoResult)));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info about account ${publicKey2.toBase58()}`);\n }\n return res.result;\n }\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(publicKey2, commitmentOrConfig) {\n try {\n const res = await this.getAccountInfoAndContext(publicKey2, commitmentOrConfig);\n return res.value;\n } catch (e2) {\n throw new Error(\"failed to get info about account \" + publicKey2.toBase58() + \": \" + e2);\n }\n }\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(publicKeys, rawConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map((key) => key.toBase58());\n const args = this._buildArgs([keys], commitment, \"jsonParsed\", config2);\n const unsafeRes = await this._rpcRequest(\"getMultipleAccounts\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(superstruct.array(superstruct.nullable(ParsedAccountInfoResult))));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys}`);\n }\n return res.result;\n }\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map((key) => key.toBase58());\n const args = this._buildArgs([keys], commitment, \"base64\", config2);\n const unsafeRes = await this._rpcRequest(\"getMultipleAccounts\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(superstruct.array(superstruct.nullable(AccountInfoResult))));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys}`);\n }\n return res.result;\n }\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(publicKeys, commitmentOrConfig) {\n const res = await this.getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig);\n return res.value;\n }\n /**\n * Returns epoch activation information for a stake account that has been delegated\n *\n * @deprecated Deprecated since RPC v1.18; will be removed in a future version.\n */\n async getStakeActivation(publicKey2, commitmentOrConfig, epoch) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([publicKey2.toBase58()], commitment, void 0, {\n ...config2,\n epoch: epoch != null ? epoch : config2?.epoch\n });\n const unsafeRes = await this._rpcRequest(\"getStakeActivation\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get Stake Activation ${publicKey2.toBase58()}`);\n }\n return res.result;\n }\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n // eslint-disable-next-line no-dupe-class-members\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(programId, configOrCommitment) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(configOrCommitment);\n const {\n encoding,\n ...configWithoutEncoding\n } = config2 || {};\n const args = this._buildArgs([programId.toBase58()], commitment, encoding || \"base64\", {\n ...configWithoutEncoding,\n ...configWithoutEncoding.filters ? {\n filters: applyDefaultMemcmpEncodingToFilters(configWithoutEncoding.filters)\n } : null\n });\n const unsafeRes = await this._rpcRequest(\"getProgramAccounts\", args);\n const baseSchema = superstruct.array(KeyedAccountInfoResult);\n const res = configWithoutEncoding.withContext === true ? superstruct.create(unsafeRes, jsonRpcResultAndContext(baseSchema)) : superstruct.create(unsafeRes, jsonRpcResult(baseSchema));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get accounts owned by program ${programId.toBase58()}`);\n }\n return res.result;\n }\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(programId, configOrCommitment) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs([programId.toBase58()], commitment, \"jsonParsed\", config2);\n const unsafeRes = await this._rpcRequest(\"getProgramAccounts\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.array(KeyedParsedAccountInfoResult)));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get accounts owned by program ${programId.toBase58()}`);\n }\n return res.result;\n }\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(strategy, commitment) {\n let rawSignature;\n if (typeof strategy == \"string\") {\n rawSignature = strategy;\n } else {\n const config2 = strategy;\n if (config2.abortSignal?.aborted) {\n return Promise.reject(config2.abortSignal.reason);\n }\n rawSignature = config2.signature;\n }\n let decodedSignature;\n try {\n decodedSignature = bs58__default.default.decode(rawSignature);\n } catch (err) {\n throw new Error(\"signature must be base58 encoded: \" + rawSignature);\n }\n assert9(decodedSignature.length === 64, \"signature has invalid length\");\n if (typeof strategy === \"string\") {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature\n });\n } else if (\"lastValidBlockHeight\" in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy\n });\n }\n }\n getCancellationPromise(signal) {\n return new Promise((_2, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener(\"abort\", () => {\n reject(signal.reason);\n });\n }\n });\n }\n getTransactionConfirmationPromise({\n commitment,\n signature: signature2\n }) {\n let signatureSubscriptionId;\n let disposeSignatureSubscriptionStateChangeObserver;\n let done = false;\n const confirmationPromise = new Promise((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(signature2, (result, context2) => {\n signatureSubscriptionId = void 0;\n const response = {\n context: context2,\n value: result\n };\n resolve({\n __type: TransactionStatus.PROCESSED,\n response\n });\n }, commitment);\n const subscriptionSetupPromise = new Promise((resolveSubscriptionSetup) => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver = this._onSubscriptionStateChange(signatureSubscriptionId, (nextState) => {\n if (nextState === \"subscribed\") {\n resolveSubscriptionSetup();\n }\n });\n }\n });\n (async () => {\n await subscriptionSetupPromise;\n if (done)\n return;\n const response = await this.getSignatureStatus(signature2);\n if (done)\n return;\n if (response == null) {\n return;\n }\n const {\n context: context2,\n value\n } = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case \"confirmed\":\n case \"single\":\n case \"singleGossip\": {\n if (value.confirmationStatus === \"processed\") {\n return;\n }\n break;\n }\n case \"finalized\":\n case \"max\":\n case \"root\": {\n if (value.confirmationStatus === \"processed\" || value.confirmationStatus === \"confirmed\") {\n return;\n }\n break;\n }\n case \"processed\":\n case \"recent\":\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context: context2,\n value\n }\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = void 0;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = void 0;\n }\n };\n return {\n abortConfirmation,\n confirmationPromise\n };\n }\n async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {\n abortSignal,\n lastValidBlockHeight,\n signature: signature2\n }\n }) {\n let done = false;\n const expiryPromise = new Promise((resolve) => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done)\n return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1e3);\n if (done)\n return;\n currentBlockHeight = await checkBlockHeight();\n if (done)\n return;\n }\n resolve({\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED\n });\n })();\n });\n const {\n abortConfirmation,\n confirmationPromise\n } = this.getTransactionConfirmationPromise({\n commitment,\n signature: signature2\n });\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result;\n try {\n const outcome = await Promise.race([cancellationPromise, confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature2);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature: signature2\n }\n }) {\n let done = false;\n const expiryPromise = new Promise((resolve) => {\n let currentNonceValue = nonceValue;\n let lastCheckedSlot = null;\n const getCurrentNonceValue = async () => {\n try {\n const {\n context: context2,\n value: nonceAccount\n } = await this.getNonceAndContext(nonceAccountPubkey, {\n commitment,\n minContextSlot\n });\n lastCheckedSlot = context2.slot;\n return nonceAccount?.nonce;\n } catch (e2) {\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done)\n return;\n while (true) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot\n });\n return;\n }\n await sleep(2e3);\n if (done)\n return;\n currentNonceValue = await getCurrentNonceValue();\n if (done)\n return;\n }\n })();\n });\n const {\n abortConfirmation,\n confirmationPromise\n } = this.getTransactionConfirmationPromise({\n commitment,\n signature: signature2\n });\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result;\n try {\n const outcome = await Promise.race([cancellationPromise, confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n let signatureStatus;\n while (true) {\n const status = await this.getSignatureStatus(signature2);\n if (status == null) {\n break;\n }\n if (status.context.slot < (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || \"finalized\";\n const {\n confirmationStatus\n } = signatureStatus.value;\n switch (commitmentForStatus) {\n case \"processed\":\n case \"recent\":\n if (confirmationStatus !== \"processed\" && confirmationStatus !== \"confirmed\" && confirmationStatus !== \"finalized\") {\n throw new TransactionExpiredNonceInvalidError(signature2);\n }\n break;\n case \"confirmed\":\n case \"single\":\n case \"singleGossip\":\n if (confirmationStatus !== \"confirmed\" && confirmationStatus !== \"finalized\") {\n throw new TransactionExpiredNonceInvalidError(signature2);\n }\n break;\n case \"finalized\":\n case \"max\":\n case \"root\":\n if (confirmationStatus !== \"finalized\") {\n throw new TransactionExpiredNonceInvalidError(signature2);\n }\n break;\n default:\n /* @__PURE__ */ ((_2) => {\n })(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {\n err: signatureStatus.value.err\n }\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature2);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature: signature2\n }) {\n let timeoutId;\n const expiryPromise = new Promise((resolve) => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1e3;\n switch (commitment) {\n case \"processed\":\n case \"recent\":\n case \"single\":\n case \"confirmed\":\n case \"singleGossip\": {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1e3;\n break;\n }\n }\n timeoutId = setTimeout(() => resolve({\n __type: TransactionStatus.TIMED_OUT,\n timeoutMs\n }), timeoutMs);\n });\n const {\n abortConfirmation,\n confirmationPromise\n } = this.getTransactionConfirmationPromise({\n commitment,\n signature: signature2\n });\n let result;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(signature2, outcome.timeoutMs / 1e3);\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes() {\n const unsafeRes = await this._rpcRequest(\"getClusterNodes\", []);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.array(ContactInfoResult)));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get cluster nodes\");\n }\n return res.result;\n }\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment) {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest(\"getVoteAccounts\", args);\n const res = superstruct.create(unsafeRes, GetVoteAccounts);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get vote accounts\");\n }\n return res.result;\n }\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, void 0, config2);\n const unsafeRes = await this._rpcRequest(\"getSlot\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.number()));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get slot\");\n }\n return res.result;\n }\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, void 0, config2);\n const unsafeRes = await this._rpcRequest(\"getSlotLeader\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.string()));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get slot leader\");\n }\n return res.result;\n }\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(startSlot, limit) {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest(\"getSlotLeaders\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.array(PublicKeyFromString)));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get slot leaders\");\n }\n return res.result;\n }\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(signature2, config2) {\n const {\n context: context2,\n value: values\n } = await this.getSignatureStatuses([signature2], config2);\n assert9(values.length === 1);\n const value = values[0];\n return {\n context: context2,\n value\n };\n }\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(signatures, config2) {\n const params = [signatures];\n if (config2) {\n params.push(config2);\n }\n const unsafeRes = await this._rpcRequest(\"getSignatureStatuses\", params);\n const res = superstruct.create(unsafeRes, GetSignatureStatusesRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get signature status\");\n }\n return res.result;\n }\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, void 0, config2);\n const unsafeRes = await this._rpcRequest(\"getTransactionCount\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.number()));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get transaction count\");\n }\n return res.result;\n }\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since RPC v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment) {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true\n });\n return result.value.total;\n }\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(commitment) {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest(\"getInflationGovernor\", args);\n const res = superstruct.create(unsafeRes, GetInflationGovernorRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get inflation\");\n }\n return res.result;\n }\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(addresses4, epoch, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([addresses4.map((pubkey) => pubkey.toBase58())], commitment, void 0, {\n ...config2,\n epoch: epoch != null ? epoch : config2?.epoch\n });\n const unsafeRes = await this._rpcRequest(\"getInflationReward\", args);\n const res = superstruct.create(unsafeRes, GetInflationRewardResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get inflation reward\");\n }\n return res.result;\n }\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate() {\n const unsafeRes = await this._rpcRequest(\"getInflationRate\", []);\n const res = superstruct.create(unsafeRes, GetInflationRateRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get inflation rate\");\n }\n return res.result;\n }\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, void 0, config2);\n const unsafeRes = await this._rpcRequest(\"getEpochInfo\", args);\n const res = superstruct.create(unsafeRes, GetEpochInfoRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get epoch info\");\n }\n return res.result;\n }\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule() {\n const unsafeRes = await this._rpcRequest(\"getEpochSchedule\", []);\n const res = superstruct.create(unsafeRes, GetEpochScheduleRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get epoch schedule\");\n }\n const epochSchedule = res.result;\n return new EpochSchedule(epochSchedule.slotsPerEpoch, epochSchedule.leaderScheduleSlotOffset, epochSchedule.warmup, epochSchedule.firstNormalEpoch, epochSchedule.firstNormalSlot);\n }\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule() {\n const unsafeRes = await this._rpcRequest(\"getLeaderSchedule\", []);\n const res = superstruct.create(unsafeRes, GetLeaderScheduleRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get leader schedule\");\n }\n return res.result;\n }\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(dataLength, commitment) {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest(\"getMinimumBalanceForRentExemption\", args);\n const res = superstruct.create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if (\"error\" in res) {\n console.warn(\"Unable to fetch minimum balance for rent exemption\");\n return 0;\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since RPC v1.9.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment) {\n const {\n context: context2,\n value: {\n blockhash\n }\n } = await this.getLatestBlockhashAndContext(commitment);\n const feeCalculator = {\n get lamportsPerSignature() {\n throw new Error(\"The capability to fetch `lamportsPerSignature` using the `getRecentBlockhash` API is no longer offered by the network. Use the `getFeeForMessage` API to obtain the fee for a given message.\");\n },\n toJSON() {\n return {};\n }\n };\n return {\n context: context2,\n value: {\n blockhash,\n feeCalculator\n }\n };\n }\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(limit) {\n const unsafeRes = await this._rpcRequest(\"getRecentPerformanceSamples\", limit ? [limit] : []);\n const res = superstruct.create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get recent performance samples\");\n }\n return res.result;\n }\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since RPC v1.9.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(blockhash, commitment) {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest(\"getFeeCalculatorForBlockhash\", args);\n const res = superstruct.create(unsafeRes, GetFeeCalculatorRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get fee calculator\");\n }\n const {\n context: context2,\n value\n } = res.result;\n return {\n context: context2,\n value: value !== null ? value.feeCalculator : null\n };\n }\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(message2, commitment) {\n const wireMessage = toBuffer(message2.serialize()).toString(\"base64\");\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest(\"getFeeForMessage\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(superstruct.nullable(superstruct.number())));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get fee for message\");\n }\n if (res.result === null) {\n throw new Error(\"invalid blockhash\");\n }\n return res.result;\n }\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(config2) {\n const accounts = config2?.lockedWritableAccounts?.map((key) => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest(\"getRecentPrioritizationFees\", args);\n const res = superstruct.create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get recent prioritization fees\");\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(commitment) {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e2) {\n throw new Error(\"failed to get recent blockhash: \" + e2);\n }\n }\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(commitmentOrConfig) {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e2) {\n throw new Error(\"failed to get recent blockhash: \" + e2);\n }\n }\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs([], commitment, void 0, config2);\n const unsafeRes = await this._rpcRequest(\"getLatestBlockhash\", args);\n const res = superstruct.create(unsafeRes, GetLatestBlockhashRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get latest blockhash\");\n }\n return res.result;\n }\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(blockhash, rawConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs([blockhash], commitment, void 0, config2);\n const unsafeRes = await this._rpcRequest(\"isBlockhashValid\", args);\n const res = superstruct.create(unsafeRes, IsBlockhashValidRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to determine if the blockhash `\" + blockhash + \"`is valid\");\n }\n return res.result;\n }\n /**\n * Fetch the node version\n */\n async getVersion() {\n const unsafeRes = await this._rpcRequest(\"getVersion\", []);\n const res = superstruct.create(unsafeRes, jsonRpcResult(VersionResult));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get version\");\n }\n return res.result;\n }\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash() {\n const unsafeRes = await this._rpcRequest(\"getGenesisHash\", []);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.string()));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get genesis hash\");\n }\n return res.result;\n }\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n // eslint-disable-next-line no-dupe-class-members\n // eslint-disable-next-line no-dupe-class-members\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(slot, rawConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, void 0, config2);\n const unsafeRes = await this._rpcRequest(\"getBlock\", args);\n try {\n switch (config2?.transactionDetails) {\n case \"accounts\": {\n const res = superstruct.create(unsafeRes, GetAccountsModeBlockRpcResult);\n if (\"error\" in res) {\n throw res.error;\n }\n return res.result;\n }\n case \"none\": {\n const res = superstruct.create(unsafeRes, GetNoneModeBlockRpcResult);\n if (\"error\" in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = superstruct.create(unsafeRes, GetBlockRpcResult);\n if (\"error\" in res) {\n throw res.error;\n }\n const {\n result\n } = res;\n return result ? {\n ...result,\n transactions: result.transactions.map(({\n transaction,\n meta,\n version: version7\n }) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(version7, transaction.message)\n },\n version: version7\n }))\n } : null;\n }\n }\n } catch (e2) {\n throw new SolanaJSONRPCError(e2, \"failed to get confirmed block\");\n }\n }\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n // eslint-disable-next-line no-dupe-class-members\n // eslint-disable-next-line no-dupe-class-members\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(slot, rawConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, \"jsonParsed\", config2);\n const unsafeRes = await this._rpcRequest(\"getBlock\", args);\n try {\n switch (config2?.transactionDetails) {\n case \"accounts\": {\n const res = superstruct.create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if (\"error\" in res) {\n throw res.error;\n }\n return res.result;\n }\n case \"none\": {\n const res = superstruct.create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if (\"error\" in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = superstruct.create(unsafeRes, GetParsedBlockRpcResult);\n if (\"error\" in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e2) {\n throw new SolanaJSONRPCError(e2, \"failed to get block\");\n }\n }\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(configOrCommitment) {\n let extra;\n let commitment;\n if (typeof configOrCommitment === \"string\") {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {\n commitment: c4,\n ...rest\n } = configOrCommitment;\n commitment = c4;\n extra = rest;\n }\n const args = this._buildArgs([], commitment, \"base64\", extra);\n const unsafeRes = await this._rpcRequest(\"getBlockProduction\", args);\n const res = superstruct.create(unsafeRes, BlockProductionResponseStruct);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get block production information\");\n }\n return res.result;\n }\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(signature2, rawConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed([signature2], commitment, void 0, config2);\n const unsafeRes = await this._rpcRequest(\"getTransaction\", args);\n const res = superstruct.create(unsafeRes, GetTransactionRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get transaction\");\n }\n const result = res.result;\n if (!result)\n return result;\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(result.version, result.transaction.message)\n }\n };\n }\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(signature2, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed([signature2], commitment, \"jsonParsed\", config2);\n const unsafeRes = await this._rpcRequest(\"getTransaction\", args);\n const res = superstruct.create(unsafeRes, GetParsedTransactionRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get transaction\");\n }\n return res.result;\n }\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(signatures, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map((signature2) => {\n const args = this._buildArgsAtLeastConfirmed([signature2], commitment, \"jsonParsed\", config2);\n return {\n methodName: \"getTransaction\",\n args\n };\n });\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes2) => {\n const res2 = superstruct.create(unsafeRes2, GetParsedTransactionRpcResult);\n if (\"error\" in res2) {\n throw new SolanaJSONRPCError(res2.error, \"failed to get transactions\");\n }\n return res2.result;\n });\n return res;\n }\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(signatures, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map((signature2) => {\n const args = this._buildArgsAtLeastConfirmed([signature2], commitment, void 0, config2);\n return {\n methodName: \"getTransaction\",\n args\n };\n });\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes2) => {\n const res2 = superstruct.create(unsafeRes2, GetTransactionRpcResult);\n if (\"error\" in res2) {\n throw new SolanaJSONRPCError(res2.error, \"failed to get transactions\");\n }\n const result = res2.result;\n if (!result)\n return result;\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(result.version, result.transaction.message)\n }\n };\n });\n return res;\n }\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(slot, commitment) {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest(\"getBlock\", args);\n const res = superstruct.create(unsafeRes, GetConfirmedBlockRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get confirmed block\");\n }\n const result = res.result;\n if (!result) {\n throw new Error(\"Confirmed block \" + slot + \" not found\");\n }\n const block = {\n ...result,\n transactions: result.transactions.map(({\n transaction,\n meta\n }) => {\n const message2 = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message: message2\n }\n };\n })\n };\n return {\n ...block,\n transactions: block.transactions.map(({\n transaction,\n meta\n }) => {\n return {\n meta,\n transaction: Transaction5.populate(transaction.message, transaction.signatures)\n };\n })\n };\n }\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(startSlot, endSlot, commitment) {\n const args = this._buildArgsAtLeastConfirmed(endSlot !== void 0 ? [startSlot, endSlot] : [startSlot], commitment);\n const unsafeRes = await this._rpcRequest(\"getBlocks\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResult(superstruct.array(superstruct.number())));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get blocks\");\n }\n return res.result;\n }\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(slot, commitment) {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, void 0, {\n transactionDetails: \"signatures\",\n rewards: false\n });\n const unsafeRes = await this._rpcRequest(\"getBlock\", args);\n const res = superstruct.create(unsafeRes, GetBlockSignaturesRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get block\");\n }\n const result = res.result;\n if (!result) {\n throw new Error(\"Block \" + slot + \" not found\");\n }\n return result;\n }\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(slot, commitment) {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment, void 0, {\n transactionDetails: \"signatures\",\n rewards: false\n });\n const unsafeRes = await this._rpcRequest(\"getBlock\", args);\n const res = superstruct.create(unsafeRes, GetBlockSignaturesRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get confirmed block\");\n }\n const result = res.result;\n if (!result) {\n throw new Error(\"Confirmed block \" + slot + \" not found\");\n }\n return result;\n }\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(signature2, commitment) {\n const args = this._buildArgsAtLeastConfirmed([signature2], commitment);\n const unsafeRes = await this._rpcRequest(\"getTransaction\", args);\n const res = superstruct.create(unsafeRes, GetTransactionRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get transaction\");\n }\n const result = res.result;\n if (!result)\n return result;\n const message2 = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction5.populate(message2, signatures)\n };\n }\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(signature2, commitment) {\n const args = this._buildArgsAtLeastConfirmed([signature2], commitment, \"jsonParsed\");\n const unsafeRes = await this._rpcRequest(\"getTransaction\", args);\n const res = superstruct.create(unsafeRes, GetParsedTransactionRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get confirmed transaction\");\n }\n return res.result;\n }\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(signatures, commitment) {\n const batch = signatures.map((signature2) => {\n const args = this._buildArgsAtLeastConfirmed([signature2], commitment, \"jsonParsed\");\n return {\n methodName: \"getTransaction\",\n args\n };\n });\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes2) => {\n const res2 = superstruct.create(unsafeRes2, GetParsedTransactionRpcResult);\n if (\"error\" in res2) {\n throw new SolanaJSONRPCError(res2.error, \"failed to get confirmed transactions\");\n }\n return res2.result;\n });\n return res;\n }\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since RPC v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(address, startSlot, endSlot) {\n let options = {};\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!(\"until\" in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n try {\n const block = await this.getConfirmedBlockSignatures(startSlot, \"finalized\");\n if (block.signatures.length > 0) {\n options.until = block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes(\"skipped\")) {\n continue;\n } else {\n throw err;\n }\n }\n }\n let highestConfirmedRoot = await this.getSlot(\"finalized\");\n while (!(\"before\" in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before = block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes(\"skipped\")) {\n continue;\n } else {\n throw err;\n }\n }\n }\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(address, options);\n return confirmedSignatureInfo.map((info) => info.signature);\n }\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getSignaturesForAddress} instead.\n */\n async getConfirmedSignaturesForAddress2(address, options, commitment) {\n const args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, void 0, options);\n const unsafeRes = await this._rpcRequest(\"getConfirmedSignaturesForAddress2\", args);\n const res = superstruct.create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get confirmed signatures for address\");\n }\n return res.result;\n }\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(address, options, commitment) {\n const args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, void 0, options);\n const unsafeRes = await this._rpcRequest(\"getSignaturesForAddress\", args);\n const res = superstruct.create(unsafeRes, GetSignaturesForAddressRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, \"failed to get signatures for address\");\n }\n return res.result;\n }\n async getAddressLookupTable(accountKey, config2) {\n const {\n context: context2,\n value: accountInfo\n } = await this.getAccountInfoAndContext(accountKey, config2);\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data)\n });\n }\n return {\n context: context2,\n value\n };\n }\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(nonceAccount, commitmentOrConfig) {\n const {\n context: context2,\n value: accountInfo\n } = await this.getAccountInfoAndContext(nonceAccount, commitmentOrConfig);\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n return {\n context: context2,\n value\n };\n }\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(nonceAccount, commitmentOrConfig) {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig).then((x4) => x4.value).catch((e2) => {\n throw new Error(\"failed to get nonce for account \" + nonceAccount.toBase58() + \": \" + e2);\n });\n }\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(to, lamports) {\n const unsafeRes = await this._rpcRequest(\"requestAirdrop\", [to.toBase58(), lamports]);\n const res = superstruct.create(unsafeRes, RequestAirdropRpcResult);\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `airdrop to ${to.toBase58()} failed`);\n }\n return res.result;\n }\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(disableCache) {\n if (!disableCache) {\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n return await this._pollNewBlockhash();\n }\n /**\n * @internal\n */\n async _pollNewBlockhash() {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash ? cachedLatestBlockhash.blockhash : null;\n for (let i3 = 0; i3 < 50; i3++) {\n const latestBlockhash = await this.getLatestBlockhash(\"finalized\");\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: []\n };\n return latestBlockhash;\n }\n await sleep(MS_PER_SLOT / 2);\n }\n throw new Error(`Unable to obtain a new blockhash after ${Date.now() - startTime}ms`);\n } finally {\n this._pollingBlockhash = false;\n }\n }\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(config2) {\n const {\n commitment,\n config: configArg\n } = extractCommitmentFromConfig(config2);\n const args = this._buildArgs([], commitment, \"base64\", configArg);\n const unsafeRes = await this._rpcRequest(\"getStakeMinimumDelegation\", args);\n const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(superstruct.number()));\n if (\"error\" in res) {\n throw new SolanaJSONRPCError(res.error, `failed to get stake minimum delegation`);\n }\n return res.result;\n }\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(transactionOrMessage, configOrSigners, includeAccounts) {\n if (\"message\" in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction2 = versionedTx.serialize();\n const encodedTransaction2 = buffer2.Buffer.from(wireTransaction2).toString(\"base64\");\n if (Array.isArray(configOrSigners) || includeAccounts !== void 0) {\n throw new Error(\"Invalid arguments\");\n }\n const config3 = configOrSigners || {};\n config3.encoding = \"base64\";\n if (!(\"commitment\" in config3)) {\n config3.commitment = this.commitment;\n }\n if (configOrSigners && typeof configOrSigners === \"object\" && \"innerInstructions\" in configOrSigners) {\n config3.innerInstructions = configOrSigners.innerInstructions;\n }\n const args2 = [encodedTransaction2, config3];\n const unsafeRes2 = await this._rpcRequest(\"simulateTransaction\", args2);\n const res2 = superstruct.create(unsafeRes2, SimulatedTransactionResponseStruct);\n if (\"error\" in res2) {\n throw new Error(\"failed to simulate transaction: \" + res2.error.message);\n }\n return res2.result;\n }\n let transaction;\n if (transactionOrMessage instanceof Transaction5) {\n let originalTx = transactionOrMessage;\n transaction = new Transaction5();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction5.populate(transactionOrMessage);\n transaction._message = transaction._json = void 0;\n }\n if (configOrSigners !== void 0 && !Array.isArray(configOrSigners)) {\n throw new Error(\"Invalid arguments\");\n }\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (; ; ) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(disableCache);\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n if (!signers)\n break;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error(\"!signature\");\n }\n const signature2 = transaction.signature.toString(\"base64\");\n if (!this._blockhashInfo.simulatedSignatures.includes(signature2) && !this._blockhashInfo.transactionSignatures.includes(signature2)) {\n this._blockhashInfo.simulatedSignatures.push(signature2);\n break;\n } else {\n disableCache = true;\n }\n }\n }\n const message2 = transaction._compile();\n const signData = message2.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString(\"base64\");\n const config2 = {\n encoding: \"base64\",\n commitment: this.commitment\n };\n if (includeAccounts) {\n const addresses4 = (Array.isArray(includeAccounts) ? includeAccounts : message2.nonProgramIds()).map((key) => key.toBase58());\n config2[\"accounts\"] = {\n encoding: \"base64\",\n addresses: addresses4\n };\n }\n if (signers) {\n config2.sigVerify = true;\n }\n if (configOrSigners && typeof configOrSigners === \"object\" && \"innerInstructions\" in configOrSigners) {\n config2.innerInstructions = configOrSigners.innerInstructions;\n }\n const args = [encodedTransaction, config2];\n const unsafeRes = await this._rpcRequest(\"simulateTransaction\", args);\n const res = superstruct.create(unsafeRes, SimulatedTransactionResponseStruct);\n if (\"error\" in res) {\n let logs;\n if (\"data\" in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = \"\\n \";\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n throw new SendTransactionError({\n action: \"simulate\",\n signature: \"\",\n transactionMessage: res.error.message,\n logs\n });\n }\n return res.result;\n }\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(transaction, signersOrOptions, options) {\n if (\"version\" in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error(\"Invalid arguments\");\n }\n const wireTransaction2 = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction2, signersOrOptions);\n }\n if (signersOrOptions === void 0 || !Array.isArray(signersOrOptions)) {\n throw new Error(\"Invalid arguments\");\n }\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (; ; ) {\n const latestBlockhash = await this._blockhashWithExpiryBlockHeight(disableCache);\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error(\"!signature\");\n }\n const signature2 = transaction.signature.toString(\"base64\");\n if (!this._blockhashInfo.transactionSignatures.includes(signature2)) {\n this._blockhashInfo.transactionSignatures.push(signature2);\n break;\n } else {\n disableCache = true;\n }\n }\n }\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(rawTransaction, options) {\n const encodedTransaction = toBuffer(rawTransaction).toString(\"base64\");\n const result = await this.sendEncodedTransaction(encodedTransaction, options);\n return result;\n }\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(encodedTransaction, options) {\n const config2 = {\n encoding: \"base64\"\n };\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment = skipPreflight === true ? \"processed\" : options && options.preflightCommitment || this.commitment;\n if (options && options.maxRetries != null) {\n config2.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config2.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config2.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config2.preflightCommitment = preflightCommitment;\n }\n const args = [encodedTransaction, config2];\n const unsafeRes = await this._rpcRequest(\"sendTransaction\", args);\n const res = superstruct.create(unsafeRes, SendTransactionRpcResult);\n if (\"error\" in res) {\n let logs = void 0;\n if (\"data\" in res.error) {\n logs = res.error.data.logs;\n }\n throw new SendTransactionError({\n action: skipPreflight ? \"send\" : \"simulate\",\n signature: \"\",\n transactionMessage: res.error.message,\n logs\n });\n }\n return res.result;\n }\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n (async () => {\n try {\n await this._rpcWebSocket.notify(\"ping\");\n } catch {\n }\n })();\n }, 5e3);\n this._updateSubscriptions();\n }\n /**\n * @internal\n */\n _wsOnError(err) {\n this._rpcWebSocketConnected = false;\n console.error(\"ws error:\", err.message);\n }\n /**\n * @internal\n */\n _wsOnClose(code) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration = (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n if (code === 1e3) {\n this._updateSubscriptions();\n return;\n }\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(this._subscriptionsByHash).forEach(([hash3, subscription]) => {\n this._setSubscription(hash3, {\n ...subscription,\n state: \"pending\"\n });\n });\n }\n /**\n * @internal\n */\n _setSubscription(hash3, nextSubscription) {\n const prevState = this._subscriptionsByHash[hash3]?.state;\n this._subscriptionsByHash[hash3] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks = this._subscriptionStateChangeCallbacksByHash[hash3];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach((cb) => {\n try {\n cb(nextSubscription.state);\n } catch {\n }\n });\n }\n }\n }\n /**\n * @internal\n */\n _onSubscriptionStateChange(clientSubscriptionId, callback) {\n const hash3 = this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash3 == null) {\n return () => {\n };\n }\n const stateChangeCallbacks = this._subscriptionStateChangeCallbacksByHash[hash3] ||= /* @__PURE__ */ new Set();\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash3];\n }\n };\n }\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n if (err instanceof Error) {\n console.log(`Error when closing socket connection: ${err.message}`);\n }\n }\n }, 500);\n }\n return;\n }\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async (hash3) => {\n const subscription = this._subscriptionsByHash[hash3];\n if (subscription === void 0) {\n return;\n }\n switch (subscription.state) {\n case \"pending\":\n case \"unsubscribed\":\n if (subscription.callbacks.size === 0) {\n delete this._subscriptionsByHash[hash3];\n if (subscription.state === \"unsubscribed\") {\n delete this._subscriptionCallbacksByServerSubscriptionId[subscription.serverSubscriptionId];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {\n args,\n method\n } = subscription;\n try {\n this._setSubscription(hash3, {\n ...subscription,\n state: \"subscribing\"\n });\n const serverSubscriptionId = await this._rpcWebSocket.call(method, args);\n this._setSubscription(hash3, {\n ...subscription,\n serverSubscriptionId,\n state: \"subscribed\"\n });\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e2) {\n console.error(`Received ${e2 instanceof Error ? \"\" : \"JSON-RPC \"}error calling \\`${method}\\``, {\n args,\n error: e2\n });\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n this._setSubscription(hash3, {\n ...subscription,\n state: \"pending\"\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case \"subscribed\":\n if (subscription.callbacks.size === 0) {\n await (async () => {\n const {\n serverSubscriptionId,\n unsubscribeMethod\n } = subscription;\n if (this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)) {\n this._subscriptionsAutoDisposedByRpc.delete(serverSubscriptionId);\n } else {\n this._setSubscription(hash3, {\n ...subscription,\n state: \"unsubscribing\"\n });\n this._setSubscription(hash3, {\n ...subscription,\n state: \"unsubscribing\"\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [serverSubscriptionId]);\n } catch (e2) {\n if (e2 instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e2.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n this._setSubscription(hash3, {\n ...subscription,\n state: \"subscribed\"\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash3, {\n ...subscription,\n state: \"unsubscribed\"\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n }\n })\n );\n }\n /**\n * @internal\n */\n _handleServerNotification(serverSubscriptionId, callbackArgs) {\n const callbacks = this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === void 0) {\n return;\n }\n callbacks.forEach((cb) => {\n try {\n cb(\n ...callbackArgs\n );\n } catch (e2) {\n console.error(e2);\n }\n });\n }\n /**\n * @internal\n */\n _wsOnAccountNotification(notification) {\n const {\n result,\n subscription\n } = superstruct.create(notification, AccountNotificationResult);\n this._handleServerNotification(subscription, [result.value, result.context]);\n }\n /**\n * @internal\n */\n _makeSubscription(subscriptionConfig, args) {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash3 = fastStableStringify([subscriptionConfig.method, args]);\n const existingSubscription = this._subscriptionsByHash[hash3];\n if (existingSubscription === void 0) {\n this._subscriptionsByHash[hash3] = {\n ...subscriptionConfig,\n args,\n callbacks: /* @__PURE__ */ new Set([subscriptionConfig.callback]),\n state: \"pending\"\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash3;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash3];\n assert9(subscription !== void 0, `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`);\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param config\n * @return subscription id\n */\n /** @deprecated Instead, pass in an {@link AccountSubscriptionConfig} */\n // eslint-disable-next-line no-dupe-class-members\n // eslint-disable-next-line no-dupe-class-members\n onAccountChange(publicKey2, callback, commitmentOrConfig) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey2.toBase58()],\n commitment || this._commitment || \"finalized\",\n // Apply connection/server default.\n \"base64\",\n config2\n );\n return this._makeSubscription({\n callback,\n method: \"accountSubscribe\",\n unsubscribeMethod: \"accountUnsubscribe\"\n }, args);\n }\n /**\n * Deregister an account notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeAccountChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, \"account change\");\n }\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification) {\n const {\n result,\n subscription\n } = superstruct.create(notification, ProgramAccountNotificationResult);\n this._handleServerNotification(subscription, [{\n accountId: result.value.pubkey,\n accountInfo: result.value.account\n }, result.context]);\n }\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param config\n * @return subscription id\n */\n /** @deprecated Instead, pass in a {@link ProgramAccountSubscriptionConfig} */\n // eslint-disable-next-line no-dupe-class-members\n // eslint-disable-next-line no-dupe-class-members\n onProgramAccountChange(programId, callback, commitmentOrConfig, maybeFilters) {\n const {\n commitment,\n config: config2\n } = extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment || this._commitment || \"finalized\",\n // Apply connection/server default.\n \"base64\",\n config2 ? config2 : maybeFilters ? {\n filters: applyDefaultMemcmpEncodingToFilters(maybeFilters)\n } : void 0\n /* extra */\n );\n return this._makeSubscription({\n callback,\n method: \"programSubscribe\",\n unsubscribeMethod: \"programUnsubscribe\"\n }, args);\n }\n /**\n * Deregister an account notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeProgramAccountChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, \"program account change\");\n }\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(filter, callback, commitment) {\n const args = this._buildArgs(\n [typeof filter === \"object\" ? {\n mentions: [filter.toString()]\n } : filter],\n commitment || this._commitment || \"finalized\"\n // Apply connection/server default.\n );\n return this._makeSubscription({\n callback,\n method: \"logsSubscribe\",\n unsubscribeMethod: \"logsUnsubscribe\"\n }, args);\n }\n /**\n * Deregister a logs callback.\n *\n * @param clientSubscriptionId client subscription id to deregister.\n */\n async removeOnLogsListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, \"logs\");\n }\n /**\n * @internal\n */\n _wsOnLogsNotification(notification) {\n const {\n result,\n subscription\n } = superstruct.create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [result.value, result.context]);\n }\n /**\n * @internal\n */\n _wsOnSlotNotification(notification) {\n const {\n result,\n subscription\n } = superstruct.create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback) {\n return this._makeSubscription(\n {\n callback,\n method: \"slotSubscribe\",\n unsubscribeMethod: \"slotUnsubscribe\"\n },\n []\n /* args */\n );\n }\n /**\n * Deregister a slot notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeSlotChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, \"slot change\");\n }\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification) {\n const {\n result,\n subscription\n } = superstruct.create(notification, SlotUpdateNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback) {\n return this._makeSubscription(\n {\n callback,\n method: \"slotsUpdatesSubscribe\",\n unsubscribeMethod: \"slotsUpdatesUnsubscribe\"\n },\n []\n /* args */\n );\n }\n /**\n * Deregister a slot update notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeSlotUpdateListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, \"slot update\");\n }\n /**\n * @internal\n */\n async _unsubscribeClientSubscription(clientSubscriptionId, subscriptionName) {\n const dispose = this._subscriptionDisposeFunctionsByClientSubscriptionId[clientSubscriptionId];\n if (dispose) {\n await dispose();\n } else {\n console.warn(`Ignored unsubscribe request because an active subscription with id \\`${clientSubscriptionId}\\` for '${subscriptionName}' events could not be found.`);\n }\n }\n _buildArgs(args, override, encoding, extra) {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(args, override, encoding, extra) {\n const commitment = override || this._commitment;\n if (commitment && ![\"confirmed\", \"finalized\"].includes(commitment)) {\n throw new Error(\"Using Connection with default commitment: `\" + this._commitment + \"`, but method requires at least `confirmed`\");\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification) {\n const {\n result,\n subscription\n } = superstruct.create(notification, SignatureNotificationResult);\n if (result.value !== \"receivedSignature\") {\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(subscription, result.value === \"receivedSignature\" ? [{\n type: \"received\"\n }, result.context] : [{\n type: \"status\",\n result: result.value\n }, result.context]);\n }\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(signature2, callback, commitment) {\n const args = this._buildArgs(\n [signature2],\n commitment || this._commitment || \"finalized\"\n // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription({\n callback: (notification, context2) => {\n if (notification.type === \"status\") {\n callback(notification.result, context2);\n try {\n this.removeSignatureListener(clientSubscriptionId);\n } catch (_err) {\n }\n }\n },\n method: \"signatureSubscribe\",\n unsubscribeMethod: \"signatureUnsubscribe\"\n }, args);\n return clientSubscriptionId;\n }\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(signature2, callback, options) {\n const {\n commitment,\n ...extra\n } = {\n ...options,\n commitment: options && options.commitment || this._commitment || \"finalized\"\n // Apply connection/server default.\n };\n const args = this._buildArgs([signature2], commitment, void 0, extra);\n const clientSubscriptionId = this._makeSubscription({\n callback: (notification, context2) => {\n callback(notification, context2);\n try {\n this.removeSignatureListener(clientSubscriptionId);\n } catch (_err) {\n }\n },\n method: \"signatureSubscribe\",\n unsubscribeMethod: \"signatureUnsubscribe\"\n }, args);\n return clientSubscriptionId;\n }\n /**\n * Deregister a signature notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeSignatureListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, \"signature result\");\n }\n /**\n * @internal\n */\n _wsOnRootNotification(notification) {\n const {\n result,\n subscription\n } = superstruct.create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback) {\n return this._makeSubscription(\n {\n callback,\n method: \"rootSubscribe\",\n unsubscribeMethod: \"rootUnsubscribe\"\n },\n []\n /* args */\n );\n }\n /**\n * Deregister a root notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeRootChangeListener(clientSubscriptionId) {\n await this._unsubscribeClientSubscription(clientSubscriptionId, \"root change\");\n }\n };\n var Keypair2 = class _Keypair {\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair) {\n this._keypair = void 0;\n this._keypair = keypair ?? generateKeypair();\n }\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate() {\n return new _Keypair(generateKeypair());\n }\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(secretKey, options) {\n if (secretKey.byteLength !== 64) {\n throw new Error(\"bad secret key size\");\n }\n const publicKey2 = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey2[ii] !== computedPublicKey[ii]) {\n throw new Error(\"provided secretKey is invalid\");\n }\n }\n }\n return new _Keypair({\n publicKey: publicKey2,\n secretKey\n });\n }\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed) {\n const publicKey2 = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey2, 32);\n return new _Keypair({\n publicKey: publicKey2,\n secretKey\n });\n }\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey() {\n return new PublicKey(this._keypair.publicKey);\n }\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey() {\n return new Uint8Array(this._keypair.secretKey);\n }\n };\n var LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), u64(\"recentSlot\"), BufferLayout__namespace.u8(\"bumpSeed\")])\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")])\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), u64(), BufferLayout__namespace.seq(publicKey(), BufferLayout__namespace.offset(BufferLayout__namespace.u32(), -8), \"addresses\")])\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")])\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")])\n }\n });\n var AddressLookupTableInstruction = class {\n /**\n * @internal\n */\n constructor() {\n }\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = BufferLayout__namespace.u32(\"instruction\");\n const index2 = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [layoutType, layout] of Object.entries(LOOKUP_TABLE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == index2) {\n type = layoutType;\n break;\n }\n }\n if (!type) {\n throw new Error(\"Invalid Instruction. Should be a LookupTable Instruction\");\n }\n return type;\n }\n static decodeCreateLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n const {\n recentSlot\n } = decodeData$1(LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable, instruction.data);\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot)\n };\n }\n static decodeExtendLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(`invalid instruction; found ${instruction.keys.length} keys, expected at least 2`);\n }\n const {\n addresses: addresses4\n } = decodeData$1(LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable, instruction.data);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys.length > 2 ? instruction.keys[2].pubkey : void 0,\n addresses: addresses4.map((buffer3) => new PublicKey(buffer3))\n };\n }\n static decodeCloseLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey\n };\n }\n static decodeFreezeLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey\n };\n }\n static decodeDeactivateLookupTable(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey\n };\n }\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error(\"invalid instruction; programId is not AddressLookupTable Program\");\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n };\n var AddressLookupTableProgram = class {\n /**\n * @internal\n */\n constructor() {\n }\n static createLookupTable(params) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync([params.authority.toBuffer(), codecsNumbers.getU64Encoder().encode(params.recentSlot)], this.programId);\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData3(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed\n });\n const keys = [{\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n }];\n return [new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n }), lookupTableAddress];\n }\n static freezeLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData3(type);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n static extendLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData3(type, {\n addresses: params.addresses.map((addr) => addr.toBytes())\n });\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n if (params.payer) {\n keys.push({\n pubkey: params.payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n });\n }\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n static deactivateLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData3(type);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n static closeLookupTable(params) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData3(type);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n };\n AddressLookupTableProgram.programId = new PublicKey(\"AddressLookupTab1e1111111111111111111111111\");\n var ComputeBudgetInstruction = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = BufferLayout__namespace.u8(\"instruction\");\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error(\"Instruction type incorrect; not a ComputeBudgetInstruction\");\n }\n return type;\n }\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n units,\n additionalFee\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits, instruction.data);\n return {\n units,\n additionalFee\n };\n }\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n bytes\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame, instruction.data);\n return {\n bytes\n };\n }\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n units\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit, instruction.data);\n return {\n units\n };\n }\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(instruction) {\n this.checkProgramId(instruction.programId);\n const {\n microLamports\n } = decodeData$1(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice, instruction.data);\n return {\n microLamports\n };\n }\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error(\"invalid instruction; programId is not ComputeBudgetProgram\");\n }\n }\n };\n var COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze({\n RequestUnits: {\n index: 0,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"instruction\"), BufferLayout__namespace.u32(\"units\"), BufferLayout__namespace.u32(\"additionalFee\")])\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"instruction\"), BufferLayout__namespace.u32(\"bytes\")])\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"instruction\"), BufferLayout__namespace.u32(\"units\")])\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"instruction\"), u64(\"microLamports\")])\n }\n });\n var ComputeBudgetProgram = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the Compute Budget program\n */\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData3(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static requestHeapFrame(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData3(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static setComputeUnitLimit(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData3(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static setComputeUnitPrice(params) {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData3(type, {\n microLamports: BigInt(params.microLamports)\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n };\n ComputeBudgetProgram.programId = new PublicKey(\"ComputeBudget111111111111111111111111111111\");\n var PRIVATE_KEY_BYTES$1 = 64;\n var PUBLIC_KEY_BYTES$1 = 32;\n var SIGNATURE_BYTES = 64;\n var ED25519_INSTRUCTION_LAYOUT = BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"numSignatures\"), BufferLayout__namespace.u8(\"padding\"), BufferLayout__namespace.u16(\"signatureOffset\"), BufferLayout__namespace.u16(\"signatureInstructionIndex\"), BufferLayout__namespace.u16(\"publicKeyOffset\"), BufferLayout__namespace.u16(\"publicKeyInstructionIndex\"), BufferLayout__namespace.u16(\"messageDataOffset\"), BufferLayout__namespace.u16(\"messageDataSize\"), BufferLayout__namespace.u16(\"messageInstructionIndex\")]);\n var Ed25519Program = class _Ed25519Program {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the ed25519 program\n */\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(params) {\n const {\n publicKey: publicKey2,\n message: message2,\n signature: signature2,\n instructionIndex\n } = params;\n assert9(publicKey2.length === PUBLIC_KEY_BYTES$1, `Public Key must be ${PUBLIC_KEY_BYTES$1} bytes but received ${publicKey2.length} bytes`);\n assert9(signature2.length === SIGNATURE_BYTES, `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature2.length} bytes`);\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey2.length;\n const messageDataOffset = signatureOffset + signature2.length;\n const numSignatures = 1;\n const instructionData = buffer2.Buffer.alloc(messageDataOffset + message2.length);\n const index2 = instructionIndex == null ? 65535 : instructionIndex;\n ED25519_INSTRUCTION_LAYOUT.encode({\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index2,\n publicKeyOffset,\n publicKeyInstructionIndex: index2,\n messageDataOffset,\n messageDataSize: message2.length,\n messageInstructionIndex: index2\n }, instructionData);\n instructionData.fill(publicKey2, publicKeyOffset);\n instructionData.fill(signature2, signatureOffset);\n instructionData.fill(message2, messageDataOffset);\n return new TransactionInstruction({\n keys: [],\n programId: _Ed25519Program.programId,\n data: instructionData\n });\n }\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(params) {\n const {\n privateKey,\n message: message2,\n instructionIndex\n } = params;\n assert9(privateKey.length === PRIVATE_KEY_BYTES$1, `Private key must be ${PRIVATE_KEY_BYTES$1} bytes but received ${privateKey.length} bytes`);\n try {\n const keypair = Keypair2.fromSecretKey(privateKey);\n const publicKey2 = keypair.publicKey.toBytes();\n const signature2 = sign4(message2, keypair.secretKey);\n return this.createInstructionWithPublicKey({\n publicKey: publicKey2,\n message: message2,\n signature: signature2,\n instructionIndex\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n };\n Ed25519Program.programId = new PublicKey(\"Ed25519SigVerify111111111111111111111111111\");\n var ecdsaSign = (msgHash, privKey) => {\n const signature2 = secp256k13.secp256k1.sign(msgHash, privKey);\n return [signature2.toCompactRawBytes(), signature2.recovery];\n };\n secp256k13.secp256k1.utils.isValidPrivateKey;\n var publicKeyCreate = secp256k13.secp256k1.getPublicKey;\n var PRIVATE_KEY_BYTES = 32;\n var ETHEREUM_ADDRESS_BYTES = 20;\n var PUBLIC_KEY_BYTES = 64;\n var SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n var SECP256K1_INSTRUCTION_LAYOUT = BufferLayout__namespace.struct([BufferLayout__namespace.u8(\"numSignatures\"), BufferLayout__namespace.u16(\"signatureOffset\"), BufferLayout__namespace.u8(\"signatureInstructionIndex\"), BufferLayout__namespace.u16(\"ethAddressOffset\"), BufferLayout__namespace.u8(\"ethAddressInstructionIndex\"), BufferLayout__namespace.u16(\"messageDataOffset\"), BufferLayout__namespace.u16(\"messageDataSize\"), BufferLayout__namespace.u8(\"messageInstructionIndex\"), BufferLayout__namespace.blob(20, \"ethAddress\"), BufferLayout__namespace.blob(64, \"signature\"), BufferLayout__namespace.u8(\"recoveryId\")]);\n var Secp256k1Program = class _Secp256k1Program {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the secp256k1 program\n */\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(publicKey2) {\n assert9(publicKey2.length === PUBLIC_KEY_BYTES, `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey2.length} bytes`);\n try {\n return buffer2.Buffer.from(sha3.keccak_256(toBuffer(publicKey2))).slice(-ETHEREUM_ADDRESS_BYTES);\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(params) {\n const {\n publicKey: publicKey2,\n message: message2,\n signature: signature2,\n recoveryId,\n instructionIndex\n } = params;\n return _Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: _Secp256k1Program.publicKeyToEthAddress(publicKey2),\n message: message2,\n signature: signature2,\n recoveryId,\n instructionIndex\n });\n }\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(params) {\n const {\n ethAddress: rawAddress,\n message: message2,\n signature: signature2,\n recoveryId,\n instructionIndex = 0\n } = params;\n let ethAddress2;\n if (typeof rawAddress === \"string\") {\n if (rawAddress.startsWith(\"0x\")) {\n ethAddress2 = buffer2.Buffer.from(rawAddress.substr(2), \"hex\");\n } else {\n ethAddress2 = buffer2.Buffer.from(rawAddress, \"hex\");\n }\n } else {\n ethAddress2 = rawAddress;\n }\n assert9(ethAddress2.length === ETHEREUM_ADDRESS_BYTES, `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress2.length} bytes`);\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress2.length;\n const messageDataOffset = signatureOffset + signature2.length + 1;\n const numSignatures = 1;\n const instructionData = buffer2.Buffer.alloc(SECP256K1_INSTRUCTION_LAYOUT.span + message2.length);\n SECP256K1_INSTRUCTION_LAYOUT.encode({\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message2.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature2),\n ethAddress: toBuffer(ethAddress2),\n recoveryId\n }, instructionData);\n instructionData.fill(toBuffer(message2), SECP256K1_INSTRUCTION_LAYOUT.span);\n return new TransactionInstruction({\n keys: [],\n programId: _Secp256k1Program.programId,\n data: instructionData\n });\n }\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(params) {\n const {\n privateKey: pkey,\n message: message2,\n instructionIndex\n } = params;\n assert9(pkey.length === PRIVATE_KEY_BYTES, `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`);\n try {\n const privateKey = toBuffer(pkey);\n const publicKey2 = publicKeyCreate(\n privateKey,\n false\n /* isCompressed */\n ).slice(1);\n const messageHash = buffer2.Buffer.from(sha3.keccak_256(toBuffer(message2)));\n const [signature2, recoveryId] = ecdsaSign(messageHash, privateKey);\n return this.createInstructionWithPublicKey({\n publicKey: publicKey2,\n message: message2,\n signature: signature2,\n recoveryId,\n instructionIndex\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n };\n Secp256k1Program.programId = new PublicKey(\"KeccakSecp256k11111111111111111111111111111\");\n var _Lockup;\n var STAKE_CONFIG_ID = new PublicKey(\"StakeConfig11111111111111111111111111111111\");\n var Authorized = class {\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker, withdrawer) {\n this.staker = void 0;\n this.withdrawer = void 0;\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n };\n var Lockup = class {\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp, epoch, custodian) {\n this.unixTimestamp = void 0;\n this.epoch = void 0;\n this.custodian = void 0;\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n /**\n * Default, inactive Lockup value\n */\n };\n _Lockup = Lockup;\n Lockup.default = new _Lockup(0, 0, PublicKey.default);\n var StakeInstruction = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = BufferLayout__namespace.u32(\"instruction\");\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error(\"Instruction type incorrect; not a StakeInstruction\");\n }\n return type;\n }\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n authorized: authorized2,\n lockup: lockup2\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Initialize, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(new PublicKey(authorized2.staker), new PublicKey(authorized2.withdrawer)),\n lockup: new Lockup(lockup2.unixTimestamp, lockup2.epoch, new PublicKey(lockup2.custodian))\n };\n }\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey\n };\n }\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n newAuthorized,\n stakeAuthorizationType\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Authorize, instruction.data);\n const o5 = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType\n }\n };\n if (instruction.keys.length > 3) {\n o5.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o5;\n }\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed, instruction.data);\n const o5 = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType\n }\n };\n if (instruction.keys.length > 3) {\n o5.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o5;\n }\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n lamports\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Split, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports\n };\n }\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey\n };\n }\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {\n lamports\n } = decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Withdraw, instruction.data);\n const o5 = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports\n };\n if (instruction.keys.length > 5) {\n o5.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o5;\n }\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData$1(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey\n };\n }\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error(\"invalid instruction; programId is not StakeProgram\");\n }\n }\n /**\n * @internal\n */\n static checkKeyLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n };\n var STAKE_INSTRUCTION_LAYOUTS = Object.freeze({\n Initialize: {\n index: 0,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), authorized(), lockup()])\n },\n Authorize: {\n index: 1,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), publicKey(\"newAuthorized\"), BufferLayout__namespace.u32(\"stakeAuthorizationType\")])\n },\n Delegate: {\n index: 2,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")])\n },\n Split: {\n index: 3,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), BufferLayout__namespace.ns64(\"lamports\")])\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), BufferLayout__namespace.ns64(\"lamports\")])\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")])\n },\n Merge: {\n index: 7,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")])\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), publicKey(\"newAuthorized\"), BufferLayout__namespace.u32(\"stakeAuthorizationType\"), rustString(\"authoritySeed\"), publicKey(\"authorityOwner\")])\n }\n });\n var StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0\n },\n Withdrawer: {\n index: 1\n }\n });\n var StakeProgram = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the Stake program\n */\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params) {\n const {\n stakePubkey,\n authorized: authorized2,\n lockup: maybeLockup\n } = params;\n const lockup2 = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData3(type, {\n authorized: {\n staker: toBuffer(authorized2.staker.toBuffer()),\n withdrawer: toBuffer(authorized2.withdrawer.toBuffer())\n },\n lockup: {\n unixTimestamp: lockup2.unixTimestamp,\n epoch: lockup2.epoch,\n custodian: toBuffer(lockup2.custodian.toBuffer())\n }\n });\n const instructionData = {\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(params) {\n const transaction = new Transaction5();\n transaction.add(SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n const {\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n } = params;\n return transaction.add(this.initialize({\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n }));\n }\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params) {\n const transaction = new Transaction5();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n const {\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n } = params;\n return transaction.add(this.initialize({\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n }));\n }\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n votePubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData3(type);\n return new Transaction5().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: votePubkey,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: STAKE_CONFIG_ID,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData3(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction5().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params) {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData3(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer())\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorityBase,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction5().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * @internal\n */\n static splitInstruction(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData3(type, {\n lamports\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: splitStakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params, rentExemptReserve) {\n const transaction = new Transaction5();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: rentExemptReserve,\n space: this.space,\n programId: this.programId\n }));\n return transaction.add(this.splitInstruction(params));\n }\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params, rentExemptReserve) {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports\n } = params;\n const transaction = new Transaction5();\n transaction.add(SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId\n }));\n if (rentExemptReserve && rentExemptReserve > 0) {\n transaction.add(SystemProgram.transfer({\n fromPubkey: params.authorizedPubkey,\n toPubkey: splitStakePubkey,\n lamports: rentExemptReserve\n }));\n }\n return transaction.add(this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports\n }));\n }\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params) {\n const {\n stakePubkey,\n sourceStakePubKey,\n authorizedPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData3(type);\n return new Transaction5().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: sourceStakePubKey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n toPubkey,\n lamports,\n custodianPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData3(type, {\n lamports\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction5().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params) {\n const {\n stakePubkey,\n authorizedPubkey\n } = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData3(type);\n return new Transaction5().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n };\n StakeProgram.programId = new PublicKey(\"Stake11111111111111111111111111111111111111\");\n StakeProgram.space = 200;\n var VoteInit = class {\n /** [0, 100] */\n constructor(nodePubkey, authorizedVoter, authorizedWithdrawer, commission) {\n this.nodePubkey = void 0;\n this.authorizedVoter = void 0;\n this.authorizedWithdrawer = void 0;\n this.commission = void 0;\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n };\n var VoteInstruction = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(instruction) {\n this.checkProgramId(instruction.programId);\n const instructionTypeLayout = BufferLayout__namespace.u32(\"instruction\");\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n let type;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType;\n break;\n }\n }\n if (!type) {\n throw new Error(\"Instruction type incorrect; not a VoteInstruction\");\n }\n return type;\n }\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n const {\n voteInit: voteInit2\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.InitializeAccount, instruction.data);\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(new PublicKey(voteInit2.nodePubkey), new PublicKey(voteInit2.authorizedVoter), new PublicKey(voteInit2.authorizedWithdrawer), voteInit2.commission)\n };\n }\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n newAuthorized,\n voteAuthorizationType\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.Authorize, instruction.data);\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType\n }\n };\n }\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType\n }\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed, instruction.data);\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(currentAuthorityDerivedKeyOwnerPubkey),\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType\n },\n votePubkey: instruction.keys[0].pubkey\n };\n }\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(instruction) {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {\n lamports\n } = decodeData$1(VOTE_INSTRUCTION_LAYOUTS.Withdraw, instruction.data);\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey\n };\n }\n /**\n * @internal\n */\n static checkProgramId(programId) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error(\"invalid instruction; programId is not VoteProgram\");\n }\n }\n /**\n * @internal\n */\n static checkKeyLength(keys, expectedLength) {\n if (keys.length < expectedLength) {\n throw new Error(`invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`);\n }\n }\n };\n var VOTE_INSTRUCTION_LAYOUTS = Object.freeze({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), voteInit()])\n },\n Authorize: {\n index: 1,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), publicKey(\"newAuthorized\"), BufferLayout__namespace.u32(\"voteAuthorizationType\")])\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), BufferLayout__namespace.ns64(\"lamports\")])\n },\n UpdateValidatorIdentity: {\n index: 4,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\")])\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout__namespace.struct([BufferLayout__namespace.u32(\"instruction\"), voteAuthorizeWithSeedArgs()])\n }\n });\n var VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0\n },\n Withdrawer: {\n index: 1\n }\n });\n var VoteProgram = class _VoteProgram {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the Vote program\n */\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(params) {\n const {\n votePubkey,\n nodePubkey,\n voteInit: voteInit2\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData3(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit2.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit2.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(voteInit2.authorizedWithdrawer.toBuffer()),\n commission: voteInit2.commission\n }\n });\n const instructionData = {\n keys: [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: nodePubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params) {\n const transaction = new Transaction5();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n return transaction.add(this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit\n }));\n }\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params) {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData3(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction5().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params) {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData3(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(currentAuthorityDerivedKeyOwnerPubkey.toBuffer()),\n currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index\n }\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction5().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params) {\n const {\n votePubkey,\n authorizedWithdrawerPubkey,\n lamports,\n toPubkey\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData3(type, {\n lamports\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedWithdrawerPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction5().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(params, currentVoteAccountBalance, rentExemptMinimum) {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\"Withdraw will leave vote account with insufficient funds.\");\n }\n return _VoteProgram.withdraw(params);\n }\n /**\n * Generate a transaction to update the validator identity (node pubkey) of a Vote account.\n */\n static updateValidatorIdentity(params) {\n const {\n votePubkey,\n authorizedWithdrawerPubkey,\n nodePubkey\n } = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.UpdateValidatorIdentity;\n const data = encodeData3(type);\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: nodePubkey,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: authorizedWithdrawerPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction5().add({\n keys,\n programId: this.programId,\n data\n });\n }\n };\n VoteProgram.programId = new PublicKey(\"Vote111111111111111111111111111111111111111\");\n VoteProgram.space = 3762;\n var VALIDATOR_INFO_KEY = new PublicKey(\"Va1idator1nfo111111111111111111111111111111\");\n var InfoString = superstruct.type({\n name: superstruct.string(),\n website: superstruct.optional(superstruct.string()),\n details: superstruct.optional(superstruct.string()),\n iconUrl: superstruct.optional(superstruct.string()),\n keybaseUsername: superstruct.optional(superstruct.string())\n });\n var ValidatorInfo = class _ValidatorInfo {\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key, info) {\n this.key = void 0;\n this.info = void 0;\n this.key = key;\n this.info = info;\n }\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(buffer$1) {\n let byteArray = [...buffer$1];\n const configKeyCount = decodeLength(byteArray);\n if (configKeyCount !== 2)\n return null;\n const configKeys = [];\n for (let i3 = 0; i3 < 2; i3++) {\n const publicKey2 = new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH));\n const isSigner = guardedShift(byteArray) === 1;\n configKeys.push({\n publicKey: publicKey2,\n isSigner\n });\n }\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo = rustString().decode(buffer2.Buffer.from(byteArray));\n const info = JSON.parse(rawInfo);\n superstruct.assert(info, InfoString);\n return new _ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n return null;\n }\n };\n var VOTE_PROGRAM_ID = new PublicKey(\"Vote111111111111111111111111111111111111111\");\n var VoteAccountLayout = BufferLayout__namespace.struct([\n publicKey(\"nodePubkey\"),\n publicKey(\"authorizedWithdrawer\"),\n BufferLayout__namespace.u8(\"commission\"),\n BufferLayout__namespace.nu64(),\n // votes.length\n BufferLayout__namespace.seq(BufferLayout__namespace.struct([BufferLayout__namespace.nu64(\"slot\"), BufferLayout__namespace.u32(\"confirmationCount\")]), BufferLayout__namespace.offset(BufferLayout__namespace.u32(), -8), \"votes\"),\n BufferLayout__namespace.u8(\"rootSlotValid\"),\n BufferLayout__namespace.nu64(\"rootSlot\"),\n BufferLayout__namespace.nu64(),\n // authorizedVoters.length\n BufferLayout__namespace.seq(BufferLayout__namespace.struct([BufferLayout__namespace.nu64(\"epoch\"), publicKey(\"authorizedVoter\")]), BufferLayout__namespace.offset(BufferLayout__namespace.u32(), -8), \"authorizedVoters\"),\n BufferLayout__namespace.struct([BufferLayout__namespace.seq(BufferLayout__namespace.struct([publicKey(\"authorizedPubkey\"), BufferLayout__namespace.nu64(\"epochOfLastAuthorizedSwitch\"), BufferLayout__namespace.nu64(\"targetEpoch\")]), 32, \"buf\"), BufferLayout__namespace.nu64(\"idx\"), BufferLayout__namespace.u8(\"isEmpty\")], \"priorVoters\"),\n BufferLayout__namespace.nu64(),\n // epochCredits.length\n BufferLayout__namespace.seq(BufferLayout__namespace.struct([BufferLayout__namespace.nu64(\"epoch\"), BufferLayout__namespace.nu64(\"credits\"), BufferLayout__namespace.nu64(\"prevCredits\")]), BufferLayout__namespace.offset(BufferLayout__namespace.u32(), -8), \"epochCredits\"),\n BufferLayout__namespace.struct([BufferLayout__namespace.nu64(\"slot\"), BufferLayout__namespace.nu64(\"timestamp\")], \"lastTimestamp\")\n ]);\n var VoteAccount = class _VoteAccount {\n /**\n * @internal\n */\n constructor(args) {\n this.nodePubkey = void 0;\n this.authorizedWithdrawer = void 0;\n this.commission = void 0;\n this.rootSlot = void 0;\n this.votes = void 0;\n this.authorizedVoters = void 0;\n this.priorVoters = void 0;\n this.epochCredits = void 0;\n this.lastTimestamp = void 0;\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(buffer3) {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer3), versionOffset);\n let rootSlot = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n return new _VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp\n });\n }\n };\n function parseAuthorizedVoter({\n authorizedVoter,\n epoch\n }) {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter)\n };\n }\n function parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch\n }) {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch\n };\n }\n function getPriorVoters({\n buf,\n idx,\n isEmpty\n }) {\n if (isEmpty) {\n return [];\n }\n return [...buf.slice(idx + 1).map(parsePriorVoters), ...buf.slice(0, idx).map(parsePriorVoters)];\n }\n var endpoint = {\n http: {\n devnet: \"http://api.devnet.solana.com\",\n testnet: \"http://api.testnet.solana.com\",\n \"mainnet-beta\": \"http://api.mainnet-beta.solana.com/\"\n },\n https: {\n devnet: \"https://api.devnet.solana.com\",\n testnet: \"https://api.testnet.solana.com\",\n \"mainnet-beta\": \"https://api.mainnet-beta.solana.com/\"\n }\n };\n function clusterApiUrl2(cluster, tls) {\n const key = tls === false ? \"http\" : \"https\";\n if (!cluster) {\n return endpoint[key][\"devnet\"];\n }\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n }\n async function sendAndConfirmRawTransaction(connection, rawTransaction, confirmationStrategyOrConfirmOptions, maybeConfirmOptions) {\n let confirmationStrategy;\n let options;\n if (confirmationStrategyOrConfirmOptions && Object.prototype.hasOwnProperty.call(confirmationStrategyOrConfirmOptions, \"lastValidBlockHeight\")) {\n confirmationStrategy = confirmationStrategyOrConfirmOptions;\n options = maybeConfirmOptions;\n } else if (confirmationStrategyOrConfirmOptions && Object.prototype.hasOwnProperty.call(confirmationStrategyOrConfirmOptions, \"nonceValue\")) {\n confirmationStrategy = confirmationStrategyOrConfirmOptions;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot\n };\n const signature2 = await connection.sendRawTransaction(rawTransaction, sendOptions);\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy ? connection.confirmTransaction(confirmationStrategy, commitment) : connection.confirmTransaction(signature2, commitment);\n const status = (await confirmationPromise).value;\n if (status.err) {\n if (signature2 != null) {\n throw new SendTransactionError({\n action: sendOptions?.skipPreflight ? \"send\" : \"simulate\",\n signature: signature2,\n transactionMessage: `Status: (${JSON.stringify(status)})`\n });\n }\n throw new Error(`Raw transaction ${signature2} failed (${JSON.stringify(status)})`);\n }\n return signature2;\n }\n var LAMPORTS_PER_SOL = 1e9;\n exports3.Account = Account;\n exports3.AddressLookupTableAccount = AddressLookupTableAccount;\n exports3.AddressLookupTableInstruction = AddressLookupTableInstruction;\n exports3.AddressLookupTableProgram = AddressLookupTableProgram;\n exports3.Authorized = Authorized;\n exports3.BLOCKHASH_CACHE_TIMEOUT_MS = BLOCKHASH_CACHE_TIMEOUT_MS;\n exports3.BPF_LOADER_DEPRECATED_PROGRAM_ID = BPF_LOADER_DEPRECATED_PROGRAM_ID;\n exports3.BPF_LOADER_PROGRAM_ID = BPF_LOADER_PROGRAM_ID;\n exports3.BpfLoader = BpfLoader;\n exports3.COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS;\n exports3.ComputeBudgetInstruction = ComputeBudgetInstruction;\n exports3.ComputeBudgetProgram = ComputeBudgetProgram;\n exports3.Connection = Connection2;\n exports3.Ed25519Program = Ed25519Program;\n exports3.Enum = Enum;\n exports3.EpochSchedule = EpochSchedule;\n exports3.FeeCalculatorLayout = FeeCalculatorLayout;\n exports3.Keypair = Keypair2;\n exports3.LAMPORTS_PER_SOL = LAMPORTS_PER_SOL;\n exports3.LOOKUP_TABLE_INSTRUCTION_LAYOUTS = LOOKUP_TABLE_INSTRUCTION_LAYOUTS;\n exports3.Loader = Loader;\n exports3.Lockup = Lockup;\n exports3.MAX_SEED_LENGTH = MAX_SEED_LENGTH;\n exports3.Message = Message;\n exports3.MessageAccountKeys = MessageAccountKeys;\n exports3.MessageV0 = MessageV0;\n exports3.NONCE_ACCOUNT_LENGTH = NONCE_ACCOUNT_LENGTH;\n exports3.NonceAccount = NonceAccount;\n exports3.PACKET_DATA_SIZE = PACKET_DATA_SIZE;\n exports3.PUBLIC_KEY_LENGTH = PUBLIC_KEY_LENGTH;\n exports3.PublicKey = PublicKey;\n exports3.SIGNATURE_LENGTH_IN_BYTES = SIGNATURE_LENGTH_IN_BYTES;\n exports3.SOLANA_SCHEMA = SOLANA_SCHEMA;\n exports3.STAKE_CONFIG_ID = STAKE_CONFIG_ID;\n exports3.STAKE_INSTRUCTION_LAYOUTS = STAKE_INSTRUCTION_LAYOUTS;\n exports3.SYSTEM_INSTRUCTION_LAYOUTS = SYSTEM_INSTRUCTION_LAYOUTS;\n exports3.SYSVAR_CLOCK_PUBKEY = SYSVAR_CLOCK_PUBKEY;\n exports3.SYSVAR_EPOCH_SCHEDULE_PUBKEY = SYSVAR_EPOCH_SCHEDULE_PUBKEY;\n exports3.SYSVAR_INSTRUCTIONS_PUBKEY = SYSVAR_INSTRUCTIONS_PUBKEY;\n exports3.SYSVAR_RECENT_BLOCKHASHES_PUBKEY = SYSVAR_RECENT_BLOCKHASHES_PUBKEY;\n exports3.SYSVAR_RENT_PUBKEY = SYSVAR_RENT_PUBKEY;\n exports3.SYSVAR_REWARDS_PUBKEY = SYSVAR_REWARDS_PUBKEY;\n exports3.SYSVAR_SLOT_HASHES_PUBKEY = SYSVAR_SLOT_HASHES_PUBKEY;\n exports3.SYSVAR_SLOT_HISTORY_PUBKEY = SYSVAR_SLOT_HISTORY_PUBKEY;\n exports3.SYSVAR_STAKE_HISTORY_PUBKEY = SYSVAR_STAKE_HISTORY_PUBKEY;\n exports3.Secp256k1Program = Secp256k1Program;\n exports3.SendTransactionError = SendTransactionError;\n exports3.SolanaJSONRPCError = SolanaJSONRPCError;\n exports3.SolanaJSONRPCErrorCode = SolanaJSONRPCErrorCode;\n exports3.StakeAuthorizationLayout = StakeAuthorizationLayout;\n exports3.StakeInstruction = StakeInstruction;\n exports3.StakeProgram = StakeProgram;\n exports3.Struct = Struct;\n exports3.SystemInstruction = SystemInstruction;\n exports3.SystemProgram = SystemProgram;\n exports3.Transaction = Transaction5;\n exports3.TransactionExpiredBlockheightExceededError = TransactionExpiredBlockheightExceededError;\n exports3.TransactionExpiredNonceInvalidError = TransactionExpiredNonceInvalidError;\n exports3.TransactionExpiredTimeoutError = TransactionExpiredTimeoutError;\n exports3.TransactionInstruction = TransactionInstruction;\n exports3.TransactionMessage = TransactionMessage;\n exports3.TransactionStatus = TransactionStatus;\n exports3.VALIDATOR_INFO_KEY = VALIDATOR_INFO_KEY;\n exports3.VERSION_PREFIX_MASK = VERSION_PREFIX_MASK;\n exports3.VOTE_PROGRAM_ID = VOTE_PROGRAM_ID;\n exports3.ValidatorInfo = ValidatorInfo;\n exports3.VersionedMessage = VersionedMessage;\n exports3.VersionedTransaction = VersionedTransaction4;\n exports3.VoteAccount = VoteAccount;\n exports3.VoteAuthorizationLayout = VoteAuthorizationLayout;\n exports3.VoteInit = VoteInit;\n exports3.VoteInstruction = VoteInstruction;\n exports3.VoteProgram = VoteProgram;\n exports3.clusterApiUrl = clusterApiUrl2;\n exports3.sendAndConfirmRawTransaction = sendAndConfirmRawTransaction;\n exports3.sendAndConfirmTransaction = sendAndConfirmTransaction;\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/lit-actions/generated/common/batchGenerateEncryptedKeys-metadata.json\n var require_batchGenerateEncryptedKeys_metadata = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/lit-actions/generated/common/batchGenerateEncryptedKeys-metadata.json\"(exports3, module) {\n module.exports = {\n ipfsCid: \"QmSYoyYYYzQdfZqKBA3ouqvJPyDtRTuei7wjb6ULhK8XAH\"\n };\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/lit-actions/generated/solana/generateEncryptedSolanaPrivateKey-metadata.json\n var require_generateEncryptedSolanaPrivateKey_metadata = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/lit-actions/generated/solana/generateEncryptedSolanaPrivateKey-metadata.json\"(exports3, module) {\n module.exports = {\n ipfsCid: \"Qmb4hG6ATbjDyegJCCZYqMHucgkZTmE62nNFxmNd2byeR9\"\n };\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/lit-actions-client/utils.js\n var require_utils19 = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/lit-actions-client/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.postLitActionValidation = postLitActionValidation;\n exports3.getLitActionCid = getLitActionCid;\n exports3.getLitActionCommonCid = getLitActionCommonCid;\n var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));\n var batchGenerateEncryptedKeys_metadata_json_1 = tslib_1.__importDefault(require_batchGenerateEncryptedKeys_metadata());\n var generateEncryptedSolanaPrivateKey_metadata_json_1 = tslib_1.__importDefault(require_generateEncryptedSolanaPrivateKey_metadata());\n function postLitActionValidation(result) {\n if (!result) {\n throw new Error(\"There was an unknown error running the Lit Action.\");\n }\n const { response } = result;\n if (!response) {\n throw new Error(`Expected \"response\" in Lit Action result: ${JSON.stringify(result)}`);\n }\n if (typeof response !== \"string\") {\n throw new Error(`Lit Action should return a string response: ${JSON.stringify(result)}`);\n }\n if (!result.success) {\n throw new Error(`Expected \"success\" in res: ${JSON.stringify(result)}`);\n }\n if (response.startsWith(\"Error:\")) {\n throw new Error(`Error executing the Signing Lit Action: ${response}`);\n }\n return response;\n }\n function assertNetworkIsValid(network) {\n const validNetworks = [\"solana\"];\n if (!validNetworks.includes(network)) {\n throw new Error(`Invalid network: ${network}. Must be one of ${validNetworks.join(\", \")}.`);\n }\n }\n function getLitActionCid(network, actionType) {\n assertNetworkIsValid(network);\n if (network === \"solana\") {\n switch (actionType) {\n case \"generateEncryptedKey\":\n return generateEncryptedSolanaPrivateKey_metadata_json_1.default.ipfsCid;\n default:\n throw new Error(`Unsupported action type for Solana: ${actionType}`);\n }\n }\n throw new Error(`Unsupported network: ${network}`);\n }\n function getLitActionCommonCid(actionType) {\n switch (actionType) {\n case \"batchGenerateEncryptedKeys\":\n return batchGenerateEncryptedKeys_metadata_json_1.default.ipfsCid;\n default:\n throw new Error(`Unsupported common action type: ${actionType}`);\n }\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/lit-actions-client/batch-generate-keys.js\n var require_batch_generate_keys = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/lit-actions-client/batch-generate-keys.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.batchGenerateKeysWithLitAction = batchGenerateKeysWithLitAction;\n var utils_1 = require_utils19();\n async function batchGenerateKeysWithLitAction(args) {\n const { evmContractConditions, litNodeClient, actions, delegatorSessionSigs, litActionIpfsCid } = args;\n const result = await litNodeClient.executeJs({\n useSingleNode: true,\n sessionSigs: delegatorSessionSigs,\n ipfsId: litActionIpfsCid,\n jsParams: {\n actions,\n evmContractConditions\n }\n });\n const response = (0, utils_1.postLitActionValidation)(result);\n return JSON.parse(response);\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/lit-actions-client/generate-key.js\n var require_generate_key = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/lit-actions-client/generate-key.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.generateKeyWithLitAction = generateKeyWithLitAction;\n var utils_1 = require_utils19();\n async function generateKeyWithLitAction({ litNodeClient, delegatorSessionSigs, litActionIpfsCid, evmContractConditions, delegatorAddress }) {\n const result = await litNodeClient.executeJs({\n useSingleNode: true,\n sessionSigs: delegatorSessionSigs,\n ipfsId: litActionIpfsCid,\n jsParams: {\n delegatorAddress,\n evmContractConditions\n }\n });\n const response = (0, utils_1.postLitActionValidation)(result);\n return JSON.parse(response);\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/constants.js\n var require_constants8 = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.KEYTYPE_ED25519 = exports3.NETWORK_SOLANA = exports3.LIT_PREFIX = exports3.CHAIN_YELLOWSTONE = void 0;\n exports3.CHAIN_YELLOWSTONE = \"yellowstone\";\n exports3.LIT_PREFIX = \"lit_\";\n exports3.NETWORK_SOLANA = \"solana\";\n exports3.KEYTYPE_ED25519 = \"ed25519\";\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/utils.js\n var require_utils20 = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.removeSaltFromDecryptedKey = removeSaltFromDecryptedKey;\n var constants_1 = require_constants8();\n function removeSaltFromDecryptedKey(decryptedPrivateKey) {\n if (!decryptedPrivateKey.startsWith(constants_1.LIT_PREFIX)) {\n throw new Error(`PKey was not encrypted with salt; all wrapped keys must be prefixed with '${constants_1.LIT_PREFIX}'`);\n }\n return decryptedPrivateKey.slice(constants_1.LIT_PREFIX.length);\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/lit-actions-client/get-solana-key-pair-from-wrapped-key.js\n var require_get_solana_key_pair_from_wrapped_key = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/lit-actions-client/get-solana-key-pair-from-wrapped-key.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getSolanaKeyPairFromWrappedKey = getSolanaKeyPairFromWrappedKey2;\n var web3_js_1 = require_index_browser_cjs();\n var utils_1 = require_utils20();\n async function getSolanaKeyPairFromWrappedKey2({ ciphertext, dataToEncryptHash, evmContractConditions }) {\n const decryptedPrivateKey = await Lit.Actions.decryptAndCombine({\n accessControlConditions: evmContractConditions,\n ciphertext,\n dataToEncryptHash,\n chain: \"ethereum\",\n authSig: null\n });\n const noSaltPrivateKey = (0, utils_1.removeSaltFromDecryptedKey)(decryptedPrivateKey);\n const solanaKeypair = web3_js_1.Keypair.fromSecretKey(Buffer2.from(noSaltPrivateKey, \"hex\"));\n return solanaKeypair;\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/lit-actions-client/index.js\n var require_lit_actions_client = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/lit-actions-client/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getSolanaKeyPairFromWrappedKey = exports3.batchGenerateKeysWithLitAction = exports3.generateKeyWithLitAction = void 0;\n var batch_generate_keys_1 = require_batch_generate_keys();\n Object.defineProperty(exports3, \"batchGenerateKeysWithLitAction\", { enumerable: true, get: function() {\n return batch_generate_keys_1.batchGenerateKeysWithLitAction;\n } });\n var generate_key_1 = require_generate_key();\n Object.defineProperty(exports3, \"generateKeyWithLitAction\", { enumerable: true, get: function() {\n return generate_key_1.generateKeyWithLitAction;\n } });\n var get_solana_key_pair_from_wrapped_key_1 = require_get_solana_key_pair_from_wrapped_key();\n Object.defineProperty(exports3, \"getSolanaKeyPairFromWrappedKey\", { enumerable: true, get: function() {\n return get_solana_key_pair_from_wrapped_key_1.getSolanaKeyPairFromWrappedKey;\n } });\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/service-client/constants.js\n var require_constants9 = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/service-client/constants.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.JWT_AUTHORIZATION_SCHEMA_PREFIX = exports3.SERVICE_URL_BY_LIT_NETWORK = void 0;\n exports3.SERVICE_URL_BY_LIT_NETWORK = {\n datil: \"https://wrapped.litprotocol.com\"\n };\n exports3.JWT_AUTHORIZATION_SCHEMA_PREFIX = \"Bearer \";\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/service-client/utils.js\n var require_utils21 = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/service-client/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getBaseRequestParams = getBaseRequestParams;\n exports3.generateRequestId = generateRequestId;\n exports3.makeRequest = makeRequest;\n var constants_1 = require_constants9();\n function composeAuthHeader(jwtToken) {\n return `${constants_1.JWT_AUTHORIZATION_SCHEMA_PREFIX}${jwtToken}`;\n }\n var supportedNetworks = [\"datil\"];\n function isSupportedLitNetwork(litNetwork) {\n if (!supportedNetworks.includes(litNetwork)) {\n throw new Error(`Unsupported LIT_NETWORK! Only ${supportedNetworks.join(\"|\")} are supported.`);\n }\n }\n function getServiceUrl({ litNetwork }) {\n isSupportedLitNetwork(litNetwork);\n return constants_1.SERVICE_URL_BY_LIT_NETWORK[litNetwork];\n }\n function getBaseRequestParams(requestParams) {\n const { jwtToken, method, litNetwork } = requestParams;\n return {\n baseUrl: getServiceUrl(requestParams),\n initParams: {\n method,\n headers: {\n \"x-correlation-id\": requestParams.requestId,\n \"Content-Type\": \"application/json\",\n \"lit-network\": litNetwork,\n authorization: composeAuthHeader(jwtToken)\n }\n }\n };\n }\n async function getResponseErrorMessage(response) {\n try {\n const parsedResponse = await response.json();\n if (parsedResponse.message) {\n return parsedResponse.message;\n }\n return JSON.stringify(parsedResponse);\n } catch {\n return response.text();\n }\n }\n async function getResponseJson(response) {\n try {\n return await response.json();\n } catch {\n return await response.text();\n }\n }\n function generateRequestId() {\n return Math.random().toString(16).slice(2);\n }\n async function makeRequest({ url, init, requestId }) {\n try {\n const response = await fetch(url, { ...init });\n if (!response.ok) {\n const errorMessage = await getResponseErrorMessage(response);\n throw new Error(`HTTP(${response.status}): ${errorMessage}`);\n }\n const result = await getResponseJson(response);\n if (typeof result === \"string\") {\n throw new Error(`HTTP(${response.status}): ${result}`);\n }\n return result;\n } catch (e2) {\n throw new Error(`Request(${requestId}) for Vincent wrapped key failed. Error: ${e2.message}${e2.cause ? \" - \" + e2.cause : \"\"}`);\n }\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/service-client/client.js\n var require_client = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/service-client/client.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.listPrivateKeyMetadata = listPrivateKeyMetadata;\n exports3.fetchPrivateKey = fetchPrivateKey;\n exports3.storePrivateKey = storePrivateKey;\n exports3.storePrivateKeyBatch = storePrivateKeyBatch;\n var utils_1 = require_utils21();\n async function listPrivateKeyMetadata(params) {\n const { litNetwork, jwtToken, delegatorAddress } = params;\n const requestId = (0, utils_1.generateRequestId)();\n const { baseUrl, initParams } = (0, utils_1.getBaseRequestParams)({\n litNetwork,\n jwtToken,\n method: \"GET\",\n requestId\n });\n return (0, utils_1.makeRequest)({\n url: `${baseUrl}/delegated/encrypted/${encodeURIComponent(delegatorAddress)}`,\n init: initParams,\n requestId\n });\n }\n async function fetchPrivateKey(params) {\n const { litNetwork, jwtToken, id, delegatorAddress } = params;\n const requestId = (0, utils_1.generateRequestId)();\n const { baseUrl, initParams } = (0, utils_1.getBaseRequestParams)({\n litNetwork,\n jwtToken,\n method: \"GET\",\n requestId\n });\n return (0, utils_1.makeRequest)({\n url: `${baseUrl}/delegated/encrypted/${encodeURIComponent(delegatorAddress)}/${id}`,\n init: initParams,\n requestId\n });\n }\n async function storePrivateKey(params) {\n const { litNetwork, jwtToken, storedKeyMetadata } = params;\n const requestId = (0, utils_1.generateRequestId)();\n const { baseUrl, initParams } = (0, utils_1.getBaseRequestParams)({\n litNetwork,\n jwtToken,\n method: \"POST\",\n requestId\n });\n const { delegatorAddress, id } = await (0, utils_1.makeRequest)({\n url: `${baseUrl}/delegated/encrypted`,\n init: {\n ...initParams,\n body: JSON.stringify(storedKeyMetadata)\n },\n requestId\n });\n return { delegatorAddress, id };\n }\n async function storePrivateKeyBatch(params) {\n const { litNetwork, jwtToken, storedKeyMetadataBatch } = params;\n const requestId = (0, utils_1.generateRequestId)();\n const { baseUrl, initParams } = (0, utils_1.getBaseRequestParams)({\n litNetwork,\n jwtToken,\n method: \"POST\",\n requestId\n });\n const { delegatorAddress, ids } = await (0, utils_1.makeRequest)({\n url: `${baseUrl}/delegated/encrypted_batch`,\n init: {\n ...initParams,\n body: JSON.stringify({ keyParamsBatch: storedKeyMetadataBatch })\n },\n requestId\n });\n return { delegatorAddress, ids };\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/service-client/index.js\n var require_service_client = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/service-client/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.storePrivateKeyBatch = exports3.storePrivateKey = exports3.listPrivateKeyMetadata = exports3.fetchPrivateKey = void 0;\n var client_1 = require_client();\n Object.defineProperty(exports3, \"fetchPrivateKey\", { enumerable: true, get: function() {\n return client_1.fetchPrivateKey;\n } });\n Object.defineProperty(exports3, \"listPrivateKeyMetadata\", { enumerable: true, get: function() {\n return client_1.listPrivateKeyMetadata;\n } });\n Object.defineProperty(exports3, \"storePrivateKey\", { enumerable: true, get: function() {\n return client_1.storePrivateKey;\n } });\n Object.defineProperty(exports3, \"storePrivateKeyBatch\", { enumerable: true, get: function() {\n return client_1.storePrivateKeyBatch;\n } });\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/api/utils.js\n var require_utils22 = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/api/utils.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getKeyTypeFromNetwork = getKeyTypeFromNetwork;\n var constants_1 = require_constants8();\n function getKeyTypeFromNetwork(network) {\n switch (network) {\n case constants_1.NETWORK_SOLANA:\n return \"ed25519\";\n default:\n throw new Error(`Network not implemented ${network}`);\n }\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/api/generate-private-key.js\n var require_generate_private_key = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/api/generate-private-key.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.generatePrivateKey = generatePrivateKey2;\n var vincent_contracts_sdk_1 = require_src6();\n var lit_actions_client_1 = require_lit_actions_client();\n var utils_1 = require_utils19();\n var service_client_1 = require_service_client();\n var utils_2 = require_utils22();\n async function generatePrivateKey2(params) {\n const { delegatorAddress, jwtToken, network, litNodeClient, memo } = params;\n const vincentWrappedKeysAccs = await (0, vincent_contracts_sdk_1.getVincentWrappedKeysAccs)({\n delegatorAddress\n });\n const litActionIpfsCid = (0, utils_1.getLitActionCid)(network, \"generateEncryptedKey\");\n const { ciphertext, dataToEncryptHash, publicKey, evmContractConditions } = await (0, lit_actions_client_1.generateKeyWithLitAction)({\n ...params,\n litActionIpfsCid,\n evmContractConditions: vincentWrappedKeysAccs\n });\n const { id } = await (0, service_client_1.storePrivateKey)({\n jwtToken,\n storedKeyMetadata: {\n ciphertext,\n publicKey,\n keyType: (0, utils_2.getKeyTypeFromNetwork)(network),\n dataToEncryptHash,\n memo,\n delegatorAddress,\n evmContractConditions\n },\n litNetwork: litNodeClient.config.litNetwork\n });\n return {\n delegatorAddress,\n id,\n generatedPublicKey: publicKey\n };\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/api/batch-generate-private-keys.js\n var require_batch_generate_private_keys = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/api/batch-generate-private-keys.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.batchGeneratePrivateKeys = batchGeneratePrivateKeys;\n var vincent_contracts_sdk_1 = require_src6();\n var lit_actions_client_1 = require_lit_actions_client();\n var utils_1 = require_utils19();\n var service_client_1 = require_service_client();\n var utils_2 = require_utils22();\n async function batchGeneratePrivateKeys(params) {\n const { jwtToken, delegatorAddress, litNodeClient } = params;\n const vincentWrappedKeysAccs = await (0, vincent_contracts_sdk_1.getVincentWrappedKeysAccs)({\n delegatorAddress\n });\n const litActionIpfsCid = (0, utils_1.getLitActionCommonCid)(\"batchGenerateEncryptedKeys\");\n const actionResults = await (0, lit_actions_client_1.batchGenerateKeysWithLitAction)({\n ...params,\n litActionIpfsCid,\n evmContractConditions: vincentWrappedKeysAccs\n });\n const keyParamsBatch = actionResults.map((keyData, index2) => {\n const { generateEncryptedPrivateKey } = keyData;\n return {\n ...generateEncryptedPrivateKey,\n keyType: (0, utils_2.getKeyTypeFromNetwork)(\"solana\"),\n delegatorAddress,\n evmContractConditions: actionResults[index2].generateEncryptedPrivateKey.evmContractConditions\n };\n });\n const { ids } = await (0, service_client_1.storePrivateKeyBatch)({\n jwtToken,\n storedKeyMetadataBatch: keyParamsBatch,\n litNetwork: litNodeClient.config.litNetwork\n });\n const results = actionResults.map((actionResult, index2) => {\n const { generateEncryptedPrivateKey: { memo, publicKey } } = actionResult;\n const id = ids[index2];\n const signature = actionResult.signMessage?.signature;\n return {\n ...signature ? { signMessage: { signature } } : {},\n generateEncryptedPrivateKey: {\n delegatorAddress,\n memo,\n id,\n generatedPublicKey: publicKey\n }\n };\n });\n return { delegatorAddress, results };\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/api/list-encrypted-key-metadata.js\n var require_list_encrypted_key_metadata = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/api/list-encrypted-key-metadata.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.listEncryptedKeyMetadata = listEncryptedKeyMetadata;\n var service_client_1 = require_service_client();\n async function listEncryptedKeyMetadata(params) {\n const { jwtToken, delegatorAddress, litNodeClient } = params;\n return (0, service_client_1.listPrivateKeyMetadata)({\n jwtToken,\n delegatorAddress,\n litNetwork: litNodeClient.config.litNetwork\n });\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/api/get-encrypted-key.js\n var require_get_encrypted_key = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/api/get-encrypted-key.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.getEncryptedKey = getEncryptedKey;\n var service_client_1 = require_service_client();\n async function getEncryptedKey(params) {\n const { jwtToken, delegatorAddress, litNodeClient, id } = params;\n return (0, service_client_1.fetchPrivateKey)({\n jwtToken,\n delegatorAddress,\n id,\n litNetwork: litNodeClient.config.litNetwork\n });\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/api/store-encrypted-key.js\n var require_store_encrypted_key = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/api/store-encrypted-key.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.storeEncryptedKey = storeEncryptedKey;\n var service_client_1 = require_service_client();\n async function storeEncryptedKey(params) {\n const { jwtToken, litNodeClient } = params;\n const { publicKey, keyType, dataToEncryptHash, ciphertext, memo, delegatorAddress, evmContractConditions } = params;\n return (0, service_client_1.storePrivateKey)({\n storedKeyMetadata: {\n publicKey,\n keyType,\n dataToEncryptHash,\n ciphertext,\n memo,\n delegatorAddress,\n evmContractConditions\n },\n jwtToken,\n litNetwork: litNodeClient.config.litNetwork\n });\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/api/store-encrypted-key-batch.js\n var require_store_encrypted_key_batch = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/api/store-encrypted-key-batch.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.storeEncryptedKeyBatch = storeEncryptedKeyBatch;\n var service_client_1 = require_service_client();\n async function storeEncryptedKeyBatch(params) {\n const { jwtToken, litNodeClient, keyBatch, delegatorAddress } = params;\n const storedKeyMetadataBatch = keyBatch.map(({ keyType, publicKey, memo, dataToEncryptHash, ciphertext, evmContractConditions }) => ({\n publicKey,\n memo,\n dataToEncryptHash,\n ciphertext,\n keyType,\n delegatorAddress,\n evmContractConditions\n }));\n return (0, service_client_1.storePrivateKeyBatch)({\n storedKeyMetadataBatch,\n jwtToken,\n litNetwork: litNodeClient.config.litNetwork\n });\n }\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/api/export-private-key.js\n var require_export_private_key = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/api/export-private-key.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.exportPrivateKey = void 0;\n var service_client_1 = require_service_client();\n var utils_1 = require_utils20();\n var exportPrivateKey = async ({ litNodeClient, delegatorSessionSigs, jwtToken, id, delegatorAddress }) => {\n const storedKeyMetadata = await (0, service_client_1.fetchPrivateKey)({\n delegatorAddress,\n id,\n jwtToken,\n litNetwork: litNodeClient.config.litNetwork\n });\n const { ciphertext, dataToEncryptHash, evmContractConditions, publicKey, keyType, litNetwork, memo } = storedKeyMetadata;\n const { decryptedData } = await litNodeClient.decrypt({\n sessionSigs: delegatorSessionSigs,\n ciphertext,\n dataToEncryptHash,\n evmContractConditions: JSON.parse(evmContractConditions),\n chain: \"ethereum\"\n });\n return {\n decryptedPrivateKey: (0, utils_1.removeSaltFromDecryptedKey)(new TextDecoder().decode(decryptedData)),\n delegatorAddress,\n id,\n publicKey,\n keyType,\n litNetwork,\n memo\n };\n };\n exports3.exportPrivateKey = exportPrivateKey;\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/lib/api/index.js\n var require_api = __commonJS({\n \"../../libs/wrapped-keys/dist/src/lib/api/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.exportPrivateKey = exports3.getKeyTypeFromNetwork = exports3.storeEncryptedKeyBatch = exports3.storeEncryptedKey = exports3.getEncryptedKey = exports3.listEncryptedKeyMetadata = exports3.batchGeneratePrivateKeys = exports3.generatePrivateKey = void 0;\n var generate_private_key_1 = require_generate_private_key();\n Object.defineProperty(exports3, \"generatePrivateKey\", { enumerable: true, get: function() {\n return generate_private_key_1.generatePrivateKey;\n } });\n var batch_generate_private_keys_1 = require_batch_generate_private_keys();\n Object.defineProperty(exports3, \"batchGeneratePrivateKeys\", { enumerable: true, get: function() {\n return batch_generate_private_keys_1.batchGeneratePrivateKeys;\n } });\n var list_encrypted_key_metadata_1 = require_list_encrypted_key_metadata();\n Object.defineProperty(exports3, \"listEncryptedKeyMetadata\", { enumerable: true, get: function() {\n return list_encrypted_key_metadata_1.listEncryptedKeyMetadata;\n } });\n var get_encrypted_key_1 = require_get_encrypted_key();\n Object.defineProperty(exports3, \"getEncryptedKey\", { enumerable: true, get: function() {\n return get_encrypted_key_1.getEncryptedKey;\n } });\n var store_encrypted_key_1 = require_store_encrypted_key();\n Object.defineProperty(exports3, \"storeEncryptedKey\", { enumerable: true, get: function() {\n return store_encrypted_key_1.storeEncryptedKey;\n } });\n var store_encrypted_key_batch_1 = require_store_encrypted_key_batch();\n Object.defineProperty(exports3, \"storeEncryptedKeyBatch\", { enumerable: true, get: function() {\n return store_encrypted_key_batch_1.storeEncryptedKeyBatch;\n } });\n var utils_1 = require_utils22();\n Object.defineProperty(exports3, \"getKeyTypeFromNetwork\", { enumerable: true, get: function() {\n return utils_1.getKeyTypeFromNetwork;\n } });\n var export_private_key_1 = require_export_private_key();\n Object.defineProperty(exports3, \"exportPrivateKey\", { enumerable: true, get: function() {\n return export_private_key_1.exportPrivateKey;\n } });\n }\n });\n\n // ../../libs/wrapped-keys/dist/src/index.js\n var require_src9 = __commonJS({\n \"../../libs/wrapped-keys/dist/src/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.api = exports3.constants = void 0;\n var api_1 = require_api();\n var constants_1 = require_constants8();\n var lit_actions_client_1 = require_lit_actions_client();\n exports3.constants = {\n CHAIN_YELLOWSTONE: constants_1.CHAIN_YELLOWSTONE,\n LIT_PREFIX: constants_1.LIT_PREFIX,\n NETWORK_SOLANA: constants_1.NETWORK_SOLANA,\n KEYTYPE_ED25519: constants_1.KEYTYPE_ED25519\n };\n exports3.api = {\n generatePrivateKey: api_1.generatePrivateKey,\n getEncryptedKey: api_1.getEncryptedKey,\n listEncryptedKeyMetadata: api_1.listEncryptedKeyMetadata,\n storeEncryptedKey: api_1.storeEncryptedKey,\n storeEncryptedKeyBatch: api_1.storeEncryptedKeyBatch,\n batchGeneratePrivateKeys: api_1.batchGeneratePrivateKeys,\n exportPrivateKey: api_1.exportPrivateKey,\n litActionHelpers: {\n getSolanaKeyPairFromWrappedKey: lit_actions_client_1.getSolanaKeyPairFromWrappedKey\n }\n };\n }\n });\n\n // src/lib/lit-action.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_ability_sdk2 = __toESM(require_src7());\n\n // src/lib/vincent-ability.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_vincent_ability_sdk = __toESM(require_src7());\n var import_web34 = __toESM(require_index_browser_cjs());\n var import_vincent_wrapped_keys = __toESM(require_src9());\n\n // src/lib/schemas.ts\n init_dirname();\n init_buffer2();\n init_process2();\n init_esm5();\n var abilityParamsSchema = external_exports.object({\n rpcUrl: external_exports.string().describe(\"The RPC URL for the Solana cluster\").optional(),\n cluster: external_exports.enum([\"devnet\", \"testnet\", \"mainnet-beta\"]).describe(\"The Solana cluster the transaction is intended for (used to verify blockhash)\"),\n serializedTransaction: external_exports.string().describe(\n \"The base64 encoded serialized Solana transaction to be evaluated and signed (transaction type is auto-detected)\"\n ),\n evmContractConditions: external_exports.any().describe(\"The evm contract access control conditions for the Wrapped Key\"),\n ciphertext: external_exports.string().describe(\"The encrypted private key ciphertext for the Agent Wallet\"),\n dataToEncryptHash: external_exports.string().describe(\"SHA-256 hash of the encrypted data for verification\"),\n legacyTransactionOptions: external_exports.object({\n requireAllSignatures: external_exports.boolean().describe(\n \"If true, serialization will fail unless all required signers have provided valid signatures. Set false to allow returning a partially signed transaction (useful for multisig or co-signing flows). Defaults to true.\"\n ),\n verifySignatures: external_exports.boolean().describe(\"If true, verify each signature before serialization. Defaults to false.\")\n }).optional()\n });\n var precheckFailSchema = external_exports.object({\n error: external_exports.string().describe(\"A string containing the error message if the precheck failed.\")\n });\n var executeSuccessSchema = external_exports.object({\n signedTransaction: external_exports.string().describe(\"The base64 encoded signed Solana transaction\")\n });\n var executeFailSchema = external_exports.object({\n error: external_exports.string().describe(\"A string containing the error message if the execution failed.\")\n }).optional();\n\n // src/lib/lit-action-helpers/index.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/lit-action-helpers/signSolanaTransaction.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_web3 = __toESM(require_index_browser_cjs());\n var import_ethers = __toESM(require_lib32());\n function signSolanaTransaction({\n solanaKeypair,\n transaction\n }) {\n try {\n if (transaction instanceof import_web3.Transaction) {\n transaction.sign(solanaKeypair);\n if (!transaction.signature) {\n throw new Error(\"Transaction signature is null\");\n }\n return import_ethers.ethers.utils.base58.encode(transaction.signature);\n } else {\n transaction.sign([solanaKeypair]);\n if (!transaction.signatures.length) {\n throw new Error(\"Transaction signature is null\");\n }\n return import_ethers.ethers.utils.base58.encode(transaction.signatures[0]);\n }\n } catch (err) {\n const txTypeDesc = transaction instanceof import_web3.Transaction ? \"legacy\" : `versioned v${transaction.version}`;\n throw new Error(`When signing ${txTypeDesc} transaction - ${err.message}`);\n }\n }\n\n // src/lib/lit-action-helpers/deserializeTransaction.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_web32 = __toESM(require_index_browser_cjs());\n function deserializeTransaction(serializedTransaction) {\n const transactionBuffer = Buffer2.from(serializedTransaction, \"base64\");\n try {\n const versionedTransaction = import_web32.VersionedTransaction.deserialize(transactionBuffer);\n console.log(\n `[deserializeTransaction] detected versioned transaction: ${versionedTransaction.version}`\n );\n return versionedTransaction;\n } catch {\n try {\n const legacyTransaction = import_web32.Transaction.from(transactionBuffer);\n console.log(`[deserializeTransaction] detected legacy transaction`);\n return legacyTransaction;\n } catch (legacyError) {\n throw new Error(\n `Failed to deserialize transaction: ${legacyError instanceof Error ? legacyError.message : String(legacyError)}`\n );\n }\n }\n }\n\n // src/lib/lit-action-helpers/verifyBlockhashForCluster.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var import_web33 = __toESM(require_index_browser_cjs());\n async function verifyBlockhashForCluster({\n transaction,\n cluster,\n rpcUrl\n }) {\n let blockhash;\n if (transaction instanceof import_web33.Transaction) {\n blockhash = transaction.recentBlockhash ?? transaction.compileMessage().recentBlockhash;\n } else {\n blockhash = transaction.message.recentBlockhash;\n }\n if (!blockhash) {\n return {\n valid: false,\n error: \"Transaction does not contain a blockhash\"\n };\n }\n const connection = new import_web33.Connection(rpcUrl, \"confirmed\");\n try {\n const isValid2 = await connection.isBlockhashValid(blockhash);\n if (!isValid2.value) {\n return {\n valid: false,\n error: `Blockhash is not valid for cluster ${cluster}. The transaction may be for a different cluster or the blockhash may have expired.`\n };\n }\n return { valid: true };\n } catch (err) {\n return {\n valid: false,\n error: `Unable to verify blockhash on cluster ${cluster}: ${err instanceof Error ? err.message : String(err)}`\n };\n }\n }\n\n // src/lib/vincent-ability.ts\n var getSolanaKeyPairFromWrappedKey = import_vincent_wrapped_keys.api.litActionHelpers.getSolanaKeyPairFromWrappedKey;\n var vincentAbility = (0, import_vincent_ability_sdk.createVincentAbility)({\n packageName: \"@lit-protocol/vincent-ability-sol-transaction-signer\",\n abilityDescription: \"Sign a Solana transaction using a Vincent Agent Wallet with encrypted private key.\",\n abilityParamsSchema,\n supportedPolicies: (0, import_vincent_ability_sdk.supportedPoliciesForAbility)([]),\n precheckFailSchema,\n executeSuccessSchema,\n executeFailSchema,\n precheck: async ({ abilityParams: abilityParams2 }, { succeed, fail }) => {\n const { serializedTransaction, cluster, rpcUrl } = abilityParams2;\n if (!rpcUrl) {\n console.log(\n \"[@lit-protocol/vincent-ability-sol-transaction-signer] rpcUrl not provided using @solana/web3.js default\"\n );\n }\n try {\n const transaction = deserializeTransaction(serializedTransaction);\n const verification = await verifyBlockhashForCluster({\n transaction,\n cluster,\n rpcUrl: rpcUrl || (0, import_web34.clusterApiUrl)(cluster)\n });\n if (!verification.valid) {\n return fail({\n error: `[@lit-protocol/vincent-ability-sol-transaction-signer] ${verification.error}`\n });\n }\n return succeed();\n } catch (error) {\n return fail({\n error: `[@lit-protocol/vincent-ability-sol-transaction-signer] Failed to decode Solana transaction: ${error instanceof Error ? error.message : String(error)}`\n });\n }\n },\n execute: async ({ abilityParams: abilityParams2 }, { succeed, fail, delegation: { delegatorPkpInfo } }) => {\n const {\n serializedTransaction,\n cluster,\n ciphertext,\n dataToEncryptHash,\n legacyTransactionOptions,\n evmContractConditions\n } = abilityParams2;\n const { ethAddress: ethAddress2 } = delegatorPkpInfo;\n try {\n const solanaKeypair = await getSolanaKeyPairFromWrappedKey({\n delegatorAddress: ethAddress2,\n ciphertext,\n dataToEncryptHash,\n evmContractConditions\n });\n const transaction = deserializeTransaction(serializedTransaction);\n const litChainIdentifier = {\n devnet: \"solanaDevnet\",\n testnet: \"solanaTestnet\",\n \"mainnet-beta\": \"solana\"\n };\n const verification = await verifyBlockhashForCluster({\n transaction,\n cluster,\n rpcUrl: await Lit.Actions.getRpcUrl({ chain: litChainIdentifier[cluster] })\n });\n if (!verification.valid) {\n return fail({\n error: `[@lit-protocol/vincent-ability-sol-transaction-signer] ${verification.error}`\n });\n }\n signSolanaTransaction({\n solanaKeypair,\n transaction\n });\n let signedSerializedTransaction;\n if (transaction instanceof import_web34.Transaction) {\n if (!transaction.feePayer)\n transaction.feePayer = solanaKeypair.publicKey;\n signedSerializedTransaction = Buffer2.from(\n transaction.serialize({\n requireAllSignatures: legacyTransactionOptions?.requireAllSignatures ?? true,\n verifySignatures: legacyTransactionOptions?.verifySignatures ?? false\n })\n ).toString(\"base64\");\n } else {\n signedSerializedTransaction = Buffer2.from(transaction.serialize()).toString(\"base64\");\n }\n return succeed({\n signedTransaction: signedSerializedTransaction\n });\n } catch (error) {\n return fail({\n error: `[@lit-protocol/vincent-ability-sol-transaction-signer] Failed to sign Solana transaction: ${error instanceof Error ? error.message : String(error)}`\n });\n }\n }\n });\n\n // src/lib/lit-action.ts\n (async () => {\n const func = (0, import_vincent_ability_sdk2.vincentAbilityHandler)({\n vincentAbility,\n context: {\n delegatorPkpEthAddress: context.delegatorPkpEthAddress\n },\n abilityParams\n });\n await func();\n })();\n})();\n/*! Bundled license information:\n\n@jspm/core/nodelibs/browser/chunk-DtuTasat.js:\n (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *)\n\njs-sha3/src/sha3.js:\n (**\n * [js-sha3]{@link https://github.com/emn178/js-sha3}\n *\n * @version 0.8.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2018\n * @license MIT\n *)\n\ntslib/tslib.es6.js:\n (*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n \n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n \n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** *)\n\ndepd/lib/browser/index.js:\n (*!\n * depd\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n *)\n\nassertion-error/index.js:\n (*!\n * assertion-error\n * Copyright(c) 2013 Jake Luer \n * MIT Licensed\n *)\n (*!\n * Return a function that will copy properties from\n * one object to another excluding any originally\n * listed. Returned function will create a new `{}`.\n *\n * @param {String} excluded properties ...\n * @return {Function}\n *)\n (*!\n * Primary Exports\n *)\n (*!\n * Inherit from Error.prototype\n *)\n (*!\n * Statically set name\n *)\n (*!\n * Ensure correct constructor\n *)\n\ndate-and-time/date-and-time.js:\n (**\n * @preserve date-and-time (c) KNOWLEDGECODE | MIT\n *)\n\n@noble/hashes/utils.js:\n (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/modular.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/curve.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/weierstrass.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/_shortw_utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/secp256k1.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\naes-js/lib.commonjs/aes.js:\n (*! MIT License. Copyright 2015-2022 Richard Moore . See LICENSE.txt. *)\n\n@noble/hashes/esm/utils.js:\n (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/modular.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/curve.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/weierstrass.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/_shortw_utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/secp256k1.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/modular.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/curve.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/weierstrass.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/_shortw_utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/secp256k1.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@scure/base/lib/esm/index.js:\n (*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@scure/bip32/lib/esm/index.js:\n (*! scure-bip32 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)\n\n@scure/bip39/esm/index.js:\n (*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/nist.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/p256.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/hashes/utils.js:\n (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/modular.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/curve.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/edwards.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/abstract/montgomery.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/ed25519.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\nsafe-buffer/index.js:\n (*! safe-buffer. MIT License. Feross Aboukhadijeh *)\n\n@solana/buffer-layout/lib/Layout.js:\n (**\n * Support for translating between Uint8Array instances and JavaScript\n * native types.\n *\n * {@link module:Layout~Layout|Layout} is the basis of a class\n * hierarchy that associates property names with sequences of encoded\n * bytes.\n *\n * Layouts are supported for these scalar (numeric) types:\n * * {@link module:Layout~UInt|Unsigned integers in little-endian\n * format} with {@link module:Layout.u8|8-bit}, {@link\n * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},\n * {@link module:Layout.u32|32-bit}, {@link\n * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}\n * representation ranges;\n * * {@link module:Layout~UIntBE|Unsigned integers in big-endian\n * format} with {@link module:Layout.u16be|16-bit}, {@link\n * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},\n * {@link module:Layout.u40be|40-bit}, and {@link\n * module:Layout.u48be|48-bit} representation ranges;\n * * {@link module:Layout~Int|Signed integers in little-endian\n * format} with {@link module:Layout.s8|8-bit}, {@link\n * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},\n * {@link module:Layout.s32|32-bit}, {@link\n * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}\n * representation ranges;\n * * {@link module:Layout~IntBE|Signed integers in big-endian format}\n * with {@link module:Layout.s16be|16-bit}, {@link\n * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},\n * {@link module:Layout.s40be|40-bit}, and {@link\n * module:Layout.s48be|48-bit} representation ranges;\n * * 64-bit integral values that decode to an exact (if magnitude is\n * less than 2^53) or nearby integral Number in {@link\n * module:Layout.nu64|unsigned little-endian}, {@link\n * module:Layout.nu64be|unsigned big-endian}, {@link\n * module:Layout.ns64|signed little-endian}, and {@link\n * module:Layout.ns64be|unsigned big-endian} encodings;\n * * 32-bit floating point values with {@link\n * module:Layout.f32|little-endian} and {@link\n * module:Layout.f32be|big-endian} representations;\n * * 64-bit floating point values with {@link\n * module:Layout.f64|little-endian} and {@link\n * module:Layout.f64be|big-endian} representations;\n * * {@link module:Layout.const|Constants} that take no space in the\n * encoded expression.\n *\n * and for these aggregate types:\n * * {@link module:Layout.seq|Sequence}s of instances of a {@link\n * module:Layout~Layout|Layout}, with JavaScript representation as\n * an Array and constant or data-dependent {@link\n * module:Layout~Sequence#count|length};\n * * {@link module:Layout.struct|Structure}s that aggregate a\n * heterogeneous sequence of {@link module:Layout~Layout|Layout}\n * instances, with JavaScript representation as an Object;\n * * {@link module:Layout.union|Union}s that support multiple {@link\n * module:Layout~VariantLayout|variant layouts} over a fixed\n * (padded) or variable (not padded) span of bytes, using an\n * unsigned integer at the start of the data or a separate {@link\n * module:Layout.unionLayoutDiscriminator|layout element} to\n * determine which layout to use when interpreting the buffer\n * contents;\n * * {@link module:Layout.bits|BitStructure}s that contain a sequence\n * of individual {@link\n * module:Layout~BitStructure#addField|BitField}s packed into an 8,\n * 16, 24, or 32-bit unsigned integer starting at the least- or\n * most-significant bit;\n * * {@link module:Layout.cstr|C strings} of varying length;\n * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link\n * module:Layout~Blob#length|length} raw data.\n *\n * All {@link module:Layout~Layout|Layout} instances are immutable\n * after construction, to prevent internal state from becoming\n * inconsistent.\n *\n * @local Layout\n * @local ExternalLayout\n * @local GreedyCount\n * @local OffsetLayout\n * @local UInt\n * @local UIntBE\n * @local Int\n * @local IntBE\n * @local NearUInt64\n * @local NearUInt64BE\n * @local NearInt64\n * @local NearInt64BE\n * @local Float\n * @local FloatBE\n * @local Double\n * @local DoubleBE\n * @local Sequence\n * @local Structure\n * @local UnionDiscriminator\n * @local UnionLayoutDiscriminator\n * @local Union\n * @local VariantLayout\n * @local BitStructure\n * @local BitField\n * @local Boolean\n * @local Blob\n * @local CString\n * @local Constant\n * @local bindConstructorLayout\n * @module Layout\n * @license MIT\n * @author Peter A. Bigot\n * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}\n *)\n\n@noble/curves/abstract/weierstrass.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/_shortw_utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/secp256k1.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n*/\n"; module.exports = { "code": code, - "ipfsCid": "QmWKb4ZEU1iHNg9JZ4zmUAHXr45B98xoRMEVYPgP7Et6gt", + "ipfsCid": "QmUks5BfgN3APrtxiPoCapTnVLNBExk6q8UuNpzDMgwJvj", }; diff --git a/packages/apps/ability-sol-transaction-signer/src/generated/vincent-ability-metadata.json b/packages/apps/ability-sol-transaction-signer/src/generated/vincent-ability-metadata.json index 299a0bb79..b4420ad3e 100644 --- a/packages/apps/ability-sol-transaction-signer/src/generated/vincent-ability-metadata.json +++ b/packages/apps/ability-sol-transaction-signer/src/generated/vincent-ability-metadata.json @@ -1,3 +1,3 @@ { - "ipfsCid": "QmWKb4ZEU1iHNg9JZ4zmUAHXr45B98xoRMEVYPgP7Et6gt" + "ipfsCid": "QmUks5BfgN3APrtxiPoCapTnVLNBExk6q8UuNpzDMgwJvj" } diff --git a/packages/apps/ability-sol-transaction-signer/src/lib/schemas.ts b/packages/apps/ability-sol-transaction-signer/src/lib/schemas.ts index 7f54d9e13..76d325a65 100644 --- a/packages/apps/ability-sol-transaction-signer/src/lib/schemas.ts +++ b/packages/apps/ability-sol-transaction-signer/src/lib/schemas.ts @@ -10,6 +10,9 @@ export const abilityParamsSchema = z.object({ .describe( 'The base64 encoded serialized Solana transaction to be evaluated and signed (transaction type is auto-detected)', ), + evmContractConditions: z + .any() + .describe('The evm contract access control conditions for the Wrapped Key'), ciphertext: z.string().describe('The encrypted private key ciphertext for the Agent Wallet'), dataToEncryptHash: z.string().describe('SHA-256 hash of the encrypted data for verification'), legacyTransactionOptions: z diff --git a/packages/apps/ability-sol-transaction-signer/src/lib/vincent-ability.ts b/packages/apps/ability-sol-transaction-signer/src/lib/vincent-ability.ts index cca5253da..32d38b1d4 100644 --- a/packages/apps/ability-sol-transaction-signer/src/lib/vincent-ability.ts +++ b/packages/apps/ability-sol-transaction-signer/src/lib/vincent-ability.ts @@ -76,6 +76,7 @@ export const vincentAbility = createVincentAbility({ ciphertext, dataToEncryptHash, legacyTransactionOptions, + evmContractConditions, } = abilityParams; const { ethAddress } = delegatorPkpInfo; @@ -84,6 +85,7 @@ export const vincentAbility = createVincentAbility({ delegatorAddress: ethAddress, ciphertext, dataToEncryptHash, + evmContractConditions, }); const transaction = deserializeTransaction(serializedTransaction); diff --git a/packages/libs/app-sdk/src/abilityClient/execute/generateVincentAbilitySessionSigs.ts b/packages/libs/app-sdk/src/abilityClient/execute/generateVincentAbilitySessionSigs.ts index 10528190c..3796946af 100644 --- a/packages/libs/app-sdk/src/abilityClient/execute/generateVincentAbilitySessionSigs.ts +++ b/packages/libs/app-sdk/src/abilityClient/execute/generateVincentAbilitySessionSigs.ts @@ -7,6 +7,7 @@ import type { LitNodeClient } from '@lit-protocol/lit-node-client'; import { createSiweMessageWithRecaps, generateAuthSig, + LitAccessControlConditionResource, LitActionResource, LitPKPResource, } from '@lit-protocol/auth-helpers'; @@ -25,6 +26,11 @@ export const generateVincentAbilitySessionSigs = async ({ resourceAbilityRequests: [ { resource: new LitPKPResource('*'), ability: LIT_ABILITY.PKPSigning }, { resource: new LitActionResource('*'), ability: LIT_ABILITY.LitActionExecution }, + // This is required for abilities that use Vincent Wrapped Keys to be able to decrypt the previously encrypted wrapped key + { + resource: new LitAccessControlConditionResource('*'), + ability: LIT_ABILITY.AccessControlConditionDecryption, + }, ], authNeededCallback: async ({ resourceAbilityRequests, uri }) => { const [walletAddress, nonce] = await Promise.all([ diff --git a/packages/libs/contracts-sdk/eslint.config.js b/packages/libs/contracts-sdk/eslint.config.js index adea2ffaa..4d626389b 100644 --- a/packages/libs/contracts-sdk/eslint.config.js +++ b/packages/libs/contracts-sdk/eslint.config.js @@ -6,4 +6,14 @@ module.exports = [ { ignores: ['**/lib/**/*'], }, + { + files: ['package.json'], + rules: { + // Fix for this incorrect eslint error: + // packages/libs/contracts-sdk/package.json + // 32:3 error The "contracts-sdk" project uses the following packages, but they are missing from "dependencies": + // - @lit-protocol/types @nx/dependency-checks + '@nx/dependency-checks': ['error', { ignoredDependencies: ['@lit-protocol/types'] }], + }, + }, ]; diff --git a/packages/libs/contracts-sdk/package.json b/packages/libs/contracts-sdk/package.json index 70943bac9..b27a78c7d 100644 --- a/packages/libs/contracts-sdk/package.json +++ b/packages/libs/contracts-sdk/package.json @@ -18,10 +18,9 @@ "devDependencies": { "@dotenvx/dotenvx": "^1.44.2", "@lit-protocol/auth-helpers": "^7.2.3", - "@lit-protocol/constants": "^7.2.3", - "@lit-protocol/contracts-sdk": "^7.2.3", "@lit-protocol/lit-node-client": "^7.2.3", "@lit-protocol/pkp-ethers": "^7.2.3", + "@lit-protocol/types": "^7.2.3", "@openzeppelin/contracts": "5.3.0", "@types/jest": "^29.5.12", "jest": "^29.5.0", @@ -32,6 +31,8 @@ }, "dependencies": { "@ethersproject/abi": "^5.8.0", + "@lit-protocol/constants": "^7.3.1", + "@lit-protocol/contracts-sdk": "^7.2.3", "cbor2": "^2.0.1", "ethers": "^5.8.0" } diff --git a/packages/libs/contracts-sdk/src/index.ts b/packages/libs/contracts-sdk/src/index.ts index 505c2a37a..55ab348f6 100644 --- a/packages/libs/contracts-sdk/src/index.ts +++ b/packages/libs/contracts-sdk/src/index.ts @@ -43,6 +43,4 @@ export { getTestClient, clientFromContract, getClient } from './contractClient'; export { createContract } from './utils'; -export { getPkpTokenId } from './utils/pkpInfo'; - -export { VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD, COMBINED_ABI } from './constants'; +export { getVincentWrappedKeysAccs } from './internal/wrapped-keys/getVincentWrappedKeysAccs'; diff --git a/packages/libs/contracts-sdk/src/internal/wrapped-keys/getVincentWrappedKeysAccs.ts b/packages/libs/contracts-sdk/src/internal/wrapped-keys/getVincentWrappedKeysAccs.ts new file mode 100644 index 000000000..3357d2dce --- /dev/null +++ b/packages/libs/contracts-sdk/src/internal/wrapped-keys/getVincentWrappedKeysAccs.ts @@ -0,0 +1,142 @@ +import { ethers } from 'ethers'; + +import type { AccsEVMParams, EvmContractConditions } from '@lit-protocol/types'; + +import { LIT_NETWORK, LIT_RPC } from '@lit-protocol/constants'; +import { LitContracts } from '@lit-protocol/contracts-sdk'; + +import { COMBINED_ABI, VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD } from '../../constants'; +import { getPkpTokenId } from '../../utils/pkpInfo'; + +const CHAIN_YELLOWSTONE = 'yellowstone' as const; + +/** + * Creates access control condition to validate Vincent delegatee and platform user authorization + * via the Vincent registry contract's isDelegateePermitted method and the PKP NFT contract's ownerOf method + * + * Creates access control conditions for both the delegatee and the platform user. + * Delegatee authorization is validated by the Vincent registry contract's isDelegateePermitted method. + * Platform user authorization is validated by validating the owner of the delegator PKP token is the requester by checking + * the Lit PKP NFT contract's ownerOf method. + * + * @param delegatorAddress - The address of the delegator + * + * @returns EvmContractConditions - Access control conditions authorizing a valid delegatee OR a platform user that is the owner of the delegator's PKP token + */ +export async function getVincentWrappedKeysAccs({ + delegatorAddress, +}: { + delegatorAddress: string; +}): Promise { + if (!ethers.utils.isAddress(delegatorAddress)) { + throw new Error(`delegatorAddress is not a valid Ethereum Address: ${delegatorAddress}`); + } + + const delegatorPkpTokenId = ( + await getPkpTokenId({ + pkpEthAddress: delegatorAddress, + signer: ethers.Wallet.createRandom().connect( + new ethers.providers.StaticJsonRpcProvider(LIT_RPC.CHRONICLE_YELLOWSTONE), + ), // Read only; signer identity is irrelevant in this code path :) + }) + ).toString(); + + return Promise.all([ + getDelegateeAccessControlConditions({ + delegatorPkpTokenId, + }), + Promise.resolve({ operator: 'or' }), + getPlatformUserAccessControlConditions({ + delegatorPkpTokenId, + }), + ]); +} + +async function getDelegateeAccessControlConditions({ + delegatorPkpTokenId, +}: { + delegatorPkpTokenId: string; +}): Promise { + const contractInterface = new ethers.utils.Interface(COMBINED_ABI.fragments); + const fragment = contractInterface.getFunction('isDelegateePermitted'); + + const functionAbi = { + type: 'function', + name: fragment.name, + inputs: fragment.inputs.map((input) => ({ + name: input.name, + type: input.type, + })), + outputs: fragment.outputs?.map((output) => ({ + name: output.name, + type: output.type, + })), + stateMutability: fragment.stateMutability, + }; + + return { + contractAddress: VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD, + chain: CHAIN_YELLOWSTONE, + functionAbi, + functionName: 'isDelegateePermitted', + functionParams: [':userAddress', delegatorPkpTokenId, ':currentActionIpfsId'], + returnValueTest: { + key: 'isPermitted', + comparator: '=', + value: 'true', + }, + }; +} + +/** + * Delegated wrapped keys access control condition is 'the owner of the PKP may decrypt this' + * - e.g. the Vincent 'user PKP' can decrypt the wrapped keys for all of their agent PKPs + * + * This contrasts from the original wrapped keys access control condition, which was 'the PKP itself may decrypt this' + * + * @param delegatorPkpTokenId + */ +async function getPlatformUserAccessControlConditions({ + delegatorPkpTokenId, +}: { + delegatorPkpTokenId: string; +}): Promise { + const contractAddresses = await LitContracts.getContractAddresses( + LIT_NETWORK.Datil, + new ethers.providers.StaticJsonRpcProvider(LIT_RPC.CHRONICLE_YELLOWSTONE), + ); + + const pkpNftContractInfo: { address: string; abi: any[] } = contractAddresses.PKPNFT; + if (!pkpNftContractInfo) { + throw new Error('PKP NFT contract address not found for Datil network'); + } + + return { + contractAddress: pkpNftContractInfo.address, + chain: CHAIN_YELLOWSTONE, + functionAbi: { + type: 'function', + name: 'ownerOf', + inputs: [ + { + name: 'tokenId', + type: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + }, + functionName: 'ownerOf', + functionParams: [delegatorPkpTokenId], + returnValueTest: { + key: '', + comparator: '=', + value: ':userAddress', + }, + }; +} diff --git a/packages/libs/wrapped-keys/package.json b/packages/libs/wrapped-keys/package.json index bd5f3e656..60c4d7311 100644 --- a/packages/libs/wrapped-keys/package.json +++ b/packages/libs/wrapped-keys/package.json @@ -1,6 +1,6 @@ { "name": "@lit-protocol/vincent-wrapped-keys", - "version": "0.1.0", + "version": "0.6.0", "publishConfig": { "access": "public" }, @@ -25,6 +25,7 @@ } }, "devDependencies": { + "@lit-protocol/lit-node-client": "^7.2.3", "@types/semver": "^7.7.0", "chokidar-cli": "^3.0.0", "ipfs-only-hash": "^4.0.0", diff --git a/packages/libs/wrapped-keys/src/index.ts b/packages/libs/wrapped-keys/src/index.ts index ed9468d0c..f3e95ab54 100644 --- a/packages/libs/wrapped-keys/src/index.ts +++ b/packages/libs/wrapped-keys/src/index.ts @@ -1,4 +1,8 @@ -import type { SupportedNetworks } from './lib/service-client/types'; +import type { + SupportedNetworks, + StoreKeyParams, + StoreKeyBatchParams, +} from './lib/service-client/types'; import type { GetEncryptedKeyDataParams, GeneratePrivateKeyParams, @@ -16,6 +20,8 @@ import type { BatchGeneratePrivateKeysResult, Network, KeyType, + ExportPrivateKeyParams, + ExportPrivateKeyResult, } from './lib/types'; import { @@ -25,7 +31,7 @@ import { listEncryptedKeyMetadata, batchGeneratePrivateKeys, storeEncryptedKeyBatch, - getVincentRegistryAccessControlCondition, + exportPrivateKey, } from './lib/api'; import { CHAIN_YELLOWSTONE, LIT_PREFIX, NETWORK_SOLANA, KEYTYPE_ED25519 } from './lib/constants'; import { getSolanaKeyPairFromWrappedKey } from './lib/lit-actions-client'; @@ -44,7 +50,7 @@ export const api = { storeEncryptedKey, storeEncryptedKeyBatch, batchGeneratePrivateKeys, - getVincentRegistryAccessControlCondition, + exportPrivateKey, litActionHelpers: { getSolanaKeyPairFromWrappedKey, }, @@ -68,4 +74,8 @@ export { BatchGeneratePrivateKeysResult, Network, KeyType, + StoreKeyParams, + StoreKeyBatchParams, + ExportPrivateKeyParams, + ExportPrivateKeyResult, }; diff --git a/packages/libs/wrapped-keys/src/lib/api/batch-generate-private-keys.ts b/packages/libs/wrapped-keys/src/lib/api/batch-generate-private-keys.ts index fa6ef3775..a535a2b33 100644 --- a/packages/libs/wrapped-keys/src/lib/api/batch-generate-private-keys.ts +++ b/packages/libs/wrapped-keys/src/lib/api/batch-generate-private-keys.ts @@ -1,3 +1,5 @@ +import { getVincentWrappedKeysAccs } from '@lit-protocol/vincent-contracts-sdk'; + import type { BatchGeneratePrivateKeysParams, BatchGeneratePrivateKeysResult, @@ -7,7 +9,7 @@ import type { import { batchGenerateKeysWithLitAction } from '../lit-actions-client'; import { getLitActionCommonCid } from '../lit-actions-client/utils'; import { storePrivateKeyBatch } from '../service-client'; -import { getKeyTypeFromNetwork, getVincentRegistryAccessControlCondition } from './utils'; +import { getKeyTypeFromNetwork } from './utils'; /** * Generates multiple random private keys inside a Lit Action for Vincent delegators, @@ -26,7 +28,7 @@ export async function batchGeneratePrivateKeys( ): Promise { const { jwtToken, delegatorAddress, litNodeClient } = params; - const allowDelegateeToDecrypt = await getVincentRegistryAccessControlCondition({ + const vincentWrappedKeysAccs = await getVincentWrappedKeysAccs({ delegatorAddress, }); @@ -35,14 +37,16 @@ export async function batchGeneratePrivateKeys( const actionResults = await batchGenerateKeysWithLitAction({ ...params, litActionIpfsCid, - accessControlConditions: [allowDelegateeToDecrypt], + evmContractConditions: vincentWrappedKeysAccs, }); - const keyParamsBatch = actionResults.map((keyData) => { + const keyParamsBatch = actionResults.map((keyData, index) => { const { generateEncryptedPrivateKey } = keyData; return { ...generateEncryptedPrivateKey, keyType: getKeyTypeFromNetwork('solana'), + delegatorAddress, + evmContractConditions: actionResults[index].generateEncryptedPrivateKey.evmContractConditions, }; }); @@ -56,17 +60,17 @@ export async function batchGeneratePrivateKeys( const { generateEncryptedPrivateKey: { memo, publicKey }, } = actionResult; - const id = ids[index]; // Result of writes is in same order as provided + const id = ids[index]; // Result of writes is returned in the same order as provided const signature = actionResult.signMessage?.signature; return { ...(signature ? { signMessage: { signature } } : {}), generateEncryptedPrivateKey: { + delegatorAddress, memo, id, generatedPublicKey: publicKey, - delegatorAddress, }, }; }); diff --git a/packages/libs/wrapped-keys/src/lib/api/export-private-key.ts b/packages/libs/wrapped-keys/src/lib/api/export-private-key.ts new file mode 100644 index 000000000..d63d8236d --- /dev/null +++ b/packages/libs/wrapped-keys/src/lib/api/export-private-key.ts @@ -0,0 +1,47 @@ +import type { ExportPrivateKeyParams, ExportPrivateKeyResult } from '../types'; + +import { fetchPrivateKey } from '../service-client'; +import { removeSaltFromDecryptedKey } from '../utils'; + +export const exportPrivateKey = async ({ + litNodeClient, + delegatorSessionSigs, + jwtToken, + id, + delegatorAddress, +}: ExportPrivateKeyParams): Promise => { + const storedKeyMetadata = await fetchPrivateKey({ + delegatorAddress, + id, + jwtToken, + litNetwork: litNodeClient.config.litNetwork, + }); + + const { + ciphertext, + dataToEncryptHash, + evmContractConditions, + publicKey, + keyType, + litNetwork, + memo, + } = storedKeyMetadata; + + const { decryptedData } = await litNodeClient.decrypt({ + sessionSigs: delegatorSessionSigs, + ciphertext, + dataToEncryptHash, + evmContractConditions: JSON.parse(evmContractConditions), + chain: 'ethereum', + }); + + return { + decryptedPrivateKey: removeSaltFromDecryptedKey(new TextDecoder().decode(decryptedData)), + delegatorAddress, + id, + publicKey, + keyType, + litNetwork, + memo, + }; +}; diff --git a/packages/libs/wrapped-keys/src/lib/api/generate-private-key.ts b/packages/libs/wrapped-keys/src/lib/api/generate-private-key.ts index 4099b4a68..79294a494 100644 --- a/packages/libs/wrapped-keys/src/lib/api/generate-private-key.ts +++ b/packages/libs/wrapped-keys/src/lib/api/generate-private-key.ts @@ -1,9 +1,11 @@ +import { getVincentWrappedKeysAccs } from '@lit-protocol/vincent-contracts-sdk'; + import type { GeneratePrivateKeyParams, GeneratePrivateKeyResult } from '../types'; import { generateKeyWithLitAction } from '../lit-actions-client'; import { getLitActionCid } from '../lit-actions-client/utils'; import { storePrivateKey } from '../service-client'; -import { getKeyTypeFromNetwork, getVincentRegistryAccessControlCondition } from './utils'; +import { getKeyTypeFromNetwork } from './utils'; /** * Generates a random private key inside a Lit Action for Vincent delegators, @@ -22,17 +24,18 @@ export async function generatePrivateKey( ): Promise { const { delegatorAddress, jwtToken, network, litNodeClient, memo } = params; - const allowDelegateeToDecrypt = await getVincentRegistryAccessControlCondition({ + const vincentWrappedKeysAccs = await getVincentWrappedKeysAccs({ delegatorAddress, }); const litActionIpfsCid = getLitActionCid(network, 'generateEncryptedKey'); - const { ciphertext, dataToEncryptHash, publicKey } = await generateKeyWithLitAction({ - ...params, - litActionIpfsCid, - accessControlConditions: [allowDelegateeToDecrypt], - }); + const { ciphertext, dataToEncryptHash, publicKey, evmContractConditions } = + await generateKeyWithLitAction({ + ...params, + litActionIpfsCid, + evmContractConditions: vincentWrappedKeysAccs, + }); const { id } = await storePrivateKey({ jwtToken, @@ -42,6 +45,8 @@ export async function generatePrivateKey( keyType: getKeyTypeFromNetwork(network), dataToEncryptHash, memo, + delegatorAddress, + evmContractConditions, }, litNetwork: litNodeClient.config.litNetwork, }); diff --git a/packages/libs/wrapped-keys/src/lib/api/index.ts b/packages/libs/wrapped-keys/src/lib/api/index.ts index 67cec0ffd..4701aafe5 100644 --- a/packages/libs/wrapped-keys/src/lib/api/index.ts +++ b/packages/libs/wrapped-keys/src/lib/api/index.ts @@ -4,8 +4,5 @@ export { listEncryptedKeyMetadata } from './list-encrypted-key-metadata'; export { getEncryptedKey } from './get-encrypted-key'; export { storeEncryptedKey } from './store-encrypted-key'; export { storeEncryptedKeyBatch } from './store-encrypted-key-batch'; -export { - getKeyTypeFromNetwork, - getFirstSessionSig, - getVincentRegistryAccessControlCondition, -} from './utils'; +export { getKeyTypeFromNetwork } from './utils'; +export { exportPrivateKey } from './export-private-key'; diff --git a/packages/libs/wrapped-keys/src/lib/api/store-encrypted-key-batch.ts b/packages/libs/wrapped-keys/src/lib/api/store-encrypted-key-batch.ts index d2ffab9ea..f653fe4b3 100644 --- a/packages/libs/wrapped-keys/src/lib/api/store-encrypted-key-batch.ts +++ b/packages/libs/wrapped-keys/src/lib/api/store-encrypted-key-batch.ts @@ -18,7 +18,7 @@ import { storePrivateKeyBatch } from '../service-client'; export async function storeEncryptedKeyBatch( params: StoreEncryptedKeyBatchParams, ): Promise { - const { jwtToken, litNodeClient, keyBatch } = params; + const { jwtToken, litNodeClient, keyBatch, delegatorAddress } = params; const storedKeyMetadataBatch: StoreKeyBatchParams['storedKeyMetadataBatch'] = keyBatch.map( ({ @@ -27,15 +27,24 @@ export async function storeEncryptedKeyBatch( memo, dataToEncryptHash, ciphertext, + evmContractConditions, }): Pick< StoredKeyData, - 'publicKey' | 'keyType' | 'dataToEncryptHash' | 'ciphertext' | 'memo' + | 'publicKey' + | 'keyType' + | 'dataToEncryptHash' + | 'ciphertext' + | 'memo' + | 'delegatorAddress' + | 'evmContractConditions' > => ({ publicKey, memo, dataToEncryptHash, ciphertext, keyType, + delegatorAddress, + evmContractConditions, }), ); diff --git a/packages/libs/wrapped-keys/src/lib/api/store-encrypted-key.ts b/packages/libs/wrapped-keys/src/lib/api/store-encrypted-key.ts index de14c6261..71ce601f4 100644 --- a/packages/libs/wrapped-keys/src/lib/api/store-encrypted-key.ts +++ b/packages/libs/wrapped-keys/src/lib/api/store-encrypted-key.ts @@ -15,7 +15,15 @@ export async function storeEncryptedKey( ): Promise { const { jwtToken, litNodeClient } = params; - const { publicKey, keyType, dataToEncryptHash, ciphertext, memo } = params; + const { + publicKey, + keyType, + dataToEncryptHash, + ciphertext, + memo, + delegatorAddress, + evmContractConditions, + } = params; return storePrivateKey({ storedKeyMetadata: { @@ -24,6 +32,8 @@ export async function storeEncryptedKey( dataToEncryptHash, ciphertext, memo, + delegatorAddress, + evmContractConditions, }, jwtToken, litNetwork: litNodeClient.config.litNetwork, diff --git a/packages/libs/wrapped-keys/src/lib/api/utils.ts b/packages/libs/wrapped-keys/src/lib/api/utils.ts index 9b5b4f9c7..3e5ef5ba6 100644 --- a/packages/libs/wrapped-keys/src/lib/api/utils.ts +++ b/packages/libs/wrapped-keys/src/lib/api/utils.ts @@ -1,17 +1,6 @@ -import { ethers } from 'ethers'; - -import type { AuthSig, SessionSigsMap, AccsEVMParams } from '@lit-protocol/types'; - -import { LIT_RPC } from '@lit-protocol/constants'; -import { - VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD, - getPkpTokenId, - COMBINED_ABI, -} from '@lit-protocol/vincent-contracts-sdk'; - import type { KeyType, Network } from '../types'; -import { CHAIN_YELLOWSTONE, NETWORK_SOLANA } from '../constants'; +import { NETWORK_SOLANA } from '../constants'; /** * Returns the key type for the given network @@ -27,80 +16,3 @@ export function getKeyTypeFromNetwork(network: Network): KeyType { throw new Error(`Network not implemented ${network}`); } } - -/** - * - * Extracts the first SessionSig from the SessionSigsMap since we only pass a single SessionSig to the AWS endpoint - * - * @param pkpSessionSigs - The PKP sessionSigs (map) used to associate the PKP with the generated private key - * - * @returns { AuthSig } - The first SessionSig from the map - */ -export function getFirstSessionSig(pkpSessionSigs: SessionSigsMap): AuthSig { - const sessionSigsEntries = Object.entries(pkpSessionSigs); - - if (sessionSigsEntries.length === 0) { - throw new Error(`Invalid pkpSessionSigs, length zero: ${JSON.stringify(pkpSessionSigs)}`); - } - - const [[, sessionSig]] = sessionSigsEntries; - return sessionSig; -} - -/** - * Creates access control condition to validate Vincent delegatee authorization - * via the Vincent registry contract's isDelegateePermitted method - * - * This function creates an ACC utilize the Vincent Delegatee's address derived from the inner Auth Sig of the provided Session Signatures, - * the delegator's PKP token ID derived from the provided delegator's address, and the IPFS CID of the executing Lit Action. - * - * @returns AccsEVMParams - Access control condition for Vincent registry validation - */ -export async function getVincentRegistryAccessControlCondition({ - delegatorAddress, -}: { - delegatorAddress: string; -}): Promise { - if (!ethers.utils.isAddress(delegatorAddress)) { - throw new Error(`delegatorAddress is not a valid Ethereum Address: ${delegatorAddress}`); - } - - const delegatorPkpTokenId = ( - await getPkpTokenId({ - pkpEthAddress: delegatorAddress, - signer: ethers.Wallet.createRandom().connect( - new ethers.providers.StaticJsonRpcProvider(LIT_RPC.CHRONICLE_YELLOWSTONE), - ), - }) - ).toString(); - - const contractInterface = new ethers.utils.Interface(COMBINED_ABI.fragments); - const fragment = contractInterface.getFunction('isDelegateePermitted'); - - const functionAbi = { - type: 'function', - name: fragment.name, - inputs: fragment.inputs.map((input) => ({ - name: input.name, - type: input.type, - })), - outputs: fragment.outputs?.map((output) => ({ - name: output.name, - type: output.type, - })), - stateMutability: fragment.stateMutability, - }; - - return { - contractAddress: VINCENT_DIAMOND_CONTRACT_ADDRESS_PROD, - functionAbi, - chain: CHAIN_YELLOWSTONE, - functionName: 'isDelegateePermitted', - functionParams: [':userAddress', delegatorPkpTokenId, ':currentActionIpfsId'], - returnValueTest: { - key: 'isPermitted', - comparator: '=', - value: 'true', - }, - }; -} diff --git a/packages/libs/wrapped-keys/src/lib/lit-actions-client/batch-generate-keys.ts b/packages/libs/wrapped-keys/src/lib/lit-actions-client/batch-generate-keys.ts index 2336a7e8b..8b7e36295 100644 --- a/packages/libs/wrapped-keys/src/lib/lit-actions-client/batch-generate-keys.ts +++ b/packages/libs/wrapped-keys/src/lib/lit-actions-client/batch-generate-keys.ts @@ -1,4 +1,4 @@ -import type { AccessControlConditions } from '@lit-protocol/types'; +import type { EvmContractConditions } from '@lit-protocol/types'; import type { BatchGeneratePrivateKeysParams, Network } from '../types'; @@ -7,11 +7,11 @@ import { postLitActionValidation } from './utils'; /** * Extended parameters for batch key generation with Lit Actions * @extends BatchGeneratePrivateKeysParams - * @property {AccessControlConditions} accessControlConditions - The access control conditions that will gate decryption of the generated keys + * @property {EvmContractConditions} evmContractConditions - The evm contract access control conditions that will gate decryption of the generated keys * @property {string} litActionIpfsCid - IPFS CID of the Lit Action to execute */ interface BatchGeneratePrivateKeysWithLitActionParams extends BatchGeneratePrivateKeysParams { - accessControlConditions: AccessControlConditions; + evmContractConditions: EvmContractConditions; litActionIpfsCid: string; } @@ -21,12 +21,14 @@ interface BatchGeneratePrivateKeysWithLitActionParams extends BatchGeneratePriva * @property {string} dataToEncryptHash - The hash of the encrypted data (used for decryption verification) * @property {string} publicKey - The public key of the generated keypair * @property {string} memo - User-provided descriptor for the key + * @property {string} evmContractConditions - The evm contract access control conditions that will gate decryption of the generated key */ interface GeneratePrivateKeyLitActionResult { ciphertext: string; dataToEncryptHash: string; publicKey: string; memo: string; + evmContractConditions: string; } /** @@ -45,11 +47,11 @@ interface BatchGeneratePrivateKeysWithLitActionResult { * Executes a Lit Action to generate multiple encrypted private keys in batch for Vincent Agent Wallets. * * This function directly invokes the Lit Action that generates multiple Solana keypairs and encrypts - * them with the provided access control conditions. The keys are generated inside the secure + * them with the provided evm contract access control conditions. The keys are generated inside the secure * Lit Action environment and returned encrypted, ensuring the raw private keys are never exposed. * * @param {BatchGeneratePrivateKeysWithLitActionParams} args - Parameters for batch key generation including - * delegatee session signatures, access control conditions, and actions specifying key generation details + * delegatee session signatures, evm contract access control conditions, and actions specifying key generation details * * @returns {Promise} Array of results, one for each generated key, * containing the encrypted private key, public key, and optional message signatures @@ -59,21 +61,16 @@ interface BatchGeneratePrivateKeysWithLitActionResult { export async function batchGenerateKeysWithLitAction( args: BatchGeneratePrivateKeysWithLitActionParams, ): Promise { - const { - accessControlConditions, - litNodeClient, - actions, - delegateeSessionSigs, - litActionIpfsCid, - } = args; + const { evmContractConditions, litNodeClient, actions, delegatorSessionSigs, litActionIpfsCid } = + args; const result = await litNodeClient.executeJs({ useSingleNode: true, - sessionSigs: delegateeSessionSigs, + sessionSigs: delegatorSessionSigs, ipfsId: litActionIpfsCid, jsParams: { actions, - accessControlConditions, + evmContractConditions, }, }); diff --git a/packages/libs/wrapped-keys/src/lib/lit-actions-client/generate-key.ts b/packages/libs/wrapped-keys/src/lib/lit-actions-client/generate-key.ts index 283c4d53b..73ab18641 100644 --- a/packages/libs/wrapped-keys/src/lib/lit-actions-client/generate-key.ts +++ b/packages/libs/wrapped-keys/src/lib/lit-actions-client/generate-key.ts @@ -1,4 +1,4 @@ -import type { AccessControlConditions } from '@lit-protocol/types'; +import type { EvmContractConditions } from '@lit-protocol/types'; import type { GeneratePrivateKeyParams } from '../types'; @@ -7,11 +7,11 @@ import { postLitActionValidation } from './utils'; /** * Extended parameters for single key generation with Lit Actions * @extends GeneratePrivateKeyParams - * @property {AccessControlConditions} accessControlConditions - The access control conditions that will gate decryption of the generated key + * @property {EvmContractConditions} evmContractConditions - The evm contract access control conditions that will gate decryption of the generated key * @property {string} litActionIpfsCid - IPFS CID of the Lit Action to execute */ interface GeneratePrivateKeyLitActionParams extends GeneratePrivateKeyParams { - accessControlConditions: AccessControlConditions; + evmContractConditions: EvmContractConditions; litActionIpfsCid: string; } @@ -20,22 +20,24 @@ interface GeneratePrivateKeyLitActionParams extends GeneratePrivateKeyParams { * @property {string} ciphertext - The encrypted private key * @property {string} dataToEncryptHash - The hash of the encrypted data (used for decryption verification) * @property {string} publicKey - The public key of the generated keypair + * @property {string} evmContractConditions - The evm contract access control conditions that will gate decryption of the generated key */ interface GeneratePrivateKeyLitActionResult { ciphertext: string; dataToEncryptHash: string; publicKey: string; + evmContractConditions: string; } /** * Executes a Lit Action to generate a single encrypted private key for a Vincent delegator. * * This function directly invokes the Lit Action that generates a Solana keypair and encrypts - * it with the provided access control conditions. The key is generated inside the secure + * it with the provided evm contract access control conditions. The key is generated inside the secure * Lit Action environment and returned encrypted, ensuring the raw private key is never exposed. * * @param {GeneratePrivateKeyLitActionParams} params - Parameters for key generation including - * delegatee session signatures, access control conditions, and the delegator address + * delegatee session signatures, evm contract access control conditions, and the delegator address * * @returns {Promise} The generated encrypted private key data * containing the ciphertext, dataToEncryptHash, and public key @@ -46,9 +48,9 @@ interface GeneratePrivateKeyLitActionResult { * ```typescript * const result = await generateKeyWithLitAction({ * litNodeClient, - * delegateeSessionSigs, + * delegatorSessionSigs, * delegatorAddress: '0x...', - * accessControlConditions: [...], + * evmContractConditions: [...], * litActionIpfsCid: 'Qm...', * network: 'solana', * memo: 'Trading wallet' @@ -58,18 +60,18 @@ interface GeneratePrivateKeyLitActionResult { */ export async function generateKeyWithLitAction({ litNodeClient, - delegateeSessionSigs, + delegatorSessionSigs, litActionIpfsCid, - accessControlConditions, + evmContractConditions, delegatorAddress, }: GeneratePrivateKeyLitActionParams): Promise { const result = await litNodeClient.executeJs({ useSingleNode: true, - sessionSigs: delegateeSessionSigs, + sessionSigs: delegatorSessionSigs, ipfsId: litActionIpfsCid, jsParams: { delegatorAddress, - accessControlConditions, + evmContractConditions, }, }); diff --git a/packages/libs/wrapped-keys/src/lib/lit-actions-client/get-solana-key-pair-from-wrapped-key.ts b/packages/libs/wrapped-keys/src/lib/lit-actions-client/get-solana-key-pair-from-wrapped-key.ts index 7075833ca..7a5e5d7f5 100644 --- a/packages/libs/wrapped-keys/src/lib/lit-actions-client/get-solana-key-pair-from-wrapped-key.ts +++ b/packages/libs/wrapped-keys/src/lib/lit-actions-client/get-solana-key-pair-from-wrapped-key.ts @@ -2,8 +2,7 @@ import { Keypair } from '@solana/web3.js'; import type { LitNamespace } from '../Lit'; -import { getVincentRegistryAccessControlCondition } from '../api/utils'; -import { LIT_PREFIX } from '../constants'; +import { removeSaltFromDecryptedKey } from '../utils'; declare const Lit: typeof LitNamespace; @@ -17,35 +16,24 @@ declare const Lit: typeof LitNamespace; * @throws Error if the decrypted private key is not prefixed with 'lit_' or if decryption fails */ export async function getSolanaKeyPairFromWrappedKey({ - delegatorAddress, ciphertext, dataToEncryptHash, + evmContractConditions, }: { delegatorAddress: string; ciphertext: string; dataToEncryptHash: string; + evmContractConditions: unknown[]; }): Promise { - const accessControlConditions = [ - await getVincentRegistryAccessControlCondition({ - delegatorAddress, - }), - ]; - const decryptedPrivateKey = await Lit.Actions.decryptAndCombine({ - accessControlConditions, + accessControlConditions: evmContractConditions, ciphertext, dataToEncryptHash, chain: 'ethereum', authSig: null, }); - if (!decryptedPrivateKey.startsWith(LIT_PREFIX)) { - throw new Error( - `Private key was not encrypted with salt; all wrapped keys must be prefixed with '${LIT_PREFIX}'`, - ); - } - - const noSaltPrivateKey = decryptedPrivateKey.slice(LIT_PREFIX.length); + const noSaltPrivateKey = removeSaltFromDecryptedKey(decryptedPrivateKey); const solanaKeypair = Keypair.fromSecretKey(Buffer.from(noSaltPrivateKey, 'hex')); return solanaKeypair; diff --git a/packages/libs/wrapped-keys/src/lib/lit-actions/generated/common/batchGenerateEncryptedKeys-metadata.json b/packages/libs/wrapped-keys/src/lib/lit-actions/generated/common/batchGenerateEncryptedKeys-metadata.json index d0e0b240c..6d155849f 100644 --- a/packages/libs/wrapped-keys/src/lib/lit-actions/generated/common/batchGenerateEncryptedKeys-metadata.json +++ b/packages/libs/wrapped-keys/src/lib/lit-actions/generated/common/batchGenerateEncryptedKeys-metadata.json @@ -1,3 +1,3 @@ { - "ipfsCid": "QmPFuLy3qYxXQvxfaswcXbgxYguEAS51Wo1GQYyGaAV9U2" + "ipfsCid": "QmSYoyYYYzQdfZqKBA3ouqvJPyDtRTuei7wjb6ULhK8XAH" } diff --git a/packages/libs/wrapped-keys/src/lib/lit-actions/generated/common/batchGenerateEncryptedKeys.js b/packages/libs/wrapped-keys/src/lib/lit-actions/generated/common/batchGenerateEncryptedKeys.js index 42795af9a..5f37e72ee 100644 --- a/packages/libs/wrapped-keys/src/lib/lit-actions/generated/common/batchGenerateEncryptedKeys.js +++ b/packages/libs/wrapped-keys/src/lib/lit-actions/generated/common/batchGenerateEncryptedKeys.js @@ -2,8 +2,8 @@ * DO NOT EDIT THIS FILE. IT IS GENERATED ON BUILD. * @type {string} */ -const code = ";(()=>{try{const g=globalThis;const D=(g.Deno=g.Deno||{});const B=(D.build=D.build||{});if(B.os==null){B.os=\"linux\";}}catch{}})();\n\"use strict\";\n(() => {\n var __create = Object.create;\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __getProtoOf = Object.getPrototypeOf;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n };\n var __commonJS = (cb, mod2) => function __require() {\n return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;\n };\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, \"default\", { value: mod2, enumerable: true }) : target,\n mod2\n ));\n var __toCommonJS = (mod2) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod2);\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/__dirname.js\n var init_dirname = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/__dirname.js\"() {\n \"use strict\";\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js\n function Item(fun, array2) {\n this.fun = fun;\n this.array = array2;\n }\n function hrtime(previousTimestamp) {\n var baseNow = Math.floor((Date.now() - _performance.now()) * 1e-3);\n var clocktime = _performance.now() * 1e-3;\n var seconds = Math.floor(clocktime) + baseNow;\n var nanoseconds = Math.floor(clocktime % 1 * 1e9);\n if (previousTimestamp) {\n seconds = seconds - previousTimestamp[0];\n nanoseconds = nanoseconds - previousTimestamp[1];\n if (nanoseconds < 0) {\n seconds--;\n nanoseconds += nanoPerSec;\n }\n }\n return [seconds, nanoseconds];\n }\n var env, _performance, nowOffset, nanoPerSec;\n var init_process = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Item.prototype.run = function() {\n this.fun.apply(null, this.array);\n };\n env = {\n PATH: \"/usr/bin\",\n LANG: typeof navigator !== \"undefined\" ? navigator.language + \".UTF-8\" : void 0,\n PWD: \"/\",\n HOME: \"/home\",\n TMP: \"/tmp\"\n };\n _performance = {\n now: typeof performance !== \"undefined\" ? performance.now.bind(performance) : void 0,\n timing: typeof performance !== \"undefined\" ? performance.timing : void 0\n };\n if (_performance.now === void 0) {\n nowOffset = Date.now();\n if (_performance.timing && _performance.timing.navigationStart) {\n nowOffset = _performance.timing.navigationStart;\n }\n _performance.now = () => Date.now() - nowOffset;\n }\n nanoPerSec = 1e9;\n hrtime.bigint = function(time) {\n var diff = hrtime(time);\n if (typeof BigInt === \"undefined\") {\n return diff[0] * nanoPerSec + diff[1];\n }\n return BigInt(diff[0] * nanoPerSec) + BigInt(diff[1]);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/process.js\n var init_process2 = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/process.js\"() {\n \"use strict\";\n init_process();\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js\n function dew$2() {\n if (_dewExec$2)\n return exports$2;\n _dewExec$2 = true;\n exports$2.byteLength = byteLength;\n exports$2.toByteArray = toByteArray;\n exports$2.fromByteArray = fromByteArray;\n var lookup = [];\n var revLookup = [];\n var Arr = typeof Uint8Array !== \"undefined\" ? Uint8Array : Array;\n var code = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n for (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i];\n revLookup[code.charCodeAt(i)] = i;\n }\n revLookup[\"-\".charCodeAt(0)] = 62;\n revLookup[\"_\".charCodeAt(0)] = 63;\n function getLens(b64) {\n var len2 = b64.length;\n if (len2 % 4 > 0) {\n throw new Error(\"Invalid string. Length must be a multiple of 4\");\n }\n var validLen = b64.indexOf(\"=\");\n if (validLen === -1)\n validLen = len2;\n var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;\n return [validLen, placeHoldersLen];\n }\n function byteLength(b64) {\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n }\n function _byteLength(b64, validLen, placeHoldersLen) {\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n }\n function toByteArray(b64) {\n var tmp;\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n var curByte = 0;\n var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;\n var i2;\n for (i2 = 0; i2 < len2; i2 += 4) {\n tmp = revLookup[b64.charCodeAt(i2)] << 18 | revLookup[b64.charCodeAt(i2 + 1)] << 12 | revLookup[b64.charCodeAt(i2 + 2)] << 6 | revLookup[b64.charCodeAt(i2 + 3)];\n arr[curByte++] = tmp >> 16 & 255;\n arr[curByte++] = tmp >> 8 & 255;\n arr[curByte++] = tmp & 255;\n }\n if (placeHoldersLen === 2) {\n tmp = revLookup[b64.charCodeAt(i2)] << 2 | revLookup[b64.charCodeAt(i2 + 1)] >> 4;\n arr[curByte++] = tmp & 255;\n }\n if (placeHoldersLen === 1) {\n tmp = revLookup[b64.charCodeAt(i2)] << 10 | revLookup[b64.charCodeAt(i2 + 1)] << 4 | revLookup[b64.charCodeAt(i2 + 2)] >> 2;\n arr[curByte++] = tmp >> 8 & 255;\n arr[curByte++] = tmp & 255;\n }\n return arr;\n }\n function tripletToBase64(num) {\n return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];\n }\n function encodeChunk(uint8, start, end) {\n var tmp;\n var output = [];\n for (var i2 = start; i2 < end; i2 += 3) {\n tmp = (uint8[i2] << 16 & 16711680) + (uint8[i2 + 1] << 8 & 65280) + (uint8[i2 + 2] & 255);\n output.push(tripletToBase64(tmp));\n }\n return output.join(\"\");\n }\n function fromByteArray(uint8) {\n var tmp;\n var len2 = uint8.length;\n var extraBytes = len2 % 3;\n var parts = [];\n var maxChunkLength = 16383;\n for (var i2 = 0, len22 = len2 - extraBytes; i2 < len22; i2 += maxChunkLength) {\n parts.push(encodeChunk(uint8, i2, i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength));\n }\n if (extraBytes === 1) {\n tmp = uint8[len2 - 1];\n parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 63] + \"==\");\n } else if (extraBytes === 2) {\n tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];\n parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + \"=\");\n }\n return parts.join(\"\");\n }\n return exports$2;\n }\n function dew$1() {\n if (_dewExec$1)\n return exports$1;\n _dewExec$1 = true;\n exports$1.read = function(buffer, offset2, isLE2, mLen, nBytes) {\n var e, m;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE2 ? nBytes - 1 : 0;\n var d = isLE2 ? -1 : 1;\n var s = buffer[offset2 + i];\n i += d;\n e = s & (1 << -nBits) - 1;\n s >>= -nBits;\n nBits += eLen;\n for (; nBits > 0; e = e * 256 + buffer[offset2 + i], i += d, nBits -= 8) {\n }\n m = e & (1 << -nBits) - 1;\n e >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m = m * 256 + buffer[offset2 + i], i += d, nBits -= 8) {\n }\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : (s ? -1 : 1) * Infinity;\n } else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\n };\n exports$1.write = function(buffer, value, offset2, isLE2, mLen, nBytes) {\n var e, m, c;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;\n var i = isLE2 ? 0 : nBytes - 1;\n var d = isLE2 ? 1 : -1;\n var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n value = Math.abs(value);\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n for (; mLen >= 8; buffer[offset2 + i] = m & 255, i += d, m /= 256, mLen -= 8) {\n }\n e = e << mLen | m;\n eLen += mLen;\n for (; eLen > 0; buffer[offset2 + i] = e & 255, i += d, e /= 256, eLen -= 8) {\n }\n buffer[offset2 + i - d] |= s * 128;\n };\n return exports$1;\n }\n function dew() {\n if (_dewExec)\n return exports;\n _dewExec = true;\n const base64 = dew$2();\n const ieee754 = dew$1();\n const customInspectSymbol = typeof Symbol === \"function\" && typeof Symbol[\"for\"] === \"function\" ? Symbol[\"for\"](\"nodejs.util.inspect.custom\") : null;\n exports.Buffer = Buffer3;\n exports.SlowBuffer = SlowBuffer;\n exports.INSPECT_MAX_BYTES = 50;\n const K_MAX_LENGTH = 2147483647;\n exports.kMaxLength = K_MAX_LENGTH;\n Buffer3.TYPED_ARRAY_SUPPORT = typedArraySupport();\n if (!Buffer3.TYPED_ARRAY_SUPPORT && typeof console !== \"undefined\" && typeof console.error === \"function\") {\n console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");\n }\n function typedArraySupport() {\n try {\n const arr = new Uint8Array(1);\n const proto = {\n foo: function() {\n return 42;\n }\n };\n Object.setPrototypeOf(proto, Uint8Array.prototype);\n Object.setPrototypeOf(arr, proto);\n return arr.foo() === 42;\n } catch (e) {\n return false;\n }\n }\n Object.defineProperty(Buffer3.prototype, \"parent\", {\n enumerable: true,\n get: function() {\n if (!Buffer3.isBuffer(this))\n return void 0;\n return this.buffer;\n }\n });\n Object.defineProperty(Buffer3.prototype, \"offset\", {\n enumerable: true,\n get: function() {\n if (!Buffer3.isBuffer(this))\n return void 0;\n return this.byteOffset;\n }\n });\n function createBuffer(length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"');\n }\n const buf = new Uint8Array(length);\n Object.setPrototypeOf(buf, Buffer3.prototype);\n return buf;\n }\n function Buffer3(arg, encodingOrOffset, length) {\n if (typeof arg === \"number\") {\n if (typeof encodingOrOffset === \"string\") {\n throw new TypeError('The \"string\" argument must be of type string. Received type number');\n }\n return allocUnsafe(arg);\n }\n return from(arg, encodingOrOffset, length);\n }\n Buffer3.poolSize = 8192;\n function from(value, encodingOrOffset, length) {\n if (typeof value === \"string\") {\n return fromString(value, encodingOrOffset);\n }\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value);\n }\n if (value == null) {\n throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n }\n if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {\n return fromArrayBuffer(value, encodingOrOffset, length);\n }\n if (typeof SharedArrayBuffer !== \"undefined\" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length);\n }\n if (typeof value === \"number\") {\n throw new TypeError('The \"value\" argument must not be of type number. Received type number');\n }\n const valueOf = value.valueOf && value.valueOf();\n if (valueOf != null && valueOf !== value) {\n return Buffer3.from(valueOf, encodingOrOffset, length);\n }\n const b = fromObject(value);\n if (b)\n return b;\n if (typeof Symbol !== \"undefined\" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === \"function\") {\n return Buffer3.from(value[Symbol.toPrimitive](\"string\"), encodingOrOffset, length);\n }\n throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n }\n Buffer3.from = function(value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length);\n };\n Object.setPrototypeOf(Buffer3.prototype, Uint8Array.prototype);\n Object.setPrototypeOf(Buffer3, Uint8Array);\n function assertSize(size) {\n if (typeof size !== \"number\") {\n throw new TypeError('\"size\" argument must be of type number');\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"');\n }\n }\n function alloc(size, fill, encoding) {\n assertSize(size);\n if (size <= 0) {\n return createBuffer(size);\n }\n if (fill !== void 0) {\n return typeof encoding === \"string\" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);\n }\n return createBuffer(size);\n }\n Buffer3.alloc = function(size, fill, encoding) {\n return alloc(size, fill, encoding);\n };\n function allocUnsafe(size) {\n assertSize(size);\n return createBuffer(size < 0 ? 0 : checked(size) | 0);\n }\n Buffer3.allocUnsafe = function(size) {\n return allocUnsafe(size);\n };\n Buffer3.allocUnsafeSlow = function(size) {\n return allocUnsafe(size);\n };\n function fromString(string2, encoding) {\n if (typeof encoding !== \"string\" || encoding === \"\") {\n encoding = \"utf8\";\n }\n if (!Buffer3.isEncoding(encoding)) {\n throw new TypeError(\"Unknown encoding: \" + encoding);\n }\n const length = byteLength(string2, encoding) | 0;\n let buf = createBuffer(length);\n const actual = buf.write(string2, encoding);\n if (actual !== length) {\n buf = buf.slice(0, actual);\n }\n return buf;\n }\n function fromArrayLike(array2) {\n const length = array2.length < 0 ? 0 : checked(array2.length) | 0;\n const buf = createBuffer(length);\n for (let i = 0; i < length; i += 1) {\n buf[i] = array2[i] & 255;\n }\n return buf;\n }\n function fromArrayView(arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView);\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);\n }\n return fromArrayLike(arrayView);\n }\n function fromArrayBuffer(array2, byteOffset, length) {\n if (byteOffset < 0 || array2.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds');\n }\n if (array2.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds');\n }\n let buf;\n if (byteOffset === void 0 && length === void 0) {\n buf = new Uint8Array(array2);\n } else if (length === void 0) {\n buf = new Uint8Array(array2, byteOffset);\n } else {\n buf = new Uint8Array(array2, byteOffset, length);\n }\n Object.setPrototypeOf(buf, Buffer3.prototype);\n return buf;\n }\n function fromObject(obj) {\n if (Buffer3.isBuffer(obj)) {\n const len = checked(obj.length) | 0;\n const buf = createBuffer(len);\n if (buf.length === 0) {\n return buf;\n }\n obj.copy(buf, 0, 0, len);\n return buf;\n }\n if (obj.length !== void 0) {\n if (typeof obj.length !== \"number\" || numberIsNaN(obj.length)) {\n return createBuffer(0);\n }\n return fromArrayLike(obj);\n }\n if (obj.type === \"Buffer\" && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data);\n }\n }\n function checked(length) {\n if (length >= K_MAX_LENGTH) {\n throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\" + K_MAX_LENGTH.toString(16) + \" bytes\");\n }\n return length | 0;\n }\n function SlowBuffer(length) {\n if (+length != length) {\n length = 0;\n }\n return Buffer3.alloc(+length);\n }\n Buffer3.isBuffer = function isBuffer(b) {\n return b != null && b._isBuffer === true && b !== Buffer3.prototype;\n };\n Buffer3.compare = function compare(a, b) {\n if (isInstance(a, Uint8Array))\n a = Buffer3.from(a, a.offset, a.byteLength);\n if (isInstance(b, Uint8Array))\n b = Buffer3.from(b, b.offset, b.byteLength);\n if (!Buffer3.isBuffer(a) || !Buffer3.isBuffer(b)) {\n throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');\n }\n if (a === b)\n return 0;\n let x = a.length;\n let y = b.length;\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n if (x < y)\n return -1;\n if (y < x)\n return 1;\n return 0;\n };\n Buffer3.isEncoding = function isEncoding(encoding) {\n switch (String(encoding).toLowerCase()) {\n case \"hex\":\n case \"utf8\":\n case \"utf-8\":\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n case \"base64\":\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return true;\n default:\n return false;\n }\n };\n Buffer3.concat = function concat(list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n if (list.length === 0) {\n return Buffer3.alloc(0);\n }\n let i;\n if (length === void 0) {\n length = 0;\n for (i = 0; i < list.length; ++i) {\n length += list[i].length;\n }\n }\n const buffer = Buffer3.allocUnsafe(length);\n let pos = 0;\n for (i = 0; i < list.length; ++i) {\n let buf = list[i];\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer3.isBuffer(buf))\n buf = Buffer3.from(buf);\n buf.copy(buffer, pos);\n } else {\n Uint8Array.prototype.set.call(buffer, buf, pos);\n }\n } else if (!Buffer3.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n } else {\n buf.copy(buffer, pos);\n }\n pos += buf.length;\n }\n return buffer;\n };\n function byteLength(string2, encoding) {\n if (Buffer3.isBuffer(string2)) {\n return string2.length;\n }\n if (ArrayBuffer.isView(string2) || isInstance(string2, ArrayBuffer)) {\n return string2.byteLength;\n }\n if (typeof string2 !== \"string\") {\n throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string2);\n }\n const len = string2.length;\n const mustMatch = arguments.length > 2 && arguments[2] === true;\n if (!mustMatch && len === 0)\n return 0;\n let loweredCase = false;\n for (; ; ) {\n switch (encoding) {\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return len;\n case \"utf8\":\n case \"utf-8\":\n return utf8ToBytes2(string2).length;\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return len * 2;\n case \"hex\":\n return len >>> 1;\n case \"base64\":\n return base64ToBytes(string2).length;\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes2(string2).length;\n }\n encoding = (\"\" + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer3.byteLength = byteLength;\n function slowToString(encoding, start, end) {\n let loweredCase = false;\n if (start === void 0 || start < 0) {\n start = 0;\n }\n if (start > this.length) {\n return \"\";\n }\n if (end === void 0 || end > this.length) {\n end = this.length;\n }\n if (end <= 0) {\n return \"\";\n }\n end >>>= 0;\n start >>>= 0;\n if (end <= start) {\n return \"\";\n }\n if (!encoding)\n encoding = \"utf8\";\n while (true) {\n switch (encoding) {\n case \"hex\":\n return hexSlice(this, start, end);\n case \"utf8\":\n case \"utf-8\":\n return utf8Slice(this, start, end);\n case \"ascii\":\n return asciiSlice(this, start, end);\n case \"latin1\":\n case \"binary\":\n return latin1Slice(this, start, end);\n case \"base64\":\n return base64Slice(this, start, end);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return utf16leSlice(this, start, end);\n default:\n if (loweredCase)\n throw new TypeError(\"Unknown encoding: \" + encoding);\n encoding = (encoding + \"\").toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer3.prototype._isBuffer = true;\n function swap(b, n, m) {\n const i = b[n];\n b[n] = b[m];\n b[m] = i;\n }\n Buffer3.prototype.swap16 = function swap16() {\n const len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 16-bits\");\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1);\n }\n return this;\n };\n Buffer3.prototype.swap32 = function swap32() {\n const len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 32-bits\");\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3);\n swap(this, i + 1, i + 2);\n }\n return this;\n };\n Buffer3.prototype.swap64 = function swap64() {\n const len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 64-bits\");\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7);\n swap(this, i + 1, i + 6);\n swap(this, i + 2, i + 5);\n swap(this, i + 3, i + 4);\n }\n return this;\n };\n Buffer3.prototype.toString = function toString() {\n const length = this.length;\n if (length === 0)\n return \"\";\n if (arguments.length === 0)\n return utf8Slice(this, 0, length);\n return slowToString.apply(this, arguments);\n };\n Buffer3.prototype.toLocaleString = Buffer3.prototype.toString;\n Buffer3.prototype.equals = function equals(b) {\n if (!Buffer3.isBuffer(b))\n throw new TypeError(\"Argument must be a Buffer\");\n if (this === b)\n return true;\n return Buffer3.compare(this, b) === 0;\n };\n Buffer3.prototype.inspect = function inspect() {\n let str = \"\";\n const max = exports.INSPECT_MAX_BYTES;\n str = this.toString(\"hex\", 0, max).replace(/(.{2})/g, \"$1 \").trim();\n if (this.length > max)\n str += \" ... \";\n return \"\";\n };\n if (customInspectSymbol) {\n Buffer3.prototype[customInspectSymbol] = Buffer3.prototype.inspect;\n }\n Buffer3.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer3.from(target, target.offset, target.byteLength);\n }\n if (!Buffer3.isBuffer(target)) {\n throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target);\n }\n if (start === void 0) {\n start = 0;\n }\n if (end === void 0) {\n end = target ? target.length : 0;\n }\n if (thisStart === void 0) {\n thisStart = 0;\n }\n if (thisEnd === void 0) {\n thisEnd = this.length;\n }\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError(\"out of range index\");\n }\n if (thisStart >= thisEnd && start >= end) {\n return 0;\n }\n if (thisStart >= thisEnd) {\n return -1;\n }\n if (start >= end) {\n return 1;\n }\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n if (this === target)\n return 0;\n let x = thisEnd - thisStart;\n let y = end - start;\n const len = Math.min(x, y);\n const thisCopy = this.slice(thisStart, thisEnd);\n const targetCopy = target.slice(start, end);\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i];\n y = targetCopy[i];\n break;\n }\n }\n if (x < y)\n return -1;\n if (y < x)\n return 1;\n return 0;\n };\n function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n if (buffer.length === 0)\n return -1;\n if (typeof byteOffset === \"string\") {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 2147483647) {\n byteOffset = 2147483647;\n } else if (byteOffset < -2147483648) {\n byteOffset = -2147483648;\n }\n byteOffset = +byteOffset;\n if (numberIsNaN(byteOffset)) {\n byteOffset = dir ? 0 : buffer.length - 1;\n }\n if (byteOffset < 0)\n byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir)\n return -1;\n else\n byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir)\n byteOffset = 0;\n else\n return -1;\n }\n if (typeof val === \"string\") {\n val = Buffer3.from(val, encoding);\n }\n if (Buffer3.isBuffer(val)) {\n if (val.length === 0) {\n return -1;\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n } else if (typeof val === \"number\") {\n val = val & 255;\n if (typeof Uint8Array.prototype.indexOf === \"function\") {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n }\n throw new TypeError(\"val must be string, number or Buffer\");\n }\n function arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n let indexSize = 1;\n let arrLength = arr.length;\n let valLength = val.length;\n if (encoding !== void 0) {\n encoding = String(encoding).toLowerCase();\n if (encoding === \"ucs2\" || encoding === \"ucs-2\" || encoding === \"utf16le\" || encoding === \"utf-16le\") {\n if (arr.length < 2 || val.length < 2) {\n return -1;\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n function read(buf, i2) {\n if (indexSize === 1) {\n return buf[i2];\n } else {\n return buf.readUInt16BE(i2 * indexSize);\n }\n }\n let i;\n if (dir) {\n let foundIndex = -1;\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1)\n foundIndex = i;\n if (i - foundIndex + 1 === valLength)\n return foundIndex * indexSize;\n } else {\n if (foundIndex !== -1)\n i -= i - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength)\n byteOffset = arrLength - valLength;\n for (i = byteOffset; i >= 0; i--) {\n let found = true;\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false;\n break;\n }\n }\n if (found)\n return i;\n }\n }\n return -1;\n }\n Buffer3.prototype.includes = function includes(val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1;\n };\n Buffer3.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n };\n Buffer3.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n };\n function hexWrite(buf, string2, offset2, length) {\n offset2 = Number(offset2) || 0;\n const remaining = buf.length - offset2;\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n if (length > remaining) {\n length = remaining;\n }\n }\n const strLen = string2.length;\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n let i;\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string2.substr(i * 2, 2), 16);\n if (numberIsNaN(parsed))\n return i;\n buf[offset2 + i] = parsed;\n }\n return i;\n }\n function utf8Write(buf, string2, offset2, length) {\n return blitBuffer(utf8ToBytes2(string2, buf.length - offset2), buf, offset2, length);\n }\n function asciiWrite(buf, string2, offset2, length) {\n return blitBuffer(asciiToBytes(string2), buf, offset2, length);\n }\n function base64Write(buf, string2, offset2, length) {\n return blitBuffer(base64ToBytes(string2), buf, offset2, length);\n }\n function ucs2Write(buf, string2, offset2, length) {\n return blitBuffer(utf16leToBytes(string2, buf.length - offset2), buf, offset2, length);\n }\n Buffer3.prototype.write = function write(string2, offset2, length, encoding) {\n if (offset2 === void 0) {\n encoding = \"utf8\";\n length = this.length;\n offset2 = 0;\n } else if (length === void 0 && typeof offset2 === \"string\") {\n encoding = offset2;\n length = this.length;\n offset2 = 0;\n } else if (isFinite(offset2)) {\n offset2 = offset2 >>> 0;\n if (isFinite(length)) {\n length = length >>> 0;\n if (encoding === void 0)\n encoding = \"utf8\";\n } else {\n encoding = length;\n length = void 0;\n }\n } else {\n throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");\n }\n const remaining = this.length - offset2;\n if (length === void 0 || length > remaining)\n length = remaining;\n if (string2.length > 0 && (length < 0 || offset2 < 0) || offset2 > this.length) {\n throw new RangeError(\"Attempt to write outside buffer bounds\");\n }\n if (!encoding)\n encoding = \"utf8\";\n let loweredCase = false;\n for (; ; ) {\n switch (encoding) {\n case \"hex\":\n return hexWrite(this, string2, offset2, length);\n case \"utf8\":\n case \"utf-8\":\n return utf8Write(this, string2, offset2, length);\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return asciiWrite(this, string2, offset2, length);\n case \"base64\":\n return base64Write(this, string2, offset2, length);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return ucs2Write(this, string2, offset2, length);\n default:\n if (loweredCase)\n throw new TypeError(\"Unknown encoding: \" + encoding);\n encoding = (\"\" + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n };\n Buffer3.prototype.toJSON = function toJSON() {\n return {\n type: \"Buffer\",\n data: Array.prototype.slice.call(this._arr || this, 0)\n };\n };\n function base64Slice(buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf);\n } else {\n return base64.fromByteArray(buf.slice(start, end));\n }\n }\n function utf8Slice(buf, start, end) {\n end = Math.min(buf.length, end);\n const res = [];\n let i = start;\n while (i < end) {\n const firstByte = buf[i];\n let codePoint = null;\n let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint;\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 128) {\n codePoint = firstByte;\n }\n break;\n case 2:\n secondByte = buf[i + 1];\n if ((secondByte & 192) === 128) {\n tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;\n if (tempCodePoint > 127) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 3:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {\n tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;\n if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 4:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n fourthByte = buf[i + 3];\n if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {\n tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;\n if (tempCodePoint > 65535 && tempCodePoint < 1114112) {\n codePoint = tempCodePoint;\n }\n }\n }\n }\n if (codePoint === null) {\n codePoint = 65533;\n bytesPerSequence = 1;\n } else if (codePoint > 65535) {\n codePoint -= 65536;\n res.push(codePoint >>> 10 & 1023 | 55296);\n codePoint = 56320 | codePoint & 1023;\n }\n res.push(codePoint);\n i += bytesPerSequence;\n }\n return decodeCodePointsArray(res);\n }\n const MAX_ARGUMENTS_LENGTH = 4096;\n function decodeCodePointsArray(codePoints) {\n const len = codePoints.length;\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints);\n }\n let res = \"\";\n let i = 0;\n while (i < len) {\n res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));\n }\n return res;\n }\n function asciiSlice(buf, start, end) {\n let ret = \"\";\n end = Math.min(buf.length, end);\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 127);\n }\n return ret;\n }\n function latin1Slice(buf, start, end) {\n let ret = \"\";\n end = Math.min(buf.length, end);\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i]);\n }\n return ret;\n }\n function hexSlice(buf, start, end) {\n const len = buf.length;\n if (!start || start < 0)\n start = 0;\n if (!end || end < 0 || end > len)\n end = len;\n let out = \"\";\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]];\n }\n return out;\n }\n function utf16leSlice(buf, start, end) {\n const bytes = buf.slice(start, end);\n let res = \"\";\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n }\n return res;\n }\n Buffer3.prototype.slice = function slice(start, end) {\n const len = this.length;\n start = ~~start;\n end = end === void 0 ? len : ~~end;\n if (start < 0) {\n start += len;\n if (start < 0)\n start = 0;\n } else if (start > len) {\n start = len;\n }\n if (end < 0) {\n end += len;\n if (end < 0)\n end = 0;\n } else if (end > len) {\n end = len;\n }\n if (end < start)\n end = start;\n const newBuf = this.subarray(start, end);\n Object.setPrototypeOf(newBuf, Buffer3.prototype);\n return newBuf;\n };\n function checkOffset(offset2, ext, length) {\n if (offset2 % 1 !== 0 || offset2 < 0)\n throw new RangeError(\"offset is not uint\");\n if (offset2 + ext > length)\n throw new RangeError(\"Trying to access beyond buffer length\");\n }\n Buffer3.prototype.readUintLE = Buffer3.prototype.readUIntLE = function readUIntLE(offset2, byteLength2, noAssert) {\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, byteLength2, this.length);\n let val = this[offset2];\n let mul = 1;\n let i = 0;\n while (++i < byteLength2 && (mul *= 256)) {\n val += this[offset2 + i] * mul;\n }\n return val;\n };\n Buffer3.prototype.readUintBE = Buffer3.prototype.readUIntBE = function readUIntBE(offset2, byteLength2, noAssert) {\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n checkOffset(offset2, byteLength2, this.length);\n }\n let val = this[offset2 + --byteLength2];\n let mul = 1;\n while (byteLength2 > 0 && (mul *= 256)) {\n val += this[offset2 + --byteLength2] * mul;\n }\n return val;\n };\n Buffer3.prototype.readUint8 = Buffer3.prototype.readUInt8 = function readUInt8(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 1, this.length);\n return this[offset2];\n };\n Buffer3.prototype.readUint16LE = Buffer3.prototype.readUInt16LE = function readUInt16LE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 2, this.length);\n return this[offset2] | this[offset2 + 1] << 8;\n };\n Buffer3.prototype.readUint16BE = Buffer3.prototype.readUInt16BE = function readUInt16BE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 2, this.length);\n return this[offset2] << 8 | this[offset2 + 1];\n };\n Buffer3.prototype.readUint32LE = Buffer3.prototype.readUInt32LE = function readUInt32LE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return (this[offset2] | this[offset2 + 1] << 8 | this[offset2 + 2] << 16) + this[offset2 + 3] * 16777216;\n };\n Buffer3.prototype.readUint32BE = Buffer3.prototype.readUInt32BE = function readUInt32BE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return this[offset2] * 16777216 + (this[offset2 + 1] << 16 | this[offset2 + 2] << 8 | this[offset2 + 3]);\n };\n Buffer3.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset2) {\n offset2 = offset2 >>> 0;\n validateNumber(offset2, \"offset\");\n const first = this[offset2];\n const last = this[offset2 + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset2, this.length - 8);\n }\n const lo = first + this[++offset2] * 2 ** 8 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 24;\n const hi = this[++offset2] + this[++offset2] * 2 ** 8 + this[++offset2] * 2 ** 16 + last * 2 ** 24;\n return BigInt(lo) + (BigInt(hi) << BigInt(32));\n });\n Buffer3.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset2) {\n offset2 = offset2 >>> 0;\n validateNumber(offset2, \"offset\");\n const first = this[offset2];\n const last = this[offset2 + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset2, this.length - 8);\n }\n const hi = first * 2 ** 24 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + this[++offset2];\n const lo = this[++offset2] * 2 ** 24 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + last;\n return (BigInt(hi) << BigInt(32)) + BigInt(lo);\n });\n Buffer3.prototype.readIntLE = function readIntLE(offset2, byteLength2, noAssert) {\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, byteLength2, this.length);\n let val = this[offset2];\n let mul = 1;\n let i = 0;\n while (++i < byteLength2 && (mul *= 256)) {\n val += this[offset2 + i] * mul;\n }\n mul *= 128;\n if (val >= mul)\n val -= Math.pow(2, 8 * byteLength2);\n return val;\n };\n Buffer3.prototype.readIntBE = function readIntBE(offset2, byteLength2, noAssert) {\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, byteLength2, this.length);\n let i = byteLength2;\n let mul = 1;\n let val = this[offset2 + --i];\n while (i > 0 && (mul *= 256)) {\n val += this[offset2 + --i] * mul;\n }\n mul *= 128;\n if (val >= mul)\n val -= Math.pow(2, 8 * byteLength2);\n return val;\n };\n Buffer3.prototype.readInt8 = function readInt8(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 1, this.length);\n if (!(this[offset2] & 128))\n return this[offset2];\n return (255 - this[offset2] + 1) * -1;\n };\n Buffer3.prototype.readInt16LE = function readInt16LE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 2, this.length);\n const val = this[offset2] | this[offset2 + 1] << 8;\n return val & 32768 ? val | 4294901760 : val;\n };\n Buffer3.prototype.readInt16BE = function readInt16BE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 2, this.length);\n const val = this[offset2 + 1] | this[offset2] << 8;\n return val & 32768 ? val | 4294901760 : val;\n };\n Buffer3.prototype.readInt32LE = function readInt32LE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return this[offset2] | this[offset2 + 1] << 8 | this[offset2 + 2] << 16 | this[offset2 + 3] << 24;\n };\n Buffer3.prototype.readInt32BE = function readInt32BE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return this[offset2] << 24 | this[offset2 + 1] << 16 | this[offset2 + 2] << 8 | this[offset2 + 3];\n };\n Buffer3.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset2) {\n offset2 = offset2 >>> 0;\n validateNumber(offset2, \"offset\");\n const first = this[offset2];\n const last = this[offset2 + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset2, this.length - 8);\n }\n const val = this[offset2 + 4] + this[offset2 + 5] * 2 ** 8 + this[offset2 + 6] * 2 ** 16 + (last << 24);\n return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset2] * 2 ** 8 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 24);\n });\n Buffer3.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset2) {\n offset2 = offset2 >>> 0;\n validateNumber(offset2, \"offset\");\n const first = this[offset2];\n const last = this[offset2 + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset2, this.length - 8);\n }\n const val = (first << 24) + // Overflow\n this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + this[++offset2];\n return (BigInt(val) << BigInt(32)) + BigInt(this[++offset2] * 2 ** 24 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + last);\n });\n Buffer3.prototype.readFloatLE = function readFloatLE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return ieee754.read(this, offset2, true, 23, 4);\n };\n Buffer3.prototype.readFloatBE = function readFloatBE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return ieee754.read(this, offset2, false, 23, 4);\n };\n Buffer3.prototype.readDoubleLE = function readDoubleLE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 8, this.length);\n return ieee754.read(this, offset2, true, 52, 8);\n };\n Buffer3.prototype.readDoubleBE = function readDoubleBE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 8, this.length);\n return ieee754.read(this, offset2, false, 52, 8);\n };\n function checkInt(buf, value, offset2, ext, max, min) {\n if (!Buffer3.isBuffer(buf))\n throw new TypeError('\"buffer\" argument must be a Buffer instance');\n if (value > max || value < min)\n throw new RangeError('\"value\" argument is out of bounds');\n if (offset2 + ext > buf.length)\n throw new RangeError(\"Index out of range\");\n }\n Buffer3.prototype.writeUintLE = Buffer3.prototype.writeUIntLE = function writeUIntLE(value, offset2, byteLength2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength2) - 1;\n checkInt(this, value, offset2, byteLength2, maxBytes, 0);\n }\n let mul = 1;\n let i = 0;\n this[offset2] = value & 255;\n while (++i < byteLength2 && (mul *= 256)) {\n this[offset2 + i] = value / mul & 255;\n }\n return offset2 + byteLength2;\n };\n Buffer3.prototype.writeUintBE = Buffer3.prototype.writeUIntBE = function writeUIntBE(value, offset2, byteLength2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength2) - 1;\n checkInt(this, value, offset2, byteLength2, maxBytes, 0);\n }\n let i = byteLength2 - 1;\n let mul = 1;\n this[offset2 + i] = value & 255;\n while (--i >= 0 && (mul *= 256)) {\n this[offset2 + i] = value / mul & 255;\n }\n return offset2 + byteLength2;\n };\n Buffer3.prototype.writeUint8 = Buffer3.prototype.writeUInt8 = function writeUInt8(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 1, 255, 0);\n this[offset2] = value & 255;\n return offset2 + 1;\n };\n Buffer3.prototype.writeUint16LE = Buffer3.prototype.writeUInt16LE = function writeUInt16LE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 2, 65535, 0);\n this[offset2] = value & 255;\n this[offset2 + 1] = value >>> 8;\n return offset2 + 2;\n };\n Buffer3.prototype.writeUint16BE = Buffer3.prototype.writeUInt16BE = function writeUInt16BE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 2, 65535, 0);\n this[offset2] = value >>> 8;\n this[offset2 + 1] = value & 255;\n return offset2 + 2;\n };\n Buffer3.prototype.writeUint32LE = Buffer3.prototype.writeUInt32LE = function writeUInt32LE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 4, 4294967295, 0);\n this[offset2 + 3] = value >>> 24;\n this[offset2 + 2] = value >>> 16;\n this[offset2 + 1] = value >>> 8;\n this[offset2] = value & 255;\n return offset2 + 4;\n };\n Buffer3.prototype.writeUint32BE = Buffer3.prototype.writeUInt32BE = function writeUInt32BE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 4, 4294967295, 0);\n this[offset2] = value >>> 24;\n this[offset2 + 1] = value >>> 16;\n this[offset2 + 2] = value >>> 8;\n this[offset2 + 3] = value & 255;\n return offset2 + 4;\n };\n function wrtBigUInt64LE(buf, value, offset2, min, max) {\n checkIntBI(value, min, max, buf, offset2, 7);\n let lo = Number(value & BigInt(4294967295));\n buf[offset2++] = lo;\n lo = lo >> 8;\n buf[offset2++] = lo;\n lo = lo >> 8;\n buf[offset2++] = lo;\n lo = lo >> 8;\n buf[offset2++] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(4294967295));\n buf[offset2++] = hi;\n hi = hi >> 8;\n buf[offset2++] = hi;\n hi = hi >> 8;\n buf[offset2++] = hi;\n hi = hi >> 8;\n buf[offset2++] = hi;\n return offset2;\n }\n function wrtBigUInt64BE(buf, value, offset2, min, max) {\n checkIntBI(value, min, max, buf, offset2, 7);\n let lo = Number(value & BigInt(4294967295));\n buf[offset2 + 7] = lo;\n lo = lo >> 8;\n buf[offset2 + 6] = lo;\n lo = lo >> 8;\n buf[offset2 + 5] = lo;\n lo = lo >> 8;\n buf[offset2 + 4] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(4294967295));\n buf[offset2 + 3] = hi;\n hi = hi >> 8;\n buf[offset2 + 2] = hi;\n hi = hi >> 8;\n buf[offset2 + 1] = hi;\n hi = hi >> 8;\n buf[offset2] = hi;\n return offset2 + 8;\n }\n Buffer3.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset2 = 0) {\n return wrtBigUInt64LE(this, value, offset2, BigInt(0), BigInt(\"0xffffffffffffffff\"));\n });\n Buffer3.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset2 = 0) {\n return wrtBigUInt64BE(this, value, offset2, BigInt(0), BigInt(\"0xffffffffffffffff\"));\n });\n Buffer3.prototype.writeIntLE = function writeIntLE(value, offset2, byteLength2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, 8 * byteLength2 - 1);\n checkInt(this, value, offset2, byteLength2, limit - 1, -limit);\n }\n let i = 0;\n let mul = 1;\n let sub = 0;\n this[offset2] = value & 255;\n while (++i < byteLength2 && (mul *= 256)) {\n if (value < 0 && sub === 0 && this[offset2 + i - 1] !== 0) {\n sub = 1;\n }\n this[offset2 + i] = (value / mul >> 0) - sub & 255;\n }\n return offset2 + byteLength2;\n };\n Buffer3.prototype.writeIntBE = function writeIntBE(value, offset2, byteLength2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, 8 * byteLength2 - 1);\n checkInt(this, value, offset2, byteLength2, limit - 1, -limit);\n }\n let i = byteLength2 - 1;\n let mul = 1;\n let sub = 0;\n this[offset2 + i] = value & 255;\n while (--i >= 0 && (mul *= 256)) {\n if (value < 0 && sub === 0 && this[offset2 + i + 1] !== 0) {\n sub = 1;\n }\n this[offset2 + i] = (value / mul >> 0) - sub & 255;\n }\n return offset2 + byteLength2;\n };\n Buffer3.prototype.writeInt8 = function writeInt8(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 1, 127, -128);\n if (value < 0)\n value = 255 + value + 1;\n this[offset2] = value & 255;\n return offset2 + 1;\n };\n Buffer3.prototype.writeInt16LE = function writeInt16LE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 2, 32767, -32768);\n this[offset2] = value & 255;\n this[offset2 + 1] = value >>> 8;\n return offset2 + 2;\n };\n Buffer3.prototype.writeInt16BE = function writeInt16BE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 2, 32767, -32768);\n this[offset2] = value >>> 8;\n this[offset2 + 1] = value & 255;\n return offset2 + 2;\n };\n Buffer3.prototype.writeInt32LE = function writeInt32LE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 4, 2147483647, -2147483648);\n this[offset2] = value & 255;\n this[offset2 + 1] = value >>> 8;\n this[offset2 + 2] = value >>> 16;\n this[offset2 + 3] = value >>> 24;\n return offset2 + 4;\n };\n Buffer3.prototype.writeInt32BE = function writeInt32BE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 4, 2147483647, -2147483648);\n if (value < 0)\n value = 4294967295 + value + 1;\n this[offset2] = value >>> 24;\n this[offset2 + 1] = value >>> 16;\n this[offset2 + 2] = value >>> 8;\n this[offset2 + 3] = value & 255;\n return offset2 + 4;\n };\n Buffer3.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset2 = 0) {\n return wrtBigUInt64LE(this, value, offset2, -BigInt(\"0x8000000000000000\"), BigInt(\"0x7fffffffffffffff\"));\n });\n Buffer3.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset2 = 0) {\n return wrtBigUInt64BE(this, value, offset2, -BigInt(\"0x8000000000000000\"), BigInt(\"0x7fffffffffffffff\"));\n });\n function checkIEEE754(buf, value, offset2, ext, max, min) {\n if (offset2 + ext > buf.length)\n throw new RangeError(\"Index out of range\");\n if (offset2 < 0)\n throw new RangeError(\"Index out of range\");\n }\n function writeFloat(buf, value, offset2, littleEndian, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset2, 4);\n }\n ieee754.write(buf, value, offset2, littleEndian, 23, 4);\n return offset2 + 4;\n }\n Buffer3.prototype.writeFloatLE = function writeFloatLE(value, offset2, noAssert) {\n return writeFloat(this, value, offset2, true, noAssert);\n };\n Buffer3.prototype.writeFloatBE = function writeFloatBE(value, offset2, noAssert) {\n return writeFloat(this, value, offset2, false, noAssert);\n };\n function writeDouble(buf, value, offset2, littleEndian, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset2, 8);\n }\n ieee754.write(buf, value, offset2, littleEndian, 52, 8);\n return offset2 + 8;\n }\n Buffer3.prototype.writeDoubleLE = function writeDoubleLE(value, offset2, noAssert) {\n return writeDouble(this, value, offset2, true, noAssert);\n };\n Buffer3.prototype.writeDoubleBE = function writeDoubleBE(value, offset2, noAssert) {\n return writeDouble(this, value, offset2, false, noAssert);\n };\n Buffer3.prototype.copy = function copy(target, targetStart, start, end) {\n if (!Buffer3.isBuffer(target))\n throw new TypeError(\"argument should be a Buffer\");\n if (!start)\n start = 0;\n if (!end && end !== 0)\n end = this.length;\n if (targetStart >= target.length)\n targetStart = target.length;\n if (!targetStart)\n targetStart = 0;\n if (end > 0 && end < start)\n end = start;\n if (end === start)\n return 0;\n if (target.length === 0 || this.length === 0)\n return 0;\n if (targetStart < 0) {\n throw new RangeError(\"targetStart out of bounds\");\n }\n if (start < 0 || start >= this.length)\n throw new RangeError(\"Index out of range\");\n if (end < 0)\n throw new RangeError(\"sourceEnd out of bounds\");\n if (end > this.length)\n end = this.length;\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n const len = end - start;\n if (this === target && typeof Uint8Array.prototype.copyWithin === \"function\") {\n this.copyWithin(targetStart, start, end);\n } else {\n Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);\n }\n return len;\n };\n Buffer3.prototype.fill = function fill(val, start, end, encoding) {\n if (typeof val === \"string\") {\n if (typeof start === \"string\") {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === \"string\") {\n encoding = end;\n end = this.length;\n }\n if (encoding !== void 0 && typeof encoding !== \"string\") {\n throw new TypeError(\"encoding must be a string\");\n }\n if (typeof encoding === \"string\" && !Buffer3.isEncoding(encoding)) {\n throw new TypeError(\"Unknown encoding: \" + encoding);\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0);\n if (encoding === \"utf8\" && code < 128 || encoding === \"latin1\") {\n val = code;\n }\n }\n } else if (typeof val === \"number\") {\n val = val & 255;\n } else if (typeof val === \"boolean\") {\n val = Number(val);\n }\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError(\"Out of range index\");\n }\n if (end <= start) {\n return this;\n }\n start = start >>> 0;\n end = end === void 0 ? this.length : end >>> 0;\n if (!val)\n val = 0;\n let i;\n if (typeof val === \"number\") {\n for (i = start; i < end; ++i) {\n this[i] = val;\n }\n } else {\n const bytes = Buffer3.isBuffer(val) ? val : Buffer3.from(val, encoding);\n const len = bytes.length;\n if (len === 0) {\n throw new TypeError('The value \"' + val + '\" is invalid for argument \"value\"');\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len];\n }\n }\n return this;\n };\n const errors = {};\n function E(sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor() {\n super();\n Object.defineProperty(this, \"message\", {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n });\n this.name = `${this.name} [${sym}]`;\n this.stack;\n delete this.name;\n }\n get code() {\n return sym;\n }\n set code(value) {\n Object.defineProperty(this, \"code\", {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n });\n }\n toString() {\n return `${this.name} [${sym}]: ${this.message}`;\n }\n };\n }\n E(\"ERR_BUFFER_OUT_OF_BOUNDS\", function(name) {\n if (name) {\n return `${name} is outside of buffer bounds`;\n }\n return \"Attempt to access memory outside buffer bounds\";\n }, RangeError);\n E(\"ERR_INVALID_ARG_TYPE\", function(name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`;\n }, TypeError);\n E(\"ERR_OUT_OF_RANGE\", function(str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`;\n let received = input;\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input));\n } else if (typeof input === \"bigint\") {\n received = String(input);\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received);\n }\n received += \"n\";\n }\n msg += ` It must be ${range}. Received ${received}`;\n return msg;\n }, RangeError);\n function addNumericalSeparator(val) {\n let res = \"\";\n let i = val.length;\n const start = val[0] === \"-\" ? 1 : 0;\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`;\n }\n return `${val.slice(0, i)}${res}`;\n }\n function checkBounds(buf, offset2, byteLength2) {\n validateNumber(offset2, \"offset\");\n if (buf[offset2] === void 0 || buf[offset2 + byteLength2] === void 0) {\n boundsError(offset2, buf.length - (byteLength2 + 1));\n }\n }\n function checkIntBI(value, min, max, buf, offset2, byteLength2) {\n if (value > max || value < min) {\n const n = typeof min === \"bigint\" ? \"n\" : \"\";\n let range;\n {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength2 + 1) * 8}${n}`;\n } else {\n range = `>= -(2${n} ** ${(byteLength2 + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength2 + 1) * 8 - 1}${n}`;\n }\n }\n throw new errors.ERR_OUT_OF_RANGE(\"value\", range, value);\n }\n checkBounds(buf, offset2, byteLength2);\n }\n function validateNumber(value, name) {\n if (typeof value !== \"number\") {\n throw new errors.ERR_INVALID_ARG_TYPE(name, \"number\", value);\n }\n }\n function boundsError(value, length, type2) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type2);\n throw new errors.ERR_OUT_OF_RANGE(\"offset\", \"an integer\", value);\n }\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();\n }\n throw new errors.ERR_OUT_OF_RANGE(\"offset\", `>= ${0} and <= ${length}`, value);\n }\n const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\n function base64clean(str) {\n str = str.split(\"=\")[0];\n str = str.trim().replace(INVALID_BASE64_RE, \"\");\n if (str.length < 2)\n return \"\";\n while (str.length % 4 !== 0) {\n str = str + \"=\";\n }\n return str;\n }\n function utf8ToBytes2(string2, units) {\n units = units || Infinity;\n let codePoint;\n const length = string2.length;\n let leadSurrogate = null;\n const bytes = [];\n for (let i = 0; i < length; ++i) {\n codePoint = string2.charCodeAt(i);\n if (codePoint > 55295 && codePoint < 57344) {\n if (!leadSurrogate) {\n if (codePoint > 56319) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n continue;\n } else if (i + 1 === length) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n continue;\n }\n leadSurrogate = codePoint;\n continue;\n }\n if (codePoint < 56320) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n leadSurrogate = codePoint;\n continue;\n }\n codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;\n } else if (leadSurrogate) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n }\n leadSurrogate = null;\n if (codePoint < 128) {\n if ((units -= 1) < 0)\n break;\n bytes.push(codePoint);\n } else if (codePoint < 2048) {\n if ((units -= 2) < 0)\n break;\n bytes.push(codePoint >> 6 | 192, codePoint & 63 | 128);\n } else if (codePoint < 65536) {\n if ((units -= 3) < 0)\n break;\n bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);\n } else if (codePoint < 1114112) {\n if ((units -= 4) < 0)\n break;\n bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);\n } else {\n throw new Error(\"Invalid code point\");\n }\n }\n return bytes;\n }\n function asciiToBytes(str) {\n const byteArray = [];\n for (let i = 0; i < str.length; ++i) {\n byteArray.push(str.charCodeAt(i) & 255);\n }\n return byteArray;\n }\n function utf16leToBytes(str, units) {\n let c, hi, lo;\n const byteArray = [];\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0)\n break;\n c = str.charCodeAt(i);\n hi = c >> 8;\n lo = c % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n return byteArray;\n }\n function base64ToBytes(str) {\n return base64.toByteArray(base64clean(str));\n }\n function blitBuffer(src, dst, offset2, length) {\n let i;\n for (i = 0; i < length; ++i) {\n if (i + offset2 >= dst.length || i >= src.length)\n break;\n dst[i + offset2] = src[i];\n }\n return i;\n }\n function isInstance(obj, type2) {\n return obj instanceof type2 || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type2.name;\n }\n function numberIsNaN(obj) {\n return obj !== obj;\n }\n const hexSliceLookupTable = function() {\n const alphabet = \"0123456789abcdef\";\n const table = new Array(256);\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16;\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j];\n }\n }\n return table;\n }();\n function defineBigIntMethod(fn) {\n return typeof BigInt === \"undefined\" ? BufferBigIntNotDefined : fn;\n }\n function BufferBigIntNotDefined() {\n throw new Error(\"BigInt not supported\");\n }\n return exports;\n }\n var exports$2, _dewExec$2, exports$1, _dewExec$1, exports, _dewExec;\n var init_chunk_DtuTasat = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n exports$2 = {};\n _dewExec$2 = false;\n exports$1 = {};\n _dewExec$1 = false;\n exports = {};\n _dewExec = false;\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/buffer.js\n var buffer_exports = {};\n __export(buffer_exports, {\n Buffer: () => Buffer2,\n INSPECT_MAX_BYTES: () => INSPECT_MAX_BYTES,\n default: () => exports2,\n kMaxLength: () => kMaxLength\n });\n var exports2, Buffer2, INSPECT_MAX_BYTES, kMaxLength;\n var init_buffer = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/buffer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chunk_DtuTasat();\n exports2 = dew();\n exports2[\"Buffer\"];\n exports2[\"SlowBuffer\"];\n exports2[\"INSPECT_MAX_BYTES\"];\n exports2[\"kMaxLength\"];\n Buffer2 = exports2.Buffer;\n INSPECT_MAX_BYTES = exports2.INSPECT_MAX_BYTES;\n kMaxLength = exports2.kMaxLength;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/buffer.js\n var init_buffer2 = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/buffer.js\"() {\n \"use strict\";\n init_buffer();\n }\n });\n\n // ../../../node_modules/.pnpm/bn.js@5.2.2/node_modules/bn.js/lib/bn.js\n var require_bn = __commonJS({\n \"../../../node_modules/.pnpm/bn.js@5.2.2/node_modules/bn.js/lib/bn.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(module2, exports4) {\n \"use strict\";\n function assert3(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {\n };\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n function BN2(number2, base, endian) {\n if (BN2.isBN(number2)) {\n return number2;\n }\n this.negative = 0;\n this.words = null;\n this.length = 0;\n this.red = null;\n if (number2 !== null) {\n if (base === \"le\" || base === \"be\") {\n endian = base;\n base = 10;\n }\n this._init(number2 || 0, base || 10, endian || \"be\");\n }\n }\n if (typeof module2 === \"object\") {\n module2.exports = BN2;\n } else {\n exports4.BN = BN2;\n }\n BN2.BN = BN2;\n BN2.wordSize = 26;\n var Buffer3;\n try {\n if (typeof window !== \"undefined\" && typeof window.Buffer !== \"undefined\") {\n Buffer3 = window.Buffer;\n } else {\n Buffer3 = (init_buffer(), __toCommonJS(buffer_exports)).Buffer;\n }\n } catch (e) {\n }\n BN2.isBN = function isBN(num) {\n if (num instanceof BN2) {\n return true;\n }\n return num !== null && typeof num === \"object\" && num.constructor.wordSize === BN2.wordSize && Array.isArray(num.words);\n };\n BN2.max = function max(left, right) {\n if (left.cmp(right) > 0)\n return left;\n return right;\n };\n BN2.min = function min(left, right) {\n if (left.cmp(right) < 0)\n return left;\n return right;\n };\n BN2.prototype._init = function init(number2, base, endian) {\n if (typeof number2 === \"number\") {\n return this._initNumber(number2, base, endian);\n }\n if (typeof number2 === \"object\") {\n return this._initArray(number2, base, endian);\n }\n if (base === \"hex\") {\n base = 16;\n }\n assert3(base === (base | 0) && base >= 2 && base <= 36);\n number2 = number2.toString().replace(/\\s+/g, \"\");\n var start = 0;\n if (number2[0] === \"-\") {\n start++;\n this.negative = 1;\n }\n if (start < number2.length) {\n if (base === 16) {\n this._parseHex(number2, start, endian);\n } else {\n this._parseBase(number2, base, start);\n if (endian === \"le\") {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n BN2.prototype._initNumber = function _initNumber(number2, base, endian) {\n if (number2 < 0) {\n this.negative = 1;\n number2 = -number2;\n }\n if (number2 < 67108864) {\n this.words = [number2 & 67108863];\n this.length = 1;\n } else if (number2 < 4503599627370496) {\n this.words = [\n number2 & 67108863,\n number2 / 67108864 & 67108863\n ];\n this.length = 2;\n } else {\n assert3(number2 < 9007199254740992);\n this.words = [\n number2 & 67108863,\n number2 / 67108864 & 67108863,\n 1\n ];\n this.length = 3;\n }\n if (endian !== \"le\")\n return;\n this._initArray(this.toArray(), base, endian);\n };\n BN2.prototype._initArray = function _initArray(number2, base, endian) {\n assert3(typeof number2.length === \"number\");\n if (number2.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n this.length = Math.ceil(number2.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n var j, w;\n var off = 0;\n if (endian === \"be\") {\n for (i = number2.length - 1, j = 0; i >= 0; i -= 3) {\n w = number2[i] | number2[i - 1] << 8 | number2[i - 2] << 16;\n this.words[j] |= w << off & 67108863;\n this.words[j + 1] = w >>> 26 - off & 67108863;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === \"le\") {\n for (i = 0, j = 0; i < number2.length; i += 3) {\n w = number2[i] | number2[i + 1] << 8 | number2[i + 2] << 16;\n this.words[j] |= w << off & 67108863;\n this.words[j + 1] = w >>> 26 - off & 67108863;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n function parseHex4Bits(string2, index) {\n var c = string2.charCodeAt(index);\n if (c >= 48 && c <= 57) {\n return c - 48;\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert3(false, \"Invalid character in \" + string2);\n }\n }\n function parseHexByte(string2, lowerBound, index) {\n var r = parseHex4Bits(string2, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string2, index - 1) << 4;\n }\n return r;\n }\n BN2.prototype._parseHex = function _parseHex(number2, start, endian) {\n this.length = Math.ceil((number2.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n var off = 0;\n var j = 0;\n var w;\n if (endian === \"be\") {\n for (i = number2.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number2, start, i) << off;\n this.words[j] |= w & 67108863;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number2.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number2.length; i += 2) {\n w = parseHexByte(number2, start, i) << off;\n this.words[j] |= w & 67108863;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n this._strip();\n };\n function parseBase(str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n r *= mul;\n if (c >= 49) {\n b = c - 49 + 10;\n } else if (c >= 17) {\n b = c - 17 + 10;\n } else {\n b = c;\n }\n assert3(c >= 0 && b < mul, \"Invalid character\");\n r += b;\n }\n return r;\n }\n BN2.prototype._parseBase = function _parseBase(number2, base, start) {\n this.words = [0];\n this.length = 1;\n for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = limbPow / base | 0;\n var total = number2.length - start;\n var mod2 = total % limbLen;\n var end = Math.min(total, total - mod2) + start;\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number2, i, i + limbLen, base);\n this.imuln(limbPow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n if (mod2 !== 0) {\n var pow = 1;\n word = parseBase(number2, i, number2.length, base);\n for (i = 0; i < mod2; i++) {\n pow *= base;\n }\n this.imuln(pow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n this._strip();\n };\n BN2.prototype.copy = function copy(dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n function move(dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n BN2.prototype._move = function _move(dest) {\n move(dest, this);\n };\n BN2.prototype.clone = function clone() {\n var r = new BN2(null);\n this.copy(r);\n return r;\n };\n BN2.prototype._expand = function _expand(size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n BN2.prototype._strip = function strip() {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n BN2.prototype._normSign = function _normSign() {\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n if (typeof Symbol !== \"undefined\" && typeof Symbol.for === \"function\") {\n try {\n BN2.prototype[Symbol.for(\"nodejs.util.inspect.custom\")] = inspect;\n } catch (e) {\n BN2.prototype.inspect = inspect;\n }\n } else {\n BN2.prototype.inspect = inspect;\n }\n function inspect() {\n return (this.red ? \"\";\n }\n var zeros = [\n \"\",\n \"0\",\n \"00\",\n \"000\",\n \"0000\",\n \"00000\",\n \"000000\",\n \"0000000\",\n \"00000000\",\n \"000000000\",\n \"0000000000\",\n \"00000000000\",\n \"000000000000\",\n \"0000000000000\",\n \"00000000000000\",\n \"000000000000000\",\n \"0000000000000000\",\n \"00000000000000000\",\n \"000000000000000000\",\n \"0000000000000000000\",\n \"00000000000000000000\",\n \"000000000000000000000\",\n \"0000000000000000000000\",\n \"00000000000000000000000\",\n \"000000000000000000000000\",\n \"0000000000000000000000000\"\n ];\n var groupSizes = [\n 0,\n 0,\n 25,\n 16,\n 12,\n 11,\n 10,\n 9,\n 8,\n 8,\n 7,\n 7,\n 7,\n 7,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5\n ];\n var groupBases = [\n 0,\n 0,\n 33554432,\n 43046721,\n 16777216,\n 48828125,\n 60466176,\n 40353607,\n 16777216,\n 43046721,\n 1e7,\n 19487171,\n 35831808,\n 62748517,\n 7529536,\n 11390625,\n 16777216,\n 24137569,\n 34012224,\n 47045881,\n 64e6,\n 4084101,\n 5153632,\n 6436343,\n 7962624,\n 9765625,\n 11881376,\n 14348907,\n 17210368,\n 20511149,\n 243e5,\n 28629151,\n 33554432,\n 39135393,\n 45435424,\n 52521875,\n 60466176\n ];\n BN2.prototype.toString = function toString(base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n var out;\n if (base === 16 || base === \"hex\") {\n out = \"\";\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = ((w << off | carry) & 16777215).toString(16);\n carry = w >>> 24 - off & 16777215;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n if (base === (base | 0) && base >= 2 && base <= 36) {\n var groupSize = groupSizes[base];\n var groupBase = groupBases[base];\n out = \"\";\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = \"0\" + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n assert3(false, \"Base should be between 2 and 36\");\n };\n BN2.prototype.toNumber = function toNumber() {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 67108864;\n } else if (this.length === 3 && this.words[2] === 1) {\n ret += 4503599627370496 + this.words[1] * 67108864;\n } else if (this.length > 2) {\n assert3(false, \"Number can only safely store up to 53 bits\");\n }\n return this.negative !== 0 ? -ret : ret;\n };\n BN2.prototype.toJSON = function toJSON() {\n return this.toString(16, 2);\n };\n if (Buffer3) {\n BN2.prototype.toBuffer = function toBuffer2(endian, length) {\n return this.toArrayLike(Buffer3, endian, length);\n };\n }\n BN2.prototype.toArray = function toArray(endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n var allocate = function allocate2(ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n BN2.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length) {\n this._strip();\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert3(byteLength <= reqLength, \"byte array longer than desired length\");\n assert3(reqLength > 0, \"Requested array length <= 0\");\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === \"le\" ? \"LE\" : \"BE\";\n this[\"_toArrayLike\" + postfix](res, byteLength);\n return res;\n };\n BN2.prototype._toArrayLikeLE = function _toArrayLikeLE(res, byteLength) {\n var position = 0;\n var carry = 0;\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = this.words[i] << shift | carry;\n res[position++] = word & 255;\n if (position < res.length) {\n res[position++] = word >> 8 & 255;\n }\n if (position < res.length) {\n res[position++] = word >> 16 & 255;\n }\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = word >> 24 & 255;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n if (position < res.length) {\n res[position++] = carry;\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n BN2.prototype._toArrayLikeBE = function _toArrayLikeBE(res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = this.words[i] << shift | carry;\n res[position--] = word & 255;\n if (position >= 0) {\n res[position--] = word >> 8 & 255;\n }\n if (position >= 0) {\n res[position--] = word >> 16 & 255;\n }\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = word >> 24 & 255;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n if (position >= 0) {\n res[position--] = carry;\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n if (Math.clz32) {\n BN2.prototype._countBits = function _countBits(w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN2.prototype._countBits = function _countBits(w) {\n var t = w;\n var r = 0;\n if (t >= 4096) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 64) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 2) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n BN2.prototype._zeroBits = function _zeroBits(w) {\n if (w === 0)\n return 26;\n var t = w;\n var r = 0;\n if ((t & 8191) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 127) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 15) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 1) === 0) {\n r++;\n }\n return r;\n };\n BN2.prototype.bitLength = function bitLength() {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n function toBitArray(num) {\n var w = new Array(num.bitLength());\n for (var bit = 0; bit < w.length; bit++) {\n var off = bit / 26 | 0;\n var wbit = bit % 26;\n w[bit] = num.words[off] >>> wbit & 1;\n }\n return w;\n }\n BN2.prototype.zeroBits = function zeroBits() {\n if (this.isZero())\n return 0;\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26)\n break;\n }\n return r;\n };\n BN2.prototype.byteLength = function byteLength() {\n return Math.ceil(this.bitLength() / 8);\n };\n BN2.prototype.toTwos = function toTwos(width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n BN2.prototype.fromTwos = function fromTwos(width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n BN2.prototype.isNeg = function isNeg() {\n return this.negative !== 0;\n };\n BN2.prototype.neg = function neg() {\n return this.clone().ineg();\n };\n BN2.prototype.ineg = function ineg() {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n return this;\n };\n BN2.prototype.iuor = function iuor(num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n return this._strip();\n };\n BN2.prototype.ior = function ior(num) {\n assert3((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n BN2.prototype.or = function or(num) {\n if (this.length > num.length)\n return this.clone().ior(num);\n return num.clone().ior(this);\n };\n BN2.prototype.uor = function uor(num) {\n if (this.length > num.length)\n return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n BN2.prototype.iuand = function iuand(num) {\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n this.length = b.length;\n return this._strip();\n };\n BN2.prototype.iand = function iand(num) {\n assert3((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n BN2.prototype.and = function and(num) {\n if (this.length > num.length)\n return this.clone().iand(num);\n return num.clone().iand(this);\n };\n BN2.prototype.uand = function uand(num) {\n if (this.length > num.length)\n return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n BN2.prototype.iuxor = function iuxor(num) {\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n this.length = a.length;\n return this._strip();\n };\n BN2.prototype.ixor = function ixor(num) {\n assert3((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n BN2.prototype.xor = function xor(num) {\n if (this.length > num.length)\n return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n BN2.prototype.uxor = function uxor(num) {\n if (this.length > num.length)\n return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n BN2.prototype.inotn = function inotn(width) {\n assert3(typeof width === \"number\" && width >= 0);\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n this._expand(bytesNeeded);\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 67108863;\n }\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & 67108863 >> 26 - bitsLeft;\n }\n return this._strip();\n };\n BN2.prototype.notn = function notn(width) {\n return this.clone().inotn(width);\n };\n BN2.prototype.setn = function setn(bit, val) {\n assert3(typeof bit === \"number\" && bit >= 0);\n var off = bit / 26 | 0;\n var wbit = bit % 26;\n this._expand(off + 1);\n if (val) {\n this.words[off] = this.words[off] | 1 << wbit;\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n return this._strip();\n };\n BN2.prototype.iadd = function iadd(num) {\n var r;\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 67108863;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 67108863;\n carry = r >>> 26;\n }\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n return this;\n };\n BN2.prototype.add = function add2(num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n if (this.length > num.length)\n return this.clone().iadd(num);\n return num.clone().iadd(this);\n };\n BN2.prototype.isub = function isub(num) {\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n var cmp = this.cmp(num);\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 67108863;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 67108863;\n }\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n this.length = Math.max(this.length, i);\n if (a !== this) {\n this.negative = 1;\n }\n return this._strip();\n };\n BN2.prototype.sub = function sub(num) {\n return this.clone().isub(num);\n };\n function smallMulTo(self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = self.length + num.length | 0;\n out.length = len;\n len = len - 1 | 0;\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n var lo = r & 67108863;\n var carry = r / 67108864 | 0;\n out.words[0] = lo;\n for (var k = 1; k < len; k++) {\n var ncarry = carry >>> 26;\n var rword = carry & 67108863;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += r / 67108864 | 0;\n rword = r & 67108863;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n return out._strip();\n }\n var comb10MulTo = function comb10MulTo2(self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 8191;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 8191;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 8191;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 8191;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 8191;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 8191;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 8191;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 8191;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 8191;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 8191;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 8191;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 8191;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 8191;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 8191;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 8191;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 8191;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 8191;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 8191;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 8191;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 8191;\n var bh9 = b9 >>> 13;\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = mid + Math.imul(ah0, bl0) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w0 >>> 26) | 0;\n w0 &= 67108863;\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = mid + Math.imul(ah1, bl0) | 0;\n hi = Math.imul(ah1, bh0);\n lo = lo + Math.imul(al0, bl1) | 0;\n mid = mid + Math.imul(al0, bh1) | 0;\n mid = mid + Math.imul(ah0, bl1) | 0;\n hi = hi + Math.imul(ah0, bh1) | 0;\n var w1 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w1 >>> 26) | 0;\n w1 &= 67108863;\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = mid + Math.imul(ah2, bl0) | 0;\n hi = Math.imul(ah2, bh0);\n lo = lo + Math.imul(al1, bl1) | 0;\n mid = mid + Math.imul(al1, bh1) | 0;\n mid = mid + Math.imul(ah1, bl1) | 0;\n hi = hi + Math.imul(ah1, bh1) | 0;\n lo = lo + Math.imul(al0, bl2) | 0;\n mid = mid + Math.imul(al0, bh2) | 0;\n mid = mid + Math.imul(ah0, bl2) | 0;\n hi = hi + Math.imul(ah0, bh2) | 0;\n var w2 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w2 >>> 26) | 0;\n w2 &= 67108863;\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = mid + Math.imul(ah3, bl0) | 0;\n hi = Math.imul(ah3, bh0);\n lo = lo + Math.imul(al2, bl1) | 0;\n mid = mid + Math.imul(al2, bh1) | 0;\n mid = mid + Math.imul(ah2, bl1) | 0;\n hi = hi + Math.imul(ah2, bh1) | 0;\n lo = lo + Math.imul(al1, bl2) | 0;\n mid = mid + Math.imul(al1, bh2) | 0;\n mid = mid + Math.imul(ah1, bl2) | 0;\n hi = hi + Math.imul(ah1, bh2) | 0;\n lo = lo + Math.imul(al0, bl3) | 0;\n mid = mid + Math.imul(al0, bh3) | 0;\n mid = mid + Math.imul(ah0, bl3) | 0;\n hi = hi + Math.imul(ah0, bh3) | 0;\n var w3 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w3 >>> 26) | 0;\n w3 &= 67108863;\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = mid + Math.imul(ah4, bl0) | 0;\n hi = Math.imul(ah4, bh0);\n lo = lo + Math.imul(al3, bl1) | 0;\n mid = mid + Math.imul(al3, bh1) | 0;\n mid = mid + Math.imul(ah3, bl1) | 0;\n hi = hi + Math.imul(ah3, bh1) | 0;\n lo = lo + Math.imul(al2, bl2) | 0;\n mid = mid + Math.imul(al2, bh2) | 0;\n mid = mid + Math.imul(ah2, bl2) | 0;\n hi = hi + Math.imul(ah2, bh2) | 0;\n lo = lo + Math.imul(al1, bl3) | 0;\n mid = mid + Math.imul(al1, bh3) | 0;\n mid = mid + Math.imul(ah1, bl3) | 0;\n hi = hi + Math.imul(ah1, bh3) | 0;\n lo = lo + Math.imul(al0, bl4) | 0;\n mid = mid + Math.imul(al0, bh4) | 0;\n mid = mid + Math.imul(ah0, bl4) | 0;\n hi = hi + Math.imul(ah0, bh4) | 0;\n var w4 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w4 >>> 26) | 0;\n w4 &= 67108863;\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = mid + Math.imul(ah5, bl0) | 0;\n hi = Math.imul(ah5, bh0);\n lo = lo + Math.imul(al4, bl1) | 0;\n mid = mid + Math.imul(al4, bh1) | 0;\n mid = mid + Math.imul(ah4, bl1) | 0;\n hi = hi + Math.imul(ah4, bh1) | 0;\n lo = lo + Math.imul(al3, bl2) | 0;\n mid = mid + Math.imul(al3, bh2) | 0;\n mid = mid + Math.imul(ah3, bl2) | 0;\n hi = hi + Math.imul(ah3, bh2) | 0;\n lo = lo + Math.imul(al2, bl3) | 0;\n mid = mid + Math.imul(al2, bh3) | 0;\n mid = mid + Math.imul(ah2, bl3) | 0;\n hi = hi + Math.imul(ah2, bh3) | 0;\n lo = lo + Math.imul(al1, bl4) | 0;\n mid = mid + Math.imul(al1, bh4) | 0;\n mid = mid + Math.imul(ah1, bl4) | 0;\n hi = hi + Math.imul(ah1, bh4) | 0;\n lo = lo + Math.imul(al0, bl5) | 0;\n mid = mid + Math.imul(al0, bh5) | 0;\n mid = mid + Math.imul(ah0, bl5) | 0;\n hi = hi + Math.imul(ah0, bh5) | 0;\n var w5 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w5 >>> 26) | 0;\n w5 &= 67108863;\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = mid + Math.imul(ah6, bl0) | 0;\n hi = Math.imul(ah6, bh0);\n lo = lo + Math.imul(al5, bl1) | 0;\n mid = mid + Math.imul(al5, bh1) | 0;\n mid = mid + Math.imul(ah5, bl1) | 0;\n hi = hi + Math.imul(ah5, bh1) | 0;\n lo = lo + Math.imul(al4, bl2) | 0;\n mid = mid + Math.imul(al4, bh2) | 0;\n mid = mid + Math.imul(ah4, bl2) | 0;\n hi = hi + Math.imul(ah4, bh2) | 0;\n lo = lo + Math.imul(al3, bl3) | 0;\n mid = mid + Math.imul(al3, bh3) | 0;\n mid = mid + Math.imul(ah3, bl3) | 0;\n hi = hi + Math.imul(ah3, bh3) | 0;\n lo = lo + Math.imul(al2, bl4) | 0;\n mid = mid + Math.imul(al2, bh4) | 0;\n mid = mid + Math.imul(ah2, bl4) | 0;\n hi = hi + Math.imul(ah2, bh4) | 0;\n lo = lo + Math.imul(al1, bl5) | 0;\n mid = mid + Math.imul(al1, bh5) | 0;\n mid = mid + Math.imul(ah1, bl5) | 0;\n hi = hi + Math.imul(ah1, bh5) | 0;\n lo = lo + Math.imul(al0, bl6) | 0;\n mid = mid + Math.imul(al0, bh6) | 0;\n mid = mid + Math.imul(ah0, bl6) | 0;\n hi = hi + Math.imul(ah0, bh6) | 0;\n var w6 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w6 >>> 26) | 0;\n w6 &= 67108863;\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = mid + Math.imul(ah7, bl0) | 0;\n hi = Math.imul(ah7, bh0);\n lo = lo + Math.imul(al6, bl1) | 0;\n mid = mid + Math.imul(al6, bh1) | 0;\n mid = mid + Math.imul(ah6, bl1) | 0;\n hi = hi + Math.imul(ah6, bh1) | 0;\n lo = lo + Math.imul(al5, bl2) | 0;\n mid = mid + Math.imul(al5, bh2) | 0;\n mid = mid + Math.imul(ah5, bl2) | 0;\n hi = hi + Math.imul(ah5, bh2) | 0;\n lo = lo + Math.imul(al4, bl3) | 0;\n mid = mid + Math.imul(al4, bh3) | 0;\n mid = mid + Math.imul(ah4, bl3) | 0;\n hi = hi + Math.imul(ah4, bh3) | 0;\n lo = lo + Math.imul(al3, bl4) | 0;\n mid = mid + Math.imul(al3, bh4) | 0;\n mid = mid + Math.imul(ah3, bl4) | 0;\n hi = hi + Math.imul(ah3, bh4) | 0;\n lo = lo + Math.imul(al2, bl5) | 0;\n mid = mid + Math.imul(al2, bh5) | 0;\n mid = mid + Math.imul(ah2, bl5) | 0;\n hi = hi + Math.imul(ah2, bh5) | 0;\n lo = lo + Math.imul(al1, bl6) | 0;\n mid = mid + Math.imul(al1, bh6) | 0;\n mid = mid + Math.imul(ah1, bl6) | 0;\n hi = hi + Math.imul(ah1, bh6) | 0;\n lo = lo + Math.imul(al0, bl7) | 0;\n mid = mid + Math.imul(al0, bh7) | 0;\n mid = mid + Math.imul(ah0, bl7) | 0;\n hi = hi + Math.imul(ah0, bh7) | 0;\n var w7 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w7 >>> 26) | 0;\n w7 &= 67108863;\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = mid + Math.imul(ah8, bl0) | 0;\n hi = Math.imul(ah8, bh0);\n lo = lo + Math.imul(al7, bl1) | 0;\n mid = mid + Math.imul(al7, bh1) | 0;\n mid = mid + Math.imul(ah7, bl1) | 0;\n hi = hi + Math.imul(ah7, bh1) | 0;\n lo = lo + Math.imul(al6, bl2) | 0;\n mid = mid + Math.imul(al6, bh2) | 0;\n mid = mid + Math.imul(ah6, bl2) | 0;\n hi = hi + Math.imul(ah6, bh2) | 0;\n lo = lo + Math.imul(al5, bl3) | 0;\n mid = mid + Math.imul(al5, bh3) | 0;\n mid = mid + Math.imul(ah5, bl3) | 0;\n hi = hi + Math.imul(ah5, bh3) | 0;\n lo = lo + Math.imul(al4, bl4) | 0;\n mid = mid + Math.imul(al4, bh4) | 0;\n mid = mid + Math.imul(ah4, bl4) | 0;\n hi = hi + Math.imul(ah4, bh4) | 0;\n lo = lo + Math.imul(al3, bl5) | 0;\n mid = mid + Math.imul(al3, bh5) | 0;\n mid = mid + Math.imul(ah3, bl5) | 0;\n hi = hi + Math.imul(ah3, bh5) | 0;\n lo = lo + Math.imul(al2, bl6) | 0;\n mid = mid + Math.imul(al2, bh6) | 0;\n mid = mid + Math.imul(ah2, bl6) | 0;\n hi = hi + Math.imul(ah2, bh6) | 0;\n lo = lo + Math.imul(al1, bl7) | 0;\n mid = mid + Math.imul(al1, bh7) | 0;\n mid = mid + Math.imul(ah1, bl7) | 0;\n hi = hi + Math.imul(ah1, bh7) | 0;\n lo = lo + Math.imul(al0, bl8) | 0;\n mid = mid + Math.imul(al0, bh8) | 0;\n mid = mid + Math.imul(ah0, bl8) | 0;\n hi = hi + Math.imul(ah0, bh8) | 0;\n var w8 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w8 >>> 26) | 0;\n w8 &= 67108863;\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = mid + Math.imul(ah9, bl0) | 0;\n hi = Math.imul(ah9, bh0);\n lo = lo + Math.imul(al8, bl1) | 0;\n mid = mid + Math.imul(al8, bh1) | 0;\n mid = mid + Math.imul(ah8, bl1) | 0;\n hi = hi + Math.imul(ah8, bh1) | 0;\n lo = lo + Math.imul(al7, bl2) | 0;\n mid = mid + Math.imul(al7, bh2) | 0;\n mid = mid + Math.imul(ah7, bl2) | 0;\n hi = hi + Math.imul(ah7, bh2) | 0;\n lo = lo + Math.imul(al6, bl3) | 0;\n mid = mid + Math.imul(al6, bh3) | 0;\n mid = mid + Math.imul(ah6, bl3) | 0;\n hi = hi + Math.imul(ah6, bh3) | 0;\n lo = lo + Math.imul(al5, bl4) | 0;\n mid = mid + Math.imul(al5, bh4) | 0;\n mid = mid + Math.imul(ah5, bl4) | 0;\n hi = hi + Math.imul(ah5, bh4) | 0;\n lo = lo + Math.imul(al4, bl5) | 0;\n mid = mid + Math.imul(al4, bh5) | 0;\n mid = mid + Math.imul(ah4, bl5) | 0;\n hi = hi + Math.imul(ah4, bh5) | 0;\n lo = lo + Math.imul(al3, bl6) | 0;\n mid = mid + Math.imul(al3, bh6) | 0;\n mid = mid + Math.imul(ah3, bl6) | 0;\n hi = hi + Math.imul(ah3, bh6) | 0;\n lo = lo + Math.imul(al2, bl7) | 0;\n mid = mid + Math.imul(al2, bh7) | 0;\n mid = mid + Math.imul(ah2, bl7) | 0;\n hi = hi + Math.imul(ah2, bh7) | 0;\n lo = lo + Math.imul(al1, bl8) | 0;\n mid = mid + Math.imul(al1, bh8) | 0;\n mid = mid + Math.imul(ah1, bl8) | 0;\n hi = hi + Math.imul(ah1, bh8) | 0;\n lo = lo + Math.imul(al0, bl9) | 0;\n mid = mid + Math.imul(al0, bh9) | 0;\n mid = mid + Math.imul(ah0, bl9) | 0;\n hi = hi + Math.imul(ah0, bh9) | 0;\n var w9 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w9 >>> 26) | 0;\n w9 &= 67108863;\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = mid + Math.imul(ah9, bl1) | 0;\n hi = Math.imul(ah9, bh1);\n lo = lo + Math.imul(al8, bl2) | 0;\n mid = mid + Math.imul(al8, bh2) | 0;\n mid = mid + Math.imul(ah8, bl2) | 0;\n hi = hi + Math.imul(ah8, bh2) | 0;\n lo = lo + Math.imul(al7, bl3) | 0;\n mid = mid + Math.imul(al7, bh3) | 0;\n mid = mid + Math.imul(ah7, bl3) | 0;\n hi = hi + Math.imul(ah7, bh3) | 0;\n lo = lo + Math.imul(al6, bl4) | 0;\n mid = mid + Math.imul(al6, bh4) | 0;\n mid = mid + Math.imul(ah6, bl4) | 0;\n hi = hi + Math.imul(ah6, bh4) | 0;\n lo = lo + Math.imul(al5, bl5) | 0;\n mid = mid + Math.imul(al5, bh5) | 0;\n mid = mid + Math.imul(ah5, bl5) | 0;\n hi = hi + Math.imul(ah5, bh5) | 0;\n lo = lo + Math.imul(al4, bl6) | 0;\n mid = mid + Math.imul(al4, bh6) | 0;\n mid = mid + Math.imul(ah4, bl6) | 0;\n hi = hi + Math.imul(ah4, bh6) | 0;\n lo = lo + Math.imul(al3, bl7) | 0;\n mid = mid + Math.imul(al3, bh7) | 0;\n mid = mid + Math.imul(ah3, bl7) | 0;\n hi = hi + Math.imul(ah3, bh7) | 0;\n lo = lo + Math.imul(al2, bl8) | 0;\n mid = mid + Math.imul(al2, bh8) | 0;\n mid = mid + Math.imul(ah2, bl8) | 0;\n hi = hi + Math.imul(ah2, bh8) | 0;\n lo = lo + Math.imul(al1, bl9) | 0;\n mid = mid + Math.imul(al1, bh9) | 0;\n mid = mid + Math.imul(ah1, bl9) | 0;\n hi = hi + Math.imul(ah1, bh9) | 0;\n var w10 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w10 >>> 26) | 0;\n w10 &= 67108863;\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = mid + Math.imul(ah9, bl2) | 0;\n hi = Math.imul(ah9, bh2);\n lo = lo + Math.imul(al8, bl3) | 0;\n mid = mid + Math.imul(al8, bh3) | 0;\n mid = mid + Math.imul(ah8, bl3) | 0;\n hi = hi + Math.imul(ah8, bh3) | 0;\n lo = lo + Math.imul(al7, bl4) | 0;\n mid = mid + Math.imul(al7, bh4) | 0;\n mid = mid + Math.imul(ah7, bl4) | 0;\n hi = hi + Math.imul(ah7, bh4) | 0;\n lo = lo + Math.imul(al6, bl5) | 0;\n mid = mid + Math.imul(al6, bh5) | 0;\n mid = mid + Math.imul(ah6, bl5) | 0;\n hi = hi + Math.imul(ah6, bh5) | 0;\n lo = lo + Math.imul(al5, bl6) | 0;\n mid = mid + Math.imul(al5, bh6) | 0;\n mid = mid + Math.imul(ah5, bl6) | 0;\n hi = hi + Math.imul(ah5, bh6) | 0;\n lo = lo + Math.imul(al4, bl7) | 0;\n mid = mid + Math.imul(al4, bh7) | 0;\n mid = mid + Math.imul(ah4, bl7) | 0;\n hi = hi + Math.imul(ah4, bh7) | 0;\n lo = lo + Math.imul(al3, bl8) | 0;\n mid = mid + Math.imul(al3, bh8) | 0;\n mid = mid + Math.imul(ah3, bl8) | 0;\n hi = hi + Math.imul(ah3, bh8) | 0;\n lo = lo + Math.imul(al2, bl9) | 0;\n mid = mid + Math.imul(al2, bh9) | 0;\n mid = mid + Math.imul(ah2, bl9) | 0;\n hi = hi + Math.imul(ah2, bh9) | 0;\n var w11 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w11 >>> 26) | 0;\n w11 &= 67108863;\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = mid + Math.imul(ah9, bl3) | 0;\n hi = Math.imul(ah9, bh3);\n lo = lo + Math.imul(al8, bl4) | 0;\n mid = mid + Math.imul(al8, bh4) | 0;\n mid = mid + Math.imul(ah8, bl4) | 0;\n hi = hi + Math.imul(ah8, bh4) | 0;\n lo = lo + Math.imul(al7, bl5) | 0;\n mid = mid + Math.imul(al7, bh5) | 0;\n mid = mid + Math.imul(ah7, bl5) | 0;\n hi = hi + Math.imul(ah7, bh5) | 0;\n lo = lo + Math.imul(al6, bl6) | 0;\n mid = mid + Math.imul(al6, bh6) | 0;\n mid = mid + Math.imul(ah6, bl6) | 0;\n hi = hi + Math.imul(ah6, bh6) | 0;\n lo = lo + Math.imul(al5, bl7) | 0;\n mid = mid + Math.imul(al5, bh7) | 0;\n mid = mid + Math.imul(ah5, bl7) | 0;\n hi = hi + Math.imul(ah5, bh7) | 0;\n lo = lo + Math.imul(al4, bl8) | 0;\n mid = mid + Math.imul(al4, bh8) | 0;\n mid = mid + Math.imul(ah4, bl8) | 0;\n hi = hi + Math.imul(ah4, bh8) | 0;\n lo = lo + Math.imul(al3, bl9) | 0;\n mid = mid + Math.imul(al3, bh9) | 0;\n mid = mid + Math.imul(ah3, bl9) | 0;\n hi = hi + Math.imul(ah3, bh9) | 0;\n var w12 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w12 >>> 26) | 0;\n w12 &= 67108863;\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = mid + Math.imul(ah9, bl4) | 0;\n hi = Math.imul(ah9, bh4);\n lo = lo + Math.imul(al8, bl5) | 0;\n mid = mid + Math.imul(al8, bh5) | 0;\n mid = mid + Math.imul(ah8, bl5) | 0;\n hi = hi + Math.imul(ah8, bh5) | 0;\n lo = lo + Math.imul(al7, bl6) | 0;\n mid = mid + Math.imul(al7, bh6) | 0;\n mid = mid + Math.imul(ah7, bl6) | 0;\n hi = hi + Math.imul(ah7, bh6) | 0;\n lo = lo + Math.imul(al6, bl7) | 0;\n mid = mid + Math.imul(al6, bh7) | 0;\n mid = mid + Math.imul(ah6, bl7) | 0;\n hi = hi + Math.imul(ah6, bh7) | 0;\n lo = lo + Math.imul(al5, bl8) | 0;\n mid = mid + Math.imul(al5, bh8) | 0;\n mid = mid + Math.imul(ah5, bl8) | 0;\n hi = hi + Math.imul(ah5, bh8) | 0;\n lo = lo + Math.imul(al4, bl9) | 0;\n mid = mid + Math.imul(al4, bh9) | 0;\n mid = mid + Math.imul(ah4, bl9) | 0;\n hi = hi + Math.imul(ah4, bh9) | 0;\n var w13 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w13 >>> 26) | 0;\n w13 &= 67108863;\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = mid + Math.imul(ah9, bl5) | 0;\n hi = Math.imul(ah9, bh5);\n lo = lo + Math.imul(al8, bl6) | 0;\n mid = mid + Math.imul(al8, bh6) | 0;\n mid = mid + Math.imul(ah8, bl6) | 0;\n hi = hi + Math.imul(ah8, bh6) | 0;\n lo = lo + Math.imul(al7, bl7) | 0;\n mid = mid + Math.imul(al7, bh7) | 0;\n mid = mid + Math.imul(ah7, bl7) | 0;\n hi = hi + Math.imul(ah7, bh7) | 0;\n lo = lo + Math.imul(al6, bl8) | 0;\n mid = mid + Math.imul(al6, bh8) | 0;\n mid = mid + Math.imul(ah6, bl8) | 0;\n hi = hi + Math.imul(ah6, bh8) | 0;\n lo = lo + Math.imul(al5, bl9) | 0;\n mid = mid + Math.imul(al5, bh9) | 0;\n mid = mid + Math.imul(ah5, bl9) | 0;\n hi = hi + Math.imul(ah5, bh9) | 0;\n var w14 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w14 >>> 26) | 0;\n w14 &= 67108863;\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = mid + Math.imul(ah9, bl6) | 0;\n hi = Math.imul(ah9, bh6);\n lo = lo + Math.imul(al8, bl7) | 0;\n mid = mid + Math.imul(al8, bh7) | 0;\n mid = mid + Math.imul(ah8, bl7) | 0;\n hi = hi + Math.imul(ah8, bh7) | 0;\n lo = lo + Math.imul(al7, bl8) | 0;\n mid = mid + Math.imul(al7, bh8) | 0;\n mid = mid + Math.imul(ah7, bl8) | 0;\n hi = hi + Math.imul(ah7, bh8) | 0;\n lo = lo + Math.imul(al6, bl9) | 0;\n mid = mid + Math.imul(al6, bh9) | 0;\n mid = mid + Math.imul(ah6, bl9) | 0;\n hi = hi + Math.imul(ah6, bh9) | 0;\n var w15 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w15 >>> 26) | 0;\n w15 &= 67108863;\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = mid + Math.imul(ah9, bl7) | 0;\n hi = Math.imul(ah9, bh7);\n lo = lo + Math.imul(al8, bl8) | 0;\n mid = mid + Math.imul(al8, bh8) | 0;\n mid = mid + Math.imul(ah8, bl8) | 0;\n hi = hi + Math.imul(ah8, bh8) | 0;\n lo = lo + Math.imul(al7, bl9) | 0;\n mid = mid + Math.imul(al7, bh9) | 0;\n mid = mid + Math.imul(ah7, bl9) | 0;\n hi = hi + Math.imul(ah7, bh9) | 0;\n var w16 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w16 >>> 26) | 0;\n w16 &= 67108863;\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = mid + Math.imul(ah9, bl8) | 0;\n hi = Math.imul(ah9, bh8);\n lo = lo + Math.imul(al8, bl9) | 0;\n mid = mid + Math.imul(al8, bh9) | 0;\n mid = mid + Math.imul(ah8, bl9) | 0;\n hi = hi + Math.imul(ah8, bh9) | 0;\n var w17 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w17 >>> 26) | 0;\n w17 &= 67108863;\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = mid + Math.imul(ah9, bl9) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w18 >>> 26) | 0;\n w18 &= 67108863;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n function bigMulTo(self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 67108863;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n var lo = r & 67108863;\n ncarry = ncarry + (r / 67108864 | 0) | 0;\n lo = lo + rword | 0;\n rword = lo & 67108863;\n ncarry = ncarry + (lo >>> 26) | 0;\n hncarry += ncarry >>> 26;\n ncarry &= 67108863;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n return out._strip();\n }\n function jumboMulTo(self, num, out) {\n return bigMulTo(self, num, out);\n }\n BN2.prototype.mulTo = function mulTo(num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n return res;\n };\n function FFTM(x, y) {\n this.x = x;\n this.y = y;\n }\n FFTM.prototype.makeRBT = function makeRBT(N) {\n var t = new Array(N);\n var l = BN2.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n return t;\n };\n FFTM.prototype.revBin = function revBin(x, l, N) {\n if (x === 0 || x === N - 1)\n return x;\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << l - i - 1;\n x >>= 1;\n }\n return rb;\n };\n FFTM.prototype.permute = function permute(rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n FFTM.prototype.transform = function transform(rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n var rx = rtwdf_ * ro - itwdf_ * io;\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n FFTM.prototype.guessLen13b = function guessLen13b(n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n return 1 << i + 1 + odd;\n };\n FFTM.prototype.conjugate = function conjugate(rws, iws, N) {\n if (N <= 1)\n return;\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n t = iws[i];\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n FFTM.prototype.normalize13b = function normalize13b(ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 8192 + Math.round(ws[2 * i] / N) + carry;\n ws[i] = w & 67108863;\n if (w < 67108864) {\n carry = 0;\n } else {\n carry = w / 67108864 | 0;\n }\n }\n return ws;\n };\n FFTM.prototype.convert13b = function convert13b(ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n rws[2 * i] = carry & 8191;\n carry = carry >>> 13;\n rws[2 * i + 1] = carry & 8191;\n carry = carry >>> 13;\n }\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n assert3(carry === 0);\n assert3((carry & ~8191) === 0);\n };\n FFTM.prototype.stub = function stub(N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n return ph;\n };\n FFTM.prototype.mulp = function mulp(x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n var rbt = this.makeRBT(N);\n var _ = this.stub(N);\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n var rmws = out.words;\n rmws.length = N;\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n BN2.prototype.mul = function mul(num) {\n var out = new BN2(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n BN2.prototype.mulf = function mulf(num) {\n var out = new BN2(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n BN2.prototype.imul = function imul(num) {\n return this.clone().mulTo(num, this);\n };\n BN2.prototype.imuln = function imuln(num) {\n var isNegNum = num < 0;\n if (isNegNum)\n num = -num;\n assert3(typeof num === \"number\");\n assert3(num < 67108864);\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 67108863) + (carry & 67108863);\n carry >>= 26;\n carry += w / 67108864 | 0;\n carry += lo >>> 26;\n this.words[i] = lo & 67108863;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n this.length = num === 0 ? 1 : this.length;\n return isNegNum ? this.ineg() : this;\n };\n BN2.prototype.muln = function muln(num) {\n return this.clone().imuln(num);\n };\n BN2.prototype.sqr = function sqr() {\n return this.mul(this);\n };\n BN2.prototype.isqr = function isqr() {\n return this.imul(this.clone());\n };\n BN2.prototype.pow = function pow(num) {\n var w = toBitArray(num);\n if (w.length === 0)\n return new BN2(1);\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0)\n break;\n }\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0)\n continue;\n res = res.mul(q);\n }\n }\n return res;\n };\n BN2.prototype.iushln = function iushln(bits) {\n assert3(typeof bits === \"number\" && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = 67108863 >>> 26 - r << 26 - r;\n var i;\n if (r !== 0) {\n var carry = 0;\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = (this.words[i] | 0) - newCarry << r;\n this.words[i] = c | carry;\n carry = newCarry >>> 26 - r;\n }\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n this.length += s;\n }\n return this._strip();\n };\n BN2.prototype.ishln = function ishln(bits) {\n assert3(this.negative === 0);\n return this.iushln(bits);\n };\n BN2.prototype.iushrn = function iushrn(bits, hint, extended) {\n assert3(typeof bits === \"number\" && bits >= 0);\n var h;\n if (hint) {\n h = (hint - hint % 26) / 26;\n } else {\n h = 0;\n }\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask2 = 67108863 ^ 67108863 >>> r << r;\n var maskedWords = extended;\n h -= s;\n h = Math.max(0, h);\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n if (s === 0) {\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = carry << 26 - r | word >>> r;\n carry = word & mask2;\n }\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n return this._strip();\n };\n BN2.prototype.ishrn = function ishrn(bits, hint, extended) {\n assert3(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n BN2.prototype.shln = function shln(bits) {\n return this.clone().ishln(bits);\n };\n BN2.prototype.ushln = function ushln(bits) {\n return this.clone().iushln(bits);\n };\n BN2.prototype.shrn = function shrn(bits) {\n return this.clone().ishrn(bits);\n };\n BN2.prototype.ushrn = function ushrn(bits) {\n return this.clone().iushrn(bits);\n };\n BN2.prototype.testn = function testn(bit) {\n assert3(typeof bit === \"number\" && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n if (this.length <= s)\n return false;\n var w = this.words[s];\n return !!(w & q);\n };\n BN2.prototype.imaskn = function imaskn(bits) {\n assert3(typeof bits === \"number\" && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n assert3(this.negative === 0, \"imaskn works only with positive numbers\");\n if (this.length <= s) {\n return this;\n }\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n if (r !== 0) {\n var mask2 = 67108863 ^ 67108863 >>> r << r;\n this.words[this.length - 1] &= mask2;\n }\n return this._strip();\n };\n BN2.prototype.maskn = function maskn(bits) {\n return this.clone().imaskn(bits);\n };\n BN2.prototype.iaddn = function iaddn(num) {\n assert3(typeof num === \"number\");\n assert3(num < 67108864);\n if (num < 0)\n return this.isubn(-num);\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n return this._iaddn(num);\n };\n BN2.prototype._iaddn = function _iaddn(num) {\n this.words[0] += num;\n for (var i = 0; i < this.length && this.words[i] >= 67108864; i++) {\n this.words[i] -= 67108864;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n return this;\n };\n BN2.prototype.isubn = function isubn(num) {\n assert3(typeof num === \"number\");\n assert3(num < 67108864);\n if (num < 0)\n return this.iaddn(-num);\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n this.words[0] -= num;\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 67108864;\n this.words[i + 1] -= 1;\n }\n }\n return this._strip();\n };\n BN2.prototype.addn = function addn(num) {\n return this.clone().iaddn(num);\n };\n BN2.prototype.subn = function subn(num) {\n return this.clone().isubn(num);\n };\n BN2.prototype.iabs = function iabs() {\n this.negative = 0;\n return this;\n };\n BN2.prototype.abs = function abs() {\n return this.clone().iabs();\n };\n BN2.prototype._ishlnsubmul = function _ishlnsubmul(num, mul, shift) {\n var len = num.length + shift;\n var i;\n this._expand(len);\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 67108863;\n carry = (w >> 26) - (right / 67108864 | 0);\n this.words[i + shift] = w & 67108863;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 67108863;\n }\n if (carry === 0)\n return this._strip();\n assert3(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 67108863;\n }\n this.negative = 1;\n return this._strip();\n };\n BN2.prototype._wordDiv = function _wordDiv(num, mode) {\n var shift = this.length - num.length;\n var a = this.clone();\n var b = num;\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n var m = a.length - b.length;\n var q;\n if (mode !== \"mod\") {\n q = new BN2(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 67108864 + (a.words[b.length + j - 1] | 0);\n qj = Math.min(qj / bhi | 0, 67108863);\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n if (mode !== \"div\" && shift !== 0) {\n a.iushrn(shift);\n }\n return {\n div: q || null,\n mod: a\n };\n };\n BN2.prototype.divmod = function divmod(num, mode, positive) {\n assert3(!num.isZero());\n if (this.isZero()) {\n return {\n div: new BN2(0),\n mod: new BN2(0)\n };\n }\n var div, mod2, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n if (mode !== \"div\") {\n mod2 = res.mod.neg();\n if (positive && mod2.negative !== 0) {\n mod2.iadd(num);\n }\n }\n return {\n div,\n mod: mod2\n };\n }\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n return {\n div,\n mod: res.mod\n };\n }\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n if (mode !== \"div\") {\n mod2 = res.mod.neg();\n if (positive && mod2.negative !== 0) {\n mod2.isub(num);\n }\n }\n return {\n div: res.div,\n mod: mod2\n };\n }\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN2(0),\n mod: this\n };\n }\n if (num.length === 1) {\n if (mode === \"div\") {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n if (mode === \"mod\") {\n return {\n div: null,\n mod: new BN2(this.modrn(num.words[0]))\n };\n }\n return {\n div: this.divn(num.words[0]),\n mod: new BN2(this.modrn(num.words[0]))\n };\n }\n return this._wordDiv(num, mode);\n };\n BN2.prototype.div = function div(num) {\n return this.divmod(num, \"div\", false).div;\n };\n BN2.prototype.mod = function mod2(num) {\n return this.divmod(num, \"mod\", false).mod;\n };\n BN2.prototype.umod = function umod(num) {\n return this.divmod(num, \"mod\", true).mod;\n };\n BN2.prototype.divRound = function divRound(num) {\n var dm = this.divmod(num);\n if (dm.mod.isZero())\n return dm.div;\n var mod2 = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod2.cmp(half);\n if (cmp < 0 || r2 === 1 && cmp === 0)\n return dm.div;\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n BN2.prototype.modrn = function modrn(num) {\n var isNegNum = num < 0;\n if (isNegNum)\n num = -num;\n assert3(num <= 67108863);\n var p = (1 << 26) % num;\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n return isNegNum ? -acc : acc;\n };\n BN2.prototype.modn = function modn(num) {\n return this.modrn(num);\n };\n BN2.prototype.idivn = function idivn(num) {\n var isNegNum = num < 0;\n if (isNegNum)\n num = -num;\n assert3(num <= 67108863);\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 67108864;\n this.words[i] = w / num | 0;\n carry = w % num;\n }\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n BN2.prototype.divn = function divn(num) {\n return this.clone().idivn(num);\n };\n BN2.prototype.egcd = function egcd(p) {\n assert3(p.negative === 0);\n assert3(!p.isZero());\n var x = this;\n var y = p.clone();\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n var A = new BN2(1);\n var B = new BN2(0);\n var C = new BN2(0);\n var D = new BN2(1);\n var g = 0;\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n var yp = y.clone();\n var xp = x.clone();\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1)\n ;\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1)\n ;\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n BN2.prototype._invmp = function _invmp(p) {\n assert3(p.negative === 0);\n assert3(!p.isZero());\n var a = this;\n var b = p.clone();\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n var x1 = new BN2(1);\n var x2 = new BN2(0);\n var delta = b.clone();\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1)\n ;\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n x1.iushrn(1);\n }\n }\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1)\n ;\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n x2.iushrn(1);\n }\n }\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n return res;\n };\n BN2.prototype.gcd = function gcd(num) {\n if (this.isZero())\n return num.abs();\n if (num.isZero())\n return this.abs();\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n var r = a.cmp(b);\n if (r < 0) {\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n a.isub(b);\n } while (true);\n return b.iushln(shift);\n };\n BN2.prototype.invm = function invm(num) {\n return this.egcd(num).a.umod(num);\n };\n BN2.prototype.isEven = function isEven() {\n return (this.words[0] & 1) === 0;\n };\n BN2.prototype.isOdd = function isOdd() {\n return (this.words[0] & 1) === 1;\n };\n BN2.prototype.andln = function andln(num) {\n return this.words[0] & num;\n };\n BN2.prototype.bincn = function bincn(bit) {\n assert3(typeof bit === \"number\");\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 67108863;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n BN2.prototype.isZero = function isZero() {\n return this.length === 1 && this.words[0] === 0;\n };\n BN2.prototype.cmpn = function cmpn(num) {\n var negative = num < 0;\n if (this.negative !== 0 && !negative)\n return -1;\n if (this.negative === 0 && negative)\n return 1;\n this._strip();\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n assert3(num <= 67108863, \"Number is too big\");\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN2.prototype.cmp = function cmp(num) {\n if (this.negative !== 0 && num.negative === 0)\n return -1;\n if (this.negative === 0 && num.negative !== 0)\n return 1;\n var res = this.ucmp(num);\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN2.prototype.ucmp = function ucmp(num) {\n if (this.length > num.length)\n return 1;\n if (this.length < num.length)\n return -1;\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n if (a === b)\n continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n BN2.prototype.gtn = function gtn(num) {\n return this.cmpn(num) === 1;\n };\n BN2.prototype.gt = function gt(num) {\n return this.cmp(num) === 1;\n };\n BN2.prototype.gten = function gten(num) {\n return this.cmpn(num) >= 0;\n };\n BN2.prototype.gte = function gte(num) {\n return this.cmp(num) >= 0;\n };\n BN2.prototype.ltn = function ltn(num) {\n return this.cmpn(num) === -1;\n };\n BN2.prototype.lt = function lt(num) {\n return this.cmp(num) === -1;\n };\n BN2.prototype.lten = function lten(num) {\n return this.cmpn(num) <= 0;\n };\n BN2.prototype.lte = function lte(num) {\n return this.cmp(num) <= 0;\n };\n BN2.prototype.eqn = function eqn(num) {\n return this.cmpn(num) === 0;\n };\n BN2.prototype.eq = function eq(num) {\n return this.cmp(num) === 0;\n };\n BN2.red = function red(num) {\n return new Red(num);\n };\n BN2.prototype.toRed = function toRed(ctx) {\n assert3(!this.red, \"Already a number in reduction context\");\n assert3(this.negative === 0, \"red works only with positives\");\n return ctx.convertTo(this)._forceRed(ctx);\n };\n BN2.prototype.fromRed = function fromRed() {\n assert3(this.red, \"fromRed works only with numbers in reduction context\");\n return this.red.convertFrom(this);\n };\n BN2.prototype._forceRed = function _forceRed(ctx) {\n this.red = ctx;\n return this;\n };\n BN2.prototype.forceRed = function forceRed(ctx) {\n assert3(!this.red, \"Already a number in reduction context\");\n return this._forceRed(ctx);\n };\n BN2.prototype.redAdd = function redAdd(num) {\n assert3(this.red, \"redAdd works only with red numbers\");\n return this.red.add(this, num);\n };\n BN2.prototype.redIAdd = function redIAdd(num) {\n assert3(this.red, \"redIAdd works only with red numbers\");\n return this.red.iadd(this, num);\n };\n BN2.prototype.redSub = function redSub(num) {\n assert3(this.red, \"redSub works only with red numbers\");\n return this.red.sub(this, num);\n };\n BN2.prototype.redISub = function redISub(num) {\n assert3(this.red, \"redISub works only with red numbers\");\n return this.red.isub(this, num);\n };\n BN2.prototype.redShl = function redShl(num) {\n assert3(this.red, \"redShl works only with red numbers\");\n return this.red.shl(this, num);\n };\n BN2.prototype.redMul = function redMul(num) {\n assert3(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n BN2.prototype.redIMul = function redIMul(num) {\n assert3(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n BN2.prototype.redSqr = function redSqr() {\n assert3(this.red, \"redSqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n BN2.prototype.redISqr = function redISqr() {\n assert3(this.red, \"redISqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n BN2.prototype.redSqrt = function redSqrt() {\n assert3(this.red, \"redSqrt works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n BN2.prototype.redInvm = function redInvm() {\n assert3(this.red, \"redInvm works only with red numbers\");\n this.red._verify1(this);\n return this.red.invm(this);\n };\n BN2.prototype.redNeg = function redNeg() {\n assert3(this.red, \"redNeg works only with red numbers\");\n this.red._verify1(this);\n return this.red.neg(this);\n };\n BN2.prototype.redPow = function redPow(num) {\n assert3(this.red && !num.red, \"redPow(normalNum)\");\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n function MPrime(name, p) {\n this.name = name;\n this.p = new BN2(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN2(1).iushln(this.n).isub(this.p);\n this.tmp = this._tmp();\n }\n MPrime.prototype._tmp = function _tmp() {\n var tmp = new BN2(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n MPrime.prototype.ireduce = function ireduce(num) {\n var r = num;\n var rlen;\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== void 0) {\n r.strip();\n } else {\n r._strip();\n }\n }\n return r;\n };\n MPrime.prototype.split = function split2(input, out) {\n input.iushrn(this.n, 0, out);\n };\n MPrime.prototype.imulK = function imulK(num) {\n return num.imul(this.k);\n };\n function K256() {\n MPrime.call(\n this,\n \"k256\",\n \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\"\n );\n }\n inherits(K256, MPrime);\n K256.prototype.split = function split2(input, output) {\n var mask2 = 4194303;\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n var prev = input.words[9];\n output.words[output.length++] = prev & mask2;\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = (next & mask2) << 4 | prev >>> 22;\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n K256.prototype.imulK = function imulK(num) {\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 977;\n num.words[i] = lo & 67108863;\n lo = w * 64 + (lo / 67108864 | 0);\n }\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n function P224() {\n MPrime.call(\n this,\n \"p224\",\n \"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\"\n );\n }\n inherits(P224, MPrime);\n function P192() {\n MPrime.call(\n this,\n \"p192\",\n \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\"\n );\n }\n inherits(P192, MPrime);\n function P25519() {\n MPrime.call(\n this,\n \"25519\",\n \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\"\n );\n }\n inherits(P25519, MPrime);\n P25519.prototype.imulK = function imulK(num) {\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 19 + carry;\n var lo = hi & 67108863;\n hi >>>= 26;\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n BN2._prime = function prime(name) {\n if (primes[name])\n return primes[name];\n var prime2;\n if (name === \"k256\") {\n prime2 = new K256();\n } else if (name === \"p224\") {\n prime2 = new P224();\n } else if (name === \"p192\") {\n prime2 = new P192();\n } else if (name === \"p25519\") {\n prime2 = new P25519();\n } else {\n throw new Error(\"Unknown prime \" + name);\n }\n primes[name] = prime2;\n return prime2;\n };\n function Red(m) {\n if (typeof m === \"string\") {\n var prime = BN2._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert3(m.gtn(1), \"modulus must be greater than 1\");\n this.m = m;\n this.prime = null;\n }\n }\n Red.prototype._verify1 = function _verify1(a) {\n assert3(a.negative === 0, \"red works only with positives\");\n assert3(a.red, \"red works only with red numbers\");\n };\n Red.prototype._verify2 = function _verify2(a, b) {\n assert3((a.negative | b.negative) === 0, \"red works only with positives\");\n assert3(\n a.red && a.red === b.red,\n \"red works only with red numbers\"\n );\n };\n Red.prototype.imod = function imod(a) {\n if (this.prime)\n return this.prime.ireduce(a)._forceRed(this);\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n Red.prototype.neg = function neg(a) {\n if (a.isZero()) {\n return a.clone();\n }\n return this.m.sub(a)._forceRed(this);\n };\n Red.prototype.add = function add2(a, b) {\n this._verify2(a, b);\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.iadd = function iadd(a, b) {\n this._verify2(a, b);\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n Red.prototype.sub = function sub(a, b) {\n this._verify2(a, b);\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.isub = function isub(a, b) {\n this._verify2(a, b);\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n Red.prototype.shl = function shl(a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n Red.prototype.imul = function imul(a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n Red.prototype.mul = function mul(a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n Red.prototype.isqr = function isqr(a) {\n return this.imul(a, a.clone());\n };\n Red.prototype.sqr = function sqr(a) {\n return this.mul(a, a);\n };\n Red.prototype.sqrt = function sqrt(a) {\n if (a.isZero())\n return a.clone();\n var mod3 = this.m.andln(3);\n assert3(mod3 % 2 === 1);\n if (mod3 === 3) {\n var pow = this.m.add(new BN2(1)).iushrn(2);\n return this.pow(a, pow);\n }\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert3(!q.isZero());\n var one = new BN2(1).toRed(this);\n var nOne = one.redNeg();\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN2(2 * z * z).toRed(this);\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert3(i < m);\n var b = this.pow(c, new BN2(1).iushln(m - i - 1));\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n return r;\n };\n Red.prototype.invm = function invm(a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n Red.prototype.pow = function pow(a, num) {\n if (num.isZero())\n return new BN2(1).toRed(this);\n if (num.cmpn(1) === 0)\n return a.clone();\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN2(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = word >> j & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0))\n continue;\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n return res;\n };\n Red.prototype.convertTo = function convertTo(num) {\n var r = num.umod(this.m);\n return r === num ? r.clone() : r;\n };\n Red.prototype.convertFrom = function convertFrom(num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n BN2.mont = function mont(num) {\n return new Mont(num);\n };\n function Mont(m) {\n Red.call(this, m);\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - this.shift % 26;\n }\n this.r = new BN2(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n Mont.prototype.convertTo = function convertTo(num) {\n return this.imod(num.ushln(this.shift));\n };\n Mont.prototype.convertFrom = function convertFrom(num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n Mont.prototype.imul = function imul(a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.mul = function mul(a, b) {\n if (a.isZero() || b.isZero())\n return new BN2(0)._forceRed(this);\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.invm = function invm(a) {\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n })(typeof module === \"undefined\" || module, exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js\n var require_safe_buffer = __commonJS({\n \"../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var buffer = (init_buffer(), __toCommonJS(buffer_exports));\n var Buffer3 = buffer.Buffer;\n function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n }\n if (Buffer3.from && Buffer3.alloc && Buffer3.allocUnsafe && Buffer3.allocUnsafeSlow) {\n module.exports = buffer;\n } else {\n copyProps(buffer, exports3);\n exports3.Buffer = SafeBuffer;\n }\n function SafeBuffer(arg, encodingOrOffset, length) {\n return Buffer3(arg, encodingOrOffset, length);\n }\n SafeBuffer.prototype = Object.create(Buffer3.prototype);\n copyProps(Buffer3, SafeBuffer);\n SafeBuffer.from = function(arg, encodingOrOffset, length) {\n if (typeof arg === \"number\") {\n throw new TypeError(\"Argument must not be a number\");\n }\n return Buffer3(arg, encodingOrOffset, length);\n };\n SafeBuffer.alloc = function(size, fill, encoding) {\n if (typeof size !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n var buf = Buffer3(size);\n if (fill !== void 0) {\n if (typeof encoding === \"string\") {\n buf.fill(fill, encoding);\n } else {\n buf.fill(fill);\n }\n } else {\n buf.fill(0);\n }\n return buf;\n };\n SafeBuffer.allocUnsafe = function(size) {\n if (typeof size !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n return Buffer3(size);\n };\n SafeBuffer.allocUnsafeSlow = function(size) {\n if (typeof size !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n return buffer.SlowBuffer(size);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/base-x@3.0.11/node_modules/base-x/src/index.js\n var require_src = __commonJS({\n \"../../../node_modules/.pnpm/base-x@3.0.11/node_modules/base-x/src/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var _Buffer = require_safe_buffer().Buffer;\n function base(ALPHABET) {\n if (ALPHABET.length >= 255) {\n throw new TypeError(\"Alphabet too long\");\n }\n var BASE_MAP = new Uint8Array(256);\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255;\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i);\n var xc = x.charCodeAt(0);\n if (BASE_MAP[xc] !== 255) {\n throw new TypeError(x + \" is ambiguous\");\n }\n BASE_MAP[xc] = i;\n }\n var BASE = ALPHABET.length;\n var LEADER = ALPHABET.charAt(0);\n var FACTOR = Math.log(BASE) / Math.log(256);\n var iFACTOR = Math.log(256) / Math.log(BASE);\n function encode(source) {\n if (Array.isArray(source) || source instanceof Uint8Array) {\n source = _Buffer.from(source);\n }\n if (!_Buffer.isBuffer(source)) {\n throw new TypeError(\"Expected Buffer\");\n }\n if (source.length === 0) {\n return \"\";\n }\n var zeroes = 0;\n var length = 0;\n var pbegin = 0;\n var pend = source.length;\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++;\n zeroes++;\n }\n var size = (pend - pbegin) * iFACTOR + 1 >>> 0;\n var b58 = new Uint8Array(size);\n while (pbegin !== pend) {\n var carry = source[pbegin];\n var i2 = 0;\n for (var it1 = size - 1; (carry !== 0 || i2 < length) && it1 !== -1; it1--, i2++) {\n carry += 256 * b58[it1] >>> 0;\n b58[it1] = carry % BASE >>> 0;\n carry = carry / BASE >>> 0;\n }\n if (carry !== 0) {\n throw new Error(\"Non-zero carry\");\n }\n length = i2;\n pbegin++;\n }\n var it2 = size - length;\n while (it2 !== size && b58[it2] === 0) {\n it2++;\n }\n var str = LEADER.repeat(zeroes);\n for (; it2 < size; ++it2) {\n str += ALPHABET.charAt(b58[it2]);\n }\n return str;\n }\n function decodeUnsafe(source) {\n if (typeof source !== \"string\") {\n throw new TypeError(\"Expected String\");\n }\n if (source.length === 0) {\n return _Buffer.alloc(0);\n }\n var psz = 0;\n var zeroes = 0;\n var length = 0;\n while (source[psz] === LEADER) {\n zeroes++;\n psz++;\n }\n var size = (source.length - psz) * FACTOR + 1 >>> 0;\n var b256 = new Uint8Array(size);\n while (psz < source.length) {\n var charCode = source.charCodeAt(psz);\n if (charCode > 255) {\n return;\n }\n var carry = BASE_MAP[charCode];\n if (carry === 255) {\n return;\n }\n var i2 = 0;\n for (var it3 = size - 1; (carry !== 0 || i2 < length) && it3 !== -1; it3--, i2++) {\n carry += BASE * b256[it3] >>> 0;\n b256[it3] = carry % 256 >>> 0;\n carry = carry / 256 >>> 0;\n }\n if (carry !== 0) {\n throw new Error(\"Non-zero carry\");\n }\n length = i2;\n psz++;\n }\n var it4 = size - length;\n while (it4 !== size && b256[it4] === 0) {\n it4++;\n }\n var vch = _Buffer.allocUnsafe(zeroes + (size - it4));\n vch.fill(0, 0, zeroes);\n var j2 = zeroes;\n while (it4 !== size) {\n vch[j2++] = b256[it4++];\n }\n return vch;\n }\n function decode(string2) {\n var buffer = decodeUnsafe(string2);\n if (buffer) {\n return buffer;\n }\n throw new Error(\"Non-base\" + BASE + \" character\");\n }\n return {\n encode,\n decodeUnsafe,\n decode\n };\n }\n module.exports = base;\n }\n });\n\n // ../../../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js\n var require_bs58 = __commonJS({\n \"../../../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var basex = require_src();\n var ALPHABET = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n module.exports = basex(ALPHABET);\n }\n });\n\n // ../../../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js\n var require_encoding_lib = __commonJS({\n \"../../../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n function inRange2(a, min, max) {\n return min <= a && a <= max;\n }\n function ToDictionary(o) {\n if (o === void 0)\n return {};\n if (o === Object(o))\n return o;\n throw TypeError(\"Could not convert argument to dictionary\");\n }\n function stringToCodePoints(string2) {\n var s = String(string2);\n var n = s.length;\n var i = 0;\n var u = [];\n while (i < n) {\n var c = s.charCodeAt(i);\n if (c < 55296 || c > 57343) {\n u.push(c);\n } else if (56320 <= c && c <= 57343) {\n u.push(65533);\n } else if (55296 <= c && c <= 56319) {\n if (i === n - 1) {\n u.push(65533);\n } else {\n var d = string2.charCodeAt(i + 1);\n if (56320 <= d && d <= 57343) {\n var a = c & 1023;\n var b = d & 1023;\n u.push(65536 + (a << 10) + b);\n i += 1;\n } else {\n u.push(65533);\n }\n }\n }\n i += 1;\n }\n return u;\n }\n function codePointsToString(code_points) {\n var s = \"\";\n for (var i = 0; i < code_points.length; ++i) {\n var cp = code_points[i];\n if (cp <= 65535) {\n s += String.fromCharCode(cp);\n } else {\n cp -= 65536;\n s += String.fromCharCode(\n (cp >> 10) + 55296,\n (cp & 1023) + 56320\n );\n }\n }\n return s;\n }\n var end_of_stream = -1;\n function Stream(tokens) {\n this.tokens = [].slice.call(tokens);\n }\n Stream.prototype = {\n /**\n * @return {boolean} True if end-of-stream has been hit.\n */\n endOfStream: function() {\n return !this.tokens.length;\n },\n /**\n * When a token is read from a stream, the first token in the\n * stream must be returned and subsequently removed, and\n * end-of-stream must be returned otherwise.\n *\n * @return {number} Get the next token from the stream, or\n * end_of_stream.\n */\n read: function() {\n if (!this.tokens.length)\n return end_of_stream;\n return this.tokens.shift();\n },\n /**\n * When one or more tokens are prepended to a stream, those tokens\n * must be inserted, in given order, before the first token in the\n * stream.\n *\n * @param {(number|!Array.)} token The token(s) to prepend to the stream.\n */\n prepend: function(token) {\n if (Array.isArray(token)) {\n var tokens = (\n /**@type {!Array.}*/\n token\n );\n while (tokens.length)\n this.tokens.unshift(tokens.pop());\n } else {\n this.tokens.unshift(token);\n }\n },\n /**\n * When one or more tokens are pushed to a stream, those tokens\n * must be inserted, in given order, after the last token in the\n * stream.\n *\n * @param {(number|!Array.)} token The tokens(s) to prepend to the stream.\n */\n push: function(token) {\n if (Array.isArray(token)) {\n var tokens = (\n /**@type {!Array.}*/\n token\n );\n while (tokens.length)\n this.tokens.push(tokens.shift());\n } else {\n this.tokens.push(token);\n }\n }\n };\n var finished = -1;\n function decoderError(fatal, opt_code_point) {\n if (fatal)\n throw TypeError(\"Decoder error\");\n return opt_code_point || 65533;\n }\n var DEFAULT_ENCODING = \"utf-8\";\n function TextDecoder2(encoding, options) {\n if (!(this instanceof TextDecoder2)) {\n return new TextDecoder2(encoding, options);\n }\n encoding = encoding !== void 0 ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error(\"Encoding not supported. Only utf-8 is supported\");\n }\n options = ToDictionary(options);\n this._streaming = false;\n this._BOMseen = false;\n this._decoder = null;\n this._fatal = Boolean(options[\"fatal\"]);\n this._ignoreBOM = Boolean(options[\"ignoreBOM\"]);\n Object.defineProperty(this, \"encoding\", { value: \"utf-8\" });\n Object.defineProperty(this, \"fatal\", { value: this._fatal });\n Object.defineProperty(this, \"ignoreBOM\", { value: this._ignoreBOM });\n }\n TextDecoder2.prototype = {\n /**\n * @param {ArrayBufferView=} input The buffer of bytes to decode.\n * @param {Object=} options\n * @return {string} The decoded string.\n */\n decode: function decode(input, options) {\n var bytes;\n if (typeof input === \"object\" && input instanceof ArrayBuffer) {\n bytes = new Uint8Array(input);\n } else if (typeof input === \"object\" && \"buffer\" in input && input.buffer instanceof ArrayBuffer) {\n bytes = new Uint8Array(\n input.buffer,\n input.byteOffset,\n input.byteLength\n );\n } else {\n bytes = new Uint8Array(0);\n }\n options = ToDictionary(options);\n if (!this._streaming) {\n this._decoder = new UTF8Decoder({ fatal: this._fatal });\n this._BOMseen = false;\n }\n this._streaming = Boolean(options[\"stream\"]);\n var input_stream = new Stream(bytes);\n var code_points = [];\n var result;\n while (!input_stream.endOfStream()) {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(\n code_points,\n /**@type {!Array.}*/\n result\n );\n else\n code_points.push(result);\n }\n if (!this._streaming) {\n do {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(\n code_points,\n /**@type {!Array.}*/\n result\n );\n else\n code_points.push(result);\n } while (!input_stream.endOfStream());\n this._decoder = null;\n }\n if (code_points.length) {\n if ([\"utf-8\"].indexOf(this.encoding) !== -1 && !this._ignoreBOM && !this._BOMseen) {\n if (code_points[0] === 65279) {\n this._BOMseen = true;\n code_points.shift();\n } else {\n this._BOMseen = true;\n }\n }\n }\n return codePointsToString(code_points);\n }\n };\n function TextEncoder2(encoding, options) {\n if (!(this instanceof TextEncoder2))\n return new TextEncoder2(encoding, options);\n encoding = encoding !== void 0 ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error(\"Encoding not supported. Only utf-8 is supported\");\n }\n options = ToDictionary(options);\n this._streaming = false;\n this._encoder = null;\n this._options = { fatal: Boolean(options[\"fatal\"]) };\n Object.defineProperty(this, \"encoding\", { value: \"utf-8\" });\n }\n TextEncoder2.prototype = {\n /**\n * @param {string=} opt_string The string to encode.\n * @param {Object=} options\n * @return {Uint8Array} Encoded bytes, as a Uint8Array.\n */\n encode: function encode(opt_string, options) {\n opt_string = opt_string ? String(opt_string) : \"\";\n options = ToDictionary(options);\n if (!this._streaming)\n this._encoder = new UTF8Encoder(this._options);\n this._streaming = Boolean(options[\"stream\"]);\n var bytes = [];\n var input_stream = new Stream(stringToCodePoints(opt_string));\n var result;\n while (!input_stream.endOfStream()) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(\n bytes,\n /**@type {!Array.}*/\n result\n );\n else\n bytes.push(result);\n }\n if (!this._streaming) {\n while (true) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(\n bytes,\n /**@type {!Array.}*/\n result\n );\n else\n bytes.push(result);\n }\n this._encoder = null;\n }\n return new Uint8Array(bytes);\n }\n };\n function UTF8Decoder(options) {\n var fatal = options.fatal;\n var utf8_code_point = 0, utf8_bytes_seen = 0, utf8_bytes_needed = 0, utf8_lower_boundary = 128, utf8_upper_boundary = 191;\n this.handler = function(stream, bite) {\n if (bite === end_of_stream && utf8_bytes_needed !== 0) {\n utf8_bytes_needed = 0;\n return decoderError(fatal);\n }\n if (bite === end_of_stream)\n return finished;\n if (utf8_bytes_needed === 0) {\n if (inRange2(bite, 0, 127)) {\n return bite;\n }\n if (inRange2(bite, 194, 223)) {\n utf8_bytes_needed = 1;\n utf8_code_point = bite - 192;\n } else if (inRange2(bite, 224, 239)) {\n if (bite === 224)\n utf8_lower_boundary = 160;\n if (bite === 237)\n utf8_upper_boundary = 159;\n utf8_bytes_needed = 2;\n utf8_code_point = bite - 224;\n } else if (inRange2(bite, 240, 244)) {\n if (bite === 240)\n utf8_lower_boundary = 144;\n if (bite === 244)\n utf8_upper_boundary = 143;\n utf8_bytes_needed = 3;\n utf8_code_point = bite - 240;\n } else {\n return decoderError(fatal);\n }\n utf8_code_point = utf8_code_point << 6 * utf8_bytes_needed;\n return null;\n }\n if (!inRange2(bite, utf8_lower_boundary, utf8_upper_boundary)) {\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n utf8_lower_boundary = 128;\n utf8_upper_boundary = 191;\n stream.prepend(bite);\n return decoderError(fatal);\n }\n utf8_lower_boundary = 128;\n utf8_upper_boundary = 191;\n utf8_bytes_seen += 1;\n utf8_code_point += bite - 128 << 6 * (utf8_bytes_needed - utf8_bytes_seen);\n if (utf8_bytes_seen !== utf8_bytes_needed)\n return null;\n var code_point = utf8_code_point;\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n return code_point;\n };\n }\n function UTF8Encoder(options) {\n var fatal = options.fatal;\n this.handler = function(stream, code_point) {\n if (code_point === end_of_stream)\n return finished;\n if (inRange2(code_point, 0, 127))\n return code_point;\n var count, offset2;\n if (inRange2(code_point, 128, 2047)) {\n count = 1;\n offset2 = 192;\n } else if (inRange2(code_point, 2048, 65535)) {\n count = 2;\n offset2 = 224;\n } else if (inRange2(code_point, 65536, 1114111)) {\n count = 3;\n offset2 = 240;\n }\n var bytes = [(code_point >> 6 * count) + offset2];\n while (count > 0) {\n var temp = code_point >> 6 * (count - 1);\n bytes.push(128 | temp & 63);\n count -= 1;\n }\n return bytes;\n };\n }\n exports3.TextEncoder = TextEncoder2;\n exports3.TextDecoder = TextDecoder2;\n }\n });\n\n // ../../../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js\n var require_lib = __commonJS({\n \"../../../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding = exports3 && exports3.__createBinding || (Object.create ? function(o, m, k, k2) {\n if (k2 === void 0)\n k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() {\n return m[k];\n } });\n } : function(o, m, k, k2) {\n if (k2 === void 0)\n k2 = k;\n o[k2] = m[k];\n });\n var __setModuleDefault = exports3 && exports3.__setModuleDefault || (Object.create ? function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n } : function(o, v) {\n o[\"default\"] = v;\n });\n var __decorate = exports3 && exports3.__decorate || function(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i = decorators.length - 1; i >= 0; i--)\n if (d = decorators[i])\n r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };\n var __importStar = exports3 && exports3.__importStar || function(mod2) {\n if (mod2 && mod2.__esModule)\n return mod2;\n var result = {};\n if (mod2 != null) {\n for (var k in mod2)\n if (k !== \"default\" && Object.hasOwnProperty.call(mod2, k))\n __createBinding(result, mod2, k);\n }\n __setModuleDefault(result, mod2);\n return result;\n };\n var __importDefault = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.deserializeUnchecked = exports3.deserialize = exports3.serialize = exports3.BinaryReader = exports3.BinaryWriter = exports3.BorshError = exports3.baseDecode = exports3.baseEncode = void 0;\n var bn_js_1 = __importDefault(require_bn());\n var bs58_1 = __importDefault(require_bs58());\n var encoding = __importStar(require_encoding_lib());\n var ResolvedTextDecoder = typeof TextDecoder !== \"function\" ? encoding.TextDecoder : TextDecoder;\n var textDecoder = new ResolvedTextDecoder(\"utf-8\", { fatal: true });\n function baseEncode(value) {\n if (typeof value === \"string\") {\n value = Buffer2.from(value, \"utf8\");\n }\n return bs58_1.default.encode(Buffer2.from(value));\n }\n exports3.baseEncode = baseEncode;\n function baseDecode(value) {\n return Buffer2.from(bs58_1.default.decode(value));\n }\n exports3.baseDecode = baseDecode;\n var INITIAL_LENGTH = 1024;\n var BorshError = class extends Error {\n constructor(message) {\n super(message);\n this.fieldPath = [];\n this.originalMessage = message;\n }\n addToFieldPath(fieldName) {\n this.fieldPath.splice(0, 0, fieldName);\n this.message = this.originalMessage + \": \" + this.fieldPath.join(\".\");\n }\n };\n exports3.BorshError = BorshError;\n var BinaryWriter = class {\n constructor() {\n this.buf = Buffer2.alloc(INITIAL_LENGTH);\n this.length = 0;\n }\n maybeResize() {\n if (this.buf.length < 16 + this.length) {\n this.buf = Buffer2.concat([this.buf, Buffer2.alloc(INITIAL_LENGTH)]);\n }\n }\n writeU8(value) {\n this.maybeResize();\n this.buf.writeUInt8(value, this.length);\n this.length += 1;\n }\n writeU16(value) {\n this.maybeResize();\n this.buf.writeUInt16LE(value, this.length);\n this.length += 2;\n }\n writeU32(value) {\n this.maybeResize();\n this.buf.writeUInt32LE(value, this.length);\n this.length += 4;\n }\n writeU64(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 8)));\n }\n writeU128(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 16)));\n }\n writeU256(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 32)));\n }\n writeU512(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 64)));\n }\n writeBuffer(buffer) {\n this.buf = Buffer2.concat([\n Buffer2.from(this.buf.subarray(0, this.length)),\n buffer,\n Buffer2.alloc(INITIAL_LENGTH)\n ]);\n this.length += buffer.length;\n }\n writeString(str) {\n this.maybeResize();\n const b = Buffer2.from(str, \"utf8\");\n this.writeU32(b.length);\n this.writeBuffer(b);\n }\n writeFixedArray(array2) {\n this.writeBuffer(Buffer2.from(array2));\n }\n writeArray(array2, fn) {\n this.maybeResize();\n this.writeU32(array2.length);\n for (const elem of array2) {\n this.maybeResize();\n fn(elem);\n }\n }\n toArray() {\n return this.buf.subarray(0, this.length);\n }\n };\n exports3.BinaryWriter = BinaryWriter;\n function handlingRangeError(target, propertyKey, propertyDescriptor) {\n const originalMethod = propertyDescriptor.value;\n propertyDescriptor.value = function(...args) {\n try {\n return originalMethod.apply(this, args);\n } catch (e) {\n if (e instanceof RangeError) {\n const code = e.code;\n if ([\"ERR_BUFFER_OUT_OF_BOUNDS\", \"ERR_OUT_OF_RANGE\"].indexOf(code) >= 0) {\n throw new BorshError(\"Reached the end of buffer when deserializing\");\n }\n }\n throw e;\n }\n };\n }\n var BinaryReader = class {\n constructor(buf) {\n this.buf = buf;\n this.offset = 0;\n }\n readU8() {\n const value = this.buf.readUInt8(this.offset);\n this.offset += 1;\n return value;\n }\n readU16() {\n const value = this.buf.readUInt16LE(this.offset);\n this.offset += 2;\n return value;\n }\n readU32() {\n const value = this.buf.readUInt32LE(this.offset);\n this.offset += 4;\n return value;\n }\n readU64() {\n const buf = this.readBuffer(8);\n return new bn_js_1.default(buf, \"le\");\n }\n readU128() {\n const buf = this.readBuffer(16);\n return new bn_js_1.default(buf, \"le\");\n }\n readU256() {\n const buf = this.readBuffer(32);\n return new bn_js_1.default(buf, \"le\");\n }\n readU512() {\n const buf = this.readBuffer(64);\n return new bn_js_1.default(buf, \"le\");\n }\n readBuffer(len) {\n if (this.offset + len > this.buf.length) {\n throw new BorshError(`Expected buffer length ${len} isn't within bounds`);\n }\n const result = this.buf.slice(this.offset, this.offset + len);\n this.offset += len;\n return result;\n }\n readString() {\n const len = this.readU32();\n const buf = this.readBuffer(len);\n try {\n return textDecoder.decode(buf);\n } catch (e) {\n throw new BorshError(`Error decoding UTF-8 string: ${e}`);\n }\n }\n readFixedArray(len) {\n return new Uint8Array(this.readBuffer(len));\n }\n readArray(fn) {\n const len = this.readU32();\n const result = Array();\n for (let i = 0; i < len; ++i) {\n result.push(fn());\n }\n return result;\n }\n };\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU8\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU16\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU32\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU64\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU128\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU256\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU512\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readString\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readFixedArray\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readArray\", null);\n exports3.BinaryReader = BinaryReader;\n function capitalizeFirstLetter(string2) {\n return string2.charAt(0).toUpperCase() + string2.slice(1);\n }\n function serializeField(schema, fieldName, value, fieldType, writer) {\n try {\n if (typeof fieldType === \"string\") {\n writer[`write${capitalizeFirstLetter(fieldType)}`](value);\n } else if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n if (value.length !== fieldType[0]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[0]}, but got ${value.length} bytes`);\n }\n writer.writeFixedArray(value);\n } else if (fieldType.length === 2 && typeof fieldType[1] === \"number\") {\n if (value.length !== fieldType[1]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[1]}, but got ${value.length} bytes`);\n }\n for (let i = 0; i < fieldType[1]; i++) {\n serializeField(schema, null, value[i], fieldType[0], writer);\n }\n } else {\n writer.writeArray(value, (item) => {\n serializeField(schema, fieldName, item, fieldType[0], writer);\n });\n }\n } else if (fieldType.kind !== void 0) {\n switch (fieldType.kind) {\n case \"option\": {\n if (value === null || value === void 0) {\n writer.writeU8(0);\n } else {\n writer.writeU8(1);\n serializeField(schema, fieldName, value, fieldType.type, writer);\n }\n break;\n }\n case \"map\": {\n writer.writeU32(value.size);\n value.forEach((val, key) => {\n serializeField(schema, fieldName, key, fieldType.key, writer);\n serializeField(schema, fieldName, val, fieldType.value, writer);\n });\n break;\n }\n default:\n throw new BorshError(`FieldType ${fieldType} unrecognized`);\n }\n } else {\n serializeStruct(schema, value, writer);\n }\n } catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n }\n function serializeStruct(schema, obj, writer) {\n if (typeof obj.borshSerialize === \"function\") {\n obj.borshSerialize(writer);\n return;\n }\n const structSchema = schema.get(obj.constructor);\n if (!structSchema) {\n throw new BorshError(`Class ${obj.constructor.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n structSchema.fields.map(([fieldName, fieldType]) => {\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n });\n } else if (structSchema.kind === \"enum\") {\n const name = obj[structSchema.field];\n for (let idx = 0; idx < structSchema.values.length; ++idx) {\n const [fieldName, fieldType] = structSchema.values[idx];\n if (fieldName === name) {\n writer.writeU8(idx);\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n break;\n }\n }\n } else {\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${obj.constructor.name}`);\n }\n }\n function serialize2(schema, obj, Writer = BinaryWriter) {\n const writer = new Writer();\n serializeStruct(schema, obj, writer);\n return writer.toArray();\n }\n exports3.serialize = serialize2;\n function deserializeField(schema, fieldName, fieldType, reader) {\n try {\n if (typeof fieldType === \"string\") {\n return reader[`read${capitalizeFirstLetter(fieldType)}`]();\n }\n if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n return reader.readFixedArray(fieldType[0]);\n } else if (typeof fieldType[1] === \"number\") {\n const arr = [];\n for (let i = 0; i < fieldType[1]; i++) {\n arr.push(deserializeField(schema, null, fieldType[0], reader));\n }\n return arr;\n } else {\n return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader));\n }\n }\n if (fieldType.kind === \"option\") {\n const option = reader.readU8();\n if (option) {\n return deserializeField(schema, fieldName, fieldType.type, reader);\n }\n return void 0;\n }\n if (fieldType.kind === \"map\") {\n let map = /* @__PURE__ */ new Map();\n const length = reader.readU32();\n for (let i = 0; i < length; i++) {\n const key = deserializeField(schema, fieldName, fieldType.key, reader);\n const val = deserializeField(schema, fieldName, fieldType.value, reader);\n map.set(key, val);\n }\n return map;\n }\n return deserializeStruct(schema, fieldType, reader);\n } catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n }\n function deserializeStruct(schema, classType, reader) {\n if (typeof classType.borshDeserialize === \"function\") {\n return classType.borshDeserialize(reader);\n }\n const structSchema = schema.get(classType);\n if (!structSchema) {\n throw new BorshError(`Class ${classType.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n const result = {};\n for (const [fieldName, fieldType] of schema.get(classType).fields) {\n result[fieldName] = deserializeField(schema, fieldName, fieldType, reader);\n }\n return new classType(result);\n }\n if (structSchema.kind === \"enum\") {\n const idx = reader.readU8();\n if (idx >= structSchema.values.length) {\n throw new BorshError(`Enum index: ${idx} is out of range`);\n }\n const [fieldName, fieldType] = structSchema.values[idx];\n const fieldValue = deserializeField(schema, fieldName, fieldType, reader);\n return new classType({ [fieldName]: fieldValue });\n }\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`);\n }\n function deserialize2(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n const result = deserializeStruct(schema, classType, reader);\n if (reader.offset < buffer.length) {\n throw new BorshError(`Unexpected ${buffer.length - reader.offset} bytes after deserialized data`);\n }\n return result;\n }\n exports3.deserialize = deserialize2;\n function deserializeUnchecked2(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n return deserializeStruct(schema, classType, reader);\n }\n exports3.deserializeUnchecked = deserializeUnchecked2;\n }\n });\n\n // ../../../node_modules/.pnpm/@solana+buffer-layout@4.0.1/node_modules/@solana/buffer-layout/lib/Layout.js\n var require_Layout = __commonJS({\n \"../../../node_modules/.pnpm/@solana+buffer-layout@4.0.1/node_modules/@solana/buffer-layout/lib/Layout.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.s16 = exports3.s8 = exports3.nu64be = exports3.u48be = exports3.u40be = exports3.u32be = exports3.u24be = exports3.u16be = exports3.nu64 = exports3.u48 = exports3.u40 = exports3.u32 = exports3.u24 = exports3.u16 = exports3.u8 = exports3.offset = exports3.greedy = exports3.Constant = exports3.UTF8 = exports3.CString = exports3.Blob = exports3.Boolean = exports3.BitField = exports3.BitStructure = exports3.VariantLayout = exports3.Union = exports3.UnionLayoutDiscriminator = exports3.UnionDiscriminator = exports3.Structure = exports3.Sequence = exports3.DoubleBE = exports3.Double = exports3.FloatBE = exports3.Float = exports3.NearInt64BE = exports3.NearInt64 = exports3.NearUInt64BE = exports3.NearUInt64 = exports3.IntBE = exports3.Int = exports3.UIntBE = exports3.UInt = exports3.OffsetLayout = exports3.GreedyCount = exports3.ExternalLayout = exports3.bindConstructorLayout = exports3.nameWithProperty = exports3.Layout = exports3.uint8ArrayToBuffer = exports3.checkUint8Array = void 0;\n exports3.constant = exports3.utf8 = exports3.cstr = exports3.blob = exports3.unionLayoutDiscriminator = exports3.union = exports3.seq = exports3.bits = exports3.struct = exports3.f64be = exports3.f64 = exports3.f32be = exports3.f32 = exports3.ns64be = exports3.s48be = exports3.s40be = exports3.s32be = exports3.s24be = exports3.s16be = exports3.ns64 = exports3.s48 = exports3.s40 = exports3.s32 = exports3.s24 = void 0;\n var buffer_1 = (init_buffer(), __toCommonJS(buffer_exports));\n function checkUint8Array(b) {\n if (!(b instanceof Uint8Array)) {\n throw new TypeError(\"b must be a Uint8Array\");\n }\n }\n exports3.checkUint8Array = checkUint8Array;\n function uint8ArrayToBuffer(b) {\n checkUint8Array(b);\n return buffer_1.Buffer.from(b.buffer, b.byteOffset, b.length);\n }\n exports3.uint8ArrayToBuffer = uint8ArrayToBuffer;\n var Layout = class {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError(\"span must be an integer\");\n }\n this.span = span;\n this.property = property;\n }\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Uint8Array} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset2) {\n if (0 > this.span) {\n throw new RangeError(\"indeterminate span\");\n }\n return this.span;\n }\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return void 0;\n }\n };\n exports3.Layout = Layout;\n function nameWithProperty(name, lo) {\n if (lo.property) {\n return name + \"[\" + lo.property + \"]\";\n }\n return name;\n }\n exports3.nameWithProperty = nameWithProperty;\n function bindConstructorLayout(Class, layout) {\n if (\"function\" !== typeof Class) {\n throw new TypeError(\"Class must be constructor\");\n }\n if (Object.prototype.hasOwnProperty.call(Class, \"layout_\")) {\n throw new Error(\"Class is already bound to a layout\");\n }\n if (!(layout && layout instanceof Layout)) {\n throw new TypeError(\"layout must be a Layout\");\n }\n if (Object.prototype.hasOwnProperty.call(layout, \"boundConstructor_\")) {\n throw new Error(\"layout is already bound to a constructor\");\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = () => new Class();\n Object.defineProperty(Class.prototype, \"encode\", {\n value(b, offset2) {\n return layout.encode(this, b, offset2);\n },\n writable: true\n });\n Object.defineProperty(Class, \"decode\", {\n value(b, offset2) {\n return layout.decode(b, offset2);\n },\n writable: true\n });\n }\n exports3.bindConstructorLayout = bindConstructorLayout;\n var ExternalLayout = class extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error(\"ExternalLayout is abstract\");\n }\n };\n exports3.ExternalLayout = ExternalLayout;\n var GreedyCount = class extends ExternalLayout {\n constructor(elementSpan = 1, property) {\n if (!Number.isInteger(elementSpan) || 0 >= elementSpan) {\n throw new TypeError(\"elementSpan must be a (positive) integer\");\n }\n super(-1, property);\n this.elementSpan = elementSpan;\n }\n /** @override */\n isCount() {\n return true;\n }\n /** @override */\n decode(b, offset2 = 0) {\n checkUint8Array(b);\n const rem = b.length - offset2;\n return Math.floor(rem / this.elementSpan);\n }\n /** @override */\n encode(src, b, offset2) {\n return 0;\n }\n };\n exports3.GreedyCount = GreedyCount;\n var OffsetLayout = class extends ExternalLayout {\n constructor(layout, offset2 = 0, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError(\"layout must be a Layout\");\n }\n if (!Number.isInteger(offset2)) {\n throw new TypeError(\"offset must be integer or undefined\");\n }\n super(layout.span, property || layout.property);\n this.layout = layout;\n this.offset = offset2;\n }\n /** @override */\n isCount() {\n return this.layout instanceof UInt || this.layout instanceof UIntBE;\n }\n /** @override */\n decode(b, offset2 = 0) {\n return this.layout.decode(b, offset2 + this.offset);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n return this.layout.encode(src, b, offset2 + this.offset);\n }\n };\n exports3.OffsetLayout = OffsetLayout;\n var UInt = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readUIntLE(offset2, this.span);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeUIntLE(src, offset2, this.span);\n return this.span;\n }\n };\n exports3.UInt = UInt;\n var UIntBE = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readUIntBE(offset2, this.span);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeUIntBE(src, offset2, this.span);\n return this.span;\n }\n };\n exports3.UIntBE = UIntBE;\n var Int = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readIntLE(offset2, this.span);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeIntLE(src, offset2, this.span);\n return this.span;\n }\n };\n exports3.Int = Int;\n var IntBE = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readIntBE(offset2, this.span);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeIntBE(src, offset2, this.span);\n return this.span;\n }\n };\n exports3.IntBE = IntBE;\n var V2E32 = Math.pow(2, 32);\n function divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - hi32 * V2E32;\n return { hi32, lo32 };\n }\n function roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n }\n var NearUInt64 = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset2);\n const hi32 = buffer.readUInt32LE(offset2 + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n const split2 = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split2.lo32, offset2);\n buffer.writeUInt32LE(split2.hi32, offset2 + 4);\n return 8;\n }\n };\n exports3.NearUInt64 = NearUInt64;\n var NearUInt64BE = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readUInt32BE(offset2);\n const lo32 = buffer.readUInt32BE(offset2 + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n const split2 = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32BE(split2.hi32, offset2);\n buffer.writeUInt32BE(split2.lo32, offset2 + 4);\n return 8;\n }\n };\n exports3.NearUInt64BE = NearUInt64BE;\n var NearInt64 = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset2);\n const hi32 = buffer.readInt32LE(offset2 + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n const split2 = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split2.lo32, offset2);\n buffer.writeInt32LE(split2.hi32, offset2 + 4);\n return 8;\n }\n };\n exports3.NearInt64 = NearInt64;\n var NearInt64BE = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readInt32BE(offset2);\n const lo32 = buffer.readUInt32BE(offset2 + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n const split2 = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeInt32BE(split2.hi32, offset2);\n buffer.writeUInt32BE(split2.lo32, offset2 + 4);\n return 8;\n }\n };\n exports3.NearInt64BE = NearInt64BE;\n var Float = class extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readFloatLE(offset2);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeFloatLE(src, offset2);\n return 4;\n }\n };\n exports3.Float = Float;\n var FloatBE = class extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readFloatBE(offset2);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeFloatBE(src, offset2);\n return 4;\n }\n };\n exports3.FloatBE = FloatBE;\n var Double = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readDoubleLE(offset2);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeDoubleLE(src, offset2);\n return 8;\n }\n };\n exports3.Double = Double;\n var DoubleBE = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readDoubleBE(offset2);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeDoubleBE(src, offset2);\n return 8;\n }\n };\n exports3.DoubleBE = DoubleBE;\n var Sequence = class extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError(\"elementLayout must be a Layout\");\n }\n if (!(count instanceof ExternalLayout && count.isCount() || Number.isInteger(count) && 0 <= count)) {\n throw new TypeError(\"count must be non-negative integer or an unsigned integer ExternalLayout\");\n }\n let span = -1;\n if (!(count instanceof ExternalLayout) && 0 < elementLayout.span) {\n span = count * elementLayout.span;\n }\n super(span, property);\n this.elementLayout = elementLayout;\n this.count = count;\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset2);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n } else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b, offset2 + span);\n ++idx;\n }\n }\n return span;\n }\n /** @override */\n decode(b, offset2 = 0) {\n const rv = [];\n let i = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset2);\n }\n while (i < count) {\n rv.push(this.elementLayout.decode(b, offset2));\n offset2 += this.elementLayout.getSpan(b, offset2);\n i += 1;\n }\n return rv;\n }\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset2 = 0) {\n const elo = this.elementLayout;\n const span = src.reduce((span2, v) => {\n return span2 + elo.encode(v, b, offset2 + span2);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b, offset2);\n }\n return span;\n }\n };\n exports3.Sequence = Sequence;\n var Structure = class extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields) && fields.reduce((acc, v) => acc && v instanceof Layout, true))) {\n throw new TypeError(\"fields must be array of Layout instances\");\n }\n if (\"boolean\" === typeof property && void 0 === decodePrefixes) {\n decodePrefixes = property;\n property = void 0;\n }\n for (const fd of fields) {\n if (0 > fd.span && void 0 === fd.property) {\n throw new Error(\"fields cannot contain unnamed variable-length layout\");\n }\n }\n let span = -1;\n try {\n span = fields.reduce((span2, fd) => span2 + fd.getSpan(), 0);\n } catch (e) {\n }\n super(span, property);\n this.fields = fields;\n this.decodePrefixes = !!decodePrefixes;\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span2, fd) => {\n const fsp = fd.getSpan(b, offset2);\n offset2 += fsp;\n return span2 + fsp;\n }, 0);\n } catch (e) {\n throw new RangeError(\"indeterminate span\");\n }\n return span;\n }\n /** @override */\n decode(b, offset2 = 0) {\n checkUint8Array(b);\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (void 0 !== fd.property) {\n dest[fd.property] = fd.decode(b, offset2);\n }\n offset2 += fd.getSpan(b, offset2);\n if (this.decodePrefixes && b.length === offset2) {\n break;\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset2 = 0) {\n const firstOffset = offset2;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = 0 < span ? span : 0;\n if (void 0 !== fd.property) {\n const fv = src[fd.property];\n if (void 0 !== fv) {\n lastWrote = fd.encode(fv, b, offset2);\n if (0 > span) {\n span = fd.getSpan(b, offset2);\n }\n }\n }\n lastOffset = offset2;\n offset2 += span;\n }\n return lastOffset + lastWrote - firstOffset;\n }\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (void 0 !== fd.property && 0 < values.length) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if (\"string\" !== typeof property) {\n throw new TypeError(\"property must be string\");\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return void 0;\n }\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if (\"string\" !== typeof property) {\n throw new TypeError(\"property must be string\");\n }\n let offset2 = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset2;\n }\n if (0 > fd.span) {\n offset2 = -1;\n } else if (0 <= offset2) {\n offset2 += fd.span;\n }\n }\n return void 0;\n }\n };\n exports3.Structure = Structure;\n var UnionDiscriminator = class {\n constructor(property) {\n this.property = property;\n }\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode(b, offset2) {\n throw new Error(\"UnionDiscriminator is abstract\");\n }\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode(src, b, offset2) {\n throw new Error(\"UnionDiscriminator is abstract\");\n }\n };\n exports3.UnionDiscriminator = UnionDiscriminator;\n var UnionLayoutDiscriminator = class extends UnionDiscriminator {\n constructor(layout, property) {\n if (!(layout instanceof ExternalLayout && layout.isCount())) {\n throw new TypeError(\"layout must be an unsigned integer ExternalLayout\");\n }\n super(property || layout.property || \"variant\");\n this.layout = layout;\n }\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset2) {\n return this.layout.decode(b, offset2);\n }\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset2) {\n return this.layout.encode(src, b, offset2);\n }\n };\n exports3.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\n var Union = class extends Layout {\n constructor(discr, defaultLayout, property) {\n let discriminator;\n if (discr instanceof UInt || discr instanceof UIntBE) {\n discriminator = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n } else if (discr instanceof ExternalLayout && discr.isCount()) {\n discriminator = new UnionLayoutDiscriminator(discr);\n } else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError(\"discr must be a UnionDiscriminator or an unsigned integer layout\");\n } else {\n discriminator = discr;\n }\n if (void 0 === defaultLayout) {\n defaultLayout = null;\n }\n if (!(null === defaultLayout || defaultLayout instanceof Layout)) {\n throw new TypeError(\"defaultLayout must be null or a Layout\");\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error(\"defaultLayout must have constant span\");\n }\n if (void 0 === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate(\"content\");\n }\n }\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if (0 <= span && (discr instanceof UInt || discr instanceof UIntBE)) {\n span += discriminator.layout.span;\n }\n }\n super(span, property);\n this.discriminator = discriminator;\n this.usesPrefixDiscriminator = discr instanceof UInt || discr instanceof UIntBE;\n this.defaultLayout = defaultLayout;\n this.registry = {};\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n this.getSourceVariant = function(src) {\n return boundGetSourceVariant(src);\n };\n this.configGetSourceVariant = function(gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n const vlo = this.getVariant(b, offset2);\n if (!vlo) {\n throw new Error(\"unable to determine span for unrecognized variant\");\n }\n return vlo.getSpan(b, offset2);\n }\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisfied rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (Object.prototype.hasOwnProperty.call(src, this.discriminator.property)) {\n if (this.defaultLayout && this.defaultLayout.property && Object.prototype.hasOwnProperty.call(src, this.defaultLayout.property)) {\n return void 0;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo && (!vlo.layout || vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property))) {\n return vlo;\n }\n } else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error(\"unable to infer src variant\");\n }\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset2 = 0) {\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset2);\n const clo = this.registry[discr];\n if (void 0 === clo) {\n const defaultLayout = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n dest[defaultLayout.property] = defaultLayout.decode(b, offset2 + contentOffset);\n } else {\n dest = clo.decode(b, offset2);\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset2 = 0) {\n const vlo = this.getSourceVariant(src);\n if (void 0 === vlo) {\n const dlo = this.discriminator;\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset2);\n return contentOffset + clo.encode(src[clo.property], b, offset2 + contentOffset);\n }\n return vlo.encode(src, b, offset2);\n }\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Uint8Array)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Uint8Array}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset2 = 0) {\n let variant;\n if (vb instanceof Uint8Array) {\n variant = this.discriminator.decode(vb, offset2);\n } else {\n variant = vb;\n }\n return this.registry[variant];\n }\n };\n exports3.Union = Union;\n var VariantLayout = class extends Layout {\n constructor(union2, variant, layout, property) {\n if (!(union2 instanceof Union)) {\n throw new TypeError(\"union must be a Union\");\n }\n if (!Number.isInteger(variant) || 0 > variant) {\n throw new TypeError(\"variant must be a (non-negative) integer\");\n }\n if (\"string\" === typeof layout && void 0 === property) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError(\"layout must be a Layout\");\n }\n if (null !== union2.defaultLayout && 0 <= layout.span && layout.span > union2.defaultLayout.span) {\n throw new Error(\"variant span exceeds span of containing union\");\n }\n if (\"string\" !== typeof property) {\n throw new TypeError(\"variant must have a String property\");\n }\n }\n let span = union2.span;\n if (0 > union2.span) {\n span = layout ? layout.span : 0;\n if (0 <= span && union2.usesPrefixDiscriminator) {\n span += union2.discriminator.layout.span;\n }\n }\n super(span, property);\n this.union = union2;\n this.variant = variant;\n this.layout = layout || null;\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n let span = 0;\n if (this.layout) {\n span = this.layout.getSpan(b, offset2 + contentOffset);\n }\n return contentOffset + span;\n }\n /** @override */\n decode(b, offset2 = 0) {\n const dest = this.makeDestinationObject();\n if (this !== this.union.getVariant(b, offset2)) {\n throw new Error(\"variant mismatch\");\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset2 + contentOffset);\n } else if (this.property) {\n dest[this.property] = true;\n } else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout && !Object.prototype.hasOwnProperty.call(src, this.property)) {\n throw new TypeError(\"variant lacks property \" + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset2);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset2 + contentOffset);\n span += this.layout.getSpan(b, offset2 + contentOffset);\n if (0 <= this.union.span && span > this.union.span) {\n throw new Error(\"encoded variant overruns containing union\");\n }\n }\n return span;\n }\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n return void 0;\n }\n };\n exports3.VariantLayout = VariantLayout;\n function fixBitwiseResult(v) {\n if (0 > v) {\n v += 4294967296;\n }\n return v;\n }\n var BitStructure = class extends Layout {\n constructor(word, msb, property) {\n if (!(word instanceof UInt || word instanceof UIntBE)) {\n throw new TypeError(\"word must be a UInt or UIntBE layout\");\n }\n if (\"string\" === typeof msb && void 0 === property) {\n property = msb;\n msb = false;\n }\n if (4 < word.span) {\n throw new RangeError(\"word cannot exceed 32 bits\");\n }\n super(word.span, property);\n this.word = word;\n this.msb = !!msb;\n this.fields = [];\n let value = 0;\n this._packedSetValue = function(v) {\n value = fixBitwiseResult(v);\n return this;\n };\n this._packedGetValue = function() {\n return value;\n };\n }\n /** @override */\n decode(b, offset2 = 0) {\n const dest = this.makeDestinationObject();\n const value = this.word.decode(b, offset2);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (void 0 !== fd.property) {\n dest[fd.property] = fd.decode(b);\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b, offset2 = 0) {\n const value = this.word.decode(b, offset2);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (void 0 !== fd.property) {\n const fv = src[fd.property];\n if (void 0 !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b, offset2);\n }\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n // `Boolean` conflicts with the native primitive type\n // eslint-disable-next-line @typescript-eslint/ban-types\n addBoolean(property) {\n const bf = new Boolean2(this, property);\n this.fields.push(bf);\n return bf;\n }\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if (\"string\" !== typeof property) {\n throw new TypeError(\"property must be string\");\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return void 0;\n }\n };\n exports3.BitStructure = BitStructure;\n var BitField = class {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError(\"container must be a BitStructure\");\n }\n if (!Number.isInteger(bits) || 0 >= bits) {\n throw new TypeError(\"bits must be positive integer\");\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if (bits + usedBits > totalBits) {\n throw new Error(\"bits too long for span remainder (\" + (totalBits - usedBits) + \" of \" + totalBits + \" remain)\");\n }\n this.container = container;\n this.bits = bits;\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) {\n this.valueMask = 4294967295;\n }\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n this.property = property;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode(b, offset2) {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if (\"number\" !== typeof value || !Number.isInteger(value) || value !== fixBitwiseResult(value & this.valueMask)) {\n throw new TypeError(nameWithProperty(\"BitField.encode\", this) + \" value must be integer not exceeding \" + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask) | wordValue);\n }\n };\n exports3.BitField = BitField;\n var Boolean2 = class extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b, offset2) {\n return !!super.decode(b, offset2);\n }\n /** @override */\n encode(value) {\n if (\"boolean\" === typeof value) {\n value = +value;\n }\n super.encode(value);\n }\n };\n exports3.Boolean = Boolean2;\n var Blob = class extends Layout {\n constructor(length, property) {\n if (!(length instanceof ExternalLayout && length.isCount() || Number.isInteger(length) && 0 <= length)) {\n throw new TypeError(\"length must be positive integer or an unsigned integer ExternalLayout\");\n }\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n this.length = length;\n }\n /** @override */\n getSpan(b, offset2) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset2);\n }\n return span;\n }\n /** @override */\n decode(b, offset2 = 0) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset2);\n }\n return uint8ArrayToBuffer(b).slice(offset2, offset2 + span);\n }\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset2) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(src instanceof Uint8Array && span === src.length)) {\n throw new TypeError(nameWithProperty(\"Blob.encode\", this) + \" requires (length \" + span + \") Uint8Array as src\");\n }\n if (offset2 + span > b.length) {\n throw new RangeError(\"encoding overruns Uint8Array\");\n }\n const srcBuffer = uint8ArrayToBuffer(src);\n uint8ArrayToBuffer(b).write(srcBuffer.toString(\"hex\"), offset2, span, \"hex\");\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset2);\n }\n return span;\n }\n };\n exports3.Blob = Blob;\n var CString = class extends Layout {\n constructor(property) {\n super(-1, property);\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n checkUint8Array(b);\n let idx = offset2;\n while (idx < b.length && 0 !== b[idx]) {\n idx += 1;\n }\n return 1 + idx - offset2;\n }\n /** @override */\n decode(b, offset2 = 0) {\n const span = this.getSpan(b, offset2);\n return uint8ArrayToBuffer(b).slice(offset2, offset2 + span - 1).toString(\"utf-8\");\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n if (\"string\" !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, \"utf8\");\n const span = srcb.length;\n if (offset2 + span > b.length) {\n throw new RangeError(\"encoding overruns Buffer\");\n }\n const buffer = uint8ArrayToBuffer(b);\n srcb.copy(buffer, offset2);\n buffer[offset2 + span] = 0;\n return span + 1;\n }\n };\n exports3.CString = CString;\n var UTF8 = class extends Layout {\n constructor(maxSpan, property) {\n if (\"string\" === typeof maxSpan && void 0 === property) {\n property = maxSpan;\n maxSpan = void 0;\n }\n if (void 0 === maxSpan) {\n maxSpan = -1;\n } else if (!Number.isInteger(maxSpan)) {\n throw new TypeError(\"maxSpan must be an integer\");\n }\n super(-1, property);\n this.maxSpan = maxSpan;\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n checkUint8Array(b);\n return b.length - offset2;\n }\n /** @override */\n decode(b, offset2 = 0) {\n const span = this.getSpan(b, offset2);\n if (0 <= this.maxSpan && this.maxSpan < span) {\n throw new RangeError(\"text length exceeds maxSpan\");\n }\n return uint8ArrayToBuffer(b).slice(offset2, offset2 + span).toString(\"utf-8\");\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n if (\"string\" !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, \"utf8\");\n const span = srcb.length;\n if (0 <= this.maxSpan && this.maxSpan < span) {\n throw new RangeError(\"text length exceeds maxSpan\");\n }\n if (offset2 + span > b.length) {\n throw new RangeError(\"encoding overruns Buffer\");\n }\n srcb.copy(uint8ArrayToBuffer(b), offset2);\n return span;\n }\n };\n exports3.UTF8 = UTF8;\n var Constant = class extends Layout {\n constructor(value, property) {\n super(0, property);\n this.value = value;\n }\n /** @override */\n decode(b, offset2) {\n return this.value;\n }\n /** @override */\n encode(src, b, offset2) {\n return 0;\n }\n };\n exports3.Constant = Constant;\n exports3.greedy = (elementSpan, property) => new GreedyCount(elementSpan, property);\n exports3.offset = (layout, offset2, property) => new OffsetLayout(layout, offset2, property);\n exports3.u8 = (property) => new UInt(1, property);\n exports3.u16 = (property) => new UInt(2, property);\n exports3.u24 = (property) => new UInt(3, property);\n exports3.u32 = (property) => new UInt(4, property);\n exports3.u40 = (property) => new UInt(5, property);\n exports3.u48 = (property) => new UInt(6, property);\n exports3.nu64 = (property) => new NearUInt64(property);\n exports3.u16be = (property) => new UIntBE(2, property);\n exports3.u24be = (property) => new UIntBE(3, property);\n exports3.u32be = (property) => new UIntBE(4, property);\n exports3.u40be = (property) => new UIntBE(5, property);\n exports3.u48be = (property) => new UIntBE(6, property);\n exports3.nu64be = (property) => new NearUInt64BE(property);\n exports3.s8 = (property) => new Int(1, property);\n exports3.s16 = (property) => new Int(2, property);\n exports3.s24 = (property) => new Int(3, property);\n exports3.s32 = (property) => new Int(4, property);\n exports3.s40 = (property) => new Int(5, property);\n exports3.s48 = (property) => new Int(6, property);\n exports3.ns64 = (property) => new NearInt64(property);\n exports3.s16be = (property) => new IntBE(2, property);\n exports3.s24be = (property) => new IntBE(3, property);\n exports3.s32be = (property) => new IntBE(4, property);\n exports3.s40be = (property) => new IntBE(5, property);\n exports3.s48be = (property) => new IntBE(6, property);\n exports3.ns64be = (property) => new NearInt64BE(property);\n exports3.f32 = (property) => new Float(property);\n exports3.f32be = (property) => new FloatBE(property);\n exports3.f64 = (property) => new Double(property);\n exports3.f64be = (property) => new DoubleBE(property);\n exports3.struct = (fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes);\n exports3.bits = (word, msb, property) => new BitStructure(word, msb, property);\n exports3.seq = (elementLayout, count, property) => new Sequence(elementLayout, count, property);\n exports3.union = (discr, defaultLayout, property) => new Union(discr, defaultLayout, property);\n exports3.unionLayoutDiscriminator = (layout, property) => new UnionLayoutDiscriminator(layout, property);\n exports3.blob = (length, property) => new Blob(length, property);\n exports3.cstr = (property) => new CString(property);\n exports3.utf8 = (maxSpan, property) => new UTF8(maxSpan, property);\n exports3.constant = (value, property) => new Constant(value, property);\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js\n function rng() {\n if (!getRandomValues) {\n getRandomValues = typeof crypto !== \"undefined\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== \"undefined\" && typeof msCrypto.getRandomValues === \"function\" && msCrypto.getRandomValues.bind(msCrypto);\n if (!getRandomValues) {\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n }\n }\n return getRandomValues(rnds8);\n }\n var getRandomValues, rnds8;\n var init_rng = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n rnds8 = new Uint8Array(16);\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js\n var regex_default;\n var init_regex = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js\n function validate2(uuid) {\n return typeof uuid === \"string\" && regex_default.test(uuid);\n }\n var validate_default;\n var init_validate = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n validate_default = validate2;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js\n function stringify(arr) {\n var offset2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;\n var uuid = (byteToHex[arr[offset2 + 0]] + byteToHex[arr[offset2 + 1]] + byteToHex[arr[offset2 + 2]] + byteToHex[arr[offset2 + 3]] + \"-\" + byteToHex[arr[offset2 + 4]] + byteToHex[arr[offset2 + 5]] + \"-\" + byteToHex[arr[offset2 + 6]] + byteToHex[arr[offset2 + 7]] + \"-\" + byteToHex[arr[offset2 + 8]] + byteToHex[arr[offset2 + 9]] + \"-\" + byteToHex[arr[offset2 + 10]] + byteToHex[arr[offset2 + 11]] + byteToHex[arr[offset2 + 12]] + byteToHex[arr[offset2 + 13]] + byteToHex[arr[offset2 + 14]] + byteToHex[arr[offset2 + 15]]).toLowerCase();\n if (!validate_default(uuid)) {\n throw TypeError(\"Stringified UUID is invalid\");\n }\n return uuid;\n }\n var byteToHex, i, stringify_default;\n var init_stringify = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_validate();\n byteToHex = [];\n for (i = 0; i < 256; ++i) {\n byteToHex.push((i + 256).toString(16).substr(1));\n }\n stringify_default = stringify;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js\n function v1(options, buf, offset2) {\n var i = buf && offset2 || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq;\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n if (node == null) {\n node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n if (clockseq == null) {\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383;\n }\n }\n var msecs = options.msecs !== void 0 ? options.msecs : Date.now();\n var nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1;\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;\n if (dt < 0 && options.clockseq === void 0) {\n clockseq = clockseq + 1 & 16383;\n }\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) {\n nsecs = 0;\n }\n if (nsecs >= 1e4) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n msecs += 122192928e5;\n var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;\n b[i++] = tl >>> 24 & 255;\n b[i++] = tl >>> 16 & 255;\n b[i++] = tl >>> 8 & 255;\n b[i++] = tl & 255;\n var tmh = msecs / 4294967296 * 1e4 & 268435455;\n b[i++] = tmh >>> 8 & 255;\n b[i++] = tmh & 255;\n b[i++] = tmh >>> 24 & 15 | 16;\n b[i++] = tmh >>> 16 & 255;\n b[i++] = clockseq >>> 8 | 128;\n b[i++] = clockseq & 255;\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n return buf || stringify_default(b);\n }\n var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default;\n var init_v1 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_rng();\n init_stringify();\n _lastMSecs = 0;\n _lastNSecs = 0;\n v1_default = v1;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js\n function parse(uuid) {\n if (!validate_default(uuid)) {\n throw TypeError(\"Invalid UUID\");\n }\n var v;\n var arr = new Uint8Array(16);\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 255;\n arr[2] = v >>> 8 & 255;\n arr[3] = v & 255;\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 255;\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 255;\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 255;\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255;\n arr[11] = v / 4294967296 & 255;\n arr[12] = v >>> 24 & 255;\n arr[13] = v >>> 16 & 255;\n arr[14] = v >>> 8 & 255;\n arr[15] = v & 255;\n return arr;\n }\n var parse_default;\n var init_parse = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_validate();\n parse_default = parse;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js\n function stringToBytes(str) {\n str = unescape(encodeURIComponent(str));\n var bytes = [];\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n return bytes;\n }\n function v35_default(name, version2, hashfunc) {\n function generateUUID(value, namespace, buf, offset2) {\n if (typeof value === \"string\") {\n value = stringToBytes(value);\n }\n if (typeof namespace === \"string\") {\n namespace = parse_default(namespace);\n }\n if (namespace.length !== 16) {\n throw TypeError(\"Namespace must be array-like (16 iterable integer values, 0-255)\");\n }\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 15 | version2;\n bytes[8] = bytes[8] & 63 | 128;\n if (buf) {\n offset2 = offset2 || 0;\n for (var i = 0; i < 16; ++i) {\n buf[offset2 + i] = bytes[i];\n }\n return buf;\n }\n return stringify_default(bytes);\n }\n try {\n generateUUID.name = name;\n } catch (err) {\n }\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n }\n var DNS, URL;\n var init_v35 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n init_parse();\n DNS = \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\";\n URL = \"6ba7b811-9dad-11d1-80b4-00c04fd430c8\";\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js\n function md5(bytes) {\n if (typeof bytes === \"string\") {\n var msg = unescape(encodeURIComponent(bytes));\n bytes = new Uint8Array(msg.length);\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n }\n function md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = \"0123456789abcdef\";\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 255;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 15) + hexTab.charAt(x & 15), 16);\n output.push(hex);\n }\n return output;\n }\n function getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n }\n function wordsToMd5(x, len) {\n x[len >> 5] |= 128 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n return [a, b, c, d];\n }\n function bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 255) << i % 32;\n }\n return output;\n }\n function safeAdd(x, y) {\n var lsw = (x & 65535) + (y & 65535);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 65535;\n }\n function bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n }\n function md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n }\n function md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n }\n function md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n }\n function md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n }\n function md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n }\n var md5_default;\n var init_md5 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n md5_default = md5;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js\n var v3, v3_default;\n var init_v3 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v35();\n init_md5();\n v3 = v35_default(\"v3\", 48, md5_default);\n v3_default = v3;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js\n function v4(options, buf, offset2) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)();\n rnds[6] = rnds[6] & 15 | 64;\n rnds[8] = rnds[8] & 63 | 128;\n if (buf) {\n offset2 = offset2 || 0;\n for (var i = 0; i < 16; ++i) {\n buf[offset2 + i] = rnds[i];\n }\n return buf;\n }\n return stringify_default(rnds);\n }\n var v4_default;\n var init_v4 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_rng();\n init_stringify();\n v4_default = v4;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js\n function f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n case 1:\n return x ^ y ^ z;\n case 2:\n return x & y ^ x & z ^ y & z;\n case 3:\n return x ^ y ^ z;\n }\n }\n function ROTL(x, n) {\n return x << n | x >>> 32 - n;\n }\n function sha1(bytes) {\n var K = [1518500249, 1859775393, 2400959708, 3395469782];\n var H = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];\n if (typeof bytes === \"string\") {\n var msg = unescape(encodeURIComponent(bytes));\n bytes = [];\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n bytes = Array.prototype.slice.call(bytes);\n }\n bytes.push(128);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n M[_i] = arr;\n }\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 4294967295;\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n return [H[0] >> 24 & 255, H[0] >> 16 & 255, H[0] >> 8 & 255, H[0] & 255, H[1] >> 24 & 255, H[1] >> 16 & 255, H[1] >> 8 & 255, H[1] & 255, H[2] >> 24 & 255, H[2] >> 16 & 255, H[2] >> 8 & 255, H[2] & 255, H[3] >> 24 & 255, H[3] >> 16 & 255, H[3] >> 8 & 255, H[3] & 255, H[4] >> 24 & 255, H[4] >> 16 & 255, H[4] >> 8 & 255, H[4] & 255];\n }\n var sha1_default;\n var init_sha1 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n sha1_default = sha1;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js\n var v5, v5_default;\n var init_v5 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v35();\n init_sha1();\n v5 = v35_default(\"v5\", 80, sha1_default);\n v5_default = v5;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js\n var nil_default;\n var init_nil = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n nil_default = \"00000000-0000-0000-0000-000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js\n function version(uuid) {\n if (!validate_default(uuid)) {\n throw TypeError(\"Invalid UUID\");\n }\n return parseInt(uuid.substr(14, 1), 16);\n }\n var version_default;\n var init_version = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_validate();\n version_default = version;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/index.js\n var esm_browser_exports = {};\n __export(esm_browser_exports, {\n NIL: () => nil_default,\n parse: () => parse_default,\n stringify: () => stringify_default,\n v1: () => v1_default,\n v3: () => v3_default,\n v4: () => v4_default,\n v5: () => v5_default,\n validate: () => validate_default,\n version: () => version_default\n });\n var init_esm_browser = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v1();\n init_v3();\n init_v4();\n init_v5();\n init_nil();\n init_version();\n init_validate();\n init_stringify();\n init_parse();\n }\n });\n\n // ../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/generateRequest.js\n var require_generateRequest = __commonJS({\n \"../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/generateRequest.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var uuid = (init_esm_browser(), __toCommonJS(esm_browser_exports)).v4;\n var generateRequest = function(method, params, id, options) {\n if (typeof method !== \"string\") {\n throw new TypeError(method + \" must be a string\");\n }\n options = options || {};\n const version2 = typeof options.version === \"number\" ? options.version : 2;\n if (version2 !== 1 && version2 !== 2) {\n throw new TypeError(version2 + \" must be 1 or 2\");\n }\n const request = {\n method\n };\n if (version2 === 2) {\n request.jsonrpc = \"2.0\";\n }\n if (params) {\n if (typeof params !== \"object\" && !Array.isArray(params)) {\n throw new TypeError(params + \" must be an object, array or omitted\");\n }\n request.params = params;\n }\n if (typeof id === \"undefined\") {\n const generator = typeof options.generator === \"function\" ? options.generator : function() {\n return uuid();\n };\n request.id = generator(request, options);\n } else if (version2 === 2 && id === null) {\n if (options.notificationIdNull) {\n request.id = null;\n }\n } else {\n request.id = id;\n }\n return request;\n };\n module.exports = generateRequest;\n }\n });\n\n // ../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/client/browser/index.js\n var require_browser = __commonJS({\n \"../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/client/browser/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var uuid = (init_esm_browser(), __toCommonJS(esm_browser_exports)).v4;\n var generateRequest = require_generateRequest();\n var ClientBrowser = function(callServer, options) {\n if (!(this instanceof ClientBrowser)) {\n return new ClientBrowser(callServer, options);\n }\n if (!options) {\n options = {};\n }\n this.options = {\n reviver: typeof options.reviver !== \"undefined\" ? options.reviver : null,\n replacer: typeof options.replacer !== \"undefined\" ? options.replacer : null,\n generator: typeof options.generator !== \"undefined\" ? options.generator : function() {\n return uuid();\n },\n version: typeof options.version !== \"undefined\" ? options.version : 2,\n notificationIdNull: typeof options.notificationIdNull === \"boolean\" ? options.notificationIdNull : false\n };\n this.callServer = callServer;\n };\n module.exports = ClientBrowser;\n ClientBrowser.prototype.request = function(method, params, id, callback) {\n const self = this;\n let request = null;\n const isBatch = Array.isArray(method) && typeof params === \"function\";\n if (this.options.version === 1 && isBatch) {\n throw new TypeError(\"JSON-RPC 1.0 does not support batching\");\n }\n const isRaw = !isBatch && method && typeof method === \"object\" && typeof params === \"function\";\n if (isBatch || isRaw) {\n callback = params;\n request = method;\n } else {\n if (typeof id === \"function\") {\n callback = id;\n id = void 0;\n }\n const hasCallback = typeof callback === \"function\";\n try {\n request = generateRequest(method, params, id, {\n generator: this.options.generator,\n version: this.options.version,\n notificationIdNull: this.options.notificationIdNull\n });\n } catch (err) {\n if (hasCallback) {\n return callback(err);\n }\n throw err;\n }\n if (!hasCallback) {\n return request;\n }\n }\n let message;\n try {\n message = JSON.stringify(request, this.options.replacer);\n } catch (err) {\n return callback(err);\n }\n this.callServer(message, function(err, response) {\n self._parseResponse(err, response, callback);\n });\n return request;\n };\n ClientBrowser.prototype._parseResponse = function(err, responseText, callback) {\n if (err) {\n callback(err);\n return;\n }\n if (!responseText) {\n return callback();\n }\n let response;\n try {\n response = JSON.parse(responseText, this.options.reviver);\n } catch (err2) {\n return callback(err2);\n }\n if (callback.length === 3) {\n if (Array.isArray(response)) {\n const isError = function(res) {\n return typeof res.error !== \"undefined\";\n };\n const isNotError = function(res) {\n return !isError(res);\n };\n return callback(null, response.filter(isError), response.filter(isNotError));\n } else {\n return callback(null, response.error, response.result);\n }\n }\n callback(null, response);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js\n var require_eventemitter3 = __commonJS({\n \"../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var has = Object.prototype.hasOwnProperty;\n var prefix = \"~\";\n function Events() {\n }\n if (Object.create) {\n Events.prototype = /* @__PURE__ */ Object.create(null);\n if (!new Events().__proto__)\n prefix = false;\n }\n function EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n }\n function addListener(emitter, event, fn, context, once) {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"The listener must be a function\");\n }\n var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event;\n if (!emitter._events[evt])\n emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn)\n emitter._events[evt].push(listener);\n else\n emitter._events[evt] = [emitter._events[evt], listener];\n return emitter;\n }\n function clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0)\n emitter._events = new Events();\n else\n delete emitter._events[evt];\n }\n function EventEmitter2() {\n this._events = new Events();\n this._eventsCount = 0;\n }\n EventEmitter2.prototype.eventNames = function eventNames() {\n var names = [], events, name;\n if (this._eventsCount === 0)\n return names;\n for (name in events = this._events) {\n if (has.call(events, name))\n names.push(prefix ? name.slice(1) : name);\n }\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n return names;\n };\n EventEmitter2.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event, handlers = this._events[evt];\n if (!handlers)\n return [];\n if (handlers.fn)\n return [handlers.fn];\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n return ee;\n };\n EventEmitter2.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event, listeners = this._events[evt];\n if (!listeners)\n return 0;\n if (listeners.fn)\n return 1;\n return listeners.length;\n };\n EventEmitter2.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n if (!this._events[evt])\n return false;\n var listeners = this._events[evt], len = arguments.length, args, i;\n if (listeners.fn) {\n if (listeners.once)\n this.removeListener(event, listeners.fn, void 0, true);\n switch (len) {\n case 1:\n return listeners.fn.call(listeners.context), true;\n case 2:\n return listeners.fn.call(listeners.context, a1), true;\n case 3:\n return listeners.fn.call(listeners.context, a1, a2), true;\n case 4:\n return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5:\n return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6:\n return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n for (i = 1, args = new Array(len - 1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length, j;\n for (i = 0; i < length; i++) {\n if (listeners[i].once)\n this.removeListener(event, listeners[i].fn, void 0, true);\n switch (len) {\n case 1:\n listeners[i].fn.call(listeners[i].context);\n break;\n case 2:\n listeners[i].fn.call(listeners[i].context, a1);\n break;\n case 3:\n listeners[i].fn.call(listeners[i].context, a1, a2);\n break;\n case 4:\n listeners[i].fn.call(listeners[i].context, a1, a2, a3);\n break;\n default:\n if (!args)\n for (j = 1, args = new Array(len - 1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n return true;\n };\n EventEmitter2.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n };\n EventEmitter2.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n };\n EventEmitter2.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n if (!this._events[evt])\n return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n var listeners = this._events[evt];\n if (listeners.fn) {\n if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) {\n events.push(listeners[i]);\n }\n }\n if (events.length)\n this._events[evt] = events.length === 1 ? events[0] : events;\n else\n clearEvent(this, evt);\n }\n return this;\n };\n EventEmitter2.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt])\n clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n return this;\n };\n EventEmitter2.prototype.off = EventEmitter2.prototype.removeListener;\n EventEmitter2.prototype.addListener = EventEmitter2.prototype.on;\n EventEmitter2.prefixed = prefix;\n EventEmitter2.EventEmitter = EventEmitter2;\n if (\"undefined\" !== typeof module) {\n module.exports = EventEmitter2;\n }\n }\n });\n\n // src/lib/lit-actions/self-executing-actions/common/batchGenerateEncryptedKeys.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/lit-actions/litActionHandler.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/lit-actions/abortError.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var AbortError = class extends Error {\n name = \"AbortError\";\n };\n\n // src/lib/lit-actions/litActionHandler.ts\n async function litActionHandler(actionFunc) {\n try {\n const litActionResult = await actionFunc();\n const response = typeof litActionResult === \"string\" ? litActionResult : JSON.stringify(litActionResult);\n Lit.Actions.setResponse({ response });\n } catch (err) {\n if (err instanceof AbortError) {\n return;\n }\n Lit.Actions.setResponse({ response: `Error: ${err.message}` });\n }\n }\n\n // src/lib/lit-actions/raw-action-functions/common/batchGenerateEncryptedKeys.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/lit-actions/internal/common/encryptKey.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/constants.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var LIT_PREFIX = \"lit_\";\n\n // src/lib/lit-actions/internal/common/encryptKey.ts\n async function encryptPrivateKey({\n accessControlConditions: accessControlConditions2,\n privateKey,\n publicKey: publicKey2\n }) {\n const { ciphertext, dataToEncryptHash } = await Lit.Actions.encrypt({\n accessControlConditions: accessControlConditions2,\n to_encrypt: new TextEncoder().encode(LIT_PREFIX + privateKey)\n });\n return {\n ciphertext,\n dataToEncryptHash,\n publicKey: publicKey2\n };\n }\n\n // src/lib/lit-actions/internal/solana/generatePrivateKey.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n init_dirname();\n init_buffer2();\n init_process2();\n init_buffer();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/ed25519.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/crypto.js\n init_dirname();\n init_buffer2();\n init_process2();\n var crypto2 = typeof globalThis === \"object\" && \"crypto\" in globalThis ? globalThis.crypto : void 0;\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js\n function isBytes(a) {\n return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === \"Uint8Array\";\n }\n function anumber(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(\"positive integer expected, got \" + n);\n }\n function abytes(b, ...lengths) {\n if (!isBytes(b))\n throw new Error(\"Uint8Array expected\");\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(\"Uint8Array expected of length \" + lengths + \", got length=\" + b.length);\n }\n function ahash(h) {\n if (typeof h !== \"function\" || typeof h.create !== \"function\")\n throw new Error(\"Hash should be wrapped by utils.createHasher\");\n anumber(h.outputLen);\n anumber(h.blockLen);\n }\n function aexists(instance2, checkFinished = true) {\n if (instance2.destroyed)\n throw new Error(\"Hash instance has been destroyed\");\n if (checkFinished && instance2.finished)\n throw new Error(\"Hash#digest() has already been called\");\n }\n function aoutput(out, instance2) {\n abytes(out);\n const min = instance2.outputLen;\n if (out.length < min) {\n throw new Error(\"digestInto() expects output buffer of length at least \" + min);\n }\n }\n function u32(arr) {\n return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n }\n function clean(...arrays) {\n for (let i = 0; i < arrays.length; i++) {\n arrays[i].fill(0);\n }\n }\n function createView(arr) {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n }\n function rotr(word, shift) {\n return word << 32 - shift | word >>> shift;\n }\n var isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();\n function byteSwap(word) {\n return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;\n }\n function byteSwap32(arr) {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = byteSwap(arr[i]);\n }\n return arr;\n }\n var swap32IfBE = isLE ? (u) => u : byteSwap32;\n var hasHexBuiltin = /* @__PURE__ */ (() => (\n // @ts-ignore\n typeof Uint8Array.from([]).toHex === \"function\" && typeof Uint8Array.fromHex === \"function\"\n ))();\n var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, \"0\"));\n function bytesToHex(bytes) {\n abytes(bytes);\n if (hasHexBuiltin)\n return bytes.toHex();\n let hex = \"\";\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n }\n var asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\n function asciiToBase16(ch) {\n if (ch >= asciis._0 && ch <= asciis._9)\n return ch - asciis._0;\n if (ch >= asciis.A && ch <= asciis.F)\n return ch - (asciis.A - 10);\n if (ch >= asciis.a && ch <= asciis.f)\n return ch - (asciis.a - 10);\n return;\n }\n function hexToBytes(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n if (hasHexBuiltin)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error(\"hex string expected, got unpadded hex of length \" + hl);\n const array2 = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === void 0 || n2 === void 0) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array2[ai] = n1 * 16 + n2;\n }\n return array2;\n }\n function utf8ToBytes(str) {\n if (typeof str !== \"string\")\n throw new Error(\"string expected\");\n return new Uint8Array(new TextEncoder().encode(str));\n }\n function toBytes(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes(data);\n abytes(data);\n return data;\n }\n function concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n abytes(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n }\n var Hash = class {\n };\n function createHasher(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n }\n function randomBytes(bytesLength = 32) {\n if (crypto2 && typeof crypto2.getRandomValues === \"function\") {\n return crypto2.getRandomValues(new Uint8Array(bytesLength));\n }\n if (crypto2 && typeof crypto2.randomBytes === \"function\") {\n return Uint8Array.from(crypto2.randomBytes(bytesLength));\n }\n throw new Error(\"crypto.getRandomValues must be defined\");\n }\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js\n function setBigUint64(view, byteOffset, value, isLE2) {\n if (typeof view.setBigUint64 === \"function\")\n return view.setBigUint64(byteOffset, value, isLE2);\n const _32n2 = BigInt(32);\n const _u32_max = BigInt(4294967295);\n const wh = Number(value >> _32n2 & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE2 ? 4 : 0;\n const l = isLE2 ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE2);\n view.setUint32(byteOffset + l, wl, isLE2);\n }\n function Chi(a, b, c) {\n return a & b ^ ~a & c;\n }\n function Maj(a, b, c) {\n return a & b ^ a & c ^ b & c;\n }\n var HashMD = class extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE2) {\n super();\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE2;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n aexists(this);\n data = toBytes(data);\n abytes(data);\n const { view, buffer, blockLen } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n aexists(this);\n aoutput(out, this);\n this.finished = true;\n const { buffer, view, blockLen, isLE: isLE2 } = this;\n let { pos } = this;\n buffer[pos++] = 128;\n clean(this.buffer.subarray(pos));\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE2);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n if (len % 4)\n throw new Error(\"_sha2: outputLen should be aligned to 32bit\");\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error(\"_sha2: outputLen bigger than state\");\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE2);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.destroyed = destroyed;\n to.finished = finished;\n to.length = length;\n to.pos = pos;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n };\n var SHA256_IV = /* @__PURE__ */ Uint32Array.from([\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ]);\n var SHA512_IV = /* @__PURE__ */ Uint32Array.from([\n 1779033703,\n 4089235720,\n 3144134277,\n 2227873595,\n 1013904242,\n 4271175723,\n 2773480762,\n 1595750129,\n 1359893119,\n 2917565137,\n 2600822924,\n 725511199,\n 528734635,\n 4215389547,\n 1541459225,\n 327033209\n ]);\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js\n init_dirname();\n init_buffer2();\n init_process2();\n var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\n var _32n = /* @__PURE__ */ BigInt(32);\n function fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };\n return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n }\n function split(lst, le = false) {\n const len = lst.length;\n let Ah = new Uint32Array(len);\n let Al = new Uint32Array(len);\n for (let i = 0; i < len; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n }\n var shrSH = (h, _l, s) => h >>> s;\n var shrSL = (h, l, s) => h << 32 - s | l >>> s;\n var rotrSH = (h, l, s) => h >>> s | l << 32 - s;\n var rotrSL = (h, l, s) => h << 32 - s | l >>> s;\n var rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;\n var rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;\n var rotlSH = (h, l, s) => h << s | l >>> 32 - s;\n var rotlSL = (h, l, s) => l << s | h >>> 32 - s;\n var rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;\n var rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;\n function add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: Ah + Bh + (l / 2 ** 32 | 0) | 0, l: l | 0 };\n }\n var add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\n var add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;\n var add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\n var add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;\n var add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\n var add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js\n var SHA256_K = /* @__PURE__ */ Uint32Array.from([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n var SHA256_W = /* @__PURE__ */ new Uint32Array(64);\n var SHA256 = class extends HashMD {\n constructor(outputLen = 32) {\n super(64, outputLen, 8, false);\n this.A = SHA256_IV[0] | 0;\n this.B = SHA256_IV[1] | 0;\n this.C = SHA256_IV[2] | 0;\n this.D = SHA256_IV[3] | 0;\n this.E = SHA256_IV[4] | 0;\n this.F = SHA256_IV[5] | 0;\n this.G = SHA256_IV[6] | 0;\n this.H = SHA256_IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset2) {\n for (let i = 0; i < 16; i++, offset2 += 4)\n SHA256_W[i] = view.getUint32(offset2, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ W15 >>> 3;\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ W2 >>> 10;\n SHA256_W[i] = s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16] | 0;\n }\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i] | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = sigma0 + Maj(A, B, C) | 0;\n H = G;\n G = F;\n F = E;\n E = D + T1 | 0;\n D = C;\n C = B;\n B = A;\n A = T1 + T2 | 0;\n }\n A = A + this.A | 0;\n B = B + this.B | 0;\n C = C + this.C | 0;\n D = D + this.D | 0;\n E = E + this.E | 0;\n F = F + this.F | 0;\n G = G + this.G | 0;\n H = H + this.H | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n clean(SHA256_W);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n clean(this.buffer);\n }\n };\n var K512 = /* @__PURE__ */ (() => split([\n \"0x428a2f98d728ae22\",\n \"0x7137449123ef65cd\",\n \"0xb5c0fbcfec4d3b2f\",\n \"0xe9b5dba58189dbbc\",\n \"0x3956c25bf348b538\",\n \"0x59f111f1b605d019\",\n \"0x923f82a4af194f9b\",\n \"0xab1c5ed5da6d8118\",\n \"0xd807aa98a3030242\",\n \"0x12835b0145706fbe\",\n \"0x243185be4ee4b28c\",\n \"0x550c7dc3d5ffb4e2\",\n \"0x72be5d74f27b896f\",\n \"0x80deb1fe3b1696b1\",\n \"0x9bdc06a725c71235\",\n \"0xc19bf174cf692694\",\n \"0xe49b69c19ef14ad2\",\n \"0xefbe4786384f25e3\",\n \"0x0fc19dc68b8cd5b5\",\n \"0x240ca1cc77ac9c65\",\n \"0x2de92c6f592b0275\",\n \"0x4a7484aa6ea6e483\",\n \"0x5cb0a9dcbd41fbd4\",\n \"0x76f988da831153b5\",\n \"0x983e5152ee66dfab\",\n \"0xa831c66d2db43210\",\n \"0xb00327c898fb213f\",\n \"0xbf597fc7beef0ee4\",\n \"0xc6e00bf33da88fc2\",\n \"0xd5a79147930aa725\",\n \"0x06ca6351e003826f\",\n \"0x142929670a0e6e70\",\n \"0x27b70a8546d22ffc\",\n \"0x2e1b21385c26c926\",\n \"0x4d2c6dfc5ac42aed\",\n \"0x53380d139d95b3df\",\n \"0x650a73548baf63de\",\n \"0x766a0abb3c77b2a8\",\n \"0x81c2c92e47edaee6\",\n \"0x92722c851482353b\",\n \"0xa2bfe8a14cf10364\",\n \"0xa81a664bbc423001\",\n \"0xc24b8b70d0f89791\",\n \"0xc76c51a30654be30\",\n \"0xd192e819d6ef5218\",\n \"0xd69906245565a910\",\n \"0xf40e35855771202a\",\n \"0x106aa07032bbd1b8\",\n \"0x19a4c116b8d2d0c8\",\n \"0x1e376c085141ab53\",\n \"0x2748774cdf8eeb99\",\n \"0x34b0bcb5e19b48a8\",\n \"0x391c0cb3c5c95a63\",\n \"0x4ed8aa4ae3418acb\",\n \"0x5b9cca4f7763e373\",\n \"0x682e6ff3d6b2b8a3\",\n \"0x748f82ee5defb2fc\",\n \"0x78a5636f43172f60\",\n \"0x84c87814a1f0ab72\",\n \"0x8cc702081a6439ec\",\n \"0x90befffa23631e28\",\n \"0xa4506cebde82bde9\",\n \"0xbef9a3f7b2c67915\",\n \"0xc67178f2e372532b\",\n \"0xca273eceea26619c\",\n \"0xd186b8c721c0c207\",\n \"0xeada7dd6cde0eb1e\",\n \"0xf57d4f7fee6ed178\",\n \"0x06f067aa72176fba\",\n \"0x0a637dc5a2c898a6\",\n \"0x113f9804bef90dae\",\n \"0x1b710b35131c471b\",\n \"0x28db77f523047d84\",\n \"0x32caab7b40c72493\",\n \"0x3c9ebe0a15c9bebc\",\n \"0x431d67c49c100d4c\",\n \"0x4cc5d4becb3e42b6\",\n \"0x597f299cfc657e2a\",\n \"0x5fcb6fab3ad6faec\",\n \"0x6c44198c4a475817\"\n ].map((n) => BigInt(n))))();\n var SHA512_Kh = /* @__PURE__ */ (() => K512[0])();\n var SHA512_Kl = /* @__PURE__ */ (() => K512[1])();\n var SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);\n var SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);\n var SHA512 = class extends HashMD {\n constructor(outputLen = 64) {\n super(128, outputLen, 16, false);\n this.Ah = SHA512_IV[0] | 0;\n this.Al = SHA512_IV[1] | 0;\n this.Bh = SHA512_IV[2] | 0;\n this.Bl = SHA512_IV[3] | 0;\n this.Ch = SHA512_IV[4] | 0;\n this.Cl = SHA512_IV[5] | 0;\n this.Dh = SHA512_IV[6] | 0;\n this.Dl = SHA512_IV[7] | 0;\n this.Eh = SHA512_IV[8] | 0;\n this.El = SHA512_IV[9] | 0;\n this.Fh = SHA512_IV[10] | 0;\n this.Fl = SHA512_IV[11] | 0;\n this.Gh = SHA512_IV[12] | 0;\n this.Gl = SHA512_IV[13] | 0;\n this.Hh = SHA512_IV[14] | 0;\n this.Hl = SHA512_IV[15] | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset2) {\n for (let i = 0; i < 16; i++, offset2 += 4) {\n SHA512_W_H[i] = view.getUint32(offset2);\n SHA512_W_L[i] = view.getUint32(offset2 += 4);\n }\n for (let i = 16; i < 80; i++) {\n const W15h = SHA512_W_H[i - 15] | 0;\n const W15l = SHA512_W_L[i - 15] | 0;\n const s0h = rotrSH(W15h, W15l, 1) ^ rotrSH(W15h, W15l, 8) ^ shrSH(W15h, W15l, 7);\n const s0l = rotrSL(W15h, W15l, 1) ^ rotrSL(W15h, W15l, 8) ^ shrSL(W15h, W15l, 7);\n const W2h = SHA512_W_H[i - 2] | 0;\n const W2l = SHA512_W_L[i - 2] | 0;\n const s1h = rotrSH(W2h, W2l, 19) ^ rotrBH(W2h, W2l, 61) ^ shrSH(W2h, W2l, 6);\n const s1l = rotrSL(W2h, W2l, 19) ^ rotrBL(W2h, W2l, 61) ^ shrSL(W2h, W2l, 6);\n const SUMl = add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);\n const SUMh = add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);\n SHA512_W_H[i] = SUMh | 0;\n SHA512_W_L[i] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n for (let i = 0; i < 80; i++) {\n const sigma1h = rotrSH(Eh, El, 14) ^ rotrSH(Eh, El, 18) ^ rotrBH(Eh, El, 41);\n const sigma1l = rotrSL(Eh, El, 14) ^ rotrSL(Eh, El, 18) ^ rotrBL(Eh, El, 41);\n const CHIh = Eh & Fh ^ ~Eh & Gh;\n const CHIl = El & Fl ^ ~El & Gl;\n const T1ll = add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);\n const T1h = add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);\n const T1l = T1ll | 0;\n const sigma0h = rotrSH(Ah, Al, 28) ^ rotrBH(Ah, Al, 34) ^ rotrBH(Ah, Al, 39);\n const sigma0l = rotrSL(Ah, Al, 28) ^ rotrBL(Ah, Al, 34) ^ rotrBL(Ah, Al, 39);\n const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;\n const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = add3L(T1l, sigma0l, MAJl);\n Ah = add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n ({ h: Ah, l: Al } = add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n clean(SHA512_W_H, SHA512_W_L);\n }\n destroy() {\n clean(this.buffer);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n };\n var sha256 = /* @__PURE__ */ createHasher(() => new SHA256());\n var sha512 = /* @__PURE__ */ createHasher(() => new SHA512());\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/curve.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/utils.js\n init_dirname();\n init_buffer2();\n init_process2();\n var _0n = /* @__PURE__ */ BigInt(0);\n var _1n = /* @__PURE__ */ BigInt(1);\n function _abool2(value, title = \"\") {\n if (typeof value !== \"boolean\") {\n const prefix = title && `\"${title}\"`;\n throw new Error(prefix + \"expected boolean, got type=\" + typeof value);\n }\n return value;\n }\n function _abytes2(value, length, title = \"\") {\n const bytes = isBytes(value);\n const len = value?.length;\n const needsLen = length !== void 0;\n if (!bytes || needsLen && len !== length) {\n const prefix = title && `\"${title}\" `;\n const ofLen = needsLen ? ` of length ${length}` : \"\";\n const got = bytes ? `length=${len}` : `type=${typeof value}`;\n throw new Error(prefix + \"expected Uint8Array\" + ofLen + \", got \" + got);\n }\n return value;\n }\n function numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? \"0\" + hex : hex;\n }\n function hexToNumber(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n return hex === \"\" ? _0n : BigInt(\"0x\" + hex);\n }\n function bytesToNumberBE(bytes) {\n return hexToNumber(bytesToHex(bytes));\n }\n function bytesToNumberLE(bytes) {\n abytes(bytes);\n return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));\n }\n function numberToBytesBE(n, len) {\n return hexToBytes(n.toString(16).padStart(len * 2, \"0\"));\n }\n function numberToBytesLE(n, len) {\n return numberToBytesBE(n, len).reverse();\n }\n function ensureBytes(title, hex, expectedLength) {\n let res;\n if (typeof hex === \"string\") {\n try {\n res = hexToBytes(hex);\n } catch (e) {\n throw new Error(title + \" must be hex string or Uint8Array, cause: \" + e);\n }\n } else if (isBytes(hex)) {\n res = Uint8Array.from(hex);\n } else {\n throw new Error(title + \" must be hex string or Uint8Array\");\n }\n const len = res.length;\n if (typeof expectedLength === \"number\" && len !== expectedLength)\n throw new Error(title + \" of length \" + expectedLength + \" expected, got \" + len);\n return res;\n }\n function equalBytes(a, b) {\n if (a.length !== b.length)\n return false;\n let diff = 0;\n for (let i = 0; i < a.length; i++)\n diff |= a[i] ^ b[i];\n return diff === 0;\n }\n function copyBytes(bytes) {\n return Uint8Array.from(bytes);\n }\n var isPosBig = (n) => typeof n === \"bigint\" && _0n <= n;\n function inRange(n, min, max) {\n return isPosBig(n) && isPosBig(min) && isPosBig(max) && min <= n && n < max;\n }\n function aInRange(title, n, min, max) {\n if (!inRange(n, min, max))\n throw new Error(\"expected valid \" + title + \": \" + min + \" <= n < \" + max + \", got \" + n);\n }\n function bitLen(n) {\n let len;\n for (len = 0; n > _0n; n >>= _1n, len += 1)\n ;\n return len;\n }\n var bitMask = (n) => (_1n << BigInt(n)) - _1n;\n function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== \"number\" || hashLen < 2)\n throw new Error(\"hashLen must be a number\");\n if (typeof qByteLen !== \"number\" || qByteLen < 2)\n throw new Error(\"qByteLen must be a number\");\n if (typeof hmacFn !== \"function\")\n throw new Error(\"hmacFn must be a function\");\n const u8n = (len) => new Uint8Array(len);\n const u8of = (byte) => Uint8Array.of(byte);\n let v = u8n(hashLen);\n let k = u8n(hashLen);\n let i = 0;\n const reset = () => {\n v.fill(1);\n k.fill(0);\n i = 0;\n };\n const h = (...b) => hmacFn(k, v, ...b);\n const reseed = (seed = u8n(0)) => {\n k = h(u8of(0), seed);\n v = h();\n if (seed.length === 0)\n return;\n k = h(u8of(1), seed);\n v = h();\n };\n const gen2 = () => {\n if (i++ >= 1e3)\n throw new Error(\"drbg: tried 1000 values\");\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v = h();\n const sl = v.slice();\n out.push(sl);\n len += v.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed);\n let res = void 0;\n while (!(res = pred(gen2())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n }\n function _validateObject(object, fields, optFields = {}) {\n if (!object || typeof object !== \"object\")\n throw new Error(\"expected valid options object\");\n function checkField(fieldName, expectedType, isOpt) {\n const val = object[fieldName];\n if (isOpt && val === void 0)\n return;\n const current = typeof val;\n if (current !== expectedType || val === null)\n throw new Error(`param \"${fieldName}\" is invalid: expected ${expectedType}, got ${current}`);\n }\n Object.entries(fields).forEach(([k, v]) => checkField(k, v, false));\n Object.entries(optFields).forEach(([k, v]) => checkField(k, v, true));\n }\n var notImplemented = () => {\n throw new Error(\"not implemented\");\n };\n function memoized(fn) {\n const map = /* @__PURE__ */ new WeakMap();\n return (arg, ...args) => {\n const val = map.get(arg);\n if (val !== void 0)\n return val;\n const computed = fn(arg, ...args);\n map.set(arg, computed);\n return computed;\n };\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/modular.js\n init_dirname();\n init_buffer2();\n init_process2();\n var _0n2 = BigInt(0);\n var _1n2 = BigInt(1);\n var _2n = /* @__PURE__ */ BigInt(2);\n var _3n = /* @__PURE__ */ BigInt(3);\n var _4n = /* @__PURE__ */ BigInt(4);\n var _5n = /* @__PURE__ */ BigInt(5);\n var _7n = /* @__PURE__ */ BigInt(7);\n var _8n = /* @__PURE__ */ BigInt(8);\n var _9n = /* @__PURE__ */ BigInt(9);\n var _16n = /* @__PURE__ */ BigInt(16);\n function mod(a, b) {\n const result = a % b;\n return result >= _0n2 ? result : b + result;\n }\n function pow2(x, power, modulo) {\n let res = x;\n while (power-- > _0n2) {\n res *= res;\n res %= modulo;\n }\n return res;\n }\n function invert(number2, modulo) {\n if (number2 === _0n2)\n throw new Error(\"invert: expected non-zero number\");\n if (modulo <= _0n2)\n throw new Error(\"invert: expected positive modulus, got \" + modulo);\n let a = mod(number2, modulo);\n let b = modulo;\n let x = _0n2, y = _1n2, u = _1n2, v = _0n2;\n while (a !== _0n2) {\n const q = b / a;\n const r = b % a;\n const m = x - u * q;\n const n = y - v * q;\n b = a, a = r, x = u, y = v, u = m, v = n;\n }\n const gcd = b;\n if (gcd !== _1n2)\n throw new Error(\"invert: does not exist\");\n return mod(x, modulo);\n }\n function assertIsSquare(Fp2, root, n) {\n if (!Fp2.eql(Fp2.sqr(root), n))\n throw new Error(\"Cannot find square root\");\n }\n function sqrt3mod4(Fp2, n) {\n const p1div4 = (Fp2.ORDER + _1n2) / _4n;\n const root = Fp2.pow(n, p1div4);\n assertIsSquare(Fp2, root, n);\n return root;\n }\n function sqrt5mod8(Fp2, n) {\n const p5div8 = (Fp2.ORDER - _5n) / _8n;\n const n2 = Fp2.mul(n, _2n);\n const v = Fp2.pow(n2, p5div8);\n const nv = Fp2.mul(n, v);\n const i = Fp2.mul(Fp2.mul(nv, _2n), v);\n const root = Fp2.mul(nv, Fp2.sub(i, Fp2.ONE));\n assertIsSquare(Fp2, root, n);\n return root;\n }\n function sqrt9mod16(P) {\n const Fp_ = Field(P);\n const tn = tonelliShanks(P);\n const c1 = tn(Fp_, Fp_.neg(Fp_.ONE));\n const c2 = tn(Fp_, c1);\n const c3 = tn(Fp_, Fp_.neg(c1));\n const c4 = (P + _7n) / _16n;\n return (Fp2, n) => {\n let tv1 = Fp2.pow(n, c4);\n let tv2 = Fp2.mul(tv1, c1);\n const tv3 = Fp2.mul(tv1, c2);\n const tv4 = Fp2.mul(tv1, c3);\n const e1 = Fp2.eql(Fp2.sqr(tv2), n);\n const e2 = Fp2.eql(Fp2.sqr(tv3), n);\n tv1 = Fp2.cmov(tv1, tv2, e1);\n tv2 = Fp2.cmov(tv4, tv3, e2);\n const e3 = Fp2.eql(Fp2.sqr(tv2), n);\n const root = Fp2.cmov(tv1, tv2, e3);\n assertIsSquare(Fp2, root, n);\n return root;\n };\n }\n function tonelliShanks(P) {\n if (P < _3n)\n throw new Error(\"sqrt is not defined for small field\");\n let Q = P - _1n2;\n let S = 0;\n while (Q % _2n === _0n2) {\n Q /= _2n;\n S++;\n }\n let Z = _2n;\n const _Fp = Field(P);\n while (FpLegendre(_Fp, Z) === 1) {\n if (Z++ > 1e3)\n throw new Error(\"Cannot find square root: probably non-prime P\");\n }\n if (S === 1)\n return sqrt3mod4;\n let cc = _Fp.pow(Z, Q);\n const Q1div2 = (Q + _1n2) / _2n;\n return function tonelliSlow(Fp2, n) {\n if (Fp2.is0(n))\n return n;\n if (FpLegendre(Fp2, n) !== 1)\n throw new Error(\"Cannot find square root\");\n let M = S;\n let c = Fp2.mul(Fp2.ONE, cc);\n let t = Fp2.pow(n, Q);\n let R = Fp2.pow(n, Q1div2);\n while (!Fp2.eql(t, Fp2.ONE)) {\n if (Fp2.is0(t))\n return Fp2.ZERO;\n let i = 1;\n let t_tmp = Fp2.sqr(t);\n while (!Fp2.eql(t_tmp, Fp2.ONE)) {\n i++;\n t_tmp = Fp2.sqr(t_tmp);\n if (i === M)\n throw new Error(\"Cannot find square root\");\n }\n const exponent = _1n2 << BigInt(M - i - 1);\n const b = Fp2.pow(c, exponent);\n M = i;\n c = Fp2.sqr(b);\n t = Fp2.mul(t, c);\n R = Fp2.mul(R, b);\n }\n return R;\n };\n }\n function FpSqrt(P) {\n if (P % _4n === _3n)\n return sqrt3mod4;\n if (P % _8n === _5n)\n return sqrt5mod8;\n if (P % _16n === _9n)\n return sqrt9mod16(P);\n return tonelliShanks(P);\n }\n var isNegativeLE = (num, modulo) => (mod(num, modulo) & _1n2) === _1n2;\n var FIELD_FIELDS = [\n \"create\",\n \"isValid\",\n \"is0\",\n \"neg\",\n \"inv\",\n \"sqrt\",\n \"sqr\",\n \"eql\",\n \"add\",\n \"sub\",\n \"mul\",\n \"pow\",\n \"div\",\n \"addN\",\n \"subN\",\n \"mulN\",\n \"sqrN\"\n ];\n function validateField(field) {\n const initial = {\n ORDER: \"bigint\",\n MASK: \"bigint\",\n BYTES: \"number\",\n BITS: \"number\"\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n _validateObject(field, opts);\n return field;\n }\n function FpPow(Fp2, num, power) {\n if (power < _0n2)\n throw new Error(\"invalid exponent, negatives unsupported\");\n if (power === _0n2)\n return Fp2.ONE;\n if (power === _1n2)\n return num;\n let p = Fp2.ONE;\n let d = num;\n while (power > _0n2) {\n if (power & _1n2)\n p = Fp2.mul(p, d);\n d = Fp2.sqr(d);\n power >>= _1n2;\n }\n return p;\n }\n function FpInvertBatch(Fp2, nums, passZero = false) {\n const inverted = new Array(nums.length).fill(passZero ? Fp2.ZERO : void 0);\n const multipliedAcc = nums.reduce((acc, num, i) => {\n if (Fp2.is0(num))\n return acc;\n inverted[i] = acc;\n return Fp2.mul(acc, num);\n }, Fp2.ONE);\n const invertedAcc = Fp2.inv(multipliedAcc);\n nums.reduceRight((acc, num, i) => {\n if (Fp2.is0(num))\n return acc;\n inverted[i] = Fp2.mul(acc, inverted[i]);\n return Fp2.mul(acc, num);\n }, invertedAcc);\n return inverted;\n }\n function FpLegendre(Fp2, n) {\n const p1mod2 = (Fp2.ORDER - _1n2) / _2n;\n const powered = Fp2.pow(n, p1mod2);\n const yes = Fp2.eql(powered, Fp2.ONE);\n const zero = Fp2.eql(powered, Fp2.ZERO);\n const no = Fp2.eql(powered, Fp2.neg(Fp2.ONE));\n if (!yes && !zero && !no)\n throw new Error(\"invalid Legendre symbol result\");\n return yes ? 1 : zero ? 0 : -1;\n }\n function nLength(n, nBitLength) {\n if (nBitLength !== void 0)\n anumber(nBitLength);\n const _nBitLength = nBitLength !== void 0 ? nBitLength : n.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n }\n function Field(ORDER, bitLenOrOpts, isLE2 = false, opts = {}) {\n if (ORDER <= _0n2)\n throw new Error(\"invalid field: expected ORDER > 0, got \" + ORDER);\n let _nbitLength = void 0;\n let _sqrt = void 0;\n let modFromBytes = false;\n let allowedLengths = void 0;\n if (typeof bitLenOrOpts === \"object\" && bitLenOrOpts != null) {\n if (opts.sqrt || isLE2)\n throw new Error(\"cannot specify opts in two arguments\");\n const _opts = bitLenOrOpts;\n if (_opts.BITS)\n _nbitLength = _opts.BITS;\n if (_opts.sqrt)\n _sqrt = _opts.sqrt;\n if (typeof _opts.isLE === \"boolean\")\n isLE2 = _opts.isLE;\n if (typeof _opts.modFromBytes === \"boolean\")\n modFromBytes = _opts.modFromBytes;\n allowedLengths = _opts.allowedLengths;\n } else {\n if (typeof bitLenOrOpts === \"number\")\n _nbitLength = bitLenOrOpts;\n if (opts.sqrt)\n _sqrt = opts.sqrt;\n }\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, _nbitLength);\n if (BYTES > 2048)\n throw new Error(\"invalid field: expected ORDER of <= 2048 bytes\");\n let sqrtP;\n const f2 = Object.freeze({\n ORDER,\n isLE: isLE2,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: _0n2,\n ONE: _1n2,\n allowedLengths,\n create: (num) => mod(num, ORDER),\n isValid: (num) => {\n if (typeof num !== \"bigint\")\n throw new Error(\"invalid field element: expected bigint, got \" + typeof num);\n return _0n2 <= num && num < ORDER;\n },\n is0: (num) => num === _0n2,\n // is valid and invertible\n isValidNot0: (num) => !f2.is0(num) && f2.isValid(num),\n isOdd: (num) => (num & _1n2) === _1n2,\n neg: (num) => mod(-num, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num) => mod(num * num, ORDER),\n add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n pow: (num, power) => FpPow(f2, num, power),\n div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num) => num * num,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num) => invert(num, ORDER),\n sqrt: _sqrt || ((n) => {\n if (!sqrtP)\n sqrtP = FpSqrt(ORDER);\n return sqrtP(f2, n);\n }),\n toBytes: (num) => isLE2 ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES),\n fromBytes: (bytes, skipValidation = true) => {\n if (allowedLengths) {\n if (!allowedLengths.includes(bytes.length) || bytes.length > BYTES) {\n throw new Error(\"Field.fromBytes: expected \" + allowedLengths + \" bytes, got \" + bytes.length);\n }\n const padded = new Uint8Array(BYTES);\n padded.set(bytes, isLE2 ? 0 : padded.length - bytes.length);\n bytes = padded;\n }\n if (bytes.length !== BYTES)\n throw new Error(\"Field.fromBytes: expected \" + BYTES + \" bytes, got \" + bytes.length);\n let scalar = isLE2 ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n if (modFromBytes)\n scalar = mod(scalar, ORDER);\n if (!skipValidation) {\n if (!f2.isValid(scalar))\n throw new Error(\"invalid field element: outside of range 0..ORDER\");\n }\n return scalar;\n },\n // TODO: we don't need it here, move out to separate fn\n invertBatch: (lst) => FpInvertBatch(f2, lst),\n // We can't move this out because Fp6, Fp12 implement it\n // and it's unclear what to return in there.\n cmov: (a, b, c) => c ? b : a\n });\n return Object.freeze(f2);\n }\n function getFieldBytesLength(fieldOrder) {\n if (typeof fieldOrder !== \"bigint\")\n throw new Error(\"field order must be bigint\");\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n }\n function getMinHashLength(fieldOrder) {\n const length = getFieldBytesLength(fieldOrder);\n return length + Math.ceil(length / 2);\n }\n function mapHashToField(key, fieldOrder, isLE2 = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength(fieldOrder);\n const minLen = getMinHashLength(fieldOrder);\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(\"expected \" + minLen + \"-1024 bytes of input, got \" + len);\n const num = isLE2 ? bytesToNumberLE(key) : bytesToNumberBE(key);\n const reduced = mod(num, fieldOrder - _1n2) + _1n2;\n return isLE2 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/curve.js\n var _0n3 = BigInt(0);\n var _1n3 = BigInt(1);\n function negateCt(condition, item) {\n const neg = item.negate();\n return condition ? neg : item;\n }\n function normalizeZ(c, points) {\n const invertedZs = FpInvertBatch(c.Fp, points.map((p) => p.Z));\n return points.map((p, i) => c.fromAffine(p.toAffine(invertedZs[i])));\n }\n function validateW(W, bits) {\n if (!Number.isSafeInteger(W) || W <= 0 || W > bits)\n throw new Error(\"invalid window size, expected [1..\" + bits + \"], got W=\" + W);\n }\n function calcWOpts(W, scalarBits) {\n validateW(W, scalarBits);\n const windows = Math.ceil(scalarBits / W) + 1;\n const windowSize = 2 ** (W - 1);\n const maxNumber = 2 ** W;\n const mask2 = bitMask(W);\n const shiftBy = BigInt(W);\n return { windows, windowSize, mask: mask2, maxNumber, shiftBy };\n }\n function calcOffsets(n, window2, wOpts) {\n const { windowSize, mask: mask2, maxNumber, shiftBy } = wOpts;\n let wbits = Number(n & mask2);\n let nextN = n >> shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n nextN += _1n3;\n }\n const offsetStart = window2 * windowSize;\n const offset2 = offsetStart + Math.abs(wbits) - 1;\n const isZero = wbits === 0;\n const isNeg = wbits < 0;\n const isNegF = window2 % 2 !== 0;\n const offsetF = offsetStart;\n return { nextN, offset: offset2, isZero, isNeg, isNegF, offsetF };\n }\n function validateMSMPoints(points, c) {\n if (!Array.isArray(points))\n throw new Error(\"array expected\");\n points.forEach((p, i) => {\n if (!(p instanceof c))\n throw new Error(\"invalid point at index \" + i);\n });\n }\n function validateMSMScalars(scalars, field) {\n if (!Array.isArray(scalars))\n throw new Error(\"array of scalars expected\");\n scalars.forEach((s, i) => {\n if (!field.isValid(s))\n throw new Error(\"invalid scalar at index \" + i);\n });\n }\n var pointPrecomputes = /* @__PURE__ */ new WeakMap();\n var pointWindowSizes = /* @__PURE__ */ new WeakMap();\n function getW(P) {\n return pointWindowSizes.get(P) || 1;\n }\n function assert0(n) {\n if (n !== _0n3)\n throw new Error(\"invalid wNAF\");\n }\n var wNAF = class {\n // Parametrized with a given Point class (not individual point)\n constructor(Point, bits) {\n this.BASE = Point.BASE;\n this.ZERO = Point.ZERO;\n this.Fn = Point.Fn;\n this.bits = bits;\n }\n // non-const time multiplication ladder\n _unsafeLadder(elm, n, p = this.ZERO) {\n let d = elm;\n while (n > _0n3) {\n if (n & _1n3)\n p = p.add(d);\n d = d.double();\n n >>= _1n3;\n }\n return p;\n }\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @param point Point instance\n * @param W window size\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(point, W) {\n const { windows, windowSize } = calcWOpts(W, this.bits);\n const points = [];\n let p = point;\n let base = p;\n for (let window2 = 0; window2 < windows; window2++) {\n base = p;\n points.push(base);\n for (let i = 1; i < windowSize; i++) {\n base = base.add(p);\n points.push(base);\n }\n p = base.double();\n }\n return points;\n }\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * More compact implementation:\n * https://github.com/paulmillr/noble-secp256k1/blob/47cb1669b6e506ad66b35fe7d76132ae97465da2/index.ts#L502-L541\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n) {\n if (!this.Fn.isValid(n))\n throw new Error(\"invalid scalar\");\n let p = this.ZERO;\n let f2 = this.BASE;\n const wo = calcWOpts(W, this.bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n const { nextN, offset: offset2, isZero, isNeg, isNegF, offsetF } = calcOffsets(n, window2, wo);\n n = nextN;\n if (isZero) {\n f2 = f2.add(negateCt(isNegF, precomputes[offsetF]));\n } else {\n p = p.add(negateCt(isNeg, precomputes[offset2]));\n }\n }\n assert0(n);\n return { p, f: f2 };\n }\n /**\n * Implements ec unsafe (non const-time) multiplication using precomputed tables and w-ary non-adjacent form.\n * @param acc accumulator point to add result of multiplication\n * @returns point\n */\n wNAFUnsafe(W, precomputes, n, acc = this.ZERO) {\n const wo = calcWOpts(W, this.bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n if (n === _0n3)\n break;\n const { nextN, offset: offset2, isZero, isNeg } = calcOffsets(n, window2, wo);\n n = nextN;\n if (isZero) {\n continue;\n } else {\n const item = precomputes[offset2];\n acc = acc.add(isNeg ? item.negate() : item);\n }\n }\n assert0(n);\n return acc;\n }\n getPrecomputes(W, point, transform) {\n let comp = pointPrecomputes.get(point);\n if (!comp) {\n comp = this.precomputeWindow(point, W);\n if (W !== 1) {\n if (typeof transform === \"function\")\n comp = transform(comp);\n pointPrecomputes.set(point, comp);\n }\n }\n return comp;\n }\n cached(point, scalar, transform) {\n const W = getW(point);\n return this.wNAF(W, this.getPrecomputes(W, point, transform), scalar);\n }\n unsafe(point, scalar, transform, prev) {\n const W = getW(point);\n if (W === 1)\n return this._unsafeLadder(point, scalar, prev);\n return this.wNAFUnsafe(W, this.getPrecomputes(W, point, transform), scalar, prev);\n }\n // We calculate precomputes for elliptic curve point multiplication\n // using windowed method. This specifies window size and\n // stores precomputed values. Usually only base point would be precomputed.\n createCache(P, W) {\n validateW(W, this.bits);\n pointWindowSizes.set(P, W);\n pointPrecomputes.delete(P);\n }\n hasCache(elm) {\n return getW(elm) !== 1;\n }\n };\n function mulEndoUnsafe(Point, point, k1, k2) {\n let acc = point;\n let p1 = Point.ZERO;\n let p2 = Point.ZERO;\n while (k1 > _0n3 || k2 > _0n3) {\n if (k1 & _1n3)\n p1 = p1.add(acc);\n if (k2 & _1n3)\n p2 = p2.add(acc);\n acc = acc.double();\n k1 >>= _1n3;\n k2 >>= _1n3;\n }\n return { p1, p2 };\n }\n function pippenger(c, fieldN, points, scalars) {\n validateMSMPoints(points, c);\n validateMSMScalars(scalars, fieldN);\n const plength = points.length;\n const slength = scalars.length;\n if (plength !== slength)\n throw new Error(\"arrays of points and scalars must have equal length\");\n const zero = c.ZERO;\n const wbits = bitLen(BigInt(plength));\n let windowSize = 1;\n if (wbits > 12)\n windowSize = wbits - 3;\n else if (wbits > 4)\n windowSize = wbits - 2;\n else if (wbits > 0)\n windowSize = 2;\n const MASK = bitMask(windowSize);\n const buckets = new Array(Number(MASK) + 1).fill(zero);\n const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;\n let sum = zero;\n for (let i = lastBits; i >= 0; i -= windowSize) {\n buckets.fill(zero);\n for (let j = 0; j < slength; j++) {\n const scalar = scalars[j];\n const wbits2 = Number(scalar >> BigInt(i) & MASK);\n buckets[wbits2] = buckets[wbits2].add(points[j]);\n }\n let resI = zero;\n for (let j = buckets.length - 1, sumI = zero; j > 0; j--) {\n sumI = sumI.add(buckets[j]);\n resI = resI.add(sumI);\n }\n sum = sum.add(resI);\n if (i !== 0)\n for (let j = 0; j < windowSize; j++)\n sum = sum.double();\n }\n return sum;\n }\n function createField(order, field, isLE2) {\n if (field) {\n if (field.ORDER !== order)\n throw new Error(\"Field.ORDER must match order: Fp == p, Fn == n\");\n validateField(field);\n return field;\n } else {\n return Field(order, { isLE: isLE2 });\n }\n }\n function _createCurveFields(type2, CURVE, curveOpts = {}, FpFnLE) {\n if (FpFnLE === void 0)\n FpFnLE = type2 === \"edwards\";\n if (!CURVE || typeof CURVE !== \"object\")\n throw new Error(`expected valid ${type2} CURVE object`);\n for (const p of [\"p\", \"n\", \"h\"]) {\n const val = CURVE[p];\n if (!(typeof val === \"bigint\" && val > _0n3))\n throw new Error(`CURVE.${p} must be positive bigint`);\n }\n const Fp2 = createField(CURVE.p, curveOpts.Fp, FpFnLE);\n const Fn2 = createField(CURVE.n, curveOpts.Fn, FpFnLE);\n const _b = type2 === \"weierstrass\" ? \"b\" : \"d\";\n const params = [\"Gx\", \"Gy\", \"a\", _b];\n for (const p of params) {\n if (!Fp2.isValid(CURVE[p]))\n throw new Error(`CURVE.${p} must be valid field element of CURVE.Fp`);\n }\n CURVE = Object.freeze(Object.assign({}, CURVE));\n return { CURVE, Fp: Fp2, Fn: Fn2 };\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/edwards.js\n init_dirname();\n init_buffer2();\n init_process2();\n var _0n4 = BigInt(0);\n var _1n4 = BigInt(1);\n var _2n2 = BigInt(2);\n var _8n2 = BigInt(8);\n function isEdValidXY(Fp2, CURVE, x, y) {\n const x2 = Fp2.sqr(x);\n const y2 = Fp2.sqr(y);\n const left = Fp2.add(Fp2.mul(CURVE.a, x2), y2);\n const right = Fp2.add(Fp2.ONE, Fp2.mul(CURVE.d, Fp2.mul(x2, y2)));\n return Fp2.eql(left, right);\n }\n function edwards(params, extraOpts = {}) {\n const validated = _createCurveFields(\"edwards\", params, extraOpts, extraOpts.FpFnLE);\n const { Fp: Fp2, Fn: Fn2 } = validated;\n let CURVE = validated.CURVE;\n const { h: cofactor } = CURVE;\n _validateObject(extraOpts, {}, { uvRatio: \"function\" });\n const MASK = _2n2 << BigInt(Fn2.BYTES * 8) - _1n4;\n const modP = (n) => Fp2.create(n);\n const uvRatio2 = extraOpts.uvRatio || ((u, v) => {\n try {\n return { isValid: true, value: Fp2.sqrt(Fp2.div(u, v)) };\n } catch (e) {\n return { isValid: false, value: _0n4 };\n }\n });\n if (!isEdValidXY(Fp2, CURVE, CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n function acoord(title, n, banZero = false) {\n const min = banZero ? _1n4 : _0n4;\n aInRange(\"coordinate \" + title, n, min, MASK);\n return n;\n }\n function aextpoint(other) {\n if (!(other instanceof Point))\n throw new Error(\"ExtendedPoint expected\");\n }\n const toAffineMemo = memoized((p, iz) => {\n const { X, Y, Z } = p;\n const is0 = p.is0();\n if (iz == null)\n iz = is0 ? _8n2 : Fp2.inv(Z);\n const x = modP(X * iz);\n const y = modP(Y * iz);\n const zz = Fp2.mul(Z, iz);\n if (is0)\n return { x: _0n4, y: _1n4 };\n if (zz !== _1n4)\n throw new Error(\"invZ was invalid\");\n return { x, y };\n });\n const assertValidMemo = memoized((p) => {\n const { a, d } = CURVE;\n if (p.is0())\n throw new Error(\"bad point: ZERO\");\n const { X, Y, Z, T } = p;\n const X2 = modP(X * X);\n const Y2 = modP(Y * Y);\n const Z2 = modP(Z * Z);\n const Z4 = modP(Z2 * Z2);\n const aX2 = modP(X2 * a);\n const left = modP(Z2 * modP(aX2 + Y2));\n const right = modP(Z4 + modP(d * modP(X2 * Y2)));\n if (left !== right)\n throw new Error(\"bad point: equation left != right (1)\");\n const XY = modP(X * Y);\n const ZT = modP(Z * T);\n if (XY !== ZT)\n throw new Error(\"bad point: equation left != right (2)\");\n return true;\n });\n class Point {\n constructor(X, Y, Z, T) {\n this.X = acoord(\"x\", X);\n this.Y = acoord(\"y\", Y);\n this.Z = acoord(\"z\", Z, true);\n this.T = acoord(\"t\", T);\n Object.freeze(this);\n }\n static CURVE() {\n return CURVE;\n }\n static fromAffine(p) {\n if (p instanceof Point)\n throw new Error(\"extended point not allowed\");\n const { x, y } = p || {};\n acoord(\"x\", x);\n acoord(\"y\", y);\n return new Point(x, y, _1n4, modP(x * y));\n }\n // Uses algo from RFC8032 5.1.3.\n static fromBytes(bytes, zip215 = false) {\n const len = Fp2.BYTES;\n const { a, d } = CURVE;\n bytes = copyBytes(_abytes2(bytes, len, \"point\"));\n _abool2(zip215, \"zip215\");\n const normed = copyBytes(bytes);\n const lastByte = bytes[len - 1];\n normed[len - 1] = lastByte & ~128;\n const y = bytesToNumberLE(normed);\n const max = zip215 ? MASK : Fp2.ORDER;\n aInRange(\"point.y\", y, _0n4, max);\n const y2 = modP(y * y);\n const u = modP(y2 - _1n4);\n const v = modP(d * y2 - a);\n let { isValid, value: x } = uvRatio2(u, v);\n if (!isValid)\n throw new Error(\"bad point: invalid y coordinate\");\n const isXOdd = (x & _1n4) === _1n4;\n const isLastByteOdd = (lastByte & 128) !== 0;\n if (!zip215 && x === _0n4 && isLastByteOdd)\n throw new Error(\"bad point: x=0 and x_0=1\");\n if (isLastByteOdd !== isXOdd)\n x = modP(-x);\n return Point.fromAffine({ x, y });\n }\n static fromHex(bytes, zip215 = false) {\n return Point.fromBytes(ensureBytes(\"point\", bytes), zip215);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n precompute(windowSize = 8, isLazy = true) {\n wnaf.createCache(this, windowSize);\n if (!isLazy)\n this.multiply(_2n2);\n return this;\n }\n // Useful in fromAffine() - not for fromBytes(), which always created valid points.\n assertValidity() {\n assertValidMemo(this);\n }\n // Compare one point to another.\n equals(other) {\n aextpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n const X1Z2 = modP(X1 * Z2);\n const X2Z1 = modP(X2 * Z1);\n const Y1Z2 = modP(Y1 * Z2);\n const Y2Z1 = modP(Y2 * Z1);\n return X1Z2 === X2Z1 && Y1Z2 === Y2Z1;\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n negate() {\n return new Point(modP(-this.X), this.Y, this.Z, modP(-this.T));\n }\n // Fast algo for doubling Extended Point.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd\n // Cost: 4M + 4S + 1*a + 6add + 1*2.\n double() {\n const { a } = CURVE;\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const A = modP(X1 * X1);\n const B = modP(Y1 * Y1);\n const C = modP(_2n2 * modP(Z1 * Z1));\n const D = modP(a * A);\n const x1y1 = X1 + Y1;\n const E = modP(modP(x1y1 * x1y1) - A - B);\n const G = D + B;\n const F = G - C;\n const H = D - B;\n const X3 = modP(E * F);\n const Y3 = modP(G * H);\n const T3 = modP(E * H);\n const Z3 = modP(F * G);\n return new Point(X3, Y3, Z3, T3);\n }\n // Fast algo for adding 2 Extended Points.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#addition-add-2008-hwcd\n // Cost: 9M + 1*a + 1*d + 7add.\n add(other) {\n aextpoint(other);\n const { a, d } = CURVE;\n const { X: X1, Y: Y1, Z: Z1, T: T1 } = this;\n const { X: X2, Y: Y2, Z: Z2, T: T2 } = other;\n const A = modP(X1 * X2);\n const B = modP(Y1 * Y2);\n const C = modP(T1 * d * T2);\n const D = modP(Z1 * Z2);\n const E = modP((X1 + Y1) * (X2 + Y2) - A - B);\n const F = D - C;\n const G = D + C;\n const H = modP(B - a * A);\n const X3 = modP(E * F);\n const Y3 = modP(G * H);\n const T3 = modP(E * H);\n const Z3 = modP(F * G);\n return new Point(X3, Y3, Z3, T3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n // Constant-time multiplication.\n multiply(scalar) {\n if (!Fn2.isValidNot0(scalar))\n throw new Error(\"invalid scalar: expected 1 <= sc < curve.n\");\n const { p, f: f2 } = wnaf.cached(this, scalar, (p2) => normalizeZ(Point, p2));\n return normalizeZ(Point, [p, f2])[0];\n }\n // Non-constant-time multiplication. Uses double-and-add algorithm.\n // It's faster, but should only be used when you don't care about\n // an exposed private key e.g. sig verification.\n // Does NOT allow scalars higher than CURVE.n.\n // Accepts optional accumulator to merge with multiply (important for sparse scalars)\n multiplyUnsafe(scalar, acc = Point.ZERO) {\n if (!Fn2.isValid(scalar))\n throw new Error(\"invalid scalar: expected 0 <= sc < curve.n\");\n if (scalar === _0n4)\n return Point.ZERO;\n if (this.is0() || scalar === _1n4)\n return this;\n return wnaf.unsafe(this, scalar, (p) => normalizeZ(Point, p), acc);\n }\n // Checks if point is of small order.\n // If you add something to small order point, you will have \"dirty\"\n // point with torsion component.\n // Multiplies point by cofactor and checks if the result is 0.\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n // Multiplies point by curve order and checks if the result is 0.\n // Returns `false` is the point is dirty.\n isTorsionFree() {\n return wnaf.unsafe(this, CURVE.n).is0();\n }\n // Converts Extended point to default (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n toAffine(invertedZ) {\n return toAffineMemo(this, invertedZ);\n }\n clearCofactor() {\n if (cofactor === _1n4)\n return this;\n return this.multiplyUnsafe(cofactor);\n }\n toBytes() {\n const { x, y } = this.toAffine();\n const bytes = Fp2.toBytes(y);\n bytes[bytes.length - 1] |= x & _1n4 ? 128 : 0;\n return bytes;\n }\n toHex() {\n return bytesToHex(this.toBytes());\n }\n toString() {\n return ``;\n }\n // TODO: remove\n get ex() {\n return this.X;\n }\n get ey() {\n return this.Y;\n }\n get ez() {\n return this.Z;\n }\n get et() {\n return this.T;\n }\n static normalizeZ(points) {\n return normalizeZ(Point, points);\n }\n static msm(points, scalars) {\n return pippenger(Point, Fn2, points, scalars);\n }\n _setWindowSize(windowSize) {\n this.precompute(windowSize);\n }\n toRawBytes() {\n return this.toBytes();\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, _1n4, modP(CURVE.Gx * CURVE.Gy));\n Point.ZERO = new Point(_0n4, _1n4, _1n4, _0n4);\n Point.Fp = Fp2;\n Point.Fn = Fn2;\n const wnaf = new wNAF(Point, Fn2.BITS);\n Point.BASE.precompute(8);\n return Point;\n }\n var PrimeEdwardsPoint = class {\n constructor(ep) {\n this.ep = ep;\n }\n // Static methods that must be implemented by subclasses\n static fromBytes(_bytes) {\n notImplemented();\n }\n static fromHex(_hex) {\n notImplemented();\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n // Common implementations\n clearCofactor() {\n return this;\n }\n assertValidity() {\n this.ep.assertValidity();\n }\n toAffine(invertedZ) {\n return this.ep.toAffine(invertedZ);\n }\n toHex() {\n return bytesToHex(this.toBytes());\n }\n toString() {\n return this.toHex();\n }\n isTorsionFree() {\n return true;\n }\n isSmallOrder() {\n return false;\n }\n add(other) {\n this.assertSame(other);\n return this.init(this.ep.add(other.ep));\n }\n subtract(other) {\n this.assertSame(other);\n return this.init(this.ep.subtract(other.ep));\n }\n multiply(scalar) {\n return this.init(this.ep.multiply(scalar));\n }\n multiplyUnsafe(scalar) {\n return this.init(this.ep.multiplyUnsafe(scalar));\n }\n double() {\n return this.init(this.ep.double());\n }\n negate() {\n return this.init(this.ep.negate());\n }\n precompute(windowSize, isLazy) {\n return this.init(this.ep.precompute(windowSize, isLazy));\n }\n /** @deprecated use `toBytes` */\n toRawBytes() {\n return this.toBytes();\n }\n };\n function eddsa(Point, cHash, eddsaOpts = {}) {\n if (typeof cHash !== \"function\")\n throw new Error('\"hash\" function param is required');\n _validateObject(eddsaOpts, {}, {\n adjustScalarBytes: \"function\",\n randomBytes: \"function\",\n domain: \"function\",\n prehash: \"function\",\n mapToCurve: \"function\"\n });\n const { prehash } = eddsaOpts;\n const { BASE, Fp: Fp2, Fn: Fn2 } = Point;\n const randomBytes2 = eddsaOpts.randomBytes || randomBytes;\n const adjustScalarBytes2 = eddsaOpts.adjustScalarBytes || ((bytes) => bytes);\n const domain = eddsaOpts.domain || ((data, ctx, phflag) => {\n _abool2(phflag, \"phflag\");\n if (ctx.length || phflag)\n throw new Error(\"Contexts/pre-hash are not supported\");\n return data;\n });\n function modN_LE(hash) {\n return Fn2.create(bytesToNumberLE(hash));\n }\n function getPrivateScalar(key) {\n const len = lengths.secretKey;\n key = ensureBytes(\"private key\", key, len);\n const hashed = ensureBytes(\"hashed private key\", cHash(key), 2 * len);\n const head = adjustScalarBytes2(hashed.slice(0, len));\n const prefix = hashed.slice(len, 2 * len);\n const scalar = modN_LE(head);\n return { head, prefix, scalar };\n }\n function getExtendedPublicKey(secretKey) {\n const { head, prefix, scalar } = getPrivateScalar(secretKey);\n const point = BASE.multiply(scalar);\n const pointBytes = point.toBytes();\n return { head, prefix, scalar, point, pointBytes };\n }\n function getPublicKey2(secretKey) {\n return getExtendedPublicKey(secretKey).pointBytes;\n }\n function hashDomainToScalar(context = Uint8Array.of(), ...msgs) {\n const msg = concatBytes(...msgs);\n return modN_LE(cHash(domain(msg, ensureBytes(\"context\", context), !!prehash)));\n }\n function sign2(msg, secretKey, options = {}) {\n msg = ensureBytes(\"message\", msg);\n if (prehash)\n msg = prehash(msg);\n const { prefix, scalar, pointBytes } = getExtendedPublicKey(secretKey);\n const r = hashDomainToScalar(options.context, prefix, msg);\n const R = BASE.multiply(r).toBytes();\n const k = hashDomainToScalar(options.context, R, pointBytes, msg);\n const s = Fn2.create(r + k * scalar);\n if (!Fn2.isValid(s))\n throw new Error(\"sign failed: invalid s\");\n const rs = concatBytes(R, Fn2.toBytes(s));\n return _abytes2(rs, lengths.signature, \"result\");\n }\n const verifyOpts = { zip215: true };\n function verify2(sig, msg, publicKey2, options = verifyOpts) {\n const { context, zip215 } = options;\n const len = lengths.signature;\n sig = ensureBytes(\"signature\", sig, len);\n msg = ensureBytes(\"message\", msg);\n publicKey2 = ensureBytes(\"publicKey\", publicKey2, lengths.publicKey);\n if (zip215 !== void 0)\n _abool2(zip215, \"zip215\");\n if (prehash)\n msg = prehash(msg);\n const mid = len / 2;\n const r = sig.subarray(0, mid);\n const s = bytesToNumberLE(sig.subarray(mid, len));\n let A, R, SB;\n try {\n A = Point.fromBytes(publicKey2, zip215);\n R = Point.fromBytes(r, zip215);\n SB = BASE.multiplyUnsafe(s);\n } catch (error) {\n return false;\n }\n if (!zip215 && A.isSmallOrder())\n return false;\n const k = hashDomainToScalar(context, R.toBytes(), A.toBytes(), msg);\n const RkA = R.add(A.multiplyUnsafe(k));\n return RkA.subtract(SB).clearCofactor().is0();\n }\n const _size = Fp2.BYTES;\n const lengths = {\n secretKey: _size,\n publicKey: _size,\n signature: 2 * _size,\n seed: _size\n };\n function randomSecretKey(seed = randomBytes2(lengths.seed)) {\n return _abytes2(seed, lengths.seed, \"seed\");\n }\n function keygen(seed) {\n const secretKey = utils.randomSecretKey(seed);\n return { secretKey, publicKey: getPublicKey2(secretKey) };\n }\n function isValidSecretKey(key) {\n return isBytes(key) && key.length === Fn2.BYTES;\n }\n function isValidPublicKey(key, zip215) {\n try {\n return !!Point.fromBytes(key, zip215);\n } catch (error) {\n return false;\n }\n }\n const utils = {\n getExtendedPublicKey,\n randomSecretKey,\n isValidSecretKey,\n isValidPublicKey,\n /**\n * Converts ed public key to x public key. Uses formula:\n * - ed25519:\n * - `(u, v) = ((1+y)/(1-y), sqrt(-486664)*u/x)`\n * - `(x, y) = (sqrt(-486664)*u/v, (u-1)/(u+1))`\n * - ed448:\n * - `(u, v) = ((y-1)/(y+1), sqrt(156324)*u/x)`\n * - `(x, y) = (sqrt(156324)*u/v, (1+u)/(1-u))`\n */\n toMontgomery(publicKey2) {\n const { y } = Point.fromBytes(publicKey2);\n const size = lengths.publicKey;\n const is25519 = size === 32;\n if (!is25519 && size !== 57)\n throw new Error(\"only defined for 25519 and 448\");\n const u = is25519 ? Fp2.div(_1n4 + y, _1n4 - y) : Fp2.div(y - _1n4, y + _1n4);\n return Fp2.toBytes(u);\n },\n toMontgomerySecret(secretKey) {\n const size = lengths.secretKey;\n _abytes2(secretKey, size);\n const hashed = cHash(secretKey.subarray(0, size));\n return adjustScalarBytes2(hashed).subarray(0, size);\n },\n /** @deprecated */\n randomPrivateKey: randomSecretKey,\n /** @deprecated */\n precompute(windowSize = 8, point = Point.BASE) {\n return point.precompute(windowSize, false);\n }\n };\n return Object.freeze({\n keygen,\n getPublicKey: getPublicKey2,\n sign: sign2,\n verify: verify2,\n utils,\n Point,\n lengths\n });\n }\n function _eddsa_legacy_opts_to_new(c) {\n const CURVE = {\n a: c.a,\n d: c.d,\n p: c.Fp.ORDER,\n n: c.n,\n h: c.h,\n Gx: c.Gx,\n Gy: c.Gy\n };\n const Fp2 = c.Fp;\n const Fn2 = Field(CURVE.n, c.nBitLength, true);\n const curveOpts = { Fp: Fp2, Fn: Fn2, uvRatio: c.uvRatio };\n const eddsaOpts = {\n randomBytes: c.randomBytes,\n adjustScalarBytes: c.adjustScalarBytes,\n domain: c.domain,\n prehash: c.prehash,\n mapToCurve: c.mapToCurve\n };\n return { CURVE, curveOpts, hash: c.hash, eddsaOpts };\n }\n function _eddsa_new_output_to_legacy(c, eddsa2) {\n const Point = eddsa2.Point;\n const legacy = Object.assign({}, eddsa2, {\n ExtendedPoint: Point,\n CURVE: c,\n nBitLength: Point.Fn.BITS,\n nByteLength: Point.Fn.BYTES\n });\n return legacy;\n }\n function twistedEdwards(c) {\n const { CURVE, curveOpts, hash, eddsaOpts } = _eddsa_legacy_opts_to_new(c);\n const Point = edwards(CURVE, curveOpts);\n const EDDSA = eddsa(Point, hash, eddsaOpts);\n return _eddsa_new_output_to_legacy(c, EDDSA);\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/ed25519.js\n var _0n5 = /* @__PURE__ */ BigInt(0);\n var _1n5 = BigInt(1);\n var _2n3 = BigInt(2);\n var _3n2 = BigInt(3);\n var _5n2 = BigInt(5);\n var _8n3 = BigInt(8);\n var ed25519_CURVE_p = BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed\");\n var ed25519_CURVE = /* @__PURE__ */ (() => ({\n p: ed25519_CURVE_p,\n n: BigInt(\"0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed\"),\n h: _8n3,\n a: BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec\"),\n d: BigInt(\"0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3\"),\n Gx: BigInt(\"0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a\"),\n Gy: BigInt(\"0x6666666666666666666666666666666666666666666666666666666666666658\")\n }))();\n function ed25519_pow_2_252_3(x) {\n const _10n = BigInt(10), _20n = BigInt(20), _40n = BigInt(40), _80n = BigInt(80);\n const P = ed25519_CURVE_p;\n const x2 = x * x % P;\n const b2 = x2 * x % P;\n const b4 = pow2(b2, _2n3, P) * b2 % P;\n const b5 = pow2(b4, _1n5, P) * x % P;\n const b10 = pow2(b5, _5n2, P) * b5 % P;\n const b20 = pow2(b10, _10n, P) * b10 % P;\n const b40 = pow2(b20, _20n, P) * b20 % P;\n const b80 = pow2(b40, _40n, P) * b40 % P;\n const b160 = pow2(b80, _80n, P) * b80 % P;\n const b240 = pow2(b160, _80n, P) * b80 % P;\n const b250 = pow2(b240, _10n, P) * b10 % P;\n const pow_p_5_8 = pow2(b250, _2n3, P) * x % P;\n return { pow_p_5_8, b2 };\n }\n function adjustScalarBytes(bytes) {\n bytes[0] &= 248;\n bytes[31] &= 127;\n bytes[31] |= 64;\n return bytes;\n }\n var ED25519_SQRT_M1 = /* @__PURE__ */ BigInt(\"19681161376707505956807079304988542015446066515923890162744021073123829784752\");\n function uvRatio(u, v) {\n const P = ed25519_CURVE_p;\n const v32 = mod(v * v * v, P);\n const v7 = mod(v32 * v32 * v, P);\n const pow = ed25519_pow_2_252_3(u * v7).pow_p_5_8;\n let x = mod(u * v32 * pow, P);\n const vx2 = mod(v * x * x, P);\n const root1 = x;\n const root2 = mod(x * ED25519_SQRT_M1, P);\n const useRoot1 = vx2 === u;\n const useRoot2 = vx2 === mod(-u, P);\n const noRoot = vx2 === mod(-u * ED25519_SQRT_M1, P);\n if (useRoot1)\n x = root1;\n if (useRoot2 || noRoot)\n x = root2;\n if (isNegativeLE(x, P))\n x = mod(-x, P);\n return { isValid: useRoot1 || useRoot2, value: x };\n }\n var Fp = /* @__PURE__ */ (() => Field(ed25519_CURVE.p, { isLE: true }))();\n var Fn = /* @__PURE__ */ (() => Field(ed25519_CURVE.n, { isLE: true }))();\n var ed25519Defaults = /* @__PURE__ */ (() => ({\n ...ed25519_CURVE,\n Fp,\n hash: sha512,\n adjustScalarBytes,\n // dom2\n // Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.\n // Constant-time, u/√v\n uvRatio\n }))();\n var ed25519 = /* @__PURE__ */ (() => twistedEdwards(ed25519Defaults))();\n var SQRT_M1 = ED25519_SQRT_M1;\n var SQRT_AD_MINUS_ONE = /* @__PURE__ */ BigInt(\"25063068953384623474111414158702152701244531502492656460079210482610430750235\");\n var INVSQRT_A_MINUS_D = /* @__PURE__ */ BigInt(\"54469307008909316920995813868745141605393597292927456921205312896311721017578\");\n var ONE_MINUS_D_SQ = /* @__PURE__ */ BigInt(\"1159843021668779879193775521855586647937357759715417654439879720876111806838\");\n var D_MINUS_ONE_SQ = /* @__PURE__ */ BigInt(\"40440834346308536858101042469323190826248399146238708352240133220865137265952\");\n var invertSqrt = (number2) => uvRatio(_1n5, number2);\n var MAX_255B = /* @__PURE__ */ BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n var bytes255ToNumberLE = (bytes) => ed25519.Point.Fp.create(bytesToNumberLE(bytes) & MAX_255B);\n function calcElligatorRistrettoMap(r0) {\n const { d } = ed25519_CURVE;\n const P = ed25519_CURVE_p;\n const mod2 = (n) => Fp.create(n);\n const r = mod2(SQRT_M1 * r0 * r0);\n const Ns = mod2((r + _1n5) * ONE_MINUS_D_SQ);\n let c = BigInt(-1);\n const D = mod2((c - d * r) * mod2(r + d));\n let { isValid: Ns_D_is_sq, value: s } = uvRatio(Ns, D);\n let s_ = mod2(s * r0);\n if (!isNegativeLE(s_, P))\n s_ = mod2(-s_);\n if (!Ns_D_is_sq)\n s = s_;\n if (!Ns_D_is_sq)\n c = r;\n const Nt = mod2(c * (r - _1n5) * D_MINUS_ONE_SQ - D);\n const s2 = s * s;\n const W0 = mod2((s + s) * D);\n const W1 = mod2(Nt * SQRT_AD_MINUS_ONE);\n const W2 = mod2(_1n5 - s2);\n const W3 = mod2(_1n5 + s2);\n return new ed25519.Point(mod2(W0 * W3), mod2(W2 * W1), mod2(W1 * W3), mod2(W0 * W2));\n }\n function ristretto255_map(bytes) {\n abytes(bytes, 64);\n const r1 = bytes255ToNumberLE(bytes.subarray(0, 32));\n const R1 = calcElligatorRistrettoMap(r1);\n const r2 = bytes255ToNumberLE(bytes.subarray(32, 64));\n const R2 = calcElligatorRistrettoMap(r2);\n return new _RistrettoPoint(R1.add(R2));\n }\n var _RistrettoPoint = class __RistrettoPoint extends PrimeEdwardsPoint {\n constructor(ep) {\n super(ep);\n }\n static fromAffine(ap) {\n return new __RistrettoPoint(ed25519.Point.fromAffine(ap));\n }\n assertSame(other) {\n if (!(other instanceof __RistrettoPoint))\n throw new Error(\"RistrettoPoint expected\");\n }\n init(ep) {\n return new __RistrettoPoint(ep);\n }\n /** @deprecated use `import { ristretto255_hasher } from '@noble/curves/ed25519.js';` */\n static hashToCurve(hex) {\n return ristretto255_map(ensureBytes(\"ristrettoHash\", hex, 64));\n }\n static fromBytes(bytes) {\n abytes(bytes, 32);\n const { a, d } = ed25519_CURVE;\n const P = ed25519_CURVE_p;\n const mod2 = (n) => Fp.create(n);\n const s = bytes255ToNumberLE(bytes);\n if (!equalBytes(Fp.toBytes(s), bytes) || isNegativeLE(s, P))\n throw new Error(\"invalid ristretto255 encoding 1\");\n const s2 = mod2(s * s);\n const u1 = mod2(_1n5 + a * s2);\n const u2 = mod2(_1n5 - a * s2);\n const u1_2 = mod2(u1 * u1);\n const u2_2 = mod2(u2 * u2);\n const v = mod2(a * d * u1_2 - u2_2);\n const { isValid, value: I } = invertSqrt(mod2(v * u2_2));\n const Dx = mod2(I * u2);\n const Dy = mod2(I * Dx * v);\n let x = mod2((s + s) * Dx);\n if (isNegativeLE(x, P))\n x = mod2(-x);\n const y = mod2(u1 * Dy);\n const t = mod2(x * y);\n if (!isValid || isNegativeLE(t, P) || y === _0n5)\n throw new Error(\"invalid ristretto255 encoding 2\");\n return new __RistrettoPoint(new ed25519.Point(x, y, _1n5, t));\n }\n /**\n * Converts ristretto-encoded string to ristretto point.\n * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-decode).\n * @param hex Ristretto-encoded 32 bytes. Not every 32-byte string is valid ristretto encoding\n */\n static fromHex(hex) {\n return __RistrettoPoint.fromBytes(ensureBytes(\"ristrettoHex\", hex, 32));\n }\n static msm(points, scalars) {\n return pippenger(__RistrettoPoint, ed25519.Point.Fn, points, scalars);\n }\n /**\n * Encodes ristretto point to Uint8Array.\n * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-encode).\n */\n toBytes() {\n let { X, Y, Z, T } = this.ep;\n const P = ed25519_CURVE_p;\n const mod2 = (n) => Fp.create(n);\n const u1 = mod2(mod2(Z + Y) * mod2(Z - Y));\n const u2 = mod2(X * Y);\n const u2sq = mod2(u2 * u2);\n const { value: invsqrt } = invertSqrt(mod2(u1 * u2sq));\n const D1 = mod2(invsqrt * u1);\n const D2 = mod2(invsqrt * u2);\n const zInv = mod2(D1 * D2 * T);\n let D;\n if (isNegativeLE(T * zInv, P)) {\n let _x = mod2(Y * SQRT_M1);\n let _y = mod2(X * SQRT_M1);\n X = _x;\n Y = _y;\n D = mod2(D1 * INVSQRT_A_MINUS_D);\n } else {\n D = D2;\n }\n if (isNegativeLE(X * zInv, P))\n Y = mod2(-Y);\n let s = mod2((Z - Y) * D);\n if (isNegativeLE(s, P))\n s = mod2(-s);\n return Fp.toBytes(s);\n }\n /**\n * Compares two Ristretto points.\n * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-equals).\n */\n equals(other) {\n this.assertSame(other);\n const { X: X1, Y: Y1 } = this.ep;\n const { X: X2, Y: Y2 } = other.ep;\n const mod2 = (n) => Fp.create(n);\n const one = mod2(X1 * Y2) === mod2(Y1 * X2);\n const two = mod2(Y1 * Y2) === mod2(X1 * X2);\n return one || two;\n }\n is0() {\n return this.equals(__RistrettoPoint.ZERO);\n }\n };\n _RistrettoPoint.BASE = /* @__PURE__ */ (() => new _RistrettoPoint(ed25519.Point.BASE))();\n _RistrettoPoint.ZERO = /* @__PURE__ */ (() => new _RistrettoPoint(ed25519.Point.ZERO))();\n _RistrettoPoint.Fp = /* @__PURE__ */ (() => Fp)();\n _RistrettoPoint.Fn = /* @__PURE__ */ (() => Fn)();\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n var import_bn = __toESM(require_bn());\n var import_bs58 = __toESM(require_bs58());\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js\n init_dirname();\n init_buffer2();\n init_process2();\n var sha2562 = sha256;\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n var import_borsh = __toESM(require_lib());\n var BufferLayout = __toESM(require_Layout());\n var import_buffer_layout = __toESM(require_Layout());\n\n // ../../../node_modules/.pnpm/@solana+codecs-numbers@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-numbers/dist/index.browser.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@solana+errors@2.3.0_typescript@5.8.3/node_modules/@solana/errors/dist/index.browser.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n var SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED = 1;\n var SOLANA_ERROR__INVALID_NONCE = 2;\n var SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = 3;\n var SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE = 4;\n var SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH = 5;\n var SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE = 6;\n var SOLANA_ERROR__MALFORMED_BIGINT_STRING = 7;\n var SOLANA_ERROR__MALFORMED_NUMBER_STRING = 8;\n var SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE = 9;\n var SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR = 10;\n var SOLANA_ERROR__JSON_RPC__PARSE_ERROR = -32700;\n var SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR = -32603;\n var SOLANA_ERROR__JSON_RPC__INVALID_PARAMS = -32602;\n var SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND = -32601;\n var SOLANA_ERROR__JSON_RPC__INVALID_REQUEST = -32600;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED = -32016;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION = -32015;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET = -32014;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH = -32013;\n var SOLANA_ERROR__JSON_RPC__SCAN_ERROR = -32012;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE = -32011;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX = -32010;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED = -32009;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT = -32008;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED = -32007;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE = -32006;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY = -32005;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE = -32004;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE = -32003;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE = -32002;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP = -32001;\n var SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH = 28e5;\n var SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE = 2800001;\n var SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS = 2800002;\n var SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY = 2800003;\n var SOLANA_ERROR__ADDRESSES__MALFORMED_PDA = 2800004;\n var SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE = 2800005;\n var SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED = 2800006;\n var SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED = 2800007;\n var SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE = 2800008;\n var SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED = 2800009;\n var SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER = 2800010;\n var SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS = 2800011;\n var SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND = 323e4;\n var SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND = 32300001;\n var SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT = 3230002;\n var SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT = 3230003;\n var SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED = 3230004;\n var SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT = 361e4;\n var SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED = 3610001;\n var SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED = 3610002;\n var SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED = 3610003;\n var SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED = 3610004;\n var SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED = 3610005;\n var SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED = 3610006;\n var SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY = 3610007;\n var SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED = 3611e3;\n var SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH = 3704e3;\n var SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH = 3704001;\n var SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH = 3704002;\n var SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE = 3704003;\n var SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY = 3704004;\n var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS = 4128e3;\n var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA = 4128001;\n var SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH = 4128002;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN = 4615e3;\n var SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR = 4615001;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT = 4615002;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA = 4615003;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA = 4615004;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL = 4615005;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS = 4615006;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID = 4615007;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE = 4615008;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED = 4615009;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT = 4615010;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION = 4615011;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID = 4615012;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND = 4615013;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED = 4615014;\n var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE = 4615015;\n var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED = 4615016;\n var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX = 4615017;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED = 4615018;\n var SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED = 4615019;\n var SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS = 4615020;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED = 4615021;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE = 4615022;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED = 4615023;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = 4615024;\n var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC = 4615025;\n var SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM = 4615026;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR = 4615027;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED = 4615028;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE = 4615029;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT = 4615030;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID = 4615031;\n var SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH = 4615032;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT = 4615033;\n var SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED = 4615034;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED = 4615035;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS = 4615036;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC = 4615037;\n var SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED = 4615038;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION = 4615039;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE = 4615040;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE = 4615041;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE = 4615042;\n var SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE = 4615043;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY = 4615044;\n var SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR = 4615045;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT = 4615046;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER = 4615047;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW = 4615048;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR = 4615049;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER = 4615050;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED = 4615051;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED = 4615052;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED = 4615053;\n var SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS = 4615054;\n var SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS = 5508e3;\n var SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER = 5508001;\n var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER = 5508002;\n var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER = 5508003;\n var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER = 5508004;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER = 5508005;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER = 5508006;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER = 5508007;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER = 5508008;\n var SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS = 5508009;\n var SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING = 5508010;\n var SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED = 5508011;\n var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES = 5663e3;\n var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE = 5663001;\n var SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME = 5663002;\n var SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME = 5663003;\n var SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE = 5663004;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING = 5663005;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE = 5663006;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND = 5663007;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING = 5663008;\n var SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING = 5663009;\n var SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING = 5663010;\n var SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING = 5663011;\n var SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING = 5663012;\n var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING = 5663013;\n var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE = 5663014;\n var SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION = 5663015;\n var SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES = 5663016;\n var SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH = 5663017;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT = 5663018;\n var SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT = 5663019;\n var SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT = 5663020;\n var SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN = 705e4;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE = 7050001;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE = 7050002;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND = 7050003;\n var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND = 7050004;\n var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE = 7050005;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE = 7050006;\n var SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED = 7050007;\n var SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND = 7050008;\n var SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP = 7050009;\n var SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE = 7050010;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX = 7050011;\n var SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE = 7050012;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION = 7050013;\n var SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE = 7050014;\n var SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE = 7050015;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = 7050016;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT = 7050017;\n var SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION = 7050018;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT = 7050019;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT = 7050020;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT = 7050021;\n var SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS = 7050022;\n var SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND = 7050023;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER = 7050024;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA = 7050025;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX = 7050026;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT = 7050027;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT = 7050028;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT = 7050029;\n var SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION = 7050030;\n var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT = 7050031;\n var SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED = 7050032;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT = 7050033;\n var SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED = 7050034;\n var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED = 7050035;\n var SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION = 7050036;\n var SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY = 8078e3;\n var SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH = 8078001;\n var SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH = 8078002;\n var SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH = 8078003;\n var SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH = 8078004;\n var SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH = 8078005;\n var SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH = 8078006;\n var SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS = 8078007;\n var SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE = 8078008;\n var SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT = 8078009;\n var SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT = 8078010;\n var SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE = 8078011;\n var SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE = 8078012;\n var SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH = 8078013;\n var SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE = 8078014;\n var SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT = 8078015;\n var SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE = 8078016;\n var SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE = 8078017;\n var SOLANA_ERROR__CODECS__INVALID_CONSTANT = 8078018;\n var SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE = 8078019;\n var SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL = 8078020;\n var SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES = 8078021;\n var SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS = 8078022;\n var SOLANA_ERROR__RPC__INTEGER_OVERFLOW = 81e5;\n var SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN = 8100001;\n var SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR = 8100002;\n var SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD = 8100003;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN = 819e4;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID = 8190001;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED = 8190002;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED = 8190003;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT = 8190004;\n var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING = 99e5;\n var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE = 9900001;\n var SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING = 9900002;\n var SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE = 9900003;\n var SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED = 9900004;\n var SolanaErrorMessages = {\n [SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND]: \"Account not found at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED]: \"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.\",\n [SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT]: \"Expected decoded account at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT]: \"Failed to decode account data at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND]: \"Accounts not found at addresses: $addresses\",\n [SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED]: \"Unable to find a viable program address bump seed.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS]: \"$putativeAddress is not a base58-encoded address.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH]: \"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY]: \"The `CryptoKey` must be an `Ed25519` public key.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS]: \"$putativeOffCurveAddress is not a base58-encoded off-curve address.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE]: \"Invalid seeds; point must fall off the Ed25519 curve.\",\n [SOLANA_ERROR__ADDRESSES__MALFORMED_PDA]: \"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].\",\n [SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED]: \"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.\",\n [SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED]: \"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.\",\n [SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE]: \"Expected program derived address bump to be in the range [0, 255], got: $bump.\",\n [SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER]: \"Program address cannot end with PDA marker.\",\n [SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.\",\n [SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.\",\n [SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: \"The network has progressed past the last block for which this transaction could have been committed.\",\n [SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY]: \"Codec [$codecDescription] cannot decode empty byte arrays.\",\n [SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS]: \"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.\",\n [SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL]: \"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH]: \"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH]: \"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH]: \"Encoder and decoder must either both be fixed-size or variable-size.\",\n [SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE]: \"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.\",\n [SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH]: \"Expected a fixed-size codec, got a variable-size one.\",\n [SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH]: \"Codec [$codecDescription] expected a positive byte length, got $bytesLength.\",\n [SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH]: \"Expected a variable-size codec, got a fixed-size one.\",\n [SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE]: \"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].\",\n [SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH]: \"Codec [$codecDescription] expected $expected bytes, got $bytesLength.\",\n [SOLANA_ERROR__CODECS__INVALID_CONSTANT]: \"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].\",\n [SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT]: \"Invalid discriminated union variant. Expected one of [$variants], got $value.\",\n [SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT]: \"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.\",\n [SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT]: \"Invalid literal union variant. Expected one of [$variants], got $value.\",\n [SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS]: \"Expected [$codecDescription] to have $expected items, got $actual.\",\n [SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE]: \"Invalid value $value for base $base with alphabet $alphabet.\",\n [SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE]: \"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.\",\n [SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE]: \"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.\",\n [SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE]: \"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.\",\n [SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES]: \"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].\",\n [SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE]: \"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.\",\n [SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED]: \"No random values implementation could be found.\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED]: \"instruction requires an uninitialized account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED]: \"instruction tries to borrow reference for an account which is already borrowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING]: \"instruction left account with an outstanding borrowed reference\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED]: \"program other than the account's owner changed the size of the account data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL]: \"account data too small for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE]: \"instruction expected an executable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT]: \"An account does not have enough lamports to be rent-exempt\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW]: \"Program arithmetic overflowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR]: \"Failed to serialize or deserialize account data: $encodedData\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS]: \"Builtin programs must consume compute units\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH]: \"Cross-program invocation call depth too deep\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED]: \"Computational budget exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM]: \"custom program error: #$code\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX]: \"instruction contains duplicate accounts\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC]: \"instruction modifications of multiply-passed account differ\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT]: \"executable accounts must be rent exempt\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED]: \"instruction changed executable accounts data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE]: \"instruction changed the balance of an executable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED]: \"instruction changed executable bit of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED]: \"instruction modified data of an account it does not own\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND]: \"instruction spent from the balance of an account it does not own\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR]: \"generic instruction error\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER]: \"Provided owner is not allowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE]: \"Account is immutable\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY]: \"Incorrect authority provided\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID]: \"incorrect program id for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS]: \"insufficient funds for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA]: \"invalid account data for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER]: \"Invalid account owner\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT]: \"invalid program argument\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR]: \"program returned invalid error code\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA]: \"invalid instruction data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC]: \"Failed to reallocate account data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS]: \"Provided seeds do not result in a valid address\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED]: \"Accounts data allocations exceeded the maximum allowed per transaction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED]: \"Max accounts exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED]: \"Max instruction trace length exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED]: \"Length of the seed is too long for address generation\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT]: \"An account required by the instruction is missing\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE]: \"missing required signature for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID]: \"instruction illegally modified the program id of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS]: \"insufficient account keys for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION]: \"Cross-program invocation with unauthorized signer or writable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE]: \"Failed to create program execution environment\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE]: \"Program failed to compile\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE]: \"Program failed to complete\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED]: \"instruction modified data of a read-only account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE]: \"instruction changed the balance of a read-only account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED]: \"Cross-program invocation reentrancy not allowed for this instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED]: \"instruction modified rent epoch of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION]: \"sum of account balances before and after instruction do not match\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT]: \"instruction requires an initialized account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN]: \"\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID]: \"Unsupported program id\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR]: \"Unsupported sysvar\",\n [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS]: \"The instruction does not have any accounts.\",\n [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA]: \"The instruction does not have any data.\",\n [SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH]: \"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.\",\n [SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH]: \"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__INVALID_NONCE]: \"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING]: \"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED]: \"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE]: \"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING]: \"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE]: \"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR]: \"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__INVALID_PARAMS]: \"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__INVALID_REQUEST]: \"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND]: \"JSON-RPC error: The method does not exist / is not available ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__PARSE_ERROR]: \"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__SCAN_ERROR]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED]: \"Minimum context slot has not been reached\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY]: \"Node is unhealthy; behind by $numSlotsBehind slots\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT]: \"No snapshot\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE]: \"Transaction simulation failed\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE]: \"Transaction history is not available from this node\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH]: \"Transaction signature length mismatch\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE]: \"Transaction signature verification failure\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION]: \"$__serverMessage\",\n [SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH]: \"Key pair bytes must be of length 64, got $byteLength.\",\n [SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH]: \"Expected private key bytes with length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH]: \"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.\",\n [SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY]: \"The provided private key does not match the provided public key.\",\n [SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.\",\n [SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE]: \"Lamports value must be in the range [0, 2e64-1]\",\n [SOLANA_ERROR__MALFORMED_BIGINT_STRING]: \"`$value` cannot be parsed as a `BigInt`\",\n [SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR]: \"$message\",\n [SOLANA_ERROR__MALFORMED_NUMBER_STRING]: \"`$value` cannot be parsed as a `Number`\",\n [SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND]: \"No nonce account could be found at address `$nonceAccountAddress`\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN]: \"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED]: \"WebSocket was closed before payload could be added to the send buffer\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED]: \"WebSocket connection closed\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT]: \"WebSocket failed to connect\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID]: \"Failed to obtain a subscription id from the server\",\n [SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD]: \"Could not find an API plan for RPC method: `$method`\",\n [SOLANA_ERROR__RPC__INTEGER_OVERFLOW]: \"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.\",\n [SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR]: \"HTTP error ($statusCode): $message\",\n [SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN]: \"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.\",\n [SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS]: \"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.\",\n [SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER]: \"The provided value does not implement the `KeyPairSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER]: \"The provided value does not implement the `MessageModifyingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER]: \"The provided value does not implement the `MessagePartialSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER]: \"The provided value does not implement any of the `MessageSigner` interfaces\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER]: \"The provided value does not implement the `TransactionModifyingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER]: \"The provided value does not implement the `TransactionPartialSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER]: \"The provided value does not implement the `TransactionSendingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER]: \"The provided value does not implement any of the `TransactionSigner` interfaces\",\n [SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS]: \"More than one `TransactionSendingSigner` was identified.\",\n [SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING]: \"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.\",\n [SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED]: \"Wallet account signers do not support signing multiple messages/transactions in a single operation\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY]: \"Cannot export a non-extractable key.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED]: \"No digest implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT]: \"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED]: \"This runtime does not support the generation of Ed25519 key pairs.\\n\\nInstall @solana/webcrypto-ed25519-polyfill and call its `install` function before generating keys in environments that do not support Ed25519.\\n\\nFor a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED]: \"No signature verification implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED]: \"No key generation implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED]: \"No signing implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED]: \"No key export implementation could be found.\",\n [SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE]: \"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING]: \"Transaction processing left an account with an outstanding borrowed reference\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE]: \"Account in use\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE]: \"Account loaded twice\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND]: \"Attempt to debit an account but found no record of a prior credit.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND]: \"Transaction loads an address table account that doesn't exist\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED]: \"This transaction has already been processed\",\n [SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND]: \"Blockhash not found\",\n [SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP]: \"Loader call chain is too deep\",\n [SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE]: \"Transactions are currently disabled due to cluster maintenance\",\n [SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION]: \"Transaction contains a duplicate instruction ($index) that is not allowed\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE]: \"Insufficient funds for fee\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT]: \"Transaction results in an account ($accountIndex) with insufficient funds for rent\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE]: \"This account may not be used to pay transaction fees\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX]: \"Transaction contains an invalid account reference\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA]: \"Transaction loads an address table account with invalid data\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX]: \"Transaction address table lookup uses an invalid index\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER]: \"Transaction loads an address table account with an invalid owner\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT]: \"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION]: \"This program may not be used for executing instructions\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT]: \"Transaction leaves an account with a lower balance than rent-exempt minimum\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT]: \"Transaction loads a writable account that cannot be written\",\n [SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED]: \"Transaction exceeded max loaded accounts data size cap\",\n [SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE]: \"Transaction requires a fee but has no signature present\",\n [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND]: \"Attempt to load a program that does not exist\",\n [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED]: \"Execution of the program referenced by account at index $accountIndex is temporarily restricted.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED]: \"ResanitizationNeeded\",\n [SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE]: \"Transaction failed to sanitize accounts offsets correctly\",\n [SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE]: \"Transaction did not pass signature verification\",\n [SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS]: \"Transaction locked too many accounts\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION]: \"Sum of account balances before and after transaction do not match\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN]: \"The transaction failed with the error `$errorName`\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION]: \"Transaction version is unsupported\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT]: \"Transaction would exceed account data limit within the block\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT]: \"Transaction would exceed total account data limit\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT]: \"Transaction would exceed max account limit within the block\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT]: \"Transaction would exceed max Block Cost Limit\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT]: \"Transaction would exceed max Vote Cost Limit\",\n [SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION]: \"Attempted to sign a transaction with an address that is not a signer for it\",\n [SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING]: \"Transaction is missing an address at index: $index.\",\n [SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES]: \"Transaction has no expected signers therefore it cannot be encoded\",\n [SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT]: \"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes\",\n [SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME]: \"Transaction does not have a blockhash lifetime\",\n [SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME]: \"Transaction is not a durable nonce transaction\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING]: \"Contents of these address lookup tables unknown: $lookupTableAddresses\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE]: \"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING]: \"No fee payer set in CompiledTransaction\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND]: \"Could not find program address at index $index\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT]: \"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more\",\n [SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT]: \"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more\",\n [SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING]: \"Transaction is missing a fee payer.\",\n [SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING]: \"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.\",\n [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE]: \"Transaction first instruction is not advance nonce account instruction.\",\n [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING]: \"Transaction with no instructions cannot be durable nonce transaction.\",\n [SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES]: \"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees\",\n [SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE]: \"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable\",\n [SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH]: \"The transaction message expected the transaction to have $signerAddressesLength signatures, got $signaturesLength.\",\n [SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING]: \"Transaction is missing signatures for addresses: $addresses.\",\n [SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE]: \"Transaction version must be in the range [0, 127]. `$actualVersion` given\"\n };\n var START_INDEX = \"i\";\n var TYPE = \"t\";\n function getHumanReadableErrorMessage(code, context = {}) {\n const messageFormatString = SolanaErrorMessages[code];\n if (messageFormatString.length === 0) {\n return \"\";\n }\n let state;\n function commitStateUpTo(endIndex) {\n if (state[TYPE] === 2) {\n const variableName = messageFormatString.slice(state[START_INDEX] + 1, endIndex);\n fragments.push(\n variableName in context ? (\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n `${context[variableName]}`\n ) : `$${variableName}`\n );\n } else if (state[TYPE] === 1) {\n fragments.push(messageFormatString.slice(state[START_INDEX], endIndex));\n }\n }\n const fragments = [];\n messageFormatString.split(\"\").forEach((char, ii) => {\n if (ii === 0) {\n state = {\n [START_INDEX]: 0,\n [TYPE]: messageFormatString[0] === \"\\\\\" ? 0 : messageFormatString[0] === \"$\" ? 2 : 1\n /* Text */\n };\n return;\n }\n let nextState;\n switch (state[TYPE]) {\n case 0:\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 1\n /* Text */\n };\n break;\n case 1:\n if (char === \"\\\\\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 0\n /* EscapeSequence */\n };\n } else if (char === \"$\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 2\n /* Variable */\n };\n }\n break;\n case 2:\n if (char === \"\\\\\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 0\n /* EscapeSequence */\n };\n } else if (char === \"$\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 2\n /* Variable */\n };\n } else if (!char.match(/\\w/)) {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 1\n /* Text */\n };\n }\n break;\n }\n if (nextState) {\n if (state !== nextState) {\n commitStateUpTo(ii);\n }\n state = nextState;\n }\n });\n commitStateUpTo();\n return fragments.join(\"\");\n }\n function getErrorMessage(code, context = {}) {\n if (true) {\n return getHumanReadableErrorMessage(code, context);\n } else {\n let decodingAdviceMessage = `Solana error #${code}; Decode this error by running \\`npx @solana/errors decode -- ${code}`;\n if (Object.keys(context).length) {\n decodingAdviceMessage += ` '${encodeContextObject(context)}'`;\n }\n return `${decodingAdviceMessage}\\``;\n }\n }\n var SolanaError = class extends Error {\n /**\n * Indicates the root cause of this {@link SolanaError}, if any.\n *\n * For example, a transaction error might have an instruction error as its root cause. In this\n * case, you will be able to access the instruction error on the transaction error as `cause`.\n */\n cause = this.cause;\n /**\n * Contains context that can assist in understanding or recovering from a {@link SolanaError}.\n */\n context;\n constructor(...[code, contextAndErrorOptions]) {\n let context;\n let errorOptions;\n if (contextAndErrorOptions) {\n const { cause, ...contextRest } = contextAndErrorOptions;\n if (cause) {\n errorOptions = { cause };\n }\n if (Object.keys(contextRest).length > 0) {\n context = contextRest;\n }\n }\n const message = getErrorMessage(code, context);\n super(message, errorOptions);\n this.context = {\n __code: code,\n ...context\n };\n this.name = \"SolanaError\";\n }\n };\n\n // ../../../node_modules/.pnpm/@solana+codecs-core@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-core/dist/index.browser.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n function getEncodedSize(value, encoder) {\n return \"fixedSize\" in encoder ? encoder.fixedSize : encoder.getSizeFromValue(value);\n }\n function createEncoder(encoder) {\n return Object.freeze({\n ...encoder,\n encode: (value) => {\n const bytes = new Uint8Array(getEncodedSize(value, encoder));\n encoder.write(value, bytes, 0);\n return bytes;\n }\n });\n }\n function createDecoder(decoder) {\n return Object.freeze({\n ...decoder,\n decode: (bytes, offset2 = 0) => decoder.read(bytes, offset2)[0]\n });\n }\n function isFixedSize(codec) {\n return \"fixedSize\" in codec && typeof codec.fixedSize === \"number\";\n }\n function combineCodec(encoder, decoder) {\n if (isFixedSize(encoder) !== isFixedSize(decoder)) {\n throw new SolanaError(SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH);\n }\n if (isFixedSize(encoder) && isFixedSize(decoder) && encoder.fixedSize !== decoder.fixedSize) {\n throw new SolanaError(SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH, {\n decoderFixedSize: decoder.fixedSize,\n encoderFixedSize: encoder.fixedSize\n });\n }\n if (!isFixedSize(encoder) && !isFixedSize(decoder) && encoder.maxSize !== decoder.maxSize) {\n throw new SolanaError(SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH, {\n decoderMaxSize: decoder.maxSize,\n encoderMaxSize: encoder.maxSize\n });\n }\n return {\n ...decoder,\n ...encoder,\n decode: decoder.decode,\n encode: encoder.encode,\n read: decoder.read,\n write: encoder.write\n };\n }\n function assertByteArrayIsNotEmptyForCodec(codecDescription, bytes, offset2 = 0) {\n if (bytes.length - offset2 <= 0) {\n throw new SolanaError(SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY, {\n codecDescription\n });\n }\n }\n function assertByteArrayHasEnoughBytesForCodec(codecDescription, expected, bytes, offset2 = 0) {\n const bytesLength = bytes.length - offset2;\n if (bytesLength < expected) {\n throw new SolanaError(SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH, {\n bytesLength,\n codecDescription,\n expected\n });\n }\n }\n\n // ../../../node_modules/.pnpm/@solana+codecs-numbers@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-numbers/dist/index.browser.mjs\n function assertNumberIsBetweenForCodec(codecDescription, min, max, value) {\n if (value < min || value > max) {\n throw new SolanaError(SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE, {\n codecDescription,\n max,\n min,\n value\n });\n }\n }\n function isLittleEndian(config) {\n return config?.endian === 1 ? false : true;\n }\n function numberEncoderFactory(input) {\n return createEncoder({\n fixedSize: input.size,\n write(value, bytes, offset2) {\n if (input.range) {\n assertNumberIsBetweenForCodec(input.name, input.range[0], input.range[1], value);\n }\n const arrayBuffer = new ArrayBuffer(input.size);\n input.set(new DataView(arrayBuffer), value, isLittleEndian(input.config));\n bytes.set(new Uint8Array(arrayBuffer), offset2);\n return offset2 + input.size;\n }\n });\n }\n function numberDecoderFactory(input) {\n return createDecoder({\n fixedSize: input.size,\n read(bytes, offset2 = 0) {\n assertByteArrayIsNotEmptyForCodec(input.name, bytes, offset2);\n assertByteArrayHasEnoughBytesForCodec(input.name, input.size, bytes, offset2);\n const view = new DataView(toArrayBuffer(bytes, offset2, input.size));\n return [input.get(view, isLittleEndian(input.config)), offset2 + input.size];\n }\n });\n }\n function toArrayBuffer(bytes, offset2, length) {\n const bytesOffset = bytes.byteOffset + (offset2 ?? 0);\n const bytesLength = length ?? bytes.byteLength;\n return bytes.buffer.slice(bytesOffset, bytesOffset + bytesLength);\n }\n var getU64Encoder = (config = {}) => numberEncoderFactory({\n config,\n name: \"u64\",\n range: [0n, BigInt(\"0xffffffffffffffff\")],\n set: (view, value, le) => view.setBigUint64(0, BigInt(value), le),\n size: 8\n });\n var getU64Decoder = (config = {}) => numberDecoderFactory({\n config,\n get: (view, le) => view.getBigUint64(0, le),\n name: \"u64\",\n size: 8\n });\n var getU64Codec = (config = {}) => combineCodec(getU64Encoder(config), getU64Decoder(config));\n\n // ../../../node_modules/.pnpm/superstruct@2.0.2/node_modules/superstruct/dist/index.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n var StructError = class extends TypeError {\n constructor(failure, failures) {\n let cached;\n const { message, explanation, ...rest } = failure;\n const { path } = failure;\n const msg = path.length === 0 ? message : `At path: ${path.join(\".\")} -- ${message}`;\n super(explanation ?? msg);\n if (explanation != null)\n this.cause = msg;\n Object.assign(this, rest);\n this.name = this.constructor.name;\n this.failures = () => {\n return cached ?? (cached = [failure, ...failures()]);\n };\n }\n };\n function isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === \"function\";\n }\n function isObject(x) {\n return typeof x === \"object\" && x != null;\n }\n function isNonArrayObject(x) {\n return isObject(x) && !Array.isArray(x);\n }\n function print(value) {\n if (typeof value === \"symbol\") {\n return value.toString();\n }\n return typeof value === \"string\" ? JSON.stringify(value) : `${value}`;\n }\n function shiftIterator(input) {\n const { done, value } = input.next();\n return done ? void 0 : value;\n }\n function toFailure(result, context, struct2, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === \"string\") {\n result = { message: result };\n }\n const { path, branch } = context;\n const { type: type2 } = struct2;\n const { refinement, message = `Expected a value of type \\`${type2}\\`${refinement ? ` with refinement \\`${refinement}\\`` : \"\"}, but received: \\`${print(value)}\\`` } = result;\n return {\n value,\n type: type2,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message\n };\n }\n function* toFailures(result, context, struct2, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n for (const r of result) {\n const failure = toFailure(r, context, struct2, value);\n if (failure) {\n yield failure;\n }\n }\n }\n function* run(value, struct2, options = {}) {\n const { path = [], branch = [value], coerce: coerce2 = false, mask: mask2 = false } = options;\n const ctx = { path, branch, mask: mask2 };\n if (coerce2) {\n value = struct2.coercer(value, ctx);\n }\n let status = \"valid\";\n for (const failure of struct2.validator(value, ctx)) {\n failure.explanation = options.message;\n status = \"not_valid\";\n yield [failure, void 0];\n }\n for (let [k, v, s] of struct2.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === void 0 ? path : [...path, k],\n branch: k === void 0 ? branch : [...branch, v],\n coerce: coerce2,\n mask: mask2,\n message: options.message\n });\n for (const t of ts) {\n if (t[0]) {\n status = t[0].refinement != null ? \"not_refined\" : \"not_valid\";\n yield [t[0], void 0];\n } else if (coerce2) {\n v = t[1];\n if (k === void 0) {\n value = v;\n } else if (value instanceof Map) {\n value.set(k, v);\n } else if (value instanceof Set) {\n value.add(v);\n } else if (isObject(value)) {\n if (v !== void 0 || k in value)\n value[k] = v;\n }\n }\n }\n }\n if (status !== \"not_valid\") {\n for (const failure of struct2.refiner(value, ctx)) {\n failure.explanation = options.message;\n status = \"not_refined\";\n yield [failure, void 0];\n }\n }\n if (status === \"valid\") {\n yield [void 0, value];\n }\n }\n var Struct = class {\n constructor(props) {\n const { type: type2, schema, validator, refiner, coercer = (value) => value, entries = function* () {\n } } = props;\n this.type = type2;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.validator = () => [];\n }\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n assert(value, message) {\n return assert(value, this, message);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n create(value, message) {\n return create(value, this, message);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema. Masking applies recursively to\n * props of `object` structs only.\n */\n mask(value, message) {\n return mask(value, this, message);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `coerce` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful. Also, `mask` will turn on\n * masking of the unknown `object` props recursively if passed.\n */\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n };\n function assert(value, struct2, message) {\n const result = validate(value, struct2, { message });\n if (result[0]) {\n throw result[0];\n }\n }\n function create(value, struct2, message) {\n const result = validate(value, struct2, { coerce: true, message });\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n }\n function mask(value, struct2, message) {\n const result = validate(value, struct2, { coerce: true, mask: true, message });\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n }\n function is(value, struct2) {\n const result = validate(value, struct2);\n return !result[0];\n }\n function validate(value, struct2, options = {}) {\n const tuples = run(value, struct2, options);\n const tuple2 = shiftIterator(tuples);\n if (tuple2[0]) {\n const error = new StructError(tuple2[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, void 0];\n } else {\n const v = tuple2[1];\n return [void 0, v];\n }\n }\n function define(name, validator) {\n return new Struct({ type: name, schema: null, validator });\n }\n function any() {\n return define(\"any\", () => true);\n }\n function array(Element) {\n return new Struct({\n type: \"array\",\n schema: Element,\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n validator(value) {\n return Array.isArray(value) || `Expected an array value, but received: ${print(value)}`;\n }\n });\n }\n function boolean() {\n return define(\"boolean\", (value) => {\n return typeof value === \"boolean\";\n });\n }\n function instance(Class) {\n return define(\"instance\", (value) => {\n return value instanceof Class || `Expected a \\`${Class.name}\\` instance, but received: ${print(value)}`;\n });\n }\n function literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: \"literal\",\n schema: t === \"string\" || t === \"number\" || t === \"boolean\" ? constant : null,\n validator(value) {\n return value === constant || `Expected the literal \\`${description}\\`, but received: ${print(value)}`;\n }\n });\n }\n function never() {\n return define(\"never\", () => false);\n }\n function nullable(struct2) {\n return new Struct({\n ...struct2,\n validator: (value, ctx) => value === null || struct2.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct2.refiner(value, ctx)\n });\n }\n function number() {\n return define(\"number\", (value) => {\n return typeof value === \"number\" && !isNaN(value) || `Expected a number, but received: ${print(value)}`;\n });\n }\n function optional(struct2) {\n return new Struct({\n ...struct2,\n validator: (value, ctx) => value === void 0 || struct2.validator(value, ctx),\n refiner: (value, ctx) => value === void 0 || struct2.refiner(value, ctx)\n });\n }\n function record(Key, Value) {\n return new Struct({\n type: \"record\",\n schema: null,\n *entries(value) {\n if (isObject(value)) {\n for (const k in value) {\n const v = value[k];\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n validator(value) {\n return isNonArrayObject(value) || `Expected an object, but received: ${print(value)}`;\n },\n coercer(value) {\n return isNonArrayObject(value) ? { ...value } : value;\n }\n });\n }\n function string() {\n return define(\"string\", (value) => {\n return typeof value === \"string\" || `Expected a string, but received: ${print(value)}`;\n });\n }\n function tuple(Structs) {\n const Never = never();\n return new Struct({\n type: \"tuple\",\n schema: null,\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Structs.length, value.length);\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Structs[i] || Never];\n }\n }\n },\n validator(value) {\n return Array.isArray(value) || `Expected an array, but received: ${print(value)}`;\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n }\n });\n }\n function type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: \"type\",\n schema,\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n validator(value) {\n return isNonArrayObject(value) || `Expected an object, but received: ${print(value)}`;\n },\n coercer(value) {\n return isNonArrayObject(value) ? { ...value } : value;\n }\n });\n }\n function union(Structs) {\n const description = Structs.map((s) => s.type).join(\" | \");\n return new Struct({\n type: \"union\",\n schema: null,\n coercer(value, ctx) {\n for (const S of Structs) {\n const [error, coerced] = S.validate(value, {\n coerce: true,\n mask: ctx.mask\n });\n if (!error) {\n return coerced;\n }\n }\n return value;\n },\n validator(value, ctx) {\n const failures = [];\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n return [\n `Expected the value to satisfy a union of \\`${description}\\`, but received: ${print(value)}`,\n ...failures\n ];\n }\n });\n }\n function unknown() {\n return define(\"unknown\", () => true);\n }\n function coerce(struct2, condition, coercer) {\n return new Struct({\n ...struct2,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct2.coercer(coercer(value, ctx), ctx) : struct2.coercer(value, ctx);\n }\n });\n }\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n var import_browser = __toESM(require_browser());\n\n // ../../../node_modules/.pnpm/rpc-websockets@9.1.3/node_modules/rpc-websockets/dist/index.browser.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n init_buffer();\n\n // ../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n var import_index = __toESM(require_eventemitter3(), 1);\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha3.js\n init_dirname();\n init_buffer2();\n init_process2();\n var _0n6 = BigInt(0);\n var _1n6 = BigInt(1);\n var _2n4 = BigInt(2);\n var _7n2 = BigInt(7);\n var _256n = BigInt(256);\n var _0x71n = BigInt(113);\n var SHA3_PI = [];\n var SHA3_ROTL = [];\n var _SHA3_IOTA = [];\n for (let round = 0, R = _1n6, x = 1, y = 0; round < 24; round++) {\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);\n let t = _0n6;\n for (let j = 0; j < 7; j++) {\n R = (R << _1n6 ^ (R >> _7n2) * _0x71n) % _256n;\n if (R & _2n4)\n t ^= _1n6 << (_1n6 << /* @__PURE__ */ BigInt(j)) - _1n6;\n }\n _SHA3_IOTA.push(t);\n }\n var IOTAS = split(_SHA3_IOTA, true);\n var SHA3_IOTA_H = IOTAS[0];\n var SHA3_IOTA_L = IOTAS[1];\n var rotlH = (h, l, s) => s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s);\n var rotlL = (h, l, s) => s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s);\n function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n for (let round = 24 - rounds; round < 24; round++) {\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n clean(B);\n }\n var Keccak = class _Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n this.enableXOF = false;\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n anumber(outputLen);\n if (!(0 < blockLen && blockLen < 200))\n throw new Error(\"only keccak-f1600 function is supported\");\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n clone() {\n return this._cloneInto();\n }\n keccak() {\n swap32IfBE(this.state32);\n keccakP(this.state32, this.rounds);\n swap32IfBE(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n aexists(this);\n data = toBytes(data);\n abytes(data);\n const { blockLen, state } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n state[pos] ^= suffix;\n if ((suffix & 128) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 128;\n this.keccak();\n }\n writeInto(out) {\n aexists(this, false);\n abytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len; ) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n if (!this.enableXOF)\n throw new Error(\"XOF is not possible for this instance\");\n return this.writeInto(out);\n }\n xof(bytes) {\n anumber(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n aoutput(out, this);\n if (this.finished)\n throw new Error(\"digest() was already called\");\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n clean(this.state);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n };\n var gen = (suffix, blockLen, outputLen) => createHasher(() => new Keccak(blockLen, suffix, outputLen));\n var keccak_256 = /* @__PURE__ */ (() => gen(1, 136, 256 / 8))();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/secp256k1.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/_shortw_utils.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/weierstrass.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js\n init_dirname();\n init_buffer2();\n init_process2();\n var HMAC = class extends Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n ahash(hash);\n const key = toBytes(_key);\n this.iHash = hash.create();\n if (typeof this.iHash.update !== \"function\")\n throw new Error(\"Expected instance of class which extends utils.Hash\");\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad = new Uint8Array(blockLen);\n pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 54;\n this.iHash.update(pad);\n this.oHash = hash.create();\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 54 ^ 92;\n this.oHash.update(pad);\n clean(pad);\n }\n update(buf) {\n aexists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n aexists(this);\n abytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n };\n var hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\n hmac.create = (hash, key) => new HMAC(hash, key);\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/weierstrass.js\n var divNearest = (num, den) => (num + (num >= 0 ? den : -den) / _2n5) / den;\n function _splitEndoScalar(k, basis, n) {\n const [[a1, b1], [a2, b2]] = basis;\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = k - c1 * a1 - c2 * a2;\n let k2 = -c1 * b1 - c2 * b2;\n const k1neg = k1 < _0n7;\n const k2neg = k2 < _0n7;\n if (k1neg)\n k1 = -k1;\n if (k2neg)\n k2 = -k2;\n const MAX_NUM = bitMask(Math.ceil(bitLen(n) / 2)) + _1n7;\n if (k1 < _0n7 || k1 >= MAX_NUM || k2 < _0n7 || k2 >= MAX_NUM) {\n throw new Error(\"splitScalar (endomorphism): failed, k=\" + k);\n }\n return { k1neg, k1, k2neg, k2 };\n }\n function validateSigFormat(format) {\n if (![\"compact\", \"recovered\", \"der\"].includes(format))\n throw new Error('Signature format must be \"compact\", \"recovered\", or \"der\"');\n return format;\n }\n function validateSigOpts(opts, def) {\n const optsn = {};\n for (let optName of Object.keys(def)) {\n optsn[optName] = opts[optName] === void 0 ? def[optName] : opts[optName];\n }\n _abool2(optsn.lowS, \"lowS\");\n _abool2(optsn.prehash, \"prehash\");\n if (optsn.format !== void 0)\n validateSigFormat(optsn.format);\n return optsn;\n }\n var DERErr = class extends Error {\n constructor(m = \"\") {\n super(m);\n }\n };\n var DER = {\n // asn.1 DER encoding utils\n Err: DERErr,\n // Basic building block is TLV (Tag-Length-Value)\n _tlv: {\n encode: (tag, data) => {\n const { Err: E } = DER;\n if (tag < 0 || tag > 256)\n throw new E(\"tlv.encode: wrong tag\");\n if (data.length & 1)\n throw new E(\"tlv.encode: unpadded data\");\n const dataLen = data.length / 2;\n const len = numberToHexUnpadded(dataLen);\n if (len.length / 2 & 128)\n throw new E(\"tlv.encode: long form length too big\");\n const lenLen = dataLen > 127 ? numberToHexUnpadded(len.length / 2 | 128) : \"\";\n const t = numberToHexUnpadded(tag);\n return t + lenLen + len + data;\n },\n // v - value, l - left bytes (unparsed)\n decode(tag, data) {\n const { Err: E } = DER;\n let pos = 0;\n if (tag < 0 || tag > 256)\n throw new E(\"tlv.encode: wrong tag\");\n if (data.length < 2 || data[pos++] !== tag)\n throw new E(\"tlv.decode: wrong tlv\");\n const first = data[pos++];\n const isLong = !!(first & 128);\n let length = 0;\n if (!isLong)\n length = first;\n else {\n const lenLen = first & 127;\n if (!lenLen)\n throw new E(\"tlv.decode(long): indefinite length not supported\");\n if (lenLen > 4)\n throw new E(\"tlv.decode(long): byte length is too big\");\n const lengthBytes = data.subarray(pos, pos + lenLen);\n if (lengthBytes.length !== lenLen)\n throw new E(\"tlv.decode: length bytes not complete\");\n if (lengthBytes[0] === 0)\n throw new E(\"tlv.decode(long): zero leftmost byte\");\n for (const b of lengthBytes)\n length = length << 8 | b;\n pos += lenLen;\n if (length < 128)\n throw new E(\"tlv.decode(long): not minimal encoding\");\n }\n const v = data.subarray(pos, pos + length);\n if (v.length !== length)\n throw new E(\"tlv.decode: wrong value length\");\n return { v, l: data.subarray(pos + length) };\n }\n },\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n _int: {\n encode(num) {\n const { Err: E } = DER;\n if (num < _0n7)\n throw new E(\"integer: negative integers are not allowed\");\n let hex = numberToHexUnpadded(num);\n if (Number.parseInt(hex[0], 16) & 8)\n hex = \"00\" + hex;\n if (hex.length & 1)\n throw new E(\"unexpected DER parsing assertion: unpadded hex\");\n return hex;\n },\n decode(data) {\n const { Err: E } = DER;\n if (data[0] & 128)\n throw new E(\"invalid signature integer: negative\");\n if (data[0] === 0 && !(data[1] & 128))\n throw new E(\"invalid signature integer: unnecessary leading zero\");\n return bytesToNumberBE(data);\n }\n },\n toSig(hex) {\n const { Err: E, _int: int, _tlv: tlv } = DER;\n const data = ensureBytes(\"signature\", hex);\n const { v: seqBytes, l: seqLeftBytes } = tlv.decode(48, data);\n if (seqLeftBytes.length)\n throw new E(\"invalid signature: left bytes after parsing\");\n const { v: rBytes, l: rLeftBytes } = tlv.decode(2, seqBytes);\n const { v: sBytes, l: sLeftBytes } = tlv.decode(2, rLeftBytes);\n if (sLeftBytes.length)\n throw new E(\"invalid signature: left bytes after parsing\");\n return { r: int.decode(rBytes), s: int.decode(sBytes) };\n },\n hexFromSig(sig) {\n const { _tlv: tlv, _int: int } = DER;\n const rs = tlv.encode(2, int.encode(sig.r));\n const ss = tlv.encode(2, int.encode(sig.s));\n const seq2 = rs + ss;\n return tlv.encode(48, seq2);\n }\n };\n var _0n7 = BigInt(0);\n var _1n7 = BigInt(1);\n var _2n5 = BigInt(2);\n var _3n3 = BigInt(3);\n var _4n2 = BigInt(4);\n function _normFnElement(Fn2, key) {\n const { BYTES: expected } = Fn2;\n let num;\n if (typeof key === \"bigint\") {\n num = key;\n } else {\n let bytes = ensureBytes(\"private key\", key);\n try {\n num = Fn2.fromBytes(bytes);\n } catch (error) {\n throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof key}`);\n }\n }\n if (!Fn2.isValidNot0(num))\n throw new Error(\"invalid private key: out of range [1..N-1]\");\n return num;\n }\n function weierstrassN(params, extraOpts = {}) {\n const validated = _createCurveFields(\"weierstrass\", params, extraOpts);\n const { Fp: Fp2, Fn: Fn2 } = validated;\n let CURVE = validated.CURVE;\n const { h: cofactor, n: CURVE_ORDER } = CURVE;\n _validateObject(extraOpts, {}, {\n allowInfinityPoint: \"boolean\",\n clearCofactor: \"function\",\n isTorsionFree: \"function\",\n fromBytes: \"function\",\n toBytes: \"function\",\n endo: \"object\",\n wrapPrivateKey: \"boolean\"\n });\n const { endo } = extraOpts;\n if (endo) {\n if (!Fp2.is0(CURVE.a) || typeof endo.beta !== \"bigint\" || !Array.isArray(endo.basises)) {\n throw new Error('invalid endo: expected \"beta\": bigint and \"basises\": array');\n }\n }\n const lengths = getWLengths(Fp2, Fn2);\n function assertCompressionIsSupported() {\n if (!Fp2.isOdd)\n throw new Error(\"compression is not supported: Field does not have .isOdd()\");\n }\n function pointToBytes(_c, point, isCompressed) {\n const { x, y } = point.toAffine();\n const bx = Fp2.toBytes(x);\n _abool2(isCompressed, \"isCompressed\");\n if (isCompressed) {\n assertCompressionIsSupported();\n const hasEvenY = !Fp2.isOdd(y);\n return concatBytes(pprefix(hasEvenY), bx);\n } else {\n return concatBytes(Uint8Array.of(4), bx, Fp2.toBytes(y));\n }\n }\n function pointFromBytes(bytes) {\n _abytes2(bytes, void 0, \"Point\");\n const { publicKey: comp, publicKeyUncompressed: uncomp } = lengths;\n const length = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (length === comp && (head === 2 || head === 3)) {\n const x = Fp2.fromBytes(tail);\n if (!Fp2.isValid(x))\n throw new Error(\"bad point: is not on curve, wrong x\");\n const y2 = weierstrassEquation(x);\n let y;\n try {\n y = Fp2.sqrt(y2);\n } catch (sqrtError) {\n const err = sqrtError instanceof Error ? \": \" + sqrtError.message : \"\";\n throw new Error(\"bad point: is not on curve, sqrt error\" + err);\n }\n assertCompressionIsSupported();\n const isYOdd = Fp2.isOdd(y);\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y = Fp2.neg(y);\n return { x, y };\n } else if (length === uncomp && head === 4) {\n const L = Fp2.BYTES;\n const x = Fp2.fromBytes(tail.subarray(0, L));\n const y = Fp2.fromBytes(tail.subarray(L, L * 2));\n if (!isValidXY(x, y))\n throw new Error(\"bad point: is not on curve\");\n return { x, y };\n } else {\n throw new Error(`bad point: got length ${length}, expected compressed=${comp} or uncompressed=${uncomp}`);\n }\n }\n const encodePoint = extraOpts.toBytes || pointToBytes;\n const decodePoint = extraOpts.fromBytes || pointFromBytes;\n function weierstrassEquation(x) {\n const x2 = Fp2.sqr(x);\n const x3 = Fp2.mul(x2, x);\n return Fp2.add(Fp2.add(x3, Fp2.mul(x, CURVE.a)), CURVE.b);\n }\n function isValidXY(x, y) {\n const left = Fp2.sqr(y);\n const right = weierstrassEquation(x);\n return Fp2.eql(left, right);\n }\n if (!isValidXY(CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n const _4a3 = Fp2.mul(Fp2.pow(CURVE.a, _3n3), _4n2);\n const _27b2 = Fp2.mul(Fp2.sqr(CURVE.b), BigInt(27));\n if (Fp2.is0(Fp2.add(_4a3, _27b2)))\n throw new Error(\"bad curve params: a or b\");\n function acoord(title, n, banZero = false) {\n if (!Fp2.isValid(n) || banZero && Fp2.is0(n))\n throw new Error(`bad point coordinate ${title}`);\n return n;\n }\n function aprjpoint(other) {\n if (!(other instanceof Point))\n throw new Error(\"ProjectivePoint expected\");\n }\n function splitEndoScalarN(k) {\n if (!endo || !endo.basises)\n throw new Error(\"no endo\");\n return _splitEndoScalar(k, endo.basises, Fn2.ORDER);\n }\n const toAffineMemo = memoized((p, iz) => {\n const { X, Y, Z } = p;\n if (Fp2.eql(Z, Fp2.ONE))\n return { x: X, y: Y };\n const is0 = p.is0();\n if (iz == null)\n iz = is0 ? Fp2.ONE : Fp2.inv(Z);\n const x = Fp2.mul(X, iz);\n const y = Fp2.mul(Y, iz);\n const zz = Fp2.mul(Z, iz);\n if (is0)\n return { x: Fp2.ZERO, y: Fp2.ZERO };\n if (!Fp2.eql(zz, Fp2.ONE))\n throw new Error(\"invZ was invalid\");\n return { x, y };\n });\n const assertValidMemo = memoized((p) => {\n if (p.is0()) {\n if (extraOpts.allowInfinityPoint && !Fp2.is0(p.Y))\n return;\n throw new Error(\"bad point: ZERO\");\n }\n const { x, y } = p.toAffine();\n if (!Fp2.isValid(x) || !Fp2.isValid(y))\n throw new Error(\"bad point: x or y not field elements\");\n if (!isValidXY(x, y))\n throw new Error(\"bad point: equation left != right\");\n if (!p.isTorsionFree())\n throw new Error(\"bad point: not in prime-order subgroup\");\n return true;\n });\n function finishEndo(endoBeta, k1p, k2p, k1neg, k2neg) {\n k2p = new Point(Fp2.mul(k2p.X, endoBeta), k2p.Y, k2p.Z);\n k1p = negateCt(k1neg, k1p);\n k2p = negateCt(k2neg, k2p);\n return k1p.add(k2p);\n }\n class Point {\n /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n constructor(X, Y, Z) {\n this.X = acoord(\"x\", X);\n this.Y = acoord(\"y\", Y, true);\n this.Z = acoord(\"z\", Z);\n Object.freeze(this);\n }\n static CURVE() {\n return CURVE;\n }\n /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n static fromAffine(p) {\n const { x, y } = p || {};\n if (!p || !Fp2.isValid(x) || !Fp2.isValid(y))\n throw new Error(\"invalid affine point\");\n if (p instanceof Point)\n throw new Error(\"projective point not allowed\");\n if (Fp2.is0(x) && Fp2.is0(y))\n return Point.ZERO;\n return new Point(x, y, Fp2.ONE);\n }\n static fromBytes(bytes) {\n const P = Point.fromAffine(decodePoint(_abytes2(bytes, void 0, \"point\")));\n P.assertValidity();\n return P;\n }\n static fromHex(hex) {\n return Point.fromBytes(ensureBytes(\"pointHex\", hex));\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n *\n * @param windowSize\n * @param isLazy true will defer table computation until the first multiplication\n * @returns\n */\n precompute(windowSize = 8, isLazy = true) {\n wnaf.createCache(this, windowSize);\n if (!isLazy)\n this.multiply(_3n3);\n return this;\n }\n // TODO: return `this`\n /** A point on curve is valid if it conforms to equation. */\n assertValidity() {\n assertValidMemo(this);\n }\n hasEvenY() {\n const { y } = this.toAffine();\n if (!Fp2.isOdd)\n throw new Error(\"Field doesn't support isOdd\");\n return !Fp2.isOdd(y);\n }\n /** Compare one point to another. */\n equals(other) {\n aprjpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n const U1 = Fp2.eql(Fp2.mul(X1, Z2), Fp2.mul(X2, Z1));\n const U2 = Fp2.eql(Fp2.mul(Y1, Z2), Fp2.mul(Y2, Z1));\n return U1 && U2;\n }\n /** Flips point to one corresponding to (x, -y) in Affine coordinates. */\n negate() {\n return new Point(this.X, Fp2.neg(this.Y), this.Z);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a, b } = CURVE;\n const b3 = Fp2.mul(b, _3n3);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n let X3 = Fp2.ZERO, Y3 = Fp2.ZERO, Z3 = Fp2.ZERO;\n let t0 = Fp2.mul(X1, X1);\n let t1 = Fp2.mul(Y1, Y1);\n let t2 = Fp2.mul(Z1, Z1);\n let t3 = Fp2.mul(X1, Y1);\n t3 = Fp2.add(t3, t3);\n Z3 = Fp2.mul(X1, Z1);\n Z3 = Fp2.add(Z3, Z3);\n X3 = Fp2.mul(a, Z3);\n Y3 = Fp2.mul(b3, t2);\n Y3 = Fp2.add(X3, Y3);\n X3 = Fp2.sub(t1, Y3);\n Y3 = Fp2.add(t1, Y3);\n Y3 = Fp2.mul(X3, Y3);\n X3 = Fp2.mul(t3, X3);\n Z3 = Fp2.mul(b3, Z3);\n t2 = Fp2.mul(a, t2);\n t3 = Fp2.sub(t0, t2);\n t3 = Fp2.mul(a, t3);\n t3 = Fp2.add(t3, Z3);\n Z3 = Fp2.add(t0, t0);\n t0 = Fp2.add(Z3, t0);\n t0 = Fp2.add(t0, t2);\n t0 = Fp2.mul(t0, t3);\n Y3 = Fp2.add(Y3, t0);\n t2 = Fp2.mul(Y1, Z1);\n t2 = Fp2.add(t2, t2);\n t0 = Fp2.mul(t2, t3);\n X3 = Fp2.sub(X3, t0);\n Z3 = Fp2.mul(t2, t1);\n Z3 = Fp2.add(Z3, Z3);\n Z3 = Fp2.add(Z3, Z3);\n return new Point(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n aprjpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n let X3 = Fp2.ZERO, Y3 = Fp2.ZERO, Z3 = Fp2.ZERO;\n const a = CURVE.a;\n const b3 = Fp2.mul(CURVE.b, _3n3);\n let t0 = Fp2.mul(X1, X2);\n let t1 = Fp2.mul(Y1, Y2);\n let t2 = Fp2.mul(Z1, Z2);\n let t3 = Fp2.add(X1, Y1);\n let t4 = Fp2.add(X2, Y2);\n t3 = Fp2.mul(t3, t4);\n t4 = Fp2.add(t0, t1);\n t3 = Fp2.sub(t3, t4);\n t4 = Fp2.add(X1, Z1);\n let t5 = Fp2.add(X2, Z2);\n t4 = Fp2.mul(t4, t5);\n t5 = Fp2.add(t0, t2);\n t4 = Fp2.sub(t4, t5);\n t5 = Fp2.add(Y1, Z1);\n X3 = Fp2.add(Y2, Z2);\n t5 = Fp2.mul(t5, X3);\n X3 = Fp2.add(t1, t2);\n t5 = Fp2.sub(t5, X3);\n Z3 = Fp2.mul(a, t4);\n X3 = Fp2.mul(b3, t2);\n Z3 = Fp2.add(X3, Z3);\n X3 = Fp2.sub(t1, Z3);\n Z3 = Fp2.add(t1, Z3);\n Y3 = Fp2.mul(X3, Z3);\n t1 = Fp2.add(t0, t0);\n t1 = Fp2.add(t1, t0);\n t2 = Fp2.mul(a, t2);\n t4 = Fp2.mul(b3, t4);\n t1 = Fp2.add(t1, t2);\n t2 = Fp2.sub(t0, t2);\n t2 = Fp2.mul(a, t2);\n t4 = Fp2.add(t4, t2);\n t0 = Fp2.mul(t1, t4);\n Y3 = Fp2.add(Y3, t0);\n t0 = Fp2.mul(t5, t4);\n X3 = Fp2.mul(t3, X3);\n X3 = Fp2.sub(X3, t0);\n t0 = Fp2.mul(t3, t1);\n Z3 = Fp2.mul(t5, Z3);\n Z3 = Fp2.add(Z3, t0);\n return new Point(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n const { endo: endo2 } = extraOpts;\n if (!Fn2.isValidNot0(scalar))\n throw new Error(\"invalid scalar: out of range\");\n let point, fake;\n const mul = (n) => wnaf.cached(this, n, (p) => normalizeZ(Point, p));\n if (endo2) {\n const { k1neg, k1, k2neg, k2 } = splitEndoScalarN(scalar);\n const { p: k1p, f: k1f } = mul(k1);\n const { p: k2p, f: k2f } = mul(k2);\n fake = k1f.add(k2f);\n point = finishEndo(endo2.beta, k1p, k2p, k1neg, k2neg);\n } else {\n const { p, f: f2 } = mul(scalar);\n point = p;\n fake = f2;\n }\n return normalizeZ(Point, [point, fake])[0];\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed secret key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(sc) {\n const { endo: endo2 } = extraOpts;\n const p = this;\n if (!Fn2.isValid(sc))\n throw new Error(\"invalid scalar: out of range\");\n if (sc === _0n7 || p.is0())\n return Point.ZERO;\n if (sc === _1n7)\n return p;\n if (wnaf.hasCache(this))\n return this.multiply(sc);\n if (endo2) {\n const { k1neg, k1, k2neg, k2 } = splitEndoScalarN(sc);\n const { p1, p2 } = mulEndoUnsafe(Point, p, k1, k2);\n return finishEndo(endo2.beta, p1, p2, k1neg, k2neg);\n } else {\n return wnaf.unsafe(p, sc);\n }\n }\n multiplyAndAddUnsafe(Q, a, b) {\n const sum = this.multiplyUnsafe(a).add(Q.multiplyUnsafe(b));\n return sum.is0() ? void 0 : sum;\n }\n /**\n * Converts Projective point to affine (x, y) coordinates.\n * @param invertedZ Z^-1 (inverted zero) - optional, precomputation is useful for invertBatch\n */\n toAffine(invertedZ) {\n return toAffineMemo(this, invertedZ);\n }\n /**\n * Checks whether Point is free of torsion elements (is in prime subgroup).\n * Always torsion-free for cofactor=1 curves.\n */\n isTorsionFree() {\n const { isTorsionFree } = extraOpts;\n if (cofactor === _1n7)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point, this);\n return wnaf.unsafe(this, CURVE_ORDER).is0();\n }\n clearCofactor() {\n const { clearCofactor } = extraOpts;\n if (cofactor === _1n7)\n return this;\n if (clearCofactor)\n return clearCofactor(Point, this);\n return this.multiplyUnsafe(cofactor);\n }\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n toBytes(isCompressed = true) {\n _abool2(isCompressed, \"isCompressed\");\n this.assertValidity();\n return encodePoint(Point, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return bytesToHex(this.toBytes(isCompressed));\n }\n toString() {\n return ``;\n }\n // TODO: remove\n get px() {\n return this.X;\n }\n get py() {\n return this.X;\n }\n get pz() {\n return this.Z;\n }\n toRawBytes(isCompressed = true) {\n return this.toBytes(isCompressed);\n }\n _setWindowSize(windowSize) {\n this.precompute(windowSize);\n }\n static normalizeZ(points) {\n return normalizeZ(Point, points);\n }\n static msm(points, scalars) {\n return pippenger(Point, Fn2, points, scalars);\n }\n static fromPrivateKey(privateKey) {\n return Point.BASE.multiply(_normFnElement(Fn2, privateKey));\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp2.ONE);\n Point.ZERO = new Point(Fp2.ZERO, Fp2.ONE, Fp2.ZERO);\n Point.Fp = Fp2;\n Point.Fn = Fn2;\n const bits = Fn2.BITS;\n const wnaf = new wNAF(Point, extraOpts.endo ? Math.ceil(bits / 2) : bits);\n Point.BASE.precompute(8);\n return Point;\n }\n function pprefix(hasEvenY) {\n return Uint8Array.of(hasEvenY ? 2 : 3);\n }\n function getWLengths(Fp2, Fn2) {\n return {\n secretKey: Fn2.BYTES,\n publicKey: 1 + Fp2.BYTES,\n publicKeyUncompressed: 1 + 2 * Fp2.BYTES,\n publicKeyHasPrefix: true,\n signature: 2 * Fn2.BYTES\n };\n }\n function ecdh(Point, ecdhOpts = {}) {\n const { Fn: Fn2 } = Point;\n const randomBytes_ = ecdhOpts.randomBytes || randomBytes;\n const lengths = Object.assign(getWLengths(Point.Fp, Fn2), { seed: getMinHashLength(Fn2.ORDER) });\n function isValidSecretKey(secretKey) {\n try {\n return !!_normFnElement(Fn2, secretKey);\n } catch (error) {\n return false;\n }\n }\n function isValidPublicKey(publicKey2, isCompressed) {\n const { publicKey: comp, publicKeyUncompressed } = lengths;\n try {\n const l = publicKey2.length;\n if (isCompressed === true && l !== comp)\n return false;\n if (isCompressed === false && l !== publicKeyUncompressed)\n return false;\n return !!Point.fromBytes(publicKey2);\n } catch (error) {\n return false;\n }\n }\n function randomSecretKey(seed = randomBytes_(lengths.seed)) {\n return mapHashToField(_abytes2(seed, lengths.seed, \"seed\"), Fn2.ORDER);\n }\n function getPublicKey2(secretKey, isCompressed = true) {\n return Point.BASE.multiply(_normFnElement(Fn2, secretKey)).toBytes(isCompressed);\n }\n function keygen(seed) {\n const secretKey = randomSecretKey(seed);\n return { secretKey, publicKey: getPublicKey2(secretKey) };\n }\n function isProbPub(item) {\n if (typeof item === \"bigint\")\n return false;\n if (item instanceof Point)\n return true;\n const { secretKey, publicKey: publicKey2, publicKeyUncompressed } = lengths;\n if (Fn2.allowedLengths || secretKey === publicKey2)\n return void 0;\n const l = ensureBytes(\"key\", item).length;\n return l === publicKey2 || l === publicKeyUncompressed;\n }\n function getSharedSecret(secretKeyA, publicKeyB, isCompressed = true) {\n if (isProbPub(secretKeyA) === true)\n throw new Error(\"first arg must be private key\");\n if (isProbPub(publicKeyB) === false)\n throw new Error(\"second arg must be public key\");\n const s = _normFnElement(Fn2, secretKeyA);\n const b = Point.fromHex(publicKeyB);\n return b.multiply(s).toBytes(isCompressed);\n }\n const utils = {\n isValidSecretKey,\n isValidPublicKey,\n randomSecretKey,\n // TODO: remove\n isValidPrivateKey: isValidSecretKey,\n randomPrivateKey: randomSecretKey,\n normPrivateKeyToScalar: (key) => _normFnElement(Fn2, key),\n precompute(windowSize = 8, point = Point.BASE) {\n return point.precompute(windowSize, false);\n }\n };\n return Object.freeze({ getPublicKey: getPublicKey2, getSharedSecret, keygen, Point, utils, lengths });\n }\n function ecdsa(Point, hash, ecdsaOpts = {}) {\n ahash(hash);\n _validateObject(ecdsaOpts, {}, {\n hmac: \"function\",\n lowS: \"boolean\",\n randomBytes: \"function\",\n bits2int: \"function\",\n bits2int_modN: \"function\"\n });\n const randomBytes2 = ecdsaOpts.randomBytes || randomBytes;\n const hmac2 = ecdsaOpts.hmac || ((key, ...msgs) => hmac(hash, key, concatBytes(...msgs)));\n const { Fp: Fp2, Fn: Fn2 } = Point;\n const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn2;\n const { keygen, getPublicKey: getPublicKey2, getSharedSecret, utils, lengths } = ecdh(Point, ecdsaOpts);\n const defaultSigOpts = {\n prehash: false,\n lowS: typeof ecdsaOpts.lowS === \"boolean\" ? ecdsaOpts.lowS : false,\n format: void 0,\n //'compact' as ECDSASigFormat,\n extraEntropy: false\n };\n const defaultSigOpts_format = \"compact\";\n function isBiggerThanHalfOrder(number2) {\n const HALF = CURVE_ORDER >> _1n7;\n return number2 > HALF;\n }\n function validateRS(title, num) {\n if (!Fn2.isValidNot0(num))\n throw new Error(`invalid signature ${title}: out of range 1..Point.Fn.ORDER`);\n return num;\n }\n function validateSigLength(bytes, format) {\n validateSigFormat(format);\n const size = lengths.signature;\n const sizer = format === \"compact\" ? size : format === \"recovered\" ? size + 1 : void 0;\n return _abytes2(bytes, sizer, `${format} signature`);\n }\n class Signature {\n constructor(r, s, recovery) {\n this.r = validateRS(\"r\", r);\n this.s = validateRS(\"s\", s);\n if (recovery != null)\n this.recovery = recovery;\n Object.freeze(this);\n }\n static fromBytes(bytes, format = defaultSigOpts_format) {\n validateSigLength(bytes, format);\n let recid;\n if (format === \"der\") {\n const { r: r2, s: s2 } = DER.toSig(_abytes2(bytes));\n return new Signature(r2, s2);\n }\n if (format === \"recovered\") {\n recid = bytes[0];\n format = \"compact\";\n bytes = bytes.subarray(1);\n }\n const L = Fn2.BYTES;\n const r = bytes.subarray(0, L);\n const s = bytes.subarray(L, L * 2);\n return new Signature(Fn2.fromBytes(r), Fn2.fromBytes(s), recid);\n }\n static fromHex(hex, format) {\n return this.fromBytes(hexToBytes(hex), format);\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(messageHash) {\n const FIELD_ORDER = Fp2.ORDER;\n const { r, s, recovery: rec } = this;\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error(\"recovery id invalid\");\n const hasCofactor = CURVE_ORDER * _2n5 < FIELD_ORDER;\n if (hasCofactor && rec > 1)\n throw new Error(\"recovery id is ambiguous for h>1 curve\");\n const radj = rec === 2 || rec === 3 ? r + CURVE_ORDER : r;\n if (!Fp2.isValid(radj))\n throw new Error(\"recovery id 2 or 3 invalid\");\n const x = Fp2.toBytes(radj);\n const R = Point.fromBytes(concatBytes(pprefix((rec & 1) === 0), x));\n const ir = Fn2.inv(radj);\n const h = bits2int_modN(ensureBytes(\"msgHash\", messageHash));\n const u1 = Fn2.create(-h * ir);\n const u2 = Fn2.create(s * ir);\n const Q = Point.BASE.multiplyUnsafe(u1).add(R.multiplyUnsafe(u2));\n if (Q.is0())\n throw new Error(\"point at infinify\");\n Q.assertValidity();\n return Q;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n toBytes(format = defaultSigOpts_format) {\n validateSigFormat(format);\n if (format === \"der\")\n return hexToBytes(DER.hexFromSig(this));\n const r = Fn2.toBytes(this.r);\n const s = Fn2.toBytes(this.s);\n if (format === \"recovered\") {\n if (this.recovery == null)\n throw new Error(\"recovery bit must be present\");\n return concatBytes(Uint8Array.of(this.recovery), r, s);\n }\n return concatBytes(r, s);\n }\n toHex(format) {\n return bytesToHex(this.toBytes(format));\n }\n // TODO: remove\n assertValidity() {\n }\n static fromCompact(hex) {\n return Signature.fromBytes(ensureBytes(\"sig\", hex), \"compact\");\n }\n static fromDER(hex) {\n return Signature.fromBytes(ensureBytes(\"sig\", hex), \"der\");\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, Fn2.neg(this.s), this.recovery) : this;\n }\n toDERRawBytes() {\n return this.toBytes(\"der\");\n }\n toDERHex() {\n return bytesToHex(this.toBytes(\"der\"));\n }\n toCompactRawBytes() {\n return this.toBytes(\"compact\");\n }\n toCompactHex() {\n return bytesToHex(this.toBytes(\"compact\"));\n }\n }\n const bits2int = ecdsaOpts.bits2int || function bits2int_def(bytes) {\n if (bytes.length > 8192)\n throw new Error(\"input is too large\");\n const num = bytesToNumberBE(bytes);\n const delta = bytes.length * 8 - fnBits;\n return delta > 0 ? num >> BigInt(delta) : num;\n };\n const bits2int_modN = ecdsaOpts.bits2int_modN || function bits2int_modN_def(bytes) {\n return Fn2.create(bits2int(bytes));\n };\n const ORDER_MASK = bitMask(fnBits);\n function int2octets(num) {\n aInRange(\"num < 2^\" + fnBits, num, _0n7, ORDER_MASK);\n return Fn2.toBytes(num);\n }\n function validateMsgAndHash(message, prehash) {\n _abytes2(message, void 0, \"message\");\n return prehash ? _abytes2(hash(message), void 0, \"prehashed message\") : message;\n }\n function prepSig(message, privateKey, opts) {\n if ([\"recovered\", \"canonical\"].some((k) => k in opts))\n throw new Error(\"sign() legacy options not supported\");\n const { lowS, prehash, extraEntropy } = validateSigOpts(opts, defaultSigOpts);\n message = validateMsgAndHash(message, prehash);\n const h1int = bits2int_modN(message);\n const d = _normFnElement(Fn2, privateKey);\n const seedArgs = [int2octets(d), int2octets(h1int)];\n if (extraEntropy != null && extraEntropy !== false) {\n const e = extraEntropy === true ? randomBytes2(lengths.secretKey) : extraEntropy;\n seedArgs.push(ensureBytes(\"extraEntropy\", e));\n }\n const seed = concatBytes(...seedArgs);\n const m = h1int;\n function k2sig(kBytes) {\n const k = bits2int(kBytes);\n if (!Fn2.isValidNot0(k))\n return;\n const ik = Fn2.inv(k);\n const q = Point.BASE.multiply(k).toAffine();\n const r = Fn2.create(q.x);\n if (r === _0n7)\n return;\n const s = Fn2.create(ik * Fn2.create(m + r * d));\n if (s === _0n7)\n return;\n let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n7);\n let normS = s;\n if (lowS && isBiggerThanHalfOrder(s)) {\n normS = Fn2.neg(s);\n recovery ^= 1;\n }\n return new Signature(r, normS, recovery);\n }\n return { seed, k2sig };\n }\n function sign2(message, secretKey, opts = {}) {\n message = ensureBytes(\"message\", message);\n const { seed, k2sig } = prepSig(message, secretKey, opts);\n const drbg = createHmacDrbg(hash.outputLen, Fn2.BYTES, hmac2);\n const sig = drbg(seed, k2sig);\n return sig;\n }\n function tryParsingSig(sg) {\n let sig = void 0;\n const isHex = typeof sg === \"string\" || isBytes(sg);\n const isObj = !isHex && sg !== null && typeof sg === \"object\" && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\";\n if (!isHex && !isObj)\n throw new Error(\"invalid signature, expected Uint8Array, hex string or Signature instance\");\n if (isObj) {\n sig = new Signature(sg.r, sg.s);\n } else if (isHex) {\n try {\n sig = Signature.fromBytes(ensureBytes(\"sig\", sg), \"der\");\n } catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n }\n if (!sig) {\n try {\n sig = Signature.fromBytes(ensureBytes(\"sig\", sg), \"compact\");\n } catch (error) {\n return false;\n }\n }\n }\n if (!sig)\n return false;\n return sig;\n }\n function verify2(signature, message, publicKey2, opts = {}) {\n const { lowS, prehash, format } = validateSigOpts(opts, defaultSigOpts);\n publicKey2 = ensureBytes(\"publicKey\", publicKey2);\n message = validateMsgAndHash(ensureBytes(\"message\", message), prehash);\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n const sig = format === void 0 ? tryParsingSig(signature) : Signature.fromBytes(ensureBytes(\"sig\", signature), format);\n if (sig === false)\n return false;\n try {\n const P = Point.fromBytes(publicKey2);\n if (lowS && sig.hasHighS())\n return false;\n const { r, s } = sig;\n const h = bits2int_modN(message);\n const is2 = Fn2.inv(s);\n const u1 = Fn2.create(h * is2);\n const u2 = Fn2.create(r * is2);\n const R = Point.BASE.multiplyUnsafe(u1).add(P.multiplyUnsafe(u2));\n if (R.is0())\n return false;\n const v = Fn2.create(R.x);\n return v === r;\n } catch (e) {\n return false;\n }\n }\n function recoverPublicKey(signature, message, opts = {}) {\n const { prehash } = validateSigOpts(opts, defaultSigOpts);\n message = validateMsgAndHash(message, prehash);\n return Signature.fromBytes(signature, \"recovered\").recoverPublicKey(message).toBytes();\n }\n return Object.freeze({\n keygen,\n getPublicKey: getPublicKey2,\n getSharedSecret,\n utils,\n lengths,\n Point,\n sign: sign2,\n verify: verify2,\n recoverPublicKey,\n Signature,\n hash\n });\n }\n function _weierstrass_legacy_opts_to_new(c) {\n const CURVE = {\n a: c.a,\n b: c.b,\n p: c.Fp.ORDER,\n n: c.n,\n h: c.h,\n Gx: c.Gx,\n Gy: c.Gy\n };\n const Fp2 = c.Fp;\n let allowedLengths = c.allowedPrivateKeyLengths ? Array.from(new Set(c.allowedPrivateKeyLengths.map((l) => Math.ceil(l / 2)))) : void 0;\n const Fn2 = Field(CURVE.n, {\n BITS: c.nBitLength,\n allowedLengths,\n modFromBytes: c.wrapPrivateKey\n });\n const curveOpts = {\n Fp: Fp2,\n Fn: Fn2,\n allowInfinityPoint: c.allowInfinityPoint,\n endo: c.endo,\n isTorsionFree: c.isTorsionFree,\n clearCofactor: c.clearCofactor,\n fromBytes: c.fromBytes,\n toBytes: c.toBytes\n };\n return { CURVE, curveOpts };\n }\n function _ecdsa_legacy_opts_to_new(c) {\n const { CURVE, curveOpts } = _weierstrass_legacy_opts_to_new(c);\n const ecdsaOpts = {\n hmac: c.hmac,\n randomBytes: c.randomBytes,\n lowS: c.lowS,\n bits2int: c.bits2int,\n bits2int_modN: c.bits2int_modN\n };\n return { CURVE, curveOpts, hash: c.hash, ecdsaOpts };\n }\n function _ecdsa_new_output_to_legacy(c, _ecdsa) {\n const Point = _ecdsa.Point;\n return Object.assign({}, _ecdsa, {\n ProjectivePoint: Point,\n CURVE: Object.assign({}, c, nLength(Point.Fn.ORDER, Point.Fn.BITS))\n });\n }\n function weierstrass(c) {\n const { CURVE, curveOpts, hash, ecdsaOpts } = _ecdsa_legacy_opts_to_new(c);\n const Point = weierstrassN(CURVE, curveOpts);\n const signs = ecdsa(Point, hash, ecdsaOpts);\n return _ecdsa_new_output_to_legacy(c, signs);\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/_shortw_utils.js\n function createCurve(curveDef, defHash) {\n const create2 = (hash) => weierstrass({ ...curveDef, hash });\n return { ...create2(defHash), create: create2 };\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/secp256k1.js\n var secp256k1_CURVE = {\n p: BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),\n n: BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),\n h: BigInt(1),\n a: BigInt(0),\n b: BigInt(7),\n Gx: BigInt(\"0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\"),\n Gy: BigInt(\"0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\")\n };\n var secp256k1_ENDO = {\n beta: BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),\n basises: [\n [BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"), -BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\")],\n [BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"), BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\")]\n ]\n };\n var _2n6 = /* @__PURE__ */ BigInt(2);\n function sqrtMod(y) {\n const P = secp256k1_CURVE.p;\n const _3n4 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b2 = y * y * y % P;\n const b3 = b2 * b2 * y % P;\n const b6 = pow2(b3, _3n4, P) * b3 % P;\n const b9 = pow2(b6, _3n4, P) * b3 % P;\n const b11 = pow2(b9, _2n6, P) * b2 % P;\n const b22 = pow2(b11, _11n, P) * b11 % P;\n const b44 = pow2(b22, _22n, P) * b22 % P;\n const b88 = pow2(b44, _44n, P) * b44 % P;\n const b176 = pow2(b88, _88n, P) * b88 % P;\n const b220 = pow2(b176, _44n, P) * b44 % P;\n const b223 = pow2(b220, _3n4, P) * b3 % P;\n const t1 = pow2(b223, _23n, P) * b22 % P;\n const t2 = pow2(t1, _6n, P) * b2 % P;\n const root = pow2(t2, _2n6, P);\n if (!Fpk1.eql(Fpk1.sqr(root), y))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n var Fpk1 = Field(secp256k1_CURVE.p, { sqrt: sqrtMod });\n var secp256k1 = createCurve({ ...secp256k1_CURVE, Fp: Fpk1, lowS: true, endo: secp256k1_ENDO }, sha256);\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n var generatePrivateKey = ed25519.utils.randomPrivateKey;\n var generateKeypair = () => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey2 = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey2, 32);\n return {\n publicKey: publicKey2,\n secretKey\n };\n };\n var getPublicKey = ed25519.getPublicKey;\n function isOnCurve(publicKey2) {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey2);\n return true;\n } catch {\n return false;\n }\n }\n var sign = (message, secretKey) => ed25519.sign(message, secretKey.slice(0, 32));\n var verify = ed25519.verify;\n var toBuffer = (arr) => {\n if (Buffer2.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer2.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer2.from(arr);\n }\n };\n var Struct2 = class {\n constructor(properties) {\n Object.assign(this, properties);\n }\n encode() {\n return Buffer2.from((0, import_borsh.serialize)(SOLANA_SCHEMA, this));\n }\n static decode(data) {\n return (0, import_borsh.deserialize)(SOLANA_SCHEMA, this, data);\n }\n static decodeUnchecked(data) {\n return (0, import_borsh.deserializeUnchecked)(SOLANA_SCHEMA, this, data);\n }\n };\n var SOLANA_SCHEMA = /* @__PURE__ */ new Map();\n var _PublicKey;\n var MAX_SEED_LENGTH = 32;\n var PUBLIC_KEY_LENGTH = 32;\n function isPublicKeyData(value) {\n return value._bn !== void 0;\n }\n var uniquePublicKeyCounter = 1;\n var PublicKey = class _PublicKey2 extends Struct2 {\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value) {\n super({});\n this._bn = void 0;\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === \"string\") {\n const decoded = import_bs58.default.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new import_bn.default(decoded);\n } else {\n this._bn = new import_bn.default(value);\n }\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique() {\n const key = new _PublicKey2(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new _PublicKey2(key.toBuffer());\n }\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey2) {\n return this._bn.eq(publicKey2._bn);\n }\n /**\n * Return the base-58 representation of the public key\n */\n toBase58() {\n return import_bs58.default.encode(this.toBytes());\n }\n toJSON() {\n return this.toBase58();\n }\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes() {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer() {\n const b = this._bn.toArrayLike(Buffer2);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n const zeroPad = Buffer2.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n get [Symbol.toStringTag]() {\n return `PublicKey(${this.toString()})`;\n }\n /**\n * Return the base-58 representation of the public key\n */\n toString() {\n return this.toBase58();\n }\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(fromPublicKey, seed, programId) {\n const buffer = Buffer2.concat([fromPublicKey.toBuffer(), Buffer2.from(seed), programId.toBuffer()]);\n const publicKeyBytes = sha2562(buffer);\n return new _PublicKey2(publicKeyBytes);\n }\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(seeds, programId) {\n let buffer = Buffer2.alloc(0);\n seeds.forEach(function(seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer2.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer2.concat([buffer, programId.toBuffer(), Buffer2.from(\"ProgramDerivedAddress\")]);\n const publicKeyBytes = sha2562(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new _PublicKey2(publicKeyBytes);\n }\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(seeds, programId) {\n return this.createProgramAddressSync(seeds, programId);\n }\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(seeds, programId) {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer2.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(seeds, programId) {\n return this.findProgramAddressSync(seeds, programId);\n }\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData) {\n const pubkey = new _PublicKey2(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n };\n _PublicKey = PublicKey;\n PublicKey.default = new _PublicKey(\"11111111111111111111111111111111\");\n SOLANA_SCHEMA.set(PublicKey, {\n kind: \"struct\",\n fields: [[\"_bn\", \"u256\"]]\n });\n var BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\"BPFLoader1111111111111111111111111111111111\");\n var PACKET_DATA_SIZE = 1280 - 40 - 8;\n var VERSION_PREFIX_MASK = 127;\n var SIGNATURE_LENGTH_IN_BYTES = 64;\n var TransactionExpiredBlockheightExceededError = class extends Error {\n constructor(signature) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = void 0;\n this.signature = signature;\n }\n };\n Object.defineProperty(TransactionExpiredBlockheightExceededError.prototype, \"name\", {\n value: \"TransactionExpiredBlockheightExceededError\"\n });\n var TransactionExpiredTimeoutError = class extends Error {\n constructor(signature, timeoutSeconds) {\n super(`Transaction was not confirmed in ${timeoutSeconds.toFixed(2)} seconds. It is unknown if it succeeded or failed. Check signature ${signature} using the Solana Explorer or CLI tools.`);\n this.signature = void 0;\n this.signature = signature;\n }\n };\n Object.defineProperty(TransactionExpiredTimeoutError.prototype, \"name\", {\n value: \"TransactionExpiredTimeoutError\"\n });\n var TransactionExpiredNonceInvalidError = class extends Error {\n constructor(signature) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = void 0;\n this.signature = signature;\n }\n };\n Object.defineProperty(TransactionExpiredNonceInvalidError.prototype, \"name\", {\n value: \"TransactionExpiredNonceInvalidError\"\n });\n var MessageAccountKeys = class {\n constructor(staticAccountKeys, accountKeysFromLookups) {\n this.staticAccountKeys = void 0;\n this.accountKeysFromLookups = void 0;\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n keySegments() {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n get(index) {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n get length() {\n return this.keySegments().flat().length;\n }\n compileInstructions(instructions) {\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error(\"Account index overflow encountered during compilation\");\n }\n const keyIndexMap = /* @__PURE__ */ new Map();\n this.keySegments().flat().forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n const findKeyIndex = (key) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === void 0)\n throw new Error(\"Encountered an unknown instruction account key during compilation\");\n return keyIndex;\n };\n return instructions.map((instruction) => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map((meta) => findKeyIndex(meta.pubkey)),\n data: instruction.data\n };\n });\n }\n };\n var publicKey = (property = \"publicKey\") => {\n return BufferLayout.blob(32, property);\n };\n var rustString = (property = \"string\") => {\n const rsl = BufferLayout.struct([BufferLayout.u32(\"length\"), BufferLayout.u32(\"lengthPadding\"), BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), \"chars\")], property);\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n const rslShim = rsl;\n rslShim.decode = (b, offset2) => {\n const data = _decode(b, offset2);\n return data[\"chars\"].toString();\n };\n rslShim.encode = (str, b, offset2) => {\n const data = {\n chars: Buffer2.from(str, \"utf8\")\n };\n return _encode(data, b, offset2);\n };\n rslShim.alloc = (str) => {\n return BufferLayout.u32().span + BufferLayout.u32().span + Buffer2.from(str, \"utf8\").length;\n };\n return rslShim;\n };\n var authorized = (property = \"authorized\") => {\n return BufferLayout.struct([publicKey(\"staker\"), publicKey(\"withdrawer\")], property);\n };\n var lockup = (property = \"lockup\") => {\n return BufferLayout.struct([BufferLayout.ns64(\"unixTimestamp\"), BufferLayout.ns64(\"epoch\"), publicKey(\"custodian\")], property);\n };\n var voteInit = (property = \"voteInit\") => {\n return BufferLayout.struct([publicKey(\"nodePubkey\"), publicKey(\"authorizedVoter\"), publicKey(\"authorizedWithdrawer\"), BufferLayout.u8(\"commission\")], property);\n };\n var voteAuthorizeWithSeedArgs = (property = \"voteAuthorizeWithSeedArgs\") => {\n return BufferLayout.struct([BufferLayout.u32(\"voteAuthorizationType\"), publicKey(\"currentAuthorityDerivedKeyOwnerPubkey\"), rustString(\"currentAuthorityDerivedKeySeed\"), publicKey(\"newAuthorized\")], property);\n };\n function getAlloc(type2, fields) {\n const getItemAlloc = (item) => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === \"function\") {\n return item.alloc(fields[item.property]);\n } else if (\"count\" in item && \"elementLayout\" in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if (\"fields\" in item) {\n return getAlloc({\n layout: item\n }, fields[item.property]);\n }\n return 0;\n };\n let alloc = 0;\n type2.layout.fields.forEach((item) => {\n alloc += getItemAlloc(item);\n });\n return alloc;\n }\n function decodeLength(bytes) {\n let len = 0;\n let size = 0;\n for (; ; ) {\n let elem = bytes.shift();\n len |= (elem & 127) << size * 7;\n size += 1;\n if ((elem & 128) === 0) {\n break;\n }\n }\n return len;\n }\n function encodeLength(bytes, len) {\n let rem_len = len;\n for (; ; ) {\n let elem = rem_len & 127;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 128;\n bytes.push(elem);\n }\n }\n }\n function assert2(condition, message) {\n if (!condition) {\n throw new Error(message || \"Assertion failed\");\n }\n }\n var CompiledKeys = class _CompiledKeys {\n constructor(payer, keyMetaMap) {\n this.payer = void 0;\n this.keyMetaMap = void 0;\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n static compile(instructions, payer) {\n const keyMetaMap = /* @__PURE__ */ new Map();\n const getOrInsertDefault = (pubkey) => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === void 0) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n return new _CompiledKeys(payer, keyMetaMap);\n }\n getMessageComponents() {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert2(mapEntries.length <= 256, \"Max static account keys length exceeded\");\n const writableSigners = mapEntries.filter(([, meta]) => meta.isSigner && meta.isWritable);\n const readonlySigners = mapEntries.filter(([, meta]) => meta.isSigner && !meta.isWritable);\n const writableNonSigners = mapEntries.filter(([, meta]) => !meta.isSigner && meta.isWritable);\n const readonlyNonSigners = mapEntries.filter(([, meta]) => !meta.isSigner && !meta.isWritable);\n const header = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length\n };\n {\n assert2(writableSigners.length > 0, \"Expected at least one writable signer key\");\n const [payerAddress] = writableSigners[0];\n assert2(payerAddress === this.payer.toBase58(), \"Expected first writable signer key to be the fee payer\");\n }\n const staticAccountKeys = [...writableSigners.map(([address]) => new PublicKey(address)), ...readonlySigners.map(([address]) => new PublicKey(address)), ...writableNonSigners.map(([address]) => new PublicKey(address)), ...readonlyNonSigners.map(([address]) => new PublicKey(address))];\n return [header, staticAccountKeys];\n }\n extractTableLookup(lookupTable) {\n const [writableIndexes, drainedWritableKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, (keyMeta) => !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable);\n const [readonlyIndexes, drainedReadonlyKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, (keyMeta) => !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable);\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n return [{\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes\n }, {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys\n }];\n }\n /** @internal */\n drainKeysFoundInLookupTable(lookupTableEntries, keyMetaFilter) {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex((entry) => entry.equals(key));\n if (lookupTableIndex >= 0) {\n assert2(lookupTableIndex < 256, \"Max lookup table index exceeded\");\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n return [lookupTableIndexes, drainedKeys];\n }\n };\n var END_OF_BUFFER_ERROR_MESSAGE = \"Reached end of buffer unexpectedly\";\n function guardedShift(byteArray) {\n if (byteArray.length === 0) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.shift();\n }\n function guardedSplice(byteArray, ...args) {\n const [start] = args;\n if (args.length === 2 ? start + (args[1] ?? 0) > byteArray.length : start >= byteArray.length) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.splice(...args);\n }\n var Message = class _Message {\n constructor(args) {\n this.header = void 0;\n this.accountKeys = void 0;\n this.recentBlockhash = void 0;\n this.instructions = void 0;\n this.indexToProgramIds = /* @__PURE__ */ new Map();\n this.header = args.header;\n this.accountKeys = args.accountKeys.map((account) => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach((ix) => this.indexToProgramIds.set(ix.programIdIndex, this.accountKeys[ix.programIdIndex]));\n }\n get version() {\n return \"legacy\";\n }\n get staticAccountKeys() {\n return this.accountKeys;\n }\n get compiledInstructions() {\n return this.instructions.map((ix) => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: import_bs58.default.decode(ix.data)\n }));\n }\n get addressTableLookups() {\n return [];\n }\n getAccountKeys() {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n static compile(args) {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map((ix) => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: import_bs58.default.encode(ix.data)\n }));\n return new _Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions\n });\n }\n isAccountSigner(index) {\n return index < this.header.numRequiredSignatures;\n }\n isAccountWritable(index) {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts = numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts = numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n isProgramId(index) {\n return this.indexToProgramIds.has(index);\n }\n programIds() {\n return [...this.indexToProgramIds.values()];\n }\n nonProgramIds() {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n serialize() {\n const numKeys = this.accountKeys.length;\n let keyCount = [];\n encodeLength(keyCount, numKeys);\n const instructions = this.instructions.map((instruction) => {\n const {\n accounts,\n programIdIndex\n } = instruction;\n const data = Array.from(import_bs58.default.decode(instruction.data));\n let keyIndicesCount = [];\n encodeLength(keyIndicesCount, accounts.length);\n let dataCount = [];\n encodeLength(dataCount, data.length);\n return {\n programIdIndex,\n keyIndicesCount: Buffer2.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer2.from(dataCount),\n data\n };\n });\n let instructionCount = [];\n encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer2.alloc(PACKET_DATA_SIZE);\n Buffer2.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n instructions.forEach((instruction) => {\n const instructionLayout = BufferLayout.struct([BufferLayout.u8(\"programIdIndex\"), BufferLayout.blob(instruction.keyIndicesCount.length, \"keyIndicesCount\"), BufferLayout.seq(BufferLayout.u8(\"keyIndex\"), instruction.keyIndices.length, \"keyIndices\"), BufferLayout.blob(instruction.dataLength.length, \"dataLength\"), BufferLayout.seq(BufferLayout.u8(\"userdatum\"), instruction.data.length, \"data\")]);\n const length2 = instructionLayout.encode(instruction, instructionBuffer, instructionBufferLength);\n instructionBufferLength += length2;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n const signDataLayout = BufferLayout.struct([BufferLayout.blob(1, \"numRequiredSignatures\"), BufferLayout.blob(1, \"numReadonlySignedAccounts\"), BufferLayout.blob(1, \"numReadonlyUnsignedAccounts\"), BufferLayout.blob(keyCount.length, \"keyCount\"), BufferLayout.seq(publicKey(\"key\"), numKeys, \"keys\"), publicKey(\"recentBlockhash\")]);\n const transaction = {\n numRequiredSignatures: Buffer2.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer2.from([this.header.numReadonlySignedAccounts]),\n numReadonlyUnsignedAccounts: Buffer2.from([this.header.numReadonlyUnsignedAccounts]),\n keyCount: Buffer2.from(keyCount),\n keys: this.accountKeys.map((key) => toBuffer(key.toBytes())),\n recentBlockhash: import_bs58.default.decode(this.recentBlockhash)\n };\n let signData = Buffer2.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer) {\n let byteArray = [...buffer];\n const numRequiredSignatures = guardedShift(byteArray);\n if (numRequiredSignatures !== (numRequiredSignatures & VERSION_PREFIX_MASK)) {\n throw new Error(\"Versioned messages must be deserialized with VersionedMessage.deserialize()\");\n }\n const numReadonlySignedAccounts = guardedShift(byteArray);\n const numReadonlyUnsignedAccounts = guardedShift(byteArray);\n const accountCount = decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer2.from(account)));\n }\n const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n const instructionCount = decodeLength(byteArray);\n let instructions = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountCount2 = decodeLength(byteArray);\n const accounts = guardedSplice(byteArray, 0, accountCount2);\n const dataLength = decodeLength(byteArray);\n const dataSlice = guardedSplice(byteArray, 0, dataLength);\n const data = import_bs58.default.encode(Buffer2.from(dataSlice));\n instructions.push({\n programIdIndex,\n accounts,\n data\n });\n }\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n },\n recentBlockhash: import_bs58.default.encode(Buffer2.from(recentBlockhash)),\n accountKeys,\n instructions\n };\n return new _Message(messageArgs);\n }\n };\n var DEFAULT_SIGNATURE = Buffer2.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n var TransactionInstruction = class {\n constructor(opts) {\n this.keys = void 0;\n this.programId = void 0;\n this.data = Buffer2.alloc(0);\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n /**\n * @internal\n */\n toJSON() {\n return {\n keys: this.keys.map(({\n pubkey,\n isSigner,\n isWritable\n }) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable\n })),\n programId: this.programId.toJSON(),\n data: [...this.data]\n };\n }\n };\n var Transaction = class _Transaction {\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature() {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n /**\n * The transaction fee payer\n */\n // Construct a transaction with a blockhash and lastValidBlockHeight\n // Construct a transaction using a durable nonce\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n /**\n * Construct an empty Transaction\n */\n constructor(opts) {\n this.signatures = [];\n this.feePayer = void 0;\n this.instructions = [];\n this.recentBlockhash = void 0;\n this.lastValidBlockHeight = void 0;\n this.nonceInfo = void 0;\n this.minNonceContextSlot = void 0;\n this._message = void 0;\n this._json = void 0;\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, \"nonceInfo\")) {\n const {\n minContextSlot,\n nonceInfo\n } = opts;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (Object.prototype.hasOwnProperty.call(opts, \"lastValidBlockHeight\")) {\n const {\n blockhash,\n lastValidBlockHeight\n } = opts;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {\n recentBlockhash,\n nonceInfo\n } = opts;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n /**\n * @internal\n */\n toJSON() {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON()\n } : null,\n instructions: this.instructions.map((instruction) => instruction.toJSON()),\n signers: this.signatures.map(({\n publicKey: publicKey2\n }) => {\n return publicKey2.toJSON();\n })\n };\n }\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(...items) {\n if (items.length === 0) {\n throw new Error(\"No instructions\");\n }\n items.forEach((item) => {\n if (\"instructions\" in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if (\"data\" in item && \"programId\" in item && \"keys\" in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n /**\n * Compile transaction data\n */\n compileMessage() {\n if (this._message && JSON.stringify(this.toJSON()) === JSON.stringify(this._json)) {\n return this._message;\n }\n let recentBlockhash;\n let instructions;\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error(\"Transaction recentBlockhash required\");\n }\n if (instructions.length < 1) {\n console.warn(\"No instructions provided\");\n }\n let feePayer;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error(\"Transaction fee payer required\");\n }\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === void 0) {\n throw new Error(`Transaction instruction index ${i} has undefined program id`);\n }\n }\n const programIds = [];\n const accountMetas = [];\n instructions.forEach((instruction) => {\n instruction.keys.forEach((accountMeta) => {\n accountMetas.push({\n ...accountMeta\n });\n });\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n programIds.forEach((programId) => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false\n });\n });\n const uniqueMetas = [];\n accountMetas.forEach((accountMeta) => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex((x) => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable = uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner = uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n uniqueMetas.sort(function(x, y) {\n if (x.isSigner !== y.isSigner) {\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n return x.isWritable ? -1 : 1;\n }\n const options = {\n localeMatcher: \"best fit\",\n usage: \"sort\",\n sensitivity: \"variant\",\n ignorePunctuation: false,\n numeric: false,\n caseFirst: \"lower\"\n };\n return x.pubkey.toBase58().localeCompare(y.pubkey.toBase58(), \"en\", options);\n });\n const feePayerIndex = uniqueMetas.findIndex((x) => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true\n });\n }\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex((x) => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\"Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release.\");\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n const signedKeys = [];\n const unsignedKeys = [];\n uniqueMetas.forEach(({\n pubkey,\n isSigner,\n isWritable\n }) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions = instructions.map((instruction) => {\n const {\n data,\n programId\n } = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map((meta) => accountKeys.indexOf(meta.pubkey.toString())),\n data: import_bs58.default.encode(data)\n };\n });\n compiledInstructions.forEach((instruction) => {\n assert2(instruction.programIdIndex >= 0);\n instruction.accounts.forEach((keyIndex) => assert2(keyIndex >= 0));\n });\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions\n });\n }\n /**\n * @internal\n */\n _compile() {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(0, message.header.numRequiredSignatures);\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n if (valid)\n return message;\n }\n this.signatures = signedKeys.map((publicKey2) => ({\n signature: null,\n publicKey: publicKey2\n }));\n return message;\n }\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage() {\n return this._compile().serialize();\n }\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection) {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers) {\n if (signers.length === 0) {\n throw new Error(\"No signers\");\n }\n const seen = /* @__PURE__ */ new Set();\n this.signatures = signers.filter((publicKey2) => {\n const key = publicKey2.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n }).map((publicKey2) => ({\n signature: null,\n publicKey: publicKey2\n }));\n }\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers) {\n if (signers.length === 0) {\n throw new Error(\"No signers\");\n }\n const seen = /* @__PURE__ */ new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n this.signatures = uniqueSigners.map((signer) => ({\n signature: null,\n publicKey: signer.publicKey\n }));\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers) {\n if (signers.length === 0) {\n throw new Error(\"No signers\");\n }\n const seen = /* @__PURE__ */ new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n /**\n * @internal\n */\n _partialSign(message, ...signers) {\n const signData = message.serialize();\n signers.forEach((signer) => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey, signature) {\n this._compile();\n this._addSignature(pubkey, signature);\n }\n /**\n * @internal\n */\n _addSignature(pubkey, signature) {\n assert2(signature.length === 64);\n const index = this.signatures.findIndex((sigpair) => pubkey.equals(sigpair.publicKey));\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n this.signatures[index].signature = Buffer2.from(signature);\n }\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures = true) {\n const signatureErrors = this._getMessageSignednessErrors(this.serializeMessage(), requireAllSignatures);\n return !signatureErrors;\n }\n /**\n * @internal\n */\n _getMessageSignednessErrors(message, requireAllSignatures) {\n const errors = {};\n for (const {\n signature,\n publicKey: publicKey2\n } of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n (errors.missing ||= []).push(publicKey2);\n }\n } else {\n if (!verify(signature, message, publicKey2.toBytes())) {\n (errors.invalid ||= []).push(publicKey2);\n }\n }\n }\n return errors.invalid || errors.missing ? errors : void 0;\n }\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config) {\n const {\n requireAllSignatures,\n verifySignatures\n } = Object.assign({\n requireAllSignatures: true,\n verifySignatures: true\n }, config);\n const signData = this.serializeMessage();\n if (verifySignatures) {\n const sigErrors = this._getMessageSignednessErrors(signData, requireAllSignatures);\n if (sigErrors) {\n let errorMessage = \"Signature verification failed.\";\n if (sigErrors.invalid) {\n errorMessage += `\nInvalid signature for public key${sigErrors.invalid.length === 1 ? \"\" : \"(s)\"} [\\`${sigErrors.invalid.map((p) => p.toBase58()).join(\"`, `\")}\\`].`;\n }\n if (sigErrors.missing) {\n errorMessage += `\nMissing signature for public key${sigErrors.missing.length === 1 ? \"\" : \"(s)\"} [\\`${sigErrors.missing.map((p) => p.toBase58()).join(\"`, `\")}\\`].`;\n }\n throw new Error(errorMessage);\n }\n }\n return this._serialize(signData);\n }\n /**\n * @internal\n */\n _serialize(signData) {\n const {\n signatures\n } = this;\n const signatureCount = [];\n encodeLength(signatureCount, signatures.length);\n const transactionLength = signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer2.alloc(transactionLength);\n assert2(signatures.length < 256);\n Buffer2.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({\n signature\n }, index) => {\n if (signature !== null) {\n assert2(signature.length === 64, `signature has invalid length`);\n Buffer2.from(signature).copy(wireTransaction, signatureCount.length + index * 64);\n }\n });\n signData.copy(wireTransaction, signatureCount.length + signatures.length * 64);\n assert2(wireTransaction.length <= PACKET_DATA_SIZE, `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`);\n return wireTransaction;\n }\n /**\n * Deprecated method\n * @internal\n */\n get keys() {\n assert2(this.instructions.length === 1);\n return this.instructions[0].keys.map((keyObj) => keyObj.pubkey);\n }\n /**\n * Deprecated method\n * @internal\n */\n get programId() {\n assert2(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n /**\n * Deprecated method\n * @internal\n */\n get data() {\n assert2(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer) {\n let byteArray = [...buffer];\n const signatureCount = decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(import_bs58.default.encode(Buffer2.from(signature)));\n }\n return _Transaction.populate(Message.from(byteArray), signatures);\n }\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(message, signatures = []) {\n const transaction = new _Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature: signature == import_bs58.default.encode(DEFAULT_SIGNATURE) ? null : import_bs58.default.decode(signature),\n publicKey: message.accountKeys[index]\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n message.instructions.forEach((instruction) => {\n const keys = instruction.accounts.map((account) => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner: transaction.signatures.some((keyObj) => keyObj.publicKey.toString() === pubkey.toString()) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account)\n };\n });\n transaction.instructions.push(new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: import_bs58.default.decode(instruction.data)\n }));\n });\n transaction._message = message;\n transaction._json = transaction.toJSON();\n return transaction;\n }\n };\n var NUM_TICKS_PER_SECOND = 160;\n var DEFAULT_TICKS_PER_SLOT = 64;\n var NUM_SLOTS_PER_SECOND = NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n var MS_PER_SLOT = 1e3 / NUM_SLOTS_PER_SECOND;\n var SYSVAR_CLOCK_PUBKEY = new PublicKey(\"SysvarC1ock11111111111111111111111111111111\");\n var SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\"SysvarEpochSchedu1e111111111111111111111111\");\n var SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\"Sysvar1nstructions1111111111111111111111111\");\n var SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\"SysvarRecentB1ockHashes11111111111111111111\");\n var SYSVAR_RENT_PUBKEY = new PublicKey(\"SysvarRent111111111111111111111111111111111\");\n var SYSVAR_REWARDS_PUBKEY = new PublicKey(\"SysvarRewards111111111111111111111111111111\");\n var SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\"SysvarS1otHashes111111111111111111111111111\");\n var SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\"SysvarS1otHistory11111111111111111111111111\");\n var SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\"SysvarStakeHistory1111111111111111111111111\");\n var SendTransactionError = class extends Error {\n constructor({\n action,\n signature,\n transactionMessage,\n logs\n }) {\n const maybeLogsOutput = logs ? `Logs: \n${JSON.stringify(logs.slice(-10), null, 2)}. ` : \"\";\n const guideText = \"\\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.\";\n let message;\n switch (action) {\n case \"send\":\n message = `Transaction ${signature} resulted in an error. \n${transactionMessage}. ` + maybeLogsOutput + guideText;\n break;\n case \"simulate\":\n message = `Simulation failed. \nMessage: ${transactionMessage}. \n` + maybeLogsOutput + guideText;\n break;\n default: {\n message = `Unknown action '${/* @__PURE__ */ ((a) => a)(action)}'`;\n }\n }\n super(message);\n this.signature = void 0;\n this.transactionMessage = void 0;\n this.transactionLogs = void 0;\n this.signature = signature;\n this.transactionMessage = transactionMessage;\n this.transactionLogs = logs ? logs : void 0;\n }\n get transactionError() {\n return {\n message: this.transactionMessage,\n logs: Array.isArray(this.transactionLogs) ? this.transactionLogs : void 0\n };\n }\n /* @deprecated Use `await getLogs()` instead */\n get logs() {\n const cachedLogs = this.transactionLogs;\n if (cachedLogs != null && typeof cachedLogs === \"object\" && \"then\" in cachedLogs) {\n return void 0;\n }\n return cachedLogs;\n }\n async getLogs(connection) {\n if (!Array.isArray(this.transactionLogs)) {\n this.transactionLogs = new Promise((resolve, reject) => {\n connection.getTransaction(this.signature).then((tx) => {\n if (tx && tx.meta && tx.meta.logMessages) {\n const logs = tx.meta.logMessages;\n this.transactionLogs = logs;\n resolve(logs);\n } else {\n reject(new Error(\"Log messages not found\"));\n }\n }).catch(reject);\n });\n }\n return await this.transactionLogs;\n }\n };\n async function sendAndConfirmTransaction(connection, transaction, signers, options) {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot\n };\n const signature = await connection.sendTransaction(transaction, signers, sendOptions);\n let status;\n if (transaction.recentBlockhash != null && transaction.lastValidBlockHeight != null) {\n status = (await connection.confirmTransaction({\n abortSignal: options?.abortSignal,\n signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight\n }, options && options.commitment)).value;\n } else if (transaction.minNonceContextSlot != null && transaction.nonceInfo != null) {\n const {\n nonceInstruction\n } = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (await connection.confirmTransaction({\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature\n }, options && options.commitment)).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\"sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.\");\n }\n status = (await connection.confirmTransaction(signature, options && options.commitment)).value;\n }\n if (status.err) {\n if (signature != null) {\n throw new SendTransactionError({\n action: \"send\",\n signature,\n transactionMessage: `Status: (${JSON.stringify(status)})`\n });\n }\n throw new Error(`Transaction ${signature} failed (${JSON.stringify(status)})`);\n }\n return signature;\n }\n function sleep(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n function encodeData(type2, fields) {\n const allocLength = type2.layout.span >= 0 ? type2.layout.span : getAlloc(type2, fields);\n const data = Buffer2.alloc(allocLength);\n const layoutFields = Object.assign({\n instruction: type2.index\n }, fields);\n type2.layout.encode(layoutFields, data);\n return data;\n }\n var FeeCalculatorLayout = BufferLayout.nu64(\"lamportsPerSignature\");\n var NonceAccountLayout = BufferLayout.struct([BufferLayout.u32(\"version\"), BufferLayout.u32(\"state\"), publicKey(\"authorizedPubkey\"), publicKey(\"nonce\"), BufferLayout.struct([FeeCalculatorLayout], \"feeCalculator\")]);\n var NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n function u64(property) {\n const layout = (0, import_buffer_layout.blob)(8, property);\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n const bigIntLayout = layout;\n const codec = getU64Codec();\n bigIntLayout.decode = (buffer, offset2) => {\n const src = decode(buffer, offset2);\n return codec.decode(src);\n };\n bigIntLayout.encode = (bigInt, buffer, offset2) => {\n const src = codec.encode(bigInt);\n return encode(src, buffer, offset2);\n };\n return bigIntLayout;\n }\n var SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze({\n Create: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\"), BufferLayout.ns64(\"space\"), publicKey(\"programId\")])\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"programId\")])\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), u64(\"lamports\")])\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"base\"), rustString(\"seed\"), BufferLayout.ns64(\"lamports\"), BufferLayout.ns64(\"space\"), publicKey(\"programId\")])\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\")])\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"authorized\")])\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"authorized\")])\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"space\")])\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"base\"), rustString(\"seed\"), BufferLayout.ns64(\"space\"), publicKey(\"programId\")])\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"base\"), rustString(\"seed\"), publicKey(\"programId\")])\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), u64(\"lamports\"), rustString(\"seed\"), publicKey(\"programId\")])\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n }\n });\n var SystemProgram = class _SystemProgram {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the System program\n */\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type2, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.newAccountPubkey,\n isSigner: true,\n isWritable: true\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(params) {\n let data;\n let keys;\n if (\"basePubkey\" in params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type2, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.fromPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }];\n } else {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type2, {\n lamports: BigInt(params.lamports)\n });\n keys = [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(params) {\n let data;\n let keys;\n if (\"basePubkey\" in params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type2, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }];\n } else {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type2, {\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: true,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type2, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n let keys = [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.newAccountPubkey,\n isSigner: false,\n isWritable: true\n }];\n if (!params.basePubkey.equals(params.fromPubkey)) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(params) {\n const transaction = new Transaction();\n if (\"basePubkey\" in params && \"seed\" in params) {\n transaction.add(_SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId\n }));\n } else {\n transaction.add(_SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId\n }));\n }\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey\n };\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type2, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer())\n });\n const instructionData = {\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type2);\n const instructionData = {\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type2, {\n lamports: params.lamports\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type2, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer())\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(params) {\n let data;\n let keys;\n if (\"basePubkey\" in params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type2, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }];\n } else {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type2, {\n space: params.space\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: true,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n };\n SystemProgram.programId = new PublicKey(\"11111111111111111111111111111111\");\n var CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n var Loader = class _Loader {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Amount of program data placed in each load Transaction\n */\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength) {\n return 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / _Loader.chunkSize) + 1 + // Add one for Create transaction\n 1);\n }\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(connection, payer, program, programId, data) {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(data.length);\n const programInfo = await connection.getAccountInfo(program.publicKey, \"confirmed\");\n let transaction = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error(\"Program load failed, account is already executable\");\n return false;\n }\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length\n }));\n }\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId\n }));\n }\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports\n }));\n }\n } else {\n transaction = new Transaction().add(SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId\n }));\n }\n if (transaction !== null) {\n await sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: \"confirmed\"\n });\n }\n }\n const dataLayout = BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.u32(\"offset\"), BufferLayout.u32(\"bytesLength\"), BufferLayout.u32(\"bytesLengthPadding\"), BufferLayout.seq(BufferLayout.u8(\"byte\"), BufferLayout.offset(BufferLayout.u32(), -8), \"bytes\")]);\n const chunkSize = _Loader.chunkSize;\n let offset2 = 0;\n let array2 = data;\n let transactions = [];\n while (array2.length > 0) {\n const bytes = array2.slice(0, chunkSize);\n const data2 = Buffer2.alloc(chunkSize + 16);\n dataLayout.encode({\n instruction: 0,\n // Load instruction\n offset: offset2,\n bytes,\n bytesLength: 0,\n bytesLengthPadding: 0\n }, data2);\n const transaction = new Transaction().add({\n keys: [{\n pubkey: program.publicKey,\n isSigner: true,\n isWritable: true\n }],\n programId,\n data: data2\n });\n transactions.push(sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: \"confirmed\"\n }));\n if (connection._rpcEndpoint.includes(\"solana.com\")) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1e3 / REQUESTS_PER_SECOND);\n }\n offset2 += chunkSize;\n array2 = array2.slice(chunkSize);\n }\n await Promise.all(transactions);\n {\n const dataLayout2 = BufferLayout.struct([BufferLayout.u32(\"instruction\")]);\n const data2 = Buffer2.alloc(dataLayout2.span);\n dataLayout2.encode({\n instruction: 1\n // Finalize instruction\n }, data2);\n const transaction = new Transaction().add({\n keys: [{\n pubkey: program.publicKey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId,\n data: data2\n });\n const deployCommitment = \"processed\";\n const finalizeSignature = await connection.sendTransaction(transaction, [payer, program], {\n preflightCommitment: deployCommitment\n });\n const {\n context,\n value\n } = await connection.confirmTransaction({\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n blockhash: transaction.recentBlockhash\n }, deployCommitment);\n if (value.err) {\n throw new Error(`Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`);\n }\n while (true) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n }\n await new Promise((resolve) => setTimeout(resolve, Math.round(MS_PER_SLOT / 2)));\n }\n }\n return true;\n }\n };\n Loader.chunkSize = CHUNK_SIZE;\n var BPF_LOADER_PROGRAM_ID = new PublicKey(\"BPFLoader2111111111111111111111111111111111\");\n var fetchImpl = globalThis.fetch;\n var LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32(\"typeIndex\"),\n u64(\"deactivationSlot\"),\n BufferLayout.nu64(\"lastExtendedSlot\"),\n BufferLayout.u8(\"lastExtendedStartIndex\"),\n BufferLayout.u8(),\n // option\n BufferLayout.seq(publicKey(), BufferLayout.offset(BufferLayout.u8(), -1), \"authority\")\n ])\n };\n var PublicKeyFromString = coerce(instance(PublicKey), string(), (value) => new PublicKey(value));\n var RawAccountDataResult = tuple([string(), literal(\"base64\")]);\n var BufferFromRawAccountData = coerce(instance(Buffer2), RawAccountDataResult, (value) => Buffer2.from(value[0], \"base64\"));\n var BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1e3;\n function createRpcResult(result) {\n return union([type({\n jsonrpc: literal(\"2.0\"),\n id: string(),\n result\n }), type({\n jsonrpc: literal(\"2.0\"),\n id: string(),\n error: type({\n code: unknown(),\n message: string(),\n data: optional(any())\n })\n })]);\n }\n var UnknownRpcResult = createRpcResult(unknown());\n function jsonRpcResult(schema) {\n return coerce(createRpcResult(schema), UnknownRpcResult, (value) => {\n if (\"error\" in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema)\n };\n }\n });\n }\n function jsonRpcResultAndContext(value) {\n return jsonRpcResult(type({\n context: type({\n slot: number()\n }),\n value\n }));\n }\n function notificationResultAndContext(value) {\n return type({\n context: type({\n slot: number()\n }),\n value\n });\n }\n var GetInflationGovernorResult = type({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number()\n });\n var GetInflationRewardResult = jsonRpcResult(array(nullable(type({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number()))\n }))));\n var GetRecentPrioritizationFeesResult = array(type({\n slot: number(),\n prioritizationFee: number()\n }));\n var GetInflationRateResult = type({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number()\n });\n var GetEpochInfoResult = type({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number())\n });\n var GetEpochScheduleResult = type({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number()\n });\n var GetLeaderScheduleResult = record(string(), array(number()));\n var TransactionErrorResult = nullable(union([type({}), string()]));\n var SignatureStatusResult = type({\n err: TransactionErrorResult\n });\n var SignatureReceivedResult = literal(\"receivedSignature\");\n var VersionResult = type({\n \"solana-core\": string(),\n \"feature-set\": optional(number())\n });\n var ParsedInstructionStruct = type({\n program: string(),\n programId: PublicKeyFromString,\n parsed: unknown()\n });\n var PartiallyDecodedInstructionStruct = type({\n programId: PublicKeyFromString,\n accounts: array(PublicKeyFromString),\n data: string()\n });\n var SimulatedTransactionResponseStruct = jsonRpcResultAndContext(type({\n err: nullable(union([type({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(nullable(array(nullable(type({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number())\n }))))),\n unitsConsumed: optional(number()),\n returnData: optional(nullable(type({\n programId: string(),\n data: tuple([string(), literal(\"base64\")])\n }))),\n innerInstructions: optional(nullable(array(type({\n index: number(),\n instructions: array(union([ParsedInstructionStruct, PartiallyDecodedInstructionStruct]))\n }))))\n }));\n var BlockProductionResponseStruct = jsonRpcResultAndContext(type({\n byIdentity: record(string(), array(number())),\n range: type({\n firstSlot: number(),\n lastSlot: number()\n })\n }));\n var GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n var GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n var GetRecentPrioritizationFeesRpcResult = jsonRpcResult(GetRecentPrioritizationFeesResult);\n var GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n var GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n var GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n var SlotRpcResult = jsonRpcResult(number());\n var GetSupplyRpcResult = jsonRpcResultAndContext(type({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString)\n }));\n var TokenAmountResult = type({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string())\n });\n var GetTokenLargestAccountsResult = jsonRpcResultAndContext(array(type({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string())\n })));\n var GetTokenAccountsByOwner = jsonRpcResultAndContext(array(type({\n pubkey: PublicKeyFromString,\n account: type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number()\n })\n })));\n var ParsedAccountDataResult = type({\n program: string(),\n parsed: unknown(),\n space: number()\n });\n var GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(array(type({\n pubkey: PublicKeyFromString,\n account: type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number()\n })\n })));\n var GetLargestAccountsRpcResult = jsonRpcResultAndContext(array(type({\n lamports: number(),\n address: PublicKeyFromString\n })));\n var AccountInfoResult = type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number()\n });\n var KeyedAccountInfoResult = type({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult\n });\n var ParsedOrRawAccountData = coerce(union([instance(Buffer2), ParsedAccountDataResult]), union([RawAccountDataResult, ParsedAccountDataResult]), (value) => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n });\n var ParsedAccountInfoResult = type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number()\n });\n var KeyedParsedAccountInfoResult = type({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult\n });\n var StakeActivationResult = type({\n state: union([literal(\"active\"), literal(\"inactive\"), literal(\"activating\"), literal(\"deactivating\")]),\n active: number(),\n inactive: number()\n });\n var GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(array(type({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number()))\n })));\n var GetSignaturesForAddressRpcResult = jsonRpcResult(array(type({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number()))\n })));\n var AccountNotificationResult = type({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult)\n });\n var ProgramAccountInfoResult = type({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult\n });\n var ProgramAccountNotificationResult = type({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult)\n });\n var SlotInfoResult = type({\n parent: number(),\n slot: number(),\n root: number()\n });\n var SlotNotificationResult = type({\n subscription: number(),\n result: SlotInfoResult\n });\n var SlotUpdateResult = union([type({\n type: union([literal(\"firstShredReceived\"), literal(\"completed\"), literal(\"optimisticConfirmation\"), literal(\"root\")]),\n slot: number(),\n timestamp: number()\n }), type({\n type: literal(\"createdBank\"),\n parent: number(),\n slot: number(),\n timestamp: number()\n }), type({\n type: literal(\"frozen\"),\n slot: number(),\n timestamp: number(),\n stats: type({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number()\n })\n }), type({\n type: literal(\"dead\"),\n slot: number(),\n timestamp: number(),\n err: string()\n })]);\n var SlotUpdateNotificationResult = type({\n subscription: number(),\n result: SlotUpdateResult\n });\n var SignatureNotificationResult = type({\n subscription: number(),\n result: notificationResultAndContext(union([SignatureStatusResult, SignatureReceivedResult]))\n });\n var RootNotificationResult = type({\n subscription: number(),\n result: number()\n });\n var ContactInfoResult = type({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string())\n });\n var VoteAccountInfoResult = type({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number())\n });\n var GetVoteAccounts = jsonRpcResult(type({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult)\n }));\n var ConfirmationStatus = union([literal(\"processed\"), literal(\"confirmed\"), literal(\"finalized\")]);\n var SignatureStatusResponse = type({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus)\n });\n var GetSignatureStatusesRpcResult = jsonRpcResultAndContext(array(nullable(SignatureStatusResponse)));\n var GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n var AddressTableLookupStruct = type({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number())\n });\n var ConfirmedTransactionResult = type({\n signatures: array(string()),\n message: type({\n accountKeys: array(string()),\n header: type({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number()\n }),\n instructions: array(type({\n accounts: array(number()),\n data: string(),\n programIdIndex: number()\n })),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct))\n })\n });\n var AnnotatedAccountKey = type({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal(\"transaction\"), literal(\"lookupTable\")]))\n });\n var ConfirmedTransactionAccountsModeResult = type({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string())\n });\n var ParsedInstructionResult = type({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString\n });\n var RawInstructionResult = type({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString\n });\n var InstructionResult = union([RawInstructionResult, ParsedInstructionResult]);\n var UnknownInstructionResult = union([type({\n parsed: unknown(),\n program: string(),\n programId: string()\n }), type({\n accounts: array(string()),\n data: string(),\n programId: string()\n })]);\n var ParsedOrRawInstruction = coerce(InstructionResult, UnknownInstructionResult, (value) => {\n if (\"accounts\" in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n });\n var ParsedConfirmedTransactionResult = type({\n signatures: array(string()),\n message: type({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct)))\n })\n });\n var TokenBalanceResult = type({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n programId: optional(string()),\n uiTokenAmount: TokenAmountResult\n });\n var LoadedAddressesResult = type({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString)\n });\n var ConfirmedTransactionMetaResult = type({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(nullable(array(type({\n index: number(),\n instructions: array(type({\n accounts: array(number()),\n data: string(),\n programIdIndex: number()\n }))\n })))),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n costUnits: optional(number())\n });\n var ParsedConfirmedTransactionMetaResult = type({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(nullable(array(type({\n index: number(),\n instructions: array(ParsedOrRawInstruction)\n })))),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n costUnits: optional(number())\n });\n var TransactionVersionStruct = union([literal(0), literal(\"legacy\")]);\n var RewardsResult = type({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number()))\n });\n var GetBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetNoneModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetAccountsModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetParsedBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetParsedAccountsModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetParsedNoneModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetConfirmedBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number())\n })));\n var GetBlockSignaturesRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number())\n })));\n var GetTransactionRpcResult = jsonRpcResult(nullable(type({\n slot: number(),\n meta: nullable(ConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct)\n })));\n var GetParsedTransactionRpcResult = jsonRpcResult(nullable(type({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct)\n })));\n var GetLatestBlockhashRpcResult = jsonRpcResultAndContext(type({\n blockhash: string(),\n lastValidBlockHeight: number()\n }));\n var IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n var PerfSampleResult = type({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number()\n });\n var GetRecentPerformanceSamplesRpcResult = jsonRpcResult(array(PerfSampleResult));\n var GetFeeCalculatorRpcResult = jsonRpcResultAndContext(nullable(type({\n feeCalculator: type({\n lamportsPerSignature: number()\n })\n })));\n var RequestAirdropRpcResult = jsonRpcResult(string());\n var SendTransactionRpcResult = jsonRpcResult(string());\n var LogsResult = type({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string()\n });\n var LogsNotificationResult = type({\n result: notificationResultAndContext(LogsResult),\n subscription: number()\n });\n var Keypair = class _Keypair {\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair) {\n this._keypair = void 0;\n this._keypair = keypair ?? generateKeypair();\n }\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate() {\n return new _Keypair(generateKeypair());\n }\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(secretKey, options) {\n if (secretKey.byteLength !== 64) {\n throw new Error(\"bad secret key size\");\n }\n const publicKey2 = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey2[ii] !== computedPublicKey[ii]) {\n throw new Error(\"provided secretKey is invalid\");\n }\n }\n }\n return new _Keypair({\n publicKey: publicKey2,\n secretKey\n });\n }\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed) {\n const publicKey2 = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey2, 32);\n return new _Keypair({\n publicKey: publicKey2,\n secretKey\n });\n }\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey() {\n return new PublicKey(this._keypair.publicKey);\n }\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey() {\n return new Uint8Array(this._keypair.secretKey);\n }\n };\n var LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), u64(\"recentSlot\"), BufferLayout.u8(\"bumpSeed\")])\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), u64(), BufferLayout.seq(publicKey(), BufferLayout.offset(BufferLayout.u32(), -8), \"addresses\")])\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n }\n });\n var AddressLookupTableProgram = class {\n /**\n * @internal\n */\n constructor() {\n }\n static createLookupTable(params) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync([params.authority.toBuffer(), getU64Encoder().encode(params.recentSlot)], this.programId);\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type2, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed\n });\n const keys = [{\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n }];\n return [new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n }), lookupTableAddress];\n }\n static freezeLookupTable(params) {\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type2);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n static extendLookupTable(params) {\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type2, {\n addresses: params.addresses.map((addr) => addr.toBytes())\n });\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n if (params.payer) {\n keys.push({\n pubkey: params.payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n });\n }\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n static deactivateLookupTable(params) {\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type2);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n static closeLookupTable(params) {\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type2);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n };\n AddressLookupTableProgram.programId = new PublicKey(\"AddressLookupTab1e1111111111111111111111111\");\n var COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u8(\"instruction\"), BufferLayout.u32(\"units\"), BufferLayout.u32(\"additionalFee\")])\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u8(\"instruction\"), BufferLayout.u32(\"bytes\")])\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u8(\"instruction\"), BufferLayout.u32(\"units\")])\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u8(\"instruction\"), u64(\"microLamports\")])\n }\n });\n var ComputeBudgetProgram = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the Compute Budget program\n */\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params) {\n const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type2, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static requestHeapFrame(params) {\n const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type2, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static setComputeUnitLimit(params) {\n const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type2, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static setComputeUnitPrice(params) {\n const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type2, {\n microLamports: BigInt(params.microLamports)\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n };\n ComputeBudgetProgram.programId = new PublicKey(\"ComputeBudget111111111111111111111111111111\");\n var PRIVATE_KEY_BYTES$1 = 64;\n var PUBLIC_KEY_BYTES$1 = 32;\n var SIGNATURE_BYTES = 64;\n var ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct([BufferLayout.u8(\"numSignatures\"), BufferLayout.u8(\"padding\"), BufferLayout.u16(\"signatureOffset\"), BufferLayout.u16(\"signatureInstructionIndex\"), BufferLayout.u16(\"publicKeyOffset\"), BufferLayout.u16(\"publicKeyInstructionIndex\"), BufferLayout.u16(\"messageDataOffset\"), BufferLayout.u16(\"messageDataSize\"), BufferLayout.u16(\"messageInstructionIndex\")]);\n var Ed25519Program = class _Ed25519Program {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the ed25519 program\n */\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(params) {\n const {\n publicKey: publicKey2,\n message,\n signature,\n instructionIndex\n } = params;\n assert2(publicKey2.length === PUBLIC_KEY_BYTES$1, `Public Key must be ${PUBLIC_KEY_BYTES$1} bytes but received ${publicKey2.length} bytes`);\n assert2(signature.length === SIGNATURE_BYTES, `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`);\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey2.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n const instructionData = Buffer2.alloc(messageDataOffset + message.length);\n const index = instructionIndex == null ? 65535 : instructionIndex;\n ED25519_INSTRUCTION_LAYOUT.encode({\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index\n }, instructionData);\n instructionData.fill(publicKey2, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n return new TransactionInstruction({\n keys: [],\n programId: _Ed25519Program.programId,\n data: instructionData\n });\n }\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(params) {\n const {\n privateKey,\n message,\n instructionIndex\n } = params;\n assert2(privateKey.length === PRIVATE_KEY_BYTES$1, `Private key must be ${PRIVATE_KEY_BYTES$1} bytes but received ${privateKey.length} bytes`);\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey2 = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n return this.createInstructionWithPublicKey({\n publicKey: publicKey2,\n message,\n signature,\n instructionIndex\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n };\n Ed25519Program.programId = new PublicKey(\"Ed25519SigVerify111111111111111111111111111\");\n var ecdsaSign = (msgHash, privKey) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery];\n };\n secp256k1.utils.isValidPrivateKey;\n var publicKeyCreate = secp256k1.getPublicKey;\n var PRIVATE_KEY_BYTES = 32;\n var ETHEREUM_ADDRESS_BYTES = 20;\n var PUBLIC_KEY_BYTES = 64;\n var SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n var SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct([BufferLayout.u8(\"numSignatures\"), BufferLayout.u16(\"signatureOffset\"), BufferLayout.u8(\"signatureInstructionIndex\"), BufferLayout.u16(\"ethAddressOffset\"), BufferLayout.u8(\"ethAddressInstructionIndex\"), BufferLayout.u16(\"messageDataOffset\"), BufferLayout.u16(\"messageDataSize\"), BufferLayout.u8(\"messageInstructionIndex\"), BufferLayout.blob(20, \"ethAddress\"), BufferLayout.blob(64, \"signature\"), BufferLayout.u8(\"recoveryId\")]);\n var Secp256k1Program = class _Secp256k1Program {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the secp256k1 program\n */\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(publicKey2) {\n assert2(publicKey2.length === PUBLIC_KEY_BYTES, `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey2.length} bytes`);\n try {\n return Buffer2.from(keccak_256(toBuffer(publicKey2))).slice(-ETHEREUM_ADDRESS_BYTES);\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(params) {\n const {\n publicKey: publicKey2,\n message,\n signature,\n recoveryId,\n instructionIndex\n } = params;\n return _Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: _Secp256k1Program.publicKeyToEthAddress(publicKey2),\n message,\n signature,\n recoveryId,\n instructionIndex\n });\n }\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(params) {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0\n } = params;\n let ethAddress;\n if (typeof rawAddress === \"string\") {\n if (rawAddress.startsWith(\"0x\")) {\n ethAddress = Buffer2.from(rawAddress.substr(2), \"hex\");\n } else {\n ethAddress = Buffer2.from(rawAddress, \"hex\");\n }\n } else {\n ethAddress = rawAddress;\n }\n assert2(ethAddress.length === ETHEREUM_ADDRESS_BYTES, `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`);\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n const instructionData = Buffer2.alloc(SECP256K1_INSTRUCTION_LAYOUT.span + message.length);\n SECP256K1_INSTRUCTION_LAYOUT.encode({\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId\n }, instructionData);\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n return new TransactionInstruction({\n keys: [],\n programId: _Secp256k1Program.programId,\n data: instructionData\n });\n }\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(params) {\n const {\n privateKey: pkey,\n message,\n instructionIndex\n } = params;\n assert2(pkey.length === PRIVATE_KEY_BYTES, `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`);\n try {\n const privateKey = toBuffer(pkey);\n const publicKey2 = publicKeyCreate(\n privateKey,\n false\n /* isCompressed */\n ).slice(1);\n const messageHash = Buffer2.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n return this.createInstructionWithPublicKey({\n publicKey: publicKey2,\n message,\n signature,\n recoveryId,\n instructionIndex\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n };\n Secp256k1Program.programId = new PublicKey(\"KeccakSecp256k11111111111111111111111111111\");\n var _Lockup;\n var STAKE_CONFIG_ID = new PublicKey(\"StakeConfig11111111111111111111111111111111\");\n var Lockup = class {\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp, epoch, custodian) {\n this.unixTimestamp = void 0;\n this.epoch = void 0;\n this.custodian = void 0;\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n /**\n * Default, inactive Lockup value\n */\n };\n _Lockup = Lockup;\n Lockup.default = new _Lockup(0, 0, PublicKey.default);\n var STAKE_INSTRUCTION_LAYOUTS = Object.freeze({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), authorized(), lockup()])\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"newAuthorized\"), BufferLayout.u32(\"stakeAuthorizationType\")])\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\")])\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\")])\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"newAuthorized\"), BufferLayout.u32(\"stakeAuthorizationType\"), rustString(\"authoritySeed\"), publicKey(\"authorityOwner\")])\n }\n });\n var StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0\n },\n Withdrawer: {\n index: 1\n }\n });\n var StakeProgram = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the Stake program\n */\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params) {\n const {\n stakePubkey,\n authorized: authorized2,\n lockup: maybeLockup\n } = params;\n const lockup2 = maybeLockup || Lockup.default;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type2, {\n authorized: {\n staker: toBuffer(authorized2.staker.toBuffer()),\n withdrawer: toBuffer(authorized2.withdrawer.toBuffer())\n },\n lockup: {\n unixTimestamp: lockup2.unixTimestamp,\n epoch: lockup2.epoch,\n custodian: toBuffer(lockup2.custodian.toBuffer())\n }\n });\n const instructionData = {\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n const {\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n } = params;\n return transaction.add(this.initialize({\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n }));\n }\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n const {\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n } = params;\n return transaction.add(this.initialize({\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n }));\n }\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n votePubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type2);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: votePubkey,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: STAKE_CONFIG_ID,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type2, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params) {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type2, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer())\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorityBase,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * @internal\n */\n static splitInstruction(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type2, {\n lamports\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: splitStakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params, rentExemptReserve) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: rentExemptReserve,\n space: this.space,\n programId: this.programId\n }));\n return transaction.add(this.splitInstruction(params));\n }\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params, rentExemptReserve) {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports\n } = params;\n const transaction = new Transaction();\n transaction.add(SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId\n }));\n if (rentExemptReserve && rentExemptReserve > 0) {\n transaction.add(SystemProgram.transfer({\n fromPubkey: params.authorizedPubkey,\n toPubkey: splitStakePubkey,\n lamports: rentExemptReserve\n }));\n }\n return transaction.add(this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports\n }));\n }\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params) {\n const {\n stakePubkey,\n sourceStakePubKey,\n authorizedPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type2);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: sourceStakePubKey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n toPubkey,\n lamports,\n custodianPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type2, {\n lamports\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params) {\n const {\n stakePubkey,\n authorizedPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type2);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n };\n StakeProgram.programId = new PublicKey(\"Stake11111111111111111111111111111111111111\");\n StakeProgram.space = 200;\n var VOTE_INSTRUCTION_LAYOUTS = Object.freeze({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), voteInit()])\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"newAuthorized\"), BufferLayout.u32(\"voteAuthorizationType\")])\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\")])\n },\n UpdateValidatorIdentity: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), voteAuthorizeWithSeedArgs()])\n }\n });\n var VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0\n },\n Withdrawer: {\n index: 1\n }\n });\n var VoteProgram = class _VoteProgram {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the Vote program\n */\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(params) {\n const {\n votePubkey,\n nodePubkey,\n voteInit: voteInit2\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type2, {\n voteInit: {\n nodePubkey: toBuffer(voteInit2.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit2.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(voteInit2.authorizedWithdrawer.toBuffer()),\n commission: voteInit2.commission\n }\n });\n const instructionData = {\n keys: [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: nodePubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n return transaction.add(this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit\n }));\n }\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params) {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type2, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params) {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type2, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(currentAuthorityDerivedKeyOwnerPubkey.toBuffer()),\n currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index\n }\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params) {\n const {\n votePubkey,\n authorizedWithdrawerPubkey,\n lamports,\n toPubkey\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type2, {\n lamports\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedWithdrawerPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(params, currentVoteAccountBalance, rentExemptMinimum) {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\"Withdraw will leave vote account with insufficient funds.\");\n }\n return _VoteProgram.withdraw(params);\n }\n /**\n * Generate a transaction to update the validator identity (node pubkey) of a Vote account.\n */\n static updateValidatorIdentity(params) {\n const {\n votePubkey,\n authorizedWithdrawerPubkey,\n nodePubkey\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.UpdateValidatorIdentity;\n const data = encodeData(type2);\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: nodePubkey,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: authorizedWithdrawerPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n };\n VoteProgram.programId = new PublicKey(\"Vote111111111111111111111111111111111111111\");\n VoteProgram.space = 3762;\n var VALIDATOR_INFO_KEY = new PublicKey(\"Va1idator1nfo111111111111111111111111111111\");\n var InfoString = type({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n iconUrl: optional(string()),\n keybaseUsername: optional(string())\n });\n var VOTE_PROGRAM_ID = new PublicKey(\"Vote111111111111111111111111111111111111111\");\n var VoteAccountLayout = BufferLayout.struct([\n publicKey(\"nodePubkey\"),\n publicKey(\"authorizedWithdrawer\"),\n BufferLayout.u8(\"commission\"),\n BufferLayout.nu64(),\n // votes.length\n BufferLayout.seq(BufferLayout.struct([BufferLayout.nu64(\"slot\"), BufferLayout.u32(\"confirmationCount\")]), BufferLayout.offset(BufferLayout.u32(), -8), \"votes\"),\n BufferLayout.u8(\"rootSlotValid\"),\n BufferLayout.nu64(\"rootSlot\"),\n BufferLayout.nu64(),\n // authorizedVoters.length\n BufferLayout.seq(BufferLayout.struct([BufferLayout.nu64(\"epoch\"), publicKey(\"authorizedVoter\")]), BufferLayout.offset(BufferLayout.u32(), -8), \"authorizedVoters\"),\n BufferLayout.struct([BufferLayout.seq(BufferLayout.struct([publicKey(\"authorizedPubkey\"), BufferLayout.nu64(\"epochOfLastAuthorizedSwitch\"), BufferLayout.nu64(\"targetEpoch\")]), 32, \"buf\"), BufferLayout.nu64(\"idx\"), BufferLayout.u8(\"isEmpty\")], \"priorVoters\"),\n BufferLayout.nu64(),\n // epochCredits.length\n BufferLayout.seq(BufferLayout.struct([BufferLayout.nu64(\"epoch\"), BufferLayout.nu64(\"credits\"), BufferLayout.nu64(\"prevCredits\")]), BufferLayout.offset(BufferLayout.u32(), -8), \"epochCredits\"),\n BufferLayout.struct([BufferLayout.nu64(\"slot\"), BufferLayout.nu64(\"timestamp\")], \"lastTimestamp\")\n ]);\n\n // src/lib/lit-actions/internal/solana/generatePrivateKey.ts\n function generateSolanaPrivateKey() {\n const solanaKeypair = Keypair.generate();\n return {\n privateKey: Buffer2.from(solanaKeypair.secretKey).toString(\"hex\"),\n publicKey: solanaKeypair.publicKey.toString()\n };\n }\n\n // src/lib/lit-actions/raw-action-functions/common/batchGenerateEncryptedKeys.ts\n async function processSolanaAction({\n action,\n accessControlConditions: accessControlConditions2\n }) {\n const { network, generateKeyParams } = action;\n const solanaKey = generateSolanaPrivateKey();\n const generatedPrivateKey = await encryptPrivateKey({\n accessControlConditions: accessControlConditions2,\n publicKey: solanaKey.publicKey,\n privateKey: solanaKey.privateKey\n });\n return {\n network,\n generateEncryptedPrivateKey: {\n ...generatedPrivateKey,\n memo: generateKeyParams.memo\n }\n };\n }\n async function processActions({\n actions: actions2,\n accessControlConditions: accessControlConditions2\n }) {\n return Promise.all(\n actions2.map(async (action, ndx) => {\n const { network } = action;\n if (network === \"solana\") {\n return await processSolanaAction({\n action,\n accessControlConditions: accessControlConditions2\n });\n } else {\n throw new Error(`Invalid network for action[${ndx}]: ${network}`);\n }\n })\n );\n }\n function validateParams(actions2) {\n if (!actions2) {\n throw new Error(\"Missing required field: actions\");\n }\n if (!actions2.length) {\n throw new Error(\"No actions provided (empty array?)\");\n }\n actions2.forEach((action, ndx) => {\n if (![\"solana\"].includes(action.network)) {\n throw new Error(`Invalid field: actions[${ndx}].network: ${action.network}`);\n }\n if (!action.generateKeyParams) {\n throw new Error(`Missing required field: actions[${ndx}].generateKeyParams`);\n }\n if (!action.generateKeyParams?.memo) {\n throw new Error(`Missing required field: actions[${ndx}].generateKeyParams.memo`);\n }\n });\n }\n async function batchGenerateEncryptedKeys({\n actions: actions2,\n accessControlConditions: accessControlConditions2\n }) {\n validateParams(actions2);\n return processActions({\n actions: actions2,\n accessControlConditions: accessControlConditions2\n });\n }\n\n // src/lib/lit-actions/self-executing-actions/common/batchGenerateEncryptedKeys.ts\n (async () => litActionHandler(async () => batchGenerateEncryptedKeys({ actions, accessControlConditions })))();\n})();\n/*! Bundled license information:\n\n@jspm/core/nodelibs/browser/chunk-DtuTasat.js:\n (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *)\n\nsafe-buffer/index.js:\n (*! safe-buffer. MIT License. Feross Aboukhadijeh *)\n\n@solana/buffer-layout/lib/Layout.js:\n (**\n * Support for translating between Uint8Array instances and JavaScript\n * native types.\n *\n * {@link module:Layout~Layout|Layout} is the basis of a class\n * hierarchy that associates property names with sequences of encoded\n * bytes.\n *\n * Layouts are supported for these scalar (numeric) types:\n * * {@link module:Layout~UInt|Unsigned integers in little-endian\n * format} with {@link module:Layout.u8|8-bit}, {@link\n * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},\n * {@link module:Layout.u32|32-bit}, {@link\n * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}\n * representation ranges;\n * * {@link module:Layout~UIntBE|Unsigned integers in big-endian\n * format} with {@link module:Layout.u16be|16-bit}, {@link\n * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},\n * {@link module:Layout.u40be|40-bit}, and {@link\n * module:Layout.u48be|48-bit} representation ranges;\n * * {@link module:Layout~Int|Signed integers in little-endian\n * format} with {@link module:Layout.s8|8-bit}, {@link\n * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},\n * {@link module:Layout.s32|32-bit}, {@link\n * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}\n * representation ranges;\n * * {@link module:Layout~IntBE|Signed integers in big-endian format}\n * with {@link module:Layout.s16be|16-bit}, {@link\n * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},\n * {@link module:Layout.s40be|40-bit}, and {@link\n * module:Layout.s48be|48-bit} representation ranges;\n * * 64-bit integral values that decode to an exact (if magnitude is\n * less than 2^53) or nearby integral Number in {@link\n * module:Layout.nu64|unsigned little-endian}, {@link\n * module:Layout.nu64be|unsigned big-endian}, {@link\n * module:Layout.ns64|signed little-endian}, and {@link\n * module:Layout.ns64be|unsigned big-endian} encodings;\n * * 32-bit floating point values with {@link\n * module:Layout.f32|little-endian} and {@link\n * module:Layout.f32be|big-endian} representations;\n * * 64-bit floating point values with {@link\n * module:Layout.f64|little-endian} and {@link\n * module:Layout.f64be|big-endian} representations;\n * * {@link module:Layout.const|Constants} that take no space in the\n * encoded expression.\n *\n * and for these aggregate types:\n * * {@link module:Layout.seq|Sequence}s of instances of a {@link\n * module:Layout~Layout|Layout}, with JavaScript representation as\n * an Array and constant or data-dependent {@link\n * module:Layout~Sequence#count|length};\n * * {@link module:Layout.struct|Structure}s that aggregate a\n * heterogeneous sequence of {@link module:Layout~Layout|Layout}\n * instances, with JavaScript representation as an Object;\n * * {@link module:Layout.union|Union}s that support multiple {@link\n * module:Layout~VariantLayout|variant layouts} over a fixed\n * (padded) or variable (not padded) span of bytes, using an\n * unsigned integer at the start of the data or a separate {@link\n * module:Layout.unionLayoutDiscriminator|layout element} to\n * determine which layout to use when interpreting the buffer\n * contents;\n * * {@link module:Layout.bits|BitStructure}s that contain a sequence\n * of individual {@link\n * module:Layout~BitStructure#addField|BitField}s packed into an 8,\n * 16, 24, or 32-bit unsigned integer starting at the least- or\n * most-significant bit;\n * * {@link module:Layout.cstr|C strings} of varying length;\n * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link\n * module:Layout~Blob#length|length} raw data.\n *\n * All {@link module:Layout~Layout|Layout} instances are immutable\n * after construction, to prevent internal state from becoming\n * inconsistent.\n *\n * @local Layout\n * @local ExternalLayout\n * @local GreedyCount\n * @local OffsetLayout\n * @local UInt\n * @local UIntBE\n * @local Int\n * @local IntBE\n * @local NearUInt64\n * @local NearUInt64BE\n * @local NearInt64\n * @local NearInt64BE\n * @local Float\n * @local FloatBE\n * @local Double\n * @local DoubleBE\n * @local Sequence\n * @local Structure\n * @local UnionDiscriminator\n * @local UnionLayoutDiscriminator\n * @local Union\n * @local VariantLayout\n * @local BitStructure\n * @local BitField\n * @local Boolean\n * @local Blob\n * @local CString\n * @local Constant\n * @local bindConstructorLayout\n * @module Layout\n * @license MIT\n * @author Peter A. Bigot\n * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}\n *)\n\n@noble/hashes/esm/utils.js:\n (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/modular.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/curve.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/edwards.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/ed25519.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/weierstrass.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/_shortw_utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/secp256k1.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n*/\n"; +const code = ";(()=>{try{const g=globalThis;const D=(g.Deno=g.Deno||{});const B=(D.build=D.build||{});if(B.os==null){B.os=\"linux\";}}catch{}})();\n\"use strict\";\n(() => {\n var __create = Object.create;\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __getProtoOf = Object.getPrototypeOf;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n };\n var __commonJS = (cb, mod2) => function __require() {\n return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;\n };\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, \"default\", { value: mod2, enumerable: true }) : target,\n mod2\n ));\n var __toCommonJS = (mod2) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod2);\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/__dirname.js\n var init_dirname = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/__dirname.js\"() {\n \"use strict\";\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js\n function Item(fun, array2) {\n this.fun = fun;\n this.array = array2;\n }\n function hrtime(previousTimestamp) {\n var baseNow = Math.floor((Date.now() - _performance.now()) * 1e-3);\n var clocktime = _performance.now() * 1e-3;\n var seconds = Math.floor(clocktime) + baseNow;\n var nanoseconds = Math.floor(clocktime % 1 * 1e9);\n if (previousTimestamp) {\n seconds = seconds - previousTimestamp[0];\n nanoseconds = nanoseconds - previousTimestamp[1];\n if (nanoseconds < 0) {\n seconds--;\n nanoseconds += nanoPerSec;\n }\n }\n return [seconds, nanoseconds];\n }\n var env, _performance, nowOffset, nanoPerSec;\n var init_process = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Item.prototype.run = function() {\n this.fun.apply(null, this.array);\n };\n env = {\n PATH: \"/usr/bin\",\n LANG: typeof navigator !== \"undefined\" ? navigator.language + \".UTF-8\" : void 0,\n PWD: \"/\",\n HOME: \"/home\",\n TMP: \"/tmp\"\n };\n _performance = {\n now: typeof performance !== \"undefined\" ? performance.now.bind(performance) : void 0,\n timing: typeof performance !== \"undefined\" ? performance.timing : void 0\n };\n if (_performance.now === void 0) {\n nowOffset = Date.now();\n if (_performance.timing && _performance.timing.navigationStart) {\n nowOffset = _performance.timing.navigationStart;\n }\n _performance.now = () => Date.now() - nowOffset;\n }\n nanoPerSec = 1e9;\n hrtime.bigint = function(time) {\n var diff = hrtime(time);\n if (typeof BigInt === \"undefined\") {\n return diff[0] * nanoPerSec + diff[1];\n }\n return BigInt(diff[0] * nanoPerSec) + BigInt(diff[1]);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/process.js\n var init_process2 = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/process.js\"() {\n \"use strict\";\n init_process();\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js\n function dew$2() {\n if (_dewExec$2)\n return exports$2;\n _dewExec$2 = true;\n exports$2.byteLength = byteLength;\n exports$2.toByteArray = toByteArray;\n exports$2.fromByteArray = fromByteArray;\n var lookup = [];\n var revLookup = [];\n var Arr = typeof Uint8Array !== \"undefined\" ? Uint8Array : Array;\n var code = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n for (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i];\n revLookup[code.charCodeAt(i)] = i;\n }\n revLookup[\"-\".charCodeAt(0)] = 62;\n revLookup[\"_\".charCodeAt(0)] = 63;\n function getLens(b64) {\n var len2 = b64.length;\n if (len2 % 4 > 0) {\n throw new Error(\"Invalid string. Length must be a multiple of 4\");\n }\n var validLen = b64.indexOf(\"=\");\n if (validLen === -1)\n validLen = len2;\n var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;\n return [validLen, placeHoldersLen];\n }\n function byteLength(b64) {\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n }\n function _byteLength(b64, validLen, placeHoldersLen) {\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n }\n function toByteArray(b64) {\n var tmp;\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n var curByte = 0;\n var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;\n var i2;\n for (i2 = 0; i2 < len2; i2 += 4) {\n tmp = revLookup[b64.charCodeAt(i2)] << 18 | revLookup[b64.charCodeAt(i2 + 1)] << 12 | revLookup[b64.charCodeAt(i2 + 2)] << 6 | revLookup[b64.charCodeAt(i2 + 3)];\n arr[curByte++] = tmp >> 16 & 255;\n arr[curByte++] = tmp >> 8 & 255;\n arr[curByte++] = tmp & 255;\n }\n if (placeHoldersLen === 2) {\n tmp = revLookup[b64.charCodeAt(i2)] << 2 | revLookup[b64.charCodeAt(i2 + 1)] >> 4;\n arr[curByte++] = tmp & 255;\n }\n if (placeHoldersLen === 1) {\n tmp = revLookup[b64.charCodeAt(i2)] << 10 | revLookup[b64.charCodeAt(i2 + 1)] << 4 | revLookup[b64.charCodeAt(i2 + 2)] >> 2;\n arr[curByte++] = tmp >> 8 & 255;\n arr[curByte++] = tmp & 255;\n }\n return arr;\n }\n function tripletToBase64(num) {\n return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];\n }\n function encodeChunk(uint8, start, end) {\n var tmp;\n var output = [];\n for (var i2 = start; i2 < end; i2 += 3) {\n tmp = (uint8[i2] << 16 & 16711680) + (uint8[i2 + 1] << 8 & 65280) + (uint8[i2 + 2] & 255);\n output.push(tripletToBase64(tmp));\n }\n return output.join(\"\");\n }\n function fromByteArray(uint8) {\n var tmp;\n var len2 = uint8.length;\n var extraBytes = len2 % 3;\n var parts = [];\n var maxChunkLength = 16383;\n for (var i2 = 0, len22 = len2 - extraBytes; i2 < len22; i2 += maxChunkLength) {\n parts.push(encodeChunk(uint8, i2, i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength));\n }\n if (extraBytes === 1) {\n tmp = uint8[len2 - 1];\n parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 63] + \"==\");\n } else if (extraBytes === 2) {\n tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];\n parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + \"=\");\n }\n return parts.join(\"\");\n }\n return exports$2;\n }\n function dew$1() {\n if (_dewExec$1)\n return exports$1;\n _dewExec$1 = true;\n exports$1.read = function(buffer, offset2, isLE2, mLen, nBytes) {\n var e, m;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE2 ? nBytes - 1 : 0;\n var d = isLE2 ? -1 : 1;\n var s = buffer[offset2 + i];\n i += d;\n e = s & (1 << -nBits) - 1;\n s >>= -nBits;\n nBits += eLen;\n for (; nBits > 0; e = e * 256 + buffer[offset2 + i], i += d, nBits -= 8) {\n }\n m = e & (1 << -nBits) - 1;\n e >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m = m * 256 + buffer[offset2 + i], i += d, nBits -= 8) {\n }\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : (s ? -1 : 1) * Infinity;\n } else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\n };\n exports$1.write = function(buffer, value, offset2, isLE2, mLen, nBytes) {\n var e, m, c;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;\n var i = isLE2 ? 0 : nBytes - 1;\n var d = isLE2 ? 1 : -1;\n var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n value = Math.abs(value);\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n for (; mLen >= 8; buffer[offset2 + i] = m & 255, i += d, m /= 256, mLen -= 8) {\n }\n e = e << mLen | m;\n eLen += mLen;\n for (; eLen > 0; buffer[offset2 + i] = e & 255, i += d, e /= 256, eLen -= 8) {\n }\n buffer[offset2 + i - d] |= s * 128;\n };\n return exports$1;\n }\n function dew() {\n if (_dewExec)\n return exports;\n _dewExec = true;\n const base64 = dew$2();\n const ieee754 = dew$1();\n const customInspectSymbol = typeof Symbol === \"function\" && typeof Symbol[\"for\"] === \"function\" ? Symbol[\"for\"](\"nodejs.util.inspect.custom\") : null;\n exports.Buffer = Buffer3;\n exports.SlowBuffer = SlowBuffer;\n exports.INSPECT_MAX_BYTES = 50;\n const K_MAX_LENGTH = 2147483647;\n exports.kMaxLength = K_MAX_LENGTH;\n Buffer3.TYPED_ARRAY_SUPPORT = typedArraySupport();\n if (!Buffer3.TYPED_ARRAY_SUPPORT && typeof console !== \"undefined\" && typeof console.error === \"function\") {\n console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");\n }\n function typedArraySupport() {\n try {\n const arr = new Uint8Array(1);\n const proto = {\n foo: function() {\n return 42;\n }\n };\n Object.setPrototypeOf(proto, Uint8Array.prototype);\n Object.setPrototypeOf(arr, proto);\n return arr.foo() === 42;\n } catch (e) {\n return false;\n }\n }\n Object.defineProperty(Buffer3.prototype, \"parent\", {\n enumerable: true,\n get: function() {\n if (!Buffer3.isBuffer(this))\n return void 0;\n return this.buffer;\n }\n });\n Object.defineProperty(Buffer3.prototype, \"offset\", {\n enumerable: true,\n get: function() {\n if (!Buffer3.isBuffer(this))\n return void 0;\n return this.byteOffset;\n }\n });\n function createBuffer(length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"');\n }\n const buf = new Uint8Array(length);\n Object.setPrototypeOf(buf, Buffer3.prototype);\n return buf;\n }\n function Buffer3(arg, encodingOrOffset, length) {\n if (typeof arg === \"number\") {\n if (typeof encodingOrOffset === \"string\") {\n throw new TypeError('The \"string\" argument must be of type string. Received type number');\n }\n return allocUnsafe(arg);\n }\n return from(arg, encodingOrOffset, length);\n }\n Buffer3.poolSize = 8192;\n function from(value, encodingOrOffset, length) {\n if (typeof value === \"string\") {\n return fromString(value, encodingOrOffset);\n }\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value);\n }\n if (value == null) {\n throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n }\n if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {\n return fromArrayBuffer(value, encodingOrOffset, length);\n }\n if (typeof SharedArrayBuffer !== \"undefined\" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length);\n }\n if (typeof value === \"number\") {\n throw new TypeError('The \"value\" argument must not be of type number. Received type number');\n }\n const valueOf = value.valueOf && value.valueOf();\n if (valueOf != null && valueOf !== value) {\n return Buffer3.from(valueOf, encodingOrOffset, length);\n }\n const b = fromObject(value);\n if (b)\n return b;\n if (typeof Symbol !== \"undefined\" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === \"function\") {\n return Buffer3.from(value[Symbol.toPrimitive](\"string\"), encodingOrOffset, length);\n }\n throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n }\n Buffer3.from = function(value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length);\n };\n Object.setPrototypeOf(Buffer3.prototype, Uint8Array.prototype);\n Object.setPrototypeOf(Buffer3, Uint8Array);\n function assertSize(size) {\n if (typeof size !== \"number\") {\n throw new TypeError('\"size\" argument must be of type number');\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"');\n }\n }\n function alloc(size, fill, encoding) {\n assertSize(size);\n if (size <= 0) {\n return createBuffer(size);\n }\n if (fill !== void 0) {\n return typeof encoding === \"string\" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);\n }\n return createBuffer(size);\n }\n Buffer3.alloc = function(size, fill, encoding) {\n return alloc(size, fill, encoding);\n };\n function allocUnsafe(size) {\n assertSize(size);\n return createBuffer(size < 0 ? 0 : checked(size) | 0);\n }\n Buffer3.allocUnsafe = function(size) {\n return allocUnsafe(size);\n };\n Buffer3.allocUnsafeSlow = function(size) {\n return allocUnsafe(size);\n };\n function fromString(string2, encoding) {\n if (typeof encoding !== \"string\" || encoding === \"\") {\n encoding = \"utf8\";\n }\n if (!Buffer3.isEncoding(encoding)) {\n throw new TypeError(\"Unknown encoding: \" + encoding);\n }\n const length = byteLength(string2, encoding) | 0;\n let buf = createBuffer(length);\n const actual = buf.write(string2, encoding);\n if (actual !== length) {\n buf = buf.slice(0, actual);\n }\n return buf;\n }\n function fromArrayLike(array2) {\n const length = array2.length < 0 ? 0 : checked(array2.length) | 0;\n const buf = createBuffer(length);\n for (let i = 0; i < length; i += 1) {\n buf[i] = array2[i] & 255;\n }\n return buf;\n }\n function fromArrayView(arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView);\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);\n }\n return fromArrayLike(arrayView);\n }\n function fromArrayBuffer(array2, byteOffset, length) {\n if (byteOffset < 0 || array2.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds');\n }\n if (array2.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds');\n }\n let buf;\n if (byteOffset === void 0 && length === void 0) {\n buf = new Uint8Array(array2);\n } else if (length === void 0) {\n buf = new Uint8Array(array2, byteOffset);\n } else {\n buf = new Uint8Array(array2, byteOffset, length);\n }\n Object.setPrototypeOf(buf, Buffer3.prototype);\n return buf;\n }\n function fromObject(obj) {\n if (Buffer3.isBuffer(obj)) {\n const len = checked(obj.length) | 0;\n const buf = createBuffer(len);\n if (buf.length === 0) {\n return buf;\n }\n obj.copy(buf, 0, 0, len);\n return buf;\n }\n if (obj.length !== void 0) {\n if (typeof obj.length !== \"number\" || numberIsNaN(obj.length)) {\n return createBuffer(0);\n }\n return fromArrayLike(obj);\n }\n if (obj.type === \"Buffer\" && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data);\n }\n }\n function checked(length) {\n if (length >= K_MAX_LENGTH) {\n throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\" + K_MAX_LENGTH.toString(16) + \" bytes\");\n }\n return length | 0;\n }\n function SlowBuffer(length) {\n if (+length != length) {\n length = 0;\n }\n return Buffer3.alloc(+length);\n }\n Buffer3.isBuffer = function isBuffer(b) {\n return b != null && b._isBuffer === true && b !== Buffer3.prototype;\n };\n Buffer3.compare = function compare(a, b) {\n if (isInstance(a, Uint8Array))\n a = Buffer3.from(a, a.offset, a.byteLength);\n if (isInstance(b, Uint8Array))\n b = Buffer3.from(b, b.offset, b.byteLength);\n if (!Buffer3.isBuffer(a) || !Buffer3.isBuffer(b)) {\n throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');\n }\n if (a === b)\n return 0;\n let x = a.length;\n let y = b.length;\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n if (x < y)\n return -1;\n if (y < x)\n return 1;\n return 0;\n };\n Buffer3.isEncoding = function isEncoding(encoding) {\n switch (String(encoding).toLowerCase()) {\n case \"hex\":\n case \"utf8\":\n case \"utf-8\":\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n case \"base64\":\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return true;\n default:\n return false;\n }\n };\n Buffer3.concat = function concat(list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n if (list.length === 0) {\n return Buffer3.alloc(0);\n }\n let i;\n if (length === void 0) {\n length = 0;\n for (i = 0; i < list.length; ++i) {\n length += list[i].length;\n }\n }\n const buffer = Buffer3.allocUnsafe(length);\n let pos = 0;\n for (i = 0; i < list.length; ++i) {\n let buf = list[i];\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer3.isBuffer(buf))\n buf = Buffer3.from(buf);\n buf.copy(buffer, pos);\n } else {\n Uint8Array.prototype.set.call(buffer, buf, pos);\n }\n } else if (!Buffer3.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n } else {\n buf.copy(buffer, pos);\n }\n pos += buf.length;\n }\n return buffer;\n };\n function byteLength(string2, encoding) {\n if (Buffer3.isBuffer(string2)) {\n return string2.length;\n }\n if (ArrayBuffer.isView(string2) || isInstance(string2, ArrayBuffer)) {\n return string2.byteLength;\n }\n if (typeof string2 !== \"string\") {\n throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string2);\n }\n const len = string2.length;\n const mustMatch = arguments.length > 2 && arguments[2] === true;\n if (!mustMatch && len === 0)\n return 0;\n let loweredCase = false;\n for (; ; ) {\n switch (encoding) {\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return len;\n case \"utf8\":\n case \"utf-8\":\n return utf8ToBytes2(string2).length;\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return len * 2;\n case \"hex\":\n return len >>> 1;\n case \"base64\":\n return base64ToBytes(string2).length;\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes2(string2).length;\n }\n encoding = (\"\" + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer3.byteLength = byteLength;\n function slowToString(encoding, start, end) {\n let loweredCase = false;\n if (start === void 0 || start < 0) {\n start = 0;\n }\n if (start > this.length) {\n return \"\";\n }\n if (end === void 0 || end > this.length) {\n end = this.length;\n }\n if (end <= 0) {\n return \"\";\n }\n end >>>= 0;\n start >>>= 0;\n if (end <= start) {\n return \"\";\n }\n if (!encoding)\n encoding = \"utf8\";\n while (true) {\n switch (encoding) {\n case \"hex\":\n return hexSlice(this, start, end);\n case \"utf8\":\n case \"utf-8\":\n return utf8Slice(this, start, end);\n case \"ascii\":\n return asciiSlice(this, start, end);\n case \"latin1\":\n case \"binary\":\n return latin1Slice(this, start, end);\n case \"base64\":\n return base64Slice(this, start, end);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return utf16leSlice(this, start, end);\n default:\n if (loweredCase)\n throw new TypeError(\"Unknown encoding: \" + encoding);\n encoding = (encoding + \"\").toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer3.prototype._isBuffer = true;\n function swap(b, n, m) {\n const i = b[n];\n b[n] = b[m];\n b[m] = i;\n }\n Buffer3.prototype.swap16 = function swap16() {\n const len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 16-bits\");\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1);\n }\n return this;\n };\n Buffer3.prototype.swap32 = function swap32() {\n const len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 32-bits\");\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3);\n swap(this, i + 1, i + 2);\n }\n return this;\n };\n Buffer3.prototype.swap64 = function swap64() {\n const len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 64-bits\");\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7);\n swap(this, i + 1, i + 6);\n swap(this, i + 2, i + 5);\n swap(this, i + 3, i + 4);\n }\n return this;\n };\n Buffer3.prototype.toString = function toString() {\n const length = this.length;\n if (length === 0)\n return \"\";\n if (arguments.length === 0)\n return utf8Slice(this, 0, length);\n return slowToString.apply(this, arguments);\n };\n Buffer3.prototype.toLocaleString = Buffer3.prototype.toString;\n Buffer3.prototype.equals = function equals(b) {\n if (!Buffer3.isBuffer(b))\n throw new TypeError(\"Argument must be a Buffer\");\n if (this === b)\n return true;\n return Buffer3.compare(this, b) === 0;\n };\n Buffer3.prototype.inspect = function inspect() {\n let str = \"\";\n const max = exports.INSPECT_MAX_BYTES;\n str = this.toString(\"hex\", 0, max).replace(/(.{2})/g, \"$1 \").trim();\n if (this.length > max)\n str += \" ... \";\n return \"\";\n };\n if (customInspectSymbol) {\n Buffer3.prototype[customInspectSymbol] = Buffer3.prototype.inspect;\n }\n Buffer3.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer3.from(target, target.offset, target.byteLength);\n }\n if (!Buffer3.isBuffer(target)) {\n throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target);\n }\n if (start === void 0) {\n start = 0;\n }\n if (end === void 0) {\n end = target ? target.length : 0;\n }\n if (thisStart === void 0) {\n thisStart = 0;\n }\n if (thisEnd === void 0) {\n thisEnd = this.length;\n }\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError(\"out of range index\");\n }\n if (thisStart >= thisEnd && start >= end) {\n return 0;\n }\n if (thisStart >= thisEnd) {\n return -1;\n }\n if (start >= end) {\n return 1;\n }\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n if (this === target)\n return 0;\n let x = thisEnd - thisStart;\n let y = end - start;\n const len = Math.min(x, y);\n const thisCopy = this.slice(thisStart, thisEnd);\n const targetCopy = target.slice(start, end);\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i];\n y = targetCopy[i];\n break;\n }\n }\n if (x < y)\n return -1;\n if (y < x)\n return 1;\n return 0;\n };\n function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n if (buffer.length === 0)\n return -1;\n if (typeof byteOffset === \"string\") {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 2147483647) {\n byteOffset = 2147483647;\n } else if (byteOffset < -2147483648) {\n byteOffset = -2147483648;\n }\n byteOffset = +byteOffset;\n if (numberIsNaN(byteOffset)) {\n byteOffset = dir ? 0 : buffer.length - 1;\n }\n if (byteOffset < 0)\n byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir)\n return -1;\n else\n byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir)\n byteOffset = 0;\n else\n return -1;\n }\n if (typeof val === \"string\") {\n val = Buffer3.from(val, encoding);\n }\n if (Buffer3.isBuffer(val)) {\n if (val.length === 0) {\n return -1;\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n } else if (typeof val === \"number\") {\n val = val & 255;\n if (typeof Uint8Array.prototype.indexOf === \"function\") {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n }\n throw new TypeError(\"val must be string, number or Buffer\");\n }\n function arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n let indexSize = 1;\n let arrLength = arr.length;\n let valLength = val.length;\n if (encoding !== void 0) {\n encoding = String(encoding).toLowerCase();\n if (encoding === \"ucs2\" || encoding === \"ucs-2\" || encoding === \"utf16le\" || encoding === \"utf-16le\") {\n if (arr.length < 2 || val.length < 2) {\n return -1;\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n function read(buf, i2) {\n if (indexSize === 1) {\n return buf[i2];\n } else {\n return buf.readUInt16BE(i2 * indexSize);\n }\n }\n let i;\n if (dir) {\n let foundIndex = -1;\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1)\n foundIndex = i;\n if (i - foundIndex + 1 === valLength)\n return foundIndex * indexSize;\n } else {\n if (foundIndex !== -1)\n i -= i - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength)\n byteOffset = arrLength - valLength;\n for (i = byteOffset; i >= 0; i--) {\n let found = true;\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false;\n break;\n }\n }\n if (found)\n return i;\n }\n }\n return -1;\n }\n Buffer3.prototype.includes = function includes(val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1;\n };\n Buffer3.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n };\n Buffer3.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n };\n function hexWrite(buf, string2, offset2, length) {\n offset2 = Number(offset2) || 0;\n const remaining = buf.length - offset2;\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n if (length > remaining) {\n length = remaining;\n }\n }\n const strLen = string2.length;\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n let i;\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string2.substr(i * 2, 2), 16);\n if (numberIsNaN(parsed))\n return i;\n buf[offset2 + i] = parsed;\n }\n return i;\n }\n function utf8Write(buf, string2, offset2, length) {\n return blitBuffer(utf8ToBytes2(string2, buf.length - offset2), buf, offset2, length);\n }\n function asciiWrite(buf, string2, offset2, length) {\n return blitBuffer(asciiToBytes(string2), buf, offset2, length);\n }\n function base64Write(buf, string2, offset2, length) {\n return blitBuffer(base64ToBytes(string2), buf, offset2, length);\n }\n function ucs2Write(buf, string2, offset2, length) {\n return blitBuffer(utf16leToBytes(string2, buf.length - offset2), buf, offset2, length);\n }\n Buffer3.prototype.write = function write(string2, offset2, length, encoding) {\n if (offset2 === void 0) {\n encoding = \"utf8\";\n length = this.length;\n offset2 = 0;\n } else if (length === void 0 && typeof offset2 === \"string\") {\n encoding = offset2;\n length = this.length;\n offset2 = 0;\n } else if (isFinite(offset2)) {\n offset2 = offset2 >>> 0;\n if (isFinite(length)) {\n length = length >>> 0;\n if (encoding === void 0)\n encoding = \"utf8\";\n } else {\n encoding = length;\n length = void 0;\n }\n } else {\n throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");\n }\n const remaining = this.length - offset2;\n if (length === void 0 || length > remaining)\n length = remaining;\n if (string2.length > 0 && (length < 0 || offset2 < 0) || offset2 > this.length) {\n throw new RangeError(\"Attempt to write outside buffer bounds\");\n }\n if (!encoding)\n encoding = \"utf8\";\n let loweredCase = false;\n for (; ; ) {\n switch (encoding) {\n case \"hex\":\n return hexWrite(this, string2, offset2, length);\n case \"utf8\":\n case \"utf-8\":\n return utf8Write(this, string2, offset2, length);\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return asciiWrite(this, string2, offset2, length);\n case \"base64\":\n return base64Write(this, string2, offset2, length);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return ucs2Write(this, string2, offset2, length);\n default:\n if (loweredCase)\n throw new TypeError(\"Unknown encoding: \" + encoding);\n encoding = (\"\" + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n };\n Buffer3.prototype.toJSON = function toJSON() {\n return {\n type: \"Buffer\",\n data: Array.prototype.slice.call(this._arr || this, 0)\n };\n };\n function base64Slice(buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf);\n } else {\n return base64.fromByteArray(buf.slice(start, end));\n }\n }\n function utf8Slice(buf, start, end) {\n end = Math.min(buf.length, end);\n const res = [];\n let i = start;\n while (i < end) {\n const firstByte = buf[i];\n let codePoint = null;\n let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint;\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 128) {\n codePoint = firstByte;\n }\n break;\n case 2:\n secondByte = buf[i + 1];\n if ((secondByte & 192) === 128) {\n tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;\n if (tempCodePoint > 127) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 3:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {\n tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;\n if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 4:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n fourthByte = buf[i + 3];\n if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {\n tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;\n if (tempCodePoint > 65535 && tempCodePoint < 1114112) {\n codePoint = tempCodePoint;\n }\n }\n }\n }\n if (codePoint === null) {\n codePoint = 65533;\n bytesPerSequence = 1;\n } else if (codePoint > 65535) {\n codePoint -= 65536;\n res.push(codePoint >>> 10 & 1023 | 55296);\n codePoint = 56320 | codePoint & 1023;\n }\n res.push(codePoint);\n i += bytesPerSequence;\n }\n return decodeCodePointsArray(res);\n }\n const MAX_ARGUMENTS_LENGTH = 4096;\n function decodeCodePointsArray(codePoints) {\n const len = codePoints.length;\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints);\n }\n let res = \"\";\n let i = 0;\n while (i < len) {\n res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));\n }\n return res;\n }\n function asciiSlice(buf, start, end) {\n let ret = \"\";\n end = Math.min(buf.length, end);\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 127);\n }\n return ret;\n }\n function latin1Slice(buf, start, end) {\n let ret = \"\";\n end = Math.min(buf.length, end);\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i]);\n }\n return ret;\n }\n function hexSlice(buf, start, end) {\n const len = buf.length;\n if (!start || start < 0)\n start = 0;\n if (!end || end < 0 || end > len)\n end = len;\n let out = \"\";\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]];\n }\n return out;\n }\n function utf16leSlice(buf, start, end) {\n const bytes = buf.slice(start, end);\n let res = \"\";\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n }\n return res;\n }\n Buffer3.prototype.slice = function slice(start, end) {\n const len = this.length;\n start = ~~start;\n end = end === void 0 ? len : ~~end;\n if (start < 0) {\n start += len;\n if (start < 0)\n start = 0;\n } else if (start > len) {\n start = len;\n }\n if (end < 0) {\n end += len;\n if (end < 0)\n end = 0;\n } else if (end > len) {\n end = len;\n }\n if (end < start)\n end = start;\n const newBuf = this.subarray(start, end);\n Object.setPrototypeOf(newBuf, Buffer3.prototype);\n return newBuf;\n };\n function checkOffset(offset2, ext, length) {\n if (offset2 % 1 !== 0 || offset2 < 0)\n throw new RangeError(\"offset is not uint\");\n if (offset2 + ext > length)\n throw new RangeError(\"Trying to access beyond buffer length\");\n }\n Buffer3.prototype.readUintLE = Buffer3.prototype.readUIntLE = function readUIntLE(offset2, byteLength2, noAssert) {\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, byteLength2, this.length);\n let val = this[offset2];\n let mul = 1;\n let i = 0;\n while (++i < byteLength2 && (mul *= 256)) {\n val += this[offset2 + i] * mul;\n }\n return val;\n };\n Buffer3.prototype.readUintBE = Buffer3.prototype.readUIntBE = function readUIntBE(offset2, byteLength2, noAssert) {\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n checkOffset(offset2, byteLength2, this.length);\n }\n let val = this[offset2 + --byteLength2];\n let mul = 1;\n while (byteLength2 > 0 && (mul *= 256)) {\n val += this[offset2 + --byteLength2] * mul;\n }\n return val;\n };\n Buffer3.prototype.readUint8 = Buffer3.prototype.readUInt8 = function readUInt8(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 1, this.length);\n return this[offset2];\n };\n Buffer3.prototype.readUint16LE = Buffer3.prototype.readUInt16LE = function readUInt16LE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 2, this.length);\n return this[offset2] | this[offset2 + 1] << 8;\n };\n Buffer3.prototype.readUint16BE = Buffer3.prototype.readUInt16BE = function readUInt16BE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 2, this.length);\n return this[offset2] << 8 | this[offset2 + 1];\n };\n Buffer3.prototype.readUint32LE = Buffer3.prototype.readUInt32LE = function readUInt32LE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return (this[offset2] | this[offset2 + 1] << 8 | this[offset2 + 2] << 16) + this[offset2 + 3] * 16777216;\n };\n Buffer3.prototype.readUint32BE = Buffer3.prototype.readUInt32BE = function readUInt32BE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return this[offset2] * 16777216 + (this[offset2 + 1] << 16 | this[offset2 + 2] << 8 | this[offset2 + 3]);\n };\n Buffer3.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset2) {\n offset2 = offset2 >>> 0;\n validateNumber(offset2, \"offset\");\n const first = this[offset2];\n const last = this[offset2 + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset2, this.length - 8);\n }\n const lo = first + this[++offset2] * 2 ** 8 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 24;\n const hi = this[++offset2] + this[++offset2] * 2 ** 8 + this[++offset2] * 2 ** 16 + last * 2 ** 24;\n return BigInt(lo) + (BigInt(hi) << BigInt(32));\n });\n Buffer3.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset2) {\n offset2 = offset2 >>> 0;\n validateNumber(offset2, \"offset\");\n const first = this[offset2];\n const last = this[offset2 + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset2, this.length - 8);\n }\n const hi = first * 2 ** 24 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + this[++offset2];\n const lo = this[++offset2] * 2 ** 24 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + last;\n return (BigInt(hi) << BigInt(32)) + BigInt(lo);\n });\n Buffer3.prototype.readIntLE = function readIntLE(offset2, byteLength2, noAssert) {\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, byteLength2, this.length);\n let val = this[offset2];\n let mul = 1;\n let i = 0;\n while (++i < byteLength2 && (mul *= 256)) {\n val += this[offset2 + i] * mul;\n }\n mul *= 128;\n if (val >= mul)\n val -= Math.pow(2, 8 * byteLength2);\n return val;\n };\n Buffer3.prototype.readIntBE = function readIntBE(offset2, byteLength2, noAssert) {\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, byteLength2, this.length);\n let i = byteLength2;\n let mul = 1;\n let val = this[offset2 + --i];\n while (i > 0 && (mul *= 256)) {\n val += this[offset2 + --i] * mul;\n }\n mul *= 128;\n if (val >= mul)\n val -= Math.pow(2, 8 * byteLength2);\n return val;\n };\n Buffer3.prototype.readInt8 = function readInt8(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 1, this.length);\n if (!(this[offset2] & 128))\n return this[offset2];\n return (255 - this[offset2] + 1) * -1;\n };\n Buffer3.prototype.readInt16LE = function readInt16LE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 2, this.length);\n const val = this[offset2] | this[offset2 + 1] << 8;\n return val & 32768 ? val | 4294901760 : val;\n };\n Buffer3.prototype.readInt16BE = function readInt16BE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 2, this.length);\n const val = this[offset2 + 1] | this[offset2] << 8;\n return val & 32768 ? val | 4294901760 : val;\n };\n Buffer3.prototype.readInt32LE = function readInt32LE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return this[offset2] | this[offset2 + 1] << 8 | this[offset2 + 2] << 16 | this[offset2 + 3] << 24;\n };\n Buffer3.prototype.readInt32BE = function readInt32BE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return this[offset2] << 24 | this[offset2 + 1] << 16 | this[offset2 + 2] << 8 | this[offset2 + 3];\n };\n Buffer3.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset2) {\n offset2 = offset2 >>> 0;\n validateNumber(offset2, \"offset\");\n const first = this[offset2];\n const last = this[offset2 + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset2, this.length - 8);\n }\n const val = this[offset2 + 4] + this[offset2 + 5] * 2 ** 8 + this[offset2 + 6] * 2 ** 16 + (last << 24);\n return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset2] * 2 ** 8 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 24);\n });\n Buffer3.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset2) {\n offset2 = offset2 >>> 0;\n validateNumber(offset2, \"offset\");\n const first = this[offset2];\n const last = this[offset2 + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset2, this.length - 8);\n }\n const val = (first << 24) + // Overflow\n this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + this[++offset2];\n return (BigInt(val) << BigInt(32)) + BigInt(this[++offset2] * 2 ** 24 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + last);\n });\n Buffer3.prototype.readFloatLE = function readFloatLE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return ieee754.read(this, offset2, true, 23, 4);\n };\n Buffer3.prototype.readFloatBE = function readFloatBE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return ieee754.read(this, offset2, false, 23, 4);\n };\n Buffer3.prototype.readDoubleLE = function readDoubleLE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 8, this.length);\n return ieee754.read(this, offset2, true, 52, 8);\n };\n Buffer3.prototype.readDoubleBE = function readDoubleBE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 8, this.length);\n return ieee754.read(this, offset2, false, 52, 8);\n };\n function checkInt(buf, value, offset2, ext, max, min) {\n if (!Buffer3.isBuffer(buf))\n throw new TypeError('\"buffer\" argument must be a Buffer instance');\n if (value > max || value < min)\n throw new RangeError('\"value\" argument is out of bounds');\n if (offset2 + ext > buf.length)\n throw new RangeError(\"Index out of range\");\n }\n Buffer3.prototype.writeUintLE = Buffer3.prototype.writeUIntLE = function writeUIntLE(value, offset2, byteLength2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength2) - 1;\n checkInt(this, value, offset2, byteLength2, maxBytes, 0);\n }\n let mul = 1;\n let i = 0;\n this[offset2] = value & 255;\n while (++i < byteLength2 && (mul *= 256)) {\n this[offset2 + i] = value / mul & 255;\n }\n return offset2 + byteLength2;\n };\n Buffer3.prototype.writeUintBE = Buffer3.prototype.writeUIntBE = function writeUIntBE(value, offset2, byteLength2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength2) - 1;\n checkInt(this, value, offset2, byteLength2, maxBytes, 0);\n }\n let i = byteLength2 - 1;\n let mul = 1;\n this[offset2 + i] = value & 255;\n while (--i >= 0 && (mul *= 256)) {\n this[offset2 + i] = value / mul & 255;\n }\n return offset2 + byteLength2;\n };\n Buffer3.prototype.writeUint8 = Buffer3.prototype.writeUInt8 = function writeUInt8(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 1, 255, 0);\n this[offset2] = value & 255;\n return offset2 + 1;\n };\n Buffer3.prototype.writeUint16LE = Buffer3.prototype.writeUInt16LE = function writeUInt16LE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 2, 65535, 0);\n this[offset2] = value & 255;\n this[offset2 + 1] = value >>> 8;\n return offset2 + 2;\n };\n Buffer3.prototype.writeUint16BE = Buffer3.prototype.writeUInt16BE = function writeUInt16BE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 2, 65535, 0);\n this[offset2] = value >>> 8;\n this[offset2 + 1] = value & 255;\n return offset2 + 2;\n };\n Buffer3.prototype.writeUint32LE = Buffer3.prototype.writeUInt32LE = function writeUInt32LE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 4, 4294967295, 0);\n this[offset2 + 3] = value >>> 24;\n this[offset2 + 2] = value >>> 16;\n this[offset2 + 1] = value >>> 8;\n this[offset2] = value & 255;\n return offset2 + 4;\n };\n Buffer3.prototype.writeUint32BE = Buffer3.prototype.writeUInt32BE = function writeUInt32BE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 4, 4294967295, 0);\n this[offset2] = value >>> 24;\n this[offset2 + 1] = value >>> 16;\n this[offset2 + 2] = value >>> 8;\n this[offset2 + 3] = value & 255;\n return offset2 + 4;\n };\n function wrtBigUInt64LE(buf, value, offset2, min, max) {\n checkIntBI(value, min, max, buf, offset2, 7);\n let lo = Number(value & BigInt(4294967295));\n buf[offset2++] = lo;\n lo = lo >> 8;\n buf[offset2++] = lo;\n lo = lo >> 8;\n buf[offset2++] = lo;\n lo = lo >> 8;\n buf[offset2++] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(4294967295));\n buf[offset2++] = hi;\n hi = hi >> 8;\n buf[offset2++] = hi;\n hi = hi >> 8;\n buf[offset2++] = hi;\n hi = hi >> 8;\n buf[offset2++] = hi;\n return offset2;\n }\n function wrtBigUInt64BE(buf, value, offset2, min, max) {\n checkIntBI(value, min, max, buf, offset2, 7);\n let lo = Number(value & BigInt(4294967295));\n buf[offset2 + 7] = lo;\n lo = lo >> 8;\n buf[offset2 + 6] = lo;\n lo = lo >> 8;\n buf[offset2 + 5] = lo;\n lo = lo >> 8;\n buf[offset2 + 4] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(4294967295));\n buf[offset2 + 3] = hi;\n hi = hi >> 8;\n buf[offset2 + 2] = hi;\n hi = hi >> 8;\n buf[offset2 + 1] = hi;\n hi = hi >> 8;\n buf[offset2] = hi;\n return offset2 + 8;\n }\n Buffer3.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset2 = 0) {\n return wrtBigUInt64LE(this, value, offset2, BigInt(0), BigInt(\"0xffffffffffffffff\"));\n });\n Buffer3.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset2 = 0) {\n return wrtBigUInt64BE(this, value, offset2, BigInt(0), BigInt(\"0xffffffffffffffff\"));\n });\n Buffer3.prototype.writeIntLE = function writeIntLE(value, offset2, byteLength2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, 8 * byteLength2 - 1);\n checkInt(this, value, offset2, byteLength2, limit - 1, -limit);\n }\n let i = 0;\n let mul = 1;\n let sub = 0;\n this[offset2] = value & 255;\n while (++i < byteLength2 && (mul *= 256)) {\n if (value < 0 && sub === 0 && this[offset2 + i - 1] !== 0) {\n sub = 1;\n }\n this[offset2 + i] = (value / mul >> 0) - sub & 255;\n }\n return offset2 + byteLength2;\n };\n Buffer3.prototype.writeIntBE = function writeIntBE(value, offset2, byteLength2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, 8 * byteLength2 - 1);\n checkInt(this, value, offset2, byteLength2, limit - 1, -limit);\n }\n let i = byteLength2 - 1;\n let mul = 1;\n let sub = 0;\n this[offset2 + i] = value & 255;\n while (--i >= 0 && (mul *= 256)) {\n if (value < 0 && sub === 0 && this[offset2 + i + 1] !== 0) {\n sub = 1;\n }\n this[offset2 + i] = (value / mul >> 0) - sub & 255;\n }\n return offset2 + byteLength2;\n };\n Buffer3.prototype.writeInt8 = function writeInt8(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 1, 127, -128);\n if (value < 0)\n value = 255 + value + 1;\n this[offset2] = value & 255;\n return offset2 + 1;\n };\n Buffer3.prototype.writeInt16LE = function writeInt16LE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 2, 32767, -32768);\n this[offset2] = value & 255;\n this[offset2 + 1] = value >>> 8;\n return offset2 + 2;\n };\n Buffer3.prototype.writeInt16BE = function writeInt16BE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 2, 32767, -32768);\n this[offset2] = value >>> 8;\n this[offset2 + 1] = value & 255;\n return offset2 + 2;\n };\n Buffer3.prototype.writeInt32LE = function writeInt32LE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 4, 2147483647, -2147483648);\n this[offset2] = value & 255;\n this[offset2 + 1] = value >>> 8;\n this[offset2 + 2] = value >>> 16;\n this[offset2 + 3] = value >>> 24;\n return offset2 + 4;\n };\n Buffer3.prototype.writeInt32BE = function writeInt32BE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 4, 2147483647, -2147483648);\n if (value < 0)\n value = 4294967295 + value + 1;\n this[offset2] = value >>> 24;\n this[offset2 + 1] = value >>> 16;\n this[offset2 + 2] = value >>> 8;\n this[offset2 + 3] = value & 255;\n return offset2 + 4;\n };\n Buffer3.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset2 = 0) {\n return wrtBigUInt64LE(this, value, offset2, -BigInt(\"0x8000000000000000\"), BigInt(\"0x7fffffffffffffff\"));\n });\n Buffer3.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset2 = 0) {\n return wrtBigUInt64BE(this, value, offset2, -BigInt(\"0x8000000000000000\"), BigInt(\"0x7fffffffffffffff\"));\n });\n function checkIEEE754(buf, value, offset2, ext, max, min) {\n if (offset2 + ext > buf.length)\n throw new RangeError(\"Index out of range\");\n if (offset2 < 0)\n throw new RangeError(\"Index out of range\");\n }\n function writeFloat(buf, value, offset2, littleEndian, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset2, 4);\n }\n ieee754.write(buf, value, offset2, littleEndian, 23, 4);\n return offset2 + 4;\n }\n Buffer3.prototype.writeFloatLE = function writeFloatLE(value, offset2, noAssert) {\n return writeFloat(this, value, offset2, true, noAssert);\n };\n Buffer3.prototype.writeFloatBE = function writeFloatBE(value, offset2, noAssert) {\n return writeFloat(this, value, offset2, false, noAssert);\n };\n function writeDouble(buf, value, offset2, littleEndian, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset2, 8);\n }\n ieee754.write(buf, value, offset2, littleEndian, 52, 8);\n return offset2 + 8;\n }\n Buffer3.prototype.writeDoubleLE = function writeDoubleLE(value, offset2, noAssert) {\n return writeDouble(this, value, offset2, true, noAssert);\n };\n Buffer3.prototype.writeDoubleBE = function writeDoubleBE(value, offset2, noAssert) {\n return writeDouble(this, value, offset2, false, noAssert);\n };\n Buffer3.prototype.copy = function copy(target, targetStart, start, end) {\n if (!Buffer3.isBuffer(target))\n throw new TypeError(\"argument should be a Buffer\");\n if (!start)\n start = 0;\n if (!end && end !== 0)\n end = this.length;\n if (targetStart >= target.length)\n targetStart = target.length;\n if (!targetStart)\n targetStart = 0;\n if (end > 0 && end < start)\n end = start;\n if (end === start)\n return 0;\n if (target.length === 0 || this.length === 0)\n return 0;\n if (targetStart < 0) {\n throw new RangeError(\"targetStart out of bounds\");\n }\n if (start < 0 || start >= this.length)\n throw new RangeError(\"Index out of range\");\n if (end < 0)\n throw new RangeError(\"sourceEnd out of bounds\");\n if (end > this.length)\n end = this.length;\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n const len = end - start;\n if (this === target && typeof Uint8Array.prototype.copyWithin === \"function\") {\n this.copyWithin(targetStart, start, end);\n } else {\n Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);\n }\n return len;\n };\n Buffer3.prototype.fill = function fill(val, start, end, encoding) {\n if (typeof val === \"string\") {\n if (typeof start === \"string\") {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === \"string\") {\n encoding = end;\n end = this.length;\n }\n if (encoding !== void 0 && typeof encoding !== \"string\") {\n throw new TypeError(\"encoding must be a string\");\n }\n if (typeof encoding === \"string\" && !Buffer3.isEncoding(encoding)) {\n throw new TypeError(\"Unknown encoding: \" + encoding);\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0);\n if (encoding === \"utf8\" && code < 128 || encoding === \"latin1\") {\n val = code;\n }\n }\n } else if (typeof val === \"number\") {\n val = val & 255;\n } else if (typeof val === \"boolean\") {\n val = Number(val);\n }\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError(\"Out of range index\");\n }\n if (end <= start) {\n return this;\n }\n start = start >>> 0;\n end = end === void 0 ? this.length : end >>> 0;\n if (!val)\n val = 0;\n let i;\n if (typeof val === \"number\") {\n for (i = start; i < end; ++i) {\n this[i] = val;\n }\n } else {\n const bytes = Buffer3.isBuffer(val) ? val : Buffer3.from(val, encoding);\n const len = bytes.length;\n if (len === 0) {\n throw new TypeError('The value \"' + val + '\" is invalid for argument \"value\"');\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len];\n }\n }\n return this;\n };\n const errors = {};\n function E(sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor() {\n super();\n Object.defineProperty(this, \"message\", {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n });\n this.name = `${this.name} [${sym}]`;\n this.stack;\n delete this.name;\n }\n get code() {\n return sym;\n }\n set code(value) {\n Object.defineProperty(this, \"code\", {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n });\n }\n toString() {\n return `${this.name} [${sym}]: ${this.message}`;\n }\n };\n }\n E(\"ERR_BUFFER_OUT_OF_BOUNDS\", function(name) {\n if (name) {\n return `${name} is outside of buffer bounds`;\n }\n return \"Attempt to access memory outside buffer bounds\";\n }, RangeError);\n E(\"ERR_INVALID_ARG_TYPE\", function(name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`;\n }, TypeError);\n E(\"ERR_OUT_OF_RANGE\", function(str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`;\n let received = input;\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input));\n } else if (typeof input === \"bigint\") {\n received = String(input);\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received);\n }\n received += \"n\";\n }\n msg += ` It must be ${range}. Received ${received}`;\n return msg;\n }, RangeError);\n function addNumericalSeparator(val) {\n let res = \"\";\n let i = val.length;\n const start = val[0] === \"-\" ? 1 : 0;\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`;\n }\n return `${val.slice(0, i)}${res}`;\n }\n function checkBounds(buf, offset2, byteLength2) {\n validateNumber(offset2, \"offset\");\n if (buf[offset2] === void 0 || buf[offset2 + byteLength2] === void 0) {\n boundsError(offset2, buf.length - (byteLength2 + 1));\n }\n }\n function checkIntBI(value, min, max, buf, offset2, byteLength2) {\n if (value > max || value < min) {\n const n = typeof min === \"bigint\" ? \"n\" : \"\";\n let range;\n {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength2 + 1) * 8}${n}`;\n } else {\n range = `>= -(2${n} ** ${(byteLength2 + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength2 + 1) * 8 - 1}${n}`;\n }\n }\n throw new errors.ERR_OUT_OF_RANGE(\"value\", range, value);\n }\n checkBounds(buf, offset2, byteLength2);\n }\n function validateNumber(value, name) {\n if (typeof value !== \"number\") {\n throw new errors.ERR_INVALID_ARG_TYPE(name, \"number\", value);\n }\n }\n function boundsError(value, length, type2) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type2);\n throw new errors.ERR_OUT_OF_RANGE(\"offset\", \"an integer\", value);\n }\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();\n }\n throw new errors.ERR_OUT_OF_RANGE(\"offset\", `>= ${0} and <= ${length}`, value);\n }\n const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\n function base64clean(str) {\n str = str.split(\"=\")[0];\n str = str.trim().replace(INVALID_BASE64_RE, \"\");\n if (str.length < 2)\n return \"\";\n while (str.length % 4 !== 0) {\n str = str + \"=\";\n }\n return str;\n }\n function utf8ToBytes2(string2, units) {\n units = units || Infinity;\n let codePoint;\n const length = string2.length;\n let leadSurrogate = null;\n const bytes = [];\n for (let i = 0; i < length; ++i) {\n codePoint = string2.charCodeAt(i);\n if (codePoint > 55295 && codePoint < 57344) {\n if (!leadSurrogate) {\n if (codePoint > 56319) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n continue;\n } else if (i + 1 === length) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n continue;\n }\n leadSurrogate = codePoint;\n continue;\n }\n if (codePoint < 56320) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n leadSurrogate = codePoint;\n continue;\n }\n codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;\n } else if (leadSurrogate) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n }\n leadSurrogate = null;\n if (codePoint < 128) {\n if ((units -= 1) < 0)\n break;\n bytes.push(codePoint);\n } else if (codePoint < 2048) {\n if ((units -= 2) < 0)\n break;\n bytes.push(codePoint >> 6 | 192, codePoint & 63 | 128);\n } else if (codePoint < 65536) {\n if ((units -= 3) < 0)\n break;\n bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);\n } else if (codePoint < 1114112) {\n if ((units -= 4) < 0)\n break;\n bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);\n } else {\n throw new Error(\"Invalid code point\");\n }\n }\n return bytes;\n }\n function asciiToBytes(str) {\n const byteArray = [];\n for (let i = 0; i < str.length; ++i) {\n byteArray.push(str.charCodeAt(i) & 255);\n }\n return byteArray;\n }\n function utf16leToBytes(str, units) {\n let c, hi, lo;\n const byteArray = [];\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0)\n break;\n c = str.charCodeAt(i);\n hi = c >> 8;\n lo = c % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n return byteArray;\n }\n function base64ToBytes(str) {\n return base64.toByteArray(base64clean(str));\n }\n function blitBuffer(src, dst, offset2, length) {\n let i;\n for (i = 0; i < length; ++i) {\n if (i + offset2 >= dst.length || i >= src.length)\n break;\n dst[i + offset2] = src[i];\n }\n return i;\n }\n function isInstance(obj, type2) {\n return obj instanceof type2 || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type2.name;\n }\n function numberIsNaN(obj) {\n return obj !== obj;\n }\n const hexSliceLookupTable = function() {\n const alphabet = \"0123456789abcdef\";\n const table = new Array(256);\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16;\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j];\n }\n }\n return table;\n }();\n function defineBigIntMethod(fn) {\n return typeof BigInt === \"undefined\" ? BufferBigIntNotDefined : fn;\n }\n function BufferBigIntNotDefined() {\n throw new Error(\"BigInt not supported\");\n }\n return exports;\n }\n var exports$2, _dewExec$2, exports$1, _dewExec$1, exports, _dewExec;\n var init_chunk_DtuTasat = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n exports$2 = {};\n _dewExec$2 = false;\n exports$1 = {};\n _dewExec$1 = false;\n exports = {};\n _dewExec = false;\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/buffer.js\n var buffer_exports = {};\n __export(buffer_exports, {\n Buffer: () => Buffer2,\n INSPECT_MAX_BYTES: () => INSPECT_MAX_BYTES,\n default: () => exports2,\n kMaxLength: () => kMaxLength\n });\n var exports2, Buffer2, INSPECT_MAX_BYTES, kMaxLength;\n var init_buffer = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/buffer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chunk_DtuTasat();\n exports2 = dew();\n exports2[\"Buffer\"];\n exports2[\"SlowBuffer\"];\n exports2[\"INSPECT_MAX_BYTES\"];\n exports2[\"kMaxLength\"];\n Buffer2 = exports2.Buffer;\n INSPECT_MAX_BYTES = exports2.INSPECT_MAX_BYTES;\n kMaxLength = exports2.kMaxLength;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/buffer.js\n var init_buffer2 = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/buffer.js\"() {\n \"use strict\";\n init_buffer();\n }\n });\n\n // ../../../node_modules/.pnpm/bn.js@5.2.2/node_modules/bn.js/lib/bn.js\n var require_bn = __commonJS({\n \"../../../node_modules/.pnpm/bn.js@5.2.2/node_modules/bn.js/lib/bn.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(module2, exports4) {\n \"use strict\";\n function assert3(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {\n };\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n function BN2(number2, base, endian) {\n if (BN2.isBN(number2)) {\n return number2;\n }\n this.negative = 0;\n this.words = null;\n this.length = 0;\n this.red = null;\n if (number2 !== null) {\n if (base === \"le\" || base === \"be\") {\n endian = base;\n base = 10;\n }\n this._init(number2 || 0, base || 10, endian || \"be\");\n }\n }\n if (typeof module2 === \"object\") {\n module2.exports = BN2;\n } else {\n exports4.BN = BN2;\n }\n BN2.BN = BN2;\n BN2.wordSize = 26;\n var Buffer3;\n try {\n if (typeof window !== \"undefined\" && typeof window.Buffer !== \"undefined\") {\n Buffer3 = window.Buffer;\n } else {\n Buffer3 = (init_buffer(), __toCommonJS(buffer_exports)).Buffer;\n }\n } catch (e) {\n }\n BN2.isBN = function isBN(num) {\n if (num instanceof BN2) {\n return true;\n }\n return num !== null && typeof num === \"object\" && num.constructor.wordSize === BN2.wordSize && Array.isArray(num.words);\n };\n BN2.max = function max(left, right) {\n if (left.cmp(right) > 0)\n return left;\n return right;\n };\n BN2.min = function min(left, right) {\n if (left.cmp(right) < 0)\n return left;\n return right;\n };\n BN2.prototype._init = function init(number2, base, endian) {\n if (typeof number2 === \"number\") {\n return this._initNumber(number2, base, endian);\n }\n if (typeof number2 === \"object\") {\n return this._initArray(number2, base, endian);\n }\n if (base === \"hex\") {\n base = 16;\n }\n assert3(base === (base | 0) && base >= 2 && base <= 36);\n number2 = number2.toString().replace(/\\s+/g, \"\");\n var start = 0;\n if (number2[0] === \"-\") {\n start++;\n this.negative = 1;\n }\n if (start < number2.length) {\n if (base === 16) {\n this._parseHex(number2, start, endian);\n } else {\n this._parseBase(number2, base, start);\n if (endian === \"le\") {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n BN2.prototype._initNumber = function _initNumber(number2, base, endian) {\n if (number2 < 0) {\n this.negative = 1;\n number2 = -number2;\n }\n if (number2 < 67108864) {\n this.words = [number2 & 67108863];\n this.length = 1;\n } else if (number2 < 4503599627370496) {\n this.words = [\n number2 & 67108863,\n number2 / 67108864 & 67108863\n ];\n this.length = 2;\n } else {\n assert3(number2 < 9007199254740992);\n this.words = [\n number2 & 67108863,\n number2 / 67108864 & 67108863,\n 1\n ];\n this.length = 3;\n }\n if (endian !== \"le\")\n return;\n this._initArray(this.toArray(), base, endian);\n };\n BN2.prototype._initArray = function _initArray(number2, base, endian) {\n assert3(typeof number2.length === \"number\");\n if (number2.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n this.length = Math.ceil(number2.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n var j, w;\n var off = 0;\n if (endian === \"be\") {\n for (i = number2.length - 1, j = 0; i >= 0; i -= 3) {\n w = number2[i] | number2[i - 1] << 8 | number2[i - 2] << 16;\n this.words[j] |= w << off & 67108863;\n this.words[j + 1] = w >>> 26 - off & 67108863;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === \"le\") {\n for (i = 0, j = 0; i < number2.length; i += 3) {\n w = number2[i] | number2[i + 1] << 8 | number2[i + 2] << 16;\n this.words[j] |= w << off & 67108863;\n this.words[j + 1] = w >>> 26 - off & 67108863;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n function parseHex4Bits(string2, index) {\n var c = string2.charCodeAt(index);\n if (c >= 48 && c <= 57) {\n return c - 48;\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert3(false, \"Invalid character in \" + string2);\n }\n }\n function parseHexByte(string2, lowerBound, index) {\n var r = parseHex4Bits(string2, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string2, index - 1) << 4;\n }\n return r;\n }\n BN2.prototype._parseHex = function _parseHex(number2, start, endian) {\n this.length = Math.ceil((number2.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n var off = 0;\n var j = 0;\n var w;\n if (endian === \"be\") {\n for (i = number2.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number2, start, i) << off;\n this.words[j] |= w & 67108863;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number2.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number2.length; i += 2) {\n w = parseHexByte(number2, start, i) << off;\n this.words[j] |= w & 67108863;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n this._strip();\n };\n function parseBase(str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n r *= mul;\n if (c >= 49) {\n b = c - 49 + 10;\n } else if (c >= 17) {\n b = c - 17 + 10;\n } else {\n b = c;\n }\n assert3(c >= 0 && b < mul, \"Invalid character\");\n r += b;\n }\n return r;\n }\n BN2.prototype._parseBase = function _parseBase(number2, base, start) {\n this.words = [0];\n this.length = 1;\n for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = limbPow / base | 0;\n var total = number2.length - start;\n var mod2 = total % limbLen;\n var end = Math.min(total, total - mod2) + start;\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number2, i, i + limbLen, base);\n this.imuln(limbPow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n if (mod2 !== 0) {\n var pow = 1;\n word = parseBase(number2, i, number2.length, base);\n for (i = 0; i < mod2; i++) {\n pow *= base;\n }\n this.imuln(pow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n this._strip();\n };\n BN2.prototype.copy = function copy(dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n function move(dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n BN2.prototype._move = function _move(dest) {\n move(dest, this);\n };\n BN2.prototype.clone = function clone() {\n var r = new BN2(null);\n this.copy(r);\n return r;\n };\n BN2.prototype._expand = function _expand(size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n BN2.prototype._strip = function strip() {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n BN2.prototype._normSign = function _normSign() {\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n if (typeof Symbol !== \"undefined\" && typeof Symbol.for === \"function\") {\n try {\n BN2.prototype[Symbol.for(\"nodejs.util.inspect.custom\")] = inspect;\n } catch (e) {\n BN2.prototype.inspect = inspect;\n }\n } else {\n BN2.prototype.inspect = inspect;\n }\n function inspect() {\n return (this.red ? \"\";\n }\n var zeros = [\n \"\",\n \"0\",\n \"00\",\n \"000\",\n \"0000\",\n \"00000\",\n \"000000\",\n \"0000000\",\n \"00000000\",\n \"000000000\",\n \"0000000000\",\n \"00000000000\",\n \"000000000000\",\n \"0000000000000\",\n \"00000000000000\",\n \"000000000000000\",\n \"0000000000000000\",\n \"00000000000000000\",\n \"000000000000000000\",\n \"0000000000000000000\",\n \"00000000000000000000\",\n \"000000000000000000000\",\n \"0000000000000000000000\",\n \"00000000000000000000000\",\n \"000000000000000000000000\",\n \"0000000000000000000000000\"\n ];\n var groupSizes = [\n 0,\n 0,\n 25,\n 16,\n 12,\n 11,\n 10,\n 9,\n 8,\n 8,\n 7,\n 7,\n 7,\n 7,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5\n ];\n var groupBases = [\n 0,\n 0,\n 33554432,\n 43046721,\n 16777216,\n 48828125,\n 60466176,\n 40353607,\n 16777216,\n 43046721,\n 1e7,\n 19487171,\n 35831808,\n 62748517,\n 7529536,\n 11390625,\n 16777216,\n 24137569,\n 34012224,\n 47045881,\n 64e6,\n 4084101,\n 5153632,\n 6436343,\n 7962624,\n 9765625,\n 11881376,\n 14348907,\n 17210368,\n 20511149,\n 243e5,\n 28629151,\n 33554432,\n 39135393,\n 45435424,\n 52521875,\n 60466176\n ];\n BN2.prototype.toString = function toString(base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n var out;\n if (base === 16 || base === \"hex\") {\n out = \"\";\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = ((w << off | carry) & 16777215).toString(16);\n carry = w >>> 24 - off & 16777215;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n if (base === (base | 0) && base >= 2 && base <= 36) {\n var groupSize = groupSizes[base];\n var groupBase = groupBases[base];\n out = \"\";\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = \"0\" + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n assert3(false, \"Base should be between 2 and 36\");\n };\n BN2.prototype.toNumber = function toNumber() {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 67108864;\n } else if (this.length === 3 && this.words[2] === 1) {\n ret += 4503599627370496 + this.words[1] * 67108864;\n } else if (this.length > 2) {\n assert3(false, \"Number can only safely store up to 53 bits\");\n }\n return this.negative !== 0 ? -ret : ret;\n };\n BN2.prototype.toJSON = function toJSON() {\n return this.toString(16, 2);\n };\n if (Buffer3) {\n BN2.prototype.toBuffer = function toBuffer2(endian, length) {\n return this.toArrayLike(Buffer3, endian, length);\n };\n }\n BN2.prototype.toArray = function toArray(endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n var allocate = function allocate2(ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n BN2.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length) {\n this._strip();\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert3(byteLength <= reqLength, \"byte array longer than desired length\");\n assert3(reqLength > 0, \"Requested array length <= 0\");\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === \"le\" ? \"LE\" : \"BE\";\n this[\"_toArrayLike\" + postfix](res, byteLength);\n return res;\n };\n BN2.prototype._toArrayLikeLE = function _toArrayLikeLE(res, byteLength) {\n var position = 0;\n var carry = 0;\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = this.words[i] << shift | carry;\n res[position++] = word & 255;\n if (position < res.length) {\n res[position++] = word >> 8 & 255;\n }\n if (position < res.length) {\n res[position++] = word >> 16 & 255;\n }\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = word >> 24 & 255;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n if (position < res.length) {\n res[position++] = carry;\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n BN2.prototype._toArrayLikeBE = function _toArrayLikeBE(res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = this.words[i] << shift | carry;\n res[position--] = word & 255;\n if (position >= 0) {\n res[position--] = word >> 8 & 255;\n }\n if (position >= 0) {\n res[position--] = word >> 16 & 255;\n }\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = word >> 24 & 255;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n if (position >= 0) {\n res[position--] = carry;\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n if (Math.clz32) {\n BN2.prototype._countBits = function _countBits(w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN2.prototype._countBits = function _countBits(w) {\n var t = w;\n var r = 0;\n if (t >= 4096) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 64) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 2) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n BN2.prototype._zeroBits = function _zeroBits(w) {\n if (w === 0)\n return 26;\n var t = w;\n var r = 0;\n if ((t & 8191) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 127) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 15) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 1) === 0) {\n r++;\n }\n return r;\n };\n BN2.prototype.bitLength = function bitLength() {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n function toBitArray(num) {\n var w = new Array(num.bitLength());\n for (var bit = 0; bit < w.length; bit++) {\n var off = bit / 26 | 0;\n var wbit = bit % 26;\n w[bit] = num.words[off] >>> wbit & 1;\n }\n return w;\n }\n BN2.prototype.zeroBits = function zeroBits() {\n if (this.isZero())\n return 0;\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26)\n break;\n }\n return r;\n };\n BN2.prototype.byteLength = function byteLength() {\n return Math.ceil(this.bitLength() / 8);\n };\n BN2.prototype.toTwos = function toTwos(width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n BN2.prototype.fromTwos = function fromTwos(width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n BN2.prototype.isNeg = function isNeg() {\n return this.negative !== 0;\n };\n BN2.prototype.neg = function neg() {\n return this.clone().ineg();\n };\n BN2.prototype.ineg = function ineg() {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n return this;\n };\n BN2.prototype.iuor = function iuor(num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n return this._strip();\n };\n BN2.prototype.ior = function ior(num) {\n assert3((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n BN2.prototype.or = function or(num) {\n if (this.length > num.length)\n return this.clone().ior(num);\n return num.clone().ior(this);\n };\n BN2.prototype.uor = function uor(num) {\n if (this.length > num.length)\n return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n BN2.prototype.iuand = function iuand(num) {\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n this.length = b.length;\n return this._strip();\n };\n BN2.prototype.iand = function iand(num) {\n assert3((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n BN2.prototype.and = function and(num) {\n if (this.length > num.length)\n return this.clone().iand(num);\n return num.clone().iand(this);\n };\n BN2.prototype.uand = function uand(num) {\n if (this.length > num.length)\n return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n BN2.prototype.iuxor = function iuxor(num) {\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n this.length = a.length;\n return this._strip();\n };\n BN2.prototype.ixor = function ixor(num) {\n assert3((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n BN2.prototype.xor = function xor(num) {\n if (this.length > num.length)\n return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n BN2.prototype.uxor = function uxor(num) {\n if (this.length > num.length)\n return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n BN2.prototype.inotn = function inotn(width) {\n assert3(typeof width === \"number\" && width >= 0);\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n this._expand(bytesNeeded);\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 67108863;\n }\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & 67108863 >> 26 - bitsLeft;\n }\n return this._strip();\n };\n BN2.prototype.notn = function notn(width) {\n return this.clone().inotn(width);\n };\n BN2.prototype.setn = function setn(bit, val) {\n assert3(typeof bit === \"number\" && bit >= 0);\n var off = bit / 26 | 0;\n var wbit = bit % 26;\n this._expand(off + 1);\n if (val) {\n this.words[off] = this.words[off] | 1 << wbit;\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n return this._strip();\n };\n BN2.prototype.iadd = function iadd(num) {\n var r;\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 67108863;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 67108863;\n carry = r >>> 26;\n }\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n return this;\n };\n BN2.prototype.add = function add2(num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n if (this.length > num.length)\n return this.clone().iadd(num);\n return num.clone().iadd(this);\n };\n BN2.prototype.isub = function isub(num) {\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n var cmp = this.cmp(num);\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 67108863;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 67108863;\n }\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n this.length = Math.max(this.length, i);\n if (a !== this) {\n this.negative = 1;\n }\n return this._strip();\n };\n BN2.prototype.sub = function sub(num) {\n return this.clone().isub(num);\n };\n function smallMulTo(self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = self.length + num.length | 0;\n out.length = len;\n len = len - 1 | 0;\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n var lo = r & 67108863;\n var carry = r / 67108864 | 0;\n out.words[0] = lo;\n for (var k = 1; k < len; k++) {\n var ncarry = carry >>> 26;\n var rword = carry & 67108863;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += r / 67108864 | 0;\n rword = r & 67108863;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n return out._strip();\n }\n var comb10MulTo = function comb10MulTo2(self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 8191;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 8191;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 8191;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 8191;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 8191;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 8191;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 8191;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 8191;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 8191;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 8191;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 8191;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 8191;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 8191;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 8191;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 8191;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 8191;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 8191;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 8191;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 8191;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 8191;\n var bh9 = b9 >>> 13;\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = mid + Math.imul(ah0, bl0) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w0 >>> 26) | 0;\n w0 &= 67108863;\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = mid + Math.imul(ah1, bl0) | 0;\n hi = Math.imul(ah1, bh0);\n lo = lo + Math.imul(al0, bl1) | 0;\n mid = mid + Math.imul(al0, bh1) | 0;\n mid = mid + Math.imul(ah0, bl1) | 0;\n hi = hi + Math.imul(ah0, bh1) | 0;\n var w1 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w1 >>> 26) | 0;\n w1 &= 67108863;\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = mid + Math.imul(ah2, bl0) | 0;\n hi = Math.imul(ah2, bh0);\n lo = lo + Math.imul(al1, bl1) | 0;\n mid = mid + Math.imul(al1, bh1) | 0;\n mid = mid + Math.imul(ah1, bl1) | 0;\n hi = hi + Math.imul(ah1, bh1) | 0;\n lo = lo + Math.imul(al0, bl2) | 0;\n mid = mid + Math.imul(al0, bh2) | 0;\n mid = mid + Math.imul(ah0, bl2) | 0;\n hi = hi + Math.imul(ah0, bh2) | 0;\n var w2 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w2 >>> 26) | 0;\n w2 &= 67108863;\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = mid + Math.imul(ah3, bl0) | 0;\n hi = Math.imul(ah3, bh0);\n lo = lo + Math.imul(al2, bl1) | 0;\n mid = mid + Math.imul(al2, bh1) | 0;\n mid = mid + Math.imul(ah2, bl1) | 0;\n hi = hi + Math.imul(ah2, bh1) | 0;\n lo = lo + Math.imul(al1, bl2) | 0;\n mid = mid + Math.imul(al1, bh2) | 0;\n mid = mid + Math.imul(ah1, bl2) | 0;\n hi = hi + Math.imul(ah1, bh2) | 0;\n lo = lo + Math.imul(al0, bl3) | 0;\n mid = mid + Math.imul(al0, bh3) | 0;\n mid = mid + Math.imul(ah0, bl3) | 0;\n hi = hi + Math.imul(ah0, bh3) | 0;\n var w3 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w3 >>> 26) | 0;\n w3 &= 67108863;\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = mid + Math.imul(ah4, bl0) | 0;\n hi = Math.imul(ah4, bh0);\n lo = lo + Math.imul(al3, bl1) | 0;\n mid = mid + Math.imul(al3, bh1) | 0;\n mid = mid + Math.imul(ah3, bl1) | 0;\n hi = hi + Math.imul(ah3, bh1) | 0;\n lo = lo + Math.imul(al2, bl2) | 0;\n mid = mid + Math.imul(al2, bh2) | 0;\n mid = mid + Math.imul(ah2, bl2) | 0;\n hi = hi + Math.imul(ah2, bh2) | 0;\n lo = lo + Math.imul(al1, bl3) | 0;\n mid = mid + Math.imul(al1, bh3) | 0;\n mid = mid + Math.imul(ah1, bl3) | 0;\n hi = hi + Math.imul(ah1, bh3) | 0;\n lo = lo + Math.imul(al0, bl4) | 0;\n mid = mid + Math.imul(al0, bh4) | 0;\n mid = mid + Math.imul(ah0, bl4) | 0;\n hi = hi + Math.imul(ah0, bh4) | 0;\n var w4 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w4 >>> 26) | 0;\n w4 &= 67108863;\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = mid + Math.imul(ah5, bl0) | 0;\n hi = Math.imul(ah5, bh0);\n lo = lo + Math.imul(al4, bl1) | 0;\n mid = mid + Math.imul(al4, bh1) | 0;\n mid = mid + Math.imul(ah4, bl1) | 0;\n hi = hi + Math.imul(ah4, bh1) | 0;\n lo = lo + Math.imul(al3, bl2) | 0;\n mid = mid + Math.imul(al3, bh2) | 0;\n mid = mid + Math.imul(ah3, bl2) | 0;\n hi = hi + Math.imul(ah3, bh2) | 0;\n lo = lo + Math.imul(al2, bl3) | 0;\n mid = mid + Math.imul(al2, bh3) | 0;\n mid = mid + Math.imul(ah2, bl3) | 0;\n hi = hi + Math.imul(ah2, bh3) | 0;\n lo = lo + Math.imul(al1, bl4) | 0;\n mid = mid + Math.imul(al1, bh4) | 0;\n mid = mid + Math.imul(ah1, bl4) | 0;\n hi = hi + Math.imul(ah1, bh4) | 0;\n lo = lo + Math.imul(al0, bl5) | 0;\n mid = mid + Math.imul(al0, bh5) | 0;\n mid = mid + Math.imul(ah0, bl5) | 0;\n hi = hi + Math.imul(ah0, bh5) | 0;\n var w5 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w5 >>> 26) | 0;\n w5 &= 67108863;\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = mid + Math.imul(ah6, bl0) | 0;\n hi = Math.imul(ah6, bh0);\n lo = lo + Math.imul(al5, bl1) | 0;\n mid = mid + Math.imul(al5, bh1) | 0;\n mid = mid + Math.imul(ah5, bl1) | 0;\n hi = hi + Math.imul(ah5, bh1) | 0;\n lo = lo + Math.imul(al4, bl2) | 0;\n mid = mid + Math.imul(al4, bh2) | 0;\n mid = mid + Math.imul(ah4, bl2) | 0;\n hi = hi + Math.imul(ah4, bh2) | 0;\n lo = lo + Math.imul(al3, bl3) | 0;\n mid = mid + Math.imul(al3, bh3) | 0;\n mid = mid + Math.imul(ah3, bl3) | 0;\n hi = hi + Math.imul(ah3, bh3) | 0;\n lo = lo + Math.imul(al2, bl4) | 0;\n mid = mid + Math.imul(al2, bh4) | 0;\n mid = mid + Math.imul(ah2, bl4) | 0;\n hi = hi + Math.imul(ah2, bh4) | 0;\n lo = lo + Math.imul(al1, bl5) | 0;\n mid = mid + Math.imul(al1, bh5) | 0;\n mid = mid + Math.imul(ah1, bl5) | 0;\n hi = hi + Math.imul(ah1, bh5) | 0;\n lo = lo + Math.imul(al0, bl6) | 0;\n mid = mid + Math.imul(al0, bh6) | 0;\n mid = mid + Math.imul(ah0, bl6) | 0;\n hi = hi + Math.imul(ah0, bh6) | 0;\n var w6 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w6 >>> 26) | 0;\n w6 &= 67108863;\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = mid + Math.imul(ah7, bl0) | 0;\n hi = Math.imul(ah7, bh0);\n lo = lo + Math.imul(al6, bl1) | 0;\n mid = mid + Math.imul(al6, bh1) | 0;\n mid = mid + Math.imul(ah6, bl1) | 0;\n hi = hi + Math.imul(ah6, bh1) | 0;\n lo = lo + Math.imul(al5, bl2) | 0;\n mid = mid + Math.imul(al5, bh2) | 0;\n mid = mid + Math.imul(ah5, bl2) | 0;\n hi = hi + Math.imul(ah5, bh2) | 0;\n lo = lo + Math.imul(al4, bl3) | 0;\n mid = mid + Math.imul(al4, bh3) | 0;\n mid = mid + Math.imul(ah4, bl3) | 0;\n hi = hi + Math.imul(ah4, bh3) | 0;\n lo = lo + Math.imul(al3, bl4) | 0;\n mid = mid + Math.imul(al3, bh4) | 0;\n mid = mid + Math.imul(ah3, bl4) | 0;\n hi = hi + Math.imul(ah3, bh4) | 0;\n lo = lo + Math.imul(al2, bl5) | 0;\n mid = mid + Math.imul(al2, bh5) | 0;\n mid = mid + Math.imul(ah2, bl5) | 0;\n hi = hi + Math.imul(ah2, bh5) | 0;\n lo = lo + Math.imul(al1, bl6) | 0;\n mid = mid + Math.imul(al1, bh6) | 0;\n mid = mid + Math.imul(ah1, bl6) | 0;\n hi = hi + Math.imul(ah1, bh6) | 0;\n lo = lo + Math.imul(al0, bl7) | 0;\n mid = mid + Math.imul(al0, bh7) | 0;\n mid = mid + Math.imul(ah0, bl7) | 0;\n hi = hi + Math.imul(ah0, bh7) | 0;\n var w7 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w7 >>> 26) | 0;\n w7 &= 67108863;\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = mid + Math.imul(ah8, bl0) | 0;\n hi = Math.imul(ah8, bh0);\n lo = lo + Math.imul(al7, bl1) | 0;\n mid = mid + Math.imul(al7, bh1) | 0;\n mid = mid + Math.imul(ah7, bl1) | 0;\n hi = hi + Math.imul(ah7, bh1) | 0;\n lo = lo + Math.imul(al6, bl2) | 0;\n mid = mid + Math.imul(al6, bh2) | 0;\n mid = mid + Math.imul(ah6, bl2) | 0;\n hi = hi + Math.imul(ah6, bh2) | 0;\n lo = lo + Math.imul(al5, bl3) | 0;\n mid = mid + Math.imul(al5, bh3) | 0;\n mid = mid + Math.imul(ah5, bl3) | 0;\n hi = hi + Math.imul(ah5, bh3) | 0;\n lo = lo + Math.imul(al4, bl4) | 0;\n mid = mid + Math.imul(al4, bh4) | 0;\n mid = mid + Math.imul(ah4, bl4) | 0;\n hi = hi + Math.imul(ah4, bh4) | 0;\n lo = lo + Math.imul(al3, bl5) | 0;\n mid = mid + Math.imul(al3, bh5) | 0;\n mid = mid + Math.imul(ah3, bl5) | 0;\n hi = hi + Math.imul(ah3, bh5) | 0;\n lo = lo + Math.imul(al2, bl6) | 0;\n mid = mid + Math.imul(al2, bh6) | 0;\n mid = mid + Math.imul(ah2, bl6) | 0;\n hi = hi + Math.imul(ah2, bh6) | 0;\n lo = lo + Math.imul(al1, bl7) | 0;\n mid = mid + Math.imul(al1, bh7) | 0;\n mid = mid + Math.imul(ah1, bl7) | 0;\n hi = hi + Math.imul(ah1, bh7) | 0;\n lo = lo + Math.imul(al0, bl8) | 0;\n mid = mid + Math.imul(al0, bh8) | 0;\n mid = mid + Math.imul(ah0, bl8) | 0;\n hi = hi + Math.imul(ah0, bh8) | 0;\n var w8 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w8 >>> 26) | 0;\n w8 &= 67108863;\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = mid + Math.imul(ah9, bl0) | 0;\n hi = Math.imul(ah9, bh0);\n lo = lo + Math.imul(al8, bl1) | 0;\n mid = mid + Math.imul(al8, bh1) | 0;\n mid = mid + Math.imul(ah8, bl1) | 0;\n hi = hi + Math.imul(ah8, bh1) | 0;\n lo = lo + Math.imul(al7, bl2) | 0;\n mid = mid + Math.imul(al7, bh2) | 0;\n mid = mid + Math.imul(ah7, bl2) | 0;\n hi = hi + Math.imul(ah7, bh2) | 0;\n lo = lo + Math.imul(al6, bl3) | 0;\n mid = mid + Math.imul(al6, bh3) | 0;\n mid = mid + Math.imul(ah6, bl3) | 0;\n hi = hi + Math.imul(ah6, bh3) | 0;\n lo = lo + Math.imul(al5, bl4) | 0;\n mid = mid + Math.imul(al5, bh4) | 0;\n mid = mid + Math.imul(ah5, bl4) | 0;\n hi = hi + Math.imul(ah5, bh4) | 0;\n lo = lo + Math.imul(al4, bl5) | 0;\n mid = mid + Math.imul(al4, bh5) | 0;\n mid = mid + Math.imul(ah4, bl5) | 0;\n hi = hi + Math.imul(ah4, bh5) | 0;\n lo = lo + Math.imul(al3, bl6) | 0;\n mid = mid + Math.imul(al3, bh6) | 0;\n mid = mid + Math.imul(ah3, bl6) | 0;\n hi = hi + Math.imul(ah3, bh6) | 0;\n lo = lo + Math.imul(al2, bl7) | 0;\n mid = mid + Math.imul(al2, bh7) | 0;\n mid = mid + Math.imul(ah2, bl7) | 0;\n hi = hi + Math.imul(ah2, bh7) | 0;\n lo = lo + Math.imul(al1, bl8) | 0;\n mid = mid + Math.imul(al1, bh8) | 0;\n mid = mid + Math.imul(ah1, bl8) | 0;\n hi = hi + Math.imul(ah1, bh8) | 0;\n lo = lo + Math.imul(al0, bl9) | 0;\n mid = mid + Math.imul(al0, bh9) | 0;\n mid = mid + Math.imul(ah0, bl9) | 0;\n hi = hi + Math.imul(ah0, bh9) | 0;\n var w9 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w9 >>> 26) | 0;\n w9 &= 67108863;\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = mid + Math.imul(ah9, bl1) | 0;\n hi = Math.imul(ah9, bh1);\n lo = lo + Math.imul(al8, bl2) | 0;\n mid = mid + Math.imul(al8, bh2) | 0;\n mid = mid + Math.imul(ah8, bl2) | 0;\n hi = hi + Math.imul(ah8, bh2) | 0;\n lo = lo + Math.imul(al7, bl3) | 0;\n mid = mid + Math.imul(al7, bh3) | 0;\n mid = mid + Math.imul(ah7, bl3) | 0;\n hi = hi + Math.imul(ah7, bh3) | 0;\n lo = lo + Math.imul(al6, bl4) | 0;\n mid = mid + Math.imul(al6, bh4) | 0;\n mid = mid + Math.imul(ah6, bl4) | 0;\n hi = hi + Math.imul(ah6, bh4) | 0;\n lo = lo + Math.imul(al5, bl5) | 0;\n mid = mid + Math.imul(al5, bh5) | 0;\n mid = mid + Math.imul(ah5, bl5) | 0;\n hi = hi + Math.imul(ah5, bh5) | 0;\n lo = lo + Math.imul(al4, bl6) | 0;\n mid = mid + Math.imul(al4, bh6) | 0;\n mid = mid + Math.imul(ah4, bl6) | 0;\n hi = hi + Math.imul(ah4, bh6) | 0;\n lo = lo + Math.imul(al3, bl7) | 0;\n mid = mid + Math.imul(al3, bh7) | 0;\n mid = mid + Math.imul(ah3, bl7) | 0;\n hi = hi + Math.imul(ah3, bh7) | 0;\n lo = lo + Math.imul(al2, bl8) | 0;\n mid = mid + Math.imul(al2, bh8) | 0;\n mid = mid + Math.imul(ah2, bl8) | 0;\n hi = hi + Math.imul(ah2, bh8) | 0;\n lo = lo + Math.imul(al1, bl9) | 0;\n mid = mid + Math.imul(al1, bh9) | 0;\n mid = mid + Math.imul(ah1, bl9) | 0;\n hi = hi + Math.imul(ah1, bh9) | 0;\n var w10 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w10 >>> 26) | 0;\n w10 &= 67108863;\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = mid + Math.imul(ah9, bl2) | 0;\n hi = Math.imul(ah9, bh2);\n lo = lo + Math.imul(al8, bl3) | 0;\n mid = mid + Math.imul(al8, bh3) | 0;\n mid = mid + Math.imul(ah8, bl3) | 0;\n hi = hi + Math.imul(ah8, bh3) | 0;\n lo = lo + Math.imul(al7, bl4) | 0;\n mid = mid + Math.imul(al7, bh4) | 0;\n mid = mid + Math.imul(ah7, bl4) | 0;\n hi = hi + Math.imul(ah7, bh4) | 0;\n lo = lo + Math.imul(al6, bl5) | 0;\n mid = mid + Math.imul(al6, bh5) | 0;\n mid = mid + Math.imul(ah6, bl5) | 0;\n hi = hi + Math.imul(ah6, bh5) | 0;\n lo = lo + Math.imul(al5, bl6) | 0;\n mid = mid + Math.imul(al5, bh6) | 0;\n mid = mid + Math.imul(ah5, bl6) | 0;\n hi = hi + Math.imul(ah5, bh6) | 0;\n lo = lo + Math.imul(al4, bl7) | 0;\n mid = mid + Math.imul(al4, bh7) | 0;\n mid = mid + Math.imul(ah4, bl7) | 0;\n hi = hi + Math.imul(ah4, bh7) | 0;\n lo = lo + Math.imul(al3, bl8) | 0;\n mid = mid + Math.imul(al3, bh8) | 0;\n mid = mid + Math.imul(ah3, bl8) | 0;\n hi = hi + Math.imul(ah3, bh8) | 0;\n lo = lo + Math.imul(al2, bl9) | 0;\n mid = mid + Math.imul(al2, bh9) | 0;\n mid = mid + Math.imul(ah2, bl9) | 0;\n hi = hi + Math.imul(ah2, bh9) | 0;\n var w11 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w11 >>> 26) | 0;\n w11 &= 67108863;\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = mid + Math.imul(ah9, bl3) | 0;\n hi = Math.imul(ah9, bh3);\n lo = lo + Math.imul(al8, bl4) | 0;\n mid = mid + Math.imul(al8, bh4) | 0;\n mid = mid + Math.imul(ah8, bl4) | 0;\n hi = hi + Math.imul(ah8, bh4) | 0;\n lo = lo + Math.imul(al7, bl5) | 0;\n mid = mid + Math.imul(al7, bh5) | 0;\n mid = mid + Math.imul(ah7, bl5) | 0;\n hi = hi + Math.imul(ah7, bh5) | 0;\n lo = lo + Math.imul(al6, bl6) | 0;\n mid = mid + Math.imul(al6, bh6) | 0;\n mid = mid + Math.imul(ah6, bl6) | 0;\n hi = hi + Math.imul(ah6, bh6) | 0;\n lo = lo + Math.imul(al5, bl7) | 0;\n mid = mid + Math.imul(al5, bh7) | 0;\n mid = mid + Math.imul(ah5, bl7) | 0;\n hi = hi + Math.imul(ah5, bh7) | 0;\n lo = lo + Math.imul(al4, bl8) | 0;\n mid = mid + Math.imul(al4, bh8) | 0;\n mid = mid + Math.imul(ah4, bl8) | 0;\n hi = hi + Math.imul(ah4, bh8) | 0;\n lo = lo + Math.imul(al3, bl9) | 0;\n mid = mid + Math.imul(al3, bh9) | 0;\n mid = mid + Math.imul(ah3, bl9) | 0;\n hi = hi + Math.imul(ah3, bh9) | 0;\n var w12 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w12 >>> 26) | 0;\n w12 &= 67108863;\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = mid + Math.imul(ah9, bl4) | 0;\n hi = Math.imul(ah9, bh4);\n lo = lo + Math.imul(al8, bl5) | 0;\n mid = mid + Math.imul(al8, bh5) | 0;\n mid = mid + Math.imul(ah8, bl5) | 0;\n hi = hi + Math.imul(ah8, bh5) | 0;\n lo = lo + Math.imul(al7, bl6) | 0;\n mid = mid + Math.imul(al7, bh6) | 0;\n mid = mid + Math.imul(ah7, bl6) | 0;\n hi = hi + Math.imul(ah7, bh6) | 0;\n lo = lo + Math.imul(al6, bl7) | 0;\n mid = mid + Math.imul(al6, bh7) | 0;\n mid = mid + Math.imul(ah6, bl7) | 0;\n hi = hi + Math.imul(ah6, bh7) | 0;\n lo = lo + Math.imul(al5, bl8) | 0;\n mid = mid + Math.imul(al5, bh8) | 0;\n mid = mid + Math.imul(ah5, bl8) | 0;\n hi = hi + Math.imul(ah5, bh8) | 0;\n lo = lo + Math.imul(al4, bl9) | 0;\n mid = mid + Math.imul(al4, bh9) | 0;\n mid = mid + Math.imul(ah4, bl9) | 0;\n hi = hi + Math.imul(ah4, bh9) | 0;\n var w13 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w13 >>> 26) | 0;\n w13 &= 67108863;\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = mid + Math.imul(ah9, bl5) | 0;\n hi = Math.imul(ah9, bh5);\n lo = lo + Math.imul(al8, bl6) | 0;\n mid = mid + Math.imul(al8, bh6) | 0;\n mid = mid + Math.imul(ah8, bl6) | 0;\n hi = hi + Math.imul(ah8, bh6) | 0;\n lo = lo + Math.imul(al7, bl7) | 0;\n mid = mid + Math.imul(al7, bh7) | 0;\n mid = mid + Math.imul(ah7, bl7) | 0;\n hi = hi + Math.imul(ah7, bh7) | 0;\n lo = lo + Math.imul(al6, bl8) | 0;\n mid = mid + Math.imul(al6, bh8) | 0;\n mid = mid + Math.imul(ah6, bl8) | 0;\n hi = hi + Math.imul(ah6, bh8) | 0;\n lo = lo + Math.imul(al5, bl9) | 0;\n mid = mid + Math.imul(al5, bh9) | 0;\n mid = mid + Math.imul(ah5, bl9) | 0;\n hi = hi + Math.imul(ah5, bh9) | 0;\n var w14 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w14 >>> 26) | 0;\n w14 &= 67108863;\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = mid + Math.imul(ah9, bl6) | 0;\n hi = Math.imul(ah9, bh6);\n lo = lo + Math.imul(al8, bl7) | 0;\n mid = mid + Math.imul(al8, bh7) | 0;\n mid = mid + Math.imul(ah8, bl7) | 0;\n hi = hi + Math.imul(ah8, bh7) | 0;\n lo = lo + Math.imul(al7, bl8) | 0;\n mid = mid + Math.imul(al7, bh8) | 0;\n mid = mid + Math.imul(ah7, bl8) | 0;\n hi = hi + Math.imul(ah7, bh8) | 0;\n lo = lo + Math.imul(al6, bl9) | 0;\n mid = mid + Math.imul(al6, bh9) | 0;\n mid = mid + Math.imul(ah6, bl9) | 0;\n hi = hi + Math.imul(ah6, bh9) | 0;\n var w15 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w15 >>> 26) | 0;\n w15 &= 67108863;\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = mid + Math.imul(ah9, bl7) | 0;\n hi = Math.imul(ah9, bh7);\n lo = lo + Math.imul(al8, bl8) | 0;\n mid = mid + Math.imul(al8, bh8) | 0;\n mid = mid + Math.imul(ah8, bl8) | 0;\n hi = hi + Math.imul(ah8, bh8) | 0;\n lo = lo + Math.imul(al7, bl9) | 0;\n mid = mid + Math.imul(al7, bh9) | 0;\n mid = mid + Math.imul(ah7, bl9) | 0;\n hi = hi + Math.imul(ah7, bh9) | 0;\n var w16 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w16 >>> 26) | 0;\n w16 &= 67108863;\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = mid + Math.imul(ah9, bl8) | 0;\n hi = Math.imul(ah9, bh8);\n lo = lo + Math.imul(al8, bl9) | 0;\n mid = mid + Math.imul(al8, bh9) | 0;\n mid = mid + Math.imul(ah8, bl9) | 0;\n hi = hi + Math.imul(ah8, bh9) | 0;\n var w17 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w17 >>> 26) | 0;\n w17 &= 67108863;\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = mid + Math.imul(ah9, bl9) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w18 >>> 26) | 0;\n w18 &= 67108863;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n function bigMulTo(self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 67108863;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n var lo = r & 67108863;\n ncarry = ncarry + (r / 67108864 | 0) | 0;\n lo = lo + rword | 0;\n rword = lo & 67108863;\n ncarry = ncarry + (lo >>> 26) | 0;\n hncarry += ncarry >>> 26;\n ncarry &= 67108863;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n return out._strip();\n }\n function jumboMulTo(self, num, out) {\n return bigMulTo(self, num, out);\n }\n BN2.prototype.mulTo = function mulTo(num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n return res;\n };\n function FFTM(x, y) {\n this.x = x;\n this.y = y;\n }\n FFTM.prototype.makeRBT = function makeRBT(N) {\n var t = new Array(N);\n var l = BN2.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n return t;\n };\n FFTM.prototype.revBin = function revBin(x, l, N) {\n if (x === 0 || x === N - 1)\n return x;\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << l - i - 1;\n x >>= 1;\n }\n return rb;\n };\n FFTM.prototype.permute = function permute(rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n FFTM.prototype.transform = function transform(rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n var rx = rtwdf_ * ro - itwdf_ * io;\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n FFTM.prototype.guessLen13b = function guessLen13b(n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n return 1 << i + 1 + odd;\n };\n FFTM.prototype.conjugate = function conjugate(rws, iws, N) {\n if (N <= 1)\n return;\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n t = iws[i];\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n FFTM.prototype.normalize13b = function normalize13b(ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 8192 + Math.round(ws[2 * i] / N) + carry;\n ws[i] = w & 67108863;\n if (w < 67108864) {\n carry = 0;\n } else {\n carry = w / 67108864 | 0;\n }\n }\n return ws;\n };\n FFTM.prototype.convert13b = function convert13b(ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n rws[2 * i] = carry & 8191;\n carry = carry >>> 13;\n rws[2 * i + 1] = carry & 8191;\n carry = carry >>> 13;\n }\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n assert3(carry === 0);\n assert3((carry & ~8191) === 0);\n };\n FFTM.prototype.stub = function stub(N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n return ph;\n };\n FFTM.prototype.mulp = function mulp(x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n var rbt = this.makeRBT(N);\n var _ = this.stub(N);\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n var rmws = out.words;\n rmws.length = N;\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n BN2.prototype.mul = function mul(num) {\n var out = new BN2(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n BN2.prototype.mulf = function mulf(num) {\n var out = new BN2(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n BN2.prototype.imul = function imul(num) {\n return this.clone().mulTo(num, this);\n };\n BN2.prototype.imuln = function imuln(num) {\n var isNegNum = num < 0;\n if (isNegNum)\n num = -num;\n assert3(typeof num === \"number\");\n assert3(num < 67108864);\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 67108863) + (carry & 67108863);\n carry >>= 26;\n carry += w / 67108864 | 0;\n carry += lo >>> 26;\n this.words[i] = lo & 67108863;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n this.length = num === 0 ? 1 : this.length;\n return isNegNum ? this.ineg() : this;\n };\n BN2.prototype.muln = function muln(num) {\n return this.clone().imuln(num);\n };\n BN2.prototype.sqr = function sqr() {\n return this.mul(this);\n };\n BN2.prototype.isqr = function isqr() {\n return this.imul(this.clone());\n };\n BN2.prototype.pow = function pow(num) {\n var w = toBitArray(num);\n if (w.length === 0)\n return new BN2(1);\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0)\n break;\n }\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0)\n continue;\n res = res.mul(q);\n }\n }\n return res;\n };\n BN2.prototype.iushln = function iushln(bits) {\n assert3(typeof bits === \"number\" && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = 67108863 >>> 26 - r << 26 - r;\n var i;\n if (r !== 0) {\n var carry = 0;\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = (this.words[i] | 0) - newCarry << r;\n this.words[i] = c | carry;\n carry = newCarry >>> 26 - r;\n }\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n this.length += s;\n }\n return this._strip();\n };\n BN2.prototype.ishln = function ishln(bits) {\n assert3(this.negative === 0);\n return this.iushln(bits);\n };\n BN2.prototype.iushrn = function iushrn(bits, hint, extended) {\n assert3(typeof bits === \"number\" && bits >= 0);\n var h;\n if (hint) {\n h = (hint - hint % 26) / 26;\n } else {\n h = 0;\n }\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask2 = 67108863 ^ 67108863 >>> r << r;\n var maskedWords = extended;\n h -= s;\n h = Math.max(0, h);\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n if (s === 0) {\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = carry << 26 - r | word >>> r;\n carry = word & mask2;\n }\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n return this._strip();\n };\n BN2.prototype.ishrn = function ishrn(bits, hint, extended) {\n assert3(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n BN2.prototype.shln = function shln(bits) {\n return this.clone().ishln(bits);\n };\n BN2.prototype.ushln = function ushln(bits) {\n return this.clone().iushln(bits);\n };\n BN2.prototype.shrn = function shrn(bits) {\n return this.clone().ishrn(bits);\n };\n BN2.prototype.ushrn = function ushrn(bits) {\n return this.clone().iushrn(bits);\n };\n BN2.prototype.testn = function testn(bit) {\n assert3(typeof bit === \"number\" && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n if (this.length <= s)\n return false;\n var w = this.words[s];\n return !!(w & q);\n };\n BN2.prototype.imaskn = function imaskn(bits) {\n assert3(typeof bits === \"number\" && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n assert3(this.negative === 0, \"imaskn works only with positive numbers\");\n if (this.length <= s) {\n return this;\n }\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n if (r !== 0) {\n var mask2 = 67108863 ^ 67108863 >>> r << r;\n this.words[this.length - 1] &= mask2;\n }\n return this._strip();\n };\n BN2.prototype.maskn = function maskn(bits) {\n return this.clone().imaskn(bits);\n };\n BN2.prototype.iaddn = function iaddn(num) {\n assert3(typeof num === \"number\");\n assert3(num < 67108864);\n if (num < 0)\n return this.isubn(-num);\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n return this._iaddn(num);\n };\n BN2.prototype._iaddn = function _iaddn(num) {\n this.words[0] += num;\n for (var i = 0; i < this.length && this.words[i] >= 67108864; i++) {\n this.words[i] -= 67108864;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n return this;\n };\n BN2.prototype.isubn = function isubn(num) {\n assert3(typeof num === \"number\");\n assert3(num < 67108864);\n if (num < 0)\n return this.iaddn(-num);\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n this.words[0] -= num;\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 67108864;\n this.words[i + 1] -= 1;\n }\n }\n return this._strip();\n };\n BN2.prototype.addn = function addn(num) {\n return this.clone().iaddn(num);\n };\n BN2.prototype.subn = function subn(num) {\n return this.clone().isubn(num);\n };\n BN2.prototype.iabs = function iabs() {\n this.negative = 0;\n return this;\n };\n BN2.prototype.abs = function abs() {\n return this.clone().iabs();\n };\n BN2.prototype._ishlnsubmul = function _ishlnsubmul(num, mul, shift) {\n var len = num.length + shift;\n var i;\n this._expand(len);\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 67108863;\n carry = (w >> 26) - (right / 67108864 | 0);\n this.words[i + shift] = w & 67108863;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 67108863;\n }\n if (carry === 0)\n return this._strip();\n assert3(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 67108863;\n }\n this.negative = 1;\n return this._strip();\n };\n BN2.prototype._wordDiv = function _wordDiv(num, mode) {\n var shift = this.length - num.length;\n var a = this.clone();\n var b = num;\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n var m = a.length - b.length;\n var q;\n if (mode !== \"mod\") {\n q = new BN2(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 67108864 + (a.words[b.length + j - 1] | 0);\n qj = Math.min(qj / bhi | 0, 67108863);\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n if (mode !== \"div\" && shift !== 0) {\n a.iushrn(shift);\n }\n return {\n div: q || null,\n mod: a\n };\n };\n BN2.prototype.divmod = function divmod(num, mode, positive) {\n assert3(!num.isZero());\n if (this.isZero()) {\n return {\n div: new BN2(0),\n mod: new BN2(0)\n };\n }\n var div, mod2, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n if (mode !== \"div\") {\n mod2 = res.mod.neg();\n if (positive && mod2.negative !== 0) {\n mod2.iadd(num);\n }\n }\n return {\n div,\n mod: mod2\n };\n }\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n return {\n div,\n mod: res.mod\n };\n }\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n if (mode !== \"div\") {\n mod2 = res.mod.neg();\n if (positive && mod2.negative !== 0) {\n mod2.isub(num);\n }\n }\n return {\n div: res.div,\n mod: mod2\n };\n }\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN2(0),\n mod: this\n };\n }\n if (num.length === 1) {\n if (mode === \"div\") {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n if (mode === \"mod\") {\n return {\n div: null,\n mod: new BN2(this.modrn(num.words[0]))\n };\n }\n return {\n div: this.divn(num.words[0]),\n mod: new BN2(this.modrn(num.words[0]))\n };\n }\n return this._wordDiv(num, mode);\n };\n BN2.prototype.div = function div(num) {\n return this.divmod(num, \"div\", false).div;\n };\n BN2.prototype.mod = function mod2(num) {\n return this.divmod(num, \"mod\", false).mod;\n };\n BN2.prototype.umod = function umod(num) {\n return this.divmod(num, \"mod\", true).mod;\n };\n BN2.prototype.divRound = function divRound(num) {\n var dm = this.divmod(num);\n if (dm.mod.isZero())\n return dm.div;\n var mod2 = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod2.cmp(half);\n if (cmp < 0 || r2 === 1 && cmp === 0)\n return dm.div;\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n BN2.prototype.modrn = function modrn(num) {\n var isNegNum = num < 0;\n if (isNegNum)\n num = -num;\n assert3(num <= 67108863);\n var p = (1 << 26) % num;\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n return isNegNum ? -acc : acc;\n };\n BN2.prototype.modn = function modn(num) {\n return this.modrn(num);\n };\n BN2.prototype.idivn = function idivn(num) {\n var isNegNum = num < 0;\n if (isNegNum)\n num = -num;\n assert3(num <= 67108863);\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 67108864;\n this.words[i] = w / num | 0;\n carry = w % num;\n }\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n BN2.prototype.divn = function divn(num) {\n return this.clone().idivn(num);\n };\n BN2.prototype.egcd = function egcd(p) {\n assert3(p.negative === 0);\n assert3(!p.isZero());\n var x = this;\n var y = p.clone();\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n var A = new BN2(1);\n var B = new BN2(0);\n var C = new BN2(0);\n var D = new BN2(1);\n var g = 0;\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n var yp = y.clone();\n var xp = x.clone();\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1)\n ;\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1)\n ;\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n BN2.prototype._invmp = function _invmp(p) {\n assert3(p.negative === 0);\n assert3(!p.isZero());\n var a = this;\n var b = p.clone();\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n var x1 = new BN2(1);\n var x2 = new BN2(0);\n var delta = b.clone();\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1)\n ;\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n x1.iushrn(1);\n }\n }\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1)\n ;\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n x2.iushrn(1);\n }\n }\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n return res;\n };\n BN2.prototype.gcd = function gcd(num) {\n if (this.isZero())\n return num.abs();\n if (num.isZero())\n return this.abs();\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n var r = a.cmp(b);\n if (r < 0) {\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n a.isub(b);\n } while (true);\n return b.iushln(shift);\n };\n BN2.prototype.invm = function invm(num) {\n return this.egcd(num).a.umod(num);\n };\n BN2.prototype.isEven = function isEven() {\n return (this.words[0] & 1) === 0;\n };\n BN2.prototype.isOdd = function isOdd() {\n return (this.words[0] & 1) === 1;\n };\n BN2.prototype.andln = function andln(num) {\n return this.words[0] & num;\n };\n BN2.prototype.bincn = function bincn(bit) {\n assert3(typeof bit === \"number\");\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 67108863;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n BN2.prototype.isZero = function isZero() {\n return this.length === 1 && this.words[0] === 0;\n };\n BN2.prototype.cmpn = function cmpn(num) {\n var negative = num < 0;\n if (this.negative !== 0 && !negative)\n return -1;\n if (this.negative === 0 && negative)\n return 1;\n this._strip();\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n assert3(num <= 67108863, \"Number is too big\");\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN2.prototype.cmp = function cmp(num) {\n if (this.negative !== 0 && num.negative === 0)\n return -1;\n if (this.negative === 0 && num.negative !== 0)\n return 1;\n var res = this.ucmp(num);\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN2.prototype.ucmp = function ucmp(num) {\n if (this.length > num.length)\n return 1;\n if (this.length < num.length)\n return -1;\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n if (a === b)\n continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n BN2.prototype.gtn = function gtn(num) {\n return this.cmpn(num) === 1;\n };\n BN2.prototype.gt = function gt(num) {\n return this.cmp(num) === 1;\n };\n BN2.prototype.gten = function gten(num) {\n return this.cmpn(num) >= 0;\n };\n BN2.prototype.gte = function gte(num) {\n return this.cmp(num) >= 0;\n };\n BN2.prototype.ltn = function ltn(num) {\n return this.cmpn(num) === -1;\n };\n BN2.prototype.lt = function lt(num) {\n return this.cmp(num) === -1;\n };\n BN2.prototype.lten = function lten(num) {\n return this.cmpn(num) <= 0;\n };\n BN2.prototype.lte = function lte(num) {\n return this.cmp(num) <= 0;\n };\n BN2.prototype.eqn = function eqn(num) {\n return this.cmpn(num) === 0;\n };\n BN2.prototype.eq = function eq(num) {\n return this.cmp(num) === 0;\n };\n BN2.red = function red(num) {\n return new Red(num);\n };\n BN2.prototype.toRed = function toRed(ctx) {\n assert3(!this.red, \"Already a number in reduction context\");\n assert3(this.negative === 0, \"red works only with positives\");\n return ctx.convertTo(this)._forceRed(ctx);\n };\n BN2.prototype.fromRed = function fromRed() {\n assert3(this.red, \"fromRed works only with numbers in reduction context\");\n return this.red.convertFrom(this);\n };\n BN2.prototype._forceRed = function _forceRed(ctx) {\n this.red = ctx;\n return this;\n };\n BN2.prototype.forceRed = function forceRed(ctx) {\n assert3(!this.red, \"Already a number in reduction context\");\n return this._forceRed(ctx);\n };\n BN2.prototype.redAdd = function redAdd(num) {\n assert3(this.red, \"redAdd works only with red numbers\");\n return this.red.add(this, num);\n };\n BN2.prototype.redIAdd = function redIAdd(num) {\n assert3(this.red, \"redIAdd works only with red numbers\");\n return this.red.iadd(this, num);\n };\n BN2.prototype.redSub = function redSub(num) {\n assert3(this.red, \"redSub works only with red numbers\");\n return this.red.sub(this, num);\n };\n BN2.prototype.redISub = function redISub(num) {\n assert3(this.red, \"redISub works only with red numbers\");\n return this.red.isub(this, num);\n };\n BN2.prototype.redShl = function redShl(num) {\n assert3(this.red, \"redShl works only with red numbers\");\n return this.red.shl(this, num);\n };\n BN2.prototype.redMul = function redMul(num) {\n assert3(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n BN2.prototype.redIMul = function redIMul(num) {\n assert3(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n BN2.prototype.redSqr = function redSqr() {\n assert3(this.red, \"redSqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n BN2.prototype.redISqr = function redISqr() {\n assert3(this.red, \"redISqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n BN2.prototype.redSqrt = function redSqrt() {\n assert3(this.red, \"redSqrt works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n BN2.prototype.redInvm = function redInvm() {\n assert3(this.red, \"redInvm works only with red numbers\");\n this.red._verify1(this);\n return this.red.invm(this);\n };\n BN2.prototype.redNeg = function redNeg() {\n assert3(this.red, \"redNeg works only with red numbers\");\n this.red._verify1(this);\n return this.red.neg(this);\n };\n BN2.prototype.redPow = function redPow(num) {\n assert3(this.red && !num.red, \"redPow(normalNum)\");\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n function MPrime(name, p) {\n this.name = name;\n this.p = new BN2(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN2(1).iushln(this.n).isub(this.p);\n this.tmp = this._tmp();\n }\n MPrime.prototype._tmp = function _tmp() {\n var tmp = new BN2(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n MPrime.prototype.ireduce = function ireduce(num) {\n var r = num;\n var rlen;\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== void 0) {\n r.strip();\n } else {\n r._strip();\n }\n }\n return r;\n };\n MPrime.prototype.split = function split2(input, out) {\n input.iushrn(this.n, 0, out);\n };\n MPrime.prototype.imulK = function imulK(num) {\n return num.imul(this.k);\n };\n function K256() {\n MPrime.call(\n this,\n \"k256\",\n \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\"\n );\n }\n inherits(K256, MPrime);\n K256.prototype.split = function split2(input, output) {\n var mask2 = 4194303;\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n var prev = input.words[9];\n output.words[output.length++] = prev & mask2;\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = (next & mask2) << 4 | prev >>> 22;\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n K256.prototype.imulK = function imulK(num) {\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 977;\n num.words[i] = lo & 67108863;\n lo = w * 64 + (lo / 67108864 | 0);\n }\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n function P224() {\n MPrime.call(\n this,\n \"p224\",\n \"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\"\n );\n }\n inherits(P224, MPrime);\n function P192() {\n MPrime.call(\n this,\n \"p192\",\n \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\"\n );\n }\n inherits(P192, MPrime);\n function P25519() {\n MPrime.call(\n this,\n \"25519\",\n \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\"\n );\n }\n inherits(P25519, MPrime);\n P25519.prototype.imulK = function imulK(num) {\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 19 + carry;\n var lo = hi & 67108863;\n hi >>>= 26;\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n BN2._prime = function prime(name) {\n if (primes[name])\n return primes[name];\n var prime2;\n if (name === \"k256\") {\n prime2 = new K256();\n } else if (name === \"p224\") {\n prime2 = new P224();\n } else if (name === \"p192\") {\n prime2 = new P192();\n } else if (name === \"p25519\") {\n prime2 = new P25519();\n } else {\n throw new Error(\"Unknown prime \" + name);\n }\n primes[name] = prime2;\n return prime2;\n };\n function Red(m) {\n if (typeof m === \"string\") {\n var prime = BN2._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert3(m.gtn(1), \"modulus must be greater than 1\");\n this.m = m;\n this.prime = null;\n }\n }\n Red.prototype._verify1 = function _verify1(a) {\n assert3(a.negative === 0, \"red works only with positives\");\n assert3(a.red, \"red works only with red numbers\");\n };\n Red.prototype._verify2 = function _verify2(a, b) {\n assert3((a.negative | b.negative) === 0, \"red works only with positives\");\n assert3(\n a.red && a.red === b.red,\n \"red works only with red numbers\"\n );\n };\n Red.prototype.imod = function imod(a) {\n if (this.prime)\n return this.prime.ireduce(a)._forceRed(this);\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n Red.prototype.neg = function neg(a) {\n if (a.isZero()) {\n return a.clone();\n }\n return this.m.sub(a)._forceRed(this);\n };\n Red.prototype.add = function add2(a, b) {\n this._verify2(a, b);\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.iadd = function iadd(a, b) {\n this._verify2(a, b);\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n Red.prototype.sub = function sub(a, b) {\n this._verify2(a, b);\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.isub = function isub(a, b) {\n this._verify2(a, b);\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n Red.prototype.shl = function shl(a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n Red.prototype.imul = function imul(a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n Red.prototype.mul = function mul(a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n Red.prototype.isqr = function isqr(a) {\n return this.imul(a, a.clone());\n };\n Red.prototype.sqr = function sqr(a) {\n return this.mul(a, a);\n };\n Red.prototype.sqrt = function sqrt(a) {\n if (a.isZero())\n return a.clone();\n var mod3 = this.m.andln(3);\n assert3(mod3 % 2 === 1);\n if (mod3 === 3) {\n var pow = this.m.add(new BN2(1)).iushrn(2);\n return this.pow(a, pow);\n }\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert3(!q.isZero());\n var one = new BN2(1).toRed(this);\n var nOne = one.redNeg();\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN2(2 * z * z).toRed(this);\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert3(i < m);\n var b = this.pow(c, new BN2(1).iushln(m - i - 1));\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n return r;\n };\n Red.prototype.invm = function invm(a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n Red.prototype.pow = function pow(a, num) {\n if (num.isZero())\n return new BN2(1).toRed(this);\n if (num.cmpn(1) === 0)\n return a.clone();\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN2(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = word >> j & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0))\n continue;\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n return res;\n };\n Red.prototype.convertTo = function convertTo(num) {\n var r = num.umod(this.m);\n return r === num ? r.clone() : r;\n };\n Red.prototype.convertFrom = function convertFrom(num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n BN2.mont = function mont(num) {\n return new Mont(num);\n };\n function Mont(m) {\n Red.call(this, m);\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - this.shift % 26;\n }\n this.r = new BN2(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n Mont.prototype.convertTo = function convertTo(num) {\n return this.imod(num.ushln(this.shift));\n };\n Mont.prototype.convertFrom = function convertFrom(num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n Mont.prototype.imul = function imul(a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.mul = function mul(a, b) {\n if (a.isZero() || b.isZero())\n return new BN2(0)._forceRed(this);\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.invm = function invm(a) {\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n })(typeof module === \"undefined\" || module, exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js\n var require_safe_buffer = __commonJS({\n \"../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var buffer = (init_buffer(), __toCommonJS(buffer_exports));\n var Buffer3 = buffer.Buffer;\n function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n }\n if (Buffer3.from && Buffer3.alloc && Buffer3.allocUnsafe && Buffer3.allocUnsafeSlow) {\n module.exports = buffer;\n } else {\n copyProps(buffer, exports3);\n exports3.Buffer = SafeBuffer;\n }\n function SafeBuffer(arg, encodingOrOffset, length) {\n return Buffer3(arg, encodingOrOffset, length);\n }\n SafeBuffer.prototype = Object.create(Buffer3.prototype);\n copyProps(Buffer3, SafeBuffer);\n SafeBuffer.from = function(arg, encodingOrOffset, length) {\n if (typeof arg === \"number\") {\n throw new TypeError(\"Argument must not be a number\");\n }\n return Buffer3(arg, encodingOrOffset, length);\n };\n SafeBuffer.alloc = function(size, fill, encoding) {\n if (typeof size !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n var buf = Buffer3(size);\n if (fill !== void 0) {\n if (typeof encoding === \"string\") {\n buf.fill(fill, encoding);\n } else {\n buf.fill(fill);\n }\n } else {\n buf.fill(0);\n }\n return buf;\n };\n SafeBuffer.allocUnsafe = function(size) {\n if (typeof size !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n return Buffer3(size);\n };\n SafeBuffer.allocUnsafeSlow = function(size) {\n if (typeof size !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n return buffer.SlowBuffer(size);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/base-x@3.0.11/node_modules/base-x/src/index.js\n var require_src = __commonJS({\n \"../../../node_modules/.pnpm/base-x@3.0.11/node_modules/base-x/src/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var _Buffer = require_safe_buffer().Buffer;\n function base(ALPHABET) {\n if (ALPHABET.length >= 255) {\n throw new TypeError(\"Alphabet too long\");\n }\n var BASE_MAP = new Uint8Array(256);\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255;\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i);\n var xc = x.charCodeAt(0);\n if (BASE_MAP[xc] !== 255) {\n throw new TypeError(x + \" is ambiguous\");\n }\n BASE_MAP[xc] = i;\n }\n var BASE = ALPHABET.length;\n var LEADER = ALPHABET.charAt(0);\n var FACTOR = Math.log(BASE) / Math.log(256);\n var iFACTOR = Math.log(256) / Math.log(BASE);\n function encode(source) {\n if (Array.isArray(source) || source instanceof Uint8Array) {\n source = _Buffer.from(source);\n }\n if (!_Buffer.isBuffer(source)) {\n throw new TypeError(\"Expected Buffer\");\n }\n if (source.length === 0) {\n return \"\";\n }\n var zeroes = 0;\n var length = 0;\n var pbegin = 0;\n var pend = source.length;\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++;\n zeroes++;\n }\n var size = (pend - pbegin) * iFACTOR + 1 >>> 0;\n var b58 = new Uint8Array(size);\n while (pbegin !== pend) {\n var carry = source[pbegin];\n var i2 = 0;\n for (var it1 = size - 1; (carry !== 0 || i2 < length) && it1 !== -1; it1--, i2++) {\n carry += 256 * b58[it1] >>> 0;\n b58[it1] = carry % BASE >>> 0;\n carry = carry / BASE >>> 0;\n }\n if (carry !== 0) {\n throw new Error(\"Non-zero carry\");\n }\n length = i2;\n pbegin++;\n }\n var it2 = size - length;\n while (it2 !== size && b58[it2] === 0) {\n it2++;\n }\n var str = LEADER.repeat(zeroes);\n for (; it2 < size; ++it2) {\n str += ALPHABET.charAt(b58[it2]);\n }\n return str;\n }\n function decodeUnsafe(source) {\n if (typeof source !== \"string\") {\n throw new TypeError(\"Expected String\");\n }\n if (source.length === 0) {\n return _Buffer.alloc(0);\n }\n var psz = 0;\n var zeroes = 0;\n var length = 0;\n while (source[psz] === LEADER) {\n zeroes++;\n psz++;\n }\n var size = (source.length - psz) * FACTOR + 1 >>> 0;\n var b256 = new Uint8Array(size);\n while (psz < source.length) {\n var charCode = source.charCodeAt(psz);\n if (charCode > 255) {\n return;\n }\n var carry = BASE_MAP[charCode];\n if (carry === 255) {\n return;\n }\n var i2 = 0;\n for (var it3 = size - 1; (carry !== 0 || i2 < length) && it3 !== -1; it3--, i2++) {\n carry += BASE * b256[it3] >>> 0;\n b256[it3] = carry % 256 >>> 0;\n carry = carry / 256 >>> 0;\n }\n if (carry !== 0) {\n throw new Error(\"Non-zero carry\");\n }\n length = i2;\n psz++;\n }\n var it4 = size - length;\n while (it4 !== size && b256[it4] === 0) {\n it4++;\n }\n var vch = _Buffer.allocUnsafe(zeroes + (size - it4));\n vch.fill(0, 0, zeroes);\n var j2 = zeroes;\n while (it4 !== size) {\n vch[j2++] = b256[it4++];\n }\n return vch;\n }\n function decode(string2) {\n var buffer = decodeUnsafe(string2);\n if (buffer) {\n return buffer;\n }\n throw new Error(\"Non-base\" + BASE + \" character\");\n }\n return {\n encode,\n decodeUnsafe,\n decode\n };\n }\n module.exports = base;\n }\n });\n\n // ../../../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js\n var require_bs58 = __commonJS({\n \"../../../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var basex = require_src();\n var ALPHABET = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n module.exports = basex(ALPHABET);\n }\n });\n\n // ../../../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js\n var require_encoding_lib = __commonJS({\n \"../../../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n function inRange2(a, min, max) {\n return min <= a && a <= max;\n }\n function ToDictionary(o) {\n if (o === void 0)\n return {};\n if (o === Object(o))\n return o;\n throw TypeError(\"Could not convert argument to dictionary\");\n }\n function stringToCodePoints(string2) {\n var s = String(string2);\n var n = s.length;\n var i = 0;\n var u = [];\n while (i < n) {\n var c = s.charCodeAt(i);\n if (c < 55296 || c > 57343) {\n u.push(c);\n } else if (56320 <= c && c <= 57343) {\n u.push(65533);\n } else if (55296 <= c && c <= 56319) {\n if (i === n - 1) {\n u.push(65533);\n } else {\n var d = string2.charCodeAt(i + 1);\n if (56320 <= d && d <= 57343) {\n var a = c & 1023;\n var b = d & 1023;\n u.push(65536 + (a << 10) + b);\n i += 1;\n } else {\n u.push(65533);\n }\n }\n }\n i += 1;\n }\n return u;\n }\n function codePointsToString(code_points) {\n var s = \"\";\n for (var i = 0; i < code_points.length; ++i) {\n var cp = code_points[i];\n if (cp <= 65535) {\n s += String.fromCharCode(cp);\n } else {\n cp -= 65536;\n s += String.fromCharCode(\n (cp >> 10) + 55296,\n (cp & 1023) + 56320\n );\n }\n }\n return s;\n }\n var end_of_stream = -1;\n function Stream(tokens) {\n this.tokens = [].slice.call(tokens);\n }\n Stream.prototype = {\n /**\n * @return {boolean} True if end-of-stream has been hit.\n */\n endOfStream: function() {\n return !this.tokens.length;\n },\n /**\n * When a token is read from a stream, the first token in the\n * stream must be returned and subsequently removed, and\n * end-of-stream must be returned otherwise.\n *\n * @return {number} Get the next token from the stream, or\n * end_of_stream.\n */\n read: function() {\n if (!this.tokens.length)\n return end_of_stream;\n return this.tokens.shift();\n },\n /**\n * When one or more tokens are prepended to a stream, those tokens\n * must be inserted, in given order, before the first token in the\n * stream.\n *\n * @param {(number|!Array.)} token The token(s) to prepend to the stream.\n */\n prepend: function(token) {\n if (Array.isArray(token)) {\n var tokens = (\n /**@type {!Array.}*/\n token\n );\n while (tokens.length)\n this.tokens.unshift(tokens.pop());\n } else {\n this.tokens.unshift(token);\n }\n },\n /**\n * When one or more tokens are pushed to a stream, those tokens\n * must be inserted, in given order, after the last token in the\n * stream.\n *\n * @param {(number|!Array.)} token The tokens(s) to prepend to the stream.\n */\n push: function(token) {\n if (Array.isArray(token)) {\n var tokens = (\n /**@type {!Array.}*/\n token\n );\n while (tokens.length)\n this.tokens.push(tokens.shift());\n } else {\n this.tokens.push(token);\n }\n }\n };\n var finished = -1;\n function decoderError(fatal, opt_code_point) {\n if (fatal)\n throw TypeError(\"Decoder error\");\n return opt_code_point || 65533;\n }\n var DEFAULT_ENCODING = \"utf-8\";\n function TextDecoder2(encoding, options) {\n if (!(this instanceof TextDecoder2)) {\n return new TextDecoder2(encoding, options);\n }\n encoding = encoding !== void 0 ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error(\"Encoding not supported. Only utf-8 is supported\");\n }\n options = ToDictionary(options);\n this._streaming = false;\n this._BOMseen = false;\n this._decoder = null;\n this._fatal = Boolean(options[\"fatal\"]);\n this._ignoreBOM = Boolean(options[\"ignoreBOM\"]);\n Object.defineProperty(this, \"encoding\", { value: \"utf-8\" });\n Object.defineProperty(this, \"fatal\", { value: this._fatal });\n Object.defineProperty(this, \"ignoreBOM\", { value: this._ignoreBOM });\n }\n TextDecoder2.prototype = {\n /**\n * @param {ArrayBufferView=} input The buffer of bytes to decode.\n * @param {Object=} options\n * @return {string} The decoded string.\n */\n decode: function decode(input, options) {\n var bytes;\n if (typeof input === \"object\" && input instanceof ArrayBuffer) {\n bytes = new Uint8Array(input);\n } else if (typeof input === \"object\" && \"buffer\" in input && input.buffer instanceof ArrayBuffer) {\n bytes = new Uint8Array(\n input.buffer,\n input.byteOffset,\n input.byteLength\n );\n } else {\n bytes = new Uint8Array(0);\n }\n options = ToDictionary(options);\n if (!this._streaming) {\n this._decoder = new UTF8Decoder({ fatal: this._fatal });\n this._BOMseen = false;\n }\n this._streaming = Boolean(options[\"stream\"]);\n var input_stream = new Stream(bytes);\n var code_points = [];\n var result;\n while (!input_stream.endOfStream()) {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(\n code_points,\n /**@type {!Array.}*/\n result\n );\n else\n code_points.push(result);\n }\n if (!this._streaming) {\n do {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(\n code_points,\n /**@type {!Array.}*/\n result\n );\n else\n code_points.push(result);\n } while (!input_stream.endOfStream());\n this._decoder = null;\n }\n if (code_points.length) {\n if ([\"utf-8\"].indexOf(this.encoding) !== -1 && !this._ignoreBOM && !this._BOMseen) {\n if (code_points[0] === 65279) {\n this._BOMseen = true;\n code_points.shift();\n } else {\n this._BOMseen = true;\n }\n }\n }\n return codePointsToString(code_points);\n }\n };\n function TextEncoder2(encoding, options) {\n if (!(this instanceof TextEncoder2))\n return new TextEncoder2(encoding, options);\n encoding = encoding !== void 0 ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error(\"Encoding not supported. Only utf-8 is supported\");\n }\n options = ToDictionary(options);\n this._streaming = false;\n this._encoder = null;\n this._options = { fatal: Boolean(options[\"fatal\"]) };\n Object.defineProperty(this, \"encoding\", { value: \"utf-8\" });\n }\n TextEncoder2.prototype = {\n /**\n * @param {string=} opt_string The string to encode.\n * @param {Object=} options\n * @return {Uint8Array} Encoded bytes, as a Uint8Array.\n */\n encode: function encode(opt_string, options) {\n opt_string = opt_string ? String(opt_string) : \"\";\n options = ToDictionary(options);\n if (!this._streaming)\n this._encoder = new UTF8Encoder(this._options);\n this._streaming = Boolean(options[\"stream\"]);\n var bytes = [];\n var input_stream = new Stream(stringToCodePoints(opt_string));\n var result;\n while (!input_stream.endOfStream()) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(\n bytes,\n /**@type {!Array.}*/\n result\n );\n else\n bytes.push(result);\n }\n if (!this._streaming) {\n while (true) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(\n bytes,\n /**@type {!Array.}*/\n result\n );\n else\n bytes.push(result);\n }\n this._encoder = null;\n }\n return new Uint8Array(bytes);\n }\n };\n function UTF8Decoder(options) {\n var fatal = options.fatal;\n var utf8_code_point = 0, utf8_bytes_seen = 0, utf8_bytes_needed = 0, utf8_lower_boundary = 128, utf8_upper_boundary = 191;\n this.handler = function(stream, bite) {\n if (bite === end_of_stream && utf8_bytes_needed !== 0) {\n utf8_bytes_needed = 0;\n return decoderError(fatal);\n }\n if (bite === end_of_stream)\n return finished;\n if (utf8_bytes_needed === 0) {\n if (inRange2(bite, 0, 127)) {\n return bite;\n }\n if (inRange2(bite, 194, 223)) {\n utf8_bytes_needed = 1;\n utf8_code_point = bite - 192;\n } else if (inRange2(bite, 224, 239)) {\n if (bite === 224)\n utf8_lower_boundary = 160;\n if (bite === 237)\n utf8_upper_boundary = 159;\n utf8_bytes_needed = 2;\n utf8_code_point = bite - 224;\n } else if (inRange2(bite, 240, 244)) {\n if (bite === 240)\n utf8_lower_boundary = 144;\n if (bite === 244)\n utf8_upper_boundary = 143;\n utf8_bytes_needed = 3;\n utf8_code_point = bite - 240;\n } else {\n return decoderError(fatal);\n }\n utf8_code_point = utf8_code_point << 6 * utf8_bytes_needed;\n return null;\n }\n if (!inRange2(bite, utf8_lower_boundary, utf8_upper_boundary)) {\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n utf8_lower_boundary = 128;\n utf8_upper_boundary = 191;\n stream.prepend(bite);\n return decoderError(fatal);\n }\n utf8_lower_boundary = 128;\n utf8_upper_boundary = 191;\n utf8_bytes_seen += 1;\n utf8_code_point += bite - 128 << 6 * (utf8_bytes_needed - utf8_bytes_seen);\n if (utf8_bytes_seen !== utf8_bytes_needed)\n return null;\n var code_point = utf8_code_point;\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n return code_point;\n };\n }\n function UTF8Encoder(options) {\n var fatal = options.fatal;\n this.handler = function(stream, code_point) {\n if (code_point === end_of_stream)\n return finished;\n if (inRange2(code_point, 0, 127))\n return code_point;\n var count, offset2;\n if (inRange2(code_point, 128, 2047)) {\n count = 1;\n offset2 = 192;\n } else if (inRange2(code_point, 2048, 65535)) {\n count = 2;\n offset2 = 224;\n } else if (inRange2(code_point, 65536, 1114111)) {\n count = 3;\n offset2 = 240;\n }\n var bytes = [(code_point >> 6 * count) + offset2];\n while (count > 0) {\n var temp = code_point >> 6 * (count - 1);\n bytes.push(128 | temp & 63);\n count -= 1;\n }\n return bytes;\n };\n }\n exports3.TextEncoder = TextEncoder2;\n exports3.TextDecoder = TextDecoder2;\n }\n });\n\n // ../../../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js\n var require_lib = __commonJS({\n \"../../../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding = exports3 && exports3.__createBinding || (Object.create ? function(o, m, k, k2) {\n if (k2 === void 0)\n k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() {\n return m[k];\n } });\n } : function(o, m, k, k2) {\n if (k2 === void 0)\n k2 = k;\n o[k2] = m[k];\n });\n var __setModuleDefault = exports3 && exports3.__setModuleDefault || (Object.create ? function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n } : function(o, v) {\n o[\"default\"] = v;\n });\n var __decorate = exports3 && exports3.__decorate || function(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i = decorators.length - 1; i >= 0; i--)\n if (d = decorators[i])\n r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };\n var __importStar = exports3 && exports3.__importStar || function(mod2) {\n if (mod2 && mod2.__esModule)\n return mod2;\n var result = {};\n if (mod2 != null) {\n for (var k in mod2)\n if (k !== \"default\" && Object.hasOwnProperty.call(mod2, k))\n __createBinding(result, mod2, k);\n }\n __setModuleDefault(result, mod2);\n return result;\n };\n var __importDefault = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.deserializeUnchecked = exports3.deserialize = exports3.serialize = exports3.BinaryReader = exports3.BinaryWriter = exports3.BorshError = exports3.baseDecode = exports3.baseEncode = void 0;\n var bn_js_1 = __importDefault(require_bn());\n var bs58_1 = __importDefault(require_bs58());\n var encoding = __importStar(require_encoding_lib());\n var ResolvedTextDecoder = typeof TextDecoder !== \"function\" ? encoding.TextDecoder : TextDecoder;\n var textDecoder = new ResolvedTextDecoder(\"utf-8\", { fatal: true });\n function baseEncode(value) {\n if (typeof value === \"string\") {\n value = Buffer2.from(value, \"utf8\");\n }\n return bs58_1.default.encode(Buffer2.from(value));\n }\n exports3.baseEncode = baseEncode;\n function baseDecode(value) {\n return Buffer2.from(bs58_1.default.decode(value));\n }\n exports3.baseDecode = baseDecode;\n var INITIAL_LENGTH = 1024;\n var BorshError = class extends Error {\n constructor(message) {\n super(message);\n this.fieldPath = [];\n this.originalMessage = message;\n }\n addToFieldPath(fieldName) {\n this.fieldPath.splice(0, 0, fieldName);\n this.message = this.originalMessage + \": \" + this.fieldPath.join(\".\");\n }\n };\n exports3.BorshError = BorshError;\n var BinaryWriter = class {\n constructor() {\n this.buf = Buffer2.alloc(INITIAL_LENGTH);\n this.length = 0;\n }\n maybeResize() {\n if (this.buf.length < 16 + this.length) {\n this.buf = Buffer2.concat([this.buf, Buffer2.alloc(INITIAL_LENGTH)]);\n }\n }\n writeU8(value) {\n this.maybeResize();\n this.buf.writeUInt8(value, this.length);\n this.length += 1;\n }\n writeU16(value) {\n this.maybeResize();\n this.buf.writeUInt16LE(value, this.length);\n this.length += 2;\n }\n writeU32(value) {\n this.maybeResize();\n this.buf.writeUInt32LE(value, this.length);\n this.length += 4;\n }\n writeU64(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 8)));\n }\n writeU128(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 16)));\n }\n writeU256(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 32)));\n }\n writeU512(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 64)));\n }\n writeBuffer(buffer) {\n this.buf = Buffer2.concat([\n Buffer2.from(this.buf.subarray(0, this.length)),\n buffer,\n Buffer2.alloc(INITIAL_LENGTH)\n ]);\n this.length += buffer.length;\n }\n writeString(str) {\n this.maybeResize();\n const b = Buffer2.from(str, \"utf8\");\n this.writeU32(b.length);\n this.writeBuffer(b);\n }\n writeFixedArray(array2) {\n this.writeBuffer(Buffer2.from(array2));\n }\n writeArray(array2, fn) {\n this.maybeResize();\n this.writeU32(array2.length);\n for (const elem of array2) {\n this.maybeResize();\n fn(elem);\n }\n }\n toArray() {\n return this.buf.subarray(0, this.length);\n }\n };\n exports3.BinaryWriter = BinaryWriter;\n function handlingRangeError(target, propertyKey, propertyDescriptor) {\n const originalMethod = propertyDescriptor.value;\n propertyDescriptor.value = function(...args) {\n try {\n return originalMethod.apply(this, args);\n } catch (e) {\n if (e instanceof RangeError) {\n const code = e.code;\n if ([\"ERR_BUFFER_OUT_OF_BOUNDS\", \"ERR_OUT_OF_RANGE\"].indexOf(code) >= 0) {\n throw new BorshError(\"Reached the end of buffer when deserializing\");\n }\n }\n throw e;\n }\n };\n }\n var BinaryReader = class {\n constructor(buf) {\n this.buf = buf;\n this.offset = 0;\n }\n readU8() {\n const value = this.buf.readUInt8(this.offset);\n this.offset += 1;\n return value;\n }\n readU16() {\n const value = this.buf.readUInt16LE(this.offset);\n this.offset += 2;\n return value;\n }\n readU32() {\n const value = this.buf.readUInt32LE(this.offset);\n this.offset += 4;\n return value;\n }\n readU64() {\n const buf = this.readBuffer(8);\n return new bn_js_1.default(buf, \"le\");\n }\n readU128() {\n const buf = this.readBuffer(16);\n return new bn_js_1.default(buf, \"le\");\n }\n readU256() {\n const buf = this.readBuffer(32);\n return new bn_js_1.default(buf, \"le\");\n }\n readU512() {\n const buf = this.readBuffer(64);\n return new bn_js_1.default(buf, \"le\");\n }\n readBuffer(len) {\n if (this.offset + len > this.buf.length) {\n throw new BorshError(`Expected buffer length ${len} isn't within bounds`);\n }\n const result = this.buf.slice(this.offset, this.offset + len);\n this.offset += len;\n return result;\n }\n readString() {\n const len = this.readU32();\n const buf = this.readBuffer(len);\n try {\n return textDecoder.decode(buf);\n } catch (e) {\n throw new BorshError(`Error decoding UTF-8 string: ${e}`);\n }\n }\n readFixedArray(len) {\n return new Uint8Array(this.readBuffer(len));\n }\n readArray(fn) {\n const len = this.readU32();\n const result = Array();\n for (let i = 0; i < len; ++i) {\n result.push(fn());\n }\n return result;\n }\n };\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU8\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU16\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU32\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU64\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU128\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU256\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU512\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readString\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readFixedArray\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readArray\", null);\n exports3.BinaryReader = BinaryReader;\n function capitalizeFirstLetter(string2) {\n return string2.charAt(0).toUpperCase() + string2.slice(1);\n }\n function serializeField(schema, fieldName, value, fieldType, writer) {\n try {\n if (typeof fieldType === \"string\") {\n writer[`write${capitalizeFirstLetter(fieldType)}`](value);\n } else if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n if (value.length !== fieldType[0]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[0]}, but got ${value.length} bytes`);\n }\n writer.writeFixedArray(value);\n } else if (fieldType.length === 2 && typeof fieldType[1] === \"number\") {\n if (value.length !== fieldType[1]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[1]}, but got ${value.length} bytes`);\n }\n for (let i = 0; i < fieldType[1]; i++) {\n serializeField(schema, null, value[i], fieldType[0], writer);\n }\n } else {\n writer.writeArray(value, (item) => {\n serializeField(schema, fieldName, item, fieldType[0], writer);\n });\n }\n } else if (fieldType.kind !== void 0) {\n switch (fieldType.kind) {\n case \"option\": {\n if (value === null || value === void 0) {\n writer.writeU8(0);\n } else {\n writer.writeU8(1);\n serializeField(schema, fieldName, value, fieldType.type, writer);\n }\n break;\n }\n case \"map\": {\n writer.writeU32(value.size);\n value.forEach((val, key) => {\n serializeField(schema, fieldName, key, fieldType.key, writer);\n serializeField(schema, fieldName, val, fieldType.value, writer);\n });\n break;\n }\n default:\n throw new BorshError(`FieldType ${fieldType} unrecognized`);\n }\n } else {\n serializeStruct(schema, value, writer);\n }\n } catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n }\n function serializeStruct(schema, obj, writer) {\n if (typeof obj.borshSerialize === \"function\") {\n obj.borshSerialize(writer);\n return;\n }\n const structSchema = schema.get(obj.constructor);\n if (!structSchema) {\n throw new BorshError(`Class ${obj.constructor.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n structSchema.fields.map(([fieldName, fieldType]) => {\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n });\n } else if (structSchema.kind === \"enum\") {\n const name = obj[structSchema.field];\n for (let idx = 0; idx < structSchema.values.length; ++idx) {\n const [fieldName, fieldType] = structSchema.values[idx];\n if (fieldName === name) {\n writer.writeU8(idx);\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n break;\n }\n }\n } else {\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${obj.constructor.name}`);\n }\n }\n function serialize2(schema, obj, Writer = BinaryWriter) {\n const writer = new Writer();\n serializeStruct(schema, obj, writer);\n return writer.toArray();\n }\n exports3.serialize = serialize2;\n function deserializeField(schema, fieldName, fieldType, reader) {\n try {\n if (typeof fieldType === \"string\") {\n return reader[`read${capitalizeFirstLetter(fieldType)}`]();\n }\n if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n return reader.readFixedArray(fieldType[0]);\n } else if (typeof fieldType[1] === \"number\") {\n const arr = [];\n for (let i = 0; i < fieldType[1]; i++) {\n arr.push(deserializeField(schema, null, fieldType[0], reader));\n }\n return arr;\n } else {\n return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader));\n }\n }\n if (fieldType.kind === \"option\") {\n const option = reader.readU8();\n if (option) {\n return deserializeField(schema, fieldName, fieldType.type, reader);\n }\n return void 0;\n }\n if (fieldType.kind === \"map\") {\n let map = /* @__PURE__ */ new Map();\n const length = reader.readU32();\n for (let i = 0; i < length; i++) {\n const key = deserializeField(schema, fieldName, fieldType.key, reader);\n const val = deserializeField(schema, fieldName, fieldType.value, reader);\n map.set(key, val);\n }\n return map;\n }\n return deserializeStruct(schema, fieldType, reader);\n } catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n }\n function deserializeStruct(schema, classType, reader) {\n if (typeof classType.borshDeserialize === \"function\") {\n return classType.borshDeserialize(reader);\n }\n const structSchema = schema.get(classType);\n if (!structSchema) {\n throw new BorshError(`Class ${classType.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n const result = {};\n for (const [fieldName, fieldType] of schema.get(classType).fields) {\n result[fieldName] = deserializeField(schema, fieldName, fieldType, reader);\n }\n return new classType(result);\n }\n if (structSchema.kind === \"enum\") {\n const idx = reader.readU8();\n if (idx >= structSchema.values.length) {\n throw new BorshError(`Enum index: ${idx} is out of range`);\n }\n const [fieldName, fieldType] = structSchema.values[idx];\n const fieldValue = deserializeField(schema, fieldName, fieldType, reader);\n return new classType({ [fieldName]: fieldValue });\n }\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`);\n }\n function deserialize2(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n const result = deserializeStruct(schema, classType, reader);\n if (reader.offset < buffer.length) {\n throw new BorshError(`Unexpected ${buffer.length - reader.offset} bytes after deserialized data`);\n }\n return result;\n }\n exports3.deserialize = deserialize2;\n function deserializeUnchecked2(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n return deserializeStruct(schema, classType, reader);\n }\n exports3.deserializeUnchecked = deserializeUnchecked2;\n }\n });\n\n // ../../../node_modules/.pnpm/@solana+buffer-layout@4.0.1/node_modules/@solana/buffer-layout/lib/Layout.js\n var require_Layout = __commonJS({\n \"../../../node_modules/.pnpm/@solana+buffer-layout@4.0.1/node_modules/@solana/buffer-layout/lib/Layout.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.s16 = exports3.s8 = exports3.nu64be = exports3.u48be = exports3.u40be = exports3.u32be = exports3.u24be = exports3.u16be = exports3.nu64 = exports3.u48 = exports3.u40 = exports3.u32 = exports3.u24 = exports3.u16 = exports3.u8 = exports3.offset = exports3.greedy = exports3.Constant = exports3.UTF8 = exports3.CString = exports3.Blob = exports3.Boolean = exports3.BitField = exports3.BitStructure = exports3.VariantLayout = exports3.Union = exports3.UnionLayoutDiscriminator = exports3.UnionDiscriminator = exports3.Structure = exports3.Sequence = exports3.DoubleBE = exports3.Double = exports3.FloatBE = exports3.Float = exports3.NearInt64BE = exports3.NearInt64 = exports3.NearUInt64BE = exports3.NearUInt64 = exports3.IntBE = exports3.Int = exports3.UIntBE = exports3.UInt = exports3.OffsetLayout = exports3.GreedyCount = exports3.ExternalLayout = exports3.bindConstructorLayout = exports3.nameWithProperty = exports3.Layout = exports3.uint8ArrayToBuffer = exports3.checkUint8Array = void 0;\n exports3.constant = exports3.utf8 = exports3.cstr = exports3.blob = exports3.unionLayoutDiscriminator = exports3.union = exports3.seq = exports3.bits = exports3.struct = exports3.f64be = exports3.f64 = exports3.f32be = exports3.f32 = exports3.ns64be = exports3.s48be = exports3.s40be = exports3.s32be = exports3.s24be = exports3.s16be = exports3.ns64 = exports3.s48 = exports3.s40 = exports3.s32 = exports3.s24 = void 0;\n var buffer_1 = (init_buffer(), __toCommonJS(buffer_exports));\n function checkUint8Array(b) {\n if (!(b instanceof Uint8Array)) {\n throw new TypeError(\"b must be a Uint8Array\");\n }\n }\n exports3.checkUint8Array = checkUint8Array;\n function uint8ArrayToBuffer(b) {\n checkUint8Array(b);\n return buffer_1.Buffer.from(b.buffer, b.byteOffset, b.length);\n }\n exports3.uint8ArrayToBuffer = uint8ArrayToBuffer;\n var Layout = class {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError(\"span must be an integer\");\n }\n this.span = span;\n this.property = property;\n }\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Uint8Array} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset2) {\n if (0 > this.span) {\n throw new RangeError(\"indeterminate span\");\n }\n return this.span;\n }\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return void 0;\n }\n };\n exports3.Layout = Layout;\n function nameWithProperty(name, lo) {\n if (lo.property) {\n return name + \"[\" + lo.property + \"]\";\n }\n return name;\n }\n exports3.nameWithProperty = nameWithProperty;\n function bindConstructorLayout(Class, layout) {\n if (\"function\" !== typeof Class) {\n throw new TypeError(\"Class must be constructor\");\n }\n if (Object.prototype.hasOwnProperty.call(Class, \"layout_\")) {\n throw new Error(\"Class is already bound to a layout\");\n }\n if (!(layout && layout instanceof Layout)) {\n throw new TypeError(\"layout must be a Layout\");\n }\n if (Object.prototype.hasOwnProperty.call(layout, \"boundConstructor_\")) {\n throw new Error(\"layout is already bound to a constructor\");\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = () => new Class();\n Object.defineProperty(Class.prototype, \"encode\", {\n value(b, offset2) {\n return layout.encode(this, b, offset2);\n },\n writable: true\n });\n Object.defineProperty(Class, \"decode\", {\n value(b, offset2) {\n return layout.decode(b, offset2);\n },\n writable: true\n });\n }\n exports3.bindConstructorLayout = bindConstructorLayout;\n var ExternalLayout = class extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error(\"ExternalLayout is abstract\");\n }\n };\n exports3.ExternalLayout = ExternalLayout;\n var GreedyCount = class extends ExternalLayout {\n constructor(elementSpan = 1, property) {\n if (!Number.isInteger(elementSpan) || 0 >= elementSpan) {\n throw new TypeError(\"elementSpan must be a (positive) integer\");\n }\n super(-1, property);\n this.elementSpan = elementSpan;\n }\n /** @override */\n isCount() {\n return true;\n }\n /** @override */\n decode(b, offset2 = 0) {\n checkUint8Array(b);\n const rem = b.length - offset2;\n return Math.floor(rem / this.elementSpan);\n }\n /** @override */\n encode(src, b, offset2) {\n return 0;\n }\n };\n exports3.GreedyCount = GreedyCount;\n var OffsetLayout = class extends ExternalLayout {\n constructor(layout, offset2 = 0, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError(\"layout must be a Layout\");\n }\n if (!Number.isInteger(offset2)) {\n throw new TypeError(\"offset must be integer or undefined\");\n }\n super(layout.span, property || layout.property);\n this.layout = layout;\n this.offset = offset2;\n }\n /** @override */\n isCount() {\n return this.layout instanceof UInt || this.layout instanceof UIntBE;\n }\n /** @override */\n decode(b, offset2 = 0) {\n return this.layout.decode(b, offset2 + this.offset);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n return this.layout.encode(src, b, offset2 + this.offset);\n }\n };\n exports3.OffsetLayout = OffsetLayout;\n var UInt = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readUIntLE(offset2, this.span);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeUIntLE(src, offset2, this.span);\n return this.span;\n }\n };\n exports3.UInt = UInt;\n var UIntBE = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readUIntBE(offset2, this.span);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeUIntBE(src, offset2, this.span);\n return this.span;\n }\n };\n exports3.UIntBE = UIntBE;\n var Int = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readIntLE(offset2, this.span);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeIntLE(src, offset2, this.span);\n return this.span;\n }\n };\n exports3.Int = Int;\n var IntBE = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readIntBE(offset2, this.span);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeIntBE(src, offset2, this.span);\n return this.span;\n }\n };\n exports3.IntBE = IntBE;\n var V2E32 = Math.pow(2, 32);\n function divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - hi32 * V2E32;\n return { hi32, lo32 };\n }\n function roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n }\n var NearUInt64 = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset2);\n const hi32 = buffer.readUInt32LE(offset2 + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n const split2 = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split2.lo32, offset2);\n buffer.writeUInt32LE(split2.hi32, offset2 + 4);\n return 8;\n }\n };\n exports3.NearUInt64 = NearUInt64;\n var NearUInt64BE = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readUInt32BE(offset2);\n const lo32 = buffer.readUInt32BE(offset2 + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n const split2 = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32BE(split2.hi32, offset2);\n buffer.writeUInt32BE(split2.lo32, offset2 + 4);\n return 8;\n }\n };\n exports3.NearUInt64BE = NearUInt64BE;\n var NearInt64 = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset2);\n const hi32 = buffer.readInt32LE(offset2 + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n const split2 = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split2.lo32, offset2);\n buffer.writeInt32LE(split2.hi32, offset2 + 4);\n return 8;\n }\n };\n exports3.NearInt64 = NearInt64;\n var NearInt64BE = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readInt32BE(offset2);\n const lo32 = buffer.readUInt32BE(offset2 + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n const split2 = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeInt32BE(split2.hi32, offset2);\n buffer.writeUInt32BE(split2.lo32, offset2 + 4);\n return 8;\n }\n };\n exports3.NearInt64BE = NearInt64BE;\n var Float = class extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readFloatLE(offset2);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeFloatLE(src, offset2);\n return 4;\n }\n };\n exports3.Float = Float;\n var FloatBE = class extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readFloatBE(offset2);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeFloatBE(src, offset2);\n return 4;\n }\n };\n exports3.FloatBE = FloatBE;\n var Double = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readDoubleLE(offset2);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeDoubleLE(src, offset2);\n return 8;\n }\n };\n exports3.Double = Double;\n var DoubleBE = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readDoubleBE(offset2);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeDoubleBE(src, offset2);\n return 8;\n }\n };\n exports3.DoubleBE = DoubleBE;\n var Sequence = class extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError(\"elementLayout must be a Layout\");\n }\n if (!(count instanceof ExternalLayout && count.isCount() || Number.isInteger(count) && 0 <= count)) {\n throw new TypeError(\"count must be non-negative integer or an unsigned integer ExternalLayout\");\n }\n let span = -1;\n if (!(count instanceof ExternalLayout) && 0 < elementLayout.span) {\n span = count * elementLayout.span;\n }\n super(span, property);\n this.elementLayout = elementLayout;\n this.count = count;\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset2);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n } else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b, offset2 + span);\n ++idx;\n }\n }\n return span;\n }\n /** @override */\n decode(b, offset2 = 0) {\n const rv = [];\n let i = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset2);\n }\n while (i < count) {\n rv.push(this.elementLayout.decode(b, offset2));\n offset2 += this.elementLayout.getSpan(b, offset2);\n i += 1;\n }\n return rv;\n }\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset2 = 0) {\n const elo = this.elementLayout;\n const span = src.reduce((span2, v) => {\n return span2 + elo.encode(v, b, offset2 + span2);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b, offset2);\n }\n return span;\n }\n };\n exports3.Sequence = Sequence;\n var Structure = class extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields) && fields.reduce((acc, v) => acc && v instanceof Layout, true))) {\n throw new TypeError(\"fields must be array of Layout instances\");\n }\n if (\"boolean\" === typeof property && void 0 === decodePrefixes) {\n decodePrefixes = property;\n property = void 0;\n }\n for (const fd of fields) {\n if (0 > fd.span && void 0 === fd.property) {\n throw new Error(\"fields cannot contain unnamed variable-length layout\");\n }\n }\n let span = -1;\n try {\n span = fields.reduce((span2, fd) => span2 + fd.getSpan(), 0);\n } catch (e) {\n }\n super(span, property);\n this.fields = fields;\n this.decodePrefixes = !!decodePrefixes;\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span2, fd) => {\n const fsp = fd.getSpan(b, offset2);\n offset2 += fsp;\n return span2 + fsp;\n }, 0);\n } catch (e) {\n throw new RangeError(\"indeterminate span\");\n }\n return span;\n }\n /** @override */\n decode(b, offset2 = 0) {\n checkUint8Array(b);\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (void 0 !== fd.property) {\n dest[fd.property] = fd.decode(b, offset2);\n }\n offset2 += fd.getSpan(b, offset2);\n if (this.decodePrefixes && b.length === offset2) {\n break;\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset2 = 0) {\n const firstOffset = offset2;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = 0 < span ? span : 0;\n if (void 0 !== fd.property) {\n const fv = src[fd.property];\n if (void 0 !== fv) {\n lastWrote = fd.encode(fv, b, offset2);\n if (0 > span) {\n span = fd.getSpan(b, offset2);\n }\n }\n }\n lastOffset = offset2;\n offset2 += span;\n }\n return lastOffset + lastWrote - firstOffset;\n }\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (void 0 !== fd.property && 0 < values.length) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if (\"string\" !== typeof property) {\n throw new TypeError(\"property must be string\");\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return void 0;\n }\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if (\"string\" !== typeof property) {\n throw new TypeError(\"property must be string\");\n }\n let offset2 = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset2;\n }\n if (0 > fd.span) {\n offset2 = -1;\n } else if (0 <= offset2) {\n offset2 += fd.span;\n }\n }\n return void 0;\n }\n };\n exports3.Structure = Structure;\n var UnionDiscriminator = class {\n constructor(property) {\n this.property = property;\n }\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode(b, offset2) {\n throw new Error(\"UnionDiscriminator is abstract\");\n }\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode(src, b, offset2) {\n throw new Error(\"UnionDiscriminator is abstract\");\n }\n };\n exports3.UnionDiscriminator = UnionDiscriminator;\n var UnionLayoutDiscriminator = class extends UnionDiscriminator {\n constructor(layout, property) {\n if (!(layout instanceof ExternalLayout && layout.isCount())) {\n throw new TypeError(\"layout must be an unsigned integer ExternalLayout\");\n }\n super(property || layout.property || \"variant\");\n this.layout = layout;\n }\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset2) {\n return this.layout.decode(b, offset2);\n }\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset2) {\n return this.layout.encode(src, b, offset2);\n }\n };\n exports3.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\n var Union = class extends Layout {\n constructor(discr, defaultLayout, property) {\n let discriminator;\n if (discr instanceof UInt || discr instanceof UIntBE) {\n discriminator = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n } else if (discr instanceof ExternalLayout && discr.isCount()) {\n discriminator = new UnionLayoutDiscriminator(discr);\n } else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError(\"discr must be a UnionDiscriminator or an unsigned integer layout\");\n } else {\n discriminator = discr;\n }\n if (void 0 === defaultLayout) {\n defaultLayout = null;\n }\n if (!(null === defaultLayout || defaultLayout instanceof Layout)) {\n throw new TypeError(\"defaultLayout must be null or a Layout\");\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error(\"defaultLayout must have constant span\");\n }\n if (void 0 === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate(\"content\");\n }\n }\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if (0 <= span && (discr instanceof UInt || discr instanceof UIntBE)) {\n span += discriminator.layout.span;\n }\n }\n super(span, property);\n this.discriminator = discriminator;\n this.usesPrefixDiscriminator = discr instanceof UInt || discr instanceof UIntBE;\n this.defaultLayout = defaultLayout;\n this.registry = {};\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n this.getSourceVariant = function(src) {\n return boundGetSourceVariant(src);\n };\n this.configGetSourceVariant = function(gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n const vlo = this.getVariant(b, offset2);\n if (!vlo) {\n throw new Error(\"unable to determine span for unrecognized variant\");\n }\n return vlo.getSpan(b, offset2);\n }\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisfied rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (Object.prototype.hasOwnProperty.call(src, this.discriminator.property)) {\n if (this.defaultLayout && this.defaultLayout.property && Object.prototype.hasOwnProperty.call(src, this.defaultLayout.property)) {\n return void 0;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo && (!vlo.layout || vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property))) {\n return vlo;\n }\n } else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error(\"unable to infer src variant\");\n }\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset2 = 0) {\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset2);\n const clo = this.registry[discr];\n if (void 0 === clo) {\n const defaultLayout = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n dest[defaultLayout.property] = defaultLayout.decode(b, offset2 + contentOffset);\n } else {\n dest = clo.decode(b, offset2);\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset2 = 0) {\n const vlo = this.getSourceVariant(src);\n if (void 0 === vlo) {\n const dlo = this.discriminator;\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset2);\n return contentOffset + clo.encode(src[clo.property], b, offset2 + contentOffset);\n }\n return vlo.encode(src, b, offset2);\n }\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Uint8Array)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Uint8Array}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset2 = 0) {\n let variant;\n if (vb instanceof Uint8Array) {\n variant = this.discriminator.decode(vb, offset2);\n } else {\n variant = vb;\n }\n return this.registry[variant];\n }\n };\n exports3.Union = Union;\n var VariantLayout = class extends Layout {\n constructor(union2, variant, layout, property) {\n if (!(union2 instanceof Union)) {\n throw new TypeError(\"union must be a Union\");\n }\n if (!Number.isInteger(variant) || 0 > variant) {\n throw new TypeError(\"variant must be a (non-negative) integer\");\n }\n if (\"string\" === typeof layout && void 0 === property) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError(\"layout must be a Layout\");\n }\n if (null !== union2.defaultLayout && 0 <= layout.span && layout.span > union2.defaultLayout.span) {\n throw new Error(\"variant span exceeds span of containing union\");\n }\n if (\"string\" !== typeof property) {\n throw new TypeError(\"variant must have a String property\");\n }\n }\n let span = union2.span;\n if (0 > union2.span) {\n span = layout ? layout.span : 0;\n if (0 <= span && union2.usesPrefixDiscriminator) {\n span += union2.discriminator.layout.span;\n }\n }\n super(span, property);\n this.union = union2;\n this.variant = variant;\n this.layout = layout || null;\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n let span = 0;\n if (this.layout) {\n span = this.layout.getSpan(b, offset2 + contentOffset);\n }\n return contentOffset + span;\n }\n /** @override */\n decode(b, offset2 = 0) {\n const dest = this.makeDestinationObject();\n if (this !== this.union.getVariant(b, offset2)) {\n throw new Error(\"variant mismatch\");\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset2 + contentOffset);\n } else if (this.property) {\n dest[this.property] = true;\n } else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout && !Object.prototype.hasOwnProperty.call(src, this.property)) {\n throw new TypeError(\"variant lacks property \" + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset2);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset2 + contentOffset);\n span += this.layout.getSpan(b, offset2 + contentOffset);\n if (0 <= this.union.span && span > this.union.span) {\n throw new Error(\"encoded variant overruns containing union\");\n }\n }\n return span;\n }\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n return void 0;\n }\n };\n exports3.VariantLayout = VariantLayout;\n function fixBitwiseResult(v) {\n if (0 > v) {\n v += 4294967296;\n }\n return v;\n }\n var BitStructure = class extends Layout {\n constructor(word, msb, property) {\n if (!(word instanceof UInt || word instanceof UIntBE)) {\n throw new TypeError(\"word must be a UInt or UIntBE layout\");\n }\n if (\"string\" === typeof msb && void 0 === property) {\n property = msb;\n msb = false;\n }\n if (4 < word.span) {\n throw new RangeError(\"word cannot exceed 32 bits\");\n }\n super(word.span, property);\n this.word = word;\n this.msb = !!msb;\n this.fields = [];\n let value = 0;\n this._packedSetValue = function(v) {\n value = fixBitwiseResult(v);\n return this;\n };\n this._packedGetValue = function() {\n return value;\n };\n }\n /** @override */\n decode(b, offset2 = 0) {\n const dest = this.makeDestinationObject();\n const value = this.word.decode(b, offset2);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (void 0 !== fd.property) {\n dest[fd.property] = fd.decode(b);\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b, offset2 = 0) {\n const value = this.word.decode(b, offset2);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (void 0 !== fd.property) {\n const fv = src[fd.property];\n if (void 0 !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b, offset2);\n }\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n // `Boolean` conflicts with the native primitive type\n // eslint-disable-next-line @typescript-eslint/ban-types\n addBoolean(property) {\n const bf = new Boolean2(this, property);\n this.fields.push(bf);\n return bf;\n }\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if (\"string\" !== typeof property) {\n throw new TypeError(\"property must be string\");\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return void 0;\n }\n };\n exports3.BitStructure = BitStructure;\n var BitField = class {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError(\"container must be a BitStructure\");\n }\n if (!Number.isInteger(bits) || 0 >= bits) {\n throw new TypeError(\"bits must be positive integer\");\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if (bits + usedBits > totalBits) {\n throw new Error(\"bits too long for span remainder (\" + (totalBits - usedBits) + \" of \" + totalBits + \" remain)\");\n }\n this.container = container;\n this.bits = bits;\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) {\n this.valueMask = 4294967295;\n }\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n this.property = property;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode(b, offset2) {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if (\"number\" !== typeof value || !Number.isInteger(value) || value !== fixBitwiseResult(value & this.valueMask)) {\n throw new TypeError(nameWithProperty(\"BitField.encode\", this) + \" value must be integer not exceeding \" + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask) | wordValue);\n }\n };\n exports3.BitField = BitField;\n var Boolean2 = class extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b, offset2) {\n return !!super.decode(b, offset2);\n }\n /** @override */\n encode(value) {\n if (\"boolean\" === typeof value) {\n value = +value;\n }\n super.encode(value);\n }\n };\n exports3.Boolean = Boolean2;\n var Blob = class extends Layout {\n constructor(length, property) {\n if (!(length instanceof ExternalLayout && length.isCount() || Number.isInteger(length) && 0 <= length)) {\n throw new TypeError(\"length must be positive integer or an unsigned integer ExternalLayout\");\n }\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n this.length = length;\n }\n /** @override */\n getSpan(b, offset2) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset2);\n }\n return span;\n }\n /** @override */\n decode(b, offset2 = 0) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset2);\n }\n return uint8ArrayToBuffer(b).slice(offset2, offset2 + span);\n }\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset2) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(src instanceof Uint8Array && span === src.length)) {\n throw new TypeError(nameWithProperty(\"Blob.encode\", this) + \" requires (length \" + span + \") Uint8Array as src\");\n }\n if (offset2 + span > b.length) {\n throw new RangeError(\"encoding overruns Uint8Array\");\n }\n const srcBuffer = uint8ArrayToBuffer(src);\n uint8ArrayToBuffer(b).write(srcBuffer.toString(\"hex\"), offset2, span, \"hex\");\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset2);\n }\n return span;\n }\n };\n exports3.Blob = Blob;\n var CString = class extends Layout {\n constructor(property) {\n super(-1, property);\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n checkUint8Array(b);\n let idx = offset2;\n while (idx < b.length && 0 !== b[idx]) {\n idx += 1;\n }\n return 1 + idx - offset2;\n }\n /** @override */\n decode(b, offset2 = 0) {\n const span = this.getSpan(b, offset2);\n return uint8ArrayToBuffer(b).slice(offset2, offset2 + span - 1).toString(\"utf-8\");\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n if (\"string\" !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, \"utf8\");\n const span = srcb.length;\n if (offset2 + span > b.length) {\n throw new RangeError(\"encoding overruns Buffer\");\n }\n const buffer = uint8ArrayToBuffer(b);\n srcb.copy(buffer, offset2);\n buffer[offset2 + span] = 0;\n return span + 1;\n }\n };\n exports3.CString = CString;\n var UTF8 = class extends Layout {\n constructor(maxSpan, property) {\n if (\"string\" === typeof maxSpan && void 0 === property) {\n property = maxSpan;\n maxSpan = void 0;\n }\n if (void 0 === maxSpan) {\n maxSpan = -1;\n } else if (!Number.isInteger(maxSpan)) {\n throw new TypeError(\"maxSpan must be an integer\");\n }\n super(-1, property);\n this.maxSpan = maxSpan;\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n checkUint8Array(b);\n return b.length - offset2;\n }\n /** @override */\n decode(b, offset2 = 0) {\n const span = this.getSpan(b, offset2);\n if (0 <= this.maxSpan && this.maxSpan < span) {\n throw new RangeError(\"text length exceeds maxSpan\");\n }\n return uint8ArrayToBuffer(b).slice(offset2, offset2 + span).toString(\"utf-8\");\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n if (\"string\" !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, \"utf8\");\n const span = srcb.length;\n if (0 <= this.maxSpan && this.maxSpan < span) {\n throw new RangeError(\"text length exceeds maxSpan\");\n }\n if (offset2 + span > b.length) {\n throw new RangeError(\"encoding overruns Buffer\");\n }\n srcb.copy(uint8ArrayToBuffer(b), offset2);\n return span;\n }\n };\n exports3.UTF8 = UTF8;\n var Constant = class extends Layout {\n constructor(value, property) {\n super(0, property);\n this.value = value;\n }\n /** @override */\n decode(b, offset2) {\n return this.value;\n }\n /** @override */\n encode(src, b, offset2) {\n return 0;\n }\n };\n exports3.Constant = Constant;\n exports3.greedy = (elementSpan, property) => new GreedyCount(elementSpan, property);\n exports3.offset = (layout, offset2, property) => new OffsetLayout(layout, offset2, property);\n exports3.u8 = (property) => new UInt(1, property);\n exports3.u16 = (property) => new UInt(2, property);\n exports3.u24 = (property) => new UInt(3, property);\n exports3.u32 = (property) => new UInt(4, property);\n exports3.u40 = (property) => new UInt(5, property);\n exports3.u48 = (property) => new UInt(6, property);\n exports3.nu64 = (property) => new NearUInt64(property);\n exports3.u16be = (property) => new UIntBE(2, property);\n exports3.u24be = (property) => new UIntBE(3, property);\n exports3.u32be = (property) => new UIntBE(4, property);\n exports3.u40be = (property) => new UIntBE(5, property);\n exports3.u48be = (property) => new UIntBE(6, property);\n exports3.nu64be = (property) => new NearUInt64BE(property);\n exports3.s8 = (property) => new Int(1, property);\n exports3.s16 = (property) => new Int(2, property);\n exports3.s24 = (property) => new Int(3, property);\n exports3.s32 = (property) => new Int(4, property);\n exports3.s40 = (property) => new Int(5, property);\n exports3.s48 = (property) => new Int(6, property);\n exports3.ns64 = (property) => new NearInt64(property);\n exports3.s16be = (property) => new IntBE(2, property);\n exports3.s24be = (property) => new IntBE(3, property);\n exports3.s32be = (property) => new IntBE(4, property);\n exports3.s40be = (property) => new IntBE(5, property);\n exports3.s48be = (property) => new IntBE(6, property);\n exports3.ns64be = (property) => new NearInt64BE(property);\n exports3.f32 = (property) => new Float(property);\n exports3.f32be = (property) => new FloatBE(property);\n exports3.f64 = (property) => new Double(property);\n exports3.f64be = (property) => new DoubleBE(property);\n exports3.struct = (fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes);\n exports3.bits = (word, msb, property) => new BitStructure(word, msb, property);\n exports3.seq = (elementLayout, count, property) => new Sequence(elementLayout, count, property);\n exports3.union = (discr, defaultLayout, property) => new Union(discr, defaultLayout, property);\n exports3.unionLayoutDiscriminator = (layout, property) => new UnionLayoutDiscriminator(layout, property);\n exports3.blob = (length, property) => new Blob(length, property);\n exports3.cstr = (property) => new CString(property);\n exports3.utf8 = (maxSpan, property) => new UTF8(maxSpan, property);\n exports3.constant = (value, property) => new Constant(value, property);\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js\n function rng() {\n if (!getRandomValues) {\n getRandomValues = typeof crypto !== \"undefined\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== \"undefined\" && typeof msCrypto.getRandomValues === \"function\" && msCrypto.getRandomValues.bind(msCrypto);\n if (!getRandomValues) {\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n }\n }\n return getRandomValues(rnds8);\n }\n var getRandomValues, rnds8;\n var init_rng = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n rnds8 = new Uint8Array(16);\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js\n var regex_default;\n var init_regex = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js\n function validate2(uuid) {\n return typeof uuid === \"string\" && regex_default.test(uuid);\n }\n var validate_default;\n var init_validate = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n validate_default = validate2;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js\n function stringify(arr) {\n var offset2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;\n var uuid = (byteToHex[arr[offset2 + 0]] + byteToHex[arr[offset2 + 1]] + byteToHex[arr[offset2 + 2]] + byteToHex[arr[offset2 + 3]] + \"-\" + byteToHex[arr[offset2 + 4]] + byteToHex[arr[offset2 + 5]] + \"-\" + byteToHex[arr[offset2 + 6]] + byteToHex[arr[offset2 + 7]] + \"-\" + byteToHex[arr[offset2 + 8]] + byteToHex[arr[offset2 + 9]] + \"-\" + byteToHex[arr[offset2 + 10]] + byteToHex[arr[offset2 + 11]] + byteToHex[arr[offset2 + 12]] + byteToHex[arr[offset2 + 13]] + byteToHex[arr[offset2 + 14]] + byteToHex[arr[offset2 + 15]]).toLowerCase();\n if (!validate_default(uuid)) {\n throw TypeError(\"Stringified UUID is invalid\");\n }\n return uuid;\n }\n var byteToHex, i, stringify_default;\n var init_stringify = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_validate();\n byteToHex = [];\n for (i = 0; i < 256; ++i) {\n byteToHex.push((i + 256).toString(16).substr(1));\n }\n stringify_default = stringify;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js\n function v1(options, buf, offset2) {\n var i = buf && offset2 || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq;\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n if (node == null) {\n node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n if (clockseq == null) {\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383;\n }\n }\n var msecs = options.msecs !== void 0 ? options.msecs : Date.now();\n var nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1;\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;\n if (dt < 0 && options.clockseq === void 0) {\n clockseq = clockseq + 1 & 16383;\n }\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) {\n nsecs = 0;\n }\n if (nsecs >= 1e4) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n msecs += 122192928e5;\n var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;\n b[i++] = tl >>> 24 & 255;\n b[i++] = tl >>> 16 & 255;\n b[i++] = tl >>> 8 & 255;\n b[i++] = tl & 255;\n var tmh = msecs / 4294967296 * 1e4 & 268435455;\n b[i++] = tmh >>> 8 & 255;\n b[i++] = tmh & 255;\n b[i++] = tmh >>> 24 & 15 | 16;\n b[i++] = tmh >>> 16 & 255;\n b[i++] = clockseq >>> 8 | 128;\n b[i++] = clockseq & 255;\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n return buf || stringify_default(b);\n }\n var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default;\n var init_v1 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_rng();\n init_stringify();\n _lastMSecs = 0;\n _lastNSecs = 0;\n v1_default = v1;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js\n function parse(uuid) {\n if (!validate_default(uuid)) {\n throw TypeError(\"Invalid UUID\");\n }\n var v;\n var arr = new Uint8Array(16);\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 255;\n arr[2] = v >>> 8 & 255;\n arr[3] = v & 255;\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 255;\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 255;\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 255;\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255;\n arr[11] = v / 4294967296 & 255;\n arr[12] = v >>> 24 & 255;\n arr[13] = v >>> 16 & 255;\n arr[14] = v >>> 8 & 255;\n arr[15] = v & 255;\n return arr;\n }\n var parse_default;\n var init_parse = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_validate();\n parse_default = parse;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js\n function stringToBytes(str) {\n str = unescape(encodeURIComponent(str));\n var bytes = [];\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n return bytes;\n }\n function v35_default(name, version2, hashfunc) {\n function generateUUID(value, namespace, buf, offset2) {\n if (typeof value === \"string\") {\n value = stringToBytes(value);\n }\n if (typeof namespace === \"string\") {\n namespace = parse_default(namespace);\n }\n if (namespace.length !== 16) {\n throw TypeError(\"Namespace must be array-like (16 iterable integer values, 0-255)\");\n }\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 15 | version2;\n bytes[8] = bytes[8] & 63 | 128;\n if (buf) {\n offset2 = offset2 || 0;\n for (var i = 0; i < 16; ++i) {\n buf[offset2 + i] = bytes[i];\n }\n return buf;\n }\n return stringify_default(bytes);\n }\n try {\n generateUUID.name = name;\n } catch (err) {\n }\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n }\n var DNS, URL;\n var init_v35 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n init_parse();\n DNS = \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\";\n URL = \"6ba7b811-9dad-11d1-80b4-00c04fd430c8\";\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js\n function md5(bytes) {\n if (typeof bytes === \"string\") {\n var msg = unescape(encodeURIComponent(bytes));\n bytes = new Uint8Array(msg.length);\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n }\n function md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = \"0123456789abcdef\";\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 255;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 15) + hexTab.charAt(x & 15), 16);\n output.push(hex);\n }\n return output;\n }\n function getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n }\n function wordsToMd5(x, len) {\n x[len >> 5] |= 128 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n return [a, b, c, d];\n }\n function bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 255) << i % 32;\n }\n return output;\n }\n function safeAdd(x, y) {\n var lsw = (x & 65535) + (y & 65535);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 65535;\n }\n function bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n }\n function md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n }\n function md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n }\n function md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n }\n function md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n }\n function md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n }\n var md5_default;\n var init_md5 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n md5_default = md5;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js\n var v3, v3_default;\n var init_v3 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v35();\n init_md5();\n v3 = v35_default(\"v3\", 48, md5_default);\n v3_default = v3;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js\n function v4(options, buf, offset2) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)();\n rnds[6] = rnds[6] & 15 | 64;\n rnds[8] = rnds[8] & 63 | 128;\n if (buf) {\n offset2 = offset2 || 0;\n for (var i = 0; i < 16; ++i) {\n buf[offset2 + i] = rnds[i];\n }\n return buf;\n }\n return stringify_default(rnds);\n }\n var v4_default;\n var init_v4 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_rng();\n init_stringify();\n v4_default = v4;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js\n function f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n case 1:\n return x ^ y ^ z;\n case 2:\n return x & y ^ x & z ^ y & z;\n case 3:\n return x ^ y ^ z;\n }\n }\n function ROTL(x, n) {\n return x << n | x >>> 32 - n;\n }\n function sha1(bytes) {\n var K = [1518500249, 1859775393, 2400959708, 3395469782];\n var H = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];\n if (typeof bytes === \"string\") {\n var msg = unescape(encodeURIComponent(bytes));\n bytes = [];\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n bytes = Array.prototype.slice.call(bytes);\n }\n bytes.push(128);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n M[_i] = arr;\n }\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 4294967295;\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n return [H[0] >> 24 & 255, H[0] >> 16 & 255, H[0] >> 8 & 255, H[0] & 255, H[1] >> 24 & 255, H[1] >> 16 & 255, H[1] >> 8 & 255, H[1] & 255, H[2] >> 24 & 255, H[2] >> 16 & 255, H[2] >> 8 & 255, H[2] & 255, H[3] >> 24 & 255, H[3] >> 16 & 255, H[3] >> 8 & 255, H[3] & 255, H[4] >> 24 & 255, H[4] >> 16 & 255, H[4] >> 8 & 255, H[4] & 255];\n }\n var sha1_default;\n var init_sha1 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n sha1_default = sha1;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js\n var v5, v5_default;\n var init_v5 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v35();\n init_sha1();\n v5 = v35_default(\"v5\", 80, sha1_default);\n v5_default = v5;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js\n var nil_default;\n var init_nil = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n nil_default = \"00000000-0000-0000-0000-000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js\n function version(uuid) {\n if (!validate_default(uuid)) {\n throw TypeError(\"Invalid UUID\");\n }\n return parseInt(uuid.substr(14, 1), 16);\n }\n var version_default;\n var init_version = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_validate();\n version_default = version;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/index.js\n var esm_browser_exports = {};\n __export(esm_browser_exports, {\n NIL: () => nil_default,\n parse: () => parse_default,\n stringify: () => stringify_default,\n v1: () => v1_default,\n v3: () => v3_default,\n v4: () => v4_default,\n v5: () => v5_default,\n validate: () => validate_default,\n version: () => version_default\n });\n var init_esm_browser = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v1();\n init_v3();\n init_v4();\n init_v5();\n init_nil();\n init_version();\n init_validate();\n init_stringify();\n init_parse();\n }\n });\n\n // ../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/generateRequest.js\n var require_generateRequest = __commonJS({\n \"../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/generateRequest.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var uuid = (init_esm_browser(), __toCommonJS(esm_browser_exports)).v4;\n var generateRequest = function(method, params, id, options) {\n if (typeof method !== \"string\") {\n throw new TypeError(method + \" must be a string\");\n }\n options = options || {};\n const version2 = typeof options.version === \"number\" ? options.version : 2;\n if (version2 !== 1 && version2 !== 2) {\n throw new TypeError(version2 + \" must be 1 or 2\");\n }\n const request = {\n method\n };\n if (version2 === 2) {\n request.jsonrpc = \"2.0\";\n }\n if (params) {\n if (typeof params !== \"object\" && !Array.isArray(params)) {\n throw new TypeError(params + \" must be an object, array or omitted\");\n }\n request.params = params;\n }\n if (typeof id === \"undefined\") {\n const generator = typeof options.generator === \"function\" ? options.generator : function() {\n return uuid();\n };\n request.id = generator(request, options);\n } else if (version2 === 2 && id === null) {\n if (options.notificationIdNull) {\n request.id = null;\n }\n } else {\n request.id = id;\n }\n return request;\n };\n module.exports = generateRequest;\n }\n });\n\n // ../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/client/browser/index.js\n var require_browser = __commonJS({\n \"../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/client/browser/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var uuid = (init_esm_browser(), __toCommonJS(esm_browser_exports)).v4;\n var generateRequest = require_generateRequest();\n var ClientBrowser = function(callServer, options) {\n if (!(this instanceof ClientBrowser)) {\n return new ClientBrowser(callServer, options);\n }\n if (!options) {\n options = {};\n }\n this.options = {\n reviver: typeof options.reviver !== \"undefined\" ? options.reviver : null,\n replacer: typeof options.replacer !== \"undefined\" ? options.replacer : null,\n generator: typeof options.generator !== \"undefined\" ? options.generator : function() {\n return uuid();\n },\n version: typeof options.version !== \"undefined\" ? options.version : 2,\n notificationIdNull: typeof options.notificationIdNull === \"boolean\" ? options.notificationIdNull : false\n };\n this.callServer = callServer;\n };\n module.exports = ClientBrowser;\n ClientBrowser.prototype.request = function(method, params, id, callback) {\n const self = this;\n let request = null;\n const isBatch = Array.isArray(method) && typeof params === \"function\";\n if (this.options.version === 1 && isBatch) {\n throw new TypeError(\"JSON-RPC 1.0 does not support batching\");\n }\n const isRaw = !isBatch && method && typeof method === \"object\" && typeof params === \"function\";\n if (isBatch || isRaw) {\n callback = params;\n request = method;\n } else {\n if (typeof id === \"function\") {\n callback = id;\n id = void 0;\n }\n const hasCallback = typeof callback === \"function\";\n try {\n request = generateRequest(method, params, id, {\n generator: this.options.generator,\n version: this.options.version,\n notificationIdNull: this.options.notificationIdNull\n });\n } catch (err) {\n if (hasCallback) {\n return callback(err);\n }\n throw err;\n }\n if (!hasCallback) {\n return request;\n }\n }\n let message;\n try {\n message = JSON.stringify(request, this.options.replacer);\n } catch (err) {\n return callback(err);\n }\n this.callServer(message, function(err, response) {\n self._parseResponse(err, response, callback);\n });\n return request;\n };\n ClientBrowser.prototype._parseResponse = function(err, responseText, callback) {\n if (err) {\n callback(err);\n return;\n }\n if (!responseText) {\n return callback();\n }\n let response;\n try {\n response = JSON.parse(responseText, this.options.reviver);\n } catch (err2) {\n return callback(err2);\n }\n if (callback.length === 3) {\n if (Array.isArray(response)) {\n const isError = function(res) {\n return typeof res.error !== \"undefined\";\n };\n const isNotError = function(res) {\n return !isError(res);\n };\n return callback(null, response.filter(isError), response.filter(isNotError));\n } else {\n return callback(null, response.error, response.result);\n }\n }\n callback(null, response);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js\n var require_eventemitter3 = __commonJS({\n \"../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var has = Object.prototype.hasOwnProperty;\n var prefix = \"~\";\n function Events() {\n }\n if (Object.create) {\n Events.prototype = /* @__PURE__ */ Object.create(null);\n if (!new Events().__proto__)\n prefix = false;\n }\n function EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n }\n function addListener(emitter, event, fn, context, once) {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"The listener must be a function\");\n }\n var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event;\n if (!emitter._events[evt])\n emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn)\n emitter._events[evt].push(listener);\n else\n emitter._events[evt] = [emitter._events[evt], listener];\n return emitter;\n }\n function clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0)\n emitter._events = new Events();\n else\n delete emitter._events[evt];\n }\n function EventEmitter2() {\n this._events = new Events();\n this._eventsCount = 0;\n }\n EventEmitter2.prototype.eventNames = function eventNames() {\n var names = [], events, name;\n if (this._eventsCount === 0)\n return names;\n for (name in events = this._events) {\n if (has.call(events, name))\n names.push(prefix ? name.slice(1) : name);\n }\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n return names;\n };\n EventEmitter2.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event, handlers = this._events[evt];\n if (!handlers)\n return [];\n if (handlers.fn)\n return [handlers.fn];\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n return ee;\n };\n EventEmitter2.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event, listeners = this._events[evt];\n if (!listeners)\n return 0;\n if (listeners.fn)\n return 1;\n return listeners.length;\n };\n EventEmitter2.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n if (!this._events[evt])\n return false;\n var listeners = this._events[evt], len = arguments.length, args, i;\n if (listeners.fn) {\n if (listeners.once)\n this.removeListener(event, listeners.fn, void 0, true);\n switch (len) {\n case 1:\n return listeners.fn.call(listeners.context), true;\n case 2:\n return listeners.fn.call(listeners.context, a1), true;\n case 3:\n return listeners.fn.call(listeners.context, a1, a2), true;\n case 4:\n return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5:\n return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6:\n return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n for (i = 1, args = new Array(len - 1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length, j;\n for (i = 0; i < length; i++) {\n if (listeners[i].once)\n this.removeListener(event, listeners[i].fn, void 0, true);\n switch (len) {\n case 1:\n listeners[i].fn.call(listeners[i].context);\n break;\n case 2:\n listeners[i].fn.call(listeners[i].context, a1);\n break;\n case 3:\n listeners[i].fn.call(listeners[i].context, a1, a2);\n break;\n case 4:\n listeners[i].fn.call(listeners[i].context, a1, a2, a3);\n break;\n default:\n if (!args)\n for (j = 1, args = new Array(len - 1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n return true;\n };\n EventEmitter2.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n };\n EventEmitter2.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n };\n EventEmitter2.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n if (!this._events[evt])\n return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n var listeners = this._events[evt];\n if (listeners.fn) {\n if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) {\n events.push(listeners[i]);\n }\n }\n if (events.length)\n this._events[evt] = events.length === 1 ? events[0] : events;\n else\n clearEvent(this, evt);\n }\n return this;\n };\n EventEmitter2.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt])\n clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n return this;\n };\n EventEmitter2.prototype.off = EventEmitter2.prototype.removeListener;\n EventEmitter2.prototype.addListener = EventEmitter2.prototype.on;\n EventEmitter2.prefixed = prefix;\n EventEmitter2.EventEmitter = EventEmitter2;\n if (\"undefined\" !== typeof module) {\n module.exports = EventEmitter2;\n }\n }\n });\n\n // src/lib/lit-actions/self-executing-actions/common/batchGenerateEncryptedKeys.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/lit-actions/litActionHandler.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/lit-actions/abortError.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var AbortError = class extends Error {\n name = \"AbortError\";\n };\n\n // src/lib/lit-actions/litActionHandler.ts\n async function litActionHandler(actionFunc) {\n try {\n const litActionResult = await actionFunc();\n const response = typeof litActionResult === \"string\" ? litActionResult : JSON.stringify(litActionResult);\n Lit.Actions.setResponse({ response });\n } catch (err) {\n if (err instanceof AbortError) {\n return;\n }\n Lit.Actions.setResponse({ response: `Error: ${err.message}` });\n }\n }\n\n // src/lib/lit-actions/raw-action-functions/common/batchGenerateEncryptedKeys.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/lit-actions/internal/common/encryptPrivateKey.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/constants.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var LIT_PREFIX = \"lit_\";\n\n // src/lib/lit-actions/internal/common/encryptPrivateKey.ts\n async function encryptPrivateKey({\n evmContractConditions: evmContractConditions2,\n privateKey,\n publicKey: publicKey2\n }) {\n const { ciphertext, dataToEncryptHash } = await Lit.Actions.encrypt({\n accessControlConditions: evmContractConditions2,\n to_encrypt: new TextEncoder().encode(LIT_PREFIX + privateKey)\n });\n return {\n ciphertext,\n dataToEncryptHash,\n publicKey: publicKey2,\n evmContractConditions: evmContractConditions2\n };\n }\n\n // src/lib/lit-actions/internal/solana/generatePrivateKey.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n init_dirname();\n init_buffer2();\n init_process2();\n init_buffer();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/ed25519.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/crypto.js\n init_dirname();\n init_buffer2();\n init_process2();\n var crypto2 = typeof globalThis === \"object\" && \"crypto\" in globalThis ? globalThis.crypto : void 0;\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js\n function isBytes(a) {\n return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === \"Uint8Array\";\n }\n function anumber(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(\"positive integer expected, got \" + n);\n }\n function abytes(b, ...lengths) {\n if (!isBytes(b))\n throw new Error(\"Uint8Array expected\");\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(\"Uint8Array expected of length \" + lengths + \", got length=\" + b.length);\n }\n function ahash(h) {\n if (typeof h !== \"function\" || typeof h.create !== \"function\")\n throw new Error(\"Hash should be wrapped by utils.createHasher\");\n anumber(h.outputLen);\n anumber(h.blockLen);\n }\n function aexists(instance2, checkFinished = true) {\n if (instance2.destroyed)\n throw new Error(\"Hash instance has been destroyed\");\n if (checkFinished && instance2.finished)\n throw new Error(\"Hash#digest() has already been called\");\n }\n function aoutput(out, instance2) {\n abytes(out);\n const min = instance2.outputLen;\n if (out.length < min) {\n throw new Error(\"digestInto() expects output buffer of length at least \" + min);\n }\n }\n function u32(arr) {\n return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n }\n function clean(...arrays) {\n for (let i = 0; i < arrays.length; i++) {\n arrays[i].fill(0);\n }\n }\n function createView(arr) {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n }\n function rotr(word, shift) {\n return word << 32 - shift | word >>> shift;\n }\n var isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();\n function byteSwap(word) {\n return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;\n }\n function byteSwap32(arr) {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = byteSwap(arr[i]);\n }\n return arr;\n }\n var swap32IfBE = isLE ? (u) => u : byteSwap32;\n var hasHexBuiltin = /* @__PURE__ */ (() => (\n // @ts-ignore\n typeof Uint8Array.from([]).toHex === \"function\" && typeof Uint8Array.fromHex === \"function\"\n ))();\n var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, \"0\"));\n function bytesToHex(bytes) {\n abytes(bytes);\n if (hasHexBuiltin)\n return bytes.toHex();\n let hex = \"\";\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n }\n var asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\n function asciiToBase16(ch) {\n if (ch >= asciis._0 && ch <= asciis._9)\n return ch - asciis._0;\n if (ch >= asciis.A && ch <= asciis.F)\n return ch - (asciis.A - 10);\n if (ch >= asciis.a && ch <= asciis.f)\n return ch - (asciis.a - 10);\n return;\n }\n function hexToBytes(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n if (hasHexBuiltin)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error(\"hex string expected, got unpadded hex of length \" + hl);\n const array2 = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === void 0 || n2 === void 0) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array2[ai] = n1 * 16 + n2;\n }\n return array2;\n }\n function utf8ToBytes(str) {\n if (typeof str !== \"string\")\n throw new Error(\"string expected\");\n return new Uint8Array(new TextEncoder().encode(str));\n }\n function toBytes(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes(data);\n abytes(data);\n return data;\n }\n function concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n abytes(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n }\n var Hash = class {\n };\n function createHasher(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n }\n function randomBytes(bytesLength = 32) {\n if (crypto2 && typeof crypto2.getRandomValues === \"function\") {\n return crypto2.getRandomValues(new Uint8Array(bytesLength));\n }\n if (crypto2 && typeof crypto2.randomBytes === \"function\") {\n return Uint8Array.from(crypto2.randomBytes(bytesLength));\n }\n throw new Error(\"crypto.getRandomValues must be defined\");\n }\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js\n function setBigUint64(view, byteOffset, value, isLE2) {\n if (typeof view.setBigUint64 === \"function\")\n return view.setBigUint64(byteOffset, value, isLE2);\n const _32n2 = BigInt(32);\n const _u32_max = BigInt(4294967295);\n const wh = Number(value >> _32n2 & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE2 ? 4 : 0;\n const l = isLE2 ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE2);\n view.setUint32(byteOffset + l, wl, isLE2);\n }\n function Chi(a, b, c) {\n return a & b ^ ~a & c;\n }\n function Maj(a, b, c) {\n return a & b ^ a & c ^ b & c;\n }\n var HashMD = class extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE2) {\n super();\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE2;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n aexists(this);\n data = toBytes(data);\n abytes(data);\n const { view, buffer, blockLen } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n aexists(this);\n aoutput(out, this);\n this.finished = true;\n const { buffer, view, blockLen, isLE: isLE2 } = this;\n let { pos } = this;\n buffer[pos++] = 128;\n clean(this.buffer.subarray(pos));\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE2);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n if (len % 4)\n throw new Error(\"_sha2: outputLen should be aligned to 32bit\");\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error(\"_sha2: outputLen bigger than state\");\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE2);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.destroyed = destroyed;\n to.finished = finished;\n to.length = length;\n to.pos = pos;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n };\n var SHA256_IV = /* @__PURE__ */ Uint32Array.from([\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ]);\n var SHA512_IV = /* @__PURE__ */ Uint32Array.from([\n 1779033703,\n 4089235720,\n 3144134277,\n 2227873595,\n 1013904242,\n 4271175723,\n 2773480762,\n 1595750129,\n 1359893119,\n 2917565137,\n 2600822924,\n 725511199,\n 528734635,\n 4215389547,\n 1541459225,\n 327033209\n ]);\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js\n init_dirname();\n init_buffer2();\n init_process2();\n var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\n var _32n = /* @__PURE__ */ BigInt(32);\n function fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };\n return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n }\n function split(lst, le = false) {\n const len = lst.length;\n let Ah = new Uint32Array(len);\n let Al = new Uint32Array(len);\n for (let i = 0; i < len; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n }\n var shrSH = (h, _l, s) => h >>> s;\n var shrSL = (h, l, s) => h << 32 - s | l >>> s;\n var rotrSH = (h, l, s) => h >>> s | l << 32 - s;\n var rotrSL = (h, l, s) => h << 32 - s | l >>> s;\n var rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;\n var rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;\n var rotlSH = (h, l, s) => h << s | l >>> 32 - s;\n var rotlSL = (h, l, s) => l << s | h >>> 32 - s;\n var rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;\n var rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;\n function add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: Ah + Bh + (l / 2 ** 32 | 0) | 0, l: l | 0 };\n }\n var add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\n var add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;\n var add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\n var add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;\n var add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\n var add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js\n var SHA256_K = /* @__PURE__ */ Uint32Array.from([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n var SHA256_W = /* @__PURE__ */ new Uint32Array(64);\n var SHA256 = class extends HashMD {\n constructor(outputLen = 32) {\n super(64, outputLen, 8, false);\n this.A = SHA256_IV[0] | 0;\n this.B = SHA256_IV[1] | 0;\n this.C = SHA256_IV[2] | 0;\n this.D = SHA256_IV[3] | 0;\n this.E = SHA256_IV[4] | 0;\n this.F = SHA256_IV[5] | 0;\n this.G = SHA256_IV[6] | 0;\n this.H = SHA256_IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset2) {\n for (let i = 0; i < 16; i++, offset2 += 4)\n SHA256_W[i] = view.getUint32(offset2, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ W15 >>> 3;\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ W2 >>> 10;\n SHA256_W[i] = s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16] | 0;\n }\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i] | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = sigma0 + Maj(A, B, C) | 0;\n H = G;\n G = F;\n F = E;\n E = D + T1 | 0;\n D = C;\n C = B;\n B = A;\n A = T1 + T2 | 0;\n }\n A = A + this.A | 0;\n B = B + this.B | 0;\n C = C + this.C | 0;\n D = D + this.D | 0;\n E = E + this.E | 0;\n F = F + this.F | 0;\n G = G + this.G | 0;\n H = H + this.H | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n clean(SHA256_W);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n clean(this.buffer);\n }\n };\n var K512 = /* @__PURE__ */ (() => split([\n \"0x428a2f98d728ae22\",\n \"0x7137449123ef65cd\",\n \"0xb5c0fbcfec4d3b2f\",\n \"0xe9b5dba58189dbbc\",\n \"0x3956c25bf348b538\",\n \"0x59f111f1b605d019\",\n \"0x923f82a4af194f9b\",\n \"0xab1c5ed5da6d8118\",\n \"0xd807aa98a3030242\",\n \"0x12835b0145706fbe\",\n \"0x243185be4ee4b28c\",\n \"0x550c7dc3d5ffb4e2\",\n \"0x72be5d74f27b896f\",\n \"0x80deb1fe3b1696b1\",\n \"0x9bdc06a725c71235\",\n \"0xc19bf174cf692694\",\n \"0xe49b69c19ef14ad2\",\n \"0xefbe4786384f25e3\",\n \"0x0fc19dc68b8cd5b5\",\n \"0x240ca1cc77ac9c65\",\n \"0x2de92c6f592b0275\",\n \"0x4a7484aa6ea6e483\",\n \"0x5cb0a9dcbd41fbd4\",\n \"0x76f988da831153b5\",\n \"0x983e5152ee66dfab\",\n \"0xa831c66d2db43210\",\n \"0xb00327c898fb213f\",\n \"0xbf597fc7beef0ee4\",\n \"0xc6e00bf33da88fc2\",\n \"0xd5a79147930aa725\",\n \"0x06ca6351e003826f\",\n \"0x142929670a0e6e70\",\n \"0x27b70a8546d22ffc\",\n \"0x2e1b21385c26c926\",\n \"0x4d2c6dfc5ac42aed\",\n \"0x53380d139d95b3df\",\n \"0x650a73548baf63de\",\n \"0x766a0abb3c77b2a8\",\n \"0x81c2c92e47edaee6\",\n \"0x92722c851482353b\",\n \"0xa2bfe8a14cf10364\",\n \"0xa81a664bbc423001\",\n \"0xc24b8b70d0f89791\",\n \"0xc76c51a30654be30\",\n \"0xd192e819d6ef5218\",\n \"0xd69906245565a910\",\n \"0xf40e35855771202a\",\n \"0x106aa07032bbd1b8\",\n \"0x19a4c116b8d2d0c8\",\n \"0x1e376c085141ab53\",\n \"0x2748774cdf8eeb99\",\n \"0x34b0bcb5e19b48a8\",\n \"0x391c0cb3c5c95a63\",\n \"0x4ed8aa4ae3418acb\",\n \"0x5b9cca4f7763e373\",\n \"0x682e6ff3d6b2b8a3\",\n \"0x748f82ee5defb2fc\",\n \"0x78a5636f43172f60\",\n \"0x84c87814a1f0ab72\",\n \"0x8cc702081a6439ec\",\n \"0x90befffa23631e28\",\n \"0xa4506cebde82bde9\",\n \"0xbef9a3f7b2c67915\",\n \"0xc67178f2e372532b\",\n \"0xca273eceea26619c\",\n \"0xd186b8c721c0c207\",\n \"0xeada7dd6cde0eb1e\",\n \"0xf57d4f7fee6ed178\",\n \"0x06f067aa72176fba\",\n \"0x0a637dc5a2c898a6\",\n \"0x113f9804bef90dae\",\n \"0x1b710b35131c471b\",\n \"0x28db77f523047d84\",\n \"0x32caab7b40c72493\",\n \"0x3c9ebe0a15c9bebc\",\n \"0x431d67c49c100d4c\",\n \"0x4cc5d4becb3e42b6\",\n \"0x597f299cfc657e2a\",\n \"0x5fcb6fab3ad6faec\",\n \"0x6c44198c4a475817\"\n ].map((n) => BigInt(n))))();\n var SHA512_Kh = /* @__PURE__ */ (() => K512[0])();\n var SHA512_Kl = /* @__PURE__ */ (() => K512[1])();\n var SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);\n var SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);\n var SHA512 = class extends HashMD {\n constructor(outputLen = 64) {\n super(128, outputLen, 16, false);\n this.Ah = SHA512_IV[0] | 0;\n this.Al = SHA512_IV[1] | 0;\n this.Bh = SHA512_IV[2] | 0;\n this.Bl = SHA512_IV[3] | 0;\n this.Ch = SHA512_IV[4] | 0;\n this.Cl = SHA512_IV[5] | 0;\n this.Dh = SHA512_IV[6] | 0;\n this.Dl = SHA512_IV[7] | 0;\n this.Eh = SHA512_IV[8] | 0;\n this.El = SHA512_IV[9] | 0;\n this.Fh = SHA512_IV[10] | 0;\n this.Fl = SHA512_IV[11] | 0;\n this.Gh = SHA512_IV[12] | 0;\n this.Gl = SHA512_IV[13] | 0;\n this.Hh = SHA512_IV[14] | 0;\n this.Hl = SHA512_IV[15] | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset2) {\n for (let i = 0; i < 16; i++, offset2 += 4) {\n SHA512_W_H[i] = view.getUint32(offset2);\n SHA512_W_L[i] = view.getUint32(offset2 += 4);\n }\n for (let i = 16; i < 80; i++) {\n const W15h = SHA512_W_H[i - 15] | 0;\n const W15l = SHA512_W_L[i - 15] | 0;\n const s0h = rotrSH(W15h, W15l, 1) ^ rotrSH(W15h, W15l, 8) ^ shrSH(W15h, W15l, 7);\n const s0l = rotrSL(W15h, W15l, 1) ^ rotrSL(W15h, W15l, 8) ^ shrSL(W15h, W15l, 7);\n const W2h = SHA512_W_H[i - 2] | 0;\n const W2l = SHA512_W_L[i - 2] | 0;\n const s1h = rotrSH(W2h, W2l, 19) ^ rotrBH(W2h, W2l, 61) ^ shrSH(W2h, W2l, 6);\n const s1l = rotrSL(W2h, W2l, 19) ^ rotrBL(W2h, W2l, 61) ^ shrSL(W2h, W2l, 6);\n const SUMl = add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);\n const SUMh = add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);\n SHA512_W_H[i] = SUMh | 0;\n SHA512_W_L[i] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n for (let i = 0; i < 80; i++) {\n const sigma1h = rotrSH(Eh, El, 14) ^ rotrSH(Eh, El, 18) ^ rotrBH(Eh, El, 41);\n const sigma1l = rotrSL(Eh, El, 14) ^ rotrSL(Eh, El, 18) ^ rotrBL(Eh, El, 41);\n const CHIh = Eh & Fh ^ ~Eh & Gh;\n const CHIl = El & Fl ^ ~El & Gl;\n const T1ll = add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);\n const T1h = add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);\n const T1l = T1ll | 0;\n const sigma0h = rotrSH(Ah, Al, 28) ^ rotrBH(Ah, Al, 34) ^ rotrBH(Ah, Al, 39);\n const sigma0l = rotrSL(Ah, Al, 28) ^ rotrBL(Ah, Al, 34) ^ rotrBL(Ah, Al, 39);\n const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;\n const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = add3L(T1l, sigma0l, MAJl);\n Ah = add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n ({ h: Ah, l: Al } = add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n clean(SHA512_W_H, SHA512_W_L);\n }\n destroy() {\n clean(this.buffer);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n };\n var sha256 = /* @__PURE__ */ createHasher(() => new SHA256());\n var sha512 = /* @__PURE__ */ createHasher(() => new SHA512());\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/curve.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/utils.js\n init_dirname();\n init_buffer2();\n init_process2();\n var _0n = /* @__PURE__ */ BigInt(0);\n var _1n = /* @__PURE__ */ BigInt(1);\n function _abool2(value, title = \"\") {\n if (typeof value !== \"boolean\") {\n const prefix = title && `\"${title}\"`;\n throw new Error(prefix + \"expected boolean, got type=\" + typeof value);\n }\n return value;\n }\n function _abytes2(value, length, title = \"\") {\n const bytes = isBytes(value);\n const len = value?.length;\n const needsLen = length !== void 0;\n if (!bytes || needsLen && len !== length) {\n const prefix = title && `\"${title}\" `;\n const ofLen = needsLen ? ` of length ${length}` : \"\";\n const got = bytes ? `length=${len}` : `type=${typeof value}`;\n throw new Error(prefix + \"expected Uint8Array\" + ofLen + \", got \" + got);\n }\n return value;\n }\n function numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? \"0\" + hex : hex;\n }\n function hexToNumber(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n return hex === \"\" ? _0n : BigInt(\"0x\" + hex);\n }\n function bytesToNumberBE(bytes) {\n return hexToNumber(bytesToHex(bytes));\n }\n function bytesToNumberLE(bytes) {\n abytes(bytes);\n return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));\n }\n function numberToBytesBE(n, len) {\n return hexToBytes(n.toString(16).padStart(len * 2, \"0\"));\n }\n function numberToBytesLE(n, len) {\n return numberToBytesBE(n, len).reverse();\n }\n function ensureBytes(title, hex, expectedLength) {\n let res;\n if (typeof hex === \"string\") {\n try {\n res = hexToBytes(hex);\n } catch (e) {\n throw new Error(title + \" must be hex string or Uint8Array, cause: \" + e);\n }\n } else if (isBytes(hex)) {\n res = Uint8Array.from(hex);\n } else {\n throw new Error(title + \" must be hex string or Uint8Array\");\n }\n const len = res.length;\n if (typeof expectedLength === \"number\" && len !== expectedLength)\n throw new Error(title + \" of length \" + expectedLength + \" expected, got \" + len);\n return res;\n }\n function equalBytes(a, b) {\n if (a.length !== b.length)\n return false;\n let diff = 0;\n for (let i = 0; i < a.length; i++)\n diff |= a[i] ^ b[i];\n return diff === 0;\n }\n function copyBytes(bytes) {\n return Uint8Array.from(bytes);\n }\n var isPosBig = (n) => typeof n === \"bigint\" && _0n <= n;\n function inRange(n, min, max) {\n return isPosBig(n) && isPosBig(min) && isPosBig(max) && min <= n && n < max;\n }\n function aInRange(title, n, min, max) {\n if (!inRange(n, min, max))\n throw new Error(\"expected valid \" + title + \": \" + min + \" <= n < \" + max + \", got \" + n);\n }\n function bitLen(n) {\n let len;\n for (len = 0; n > _0n; n >>= _1n, len += 1)\n ;\n return len;\n }\n var bitMask = (n) => (_1n << BigInt(n)) - _1n;\n function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== \"number\" || hashLen < 2)\n throw new Error(\"hashLen must be a number\");\n if (typeof qByteLen !== \"number\" || qByteLen < 2)\n throw new Error(\"qByteLen must be a number\");\n if (typeof hmacFn !== \"function\")\n throw new Error(\"hmacFn must be a function\");\n const u8n = (len) => new Uint8Array(len);\n const u8of = (byte) => Uint8Array.of(byte);\n let v = u8n(hashLen);\n let k = u8n(hashLen);\n let i = 0;\n const reset = () => {\n v.fill(1);\n k.fill(0);\n i = 0;\n };\n const h = (...b) => hmacFn(k, v, ...b);\n const reseed = (seed = u8n(0)) => {\n k = h(u8of(0), seed);\n v = h();\n if (seed.length === 0)\n return;\n k = h(u8of(1), seed);\n v = h();\n };\n const gen2 = () => {\n if (i++ >= 1e3)\n throw new Error(\"drbg: tried 1000 values\");\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v = h();\n const sl = v.slice();\n out.push(sl);\n len += v.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed);\n let res = void 0;\n while (!(res = pred(gen2())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n }\n function _validateObject(object, fields, optFields = {}) {\n if (!object || typeof object !== \"object\")\n throw new Error(\"expected valid options object\");\n function checkField(fieldName, expectedType, isOpt) {\n const val = object[fieldName];\n if (isOpt && val === void 0)\n return;\n const current = typeof val;\n if (current !== expectedType || val === null)\n throw new Error(`param \"${fieldName}\" is invalid: expected ${expectedType}, got ${current}`);\n }\n Object.entries(fields).forEach(([k, v]) => checkField(k, v, false));\n Object.entries(optFields).forEach(([k, v]) => checkField(k, v, true));\n }\n var notImplemented = () => {\n throw new Error(\"not implemented\");\n };\n function memoized(fn) {\n const map = /* @__PURE__ */ new WeakMap();\n return (arg, ...args) => {\n const val = map.get(arg);\n if (val !== void 0)\n return val;\n const computed = fn(arg, ...args);\n map.set(arg, computed);\n return computed;\n };\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/modular.js\n init_dirname();\n init_buffer2();\n init_process2();\n var _0n2 = BigInt(0);\n var _1n2 = BigInt(1);\n var _2n = /* @__PURE__ */ BigInt(2);\n var _3n = /* @__PURE__ */ BigInt(3);\n var _4n = /* @__PURE__ */ BigInt(4);\n var _5n = /* @__PURE__ */ BigInt(5);\n var _7n = /* @__PURE__ */ BigInt(7);\n var _8n = /* @__PURE__ */ BigInt(8);\n var _9n = /* @__PURE__ */ BigInt(9);\n var _16n = /* @__PURE__ */ BigInt(16);\n function mod(a, b) {\n const result = a % b;\n return result >= _0n2 ? result : b + result;\n }\n function pow2(x, power, modulo) {\n let res = x;\n while (power-- > _0n2) {\n res *= res;\n res %= modulo;\n }\n return res;\n }\n function invert(number2, modulo) {\n if (number2 === _0n2)\n throw new Error(\"invert: expected non-zero number\");\n if (modulo <= _0n2)\n throw new Error(\"invert: expected positive modulus, got \" + modulo);\n let a = mod(number2, modulo);\n let b = modulo;\n let x = _0n2, y = _1n2, u = _1n2, v = _0n2;\n while (a !== _0n2) {\n const q = b / a;\n const r = b % a;\n const m = x - u * q;\n const n = y - v * q;\n b = a, a = r, x = u, y = v, u = m, v = n;\n }\n const gcd = b;\n if (gcd !== _1n2)\n throw new Error(\"invert: does not exist\");\n return mod(x, modulo);\n }\n function assertIsSquare(Fp2, root, n) {\n if (!Fp2.eql(Fp2.sqr(root), n))\n throw new Error(\"Cannot find square root\");\n }\n function sqrt3mod4(Fp2, n) {\n const p1div4 = (Fp2.ORDER + _1n2) / _4n;\n const root = Fp2.pow(n, p1div4);\n assertIsSquare(Fp2, root, n);\n return root;\n }\n function sqrt5mod8(Fp2, n) {\n const p5div8 = (Fp2.ORDER - _5n) / _8n;\n const n2 = Fp2.mul(n, _2n);\n const v = Fp2.pow(n2, p5div8);\n const nv = Fp2.mul(n, v);\n const i = Fp2.mul(Fp2.mul(nv, _2n), v);\n const root = Fp2.mul(nv, Fp2.sub(i, Fp2.ONE));\n assertIsSquare(Fp2, root, n);\n return root;\n }\n function sqrt9mod16(P) {\n const Fp_ = Field(P);\n const tn = tonelliShanks(P);\n const c1 = tn(Fp_, Fp_.neg(Fp_.ONE));\n const c2 = tn(Fp_, c1);\n const c3 = tn(Fp_, Fp_.neg(c1));\n const c4 = (P + _7n) / _16n;\n return (Fp2, n) => {\n let tv1 = Fp2.pow(n, c4);\n let tv2 = Fp2.mul(tv1, c1);\n const tv3 = Fp2.mul(tv1, c2);\n const tv4 = Fp2.mul(tv1, c3);\n const e1 = Fp2.eql(Fp2.sqr(tv2), n);\n const e2 = Fp2.eql(Fp2.sqr(tv3), n);\n tv1 = Fp2.cmov(tv1, tv2, e1);\n tv2 = Fp2.cmov(tv4, tv3, e2);\n const e3 = Fp2.eql(Fp2.sqr(tv2), n);\n const root = Fp2.cmov(tv1, tv2, e3);\n assertIsSquare(Fp2, root, n);\n return root;\n };\n }\n function tonelliShanks(P) {\n if (P < _3n)\n throw new Error(\"sqrt is not defined for small field\");\n let Q = P - _1n2;\n let S = 0;\n while (Q % _2n === _0n2) {\n Q /= _2n;\n S++;\n }\n let Z = _2n;\n const _Fp = Field(P);\n while (FpLegendre(_Fp, Z) === 1) {\n if (Z++ > 1e3)\n throw new Error(\"Cannot find square root: probably non-prime P\");\n }\n if (S === 1)\n return sqrt3mod4;\n let cc = _Fp.pow(Z, Q);\n const Q1div2 = (Q + _1n2) / _2n;\n return function tonelliSlow(Fp2, n) {\n if (Fp2.is0(n))\n return n;\n if (FpLegendre(Fp2, n) !== 1)\n throw new Error(\"Cannot find square root\");\n let M = S;\n let c = Fp2.mul(Fp2.ONE, cc);\n let t = Fp2.pow(n, Q);\n let R = Fp2.pow(n, Q1div2);\n while (!Fp2.eql(t, Fp2.ONE)) {\n if (Fp2.is0(t))\n return Fp2.ZERO;\n let i = 1;\n let t_tmp = Fp2.sqr(t);\n while (!Fp2.eql(t_tmp, Fp2.ONE)) {\n i++;\n t_tmp = Fp2.sqr(t_tmp);\n if (i === M)\n throw new Error(\"Cannot find square root\");\n }\n const exponent = _1n2 << BigInt(M - i - 1);\n const b = Fp2.pow(c, exponent);\n M = i;\n c = Fp2.sqr(b);\n t = Fp2.mul(t, c);\n R = Fp2.mul(R, b);\n }\n return R;\n };\n }\n function FpSqrt(P) {\n if (P % _4n === _3n)\n return sqrt3mod4;\n if (P % _8n === _5n)\n return sqrt5mod8;\n if (P % _16n === _9n)\n return sqrt9mod16(P);\n return tonelliShanks(P);\n }\n var isNegativeLE = (num, modulo) => (mod(num, modulo) & _1n2) === _1n2;\n var FIELD_FIELDS = [\n \"create\",\n \"isValid\",\n \"is0\",\n \"neg\",\n \"inv\",\n \"sqrt\",\n \"sqr\",\n \"eql\",\n \"add\",\n \"sub\",\n \"mul\",\n \"pow\",\n \"div\",\n \"addN\",\n \"subN\",\n \"mulN\",\n \"sqrN\"\n ];\n function validateField(field) {\n const initial = {\n ORDER: \"bigint\",\n MASK: \"bigint\",\n BYTES: \"number\",\n BITS: \"number\"\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n _validateObject(field, opts);\n return field;\n }\n function FpPow(Fp2, num, power) {\n if (power < _0n2)\n throw new Error(\"invalid exponent, negatives unsupported\");\n if (power === _0n2)\n return Fp2.ONE;\n if (power === _1n2)\n return num;\n let p = Fp2.ONE;\n let d = num;\n while (power > _0n2) {\n if (power & _1n2)\n p = Fp2.mul(p, d);\n d = Fp2.sqr(d);\n power >>= _1n2;\n }\n return p;\n }\n function FpInvertBatch(Fp2, nums, passZero = false) {\n const inverted = new Array(nums.length).fill(passZero ? Fp2.ZERO : void 0);\n const multipliedAcc = nums.reduce((acc, num, i) => {\n if (Fp2.is0(num))\n return acc;\n inverted[i] = acc;\n return Fp2.mul(acc, num);\n }, Fp2.ONE);\n const invertedAcc = Fp2.inv(multipliedAcc);\n nums.reduceRight((acc, num, i) => {\n if (Fp2.is0(num))\n return acc;\n inverted[i] = Fp2.mul(acc, inverted[i]);\n return Fp2.mul(acc, num);\n }, invertedAcc);\n return inverted;\n }\n function FpLegendre(Fp2, n) {\n const p1mod2 = (Fp2.ORDER - _1n2) / _2n;\n const powered = Fp2.pow(n, p1mod2);\n const yes = Fp2.eql(powered, Fp2.ONE);\n const zero = Fp2.eql(powered, Fp2.ZERO);\n const no = Fp2.eql(powered, Fp2.neg(Fp2.ONE));\n if (!yes && !zero && !no)\n throw new Error(\"invalid Legendre symbol result\");\n return yes ? 1 : zero ? 0 : -1;\n }\n function nLength(n, nBitLength) {\n if (nBitLength !== void 0)\n anumber(nBitLength);\n const _nBitLength = nBitLength !== void 0 ? nBitLength : n.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n }\n function Field(ORDER, bitLenOrOpts, isLE2 = false, opts = {}) {\n if (ORDER <= _0n2)\n throw new Error(\"invalid field: expected ORDER > 0, got \" + ORDER);\n let _nbitLength = void 0;\n let _sqrt = void 0;\n let modFromBytes = false;\n let allowedLengths = void 0;\n if (typeof bitLenOrOpts === \"object\" && bitLenOrOpts != null) {\n if (opts.sqrt || isLE2)\n throw new Error(\"cannot specify opts in two arguments\");\n const _opts = bitLenOrOpts;\n if (_opts.BITS)\n _nbitLength = _opts.BITS;\n if (_opts.sqrt)\n _sqrt = _opts.sqrt;\n if (typeof _opts.isLE === \"boolean\")\n isLE2 = _opts.isLE;\n if (typeof _opts.modFromBytes === \"boolean\")\n modFromBytes = _opts.modFromBytes;\n allowedLengths = _opts.allowedLengths;\n } else {\n if (typeof bitLenOrOpts === \"number\")\n _nbitLength = bitLenOrOpts;\n if (opts.sqrt)\n _sqrt = opts.sqrt;\n }\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, _nbitLength);\n if (BYTES > 2048)\n throw new Error(\"invalid field: expected ORDER of <= 2048 bytes\");\n let sqrtP;\n const f2 = Object.freeze({\n ORDER,\n isLE: isLE2,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: _0n2,\n ONE: _1n2,\n allowedLengths,\n create: (num) => mod(num, ORDER),\n isValid: (num) => {\n if (typeof num !== \"bigint\")\n throw new Error(\"invalid field element: expected bigint, got \" + typeof num);\n return _0n2 <= num && num < ORDER;\n },\n is0: (num) => num === _0n2,\n // is valid and invertible\n isValidNot0: (num) => !f2.is0(num) && f2.isValid(num),\n isOdd: (num) => (num & _1n2) === _1n2,\n neg: (num) => mod(-num, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num) => mod(num * num, ORDER),\n add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n pow: (num, power) => FpPow(f2, num, power),\n div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num) => num * num,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num) => invert(num, ORDER),\n sqrt: _sqrt || ((n) => {\n if (!sqrtP)\n sqrtP = FpSqrt(ORDER);\n return sqrtP(f2, n);\n }),\n toBytes: (num) => isLE2 ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES),\n fromBytes: (bytes, skipValidation = true) => {\n if (allowedLengths) {\n if (!allowedLengths.includes(bytes.length) || bytes.length > BYTES) {\n throw new Error(\"Field.fromBytes: expected \" + allowedLengths + \" bytes, got \" + bytes.length);\n }\n const padded = new Uint8Array(BYTES);\n padded.set(bytes, isLE2 ? 0 : padded.length - bytes.length);\n bytes = padded;\n }\n if (bytes.length !== BYTES)\n throw new Error(\"Field.fromBytes: expected \" + BYTES + \" bytes, got \" + bytes.length);\n let scalar = isLE2 ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n if (modFromBytes)\n scalar = mod(scalar, ORDER);\n if (!skipValidation) {\n if (!f2.isValid(scalar))\n throw new Error(\"invalid field element: outside of range 0..ORDER\");\n }\n return scalar;\n },\n // TODO: we don't need it here, move out to separate fn\n invertBatch: (lst) => FpInvertBatch(f2, lst),\n // We can't move this out because Fp6, Fp12 implement it\n // and it's unclear what to return in there.\n cmov: (a, b, c) => c ? b : a\n });\n return Object.freeze(f2);\n }\n function getFieldBytesLength(fieldOrder) {\n if (typeof fieldOrder !== \"bigint\")\n throw new Error(\"field order must be bigint\");\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n }\n function getMinHashLength(fieldOrder) {\n const length = getFieldBytesLength(fieldOrder);\n return length + Math.ceil(length / 2);\n }\n function mapHashToField(key, fieldOrder, isLE2 = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength(fieldOrder);\n const minLen = getMinHashLength(fieldOrder);\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(\"expected \" + minLen + \"-1024 bytes of input, got \" + len);\n const num = isLE2 ? bytesToNumberLE(key) : bytesToNumberBE(key);\n const reduced = mod(num, fieldOrder - _1n2) + _1n2;\n return isLE2 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/curve.js\n var _0n3 = BigInt(0);\n var _1n3 = BigInt(1);\n function negateCt(condition, item) {\n const neg = item.negate();\n return condition ? neg : item;\n }\n function normalizeZ(c, points) {\n const invertedZs = FpInvertBatch(c.Fp, points.map((p) => p.Z));\n return points.map((p, i) => c.fromAffine(p.toAffine(invertedZs[i])));\n }\n function validateW(W, bits) {\n if (!Number.isSafeInteger(W) || W <= 0 || W > bits)\n throw new Error(\"invalid window size, expected [1..\" + bits + \"], got W=\" + W);\n }\n function calcWOpts(W, scalarBits) {\n validateW(W, scalarBits);\n const windows = Math.ceil(scalarBits / W) + 1;\n const windowSize = 2 ** (W - 1);\n const maxNumber = 2 ** W;\n const mask2 = bitMask(W);\n const shiftBy = BigInt(W);\n return { windows, windowSize, mask: mask2, maxNumber, shiftBy };\n }\n function calcOffsets(n, window2, wOpts) {\n const { windowSize, mask: mask2, maxNumber, shiftBy } = wOpts;\n let wbits = Number(n & mask2);\n let nextN = n >> shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n nextN += _1n3;\n }\n const offsetStart = window2 * windowSize;\n const offset2 = offsetStart + Math.abs(wbits) - 1;\n const isZero = wbits === 0;\n const isNeg = wbits < 0;\n const isNegF = window2 % 2 !== 0;\n const offsetF = offsetStart;\n return { nextN, offset: offset2, isZero, isNeg, isNegF, offsetF };\n }\n function validateMSMPoints(points, c) {\n if (!Array.isArray(points))\n throw new Error(\"array expected\");\n points.forEach((p, i) => {\n if (!(p instanceof c))\n throw new Error(\"invalid point at index \" + i);\n });\n }\n function validateMSMScalars(scalars, field) {\n if (!Array.isArray(scalars))\n throw new Error(\"array of scalars expected\");\n scalars.forEach((s, i) => {\n if (!field.isValid(s))\n throw new Error(\"invalid scalar at index \" + i);\n });\n }\n var pointPrecomputes = /* @__PURE__ */ new WeakMap();\n var pointWindowSizes = /* @__PURE__ */ new WeakMap();\n function getW(P) {\n return pointWindowSizes.get(P) || 1;\n }\n function assert0(n) {\n if (n !== _0n3)\n throw new Error(\"invalid wNAF\");\n }\n var wNAF = class {\n // Parametrized with a given Point class (not individual point)\n constructor(Point, bits) {\n this.BASE = Point.BASE;\n this.ZERO = Point.ZERO;\n this.Fn = Point.Fn;\n this.bits = bits;\n }\n // non-const time multiplication ladder\n _unsafeLadder(elm, n, p = this.ZERO) {\n let d = elm;\n while (n > _0n3) {\n if (n & _1n3)\n p = p.add(d);\n d = d.double();\n n >>= _1n3;\n }\n return p;\n }\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @param point Point instance\n * @param W window size\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(point, W) {\n const { windows, windowSize } = calcWOpts(W, this.bits);\n const points = [];\n let p = point;\n let base = p;\n for (let window2 = 0; window2 < windows; window2++) {\n base = p;\n points.push(base);\n for (let i = 1; i < windowSize; i++) {\n base = base.add(p);\n points.push(base);\n }\n p = base.double();\n }\n return points;\n }\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * More compact implementation:\n * https://github.com/paulmillr/noble-secp256k1/blob/47cb1669b6e506ad66b35fe7d76132ae97465da2/index.ts#L502-L541\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n) {\n if (!this.Fn.isValid(n))\n throw new Error(\"invalid scalar\");\n let p = this.ZERO;\n let f2 = this.BASE;\n const wo = calcWOpts(W, this.bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n const { nextN, offset: offset2, isZero, isNeg, isNegF, offsetF } = calcOffsets(n, window2, wo);\n n = nextN;\n if (isZero) {\n f2 = f2.add(negateCt(isNegF, precomputes[offsetF]));\n } else {\n p = p.add(negateCt(isNeg, precomputes[offset2]));\n }\n }\n assert0(n);\n return { p, f: f2 };\n }\n /**\n * Implements ec unsafe (non const-time) multiplication using precomputed tables and w-ary non-adjacent form.\n * @param acc accumulator point to add result of multiplication\n * @returns point\n */\n wNAFUnsafe(W, precomputes, n, acc = this.ZERO) {\n const wo = calcWOpts(W, this.bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n if (n === _0n3)\n break;\n const { nextN, offset: offset2, isZero, isNeg } = calcOffsets(n, window2, wo);\n n = nextN;\n if (isZero) {\n continue;\n } else {\n const item = precomputes[offset2];\n acc = acc.add(isNeg ? item.negate() : item);\n }\n }\n assert0(n);\n return acc;\n }\n getPrecomputes(W, point, transform) {\n let comp = pointPrecomputes.get(point);\n if (!comp) {\n comp = this.precomputeWindow(point, W);\n if (W !== 1) {\n if (typeof transform === \"function\")\n comp = transform(comp);\n pointPrecomputes.set(point, comp);\n }\n }\n return comp;\n }\n cached(point, scalar, transform) {\n const W = getW(point);\n return this.wNAF(W, this.getPrecomputes(W, point, transform), scalar);\n }\n unsafe(point, scalar, transform, prev) {\n const W = getW(point);\n if (W === 1)\n return this._unsafeLadder(point, scalar, prev);\n return this.wNAFUnsafe(W, this.getPrecomputes(W, point, transform), scalar, prev);\n }\n // We calculate precomputes for elliptic curve point multiplication\n // using windowed method. This specifies window size and\n // stores precomputed values. Usually only base point would be precomputed.\n createCache(P, W) {\n validateW(W, this.bits);\n pointWindowSizes.set(P, W);\n pointPrecomputes.delete(P);\n }\n hasCache(elm) {\n return getW(elm) !== 1;\n }\n };\n function mulEndoUnsafe(Point, point, k1, k2) {\n let acc = point;\n let p1 = Point.ZERO;\n let p2 = Point.ZERO;\n while (k1 > _0n3 || k2 > _0n3) {\n if (k1 & _1n3)\n p1 = p1.add(acc);\n if (k2 & _1n3)\n p2 = p2.add(acc);\n acc = acc.double();\n k1 >>= _1n3;\n k2 >>= _1n3;\n }\n return { p1, p2 };\n }\n function pippenger(c, fieldN, points, scalars) {\n validateMSMPoints(points, c);\n validateMSMScalars(scalars, fieldN);\n const plength = points.length;\n const slength = scalars.length;\n if (plength !== slength)\n throw new Error(\"arrays of points and scalars must have equal length\");\n const zero = c.ZERO;\n const wbits = bitLen(BigInt(plength));\n let windowSize = 1;\n if (wbits > 12)\n windowSize = wbits - 3;\n else if (wbits > 4)\n windowSize = wbits - 2;\n else if (wbits > 0)\n windowSize = 2;\n const MASK = bitMask(windowSize);\n const buckets = new Array(Number(MASK) + 1).fill(zero);\n const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;\n let sum = zero;\n for (let i = lastBits; i >= 0; i -= windowSize) {\n buckets.fill(zero);\n for (let j = 0; j < slength; j++) {\n const scalar = scalars[j];\n const wbits2 = Number(scalar >> BigInt(i) & MASK);\n buckets[wbits2] = buckets[wbits2].add(points[j]);\n }\n let resI = zero;\n for (let j = buckets.length - 1, sumI = zero; j > 0; j--) {\n sumI = sumI.add(buckets[j]);\n resI = resI.add(sumI);\n }\n sum = sum.add(resI);\n if (i !== 0)\n for (let j = 0; j < windowSize; j++)\n sum = sum.double();\n }\n return sum;\n }\n function createField(order, field, isLE2) {\n if (field) {\n if (field.ORDER !== order)\n throw new Error(\"Field.ORDER must match order: Fp == p, Fn == n\");\n validateField(field);\n return field;\n } else {\n return Field(order, { isLE: isLE2 });\n }\n }\n function _createCurveFields(type2, CURVE, curveOpts = {}, FpFnLE) {\n if (FpFnLE === void 0)\n FpFnLE = type2 === \"edwards\";\n if (!CURVE || typeof CURVE !== \"object\")\n throw new Error(`expected valid ${type2} CURVE object`);\n for (const p of [\"p\", \"n\", \"h\"]) {\n const val = CURVE[p];\n if (!(typeof val === \"bigint\" && val > _0n3))\n throw new Error(`CURVE.${p} must be positive bigint`);\n }\n const Fp2 = createField(CURVE.p, curveOpts.Fp, FpFnLE);\n const Fn2 = createField(CURVE.n, curveOpts.Fn, FpFnLE);\n const _b = type2 === \"weierstrass\" ? \"b\" : \"d\";\n const params = [\"Gx\", \"Gy\", \"a\", _b];\n for (const p of params) {\n if (!Fp2.isValid(CURVE[p]))\n throw new Error(`CURVE.${p} must be valid field element of CURVE.Fp`);\n }\n CURVE = Object.freeze(Object.assign({}, CURVE));\n return { CURVE, Fp: Fp2, Fn: Fn2 };\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/edwards.js\n init_dirname();\n init_buffer2();\n init_process2();\n var _0n4 = BigInt(0);\n var _1n4 = BigInt(1);\n var _2n2 = BigInt(2);\n var _8n2 = BigInt(8);\n function isEdValidXY(Fp2, CURVE, x, y) {\n const x2 = Fp2.sqr(x);\n const y2 = Fp2.sqr(y);\n const left = Fp2.add(Fp2.mul(CURVE.a, x2), y2);\n const right = Fp2.add(Fp2.ONE, Fp2.mul(CURVE.d, Fp2.mul(x2, y2)));\n return Fp2.eql(left, right);\n }\n function edwards(params, extraOpts = {}) {\n const validated = _createCurveFields(\"edwards\", params, extraOpts, extraOpts.FpFnLE);\n const { Fp: Fp2, Fn: Fn2 } = validated;\n let CURVE = validated.CURVE;\n const { h: cofactor } = CURVE;\n _validateObject(extraOpts, {}, { uvRatio: \"function\" });\n const MASK = _2n2 << BigInt(Fn2.BYTES * 8) - _1n4;\n const modP = (n) => Fp2.create(n);\n const uvRatio2 = extraOpts.uvRatio || ((u, v) => {\n try {\n return { isValid: true, value: Fp2.sqrt(Fp2.div(u, v)) };\n } catch (e) {\n return { isValid: false, value: _0n4 };\n }\n });\n if (!isEdValidXY(Fp2, CURVE, CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n function acoord(title, n, banZero = false) {\n const min = banZero ? _1n4 : _0n4;\n aInRange(\"coordinate \" + title, n, min, MASK);\n return n;\n }\n function aextpoint(other) {\n if (!(other instanceof Point))\n throw new Error(\"ExtendedPoint expected\");\n }\n const toAffineMemo = memoized((p, iz) => {\n const { X, Y, Z } = p;\n const is0 = p.is0();\n if (iz == null)\n iz = is0 ? _8n2 : Fp2.inv(Z);\n const x = modP(X * iz);\n const y = modP(Y * iz);\n const zz = Fp2.mul(Z, iz);\n if (is0)\n return { x: _0n4, y: _1n4 };\n if (zz !== _1n4)\n throw new Error(\"invZ was invalid\");\n return { x, y };\n });\n const assertValidMemo = memoized((p) => {\n const { a, d } = CURVE;\n if (p.is0())\n throw new Error(\"bad point: ZERO\");\n const { X, Y, Z, T } = p;\n const X2 = modP(X * X);\n const Y2 = modP(Y * Y);\n const Z2 = modP(Z * Z);\n const Z4 = modP(Z2 * Z2);\n const aX2 = modP(X2 * a);\n const left = modP(Z2 * modP(aX2 + Y2));\n const right = modP(Z4 + modP(d * modP(X2 * Y2)));\n if (left !== right)\n throw new Error(\"bad point: equation left != right (1)\");\n const XY = modP(X * Y);\n const ZT = modP(Z * T);\n if (XY !== ZT)\n throw new Error(\"bad point: equation left != right (2)\");\n return true;\n });\n class Point {\n constructor(X, Y, Z, T) {\n this.X = acoord(\"x\", X);\n this.Y = acoord(\"y\", Y);\n this.Z = acoord(\"z\", Z, true);\n this.T = acoord(\"t\", T);\n Object.freeze(this);\n }\n static CURVE() {\n return CURVE;\n }\n static fromAffine(p) {\n if (p instanceof Point)\n throw new Error(\"extended point not allowed\");\n const { x, y } = p || {};\n acoord(\"x\", x);\n acoord(\"y\", y);\n return new Point(x, y, _1n4, modP(x * y));\n }\n // Uses algo from RFC8032 5.1.3.\n static fromBytes(bytes, zip215 = false) {\n const len = Fp2.BYTES;\n const { a, d } = CURVE;\n bytes = copyBytes(_abytes2(bytes, len, \"point\"));\n _abool2(zip215, \"zip215\");\n const normed = copyBytes(bytes);\n const lastByte = bytes[len - 1];\n normed[len - 1] = lastByte & ~128;\n const y = bytesToNumberLE(normed);\n const max = zip215 ? MASK : Fp2.ORDER;\n aInRange(\"point.y\", y, _0n4, max);\n const y2 = modP(y * y);\n const u = modP(y2 - _1n4);\n const v = modP(d * y2 - a);\n let { isValid, value: x } = uvRatio2(u, v);\n if (!isValid)\n throw new Error(\"bad point: invalid y coordinate\");\n const isXOdd = (x & _1n4) === _1n4;\n const isLastByteOdd = (lastByte & 128) !== 0;\n if (!zip215 && x === _0n4 && isLastByteOdd)\n throw new Error(\"bad point: x=0 and x_0=1\");\n if (isLastByteOdd !== isXOdd)\n x = modP(-x);\n return Point.fromAffine({ x, y });\n }\n static fromHex(bytes, zip215 = false) {\n return Point.fromBytes(ensureBytes(\"point\", bytes), zip215);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n precompute(windowSize = 8, isLazy = true) {\n wnaf.createCache(this, windowSize);\n if (!isLazy)\n this.multiply(_2n2);\n return this;\n }\n // Useful in fromAffine() - not for fromBytes(), which always created valid points.\n assertValidity() {\n assertValidMemo(this);\n }\n // Compare one point to another.\n equals(other) {\n aextpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n const X1Z2 = modP(X1 * Z2);\n const X2Z1 = modP(X2 * Z1);\n const Y1Z2 = modP(Y1 * Z2);\n const Y2Z1 = modP(Y2 * Z1);\n return X1Z2 === X2Z1 && Y1Z2 === Y2Z1;\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n negate() {\n return new Point(modP(-this.X), this.Y, this.Z, modP(-this.T));\n }\n // Fast algo for doubling Extended Point.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd\n // Cost: 4M + 4S + 1*a + 6add + 1*2.\n double() {\n const { a } = CURVE;\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const A = modP(X1 * X1);\n const B = modP(Y1 * Y1);\n const C = modP(_2n2 * modP(Z1 * Z1));\n const D = modP(a * A);\n const x1y1 = X1 + Y1;\n const E = modP(modP(x1y1 * x1y1) - A - B);\n const G = D + B;\n const F = G - C;\n const H = D - B;\n const X3 = modP(E * F);\n const Y3 = modP(G * H);\n const T3 = modP(E * H);\n const Z3 = modP(F * G);\n return new Point(X3, Y3, Z3, T3);\n }\n // Fast algo for adding 2 Extended Points.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#addition-add-2008-hwcd\n // Cost: 9M + 1*a + 1*d + 7add.\n add(other) {\n aextpoint(other);\n const { a, d } = CURVE;\n const { X: X1, Y: Y1, Z: Z1, T: T1 } = this;\n const { X: X2, Y: Y2, Z: Z2, T: T2 } = other;\n const A = modP(X1 * X2);\n const B = modP(Y1 * Y2);\n const C = modP(T1 * d * T2);\n const D = modP(Z1 * Z2);\n const E = modP((X1 + Y1) * (X2 + Y2) - A - B);\n const F = D - C;\n const G = D + C;\n const H = modP(B - a * A);\n const X3 = modP(E * F);\n const Y3 = modP(G * H);\n const T3 = modP(E * H);\n const Z3 = modP(F * G);\n return new Point(X3, Y3, Z3, T3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n // Constant-time multiplication.\n multiply(scalar) {\n if (!Fn2.isValidNot0(scalar))\n throw new Error(\"invalid scalar: expected 1 <= sc < curve.n\");\n const { p, f: f2 } = wnaf.cached(this, scalar, (p2) => normalizeZ(Point, p2));\n return normalizeZ(Point, [p, f2])[0];\n }\n // Non-constant-time multiplication. Uses double-and-add algorithm.\n // It's faster, but should only be used when you don't care about\n // an exposed private key e.g. sig verification.\n // Does NOT allow scalars higher than CURVE.n.\n // Accepts optional accumulator to merge with multiply (important for sparse scalars)\n multiplyUnsafe(scalar, acc = Point.ZERO) {\n if (!Fn2.isValid(scalar))\n throw new Error(\"invalid scalar: expected 0 <= sc < curve.n\");\n if (scalar === _0n4)\n return Point.ZERO;\n if (this.is0() || scalar === _1n4)\n return this;\n return wnaf.unsafe(this, scalar, (p) => normalizeZ(Point, p), acc);\n }\n // Checks if point is of small order.\n // If you add something to small order point, you will have \"dirty\"\n // point with torsion component.\n // Multiplies point by cofactor and checks if the result is 0.\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n // Multiplies point by curve order and checks if the result is 0.\n // Returns `false` is the point is dirty.\n isTorsionFree() {\n return wnaf.unsafe(this, CURVE.n).is0();\n }\n // Converts Extended point to default (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n toAffine(invertedZ) {\n return toAffineMemo(this, invertedZ);\n }\n clearCofactor() {\n if (cofactor === _1n4)\n return this;\n return this.multiplyUnsafe(cofactor);\n }\n toBytes() {\n const { x, y } = this.toAffine();\n const bytes = Fp2.toBytes(y);\n bytes[bytes.length - 1] |= x & _1n4 ? 128 : 0;\n return bytes;\n }\n toHex() {\n return bytesToHex(this.toBytes());\n }\n toString() {\n return ``;\n }\n // TODO: remove\n get ex() {\n return this.X;\n }\n get ey() {\n return this.Y;\n }\n get ez() {\n return this.Z;\n }\n get et() {\n return this.T;\n }\n static normalizeZ(points) {\n return normalizeZ(Point, points);\n }\n static msm(points, scalars) {\n return pippenger(Point, Fn2, points, scalars);\n }\n _setWindowSize(windowSize) {\n this.precompute(windowSize);\n }\n toRawBytes() {\n return this.toBytes();\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, _1n4, modP(CURVE.Gx * CURVE.Gy));\n Point.ZERO = new Point(_0n4, _1n4, _1n4, _0n4);\n Point.Fp = Fp2;\n Point.Fn = Fn2;\n const wnaf = new wNAF(Point, Fn2.BITS);\n Point.BASE.precompute(8);\n return Point;\n }\n var PrimeEdwardsPoint = class {\n constructor(ep) {\n this.ep = ep;\n }\n // Static methods that must be implemented by subclasses\n static fromBytes(_bytes) {\n notImplemented();\n }\n static fromHex(_hex) {\n notImplemented();\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n // Common implementations\n clearCofactor() {\n return this;\n }\n assertValidity() {\n this.ep.assertValidity();\n }\n toAffine(invertedZ) {\n return this.ep.toAffine(invertedZ);\n }\n toHex() {\n return bytesToHex(this.toBytes());\n }\n toString() {\n return this.toHex();\n }\n isTorsionFree() {\n return true;\n }\n isSmallOrder() {\n return false;\n }\n add(other) {\n this.assertSame(other);\n return this.init(this.ep.add(other.ep));\n }\n subtract(other) {\n this.assertSame(other);\n return this.init(this.ep.subtract(other.ep));\n }\n multiply(scalar) {\n return this.init(this.ep.multiply(scalar));\n }\n multiplyUnsafe(scalar) {\n return this.init(this.ep.multiplyUnsafe(scalar));\n }\n double() {\n return this.init(this.ep.double());\n }\n negate() {\n return this.init(this.ep.negate());\n }\n precompute(windowSize, isLazy) {\n return this.init(this.ep.precompute(windowSize, isLazy));\n }\n /** @deprecated use `toBytes` */\n toRawBytes() {\n return this.toBytes();\n }\n };\n function eddsa(Point, cHash, eddsaOpts = {}) {\n if (typeof cHash !== \"function\")\n throw new Error('\"hash\" function param is required');\n _validateObject(eddsaOpts, {}, {\n adjustScalarBytes: \"function\",\n randomBytes: \"function\",\n domain: \"function\",\n prehash: \"function\",\n mapToCurve: \"function\"\n });\n const { prehash } = eddsaOpts;\n const { BASE, Fp: Fp2, Fn: Fn2 } = Point;\n const randomBytes2 = eddsaOpts.randomBytes || randomBytes;\n const adjustScalarBytes2 = eddsaOpts.adjustScalarBytes || ((bytes) => bytes);\n const domain = eddsaOpts.domain || ((data, ctx, phflag) => {\n _abool2(phflag, \"phflag\");\n if (ctx.length || phflag)\n throw new Error(\"Contexts/pre-hash are not supported\");\n return data;\n });\n function modN_LE(hash) {\n return Fn2.create(bytesToNumberLE(hash));\n }\n function getPrivateScalar(key) {\n const len = lengths.secretKey;\n key = ensureBytes(\"private key\", key, len);\n const hashed = ensureBytes(\"hashed private key\", cHash(key), 2 * len);\n const head = adjustScalarBytes2(hashed.slice(0, len));\n const prefix = hashed.slice(len, 2 * len);\n const scalar = modN_LE(head);\n return { head, prefix, scalar };\n }\n function getExtendedPublicKey(secretKey) {\n const { head, prefix, scalar } = getPrivateScalar(secretKey);\n const point = BASE.multiply(scalar);\n const pointBytes = point.toBytes();\n return { head, prefix, scalar, point, pointBytes };\n }\n function getPublicKey2(secretKey) {\n return getExtendedPublicKey(secretKey).pointBytes;\n }\n function hashDomainToScalar(context = Uint8Array.of(), ...msgs) {\n const msg = concatBytes(...msgs);\n return modN_LE(cHash(domain(msg, ensureBytes(\"context\", context), !!prehash)));\n }\n function sign2(msg, secretKey, options = {}) {\n msg = ensureBytes(\"message\", msg);\n if (prehash)\n msg = prehash(msg);\n const { prefix, scalar, pointBytes } = getExtendedPublicKey(secretKey);\n const r = hashDomainToScalar(options.context, prefix, msg);\n const R = BASE.multiply(r).toBytes();\n const k = hashDomainToScalar(options.context, R, pointBytes, msg);\n const s = Fn2.create(r + k * scalar);\n if (!Fn2.isValid(s))\n throw new Error(\"sign failed: invalid s\");\n const rs = concatBytes(R, Fn2.toBytes(s));\n return _abytes2(rs, lengths.signature, \"result\");\n }\n const verifyOpts = { zip215: true };\n function verify2(sig, msg, publicKey2, options = verifyOpts) {\n const { context, zip215 } = options;\n const len = lengths.signature;\n sig = ensureBytes(\"signature\", sig, len);\n msg = ensureBytes(\"message\", msg);\n publicKey2 = ensureBytes(\"publicKey\", publicKey2, lengths.publicKey);\n if (zip215 !== void 0)\n _abool2(zip215, \"zip215\");\n if (prehash)\n msg = prehash(msg);\n const mid = len / 2;\n const r = sig.subarray(0, mid);\n const s = bytesToNumberLE(sig.subarray(mid, len));\n let A, R, SB;\n try {\n A = Point.fromBytes(publicKey2, zip215);\n R = Point.fromBytes(r, zip215);\n SB = BASE.multiplyUnsafe(s);\n } catch (error) {\n return false;\n }\n if (!zip215 && A.isSmallOrder())\n return false;\n const k = hashDomainToScalar(context, R.toBytes(), A.toBytes(), msg);\n const RkA = R.add(A.multiplyUnsafe(k));\n return RkA.subtract(SB).clearCofactor().is0();\n }\n const _size = Fp2.BYTES;\n const lengths = {\n secretKey: _size,\n publicKey: _size,\n signature: 2 * _size,\n seed: _size\n };\n function randomSecretKey(seed = randomBytes2(lengths.seed)) {\n return _abytes2(seed, lengths.seed, \"seed\");\n }\n function keygen(seed) {\n const secretKey = utils.randomSecretKey(seed);\n return { secretKey, publicKey: getPublicKey2(secretKey) };\n }\n function isValidSecretKey(key) {\n return isBytes(key) && key.length === Fn2.BYTES;\n }\n function isValidPublicKey(key, zip215) {\n try {\n return !!Point.fromBytes(key, zip215);\n } catch (error) {\n return false;\n }\n }\n const utils = {\n getExtendedPublicKey,\n randomSecretKey,\n isValidSecretKey,\n isValidPublicKey,\n /**\n * Converts ed public key to x public key. Uses formula:\n * - ed25519:\n * - `(u, v) = ((1+y)/(1-y), sqrt(-486664)*u/x)`\n * - `(x, y) = (sqrt(-486664)*u/v, (u-1)/(u+1))`\n * - ed448:\n * - `(u, v) = ((y-1)/(y+1), sqrt(156324)*u/x)`\n * - `(x, y) = (sqrt(156324)*u/v, (1+u)/(1-u))`\n */\n toMontgomery(publicKey2) {\n const { y } = Point.fromBytes(publicKey2);\n const size = lengths.publicKey;\n const is25519 = size === 32;\n if (!is25519 && size !== 57)\n throw new Error(\"only defined for 25519 and 448\");\n const u = is25519 ? Fp2.div(_1n4 + y, _1n4 - y) : Fp2.div(y - _1n4, y + _1n4);\n return Fp2.toBytes(u);\n },\n toMontgomerySecret(secretKey) {\n const size = lengths.secretKey;\n _abytes2(secretKey, size);\n const hashed = cHash(secretKey.subarray(0, size));\n return adjustScalarBytes2(hashed).subarray(0, size);\n },\n /** @deprecated */\n randomPrivateKey: randomSecretKey,\n /** @deprecated */\n precompute(windowSize = 8, point = Point.BASE) {\n return point.precompute(windowSize, false);\n }\n };\n return Object.freeze({\n keygen,\n getPublicKey: getPublicKey2,\n sign: sign2,\n verify: verify2,\n utils,\n Point,\n lengths\n });\n }\n function _eddsa_legacy_opts_to_new(c) {\n const CURVE = {\n a: c.a,\n d: c.d,\n p: c.Fp.ORDER,\n n: c.n,\n h: c.h,\n Gx: c.Gx,\n Gy: c.Gy\n };\n const Fp2 = c.Fp;\n const Fn2 = Field(CURVE.n, c.nBitLength, true);\n const curveOpts = { Fp: Fp2, Fn: Fn2, uvRatio: c.uvRatio };\n const eddsaOpts = {\n randomBytes: c.randomBytes,\n adjustScalarBytes: c.adjustScalarBytes,\n domain: c.domain,\n prehash: c.prehash,\n mapToCurve: c.mapToCurve\n };\n return { CURVE, curveOpts, hash: c.hash, eddsaOpts };\n }\n function _eddsa_new_output_to_legacy(c, eddsa2) {\n const Point = eddsa2.Point;\n const legacy = Object.assign({}, eddsa2, {\n ExtendedPoint: Point,\n CURVE: c,\n nBitLength: Point.Fn.BITS,\n nByteLength: Point.Fn.BYTES\n });\n return legacy;\n }\n function twistedEdwards(c) {\n const { CURVE, curveOpts, hash, eddsaOpts } = _eddsa_legacy_opts_to_new(c);\n const Point = edwards(CURVE, curveOpts);\n const EDDSA = eddsa(Point, hash, eddsaOpts);\n return _eddsa_new_output_to_legacy(c, EDDSA);\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/ed25519.js\n var _0n5 = /* @__PURE__ */ BigInt(0);\n var _1n5 = BigInt(1);\n var _2n3 = BigInt(2);\n var _3n2 = BigInt(3);\n var _5n2 = BigInt(5);\n var _8n3 = BigInt(8);\n var ed25519_CURVE_p = BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed\");\n var ed25519_CURVE = /* @__PURE__ */ (() => ({\n p: ed25519_CURVE_p,\n n: BigInt(\"0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed\"),\n h: _8n3,\n a: BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec\"),\n d: BigInt(\"0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3\"),\n Gx: BigInt(\"0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a\"),\n Gy: BigInt(\"0x6666666666666666666666666666666666666666666666666666666666666658\")\n }))();\n function ed25519_pow_2_252_3(x) {\n const _10n = BigInt(10), _20n = BigInt(20), _40n = BigInt(40), _80n = BigInt(80);\n const P = ed25519_CURVE_p;\n const x2 = x * x % P;\n const b2 = x2 * x % P;\n const b4 = pow2(b2, _2n3, P) * b2 % P;\n const b5 = pow2(b4, _1n5, P) * x % P;\n const b10 = pow2(b5, _5n2, P) * b5 % P;\n const b20 = pow2(b10, _10n, P) * b10 % P;\n const b40 = pow2(b20, _20n, P) * b20 % P;\n const b80 = pow2(b40, _40n, P) * b40 % P;\n const b160 = pow2(b80, _80n, P) * b80 % P;\n const b240 = pow2(b160, _80n, P) * b80 % P;\n const b250 = pow2(b240, _10n, P) * b10 % P;\n const pow_p_5_8 = pow2(b250, _2n3, P) * x % P;\n return { pow_p_5_8, b2 };\n }\n function adjustScalarBytes(bytes) {\n bytes[0] &= 248;\n bytes[31] &= 127;\n bytes[31] |= 64;\n return bytes;\n }\n var ED25519_SQRT_M1 = /* @__PURE__ */ BigInt(\"19681161376707505956807079304988542015446066515923890162744021073123829784752\");\n function uvRatio(u, v) {\n const P = ed25519_CURVE_p;\n const v32 = mod(v * v * v, P);\n const v7 = mod(v32 * v32 * v, P);\n const pow = ed25519_pow_2_252_3(u * v7).pow_p_5_8;\n let x = mod(u * v32 * pow, P);\n const vx2 = mod(v * x * x, P);\n const root1 = x;\n const root2 = mod(x * ED25519_SQRT_M1, P);\n const useRoot1 = vx2 === u;\n const useRoot2 = vx2 === mod(-u, P);\n const noRoot = vx2 === mod(-u * ED25519_SQRT_M1, P);\n if (useRoot1)\n x = root1;\n if (useRoot2 || noRoot)\n x = root2;\n if (isNegativeLE(x, P))\n x = mod(-x, P);\n return { isValid: useRoot1 || useRoot2, value: x };\n }\n var Fp = /* @__PURE__ */ (() => Field(ed25519_CURVE.p, { isLE: true }))();\n var Fn = /* @__PURE__ */ (() => Field(ed25519_CURVE.n, { isLE: true }))();\n var ed25519Defaults = /* @__PURE__ */ (() => ({\n ...ed25519_CURVE,\n Fp,\n hash: sha512,\n adjustScalarBytes,\n // dom2\n // Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.\n // Constant-time, u/√v\n uvRatio\n }))();\n var ed25519 = /* @__PURE__ */ (() => twistedEdwards(ed25519Defaults))();\n var SQRT_M1 = ED25519_SQRT_M1;\n var SQRT_AD_MINUS_ONE = /* @__PURE__ */ BigInt(\"25063068953384623474111414158702152701244531502492656460079210482610430750235\");\n var INVSQRT_A_MINUS_D = /* @__PURE__ */ BigInt(\"54469307008909316920995813868745141605393597292927456921205312896311721017578\");\n var ONE_MINUS_D_SQ = /* @__PURE__ */ BigInt(\"1159843021668779879193775521855586647937357759715417654439879720876111806838\");\n var D_MINUS_ONE_SQ = /* @__PURE__ */ BigInt(\"40440834346308536858101042469323190826248399146238708352240133220865137265952\");\n var invertSqrt = (number2) => uvRatio(_1n5, number2);\n var MAX_255B = /* @__PURE__ */ BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n var bytes255ToNumberLE = (bytes) => ed25519.Point.Fp.create(bytesToNumberLE(bytes) & MAX_255B);\n function calcElligatorRistrettoMap(r0) {\n const { d } = ed25519_CURVE;\n const P = ed25519_CURVE_p;\n const mod2 = (n) => Fp.create(n);\n const r = mod2(SQRT_M1 * r0 * r0);\n const Ns = mod2((r + _1n5) * ONE_MINUS_D_SQ);\n let c = BigInt(-1);\n const D = mod2((c - d * r) * mod2(r + d));\n let { isValid: Ns_D_is_sq, value: s } = uvRatio(Ns, D);\n let s_ = mod2(s * r0);\n if (!isNegativeLE(s_, P))\n s_ = mod2(-s_);\n if (!Ns_D_is_sq)\n s = s_;\n if (!Ns_D_is_sq)\n c = r;\n const Nt = mod2(c * (r - _1n5) * D_MINUS_ONE_SQ - D);\n const s2 = s * s;\n const W0 = mod2((s + s) * D);\n const W1 = mod2(Nt * SQRT_AD_MINUS_ONE);\n const W2 = mod2(_1n5 - s2);\n const W3 = mod2(_1n5 + s2);\n return new ed25519.Point(mod2(W0 * W3), mod2(W2 * W1), mod2(W1 * W3), mod2(W0 * W2));\n }\n function ristretto255_map(bytes) {\n abytes(bytes, 64);\n const r1 = bytes255ToNumberLE(bytes.subarray(0, 32));\n const R1 = calcElligatorRistrettoMap(r1);\n const r2 = bytes255ToNumberLE(bytes.subarray(32, 64));\n const R2 = calcElligatorRistrettoMap(r2);\n return new _RistrettoPoint(R1.add(R2));\n }\n var _RistrettoPoint = class __RistrettoPoint extends PrimeEdwardsPoint {\n constructor(ep) {\n super(ep);\n }\n static fromAffine(ap) {\n return new __RistrettoPoint(ed25519.Point.fromAffine(ap));\n }\n assertSame(other) {\n if (!(other instanceof __RistrettoPoint))\n throw new Error(\"RistrettoPoint expected\");\n }\n init(ep) {\n return new __RistrettoPoint(ep);\n }\n /** @deprecated use `import { ristretto255_hasher } from '@noble/curves/ed25519.js';` */\n static hashToCurve(hex) {\n return ristretto255_map(ensureBytes(\"ristrettoHash\", hex, 64));\n }\n static fromBytes(bytes) {\n abytes(bytes, 32);\n const { a, d } = ed25519_CURVE;\n const P = ed25519_CURVE_p;\n const mod2 = (n) => Fp.create(n);\n const s = bytes255ToNumberLE(bytes);\n if (!equalBytes(Fp.toBytes(s), bytes) || isNegativeLE(s, P))\n throw new Error(\"invalid ristretto255 encoding 1\");\n const s2 = mod2(s * s);\n const u1 = mod2(_1n5 + a * s2);\n const u2 = mod2(_1n5 - a * s2);\n const u1_2 = mod2(u1 * u1);\n const u2_2 = mod2(u2 * u2);\n const v = mod2(a * d * u1_2 - u2_2);\n const { isValid, value: I } = invertSqrt(mod2(v * u2_2));\n const Dx = mod2(I * u2);\n const Dy = mod2(I * Dx * v);\n let x = mod2((s + s) * Dx);\n if (isNegativeLE(x, P))\n x = mod2(-x);\n const y = mod2(u1 * Dy);\n const t = mod2(x * y);\n if (!isValid || isNegativeLE(t, P) || y === _0n5)\n throw new Error(\"invalid ristretto255 encoding 2\");\n return new __RistrettoPoint(new ed25519.Point(x, y, _1n5, t));\n }\n /**\n * Converts ristretto-encoded string to ristretto point.\n * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-decode).\n * @param hex Ristretto-encoded 32 bytes. Not every 32-byte string is valid ristretto encoding\n */\n static fromHex(hex) {\n return __RistrettoPoint.fromBytes(ensureBytes(\"ristrettoHex\", hex, 32));\n }\n static msm(points, scalars) {\n return pippenger(__RistrettoPoint, ed25519.Point.Fn, points, scalars);\n }\n /**\n * Encodes ristretto point to Uint8Array.\n * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-encode).\n */\n toBytes() {\n let { X, Y, Z, T } = this.ep;\n const P = ed25519_CURVE_p;\n const mod2 = (n) => Fp.create(n);\n const u1 = mod2(mod2(Z + Y) * mod2(Z - Y));\n const u2 = mod2(X * Y);\n const u2sq = mod2(u2 * u2);\n const { value: invsqrt } = invertSqrt(mod2(u1 * u2sq));\n const D1 = mod2(invsqrt * u1);\n const D2 = mod2(invsqrt * u2);\n const zInv = mod2(D1 * D2 * T);\n let D;\n if (isNegativeLE(T * zInv, P)) {\n let _x = mod2(Y * SQRT_M1);\n let _y = mod2(X * SQRT_M1);\n X = _x;\n Y = _y;\n D = mod2(D1 * INVSQRT_A_MINUS_D);\n } else {\n D = D2;\n }\n if (isNegativeLE(X * zInv, P))\n Y = mod2(-Y);\n let s = mod2((Z - Y) * D);\n if (isNegativeLE(s, P))\n s = mod2(-s);\n return Fp.toBytes(s);\n }\n /**\n * Compares two Ristretto points.\n * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-equals).\n */\n equals(other) {\n this.assertSame(other);\n const { X: X1, Y: Y1 } = this.ep;\n const { X: X2, Y: Y2 } = other.ep;\n const mod2 = (n) => Fp.create(n);\n const one = mod2(X1 * Y2) === mod2(Y1 * X2);\n const two = mod2(Y1 * Y2) === mod2(X1 * X2);\n return one || two;\n }\n is0() {\n return this.equals(__RistrettoPoint.ZERO);\n }\n };\n _RistrettoPoint.BASE = /* @__PURE__ */ (() => new _RistrettoPoint(ed25519.Point.BASE))();\n _RistrettoPoint.ZERO = /* @__PURE__ */ (() => new _RistrettoPoint(ed25519.Point.ZERO))();\n _RistrettoPoint.Fp = /* @__PURE__ */ (() => Fp)();\n _RistrettoPoint.Fn = /* @__PURE__ */ (() => Fn)();\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n var import_bn = __toESM(require_bn());\n var import_bs58 = __toESM(require_bs58());\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js\n init_dirname();\n init_buffer2();\n init_process2();\n var sha2562 = sha256;\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n var import_borsh = __toESM(require_lib());\n var BufferLayout = __toESM(require_Layout());\n var import_buffer_layout = __toESM(require_Layout());\n\n // ../../../node_modules/.pnpm/@solana+codecs-numbers@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-numbers/dist/index.browser.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@solana+errors@2.3.0_typescript@5.8.3/node_modules/@solana/errors/dist/index.browser.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n var SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED = 1;\n var SOLANA_ERROR__INVALID_NONCE = 2;\n var SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = 3;\n var SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE = 4;\n var SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH = 5;\n var SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE = 6;\n var SOLANA_ERROR__MALFORMED_BIGINT_STRING = 7;\n var SOLANA_ERROR__MALFORMED_NUMBER_STRING = 8;\n var SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE = 9;\n var SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR = 10;\n var SOLANA_ERROR__JSON_RPC__PARSE_ERROR = -32700;\n var SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR = -32603;\n var SOLANA_ERROR__JSON_RPC__INVALID_PARAMS = -32602;\n var SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND = -32601;\n var SOLANA_ERROR__JSON_RPC__INVALID_REQUEST = -32600;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED = -32016;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION = -32015;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET = -32014;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH = -32013;\n var SOLANA_ERROR__JSON_RPC__SCAN_ERROR = -32012;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE = -32011;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX = -32010;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED = -32009;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT = -32008;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED = -32007;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE = -32006;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY = -32005;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE = -32004;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE = -32003;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE = -32002;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP = -32001;\n var SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH = 28e5;\n var SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE = 2800001;\n var SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS = 2800002;\n var SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY = 2800003;\n var SOLANA_ERROR__ADDRESSES__MALFORMED_PDA = 2800004;\n var SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE = 2800005;\n var SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED = 2800006;\n var SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED = 2800007;\n var SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE = 2800008;\n var SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED = 2800009;\n var SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER = 2800010;\n var SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS = 2800011;\n var SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND = 323e4;\n var SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND = 32300001;\n var SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT = 3230002;\n var SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT = 3230003;\n var SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED = 3230004;\n var SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT = 361e4;\n var SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED = 3610001;\n var SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED = 3610002;\n var SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED = 3610003;\n var SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED = 3610004;\n var SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED = 3610005;\n var SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED = 3610006;\n var SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY = 3610007;\n var SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED = 3611e3;\n var SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH = 3704e3;\n var SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH = 3704001;\n var SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH = 3704002;\n var SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE = 3704003;\n var SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY = 3704004;\n var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS = 4128e3;\n var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA = 4128001;\n var SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH = 4128002;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN = 4615e3;\n var SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR = 4615001;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT = 4615002;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA = 4615003;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA = 4615004;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL = 4615005;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS = 4615006;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID = 4615007;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE = 4615008;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED = 4615009;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT = 4615010;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION = 4615011;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID = 4615012;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND = 4615013;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED = 4615014;\n var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE = 4615015;\n var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED = 4615016;\n var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX = 4615017;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED = 4615018;\n var SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED = 4615019;\n var SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS = 4615020;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED = 4615021;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE = 4615022;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED = 4615023;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = 4615024;\n var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC = 4615025;\n var SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM = 4615026;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR = 4615027;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED = 4615028;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE = 4615029;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT = 4615030;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID = 4615031;\n var SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH = 4615032;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT = 4615033;\n var SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED = 4615034;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED = 4615035;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS = 4615036;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC = 4615037;\n var SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED = 4615038;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION = 4615039;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE = 4615040;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE = 4615041;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE = 4615042;\n var SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE = 4615043;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY = 4615044;\n var SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR = 4615045;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT = 4615046;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER = 4615047;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW = 4615048;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR = 4615049;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER = 4615050;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED = 4615051;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED = 4615052;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED = 4615053;\n var SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS = 4615054;\n var SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS = 5508e3;\n var SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER = 5508001;\n var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER = 5508002;\n var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER = 5508003;\n var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER = 5508004;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER = 5508005;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER = 5508006;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER = 5508007;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER = 5508008;\n var SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS = 5508009;\n var SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING = 5508010;\n var SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED = 5508011;\n var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES = 5663e3;\n var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE = 5663001;\n var SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME = 5663002;\n var SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME = 5663003;\n var SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE = 5663004;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING = 5663005;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE = 5663006;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND = 5663007;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING = 5663008;\n var SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING = 5663009;\n var SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING = 5663010;\n var SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING = 5663011;\n var SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING = 5663012;\n var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING = 5663013;\n var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE = 5663014;\n var SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION = 5663015;\n var SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES = 5663016;\n var SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH = 5663017;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT = 5663018;\n var SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT = 5663019;\n var SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT = 5663020;\n var SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN = 705e4;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE = 7050001;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE = 7050002;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND = 7050003;\n var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND = 7050004;\n var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE = 7050005;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE = 7050006;\n var SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED = 7050007;\n var SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND = 7050008;\n var SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP = 7050009;\n var SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE = 7050010;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX = 7050011;\n var SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE = 7050012;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION = 7050013;\n var SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE = 7050014;\n var SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE = 7050015;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = 7050016;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT = 7050017;\n var SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION = 7050018;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT = 7050019;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT = 7050020;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT = 7050021;\n var SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS = 7050022;\n var SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND = 7050023;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER = 7050024;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA = 7050025;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX = 7050026;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT = 7050027;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT = 7050028;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT = 7050029;\n var SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION = 7050030;\n var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT = 7050031;\n var SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED = 7050032;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT = 7050033;\n var SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED = 7050034;\n var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED = 7050035;\n var SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION = 7050036;\n var SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY = 8078e3;\n var SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH = 8078001;\n var SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH = 8078002;\n var SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH = 8078003;\n var SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH = 8078004;\n var SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH = 8078005;\n var SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH = 8078006;\n var SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS = 8078007;\n var SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE = 8078008;\n var SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT = 8078009;\n var SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT = 8078010;\n var SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE = 8078011;\n var SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE = 8078012;\n var SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH = 8078013;\n var SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE = 8078014;\n var SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT = 8078015;\n var SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE = 8078016;\n var SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE = 8078017;\n var SOLANA_ERROR__CODECS__INVALID_CONSTANT = 8078018;\n var SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE = 8078019;\n var SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL = 8078020;\n var SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES = 8078021;\n var SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS = 8078022;\n var SOLANA_ERROR__RPC__INTEGER_OVERFLOW = 81e5;\n var SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN = 8100001;\n var SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR = 8100002;\n var SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD = 8100003;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN = 819e4;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID = 8190001;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED = 8190002;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED = 8190003;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT = 8190004;\n var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING = 99e5;\n var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE = 9900001;\n var SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING = 9900002;\n var SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE = 9900003;\n var SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED = 9900004;\n var SolanaErrorMessages = {\n [SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND]: \"Account not found at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED]: \"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.\",\n [SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT]: \"Expected decoded account at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT]: \"Failed to decode account data at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND]: \"Accounts not found at addresses: $addresses\",\n [SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED]: \"Unable to find a viable program address bump seed.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS]: \"$putativeAddress is not a base58-encoded address.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH]: \"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY]: \"The `CryptoKey` must be an `Ed25519` public key.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS]: \"$putativeOffCurveAddress is not a base58-encoded off-curve address.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE]: \"Invalid seeds; point must fall off the Ed25519 curve.\",\n [SOLANA_ERROR__ADDRESSES__MALFORMED_PDA]: \"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].\",\n [SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED]: \"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.\",\n [SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED]: \"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.\",\n [SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE]: \"Expected program derived address bump to be in the range [0, 255], got: $bump.\",\n [SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER]: \"Program address cannot end with PDA marker.\",\n [SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.\",\n [SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.\",\n [SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: \"The network has progressed past the last block for which this transaction could have been committed.\",\n [SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY]: \"Codec [$codecDescription] cannot decode empty byte arrays.\",\n [SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS]: \"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.\",\n [SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL]: \"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH]: \"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH]: \"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH]: \"Encoder and decoder must either both be fixed-size or variable-size.\",\n [SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE]: \"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.\",\n [SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH]: \"Expected a fixed-size codec, got a variable-size one.\",\n [SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH]: \"Codec [$codecDescription] expected a positive byte length, got $bytesLength.\",\n [SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH]: \"Expected a variable-size codec, got a fixed-size one.\",\n [SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE]: \"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].\",\n [SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH]: \"Codec [$codecDescription] expected $expected bytes, got $bytesLength.\",\n [SOLANA_ERROR__CODECS__INVALID_CONSTANT]: \"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].\",\n [SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT]: \"Invalid discriminated union variant. Expected one of [$variants], got $value.\",\n [SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT]: \"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.\",\n [SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT]: \"Invalid literal union variant. Expected one of [$variants], got $value.\",\n [SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS]: \"Expected [$codecDescription] to have $expected items, got $actual.\",\n [SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE]: \"Invalid value $value for base $base with alphabet $alphabet.\",\n [SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE]: \"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.\",\n [SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE]: \"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.\",\n [SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE]: \"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.\",\n [SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES]: \"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].\",\n [SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE]: \"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.\",\n [SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED]: \"No random values implementation could be found.\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED]: \"instruction requires an uninitialized account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED]: \"instruction tries to borrow reference for an account which is already borrowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING]: \"instruction left account with an outstanding borrowed reference\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED]: \"program other than the account's owner changed the size of the account data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL]: \"account data too small for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE]: \"instruction expected an executable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT]: \"An account does not have enough lamports to be rent-exempt\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW]: \"Program arithmetic overflowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR]: \"Failed to serialize or deserialize account data: $encodedData\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS]: \"Builtin programs must consume compute units\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH]: \"Cross-program invocation call depth too deep\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED]: \"Computational budget exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM]: \"custom program error: #$code\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX]: \"instruction contains duplicate accounts\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC]: \"instruction modifications of multiply-passed account differ\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT]: \"executable accounts must be rent exempt\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED]: \"instruction changed executable accounts data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE]: \"instruction changed the balance of an executable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED]: \"instruction changed executable bit of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED]: \"instruction modified data of an account it does not own\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND]: \"instruction spent from the balance of an account it does not own\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR]: \"generic instruction error\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER]: \"Provided owner is not allowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE]: \"Account is immutable\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY]: \"Incorrect authority provided\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID]: \"incorrect program id for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS]: \"insufficient funds for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA]: \"invalid account data for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER]: \"Invalid account owner\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT]: \"invalid program argument\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR]: \"program returned invalid error code\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA]: \"invalid instruction data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC]: \"Failed to reallocate account data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS]: \"Provided seeds do not result in a valid address\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED]: \"Accounts data allocations exceeded the maximum allowed per transaction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED]: \"Max accounts exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED]: \"Max instruction trace length exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED]: \"Length of the seed is too long for address generation\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT]: \"An account required by the instruction is missing\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE]: \"missing required signature for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID]: \"instruction illegally modified the program id of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS]: \"insufficient account keys for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION]: \"Cross-program invocation with unauthorized signer or writable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE]: \"Failed to create program execution environment\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE]: \"Program failed to compile\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE]: \"Program failed to complete\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED]: \"instruction modified data of a read-only account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE]: \"instruction changed the balance of a read-only account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED]: \"Cross-program invocation reentrancy not allowed for this instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED]: \"instruction modified rent epoch of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION]: \"sum of account balances before and after instruction do not match\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT]: \"instruction requires an initialized account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN]: \"\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID]: \"Unsupported program id\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR]: \"Unsupported sysvar\",\n [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS]: \"The instruction does not have any accounts.\",\n [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA]: \"The instruction does not have any data.\",\n [SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH]: \"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.\",\n [SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH]: \"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__INVALID_NONCE]: \"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING]: \"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED]: \"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE]: \"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING]: \"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE]: \"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR]: \"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__INVALID_PARAMS]: \"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__INVALID_REQUEST]: \"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND]: \"JSON-RPC error: The method does not exist / is not available ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__PARSE_ERROR]: \"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__SCAN_ERROR]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED]: \"Minimum context slot has not been reached\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY]: \"Node is unhealthy; behind by $numSlotsBehind slots\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT]: \"No snapshot\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE]: \"Transaction simulation failed\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE]: \"Transaction history is not available from this node\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH]: \"Transaction signature length mismatch\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE]: \"Transaction signature verification failure\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION]: \"$__serverMessage\",\n [SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH]: \"Key pair bytes must be of length 64, got $byteLength.\",\n [SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH]: \"Expected private key bytes with length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH]: \"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.\",\n [SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY]: \"The provided private key does not match the provided public key.\",\n [SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.\",\n [SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE]: \"Lamports value must be in the range [0, 2e64-1]\",\n [SOLANA_ERROR__MALFORMED_BIGINT_STRING]: \"`$value` cannot be parsed as a `BigInt`\",\n [SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR]: \"$message\",\n [SOLANA_ERROR__MALFORMED_NUMBER_STRING]: \"`$value` cannot be parsed as a `Number`\",\n [SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND]: \"No nonce account could be found at address `$nonceAccountAddress`\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN]: \"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED]: \"WebSocket was closed before payload could be added to the send buffer\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED]: \"WebSocket connection closed\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT]: \"WebSocket failed to connect\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID]: \"Failed to obtain a subscription id from the server\",\n [SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD]: \"Could not find an API plan for RPC method: `$method`\",\n [SOLANA_ERROR__RPC__INTEGER_OVERFLOW]: \"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.\",\n [SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR]: \"HTTP error ($statusCode): $message\",\n [SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN]: \"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.\",\n [SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS]: \"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.\",\n [SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER]: \"The provided value does not implement the `KeyPairSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER]: \"The provided value does not implement the `MessageModifyingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER]: \"The provided value does not implement the `MessagePartialSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER]: \"The provided value does not implement any of the `MessageSigner` interfaces\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER]: \"The provided value does not implement the `TransactionModifyingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER]: \"The provided value does not implement the `TransactionPartialSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER]: \"The provided value does not implement the `TransactionSendingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER]: \"The provided value does not implement any of the `TransactionSigner` interfaces\",\n [SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS]: \"More than one `TransactionSendingSigner` was identified.\",\n [SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING]: \"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.\",\n [SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED]: \"Wallet account signers do not support signing multiple messages/transactions in a single operation\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY]: \"Cannot export a non-extractable key.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED]: \"No digest implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT]: \"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED]: \"This runtime does not support the generation of Ed25519 key pairs.\\n\\nInstall @solana/webcrypto-ed25519-polyfill and call its `install` function before generating keys in environments that do not support Ed25519.\\n\\nFor a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED]: \"No signature verification implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED]: \"No key generation implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED]: \"No signing implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED]: \"No key export implementation could be found.\",\n [SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE]: \"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING]: \"Transaction processing left an account with an outstanding borrowed reference\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE]: \"Account in use\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE]: \"Account loaded twice\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND]: \"Attempt to debit an account but found no record of a prior credit.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND]: \"Transaction loads an address table account that doesn't exist\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED]: \"This transaction has already been processed\",\n [SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND]: \"Blockhash not found\",\n [SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP]: \"Loader call chain is too deep\",\n [SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE]: \"Transactions are currently disabled due to cluster maintenance\",\n [SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION]: \"Transaction contains a duplicate instruction ($index) that is not allowed\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE]: \"Insufficient funds for fee\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT]: \"Transaction results in an account ($accountIndex) with insufficient funds for rent\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE]: \"This account may not be used to pay transaction fees\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX]: \"Transaction contains an invalid account reference\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA]: \"Transaction loads an address table account with invalid data\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX]: \"Transaction address table lookup uses an invalid index\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER]: \"Transaction loads an address table account with an invalid owner\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT]: \"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION]: \"This program may not be used for executing instructions\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT]: \"Transaction leaves an account with a lower balance than rent-exempt minimum\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT]: \"Transaction loads a writable account that cannot be written\",\n [SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED]: \"Transaction exceeded max loaded accounts data size cap\",\n [SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE]: \"Transaction requires a fee but has no signature present\",\n [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND]: \"Attempt to load a program that does not exist\",\n [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED]: \"Execution of the program referenced by account at index $accountIndex is temporarily restricted.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED]: \"ResanitizationNeeded\",\n [SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE]: \"Transaction failed to sanitize accounts offsets correctly\",\n [SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE]: \"Transaction did not pass signature verification\",\n [SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS]: \"Transaction locked too many accounts\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION]: \"Sum of account balances before and after transaction do not match\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN]: \"The transaction failed with the error `$errorName`\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION]: \"Transaction version is unsupported\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT]: \"Transaction would exceed account data limit within the block\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT]: \"Transaction would exceed total account data limit\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT]: \"Transaction would exceed max account limit within the block\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT]: \"Transaction would exceed max Block Cost Limit\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT]: \"Transaction would exceed max Vote Cost Limit\",\n [SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION]: \"Attempted to sign a transaction with an address that is not a signer for it\",\n [SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING]: \"Transaction is missing an address at index: $index.\",\n [SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES]: \"Transaction has no expected signers therefore it cannot be encoded\",\n [SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT]: \"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes\",\n [SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME]: \"Transaction does not have a blockhash lifetime\",\n [SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME]: \"Transaction is not a durable nonce transaction\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING]: \"Contents of these address lookup tables unknown: $lookupTableAddresses\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE]: \"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING]: \"No fee payer set in CompiledTransaction\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND]: \"Could not find program address at index $index\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT]: \"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more\",\n [SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT]: \"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more\",\n [SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING]: \"Transaction is missing a fee payer.\",\n [SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING]: \"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.\",\n [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE]: \"Transaction first instruction is not advance nonce account instruction.\",\n [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING]: \"Transaction with no instructions cannot be durable nonce transaction.\",\n [SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES]: \"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees\",\n [SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE]: \"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable\",\n [SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH]: \"The transaction message expected the transaction to have $signerAddressesLength signatures, got $signaturesLength.\",\n [SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING]: \"Transaction is missing signatures for addresses: $addresses.\",\n [SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE]: \"Transaction version must be in the range [0, 127]. `$actualVersion` given\"\n };\n var START_INDEX = \"i\";\n var TYPE = \"t\";\n function getHumanReadableErrorMessage(code, context = {}) {\n const messageFormatString = SolanaErrorMessages[code];\n if (messageFormatString.length === 0) {\n return \"\";\n }\n let state;\n function commitStateUpTo(endIndex) {\n if (state[TYPE] === 2) {\n const variableName = messageFormatString.slice(state[START_INDEX] + 1, endIndex);\n fragments.push(\n variableName in context ? (\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n `${context[variableName]}`\n ) : `$${variableName}`\n );\n } else if (state[TYPE] === 1) {\n fragments.push(messageFormatString.slice(state[START_INDEX], endIndex));\n }\n }\n const fragments = [];\n messageFormatString.split(\"\").forEach((char, ii) => {\n if (ii === 0) {\n state = {\n [START_INDEX]: 0,\n [TYPE]: messageFormatString[0] === \"\\\\\" ? 0 : messageFormatString[0] === \"$\" ? 2 : 1\n /* Text */\n };\n return;\n }\n let nextState;\n switch (state[TYPE]) {\n case 0:\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 1\n /* Text */\n };\n break;\n case 1:\n if (char === \"\\\\\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 0\n /* EscapeSequence */\n };\n } else if (char === \"$\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 2\n /* Variable */\n };\n }\n break;\n case 2:\n if (char === \"\\\\\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 0\n /* EscapeSequence */\n };\n } else if (char === \"$\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 2\n /* Variable */\n };\n } else if (!char.match(/\\w/)) {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 1\n /* Text */\n };\n }\n break;\n }\n if (nextState) {\n if (state !== nextState) {\n commitStateUpTo(ii);\n }\n state = nextState;\n }\n });\n commitStateUpTo();\n return fragments.join(\"\");\n }\n function getErrorMessage(code, context = {}) {\n if (true) {\n return getHumanReadableErrorMessage(code, context);\n } else {\n let decodingAdviceMessage = `Solana error #${code}; Decode this error by running \\`npx @solana/errors decode -- ${code}`;\n if (Object.keys(context).length) {\n decodingAdviceMessage += ` '${encodeContextObject(context)}'`;\n }\n return `${decodingAdviceMessage}\\``;\n }\n }\n var SolanaError = class extends Error {\n /**\n * Indicates the root cause of this {@link SolanaError}, if any.\n *\n * For example, a transaction error might have an instruction error as its root cause. In this\n * case, you will be able to access the instruction error on the transaction error as `cause`.\n */\n cause = this.cause;\n /**\n * Contains context that can assist in understanding or recovering from a {@link SolanaError}.\n */\n context;\n constructor(...[code, contextAndErrorOptions]) {\n let context;\n let errorOptions;\n if (contextAndErrorOptions) {\n const { cause, ...contextRest } = contextAndErrorOptions;\n if (cause) {\n errorOptions = { cause };\n }\n if (Object.keys(contextRest).length > 0) {\n context = contextRest;\n }\n }\n const message = getErrorMessage(code, context);\n super(message, errorOptions);\n this.context = {\n __code: code,\n ...context\n };\n this.name = \"SolanaError\";\n }\n };\n\n // ../../../node_modules/.pnpm/@solana+codecs-core@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-core/dist/index.browser.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n function getEncodedSize(value, encoder) {\n return \"fixedSize\" in encoder ? encoder.fixedSize : encoder.getSizeFromValue(value);\n }\n function createEncoder(encoder) {\n return Object.freeze({\n ...encoder,\n encode: (value) => {\n const bytes = new Uint8Array(getEncodedSize(value, encoder));\n encoder.write(value, bytes, 0);\n return bytes;\n }\n });\n }\n function createDecoder(decoder) {\n return Object.freeze({\n ...decoder,\n decode: (bytes, offset2 = 0) => decoder.read(bytes, offset2)[0]\n });\n }\n function isFixedSize(codec) {\n return \"fixedSize\" in codec && typeof codec.fixedSize === \"number\";\n }\n function combineCodec(encoder, decoder) {\n if (isFixedSize(encoder) !== isFixedSize(decoder)) {\n throw new SolanaError(SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH);\n }\n if (isFixedSize(encoder) && isFixedSize(decoder) && encoder.fixedSize !== decoder.fixedSize) {\n throw new SolanaError(SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH, {\n decoderFixedSize: decoder.fixedSize,\n encoderFixedSize: encoder.fixedSize\n });\n }\n if (!isFixedSize(encoder) && !isFixedSize(decoder) && encoder.maxSize !== decoder.maxSize) {\n throw new SolanaError(SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH, {\n decoderMaxSize: decoder.maxSize,\n encoderMaxSize: encoder.maxSize\n });\n }\n return {\n ...decoder,\n ...encoder,\n decode: decoder.decode,\n encode: encoder.encode,\n read: decoder.read,\n write: encoder.write\n };\n }\n function assertByteArrayIsNotEmptyForCodec(codecDescription, bytes, offset2 = 0) {\n if (bytes.length - offset2 <= 0) {\n throw new SolanaError(SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY, {\n codecDescription\n });\n }\n }\n function assertByteArrayHasEnoughBytesForCodec(codecDescription, expected, bytes, offset2 = 0) {\n const bytesLength = bytes.length - offset2;\n if (bytesLength < expected) {\n throw new SolanaError(SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH, {\n bytesLength,\n codecDescription,\n expected\n });\n }\n }\n\n // ../../../node_modules/.pnpm/@solana+codecs-numbers@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-numbers/dist/index.browser.mjs\n function assertNumberIsBetweenForCodec(codecDescription, min, max, value) {\n if (value < min || value > max) {\n throw new SolanaError(SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE, {\n codecDescription,\n max,\n min,\n value\n });\n }\n }\n function isLittleEndian(config) {\n return config?.endian === 1 ? false : true;\n }\n function numberEncoderFactory(input) {\n return createEncoder({\n fixedSize: input.size,\n write(value, bytes, offset2) {\n if (input.range) {\n assertNumberIsBetweenForCodec(input.name, input.range[0], input.range[1], value);\n }\n const arrayBuffer = new ArrayBuffer(input.size);\n input.set(new DataView(arrayBuffer), value, isLittleEndian(input.config));\n bytes.set(new Uint8Array(arrayBuffer), offset2);\n return offset2 + input.size;\n }\n });\n }\n function numberDecoderFactory(input) {\n return createDecoder({\n fixedSize: input.size,\n read(bytes, offset2 = 0) {\n assertByteArrayIsNotEmptyForCodec(input.name, bytes, offset2);\n assertByteArrayHasEnoughBytesForCodec(input.name, input.size, bytes, offset2);\n const view = new DataView(toArrayBuffer(bytes, offset2, input.size));\n return [input.get(view, isLittleEndian(input.config)), offset2 + input.size];\n }\n });\n }\n function toArrayBuffer(bytes, offset2, length) {\n const bytesOffset = bytes.byteOffset + (offset2 ?? 0);\n const bytesLength = length ?? bytes.byteLength;\n return bytes.buffer.slice(bytesOffset, bytesOffset + bytesLength);\n }\n var getU64Encoder = (config = {}) => numberEncoderFactory({\n config,\n name: \"u64\",\n range: [0n, BigInt(\"0xffffffffffffffff\")],\n set: (view, value, le) => view.setBigUint64(0, BigInt(value), le),\n size: 8\n });\n var getU64Decoder = (config = {}) => numberDecoderFactory({\n config,\n get: (view, le) => view.getBigUint64(0, le),\n name: \"u64\",\n size: 8\n });\n var getU64Codec = (config = {}) => combineCodec(getU64Encoder(config), getU64Decoder(config));\n\n // ../../../node_modules/.pnpm/superstruct@2.0.2/node_modules/superstruct/dist/index.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n var StructError = class extends TypeError {\n constructor(failure, failures) {\n let cached;\n const { message, explanation, ...rest } = failure;\n const { path } = failure;\n const msg = path.length === 0 ? message : `At path: ${path.join(\".\")} -- ${message}`;\n super(explanation ?? msg);\n if (explanation != null)\n this.cause = msg;\n Object.assign(this, rest);\n this.name = this.constructor.name;\n this.failures = () => {\n return cached ?? (cached = [failure, ...failures()]);\n };\n }\n };\n function isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === \"function\";\n }\n function isObject(x) {\n return typeof x === \"object\" && x != null;\n }\n function isNonArrayObject(x) {\n return isObject(x) && !Array.isArray(x);\n }\n function print(value) {\n if (typeof value === \"symbol\") {\n return value.toString();\n }\n return typeof value === \"string\" ? JSON.stringify(value) : `${value}`;\n }\n function shiftIterator(input) {\n const { done, value } = input.next();\n return done ? void 0 : value;\n }\n function toFailure(result, context, struct2, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === \"string\") {\n result = { message: result };\n }\n const { path, branch } = context;\n const { type: type2 } = struct2;\n const { refinement, message = `Expected a value of type \\`${type2}\\`${refinement ? ` with refinement \\`${refinement}\\`` : \"\"}, but received: \\`${print(value)}\\`` } = result;\n return {\n value,\n type: type2,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message\n };\n }\n function* toFailures(result, context, struct2, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n for (const r of result) {\n const failure = toFailure(r, context, struct2, value);\n if (failure) {\n yield failure;\n }\n }\n }\n function* run(value, struct2, options = {}) {\n const { path = [], branch = [value], coerce: coerce2 = false, mask: mask2 = false } = options;\n const ctx = { path, branch, mask: mask2 };\n if (coerce2) {\n value = struct2.coercer(value, ctx);\n }\n let status = \"valid\";\n for (const failure of struct2.validator(value, ctx)) {\n failure.explanation = options.message;\n status = \"not_valid\";\n yield [failure, void 0];\n }\n for (let [k, v, s] of struct2.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === void 0 ? path : [...path, k],\n branch: k === void 0 ? branch : [...branch, v],\n coerce: coerce2,\n mask: mask2,\n message: options.message\n });\n for (const t of ts) {\n if (t[0]) {\n status = t[0].refinement != null ? \"not_refined\" : \"not_valid\";\n yield [t[0], void 0];\n } else if (coerce2) {\n v = t[1];\n if (k === void 0) {\n value = v;\n } else if (value instanceof Map) {\n value.set(k, v);\n } else if (value instanceof Set) {\n value.add(v);\n } else if (isObject(value)) {\n if (v !== void 0 || k in value)\n value[k] = v;\n }\n }\n }\n }\n if (status !== \"not_valid\") {\n for (const failure of struct2.refiner(value, ctx)) {\n failure.explanation = options.message;\n status = \"not_refined\";\n yield [failure, void 0];\n }\n }\n if (status === \"valid\") {\n yield [void 0, value];\n }\n }\n var Struct = class {\n constructor(props) {\n const { type: type2, schema, validator, refiner, coercer = (value) => value, entries = function* () {\n } } = props;\n this.type = type2;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.validator = () => [];\n }\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n assert(value, message) {\n return assert(value, this, message);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n create(value, message) {\n return create(value, this, message);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema. Masking applies recursively to\n * props of `object` structs only.\n */\n mask(value, message) {\n return mask(value, this, message);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `coerce` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful. Also, `mask` will turn on\n * masking of the unknown `object` props recursively if passed.\n */\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n };\n function assert(value, struct2, message) {\n const result = validate(value, struct2, { message });\n if (result[0]) {\n throw result[0];\n }\n }\n function create(value, struct2, message) {\n const result = validate(value, struct2, { coerce: true, message });\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n }\n function mask(value, struct2, message) {\n const result = validate(value, struct2, { coerce: true, mask: true, message });\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n }\n function is(value, struct2) {\n const result = validate(value, struct2);\n return !result[0];\n }\n function validate(value, struct2, options = {}) {\n const tuples = run(value, struct2, options);\n const tuple2 = shiftIterator(tuples);\n if (tuple2[0]) {\n const error = new StructError(tuple2[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, void 0];\n } else {\n const v = tuple2[1];\n return [void 0, v];\n }\n }\n function define(name, validator) {\n return new Struct({ type: name, schema: null, validator });\n }\n function any() {\n return define(\"any\", () => true);\n }\n function array(Element) {\n return new Struct({\n type: \"array\",\n schema: Element,\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n validator(value) {\n return Array.isArray(value) || `Expected an array value, but received: ${print(value)}`;\n }\n });\n }\n function boolean() {\n return define(\"boolean\", (value) => {\n return typeof value === \"boolean\";\n });\n }\n function instance(Class) {\n return define(\"instance\", (value) => {\n return value instanceof Class || `Expected a \\`${Class.name}\\` instance, but received: ${print(value)}`;\n });\n }\n function literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: \"literal\",\n schema: t === \"string\" || t === \"number\" || t === \"boolean\" ? constant : null,\n validator(value) {\n return value === constant || `Expected the literal \\`${description}\\`, but received: ${print(value)}`;\n }\n });\n }\n function never() {\n return define(\"never\", () => false);\n }\n function nullable(struct2) {\n return new Struct({\n ...struct2,\n validator: (value, ctx) => value === null || struct2.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct2.refiner(value, ctx)\n });\n }\n function number() {\n return define(\"number\", (value) => {\n return typeof value === \"number\" && !isNaN(value) || `Expected a number, but received: ${print(value)}`;\n });\n }\n function optional(struct2) {\n return new Struct({\n ...struct2,\n validator: (value, ctx) => value === void 0 || struct2.validator(value, ctx),\n refiner: (value, ctx) => value === void 0 || struct2.refiner(value, ctx)\n });\n }\n function record(Key, Value) {\n return new Struct({\n type: \"record\",\n schema: null,\n *entries(value) {\n if (isObject(value)) {\n for (const k in value) {\n const v = value[k];\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n validator(value) {\n return isNonArrayObject(value) || `Expected an object, but received: ${print(value)}`;\n },\n coercer(value) {\n return isNonArrayObject(value) ? { ...value } : value;\n }\n });\n }\n function string() {\n return define(\"string\", (value) => {\n return typeof value === \"string\" || `Expected a string, but received: ${print(value)}`;\n });\n }\n function tuple(Structs) {\n const Never = never();\n return new Struct({\n type: \"tuple\",\n schema: null,\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Structs.length, value.length);\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Structs[i] || Never];\n }\n }\n },\n validator(value) {\n return Array.isArray(value) || `Expected an array, but received: ${print(value)}`;\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n }\n });\n }\n function type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: \"type\",\n schema,\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n validator(value) {\n return isNonArrayObject(value) || `Expected an object, but received: ${print(value)}`;\n },\n coercer(value) {\n return isNonArrayObject(value) ? { ...value } : value;\n }\n });\n }\n function union(Structs) {\n const description = Structs.map((s) => s.type).join(\" | \");\n return new Struct({\n type: \"union\",\n schema: null,\n coercer(value, ctx) {\n for (const S of Structs) {\n const [error, coerced] = S.validate(value, {\n coerce: true,\n mask: ctx.mask\n });\n if (!error) {\n return coerced;\n }\n }\n return value;\n },\n validator(value, ctx) {\n const failures = [];\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n return [\n `Expected the value to satisfy a union of \\`${description}\\`, but received: ${print(value)}`,\n ...failures\n ];\n }\n });\n }\n function unknown() {\n return define(\"unknown\", () => true);\n }\n function coerce(struct2, condition, coercer) {\n return new Struct({\n ...struct2,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct2.coercer(coercer(value, ctx), ctx) : struct2.coercer(value, ctx);\n }\n });\n }\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n var import_browser = __toESM(require_browser());\n\n // ../../../node_modules/.pnpm/rpc-websockets@9.1.3/node_modules/rpc-websockets/dist/index.browser.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n init_buffer();\n\n // ../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n var import_index = __toESM(require_eventemitter3(), 1);\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha3.js\n init_dirname();\n init_buffer2();\n init_process2();\n var _0n6 = BigInt(0);\n var _1n6 = BigInt(1);\n var _2n4 = BigInt(2);\n var _7n2 = BigInt(7);\n var _256n = BigInt(256);\n var _0x71n = BigInt(113);\n var SHA3_PI = [];\n var SHA3_ROTL = [];\n var _SHA3_IOTA = [];\n for (let round = 0, R = _1n6, x = 1, y = 0; round < 24; round++) {\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);\n let t = _0n6;\n for (let j = 0; j < 7; j++) {\n R = (R << _1n6 ^ (R >> _7n2) * _0x71n) % _256n;\n if (R & _2n4)\n t ^= _1n6 << (_1n6 << /* @__PURE__ */ BigInt(j)) - _1n6;\n }\n _SHA3_IOTA.push(t);\n }\n var IOTAS = split(_SHA3_IOTA, true);\n var SHA3_IOTA_H = IOTAS[0];\n var SHA3_IOTA_L = IOTAS[1];\n var rotlH = (h, l, s) => s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s);\n var rotlL = (h, l, s) => s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s);\n function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n for (let round = 24 - rounds; round < 24; round++) {\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n clean(B);\n }\n var Keccak = class _Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n this.enableXOF = false;\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n anumber(outputLen);\n if (!(0 < blockLen && blockLen < 200))\n throw new Error(\"only keccak-f1600 function is supported\");\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n clone() {\n return this._cloneInto();\n }\n keccak() {\n swap32IfBE(this.state32);\n keccakP(this.state32, this.rounds);\n swap32IfBE(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n aexists(this);\n data = toBytes(data);\n abytes(data);\n const { blockLen, state } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n state[pos] ^= suffix;\n if ((suffix & 128) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 128;\n this.keccak();\n }\n writeInto(out) {\n aexists(this, false);\n abytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len; ) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n if (!this.enableXOF)\n throw new Error(\"XOF is not possible for this instance\");\n return this.writeInto(out);\n }\n xof(bytes) {\n anumber(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n aoutput(out, this);\n if (this.finished)\n throw new Error(\"digest() was already called\");\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n clean(this.state);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n };\n var gen = (suffix, blockLen, outputLen) => createHasher(() => new Keccak(blockLen, suffix, outputLen));\n var keccak_256 = /* @__PURE__ */ (() => gen(1, 136, 256 / 8))();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/secp256k1.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/_shortw_utils.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/weierstrass.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js\n init_dirname();\n init_buffer2();\n init_process2();\n var HMAC = class extends Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n ahash(hash);\n const key = toBytes(_key);\n this.iHash = hash.create();\n if (typeof this.iHash.update !== \"function\")\n throw new Error(\"Expected instance of class which extends utils.Hash\");\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad = new Uint8Array(blockLen);\n pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 54;\n this.iHash.update(pad);\n this.oHash = hash.create();\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 54 ^ 92;\n this.oHash.update(pad);\n clean(pad);\n }\n update(buf) {\n aexists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n aexists(this);\n abytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n };\n var hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\n hmac.create = (hash, key) => new HMAC(hash, key);\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/weierstrass.js\n var divNearest = (num, den) => (num + (num >= 0 ? den : -den) / _2n5) / den;\n function _splitEndoScalar(k, basis, n) {\n const [[a1, b1], [a2, b2]] = basis;\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = k - c1 * a1 - c2 * a2;\n let k2 = -c1 * b1 - c2 * b2;\n const k1neg = k1 < _0n7;\n const k2neg = k2 < _0n7;\n if (k1neg)\n k1 = -k1;\n if (k2neg)\n k2 = -k2;\n const MAX_NUM = bitMask(Math.ceil(bitLen(n) / 2)) + _1n7;\n if (k1 < _0n7 || k1 >= MAX_NUM || k2 < _0n7 || k2 >= MAX_NUM) {\n throw new Error(\"splitScalar (endomorphism): failed, k=\" + k);\n }\n return { k1neg, k1, k2neg, k2 };\n }\n function validateSigFormat(format) {\n if (![\"compact\", \"recovered\", \"der\"].includes(format))\n throw new Error('Signature format must be \"compact\", \"recovered\", or \"der\"');\n return format;\n }\n function validateSigOpts(opts, def) {\n const optsn = {};\n for (let optName of Object.keys(def)) {\n optsn[optName] = opts[optName] === void 0 ? def[optName] : opts[optName];\n }\n _abool2(optsn.lowS, \"lowS\");\n _abool2(optsn.prehash, \"prehash\");\n if (optsn.format !== void 0)\n validateSigFormat(optsn.format);\n return optsn;\n }\n var DERErr = class extends Error {\n constructor(m = \"\") {\n super(m);\n }\n };\n var DER = {\n // asn.1 DER encoding utils\n Err: DERErr,\n // Basic building block is TLV (Tag-Length-Value)\n _tlv: {\n encode: (tag, data) => {\n const { Err: E } = DER;\n if (tag < 0 || tag > 256)\n throw new E(\"tlv.encode: wrong tag\");\n if (data.length & 1)\n throw new E(\"tlv.encode: unpadded data\");\n const dataLen = data.length / 2;\n const len = numberToHexUnpadded(dataLen);\n if (len.length / 2 & 128)\n throw new E(\"tlv.encode: long form length too big\");\n const lenLen = dataLen > 127 ? numberToHexUnpadded(len.length / 2 | 128) : \"\";\n const t = numberToHexUnpadded(tag);\n return t + lenLen + len + data;\n },\n // v - value, l - left bytes (unparsed)\n decode(tag, data) {\n const { Err: E } = DER;\n let pos = 0;\n if (tag < 0 || tag > 256)\n throw new E(\"tlv.encode: wrong tag\");\n if (data.length < 2 || data[pos++] !== tag)\n throw new E(\"tlv.decode: wrong tlv\");\n const first = data[pos++];\n const isLong = !!(first & 128);\n let length = 0;\n if (!isLong)\n length = first;\n else {\n const lenLen = first & 127;\n if (!lenLen)\n throw new E(\"tlv.decode(long): indefinite length not supported\");\n if (lenLen > 4)\n throw new E(\"tlv.decode(long): byte length is too big\");\n const lengthBytes = data.subarray(pos, pos + lenLen);\n if (lengthBytes.length !== lenLen)\n throw new E(\"tlv.decode: length bytes not complete\");\n if (lengthBytes[0] === 0)\n throw new E(\"tlv.decode(long): zero leftmost byte\");\n for (const b of lengthBytes)\n length = length << 8 | b;\n pos += lenLen;\n if (length < 128)\n throw new E(\"tlv.decode(long): not minimal encoding\");\n }\n const v = data.subarray(pos, pos + length);\n if (v.length !== length)\n throw new E(\"tlv.decode: wrong value length\");\n return { v, l: data.subarray(pos + length) };\n }\n },\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n _int: {\n encode(num) {\n const { Err: E } = DER;\n if (num < _0n7)\n throw new E(\"integer: negative integers are not allowed\");\n let hex = numberToHexUnpadded(num);\n if (Number.parseInt(hex[0], 16) & 8)\n hex = \"00\" + hex;\n if (hex.length & 1)\n throw new E(\"unexpected DER parsing assertion: unpadded hex\");\n return hex;\n },\n decode(data) {\n const { Err: E } = DER;\n if (data[0] & 128)\n throw new E(\"invalid signature integer: negative\");\n if (data[0] === 0 && !(data[1] & 128))\n throw new E(\"invalid signature integer: unnecessary leading zero\");\n return bytesToNumberBE(data);\n }\n },\n toSig(hex) {\n const { Err: E, _int: int, _tlv: tlv } = DER;\n const data = ensureBytes(\"signature\", hex);\n const { v: seqBytes, l: seqLeftBytes } = tlv.decode(48, data);\n if (seqLeftBytes.length)\n throw new E(\"invalid signature: left bytes after parsing\");\n const { v: rBytes, l: rLeftBytes } = tlv.decode(2, seqBytes);\n const { v: sBytes, l: sLeftBytes } = tlv.decode(2, rLeftBytes);\n if (sLeftBytes.length)\n throw new E(\"invalid signature: left bytes after parsing\");\n return { r: int.decode(rBytes), s: int.decode(sBytes) };\n },\n hexFromSig(sig) {\n const { _tlv: tlv, _int: int } = DER;\n const rs = tlv.encode(2, int.encode(sig.r));\n const ss = tlv.encode(2, int.encode(sig.s));\n const seq2 = rs + ss;\n return tlv.encode(48, seq2);\n }\n };\n var _0n7 = BigInt(0);\n var _1n7 = BigInt(1);\n var _2n5 = BigInt(2);\n var _3n3 = BigInt(3);\n var _4n2 = BigInt(4);\n function _normFnElement(Fn2, key) {\n const { BYTES: expected } = Fn2;\n let num;\n if (typeof key === \"bigint\") {\n num = key;\n } else {\n let bytes = ensureBytes(\"private key\", key);\n try {\n num = Fn2.fromBytes(bytes);\n } catch (error) {\n throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof key}`);\n }\n }\n if (!Fn2.isValidNot0(num))\n throw new Error(\"invalid private key: out of range [1..N-1]\");\n return num;\n }\n function weierstrassN(params, extraOpts = {}) {\n const validated = _createCurveFields(\"weierstrass\", params, extraOpts);\n const { Fp: Fp2, Fn: Fn2 } = validated;\n let CURVE = validated.CURVE;\n const { h: cofactor, n: CURVE_ORDER } = CURVE;\n _validateObject(extraOpts, {}, {\n allowInfinityPoint: \"boolean\",\n clearCofactor: \"function\",\n isTorsionFree: \"function\",\n fromBytes: \"function\",\n toBytes: \"function\",\n endo: \"object\",\n wrapPrivateKey: \"boolean\"\n });\n const { endo } = extraOpts;\n if (endo) {\n if (!Fp2.is0(CURVE.a) || typeof endo.beta !== \"bigint\" || !Array.isArray(endo.basises)) {\n throw new Error('invalid endo: expected \"beta\": bigint and \"basises\": array');\n }\n }\n const lengths = getWLengths(Fp2, Fn2);\n function assertCompressionIsSupported() {\n if (!Fp2.isOdd)\n throw new Error(\"compression is not supported: Field does not have .isOdd()\");\n }\n function pointToBytes(_c, point, isCompressed) {\n const { x, y } = point.toAffine();\n const bx = Fp2.toBytes(x);\n _abool2(isCompressed, \"isCompressed\");\n if (isCompressed) {\n assertCompressionIsSupported();\n const hasEvenY = !Fp2.isOdd(y);\n return concatBytes(pprefix(hasEvenY), bx);\n } else {\n return concatBytes(Uint8Array.of(4), bx, Fp2.toBytes(y));\n }\n }\n function pointFromBytes(bytes) {\n _abytes2(bytes, void 0, \"Point\");\n const { publicKey: comp, publicKeyUncompressed: uncomp } = lengths;\n const length = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (length === comp && (head === 2 || head === 3)) {\n const x = Fp2.fromBytes(tail);\n if (!Fp2.isValid(x))\n throw new Error(\"bad point: is not on curve, wrong x\");\n const y2 = weierstrassEquation(x);\n let y;\n try {\n y = Fp2.sqrt(y2);\n } catch (sqrtError) {\n const err = sqrtError instanceof Error ? \": \" + sqrtError.message : \"\";\n throw new Error(\"bad point: is not on curve, sqrt error\" + err);\n }\n assertCompressionIsSupported();\n const isYOdd = Fp2.isOdd(y);\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y = Fp2.neg(y);\n return { x, y };\n } else if (length === uncomp && head === 4) {\n const L = Fp2.BYTES;\n const x = Fp2.fromBytes(tail.subarray(0, L));\n const y = Fp2.fromBytes(tail.subarray(L, L * 2));\n if (!isValidXY(x, y))\n throw new Error(\"bad point: is not on curve\");\n return { x, y };\n } else {\n throw new Error(`bad point: got length ${length}, expected compressed=${comp} or uncompressed=${uncomp}`);\n }\n }\n const encodePoint = extraOpts.toBytes || pointToBytes;\n const decodePoint = extraOpts.fromBytes || pointFromBytes;\n function weierstrassEquation(x) {\n const x2 = Fp2.sqr(x);\n const x3 = Fp2.mul(x2, x);\n return Fp2.add(Fp2.add(x3, Fp2.mul(x, CURVE.a)), CURVE.b);\n }\n function isValidXY(x, y) {\n const left = Fp2.sqr(y);\n const right = weierstrassEquation(x);\n return Fp2.eql(left, right);\n }\n if (!isValidXY(CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n const _4a3 = Fp2.mul(Fp2.pow(CURVE.a, _3n3), _4n2);\n const _27b2 = Fp2.mul(Fp2.sqr(CURVE.b), BigInt(27));\n if (Fp2.is0(Fp2.add(_4a3, _27b2)))\n throw new Error(\"bad curve params: a or b\");\n function acoord(title, n, banZero = false) {\n if (!Fp2.isValid(n) || banZero && Fp2.is0(n))\n throw new Error(`bad point coordinate ${title}`);\n return n;\n }\n function aprjpoint(other) {\n if (!(other instanceof Point))\n throw new Error(\"ProjectivePoint expected\");\n }\n function splitEndoScalarN(k) {\n if (!endo || !endo.basises)\n throw new Error(\"no endo\");\n return _splitEndoScalar(k, endo.basises, Fn2.ORDER);\n }\n const toAffineMemo = memoized((p, iz) => {\n const { X, Y, Z } = p;\n if (Fp2.eql(Z, Fp2.ONE))\n return { x: X, y: Y };\n const is0 = p.is0();\n if (iz == null)\n iz = is0 ? Fp2.ONE : Fp2.inv(Z);\n const x = Fp2.mul(X, iz);\n const y = Fp2.mul(Y, iz);\n const zz = Fp2.mul(Z, iz);\n if (is0)\n return { x: Fp2.ZERO, y: Fp2.ZERO };\n if (!Fp2.eql(zz, Fp2.ONE))\n throw new Error(\"invZ was invalid\");\n return { x, y };\n });\n const assertValidMemo = memoized((p) => {\n if (p.is0()) {\n if (extraOpts.allowInfinityPoint && !Fp2.is0(p.Y))\n return;\n throw new Error(\"bad point: ZERO\");\n }\n const { x, y } = p.toAffine();\n if (!Fp2.isValid(x) || !Fp2.isValid(y))\n throw new Error(\"bad point: x or y not field elements\");\n if (!isValidXY(x, y))\n throw new Error(\"bad point: equation left != right\");\n if (!p.isTorsionFree())\n throw new Error(\"bad point: not in prime-order subgroup\");\n return true;\n });\n function finishEndo(endoBeta, k1p, k2p, k1neg, k2neg) {\n k2p = new Point(Fp2.mul(k2p.X, endoBeta), k2p.Y, k2p.Z);\n k1p = negateCt(k1neg, k1p);\n k2p = negateCt(k2neg, k2p);\n return k1p.add(k2p);\n }\n class Point {\n /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n constructor(X, Y, Z) {\n this.X = acoord(\"x\", X);\n this.Y = acoord(\"y\", Y, true);\n this.Z = acoord(\"z\", Z);\n Object.freeze(this);\n }\n static CURVE() {\n return CURVE;\n }\n /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n static fromAffine(p) {\n const { x, y } = p || {};\n if (!p || !Fp2.isValid(x) || !Fp2.isValid(y))\n throw new Error(\"invalid affine point\");\n if (p instanceof Point)\n throw new Error(\"projective point not allowed\");\n if (Fp2.is0(x) && Fp2.is0(y))\n return Point.ZERO;\n return new Point(x, y, Fp2.ONE);\n }\n static fromBytes(bytes) {\n const P = Point.fromAffine(decodePoint(_abytes2(bytes, void 0, \"point\")));\n P.assertValidity();\n return P;\n }\n static fromHex(hex) {\n return Point.fromBytes(ensureBytes(\"pointHex\", hex));\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n *\n * @param windowSize\n * @param isLazy true will defer table computation until the first multiplication\n * @returns\n */\n precompute(windowSize = 8, isLazy = true) {\n wnaf.createCache(this, windowSize);\n if (!isLazy)\n this.multiply(_3n3);\n return this;\n }\n // TODO: return `this`\n /** A point on curve is valid if it conforms to equation. */\n assertValidity() {\n assertValidMemo(this);\n }\n hasEvenY() {\n const { y } = this.toAffine();\n if (!Fp2.isOdd)\n throw new Error(\"Field doesn't support isOdd\");\n return !Fp2.isOdd(y);\n }\n /** Compare one point to another. */\n equals(other) {\n aprjpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n const U1 = Fp2.eql(Fp2.mul(X1, Z2), Fp2.mul(X2, Z1));\n const U2 = Fp2.eql(Fp2.mul(Y1, Z2), Fp2.mul(Y2, Z1));\n return U1 && U2;\n }\n /** Flips point to one corresponding to (x, -y) in Affine coordinates. */\n negate() {\n return new Point(this.X, Fp2.neg(this.Y), this.Z);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a, b } = CURVE;\n const b3 = Fp2.mul(b, _3n3);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n let X3 = Fp2.ZERO, Y3 = Fp2.ZERO, Z3 = Fp2.ZERO;\n let t0 = Fp2.mul(X1, X1);\n let t1 = Fp2.mul(Y1, Y1);\n let t2 = Fp2.mul(Z1, Z1);\n let t3 = Fp2.mul(X1, Y1);\n t3 = Fp2.add(t3, t3);\n Z3 = Fp2.mul(X1, Z1);\n Z3 = Fp2.add(Z3, Z3);\n X3 = Fp2.mul(a, Z3);\n Y3 = Fp2.mul(b3, t2);\n Y3 = Fp2.add(X3, Y3);\n X3 = Fp2.sub(t1, Y3);\n Y3 = Fp2.add(t1, Y3);\n Y3 = Fp2.mul(X3, Y3);\n X3 = Fp2.mul(t3, X3);\n Z3 = Fp2.mul(b3, Z3);\n t2 = Fp2.mul(a, t2);\n t3 = Fp2.sub(t0, t2);\n t3 = Fp2.mul(a, t3);\n t3 = Fp2.add(t3, Z3);\n Z3 = Fp2.add(t0, t0);\n t0 = Fp2.add(Z3, t0);\n t0 = Fp2.add(t0, t2);\n t0 = Fp2.mul(t0, t3);\n Y3 = Fp2.add(Y3, t0);\n t2 = Fp2.mul(Y1, Z1);\n t2 = Fp2.add(t2, t2);\n t0 = Fp2.mul(t2, t3);\n X3 = Fp2.sub(X3, t0);\n Z3 = Fp2.mul(t2, t1);\n Z3 = Fp2.add(Z3, Z3);\n Z3 = Fp2.add(Z3, Z3);\n return new Point(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n aprjpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n let X3 = Fp2.ZERO, Y3 = Fp2.ZERO, Z3 = Fp2.ZERO;\n const a = CURVE.a;\n const b3 = Fp2.mul(CURVE.b, _3n3);\n let t0 = Fp2.mul(X1, X2);\n let t1 = Fp2.mul(Y1, Y2);\n let t2 = Fp2.mul(Z1, Z2);\n let t3 = Fp2.add(X1, Y1);\n let t4 = Fp2.add(X2, Y2);\n t3 = Fp2.mul(t3, t4);\n t4 = Fp2.add(t0, t1);\n t3 = Fp2.sub(t3, t4);\n t4 = Fp2.add(X1, Z1);\n let t5 = Fp2.add(X2, Z2);\n t4 = Fp2.mul(t4, t5);\n t5 = Fp2.add(t0, t2);\n t4 = Fp2.sub(t4, t5);\n t5 = Fp2.add(Y1, Z1);\n X3 = Fp2.add(Y2, Z2);\n t5 = Fp2.mul(t5, X3);\n X3 = Fp2.add(t1, t2);\n t5 = Fp2.sub(t5, X3);\n Z3 = Fp2.mul(a, t4);\n X3 = Fp2.mul(b3, t2);\n Z3 = Fp2.add(X3, Z3);\n X3 = Fp2.sub(t1, Z3);\n Z3 = Fp2.add(t1, Z3);\n Y3 = Fp2.mul(X3, Z3);\n t1 = Fp2.add(t0, t0);\n t1 = Fp2.add(t1, t0);\n t2 = Fp2.mul(a, t2);\n t4 = Fp2.mul(b3, t4);\n t1 = Fp2.add(t1, t2);\n t2 = Fp2.sub(t0, t2);\n t2 = Fp2.mul(a, t2);\n t4 = Fp2.add(t4, t2);\n t0 = Fp2.mul(t1, t4);\n Y3 = Fp2.add(Y3, t0);\n t0 = Fp2.mul(t5, t4);\n X3 = Fp2.mul(t3, X3);\n X3 = Fp2.sub(X3, t0);\n t0 = Fp2.mul(t3, t1);\n Z3 = Fp2.mul(t5, Z3);\n Z3 = Fp2.add(Z3, t0);\n return new Point(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n const { endo: endo2 } = extraOpts;\n if (!Fn2.isValidNot0(scalar))\n throw new Error(\"invalid scalar: out of range\");\n let point, fake;\n const mul = (n) => wnaf.cached(this, n, (p) => normalizeZ(Point, p));\n if (endo2) {\n const { k1neg, k1, k2neg, k2 } = splitEndoScalarN(scalar);\n const { p: k1p, f: k1f } = mul(k1);\n const { p: k2p, f: k2f } = mul(k2);\n fake = k1f.add(k2f);\n point = finishEndo(endo2.beta, k1p, k2p, k1neg, k2neg);\n } else {\n const { p, f: f2 } = mul(scalar);\n point = p;\n fake = f2;\n }\n return normalizeZ(Point, [point, fake])[0];\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed secret key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(sc) {\n const { endo: endo2 } = extraOpts;\n const p = this;\n if (!Fn2.isValid(sc))\n throw new Error(\"invalid scalar: out of range\");\n if (sc === _0n7 || p.is0())\n return Point.ZERO;\n if (sc === _1n7)\n return p;\n if (wnaf.hasCache(this))\n return this.multiply(sc);\n if (endo2) {\n const { k1neg, k1, k2neg, k2 } = splitEndoScalarN(sc);\n const { p1, p2 } = mulEndoUnsafe(Point, p, k1, k2);\n return finishEndo(endo2.beta, p1, p2, k1neg, k2neg);\n } else {\n return wnaf.unsafe(p, sc);\n }\n }\n multiplyAndAddUnsafe(Q, a, b) {\n const sum = this.multiplyUnsafe(a).add(Q.multiplyUnsafe(b));\n return sum.is0() ? void 0 : sum;\n }\n /**\n * Converts Projective point to affine (x, y) coordinates.\n * @param invertedZ Z^-1 (inverted zero) - optional, precomputation is useful for invertBatch\n */\n toAffine(invertedZ) {\n return toAffineMemo(this, invertedZ);\n }\n /**\n * Checks whether Point is free of torsion elements (is in prime subgroup).\n * Always torsion-free for cofactor=1 curves.\n */\n isTorsionFree() {\n const { isTorsionFree } = extraOpts;\n if (cofactor === _1n7)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point, this);\n return wnaf.unsafe(this, CURVE_ORDER).is0();\n }\n clearCofactor() {\n const { clearCofactor } = extraOpts;\n if (cofactor === _1n7)\n return this;\n if (clearCofactor)\n return clearCofactor(Point, this);\n return this.multiplyUnsafe(cofactor);\n }\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n toBytes(isCompressed = true) {\n _abool2(isCompressed, \"isCompressed\");\n this.assertValidity();\n return encodePoint(Point, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return bytesToHex(this.toBytes(isCompressed));\n }\n toString() {\n return ``;\n }\n // TODO: remove\n get px() {\n return this.X;\n }\n get py() {\n return this.X;\n }\n get pz() {\n return this.Z;\n }\n toRawBytes(isCompressed = true) {\n return this.toBytes(isCompressed);\n }\n _setWindowSize(windowSize) {\n this.precompute(windowSize);\n }\n static normalizeZ(points) {\n return normalizeZ(Point, points);\n }\n static msm(points, scalars) {\n return pippenger(Point, Fn2, points, scalars);\n }\n static fromPrivateKey(privateKey) {\n return Point.BASE.multiply(_normFnElement(Fn2, privateKey));\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp2.ONE);\n Point.ZERO = new Point(Fp2.ZERO, Fp2.ONE, Fp2.ZERO);\n Point.Fp = Fp2;\n Point.Fn = Fn2;\n const bits = Fn2.BITS;\n const wnaf = new wNAF(Point, extraOpts.endo ? Math.ceil(bits / 2) : bits);\n Point.BASE.precompute(8);\n return Point;\n }\n function pprefix(hasEvenY) {\n return Uint8Array.of(hasEvenY ? 2 : 3);\n }\n function getWLengths(Fp2, Fn2) {\n return {\n secretKey: Fn2.BYTES,\n publicKey: 1 + Fp2.BYTES,\n publicKeyUncompressed: 1 + 2 * Fp2.BYTES,\n publicKeyHasPrefix: true,\n signature: 2 * Fn2.BYTES\n };\n }\n function ecdh(Point, ecdhOpts = {}) {\n const { Fn: Fn2 } = Point;\n const randomBytes_ = ecdhOpts.randomBytes || randomBytes;\n const lengths = Object.assign(getWLengths(Point.Fp, Fn2), { seed: getMinHashLength(Fn2.ORDER) });\n function isValidSecretKey(secretKey) {\n try {\n return !!_normFnElement(Fn2, secretKey);\n } catch (error) {\n return false;\n }\n }\n function isValidPublicKey(publicKey2, isCompressed) {\n const { publicKey: comp, publicKeyUncompressed } = lengths;\n try {\n const l = publicKey2.length;\n if (isCompressed === true && l !== comp)\n return false;\n if (isCompressed === false && l !== publicKeyUncompressed)\n return false;\n return !!Point.fromBytes(publicKey2);\n } catch (error) {\n return false;\n }\n }\n function randomSecretKey(seed = randomBytes_(lengths.seed)) {\n return mapHashToField(_abytes2(seed, lengths.seed, \"seed\"), Fn2.ORDER);\n }\n function getPublicKey2(secretKey, isCompressed = true) {\n return Point.BASE.multiply(_normFnElement(Fn2, secretKey)).toBytes(isCompressed);\n }\n function keygen(seed) {\n const secretKey = randomSecretKey(seed);\n return { secretKey, publicKey: getPublicKey2(secretKey) };\n }\n function isProbPub(item) {\n if (typeof item === \"bigint\")\n return false;\n if (item instanceof Point)\n return true;\n const { secretKey, publicKey: publicKey2, publicKeyUncompressed } = lengths;\n if (Fn2.allowedLengths || secretKey === publicKey2)\n return void 0;\n const l = ensureBytes(\"key\", item).length;\n return l === publicKey2 || l === publicKeyUncompressed;\n }\n function getSharedSecret(secretKeyA, publicKeyB, isCompressed = true) {\n if (isProbPub(secretKeyA) === true)\n throw new Error(\"first arg must be private key\");\n if (isProbPub(publicKeyB) === false)\n throw new Error(\"second arg must be public key\");\n const s = _normFnElement(Fn2, secretKeyA);\n const b = Point.fromHex(publicKeyB);\n return b.multiply(s).toBytes(isCompressed);\n }\n const utils = {\n isValidSecretKey,\n isValidPublicKey,\n randomSecretKey,\n // TODO: remove\n isValidPrivateKey: isValidSecretKey,\n randomPrivateKey: randomSecretKey,\n normPrivateKeyToScalar: (key) => _normFnElement(Fn2, key),\n precompute(windowSize = 8, point = Point.BASE) {\n return point.precompute(windowSize, false);\n }\n };\n return Object.freeze({ getPublicKey: getPublicKey2, getSharedSecret, keygen, Point, utils, lengths });\n }\n function ecdsa(Point, hash, ecdsaOpts = {}) {\n ahash(hash);\n _validateObject(ecdsaOpts, {}, {\n hmac: \"function\",\n lowS: \"boolean\",\n randomBytes: \"function\",\n bits2int: \"function\",\n bits2int_modN: \"function\"\n });\n const randomBytes2 = ecdsaOpts.randomBytes || randomBytes;\n const hmac2 = ecdsaOpts.hmac || ((key, ...msgs) => hmac(hash, key, concatBytes(...msgs)));\n const { Fp: Fp2, Fn: Fn2 } = Point;\n const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn2;\n const { keygen, getPublicKey: getPublicKey2, getSharedSecret, utils, lengths } = ecdh(Point, ecdsaOpts);\n const defaultSigOpts = {\n prehash: false,\n lowS: typeof ecdsaOpts.lowS === \"boolean\" ? ecdsaOpts.lowS : false,\n format: void 0,\n //'compact' as ECDSASigFormat,\n extraEntropy: false\n };\n const defaultSigOpts_format = \"compact\";\n function isBiggerThanHalfOrder(number2) {\n const HALF = CURVE_ORDER >> _1n7;\n return number2 > HALF;\n }\n function validateRS(title, num) {\n if (!Fn2.isValidNot0(num))\n throw new Error(`invalid signature ${title}: out of range 1..Point.Fn.ORDER`);\n return num;\n }\n function validateSigLength(bytes, format) {\n validateSigFormat(format);\n const size = lengths.signature;\n const sizer = format === \"compact\" ? size : format === \"recovered\" ? size + 1 : void 0;\n return _abytes2(bytes, sizer, `${format} signature`);\n }\n class Signature {\n constructor(r, s, recovery) {\n this.r = validateRS(\"r\", r);\n this.s = validateRS(\"s\", s);\n if (recovery != null)\n this.recovery = recovery;\n Object.freeze(this);\n }\n static fromBytes(bytes, format = defaultSigOpts_format) {\n validateSigLength(bytes, format);\n let recid;\n if (format === \"der\") {\n const { r: r2, s: s2 } = DER.toSig(_abytes2(bytes));\n return new Signature(r2, s2);\n }\n if (format === \"recovered\") {\n recid = bytes[0];\n format = \"compact\";\n bytes = bytes.subarray(1);\n }\n const L = Fn2.BYTES;\n const r = bytes.subarray(0, L);\n const s = bytes.subarray(L, L * 2);\n return new Signature(Fn2.fromBytes(r), Fn2.fromBytes(s), recid);\n }\n static fromHex(hex, format) {\n return this.fromBytes(hexToBytes(hex), format);\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(messageHash) {\n const FIELD_ORDER = Fp2.ORDER;\n const { r, s, recovery: rec } = this;\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error(\"recovery id invalid\");\n const hasCofactor = CURVE_ORDER * _2n5 < FIELD_ORDER;\n if (hasCofactor && rec > 1)\n throw new Error(\"recovery id is ambiguous for h>1 curve\");\n const radj = rec === 2 || rec === 3 ? r + CURVE_ORDER : r;\n if (!Fp2.isValid(radj))\n throw new Error(\"recovery id 2 or 3 invalid\");\n const x = Fp2.toBytes(radj);\n const R = Point.fromBytes(concatBytes(pprefix((rec & 1) === 0), x));\n const ir = Fn2.inv(radj);\n const h = bits2int_modN(ensureBytes(\"msgHash\", messageHash));\n const u1 = Fn2.create(-h * ir);\n const u2 = Fn2.create(s * ir);\n const Q = Point.BASE.multiplyUnsafe(u1).add(R.multiplyUnsafe(u2));\n if (Q.is0())\n throw new Error(\"point at infinify\");\n Q.assertValidity();\n return Q;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n toBytes(format = defaultSigOpts_format) {\n validateSigFormat(format);\n if (format === \"der\")\n return hexToBytes(DER.hexFromSig(this));\n const r = Fn2.toBytes(this.r);\n const s = Fn2.toBytes(this.s);\n if (format === \"recovered\") {\n if (this.recovery == null)\n throw new Error(\"recovery bit must be present\");\n return concatBytes(Uint8Array.of(this.recovery), r, s);\n }\n return concatBytes(r, s);\n }\n toHex(format) {\n return bytesToHex(this.toBytes(format));\n }\n // TODO: remove\n assertValidity() {\n }\n static fromCompact(hex) {\n return Signature.fromBytes(ensureBytes(\"sig\", hex), \"compact\");\n }\n static fromDER(hex) {\n return Signature.fromBytes(ensureBytes(\"sig\", hex), \"der\");\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, Fn2.neg(this.s), this.recovery) : this;\n }\n toDERRawBytes() {\n return this.toBytes(\"der\");\n }\n toDERHex() {\n return bytesToHex(this.toBytes(\"der\"));\n }\n toCompactRawBytes() {\n return this.toBytes(\"compact\");\n }\n toCompactHex() {\n return bytesToHex(this.toBytes(\"compact\"));\n }\n }\n const bits2int = ecdsaOpts.bits2int || function bits2int_def(bytes) {\n if (bytes.length > 8192)\n throw new Error(\"input is too large\");\n const num = bytesToNumberBE(bytes);\n const delta = bytes.length * 8 - fnBits;\n return delta > 0 ? num >> BigInt(delta) : num;\n };\n const bits2int_modN = ecdsaOpts.bits2int_modN || function bits2int_modN_def(bytes) {\n return Fn2.create(bits2int(bytes));\n };\n const ORDER_MASK = bitMask(fnBits);\n function int2octets(num) {\n aInRange(\"num < 2^\" + fnBits, num, _0n7, ORDER_MASK);\n return Fn2.toBytes(num);\n }\n function validateMsgAndHash(message, prehash) {\n _abytes2(message, void 0, \"message\");\n return prehash ? _abytes2(hash(message), void 0, \"prehashed message\") : message;\n }\n function prepSig(message, privateKey, opts) {\n if ([\"recovered\", \"canonical\"].some((k) => k in opts))\n throw new Error(\"sign() legacy options not supported\");\n const { lowS, prehash, extraEntropy } = validateSigOpts(opts, defaultSigOpts);\n message = validateMsgAndHash(message, prehash);\n const h1int = bits2int_modN(message);\n const d = _normFnElement(Fn2, privateKey);\n const seedArgs = [int2octets(d), int2octets(h1int)];\n if (extraEntropy != null && extraEntropy !== false) {\n const e = extraEntropy === true ? randomBytes2(lengths.secretKey) : extraEntropy;\n seedArgs.push(ensureBytes(\"extraEntropy\", e));\n }\n const seed = concatBytes(...seedArgs);\n const m = h1int;\n function k2sig(kBytes) {\n const k = bits2int(kBytes);\n if (!Fn2.isValidNot0(k))\n return;\n const ik = Fn2.inv(k);\n const q = Point.BASE.multiply(k).toAffine();\n const r = Fn2.create(q.x);\n if (r === _0n7)\n return;\n const s = Fn2.create(ik * Fn2.create(m + r * d));\n if (s === _0n7)\n return;\n let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n7);\n let normS = s;\n if (lowS && isBiggerThanHalfOrder(s)) {\n normS = Fn2.neg(s);\n recovery ^= 1;\n }\n return new Signature(r, normS, recovery);\n }\n return { seed, k2sig };\n }\n function sign2(message, secretKey, opts = {}) {\n message = ensureBytes(\"message\", message);\n const { seed, k2sig } = prepSig(message, secretKey, opts);\n const drbg = createHmacDrbg(hash.outputLen, Fn2.BYTES, hmac2);\n const sig = drbg(seed, k2sig);\n return sig;\n }\n function tryParsingSig(sg) {\n let sig = void 0;\n const isHex = typeof sg === \"string\" || isBytes(sg);\n const isObj = !isHex && sg !== null && typeof sg === \"object\" && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\";\n if (!isHex && !isObj)\n throw new Error(\"invalid signature, expected Uint8Array, hex string or Signature instance\");\n if (isObj) {\n sig = new Signature(sg.r, sg.s);\n } else if (isHex) {\n try {\n sig = Signature.fromBytes(ensureBytes(\"sig\", sg), \"der\");\n } catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n }\n if (!sig) {\n try {\n sig = Signature.fromBytes(ensureBytes(\"sig\", sg), \"compact\");\n } catch (error) {\n return false;\n }\n }\n }\n if (!sig)\n return false;\n return sig;\n }\n function verify2(signature, message, publicKey2, opts = {}) {\n const { lowS, prehash, format } = validateSigOpts(opts, defaultSigOpts);\n publicKey2 = ensureBytes(\"publicKey\", publicKey2);\n message = validateMsgAndHash(ensureBytes(\"message\", message), prehash);\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n const sig = format === void 0 ? tryParsingSig(signature) : Signature.fromBytes(ensureBytes(\"sig\", signature), format);\n if (sig === false)\n return false;\n try {\n const P = Point.fromBytes(publicKey2);\n if (lowS && sig.hasHighS())\n return false;\n const { r, s } = sig;\n const h = bits2int_modN(message);\n const is2 = Fn2.inv(s);\n const u1 = Fn2.create(h * is2);\n const u2 = Fn2.create(r * is2);\n const R = Point.BASE.multiplyUnsafe(u1).add(P.multiplyUnsafe(u2));\n if (R.is0())\n return false;\n const v = Fn2.create(R.x);\n return v === r;\n } catch (e) {\n return false;\n }\n }\n function recoverPublicKey(signature, message, opts = {}) {\n const { prehash } = validateSigOpts(opts, defaultSigOpts);\n message = validateMsgAndHash(message, prehash);\n return Signature.fromBytes(signature, \"recovered\").recoverPublicKey(message).toBytes();\n }\n return Object.freeze({\n keygen,\n getPublicKey: getPublicKey2,\n getSharedSecret,\n utils,\n lengths,\n Point,\n sign: sign2,\n verify: verify2,\n recoverPublicKey,\n Signature,\n hash\n });\n }\n function _weierstrass_legacy_opts_to_new(c) {\n const CURVE = {\n a: c.a,\n b: c.b,\n p: c.Fp.ORDER,\n n: c.n,\n h: c.h,\n Gx: c.Gx,\n Gy: c.Gy\n };\n const Fp2 = c.Fp;\n let allowedLengths = c.allowedPrivateKeyLengths ? Array.from(new Set(c.allowedPrivateKeyLengths.map((l) => Math.ceil(l / 2)))) : void 0;\n const Fn2 = Field(CURVE.n, {\n BITS: c.nBitLength,\n allowedLengths,\n modFromBytes: c.wrapPrivateKey\n });\n const curveOpts = {\n Fp: Fp2,\n Fn: Fn2,\n allowInfinityPoint: c.allowInfinityPoint,\n endo: c.endo,\n isTorsionFree: c.isTorsionFree,\n clearCofactor: c.clearCofactor,\n fromBytes: c.fromBytes,\n toBytes: c.toBytes\n };\n return { CURVE, curveOpts };\n }\n function _ecdsa_legacy_opts_to_new(c) {\n const { CURVE, curveOpts } = _weierstrass_legacy_opts_to_new(c);\n const ecdsaOpts = {\n hmac: c.hmac,\n randomBytes: c.randomBytes,\n lowS: c.lowS,\n bits2int: c.bits2int,\n bits2int_modN: c.bits2int_modN\n };\n return { CURVE, curveOpts, hash: c.hash, ecdsaOpts };\n }\n function _ecdsa_new_output_to_legacy(c, _ecdsa) {\n const Point = _ecdsa.Point;\n return Object.assign({}, _ecdsa, {\n ProjectivePoint: Point,\n CURVE: Object.assign({}, c, nLength(Point.Fn.ORDER, Point.Fn.BITS))\n });\n }\n function weierstrass(c) {\n const { CURVE, curveOpts, hash, ecdsaOpts } = _ecdsa_legacy_opts_to_new(c);\n const Point = weierstrassN(CURVE, curveOpts);\n const signs = ecdsa(Point, hash, ecdsaOpts);\n return _ecdsa_new_output_to_legacy(c, signs);\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/_shortw_utils.js\n function createCurve(curveDef, defHash) {\n const create2 = (hash) => weierstrass({ ...curveDef, hash });\n return { ...create2(defHash), create: create2 };\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/secp256k1.js\n var secp256k1_CURVE = {\n p: BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),\n n: BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),\n h: BigInt(1),\n a: BigInt(0),\n b: BigInt(7),\n Gx: BigInt(\"0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\"),\n Gy: BigInt(\"0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\")\n };\n var secp256k1_ENDO = {\n beta: BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),\n basises: [\n [BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"), -BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\")],\n [BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"), BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\")]\n ]\n };\n var _2n6 = /* @__PURE__ */ BigInt(2);\n function sqrtMod(y) {\n const P = secp256k1_CURVE.p;\n const _3n4 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b2 = y * y * y % P;\n const b3 = b2 * b2 * y % P;\n const b6 = pow2(b3, _3n4, P) * b3 % P;\n const b9 = pow2(b6, _3n4, P) * b3 % P;\n const b11 = pow2(b9, _2n6, P) * b2 % P;\n const b22 = pow2(b11, _11n, P) * b11 % P;\n const b44 = pow2(b22, _22n, P) * b22 % P;\n const b88 = pow2(b44, _44n, P) * b44 % P;\n const b176 = pow2(b88, _88n, P) * b88 % P;\n const b220 = pow2(b176, _44n, P) * b44 % P;\n const b223 = pow2(b220, _3n4, P) * b3 % P;\n const t1 = pow2(b223, _23n, P) * b22 % P;\n const t2 = pow2(t1, _6n, P) * b2 % P;\n const root = pow2(t2, _2n6, P);\n if (!Fpk1.eql(Fpk1.sqr(root), y))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n var Fpk1 = Field(secp256k1_CURVE.p, { sqrt: sqrtMod });\n var secp256k1 = createCurve({ ...secp256k1_CURVE, Fp: Fpk1, lowS: true, endo: secp256k1_ENDO }, sha256);\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n var generatePrivateKey = ed25519.utils.randomPrivateKey;\n var generateKeypair = () => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey2 = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey2, 32);\n return {\n publicKey: publicKey2,\n secretKey\n };\n };\n var getPublicKey = ed25519.getPublicKey;\n function isOnCurve(publicKey2) {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey2);\n return true;\n } catch {\n return false;\n }\n }\n var sign = (message, secretKey) => ed25519.sign(message, secretKey.slice(0, 32));\n var verify = ed25519.verify;\n var toBuffer = (arr) => {\n if (Buffer2.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer2.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer2.from(arr);\n }\n };\n var Struct2 = class {\n constructor(properties) {\n Object.assign(this, properties);\n }\n encode() {\n return Buffer2.from((0, import_borsh.serialize)(SOLANA_SCHEMA, this));\n }\n static decode(data) {\n return (0, import_borsh.deserialize)(SOLANA_SCHEMA, this, data);\n }\n static decodeUnchecked(data) {\n return (0, import_borsh.deserializeUnchecked)(SOLANA_SCHEMA, this, data);\n }\n };\n var SOLANA_SCHEMA = /* @__PURE__ */ new Map();\n var _PublicKey;\n var MAX_SEED_LENGTH = 32;\n var PUBLIC_KEY_LENGTH = 32;\n function isPublicKeyData(value) {\n return value._bn !== void 0;\n }\n var uniquePublicKeyCounter = 1;\n var PublicKey = class _PublicKey2 extends Struct2 {\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value) {\n super({});\n this._bn = void 0;\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === \"string\") {\n const decoded = import_bs58.default.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new import_bn.default(decoded);\n } else {\n this._bn = new import_bn.default(value);\n }\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique() {\n const key = new _PublicKey2(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new _PublicKey2(key.toBuffer());\n }\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey2) {\n return this._bn.eq(publicKey2._bn);\n }\n /**\n * Return the base-58 representation of the public key\n */\n toBase58() {\n return import_bs58.default.encode(this.toBytes());\n }\n toJSON() {\n return this.toBase58();\n }\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes() {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer() {\n const b = this._bn.toArrayLike(Buffer2);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n const zeroPad = Buffer2.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n get [Symbol.toStringTag]() {\n return `PublicKey(${this.toString()})`;\n }\n /**\n * Return the base-58 representation of the public key\n */\n toString() {\n return this.toBase58();\n }\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(fromPublicKey, seed, programId) {\n const buffer = Buffer2.concat([fromPublicKey.toBuffer(), Buffer2.from(seed), programId.toBuffer()]);\n const publicKeyBytes = sha2562(buffer);\n return new _PublicKey2(publicKeyBytes);\n }\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(seeds, programId) {\n let buffer = Buffer2.alloc(0);\n seeds.forEach(function(seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer2.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer2.concat([buffer, programId.toBuffer(), Buffer2.from(\"ProgramDerivedAddress\")]);\n const publicKeyBytes = sha2562(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new _PublicKey2(publicKeyBytes);\n }\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(seeds, programId) {\n return this.createProgramAddressSync(seeds, programId);\n }\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(seeds, programId) {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer2.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(seeds, programId) {\n return this.findProgramAddressSync(seeds, programId);\n }\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData) {\n const pubkey = new _PublicKey2(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n };\n _PublicKey = PublicKey;\n PublicKey.default = new _PublicKey(\"11111111111111111111111111111111\");\n SOLANA_SCHEMA.set(PublicKey, {\n kind: \"struct\",\n fields: [[\"_bn\", \"u256\"]]\n });\n var BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\"BPFLoader1111111111111111111111111111111111\");\n var PACKET_DATA_SIZE = 1280 - 40 - 8;\n var VERSION_PREFIX_MASK = 127;\n var SIGNATURE_LENGTH_IN_BYTES = 64;\n var TransactionExpiredBlockheightExceededError = class extends Error {\n constructor(signature) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = void 0;\n this.signature = signature;\n }\n };\n Object.defineProperty(TransactionExpiredBlockheightExceededError.prototype, \"name\", {\n value: \"TransactionExpiredBlockheightExceededError\"\n });\n var TransactionExpiredTimeoutError = class extends Error {\n constructor(signature, timeoutSeconds) {\n super(`Transaction was not confirmed in ${timeoutSeconds.toFixed(2)} seconds. It is unknown if it succeeded or failed. Check signature ${signature} using the Solana Explorer or CLI tools.`);\n this.signature = void 0;\n this.signature = signature;\n }\n };\n Object.defineProperty(TransactionExpiredTimeoutError.prototype, \"name\", {\n value: \"TransactionExpiredTimeoutError\"\n });\n var TransactionExpiredNonceInvalidError = class extends Error {\n constructor(signature) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = void 0;\n this.signature = signature;\n }\n };\n Object.defineProperty(TransactionExpiredNonceInvalidError.prototype, \"name\", {\n value: \"TransactionExpiredNonceInvalidError\"\n });\n var MessageAccountKeys = class {\n constructor(staticAccountKeys, accountKeysFromLookups) {\n this.staticAccountKeys = void 0;\n this.accountKeysFromLookups = void 0;\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n keySegments() {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n get(index) {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n get length() {\n return this.keySegments().flat().length;\n }\n compileInstructions(instructions) {\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error(\"Account index overflow encountered during compilation\");\n }\n const keyIndexMap = /* @__PURE__ */ new Map();\n this.keySegments().flat().forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n const findKeyIndex = (key) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === void 0)\n throw new Error(\"Encountered an unknown instruction account key during compilation\");\n return keyIndex;\n };\n return instructions.map((instruction) => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map((meta) => findKeyIndex(meta.pubkey)),\n data: instruction.data\n };\n });\n }\n };\n var publicKey = (property = \"publicKey\") => {\n return BufferLayout.blob(32, property);\n };\n var rustString = (property = \"string\") => {\n const rsl = BufferLayout.struct([BufferLayout.u32(\"length\"), BufferLayout.u32(\"lengthPadding\"), BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), \"chars\")], property);\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n const rslShim = rsl;\n rslShim.decode = (b, offset2) => {\n const data = _decode(b, offset2);\n return data[\"chars\"].toString();\n };\n rslShim.encode = (str, b, offset2) => {\n const data = {\n chars: Buffer2.from(str, \"utf8\")\n };\n return _encode(data, b, offset2);\n };\n rslShim.alloc = (str) => {\n return BufferLayout.u32().span + BufferLayout.u32().span + Buffer2.from(str, \"utf8\").length;\n };\n return rslShim;\n };\n var authorized = (property = \"authorized\") => {\n return BufferLayout.struct([publicKey(\"staker\"), publicKey(\"withdrawer\")], property);\n };\n var lockup = (property = \"lockup\") => {\n return BufferLayout.struct([BufferLayout.ns64(\"unixTimestamp\"), BufferLayout.ns64(\"epoch\"), publicKey(\"custodian\")], property);\n };\n var voteInit = (property = \"voteInit\") => {\n return BufferLayout.struct([publicKey(\"nodePubkey\"), publicKey(\"authorizedVoter\"), publicKey(\"authorizedWithdrawer\"), BufferLayout.u8(\"commission\")], property);\n };\n var voteAuthorizeWithSeedArgs = (property = \"voteAuthorizeWithSeedArgs\") => {\n return BufferLayout.struct([BufferLayout.u32(\"voteAuthorizationType\"), publicKey(\"currentAuthorityDerivedKeyOwnerPubkey\"), rustString(\"currentAuthorityDerivedKeySeed\"), publicKey(\"newAuthorized\")], property);\n };\n function getAlloc(type2, fields) {\n const getItemAlloc = (item) => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === \"function\") {\n return item.alloc(fields[item.property]);\n } else if (\"count\" in item && \"elementLayout\" in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if (\"fields\" in item) {\n return getAlloc({\n layout: item\n }, fields[item.property]);\n }\n return 0;\n };\n let alloc = 0;\n type2.layout.fields.forEach((item) => {\n alloc += getItemAlloc(item);\n });\n return alloc;\n }\n function decodeLength(bytes) {\n let len = 0;\n let size = 0;\n for (; ; ) {\n let elem = bytes.shift();\n len |= (elem & 127) << size * 7;\n size += 1;\n if ((elem & 128) === 0) {\n break;\n }\n }\n return len;\n }\n function encodeLength(bytes, len) {\n let rem_len = len;\n for (; ; ) {\n let elem = rem_len & 127;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 128;\n bytes.push(elem);\n }\n }\n }\n function assert2(condition, message) {\n if (!condition) {\n throw new Error(message || \"Assertion failed\");\n }\n }\n var CompiledKeys = class _CompiledKeys {\n constructor(payer, keyMetaMap) {\n this.payer = void 0;\n this.keyMetaMap = void 0;\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n static compile(instructions, payer) {\n const keyMetaMap = /* @__PURE__ */ new Map();\n const getOrInsertDefault = (pubkey) => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === void 0) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n return new _CompiledKeys(payer, keyMetaMap);\n }\n getMessageComponents() {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert2(mapEntries.length <= 256, \"Max static account keys length exceeded\");\n const writableSigners = mapEntries.filter(([, meta]) => meta.isSigner && meta.isWritable);\n const readonlySigners = mapEntries.filter(([, meta]) => meta.isSigner && !meta.isWritable);\n const writableNonSigners = mapEntries.filter(([, meta]) => !meta.isSigner && meta.isWritable);\n const readonlyNonSigners = mapEntries.filter(([, meta]) => !meta.isSigner && !meta.isWritable);\n const header = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length\n };\n {\n assert2(writableSigners.length > 0, \"Expected at least one writable signer key\");\n const [payerAddress] = writableSigners[0];\n assert2(payerAddress === this.payer.toBase58(), \"Expected first writable signer key to be the fee payer\");\n }\n const staticAccountKeys = [...writableSigners.map(([address]) => new PublicKey(address)), ...readonlySigners.map(([address]) => new PublicKey(address)), ...writableNonSigners.map(([address]) => new PublicKey(address)), ...readonlyNonSigners.map(([address]) => new PublicKey(address))];\n return [header, staticAccountKeys];\n }\n extractTableLookup(lookupTable) {\n const [writableIndexes, drainedWritableKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, (keyMeta) => !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable);\n const [readonlyIndexes, drainedReadonlyKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, (keyMeta) => !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable);\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n return [{\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes\n }, {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys\n }];\n }\n /** @internal */\n drainKeysFoundInLookupTable(lookupTableEntries, keyMetaFilter) {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex((entry) => entry.equals(key));\n if (lookupTableIndex >= 0) {\n assert2(lookupTableIndex < 256, \"Max lookup table index exceeded\");\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n return [lookupTableIndexes, drainedKeys];\n }\n };\n var END_OF_BUFFER_ERROR_MESSAGE = \"Reached end of buffer unexpectedly\";\n function guardedShift(byteArray) {\n if (byteArray.length === 0) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.shift();\n }\n function guardedSplice(byteArray, ...args) {\n const [start] = args;\n if (args.length === 2 ? start + (args[1] ?? 0) > byteArray.length : start >= byteArray.length) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.splice(...args);\n }\n var Message = class _Message {\n constructor(args) {\n this.header = void 0;\n this.accountKeys = void 0;\n this.recentBlockhash = void 0;\n this.instructions = void 0;\n this.indexToProgramIds = /* @__PURE__ */ new Map();\n this.header = args.header;\n this.accountKeys = args.accountKeys.map((account) => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach((ix) => this.indexToProgramIds.set(ix.programIdIndex, this.accountKeys[ix.programIdIndex]));\n }\n get version() {\n return \"legacy\";\n }\n get staticAccountKeys() {\n return this.accountKeys;\n }\n get compiledInstructions() {\n return this.instructions.map((ix) => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: import_bs58.default.decode(ix.data)\n }));\n }\n get addressTableLookups() {\n return [];\n }\n getAccountKeys() {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n static compile(args) {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map((ix) => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: import_bs58.default.encode(ix.data)\n }));\n return new _Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions\n });\n }\n isAccountSigner(index) {\n return index < this.header.numRequiredSignatures;\n }\n isAccountWritable(index) {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts = numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts = numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n isProgramId(index) {\n return this.indexToProgramIds.has(index);\n }\n programIds() {\n return [...this.indexToProgramIds.values()];\n }\n nonProgramIds() {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n serialize() {\n const numKeys = this.accountKeys.length;\n let keyCount = [];\n encodeLength(keyCount, numKeys);\n const instructions = this.instructions.map((instruction) => {\n const {\n accounts,\n programIdIndex\n } = instruction;\n const data = Array.from(import_bs58.default.decode(instruction.data));\n let keyIndicesCount = [];\n encodeLength(keyIndicesCount, accounts.length);\n let dataCount = [];\n encodeLength(dataCount, data.length);\n return {\n programIdIndex,\n keyIndicesCount: Buffer2.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer2.from(dataCount),\n data\n };\n });\n let instructionCount = [];\n encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer2.alloc(PACKET_DATA_SIZE);\n Buffer2.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n instructions.forEach((instruction) => {\n const instructionLayout = BufferLayout.struct([BufferLayout.u8(\"programIdIndex\"), BufferLayout.blob(instruction.keyIndicesCount.length, \"keyIndicesCount\"), BufferLayout.seq(BufferLayout.u8(\"keyIndex\"), instruction.keyIndices.length, \"keyIndices\"), BufferLayout.blob(instruction.dataLength.length, \"dataLength\"), BufferLayout.seq(BufferLayout.u8(\"userdatum\"), instruction.data.length, \"data\")]);\n const length2 = instructionLayout.encode(instruction, instructionBuffer, instructionBufferLength);\n instructionBufferLength += length2;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n const signDataLayout = BufferLayout.struct([BufferLayout.blob(1, \"numRequiredSignatures\"), BufferLayout.blob(1, \"numReadonlySignedAccounts\"), BufferLayout.blob(1, \"numReadonlyUnsignedAccounts\"), BufferLayout.blob(keyCount.length, \"keyCount\"), BufferLayout.seq(publicKey(\"key\"), numKeys, \"keys\"), publicKey(\"recentBlockhash\")]);\n const transaction = {\n numRequiredSignatures: Buffer2.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer2.from([this.header.numReadonlySignedAccounts]),\n numReadonlyUnsignedAccounts: Buffer2.from([this.header.numReadonlyUnsignedAccounts]),\n keyCount: Buffer2.from(keyCount),\n keys: this.accountKeys.map((key) => toBuffer(key.toBytes())),\n recentBlockhash: import_bs58.default.decode(this.recentBlockhash)\n };\n let signData = Buffer2.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer) {\n let byteArray = [...buffer];\n const numRequiredSignatures = guardedShift(byteArray);\n if (numRequiredSignatures !== (numRequiredSignatures & VERSION_PREFIX_MASK)) {\n throw new Error(\"Versioned messages must be deserialized with VersionedMessage.deserialize()\");\n }\n const numReadonlySignedAccounts = guardedShift(byteArray);\n const numReadonlyUnsignedAccounts = guardedShift(byteArray);\n const accountCount = decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer2.from(account)));\n }\n const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n const instructionCount = decodeLength(byteArray);\n let instructions = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountCount2 = decodeLength(byteArray);\n const accounts = guardedSplice(byteArray, 0, accountCount2);\n const dataLength = decodeLength(byteArray);\n const dataSlice = guardedSplice(byteArray, 0, dataLength);\n const data = import_bs58.default.encode(Buffer2.from(dataSlice));\n instructions.push({\n programIdIndex,\n accounts,\n data\n });\n }\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n },\n recentBlockhash: import_bs58.default.encode(Buffer2.from(recentBlockhash)),\n accountKeys,\n instructions\n };\n return new _Message(messageArgs);\n }\n };\n var DEFAULT_SIGNATURE = Buffer2.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n var TransactionInstruction = class {\n constructor(opts) {\n this.keys = void 0;\n this.programId = void 0;\n this.data = Buffer2.alloc(0);\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n /**\n * @internal\n */\n toJSON() {\n return {\n keys: this.keys.map(({\n pubkey,\n isSigner,\n isWritable\n }) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable\n })),\n programId: this.programId.toJSON(),\n data: [...this.data]\n };\n }\n };\n var Transaction = class _Transaction {\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature() {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n /**\n * The transaction fee payer\n */\n // Construct a transaction with a blockhash and lastValidBlockHeight\n // Construct a transaction using a durable nonce\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n /**\n * Construct an empty Transaction\n */\n constructor(opts) {\n this.signatures = [];\n this.feePayer = void 0;\n this.instructions = [];\n this.recentBlockhash = void 0;\n this.lastValidBlockHeight = void 0;\n this.nonceInfo = void 0;\n this.minNonceContextSlot = void 0;\n this._message = void 0;\n this._json = void 0;\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, \"nonceInfo\")) {\n const {\n minContextSlot,\n nonceInfo\n } = opts;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (Object.prototype.hasOwnProperty.call(opts, \"lastValidBlockHeight\")) {\n const {\n blockhash,\n lastValidBlockHeight\n } = opts;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {\n recentBlockhash,\n nonceInfo\n } = opts;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n /**\n * @internal\n */\n toJSON() {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON()\n } : null,\n instructions: this.instructions.map((instruction) => instruction.toJSON()),\n signers: this.signatures.map(({\n publicKey: publicKey2\n }) => {\n return publicKey2.toJSON();\n })\n };\n }\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(...items) {\n if (items.length === 0) {\n throw new Error(\"No instructions\");\n }\n items.forEach((item) => {\n if (\"instructions\" in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if (\"data\" in item && \"programId\" in item && \"keys\" in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n /**\n * Compile transaction data\n */\n compileMessage() {\n if (this._message && JSON.stringify(this.toJSON()) === JSON.stringify(this._json)) {\n return this._message;\n }\n let recentBlockhash;\n let instructions;\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error(\"Transaction recentBlockhash required\");\n }\n if (instructions.length < 1) {\n console.warn(\"No instructions provided\");\n }\n let feePayer;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error(\"Transaction fee payer required\");\n }\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === void 0) {\n throw new Error(`Transaction instruction index ${i} has undefined program id`);\n }\n }\n const programIds = [];\n const accountMetas = [];\n instructions.forEach((instruction) => {\n instruction.keys.forEach((accountMeta) => {\n accountMetas.push({\n ...accountMeta\n });\n });\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n programIds.forEach((programId) => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false\n });\n });\n const uniqueMetas = [];\n accountMetas.forEach((accountMeta) => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex((x) => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable = uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner = uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n uniqueMetas.sort(function(x, y) {\n if (x.isSigner !== y.isSigner) {\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n return x.isWritable ? -1 : 1;\n }\n const options = {\n localeMatcher: \"best fit\",\n usage: \"sort\",\n sensitivity: \"variant\",\n ignorePunctuation: false,\n numeric: false,\n caseFirst: \"lower\"\n };\n return x.pubkey.toBase58().localeCompare(y.pubkey.toBase58(), \"en\", options);\n });\n const feePayerIndex = uniqueMetas.findIndex((x) => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true\n });\n }\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex((x) => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\"Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release.\");\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n const signedKeys = [];\n const unsignedKeys = [];\n uniqueMetas.forEach(({\n pubkey,\n isSigner,\n isWritable\n }) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions = instructions.map((instruction) => {\n const {\n data,\n programId\n } = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map((meta) => accountKeys.indexOf(meta.pubkey.toString())),\n data: import_bs58.default.encode(data)\n };\n });\n compiledInstructions.forEach((instruction) => {\n assert2(instruction.programIdIndex >= 0);\n instruction.accounts.forEach((keyIndex) => assert2(keyIndex >= 0));\n });\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions\n });\n }\n /**\n * @internal\n */\n _compile() {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(0, message.header.numRequiredSignatures);\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n if (valid)\n return message;\n }\n this.signatures = signedKeys.map((publicKey2) => ({\n signature: null,\n publicKey: publicKey2\n }));\n return message;\n }\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage() {\n return this._compile().serialize();\n }\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection) {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers) {\n if (signers.length === 0) {\n throw new Error(\"No signers\");\n }\n const seen = /* @__PURE__ */ new Set();\n this.signatures = signers.filter((publicKey2) => {\n const key = publicKey2.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n }).map((publicKey2) => ({\n signature: null,\n publicKey: publicKey2\n }));\n }\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers) {\n if (signers.length === 0) {\n throw new Error(\"No signers\");\n }\n const seen = /* @__PURE__ */ new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n this.signatures = uniqueSigners.map((signer) => ({\n signature: null,\n publicKey: signer.publicKey\n }));\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers) {\n if (signers.length === 0) {\n throw new Error(\"No signers\");\n }\n const seen = /* @__PURE__ */ new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n /**\n * @internal\n */\n _partialSign(message, ...signers) {\n const signData = message.serialize();\n signers.forEach((signer) => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey, signature) {\n this._compile();\n this._addSignature(pubkey, signature);\n }\n /**\n * @internal\n */\n _addSignature(pubkey, signature) {\n assert2(signature.length === 64);\n const index = this.signatures.findIndex((sigpair) => pubkey.equals(sigpair.publicKey));\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n this.signatures[index].signature = Buffer2.from(signature);\n }\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures = true) {\n const signatureErrors = this._getMessageSignednessErrors(this.serializeMessage(), requireAllSignatures);\n return !signatureErrors;\n }\n /**\n * @internal\n */\n _getMessageSignednessErrors(message, requireAllSignatures) {\n const errors = {};\n for (const {\n signature,\n publicKey: publicKey2\n } of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n (errors.missing ||= []).push(publicKey2);\n }\n } else {\n if (!verify(signature, message, publicKey2.toBytes())) {\n (errors.invalid ||= []).push(publicKey2);\n }\n }\n }\n return errors.invalid || errors.missing ? errors : void 0;\n }\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config) {\n const {\n requireAllSignatures,\n verifySignatures\n } = Object.assign({\n requireAllSignatures: true,\n verifySignatures: true\n }, config);\n const signData = this.serializeMessage();\n if (verifySignatures) {\n const sigErrors = this._getMessageSignednessErrors(signData, requireAllSignatures);\n if (sigErrors) {\n let errorMessage = \"Signature verification failed.\";\n if (sigErrors.invalid) {\n errorMessage += `\nInvalid signature for public key${sigErrors.invalid.length === 1 ? \"\" : \"(s)\"} [\\`${sigErrors.invalid.map((p) => p.toBase58()).join(\"`, `\")}\\`].`;\n }\n if (sigErrors.missing) {\n errorMessage += `\nMissing signature for public key${sigErrors.missing.length === 1 ? \"\" : \"(s)\"} [\\`${sigErrors.missing.map((p) => p.toBase58()).join(\"`, `\")}\\`].`;\n }\n throw new Error(errorMessage);\n }\n }\n return this._serialize(signData);\n }\n /**\n * @internal\n */\n _serialize(signData) {\n const {\n signatures\n } = this;\n const signatureCount = [];\n encodeLength(signatureCount, signatures.length);\n const transactionLength = signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer2.alloc(transactionLength);\n assert2(signatures.length < 256);\n Buffer2.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({\n signature\n }, index) => {\n if (signature !== null) {\n assert2(signature.length === 64, `signature has invalid length`);\n Buffer2.from(signature).copy(wireTransaction, signatureCount.length + index * 64);\n }\n });\n signData.copy(wireTransaction, signatureCount.length + signatures.length * 64);\n assert2(wireTransaction.length <= PACKET_DATA_SIZE, `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`);\n return wireTransaction;\n }\n /**\n * Deprecated method\n * @internal\n */\n get keys() {\n assert2(this.instructions.length === 1);\n return this.instructions[0].keys.map((keyObj) => keyObj.pubkey);\n }\n /**\n * Deprecated method\n * @internal\n */\n get programId() {\n assert2(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n /**\n * Deprecated method\n * @internal\n */\n get data() {\n assert2(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer) {\n let byteArray = [...buffer];\n const signatureCount = decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(import_bs58.default.encode(Buffer2.from(signature)));\n }\n return _Transaction.populate(Message.from(byteArray), signatures);\n }\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(message, signatures = []) {\n const transaction = new _Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature: signature == import_bs58.default.encode(DEFAULT_SIGNATURE) ? null : import_bs58.default.decode(signature),\n publicKey: message.accountKeys[index]\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n message.instructions.forEach((instruction) => {\n const keys = instruction.accounts.map((account) => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner: transaction.signatures.some((keyObj) => keyObj.publicKey.toString() === pubkey.toString()) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account)\n };\n });\n transaction.instructions.push(new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: import_bs58.default.decode(instruction.data)\n }));\n });\n transaction._message = message;\n transaction._json = transaction.toJSON();\n return transaction;\n }\n };\n var NUM_TICKS_PER_SECOND = 160;\n var DEFAULT_TICKS_PER_SLOT = 64;\n var NUM_SLOTS_PER_SECOND = NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n var MS_PER_SLOT = 1e3 / NUM_SLOTS_PER_SECOND;\n var SYSVAR_CLOCK_PUBKEY = new PublicKey(\"SysvarC1ock11111111111111111111111111111111\");\n var SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\"SysvarEpochSchedu1e111111111111111111111111\");\n var SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\"Sysvar1nstructions1111111111111111111111111\");\n var SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\"SysvarRecentB1ockHashes11111111111111111111\");\n var SYSVAR_RENT_PUBKEY = new PublicKey(\"SysvarRent111111111111111111111111111111111\");\n var SYSVAR_REWARDS_PUBKEY = new PublicKey(\"SysvarRewards111111111111111111111111111111\");\n var SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\"SysvarS1otHashes111111111111111111111111111\");\n var SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\"SysvarS1otHistory11111111111111111111111111\");\n var SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\"SysvarStakeHistory1111111111111111111111111\");\n var SendTransactionError = class extends Error {\n constructor({\n action,\n signature,\n transactionMessage,\n logs\n }) {\n const maybeLogsOutput = logs ? `Logs: \n${JSON.stringify(logs.slice(-10), null, 2)}. ` : \"\";\n const guideText = \"\\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.\";\n let message;\n switch (action) {\n case \"send\":\n message = `Transaction ${signature} resulted in an error. \n${transactionMessage}. ` + maybeLogsOutput + guideText;\n break;\n case \"simulate\":\n message = `Simulation failed. \nMessage: ${transactionMessage}. \n` + maybeLogsOutput + guideText;\n break;\n default: {\n message = `Unknown action '${/* @__PURE__ */ ((a) => a)(action)}'`;\n }\n }\n super(message);\n this.signature = void 0;\n this.transactionMessage = void 0;\n this.transactionLogs = void 0;\n this.signature = signature;\n this.transactionMessage = transactionMessage;\n this.transactionLogs = logs ? logs : void 0;\n }\n get transactionError() {\n return {\n message: this.transactionMessage,\n logs: Array.isArray(this.transactionLogs) ? this.transactionLogs : void 0\n };\n }\n /* @deprecated Use `await getLogs()` instead */\n get logs() {\n const cachedLogs = this.transactionLogs;\n if (cachedLogs != null && typeof cachedLogs === \"object\" && \"then\" in cachedLogs) {\n return void 0;\n }\n return cachedLogs;\n }\n async getLogs(connection) {\n if (!Array.isArray(this.transactionLogs)) {\n this.transactionLogs = new Promise((resolve, reject) => {\n connection.getTransaction(this.signature).then((tx) => {\n if (tx && tx.meta && tx.meta.logMessages) {\n const logs = tx.meta.logMessages;\n this.transactionLogs = logs;\n resolve(logs);\n } else {\n reject(new Error(\"Log messages not found\"));\n }\n }).catch(reject);\n });\n }\n return await this.transactionLogs;\n }\n };\n async function sendAndConfirmTransaction(connection, transaction, signers, options) {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot\n };\n const signature = await connection.sendTransaction(transaction, signers, sendOptions);\n let status;\n if (transaction.recentBlockhash != null && transaction.lastValidBlockHeight != null) {\n status = (await connection.confirmTransaction({\n abortSignal: options?.abortSignal,\n signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight\n }, options && options.commitment)).value;\n } else if (transaction.minNonceContextSlot != null && transaction.nonceInfo != null) {\n const {\n nonceInstruction\n } = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (await connection.confirmTransaction({\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature\n }, options && options.commitment)).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\"sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.\");\n }\n status = (await connection.confirmTransaction(signature, options && options.commitment)).value;\n }\n if (status.err) {\n if (signature != null) {\n throw new SendTransactionError({\n action: \"send\",\n signature,\n transactionMessage: `Status: (${JSON.stringify(status)})`\n });\n }\n throw new Error(`Transaction ${signature} failed (${JSON.stringify(status)})`);\n }\n return signature;\n }\n function sleep(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n function encodeData(type2, fields) {\n const allocLength = type2.layout.span >= 0 ? type2.layout.span : getAlloc(type2, fields);\n const data = Buffer2.alloc(allocLength);\n const layoutFields = Object.assign({\n instruction: type2.index\n }, fields);\n type2.layout.encode(layoutFields, data);\n return data;\n }\n var FeeCalculatorLayout = BufferLayout.nu64(\"lamportsPerSignature\");\n var NonceAccountLayout = BufferLayout.struct([BufferLayout.u32(\"version\"), BufferLayout.u32(\"state\"), publicKey(\"authorizedPubkey\"), publicKey(\"nonce\"), BufferLayout.struct([FeeCalculatorLayout], \"feeCalculator\")]);\n var NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n function u64(property) {\n const layout = (0, import_buffer_layout.blob)(8, property);\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n const bigIntLayout = layout;\n const codec = getU64Codec();\n bigIntLayout.decode = (buffer, offset2) => {\n const src = decode(buffer, offset2);\n return codec.decode(src);\n };\n bigIntLayout.encode = (bigInt, buffer, offset2) => {\n const src = codec.encode(bigInt);\n return encode(src, buffer, offset2);\n };\n return bigIntLayout;\n }\n var SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze({\n Create: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\"), BufferLayout.ns64(\"space\"), publicKey(\"programId\")])\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"programId\")])\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), u64(\"lamports\")])\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"base\"), rustString(\"seed\"), BufferLayout.ns64(\"lamports\"), BufferLayout.ns64(\"space\"), publicKey(\"programId\")])\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\")])\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"authorized\")])\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"authorized\")])\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"space\")])\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"base\"), rustString(\"seed\"), BufferLayout.ns64(\"space\"), publicKey(\"programId\")])\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"base\"), rustString(\"seed\"), publicKey(\"programId\")])\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), u64(\"lamports\"), rustString(\"seed\"), publicKey(\"programId\")])\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n }\n });\n var SystemProgram = class _SystemProgram {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the System program\n */\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type2, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.newAccountPubkey,\n isSigner: true,\n isWritable: true\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(params) {\n let data;\n let keys;\n if (\"basePubkey\" in params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type2, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.fromPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }];\n } else {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type2, {\n lamports: BigInt(params.lamports)\n });\n keys = [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(params) {\n let data;\n let keys;\n if (\"basePubkey\" in params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type2, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }];\n } else {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type2, {\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: true,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type2, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n let keys = [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.newAccountPubkey,\n isSigner: false,\n isWritable: true\n }];\n if (!params.basePubkey.equals(params.fromPubkey)) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(params) {\n const transaction = new Transaction();\n if (\"basePubkey\" in params && \"seed\" in params) {\n transaction.add(_SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId\n }));\n } else {\n transaction.add(_SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId\n }));\n }\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey\n };\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type2, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer())\n });\n const instructionData = {\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type2);\n const instructionData = {\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type2, {\n lamports: params.lamports\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type2, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer())\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(params) {\n let data;\n let keys;\n if (\"basePubkey\" in params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type2, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }];\n } else {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type2, {\n space: params.space\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: true,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n };\n SystemProgram.programId = new PublicKey(\"11111111111111111111111111111111\");\n var CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n var Loader = class _Loader {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Amount of program data placed in each load Transaction\n */\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength) {\n return 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / _Loader.chunkSize) + 1 + // Add one for Create transaction\n 1);\n }\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(connection, payer, program, programId, data) {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(data.length);\n const programInfo = await connection.getAccountInfo(program.publicKey, \"confirmed\");\n let transaction = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error(\"Program load failed, account is already executable\");\n return false;\n }\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length\n }));\n }\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId\n }));\n }\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports\n }));\n }\n } else {\n transaction = new Transaction().add(SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId\n }));\n }\n if (transaction !== null) {\n await sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: \"confirmed\"\n });\n }\n }\n const dataLayout = BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.u32(\"offset\"), BufferLayout.u32(\"bytesLength\"), BufferLayout.u32(\"bytesLengthPadding\"), BufferLayout.seq(BufferLayout.u8(\"byte\"), BufferLayout.offset(BufferLayout.u32(), -8), \"bytes\")]);\n const chunkSize = _Loader.chunkSize;\n let offset2 = 0;\n let array2 = data;\n let transactions = [];\n while (array2.length > 0) {\n const bytes = array2.slice(0, chunkSize);\n const data2 = Buffer2.alloc(chunkSize + 16);\n dataLayout.encode({\n instruction: 0,\n // Load instruction\n offset: offset2,\n bytes,\n bytesLength: 0,\n bytesLengthPadding: 0\n }, data2);\n const transaction = new Transaction().add({\n keys: [{\n pubkey: program.publicKey,\n isSigner: true,\n isWritable: true\n }],\n programId,\n data: data2\n });\n transactions.push(sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: \"confirmed\"\n }));\n if (connection._rpcEndpoint.includes(\"solana.com\")) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1e3 / REQUESTS_PER_SECOND);\n }\n offset2 += chunkSize;\n array2 = array2.slice(chunkSize);\n }\n await Promise.all(transactions);\n {\n const dataLayout2 = BufferLayout.struct([BufferLayout.u32(\"instruction\")]);\n const data2 = Buffer2.alloc(dataLayout2.span);\n dataLayout2.encode({\n instruction: 1\n // Finalize instruction\n }, data2);\n const transaction = new Transaction().add({\n keys: [{\n pubkey: program.publicKey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId,\n data: data2\n });\n const deployCommitment = \"processed\";\n const finalizeSignature = await connection.sendTransaction(transaction, [payer, program], {\n preflightCommitment: deployCommitment\n });\n const {\n context,\n value\n } = await connection.confirmTransaction({\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n blockhash: transaction.recentBlockhash\n }, deployCommitment);\n if (value.err) {\n throw new Error(`Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`);\n }\n while (true) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n }\n await new Promise((resolve) => setTimeout(resolve, Math.round(MS_PER_SLOT / 2)));\n }\n }\n return true;\n }\n };\n Loader.chunkSize = CHUNK_SIZE;\n var BPF_LOADER_PROGRAM_ID = new PublicKey(\"BPFLoader2111111111111111111111111111111111\");\n var fetchImpl = globalThis.fetch;\n var LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32(\"typeIndex\"),\n u64(\"deactivationSlot\"),\n BufferLayout.nu64(\"lastExtendedSlot\"),\n BufferLayout.u8(\"lastExtendedStartIndex\"),\n BufferLayout.u8(),\n // option\n BufferLayout.seq(publicKey(), BufferLayout.offset(BufferLayout.u8(), -1), \"authority\")\n ])\n };\n var PublicKeyFromString = coerce(instance(PublicKey), string(), (value) => new PublicKey(value));\n var RawAccountDataResult = tuple([string(), literal(\"base64\")]);\n var BufferFromRawAccountData = coerce(instance(Buffer2), RawAccountDataResult, (value) => Buffer2.from(value[0], \"base64\"));\n var BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1e3;\n function createRpcResult(result) {\n return union([type({\n jsonrpc: literal(\"2.0\"),\n id: string(),\n result\n }), type({\n jsonrpc: literal(\"2.0\"),\n id: string(),\n error: type({\n code: unknown(),\n message: string(),\n data: optional(any())\n })\n })]);\n }\n var UnknownRpcResult = createRpcResult(unknown());\n function jsonRpcResult(schema) {\n return coerce(createRpcResult(schema), UnknownRpcResult, (value) => {\n if (\"error\" in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema)\n };\n }\n });\n }\n function jsonRpcResultAndContext(value) {\n return jsonRpcResult(type({\n context: type({\n slot: number()\n }),\n value\n }));\n }\n function notificationResultAndContext(value) {\n return type({\n context: type({\n slot: number()\n }),\n value\n });\n }\n var GetInflationGovernorResult = type({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number()\n });\n var GetInflationRewardResult = jsonRpcResult(array(nullable(type({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number()))\n }))));\n var GetRecentPrioritizationFeesResult = array(type({\n slot: number(),\n prioritizationFee: number()\n }));\n var GetInflationRateResult = type({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number()\n });\n var GetEpochInfoResult = type({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number())\n });\n var GetEpochScheduleResult = type({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number()\n });\n var GetLeaderScheduleResult = record(string(), array(number()));\n var TransactionErrorResult = nullable(union([type({}), string()]));\n var SignatureStatusResult = type({\n err: TransactionErrorResult\n });\n var SignatureReceivedResult = literal(\"receivedSignature\");\n var VersionResult = type({\n \"solana-core\": string(),\n \"feature-set\": optional(number())\n });\n var ParsedInstructionStruct = type({\n program: string(),\n programId: PublicKeyFromString,\n parsed: unknown()\n });\n var PartiallyDecodedInstructionStruct = type({\n programId: PublicKeyFromString,\n accounts: array(PublicKeyFromString),\n data: string()\n });\n var SimulatedTransactionResponseStruct = jsonRpcResultAndContext(type({\n err: nullable(union([type({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(nullable(array(nullable(type({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number())\n }))))),\n unitsConsumed: optional(number()),\n returnData: optional(nullable(type({\n programId: string(),\n data: tuple([string(), literal(\"base64\")])\n }))),\n innerInstructions: optional(nullable(array(type({\n index: number(),\n instructions: array(union([ParsedInstructionStruct, PartiallyDecodedInstructionStruct]))\n }))))\n }));\n var BlockProductionResponseStruct = jsonRpcResultAndContext(type({\n byIdentity: record(string(), array(number())),\n range: type({\n firstSlot: number(),\n lastSlot: number()\n })\n }));\n var GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n var GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n var GetRecentPrioritizationFeesRpcResult = jsonRpcResult(GetRecentPrioritizationFeesResult);\n var GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n var GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n var GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n var SlotRpcResult = jsonRpcResult(number());\n var GetSupplyRpcResult = jsonRpcResultAndContext(type({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString)\n }));\n var TokenAmountResult = type({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string())\n });\n var GetTokenLargestAccountsResult = jsonRpcResultAndContext(array(type({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string())\n })));\n var GetTokenAccountsByOwner = jsonRpcResultAndContext(array(type({\n pubkey: PublicKeyFromString,\n account: type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number()\n })\n })));\n var ParsedAccountDataResult = type({\n program: string(),\n parsed: unknown(),\n space: number()\n });\n var GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(array(type({\n pubkey: PublicKeyFromString,\n account: type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number()\n })\n })));\n var GetLargestAccountsRpcResult = jsonRpcResultAndContext(array(type({\n lamports: number(),\n address: PublicKeyFromString\n })));\n var AccountInfoResult = type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number()\n });\n var KeyedAccountInfoResult = type({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult\n });\n var ParsedOrRawAccountData = coerce(union([instance(Buffer2), ParsedAccountDataResult]), union([RawAccountDataResult, ParsedAccountDataResult]), (value) => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n });\n var ParsedAccountInfoResult = type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number()\n });\n var KeyedParsedAccountInfoResult = type({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult\n });\n var StakeActivationResult = type({\n state: union([literal(\"active\"), literal(\"inactive\"), literal(\"activating\"), literal(\"deactivating\")]),\n active: number(),\n inactive: number()\n });\n var GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(array(type({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number()))\n })));\n var GetSignaturesForAddressRpcResult = jsonRpcResult(array(type({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number()))\n })));\n var AccountNotificationResult = type({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult)\n });\n var ProgramAccountInfoResult = type({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult\n });\n var ProgramAccountNotificationResult = type({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult)\n });\n var SlotInfoResult = type({\n parent: number(),\n slot: number(),\n root: number()\n });\n var SlotNotificationResult = type({\n subscription: number(),\n result: SlotInfoResult\n });\n var SlotUpdateResult = union([type({\n type: union([literal(\"firstShredReceived\"), literal(\"completed\"), literal(\"optimisticConfirmation\"), literal(\"root\")]),\n slot: number(),\n timestamp: number()\n }), type({\n type: literal(\"createdBank\"),\n parent: number(),\n slot: number(),\n timestamp: number()\n }), type({\n type: literal(\"frozen\"),\n slot: number(),\n timestamp: number(),\n stats: type({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number()\n })\n }), type({\n type: literal(\"dead\"),\n slot: number(),\n timestamp: number(),\n err: string()\n })]);\n var SlotUpdateNotificationResult = type({\n subscription: number(),\n result: SlotUpdateResult\n });\n var SignatureNotificationResult = type({\n subscription: number(),\n result: notificationResultAndContext(union([SignatureStatusResult, SignatureReceivedResult]))\n });\n var RootNotificationResult = type({\n subscription: number(),\n result: number()\n });\n var ContactInfoResult = type({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string())\n });\n var VoteAccountInfoResult = type({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number())\n });\n var GetVoteAccounts = jsonRpcResult(type({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult)\n }));\n var ConfirmationStatus = union([literal(\"processed\"), literal(\"confirmed\"), literal(\"finalized\")]);\n var SignatureStatusResponse = type({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus)\n });\n var GetSignatureStatusesRpcResult = jsonRpcResultAndContext(array(nullable(SignatureStatusResponse)));\n var GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n var AddressTableLookupStruct = type({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number())\n });\n var ConfirmedTransactionResult = type({\n signatures: array(string()),\n message: type({\n accountKeys: array(string()),\n header: type({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number()\n }),\n instructions: array(type({\n accounts: array(number()),\n data: string(),\n programIdIndex: number()\n })),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct))\n })\n });\n var AnnotatedAccountKey = type({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal(\"transaction\"), literal(\"lookupTable\")]))\n });\n var ConfirmedTransactionAccountsModeResult = type({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string())\n });\n var ParsedInstructionResult = type({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString\n });\n var RawInstructionResult = type({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString\n });\n var InstructionResult = union([RawInstructionResult, ParsedInstructionResult]);\n var UnknownInstructionResult = union([type({\n parsed: unknown(),\n program: string(),\n programId: string()\n }), type({\n accounts: array(string()),\n data: string(),\n programId: string()\n })]);\n var ParsedOrRawInstruction = coerce(InstructionResult, UnknownInstructionResult, (value) => {\n if (\"accounts\" in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n });\n var ParsedConfirmedTransactionResult = type({\n signatures: array(string()),\n message: type({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct)))\n })\n });\n var TokenBalanceResult = type({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n programId: optional(string()),\n uiTokenAmount: TokenAmountResult\n });\n var LoadedAddressesResult = type({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString)\n });\n var ConfirmedTransactionMetaResult = type({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(nullable(array(type({\n index: number(),\n instructions: array(type({\n accounts: array(number()),\n data: string(),\n programIdIndex: number()\n }))\n })))),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n costUnits: optional(number())\n });\n var ParsedConfirmedTransactionMetaResult = type({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(nullable(array(type({\n index: number(),\n instructions: array(ParsedOrRawInstruction)\n })))),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n costUnits: optional(number())\n });\n var TransactionVersionStruct = union([literal(0), literal(\"legacy\")]);\n var RewardsResult = type({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number()))\n });\n var GetBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetNoneModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetAccountsModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetParsedBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetParsedAccountsModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetParsedNoneModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetConfirmedBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number())\n })));\n var GetBlockSignaturesRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number())\n })));\n var GetTransactionRpcResult = jsonRpcResult(nullable(type({\n slot: number(),\n meta: nullable(ConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct)\n })));\n var GetParsedTransactionRpcResult = jsonRpcResult(nullable(type({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct)\n })));\n var GetLatestBlockhashRpcResult = jsonRpcResultAndContext(type({\n blockhash: string(),\n lastValidBlockHeight: number()\n }));\n var IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n var PerfSampleResult = type({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number()\n });\n var GetRecentPerformanceSamplesRpcResult = jsonRpcResult(array(PerfSampleResult));\n var GetFeeCalculatorRpcResult = jsonRpcResultAndContext(nullable(type({\n feeCalculator: type({\n lamportsPerSignature: number()\n })\n })));\n var RequestAirdropRpcResult = jsonRpcResult(string());\n var SendTransactionRpcResult = jsonRpcResult(string());\n var LogsResult = type({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string()\n });\n var LogsNotificationResult = type({\n result: notificationResultAndContext(LogsResult),\n subscription: number()\n });\n var Keypair = class _Keypair {\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair) {\n this._keypair = void 0;\n this._keypair = keypair ?? generateKeypair();\n }\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate() {\n return new _Keypair(generateKeypair());\n }\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(secretKey, options) {\n if (secretKey.byteLength !== 64) {\n throw new Error(\"bad secret key size\");\n }\n const publicKey2 = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey2[ii] !== computedPublicKey[ii]) {\n throw new Error(\"provided secretKey is invalid\");\n }\n }\n }\n return new _Keypair({\n publicKey: publicKey2,\n secretKey\n });\n }\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed) {\n const publicKey2 = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey2, 32);\n return new _Keypair({\n publicKey: publicKey2,\n secretKey\n });\n }\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey() {\n return new PublicKey(this._keypair.publicKey);\n }\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey() {\n return new Uint8Array(this._keypair.secretKey);\n }\n };\n var LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), u64(\"recentSlot\"), BufferLayout.u8(\"bumpSeed\")])\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), u64(), BufferLayout.seq(publicKey(), BufferLayout.offset(BufferLayout.u32(), -8), \"addresses\")])\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n }\n });\n var AddressLookupTableProgram = class {\n /**\n * @internal\n */\n constructor() {\n }\n static createLookupTable(params) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync([params.authority.toBuffer(), getU64Encoder().encode(params.recentSlot)], this.programId);\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type2, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed\n });\n const keys = [{\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n }];\n return [new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n }), lookupTableAddress];\n }\n static freezeLookupTable(params) {\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type2);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n static extendLookupTable(params) {\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type2, {\n addresses: params.addresses.map((addr) => addr.toBytes())\n });\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n if (params.payer) {\n keys.push({\n pubkey: params.payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n });\n }\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n static deactivateLookupTable(params) {\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type2);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n static closeLookupTable(params) {\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type2);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n };\n AddressLookupTableProgram.programId = new PublicKey(\"AddressLookupTab1e1111111111111111111111111\");\n var COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u8(\"instruction\"), BufferLayout.u32(\"units\"), BufferLayout.u32(\"additionalFee\")])\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u8(\"instruction\"), BufferLayout.u32(\"bytes\")])\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u8(\"instruction\"), BufferLayout.u32(\"units\")])\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u8(\"instruction\"), u64(\"microLamports\")])\n }\n });\n var ComputeBudgetProgram = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the Compute Budget program\n */\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params) {\n const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type2, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static requestHeapFrame(params) {\n const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type2, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static setComputeUnitLimit(params) {\n const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type2, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static setComputeUnitPrice(params) {\n const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type2, {\n microLamports: BigInt(params.microLamports)\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n };\n ComputeBudgetProgram.programId = new PublicKey(\"ComputeBudget111111111111111111111111111111\");\n var PRIVATE_KEY_BYTES$1 = 64;\n var PUBLIC_KEY_BYTES$1 = 32;\n var SIGNATURE_BYTES = 64;\n var ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct([BufferLayout.u8(\"numSignatures\"), BufferLayout.u8(\"padding\"), BufferLayout.u16(\"signatureOffset\"), BufferLayout.u16(\"signatureInstructionIndex\"), BufferLayout.u16(\"publicKeyOffset\"), BufferLayout.u16(\"publicKeyInstructionIndex\"), BufferLayout.u16(\"messageDataOffset\"), BufferLayout.u16(\"messageDataSize\"), BufferLayout.u16(\"messageInstructionIndex\")]);\n var Ed25519Program = class _Ed25519Program {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the ed25519 program\n */\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(params) {\n const {\n publicKey: publicKey2,\n message,\n signature,\n instructionIndex\n } = params;\n assert2(publicKey2.length === PUBLIC_KEY_BYTES$1, `Public Key must be ${PUBLIC_KEY_BYTES$1} bytes but received ${publicKey2.length} bytes`);\n assert2(signature.length === SIGNATURE_BYTES, `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`);\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey2.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n const instructionData = Buffer2.alloc(messageDataOffset + message.length);\n const index = instructionIndex == null ? 65535 : instructionIndex;\n ED25519_INSTRUCTION_LAYOUT.encode({\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index\n }, instructionData);\n instructionData.fill(publicKey2, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n return new TransactionInstruction({\n keys: [],\n programId: _Ed25519Program.programId,\n data: instructionData\n });\n }\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(params) {\n const {\n privateKey,\n message,\n instructionIndex\n } = params;\n assert2(privateKey.length === PRIVATE_KEY_BYTES$1, `Private key must be ${PRIVATE_KEY_BYTES$1} bytes but received ${privateKey.length} bytes`);\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey2 = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n return this.createInstructionWithPublicKey({\n publicKey: publicKey2,\n message,\n signature,\n instructionIndex\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n };\n Ed25519Program.programId = new PublicKey(\"Ed25519SigVerify111111111111111111111111111\");\n var ecdsaSign = (msgHash, privKey) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery];\n };\n secp256k1.utils.isValidPrivateKey;\n var publicKeyCreate = secp256k1.getPublicKey;\n var PRIVATE_KEY_BYTES = 32;\n var ETHEREUM_ADDRESS_BYTES = 20;\n var PUBLIC_KEY_BYTES = 64;\n var SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n var SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct([BufferLayout.u8(\"numSignatures\"), BufferLayout.u16(\"signatureOffset\"), BufferLayout.u8(\"signatureInstructionIndex\"), BufferLayout.u16(\"ethAddressOffset\"), BufferLayout.u8(\"ethAddressInstructionIndex\"), BufferLayout.u16(\"messageDataOffset\"), BufferLayout.u16(\"messageDataSize\"), BufferLayout.u8(\"messageInstructionIndex\"), BufferLayout.blob(20, \"ethAddress\"), BufferLayout.blob(64, \"signature\"), BufferLayout.u8(\"recoveryId\")]);\n var Secp256k1Program = class _Secp256k1Program {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the secp256k1 program\n */\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(publicKey2) {\n assert2(publicKey2.length === PUBLIC_KEY_BYTES, `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey2.length} bytes`);\n try {\n return Buffer2.from(keccak_256(toBuffer(publicKey2))).slice(-ETHEREUM_ADDRESS_BYTES);\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(params) {\n const {\n publicKey: publicKey2,\n message,\n signature,\n recoveryId,\n instructionIndex\n } = params;\n return _Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: _Secp256k1Program.publicKeyToEthAddress(publicKey2),\n message,\n signature,\n recoveryId,\n instructionIndex\n });\n }\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(params) {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0\n } = params;\n let ethAddress;\n if (typeof rawAddress === \"string\") {\n if (rawAddress.startsWith(\"0x\")) {\n ethAddress = Buffer2.from(rawAddress.substr(2), \"hex\");\n } else {\n ethAddress = Buffer2.from(rawAddress, \"hex\");\n }\n } else {\n ethAddress = rawAddress;\n }\n assert2(ethAddress.length === ETHEREUM_ADDRESS_BYTES, `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`);\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n const instructionData = Buffer2.alloc(SECP256K1_INSTRUCTION_LAYOUT.span + message.length);\n SECP256K1_INSTRUCTION_LAYOUT.encode({\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId\n }, instructionData);\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n return new TransactionInstruction({\n keys: [],\n programId: _Secp256k1Program.programId,\n data: instructionData\n });\n }\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(params) {\n const {\n privateKey: pkey,\n message,\n instructionIndex\n } = params;\n assert2(pkey.length === PRIVATE_KEY_BYTES, `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`);\n try {\n const privateKey = toBuffer(pkey);\n const publicKey2 = publicKeyCreate(\n privateKey,\n false\n /* isCompressed */\n ).slice(1);\n const messageHash = Buffer2.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n return this.createInstructionWithPublicKey({\n publicKey: publicKey2,\n message,\n signature,\n recoveryId,\n instructionIndex\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n };\n Secp256k1Program.programId = new PublicKey(\"KeccakSecp256k11111111111111111111111111111\");\n var _Lockup;\n var STAKE_CONFIG_ID = new PublicKey(\"StakeConfig11111111111111111111111111111111\");\n var Lockup = class {\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp, epoch, custodian) {\n this.unixTimestamp = void 0;\n this.epoch = void 0;\n this.custodian = void 0;\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n /**\n * Default, inactive Lockup value\n */\n };\n _Lockup = Lockup;\n Lockup.default = new _Lockup(0, 0, PublicKey.default);\n var STAKE_INSTRUCTION_LAYOUTS = Object.freeze({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), authorized(), lockup()])\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"newAuthorized\"), BufferLayout.u32(\"stakeAuthorizationType\")])\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\")])\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\")])\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"newAuthorized\"), BufferLayout.u32(\"stakeAuthorizationType\"), rustString(\"authoritySeed\"), publicKey(\"authorityOwner\")])\n }\n });\n var StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0\n },\n Withdrawer: {\n index: 1\n }\n });\n var StakeProgram = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the Stake program\n */\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params) {\n const {\n stakePubkey,\n authorized: authorized2,\n lockup: maybeLockup\n } = params;\n const lockup2 = maybeLockup || Lockup.default;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type2, {\n authorized: {\n staker: toBuffer(authorized2.staker.toBuffer()),\n withdrawer: toBuffer(authorized2.withdrawer.toBuffer())\n },\n lockup: {\n unixTimestamp: lockup2.unixTimestamp,\n epoch: lockup2.epoch,\n custodian: toBuffer(lockup2.custodian.toBuffer())\n }\n });\n const instructionData = {\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n const {\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n } = params;\n return transaction.add(this.initialize({\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n }));\n }\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n const {\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n } = params;\n return transaction.add(this.initialize({\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n }));\n }\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n votePubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type2);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: votePubkey,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: STAKE_CONFIG_ID,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type2, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params) {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type2, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer())\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorityBase,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * @internal\n */\n static splitInstruction(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type2, {\n lamports\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: splitStakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params, rentExemptReserve) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: rentExemptReserve,\n space: this.space,\n programId: this.programId\n }));\n return transaction.add(this.splitInstruction(params));\n }\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params, rentExemptReserve) {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports\n } = params;\n const transaction = new Transaction();\n transaction.add(SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId\n }));\n if (rentExemptReserve && rentExemptReserve > 0) {\n transaction.add(SystemProgram.transfer({\n fromPubkey: params.authorizedPubkey,\n toPubkey: splitStakePubkey,\n lamports: rentExemptReserve\n }));\n }\n return transaction.add(this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports\n }));\n }\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params) {\n const {\n stakePubkey,\n sourceStakePubKey,\n authorizedPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type2);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: sourceStakePubKey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n toPubkey,\n lamports,\n custodianPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type2, {\n lamports\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params) {\n const {\n stakePubkey,\n authorizedPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type2);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n };\n StakeProgram.programId = new PublicKey(\"Stake11111111111111111111111111111111111111\");\n StakeProgram.space = 200;\n var VOTE_INSTRUCTION_LAYOUTS = Object.freeze({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), voteInit()])\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"newAuthorized\"), BufferLayout.u32(\"voteAuthorizationType\")])\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\")])\n },\n UpdateValidatorIdentity: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), voteAuthorizeWithSeedArgs()])\n }\n });\n var VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0\n },\n Withdrawer: {\n index: 1\n }\n });\n var VoteProgram = class _VoteProgram {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the Vote program\n */\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(params) {\n const {\n votePubkey,\n nodePubkey,\n voteInit: voteInit2\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type2, {\n voteInit: {\n nodePubkey: toBuffer(voteInit2.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit2.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(voteInit2.authorizedWithdrawer.toBuffer()),\n commission: voteInit2.commission\n }\n });\n const instructionData = {\n keys: [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: nodePubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n return transaction.add(this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit\n }));\n }\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params) {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type2, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params) {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type2, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(currentAuthorityDerivedKeyOwnerPubkey.toBuffer()),\n currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index\n }\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params) {\n const {\n votePubkey,\n authorizedWithdrawerPubkey,\n lamports,\n toPubkey\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type2, {\n lamports\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedWithdrawerPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(params, currentVoteAccountBalance, rentExemptMinimum) {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\"Withdraw will leave vote account with insufficient funds.\");\n }\n return _VoteProgram.withdraw(params);\n }\n /**\n * Generate a transaction to update the validator identity (node pubkey) of a Vote account.\n */\n static updateValidatorIdentity(params) {\n const {\n votePubkey,\n authorizedWithdrawerPubkey,\n nodePubkey\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.UpdateValidatorIdentity;\n const data = encodeData(type2);\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: nodePubkey,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: authorizedWithdrawerPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n };\n VoteProgram.programId = new PublicKey(\"Vote111111111111111111111111111111111111111\");\n VoteProgram.space = 3762;\n var VALIDATOR_INFO_KEY = new PublicKey(\"Va1idator1nfo111111111111111111111111111111\");\n var InfoString = type({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n iconUrl: optional(string()),\n keybaseUsername: optional(string())\n });\n var VOTE_PROGRAM_ID = new PublicKey(\"Vote111111111111111111111111111111111111111\");\n var VoteAccountLayout = BufferLayout.struct([\n publicKey(\"nodePubkey\"),\n publicKey(\"authorizedWithdrawer\"),\n BufferLayout.u8(\"commission\"),\n BufferLayout.nu64(),\n // votes.length\n BufferLayout.seq(BufferLayout.struct([BufferLayout.nu64(\"slot\"), BufferLayout.u32(\"confirmationCount\")]), BufferLayout.offset(BufferLayout.u32(), -8), \"votes\"),\n BufferLayout.u8(\"rootSlotValid\"),\n BufferLayout.nu64(\"rootSlot\"),\n BufferLayout.nu64(),\n // authorizedVoters.length\n BufferLayout.seq(BufferLayout.struct([BufferLayout.nu64(\"epoch\"), publicKey(\"authorizedVoter\")]), BufferLayout.offset(BufferLayout.u32(), -8), \"authorizedVoters\"),\n BufferLayout.struct([BufferLayout.seq(BufferLayout.struct([publicKey(\"authorizedPubkey\"), BufferLayout.nu64(\"epochOfLastAuthorizedSwitch\"), BufferLayout.nu64(\"targetEpoch\")]), 32, \"buf\"), BufferLayout.nu64(\"idx\"), BufferLayout.u8(\"isEmpty\")], \"priorVoters\"),\n BufferLayout.nu64(),\n // epochCredits.length\n BufferLayout.seq(BufferLayout.struct([BufferLayout.nu64(\"epoch\"), BufferLayout.nu64(\"credits\"), BufferLayout.nu64(\"prevCredits\")]), BufferLayout.offset(BufferLayout.u32(), -8), \"epochCredits\"),\n BufferLayout.struct([BufferLayout.nu64(\"slot\"), BufferLayout.nu64(\"timestamp\")], \"lastTimestamp\")\n ]);\n\n // src/lib/lit-actions/internal/solana/generatePrivateKey.ts\n function generateSolanaPrivateKey() {\n const solanaKeypair = Keypair.generate();\n return {\n privateKey: Buffer2.from(solanaKeypair.secretKey).toString(\"hex\"),\n publicKey: solanaKeypair.publicKey.toString()\n };\n }\n\n // src/lib/lit-actions/raw-action-functions/common/batchGenerateEncryptedKeys.ts\n async function processSolanaAction({\n action,\n evmContractConditions: evmContractConditions2\n }) {\n const { network, generateKeyParams } = action;\n const solanaKey = generateSolanaPrivateKey();\n const generatedPrivateKey = await encryptPrivateKey({\n evmContractConditions: evmContractConditions2,\n publicKey: solanaKey.publicKey,\n privateKey: solanaKey.privateKey\n });\n return {\n network,\n generateEncryptedPrivateKey: {\n ...generatedPrivateKey,\n memo: generateKeyParams.memo\n }\n };\n }\n async function processActions({\n actions: actions2,\n evmContractConditions: evmContractConditions2\n }) {\n return Promise.all(\n actions2.map(async (action, ndx) => {\n const { network } = action;\n if (network === \"solana\") {\n return await processSolanaAction({\n action,\n evmContractConditions: evmContractConditions2\n });\n } else {\n throw new Error(`Invalid network for action[${ndx}]: ${network}`);\n }\n })\n );\n }\n function validateParams(actions2) {\n if (!actions2) {\n throw new Error(\"Missing required field: actions\");\n }\n if (!actions2.length) {\n throw new Error(\"No actions provided (empty array?)\");\n }\n actions2.forEach((action, ndx) => {\n if (![\"solana\"].includes(action.network)) {\n throw new Error(`Invalid field: actions[${ndx}].network: ${action.network}`);\n }\n if (!action.generateKeyParams) {\n throw new Error(`Missing required field: actions[${ndx}].generateKeyParams`);\n }\n if (!action.generateKeyParams?.memo) {\n throw new Error(`Missing required field: actions[${ndx}].generateKeyParams.memo`);\n }\n });\n }\n async function batchGenerateEncryptedKeys({\n actions: actions2,\n evmContractConditions: evmContractConditions2\n }) {\n validateParams(actions2);\n return processActions({\n actions: actions2,\n evmContractConditions: evmContractConditions2\n });\n }\n\n // src/lib/lit-actions/self-executing-actions/common/batchGenerateEncryptedKeys.ts\n (async () => litActionHandler(async () => batchGenerateEncryptedKeys({ actions, evmContractConditions })))();\n})();\n/*! Bundled license information:\n\n@jspm/core/nodelibs/browser/chunk-DtuTasat.js:\n (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *)\n\nsafe-buffer/index.js:\n (*! safe-buffer. MIT License. Feross Aboukhadijeh *)\n\n@solana/buffer-layout/lib/Layout.js:\n (**\n * Support for translating between Uint8Array instances and JavaScript\n * native types.\n *\n * {@link module:Layout~Layout|Layout} is the basis of a class\n * hierarchy that associates property names with sequences of encoded\n * bytes.\n *\n * Layouts are supported for these scalar (numeric) types:\n * * {@link module:Layout~UInt|Unsigned integers in little-endian\n * format} with {@link module:Layout.u8|8-bit}, {@link\n * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},\n * {@link module:Layout.u32|32-bit}, {@link\n * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}\n * representation ranges;\n * * {@link module:Layout~UIntBE|Unsigned integers in big-endian\n * format} with {@link module:Layout.u16be|16-bit}, {@link\n * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},\n * {@link module:Layout.u40be|40-bit}, and {@link\n * module:Layout.u48be|48-bit} representation ranges;\n * * {@link module:Layout~Int|Signed integers in little-endian\n * format} with {@link module:Layout.s8|8-bit}, {@link\n * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},\n * {@link module:Layout.s32|32-bit}, {@link\n * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}\n * representation ranges;\n * * {@link module:Layout~IntBE|Signed integers in big-endian format}\n * with {@link module:Layout.s16be|16-bit}, {@link\n * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},\n * {@link module:Layout.s40be|40-bit}, and {@link\n * module:Layout.s48be|48-bit} representation ranges;\n * * 64-bit integral values that decode to an exact (if magnitude is\n * less than 2^53) or nearby integral Number in {@link\n * module:Layout.nu64|unsigned little-endian}, {@link\n * module:Layout.nu64be|unsigned big-endian}, {@link\n * module:Layout.ns64|signed little-endian}, and {@link\n * module:Layout.ns64be|unsigned big-endian} encodings;\n * * 32-bit floating point values with {@link\n * module:Layout.f32|little-endian} and {@link\n * module:Layout.f32be|big-endian} representations;\n * * 64-bit floating point values with {@link\n * module:Layout.f64|little-endian} and {@link\n * module:Layout.f64be|big-endian} representations;\n * * {@link module:Layout.const|Constants} that take no space in the\n * encoded expression.\n *\n * and for these aggregate types:\n * * {@link module:Layout.seq|Sequence}s of instances of a {@link\n * module:Layout~Layout|Layout}, with JavaScript representation as\n * an Array and constant or data-dependent {@link\n * module:Layout~Sequence#count|length};\n * * {@link module:Layout.struct|Structure}s that aggregate a\n * heterogeneous sequence of {@link module:Layout~Layout|Layout}\n * instances, with JavaScript representation as an Object;\n * * {@link module:Layout.union|Union}s that support multiple {@link\n * module:Layout~VariantLayout|variant layouts} over a fixed\n * (padded) or variable (not padded) span of bytes, using an\n * unsigned integer at the start of the data or a separate {@link\n * module:Layout.unionLayoutDiscriminator|layout element} to\n * determine which layout to use when interpreting the buffer\n * contents;\n * * {@link module:Layout.bits|BitStructure}s that contain a sequence\n * of individual {@link\n * module:Layout~BitStructure#addField|BitField}s packed into an 8,\n * 16, 24, or 32-bit unsigned integer starting at the least- or\n * most-significant bit;\n * * {@link module:Layout.cstr|C strings} of varying length;\n * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link\n * module:Layout~Blob#length|length} raw data.\n *\n * All {@link module:Layout~Layout|Layout} instances are immutable\n * after construction, to prevent internal state from becoming\n * inconsistent.\n *\n * @local Layout\n * @local ExternalLayout\n * @local GreedyCount\n * @local OffsetLayout\n * @local UInt\n * @local UIntBE\n * @local Int\n * @local IntBE\n * @local NearUInt64\n * @local NearUInt64BE\n * @local NearInt64\n * @local NearInt64BE\n * @local Float\n * @local FloatBE\n * @local Double\n * @local DoubleBE\n * @local Sequence\n * @local Structure\n * @local UnionDiscriminator\n * @local UnionLayoutDiscriminator\n * @local Union\n * @local VariantLayout\n * @local BitStructure\n * @local BitField\n * @local Boolean\n * @local Blob\n * @local CString\n * @local Constant\n * @local bindConstructorLayout\n * @module Layout\n * @license MIT\n * @author Peter A. Bigot\n * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}\n *)\n\n@noble/hashes/esm/utils.js:\n (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/modular.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/curve.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/edwards.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/ed25519.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/weierstrass.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/_shortw_utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/secp256k1.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n*/\n"; module.exports = { "code": code, - "ipfsCid": "QmPFuLy3qYxXQvxfaswcXbgxYguEAS51Wo1GQYyGaAV9U2", + "ipfsCid": "QmSYoyYYYzQdfZqKBA3ouqvJPyDtRTuei7wjb6ULhK8XAH", }; diff --git a/packages/libs/wrapped-keys/src/lib/lit-actions/generated/solana/generateEncryptedSolanaPrivateKey-metadata.json b/packages/libs/wrapped-keys/src/lib/lit-actions/generated/solana/generateEncryptedSolanaPrivateKey-metadata.json index 8f549b8ca..71b4c785a 100644 --- a/packages/libs/wrapped-keys/src/lib/lit-actions/generated/solana/generateEncryptedSolanaPrivateKey-metadata.json +++ b/packages/libs/wrapped-keys/src/lib/lit-actions/generated/solana/generateEncryptedSolanaPrivateKey-metadata.json @@ -1,3 +1,3 @@ { - "ipfsCid": "QmQg5uApmG88LTqFtvWzKYgkix2nSKjQ1NvERBeFyjdJVf" + "ipfsCid": "Qmb4hG6ATbjDyegJCCZYqMHucgkZTmE62nNFxmNd2byeR9" } diff --git a/packages/libs/wrapped-keys/src/lib/lit-actions/generated/solana/generateEncryptedSolanaPrivateKey.js b/packages/libs/wrapped-keys/src/lib/lit-actions/generated/solana/generateEncryptedSolanaPrivateKey.js index b1d3851e4..a635387e4 100644 --- a/packages/libs/wrapped-keys/src/lib/lit-actions/generated/solana/generateEncryptedSolanaPrivateKey.js +++ b/packages/libs/wrapped-keys/src/lib/lit-actions/generated/solana/generateEncryptedSolanaPrivateKey.js @@ -2,8 +2,8 @@ * DO NOT EDIT THIS FILE. IT IS GENERATED ON BUILD. * @type {string} */ -const code = ";(()=>{try{const g=globalThis;const D=(g.Deno=g.Deno||{});const B=(D.build=D.build||{});if(B.os==null){B.os=\"linux\";}}catch{}})();\n\"use strict\";\n(() => {\n var __create = Object.create;\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __getProtoOf = Object.getPrototypeOf;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n };\n var __commonJS = (cb, mod2) => function __require() {\n return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;\n };\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, \"default\", { value: mod2, enumerable: true }) : target,\n mod2\n ));\n var __toCommonJS = (mod2) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod2);\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/__dirname.js\n var init_dirname = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/__dirname.js\"() {\n \"use strict\";\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js\n function Item(fun, array2) {\n this.fun = fun;\n this.array = array2;\n }\n function hrtime(previousTimestamp) {\n var baseNow = Math.floor((Date.now() - _performance.now()) * 1e-3);\n var clocktime = _performance.now() * 1e-3;\n var seconds = Math.floor(clocktime) + baseNow;\n var nanoseconds = Math.floor(clocktime % 1 * 1e9);\n if (previousTimestamp) {\n seconds = seconds - previousTimestamp[0];\n nanoseconds = nanoseconds - previousTimestamp[1];\n if (nanoseconds < 0) {\n seconds--;\n nanoseconds += nanoPerSec;\n }\n }\n return [seconds, nanoseconds];\n }\n var env, _performance, nowOffset, nanoPerSec;\n var init_process = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Item.prototype.run = function() {\n this.fun.apply(null, this.array);\n };\n env = {\n PATH: \"/usr/bin\",\n LANG: typeof navigator !== \"undefined\" ? navigator.language + \".UTF-8\" : void 0,\n PWD: \"/\",\n HOME: \"/home\",\n TMP: \"/tmp\"\n };\n _performance = {\n now: typeof performance !== \"undefined\" ? performance.now.bind(performance) : void 0,\n timing: typeof performance !== \"undefined\" ? performance.timing : void 0\n };\n if (_performance.now === void 0) {\n nowOffset = Date.now();\n if (_performance.timing && _performance.timing.navigationStart) {\n nowOffset = _performance.timing.navigationStart;\n }\n _performance.now = () => Date.now() - nowOffset;\n }\n nanoPerSec = 1e9;\n hrtime.bigint = function(time) {\n var diff = hrtime(time);\n if (typeof BigInt === \"undefined\") {\n return diff[0] * nanoPerSec + diff[1];\n }\n return BigInt(diff[0] * nanoPerSec) + BigInt(diff[1]);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/process.js\n var init_process2 = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/process.js\"() {\n \"use strict\";\n init_process();\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js\n function dew$2() {\n if (_dewExec$2)\n return exports$2;\n _dewExec$2 = true;\n exports$2.byteLength = byteLength;\n exports$2.toByteArray = toByteArray;\n exports$2.fromByteArray = fromByteArray;\n var lookup = [];\n var revLookup = [];\n var Arr = typeof Uint8Array !== \"undefined\" ? Uint8Array : Array;\n var code = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n for (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i];\n revLookup[code.charCodeAt(i)] = i;\n }\n revLookup[\"-\".charCodeAt(0)] = 62;\n revLookup[\"_\".charCodeAt(0)] = 63;\n function getLens(b64) {\n var len2 = b64.length;\n if (len2 % 4 > 0) {\n throw new Error(\"Invalid string. Length must be a multiple of 4\");\n }\n var validLen = b64.indexOf(\"=\");\n if (validLen === -1)\n validLen = len2;\n var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;\n return [validLen, placeHoldersLen];\n }\n function byteLength(b64) {\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n }\n function _byteLength(b64, validLen, placeHoldersLen) {\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n }\n function toByteArray(b64) {\n var tmp;\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n var curByte = 0;\n var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;\n var i2;\n for (i2 = 0; i2 < len2; i2 += 4) {\n tmp = revLookup[b64.charCodeAt(i2)] << 18 | revLookup[b64.charCodeAt(i2 + 1)] << 12 | revLookup[b64.charCodeAt(i2 + 2)] << 6 | revLookup[b64.charCodeAt(i2 + 3)];\n arr[curByte++] = tmp >> 16 & 255;\n arr[curByte++] = tmp >> 8 & 255;\n arr[curByte++] = tmp & 255;\n }\n if (placeHoldersLen === 2) {\n tmp = revLookup[b64.charCodeAt(i2)] << 2 | revLookup[b64.charCodeAt(i2 + 1)] >> 4;\n arr[curByte++] = tmp & 255;\n }\n if (placeHoldersLen === 1) {\n tmp = revLookup[b64.charCodeAt(i2)] << 10 | revLookup[b64.charCodeAt(i2 + 1)] << 4 | revLookup[b64.charCodeAt(i2 + 2)] >> 2;\n arr[curByte++] = tmp >> 8 & 255;\n arr[curByte++] = tmp & 255;\n }\n return arr;\n }\n function tripletToBase64(num) {\n return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];\n }\n function encodeChunk(uint8, start, end) {\n var tmp;\n var output = [];\n for (var i2 = start; i2 < end; i2 += 3) {\n tmp = (uint8[i2] << 16 & 16711680) + (uint8[i2 + 1] << 8 & 65280) + (uint8[i2 + 2] & 255);\n output.push(tripletToBase64(tmp));\n }\n return output.join(\"\");\n }\n function fromByteArray(uint8) {\n var tmp;\n var len2 = uint8.length;\n var extraBytes = len2 % 3;\n var parts = [];\n var maxChunkLength = 16383;\n for (var i2 = 0, len22 = len2 - extraBytes; i2 < len22; i2 += maxChunkLength) {\n parts.push(encodeChunk(uint8, i2, i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength));\n }\n if (extraBytes === 1) {\n tmp = uint8[len2 - 1];\n parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 63] + \"==\");\n } else if (extraBytes === 2) {\n tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];\n parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + \"=\");\n }\n return parts.join(\"\");\n }\n return exports$2;\n }\n function dew$1() {\n if (_dewExec$1)\n return exports$1;\n _dewExec$1 = true;\n exports$1.read = function(buffer, offset2, isLE2, mLen, nBytes) {\n var e, m;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE2 ? nBytes - 1 : 0;\n var d = isLE2 ? -1 : 1;\n var s = buffer[offset2 + i];\n i += d;\n e = s & (1 << -nBits) - 1;\n s >>= -nBits;\n nBits += eLen;\n for (; nBits > 0; e = e * 256 + buffer[offset2 + i], i += d, nBits -= 8) {\n }\n m = e & (1 << -nBits) - 1;\n e >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m = m * 256 + buffer[offset2 + i], i += d, nBits -= 8) {\n }\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : (s ? -1 : 1) * Infinity;\n } else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\n };\n exports$1.write = function(buffer, value, offset2, isLE2, mLen, nBytes) {\n var e, m, c;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;\n var i = isLE2 ? 0 : nBytes - 1;\n var d = isLE2 ? 1 : -1;\n var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n value = Math.abs(value);\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n for (; mLen >= 8; buffer[offset2 + i] = m & 255, i += d, m /= 256, mLen -= 8) {\n }\n e = e << mLen | m;\n eLen += mLen;\n for (; eLen > 0; buffer[offset2 + i] = e & 255, i += d, e /= 256, eLen -= 8) {\n }\n buffer[offset2 + i - d] |= s * 128;\n };\n return exports$1;\n }\n function dew() {\n if (_dewExec)\n return exports;\n _dewExec = true;\n const base64 = dew$2();\n const ieee754 = dew$1();\n const customInspectSymbol = typeof Symbol === \"function\" && typeof Symbol[\"for\"] === \"function\" ? Symbol[\"for\"](\"nodejs.util.inspect.custom\") : null;\n exports.Buffer = Buffer3;\n exports.SlowBuffer = SlowBuffer;\n exports.INSPECT_MAX_BYTES = 50;\n const K_MAX_LENGTH = 2147483647;\n exports.kMaxLength = K_MAX_LENGTH;\n Buffer3.TYPED_ARRAY_SUPPORT = typedArraySupport();\n if (!Buffer3.TYPED_ARRAY_SUPPORT && typeof console !== \"undefined\" && typeof console.error === \"function\") {\n console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");\n }\n function typedArraySupport() {\n try {\n const arr = new Uint8Array(1);\n const proto = {\n foo: function() {\n return 42;\n }\n };\n Object.setPrototypeOf(proto, Uint8Array.prototype);\n Object.setPrototypeOf(arr, proto);\n return arr.foo() === 42;\n } catch (e) {\n return false;\n }\n }\n Object.defineProperty(Buffer3.prototype, \"parent\", {\n enumerable: true,\n get: function() {\n if (!Buffer3.isBuffer(this))\n return void 0;\n return this.buffer;\n }\n });\n Object.defineProperty(Buffer3.prototype, \"offset\", {\n enumerable: true,\n get: function() {\n if (!Buffer3.isBuffer(this))\n return void 0;\n return this.byteOffset;\n }\n });\n function createBuffer(length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"');\n }\n const buf = new Uint8Array(length);\n Object.setPrototypeOf(buf, Buffer3.prototype);\n return buf;\n }\n function Buffer3(arg, encodingOrOffset, length) {\n if (typeof arg === \"number\") {\n if (typeof encodingOrOffset === \"string\") {\n throw new TypeError('The \"string\" argument must be of type string. Received type number');\n }\n return allocUnsafe(arg);\n }\n return from(arg, encodingOrOffset, length);\n }\n Buffer3.poolSize = 8192;\n function from(value, encodingOrOffset, length) {\n if (typeof value === \"string\") {\n return fromString(value, encodingOrOffset);\n }\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value);\n }\n if (value == null) {\n throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n }\n if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {\n return fromArrayBuffer(value, encodingOrOffset, length);\n }\n if (typeof SharedArrayBuffer !== \"undefined\" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length);\n }\n if (typeof value === \"number\") {\n throw new TypeError('The \"value\" argument must not be of type number. Received type number');\n }\n const valueOf = value.valueOf && value.valueOf();\n if (valueOf != null && valueOf !== value) {\n return Buffer3.from(valueOf, encodingOrOffset, length);\n }\n const b = fromObject(value);\n if (b)\n return b;\n if (typeof Symbol !== \"undefined\" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === \"function\") {\n return Buffer3.from(value[Symbol.toPrimitive](\"string\"), encodingOrOffset, length);\n }\n throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n }\n Buffer3.from = function(value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length);\n };\n Object.setPrototypeOf(Buffer3.prototype, Uint8Array.prototype);\n Object.setPrototypeOf(Buffer3, Uint8Array);\n function assertSize(size) {\n if (typeof size !== \"number\") {\n throw new TypeError('\"size\" argument must be of type number');\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"');\n }\n }\n function alloc(size, fill, encoding) {\n assertSize(size);\n if (size <= 0) {\n return createBuffer(size);\n }\n if (fill !== void 0) {\n return typeof encoding === \"string\" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);\n }\n return createBuffer(size);\n }\n Buffer3.alloc = function(size, fill, encoding) {\n return alloc(size, fill, encoding);\n };\n function allocUnsafe(size) {\n assertSize(size);\n return createBuffer(size < 0 ? 0 : checked(size) | 0);\n }\n Buffer3.allocUnsafe = function(size) {\n return allocUnsafe(size);\n };\n Buffer3.allocUnsafeSlow = function(size) {\n return allocUnsafe(size);\n };\n function fromString(string2, encoding) {\n if (typeof encoding !== \"string\" || encoding === \"\") {\n encoding = \"utf8\";\n }\n if (!Buffer3.isEncoding(encoding)) {\n throw new TypeError(\"Unknown encoding: \" + encoding);\n }\n const length = byteLength(string2, encoding) | 0;\n let buf = createBuffer(length);\n const actual = buf.write(string2, encoding);\n if (actual !== length) {\n buf = buf.slice(0, actual);\n }\n return buf;\n }\n function fromArrayLike(array2) {\n const length = array2.length < 0 ? 0 : checked(array2.length) | 0;\n const buf = createBuffer(length);\n for (let i = 0; i < length; i += 1) {\n buf[i] = array2[i] & 255;\n }\n return buf;\n }\n function fromArrayView(arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView);\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);\n }\n return fromArrayLike(arrayView);\n }\n function fromArrayBuffer(array2, byteOffset, length) {\n if (byteOffset < 0 || array2.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds');\n }\n if (array2.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds');\n }\n let buf;\n if (byteOffset === void 0 && length === void 0) {\n buf = new Uint8Array(array2);\n } else if (length === void 0) {\n buf = new Uint8Array(array2, byteOffset);\n } else {\n buf = new Uint8Array(array2, byteOffset, length);\n }\n Object.setPrototypeOf(buf, Buffer3.prototype);\n return buf;\n }\n function fromObject(obj) {\n if (Buffer3.isBuffer(obj)) {\n const len = checked(obj.length) | 0;\n const buf = createBuffer(len);\n if (buf.length === 0) {\n return buf;\n }\n obj.copy(buf, 0, 0, len);\n return buf;\n }\n if (obj.length !== void 0) {\n if (typeof obj.length !== \"number\" || numberIsNaN(obj.length)) {\n return createBuffer(0);\n }\n return fromArrayLike(obj);\n }\n if (obj.type === \"Buffer\" && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data);\n }\n }\n function checked(length) {\n if (length >= K_MAX_LENGTH) {\n throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\" + K_MAX_LENGTH.toString(16) + \" bytes\");\n }\n return length | 0;\n }\n function SlowBuffer(length) {\n if (+length != length) {\n length = 0;\n }\n return Buffer3.alloc(+length);\n }\n Buffer3.isBuffer = function isBuffer(b) {\n return b != null && b._isBuffer === true && b !== Buffer3.prototype;\n };\n Buffer3.compare = function compare(a, b) {\n if (isInstance(a, Uint8Array))\n a = Buffer3.from(a, a.offset, a.byteLength);\n if (isInstance(b, Uint8Array))\n b = Buffer3.from(b, b.offset, b.byteLength);\n if (!Buffer3.isBuffer(a) || !Buffer3.isBuffer(b)) {\n throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');\n }\n if (a === b)\n return 0;\n let x = a.length;\n let y = b.length;\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n if (x < y)\n return -1;\n if (y < x)\n return 1;\n return 0;\n };\n Buffer3.isEncoding = function isEncoding(encoding) {\n switch (String(encoding).toLowerCase()) {\n case \"hex\":\n case \"utf8\":\n case \"utf-8\":\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n case \"base64\":\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return true;\n default:\n return false;\n }\n };\n Buffer3.concat = function concat(list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n if (list.length === 0) {\n return Buffer3.alloc(0);\n }\n let i;\n if (length === void 0) {\n length = 0;\n for (i = 0; i < list.length; ++i) {\n length += list[i].length;\n }\n }\n const buffer = Buffer3.allocUnsafe(length);\n let pos = 0;\n for (i = 0; i < list.length; ++i) {\n let buf = list[i];\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer3.isBuffer(buf))\n buf = Buffer3.from(buf);\n buf.copy(buffer, pos);\n } else {\n Uint8Array.prototype.set.call(buffer, buf, pos);\n }\n } else if (!Buffer3.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n } else {\n buf.copy(buffer, pos);\n }\n pos += buf.length;\n }\n return buffer;\n };\n function byteLength(string2, encoding) {\n if (Buffer3.isBuffer(string2)) {\n return string2.length;\n }\n if (ArrayBuffer.isView(string2) || isInstance(string2, ArrayBuffer)) {\n return string2.byteLength;\n }\n if (typeof string2 !== \"string\") {\n throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string2);\n }\n const len = string2.length;\n const mustMatch = arguments.length > 2 && arguments[2] === true;\n if (!mustMatch && len === 0)\n return 0;\n let loweredCase = false;\n for (; ; ) {\n switch (encoding) {\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return len;\n case \"utf8\":\n case \"utf-8\":\n return utf8ToBytes2(string2).length;\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return len * 2;\n case \"hex\":\n return len >>> 1;\n case \"base64\":\n return base64ToBytes(string2).length;\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes2(string2).length;\n }\n encoding = (\"\" + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer3.byteLength = byteLength;\n function slowToString(encoding, start, end) {\n let loweredCase = false;\n if (start === void 0 || start < 0) {\n start = 0;\n }\n if (start > this.length) {\n return \"\";\n }\n if (end === void 0 || end > this.length) {\n end = this.length;\n }\n if (end <= 0) {\n return \"\";\n }\n end >>>= 0;\n start >>>= 0;\n if (end <= start) {\n return \"\";\n }\n if (!encoding)\n encoding = \"utf8\";\n while (true) {\n switch (encoding) {\n case \"hex\":\n return hexSlice(this, start, end);\n case \"utf8\":\n case \"utf-8\":\n return utf8Slice(this, start, end);\n case \"ascii\":\n return asciiSlice(this, start, end);\n case \"latin1\":\n case \"binary\":\n return latin1Slice(this, start, end);\n case \"base64\":\n return base64Slice(this, start, end);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return utf16leSlice(this, start, end);\n default:\n if (loweredCase)\n throw new TypeError(\"Unknown encoding: \" + encoding);\n encoding = (encoding + \"\").toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer3.prototype._isBuffer = true;\n function swap(b, n, m) {\n const i = b[n];\n b[n] = b[m];\n b[m] = i;\n }\n Buffer3.prototype.swap16 = function swap16() {\n const len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 16-bits\");\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1);\n }\n return this;\n };\n Buffer3.prototype.swap32 = function swap32() {\n const len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 32-bits\");\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3);\n swap(this, i + 1, i + 2);\n }\n return this;\n };\n Buffer3.prototype.swap64 = function swap64() {\n const len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 64-bits\");\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7);\n swap(this, i + 1, i + 6);\n swap(this, i + 2, i + 5);\n swap(this, i + 3, i + 4);\n }\n return this;\n };\n Buffer3.prototype.toString = function toString() {\n const length = this.length;\n if (length === 0)\n return \"\";\n if (arguments.length === 0)\n return utf8Slice(this, 0, length);\n return slowToString.apply(this, arguments);\n };\n Buffer3.prototype.toLocaleString = Buffer3.prototype.toString;\n Buffer3.prototype.equals = function equals(b) {\n if (!Buffer3.isBuffer(b))\n throw new TypeError(\"Argument must be a Buffer\");\n if (this === b)\n return true;\n return Buffer3.compare(this, b) === 0;\n };\n Buffer3.prototype.inspect = function inspect() {\n let str = \"\";\n const max = exports.INSPECT_MAX_BYTES;\n str = this.toString(\"hex\", 0, max).replace(/(.{2})/g, \"$1 \").trim();\n if (this.length > max)\n str += \" ... \";\n return \"\";\n };\n if (customInspectSymbol) {\n Buffer3.prototype[customInspectSymbol] = Buffer3.prototype.inspect;\n }\n Buffer3.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer3.from(target, target.offset, target.byteLength);\n }\n if (!Buffer3.isBuffer(target)) {\n throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target);\n }\n if (start === void 0) {\n start = 0;\n }\n if (end === void 0) {\n end = target ? target.length : 0;\n }\n if (thisStart === void 0) {\n thisStart = 0;\n }\n if (thisEnd === void 0) {\n thisEnd = this.length;\n }\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError(\"out of range index\");\n }\n if (thisStart >= thisEnd && start >= end) {\n return 0;\n }\n if (thisStart >= thisEnd) {\n return -1;\n }\n if (start >= end) {\n return 1;\n }\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n if (this === target)\n return 0;\n let x = thisEnd - thisStart;\n let y = end - start;\n const len = Math.min(x, y);\n const thisCopy = this.slice(thisStart, thisEnd);\n const targetCopy = target.slice(start, end);\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i];\n y = targetCopy[i];\n break;\n }\n }\n if (x < y)\n return -1;\n if (y < x)\n return 1;\n return 0;\n };\n function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n if (buffer.length === 0)\n return -1;\n if (typeof byteOffset === \"string\") {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 2147483647) {\n byteOffset = 2147483647;\n } else if (byteOffset < -2147483648) {\n byteOffset = -2147483648;\n }\n byteOffset = +byteOffset;\n if (numberIsNaN(byteOffset)) {\n byteOffset = dir ? 0 : buffer.length - 1;\n }\n if (byteOffset < 0)\n byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir)\n return -1;\n else\n byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir)\n byteOffset = 0;\n else\n return -1;\n }\n if (typeof val === \"string\") {\n val = Buffer3.from(val, encoding);\n }\n if (Buffer3.isBuffer(val)) {\n if (val.length === 0) {\n return -1;\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n } else if (typeof val === \"number\") {\n val = val & 255;\n if (typeof Uint8Array.prototype.indexOf === \"function\") {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n }\n throw new TypeError(\"val must be string, number or Buffer\");\n }\n function arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n let indexSize = 1;\n let arrLength = arr.length;\n let valLength = val.length;\n if (encoding !== void 0) {\n encoding = String(encoding).toLowerCase();\n if (encoding === \"ucs2\" || encoding === \"ucs-2\" || encoding === \"utf16le\" || encoding === \"utf-16le\") {\n if (arr.length < 2 || val.length < 2) {\n return -1;\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n function read(buf, i2) {\n if (indexSize === 1) {\n return buf[i2];\n } else {\n return buf.readUInt16BE(i2 * indexSize);\n }\n }\n let i;\n if (dir) {\n let foundIndex = -1;\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1)\n foundIndex = i;\n if (i - foundIndex + 1 === valLength)\n return foundIndex * indexSize;\n } else {\n if (foundIndex !== -1)\n i -= i - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength)\n byteOffset = arrLength - valLength;\n for (i = byteOffset; i >= 0; i--) {\n let found = true;\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false;\n break;\n }\n }\n if (found)\n return i;\n }\n }\n return -1;\n }\n Buffer3.prototype.includes = function includes(val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1;\n };\n Buffer3.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n };\n Buffer3.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n };\n function hexWrite(buf, string2, offset2, length) {\n offset2 = Number(offset2) || 0;\n const remaining = buf.length - offset2;\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n if (length > remaining) {\n length = remaining;\n }\n }\n const strLen = string2.length;\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n let i;\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string2.substr(i * 2, 2), 16);\n if (numberIsNaN(parsed))\n return i;\n buf[offset2 + i] = parsed;\n }\n return i;\n }\n function utf8Write(buf, string2, offset2, length) {\n return blitBuffer(utf8ToBytes2(string2, buf.length - offset2), buf, offset2, length);\n }\n function asciiWrite(buf, string2, offset2, length) {\n return blitBuffer(asciiToBytes(string2), buf, offset2, length);\n }\n function base64Write(buf, string2, offset2, length) {\n return blitBuffer(base64ToBytes(string2), buf, offset2, length);\n }\n function ucs2Write(buf, string2, offset2, length) {\n return blitBuffer(utf16leToBytes(string2, buf.length - offset2), buf, offset2, length);\n }\n Buffer3.prototype.write = function write(string2, offset2, length, encoding) {\n if (offset2 === void 0) {\n encoding = \"utf8\";\n length = this.length;\n offset2 = 0;\n } else if (length === void 0 && typeof offset2 === \"string\") {\n encoding = offset2;\n length = this.length;\n offset2 = 0;\n } else if (isFinite(offset2)) {\n offset2 = offset2 >>> 0;\n if (isFinite(length)) {\n length = length >>> 0;\n if (encoding === void 0)\n encoding = \"utf8\";\n } else {\n encoding = length;\n length = void 0;\n }\n } else {\n throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");\n }\n const remaining = this.length - offset2;\n if (length === void 0 || length > remaining)\n length = remaining;\n if (string2.length > 0 && (length < 0 || offset2 < 0) || offset2 > this.length) {\n throw new RangeError(\"Attempt to write outside buffer bounds\");\n }\n if (!encoding)\n encoding = \"utf8\";\n let loweredCase = false;\n for (; ; ) {\n switch (encoding) {\n case \"hex\":\n return hexWrite(this, string2, offset2, length);\n case \"utf8\":\n case \"utf-8\":\n return utf8Write(this, string2, offset2, length);\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return asciiWrite(this, string2, offset2, length);\n case \"base64\":\n return base64Write(this, string2, offset2, length);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return ucs2Write(this, string2, offset2, length);\n default:\n if (loweredCase)\n throw new TypeError(\"Unknown encoding: \" + encoding);\n encoding = (\"\" + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n };\n Buffer3.prototype.toJSON = function toJSON() {\n return {\n type: \"Buffer\",\n data: Array.prototype.slice.call(this._arr || this, 0)\n };\n };\n function base64Slice(buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf);\n } else {\n return base64.fromByteArray(buf.slice(start, end));\n }\n }\n function utf8Slice(buf, start, end) {\n end = Math.min(buf.length, end);\n const res = [];\n let i = start;\n while (i < end) {\n const firstByte = buf[i];\n let codePoint = null;\n let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint;\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 128) {\n codePoint = firstByte;\n }\n break;\n case 2:\n secondByte = buf[i + 1];\n if ((secondByte & 192) === 128) {\n tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;\n if (tempCodePoint > 127) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 3:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {\n tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;\n if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 4:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n fourthByte = buf[i + 3];\n if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {\n tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;\n if (tempCodePoint > 65535 && tempCodePoint < 1114112) {\n codePoint = tempCodePoint;\n }\n }\n }\n }\n if (codePoint === null) {\n codePoint = 65533;\n bytesPerSequence = 1;\n } else if (codePoint > 65535) {\n codePoint -= 65536;\n res.push(codePoint >>> 10 & 1023 | 55296);\n codePoint = 56320 | codePoint & 1023;\n }\n res.push(codePoint);\n i += bytesPerSequence;\n }\n return decodeCodePointsArray(res);\n }\n const MAX_ARGUMENTS_LENGTH = 4096;\n function decodeCodePointsArray(codePoints) {\n const len = codePoints.length;\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints);\n }\n let res = \"\";\n let i = 0;\n while (i < len) {\n res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));\n }\n return res;\n }\n function asciiSlice(buf, start, end) {\n let ret = \"\";\n end = Math.min(buf.length, end);\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 127);\n }\n return ret;\n }\n function latin1Slice(buf, start, end) {\n let ret = \"\";\n end = Math.min(buf.length, end);\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i]);\n }\n return ret;\n }\n function hexSlice(buf, start, end) {\n const len = buf.length;\n if (!start || start < 0)\n start = 0;\n if (!end || end < 0 || end > len)\n end = len;\n let out = \"\";\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]];\n }\n return out;\n }\n function utf16leSlice(buf, start, end) {\n const bytes = buf.slice(start, end);\n let res = \"\";\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n }\n return res;\n }\n Buffer3.prototype.slice = function slice(start, end) {\n const len = this.length;\n start = ~~start;\n end = end === void 0 ? len : ~~end;\n if (start < 0) {\n start += len;\n if (start < 0)\n start = 0;\n } else if (start > len) {\n start = len;\n }\n if (end < 0) {\n end += len;\n if (end < 0)\n end = 0;\n } else if (end > len) {\n end = len;\n }\n if (end < start)\n end = start;\n const newBuf = this.subarray(start, end);\n Object.setPrototypeOf(newBuf, Buffer3.prototype);\n return newBuf;\n };\n function checkOffset(offset2, ext, length) {\n if (offset2 % 1 !== 0 || offset2 < 0)\n throw new RangeError(\"offset is not uint\");\n if (offset2 + ext > length)\n throw new RangeError(\"Trying to access beyond buffer length\");\n }\n Buffer3.prototype.readUintLE = Buffer3.prototype.readUIntLE = function readUIntLE(offset2, byteLength2, noAssert) {\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, byteLength2, this.length);\n let val = this[offset2];\n let mul = 1;\n let i = 0;\n while (++i < byteLength2 && (mul *= 256)) {\n val += this[offset2 + i] * mul;\n }\n return val;\n };\n Buffer3.prototype.readUintBE = Buffer3.prototype.readUIntBE = function readUIntBE(offset2, byteLength2, noAssert) {\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n checkOffset(offset2, byteLength2, this.length);\n }\n let val = this[offset2 + --byteLength2];\n let mul = 1;\n while (byteLength2 > 0 && (mul *= 256)) {\n val += this[offset2 + --byteLength2] * mul;\n }\n return val;\n };\n Buffer3.prototype.readUint8 = Buffer3.prototype.readUInt8 = function readUInt8(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 1, this.length);\n return this[offset2];\n };\n Buffer3.prototype.readUint16LE = Buffer3.prototype.readUInt16LE = function readUInt16LE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 2, this.length);\n return this[offset2] | this[offset2 + 1] << 8;\n };\n Buffer3.prototype.readUint16BE = Buffer3.prototype.readUInt16BE = function readUInt16BE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 2, this.length);\n return this[offset2] << 8 | this[offset2 + 1];\n };\n Buffer3.prototype.readUint32LE = Buffer3.prototype.readUInt32LE = function readUInt32LE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return (this[offset2] | this[offset2 + 1] << 8 | this[offset2 + 2] << 16) + this[offset2 + 3] * 16777216;\n };\n Buffer3.prototype.readUint32BE = Buffer3.prototype.readUInt32BE = function readUInt32BE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return this[offset2] * 16777216 + (this[offset2 + 1] << 16 | this[offset2 + 2] << 8 | this[offset2 + 3]);\n };\n Buffer3.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset2) {\n offset2 = offset2 >>> 0;\n validateNumber(offset2, \"offset\");\n const first = this[offset2];\n const last = this[offset2 + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset2, this.length - 8);\n }\n const lo = first + this[++offset2] * 2 ** 8 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 24;\n const hi = this[++offset2] + this[++offset2] * 2 ** 8 + this[++offset2] * 2 ** 16 + last * 2 ** 24;\n return BigInt(lo) + (BigInt(hi) << BigInt(32));\n });\n Buffer3.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset2) {\n offset2 = offset2 >>> 0;\n validateNumber(offset2, \"offset\");\n const first = this[offset2];\n const last = this[offset2 + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset2, this.length - 8);\n }\n const hi = first * 2 ** 24 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + this[++offset2];\n const lo = this[++offset2] * 2 ** 24 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + last;\n return (BigInt(hi) << BigInt(32)) + BigInt(lo);\n });\n Buffer3.prototype.readIntLE = function readIntLE(offset2, byteLength2, noAssert) {\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, byteLength2, this.length);\n let val = this[offset2];\n let mul = 1;\n let i = 0;\n while (++i < byteLength2 && (mul *= 256)) {\n val += this[offset2 + i] * mul;\n }\n mul *= 128;\n if (val >= mul)\n val -= Math.pow(2, 8 * byteLength2);\n return val;\n };\n Buffer3.prototype.readIntBE = function readIntBE(offset2, byteLength2, noAssert) {\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, byteLength2, this.length);\n let i = byteLength2;\n let mul = 1;\n let val = this[offset2 + --i];\n while (i > 0 && (mul *= 256)) {\n val += this[offset2 + --i] * mul;\n }\n mul *= 128;\n if (val >= mul)\n val -= Math.pow(2, 8 * byteLength2);\n return val;\n };\n Buffer3.prototype.readInt8 = function readInt8(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 1, this.length);\n if (!(this[offset2] & 128))\n return this[offset2];\n return (255 - this[offset2] + 1) * -1;\n };\n Buffer3.prototype.readInt16LE = function readInt16LE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 2, this.length);\n const val = this[offset2] | this[offset2 + 1] << 8;\n return val & 32768 ? val | 4294901760 : val;\n };\n Buffer3.prototype.readInt16BE = function readInt16BE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 2, this.length);\n const val = this[offset2 + 1] | this[offset2] << 8;\n return val & 32768 ? val | 4294901760 : val;\n };\n Buffer3.prototype.readInt32LE = function readInt32LE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return this[offset2] | this[offset2 + 1] << 8 | this[offset2 + 2] << 16 | this[offset2 + 3] << 24;\n };\n Buffer3.prototype.readInt32BE = function readInt32BE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return this[offset2] << 24 | this[offset2 + 1] << 16 | this[offset2 + 2] << 8 | this[offset2 + 3];\n };\n Buffer3.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset2) {\n offset2 = offset2 >>> 0;\n validateNumber(offset2, \"offset\");\n const first = this[offset2];\n const last = this[offset2 + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset2, this.length - 8);\n }\n const val = this[offset2 + 4] + this[offset2 + 5] * 2 ** 8 + this[offset2 + 6] * 2 ** 16 + (last << 24);\n return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset2] * 2 ** 8 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 24);\n });\n Buffer3.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset2) {\n offset2 = offset2 >>> 0;\n validateNumber(offset2, \"offset\");\n const first = this[offset2];\n const last = this[offset2 + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset2, this.length - 8);\n }\n const val = (first << 24) + // Overflow\n this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + this[++offset2];\n return (BigInt(val) << BigInt(32)) + BigInt(this[++offset2] * 2 ** 24 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + last);\n });\n Buffer3.prototype.readFloatLE = function readFloatLE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return ieee754.read(this, offset2, true, 23, 4);\n };\n Buffer3.prototype.readFloatBE = function readFloatBE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return ieee754.read(this, offset2, false, 23, 4);\n };\n Buffer3.prototype.readDoubleLE = function readDoubleLE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 8, this.length);\n return ieee754.read(this, offset2, true, 52, 8);\n };\n Buffer3.prototype.readDoubleBE = function readDoubleBE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 8, this.length);\n return ieee754.read(this, offset2, false, 52, 8);\n };\n function checkInt(buf, value, offset2, ext, max, min) {\n if (!Buffer3.isBuffer(buf))\n throw new TypeError('\"buffer\" argument must be a Buffer instance');\n if (value > max || value < min)\n throw new RangeError('\"value\" argument is out of bounds');\n if (offset2 + ext > buf.length)\n throw new RangeError(\"Index out of range\");\n }\n Buffer3.prototype.writeUintLE = Buffer3.prototype.writeUIntLE = function writeUIntLE(value, offset2, byteLength2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength2) - 1;\n checkInt(this, value, offset2, byteLength2, maxBytes, 0);\n }\n let mul = 1;\n let i = 0;\n this[offset2] = value & 255;\n while (++i < byteLength2 && (mul *= 256)) {\n this[offset2 + i] = value / mul & 255;\n }\n return offset2 + byteLength2;\n };\n Buffer3.prototype.writeUintBE = Buffer3.prototype.writeUIntBE = function writeUIntBE(value, offset2, byteLength2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength2) - 1;\n checkInt(this, value, offset2, byteLength2, maxBytes, 0);\n }\n let i = byteLength2 - 1;\n let mul = 1;\n this[offset2 + i] = value & 255;\n while (--i >= 0 && (mul *= 256)) {\n this[offset2 + i] = value / mul & 255;\n }\n return offset2 + byteLength2;\n };\n Buffer3.prototype.writeUint8 = Buffer3.prototype.writeUInt8 = function writeUInt8(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 1, 255, 0);\n this[offset2] = value & 255;\n return offset2 + 1;\n };\n Buffer3.prototype.writeUint16LE = Buffer3.prototype.writeUInt16LE = function writeUInt16LE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 2, 65535, 0);\n this[offset2] = value & 255;\n this[offset2 + 1] = value >>> 8;\n return offset2 + 2;\n };\n Buffer3.prototype.writeUint16BE = Buffer3.prototype.writeUInt16BE = function writeUInt16BE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 2, 65535, 0);\n this[offset2] = value >>> 8;\n this[offset2 + 1] = value & 255;\n return offset2 + 2;\n };\n Buffer3.prototype.writeUint32LE = Buffer3.prototype.writeUInt32LE = function writeUInt32LE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 4, 4294967295, 0);\n this[offset2 + 3] = value >>> 24;\n this[offset2 + 2] = value >>> 16;\n this[offset2 + 1] = value >>> 8;\n this[offset2] = value & 255;\n return offset2 + 4;\n };\n Buffer3.prototype.writeUint32BE = Buffer3.prototype.writeUInt32BE = function writeUInt32BE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 4, 4294967295, 0);\n this[offset2] = value >>> 24;\n this[offset2 + 1] = value >>> 16;\n this[offset2 + 2] = value >>> 8;\n this[offset2 + 3] = value & 255;\n return offset2 + 4;\n };\n function wrtBigUInt64LE(buf, value, offset2, min, max) {\n checkIntBI(value, min, max, buf, offset2, 7);\n let lo = Number(value & BigInt(4294967295));\n buf[offset2++] = lo;\n lo = lo >> 8;\n buf[offset2++] = lo;\n lo = lo >> 8;\n buf[offset2++] = lo;\n lo = lo >> 8;\n buf[offset2++] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(4294967295));\n buf[offset2++] = hi;\n hi = hi >> 8;\n buf[offset2++] = hi;\n hi = hi >> 8;\n buf[offset2++] = hi;\n hi = hi >> 8;\n buf[offset2++] = hi;\n return offset2;\n }\n function wrtBigUInt64BE(buf, value, offset2, min, max) {\n checkIntBI(value, min, max, buf, offset2, 7);\n let lo = Number(value & BigInt(4294967295));\n buf[offset2 + 7] = lo;\n lo = lo >> 8;\n buf[offset2 + 6] = lo;\n lo = lo >> 8;\n buf[offset2 + 5] = lo;\n lo = lo >> 8;\n buf[offset2 + 4] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(4294967295));\n buf[offset2 + 3] = hi;\n hi = hi >> 8;\n buf[offset2 + 2] = hi;\n hi = hi >> 8;\n buf[offset2 + 1] = hi;\n hi = hi >> 8;\n buf[offset2] = hi;\n return offset2 + 8;\n }\n Buffer3.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset2 = 0) {\n return wrtBigUInt64LE(this, value, offset2, BigInt(0), BigInt(\"0xffffffffffffffff\"));\n });\n Buffer3.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset2 = 0) {\n return wrtBigUInt64BE(this, value, offset2, BigInt(0), BigInt(\"0xffffffffffffffff\"));\n });\n Buffer3.prototype.writeIntLE = function writeIntLE(value, offset2, byteLength2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, 8 * byteLength2 - 1);\n checkInt(this, value, offset2, byteLength2, limit - 1, -limit);\n }\n let i = 0;\n let mul = 1;\n let sub = 0;\n this[offset2] = value & 255;\n while (++i < byteLength2 && (mul *= 256)) {\n if (value < 0 && sub === 0 && this[offset2 + i - 1] !== 0) {\n sub = 1;\n }\n this[offset2 + i] = (value / mul >> 0) - sub & 255;\n }\n return offset2 + byteLength2;\n };\n Buffer3.prototype.writeIntBE = function writeIntBE(value, offset2, byteLength2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, 8 * byteLength2 - 1);\n checkInt(this, value, offset2, byteLength2, limit - 1, -limit);\n }\n let i = byteLength2 - 1;\n let mul = 1;\n let sub = 0;\n this[offset2 + i] = value & 255;\n while (--i >= 0 && (mul *= 256)) {\n if (value < 0 && sub === 0 && this[offset2 + i + 1] !== 0) {\n sub = 1;\n }\n this[offset2 + i] = (value / mul >> 0) - sub & 255;\n }\n return offset2 + byteLength2;\n };\n Buffer3.prototype.writeInt8 = function writeInt8(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 1, 127, -128);\n if (value < 0)\n value = 255 + value + 1;\n this[offset2] = value & 255;\n return offset2 + 1;\n };\n Buffer3.prototype.writeInt16LE = function writeInt16LE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 2, 32767, -32768);\n this[offset2] = value & 255;\n this[offset2 + 1] = value >>> 8;\n return offset2 + 2;\n };\n Buffer3.prototype.writeInt16BE = function writeInt16BE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 2, 32767, -32768);\n this[offset2] = value >>> 8;\n this[offset2 + 1] = value & 255;\n return offset2 + 2;\n };\n Buffer3.prototype.writeInt32LE = function writeInt32LE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 4, 2147483647, -2147483648);\n this[offset2] = value & 255;\n this[offset2 + 1] = value >>> 8;\n this[offset2 + 2] = value >>> 16;\n this[offset2 + 3] = value >>> 24;\n return offset2 + 4;\n };\n Buffer3.prototype.writeInt32BE = function writeInt32BE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 4, 2147483647, -2147483648);\n if (value < 0)\n value = 4294967295 + value + 1;\n this[offset2] = value >>> 24;\n this[offset2 + 1] = value >>> 16;\n this[offset2 + 2] = value >>> 8;\n this[offset2 + 3] = value & 255;\n return offset2 + 4;\n };\n Buffer3.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset2 = 0) {\n return wrtBigUInt64LE(this, value, offset2, -BigInt(\"0x8000000000000000\"), BigInt(\"0x7fffffffffffffff\"));\n });\n Buffer3.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset2 = 0) {\n return wrtBigUInt64BE(this, value, offset2, -BigInt(\"0x8000000000000000\"), BigInt(\"0x7fffffffffffffff\"));\n });\n function checkIEEE754(buf, value, offset2, ext, max, min) {\n if (offset2 + ext > buf.length)\n throw new RangeError(\"Index out of range\");\n if (offset2 < 0)\n throw new RangeError(\"Index out of range\");\n }\n function writeFloat(buf, value, offset2, littleEndian, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset2, 4);\n }\n ieee754.write(buf, value, offset2, littleEndian, 23, 4);\n return offset2 + 4;\n }\n Buffer3.prototype.writeFloatLE = function writeFloatLE(value, offset2, noAssert) {\n return writeFloat(this, value, offset2, true, noAssert);\n };\n Buffer3.prototype.writeFloatBE = function writeFloatBE(value, offset2, noAssert) {\n return writeFloat(this, value, offset2, false, noAssert);\n };\n function writeDouble(buf, value, offset2, littleEndian, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset2, 8);\n }\n ieee754.write(buf, value, offset2, littleEndian, 52, 8);\n return offset2 + 8;\n }\n Buffer3.prototype.writeDoubleLE = function writeDoubleLE(value, offset2, noAssert) {\n return writeDouble(this, value, offset2, true, noAssert);\n };\n Buffer3.prototype.writeDoubleBE = function writeDoubleBE(value, offset2, noAssert) {\n return writeDouble(this, value, offset2, false, noAssert);\n };\n Buffer3.prototype.copy = function copy(target, targetStart, start, end) {\n if (!Buffer3.isBuffer(target))\n throw new TypeError(\"argument should be a Buffer\");\n if (!start)\n start = 0;\n if (!end && end !== 0)\n end = this.length;\n if (targetStart >= target.length)\n targetStart = target.length;\n if (!targetStart)\n targetStart = 0;\n if (end > 0 && end < start)\n end = start;\n if (end === start)\n return 0;\n if (target.length === 0 || this.length === 0)\n return 0;\n if (targetStart < 0) {\n throw new RangeError(\"targetStart out of bounds\");\n }\n if (start < 0 || start >= this.length)\n throw new RangeError(\"Index out of range\");\n if (end < 0)\n throw new RangeError(\"sourceEnd out of bounds\");\n if (end > this.length)\n end = this.length;\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n const len = end - start;\n if (this === target && typeof Uint8Array.prototype.copyWithin === \"function\") {\n this.copyWithin(targetStart, start, end);\n } else {\n Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);\n }\n return len;\n };\n Buffer3.prototype.fill = function fill(val, start, end, encoding) {\n if (typeof val === \"string\") {\n if (typeof start === \"string\") {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === \"string\") {\n encoding = end;\n end = this.length;\n }\n if (encoding !== void 0 && typeof encoding !== \"string\") {\n throw new TypeError(\"encoding must be a string\");\n }\n if (typeof encoding === \"string\" && !Buffer3.isEncoding(encoding)) {\n throw new TypeError(\"Unknown encoding: \" + encoding);\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0);\n if (encoding === \"utf8\" && code < 128 || encoding === \"latin1\") {\n val = code;\n }\n }\n } else if (typeof val === \"number\") {\n val = val & 255;\n } else if (typeof val === \"boolean\") {\n val = Number(val);\n }\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError(\"Out of range index\");\n }\n if (end <= start) {\n return this;\n }\n start = start >>> 0;\n end = end === void 0 ? this.length : end >>> 0;\n if (!val)\n val = 0;\n let i;\n if (typeof val === \"number\") {\n for (i = start; i < end; ++i) {\n this[i] = val;\n }\n } else {\n const bytes = Buffer3.isBuffer(val) ? val : Buffer3.from(val, encoding);\n const len = bytes.length;\n if (len === 0) {\n throw new TypeError('The value \"' + val + '\" is invalid for argument \"value\"');\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len];\n }\n }\n return this;\n };\n const errors = {};\n function E(sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor() {\n super();\n Object.defineProperty(this, \"message\", {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n });\n this.name = `${this.name} [${sym}]`;\n this.stack;\n delete this.name;\n }\n get code() {\n return sym;\n }\n set code(value) {\n Object.defineProperty(this, \"code\", {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n });\n }\n toString() {\n return `${this.name} [${sym}]: ${this.message}`;\n }\n };\n }\n E(\"ERR_BUFFER_OUT_OF_BOUNDS\", function(name) {\n if (name) {\n return `${name} is outside of buffer bounds`;\n }\n return \"Attempt to access memory outside buffer bounds\";\n }, RangeError);\n E(\"ERR_INVALID_ARG_TYPE\", function(name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`;\n }, TypeError);\n E(\"ERR_OUT_OF_RANGE\", function(str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`;\n let received = input;\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input));\n } else if (typeof input === \"bigint\") {\n received = String(input);\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received);\n }\n received += \"n\";\n }\n msg += ` It must be ${range}. Received ${received}`;\n return msg;\n }, RangeError);\n function addNumericalSeparator(val) {\n let res = \"\";\n let i = val.length;\n const start = val[0] === \"-\" ? 1 : 0;\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`;\n }\n return `${val.slice(0, i)}${res}`;\n }\n function checkBounds(buf, offset2, byteLength2) {\n validateNumber(offset2, \"offset\");\n if (buf[offset2] === void 0 || buf[offset2 + byteLength2] === void 0) {\n boundsError(offset2, buf.length - (byteLength2 + 1));\n }\n }\n function checkIntBI(value, min, max, buf, offset2, byteLength2) {\n if (value > max || value < min) {\n const n = typeof min === \"bigint\" ? \"n\" : \"\";\n let range;\n {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength2 + 1) * 8}${n}`;\n } else {\n range = `>= -(2${n} ** ${(byteLength2 + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength2 + 1) * 8 - 1}${n}`;\n }\n }\n throw new errors.ERR_OUT_OF_RANGE(\"value\", range, value);\n }\n checkBounds(buf, offset2, byteLength2);\n }\n function validateNumber(value, name) {\n if (typeof value !== \"number\") {\n throw new errors.ERR_INVALID_ARG_TYPE(name, \"number\", value);\n }\n }\n function boundsError(value, length, type2) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type2);\n throw new errors.ERR_OUT_OF_RANGE(\"offset\", \"an integer\", value);\n }\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();\n }\n throw new errors.ERR_OUT_OF_RANGE(\"offset\", `>= ${0} and <= ${length}`, value);\n }\n const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\n function base64clean(str) {\n str = str.split(\"=\")[0];\n str = str.trim().replace(INVALID_BASE64_RE, \"\");\n if (str.length < 2)\n return \"\";\n while (str.length % 4 !== 0) {\n str = str + \"=\";\n }\n return str;\n }\n function utf8ToBytes2(string2, units) {\n units = units || Infinity;\n let codePoint;\n const length = string2.length;\n let leadSurrogate = null;\n const bytes = [];\n for (let i = 0; i < length; ++i) {\n codePoint = string2.charCodeAt(i);\n if (codePoint > 55295 && codePoint < 57344) {\n if (!leadSurrogate) {\n if (codePoint > 56319) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n continue;\n } else if (i + 1 === length) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n continue;\n }\n leadSurrogate = codePoint;\n continue;\n }\n if (codePoint < 56320) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n leadSurrogate = codePoint;\n continue;\n }\n codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;\n } else if (leadSurrogate) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n }\n leadSurrogate = null;\n if (codePoint < 128) {\n if ((units -= 1) < 0)\n break;\n bytes.push(codePoint);\n } else if (codePoint < 2048) {\n if ((units -= 2) < 0)\n break;\n bytes.push(codePoint >> 6 | 192, codePoint & 63 | 128);\n } else if (codePoint < 65536) {\n if ((units -= 3) < 0)\n break;\n bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);\n } else if (codePoint < 1114112) {\n if ((units -= 4) < 0)\n break;\n bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);\n } else {\n throw new Error(\"Invalid code point\");\n }\n }\n return bytes;\n }\n function asciiToBytes(str) {\n const byteArray = [];\n for (let i = 0; i < str.length; ++i) {\n byteArray.push(str.charCodeAt(i) & 255);\n }\n return byteArray;\n }\n function utf16leToBytes(str, units) {\n let c, hi, lo;\n const byteArray = [];\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0)\n break;\n c = str.charCodeAt(i);\n hi = c >> 8;\n lo = c % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n return byteArray;\n }\n function base64ToBytes(str) {\n return base64.toByteArray(base64clean(str));\n }\n function blitBuffer(src, dst, offset2, length) {\n let i;\n for (i = 0; i < length; ++i) {\n if (i + offset2 >= dst.length || i >= src.length)\n break;\n dst[i + offset2] = src[i];\n }\n return i;\n }\n function isInstance(obj, type2) {\n return obj instanceof type2 || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type2.name;\n }\n function numberIsNaN(obj) {\n return obj !== obj;\n }\n const hexSliceLookupTable = function() {\n const alphabet = \"0123456789abcdef\";\n const table = new Array(256);\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16;\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j];\n }\n }\n return table;\n }();\n function defineBigIntMethod(fn) {\n return typeof BigInt === \"undefined\" ? BufferBigIntNotDefined : fn;\n }\n function BufferBigIntNotDefined() {\n throw new Error(\"BigInt not supported\");\n }\n return exports;\n }\n var exports$2, _dewExec$2, exports$1, _dewExec$1, exports, _dewExec;\n var init_chunk_DtuTasat = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n exports$2 = {};\n _dewExec$2 = false;\n exports$1 = {};\n _dewExec$1 = false;\n exports = {};\n _dewExec = false;\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/buffer.js\n var buffer_exports = {};\n __export(buffer_exports, {\n Buffer: () => Buffer2,\n INSPECT_MAX_BYTES: () => INSPECT_MAX_BYTES,\n default: () => exports2,\n kMaxLength: () => kMaxLength\n });\n var exports2, Buffer2, INSPECT_MAX_BYTES, kMaxLength;\n var init_buffer = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/buffer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chunk_DtuTasat();\n exports2 = dew();\n exports2[\"Buffer\"];\n exports2[\"SlowBuffer\"];\n exports2[\"INSPECT_MAX_BYTES\"];\n exports2[\"kMaxLength\"];\n Buffer2 = exports2.Buffer;\n INSPECT_MAX_BYTES = exports2.INSPECT_MAX_BYTES;\n kMaxLength = exports2.kMaxLength;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/buffer.js\n var init_buffer2 = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/buffer.js\"() {\n \"use strict\";\n init_buffer();\n }\n });\n\n // ../../../node_modules/.pnpm/bn.js@5.2.2/node_modules/bn.js/lib/bn.js\n var require_bn = __commonJS({\n \"../../../node_modules/.pnpm/bn.js@5.2.2/node_modules/bn.js/lib/bn.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(module2, exports4) {\n \"use strict\";\n function assert3(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {\n };\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n function BN2(number2, base, endian) {\n if (BN2.isBN(number2)) {\n return number2;\n }\n this.negative = 0;\n this.words = null;\n this.length = 0;\n this.red = null;\n if (number2 !== null) {\n if (base === \"le\" || base === \"be\") {\n endian = base;\n base = 10;\n }\n this._init(number2 || 0, base || 10, endian || \"be\");\n }\n }\n if (typeof module2 === \"object\") {\n module2.exports = BN2;\n } else {\n exports4.BN = BN2;\n }\n BN2.BN = BN2;\n BN2.wordSize = 26;\n var Buffer3;\n try {\n if (typeof window !== \"undefined\" && typeof window.Buffer !== \"undefined\") {\n Buffer3 = window.Buffer;\n } else {\n Buffer3 = (init_buffer(), __toCommonJS(buffer_exports)).Buffer;\n }\n } catch (e) {\n }\n BN2.isBN = function isBN(num) {\n if (num instanceof BN2) {\n return true;\n }\n return num !== null && typeof num === \"object\" && num.constructor.wordSize === BN2.wordSize && Array.isArray(num.words);\n };\n BN2.max = function max(left, right) {\n if (left.cmp(right) > 0)\n return left;\n return right;\n };\n BN2.min = function min(left, right) {\n if (left.cmp(right) < 0)\n return left;\n return right;\n };\n BN2.prototype._init = function init(number2, base, endian) {\n if (typeof number2 === \"number\") {\n return this._initNumber(number2, base, endian);\n }\n if (typeof number2 === \"object\") {\n return this._initArray(number2, base, endian);\n }\n if (base === \"hex\") {\n base = 16;\n }\n assert3(base === (base | 0) && base >= 2 && base <= 36);\n number2 = number2.toString().replace(/\\s+/g, \"\");\n var start = 0;\n if (number2[0] === \"-\") {\n start++;\n this.negative = 1;\n }\n if (start < number2.length) {\n if (base === 16) {\n this._parseHex(number2, start, endian);\n } else {\n this._parseBase(number2, base, start);\n if (endian === \"le\") {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n BN2.prototype._initNumber = function _initNumber(number2, base, endian) {\n if (number2 < 0) {\n this.negative = 1;\n number2 = -number2;\n }\n if (number2 < 67108864) {\n this.words = [number2 & 67108863];\n this.length = 1;\n } else if (number2 < 4503599627370496) {\n this.words = [\n number2 & 67108863,\n number2 / 67108864 & 67108863\n ];\n this.length = 2;\n } else {\n assert3(number2 < 9007199254740992);\n this.words = [\n number2 & 67108863,\n number2 / 67108864 & 67108863,\n 1\n ];\n this.length = 3;\n }\n if (endian !== \"le\")\n return;\n this._initArray(this.toArray(), base, endian);\n };\n BN2.prototype._initArray = function _initArray(number2, base, endian) {\n assert3(typeof number2.length === \"number\");\n if (number2.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n this.length = Math.ceil(number2.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n var j, w;\n var off = 0;\n if (endian === \"be\") {\n for (i = number2.length - 1, j = 0; i >= 0; i -= 3) {\n w = number2[i] | number2[i - 1] << 8 | number2[i - 2] << 16;\n this.words[j] |= w << off & 67108863;\n this.words[j + 1] = w >>> 26 - off & 67108863;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === \"le\") {\n for (i = 0, j = 0; i < number2.length; i += 3) {\n w = number2[i] | number2[i + 1] << 8 | number2[i + 2] << 16;\n this.words[j] |= w << off & 67108863;\n this.words[j + 1] = w >>> 26 - off & 67108863;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n function parseHex4Bits(string2, index) {\n var c = string2.charCodeAt(index);\n if (c >= 48 && c <= 57) {\n return c - 48;\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert3(false, \"Invalid character in \" + string2);\n }\n }\n function parseHexByte(string2, lowerBound, index) {\n var r = parseHex4Bits(string2, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string2, index - 1) << 4;\n }\n return r;\n }\n BN2.prototype._parseHex = function _parseHex(number2, start, endian) {\n this.length = Math.ceil((number2.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n var off = 0;\n var j = 0;\n var w;\n if (endian === \"be\") {\n for (i = number2.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number2, start, i) << off;\n this.words[j] |= w & 67108863;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number2.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number2.length; i += 2) {\n w = parseHexByte(number2, start, i) << off;\n this.words[j] |= w & 67108863;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n this._strip();\n };\n function parseBase(str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n r *= mul;\n if (c >= 49) {\n b = c - 49 + 10;\n } else if (c >= 17) {\n b = c - 17 + 10;\n } else {\n b = c;\n }\n assert3(c >= 0 && b < mul, \"Invalid character\");\n r += b;\n }\n return r;\n }\n BN2.prototype._parseBase = function _parseBase(number2, base, start) {\n this.words = [0];\n this.length = 1;\n for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = limbPow / base | 0;\n var total = number2.length - start;\n var mod2 = total % limbLen;\n var end = Math.min(total, total - mod2) + start;\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number2, i, i + limbLen, base);\n this.imuln(limbPow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n if (mod2 !== 0) {\n var pow = 1;\n word = parseBase(number2, i, number2.length, base);\n for (i = 0; i < mod2; i++) {\n pow *= base;\n }\n this.imuln(pow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n this._strip();\n };\n BN2.prototype.copy = function copy(dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n function move(dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n BN2.prototype._move = function _move(dest) {\n move(dest, this);\n };\n BN2.prototype.clone = function clone() {\n var r = new BN2(null);\n this.copy(r);\n return r;\n };\n BN2.prototype._expand = function _expand(size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n BN2.prototype._strip = function strip() {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n BN2.prototype._normSign = function _normSign() {\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n if (typeof Symbol !== \"undefined\" && typeof Symbol.for === \"function\") {\n try {\n BN2.prototype[Symbol.for(\"nodejs.util.inspect.custom\")] = inspect;\n } catch (e) {\n BN2.prototype.inspect = inspect;\n }\n } else {\n BN2.prototype.inspect = inspect;\n }\n function inspect() {\n return (this.red ? \"\";\n }\n var zeros = [\n \"\",\n \"0\",\n \"00\",\n \"000\",\n \"0000\",\n \"00000\",\n \"000000\",\n \"0000000\",\n \"00000000\",\n \"000000000\",\n \"0000000000\",\n \"00000000000\",\n \"000000000000\",\n \"0000000000000\",\n \"00000000000000\",\n \"000000000000000\",\n \"0000000000000000\",\n \"00000000000000000\",\n \"000000000000000000\",\n \"0000000000000000000\",\n \"00000000000000000000\",\n \"000000000000000000000\",\n \"0000000000000000000000\",\n \"00000000000000000000000\",\n \"000000000000000000000000\",\n \"0000000000000000000000000\"\n ];\n var groupSizes = [\n 0,\n 0,\n 25,\n 16,\n 12,\n 11,\n 10,\n 9,\n 8,\n 8,\n 7,\n 7,\n 7,\n 7,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5\n ];\n var groupBases = [\n 0,\n 0,\n 33554432,\n 43046721,\n 16777216,\n 48828125,\n 60466176,\n 40353607,\n 16777216,\n 43046721,\n 1e7,\n 19487171,\n 35831808,\n 62748517,\n 7529536,\n 11390625,\n 16777216,\n 24137569,\n 34012224,\n 47045881,\n 64e6,\n 4084101,\n 5153632,\n 6436343,\n 7962624,\n 9765625,\n 11881376,\n 14348907,\n 17210368,\n 20511149,\n 243e5,\n 28629151,\n 33554432,\n 39135393,\n 45435424,\n 52521875,\n 60466176\n ];\n BN2.prototype.toString = function toString(base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n var out;\n if (base === 16 || base === \"hex\") {\n out = \"\";\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = ((w << off | carry) & 16777215).toString(16);\n carry = w >>> 24 - off & 16777215;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n if (base === (base | 0) && base >= 2 && base <= 36) {\n var groupSize = groupSizes[base];\n var groupBase = groupBases[base];\n out = \"\";\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = \"0\" + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n assert3(false, \"Base should be between 2 and 36\");\n };\n BN2.prototype.toNumber = function toNumber() {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 67108864;\n } else if (this.length === 3 && this.words[2] === 1) {\n ret += 4503599627370496 + this.words[1] * 67108864;\n } else if (this.length > 2) {\n assert3(false, \"Number can only safely store up to 53 bits\");\n }\n return this.negative !== 0 ? -ret : ret;\n };\n BN2.prototype.toJSON = function toJSON() {\n return this.toString(16, 2);\n };\n if (Buffer3) {\n BN2.prototype.toBuffer = function toBuffer2(endian, length) {\n return this.toArrayLike(Buffer3, endian, length);\n };\n }\n BN2.prototype.toArray = function toArray(endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n var allocate = function allocate2(ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n BN2.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length) {\n this._strip();\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert3(byteLength <= reqLength, \"byte array longer than desired length\");\n assert3(reqLength > 0, \"Requested array length <= 0\");\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === \"le\" ? \"LE\" : \"BE\";\n this[\"_toArrayLike\" + postfix](res, byteLength);\n return res;\n };\n BN2.prototype._toArrayLikeLE = function _toArrayLikeLE(res, byteLength) {\n var position = 0;\n var carry = 0;\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = this.words[i] << shift | carry;\n res[position++] = word & 255;\n if (position < res.length) {\n res[position++] = word >> 8 & 255;\n }\n if (position < res.length) {\n res[position++] = word >> 16 & 255;\n }\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = word >> 24 & 255;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n if (position < res.length) {\n res[position++] = carry;\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n BN2.prototype._toArrayLikeBE = function _toArrayLikeBE(res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = this.words[i] << shift | carry;\n res[position--] = word & 255;\n if (position >= 0) {\n res[position--] = word >> 8 & 255;\n }\n if (position >= 0) {\n res[position--] = word >> 16 & 255;\n }\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = word >> 24 & 255;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n if (position >= 0) {\n res[position--] = carry;\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n if (Math.clz32) {\n BN2.prototype._countBits = function _countBits(w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN2.prototype._countBits = function _countBits(w) {\n var t = w;\n var r = 0;\n if (t >= 4096) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 64) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 2) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n BN2.prototype._zeroBits = function _zeroBits(w) {\n if (w === 0)\n return 26;\n var t = w;\n var r = 0;\n if ((t & 8191) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 127) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 15) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 1) === 0) {\n r++;\n }\n return r;\n };\n BN2.prototype.bitLength = function bitLength() {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n function toBitArray(num) {\n var w = new Array(num.bitLength());\n for (var bit = 0; bit < w.length; bit++) {\n var off = bit / 26 | 0;\n var wbit = bit % 26;\n w[bit] = num.words[off] >>> wbit & 1;\n }\n return w;\n }\n BN2.prototype.zeroBits = function zeroBits() {\n if (this.isZero())\n return 0;\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26)\n break;\n }\n return r;\n };\n BN2.prototype.byteLength = function byteLength() {\n return Math.ceil(this.bitLength() / 8);\n };\n BN2.prototype.toTwos = function toTwos(width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n BN2.prototype.fromTwos = function fromTwos(width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n BN2.prototype.isNeg = function isNeg() {\n return this.negative !== 0;\n };\n BN2.prototype.neg = function neg() {\n return this.clone().ineg();\n };\n BN2.prototype.ineg = function ineg() {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n return this;\n };\n BN2.prototype.iuor = function iuor(num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n return this._strip();\n };\n BN2.prototype.ior = function ior(num) {\n assert3((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n BN2.prototype.or = function or(num) {\n if (this.length > num.length)\n return this.clone().ior(num);\n return num.clone().ior(this);\n };\n BN2.prototype.uor = function uor(num) {\n if (this.length > num.length)\n return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n BN2.prototype.iuand = function iuand(num) {\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n this.length = b.length;\n return this._strip();\n };\n BN2.prototype.iand = function iand(num) {\n assert3((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n BN2.prototype.and = function and(num) {\n if (this.length > num.length)\n return this.clone().iand(num);\n return num.clone().iand(this);\n };\n BN2.prototype.uand = function uand(num) {\n if (this.length > num.length)\n return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n BN2.prototype.iuxor = function iuxor(num) {\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n this.length = a.length;\n return this._strip();\n };\n BN2.prototype.ixor = function ixor(num) {\n assert3((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n BN2.prototype.xor = function xor(num) {\n if (this.length > num.length)\n return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n BN2.prototype.uxor = function uxor(num) {\n if (this.length > num.length)\n return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n BN2.prototype.inotn = function inotn(width) {\n assert3(typeof width === \"number\" && width >= 0);\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n this._expand(bytesNeeded);\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 67108863;\n }\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & 67108863 >> 26 - bitsLeft;\n }\n return this._strip();\n };\n BN2.prototype.notn = function notn(width) {\n return this.clone().inotn(width);\n };\n BN2.prototype.setn = function setn(bit, val) {\n assert3(typeof bit === \"number\" && bit >= 0);\n var off = bit / 26 | 0;\n var wbit = bit % 26;\n this._expand(off + 1);\n if (val) {\n this.words[off] = this.words[off] | 1 << wbit;\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n return this._strip();\n };\n BN2.prototype.iadd = function iadd(num) {\n var r;\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 67108863;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 67108863;\n carry = r >>> 26;\n }\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n return this;\n };\n BN2.prototype.add = function add2(num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n if (this.length > num.length)\n return this.clone().iadd(num);\n return num.clone().iadd(this);\n };\n BN2.prototype.isub = function isub(num) {\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n var cmp = this.cmp(num);\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 67108863;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 67108863;\n }\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n this.length = Math.max(this.length, i);\n if (a !== this) {\n this.negative = 1;\n }\n return this._strip();\n };\n BN2.prototype.sub = function sub(num) {\n return this.clone().isub(num);\n };\n function smallMulTo(self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = self.length + num.length | 0;\n out.length = len;\n len = len - 1 | 0;\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n var lo = r & 67108863;\n var carry = r / 67108864 | 0;\n out.words[0] = lo;\n for (var k = 1; k < len; k++) {\n var ncarry = carry >>> 26;\n var rword = carry & 67108863;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += r / 67108864 | 0;\n rword = r & 67108863;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n return out._strip();\n }\n var comb10MulTo = function comb10MulTo2(self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 8191;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 8191;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 8191;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 8191;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 8191;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 8191;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 8191;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 8191;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 8191;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 8191;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 8191;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 8191;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 8191;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 8191;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 8191;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 8191;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 8191;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 8191;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 8191;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 8191;\n var bh9 = b9 >>> 13;\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = mid + Math.imul(ah0, bl0) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w0 >>> 26) | 0;\n w0 &= 67108863;\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = mid + Math.imul(ah1, bl0) | 0;\n hi = Math.imul(ah1, bh0);\n lo = lo + Math.imul(al0, bl1) | 0;\n mid = mid + Math.imul(al0, bh1) | 0;\n mid = mid + Math.imul(ah0, bl1) | 0;\n hi = hi + Math.imul(ah0, bh1) | 0;\n var w1 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w1 >>> 26) | 0;\n w1 &= 67108863;\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = mid + Math.imul(ah2, bl0) | 0;\n hi = Math.imul(ah2, bh0);\n lo = lo + Math.imul(al1, bl1) | 0;\n mid = mid + Math.imul(al1, bh1) | 0;\n mid = mid + Math.imul(ah1, bl1) | 0;\n hi = hi + Math.imul(ah1, bh1) | 0;\n lo = lo + Math.imul(al0, bl2) | 0;\n mid = mid + Math.imul(al0, bh2) | 0;\n mid = mid + Math.imul(ah0, bl2) | 0;\n hi = hi + Math.imul(ah0, bh2) | 0;\n var w2 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w2 >>> 26) | 0;\n w2 &= 67108863;\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = mid + Math.imul(ah3, bl0) | 0;\n hi = Math.imul(ah3, bh0);\n lo = lo + Math.imul(al2, bl1) | 0;\n mid = mid + Math.imul(al2, bh1) | 0;\n mid = mid + Math.imul(ah2, bl1) | 0;\n hi = hi + Math.imul(ah2, bh1) | 0;\n lo = lo + Math.imul(al1, bl2) | 0;\n mid = mid + Math.imul(al1, bh2) | 0;\n mid = mid + Math.imul(ah1, bl2) | 0;\n hi = hi + Math.imul(ah1, bh2) | 0;\n lo = lo + Math.imul(al0, bl3) | 0;\n mid = mid + Math.imul(al0, bh3) | 0;\n mid = mid + Math.imul(ah0, bl3) | 0;\n hi = hi + Math.imul(ah0, bh3) | 0;\n var w3 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w3 >>> 26) | 0;\n w3 &= 67108863;\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = mid + Math.imul(ah4, bl0) | 0;\n hi = Math.imul(ah4, bh0);\n lo = lo + Math.imul(al3, bl1) | 0;\n mid = mid + Math.imul(al3, bh1) | 0;\n mid = mid + Math.imul(ah3, bl1) | 0;\n hi = hi + Math.imul(ah3, bh1) | 0;\n lo = lo + Math.imul(al2, bl2) | 0;\n mid = mid + Math.imul(al2, bh2) | 0;\n mid = mid + Math.imul(ah2, bl2) | 0;\n hi = hi + Math.imul(ah2, bh2) | 0;\n lo = lo + Math.imul(al1, bl3) | 0;\n mid = mid + Math.imul(al1, bh3) | 0;\n mid = mid + Math.imul(ah1, bl3) | 0;\n hi = hi + Math.imul(ah1, bh3) | 0;\n lo = lo + Math.imul(al0, bl4) | 0;\n mid = mid + Math.imul(al0, bh4) | 0;\n mid = mid + Math.imul(ah0, bl4) | 0;\n hi = hi + Math.imul(ah0, bh4) | 0;\n var w4 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w4 >>> 26) | 0;\n w4 &= 67108863;\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = mid + Math.imul(ah5, bl0) | 0;\n hi = Math.imul(ah5, bh0);\n lo = lo + Math.imul(al4, bl1) | 0;\n mid = mid + Math.imul(al4, bh1) | 0;\n mid = mid + Math.imul(ah4, bl1) | 0;\n hi = hi + Math.imul(ah4, bh1) | 0;\n lo = lo + Math.imul(al3, bl2) | 0;\n mid = mid + Math.imul(al3, bh2) | 0;\n mid = mid + Math.imul(ah3, bl2) | 0;\n hi = hi + Math.imul(ah3, bh2) | 0;\n lo = lo + Math.imul(al2, bl3) | 0;\n mid = mid + Math.imul(al2, bh3) | 0;\n mid = mid + Math.imul(ah2, bl3) | 0;\n hi = hi + Math.imul(ah2, bh3) | 0;\n lo = lo + Math.imul(al1, bl4) | 0;\n mid = mid + Math.imul(al1, bh4) | 0;\n mid = mid + Math.imul(ah1, bl4) | 0;\n hi = hi + Math.imul(ah1, bh4) | 0;\n lo = lo + Math.imul(al0, bl5) | 0;\n mid = mid + Math.imul(al0, bh5) | 0;\n mid = mid + Math.imul(ah0, bl5) | 0;\n hi = hi + Math.imul(ah0, bh5) | 0;\n var w5 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w5 >>> 26) | 0;\n w5 &= 67108863;\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = mid + Math.imul(ah6, bl0) | 0;\n hi = Math.imul(ah6, bh0);\n lo = lo + Math.imul(al5, bl1) | 0;\n mid = mid + Math.imul(al5, bh1) | 0;\n mid = mid + Math.imul(ah5, bl1) | 0;\n hi = hi + Math.imul(ah5, bh1) | 0;\n lo = lo + Math.imul(al4, bl2) | 0;\n mid = mid + Math.imul(al4, bh2) | 0;\n mid = mid + Math.imul(ah4, bl2) | 0;\n hi = hi + Math.imul(ah4, bh2) | 0;\n lo = lo + Math.imul(al3, bl3) | 0;\n mid = mid + Math.imul(al3, bh3) | 0;\n mid = mid + Math.imul(ah3, bl3) | 0;\n hi = hi + Math.imul(ah3, bh3) | 0;\n lo = lo + Math.imul(al2, bl4) | 0;\n mid = mid + Math.imul(al2, bh4) | 0;\n mid = mid + Math.imul(ah2, bl4) | 0;\n hi = hi + Math.imul(ah2, bh4) | 0;\n lo = lo + Math.imul(al1, bl5) | 0;\n mid = mid + Math.imul(al1, bh5) | 0;\n mid = mid + Math.imul(ah1, bl5) | 0;\n hi = hi + Math.imul(ah1, bh5) | 0;\n lo = lo + Math.imul(al0, bl6) | 0;\n mid = mid + Math.imul(al0, bh6) | 0;\n mid = mid + Math.imul(ah0, bl6) | 0;\n hi = hi + Math.imul(ah0, bh6) | 0;\n var w6 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w6 >>> 26) | 0;\n w6 &= 67108863;\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = mid + Math.imul(ah7, bl0) | 0;\n hi = Math.imul(ah7, bh0);\n lo = lo + Math.imul(al6, bl1) | 0;\n mid = mid + Math.imul(al6, bh1) | 0;\n mid = mid + Math.imul(ah6, bl1) | 0;\n hi = hi + Math.imul(ah6, bh1) | 0;\n lo = lo + Math.imul(al5, bl2) | 0;\n mid = mid + Math.imul(al5, bh2) | 0;\n mid = mid + Math.imul(ah5, bl2) | 0;\n hi = hi + Math.imul(ah5, bh2) | 0;\n lo = lo + Math.imul(al4, bl3) | 0;\n mid = mid + Math.imul(al4, bh3) | 0;\n mid = mid + Math.imul(ah4, bl3) | 0;\n hi = hi + Math.imul(ah4, bh3) | 0;\n lo = lo + Math.imul(al3, bl4) | 0;\n mid = mid + Math.imul(al3, bh4) | 0;\n mid = mid + Math.imul(ah3, bl4) | 0;\n hi = hi + Math.imul(ah3, bh4) | 0;\n lo = lo + Math.imul(al2, bl5) | 0;\n mid = mid + Math.imul(al2, bh5) | 0;\n mid = mid + Math.imul(ah2, bl5) | 0;\n hi = hi + Math.imul(ah2, bh5) | 0;\n lo = lo + Math.imul(al1, bl6) | 0;\n mid = mid + Math.imul(al1, bh6) | 0;\n mid = mid + Math.imul(ah1, bl6) | 0;\n hi = hi + Math.imul(ah1, bh6) | 0;\n lo = lo + Math.imul(al0, bl7) | 0;\n mid = mid + Math.imul(al0, bh7) | 0;\n mid = mid + Math.imul(ah0, bl7) | 0;\n hi = hi + Math.imul(ah0, bh7) | 0;\n var w7 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w7 >>> 26) | 0;\n w7 &= 67108863;\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = mid + Math.imul(ah8, bl0) | 0;\n hi = Math.imul(ah8, bh0);\n lo = lo + Math.imul(al7, bl1) | 0;\n mid = mid + Math.imul(al7, bh1) | 0;\n mid = mid + Math.imul(ah7, bl1) | 0;\n hi = hi + Math.imul(ah7, bh1) | 0;\n lo = lo + Math.imul(al6, bl2) | 0;\n mid = mid + Math.imul(al6, bh2) | 0;\n mid = mid + Math.imul(ah6, bl2) | 0;\n hi = hi + Math.imul(ah6, bh2) | 0;\n lo = lo + Math.imul(al5, bl3) | 0;\n mid = mid + Math.imul(al5, bh3) | 0;\n mid = mid + Math.imul(ah5, bl3) | 0;\n hi = hi + Math.imul(ah5, bh3) | 0;\n lo = lo + Math.imul(al4, bl4) | 0;\n mid = mid + Math.imul(al4, bh4) | 0;\n mid = mid + Math.imul(ah4, bl4) | 0;\n hi = hi + Math.imul(ah4, bh4) | 0;\n lo = lo + Math.imul(al3, bl5) | 0;\n mid = mid + Math.imul(al3, bh5) | 0;\n mid = mid + Math.imul(ah3, bl5) | 0;\n hi = hi + Math.imul(ah3, bh5) | 0;\n lo = lo + Math.imul(al2, bl6) | 0;\n mid = mid + Math.imul(al2, bh6) | 0;\n mid = mid + Math.imul(ah2, bl6) | 0;\n hi = hi + Math.imul(ah2, bh6) | 0;\n lo = lo + Math.imul(al1, bl7) | 0;\n mid = mid + Math.imul(al1, bh7) | 0;\n mid = mid + Math.imul(ah1, bl7) | 0;\n hi = hi + Math.imul(ah1, bh7) | 0;\n lo = lo + Math.imul(al0, bl8) | 0;\n mid = mid + Math.imul(al0, bh8) | 0;\n mid = mid + Math.imul(ah0, bl8) | 0;\n hi = hi + Math.imul(ah0, bh8) | 0;\n var w8 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w8 >>> 26) | 0;\n w8 &= 67108863;\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = mid + Math.imul(ah9, bl0) | 0;\n hi = Math.imul(ah9, bh0);\n lo = lo + Math.imul(al8, bl1) | 0;\n mid = mid + Math.imul(al8, bh1) | 0;\n mid = mid + Math.imul(ah8, bl1) | 0;\n hi = hi + Math.imul(ah8, bh1) | 0;\n lo = lo + Math.imul(al7, bl2) | 0;\n mid = mid + Math.imul(al7, bh2) | 0;\n mid = mid + Math.imul(ah7, bl2) | 0;\n hi = hi + Math.imul(ah7, bh2) | 0;\n lo = lo + Math.imul(al6, bl3) | 0;\n mid = mid + Math.imul(al6, bh3) | 0;\n mid = mid + Math.imul(ah6, bl3) | 0;\n hi = hi + Math.imul(ah6, bh3) | 0;\n lo = lo + Math.imul(al5, bl4) | 0;\n mid = mid + Math.imul(al5, bh4) | 0;\n mid = mid + Math.imul(ah5, bl4) | 0;\n hi = hi + Math.imul(ah5, bh4) | 0;\n lo = lo + Math.imul(al4, bl5) | 0;\n mid = mid + Math.imul(al4, bh5) | 0;\n mid = mid + Math.imul(ah4, bl5) | 0;\n hi = hi + Math.imul(ah4, bh5) | 0;\n lo = lo + Math.imul(al3, bl6) | 0;\n mid = mid + Math.imul(al3, bh6) | 0;\n mid = mid + Math.imul(ah3, bl6) | 0;\n hi = hi + Math.imul(ah3, bh6) | 0;\n lo = lo + Math.imul(al2, bl7) | 0;\n mid = mid + Math.imul(al2, bh7) | 0;\n mid = mid + Math.imul(ah2, bl7) | 0;\n hi = hi + Math.imul(ah2, bh7) | 0;\n lo = lo + Math.imul(al1, bl8) | 0;\n mid = mid + Math.imul(al1, bh8) | 0;\n mid = mid + Math.imul(ah1, bl8) | 0;\n hi = hi + Math.imul(ah1, bh8) | 0;\n lo = lo + Math.imul(al0, bl9) | 0;\n mid = mid + Math.imul(al0, bh9) | 0;\n mid = mid + Math.imul(ah0, bl9) | 0;\n hi = hi + Math.imul(ah0, bh9) | 0;\n var w9 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w9 >>> 26) | 0;\n w9 &= 67108863;\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = mid + Math.imul(ah9, bl1) | 0;\n hi = Math.imul(ah9, bh1);\n lo = lo + Math.imul(al8, bl2) | 0;\n mid = mid + Math.imul(al8, bh2) | 0;\n mid = mid + Math.imul(ah8, bl2) | 0;\n hi = hi + Math.imul(ah8, bh2) | 0;\n lo = lo + Math.imul(al7, bl3) | 0;\n mid = mid + Math.imul(al7, bh3) | 0;\n mid = mid + Math.imul(ah7, bl3) | 0;\n hi = hi + Math.imul(ah7, bh3) | 0;\n lo = lo + Math.imul(al6, bl4) | 0;\n mid = mid + Math.imul(al6, bh4) | 0;\n mid = mid + Math.imul(ah6, bl4) | 0;\n hi = hi + Math.imul(ah6, bh4) | 0;\n lo = lo + Math.imul(al5, bl5) | 0;\n mid = mid + Math.imul(al5, bh5) | 0;\n mid = mid + Math.imul(ah5, bl5) | 0;\n hi = hi + Math.imul(ah5, bh5) | 0;\n lo = lo + Math.imul(al4, bl6) | 0;\n mid = mid + Math.imul(al4, bh6) | 0;\n mid = mid + Math.imul(ah4, bl6) | 0;\n hi = hi + Math.imul(ah4, bh6) | 0;\n lo = lo + Math.imul(al3, bl7) | 0;\n mid = mid + Math.imul(al3, bh7) | 0;\n mid = mid + Math.imul(ah3, bl7) | 0;\n hi = hi + Math.imul(ah3, bh7) | 0;\n lo = lo + Math.imul(al2, bl8) | 0;\n mid = mid + Math.imul(al2, bh8) | 0;\n mid = mid + Math.imul(ah2, bl8) | 0;\n hi = hi + Math.imul(ah2, bh8) | 0;\n lo = lo + Math.imul(al1, bl9) | 0;\n mid = mid + Math.imul(al1, bh9) | 0;\n mid = mid + Math.imul(ah1, bl9) | 0;\n hi = hi + Math.imul(ah1, bh9) | 0;\n var w10 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w10 >>> 26) | 0;\n w10 &= 67108863;\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = mid + Math.imul(ah9, bl2) | 0;\n hi = Math.imul(ah9, bh2);\n lo = lo + Math.imul(al8, bl3) | 0;\n mid = mid + Math.imul(al8, bh3) | 0;\n mid = mid + Math.imul(ah8, bl3) | 0;\n hi = hi + Math.imul(ah8, bh3) | 0;\n lo = lo + Math.imul(al7, bl4) | 0;\n mid = mid + Math.imul(al7, bh4) | 0;\n mid = mid + Math.imul(ah7, bl4) | 0;\n hi = hi + Math.imul(ah7, bh4) | 0;\n lo = lo + Math.imul(al6, bl5) | 0;\n mid = mid + Math.imul(al6, bh5) | 0;\n mid = mid + Math.imul(ah6, bl5) | 0;\n hi = hi + Math.imul(ah6, bh5) | 0;\n lo = lo + Math.imul(al5, bl6) | 0;\n mid = mid + Math.imul(al5, bh6) | 0;\n mid = mid + Math.imul(ah5, bl6) | 0;\n hi = hi + Math.imul(ah5, bh6) | 0;\n lo = lo + Math.imul(al4, bl7) | 0;\n mid = mid + Math.imul(al4, bh7) | 0;\n mid = mid + Math.imul(ah4, bl7) | 0;\n hi = hi + Math.imul(ah4, bh7) | 0;\n lo = lo + Math.imul(al3, bl8) | 0;\n mid = mid + Math.imul(al3, bh8) | 0;\n mid = mid + Math.imul(ah3, bl8) | 0;\n hi = hi + Math.imul(ah3, bh8) | 0;\n lo = lo + Math.imul(al2, bl9) | 0;\n mid = mid + Math.imul(al2, bh9) | 0;\n mid = mid + Math.imul(ah2, bl9) | 0;\n hi = hi + Math.imul(ah2, bh9) | 0;\n var w11 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w11 >>> 26) | 0;\n w11 &= 67108863;\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = mid + Math.imul(ah9, bl3) | 0;\n hi = Math.imul(ah9, bh3);\n lo = lo + Math.imul(al8, bl4) | 0;\n mid = mid + Math.imul(al8, bh4) | 0;\n mid = mid + Math.imul(ah8, bl4) | 0;\n hi = hi + Math.imul(ah8, bh4) | 0;\n lo = lo + Math.imul(al7, bl5) | 0;\n mid = mid + Math.imul(al7, bh5) | 0;\n mid = mid + Math.imul(ah7, bl5) | 0;\n hi = hi + Math.imul(ah7, bh5) | 0;\n lo = lo + Math.imul(al6, bl6) | 0;\n mid = mid + Math.imul(al6, bh6) | 0;\n mid = mid + Math.imul(ah6, bl6) | 0;\n hi = hi + Math.imul(ah6, bh6) | 0;\n lo = lo + Math.imul(al5, bl7) | 0;\n mid = mid + Math.imul(al5, bh7) | 0;\n mid = mid + Math.imul(ah5, bl7) | 0;\n hi = hi + Math.imul(ah5, bh7) | 0;\n lo = lo + Math.imul(al4, bl8) | 0;\n mid = mid + Math.imul(al4, bh8) | 0;\n mid = mid + Math.imul(ah4, bl8) | 0;\n hi = hi + Math.imul(ah4, bh8) | 0;\n lo = lo + Math.imul(al3, bl9) | 0;\n mid = mid + Math.imul(al3, bh9) | 0;\n mid = mid + Math.imul(ah3, bl9) | 0;\n hi = hi + Math.imul(ah3, bh9) | 0;\n var w12 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w12 >>> 26) | 0;\n w12 &= 67108863;\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = mid + Math.imul(ah9, bl4) | 0;\n hi = Math.imul(ah9, bh4);\n lo = lo + Math.imul(al8, bl5) | 0;\n mid = mid + Math.imul(al8, bh5) | 0;\n mid = mid + Math.imul(ah8, bl5) | 0;\n hi = hi + Math.imul(ah8, bh5) | 0;\n lo = lo + Math.imul(al7, bl6) | 0;\n mid = mid + Math.imul(al7, bh6) | 0;\n mid = mid + Math.imul(ah7, bl6) | 0;\n hi = hi + Math.imul(ah7, bh6) | 0;\n lo = lo + Math.imul(al6, bl7) | 0;\n mid = mid + Math.imul(al6, bh7) | 0;\n mid = mid + Math.imul(ah6, bl7) | 0;\n hi = hi + Math.imul(ah6, bh7) | 0;\n lo = lo + Math.imul(al5, bl8) | 0;\n mid = mid + Math.imul(al5, bh8) | 0;\n mid = mid + Math.imul(ah5, bl8) | 0;\n hi = hi + Math.imul(ah5, bh8) | 0;\n lo = lo + Math.imul(al4, bl9) | 0;\n mid = mid + Math.imul(al4, bh9) | 0;\n mid = mid + Math.imul(ah4, bl9) | 0;\n hi = hi + Math.imul(ah4, bh9) | 0;\n var w13 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w13 >>> 26) | 0;\n w13 &= 67108863;\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = mid + Math.imul(ah9, bl5) | 0;\n hi = Math.imul(ah9, bh5);\n lo = lo + Math.imul(al8, bl6) | 0;\n mid = mid + Math.imul(al8, bh6) | 0;\n mid = mid + Math.imul(ah8, bl6) | 0;\n hi = hi + Math.imul(ah8, bh6) | 0;\n lo = lo + Math.imul(al7, bl7) | 0;\n mid = mid + Math.imul(al7, bh7) | 0;\n mid = mid + Math.imul(ah7, bl7) | 0;\n hi = hi + Math.imul(ah7, bh7) | 0;\n lo = lo + Math.imul(al6, bl8) | 0;\n mid = mid + Math.imul(al6, bh8) | 0;\n mid = mid + Math.imul(ah6, bl8) | 0;\n hi = hi + Math.imul(ah6, bh8) | 0;\n lo = lo + Math.imul(al5, bl9) | 0;\n mid = mid + Math.imul(al5, bh9) | 0;\n mid = mid + Math.imul(ah5, bl9) | 0;\n hi = hi + Math.imul(ah5, bh9) | 0;\n var w14 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w14 >>> 26) | 0;\n w14 &= 67108863;\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = mid + Math.imul(ah9, bl6) | 0;\n hi = Math.imul(ah9, bh6);\n lo = lo + Math.imul(al8, bl7) | 0;\n mid = mid + Math.imul(al8, bh7) | 0;\n mid = mid + Math.imul(ah8, bl7) | 0;\n hi = hi + Math.imul(ah8, bh7) | 0;\n lo = lo + Math.imul(al7, bl8) | 0;\n mid = mid + Math.imul(al7, bh8) | 0;\n mid = mid + Math.imul(ah7, bl8) | 0;\n hi = hi + Math.imul(ah7, bh8) | 0;\n lo = lo + Math.imul(al6, bl9) | 0;\n mid = mid + Math.imul(al6, bh9) | 0;\n mid = mid + Math.imul(ah6, bl9) | 0;\n hi = hi + Math.imul(ah6, bh9) | 0;\n var w15 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w15 >>> 26) | 0;\n w15 &= 67108863;\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = mid + Math.imul(ah9, bl7) | 0;\n hi = Math.imul(ah9, bh7);\n lo = lo + Math.imul(al8, bl8) | 0;\n mid = mid + Math.imul(al8, bh8) | 0;\n mid = mid + Math.imul(ah8, bl8) | 0;\n hi = hi + Math.imul(ah8, bh8) | 0;\n lo = lo + Math.imul(al7, bl9) | 0;\n mid = mid + Math.imul(al7, bh9) | 0;\n mid = mid + Math.imul(ah7, bl9) | 0;\n hi = hi + Math.imul(ah7, bh9) | 0;\n var w16 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w16 >>> 26) | 0;\n w16 &= 67108863;\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = mid + Math.imul(ah9, bl8) | 0;\n hi = Math.imul(ah9, bh8);\n lo = lo + Math.imul(al8, bl9) | 0;\n mid = mid + Math.imul(al8, bh9) | 0;\n mid = mid + Math.imul(ah8, bl9) | 0;\n hi = hi + Math.imul(ah8, bh9) | 0;\n var w17 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w17 >>> 26) | 0;\n w17 &= 67108863;\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = mid + Math.imul(ah9, bl9) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w18 >>> 26) | 0;\n w18 &= 67108863;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n function bigMulTo(self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 67108863;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n var lo = r & 67108863;\n ncarry = ncarry + (r / 67108864 | 0) | 0;\n lo = lo + rword | 0;\n rword = lo & 67108863;\n ncarry = ncarry + (lo >>> 26) | 0;\n hncarry += ncarry >>> 26;\n ncarry &= 67108863;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n return out._strip();\n }\n function jumboMulTo(self, num, out) {\n return bigMulTo(self, num, out);\n }\n BN2.prototype.mulTo = function mulTo(num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n return res;\n };\n function FFTM(x, y) {\n this.x = x;\n this.y = y;\n }\n FFTM.prototype.makeRBT = function makeRBT(N) {\n var t = new Array(N);\n var l = BN2.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n return t;\n };\n FFTM.prototype.revBin = function revBin(x, l, N) {\n if (x === 0 || x === N - 1)\n return x;\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << l - i - 1;\n x >>= 1;\n }\n return rb;\n };\n FFTM.prototype.permute = function permute(rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n FFTM.prototype.transform = function transform(rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n var rx = rtwdf_ * ro - itwdf_ * io;\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n FFTM.prototype.guessLen13b = function guessLen13b(n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n return 1 << i + 1 + odd;\n };\n FFTM.prototype.conjugate = function conjugate(rws, iws, N) {\n if (N <= 1)\n return;\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n t = iws[i];\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n FFTM.prototype.normalize13b = function normalize13b(ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 8192 + Math.round(ws[2 * i] / N) + carry;\n ws[i] = w & 67108863;\n if (w < 67108864) {\n carry = 0;\n } else {\n carry = w / 67108864 | 0;\n }\n }\n return ws;\n };\n FFTM.prototype.convert13b = function convert13b(ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n rws[2 * i] = carry & 8191;\n carry = carry >>> 13;\n rws[2 * i + 1] = carry & 8191;\n carry = carry >>> 13;\n }\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n assert3(carry === 0);\n assert3((carry & ~8191) === 0);\n };\n FFTM.prototype.stub = function stub(N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n return ph;\n };\n FFTM.prototype.mulp = function mulp(x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n var rbt = this.makeRBT(N);\n var _ = this.stub(N);\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n var rmws = out.words;\n rmws.length = N;\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n BN2.prototype.mul = function mul(num) {\n var out = new BN2(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n BN2.prototype.mulf = function mulf(num) {\n var out = new BN2(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n BN2.prototype.imul = function imul(num) {\n return this.clone().mulTo(num, this);\n };\n BN2.prototype.imuln = function imuln(num) {\n var isNegNum = num < 0;\n if (isNegNum)\n num = -num;\n assert3(typeof num === \"number\");\n assert3(num < 67108864);\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 67108863) + (carry & 67108863);\n carry >>= 26;\n carry += w / 67108864 | 0;\n carry += lo >>> 26;\n this.words[i] = lo & 67108863;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n this.length = num === 0 ? 1 : this.length;\n return isNegNum ? this.ineg() : this;\n };\n BN2.prototype.muln = function muln(num) {\n return this.clone().imuln(num);\n };\n BN2.prototype.sqr = function sqr() {\n return this.mul(this);\n };\n BN2.prototype.isqr = function isqr() {\n return this.imul(this.clone());\n };\n BN2.prototype.pow = function pow(num) {\n var w = toBitArray(num);\n if (w.length === 0)\n return new BN2(1);\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0)\n break;\n }\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0)\n continue;\n res = res.mul(q);\n }\n }\n return res;\n };\n BN2.prototype.iushln = function iushln(bits) {\n assert3(typeof bits === \"number\" && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = 67108863 >>> 26 - r << 26 - r;\n var i;\n if (r !== 0) {\n var carry = 0;\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = (this.words[i] | 0) - newCarry << r;\n this.words[i] = c | carry;\n carry = newCarry >>> 26 - r;\n }\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n this.length += s;\n }\n return this._strip();\n };\n BN2.prototype.ishln = function ishln(bits) {\n assert3(this.negative === 0);\n return this.iushln(bits);\n };\n BN2.prototype.iushrn = function iushrn(bits, hint, extended) {\n assert3(typeof bits === \"number\" && bits >= 0);\n var h;\n if (hint) {\n h = (hint - hint % 26) / 26;\n } else {\n h = 0;\n }\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask2 = 67108863 ^ 67108863 >>> r << r;\n var maskedWords = extended;\n h -= s;\n h = Math.max(0, h);\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n if (s === 0) {\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = carry << 26 - r | word >>> r;\n carry = word & mask2;\n }\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n return this._strip();\n };\n BN2.prototype.ishrn = function ishrn(bits, hint, extended) {\n assert3(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n BN2.prototype.shln = function shln(bits) {\n return this.clone().ishln(bits);\n };\n BN2.prototype.ushln = function ushln(bits) {\n return this.clone().iushln(bits);\n };\n BN2.prototype.shrn = function shrn(bits) {\n return this.clone().ishrn(bits);\n };\n BN2.prototype.ushrn = function ushrn(bits) {\n return this.clone().iushrn(bits);\n };\n BN2.prototype.testn = function testn(bit) {\n assert3(typeof bit === \"number\" && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n if (this.length <= s)\n return false;\n var w = this.words[s];\n return !!(w & q);\n };\n BN2.prototype.imaskn = function imaskn(bits) {\n assert3(typeof bits === \"number\" && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n assert3(this.negative === 0, \"imaskn works only with positive numbers\");\n if (this.length <= s) {\n return this;\n }\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n if (r !== 0) {\n var mask2 = 67108863 ^ 67108863 >>> r << r;\n this.words[this.length - 1] &= mask2;\n }\n return this._strip();\n };\n BN2.prototype.maskn = function maskn(bits) {\n return this.clone().imaskn(bits);\n };\n BN2.prototype.iaddn = function iaddn(num) {\n assert3(typeof num === \"number\");\n assert3(num < 67108864);\n if (num < 0)\n return this.isubn(-num);\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n return this._iaddn(num);\n };\n BN2.prototype._iaddn = function _iaddn(num) {\n this.words[0] += num;\n for (var i = 0; i < this.length && this.words[i] >= 67108864; i++) {\n this.words[i] -= 67108864;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n return this;\n };\n BN2.prototype.isubn = function isubn(num) {\n assert3(typeof num === \"number\");\n assert3(num < 67108864);\n if (num < 0)\n return this.iaddn(-num);\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n this.words[0] -= num;\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 67108864;\n this.words[i + 1] -= 1;\n }\n }\n return this._strip();\n };\n BN2.prototype.addn = function addn(num) {\n return this.clone().iaddn(num);\n };\n BN2.prototype.subn = function subn(num) {\n return this.clone().isubn(num);\n };\n BN2.prototype.iabs = function iabs() {\n this.negative = 0;\n return this;\n };\n BN2.prototype.abs = function abs() {\n return this.clone().iabs();\n };\n BN2.prototype._ishlnsubmul = function _ishlnsubmul(num, mul, shift) {\n var len = num.length + shift;\n var i;\n this._expand(len);\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 67108863;\n carry = (w >> 26) - (right / 67108864 | 0);\n this.words[i + shift] = w & 67108863;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 67108863;\n }\n if (carry === 0)\n return this._strip();\n assert3(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 67108863;\n }\n this.negative = 1;\n return this._strip();\n };\n BN2.prototype._wordDiv = function _wordDiv(num, mode) {\n var shift = this.length - num.length;\n var a = this.clone();\n var b = num;\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n var m = a.length - b.length;\n var q;\n if (mode !== \"mod\") {\n q = new BN2(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 67108864 + (a.words[b.length + j - 1] | 0);\n qj = Math.min(qj / bhi | 0, 67108863);\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n if (mode !== \"div\" && shift !== 0) {\n a.iushrn(shift);\n }\n return {\n div: q || null,\n mod: a\n };\n };\n BN2.prototype.divmod = function divmod(num, mode, positive) {\n assert3(!num.isZero());\n if (this.isZero()) {\n return {\n div: new BN2(0),\n mod: new BN2(0)\n };\n }\n var div, mod2, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n if (mode !== \"div\") {\n mod2 = res.mod.neg();\n if (positive && mod2.negative !== 0) {\n mod2.iadd(num);\n }\n }\n return {\n div,\n mod: mod2\n };\n }\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n return {\n div,\n mod: res.mod\n };\n }\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n if (mode !== \"div\") {\n mod2 = res.mod.neg();\n if (positive && mod2.negative !== 0) {\n mod2.isub(num);\n }\n }\n return {\n div: res.div,\n mod: mod2\n };\n }\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN2(0),\n mod: this\n };\n }\n if (num.length === 1) {\n if (mode === \"div\") {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n if (mode === \"mod\") {\n return {\n div: null,\n mod: new BN2(this.modrn(num.words[0]))\n };\n }\n return {\n div: this.divn(num.words[0]),\n mod: new BN2(this.modrn(num.words[0]))\n };\n }\n return this._wordDiv(num, mode);\n };\n BN2.prototype.div = function div(num) {\n return this.divmod(num, \"div\", false).div;\n };\n BN2.prototype.mod = function mod2(num) {\n return this.divmod(num, \"mod\", false).mod;\n };\n BN2.prototype.umod = function umod(num) {\n return this.divmod(num, \"mod\", true).mod;\n };\n BN2.prototype.divRound = function divRound(num) {\n var dm = this.divmod(num);\n if (dm.mod.isZero())\n return dm.div;\n var mod2 = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod2.cmp(half);\n if (cmp < 0 || r2 === 1 && cmp === 0)\n return dm.div;\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n BN2.prototype.modrn = function modrn(num) {\n var isNegNum = num < 0;\n if (isNegNum)\n num = -num;\n assert3(num <= 67108863);\n var p = (1 << 26) % num;\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n return isNegNum ? -acc : acc;\n };\n BN2.prototype.modn = function modn(num) {\n return this.modrn(num);\n };\n BN2.prototype.idivn = function idivn(num) {\n var isNegNum = num < 0;\n if (isNegNum)\n num = -num;\n assert3(num <= 67108863);\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 67108864;\n this.words[i] = w / num | 0;\n carry = w % num;\n }\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n BN2.prototype.divn = function divn(num) {\n return this.clone().idivn(num);\n };\n BN2.prototype.egcd = function egcd(p) {\n assert3(p.negative === 0);\n assert3(!p.isZero());\n var x = this;\n var y = p.clone();\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n var A = new BN2(1);\n var B = new BN2(0);\n var C = new BN2(0);\n var D = new BN2(1);\n var g = 0;\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n var yp = y.clone();\n var xp = x.clone();\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1)\n ;\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1)\n ;\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n BN2.prototype._invmp = function _invmp(p) {\n assert3(p.negative === 0);\n assert3(!p.isZero());\n var a = this;\n var b = p.clone();\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n var x1 = new BN2(1);\n var x2 = new BN2(0);\n var delta = b.clone();\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1)\n ;\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n x1.iushrn(1);\n }\n }\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1)\n ;\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n x2.iushrn(1);\n }\n }\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n return res;\n };\n BN2.prototype.gcd = function gcd(num) {\n if (this.isZero())\n return num.abs();\n if (num.isZero())\n return this.abs();\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n var r = a.cmp(b);\n if (r < 0) {\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n a.isub(b);\n } while (true);\n return b.iushln(shift);\n };\n BN2.prototype.invm = function invm(num) {\n return this.egcd(num).a.umod(num);\n };\n BN2.prototype.isEven = function isEven() {\n return (this.words[0] & 1) === 0;\n };\n BN2.prototype.isOdd = function isOdd() {\n return (this.words[0] & 1) === 1;\n };\n BN2.prototype.andln = function andln(num) {\n return this.words[0] & num;\n };\n BN2.prototype.bincn = function bincn(bit) {\n assert3(typeof bit === \"number\");\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 67108863;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n BN2.prototype.isZero = function isZero() {\n return this.length === 1 && this.words[0] === 0;\n };\n BN2.prototype.cmpn = function cmpn(num) {\n var negative = num < 0;\n if (this.negative !== 0 && !negative)\n return -1;\n if (this.negative === 0 && negative)\n return 1;\n this._strip();\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n assert3(num <= 67108863, \"Number is too big\");\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN2.prototype.cmp = function cmp(num) {\n if (this.negative !== 0 && num.negative === 0)\n return -1;\n if (this.negative === 0 && num.negative !== 0)\n return 1;\n var res = this.ucmp(num);\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN2.prototype.ucmp = function ucmp(num) {\n if (this.length > num.length)\n return 1;\n if (this.length < num.length)\n return -1;\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n if (a === b)\n continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n BN2.prototype.gtn = function gtn(num) {\n return this.cmpn(num) === 1;\n };\n BN2.prototype.gt = function gt(num) {\n return this.cmp(num) === 1;\n };\n BN2.prototype.gten = function gten(num) {\n return this.cmpn(num) >= 0;\n };\n BN2.prototype.gte = function gte(num) {\n return this.cmp(num) >= 0;\n };\n BN2.prototype.ltn = function ltn(num) {\n return this.cmpn(num) === -1;\n };\n BN2.prototype.lt = function lt(num) {\n return this.cmp(num) === -1;\n };\n BN2.prototype.lten = function lten(num) {\n return this.cmpn(num) <= 0;\n };\n BN2.prototype.lte = function lte(num) {\n return this.cmp(num) <= 0;\n };\n BN2.prototype.eqn = function eqn(num) {\n return this.cmpn(num) === 0;\n };\n BN2.prototype.eq = function eq(num) {\n return this.cmp(num) === 0;\n };\n BN2.red = function red(num) {\n return new Red(num);\n };\n BN2.prototype.toRed = function toRed(ctx) {\n assert3(!this.red, \"Already a number in reduction context\");\n assert3(this.negative === 0, \"red works only with positives\");\n return ctx.convertTo(this)._forceRed(ctx);\n };\n BN2.prototype.fromRed = function fromRed() {\n assert3(this.red, \"fromRed works only with numbers in reduction context\");\n return this.red.convertFrom(this);\n };\n BN2.prototype._forceRed = function _forceRed(ctx) {\n this.red = ctx;\n return this;\n };\n BN2.prototype.forceRed = function forceRed(ctx) {\n assert3(!this.red, \"Already a number in reduction context\");\n return this._forceRed(ctx);\n };\n BN2.prototype.redAdd = function redAdd(num) {\n assert3(this.red, \"redAdd works only with red numbers\");\n return this.red.add(this, num);\n };\n BN2.prototype.redIAdd = function redIAdd(num) {\n assert3(this.red, \"redIAdd works only with red numbers\");\n return this.red.iadd(this, num);\n };\n BN2.prototype.redSub = function redSub(num) {\n assert3(this.red, \"redSub works only with red numbers\");\n return this.red.sub(this, num);\n };\n BN2.prototype.redISub = function redISub(num) {\n assert3(this.red, \"redISub works only with red numbers\");\n return this.red.isub(this, num);\n };\n BN2.prototype.redShl = function redShl(num) {\n assert3(this.red, \"redShl works only with red numbers\");\n return this.red.shl(this, num);\n };\n BN2.prototype.redMul = function redMul(num) {\n assert3(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n BN2.prototype.redIMul = function redIMul(num) {\n assert3(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n BN2.prototype.redSqr = function redSqr() {\n assert3(this.red, \"redSqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n BN2.prototype.redISqr = function redISqr() {\n assert3(this.red, \"redISqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n BN2.prototype.redSqrt = function redSqrt() {\n assert3(this.red, \"redSqrt works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n BN2.prototype.redInvm = function redInvm() {\n assert3(this.red, \"redInvm works only with red numbers\");\n this.red._verify1(this);\n return this.red.invm(this);\n };\n BN2.prototype.redNeg = function redNeg() {\n assert3(this.red, \"redNeg works only with red numbers\");\n this.red._verify1(this);\n return this.red.neg(this);\n };\n BN2.prototype.redPow = function redPow(num) {\n assert3(this.red && !num.red, \"redPow(normalNum)\");\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n function MPrime(name, p) {\n this.name = name;\n this.p = new BN2(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN2(1).iushln(this.n).isub(this.p);\n this.tmp = this._tmp();\n }\n MPrime.prototype._tmp = function _tmp() {\n var tmp = new BN2(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n MPrime.prototype.ireduce = function ireduce(num) {\n var r = num;\n var rlen;\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== void 0) {\n r.strip();\n } else {\n r._strip();\n }\n }\n return r;\n };\n MPrime.prototype.split = function split2(input, out) {\n input.iushrn(this.n, 0, out);\n };\n MPrime.prototype.imulK = function imulK(num) {\n return num.imul(this.k);\n };\n function K256() {\n MPrime.call(\n this,\n \"k256\",\n \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\"\n );\n }\n inherits(K256, MPrime);\n K256.prototype.split = function split2(input, output) {\n var mask2 = 4194303;\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n var prev = input.words[9];\n output.words[output.length++] = prev & mask2;\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = (next & mask2) << 4 | prev >>> 22;\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n K256.prototype.imulK = function imulK(num) {\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 977;\n num.words[i] = lo & 67108863;\n lo = w * 64 + (lo / 67108864 | 0);\n }\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n function P224() {\n MPrime.call(\n this,\n \"p224\",\n \"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\"\n );\n }\n inherits(P224, MPrime);\n function P192() {\n MPrime.call(\n this,\n \"p192\",\n \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\"\n );\n }\n inherits(P192, MPrime);\n function P25519() {\n MPrime.call(\n this,\n \"25519\",\n \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\"\n );\n }\n inherits(P25519, MPrime);\n P25519.prototype.imulK = function imulK(num) {\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 19 + carry;\n var lo = hi & 67108863;\n hi >>>= 26;\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n BN2._prime = function prime(name) {\n if (primes[name])\n return primes[name];\n var prime2;\n if (name === \"k256\") {\n prime2 = new K256();\n } else if (name === \"p224\") {\n prime2 = new P224();\n } else if (name === \"p192\") {\n prime2 = new P192();\n } else if (name === \"p25519\") {\n prime2 = new P25519();\n } else {\n throw new Error(\"Unknown prime \" + name);\n }\n primes[name] = prime2;\n return prime2;\n };\n function Red(m) {\n if (typeof m === \"string\") {\n var prime = BN2._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert3(m.gtn(1), \"modulus must be greater than 1\");\n this.m = m;\n this.prime = null;\n }\n }\n Red.prototype._verify1 = function _verify1(a) {\n assert3(a.negative === 0, \"red works only with positives\");\n assert3(a.red, \"red works only with red numbers\");\n };\n Red.prototype._verify2 = function _verify2(a, b) {\n assert3((a.negative | b.negative) === 0, \"red works only with positives\");\n assert3(\n a.red && a.red === b.red,\n \"red works only with red numbers\"\n );\n };\n Red.prototype.imod = function imod(a) {\n if (this.prime)\n return this.prime.ireduce(a)._forceRed(this);\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n Red.prototype.neg = function neg(a) {\n if (a.isZero()) {\n return a.clone();\n }\n return this.m.sub(a)._forceRed(this);\n };\n Red.prototype.add = function add2(a, b) {\n this._verify2(a, b);\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.iadd = function iadd(a, b) {\n this._verify2(a, b);\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n Red.prototype.sub = function sub(a, b) {\n this._verify2(a, b);\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.isub = function isub(a, b) {\n this._verify2(a, b);\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n Red.prototype.shl = function shl(a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n Red.prototype.imul = function imul(a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n Red.prototype.mul = function mul(a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n Red.prototype.isqr = function isqr(a) {\n return this.imul(a, a.clone());\n };\n Red.prototype.sqr = function sqr(a) {\n return this.mul(a, a);\n };\n Red.prototype.sqrt = function sqrt(a) {\n if (a.isZero())\n return a.clone();\n var mod3 = this.m.andln(3);\n assert3(mod3 % 2 === 1);\n if (mod3 === 3) {\n var pow = this.m.add(new BN2(1)).iushrn(2);\n return this.pow(a, pow);\n }\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert3(!q.isZero());\n var one = new BN2(1).toRed(this);\n var nOne = one.redNeg();\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN2(2 * z * z).toRed(this);\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert3(i < m);\n var b = this.pow(c, new BN2(1).iushln(m - i - 1));\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n return r;\n };\n Red.prototype.invm = function invm(a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n Red.prototype.pow = function pow(a, num) {\n if (num.isZero())\n return new BN2(1).toRed(this);\n if (num.cmpn(1) === 0)\n return a.clone();\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN2(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = word >> j & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0))\n continue;\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n return res;\n };\n Red.prototype.convertTo = function convertTo(num) {\n var r = num.umod(this.m);\n return r === num ? r.clone() : r;\n };\n Red.prototype.convertFrom = function convertFrom(num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n BN2.mont = function mont(num) {\n return new Mont(num);\n };\n function Mont(m) {\n Red.call(this, m);\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - this.shift % 26;\n }\n this.r = new BN2(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n Mont.prototype.convertTo = function convertTo(num) {\n return this.imod(num.ushln(this.shift));\n };\n Mont.prototype.convertFrom = function convertFrom(num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n Mont.prototype.imul = function imul(a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.mul = function mul(a, b) {\n if (a.isZero() || b.isZero())\n return new BN2(0)._forceRed(this);\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.invm = function invm(a) {\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n })(typeof module === \"undefined\" || module, exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js\n var require_safe_buffer = __commonJS({\n \"../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var buffer = (init_buffer(), __toCommonJS(buffer_exports));\n var Buffer3 = buffer.Buffer;\n function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n }\n if (Buffer3.from && Buffer3.alloc && Buffer3.allocUnsafe && Buffer3.allocUnsafeSlow) {\n module.exports = buffer;\n } else {\n copyProps(buffer, exports3);\n exports3.Buffer = SafeBuffer;\n }\n function SafeBuffer(arg, encodingOrOffset, length) {\n return Buffer3(arg, encodingOrOffset, length);\n }\n SafeBuffer.prototype = Object.create(Buffer3.prototype);\n copyProps(Buffer3, SafeBuffer);\n SafeBuffer.from = function(arg, encodingOrOffset, length) {\n if (typeof arg === \"number\") {\n throw new TypeError(\"Argument must not be a number\");\n }\n return Buffer3(arg, encodingOrOffset, length);\n };\n SafeBuffer.alloc = function(size, fill, encoding) {\n if (typeof size !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n var buf = Buffer3(size);\n if (fill !== void 0) {\n if (typeof encoding === \"string\") {\n buf.fill(fill, encoding);\n } else {\n buf.fill(fill);\n }\n } else {\n buf.fill(0);\n }\n return buf;\n };\n SafeBuffer.allocUnsafe = function(size) {\n if (typeof size !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n return Buffer3(size);\n };\n SafeBuffer.allocUnsafeSlow = function(size) {\n if (typeof size !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n return buffer.SlowBuffer(size);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/base-x@3.0.11/node_modules/base-x/src/index.js\n var require_src = __commonJS({\n \"../../../node_modules/.pnpm/base-x@3.0.11/node_modules/base-x/src/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var _Buffer = require_safe_buffer().Buffer;\n function base(ALPHABET) {\n if (ALPHABET.length >= 255) {\n throw new TypeError(\"Alphabet too long\");\n }\n var BASE_MAP = new Uint8Array(256);\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255;\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i);\n var xc = x.charCodeAt(0);\n if (BASE_MAP[xc] !== 255) {\n throw new TypeError(x + \" is ambiguous\");\n }\n BASE_MAP[xc] = i;\n }\n var BASE = ALPHABET.length;\n var LEADER = ALPHABET.charAt(0);\n var FACTOR = Math.log(BASE) / Math.log(256);\n var iFACTOR = Math.log(256) / Math.log(BASE);\n function encode(source) {\n if (Array.isArray(source) || source instanceof Uint8Array) {\n source = _Buffer.from(source);\n }\n if (!_Buffer.isBuffer(source)) {\n throw new TypeError(\"Expected Buffer\");\n }\n if (source.length === 0) {\n return \"\";\n }\n var zeroes = 0;\n var length = 0;\n var pbegin = 0;\n var pend = source.length;\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++;\n zeroes++;\n }\n var size = (pend - pbegin) * iFACTOR + 1 >>> 0;\n var b58 = new Uint8Array(size);\n while (pbegin !== pend) {\n var carry = source[pbegin];\n var i2 = 0;\n for (var it1 = size - 1; (carry !== 0 || i2 < length) && it1 !== -1; it1--, i2++) {\n carry += 256 * b58[it1] >>> 0;\n b58[it1] = carry % BASE >>> 0;\n carry = carry / BASE >>> 0;\n }\n if (carry !== 0) {\n throw new Error(\"Non-zero carry\");\n }\n length = i2;\n pbegin++;\n }\n var it2 = size - length;\n while (it2 !== size && b58[it2] === 0) {\n it2++;\n }\n var str = LEADER.repeat(zeroes);\n for (; it2 < size; ++it2) {\n str += ALPHABET.charAt(b58[it2]);\n }\n return str;\n }\n function decodeUnsafe(source) {\n if (typeof source !== \"string\") {\n throw new TypeError(\"Expected String\");\n }\n if (source.length === 0) {\n return _Buffer.alloc(0);\n }\n var psz = 0;\n var zeroes = 0;\n var length = 0;\n while (source[psz] === LEADER) {\n zeroes++;\n psz++;\n }\n var size = (source.length - psz) * FACTOR + 1 >>> 0;\n var b256 = new Uint8Array(size);\n while (psz < source.length) {\n var charCode = source.charCodeAt(psz);\n if (charCode > 255) {\n return;\n }\n var carry = BASE_MAP[charCode];\n if (carry === 255) {\n return;\n }\n var i2 = 0;\n for (var it3 = size - 1; (carry !== 0 || i2 < length) && it3 !== -1; it3--, i2++) {\n carry += BASE * b256[it3] >>> 0;\n b256[it3] = carry % 256 >>> 0;\n carry = carry / 256 >>> 0;\n }\n if (carry !== 0) {\n throw new Error(\"Non-zero carry\");\n }\n length = i2;\n psz++;\n }\n var it4 = size - length;\n while (it4 !== size && b256[it4] === 0) {\n it4++;\n }\n var vch = _Buffer.allocUnsafe(zeroes + (size - it4));\n vch.fill(0, 0, zeroes);\n var j2 = zeroes;\n while (it4 !== size) {\n vch[j2++] = b256[it4++];\n }\n return vch;\n }\n function decode(string2) {\n var buffer = decodeUnsafe(string2);\n if (buffer) {\n return buffer;\n }\n throw new Error(\"Non-base\" + BASE + \" character\");\n }\n return {\n encode,\n decodeUnsafe,\n decode\n };\n }\n module.exports = base;\n }\n });\n\n // ../../../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js\n var require_bs58 = __commonJS({\n \"../../../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var basex = require_src();\n var ALPHABET = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n module.exports = basex(ALPHABET);\n }\n });\n\n // ../../../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js\n var require_encoding_lib = __commonJS({\n \"../../../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n function inRange2(a, min, max) {\n return min <= a && a <= max;\n }\n function ToDictionary(o) {\n if (o === void 0)\n return {};\n if (o === Object(o))\n return o;\n throw TypeError(\"Could not convert argument to dictionary\");\n }\n function stringToCodePoints(string2) {\n var s = String(string2);\n var n = s.length;\n var i = 0;\n var u = [];\n while (i < n) {\n var c = s.charCodeAt(i);\n if (c < 55296 || c > 57343) {\n u.push(c);\n } else if (56320 <= c && c <= 57343) {\n u.push(65533);\n } else if (55296 <= c && c <= 56319) {\n if (i === n - 1) {\n u.push(65533);\n } else {\n var d = string2.charCodeAt(i + 1);\n if (56320 <= d && d <= 57343) {\n var a = c & 1023;\n var b = d & 1023;\n u.push(65536 + (a << 10) + b);\n i += 1;\n } else {\n u.push(65533);\n }\n }\n }\n i += 1;\n }\n return u;\n }\n function codePointsToString(code_points) {\n var s = \"\";\n for (var i = 0; i < code_points.length; ++i) {\n var cp = code_points[i];\n if (cp <= 65535) {\n s += String.fromCharCode(cp);\n } else {\n cp -= 65536;\n s += String.fromCharCode(\n (cp >> 10) + 55296,\n (cp & 1023) + 56320\n );\n }\n }\n return s;\n }\n var end_of_stream = -1;\n function Stream(tokens) {\n this.tokens = [].slice.call(tokens);\n }\n Stream.prototype = {\n /**\n * @return {boolean} True if end-of-stream has been hit.\n */\n endOfStream: function() {\n return !this.tokens.length;\n },\n /**\n * When a token is read from a stream, the first token in the\n * stream must be returned and subsequently removed, and\n * end-of-stream must be returned otherwise.\n *\n * @return {number} Get the next token from the stream, or\n * end_of_stream.\n */\n read: function() {\n if (!this.tokens.length)\n return end_of_stream;\n return this.tokens.shift();\n },\n /**\n * When one or more tokens are prepended to a stream, those tokens\n * must be inserted, in given order, before the first token in the\n * stream.\n *\n * @param {(number|!Array.)} token The token(s) to prepend to the stream.\n */\n prepend: function(token) {\n if (Array.isArray(token)) {\n var tokens = (\n /**@type {!Array.}*/\n token\n );\n while (tokens.length)\n this.tokens.unshift(tokens.pop());\n } else {\n this.tokens.unshift(token);\n }\n },\n /**\n * When one or more tokens are pushed to a stream, those tokens\n * must be inserted, in given order, after the last token in the\n * stream.\n *\n * @param {(number|!Array.)} token The tokens(s) to prepend to the stream.\n */\n push: function(token) {\n if (Array.isArray(token)) {\n var tokens = (\n /**@type {!Array.}*/\n token\n );\n while (tokens.length)\n this.tokens.push(tokens.shift());\n } else {\n this.tokens.push(token);\n }\n }\n };\n var finished = -1;\n function decoderError(fatal, opt_code_point) {\n if (fatal)\n throw TypeError(\"Decoder error\");\n return opt_code_point || 65533;\n }\n var DEFAULT_ENCODING = \"utf-8\";\n function TextDecoder2(encoding, options) {\n if (!(this instanceof TextDecoder2)) {\n return new TextDecoder2(encoding, options);\n }\n encoding = encoding !== void 0 ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error(\"Encoding not supported. Only utf-8 is supported\");\n }\n options = ToDictionary(options);\n this._streaming = false;\n this._BOMseen = false;\n this._decoder = null;\n this._fatal = Boolean(options[\"fatal\"]);\n this._ignoreBOM = Boolean(options[\"ignoreBOM\"]);\n Object.defineProperty(this, \"encoding\", { value: \"utf-8\" });\n Object.defineProperty(this, \"fatal\", { value: this._fatal });\n Object.defineProperty(this, \"ignoreBOM\", { value: this._ignoreBOM });\n }\n TextDecoder2.prototype = {\n /**\n * @param {ArrayBufferView=} input The buffer of bytes to decode.\n * @param {Object=} options\n * @return {string} The decoded string.\n */\n decode: function decode(input, options) {\n var bytes;\n if (typeof input === \"object\" && input instanceof ArrayBuffer) {\n bytes = new Uint8Array(input);\n } else if (typeof input === \"object\" && \"buffer\" in input && input.buffer instanceof ArrayBuffer) {\n bytes = new Uint8Array(\n input.buffer,\n input.byteOffset,\n input.byteLength\n );\n } else {\n bytes = new Uint8Array(0);\n }\n options = ToDictionary(options);\n if (!this._streaming) {\n this._decoder = new UTF8Decoder({ fatal: this._fatal });\n this._BOMseen = false;\n }\n this._streaming = Boolean(options[\"stream\"]);\n var input_stream = new Stream(bytes);\n var code_points = [];\n var result;\n while (!input_stream.endOfStream()) {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(\n code_points,\n /**@type {!Array.}*/\n result\n );\n else\n code_points.push(result);\n }\n if (!this._streaming) {\n do {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(\n code_points,\n /**@type {!Array.}*/\n result\n );\n else\n code_points.push(result);\n } while (!input_stream.endOfStream());\n this._decoder = null;\n }\n if (code_points.length) {\n if ([\"utf-8\"].indexOf(this.encoding) !== -1 && !this._ignoreBOM && !this._BOMseen) {\n if (code_points[0] === 65279) {\n this._BOMseen = true;\n code_points.shift();\n } else {\n this._BOMseen = true;\n }\n }\n }\n return codePointsToString(code_points);\n }\n };\n function TextEncoder2(encoding, options) {\n if (!(this instanceof TextEncoder2))\n return new TextEncoder2(encoding, options);\n encoding = encoding !== void 0 ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error(\"Encoding not supported. Only utf-8 is supported\");\n }\n options = ToDictionary(options);\n this._streaming = false;\n this._encoder = null;\n this._options = { fatal: Boolean(options[\"fatal\"]) };\n Object.defineProperty(this, \"encoding\", { value: \"utf-8\" });\n }\n TextEncoder2.prototype = {\n /**\n * @param {string=} opt_string The string to encode.\n * @param {Object=} options\n * @return {Uint8Array} Encoded bytes, as a Uint8Array.\n */\n encode: function encode(opt_string, options) {\n opt_string = opt_string ? String(opt_string) : \"\";\n options = ToDictionary(options);\n if (!this._streaming)\n this._encoder = new UTF8Encoder(this._options);\n this._streaming = Boolean(options[\"stream\"]);\n var bytes = [];\n var input_stream = new Stream(stringToCodePoints(opt_string));\n var result;\n while (!input_stream.endOfStream()) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(\n bytes,\n /**@type {!Array.}*/\n result\n );\n else\n bytes.push(result);\n }\n if (!this._streaming) {\n while (true) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(\n bytes,\n /**@type {!Array.}*/\n result\n );\n else\n bytes.push(result);\n }\n this._encoder = null;\n }\n return new Uint8Array(bytes);\n }\n };\n function UTF8Decoder(options) {\n var fatal = options.fatal;\n var utf8_code_point = 0, utf8_bytes_seen = 0, utf8_bytes_needed = 0, utf8_lower_boundary = 128, utf8_upper_boundary = 191;\n this.handler = function(stream, bite) {\n if (bite === end_of_stream && utf8_bytes_needed !== 0) {\n utf8_bytes_needed = 0;\n return decoderError(fatal);\n }\n if (bite === end_of_stream)\n return finished;\n if (utf8_bytes_needed === 0) {\n if (inRange2(bite, 0, 127)) {\n return bite;\n }\n if (inRange2(bite, 194, 223)) {\n utf8_bytes_needed = 1;\n utf8_code_point = bite - 192;\n } else if (inRange2(bite, 224, 239)) {\n if (bite === 224)\n utf8_lower_boundary = 160;\n if (bite === 237)\n utf8_upper_boundary = 159;\n utf8_bytes_needed = 2;\n utf8_code_point = bite - 224;\n } else if (inRange2(bite, 240, 244)) {\n if (bite === 240)\n utf8_lower_boundary = 144;\n if (bite === 244)\n utf8_upper_boundary = 143;\n utf8_bytes_needed = 3;\n utf8_code_point = bite - 240;\n } else {\n return decoderError(fatal);\n }\n utf8_code_point = utf8_code_point << 6 * utf8_bytes_needed;\n return null;\n }\n if (!inRange2(bite, utf8_lower_boundary, utf8_upper_boundary)) {\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n utf8_lower_boundary = 128;\n utf8_upper_boundary = 191;\n stream.prepend(bite);\n return decoderError(fatal);\n }\n utf8_lower_boundary = 128;\n utf8_upper_boundary = 191;\n utf8_bytes_seen += 1;\n utf8_code_point += bite - 128 << 6 * (utf8_bytes_needed - utf8_bytes_seen);\n if (utf8_bytes_seen !== utf8_bytes_needed)\n return null;\n var code_point = utf8_code_point;\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n return code_point;\n };\n }\n function UTF8Encoder(options) {\n var fatal = options.fatal;\n this.handler = function(stream, code_point) {\n if (code_point === end_of_stream)\n return finished;\n if (inRange2(code_point, 0, 127))\n return code_point;\n var count, offset2;\n if (inRange2(code_point, 128, 2047)) {\n count = 1;\n offset2 = 192;\n } else if (inRange2(code_point, 2048, 65535)) {\n count = 2;\n offset2 = 224;\n } else if (inRange2(code_point, 65536, 1114111)) {\n count = 3;\n offset2 = 240;\n }\n var bytes = [(code_point >> 6 * count) + offset2];\n while (count > 0) {\n var temp = code_point >> 6 * (count - 1);\n bytes.push(128 | temp & 63);\n count -= 1;\n }\n return bytes;\n };\n }\n exports3.TextEncoder = TextEncoder2;\n exports3.TextDecoder = TextDecoder2;\n }\n });\n\n // ../../../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js\n var require_lib = __commonJS({\n \"../../../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding = exports3 && exports3.__createBinding || (Object.create ? function(o, m, k, k2) {\n if (k2 === void 0)\n k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() {\n return m[k];\n } });\n } : function(o, m, k, k2) {\n if (k2 === void 0)\n k2 = k;\n o[k2] = m[k];\n });\n var __setModuleDefault = exports3 && exports3.__setModuleDefault || (Object.create ? function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n } : function(o, v) {\n o[\"default\"] = v;\n });\n var __decorate = exports3 && exports3.__decorate || function(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i = decorators.length - 1; i >= 0; i--)\n if (d = decorators[i])\n r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };\n var __importStar = exports3 && exports3.__importStar || function(mod2) {\n if (mod2 && mod2.__esModule)\n return mod2;\n var result = {};\n if (mod2 != null) {\n for (var k in mod2)\n if (k !== \"default\" && Object.hasOwnProperty.call(mod2, k))\n __createBinding(result, mod2, k);\n }\n __setModuleDefault(result, mod2);\n return result;\n };\n var __importDefault = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.deserializeUnchecked = exports3.deserialize = exports3.serialize = exports3.BinaryReader = exports3.BinaryWriter = exports3.BorshError = exports3.baseDecode = exports3.baseEncode = void 0;\n var bn_js_1 = __importDefault(require_bn());\n var bs58_1 = __importDefault(require_bs58());\n var encoding = __importStar(require_encoding_lib());\n var ResolvedTextDecoder = typeof TextDecoder !== \"function\" ? encoding.TextDecoder : TextDecoder;\n var textDecoder = new ResolvedTextDecoder(\"utf-8\", { fatal: true });\n function baseEncode(value) {\n if (typeof value === \"string\") {\n value = Buffer2.from(value, \"utf8\");\n }\n return bs58_1.default.encode(Buffer2.from(value));\n }\n exports3.baseEncode = baseEncode;\n function baseDecode(value) {\n return Buffer2.from(bs58_1.default.decode(value));\n }\n exports3.baseDecode = baseDecode;\n var INITIAL_LENGTH = 1024;\n var BorshError = class extends Error {\n constructor(message) {\n super(message);\n this.fieldPath = [];\n this.originalMessage = message;\n }\n addToFieldPath(fieldName) {\n this.fieldPath.splice(0, 0, fieldName);\n this.message = this.originalMessage + \": \" + this.fieldPath.join(\".\");\n }\n };\n exports3.BorshError = BorshError;\n var BinaryWriter = class {\n constructor() {\n this.buf = Buffer2.alloc(INITIAL_LENGTH);\n this.length = 0;\n }\n maybeResize() {\n if (this.buf.length < 16 + this.length) {\n this.buf = Buffer2.concat([this.buf, Buffer2.alloc(INITIAL_LENGTH)]);\n }\n }\n writeU8(value) {\n this.maybeResize();\n this.buf.writeUInt8(value, this.length);\n this.length += 1;\n }\n writeU16(value) {\n this.maybeResize();\n this.buf.writeUInt16LE(value, this.length);\n this.length += 2;\n }\n writeU32(value) {\n this.maybeResize();\n this.buf.writeUInt32LE(value, this.length);\n this.length += 4;\n }\n writeU64(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 8)));\n }\n writeU128(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 16)));\n }\n writeU256(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 32)));\n }\n writeU512(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 64)));\n }\n writeBuffer(buffer) {\n this.buf = Buffer2.concat([\n Buffer2.from(this.buf.subarray(0, this.length)),\n buffer,\n Buffer2.alloc(INITIAL_LENGTH)\n ]);\n this.length += buffer.length;\n }\n writeString(str) {\n this.maybeResize();\n const b = Buffer2.from(str, \"utf8\");\n this.writeU32(b.length);\n this.writeBuffer(b);\n }\n writeFixedArray(array2) {\n this.writeBuffer(Buffer2.from(array2));\n }\n writeArray(array2, fn) {\n this.maybeResize();\n this.writeU32(array2.length);\n for (const elem of array2) {\n this.maybeResize();\n fn(elem);\n }\n }\n toArray() {\n return this.buf.subarray(0, this.length);\n }\n };\n exports3.BinaryWriter = BinaryWriter;\n function handlingRangeError(target, propertyKey, propertyDescriptor) {\n const originalMethod = propertyDescriptor.value;\n propertyDescriptor.value = function(...args) {\n try {\n return originalMethod.apply(this, args);\n } catch (e) {\n if (e instanceof RangeError) {\n const code = e.code;\n if ([\"ERR_BUFFER_OUT_OF_BOUNDS\", \"ERR_OUT_OF_RANGE\"].indexOf(code) >= 0) {\n throw new BorshError(\"Reached the end of buffer when deserializing\");\n }\n }\n throw e;\n }\n };\n }\n var BinaryReader = class {\n constructor(buf) {\n this.buf = buf;\n this.offset = 0;\n }\n readU8() {\n const value = this.buf.readUInt8(this.offset);\n this.offset += 1;\n return value;\n }\n readU16() {\n const value = this.buf.readUInt16LE(this.offset);\n this.offset += 2;\n return value;\n }\n readU32() {\n const value = this.buf.readUInt32LE(this.offset);\n this.offset += 4;\n return value;\n }\n readU64() {\n const buf = this.readBuffer(8);\n return new bn_js_1.default(buf, \"le\");\n }\n readU128() {\n const buf = this.readBuffer(16);\n return new bn_js_1.default(buf, \"le\");\n }\n readU256() {\n const buf = this.readBuffer(32);\n return new bn_js_1.default(buf, \"le\");\n }\n readU512() {\n const buf = this.readBuffer(64);\n return new bn_js_1.default(buf, \"le\");\n }\n readBuffer(len) {\n if (this.offset + len > this.buf.length) {\n throw new BorshError(`Expected buffer length ${len} isn't within bounds`);\n }\n const result = this.buf.slice(this.offset, this.offset + len);\n this.offset += len;\n return result;\n }\n readString() {\n const len = this.readU32();\n const buf = this.readBuffer(len);\n try {\n return textDecoder.decode(buf);\n } catch (e) {\n throw new BorshError(`Error decoding UTF-8 string: ${e}`);\n }\n }\n readFixedArray(len) {\n return new Uint8Array(this.readBuffer(len));\n }\n readArray(fn) {\n const len = this.readU32();\n const result = Array();\n for (let i = 0; i < len; ++i) {\n result.push(fn());\n }\n return result;\n }\n };\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU8\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU16\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU32\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU64\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU128\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU256\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU512\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readString\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readFixedArray\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readArray\", null);\n exports3.BinaryReader = BinaryReader;\n function capitalizeFirstLetter(string2) {\n return string2.charAt(0).toUpperCase() + string2.slice(1);\n }\n function serializeField(schema, fieldName, value, fieldType, writer) {\n try {\n if (typeof fieldType === \"string\") {\n writer[`write${capitalizeFirstLetter(fieldType)}`](value);\n } else if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n if (value.length !== fieldType[0]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[0]}, but got ${value.length} bytes`);\n }\n writer.writeFixedArray(value);\n } else if (fieldType.length === 2 && typeof fieldType[1] === \"number\") {\n if (value.length !== fieldType[1]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[1]}, but got ${value.length} bytes`);\n }\n for (let i = 0; i < fieldType[1]; i++) {\n serializeField(schema, null, value[i], fieldType[0], writer);\n }\n } else {\n writer.writeArray(value, (item) => {\n serializeField(schema, fieldName, item, fieldType[0], writer);\n });\n }\n } else if (fieldType.kind !== void 0) {\n switch (fieldType.kind) {\n case \"option\": {\n if (value === null || value === void 0) {\n writer.writeU8(0);\n } else {\n writer.writeU8(1);\n serializeField(schema, fieldName, value, fieldType.type, writer);\n }\n break;\n }\n case \"map\": {\n writer.writeU32(value.size);\n value.forEach((val, key) => {\n serializeField(schema, fieldName, key, fieldType.key, writer);\n serializeField(schema, fieldName, val, fieldType.value, writer);\n });\n break;\n }\n default:\n throw new BorshError(`FieldType ${fieldType} unrecognized`);\n }\n } else {\n serializeStruct(schema, value, writer);\n }\n } catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n }\n function serializeStruct(schema, obj, writer) {\n if (typeof obj.borshSerialize === \"function\") {\n obj.borshSerialize(writer);\n return;\n }\n const structSchema = schema.get(obj.constructor);\n if (!structSchema) {\n throw new BorshError(`Class ${obj.constructor.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n structSchema.fields.map(([fieldName, fieldType]) => {\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n });\n } else if (structSchema.kind === \"enum\") {\n const name = obj[structSchema.field];\n for (let idx = 0; idx < structSchema.values.length; ++idx) {\n const [fieldName, fieldType] = structSchema.values[idx];\n if (fieldName === name) {\n writer.writeU8(idx);\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n break;\n }\n }\n } else {\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${obj.constructor.name}`);\n }\n }\n function serialize2(schema, obj, Writer = BinaryWriter) {\n const writer = new Writer();\n serializeStruct(schema, obj, writer);\n return writer.toArray();\n }\n exports3.serialize = serialize2;\n function deserializeField(schema, fieldName, fieldType, reader) {\n try {\n if (typeof fieldType === \"string\") {\n return reader[`read${capitalizeFirstLetter(fieldType)}`]();\n }\n if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n return reader.readFixedArray(fieldType[0]);\n } else if (typeof fieldType[1] === \"number\") {\n const arr = [];\n for (let i = 0; i < fieldType[1]; i++) {\n arr.push(deserializeField(schema, null, fieldType[0], reader));\n }\n return arr;\n } else {\n return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader));\n }\n }\n if (fieldType.kind === \"option\") {\n const option = reader.readU8();\n if (option) {\n return deserializeField(schema, fieldName, fieldType.type, reader);\n }\n return void 0;\n }\n if (fieldType.kind === \"map\") {\n let map = /* @__PURE__ */ new Map();\n const length = reader.readU32();\n for (let i = 0; i < length; i++) {\n const key = deserializeField(schema, fieldName, fieldType.key, reader);\n const val = deserializeField(schema, fieldName, fieldType.value, reader);\n map.set(key, val);\n }\n return map;\n }\n return deserializeStruct(schema, fieldType, reader);\n } catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n }\n function deserializeStruct(schema, classType, reader) {\n if (typeof classType.borshDeserialize === \"function\") {\n return classType.borshDeserialize(reader);\n }\n const structSchema = schema.get(classType);\n if (!structSchema) {\n throw new BorshError(`Class ${classType.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n const result = {};\n for (const [fieldName, fieldType] of schema.get(classType).fields) {\n result[fieldName] = deserializeField(schema, fieldName, fieldType, reader);\n }\n return new classType(result);\n }\n if (structSchema.kind === \"enum\") {\n const idx = reader.readU8();\n if (idx >= structSchema.values.length) {\n throw new BorshError(`Enum index: ${idx} is out of range`);\n }\n const [fieldName, fieldType] = structSchema.values[idx];\n const fieldValue = deserializeField(schema, fieldName, fieldType, reader);\n return new classType({ [fieldName]: fieldValue });\n }\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`);\n }\n function deserialize2(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n const result = deserializeStruct(schema, classType, reader);\n if (reader.offset < buffer.length) {\n throw new BorshError(`Unexpected ${buffer.length - reader.offset} bytes after deserialized data`);\n }\n return result;\n }\n exports3.deserialize = deserialize2;\n function deserializeUnchecked2(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n return deserializeStruct(schema, classType, reader);\n }\n exports3.deserializeUnchecked = deserializeUnchecked2;\n }\n });\n\n // ../../../node_modules/.pnpm/@solana+buffer-layout@4.0.1/node_modules/@solana/buffer-layout/lib/Layout.js\n var require_Layout = __commonJS({\n \"../../../node_modules/.pnpm/@solana+buffer-layout@4.0.1/node_modules/@solana/buffer-layout/lib/Layout.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.s16 = exports3.s8 = exports3.nu64be = exports3.u48be = exports3.u40be = exports3.u32be = exports3.u24be = exports3.u16be = exports3.nu64 = exports3.u48 = exports3.u40 = exports3.u32 = exports3.u24 = exports3.u16 = exports3.u8 = exports3.offset = exports3.greedy = exports3.Constant = exports3.UTF8 = exports3.CString = exports3.Blob = exports3.Boolean = exports3.BitField = exports3.BitStructure = exports3.VariantLayout = exports3.Union = exports3.UnionLayoutDiscriminator = exports3.UnionDiscriminator = exports3.Structure = exports3.Sequence = exports3.DoubleBE = exports3.Double = exports3.FloatBE = exports3.Float = exports3.NearInt64BE = exports3.NearInt64 = exports3.NearUInt64BE = exports3.NearUInt64 = exports3.IntBE = exports3.Int = exports3.UIntBE = exports3.UInt = exports3.OffsetLayout = exports3.GreedyCount = exports3.ExternalLayout = exports3.bindConstructorLayout = exports3.nameWithProperty = exports3.Layout = exports3.uint8ArrayToBuffer = exports3.checkUint8Array = void 0;\n exports3.constant = exports3.utf8 = exports3.cstr = exports3.blob = exports3.unionLayoutDiscriminator = exports3.union = exports3.seq = exports3.bits = exports3.struct = exports3.f64be = exports3.f64 = exports3.f32be = exports3.f32 = exports3.ns64be = exports3.s48be = exports3.s40be = exports3.s32be = exports3.s24be = exports3.s16be = exports3.ns64 = exports3.s48 = exports3.s40 = exports3.s32 = exports3.s24 = void 0;\n var buffer_1 = (init_buffer(), __toCommonJS(buffer_exports));\n function checkUint8Array(b) {\n if (!(b instanceof Uint8Array)) {\n throw new TypeError(\"b must be a Uint8Array\");\n }\n }\n exports3.checkUint8Array = checkUint8Array;\n function uint8ArrayToBuffer(b) {\n checkUint8Array(b);\n return buffer_1.Buffer.from(b.buffer, b.byteOffset, b.length);\n }\n exports3.uint8ArrayToBuffer = uint8ArrayToBuffer;\n var Layout = class {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError(\"span must be an integer\");\n }\n this.span = span;\n this.property = property;\n }\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Uint8Array} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset2) {\n if (0 > this.span) {\n throw new RangeError(\"indeterminate span\");\n }\n return this.span;\n }\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return void 0;\n }\n };\n exports3.Layout = Layout;\n function nameWithProperty(name, lo) {\n if (lo.property) {\n return name + \"[\" + lo.property + \"]\";\n }\n return name;\n }\n exports3.nameWithProperty = nameWithProperty;\n function bindConstructorLayout(Class, layout) {\n if (\"function\" !== typeof Class) {\n throw new TypeError(\"Class must be constructor\");\n }\n if (Object.prototype.hasOwnProperty.call(Class, \"layout_\")) {\n throw new Error(\"Class is already bound to a layout\");\n }\n if (!(layout && layout instanceof Layout)) {\n throw new TypeError(\"layout must be a Layout\");\n }\n if (Object.prototype.hasOwnProperty.call(layout, \"boundConstructor_\")) {\n throw new Error(\"layout is already bound to a constructor\");\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = () => new Class();\n Object.defineProperty(Class.prototype, \"encode\", {\n value(b, offset2) {\n return layout.encode(this, b, offset2);\n },\n writable: true\n });\n Object.defineProperty(Class, \"decode\", {\n value(b, offset2) {\n return layout.decode(b, offset2);\n },\n writable: true\n });\n }\n exports3.bindConstructorLayout = bindConstructorLayout;\n var ExternalLayout = class extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error(\"ExternalLayout is abstract\");\n }\n };\n exports3.ExternalLayout = ExternalLayout;\n var GreedyCount = class extends ExternalLayout {\n constructor(elementSpan = 1, property) {\n if (!Number.isInteger(elementSpan) || 0 >= elementSpan) {\n throw new TypeError(\"elementSpan must be a (positive) integer\");\n }\n super(-1, property);\n this.elementSpan = elementSpan;\n }\n /** @override */\n isCount() {\n return true;\n }\n /** @override */\n decode(b, offset2 = 0) {\n checkUint8Array(b);\n const rem = b.length - offset2;\n return Math.floor(rem / this.elementSpan);\n }\n /** @override */\n encode(src, b, offset2) {\n return 0;\n }\n };\n exports3.GreedyCount = GreedyCount;\n var OffsetLayout = class extends ExternalLayout {\n constructor(layout, offset2 = 0, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError(\"layout must be a Layout\");\n }\n if (!Number.isInteger(offset2)) {\n throw new TypeError(\"offset must be integer or undefined\");\n }\n super(layout.span, property || layout.property);\n this.layout = layout;\n this.offset = offset2;\n }\n /** @override */\n isCount() {\n return this.layout instanceof UInt || this.layout instanceof UIntBE;\n }\n /** @override */\n decode(b, offset2 = 0) {\n return this.layout.decode(b, offset2 + this.offset);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n return this.layout.encode(src, b, offset2 + this.offset);\n }\n };\n exports3.OffsetLayout = OffsetLayout;\n var UInt = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readUIntLE(offset2, this.span);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeUIntLE(src, offset2, this.span);\n return this.span;\n }\n };\n exports3.UInt = UInt;\n var UIntBE = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readUIntBE(offset2, this.span);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeUIntBE(src, offset2, this.span);\n return this.span;\n }\n };\n exports3.UIntBE = UIntBE;\n var Int = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readIntLE(offset2, this.span);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeIntLE(src, offset2, this.span);\n return this.span;\n }\n };\n exports3.Int = Int;\n var IntBE = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readIntBE(offset2, this.span);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeIntBE(src, offset2, this.span);\n return this.span;\n }\n };\n exports3.IntBE = IntBE;\n var V2E32 = Math.pow(2, 32);\n function divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - hi32 * V2E32;\n return { hi32, lo32 };\n }\n function roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n }\n var NearUInt64 = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset2);\n const hi32 = buffer.readUInt32LE(offset2 + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n const split2 = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split2.lo32, offset2);\n buffer.writeUInt32LE(split2.hi32, offset2 + 4);\n return 8;\n }\n };\n exports3.NearUInt64 = NearUInt64;\n var NearUInt64BE = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readUInt32BE(offset2);\n const lo32 = buffer.readUInt32BE(offset2 + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n const split2 = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32BE(split2.hi32, offset2);\n buffer.writeUInt32BE(split2.lo32, offset2 + 4);\n return 8;\n }\n };\n exports3.NearUInt64BE = NearUInt64BE;\n var NearInt64 = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset2);\n const hi32 = buffer.readInt32LE(offset2 + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n const split2 = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split2.lo32, offset2);\n buffer.writeInt32LE(split2.hi32, offset2 + 4);\n return 8;\n }\n };\n exports3.NearInt64 = NearInt64;\n var NearInt64BE = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readInt32BE(offset2);\n const lo32 = buffer.readUInt32BE(offset2 + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n const split2 = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeInt32BE(split2.hi32, offset2);\n buffer.writeUInt32BE(split2.lo32, offset2 + 4);\n return 8;\n }\n };\n exports3.NearInt64BE = NearInt64BE;\n var Float = class extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readFloatLE(offset2);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeFloatLE(src, offset2);\n return 4;\n }\n };\n exports3.Float = Float;\n var FloatBE = class extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readFloatBE(offset2);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeFloatBE(src, offset2);\n return 4;\n }\n };\n exports3.FloatBE = FloatBE;\n var Double = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readDoubleLE(offset2);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeDoubleLE(src, offset2);\n return 8;\n }\n };\n exports3.Double = Double;\n var DoubleBE = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readDoubleBE(offset2);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeDoubleBE(src, offset2);\n return 8;\n }\n };\n exports3.DoubleBE = DoubleBE;\n var Sequence = class extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError(\"elementLayout must be a Layout\");\n }\n if (!(count instanceof ExternalLayout && count.isCount() || Number.isInteger(count) && 0 <= count)) {\n throw new TypeError(\"count must be non-negative integer or an unsigned integer ExternalLayout\");\n }\n let span = -1;\n if (!(count instanceof ExternalLayout) && 0 < elementLayout.span) {\n span = count * elementLayout.span;\n }\n super(span, property);\n this.elementLayout = elementLayout;\n this.count = count;\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset2);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n } else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b, offset2 + span);\n ++idx;\n }\n }\n return span;\n }\n /** @override */\n decode(b, offset2 = 0) {\n const rv = [];\n let i = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset2);\n }\n while (i < count) {\n rv.push(this.elementLayout.decode(b, offset2));\n offset2 += this.elementLayout.getSpan(b, offset2);\n i += 1;\n }\n return rv;\n }\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset2 = 0) {\n const elo = this.elementLayout;\n const span = src.reduce((span2, v) => {\n return span2 + elo.encode(v, b, offset2 + span2);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b, offset2);\n }\n return span;\n }\n };\n exports3.Sequence = Sequence;\n var Structure = class extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields) && fields.reduce((acc, v) => acc && v instanceof Layout, true))) {\n throw new TypeError(\"fields must be array of Layout instances\");\n }\n if (\"boolean\" === typeof property && void 0 === decodePrefixes) {\n decodePrefixes = property;\n property = void 0;\n }\n for (const fd of fields) {\n if (0 > fd.span && void 0 === fd.property) {\n throw new Error(\"fields cannot contain unnamed variable-length layout\");\n }\n }\n let span = -1;\n try {\n span = fields.reduce((span2, fd) => span2 + fd.getSpan(), 0);\n } catch (e) {\n }\n super(span, property);\n this.fields = fields;\n this.decodePrefixes = !!decodePrefixes;\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span2, fd) => {\n const fsp = fd.getSpan(b, offset2);\n offset2 += fsp;\n return span2 + fsp;\n }, 0);\n } catch (e) {\n throw new RangeError(\"indeterminate span\");\n }\n return span;\n }\n /** @override */\n decode(b, offset2 = 0) {\n checkUint8Array(b);\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (void 0 !== fd.property) {\n dest[fd.property] = fd.decode(b, offset2);\n }\n offset2 += fd.getSpan(b, offset2);\n if (this.decodePrefixes && b.length === offset2) {\n break;\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset2 = 0) {\n const firstOffset = offset2;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = 0 < span ? span : 0;\n if (void 0 !== fd.property) {\n const fv = src[fd.property];\n if (void 0 !== fv) {\n lastWrote = fd.encode(fv, b, offset2);\n if (0 > span) {\n span = fd.getSpan(b, offset2);\n }\n }\n }\n lastOffset = offset2;\n offset2 += span;\n }\n return lastOffset + lastWrote - firstOffset;\n }\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (void 0 !== fd.property && 0 < values.length) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if (\"string\" !== typeof property) {\n throw new TypeError(\"property must be string\");\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return void 0;\n }\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if (\"string\" !== typeof property) {\n throw new TypeError(\"property must be string\");\n }\n let offset2 = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset2;\n }\n if (0 > fd.span) {\n offset2 = -1;\n } else if (0 <= offset2) {\n offset2 += fd.span;\n }\n }\n return void 0;\n }\n };\n exports3.Structure = Structure;\n var UnionDiscriminator = class {\n constructor(property) {\n this.property = property;\n }\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode(b, offset2) {\n throw new Error(\"UnionDiscriminator is abstract\");\n }\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode(src, b, offset2) {\n throw new Error(\"UnionDiscriminator is abstract\");\n }\n };\n exports3.UnionDiscriminator = UnionDiscriminator;\n var UnionLayoutDiscriminator = class extends UnionDiscriminator {\n constructor(layout, property) {\n if (!(layout instanceof ExternalLayout && layout.isCount())) {\n throw new TypeError(\"layout must be an unsigned integer ExternalLayout\");\n }\n super(property || layout.property || \"variant\");\n this.layout = layout;\n }\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset2) {\n return this.layout.decode(b, offset2);\n }\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset2) {\n return this.layout.encode(src, b, offset2);\n }\n };\n exports3.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\n var Union = class extends Layout {\n constructor(discr, defaultLayout, property) {\n let discriminator;\n if (discr instanceof UInt || discr instanceof UIntBE) {\n discriminator = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n } else if (discr instanceof ExternalLayout && discr.isCount()) {\n discriminator = new UnionLayoutDiscriminator(discr);\n } else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError(\"discr must be a UnionDiscriminator or an unsigned integer layout\");\n } else {\n discriminator = discr;\n }\n if (void 0 === defaultLayout) {\n defaultLayout = null;\n }\n if (!(null === defaultLayout || defaultLayout instanceof Layout)) {\n throw new TypeError(\"defaultLayout must be null or a Layout\");\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error(\"defaultLayout must have constant span\");\n }\n if (void 0 === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate(\"content\");\n }\n }\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if (0 <= span && (discr instanceof UInt || discr instanceof UIntBE)) {\n span += discriminator.layout.span;\n }\n }\n super(span, property);\n this.discriminator = discriminator;\n this.usesPrefixDiscriminator = discr instanceof UInt || discr instanceof UIntBE;\n this.defaultLayout = defaultLayout;\n this.registry = {};\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n this.getSourceVariant = function(src) {\n return boundGetSourceVariant(src);\n };\n this.configGetSourceVariant = function(gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n const vlo = this.getVariant(b, offset2);\n if (!vlo) {\n throw new Error(\"unable to determine span for unrecognized variant\");\n }\n return vlo.getSpan(b, offset2);\n }\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisfied rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (Object.prototype.hasOwnProperty.call(src, this.discriminator.property)) {\n if (this.defaultLayout && this.defaultLayout.property && Object.prototype.hasOwnProperty.call(src, this.defaultLayout.property)) {\n return void 0;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo && (!vlo.layout || vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property))) {\n return vlo;\n }\n } else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error(\"unable to infer src variant\");\n }\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset2 = 0) {\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset2);\n const clo = this.registry[discr];\n if (void 0 === clo) {\n const defaultLayout = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n dest[defaultLayout.property] = defaultLayout.decode(b, offset2 + contentOffset);\n } else {\n dest = clo.decode(b, offset2);\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset2 = 0) {\n const vlo = this.getSourceVariant(src);\n if (void 0 === vlo) {\n const dlo = this.discriminator;\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset2);\n return contentOffset + clo.encode(src[clo.property], b, offset2 + contentOffset);\n }\n return vlo.encode(src, b, offset2);\n }\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Uint8Array)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Uint8Array}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset2 = 0) {\n let variant;\n if (vb instanceof Uint8Array) {\n variant = this.discriminator.decode(vb, offset2);\n } else {\n variant = vb;\n }\n return this.registry[variant];\n }\n };\n exports3.Union = Union;\n var VariantLayout = class extends Layout {\n constructor(union2, variant, layout, property) {\n if (!(union2 instanceof Union)) {\n throw new TypeError(\"union must be a Union\");\n }\n if (!Number.isInteger(variant) || 0 > variant) {\n throw new TypeError(\"variant must be a (non-negative) integer\");\n }\n if (\"string\" === typeof layout && void 0 === property) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError(\"layout must be a Layout\");\n }\n if (null !== union2.defaultLayout && 0 <= layout.span && layout.span > union2.defaultLayout.span) {\n throw new Error(\"variant span exceeds span of containing union\");\n }\n if (\"string\" !== typeof property) {\n throw new TypeError(\"variant must have a String property\");\n }\n }\n let span = union2.span;\n if (0 > union2.span) {\n span = layout ? layout.span : 0;\n if (0 <= span && union2.usesPrefixDiscriminator) {\n span += union2.discriminator.layout.span;\n }\n }\n super(span, property);\n this.union = union2;\n this.variant = variant;\n this.layout = layout || null;\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n let span = 0;\n if (this.layout) {\n span = this.layout.getSpan(b, offset2 + contentOffset);\n }\n return contentOffset + span;\n }\n /** @override */\n decode(b, offset2 = 0) {\n const dest = this.makeDestinationObject();\n if (this !== this.union.getVariant(b, offset2)) {\n throw new Error(\"variant mismatch\");\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset2 + contentOffset);\n } else if (this.property) {\n dest[this.property] = true;\n } else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout && !Object.prototype.hasOwnProperty.call(src, this.property)) {\n throw new TypeError(\"variant lacks property \" + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset2);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset2 + contentOffset);\n span += this.layout.getSpan(b, offset2 + contentOffset);\n if (0 <= this.union.span && span > this.union.span) {\n throw new Error(\"encoded variant overruns containing union\");\n }\n }\n return span;\n }\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n return void 0;\n }\n };\n exports3.VariantLayout = VariantLayout;\n function fixBitwiseResult(v) {\n if (0 > v) {\n v += 4294967296;\n }\n return v;\n }\n var BitStructure = class extends Layout {\n constructor(word, msb, property) {\n if (!(word instanceof UInt || word instanceof UIntBE)) {\n throw new TypeError(\"word must be a UInt or UIntBE layout\");\n }\n if (\"string\" === typeof msb && void 0 === property) {\n property = msb;\n msb = false;\n }\n if (4 < word.span) {\n throw new RangeError(\"word cannot exceed 32 bits\");\n }\n super(word.span, property);\n this.word = word;\n this.msb = !!msb;\n this.fields = [];\n let value = 0;\n this._packedSetValue = function(v) {\n value = fixBitwiseResult(v);\n return this;\n };\n this._packedGetValue = function() {\n return value;\n };\n }\n /** @override */\n decode(b, offset2 = 0) {\n const dest = this.makeDestinationObject();\n const value = this.word.decode(b, offset2);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (void 0 !== fd.property) {\n dest[fd.property] = fd.decode(b);\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b, offset2 = 0) {\n const value = this.word.decode(b, offset2);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (void 0 !== fd.property) {\n const fv = src[fd.property];\n if (void 0 !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b, offset2);\n }\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n // `Boolean` conflicts with the native primitive type\n // eslint-disable-next-line @typescript-eslint/ban-types\n addBoolean(property) {\n const bf = new Boolean2(this, property);\n this.fields.push(bf);\n return bf;\n }\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if (\"string\" !== typeof property) {\n throw new TypeError(\"property must be string\");\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return void 0;\n }\n };\n exports3.BitStructure = BitStructure;\n var BitField = class {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError(\"container must be a BitStructure\");\n }\n if (!Number.isInteger(bits) || 0 >= bits) {\n throw new TypeError(\"bits must be positive integer\");\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if (bits + usedBits > totalBits) {\n throw new Error(\"bits too long for span remainder (\" + (totalBits - usedBits) + \" of \" + totalBits + \" remain)\");\n }\n this.container = container;\n this.bits = bits;\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) {\n this.valueMask = 4294967295;\n }\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n this.property = property;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode(b, offset2) {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if (\"number\" !== typeof value || !Number.isInteger(value) || value !== fixBitwiseResult(value & this.valueMask)) {\n throw new TypeError(nameWithProperty(\"BitField.encode\", this) + \" value must be integer not exceeding \" + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask) | wordValue);\n }\n };\n exports3.BitField = BitField;\n var Boolean2 = class extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b, offset2) {\n return !!super.decode(b, offset2);\n }\n /** @override */\n encode(value) {\n if (\"boolean\" === typeof value) {\n value = +value;\n }\n super.encode(value);\n }\n };\n exports3.Boolean = Boolean2;\n var Blob = class extends Layout {\n constructor(length, property) {\n if (!(length instanceof ExternalLayout && length.isCount() || Number.isInteger(length) && 0 <= length)) {\n throw new TypeError(\"length must be positive integer or an unsigned integer ExternalLayout\");\n }\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n this.length = length;\n }\n /** @override */\n getSpan(b, offset2) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset2);\n }\n return span;\n }\n /** @override */\n decode(b, offset2 = 0) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset2);\n }\n return uint8ArrayToBuffer(b).slice(offset2, offset2 + span);\n }\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset2) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(src instanceof Uint8Array && span === src.length)) {\n throw new TypeError(nameWithProperty(\"Blob.encode\", this) + \" requires (length \" + span + \") Uint8Array as src\");\n }\n if (offset2 + span > b.length) {\n throw new RangeError(\"encoding overruns Uint8Array\");\n }\n const srcBuffer = uint8ArrayToBuffer(src);\n uint8ArrayToBuffer(b).write(srcBuffer.toString(\"hex\"), offset2, span, \"hex\");\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset2);\n }\n return span;\n }\n };\n exports3.Blob = Blob;\n var CString = class extends Layout {\n constructor(property) {\n super(-1, property);\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n checkUint8Array(b);\n let idx = offset2;\n while (idx < b.length && 0 !== b[idx]) {\n idx += 1;\n }\n return 1 + idx - offset2;\n }\n /** @override */\n decode(b, offset2 = 0) {\n const span = this.getSpan(b, offset2);\n return uint8ArrayToBuffer(b).slice(offset2, offset2 + span - 1).toString(\"utf-8\");\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n if (\"string\" !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, \"utf8\");\n const span = srcb.length;\n if (offset2 + span > b.length) {\n throw new RangeError(\"encoding overruns Buffer\");\n }\n const buffer = uint8ArrayToBuffer(b);\n srcb.copy(buffer, offset2);\n buffer[offset2 + span] = 0;\n return span + 1;\n }\n };\n exports3.CString = CString;\n var UTF8 = class extends Layout {\n constructor(maxSpan, property) {\n if (\"string\" === typeof maxSpan && void 0 === property) {\n property = maxSpan;\n maxSpan = void 0;\n }\n if (void 0 === maxSpan) {\n maxSpan = -1;\n } else if (!Number.isInteger(maxSpan)) {\n throw new TypeError(\"maxSpan must be an integer\");\n }\n super(-1, property);\n this.maxSpan = maxSpan;\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n checkUint8Array(b);\n return b.length - offset2;\n }\n /** @override */\n decode(b, offset2 = 0) {\n const span = this.getSpan(b, offset2);\n if (0 <= this.maxSpan && this.maxSpan < span) {\n throw new RangeError(\"text length exceeds maxSpan\");\n }\n return uint8ArrayToBuffer(b).slice(offset2, offset2 + span).toString(\"utf-8\");\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n if (\"string\" !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, \"utf8\");\n const span = srcb.length;\n if (0 <= this.maxSpan && this.maxSpan < span) {\n throw new RangeError(\"text length exceeds maxSpan\");\n }\n if (offset2 + span > b.length) {\n throw new RangeError(\"encoding overruns Buffer\");\n }\n srcb.copy(uint8ArrayToBuffer(b), offset2);\n return span;\n }\n };\n exports3.UTF8 = UTF8;\n var Constant = class extends Layout {\n constructor(value, property) {\n super(0, property);\n this.value = value;\n }\n /** @override */\n decode(b, offset2) {\n return this.value;\n }\n /** @override */\n encode(src, b, offset2) {\n return 0;\n }\n };\n exports3.Constant = Constant;\n exports3.greedy = (elementSpan, property) => new GreedyCount(elementSpan, property);\n exports3.offset = (layout, offset2, property) => new OffsetLayout(layout, offset2, property);\n exports3.u8 = (property) => new UInt(1, property);\n exports3.u16 = (property) => new UInt(2, property);\n exports3.u24 = (property) => new UInt(3, property);\n exports3.u32 = (property) => new UInt(4, property);\n exports3.u40 = (property) => new UInt(5, property);\n exports3.u48 = (property) => new UInt(6, property);\n exports3.nu64 = (property) => new NearUInt64(property);\n exports3.u16be = (property) => new UIntBE(2, property);\n exports3.u24be = (property) => new UIntBE(3, property);\n exports3.u32be = (property) => new UIntBE(4, property);\n exports3.u40be = (property) => new UIntBE(5, property);\n exports3.u48be = (property) => new UIntBE(6, property);\n exports3.nu64be = (property) => new NearUInt64BE(property);\n exports3.s8 = (property) => new Int(1, property);\n exports3.s16 = (property) => new Int(2, property);\n exports3.s24 = (property) => new Int(3, property);\n exports3.s32 = (property) => new Int(4, property);\n exports3.s40 = (property) => new Int(5, property);\n exports3.s48 = (property) => new Int(6, property);\n exports3.ns64 = (property) => new NearInt64(property);\n exports3.s16be = (property) => new IntBE(2, property);\n exports3.s24be = (property) => new IntBE(3, property);\n exports3.s32be = (property) => new IntBE(4, property);\n exports3.s40be = (property) => new IntBE(5, property);\n exports3.s48be = (property) => new IntBE(6, property);\n exports3.ns64be = (property) => new NearInt64BE(property);\n exports3.f32 = (property) => new Float(property);\n exports3.f32be = (property) => new FloatBE(property);\n exports3.f64 = (property) => new Double(property);\n exports3.f64be = (property) => new DoubleBE(property);\n exports3.struct = (fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes);\n exports3.bits = (word, msb, property) => new BitStructure(word, msb, property);\n exports3.seq = (elementLayout, count, property) => new Sequence(elementLayout, count, property);\n exports3.union = (discr, defaultLayout, property) => new Union(discr, defaultLayout, property);\n exports3.unionLayoutDiscriminator = (layout, property) => new UnionLayoutDiscriminator(layout, property);\n exports3.blob = (length, property) => new Blob(length, property);\n exports3.cstr = (property) => new CString(property);\n exports3.utf8 = (maxSpan, property) => new UTF8(maxSpan, property);\n exports3.constant = (value, property) => new Constant(value, property);\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js\n function rng() {\n if (!getRandomValues) {\n getRandomValues = typeof crypto !== \"undefined\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== \"undefined\" && typeof msCrypto.getRandomValues === \"function\" && msCrypto.getRandomValues.bind(msCrypto);\n if (!getRandomValues) {\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n }\n }\n return getRandomValues(rnds8);\n }\n var getRandomValues, rnds8;\n var init_rng = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n rnds8 = new Uint8Array(16);\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js\n var regex_default;\n var init_regex = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js\n function validate2(uuid) {\n return typeof uuid === \"string\" && regex_default.test(uuid);\n }\n var validate_default;\n var init_validate = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n validate_default = validate2;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js\n function stringify(arr) {\n var offset2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;\n var uuid = (byteToHex[arr[offset2 + 0]] + byteToHex[arr[offset2 + 1]] + byteToHex[arr[offset2 + 2]] + byteToHex[arr[offset2 + 3]] + \"-\" + byteToHex[arr[offset2 + 4]] + byteToHex[arr[offset2 + 5]] + \"-\" + byteToHex[arr[offset2 + 6]] + byteToHex[arr[offset2 + 7]] + \"-\" + byteToHex[arr[offset2 + 8]] + byteToHex[arr[offset2 + 9]] + \"-\" + byteToHex[arr[offset2 + 10]] + byteToHex[arr[offset2 + 11]] + byteToHex[arr[offset2 + 12]] + byteToHex[arr[offset2 + 13]] + byteToHex[arr[offset2 + 14]] + byteToHex[arr[offset2 + 15]]).toLowerCase();\n if (!validate_default(uuid)) {\n throw TypeError(\"Stringified UUID is invalid\");\n }\n return uuid;\n }\n var byteToHex, i, stringify_default;\n var init_stringify = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_validate();\n byteToHex = [];\n for (i = 0; i < 256; ++i) {\n byteToHex.push((i + 256).toString(16).substr(1));\n }\n stringify_default = stringify;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js\n function v1(options, buf, offset2) {\n var i = buf && offset2 || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq;\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n if (node == null) {\n node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n if (clockseq == null) {\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383;\n }\n }\n var msecs = options.msecs !== void 0 ? options.msecs : Date.now();\n var nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1;\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;\n if (dt < 0 && options.clockseq === void 0) {\n clockseq = clockseq + 1 & 16383;\n }\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) {\n nsecs = 0;\n }\n if (nsecs >= 1e4) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n msecs += 122192928e5;\n var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;\n b[i++] = tl >>> 24 & 255;\n b[i++] = tl >>> 16 & 255;\n b[i++] = tl >>> 8 & 255;\n b[i++] = tl & 255;\n var tmh = msecs / 4294967296 * 1e4 & 268435455;\n b[i++] = tmh >>> 8 & 255;\n b[i++] = tmh & 255;\n b[i++] = tmh >>> 24 & 15 | 16;\n b[i++] = tmh >>> 16 & 255;\n b[i++] = clockseq >>> 8 | 128;\n b[i++] = clockseq & 255;\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n return buf || stringify_default(b);\n }\n var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default;\n var init_v1 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_rng();\n init_stringify();\n _lastMSecs = 0;\n _lastNSecs = 0;\n v1_default = v1;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js\n function parse(uuid) {\n if (!validate_default(uuid)) {\n throw TypeError(\"Invalid UUID\");\n }\n var v;\n var arr = new Uint8Array(16);\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 255;\n arr[2] = v >>> 8 & 255;\n arr[3] = v & 255;\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 255;\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 255;\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 255;\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255;\n arr[11] = v / 4294967296 & 255;\n arr[12] = v >>> 24 & 255;\n arr[13] = v >>> 16 & 255;\n arr[14] = v >>> 8 & 255;\n arr[15] = v & 255;\n return arr;\n }\n var parse_default;\n var init_parse = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_validate();\n parse_default = parse;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js\n function stringToBytes(str) {\n str = unescape(encodeURIComponent(str));\n var bytes = [];\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n return bytes;\n }\n function v35_default(name, version2, hashfunc) {\n function generateUUID(value, namespace, buf, offset2) {\n if (typeof value === \"string\") {\n value = stringToBytes(value);\n }\n if (typeof namespace === \"string\") {\n namespace = parse_default(namespace);\n }\n if (namespace.length !== 16) {\n throw TypeError(\"Namespace must be array-like (16 iterable integer values, 0-255)\");\n }\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 15 | version2;\n bytes[8] = bytes[8] & 63 | 128;\n if (buf) {\n offset2 = offset2 || 0;\n for (var i = 0; i < 16; ++i) {\n buf[offset2 + i] = bytes[i];\n }\n return buf;\n }\n return stringify_default(bytes);\n }\n try {\n generateUUID.name = name;\n } catch (err) {\n }\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n }\n var DNS, URL;\n var init_v35 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n init_parse();\n DNS = \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\";\n URL = \"6ba7b811-9dad-11d1-80b4-00c04fd430c8\";\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js\n function md5(bytes) {\n if (typeof bytes === \"string\") {\n var msg = unescape(encodeURIComponent(bytes));\n bytes = new Uint8Array(msg.length);\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n }\n function md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = \"0123456789abcdef\";\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 255;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 15) + hexTab.charAt(x & 15), 16);\n output.push(hex);\n }\n return output;\n }\n function getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n }\n function wordsToMd5(x, len) {\n x[len >> 5] |= 128 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n return [a, b, c, d];\n }\n function bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 255) << i % 32;\n }\n return output;\n }\n function safeAdd(x, y) {\n var lsw = (x & 65535) + (y & 65535);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 65535;\n }\n function bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n }\n function md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n }\n function md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n }\n function md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n }\n function md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n }\n function md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n }\n var md5_default;\n var init_md5 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n md5_default = md5;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js\n var v3, v3_default;\n var init_v3 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v35();\n init_md5();\n v3 = v35_default(\"v3\", 48, md5_default);\n v3_default = v3;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js\n function v4(options, buf, offset2) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)();\n rnds[6] = rnds[6] & 15 | 64;\n rnds[8] = rnds[8] & 63 | 128;\n if (buf) {\n offset2 = offset2 || 0;\n for (var i = 0; i < 16; ++i) {\n buf[offset2 + i] = rnds[i];\n }\n return buf;\n }\n return stringify_default(rnds);\n }\n var v4_default;\n var init_v4 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_rng();\n init_stringify();\n v4_default = v4;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js\n function f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n case 1:\n return x ^ y ^ z;\n case 2:\n return x & y ^ x & z ^ y & z;\n case 3:\n return x ^ y ^ z;\n }\n }\n function ROTL(x, n) {\n return x << n | x >>> 32 - n;\n }\n function sha1(bytes) {\n var K = [1518500249, 1859775393, 2400959708, 3395469782];\n var H = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];\n if (typeof bytes === \"string\") {\n var msg = unescape(encodeURIComponent(bytes));\n bytes = [];\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n bytes = Array.prototype.slice.call(bytes);\n }\n bytes.push(128);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n M[_i] = arr;\n }\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 4294967295;\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n return [H[0] >> 24 & 255, H[0] >> 16 & 255, H[0] >> 8 & 255, H[0] & 255, H[1] >> 24 & 255, H[1] >> 16 & 255, H[1] >> 8 & 255, H[1] & 255, H[2] >> 24 & 255, H[2] >> 16 & 255, H[2] >> 8 & 255, H[2] & 255, H[3] >> 24 & 255, H[3] >> 16 & 255, H[3] >> 8 & 255, H[3] & 255, H[4] >> 24 & 255, H[4] >> 16 & 255, H[4] >> 8 & 255, H[4] & 255];\n }\n var sha1_default;\n var init_sha1 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n sha1_default = sha1;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js\n var v5, v5_default;\n var init_v5 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v35();\n init_sha1();\n v5 = v35_default(\"v5\", 80, sha1_default);\n v5_default = v5;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js\n var nil_default;\n var init_nil = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n nil_default = \"00000000-0000-0000-0000-000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js\n function version(uuid) {\n if (!validate_default(uuid)) {\n throw TypeError(\"Invalid UUID\");\n }\n return parseInt(uuid.substr(14, 1), 16);\n }\n var version_default;\n var init_version = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_validate();\n version_default = version;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/index.js\n var esm_browser_exports = {};\n __export(esm_browser_exports, {\n NIL: () => nil_default,\n parse: () => parse_default,\n stringify: () => stringify_default,\n v1: () => v1_default,\n v3: () => v3_default,\n v4: () => v4_default,\n v5: () => v5_default,\n validate: () => validate_default,\n version: () => version_default\n });\n var init_esm_browser = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v1();\n init_v3();\n init_v4();\n init_v5();\n init_nil();\n init_version();\n init_validate();\n init_stringify();\n init_parse();\n }\n });\n\n // ../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/generateRequest.js\n var require_generateRequest = __commonJS({\n \"../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/generateRequest.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var uuid = (init_esm_browser(), __toCommonJS(esm_browser_exports)).v4;\n var generateRequest = function(method, params, id, options) {\n if (typeof method !== \"string\") {\n throw new TypeError(method + \" must be a string\");\n }\n options = options || {};\n const version2 = typeof options.version === \"number\" ? options.version : 2;\n if (version2 !== 1 && version2 !== 2) {\n throw new TypeError(version2 + \" must be 1 or 2\");\n }\n const request = {\n method\n };\n if (version2 === 2) {\n request.jsonrpc = \"2.0\";\n }\n if (params) {\n if (typeof params !== \"object\" && !Array.isArray(params)) {\n throw new TypeError(params + \" must be an object, array or omitted\");\n }\n request.params = params;\n }\n if (typeof id === \"undefined\") {\n const generator = typeof options.generator === \"function\" ? options.generator : function() {\n return uuid();\n };\n request.id = generator(request, options);\n } else if (version2 === 2 && id === null) {\n if (options.notificationIdNull) {\n request.id = null;\n }\n } else {\n request.id = id;\n }\n return request;\n };\n module.exports = generateRequest;\n }\n });\n\n // ../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/client/browser/index.js\n var require_browser = __commonJS({\n \"../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/client/browser/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var uuid = (init_esm_browser(), __toCommonJS(esm_browser_exports)).v4;\n var generateRequest = require_generateRequest();\n var ClientBrowser = function(callServer, options) {\n if (!(this instanceof ClientBrowser)) {\n return new ClientBrowser(callServer, options);\n }\n if (!options) {\n options = {};\n }\n this.options = {\n reviver: typeof options.reviver !== \"undefined\" ? options.reviver : null,\n replacer: typeof options.replacer !== \"undefined\" ? options.replacer : null,\n generator: typeof options.generator !== \"undefined\" ? options.generator : function() {\n return uuid();\n },\n version: typeof options.version !== \"undefined\" ? options.version : 2,\n notificationIdNull: typeof options.notificationIdNull === \"boolean\" ? options.notificationIdNull : false\n };\n this.callServer = callServer;\n };\n module.exports = ClientBrowser;\n ClientBrowser.prototype.request = function(method, params, id, callback) {\n const self = this;\n let request = null;\n const isBatch = Array.isArray(method) && typeof params === \"function\";\n if (this.options.version === 1 && isBatch) {\n throw new TypeError(\"JSON-RPC 1.0 does not support batching\");\n }\n const isRaw = !isBatch && method && typeof method === \"object\" && typeof params === \"function\";\n if (isBatch || isRaw) {\n callback = params;\n request = method;\n } else {\n if (typeof id === \"function\") {\n callback = id;\n id = void 0;\n }\n const hasCallback = typeof callback === \"function\";\n try {\n request = generateRequest(method, params, id, {\n generator: this.options.generator,\n version: this.options.version,\n notificationIdNull: this.options.notificationIdNull\n });\n } catch (err) {\n if (hasCallback) {\n return callback(err);\n }\n throw err;\n }\n if (!hasCallback) {\n return request;\n }\n }\n let message;\n try {\n message = JSON.stringify(request, this.options.replacer);\n } catch (err) {\n return callback(err);\n }\n this.callServer(message, function(err, response) {\n self._parseResponse(err, response, callback);\n });\n return request;\n };\n ClientBrowser.prototype._parseResponse = function(err, responseText, callback) {\n if (err) {\n callback(err);\n return;\n }\n if (!responseText) {\n return callback();\n }\n let response;\n try {\n response = JSON.parse(responseText, this.options.reviver);\n } catch (err2) {\n return callback(err2);\n }\n if (callback.length === 3) {\n if (Array.isArray(response)) {\n const isError = function(res) {\n return typeof res.error !== \"undefined\";\n };\n const isNotError = function(res) {\n return !isError(res);\n };\n return callback(null, response.filter(isError), response.filter(isNotError));\n } else {\n return callback(null, response.error, response.result);\n }\n }\n callback(null, response);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js\n var require_eventemitter3 = __commonJS({\n \"../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var has = Object.prototype.hasOwnProperty;\n var prefix = \"~\";\n function Events() {\n }\n if (Object.create) {\n Events.prototype = /* @__PURE__ */ Object.create(null);\n if (!new Events().__proto__)\n prefix = false;\n }\n function EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n }\n function addListener(emitter, event, fn, context, once) {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"The listener must be a function\");\n }\n var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event;\n if (!emitter._events[evt])\n emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn)\n emitter._events[evt].push(listener);\n else\n emitter._events[evt] = [emitter._events[evt], listener];\n return emitter;\n }\n function clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0)\n emitter._events = new Events();\n else\n delete emitter._events[evt];\n }\n function EventEmitter2() {\n this._events = new Events();\n this._eventsCount = 0;\n }\n EventEmitter2.prototype.eventNames = function eventNames() {\n var names = [], events, name;\n if (this._eventsCount === 0)\n return names;\n for (name in events = this._events) {\n if (has.call(events, name))\n names.push(prefix ? name.slice(1) : name);\n }\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n return names;\n };\n EventEmitter2.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event, handlers = this._events[evt];\n if (!handlers)\n return [];\n if (handlers.fn)\n return [handlers.fn];\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n return ee;\n };\n EventEmitter2.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event, listeners = this._events[evt];\n if (!listeners)\n return 0;\n if (listeners.fn)\n return 1;\n return listeners.length;\n };\n EventEmitter2.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n if (!this._events[evt])\n return false;\n var listeners = this._events[evt], len = arguments.length, args, i;\n if (listeners.fn) {\n if (listeners.once)\n this.removeListener(event, listeners.fn, void 0, true);\n switch (len) {\n case 1:\n return listeners.fn.call(listeners.context), true;\n case 2:\n return listeners.fn.call(listeners.context, a1), true;\n case 3:\n return listeners.fn.call(listeners.context, a1, a2), true;\n case 4:\n return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5:\n return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6:\n return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n for (i = 1, args = new Array(len - 1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length, j;\n for (i = 0; i < length; i++) {\n if (listeners[i].once)\n this.removeListener(event, listeners[i].fn, void 0, true);\n switch (len) {\n case 1:\n listeners[i].fn.call(listeners[i].context);\n break;\n case 2:\n listeners[i].fn.call(listeners[i].context, a1);\n break;\n case 3:\n listeners[i].fn.call(listeners[i].context, a1, a2);\n break;\n case 4:\n listeners[i].fn.call(listeners[i].context, a1, a2, a3);\n break;\n default:\n if (!args)\n for (j = 1, args = new Array(len - 1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n return true;\n };\n EventEmitter2.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n };\n EventEmitter2.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n };\n EventEmitter2.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n if (!this._events[evt])\n return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n var listeners = this._events[evt];\n if (listeners.fn) {\n if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) {\n events.push(listeners[i]);\n }\n }\n if (events.length)\n this._events[evt] = events.length === 1 ? events[0] : events;\n else\n clearEvent(this, evt);\n }\n return this;\n };\n EventEmitter2.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt])\n clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n return this;\n };\n EventEmitter2.prototype.off = EventEmitter2.prototype.removeListener;\n EventEmitter2.prototype.addListener = EventEmitter2.prototype.on;\n EventEmitter2.prefixed = prefix;\n EventEmitter2.EventEmitter = EventEmitter2;\n if (\"undefined\" !== typeof module) {\n module.exports = EventEmitter2;\n }\n }\n });\n\n // src/lib/lit-actions/self-executing-actions/solana/generateEncryptedSolanaPrivateKey.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/lit-actions/litActionHandler.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/lit-actions/abortError.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var AbortError = class extends Error {\n name = \"AbortError\";\n };\n\n // src/lib/lit-actions/litActionHandler.ts\n async function litActionHandler(actionFunc) {\n try {\n const litActionResult = await actionFunc();\n const response = typeof litActionResult === \"string\" ? litActionResult : JSON.stringify(litActionResult);\n Lit.Actions.setResponse({ response });\n } catch (err) {\n if (err instanceof AbortError) {\n return;\n }\n Lit.Actions.setResponse({ response: `Error: ${err.message}` });\n }\n }\n\n // src/lib/lit-actions/raw-action-functions/solana/generateEncryptedSolanaPrivateKey.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/lit-actions/internal/common/encryptKey.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/constants.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var LIT_PREFIX = \"lit_\";\n\n // src/lib/lit-actions/internal/common/encryptKey.ts\n async function encryptPrivateKey({\n accessControlConditions: accessControlConditions2,\n privateKey,\n publicKey: publicKey2\n }) {\n const { ciphertext, dataToEncryptHash } = await Lit.Actions.encrypt({\n accessControlConditions: accessControlConditions2,\n to_encrypt: new TextEncoder().encode(LIT_PREFIX + privateKey)\n });\n return {\n ciphertext,\n dataToEncryptHash,\n publicKey: publicKey2\n };\n }\n\n // src/lib/lit-actions/internal/solana/generatePrivateKey.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n init_dirname();\n init_buffer2();\n init_process2();\n init_buffer();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/ed25519.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/crypto.js\n init_dirname();\n init_buffer2();\n init_process2();\n var crypto2 = typeof globalThis === \"object\" && \"crypto\" in globalThis ? globalThis.crypto : void 0;\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js\n function isBytes(a) {\n return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === \"Uint8Array\";\n }\n function anumber(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(\"positive integer expected, got \" + n);\n }\n function abytes(b, ...lengths) {\n if (!isBytes(b))\n throw new Error(\"Uint8Array expected\");\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(\"Uint8Array expected of length \" + lengths + \", got length=\" + b.length);\n }\n function ahash(h) {\n if (typeof h !== \"function\" || typeof h.create !== \"function\")\n throw new Error(\"Hash should be wrapped by utils.createHasher\");\n anumber(h.outputLen);\n anumber(h.blockLen);\n }\n function aexists(instance2, checkFinished = true) {\n if (instance2.destroyed)\n throw new Error(\"Hash instance has been destroyed\");\n if (checkFinished && instance2.finished)\n throw new Error(\"Hash#digest() has already been called\");\n }\n function aoutput(out, instance2) {\n abytes(out);\n const min = instance2.outputLen;\n if (out.length < min) {\n throw new Error(\"digestInto() expects output buffer of length at least \" + min);\n }\n }\n function u32(arr) {\n return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n }\n function clean(...arrays) {\n for (let i = 0; i < arrays.length; i++) {\n arrays[i].fill(0);\n }\n }\n function createView(arr) {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n }\n function rotr(word, shift) {\n return word << 32 - shift | word >>> shift;\n }\n var isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();\n function byteSwap(word) {\n return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;\n }\n function byteSwap32(arr) {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = byteSwap(arr[i]);\n }\n return arr;\n }\n var swap32IfBE = isLE ? (u) => u : byteSwap32;\n var hasHexBuiltin = /* @__PURE__ */ (() => (\n // @ts-ignore\n typeof Uint8Array.from([]).toHex === \"function\" && typeof Uint8Array.fromHex === \"function\"\n ))();\n var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, \"0\"));\n function bytesToHex(bytes) {\n abytes(bytes);\n if (hasHexBuiltin)\n return bytes.toHex();\n let hex = \"\";\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n }\n var asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\n function asciiToBase16(ch) {\n if (ch >= asciis._0 && ch <= asciis._9)\n return ch - asciis._0;\n if (ch >= asciis.A && ch <= asciis.F)\n return ch - (asciis.A - 10);\n if (ch >= asciis.a && ch <= asciis.f)\n return ch - (asciis.a - 10);\n return;\n }\n function hexToBytes(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n if (hasHexBuiltin)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error(\"hex string expected, got unpadded hex of length \" + hl);\n const array2 = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === void 0 || n2 === void 0) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array2[ai] = n1 * 16 + n2;\n }\n return array2;\n }\n function utf8ToBytes(str) {\n if (typeof str !== \"string\")\n throw new Error(\"string expected\");\n return new Uint8Array(new TextEncoder().encode(str));\n }\n function toBytes(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes(data);\n abytes(data);\n return data;\n }\n function concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n abytes(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n }\n var Hash = class {\n };\n function createHasher(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n }\n function randomBytes(bytesLength = 32) {\n if (crypto2 && typeof crypto2.getRandomValues === \"function\") {\n return crypto2.getRandomValues(new Uint8Array(bytesLength));\n }\n if (crypto2 && typeof crypto2.randomBytes === \"function\") {\n return Uint8Array.from(crypto2.randomBytes(bytesLength));\n }\n throw new Error(\"crypto.getRandomValues must be defined\");\n }\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js\n function setBigUint64(view, byteOffset, value, isLE2) {\n if (typeof view.setBigUint64 === \"function\")\n return view.setBigUint64(byteOffset, value, isLE2);\n const _32n2 = BigInt(32);\n const _u32_max = BigInt(4294967295);\n const wh = Number(value >> _32n2 & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE2 ? 4 : 0;\n const l = isLE2 ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE2);\n view.setUint32(byteOffset + l, wl, isLE2);\n }\n function Chi(a, b, c) {\n return a & b ^ ~a & c;\n }\n function Maj(a, b, c) {\n return a & b ^ a & c ^ b & c;\n }\n var HashMD = class extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE2) {\n super();\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE2;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n aexists(this);\n data = toBytes(data);\n abytes(data);\n const { view, buffer, blockLen } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n aexists(this);\n aoutput(out, this);\n this.finished = true;\n const { buffer, view, blockLen, isLE: isLE2 } = this;\n let { pos } = this;\n buffer[pos++] = 128;\n clean(this.buffer.subarray(pos));\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE2);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n if (len % 4)\n throw new Error(\"_sha2: outputLen should be aligned to 32bit\");\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error(\"_sha2: outputLen bigger than state\");\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE2);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.destroyed = destroyed;\n to.finished = finished;\n to.length = length;\n to.pos = pos;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n };\n var SHA256_IV = /* @__PURE__ */ Uint32Array.from([\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ]);\n var SHA512_IV = /* @__PURE__ */ Uint32Array.from([\n 1779033703,\n 4089235720,\n 3144134277,\n 2227873595,\n 1013904242,\n 4271175723,\n 2773480762,\n 1595750129,\n 1359893119,\n 2917565137,\n 2600822924,\n 725511199,\n 528734635,\n 4215389547,\n 1541459225,\n 327033209\n ]);\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js\n init_dirname();\n init_buffer2();\n init_process2();\n var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\n var _32n = /* @__PURE__ */ BigInt(32);\n function fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };\n return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n }\n function split(lst, le = false) {\n const len = lst.length;\n let Ah = new Uint32Array(len);\n let Al = new Uint32Array(len);\n for (let i = 0; i < len; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n }\n var shrSH = (h, _l, s) => h >>> s;\n var shrSL = (h, l, s) => h << 32 - s | l >>> s;\n var rotrSH = (h, l, s) => h >>> s | l << 32 - s;\n var rotrSL = (h, l, s) => h << 32 - s | l >>> s;\n var rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;\n var rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;\n var rotlSH = (h, l, s) => h << s | l >>> 32 - s;\n var rotlSL = (h, l, s) => l << s | h >>> 32 - s;\n var rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;\n var rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;\n function add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: Ah + Bh + (l / 2 ** 32 | 0) | 0, l: l | 0 };\n }\n var add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\n var add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;\n var add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\n var add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;\n var add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\n var add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js\n var SHA256_K = /* @__PURE__ */ Uint32Array.from([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n var SHA256_W = /* @__PURE__ */ new Uint32Array(64);\n var SHA256 = class extends HashMD {\n constructor(outputLen = 32) {\n super(64, outputLen, 8, false);\n this.A = SHA256_IV[0] | 0;\n this.B = SHA256_IV[1] | 0;\n this.C = SHA256_IV[2] | 0;\n this.D = SHA256_IV[3] | 0;\n this.E = SHA256_IV[4] | 0;\n this.F = SHA256_IV[5] | 0;\n this.G = SHA256_IV[6] | 0;\n this.H = SHA256_IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset2) {\n for (let i = 0; i < 16; i++, offset2 += 4)\n SHA256_W[i] = view.getUint32(offset2, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ W15 >>> 3;\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ W2 >>> 10;\n SHA256_W[i] = s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16] | 0;\n }\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i] | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = sigma0 + Maj(A, B, C) | 0;\n H = G;\n G = F;\n F = E;\n E = D + T1 | 0;\n D = C;\n C = B;\n B = A;\n A = T1 + T2 | 0;\n }\n A = A + this.A | 0;\n B = B + this.B | 0;\n C = C + this.C | 0;\n D = D + this.D | 0;\n E = E + this.E | 0;\n F = F + this.F | 0;\n G = G + this.G | 0;\n H = H + this.H | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n clean(SHA256_W);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n clean(this.buffer);\n }\n };\n var K512 = /* @__PURE__ */ (() => split([\n \"0x428a2f98d728ae22\",\n \"0x7137449123ef65cd\",\n \"0xb5c0fbcfec4d3b2f\",\n \"0xe9b5dba58189dbbc\",\n \"0x3956c25bf348b538\",\n \"0x59f111f1b605d019\",\n \"0x923f82a4af194f9b\",\n \"0xab1c5ed5da6d8118\",\n \"0xd807aa98a3030242\",\n \"0x12835b0145706fbe\",\n \"0x243185be4ee4b28c\",\n \"0x550c7dc3d5ffb4e2\",\n \"0x72be5d74f27b896f\",\n \"0x80deb1fe3b1696b1\",\n \"0x9bdc06a725c71235\",\n \"0xc19bf174cf692694\",\n \"0xe49b69c19ef14ad2\",\n \"0xefbe4786384f25e3\",\n \"0x0fc19dc68b8cd5b5\",\n \"0x240ca1cc77ac9c65\",\n \"0x2de92c6f592b0275\",\n \"0x4a7484aa6ea6e483\",\n \"0x5cb0a9dcbd41fbd4\",\n \"0x76f988da831153b5\",\n \"0x983e5152ee66dfab\",\n \"0xa831c66d2db43210\",\n \"0xb00327c898fb213f\",\n \"0xbf597fc7beef0ee4\",\n \"0xc6e00bf33da88fc2\",\n \"0xd5a79147930aa725\",\n \"0x06ca6351e003826f\",\n \"0x142929670a0e6e70\",\n \"0x27b70a8546d22ffc\",\n \"0x2e1b21385c26c926\",\n \"0x4d2c6dfc5ac42aed\",\n \"0x53380d139d95b3df\",\n \"0x650a73548baf63de\",\n \"0x766a0abb3c77b2a8\",\n \"0x81c2c92e47edaee6\",\n \"0x92722c851482353b\",\n \"0xa2bfe8a14cf10364\",\n \"0xa81a664bbc423001\",\n \"0xc24b8b70d0f89791\",\n \"0xc76c51a30654be30\",\n \"0xd192e819d6ef5218\",\n \"0xd69906245565a910\",\n \"0xf40e35855771202a\",\n \"0x106aa07032bbd1b8\",\n \"0x19a4c116b8d2d0c8\",\n \"0x1e376c085141ab53\",\n \"0x2748774cdf8eeb99\",\n \"0x34b0bcb5e19b48a8\",\n \"0x391c0cb3c5c95a63\",\n \"0x4ed8aa4ae3418acb\",\n \"0x5b9cca4f7763e373\",\n \"0x682e6ff3d6b2b8a3\",\n \"0x748f82ee5defb2fc\",\n \"0x78a5636f43172f60\",\n \"0x84c87814a1f0ab72\",\n \"0x8cc702081a6439ec\",\n \"0x90befffa23631e28\",\n \"0xa4506cebde82bde9\",\n \"0xbef9a3f7b2c67915\",\n \"0xc67178f2e372532b\",\n \"0xca273eceea26619c\",\n \"0xd186b8c721c0c207\",\n \"0xeada7dd6cde0eb1e\",\n \"0xf57d4f7fee6ed178\",\n \"0x06f067aa72176fba\",\n \"0x0a637dc5a2c898a6\",\n \"0x113f9804bef90dae\",\n \"0x1b710b35131c471b\",\n \"0x28db77f523047d84\",\n \"0x32caab7b40c72493\",\n \"0x3c9ebe0a15c9bebc\",\n \"0x431d67c49c100d4c\",\n \"0x4cc5d4becb3e42b6\",\n \"0x597f299cfc657e2a\",\n \"0x5fcb6fab3ad6faec\",\n \"0x6c44198c4a475817\"\n ].map((n) => BigInt(n))))();\n var SHA512_Kh = /* @__PURE__ */ (() => K512[0])();\n var SHA512_Kl = /* @__PURE__ */ (() => K512[1])();\n var SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);\n var SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);\n var SHA512 = class extends HashMD {\n constructor(outputLen = 64) {\n super(128, outputLen, 16, false);\n this.Ah = SHA512_IV[0] | 0;\n this.Al = SHA512_IV[1] | 0;\n this.Bh = SHA512_IV[2] | 0;\n this.Bl = SHA512_IV[3] | 0;\n this.Ch = SHA512_IV[4] | 0;\n this.Cl = SHA512_IV[5] | 0;\n this.Dh = SHA512_IV[6] | 0;\n this.Dl = SHA512_IV[7] | 0;\n this.Eh = SHA512_IV[8] | 0;\n this.El = SHA512_IV[9] | 0;\n this.Fh = SHA512_IV[10] | 0;\n this.Fl = SHA512_IV[11] | 0;\n this.Gh = SHA512_IV[12] | 0;\n this.Gl = SHA512_IV[13] | 0;\n this.Hh = SHA512_IV[14] | 0;\n this.Hl = SHA512_IV[15] | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset2) {\n for (let i = 0; i < 16; i++, offset2 += 4) {\n SHA512_W_H[i] = view.getUint32(offset2);\n SHA512_W_L[i] = view.getUint32(offset2 += 4);\n }\n for (let i = 16; i < 80; i++) {\n const W15h = SHA512_W_H[i - 15] | 0;\n const W15l = SHA512_W_L[i - 15] | 0;\n const s0h = rotrSH(W15h, W15l, 1) ^ rotrSH(W15h, W15l, 8) ^ shrSH(W15h, W15l, 7);\n const s0l = rotrSL(W15h, W15l, 1) ^ rotrSL(W15h, W15l, 8) ^ shrSL(W15h, W15l, 7);\n const W2h = SHA512_W_H[i - 2] | 0;\n const W2l = SHA512_W_L[i - 2] | 0;\n const s1h = rotrSH(W2h, W2l, 19) ^ rotrBH(W2h, W2l, 61) ^ shrSH(W2h, W2l, 6);\n const s1l = rotrSL(W2h, W2l, 19) ^ rotrBL(W2h, W2l, 61) ^ shrSL(W2h, W2l, 6);\n const SUMl = add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);\n const SUMh = add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);\n SHA512_W_H[i] = SUMh | 0;\n SHA512_W_L[i] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n for (let i = 0; i < 80; i++) {\n const sigma1h = rotrSH(Eh, El, 14) ^ rotrSH(Eh, El, 18) ^ rotrBH(Eh, El, 41);\n const sigma1l = rotrSL(Eh, El, 14) ^ rotrSL(Eh, El, 18) ^ rotrBL(Eh, El, 41);\n const CHIh = Eh & Fh ^ ~Eh & Gh;\n const CHIl = El & Fl ^ ~El & Gl;\n const T1ll = add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);\n const T1h = add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);\n const T1l = T1ll | 0;\n const sigma0h = rotrSH(Ah, Al, 28) ^ rotrBH(Ah, Al, 34) ^ rotrBH(Ah, Al, 39);\n const sigma0l = rotrSL(Ah, Al, 28) ^ rotrBL(Ah, Al, 34) ^ rotrBL(Ah, Al, 39);\n const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;\n const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = add3L(T1l, sigma0l, MAJl);\n Ah = add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n ({ h: Ah, l: Al } = add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n clean(SHA512_W_H, SHA512_W_L);\n }\n destroy() {\n clean(this.buffer);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n };\n var sha256 = /* @__PURE__ */ createHasher(() => new SHA256());\n var sha512 = /* @__PURE__ */ createHasher(() => new SHA512());\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/curve.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/utils.js\n init_dirname();\n init_buffer2();\n init_process2();\n var _0n = /* @__PURE__ */ BigInt(0);\n var _1n = /* @__PURE__ */ BigInt(1);\n function _abool2(value, title = \"\") {\n if (typeof value !== \"boolean\") {\n const prefix = title && `\"${title}\"`;\n throw new Error(prefix + \"expected boolean, got type=\" + typeof value);\n }\n return value;\n }\n function _abytes2(value, length, title = \"\") {\n const bytes = isBytes(value);\n const len = value?.length;\n const needsLen = length !== void 0;\n if (!bytes || needsLen && len !== length) {\n const prefix = title && `\"${title}\" `;\n const ofLen = needsLen ? ` of length ${length}` : \"\";\n const got = bytes ? `length=${len}` : `type=${typeof value}`;\n throw new Error(prefix + \"expected Uint8Array\" + ofLen + \", got \" + got);\n }\n return value;\n }\n function numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? \"0\" + hex : hex;\n }\n function hexToNumber(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n return hex === \"\" ? _0n : BigInt(\"0x\" + hex);\n }\n function bytesToNumberBE(bytes) {\n return hexToNumber(bytesToHex(bytes));\n }\n function bytesToNumberLE(bytes) {\n abytes(bytes);\n return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));\n }\n function numberToBytesBE(n, len) {\n return hexToBytes(n.toString(16).padStart(len * 2, \"0\"));\n }\n function numberToBytesLE(n, len) {\n return numberToBytesBE(n, len).reverse();\n }\n function ensureBytes(title, hex, expectedLength) {\n let res;\n if (typeof hex === \"string\") {\n try {\n res = hexToBytes(hex);\n } catch (e) {\n throw new Error(title + \" must be hex string or Uint8Array, cause: \" + e);\n }\n } else if (isBytes(hex)) {\n res = Uint8Array.from(hex);\n } else {\n throw new Error(title + \" must be hex string or Uint8Array\");\n }\n const len = res.length;\n if (typeof expectedLength === \"number\" && len !== expectedLength)\n throw new Error(title + \" of length \" + expectedLength + \" expected, got \" + len);\n return res;\n }\n function equalBytes(a, b) {\n if (a.length !== b.length)\n return false;\n let diff = 0;\n for (let i = 0; i < a.length; i++)\n diff |= a[i] ^ b[i];\n return diff === 0;\n }\n function copyBytes(bytes) {\n return Uint8Array.from(bytes);\n }\n var isPosBig = (n) => typeof n === \"bigint\" && _0n <= n;\n function inRange(n, min, max) {\n return isPosBig(n) && isPosBig(min) && isPosBig(max) && min <= n && n < max;\n }\n function aInRange(title, n, min, max) {\n if (!inRange(n, min, max))\n throw new Error(\"expected valid \" + title + \": \" + min + \" <= n < \" + max + \", got \" + n);\n }\n function bitLen(n) {\n let len;\n for (len = 0; n > _0n; n >>= _1n, len += 1)\n ;\n return len;\n }\n var bitMask = (n) => (_1n << BigInt(n)) - _1n;\n function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== \"number\" || hashLen < 2)\n throw new Error(\"hashLen must be a number\");\n if (typeof qByteLen !== \"number\" || qByteLen < 2)\n throw new Error(\"qByteLen must be a number\");\n if (typeof hmacFn !== \"function\")\n throw new Error(\"hmacFn must be a function\");\n const u8n = (len) => new Uint8Array(len);\n const u8of = (byte) => Uint8Array.of(byte);\n let v = u8n(hashLen);\n let k = u8n(hashLen);\n let i = 0;\n const reset = () => {\n v.fill(1);\n k.fill(0);\n i = 0;\n };\n const h = (...b) => hmacFn(k, v, ...b);\n const reseed = (seed = u8n(0)) => {\n k = h(u8of(0), seed);\n v = h();\n if (seed.length === 0)\n return;\n k = h(u8of(1), seed);\n v = h();\n };\n const gen2 = () => {\n if (i++ >= 1e3)\n throw new Error(\"drbg: tried 1000 values\");\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v = h();\n const sl = v.slice();\n out.push(sl);\n len += v.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed);\n let res = void 0;\n while (!(res = pred(gen2())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n }\n function _validateObject(object, fields, optFields = {}) {\n if (!object || typeof object !== \"object\")\n throw new Error(\"expected valid options object\");\n function checkField(fieldName, expectedType, isOpt) {\n const val = object[fieldName];\n if (isOpt && val === void 0)\n return;\n const current = typeof val;\n if (current !== expectedType || val === null)\n throw new Error(`param \"${fieldName}\" is invalid: expected ${expectedType}, got ${current}`);\n }\n Object.entries(fields).forEach(([k, v]) => checkField(k, v, false));\n Object.entries(optFields).forEach(([k, v]) => checkField(k, v, true));\n }\n var notImplemented = () => {\n throw new Error(\"not implemented\");\n };\n function memoized(fn) {\n const map = /* @__PURE__ */ new WeakMap();\n return (arg, ...args) => {\n const val = map.get(arg);\n if (val !== void 0)\n return val;\n const computed = fn(arg, ...args);\n map.set(arg, computed);\n return computed;\n };\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/modular.js\n init_dirname();\n init_buffer2();\n init_process2();\n var _0n2 = BigInt(0);\n var _1n2 = BigInt(1);\n var _2n = /* @__PURE__ */ BigInt(2);\n var _3n = /* @__PURE__ */ BigInt(3);\n var _4n = /* @__PURE__ */ BigInt(4);\n var _5n = /* @__PURE__ */ BigInt(5);\n var _7n = /* @__PURE__ */ BigInt(7);\n var _8n = /* @__PURE__ */ BigInt(8);\n var _9n = /* @__PURE__ */ BigInt(9);\n var _16n = /* @__PURE__ */ BigInt(16);\n function mod(a, b) {\n const result = a % b;\n return result >= _0n2 ? result : b + result;\n }\n function pow2(x, power, modulo) {\n let res = x;\n while (power-- > _0n2) {\n res *= res;\n res %= modulo;\n }\n return res;\n }\n function invert(number2, modulo) {\n if (number2 === _0n2)\n throw new Error(\"invert: expected non-zero number\");\n if (modulo <= _0n2)\n throw new Error(\"invert: expected positive modulus, got \" + modulo);\n let a = mod(number2, modulo);\n let b = modulo;\n let x = _0n2, y = _1n2, u = _1n2, v = _0n2;\n while (a !== _0n2) {\n const q = b / a;\n const r = b % a;\n const m = x - u * q;\n const n = y - v * q;\n b = a, a = r, x = u, y = v, u = m, v = n;\n }\n const gcd = b;\n if (gcd !== _1n2)\n throw new Error(\"invert: does not exist\");\n return mod(x, modulo);\n }\n function assertIsSquare(Fp2, root, n) {\n if (!Fp2.eql(Fp2.sqr(root), n))\n throw new Error(\"Cannot find square root\");\n }\n function sqrt3mod4(Fp2, n) {\n const p1div4 = (Fp2.ORDER + _1n2) / _4n;\n const root = Fp2.pow(n, p1div4);\n assertIsSquare(Fp2, root, n);\n return root;\n }\n function sqrt5mod8(Fp2, n) {\n const p5div8 = (Fp2.ORDER - _5n) / _8n;\n const n2 = Fp2.mul(n, _2n);\n const v = Fp2.pow(n2, p5div8);\n const nv = Fp2.mul(n, v);\n const i = Fp2.mul(Fp2.mul(nv, _2n), v);\n const root = Fp2.mul(nv, Fp2.sub(i, Fp2.ONE));\n assertIsSquare(Fp2, root, n);\n return root;\n }\n function sqrt9mod16(P) {\n const Fp_ = Field(P);\n const tn = tonelliShanks(P);\n const c1 = tn(Fp_, Fp_.neg(Fp_.ONE));\n const c2 = tn(Fp_, c1);\n const c3 = tn(Fp_, Fp_.neg(c1));\n const c4 = (P + _7n) / _16n;\n return (Fp2, n) => {\n let tv1 = Fp2.pow(n, c4);\n let tv2 = Fp2.mul(tv1, c1);\n const tv3 = Fp2.mul(tv1, c2);\n const tv4 = Fp2.mul(tv1, c3);\n const e1 = Fp2.eql(Fp2.sqr(tv2), n);\n const e2 = Fp2.eql(Fp2.sqr(tv3), n);\n tv1 = Fp2.cmov(tv1, tv2, e1);\n tv2 = Fp2.cmov(tv4, tv3, e2);\n const e3 = Fp2.eql(Fp2.sqr(tv2), n);\n const root = Fp2.cmov(tv1, tv2, e3);\n assertIsSquare(Fp2, root, n);\n return root;\n };\n }\n function tonelliShanks(P) {\n if (P < _3n)\n throw new Error(\"sqrt is not defined for small field\");\n let Q = P - _1n2;\n let S = 0;\n while (Q % _2n === _0n2) {\n Q /= _2n;\n S++;\n }\n let Z = _2n;\n const _Fp = Field(P);\n while (FpLegendre(_Fp, Z) === 1) {\n if (Z++ > 1e3)\n throw new Error(\"Cannot find square root: probably non-prime P\");\n }\n if (S === 1)\n return sqrt3mod4;\n let cc = _Fp.pow(Z, Q);\n const Q1div2 = (Q + _1n2) / _2n;\n return function tonelliSlow(Fp2, n) {\n if (Fp2.is0(n))\n return n;\n if (FpLegendre(Fp2, n) !== 1)\n throw new Error(\"Cannot find square root\");\n let M = S;\n let c = Fp2.mul(Fp2.ONE, cc);\n let t = Fp2.pow(n, Q);\n let R = Fp2.pow(n, Q1div2);\n while (!Fp2.eql(t, Fp2.ONE)) {\n if (Fp2.is0(t))\n return Fp2.ZERO;\n let i = 1;\n let t_tmp = Fp2.sqr(t);\n while (!Fp2.eql(t_tmp, Fp2.ONE)) {\n i++;\n t_tmp = Fp2.sqr(t_tmp);\n if (i === M)\n throw new Error(\"Cannot find square root\");\n }\n const exponent = _1n2 << BigInt(M - i - 1);\n const b = Fp2.pow(c, exponent);\n M = i;\n c = Fp2.sqr(b);\n t = Fp2.mul(t, c);\n R = Fp2.mul(R, b);\n }\n return R;\n };\n }\n function FpSqrt(P) {\n if (P % _4n === _3n)\n return sqrt3mod4;\n if (P % _8n === _5n)\n return sqrt5mod8;\n if (P % _16n === _9n)\n return sqrt9mod16(P);\n return tonelliShanks(P);\n }\n var isNegativeLE = (num, modulo) => (mod(num, modulo) & _1n2) === _1n2;\n var FIELD_FIELDS = [\n \"create\",\n \"isValid\",\n \"is0\",\n \"neg\",\n \"inv\",\n \"sqrt\",\n \"sqr\",\n \"eql\",\n \"add\",\n \"sub\",\n \"mul\",\n \"pow\",\n \"div\",\n \"addN\",\n \"subN\",\n \"mulN\",\n \"sqrN\"\n ];\n function validateField(field) {\n const initial = {\n ORDER: \"bigint\",\n MASK: \"bigint\",\n BYTES: \"number\",\n BITS: \"number\"\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n _validateObject(field, opts);\n return field;\n }\n function FpPow(Fp2, num, power) {\n if (power < _0n2)\n throw new Error(\"invalid exponent, negatives unsupported\");\n if (power === _0n2)\n return Fp2.ONE;\n if (power === _1n2)\n return num;\n let p = Fp2.ONE;\n let d = num;\n while (power > _0n2) {\n if (power & _1n2)\n p = Fp2.mul(p, d);\n d = Fp2.sqr(d);\n power >>= _1n2;\n }\n return p;\n }\n function FpInvertBatch(Fp2, nums, passZero = false) {\n const inverted = new Array(nums.length).fill(passZero ? Fp2.ZERO : void 0);\n const multipliedAcc = nums.reduce((acc, num, i) => {\n if (Fp2.is0(num))\n return acc;\n inverted[i] = acc;\n return Fp2.mul(acc, num);\n }, Fp2.ONE);\n const invertedAcc = Fp2.inv(multipliedAcc);\n nums.reduceRight((acc, num, i) => {\n if (Fp2.is0(num))\n return acc;\n inverted[i] = Fp2.mul(acc, inverted[i]);\n return Fp2.mul(acc, num);\n }, invertedAcc);\n return inverted;\n }\n function FpLegendre(Fp2, n) {\n const p1mod2 = (Fp2.ORDER - _1n2) / _2n;\n const powered = Fp2.pow(n, p1mod2);\n const yes = Fp2.eql(powered, Fp2.ONE);\n const zero = Fp2.eql(powered, Fp2.ZERO);\n const no = Fp2.eql(powered, Fp2.neg(Fp2.ONE));\n if (!yes && !zero && !no)\n throw new Error(\"invalid Legendre symbol result\");\n return yes ? 1 : zero ? 0 : -1;\n }\n function nLength(n, nBitLength) {\n if (nBitLength !== void 0)\n anumber(nBitLength);\n const _nBitLength = nBitLength !== void 0 ? nBitLength : n.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n }\n function Field(ORDER, bitLenOrOpts, isLE2 = false, opts = {}) {\n if (ORDER <= _0n2)\n throw new Error(\"invalid field: expected ORDER > 0, got \" + ORDER);\n let _nbitLength = void 0;\n let _sqrt = void 0;\n let modFromBytes = false;\n let allowedLengths = void 0;\n if (typeof bitLenOrOpts === \"object\" && bitLenOrOpts != null) {\n if (opts.sqrt || isLE2)\n throw new Error(\"cannot specify opts in two arguments\");\n const _opts = bitLenOrOpts;\n if (_opts.BITS)\n _nbitLength = _opts.BITS;\n if (_opts.sqrt)\n _sqrt = _opts.sqrt;\n if (typeof _opts.isLE === \"boolean\")\n isLE2 = _opts.isLE;\n if (typeof _opts.modFromBytes === \"boolean\")\n modFromBytes = _opts.modFromBytes;\n allowedLengths = _opts.allowedLengths;\n } else {\n if (typeof bitLenOrOpts === \"number\")\n _nbitLength = bitLenOrOpts;\n if (opts.sqrt)\n _sqrt = opts.sqrt;\n }\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, _nbitLength);\n if (BYTES > 2048)\n throw new Error(\"invalid field: expected ORDER of <= 2048 bytes\");\n let sqrtP;\n const f2 = Object.freeze({\n ORDER,\n isLE: isLE2,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: _0n2,\n ONE: _1n2,\n allowedLengths,\n create: (num) => mod(num, ORDER),\n isValid: (num) => {\n if (typeof num !== \"bigint\")\n throw new Error(\"invalid field element: expected bigint, got \" + typeof num);\n return _0n2 <= num && num < ORDER;\n },\n is0: (num) => num === _0n2,\n // is valid and invertible\n isValidNot0: (num) => !f2.is0(num) && f2.isValid(num),\n isOdd: (num) => (num & _1n2) === _1n2,\n neg: (num) => mod(-num, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num) => mod(num * num, ORDER),\n add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n pow: (num, power) => FpPow(f2, num, power),\n div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num) => num * num,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num) => invert(num, ORDER),\n sqrt: _sqrt || ((n) => {\n if (!sqrtP)\n sqrtP = FpSqrt(ORDER);\n return sqrtP(f2, n);\n }),\n toBytes: (num) => isLE2 ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES),\n fromBytes: (bytes, skipValidation = true) => {\n if (allowedLengths) {\n if (!allowedLengths.includes(bytes.length) || bytes.length > BYTES) {\n throw new Error(\"Field.fromBytes: expected \" + allowedLengths + \" bytes, got \" + bytes.length);\n }\n const padded = new Uint8Array(BYTES);\n padded.set(bytes, isLE2 ? 0 : padded.length - bytes.length);\n bytes = padded;\n }\n if (bytes.length !== BYTES)\n throw new Error(\"Field.fromBytes: expected \" + BYTES + \" bytes, got \" + bytes.length);\n let scalar = isLE2 ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n if (modFromBytes)\n scalar = mod(scalar, ORDER);\n if (!skipValidation) {\n if (!f2.isValid(scalar))\n throw new Error(\"invalid field element: outside of range 0..ORDER\");\n }\n return scalar;\n },\n // TODO: we don't need it here, move out to separate fn\n invertBatch: (lst) => FpInvertBatch(f2, lst),\n // We can't move this out because Fp6, Fp12 implement it\n // and it's unclear what to return in there.\n cmov: (a, b, c) => c ? b : a\n });\n return Object.freeze(f2);\n }\n function getFieldBytesLength(fieldOrder) {\n if (typeof fieldOrder !== \"bigint\")\n throw new Error(\"field order must be bigint\");\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n }\n function getMinHashLength(fieldOrder) {\n const length = getFieldBytesLength(fieldOrder);\n return length + Math.ceil(length / 2);\n }\n function mapHashToField(key, fieldOrder, isLE2 = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength(fieldOrder);\n const minLen = getMinHashLength(fieldOrder);\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(\"expected \" + minLen + \"-1024 bytes of input, got \" + len);\n const num = isLE2 ? bytesToNumberLE(key) : bytesToNumberBE(key);\n const reduced = mod(num, fieldOrder - _1n2) + _1n2;\n return isLE2 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/curve.js\n var _0n3 = BigInt(0);\n var _1n3 = BigInt(1);\n function negateCt(condition, item) {\n const neg = item.negate();\n return condition ? neg : item;\n }\n function normalizeZ(c, points) {\n const invertedZs = FpInvertBatch(c.Fp, points.map((p) => p.Z));\n return points.map((p, i) => c.fromAffine(p.toAffine(invertedZs[i])));\n }\n function validateW(W, bits) {\n if (!Number.isSafeInteger(W) || W <= 0 || W > bits)\n throw new Error(\"invalid window size, expected [1..\" + bits + \"], got W=\" + W);\n }\n function calcWOpts(W, scalarBits) {\n validateW(W, scalarBits);\n const windows = Math.ceil(scalarBits / W) + 1;\n const windowSize = 2 ** (W - 1);\n const maxNumber = 2 ** W;\n const mask2 = bitMask(W);\n const shiftBy = BigInt(W);\n return { windows, windowSize, mask: mask2, maxNumber, shiftBy };\n }\n function calcOffsets(n, window2, wOpts) {\n const { windowSize, mask: mask2, maxNumber, shiftBy } = wOpts;\n let wbits = Number(n & mask2);\n let nextN = n >> shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n nextN += _1n3;\n }\n const offsetStart = window2 * windowSize;\n const offset2 = offsetStart + Math.abs(wbits) - 1;\n const isZero = wbits === 0;\n const isNeg = wbits < 0;\n const isNegF = window2 % 2 !== 0;\n const offsetF = offsetStart;\n return { nextN, offset: offset2, isZero, isNeg, isNegF, offsetF };\n }\n function validateMSMPoints(points, c) {\n if (!Array.isArray(points))\n throw new Error(\"array expected\");\n points.forEach((p, i) => {\n if (!(p instanceof c))\n throw new Error(\"invalid point at index \" + i);\n });\n }\n function validateMSMScalars(scalars, field) {\n if (!Array.isArray(scalars))\n throw new Error(\"array of scalars expected\");\n scalars.forEach((s, i) => {\n if (!field.isValid(s))\n throw new Error(\"invalid scalar at index \" + i);\n });\n }\n var pointPrecomputes = /* @__PURE__ */ new WeakMap();\n var pointWindowSizes = /* @__PURE__ */ new WeakMap();\n function getW(P) {\n return pointWindowSizes.get(P) || 1;\n }\n function assert0(n) {\n if (n !== _0n3)\n throw new Error(\"invalid wNAF\");\n }\n var wNAF = class {\n // Parametrized with a given Point class (not individual point)\n constructor(Point, bits) {\n this.BASE = Point.BASE;\n this.ZERO = Point.ZERO;\n this.Fn = Point.Fn;\n this.bits = bits;\n }\n // non-const time multiplication ladder\n _unsafeLadder(elm, n, p = this.ZERO) {\n let d = elm;\n while (n > _0n3) {\n if (n & _1n3)\n p = p.add(d);\n d = d.double();\n n >>= _1n3;\n }\n return p;\n }\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @param point Point instance\n * @param W window size\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(point, W) {\n const { windows, windowSize } = calcWOpts(W, this.bits);\n const points = [];\n let p = point;\n let base = p;\n for (let window2 = 0; window2 < windows; window2++) {\n base = p;\n points.push(base);\n for (let i = 1; i < windowSize; i++) {\n base = base.add(p);\n points.push(base);\n }\n p = base.double();\n }\n return points;\n }\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * More compact implementation:\n * https://github.com/paulmillr/noble-secp256k1/blob/47cb1669b6e506ad66b35fe7d76132ae97465da2/index.ts#L502-L541\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n) {\n if (!this.Fn.isValid(n))\n throw new Error(\"invalid scalar\");\n let p = this.ZERO;\n let f2 = this.BASE;\n const wo = calcWOpts(W, this.bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n const { nextN, offset: offset2, isZero, isNeg, isNegF, offsetF } = calcOffsets(n, window2, wo);\n n = nextN;\n if (isZero) {\n f2 = f2.add(negateCt(isNegF, precomputes[offsetF]));\n } else {\n p = p.add(negateCt(isNeg, precomputes[offset2]));\n }\n }\n assert0(n);\n return { p, f: f2 };\n }\n /**\n * Implements ec unsafe (non const-time) multiplication using precomputed tables and w-ary non-adjacent form.\n * @param acc accumulator point to add result of multiplication\n * @returns point\n */\n wNAFUnsafe(W, precomputes, n, acc = this.ZERO) {\n const wo = calcWOpts(W, this.bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n if (n === _0n3)\n break;\n const { nextN, offset: offset2, isZero, isNeg } = calcOffsets(n, window2, wo);\n n = nextN;\n if (isZero) {\n continue;\n } else {\n const item = precomputes[offset2];\n acc = acc.add(isNeg ? item.negate() : item);\n }\n }\n assert0(n);\n return acc;\n }\n getPrecomputes(W, point, transform) {\n let comp = pointPrecomputes.get(point);\n if (!comp) {\n comp = this.precomputeWindow(point, W);\n if (W !== 1) {\n if (typeof transform === \"function\")\n comp = transform(comp);\n pointPrecomputes.set(point, comp);\n }\n }\n return comp;\n }\n cached(point, scalar, transform) {\n const W = getW(point);\n return this.wNAF(W, this.getPrecomputes(W, point, transform), scalar);\n }\n unsafe(point, scalar, transform, prev) {\n const W = getW(point);\n if (W === 1)\n return this._unsafeLadder(point, scalar, prev);\n return this.wNAFUnsafe(W, this.getPrecomputes(W, point, transform), scalar, prev);\n }\n // We calculate precomputes for elliptic curve point multiplication\n // using windowed method. This specifies window size and\n // stores precomputed values. Usually only base point would be precomputed.\n createCache(P, W) {\n validateW(W, this.bits);\n pointWindowSizes.set(P, W);\n pointPrecomputes.delete(P);\n }\n hasCache(elm) {\n return getW(elm) !== 1;\n }\n };\n function mulEndoUnsafe(Point, point, k1, k2) {\n let acc = point;\n let p1 = Point.ZERO;\n let p2 = Point.ZERO;\n while (k1 > _0n3 || k2 > _0n3) {\n if (k1 & _1n3)\n p1 = p1.add(acc);\n if (k2 & _1n3)\n p2 = p2.add(acc);\n acc = acc.double();\n k1 >>= _1n3;\n k2 >>= _1n3;\n }\n return { p1, p2 };\n }\n function pippenger(c, fieldN, points, scalars) {\n validateMSMPoints(points, c);\n validateMSMScalars(scalars, fieldN);\n const plength = points.length;\n const slength = scalars.length;\n if (plength !== slength)\n throw new Error(\"arrays of points and scalars must have equal length\");\n const zero = c.ZERO;\n const wbits = bitLen(BigInt(plength));\n let windowSize = 1;\n if (wbits > 12)\n windowSize = wbits - 3;\n else if (wbits > 4)\n windowSize = wbits - 2;\n else if (wbits > 0)\n windowSize = 2;\n const MASK = bitMask(windowSize);\n const buckets = new Array(Number(MASK) + 1).fill(zero);\n const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;\n let sum = zero;\n for (let i = lastBits; i >= 0; i -= windowSize) {\n buckets.fill(zero);\n for (let j = 0; j < slength; j++) {\n const scalar = scalars[j];\n const wbits2 = Number(scalar >> BigInt(i) & MASK);\n buckets[wbits2] = buckets[wbits2].add(points[j]);\n }\n let resI = zero;\n for (let j = buckets.length - 1, sumI = zero; j > 0; j--) {\n sumI = sumI.add(buckets[j]);\n resI = resI.add(sumI);\n }\n sum = sum.add(resI);\n if (i !== 0)\n for (let j = 0; j < windowSize; j++)\n sum = sum.double();\n }\n return sum;\n }\n function createField(order, field, isLE2) {\n if (field) {\n if (field.ORDER !== order)\n throw new Error(\"Field.ORDER must match order: Fp == p, Fn == n\");\n validateField(field);\n return field;\n } else {\n return Field(order, { isLE: isLE2 });\n }\n }\n function _createCurveFields(type2, CURVE, curveOpts = {}, FpFnLE) {\n if (FpFnLE === void 0)\n FpFnLE = type2 === \"edwards\";\n if (!CURVE || typeof CURVE !== \"object\")\n throw new Error(`expected valid ${type2} CURVE object`);\n for (const p of [\"p\", \"n\", \"h\"]) {\n const val = CURVE[p];\n if (!(typeof val === \"bigint\" && val > _0n3))\n throw new Error(`CURVE.${p} must be positive bigint`);\n }\n const Fp2 = createField(CURVE.p, curveOpts.Fp, FpFnLE);\n const Fn2 = createField(CURVE.n, curveOpts.Fn, FpFnLE);\n const _b = type2 === \"weierstrass\" ? \"b\" : \"d\";\n const params = [\"Gx\", \"Gy\", \"a\", _b];\n for (const p of params) {\n if (!Fp2.isValid(CURVE[p]))\n throw new Error(`CURVE.${p} must be valid field element of CURVE.Fp`);\n }\n CURVE = Object.freeze(Object.assign({}, CURVE));\n return { CURVE, Fp: Fp2, Fn: Fn2 };\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/edwards.js\n init_dirname();\n init_buffer2();\n init_process2();\n var _0n4 = BigInt(0);\n var _1n4 = BigInt(1);\n var _2n2 = BigInt(2);\n var _8n2 = BigInt(8);\n function isEdValidXY(Fp2, CURVE, x, y) {\n const x2 = Fp2.sqr(x);\n const y2 = Fp2.sqr(y);\n const left = Fp2.add(Fp2.mul(CURVE.a, x2), y2);\n const right = Fp2.add(Fp2.ONE, Fp2.mul(CURVE.d, Fp2.mul(x2, y2)));\n return Fp2.eql(left, right);\n }\n function edwards(params, extraOpts = {}) {\n const validated = _createCurveFields(\"edwards\", params, extraOpts, extraOpts.FpFnLE);\n const { Fp: Fp2, Fn: Fn2 } = validated;\n let CURVE = validated.CURVE;\n const { h: cofactor } = CURVE;\n _validateObject(extraOpts, {}, { uvRatio: \"function\" });\n const MASK = _2n2 << BigInt(Fn2.BYTES * 8) - _1n4;\n const modP = (n) => Fp2.create(n);\n const uvRatio2 = extraOpts.uvRatio || ((u, v) => {\n try {\n return { isValid: true, value: Fp2.sqrt(Fp2.div(u, v)) };\n } catch (e) {\n return { isValid: false, value: _0n4 };\n }\n });\n if (!isEdValidXY(Fp2, CURVE, CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n function acoord(title, n, banZero = false) {\n const min = banZero ? _1n4 : _0n4;\n aInRange(\"coordinate \" + title, n, min, MASK);\n return n;\n }\n function aextpoint(other) {\n if (!(other instanceof Point))\n throw new Error(\"ExtendedPoint expected\");\n }\n const toAffineMemo = memoized((p, iz) => {\n const { X, Y, Z } = p;\n const is0 = p.is0();\n if (iz == null)\n iz = is0 ? _8n2 : Fp2.inv(Z);\n const x = modP(X * iz);\n const y = modP(Y * iz);\n const zz = Fp2.mul(Z, iz);\n if (is0)\n return { x: _0n4, y: _1n4 };\n if (zz !== _1n4)\n throw new Error(\"invZ was invalid\");\n return { x, y };\n });\n const assertValidMemo = memoized((p) => {\n const { a, d } = CURVE;\n if (p.is0())\n throw new Error(\"bad point: ZERO\");\n const { X, Y, Z, T } = p;\n const X2 = modP(X * X);\n const Y2 = modP(Y * Y);\n const Z2 = modP(Z * Z);\n const Z4 = modP(Z2 * Z2);\n const aX2 = modP(X2 * a);\n const left = modP(Z2 * modP(aX2 + Y2));\n const right = modP(Z4 + modP(d * modP(X2 * Y2)));\n if (left !== right)\n throw new Error(\"bad point: equation left != right (1)\");\n const XY = modP(X * Y);\n const ZT = modP(Z * T);\n if (XY !== ZT)\n throw new Error(\"bad point: equation left != right (2)\");\n return true;\n });\n class Point {\n constructor(X, Y, Z, T) {\n this.X = acoord(\"x\", X);\n this.Y = acoord(\"y\", Y);\n this.Z = acoord(\"z\", Z, true);\n this.T = acoord(\"t\", T);\n Object.freeze(this);\n }\n static CURVE() {\n return CURVE;\n }\n static fromAffine(p) {\n if (p instanceof Point)\n throw new Error(\"extended point not allowed\");\n const { x, y } = p || {};\n acoord(\"x\", x);\n acoord(\"y\", y);\n return new Point(x, y, _1n4, modP(x * y));\n }\n // Uses algo from RFC8032 5.1.3.\n static fromBytes(bytes, zip215 = false) {\n const len = Fp2.BYTES;\n const { a, d } = CURVE;\n bytes = copyBytes(_abytes2(bytes, len, \"point\"));\n _abool2(zip215, \"zip215\");\n const normed = copyBytes(bytes);\n const lastByte = bytes[len - 1];\n normed[len - 1] = lastByte & ~128;\n const y = bytesToNumberLE(normed);\n const max = zip215 ? MASK : Fp2.ORDER;\n aInRange(\"point.y\", y, _0n4, max);\n const y2 = modP(y * y);\n const u = modP(y2 - _1n4);\n const v = modP(d * y2 - a);\n let { isValid, value: x } = uvRatio2(u, v);\n if (!isValid)\n throw new Error(\"bad point: invalid y coordinate\");\n const isXOdd = (x & _1n4) === _1n4;\n const isLastByteOdd = (lastByte & 128) !== 0;\n if (!zip215 && x === _0n4 && isLastByteOdd)\n throw new Error(\"bad point: x=0 and x_0=1\");\n if (isLastByteOdd !== isXOdd)\n x = modP(-x);\n return Point.fromAffine({ x, y });\n }\n static fromHex(bytes, zip215 = false) {\n return Point.fromBytes(ensureBytes(\"point\", bytes), zip215);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n precompute(windowSize = 8, isLazy = true) {\n wnaf.createCache(this, windowSize);\n if (!isLazy)\n this.multiply(_2n2);\n return this;\n }\n // Useful in fromAffine() - not for fromBytes(), which always created valid points.\n assertValidity() {\n assertValidMemo(this);\n }\n // Compare one point to another.\n equals(other) {\n aextpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n const X1Z2 = modP(X1 * Z2);\n const X2Z1 = modP(X2 * Z1);\n const Y1Z2 = modP(Y1 * Z2);\n const Y2Z1 = modP(Y2 * Z1);\n return X1Z2 === X2Z1 && Y1Z2 === Y2Z1;\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n negate() {\n return new Point(modP(-this.X), this.Y, this.Z, modP(-this.T));\n }\n // Fast algo for doubling Extended Point.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd\n // Cost: 4M + 4S + 1*a + 6add + 1*2.\n double() {\n const { a } = CURVE;\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const A = modP(X1 * X1);\n const B = modP(Y1 * Y1);\n const C = modP(_2n2 * modP(Z1 * Z1));\n const D = modP(a * A);\n const x1y1 = X1 + Y1;\n const E = modP(modP(x1y1 * x1y1) - A - B);\n const G = D + B;\n const F = G - C;\n const H = D - B;\n const X3 = modP(E * F);\n const Y3 = modP(G * H);\n const T3 = modP(E * H);\n const Z3 = modP(F * G);\n return new Point(X3, Y3, Z3, T3);\n }\n // Fast algo for adding 2 Extended Points.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#addition-add-2008-hwcd\n // Cost: 9M + 1*a + 1*d + 7add.\n add(other) {\n aextpoint(other);\n const { a, d } = CURVE;\n const { X: X1, Y: Y1, Z: Z1, T: T1 } = this;\n const { X: X2, Y: Y2, Z: Z2, T: T2 } = other;\n const A = modP(X1 * X2);\n const B = modP(Y1 * Y2);\n const C = modP(T1 * d * T2);\n const D = modP(Z1 * Z2);\n const E = modP((X1 + Y1) * (X2 + Y2) - A - B);\n const F = D - C;\n const G = D + C;\n const H = modP(B - a * A);\n const X3 = modP(E * F);\n const Y3 = modP(G * H);\n const T3 = modP(E * H);\n const Z3 = modP(F * G);\n return new Point(X3, Y3, Z3, T3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n // Constant-time multiplication.\n multiply(scalar) {\n if (!Fn2.isValidNot0(scalar))\n throw new Error(\"invalid scalar: expected 1 <= sc < curve.n\");\n const { p, f: f2 } = wnaf.cached(this, scalar, (p2) => normalizeZ(Point, p2));\n return normalizeZ(Point, [p, f2])[0];\n }\n // Non-constant-time multiplication. Uses double-and-add algorithm.\n // It's faster, but should only be used when you don't care about\n // an exposed private key e.g. sig verification.\n // Does NOT allow scalars higher than CURVE.n.\n // Accepts optional accumulator to merge with multiply (important for sparse scalars)\n multiplyUnsafe(scalar, acc = Point.ZERO) {\n if (!Fn2.isValid(scalar))\n throw new Error(\"invalid scalar: expected 0 <= sc < curve.n\");\n if (scalar === _0n4)\n return Point.ZERO;\n if (this.is0() || scalar === _1n4)\n return this;\n return wnaf.unsafe(this, scalar, (p) => normalizeZ(Point, p), acc);\n }\n // Checks if point is of small order.\n // If you add something to small order point, you will have \"dirty\"\n // point with torsion component.\n // Multiplies point by cofactor and checks if the result is 0.\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n // Multiplies point by curve order and checks if the result is 0.\n // Returns `false` is the point is dirty.\n isTorsionFree() {\n return wnaf.unsafe(this, CURVE.n).is0();\n }\n // Converts Extended point to default (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n toAffine(invertedZ) {\n return toAffineMemo(this, invertedZ);\n }\n clearCofactor() {\n if (cofactor === _1n4)\n return this;\n return this.multiplyUnsafe(cofactor);\n }\n toBytes() {\n const { x, y } = this.toAffine();\n const bytes = Fp2.toBytes(y);\n bytes[bytes.length - 1] |= x & _1n4 ? 128 : 0;\n return bytes;\n }\n toHex() {\n return bytesToHex(this.toBytes());\n }\n toString() {\n return ``;\n }\n // TODO: remove\n get ex() {\n return this.X;\n }\n get ey() {\n return this.Y;\n }\n get ez() {\n return this.Z;\n }\n get et() {\n return this.T;\n }\n static normalizeZ(points) {\n return normalizeZ(Point, points);\n }\n static msm(points, scalars) {\n return pippenger(Point, Fn2, points, scalars);\n }\n _setWindowSize(windowSize) {\n this.precompute(windowSize);\n }\n toRawBytes() {\n return this.toBytes();\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, _1n4, modP(CURVE.Gx * CURVE.Gy));\n Point.ZERO = new Point(_0n4, _1n4, _1n4, _0n4);\n Point.Fp = Fp2;\n Point.Fn = Fn2;\n const wnaf = new wNAF(Point, Fn2.BITS);\n Point.BASE.precompute(8);\n return Point;\n }\n var PrimeEdwardsPoint = class {\n constructor(ep) {\n this.ep = ep;\n }\n // Static methods that must be implemented by subclasses\n static fromBytes(_bytes) {\n notImplemented();\n }\n static fromHex(_hex) {\n notImplemented();\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n // Common implementations\n clearCofactor() {\n return this;\n }\n assertValidity() {\n this.ep.assertValidity();\n }\n toAffine(invertedZ) {\n return this.ep.toAffine(invertedZ);\n }\n toHex() {\n return bytesToHex(this.toBytes());\n }\n toString() {\n return this.toHex();\n }\n isTorsionFree() {\n return true;\n }\n isSmallOrder() {\n return false;\n }\n add(other) {\n this.assertSame(other);\n return this.init(this.ep.add(other.ep));\n }\n subtract(other) {\n this.assertSame(other);\n return this.init(this.ep.subtract(other.ep));\n }\n multiply(scalar) {\n return this.init(this.ep.multiply(scalar));\n }\n multiplyUnsafe(scalar) {\n return this.init(this.ep.multiplyUnsafe(scalar));\n }\n double() {\n return this.init(this.ep.double());\n }\n negate() {\n return this.init(this.ep.negate());\n }\n precompute(windowSize, isLazy) {\n return this.init(this.ep.precompute(windowSize, isLazy));\n }\n /** @deprecated use `toBytes` */\n toRawBytes() {\n return this.toBytes();\n }\n };\n function eddsa(Point, cHash, eddsaOpts = {}) {\n if (typeof cHash !== \"function\")\n throw new Error('\"hash\" function param is required');\n _validateObject(eddsaOpts, {}, {\n adjustScalarBytes: \"function\",\n randomBytes: \"function\",\n domain: \"function\",\n prehash: \"function\",\n mapToCurve: \"function\"\n });\n const { prehash } = eddsaOpts;\n const { BASE, Fp: Fp2, Fn: Fn2 } = Point;\n const randomBytes2 = eddsaOpts.randomBytes || randomBytes;\n const adjustScalarBytes2 = eddsaOpts.adjustScalarBytes || ((bytes) => bytes);\n const domain = eddsaOpts.domain || ((data, ctx, phflag) => {\n _abool2(phflag, \"phflag\");\n if (ctx.length || phflag)\n throw new Error(\"Contexts/pre-hash are not supported\");\n return data;\n });\n function modN_LE(hash) {\n return Fn2.create(bytesToNumberLE(hash));\n }\n function getPrivateScalar(key) {\n const len = lengths.secretKey;\n key = ensureBytes(\"private key\", key, len);\n const hashed = ensureBytes(\"hashed private key\", cHash(key), 2 * len);\n const head = adjustScalarBytes2(hashed.slice(0, len));\n const prefix = hashed.slice(len, 2 * len);\n const scalar = modN_LE(head);\n return { head, prefix, scalar };\n }\n function getExtendedPublicKey(secretKey) {\n const { head, prefix, scalar } = getPrivateScalar(secretKey);\n const point = BASE.multiply(scalar);\n const pointBytes = point.toBytes();\n return { head, prefix, scalar, point, pointBytes };\n }\n function getPublicKey2(secretKey) {\n return getExtendedPublicKey(secretKey).pointBytes;\n }\n function hashDomainToScalar(context = Uint8Array.of(), ...msgs) {\n const msg = concatBytes(...msgs);\n return modN_LE(cHash(domain(msg, ensureBytes(\"context\", context), !!prehash)));\n }\n function sign2(msg, secretKey, options = {}) {\n msg = ensureBytes(\"message\", msg);\n if (prehash)\n msg = prehash(msg);\n const { prefix, scalar, pointBytes } = getExtendedPublicKey(secretKey);\n const r = hashDomainToScalar(options.context, prefix, msg);\n const R = BASE.multiply(r).toBytes();\n const k = hashDomainToScalar(options.context, R, pointBytes, msg);\n const s = Fn2.create(r + k * scalar);\n if (!Fn2.isValid(s))\n throw new Error(\"sign failed: invalid s\");\n const rs = concatBytes(R, Fn2.toBytes(s));\n return _abytes2(rs, lengths.signature, \"result\");\n }\n const verifyOpts = { zip215: true };\n function verify2(sig, msg, publicKey2, options = verifyOpts) {\n const { context, zip215 } = options;\n const len = lengths.signature;\n sig = ensureBytes(\"signature\", sig, len);\n msg = ensureBytes(\"message\", msg);\n publicKey2 = ensureBytes(\"publicKey\", publicKey2, lengths.publicKey);\n if (zip215 !== void 0)\n _abool2(zip215, \"zip215\");\n if (prehash)\n msg = prehash(msg);\n const mid = len / 2;\n const r = sig.subarray(0, mid);\n const s = bytesToNumberLE(sig.subarray(mid, len));\n let A, R, SB;\n try {\n A = Point.fromBytes(publicKey2, zip215);\n R = Point.fromBytes(r, zip215);\n SB = BASE.multiplyUnsafe(s);\n } catch (error) {\n return false;\n }\n if (!zip215 && A.isSmallOrder())\n return false;\n const k = hashDomainToScalar(context, R.toBytes(), A.toBytes(), msg);\n const RkA = R.add(A.multiplyUnsafe(k));\n return RkA.subtract(SB).clearCofactor().is0();\n }\n const _size = Fp2.BYTES;\n const lengths = {\n secretKey: _size,\n publicKey: _size,\n signature: 2 * _size,\n seed: _size\n };\n function randomSecretKey(seed = randomBytes2(lengths.seed)) {\n return _abytes2(seed, lengths.seed, \"seed\");\n }\n function keygen(seed) {\n const secretKey = utils.randomSecretKey(seed);\n return { secretKey, publicKey: getPublicKey2(secretKey) };\n }\n function isValidSecretKey(key) {\n return isBytes(key) && key.length === Fn2.BYTES;\n }\n function isValidPublicKey(key, zip215) {\n try {\n return !!Point.fromBytes(key, zip215);\n } catch (error) {\n return false;\n }\n }\n const utils = {\n getExtendedPublicKey,\n randomSecretKey,\n isValidSecretKey,\n isValidPublicKey,\n /**\n * Converts ed public key to x public key. Uses formula:\n * - ed25519:\n * - `(u, v) = ((1+y)/(1-y), sqrt(-486664)*u/x)`\n * - `(x, y) = (sqrt(-486664)*u/v, (u-1)/(u+1))`\n * - ed448:\n * - `(u, v) = ((y-1)/(y+1), sqrt(156324)*u/x)`\n * - `(x, y) = (sqrt(156324)*u/v, (1+u)/(1-u))`\n */\n toMontgomery(publicKey2) {\n const { y } = Point.fromBytes(publicKey2);\n const size = lengths.publicKey;\n const is25519 = size === 32;\n if (!is25519 && size !== 57)\n throw new Error(\"only defined for 25519 and 448\");\n const u = is25519 ? Fp2.div(_1n4 + y, _1n4 - y) : Fp2.div(y - _1n4, y + _1n4);\n return Fp2.toBytes(u);\n },\n toMontgomerySecret(secretKey) {\n const size = lengths.secretKey;\n _abytes2(secretKey, size);\n const hashed = cHash(secretKey.subarray(0, size));\n return adjustScalarBytes2(hashed).subarray(0, size);\n },\n /** @deprecated */\n randomPrivateKey: randomSecretKey,\n /** @deprecated */\n precompute(windowSize = 8, point = Point.BASE) {\n return point.precompute(windowSize, false);\n }\n };\n return Object.freeze({\n keygen,\n getPublicKey: getPublicKey2,\n sign: sign2,\n verify: verify2,\n utils,\n Point,\n lengths\n });\n }\n function _eddsa_legacy_opts_to_new(c) {\n const CURVE = {\n a: c.a,\n d: c.d,\n p: c.Fp.ORDER,\n n: c.n,\n h: c.h,\n Gx: c.Gx,\n Gy: c.Gy\n };\n const Fp2 = c.Fp;\n const Fn2 = Field(CURVE.n, c.nBitLength, true);\n const curveOpts = { Fp: Fp2, Fn: Fn2, uvRatio: c.uvRatio };\n const eddsaOpts = {\n randomBytes: c.randomBytes,\n adjustScalarBytes: c.adjustScalarBytes,\n domain: c.domain,\n prehash: c.prehash,\n mapToCurve: c.mapToCurve\n };\n return { CURVE, curveOpts, hash: c.hash, eddsaOpts };\n }\n function _eddsa_new_output_to_legacy(c, eddsa2) {\n const Point = eddsa2.Point;\n const legacy = Object.assign({}, eddsa2, {\n ExtendedPoint: Point,\n CURVE: c,\n nBitLength: Point.Fn.BITS,\n nByteLength: Point.Fn.BYTES\n });\n return legacy;\n }\n function twistedEdwards(c) {\n const { CURVE, curveOpts, hash, eddsaOpts } = _eddsa_legacy_opts_to_new(c);\n const Point = edwards(CURVE, curveOpts);\n const EDDSA = eddsa(Point, hash, eddsaOpts);\n return _eddsa_new_output_to_legacy(c, EDDSA);\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/ed25519.js\n var _0n5 = /* @__PURE__ */ BigInt(0);\n var _1n5 = BigInt(1);\n var _2n3 = BigInt(2);\n var _3n2 = BigInt(3);\n var _5n2 = BigInt(5);\n var _8n3 = BigInt(8);\n var ed25519_CURVE_p = BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed\");\n var ed25519_CURVE = /* @__PURE__ */ (() => ({\n p: ed25519_CURVE_p,\n n: BigInt(\"0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed\"),\n h: _8n3,\n a: BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec\"),\n d: BigInt(\"0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3\"),\n Gx: BigInt(\"0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a\"),\n Gy: BigInt(\"0x6666666666666666666666666666666666666666666666666666666666666658\")\n }))();\n function ed25519_pow_2_252_3(x) {\n const _10n = BigInt(10), _20n = BigInt(20), _40n = BigInt(40), _80n = BigInt(80);\n const P = ed25519_CURVE_p;\n const x2 = x * x % P;\n const b2 = x2 * x % P;\n const b4 = pow2(b2, _2n3, P) * b2 % P;\n const b5 = pow2(b4, _1n5, P) * x % P;\n const b10 = pow2(b5, _5n2, P) * b5 % P;\n const b20 = pow2(b10, _10n, P) * b10 % P;\n const b40 = pow2(b20, _20n, P) * b20 % P;\n const b80 = pow2(b40, _40n, P) * b40 % P;\n const b160 = pow2(b80, _80n, P) * b80 % P;\n const b240 = pow2(b160, _80n, P) * b80 % P;\n const b250 = pow2(b240, _10n, P) * b10 % P;\n const pow_p_5_8 = pow2(b250, _2n3, P) * x % P;\n return { pow_p_5_8, b2 };\n }\n function adjustScalarBytes(bytes) {\n bytes[0] &= 248;\n bytes[31] &= 127;\n bytes[31] |= 64;\n return bytes;\n }\n var ED25519_SQRT_M1 = /* @__PURE__ */ BigInt(\"19681161376707505956807079304988542015446066515923890162744021073123829784752\");\n function uvRatio(u, v) {\n const P = ed25519_CURVE_p;\n const v32 = mod(v * v * v, P);\n const v7 = mod(v32 * v32 * v, P);\n const pow = ed25519_pow_2_252_3(u * v7).pow_p_5_8;\n let x = mod(u * v32 * pow, P);\n const vx2 = mod(v * x * x, P);\n const root1 = x;\n const root2 = mod(x * ED25519_SQRT_M1, P);\n const useRoot1 = vx2 === u;\n const useRoot2 = vx2 === mod(-u, P);\n const noRoot = vx2 === mod(-u * ED25519_SQRT_M1, P);\n if (useRoot1)\n x = root1;\n if (useRoot2 || noRoot)\n x = root2;\n if (isNegativeLE(x, P))\n x = mod(-x, P);\n return { isValid: useRoot1 || useRoot2, value: x };\n }\n var Fp = /* @__PURE__ */ (() => Field(ed25519_CURVE.p, { isLE: true }))();\n var Fn = /* @__PURE__ */ (() => Field(ed25519_CURVE.n, { isLE: true }))();\n var ed25519Defaults = /* @__PURE__ */ (() => ({\n ...ed25519_CURVE,\n Fp,\n hash: sha512,\n adjustScalarBytes,\n // dom2\n // Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.\n // Constant-time, u/√v\n uvRatio\n }))();\n var ed25519 = /* @__PURE__ */ (() => twistedEdwards(ed25519Defaults))();\n var SQRT_M1 = ED25519_SQRT_M1;\n var SQRT_AD_MINUS_ONE = /* @__PURE__ */ BigInt(\"25063068953384623474111414158702152701244531502492656460079210482610430750235\");\n var INVSQRT_A_MINUS_D = /* @__PURE__ */ BigInt(\"54469307008909316920995813868745141605393597292927456921205312896311721017578\");\n var ONE_MINUS_D_SQ = /* @__PURE__ */ BigInt(\"1159843021668779879193775521855586647937357759715417654439879720876111806838\");\n var D_MINUS_ONE_SQ = /* @__PURE__ */ BigInt(\"40440834346308536858101042469323190826248399146238708352240133220865137265952\");\n var invertSqrt = (number2) => uvRatio(_1n5, number2);\n var MAX_255B = /* @__PURE__ */ BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n var bytes255ToNumberLE = (bytes) => ed25519.Point.Fp.create(bytesToNumberLE(bytes) & MAX_255B);\n function calcElligatorRistrettoMap(r0) {\n const { d } = ed25519_CURVE;\n const P = ed25519_CURVE_p;\n const mod2 = (n) => Fp.create(n);\n const r = mod2(SQRT_M1 * r0 * r0);\n const Ns = mod2((r + _1n5) * ONE_MINUS_D_SQ);\n let c = BigInt(-1);\n const D = mod2((c - d * r) * mod2(r + d));\n let { isValid: Ns_D_is_sq, value: s } = uvRatio(Ns, D);\n let s_ = mod2(s * r0);\n if (!isNegativeLE(s_, P))\n s_ = mod2(-s_);\n if (!Ns_D_is_sq)\n s = s_;\n if (!Ns_D_is_sq)\n c = r;\n const Nt = mod2(c * (r - _1n5) * D_MINUS_ONE_SQ - D);\n const s2 = s * s;\n const W0 = mod2((s + s) * D);\n const W1 = mod2(Nt * SQRT_AD_MINUS_ONE);\n const W2 = mod2(_1n5 - s2);\n const W3 = mod2(_1n5 + s2);\n return new ed25519.Point(mod2(W0 * W3), mod2(W2 * W1), mod2(W1 * W3), mod2(W0 * W2));\n }\n function ristretto255_map(bytes) {\n abytes(bytes, 64);\n const r1 = bytes255ToNumberLE(bytes.subarray(0, 32));\n const R1 = calcElligatorRistrettoMap(r1);\n const r2 = bytes255ToNumberLE(bytes.subarray(32, 64));\n const R2 = calcElligatorRistrettoMap(r2);\n return new _RistrettoPoint(R1.add(R2));\n }\n var _RistrettoPoint = class __RistrettoPoint extends PrimeEdwardsPoint {\n constructor(ep) {\n super(ep);\n }\n static fromAffine(ap) {\n return new __RistrettoPoint(ed25519.Point.fromAffine(ap));\n }\n assertSame(other) {\n if (!(other instanceof __RistrettoPoint))\n throw new Error(\"RistrettoPoint expected\");\n }\n init(ep) {\n return new __RistrettoPoint(ep);\n }\n /** @deprecated use `import { ristretto255_hasher } from '@noble/curves/ed25519.js';` */\n static hashToCurve(hex) {\n return ristretto255_map(ensureBytes(\"ristrettoHash\", hex, 64));\n }\n static fromBytes(bytes) {\n abytes(bytes, 32);\n const { a, d } = ed25519_CURVE;\n const P = ed25519_CURVE_p;\n const mod2 = (n) => Fp.create(n);\n const s = bytes255ToNumberLE(bytes);\n if (!equalBytes(Fp.toBytes(s), bytes) || isNegativeLE(s, P))\n throw new Error(\"invalid ristretto255 encoding 1\");\n const s2 = mod2(s * s);\n const u1 = mod2(_1n5 + a * s2);\n const u2 = mod2(_1n5 - a * s2);\n const u1_2 = mod2(u1 * u1);\n const u2_2 = mod2(u2 * u2);\n const v = mod2(a * d * u1_2 - u2_2);\n const { isValid, value: I } = invertSqrt(mod2(v * u2_2));\n const Dx = mod2(I * u2);\n const Dy = mod2(I * Dx * v);\n let x = mod2((s + s) * Dx);\n if (isNegativeLE(x, P))\n x = mod2(-x);\n const y = mod2(u1 * Dy);\n const t = mod2(x * y);\n if (!isValid || isNegativeLE(t, P) || y === _0n5)\n throw new Error(\"invalid ristretto255 encoding 2\");\n return new __RistrettoPoint(new ed25519.Point(x, y, _1n5, t));\n }\n /**\n * Converts ristretto-encoded string to ristretto point.\n * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-decode).\n * @param hex Ristretto-encoded 32 bytes. Not every 32-byte string is valid ristretto encoding\n */\n static fromHex(hex) {\n return __RistrettoPoint.fromBytes(ensureBytes(\"ristrettoHex\", hex, 32));\n }\n static msm(points, scalars) {\n return pippenger(__RistrettoPoint, ed25519.Point.Fn, points, scalars);\n }\n /**\n * Encodes ristretto point to Uint8Array.\n * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-encode).\n */\n toBytes() {\n let { X, Y, Z, T } = this.ep;\n const P = ed25519_CURVE_p;\n const mod2 = (n) => Fp.create(n);\n const u1 = mod2(mod2(Z + Y) * mod2(Z - Y));\n const u2 = mod2(X * Y);\n const u2sq = mod2(u2 * u2);\n const { value: invsqrt } = invertSqrt(mod2(u1 * u2sq));\n const D1 = mod2(invsqrt * u1);\n const D2 = mod2(invsqrt * u2);\n const zInv = mod2(D1 * D2 * T);\n let D;\n if (isNegativeLE(T * zInv, P)) {\n let _x = mod2(Y * SQRT_M1);\n let _y = mod2(X * SQRT_M1);\n X = _x;\n Y = _y;\n D = mod2(D1 * INVSQRT_A_MINUS_D);\n } else {\n D = D2;\n }\n if (isNegativeLE(X * zInv, P))\n Y = mod2(-Y);\n let s = mod2((Z - Y) * D);\n if (isNegativeLE(s, P))\n s = mod2(-s);\n return Fp.toBytes(s);\n }\n /**\n * Compares two Ristretto points.\n * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-equals).\n */\n equals(other) {\n this.assertSame(other);\n const { X: X1, Y: Y1 } = this.ep;\n const { X: X2, Y: Y2 } = other.ep;\n const mod2 = (n) => Fp.create(n);\n const one = mod2(X1 * Y2) === mod2(Y1 * X2);\n const two = mod2(Y1 * Y2) === mod2(X1 * X2);\n return one || two;\n }\n is0() {\n return this.equals(__RistrettoPoint.ZERO);\n }\n };\n _RistrettoPoint.BASE = /* @__PURE__ */ (() => new _RistrettoPoint(ed25519.Point.BASE))();\n _RistrettoPoint.ZERO = /* @__PURE__ */ (() => new _RistrettoPoint(ed25519.Point.ZERO))();\n _RistrettoPoint.Fp = /* @__PURE__ */ (() => Fp)();\n _RistrettoPoint.Fn = /* @__PURE__ */ (() => Fn)();\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n var import_bn = __toESM(require_bn());\n var import_bs58 = __toESM(require_bs58());\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js\n init_dirname();\n init_buffer2();\n init_process2();\n var sha2562 = sha256;\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n var import_borsh = __toESM(require_lib());\n var BufferLayout = __toESM(require_Layout());\n var import_buffer_layout = __toESM(require_Layout());\n\n // ../../../node_modules/.pnpm/@solana+codecs-numbers@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-numbers/dist/index.browser.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@solana+errors@2.3.0_typescript@5.8.3/node_modules/@solana/errors/dist/index.browser.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n var SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED = 1;\n var SOLANA_ERROR__INVALID_NONCE = 2;\n var SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = 3;\n var SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE = 4;\n var SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH = 5;\n var SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE = 6;\n var SOLANA_ERROR__MALFORMED_BIGINT_STRING = 7;\n var SOLANA_ERROR__MALFORMED_NUMBER_STRING = 8;\n var SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE = 9;\n var SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR = 10;\n var SOLANA_ERROR__JSON_RPC__PARSE_ERROR = -32700;\n var SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR = -32603;\n var SOLANA_ERROR__JSON_RPC__INVALID_PARAMS = -32602;\n var SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND = -32601;\n var SOLANA_ERROR__JSON_RPC__INVALID_REQUEST = -32600;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED = -32016;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION = -32015;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET = -32014;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH = -32013;\n var SOLANA_ERROR__JSON_RPC__SCAN_ERROR = -32012;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE = -32011;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX = -32010;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED = -32009;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT = -32008;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED = -32007;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE = -32006;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY = -32005;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE = -32004;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE = -32003;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE = -32002;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP = -32001;\n var SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH = 28e5;\n var SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE = 2800001;\n var SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS = 2800002;\n var SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY = 2800003;\n var SOLANA_ERROR__ADDRESSES__MALFORMED_PDA = 2800004;\n var SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE = 2800005;\n var SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED = 2800006;\n var SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED = 2800007;\n var SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE = 2800008;\n var SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED = 2800009;\n var SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER = 2800010;\n var SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS = 2800011;\n var SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND = 323e4;\n var SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND = 32300001;\n var SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT = 3230002;\n var SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT = 3230003;\n var SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED = 3230004;\n var SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT = 361e4;\n var SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED = 3610001;\n var SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED = 3610002;\n var SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED = 3610003;\n var SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED = 3610004;\n var SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED = 3610005;\n var SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED = 3610006;\n var SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY = 3610007;\n var SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED = 3611e3;\n var SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH = 3704e3;\n var SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH = 3704001;\n var SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH = 3704002;\n var SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE = 3704003;\n var SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY = 3704004;\n var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS = 4128e3;\n var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA = 4128001;\n var SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH = 4128002;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN = 4615e3;\n var SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR = 4615001;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT = 4615002;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA = 4615003;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA = 4615004;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL = 4615005;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS = 4615006;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID = 4615007;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE = 4615008;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED = 4615009;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT = 4615010;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION = 4615011;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID = 4615012;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND = 4615013;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED = 4615014;\n var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE = 4615015;\n var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED = 4615016;\n var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX = 4615017;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED = 4615018;\n var SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED = 4615019;\n var SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS = 4615020;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED = 4615021;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE = 4615022;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED = 4615023;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = 4615024;\n var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC = 4615025;\n var SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM = 4615026;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR = 4615027;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED = 4615028;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE = 4615029;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT = 4615030;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID = 4615031;\n var SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH = 4615032;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT = 4615033;\n var SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED = 4615034;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED = 4615035;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS = 4615036;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC = 4615037;\n var SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED = 4615038;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION = 4615039;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE = 4615040;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE = 4615041;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE = 4615042;\n var SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE = 4615043;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY = 4615044;\n var SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR = 4615045;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT = 4615046;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER = 4615047;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW = 4615048;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR = 4615049;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER = 4615050;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED = 4615051;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED = 4615052;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED = 4615053;\n var SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS = 4615054;\n var SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS = 5508e3;\n var SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER = 5508001;\n var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER = 5508002;\n var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER = 5508003;\n var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER = 5508004;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER = 5508005;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER = 5508006;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER = 5508007;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER = 5508008;\n var SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS = 5508009;\n var SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING = 5508010;\n var SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED = 5508011;\n var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES = 5663e3;\n var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE = 5663001;\n var SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME = 5663002;\n var SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME = 5663003;\n var SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE = 5663004;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING = 5663005;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE = 5663006;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND = 5663007;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING = 5663008;\n var SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING = 5663009;\n var SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING = 5663010;\n var SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING = 5663011;\n var SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING = 5663012;\n var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING = 5663013;\n var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE = 5663014;\n var SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION = 5663015;\n var SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES = 5663016;\n var SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH = 5663017;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT = 5663018;\n var SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT = 5663019;\n var SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT = 5663020;\n var SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN = 705e4;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE = 7050001;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE = 7050002;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND = 7050003;\n var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND = 7050004;\n var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE = 7050005;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE = 7050006;\n var SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED = 7050007;\n var SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND = 7050008;\n var SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP = 7050009;\n var SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE = 7050010;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX = 7050011;\n var SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE = 7050012;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION = 7050013;\n var SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE = 7050014;\n var SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE = 7050015;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = 7050016;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT = 7050017;\n var SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION = 7050018;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT = 7050019;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT = 7050020;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT = 7050021;\n var SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS = 7050022;\n var SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND = 7050023;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER = 7050024;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA = 7050025;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX = 7050026;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT = 7050027;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT = 7050028;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT = 7050029;\n var SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION = 7050030;\n var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT = 7050031;\n var SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED = 7050032;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT = 7050033;\n var SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED = 7050034;\n var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED = 7050035;\n var SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION = 7050036;\n var SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY = 8078e3;\n var SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH = 8078001;\n var SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH = 8078002;\n var SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH = 8078003;\n var SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH = 8078004;\n var SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH = 8078005;\n var SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH = 8078006;\n var SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS = 8078007;\n var SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE = 8078008;\n var SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT = 8078009;\n var SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT = 8078010;\n var SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE = 8078011;\n var SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE = 8078012;\n var SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH = 8078013;\n var SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE = 8078014;\n var SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT = 8078015;\n var SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE = 8078016;\n var SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE = 8078017;\n var SOLANA_ERROR__CODECS__INVALID_CONSTANT = 8078018;\n var SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE = 8078019;\n var SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL = 8078020;\n var SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES = 8078021;\n var SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS = 8078022;\n var SOLANA_ERROR__RPC__INTEGER_OVERFLOW = 81e5;\n var SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN = 8100001;\n var SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR = 8100002;\n var SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD = 8100003;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN = 819e4;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID = 8190001;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED = 8190002;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED = 8190003;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT = 8190004;\n var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING = 99e5;\n var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE = 9900001;\n var SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING = 9900002;\n var SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE = 9900003;\n var SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED = 9900004;\n var SolanaErrorMessages = {\n [SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND]: \"Account not found at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED]: \"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.\",\n [SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT]: \"Expected decoded account at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT]: \"Failed to decode account data at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND]: \"Accounts not found at addresses: $addresses\",\n [SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED]: \"Unable to find a viable program address bump seed.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS]: \"$putativeAddress is not a base58-encoded address.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH]: \"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY]: \"The `CryptoKey` must be an `Ed25519` public key.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS]: \"$putativeOffCurveAddress is not a base58-encoded off-curve address.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE]: \"Invalid seeds; point must fall off the Ed25519 curve.\",\n [SOLANA_ERROR__ADDRESSES__MALFORMED_PDA]: \"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].\",\n [SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED]: \"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.\",\n [SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED]: \"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.\",\n [SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE]: \"Expected program derived address bump to be in the range [0, 255], got: $bump.\",\n [SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER]: \"Program address cannot end with PDA marker.\",\n [SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.\",\n [SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.\",\n [SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: \"The network has progressed past the last block for which this transaction could have been committed.\",\n [SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY]: \"Codec [$codecDescription] cannot decode empty byte arrays.\",\n [SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS]: \"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.\",\n [SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL]: \"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH]: \"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH]: \"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH]: \"Encoder and decoder must either both be fixed-size or variable-size.\",\n [SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE]: \"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.\",\n [SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH]: \"Expected a fixed-size codec, got a variable-size one.\",\n [SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH]: \"Codec [$codecDescription] expected a positive byte length, got $bytesLength.\",\n [SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH]: \"Expected a variable-size codec, got a fixed-size one.\",\n [SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE]: \"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].\",\n [SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH]: \"Codec [$codecDescription] expected $expected bytes, got $bytesLength.\",\n [SOLANA_ERROR__CODECS__INVALID_CONSTANT]: \"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].\",\n [SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT]: \"Invalid discriminated union variant. Expected one of [$variants], got $value.\",\n [SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT]: \"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.\",\n [SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT]: \"Invalid literal union variant. Expected one of [$variants], got $value.\",\n [SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS]: \"Expected [$codecDescription] to have $expected items, got $actual.\",\n [SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE]: \"Invalid value $value for base $base with alphabet $alphabet.\",\n [SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE]: \"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.\",\n [SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE]: \"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.\",\n [SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE]: \"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.\",\n [SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES]: \"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].\",\n [SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE]: \"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.\",\n [SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED]: \"No random values implementation could be found.\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED]: \"instruction requires an uninitialized account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED]: \"instruction tries to borrow reference for an account which is already borrowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING]: \"instruction left account with an outstanding borrowed reference\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED]: \"program other than the account's owner changed the size of the account data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL]: \"account data too small for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE]: \"instruction expected an executable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT]: \"An account does not have enough lamports to be rent-exempt\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW]: \"Program arithmetic overflowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR]: \"Failed to serialize or deserialize account data: $encodedData\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS]: \"Builtin programs must consume compute units\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH]: \"Cross-program invocation call depth too deep\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED]: \"Computational budget exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM]: \"custom program error: #$code\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX]: \"instruction contains duplicate accounts\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC]: \"instruction modifications of multiply-passed account differ\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT]: \"executable accounts must be rent exempt\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED]: \"instruction changed executable accounts data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE]: \"instruction changed the balance of an executable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED]: \"instruction changed executable bit of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED]: \"instruction modified data of an account it does not own\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND]: \"instruction spent from the balance of an account it does not own\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR]: \"generic instruction error\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER]: \"Provided owner is not allowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE]: \"Account is immutable\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY]: \"Incorrect authority provided\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID]: \"incorrect program id for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS]: \"insufficient funds for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA]: \"invalid account data for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER]: \"Invalid account owner\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT]: \"invalid program argument\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR]: \"program returned invalid error code\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA]: \"invalid instruction data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC]: \"Failed to reallocate account data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS]: \"Provided seeds do not result in a valid address\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED]: \"Accounts data allocations exceeded the maximum allowed per transaction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED]: \"Max accounts exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED]: \"Max instruction trace length exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED]: \"Length of the seed is too long for address generation\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT]: \"An account required by the instruction is missing\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE]: \"missing required signature for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID]: \"instruction illegally modified the program id of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS]: \"insufficient account keys for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION]: \"Cross-program invocation with unauthorized signer or writable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE]: \"Failed to create program execution environment\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE]: \"Program failed to compile\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE]: \"Program failed to complete\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED]: \"instruction modified data of a read-only account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE]: \"instruction changed the balance of a read-only account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED]: \"Cross-program invocation reentrancy not allowed for this instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED]: \"instruction modified rent epoch of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION]: \"sum of account balances before and after instruction do not match\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT]: \"instruction requires an initialized account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN]: \"\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID]: \"Unsupported program id\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR]: \"Unsupported sysvar\",\n [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS]: \"The instruction does not have any accounts.\",\n [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA]: \"The instruction does not have any data.\",\n [SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH]: \"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.\",\n [SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH]: \"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__INVALID_NONCE]: \"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING]: \"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED]: \"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE]: \"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING]: \"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE]: \"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR]: \"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__INVALID_PARAMS]: \"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__INVALID_REQUEST]: \"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND]: \"JSON-RPC error: The method does not exist / is not available ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__PARSE_ERROR]: \"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__SCAN_ERROR]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED]: \"Minimum context slot has not been reached\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY]: \"Node is unhealthy; behind by $numSlotsBehind slots\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT]: \"No snapshot\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE]: \"Transaction simulation failed\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE]: \"Transaction history is not available from this node\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH]: \"Transaction signature length mismatch\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE]: \"Transaction signature verification failure\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION]: \"$__serverMessage\",\n [SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH]: \"Key pair bytes must be of length 64, got $byteLength.\",\n [SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH]: \"Expected private key bytes with length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH]: \"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.\",\n [SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY]: \"The provided private key does not match the provided public key.\",\n [SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.\",\n [SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE]: \"Lamports value must be in the range [0, 2e64-1]\",\n [SOLANA_ERROR__MALFORMED_BIGINT_STRING]: \"`$value` cannot be parsed as a `BigInt`\",\n [SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR]: \"$message\",\n [SOLANA_ERROR__MALFORMED_NUMBER_STRING]: \"`$value` cannot be parsed as a `Number`\",\n [SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND]: \"No nonce account could be found at address `$nonceAccountAddress`\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN]: \"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED]: \"WebSocket was closed before payload could be added to the send buffer\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED]: \"WebSocket connection closed\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT]: \"WebSocket failed to connect\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID]: \"Failed to obtain a subscription id from the server\",\n [SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD]: \"Could not find an API plan for RPC method: `$method`\",\n [SOLANA_ERROR__RPC__INTEGER_OVERFLOW]: \"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.\",\n [SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR]: \"HTTP error ($statusCode): $message\",\n [SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN]: \"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.\",\n [SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS]: \"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.\",\n [SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER]: \"The provided value does not implement the `KeyPairSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER]: \"The provided value does not implement the `MessageModifyingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER]: \"The provided value does not implement the `MessagePartialSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER]: \"The provided value does not implement any of the `MessageSigner` interfaces\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER]: \"The provided value does not implement the `TransactionModifyingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER]: \"The provided value does not implement the `TransactionPartialSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER]: \"The provided value does not implement the `TransactionSendingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER]: \"The provided value does not implement any of the `TransactionSigner` interfaces\",\n [SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS]: \"More than one `TransactionSendingSigner` was identified.\",\n [SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING]: \"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.\",\n [SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED]: \"Wallet account signers do not support signing multiple messages/transactions in a single operation\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY]: \"Cannot export a non-extractable key.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED]: \"No digest implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT]: \"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED]: \"This runtime does not support the generation of Ed25519 key pairs.\\n\\nInstall @solana/webcrypto-ed25519-polyfill and call its `install` function before generating keys in environments that do not support Ed25519.\\n\\nFor a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED]: \"No signature verification implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED]: \"No key generation implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED]: \"No signing implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED]: \"No key export implementation could be found.\",\n [SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE]: \"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING]: \"Transaction processing left an account with an outstanding borrowed reference\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE]: \"Account in use\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE]: \"Account loaded twice\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND]: \"Attempt to debit an account but found no record of a prior credit.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND]: \"Transaction loads an address table account that doesn't exist\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED]: \"This transaction has already been processed\",\n [SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND]: \"Blockhash not found\",\n [SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP]: \"Loader call chain is too deep\",\n [SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE]: \"Transactions are currently disabled due to cluster maintenance\",\n [SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION]: \"Transaction contains a duplicate instruction ($index) that is not allowed\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE]: \"Insufficient funds for fee\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT]: \"Transaction results in an account ($accountIndex) with insufficient funds for rent\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE]: \"This account may not be used to pay transaction fees\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX]: \"Transaction contains an invalid account reference\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA]: \"Transaction loads an address table account with invalid data\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX]: \"Transaction address table lookup uses an invalid index\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER]: \"Transaction loads an address table account with an invalid owner\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT]: \"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION]: \"This program may not be used for executing instructions\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT]: \"Transaction leaves an account with a lower balance than rent-exempt minimum\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT]: \"Transaction loads a writable account that cannot be written\",\n [SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED]: \"Transaction exceeded max loaded accounts data size cap\",\n [SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE]: \"Transaction requires a fee but has no signature present\",\n [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND]: \"Attempt to load a program that does not exist\",\n [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED]: \"Execution of the program referenced by account at index $accountIndex is temporarily restricted.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED]: \"ResanitizationNeeded\",\n [SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE]: \"Transaction failed to sanitize accounts offsets correctly\",\n [SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE]: \"Transaction did not pass signature verification\",\n [SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS]: \"Transaction locked too many accounts\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION]: \"Sum of account balances before and after transaction do not match\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN]: \"The transaction failed with the error `$errorName`\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION]: \"Transaction version is unsupported\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT]: \"Transaction would exceed account data limit within the block\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT]: \"Transaction would exceed total account data limit\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT]: \"Transaction would exceed max account limit within the block\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT]: \"Transaction would exceed max Block Cost Limit\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT]: \"Transaction would exceed max Vote Cost Limit\",\n [SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION]: \"Attempted to sign a transaction with an address that is not a signer for it\",\n [SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING]: \"Transaction is missing an address at index: $index.\",\n [SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES]: \"Transaction has no expected signers therefore it cannot be encoded\",\n [SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT]: \"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes\",\n [SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME]: \"Transaction does not have a blockhash lifetime\",\n [SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME]: \"Transaction is not a durable nonce transaction\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING]: \"Contents of these address lookup tables unknown: $lookupTableAddresses\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE]: \"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING]: \"No fee payer set in CompiledTransaction\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND]: \"Could not find program address at index $index\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT]: \"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more\",\n [SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT]: \"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more\",\n [SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING]: \"Transaction is missing a fee payer.\",\n [SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING]: \"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.\",\n [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE]: \"Transaction first instruction is not advance nonce account instruction.\",\n [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING]: \"Transaction with no instructions cannot be durable nonce transaction.\",\n [SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES]: \"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees\",\n [SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE]: \"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable\",\n [SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH]: \"The transaction message expected the transaction to have $signerAddressesLength signatures, got $signaturesLength.\",\n [SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING]: \"Transaction is missing signatures for addresses: $addresses.\",\n [SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE]: \"Transaction version must be in the range [0, 127]. `$actualVersion` given\"\n };\n var START_INDEX = \"i\";\n var TYPE = \"t\";\n function getHumanReadableErrorMessage(code, context = {}) {\n const messageFormatString = SolanaErrorMessages[code];\n if (messageFormatString.length === 0) {\n return \"\";\n }\n let state;\n function commitStateUpTo(endIndex) {\n if (state[TYPE] === 2) {\n const variableName = messageFormatString.slice(state[START_INDEX] + 1, endIndex);\n fragments.push(\n variableName in context ? (\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n `${context[variableName]}`\n ) : `$${variableName}`\n );\n } else if (state[TYPE] === 1) {\n fragments.push(messageFormatString.slice(state[START_INDEX], endIndex));\n }\n }\n const fragments = [];\n messageFormatString.split(\"\").forEach((char, ii) => {\n if (ii === 0) {\n state = {\n [START_INDEX]: 0,\n [TYPE]: messageFormatString[0] === \"\\\\\" ? 0 : messageFormatString[0] === \"$\" ? 2 : 1\n /* Text */\n };\n return;\n }\n let nextState;\n switch (state[TYPE]) {\n case 0:\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 1\n /* Text */\n };\n break;\n case 1:\n if (char === \"\\\\\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 0\n /* EscapeSequence */\n };\n } else if (char === \"$\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 2\n /* Variable */\n };\n }\n break;\n case 2:\n if (char === \"\\\\\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 0\n /* EscapeSequence */\n };\n } else if (char === \"$\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 2\n /* Variable */\n };\n } else if (!char.match(/\\w/)) {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 1\n /* Text */\n };\n }\n break;\n }\n if (nextState) {\n if (state !== nextState) {\n commitStateUpTo(ii);\n }\n state = nextState;\n }\n });\n commitStateUpTo();\n return fragments.join(\"\");\n }\n function getErrorMessage(code, context = {}) {\n if (true) {\n return getHumanReadableErrorMessage(code, context);\n } else {\n let decodingAdviceMessage = `Solana error #${code}; Decode this error by running \\`npx @solana/errors decode -- ${code}`;\n if (Object.keys(context).length) {\n decodingAdviceMessage += ` '${encodeContextObject(context)}'`;\n }\n return `${decodingAdviceMessage}\\``;\n }\n }\n var SolanaError = class extends Error {\n /**\n * Indicates the root cause of this {@link SolanaError}, if any.\n *\n * For example, a transaction error might have an instruction error as its root cause. In this\n * case, you will be able to access the instruction error on the transaction error as `cause`.\n */\n cause = this.cause;\n /**\n * Contains context that can assist in understanding or recovering from a {@link SolanaError}.\n */\n context;\n constructor(...[code, contextAndErrorOptions]) {\n let context;\n let errorOptions;\n if (contextAndErrorOptions) {\n const { cause, ...contextRest } = contextAndErrorOptions;\n if (cause) {\n errorOptions = { cause };\n }\n if (Object.keys(contextRest).length > 0) {\n context = contextRest;\n }\n }\n const message = getErrorMessage(code, context);\n super(message, errorOptions);\n this.context = {\n __code: code,\n ...context\n };\n this.name = \"SolanaError\";\n }\n };\n\n // ../../../node_modules/.pnpm/@solana+codecs-core@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-core/dist/index.browser.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n function getEncodedSize(value, encoder) {\n return \"fixedSize\" in encoder ? encoder.fixedSize : encoder.getSizeFromValue(value);\n }\n function createEncoder(encoder) {\n return Object.freeze({\n ...encoder,\n encode: (value) => {\n const bytes = new Uint8Array(getEncodedSize(value, encoder));\n encoder.write(value, bytes, 0);\n return bytes;\n }\n });\n }\n function createDecoder(decoder) {\n return Object.freeze({\n ...decoder,\n decode: (bytes, offset2 = 0) => decoder.read(bytes, offset2)[0]\n });\n }\n function isFixedSize(codec) {\n return \"fixedSize\" in codec && typeof codec.fixedSize === \"number\";\n }\n function combineCodec(encoder, decoder) {\n if (isFixedSize(encoder) !== isFixedSize(decoder)) {\n throw new SolanaError(SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH);\n }\n if (isFixedSize(encoder) && isFixedSize(decoder) && encoder.fixedSize !== decoder.fixedSize) {\n throw new SolanaError(SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH, {\n decoderFixedSize: decoder.fixedSize,\n encoderFixedSize: encoder.fixedSize\n });\n }\n if (!isFixedSize(encoder) && !isFixedSize(decoder) && encoder.maxSize !== decoder.maxSize) {\n throw new SolanaError(SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH, {\n decoderMaxSize: decoder.maxSize,\n encoderMaxSize: encoder.maxSize\n });\n }\n return {\n ...decoder,\n ...encoder,\n decode: decoder.decode,\n encode: encoder.encode,\n read: decoder.read,\n write: encoder.write\n };\n }\n function assertByteArrayIsNotEmptyForCodec(codecDescription, bytes, offset2 = 0) {\n if (bytes.length - offset2 <= 0) {\n throw new SolanaError(SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY, {\n codecDescription\n });\n }\n }\n function assertByteArrayHasEnoughBytesForCodec(codecDescription, expected, bytes, offset2 = 0) {\n const bytesLength = bytes.length - offset2;\n if (bytesLength < expected) {\n throw new SolanaError(SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH, {\n bytesLength,\n codecDescription,\n expected\n });\n }\n }\n\n // ../../../node_modules/.pnpm/@solana+codecs-numbers@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-numbers/dist/index.browser.mjs\n function assertNumberIsBetweenForCodec(codecDescription, min, max, value) {\n if (value < min || value > max) {\n throw new SolanaError(SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE, {\n codecDescription,\n max,\n min,\n value\n });\n }\n }\n function isLittleEndian(config) {\n return config?.endian === 1 ? false : true;\n }\n function numberEncoderFactory(input) {\n return createEncoder({\n fixedSize: input.size,\n write(value, bytes, offset2) {\n if (input.range) {\n assertNumberIsBetweenForCodec(input.name, input.range[0], input.range[1], value);\n }\n const arrayBuffer = new ArrayBuffer(input.size);\n input.set(new DataView(arrayBuffer), value, isLittleEndian(input.config));\n bytes.set(new Uint8Array(arrayBuffer), offset2);\n return offset2 + input.size;\n }\n });\n }\n function numberDecoderFactory(input) {\n return createDecoder({\n fixedSize: input.size,\n read(bytes, offset2 = 0) {\n assertByteArrayIsNotEmptyForCodec(input.name, bytes, offset2);\n assertByteArrayHasEnoughBytesForCodec(input.name, input.size, bytes, offset2);\n const view = new DataView(toArrayBuffer(bytes, offset2, input.size));\n return [input.get(view, isLittleEndian(input.config)), offset2 + input.size];\n }\n });\n }\n function toArrayBuffer(bytes, offset2, length) {\n const bytesOffset = bytes.byteOffset + (offset2 ?? 0);\n const bytesLength = length ?? bytes.byteLength;\n return bytes.buffer.slice(bytesOffset, bytesOffset + bytesLength);\n }\n var getU64Encoder = (config = {}) => numberEncoderFactory({\n config,\n name: \"u64\",\n range: [0n, BigInt(\"0xffffffffffffffff\")],\n set: (view, value, le) => view.setBigUint64(0, BigInt(value), le),\n size: 8\n });\n var getU64Decoder = (config = {}) => numberDecoderFactory({\n config,\n get: (view, le) => view.getBigUint64(0, le),\n name: \"u64\",\n size: 8\n });\n var getU64Codec = (config = {}) => combineCodec(getU64Encoder(config), getU64Decoder(config));\n\n // ../../../node_modules/.pnpm/superstruct@2.0.2/node_modules/superstruct/dist/index.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n var StructError = class extends TypeError {\n constructor(failure, failures) {\n let cached;\n const { message, explanation, ...rest } = failure;\n const { path } = failure;\n const msg = path.length === 0 ? message : `At path: ${path.join(\".\")} -- ${message}`;\n super(explanation ?? msg);\n if (explanation != null)\n this.cause = msg;\n Object.assign(this, rest);\n this.name = this.constructor.name;\n this.failures = () => {\n return cached ?? (cached = [failure, ...failures()]);\n };\n }\n };\n function isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === \"function\";\n }\n function isObject(x) {\n return typeof x === \"object\" && x != null;\n }\n function isNonArrayObject(x) {\n return isObject(x) && !Array.isArray(x);\n }\n function print(value) {\n if (typeof value === \"symbol\") {\n return value.toString();\n }\n return typeof value === \"string\" ? JSON.stringify(value) : `${value}`;\n }\n function shiftIterator(input) {\n const { done, value } = input.next();\n return done ? void 0 : value;\n }\n function toFailure(result, context, struct2, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === \"string\") {\n result = { message: result };\n }\n const { path, branch } = context;\n const { type: type2 } = struct2;\n const { refinement, message = `Expected a value of type \\`${type2}\\`${refinement ? ` with refinement \\`${refinement}\\`` : \"\"}, but received: \\`${print(value)}\\`` } = result;\n return {\n value,\n type: type2,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message\n };\n }\n function* toFailures(result, context, struct2, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n for (const r of result) {\n const failure = toFailure(r, context, struct2, value);\n if (failure) {\n yield failure;\n }\n }\n }\n function* run(value, struct2, options = {}) {\n const { path = [], branch = [value], coerce: coerce2 = false, mask: mask2 = false } = options;\n const ctx = { path, branch, mask: mask2 };\n if (coerce2) {\n value = struct2.coercer(value, ctx);\n }\n let status = \"valid\";\n for (const failure of struct2.validator(value, ctx)) {\n failure.explanation = options.message;\n status = \"not_valid\";\n yield [failure, void 0];\n }\n for (let [k, v, s] of struct2.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === void 0 ? path : [...path, k],\n branch: k === void 0 ? branch : [...branch, v],\n coerce: coerce2,\n mask: mask2,\n message: options.message\n });\n for (const t of ts) {\n if (t[0]) {\n status = t[0].refinement != null ? \"not_refined\" : \"not_valid\";\n yield [t[0], void 0];\n } else if (coerce2) {\n v = t[1];\n if (k === void 0) {\n value = v;\n } else if (value instanceof Map) {\n value.set(k, v);\n } else if (value instanceof Set) {\n value.add(v);\n } else if (isObject(value)) {\n if (v !== void 0 || k in value)\n value[k] = v;\n }\n }\n }\n }\n if (status !== \"not_valid\") {\n for (const failure of struct2.refiner(value, ctx)) {\n failure.explanation = options.message;\n status = \"not_refined\";\n yield [failure, void 0];\n }\n }\n if (status === \"valid\") {\n yield [void 0, value];\n }\n }\n var Struct = class {\n constructor(props) {\n const { type: type2, schema, validator, refiner, coercer = (value) => value, entries = function* () {\n } } = props;\n this.type = type2;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.validator = () => [];\n }\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n assert(value, message) {\n return assert(value, this, message);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n create(value, message) {\n return create(value, this, message);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema. Masking applies recursively to\n * props of `object` structs only.\n */\n mask(value, message) {\n return mask(value, this, message);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `coerce` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful. Also, `mask` will turn on\n * masking of the unknown `object` props recursively if passed.\n */\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n };\n function assert(value, struct2, message) {\n const result = validate(value, struct2, { message });\n if (result[0]) {\n throw result[0];\n }\n }\n function create(value, struct2, message) {\n const result = validate(value, struct2, { coerce: true, message });\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n }\n function mask(value, struct2, message) {\n const result = validate(value, struct2, { coerce: true, mask: true, message });\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n }\n function is(value, struct2) {\n const result = validate(value, struct2);\n return !result[0];\n }\n function validate(value, struct2, options = {}) {\n const tuples = run(value, struct2, options);\n const tuple2 = shiftIterator(tuples);\n if (tuple2[0]) {\n const error = new StructError(tuple2[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, void 0];\n } else {\n const v = tuple2[1];\n return [void 0, v];\n }\n }\n function define(name, validator) {\n return new Struct({ type: name, schema: null, validator });\n }\n function any() {\n return define(\"any\", () => true);\n }\n function array(Element) {\n return new Struct({\n type: \"array\",\n schema: Element,\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n validator(value) {\n return Array.isArray(value) || `Expected an array value, but received: ${print(value)}`;\n }\n });\n }\n function boolean() {\n return define(\"boolean\", (value) => {\n return typeof value === \"boolean\";\n });\n }\n function instance(Class) {\n return define(\"instance\", (value) => {\n return value instanceof Class || `Expected a \\`${Class.name}\\` instance, but received: ${print(value)}`;\n });\n }\n function literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: \"literal\",\n schema: t === \"string\" || t === \"number\" || t === \"boolean\" ? constant : null,\n validator(value) {\n return value === constant || `Expected the literal \\`${description}\\`, but received: ${print(value)}`;\n }\n });\n }\n function never() {\n return define(\"never\", () => false);\n }\n function nullable(struct2) {\n return new Struct({\n ...struct2,\n validator: (value, ctx) => value === null || struct2.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct2.refiner(value, ctx)\n });\n }\n function number() {\n return define(\"number\", (value) => {\n return typeof value === \"number\" && !isNaN(value) || `Expected a number, but received: ${print(value)}`;\n });\n }\n function optional(struct2) {\n return new Struct({\n ...struct2,\n validator: (value, ctx) => value === void 0 || struct2.validator(value, ctx),\n refiner: (value, ctx) => value === void 0 || struct2.refiner(value, ctx)\n });\n }\n function record(Key, Value) {\n return new Struct({\n type: \"record\",\n schema: null,\n *entries(value) {\n if (isObject(value)) {\n for (const k in value) {\n const v = value[k];\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n validator(value) {\n return isNonArrayObject(value) || `Expected an object, but received: ${print(value)}`;\n },\n coercer(value) {\n return isNonArrayObject(value) ? { ...value } : value;\n }\n });\n }\n function string() {\n return define(\"string\", (value) => {\n return typeof value === \"string\" || `Expected a string, but received: ${print(value)}`;\n });\n }\n function tuple(Structs) {\n const Never = never();\n return new Struct({\n type: \"tuple\",\n schema: null,\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Structs.length, value.length);\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Structs[i] || Never];\n }\n }\n },\n validator(value) {\n return Array.isArray(value) || `Expected an array, but received: ${print(value)}`;\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n }\n });\n }\n function type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: \"type\",\n schema,\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n validator(value) {\n return isNonArrayObject(value) || `Expected an object, but received: ${print(value)}`;\n },\n coercer(value) {\n return isNonArrayObject(value) ? { ...value } : value;\n }\n });\n }\n function union(Structs) {\n const description = Structs.map((s) => s.type).join(\" | \");\n return new Struct({\n type: \"union\",\n schema: null,\n coercer(value, ctx) {\n for (const S of Structs) {\n const [error, coerced] = S.validate(value, {\n coerce: true,\n mask: ctx.mask\n });\n if (!error) {\n return coerced;\n }\n }\n return value;\n },\n validator(value, ctx) {\n const failures = [];\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n return [\n `Expected the value to satisfy a union of \\`${description}\\`, but received: ${print(value)}`,\n ...failures\n ];\n }\n });\n }\n function unknown() {\n return define(\"unknown\", () => true);\n }\n function coerce(struct2, condition, coercer) {\n return new Struct({\n ...struct2,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct2.coercer(coercer(value, ctx), ctx) : struct2.coercer(value, ctx);\n }\n });\n }\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n var import_browser = __toESM(require_browser());\n\n // ../../../node_modules/.pnpm/rpc-websockets@9.1.3/node_modules/rpc-websockets/dist/index.browser.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n init_buffer();\n\n // ../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n var import_index = __toESM(require_eventemitter3(), 1);\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha3.js\n init_dirname();\n init_buffer2();\n init_process2();\n var _0n6 = BigInt(0);\n var _1n6 = BigInt(1);\n var _2n4 = BigInt(2);\n var _7n2 = BigInt(7);\n var _256n = BigInt(256);\n var _0x71n = BigInt(113);\n var SHA3_PI = [];\n var SHA3_ROTL = [];\n var _SHA3_IOTA = [];\n for (let round = 0, R = _1n6, x = 1, y = 0; round < 24; round++) {\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);\n let t = _0n6;\n for (let j = 0; j < 7; j++) {\n R = (R << _1n6 ^ (R >> _7n2) * _0x71n) % _256n;\n if (R & _2n4)\n t ^= _1n6 << (_1n6 << /* @__PURE__ */ BigInt(j)) - _1n6;\n }\n _SHA3_IOTA.push(t);\n }\n var IOTAS = split(_SHA3_IOTA, true);\n var SHA3_IOTA_H = IOTAS[0];\n var SHA3_IOTA_L = IOTAS[1];\n var rotlH = (h, l, s) => s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s);\n var rotlL = (h, l, s) => s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s);\n function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n for (let round = 24 - rounds; round < 24; round++) {\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n clean(B);\n }\n var Keccak = class _Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n this.enableXOF = false;\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n anumber(outputLen);\n if (!(0 < blockLen && blockLen < 200))\n throw new Error(\"only keccak-f1600 function is supported\");\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n clone() {\n return this._cloneInto();\n }\n keccak() {\n swap32IfBE(this.state32);\n keccakP(this.state32, this.rounds);\n swap32IfBE(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n aexists(this);\n data = toBytes(data);\n abytes(data);\n const { blockLen, state } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n state[pos] ^= suffix;\n if ((suffix & 128) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 128;\n this.keccak();\n }\n writeInto(out) {\n aexists(this, false);\n abytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len; ) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n if (!this.enableXOF)\n throw new Error(\"XOF is not possible for this instance\");\n return this.writeInto(out);\n }\n xof(bytes) {\n anumber(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n aoutput(out, this);\n if (this.finished)\n throw new Error(\"digest() was already called\");\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n clean(this.state);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n };\n var gen = (suffix, blockLen, outputLen) => createHasher(() => new Keccak(blockLen, suffix, outputLen));\n var keccak_256 = /* @__PURE__ */ (() => gen(1, 136, 256 / 8))();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/secp256k1.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/_shortw_utils.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/weierstrass.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js\n init_dirname();\n init_buffer2();\n init_process2();\n var HMAC = class extends Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n ahash(hash);\n const key = toBytes(_key);\n this.iHash = hash.create();\n if (typeof this.iHash.update !== \"function\")\n throw new Error(\"Expected instance of class which extends utils.Hash\");\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad = new Uint8Array(blockLen);\n pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 54;\n this.iHash.update(pad);\n this.oHash = hash.create();\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 54 ^ 92;\n this.oHash.update(pad);\n clean(pad);\n }\n update(buf) {\n aexists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n aexists(this);\n abytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n };\n var hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\n hmac.create = (hash, key) => new HMAC(hash, key);\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/weierstrass.js\n var divNearest = (num, den) => (num + (num >= 0 ? den : -den) / _2n5) / den;\n function _splitEndoScalar(k, basis, n) {\n const [[a1, b1], [a2, b2]] = basis;\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = k - c1 * a1 - c2 * a2;\n let k2 = -c1 * b1 - c2 * b2;\n const k1neg = k1 < _0n7;\n const k2neg = k2 < _0n7;\n if (k1neg)\n k1 = -k1;\n if (k2neg)\n k2 = -k2;\n const MAX_NUM = bitMask(Math.ceil(bitLen(n) / 2)) + _1n7;\n if (k1 < _0n7 || k1 >= MAX_NUM || k2 < _0n7 || k2 >= MAX_NUM) {\n throw new Error(\"splitScalar (endomorphism): failed, k=\" + k);\n }\n return { k1neg, k1, k2neg, k2 };\n }\n function validateSigFormat(format) {\n if (![\"compact\", \"recovered\", \"der\"].includes(format))\n throw new Error('Signature format must be \"compact\", \"recovered\", or \"der\"');\n return format;\n }\n function validateSigOpts(opts, def) {\n const optsn = {};\n for (let optName of Object.keys(def)) {\n optsn[optName] = opts[optName] === void 0 ? def[optName] : opts[optName];\n }\n _abool2(optsn.lowS, \"lowS\");\n _abool2(optsn.prehash, \"prehash\");\n if (optsn.format !== void 0)\n validateSigFormat(optsn.format);\n return optsn;\n }\n var DERErr = class extends Error {\n constructor(m = \"\") {\n super(m);\n }\n };\n var DER = {\n // asn.1 DER encoding utils\n Err: DERErr,\n // Basic building block is TLV (Tag-Length-Value)\n _tlv: {\n encode: (tag, data) => {\n const { Err: E } = DER;\n if (tag < 0 || tag > 256)\n throw new E(\"tlv.encode: wrong tag\");\n if (data.length & 1)\n throw new E(\"tlv.encode: unpadded data\");\n const dataLen = data.length / 2;\n const len = numberToHexUnpadded(dataLen);\n if (len.length / 2 & 128)\n throw new E(\"tlv.encode: long form length too big\");\n const lenLen = dataLen > 127 ? numberToHexUnpadded(len.length / 2 | 128) : \"\";\n const t = numberToHexUnpadded(tag);\n return t + lenLen + len + data;\n },\n // v - value, l - left bytes (unparsed)\n decode(tag, data) {\n const { Err: E } = DER;\n let pos = 0;\n if (tag < 0 || tag > 256)\n throw new E(\"tlv.encode: wrong tag\");\n if (data.length < 2 || data[pos++] !== tag)\n throw new E(\"tlv.decode: wrong tlv\");\n const first = data[pos++];\n const isLong = !!(first & 128);\n let length = 0;\n if (!isLong)\n length = first;\n else {\n const lenLen = first & 127;\n if (!lenLen)\n throw new E(\"tlv.decode(long): indefinite length not supported\");\n if (lenLen > 4)\n throw new E(\"tlv.decode(long): byte length is too big\");\n const lengthBytes = data.subarray(pos, pos + lenLen);\n if (lengthBytes.length !== lenLen)\n throw new E(\"tlv.decode: length bytes not complete\");\n if (lengthBytes[0] === 0)\n throw new E(\"tlv.decode(long): zero leftmost byte\");\n for (const b of lengthBytes)\n length = length << 8 | b;\n pos += lenLen;\n if (length < 128)\n throw new E(\"tlv.decode(long): not minimal encoding\");\n }\n const v = data.subarray(pos, pos + length);\n if (v.length !== length)\n throw new E(\"tlv.decode: wrong value length\");\n return { v, l: data.subarray(pos + length) };\n }\n },\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n _int: {\n encode(num) {\n const { Err: E } = DER;\n if (num < _0n7)\n throw new E(\"integer: negative integers are not allowed\");\n let hex = numberToHexUnpadded(num);\n if (Number.parseInt(hex[0], 16) & 8)\n hex = \"00\" + hex;\n if (hex.length & 1)\n throw new E(\"unexpected DER parsing assertion: unpadded hex\");\n return hex;\n },\n decode(data) {\n const { Err: E } = DER;\n if (data[0] & 128)\n throw new E(\"invalid signature integer: negative\");\n if (data[0] === 0 && !(data[1] & 128))\n throw new E(\"invalid signature integer: unnecessary leading zero\");\n return bytesToNumberBE(data);\n }\n },\n toSig(hex) {\n const { Err: E, _int: int, _tlv: tlv } = DER;\n const data = ensureBytes(\"signature\", hex);\n const { v: seqBytes, l: seqLeftBytes } = tlv.decode(48, data);\n if (seqLeftBytes.length)\n throw new E(\"invalid signature: left bytes after parsing\");\n const { v: rBytes, l: rLeftBytes } = tlv.decode(2, seqBytes);\n const { v: sBytes, l: sLeftBytes } = tlv.decode(2, rLeftBytes);\n if (sLeftBytes.length)\n throw new E(\"invalid signature: left bytes after parsing\");\n return { r: int.decode(rBytes), s: int.decode(sBytes) };\n },\n hexFromSig(sig) {\n const { _tlv: tlv, _int: int } = DER;\n const rs = tlv.encode(2, int.encode(sig.r));\n const ss = tlv.encode(2, int.encode(sig.s));\n const seq2 = rs + ss;\n return tlv.encode(48, seq2);\n }\n };\n var _0n7 = BigInt(0);\n var _1n7 = BigInt(1);\n var _2n5 = BigInt(2);\n var _3n3 = BigInt(3);\n var _4n2 = BigInt(4);\n function _normFnElement(Fn2, key) {\n const { BYTES: expected } = Fn2;\n let num;\n if (typeof key === \"bigint\") {\n num = key;\n } else {\n let bytes = ensureBytes(\"private key\", key);\n try {\n num = Fn2.fromBytes(bytes);\n } catch (error) {\n throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof key}`);\n }\n }\n if (!Fn2.isValidNot0(num))\n throw new Error(\"invalid private key: out of range [1..N-1]\");\n return num;\n }\n function weierstrassN(params, extraOpts = {}) {\n const validated = _createCurveFields(\"weierstrass\", params, extraOpts);\n const { Fp: Fp2, Fn: Fn2 } = validated;\n let CURVE = validated.CURVE;\n const { h: cofactor, n: CURVE_ORDER } = CURVE;\n _validateObject(extraOpts, {}, {\n allowInfinityPoint: \"boolean\",\n clearCofactor: \"function\",\n isTorsionFree: \"function\",\n fromBytes: \"function\",\n toBytes: \"function\",\n endo: \"object\",\n wrapPrivateKey: \"boolean\"\n });\n const { endo } = extraOpts;\n if (endo) {\n if (!Fp2.is0(CURVE.a) || typeof endo.beta !== \"bigint\" || !Array.isArray(endo.basises)) {\n throw new Error('invalid endo: expected \"beta\": bigint and \"basises\": array');\n }\n }\n const lengths = getWLengths(Fp2, Fn2);\n function assertCompressionIsSupported() {\n if (!Fp2.isOdd)\n throw new Error(\"compression is not supported: Field does not have .isOdd()\");\n }\n function pointToBytes(_c, point, isCompressed) {\n const { x, y } = point.toAffine();\n const bx = Fp2.toBytes(x);\n _abool2(isCompressed, \"isCompressed\");\n if (isCompressed) {\n assertCompressionIsSupported();\n const hasEvenY = !Fp2.isOdd(y);\n return concatBytes(pprefix(hasEvenY), bx);\n } else {\n return concatBytes(Uint8Array.of(4), bx, Fp2.toBytes(y));\n }\n }\n function pointFromBytes(bytes) {\n _abytes2(bytes, void 0, \"Point\");\n const { publicKey: comp, publicKeyUncompressed: uncomp } = lengths;\n const length = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (length === comp && (head === 2 || head === 3)) {\n const x = Fp2.fromBytes(tail);\n if (!Fp2.isValid(x))\n throw new Error(\"bad point: is not on curve, wrong x\");\n const y2 = weierstrassEquation(x);\n let y;\n try {\n y = Fp2.sqrt(y2);\n } catch (sqrtError) {\n const err = sqrtError instanceof Error ? \": \" + sqrtError.message : \"\";\n throw new Error(\"bad point: is not on curve, sqrt error\" + err);\n }\n assertCompressionIsSupported();\n const isYOdd = Fp2.isOdd(y);\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y = Fp2.neg(y);\n return { x, y };\n } else if (length === uncomp && head === 4) {\n const L = Fp2.BYTES;\n const x = Fp2.fromBytes(tail.subarray(0, L));\n const y = Fp2.fromBytes(tail.subarray(L, L * 2));\n if (!isValidXY(x, y))\n throw new Error(\"bad point: is not on curve\");\n return { x, y };\n } else {\n throw new Error(`bad point: got length ${length}, expected compressed=${comp} or uncompressed=${uncomp}`);\n }\n }\n const encodePoint = extraOpts.toBytes || pointToBytes;\n const decodePoint = extraOpts.fromBytes || pointFromBytes;\n function weierstrassEquation(x) {\n const x2 = Fp2.sqr(x);\n const x3 = Fp2.mul(x2, x);\n return Fp2.add(Fp2.add(x3, Fp2.mul(x, CURVE.a)), CURVE.b);\n }\n function isValidXY(x, y) {\n const left = Fp2.sqr(y);\n const right = weierstrassEquation(x);\n return Fp2.eql(left, right);\n }\n if (!isValidXY(CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n const _4a3 = Fp2.mul(Fp2.pow(CURVE.a, _3n3), _4n2);\n const _27b2 = Fp2.mul(Fp2.sqr(CURVE.b), BigInt(27));\n if (Fp2.is0(Fp2.add(_4a3, _27b2)))\n throw new Error(\"bad curve params: a or b\");\n function acoord(title, n, banZero = false) {\n if (!Fp2.isValid(n) || banZero && Fp2.is0(n))\n throw new Error(`bad point coordinate ${title}`);\n return n;\n }\n function aprjpoint(other) {\n if (!(other instanceof Point))\n throw new Error(\"ProjectivePoint expected\");\n }\n function splitEndoScalarN(k) {\n if (!endo || !endo.basises)\n throw new Error(\"no endo\");\n return _splitEndoScalar(k, endo.basises, Fn2.ORDER);\n }\n const toAffineMemo = memoized((p, iz) => {\n const { X, Y, Z } = p;\n if (Fp2.eql(Z, Fp2.ONE))\n return { x: X, y: Y };\n const is0 = p.is0();\n if (iz == null)\n iz = is0 ? Fp2.ONE : Fp2.inv(Z);\n const x = Fp2.mul(X, iz);\n const y = Fp2.mul(Y, iz);\n const zz = Fp2.mul(Z, iz);\n if (is0)\n return { x: Fp2.ZERO, y: Fp2.ZERO };\n if (!Fp2.eql(zz, Fp2.ONE))\n throw new Error(\"invZ was invalid\");\n return { x, y };\n });\n const assertValidMemo = memoized((p) => {\n if (p.is0()) {\n if (extraOpts.allowInfinityPoint && !Fp2.is0(p.Y))\n return;\n throw new Error(\"bad point: ZERO\");\n }\n const { x, y } = p.toAffine();\n if (!Fp2.isValid(x) || !Fp2.isValid(y))\n throw new Error(\"bad point: x or y not field elements\");\n if (!isValidXY(x, y))\n throw new Error(\"bad point: equation left != right\");\n if (!p.isTorsionFree())\n throw new Error(\"bad point: not in prime-order subgroup\");\n return true;\n });\n function finishEndo(endoBeta, k1p, k2p, k1neg, k2neg) {\n k2p = new Point(Fp2.mul(k2p.X, endoBeta), k2p.Y, k2p.Z);\n k1p = negateCt(k1neg, k1p);\n k2p = negateCt(k2neg, k2p);\n return k1p.add(k2p);\n }\n class Point {\n /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n constructor(X, Y, Z) {\n this.X = acoord(\"x\", X);\n this.Y = acoord(\"y\", Y, true);\n this.Z = acoord(\"z\", Z);\n Object.freeze(this);\n }\n static CURVE() {\n return CURVE;\n }\n /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n static fromAffine(p) {\n const { x, y } = p || {};\n if (!p || !Fp2.isValid(x) || !Fp2.isValid(y))\n throw new Error(\"invalid affine point\");\n if (p instanceof Point)\n throw new Error(\"projective point not allowed\");\n if (Fp2.is0(x) && Fp2.is0(y))\n return Point.ZERO;\n return new Point(x, y, Fp2.ONE);\n }\n static fromBytes(bytes) {\n const P = Point.fromAffine(decodePoint(_abytes2(bytes, void 0, \"point\")));\n P.assertValidity();\n return P;\n }\n static fromHex(hex) {\n return Point.fromBytes(ensureBytes(\"pointHex\", hex));\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n *\n * @param windowSize\n * @param isLazy true will defer table computation until the first multiplication\n * @returns\n */\n precompute(windowSize = 8, isLazy = true) {\n wnaf.createCache(this, windowSize);\n if (!isLazy)\n this.multiply(_3n3);\n return this;\n }\n // TODO: return `this`\n /** A point on curve is valid if it conforms to equation. */\n assertValidity() {\n assertValidMemo(this);\n }\n hasEvenY() {\n const { y } = this.toAffine();\n if (!Fp2.isOdd)\n throw new Error(\"Field doesn't support isOdd\");\n return !Fp2.isOdd(y);\n }\n /** Compare one point to another. */\n equals(other) {\n aprjpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n const U1 = Fp2.eql(Fp2.mul(X1, Z2), Fp2.mul(X2, Z1));\n const U2 = Fp2.eql(Fp2.mul(Y1, Z2), Fp2.mul(Y2, Z1));\n return U1 && U2;\n }\n /** Flips point to one corresponding to (x, -y) in Affine coordinates. */\n negate() {\n return new Point(this.X, Fp2.neg(this.Y), this.Z);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a, b } = CURVE;\n const b3 = Fp2.mul(b, _3n3);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n let X3 = Fp2.ZERO, Y3 = Fp2.ZERO, Z3 = Fp2.ZERO;\n let t0 = Fp2.mul(X1, X1);\n let t1 = Fp2.mul(Y1, Y1);\n let t2 = Fp2.mul(Z1, Z1);\n let t3 = Fp2.mul(X1, Y1);\n t3 = Fp2.add(t3, t3);\n Z3 = Fp2.mul(X1, Z1);\n Z3 = Fp2.add(Z3, Z3);\n X3 = Fp2.mul(a, Z3);\n Y3 = Fp2.mul(b3, t2);\n Y3 = Fp2.add(X3, Y3);\n X3 = Fp2.sub(t1, Y3);\n Y3 = Fp2.add(t1, Y3);\n Y3 = Fp2.mul(X3, Y3);\n X3 = Fp2.mul(t3, X3);\n Z3 = Fp2.mul(b3, Z3);\n t2 = Fp2.mul(a, t2);\n t3 = Fp2.sub(t0, t2);\n t3 = Fp2.mul(a, t3);\n t3 = Fp2.add(t3, Z3);\n Z3 = Fp2.add(t0, t0);\n t0 = Fp2.add(Z3, t0);\n t0 = Fp2.add(t0, t2);\n t0 = Fp2.mul(t0, t3);\n Y3 = Fp2.add(Y3, t0);\n t2 = Fp2.mul(Y1, Z1);\n t2 = Fp2.add(t2, t2);\n t0 = Fp2.mul(t2, t3);\n X3 = Fp2.sub(X3, t0);\n Z3 = Fp2.mul(t2, t1);\n Z3 = Fp2.add(Z3, Z3);\n Z3 = Fp2.add(Z3, Z3);\n return new Point(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n aprjpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n let X3 = Fp2.ZERO, Y3 = Fp2.ZERO, Z3 = Fp2.ZERO;\n const a = CURVE.a;\n const b3 = Fp2.mul(CURVE.b, _3n3);\n let t0 = Fp2.mul(X1, X2);\n let t1 = Fp2.mul(Y1, Y2);\n let t2 = Fp2.mul(Z1, Z2);\n let t3 = Fp2.add(X1, Y1);\n let t4 = Fp2.add(X2, Y2);\n t3 = Fp2.mul(t3, t4);\n t4 = Fp2.add(t0, t1);\n t3 = Fp2.sub(t3, t4);\n t4 = Fp2.add(X1, Z1);\n let t5 = Fp2.add(X2, Z2);\n t4 = Fp2.mul(t4, t5);\n t5 = Fp2.add(t0, t2);\n t4 = Fp2.sub(t4, t5);\n t5 = Fp2.add(Y1, Z1);\n X3 = Fp2.add(Y2, Z2);\n t5 = Fp2.mul(t5, X3);\n X3 = Fp2.add(t1, t2);\n t5 = Fp2.sub(t5, X3);\n Z3 = Fp2.mul(a, t4);\n X3 = Fp2.mul(b3, t2);\n Z3 = Fp2.add(X3, Z3);\n X3 = Fp2.sub(t1, Z3);\n Z3 = Fp2.add(t1, Z3);\n Y3 = Fp2.mul(X3, Z3);\n t1 = Fp2.add(t0, t0);\n t1 = Fp2.add(t1, t0);\n t2 = Fp2.mul(a, t2);\n t4 = Fp2.mul(b3, t4);\n t1 = Fp2.add(t1, t2);\n t2 = Fp2.sub(t0, t2);\n t2 = Fp2.mul(a, t2);\n t4 = Fp2.add(t4, t2);\n t0 = Fp2.mul(t1, t4);\n Y3 = Fp2.add(Y3, t0);\n t0 = Fp2.mul(t5, t4);\n X3 = Fp2.mul(t3, X3);\n X3 = Fp2.sub(X3, t0);\n t0 = Fp2.mul(t3, t1);\n Z3 = Fp2.mul(t5, Z3);\n Z3 = Fp2.add(Z3, t0);\n return new Point(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n const { endo: endo2 } = extraOpts;\n if (!Fn2.isValidNot0(scalar))\n throw new Error(\"invalid scalar: out of range\");\n let point, fake;\n const mul = (n) => wnaf.cached(this, n, (p) => normalizeZ(Point, p));\n if (endo2) {\n const { k1neg, k1, k2neg, k2 } = splitEndoScalarN(scalar);\n const { p: k1p, f: k1f } = mul(k1);\n const { p: k2p, f: k2f } = mul(k2);\n fake = k1f.add(k2f);\n point = finishEndo(endo2.beta, k1p, k2p, k1neg, k2neg);\n } else {\n const { p, f: f2 } = mul(scalar);\n point = p;\n fake = f2;\n }\n return normalizeZ(Point, [point, fake])[0];\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed secret key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(sc) {\n const { endo: endo2 } = extraOpts;\n const p = this;\n if (!Fn2.isValid(sc))\n throw new Error(\"invalid scalar: out of range\");\n if (sc === _0n7 || p.is0())\n return Point.ZERO;\n if (sc === _1n7)\n return p;\n if (wnaf.hasCache(this))\n return this.multiply(sc);\n if (endo2) {\n const { k1neg, k1, k2neg, k2 } = splitEndoScalarN(sc);\n const { p1, p2 } = mulEndoUnsafe(Point, p, k1, k2);\n return finishEndo(endo2.beta, p1, p2, k1neg, k2neg);\n } else {\n return wnaf.unsafe(p, sc);\n }\n }\n multiplyAndAddUnsafe(Q, a, b) {\n const sum = this.multiplyUnsafe(a).add(Q.multiplyUnsafe(b));\n return sum.is0() ? void 0 : sum;\n }\n /**\n * Converts Projective point to affine (x, y) coordinates.\n * @param invertedZ Z^-1 (inverted zero) - optional, precomputation is useful for invertBatch\n */\n toAffine(invertedZ) {\n return toAffineMemo(this, invertedZ);\n }\n /**\n * Checks whether Point is free of torsion elements (is in prime subgroup).\n * Always torsion-free for cofactor=1 curves.\n */\n isTorsionFree() {\n const { isTorsionFree } = extraOpts;\n if (cofactor === _1n7)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point, this);\n return wnaf.unsafe(this, CURVE_ORDER).is0();\n }\n clearCofactor() {\n const { clearCofactor } = extraOpts;\n if (cofactor === _1n7)\n return this;\n if (clearCofactor)\n return clearCofactor(Point, this);\n return this.multiplyUnsafe(cofactor);\n }\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n toBytes(isCompressed = true) {\n _abool2(isCompressed, \"isCompressed\");\n this.assertValidity();\n return encodePoint(Point, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return bytesToHex(this.toBytes(isCompressed));\n }\n toString() {\n return ``;\n }\n // TODO: remove\n get px() {\n return this.X;\n }\n get py() {\n return this.X;\n }\n get pz() {\n return this.Z;\n }\n toRawBytes(isCompressed = true) {\n return this.toBytes(isCompressed);\n }\n _setWindowSize(windowSize) {\n this.precompute(windowSize);\n }\n static normalizeZ(points) {\n return normalizeZ(Point, points);\n }\n static msm(points, scalars) {\n return pippenger(Point, Fn2, points, scalars);\n }\n static fromPrivateKey(privateKey) {\n return Point.BASE.multiply(_normFnElement(Fn2, privateKey));\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp2.ONE);\n Point.ZERO = new Point(Fp2.ZERO, Fp2.ONE, Fp2.ZERO);\n Point.Fp = Fp2;\n Point.Fn = Fn2;\n const bits = Fn2.BITS;\n const wnaf = new wNAF(Point, extraOpts.endo ? Math.ceil(bits / 2) : bits);\n Point.BASE.precompute(8);\n return Point;\n }\n function pprefix(hasEvenY) {\n return Uint8Array.of(hasEvenY ? 2 : 3);\n }\n function getWLengths(Fp2, Fn2) {\n return {\n secretKey: Fn2.BYTES,\n publicKey: 1 + Fp2.BYTES,\n publicKeyUncompressed: 1 + 2 * Fp2.BYTES,\n publicKeyHasPrefix: true,\n signature: 2 * Fn2.BYTES\n };\n }\n function ecdh(Point, ecdhOpts = {}) {\n const { Fn: Fn2 } = Point;\n const randomBytes_ = ecdhOpts.randomBytes || randomBytes;\n const lengths = Object.assign(getWLengths(Point.Fp, Fn2), { seed: getMinHashLength(Fn2.ORDER) });\n function isValidSecretKey(secretKey) {\n try {\n return !!_normFnElement(Fn2, secretKey);\n } catch (error) {\n return false;\n }\n }\n function isValidPublicKey(publicKey2, isCompressed) {\n const { publicKey: comp, publicKeyUncompressed } = lengths;\n try {\n const l = publicKey2.length;\n if (isCompressed === true && l !== comp)\n return false;\n if (isCompressed === false && l !== publicKeyUncompressed)\n return false;\n return !!Point.fromBytes(publicKey2);\n } catch (error) {\n return false;\n }\n }\n function randomSecretKey(seed = randomBytes_(lengths.seed)) {\n return mapHashToField(_abytes2(seed, lengths.seed, \"seed\"), Fn2.ORDER);\n }\n function getPublicKey2(secretKey, isCompressed = true) {\n return Point.BASE.multiply(_normFnElement(Fn2, secretKey)).toBytes(isCompressed);\n }\n function keygen(seed) {\n const secretKey = randomSecretKey(seed);\n return { secretKey, publicKey: getPublicKey2(secretKey) };\n }\n function isProbPub(item) {\n if (typeof item === \"bigint\")\n return false;\n if (item instanceof Point)\n return true;\n const { secretKey, publicKey: publicKey2, publicKeyUncompressed } = lengths;\n if (Fn2.allowedLengths || secretKey === publicKey2)\n return void 0;\n const l = ensureBytes(\"key\", item).length;\n return l === publicKey2 || l === publicKeyUncompressed;\n }\n function getSharedSecret(secretKeyA, publicKeyB, isCompressed = true) {\n if (isProbPub(secretKeyA) === true)\n throw new Error(\"first arg must be private key\");\n if (isProbPub(publicKeyB) === false)\n throw new Error(\"second arg must be public key\");\n const s = _normFnElement(Fn2, secretKeyA);\n const b = Point.fromHex(publicKeyB);\n return b.multiply(s).toBytes(isCompressed);\n }\n const utils = {\n isValidSecretKey,\n isValidPublicKey,\n randomSecretKey,\n // TODO: remove\n isValidPrivateKey: isValidSecretKey,\n randomPrivateKey: randomSecretKey,\n normPrivateKeyToScalar: (key) => _normFnElement(Fn2, key),\n precompute(windowSize = 8, point = Point.BASE) {\n return point.precompute(windowSize, false);\n }\n };\n return Object.freeze({ getPublicKey: getPublicKey2, getSharedSecret, keygen, Point, utils, lengths });\n }\n function ecdsa(Point, hash, ecdsaOpts = {}) {\n ahash(hash);\n _validateObject(ecdsaOpts, {}, {\n hmac: \"function\",\n lowS: \"boolean\",\n randomBytes: \"function\",\n bits2int: \"function\",\n bits2int_modN: \"function\"\n });\n const randomBytes2 = ecdsaOpts.randomBytes || randomBytes;\n const hmac2 = ecdsaOpts.hmac || ((key, ...msgs) => hmac(hash, key, concatBytes(...msgs)));\n const { Fp: Fp2, Fn: Fn2 } = Point;\n const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn2;\n const { keygen, getPublicKey: getPublicKey2, getSharedSecret, utils, lengths } = ecdh(Point, ecdsaOpts);\n const defaultSigOpts = {\n prehash: false,\n lowS: typeof ecdsaOpts.lowS === \"boolean\" ? ecdsaOpts.lowS : false,\n format: void 0,\n //'compact' as ECDSASigFormat,\n extraEntropy: false\n };\n const defaultSigOpts_format = \"compact\";\n function isBiggerThanHalfOrder(number2) {\n const HALF = CURVE_ORDER >> _1n7;\n return number2 > HALF;\n }\n function validateRS(title, num) {\n if (!Fn2.isValidNot0(num))\n throw new Error(`invalid signature ${title}: out of range 1..Point.Fn.ORDER`);\n return num;\n }\n function validateSigLength(bytes, format) {\n validateSigFormat(format);\n const size = lengths.signature;\n const sizer = format === \"compact\" ? size : format === \"recovered\" ? size + 1 : void 0;\n return _abytes2(bytes, sizer, `${format} signature`);\n }\n class Signature {\n constructor(r, s, recovery) {\n this.r = validateRS(\"r\", r);\n this.s = validateRS(\"s\", s);\n if (recovery != null)\n this.recovery = recovery;\n Object.freeze(this);\n }\n static fromBytes(bytes, format = defaultSigOpts_format) {\n validateSigLength(bytes, format);\n let recid;\n if (format === \"der\") {\n const { r: r2, s: s2 } = DER.toSig(_abytes2(bytes));\n return new Signature(r2, s2);\n }\n if (format === \"recovered\") {\n recid = bytes[0];\n format = \"compact\";\n bytes = bytes.subarray(1);\n }\n const L = Fn2.BYTES;\n const r = bytes.subarray(0, L);\n const s = bytes.subarray(L, L * 2);\n return new Signature(Fn2.fromBytes(r), Fn2.fromBytes(s), recid);\n }\n static fromHex(hex, format) {\n return this.fromBytes(hexToBytes(hex), format);\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(messageHash) {\n const FIELD_ORDER = Fp2.ORDER;\n const { r, s, recovery: rec } = this;\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error(\"recovery id invalid\");\n const hasCofactor = CURVE_ORDER * _2n5 < FIELD_ORDER;\n if (hasCofactor && rec > 1)\n throw new Error(\"recovery id is ambiguous for h>1 curve\");\n const radj = rec === 2 || rec === 3 ? r + CURVE_ORDER : r;\n if (!Fp2.isValid(radj))\n throw new Error(\"recovery id 2 or 3 invalid\");\n const x = Fp2.toBytes(radj);\n const R = Point.fromBytes(concatBytes(pprefix((rec & 1) === 0), x));\n const ir = Fn2.inv(radj);\n const h = bits2int_modN(ensureBytes(\"msgHash\", messageHash));\n const u1 = Fn2.create(-h * ir);\n const u2 = Fn2.create(s * ir);\n const Q = Point.BASE.multiplyUnsafe(u1).add(R.multiplyUnsafe(u2));\n if (Q.is0())\n throw new Error(\"point at infinify\");\n Q.assertValidity();\n return Q;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n toBytes(format = defaultSigOpts_format) {\n validateSigFormat(format);\n if (format === \"der\")\n return hexToBytes(DER.hexFromSig(this));\n const r = Fn2.toBytes(this.r);\n const s = Fn2.toBytes(this.s);\n if (format === \"recovered\") {\n if (this.recovery == null)\n throw new Error(\"recovery bit must be present\");\n return concatBytes(Uint8Array.of(this.recovery), r, s);\n }\n return concatBytes(r, s);\n }\n toHex(format) {\n return bytesToHex(this.toBytes(format));\n }\n // TODO: remove\n assertValidity() {\n }\n static fromCompact(hex) {\n return Signature.fromBytes(ensureBytes(\"sig\", hex), \"compact\");\n }\n static fromDER(hex) {\n return Signature.fromBytes(ensureBytes(\"sig\", hex), \"der\");\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, Fn2.neg(this.s), this.recovery) : this;\n }\n toDERRawBytes() {\n return this.toBytes(\"der\");\n }\n toDERHex() {\n return bytesToHex(this.toBytes(\"der\"));\n }\n toCompactRawBytes() {\n return this.toBytes(\"compact\");\n }\n toCompactHex() {\n return bytesToHex(this.toBytes(\"compact\"));\n }\n }\n const bits2int = ecdsaOpts.bits2int || function bits2int_def(bytes) {\n if (bytes.length > 8192)\n throw new Error(\"input is too large\");\n const num = bytesToNumberBE(bytes);\n const delta = bytes.length * 8 - fnBits;\n return delta > 0 ? num >> BigInt(delta) : num;\n };\n const bits2int_modN = ecdsaOpts.bits2int_modN || function bits2int_modN_def(bytes) {\n return Fn2.create(bits2int(bytes));\n };\n const ORDER_MASK = bitMask(fnBits);\n function int2octets(num) {\n aInRange(\"num < 2^\" + fnBits, num, _0n7, ORDER_MASK);\n return Fn2.toBytes(num);\n }\n function validateMsgAndHash(message, prehash) {\n _abytes2(message, void 0, \"message\");\n return prehash ? _abytes2(hash(message), void 0, \"prehashed message\") : message;\n }\n function prepSig(message, privateKey, opts) {\n if ([\"recovered\", \"canonical\"].some((k) => k in opts))\n throw new Error(\"sign() legacy options not supported\");\n const { lowS, prehash, extraEntropy } = validateSigOpts(opts, defaultSigOpts);\n message = validateMsgAndHash(message, prehash);\n const h1int = bits2int_modN(message);\n const d = _normFnElement(Fn2, privateKey);\n const seedArgs = [int2octets(d), int2octets(h1int)];\n if (extraEntropy != null && extraEntropy !== false) {\n const e = extraEntropy === true ? randomBytes2(lengths.secretKey) : extraEntropy;\n seedArgs.push(ensureBytes(\"extraEntropy\", e));\n }\n const seed = concatBytes(...seedArgs);\n const m = h1int;\n function k2sig(kBytes) {\n const k = bits2int(kBytes);\n if (!Fn2.isValidNot0(k))\n return;\n const ik = Fn2.inv(k);\n const q = Point.BASE.multiply(k).toAffine();\n const r = Fn2.create(q.x);\n if (r === _0n7)\n return;\n const s = Fn2.create(ik * Fn2.create(m + r * d));\n if (s === _0n7)\n return;\n let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n7);\n let normS = s;\n if (lowS && isBiggerThanHalfOrder(s)) {\n normS = Fn2.neg(s);\n recovery ^= 1;\n }\n return new Signature(r, normS, recovery);\n }\n return { seed, k2sig };\n }\n function sign2(message, secretKey, opts = {}) {\n message = ensureBytes(\"message\", message);\n const { seed, k2sig } = prepSig(message, secretKey, opts);\n const drbg = createHmacDrbg(hash.outputLen, Fn2.BYTES, hmac2);\n const sig = drbg(seed, k2sig);\n return sig;\n }\n function tryParsingSig(sg) {\n let sig = void 0;\n const isHex = typeof sg === \"string\" || isBytes(sg);\n const isObj = !isHex && sg !== null && typeof sg === \"object\" && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\";\n if (!isHex && !isObj)\n throw new Error(\"invalid signature, expected Uint8Array, hex string or Signature instance\");\n if (isObj) {\n sig = new Signature(sg.r, sg.s);\n } else if (isHex) {\n try {\n sig = Signature.fromBytes(ensureBytes(\"sig\", sg), \"der\");\n } catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n }\n if (!sig) {\n try {\n sig = Signature.fromBytes(ensureBytes(\"sig\", sg), \"compact\");\n } catch (error) {\n return false;\n }\n }\n }\n if (!sig)\n return false;\n return sig;\n }\n function verify2(signature, message, publicKey2, opts = {}) {\n const { lowS, prehash, format } = validateSigOpts(opts, defaultSigOpts);\n publicKey2 = ensureBytes(\"publicKey\", publicKey2);\n message = validateMsgAndHash(ensureBytes(\"message\", message), prehash);\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n const sig = format === void 0 ? tryParsingSig(signature) : Signature.fromBytes(ensureBytes(\"sig\", signature), format);\n if (sig === false)\n return false;\n try {\n const P = Point.fromBytes(publicKey2);\n if (lowS && sig.hasHighS())\n return false;\n const { r, s } = sig;\n const h = bits2int_modN(message);\n const is2 = Fn2.inv(s);\n const u1 = Fn2.create(h * is2);\n const u2 = Fn2.create(r * is2);\n const R = Point.BASE.multiplyUnsafe(u1).add(P.multiplyUnsafe(u2));\n if (R.is0())\n return false;\n const v = Fn2.create(R.x);\n return v === r;\n } catch (e) {\n return false;\n }\n }\n function recoverPublicKey(signature, message, opts = {}) {\n const { prehash } = validateSigOpts(opts, defaultSigOpts);\n message = validateMsgAndHash(message, prehash);\n return Signature.fromBytes(signature, \"recovered\").recoverPublicKey(message).toBytes();\n }\n return Object.freeze({\n keygen,\n getPublicKey: getPublicKey2,\n getSharedSecret,\n utils,\n lengths,\n Point,\n sign: sign2,\n verify: verify2,\n recoverPublicKey,\n Signature,\n hash\n });\n }\n function _weierstrass_legacy_opts_to_new(c) {\n const CURVE = {\n a: c.a,\n b: c.b,\n p: c.Fp.ORDER,\n n: c.n,\n h: c.h,\n Gx: c.Gx,\n Gy: c.Gy\n };\n const Fp2 = c.Fp;\n let allowedLengths = c.allowedPrivateKeyLengths ? Array.from(new Set(c.allowedPrivateKeyLengths.map((l) => Math.ceil(l / 2)))) : void 0;\n const Fn2 = Field(CURVE.n, {\n BITS: c.nBitLength,\n allowedLengths,\n modFromBytes: c.wrapPrivateKey\n });\n const curveOpts = {\n Fp: Fp2,\n Fn: Fn2,\n allowInfinityPoint: c.allowInfinityPoint,\n endo: c.endo,\n isTorsionFree: c.isTorsionFree,\n clearCofactor: c.clearCofactor,\n fromBytes: c.fromBytes,\n toBytes: c.toBytes\n };\n return { CURVE, curveOpts };\n }\n function _ecdsa_legacy_opts_to_new(c) {\n const { CURVE, curveOpts } = _weierstrass_legacy_opts_to_new(c);\n const ecdsaOpts = {\n hmac: c.hmac,\n randomBytes: c.randomBytes,\n lowS: c.lowS,\n bits2int: c.bits2int,\n bits2int_modN: c.bits2int_modN\n };\n return { CURVE, curveOpts, hash: c.hash, ecdsaOpts };\n }\n function _ecdsa_new_output_to_legacy(c, _ecdsa) {\n const Point = _ecdsa.Point;\n return Object.assign({}, _ecdsa, {\n ProjectivePoint: Point,\n CURVE: Object.assign({}, c, nLength(Point.Fn.ORDER, Point.Fn.BITS))\n });\n }\n function weierstrass(c) {\n const { CURVE, curveOpts, hash, ecdsaOpts } = _ecdsa_legacy_opts_to_new(c);\n const Point = weierstrassN(CURVE, curveOpts);\n const signs = ecdsa(Point, hash, ecdsaOpts);\n return _ecdsa_new_output_to_legacy(c, signs);\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/_shortw_utils.js\n function createCurve(curveDef, defHash) {\n const create2 = (hash) => weierstrass({ ...curveDef, hash });\n return { ...create2(defHash), create: create2 };\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/secp256k1.js\n var secp256k1_CURVE = {\n p: BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),\n n: BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),\n h: BigInt(1),\n a: BigInt(0),\n b: BigInt(7),\n Gx: BigInt(\"0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\"),\n Gy: BigInt(\"0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\")\n };\n var secp256k1_ENDO = {\n beta: BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),\n basises: [\n [BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"), -BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\")],\n [BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"), BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\")]\n ]\n };\n var _2n6 = /* @__PURE__ */ BigInt(2);\n function sqrtMod(y) {\n const P = secp256k1_CURVE.p;\n const _3n4 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b2 = y * y * y % P;\n const b3 = b2 * b2 * y % P;\n const b6 = pow2(b3, _3n4, P) * b3 % P;\n const b9 = pow2(b6, _3n4, P) * b3 % P;\n const b11 = pow2(b9, _2n6, P) * b2 % P;\n const b22 = pow2(b11, _11n, P) * b11 % P;\n const b44 = pow2(b22, _22n, P) * b22 % P;\n const b88 = pow2(b44, _44n, P) * b44 % P;\n const b176 = pow2(b88, _88n, P) * b88 % P;\n const b220 = pow2(b176, _44n, P) * b44 % P;\n const b223 = pow2(b220, _3n4, P) * b3 % P;\n const t1 = pow2(b223, _23n, P) * b22 % P;\n const t2 = pow2(t1, _6n, P) * b2 % P;\n const root = pow2(t2, _2n6, P);\n if (!Fpk1.eql(Fpk1.sqr(root), y))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n var Fpk1 = Field(secp256k1_CURVE.p, { sqrt: sqrtMod });\n var secp256k1 = createCurve({ ...secp256k1_CURVE, Fp: Fpk1, lowS: true, endo: secp256k1_ENDO }, sha256);\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n var generatePrivateKey = ed25519.utils.randomPrivateKey;\n var generateKeypair = () => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey2 = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey2, 32);\n return {\n publicKey: publicKey2,\n secretKey\n };\n };\n var getPublicKey = ed25519.getPublicKey;\n function isOnCurve(publicKey2) {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey2);\n return true;\n } catch {\n return false;\n }\n }\n var sign = (message, secretKey) => ed25519.sign(message, secretKey.slice(0, 32));\n var verify = ed25519.verify;\n var toBuffer = (arr) => {\n if (Buffer2.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer2.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer2.from(arr);\n }\n };\n var Struct2 = class {\n constructor(properties) {\n Object.assign(this, properties);\n }\n encode() {\n return Buffer2.from((0, import_borsh.serialize)(SOLANA_SCHEMA, this));\n }\n static decode(data) {\n return (0, import_borsh.deserialize)(SOLANA_SCHEMA, this, data);\n }\n static decodeUnchecked(data) {\n return (0, import_borsh.deserializeUnchecked)(SOLANA_SCHEMA, this, data);\n }\n };\n var SOLANA_SCHEMA = /* @__PURE__ */ new Map();\n var _PublicKey;\n var MAX_SEED_LENGTH = 32;\n var PUBLIC_KEY_LENGTH = 32;\n function isPublicKeyData(value) {\n return value._bn !== void 0;\n }\n var uniquePublicKeyCounter = 1;\n var PublicKey = class _PublicKey2 extends Struct2 {\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value) {\n super({});\n this._bn = void 0;\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === \"string\") {\n const decoded = import_bs58.default.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new import_bn.default(decoded);\n } else {\n this._bn = new import_bn.default(value);\n }\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique() {\n const key = new _PublicKey2(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new _PublicKey2(key.toBuffer());\n }\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey2) {\n return this._bn.eq(publicKey2._bn);\n }\n /**\n * Return the base-58 representation of the public key\n */\n toBase58() {\n return import_bs58.default.encode(this.toBytes());\n }\n toJSON() {\n return this.toBase58();\n }\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes() {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer() {\n const b = this._bn.toArrayLike(Buffer2);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n const zeroPad = Buffer2.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n get [Symbol.toStringTag]() {\n return `PublicKey(${this.toString()})`;\n }\n /**\n * Return the base-58 representation of the public key\n */\n toString() {\n return this.toBase58();\n }\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(fromPublicKey, seed, programId) {\n const buffer = Buffer2.concat([fromPublicKey.toBuffer(), Buffer2.from(seed), programId.toBuffer()]);\n const publicKeyBytes = sha2562(buffer);\n return new _PublicKey2(publicKeyBytes);\n }\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(seeds, programId) {\n let buffer = Buffer2.alloc(0);\n seeds.forEach(function(seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer2.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer2.concat([buffer, programId.toBuffer(), Buffer2.from(\"ProgramDerivedAddress\")]);\n const publicKeyBytes = sha2562(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new _PublicKey2(publicKeyBytes);\n }\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(seeds, programId) {\n return this.createProgramAddressSync(seeds, programId);\n }\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(seeds, programId) {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer2.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(seeds, programId) {\n return this.findProgramAddressSync(seeds, programId);\n }\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData) {\n const pubkey = new _PublicKey2(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n };\n _PublicKey = PublicKey;\n PublicKey.default = new _PublicKey(\"11111111111111111111111111111111\");\n SOLANA_SCHEMA.set(PublicKey, {\n kind: \"struct\",\n fields: [[\"_bn\", \"u256\"]]\n });\n var BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\"BPFLoader1111111111111111111111111111111111\");\n var PACKET_DATA_SIZE = 1280 - 40 - 8;\n var VERSION_PREFIX_MASK = 127;\n var SIGNATURE_LENGTH_IN_BYTES = 64;\n var TransactionExpiredBlockheightExceededError = class extends Error {\n constructor(signature) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = void 0;\n this.signature = signature;\n }\n };\n Object.defineProperty(TransactionExpiredBlockheightExceededError.prototype, \"name\", {\n value: \"TransactionExpiredBlockheightExceededError\"\n });\n var TransactionExpiredTimeoutError = class extends Error {\n constructor(signature, timeoutSeconds) {\n super(`Transaction was not confirmed in ${timeoutSeconds.toFixed(2)} seconds. It is unknown if it succeeded or failed. Check signature ${signature} using the Solana Explorer or CLI tools.`);\n this.signature = void 0;\n this.signature = signature;\n }\n };\n Object.defineProperty(TransactionExpiredTimeoutError.prototype, \"name\", {\n value: \"TransactionExpiredTimeoutError\"\n });\n var TransactionExpiredNonceInvalidError = class extends Error {\n constructor(signature) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = void 0;\n this.signature = signature;\n }\n };\n Object.defineProperty(TransactionExpiredNonceInvalidError.prototype, \"name\", {\n value: \"TransactionExpiredNonceInvalidError\"\n });\n var MessageAccountKeys = class {\n constructor(staticAccountKeys, accountKeysFromLookups) {\n this.staticAccountKeys = void 0;\n this.accountKeysFromLookups = void 0;\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n keySegments() {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n get(index) {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n get length() {\n return this.keySegments().flat().length;\n }\n compileInstructions(instructions) {\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error(\"Account index overflow encountered during compilation\");\n }\n const keyIndexMap = /* @__PURE__ */ new Map();\n this.keySegments().flat().forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n const findKeyIndex = (key) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === void 0)\n throw new Error(\"Encountered an unknown instruction account key during compilation\");\n return keyIndex;\n };\n return instructions.map((instruction) => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map((meta) => findKeyIndex(meta.pubkey)),\n data: instruction.data\n };\n });\n }\n };\n var publicKey = (property = \"publicKey\") => {\n return BufferLayout.blob(32, property);\n };\n var rustString = (property = \"string\") => {\n const rsl = BufferLayout.struct([BufferLayout.u32(\"length\"), BufferLayout.u32(\"lengthPadding\"), BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), \"chars\")], property);\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n const rslShim = rsl;\n rslShim.decode = (b, offset2) => {\n const data = _decode(b, offset2);\n return data[\"chars\"].toString();\n };\n rslShim.encode = (str, b, offset2) => {\n const data = {\n chars: Buffer2.from(str, \"utf8\")\n };\n return _encode(data, b, offset2);\n };\n rslShim.alloc = (str) => {\n return BufferLayout.u32().span + BufferLayout.u32().span + Buffer2.from(str, \"utf8\").length;\n };\n return rslShim;\n };\n var authorized = (property = \"authorized\") => {\n return BufferLayout.struct([publicKey(\"staker\"), publicKey(\"withdrawer\")], property);\n };\n var lockup = (property = \"lockup\") => {\n return BufferLayout.struct([BufferLayout.ns64(\"unixTimestamp\"), BufferLayout.ns64(\"epoch\"), publicKey(\"custodian\")], property);\n };\n var voteInit = (property = \"voteInit\") => {\n return BufferLayout.struct([publicKey(\"nodePubkey\"), publicKey(\"authorizedVoter\"), publicKey(\"authorizedWithdrawer\"), BufferLayout.u8(\"commission\")], property);\n };\n var voteAuthorizeWithSeedArgs = (property = \"voteAuthorizeWithSeedArgs\") => {\n return BufferLayout.struct([BufferLayout.u32(\"voteAuthorizationType\"), publicKey(\"currentAuthorityDerivedKeyOwnerPubkey\"), rustString(\"currentAuthorityDerivedKeySeed\"), publicKey(\"newAuthorized\")], property);\n };\n function getAlloc(type2, fields) {\n const getItemAlloc = (item) => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === \"function\") {\n return item.alloc(fields[item.property]);\n } else if (\"count\" in item && \"elementLayout\" in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if (\"fields\" in item) {\n return getAlloc({\n layout: item\n }, fields[item.property]);\n }\n return 0;\n };\n let alloc = 0;\n type2.layout.fields.forEach((item) => {\n alloc += getItemAlloc(item);\n });\n return alloc;\n }\n function decodeLength(bytes) {\n let len = 0;\n let size = 0;\n for (; ; ) {\n let elem = bytes.shift();\n len |= (elem & 127) << size * 7;\n size += 1;\n if ((elem & 128) === 0) {\n break;\n }\n }\n return len;\n }\n function encodeLength(bytes, len) {\n let rem_len = len;\n for (; ; ) {\n let elem = rem_len & 127;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 128;\n bytes.push(elem);\n }\n }\n }\n function assert2(condition, message) {\n if (!condition) {\n throw new Error(message || \"Assertion failed\");\n }\n }\n var CompiledKeys = class _CompiledKeys {\n constructor(payer, keyMetaMap) {\n this.payer = void 0;\n this.keyMetaMap = void 0;\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n static compile(instructions, payer) {\n const keyMetaMap = /* @__PURE__ */ new Map();\n const getOrInsertDefault = (pubkey) => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === void 0) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n return new _CompiledKeys(payer, keyMetaMap);\n }\n getMessageComponents() {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert2(mapEntries.length <= 256, \"Max static account keys length exceeded\");\n const writableSigners = mapEntries.filter(([, meta]) => meta.isSigner && meta.isWritable);\n const readonlySigners = mapEntries.filter(([, meta]) => meta.isSigner && !meta.isWritable);\n const writableNonSigners = mapEntries.filter(([, meta]) => !meta.isSigner && meta.isWritable);\n const readonlyNonSigners = mapEntries.filter(([, meta]) => !meta.isSigner && !meta.isWritable);\n const header = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length\n };\n {\n assert2(writableSigners.length > 0, \"Expected at least one writable signer key\");\n const [payerAddress] = writableSigners[0];\n assert2(payerAddress === this.payer.toBase58(), \"Expected first writable signer key to be the fee payer\");\n }\n const staticAccountKeys = [...writableSigners.map(([address]) => new PublicKey(address)), ...readonlySigners.map(([address]) => new PublicKey(address)), ...writableNonSigners.map(([address]) => new PublicKey(address)), ...readonlyNonSigners.map(([address]) => new PublicKey(address))];\n return [header, staticAccountKeys];\n }\n extractTableLookup(lookupTable) {\n const [writableIndexes, drainedWritableKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, (keyMeta) => !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable);\n const [readonlyIndexes, drainedReadonlyKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, (keyMeta) => !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable);\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n return [{\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes\n }, {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys\n }];\n }\n /** @internal */\n drainKeysFoundInLookupTable(lookupTableEntries, keyMetaFilter) {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex((entry) => entry.equals(key));\n if (lookupTableIndex >= 0) {\n assert2(lookupTableIndex < 256, \"Max lookup table index exceeded\");\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n return [lookupTableIndexes, drainedKeys];\n }\n };\n var END_OF_BUFFER_ERROR_MESSAGE = \"Reached end of buffer unexpectedly\";\n function guardedShift(byteArray) {\n if (byteArray.length === 0) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.shift();\n }\n function guardedSplice(byteArray, ...args) {\n const [start] = args;\n if (args.length === 2 ? start + (args[1] ?? 0) > byteArray.length : start >= byteArray.length) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.splice(...args);\n }\n var Message = class _Message {\n constructor(args) {\n this.header = void 0;\n this.accountKeys = void 0;\n this.recentBlockhash = void 0;\n this.instructions = void 0;\n this.indexToProgramIds = /* @__PURE__ */ new Map();\n this.header = args.header;\n this.accountKeys = args.accountKeys.map((account) => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach((ix) => this.indexToProgramIds.set(ix.programIdIndex, this.accountKeys[ix.programIdIndex]));\n }\n get version() {\n return \"legacy\";\n }\n get staticAccountKeys() {\n return this.accountKeys;\n }\n get compiledInstructions() {\n return this.instructions.map((ix) => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: import_bs58.default.decode(ix.data)\n }));\n }\n get addressTableLookups() {\n return [];\n }\n getAccountKeys() {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n static compile(args) {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map((ix) => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: import_bs58.default.encode(ix.data)\n }));\n return new _Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions\n });\n }\n isAccountSigner(index) {\n return index < this.header.numRequiredSignatures;\n }\n isAccountWritable(index) {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts = numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts = numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n isProgramId(index) {\n return this.indexToProgramIds.has(index);\n }\n programIds() {\n return [...this.indexToProgramIds.values()];\n }\n nonProgramIds() {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n serialize() {\n const numKeys = this.accountKeys.length;\n let keyCount = [];\n encodeLength(keyCount, numKeys);\n const instructions = this.instructions.map((instruction) => {\n const {\n accounts,\n programIdIndex\n } = instruction;\n const data = Array.from(import_bs58.default.decode(instruction.data));\n let keyIndicesCount = [];\n encodeLength(keyIndicesCount, accounts.length);\n let dataCount = [];\n encodeLength(dataCount, data.length);\n return {\n programIdIndex,\n keyIndicesCount: Buffer2.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer2.from(dataCount),\n data\n };\n });\n let instructionCount = [];\n encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer2.alloc(PACKET_DATA_SIZE);\n Buffer2.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n instructions.forEach((instruction) => {\n const instructionLayout = BufferLayout.struct([BufferLayout.u8(\"programIdIndex\"), BufferLayout.blob(instruction.keyIndicesCount.length, \"keyIndicesCount\"), BufferLayout.seq(BufferLayout.u8(\"keyIndex\"), instruction.keyIndices.length, \"keyIndices\"), BufferLayout.blob(instruction.dataLength.length, \"dataLength\"), BufferLayout.seq(BufferLayout.u8(\"userdatum\"), instruction.data.length, \"data\")]);\n const length2 = instructionLayout.encode(instruction, instructionBuffer, instructionBufferLength);\n instructionBufferLength += length2;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n const signDataLayout = BufferLayout.struct([BufferLayout.blob(1, \"numRequiredSignatures\"), BufferLayout.blob(1, \"numReadonlySignedAccounts\"), BufferLayout.blob(1, \"numReadonlyUnsignedAccounts\"), BufferLayout.blob(keyCount.length, \"keyCount\"), BufferLayout.seq(publicKey(\"key\"), numKeys, \"keys\"), publicKey(\"recentBlockhash\")]);\n const transaction = {\n numRequiredSignatures: Buffer2.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer2.from([this.header.numReadonlySignedAccounts]),\n numReadonlyUnsignedAccounts: Buffer2.from([this.header.numReadonlyUnsignedAccounts]),\n keyCount: Buffer2.from(keyCount),\n keys: this.accountKeys.map((key) => toBuffer(key.toBytes())),\n recentBlockhash: import_bs58.default.decode(this.recentBlockhash)\n };\n let signData = Buffer2.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer) {\n let byteArray = [...buffer];\n const numRequiredSignatures = guardedShift(byteArray);\n if (numRequiredSignatures !== (numRequiredSignatures & VERSION_PREFIX_MASK)) {\n throw new Error(\"Versioned messages must be deserialized with VersionedMessage.deserialize()\");\n }\n const numReadonlySignedAccounts = guardedShift(byteArray);\n const numReadonlyUnsignedAccounts = guardedShift(byteArray);\n const accountCount = decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer2.from(account)));\n }\n const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n const instructionCount = decodeLength(byteArray);\n let instructions = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountCount2 = decodeLength(byteArray);\n const accounts = guardedSplice(byteArray, 0, accountCount2);\n const dataLength = decodeLength(byteArray);\n const dataSlice = guardedSplice(byteArray, 0, dataLength);\n const data = import_bs58.default.encode(Buffer2.from(dataSlice));\n instructions.push({\n programIdIndex,\n accounts,\n data\n });\n }\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n },\n recentBlockhash: import_bs58.default.encode(Buffer2.from(recentBlockhash)),\n accountKeys,\n instructions\n };\n return new _Message(messageArgs);\n }\n };\n var DEFAULT_SIGNATURE = Buffer2.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n var TransactionInstruction = class {\n constructor(opts) {\n this.keys = void 0;\n this.programId = void 0;\n this.data = Buffer2.alloc(0);\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n /**\n * @internal\n */\n toJSON() {\n return {\n keys: this.keys.map(({\n pubkey,\n isSigner,\n isWritable\n }) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable\n })),\n programId: this.programId.toJSON(),\n data: [...this.data]\n };\n }\n };\n var Transaction = class _Transaction {\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature() {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n /**\n * The transaction fee payer\n */\n // Construct a transaction with a blockhash and lastValidBlockHeight\n // Construct a transaction using a durable nonce\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n /**\n * Construct an empty Transaction\n */\n constructor(opts) {\n this.signatures = [];\n this.feePayer = void 0;\n this.instructions = [];\n this.recentBlockhash = void 0;\n this.lastValidBlockHeight = void 0;\n this.nonceInfo = void 0;\n this.minNonceContextSlot = void 0;\n this._message = void 0;\n this._json = void 0;\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, \"nonceInfo\")) {\n const {\n minContextSlot,\n nonceInfo\n } = opts;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (Object.prototype.hasOwnProperty.call(opts, \"lastValidBlockHeight\")) {\n const {\n blockhash,\n lastValidBlockHeight\n } = opts;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {\n recentBlockhash,\n nonceInfo\n } = opts;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n /**\n * @internal\n */\n toJSON() {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON()\n } : null,\n instructions: this.instructions.map((instruction) => instruction.toJSON()),\n signers: this.signatures.map(({\n publicKey: publicKey2\n }) => {\n return publicKey2.toJSON();\n })\n };\n }\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(...items) {\n if (items.length === 0) {\n throw new Error(\"No instructions\");\n }\n items.forEach((item) => {\n if (\"instructions\" in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if (\"data\" in item && \"programId\" in item && \"keys\" in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n /**\n * Compile transaction data\n */\n compileMessage() {\n if (this._message && JSON.stringify(this.toJSON()) === JSON.stringify(this._json)) {\n return this._message;\n }\n let recentBlockhash;\n let instructions;\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error(\"Transaction recentBlockhash required\");\n }\n if (instructions.length < 1) {\n console.warn(\"No instructions provided\");\n }\n let feePayer;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error(\"Transaction fee payer required\");\n }\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === void 0) {\n throw new Error(`Transaction instruction index ${i} has undefined program id`);\n }\n }\n const programIds = [];\n const accountMetas = [];\n instructions.forEach((instruction) => {\n instruction.keys.forEach((accountMeta) => {\n accountMetas.push({\n ...accountMeta\n });\n });\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n programIds.forEach((programId) => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false\n });\n });\n const uniqueMetas = [];\n accountMetas.forEach((accountMeta) => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex((x) => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable = uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner = uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n uniqueMetas.sort(function(x, y) {\n if (x.isSigner !== y.isSigner) {\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n return x.isWritable ? -1 : 1;\n }\n const options = {\n localeMatcher: \"best fit\",\n usage: \"sort\",\n sensitivity: \"variant\",\n ignorePunctuation: false,\n numeric: false,\n caseFirst: \"lower\"\n };\n return x.pubkey.toBase58().localeCompare(y.pubkey.toBase58(), \"en\", options);\n });\n const feePayerIndex = uniqueMetas.findIndex((x) => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true\n });\n }\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex((x) => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\"Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release.\");\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n const signedKeys = [];\n const unsignedKeys = [];\n uniqueMetas.forEach(({\n pubkey,\n isSigner,\n isWritable\n }) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions = instructions.map((instruction) => {\n const {\n data,\n programId\n } = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map((meta) => accountKeys.indexOf(meta.pubkey.toString())),\n data: import_bs58.default.encode(data)\n };\n });\n compiledInstructions.forEach((instruction) => {\n assert2(instruction.programIdIndex >= 0);\n instruction.accounts.forEach((keyIndex) => assert2(keyIndex >= 0));\n });\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions\n });\n }\n /**\n * @internal\n */\n _compile() {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(0, message.header.numRequiredSignatures);\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n if (valid)\n return message;\n }\n this.signatures = signedKeys.map((publicKey2) => ({\n signature: null,\n publicKey: publicKey2\n }));\n return message;\n }\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage() {\n return this._compile().serialize();\n }\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection) {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers) {\n if (signers.length === 0) {\n throw new Error(\"No signers\");\n }\n const seen = /* @__PURE__ */ new Set();\n this.signatures = signers.filter((publicKey2) => {\n const key = publicKey2.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n }).map((publicKey2) => ({\n signature: null,\n publicKey: publicKey2\n }));\n }\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers) {\n if (signers.length === 0) {\n throw new Error(\"No signers\");\n }\n const seen = /* @__PURE__ */ new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n this.signatures = uniqueSigners.map((signer) => ({\n signature: null,\n publicKey: signer.publicKey\n }));\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers) {\n if (signers.length === 0) {\n throw new Error(\"No signers\");\n }\n const seen = /* @__PURE__ */ new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n /**\n * @internal\n */\n _partialSign(message, ...signers) {\n const signData = message.serialize();\n signers.forEach((signer) => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey, signature) {\n this._compile();\n this._addSignature(pubkey, signature);\n }\n /**\n * @internal\n */\n _addSignature(pubkey, signature) {\n assert2(signature.length === 64);\n const index = this.signatures.findIndex((sigpair) => pubkey.equals(sigpair.publicKey));\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n this.signatures[index].signature = Buffer2.from(signature);\n }\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures = true) {\n const signatureErrors = this._getMessageSignednessErrors(this.serializeMessage(), requireAllSignatures);\n return !signatureErrors;\n }\n /**\n * @internal\n */\n _getMessageSignednessErrors(message, requireAllSignatures) {\n const errors = {};\n for (const {\n signature,\n publicKey: publicKey2\n } of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n (errors.missing ||= []).push(publicKey2);\n }\n } else {\n if (!verify(signature, message, publicKey2.toBytes())) {\n (errors.invalid ||= []).push(publicKey2);\n }\n }\n }\n return errors.invalid || errors.missing ? errors : void 0;\n }\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config) {\n const {\n requireAllSignatures,\n verifySignatures\n } = Object.assign({\n requireAllSignatures: true,\n verifySignatures: true\n }, config);\n const signData = this.serializeMessage();\n if (verifySignatures) {\n const sigErrors = this._getMessageSignednessErrors(signData, requireAllSignatures);\n if (sigErrors) {\n let errorMessage = \"Signature verification failed.\";\n if (sigErrors.invalid) {\n errorMessage += `\nInvalid signature for public key${sigErrors.invalid.length === 1 ? \"\" : \"(s)\"} [\\`${sigErrors.invalid.map((p) => p.toBase58()).join(\"`, `\")}\\`].`;\n }\n if (sigErrors.missing) {\n errorMessage += `\nMissing signature for public key${sigErrors.missing.length === 1 ? \"\" : \"(s)\"} [\\`${sigErrors.missing.map((p) => p.toBase58()).join(\"`, `\")}\\`].`;\n }\n throw new Error(errorMessage);\n }\n }\n return this._serialize(signData);\n }\n /**\n * @internal\n */\n _serialize(signData) {\n const {\n signatures\n } = this;\n const signatureCount = [];\n encodeLength(signatureCount, signatures.length);\n const transactionLength = signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer2.alloc(transactionLength);\n assert2(signatures.length < 256);\n Buffer2.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({\n signature\n }, index) => {\n if (signature !== null) {\n assert2(signature.length === 64, `signature has invalid length`);\n Buffer2.from(signature).copy(wireTransaction, signatureCount.length + index * 64);\n }\n });\n signData.copy(wireTransaction, signatureCount.length + signatures.length * 64);\n assert2(wireTransaction.length <= PACKET_DATA_SIZE, `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`);\n return wireTransaction;\n }\n /**\n * Deprecated method\n * @internal\n */\n get keys() {\n assert2(this.instructions.length === 1);\n return this.instructions[0].keys.map((keyObj) => keyObj.pubkey);\n }\n /**\n * Deprecated method\n * @internal\n */\n get programId() {\n assert2(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n /**\n * Deprecated method\n * @internal\n */\n get data() {\n assert2(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer) {\n let byteArray = [...buffer];\n const signatureCount = decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(import_bs58.default.encode(Buffer2.from(signature)));\n }\n return _Transaction.populate(Message.from(byteArray), signatures);\n }\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(message, signatures = []) {\n const transaction = new _Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature: signature == import_bs58.default.encode(DEFAULT_SIGNATURE) ? null : import_bs58.default.decode(signature),\n publicKey: message.accountKeys[index]\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n message.instructions.forEach((instruction) => {\n const keys = instruction.accounts.map((account) => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner: transaction.signatures.some((keyObj) => keyObj.publicKey.toString() === pubkey.toString()) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account)\n };\n });\n transaction.instructions.push(new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: import_bs58.default.decode(instruction.data)\n }));\n });\n transaction._message = message;\n transaction._json = transaction.toJSON();\n return transaction;\n }\n };\n var NUM_TICKS_PER_SECOND = 160;\n var DEFAULT_TICKS_PER_SLOT = 64;\n var NUM_SLOTS_PER_SECOND = NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n var MS_PER_SLOT = 1e3 / NUM_SLOTS_PER_SECOND;\n var SYSVAR_CLOCK_PUBKEY = new PublicKey(\"SysvarC1ock11111111111111111111111111111111\");\n var SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\"SysvarEpochSchedu1e111111111111111111111111\");\n var SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\"Sysvar1nstructions1111111111111111111111111\");\n var SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\"SysvarRecentB1ockHashes11111111111111111111\");\n var SYSVAR_RENT_PUBKEY = new PublicKey(\"SysvarRent111111111111111111111111111111111\");\n var SYSVAR_REWARDS_PUBKEY = new PublicKey(\"SysvarRewards111111111111111111111111111111\");\n var SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\"SysvarS1otHashes111111111111111111111111111\");\n var SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\"SysvarS1otHistory11111111111111111111111111\");\n var SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\"SysvarStakeHistory1111111111111111111111111\");\n var SendTransactionError = class extends Error {\n constructor({\n action,\n signature,\n transactionMessage,\n logs\n }) {\n const maybeLogsOutput = logs ? `Logs: \n${JSON.stringify(logs.slice(-10), null, 2)}. ` : \"\";\n const guideText = \"\\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.\";\n let message;\n switch (action) {\n case \"send\":\n message = `Transaction ${signature} resulted in an error. \n${transactionMessage}. ` + maybeLogsOutput + guideText;\n break;\n case \"simulate\":\n message = `Simulation failed. \nMessage: ${transactionMessage}. \n` + maybeLogsOutput + guideText;\n break;\n default: {\n message = `Unknown action '${/* @__PURE__ */ ((a) => a)(action)}'`;\n }\n }\n super(message);\n this.signature = void 0;\n this.transactionMessage = void 0;\n this.transactionLogs = void 0;\n this.signature = signature;\n this.transactionMessage = transactionMessage;\n this.transactionLogs = logs ? logs : void 0;\n }\n get transactionError() {\n return {\n message: this.transactionMessage,\n logs: Array.isArray(this.transactionLogs) ? this.transactionLogs : void 0\n };\n }\n /* @deprecated Use `await getLogs()` instead */\n get logs() {\n const cachedLogs = this.transactionLogs;\n if (cachedLogs != null && typeof cachedLogs === \"object\" && \"then\" in cachedLogs) {\n return void 0;\n }\n return cachedLogs;\n }\n async getLogs(connection) {\n if (!Array.isArray(this.transactionLogs)) {\n this.transactionLogs = new Promise((resolve, reject) => {\n connection.getTransaction(this.signature).then((tx) => {\n if (tx && tx.meta && tx.meta.logMessages) {\n const logs = tx.meta.logMessages;\n this.transactionLogs = logs;\n resolve(logs);\n } else {\n reject(new Error(\"Log messages not found\"));\n }\n }).catch(reject);\n });\n }\n return await this.transactionLogs;\n }\n };\n async function sendAndConfirmTransaction(connection, transaction, signers, options) {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot\n };\n const signature = await connection.sendTransaction(transaction, signers, sendOptions);\n let status;\n if (transaction.recentBlockhash != null && transaction.lastValidBlockHeight != null) {\n status = (await connection.confirmTransaction({\n abortSignal: options?.abortSignal,\n signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight\n }, options && options.commitment)).value;\n } else if (transaction.minNonceContextSlot != null && transaction.nonceInfo != null) {\n const {\n nonceInstruction\n } = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (await connection.confirmTransaction({\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature\n }, options && options.commitment)).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\"sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.\");\n }\n status = (await connection.confirmTransaction(signature, options && options.commitment)).value;\n }\n if (status.err) {\n if (signature != null) {\n throw new SendTransactionError({\n action: \"send\",\n signature,\n transactionMessage: `Status: (${JSON.stringify(status)})`\n });\n }\n throw new Error(`Transaction ${signature} failed (${JSON.stringify(status)})`);\n }\n return signature;\n }\n function sleep(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n function encodeData(type2, fields) {\n const allocLength = type2.layout.span >= 0 ? type2.layout.span : getAlloc(type2, fields);\n const data = Buffer2.alloc(allocLength);\n const layoutFields = Object.assign({\n instruction: type2.index\n }, fields);\n type2.layout.encode(layoutFields, data);\n return data;\n }\n var FeeCalculatorLayout = BufferLayout.nu64(\"lamportsPerSignature\");\n var NonceAccountLayout = BufferLayout.struct([BufferLayout.u32(\"version\"), BufferLayout.u32(\"state\"), publicKey(\"authorizedPubkey\"), publicKey(\"nonce\"), BufferLayout.struct([FeeCalculatorLayout], \"feeCalculator\")]);\n var NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n function u64(property) {\n const layout = (0, import_buffer_layout.blob)(8, property);\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n const bigIntLayout = layout;\n const codec = getU64Codec();\n bigIntLayout.decode = (buffer, offset2) => {\n const src = decode(buffer, offset2);\n return codec.decode(src);\n };\n bigIntLayout.encode = (bigInt, buffer, offset2) => {\n const src = codec.encode(bigInt);\n return encode(src, buffer, offset2);\n };\n return bigIntLayout;\n }\n var SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze({\n Create: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\"), BufferLayout.ns64(\"space\"), publicKey(\"programId\")])\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"programId\")])\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), u64(\"lamports\")])\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"base\"), rustString(\"seed\"), BufferLayout.ns64(\"lamports\"), BufferLayout.ns64(\"space\"), publicKey(\"programId\")])\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\")])\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"authorized\")])\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"authorized\")])\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"space\")])\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"base\"), rustString(\"seed\"), BufferLayout.ns64(\"space\"), publicKey(\"programId\")])\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"base\"), rustString(\"seed\"), publicKey(\"programId\")])\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), u64(\"lamports\"), rustString(\"seed\"), publicKey(\"programId\")])\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n }\n });\n var SystemProgram = class _SystemProgram {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the System program\n */\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type2, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.newAccountPubkey,\n isSigner: true,\n isWritable: true\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(params) {\n let data;\n let keys;\n if (\"basePubkey\" in params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type2, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.fromPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }];\n } else {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type2, {\n lamports: BigInt(params.lamports)\n });\n keys = [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(params) {\n let data;\n let keys;\n if (\"basePubkey\" in params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type2, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }];\n } else {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type2, {\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: true,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type2, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n let keys = [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.newAccountPubkey,\n isSigner: false,\n isWritable: true\n }];\n if (!params.basePubkey.equals(params.fromPubkey)) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(params) {\n const transaction = new Transaction();\n if (\"basePubkey\" in params && \"seed\" in params) {\n transaction.add(_SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId\n }));\n } else {\n transaction.add(_SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId\n }));\n }\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey\n };\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type2, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer())\n });\n const instructionData = {\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type2);\n const instructionData = {\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type2, {\n lamports: params.lamports\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type2, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer())\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(params) {\n let data;\n let keys;\n if (\"basePubkey\" in params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type2, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }];\n } else {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type2, {\n space: params.space\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: true,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n };\n SystemProgram.programId = new PublicKey(\"11111111111111111111111111111111\");\n var CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n var Loader = class _Loader {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Amount of program data placed in each load Transaction\n */\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength) {\n return 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / _Loader.chunkSize) + 1 + // Add one for Create transaction\n 1);\n }\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(connection, payer, program, programId, data) {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(data.length);\n const programInfo = await connection.getAccountInfo(program.publicKey, \"confirmed\");\n let transaction = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error(\"Program load failed, account is already executable\");\n return false;\n }\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length\n }));\n }\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId\n }));\n }\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports\n }));\n }\n } else {\n transaction = new Transaction().add(SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId\n }));\n }\n if (transaction !== null) {\n await sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: \"confirmed\"\n });\n }\n }\n const dataLayout = BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.u32(\"offset\"), BufferLayout.u32(\"bytesLength\"), BufferLayout.u32(\"bytesLengthPadding\"), BufferLayout.seq(BufferLayout.u8(\"byte\"), BufferLayout.offset(BufferLayout.u32(), -8), \"bytes\")]);\n const chunkSize = _Loader.chunkSize;\n let offset2 = 0;\n let array2 = data;\n let transactions = [];\n while (array2.length > 0) {\n const bytes = array2.slice(0, chunkSize);\n const data2 = Buffer2.alloc(chunkSize + 16);\n dataLayout.encode({\n instruction: 0,\n // Load instruction\n offset: offset2,\n bytes,\n bytesLength: 0,\n bytesLengthPadding: 0\n }, data2);\n const transaction = new Transaction().add({\n keys: [{\n pubkey: program.publicKey,\n isSigner: true,\n isWritable: true\n }],\n programId,\n data: data2\n });\n transactions.push(sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: \"confirmed\"\n }));\n if (connection._rpcEndpoint.includes(\"solana.com\")) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1e3 / REQUESTS_PER_SECOND);\n }\n offset2 += chunkSize;\n array2 = array2.slice(chunkSize);\n }\n await Promise.all(transactions);\n {\n const dataLayout2 = BufferLayout.struct([BufferLayout.u32(\"instruction\")]);\n const data2 = Buffer2.alloc(dataLayout2.span);\n dataLayout2.encode({\n instruction: 1\n // Finalize instruction\n }, data2);\n const transaction = new Transaction().add({\n keys: [{\n pubkey: program.publicKey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId,\n data: data2\n });\n const deployCommitment = \"processed\";\n const finalizeSignature = await connection.sendTransaction(transaction, [payer, program], {\n preflightCommitment: deployCommitment\n });\n const {\n context,\n value\n } = await connection.confirmTransaction({\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n blockhash: transaction.recentBlockhash\n }, deployCommitment);\n if (value.err) {\n throw new Error(`Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`);\n }\n while (true) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n }\n await new Promise((resolve) => setTimeout(resolve, Math.round(MS_PER_SLOT / 2)));\n }\n }\n return true;\n }\n };\n Loader.chunkSize = CHUNK_SIZE;\n var BPF_LOADER_PROGRAM_ID = new PublicKey(\"BPFLoader2111111111111111111111111111111111\");\n var fetchImpl = globalThis.fetch;\n var LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32(\"typeIndex\"),\n u64(\"deactivationSlot\"),\n BufferLayout.nu64(\"lastExtendedSlot\"),\n BufferLayout.u8(\"lastExtendedStartIndex\"),\n BufferLayout.u8(),\n // option\n BufferLayout.seq(publicKey(), BufferLayout.offset(BufferLayout.u8(), -1), \"authority\")\n ])\n };\n var PublicKeyFromString = coerce(instance(PublicKey), string(), (value) => new PublicKey(value));\n var RawAccountDataResult = tuple([string(), literal(\"base64\")]);\n var BufferFromRawAccountData = coerce(instance(Buffer2), RawAccountDataResult, (value) => Buffer2.from(value[0], \"base64\"));\n var BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1e3;\n function createRpcResult(result) {\n return union([type({\n jsonrpc: literal(\"2.0\"),\n id: string(),\n result\n }), type({\n jsonrpc: literal(\"2.0\"),\n id: string(),\n error: type({\n code: unknown(),\n message: string(),\n data: optional(any())\n })\n })]);\n }\n var UnknownRpcResult = createRpcResult(unknown());\n function jsonRpcResult(schema) {\n return coerce(createRpcResult(schema), UnknownRpcResult, (value) => {\n if (\"error\" in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema)\n };\n }\n });\n }\n function jsonRpcResultAndContext(value) {\n return jsonRpcResult(type({\n context: type({\n slot: number()\n }),\n value\n }));\n }\n function notificationResultAndContext(value) {\n return type({\n context: type({\n slot: number()\n }),\n value\n });\n }\n var GetInflationGovernorResult = type({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number()\n });\n var GetInflationRewardResult = jsonRpcResult(array(nullable(type({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number()))\n }))));\n var GetRecentPrioritizationFeesResult = array(type({\n slot: number(),\n prioritizationFee: number()\n }));\n var GetInflationRateResult = type({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number()\n });\n var GetEpochInfoResult = type({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number())\n });\n var GetEpochScheduleResult = type({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number()\n });\n var GetLeaderScheduleResult = record(string(), array(number()));\n var TransactionErrorResult = nullable(union([type({}), string()]));\n var SignatureStatusResult = type({\n err: TransactionErrorResult\n });\n var SignatureReceivedResult = literal(\"receivedSignature\");\n var VersionResult = type({\n \"solana-core\": string(),\n \"feature-set\": optional(number())\n });\n var ParsedInstructionStruct = type({\n program: string(),\n programId: PublicKeyFromString,\n parsed: unknown()\n });\n var PartiallyDecodedInstructionStruct = type({\n programId: PublicKeyFromString,\n accounts: array(PublicKeyFromString),\n data: string()\n });\n var SimulatedTransactionResponseStruct = jsonRpcResultAndContext(type({\n err: nullable(union([type({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(nullable(array(nullable(type({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number())\n }))))),\n unitsConsumed: optional(number()),\n returnData: optional(nullable(type({\n programId: string(),\n data: tuple([string(), literal(\"base64\")])\n }))),\n innerInstructions: optional(nullable(array(type({\n index: number(),\n instructions: array(union([ParsedInstructionStruct, PartiallyDecodedInstructionStruct]))\n }))))\n }));\n var BlockProductionResponseStruct = jsonRpcResultAndContext(type({\n byIdentity: record(string(), array(number())),\n range: type({\n firstSlot: number(),\n lastSlot: number()\n })\n }));\n var GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n var GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n var GetRecentPrioritizationFeesRpcResult = jsonRpcResult(GetRecentPrioritizationFeesResult);\n var GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n var GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n var GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n var SlotRpcResult = jsonRpcResult(number());\n var GetSupplyRpcResult = jsonRpcResultAndContext(type({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString)\n }));\n var TokenAmountResult = type({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string())\n });\n var GetTokenLargestAccountsResult = jsonRpcResultAndContext(array(type({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string())\n })));\n var GetTokenAccountsByOwner = jsonRpcResultAndContext(array(type({\n pubkey: PublicKeyFromString,\n account: type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number()\n })\n })));\n var ParsedAccountDataResult = type({\n program: string(),\n parsed: unknown(),\n space: number()\n });\n var GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(array(type({\n pubkey: PublicKeyFromString,\n account: type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number()\n })\n })));\n var GetLargestAccountsRpcResult = jsonRpcResultAndContext(array(type({\n lamports: number(),\n address: PublicKeyFromString\n })));\n var AccountInfoResult = type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number()\n });\n var KeyedAccountInfoResult = type({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult\n });\n var ParsedOrRawAccountData = coerce(union([instance(Buffer2), ParsedAccountDataResult]), union([RawAccountDataResult, ParsedAccountDataResult]), (value) => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n });\n var ParsedAccountInfoResult = type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number()\n });\n var KeyedParsedAccountInfoResult = type({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult\n });\n var StakeActivationResult = type({\n state: union([literal(\"active\"), literal(\"inactive\"), literal(\"activating\"), literal(\"deactivating\")]),\n active: number(),\n inactive: number()\n });\n var GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(array(type({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number()))\n })));\n var GetSignaturesForAddressRpcResult = jsonRpcResult(array(type({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number()))\n })));\n var AccountNotificationResult = type({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult)\n });\n var ProgramAccountInfoResult = type({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult\n });\n var ProgramAccountNotificationResult = type({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult)\n });\n var SlotInfoResult = type({\n parent: number(),\n slot: number(),\n root: number()\n });\n var SlotNotificationResult = type({\n subscription: number(),\n result: SlotInfoResult\n });\n var SlotUpdateResult = union([type({\n type: union([literal(\"firstShredReceived\"), literal(\"completed\"), literal(\"optimisticConfirmation\"), literal(\"root\")]),\n slot: number(),\n timestamp: number()\n }), type({\n type: literal(\"createdBank\"),\n parent: number(),\n slot: number(),\n timestamp: number()\n }), type({\n type: literal(\"frozen\"),\n slot: number(),\n timestamp: number(),\n stats: type({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number()\n })\n }), type({\n type: literal(\"dead\"),\n slot: number(),\n timestamp: number(),\n err: string()\n })]);\n var SlotUpdateNotificationResult = type({\n subscription: number(),\n result: SlotUpdateResult\n });\n var SignatureNotificationResult = type({\n subscription: number(),\n result: notificationResultAndContext(union([SignatureStatusResult, SignatureReceivedResult]))\n });\n var RootNotificationResult = type({\n subscription: number(),\n result: number()\n });\n var ContactInfoResult = type({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string())\n });\n var VoteAccountInfoResult = type({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number())\n });\n var GetVoteAccounts = jsonRpcResult(type({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult)\n }));\n var ConfirmationStatus = union([literal(\"processed\"), literal(\"confirmed\"), literal(\"finalized\")]);\n var SignatureStatusResponse = type({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus)\n });\n var GetSignatureStatusesRpcResult = jsonRpcResultAndContext(array(nullable(SignatureStatusResponse)));\n var GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n var AddressTableLookupStruct = type({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number())\n });\n var ConfirmedTransactionResult = type({\n signatures: array(string()),\n message: type({\n accountKeys: array(string()),\n header: type({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number()\n }),\n instructions: array(type({\n accounts: array(number()),\n data: string(),\n programIdIndex: number()\n })),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct))\n })\n });\n var AnnotatedAccountKey = type({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal(\"transaction\"), literal(\"lookupTable\")]))\n });\n var ConfirmedTransactionAccountsModeResult = type({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string())\n });\n var ParsedInstructionResult = type({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString\n });\n var RawInstructionResult = type({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString\n });\n var InstructionResult = union([RawInstructionResult, ParsedInstructionResult]);\n var UnknownInstructionResult = union([type({\n parsed: unknown(),\n program: string(),\n programId: string()\n }), type({\n accounts: array(string()),\n data: string(),\n programId: string()\n })]);\n var ParsedOrRawInstruction = coerce(InstructionResult, UnknownInstructionResult, (value) => {\n if (\"accounts\" in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n });\n var ParsedConfirmedTransactionResult = type({\n signatures: array(string()),\n message: type({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct)))\n })\n });\n var TokenBalanceResult = type({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n programId: optional(string()),\n uiTokenAmount: TokenAmountResult\n });\n var LoadedAddressesResult = type({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString)\n });\n var ConfirmedTransactionMetaResult = type({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(nullable(array(type({\n index: number(),\n instructions: array(type({\n accounts: array(number()),\n data: string(),\n programIdIndex: number()\n }))\n })))),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n costUnits: optional(number())\n });\n var ParsedConfirmedTransactionMetaResult = type({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(nullable(array(type({\n index: number(),\n instructions: array(ParsedOrRawInstruction)\n })))),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n costUnits: optional(number())\n });\n var TransactionVersionStruct = union([literal(0), literal(\"legacy\")]);\n var RewardsResult = type({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number()))\n });\n var GetBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetNoneModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetAccountsModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetParsedBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetParsedAccountsModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetParsedNoneModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetConfirmedBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number())\n })));\n var GetBlockSignaturesRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number())\n })));\n var GetTransactionRpcResult = jsonRpcResult(nullable(type({\n slot: number(),\n meta: nullable(ConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct)\n })));\n var GetParsedTransactionRpcResult = jsonRpcResult(nullable(type({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct)\n })));\n var GetLatestBlockhashRpcResult = jsonRpcResultAndContext(type({\n blockhash: string(),\n lastValidBlockHeight: number()\n }));\n var IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n var PerfSampleResult = type({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number()\n });\n var GetRecentPerformanceSamplesRpcResult = jsonRpcResult(array(PerfSampleResult));\n var GetFeeCalculatorRpcResult = jsonRpcResultAndContext(nullable(type({\n feeCalculator: type({\n lamportsPerSignature: number()\n })\n })));\n var RequestAirdropRpcResult = jsonRpcResult(string());\n var SendTransactionRpcResult = jsonRpcResult(string());\n var LogsResult = type({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string()\n });\n var LogsNotificationResult = type({\n result: notificationResultAndContext(LogsResult),\n subscription: number()\n });\n var Keypair = class _Keypair {\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair) {\n this._keypair = void 0;\n this._keypair = keypair ?? generateKeypair();\n }\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate() {\n return new _Keypair(generateKeypair());\n }\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(secretKey, options) {\n if (secretKey.byteLength !== 64) {\n throw new Error(\"bad secret key size\");\n }\n const publicKey2 = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey2[ii] !== computedPublicKey[ii]) {\n throw new Error(\"provided secretKey is invalid\");\n }\n }\n }\n return new _Keypair({\n publicKey: publicKey2,\n secretKey\n });\n }\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed) {\n const publicKey2 = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey2, 32);\n return new _Keypair({\n publicKey: publicKey2,\n secretKey\n });\n }\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey() {\n return new PublicKey(this._keypair.publicKey);\n }\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey() {\n return new Uint8Array(this._keypair.secretKey);\n }\n };\n var LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), u64(\"recentSlot\"), BufferLayout.u8(\"bumpSeed\")])\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), u64(), BufferLayout.seq(publicKey(), BufferLayout.offset(BufferLayout.u32(), -8), \"addresses\")])\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n }\n });\n var AddressLookupTableProgram = class {\n /**\n * @internal\n */\n constructor() {\n }\n static createLookupTable(params) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync([params.authority.toBuffer(), getU64Encoder().encode(params.recentSlot)], this.programId);\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type2, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed\n });\n const keys = [{\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n }];\n return [new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n }), lookupTableAddress];\n }\n static freezeLookupTable(params) {\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type2);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n static extendLookupTable(params) {\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type2, {\n addresses: params.addresses.map((addr) => addr.toBytes())\n });\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n if (params.payer) {\n keys.push({\n pubkey: params.payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n });\n }\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n static deactivateLookupTable(params) {\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type2);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n static closeLookupTable(params) {\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type2);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n };\n AddressLookupTableProgram.programId = new PublicKey(\"AddressLookupTab1e1111111111111111111111111\");\n var COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u8(\"instruction\"), BufferLayout.u32(\"units\"), BufferLayout.u32(\"additionalFee\")])\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u8(\"instruction\"), BufferLayout.u32(\"bytes\")])\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u8(\"instruction\"), BufferLayout.u32(\"units\")])\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u8(\"instruction\"), u64(\"microLamports\")])\n }\n });\n var ComputeBudgetProgram = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the Compute Budget program\n */\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params) {\n const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type2, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static requestHeapFrame(params) {\n const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type2, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static setComputeUnitLimit(params) {\n const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type2, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static setComputeUnitPrice(params) {\n const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type2, {\n microLamports: BigInt(params.microLamports)\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n };\n ComputeBudgetProgram.programId = new PublicKey(\"ComputeBudget111111111111111111111111111111\");\n var PRIVATE_KEY_BYTES$1 = 64;\n var PUBLIC_KEY_BYTES$1 = 32;\n var SIGNATURE_BYTES = 64;\n var ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct([BufferLayout.u8(\"numSignatures\"), BufferLayout.u8(\"padding\"), BufferLayout.u16(\"signatureOffset\"), BufferLayout.u16(\"signatureInstructionIndex\"), BufferLayout.u16(\"publicKeyOffset\"), BufferLayout.u16(\"publicKeyInstructionIndex\"), BufferLayout.u16(\"messageDataOffset\"), BufferLayout.u16(\"messageDataSize\"), BufferLayout.u16(\"messageInstructionIndex\")]);\n var Ed25519Program = class _Ed25519Program {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the ed25519 program\n */\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(params) {\n const {\n publicKey: publicKey2,\n message,\n signature,\n instructionIndex\n } = params;\n assert2(publicKey2.length === PUBLIC_KEY_BYTES$1, `Public Key must be ${PUBLIC_KEY_BYTES$1} bytes but received ${publicKey2.length} bytes`);\n assert2(signature.length === SIGNATURE_BYTES, `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`);\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey2.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n const instructionData = Buffer2.alloc(messageDataOffset + message.length);\n const index = instructionIndex == null ? 65535 : instructionIndex;\n ED25519_INSTRUCTION_LAYOUT.encode({\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index\n }, instructionData);\n instructionData.fill(publicKey2, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n return new TransactionInstruction({\n keys: [],\n programId: _Ed25519Program.programId,\n data: instructionData\n });\n }\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(params) {\n const {\n privateKey,\n message,\n instructionIndex\n } = params;\n assert2(privateKey.length === PRIVATE_KEY_BYTES$1, `Private key must be ${PRIVATE_KEY_BYTES$1} bytes but received ${privateKey.length} bytes`);\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey2 = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n return this.createInstructionWithPublicKey({\n publicKey: publicKey2,\n message,\n signature,\n instructionIndex\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n };\n Ed25519Program.programId = new PublicKey(\"Ed25519SigVerify111111111111111111111111111\");\n var ecdsaSign = (msgHash, privKey) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery];\n };\n secp256k1.utils.isValidPrivateKey;\n var publicKeyCreate = secp256k1.getPublicKey;\n var PRIVATE_KEY_BYTES = 32;\n var ETHEREUM_ADDRESS_BYTES = 20;\n var PUBLIC_KEY_BYTES = 64;\n var SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n var SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct([BufferLayout.u8(\"numSignatures\"), BufferLayout.u16(\"signatureOffset\"), BufferLayout.u8(\"signatureInstructionIndex\"), BufferLayout.u16(\"ethAddressOffset\"), BufferLayout.u8(\"ethAddressInstructionIndex\"), BufferLayout.u16(\"messageDataOffset\"), BufferLayout.u16(\"messageDataSize\"), BufferLayout.u8(\"messageInstructionIndex\"), BufferLayout.blob(20, \"ethAddress\"), BufferLayout.blob(64, \"signature\"), BufferLayout.u8(\"recoveryId\")]);\n var Secp256k1Program = class _Secp256k1Program {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the secp256k1 program\n */\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(publicKey2) {\n assert2(publicKey2.length === PUBLIC_KEY_BYTES, `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey2.length} bytes`);\n try {\n return Buffer2.from(keccak_256(toBuffer(publicKey2))).slice(-ETHEREUM_ADDRESS_BYTES);\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(params) {\n const {\n publicKey: publicKey2,\n message,\n signature,\n recoveryId,\n instructionIndex\n } = params;\n return _Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: _Secp256k1Program.publicKeyToEthAddress(publicKey2),\n message,\n signature,\n recoveryId,\n instructionIndex\n });\n }\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(params) {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0\n } = params;\n let ethAddress;\n if (typeof rawAddress === \"string\") {\n if (rawAddress.startsWith(\"0x\")) {\n ethAddress = Buffer2.from(rawAddress.substr(2), \"hex\");\n } else {\n ethAddress = Buffer2.from(rawAddress, \"hex\");\n }\n } else {\n ethAddress = rawAddress;\n }\n assert2(ethAddress.length === ETHEREUM_ADDRESS_BYTES, `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`);\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n const instructionData = Buffer2.alloc(SECP256K1_INSTRUCTION_LAYOUT.span + message.length);\n SECP256K1_INSTRUCTION_LAYOUT.encode({\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId\n }, instructionData);\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n return new TransactionInstruction({\n keys: [],\n programId: _Secp256k1Program.programId,\n data: instructionData\n });\n }\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(params) {\n const {\n privateKey: pkey,\n message,\n instructionIndex\n } = params;\n assert2(pkey.length === PRIVATE_KEY_BYTES, `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`);\n try {\n const privateKey = toBuffer(pkey);\n const publicKey2 = publicKeyCreate(\n privateKey,\n false\n /* isCompressed */\n ).slice(1);\n const messageHash = Buffer2.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n return this.createInstructionWithPublicKey({\n publicKey: publicKey2,\n message,\n signature,\n recoveryId,\n instructionIndex\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n };\n Secp256k1Program.programId = new PublicKey(\"KeccakSecp256k11111111111111111111111111111\");\n var _Lockup;\n var STAKE_CONFIG_ID = new PublicKey(\"StakeConfig11111111111111111111111111111111\");\n var Lockup = class {\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp, epoch, custodian) {\n this.unixTimestamp = void 0;\n this.epoch = void 0;\n this.custodian = void 0;\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n /**\n * Default, inactive Lockup value\n */\n };\n _Lockup = Lockup;\n Lockup.default = new _Lockup(0, 0, PublicKey.default);\n var STAKE_INSTRUCTION_LAYOUTS = Object.freeze({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), authorized(), lockup()])\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"newAuthorized\"), BufferLayout.u32(\"stakeAuthorizationType\")])\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\")])\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\")])\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"newAuthorized\"), BufferLayout.u32(\"stakeAuthorizationType\"), rustString(\"authoritySeed\"), publicKey(\"authorityOwner\")])\n }\n });\n var StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0\n },\n Withdrawer: {\n index: 1\n }\n });\n var StakeProgram = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the Stake program\n */\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params) {\n const {\n stakePubkey,\n authorized: authorized2,\n lockup: maybeLockup\n } = params;\n const lockup2 = maybeLockup || Lockup.default;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type2, {\n authorized: {\n staker: toBuffer(authorized2.staker.toBuffer()),\n withdrawer: toBuffer(authorized2.withdrawer.toBuffer())\n },\n lockup: {\n unixTimestamp: lockup2.unixTimestamp,\n epoch: lockup2.epoch,\n custodian: toBuffer(lockup2.custodian.toBuffer())\n }\n });\n const instructionData = {\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n const {\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n } = params;\n return transaction.add(this.initialize({\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n }));\n }\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n const {\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n } = params;\n return transaction.add(this.initialize({\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n }));\n }\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n votePubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type2);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: votePubkey,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: STAKE_CONFIG_ID,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type2, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params) {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type2, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer())\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorityBase,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * @internal\n */\n static splitInstruction(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type2, {\n lamports\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: splitStakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params, rentExemptReserve) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: rentExemptReserve,\n space: this.space,\n programId: this.programId\n }));\n return transaction.add(this.splitInstruction(params));\n }\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params, rentExemptReserve) {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports\n } = params;\n const transaction = new Transaction();\n transaction.add(SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId\n }));\n if (rentExemptReserve && rentExemptReserve > 0) {\n transaction.add(SystemProgram.transfer({\n fromPubkey: params.authorizedPubkey,\n toPubkey: splitStakePubkey,\n lamports: rentExemptReserve\n }));\n }\n return transaction.add(this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports\n }));\n }\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params) {\n const {\n stakePubkey,\n sourceStakePubKey,\n authorizedPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type2);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: sourceStakePubKey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n toPubkey,\n lamports,\n custodianPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type2, {\n lamports\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params) {\n const {\n stakePubkey,\n authorizedPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type2);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n };\n StakeProgram.programId = new PublicKey(\"Stake11111111111111111111111111111111111111\");\n StakeProgram.space = 200;\n var VOTE_INSTRUCTION_LAYOUTS = Object.freeze({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), voteInit()])\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"newAuthorized\"), BufferLayout.u32(\"voteAuthorizationType\")])\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\")])\n },\n UpdateValidatorIdentity: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), voteAuthorizeWithSeedArgs()])\n }\n });\n var VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0\n },\n Withdrawer: {\n index: 1\n }\n });\n var VoteProgram = class _VoteProgram {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the Vote program\n */\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(params) {\n const {\n votePubkey,\n nodePubkey,\n voteInit: voteInit2\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type2, {\n voteInit: {\n nodePubkey: toBuffer(voteInit2.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit2.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(voteInit2.authorizedWithdrawer.toBuffer()),\n commission: voteInit2.commission\n }\n });\n const instructionData = {\n keys: [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: nodePubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n return transaction.add(this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit\n }));\n }\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params) {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type2, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params) {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type2, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(currentAuthorityDerivedKeyOwnerPubkey.toBuffer()),\n currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index\n }\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params) {\n const {\n votePubkey,\n authorizedWithdrawerPubkey,\n lamports,\n toPubkey\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type2, {\n lamports\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedWithdrawerPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(params, currentVoteAccountBalance, rentExemptMinimum) {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\"Withdraw will leave vote account with insufficient funds.\");\n }\n return _VoteProgram.withdraw(params);\n }\n /**\n * Generate a transaction to update the validator identity (node pubkey) of a Vote account.\n */\n static updateValidatorIdentity(params) {\n const {\n votePubkey,\n authorizedWithdrawerPubkey,\n nodePubkey\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.UpdateValidatorIdentity;\n const data = encodeData(type2);\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: nodePubkey,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: authorizedWithdrawerPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n };\n VoteProgram.programId = new PublicKey(\"Vote111111111111111111111111111111111111111\");\n VoteProgram.space = 3762;\n var VALIDATOR_INFO_KEY = new PublicKey(\"Va1idator1nfo111111111111111111111111111111\");\n var InfoString = type({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n iconUrl: optional(string()),\n keybaseUsername: optional(string())\n });\n var VOTE_PROGRAM_ID = new PublicKey(\"Vote111111111111111111111111111111111111111\");\n var VoteAccountLayout = BufferLayout.struct([\n publicKey(\"nodePubkey\"),\n publicKey(\"authorizedWithdrawer\"),\n BufferLayout.u8(\"commission\"),\n BufferLayout.nu64(),\n // votes.length\n BufferLayout.seq(BufferLayout.struct([BufferLayout.nu64(\"slot\"), BufferLayout.u32(\"confirmationCount\")]), BufferLayout.offset(BufferLayout.u32(), -8), \"votes\"),\n BufferLayout.u8(\"rootSlotValid\"),\n BufferLayout.nu64(\"rootSlot\"),\n BufferLayout.nu64(),\n // authorizedVoters.length\n BufferLayout.seq(BufferLayout.struct([BufferLayout.nu64(\"epoch\"), publicKey(\"authorizedVoter\")]), BufferLayout.offset(BufferLayout.u32(), -8), \"authorizedVoters\"),\n BufferLayout.struct([BufferLayout.seq(BufferLayout.struct([publicKey(\"authorizedPubkey\"), BufferLayout.nu64(\"epochOfLastAuthorizedSwitch\"), BufferLayout.nu64(\"targetEpoch\")]), 32, \"buf\"), BufferLayout.nu64(\"idx\"), BufferLayout.u8(\"isEmpty\")], \"priorVoters\"),\n BufferLayout.nu64(),\n // epochCredits.length\n BufferLayout.seq(BufferLayout.struct([BufferLayout.nu64(\"epoch\"), BufferLayout.nu64(\"credits\"), BufferLayout.nu64(\"prevCredits\")]), BufferLayout.offset(BufferLayout.u32(), -8), \"epochCredits\"),\n BufferLayout.struct([BufferLayout.nu64(\"slot\"), BufferLayout.nu64(\"timestamp\")], \"lastTimestamp\")\n ]);\n\n // src/lib/lit-actions/internal/solana/generatePrivateKey.ts\n function generateSolanaPrivateKey() {\n const solanaKeypair = Keypair.generate();\n return {\n privateKey: Buffer2.from(solanaKeypair.secretKey).toString(\"hex\"),\n publicKey: solanaKeypair.publicKey.toString()\n };\n }\n\n // src/lib/lit-actions/raw-action-functions/solana/generateEncryptedSolanaPrivateKey.ts\n async function generateEncryptedSolanaPrivateKey({\n accessControlConditions: accessControlConditions2\n }) {\n const { privateKey, publicKey: publicKey2 } = generateSolanaPrivateKey();\n return encryptPrivateKey({\n accessControlConditions: accessControlConditions2,\n publicKey: publicKey2,\n privateKey\n });\n }\n\n // src/lib/lit-actions/self-executing-actions/solana/generateEncryptedSolanaPrivateKey.ts\n (async () => litActionHandler(\n async () => generateEncryptedSolanaPrivateKey({\n accessControlConditions\n })\n ))();\n})();\n/*! Bundled license information:\n\n@jspm/core/nodelibs/browser/chunk-DtuTasat.js:\n (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *)\n\nsafe-buffer/index.js:\n (*! safe-buffer. MIT License. Feross Aboukhadijeh *)\n\n@solana/buffer-layout/lib/Layout.js:\n (**\n * Support for translating between Uint8Array instances and JavaScript\n * native types.\n *\n * {@link module:Layout~Layout|Layout} is the basis of a class\n * hierarchy that associates property names with sequences of encoded\n * bytes.\n *\n * Layouts are supported for these scalar (numeric) types:\n * * {@link module:Layout~UInt|Unsigned integers in little-endian\n * format} with {@link module:Layout.u8|8-bit}, {@link\n * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},\n * {@link module:Layout.u32|32-bit}, {@link\n * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}\n * representation ranges;\n * * {@link module:Layout~UIntBE|Unsigned integers in big-endian\n * format} with {@link module:Layout.u16be|16-bit}, {@link\n * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},\n * {@link module:Layout.u40be|40-bit}, and {@link\n * module:Layout.u48be|48-bit} representation ranges;\n * * {@link module:Layout~Int|Signed integers in little-endian\n * format} with {@link module:Layout.s8|8-bit}, {@link\n * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},\n * {@link module:Layout.s32|32-bit}, {@link\n * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}\n * representation ranges;\n * * {@link module:Layout~IntBE|Signed integers in big-endian format}\n * with {@link module:Layout.s16be|16-bit}, {@link\n * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},\n * {@link module:Layout.s40be|40-bit}, and {@link\n * module:Layout.s48be|48-bit} representation ranges;\n * * 64-bit integral values that decode to an exact (if magnitude is\n * less than 2^53) or nearby integral Number in {@link\n * module:Layout.nu64|unsigned little-endian}, {@link\n * module:Layout.nu64be|unsigned big-endian}, {@link\n * module:Layout.ns64|signed little-endian}, and {@link\n * module:Layout.ns64be|unsigned big-endian} encodings;\n * * 32-bit floating point values with {@link\n * module:Layout.f32|little-endian} and {@link\n * module:Layout.f32be|big-endian} representations;\n * * 64-bit floating point values with {@link\n * module:Layout.f64|little-endian} and {@link\n * module:Layout.f64be|big-endian} representations;\n * * {@link module:Layout.const|Constants} that take no space in the\n * encoded expression.\n *\n * and for these aggregate types:\n * * {@link module:Layout.seq|Sequence}s of instances of a {@link\n * module:Layout~Layout|Layout}, with JavaScript representation as\n * an Array and constant or data-dependent {@link\n * module:Layout~Sequence#count|length};\n * * {@link module:Layout.struct|Structure}s that aggregate a\n * heterogeneous sequence of {@link module:Layout~Layout|Layout}\n * instances, with JavaScript representation as an Object;\n * * {@link module:Layout.union|Union}s that support multiple {@link\n * module:Layout~VariantLayout|variant layouts} over a fixed\n * (padded) or variable (not padded) span of bytes, using an\n * unsigned integer at the start of the data or a separate {@link\n * module:Layout.unionLayoutDiscriminator|layout element} to\n * determine which layout to use when interpreting the buffer\n * contents;\n * * {@link module:Layout.bits|BitStructure}s that contain a sequence\n * of individual {@link\n * module:Layout~BitStructure#addField|BitField}s packed into an 8,\n * 16, 24, or 32-bit unsigned integer starting at the least- or\n * most-significant bit;\n * * {@link module:Layout.cstr|C strings} of varying length;\n * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link\n * module:Layout~Blob#length|length} raw data.\n *\n * All {@link module:Layout~Layout|Layout} instances are immutable\n * after construction, to prevent internal state from becoming\n * inconsistent.\n *\n * @local Layout\n * @local ExternalLayout\n * @local GreedyCount\n * @local OffsetLayout\n * @local UInt\n * @local UIntBE\n * @local Int\n * @local IntBE\n * @local NearUInt64\n * @local NearUInt64BE\n * @local NearInt64\n * @local NearInt64BE\n * @local Float\n * @local FloatBE\n * @local Double\n * @local DoubleBE\n * @local Sequence\n * @local Structure\n * @local UnionDiscriminator\n * @local UnionLayoutDiscriminator\n * @local Union\n * @local VariantLayout\n * @local BitStructure\n * @local BitField\n * @local Boolean\n * @local Blob\n * @local CString\n * @local Constant\n * @local bindConstructorLayout\n * @module Layout\n * @license MIT\n * @author Peter A. Bigot\n * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}\n *)\n\n@noble/hashes/esm/utils.js:\n (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/modular.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/curve.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/edwards.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/ed25519.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/weierstrass.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/_shortw_utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/secp256k1.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n*/\n"; +const code = ";(()=>{try{const g=globalThis;const D=(g.Deno=g.Deno||{});const B=(D.build=D.build||{});if(B.os==null){B.os=\"linux\";}}catch{}})();\n\"use strict\";\n(() => {\n var __create = Object.create;\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __getProtoOf = Object.getPrototypeOf;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n };\n var __commonJS = (cb, mod2) => function __require() {\n return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;\n };\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, \"default\", { value: mod2, enumerable: true }) : target,\n mod2\n ));\n var __toCommonJS = (mod2) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod2);\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/__dirname.js\n var init_dirname = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/__dirname.js\"() {\n \"use strict\";\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js\n function Item(fun, array2) {\n this.fun = fun;\n this.array = array2;\n }\n function hrtime(previousTimestamp) {\n var baseNow = Math.floor((Date.now() - _performance.now()) * 1e-3);\n var clocktime = _performance.now() * 1e-3;\n var seconds = Math.floor(clocktime) + baseNow;\n var nanoseconds = Math.floor(clocktime % 1 * 1e9);\n if (previousTimestamp) {\n seconds = seconds - previousTimestamp[0];\n nanoseconds = nanoseconds - previousTimestamp[1];\n if (nanoseconds < 0) {\n seconds--;\n nanoseconds += nanoPerSec;\n }\n }\n return [seconds, nanoseconds];\n }\n var env, _performance, nowOffset, nanoPerSec;\n var init_process = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Item.prototype.run = function() {\n this.fun.apply(null, this.array);\n };\n env = {\n PATH: \"/usr/bin\",\n LANG: typeof navigator !== \"undefined\" ? navigator.language + \".UTF-8\" : void 0,\n PWD: \"/\",\n HOME: \"/home\",\n TMP: \"/tmp\"\n };\n _performance = {\n now: typeof performance !== \"undefined\" ? performance.now.bind(performance) : void 0,\n timing: typeof performance !== \"undefined\" ? performance.timing : void 0\n };\n if (_performance.now === void 0) {\n nowOffset = Date.now();\n if (_performance.timing && _performance.timing.navigationStart) {\n nowOffset = _performance.timing.navigationStart;\n }\n _performance.now = () => Date.now() - nowOffset;\n }\n nanoPerSec = 1e9;\n hrtime.bigint = function(time) {\n var diff = hrtime(time);\n if (typeof BigInt === \"undefined\") {\n return diff[0] * nanoPerSec + diff[1];\n }\n return BigInt(diff[0] * nanoPerSec) + BigInt(diff[1]);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/process.js\n var init_process2 = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/process.js\"() {\n \"use strict\";\n init_process();\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js\n function dew$2() {\n if (_dewExec$2)\n return exports$2;\n _dewExec$2 = true;\n exports$2.byteLength = byteLength;\n exports$2.toByteArray = toByteArray;\n exports$2.fromByteArray = fromByteArray;\n var lookup = [];\n var revLookup = [];\n var Arr = typeof Uint8Array !== \"undefined\" ? Uint8Array : Array;\n var code = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n for (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i];\n revLookup[code.charCodeAt(i)] = i;\n }\n revLookup[\"-\".charCodeAt(0)] = 62;\n revLookup[\"_\".charCodeAt(0)] = 63;\n function getLens(b64) {\n var len2 = b64.length;\n if (len2 % 4 > 0) {\n throw new Error(\"Invalid string. Length must be a multiple of 4\");\n }\n var validLen = b64.indexOf(\"=\");\n if (validLen === -1)\n validLen = len2;\n var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;\n return [validLen, placeHoldersLen];\n }\n function byteLength(b64) {\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n }\n function _byteLength(b64, validLen, placeHoldersLen) {\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n }\n function toByteArray(b64) {\n var tmp;\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n var curByte = 0;\n var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;\n var i2;\n for (i2 = 0; i2 < len2; i2 += 4) {\n tmp = revLookup[b64.charCodeAt(i2)] << 18 | revLookup[b64.charCodeAt(i2 + 1)] << 12 | revLookup[b64.charCodeAt(i2 + 2)] << 6 | revLookup[b64.charCodeAt(i2 + 3)];\n arr[curByte++] = tmp >> 16 & 255;\n arr[curByte++] = tmp >> 8 & 255;\n arr[curByte++] = tmp & 255;\n }\n if (placeHoldersLen === 2) {\n tmp = revLookup[b64.charCodeAt(i2)] << 2 | revLookup[b64.charCodeAt(i2 + 1)] >> 4;\n arr[curByte++] = tmp & 255;\n }\n if (placeHoldersLen === 1) {\n tmp = revLookup[b64.charCodeAt(i2)] << 10 | revLookup[b64.charCodeAt(i2 + 1)] << 4 | revLookup[b64.charCodeAt(i2 + 2)] >> 2;\n arr[curByte++] = tmp >> 8 & 255;\n arr[curByte++] = tmp & 255;\n }\n return arr;\n }\n function tripletToBase64(num) {\n return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];\n }\n function encodeChunk(uint8, start, end) {\n var tmp;\n var output = [];\n for (var i2 = start; i2 < end; i2 += 3) {\n tmp = (uint8[i2] << 16 & 16711680) + (uint8[i2 + 1] << 8 & 65280) + (uint8[i2 + 2] & 255);\n output.push(tripletToBase64(tmp));\n }\n return output.join(\"\");\n }\n function fromByteArray(uint8) {\n var tmp;\n var len2 = uint8.length;\n var extraBytes = len2 % 3;\n var parts = [];\n var maxChunkLength = 16383;\n for (var i2 = 0, len22 = len2 - extraBytes; i2 < len22; i2 += maxChunkLength) {\n parts.push(encodeChunk(uint8, i2, i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength));\n }\n if (extraBytes === 1) {\n tmp = uint8[len2 - 1];\n parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 63] + \"==\");\n } else if (extraBytes === 2) {\n tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];\n parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + \"=\");\n }\n return parts.join(\"\");\n }\n return exports$2;\n }\n function dew$1() {\n if (_dewExec$1)\n return exports$1;\n _dewExec$1 = true;\n exports$1.read = function(buffer, offset2, isLE2, mLen, nBytes) {\n var e, m;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE2 ? nBytes - 1 : 0;\n var d = isLE2 ? -1 : 1;\n var s = buffer[offset2 + i];\n i += d;\n e = s & (1 << -nBits) - 1;\n s >>= -nBits;\n nBits += eLen;\n for (; nBits > 0; e = e * 256 + buffer[offset2 + i], i += d, nBits -= 8) {\n }\n m = e & (1 << -nBits) - 1;\n e >>= -nBits;\n nBits += mLen;\n for (; nBits > 0; m = m * 256 + buffer[offset2 + i], i += d, nBits -= 8) {\n }\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : (s ? -1 : 1) * Infinity;\n } else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\n };\n exports$1.write = function(buffer, value, offset2, isLE2, mLen, nBytes) {\n var e, m, c;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;\n var i = isLE2 ? 0 : nBytes - 1;\n var d = isLE2 ? 1 : -1;\n var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n value = Math.abs(value);\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n for (; mLen >= 8; buffer[offset2 + i] = m & 255, i += d, m /= 256, mLen -= 8) {\n }\n e = e << mLen | m;\n eLen += mLen;\n for (; eLen > 0; buffer[offset2 + i] = e & 255, i += d, e /= 256, eLen -= 8) {\n }\n buffer[offset2 + i - d] |= s * 128;\n };\n return exports$1;\n }\n function dew() {\n if (_dewExec)\n return exports;\n _dewExec = true;\n const base64 = dew$2();\n const ieee754 = dew$1();\n const customInspectSymbol = typeof Symbol === \"function\" && typeof Symbol[\"for\"] === \"function\" ? Symbol[\"for\"](\"nodejs.util.inspect.custom\") : null;\n exports.Buffer = Buffer3;\n exports.SlowBuffer = SlowBuffer;\n exports.INSPECT_MAX_BYTES = 50;\n const K_MAX_LENGTH = 2147483647;\n exports.kMaxLength = K_MAX_LENGTH;\n Buffer3.TYPED_ARRAY_SUPPORT = typedArraySupport();\n if (!Buffer3.TYPED_ARRAY_SUPPORT && typeof console !== \"undefined\" && typeof console.error === \"function\") {\n console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\");\n }\n function typedArraySupport() {\n try {\n const arr = new Uint8Array(1);\n const proto = {\n foo: function() {\n return 42;\n }\n };\n Object.setPrototypeOf(proto, Uint8Array.prototype);\n Object.setPrototypeOf(arr, proto);\n return arr.foo() === 42;\n } catch (e) {\n return false;\n }\n }\n Object.defineProperty(Buffer3.prototype, \"parent\", {\n enumerable: true,\n get: function() {\n if (!Buffer3.isBuffer(this))\n return void 0;\n return this.buffer;\n }\n });\n Object.defineProperty(Buffer3.prototype, \"offset\", {\n enumerable: true,\n get: function() {\n if (!Buffer3.isBuffer(this))\n return void 0;\n return this.byteOffset;\n }\n });\n function createBuffer(length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"');\n }\n const buf = new Uint8Array(length);\n Object.setPrototypeOf(buf, Buffer3.prototype);\n return buf;\n }\n function Buffer3(arg, encodingOrOffset, length) {\n if (typeof arg === \"number\") {\n if (typeof encodingOrOffset === \"string\") {\n throw new TypeError('The \"string\" argument must be of type string. Received type number');\n }\n return allocUnsafe(arg);\n }\n return from(arg, encodingOrOffset, length);\n }\n Buffer3.poolSize = 8192;\n function from(value, encodingOrOffset, length) {\n if (typeof value === \"string\") {\n return fromString(value, encodingOrOffset);\n }\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value);\n }\n if (value == null) {\n throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n }\n if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {\n return fromArrayBuffer(value, encodingOrOffset, length);\n }\n if (typeof SharedArrayBuffer !== \"undefined\" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length);\n }\n if (typeof value === \"number\") {\n throw new TypeError('The \"value\" argument must not be of type number. Received type number');\n }\n const valueOf = value.valueOf && value.valueOf();\n if (valueOf != null && valueOf !== value) {\n return Buffer3.from(valueOf, encodingOrOffset, length);\n }\n const b = fromObject(value);\n if (b)\n return b;\n if (typeof Symbol !== \"undefined\" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === \"function\") {\n return Buffer3.from(value[Symbol.toPrimitive](\"string\"), encodingOrOffset, length);\n }\n throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof value);\n }\n Buffer3.from = function(value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length);\n };\n Object.setPrototypeOf(Buffer3.prototype, Uint8Array.prototype);\n Object.setPrototypeOf(Buffer3, Uint8Array);\n function assertSize(size) {\n if (typeof size !== \"number\") {\n throw new TypeError('\"size\" argument must be of type number');\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"');\n }\n }\n function alloc(size, fill, encoding) {\n assertSize(size);\n if (size <= 0) {\n return createBuffer(size);\n }\n if (fill !== void 0) {\n return typeof encoding === \"string\" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);\n }\n return createBuffer(size);\n }\n Buffer3.alloc = function(size, fill, encoding) {\n return alloc(size, fill, encoding);\n };\n function allocUnsafe(size) {\n assertSize(size);\n return createBuffer(size < 0 ? 0 : checked(size) | 0);\n }\n Buffer3.allocUnsafe = function(size) {\n return allocUnsafe(size);\n };\n Buffer3.allocUnsafeSlow = function(size) {\n return allocUnsafe(size);\n };\n function fromString(string2, encoding) {\n if (typeof encoding !== \"string\" || encoding === \"\") {\n encoding = \"utf8\";\n }\n if (!Buffer3.isEncoding(encoding)) {\n throw new TypeError(\"Unknown encoding: \" + encoding);\n }\n const length = byteLength(string2, encoding) | 0;\n let buf = createBuffer(length);\n const actual = buf.write(string2, encoding);\n if (actual !== length) {\n buf = buf.slice(0, actual);\n }\n return buf;\n }\n function fromArrayLike(array2) {\n const length = array2.length < 0 ? 0 : checked(array2.length) | 0;\n const buf = createBuffer(length);\n for (let i = 0; i < length; i += 1) {\n buf[i] = array2[i] & 255;\n }\n return buf;\n }\n function fromArrayView(arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView);\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);\n }\n return fromArrayLike(arrayView);\n }\n function fromArrayBuffer(array2, byteOffset, length) {\n if (byteOffset < 0 || array2.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds');\n }\n if (array2.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds');\n }\n let buf;\n if (byteOffset === void 0 && length === void 0) {\n buf = new Uint8Array(array2);\n } else if (length === void 0) {\n buf = new Uint8Array(array2, byteOffset);\n } else {\n buf = new Uint8Array(array2, byteOffset, length);\n }\n Object.setPrototypeOf(buf, Buffer3.prototype);\n return buf;\n }\n function fromObject(obj) {\n if (Buffer3.isBuffer(obj)) {\n const len = checked(obj.length) | 0;\n const buf = createBuffer(len);\n if (buf.length === 0) {\n return buf;\n }\n obj.copy(buf, 0, 0, len);\n return buf;\n }\n if (obj.length !== void 0) {\n if (typeof obj.length !== \"number\" || numberIsNaN(obj.length)) {\n return createBuffer(0);\n }\n return fromArrayLike(obj);\n }\n if (obj.type === \"Buffer\" && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data);\n }\n }\n function checked(length) {\n if (length >= K_MAX_LENGTH) {\n throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\" + K_MAX_LENGTH.toString(16) + \" bytes\");\n }\n return length | 0;\n }\n function SlowBuffer(length) {\n if (+length != length) {\n length = 0;\n }\n return Buffer3.alloc(+length);\n }\n Buffer3.isBuffer = function isBuffer(b) {\n return b != null && b._isBuffer === true && b !== Buffer3.prototype;\n };\n Buffer3.compare = function compare(a, b) {\n if (isInstance(a, Uint8Array))\n a = Buffer3.from(a, a.offset, a.byteLength);\n if (isInstance(b, Uint8Array))\n b = Buffer3.from(b, b.offset, b.byteLength);\n if (!Buffer3.isBuffer(a) || !Buffer3.isBuffer(b)) {\n throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');\n }\n if (a === b)\n return 0;\n let x = a.length;\n let y = b.length;\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n if (x < y)\n return -1;\n if (y < x)\n return 1;\n return 0;\n };\n Buffer3.isEncoding = function isEncoding(encoding) {\n switch (String(encoding).toLowerCase()) {\n case \"hex\":\n case \"utf8\":\n case \"utf-8\":\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n case \"base64\":\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return true;\n default:\n return false;\n }\n };\n Buffer3.concat = function concat(list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n if (list.length === 0) {\n return Buffer3.alloc(0);\n }\n let i;\n if (length === void 0) {\n length = 0;\n for (i = 0; i < list.length; ++i) {\n length += list[i].length;\n }\n }\n const buffer = Buffer3.allocUnsafe(length);\n let pos = 0;\n for (i = 0; i < list.length; ++i) {\n let buf = list[i];\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer3.isBuffer(buf))\n buf = Buffer3.from(buf);\n buf.copy(buffer, pos);\n } else {\n Uint8Array.prototype.set.call(buffer, buf, pos);\n }\n } else if (!Buffer3.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n } else {\n buf.copy(buffer, pos);\n }\n pos += buf.length;\n }\n return buffer;\n };\n function byteLength(string2, encoding) {\n if (Buffer3.isBuffer(string2)) {\n return string2.length;\n }\n if (ArrayBuffer.isView(string2) || isInstance(string2, ArrayBuffer)) {\n return string2.byteLength;\n }\n if (typeof string2 !== \"string\") {\n throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string2);\n }\n const len = string2.length;\n const mustMatch = arguments.length > 2 && arguments[2] === true;\n if (!mustMatch && len === 0)\n return 0;\n let loweredCase = false;\n for (; ; ) {\n switch (encoding) {\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return len;\n case \"utf8\":\n case \"utf-8\":\n return utf8ToBytes2(string2).length;\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return len * 2;\n case \"hex\":\n return len >>> 1;\n case \"base64\":\n return base64ToBytes(string2).length;\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes2(string2).length;\n }\n encoding = (\"\" + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer3.byteLength = byteLength;\n function slowToString(encoding, start, end) {\n let loweredCase = false;\n if (start === void 0 || start < 0) {\n start = 0;\n }\n if (start > this.length) {\n return \"\";\n }\n if (end === void 0 || end > this.length) {\n end = this.length;\n }\n if (end <= 0) {\n return \"\";\n }\n end >>>= 0;\n start >>>= 0;\n if (end <= start) {\n return \"\";\n }\n if (!encoding)\n encoding = \"utf8\";\n while (true) {\n switch (encoding) {\n case \"hex\":\n return hexSlice(this, start, end);\n case \"utf8\":\n case \"utf-8\":\n return utf8Slice(this, start, end);\n case \"ascii\":\n return asciiSlice(this, start, end);\n case \"latin1\":\n case \"binary\":\n return latin1Slice(this, start, end);\n case \"base64\":\n return base64Slice(this, start, end);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return utf16leSlice(this, start, end);\n default:\n if (loweredCase)\n throw new TypeError(\"Unknown encoding: \" + encoding);\n encoding = (encoding + \"\").toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer3.prototype._isBuffer = true;\n function swap(b, n, m) {\n const i = b[n];\n b[n] = b[m];\n b[m] = i;\n }\n Buffer3.prototype.swap16 = function swap16() {\n const len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 16-bits\");\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1);\n }\n return this;\n };\n Buffer3.prototype.swap32 = function swap32() {\n const len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 32-bits\");\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3);\n swap(this, i + 1, i + 2);\n }\n return this;\n };\n Buffer3.prototype.swap64 = function swap64() {\n const len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError(\"Buffer size must be a multiple of 64-bits\");\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7);\n swap(this, i + 1, i + 6);\n swap(this, i + 2, i + 5);\n swap(this, i + 3, i + 4);\n }\n return this;\n };\n Buffer3.prototype.toString = function toString() {\n const length = this.length;\n if (length === 0)\n return \"\";\n if (arguments.length === 0)\n return utf8Slice(this, 0, length);\n return slowToString.apply(this, arguments);\n };\n Buffer3.prototype.toLocaleString = Buffer3.prototype.toString;\n Buffer3.prototype.equals = function equals(b) {\n if (!Buffer3.isBuffer(b))\n throw new TypeError(\"Argument must be a Buffer\");\n if (this === b)\n return true;\n return Buffer3.compare(this, b) === 0;\n };\n Buffer3.prototype.inspect = function inspect() {\n let str = \"\";\n const max = exports.INSPECT_MAX_BYTES;\n str = this.toString(\"hex\", 0, max).replace(/(.{2})/g, \"$1 \").trim();\n if (this.length > max)\n str += \" ... \";\n return \"\";\n };\n if (customInspectSymbol) {\n Buffer3.prototype[customInspectSymbol] = Buffer3.prototype.inspect;\n }\n Buffer3.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer3.from(target, target.offset, target.byteLength);\n }\n if (!Buffer3.isBuffer(target)) {\n throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target);\n }\n if (start === void 0) {\n start = 0;\n }\n if (end === void 0) {\n end = target ? target.length : 0;\n }\n if (thisStart === void 0) {\n thisStart = 0;\n }\n if (thisEnd === void 0) {\n thisEnd = this.length;\n }\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError(\"out of range index\");\n }\n if (thisStart >= thisEnd && start >= end) {\n return 0;\n }\n if (thisStart >= thisEnd) {\n return -1;\n }\n if (start >= end) {\n return 1;\n }\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n if (this === target)\n return 0;\n let x = thisEnd - thisStart;\n let y = end - start;\n const len = Math.min(x, y);\n const thisCopy = this.slice(thisStart, thisEnd);\n const targetCopy = target.slice(start, end);\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i];\n y = targetCopy[i];\n break;\n }\n }\n if (x < y)\n return -1;\n if (y < x)\n return 1;\n return 0;\n };\n function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n if (buffer.length === 0)\n return -1;\n if (typeof byteOffset === \"string\") {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 2147483647) {\n byteOffset = 2147483647;\n } else if (byteOffset < -2147483648) {\n byteOffset = -2147483648;\n }\n byteOffset = +byteOffset;\n if (numberIsNaN(byteOffset)) {\n byteOffset = dir ? 0 : buffer.length - 1;\n }\n if (byteOffset < 0)\n byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir)\n return -1;\n else\n byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir)\n byteOffset = 0;\n else\n return -1;\n }\n if (typeof val === \"string\") {\n val = Buffer3.from(val, encoding);\n }\n if (Buffer3.isBuffer(val)) {\n if (val.length === 0) {\n return -1;\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n } else if (typeof val === \"number\") {\n val = val & 255;\n if (typeof Uint8Array.prototype.indexOf === \"function\") {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n }\n throw new TypeError(\"val must be string, number or Buffer\");\n }\n function arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n let indexSize = 1;\n let arrLength = arr.length;\n let valLength = val.length;\n if (encoding !== void 0) {\n encoding = String(encoding).toLowerCase();\n if (encoding === \"ucs2\" || encoding === \"ucs-2\" || encoding === \"utf16le\" || encoding === \"utf-16le\") {\n if (arr.length < 2 || val.length < 2) {\n return -1;\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n function read(buf, i2) {\n if (indexSize === 1) {\n return buf[i2];\n } else {\n return buf.readUInt16BE(i2 * indexSize);\n }\n }\n let i;\n if (dir) {\n let foundIndex = -1;\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1)\n foundIndex = i;\n if (i - foundIndex + 1 === valLength)\n return foundIndex * indexSize;\n } else {\n if (foundIndex !== -1)\n i -= i - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength)\n byteOffset = arrLength - valLength;\n for (i = byteOffset; i >= 0; i--) {\n let found = true;\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false;\n break;\n }\n }\n if (found)\n return i;\n }\n }\n return -1;\n }\n Buffer3.prototype.includes = function includes(val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1;\n };\n Buffer3.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n };\n Buffer3.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n };\n function hexWrite(buf, string2, offset2, length) {\n offset2 = Number(offset2) || 0;\n const remaining = buf.length - offset2;\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n if (length > remaining) {\n length = remaining;\n }\n }\n const strLen = string2.length;\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n let i;\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string2.substr(i * 2, 2), 16);\n if (numberIsNaN(parsed))\n return i;\n buf[offset2 + i] = parsed;\n }\n return i;\n }\n function utf8Write(buf, string2, offset2, length) {\n return blitBuffer(utf8ToBytes2(string2, buf.length - offset2), buf, offset2, length);\n }\n function asciiWrite(buf, string2, offset2, length) {\n return blitBuffer(asciiToBytes(string2), buf, offset2, length);\n }\n function base64Write(buf, string2, offset2, length) {\n return blitBuffer(base64ToBytes(string2), buf, offset2, length);\n }\n function ucs2Write(buf, string2, offset2, length) {\n return blitBuffer(utf16leToBytes(string2, buf.length - offset2), buf, offset2, length);\n }\n Buffer3.prototype.write = function write(string2, offset2, length, encoding) {\n if (offset2 === void 0) {\n encoding = \"utf8\";\n length = this.length;\n offset2 = 0;\n } else if (length === void 0 && typeof offset2 === \"string\") {\n encoding = offset2;\n length = this.length;\n offset2 = 0;\n } else if (isFinite(offset2)) {\n offset2 = offset2 >>> 0;\n if (isFinite(length)) {\n length = length >>> 0;\n if (encoding === void 0)\n encoding = \"utf8\";\n } else {\n encoding = length;\n length = void 0;\n }\n } else {\n throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");\n }\n const remaining = this.length - offset2;\n if (length === void 0 || length > remaining)\n length = remaining;\n if (string2.length > 0 && (length < 0 || offset2 < 0) || offset2 > this.length) {\n throw new RangeError(\"Attempt to write outside buffer bounds\");\n }\n if (!encoding)\n encoding = \"utf8\";\n let loweredCase = false;\n for (; ; ) {\n switch (encoding) {\n case \"hex\":\n return hexWrite(this, string2, offset2, length);\n case \"utf8\":\n case \"utf-8\":\n return utf8Write(this, string2, offset2, length);\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return asciiWrite(this, string2, offset2, length);\n case \"base64\":\n return base64Write(this, string2, offset2, length);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return ucs2Write(this, string2, offset2, length);\n default:\n if (loweredCase)\n throw new TypeError(\"Unknown encoding: \" + encoding);\n encoding = (\"\" + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n };\n Buffer3.prototype.toJSON = function toJSON() {\n return {\n type: \"Buffer\",\n data: Array.prototype.slice.call(this._arr || this, 0)\n };\n };\n function base64Slice(buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf);\n } else {\n return base64.fromByteArray(buf.slice(start, end));\n }\n }\n function utf8Slice(buf, start, end) {\n end = Math.min(buf.length, end);\n const res = [];\n let i = start;\n while (i < end) {\n const firstByte = buf[i];\n let codePoint = null;\n let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint;\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 128) {\n codePoint = firstByte;\n }\n break;\n case 2:\n secondByte = buf[i + 1];\n if ((secondByte & 192) === 128) {\n tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;\n if (tempCodePoint > 127) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 3:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {\n tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;\n if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 4:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n fourthByte = buf[i + 3];\n if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {\n tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;\n if (tempCodePoint > 65535 && tempCodePoint < 1114112) {\n codePoint = tempCodePoint;\n }\n }\n }\n }\n if (codePoint === null) {\n codePoint = 65533;\n bytesPerSequence = 1;\n } else if (codePoint > 65535) {\n codePoint -= 65536;\n res.push(codePoint >>> 10 & 1023 | 55296);\n codePoint = 56320 | codePoint & 1023;\n }\n res.push(codePoint);\n i += bytesPerSequence;\n }\n return decodeCodePointsArray(res);\n }\n const MAX_ARGUMENTS_LENGTH = 4096;\n function decodeCodePointsArray(codePoints) {\n const len = codePoints.length;\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints);\n }\n let res = \"\";\n let i = 0;\n while (i < len) {\n res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));\n }\n return res;\n }\n function asciiSlice(buf, start, end) {\n let ret = \"\";\n end = Math.min(buf.length, end);\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 127);\n }\n return ret;\n }\n function latin1Slice(buf, start, end) {\n let ret = \"\";\n end = Math.min(buf.length, end);\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i]);\n }\n return ret;\n }\n function hexSlice(buf, start, end) {\n const len = buf.length;\n if (!start || start < 0)\n start = 0;\n if (!end || end < 0 || end > len)\n end = len;\n let out = \"\";\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]];\n }\n return out;\n }\n function utf16leSlice(buf, start, end) {\n const bytes = buf.slice(start, end);\n let res = \"\";\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n }\n return res;\n }\n Buffer3.prototype.slice = function slice(start, end) {\n const len = this.length;\n start = ~~start;\n end = end === void 0 ? len : ~~end;\n if (start < 0) {\n start += len;\n if (start < 0)\n start = 0;\n } else if (start > len) {\n start = len;\n }\n if (end < 0) {\n end += len;\n if (end < 0)\n end = 0;\n } else if (end > len) {\n end = len;\n }\n if (end < start)\n end = start;\n const newBuf = this.subarray(start, end);\n Object.setPrototypeOf(newBuf, Buffer3.prototype);\n return newBuf;\n };\n function checkOffset(offset2, ext, length) {\n if (offset2 % 1 !== 0 || offset2 < 0)\n throw new RangeError(\"offset is not uint\");\n if (offset2 + ext > length)\n throw new RangeError(\"Trying to access beyond buffer length\");\n }\n Buffer3.prototype.readUintLE = Buffer3.prototype.readUIntLE = function readUIntLE(offset2, byteLength2, noAssert) {\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, byteLength2, this.length);\n let val = this[offset2];\n let mul = 1;\n let i = 0;\n while (++i < byteLength2 && (mul *= 256)) {\n val += this[offset2 + i] * mul;\n }\n return val;\n };\n Buffer3.prototype.readUintBE = Buffer3.prototype.readUIntBE = function readUIntBE(offset2, byteLength2, noAssert) {\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n checkOffset(offset2, byteLength2, this.length);\n }\n let val = this[offset2 + --byteLength2];\n let mul = 1;\n while (byteLength2 > 0 && (mul *= 256)) {\n val += this[offset2 + --byteLength2] * mul;\n }\n return val;\n };\n Buffer3.prototype.readUint8 = Buffer3.prototype.readUInt8 = function readUInt8(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 1, this.length);\n return this[offset2];\n };\n Buffer3.prototype.readUint16LE = Buffer3.prototype.readUInt16LE = function readUInt16LE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 2, this.length);\n return this[offset2] | this[offset2 + 1] << 8;\n };\n Buffer3.prototype.readUint16BE = Buffer3.prototype.readUInt16BE = function readUInt16BE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 2, this.length);\n return this[offset2] << 8 | this[offset2 + 1];\n };\n Buffer3.prototype.readUint32LE = Buffer3.prototype.readUInt32LE = function readUInt32LE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return (this[offset2] | this[offset2 + 1] << 8 | this[offset2 + 2] << 16) + this[offset2 + 3] * 16777216;\n };\n Buffer3.prototype.readUint32BE = Buffer3.prototype.readUInt32BE = function readUInt32BE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return this[offset2] * 16777216 + (this[offset2 + 1] << 16 | this[offset2 + 2] << 8 | this[offset2 + 3]);\n };\n Buffer3.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset2) {\n offset2 = offset2 >>> 0;\n validateNumber(offset2, \"offset\");\n const first = this[offset2];\n const last = this[offset2 + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset2, this.length - 8);\n }\n const lo = first + this[++offset2] * 2 ** 8 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 24;\n const hi = this[++offset2] + this[++offset2] * 2 ** 8 + this[++offset2] * 2 ** 16 + last * 2 ** 24;\n return BigInt(lo) + (BigInt(hi) << BigInt(32));\n });\n Buffer3.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset2) {\n offset2 = offset2 >>> 0;\n validateNumber(offset2, \"offset\");\n const first = this[offset2];\n const last = this[offset2 + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset2, this.length - 8);\n }\n const hi = first * 2 ** 24 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + this[++offset2];\n const lo = this[++offset2] * 2 ** 24 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + last;\n return (BigInt(hi) << BigInt(32)) + BigInt(lo);\n });\n Buffer3.prototype.readIntLE = function readIntLE(offset2, byteLength2, noAssert) {\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, byteLength2, this.length);\n let val = this[offset2];\n let mul = 1;\n let i = 0;\n while (++i < byteLength2 && (mul *= 256)) {\n val += this[offset2 + i] * mul;\n }\n mul *= 128;\n if (val >= mul)\n val -= Math.pow(2, 8 * byteLength2);\n return val;\n };\n Buffer3.prototype.readIntBE = function readIntBE(offset2, byteLength2, noAssert) {\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, byteLength2, this.length);\n let i = byteLength2;\n let mul = 1;\n let val = this[offset2 + --i];\n while (i > 0 && (mul *= 256)) {\n val += this[offset2 + --i] * mul;\n }\n mul *= 128;\n if (val >= mul)\n val -= Math.pow(2, 8 * byteLength2);\n return val;\n };\n Buffer3.prototype.readInt8 = function readInt8(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 1, this.length);\n if (!(this[offset2] & 128))\n return this[offset2];\n return (255 - this[offset2] + 1) * -1;\n };\n Buffer3.prototype.readInt16LE = function readInt16LE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 2, this.length);\n const val = this[offset2] | this[offset2 + 1] << 8;\n return val & 32768 ? val | 4294901760 : val;\n };\n Buffer3.prototype.readInt16BE = function readInt16BE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 2, this.length);\n const val = this[offset2 + 1] | this[offset2] << 8;\n return val & 32768 ? val | 4294901760 : val;\n };\n Buffer3.prototype.readInt32LE = function readInt32LE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return this[offset2] | this[offset2 + 1] << 8 | this[offset2 + 2] << 16 | this[offset2 + 3] << 24;\n };\n Buffer3.prototype.readInt32BE = function readInt32BE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return this[offset2] << 24 | this[offset2 + 1] << 16 | this[offset2 + 2] << 8 | this[offset2 + 3];\n };\n Buffer3.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset2) {\n offset2 = offset2 >>> 0;\n validateNumber(offset2, \"offset\");\n const first = this[offset2];\n const last = this[offset2 + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset2, this.length - 8);\n }\n const val = this[offset2 + 4] + this[offset2 + 5] * 2 ** 8 + this[offset2 + 6] * 2 ** 16 + (last << 24);\n return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset2] * 2 ** 8 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 24);\n });\n Buffer3.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset2) {\n offset2 = offset2 >>> 0;\n validateNumber(offset2, \"offset\");\n const first = this[offset2];\n const last = this[offset2 + 7];\n if (first === void 0 || last === void 0) {\n boundsError(offset2, this.length - 8);\n }\n const val = (first << 24) + // Overflow\n this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + this[++offset2];\n return (BigInt(val) << BigInt(32)) + BigInt(this[++offset2] * 2 ** 24 + this[++offset2] * 2 ** 16 + this[++offset2] * 2 ** 8 + last);\n });\n Buffer3.prototype.readFloatLE = function readFloatLE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return ieee754.read(this, offset2, true, 23, 4);\n };\n Buffer3.prototype.readFloatBE = function readFloatBE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 4, this.length);\n return ieee754.read(this, offset2, false, 23, 4);\n };\n Buffer3.prototype.readDoubleLE = function readDoubleLE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 8, this.length);\n return ieee754.read(this, offset2, true, 52, 8);\n };\n Buffer3.prototype.readDoubleBE = function readDoubleBE(offset2, noAssert) {\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkOffset(offset2, 8, this.length);\n return ieee754.read(this, offset2, false, 52, 8);\n };\n function checkInt(buf, value, offset2, ext, max, min) {\n if (!Buffer3.isBuffer(buf))\n throw new TypeError('\"buffer\" argument must be a Buffer instance');\n if (value > max || value < min)\n throw new RangeError('\"value\" argument is out of bounds');\n if (offset2 + ext > buf.length)\n throw new RangeError(\"Index out of range\");\n }\n Buffer3.prototype.writeUintLE = Buffer3.prototype.writeUIntLE = function writeUIntLE(value, offset2, byteLength2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength2) - 1;\n checkInt(this, value, offset2, byteLength2, maxBytes, 0);\n }\n let mul = 1;\n let i = 0;\n this[offset2] = value & 255;\n while (++i < byteLength2 && (mul *= 256)) {\n this[offset2 + i] = value / mul & 255;\n }\n return offset2 + byteLength2;\n };\n Buffer3.prototype.writeUintBE = Buffer3.prototype.writeUIntBE = function writeUIntBE(value, offset2, byteLength2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n byteLength2 = byteLength2 >>> 0;\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength2) - 1;\n checkInt(this, value, offset2, byteLength2, maxBytes, 0);\n }\n let i = byteLength2 - 1;\n let mul = 1;\n this[offset2 + i] = value & 255;\n while (--i >= 0 && (mul *= 256)) {\n this[offset2 + i] = value / mul & 255;\n }\n return offset2 + byteLength2;\n };\n Buffer3.prototype.writeUint8 = Buffer3.prototype.writeUInt8 = function writeUInt8(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 1, 255, 0);\n this[offset2] = value & 255;\n return offset2 + 1;\n };\n Buffer3.prototype.writeUint16LE = Buffer3.prototype.writeUInt16LE = function writeUInt16LE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 2, 65535, 0);\n this[offset2] = value & 255;\n this[offset2 + 1] = value >>> 8;\n return offset2 + 2;\n };\n Buffer3.prototype.writeUint16BE = Buffer3.prototype.writeUInt16BE = function writeUInt16BE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 2, 65535, 0);\n this[offset2] = value >>> 8;\n this[offset2 + 1] = value & 255;\n return offset2 + 2;\n };\n Buffer3.prototype.writeUint32LE = Buffer3.prototype.writeUInt32LE = function writeUInt32LE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 4, 4294967295, 0);\n this[offset2 + 3] = value >>> 24;\n this[offset2 + 2] = value >>> 16;\n this[offset2 + 1] = value >>> 8;\n this[offset2] = value & 255;\n return offset2 + 4;\n };\n Buffer3.prototype.writeUint32BE = Buffer3.prototype.writeUInt32BE = function writeUInt32BE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 4, 4294967295, 0);\n this[offset2] = value >>> 24;\n this[offset2 + 1] = value >>> 16;\n this[offset2 + 2] = value >>> 8;\n this[offset2 + 3] = value & 255;\n return offset2 + 4;\n };\n function wrtBigUInt64LE(buf, value, offset2, min, max) {\n checkIntBI(value, min, max, buf, offset2, 7);\n let lo = Number(value & BigInt(4294967295));\n buf[offset2++] = lo;\n lo = lo >> 8;\n buf[offset2++] = lo;\n lo = lo >> 8;\n buf[offset2++] = lo;\n lo = lo >> 8;\n buf[offset2++] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(4294967295));\n buf[offset2++] = hi;\n hi = hi >> 8;\n buf[offset2++] = hi;\n hi = hi >> 8;\n buf[offset2++] = hi;\n hi = hi >> 8;\n buf[offset2++] = hi;\n return offset2;\n }\n function wrtBigUInt64BE(buf, value, offset2, min, max) {\n checkIntBI(value, min, max, buf, offset2, 7);\n let lo = Number(value & BigInt(4294967295));\n buf[offset2 + 7] = lo;\n lo = lo >> 8;\n buf[offset2 + 6] = lo;\n lo = lo >> 8;\n buf[offset2 + 5] = lo;\n lo = lo >> 8;\n buf[offset2 + 4] = lo;\n let hi = Number(value >> BigInt(32) & BigInt(4294967295));\n buf[offset2 + 3] = hi;\n hi = hi >> 8;\n buf[offset2 + 2] = hi;\n hi = hi >> 8;\n buf[offset2 + 1] = hi;\n hi = hi >> 8;\n buf[offset2] = hi;\n return offset2 + 8;\n }\n Buffer3.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset2 = 0) {\n return wrtBigUInt64LE(this, value, offset2, BigInt(0), BigInt(\"0xffffffffffffffff\"));\n });\n Buffer3.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset2 = 0) {\n return wrtBigUInt64BE(this, value, offset2, BigInt(0), BigInt(\"0xffffffffffffffff\"));\n });\n Buffer3.prototype.writeIntLE = function writeIntLE(value, offset2, byteLength2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, 8 * byteLength2 - 1);\n checkInt(this, value, offset2, byteLength2, limit - 1, -limit);\n }\n let i = 0;\n let mul = 1;\n let sub = 0;\n this[offset2] = value & 255;\n while (++i < byteLength2 && (mul *= 256)) {\n if (value < 0 && sub === 0 && this[offset2 + i - 1] !== 0) {\n sub = 1;\n }\n this[offset2 + i] = (value / mul >> 0) - sub & 255;\n }\n return offset2 + byteLength2;\n };\n Buffer3.prototype.writeIntBE = function writeIntBE(value, offset2, byteLength2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert) {\n const limit = Math.pow(2, 8 * byteLength2 - 1);\n checkInt(this, value, offset2, byteLength2, limit - 1, -limit);\n }\n let i = byteLength2 - 1;\n let mul = 1;\n let sub = 0;\n this[offset2 + i] = value & 255;\n while (--i >= 0 && (mul *= 256)) {\n if (value < 0 && sub === 0 && this[offset2 + i + 1] !== 0) {\n sub = 1;\n }\n this[offset2 + i] = (value / mul >> 0) - sub & 255;\n }\n return offset2 + byteLength2;\n };\n Buffer3.prototype.writeInt8 = function writeInt8(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 1, 127, -128);\n if (value < 0)\n value = 255 + value + 1;\n this[offset2] = value & 255;\n return offset2 + 1;\n };\n Buffer3.prototype.writeInt16LE = function writeInt16LE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 2, 32767, -32768);\n this[offset2] = value & 255;\n this[offset2 + 1] = value >>> 8;\n return offset2 + 2;\n };\n Buffer3.prototype.writeInt16BE = function writeInt16BE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 2, 32767, -32768);\n this[offset2] = value >>> 8;\n this[offset2 + 1] = value & 255;\n return offset2 + 2;\n };\n Buffer3.prototype.writeInt32LE = function writeInt32LE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 4, 2147483647, -2147483648);\n this[offset2] = value & 255;\n this[offset2 + 1] = value >>> 8;\n this[offset2 + 2] = value >>> 16;\n this[offset2 + 3] = value >>> 24;\n return offset2 + 4;\n };\n Buffer3.prototype.writeInt32BE = function writeInt32BE(value, offset2, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert)\n checkInt(this, value, offset2, 4, 2147483647, -2147483648);\n if (value < 0)\n value = 4294967295 + value + 1;\n this[offset2] = value >>> 24;\n this[offset2 + 1] = value >>> 16;\n this[offset2 + 2] = value >>> 8;\n this[offset2 + 3] = value & 255;\n return offset2 + 4;\n };\n Buffer3.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset2 = 0) {\n return wrtBigUInt64LE(this, value, offset2, -BigInt(\"0x8000000000000000\"), BigInt(\"0x7fffffffffffffff\"));\n });\n Buffer3.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset2 = 0) {\n return wrtBigUInt64BE(this, value, offset2, -BigInt(\"0x8000000000000000\"), BigInt(\"0x7fffffffffffffff\"));\n });\n function checkIEEE754(buf, value, offset2, ext, max, min) {\n if (offset2 + ext > buf.length)\n throw new RangeError(\"Index out of range\");\n if (offset2 < 0)\n throw new RangeError(\"Index out of range\");\n }\n function writeFloat(buf, value, offset2, littleEndian, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset2, 4);\n }\n ieee754.write(buf, value, offset2, littleEndian, 23, 4);\n return offset2 + 4;\n }\n Buffer3.prototype.writeFloatLE = function writeFloatLE(value, offset2, noAssert) {\n return writeFloat(this, value, offset2, true, noAssert);\n };\n Buffer3.prototype.writeFloatBE = function writeFloatBE(value, offset2, noAssert) {\n return writeFloat(this, value, offset2, false, noAssert);\n };\n function writeDouble(buf, value, offset2, littleEndian, noAssert) {\n value = +value;\n offset2 = offset2 >>> 0;\n if (!noAssert) {\n checkIEEE754(buf, value, offset2, 8);\n }\n ieee754.write(buf, value, offset2, littleEndian, 52, 8);\n return offset2 + 8;\n }\n Buffer3.prototype.writeDoubleLE = function writeDoubleLE(value, offset2, noAssert) {\n return writeDouble(this, value, offset2, true, noAssert);\n };\n Buffer3.prototype.writeDoubleBE = function writeDoubleBE(value, offset2, noAssert) {\n return writeDouble(this, value, offset2, false, noAssert);\n };\n Buffer3.prototype.copy = function copy(target, targetStart, start, end) {\n if (!Buffer3.isBuffer(target))\n throw new TypeError(\"argument should be a Buffer\");\n if (!start)\n start = 0;\n if (!end && end !== 0)\n end = this.length;\n if (targetStart >= target.length)\n targetStart = target.length;\n if (!targetStart)\n targetStart = 0;\n if (end > 0 && end < start)\n end = start;\n if (end === start)\n return 0;\n if (target.length === 0 || this.length === 0)\n return 0;\n if (targetStart < 0) {\n throw new RangeError(\"targetStart out of bounds\");\n }\n if (start < 0 || start >= this.length)\n throw new RangeError(\"Index out of range\");\n if (end < 0)\n throw new RangeError(\"sourceEnd out of bounds\");\n if (end > this.length)\n end = this.length;\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n const len = end - start;\n if (this === target && typeof Uint8Array.prototype.copyWithin === \"function\") {\n this.copyWithin(targetStart, start, end);\n } else {\n Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);\n }\n return len;\n };\n Buffer3.prototype.fill = function fill(val, start, end, encoding) {\n if (typeof val === \"string\") {\n if (typeof start === \"string\") {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === \"string\") {\n encoding = end;\n end = this.length;\n }\n if (encoding !== void 0 && typeof encoding !== \"string\") {\n throw new TypeError(\"encoding must be a string\");\n }\n if (typeof encoding === \"string\" && !Buffer3.isEncoding(encoding)) {\n throw new TypeError(\"Unknown encoding: \" + encoding);\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0);\n if (encoding === \"utf8\" && code < 128 || encoding === \"latin1\") {\n val = code;\n }\n }\n } else if (typeof val === \"number\") {\n val = val & 255;\n } else if (typeof val === \"boolean\") {\n val = Number(val);\n }\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError(\"Out of range index\");\n }\n if (end <= start) {\n return this;\n }\n start = start >>> 0;\n end = end === void 0 ? this.length : end >>> 0;\n if (!val)\n val = 0;\n let i;\n if (typeof val === \"number\") {\n for (i = start; i < end; ++i) {\n this[i] = val;\n }\n } else {\n const bytes = Buffer3.isBuffer(val) ? val : Buffer3.from(val, encoding);\n const len = bytes.length;\n if (len === 0) {\n throw new TypeError('The value \"' + val + '\" is invalid for argument \"value\"');\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len];\n }\n }\n return this;\n };\n const errors = {};\n function E(sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor() {\n super();\n Object.defineProperty(this, \"message\", {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n });\n this.name = `${this.name} [${sym}]`;\n this.stack;\n delete this.name;\n }\n get code() {\n return sym;\n }\n set code(value) {\n Object.defineProperty(this, \"code\", {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n });\n }\n toString() {\n return `${this.name} [${sym}]: ${this.message}`;\n }\n };\n }\n E(\"ERR_BUFFER_OUT_OF_BOUNDS\", function(name) {\n if (name) {\n return `${name} is outside of buffer bounds`;\n }\n return \"Attempt to access memory outside buffer bounds\";\n }, RangeError);\n E(\"ERR_INVALID_ARG_TYPE\", function(name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`;\n }, TypeError);\n E(\"ERR_OUT_OF_RANGE\", function(str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`;\n let received = input;\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input));\n } else if (typeof input === \"bigint\") {\n received = String(input);\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received);\n }\n received += \"n\";\n }\n msg += ` It must be ${range}. Received ${received}`;\n return msg;\n }, RangeError);\n function addNumericalSeparator(val) {\n let res = \"\";\n let i = val.length;\n const start = val[0] === \"-\" ? 1 : 0;\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`;\n }\n return `${val.slice(0, i)}${res}`;\n }\n function checkBounds(buf, offset2, byteLength2) {\n validateNumber(offset2, \"offset\");\n if (buf[offset2] === void 0 || buf[offset2 + byteLength2] === void 0) {\n boundsError(offset2, buf.length - (byteLength2 + 1));\n }\n }\n function checkIntBI(value, min, max, buf, offset2, byteLength2) {\n if (value > max || value < min) {\n const n = typeof min === \"bigint\" ? \"n\" : \"\";\n let range;\n {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength2 + 1) * 8}${n}`;\n } else {\n range = `>= -(2${n} ** ${(byteLength2 + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength2 + 1) * 8 - 1}${n}`;\n }\n }\n throw new errors.ERR_OUT_OF_RANGE(\"value\", range, value);\n }\n checkBounds(buf, offset2, byteLength2);\n }\n function validateNumber(value, name) {\n if (typeof value !== \"number\") {\n throw new errors.ERR_INVALID_ARG_TYPE(name, \"number\", value);\n }\n }\n function boundsError(value, length, type2) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type2);\n throw new errors.ERR_OUT_OF_RANGE(\"offset\", \"an integer\", value);\n }\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();\n }\n throw new errors.ERR_OUT_OF_RANGE(\"offset\", `>= ${0} and <= ${length}`, value);\n }\n const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\n function base64clean(str) {\n str = str.split(\"=\")[0];\n str = str.trim().replace(INVALID_BASE64_RE, \"\");\n if (str.length < 2)\n return \"\";\n while (str.length % 4 !== 0) {\n str = str + \"=\";\n }\n return str;\n }\n function utf8ToBytes2(string2, units) {\n units = units || Infinity;\n let codePoint;\n const length = string2.length;\n let leadSurrogate = null;\n const bytes = [];\n for (let i = 0; i < length; ++i) {\n codePoint = string2.charCodeAt(i);\n if (codePoint > 55295 && codePoint < 57344) {\n if (!leadSurrogate) {\n if (codePoint > 56319) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n continue;\n } else if (i + 1 === length) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n continue;\n }\n leadSurrogate = codePoint;\n continue;\n }\n if (codePoint < 56320) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n leadSurrogate = codePoint;\n continue;\n }\n codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;\n } else if (leadSurrogate) {\n if ((units -= 3) > -1)\n bytes.push(239, 191, 189);\n }\n leadSurrogate = null;\n if (codePoint < 128) {\n if ((units -= 1) < 0)\n break;\n bytes.push(codePoint);\n } else if (codePoint < 2048) {\n if ((units -= 2) < 0)\n break;\n bytes.push(codePoint >> 6 | 192, codePoint & 63 | 128);\n } else if (codePoint < 65536) {\n if ((units -= 3) < 0)\n break;\n bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);\n } else if (codePoint < 1114112) {\n if ((units -= 4) < 0)\n break;\n bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);\n } else {\n throw new Error(\"Invalid code point\");\n }\n }\n return bytes;\n }\n function asciiToBytes(str) {\n const byteArray = [];\n for (let i = 0; i < str.length; ++i) {\n byteArray.push(str.charCodeAt(i) & 255);\n }\n return byteArray;\n }\n function utf16leToBytes(str, units) {\n let c, hi, lo;\n const byteArray = [];\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0)\n break;\n c = str.charCodeAt(i);\n hi = c >> 8;\n lo = c % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n return byteArray;\n }\n function base64ToBytes(str) {\n return base64.toByteArray(base64clean(str));\n }\n function blitBuffer(src, dst, offset2, length) {\n let i;\n for (i = 0; i < length; ++i) {\n if (i + offset2 >= dst.length || i >= src.length)\n break;\n dst[i + offset2] = src[i];\n }\n return i;\n }\n function isInstance(obj, type2) {\n return obj instanceof type2 || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type2.name;\n }\n function numberIsNaN(obj) {\n return obj !== obj;\n }\n const hexSliceLookupTable = function() {\n const alphabet = \"0123456789abcdef\";\n const table = new Array(256);\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16;\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j];\n }\n }\n return table;\n }();\n function defineBigIntMethod(fn) {\n return typeof BigInt === \"undefined\" ? BufferBigIntNotDefined : fn;\n }\n function BufferBigIntNotDefined() {\n throw new Error(\"BigInt not supported\");\n }\n return exports;\n }\n var exports$2, _dewExec$2, exports$1, _dewExec$1, exports, _dewExec;\n var init_chunk_DtuTasat = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/chunk-DtuTasat.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n exports$2 = {};\n _dewExec$2 = false;\n exports$1 = {};\n _dewExec$1 = false;\n exports = {};\n _dewExec = false;\n }\n });\n\n // ../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/buffer.js\n var buffer_exports = {};\n __export(buffer_exports, {\n Buffer: () => Buffer2,\n INSPECT_MAX_BYTES: () => INSPECT_MAX_BYTES,\n default: () => exports2,\n kMaxLength: () => kMaxLength\n });\n var exports2, Buffer2, INSPECT_MAX_BYTES, kMaxLength;\n var init_buffer = __esm({\n \"../../../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/buffer.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_chunk_DtuTasat();\n exports2 = dew();\n exports2[\"Buffer\"];\n exports2[\"SlowBuffer\"];\n exports2[\"INSPECT_MAX_BYTES\"];\n exports2[\"kMaxLength\"];\n Buffer2 = exports2.Buffer;\n INSPECT_MAX_BYTES = exports2.INSPECT_MAX_BYTES;\n kMaxLength = exports2.kMaxLength;\n }\n });\n\n // ../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/buffer.js\n var init_buffer2 = __esm({\n \"../../../node_modules/.pnpm/@lit-protocol+esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.12/node_modules/@lit-protocol/esbuild-plugin-polyfill-node/polyfills/buffer.js\"() {\n \"use strict\";\n init_buffer();\n }\n });\n\n // ../../../node_modules/.pnpm/bn.js@5.2.2/node_modules/bn.js/lib/bn.js\n var require_bn = __commonJS({\n \"../../../node_modules/.pnpm/bn.js@5.2.2/node_modules/bn.js/lib/bn.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n (function(module2, exports4) {\n \"use strict\";\n function assert3(val, msg) {\n if (!val)\n throw new Error(msg || \"Assertion failed\");\n }\n function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function() {\n };\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n function BN2(number2, base, endian) {\n if (BN2.isBN(number2)) {\n return number2;\n }\n this.negative = 0;\n this.words = null;\n this.length = 0;\n this.red = null;\n if (number2 !== null) {\n if (base === \"le\" || base === \"be\") {\n endian = base;\n base = 10;\n }\n this._init(number2 || 0, base || 10, endian || \"be\");\n }\n }\n if (typeof module2 === \"object\") {\n module2.exports = BN2;\n } else {\n exports4.BN = BN2;\n }\n BN2.BN = BN2;\n BN2.wordSize = 26;\n var Buffer3;\n try {\n if (typeof window !== \"undefined\" && typeof window.Buffer !== \"undefined\") {\n Buffer3 = window.Buffer;\n } else {\n Buffer3 = (init_buffer(), __toCommonJS(buffer_exports)).Buffer;\n }\n } catch (e) {\n }\n BN2.isBN = function isBN(num) {\n if (num instanceof BN2) {\n return true;\n }\n return num !== null && typeof num === \"object\" && num.constructor.wordSize === BN2.wordSize && Array.isArray(num.words);\n };\n BN2.max = function max(left, right) {\n if (left.cmp(right) > 0)\n return left;\n return right;\n };\n BN2.min = function min(left, right) {\n if (left.cmp(right) < 0)\n return left;\n return right;\n };\n BN2.prototype._init = function init(number2, base, endian) {\n if (typeof number2 === \"number\") {\n return this._initNumber(number2, base, endian);\n }\n if (typeof number2 === \"object\") {\n return this._initArray(number2, base, endian);\n }\n if (base === \"hex\") {\n base = 16;\n }\n assert3(base === (base | 0) && base >= 2 && base <= 36);\n number2 = number2.toString().replace(/\\s+/g, \"\");\n var start = 0;\n if (number2[0] === \"-\") {\n start++;\n this.negative = 1;\n }\n if (start < number2.length) {\n if (base === 16) {\n this._parseHex(number2, start, endian);\n } else {\n this._parseBase(number2, base, start);\n if (endian === \"le\") {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n BN2.prototype._initNumber = function _initNumber(number2, base, endian) {\n if (number2 < 0) {\n this.negative = 1;\n number2 = -number2;\n }\n if (number2 < 67108864) {\n this.words = [number2 & 67108863];\n this.length = 1;\n } else if (number2 < 4503599627370496) {\n this.words = [\n number2 & 67108863,\n number2 / 67108864 & 67108863\n ];\n this.length = 2;\n } else {\n assert3(number2 < 9007199254740992);\n this.words = [\n number2 & 67108863,\n number2 / 67108864 & 67108863,\n 1\n ];\n this.length = 3;\n }\n if (endian !== \"le\")\n return;\n this._initArray(this.toArray(), base, endian);\n };\n BN2.prototype._initArray = function _initArray(number2, base, endian) {\n assert3(typeof number2.length === \"number\");\n if (number2.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n this.length = Math.ceil(number2.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n var j, w;\n var off = 0;\n if (endian === \"be\") {\n for (i = number2.length - 1, j = 0; i >= 0; i -= 3) {\n w = number2[i] | number2[i - 1] << 8 | number2[i - 2] << 16;\n this.words[j] |= w << off & 67108863;\n this.words[j + 1] = w >>> 26 - off & 67108863;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === \"le\") {\n for (i = 0, j = 0; i < number2.length; i += 3) {\n w = number2[i] | number2[i + 1] << 8 | number2[i + 2] << 16;\n this.words[j] |= w << off & 67108863;\n this.words[j + 1] = w >>> 26 - off & 67108863;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n function parseHex4Bits(string2, index) {\n var c = string2.charCodeAt(index);\n if (c >= 48 && c <= 57) {\n return c - 48;\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert3(false, \"Invalid character in \" + string2);\n }\n }\n function parseHexByte(string2, lowerBound, index) {\n var r = parseHex4Bits(string2, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string2, index - 1) << 4;\n }\n return r;\n }\n BN2.prototype._parseHex = function _parseHex(number2, start, endian) {\n this.length = Math.ceil((number2.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n var off = 0;\n var j = 0;\n var w;\n if (endian === \"be\") {\n for (i = number2.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number2, start, i) << off;\n this.words[j] |= w & 67108863;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number2.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number2.length; i += 2) {\n w = parseHexByte(number2, start, i) << off;\n this.words[j] |= w & 67108863;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n this._strip();\n };\n function parseBase(str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n r *= mul;\n if (c >= 49) {\n b = c - 49 + 10;\n } else if (c >= 17) {\n b = c - 17 + 10;\n } else {\n b = c;\n }\n assert3(c >= 0 && b < mul, \"Invalid character\");\n r += b;\n }\n return r;\n }\n BN2.prototype._parseBase = function _parseBase(number2, base, start) {\n this.words = [0];\n this.length = 1;\n for (var limbLen = 0, limbPow = 1; limbPow <= 67108863; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = limbPow / base | 0;\n var total = number2.length - start;\n var mod2 = total % limbLen;\n var end = Math.min(total, total - mod2) + start;\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number2, i, i + limbLen, base);\n this.imuln(limbPow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n if (mod2 !== 0) {\n var pow = 1;\n word = parseBase(number2, i, number2.length, base);\n for (i = 0; i < mod2; i++) {\n pow *= base;\n }\n this.imuln(pow);\n if (this.words[0] + word < 67108864) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n this._strip();\n };\n BN2.prototype.copy = function copy(dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n function move(dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n BN2.prototype._move = function _move(dest) {\n move(dest, this);\n };\n BN2.prototype.clone = function clone() {\n var r = new BN2(null);\n this.copy(r);\n return r;\n };\n BN2.prototype._expand = function _expand(size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n BN2.prototype._strip = function strip() {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n BN2.prototype._normSign = function _normSign() {\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n if (typeof Symbol !== \"undefined\" && typeof Symbol.for === \"function\") {\n try {\n BN2.prototype[Symbol.for(\"nodejs.util.inspect.custom\")] = inspect;\n } catch (e) {\n BN2.prototype.inspect = inspect;\n }\n } else {\n BN2.prototype.inspect = inspect;\n }\n function inspect() {\n return (this.red ? \"\";\n }\n var zeros = [\n \"\",\n \"0\",\n \"00\",\n \"000\",\n \"0000\",\n \"00000\",\n \"000000\",\n \"0000000\",\n \"00000000\",\n \"000000000\",\n \"0000000000\",\n \"00000000000\",\n \"000000000000\",\n \"0000000000000\",\n \"00000000000000\",\n \"000000000000000\",\n \"0000000000000000\",\n \"00000000000000000\",\n \"000000000000000000\",\n \"0000000000000000000\",\n \"00000000000000000000\",\n \"000000000000000000000\",\n \"0000000000000000000000\",\n \"00000000000000000000000\",\n \"000000000000000000000000\",\n \"0000000000000000000000000\"\n ];\n var groupSizes = [\n 0,\n 0,\n 25,\n 16,\n 12,\n 11,\n 10,\n 9,\n 8,\n 8,\n 7,\n 7,\n 7,\n 7,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 6,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5,\n 5\n ];\n var groupBases = [\n 0,\n 0,\n 33554432,\n 43046721,\n 16777216,\n 48828125,\n 60466176,\n 40353607,\n 16777216,\n 43046721,\n 1e7,\n 19487171,\n 35831808,\n 62748517,\n 7529536,\n 11390625,\n 16777216,\n 24137569,\n 34012224,\n 47045881,\n 64e6,\n 4084101,\n 5153632,\n 6436343,\n 7962624,\n 9765625,\n 11881376,\n 14348907,\n 17210368,\n 20511149,\n 243e5,\n 28629151,\n 33554432,\n 39135393,\n 45435424,\n 52521875,\n 60466176\n ];\n BN2.prototype.toString = function toString(base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n var out;\n if (base === 16 || base === \"hex\") {\n out = \"\";\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = ((w << off | carry) & 16777215).toString(16);\n carry = w >>> 24 - off & 16777215;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n if (base === (base | 0) && base >= 2 && base <= 36) {\n var groupSize = groupSizes[base];\n var groupBase = groupBases[base];\n out = \"\";\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = \"0\" + out;\n }\n while (out.length % padding !== 0) {\n out = \"0\" + out;\n }\n if (this.negative !== 0) {\n out = \"-\" + out;\n }\n return out;\n }\n assert3(false, \"Base should be between 2 and 36\");\n };\n BN2.prototype.toNumber = function toNumber() {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 67108864;\n } else if (this.length === 3 && this.words[2] === 1) {\n ret += 4503599627370496 + this.words[1] * 67108864;\n } else if (this.length > 2) {\n assert3(false, \"Number can only safely store up to 53 bits\");\n }\n return this.negative !== 0 ? -ret : ret;\n };\n BN2.prototype.toJSON = function toJSON() {\n return this.toString(16, 2);\n };\n if (Buffer3) {\n BN2.prototype.toBuffer = function toBuffer2(endian, length) {\n return this.toArrayLike(Buffer3, endian, length);\n };\n }\n BN2.prototype.toArray = function toArray(endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n var allocate = function allocate2(ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n BN2.prototype.toArrayLike = function toArrayLike(ArrayType, endian, length) {\n this._strip();\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert3(byteLength <= reqLength, \"byte array longer than desired length\");\n assert3(reqLength > 0, \"Requested array length <= 0\");\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === \"le\" ? \"LE\" : \"BE\";\n this[\"_toArrayLike\" + postfix](res, byteLength);\n return res;\n };\n BN2.prototype._toArrayLikeLE = function _toArrayLikeLE(res, byteLength) {\n var position = 0;\n var carry = 0;\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = this.words[i] << shift | carry;\n res[position++] = word & 255;\n if (position < res.length) {\n res[position++] = word >> 8 & 255;\n }\n if (position < res.length) {\n res[position++] = word >> 16 & 255;\n }\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = word >> 24 & 255;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n if (position < res.length) {\n res[position++] = carry;\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n BN2.prototype._toArrayLikeBE = function _toArrayLikeBE(res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = this.words[i] << shift | carry;\n res[position--] = word & 255;\n if (position >= 0) {\n res[position--] = word >> 8 & 255;\n }\n if (position >= 0) {\n res[position--] = word >> 16 & 255;\n }\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = word >> 24 & 255;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n if (position >= 0) {\n res[position--] = carry;\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n if (Math.clz32) {\n BN2.prototype._countBits = function _countBits(w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN2.prototype._countBits = function _countBits(w) {\n var t = w;\n var r = 0;\n if (t >= 4096) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 64) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 2) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n BN2.prototype._zeroBits = function _zeroBits(w) {\n if (w === 0)\n return 26;\n var t = w;\n var r = 0;\n if ((t & 8191) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 127) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 15) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 1) === 0) {\n r++;\n }\n return r;\n };\n BN2.prototype.bitLength = function bitLength() {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n function toBitArray(num) {\n var w = new Array(num.bitLength());\n for (var bit = 0; bit < w.length; bit++) {\n var off = bit / 26 | 0;\n var wbit = bit % 26;\n w[bit] = num.words[off] >>> wbit & 1;\n }\n return w;\n }\n BN2.prototype.zeroBits = function zeroBits() {\n if (this.isZero())\n return 0;\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26)\n break;\n }\n return r;\n };\n BN2.prototype.byteLength = function byteLength() {\n return Math.ceil(this.bitLength() / 8);\n };\n BN2.prototype.toTwos = function toTwos(width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n BN2.prototype.fromTwos = function fromTwos(width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n BN2.prototype.isNeg = function isNeg() {\n return this.negative !== 0;\n };\n BN2.prototype.neg = function neg() {\n return this.clone().ineg();\n };\n BN2.prototype.ineg = function ineg() {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n return this;\n };\n BN2.prototype.iuor = function iuor(num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n return this._strip();\n };\n BN2.prototype.ior = function ior(num) {\n assert3((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n BN2.prototype.or = function or(num) {\n if (this.length > num.length)\n return this.clone().ior(num);\n return num.clone().ior(this);\n };\n BN2.prototype.uor = function uor(num) {\n if (this.length > num.length)\n return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n BN2.prototype.iuand = function iuand(num) {\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n this.length = b.length;\n return this._strip();\n };\n BN2.prototype.iand = function iand(num) {\n assert3((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n BN2.prototype.and = function and(num) {\n if (this.length > num.length)\n return this.clone().iand(num);\n return num.clone().iand(this);\n };\n BN2.prototype.uand = function uand(num) {\n if (this.length > num.length)\n return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n BN2.prototype.iuxor = function iuxor(num) {\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n this.length = a.length;\n return this._strip();\n };\n BN2.prototype.ixor = function ixor(num) {\n assert3((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n BN2.prototype.xor = function xor(num) {\n if (this.length > num.length)\n return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n BN2.prototype.uxor = function uxor(num) {\n if (this.length > num.length)\n return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n BN2.prototype.inotn = function inotn(width) {\n assert3(typeof width === \"number\" && width >= 0);\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n this._expand(bytesNeeded);\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 67108863;\n }\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & 67108863 >> 26 - bitsLeft;\n }\n return this._strip();\n };\n BN2.prototype.notn = function notn(width) {\n return this.clone().inotn(width);\n };\n BN2.prototype.setn = function setn(bit, val) {\n assert3(typeof bit === \"number\" && bit >= 0);\n var off = bit / 26 | 0;\n var wbit = bit % 26;\n this._expand(off + 1);\n if (val) {\n this.words[off] = this.words[off] | 1 << wbit;\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n return this._strip();\n };\n BN2.prototype.iadd = function iadd(num) {\n var r;\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 67108863;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 67108863;\n carry = r >>> 26;\n }\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n return this;\n };\n BN2.prototype.add = function add2(num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n if (this.length > num.length)\n return this.clone().iadd(num);\n return num.clone().iadd(this);\n };\n BN2.prototype.isub = function isub(num) {\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n var cmp = this.cmp(num);\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 67108863;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 67108863;\n }\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n this.length = Math.max(this.length, i);\n if (a !== this) {\n this.negative = 1;\n }\n return this._strip();\n };\n BN2.prototype.sub = function sub(num) {\n return this.clone().isub(num);\n };\n function smallMulTo(self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = self.length + num.length | 0;\n out.length = len;\n len = len - 1 | 0;\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n var lo = r & 67108863;\n var carry = r / 67108864 | 0;\n out.words[0] = lo;\n for (var k = 1; k < len; k++) {\n var ncarry = carry >>> 26;\n var rword = carry & 67108863;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += r / 67108864 | 0;\n rword = r & 67108863;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n return out._strip();\n }\n var comb10MulTo = function comb10MulTo2(self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 8191;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 8191;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 8191;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 8191;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 8191;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 8191;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 8191;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 8191;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 8191;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 8191;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 8191;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 8191;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 8191;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 8191;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 8191;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 8191;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 8191;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 8191;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 8191;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 8191;\n var bh9 = b9 >>> 13;\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = mid + Math.imul(ah0, bl0) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w0 >>> 26) | 0;\n w0 &= 67108863;\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = mid + Math.imul(ah1, bl0) | 0;\n hi = Math.imul(ah1, bh0);\n lo = lo + Math.imul(al0, bl1) | 0;\n mid = mid + Math.imul(al0, bh1) | 0;\n mid = mid + Math.imul(ah0, bl1) | 0;\n hi = hi + Math.imul(ah0, bh1) | 0;\n var w1 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w1 >>> 26) | 0;\n w1 &= 67108863;\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = mid + Math.imul(ah2, bl0) | 0;\n hi = Math.imul(ah2, bh0);\n lo = lo + Math.imul(al1, bl1) | 0;\n mid = mid + Math.imul(al1, bh1) | 0;\n mid = mid + Math.imul(ah1, bl1) | 0;\n hi = hi + Math.imul(ah1, bh1) | 0;\n lo = lo + Math.imul(al0, bl2) | 0;\n mid = mid + Math.imul(al0, bh2) | 0;\n mid = mid + Math.imul(ah0, bl2) | 0;\n hi = hi + Math.imul(ah0, bh2) | 0;\n var w2 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w2 >>> 26) | 0;\n w2 &= 67108863;\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = mid + Math.imul(ah3, bl0) | 0;\n hi = Math.imul(ah3, bh0);\n lo = lo + Math.imul(al2, bl1) | 0;\n mid = mid + Math.imul(al2, bh1) | 0;\n mid = mid + Math.imul(ah2, bl1) | 0;\n hi = hi + Math.imul(ah2, bh1) | 0;\n lo = lo + Math.imul(al1, bl2) | 0;\n mid = mid + Math.imul(al1, bh2) | 0;\n mid = mid + Math.imul(ah1, bl2) | 0;\n hi = hi + Math.imul(ah1, bh2) | 0;\n lo = lo + Math.imul(al0, bl3) | 0;\n mid = mid + Math.imul(al0, bh3) | 0;\n mid = mid + Math.imul(ah0, bl3) | 0;\n hi = hi + Math.imul(ah0, bh3) | 0;\n var w3 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w3 >>> 26) | 0;\n w3 &= 67108863;\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = mid + Math.imul(ah4, bl0) | 0;\n hi = Math.imul(ah4, bh0);\n lo = lo + Math.imul(al3, bl1) | 0;\n mid = mid + Math.imul(al3, bh1) | 0;\n mid = mid + Math.imul(ah3, bl1) | 0;\n hi = hi + Math.imul(ah3, bh1) | 0;\n lo = lo + Math.imul(al2, bl2) | 0;\n mid = mid + Math.imul(al2, bh2) | 0;\n mid = mid + Math.imul(ah2, bl2) | 0;\n hi = hi + Math.imul(ah2, bh2) | 0;\n lo = lo + Math.imul(al1, bl3) | 0;\n mid = mid + Math.imul(al1, bh3) | 0;\n mid = mid + Math.imul(ah1, bl3) | 0;\n hi = hi + Math.imul(ah1, bh3) | 0;\n lo = lo + Math.imul(al0, bl4) | 0;\n mid = mid + Math.imul(al0, bh4) | 0;\n mid = mid + Math.imul(ah0, bl4) | 0;\n hi = hi + Math.imul(ah0, bh4) | 0;\n var w4 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w4 >>> 26) | 0;\n w4 &= 67108863;\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = mid + Math.imul(ah5, bl0) | 0;\n hi = Math.imul(ah5, bh0);\n lo = lo + Math.imul(al4, bl1) | 0;\n mid = mid + Math.imul(al4, bh1) | 0;\n mid = mid + Math.imul(ah4, bl1) | 0;\n hi = hi + Math.imul(ah4, bh1) | 0;\n lo = lo + Math.imul(al3, bl2) | 0;\n mid = mid + Math.imul(al3, bh2) | 0;\n mid = mid + Math.imul(ah3, bl2) | 0;\n hi = hi + Math.imul(ah3, bh2) | 0;\n lo = lo + Math.imul(al2, bl3) | 0;\n mid = mid + Math.imul(al2, bh3) | 0;\n mid = mid + Math.imul(ah2, bl3) | 0;\n hi = hi + Math.imul(ah2, bh3) | 0;\n lo = lo + Math.imul(al1, bl4) | 0;\n mid = mid + Math.imul(al1, bh4) | 0;\n mid = mid + Math.imul(ah1, bl4) | 0;\n hi = hi + Math.imul(ah1, bh4) | 0;\n lo = lo + Math.imul(al0, bl5) | 0;\n mid = mid + Math.imul(al0, bh5) | 0;\n mid = mid + Math.imul(ah0, bl5) | 0;\n hi = hi + Math.imul(ah0, bh5) | 0;\n var w5 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w5 >>> 26) | 0;\n w5 &= 67108863;\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = mid + Math.imul(ah6, bl0) | 0;\n hi = Math.imul(ah6, bh0);\n lo = lo + Math.imul(al5, bl1) | 0;\n mid = mid + Math.imul(al5, bh1) | 0;\n mid = mid + Math.imul(ah5, bl1) | 0;\n hi = hi + Math.imul(ah5, bh1) | 0;\n lo = lo + Math.imul(al4, bl2) | 0;\n mid = mid + Math.imul(al4, bh2) | 0;\n mid = mid + Math.imul(ah4, bl2) | 0;\n hi = hi + Math.imul(ah4, bh2) | 0;\n lo = lo + Math.imul(al3, bl3) | 0;\n mid = mid + Math.imul(al3, bh3) | 0;\n mid = mid + Math.imul(ah3, bl3) | 0;\n hi = hi + Math.imul(ah3, bh3) | 0;\n lo = lo + Math.imul(al2, bl4) | 0;\n mid = mid + Math.imul(al2, bh4) | 0;\n mid = mid + Math.imul(ah2, bl4) | 0;\n hi = hi + Math.imul(ah2, bh4) | 0;\n lo = lo + Math.imul(al1, bl5) | 0;\n mid = mid + Math.imul(al1, bh5) | 0;\n mid = mid + Math.imul(ah1, bl5) | 0;\n hi = hi + Math.imul(ah1, bh5) | 0;\n lo = lo + Math.imul(al0, bl6) | 0;\n mid = mid + Math.imul(al0, bh6) | 0;\n mid = mid + Math.imul(ah0, bl6) | 0;\n hi = hi + Math.imul(ah0, bh6) | 0;\n var w6 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w6 >>> 26) | 0;\n w6 &= 67108863;\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = mid + Math.imul(ah7, bl0) | 0;\n hi = Math.imul(ah7, bh0);\n lo = lo + Math.imul(al6, bl1) | 0;\n mid = mid + Math.imul(al6, bh1) | 0;\n mid = mid + Math.imul(ah6, bl1) | 0;\n hi = hi + Math.imul(ah6, bh1) | 0;\n lo = lo + Math.imul(al5, bl2) | 0;\n mid = mid + Math.imul(al5, bh2) | 0;\n mid = mid + Math.imul(ah5, bl2) | 0;\n hi = hi + Math.imul(ah5, bh2) | 0;\n lo = lo + Math.imul(al4, bl3) | 0;\n mid = mid + Math.imul(al4, bh3) | 0;\n mid = mid + Math.imul(ah4, bl3) | 0;\n hi = hi + Math.imul(ah4, bh3) | 0;\n lo = lo + Math.imul(al3, bl4) | 0;\n mid = mid + Math.imul(al3, bh4) | 0;\n mid = mid + Math.imul(ah3, bl4) | 0;\n hi = hi + Math.imul(ah3, bh4) | 0;\n lo = lo + Math.imul(al2, bl5) | 0;\n mid = mid + Math.imul(al2, bh5) | 0;\n mid = mid + Math.imul(ah2, bl5) | 0;\n hi = hi + Math.imul(ah2, bh5) | 0;\n lo = lo + Math.imul(al1, bl6) | 0;\n mid = mid + Math.imul(al1, bh6) | 0;\n mid = mid + Math.imul(ah1, bl6) | 0;\n hi = hi + Math.imul(ah1, bh6) | 0;\n lo = lo + Math.imul(al0, bl7) | 0;\n mid = mid + Math.imul(al0, bh7) | 0;\n mid = mid + Math.imul(ah0, bl7) | 0;\n hi = hi + Math.imul(ah0, bh7) | 0;\n var w7 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w7 >>> 26) | 0;\n w7 &= 67108863;\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = mid + Math.imul(ah8, bl0) | 0;\n hi = Math.imul(ah8, bh0);\n lo = lo + Math.imul(al7, bl1) | 0;\n mid = mid + Math.imul(al7, bh1) | 0;\n mid = mid + Math.imul(ah7, bl1) | 0;\n hi = hi + Math.imul(ah7, bh1) | 0;\n lo = lo + Math.imul(al6, bl2) | 0;\n mid = mid + Math.imul(al6, bh2) | 0;\n mid = mid + Math.imul(ah6, bl2) | 0;\n hi = hi + Math.imul(ah6, bh2) | 0;\n lo = lo + Math.imul(al5, bl3) | 0;\n mid = mid + Math.imul(al5, bh3) | 0;\n mid = mid + Math.imul(ah5, bl3) | 0;\n hi = hi + Math.imul(ah5, bh3) | 0;\n lo = lo + Math.imul(al4, bl4) | 0;\n mid = mid + Math.imul(al4, bh4) | 0;\n mid = mid + Math.imul(ah4, bl4) | 0;\n hi = hi + Math.imul(ah4, bh4) | 0;\n lo = lo + Math.imul(al3, bl5) | 0;\n mid = mid + Math.imul(al3, bh5) | 0;\n mid = mid + Math.imul(ah3, bl5) | 0;\n hi = hi + Math.imul(ah3, bh5) | 0;\n lo = lo + Math.imul(al2, bl6) | 0;\n mid = mid + Math.imul(al2, bh6) | 0;\n mid = mid + Math.imul(ah2, bl6) | 0;\n hi = hi + Math.imul(ah2, bh6) | 0;\n lo = lo + Math.imul(al1, bl7) | 0;\n mid = mid + Math.imul(al1, bh7) | 0;\n mid = mid + Math.imul(ah1, bl7) | 0;\n hi = hi + Math.imul(ah1, bh7) | 0;\n lo = lo + Math.imul(al0, bl8) | 0;\n mid = mid + Math.imul(al0, bh8) | 0;\n mid = mid + Math.imul(ah0, bl8) | 0;\n hi = hi + Math.imul(ah0, bh8) | 0;\n var w8 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w8 >>> 26) | 0;\n w8 &= 67108863;\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = mid + Math.imul(ah9, bl0) | 0;\n hi = Math.imul(ah9, bh0);\n lo = lo + Math.imul(al8, bl1) | 0;\n mid = mid + Math.imul(al8, bh1) | 0;\n mid = mid + Math.imul(ah8, bl1) | 0;\n hi = hi + Math.imul(ah8, bh1) | 0;\n lo = lo + Math.imul(al7, bl2) | 0;\n mid = mid + Math.imul(al7, bh2) | 0;\n mid = mid + Math.imul(ah7, bl2) | 0;\n hi = hi + Math.imul(ah7, bh2) | 0;\n lo = lo + Math.imul(al6, bl3) | 0;\n mid = mid + Math.imul(al6, bh3) | 0;\n mid = mid + Math.imul(ah6, bl3) | 0;\n hi = hi + Math.imul(ah6, bh3) | 0;\n lo = lo + Math.imul(al5, bl4) | 0;\n mid = mid + Math.imul(al5, bh4) | 0;\n mid = mid + Math.imul(ah5, bl4) | 0;\n hi = hi + Math.imul(ah5, bh4) | 0;\n lo = lo + Math.imul(al4, bl5) | 0;\n mid = mid + Math.imul(al4, bh5) | 0;\n mid = mid + Math.imul(ah4, bl5) | 0;\n hi = hi + Math.imul(ah4, bh5) | 0;\n lo = lo + Math.imul(al3, bl6) | 0;\n mid = mid + Math.imul(al3, bh6) | 0;\n mid = mid + Math.imul(ah3, bl6) | 0;\n hi = hi + Math.imul(ah3, bh6) | 0;\n lo = lo + Math.imul(al2, bl7) | 0;\n mid = mid + Math.imul(al2, bh7) | 0;\n mid = mid + Math.imul(ah2, bl7) | 0;\n hi = hi + Math.imul(ah2, bh7) | 0;\n lo = lo + Math.imul(al1, bl8) | 0;\n mid = mid + Math.imul(al1, bh8) | 0;\n mid = mid + Math.imul(ah1, bl8) | 0;\n hi = hi + Math.imul(ah1, bh8) | 0;\n lo = lo + Math.imul(al0, bl9) | 0;\n mid = mid + Math.imul(al0, bh9) | 0;\n mid = mid + Math.imul(ah0, bl9) | 0;\n hi = hi + Math.imul(ah0, bh9) | 0;\n var w9 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w9 >>> 26) | 0;\n w9 &= 67108863;\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = mid + Math.imul(ah9, bl1) | 0;\n hi = Math.imul(ah9, bh1);\n lo = lo + Math.imul(al8, bl2) | 0;\n mid = mid + Math.imul(al8, bh2) | 0;\n mid = mid + Math.imul(ah8, bl2) | 0;\n hi = hi + Math.imul(ah8, bh2) | 0;\n lo = lo + Math.imul(al7, bl3) | 0;\n mid = mid + Math.imul(al7, bh3) | 0;\n mid = mid + Math.imul(ah7, bl3) | 0;\n hi = hi + Math.imul(ah7, bh3) | 0;\n lo = lo + Math.imul(al6, bl4) | 0;\n mid = mid + Math.imul(al6, bh4) | 0;\n mid = mid + Math.imul(ah6, bl4) | 0;\n hi = hi + Math.imul(ah6, bh4) | 0;\n lo = lo + Math.imul(al5, bl5) | 0;\n mid = mid + Math.imul(al5, bh5) | 0;\n mid = mid + Math.imul(ah5, bl5) | 0;\n hi = hi + Math.imul(ah5, bh5) | 0;\n lo = lo + Math.imul(al4, bl6) | 0;\n mid = mid + Math.imul(al4, bh6) | 0;\n mid = mid + Math.imul(ah4, bl6) | 0;\n hi = hi + Math.imul(ah4, bh6) | 0;\n lo = lo + Math.imul(al3, bl7) | 0;\n mid = mid + Math.imul(al3, bh7) | 0;\n mid = mid + Math.imul(ah3, bl7) | 0;\n hi = hi + Math.imul(ah3, bh7) | 0;\n lo = lo + Math.imul(al2, bl8) | 0;\n mid = mid + Math.imul(al2, bh8) | 0;\n mid = mid + Math.imul(ah2, bl8) | 0;\n hi = hi + Math.imul(ah2, bh8) | 0;\n lo = lo + Math.imul(al1, bl9) | 0;\n mid = mid + Math.imul(al1, bh9) | 0;\n mid = mid + Math.imul(ah1, bl9) | 0;\n hi = hi + Math.imul(ah1, bh9) | 0;\n var w10 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w10 >>> 26) | 0;\n w10 &= 67108863;\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = mid + Math.imul(ah9, bl2) | 0;\n hi = Math.imul(ah9, bh2);\n lo = lo + Math.imul(al8, bl3) | 0;\n mid = mid + Math.imul(al8, bh3) | 0;\n mid = mid + Math.imul(ah8, bl3) | 0;\n hi = hi + Math.imul(ah8, bh3) | 0;\n lo = lo + Math.imul(al7, bl4) | 0;\n mid = mid + Math.imul(al7, bh4) | 0;\n mid = mid + Math.imul(ah7, bl4) | 0;\n hi = hi + Math.imul(ah7, bh4) | 0;\n lo = lo + Math.imul(al6, bl5) | 0;\n mid = mid + Math.imul(al6, bh5) | 0;\n mid = mid + Math.imul(ah6, bl5) | 0;\n hi = hi + Math.imul(ah6, bh5) | 0;\n lo = lo + Math.imul(al5, bl6) | 0;\n mid = mid + Math.imul(al5, bh6) | 0;\n mid = mid + Math.imul(ah5, bl6) | 0;\n hi = hi + Math.imul(ah5, bh6) | 0;\n lo = lo + Math.imul(al4, bl7) | 0;\n mid = mid + Math.imul(al4, bh7) | 0;\n mid = mid + Math.imul(ah4, bl7) | 0;\n hi = hi + Math.imul(ah4, bh7) | 0;\n lo = lo + Math.imul(al3, bl8) | 0;\n mid = mid + Math.imul(al3, bh8) | 0;\n mid = mid + Math.imul(ah3, bl8) | 0;\n hi = hi + Math.imul(ah3, bh8) | 0;\n lo = lo + Math.imul(al2, bl9) | 0;\n mid = mid + Math.imul(al2, bh9) | 0;\n mid = mid + Math.imul(ah2, bl9) | 0;\n hi = hi + Math.imul(ah2, bh9) | 0;\n var w11 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w11 >>> 26) | 0;\n w11 &= 67108863;\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = mid + Math.imul(ah9, bl3) | 0;\n hi = Math.imul(ah9, bh3);\n lo = lo + Math.imul(al8, bl4) | 0;\n mid = mid + Math.imul(al8, bh4) | 0;\n mid = mid + Math.imul(ah8, bl4) | 0;\n hi = hi + Math.imul(ah8, bh4) | 0;\n lo = lo + Math.imul(al7, bl5) | 0;\n mid = mid + Math.imul(al7, bh5) | 0;\n mid = mid + Math.imul(ah7, bl5) | 0;\n hi = hi + Math.imul(ah7, bh5) | 0;\n lo = lo + Math.imul(al6, bl6) | 0;\n mid = mid + Math.imul(al6, bh6) | 0;\n mid = mid + Math.imul(ah6, bl6) | 0;\n hi = hi + Math.imul(ah6, bh6) | 0;\n lo = lo + Math.imul(al5, bl7) | 0;\n mid = mid + Math.imul(al5, bh7) | 0;\n mid = mid + Math.imul(ah5, bl7) | 0;\n hi = hi + Math.imul(ah5, bh7) | 0;\n lo = lo + Math.imul(al4, bl8) | 0;\n mid = mid + Math.imul(al4, bh8) | 0;\n mid = mid + Math.imul(ah4, bl8) | 0;\n hi = hi + Math.imul(ah4, bh8) | 0;\n lo = lo + Math.imul(al3, bl9) | 0;\n mid = mid + Math.imul(al3, bh9) | 0;\n mid = mid + Math.imul(ah3, bl9) | 0;\n hi = hi + Math.imul(ah3, bh9) | 0;\n var w12 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w12 >>> 26) | 0;\n w12 &= 67108863;\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = mid + Math.imul(ah9, bl4) | 0;\n hi = Math.imul(ah9, bh4);\n lo = lo + Math.imul(al8, bl5) | 0;\n mid = mid + Math.imul(al8, bh5) | 0;\n mid = mid + Math.imul(ah8, bl5) | 0;\n hi = hi + Math.imul(ah8, bh5) | 0;\n lo = lo + Math.imul(al7, bl6) | 0;\n mid = mid + Math.imul(al7, bh6) | 0;\n mid = mid + Math.imul(ah7, bl6) | 0;\n hi = hi + Math.imul(ah7, bh6) | 0;\n lo = lo + Math.imul(al6, bl7) | 0;\n mid = mid + Math.imul(al6, bh7) | 0;\n mid = mid + Math.imul(ah6, bl7) | 0;\n hi = hi + Math.imul(ah6, bh7) | 0;\n lo = lo + Math.imul(al5, bl8) | 0;\n mid = mid + Math.imul(al5, bh8) | 0;\n mid = mid + Math.imul(ah5, bl8) | 0;\n hi = hi + Math.imul(ah5, bh8) | 0;\n lo = lo + Math.imul(al4, bl9) | 0;\n mid = mid + Math.imul(al4, bh9) | 0;\n mid = mid + Math.imul(ah4, bl9) | 0;\n hi = hi + Math.imul(ah4, bh9) | 0;\n var w13 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w13 >>> 26) | 0;\n w13 &= 67108863;\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = mid + Math.imul(ah9, bl5) | 0;\n hi = Math.imul(ah9, bh5);\n lo = lo + Math.imul(al8, bl6) | 0;\n mid = mid + Math.imul(al8, bh6) | 0;\n mid = mid + Math.imul(ah8, bl6) | 0;\n hi = hi + Math.imul(ah8, bh6) | 0;\n lo = lo + Math.imul(al7, bl7) | 0;\n mid = mid + Math.imul(al7, bh7) | 0;\n mid = mid + Math.imul(ah7, bl7) | 0;\n hi = hi + Math.imul(ah7, bh7) | 0;\n lo = lo + Math.imul(al6, bl8) | 0;\n mid = mid + Math.imul(al6, bh8) | 0;\n mid = mid + Math.imul(ah6, bl8) | 0;\n hi = hi + Math.imul(ah6, bh8) | 0;\n lo = lo + Math.imul(al5, bl9) | 0;\n mid = mid + Math.imul(al5, bh9) | 0;\n mid = mid + Math.imul(ah5, bl9) | 0;\n hi = hi + Math.imul(ah5, bh9) | 0;\n var w14 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w14 >>> 26) | 0;\n w14 &= 67108863;\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = mid + Math.imul(ah9, bl6) | 0;\n hi = Math.imul(ah9, bh6);\n lo = lo + Math.imul(al8, bl7) | 0;\n mid = mid + Math.imul(al8, bh7) | 0;\n mid = mid + Math.imul(ah8, bl7) | 0;\n hi = hi + Math.imul(ah8, bh7) | 0;\n lo = lo + Math.imul(al7, bl8) | 0;\n mid = mid + Math.imul(al7, bh8) | 0;\n mid = mid + Math.imul(ah7, bl8) | 0;\n hi = hi + Math.imul(ah7, bh8) | 0;\n lo = lo + Math.imul(al6, bl9) | 0;\n mid = mid + Math.imul(al6, bh9) | 0;\n mid = mid + Math.imul(ah6, bl9) | 0;\n hi = hi + Math.imul(ah6, bh9) | 0;\n var w15 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w15 >>> 26) | 0;\n w15 &= 67108863;\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = mid + Math.imul(ah9, bl7) | 0;\n hi = Math.imul(ah9, bh7);\n lo = lo + Math.imul(al8, bl8) | 0;\n mid = mid + Math.imul(al8, bh8) | 0;\n mid = mid + Math.imul(ah8, bl8) | 0;\n hi = hi + Math.imul(ah8, bh8) | 0;\n lo = lo + Math.imul(al7, bl9) | 0;\n mid = mid + Math.imul(al7, bh9) | 0;\n mid = mid + Math.imul(ah7, bl9) | 0;\n hi = hi + Math.imul(ah7, bh9) | 0;\n var w16 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w16 >>> 26) | 0;\n w16 &= 67108863;\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = mid + Math.imul(ah9, bl8) | 0;\n hi = Math.imul(ah9, bh8);\n lo = lo + Math.imul(al8, bl9) | 0;\n mid = mid + Math.imul(al8, bh9) | 0;\n mid = mid + Math.imul(ah8, bl9) | 0;\n hi = hi + Math.imul(ah8, bh9) | 0;\n var w17 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w17 >>> 26) | 0;\n w17 &= 67108863;\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = mid + Math.imul(ah9, bl9) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (c + lo | 0) + ((mid & 8191) << 13) | 0;\n c = (hi + (mid >>> 13) | 0) + (w18 >>> 26) | 0;\n w18 &= 67108863;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n function bigMulTo(self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 67108863;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n var lo = r & 67108863;\n ncarry = ncarry + (r / 67108864 | 0) | 0;\n lo = lo + rword | 0;\n rword = lo & 67108863;\n ncarry = ncarry + (lo >>> 26) | 0;\n hncarry += ncarry >>> 26;\n ncarry &= 67108863;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n return out._strip();\n }\n function jumboMulTo(self, num, out) {\n return bigMulTo(self, num, out);\n }\n BN2.prototype.mulTo = function mulTo(num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n return res;\n };\n function FFTM(x, y) {\n this.x = x;\n this.y = y;\n }\n FFTM.prototype.makeRBT = function makeRBT(N) {\n var t = new Array(N);\n var l = BN2.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n return t;\n };\n FFTM.prototype.revBin = function revBin(x, l, N) {\n if (x === 0 || x === N - 1)\n return x;\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << l - i - 1;\n x >>= 1;\n }\n return rb;\n };\n FFTM.prototype.permute = function permute(rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n FFTM.prototype.transform = function transform(rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n var rx = rtwdf_ * ro - itwdf_ * io;\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n FFTM.prototype.guessLen13b = function guessLen13b(n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n return 1 << i + 1 + odd;\n };\n FFTM.prototype.conjugate = function conjugate(rws, iws, N) {\n if (N <= 1)\n return;\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n t = iws[i];\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n FFTM.prototype.normalize13b = function normalize13b(ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 8192 + Math.round(ws[2 * i] / N) + carry;\n ws[i] = w & 67108863;\n if (w < 67108864) {\n carry = 0;\n } else {\n carry = w / 67108864 | 0;\n }\n }\n return ws;\n };\n FFTM.prototype.convert13b = function convert13b(ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n rws[2 * i] = carry & 8191;\n carry = carry >>> 13;\n rws[2 * i + 1] = carry & 8191;\n carry = carry >>> 13;\n }\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n assert3(carry === 0);\n assert3((carry & ~8191) === 0);\n };\n FFTM.prototype.stub = function stub(N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n return ph;\n };\n FFTM.prototype.mulp = function mulp(x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n var rbt = this.makeRBT(N);\n var _ = this.stub(N);\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n var rmws = out.words;\n rmws.length = N;\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n BN2.prototype.mul = function mul(num) {\n var out = new BN2(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n BN2.prototype.mulf = function mulf(num) {\n var out = new BN2(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n BN2.prototype.imul = function imul(num) {\n return this.clone().mulTo(num, this);\n };\n BN2.prototype.imuln = function imuln(num) {\n var isNegNum = num < 0;\n if (isNegNum)\n num = -num;\n assert3(typeof num === \"number\");\n assert3(num < 67108864);\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 67108863) + (carry & 67108863);\n carry >>= 26;\n carry += w / 67108864 | 0;\n carry += lo >>> 26;\n this.words[i] = lo & 67108863;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n this.length = num === 0 ? 1 : this.length;\n return isNegNum ? this.ineg() : this;\n };\n BN2.prototype.muln = function muln(num) {\n return this.clone().imuln(num);\n };\n BN2.prototype.sqr = function sqr() {\n return this.mul(this);\n };\n BN2.prototype.isqr = function isqr() {\n return this.imul(this.clone());\n };\n BN2.prototype.pow = function pow(num) {\n var w = toBitArray(num);\n if (w.length === 0)\n return new BN2(1);\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0)\n break;\n }\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0)\n continue;\n res = res.mul(q);\n }\n }\n return res;\n };\n BN2.prototype.iushln = function iushln(bits) {\n assert3(typeof bits === \"number\" && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = 67108863 >>> 26 - r << 26 - r;\n var i;\n if (r !== 0) {\n var carry = 0;\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = (this.words[i] | 0) - newCarry << r;\n this.words[i] = c | carry;\n carry = newCarry >>> 26 - r;\n }\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n this.length += s;\n }\n return this._strip();\n };\n BN2.prototype.ishln = function ishln(bits) {\n assert3(this.negative === 0);\n return this.iushln(bits);\n };\n BN2.prototype.iushrn = function iushrn(bits, hint, extended) {\n assert3(typeof bits === \"number\" && bits >= 0);\n var h;\n if (hint) {\n h = (hint - hint % 26) / 26;\n } else {\n h = 0;\n }\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask2 = 67108863 ^ 67108863 >>> r << r;\n var maskedWords = extended;\n h -= s;\n h = Math.max(0, h);\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n if (s === 0) {\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = carry << 26 - r | word >>> r;\n carry = word & mask2;\n }\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n return this._strip();\n };\n BN2.prototype.ishrn = function ishrn(bits, hint, extended) {\n assert3(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n BN2.prototype.shln = function shln(bits) {\n return this.clone().ishln(bits);\n };\n BN2.prototype.ushln = function ushln(bits) {\n return this.clone().iushln(bits);\n };\n BN2.prototype.shrn = function shrn(bits) {\n return this.clone().ishrn(bits);\n };\n BN2.prototype.ushrn = function ushrn(bits) {\n return this.clone().iushrn(bits);\n };\n BN2.prototype.testn = function testn(bit) {\n assert3(typeof bit === \"number\" && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n if (this.length <= s)\n return false;\n var w = this.words[s];\n return !!(w & q);\n };\n BN2.prototype.imaskn = function imaskn(bits) {\n assert3(typeof bits === \"number\" && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n assert3(this.negative === 0, \"imaskn works only with positive numbers\");\n if (this.length <= s) {\n return this;\n }\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n if (r !== 0) {\n var mask2 = 67108863 ^ 67108863 >>> r << r;\n this.words[this.length - 1] &= mask2;\n }\n return this._strip();\n };\n BN2.prototype.maskn = function maskn(bits) {\n return this.clone().imaskn(bits);\n };\n BN2.prototype.iaddn = function iaddn(num) {\n assert3(typeof num === \"number\");\n assert3(num < 67108864);\n if (num < 0)\n return this.isubn(-num);\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n return this._iaddn(num);\n };\n BN2.prototype._iaddn = function _iaddn(num) {\n this.words[0] += num;\n for (var i = 0; i < this.length && this.words[i] >= 67108864; i++) {\n this.words[i] -= 67108864;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n return this;\n };\n BN2.prototype.isubn = function isubn(num) {\n assert3(typeof num === \"number\");\n assert3(num < 67108864);\n if (num < 0)\n return this.iaddn(-num);\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n this.words[0] -= num;\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 67108864;\n this.words[i + 1] -= 1;\n }\n }\n return this._strip();\n };\n BN2.prototype.addn = function addn(num) {\n return this.clone().iaddn(num);\n };\n BN2.prototype.subn = function subn(num) {\n return this.clone().isubn(num);\n };\n BN2.prototype.iabs = function iabs() {\n this.negative = 0;\n return this;\n };\n BN2.prototype.abs = function abs() {\n return this.clone().iabs();\n };\n BN2.prototype._ishlnsubmul = function _ishlnsubmul(num, mul, shift) {\n var len = num.length + shift;\n var i;\n this._expand(len);\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 67108863;\n carry = (w >> 26) - (right / 67108864 | 0);\n this.words[i + shift] = w & 67108863;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 67108863;\n }\n if (carry === 0)\n return this._strip();\n assert3(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 67108863;\n }\n this.negative = 1;\n return this._strip();\n };\n BN2.prototype._wordDiv = function _wordDiv(num, mode) {\n var shift = this.length - num.length;\n var a = this.clone();\n var b = num;\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n var m = a.length - b.length;\n var q;\n if (mode !== \"mod\") {\n q = new BN2(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 67108864 + (a.words[b.length + j - 1] | 0);\n qj = Math.min(qj / bhi | 0, 67108863);\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n if (mode !== \"div\" && shift !== 0) {\n a.iushrn(shift);\n }\n return {\n div: q || null,\n mod: a\n };\n };\n BN2.prototype.divmod = function divmod(num, mode, positive) {\n assert3(!num.isZero());\n if (this.isZero()) {\n return {\n div: new BN2(0),\n mod: new BN2(0)\n };\n }\n var div, mod2, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n if (mode !== \"div\") {\n mod2 = res.mod.neg();\n if (positive && mod2.negative !== 0) {\n mod2.iadd(num);\n }\n }\n return {\n div,\n mod: mod2\n };\n }\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n if (mode !== \"mod\") {\n div = res.div.neg();\n }\n return {\n div,\n mod: res.mod\n };\n }\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n if (mode !== \"div\") {\n mod2 = res.mod.neg();\n if (positive && mod2.negative !== 0) {\n mod2.isub(num);\n }\n }\n return {\n div: res.div,\n mod: mod2\n };\n }\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN2(0),\n mod: this\n };\n }\n if (num.length === 1) {\n if (mode === \"div\") {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n if (mode === \"mod\") {\n return {\n div: null,\n mod: new BN2(this.modrn(num.words[0]))\n };\n }\n return {\n div: this.divn(num.words[0]),\n mod: new BN2(this.modrn(num.words[0]))\n };\n }\n return this._wordDiv(num, mode);\n };\n BN2.prototype.div = function div(num) {\n return this.divmod(num, \"div\", false).div;\n };\n BN2.prototype.mod = function mod2(num) {\n return this.divmod(num, \"mod\", false).mod;\n };\n BN2.prototype.umod = function umod(num) {\n return this.divmod(num, \"mod\", true).mod;\n };\n BN2.prototype.divRound = function divRound(num) {\n var dm = this.divmod(num);\n if (dm.mod.isZero())\n return dm.div;\n var mod2 = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod2.cmp(half);\n if (cmp < 0 || r2 === 1 && cmp === 0)\n return dm.div;\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n BN2.prototype.modrn = function modrn(num) {\n var isNegNum = num < 0;\n if (isNegNum)\n num = -num;\n assert3(num <= 67108863);\n var p = (1 << 26) % num;\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n return isNegNum ? -acc : acc;\n };\n BN2.prototype.modn = function modn(num) {\n return this.modrn(num);\n };\n BN2.prototype.idivn = function idivn(num) {\n var isNegNum = num < 0;\n if (isNegNum)\n num = -num;\n assert3(num <= 67108863);\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 67108864;\n this.words[i] = w / num | 0;\n carry = w % num;\n }\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n BN2.prototype.divn = function divn(num) {\n return this.clone().idivn(num);\n };\n BN2.prototype.egcd = function egcd(p) {\n assert3(p.negative === 0);\n assert3(!p.isZero());\n var x = this;\n var y = p.clone();\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n var A = new BN2(1);\n var B = new BN2(0);\n var C = new BN2(0);\n var D = new BN2(1);\n var g = 0;\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n var yp = y.clone();\n var xp = x.clone();\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1)\n ;\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1)\n ;\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n BN2.prototype._invmp = function _invmp(p) {\n assert3(p.negative === 0);\n assert3(!p.isZero());\n var a = this;\n var b = p.clone();\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n var x1 = new BN2(1);\n var x2 = new BN2(0);\n var delta = b.clone();\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1)\n ;\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n x1.iushrn(1);\n }\n }\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1)\n ;\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n x2.iushrn(1);\n }\n }\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n return res;\n };\n BN2.prototype.gcd = function gcd(num) {\n if (this.isZero())\n return num.abs();\n if (num.isZero())\n return this.abs();\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n var r = a.cmp(b);\n if (r < 0) {\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n a.isub(b);\n } while (true);\n return b.iushln(shift);\n };\n BN2.prototype.invm = function invm(num) {\n return this.egcd(num).a.umod(num);\n };\n BN2.prototype.isEven = function isEven() {\n return (this.words[0] & 1) === 0;\n };\n BN2.prototype.isOdd = function isOdd() {\n return (this.words[0] & 1) === 1;\n };\n BN2.prototype.andln = function andln(num) {\n return this.words[0] & num;\n };\n BN2.prototype.bincn = function bincn(bit) {\n assert3(typeof bit === \"number\");\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 67108863;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n BN2.prototype.isZero = function isZero() {\n return this.length === 1 && this.words[0] === 0;\n };\n BN2.prototype.cmpn = function cmpn(num) {\n var negative = num < 0;\n if (this.negative !== 0 && !negative)\n return -1;\n if (this.negative === 0 && negative)\n return 1;\n this._strip();\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n assert3(num <= 67108863, \"Number is too big\");\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN2.prototype.cmp = function cmp(num) {\n if (this.negative !== 0 && num.negative === 0)\n return -1;\n if (this.negative === 0 && num.negative !== 0)\n return 1;\n var res = this.ucmp(num);\n if (this.negative !== 0)\n return -res | 0;\n return res;\n };\n BN2.prototype.ucmp = function ucmp(num) {\n if (this.length > num.length)\n return 1;\n if (this.length < num.length)\n return -1;\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n if (a === b)\n continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n BN2.prototype.gtn = function gtn(num) {\n return this.cmpn(num) === 1;\n };\n BN2.prototype.gt = function gt(num) {\n return this.cmp(num) === 1;\n };\n BN2.prototype.gten = function gten(num) {\n return this.cmpn(num) >= 0;\n };\n BN2.prototype.gte = function gte(num) {\n return this.cmp(num) >= 0;\n };\n BN2.prototype.ltn = function ltn(num) {\n return this.cmpn(num) === -1;\n };\n BN2.prototype.lt = function lt(num) {\n return this.cmp(num) === -1;\n };\n BN2.prototype.lten = function lten(num) {\n return this.cmpn(num) <= 0;\n };\n BN2.prototype.lte = function lte(num) {\n return this.cmp(num) <= 0;\n };\n BN2.prototype.eqn = function eqn(num) {\n return this.cmpn(num) === 0;\n };\n BN2.prototype.eq = function eq(num) {\n return this.cmp(num) === 0;\n };\n BN2.red = function red(num) {\n return new Red(num);\n };\n BN2.prototype.toRed = function toRed(ctx) {\n assert3(!this.red, \"Already a number in reduction context\");\n assert3(this.negative === 0, \"red works only with positives\");\n return ctx.convertTo(this)._forceRed(ctx);\n };\n BN2.prototype.fromRed = function fromRed() {\n assert3(this.red, \"fromRed works only with numbers in reduction context\");\n return this.red.convertFrom(this);\n };\n BN2.prototype._forceRed = function _forceRed(ctx) {\n this.red = ctx;\n return this;\n };\n BN2.prototype.forceRed = function forceRed(ctx) {\n assert3(!this.red, \"Already a number in reduction context\");\n return this._forceRed(ctx);\n };\n BN2.prototype.redAdd = function redAdd(num) {\n assert3(this.red, \"redAdd works only with red numbers\");\n return this.red.add(this, num);\n };\n BN2.prototype.redIAdd = function redIAdd(num) {\n assert3(this.red, \"redIAdd works only with red numbers\");\n return this.red.iadd(this, num);\n };\n BN2.prototype.redSub = function redSub(num) {\n assert3(this.red, \"redSub works only with red numbers\");\n return this.red.sub(this, num);\n };\n BN2.prototype.redISub = function redISub(num) {\n assert3(this.red, \"redISub works only with red numbers\");\n return this.red.isub(this, num);\n };\n BN2.prototype.redShl = function redShl(num) {\n assert3(this.red, \"redShl works only with red numbers\");\n return this.red.shl(this, num);\n };\n BN2.prototype.redMul = function redMul(num) {\n assert3(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n BN2.prototype.redIMul = function redIMul(num) {\n assert3(this.red, \"redMul works only with red numbers\");\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n BN2.prototype.redSqr = function redSqr() {\n assert3(this.red, \"redSqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n BN2.prototype.redISqr = function redISqr() {\n assert3(this.red, \"redISqr works only with red numbers\");\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n BN2.prototype.redSqrt = function redSqrt() {\n assert3(this.red, \"redSqrt works only with red numbers\");\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n BN2.prototype.redInvm = function redInvm() {\n assert3(this.red, \"redInvm works only with red numbers\");\n this.red._verify1(this);\n return this.red.invm(this);\n };\n BN2.prototype.redNeg = function redNeg() {\n assert3(this.red, \"redNeg works only with red numbers\");\n this.red._verify1(this);\n return this.red.neg(this);\n };\n BN2.prototype.redPow = function redPow(num) {\n assert3(this.red && !num.red, \"redPow(normalNum)\");\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n function MPrime(name, p) {\n this.name = name;\n this.p = new BN2(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN2(1).iushln(this.n).isub(this.p);\n this.tmp = this._tmp();\n }\n MPrime.prototype._tmp = function _tmp() {\n var tmp = new BN2(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n MPrime.prototype.ireduce = function ireduce(num) {\n var r = num;\n var rlen;\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== void 0) {\n r.strip();\n } else {\n r._strip();\n }\n }\n return r;\n };\n MPrime.prototype.split = function split2(input, out) {\n input.iushrn(this.n, 0, out);\n };\n MPrime.prototype.imulK = function imulK(num) {\n return num.imul(this.k);\n };\n function K256() {\n MPrime.call(\n this,\n \"k256\",\n \"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f\"\n );\n }\n inherits(K256, MPrime);\n K256.prototype.split = function split2(input, output) {\n var mask2 = 4194303;\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n var prev = input.words[9];\n output.words[output.length++] = prev & mask2;\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = (next & mask2) << 4 | prev >>> 22;\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n K256.prototype.imulK = function imulK(num) {\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 977;\n num.words[i] = lo & 67108863;\n lo = w * 64 + (lo / 67108864 | 0);\n }\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n function P224() {\n MPrime.call(\n this,\n \"p224\",\n \"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001\"\n );\n }\n inherits(P224, MPrime);\n function P192() {\n MPrime.call(\n this,\n \"p192\",\n \"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff\"\n );\n }\n inherits(P192, MPrime);\n function P25519() {\n MPrime.call(\n this,\n \"25519\",\n \"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed\"\n );\n }\n inherits(P25519, MPrime);\n P25519.prototype.imulK = function imulK(num) {\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 19 + carry;\n var lo = hi & 67108863;\n hi >>>= 26;\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n BN2._prime = function prime(name) {\n if (primes[name])\n return primes[name];\n var prime2;\n if (name === \"k256\") {\n prime2 = new K256();\n } else if (name === \"p224\") {\n prime2 = new P224();\n } else if (name === \"p192\") {\n prime2 = new P192();\n } else if (name === \"p25519\") {\n prime2 = new P25519();\n } else {\n throw new Error(\"Unknown prime \" + name);\n }\n primes[name] = prime2;\n return prime2;\n };\n function Red(m) {\n if (typeof m === \"string\") {\n var prime = BN2._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert3(m.gtn(1), \"modulus must be greater than 1\");\n this.m = m;\n this.prime = null;\n }\n }\n Red.prototype._verify1 = function _verify1(a) {\n assert3(a.negative === 0, \"red works only with positives\");\n assert3(a.red, \"red works only with red numbers\");\n };\n Red.prototype._verify2 = function _verify2(a, b) {\n assert3((a.negative | b.negative) === 0, \"red works only with positives\");\n assert3(\n a.red && a.red === b.red,\n \"red works only with red numbers\"\n );\n };\n Red.prototype.imod = function imod(a) {\n if (this.prime)\n return this.prime.ireduce(a)._forceRed(this);\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n Red.prototype.neg = function neg(a) {\n if (a.isZero()) {\n return a.clone();\n }\n return this.m.sub(a)._forceRed(this);\n };\n Red.prototype.add = function add2(a, b) {\n this._verify2(a, b);\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.iadd = function iadd(a, b) {\n this._verify2(a, b);\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n Red.prototype.sub = function sub(a, b) {\n this._verify2(a, b);\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Red.prototype.isub = function isub(a, b) {\n this._verify2(a, b);\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n Red.prototype.shl = function shl(a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n Red.prototype.imul = function imul(a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n Red.prototype.mul = function mul(a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n Red.prototype.isqr = function isqr(a) {\n return this.imul(a, a.clone());\n };\n Red.prototype.sqr = function sqr(a) {\n return this.mul(a, a);\n };\n Red.prototype.sqrt = function sqrt(a) {\n if (a.isZero())\n return a.clone();\n var mod3 = this.m.andln(3);\n assert3(mod3 % 2 === 1);\n if (mod3 === 3) {\n var pow = this.m.add(new BN2(1)).iushrn(2);\n return this.pow(a, pow);\n }\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert3(!q.isZero());\n var one = new BN2(1).toRed(this);\n var nOne = one.redNeg();\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN2(2 * z * z).toRed(this);\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert3(i < m);\n var b = this.pow(c, new BN2(1).iushln(m - i - 1));\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n return r;\n };\n Red.prototype.invm = function invm(a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n Red.prototype.pow = function pow(a, num) {\n if (num.isZero())\n return new BN2(1).toRed(this);\n if (num.cmpn(1) === 0)\n return a.clone();\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN2(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = word >> j & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0))\n continue;\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n return res;\n };\n Red.prototype.convertTo = function convertTo(num) {\n var r = num.umod(this.m);\n return r === num ? r.clone() : r;\n };\n Red.prototype.convertFrom = function convertFrom(num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n BN2.mont = function mont(num) {\n return new Mont(num);\n };\n function Mont(m) {\n Red.call(this, m);\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - this.shift % 26;\n }\n this.r = new BN2(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n Mont.prototype.convertTo = function convertTo(num) {\n return this.imod(num.ushln(this.shift));\n };\n Mont.prototype.convertFrom = function convertFrom(num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n Mont.prototype.imul = function imul(a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.mul = function mul(a, b) {\n if (a.isZero() || b.isZero())\n return new BN2(0)._forceRed(this);\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n return res._forceRed(this);\n };\n Mont.prototype.invm = function invm(a) {\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n })(typeof module === \"undefined\" || module, exports3);\n }\n });\n\n // ../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js\n var require_safe_buffer = __commonJS({\n \"../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var buffer = (init_buffer(), __toCommonJS(buffer_exports));\n var Buffer3 = buffer.Buffer;\n function copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n }\n if (Buffer3.from && Buffer3.alloc && Buffer3.allocUnsafe && Buffer3.allocUnsafeSlow) {\n module.exports = buffer;\n } else {\n copyProps(buffer, exports3);\n exports3.Buffer = SafeBuffer;\n }\n function SafeBuffer(arg, encodingOrOffset, length) {\n return Buffer3(arg, encodingOrOffset, length);\n }\n SafeBuffer.prototype = Object.create(Buffer3.prototype);\n copyProps(Buffer3, SafeBuffer);\n SafeBuffer.from = function(arg, encodingOrOffset, length) {\n if (typeof arg === \"number\") {\n throw new TypeError(\"Argument must not be a number\");\n }\n return Buffer3(arg, encodingOrOffset, length);\n };\n SafeBuffer.alloc = function(size, fill, encoding) {\n if (typeof size !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n var buf = Buffer3(size);\n if (fill !== void 0) {\n if (typeof encoding === \"string\") {\n buf.fill(fill, encoding);\n } else {\n buf.fill(fill);\n }\n } else {\n buf.fill(0);\n }\n return buf;\n };\n SafeBuffer.allocUnsafe = function(size) {\n if (typeof size !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n return Buffer3(size);\n };\n SafeBuffer.allocUnsafeSlow = function(size) {\n if (typeof size !== \"number\") {\n throw new TypeError(\"Argument must be a number\");\n }\n return buffer.SlowBuffer(size);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/base-x@3.0.11/node_modules/base-x/src/index.js\n var require_src = __commonJS({\n \"../../../node_modules/.pnpm/base-x@3.0.11/node_modules/base-x/src/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var _Buffer = require_safe_buffer().Buffer;\n function base(ALPHABET) {\n if (ALPHABET.length >= 255) {\n throw new TypeError(\"Alphabet too long\");\n }\n var BASE_MAP = new Uint8Array(256);\n for (var j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255;\n }\n for (var i = 0; i < ALPHABET.length; i++) {\n var x = ALPHABET.charAt(i);\n var xc = x.charCodeAt(0);\n if (BASE_MAP[xc] !== 255) {\n throw new TypeError(x + \" is ambiguous\");\n }\n BASE_MAP[xc] = i;\n }\n var BASE = ALPHABET.length;\n var LEADER = ALPHABET.charAt(0);\n var FACTOR = Math.log(BASE) / Math.log(256);\n var iFACTOR = Math.log(256) / Math.log(BASE);\n function encode(source) {\n if (Array.isArray(source) || source instanceof Uint8Array) {\n source = _Buffer.from(source);\n }\n if (!_Buffer.isBuffer(source)) {\n throw new TypeError(\"Expected Buffer\");\n }\n if (source.length === 0) {\n return \"\";\n }\n var zeroes = 0;\n var length = 0;\n var pbegin = 0;\n var pend = source.length;\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++;\n zeroes++;\n }\n var size = (pend - pbegin) * iFACTOR + 1 >>> 0;\n var b58 = new Uint8Array(size);\n while (pbegin !== pend) {\n var carry = source[pbegin];\n var i2 = 0;\n for (var it1 = size - 1; (carry !== 0 || i2 < length) && it1 !== -1; it1--, i2++) {\n carry += 256 * b58[it1] >>> 0;\n b58[it1] = carry % BASE >>> 0;\n carry = carry / BASE >>> 0;\n }\n if (carry !== 0) {\n throw new Error(\"Non-zero carry\");\n }\n length = i2;\n pbegin++;\n }\n var it2 = size - length;\n while (it2 !== size && b58[it2] === 0) {\n it2++;\n }\n var str = LEADER.repeat(zeroes);\n for (; it2 < size; ++it2) {\n str += ALPHABET.charAt(b58[it2]);\n }\n return str;\n }\n function decodeUnsafe(source) {\n if (typeof source !== \"string\") {\n throw new TypeError(\"Expected String\");\n }\n if (source.length === 0) {\n return _Buffer.alloc(0);\n }\n var psz = 0;\n var zeroes = 0;\n var length = 0;\n while (source[psz] === LEADER) {\n zeroes++;\n psz++;\n }\n var size = (source.length - psz) * FACTOR + 1 >>> 0;\n var b256 = new Uint8Array(size);\n while (psz < source.length) {\n var charCode = source.charCodeAt(psz);\n if (charCode > 255) {\n return;\n }\n var carry = BASE_MAP[charCode];\n if (carry === 255) {\n return;\n }\n var i2 = 0;\n for (var it3 = size - 1; (carry !== 0 || i2 < length) && it3 !== -1; it3--, i2++) {\n carry += BASE * b256[it3] >>> 0;\n b256[it3] = carry % 256 >>> 0;\n carry = carry / 256 >>> 0;\n }\n if (carry !== 0) {\n throw new Error(\"Non-zero carry\");\n }\n length = i2;\n psz++;\n }\n var it4 = size - length;\n while (it4 !== size && b256[it4] === 0) {\n it4++;\n }\n var vch = _Buffer.allocUnsafe(zeroes + (size - it4));\n vch.fill(0, 0, zeroes);\n var j2 = zeroes;\n while (it4 !== size) {\n vch[j2++] = b256[it4++];\n }\n return vch;\n }\n function decode(string2) {\n var buffer = decodeUnsafe(string2);\n if (buffer) {\n return buffer;\n }\n throw new Error(\"Non-base\" + BASE + \" character\");\n }\n return {\n encode,\n decodeUnsafe,\n decode\n };\n }\n module.exports = base;\n }\n });\n\n // ../../../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js\n var require_bs58 = __commonJS({\n \"../../../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var basex = require_src();\n var ALPHABET = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n module.exports = basex(ALPHABET);\n }\n });\n\n // ../../../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js\n var require_encoding_lib = __commonJS({\n \"../../../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n function inRange2(a, min, max) {\n return min <= a && a <= max;\n }\n function ToDictionary(o) {\n if (o === void 0)\n return {};\n if (o === Object(o))\n return o;\n throw TypeError(\"Could not convert argument to dictionary\");\n }\n function stringToCodePoints(string2) {\n var s = String(string2);\n var n = s.length;\n var i = 0;\n var u = [];\n while (i < n) {\n var c = s.charCodeAt(i);\n if (c < 55296 || c > 57343) {\n u.push(c);\n } else if (56320 <= c && c <= 57343) {\n u.push(65533);\n } else if (55296 <= c && c <= 56319) {\n if (i === n - 1) {\n u.push(65533);\n } else {\n var d = string2.charCodeAt(i + 1);\n if (56320 <= d && d <= 57343) {\n var a = c & 1023;\n var b = d & 1023;\n u.push(65536 + (a << 10) + b);\n i += 1;\n } else {\n u.push(65533);\n }\n }\n }\n i += 1;\n }\n return u;\n }\n function codePointsToString(code_points) {\n var s = \"\";\n for (var i = 0; i < code_points.length; ++i) {\n var cp = code_points[i];\n if (cp <= 65535) {\n s += String.fromCharCode(cp);\n } else {\n cp -= 65536;\n s += String.fromCharCode(\n (cp >> 10) + 55296,\n (cp & 1023) + 56320\n );\n }\n }\n return s;\n }\n var end_of_stream = -1;\n function Stream(tokens) {\n this.tokens = [].slice.call(tokens);\n }\n Stream.prototype = {\n /**\n * @return {boolean} True if end-of-stream has been hit.\n */\n endOfStream: function() {\n return !this.tokens.length;\n },\n /**\n * When a token is read from a stream, the first token in the\n * stream must be returned and subsequently removed, and\n * end-of-stream must be returned otherwise.\n *\n * @return {number} Get the next token from the stream, or\n * end_of_stream.\n */\n read: function() {\n if (!this.tokens.length)\n return end_of_stream;\n return this.tokens.shift();\n },\n /**\n * When one or more tokens are prepended to a stream, those tokens\n * must be inserted, in given order, before the first token in the\n * stream.\n *\n * @param {(number|!Array.)} token The token(s) to prepend to the stream.\n */\n prepend: function(token) {\n if (Array.isArray(token)) {\n var tokens = (\n /**@type {!Array.}*/\n token\n );\n while (tokens.length)\n this.tokens.unshift(tokens.pop());\n } else {\n this.tokens.unshift(token);\n }\n },\n /**\n * When one or more tokens are pushed to a stream, those tokens\n * must be inserted, in given order, after the last token in the\n * stream.\n *\n * @param {(number|!Array.)} token The tokens(s) to prepend to the stream.\n */\n push: function(token) {\n if (Array.isArray(token)) {\n var tokens = (\n /**@type {!Array.}*/\n token\n );\n while (tokens.length)\n this.tokens.push(tokens.shift());\n } else {\n this.tokens.push(token);\n }\n }\n };\n var finished = -1;\n function decoderError(fatal, opt_code_point) {\n if (fatal)\n throw TypeError(\"Decoder error\");\n return opt_code_point || 65533;\n }\n var DEFAULT_ENCODING = \"utf-8\";\n function TextDecoder2(encoding, options) {\n if (!(this instanceof TextDecoder2)) {\n return new TextDecoder2(encoding, options);\n }\n encoding = encoding !== void 0 ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error(\"Encoding not supported. Only utf-8 is supported\");\n }\n options = ToDictionary(options);\n this._streaming = false;\n this._BOMseen = false;\n this._decoder = null;\n this._fatal = Boolean(options[\"fatal\"]);\n this._ignoreBOM = Boolean(options[\"ignoreBOM\"]);\n Object.defineProperty(this, \"encoding\", { value: \"utf-8\" });\n Object.defineProperty(this, \"fatal\", { value: this._fatal });\n Object.defineProperty(this, \"ignoreBOM\", { value: this._ignoreBOM });\n }\n TextDecoder2.prototype = {\n /**\n * @param {ArrayBufferView=} input The buffer of bytes to decode.\n * @param {Object=} options\n * @return {string} The decoded string.\n */\n decode: function decode(input, options) {\n var bytes;\n if (typeof input === \"object\" && input instanceof ArrayBuffer) {\n bytes = new Uint8Array(input);\n } else if (typeof input === \"object\" && \"buffer\" in input && input.buffer instanceof ArrayBuffer) {\n bytes = new Uint8Array(\n input.buffer,\n input.byteOffset,\n input.byteLength\n );\n } else {\n bytes = new Uint8Array(0);\n }\n options = ToDictionary(options);\n if (!this._streaming) {\n this._decoder = new UTF8Decoder({ fatal: this._fatal });\n this._BOMseen = false;\n }\n this._streaming = Boolean(options[\"stream\"]);\n var input_stream = new Stream(bytes);\n var code_points = [];\n var result;\n while (!input_stream.endOfStream()) {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(\n code_points,\n /**@type {!Array.}*/\n result\n );\n else\n code_points.push(result);\n }\n if (!this._streaming) {\n do {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(\n code_points,\n /**@type {!Array.}*/\n result\n );\n else\n code_points.push(result);\n } while (!input_stream.endOfStream());\n this._decoder = null;\n }\n if (code_points.length) {\n if ([\"utf-8\"].indexOf(this.encoding) !== -1 && !this._ignoreBOM && !this._BOMseen) {\n if (code_points[0] === 65279) {\n this._BOMseen = true;\n code_points.shift();\n } else {\n this._BOMseen = true;\n }\n }\n }\n return codePointsToString(code_points);\n }\n };\n function TextEncoder2(encoding, options) {\n if (!(this instanceof TextEncoder2))\n return new TextEncoder2(encoding, options);\n encoding = encoding !== void 0 ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error(\"Encoding not supported. Only utf-8 is supported\");\n }\n options = ToDictionary(options);\n this._streaming = false;\n this._encoder = null;\n this._options = { fatal: Boolean(options[\"fatal\"]) };\n Object.defineProperty(this, \"encoding\", { value: \"utf-8\" });\n }\n TextEncoder2.prototype = {\n /**\n * @param {string=} opt_string The string to encode.\n * @param {Object=} options\n * @return {Uint8Array} Encoded bytes, as a Uint8Array.\n */\n encode: function encode(opt_string, options) {\n opt_string = opt_string ? String(opt_string) : \"\";\n options = ToDictionary(options);\n if (!this._streaming)\n this._encoder = new UTF8Encoder(this._options);\n this._streaming = Boolean(options[\"stream\"]);\n var bytes = [];\n var input_stream = new Stream(stringToCodePoints(opt_string));\n var result;\n while (!input_stream.endOfStream()) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(\n bytes,\n /**@type {!Array.}*/\n result\n );\n else\n bytes.push(result);\n }\n if (!this._streaming) {\n while (true) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(\n bytes,\n /**@type {!Array.}*/\n result\n );\n else\n bytes.push(result);\n }\n this._encoder = null;\n }\n return new Uint8Array(bytes);\n }\n };\n function UTF8Decoder(options) {\n var fatal = options.fatal;\n var utf8_code_point = 0, utf8_bytes_seen = 0, utf8_bytes_needed = 0, utf8_lower_boundary = 128, utf8_upper_boundary = 191;\n this.handler = function(stream, bite) {\n if (bite === end_of_stream && utf8_bytes_needed !== 0) {\n utf8_bytes_needed = 0;\n return decoderError(fatal);\n }\n if (bite === end_of_stream)\n return finished;\n if (utf8_bytes_needed === 0) {\n if (inRange2(bite, 0, 127)) {\n return bite;\n }\n if (inRange2(bite, 194, 223)) {\n utf8_bytes_needed = 1;\n utf8_code_point = bite - 192;\n } else if (inRange2(bite, 224, 239)) {\n if (bite === 224)\n utf8_lower_boundary = 160;\n if (bite === 237)\n utf8_upper_boundary = 159;\n utf8_bytes_needed = 2;\n utf8_code_point = bite - 224;\n } else if (inRange2(bite, 240, 244)) {\n if (bite === 240)\n utf8_lower_boundary = 144;\n if (bite === 244)\n utf8_upper_boundary = 143;\n utf8_bytes_needed = 3;\n utf8_code_point = bite - 240;\n } else {\n return decoderError(fatal);\n }\n utf8_code_point = utf8_code_point << 6 * utf8_bytes_needed;\n return null;\n }\n if (!inRange2(bite, utf8_lower_boundary, utf8_upper_boundary)) {\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n utf8_lower_boundary = 128;\n utf8_upper_boundary = 191;\n stream.prepend(bite);\n return decoderError(fatal);\n }\n utf8_lower_boundary = 128;\n utf8_upper_boundary = 191;\n utf8_bytes_seen += 1;\n utf8_code_point += bite - 128 << 6 * (utf8_bytes_needed - utf8_bytes_seen);\n if (utf8_bytes_seen !== utf8_bytes_needed)\n return null;\n var code_point = utf8_code_point;\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n return code_point;\n };\n }\n function UTF8Encoder(options) {\n var fatal = options.fatal;\n this.handler = function(stream, code_point) {\n if (code_point === end_of_stream)\n return finished;\n if (inRange2(code_point, 0, 127))\n return code_point;\n var count, offset2;\n if (inRange2(code_point, 128, 2047)) {\n count = 1;\n offset2 = 192;\n } else if (inRange2(code_point, 2048, 65535)) {\n count = 2;\n offset2 = 224;\n } else if (inRange2(code_point, 65536, 1114111)) {\n count = 3;\n offset2 = 240;\n }\n var bytes = [(code_point >> 6 * count) + offset2];\n while (count > 0) {\n var temp = code_point >> 6 * (count - 1);\n bytes.push(128 | temp & 63);\n count -= 1;\n }\n return bytes;\n };\n }\n exports3.TextEncoder = TextEncoder2;\n exports3.TextDecoder = TextDecoder2;\n }\n });\n\n // ../../../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js\n var require_lib = __commonJS({\n \"../../../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var __createBinding = exports3 && exports3.__createBinding || (Object.create ? function(o, m, k, k2) {\n if (k2 === void 0)\n k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() {\n return m[k];\n } });\n } : function(o, m, k, k2) {\n if (k2 === void 0)\n k2 = k;\n o[k2] = m[k];\n });\n var __setModuleDefault = exports3 && exports3.__setModuleDefault || (Object.create ? function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n } : function(o, v) {\n o[\"default\"] = v;\n });\n var __decorate = exports3 && exports3.__decorate || function(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i = decorators.length - 1; i >= 0; i--)\n if (d = decorators[i])\n r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };\n var __importStar = exports3 && exports3.__importStar || function(mod2) {\n if (mod2 && mod2.__esModule)\n return mod2;\n var result = {};\n if (mod2 != null) {\n for (var k in mod2)\n if (k !== \"default\" && Object.hasOwnProperty.call(mod2, k))\n __createBinding(result, mod2, k);\n }\n __setModuleDefault(result, mod2);\n return result;\n };\n var __importDefault = exports3 && exports3.__importDefault || function(mod2) {\n return mod2 && mod2.__esModule ? mod2 : { \"default\": mod2 };\n };\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.deserializeUnchecked = exports3.deserialize = exports3.serialize = exports3.BinaryReader = exports3.BinaryWriter = exports3.BorshError = exports3.baseDecode = exports3.baseEncode = void 0;\n var bn_js_1 = __importDefault(require_bn());\n var bs58_1 = __importDefault(require_bs58());\n var encoding = __importStar(require_encoding_lib());\n var ResolvedTextDecoder = typeof TextDecoder !== \"function\" ? encoding.TextDecoder : TextDecoder;\n var textDecoder = new ResolvedTextDecoder(\"utf-8\", { fatal: true });\n function baseEncode(value) {\n if (typeof value === \"string\") {\n value = Buffer2.from(value, \"utf8\");\n }\n return bs58_1.default.encode(Buffer2.from(value));\n }\n exports3.baseEncode = baseEncode;\n function baseDecode(value) {\n return Buffer2.from(bs58_1.default.decode(value));\n }\n exports3.baseDecode = baseDecode;\n var INITIAL_LENGTH = 1024;\n var BorshError = class extends Error {\n constructor(message) {\n super(message);\n this.fieldPath = [];\n this.originalMessage = message;\n }\n addToFieldPath(fieldName) {\n this.fieldPath.splice(0, 0, fieldName);\n this.message = this.originalMessage + \": \" + this.fieldPath.join(\".\");\n }\n };\n exports3.BorshError = BorshError;\n var BinaryWriter = class {\n constructor() {\n this.buf = Buffer2.alloc(INITIAL_LENGTH);\n this.length = 0;\n }\n maybeResize() {\n if (this.buf.length < 16 + this.length) {\n this.buf = Buffer2.concat([this.buf, Buffer2.alloc(INITIAL_LENGTH)]);\n }\n }\n writeU8(value) {\n this.maybeResize();\n this.buf.writeUInt8(value, this.length);\n this.length += 1;\n }\n writeU16(value) {\n this.maybeResize();\n this.buf.writeUInt16LE(value, this.length);\n this.length += 2;\n }\n writeU32(value) {\n this.maybeResize();\n this.buf.writeUInt32LE(value, this.length);\n this.length += 4;\n }\n writeU64(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 8)));\n }\n writeU128(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 16)));\n }\n writeU256(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 32)));\n }\n writeU512(value) {\n this.maybeResize();\n this.writeBuffer(Buffer2.from(new bn_js_1.default(value).toArray(\"le\", 64)));\n }\n writeBuffer(buffer) {\n this.buf = Buffer2.concat([\n Buffer2.from(this.buf.subarray(0, this.length)),\n buffer,\n Buffer2.alloc(INITIAL_LENGTH)\n ]);\n this.length += buffer.length;\n }\n writeString(str) {\n this.maybeResize();\n const b = Buffer2.from(str, \"utf8\");\n this.writeU32(b.length);\n this.writeBuffer(b);\n }\n writeFixedArray(array2) {\n this.writeBuffer(Buffer2.from(array2));\n }\n writeArray(array2, fn) {\n this.maybeResize();\n this.writeU32(array2.length);\n for (const elem of array2) {\n this.maybeResize();\n fn(elem);\n }\n }\n toArray() {\n return this.buf.subarray(0, this.length);\n }\n };\n exports3.BinaryWriter = BinaryWriter;\n function handlingRangeError(target, propertyKey, propertyDescriptor) {\n const originalMethod = propertyDescriptor.value;\n propertyDescriptor.value = function(...args) {\n try {\n return originalMethod.apply(this, args);\n } catch (e) {\n if (e instanceof RangeError) {\n const code = e.code;\n if ([\"ERR_BUFFER_OUT_OF_BOUNDS\", \"ERR_OUT_OF_RANGE\"].indexOf(code) >= 0) {\n throw new BorshError(\"Reached the end of buffer when deserializing\");\n }\n }\n throw e;\n }\n };\n }\n var BinaryReader = class {\n constructor(buf) {\n this.buf = buf;\n this.offset = 0;\n }\n readU8() {\n const value = this.buf.readUInt8(this.offset);\n this.offset += 1;\n return value;\n }\n readU16() {\n const value = this.buf.readUInt16LE(this.offset);\n this.offset += 2;\n return value;\n }\n readU32() {\n const value = this.buf.readUInt32LE(this.offset);\n this.offset += 4;\n return value;\n }\n readU64() {\n const buf = this.readBuffer(8);\n return new bn_js_1.default(buf, \"le\");\n }\n readU128() {\n const buf = this.readBuffer(16);\n return new bn_js_1.default(buf, \"le\");\n }\n readU256() {\n const buf = this.readBuffer(32);\n return new bn_js_1.default(buf, \"le\");\n }\n readU512() {\n const buf = this.readBuffer(64);\n return new bn_js_1.default(buf, \"le\");\n }\n readBuffer(len) {\n if (this.offset + len > this.buf.length) {\n throw new BorshError(`Expected buffer length ${len} isn't within bounds`);\n }\n const result = this.buf.slice(this.offset, this.offset + len);\n this.offset += len;\n return result;\n }\n readString() {\n const len = this.readU32();\n const buf = this.readBuffer(len);\n try {\n return textDecoder.decode(buf);\n } catch (e) {\n throw new BorshError(`Error decoding UTF-8 string: ${e}`);\n }\n }\n readFixedArray(len) {\n return new Uint8Array(this.readBuffer(len));\n }\n readArray(fn) {\n const len = this.readU32();\n const result = Array();\n for (let i = 0; i < len; ++i) {\n result.push(fn());\n }\n return result;\n }\n };\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU8\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU16\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU32\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU64\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU128\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU256\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readU512\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readString\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readFixedArray\", null);\n __decorate([\n handlingRangeError\n ], BinaryReader.prototype, \"readArray\", null);\n exports3.BinaryReader = BinaryReader;\n function capitalizeFirstLetter(string2) {\n return string2.charAt(0).toUpperCase() + string2.slice(1);\n }\n function serializeField(schema, fieldName, value, fieldType, writer) {\n try {\n if (typeof fieldType === \"string\") {\n writer[`write${capitalizeFirstLetter(fieldType)}`](value);\n } else if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n if (value.length !== fieldType[0]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[0]}, but got ${value.length} bytes`);\n }\n writer.writeFixedArray(value);\n } else if (fieldType.length === 2 && typeof fieldType[1] === \"number\") {\n if (value.length !== fieldType[1]) {\n throw new BorshError(`Expecting byte array of length ${fieldType[1]}, but got ${value.length} bytes`);\n }\n for (let i = 0; i < fieldType[1]; i++) {\n serializeField(schema, null, value[i], fieldType[0], writer);\n }\n } else {\n writer.writeArray(value, (item) => {\n serializeField(schema, fieldName, item, fieldType[0], writer);\n });\n }\n } else if (fieldType.kind !== void 0) {\n switch (fieldType.kind) {\n case \"option\": {\n if (value === null || value === void 0) {\n writer.writeU8(0);\n } else {\n writer.writeU8(1);\n serializeField(schema, fieldName, value, fieldType.type, writer);\n }\n break;\n }\n case \"map\": {\n writer.writeU32(value.size);\n value.forEach((val, key) => {\n serializeField(schema, fieldName, key, fieldType.key, writer);\n serializeField(schema, fieldName, val, fieldType.value, writer);\n });\n break;\n }\n default:\n throw new BorshError(`FieldType ${fieldType} unrecognized`);\n }\n } else {\n serializeStruct(schema, value, writer);\n }\n } catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n }\n function serializeStruct(schema, obj, writer) {\n if (typeof obj.borshSerialize === \"function\") {\n obj.borshSerialize(writer);\n return;\n }\n const structSchema = schema.get(obj.constructor);\n if (!structSchema) {\n throw new BorshError(`Class ${obj.constructor.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n structSchema.fields.map(([fieldName, fieldType]) => {\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n });\n } else if (structSchema.kind === \"enum\") {\n const name = obj[structSchema.field];\n for (let idx = 0; idx < structSchema.values.length; ++idx) {\n const [fieldName, fieldType] = structSchema.values[idx];\n if (fieldName === name) {\n writer.writeU8(idx);\n serializeField(schema, fieldName, obj[fieldName], fieldType, writer);\n break;\n }\n }\n } else {\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${obj.constructor.name}`);\n }\n }\n function serialize2(schema, obj, Writer = BinaryWriter) {\n const writer = new Writer();\n serializeStruct(schema, obj, writer);\n return writer.toArray();\n }\n exports3.serialize = serialize2;\n function deserializeField(schema, fieldName, fieldType, reader) {\n try {\n if (typeof fieldType === \"string\") {\n return reader[`read${capitalizeFirstLetter(fieldType)}`]();\n }\n if (fieldType instanceof Array) {\n if (typeof fieldType[0] === \"number\") {\n return reader.readFixedArray(fieldType[0]);\n } else if (typeof fieldType[1] === \"number\") {\n const arr = [];\n for (let i = 0; i < fieldType[1]; i++) {\n arr.push(deserializeField(schema, null, fieldType[0], reader));\n }\n return arr;\n } else {\n return reader.readArray(() => deserializeField(schema, fieldName, fieldType[0], reader));\n }\n }\n if (fieldType.kind === \"option\") {\n const option = reader.readU8();\n if (option) {\n return deserializeField(schema, fieldName, fieldType.type, reader);\n }\n return void 0;\n }\n if (fieldType.kind === \"map\") {\n let map = /* @__PURE__ */ new Map();\n const length = reader.readU32();\n for (let i = 0; i < length; i++) {\n const key = deserializeField(schema, fieldName, fieldType.key, reader);\n const val = deserializeField(schema, fieldName, fieldType.value, reader);\n map.set(key, val);\n }\n return map;\n }\n return deserializeStruct(schema, fieldType, reader);\n } catch (error) {\n if (error instanceof BorshError) {\n error.addToFieldPath(fieldName);\n }\n throw error;\n }\n }\n function deserializeStruct(schema, classType, reader) {\n if (typeof classType.borshDeserialize === \"function\") {\n return classType.borshDeserialize(reader);\n }\n const structSchema = schema.get(classType);\n if (!structSchema) {\n throw new BorshError(`Class ${classType.name} is missing in schema`);\n }\n if (structSchema.kind === \"struct\") {\n const result = {};\n for (const [fieldName, fieldType] of schema.get(classType).fields) {\n result[fieldName] = deserializeField(schema, fieldName, fieldType, reader);\n }\n return new classType(result);\n }\n if (structSchema.kind === \"enum\") {\n const idx = reader.readU8();\n if (idx >= structSchema.values.length) {\n throw new BorshError(`Enum index: ${idx} is out of range`);\n }\n const [fieldName, fieldType] = structSchema.values[idx];\n const fieldValue = deserializeField(schema, fieldName, fieldType, reader);\n return new classType({ [fieldName]: fieldValue });\n }\n throw new BorshError(`Unexpected schema kind: ${structSchema.kind} for ${classType.constructor.name}`);\n }\n function deserialize2(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n const result = deserializeStruct(schema, classType, reader);\n if (reader.offset < buffer.length) {\n throw new BorshError(`Unexpected ${buffer.length - reader.offset} bytes after deserialized data`);\n }\n return result;\n }\n exports3.deserialize = deserialize2;\n function deserializeUnchecked2(schema, classType, buffer, Reader = BinaryReader) {\n const reader = new Reader(buffer);\n return deserializeStruct(schema, classType, reader);\n }\n exports3.deserializeUnchecked = deserializeUnchecked2;\n }\n });\n\n // ../../../node_modules/.pnpm/@solana+buffer-layout@4.0.1/node_modules/@solana/buffer-layout/lib/Layout.js\n var require_Layout = __commonJS({\n \"../../../node_modules/.pnpm/@solana+buffer-layout@4.0.1/node_modules/@solana/buffer-layout/lib/Layout.js\"(exports3) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n Object.defineProperty(exports3, \"__esModule\", { value: true });\n exports3.s16 = exports3.s8 = exports3.nu64be = exports3.u48be = exports3.u40be = exports3.u32be = exports3.u24be = exports3.u16be = exports3.nu64 = exports3.u48 = exports3.u40 = exports3.u32 = exports3.u24 = exports3.u16 = exports3.u8 = exports3.offset = exports3.greedy = exports3.Constant = exports3.UTF8 = exports3.CString = exports3.Blob = exports3.Boolean = exports3.BitField = exports3.BitStructure = exports3.VariantLayout = exports3.Union = exports3.UnionLayoutDiscriminator = exports3.UnionDiscriminator = exports3.Structure = exports3.Sequence = exports3.DoubleBE = exports3.Double = exports3.FloatBE = exports3.Float = exports3.NearInt64BE = exports3.NearInt64 = exports3.NearUInt64BE = exports3.NearUInt64 = exports3.IntBE = exports3.Int = exports3.UIntBE = exports3.UInt = exports3.OffsetLayout = exports3.GreedyCount = exports3.ExternalLayout = exports3.bindConstructorLayout = exports3.nameWithProperty = exports3.Layout = exports3.uint8ArrayToBuffer = exports3.checkUint8Array = void 0;\n exports3.constant = exports3.utf8 = exports3.cstr = exports3.blob = exports3.unionLayoutDiscriminator = exports3.union = exports3.seq = exports3.bits = exports3.struct = exports3.f64be = exports3.f64 = exports3.f32be = exports3.f32 = exports3.ns64be = exports3.s48be = exports3.s40be = exports3.s32be = exports3.s24be = exports3.s16be = exports3.ns64 = exports3.s48 = exports3.s40 = exports3.s32 = exports3.s24 = void 0;\n var buffer_1 = (init_buffer(), __toCommonJS(buffer_exports));\n function checkUint8Array(b) {\n if (!(b instanceof Uint8Array)) {\n throw new TypeError(\"b must be a Uint8Array\");\n }\n }\n exports3.checkUint8Array = checkUint8Array;\n function uint8ArrayToBuffer(b) {\n checkUint8Array(b);\n return buffer_1.Buffer.from(b.buffer, b.byteOffset, b.length);\n }\n exports3.uint8ArrayToBuffer = uint8ArrayToBuffer;\n var Layout = class {\n constructor(span, property) {\n if (!Number.isInteger(span)) {\n throw new TypeError(\"span must be an integer\");\n }\n this.span = span;\n this.property = property;\n }\n /** Function to create an Object into which decoded properties will\n * be written.\n *\n * Used only for layouts that {@link Layout#decode|decode} to Object\n * instances, which means:\n * * {@link Structure}\n * * {@link Union}\n * * {@link VariantLayout}\n * * {@link BitStructure}\n *\n * If left undefined the JavaScript representation of these layouts\n * will be Object instances.\n *\n * See {@link bindConstructorLayout}.\n */\n makeDestinationObject() {\n return {};\n }\n /**\n * Calculate the span of a specific instance of a layout.\n *\n * @param {Uint8Array} b - the buffer that contains an encoded instance.\n *\n * @param {Number} [offset] - the offset at which the encoded instance\n * starts. If absent a zero offset is inferred.\n *\n * @return {Number} - the number of bytes covered by the layout\n * instance. If this method is not overridden in a subclass the\n * definition-time constant {@link Layout#span|span} will be\n * returned.\n *\n * @throws {RangeError} - if the length of the value cannot be\n * determined.\n */\n getSpan(b, offset2) {\n if (0 > this.span) {\n throw new RangeError(\"indeterminate span\");\n }\n return this.span;\n }\n /**\n * Replicate the layout using a new property.\n *\n * This function must be used to get a structurally-equivalent layout\n * with a different name since all {@link Layout} instances are\n * immutable.\n *\n * **NOTE** This is a shallow copy. All fields except {@link\n * Layout#property|property} are strictly equal to the origin layout.\n *\n * @param {String} property - the value for {@link\n * Layout#property|property} in the replica.\n *\n * @returns {Layout} - the copy with {@link Layout#property|property}\n * set to `property`.\n */\n replicate(property) {\n const rv = Object.create(this.constructor.prototype);\n Object.assign(rv, this);\n rv.property = property;\n return rv;\n }\n /**\n * Create an object from layout properties and an array of values.\n *\n * **NOTE** This function returns `undefined` if invoked on a layout\n * that does not return its value as an Object. Objects are\n * returned for things that are a {@link Structure}, which includes\n * {@link VariantLayout|variant layouts} if they are structures, and\n * excludes {@link Union}s. If you want this feature for a union\n * you must use {@link Union.getVariant|getVariant} to select the\n * desired layout.\n *\n * @param {Array} values - an array of values that correspond to the\n * default order for properties. As with {@link Layout#decode|decode}\n * layout elements that have no property name are skipped when\n * iterating over the array values. Only the top-level properties are\n * assigned; arguments are not assigned to properties of contained\n * layouts. Any unused values are ignored.\n *\n * @return {(Object|undefined)}\n */\n fromArray(values) {\n return void 0;\n }\n };\n exports3.Layout = Layout;\n function nameWithProperty(name, lo) {\n if (lo.property) {\n return name + \"[\" + lo.property + \"]\";\n }\n return name;\n }\n exports3.nameWithProperty = nameWithProperty;\n function bindConstructorLayout(Class, layout) {\n if (\"function\" !== typeof Class) {\n throw new TypeError(\"Class must be constructor\");\n }\n if (Object.prototype.hasOwnProperty.call(Class, \"layout_\")) {\n throw new Error(\"Class is already bound to a layout\");\n }\n if (!(layout && layout instanceof Layout)) {\n throw new TypeError(\"layout must be a Layout\");\n }\n if (Object.prototype.hasOwnProperty.call(layout, \"boundConstructor_\")) {\n throw new Error(\"layout is already bound to a constructor\");\n }\n Class.layout_ = layout;\n layout.boundConstructor_ = Class;\n layout.makeDestinationObject = () => new Class();\n Object.defineProperty(Class.prototype, \"encode\", {\n value(b, offset2) {\n return layout.encode(this, b, offset2);\n },\n writable: true\n });\n Object.defineProperty(Class, \"decode\", {\n value(b, offset2) {\n return layout.decode(b, offset2);\n },\n writable: true\n });\n }\n exports3.bindConstructorLayout = bindConstructorLayout;\n var ExternalLayout = class extends Layout {\n /**\n * Return `true` iff the external layout decodes to an unsigned\n * integer layout.\n *\n * In that case it can be used as the source of {@link\n * Sequence#count|Sequence counts}, {@link Blob#length|Blob lengths},\n * or as {@link UnionLayoutDiscriminator#layout|external union\n * discriminators}.\n *\n * @abstract\n */\n isCount() {\n throw new Error(\"ExternalLayout is abstract\");\n }\n };\n exports3.ExternalLayout = ExternalLayout;\n var GreedyCount = class extends ExternalLayout {\n constructor(elementSpan = 1, property) {\n if (!Number.isInteger(elementSpan) || 0 >= elementSpan) {\n throw new TypeError(\"elementSpan must be a (positive) integer\");\n }\n super(-1, property);\n this.elementSpan = elementSpan;\n }\n /** @override */\n isCount() {\n return true;\n }\n /** @override */\n decode(b, offset2 = 0) {\n checkUint8Array(b);\n const rem = b.length - offset2;\n return Math.floor(rem / this.elementSpan);\n }\n /** @override */\n encode(src, b, offset2) {\n return 0;\n }\n };\n exports3.GreedyCount = GreedyCount;\n var OffsetLayout = class extends ExternalLayout {\n constructor(layout, offset2 = 0, property) {\n if (!(layout instanceof Layout)) {\n throw new TypeError(\"layout must be a Layout\");\n }\n if (!Number.isInteger(offset2)) {\n throw new TypeError(\"offset must be integer or undefined\");\n }\n super(layout.span, property || layout.property);\n this.layout = layout;\n this.offset = offset2;\n }\n /** @override */\n isCount() {\n return this.layout instanceof UInt || this.layout instanceof UIntBE;\n }\n /** @override */\n decode(b, offset2 = 0) {\n return this.layout.decode(b, offset2 + this.offset);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n return this.layout.encode(src, b, offset2 + this.offset);\n }\n };\n exports3.OffsetLayout = OffsetLayout;\n var UInt = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readUIntLE(offset2, this.span);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeUIntLE(src, offset2, this.span);\n return this.span;\n }\n };\n exports3.UInt = UInt;\n var UIntBE = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readUIntBE(offset2, this.span);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeUIntBE(src, offset2, this.span);\n return this.span;\n }\n };\n exports3.UIntBE = UIntBE;\n var Int = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readIntLE(offset2, this.span);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeIntLE(src, offset2, this.span);\n return this.span;\n }\n };\n exports3.Int = Int;\n var IntBE = class extends Layout {\n constructor(span, property) {\n super(span, property);\n if (6 < this.span) {\n throw new RangeError(\"span must not exceed 6 bytes\");\n }\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readIntBE(offset2, this.span);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeIntBE(src, offset2, this.span);\n return this.span;\n }\n };\n exports3.IntBE = IntBE;\n var V2E32 = Math.pow(2, 32);\n function divmodInt64(src) {\n const hi32 = Math.floor(src / V2E32);\n const lo32 = src - hi32 * V2E32;\n return { hi32, lo32 };\n }\n function roundedInt64(hi32, lo32) {\n return hi32 * V2E32 + lo32;\n }\n var NearUInt64 = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset2);\n const hi32 = buffer.readUInt32LE(offset2 + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n const split2 = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split2.lo32, offset2);\n buffer.writeUInt32LE(split2.hi32, offset2 + 4);\n return 8;\n }\n };\n exports3.NearUInt64 = NearUInt64;\n var NearUInt64BE = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readUInt32BE(offset2);\n const lo32 = buffer.readUInt32BE(offset2 + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n const split2 = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32BE(split2.hi32, offset2);\n buffer.writeUInt32BE(split2.lo32, offset2 + 4);\n return 8;\n }\n };\n exports3.NearUInt64BE = NearUInt64BE;\n var NearInt64 = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const lo32 = buffer.readUInt32LE(offset2);\n const hi32 = buffer.readInt32LE(offset2 + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n const split2 = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeUInt32LE(split2.lo32, offset2);\n buffer.writeInt32LE(split2.hi32, offset2 + 4);\n return 8;\n }\n };\n exports3.NearInt64 = NearInt64;\n var NearInt64BE = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n const buffer = uint8ArrayToBuffer(b);\n const hi32 = buffer.readInt32BE(offset2);\n const lo32 = buffer.readUInt32BE(offset2 + 4);\n return roundedInt64(hi32, lo32);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n const split2 = divmodInt64(src);\n const buffer = uint8ArrayToBuffer(b);\n buffer.writeInt32BE(split2.hi32, offset2);\n buffer.writeUInt32BE(split2.lo32, offset2 + 4);\n return 8;\n }\n };\n exports3.NearInt64BE = NearInt64BE;\n var Float = class extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readFloatLE(offset2);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeFloatLE(src, offset2);\n return 4;\n }\n };\n exports3.Float = Float;\n var FloatBE = class extends Layout {\n constructor(property) {\n super(4, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readFloatBE(offset2);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeFloatBE(src, offset2);\n return 4;\n }\n };\n exports3.FloatBE = FloatBE;\n var Double = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readDoubleLE(offset2);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeDoubleLE(src, offset2);\n return 8;\n }\n };\n exports3.Double = Double;\n var DoubleBE = class extends Layout {\n constructor(property) {\n super(8, property);\n }\n /** @override */\n decode(b, offset2 = 0) {\n return uint8ArrayToBuffer(b).readDoubleBE(offset2);\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n uint8ArrayToBuffer(b).writeDoubleBE(src, offset2);\n return 8;\n }\n };\n exports3.DoubleBE = DoubleBE;\n var Sequence = class extends Layout {\n constructor(elementLayout, count, property) {\n if (!(elementLayout instanceof Layout)) {\n throw new TypeError(\"elementLayout must be a Layout\");\n }\n if (!(count instanceof ExternalLayout && count.isCount() || Number.isInteger(count) && 0 <= count)) {\n throw new TypeError(\"count must be non-negative integer or an unsigned integer ExternalLayout\");\n }\n let span = -1;\n if (!(count instanceof ExternalLayout) && 0 < elementLayout.span) {\n span = count * elementLayout.span;\n }\n super(span, property);\n this.elementLayout = elementLayout;\n this.count = count;\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset2);\n }\n if (0 < this.elementLayout.span) {\n span = count * this.elementLayout.span;\n } else {\n let idx = 0;\n while (idx < count) {\n span += this.elementLayout.getSpan(b, offset2 + span);\n ++idx;\n }\n }\n return span;\n }\n /** @override */\n decode(b, offset2 = 0) {\n const rv = [];\n let i = 0;\n let count = this.count;\n if (count instanceof ExternalLayout) {\n count = count.decode(b, offset2);\n }\n while (i < count) {\n rv.push(this.elementLayout.decode(b, offset2));\n offset2 += this.elementLayout.getSpan(b, offset2);\n i += 1;\n }\n return rv;\n }\n /** Implement {@link Layout#encode|encode} for {@link Sequence}.\n *\n * **NOTE** If `src` is shorter than {@link Sequence#count|count} then\n * the unused space in the buffer is left unchanged. If `src` is\n * longer than {@link Sequence#count|count} the unneeded elements are\n * ignored.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset2 = 0) {\n const elo = this.elementLayout;\n const span = src.reduce((span2, v) => {\n return span2 + elo.encode(v, b, offset2 + span2);\n }, 0);\n if (this.count instanceof ExternalLayout) {\n this.count.encode(src.length, b, offset2);\n }\n return span;\n }\n };\n exports3.Sequence = Sequence;\n var Structure = class extends Layout {\n constructor(fields, property, decodePrefixes) {\n if (!(Array.isArray(fields) && fields.reduce((acc, v) => acc && v instanceof Layout, true))) {\n throw new TypeError(\"fields must be array of Layout instances\");\n }\n if (\"boolean\" === typeof property && void 0 === decodePrefixes) {\n decodePrefixes = property;\n property = void 0;\n }\n for (const fd of fields) {\n if (0 > fd.span && void 0 === fd.property) {\n throw new Error(\"fields cannot contain unnamed variable-length layout\");\n }\n }\n let span = -1;\n try {\n span = fields.reduce((span2, fd) => span2 + fd.getSpan(), 0);\n } catch (e) {\n }\n super(span, property);\n this.fields = fields;\n this.decodePrefixes = !!decodePrefixes;\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let span = 0;\n try {\n span = this.fields.reduce((span2, fd) => {\n const fsp = fd.getSpan(b, offset2);\n offset2 += fsp;\n return span2 + fsp;\n }, 0);\n } catch (e) {\n throw new RangeError(\"indeterminate span\");\n }\n return span;\n }\n /** @override */\n decode(b, offset2 = 0) {\n checkUint8Array(b);\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (void 0 !== fd.property) {\n dest[fd.property] = fd.decode(b, offset2);\n }\n offset2 += fd.getSpan(b, offset2);\n if (this.decodePrefixes && b.length === offset2) {\n break;\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Structure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the buffer is\n * left unmodified. */\n encode(src, b, offset2 = 0) {\n const firstOffset = offset2;\n let lastOffset = 0;\n let lastWrote = 0;\n for (const fd of this.fields) {\n let span = fd.span;\n lastWrote = 0 < span ? span : 0;\n if (void 0 !== fd.property) {\n const fv = src[fd.property];\n if (void 0 !== fv) {\n lastWrote = fd.encode(fv, b, offset2);\n if (0 > span) {\n span = fd.getSpan(b, offset2);\n }\n }\n }\n lastOffset = offset2;\n offset2 += span;\n }\n return lastOffset + lastWrote - firstOffset;\n }\n /** @override */\n fromArray(values) {\n const dest = this.makeDestinationObject();\n for (const fd of this.fields) {\n if (void 0 !== fd.property && 0 < values.length) {\n dest[fd.property] = values.shift();\n }\n }\n return dest;\n }\n /**\n * Get access to the layout of a given property.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Layout} - the layout associated with `property`, or\n * undefined if there is no such property.\n */\n layoutFor(property) {\n if (\"string\" !== typeof property) {\n throw new TypeError(\"property must be string\");\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return void 0;\n }\n /**\n * Get the offset of a structure member.\n *\n * @param {String} property - the structure member of interest.\n *\n * @return {Number} - the offset in bytes to the start of `property`\n * within the structure, or undefined if `property` is not a field\n * within the structure. If the property is a member but follows a\n * variable-length structure member a negative number will be\n * returned.\n */\n offsetOf(property) {\n if (\"string\" !== typeof property) {\n throw new TypeError(\"property must be string\");\n }\n let offset2 = 0;\n for (const fd of this.fields) {\n if (fd.property === property) {\n return offset2;\n }\n if (0 > fd.span) {\n offset2 = -1;\n } else if (0 <= offset2) {\n offset2 += fd.span;\n }\n }\n return void 0;\n }\n };\n exports3.Structure = Structure;\n var UnionDiscriminator = class {\n constructor(property) {\n this.property = property;\n }\n /** Analog to {@link Layout#decode|Layout decode} for union discriminators.\n *\n * The implementation of this method need not reference the buffer if\n * variant information is available through other means. */\n decode(b, offset2) {\n throw new Error(\"UnionDiscriminator is abstract\");\n }\n /** Analog to {@link Layout#decode|Layout encode} for union discriminators.\n *\n * The implementation of this method need not store the value if\n * variant information is maintained through other means. */\n encode(src, b, offset2) {\n throw new Error(\"UnionDiscriminator is abstract\");\n }\n };\n exports3.UnionDiscriminator = UnionDiscriminator;\n var UnionLayoutDiscriminator = class extends UnionDiscriminator {\n constructor(layout, property) {\n if (!(layout instanceof ExternalLayout && layout.isCount())) {\n throw new TypeError(\"layout must be an unsigned integer ExternalLayout\");\n }\n super(property || layout.property || \"variant\");\n this.layout = layout;\n }\n /** Delegate decoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n decode(b, offset2) {\n return this.layout.decode(b, offset2);\n }\n /** Delegate encoding to {@link UnionLayoutDiscriminator#layout|layout}. */\n encode(src, b, offset2) {\n return this.layout.encode(src, b, offset2);\n }\n };\n exports3.UnionLayoutDiscriminator = UnionLayoutDiscriminator;\n var Union = class extends Layout {\n constructor(discr, defaultLayout, property) {\n let discriminator;\n if (discr instanceof UInt || discr instanceof UIntBE) {\n discriminator = new UnionLayoutDiscriminator(new OffsetLayout(discr));\n } else if (discr instanceof ExternalLayout && discr.isCount()) {\n discriminator = new UnionLayoutDiscriminator(discr);\n } else if (!(discr instanceof UnionDiscriminator)) {\n throw new TypeError(\"discr must be a UnionDiscriminator or an unsigned integer layout\");\n } else {\n discriminator = discr;\n }\n if (void 0 === defaultLayout) {\n defaultLayout = null;\n }\n if (!(null === defaultLayout || defaultLayout instanceof Layout)) {\n throw new TypeError(\"defaultLayout must be null or a Layout\");\n }\n if (null !== defaultLayout) {\n if (0 > defaultLayout.span) {\n throw new Error(\"defaultLayout must have constant span\");\n }\n if (void 0 === defaultLayout.property) {\n defaultLayout = defaultLayout.replicate(\"content\");\n }\n }\n let span = -1;\n if (defaultLayout) {\n span = defaultLayout.span;\n if (0 <= span && (discr instanceof UInt || discr instanceof UIntBE)) {\n span += discriminator.layout.span;\n }\n }\n super(span, property);\n this.discriminator = discriminator;\n this.usesPrefixDiscriminator = discr instanceof UInt || discr instanceof UIntBE;\n this.defaultLayout = defaultLayout;\n this.registry = {};\n let boundGetSourceVariant = this.defaultGetSourceVariant.bind(this);\n this.getSourceVariant = function(src) {\n return boundGetSourceVariant(src);\n };\n this.configGetSourceVariant = function(gsv) {\n boundGetSourceVariant = gsv.bind(this);\n };\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n const vlo = this.getVariant(b, offset2);\n if (!vlo) {\n throw new Error(\"unable to determine span for unrecognized variant\");\n }\n return vlo.getSpan(b, offset2);\n }\n /**\n * Method to infer a registered Union variant compatible with `src`.\n *\n * The first satisfied rule in the following sequence defines the\n * return value:\n * * If `src` has properties matching the Union discriminator and\n * the default layout, `undefined` is returned regardless of the\n * value of the discriminator property (this ensures the default\n * layout will be used);\n * * If `src` has a property matching the Union discriminator, the\n * value of the discriminator identifies a registered variant, and\n * either (a) the variant has no layout, or (b) `src` has the\n * variant's property, then the variant is returned (because the\n * source satisfies the constraints of the variant it identifies);\n * * If `src` does not have a property matching the Union\n * discriminator, but does have a property matching a registered\n * variant, then the variant is returned (because the source\n * matches a variant without an explicit conflict);\n * * An error is thrown (because we either can't identify a variant,\n * or we were explicitly told the variant but can't satisfy it).\n *\n * @param {Object} src - an object presumed to be compatible with\n * the content of the Union.\n *\n * @return {(undefined|VariantLayout)} - as described above.\n *\n * @throws {Error} - if `src` cannot be associated with a default or\n * registered variant.\n */\n defaultGetSourceVariant(src) {\n if (Object.prototype.hasOwnProperty.call(src, this.discriminator.property)) {\n if (this.defaultLayout && this.defaultLayout.property && Object.prototype.hasOwnProperty.call(src, this.defaultLayout.property)) {\n return void 0;\n }\n const vlo = this.registry[src[this.discriminator.property]];\n if (vlo && (!vlo.layout || vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property))) {\n return vlo;\n }\n } else {\n for (const tag in this.registry) {\n const vlo = this.registry[tag];\n if (vlo.property && Object.prototype.hasOwnProperty.call(src, vlo.property)) {\n return vlo;\n }\n }\n }\n throw new Error(\"unable to infer src variant\");\n }\n /** Implement {@link Layout#decode|decode} for {@link Union}.\n *\n * If the variant is {@link Union#addVariant|registered} the return\n * value is an instance of that variant, with no explicit\n * discriminator. Otherwise the {@link Union#defaultLayout|default\n * layout} is used to decode the content. */\n decode(b, offset2 = 0) {\n let dest;\n const dlo = this.discriminator;\n const discr = dlo.decode(b, offset2);\n const clo = this.registry[discr];\n if (void 0 === clo) {\n const defaultLayout = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dest = this.makeDestinationObject();\n dest[dlo.property] = discr;\n dest[defaultLayout.property] = defaultLayout.decode(b, offset2 + contentOffset);\n } else {\n dest = clo.decode(b, offset2);\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link Union}.\n *\n * This API assumes the `src` object is consistent with the union's\n * {@link Union#defaultLayout|default layout}. To encode variants\n * use the appropriate variant-specific {@link VariantLayout#encode}\n * method. */\n encode(src, b, offset2 = 0) {\n const vlo = this.getSourceVariant(src);\n if (void 0 === vlo) {\n const dlo = this.discriminator;\n const clo = this.defaultLayout;\n let contentOffset = 0;\n if (this.usesPrefixDiscriminator) {\n contentOffset = dlo.layout.span;\n }\n dlo.encode(src[dlo.property], b, offset2);\n return contentOffset + clo.encode(src[clo.property], b, offset2 + contentOffset);\n }\n return vlo.encode(src, b, offset2);\n }\n /** Register a new variant structure within a union. The newly\n * created variant is returned.\n *\n * @param {Number} variant - initializer for {@link\n * VariantLayout#variant|variant}.\n *\n * @param {Layout} layout - initializer for {@link\n * VariantLayout#layout|layout}.\n *\n * @param {String} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {VariantLayout} */\n addVariant(variant, layout, property) {\n const rv = new VariantLayout(this, variant, layout, property);\n this.registry[variant] = rv;\n return rv;\n }\n /**\n * Get the layout associated with a registered variant.\n *\n * If `vb` does not produce a registered variant the function returns\n * `undefined`.\n *\n * @param {(Number|Uint8Array)} vb - either the variant number, or a\n * buffer from which the discriminator is to be read.\n *\n * @param {Number} offset - offset into `vb` for the start of the\n * union. Used only when `vb` is an instance of {Uint8Array}.\n *\n * @return {({VariantLayout}|undefined)}\n */\n getVariant(vb, offset2 = 0) {\n let variant;\n if (vb instanceof Uint8Array) {\n variant = this.discriminator.decode(vb, offset2);\n } else {\n variant = vb;\n }\n return this.registry[variant];\n }\n };\n exports3.Union = Union;\n var VariantLayout = class extends Layout {\n constructor(union2, variant, layout, property) {\n if (!(union2 instanceof Union)) {\n throw new TypeError(\"union must be a Union\");\n }\n if (!Number.isInteger(variant) || 0 > variant) {\n throw new TypeError(\"variant must be a (non-negative) integer\");\n }\n if (\"string\" === typeof layout && void 0 === property) {\n property = layout;\n layout = null;\n }\n if (layout) {\n if (!(layout instanceof Layout)) {\n throw new TypeError(\"layout must be a Layout\");\n }\n if (null !== union2.defaultLayout && 0 <= layout.span && layout.span > union2.defaultLayout.span) {\n throw new Error(\"variant span exceeds span of containing union\");\n }\n if (\"string\" !== typeof property) {\n throw new TypeError(\"variant must have a String property\");\n }\n }\n let span = union2.span;\n if (0 > union2.span) {\n span = layout ? layout.span : 0;\n if (0 <= span && union2.usesPrefixDiscriminator) {\n span += union2.discriminator.layout.span;\n }\n }\n super(span, property);\n this.union = union2;\n this.variant = variant;\n this.layout = layout || null;\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n if (0 <= this.span) {\n return this.span;\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n let span = 0;\n if (this.layout) {\n span = this.layout.getSpan(b, offset2 + contentOffset);\n }\n return contentOffset + span;\n }\n /** @override */\n decode(b, offset2 = 0) {\n const dest = this.makeDestinationObject();\n if (this !== this.union.getVariant(b, offset2)) {\n throw new Error(\"variant mismatch\");\n }\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout) {\n dest[this.property] = this.layout.decode(b, offset2 + contentOffset);\n } else if (this.property) {\n dest[this.property] = true;\n } else if (this.union.usesPrefixDiscriminator) {\n dest[this.union.discriminator.property] = this.variant;\n }\n return dest;\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n let contentOffset = 0;\n if (this.union.usesPrefixDiscriminator) {\n contentOffset = this.union.discriminator.layout.span;\n }\n if (this.layout && !Object.prototype.hasOwnProperty.call(src, this.property)) {\n throw new TypeError(\"variant lacks property \" + this.property);\n }\n this.union.discriminator.encode(this.variant, b, offset2);\n let span = contentOffset;\n if (this.layout) {\n this.layout.encode(src[this.property], b, offset2 + contentOffset);\n span += this.layout.getSpan(b, offset2 + contentOffset);\n if (0 <= this.union.span && span > this.union.span) {\n throw new Error(\"encoded variant overruns containing union\");\n }\n }\n return span;\n }\n /** Delegate {@link Layout#fromArray|fromArray} to {@link\n * VariantLayout#layout|layout}. */\n fromArray(values) {\n if (this.layout) {\n return this.layout.fromArray(values);\n }\n return void 0;\n }\n };\n exports3.VariantLayout = VariantLayout;\n function fixBitwiseResult(v) {\n if (0 > v) {\n v += 4294967296;\n }\n return v;\n }\n var BitStructure = class extends Layout {\n constructor(word, msb, property) {\n if (!(word instanceof UInt || word instanceof UIntBE)) {\n throw new TypeError(\"word must be a UInt or UIntBE layout\");\n }\n if (\"string\" === typeof msb && void 0 === property) {\n property = msb;\n msb = false;\n }\n if (4 < word.span) {\n throw new RangeError(\"word cannot exceed 32 bits\");\n }\n super(word.span, property);\n this.word = word;\n this.msb = !!msb;\n this.fields = [];\n let value = 0;\n this._packedSetValue = function(v) {\n value = fixBitwiseResult(v);\n return this;\n };\n this._packedGetValue = function() {\n return value;\n };\n }\n /** @override */\n decode(b, offset2 = 0) {\n const dest = this.makeDestinationObject();\n const value = this.word.decode(b, offset2);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (void 0 !== fd.property) {\n dest[fd.property] = fd.decode(b);\n }\n }\n return dest;\n }\n /** Implement {@link Layout#encode|encode} for {@link BitStructure}.\n *\n * If `src` is missing a property for a member with a defined {@link\n * Layout#property|property} the corresponding region of the packed\n * value is left unmodified. Unused bits are also left unmodified. */\n encode(src, b, offset2 = 0) {\n const value = this.word.decode(b, offset2);\n this._packedSetValue(value);\n for (const fd of this.fields) {\n if (void 0 !== fd.property) {\n const fv = src[fd.property];\n if (void 0 !== fv) {\n fd.encode(fv);\n }\n }\n }\n return this.word.encode(this._packedGetValue(), b, offset2);\n }\n /** Register a new bitfield with a containing bit structure. The\n * resulting bitfield is returned.\n *\n * @param {Number} bits - initializer for {@link BitField#bits|bits}.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {BitField} */\n addField(bits, property) {\n const bf = new BitField(this, bits, property);\n this.fields.push(bf);\n return bf;\n }\n /** As with {@link BitStructure#addField|addField} for single-bit\n * fields with `boolean` value representation.\n *\n * @param {string} property - initializer for {@link\n * Layout#property|property}.\n *\n * @return {Boolean} */\n // `Boolean` conflicts with the native primitive type\n // eslint-disable-next-line @typescript-eslint/ban-types\n addBoolean(property) {\n const bf = new Boolean2(this, property);\n this.fields.push(bf);\n return bf;\n }\n /**\n * Get access to the bit field for a given property.\n *\n * @param {String} property - the bit field of interest.\n *\n * @return {BitField} - the field associated with `property`, or\n * undefined if there is no such property.\n */\n fieldFor(property) {\n if (\"string\" !== typeof property) {\n throw new TypeError(\"property must be string\");\n }\n for (const fd of this.fields) {\n if (fd.property === property) {\n return fd;\n }\n }\n return void 0;\n }\n };\n exports3.BitStructure = BitStructure;\n var BitField = class {\n constructor(container, bits, property) {\n if (!(container instanceof BitStructure)) {\n throw new TypeError(\"container must be a BitStructure\");\n }\n if (!Number.isInteger(bits) || 0 >= bits) {\n throw new TypeError(\"bits must be positive integer\");\n }\n const totalBits = 8 * container.span;\n const usedBits = container.fields.reduce((sum, fd) => sum + fd.bits, 0);\n if (bits + usedBits > totalBits) {\n throw new Error(\"bits too long for span remainder (\" + (totalBits - usedBits) + \" of \" + totalBits + \" remain)\");\n }\n this.container = container;\n this.bits = bits;\n this.valueMask = (1 << bits) - 1;\n if (32 === bits) {\n this.valueMask = 4294967295;\n }\n this.start = usedBits;\n if (this.container.msb) {\n this.start = totalBits - usedBits - bits;\n }\n this.wordMask = fixBitwiseResult(this.valueMask << this.start);\n this.property = property;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field. */\n decode(b, offset2) {\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(word & this.wordMask);\n const value = wordValue >>> this.start;\n return value;\n }\n /** Store a value into the corresponding subsequence of the containing\n * bit field.\n *\n * **NOTE** This is not a specialization of {@link\n * Layout#encode|Layout.encode} and there is no return value. */\n encode(value) {\n if (\"number\" !== typeof value || !Number.isInteger(value) || value !== fixBitwiseResult(value & this.valueMask)) {\n throw new TypeError(nameWithProperty(\"BitField.encode\", this) + \" value must be integer not exceeding \" + this.valueMask);\n }\n const word = this.container._packedGetValue();\n const wordValue = fixBitwiseResult(value << this.start);\n this.container._packedSetValue(fixBitwiseResult(word & ~this.wordMask) | wordValue);\n }\n };\n exports3.BitField = BitField;\n var Boolean2 = class extends BitField {\n constructor(container, property) {\n super(container, 1, property);\n }\n /** Override {@link BitField#decode|decode} for {@link Boolean|Boolean}.\n *\n * @returns {boolean} */\n decode(b, offset2) {\n return !!super.decode(b, offset2);\n }\n /** @override */\n encode(value) {\n if (\"boolean\" === typeof value) {\n value = +value;\n }\n super.encode(value);\n }\n };\n exports3.Boolean = Boolean2;\n var Blob = class extends Layout {\n constructor(length, property) {\n if (!(length instanceof ExternalLayout && length.isCount() || Number.isInteger(length) && 0 <= length)) {\n throw new TypeError(\"length must be positive integer or an unsigned integer ExternalLayout\");\n }\n let span = -1;\n if (!(length instanceof ExternalLayout)) {\n span = length;\n }\n super(span, property);\n this.length = length;\n }\n /** @override */\n getSpan(b, offset2) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset2);\n }\n return span;\n }\n /** @override */\n decode(b, offset2 = 0) {\n let span = this.span;\n if (0 > span) {\n span = this.length.decode(b, offset2);\n }\n return uint8ArrayToBuffer(b).slice(offset2, offset2 + span);\n }\n /** Implement {@link Layout#encode|encode} for {@link Blob}.\n *\n * **NOTE** If {@link Layout#count|count} is an instance of {@link\n * ExternalLayout} then the length of `src` will be encoded as the\n * count after `src` is encoded. */\n encode(src, b, offset2) {\n let span = this.length;\n if (this.length instanceof ExternalLayout) {\n span = src.length;\n }\n if (!(src instanceof Uint8Array && span === src.length)) {\n throw new TypeError(nameWithProperty(\"Blob.encode\", this) + \" requires (length \" + span + \") Uint8Array as src\");\n }\n if (offset2 + span > b.length) {\n throw new RangeError(\"encoding overruns Uint8Array\");\n }\n const srcBuffer = uint8ArrayToBuffer(src);\n uint8ArrayToBuffer(b).write(srcBuffer.toString(\"hex\"), offset2, span, \"hex\");\n if (this.length instanceof ExternalLayout) {\n this.length.encode(span, b, offset2);\n }\n return span;\n }\n };\n exports3.Blob = Blob;\n var CString = class extends Layout {\n constructor(property) {\n super(-1, property);\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n checkUint8Array(b);\n let idx = offset2;\n while (idx < b.length && 0 !== b[idx]) {\n idx += 1;\n }\n return 1 + idx - offset2;\n }\n /** @override */\n decode(b, offset2 = 0) {\n const span = this.getSpan(b, offset2);\n return uint8ArrayToBuffer(b).slice(offset2, offset2 + span - 1).toString(\"utf-8\");\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n if (\"string\" !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, \"utf8\");\n const span = srcb.length;\n if (offset2 + span > b.length) {\n throw new RangeError(\"encoding overruns Buffer\");\n }\n const buffer = uint8ArrayToBuffer(b);\n srcb.copy(buffer, offset2);\n buffer[offset2 + span] = 0;\n return span + 1;\n }\n };\n exports3.CString = CString;\n var UTF8 = class extends Layout {\n constructor(maxSpan, property) {\n if (\"string\" === typeof maxSpan && void 0 === property) {\n property = maxSpan;\n maxSpan = void 0;\n }\n if (void 0 === maxSpan) {\n maxSpan = -1;\n } else if (!Number.isInteger(maxSpan)) {\n throw new TypeError(\"maxSpan must be an integer\");\n }\n super(-1, property);\n this.maxSpan = maxSpan;\n }\n /** @override */\n getSpan(b, offset2 = 0) {\n checkUint8Array(b);\n return b.length - offset2;\n }\n /** @override */\n decode(b, offset2 = 0) {\n const span = this.getSpan(b, offset2);\n if (0 <= this.maxSpan && this.maxSpan < span) {\n throw new RangeError(\"text length exceeds maxSpan\");\n }\n return uint8ArrayToBuffer(b).slice(offset2, offset2 + span).toString(\"utf-8\");\n }\n /** @override */\n encode(src, b, offset2 = 0) {\n if (\"string\" !== typeof src) {\n src = String(src);\n }\n const srcb = buffer_1.Buffer.from(src, \"utf8\");\n const span = srcb.length;\n if (0 <= this.maxSpan && this.maxSpan < span) {\n throw new RangeError(\"text length exceeds maxSpan\");\n }\n if (offset2 + span > b.length) {\n throw new RangeError(\"encoding overruns Buffer\");\n }\n srcb.copy(uint8ArrayToBuffer(b), offset2);\n return span;\n }\n };\n exports3.UTF8 = UTF8;\n var Constant = class extends Layout {\n constructor(value, property) {\n super(0, property);\n this.value = value;\n }\n /** @override */\n decode(b, offset2) {\n return this.value;\n }\n /** @override */\n encode(src, b, offset2) {\n return 0;\n }\n };\n exports3.Constant = Constant;\n exports3.greedy = (elementSpan, property) => new GreedyCount(elementSpan, property);\n exports3.offset = (layout, offset2, property) => new OffsetLayout(layout, offset2, property);\n exports3.u8 = (property) => new UInt(1, property);\n exports3.u16 = (property) => new UInt(2, property);\n exports3.u24 = (property) => new UInt(3, property);\n exports3.u32 = (property) => new UInt(4, property);\n exports3.u40 = (property) => new UInt(5, property);\n exports3.u48 = (property) => new UInt(6, property);\n exports3.nu64 = (property) => new NearUInt64(property);\n exports3.u16be = (property) => new UIntBE(2, property);\n exports3.u24be = (property) => new UIntBE(3, property);\n exports3.u32be = (property) => new UIntBE(4, property);\n exports3.u40be = (property) => new UIntBE(5, property);\n exports3.u48be = (property) => new UIntBE(6, property);\n exports3.nu64be = (property) => new NearUInt64BE(property);\n exports3.s8 = (property) => new Int(1, property);\n exports3.s16 = (property) => new Int(2, property);\n exports3.s24 = (property) => new Int(3, property);\n exports3.s32 = (property) => new Int(4, property);\n exports3.s40 = (property) => new Int(5, property);\n exports3.s48 = (property) => new Int(6, property);\n exports3.ns64 = (property) => new NearInt64(property);\n exports3.s16be = (property) => new IntBE(2, property);\n exports3.s24be = (property) => new IntBE(3, property);\n exports3.s32be = (property) => new IntBE(4, property);\n exports3.s40be = (property) => new IntBE(5, property);\n exports3.s48be = (property) => new IntBE(6, property);\n exports3.ns64be = (property) => new NearInt64BE(property);\n exports3.f32 = (property) => new Float(property);\n exports3.f32be = (property) => new FloatBE(property);\n exports3.f64 = (property) => new Double(property);\n exports3.f64be = (property) => new DoubleBE(property);\n exports3.struct = (fields, property, decodePrefixes) => new Structure(fields, property, decodePrefixes);\n exports3.bits = (word, msb, property) => new BitStructure(word, msb, property);\n exports3.seq = (elementLayout, count, property) => new Sequence(elementLayout, count, property);\n exports3.union = (discr, defaultLayout, property) => new Union(discr, defaultLayout, property);\n exports3.unionLayoutDiscriminator = (layout, property) => new UnionLayoutDiscriminator(layout, property);\n exports3.blob = (length, property) => new Blob(length, property);\n exports3.cstr = (property) => new CString(property);\n exports3.utf8 = (maxSpan, property) => new UTF8(maxSpan, property);\n exports3.constant = (value, property) => new Constant(value, property);\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js\n function rng() {\n if (!getRandomValues) {\n getRandomValues = typeof crypto !== \"undefined\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== \"undefined\" && typeof msCrypto.getRandomValues === \"function\" && msCrypto.getRandomValues.bind(msCrypto);\n if (!getRandomValues) {\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n }\n }\n return getRandomValues(rnds8);\n }\n var getRandomValues, rnds8;\n var init_rng = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n rnds8 = new Uint8Array(16);\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js\n var regex_default;\n var init_regex = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js\n function validate2(uuid) {\n return typeof uuid === \"string\" && regex_default.test(uuid);\n }\n var validate_default;\n var init_validate = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_regex();\n validate_default = validate2;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js\n function stringify(arr) {\n var offset2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;\n var uuid = (byteToHex[arr[offset2 + 0]] + byteToHex[arr[offset2 + 1]] + byteToHex[arr[offset2 + 2]] + byteToHex[arr[offset2 + 3]] + \"-\" + byteToHex[arr[offset2 + 4]] + byteToHex[arr[offset2 + 5]] + \"-\" + byteToHex[arr[offset2 + 6]] + byteToHex[arr[offset2 + 7]] + \"-\" + byteToHex[arr[offset2 + 8]] + byteToHex[arr[offset2 + 9]] + \"-\" + byteToHex[arr[offset2 + 10]] + byteToHex[arr[offset2 + 11]] + byteToHex[arr[offset2 + 12]] + byteToHex[arr[offset2 + 13]] + byteToHex[arr[offset2 + 14]] + byteToHex[arr[offset2 + 15]]).toLowerCase();\n if (!validate_default(uuid)) {\n throw TypeError(\"Stringified UUID is invalid\");\n }\n return uuid;\n }\n var byteToHex, i, stringify_default;\n var init_stringify = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_validate();\n byteToHex = [];\n for (i = 0; i < 256; ++i) {\n byteToHex.push((i + 256).toString(16).substr(1));\n }\n stringify_default = stringify;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js\n function v1(options, buf, offset2) {\n var i = buf && offset2 || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq;\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n if (node == null) {\n node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n if (clockseq == null) {\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383;\n }\n }\n var msecs = options.msecs !== void 0 ? options.msecs : Date.now();\n var nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1;\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;\n if (dt < 0 && options.clockseq === void 0) {\n clockseq = clockseq + 1 & 16383;\n }\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) {\n nsecs = 0;\n }\n if (nsecs >= 1e4) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n msecs += 122192928e5;\n var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;\n b[i++] = tl >>> 24 & 255;\n b[i++] = tl >>> 16 & 255;\n b[i++] = tl >>> 8 & 255;\n b[i++] = tl & 255;\n var tmh = msecs / 4294967296 * 1e4 & 268435455;\n b[i++] = tmh >>> 8 & 255;\n b[i++] = tmh & 255;\n b[i++] = tmh >>> 24 & 15 | 16;\n b[i++] = tmh >>> 16 & 255;\n b[i++] = clockseq >>> 8 | 128;\n b[i++] = clockseq & 255;\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n return buf || stringify_default(b);\n }\n var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default;\n var init_v1 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_rng();\n init_stringify();\n _lastMSecs = 0;\n _lastNSecs = 0;\n v1_default = v1;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js\n function parse(uuid) {\n if (!validate_default(uuid)) {\n throw TypeError(\"Invalid UUID\");\n }\n var v;\n var arr = new Uint8Array(16);\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 255;\n arr[2] = v >>> 8 & 255;\n arr[3] = v & 255;\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 255;\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 255;\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 255;\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255;\n arr[11] = v / 4294967296 & 255;\n arr[12] = v >>> 24 & 255;\n arr[13] = v >>> 16 & 255;\n arr[14] = v >>> 8 & 255;\n arr[15] = v & 255;\n return arr;\n }\n var parse_default;\n var init_parse = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_validate();\n parse_default = parse;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js\n function stringToBytes(str) {\n str = unescape(encodeURIComponent(str));\n var bytes = [];\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n return bytes;\n }\n function v35_default(name, version2, hashfunc) {\n function generateUUID(value, namespace, buf, offset2) {\n if (typeof value === \"string\") {\n value = stringToBytes(value);\n }\n if (typeof namespace === \"string\") {\n namespace = parse_default(namespace);\n }\n if (namespace.length !== 16) {\n throw TypeError(\"Namespace must be array-like (16 iterable integer values, 0-255)\");\n }\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 15 | version2;\n bytes[8] = bytes[8] & 63 | 128;\n if (buf) {\n offset2 = offset2 || 0;\n for (var i = 0; i < 16; ++i) {\n buf[offset2 + i] = bytes[i];\n }\n return buf;\n }\n return stringify_default(bytes);\n }\n try {\n generateUUID.name = name;\n } catch (err) {\n }\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n }\n var DNS, URL;\n var init_v35 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_stringify();\n init_parse();\n DNS = \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\";\n URL = \"6ba7b811-9dad-11d1-80b4-00c04fd430c8\";\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js\n function md5(bytes) {\n if (typeof bytes === \"string\") {\n var msg = unescape(encodeURIComponent(bytes));\n bytes = new Uint8Array(msg.length);\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n }\n function md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = \"0123456789abcdef\";\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 255;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 15) + hexTab.charAt(x & 15), 16);\n output.push(hex);\n }\n return output;\n }\n function getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n }\n function wordsToMd5(x, len) {\n x[len >> 5] |= 128 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n return [a, b, c, d];\n }\n function bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 255) << i % 32;\n }\n return output;\n }\n function safeAdd(x, y) {\n var lsw = (x & 65535) + (y & 65535);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 65535;\n }\n function bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n }\n function md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n }\n function md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n }\n function md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n }\n function md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n }\n function md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n }\n var md5_default;\n var init_md5 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n md5_default = md5;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js\n var v3, v3_default;\n var init_v3 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v35();\n init_md5();\n v3 = v35_default(\"v3\", 48, md5_default);\n v3_default = v3;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js\n function v4(options, buf, offset2) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)();\n rnds[6] = rnds[6] & 15 | 64;\n rnds[8] = rnds[8] & 63 | 128;\n if (buf) {\n offset2 = offset2 || 0;\n for (var i = 0; i < 16; ++i) {\n buf[offset2 + i] = rnds[i];\n }\n return buf;\n }\n return stringify_default(rnds);\n }\n var v4_default;\n var init_v4 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_rng();\n init_stringify();\n v4_default = v4;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js\n function f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n case 1:\n return x ^ y ^ z;\n case 2:\n return x & y ^ x & z ^ y & z;\n case 3:\n return x ^ y ^ z;\n }\n }\n function ROTL(x, n) {\n return x << n | x >>> 32 - n;\n }\n function sha1(bytes) {\n var K = [1518500249, 1859775393, 2400959708, 3395469782];\n var H = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];\n if (typeof bytes === \"string\") {\n var msg = unescape(encodeURIComponent(bytes));\n bytes = [];\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n bytes = Array.prototype.slice.call(bytes);\n }\n bytes.push(128);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n M[_i] = arr;\n }\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 4294967295;\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n return [H[0] >> 24 & 255, H[0] >> 16 & 255, H[0] >> 8 & 255, H[0] & 255, H[1] >> 24 & 255, H[1] >> 16 & 255, H[1] >> 8 & 255, H[1] & 255, H[2] >> 24 & 255, H[2] >> 16 & 255, H[2] >> 8 & 255, H[2] & 255, H[3] >> 24 & 255, H[3] >> 16 & 255, H[3] >> 8 & 255, H[3] & 255, H[4] >> 24 & 255, H[4] >> 16 & 255, H[4] >> 8 & 255, H[4] & 255];\n }\n var sha1_default;\n var init_sha1 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n sha1_default = sha1;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js\n var v5, v5_default;\n var init_v5 = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v35();\n init_sha1();\n v5 = v35_default(\"v5\", 80, sha1_default);\n v5_default = v5;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js\n var nil_default;\n var init_nil = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n nil_default = \"00000000-0000-0000-0000-000000000000\";\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js\n function version(uuid) {\n if (!validate_default(uuid)) {\n throw TypeError(\"Invalid UUID\");\n }\n return parseInt(uuid.substr(14, 1), 16);\n }\n var version_default;\n var init_version = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_validate();\n version_default = version;\n }\n });\n\n // ../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/index.js\n var esm_browser_exports = {};\n __export(esm_browser_exports, {\n NIL: () => nil_default,\n parse: () => parse_default,\n stringify: () => stringify_default,\n v1: () => v1_default,\n v3: () => v3_default,\n v4: () => v4_default,\n v5: () => v5_default,\n validate: () => validate_default,\n version: () => version_default\n });\n var init_esm_browser = __esm({\n \"../../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/index.js\"() {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n init_v1();\n init_v3();\n init_v4();\n init_v5();\n init_nil();\n init_version();\n init_validate();\n init_stringify();\n init_parse();\n }\n });\n\n // ../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/generateRequest.js\n var require_generateRequest = __commonJS({\n \"../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/generateRequest.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var uuid = (init_esm_browser(), __toCommonJS(esm_browser_exports)).v4;\n var generateRequest = function(method, params, id, options) {\n if (typeof method !== \"string\") {\n throw new TypeError(method + \" must be a string\");\n }\n options = options || {};\n const version2 = typeof options.version === \"number\" ? options.version : 2;\n if (version2 !== 1 && version2 !== 2) {\n throw new TypeError(version2 + \" must be 1 or 2\");\n }\n const request = {\n method\n };\n if (version2 === 2) {\n request.jsonrpc = \"2.0\";\n }\n if (params) {\n if (typeof params !== \"object\" && !Array.isArray(params)) {\n throw new TypeError(params + \" must be an object, array or omitted\");\n }\n request.params = params;\n }\n if (typeof id === \"undefined\") {\n const generator = typeof options.generator === \"function\" ? options.generator : function() {\n return uuid();\n };\n request.id = generator(request, options);\n } else if (version2 === 2 && id === null) {\n if (options.notificationIdNull) {\n request.id = null;\n }\n } else {\n request.id = id;\n }\n return request;\n };\n module.exports = generateRequest;\n }\n });\n\n // ../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/client/browser/index.js\n var require_browser = __commonJS({\n \"../../../node_modules/.pnpm/jayson@4.2.0_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/jayson/lib/client/browser/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var uuid = (init_esm_browser(), __toCommonJS(esm_browser_exports)).v4;\n var generateRequest = require_generateRequest();\n var ClientBrowser = function(callServer, options) {\n if (!(this instanceof ClientBrowser)) {\n return new ClientBrowser(callServer, options);\n }\n if (!options) {\n options = {};\n }\n this.options = {\n reviver: typeof options.reviver !== \"undefined\" ? options.reviver : null,\n replacer: typeof options.replacer !== \"undefined\" ? options.replacer : null,\n generator: typeof options.generator !== \"undefined\" ? options.generator : function() {\n return uuid();\n },\n version: typeof options.version !== \"undefined\" ? options.version : 2,\n notificationIdNull: typeof options.notificationIdNull === \"boolean\" ? options.notificationIdNull : false\n };\n this.callServer = callServer;\n };\n module.exports = ClientBrowser;\n ClientBrowser.prototype.request = function(method, params, id, callback) {\n const self = this;\n let request = null;\n const isBatch = Array.isArray(method) && typeof params === \"function\";\n if (this.options.version === 1 && isBatch) {\n throw new TypeError(\"JSON-RPC 1.0 does not support batching\");\n }\n const isRaw = !isBatch && method && typeof method === \"object\" && typeof params === \"function\";\n if (isBatch || isRaw) {\n callback = params;\n request = method;\n } else {\n if (typeof id === \"function\") {\n callback = id;\n id = void 0;\n }\n const hasCallback = typeof callback === \"function\";\n try {\n request = generateRequest(method, params, id, {\n generator: this.options.generator,\n version: this.options.version,\n notificationIdNull: this.options.notificationIdNull\n });\n } catch (err) {\n if (hasCallback) {\n return callback(err);\n }\n throw err;\n }\n if (!hasCallback) {\n return request;\n }\n }\n let message;\n try {\n message = JSON.stringify(request, this.options.replacer);\n } catch (err) {\n return callback(err);\n }\n this.callServer(message, function(err, response) {\n self._parseResponse(err, response, callback);\n });\n return request;\n };\n ClientBrowser.prototype._parseResponse = function(err, responseText, callback) {\n if (err) {\n callback(err);\n return;\n }\n if (!responseText) {\n return callback();\n }\n let response;\n try {\n response = JSON.parse(responseText, this.options.reviver);\n } catch (err2) {\n return callback(err2);\n }\n if (callback.length === 3) {\n if (Array.isArray(response)) {\n const isError = function(res) {\n return typeof res.error !== \"undefined\";\n };\n const isNotError = function(res) {\n return !isError(res);\n };\n return callback(null, response.filter(isError), response.filter(isNotError));\n } else {\n return callback(null, response.error, response.result);\n }\n }\n callback(null, response);\n };\n }\n });\n\n // ../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js\n var require_eventemitter3 = __commonJS({\n \"../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js\"(exports3, module) {\n \"use strict\";\n init_dirname();\n init_buffer2();\n init_process2();\n var has = Object.prototype.hasOwnProperty;\n var prefix = \"~\";\n function Events() {\n }\n if (Object.create) {\n Events.prototype = /* @__PURE__ */ Object.create(null);\n if (!new Events().__proto__)\n prefix = false;\n }\n function EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n }\n function addListener(emitter, event, fn, context, once) {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"The listener must be a function\");\n }\n var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event;\n if (!emitter._events[evt])\n emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn)\n emitter._events[evt].push(listener);\n else\n emitter._events[evt] = [emitter._events[evt], listener];\n return emitter;\n }\n function clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0)\n emitter._events = new Events();\n else\n delete emitter._events[evt];\n }\n function EventEmitter2() {\n this._events = new Events();\n this._eventsCount = 0;\n }\n EventEmitter2.prototype.eventNames = function eventNames() {\n var names = [], events, name;\n if (this._eventsCount === 0)\n return names;\n for (name in events = this._events) {\n if (has.call(events, name))\n names.push(prefix ? name.slice(1) : name);\n }\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n return names;\n };\n EventEmitter2.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event, handlers = this._events[evt];\n if (!handlers)\n return [];\n if (handlers.fn)\n return [handlers.fn];\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n return ee;\n };\n EventEmitter2.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event, listeners = this._events[evt];\n if (!listeners)\n return 0;\n if (listeners.fn)\n return 1;\n return listeners.length;\n };\n EventEmitter2.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n if (!this._events[evt])\n return false;\n var listeners = this._events[evt], len = arguments.length, args, i;\n if (listeners.fn) {\n if (listeners.once)\n this.removeListener(event, listeners.fn, void 0, true);\n switch (len) {\n case 1:\n return listeners.fn.call(listeners.context), true;\n case 2:\n return listeners.fn.call(listeners.context, a1), true;\n case 3:\n return listeners.fn.call(listeners.context, a1, a2), true;\n case 4:\n return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5:\n return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6:\n return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n for (i = 1, args = new Array(len - 1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length, j;\n for (i = 0; i < length; i++) {\n if (listeners[i].once)\n this.removeListener(event, listeners[i].fn, void 0, true);\n switch (len) {\n case 1:\n listeners[i].fn.call(listeners[i].context);\n break;\n case 2:\n listeners[i].fn.call(listeners[i].context, a1);\n break;\n case 3:\n listeners[i].fn.call(listeners[i].context, a1, a2);\n break;\n case 4:\n listeners[i].fn.call(listeners[i].context, a1, a2, a3);\n break;\n default:\n if (!args)\n for (j = 1, args = new Array(len - 1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n return true;\n };\n EventEmitter2.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n };\n EventEmitter2.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n };\n EventEmitter2.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n if (!this._events[evt])\n return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n var listeners = this._events[evt];\n if (listeners.fn) {\n if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) {\n events.push(listeners[i]);\n }\n }\n if (events.length)\n this._events[evt] = events.length === 1 ? events[0] : events;\n else\n clearEvent(this, evt);\n }\n return this;\n };\n EventEmitter2.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt])\n clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n return this;\n };\n EventEmitter2.prototype.off = EventEmitter2.prototype.removeListener;\n EventEmitter2.prototype.addListener = EventEmitter2.prototype.on;\n EventEmitter2.prefixed = prefix;\n EventEmitter2.EventEmitter = EventEmitter2;\n if (\"undefined\" !== typeof module) {\n module.exports = EventEmitter2;\n }\n }\n });\n\n // src/lib/lit-actions/self-executing-actions/solana/generateEncryptedSolanaPrivateKey.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/lit-actions/litActionHandler.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/lit-actions/abortError.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var AbortError = class extends Error {\n name = \"AbortError\";\n };\n\n // src/lib/lit-actions/litActionHandler.ts\n async function litActionHandler(actionFunc) {\n try {\n const litActionResult = await actionFunc();\n const response = typeof litActionResult === \"string\" ? litActionResult : JSON.stringify(litActionResult);\n Lit.Actions.setResponse({ response });\n } catch (err) {\n if (err instanceof AbortError) {\n return;\n }\n Lit.Actions.setResponse({ response: `Error: ${err.message}` });\n }\n }\n\n // src/lib/lit-actions/raw-action-functions/solana/generateEncryptedSolanaPrivateKey.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/lit-actions/internal/common/encryptPrivateKey.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // src/lib/constants.ts\n init_dirname();\n init_buffer2();\n init_process2();\n var LIT_PREFIX = \"lit_\";\n\n // src/lib/lit-actions/internal/common/encryptPrivateKey.ts\n async function encryptPrivateKey({\n evmContractConditions: evmContractConditions2,\n privateKey,\n publicKey: publicKey2\n }) {\n const { ciphertext, dataToEncryptHash } = await Lit.Actions.encrypt({\n accessControlConditions: evmContractConditions2,\n to_encrypt: new TextEncoder().encode(LIT_PREFIX + privateKey)\n });\n return {\n ciphertext,\n dataToEncryptHash,\n publicKey: publicKey2,\n evmContractConditions: evmContractConditions2\n };\n }\n\n // src/lib/lit-actions/internal/solana/generatePrivateKey.ts\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n init_dirname();\n init_buffer2();\n init_process2();\n init_buffer();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/ed25519.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/crypto.js\n init_dirname();\n init_buffer2();\n init_process2();\n var crypto2 = typeof globalThis === \"object\" && \"crypto\" in globalThis ? globalThis.crypto : void 0;\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js\n function isBytes(a) {\n return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === \"Uint8Array\";\n }\n function anumber(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(\"positive integer expected, got \" + n);\n }\n function abytes(b, ...lengths) {\n if (!isBytes(b))\n throw new Error(\"Uint8Array expected\");\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(\"Uint8Array expected of length \" + lengths + \", got length=\" + b.length);\n }\n function ahash(h) {\n if (typeof h !== \"function\" || typeof h.create !== \"function\")\n throw new Error(\"Hash should be wrapped by utils.createHasher\");\n anumber(h.outputLen);\n anumber(h.blockLen);\n }\n function aexists(instance2, checkFinished = true) {\n if (instance2.destroyed)\n throw new Error(\"Hash instance has been destroyed\");\n if (checkFinished && instance2.finished)\n throw new Error(\"Hash#digest() has already been called\");\n }\n function aoutput(out, instance2) {\n abytes(out);\n const min = instance2.outputLen;\n if (out.length < min) {\n throw new Error(\"digestInto() expects output buffer of length at least \" + min);\n }\n }\n function u32(arr) {\n return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n }\n function clean(...arrays) {\n for (let i = 0; i < arrays.length; i++) {\n arrays[i].fill(0);\n }\n }\n function createView(arr) {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n }\n function rotr(word, shift) {\n return word << 32 - shift | word >>> shift;\n }\n var isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();\n function byteSwap(word) {\n return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;\n }\n function byteSwap32(arr) {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = byteSwap(arr[i]);\n }\n return arr;\n }\n var swap32IfBE = isLE ? (u) => u : byteSwap32;\n var hasHexBuiltin = /* @__PURE__ */ (() => (\n // @ts-ignore\n typeof Uint8Array.from([]).toHex === \"function\" && typeof Uint8Array.fromHex === \"function\"\n ))();\n var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, \"0\"));\n function bytesToHex(bytes) {\n abytes(bytes);\n if (hasHexBuiltin)\n return bytes.toHex();\n let hex = \"\";\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n }\n var asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\n function asciiToBase16(ch) {\n if (ch >= asciis._0 && ch <= asciis._9)\n return ch - asciis._0;\n if (ch >= asciis.A && ch <= asciis.F)\n return ch - (asciis.A - 10);\n if (ch >= asciis.a && ch <= asciis.f)\n return ch - (asciis.a - 10);\n return;\n }\n function hexToBytes(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n if (hasHexBuiltin)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error(\"hex string expected, got unpadded hex of length \" + hl);\n const array2 = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === void 0 || n2 === void 0) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array2[ai] = n1 * 16 + n2;\n }\n return array2;\n }\n function utf8ToBytes(str) {\n if (typeof str !== \"string\")\n throw new Error(\"string expected\");\n return new Uint8Array(new TextEncoder().encode(str));\n }\n function toBytes(data) {\n if (typeof data === \"string\")\n data = utf8ToBytes(data);\n abytes(data);\n return data;\n }\n function concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n abytes(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n }\n var Hash = class {\n };\n function createHasher(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n }\n function randomBytes(bytesLength = 32) {\n if (crypto2 && typeof crypto2.getRandomValues === \"function\") {\n return crypto2.getRandomValues(new Uint8Array(bytesLength));\n }\n if (crypto2 && typeof crypto2.randomBytes === \"function\") {\n return Uint8Array.from(crypto2.randomBytes(bytesLength));\n }\n throw new Error(\"crypto.getRandomValues must be defined\");\n }\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js\n function setBigUint64(view, byteOffset, value, isLE2) {\n if (typeof view.setBigUint64 === \"function\")\n return view.setBigUint64(byteOffset, value, isLE2);\n const _32n2 = BigInt(32);\n const _u32_max = BigInt(4294967295);\n const wh = Number(value >> _32n2 & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE2 ? 4 : 0;\n const l = isLE2 ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE2);\n view.setUint32(byteOffset + l, wl, isLE2);\n }\n function Chi(a, b, c) {\n return a & b ^ ~a & c;\n }\n function Maj(a, b, c) {\n return a & b ^ a & c ^ b & c;\n }\n var HashMD = class extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE2) {\n super();\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE2;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n aexists(this);\n data = toBytes(data);\n abytes(data);\n const { view, buffer, blockLen } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n aexists(this);\n aoutput(out, this);\n this.finished = true;\n const { buffer, view, blockLen, isLE: isLE2 } = this;\n let { pos } = this;\n buffer[pos++] = 128;\n clean(this.buffer.subarray(pos));\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE2);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n if (len % 4)\n throw new Error(\"_sha2: outputLen should be aligned to 32bit\");\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error(\"_sha2: outputLen bigger than state\");\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE2);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.destroyed = destroyed;\n to.finished = finished;\n to.length = length;\n to.pos = pos;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n };\n var SHA256_IV = /* @__PURE__ */ Uint32Array.from([\n 1779033703,\n 3144134277,\n 1013904242,\n 2773480762,\n 1359893119,\n 2600822924,\n 528734635,\n 1541459225\n ]);\n var SHA512_IV = /* @__PURE__ */ Uint32Array.from([\n 1779033703,\n 4089235720,\n 3144134277,\n 2227873595,\n 1013904242,\n 4271175723,\n 2773480762,\n 1595750129,\n 1359893119,\n 2917565137,\n 2600822924,\n 725511199,\n 528734635,\n 4215389547,\n 1541459225,\n 327033209\n ]);\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js\n init_dirname();\n init_buffer2();\n init_process2();\n var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\n var _32n = /* @__PURE__ */ BigInt(32);\n function fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };\n return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n }\n function split(lst, le = false) {\n const len = lst.length;\n let Ah = new Uint32Array(len);\n let Al = new Uint32Array(len);\n for (let i = 0; i < len; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n }\n var shrSH = (h, _l, s) => h >>> s;\n var shrSL = (h, l, s) => h << 32 - s | l >>> s;\n var rotrSH = (h, l, s) => h >>> s | l << 32 - s;\n var rotrSL = (h, l, s) => h << 32 - s | l >>> s;\n var rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;\n var rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;\n var rotlSH = (h, l, s) => h << s | l >>> 32 - s;\n var rotlSL = (h, l, s) => l << s | h >>> 32 - s;\n var rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;\n var rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;\n function add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: Ah + Bh + (l / 2 ** 32 | 0) | 0, l: l | 0 };\n }\n var add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\n var add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;\n var add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\n var add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;\n var add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\n var add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js\n var SHA256_K = /* @__PURE__ */ Uint32Array.from([\n 1116352408,\n 1899447441,\n 3049323471,\n 3921009573,\n 961987163,\n 1508970993,\n 2453635748,\n 2870763221,\n 3624381080,\n 310598401,\n 607225278,\n 1426881987,\n 1925078388,\n 2162078206,\n 2614888103,\n 3248222580,\n 3835390401,\n 4022224774,\n 264347078,\n 604807628,\n 770255983,\n 1249150122,\n 1555081692,\n 1996064986,\n 2554220882,\n 2821834349,\n 2952996808,\n 3210313671,\n 3336571891,\n 3584528711,\n 113926993,\n 338241895,\n 666307205,\n 773529912,\n 1294757372,\n 1396182291,\n 1695183700,\n 1986661051,\n 2177026350,\n 2456956037,\n 2730485921,\n 2820302411,\n 3259730800,\n 3345764771,\n 3516065817,\n 3600352804,\n 4094571909,\n 275423344,\n 430227734,\n 506948616,\n 659060556,\n 883997877,\n 958139571,\n 1322822218,\n 1537002063,\n 1747873779,\n 1955562222,\n 2024104815,\n 2227730452,\n 2361852424,\n 2428436474,\n 2756734187,\n 3204031479,\n 3329325298\n ]);\n var SHA256_W = /* @__PURE__ */ new Uint32Array(64);\n var SHA256 = class extends HashMD {\n constructor(outputLen = 32) {\n super(64, outputLen, 8, false);\n this.A = SHA256_IV[0] | 0;\n this.B = SHA256_IV[1] | 0;\n this.C = SHA256_IV[2] | 0;\n this.D = SHA256_IV[3] | 0;\n this.E = SHA256_IV[4] | 0;\n this.F = SHA256_IV[5] | 0;\n this.G = SHA256_IV[6] | 0;\n this.H = SHA256_IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset2) {\n for (let i = 0; i < 16; i++, offset2 += 4)\n SHA256_W[i] = view.getUint32(offset2, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ W15 >>> 3;\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ W2 >>> 10;\n SHA256_W[i] = s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16] | 0;\n }\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i] | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = sigma0 + Maj(A, B, C) | 0;\n H = G;\n G = F;\n F = E;\n E = D + T1 | 0;\n D = C;\n C = B;\n B = A;\n A = T1 + T2 | 0;\n }\n A = A + this.A | 0;\n B = B + this.B | 0;\n C = C + this.C | 0;\n D = D + this.D | 0;\n E = E + this.E | 0;\n F = F + this.F | 0;\n G = G + this.G | 0;\n H = H + this.H | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n clean(SHA256_W);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n clean(this.buffer);\n }\n };\n var K512 = /* @__PURE__ */ (() => split([\n \"0x428a2f98d728ae22\",\n \"0x7137449123ef65cd\",\n \"0xb5c0fbcfec4d3b2f\",\n \"0xe9b5dba58189dbbc\",\n \"0x3956c25bf348b538\",\n \"0x59f111f1b605d019\",\n \"0x923f82a4af194f9b\",\n \"0xab1c5ed5da6d8118\",\n \"0xd807aa98a3030242\",\n \"0x12835b0145706fbe\",\n \"0x243185be4ee4b28c\",\n \"0x550c7dc3d5ffb4e2\",\n \"0x72be5d74f27b896f\",\n \"0x80deb1fe3b1696b1\",\n \"0x9bdc06a725c71235\",\n \"0xc19bf174cf692694\",\n \"0xe49b69c19ef14ad2\",\n \"0xefbe4786384f25e3\",\n \"0x0fc19dc68b8cd5b5\",\n \"0x240ca1cc77ac9c65\",\n \"0x2de92c6f592b0275\",\n \"0x4a7484aa6ea6e483\",\n \"0x5cb0a9dcbd41fbd4\",\n \"0x76f988da831153b5\",\n \"0x983e5152ee66dfab\",\n \"0xa831c66d2db43210\",\n \"0xb00327c898fb213f\",\n \"0xbf597fc7beef0ee4\",\n \"0xc6e00bf33da88fc2\",\n \"0xd5a79147930aa725\",\n \"0x06ca6351e003826f\",\n \"0x142929670a0e6e70\",\n \"0x27b70a8546d22ffc\",\n \"0x2e1b21385c26c926\",\n \"0x4d2c6dfc5ac42aed\",\n \"0x53380d139d95b3df\",\n \"0x650a73548baf63de\",\n \"0x766a0abb3c77b2a8\",\n \"0x81c2c92e47edaee6\",\n \"0x92722c851482353b\",\n \"0xa2bfe8a14cf10364\",\n \"0xa81a664bbc423001\",\n \"0xc24b8b70d0f89791\",\n \"0xc76c51a30654be30\",\n \"0xd192e819d6ef5218\",\n \"0xd69906245565a910\",\n \"0xf40e35855771202a\",\n \"0x106aa07032bbd1b8\",\n \"0x19a4c116b8d2d0c8\",\n \"0x1e376c085141ab53\",\n \"0x2748774cdf8eeb99\",\n \"0x34b0bcb5e19b48a8\",\n \"0x391c0cb3c5c95a63\",\n \"0x4ed8aa4ae3418acb\",\n \"0x5b9cca4f7763e373\",\n \"0x682e6ff3d6b2b8a3\",\n \"0x748f82ee5defb2fc\",\n \"0x78a5636f43172f60\",\n \"0x84c87814a1f0ab72\",\n \"0x8cc702081a6439ec\",\n \"0x90befffa23631e28\",\n \"0xa4506cebde82bde9\",\n \"0xbef9a3f7b2c67915\",\n \"0xc67178f2e372532b\",\n \"0xca273eceea26619c\",\n \"0xd186b8c721c0c207\",\n \"0xeada7dd6cde0eb1e\",\n \"0xf57d4f7fee6ed178\",\n \"0x06f067aa72176fba\",\n \"0x0a637dc5a2c898a6\",\n \"0x113f9804bef90dae\",\n \"0x1b710b35131c471b\",\n \"0x28db77f523047d84\",\n \"0x32caab7b40c72493\",\n \"0x3c9ebe0a15c9bebc\",\n \"0x431d67c49c100d4c\",\n \"0x4cc5d4becb3e42b6\",\n \"0x597f299cfc657e2a\",\n \"0x5fcb6fab3ad6faec\",\n \"0x6c44198c4a475817\"\n ].map((n) => BigInt(n))))();\n var SHA512_Kh = /* @__PURE__ */ (() => K512[0])();\n var SHA512_Kl = /* @__PURE__ */ (() => K512[1])();\n var SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);\n var SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);\n var SHA512 = class extends HashMD {\n constructor(outputLen = 64) {\n super(128, outputLen, 16, false);\n this.Ah = SHA512_IV[0] | 0;\n this.Al = SHA512_IV[1] | 0;\n this.Bh = SHA512_IV[2] | 0;\n this.Bl = SHA512_IV[3] | 0;\n this.Ch = SHA512_IV[4] | 0;\n this.Cl = SHA512_IV[5] | 0;\n this.Dh = SHA512_IV[6] | 0;\n this.Dl = SHA512_IV[7] | 0;\n this.Eh = SHA512_IV[8] | 0;\n this.El = SHA512_IV[9] | 0;\n this.Fh = SHA512_IV[10] | 0;\n this.Fl = SHA512_IV[11] | 0;\n this.Gh = SHA512_IV[12] | 0;\n this.Gl = SHA512_IV[13] | 0;\n this.Hh = SHA512_IV[14] | 0;\n this.Hl = SHA512_IV[15] | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset2) {\n for (let i = 0; i < 16; i++, offset2 += 4) {\n SHA512_W_H[i] = view.getUint32(offset2);\n SHA512_W_L[i] = view.getUint32(offset2 += 4);\n }\n for (let i = 16; i < 80; i++) {\n const W15h = SHA512_W_H[i - 15] | 0;\n const W15l = SHA512_W_L[i - 15] | 0;\n const s0h = rotrSH(W15h, W15l, 1) ^ rotrSH(W15h, W15l, 8) ^ shrSH(W15h, W15l, 7);\n const s0l = rotrSL(W15h, W15l, 1) ^ rotrSL(W15h, W15l, 8) ^ shrSL(W15h, W15l, 7);\n const W2h = SHA512_W_H[i - 2] | 0;\n const W2l = SHA512_W_L[i - 2] | 0;\n const s1h = rotrSH(W2h, W2l, 19) ^ rotrBH(W2h, W2l, 61) ^ shrSH(W2h, W2l, 6);\n const s1l = rotrSL(W2h, W2l, 19) ^ rotrBL(W2h, W2l, 61) ^ shrSL(W2h, W2l, 6);\n const SUMl = add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);\n const SUMh = add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);\n SHA512_W_H[i] = SUMh | 0;\n SHA512_W_L[i] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n for (let i = 0; i < 80; i++) {\n const sigma1h = rotrSH(Eh, El, 14) ^ rotrSH(Eh, El, 18) ^ rotrBH(Eh, El, 41);\n const sigma1l = rotrSL(Eh, El, 14) ^ rotrSL(Eh, El, 18) ^ rotrBL(Eh, El, 41);\n const CHIh = Eh & Fh ^ ~Eh & Gh;\n const CHIl = El & Fl ^ ~El & Gl;\n const T1ll = add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);\n const T1h = add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);\n const T1l = T1ll | 0;\n const sigma0h = rotrSH(Ah, Al, 28) ^ rotrBH(Ah, Al, 34) ^ rotrBH(Ah, Al, 39);\n const sigma0l = rotrSL(Ah, Al, 28) ^ rotrBL(Ah, Al, 34) ^ rotrBL(Ah, Al, 39);\n const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;\n const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = add3L(T1l, sigma0l, MAJl);\n Ah = add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n ({ h: Ah, l: Al } = add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n clean(SHA512_W_H, SHA512_W_L);\n }\n destroy() {\n clean(this.buffer);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n };\n var sha256 = /* @__PURE__ */ createHasher(() => new SHA256());\n var sha512 = /* @__PURE__ */ createHasher(() => new SHA512());\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/curve.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/utils.js\n init_dirname();\n init_buffer2();\n init_process2();\n var _0n = /* @__PURE__ */ BigInt(0);\n var _1n = /* @__PURE__ */ BigInt(1);\n function _abool2(value, title = \"\") {\n if (typeof value !== \"boolean\") {\n const prefix = title && `\"${title}\"`;\n throw new Error(prefix + \"expected boolean, got type=\" + typeof value);\n }\n return value;\n }\n function _abytes2(value, length, title = \"\") {\n const bytes = isBytes(value);\n const len = value?.length;\n const needsLen = length !== void 0;\n if (!bytes || needsLen && len !== length) {\n const prefix = title && `\"${title}\" `;\n const ofLen = needsLen ? ` of length ${length}` : \"\";\n const got = bytes ? `length=${len}` : `type=${typeof value}`;\n throw new Error(prefix + \"expected Uint8Array\" + ofLen + \", got \" + got);\n }\n return value;\n }\n function numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? \"0\" + hex : hex;\n }\n function hexToNumber(hex) {\n if (typeof hex !== \"string\")\n throw new Error(\"hex string expected, got \" + typeof hex);\n return hex === \"\" ? _0n : BigInt(\"0x\" + hex);\n }\n function bytesToNumberBE(bytes) {\n return hexToNumber(bytesToHex(bytes));\n }\n function bytesToNumberLE(bytes) {\n abytes(bytes);\n return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));\n }\n function numberToBytesBE(n, len) {\n return hexToBytes(n.toString(16).padStart(len * 2, \"0\"));\n }\n function numberToBytesLE(n, len) {\n return numberToBytesBE(n, len).reverse();\n }\n function ensureBytes(title, hex, expectedLength) {\n let res;\n if (typeof hex === \"string\") {\n try {\n res = hexToBytes(hex);\n } catch (e) {\n throw new Error(title + \" must be hex string or Uint8Array, cause: \" + e);\n }\n } else if (isBytes(hex)) {\n res = Uint8Array.from(hex);\n } else {\n throw new Error(title + \" must be hex string or Uint8Array\");\n }\n const len = res.length;\n if (typeof expectedLength === \"number\" && len !== expectedLength)\n throw new Error(title + \" of length \" + expectedLength + \" expected, got \" + len);\n return res;\n }\n function equalBytes(a, b) {\n if (a.length !== b.length)\n return false;\n let diff = 0;\n for (let i = 0; i < a.length; i++)\n diff |= a[i] ^ b[i];\n return diff === 0;\n }\n function copyBytes(bytes) {\n return Uint8Array.from(bytes);\n }\n var isPosBig = (n) => typeof n === \"bigint\" && _0n <= n;\n function inRange(n, min, max) {\n return isPosBig(n) && isPosBig(min) && isPosBig(max) && min <= n && n < max;\n }\n function aInRange(title, n, min, max) {\n if (!inRange(n, min, max))\n throw new Error(\"expected valid \" + title + \": \" + min + \" <= n < \" + max + \", got \" + n);\n }\n function bitLen(n) {\n let len;\n for (len = 0; n > _0n; n >>= _1n, len += 1)\n ;\n return len;\n }\n var bitMask = (n) => (_1n << BigInt(n)) - _1n;\n function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== \"number\" || hashLen < 2)\n throw new Error(\"hashLen must be a number\");\n if (typeof qByteLen !== \"number\" || qByteLen < 2)\n throw new Error(\"qByteLen must be a number\");\n if (typeof hmacFn !== \"function\")\n throw new Error(\"hmacFn must be a function\");\n const u8n = (len) => new Uint8Array(len);\n const u8of = (byte) => Uint8Array.of(byte);\n let v = u8n(hashLen);\n let k = u8n(hashLen);\n let i = 0;\n const reset = () => {\n v.fill(1);\n k.fill(0);\n i = 0;\n };\n const h = (...b) => hmacFn(k, v, ...b);\n const reseed = (seed = u8n(0)) => {\n k = h(u8of(0), seed);\n v = h();\n if (seed.length === 0)\n return;\n k = h(u8of(1), seed);\n v = h();\n };\n const gen2 = () => {\n if (i++ >= 1e3)\n throw new Error(\"drbg: tried 1000 values\");\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v = h();\n const sl = v.slice();\n out.push(sl);\n len += v.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed);\n let res = void 0;\n while (!(res = pred(gen2())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n }\n function _validateObject(object, fields, optFields = {}) {\n if (!object || typeof object !== \"object\")\n throw new Error(\"expected valid options object\");\n function checkField(fieldName, expectedType, isOpt) {\n const val = object[fieldName];\n if (isOpt && val === void 0)\n return;\n const current = typeof val;\n if (current !== expectedType || val === null)\n throw new Error(`param \"${fieldName}\" is invalid: expected ${expectedType}, got ${current}`);\n }\n Object.entries(fields).forEach(([k, v]) => checkField(k, v, false));\n Object.entries(optFields).forEach(([k, v]) => checkField(k, v, true));\n }\n var notImplemented = () => {\n throw new Error(\"not implemented\");\n };\n function memoized(fn) {\n const map = /* @__PURE__ */ new WeakMap();\n return (arg, ...args) => {\n const val = map.get(arg);\n if (val !== void 0)\n return val;\n const computed = fn(arg, ...args);\n map.set(arg, computed);\n return computed;\n };\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/modular.js\n init_dirname();\n init_buffer2();\n init_process2();\n var _0n2 = BigInt(0);\n var _1n2 = BigInt(1);\n var _2n = /* @__PURE__ */ BigInt(2);\n var _3n = /* @__PURE__ */ BigInt(3);\n var _4n = /* @__PURE__ */ BigInt(4);\n var _5n = /* @__PURE__ */ BigInt(5);\n var _7n = /* @__PURE__ */ BigInt(7);\n var _8n = /* @__PURE__ */ BigInt(8);\n var _9n = /* @__PURE__ */ BigInt(9);\n var _16n = /* @__PURE__ */ BigInt(16);\n function mod(a, b) {\n const result = a % b;\n return result >= _0n2 ? result : b + result;\n }\n function pow2(x, power, modulo) {\n let res = x;\n while (power-- > _0n2) {\n res *= res;\n res %= modulo;\n }\n return res;\n }\n function invert(number2, modulo) {\n if (number2 === _0n2)\n throw new Error(\"invert: expected non-zero number\");\n if (modulo <= _0n2)\n throw new Error(\"invert: expected positive modulus, got \" + modulo);\n let a = mod(number2, modulo);\n let b = modulo;\n let x = _0n2, y = _1n2, u = _1n2, v = _0n2;\n while (a !== _0n2) {\n const q = b / a;\n const r = b % a;\n const m = x - u * q;\n const n = y - v * q;\n b = a, a = r, x = u, y = v, u = m, v = n;\n }\n const gcd = b;\n if (gcd !== _1n2)\n throw new Error(\"invert: does not exist\");\n return mod(x, modulo);\n }\n function assertIsSquare(Fp2, root, n) {\n if (!Fp2.eql(Fp2.sqr(root), n))\n throw new Error(\"Cannot find square root\");\n }\n function sqrt3mod4(Fp2, n) {\n const p1div4 = (Fp2.ORDER + _1n2) / _4n;\n const root = Fp2.pow(n, p1div4);\n assertIsSquare(Fp2, root, n);\n return root;\n }\n function sqrt5mod8(Fp2, n) {\n const p5div8 = (Fp2.ORDER - _5n) / _8n;\n const n2 = Fp2.mul(n, _2n);\n const v = Fp2.pow(n2, p5div8);\n const nv = Fp2.mul(n, v);\n const i = Fp2.mul(Fp2.mul(nv, _2n), v);\n const root = Fp2.mul(nv, Fp2.sub(i, Fp2.ONE));\n assertIsSquare(Fp2, root, n);\n return root;\n }\n function sqrt9mod16(P) {\n const Fp_ = Field(P);\n const tn = tonelliShanks(P);\n const c1 = tn(Fp_, Fp_.neg(Fp_.ONE));\n const c2 = tn(Fp_, c1);\n const c3 = tn(Fp_, Fp_.neg(c1));\n const c4 = (P + _7n) / _16n;\n return (Fp2, n) => {\n let tv1 = Fp2.pow(n, c4);\n let tv2 = Fp2.mul(tv1, c1);\n const tv3 = Fp2.mul(tv1, c2);\n const tv4 = Fp2.mul(tv1, c3);\n const e1 = Fp2.eql(Fp2.sqr(tv2), n);\n const e2 = Fp2.eql(Fp2.sqr(tv3), n);\n tv1 = Fp2.cmov(tv1, tv2, e1);\n tv2 = Fp2.cmov(tv4, tv3, e2);\n const e3 = Fp2.eql(Fp2.sqr(tv2), n);\n const root = Fp2.cmov(tv1, tv2, e3);\n assertIsSquare(Fp2, root, n);\n return root;\n };\n }\n function tonelliShanks(P) {\n if (P < _3n)\n throw new Error(\"sqrt is not defined for small field\");\n let Q = P - _1n2;\n let S = 0;\n while (Q % _2n === _0n2) {\n Q /= _2n;\n S++;\n }\n let Z = _2n;\n const _Fp = Field(P);\n while (FpLegendre(_Fp, Z) === 1) {\n if (Z++ > 1e3)\n throw new Error(\"Cannot find square root: probably non-prime P\");\n }\n if (S === 1)\n return sqrt3mod4;\n let cc = _Fp.pow(Z, Q);\n const Q1div2 = (Q + _1n2) / _2n;\n return function tonelliSlow(Fp2, n) {\n if (Fp2.is0(n))\n return n;\n if (FpLegendre(Fp2, n) !== 1)\n throw new Error(\"Cannot find square root\");\n let M = S;\n let c = Fp2.mul(Fp2.ONE, cc);\n let t = Fp2.pow(n, Q);\n let R = Fp2.pow(n, Q1div2);\n while (!Fp2.eql(t, Fp2.ONE)) {\n if (Fp2.is0(t))\n return Fp2.ZERO;\n let i = 1;\n let t_tmp = Fp2.sqr(t);\n while (!Fp2.eql(t_tmp, Fp2.ONE)) {\n i++;\n t_tmp = Fp2.sqr(t_tmp);\n if (i === M)\n throw new Error(\"Cannot find square root\");\n }\n const exponent = _1n2 << BigInt(M - i - 1);\n const b = Fp2.pow(c, exponent);\n M = i;\n c = Fp2.sqr(b);\n t = Fp2.mul(t, c);\n R = Fp2.mul(R, b);\n }\n return R;\n };\n }\n function FpSqrt(P) {\n if (P % _4n === _3n)\n return sqrt3mod4;\n if (P % _8n === _5n)\n return sqrt5mod8;\n if (P % _16n === _9n)\n return sqrt9mod16(P);\n return tonelliShanks(P);\n }\n var isNegativeLE = (num, modulo) => (mod(num, modulo) & _1n2) === _1n2;\n var FIELD_FIELDS = [\n \"create\",\n \"isValid\",\n \"is0\",\n \"neg\",\n \"inv\",\n \"sqrt\",\n \"sqr\",\n \"eql\",\n \"add\",\n \"sub\",\n \"mul\",\n \"pow\",\n \"div\",\n \"addN\",\n \"subN\",\n \"mulN\",\n \"sqrN\"\n ];\n function validateField(field) {\n const initial = {\n ORDER: \"bigint\",\n MASK: \"bigint\",\n BYTES: \"number\",\n BITS: \"number\"\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = \"function\";\n return map;\n }, initial);\n _validateObject(field, opts);\n return field;\n }\n function FpPow(Fp2, num, power) {\n if (power < _0n2)\n throw new Error(\"invalid exponent, negatives unsupported\");\n if (power === _0n2)\n return Fp2.ONE;\n if (power === _1n2)\n return num;\n let p = Fp2.ONE;\n let d = num;\n while (power > _0n2) {\n if (power & _1n2)\n p = Fp2.mul(p, d);\n d = Fp2.sqr(d);\n power >>= _1n2;\n }\n return p;\n }\n function FpInvertBatch(Fp2, nums, passZero = false) {\n const inverted = new Array(nums.length).fill(passZero ? Fp2.ZERO : void 0);\n const multipliedAcc = nums.reduce((acc, num, i) => {\n if (Fp2.is0(num))\n return acc;\n inverted[i] = acc;\n return Fp2.mul(acc, num);\n }, Fp2.ONE);\n const invertedAcc = Fp2.inv(multipliedAcc);\n nums.reduceRight((acc, num, i) => {\n if (Fp2.is0(num))\n return acc;\n inverted[i] = Fp2.mul(acc, inverted[i]);\n return Fp2.mul(acc, num);\n }, invertedAcc);\n return inverted;\n }\n function FpLegendre(Fp2, n) {\n const p1mod2 = (Fp2.ORDER - _1n2) / _2n;\n const powered = Fp2.pow(n, p1mod2);\n const yes = Fp2.eql(powered, Fp2.ONE);\n const zero = Fp2.eql(powered, Fp2.ZERO);\n const no = Fp2.eql(powered, Fp2.neg(Fp2.ONE));\n if (!yes && !zero && !no)\n throw new Error(\"invalid Legendre symbol result\");\n return yes ? 1 : zero ? 0 : -1;\n }\n function nLength(n, nBitLength) {\n if (nBitLength !== void 0)\n anumber(nBitLength);\n const _nBitLength = nBitLength !== void 0 ? nBitLength : n.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n }\n function Field(ORDER, bitLenOrOpts, isLE2 = false, opts = {}) {\n if (ORDER <= _0n2)\n throw new Error(\"invalid field: expected ORDER > 0, got \" + ORDER);\n let _nbitLength = void 0;\n let _sqrt = void 0;\n let modFromBytes = false;\n let allowedLengths = void 0;\n if (typeof bitLenOrOpts === \"object\" && bitLenOrOpts != null) {\n if (opts.sqrt || isLE2)\n throw new Error(\"cannot specify opts in two arguments\");\n const _opts = bitLenOrOpts;\n if (_opts.BITS)\n _nbitLength = _opts.BITS;\n if (_opts.sqrt)\n _sqrt = _opts.sqrt;\n if (typeof _opts.isLE === \"boolean\")\n isLE2 = _opts.isLE;\n if (typeof _opts.modFromBytes === \"boolean\")\n modFromBytes = _opts.modFromBytes;\n allowedLengths = _opts.allowedLengths;\n } else {\n if (typeof bitLenOrOpts === \"number\")\n _nbitLength = bitLenOrOpts;\n if (opts.sqrt)\n _sqrt = opts.sqrt;\n }\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, _nbitLength);\n if (BYTES > 2048)\n throw new Error(\"invalid field: expected ORDER of <= 2048 bytes\");\n let sqrtP;\n const f2 = Object.freeze({\n ORDER,\n isLE: isLE2,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: _0n2,\n ONE: _1n2,\n allowedLengths,\n create: (num) => mod(num, ORDER),\n isValid: (num) => {\n if (typeof num !== \"bigint\")\n throw new Error(\"invalid field element: expected bigint, got \" + typeof num);\n return _0n2 <= num && num < ORDER;\n },\n is0: (num) => num === _0n2,\n // is valid and invertible\n isValidNot0: (num) => !f2.is0(num) && f2.isValid(num),\n isOdd: (num) => (num & _1n2) === _1n2,\n neg: (num) => mod(-num, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num) => mod(num * num, ORDER),\n add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n pow: (num, power) => FpPow(f2, num, power),\n div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num) => num * num,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num) => invert(num, ORDER),\n sqrt: _sqrt || ((n) => {\n if (!sqrtP)\n sqrtP = FpSqrt(ORDER);\n return sqrtP(f2, n);\n }),\n toBytes: (num) => isLE2 ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES),\n fromBytes: (bytes, skipValidation = true) => {\n if (allowedLengths) {\n if (!allowedLengths.includes(bytes.length) || bytes.length > BYTES) {\n throw new Error(\"Field.fromBytes: expected \" + allowedLengths + \" bytes, got \" + bytes.length);\n }\n const padded = new Uint8Array(BYTES);\n padded.set(bytes, isLE2 ? 0 : padded.length - bytes.length);\n bytes = padded;\n }\n if (bytes.length !== BYTES)\n throw new Error(\"Field.fromBytes: expected \" + BYTES + \" bytes, got \" + bytes.length);\n let scalar = isLE2 ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n if (modFromBytes)\n scalar = mod(scalar, ORDER);\n if (!skipValidation) {\n if (!f2.isValid(scalar))\n throw new Error(\"invalid field element: outside of range 0..ORDER\");\n }\n return scalar;\n },\n // TODO: we don't need it here, move out to separate fn\n invertBatch: (lst) => FpInvertBatch(f2, lst),\n // We can't move this out because Fp6, Fp12 implement it\n // and it's unclear what to return in there.\n cmov: (a, b, c) => c ? b : a\n });\n return Object.freeze(f2);\n }\n function getFieldBytesLength(fieldOrder) {\n if (typeof fieldOrder !== \"bigint\")\n throw new Error(\"field order must be bigint\");\n const bitLength = fieldOrder.toString(2).length;\n return Math.ceil(bitLength / 8);\n }\n function getMinHashLength(fieldOrder) {\n const length = getFieldBytesLength(fieldOrder);\n return length + Math.ceil(length / 2);\n }\n function mapHashToField(key, fieldOrder, isLE2 = false) {\n const len = key.length;\n const fieldLen = getFieldBytesLength(fieldOrder);\n const minLen = getMinHashLength(fieldOrder);\n if (len < 16 || len < minLen || len > 1024)\n throw new Error(\"expected \" + minLen + \"-1024 bytes of input, got \" + len);\n const num = isLE2 ? bytesToNumberLE(key) : bytesToNumberBE(key);\n const reduced = mod(num, fieldOrder - _1n2) + _1n2;\n return isLE2 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/curve.js\n var _0n3 = BigInt(0);\n var _1n3 = BigInt(1);\n function negateCt(condition, item) {\n const neg = item.negate();\n return condition ? neg : item;\n }\n function normalizeZ(c, points) {\n const invertedZs = FpInvertBatch(c.Fp, points.map((p) => p.Z));\n return points.map((p, i) => c.fromAffine(p.toAffine(invertedZs[i])));\n }\n function validateW(W, bits) {\n if (!Number.isSafeInteger(W) || W <= 0 || W > bits)\n throw new Error(\"invalid window size, expected [1..\" + bits + \"], got W=\" + W);\n }\n function calcWOpts(W, scalarBits) {\n validateW(W, scalarBits);\n const windows = Math.ceil(scalarBits / W) + 1;\n const windowSize = 2 ** (W - 1);\n const maxNumber = 2 ** W;\n const mask2 = bitMask(W);\n const shiftBy = BigInt(W);\n return { windows, windowSize, mask: mask2, maxNumber, shiftBy };\n }\n function calcOffsets(n, window2, wOpts) {\n const { windowSize, mask: mask2, maxNumber, shiftBy } = wOpts;\n let wbits = Number(n & mask2);\n let nextN = n >> shiftBy;\n if (wbits > windowSize) {\n wbits -= maxNumber;\n nextN += _1n3;\n }\n const offsetStart = window2 * windowSize;\n const offset2 = offsetStart + Math.abs(wbits) - 1;\n const isZero = wbits === 0;\n const isNeg = wbits < 0;\n const isNegF = window2 % 2 !== 0;\n const offsetF = offsetStart;\n return { nextN, offset: offset2, isZero, isNeg, isNegF, offsetF };\n }\n function validateMSMPoints(points, c) {\n if (!Array.isArray(points))\n throw new Error(\"array expected\");\n points.forEach((p, i) => {\n if (!(p instanceof c))\n throw new Error(\"invalid point at index \" + i);\n });\n }\n function validateMSMScalars(scalars, field) {\n if (!Array.isArray(scalars))\n throw new Error(\"array of scalars expected\");\n scalars.forEach((s, i) => {\n if (!field.isValid(s))\n throw new Error(\"invalid scalar at index \" + i);\n });\n }\n var pointPrecomputes = /* @__PURE__ */ new WeakMap();\n var pointWindowSizes = /* @__PURE__ */ new WeakMap();\n function getW(P) {\n return pointWindowSizes.get(P) || 1;\n }\n function assert0(n) {\n if (n !== _0n3)\n throw new Error(\"invalid wNAF\");\n }\n var wNAF = class {\n // Parametrized with a given Point class (not individual point)\n constructor(Point, bits) {\n this.BASE = Point.BASE;\n this.ZERO = Point.ZERO;\n this.Fn = Point.Fn;\n this.bits = bits;\n }\n // non-const time multiplication ladder\n _unsafeLadder(elm, n, p = this.ZERO) {\n let d = elm;\n while (n > _0n3) {\n if (n & _1n3)\n p = p.add(d);\n d = d.double();\n n >>= _1n3;\n }\n return p;\n }\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @param point Point instance\n * @param W window size\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(point, W) {\n const { windows, windowSize } = calcWOpts(W, this.bits);\n const points = [];\n let p = point;\n let base = p;\n for (let window2 = 0; window2 < windows; window2++) {\n base = p;\n points.push(base);\n for (let i = 1; i < windowSize; i++) {\n base = base.add(p);\n points.push(base);\n }\n p = base.double();\n }\n return points;\n }\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * More compact implementation:\n * https://github.com/paulmillr/noble-secp256k1/blob/47cb1669b6e506ad66b35fe7d76132ae97465da2/index.ts#L502-L541\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n) {\n if (!this.Fn.isValid(n))\n throw new Error(\"invalid scalar\");\n let p = this.ZERO;\n let f2 = this.BASE;\n const wo = calcWOpts(W, this.bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n const { nextN, offset: offset2, isZero, isNeg, isNegF, offsetF } = calcOffsets(n, window2, wo);\n n = nextN;\n if (isZero) {\n f2 = f2.add(negateCt(isNegF, precomputes[offsetF]));\n } else {\n p = p.add(negateCt(isNeg, precomputes[offset2]));\n }\n }\n assert0(n);\n return { p, f: f2 };\n }\n /**\n * Implements ec unsafe (non const-time) multiplication using precomputed tables and w-ary non-adjacent form.\n * @param acc accumulator point to add result of multiplication\n * @returns point\n */\n wNAFUnsafe(W, precomputes, n, acc = this.ZERO) {\n const wo = calcWOpts(W, this.bits);\n for (let window2 = 0; window2 < wo.windows; window2++) {\n if (n === _0n3)\n break;\n const { nextN, offset: offset2, isZero, isNeg } = calcOffsets(n, window2, wo);\n n = nextN;\n if (isZero) {\n continue;\n } else {\n const item = precomputes[offset2];\n acc = acc.add(isNeg ? item.negate() : item);\n }\n }\n assert0(n);\n return acc;\n }\n getPrecomputes(W, point, transform) {\n let comp = pointPrecomputes.get(point);\n if (!comp) {\n comp = this.precomputeWindow(point, W);\n if (W !== 1) {\n if (typeof transform === \"function\")\n comp = transform(comp);\n pointPrecomputes.set(point, comp);\n }\n }\n return comp;\n }\n cached(point, scalar, transform) {\n const W = getW(point);\n return this.wNAF(W, this.getPrecomputes(W, point, transform), scalar);\n }\n unsafe(point, scalar, transform, prev) {\n const W = getW(point);\n if (W === 1)\n return this._unsafeLadder(point, scalar, prev);\n return this.wNAFUnsafe(W, this.getPrecomputes(W, point, transform), scalar, prev);\n }\n // We calculate precomputes for elliptic curve point multiplication\n // using windowed method. This specifies window size and\n // stores precomputed values. Usually only base point would be precomputed.\n createCache(P, W) {\n validateW(W, this.bits);\n pointWindowSizes.set(P, W);\n pointPrecomputes.delete(P);\n }\n hasCache(elm) {\n return getW(elm) !== 1;\n }\n };\n function mulEndoUnsafe(Point, point, k1, k2) {\n let acc = point;\n let p1 = Point.ZERO;\n let p2 = Point.ZERO;\n while (k1 > _0n3 || k2 > _0n3) {\n if (k1 & _1n3)\n p1 = p1.add(acc);\n if (k2 & _1n3)\n p2 = p2.add(acc);\n acc = acc.double();\n k1 >>= _1n3;\n k2 >>= _1n3;\n }\n return { p1, p2 };\n }\n function pippenger(c, fieldN, points, scalars) {\n validateMSMPoints(points, c);\n validateMSMScalars(scalars, fieldN);\n const plength = points.length;\n const slength = scalars.length;\n if (plength !== slength)\n throw new Error(\"arrays of points and scalars must have equal length\");\n const zero = c.ZERO;\n const wbits = bitLen(BigInt(plength));\n let windowSize = 1;\n if (wbits > 12)\n windowSize = wbits - 3;\n else if (wbits > 4)\n windowSize = wbits - 2;\n else if (wbits > 0)\n windowSize = 2;\n const MASK = bitMask(windowSize);\n const buckets = new Array(Number(MASK) + 1).fill(zero);\n const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;\n let sum = zero;\n for (let i = lastBits; i >= 0; i -= windowSize) {\n buckets.fill(zero);\n for (let j = 0; j < slength; j++) {\n const scalar = scalars[j];\n const wbits2 = Number(scalar >> BigInt(i) & MASK);\n buckets[wbits2] = buckets[wbits2].add(points[j]);\n }\n let resI = zero;\n for (let j = buckets.length - 1, sumI = zero; j > 0; j--) {\n sumI = sumI.add(buckets[j]);\n resI = resI.add(sumI);\n }\n sum = sum.add(resI);\n if (i !== 0)\n for (let j = 0; j < windowSize; j++)\n sum = sum.double();\n }\n return sum;\n }\n function createField(order, field, isLE2) {\n if (field) {\n if (field.ORDER !== order)\n throw new Error(\"Field.ORDER must match order: Fp == p, Fn == n\");\n validateField(field);\n return field;\n } else {\n return Field(order, { isLE: isLE2 });\n }\n }\n function _createCurveFields(type2, CURVE, curveOpts = {}, FpFnLE) {\n if (FpFnLE === void 0)\n FpFnLE = type2 === \"edwards\";\n if (!CURVE || typeof CURVE !== \"object\")\n throw new Error(`expected valid ${type2} CURVE object`);\n for (const p of [\"p\", \"n\", \"h\"]) {\n const val = CURVE[p];\n if (!(typeof val === \"bigint\" && val > _0n3))\n throw new Error(`CURVE.${p} must be positive bigint`);\n }\n const Fp2 = createField(CURVE.p, curveOpts.Fp, FpFnLE);\n const Fn2 = createField(CURVE.n, curveOpts.Fn, FpFnLE);\n const _b = type2 === \"weierstrass\" ? \"b\" : \"d\";\n const params = [\"Gx\", \"Gy\", \"a\", _b];\n for (const p of params) {\n if (!Fp2.isValid(CURVE[p]))\n throw new Error(`CURVE.${p} must be valid field element of CURVE.Fp`);\n }\n CURVE = Object.freeze(Object.assign({}, CURVE));\n return { CURVE, Fp: Fp2, Fn: Fn2 };\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/edwards.js\n init_dirname();\n init_buffer2();\n init_process2();\n var _0n4 = BigInt(0);\n var _1n4 = BigInt(1);\n var _2n2 = BigInt(2);\n var _8n2 = BigInt(8);\n function isEdValidXY(Fp2, CURVE, x, y) {\n const x2 = Fp2.sqr(x);\n const y2 = Fp2.sqr(y);\n const left = Fp2.add(Fp2.mul(CURVE.a, x2), y2);\n const right = Fp2.add(Fp2.ONE, Fp2.mul(CURVE.d, Fp2.mul(x2, y2)));\n return Fp2.eql(left, right);\n }\n function edwards(params, extraOpts = {}) {\n const validated = _createCurveFields(\"edwards\", params, extraOpts, extraOpts.FpFnLE);\n const { Fp: Fp2, Fn: Fn2 } = validated;\n let CURVE = validated.CURVE;\n const { h: cofactor } = CURVE;\n _validateObject(extraOpts, {}, { uvRatio: \"function\" });\n const MASK = _2n2 << BigInt(Fn2.BYTES * 8) - _1n4;\n const modP = (n) => Fp2.create(n);\n const uvRatio2 = extraOpts.uvRatio || ((u, v) => {\n try {\n return { isValid: true, value: Fp2.sqrt(Fp2.div(u, v)) };\n } catch (e) {\n return { isValid: false, value: _0n4 };\n }\n });\n if (!isEdValidXY(Fp2, CURVE, CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n function acoord(title, n, banZero = false) {\n const min = banZero ? _1n4 : _0n4;\n aInRange(\"coordinate \" + title, n, min, MASK);\n return n;\n }\n function aextpoint(other) {\n if (!(other instanceof Point))\n throw new Error(\"ExtendedPoint expected\");\n }\n const toAffineMemo = memoized((p, iz) => {\n const { X, Y, Z } = p;\n const is0 = p.is0();\n if (iz == null)\n iz = is0 ? _8n2 : Fp2.inv(Z);\n const x = modP(X * iz);\n const y = modP(Y * iz);\n const zz = Fp2.mul(Z, iz);\n if (is0)\n return { x: _0n4, y: _1n4 };\n if (zz !== _1n4)\n throw new Error(\"invZ was invalid\");\n return { x, y };\n });\n const assertValidMemo = memoized((p) => {\n const { a, d } = CURVE;\n if (p.is0())\n throw new Error(\"bad point: ZERO\");\n const { X, Y, Z, T } = p;\n const X2 = modP(X * X);\n const Y2 = modP(Y * Y);\n const Z2 = modP(Z * Z);\n const Z4 = modP(Z2 * Z2);\n const aX2 = modP(X2 * a);\n const left = modP(Z2 * modP(aX2 + Y2));\n const right = modP(Z4 + modP(d * modP(X2 * Y2)));\n if (left !== right)\n throw new Error(\"bad point: equation left != right (1)\");\n const XY = modP(X * Y);\n const ZT = modP(Z * T);\n if (XY !== ZT)\n throw new Error(\"bad point: equation left != right (2)\");\n return true;\n });\n class Point {\n constructor(X, Y, Z, T) {\n this.X = acoord(\"x\", X);\n this.Y = acoord(\"y\", Y);\n this.Z = acoord(\"z\", Z, true);\n this.T = acoord(\"t\", T);\n Object.freeze(this);\n }\n static CURVE() {\n return CURVE;\n }\n static fromAffine(p) {\n if (p instanceof Point)\n throw new Error(\"extended point not allowed\");\n const { x, y } = p || {};\n acoord(\"x\", x);\n acoord(\"y\", y);\n return new Point(x, y, _1n4, modP(x * y));\n }\n // Uses algo from RFC8032 5.1.3.\n static fromBytes(bytes, zip215 = false) {\n const len = Fp2.BYTES;\n const { a, d } = CURVE;\n bytes = copyBytes(_abytes2(bytes, len, \"point\"));\n _abool2(zip215, \"zip215\");\n const normed = copyBytes(bytes);\n const lastByte = bytes[len - 1];\n normed[len - 1] = lastByte & ~128;\n const y = bytesToNumberLE(normed);\n const max = zip215 ? MASK : Fp2.ORDER;\n aInRange(\"point.y\", y, _0n4, max);\n const y2 = modP(y * y);\n const u = modP(y2 - _1n4);\n const v = modP(d * y2 - a);\n let { isValid, value: x } = uvRatio2(u, v);\n if (!isValid)\n throw new Error(\"bad point: invalid y coordinate\");\n const isXOdd = (x & _1n4) === _1n4;\n const isLastByteOdd = (lastByte & 128) !== 0;\n if (!zip215 && x === _0n4 && isLastByteOdd)\n throw new Error(\"bad point: x=0 and x_0=1\");\n if (isLastByteOdd !== isXOdd)\n x = modP(-x);\n return Point.fromAffine({ x, y });\n }\n static fromHex(bytes, zip215 = false) {\n return Point.fromBytes(ensureBytes(\"point\", bytes), zip215);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n precompute(windowSize = 8, isLazy = true) {\n wnaf.createCache(this, windowSize);\n if (!isLazy)\n this.multiply(_2n2);\n return this;\n }\n // Useful in fromAffine() - not for fromBytes(), which always created valid points.\n assertValidity() {\n assertValidMemo(this);\n }\n // Compare one point to another.\n equals(other) {\n aextpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n const X1Z2 = modP(X1 * Z2);\n const X2Z1 = modP(X2 * Z1);\n const Y1Z2 = modP(Y1 * Z2);\n const Y2Z1 = modP(Y2 * Z1);\n return X1Z2 === X2Z1 && Y1Z2 === Y2Z1;\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n negate() {\n return new Point(modP(-this.X), this.Y, this.Z, modP(-this.T));\n }\n // Fast algo for doubling Extended Point.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd\n // Cost: 4M + 4S + 1*a + 6add + 1*2.\n double() {\n const { a } = CURVE;\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const A = modP(X1 * X1);\n const B = modP(Y1 * Y1);\n const C = modP(_2n2 * modP(Z1 * Z1));\n const D = modP(a * A);\n const x1y1 = X1 + Y1;\n const E = modP(modP(x1y1 * x1y1) - A - B);\n const G = D + B;\n const F = G - C;\n const H = D - B;\n const X3 = modP(E * F);\n const Y3 = modP(G * H);\n const T3 = modP(E * H);\n const Z3 = modP(F * G);\n return new Point(X3, Y3, Z3, T3);\n }\n // Fast algo for adding 2 Extended Points.\n // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#addition-add-2008-hwcd\n // Cost: 9M + 1*a + 1*d + 7add.\n add(other) {\n aextpoint(other);\n const { a, d } = CURVE;\n const { X: X1, Y: Y1, Z: Z1, T: T1 } = this;\n const { X: X2, Y: Y2, Z: Z2, T: T2 } = other;\n const A = modP(X1 * X2);\n const B = modP(Y1 * Y2);\n const C = modP(T1 * d * T2);\n const D = modP(Z1 * Z2);\n const E = modP((X1 + Y1) * (X2 + Y2) - A - B);\n const F = D - C;\n const G = D + C;\n const H = modP(B - a * A);\n const X3 = modP(E * F);\n const Y3 = modP(G * H);\n const T3 = modP(E * H);\n const Z3 = modP(F * G);\n return new Point(X3, Y3, Z3, T3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n // Constant-time multiplication.\n multiply(scalar) {\n if (!Fn2.isValidNot0(scalar))\n throw new Error(\"invalid scalar: expected 1 <= sc < curve.n\");\n const { p, f: f2 } = wnaf.cached(this, scalar, (p2) => normalizeZ(Point, p2));\n return normalizeZ(Point, [p, f2])[0];\n }\n // Non-constant-time multiplication. Uses double-and-add algorithm.\n // It's faster, but should only be used when you don't care about\n // an exposed private key e.g. sig verification.\n // Does NOT allow scalars higher than CURVE.n.\n // Accepts optional accumulator to merge with multiply (important for sparse scalars)\n multiplyUnsafe(scalar, acc = Point.ZERO) {\n if (!Fn2.isValid(scalar))\n throw new Error(\"invalid scalar: expected 0 <= sc < curve.n\");\n if (scalar === _0n4)\n return Point.ZERO;\n if (this.is0() || scalar === _1n4)\n return this;\n return wnaf.unsafe(this, scalar, (p) => normalizeZ(Point, p), acc);\n }\n // Checks if point is of small order.\n // If you add something to small order point, you will have \"dirty\"\n // point with torsion component.\n // Multiplies point by cofactor and checks if the result is 0.\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n // Multiplies point by curve order and checks if the result is 0.\n // Returns `false` is the point is dirty.\n isTorsionFree() {\n return wnaf.unsafe(this, CURVE.n).is0();\n }\n // Converts Extended point to default (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n toAffine(invertedZ) {\n return toAffineMemo(this, invertedZ);\n }\n clearCofactor() {\n if (cofactor === _1n4)\n return this;\n return this.multiplyUnsafe(cofactor);\n }\n toBytes() {\n const { x, y } = this.toAffine();\n const bytes = Fp2.toBytes(y);\n bytes[bytes.length - 1] |= x & _1n4 ? 128 : 0;\n return bytes;\n }\n toHex() {\n return bytesToHex(this.toBytes());\n }\n toString() {\n return ``;\n }\n // TODO: remove\n get ex() {\n return this.X;\n }\n get ey() {\n return this.Y;\n }\n get ez() {\n return this.Z;\n }\n get et() {\n return this.T;\n }\n static normalizeZ(points) {\n return normalizeZ(Point, points);\n }\n static msm(points, scalars) {\n return pippenger(Point, Fn2, points, scalars);\n }\n _setWindowSize(windowSize) {\n this.precompute(windowSize);\n }\n toRawBytes() {\n return this.toBytes();\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, _1n4, modP(CURVE.Gx * CURVE.Gy));\n Point.ZERO = new Point(_0n4, _1n4, _1n4, _0n4);\n Point.Fp = Fp2;\n Point.Fn = Fn2;\n const wnaf = new wNAF(Point, Fn2.BITS);\n Point.BASE.precompute(8);\n return Point;\n }\n var PrimeEdwardsPoint = class {\n constructor(ep) {\n this.ep = ep;\n }\n // Static methods that must be implemented by subclasses\n static fromBytes(_bytes) {\n notImplemented();\n }\n static fromHex(_hex) {\n notImplemented();\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n // Common implementations\n clearCofactor() {\n return this;\n }\n assertValidity() {\n this.ep.assertValidity();\n }\n toAffine(invertedZ) {\n return this.ep.toAffine(invertedZ);\n }\n toHex() {\n return bytesToHex(this.toBytes());\n }\n toString() {\n return this.toHex();\n }\n isTorsionFree() {\n return true;\n }\n isSmallOrder() {\n return false;\n }\n add(other) {\n this.assertSame(other);\n return this.init(this.ep.add(other.ep));\n }\n subtract(other) {\n this.assertSame(other);\n return this.init(this.ep.subtract(other.ep));\n }\n multiply(scalar) {\n return this.init(this.ep.multiply(scalar));\n }\n multiplyUnsafe(scalar) {\n return this.init(this.ep.multiplyUnsafe(scalar));\n }\n double() {\n return this.init(this.ep.double());\n }\n negate() {\n return this.init(this.ep.negate());\n }\n precompute(windowSize, isLazy) {\n return this.init(this.ep.precompute(windowSize, isLazy));\n }\n /** @deprecated use `toBytes` */\n toRawBytes() {\n return this.toBytes();\n }\n };\n function eddsa(Point, cHash, eddsaOpts = {}) {\n if (typeof cHash !== \"function\")\n throw new Error('\"hash\" function param is required');\n _validateObject(eddsaOpts, {}, {\n adjustScalarBytes: \"function\",\n randomBytes: \"function\",\n domain: \"function\",\n prehash: \"function\",\n mapToCurve: \"function\"\n });\n const { prehash } = eddsaOpts;\n const { BASE, Fp: Fp2, Fn: Fn2 } = Point;\n const randomBytes2 = eddsaOpts.randomBytes || randomBytes;\n const adjustScalarBytes2 = eddsaOpts.adjustScalarBytes || ((bytes) => bytes);\n const domain = eddsaOpts.domain || ((data, ctx, phflag) => {\n _abool2(phflag, \"phflag\");\n if (ctx.length || phflag)\n throw new Error(\"Contexts/pre-hash are not supported\");\n return data;\n });\n function modN_LE(hash) {\n return Fn2.create(bytesToNumberLE(hash));\n }\n function getPrivateScalar(key) {\n const len = lengths.secretKey;\n key = ensureBytes(\"private key\", key, len);\n const hashed = ensureBytes(\"hashed private key\", cHash(key), 2 * len);\n const head = adjustScalarBytes2(hashed.slice(0, len));\n const prefix = hashed.slice(len, 2 * len);\n const scalar = modN_LE(head);\n return { head, prefix, scalar };\n }\n function getExtendedPublicKey(secretKey) {\n const { head, prefix, scalar } = getPrivateScalar(secretKey);\n const point = BASE.multiply(scalar);\n const pointBytes = point.toBytes();\n return { head, prefix, scalar, point, pointBytes };\n }\n function getPublicKey2(secretKey) {\n return getExtendedPublicKey(secretKey).pointBytes;\n }\n function hashDomainToScalar(context = Uint8Array.of(), ...msgs) {\n const msg = concatBytes(...msgs);\n return modN_LE(cHash(domain(msg, ensureBytes(\"context\", context), !!prehash)));\n }\n function sign2(msg, secretKey, options = {}) {\n msg = ensureBytes(\"message\", msg);\n if (prehash)\n msg = prehash(msg);\n const { prefix, scalar, pointBytes } = getExtendedPublicKey(secretKey);\n const r = hashDomainToScalar(options.context, prefix, msg);\n const R = BASE.multiply(r).toBytes();\n const k = hashDomainToScalar(options.context, R, pointBytes, msg);\n const s = Fn2.create(r + k * scalar);\n if (!Fn2.isValid(s))\n throw new Error(\"sign failed: invalid s\");\n const rs = concatBytes(R, Fn2.toBytes(s));\n return _abytes2(rs, lengths.signature, \"result\");\n }\n const verifyOpts = { zip215: true };\n function verify2(sig, msg, publicKey2, options = verifyOpts) {\n const { context, zip215 } = options;\n const len = lengths.signature;\n sig = ensureBytes(\"signature\", sig, len);\n msg = ensureBytes(\"message\", msg);\n publicKey2 = ensureBytes(\"publicKey\", publicKey2, lengths.publicKey);\n if (zip215 !== void 0)\n _abool2(zip215, \"zip215\");\n if (prehash)\n msg = prehash(msg);\n const mid = len / 2;\n const r = sig.subarray(0, mid);\n const s = bytesToNumberLE(sig.subarray(mid, len));\n let A, R, SB;\n try {\n A = Point.fromBytes(publicKey2, zip215);\n R = Point.fromBytes(r, zip215);\n SB = BASE.multiplyUnsafe(s);\n } catch (error) {\n return false;\n }\n if (!zip215 && A.isSmallOrder())\n return false;\n const k = hashDomainToScalar(context, R.toBytes(), A.toBytes(), msg);\n const RkA = R.add(A.multiplyUnsafe(k));\n return RkA.subtract(SB).clearCofactor().is0();\n }\n const _size = Fp2.BYTES;\n const lengths = {\n secretKey: _size,\n publicKey: _size,\n signature: 2 * _size,\n seed: _size\n };\n function randomSecretKey(seed = randomBytes2(lengths.seed)) {\n return _abytes2(seed, lengths.seed, \"seed\");\n }\n function keygen(seed) {\n const secretKey = utils.randomSecretKey(seed);\n return { secretKey, publicKey: getPublicKey2(secretKey) };\n }\n function isValidSecretKey(key) {\n return isBytes(key) && key.length === Fn2.BYTES;\n }\n function isValidPublicKey(key, zip215) {\n try {\n return !!Point.fromBytes(key, zip215);\n } catch (error) {\n return false;\n }\n }\n const utils = {\n getExtendedPublicKey,\n randomSecretKey,\n isValidSecretKey,\n isValidPublicKey,\n /**\n * Converts ed public key to x public key. Uses formula:\n * - ed25519:\n * - `(u, v) = ((1+y)/(1-y), sqrt(-486664)*u/x)`\n * - `(x, y) = (sqrt(-486664)*u/v, (u-1)/(u+1))`\n * - ed448:\n * - `(u, v) = ((y-1)/(y+1), sqrt(156324)*u/x)`\n * - `(x, y) = (sqrt(156324)*u/v, (1+u)/(1-u))`\n */\n toMontgomery(publicKey2) {\n const { y } = Point.fromBytes(publicKey2);\n const size = lengths.publicKey;\n const is25519 = size === 32;\n if (!is25519 && size !== 57)\n throw new Error(\"only defined for 25519 and 448\");\n const u = is25519 ? Fp2.div(_1n4 + y, _1n4 - y) : Fp2.div(y - _1n4, y + _1n4);\n return Fp2.toBytes(u);\n },\n toMontgomerySecret(secretKey) {\n const size = lengths.secretKey;\n _abytes2(secretKey, size);\n const hashed = cHash(secretKey.subarray(0, size));\n return adjustScalarBytes2(hashed).subarray(0, size);\n },\n /** @deprecated */\n randomPrivateKey: randomSecretKey,\n /** @deprecated */\n precompute(windowSize = 8, point = Point.BASE) {\n return point.precompute(windowSize, false);\n }\n };\n return Object.freeze({\n keygen,\n getPublicKey: getPublicKey2,\n sign: sign2,\n verify: verify2,\n utils,\n Point,\n lengths\n });\n }\n function _eddsa_legacy_opts_to_new(c) {\n const CURVE = {\n a: c.a,\n d: c.d,\n p: c.Fp.ORDER,\n n: c.n,\n h: c.h,\n Gx: c.Gx,\n Gy: c.Gy\n };\n const Fp2 = c.Fp;\n const Fn2 = Field(CURVE.n, c.nBitLength, true);\n const curveOpts = { Fp: Fp2, Fn: Fn2, uvRatio: c.uvRatio };\n const eddsaOpts = {\n randomBytes: c.randomBytes,\n adjustScalarBytes: c.adjustScalarBytes,\n domain: c.domain,\n prehash: c.prehash,\n mapToCurve: c.mapToCurve\n };\n return { CURVE, curveOpts, hash: c.hash, eddsaOpts };\n }\n function _eddsa_new_output_to_legacy(c, eddsa2) {\n const Point = eddsa2.Point;\n const legacy = Object.assign({}, eddsa2, {\n ExtendedPoint: Point,\n CURVE: c,\n nBitLength: Point.Fn.BITS,\n nByteLength: Point.Fn.BYTES\n });\n return legacy;\n }\n function twistedEdwards(c) {\n const { CURVE, curveOpts, hash, eddsaOpts } = _eddsa_legacy_opts_to_new(c);\n const Point = edwards(CURVE, curveOpts);\n const EDDSA = eddsa(Point, hash, eddsaOpts);\n return _eddsa_new_output_to_legacy(c, EDDSA);\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/ed25519.js\n var _0n5 = /* @__PURE__ */ BigInt(0);\n var _1n5 = BigInt(1);\n var _2n3 = BigInt(2);\n var _3n2 = BigInt(3);\n var _5n2 = BigInt(5);\n var _8n3 = BigInt(8);\n var ed25519_CURVE_p = BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed\");\n var ed25519_CURVE = /* @__PURE__ */ (() => ({\n p: ed25519_CURVE_p,\n n: BigInt(\"0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed\"),\n h: _8n3,\n a: BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec\"),\n d: BigInt(\"0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3\"),\n Gx: BigInt(\"0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a\"),\n Gy: BigInt(\"0x6666666666666666666666666666666666666666666666666666666666666658\")\n }))();\n function ed25519_pow_2_252_3(x) {\n const _10n = BigInt(10), _20n = BigInt(20), _40n = BigInt(40), _80n = BigInt(80);\n const P = ed25519_CURVE_p;\n const x2 = x * x % P;\n const b2 = x2 * x % P;\n const b4 = pow2(b2, _2n3, P) * b2 % P;\n const b5 = pow2(b4, _1n5, P) * x % P;\n const b10 = pow2(b5, _5n2, P) * b5 % P;\n const b20 = pow2(b10, _10n, P) * b10 % P;\n const b40 = pow2(b20, _20n, P) * b20 % P;\n const b80 = pow2(b40, _40n, P) * b40 % P;\n const b160 = pow2(b80, _80n, P) * b80 % P;\n const b240 = pow2(b160, _80n, P) * b80 % P;\n const b250 = pow2(b240, _10n, P) * b10 % P;\n const pow_p_5_8 = pow2(b250, _2n3, P) * x % P;\n return { pow_p_5_8, b2 };\n }\n function adjustScalarBytes(bytes) {\n bytes[0] &= 248;\n bytes[31] &= 127;\n bytes[31] |= 64;\n return bytes;\n }\n var ED25519_SQRT_M1 = /* @__PURE__ */ BigInt(\"19681161376707505956807079304988542015446066515923890162744021073123829784752\");\n function uvRatio(u, v) {\n const P = ed25519_CURVE_p;\n const v32 = mod(v * v * v, P);\n const v7 = mod(v32 * v32 * v, P);\n const pow = ed25519_pow_2_252_3(u * v7).pow_p_5_8;\n let x = mod(u * v32 * pow, P);\n const vx2 = mod(v * x * x, P);\n const root1 = x;\n const root2 = mod(x * ED25519_SQRT_M1, P);\n const useRoot1 = vx2 === u;\n const useRoot2 = vx2 === mod(-u, P);\n const noRoot = vx2 === mod(-u * ED25519_SQRT_M1, P);\n if (useRoot1)\n x = root1;\n if (useRoot2 || noRoot)\n x = root2;\n if (isNegativeLE(x, P))\n x = mod(-x, P);\n return { isValid: useRoot1 || useRoot2, value: x };\n }\n var Fp = /* @__PURE__ */ (() => Field(ed25519_CURVE.p, { isLE: true }))();\n var Fn = /* @__PURE__ */ (() => Field(ed25519_CURVE.n, { isLE: true }))();\n var ed25519Defaults = /* @__PURE__ */ (() => ({\n ...ed25519_CURVE,\n Fp,\n hash: sha512,\n adjustScalarBytes,\n // dom2\n // Ratio of u to v. Allows us to combine inversion and square root. Uses algo from RFC8032 5.1.3.\n // Constant-time, u/√v\n uvRatio\n }))();\n var ed25519 = /* @__PURE__ */ (() => twistedEdwards(ed25519Defaults))();\n var SQRT_M1 = ED25519_SQRT_M1;\n var SQRT_AD_MINUS_ONE = /* @__PURE__ */ BigInt(\"25063068953384623474111414158702152701244531502492656460079210482610430750235\");\n var INVSQRT_A_MINUS_D = /* @__PURE__ */ BigInt(\"54469307008909316920995813868745141605393597292927456921205312896311721017578\");\n var ONE_MINUS_D_SQ = /* @__PURE__ */ BigInt(\"1159843021668779879193775521855586647937357759715417654439879720876111806838\");\n var D_MINUS_ONE_SQ = /* @__PURE__ */ BigInt(\"40440834346308536858101042469323190826248399146238708352240133220865137265952\");\n var invertSqrt = (number2) => uvRatio(_1n5, number2);\n var MAX_255B = /* @__PURE__ */ BigInt(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\n var bytes255ToNumberLE = (bytes) => ed25519.Point.Fp.create(bytesToNumberLE(bytes) & MAX_255B);\n function calcElligatorRistrettoMap(r0) {\n const { d } = ed25519_CURVE;\n const P = ed25519_CURVE_p;\n const mod2 = (n) => Fp.create(n);\n const r = mod2(SQRT_M1 * r0 * r0);\n const Ns = mod2((r + _1n5) * ONE_MINUS_D_SQ);\n let c = BigInt(-1);\n const D = mod2((c - d * r) * mod2(r + d));\n let { isValid: Ns_D_is_sq, value: s } = uvRatio(Ns, D);\n let s_ = mod2(s * r0);\n if (!isNegativeLE(s_, P))\n s_ = mod2(-s_);\n if (!Ns_D_is_sq)\n s = s_;\n if (!Ns_D_is_sq)\n c = r;\n const Nt = mod2(c * (r - _1n5) * D_MINUS_ONE_SQ - D);\n const s2 = s * s;\n const W0 = mod2((s + s) * D);\n const W1 = mod2(Nt * SQRT_AD_MINUS_ONE);\n const W2 = mod2(_1n5 - s2);\n const W3 = mod2(_1n5 + s2);\n return new ed25519.Point(mod2(W0 * W3), mod2(W2 * W1), mod2(W1 * W3), mod2(W0 * W2));\n }\n function ristretto255_map(bytes) {\n abytes(bytes, 64);\n const r1 = bytes255ToNumberLE(bytes.subarray(0, 32));\n const R1 = calcElligatorRistrettoMap(r1);\n const r2 = bytes255ToNumberLE(bytes.subarray(32, 64));\n const R2 = calcElligatorRistrettoMap(r2);\n return new _RistrettoPoint(R1.add(R2));\n }\n var _RistrettoPoint = class __RistrettoPoint extends PrimeEdwardsPoint {\n constructor(ep) {\n super(ep);\n }\n static fromAffine(ap) {\n return new __RistrettoPoint(ed25519.Point.fromAffine(ap));\n }\n assertSame(other) {\n if (!(other instanceof __RistrettoPoint))\n throw new Error(\"RistrettoPoint expected\");\n }\n init(ep) {\n return new __RistrettoPoint(ep);\n }\n /** @deprecated use `import { ristretto255_hasher } from '@noble/curves/ed25519.js';` */\n static hashToCurve(hex) {\n return ristretto255_map(ensureBytes(\"ristrettoHash\", hex, 64));\n }\n static fromBytes(bytes) {\n abytes(bytes, 32);\n const { a, d } = ed25519_CURVE;\n const P = ed25519_CURVE_p;\n const mod2 = (n) => Fp.create(n);\n const s = bytes255ToNumberLE(bytes);\n if (!equalBytes(Fp.toBytes(s), bytes) || isNegativeLE(s, P))\n throw new Error(\"invalid ristretto255 encoding 1\");\n const s2 = mod2(s * s);\n const u1 = mod2(_1n5 + a * s2);\n const u2 = mod2(_1n5 - a * s2);\n const u1_2 = mod2(u1 * u1);\n const u2_2 = mod2(u2 * u2);\n const v = mod2(a * d * u1_2 - u2_2);\n const { isValid, value: I } = invertSqrt(mod2(v * u2_2));\n const Dx = mod2(I * u2);\n const Dy = mod2(I * Dx * v);\n let x = mod2((s + s) * Dx);\n if (isNegativeLE(x, P))\n x = mod2(-x);\n const y = mod2(u1 * Dy);\n const t = mod2(x * y);\n if (!isValid || isNegativeLE(t, P) || y === _0n5)\n throw new Error(\"invalid ristretto255 encoding 2\");\n return new __RistrettoPoint(new ed25519.Point(x, y, _1n5, t));\n }\n /**\n * Converts ristretto-encoded string to ristretto point.\n * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-decode).\n * @param hex Ristretto-encoded 32 bytes. Not every 32-byte string is valid ristretto encoding\n */\n static fromHex(hex) {\n return __RistrettoPoint.fromBytes(ensureBytes(\"ristrettoHex\", hex, 32));\n }\n static msm(points, scalars) {\n return pippenger(__RistrettoPoint, ed25519.Point.Fn, points, scalars);\n }\n /**\n * Encodes ristretto point to Uint8Array.\n * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-encode).\n */\n toBytes() {\n let { X, Y, Z, T } = this.ep;\n const P = ed25519_CURVE_p;\n const mod2 = (n) => Fp.create(n);\n const u1 = mod2(mod2(Z + Y) * mod2(Z - Y));\n const u2 = mod2(X * Y);\n const u2sq = mod2(u2 * u2);\n const { value: invsqrt } = invertSqrt(mod2(u1 * u2sq));\n const D1 = mod2(invsqrt * u1);\n const D2 = mod2(invsqrt * u2);\n const zInv = mod2(D1 * D2 * T);\n let D;\n if (isNegativeLE(T * zInv, P)) {\n let _x = mod2(Y * SQRT_M1);\n let _y = mod2(X * SQRT_M1);\n X = _x;\n Y = _y;\n D = mod2(D1 * INVSQRT_A_MINUS_D);\n } else {\n D = D2;\n }\n if (isNegativeLE(X * zInv, P))\n Y = mod2(-Y);\n let s = mod2((Z - Y) * D);\n if (isNegativeLE(s, P))\n s = mod2(-s);\n return Fp.toBytes(s);\n }\n /**\n * Compares two Ristretto points.\n * Described in [RFC9496](https://www.rfc-editor.org/rfc/rfc9496#name-equals).\n */\n equals(other) {\n this.assertSame(other);\n const { X: X1, Y: Y1 } = this.ep;\n const { X: X2, Y: Y2 } = other.ep;\n const mod2 = (n) => Fp.create(n);\n const one = mod2(X1 * Y2) === mod2(Y1 * X2);\n const two = mod2(Y1 * Y2) === mod2(X1 * X2);\n return one || two;\n }\n is0() {\n return this.equals(__RistrettoPoint.ZERO);\n }\n };\n _RistrettoPoint.BASE = /* @__PURE__ */ (() => new _RistrettoPoint(ed25519.Point.BASE))();\n _RistrettoPoint.ZERO = /* @__PURE__ */ (() => new _RistrettoPoint(ed25519.Point.ZERO))();\n _RistrettoPoint.Fp = /* @__PURE__ */ (() => Fp)();\n _RistrettoPoint.Fn = /* @__PURE__ */ (() => Fn)();\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n var import_bn = __toESM(require_bn());\n var import_bs58 = __toESM(require_bs58());\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js\n init_dirname();\n init_buffer2();\n init_process2();\n var sha2562 = sha256;\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n var import_borsh = __toESM(require_lib());\n var BufferLayout = __toESM(require_Layout());\n var import_buffer_layout = __toESM(require_Layout());\n\n // ../../../node_modules/.pnpm/@solana+codecs-numbers@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-numbers/dist/index.browser.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@solana+errors@2.3.0_typescript@5.8.3/node_modules/@solana/errors/dist/index.browser.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n var SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED = 1;\n var SOLANA_ERROR__INVALID_NONCE = 2;\n var SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = 3;\n var SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE = 4;\n var SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH = 5;\n var SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE = 6;\n var SOLANA_ERROR__MALFORMED_BIGINT_STRING = 7;\n var SOLANA_ERROR__MALFORMED_NUMBER_STRING = 8;\n var SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE = 9;\n var SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR = 10;\n var SOLANA_ERROR__JSON_RPC__PARSE_ERROR = -32700;\n var SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR = -32603;\n var SOLANA_ERROR__JSON_RPC__INVALID_PARAMS = -32602;\n var SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND = -32601;\n var SOLANA_ERROR__JSON_RPC__INVALID_REQUEST = -32600;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED = -32016;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION = -32015;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET = -32014;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH = -32013;\n var SOLANA_ERROR__JSON_RPC__SCAN_ERROR = -32012;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE = -32011;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX = -32010;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED = -32009;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT = -32008;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED = -32007;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE = -32006;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY = -32005;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE = -32004;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE = -32003;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE = -32002;\n var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP = -32001;\n var SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH = 28e5;\n var SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE = 2800001;\n var SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS = 2800002;\n var SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY = 2800003;\n var SOLANA_ERROR__ADDRESSES__MALFORMED_PDA = 2800004;\n var SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE = 2800005;\n var SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED = 2800006;\n var SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED = 2800007;\n var SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE = 2800008;\n var SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED = 2800009;\n var SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER = 2800010;\n var SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS = 2800011;\n var SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND = 323e4;\n var SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND = 32300001;\n var SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT = 3230002;\n var SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT = 3230003;\n var SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED = 3230004;\n var SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT = 361e4;\n var SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED = 3610001;\n var SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED = 3610002;\n var SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED = 3610003;\n var SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED = 3610004;\n var SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED = 3610005;\n var SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED = 3610006;\n var SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY = 3610007;\n var SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED = 3611e3;\n var SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH = 3704e3;\n var SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH = 3704001;\n var SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH = 3704002;\n var SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE = 3704003;\n var SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY = 3704004;\n var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS = 4128e3;\n var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA = 4128001;\n var SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH = 4128002;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN = 4615e3;\n var SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR = 4615001;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT = 4615002;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA = 4615003;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA = 4615004;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL = 4615005;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS = 4615006;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID = 4615007;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE = 4615008;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED = 4615009;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT = 4615010;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION = 4615011;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID = 4615012;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND = 4615013;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED = 4615014;\n var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE = 4615015;\n var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED = 4615016;\n var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX = 4615017;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED = 4615018;\n var SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED = 4615019;\n var SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS = 4615020;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED = 4615021;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE = 4615022;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED = 4615023;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = 4615024;\n var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC = 4615025;\n var SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM = 4615026;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR = 4615027;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED = 4615028;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE = 4615029;\n var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT = 4615030;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID = 4615031;\n var SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH = 4615032;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT = 4615033;\n var SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED = 4615034;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED = 4615035;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS = 4615036;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC = 4615037;\n var SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED = 4615038;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION = 4615039;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE = 4615040;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE = 4615041;\n var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE = 4615042;\n var SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE = 4615043;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY = 4615044;\n var SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR = 4615045;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT = 4615046;\n var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER = 4615047;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW = 4615048;\n var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR = 4615049;\n var SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER = 4615050;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED = 4615051;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED = 4615052;\n var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED = 4615053;\n var SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS = 4615054;\n var SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS = 5508e3;\n var SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER = 5508001;\n var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER = 5508002;\n var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER = 5508003;\n var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER = 5508004;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER = 5508005;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER = 5508006;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER = 5508007;\n var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER = 5508008;\n var SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS = 5508009;\n var SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING = 5508010;\n var SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED = 5508011;\n var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES = 5663e3;\n var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE = 5663001;\n var SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME = 5663002;\n var SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME = 5663003;\n var SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE = 5663004;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING = 5663005;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE = 5663006;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND = 5663007;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING = 5663008;\n var SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING = 5663009;\n var SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING = 5663010;\n var SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING = 5663011;\n var SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING = 5663012;\n var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING = 5663013;\n var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE = 5663014;\n var SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION = 5663015;\n var SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES = 5663016;\n var SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH = 5663017;\n var SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT = 5663018;\n var SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT = 5663019;\n var SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT = 5663020;\n var SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN = 705e4;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE = 7050001;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE = 7050002;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND = 7050003;\n var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND = 7050004;\n var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE = 7050005;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE = 7050006;\n var SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED = 7050007;\n var SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND = 7050008;\n var SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP = 7050009;\n var SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE = 7050010;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX = 7050011;\n var SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE = 7050012;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION = 7050013;\n var SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE = 7050014;\n var SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE = 7050015;\n var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = 7050016;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT = 7050017;\n var SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION = 7050018;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT = 7050019;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT = 7050020;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT = 7050021;\n var SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS = 7050022;\n var SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND = 7050023;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER = 7050024;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA = 7050025;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX = 7050026;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT = 7050027;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT = 7050028;\n var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT = 7050029;\n var SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION = 7050030;\n var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT = 7050031;\n var SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED = 7050032;\n var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT = 7050033;\n var SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED = 7050034;\n var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED = 7050035;\n var SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION = 7050036;\n var SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY = 8078e3;\n var SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH = 8078001;\n var SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH = 8078002;\n var SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH = 8078003;\n var SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH = 8078004;\n var SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH = 8078005;\n var SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH = 8078006;\n var SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS = 8078007;\n var SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE = 8078008;\n var SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT = 8078009;\n var SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT = 8078010;\n var SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE = 8078011;\n var SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE = 8078012;\n var SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH = 8078013;\n var SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE = 8078014;\n var SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT = 8078015;\n var SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE = 8078016;\n var SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE = 8078017;\n var SOLANA_ERROR__CODECS__INVALID_CONSTANT = 8078018;\n var SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE = 8078019;\n var SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL = 8078020;\n var SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES = 8078021;\n var SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS = 8078022;\n var SOLANA_ERROR__RPC__INTEGER_OVERFLOW = 81e5;\n var SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN = 8100001;\n var SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR = 8100002;\n var SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD = 8100003;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN = 819e4;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID = 8190001;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED = 8190002;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED = 8190003;\n var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT = 8190004;\n var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING = 99e5;\n var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE = 9900001;\n var SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING = 9900002;\n var SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE = 9900003;\n var SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED = 9900004;\n var SolanaErrorMessages = {\n [SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND]: \"Account not found at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED]: \"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.\",\n [SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT]: \"Expected decoded account at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT]: \"Failed to decode account data at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND]: \"Accounts not found at addresses: $addresses\",\n [SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED]: \"Unable to find a viable program address bump seed.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS]: \"$putativeAddress is not a base58-encoded address.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH]: \"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY]: \"The `CryptoKey` must be an `Ed25519` public key.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS]: \"$putativeOffCurveAddress is not a base58-encoded off-curve address.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE]: \"Invalid seeds; point must fall off the Ed25519 curve.\",\n [SOLANA_ERROR__ADDRESSES__MALFORMED_PDA]: \"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].\",\n [SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED]: \"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.\",\n [SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED]: \"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.\",\n [SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE]: \"Expected program derived address bump to be in the range [0, 255], got: $bump.\",\n [SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER]: \"Program address cannot end with PDA marker.\",\n [SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.\",\n [SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.\",\n [SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: \"The network has progressed past the last block for which this transaction could have been committed.\",\n [SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY]: \"Codec [$codecDescription] cannot decode empty byte arrays.\",\n [SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS]: \"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.\",\n [SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL]: \"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH]: \"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH]: \"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH]: \"Encoder and decoder must either both be fixed-size or variable-size.\",\n [SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE]: \"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.\",\n [SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH]: \"Expected a fixed-size codec, got a variable-size one.\",\n [SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH]: \"Codec [$codecDescription] expected a positive byte length, got $bytesLength.\",\n [SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH]: \"Expected a variable-size codec, got a fixed-size one.\",\n [SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE]: \"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].\",\n [SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH]: \"Codec [$codecDescription] expected $expected bytes, got $bytesLength.\",\n [SOLANA_ERROR__CODECS__INVALID_CONSTANT]: \"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].\",\n [SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT]: \"Invalid discriminated union variant. Expected one of [$variants], got $value.\",\n [SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT]: \"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.\",\n [SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT]: \"Invalid literal union variant. Expected one of [$variants], got $value.\",\n [SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS]: \"Expected [$codecDescription] to have $expected items, got $actual.\",\n [SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE]: \"Invalid value $value for base $base with alphabet $alphabet.\",\n [SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE]: \"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.\",\n [SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE]: \"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.\",\n [SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE]: \"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.\",\n [SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES]: \"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].\",\n [SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE]: \"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.\",\n [SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED]: \"No random values implementation could be found.\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED]: \"instruction requires an uninitialized account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED]: \"instruction tries to borrow reference for an account which is already borrowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING]: \"instruction left account with an outstanding borrowed reference\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED]: \"program other than the account's owner changed the size of the account data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL]: \"account data too small for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE]: \"instruction expected an executable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT]: \"An account does not have enough lamports to be rent-exempt\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW]: \"Program arithmetic overflowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR]: \"Failed to serialize or deserialize account data: $encodedData\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS]: \"Builtin programs must consume compute units\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH]: \"Cross-program invocation call depth too deep\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED]: \"Computational budget exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM]: \"custom program error: #$code\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX]: \"instruction contains duplicate accounts\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC]: \"instruction modifications of multiply-passed account differ\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT]: \"executable accounts must be rent exempt\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED]: \"instruction changed executable accounts data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE]: \"instruction changed the balance of an executable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED]: \"instruction changed executable bit of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED]: \"instruction modified data of an account it does not own\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND]: \"instruction spent from the balance of an account it does not own\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR]: \"generic instruction error\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER]: \"Provided owner is not allowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE]: \"Account is immutable\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY]: \"Incorrect authority provided\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID]: \"incorrect program id for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS]: \"insufficient funds for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA]: \"invalid account data for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER]: \"Invalid account owner\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT]: \"invalid program argument\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR]: \"program returned invalid error code\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA]: \"invalid instruction data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC]: \"Failed to reallocate account data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS]: \"Provided seeds do not result in a valid address\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED]: \"Accounts data allocations exceeded the maximum allowed per transaction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED]: \"Max accounts exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED]: \"Max instruction trace length exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED]: \"Length of the seed is too long for address generation\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT]: \"An account required by the instruction is missing\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE]: \"missing required signature for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID]: \"instruction illegally modified the program id of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS]: \"insufficient account keys for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION]: \"Cross-program invocation with unauthorized signer or writable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE]: \"Failed to create program execution environment\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE]: \"Program failed to compile\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE]: \"Program failed to complete\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED]: \"instruction modified data of a read-only account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE]: \"instruction changed the balance of a read-only account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED]: \"Cross-program invocation reentrancy not allowed for this instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED]: \"instruction modified rent epoch of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION]: \"sum of account balances before and after instruction do not match\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT]: \"instruction requires an initialized account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN]: \"\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID]: \"Unsupported program id\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR]: \"Unsupported sysvar\",\n [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS]: \"The instruction does not have any accounts.\",\n [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA]: \"The instruction does not have any data.\",\n [SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH]: \"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.\",\n [SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH]: \"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__INVALID_NONCE]: \"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING]: \"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED]: \"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE]: \"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING]: \"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE]: \"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR]: \"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__INVALID_PARAMS]: \"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__INVALID_REQUEST]: \"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND]: \"JSON-RPC error: The method does not exist / is not available ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__PARSE_ERROR]: \"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__SCAN_ERROR]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED]: \"Minimum context slot has not been reached\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY]: \"Node is unhealthy; behind by $numSlotsBehind slots\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT]: \"No snapshot\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE]: \"Transaction simulation failed\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE]: \"Transaction history is not available from this node\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH]: \"Transaction signature length mismatch\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE]: \"Transaction signature verification failure\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION]: \"$__serverMessage\",\n [SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH]: \"Key pair bytes must be of length 64, got $byteLength.\",\n [SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH]: \"Expected private key bytes with length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH]: \"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.\",\n [SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY]: \"The provided private key does not match the provided public key.\",\n [SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.\",\n [SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE]: \"Lamports value must be in the range [0, 2e64-1]\",\n [SOLANA_ERROR__MALFORMED_BIGINT_STRING]: \"`$value` cannot be parsed as a `BigInt`\",\n [SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR]: \"$message\",\n [SOLANA_ERROR__MALFORMED_NUMBER_STRING]: \"`$value` cannot be parsed as a `Number`\",\n [SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND]: \"No nonce account could be found at address `$nonceAccountAddress`\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN]: \"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED]: \"WebSocket was closed before payload could be added to the send buffer\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED]: \"WebSocket connection closed\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT]: \"WebSocket failed to connect\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID]: \"Failed to obtain a subscription id from the server\",\n [SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD]: \"Could not find an API plan for RPC method: `$method`\",\n [SOLANA_ERROR__RPC__INTEGER_OVERFLOW]: \"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.\",\n [SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR]: \"HTTP error ($statusCode): $message\",\n [SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN]: \"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.\",\n [SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS]: \"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.\",\n [SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER]: \"The provided value does not implement the `KeyPairSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER]: \"The provided value does not implement the `MessageModifyingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER]: \"The provided value does not implement the `MessagePartialSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER]: \"The provided value does not implement any of the `MessageSigner` interfaces\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER]: \"The provided value does not implement the `TransactionModifyingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER]: \"The provided value does not implement the `TransactionPartialSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER]: \"The provided value does not implement the `TransactionSendingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER]: \"The provided value does not implement any of the `TransactionSigner` interfaces\",\n [SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS]: \"More than one `TransactionSendingSigner` was identified.\",\n [SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING]: \"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.\",\n [SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED]: \"Wallet account signers do not support signing multiple messages/transactions in a single operation\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY]: \"Cannot export a non-extractable key.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED]: \"No digest implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT]: \"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED]: \"This runtime does not support the generation of Ed25519 key pairs.\\n\\nInstall @solana/webcrypto-ed25519-polyfill and call its `install` function before generating keys in environments that do not support Ed25519.\\n\\nFor a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED]: \"No signature verification implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED]: \"No key generation implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED]: \"No signing implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED]: \"No key export implementation could be found.\",\n [SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE]: \"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING]: \"Transaction processing left an account with an outstanding borrowed reference\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE]: \"Account in use\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE]: \"Account loaded twice\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND]: \"Attempt to debit an account but found no record of a prior credit.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND]: \"Transaction loads an address table account that doesn't exist\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED]: \"This transaction has already been processed\",\n [SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND]: \"Blockhash not found\",\n [SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP]: \"Loader call chain is too deep\",\n [SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE]: \"Transactions are currently disabled due to cluster maintenance\",\n [SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION]: \"Transaction contains a duplicate instruction ($index) that is not allowed\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE]: \"Insufficient funds for fee\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT]: \"Transaction results in an account ($accountIndex) with insufficient funds for rent\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE]: \"This account may not be used to pay transaction fees\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX]: \"Transaction contains an invalid account reference\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA]: \"Transaction loads an address table account with invalid data\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX]: \"Transaction address table lookup uses an invalid index\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER]: \"Transaction loads an address table account with an invalid owner\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT]: \"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION]: \"This program may not be used for executing instructions\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT]: \"Transaction leaves an account with a lower balance than rent-exempt minimum\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT]: \"Transaction loads a writable account that cannot be written\",\n [SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED]: \"Transaction exceeded max loaded accounts data size cap\",\n [SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE]: \"Transaction requires a fee but has no signature present\",\n [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND]: \"Attempt to load a program that does not exist\",\n [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED]: \"Execution of the program referenced by account at index $accountIndex is temporarily restricted.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED]: \"ResanitizationNeeded\",\n [SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE]: \"Transaction failed to sanitize accounts offsets correctly\",\n [SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE]: \"Transaction did not pass signature verification\",\n [SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS]: \"Transaction locked too many accounts\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION]: \"Sum of account balances before and after transaction do not match\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN]: \"The transaction failed with the error `$errorName`\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION]: \"Transaction version is unsupported\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT]: \"Transaction would exceed account data limit within the block\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT]: \"Transaction would exceed total account data limit\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT]: \"Transaction would exceed max account limit within the block\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT]: \"Transaction would exceed max Block Cost Limit\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT]: \"Transaction would exceed max Vote Cost Limit\",\n [SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION]: \"Attempted to sign a transaction with an address that is not a signer for it\",\n [SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING]: \"Transaction is missing an address at index: $index.\",\n [SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES]: \"Transaction has no expected signers therefore it cannot be encoded\",\n [SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT]: \"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes\",\n [SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME]: \"Transaction does not have a blockhash lifetime\",\n [SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME]: \"Transaction is not a durable nonce transaction\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING]: \"Contents of these address lookup tables unknown: $lookupTableAddresses\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE]: \"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING]: \"No fee payer set in CompiledTransaction\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND]: \"Could not find program address at index $index\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT]: \"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more\",\n [SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT]: \"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more\",\n [SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING]: \"Transaction is missing a fee payer.\",\n [SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING]: \"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.\",\n [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE]: \"Transaction first instruction is not advance nonce account instruction.\",\n [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING]: \"Transaction with no instructions cannot be durable nonce transaction.\",\n [SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES]: \"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees\",\n [SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE]: \"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable\",\n [SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH]: \"The transaction message expected the transaction to have $signerAddressesLength signatures, got $signaturesLength.\",\n [SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING]: \"Transaction is missing signatures for addresses: $addresses.\",\n [SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE]: \"Transaction version must be in the range [0, 127]. `$actualVersion` given\"\n };\n var START_INDEX = \"i\";\n var TYPE = \"t\";\n function getHumanReadableErrorMessage(code, context = {}) {\n const messageFormatString = SolanaErrorMessages[code];\n if (messageFormatString.length === 0) {\n return \"\";\n }\n let state;\n function commitStateUpTo(endIndex) {\n if (state[TYPE] === 2) {\n const variableName = messageFormatString.slice(state[START_INDEX] + 1, endIndex);\n fragments.push(\n variableName in context ? (\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n `${context[variableName]}`\n ) : `$${variableName}`\n );\n } else if (state[TYPE] === 1) {\n fragments.push(messageFormatString.slice(state[START_INDEX], endIndex));\n }\n }\n const fragments = [];\n messageFormatString.split(\"\").forEach((char, ii) => {\n if (ii === 0) {\n state = {\n [START_INDEX]: 0,\n [TYPE]: messageFormatString[0] === \"\\\\\" ? 0 : messageFormatString[0] === \"$\" ? 2 : 1\n /* Text */\n };\n return;\n }\n let nextState;\n switch (state[TYPE]) {\n case 0:\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 1\n /* Text */\n };\n break;\n case 1:\n if (char === \"\\\\\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 0\n /* EscapeSequence */\n };\n } else if (char === \"$\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 2\n /* Variable */\n };\n }\n break;\n case 2:\n if (char === \"\\\\\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 0\n /* EscapeSequence */\n };\n } else if (char === \"$\") {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 2\n /* Variable */\n };\n } else if (!char.match(/\\w/)) {\n nextState = {\n [START_INDEX]: ii,\n [TYPE]: 1\n /* Text */\n };\n }\n break;\n }\n if (nextState) {\n if (state !== nextState) {\n commitStateUpTo(ii);\n }\n state = nextState;\n }\n });\n commitStateUpTo();\n return fragments.join(\"\");\n }\n function getErrorMessage(code, context = {}) {\n if (true) {\n return getHumanReadableErrorMessage(code, context);\n } else {\n let decodingAdviceMessage = `Solana error #${code}; Decode this error by running \\`npx @solana/errors decode -- ${code}`;\n if (Object.keys(context).length) {\n decodingAdviceMessage += ` '${encodeContextObject(context)}'`;\n }\n return `${decodingAdviceMessage}\\``;\n }\n }\n var SolanaError = class extends Error {\n /**\n * Indicates the root cause of this {@link SolanaError}, if any.\n *\n * For example, a transaction error might have an instruction error as its root cause. In this\n * case, you will be able to access the instruction error on the transaction error as `cause`.\n */\n cause = this.cause;\n /**\n * Contains context that can assist in understanding or recovering from a {@link SolanaError}.\n */\n context;\n constructor(...[code, contextAndErrorOptions]) {\n let context;\n let errorOptions;\n if (contextAndErrorOptions) {\n const { cause, ...contextRest } = contextAndErrorOptions;\n if (cause) {\n errorOptions = { cause };\n }\n if (Object.keys(contextRest).length > 0) {\n context = contextRest;\n }\n }\n const message = getErrorMessage(code, context);\n super(message, errorOptions);\n this.context = {\n __code: code,\n ...context\n };\n this.name = \"SolanaError\";\n }\n };\n\n // ../../../node_modules/.pnpm/@solana+codecs-core@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-core/dist/index.browser.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n function getEncodedSize(value, encoder) {\n return \"fixedSize\" in encoder ? encoder.fixedSize : encoder.getSizeFromValue(value);\n }\n function createEncoder(encoder) {\n return Object.freeze({\n ...encoder,\n encode: (value) => {\n const bytes = new Uint8Array(getEncodedSize(value, encoder));\n encoder.write(value, bytes, 0);\n return bytes;\n }\n });\n }\n function createDecoder(decoder) {\n return Object.freeze({\n ...decoder,\n decode: (bytes, offset2 = 0) => decoder.read(bytes, offset2)[0]\n });\n }\n function isFixedSize(codec) {\n return \"fixedSize\" in codec && typeof codec.fixedSize === \"number\";\n }\n function combineCodec(encoder, decoder) {\n if (isFixedSize(encoder) !== isFixedSize(decoder)) {\n throw new SolanaError(SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH);\n }\n if (isFixedSize(encoder) && isFixedSize(decoder) && encoder.fixedSize !== decoder.fixedSize) {\n throw new SolanaError(SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH, {\n decoderFixedSize: decoder.fixedSize,\n encoderFixedSize: encoder.fixedSize\n });\n }\n if (!isFixedSize(encoder) && !isFixedSize(decoder) && encoder.maxSize !== decoder.maxSize) {\n throw new SolanaError(SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH, {\n decoderMaxSize: decoder.maxSize,\n encoderMaxSize: encoder.maxSize\n });\n }\n return {\n ...decoder,\n ...encoder,\n decode: decoder.decode,\n encode: encoder.encode,\n read: decoder.read,\n write: encoder.write\n };\n }\n function assertByteArrayIsNotEmptyForCodec(codecDescription, bytes, offset2 = 0) {\n if (bytes.length - offset2 <= 0) {\n throw new SolanaError(SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY, {\n codecDescription\n });\n }\n }\n function assertByteArrayHasEnoughBytesForCodec(codecDescription, expected, bytes, offset2 = 0) {\n const bytesLength = bytes.length - offset2;\n if (bytesLength < expected) {\n throw new SolanaError(SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH, {\n bytesLength,\n codecDescription,\n expected\n });\n }\n }\n\n // ../../../node_modules/.pnpm/@solana+codecs-numbers@2.3.0_typescript@5.8.3/node_modules/@solana/codecs-numbers/dist/index.browser.mjs\n function assertNumberIsBetweenForCodec(codecDescription, min, max, value) {\n if (value < min || value > max) {\n throw new SolanaError(SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE, {\n codecDescription,\n max,\n min,\n value\n });\n }\n }\n function isLittleEndian(config) {\n return config?.endian === 1 ? false : true;\n }\n function numberEncoderFactory(input) {\n return createEncoder({\n fixedSize: input.size,\n write(value, bytes, offset2) {\n if (input.range) {\n assertNumberIsBetweenForCodec(input.name, input.range[0], input.range[1], value);\n }\n const arrayBuffer = new ArrayBuffer(input.size);\n input.set(new DataView(arrayBuffer), value, isLittleEndian(input.config));\n bytes.set(new Uint8Array(arrayBuffer), offset2);\n return offset2 + input.size;\n }\n });\n }\n function numberDecoderFactory(input) {\n return createDecoder({\n fixedSize: input.size,\n read(bytes, offset2 = 0) {\n assertByteArrayIsNotEmptyForCodec(input.name, bytes, offset2);\n assertByteArrayHasEnoughBytesForCodec(input.name, input.size, bytes, offset2);\n const view = new DataView(toArrayBuffer(bytes, offset2, input.size));\n return [input.get(view, isLittleEndian(input.config)), offset2 + input.size];\n }\n });\n }\n function toArrayBuffer(bytes, offset2, length) {\n const bytesOffset = bytes.byteOffset + (offset2 ?? 0);\n const bytesLength = length ?? bytes.byteLength;\n return bytes.buffer.slice(bytesOffset, bytesOffset + bytesLength);\n }\n var getU64Encoder = (config = {}) => numberEncoderFactory({\n config,\n name: \"u64\",\n range: [0n, BigInt(\"0xffffffffffffffff\")],\n set: (view, value, le) => view.setBigUint64(0, BigInt(value), le),\n size: 8\n });\n var getU64Decoder = (config = {}) => numberDecoderFactory({\n config,\n get: (view, le) => view.getBigUint64(0, le),\n name: \"u64\",\n size: 8\n });\n var getU64Codec = (config = {}) => combineCodec(getU64Encoder(config), getU64Decoder(config));\n\n // ../../../node_modules/.pnpm/superstruct@2.0.2/node_modules/superstruct/dist/index.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n var StructError = class extends TypeError {\n constructor(failure, failures) {\n let cached;\n const { message, explanation, ...rest } = failure;\n const { path } = failure;\n const msg = path.length === 0 ? message : `At path: ${path.join(\".\")} -- ${message}`;\n super(explanation ?? msg);\n if (explanation != null)\n this.cause = msg;\n Object.assign(this, rest);\n this.name = this.constructor.name;\n this.failures = () => {\n return cached ?? (cached = [failure, ...failures()]);\n };\n }\n };\n function isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === \"function\";\n }\n function isObject(x) {\n return typeof x === \"object\" && x != null;\n }\n function isNonArrayObject(x) {\n return isObject(x) && !Array.isArray(x);\n }\n function print(value) {\n if (typeof value === \"symbol\") {\n return value.toString();\n }\n return typeof value === \"string\" ? JSON.stringify(value) : `${value}`;\n }\n function shiftIterator(input) {\n const { done, value } = input.next();\n return done ? void 0 : value;\n }\n function toFailure(result, context, struct2, value) {\n if (result === true) {\n return;\n } else if (result === false) {\n result = {};\n } else if (typeof result === \"string\") {\n result = { message: result };\n }\n const { path, branch } = context;\n const { type: type2 } = struct2;\n const { refinement, message = `Expected a value of type \\`${type2}\\`${refinement ? ` with refinement \\`${refinement}\\`` : \"\"}, but received: \\`${print(value)}\\`` } = result;\n return {\n value,\n type: type2,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message\n };\n }\n function* toFailures(result, context, struct2, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n for (const r of result) {\n const failure = toFailure(r, context, struct2, value);\n if (failure) {\n yield failure;\n }\n }\n }\n function* run(value, struct2, options = {}) {\n const { path = [], branch = [value], coerce: coerce2 = false, mask: mask2 = false } = options;\n const ctx = { path, branch, mask: mask2 };\n if (coerce2) {\n value = struct2.coercer(value, ctx);\n }\n let status = \"valid\";\n for (const failure of struct2.validator(value, ctx)) {\n failure.explanation = options.message;\n status = \"not_valid\";\n yield [failure, void 0];\n }\n for (let [k, v, s] of struct2.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === void 0 ? path : [...path, k],\n branch: k === void 0 ? branch : [...branch, v],\n coerce: coerce2,\n mask: mask2,\n message: options.message\n });\n for (const t of ts) {\n if (t[0]) {\n status = t[0].refinement != null ? \"not_refined\" : \"not_valid\";\n yield [t[0], void 0];\n } else if (coerce2) {\n v = t[1];\n if (k === void 0) {\n value = v;\n } else if (value instanceof Map) {\n value.set(k, v);\n } else if (value instanceof Set) {\n value.add(v);\n } else if (isObject(value)) {\n if (v !== void 0 || k in value)\n value[k] = v;\n }\n }\n }\n }\n if (status !== \"not_valid\") {\n for (const failure of struct2.refiner(value, ctx)) {\n failure.explanation = options.message;\n status = \"not_refined\";\n yield [failure, void 0];\n }\n }\n if (status === \"valid\") {\n yield [void 0, value];\n }\n }\n var Struct = class {\n constructor(props) {\n const { type: type2, schema, validator, refiner, coercer = (value) => value, entries = function* () {\n } } = props;\n this.type = type2;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.validator = () => [];\n }\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n } else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n assert(value, message) {\n return assert(value, this, message);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n create(value, message) {\n return create(value, this, message);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema. Masking applies recursively to\n * props of `object` structs only.\n */\n mask(value, message) {\n return mask(value, this, message);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `coerce` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful. Also, `mask` will turn on\n * masking of the unknown `object` props recursively if passed.\n */\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n };\n function assert(value, struct2, message) {\n const result = validate(value, struct2, { message });\n if (result[0]) {\n throw result[0];\n }\n }\n function create(value, struct2, message) {\n const result = validate(value, struct2, { coerce: true, message });\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n }\n function mask(value, struct2, message) {\n const result = validate(value, struct2, { coerce: true, mask: true, message });\n if (result[0]) {\n throw result[0];\n } else {\n return result[1];\n }\n }\n function is(value, struct2) {\n const result = validate(value, struct2);\n return !result[0];\n }\n function validate(value, struct2, options = {}) {\n const tuples = run(value, struct2, options);\n const tuple2 = shiftIterator(tuples);\n if (tuple2[0]) {\n const error = new StructError(tuple2[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, void 0];\n } else {\n const v = tuple2[1];\n return [void 0, v];\n }\n }\n function define(name, validator) {\n return new Struct({ type: name, schema: null, validator });\n }\n function any() {\n return define(\"any\", () => true);\n }\n function array(Element) {\n return new Struct({\n type: \"array\",\n schema: Element,\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n validator(value) {\n return Array.isArray(value) || `Expected an array value, but received: ${print(value)}`;\n }\n });\n }\n function boolean() {\n return define(\"boolean\", (value) => {\n return typeof value === \"boolean\";\n });\n }\n function instance(Class) {\n return define(\"instance\", (value) => {\n return value instanceof Class || `Expected a \\`${Class.name}\\` instance, but received: ${print(value)}`;\n });\n }\n function literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: \"literal\",\n schema: t === \"string\" || t === \"number\" || t === \"boolean\" ? constant : null,\n validator(value) {\n return value === constant || `Expected the literal \\`${description}\\`, but received: ${print(value)}`;\n }\n });\n }\n function never() {\n return define(\"never\", () => false);\n }\n function nullable(struct2) {\n return new Struct({\n ...struct2,\n validator: (value, ctx) => value === null || struct2.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct2.refiner(value, ctx)\n });\n }\n function number() {\n return define(\"number\", (value) => {\n return typeof value === \"number\" && !isNaN(value) || `Expected a number, but received: ${print(value)}`;\n });\n }\n function optional(struct2) {\n return new Struct({\n ...struct2,\n validator: (value, ctx) => value === void 0 || struct2.validator(value, ctx),\n refiner: (value, ctx) => value === void 0 || struct2.refiner(value, ctx)\n });\n }\n function record(Key, Value) {\n return new Struct({\n type: \"record\",\n schema: null,\n *entries(value) {\n if (isObject(value)) {\n for (const k in value) {\n const v = value[k];\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n validator(value) {\n return isNonArrayObject(value) || `Expected an object, but received: ${print(value)}`;\n },\n coercer(value) {\n return isNonArrayObject(value) ? { ...value } : value;\n }\n });\n }\n function string() {\n return define(\"string\", (value) => {\n return typeof value === \"string\" || `Expected a string, but received: ${print(value)}`;\n });\n }\n function tuple(Structs) {\n const Never = never();\n return new Struct({\n type: \"tuple\",\n schema: null,\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Structs.length, value.length);\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Structs[i] || Never];\n }\n }\n },\n validator(value) {\n return Array.isArray(value) || `Expected an array, but received: ${print(value)}`;\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n }\n });\n }\n function type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: \"type\",\n schema,\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n validator(value) {\n return isNonArrayObject(value) || `Expected an object, but received: ${print(value)}`;\n },\n coercer(value) {\n return isNonArrayObject(value) ? { ...value } : value;\n }\n });\n }\n function union(Structs) {\n const description = Structs.map((s) => s.type).join(\" | \");\n return new Struct({\n type: \"union\",\n schema: null,\n coercer(value, ctx) {\n for (const S of Structs) {\n const [error, coerced] = S.validate(value, {\n coerce: true,\n mask: ctx.mask\n });\n if (!error) {\n return coerced;\n }\n }\n return value;\n },\n validator(value, ctx) {\n const failures = [];\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n if (!first[0]) {\n return [];\n } else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n return [\n `Expected the value to satisfy a union of \\`${description}\\`, but received: ${print(value)}`,\n ...failures\n ];\n }\n });\n }\n function unknown() {\n return define(\"unknown\", () => true);\n }\n function coerce(struct2, condition, coercer) {\n return new Struct({\n ...struct2,\n coercer: (value, ctx) => {\n return is(value, condition) ? struct2.coercer(coercer(value, ctx), ctx) : struct2.coercer(value, ctx);\n }\n });\n }\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n var import_browser = __toESM(require_browser());\n\n // ../../../node_modules/.pnpm/rpc-websockets@9.1.3/node_modules/rpc-websockets/dist/index.browser.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n init_buffer();\n\n // ../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs\n init_dirname();\n init_buffer2();\n init_process2();\n var import_index = __toESM(require_eventemitter3(), 1);\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha3.js\n init_dirname();\n init_buffer2();\n init_process2();\n var _0n6 = BigInt(0);\n var _1n6 = BigInt(1);\n var _2n4 = BigInt(2);\n var _7n2 = BigInt(7);\n var _256n = BigInt(256);\n var _0x71n = BigInt(113);\n var SHA3_PI = [];\n var SHA3_ROTL = [];\n var _SHA3_IOTA = [];\n for (let round = 0, R = _1n6, x = 1, y = 0; round < 24; round++) {\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);\n let t = _0n6;\n for (let j = 0; j < 7; j++) {\n R = (R << _1n6 ^ (R >> _7n2) * _0x71n) % _256n;\n if (R & _2n4)\n t ^= _1n6 << (_1n6 << /* @__PURE__ */ BigInt(j)) - _1n6;\n }\n _SHA3_IOTA.push(t);\n }\n var IOTAS = split(_SHA3_IOTA, true);\n var SHA3_IOTA_H = IOTAS[0];\n var SHA3_IOTA_L = IOTAS[1];\n var rotlH = (h, l, s) => s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s);\n var rotlL = (h, l, s) => s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s);\n function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n for (let round = 24 - rounds; round < 24; round++) {\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n clean(B);\n }\n var Keccak = class _Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n this.enableXOF = false;\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n anumber(outputLen);\n if (!(0 < blockLen && blockLen < 200))\n throw new Error(\"only keccak-f1600 function is supported\");\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n clone() {\n return this._cloneInto();\n }\n keccak() {\n swap32IfBE(this.state32);\n keccakP(this.state32, this.rounds);\n swap32IfBE(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n aexists(this);\n data = toBytes(data);\n abytes(data);\n const { blockLen, state } = this;\n const len = data.length;\n for (let pos = 0; pos < len; ) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n state[pos] ^= suffix;\n if ((suffix & 128) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 128;\n this.keccak();\n }\n writeInto(out) {\n aexists(this, false);\n abytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len; ) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n if (!this.enableXOF)\n throw new Error(\"XOF is not possible for this instance\");\n return this.writeInto(out);\n }\n xof(bytes) {\n anumber(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n aoutput(out, this);\n if (this.finished)\n throw new Error(\"digest() was already called\");\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n clean(this.state);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n };\n var gen = (suffix, blockLen, outputLen) => createHasher(() => new Keccak(blockLen, suffix, outputLen));\n var keccak_256 = /* @__PURE__ */ (() => gen(1, 136, 256 / 8))();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/secp256k1.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/_shortw_utils.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/weierstrass.js\n init_dirname();\n init_buffer2();\n init_process2();\n\n // ../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js\n init_dirname();\n init_buffer2();\n init_process2();\n var HMAC = class extends Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n ahash(hash);\n const key = toBytes(_key);\n this.iHash = hash.create();\n if (typeof this.iHash.update !== \"function\")\n throw new Error(\"Expected instance of class which extends utils.Hash\");\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad = new Uint8Array(blockLen);\n pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 54;\n this.iHash.update(pad);\n this.oHash = hash.create();\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 54 ^ 92;\n this.oHash.update(pad);\n clean(pad);\n }\n update(buf) {\n aexists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n aexists(this);\n abytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n clone() {\n return this._cloneInto();\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n };\n var hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\n hmac.create = (hash, key) => new HMAC(hash, key);\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/weierstrass.js\n var divNearest = (num, den) => (num + (num >= 0 ? den : -den) / _2n5) / den;\n function _splitEndoScalar(k, basis, n) {\n const [[a1, b1], [a2, b2]] = basis;\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = k - c1 * a1 - c2 * a2;\n let k2 = -c1 * b1 - c2 * b2;\n const k1neg = k1 < _0n7;\n const k2neg = k2 < _0n7;\n if (k1neg)\n k1 = -k1;\n if (k2neg)\n k2 = -k2;\n const MAX_NUM = bitMask(Math.ceil(bitLen(n) / 2)) + _1n7;\n if (k1 < _0n7 || k1 >= MAX_NUM || k2 < _0n7 || k2 >= MAX_NUM) {\n throw new Error(\"splitScalar (endomorphism): failed, k=\" + k);\n }\n return { k1neg, k1, k2neg, k2 };\n }\n function validateSigFormat(format) {\n if (![\"compact\", \"recovered\", \"der\"].includes(format))\n throw new Error('Signature format must be \"compact\", \"recovered\", or \"der\"');\n return format;\n }\n function validateSigOpts(opts, def) {\n const optsn = {};\n for (let optName of Object.keys(def)) {\n optsn[optName] = opts[optName] === void 0 ? def[optName] : opts[optName];\n }\n _abool2(optsn.lowS, \"lowS\");\n _abool2(optsn.prehash, \"prehash\");\n if (optsn.format !== void 0)\n validateSigFormat(optsn.format);\n return optsn;\n }\n var DERErr = class extends Error {\n constructor(m = \"\") {\n super(m);\n }\n };\n var DER = {\n // asn.1 DER encoding utils\n Err: DERErr,\n // Basic building block is TLV (Tag-Length-Value)\n _tlv: {\n encode: (tag, data) => {\n const { Err: E } = DER;\n if (tag < 0 || tag > 256)\n throw new E(\"tlv.encode: wrong tag\");\n if (data.length & 1)\n throw new E(\"tlv.encode: unpadded data\");\n const dataLen = data.length / 2;\n const len = numberToHexUnpadded(dataLen);\n if (len.length / 2 & 128)\n throw new E(\"tlv.encode: long form length too big\");\n const lenLen = dataLen > 127 ? numberToHexUnpadded(len.length / 2 | 128) : \"\";\n const t = numberToHexUnpadded(tag);\n return t + lenLen + len + data;\n },\n // v - value, l - left bytes (unparsed)\n decode(tag, data) {\n const { Err: E } = DER;\n let pos = 0;\n if (tag < 0 || tag > 256)\n throw new E(\"tlv.encode: wrong tag\");\n if (data.length < 2 || data[pos++] !== tag)\n throw new E(\"tlv.decode: wrong tlv\");\n const first = data[pos++];\n const isLong = !!(first & 128);\n let length = 0;\n if (!isLong)\n length = first;\n else {\n const lenLen = first & 127;\n if (!lenLen)\n throw new E(\"tlv.decode(long): indefinite length not supported\");\n if (lenLen > 4)\n throw new E(\"tlv.decode(long): byte length is too big\");\n const lengthBytes = data.subarray(pos, pos + lenLen);\n if (lengthBytes.length !== lenLen)\n throw new E(\"tlv.decode: length bytes not complete\");\n if (lengthBytes[0] === 0)\n throw new E(\"tlv.decode(long): zero leftmost byte\");\n for (const b of lengthBytes)\n length = length << 8 | b;\n pos += lenLen;\n if (length < 128)\n throw new E(\"tlv.decode(long): not minimal encoding\");\n }\n const v = data.subarray(pos, pos + length);\n if (v.length !== length)\n throw new E(\"tlv.decode: wrong value length\");\n return { v, l: data.subarray(pos + length) };\n }\n },\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n _int: {\n encode(num) {\n const { Err: E } = DER;\n if (num < _0n7)\n throw new E(\"integer: negative integers are not allowed\");\n let hex = numberToHexUnpadded(num);\n if (Number.parseInt(hex[0], 16) & 8)\n hex = \"00\" + hex;\n if (hex.length & 1)\n throw new E(\"unexpected DER parsing assertion: unpadded hex\");\n return hex;\n },\n decode(data) {\n const { Err: E } = DER;\n if (data[0] & 128)\n throw new E(\"invalid signature integer: negative\");\n if (data[0] === 0 && !(data[1] & 128))\n throw new E(\"invalid signature integer: unnecessary leading zero\");\n return bytesToNumberBE(data);\n }\n },\n toSig(hex) {\n const { Err: E, _int: int, _tlv: tlv } = DER;\n const data = ensureBytes(\"signature\", hex);\n const { v: seqBytes, l: seqLeftBytes } = tlv.decode(48, data);\n if (seqLeftBytes.length)\n throw new E(\"invalid signature: left bytes after parsing\");\n const { v: rBytes, l: rLeftBytes } = tlv.decode(2, seqBytes);\n const { v: sBytes, l: sLeftBytes } = tlv.decode(2, rLeftBytes);\n if (sLeftBytes.length)\n throw new E(\"invalid signature: left bytes after parsing\");\n return { r: int.decode(rBytes), s: int.decode(sBytes) };\n },\n hexFromSig(sig) {\n const { _tlv: tlv, _int: int } = DER;\n const rs = tlv.encode(2, int.encode(sig.r));\n const ss = tlv.encode(2, int.encode(sig.s));\n const seq2 = rs + ss;\n return tlv.encode(48, seq2);\n }\n };\n var _0n7 = BigInt(0);\n var _1n7 = BigInt(1);\n var _2n5 = BigInt(2);\n var _3n3 = BigInt(3);\n var _4n2 = BigInt(4);\n function _normFnElement(Fn2, key) {\n const { BYTES: expected } = Fn2;\n let num;\n if (typeof key === \"bigint\") {\n num = key;\n } else {\n let bytes = ensureBytes(\"private key\", key);\n try {\n num = Fn2.fromBytes(bytes);\n } catch (error) {\n throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof key}`);\n }\n }\n if (!Fn2.isValidNot0(num))\n throw new Error(\"invalid private key: out of range [1..N-1]\");\n return num;\n }\n function weierstrassN(params, extraOpts = {}) {\n const validated = _createCurveFields(\"weierstrass\", params, extraOpts);\n const { Fp: Fp2, Fn: Fn2 } = validated;\n let CURVE = validated.CURVE;\n const { h: cofactor, n: CURVE_ORDER } = CURVE;\n _validateObject(extraOpts, {}, {\n allowInfinityPoint: \"boolean\",\n clearCofactor: \"function\",\n isTorsionFree: \"function\",\n fromBytes: \"function\",\n toBytes: \"function\",\n endo: \"object\",\n wrapPrivateKey: \"boolean\"\n });\n const { endo } = extraOpts;\n if (endo) {\n if (!Fp2.is0(CURVE.a) || typeof endo.beta !== \"bigint\" || !Array.isArray(endo.basises)) {\n throw new Error('invalid endo: expected \"beta\": bigint and \"basises\": array');\n }\n }\n const lengths = getWLengths(Fp2, Fn2);\n function assertCompressionIsSupported() {\n if (!Fp2.isOdd)\n throw new Error(\"compression is not supported: Field does not have .isOdd()\");\n }\n function pointToBytes(_c, point, isCompressed) {\n const { x, y } = point.toAffine();\n const bx = Fp2.toBytes(x);\n _abool2(isCompressed, \"isCompressed\");\n if (isCompressed) {\n assertCompressionIsSupported();\n const hasEvenY = !Fp2.isOdd(y);\n return concatBytes(pprefix(hasEvenY), bx);\n } else {\n return concatBytes(Uint8Array.of(4), bx, Fp2.toBytes(y));\n }\n }\n function pointFromBytes(bytes) {\n _abytes2(bytes, void 0, \"Point\");\n const { publicKey: comp, publicKeyUncompressed: uncomp } = lengths;\n const length = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n if (length === comp && (head === 2 || head === 3)) {\n const x = Fp2.fromBytes(tail);\n if (!Fp2.isValid(x))\n throw new Error(\"bad point: is not on curve, wrong x\");\n const y2 = weierstrassEquation(x);\n let y;\n try {\n y = Fp2.sqrt(y2);\n } catch (sqrtError) {\n const err = sqrtError instanceof Error ? \": \" + sqrtError.message : \"\";\n throw new Error(\"bad point: is not on curve, sqrt error\" + err);\n }\n assertCompressionIsSupported();\n const isYOdd = Fp2.isOdd(y);\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y = Fp2.neg(y);\n return { x, y };\n } else if (length === uncomp && head === 4) {\n const L = Fp2.BYTES;\n const x = Fp2.fromBytes(tail.subarray(0, L));\n const y = Fp2.fromBytes(tail.subarray(L, L * 2));\n if (!isValidXY(x, y))\n throw new Error(\"bad point: is not on curve\");\n return { x, y };\n } else {\n throw new Error(`bad point: got length ${length}, expected compressed=${comp} or uncompressed=${uncomp}`);\n }\n }\n const encodePoint = extraOpts.toBytes || pointToBytes;\n const decodePoint = extraOpts.fromBytes || pointFromBytes;\n function weierstrassEquation(x) {\n const x2 = Fp2.sqr(x);\n const x3 = Fp2.mul(x2, x);\n return Fp2.add(Fp2.add(x3, Fp2.mul(x, CURVE.a)), CURVE.b);\n }\n function isValidXY(x, y) {\n const left = Fp2.sqr(y);\n const right = weierstrassEquation(x);\n return Fp2.eql(left, right);\n }\n if (!isValidXY(CURVE.Gx, CURVE.Gy))\n throw new Error(\"bad curve params: generator point\");\n const _4a3 = Fp2.mul(Fp2.pow(CURVE.a, _3n3), _4n2);\n const _27b2 = Fp2.mul(Fp2.sqr(CURVE.b), BigInt(27));\n if (Fp2.is0(Fp2.add(_4a3, _27b2)))\n throw new Error(\"bad curve params: a or b\");\n function acoord(title, n, banZero = false) {\n if (!Fp2.isValid(n) || banZero && Fp2.is0(n))\n throw new Error(`bad point coordinate ${title}`);\n return n;\n }\n function aprjpoint(other) {\n if (!(other instanceof Point))\n throw new Error(\"ProjectivePoint expected\");\n }\n function splitEndoScalarN(k) {\n if (!endo || !endo.basises)\n throw new Error(\"no endo\");\n return _splitEndoScalar(k, endo.basises, Fn2.ORDER);\n }\n const toAffineMemo = memoized((p, iz) => {\n const { X, Y, Z } = p;\n if (Fp2.eql(Z, Fp2.ONE))\n return { x: X, y: Y };\n const is0 = p.is0();\n if (iz == null)\n iz = is0 ? Fp2.ONE : Fp2.inv(Z);\n const x = Fp2.mul(X, iz);\n const y = Fp2.mul(Y, iz);\n const zz = Fp2.mul(Z, iz);\n if (is0)\n return { x: Fp2.ZERO, y: Fp2.ZERO };\n if (!Fp2.eql(zz, Fp2.ONE))\n throw new Error(\"invZ was invalid\");\n return { x, y };\n });\n const assertValidMemo = memoized((p) => {\n if (p.is0()) {\n if (extraOpts.allowInfinityPoint && !Fp2.is0(p.Y))\n return;\n throw new Error(\"bad point: ZERO\");\n }\n const { x, y } = p.toAffine();\n if (!Fp2.isValid(x) || !Fp2.isValid(y))\n throw new Error(\"bad point: x or y not field elements\");\n if (!isValidXY(x, y))\n throw new Error(\"bad point: equation left != right\");\n if (!p.isTorsionFree())\n throw new Error(\"bad point: not in prime-order subgroup\");\n return true;\n });\n function finishEndo(endoBeta, k1p, k2p, k1neg, k2neg) {\n k2p = new Point(Fp2.mul(k2p.X, endoBeta), k2p.Y, k2p.Z);\n k1p = negateCt(k1neg, k1p);\n k2p = negateCt(k2neg, k2p);\n return k1p.add(k2p);\n }\n class Point {\n /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n constructor(X, Y, Z) {\n this.X = acoord(\"x\", X);\n this.Y = acoord(\"y\", Y, true);\n this.Z = acoord(\"z\", Z);\n Object.freeze(this);\n }\n static CURVE() {\n return CURVE;\n }\n /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n static fromAffine(p) {\n const { x, y } = p || {};\n if (!p || !Fp2.isValid(x) || !Fp2.isValid(y))\n throw new Error(\"invalid affine point\");\n if (p instanceof Point)\n throw new Error(\"projective point not allowed\");\n if (Fp2.is0(x) && Fp2.is0(y))\n return Point.ZERO;\n return new Point(x, y, Fp2.ONE);\n }\n static fromBytes(bytes) {\n const P = Point.fromAffine(decodePoint(_abytes2(bytes, void 0, \"point\")));\n P.assertValidity();\n return P;\n }\n static fromHex(hex) {\n return Point.fromBytes(ensureBytes(\"pointHex\", hex));\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n *\n * @param windowSize\n * @param isLazy true will defer table computation until the first multiplication\n * @returns\n */\n precompute(windowSize = 8, isLazy = true) {\n wnaf.createCache(this, windowSize);\n if (!isLazy)\n this.multiply(_3n3);\n return this;\n }\n // TODO: return `this`\n /** A point on curve is valid if it conforms to equation. */\n assertValidity() {\n assertValidMemo(this);\n }\n hasEvenY() {\n const { y } = this.toAffine();\n if (!Fp2.isOdd)\n throw new Error(\"Field doesn't support isOdd\");\n return !Fp2.isOdd(y);\n }\n /** Compare one point to another. */\n equals(other) {\n aprjpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n const U1 = Fp2.eql(Fp2.mul(X1, Z2), Fp2.mul(X2, Z1));\n const U2 = Fp2.eql(Fp2.mul(Y1, Z2), Fp2.mul(Y2, Z1));\n return U1 && U2;\n }\n /** Flips point to one corresponding to (x, -y) in Affine coordinates. */\n negate() {\n return new Point(this.X, Fp2.neg(this.Y), this.Z);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a, b } = CURVE;\n const b3 = Fp2.mul(b, _3n3);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n let X3 = Fp2.ZERO, Y3 = Fp2.ZERO, Z3 = Fp2.ZERO;\n let t0 = Fp2.mul(X1, X1);\n let t1 = Fp2.mul(Y1, Y1);\n let t2 = Fp2.mul(Z1, Z1);\n let t3 = Fp2.mul(X1, Y1);\n t3 = Fp2.add(t3, t3);\n Z3 = Fp2.mul(X1, Z1);\n Z3 = Fp2.add(Z3, Z3);\n X3 = Fp2.mul(a, Z3);\n Y3 = Fp2.mul(b3, t2);\n Y3 = Fp2.add(X3, Y3);\n X3 = Fp2.sub(t1, Y3);\n Y3 = Fp2.add(t1, Y3);\n Y3 = Fp2.mul(X3, Y3);\n X3 = Fp2.mul(t3, X3);\n Z3 = Fp2.mul(b3, Z3);\n t2 = Fp2.mul(a, t2);\n t3 = Fp2.sub(t0, t2);\n t3 = Fp2.mul(a, t3);\n t3 = Fp2.add(t3, Z3);\n Z3 = Fp2.add(t0, t0);\n t0 = Fp2.add(Z3, t0);\n t0 = Fp2.add(t0, t2);\n t0 = Fp2.mul(t0, t3);\n Y3 = Fp2.add(Y3, t0);\n t2 = Fp2.mul(Y1, Z1);\n t2 = Fp2.add(t2, t2);\n t0 = Fp2.mul(t2, t3);\n X3 = Fp2.sub(X3, t0);\n Z3 = Fp2.mul(t2, t1);\n Z3 = Fp2.add(Z3, Z3);\n Z3 = Fp2.add(Z3, Z3);\n return new Point(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n aprjpoint(other);\n const { X: X1, Y: Y1, Z: Z1 } = this;\n const { X: X2, Y: Y2, Z: Z2 } = other;\n let X3 = Fp2.ZERO, Y3 = Fp2.ZERO, Z3 = Fp2.ZERO;\n const a = CURVE.a;\n const b3 = Fp2.mul(CURVE.b, _3n3);\n let t0 = Fp2.mul(X1, X2);\n let t1 = Fp2.mul(Y1, Y2);\n let t2 = Fp2.mul(Z1, Z2);\n let t3 = Fp2.add(X1, Y1);\n let t4 = Fp2.add(X2, Y2);\n t3 = Fp2.mul(t3, t4);\n t4 = Fp2.add(t0, t1);\n t3 = Fp2.sub(t3, t4);\n t4 = Fp2.add(X1, Z1);\n let t5 = Fp2.add(X2, Z2);\n t4 = Fp2.mul(t4, t5);\n t5 = Fp2.add(t0, t2);\n t4 = Fp2.sub(t4, t5);\n t5 = Fp2.add(Y1, Z1);\n X3 = Fp2.add(Y2, Z2);\n t5 = Fp2.mul(t5, X3);\n X3 = Fp2.add(t1, t2);\n t5 = Fp2.sub(t5, X3);\n Z3 = Fp2.mul(a, t4);\n X3 = Fp2.mul(b3, t2);\n Z3 = Fp2.add(X3, Z3);\n X3 = Fp2.sub(t1, Z3);\n Z3 = Fp2.add(t1, Z3);\n Y3 = Fp2.mul(X3, Z3);\n t1 = Fp2.add(t0, t0);\n t1 = Fp2.add(t1, t0);\n t2 = Fp2.mul(a, t2);\n t4 = Fp2.mul(b3, t4);\n t1 = Fp2.add(t1, t2);\n t2 = Fp2.sub(t0, t2);\n t2 = Fp2.mul(a, t2);\n t4 = Fp2.add(t4, t2);\n t0 = Fp2.mul(t1, t4);\n Y3 = Fp2.add(Y3, t0);\n t0 = Fp2.mul(t5, t4);\n X3 = Fp2.mul(t3, X3);\n X3 = Fp2.sub(X3, t0);\n t0 = Fp2.mul(t3, t1);\n Z3 = Fp2.mul(t5, Z3);\n Z3 = Fp2.add(Z3, t0);\n return new Point(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n const { endo: endo2 } = extraOpts;\n if (!Fn2.isValidNot0(scalar))\n throw new Error(\"invalid scalar: out of range\");\n let point, fake;\n const mul = (n) => wnaf.cached(this, n, (p) => normalizeZ(Point, p));\n if (endo2) {\n const { k1neg, k1, k2neg, k2 } = splitEndoScalarN(scalar);\n const { p: k1p, f: k1f } = mul(k1);\n const { p: k2p, f: k2f } = mul(k2);\n fake = k1f.add(k2f);\n point = finishEndo(endo2.beta, k1p, k2p, k1neg, k2neg);\n } else {\n const { p, f: f2 } = mul(scalar);\n point = p;\n fake = f2;\n }\n return normalizeZ(Point, [point, fake])[0];\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed secret key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(sc) {\n const { endo: endo2 } = extraOpts;\n const p = this;\n if (!Fn2.isValid(sc))\n throw new Error(\"invalid scalar: out of range\");\n if (sc === _0n7 || p.is0())\n return Point.ZERO;\n if (sc === _1n7)\n return p;\n if (wnaf.hasCache(this))\n return this.multiply(sc);\n if (endo2) {\n const { k1neg, k1, k2neg, k2 } = splitEndoScalarN(sc);\n const { p1, p2 } = mulEndoUnsafe(Point, p, k1, k2);\n return finishEndo(endo2.beta, p1, p2, k1neg, k2neg);\n } else {\n return wnaf.unsafe(p, sc);\n }\n }\n multiplyAndAddUnsafe(Q, a, b) {\n const sum = this.multiplyUnsafe(a).add(Q.multiplyUnsafe(b));\n return sum.is0() ? void 0 : sum;\n }\n /**\n * Converts Projective point to affine (x, y) coordinates.\n * @param invertedZ Z^-1 (inverted zero) - optional, precomputation is useful for invertBatch\n */\n toAffine(invertedZ) {\n return toAffineMemo(this, invertedZ);\n }\n /**\n * Checks whether Point is free of torsion elements (is in prime subgroup).\n * Always torsion-free for cofactor=1 curves.\n */\n isTorsionFree() {\n const { isTorsionFree } = extraOpts;\n if (cofactor === _1n7)\n return true;\n if (isTorsionFree)\n return isTorsionFree(Point, this);\n return wnaf.unsafe(this, CURVE_ORDER).is0();\n }\n clearCofactor() {\n const { clearCofactor } = extraOpts;\n if (cofactor === _1n7)\n return this;\n if (clearCofactor)\n return clearCofactor(Point, this);\n return this.multiplyUnsafe(cofactor);\n }\n isSmallOrder() {\n return this.multiplyUnsafe(cofactor).is0();\n }\n toBytes(isCompressed = true) {\n _abool2(isCompressed, \"isCompressed\");\n this.assertValidity();\n return encodePoint(Point, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return bytesToHex(this.toBytes(isCompressed));\n }\n toString() {\n return ``;\n }\n // TODO: remove\n get px() {\n return this.X;\n }\n get py() {\n return this.X;\n }\n get pz() {\n return this.Z;\n }\n toRawBytes(isCompressed = true) {\n return this.toBytes(isCompressed);\n }\n _setWindowSize(windowSize) {\n this.precompute(windowSize);\n }\n static normalizeZ(points) {\n return normalizeZ(Point, points);\n }\n static msm(points, scalars) {\n return pippenger(Point, Fn2, points, scalars);\n }\n static fromPrivateKey(privateKey) {\n return Point.BASE.multiply(_normFnElement(Fn2, privateKey));\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp2.ONE);\n Point.ZERO = new Point(Fp2.ZERO, Fp2.ONE, Fp2.ZERO);\n Point.Fp = Fp2;\n Point.Fn = Fn2;\n const bits = Fn2.BITS;\n const wnaf = new wNAF(Point, extraOpts.endo ? Math.ceil(bits / 2) : bits);\n Point.BASE.precompute(8);\n return Point;\n }\n function pprefix(hasEvenY) {\n return Uint8Array.of(hasEvenY ? 2 : 3);\n }\n function getWLengths(Fp2, Fn2) {\n return {\n secretKey: Fn2.BYTES,\n publicKey: 1 + Fp2.BYTES,\n publicKeyUncompressed: 1 + 2 * Fp2.BYTES,\n publicKeyHasPrefix: true,\n signature: 2 * Fn2.BYTES\n };\n }\n function ecdh(Point, ecdhOpts = {}) {\n const { Fn: Fn2 } = Point;\n const randomBytes_ = ecdhOpts.randomBytes || randomBytes;\n const lengths = Object.assign(getWLengths(Point.Fp, Fn2), { seed: getMinHashLength(Fn2.ORDER) });\n function isValidSecretKey(secretKey) {\n try {\n return !!_normFnElement(Fn2, secretKey);\n } catch (error) {\n return false;\n }\n }\n function isValidPublicKey(publicKey2, isCompressed) {\n const { publicKey: comp, publicKeyUncompressed } = lengths;\n try {\n const l = publicKey2.length;\n if (isCompressed === true && l !== comp)\n return false;\n if (isCompressed === false && l !== publicKeyUncompressed)\n return false;\n return !!Point.fromBytes(publicKey2);\n } catch (error) {\n return false;\n }\n }\n function randomSecretKey(seed = randomBytes_(lengths.seed)) {\n return mapHashToField(_abytes2(seed, lengths.seed, \"seed\"), Fn2.ORDER);\n }\n function getPublicKey2(secretKey, isCompressed = true) {\n return Point.BASE.multiply(_normFnElement(Fn2, secretKey)).toBytes(isCompressed);\n }\n function keygen(seed) {\n const secretKey = randomSecretKey(seed);\n return { secretKey, publicKey: getPublicKey2(secretKey) };\n }\n function isProbPub(item) {\n if (typeof item === \"bigint\")\n return false;\n if (item instanceof Point)\n return true;\n const { secretKey, publicKey: publicKey2, publicKeyUncompressed } = lengths;\n if (Fn2.allowedLengths || secretKey === publicKey2)\n return void 0;\n const l = ensureBytes(\"key\", item).length;\n return l === publicKey2 || l === publicKeyUncompressed;\n }\n function getSharedSecret(secretKeyA, publicKeyB, isCompressed = true) {\n if (isProbPub(secretKeyA) === true)\n throw new Error(\"first arg must be private key\");\n if (isProbPub(publicKeyB) === false)\n throw new Error(\"second arg must be public key\");\n const s = _normFnElement(Fn2, secretKeyA);\n const b = Point.fromHex(publicKeyB);\n return b.multiply(s).toBytes(isCompressed);\n }\n const utils = {\n isValidSecretKey,\n isValidPublicKey,\n randomSecretKey,\n // TODO: remove\n isValidPrivateKey: isValidSecretKey,\n randomPrivateKey: randomSecretKey,\n normPrivateKeyToScalar: (key) => _normFnElement(Fn2, key),\n precompute(windowSize = 8, point = Point.BASE) {\n return point.precompute(windowSize, false);\n }\n };\n return Object.freeze({ getPublicKey: getPublicKey2, getSharedSecret, keygen, Point, utils, lengths });\n }\n function ecdsa(Point, hash, ecdsaOpts = {}) {\n ahash(hash);\n _validateObject(ecdsaOpts, {}, {\n hmac: \"function\",\n lowS: \"boolean\",\n randomBytes: \"function\",\n bits2int: \"function\",\n bits2int_modN: \"function\"\n });\n const randomBytes2 = ecdsaOpts.randomBytes || randomBytes;\n const hmac2 = ecdsaOpts.hmac || ((key, ...msgs) => hmac(hash, key, concatBytes(...msgs)));\n const { Fp: Fp2, Fn: Fn2 } = Point;\n const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn2;\n const { keygen, getPublicKey: getPublicKey2, getSharedSecret, utils, lengths } = ecdh(Point, ecdsaOpts);\n const defaultSigOpts = {\n prehash: false,\n lowS: typeof ecdsaOpts.lowS === \"boolean\" ? ecdsaOpts.lowS : false,\n format: void 0,\n //'compact' as ECDSASigFormat,\n extraEntropy: false\n };\n const defaultSigOpts_format = \"compact\";\n function isBiggerThanHalfOrder(number2) {\n const HALF = CURVE_ORDER >> _1n7;\n return number2 > HALF;\n }\n function validateRS(title, num) {\n if (!Fn2.isValidNot0(num))\n throw new Error(`invalid signature ${title}: out of range 1..Point.Fn.ORDER`);\n return num;\n }\n function validateSigLength(bytes, format) {\n validateSigFormat(format);\n const size = lengths.signature;\n const sizer = format === \"compact\" ? size : format === \"recovered\" ? size + 1 : void 0;\n return _abytes2(bytes, sizer, `${format} signature`);\n }\n class Signature {\n constructor(r, s, recovery) {\n this.r = validateRS(\"r\", r);\n this.s = validateRS(\"s\", s);\n if (recovery != null)\n this.recovery = recovery;\n Object.freeze(this);\n }\n static fromBytes(bytes, format = defaultSigOpts_format) {\n validateSigLength(bytes, format);\n let recid;\n if (format === \"der\") {\n const { r: r2, s: s2 } = DER.toSig(_abytes2(bytes));\n return new Signature(r2, s2);\n }\n if (format === \"recovered\") {\n recid = bytes[0];\n format = \"compact\";\n bytes = bytes.subarray(1);\n }\n const L = Fn2.BYTES;\n const r = bytes.subarray(0, L);\n const s = bytes.subarray(L, L * 2);\n return new Signature(Fn2.fromBytes(r), Fn2.fromBytes(s), recid);\n }\n static fromHex(hex, format) {\n return this.fromBytes(hexToBytes(hex), format);\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(messageHash) {\n const FIELD_ORDER = Fp2.ORDER;\n const { r, s, recovery: rec } = this;\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error(\"recovery id invalid\");\n const hasCofactor = CURVE_ORDER * _2n5 < FIELD_ORDER;\n if (hasCofactor && rec > 1)\n throw new Error(\"recovery id is ambiguous for h>1 curve\");\n const radj = rec === 2 || rec === 3 ? r + CURVE_ORDER : r;\n if (!Fp2.isValid(radj))\n throw new Error(\"recovery id 2 or 3 invalid\");\n const x = Fp2.toBytes(radj);\n const R = Point.fromBytes(concatBytes(pprefix((rec & 1) === 0), x));\n const ir = Fn2.inv(radj);\n const h = bits2int_modN(ensureBytes(\"msgHash\", messageHash));\n const u1 = Fn2.create(-h * ir);\n const u2 = Fn2.create(s * ir);\n const Q = Point.BASE.multiplyUnsafe(u1).add(R.multiplyUnsafe(u2));\n if (Q.is0())\n throw new Error(\"point at infinify\");\n Q.assertValidity();\n return Q;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n toBytes(format = defaultSigOpts_format) {\n validateSigFormat(format);\n if (format === \"der\")\n return hexToBytes(DER.hexFromSig(this));\n const r = Fn2.toBytes(this.r);\n const s = Fn2.toBytes(this.s);\n if (format === \"recovered\") {\n if (this.recovery == null)\n throw new Error(\"recovery bit must be present\");\n return concatBytes(Uint8Array.of(this.recovery), r, s);\n }\n return concatBytes(r, s);\n }\n toHex(format) {\n return bytesToHex(this.toBytes(format));\n }\n // TODO: remove\n assertValidity() {\n }\n static fromCompact(hex) {\n return Signature.fromBytes(ensureBytes(\"sig\", hex), \"compact\");\n }\n static fromDER(hex) {\n return Signature.fromBytes(ensureBytes(\"sig\", hex), \"der\");\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, Fn2.neg(this.s), this.recovery) : this;\n }\n toDERRawBytes() {\n return this.toBytes(\"der\");\n }\n toDERHex() {\n return bytesToHex(this.toBytes(\"der\"));\n }\n toCompactRawBytes() {\n return this.toBytes(\"compact\");\n }\n toCompactHex() {\n return bytesToHex(this.toBytes(\"compact\"));\n }\n }\n const bits2int = ecdsaOpts.bits2int || function bits2int_def(bytes) {\n if (bytes.length > 8192)\n throw new Error(\"input is too large\");\n const num = bytesToNumberBE(bytes);\n const delta = bytes.length * 8 - fnBits;\n return delta > 0 ? num >> BigInt(delta) : num;\n };\n const bits2int_modN = ecdsaOpts.bits2int_modN || function bits2int_modN_def(bytes) {\n return Fn2.create(bits2int(bytes));\n };\n const ORDER_MASK = bitMask(fnBits);\n function int2octets(num) {\n aInRange(\"num < 2^\" + fnBits, num, _0n7, ORDER_MASK);\n return Fn2.toBytes(num);\n }\n function validateMsgAndHash(message, prehash) {\n _abytes2(message, void 0, \"message\");\n return prehash ? _abytes2(hash(message), void 0, \"prehashed message\") : message;\n }\n function prepSig(message, privateKey, opts) {\n if ([\"recovered\", \"canonical\"].some((k) => k in opts))\n throw new Error(\"sign() legacy options not supported\");\n const { lowS, prehash, extraEntropy } = validateSigOpts(opts, defaultSigOpts);\n message = validateMsgAndHash(message, prehash);\n const h1int = bits2int_modN(message);\n const d = _normFnElement(Fn2, privateKey);\n const seedArgs = [int2octets(d), int2octets(h1int)];\n if (extraEntropy != null && extraEntropy !== false) {\n const e = extraEntropy === true ? randomBytes2(lengths.secretKey) : extraEntropy;\n seedArgs.push(ensureBytes(\"extraEntropy\", e));\n }\n const seed = concatBytes(...seedArgs);\n const m = h1int;\n function k2sig(kBytes) {\n const k = bits2int(kBytes);\n if (!Fn2.isValidNot0(k))\n return;\n const ik = Fn2.inv(k);\n const q = Point.BASE.multiply(k).toAffine();\n const r = Fn2.create(q.x);\n if (r === _0n7)\n return;\n const s = Fn2.create(ik * Fn2.create(m + r * d));\n if (s === _0n7)\n return;\n let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n7);\n let normS = s;\n if (lowS && isBiggerThanHalfOrder(s)) {\n normS = Fn2.neg(s);\n recovery ^= 1;\n }\n return new Signature(r, normS, recovery);\n }\n return { seed, k2sig };\n }\n function sign2(message, secretKey, opts = {}) {\n message = ensureBytes(\"message\", message);\n const { seed, k2sig } = prepSig(message, secretKey, opts);\n const drbg = createHmacDrbg(hash.outputLen, Fn2.BYTES, hmac2);\n const sig = drbg(seed, k2sig);\n return sig;\n }\n function tryParsingSig(sg) {\n let sig = void 0;\n const isHex = typeof sg === \"string\" || isBytes(sg);\n const isObj = !isHex && sg !== null && typeof sg === \"object\" && typeof sg.r === \"bigint\" && typeof sg.s === \"bigint\";\n if (!isHex && !isObj)\n throw new Error(\"invalid signature, expected Uint8Array, hex string or Signature instance\");\n if (isObj) {\n sig = new Signature(sg.r, sg.s);\n } else if (isHex) {\n try {\n sig = Signature.fromBytes(ensureBytes(\"sig\", sg), \"der\");\n } catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n }\n if (!sig) {\n try {\n sig = Signature.fromBytes(ensureBytes(\"sig\", sg), \"compact\");\n } catch (error) {\n return false;\n }\n }\n }\n if (!sig)\n return false;\n return sig;\n }\n function verify2(signature, message, publicKey2, opts = {}) {\n const { lowS, prehash, format } = validateSigOpts(opts, defaultSigOpts);\n publicKey2 = ensureBytes(\"publicKey\", publicKey2);\n message = validateMsgAndHash(ensureBytes(\"message\", message), prehash);\n if (\"strict\" in opts)\n throw new Error(\"options.strict was renamed to lowS\");\n const sig = format === void 0 ? tryParsingSig(signature) : Signature.fromBytes(ensureBytes(\"sig\", signature), format);\n if (sig === false)\n return false;\n try {\n const P = Point.fromBytes(publicKey2);\n if (lowS && sig.hasHighS())\n return false;\n const { r, s } = sig;\n const h = bits2int_modN(message);\n const is2 = Fn2.inv(s);\n const u1 = Fn2.create(h * is2);\n const u2 = Fn2.create(r * is2);\n const R = Point.BASE.multiplyUnsafe(u1).add(P.multiplyUnsafe(u2));\n if (R.is0())\n return false;\n const v = Fn2.create(R.x);\n return v === r;\n } catch (e) {\n return false;\n }\n }\n function recoverPublicKey(signature, message, opts = {}) {\n const { prehash } = validateSigOpts(opts, defaultSigOpts);\n message = validateMsgAndHash(message, prehash);\n return Signature.fromBytes(signature, \"recovered\").recoverPublicKey(message).toBytes();\n }\n return Object.freeze({\n keygen,\n getPublicKey: getPublicKey2,\n getSharedSecret,\n utils,\n lengths,\n Point,\n sign: sign2,\n verify: verify2,\n recoverPublicKey,\n Signature,\n hash\n });\n }\n function _weierstrass_legacy_opts_to_new(c) {\n const CURVE = {\n a: c.a,\n b: c.b,\n p: c.Fp.ORDER,\n n: c.n,\n h: c.h,\n Gx: c.Gx,\n Gy: c.Gy\n };\n const Fp2 = c.Fp;\n let allowedLengths = c.allowedPrivateKeyLengths ? Array.from(new Set(c.allowedPrivateKeyLengths.map((l) => Math.ceil(l / 2)))) : void 0;\n const Fn2 = Field(CURVE.n, {\n BITS: c.nBitLength,\n allowedLengths,\n modFromBytes: c.wrapPrivateKey\n });\n const curveOpts = {\n Fp: Fp2,\n Fn: Fn2,\n allowInfinityPoint: c.allowInfinityPoint,\n endo: c.endo,\n isTorsionFree: c.isTorsionFree,\n clearCofactor: c.clearCofactor,\n fromBytes: c.fromBytes,\n toBytes: c.toBytes\n };\n return { CURVE, curveOpts };\n }\n function _ecdsa_legacy_opts_to_new(c) {\n const { CURVE, curveOpts } = _weierstrass_legacy_opts_to_new(c);\n const ecdsaOpts = {\n hmac: c.hmac,\n randomBytes: c.randomBytes,\n lowS: c.lowS,\n bits2int: c.bits2int,\n bits2int_modN: c.bits2int_modN\n };\n return { CURVE, curveOpts, hash: c.hash, ecdsaOpts };\n }\n function _ecdsa_new_output_to_legacy(c, _ecdsa) {\n const Point = _ecdsa.Point;\n return Object.assign({}, _ecdsa, {\n ProjectivePoint: Point,\n CURVE: Object.assign({}, c, nLength(Point.Fn.ORDER, Point.Fn.BITS))\n });\n }\n function weierstrass(c) {\n const { CURVE, curveOpts, hash, ecdsaOpts } = _ecdsa_legacy_opts_to_new(c);\n const Point = weierstrassN(CURVE, curveOpts);\n const signs = ecdsa(Point, hash, ecdsaOpts);\n return _ecdsa_new_output_to_legacy(c, signs);\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/_shortw_utils.js\n function createCurve(curveDef, defHash) {\n const create2 = (hash) => weierstrass({ ...curveDef, hash });\n return { ...create2(defHash), create: create2 };\n }\n\n // ../../../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/secp256k1.js\n var secp256k1_CURVE = {\n p: BigInt(\"0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f\"),\n n: BigInt(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\"),\n h: BigInt(1),\n a: BigInt(0),\n b: BigInt(7),\n Gx: BigInt(\"0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\"),\n Gy: BigInt(\"0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8\")\n };\n var secp256k1_ENDO = {\n beta: BigInt(\"0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee\"),\n basises: [\n [BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\"), -BigInt(\"0xe4437ed6010e88286f547fa90abfe4c3\")],\n [BigInt(\"0x114ca50f7a8e2f3f657c1108d9d44cfd8\"), BigInt(\"0x3086d221a7d46bcde86c90e49284eb15\")]\n ]\n };\n var _2n6 = /* @__PURE__ */ BigInt(2);\n function sqrtMod(y) {\n const P = secp256k1_CURVE.p;\n const _3n4 = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b2 = y * y * y % P;\n const b3 = b2 * b2 * y % P;\n const b6 = pow2(b3, _3n4, P) * b3 % P;\n const b9 = pow2(b6, _3n4, P) * b3 % P;\n const b11 = pow2(b9, _2n6, P) * b2 % P;\n const b22 = pow2(b11, _11n, P) * b11 % P;\n const b44 = pow2(b22, _22n, P) * b22 % P;\n const b88 = pow2(b44, _44n, P) * b44 % P;\n const b176 = pow2(b88, _88n, P) * b88 % P;\n const b220 = pow2(b176, _44n, P) * b44 % P;\n const b223 = pow2(b220, _3n4, P) * b3 % P;\n const t1 = pow2(b223, _23n, P) * b22 % P;\n const t2 = pow2(t1, _6n, P) * b2 % P;\n const root = pow2(t2, _2n6, P);\n if (!Fpk1.eql(Fpk1.sqr(root), y))\n throw new Error(\"Cannot find square root\");\n return root;\n }\n var Fpk1 = Field(secp256k1_CURVE.p, { sqrt: sqrtMod });\n var secp256k1 = createCurve({ ...secp256k1_CURVE, Fp: Fpk1, lowS: true, endo: secp256k1_ENDO }, sha256);\n\n // ../../../node_modules/.pnpm/@solana+web3.js@1.98.4_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10/node_modules/@solana/web3.js/lib/index.browser.esm.js\n var generatePrivateKey = ed25519.utils.randomPrivateKey;\n var generateKeypair = () => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey2 = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey2, 32);\n return {\n publicKey: publicKey2,\n secretKey\n };\n };\n var getPublicKey = ed25519.getPublicKey;\n function isOnCurve(publicKey2) {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey2);\n return true;\n } catch {\n return false;\n }\n }\n var sign = (message, secretKey) => ed25519.sign(message, secretKey.slice(0, 32));\n var verify = ed25519.verify;\n var toBuffer = (arr) => {\n if (Buffer2.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer2.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer2.from(arr);\n }\n };\n var Struct2 = class {\n constructor(properties) {\n Object.assign(this, properties);\n }\n encode() {\n return Buffer2.from((0, import_borsh.serialize)(SOLANA_SCHEMA, this));\n }\n static decode(data) {\n return (0, import_borsh.deserialize)(SOLANA_SCHEMA, this, data);\n }\n static decodeUnchecked(data) {\n return (0, import_borsh.deserializeUnchecked)(SOLANA_SCHEMA, this, data);\n }\n };\n var SOLANA_SCHEMA = /* @__PURE__ */ new Map();\n var _PublicKey;\n var MAX_SEED_LENGTH = 32;\n var PUBLIC_KEY_LENGTH = 32;\n function isPublicKeyData(value) {\n return value._bn !== void 0;\n }\n var uniquePublicKeyCounter = 1;\n var PublicKey = class _PublicKey2 extends Struct2 {\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value) {\n super({});\n this._bn = void 0;\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === \"string\") {\n const decoded = import_bs58.default.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new import_bn.default(decoded);\n } else {\n this._bn = new import_bn.default(value);\n }\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique() {\n const key = new _PublicKey2(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new _PublicKey2(key.toBuffer());\n }\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey2) {\n return this._bn.eq(publicKey2._bn);\n }\n /**\n * Return the base-58 representation of the public key\n */\n toBase58() {\n return import_bs58.default.encode(this.toBytes());\n }\n toJSON() {\n return this.toBase58();\n }\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes() {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer() {\n const b = this._bn.toArrayLike(Buffer2);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n const zeroPad = Buffer2.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n get [Symbol.toStringTag]() {\n return `PublicKey(${this.toString()})`;\n }\n /**\n * Return the base-58 representation of the public key\n */\n toString() {\n return this.toBase58();\n }\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(fromPublicKey, seed, programId) {\n const buffer = Buffer2.concat([fromPublicKey.toBuffer(), Buffer2.from(seed), programId.toBuffer()]);\n const publicKeyBytes = sha2562(buffer);\n return new _PublicKey2(publicKeyBytes);\n }\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(seeds, programId) {\n let buffer = Buffer2.alloc(0);\n seeds.forEach(function(seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer2.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer2.concat([buffer, programId.toBuffer(), Buffer2.from(\"ProgramDerivedAddress\")]);\n const publicKeyBytes = sha2562(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new _PublicKey2(publicKeyBytes);\n }\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(seeds, programId) {\n return this.createProgramAddressSync(seeds, programId);\n }\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(seeds, programId) {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer2.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(seeds, programId) {\n return this.findProgramAddressSync(seeds, programId);\n }\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData) {\n const pubkey = new _PublicKey2(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n };\n _PublicKey = PublicKey;\n PublicKey.default = new _PublicKey(\"11111111111111111111111111111111\");\n SOLANA_SCHEMA.set(PublicKey, {\n kind: \"struct\",\n fields: [[\"_bn\", \"u256\"]]\n });\n var BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\"BPFLoader1111111111111111111111111111111111\");\n var PACKET_DATA_SIZE = 1280 - 40 - 8;\n var VERSION_PREFIX_MASK = 127;\n var SIGNATURE_LENGTH_IN_BYTES = 64;\n var TransactionExpiredBlockheightExceededError = class extends Error {\n constructor(signature) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = void 0;\n this.signature = signature;\n }\n };\n Object.defineProperty(TransactionExpiredBlockheightExceededError.prototype, \"name\", {\n value: \"TransactionExpiredBlockheightExceededError\"\n });\n var TransactionExpiredTimeoutError = class extends Error {\n constructor(signature, timeoutSeconds) {\n super(`Transaction was not confirmed in ${timeoutSeconds.toFixed(2)} seconds. It is unknown if it succeeded or failed. Check signature ${signature} using the Solana Explorer or CLI tools.`);\n this.signature = void 0;\n this.signature = signature;\n }\n };\n Object.defineProperty(TransactionExpiredTimeoutError.prototype, \"name\", {\n value: \"TransactionExpiredTimeoutError\"\n });\n var TransactionExpiredNonceInvalidError = class extends Error {\n constructor(signature) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = void 0;\n this.signature = signature;\n }\n };\n Object.defineProperty(TransactionExpiredNonceInvalidError.prototype, \"name\", {\n value: \"TransactionExpiredNonceInvalidError\"\n });\n var MessageAccountKeys = class {\n constructor(staticAccountKeys, accountKeysFromLookups) {\n this.staticAccountKeys = void 0;\n this.accountKeysFromLookups = void 0;\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n keySegments() {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n get(index) {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n get length() {\n return this.keySegments().flat().length;\n }\n compileInstructions(instructions) {\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error(\"Account index overflow encountered during compilation\");\n }\n const keyIndexMap = /* @__PURE__ */ new Map();\n this.keySegments().flat().forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n const findKeyIndex = (key) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === void 0)\n throw new Error(\"Encountered an unknown instruction account key during compilation\");\n return keyIndex;\n };\n return instructions.map((instruction) => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map((meta) => findKeyIndex(meta.pubkey)),\n data: instruction.data\n };\n });\n }\n };\n var publicKey = (property = \"publicKey\") => {\n return BufferLayout.blob(32, property);\n };\n var rustString = (property = \"string\") => {\n const rsl = BufferLayout.struct([BufferLayout.u32(\"length\"), BufferLayout.u32(\"lengthPadding\"), BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), \"chars\")], property);\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n const rslShim = rsl;\n rslShim.decode = (b, offset2) => {\n const data = _decode(b, offset2);\n return data[\"chars\"].toString();\n };\n rslShim.encode = (str, b, offset2) => {\n const data = {\n chars: Buffer2.from(str, \"utf8\")\n };\n return _encode(data, b, offset2);\n };\n rslShim.alloc = (str) => {\n return BufferLayout.u32().span + BufferLayout.u32().span + Buffer2.from(str, \"utf8\").length;\n };\n return rslShim;\n };\n var authorized = (property = \"authorized\") => {\n return BufferLayout.struct([publicKey(\"staker\"), publicKey(\"withdrawer\")], property);\n };\n var lockup = (property = \"lockup\") => {\n return BufferLayout.struct([BufferLayout.ns64(\"unixTimestamp\"), BufferLayout.ns64(\"epoch\"), publicKey(\"custodian\")], property);\n };\n var voteInit = (property = \"voteInit\") => {\n return BufferLayout.struct([publicKey(\"nodePubkey\"), publicKey(\"authorizedVoter\"), publicKey(\"authorizedWithdrawer\"), BufferLayout.u8(\"commission\")], property);\n };\n var voteAuthorizeWithSeedArgs = (property = \"voteAuthorizeWithSeedArgs\") => {\n return BufferLayout.struct([BufferLayout.u32(\"voteAuthorizationType\"), publicKey(\"currentAuthorityDerivedKeyOwnerPubkey\"), rustString(\"currentAuthorityDerivedKeySeed\"), publicKey(\"newAuthorized\")], property);\n };\n function getAlloc(type2, fields) {\n const getItemAlloc = (item) => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === \"function\") {\n return item.alloc(fields[item.property]);\n } else if (\"count\" in item && \"elementLayout\" in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if (\"fields\" in item) {\n return getAlloc({\n layout: item\n }, fields[item.property]);\n }\n return 0;\n };\n let alloc = 0;\n type2.layout.fields.forEach((item) => {\n alloc += getItemAlloc(item);\n });\n return alloc;\n }\n function decodeLength(bytes) {\n let len = 0;\n let size = 0;\n for (; ; ) {\n let elem = bytes.shift();\n len |= (elem & 127) << size * 7;\n size += 1;\n if ((elem & 128) === 0) {\n break;\n }\n }\n return len;\n }\n function encodeLength(bytes, len) {\n let rem_len = len;\n for (; ; ) {\n let elem = rem_len & 127;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 128;\n bytes.push(elem);\n }\n }\n }\n function assert2(condition, message) {\n if (!condition) {\n throw new Error(message || \"Assertion failed\");\n }\n }\n var CompiledKeys = class _CompiledKeys {\n constructor(payer, keyMetaMap) {\n this.payer = void 0;\n this.keyMetaMap = void 0;\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n static compile(instructions, payer) {\n const keyMetaMap = /* @__PURE__ */ new Map();\n const getOrInsertDefault = (pubkey) => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === void 0) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n return new _CompiledKeys(payer, keyMetaMap);\n }\n getMessageComponents() {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert2(mapEntries.length <= 256, \"Max static account keys length exceeded\");\n const writableSigners = mapEntries.filter(([, meta]) => meta.isSigner && meta.isWritable);\n const readonlySigners = mapEntries.filter(([, meta]) => meta.isSigner && !meta.isWritable);\n const writableNonSigners = mapEntries.filter(([, meta]) => !meta.isSigner && meta.isWritable);\n const readonlyNonSigners = mapEntries.filter(([, meta]) => !meta.isSigner && !meta.isWritable);\n const header = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length\n };\n {\n assert2(writableSigners.length > 0, \"Expected at least one writable signer key\");\n const [payerAddress] = writableSigners[0];\n assert2(payerAddress === this.payer.toBase58(), \"Expected first writable signer key to be the fee payer\");\n }\n const staticAccountKeys = [...writableSigners.map(([address]) => new PublicKey(address)), ...readonlySigners.map(([address]) => new PublicKey(address)), ...writableNonSigners.map(([address]) => new PublicKey(address)), ...readonlyNonSigners.map(([address]) => new PublicKey(address))];\n return [header, staticAccountKeys];\n }\n extractTableLookup(lookupTable) {\n const [writableIndexes, drainedWritableKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, (keyMeta) => !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable);\n const [readonlyIndexes, drainedReadonlyKeys] = this.drainKeysFoundInLookupTable(lookupTable.state.addresses, (keyMeta) => !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable);\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n return [{\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes\n }, {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys\n }];\n }\n /** @internal */\n drainKeysFoundInLookupTable(lookupTableEntries, keyMetaFilter) {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex((entry) => entry.equals(key));\n if (lookupTableIndex >= 0) {\n assert2(lookupTableIndex < 256, \"Max lookup table index exceeded\");\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n return [lookupTableIndexes, drainedKeys];\n }\n };\n var END_OF_BUFFER_ERROR_MESSAGE = \"Reached end of buffer unexpectedly\";\n function guardedShift(byteArray) {\n if (byteArray.length === 0) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.shift();\n }\n function guardedSplice(byteArray, ...args) {\n const [start] = args;\n if (args.length === 2 ? start + (args[1] ?? 0) > byteArray.length : start >= byteArray.length) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.splice(...args);\n }\n var Message = class _Message {\n constructor(args) {\n this.header = void 0;\n this.accountKeys = void 0;\n this.recentBlockhash = void 0;\n this.instructions = void 0;\n this.indexToProgramIds = /* @__PURE__ */ new Map();\n this.header = args.header;\n this.accountKeys = args.accountKeys.map((account) => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach((ix) => this.indexToProgramIds.set(ix.programIdIndex, this.accountKeys[ix.programIdIndex]));\n }\n get version() {\n return \"legacy\";\n }\n get staticAccountKeys() {\n return this.accountKeys;\n }\n get compiledInstructions() {\n return this.instructions.map((ix) => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: import_bs58.default.decode(ix.data)\n }));\n }\n get addressTableLookups() {\n return [];\n }\n getAccountKeys() {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n static compile(args) {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map((ix) => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: import_bs58.default.encode(ix.data)\n }));\n return new _Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions\n });\n }\n isAccountSigner(index) {\n return index < this.header.numRequiredSignatures;\n }\n isAccountWritable(index) {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts = numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts = numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n isProgramId(index) {\n return this.indexToProgramIds.has(index);\n }\n programIds() {\n return [...this.indexToProgramIds.values()];\n }\n nonProgramIds() {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n serialize() {\n const numKeys = this.accountKeys.length;\n let keyCount = [];\n encodeLength(keyCount, numKeys);\n const instructions = this.instructions.map((instruction) => {\n const {\n accounts,\n programIdIndex\n } = instruction;\n const data = Array.from(import_bs58.default.decode(instruction.data));\n let keyIndicesCount = [];\n encodeLength(keyIndicesCount, accounts.length);\n let dataCount = [];\n encodeLength(dataCount, data.length);\n return {\n programIdIndex,\n keyIndicesCount: Buffer2.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer2.from(dataCount),\n data\n };\n });\n let instructionCount = [];\n encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer2.alloc(PACKET_DATA_SIZE);\n Buffer2.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n instructions.forEach((instruction) => {\n const instructionLayout = BufferLayout.struct([BufferLayout.u8(\"programIdIndex\"), BufferLayout.blob(instruction.keyIndicesCount.length, \"keyIndicesCount\"), BufferLayout.seq(BufferLayout.u8(\"keyIndex\"), instruction.keyIndices.length, \"keyIndices\"), BufferLayout.blob(instruction.dataLength.length, \"dataLength\"), BufferLayout.seq(BufferLayout.u8(\"userdatum\"), instruction.data.length, \"data\")]);\n const length2 = instructionLayout.encode(instruction, instructionBuffer, instructionBufferLength);\n instructionBufferLength += length2;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n const signDataLayout = BufferLayout.struct([BufferLayout.blob(1, \"numRequiredSignatures\"), BufferLayout.blob(1, \"numReadonlySignedAccounts\"), BufferLayout.blob(1, \"numReadonlyUnsignedAccounts\"), BufferLayout.blob(keyCount.length, \"keyCount\"), BufferLayout.seq(publicKey(\"key\"), numKeys, \"keys\"), publicKey(\"recentBlockhash\")]);\n const transaction = {\n numRequiredSignatures: Buffer2.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer2.from([this.header.numReadonlySignedAccounts]),\n numReadonlyUnsignedAccounts: Buffer2.from([this.header.numReadonlyUnsignedAccounts]),\n keyCount: Buffer2.from(keyCount),\n keys: this.accountKeys.map((key) => toBuffer(key.toBytes())),\n recentBlockhash: import_bs58.default.decode(this.recentBlockhash)\n };\n let signData = Buffer2.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer) {\n let byteArray = [...buffer];\n const numRequiredSignatures = guardedShift(byteArray);\n if (numRequiredSignatures !== (numRequiredSignatures & VERSION_PREFIX_MASK)) {\n throw new Error(\"Versioned messages must be deserialized with VersionedMessage.deserialize()\");\n }\n const numReadonlySignedAccounts = guardedShift(byteArray);\n const numReadonlyUnsignedAccounts = guardedShift(byteArray);\n const accountCount = decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer2.from(account)));\n }\n const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n const instructionCount = decodeLength(byteArray);\n let instructions = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountCount2 = decodeLength(byteArray);\n const accounts = guardedSplice(byteArray, 0, accountCount2);\n const dataLength = decodeLength(byteArray);\n const dataSlice = guardedSplice(byteArray, 0, dataLength);\n const data = import_bs58.default.encode(Buffer2.from(dataSlice));\n instructions.push({\n programIdIndex,\n accounts,\n data\n });\n }\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n },\n recentBlockhash: import_bs58.default.encode(Buffer2.from(recentBlockhash)),\n accountKeys,\n instructions\n };\n return new _Message(messageArgs);\n }\n };\n var DEFAULT_SIGNATURE = Buffer2.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n var TransactionInstruction = class {\n constructor(opts) {\n this.keys = void 0;\n this.programId = void 0;\n this.data = Buffer2.alloc(0);\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n /**\n * @internal\n */\n toJSON() {\n return {\n keys: this.keys.map(({\n pubkey,\n isSigner,\n isWritable\n }) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable\n })),\n programId: this.programId.toJSON(),\n data: [...this.data]\n };\n }\n };\n var Transaction = class _Transaction {\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature() {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n /**\n * The transaction fee payer\n */\n // Construct a transaction with a blockhash and lastValidBlockHeight\n // Construct a transaction using a durable nonce\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n /**\n * Construct an empty Transaction\n */\n constructor(opts) {\n this.signatures = [];\n this.feePayer = void 0;\n this.instructions = [];\n this.recentBlockhash = void 0;\n this.lastValidBlockHeight = void 0;\n this.nonceInfo = void 0;\n this.minNonceContextSlot = void 0;\n this._message = void 0;\n this._json = void 0;\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, \"nonceInfo\")) {\n const {\n minContextSlot,\n nonceInfo\n } = opts;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (Object.prototype.hasOwnProperty.call(opts, \"lastValidBlockHeight\")) {\n const {\n blockhash,\n lastValidBlockHeight\n } = opts;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {\n recentBlockhash,\n nonceInfo\n } = opts;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n /**\n * @internal\n */\n toJSON() {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON()\n } : null,\n instructions: this.instructions.map((instruction) => instruction.toJSON()),\n signers: this.signatures.map(({\n publicKey: publicKey2\n }) => {\n return publicKey2.toJSON();\n })\n };\n }\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(...items) {\n if (items.length === 0) {\n throw new Error(\"No instructions\");\n }\n items.forEach((item) => {\n if (\"instructions\" in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if (\"data\" in item && \"programId\" in item && \"keys\" in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n /**\n * Compile transaction data\n */\n compileMessage() {\n if (this._message && JSON.stringify(this.toJSON()) === JSON.stringify(this._json)) {\n return this._message;\n }\n let recentBlockhash;\n let instructions;\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error(\"Transaction recentBlockhash required\");\n }\n if (instructions.length < 1) {\n console.warn(\"No instructions provided\");\n }\n let feePayer;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error(\"Transaction fee payer required\");\n }\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === void 0) {\n throw new Error(`Transaction instruction index ${i} has undefined program id`);\n }\n }\n const programIds = [];\n const accountMetas = [];\n instructions.forEach((instruction) => {\n instruction.keys.forEach((accountMeta) => {\n accountMetas.push({\n ...accountMeta\n });\n });\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n programIds.forEach((programId) => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false\n });\n });\n const uniqueMetas = [];\n accountMetas.forEach((accountMeta) => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex((x) => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable = uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner = uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n uniqueMetas.sort(function(x, y) {\n if (x.isSigner !== y.isSigner) {\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n return x.isWritable ? -1 : 1;\n }\n const options = {\n localeMatcher: \"best fit\",\n usage: \"sort\",\n sensitivity: \"variant\",\n ignorePunctuation: false,\n numeric: false,\n caseFirst: \"lower\"\n };\n return x.pubkey.toBase58().localeCompare(y.pubkey.toBase58(), \"en\", options);\n });\n const feePayerIndex = uniqueMetas.findIndex((x) => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true\n });\n }\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex((x) => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\"Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release.\");\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n const signedKeys = [];\n const unsignedKeys = [];\n uniqueMetas.forEach(({\n pubkey,\n isSigner,\n isWritable\n }) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions = instructions.map((instruction) => {\n const {\n data,\n programId\n } = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map((meta) => accountKeys.indexOf(meta.pubkey.toString())),\n data: import_bs58.default.encode(data)\n };\n });\n compiledInstructions.forEach((instruction) => {\n assert2(instruction.programIdIndex >= 0);\n instruction.accounts.forEach((keyIndex) => assert2(keyIndex >= 0));\n });\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions\n });\n }\n /**\n * @internal\n */\n _compile() {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(0, message.header.numRequiredSignatures);\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n if (valid)\n return message;\n }\n this.signatures = signedKeys.map((publicKey2) => ({\n signature: null,\n publicKey: publicKey2\n }));\n return message;\n }\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage() {\n return this._compile().serialize();\n }\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection) {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers) {\n if (signers.length === 0) {\n throw new Error(\"No signers\");\n }\n const seen = /* @__PURE__ */ new Set();\n this.signatures = signers.filter((publicKey2) => {\n const key = publicKey2.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n }).map((publicKey2) => ({\n signature: null,\n publicKey: publicKey2\n }));\n }\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers) {\n if (signers.length === 0) {\n throw new Error(\"No signers\");\n }\n const seen = /* @__PURE__ */ new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n this.signatures = uniqueSigners.map((signer) => ({\n signature: null,\n publicKey: signer.publicKey\n }));\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers) {\n if (signers.length === 0) {\n throw new Error(\"No signers\");\n }\n const seen = /* @__PURE__ */ new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n /**\n * @internal\n */\n _partialSign(message, ...signers) {\n const signData = message.serialize();\n signers.forEach((signer) => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey, signature) {\n this._compile();\n this._addSignature(pubkey, signature);\n }\n /**\n * @internal\n */\n _addSignature(pubkey, signature) {\n assert2(signature.length === 64);\n const index = this.signatures.findIndex((sigpair) => pubkey.equals(sigpair.publicKey));\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n this.signatures[index].signature = Buffer2.from(signature);\n }\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures = true) {\n const signatureErrors = this._getMessageSignednessErrors(this.serializeMessage(), requireAllSignatures);\n return !signatureErrors;\n }\n /**\n * @internal\n */\n _getMessageSignednessErrors(message, requireAllSignatures) {\n const errors = {};\n for (const {\n signature,\n publicKey: publicKey2\n } of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n (errors.missing ||= []).push(publicKey2);\n }\n } else {\n if (!verify(signature, message, publicKey2.toBytes())) {\n (errors.invalid ||= []).push(publicKey2);\n }\n }\n }\n return errors.invalid || errors.missing ? errors : void 0;\n }\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config) {\n const {\n requireAllSignatures,\n verifySignatures\n } = Object.assign({\n requireAllSignatures: true,\n verifySignatures: true\n }, config);\n const signData = this.serializeMessage();\n if (verifySignatures) {\n const sigErrors = this._getMessageSignednessErrors(signData, requireAllSignatures);\n if (sigErrors) {\n let errorMessage = \"Signature verification failed.\";\n if (sigErrors.invalid) {\n errorMessage += `\nInvalid signature for public key${sigErrors.invalid.length === 1 ? \"\" : \"(s)\"} [\\`${sigErrors.invalid.map((p) => p.toBase58()).join(\"`, `\")}\\`].`;\n }\n if (sigErrors.missing) {\n errorMessage += `\nMissing signature for public key${sigErrors.missing.length === 1 ? \"\" : \"(s)\"} [\\`${sigErrors.missing.map((p) => p.toBase58()).join(\"`, `\")}\\`].`;\n }\n throw new Error(errorMessage);\n }\n }\n return this._serialize(signData);\n }\n /**\n * @internal\n */\n _serialize(signData) {\n const {\n signatures\n } = this;\n const signatureCount = [];\n encodeLength(signatureCount, signatures.length);\n const transactionLength = signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer2.alloc(transactionLength);\n assert2(signatures.length < 256);\n Buffer2.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({\n signature\n }, index) => {\n if (signature !== null) {\n assert2(signature.length === 64, `signature has invalid length`);\n Buffer2.from(signature).copy(wireTransaction, signatureCount.length + index * 64);\n }\n });\n signData.copy(wireTransaction, signatureCount.length + signatures.length * 64);\n assert2(wireTransaction.length <= PACKET_DATA_SIZE, `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`);\n return wireTransaction;\n }\n /**\n * Deprecated method\n * @internal\n */\n get keys() {\n assert2(this.instructions.length === 1);\n return this.instructions[0].keys.map((keyObj) => keyObj.pubkey);\n }\n /**\n * Deprecated method\n * @internal\n */\n get programId() {\n assert2(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n /**\n * Deprecated method\n * @internal\n */\n get data() {\n assert2(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer) {\n let byteArray = [...buffer];\n const signatureCount = decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(import_bs58.default.encode(Buffer2.from(signature)));\n }\n return _Transaction.populate(Message.from(byteArray), signatures);\n }\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(message, signatures = []) {\n const transaction = new _Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature: signature == import_bs58.default.encode(DEFAULT_SIGNATURE) ? null : import_bs58.default.decode(signature),\n publicKey: message.accountKeys[index]\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n message.instructions.forEach((instruction) => {\n const keys = instruction.accounts.map((account) => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner: transaction.signatures.some((keyObj) => keyObj.publicKey.toString() === pubkey.toString()) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account)\n };\n });\n transaction.instructions.push(new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: import_bs58.default.decode(instruction.data)\n }));\n });\n transaction._message = message;\n transaction._json = transaction.toJSON();\n return transaction;\n }\n };\n var NUM_TICKS_PER_SECOND = 160;\n var DEFAULT_TICKS_PER_SLOT = 64;\n var NUM_SLOTS_PER_SECOND = NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n var MS_PER_SLOT = 1e3 / NUM_SLOTS_PER_SECOND;\n var SYSVAR_CLOCK_PUBKEY = new PublicKey(\"SysvarC1ock11111111111111111111111111111111\");\n var SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\"SysvarEpochSchedu1e111111111111111111111111\");\n var SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\"Sysvar1nstructions1111111111111111111111111\");\n var SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\"SysvarRecentB1ockHashes11111111111111111111\");\n var SYSVAR_RENT_PUBKEY = new PublicKey(\"SysvarRent111111111111111111111111111111111\");\n var SYSVAR_REWARDS_PUBKEY = new PublicKey(\"SysvarRewards111111111111111111111111111111\");\n var SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\"SysvarS1otHashes111111111111111111111111111\");\n var SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\"SysvarS1otHistory11111111111111111111111111\");\n var SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\"SysvarStakeHistory1111111111111111111111111\");\n var SendTransactionError = class extends Error {\n constructor({\n action,\n signature,\n transactionMessage,\n logs\n }) {\n const maybeLogsOutput = logs ? `Logs: \n${JSON.stringify(logs.slice(-10), null, 2)}. ` : \"\";\n const guideText = \"\\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.\";\n let message;\n switch (action) {\n case \"send\":\n message = `Transaction ${signature} resulted in an error. \n${transactionMessage}. ` + maybeLogsOutput + guideText;\n break;\n case \"simulate\":\n message = `Simulation failed. \nMessage: ${transactionMessage}. \n` + maybeLogsOutput + guideText;\n break;\n default: {\n message = `Unknown action '${/* @__PURE__ */ ((a) => a)(action)}'`;\n }\n }\n super(message);\n this.signature = void 0;\n this.transactionMessage = void 0;\n this.transactionLogs = void 0;\n this.signature = signature;\n this.transactionMessage = transactionMessage;\n this.transactionLogs = logs ? logs : void 0;\n }\n get transactionError() {\n return {\n message: this.transactionMessage,\n logs: Array.isArray(this.transactionLogs) ? this.transactionLogs : void 0\n };\n }\n /* @deprecated Use `await getLogs()` instead */\n get logs() {\n const cachedLogs = this.transactionLogs;\n if (cachedLogs != null && typeof cachedLogs === \"object\" && \"then\" in cachedLogs) {\n return void 0;\n }\n return cachedLogs;\n }\n async getLogs(connection) {\n if (!Array.isArray(this.transactionLogs)) {\n this.transactionLogs = new Promise((resolve, reject) => {\n connection.getTransaction(this.signature).then((tx) => {\n if (tx && tx.meta && tx.meta.logMessages) {\n const logs = tx.meta.logMessages;\n this.transactionLogs = logs;\n resolve(logs);\n } else {\n reject(new Error(\"Log messages not found\"));\n }\n }).catch(reject);\n });\n }\n return await this.transactionLogs;\n }\n };\n async function sendAndConfirmTransaction(connection, transaction, signers, options) {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot\n };\n const signature = await connection.sendTransaction(transaction, signers, sendOptions);\n let status;\n if (transaction.recentBlockhash != null && transaction.lastValidBlockHeight != null) {\n status = (await connection.confirmTransaction({\n abortSignal: options?.abortSignal,\n signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight\n }, options && options.commitment)).value;\n } else if (transaction.minNonceContextSlot != null && transaction.nonceInfo != null) {\n const {\n nonceInstruction\n } = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (await connection.confirmTransaction({\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature\n }, options && options.commitment)).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\"sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.\");\n }\n status = (await connection.confirmTransaction(signature, options && options.commitment)).value;\n }\n if (status.err) {\n if (signature != null) {\n throw new SendTransactionError({\n action: \"send\",\n signature,\n transactionMessage: `Status: (${JSON.stringify(status)})`\n });\n }\n throw new Error(`Transaction ${signature} failed (${JSON.stringify(status)})`);\n }\n return signature;\n }\n function sleep(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n function encodeData(type2, fields) {\n const allocLength = type2.layout.span >= 0 ? type2.layout.span : getAlloc(type2, fields);\n const data = Buffer2.alloc(allocLength);\n const layoutFields = Object.assign({\n instruction: type2.index\n }, fields);\n type2.layout.encode(layoutFields, data);\n return data;\n }\n var FeeCalculatorLayout = BufferLayout.nu64(\"lamportsPerSignature\");\n var NonceAccountLayout = BufferLayout.struct([BufferLayout.u32(\"version\"), BufferLayout.u32(\"state\"), publicKey(\"authorizedPubkey\"), publicKey(\"nonce\"), BufferLayout.struct([FeeCalculatorLayout], \"feeCalculator\")]);\n var NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n function u64(property) {\n const layout = (0, import_buffer_layout.blob)(8, property);\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n const bigIntLayout = layout;\n const codec = getU64Codec();\n bigIntLayout.decode = (buffer, offset2) => {\n const src = decode(buffer, offset2);\n return codec.decode(src);\n };\n bigIntLayout.encode = (bigInt, buffer, offset2) => {\n const src = codec.encode(bigInt);\n return encode(src, buffer, offset2);\n };\n return bigIntLayout;\n }\n var SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze({\n Create: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\"), BufferLayout.ns64(\"space\"), publicKey(\"programId\")])\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"programId\")])\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), u64(\"lamports\")])\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"base\"), rustString(\"seed\"), BufferLayout.ns64(\"lamports\"), BufferLayout.ns64(\"space\"), publicKey(\"programId\")])\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\")])\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"authorized\")])\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"authorized\")])\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"space\")])\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"base\"), rustString(\"seed\"), BufferLayout.ns64(\"space\"), publicKey(\"programId\")])\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"base\"), rustString(\"seed\"), publicKey(\"programId\")])\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), u64(\"lamports\"), rustString(\"seed\"), publicKey(\"programId\")])\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n }\n });\n var SystemProgram = class _SystemProgram {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the System program\n */\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type2, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.newAccountPubkey,\n isSigner: true,\n isWritable: true\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(params) {\n let data;\n let keys;\n if (\"basePubkey\" in params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type2, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.fromPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }];\n } else {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type2, {\n lamports: BigInt(params.lamports)\n });\n keys = [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(params) {\n let data;\n let keys;\n if (\"basePubkey\" in params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type2, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }];\n } else {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type2, {\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: true,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type2, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n let keys = [{\n pubkey: params.fromPubkey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: params.newAccountPubkey,\n isSigner: false,\n isWritable: true\n }];\n if (!params.basePubkey.equals(params.fromPubkey)) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(params) {\n const transaction = new Transaction();\n if (\"basePubkey\" in params && \"seed\" in params) {\n transaction.add(_SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId\n }));\n } else {\n transaction.add(_SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId\n }));\n }\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey\n };\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type2, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer())\n });\n const instructionData = {\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type2);\n const instructionData = {\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type2, {\n lamports: params.lamports\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type2, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer())\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: params.noncePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(params) {\n let data;\n let keys;\n if (\"basePubkey\" in params) {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type2, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer())\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false\n }];\n } else {\n const type2 = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type2, {\n space: params.space\n });\n keys = [{\n pubkey: params.accountPubkey,\n isSigner: true,\n isWritable: true\n }];\n }\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data\n });\n }\n };\n SystemProgram.programId = new PublicKey(\"11111111111111111111111111111111\");\n var CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n var Loader = class _Loader {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Amount of program data placed in each load Transaction\n */\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength) {\n return 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / _Loader.chunkSize) + 1 + // Add one for Create transaction\n 1);\n }\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(connection, payer, program, programId, data) {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(data.length);\n const programInfo = await connection.getAccountInfo(program.publicKey, \"confirmed\");\n let transaction = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error(\"Program load failed, account is already executable\");\n return false;\n }\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length\n }));\n }\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId\n }));\n }\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports\n }));\n }\n } else {\n transaction = new Transaction().add(SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId\n }));\n }\n if (transaction !== null) {\n await sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: \"confirmed\"\n });\n }\n }\n const dataLayout = BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.u32(\"offset\"), BufferLayout.u32(\"bytesLength\"), BufferLayout.u32(\"bytesLengthPadding\"), BufferLayout.seq(BufferLayout.u8(\"byte\"), BufferLayout.offset(BufferLayout.u32(), -8), \"bytes\")]);\n const chunkSize = _Loader.chunkSize;\n let offset2 = 0;\n let array2 = data;\n let transactions = [];\n while (array2.length > 0) {\n const bytes = array2.slice(0, chunkSize);\n const data2 = Buffer2.alloc(chunkSize + 16);\n dataLayout.encode({\n instruction: 0,\n // Load instruction\n offset: offset2,\n bytes,\n bytesLength: 0,\n bytesLengthPadding: 0\n }, data2);\n const transaction = new Transaction().add({\n keys: [{\n pubkey: program.publicKey,\n isSigner: true,\n isWritable: true\n }],\n programId,\n data: data2\n });\n transactions.push(sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: \"confirmed\"\n }));\n if (connection._rpcEndpoint.includes(\"solana.com\")) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1e3 / REQUESTS_PER_SECOND);\n }\n offset2 += chunkSize;\n array2 = array2.slice(chunkSize);\n }\n await Promise.all(transactions);\n {\n const dataLayout2 = BufferLayout.struct([BufferLayout.u32(\"instruction\")]);\n const data2 = Buffer2.alloc(dataLayout2.span);\n dataLayout2.encode({\n instruction: 1\n // Finalize instruction\n }, data2);\n const transaction = new Transaction().add({\n keys: [{\n pubkey: program.publicKey,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId,\n data: data2\n });\n const deployCommitment = \"processed\";\n const finalizeSignature = await connection.sendTransaction(transaction, [payer, program], {\n preflightCommitment: deployCommitment\n });\n const {\n context,\n value\n } = await connection.confirmTransaction({\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n blockhash: transaction.recentBlockhash\n }, deployCommitment);\n if (value.err) {\n throw new Error(`Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`);\n }\n while (true) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n }\n await new Promise((resolve) => setTimeout(resolve, Math.round(MS_PER_SLOT / 2)));\n }\n }\n return true;\n }\n };\n Loader.chunkSize = CHUNK_SIZE;\n var BPF_LOADER_PROGRAM_ID = new PublicKey(\"BPFLoader2111111111111111111111111111111111\");\n var fetchImpl = globalThis.fetch;\n var LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32(\"typeIndex\"),\n u64(\"deactivationSlot\"),\n BufferLayout.nu64(\"lastExtendedSlot\"),\n BufferLayout.u8(\"lastExtendedStartIndex\"),\n BufferLayout.u8(),\n // option\n BufferLayout.seq(publicKey(), BufferLayout.offset(BufferLayout.u8(), -1), \"authority\")\n ])\n };\n var PublicKeyFromString = coerce(instance(PublicKey), string(), (value) => new PublicKey(value));\n var RawAccountDataResult = tuple([string(), literal(\"base64\")]);\n var BufferFromRawAccountData = coerce(instance(Buffer2), RawAccountDataResult, (value) => Buffer2.from(value[0], \"base64\"));\n var BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1e3;\n function createRpcResult(result) {\n return union([type({\n jsonrpc: literal(\"2.0\"),\n id: string(),\n result\n }), type({\n jsonrpc: literal(\"2.0\"),\n id: string(),\n error: type({\n code: unknown(),\n message: string(),\n data: optional(any())\n })\n })]);\n }\n var UnknownRpcResult = createRpcResult(unknown());\n function jsonRpcResult(schema) {\n return coerce(createRpcResult(schema), UnknownRpcResult, (value) => {\n if (\"error\" in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema)\n };\n }\n });\n }\n function jsonRpcResultAndContext(value) {\n return jsonRpcResult(type({\n context: type({\n slot: number()\n }),\n value\n }));\n }\n function notificationResultAndContext(value) {\n return type({\n context: type({\n slot: number()\n }),\n value\n });\n }\n var GetInflationGovernorResult = type({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number()\n });\n var GetInflationRewardResult = jsonRpcResult(array(nullable(type({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number()))\n }))));\n var GetRecentPrioritizationFeesResult = array(type({\n slot: number(),\n prioritizationFee: number()\n }));\n var GetInflationRateResult = type({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number()\n });\n var GetEpochInfoResult = type({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number())\n });\n var GetEpochScheduleResult = type({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number()\n });\n var GetLeaderScheduleResult = record(string(), array(number()));\n var TransactionErrorResult = nullable(union([type({}), string()]));\n var SignatureStatusResult = type({\n err: TransactionErrorResult\n });\n var SignatureReceivedResult = literal(\"receivedSignature\");\n var VersionResult = type({\n \"solana-core\": string(),\n \"feature-set\": optional(number())\n });\n var ParsedInstructionStruct = type({\n program: string(),\n programId: PublicKeyFromString,\n parsed: unknown()\n });\n var PartiallyDecodedInstructionStruct = type({\n programId: PublicKeyFromString,\n accounts: array(PublicKeyFromString),\n data: string()\n });\n var SimulatedTransactionResponseStruct = jsonRpcResultAndContext(type({\n err: nullable(union([type({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(nullable(array(nullable(type({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number())\n }))))),\n unitsConsumed: optional(number()),\n returnData: optional(nullable(type({\n programId: string(),\n data: tuple([string(), literal(\"base64\")])\n }))),\n innerInstructions: optional(nullable(array(type({\n index: number(),\n instructions: array(union([ParsedInstructionStruct, PartiallyDecodedInstructionStruct]))\n }))))\n }));\n var BlockProductionResponseStruct = jsonRpcResultAndContext(type({\n byIdentity: record(string(), array(number())),\n range: type({\n firstSlot: number(),\n lastSlot: number()\n })\n }));\n var GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n var GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n var GetRecentPrioritizationFeesRpcResult = jsonRpcResult(GetRecentPrioritizationFeesResult);\n var GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n var GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n var GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n var SlotRpcResult = jsonRpcResult(number());\n var GetSupplyRpcResult = jsonRpcResultAndContext(type({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString)\n }));\n var TokenAmountResult = type({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string())\n });\n var GetTokenLargestAccountsResult = jsonRpcResultAndContext(array(type({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string())\n })));\n var GetTokenAccountsByOwner = jsonRpcResultAndContext(array(type({\n pubkey: PublicKeyFromString,\n account: type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number()\n })\n })));\n var ParsedAccountDataResult = type({\n program: string(),\n parsed: unknown(),\n space: number()\n });\n var GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(array(type({\n pubkey: PublicKeyFromString,\n account: type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number()\n })\n })));\n var GetLargestAccountsRpcResult = jsonRpcResultAndContext(array(type({\n lamports: number(),\n address: PublicKeyFromString\n })));\n var AccountInfoResult = type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number()\n });\n var KeyedAccountInfoResult = type({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult\n });\n var ParsedOrRawAccountData = coerce(union([instance(Buffer2), ParsedAccountDataResult]), union([RawAccountDataResult, ParsedAccountDataResult]), (value) => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n });\n var ParsedAccountInfoResult = type({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number()\n });\n var KeyedParsedAccountInfoResult = type({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult\n });\n var StakeActivationResult = type({\n state: union([literal(\"active\"), literal(\"inactive\"), literal(\"activating\"), literal(\"deactivating\")]),\n active: number(),\n inactive: number()\n });\n var GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(array(type({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number()))\n })));\n var GetSignaturesForAddressRpcResult = jsonRpcResult(array(type({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number()))\n })));\n var AccountNotificationResult = type({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult)\n });\n var ProgramAccountInfoResult = type({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult\n });\n var ProgramAccountNotificationResult = type({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult)\n });\n var SlotInfoResult = type({\n parent: number(),\n slot: number(),\n root: number()\n });\n var SlotNotificationResult = type({\n subscription: number(),\n result: SlotInfoResult\n });\n var SlotUpdateResult = union([type({\n type: union([literal(\"firstShredReceived\"), literal(\"completed\"), literal(\"optimisticConfirmation\"), literal(\"root\")]),\n slot: number(),\n timestamp: number()\n }), type({\n type: literal(\"createdBank\"),\n parent: number(),\n slot: number(),\n timestamp: number()\n }), type({\n type: literal(\"frozen\"),\n slot: number(),\n timestamp: number(),\n stats: type({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number()\n })\n }), type({\n type: literal(\"dead\"),\n slot: number(),\n timestamp: number(),\n err: string()\n })]);\n var SlotUpdateNotificationResult = type({\n subscription: number(),\n result: SlotUpdateResult\n });\n var SignatureNotificationResult = type({\n subscription: number(),\n result: notificationResultAndContext(union([SignatureStatusResult, SignatureReceivedResult]))\n });\n var RootNotificationResult = type({\n subscription: number(),\n result: number()\n });\n var ContactInfoResult = type({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string())\n });\n var VoteAccountInfoResult = type({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number())\n });\n var GetVoteAccounts = jsonRpcResult(type({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult)\n }));\n var ConfirmationStatus = union([literal(\"processed\"), literal(\"confirmed\"), literal(\"finalized\")]);\n var SignatureStatusResponse = type({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus)\n });\n var GetSignatureStatusesRpcResult = jsonRpcResultAndContext(array(nullable(SignatureStatusResponse)));\n var GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n var AddressTableLookupStruct = type({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number())\n });\n var ConfirmedTransactionResult = type({\n signatures: array(string()),\n message: type({\n accountKeys: array(string()),\n header: type({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number()\n }),\n instructions: array(type({\n accounts: array(number()),\n data: string(),\n programIdIndex: number()\n })),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct))\n })\n });\n var AnnotatedAccountKey = type({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal(\"transaction\"), literal(\"lookupTable\")]))\n });\n var ConfirmedTransactionAccountsModeResult = type({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string())\n });\n var ParsedInstructionResult = type({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString\n });\n var RawInstructionResult = type({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString\n });\n var InstructionResult = union([RawInstructionResult, ParsedInstructionResult]);\n var UnknownInstructionResult = union([type({\n parsed: unknown(),\n program: string(),\n programId: string()\n }), type({\n accounts: array(string()),\n data: string(),\n programId: string()\n })]);\n var ParsedOrRawInstruction = coerce(InstructionResult, UnknownInstructionResult, (value) => {\n if (\"accounts\" in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n });\n var ParsedConfirmedTransactionResult = type({\n signatures: array(string()),\n message: type({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct)))\n })\n });\n var TokenBalanceResult = type({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n programId: optional(string()),\n uiTokenAmount: TokenAmountResult\n });\n var LoadedAddressesResult = type({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString)\n });\n var ConfirmedTransactionMetaResult = type({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(nullable(array(type({\n index: number(),\n instructions: array(type({\n accounts: array(number()),\n data: string(),\n programIdIndex: number()\n }))\n })))),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n costUnits: optional(number())\n });\n var ParsedConfirmedTransactionMetaResult = type({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(nullable(array(type({\n index: number(),\n instructions: array(ParsedOrRawInstruction)\n })))),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n costUnits: optional(number())\n });\n var TransactionVersionStruct = union([literal(0), literal(\"legacy\")]);\n var RewardsResult = type({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number()))\n });\n var GetBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetNoneModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetAccountsModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetParsedBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetParsedAccountsModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetParsedNoneModeBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number())\n })));\n var GetConfirmedBlockRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(type({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult)\n })),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number())\n })));\n var GetBlockSignaturesRpcResult = jsonRpcResult(nullable(type({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number())\n })));\n var GetTransactionRpcResult = jsonRpcResult(nullable(type({\n slot: number(),\n meta: nullable(ConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct)\n })));\n var GetParsedTransactionRpcResult = jsonRpcResult(nullable(type({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct)\n })));\n var GetLatestBlockhashRpcResult = jsonRpcResultAndContext(type({\n blockhash: string(),\n lastValidBlockHeight: number()\n }));\n var IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n var PerfSampleResult = type({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number()\n });\n var GetRecentPerformanceSamplesRpcResult = jsonRpcResult(array(PerfSampleResult));\n var GetFeeCalculatorRpcResult = jsonRpcResultAndContext(nullable(type({\n feeCalculator: type({\n lamportsPerSignature: number()\n })\n })));\n var RequestAirdropRpcResult = jsonRpcResult(string());\n var SendTransactionRpcResult = jsonRpcResult(string());\n var LogsResult = type({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string()\n });\n var LogsNotificationResult = type({\n result: notificationResultAndContext(LogsResult),\n subscription: number()\n });\n var Keypair = class _Keypair {\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair) {\n this._keypair = void 0;\n this._keypair = keypair ?? generateKeypair();\n }\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate() {\n return new _Keypair(generateKeypair());\n }\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(secretKey, options) {\n if (secretKey.byteLength !== 64) {\n throw new Error(\"bad secret key size\");\n }\n const publicKey2 = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey2[ii] !== computedPublicKey[ii]) {\n throw new Error(\"provided secretKey is invalid\");\n }\n }\n }\n return new _Keypair({\n publicKey: publicKey2,\n secretKey\n });\n }\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed) {\n const publicKey2 = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey2, 32);\n return new _Keypair({\n publicKey: publicKey2,\n secretKey\n });\n }\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey() {\n return new PublicKey(this._keypair.publicKey);\n }\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey() {\n return new Uint8Array(this._keypair.secretKey);\n }\n };\n var LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), u64(\"recentSlot\"), BufferLayout.u8(\"bumpSeed\")])\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), u64(), BufferLayout.seq(publicKey(), BufferLayout.offset(BufferLayout.u32(), -8), \"addresses\")])\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n }\n });\n var AddressLookupTableProgram = class {\n /**\n * @internal\n */\n constructor() {\n }\n static createLookupTable(params) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync([params.authority.toBuffer(), getU64Encoder().encode(params.recentSlot)], this.programId);\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type2, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed\n });\n const keys = [{\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n }];\n return [new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n }), lookupTableAddress];\n }\n static freezeLookupTable(params) {\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type2);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n static extendLookupTable(params) {\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type2, {\n addresses: params.addresses.map((addr) => addr.toBytes())\n });\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n if (params.payer) {\n keys.push({\n pubkey: params.payer,\n isSigner: true,\n isWritable: true\n }, {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false\n });\n }\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n static deactivateLookupTable(params) {\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type2);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n static closeLookupTable(params) {\n const type2 = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type2);\n const keys = [{\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true\n }];\n return new TransactionInstruction({\n programId: this.programId,\n keys,\n data\n });\n }\n };\n AddressLookupTableProgram.programId = new PublicKey(\"AddressLookupTab1e1111111111111111111111111\");\n var COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u8(\"instruction\"), BufferLayout.u32(\"units\"), BufferLayout.u32(\"additionalFee\")])\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u8(\"instruction\"), BufferLayout.u32(\"bytes\")])\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u8(\"instruction\"), BufferLayout.u32(\"units\")])\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u8(\"instruction\"), u64(\"microLamports\")])\n }\n });\n var ComputeBudgetProgram = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the Compute Budget program\n */\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params) {\n const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type2, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static requestHeapFrame(params) {\n const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type2, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static setComputeUnitLimit(params) {\n const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type2, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n static setComputeUnitPrice(params) {\n const type2 = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type2, {\n microLamports: BigInt(params.microLamports)\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data\n });\n }\n };\n ComputeBudgetProgram.programId = new PublicKey(\"ComputeBudget111111111111111111111111111111\");\n var PRIVATE_KEY_BYTES$1 = 64;\n var PUBLIC_KEY_BYTES$1 = 32;\n var SIGNATURE_BYTES = 64;\n var ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct([BufferLayout.u8(\"numSignatures\"), BufferLayout.u8(\"padding\"), BufferLayout.u16(\"signatureOffset\"), BufferLayout.u16(\"signatureInstructionIndex\"), BufferLayout.u16(\"publicKeyOffset\"), BufferLayout.u16(\"publicKeyInstructionIndex\"), BufferLayout.u16(\"messageDataOffset\"), BufferLayout.u16(\"messageDataSize\"), BufferLayout.u16(\"messageInstructionIndex\")]);\n var Ed25519Program = class _Ed25519Program {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the ed25519 program\n */\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(params) {\n const {\n publicKey: publicKey2,\n message,\n signature,\n instructionIndex\n } = params;\n assert2(publicKey2.length === PUBLIC_KEY_BYTES$1, `Public Key must be ${PUBLIC_KEY_BYTES$1} bytes but received ${publicKey2.length} bytes`);\n assert2(signature.length === SIGNATURE_BYTES, `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`);\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey2.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n const instructionData = Buffer2.alloc(messageDataOffset + message.length);\n const index = instructionIndex == null ? 65535 : instructionIndex;\n ED25519_INSTRUCTION_LAYOUT.encode({\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index\n }, instructionData);\n instructionData.fill(publicKey2, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n return new TransactionInstruction({\n keys: [],\n programId: _Ed25519Program.programId,\n data: instructionData\n });\n }\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(params) {\n const {\n privateKey,\n message,\n instructionIndex\n } = params;\n assert2(privateKey.length === PRIVATE_KEY_BYTES$1, `Private key must be ${PRIVATE_KEY_BYTES$1} bytes but received ${privateKey.length} bytes`);\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey2 = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n return this.createInstructionWithPublicKey({\n publicKey: publicKey2,\n message,\n signature,\n instructionIndex\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n };\n Ed25519Program.programId = new PublicKey(\"Ed25519SigVerify111111111111111111111111111\");\n var ecdsaSign = (msgHash, privKey) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery];\n };\n secp256k1.utils.isValidPrivateKey;\n var publicKeyCreate = secp256k1.getPublicKey;\n var PRIVATE_KEY_BYTES = 32;\n var ETHEREUM_ADDRESS_BYTES = 20;\n var PUBLIC_KEY_BYTES = 64;\n var SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n var SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct([BufferLayout.u8(\"numSignatures\"), BufferLayout.u16(\"signatureOffset\"), BufferLayout.u8(\"signatureInstructionIndex\"), BufferLayout.u16(\"ethAddressOffset\"), BufferLayout.u8(\"ethAddressInstructionIndex\"), BufferLayout.u16(\"messageDataOffset\"), BufferLayout.u16(\"messageDataSize\"), BufferLayout.u8(\"messageInstructionIndex\"), BufferLayout.blob(20, \"ethAddress\"), BufferLayout.blob(64, \"signature\"), BufferLayout.u8(\"recoveryId\")]);\n var Secp256k1Program = class _Secp256k1Program {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the secp256k1 program\n */\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(publicKey2) {\n assert2(publicKey2.length === PUBLIC_KEY_BYTES, `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey2.length} bytes`);\n try {\n return Buffer2.from(keccak_256(toBuffer(publicKey2))).slice(-ETHEREUM_ADDRESS_BYTES);\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(params) {\n const {\n publicKey: publicKey2,\n message,\n signature,\n recoveryId,\n instructionIndex\n } = params;\n return _Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: _Secp256k1Program.publicKeyToEthAddress(publicKey2),\n message,\n signature,\n recoveryId,\n instructionIndex\n });\n }\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(params) {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0\n } = params;\n let ethAddress;\n if (typeof rawAddress === \"string\") {\n if (rawAddress.startsWith(\"0x\")) {\n ethAddress = Buffer2.from(rawAddress.substr(2), \"hex\");\n } else {\n ethAddress = Buffer2.from(rawAddress, \"hex\");\n }\n } else {\n ethAddress = rawAddress;\n }\n assert2(ethAddress.length === ETHEREUM_ADDRESS_BYTES, `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`);\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n const instructionData = Buffer2.alloc(SECP256K1_INSTRUCTION_LAYOUT.span + message.length);\n SECP256K1_INSTRUCTION_LAYOUT.encode({\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId\n }, instructionData);\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n return new TransactionInstruction({\n keys: [],\n programId: _Secp256k1Program.programId,\n data: instructionData\n });\n }\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(params) {\n const {\n privateKey: pkey,\n message,\n instructionIndex\n } = params;\n assert2(pkey.length === PRIVATE_KEY_BYTES, `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`);\n try {\n const privateKey = toBuffer(pkey);\n const publicKey2 = publicKeyCreate(\n privateKey,\n false\n /* isCompressed */\n ).slice(1);\n const messageHash = Buffer2.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n return this.createInstructionWithPublicKey({\n publicKey: publicKey2,\n message,\n signature,\n recoveryId,\n instructionIndex\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n };\n Secp256k1Program.programId = new PublicKey(\"KeccakSecp256k11111111111111111111111111111\");\n var _Lockup;\n var STAKE_CONFIG_ID = new PublicKey(\"StakeConfig11111111111111111111111111111111\");\n var Lockup = class {\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp, epoch, custodian) {\n this.unixTimestamp = void 0;\n this.epoch = void 0;\n this.custodian = void 0;\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n /**\n * Default, inactive Lockup value\n */\n };\n _Lockup = Lockup;\n Lockup.default = new _Lockup(0, 0, PublicKey.default);\n var STAKE_INSTRUCTION_LAYOUTS = Object.freeze({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), authorized(), lockup()])\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"newAuthorized\"), BufferLayout.u32(\"stakeAuthorizationType\")])\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\")])\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\")])\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"newAuthorized\"), BufferLayout.u32(\"stakeAuthorizationType\"), rustString(\"authoritySeed\"), publicKey(\"authorityOwner\")])\n }\n });\n var StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0\n },\n Withdrawer: {\n index: 1\n }\n });\n var StakeProgram = class {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the Stake program\n */\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params) {\n const {\n stakePubkey,\n authorized: authorized2,\n lockup: maybeLockup\n } = params;\n const lockup2 = maybeLockup || Lockup.default;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type2, {\n authorized: {\n staker: toBuffer(authorized2.staker.toBuffer()),\n withdrawer: toBuffer(authorized2.withdrawer.toBuffer())\n },\n lockup: {\n unixTimestamp: lockup2.unixTimestamp,\n epoch: lockup2.epoch,\n custodian: toBuffer(lockup2.custodian.toBuffer())\n }\n });\n const instructionData = {\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n const {\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n } = params;\n return transaction.add(this.initialize({\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n }));\n }\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n const {\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n } = params;\n return transaction.add(this.initialize({\n stakePubkey,\n authorized: authorized2,\n lockup: lockup2\n }));\n }\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n votePubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type2);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: votePubkey,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: STAKE_CONFIG_ID,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type2, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params) {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type2, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer())\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorityBase,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * @internal\n */\n static splitInstruction(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type2, {\n lamports\n });\n return new TransactionInstruction({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: splitStakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(params, rentExemptReserve) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: rentExemptReserve,\n space: this.space,\n programId: this.programId\n }));\n return transaction.add(this.splitInstruction(params));\n }\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(params, rentExemptReserve) {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports\n } = params;\n const transaction = new Transaction();\n transaction.add(SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId\n }));\n if (rentExemptReserve && rentExemptReserve > 0) {\n transaction.add(SystemProgram.transfer({\n fromPubkey: params.authorizedPubkey,\n toPubkey: splitStakePubkey,\n lamports: rentExemptReserve\n }));\n }\n return transaction.add(this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports\n }));\n }\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params) {\n const {\n stakePubkey,\n sourceStakePubKey,\n authorizedPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type2);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: sourceStakePubKey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params) {\n const {\n stakePubkey,\n authorizedPubkey,\n toPubkey,\n lamports,\n custodianPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type2, {\n lamports\n });\n const keys = [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params) {\n const {\n stakePubkey,\n authorizedPubkey\n } = params;\n const type2 = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type2);\n return new Transaction().add({\n keys: [{\n pubkey: stakePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n });\n }\n };\n StakeProgram.programId = new PublicKey(\"Stake11111111111111111111111111111111111111\");\n StakeProgram.space = 200;\n var VOTE_INSTRUCTION_LAYOUTS = Object.freeze({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), voteInit()])\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), publicKey(\"newAuthorized\"), BufferLayout.u32(\"voteAuthorizationType\")])\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), BufferLayout.ns64(\"lamports\")])\n },\n UpdateValidatorIdentity: {\n index: 4,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\")])\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([BufferLayout.u32(\"instruction\"), voteAuthorizeWithSeedArgs()])\n }\n });\n var VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0\n },\n Withdrawer: {\n index: 1\n }\n });\n var VoteProgram = class _VoteProgram {\n /**\n * @internal\n */\n constructor() {\n }\n /**\n * Public key that identifies the Vote program\n */\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(params) {\n const {\n votePubkey,\n nodePubkey,\n voteInit: voteInit2\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type2, {\n voteInit: {\n nodePubkey: toBuffer(voteInit2.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit2.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(voteInit2.authorizedWithdrawer.toBuffer()),\n commission: voteInit2.commission\n }\n });\n const instructionData = {\n keys: [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: nodePubkey,\n isSigner: true,\n isWritable: false\n }],\n programId: this.programId,\n data\n };\n return new TransactionInstruction(instructionData);\n }\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params) {\n const transaction = new Transaction();\n transaction.add(SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId\n }));\n return transaction.add(this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit\n }));\n }\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params) {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type2, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: authorizedPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params) {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type2, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(currentAuthorityDerivedKeyOwnerPubkey.toBuffer()),\n currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index\n }\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: SYSVAR_CLOCK_PUBKEY,\n isSigner: false,\n isWritable: false\n }, {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params) {\n const {\n votePubkey,\n authorizedWithdrawerPubkey,\n lamports,\n toPubkey\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type2, {\n lamports\n });\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: toPubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: authorizedWithdrawerPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(params, currentVoteAccountBalance, rentExemptMinimum) {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\"Withdraw will leave vote account with insufficient funds.\");\n }\n return _VoteProgram.withdraw(params);\n }\n /**\n * Generate a transaction to update the validator identity (node pubkey) of a Vote account.\n */\n static updateValidatorIdentity(params) {\n const {\n votePubkey,\n authorizedWithdrawerPubkey,\n nodePubkey\n } = params;\n const type2 = VOTE_INSTRUCTION_LAYOUTS.UpdateValidatorIdentity;\n const data = encodeData(type2);\n const keys = [{\n pubkey: votePubkey,\n isSigner: false,\n isWritable: true\n }, {\n pubkey: nodePubkey,\n isSigner: true,\n isWritable: false\n }, {\n pubkey: authorizedWithdrawerPubkey,\n isSigner: true,\n isWritable: false\n }];\n return new Transaction().add({\n keys,\n programId: this.programId,\n data\n });\n }\n };\n VoteProgram.programId = new PublicKey(\"Vote111111111111111111111111111111111111111\");\n VoteProgram.space = 3762;\n var VALIDATOR_INFO_KEY = new PublicKey(\"Va1idator1nfo111111111111111111111111111111\");\n var InfoString = type({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n iconUrl: optional(string()),\n keybaseUsername: optional(string())\n });\n var VOTE_PROGRAM_ID = new PublicKey(\"Vote111111111111111111111111111111111111111\");\n var VoteAccountLayout = BufferLayout.struct([\n publicKey(\"nodePubkey\"),\n publicKey(\"authorizedWithdrawer\"),\n BufferLayout.u8(\"commission\"),\n BufferLayout.nu64(),\n // votes.length\n BufferLayout.seq(BufferLayout.struct([BufferLayout.nu64(\"slot\"), BufferLayout.u32(\"confirmationCount\")]), BufferLayout.offset(BufferLayout.u32(), -8), \"votes\"),\n BufferLayout.u8(\"rootSlotValid\"),\n BufferLayout.nu64(\"rootSlot\"),\n BufferLayout.nu64(),\n // authorizedVoters.length\n BufferLayout.seq(BufferLayout.struct([BufferLayout.nu64(\"epoch\"), publicKey(\"authorizedVoter\")]), BufferLayout.offset(BufferLayout.u32(), -8), \"authorizedVoters\"),\n BufferLayout.struct([BufferLayout.seq(BufferLayout.struct([publicKey(\"authorizedPubkey\"), BufferLayout.nu64(\"epochOfLastAuthorizedSwitch\"), BufferLayout.nu64(\"targetEpoch\")]), 32, \"buf\"), BufferLayout.nu64(\"idx\"), BufferLayout.u8(\"isEmpty\")], \"priorVoters\"),\n BufferLayout.nu64(),\n // epochCredits.length\n BufferLayout.seq(BufferLayout.struct([BufferLayout.nu64(\"epoch\"), BufferLayout.nu64(\"credits\"), BufferLayout.nu64(\"prevCredits\")]), BufferLayout.offset(BufferLayout.u32(), -8), \"epochCredits\"),\n BufferLayout.struct([BufferLayout.nu64(\"slot\"), BufferLayout.nu64(\"timestamp\")], \"lastTimestamp\")\n ]);\n\n // src/lib/lit-actions/internal/solana/generatePrivateKey.ts\n function generateSolanaPrivateKey() {\n const solanaKeypair = Keypair.generate();\n return {\n privateKey: Buffer2.from(solanaKeypair.secretKey).toString(\"hex\"),\n publicKey: solanaKeypair.publicKey.toString()\n };\n }\n\n // src/lib/lit-actions/raw-action-functions/solana/generateEncryptedSolanaPrivateKey.ts\n async function generateEncryptedSolanaPrivateKey({\n evmContractConditions: evmContractConditions2\n }) {\n const { privateKey, publicKey: publicKey2 } = generateSolanaPrivateKey();\n return encryptPrivateKey({\n evmContractConditions: evmContractConditions2,\n publicKey: publicKey2,\n privateKey\n });\n }\n\n // src/lib/lit-actions/self-executing-actions/solana/generateEncryptedSolanaPrivateKey.ts\n (async () => litActionHandler(\n async () => generateEncryptedSolanaPrivateKey({\n evmContractConditions\n })\n ))();\n})();\n/*! Bundled license information:\n\n@jspm/core/nodelibs/browser/chunk-DtuTasat.js:\n (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *)\n\nsafe-buffer/index.js:\n (*! safe-buffer. MIT License. Feross Aboukhadijeh *)\n\n@solana/buffer-layout/lib/Layout.js:\n (**\n * Support for translating between Uint8Array instances and JavaScript\n * native types.\n *\n * {@link module:Layout~Layout|Layout} is the basis of a class\n * hierarchy that associates property names with sequences of encoded\n * bytes.\n *\n * Layouts are supported for these scalar (numeric) types:\n * * {@link module:Layout~UInt|Unsigned integers in little-endian\n * format} with {@link module:Layout.u8|8-bit}, {@link\n * module:Layout.u16|16-bit}, {@link module:Layout.u24|24-bit},\n * {@link module:Layout.u32|32-bit}, {@link\n * module:Layout.u40|40-bit}, and {@link module:Layout.u48|48-bit}\n * representation ranges;\n * * {@link module:Layout~UIntBE|Unsigned integers in big-endian\n * format} with {@link module:Layout.u16be|16-bit}, {@link\n * module:Layout.u24be|24-bit}, {@link module:Layout.u32be|32-bit},\n * {@link module:Layout.u40be|40-bit}, and {@link\n * module:Layout.u48be|48-bit} representation ranges;\n * * {@link module:Layout~Int|Signed integers in little-endian\n * format} with {@link module:Layout.s8|8-bit}, {@link\n * module:Layout.s16|16-bit}, {@link module:Layout.s24|24-bit},\n * {@link module:Layout.s32|32-bit}, {@link\n * module:Layout.s40|40-bit}, and {@link module:Layout.s48|48-bit}\n * representation ranges;\n * * {@link module:Layout~IntBE|Signed integers in big-endian format}\n * with {@link module:Layout.s16be|16-bit}, {@link\n * module:Layout.s24be|24-bit}, {@link module:Layout.s32be|32-bit},\n * {@link module:Layout.s40be|40-bit}, and {@link\n * module:Layout.s48be|48-bit} representation ranges;\n * * 64-bit integral values that decode to an exact (if magnitude is\n * less than 2^53) or nearby integral Number in {@link\n * module:Layout.nu64|unsigned little-endian}, {@link\n * module:Layout.nu64be|unsigned big-endian}, {@link\n * module:Layout.ns64|signed little-endian}, and {@link\n * module:Layout.ns64be|unsigned big-endian} encodings;\n * * 32-bit floating point values with {@link\n * module:Layout.f32|little-endian} and {@link\n * module:Layout.f32be|big-endian} representations;\n * * 64-bit floating point values with {@link\n * module:Layout.f64|little-endian} and {@link\n * module:Layout.f64be|big-endian} representations;\n * * {@link module:Layout.const|Constants} that take no space in the\n * encoded expression.\n *\n * and for these aggregate types:\n * * {@link module:Layout.seq|Sequence}s of instances of a {@link\n * module:Layout~Layout|Layout}, with JavaScript representation as\n * an Array and constant or data-dependent {@link\n * module:Layout~Sequence#count|length};\n * * {@link module:Layout.struct|Structure}s that aggregate a\n * heterogeneous sequence of {@link module:Layout~Layout|Layout}\n * instances, with JavaScript representation as an Object;\n * * {@link module:Layout.union|Union}s that support multiple {@link\n * module:Layout~VariantLayout|variant layouts} over a fixed\n * (padded) or variable (not padded) span of bytes, using an\n * unsigned integer at the start of the data or a separate {@link\n * module:Layout.unionLayoutDiscriminator|layout element} to\n * determine which layout to use when interpreting the buffer\n * contents;\n * * {@link module:Layout.bits|BitStructure}s that contain a sequence\n * of individual {@link\n * module:Layout~BitStructure#addField|BitField}s packed into an 8,\n * 16, 24, or 32-bit unsigned integer starting at the least- or\n * most-significant bit;\n * * {@link module:Layout.cstr|C strings} of varying length;\n * * {@link module:Layout.blob|Blobs} of fixed- or variable-{@link\n * module:Layout~Blob#length|length} raw data.\n *\n * All {@link module:Layout~Layout|Layout} instances are immutable\n * after construction, to prevent internal state from becoming\n * inconsistent.\n *\n * @local Layout\n * @local ExternalLayout\n * @local GreedyCount\n * @local OffsetLayout\n * @local UInt\n * @local UIntBE\n * @local Int\n * @local IntBE\n * @local NearUInt64\n * @local NearUInt64BE\n * @local NearInt64\n * @local NearInt64BE\n * @local Float\n * @local FloatBE\n * @local Double\n * @local DoubleBE\n * @local Sequence\n * @local Structure\n * @local UnionDiscriminator\n * @local UnionLayoutDiscriminator\n * @local Union\n * @local VariantLayout\n * @local BitStructure\n * @local BitField\n * @local Boolean\n * @local Blob\n * @local CString\n * @local Constant\n * @local bindConstructorLayout\n * @module Layout\n * @license MIT\n * @author Peter A. Bigot\n * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}\n *)\n\n@noble/hashes/esm/utils.js:\n (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/modular.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/curve.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/edwards.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/ed25519.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/abstract/weierstrass.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/_shortw_utils.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n\n@noble/curves/esm/secp256k1.js:\n (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)\n*/\n"; module.exports = { "code": code, - "ipfsCid": "QmQg5uApmG88LTqFtvWzKYgkix2nSKjQ1NvERBeFyjdJVf", + "ipfsCid": "Qmb4hG6ATbjDyegJCCZYqMHucgkZTmE62nNFxmNd2byeR9", }; diff --git a/packages/libs/wrapped-keys/src/lib/lit-actions/internal/common/encryptKey.ts b/packages/libs/wrapped-keys/src/lib/lit-actions/internal/common/encryptPrivateKey.ts similarity index 61% rename from packages/libs/wrapped-keys/src/lib/lit-actions/internal/common/encryptKey.ts rename to packages/libs/wrapped-keys/src/lib/lit-actions/internal/common/encryptPrivateKey.ts index 76af6e9f9..52363cb3e 100644 --- a/packages/libs/wrapped-keys/src/lib/lit-actions/internal/common/encryptKey.ts +++ b/packages/libs/wrapped-keys/src/lib/lit-actions/internal/common/encryptPrivateKey.ts @@ -6,23 +6,24 @@ declare const Lit: typeof LitNamespace; /** * @private - * @returns { Promise<{ciphertext: string, dataToEncryptHash: string, publicKey: string}> } - The ciphertext & dataToEncryptHash which are the result of the encryption, and the publicKey of the newly generated Wrapped Key. + * @returns { Promise<{ciphertext: string, dataToEncryptHash: string, publicKey: string, evmContractConditions: string}> } - The ciphertext & dataToEncryptHash which are the result of the encryption, the publicKey of the newly generated Wrapped Key, and the access control conditions used for encryption. */ export async function encryptPrivateKey({ - accessControlConditions, + evmContractConditions, privateKey, publicKey, }: { - accessControlConditions: string; + evmContractConditions: string; privateKey: string; publicKey: string; }): Promise<{ ciphertext: string; dataToEncryptHash: string; publicKey: string; + evmContractConditions: string; }> { const { ciphertext, dataToEncryptHash } = await Lit.Actions.encrypt({ - accessControlConditions, + accessControlConditions: evmContractConditions, to_encrypt: new TextEncoder().encode(LIT_PREFIX + privateKey), }); @@ -30,5 +31,6 @@ export async function encryptPrivateKey({ ciphertext, dataToEncryptHash, publicKey, + evmContractConditions, }; } diff --git a/packages/libs/wrapped-keys/src/lib/lit-actions/internal/common/getDecryptedKeyToSingleNode.ts b/packages/libs/wrapped-keys/src/lib/lit-actions/internal/common/getDecryptedKeyToSingleNode.ts deleted file mode 100644 index 8de02e223..000000000 --- a/packages/libs/wrapped-keys/src/lib/lit-actions/internal/common/getDecryptedKeyToSingleNode.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { LitNamespace } from '../../../Lit'; - -import { AbortError } from '../../abortError'; -import { removeSaltFromDecryptedKey } from '../../utils'; - -declare const Lit: typeof LitNamespace; - -interface TryDecryptToSingleNodeParams { - accessControlConditions: string; - ciphertext: string; - dataToEncryptHash: string; -} - -async function tryDecryptToSingleNode({ - accessControlConditions, - ciphertext, - dataToEncryptHash, -}: TryDecryptToSingleNodeParams): Promise { - try { - // May be undefined, since we're using `decryptToSingleNode` - return await Lit.Actions.decryptToSingleNode({ - accessControlConditions, - ciphertext, - dataToEncryptHash, - chain: 'ethereum', - authSig: null, - }); - } catch (err: unknown) { - throw new Error(`When decrypting key to a single node - ${(err as Error).message}`); - } -} - -interface GetDecryptedKeyToSingleNodeParams { - accessControlConditions: string; // Define a more specific type if possible - ciphertext: string; // Define a more specific type if possible - dataToEncryptHash: string; // Define a more specific type if possible -} - -export async function getDecryptedKeyToSingleNode({ - accessControlConditions, - ciphertext, - dataToEncryptHash, -}: GetDecryptedKeyToSingleNodeParams): Promise { - const decryptedPrivateKey = await tryDecryptToSingleNode({ - accessControlConditions, - ciphertext, - dataToEncryptHash, - }); - - if (!decryptedPrivateKey) { - // Silently exit on nodes which didn't run the `decryptToSingleNode` code - throw new AbortError(); - } - - return removeSaltFromDecryptedKey(decryptedPrivateKey); -} diff --git a/packages/libs/wrapped-keys/src/lib/lit-actions/raw-action-functions/common/batchGenerateEncryptedKeys.ts b/packages/libs/wrapped-keys/src/lib/lit-actions/raw-action-functions/common/batchGenerateEncryptedKeys.ts index f5ee992ca..5f0b30b82 100644 --- a/packages/libs/wrapped-keys/src/lib/lit-actions/raw-action-functions/common/batchGenerateEncryptedKeys.ts +++ b/packages/libs/wrapped-keys/src/lib/lit-actions/raw-action-functions/common/batchGenerateEncryptedKeys.ts @@ -1,4 +1,4 @@ -import { encryptPrivateKey } from '../../internal/common/encryptKey'; +import { encryptPrivateKey } from '../../internal/common/encryptPrivateKey'; import { generateSolanaPrivateKey } from '../../internal/solana/generatePrivateKey'; interface Action { @@ -10,22 +10,22 @@ interface Action { export interface BatchGenerateEncryptedKeysParams { actions: Action[]; - accessControlConditions: string; + evmContractConditions: string; } async function processSolanaAction({ action, - accessControlConditions, + evmContractConditions, }: { action: Action; - accessControlConditions: string; + evmContractConditions: string; }) { const { network, generateKeyParams } = action; const solanaKey = generateSolanaPrivateKey(); const generatedPrivateKey = await encryptPrivateKey({ - accessControlConditions, + evmContractConditions, publicKey: solanaKey.publicKey, privateKey: solanaKey.privateKey, }); @@ -41,7 +41,7 @@ async function processSolanaAction({ async function processActions({ actions, - accessControlConditions, + evmContractConditions, }: BatchGenerateEncryptedKeysParams) { return Promise.all( actions.map(async (action, ndx) => { @@ -50,7 +50,7 @@ async function processActions({ if (network === 'solana') { return await processSolanaAction({ action, - accessControlConditions, + evmContractConditions, }); } else { throw new Error(`Invalid network for action[${ndx}]: ${network}`); @@ -85,12 +85,12 @@ function validateParams(actions: Action[]) { export async function batchGenerateEncryptedKeys({ actions, - accessControlConditions, + evmContractConditions, }: BatchGenerateEncryptedKeysParams) { validateParams(actions); return processActions({ actions, - accessControlConditions, + evmContractConditions, }); } diff --git a/packages/libs/wrapped-keys/src/lib/lit-actions/raw-action-functions/solana/generateEncryptedSolanaPrivateKey.ts b/packages/libs/wrapped-keys/src/lib/lit-actions/raw-action-functions/solana/generateEncryptedSolanaPrivateKey.ts index df6db24b1..3afcfeb94 100644 --- a/packages/libs/wrapped-keys/src/lib/lit-actions/raw-action-functions/solana/generateEncryptedSolanaPrivateKey.ts +++ b/packages/libs/wrapped-keys/src/lib/lit-actions/raw-action-functions/solana/generateEncryptedSolanaPrivateKey.ts @@ -1,28 +1,29 @@ -import { encryptPrivateKey } from '../../internal/common/encryptKey'; +import { encryptPrivateKey } from '../../internal/common/encryptPrivateKey'; import { generateSolanaPrivateKey } from '../../internal/solana/generatePrivateKey'; /** * Bundles solana/web3.js package as it's required to generate a random Solana key and only allows the provided PKP to decrypt it * - * @param {string} accessControlConditions - The access control condition that allows only the pkpAddress to decrypt the Wrapped Key + * @param {string} evmContractConditions - The evm contract access control condition that allows only the pkpAddress to decrypt the Wrapped Key * * @returns { Promise<{ciphertext: string, dataToEncryptHash: string, publicKey: string}> } - Returns JSON object with ciphertext & dataToEncryptHash which are the result of the encryption. Also returns the publicKey of the newly generated Solana Wrapped Key. */ export interface GenerateEncryptedSolanaPrivateKeyParams { - accessControlConditions: string; + evmContractConditions: string; } export async function generateEncryptedSolanaPrivateKey({ - accessControlConditions, + evmContractConditions, }: GenerateEncryptedSolanaPrivateKeyParams): Promise<{ ciphertext: string; dataToEncryptHash: string; publicKey: string; + evmContractConditions: string; }> { const { privateKey, publicKey } = generateSolanaPrivateKey(); return encryptPrivateKey({ - accessControlConditions, + evmContractConditions, publicKey, privateKey, }); diff --git a/packages/libs/wrapped-keys/src/lib/lit-actions/self-executing-actions/common/batchGenerateEncryptedKeys.ts b/packages/libs/wrapped-keys/src/lib/lit-actions/self-executing-actions/common/batchGenerateEncryptedKeys.ts index 9bb901b84..b08a1a6a4 100644 --- a/packages/libs/wrapped-keys/src/lib/lit-actions/self-executing-actions/common/batchGenerateEncryptedKeys.ts +++ b/packages/libs/wrapped-keys/src/lib/lit-actions/self-executing-actions/common/batchGenerateEncryptedKeys.ts @@ -5,7 +5,7 @@ import { batchGenerateEncryptedKeys } from '../../raw-action-functions/common/ba // Using local declarations to avoid _every file_ thinking these are always in scope declare const actions: BatchGenerateEncryptedKeysParams['actions']; -declare const accessControlConditions: BatchGenerateEncryptedKeysParams['accessControlConditions']; +declare const evmContractConditions: BatchGenerateEncryptedKeysParams['evmContractConditions']; (async () => - litActionHandler(async () => batchGenerateEncryptedKeys({ actions, accessControlConditions })))(); + litActionHandler(async () => batchGenerateEncryptedKeys({ actions, evmContractConditions })))(); diff --git a/packages/libs/wrapped-keys/src/lib/lit-actions/self-executing-actions/solana/generateEncryptedSolanaPrivateKey.ts b/packages/libs/wrapped-keys/src/lib/lit-actions/self-executing-actions/solana/generateEncryptedSolanaPrivateKey.ts index be6996e7e..38d5ba2c6 100644 --- a/packages/libs/wrapped-keys/src/lib/lit-actions/self-executing-actions/solana/generateEncryptedSolanaPrivateKey.ts +++ b/packages/libs/wrapped-keys/src/lib/lit-actions/self-executing-actions/solana/generateEncryptedSolanaPrivateKey.ts @@ -4,11 +4,11 @@ import { litActionHandler } from '../../litActionHandler'; import { generateEncryptedSolanaPrivateKey } from '../../raw-action-functions/solana/generateEncryptedSolanaPrivateKey'; // Using local declarations to avoid _every file_ thinking these are always in scope -declare const accessControlConditions: GenerateEncryptedSolanaPrivateKeyParams['accessControlConditions']; +declare const evmContractConditions: GenerateEncryptedSolanaPrivateKeyParams['evmContractConditions']; (async () => litActionHandler(async () => generateEncryptedSolanaPrivateKey({ - accessControlConditions, + evmContractConditions, }), ))(); diff --git a/packages/libs/wrapped-keys/src/lib/service-client/client.ts b/packages/libs/wrapped-keys/src/lib/service-client/client.ts index 9ccdcf94d..3348db8a5 100644 --- a/packages/libs/wrapped-keys/src/lib/service-client/client.ts +++ b/packages/libs/wrapped-keys/src/lib/service-client/client.ts @@ -9,7 +9,7 @@ import type { FetchKeyParams, ListKeysParams, StoreKeyBatchParams, StoreKeyParam import { generateRequestId, getBaseRequestParams, makeRequest } from './utils'; /** Fetches previously stored private key metadata from the Vincent wrapped keys service. - * Note that this list will not include `ciphertext` or `dataToEncryptHash` necessary to decrypt the keys. + * Note that this list will not include `ciphertext`, `dataToEncryptHash`, or `evmContractConditions` necessary to decrypt the keys. * Use `fetchPrivateKey()` to get those values. * * @param { ListKeysParams } params Parameters required to fetch the private key metadata @@ -27,14 +27,14 @@ export async function listPrivateKeyMetadata(params: ListKeysParams): Promise({ - url: `${baseUrl}/delegatee/encrypted/${delegatorAddress}`, + url: `${baseUrl}/delegated/encrypted/${encodeURIComponent(delegatorAddress)}`, init: initParams, requestId, }); } /** Fetches complete previously stored private key data from the Vincent wrapped keys service. - * Includes the `ciphertext` and `dataToEncryptHash` necessary to decrypt the key. + * Includes the `ciphertext`, `dataToEncryptHash`, and `evmContractConditions` necessary to decrypt the key. * * @param { FetchKeyParams } params Parameters required to fetch the private key data * @returns { Promise } The private key data object @@ -51,7 +51,7 @@ export async function fetchPrivateKey(params: FetchKeyParams): Promise({ - url: `${baseUrl}/delegatee/encrypted/${delegatorAddress}/${id}`, + url: `${baseUrl}/delegated/encrypted/${encodeURIComponent(delegatorAddress)}/${id}`, init: initParams, requestId, }); @@ -73,8 +73,8 @@ export async function storePrivateKey(params: StoreKeyParams): Promise({ - url: `${baseUrl}/delegatee/encrypted`, + const { delegatorAddress, id } = await makeRequest({ + url: `${baseUrl}/delegated/encrypted`, init: { ...initParams, body: JSON.stringify(storedKeyMetadata), @@ -82,7 +82,7 @@ export async function storePrivateKey(params: StoreKeyParams): Promise({ - url: `${baseUrl}/delegatee/encrypted_batch`, + const { delegatorAddress, ids } = await makeRequest({ + url: `${baseUrl}/delegated/encrypted_batch`, init: { ...initParams, body: JSON.stringify({ keyParamsBatch: storedKeyMetadataBatch }), @@ -112,5 +112,5 @@ export async function storePrivateKeyBatch( requestId, }); - return { pkpAddress, ids }; + return { delegatorAddress, ids }; } diff --git a/packages/libs/wrapped-keys/src/lib/service-client/constants.ts b/packages/libs/wrapped-keys/src/lib/service-client/constants.ts index 69406a6c7..082ed8d2f 100644 --- a/packages/libs/wrapped-keys/src/lib/service-client/constants.ts +++ b/packages/libs/wrapped-keys/src/lib/service-client/constants.ts @@ -4,9 +4,8 @@ import type { SupportedNetworks } from './types'; * Mapping of supported Lit networks to their corresponding Vincent wrapped keys service URLs. * * Vincent only supports production 'datil' network and uses the shared wrapped keys infrastructure - * at wrapped.litprotocol.com. All Vincent delegatee requests use the `/delegatee/encrypted` routes. + * at wrapped.litprotocol.com. All Vincent delegatee requests use the `/delegated/encrypted` routes. * - * @constant {Record} */ export const SERVICE_URL_BY_LIT_NETWORK: Record = { datil: 'https://wrapped.litprotocol.com', @@ -15,10 +14,10 @@ export const SERVICE_URL_BY_LIT_NETWORK: Record = { /** * Authorization header prefix for JWT tokens used in Vincent wrapped keys service requests. * - * Vincent delegatees authenticate using JWT tokens with the standard Bearer authorization scheme. + * Vincent delegatees and Vincent platform users authenticate using JWT tokens with the standard Bearer authorization scheme. * This prefix is prepended to the JWT token to form the complete Authorization header value. * - * @constant {string} + * @constant * @example * // Results in: "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." * const authHeader = `${JWT_AUTHORIZATION_SCHEMA_PREFIX}${jwtToken}`; diff --git a/packages/libs/wrapped-keys/src/lib/service-client/types.ts b/packages/libs/wrapped-keys/src/lib/service-client/types.ts index e275b8a04..c86d995d3 100644 --- a/packages/libs/wrapped-keys/src/lib/service-client/types.ts +++ b/packages/libs/wrapped-keys/src/lib/service-client/types.ts @@ -7,8 +7,8 @@ import type { StoredKeyData } from '../types'; * Base parameters required for all Vincent wrapped keys service API calls. * * @interface BaseApiParams - * @property {string} jwtToken - JWT token for Vincent delegatee authentication with the wrapped keys service - * @property {LIT_NETWORK_VALUES} litNetwork - The Lit network being used + * @property jwtToken - JWT token for Vincent delegatee authentication with the wrapped keys service + * @property litNetwork - The Lit network being used */ interface BaseApiParams { jwtToken: string; @@ -18,9 +18,8 @@ interface BaseApiParams { /** * Parameters for fetching a specific encrypted private key from the Vincent wrapped keys service. * - * @typedef {BaseApiParams & Object} FetchKeyParams - * @property {string} delegatorAddress - The Vincent Agent Wallet address associated with the key - * @property {string} id - The unique identifier (UUID v4) of the encrypted private key to fetch + * @property delegatorAddress - The Vincent Agent Wallet address associated with the key + * @property id - The unique identifier (UUID v4) of the encrypted private key to fetch */ export type FetchKeyParams = BaseApiParams & { delegatorAddress: string; @@ -30,8 +29,7 @@ export type FetchKeyParams = BaseApiParams & { /** * Parameters for listing all encrypted private key metadata for a Vincent Agent Wallet. * - * @typedef {BaseApiParams & Object} ListKeysParams - * @property {string} delegatorAddress - The Vincent Agent Wallet address to list keys for + * @property delegatorAddress - The Vincent Agent Wallet address to list keys for */ export type ListKeysParams = BaseApiParams & { delegatorAddress: string; @@ -40,8 +38,6 @@ export type ListKeysParams = BaseApiParams & { /** * Supported Lit networks for Vincent wrapped keys operations. * Vincent only supports production 'datil' network, not test networks. - * - * @typedef {'datil'} SupportedNetworks */ export type SupportedNetworks = Extract; @@ -50,17 +46,25 @@ export type SupportedNetworks = Extract; * * @interface StoreKeyParams * @extends BaseApiParams - * @property {Object} storedKeyMetadata - The encrypted key metadata to store - * @property {string} storedKeyMetadata.publicKey - The public key of the encrypted keypair - * @property {string} storedKeyMetadata.keyType - The type of key (e.g., 'ed25519' for Solana) - * @property {string} storedKeyMetadata.dataToEncryptHash - SHA-256 hash of the ciphertext for verification - * @property {string} storedKeyMetadata.ciphertext - The base64 encoded, encrypted private key - * @property {string} storedKeyMetadata.memo - User-provided descriptor for the key + * @property storedKeyMetadata - The encrypted key metadata to store + * @property storedKeyMetadata.publicKey - The public key of the encrypted keypair + * @property storedKeyMetadata.keyType - The type of key (e.g., 'ed25519' for Solana) + * @property storedKeyMetadata.dataToEncryptHash - SHA-256 hash of the ciphertext for verification + * @property storedKeyMetadata.ciphertext - The base64 encoded, encrypted private key + * @property storedKeyMetadata.memo - User-visible descriptor for the key + * @property storedKeyMetadata.delegatorAddress - The Vincent delegator wallet address associated with the key + * @property storedKeyMetadata.evmContractConditions - The serialized evm contract access control conditions that will gate decryption of the generated key */ export interface StoreKeyParams extends BaseApiParams { storedKeyMetadata: Pick< StoredKeyData, - 'publicKey' | 'keyType' | 'dataToEncryptHash' | 'ciphertext' | 'memo' + | 'publicKey' + | 'keyType' + | 'dataToEncryptHash' + | 'ciphertext' + | 'memo' + | 'delegatorAddress' + | 'evmContractConditions' >; } @@ -70,17 +74,25 @@ export interface StoreKeyParams extends BaseApiParams { * * @interface StoreKeyBatchParams * @extends BaseApiParams - * @property {Array} storedKeyMetadataBatch - Array of encrypted key metadata to store - * @property {string} storedKeyMetadataBatch[].publicKey - The public key of the encrypted keypair - * @property {string} storedKeyMetadataBatch[].keyType - The type of key (e.g., 'ed25519' for Solana) - * @property {string} storedKeyMetadataBatch[].dataToEncryptHash - SHA-256 hash of the ciphertext for verification - * @property {string} storedKeyMetadataBatch[].ciphertext - The base64 encoded, encrypted private key - * @property {string} storedKeyMetadataBatch[].memo - User-provided descriptor for the key + * @property storedKeyMetadataBatch - Array of encrypted key metadata to store + * @property storedKeyMetadataBatch[].publicKey - The public key of the encrypted keypair + * @property storedKeyMetadataBatch[].keyType - The type of key (e.g., 'ed25519' for Solana) + * @property storedKeyMetadataBatch[].dataToEncryptHash - SHA-256 hash of the ciphertext for verification + * @property storedKeyMetadataBatch[].ciphertext - The base64 encoded, encrypted private key + * @property storedKeyMetadataBatch[].memo - User-provided descriptor for the key + * @property storedKeyMetadataBatch[].delegatorAddress - The Vincent delegator wallet address associated with the key + * @property storedKeyMetadataBatch[].evmContractConditions - The serialized evm contract access control conditions that will gate decryption of the generated key */ export interface StoreKeyBatchParams extends BaseApiParams { storedKeyMetadataBatch: Pick< StoredKeyData, - 'publicKey' | 'keyType' | 'dataToEncryptHash' | 'ciphertext' | 'memo' + | 'publicKey' + | 'keyType' + | 'dataToEncryptHash' + | 'ciphertext' + | 'memo' + | 'delegatorAddress' + | 'evmContractConditions' >[]; } @@ -89,10 +101,10 @@ export interface StoreKeyBatchParams extends BaseApiParams { * Used by utility functions to build authenticated requests. * * @interface BaseRequestParams - * @property {string} jwtToken - JWT token for Vincent delegatee authentication - * @property {'GET' | 'POST'} method - HTTP method for the request - * @property {LIT_NETWORKS_KEYS} litNetwork - The Lit network identifier for routing - * @property {string} requestId - Unique identifier for request tracking and debugging + * @property jwtToken - JWT token for Vincent delegatee authentication + * @property method - HTTP method for the request + * @property litNetwork - The Lit network identifier for routing + * @property requestId - Unique identifier for request tracking and debugging */ export interface BaseRequestParams { jwtToken: string; diff --git a/packages/libs/wrapped-keys/src/lib/service-client/utils.ts b/packages/libs/wrapped-keys/src/lib/service-client/utils.ts index d1d201a46..47ad7d597 100644 --- a/packages/libs/wrapped-keys/src/lib/service-client/utils.ts +++ b/packages/libs/wrapped-keys/src/lib/service-client/utils.ts @@ -7,8 +7,8 @@ import { JWT_AUTHORIZATION_SCHEMA_PREFIX, SERVICE_URL_BY_LIT_NETWORK } from './c /** * Creates an Authorization header value for JWT token authentication. * - * @param {string} jwtToken - The JWT token from Vincent delegatee authentication - * @returns {string} Complete Authorization header value with Bearer prefix + * @param jwtToken - The JWT token from Vincent delegatee or Vincent platform user authentication + * @returns Complete Authorization header value with Bearer prefix * * @internal */ @@ -20,7 +20,7 @@ function composeAuthHeader(jwtToken: string) { * Array of supported Lit networks for Vincent wrapped keys operations. * Vincent only supports production 'datil' network. * - * @constant {SupportedNetworks[]} + * @constant * @internal */ const supportedNetworks: SupportedNetworks[] = ['datil']; @@ -28,10 +28,6 @@ const supportedNetworks: SupportedNetworks[] = ['datil']; /** * TypeScript assertion function that validates a Lit network is supported by Vincent. * Throws an error if the network is not in the supported networks list. - * - * @param {LIT_NETWORK_VALUES} litNetwork - The Lit network to validate - * @throws {Error} If the network is not supported by Vincent - * * @internal */ function isSupportedLitNetwork( @@ -45,11 +41,6 @@ function isSupportedLitNetwork( /** * Gets the service URL for the specified Lit network. - * - * @param {BaseRequestParams} params - Request parameters containing the Lit network - * @returns {string} The Vincent wrapped keys service URL for the network - * @throws {Error} If the network is not supported - * * @internal */ function getServiceUrl({ litNetwork }: BaseRequestParams) { @@ -64,10 +55,10 @@ function getServiceUrl({ litNetwork }: BaseRequestParams) { * This function prepares the URL and headers needed for authenticated requests to the * Vincent wrapped keys service, including JWT authorization and correlation ID for tracking. * - * @param {BaseRequestParams} requestParams - Base parameters for the request - * @returns {Object} Object containing the base URL and initialized request parameters - * @returns {string} returns.baseUrl - The complete service URL for the Lit network - * @returns {RequestInit} returns.initParams - Fetch-compatible request initialization parameters + * @param requestParams - Base parameters for the request + * @returns Object containing the base URL and initialized request parameters + * @returns returns.baseUrl - The complete service URL for the Lit network + * @returns returns.initParams - Fetch-compatible request initialization parameters * * @throws {Error} If the Lit network is not supported by Vincent * @@ -110,8 +101,8 @@ export function getBaseRequestParams(requestParams: BaseRequestParams): { * with a `message` field. However, infrastructure errors may return plain text responses. * This function gracefully handles both cases. * - * @param {Response} response - The HTTP response from fetch() - * @returns {Promise} The error message extracted from the response + * @param response - The HTTP response from fetch() + * @returns The error message extracted from the response * * @internal */ @@ -134,10 +125,6 @@ async function getResponseErrorMessage(response: Response): Promise { * However, some misbehaving infrastructure could return a 200 OK response with * plain text body. This function handles both cases gracefully. * - * @template T - The expected type of the JSON response - * @param {Response} response - The HTTP response from fetch() - * @returns {Promise} Parsed JSON response or plain text string - * * @internal */ async function getResponseJson(response: Response): Promise { @@ -154,7 +141,7 @@ async function getResponseJson(response: Response): Promise { * The request ID is used for correlation between client and server logs, * making it easier to debug issues with specific requests. * - * @returns {string} A random hexadecimal string to use as request ID + * @returns A random hexadecimal string to use as request ID * * @example * ```typescript @@ -173,18 +160,18 @@ export function generateRequestId(): string { * with request ID for tracking. * * @template T - The expected type of the successful response - * @param {Object} params - Request parameters - * @param {string} params.url - The complete URL to make the request to - * @param {RequestInit} params.init - Fetch-compatible request initialization - * @param {string} params.requestId - Unique request ID for tracking - * @returns {Promise} The parsed response data + * @param params - Request parameters + * @param params.url - The complete URL to make the request to + * @param params.init - Fetch-compatible request initialization + * @param params.requestId - Unique request ID for tracking + * @returns The parsed response data * * @throws {Error} If the request fails, with Vincent-specific error formatting * * @example * ```typescript * const result = await makeRequest({ - * url: 'https://wrapped.litprotocol.com/delegatee/encrypted/0x123/abc-def', + * url: 'https://wrapped.litprotocol.com/delegated/encrypted/0x123/abc-def', * init: { method: 'GET', headers: { ... } }, * requestId: 'req123' * }); diff --git a/packages/libs/wrapped-keys/src/lib/types.ts b/packages/libs/wrapped-keys/src/lib/types.ts index 1cf9b20b4..44c6e0070 100644 --- a/packages/libs/wrapped-keys/src/lib/types.ts +++ b/packages/libs/wrapped-keys/src/lib/types.ts @@ -1,12 +1,12 @@ import type { ILitNodeClient, SessionSigsMap } from '@lit-protocol/types'; -/** @typedef Network +/** * The network type that the wrapped key will be used on. */ export type Network = 'solana'; export type KeyType = 'ed25519'; -/** @typedef GeneratePrivateKeyAction +/** * @extends ApiParamsSupportedNetworks */ export type GeneratePrivateKeyAction = ApiParamsSupportedNetworks & { @@ -16,14 +16,11 @@ export type GeneratePrivateKeyAction = ApiParamsSupportedNetworks & { /** All API calls for the wrapped keys service require these arguments. * - * @typedef BaseApiParams - * @property {SessionSigsMap} delegateeSessionSigs - The Session Signatures produced by the Vincent Delegatee for authenticating with the Lit network to execute Lit Actions and decrypt keys. - * @property {string} jwtToken - The JWT token from the Vincent Delegatee for authenticating with the Vincent wrapped keys service lambdas. - * @property {string} delegatorAddress - The Vincent delegator Wallet Address that the wrapped keys will be associated with. - * @property {ILitNodeClient} litNodeClient - The Lit Node Client used for executing the Lit Action and identifying which wrapped keys backend service to communicate with. + * @property jwtToken - The JWT token for authenticating with the Vincent wrapped keys storage service. + * @property delegatorAddress - The Vincent delegator Wallet Address that the wrapped keys will be associated with. + * @property litNodeClient - The Lit Node Client used for executing the Lit Action and identifying which wrapped keys backend service to communicate with. */ export interface BaseApiParams { - delegateeSessionSigs: SessionSigsMap; jwtToken: string; delegatorAddress: string; litNodeClient: ILitNodeClient; @@ -33,20 +30,22 @@ export interface ApiParamsSupportedNetworks { network: Network; } -/** @typedef GeneratePrivateKeyParams +/** * @extends BaseApiParams - * @property {Network} network The network for which the private key needs to be generated; keys are generated differently for different networks - * @property { string } memo A (typically) user-provided descriptor for the encrypted private key + * @property network The network for which the private key needs to be generated; keys are generated differently for different networks + * @property memo A (typically) user-provided descriptor for the encrypted private key + * @property delegatorSessionSigs - The Session Signatures produced by the Vincent delegator for authenticating with the Lit network to execute Lit Actions that decrypt or generate new keys */ export type GeneratePrivateKeyParams = BaseApiParams & ApiParamsSupportedNetworks & { + delegatorSessionSigs: SessionSigsMap; memo: string; }; -/** @typedef GeneratePrivateKeyResult - * @property { string } delegatorAddress The Vincent delegator Wallet Address that the key was linked to - * @property { string } generatedPublicKey The public key component of the newly generated keypair - * @property { string } id The unique identifier (UUID V4) of the encrypted private key +/** + * @property delegatorAddress The Vincent delegator PKP address that is associated with the encrypted private key + * @property generatedPublicKey The public key component of the newly generated keypair + * @property id The unique identifier (UUID V4) of the encrypted private key */ export interface GeneratePrivateKeyResult { delegatorAddress: string; @@ -54,10 +53,12 @@ export interface GeneratePrivateKeyResult { id: string; } -/** @typedef BatchGeneratePrivateKeysParams +/** * @extends BaseApiParams + * @property delegatorSessionSigs - The Session Signatures produced by the Vincent delegator for authenticating with the Lit network to execute Lit Actions that generate new keys */ export type BatchGeneratePrivateKeysParams = BaseApiParams & { + delegatorSessionSigs: SessionSigsMap; actions: GeneratePrivateKeyAction[]; }; @@ -73,82 +74,113 @@ export interface BatchGeneratePrivateKeysResult { results: BatchGeneratePrivateKeysActionResult[]; } +/** Exporting a previously persisted key only requires valid pkpSessionSigs and a LIT Node Client instance configured for the appropriate network. + * + * @extends BaseApiParams + * @property delegatorSessionSigs The Session Signatures produced by the Vincent delegator for authenticating with the Lit network to decrypt the encrypted wrapped key + * @property id The unique identifier (UUID V4) of the encrypted private key + */ +export type ExportPrivateKeyParams = BaseApiParams & { + delegatorSessionSigs: SessionSigsMap; + id: string; +}; + +/** Includes the decrypted private key and metadata that was stored alongside it in the wrapped keys service + * + * @property decryptedPrivateKey The decrypted, plain text private key that was persisted to the wrapped keys service + * @property delegatorAddress The LIT PKP Address that the key was linked to; this is derived from the provided pkpSessionSigs + * @property publicKey The public key of the key being imported into the wrapped keys service + * @property keyType The algorithm type of the key; this might be K256, ed25519, or other key formats. The `keyType` will be included in the metadata returned from the wrapped keys service + * @property memo A (typically) user-provided descriptor for the encrypted private key + * @property id The unique identifier (UUID V4) of the encrypted private key + * @property litNetwork The Lit network that the client who stored the key was connected to + */ +export interface ExportPrivateKeyResult { + delegatorAddress: string; + decryptedPrivateKey: string; + publicKey: string; + keyType: KeyType; + memo: string; + id: string; + litNetwork: string; +} + /** Metadata for a key that has been stored, encrypted, on the wrapped keys backend service * Returned by `listPrivateKeyMetadata`; to get full stored key data including `ciphertext` and `dataToEncryptHash` * use `fetchPrivateKey()` * - * @typedef StoredKeyMetadata - * @property { string } publicKey The public key of the encrypted private key - * @property { string } pkpAddress The Vincent delegator PKP address that is associated with the encrypted private key - * @property { string } keyType The type of key that was encrypted -- e.g. ed25519, K256, etc. - * @property { string } memo A (typically) user-provided descriptor for the encrypted private key - * @property { string } id The unique identifier (UUID V4) of the encrypted private key - * @property { string } litNetwork The LIT network that the client who stored the key was connected to + * @property publicKey The public key of the encrypted private key + * @property delegatorAddress The Vincent delegator PKP address that is associated with the encrypted private key + * @property keyType The type of key that was encrypted -- e.g. ed25519, K256, etc. + * @property memo A (typically) user-provided descriptor for the encrypted private key + * @property id The unique identifier (UUID V4) of the encrypted private key + * @property litNetwork The LIT network that the client who stored the key was connected to */ export interface StoredKeyMetadata { publicKey: string; - pkpAddress: string; + delegatorAddress: string; keyType: KeyType; litNetwork: string; memo: string; id: string; } -/** Complete encrypted private key data, including the `ciphertext` and `dataToEncryptHash` necessary to decrypt the key +/** Complete encrypted private key data, including the `ciphertext`, `dataToEncryptHash` and `vincentWalletAddress` necessary to decrypt the key * * @extends StoredKeyMetadata - * @property { string } ciphertext The base64 encoded, salted & encrypted private key - * @property { string } dataToEncryptHash SHA-256 of the ciphertext + * @property ciphertext The base64 encoded, salted & encrypted private key + * @property dataToEncryptHash SHA-256 of the ciphertext + * @property delegatorAddress The Vincent delegator wallet address associated with the key + * @property evmContractConditions The serialized evm contract access control conditions that will gate decryption of the generated key */ export interface StoredKeyData extends StoredKeyMetadata { ciphertext: string; dataToEncryptHash: string; + delegatorAddress: string; + evmContractConditions: string; } /** Result of storing a private key in the wrapped keys backend service * Includes the unique identifier which is necessary to get the encrypted ciphertext and dataToEncryptHash in the future * - * @typedef StoreEncryptedKeyResult - * @property { string } pkpAddress The Vincent delegator PKP address that the key was linked to - * @property { string } id The unique identifier (UUID V4) of the encrypted private key + * @property delegatorAddress The Vincent delegator PKP address that the key was linked to + * @property id The unique identifier (UUID V4) of the encrypted private key */ export interface StoreEncryptedKeyResult { id: string; - pkpAddress: string; + delegatorAddress: string; } /** Result of storing a batch of private keys in the wrapped keys backend service * Includes an array of unique identifiers, which are necessary to get the encrypted ciphertext and dataToEncryptHash in the future * - * @typedef StoreEncryptedKeyBatchResult - * @property { string } pkpAddress The Vincent delegator PKP address that the key was linked to - * @property { string[] } ids Array of the unique identifiers (UUID V4) of the encrypted private keys in the same order provided + * @property delegatorAddress The Vincent delegator PKP address that the key was linked to + * @property ids Array of the unique identifiers (UUID V4) of the encrypted private keys in the same order provided */ export interface StoreEncryptedKeyBatchResult { ids: string[]; - pkpAddress: string; + delegatorAddress: string; } -/** @typedef ListEncryptedKeyMetadataParams - * @extends BaseApiParams +/** Params for listing encrypted key matadata for a Vincent delegator */ export type ListEncryptedKeyMetadataParams = BaseApiParams; -/** @typedef GetEncryptedKeyDataParams - * @extends BaseApiParams - * @property { string } id The unique identifier (UUID V4) of the encrypted private key to fetch +/** Params for getting a specific encrypted key + * @property id The unique identifier (UUID V4) of the encrypted private key to fetch */ export type GetEncryptedKeyDataParams = BaseApiParams & { id: string; }; -/** @typedef StoreEncryptedKeyParams - * @extends BaseApiParams - * @property { string } publicKey The public key of the encrypted private key - * @property { KeyType } keyType The type of key that was encrypted - * @property { string } ciphertext The base64 encoded, salted & encrypted private key - * @property { string } dataToEncryptHash SHA-256 of the ciphertext - * @property { string } memo A (typically) user-provided descriptor for the encrypted private key +/** Params for storing a single encrypted private key to the wrapped keys backend service + * + * @property publicKey The public key of the encrypted private key + * @property keyType The type of key that was encrypted + * @property ciphertext The base64 encoded, salted & encrypted private key + * @property dataToEncryptHash SHA-256 of the ciphertext + * @property memo A (typically) user-provided descriptor for the encrypted private key + * @property evmContractConditions The serialized evm contract access control conditions that will gate decryption of the generated key */ export type StoreEncryptedKeyParams = BaseApiParams & { publicKey: string; @@ -156,11 +188,12 @@ export type StoreEncryptedKeyParams = BaseApiParams & { ciphertext: string; dataToEncryptHash: string; memo: string; + evmContractConditions: string; }; -/** @typedef StoreEncryptedKeyBatchParams - * @extends BaseApiParams - * @property { Array } keyBatch Array of encrypted private keys to store +/** Params for storing a batch of encrypted private keys to the wrapped keys backend service. + * + * @property keyBatch Array of encrypted private keys to store */ export type StoreEncryptedKeyBatchParams = BaseApiParams & { keyBatch: Array<{ @@ -169,5 +202,6 @@ export type StoreEncryptedKeyBatchParams = BaseApiParams & { ciphertext: string; dataToEncryptHash: string; memo: string; + evmContractConditions: string; }>; }; diff --git a/packages/libs/wrapped-keys/src/lib/lit-actions/utils.ts b/packages/libs/wrapped-keys/src/lib/utils.ts similarity index 88% rename from packages/libs/wrapped-keys/src/lib/lit-actions/utils.ts rename to packages/libs/wrapped-keys/src/lib/utils.ts index 1624d73b2..68929c44b 100644 --- a/packages/libs/wrapped-keys/src/lib/lit-actions/utils.ts +++ b/packages/libs/wrapped-keys/src/lib/utils.ts @@ -1,4 +1,4 @@ -import { LIT_PREFIX } from '../constants'; +import { LIT_PREFIX } from './constants'; export function removeSaltFromDecryptedKey(decryptedPrivateKey: string) { if (!decryptedPrivateKey.startsWith(LIT_PREFIX)) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bc19ce2e1..e53f90062 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -183,6 +183,9 @@ importers: '@account-kit/smart-contracts': specifier: ^4.53.1 version: 4.62.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(viem@2.29.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.25.64)) + '@lit-protocol/encryption': + specifier: ^7.3.1 + version: 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) '@lit-protocol/esbuild-plugin-polyfill-node': specifier: ^0.3.0 version: 0.3.0(esbuild@0.25.9) @@ -251,17 +254,20 @@ importers: specifier: ^1.44.2 version: 1.51.0 '@lit-protocol/auth-helpers': - specifier: ^7.3.0 - version: 7.3.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + specifier: ^7.3.1 + version: 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) '@lit-protocol/constants': - specifier: ^7.2.3 - version: 7.3.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + specifier: ^7.3.1 + version: 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) '@lit-protocol/contracts-sdk': specifier: ^7.2.3 version: 7.3.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) '@lit-protocol/lit-node-client': specifier: ^7.2.3 version: 7.3.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/types': + specifier: ^7.2.3 + version: 7.3.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) viem: specifier: 2.29.2 version: 2.29.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.25.64) @@ -1343,6 +1349,12 @@ importers: '@ethersproject/abi': specifier: ^5.8.0 version: 5.8.0 + '@lit-protocol/constants': + specifier: ^7.3.1 + version: 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/contracts-sdk': + specifier: ^7.2.3 + version: 7.3.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) cbor2: specifier: ^2.0.1 version: 2.0.1 @@ -1359,18 +1371,15 @@ importers: '@lit-protocol/auth-helpers': specifier: ^7.2.3 version: 7.3.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) - '@lit-protocol/constants': - specifier: ^7.2.3 - version: 7.3.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) - '@lit-protocol/contracts-sdk': - specifier: ^7.2.3 - version: 7.3.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) '@lit-protocol/lit-node-client': specifier: ^7.2.3 version: 7.3.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) '@lit-protocol/pkp-ethers': specifier: ^7.2.3 version: 7.3.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/types': + specifier: ^7.2.3 + version: 7.3.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) '@openzeppelin/contracts': specifier: 5.3.0 version: 5.3.0 @@ -1524,6 +1533,9 @@ importers: specifier: ^2.8.1 version: 2.8.1 devDependencies: + '@lit-protocol/lit-node-client': + specifier: ^7.2.3 + version: 7.3.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) '@types/semver': specifier: ^7.7.0 version: 7.7.1 @@ -3286,18 +3298,30 @@ packages: '@lit-protocol/access-control-conditions@7.3.0': resolution: {integrity: sha512-aMa50yZLmdD86fl20LnPEhOLzX4C3JquzYNaCtOMf74fjDZRz2/FCJQmkZZgTas/n9YIy8jzwXVa1dz45MJNxA==} + '@lit-protocol/access-control-conditions@7.3.1': + resolution: {integrity: sha512-5K1d68VVXW4zJXg+RkzEQKNMw0tRmnSag1LtigNrv2Rb9U4WmrHFHwH6QSQo7aiwUsAmzFBCWzZzpU3a1Cjo5w==} + '@lit-protocol/accs-schemas@0.0.31': resolution: {integrity: sha512-L3MxpXY1hP6Ep4GwD3ZBQjaFVPuF7VlLU0zJhODqcs+RkHXlcXp9py7rY2APJEW3Amx1LTMwaRKn63egn16RYw==} + '@lit-protocol/accs-schemas@0.0.36': + resolution: {integrity: sha512-JTKbziOCgvmfHeHFw7v68kUnB4q+oMZ6IIElGnhrTX+2+9hRygrN9gGufJVPjjFDSg4TfZtrDvmD2uknKKpLxg==} + '@lit-protocol/auth-browser@7.3.0': resolution: {integrity: sha512-buagyGSMPuVP93PnZ7tWw9rW8rWt6S+G/zVj6SOTdwchzxtSBoogO3Hv2TeLwDXDjF12sE2NCOqpWchJnCOOIg==} '@lit-protocol/auth-helpers@7.3.0': resolution: {integrity: sha512-eiQ5mkefWc1SH2vf4l5s5rNwiXV1SLTWz8+eUP+F0ZJkWNtJbOXFBCE9LbTf2cVSBboa1nwMa3QYIEd97RBzOg==} + '@lit-protocol/auth-helpers@7.3.1': + resolution: {integrity: sha512-xxbAyf3EXBpKOZLZQ8ZpIYt2Vd/j2pA5uzTuD7JisbQdou37CfzeKxpMdZrD6Y77U6spxcVqq5VMVnG9bJHkRw==} + '@lit-protocol/constants@7.3.0': resolution: {integrity: sha512-v6Fgc1WQIlPo7Wf7m6SFK8/DkJ7Yf8fHtj2xTGJWWLyiYmVSpu1xVzOf8eWy670S0rNbgJBJqEXU+883oPr3vg==} + '@lit-protocol/constants@7.3.1': + resolution: {integrity: sha512-2N/xHVF5XQ82RrRovE23DrO+QhaKfkQ2WAKQPIZ2mTiVlwcaEl0V/P0uTN2sArv3EHOsqnYeQqfWyR3N2LgAhA==} + '@lit-protocol/constants@8.0.4': resolution: {integrity: sha512-R3XvI/+9HrNDvQAmZg0f/EV0rK3/VvrQJazZJk7qyVq7EEwRdmWU017VBu744k1VP4szLZZ+SimyYZEEFSK97A==} @@ -3325,6 +3349,9 @@ packages: '@lit-protocol/crypto@7.3.0': resolution: {integrity: sha512-8mX+ByHQkCCtnt94ShZBSq/6/N8S9eUH2xMW/PZKG7uEFYoZo0JGoGyn7T5DZCvbvNyJ+cKkD5PpBwqPmkUGpA==} + '@lit-protocol/encryption@7.3.1': + resolution: {integrity: sha512-R/fn5S5PEQxT35CI7C15IzZuvOCT634zKAhyesjSlzF9hV10hwDWndC4Sb04qZBEZjwj9+tzmnKex7UuISFKYA==} + '@lit-protocol/esbuild-plugin-polyfill-node@0.3.0': resolution: {integrity: sha512-U8KBmWO/SQi05CWY1omPQSknirhRW+T/1zKaERqVUPx8njXmWUE2m9bHJe7uFqdgvTygYJ4iQ9fJLCz6KuUrlg==} peerDependencies: @@ -3347,12 +3374,18 @@ packages: '@lit-protocol/logger@7.3.0': resolution: {integrity: sha512-4QSu2DyHUNVRSXCgrLvGL6Y3E4J4Nt16iV3CK8rPPJvcNSeuQxofWswjPtYCohRJnvDLcBdIcsEzl3ZfpIrlEQ==} + '@lit-protocol/logger@7.3.1': + resolution: {integrity: sha512-GcRyyUyipXGlrbeAlaA3cfZB5jq20dVM3qVf66fRNgePfXo1p5OsVghQKfAzEd1GYjys6UdGM0tqAoWZIrKgbg==} + '@lit-protocol/misc-browser@7.3.0': resolution: {integrity: sha512-c5iMMnis9tKbHs1LkqCorchZooaVb+Ov7bBM8XVVggYGPLmyhebvnOQTTT87mtUCQjYamkuI8r5/Bat9iq4UfA==} '@lit-protocol/misc@7.3.0': resolution: {integrity: sha512-JM0TtR3zdhtbS8qSgqpRHw3VOlXUn5xnflUJcZg2q+wB+igVrYRf8hsOvLv1eu81OBnGoIWxjcPCbkD/RUyfzQ==} + '@lit-protocol/misc@7.3.1': + resolution: {integrity: sha512-AsGM58ULGoMP4FqSjzTj8yQ+8CBphFlVxz1NneIttEbhHKvaDU63wSAHD7HAA9GP2cxwYyirBrOzw5fJ1e+FSw==} + '@lit-protocol/nacl@7.3.0': resolution: {integrity: sha512-VgyuWNo5ZK98/lWFXGnLlkIu8iBMpHHUZO6QNJC/qaqwjLFapvav/jIwrrmcJNTOLiigRWnbW172VXbMgyuCHQ==} @@ -3365,9 +3398,15 @@ packages: '@lit-protocol/types@7.3.0': resolution: {integrity: sha512-3UB2nORoJNI52LEgNpz7xp9b6ZAsjMBREaTqafnVHeIAPBjI5TQ53/zoO2a8D7W5VD7X7eOCCAUDyk5fMO0tvQ==} + '@lit-protocol/types@7.3.1': + resolution: {integrity: sha512-ED8wtn3jownD19Oz4ExAzJOnqTXQ+yleT00jW3+Re4OGMqQ3xTgrASHMU4C1FdO/J44PmQRLhxXVrYpiVLm6Mw==} + '@lit-protocol/uint8arrays@7.3.0': resolution: {integrity: sha512-aloOYVdv9/f7sBFvs/iniAZ9Ii76QLz8VzNA/2ggz9q/NjlSF8bf4YrcOMDiaQ5/pSAxOQNNhiJkv35XuNxtiA==} + '@lit-protocol/uint8arrays@7.3.1': + resolution: {integrity: sha512-Y591CUPt17GzlDeQmcjCgMS77gGatHebIgEAgk7oV0oH2I1w6MooHLy6zWwXIlXh/8O5ZY6G6gcdzgmjz6f+Ng==} + '@lit-protocol/vincent-ability-sdk@2.3.1': resolution: {integrity: sha512-rhkpklYUa++BLDHDy7wRiaLnktHOHErxt+4j3Uo+qmj3nrrHUyVcqrsPQa5zVpCRJjr8k+JVcbR3XP32ubMEzw==} @@ -16375,10 +16414,39 @@ snapshots: - typescript - utf-8-validate + '@lit-protocol/access-control-conditions@7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)': + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/contracts': 5.7.0 + '@ethersproject/providers': 5.7.2(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@lit-protocol/accs-schemas': 0.0.36 + '@lit-protocol/constants': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/contracts': 0.0.74(typescript@5.8.3) + '@lit-protocol/logger': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/misc': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/types': 7.3.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@lit-protocol/uint8arrays': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@openagenda/verror': 3.1.4 + ajv: 8.17.1 + bech32: 2.0.0 + depd: 2.0.0 + ethers: 5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + siwe: 2.3.2(ethers@5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + tslib: 1.14.1 + util: 0.12.5 + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + '@lit-protocol/accs-schemas@0.0.31': dependencies: ajv: 8.17.1 + '@lit-protocol/accs-schemas@0.0.36': + dependencies: + ajv: 8.17.1 + '@lit-protocol/auth-browser@7.3.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)': dependencies: '@ethersproject/abstract-provider': 5.7.0 @@ -16432,6 +16500,33 @@ snapshots: - typescript - utf-8-validate + '@lit-protocol/auth-helpers@7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)': + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/contracts': 5.7.0 + '@ethersproject/providers': 5.7.2(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@lit-protocol/access-control-conditions': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/accs-schemas': 0.0.36 + '@lit-protocol/constants': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/contracts': 0.0.74(typescript@5.8.3) + '@lit-protocol/logger': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/misc': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/types': 7.3.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@lit-protocol/uint8arrays': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@openagenda/verror': 3.1.4 + ajv: 8.17.1 + bech32: 2.0.0 + depd: 2.0.0 + ethers: 5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + siwe: 2.3.2(ethers@5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + siwe-recap: 0.0.2-alpha.0(ethers@5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + tslib: 1.14.1 + util: 0.12.5 + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + '@lit-protocol/constants@7.3.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)': dependencies: '@ethersproject/abstract-provider': 5.7.0 @@ -16448,6 +16543,22 @@ snapshots: - typescript - utf-8-validate + '@lit-protocol/constants@7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)': + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@lit-protocol/accs-schemas': 0.0.36 + '@lit-protocol/contracts': 0.0.74(typescript@5.8.3) + '@lit-protocol/types': 7.3.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@openagenda/verror': 3.1.4 + depd: 2.0.0 + ethers: 5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + siwe: 2.3.2(ethers@5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + tslib: 1.14.1 + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + '@lit-protocol/constants@8.0.4(arktype@2.1.23)(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(valibot@1.1.0(typescript@5.8.3))': dependencies: '@lit-protocol/contracts': 0.7.0(typescript@5.8.3) @@ -16571,6 +16682,31 @@ snapshots: - typescript - utf-8-validate + '@lit-protocol/encryption@7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)': + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/contracts': 5.7.0 + '@ethersproject/providers': 5.7.2(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@lit-protocol/accs-schemas': 0.0.36 + '@lit-protocol/constants': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/contracts': 0.0.74(typescript@5.8.3) + '@lit-protocol/logger': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/misc': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/types': 7.3.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@lit-protocol/uint8arrays': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@openagenda/verror': 3.1.4 + ajv: 8.17.1 + bech32: 2.0.0 + depd: 2.0.0 + ethers: 5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + siwe: 2.3.2(ethers@5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + tslib: 1.14.1 + util: 0.12.5 + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + '@lit-protocol/esbuild-plugin-polyfill-node@0.3.0(esbuild@0.19.12)': dependencies: '@jspm/core': 2.1.0 @@ -16798,6 +16934,23 @@ snapshots: - typescript - utf-8-validate + '@lit-protocol/logger@7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)': + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@lit-protocol/accs-schemas': 0.0.36 + '@lit-protocol/constants': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/contracts': 0.0.74(typescript@5.8.3) + '@lit-protocol/types': 7.3.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@openagenda/verror': 3.1.4 + depd: 2.0.0 + ethers: 5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + siwe: 2.3.2(ethers@5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + tslib: 1.14.1 + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + '@lit-protocol/misc-browser@7.3.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)': dependencies: '@ethersproject/abstract-provider': 5.7.0 @@ -16839,6 +16992,29 @@ snapshots: - typescript - utf-8-validate + '@lit-protocol/misc@7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)': + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/contracts': 5.7.0 + '@ethersproject/providers': 5.7.2(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@lit-protocol/accs-schemas': 0.0.36 + '@lit-protocol/constants': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/contracts': 0.0.74(typescript@5.8.3) + '@lit-protocol/logger': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/types': 7.3.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@openagenda/verror': 3.1.4 + ajv: 8.17.1 + bech32: 2.0.0 + depd: 2.0.0 + ethers: 5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + siwe: 2.3.2(ethers@5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + tslib: 1.14.1 + util: 0.12.5 + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + '@lit-protocol/nacl@7.3.0': dependencies: tslib: 1.14.1 @@ -17017,6 +17193,18 @@ snapshots: - bufferutil - utf-8-validate + '@lit-protocol/types@7.3.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@lit-protocol/accs-schemas': 0.0.36 + depd: 2.0.0 + ethers: 5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + siwe: 2.3.2(ethers@5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + tslib: 1.14.1 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + '@lit-protocol/uint8arrays@7.3.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)': dependencies: '@ethersproject/abstract-provider': 5.7.0 @@ -17034,6 +17222,23 @@ snapshots: - typescript - utf-8-validate + '@lit-protocol/uint8arrays@7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)': + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@lit-protocol/accs-schemas': 0.0.36 + '@lit-protocol/constants': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/contracts': 0.0.74(typescript@5.8.3) + '@lit-protocol/types': 7.3.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@openagenda/verror': 3.1.4 + depd: 2.0.0 + ethers: 5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + siwe: 2.3.2(ethers@5.8.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + tslib: 1.14.1 + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + '@lit-protocol/vincent-ability-sdk@2.3.1(bufferutil@4.0.9)(debug@4.4.1)(typescript@5.8.3)(utf-8-validate@5.0.10)(viem@2.38.4(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.25.64))': dependencies: '@account-kit/infra': 4.62.0(bufferutil@4.0.9)(debug@4.4.1)(typescript@5.8.3)(utf-8-validate@5.0.10)(viem@2.38.4(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.25.64)) @@ -17055,8 +17260,8 @@ snapshots: '@lit-protocol/vincent-app-sdk@2.2.4(bufferutil@4.0.9)(debug@4.4.1)(react@19.1.1)(typescript@5.8.3)(utf-8-validate@5.0.10)(viem@2.38.4(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.25.64))': dependencies: - '@lit-protocol/auth-helpers': 7.3.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) - '@lit-protocol/constants': 7.3.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/auth-helpers': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) + '@lit-protocol/constants': 7.3.1(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) '@lit-protocol/lit-node-client': 7.3.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) '@lit-protocol/vincent-ability-sdk': 2.3.1(bufferutil@4.0.9)(debug@4.4.1)(typescript@5.8.3)(utf-8-validate@5.0.10)(viem@2.38.4(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.25.64)) '@lit-protocol/vincent-contracts-sdk': 2.0.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)